diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__config__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__config__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc5158fdf8027d4957997339ec6c0fd24aff49de Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__config__.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb99392163dd3f3189e263734194dfd53d0681db Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/_distributor_init.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/_distributor_init.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5db530eedcb467b01ef57871120af98820b0d0a Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/_distributor_init.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/version.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/version.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bc3206b7c54d386a890a9bad47407f4145f5651b Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/__pycache__/version.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2140970015d099763797d60a98a3a3b6f4b5f219 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__init__.py @@ -0,0 +1,14 @@ +""" +Module containing private utility functions +=========================================== + +The ``scipy._lib`` namespace is empty (for now). Tests for all +utilities in submodules of ``_lib`` can be run with:: + + from scipy import _lib + _lib.test() + +""" +from scipy._lib._testutils import PytestTester +test = PytestTester(__name__) +del PytestTester diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71c8c1b55426bf88fd284149a3bed60ba28111dd Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/__init__.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_array_api.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_array_api.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c3db94f3b4fc604eebc299c723df9d876a791dfc Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_array_api.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_bunch.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_bunch.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34ceac196cf77951f25cc1b924b706f7828c8031 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_bunch.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_ccallback.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_ccallback.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98fec39b304c0931c5dc17715cb3078515be5339 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_ccallback.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_docscrape.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_docscrape.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae9691bc1dbdf5ece22c7efbd442028884e5ff97 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_docscrape.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_elementwise_iterative_method.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_elementwise_iterative_method.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cf3307f7169279d64d85737f911bf52f8575e8e5 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_elementwise_iterative_method.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_finite_differences.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_finite_differences.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4291237c144390c51014dc696d72ce0bcdf261f Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_finite_differences.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_pep440.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_pep440.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd4b66d79d6efbad4436a800f12aeb9f9192394d Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_pep440.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_testutils.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_testutils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71348f9669b087e202659f335e6c09f9eca00c7e Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_testutils.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_threadsafety.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_threadsafety.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c262d48b453aeb47baaca3cef7c60b45d3e220c Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_threadsafety.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_util.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90593d9c898da8b43a9a0b9edf05a943c554c29a Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/_util.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/decorator.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/decorator.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75bfb4ae0954ecb8b598fdf9f3395de72fe3db18 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/decorator.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/deprecation.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/deprecation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6778981ede50e70366b91f86cc6cfdeeff94ded7 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/deprecation.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/doccer.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/doccer.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a336d55bc9f0010584da350b1fa345f5d309c93c Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/doccer.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/uarray.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/uarray.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee0e2e766b75f1495c5f5fdceb267884c89fbc22 Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/__pycache__/uarray.cpython-310.pyc differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api.py new file mode 100644 index 0000000000000000000000000000000000000000..8b4094d88c75d93367c481f5c3f603424cd6c13c --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api.py @@ -0,0 +1,606 @@ +"""Utility functions to use Python Array API compatible libraries. + +For the context about the Array API see: +https://data-apis.org/array-api/latest/purpose_and_scope.html + +The SciPy use case of the Array API is described on the following page: +https://data-apis.org/array-api/latest/use_cases.html#use-case-scipy +""" +import os + +from types import ModuleType +from typing import Any, Literal, TypeAlias + +import numpy as np +import numpy.typing as npt + +from scipy._lib import array_api_compat +from scipy._lib.array_api_compat import ( + is_array_api_obj, + size as xp_size, + numpy as np_compat, + device as xp_device, + is_numpy_namespace as is_numpy, + is_cupy_namespace as is_cupy, + is_torch_namespace as is_torch, + is_jax_namespace as is_jax, + is_array_api_strict_namespace as is_array_api_strict +) + +__all__ = [ + '_asarray', 'array_namespace', 'assert_almost_equal', 'assert_array_almost_equal', + 'get_xp_devices', + 'is_array_api_strict', 'is_complex', 'is_cupy', 'is_jax', 'is_numpy', 'is_torch', + 'SCIPY_ARRAY_API', 'SCIPY_DEVICE', 'scipy_namespace_for', + 'xp_assert_close', 'xp_assert_equal', 'xp_assert_less', + 'xp_copy', 'xp_copysign', 'xp_device', + 'xp_moveaxis_to_end', 'xp_ravel', 'xp_real', 'xp_sign', 'xp_size', + 'xp_take_along_axis', 'xp_unsupported_param_msg', 'xp_vector_norm', +] + + +# To enable array API and strict array-like input validation +SCIPY_ARRAY_API: str | bool = os.environ.get("SCIPY_ARRAY_API", False) +# To control the default device - for use in the test suite only +SCIPY_DEVICE = os.environ.get("SCIPY_DEVICE", "cpu") + +_GLOBAL_CONFIG = { + "SCIPY_ARRAY_API": SCIPY_ARRAY_API, + "SCIPY_DEVICE": SCIPY_DEVICE, +} + + +Array: TypeAlias = Any # To be changed to a Protocol later (see array-api#589) +ArrayLike: TypeAlias = Array | npt.ArrayLike + + +def _compliance_scipy(arrays): + """Raise exceptions on known-bad subclasses. + + The following subclasses are not supported and raise and error: + - `numpy.ma.MaskedArray` + - `numpy.matrix` + - NumPy arrays which do not have a boolean or numerical dtype + - Any array-like which is neither array API compatible nor coercible by NumPy + - Any array-like which is coerced by NumPy to an unsupported dtype + """ + for i in range(len(arrays)): + array = arrays[i] + + from scipy.sparse import issparse + # this comes from `_util._asarray_validated` + if issparse(array): + msg = ('Sparse arrays/matrices are not supported by this function. ' + 'Perhaps one of the `scipy.sparse.linalg` functions ' + 'would work instead.') + raise ValueError(msg) + + if isinstance(array, np.ma.MaskedArray): + raise TypeError("Inputs of type `numpy.ma.MaskedArray` are not supported.") + elif isinstance(array, np.matrix): + raise TypeError("Inputs of type `numpy.matrix` are not supported.") + if isinstance(array, np.ndarray | np.generic): + dtype = array.dtype + if not (np.issubdtype(dtype, np.number) or np.issubdtype(dtype, np.bool_)): + raise TypeError(f"An argument has dtype `{dtype!r}`; " + f"only boolean and numerical dtypes are supported.") + elif not is_array_api_obj(array): + try: + array = np.asanyarray(array) + except TypeError: + raise TypeError("An argument is neither array API compatible nor " + "coercible by NumPy.") + dtype = array.dtype + if not (np.issubdtype(dtype, np.number) or np.issubdtype(dtype, np.bool_)): + message = ( + f"An argument was coerced to an unsupported dtype `{dtype!r}`; " + f"only boolean and numerical dtypes are supported." + ) + raise TypeError(message) + arrays[i] = array + return arrays + + +def _check_finite(array: Array, xp: ModuleType) -> None: + """Check for NaNs or Infs.""" + msg = "array must not contain infs or NaNs" + try: + if not xp.all(xp.isfinite(array)): + raise ValueError(msg) + except TypeError: + raise ValueError(msg) + + +def array_namespace(*arrays: Array) -> ModuleType: + """Get the array API compatible namespace for the arrays xs. + + Parameters + ---------- + *arrays : sequence of array_like + Arrays used to infer the common namespace. + + Returns + ------- + namespace : module + Common namespace. + + Notes + ----- + Thin wrapper around `array_api_compat.array_namespace`. + + 1. Check for the global switch: SCIPY_ARRAY_API. This can also be accessed + dynamically through ``_GLOBAL_CONFIG['SCIPY_ARRAY_API']``. + 2. `_compliance_scipy` raise exceptions on known-bad subclasses. See + its definition for more details. + + When the global switch is False, it defaults to the `numpy` namespace. + In that case, there is no compliance check. This is a convenience to + ease the adoption. Otherwise, arrays must comply with the new rules. + """ + if not _GLOBAL_CONFIG["SCIPY_ARRAY_API"]: + # here we could wrap the namespace if needed + return np_compat + + _arrays = [array for array in arrays if array is not None] + + _arrays = _compliance_scipy(_arrays) + + return array_api_compat.array_namespace(*_arrays) + + +def _asarray( + array: ArrayLike, + dtype: Any = None, + order: Literal['K', 'A', 'C', 'F'] | None = None, + copy: bool | None = None, + *, + xp: ModuleType | None = None, + check_finite: bool = False, + subok: bool = False, + ) -> Array: + """SciPy-specific replacement for `np.asarray` with `order`, `check_finite`, and + `subok`. + + Memory layout parameter `order` is not exposed in the Array API standard. + `order` is only enforced if the input array implementation + is NumPy based, otherwise `order` is just silently ignored. + + `check_finite` is also not a keyword in the array API standard; included + here for convenience rather than that having to be a separate function + call inside SciPy functions. + + `subok` is included to allow this function to preserve the behaviour of + `np.asanyarray` for NumPy based inputs. + """ + if xp is None: + xp = array_namespace(array) + if is_numpy(xp): + # Use NumPy API to support order + if copy is True: + array = np.array(array, order=order, dtype=dtype, subok=subok) + elif subok: + array = np.asanyarray(array, order=order, dtype=dtype) + else: + array = np.asarray(array, order=order, dtype=dtype) + else: + try: + array = xp.asarray(array, dtype=dtype, copy=copy) + except TypeError: + coerced_xp = array_namespace(xp.asarray(3)) + array = coerced_xp.asarray(array, dtype=dtype, copy=copy) + + if check_finite: + _check_finite(array, xp) + + return array + + +def xp_copy(x: Array, *, xp: ModuleType | None = None) -> Array: + """ + Copies an array. + + Parameters + ---------- + x : array + + xp : array_namespace + + Returns + ------- + copy : array + Copied array + + Notes + ----- + This copy function does not offer all the semantics of `np.copy`, i.e. the + `subok` and `order` keywords are not used. + """ + # Note: for older NumPy versions, `np.asarray` did not support the `copy` kwarg, + # so this uses our other helper `_asarray`. + if xp is None: + xp = array_namespace(x) + + return _asarray(x, copy=True, xp=xp) + + +def _strict_check(actual, desired, xp, *, + check_namespace=True, check_dtype=True, check_shape=True, + check_0d=True): + __tracebackhide__ = True # Hide traceback for py.test + if check_namespace: + _assert_matching_namespace(actual, desired) + + # only NumPy distinguishes between scalars and arrays; we do if check_0d=True. + # do this first so we can then cast to array (and thus use the array API) below. + if is_numpy(xp) and check_0d: + _msg = ("Array-ness does not match:\n Actual: " + f"{type(actual)}\n Desired: {type(desired)}") + assert ((xp.isscalar(actual) and xp.isscalar(desired)) + or (not xp.isscalar(actual) and not xp.isscalar(desired))), _msg + + actual = xp.asarray(actual) + desired = xp.asarray(desired) + + if check_dtype: + _msg = f"dtypes do not match.\nActual: {actual.dtype}\nDesired: {desired.dtype}" + assert actual.dtype == desired.dtype, _msg + + if check_shape: + _msg = f"Shapes do not match.\nActual: {actual.shape}\nDesired: {desired.shape}" + assert actual.shape == desired.shape, _msg + + desired = xp.broadcast_to(desired, actual.shape) + return actual, desired + + +def _assert_matching_namespace(actual, desired): + __tracebackhide__ = True # Hide traceback for py.test + actual = actual if isinstance(actual, tuple) else (actual,) + desired_space = array_namespace(desired) + for arr in actual: + arr_space = array_namespace(arr) + _msg = (f"Namespaces do not match.\n" + f"Actual: {arr_space.__name__}\n" + f"Desired: {desired_space.__name__}") + assert arr_space == desired_space, _msg + + +def xp_assert_equal(actual, desired, *, check_namespace=True, check_dtype=True, + check_shape=True, check_0d=True, err_msg='', xp=None): + __tracebackhide__ = True # Hide traceback for py.test + if xp is None: + xp = array_namespace(actual) + + actual, desired = _strict_check( + actual, desired, xp, check_namespace=check_namespace, + check_dtype=check_dtype, check_shape=check_shape, + check_0d=check_0d + ) + + if is_cupy(xp): + return xp.testing.assert_array_equal(actual, desired, err_msg=err_msg) + elif is_torch(xp): + # PyTorch recommends using `rtol=0, atol=0` like this + # to test for exact equality + err_msg = None if err_msg == '' else err_msg + return xp.testing.assert_close(actual, desired, rtol=0, atol=0, equal_nan=True, + check_dtype=False, msg=err_msg) + # JAX uses `np.testing` + return np.testing.assert_array_equal(actual, desired, err_msg=err_msg) + + +def xp_assert_close(actual, desired, *, rtol=None, atol=0, check_namespace=True, + check_dtype=True, check_shape=True, check_0d=True, + err_msg='', xp=None): + __tracebackhide__ = True # Hide traceback for py.test + if xp is None: + xp = array_namespace(actual) + + actual, desired = _strict_check( + actual, desired, xp, + check_namespace=check_namespace, check_dtype=check_dtype, + check_shape=check_shape, check_0d=check_0d + ) + + floating = xp.isdtype(actual.dtype, ('real floating', 'complex floating')) + if rtol is None and floating: + # multiplier of 4 is used as for `np.float64` this puts the default `rtol` + # roughly half way between sqrt(eps) and the default for + # `numpy.testing.assert_allclose`, 1e-7 + rtol = xp.finfo(actual.dtype).eps**0.5 * 4 + elif rtol is None: + rtol = 1e-7 + + if is_cupy(xp): + return xp.testing.assert_allclose(actual, desired, rtol=rtol, + atol=atol, err_msg=err_msg) + elif is_torch(xp): + err_msg = None if err_msg == '' else err_msg + return xp.testing.assert_close(actual, desired, rtol=rtol, atol=atol, + equal_nan=True, check_dtype=False, msg=err_msg) + # JAX uses `np.testing` + return np.testing.assert_allclose(actual, desired, rtol=rtol, + atol=atol, err_msg=err_msg) + + +def xp_assert_less(actual, desired, *, check_namespace=True, check_dtype=True, + check_shape=True, check_0d=True, err_msg='', verbose=True, xp=None): + __tracebackhide__ = True # Hide traceback for py.test + if xp is None: + xp = array_namespace(actual) + + actual, desired = _strict_check( + actual, desired, xp, check_namespace=check_namespace, + check_dtype=check_dtype, check_shape=check_shape, + check_0d=check_0d + ) + + if is_cupy(xp): + return xp.testing.assert_array_less(actual, desired, + err_msg=err_msg, verbose=verbose) + elif is_torch(xp): + if actual.device.type != 'cpu': + actual = actual.cpu() + if desired.device.type != 'cpu': + desired = desired.cpu() + # JAX uses `np.testing` + return np.testing.assert_array_less(actual, desired, + err_msg=err_msg, verbose=verbose) + + +def assert_array_almost_equal(actual, desired, decimal=6, *args, **kwds): + """Backwards compatible replacement. In new code, use xp_assert_close instead. + """ + rtol, atol = 0, 1.5*10**(-decimal) + return xp_assert_close(actual, desired, + atol=atol, rtol=rtol, check_dtype=False, check_shape=False, + *args, **kwds) + + +def assert_almost_equal(actual, desired, decimal=7, *args, **kwds): + """Backwards compatible replacement. In new code, use xp_assert_close instead. + """ + rtol, atol = 0, 1.5*10**(-decimal) + return xp_assert_close(actual, desired, + atol=atol, rtol=rtol, check_dtype=False, check_shape=False, + *args, **kwds) + + +def xp_unsupported_param_msg(param: Any) -> str: + return f'Providing {param!r} is only supported for numpy arrays.' + + +def is_complex(x: Array, xp: ModuleType) -> bool: + return xp.isdtype(x.dtype, 'complex floating') + + +def get_xp_devices(xp: ModuleType) -> list[str] | list[None]: + """Returns a list of available devices for the given namespace.""" + devices: list[str] = [] + if is_torch(xp): + devices += ['cpu'] + import torch # type: ignore[import] + num_cuda = torch.cuda.device_count() + for i in range(0, num_cuda): + devices += [f'cuda:{i}'] + if torch.backends.mps.is_available(): + devices += ['mps'] + return devices + elif is_cupy(xp): + import cupy # type: ignore[import] + num_cuda = cupy.cuda.runtime.getDeviceCount() + for i in range(0, num_cuda): + devices += [f'cuda:{i}'] + return devices + elif is_jax(xp): + import jax # type: ignore[import] + num_cpu = jax.device_count(backend='cpu') + for i in range(0, num_cpu): + devices += [f'cpu:{i}'] + num_gpu = jax.device_count(backend='gpu') + for i in range(0, num_gpu): + devices += [f'gpu:{i}'] + num_tpu = jax.device_count(backend='tpu') + for i in range(0, num_tpu): + devices += [f'tpu:{i}'] + return devices + + # given namespace is not known to have a list of available devices; + # return `[None]` so that one can use this in tests for `device=None`. + return [None] + + +def scipy_namespace_for(xp: ModuleType) -> ModuleType | None: + """Return the `scipy`-like namespace of a non-NumPy backend + + That is, return the namespace corresponding with backend `xp` that contains + `scipy` sub-namespaces like `linalg` and `special`. If no such namespace + exists, return ``None``. Useful for dispatching. + """ + + if is_cupy(xp): + import cupyx # type: ignore[import-not-found,import-untyped] + return cupyx.scipy + + if is_jax(xp): + import jax # type: ignore[import-not-found] + return jax.scipy + + if is_torch(xp): + return xp + + return None + + +# temporary substitute for xp.moveaxis, which is not yet in all backends +# or covered by array_api_compat. +def xp_moveaxis_to_end( + x: Array, + source: int, + /, *, + xp: ModuleType | None = None) -> Array: + xp = array_namespace(xp) if xp is None else xp + axes = list(range(x.ndim)) + temp = axes.pop(source) + axes = axes + [temp] + return xp.permute_dims(x, axes) + + +# temporary substitute for xp.copysign, which is not yet in all backends +# or covered by array_api_compat. +def xp_copysign(x1: Array, x2: Array, /, *, xp: ModuleType | None = None) -> Array: + # no attempt to account for special cases + xp = array_namespace(x1, x2) if xp is None else xp + abs_x1 = xp.abs(x1) + return xp.where(x2 >= 0, abs_x1, -abs_x1) + + +# partial substitute for xp.sign, which does not cover the NaN special case +# that I need. (https://github.com/data-apis/array-api-compat/issues/136) +def xp_sign(x: Array, /, *, xp: ModuleType | None = None) -> Array: + xp = array_namespace(x) if xp is None else xp + if is_numpy(xp): # only NumPy implements the special cases correctly + return xp.sign(x) + sign = xp.zeros_like(x) + one = xp.asarray(1, dtype=x.dtype) + sign = xp.where(x > 0, one, sign) + sign = xp.where(x < 0, -one, sign) + sign = xp.where(xp.isnan(x), xp.nan*one, sign) + return sign + +# maybe use `scipy.linalg` if/when array API support is added +def xp_vector_norm(x: Array, /, *, + axis: int | tuple[int] | None = None, + keepdims: bool = False, + ord: int | float = 2, + xp: ModuleType | None = None) -> Array: + xp = array_namespace(x) if xp is None else xp + + if SCIPY_ARRAY_API: + # check for optional `linalg` extension + if hasattr(xp, 'linalg'): + return xp.linalg.vector_norm(x, axis=axis, keepdims=keepdims, ord=ord) + else: + if ord != 2: + raise ValueError( + "only the Euclidean norm (`ord=2`) is currently supported in " + "`xp_vector_norm` for backends not implementing the `linalg` " + "extension." + ) + # return (x @ x)**0.5 + # or to get the right behavior with nd, complex arrays + return xp.sum(xp.conj(x) * x, axis=axis, keepdims=keepdims)**0.5 + else: + # to maintain backwards compatibility + return np.linalg.norm(x, ord=ord, axis=axis, keepdims=keepdims) + + +def xp_ravel(x: Array, /, *, xp: ModuleType | None = None) -> Array: + # Equivalent of np.ravel written in terms of array API + # Even though it's one line, it comes up so often that it's worth having + # this function for readability + xp = array_namespace(x) if xp is None else xp + return xp.reshape(x, (-1,)) + + +def xp_real(x: Array, /, *, xp: ModuleType | None = None) -> Array: + # Convenience wrapper of xp.real that allows non-complex input; + # see data-apis/array-api#824 + xp = array_namespace(x) if xp is None else xp + return xp.real(x) if xp.isdtype(x.dtype, 'complex floating') else x + + +def xp_take_along_axis(arr: Array, + indices: Array, /, *, + axis: int = -1, + xp: ModuleType | None = None) -> Array: + # Dispatcher for np.take_along_axis for backends that support it; + # see data-apis/array-api/pull#816 + xp = array_namespace(arr) if xp is None else xp + if is_torch(xp): + return xp.take_along_dim(arr, indices, dim=axis) + elif is_array_api_strict(xp): + raise NotImplementedError("Array API standard does not define take_along_axis") + else: + return xp.take_along_axis(arr, indices, axis) + + +# utility to broadcast arrays and promote to common dtype +def xp_broadcast_promote(*args, ensure_writeable=False, force_floating=False, xp=None): + xp = array_namespace(*args) if xp is None else xp + + args = [(_asarray(arg, subok=True) if arg is not None else arg) for arg in args] + args_not_none = [arg for arg in args if arg is not None] + + # determine minimum dtype + default_float = xp.asarray(1.).dtype + dtypes = [arg.dtype for arg in args_not_none] + try: # follow library's prefered mixed promotion rules + dtype = xp.result_type(*dtypes) + if force_floating and xp.isdtype(dtype, 'integral'): + # If we were to add `default_float` before checking whether the result + # type is otherwise integral, we risk promotion from lower float. + dtype = xp.result_type(dtype, default_float) + except TypeError: # mixed type promotion isn't defined + float_dtypes = [dtype for dtype in dtypes + if not xp.isdtype(dtype, 'integral')] + if float_dtypes: + dtype = xp.result_type(*float_dtypes, default_float) + elif force_floating: + dtype = default_float + else: + dtype = xp.result_type(*dtypes) + + # determine result shape + shapes = {arg.shape for arg in args_not_none} + try: + shape = (np.broadcast_shapes(*shapes) if len(shapes) != 1 + else args_not_none[0].shape) + except ValueError as e: + message = "Array shapes are incompatible for broadcasting." + raise ValueError(message) from e + + out = [] + for arg in args: + if arg is None: + out.append(arg) + continue + + # broadcast only if needed + # Even if two arguments need broadcasting, this is faster than + # `broadcast_arrays`, especially since we've already determined `shape` + if arg.shape != shape: + kwargs = {'subok': True} if is_numpy(xp) else {} + arg = xp.broadcast_to(arg, shape, **kwargs) + + # convert dtype/copy only if needed + if (arg.dtype != dtype) or ensure_writeable: + arg = xp.astype(arg, dtype, copy=True) + out.append(arg) + + return out + + +def xp_float_to_complex(arr: Array, xp: ModuleType | None = None) -> Array: + xp = array_namespace(arr) if xp is None else xp + arr_dtype = arr.dtype + # The standard float dtypes are float32 and float64. + # Convert float32 to complex64, + # and float64 (and non-standard real dtypes) to complex128 + if xp.isdtype(arr_dtype, xp.float32): + arr = xp.astype(arr, xp.complex64) + elif xp.isdtype(arr_dtype, 'real floating'): + arr = xp.astype(arr, xp.complex128) + + return arr + + +def xp_default_dtype(xp): + """Query the namespace-dependent default floating-point dtype. + """ + if is_torch(xp): + # historically, we allow pytorch to keep its default of float32 + return xp.get_default_dtype() + else: + # we default to float64 + return xp.float64 diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api_no_0d.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api_no_0d.py new file mode 100644 index 0000000000000000000000000000000000000000..a6b6fe1affd172eea620760a20f185f192d37b69 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_array_api_no_0d.py @@ -0,0 +1,103 @@ +""" +Extra testing functions that forbid 0d-input, see #21044 + +While the xp_assert_* functions generally aim to follow the conventions of the +underlying `xp` library, NumPy in particular is inconsistent in its handling +of scalars vs. 0d-arrays, see https://github.com/numpy/numpy/issues/24897. + +For example, this means that the following operations (as of v2.0.1) currently +return scalars, even though a 0d-array would often be more appropriate: + + import numpy as np + np.array(0) * 2 # scalar, not 0d array + - np.array(0) # scalar, not 0d-array + np.sin(np.array(0)) # scalar, not 0d array + np.mean([1, 2, 3]) # scalar, not 0d array + +Libraries like CuPy tend to return a 0d-array in scenarios like those above, +and even `xp.asarray(0)[()]` remains a 0d-array there. To deal with the reality +of the inconsistencies present in NumPy, as well as 20+ years of code on top, +the `xp_assert_*` functions here enforce consistency in the only way that +doesn't go against the tide, i.e. by forbidding 0d-arrays as the return type. + +However, when scalars are not generally the expected NumPy return type, +it remains preferable to use the assert functions from +the `scipy._lib._array_api` module, which have less surprising behaviour. +""" +from scipy._lib._array_api import array_namespace, is_numpy +from scipy._lib._array_api import (xp_assert_close as xp_assert_close_base, + xp_assert_equal as xp_assert_equal_base, + xp_assert_less as xp_assert_less_base) + +__all__: list[str] = [] + + +def _check_scalar(actual, desired, *, xp=None, **kwargs): + __tracebackhide__ = True # Hide traceback for py.test + + if xp is None: + xp = array_namespace(actual) + + # necessary to handle non-numpy scalars, e.g. bare `0.0` has no shape + desired = xp.asarray(desired) + + # Only NumPy distinguishes between scalars and arrays; + # shape check in xp_assert_* is sufficient except for shape == () + if not (is_numpy(xp) and desired.shape == ()): + return + + _msg = ("Result is a NumPy 0d-array. Many SciPy functions intend to follow " + "the convention of many NumPy functions, returning a scalar when a " + "0d-array would be correct. The specialized `xp_assert_*` functions " + "in the `scipy._lib._array_api_no_0d` module err on the side of " + "caution and do not accept 0d-arrays by default. If the correct " + "result may legitimately be a 0d-array, pass `check_0d=True`, " + "or use the `xp_assert_*` functions from `scipy._lib._array_api`.") + assert xp.isscalar(actual), _msg + + +def xp_assert_equal(actual, desired, *, check_0d=False, **kwargs): + # in contrast to xp_assert_equal_base, this defaults to check_0d=False, + # but will do an extra check in that case, which forbids 0d-arrays for `actual` + __tracebackhide__ = True # Hide traceback for py.test + + # array-ness (check_0d == True) is taken care of by the *_base functions + if not check_0d: + _check_scalar(actual, desired, **kwargs) + return xp_assert_equal_base(actual, desired, check_0d=check_0d, **kwargs) + + +def xp_assert_close(actual, desired, *, check_0d=False, **kwargs): + # as for xp_assert_equal + __tracebackhide__ = True + + if not check_0d: + _check_scalar(actual, desired, **kwargs) + return xp_assert_close_base(actual, desired, check_0d=check_0d, **kwargs) + + +def xp_assert_less(actual, desired, *, check_0d=False, **kwargs): + # as for xp_assert_equal + __tracebackhide__ = True + + if not check_0d: + _check_scalar(actual, desired, **kwargs) + return xp_assert_less_base(actual, desired, check_0d=check_0d, **kwargs) + + +def assert_array_almost_equal(actual, desired, decimal=6, *args, **kwds): + """Backwards compatible replacement. In new code, use xp_assert_close instead. + """ + rtol, atol = 0, 1.5*10**(-decimal) + return xp_assert_close(actual, desired, + atol=atol, rtol=rtol, check_dtype=False, check_shape=False, + *args, **kwds) + + +def assert_almost_equal(actual, desired, decimal=7, *args, **kwds): + """Backwards compatible replacement. In new code, use xp_assert_close instead. + """ + rtol, atol = 0, 1.5*10**(-decimal) + return xp_assert_close(actual, desired, + atol=atol, rtol=rtol, check_dtype=False, check_shape=False, + *args, **kwds) diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_bunch.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_bunch.py new file mode 100644 index 0000000000000000000000000000000000000000..bb562e4348f46dc1137afe3d3ce50f1149c85376 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_bunch.py @@ -0,0 +1,225 @@ +import sys as _sys +from keyword import iskeyword as _iskeyword + + +def _validate_names(typename, field_names, extra_field_names): + """ + Ensure that all the given names are valid Python identifiers that + do not start with '_'. Also check that there are no duplicates + among field_names + extra_field_names. + """ + for name in [typename] + field_names + extra_field_names: + if not isinstance(name, str): + raise TypeError('typename and all field names must be strings') + if not name.isidentifier(): + raise ValueError('typename and all field names must be valid ' + f'identifiers: {name!r}') + if _iskeyword(name): + raise ValueError('typename and all field names cannot be a ' + f'keyword: {name!r}') + + seen = set() + for name in field_names + extra_field_names: + if name.startswith('_'): + raise ValueError('Field names cannot start with an underscore: ' + f'{name!r}') + if name in seen: + raise ValueError(f'Duplicate field name: {name!r}') + seen.add(name) + + +# Note: This code is adapted from CPython:Lib/collections/__init__.py +def _make_tuple_bunch(typename, field_names, extra_field_names=None, + module=None): + """ + Create a namedtuple-like class with additional attributes. + + This function creates a subclass of tuple that acts like a namedtuple + and that has additional attributes. + + The additional attributes are listed in `extra_field_names`. The + values assigned to these attributes are not part of the tuple. + + The reason this function exists is to allow functions in SciPy + that currently return a tuple or a namedtuple to returned objects + that have additional attributes, while maintaining backwards + compatibility. + + This should only be used to enhance *existing* functions in SciPy. + New functions are free to create objects as return values without + having to maintain backwards compatibility with an old tuple or + namedtuple return value. + + Parameters + ---------- + typename : str + The name of the type. + field_names : list of str + List of names of the values to be stored in the tuple. These names + will also be attributes of instances, so the values in the tuple + can be accessed by indexing or as attributes. At least one name + is required. See the Notes for additional restrictions. + extra_field_names : list of str, optional + List of names of values that will be stored as attributes of the + object. See the notes for additional restrictions. + + Returns + ------- + cls : type + The new class. + + Notes + ----- + There are restrictions on the names that may be used in `field_names` + and `extra_field_names`: + + * The names must be unique--no duplicates allowed. + * The names must be valid Python identifiers, and must not begin with + an underscore. + * The names must not be Python keywords (e.g. 'def', 'and', etc., are + not allowed). + + Examples + -------- + >>> from scipy._lib._bunch import _make_tuple_bunch + + Create a class that acts like a namedtuple with length 2 (with field + names `x` and `y`) that will also have the attributes `w` and `beta`: + + >>> Result = _make_tuple_bunch('Result', ['x', 'y'], ['w', 'beta']) + + `Result` is the new class. We call it with keyword arguments to create + a new instance with given values. + + >>> result1 = Result(x=1, y=2, w=99, beta=0.5) + >>> result1 + Result(x=1, y=2, w=99, beta=0.5) + + `result1` acts like a tuple of length 2: + + >>> len(result1) + 2 + >>> result1[:] + (1, 2) + + The values assigned when the instance was created are available as + attributes: + + >>> result1.y + 2 + >>> result1.beta + 0.5 + """ + if len(field_names) == 0: + raise ValueError('field_names must contain at least one name') + + if extra_field_names is None: + extra_field_names = [] + _validate_names(typename, field_names, extra_field_names) + + typename = _sys.intern(str(typename)) + field_names = tuple(map(_sys.intern, field_names)) + extra_field_names = tuple(map(_sys.intern, extra_field_names)) + + all_names = field_names + extra_field_names + arg_list = ', '.join(field_names) + full_list = ', '.join(all_names) + repr_fmt = ''.join(('(', + ', '.join(f'{name}=%({name})r' for name in all_names), + ')')) + tuple_new = tuple.__new__ + _dict, _tuple, _zip = dict, tuple, zip + + # Create all the named tuple methods to be added to the class namespace + + s = f"""\ +def __new__(_cls, {arg_list}, **extra_fields): + return _tuple_new(_cls, ({arg_list},)) + +def __init__(self, {arg_list}, **extra_fields): + for key in self._extra_fields: + if key not in extra_fields: + raise TypeError("missing keyword argument '%s'" % (key,)) + for key, val in extra_fields.items(): + if key not in self._extra_fields: + raise TypeError("unexpected keyword argument '%s'" % (key,)) + self.__dict__[key] = val + +def __setattr__(self, key, val): + if key in {repr(field_names)}: + raise AttributeError("can't set attribute %r of class %r" + % (key, self.__class__.__name__)) + else: + self.__dict__[key] = val +""" + del arg_list + namespace = {'_tuple_new': tuple_new, + '__builtins__': dict(TypeError=TypeError, + AttributeError=AttributeError), + '__name__': f'namedtuple_{typename}'} + exec(s, namespace) + __new__ = namespace['__new__'] + __new__.__doc__ = f'Create new instance of {typename}({full_list})' + __init__ = namespace['__init__'] + __init__.__doc__ = f'Instantiate instance of {typename}({full_list})' + __setattr__ = namespace['__setattr__'] + + def __repr__(self): + 'Return a nicely formatted representation string' + return self.__class__.__name__ + repr_fmt % self._asdict() + + def _asdict(self): + 'Return a new dict which maps field names to their values.' + out = _dict(_zip(self._fields, self)) + out.update(self.__dict__) + return out + + def __getnewargs_ex__(self): + 'Return self as a plain tuple. Used by copy and pickle.' + return _tuple(self), self.__dict__ + + # Modify function metadata to help with introspection and debugging + for method in (__new__, __repr__, _asdict, __getnewargs_ex__): + method.__qualname__ = f'{typename}.{method.__name__}' + + # Build-up the class namespace dictionary + # and use type() to build the result class + class_namespace = { + '__doc__': f'{typename}({full_list})', + '_fields': field_names, + '__new__': __new__, + '__init__': __init__, + '__repr__': __repr__, + '__setattr__': __setattr__, + '_asdict': _asdict, + '_extra_fields': extra_field_names, + '__getnewargs_ex__': __getnewargs_ex__, + } + for index, name in enumerate(field_names): + + def _get(self, index=index): + return self[index] + class_namespace[name] = property(_get) + for name in extra_field_names: + + def _get(self, name=name): + return self.__dict__[name] + class_namespace[name] = property(_get) + + result = type(typename, (tuple,), class_namespace) + + # For pickling to work, the __module__ variable needs to be set to the + # frame where the named tuple is created. Bypass this step in environments + # where sys._getframe is not defined (Jython for example) or sys._getframe + # is not defined for arguments greater than 0 (IronPython), or where the + # user has specified a particular module. + if module is None: + try: + module = _sys._getframe(1).f_globals.get('__name__', '__main__') + except (AttributeError, ValueError): + pass + if module is not None: + result.__module__ = module + __new__.__module__ = module + + return result diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_ccallback.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_ccallback.py new file mode 100644 index 0000000000000000000000000000000000000000..1980d06f5489e6633fb611c35bfb56903bd63e7f --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_ccallback.py @@ -0,0 +1,251 @@ +from . import _ccallback_c + +import ctypes + +PyCFuncPtr = ctypes.CFUNCTYPE(ctypes.c_void_p).__bases__[0] + +ffi = None + +class CData: + pass + +def _import_cffi(): + global ffi, CData + + if ffi is not None: + return + + try: + import cffi + ffi = cffi.FFI() + CData = ffi.CData + except ImportError: + ffi = False + + +class LowLevelCallable(tuple): + """ + Low-level callback function. + + Some functions in SciPy take as arguments callback functions, which + can either be python callables or low-level compiled functions. Using + compiled callback functions can improve performance somewhat by + avoiding wrapping data in Python objects. + + Such low-level functions in SciPy are wrapped in `LowLevelCallable` + objects, which can be constructed from function pointers obtained from + ctypes, cffi, Cython, or contained in Python `PyCapsule` objects. + + .. seealso:: + + Functions accepting low-level callables: + + `scipy.integrate.quad`, `scipy.ndimage.generic_filter`, + `scipy.ndimage.generic_filter1d`, `scipy.ndimage.geometric_transform` + + Usage examples: + + :ref:`ndimage-ccallbacks`, :ref:`quad-callbacks` + + Parameters + ---------- + function : {PyCapsule, ctypes function pointer, cffi function pointer} + Low-level callback function. + user_data : {PyCapsule, ctypes void pointer, cffi void pointer} + User data to pass on to the callback function. + signature : str, optional + Signature of the function. If omitted, determined from *function*, + if possible. + + Attributes + ---------- + function + Callback function given. + user_data + User data given. + signature + Signature of the function. + + Methods + ------- + from_cython + Class method for constructing callables from Cython C-exported + functions. + + Notes + ----- + The argument ``function`` can be one of: + + - PyCapsule, whose name contains the C function signature + - ctypes function pointer + - cffi function pointer + + The signature of the low-level callback must match one of those expected + by the routine it is passed to. + + If constructing low-level functions from a PyCapsule, the name of the + capsule must be the corresponding signature, in the format:: + + return_type (arg1_type, arg2_type, ...) + + For example:: + + "void (double)" + "double (double, int *, void *)" + + The context of a PyCapsule passed in as ``function`` is used as ``user_data``, + if an explicit value for ``user_data`` was not given. + + """ + + # Make the class immutable + __slots__ = () + + def __new__(cls, function, user_data=None, signature=None): + # We need to hold a reference to the function & user data, + # to prevent them going out of scope + item = cls._parse_callback(function, user_data, signature) + return tuple.__new__(cls, (item, function, user_data)) + + def __repr__(self): + return f"LowLevelCallable({self.function!r}, {self.user_data!r})" + + @property + def function(self): + return tuple.__getitem__(self, 1) + + @property + def user_data(self): + return tuple.__getitem__(self, 2) + + @property + def signature(self): + return _ccallback_c.get_capsule_signature(tuple.__getitem__(self, 0)) + + def __getitem__(self, idx): + raise ValueError() + + @classmethod + def from_cython(cls, module, name, user_data=None, signature=None): + """ + Create a low-level callback function from an exported Cython function. + + Parameters + ---------- + module : module + Cython module where the exported function resides + name : str + Name of the exported function + user_data : {PyCapsule, ctypes void pointer, cffi void pointer}, optional + User data to pass on to the callback function. + signature : str, optional + Signature of the function. If omitted, determined from *function*. + + """ + try: + function = module.__pyx_capi__[name] + except AttributeError as e: + message = "Given module is not a Cython module with __pyx_capi__ attribute" + raise ValueError(message) from e + except KeyError as e: + message = f"No function {name!r} found in __pyx_capi__ of the module" + raise ValueError(message) from e + return cls(function, user_data, signature) + + @classmethod + def _parse_callback(cls, obj, user_data=None, signature=None): + _import_cffi() + + if isinstance(obj, LowLevelCallable): + func = tuple.__getitem__(obj, 0) + elif isinstance(obj, PyCFuncPtr): + func, signature = _get_ctypes_func(obj, signature) + elif isinstance(obj, CData): + func, signature = _get_cffi_func(obj, signature) + elif _ccallback_c.check_capsule(obj): + func = obj + else: + raise ValueError("Given input is not a callable or a " + "low-level callable (pycapsule/ctypes/cffi)") + + if isinstance(user_data, ctypes.c_void_p): + context = _get_ctypes_data(user_data) + elif isinstance(user_data, CData): + context = _get_cffi_data(user_data) + elif user_data is None: + context = 0 + elif _ccallback_c.check_capsule(user_data): + context = user_data + else: + raise ValueError("Given user data is not a valid " + "low-level void* pointer (pycapsule/ctypes/cffi)") + + return _ccallback_c.get_raw_capsule(func, signature, context) + + +# +# ctypes helpers +# + +def _get_ctypes_func(func, signature=None): + # Get function pointer + func_ptr = ctypes.cast(func, ctypes.c_void_p).value + + # Construct function signature + if signature is None: + signature = _typename_from_ctypes(func.restype) + " (" + for j, arg in enumerate(func.argtypes): + if j == 0: + signature += _typename_from_ctypes(arg) + else: + signature += ", " + _typename_from_ctypes(arg) + signature += ")" + + return func_ptr, signature + + +def _typename_from_ctypes(item): + if item is None: + return "void" + elif item is ctypes.c_void_p: + return "void *" + + name = item.__name__ + + pointer_level = 0 + while name.startswith("LP_"): + pointer_level += 1 + name = name[3:] + + if name.startswith('c_'): + name = name[2:] + + if pointer_level > 0: + name += " " + "*"*pointer_level + + return name + + +def _get_ctypes_data(data): + # Get voidp pointer + return ctypes.cast(data, ctypes.c_void_p).value + + +# +# CFFI helpers +# + +def _get_cffi_func(func, signature=None): + # Get function pointer + func_ptr = ffi.cast('uintptr_t', func) + + # Get signature + if signature is None: + signature = ffi.getctype(ffi.typeof(func)).replace('(*)', ' ') + + return func_ptr, signature + + +def _get_cffi_data(data): + # Get pointer + return ffi.cast('uintptr_t', data) diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_disjoint_set.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_disjoint_set.py new file mode 100644 index 0000000000000000000000000000000000000000..683c5c8e518705e710212dafc01363f92a2f947d --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_disjoint_set.py @@ -0,0 +1,254 @@ +""" +Disjoint set data structure +""" + + +class DisjointSet: + """ Disjoint set data structure for incremental connectivity queries. + + .. versionadded:: 1.6.0 + + Attributes + ---------- + n_subsets : int + The number of subsets. + + Methods + ------- + add + merge + connected + subset + subset_size + subsets + __getitem__ + + Notes + ----- + This class implements the disjoint set [1]_, also known as the *union-find* + or *merge-find* data structure. The *find* operation (implemented in + `__getitem__`) implements the *path halving* variant. The *merge* method + implements the *merge by size* variant. + + References + ---------- + .. [1] https://en.wikipedia.org/wiki/Disjoint-set_data_structure + + Examples + -------- + >>> from scipy.cluster.hierarchy import DisjointSet + + Initialize a disjoint set: + + >>> disjoint_set = DisjointSet([1, 2, 3, 'a', 'b']) + + Merge some subsets: + + >>> disjoint_set.merge(1, 2) + True + >>> disjoint_set.merge(3, 'a') + True + >>> disjoint_set.merge('a', 'b') + True + >>> disjoint_set.merge('b', 'b') + False + + Find root elements: + + >>> disjoint_set[2] + 1 + >>> disjoint_set['b'] + 3 + + Test connectivity: + + >>> disjoint_set.connected(1, 2) + True + >>> disjoint_set.connected(1, 'b') + False + + List elements in disjoint set: + + >>> list(disjoint_set) + [1, 2, 3, 'a', 'b'] + + Get the subset containing 'a': + + >>> disjoint_set.subset('a') + {'a', 3, 'b'} + + Get the size of the subset containing 'a' (without actually instantiating + the subset): + + >>> disjoint_set.subset_size('a') + 3 + + Get all subsets in the disjoint set: + + >>> disjoint_set.subsets() + [{1, 2}, {'a', 3, 'b'}] + """ + def __init__(self, elements=None): + self.n_subsets = 0 + self._sizes = {} + self._parents = {} + # _nbrs is a circular linked list which links connected elements. + self._nbrs = {} + # _indices tracks the element insertion order in `__iter__`. + self._indices = {} + if elements is not None: + for x in elements: + self.add(x) + + def __iter__(self): + """Returns an iterator of the elements in the disjoint set. + + Elements are ordered by insertion order. + """ + return iter(self._indices) + + def __len__(self): + return len(self._indices) + + def __contains__(self, x): + return x in self._indices + + def __getitem__(self, x): + """Find the root element of `x`. + + Parameters + ---------- + x : hashable object + Input element. + + Returns + ------- + root : hashable object + Root element of `x`. + """ + if x not in self._indices: + raise KeyError(x) + + # find by "path halving" + parents = self._parents + while self._indices[x] != self._indices[parents[x]]: + parents[x] = parents[parents[x]] + x = parents[x] + return x + + def add(self, x): + """Add element `x` to disjoint set + """ + if x in self._indices: + return + + self._sizes[x] = 1 + self._parents[x] = x + self._nbrs[x] = x + self._indices[x] = len(self._indices) + self.n_subsets += 1 + + def merge(self, x, y): + """Merge the subsets of `x` and `y`. + + The smaller subset (the child) is merged into the larger subset (the + parent). If the subsets are of equal size, the root element which was + first inserted into the disjoint set is selected as the parent. + + Parameters + ---------- + x, y : hashable object + Elements to merge. + + Returns + ------- + merged : bool + True if `x` and `y` were in disjoint sets, False otherwise. + """ + xr = self[x] + yr = self[y] + if self._indices[xr] == self._indices[yr]: + return False + + sizes = self._sizes + if (sizes[xr], self._indices[yr]) < (sizes[yr], self._indices[xr]): + xr, yr = yr, xr + self._parents[yr] = xr + self._sizes[xr] += self._sizes[yr] + self._nbrs[xr], self._nbrs[yr] = self._nbrs[yr], self._nbrs[xr] + self.n_subsets -= 1 + return True + + def connected(self, x, y): + """Test whether `x` and `y` are in the same subset. + + Parameters + ---------- + x, y : hashable object + Elements to test. + + Returns + ------- + result : bool + True if `x` and `y` are in the same set, False otherwise. + """ + return self._indices[self[x]] == self._indices[self[y]] + + def subset(self, x): + """Get the subset containing `x`. + + Parameters + ---------- + x : hashable object + Input element. + + Returns + ------- + result : set + Subset containing `x`. + """ + if x not in self._indices: + raise KeyError(x) + + result = [x] + nxt = self._nbrs[x] + while self._indices[nxt] != self._indices[x]: + result.append(nxt) + nxt = self._nbrs[nxt] + return set(result) + + def subset_size(self, x): + """Get the size of the subset containing `x`. + + Note that this method is faster than ``len(self.subset(x))`` because + the size is directly read off an internal field, without the need to + instantiate the full subset. + + Parameters + ---------- + x : hashable object + Input element. + + Returns + ------- + result : int + Size of the subset containing `x`. + """ + return self._sizes[self[x]] + + def subsets(self): + """Get all the subsets in the disjoint set. + + Returns + ------- + result : list + Subsets in the disjoint set. + """ + result = [] + visited = set() + for x in self: + if x not in visited: + xset = self.subset(x) + visited.update(xset) + result.append(xset) + return result diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_docscrape.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_docscrape.py new file mode 100644 index 0000000000000000000000000000000000000000..f345539efe76b9f9439957a78e5ebdc1ec2bf517 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_docscrape.py @@ -0,0 +1,761 @@ +# copied from numpydoc/docscrape.py, commit 97a6026508e0dd5382865672e9563a72cc113bd2 +"""Extract reference documentation from the NumPy source tree.""" + +import copy +import inspect +import pydoc +import re +import sys +import textwrap +from collections import namedtuple +from collections.abc import Callable, Mapping +from functools import cached_property +from warnings import warn + + +def strip_blank_lines(l): + "Remove leading and trailing blank lines from a list of lines" + while l and not l[0].strip(): + del l[0] + while l and not l[-1].strip(): + del l[-1] + return l + + +class Reader: + """A line-based string reader.""" + + def __init__(self, data): + """ + Parameters + ---------- + data : str + String with lines separated by '\\n'. + + """ + if isinstance(data, list): + self._str = data + else: + self._str = data.split("\n") # store string as list of lines + + self.reset() + + def __getitem__(self, n): + return self._str[n] + + def reset(self): + self._l = 0 # current line nr + + def read(self): + if not self.eof(): + out = self[self._l] + self._l += 1 + return out + else: + return "" + + def seek_next_non_empty_line(self): + for l in self[self._l :]: + if l.strip(): + break + else: + self._l += 1 + + def eof(self): + return self._l >= len(self._str) + + def read_to_condition(self, condition_func): + start = self._l + for line in self[start:]: + if condition_func(line): + return self[start : self._l] + self._l += 1 + if self.eof(): + return self[start : self._l + 1] + return [] + + def read_to_next_empty_line(self): + self.seek_next_non_empty_line() + + def is_empty(line): + return not line.strip() + + return self.read_to_condition(is_empty) + + def read_to_next_unindented_line(self): + def is_unindented(line): + return line.strip() and (len(line.lstrip()) == len(line)) + + return self.read_to_condition(is_unindented) + + def peek(self, n=0): + if self._l + n < len(self._str): + return self[self._l + n] + else: + return "" + + def is_empty(self): + return not "".join(self._str).strip() + + +class ParseError(Exception): + def __str__(self): + message = self.args[0] + if hasattr(self, "docstring"): + message = f"{message} in {self.docstring!r}" + return message + + +Parameter = namedtuple("Parameter", ["name", "type", "desc"]) + + +class NumpyDocString(Mapping): + """Parses a numpydoc string to an abstract representation + + Instances define a mapping from section title to structured data. + + """ + + sections = { + "Signature": "", + "Summary": [""], + "Extended Summary": [], + "Parameters": [], + "Attributes": [], + "Methods": [], + "Returns": [], + "Yields": [], + "Receives": [], + "Other Parameters": [], + "Raises": [], + "Warns": [], + "Warnings": [], + "See Also": [], + "Notes": [], + "References": "", + "Examples": "", + "index": {}, + } + + def __init__(self, docstring, config=None): + orig_docstring = docstring + docstring = textwrap.dedent(docstring).split("\n") + + self._doc = Reader(docstring) + self._parsed_data = copy.deepcopy(self.sections) + + try: + self._parse() + except ParseError as e: + e.docstring = orig_docstring + raise + + def __getitem__(self, key): + return self._parsed_data[key] + + def __setitem__(self, key, val): + if key not in self._parsed_data: + self._error_location(f"Unknown section {key}", error=False) + else: + self._parsed_data[key] = val + + def __iter__(self): + return iter(self._parsed_data) + + def __len__(self): + return len(self._parsed_data) + + def _is_at_section(self): + self._doc.seek_next_non_empty_line() + + if self._doc.eof(): + return False + + l1 = self._doc.peek().strip() # e.g. Parameters + + if l1.startswith(".. index::"): + return True + + l2 = self._doc.peek(1).strip() # ---------- or ========== + if len(l2) >= 3 and (set(l2) in ({"-"}, {"="})) and len(l2) != len(l1): + snip = "\n".join(self._doc._str[:2]) + "..." + self._error_location( + f"potentially wrong underline length... \n{l1} \n{l2} in \n{snip}", + error=False, + ) + return l2.startswith("-" * len(l1)) or l2.startswith("=" * len(l1)) + + def _strip(self, doc): + i = 0 + j = 0 + for i, line in enumerate(doc): + if line.strip(): + break + + for j, line in enumerate(doc[::-1]): + if line.strip(): + break + + return doc[i : len(doc) - j] + + def _read_to_next_section(self): + section = self._doc.read_to_next_empty_line() + + while not self._is_at_section() and not self._doc.eof(): + if not self._doc.peek(-1).strip(): # previous line was empty + section += [""] + + section += self._doc.read_to_next_empty_line() + + return section + + def _read_sections(self): + while not self._doc.eof(): + data = self._read_to_next_section() + name = data[0].strip() + + if name.startswith(".."): # index section + yield name, data[1:] + elif len(data) < 2: + yield StopIteration + else: + yield name, self._strip(data[2:]) + + def _parse_param_list(self, content, single_element_is_type=False): + content = dedent_lines(content) + r = Reader(content) + params = [] + while not r.eof(): + header = r.read().strip() + if " : " in header: + arg_name, arg_type = header.split(" : ", maxsplit=1) + else: + # NOTE: param line with single element should never have a + # a " :" before the description line, so this should probably + # warn. + if header.endswith(" :"): + header = header[:-2] + if single_element_is_type: + arg_name, arg_type = "", header + else: + arg_name, arg_type = header, "" + + desc = r.read_to_next_unindented_line() + desc = dedent_lines(desc) + desc = strip_blank_lines(desc) + + params.append(Parameter(arg_name, arg_type, desc)) + + return params + + # See also supports the following formats. + # + # + # SPACE* COLON SPACE+ SPACE* + # ( COMMA SPACE+ )+ (COMMA | PERIOD)? SPACE* + # ( COMMA SPACE+ )* SPACE* COLON SPACE+ SPACE* + + # is one of + # + # COLON COLON BACKTICK BACKTICK + # where + # is a legal function name, and + # is any nonempty sequence of word characters. + # Examples: func_f1 :meth:`func_h1` :obj:`~baz.obj_r` :class:`class_j` + # is a string describing the function. + + _role = r":(?P(py:)?\w+):" + _funcbacktick = r"`(?P(?:~\w+\.)?[a-zA-Z0-9_\.-]+)`" + _funcplain = r"(?P[a-zA-Z0-9_\.-]+)" + _funcname = r"(" + _role + _funcbacktick + r"|" + _funcplain + r")" + _funcnamenext = _funcname.replace("role", "rolenext") + _funcnamenext = _funcnamenext.replace("name", "namenext") + _description = r"(?P\s*:(\s+(?P\S+.*))?)?\s*$" + _func_rgx = re.compile(r"^\s*" + _funcname + r"\s*") + _line_rgx = re.compile( + r"^\s*" + + r"(?P" + + _funcname # group for all function names + + r"(?P([,]\s+" + + _funcnamenext + + r")*)" + + r")" + + r"(?P[,\.])?" # end of "allfuncs" + + _description # Some function lists have a trailing comma (or period) '\s*' + ) + + # Empty elements are replaced with '..' + empty_description = ".." + + def _parse_see_also(self, content): + """ + func_name : Descriptive text + continued text + another_func_name : Descriptive text + func_name1, func_name2, :meth:`func_name`, func_name3 + + """ + + content = dedent_lines(content) + + items = [] + + def parse_item_name(text): + """Match ':role:`name`' or 'name'.""" + m = self._func_rgx.match(text) + if not m: + self._error_location(f"Error parsing See Also entry {line!r}") + role = m.group("role") + name = m.group("name") if role else m.group("name2") + return name, role, m.end() + + rest = [] + for line in content: + if not line.strip(): + continue + + line_match = self._line_rgx.match(line) + description = None + if line_match: + description = line_match.group("desc") + if line_match.group("trailing") and description: + self._error_location( + "Unexpected comma or period after function list at index %d of " + 'line "%s"' % (line_match.end("trailing"), line), + error=False, + ) + if not description and line.startswith(" "): + rest.append(line.strip()) + elif line_match: + funcs = [] + text = line_match.group("allfuncs") + while True: + if not text.strip(): + break + name, role, match_end = parse_item_name(text) + funcs.append((name, role)) + text = text[match_end:].strip() + if text and text[0] == ",": + text = text[1:].strip() + rest = list(filter(None, [description])) + items.append((funcs, rest)) + else: + self._error_location(f"Error parsing See Also entry {line!r}") + return items + + def _parse_index(self, section, content): + """ + .. index:: default + :refguide: something, else, and more + + """ + + def strip_each_in(lst): + return [s.strip() for s in lst] + + out = {} + section = section.split("::") + if len(section) > 1: + out["default"] = strip_each_in(section[1].split(","))[0] + for line in content: + line = line.split(":") + if len(line) > 2: + out[line[1]] = strip_each_in(line[2].split(",")) + return out + + def _parse_summary(self): + """Grab signature (if given) and summary""" + if self._is_at_section(): + return + + # If several signatures present, take the last one + while True: + summary = self._doc.read_to_next_empty_line() + summary_str = " ".join([s.strip() for s in summary]).strip() + compiled = re.compile(r"^([\w., ]+=)?\s*[\w\.]+\(.*\)$") + if compiled.match(summary_str): + self["Signature"] = summary_str + if not self._is_at_section(): + continue + break + + if summary is not None: + self["Summary"] = summary + + if not self._is_at_section(): + self["Extended Summary"] = self._read_to_next_section() + + def _parse(self): + self._doc.reset() + self._parse_summary() + + sections = list(self._read_sections()) + section_names = {section for section, content in sections} + + has_yields = "Yields" in section_names + # We could do more tests, but we are not. Arbitrarily. + if not has_yields and "Receives" in section_names: + msg = "Docstring contains a Receives section but not Yields." + raise ValueError(msg) + + for section, content in sections: + if not section.startswith(".."): + section = (s.capitalize() for s in section.split(" ")) + section = " ".join(section) + if self.get(section): + self._error_location( + "The section %s appears twice in %s" + % (section, "\n".join(self._doc._str)) + ) + + if section in ("Parameters", "Other Parameters", "Attributes", "Methods"): + self[section] = self._parse_param_list(content) + elif section in ("Returns", "Yields", "Raises", "Warns", "Receives"): + self[section] = self._parse_param_list( + content, single_element_is_type=True + ) + elif section.startswith(".. index::"): + self["index"] = self._parse_index(section, content) + elif section == "See Also": + self["See Also"] = self._parse_see_also(content) + else: + self[section] = content + + @property + def _obj(self): + if hasattr(self, "_cls"): + return self._cls + elif hasattr(self, "_f"): + return self._f + return None + + def _error_location(self, msg, error=True): + if self._obj is not None: + # we know where the docs came from: + try: + filename = inspect.getsourcefile(self._obj) + except TypeError: + filename = None + # Make UserWarning more descriptive via object introspection. + # Skip if introspection fails + name = getattr(self._obj, "__name__", None) + if name is None: + name = getattr(getattr(self._obj, "__class__", None), "__name__", None) + if name is not None: + msg += f" in the docstring of {name}" + msg += f" in {filename}." if filename else "" + if error: + raise ValueError(msg) + else: + warn(msg, stacklevel=3) + + # string conversion routines + + def _str_header(self, name, symbol="-"): + return [name, len(name) * symbol] + + def _str_indent(self, doc, indent=4): + return [" " * indent + line for line in doc] + + def _str_signature(self): + if self["Signature"]: + return [self["Signature"].replace("*", r"\*")] + [""] + return [""] + + def _str_summary(self): + if self["Summary"]: + return self["Summary"] + [""] + return [] + + def _str_extended_summary(self): + if self["Extended Summary"]: + return self["Extended Summary"] + [""] + return [] + + def _str_param_list(self, name): + out = [] + if self[name]: + out += self._str_header(name) + for param in self[name]: + parts = [] + if param.name: + parts.append(param.name) + if param.type: + parts.append(param.type) + out += [" : ".join(parts)] + if param.desc and "".join(param.desc).strip(): + out += self._str_indent(param.desc) + out += [""] + return out + + def _str_section(self, name): + out = [] + if self[name]: + out += self._str_header(name) + out += self[name] + out += [""] + return out + + def _str_see_also(self, func_role): + if not self["See Also"]: + return [] + out = [] + out += self._str_header("See Also") + out += [""] + last_had_desc = True + for funcs, desc in self["See Also"]: + assert isinstance(funcs, list) + links = [] + for func, role in funcs: + if role: + link = f":{role}:`{func}`" + elif func_role: + link = f":{func_role}:`{func}`" + else: + link = f"`{func}`_" + links.append(link) + link = ", ".join(links) + out += [link] + if desc: + out += self._str_indent([" ".join(desc)]) + last_had_desc = True + else: + last_had_desc = False + out += self._str_indent([self.empty_description]) + + if last_had_desc: + out += [""] + out += [""] + return out + + def _str_index(self): + idx = self["index"] + out = [] + output_index = False + default_index = idx.get("default", "") + if default_index: + output_index = True + out += [f".. index:: {default_index}"] + for section, references in idx.items(): + if section == "default": + continue + output_index = True + out += [f" :{section}: {', '.join(references)}"] + if output_index: + return out + return "" + + def __str__(self, func_role=""): + out = [] + out += self._str_signature() + out += self._str_summary() + out += self._str_extended_summary() + out += self._str_param_list("Parameters") + for param_list in ("Attributes", "Methods"): + out += self._str_param_list(param_list) + for param_list in ( + "Returns", + "Yields", + "Receives", + "Other Parameters", + "Raises", + "Warns", + ): + out += self._str_param_list(param_list) + out += self._str_section("Warnings") + out += self._str_see_also(func_role) + for s in ("Notes", "References", "Examples"): + out += self._str_section(s) + out += self._str_index() + return "\n".join(out) + + +def dedent_lines(lines): + """Deindent a list of lines maximally""" + return textwrap.dedent("\n".join(lines)).split("\n") + + +class FunctionDoc(NumpyDocString): + def __init__(self, func, role="func", doc=None, config=None): + self._f = func + self._role = role # e.g. "func" or "meth" + + if doc is None: + if func is None: + raise ValueError("No function or docstring given") + doc = inspect.getdoc(func) or "" + if config is None: + config = {} + NumpyDocString.__init__(self, doc, config) + + def get_func(self): + func_name = getattr(self._f, "__name__", self.__class__.__name__) + if inspect.isclass(self._f): + func = getattr(self._f, "__call__", self._f.__init__) + else: + func = self._f + return func, func_name + + def __str__(self): + out = "" + + func, func_name = self.get_func() + + roles = {"func": "function", "meth": "method"} + + if self._role: + if self._role not in roles: + print(f"Warning: invalid role {self._role}") + out += f".. {roles.get(self._role, '')}:: {func_name}\n \n\n" + + out += super().__str__(func_role=self._role) + return out + + +class ObjDoc(NumpyDocString): + def __init__(self, obj, doc=None, config=None): + self._f = obj + if config is None: + config = {} + NumpyDocString.__init__(self, doc, config=config) + + +class ClassDoc(NumpyDocString): + extra_public_methods = ["__call__"] + + def __init__(self, cls, doc=None, modulename="", func_doc=FunctionDoc, config=None): + if not inspect.isclass(cls) and cls is not None: + raise ValueError(f"Expected a class or None, but got {cls!r}") + self._cls = cls + + if "sphinx" in sys.modules: + from sphinx.ext.autodoc import ALL + else: + ALL = object() + + if config is None: + config = {} + self.show_inherited_members = config.get("show_inherited_class_members", True) + + if modulename and not modulename.endswith("."): + modulename += "." + self._mod = modulename + + if doc is None: + if cls is None: + raise ValueError("No class or documentation string given") + doc = pydoc.getdoc(cls) + + NumpyDocString.__init__(self, doc) + + _members = config.get("members", []) + if _members is ALL: + _members = None + _exclude = config.get("exclude-members", []) + + if config.get("show_class_members", True) and _exclude is not ALL: + + def splitlines_x(s): + if not s: + return [] + else: + return s.splitlines() + + for field, items in [ + ("Methods", self.methods), + ("Attributes", self.properties), + ]: + if not self[field]: + doc_list = [] + for name in sorted(items): + if name in _exclude or (_members and name not in _members): + continue + try: + doc_item = pydoc.getdoc(getattr(self._cls, name)) + doc_list.append(Parameter(name, "", splitlines_x(doc_item))) + except AttributeError: + pass # method doesn't exist + self[field] = doc_list + + @property + def methods(self): + if self._cls is None: + return [] + return [ + name + for name, func in inspect.getmembers(self._cls) + if ( + (not name.startswith("_") or name in self.extra_public_methods) + and isinstance(func, Callable) + and self._is_show_member(name) + ) + ] + + @property + def properties(self): + if self._cls is None: + return [] + return [ + name + for name, func in inspect.getmembers(self._cls) + if ( + not name.startswith("_") + and not self._should_skip_member(name, self._cls) + and ( + func is None + or isinstance(func, (property, cached_property)) + or inspect.isdatadescriptor(func) + ) + and self._is_show_member(name) + ) + ] + + @staticmethod + def _should_skip_member(name, klass): + return ( + # Namedtuples should skip everything in their ._fields as the + # docstrings for each of the members is: "Alias for field number X" + issubclass(klass, tuple) + and hasattr(klass, "_asdict") + and hasattr(klass, "_fields") + and name in klass._fields + ) + + def _is_show_member(self, name): + return ( + # show all class members + self.show_inherited_members + # or class member is not inherited + or name in self._cls.__dict__ + ) + + +def get_doc_object( + obj, + what=None, + doc=None, + config=None, + class_doc=ClassDoc, + func_doc=FunctionDoc, + obj_doc=ObjDoc, +): + if what is None: + if inspect.isclass(obj): + what = "class" + elif inspect.ismodule(obj): + what = "module" + elif isinstance(obj, Callable): + what = "function" + else: + what = "object" + if config is None: + config = {} + + if what == "class": + return class_doc(obj, func_doc=func_doc, doc=doc, config=config) + elif what in ("function", "method"): + return func_doc(obj, doc=doc, config=config) + else: + if doc is None: + doc = pydoc.getdoc(obj) + return obj_doc(obj, doc, config=config) \ No newline at end of file diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_elementwise_iterative_method.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_elementwise_iterative_method.py new file mode 100644 index 0000000000000000000000000000000000000000..05efe86d31c137e7d780ebc438ec587df4e911dd --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_elementwise_iterative_method.py @@ -0,0 +1,357 @@ +# `_elementwise_iterative_method.py` includes tools for writing functions that +# - are vectorized to work elementwise on arrays, +# - implement non-trivial, iterative algorithms with a callback interface, and +# - return rich objects with iteration count, termination status, etc. +# +# Examples include: +# `scipy.optimize._chandrupatla._chandrupatla for scalar rootfinding, +# `scipy.optimize._chandrupatla._chandrupatla_minimize for scalar minimization, +# `scipy.optimize._differentiate._differentiate for numerical differentiation, +# `scipy.optimize._bracket._bracket_root for finding rootfinding brackets, +# `scipy.optimize._bracket._bracket_minimize for finding minimization brackets, +# `scipy.integrate._tanhsinh._tanhsinh` for numerical quadrature, +# `scipy.differentiate.derivative` for finite difference based differentiation. + +import math +import numpy as np +from ._util import _RichResult, _call_callback_maybe_halt +from ._array_api import array_namespace, xp_size + +_ESIGNERR = -1 +_ECONVERR = -2 +_EVALUEERR = -3 +_ECALLBACK = -4 +_EINPUTERR = -5 +_ECONVERGED = 0 +_EINPROGRESS = 1 + +def _initialize(func, xs, args, complex_ok=False, preserve_shape=None, xp=None): + """Initialize abscissa, function, and args arrays for elementwise function + + Parameters + ---------- + func : callable + An elementwise function with signature + + func(x: ndarray, *args) -> ndarray + + where each element of ``x`` is a finite real and ``args`` is a tuple, + which may contain an arbitrary number of arrays that are broadcastable + with ``x``. + xs : tuple of arrays + Finite real abscissa arrays. Must be broadcastable. + args : tuple, optional + Additional positional arguments to be passed to `func`. + preserve_shape : bool, default:False + When ``preserve_shape=False`` (default), `func` may be passed + arguments of any shape; `_scalar_optimization_loop` is permitted + to reshape and compress arguments at will. When + ``preserve_shape=False``, arguments passed to `func` must have shape + `shape` or ``shape + (n,)``, where ``n`` is any integer. + xp : namespace + Namespace of array arguments in `xs`. + + Returns + ------- + xs, fs, args : tuple of arrays + Broadcasted, writeable, 1D abscissa and function value arrays (or + NumPy floats, if appropriate). The dtypes of the `xs` and `fs` are + `xfat`; the dtype of the `args` are unchanged. + shape : tuple of ints + Original shape of broadcasted arrays. + xfat : NumPy dtype + Result dtype of abscissae, function values, and args determined using + `np.result_type`, except integer types are promoted to `np.float64`. + + Raises + ------ + ValueError + If the result dtype is not that of a real scalar + + Notes + ----- + Useful for initializing the input of SciPy functions that accept + an elementwise callable, abscissae, and arguments; e.g. + `scipy.optimize._chandrupatla`. + """ + nx = len(xs) + xp = array_namespace(*xs) if xp is None else xp + + # Try to preserve `dtype`, but we need to ensure that the arguments are at + # least floats before passing them into the function; integers can overflow + # and cause failure. + # There might be benefit to combining the `xs` into a single array and + # calling `func` once on the combined array. For now, keep them separate. + xas = xp.broadcast_arrays(*xs, *args) # broadcast and rename + xat = xp.result_type(*[xa.dtype for xa in xas]) + xat = xp.asarray(1.).dtype if xp.isdtype(xat, "integral") else xat + xs, args = xas[:nx], xas[nx:] + xs = [xp.asarray(x, dtype=xat) for x in xs] # use copy=False when implemented + fs = [xp.asarray(func(x, *args)) for x in xs] + shape = xs[0].shape + fshape = fs[0].shape + + if preserve_shape: + # bind original shape/func now to avoid late-binding gotcha + def func(x, *args, shape=shape, func=func, **kwargs): + i = (0,)*(len(fshape) - len(shape)) + return func(x[i], *args, **kwargs) + shape = np.broadcast_shapes(fshape, shape) # just shapes; use of NumPy OK + xs = [xp.broadcast_to(x, shape) for x in xs] + args = [xp.broadcast_to(arg, shape) for arg in args] + + message = ("The shape of the array returned by `func` must be the same as " + "the broadcasted shape of `x` and all other `args`.") + if preserve_shape is not None: # only in tanhsinh for now + message = f"When `preserve_shape=False`, {message.lower()}" + shapes_equal = [f.shape == shape for f in fs] + if not all(shapes_equal): # use Python all to reduce overhead + raise ValueError(message) + + # These algorithms tend to mix the dtypes of the abscissae and function + # values, so figure out what the result will be and convert them all to + # that type from the outset. + xfat = xp.result_type(*([f.dtype for f in fs] + [xat])) + if not complex_ok and not xp.isdtype(xfat, "real floating"): + raise ValueError("Abscissae and function output must be real numbers.") + xs = [xp.asarray(x, dtype=xfat, copy=True) for x in xs] + fs = [xp.asarray(f, dtype=xfat, copy=True) for f in fs] + + # To ensure that we can do indexing, we'll work with at least 1d arrays, + # but remember the appropriate shape of the output. + xs = [xp.reshape(x, (-1,)) for x in xs] + fs = [xp.reshape(f, (-1,)) for f in fs] + args = [xp.reshape(xp.asarray(arg, copy=True), (-1,)) for arg in args] + return func, xs, fs, args, shape, xfat, xp + + +def _loop(work, callback, shape, maxiter, func, args, dtype, pre_func_eval, + post_func_eval, check_termination, post_termination_check, + customize_result, res_work_pairs, xp, preserve_shape=False): + """Main loop of a vectorized scalar optimization algorithm + + Parameters + ---------- + work : _RichResult + All variables that need to be retained between iterations. Must + contain attributes `nit`, `nfev`, and `success`. All arrays are + subject to being "compressed" if `preserve_shape is False`; nest + arrays that should not be compressed inside another object (e.g. + `dict` or `_RichResult`). + callback : callable + User-specified callback function + shape : tuple of ints + The shape of all output arrays + maxiter : + Maximum number of iterations of the algorithm + func : callable + The user-specified callable that is being optimized or solved + args : tuple + Additional positional arguments to be passed to `func`. + dtype : NumPy dtype + The common dtype of all abscissae and function values + pre_func_eval : callable + A function that accepts `work` and returns `x`, the active elements + of `x` at which `func` will be evaluated. May modify attributes + of `work` with any algorithmic steps that need to happen + at the beginning of an iteration, before `func` is evaluated, + post_func_eval : callable + A function that accepts `x`, `func(x)`, and `work`. May modify + attributes of `work` with any algorithmic steps that need to happen + in the middle of an iteration, after `func` is evaluated but before + the termination check. + check_termination : callable + A function that accepts `work` and returns `stop`, a boolean array + indicating which of the active elements have met a termination + condition. + post_termination_check : callable + A function that accepts `work`. May modify `work` with any algorithmic + steps that need to happen after the termination check and before the + end of the iteration. + customize_result : callable + A function that accepts `res` and `shape` and returns `shape`. May + modify `res` (in-place) according to preferences (e.g. rearrange + elements between attributes) and modify `shape` if needed. + res_work_pairs : list of (str, str) + Identifies correspondence between attributes of `res` and attributes + of `work`; i.e., attributes of active elements of `work` will be + copied to the appropriate indices of `res` when appropriate. The order + determines the order in which _RichResult attributes will be + pretty-printed. + preserve_shape : bool, default: False + Whether to compress the attributes of `work` (to avoid unnecessary + computation on elements that have already converged). + + Returns + ------- + res : _RichResult + The final result object + + Notes + ----- + Besides providing structure, this framework provides several important + services for a vectorized optimization algorithm. + + - It handles common tasks involving iteration count, function evaluation + count, a user-specified callback, and associated termination conditions. + - It compresses the attributes of `work` to eliminate unnecessary + computation on elements that have already converged. + + """ + if xp is None: + raise NotImplementedError("Must provide xp.") + + cb_terminate = False + + # Initialize the result object and active element index array + n_elements = math.prod(shape) + active = xp.arange(n_elements) # in-progress element indices + res_dict = {i: xp.zeros(n_elements, dtype=dtype) for i, j in res_work_pairs} + res_dict['success'] = xp.zeros(n_elements, dtype=xp.bool) + res_dict['status'] = xp.full(n_elements, xp.asarray(_EINPROGRESS), dtype=xp.int32) + res_dict['nit'] = xp.zeros(n_elements, dtype=xp.int32) + res_dict['nfev'] = xp.zeros(n_elements, dtype=xp.int32) + res = _RichResult(res_dict) + work.args = args + + active = _check_termination(work, res, res_work_pairs, active, + check_termination, preserve_shape, xp) + + if callback is not None: + temp = _prepare_result(work, res, res_work_pairs, active, shape, + customize_result, preserve_shape, xp) + if _call_callback_maybe_halt(callback, temp): + cb_terminate = True + + while work.nit < maxiter and xp_size(active) and not cb_terminate and n_elements: + x = pre_func_eval(work) + + if work.args and work.args[0].ndim != x.ndim: + # `x` always starts as 1D. If the SciPy function that uses + # _loop added dimensions to `x`, we need to + # add them to the elements of `args`. + args = [] + for arg in work.args: + n_new_dims = x.ndim - arg.ndim + new_shape = arg.shape + (1,)*n_new_dims + args.append(xp.reshape(arg, new_shape)) + work.args = args + + x_shape = x.shape + if preserve_shape: + x = xp.reshape(x, (shape + (-1,))) + f = func(x, *work.args) + f = xp.asarray(f, dtype=dtype) + if preserve_shape: + x = xp.reshape(x, x_shape) + f = xp.reshape(f, x_shape) + work.nfev += 1 if x.ndim == 1 else x.shape[-1] + + post_func_eval(x, f, work) + + work.nit += 1 + active = _check_termination(work, res, res_work_pairs, active, + check_termination, preserve_shape, xp) + + if callback is not None: + temp = _prepare_result(work, res, res_work_pairs, active, shape, + customize_result, preserve_shape, xp) + if _call_callback_maybe_halt(callback, temp): + cb_terminate = True + break + if xp_size(active) == 0: + break + + post_termination_check(work) + + work.status[:] = _ECALLBACK if cb_terminate else _ECONVERR + return _prepare_result(work, res, res_work_pairs, active, shape, + customize_result, preserve_shape, xp) + + +def _check_termination(work, res, res_work_pairs, active, check_termination, + preserve_shape, xp): + # Checks termination conditions, updates elements of `res` with + # corresponding elements of `work`, and compresses `work`. + + stop = check_termination(work) + + if xp.any(stop): + # update the active elements of the result object with the active + # elements for which a termination condition has been met + _update_active(work, res, res_work_pairs, active, stop, preserve_shape, xp) + + if preserve_shape: + stop = stop[active] + + proceed = ~stop + active = active[proceed] + + if not preserve_shape: + # compress the arrays to avoid unnecessary computation + for key, val in work.items(): + # Need to find a better way than these try/excepts + # Somehow need to keep compressible numerical args separate + if key == 'args': + continue + try: + work[key] = val[proceed] + except (IndexError, TypeError, KeyError): # not a compressible array + work[key] = val + work.args = [arg[proceed] for arg in work.args] + + return active + + +def _update_active(work, res, res_work_pairs, active, mask, preserve_shape, xp): + # Update `active` indices of the arrays in result object `res` with the + # contents of the scalars and arrays in `update_dict`. When provided, + # `mask` is a boolean array applied both to the arrays in `update_dict` + # that are to be used and to the arrays in `res` that are to be updated. + update_dict = {key1: work[key2] for key1, key2 in res_work_pairs} + update_dict['success'] = work.status == 0 + + if mask is not None: + if preserve_shape: + active_mask = xp.zeros_like(mask) + active_mask[active] = 1 + active_mask = active_mask & mask + for key, val in update_dict.items(): + try: + res[key][active_mask] = val[active_mask] + except (IndexError, TypeError, KeyError): + res[key][active_mask] = val + else: + active_mask = active[mask] + for key, val in update_dict.items(): + try: + res[key][active_mask] = val[mask] + except (IndexError, TypeError, KeyError): + res[key][active_mask] = val + else: + for key, val in update_dict.items(): + if preserve_shape: + try: + val = val[active] + except (IndexError, TypeError, KeyError): + pass + res[key][active] = val + + +def _prepare_result(work, res, res_work_pairs, active, shape, customize_result, + preserve_shape, xp): + # Prepare the result object `res` by creating a copy, copying the latest + # data from work, running the provided result customization function, + # and reshaping the data to the original shapes. + res = res.copy() + _update_active(work, res, res_work_pairs, active, None, preserve_shape, xp) + + shape = customize_result(res, shape) + + for key, val in res.items(): + # this looks like it won't work for xp != np if val is not numeric + temp = xp.reshape(val, shape) + res[key] = temp[()] if temp.ndim == 0 else temp + + res['_order_keys'] = ['success'] + [i for i, j in res_work_pairs] + return _RichResult(**res) diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_finite_differences.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_finite_differences.py new file mode 100644 index 0000000000000000000000000000000000000000..506057b48b3f49244e1ed6cd755fad8ad43d8739 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_finite_differences.py @@ -0,0 +1,145 @@ +from numpy import arange, newaxis, hstack, prod, array + + +def _central_diff_weights(Np, ndiv=1): + """ + Return weights for an Np-point central derivative. + + Assumes equally-spaced function points. + + If weights are in the vector w, then + derivative is w[0] * f(x-ho*dx) + ... + w[-1] * f(x+h0*dx) + + Parameters + ---------- + Np : int + Number of points for the central derivative. + ndiv : int, optional + Number of divisions. Default is 1. + + Returns + ------- + w : ndarray + Weights for an Np-point central derivative. Its size is `Np`. + + Notes + ----- + Can be inaccurate for a large number of points. + + Examples + -------- + We can calculate a derivative value of a function. + + >>> def f(x): + ... return 2 * x**2 + 3 + >>> x = 3.0 # derivative point + >>> h = 0.1 # differential step + >>> Np = 3 # point number for central derivative + >>> weights = _central_diff_weights(Np) # weights for first derivative + >>> vals = [f(x + (i - Np/2) * h) for i in range(Np)] + >>> sum(w * v for (w, v) in zip(weights, vals))/h + 11.79999999999998 + + This value is close to the analytical solution: + f'(x) = 4x, so f'(3) = 12 + + References + ---------- + .. [1] https://en.wikipedia.org/wiki/Finite_difference + + """ + if Np < ndiv + 1: + raise ValueError( + "Number of points must be at least the derivative order + 1." + ) + if Np % 2 == 0: + raise ValueError("The number of points must be odd.") + from scipy import linalg + + ho = Np >> 1 + x = arange(-ho, ho + 1.0) + x = x[:, newaxis] + X = x**0.0 + for k in range(1, Np): + X = hstack([X, x**k]) + w = prod(arange(1, ndiv + 1), axis=0) * linalg.inv(X)[ndiv] + return w + + +def _derivative(func, x0, dx=1.0, n=1, args=(), order=3): + """ + Find the nth derivative of a function at a point. + + Given a function, use a central difference formula with spacing `dx` to + compute the nth derivative at `x0`. + + Parameters + ---------- + func : function + Input function. + x0 : float + The point at which the nth derivative is found. + dx : float, optional + Spacing. + n : int, optional + Order of the derivative. Default is 1. + args : tuple, optional + Arguments + order : int, optional + Number of points to use, must be odd. + + Notes + ----- + Decreasing the step size too small can result in round-off error. + + Examples + -------- + >>> def f(x): + ... return x**3 + x**2 + >>> _derivative(f, 1.0, dx=1e-6) + 4.9999999999217337 + + """ + if order < n + 1: + raise ValueError( + "'order' (the number of points used to compute the derivative), " + "must be at least the derivative order 'n' + 1." + ) + if order % 2 == 0: + raise ValueError( + "'order' (the number of points used to compute the derivative) " + "must be odd." + ) + # pre-computed for n=1 and 2 and low-order for speed. + if n == 1: + if order == 3: + weights = array([-1, 0, 1]) / 2.0 + elif order == 5: + weights = array([1, -8, 0, 8, -1]) / 12.0 + elif order == 7: + weights = array([-1, 9, -45, 0, 45, -9, 1]) / 60.0 + elif order == 9: + weights = array([3, -32, 168, -672, 0, 672, -168, 32, -3]) / 840.0 + else: + weights = _central_diff_weights(order, 1) + elif n == 2: + if order == 3: + weights = array([1, -2.0, 1]) + elif order == 5: + weights = array([-1, 16, -30, 16, -1]) / 12.0 + elif order == 7: + weights = array([2, -27, 270, -490, 270, -27, 2]) / 180.0 + elif order == 9: + weights = ( + array([-9, 128, -1008, 8064, -14350, 8064, -1008, 128, -9]) + / 5040.0 + ) + else: + weights = _central_diff_weights(order, 2) + else: + weights = _central_diff_weights(order, n) + val = 0.0 + ho = order >> 1 + for k in range(order): + val += weights[k] * func(x0 + (k - ho) * dx, *args) + return val / prod((dx,) * n, axis=0) diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_fpumode.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_fpumode.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..3a443899bde3481ed6c1359eff4ef9696f6c8e4d Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_fpumode.cpython-310-x86_64-linux-gnu.so differ diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_gcutils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_gcutils.py new file mode 100644 index 0000000000000000000000000000000000000000..854ae36228614f3eb8849e9f95abf0dd387b5d35 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_gcutils.py @@ -0,0 +1,105 @@ +""" +Module for testing automatic garbage collection of objects + +.. autosummary:: + :toctree: generated/ + + set_gc_state - enable or disable garbage collection + gc_state - context manager for given state of garbage collector + assert_deallocated - context manager to check for circular references on object + +""" +import weakref +import gc + +from contextlib import contextmanager +from platform import python_implementation + +__all__ = ['set_gc_state', 'gc_state', 'assert_deallocated'] + + +IS_PYPY = python_implementation() == 'PyPy' + + +class ReferenceError(AssertionError): + pass + + +def set_gc_state(state): + """ Set status of garbage collector """ + if gc.isenabled() == state: + return + if state: + gc.enable() + else: + gc.disable() + + +@contextmanager +def gc_state(state): + """ Context manager to set state of garbage collector to `state` + + Parameters + ---------- + state : bool + True for gc enabled, False for disabled + + Examples + -------- + >>> with gc_state(False): + ... assert not gc.isenabled() + >>> with gc_state(True): + ... assert gc.isenabled() + """ + orig_state = gc.isenabled() + set_gc_state(state) + yield + set_gc_state(orig_state) + + +@contextmanager +def assert_deallocated(func, *args, **kwargs): + """Context manager to check that object is deallocated + + This is useful for checking that an object can be freed directly by + reference counting, without requiring gc to break reference cycles. + GC is disabled inside the context manager. + + This check is not available on PyPy. + + Parameters + ---------- + func : callable + Callable to create object to check + \\*args : sequence + positional arguments to `func` in order to create object to check + \\*\\*kwargs : dict + keyword arguments to `func` in order to create object to check + + Examples + -------- + >>> class C: pass + >>> with assert_deallocated(C) as c: + ... # do something + ... del c + + >>> class C: + ... def __init__(self): + ... self._circular = self # Make circular reference + >>> with assert_deallocated(C) as c: #doctest: +IGNORE_EXCEPTION_DETAIL + ... # do something + ... del c + Traceback (most recent call last): + ... + ReferenceError: Remaining reference(s) to object + """ + if IS_PYPY: + raise RuntimeError("assert_deallocated is unavailable on PyPy") + + with gc_state(False): + obj = func(*args, **kwargs) + ref = weakref.ref(obj) + yield obj + del obj + if ref() is not None: + raise ReferenceError("Remaining reference(s) to object") diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_pep440.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_pep440.py new file mode 100644 index 0000000000000000000000000000000000000000..d546e32a0349461a0aab76bfb4636ebf25227ca0 --- /dev/null +++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_pep440.py @@ -0,0 +1,487 @@ +"""Utility to compare pep440 compatible version strings. + +The LooseVersion and StrictVersion classes that distutils provides don't +work; they don't recognize anything like alpha/beta/rc/dev versions. +""" + +# Copyright (c) Donald Stufft and individual contributors. +# All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: + +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. + +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +import collections +import itertools +import re + + +__all__ = [ + "parse", "Version", "LegacyVersion", "InvalidVersion", "VERSION_PATTERN", +] + + +# BEGIN packaging/_structures.py + + +class Infinity: + def __repr__(self): + return "Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return False + + def __le__(self, other): + return False + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return True + + def __ge__(self, other): + return True + + def __neg__(self): + return NegativeInfinity + + +Infinity = Infinity() + + +class NegativeInfinity: + def __repr__(self): + return "-Infinity" + + def __hash__(self): + return hash(repr(self)) + + def __lt__(self, other): + return True + + def __le__(self, other): + return True + + def __eq__(self, other): + return isinstance(other, self.__class__) + + def __ne__(self, other): + return not isinstance(other, self.__class__) + + def __gt__(self, other): + return False + + def __ge__(self, other): + return False + + def __neg__(self): + return Infinity + + +# BEGIN packaging/version.py + + +NegativeInfinity = NegativeInfinity() + +_Version = collections.namedtuple( + "_Version", + ["epoch", "release", "dev", "pre", "post", "local"], +) + + +def parse(version): + """ + Parse the given version string and return either a :class:`Version` object + or a :class:`LegacyVersion` object depending on if the given version is + a valid PEP 440 version or a legacy version. + """ + try: + return Version(version) + except InvalidVersion: + return LegacyVersion(version) + + +class InvalidVersion(ValueError): + """ + An invalid version was found, users should refer to PEP 440. + """ + + +class _BaseVersion: + + def __hash__(self): + return hash(self._key) + + def __lt__(self, other): + return self._compare(other, lambda s, o: s < o) + + def __le__(self, other): + return self._compare(other, lambda s, o: s <= o) + + def __eq__(self, other): + return self._compare(other, lambda s, o: s == o) + + def __ge__(self, other): + return self._compare(other, lambda s, o: s >= o) + + def __gt__(self, other): + return self._compare(other, lambda s, o: s > o) + + def __ne__(self, other): + return self._compare(other, lambda s, o: s != o) + + def _compare(self, other, method): + if not isinstance(other, _BaseVersion): + return NotImplemented + + return method(self._key, other._key) + + +class LegacyVersion(_BaseVersion): + + def __init__(self, version): + self._version = str(version) + self._key = _legacy_cmpkey(self._version) + + def __str__(self): + return self._version + + def __repr__(self): + return f"" + + @property + def public(self): + return self._version + + @property + def base_version(self): + return self._version + + @property + def local(self): + return None + + @property + def is_prerelease(self): + return False + + @property + def is_postrelease(self): + return False + + +_legacy_version_component_re = re.compile( + r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE, +) + +_legacy_version_replacement_map = { + "pre": "c", "preview": "c", "-": "final-", "rc": "c", "dev": "@", +} + + +def _parse_version_parts(s): + for part in _legacy_version_component_re.split(s): + part = _legacy_version_replacement_map.get(part, part) + + if not part or part == ".": + continue + + if part[:1] in "0123456789": + # pad for numeric comparison + yield part.zfill(8) + else: + yield "*" + part + + # ensure that alpha/beta/candidate are before final + yield "*final" + + +def _legacy_cmpkey(version): + # We hardcode an epoch of -1 here. A PEP 440 version can only have an epoch + # greater than or equal to 0. This will effectively put the LegacyVersion, + # which uses the defacto standard originally implemented by setuptools, + # as before all PEP 440 versions. + epoch = -1 + + # This scheme is taken from pkg_resources.parse_version setuptools prior to + # its adoption of the packaging library. + parts = [] + for part in _parse_version_parts(version.lower()): + if part.startswith("*"): + # remove "-" before a prerelease tag + if part < "*final": + while parts and parts[-1] == "*final-": + parts.pop() + + # remove trailing zeros from each series of numeric parts + while parts and parts[-1] == "00000000": + parts.pop() + + parts.append(part) + parts = tuple(parts) + + return epoch, parts + + +# Deliberately not anchored to the start and end of the string, to make it +# easier for 3rd party code to reuse +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                          # pre-release
+            [-_\.]?
+            (?P(a|b|c|rc|alpha|beta|pre|preview))
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [-_\.]?
+                (?Ppost|rev|r)
+                [-_\.]?
+                (?P[0-9]+)?
+            )
+        )?
+        (?P                                          # dev release
+            [-_\.]?
+            (?Pdev)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+    )
+    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
+"""
+
+
+class Version(_BaseVersion):
+
+    _regex = re.compile(
+        r"^\s*" + VERSION_PATTERN + r"\s*$",
+        re.VERBOSE | re.IGNORECASE,
+    )
+
+    def __init__(self, version):
+        # Validate the version and parse it into pieces
+        match = self._regex.search(version)
+        if not match:
+            raise InvalidVersion(f"Invalid version: '{version}'")
+
+        # Store the parsed out pieces of the version
+        self._version = _Version(
+            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
+            release=tuple(int(i) for i in match.group("release").split(".")),
+            pre=_parse_letter_version(
+                match.group("pre_l"),
+                match.group("pre_n"),
+            ),
+            post=_parse_letter_version(
+                match.group("post_l"),
+                match.group("post_n1") or match.group("post_n2"),
+            ),
+            dev=_parse_letter_version(
+                match.group("dev_l"),
+                match.group("dev_n"),
+            ),
+            local=_parse_local_version(match.group("local")),
+        )
+
+        # Generate a key which will be used for sorting
+        self._key = _cmpkey(
+            self._version.epoch,
+            self._version.release,
+            self._version.pre,
+            self._version.post,
+            self._version.dev,
+            self._version.local,
+        )
+
+    def __repr__(self):
+        return f""
+
+    def __str__(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append(f"{self._version.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        # Pre-release
+        if self._version.pre is not None:
+            parts.append("".join(str(x) for x in self._version.pre))
+
+        # Post-release
+        if self._version.post is not None:
+            parts.append(f".post{self._version.post[1]}")
+
+        # Development release
+        if self._version.dev is not None:
+            parts.append(f".dev{self._version.dev[1]}")
+
+        # Local version segment
+        if self._version.local is not None:
+            parts.append(
+                "+{}".format(".".join(str(x) for x in self._version.local))
+            )
+
+        return "".join(parts)
+
+    @property
+    def public(self):
+        return str(self).split("+", 1)[0]
+
+    @property
+    def base_version(self):
+        parts = []
+
+        # Epoch
+        if self._version.epoch != 0:
+            parts.append(f"{self._version.epoch}!")
+
+        # Release segment
+        parts.append(".".join(str(x) for x in self._version.release))
+
+        return "".join(parts)
+
+    @property
+    def local(self):
+        version_string = str(self)
+        if "+" in version_string:
+            return version_string.split("+", 1)[1]
+
+    @property
+    def is_prerelease(self):
+        return bool(self._version.dev or self._version.pre)
+
+    @property
+    def is_postrelease(self):
+        return bool(self._version.post)
+
+
+def _parse_letter_version(letter, number):
+    if letter:
+        # We assume there is an implicit 0 in a pre-release if there is
+        # no numeral associated with it.
+        if number is None:
+            number = 0
+
+        # We normalize any letters to their lower-case form
+        letter = letter.lower()
+
+        # We consider some words to be alternate spellings of other words and
+        # in those cases we want to normalize the spellings to our preferred
+        # spelling.
+        if letter == "alpha":
+            letter = "a"
+        elif letter == "beta":
+            letter = "b"
+        elif letter in ["c", "pre", "preview"]:
+            letter = "rc"
+        elif letter in ["rev", "r"]:
+            letter = "post"
+
+        return letter, int(number)
+    if not letter and number:
+        # We assume that if we are given a number but not given a letter,
+        # then this is using the implicit post release syntax (e.g., 1.0-1)
+        letter = "post"
+
+        return letter, int(number)
+
+
+_local_version_seperators = re.compile(r"[\._-]")
+
+
+def _parse_local_version(local):
+    """
+    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
+    """
+    if local is not None:
+        return tuple(
+            part.lower() if not part.isdigit() else int(part)
+            for part in _local_version_seperators.split(local)
+        )
+
+
+def _cmpkey(epoch, release, pre, post, dev, local):
+    # When we compare a release version, we want to compare it with all of the
+    # trailing zeros removed. So we'll use a reverse the list, drop all the now
+    # leading zeros until we come to something non-zero, then take the rest,
+    # re-reverse it back into the correct order, and make it a tuple and use
+    # that for our sorting key.
+    release = tuple(
+        reversed(list(
+            itertools.dropwhile(
+                lambda x: x == 0,
+                reversed(release),
+            )
+        ))
+    )
+
+    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
+    # We'll do this by abusing the pre-segment, but we _only_ want to do this
+    # if there is no pre- or a post-segment. If we have one of those, then
+    # the normal sorting rules will handle this case correctly.
+    if pre is None and post is None and dev is not None:
+        pre = -Infinity
+    # Versions without a pre-release (except as noted above) should sort after
+    # those with one.
+    elif pre is None:
+        pre = Infinity
+
+    # Versions without a post-segment should sort before those with one.
+    if post is None:
+        post = -Infinity
+
+    # Versions without a development segment should sort after those with one.
+    if dev is None:
+        dev = Infinity
+
+    if local is None:
+        # Versions without a local segment should sort before those with one.
+        local = -Infinity
+    else:
+        # Versions with a local segment need that segment parsed to implement
+        # the sorting rules in PEP440.
+        # - Alphanumeric segments sort before numeric segments
+        # - Alphanumeric segments sort lexicographically
+        # - Numeric segments sort numerically
+        # - Shorter versions sort before longer versions when the prefixes
+        #   match exactly
+        local = tuple(
+            (i, "") if isinstance(i, int) else (-Infinity, i)
+            for i in local
+        )
+
+    return epoch, release, pre, post, dev, local
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_ccallback.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_ccallback.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..3bd017197577d973e5c77c3c51ad966a015b890b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_ccallback.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_deprecation_call.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_deprecation_call.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..34c0e024dcd5924c7287e6ce8105975c4d9ab7f5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_test_deprecation_call.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_testutils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_testutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..8da7e403dec5de5cb7d9a98d8c69a2c49e377c6a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_testutils.py
@@ -0,0 +1,369 @@
+"""
+Generic test utilities.
+
+"""
+
+import inspect
+import os
+import re
+import shutil
+import subprocess
+import sys
+import sysconfig
+import threading
+from importlib.util import module_from_spec, spec_from_file_location
+
+import numpy as np
+import scipy
+
+try:
+    # Need type: ignore[import-untyped] for mypy >= 1.6
+    import cython  # type: ignore[import-untyped]
+    from Cython.Compiler.Version import (  # type: ignore[import-untyped]
+        version as cython_version,
+    )
+except ImportError:
+    cython = None
+else:
+    from scipy._lib import _pep440
+    required_version = '3.0.8'
+    if _pep440.parse(cython_version) < _pep440.Version(required_version):
+        # too old or wrong cython, skip Cython API tests
+        cython = None
+
+
+__all__ = ['PytestTester', 'check_free_memory', '_TestPythranFunc', 'IS_MUSL']
+
+
+IS_MUSL = False
+# alternate way is
+# from packaging.tags import sys_tags
+#     _tags = list(sys_tags())
+#     if 'musllinux' in _tags[0].platform:
+_v = sysconfig.get_config_var('HOST_GNU_TYPE') or ''
+if 'musl' in _v:
+    IS_MUSL = True
+
+
+IS_EDITABLE = 'editable' in scipy.__path__[0]
+
+
+class FPUModeChangeWarning(RuntimeWarning):
+    """Warning about FPU mode change"""
+    pass
+
+
+class PytestTester:
+    """
+    Run tests for this namespace
+
+    ``scipy.test()`` runs tests for all of SciPy, with the default settings.
+    When used from a submodule (e.g., ``scipy.cluster.test()``, only the tests
+    for that namespace are run.
+
+    Parameters
+    ----------
+    label : {'fast', 'full'}, optional
+        Whether to run only the fast tests, or also those marked as slow.
+        Default is 'fast'.
+    verbose : int, optional
+        Test output verbosity. Default is 1.
+    extra_argv : list, optional
+        Arguments to pass through to Pytest.
+    doctests : bool, optional
+        Whether to run doctests or not. Default is False.
+    coverage : bool, optional
+        Whether to run tests with code coverage measurements enabled.
+        Default is False.
+    tests : list of str, optional
+        List of module names to run tests for. By default, uses the module
+        from which the ``test`` function is called.
+    parallel : int, optional
+        Run tests in parallel with pytest-xdist, if number given is larger than
+        1. Default is 1.
+
+    """
+    def __init__(self, module_name):
+        self.module_name = module_name
+
+    def __call__(self, label="fast", verbose=1, extra_argv=None, doctests=False,
+                 coverage=False, tests=None, parallel=None):
+        import pytest
+
+        module = sys.modules[self.module_name]
+        module_path = os.path.abspath(module.__path__[0])
+
+        pytest_args = ['--showlocals', '--tb=short']
+
+        if extra_argv:
+            pytest_args += list(extra_argv)
+
+        if verbose and int(verbose) > 1:
+            pytest_args += ["-" + "v"*(int(verbose)-1)]
+
+        if coverage:
+            pytest_args += ["--cov=" + module_path]
+
+        if label == "fast":
+            pytest_args += ["-m", "not slow"]
+        elif label != "full":
+            pytest_args += ["-m", label]
+
+        if tests is None:
+            tests = [self.module_name]
+
+        if parallel is not None and parallel > 1:
+            if _pytest_has_xdist():
+                pytest_args += ['-n', str(parallel)]
+            else:
+                import warnings
+                warnings.warn('Could not run tests in parallel because '
+                              'pytest-xdist plugin is not available.',
+                              stacklevel=2)
+
+        pytest_args += ['--pyargs'] + list(tests)
+
+        try:
+            code = pytest.main(pytest_args)
+        except SystemExit as exc:
+            code = exc.code
+
+        return (code == 0)
+
+
+class _TestPythranFunc:
+    '''
+    These are situations that can be tested in our pythran tests:
+    - A function with multiple array arguments and then
+      other positional and keyword arguments.
+    - A function with array-like keywords (e.g. `def somefunc(x0, x1=None)`.
+    Note: list/tuple input is not yet tested!
+
+    `self.arguments`: A dictionary which key is the index of the argument,
+                      value is tuple(array value, all supported dtypes)
+    `self.partialfunc`: A function used to freeze some non-array argument
+                        that of no interests in the original function
+    '''
+    ALL_INTEGER = [np.int8, np.int16, np.int32, np.int64, np.intc, np.intp]
+    ALL_FLOAT = [np.float32, np.float64]
+    ALL_COMPLEX = [np.complex64, np.complex128]
+
+    def setup_method(self):
+        self.arguments = {}
+        self.partialfunc = None
+        self.expected = None
+
+    def get_optional_args(self, func):
+        # get optional arguments with its default value,
+        # used for testing keywords
+        signature = inspect.signature(func)
+        optional_args = {}
+        for k, v in signature.parameters.items():
+            if v.default is not inspect.Parameter.empty:
+                optional_args[k] = v.default
+        return optional_args
+
+    def get_max_dtype_list_length(self):
+        # get the max supported dtypes list length in all arguments
+        max_len = 0
+        for arg_idx in self.arguments:
+            cur_len = len(self.arguments[arg_idx][1])
+            if cur_len > max_len:
+                max_len = cur_len
+        return max_len
+
+    def get_dtype(self, dtype_list, dtype_idx):
+        # get the dtype from dtype_list via index
+        # if the index is out of range, then return the last dtype
+        if dtype_idx > len(dtype_list)-1:
+            return dtype_list[-1]
+        else:
+            return dtype_list[dtype_idx]
+
+    def test_all_dtypes(self):
+        for type_idx in range(self.get_max_dtype_list_length()):
+            args_array = []
+            for arg_idx in self.arguments:
+                new_dtype = self.get_dtype(self.arguments[arg_idx][1],
+                                           type_idx)
+                args_array.append(self.arguments[arg_idx][0].astype(new_dtype))
+            self.pythranfunc(*args_array)
+
+    def test_views(self):
+        args_array = []
+        for arg_idx in self.arguments:
+            args_array.append(self.arguments[arg_idx][0][::-1][::-1])
+        self.pythranfunc(*args_array)
+
+    def test_strided(self):
+        args_array = []
+        for arg_idx in self.arguments:
+            args_array.append(np.repeat(self.arguments[arg_idx][0],
+                                        2, axis=0)[::2])
+        self.pythranfunc(*args_array)
+
+
+def _pytest_has_xdist():
+    """
+    Check if the pytest-xdist plugin is installed, providing parallel tests
+    """
+    # Check xdist exists without importing, otherwise pytests emits warnings
+    from importlib.util import find_spec
+    return find_spec('xdist') is not None
+
+
+def check_free_memory(free_mb):
+    """
+    Check *free_mb* of memory is available, otherwise do pytest.skip
+    """
+    import pytest
+
+    try:
+        mem_free = _parse_size(os.environ['SCIPY_AVAILABLE_MEM'])
+        msg = '{} MB memory required, but environment SCIPY_AVAILABLE_MEM={}'.format(
+            free_mb, os.environ['SCIPY_AVAILABLE_MEM'])
+    except KeyError:
+        mem_free = _get_mem_available()
+        if mem_free is None:
+            pytest.skip("Could not determine available memory; set SCIPY_AVAILABLE_MEM "
+                        "variable to free memory in MB to run the test.")
+        msg = f'{free_mb} MB memory required, but {mem_free/1e6} MB available'
+
+    if mem_free < free_mb * 1e6:
+        pytest.skip(msg)
+
+
+def _parse_size(size_str):
+    suffixes = {'': 1e6,
+                'b': 1.0,
+                'k': 1e3, 'M': 1e6, 'G': 1e9, 'T': 1e12,
+                'kb': 1e3, 'Mb': 1e6, 'Gb': 1e9, 'Tb': 1e12,
+                'kib': 1024.0, 'Mib': 1024.0**2, 'Gib': 1024.0**3, 'Tib': 1024.0**4}
+    m = re.match(r'^\s*(\d+)\s*({})\s*$'.format('|'.join(suffixes.keys())),
+                 size_str,
+                 re.I)
+    if not m or m.group(2) not in suffixes:
+        raise ValueError("Invalid size string")
+
+    return float(m.group(1)) * suffixes[m.group(2)]
+
+
+def _get_mem_available():
+    """
+    Get information about memory available, not counting swap.
+    """
+    try:
+        import psutil
+        return psutil.virtual_memory().available
+    except (ImportError, AttributeError):
+        pass
+
+    if sys.platform.startswith('linux'):
+        info = {}
+        with open('/proc/meminfo') as f:
+            for line in f:
+                p = line.split()
+                info[p[0].strip(':').lower()] = float(p[1]) * 1e3
+
+        if 'memavailable' in info:
+            # Linux >= 3.14
+            return info['memavailable']
+        else:
+            return info['memfree'] + info['cached']
+
+    return None
+
+def _test_cython_extension(tmp_path, srcdir):
+    """
+    Helper function to test building and importing Cython modules that
+    make use of the Cython APIs for BLAS, LAPACK, optimize, and special.
+    """
+    import pytest
+    try:
+        subprocess.check_call(["meson", "--version"])
+    except FileNotFoundError:
+        pytest.skip("No usable 'meson' found")
+
+    # Make safe for being called by multiple threads within one test
+    tmp_path = tmp_path / str(threading.get_ident())
+
+    # build the examples in a temporary directory
+    mod_name = os.path.split(srcdir)[1]
+    shutil.copytree(srcdir, tmp_path / mod_name)
+    build_dir = tmp_path / mod_name / 'tests' / '_cython_examples'
+    target_dir = build_dir / 'build'
+    os.makedirs(target_dir, exist_ok=True)
+
+    # Ensure we use the correct Python interpreter even when `meson` is
+    # installed in a different Python environment (see numpy#24956)
+    native_file = str(build_dir / 'interpreter-native-file.ini')
+    with open(native_file, 'w') as f:
+        f.write("[binaries]\n")
+        f.write(f"python = '{sys.executable}'")
+
+    if sys.platform == "win32":
+        subprocess.check_call(["meson", "setup",
+                               "--buildtype=release",
+                               "--native-file", native_file,
+                               "--vsenv", str(build_dir)],
+                              cwd=target_dir,
+                              )
+    else:
+        subprocess.check_call(["meson", "setup",
+                               "--native-file", native_file, str(build_dir)],
+                              cwd=target_dir
+                              )
+    subprocess.check_call(["meson", "compile", "-vv"], cwd=target_dir)
+
+    # import without adding the directory to sys.path
+    suffix = sysconfig.get_config_var('EXT_SUFFIX')
+
+    def load(modname):
+        so = (target_dir / modname).with_suffix(suffix)
+        spec = spec_from_file_location(modname, so)
+        mod = module_from_spec(spec)
+        spec.loader.exec_module(mod)
+        return mod
+
+    # test that the module can be imported
+    return load("extending"), load("extending_cpp")
+
+
+def _run_concurrent_barrier(n_workers, fn, *args, **kwargs):
+    """
+    Run a given function concurrently across a given number of threads.
+
+    This is equivalent to using a ThreadPoolExecutor, but using the threading
+    primitives instead. This function ensures that the closure passed by
+    parameter gets called concurrently by setting up a barrier before it gets
+    called before any of the threads.
+
+    Arguments
+    ---------
+    n_workers: int
+        Number of concurrent threads to spawn.
+    fn: callable
+        Function closure to execute concurrently. Its first argument will
+        be the thread id.
+    *args: tuple
+        Variable number of positional arguments to pass to the function.
+    **kwargs: dict
+        Keyword arguments to pass to the function.
+    """
+    barrier = threading.Barrier(n_workers)
+
+    def closure(i, *args, **kwargs):
+        barrier.wait()
+        fn(i, *args, **kwargs)
+
+    workers = []
+    for i in range(0, n_workers):
+        workers.append(threading.Thread(
+            target=closure,
+            args=(i,) + args, kwargs=kwargs))
+
+    for worker in workers:
+        worker.start()
+
+    for worker in workers:
+        worker.join()
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_threadsafety.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_threadsafety.py
new file mode 100644
index 0000000000000000000000000000000000000000..530339ec7075dafdb81e9fa0ff5447952af77497
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_threadsafety.py
@@ -0,0 +1,58 @@
+import threading
+
+import scipy._lib.decorator
+
+
+__all__ = ['ReentrancyError', 'ReentrancyLock', 'non_reentrant']
+
+
+class ReentrancyError(RuntimeError):
+    pass
+
+
+class ReentrancyLock:
+    """
+    Threading lock that raises an exception for reentrant calls.
+
+    Calls from different threads are serialized, and nested calls from the
+    same thread result to an error.
+
+    The object can be used as a context manager or to decorate functions
+    via the decorate() method.
+
+    """
+
+    def __init__(self, err_msg):
+        self._rlock = threading.RLock()
+        self._entered = False
+        self._err_msg = err_msg
+
+    def __enter__(self):
+        self._rlock.acquire()
+        if self._entered:
+            self._rlock.release()
+            raise ReentrancyError(self._err_msg)
+        self._entered = True
+
+    def __exit__(self, type, value, traceback):
+        self._entered = False
+        self._rlock.release()
+
+    def decorate(self, func):
+        def caller(func, *a, **kw):
+            with self:
+                return func(*a, **kw)
+        return scipy._lib.decorator.decorate(func, caller)
+
+
+def non_reentrant(err_msg=None):
+    """
+    Decorate a function with a threading lock and prevent reentrant calls.
+    """
+    def decorator(func):
+        msg = err_msg
+        if msg is None:
+            msg = f"{func.__name__} is not re-entrant"
+        lock = ReentrancyLock(msg)
+        return lock.decorate(func)
+    return decorator
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_tmpdirs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_tmpdirs.py
new file mode 100644
index 0000000000000000000000000000000000000000..0f9fd546a9d2ae3e9a20c0684f79eb0b3d61ee92
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_tmpdirs.py
@@ -0,0 +1,86 @@
+''' Contexts for *with* statement providing temporary directories
+'''
+import os
+from contextlib import contextmanager
+from shutil import rmtree
+from tempfile import mkdtemp
+
+
+@contextmanager
+def tempdir():
+    """Create and return a temporary directory. This has the same
+    behavior as mkdtemp but can be used as a context manager.
+
+    Upon exiting the context, the directory and everything contained
+    in it are removed.
+
+    Examples
+    --------
+    >>> import os
+    >>> with tempdir() as tmpdir:
+    ...     fname = os.path.join(tmpdir, 'example_file.txt')
+    ...     with open(fname, 'wt') as fobj:
+    ...         _ = fobj.write('a string\\n')
+    >>> os.path.exists(tmpdir)
+    False
+    """
+    d = mkdtemp()
+    yield d
+    rmtree(d)
+
+
+@contextmanager
+def in_tempdir():
+    ''' Create, return, and change directory to a temporary directory
+
+    Examples
+    --------
+    >>> import os
+    >>> my_cwd = os.getcwd()
+    >>> with in_tempdir() as tmpdir:
+    ...     _ = open('test.txt', 'wt').write('some text')
+    ...     assert os.path.isfile('test.txt')
+    ...     assert os.path.isfile(os.path.join(tmpdir, 'test.txt'))
+    >>> os.path.exists(tmpdir)
+    False
+    >>> os.getcwd() == my_cwd
+    True
+    '''
+    pwd = os.getcwd()
+    d = mkdtemp()
+    os.chdir(d)
+    yield d
+    os.chdir(pwd)
+    rmtree(d)
+
+
+@contextmanager
+def in_dir(dir=None):
+    """ Change directory to given directory for duration of ``with`` block
+
+    Useful when you want to use `in_tempdir` for the final test, but
+    you are still debugging. For example, you may want to do this in the end:
+
+    >>> with in_tempdir() as tmpdir:
+    ...     # do something complicated which might break
+    ...     pass
+
+    But, indeed, the complicated thing does break, and meanwhile, the
+    ``in_tempdir`` context manager wiped out the directory with the
+    temporary files that you wanted for debugging. So, while debugging, you
+    replace with something like:
+
+    >>> with in_dir() as tmpdir: # Use working directory by default
+    ...     # do something complicated which might break
+    ...     pass
+
+    You can then look at the temporary file outputs to debug what is happening,
+    fix, and finally replace ``in_dir`` with ``in_tempdir`` again.
+    """
+    cwd = os.getcwd()
+    if dir is None:
+        yield cwd
+        return
+    os.chdir(dir)
+    yield dir
+    os.chdir(cwd)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_uarray/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_uarray/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..91afdcedb180599a41758cdd8c03416cf6c20d76
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_uarray/__init__.py
@@ -0,0 +1,116 @@
+"""
+.. note:
+    If you are looking for overrides for NumPy-specific methods, see the
+    documentation for :obj:`unumpy`. This page explains how to write
+    back-ends and multimethods.
+
+``uarray`` is built around a back-end protocol, and overridable multimethods.
+It is necessary to define multimethods for back-ends to be able to override them.
+See the documentation of :obj:`generate_multimethod` on how to write multimethods.
+
+
+
+Let's start with the simplest:
+
+``__ua_domain__`` defines the back-end *domain*. The domain consists of period-
+separated string consisting of the modules you extend plus the submodule. For
+example, if a submodule ``module2.submodule`` extends ``module1``
+(i.e., it exposes dispatchables marked as types available in ``module1``),
+then the domain string should be ``"module1.module2.submodule"``.
+
+
+For the purpose of this demonstration, we'll be creating an object and setting
+its attributes directly. However, note that you can use a module or your own type
+as a backend as well.
+
+>>> class Backend: pass
+>>> be = Backend()
+>>> be.__ua_domain__ = "ua_examples"
+
+It might be useful at this point to sidetrack to the documentation of
+:obj:`generate_multimethod` to find out how to generate a multimethod
+overridable by :obj:`uarray`. Needless to say, writing a backend and
+creating multimethods are mostly orthogonal activities, and knowing
+one doesn't necessarily require knowledge of the other, although it
+is certainly helpful. We expect core API designers/specifiers to write the
+multimethods, and implementors to override them. But, as is often the case,
+similar people write both.
+
+Without further ado, here's an example multimethod:
+
+>>> import uarray as ua
+>>> from uarray import Dispatchable
+>>> def override_me(a, b):
+...   return Dispatchable(a, int),
+>>> def override_replacer(args, kwargs, dispatchables):
+...     return (dispatchables[0], args[1]), {}
+>>> overridden_me = ua.generate_multimethod(
+...     override_me, override_replacer, "ua_examples"
+... )
+
+Next comes the part about overriding the multimethod. This requires
+the ``__ua_function__`` protocol, and the ``__ua_convert__``
+protocol. The ``__ua_function__`` protocol has the signature
+``(method, args, kwargs)`` where ``method`` is the passed
+multimethod, ``args``/``kwargs`` specify the arguments and ``dispatchables``
+is the list of converted dispatchables passed in.
+
+>>> def __ua_function__(method, args, kwargs):
+...     return method.__name__, args, kwargs
+>>> be.__ua_function__ = __ua_function__
+
+The other protocol of interest is the ``__ua_convert__`` protocol. It has the
+signature ``(dispatchables, coerce)``. When ``coerce`` is ``False``, conversion
+between the formats should ideally be an ``O(1)`` operation, but it means that
+no memory copying should be involved, only views of the existing data.
+
+>>> def __ua_convert__(dispatchables, coerce):
+...     for d in dispatchables:
+...         if d.type is int:
+...             if coerce and d.coercible:
+...                 yield str(d.value)
+...             else:
+...                 yield d.value
+>>> be.__ua_convert__ = __ua_convert__
+
+Now that we have defined the backend, the next thing to do is to call the multimethod.
+
+>>> with ua.set_backend(be):
+...      overridden_me(1, "2")
+('override_me', (1, '2'), {})
+
+Note that the marked type has no effect on the actual type of the passed object.
+We can also coerce the type of the input.
+
+>>> with ua.set_backend(be, coerce=True):
+...     overridden_me(1, "2")
+...     overridden_me(1.0, "2")
+('override_me', ('1', '2'), {})
+('override_me', ('1.0', '2'), {})
+
+Another feature is that if you remove ``__ua_convert__``, the arguments are not
+converted at all and it's up to the backend to handle that.
+
+>>> del be.__ua_convert__
+>>> with ua.set_backend(be):
+...     overridden_me(1, "2")
+('override_me', (1, '2'), {})
+
+You also have the option to return ``NotImplemented``, in which case processing moves on
+to the next back-end, which in this case, doesn't exist. The same applies to
+``__ua_convert__``.
+
+>>> be.__ua_function__ = lambda *a, **kw: NotImplemented
+>>> with ua.set_backend(be):
+...     overridden_me(1, "2")
+Traceback (most recent call last):
+    ...
+uarray.BackendNotImplementedError: ...
+
+The last possibility is if we don't have ``__ua_convert__``, in which case the job is
+left up to ``__ua_function__``, but putting things back into arrays after conversion
+will not be possible.
+"""
+
+from ._backend import *
+__version__ = '0.8.8.dev0+aa94c5a4.scipy'
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_util.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_util.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d16072007395221fdf7a1f5352fd2838fd7a6ec
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/_util.py
@@ -0,0 +1,1179 @@
+import re
+from contextlib import contextmanager
+import functools
+import operator
+import warnings
+import numbers
+from collections import namedtuple
+import inspect
+import math
+from typing import TypeAlias, TypeVar
+
+import numpy as np
+from scipy._lib._array_api import array_namespace, is_numpy, xp_size
+from scipy._lib._docscrape import FunctionDoc, Parameter
+
+
+AxisError: type[Exception]
+ComplexWarning: type[Warning]
+VisibleDeprecationWarning: type[Warning]
+
+if np.lib.NumpyVersion(np.__version__) >= '1.25.0':
+    from numpy.exceptions import (
+        AxisError, ComplexWarning, VisibleDeprecationWarning,
+        DTypePromotionError
+    )
+else:
+    from numpy import (  # type: ignore[attr-defined, no-redef]
+        AxisError, ComplexWarning, VisibleDeprecationWarning  # noqa: F401
+    )
+    DTypePromotionError = TypeError  # type: ignore
+
+np_long: type
+np_ulong: type
+
+if np.lib.NumpyVersion(np.__version__) >= "2.0.0.dev0":
+    try:
+        with warnings.catch_warnings():
+            warnings.filterwarnings(
+                "ignore",
+                r".*In the future `np\.long` will be defined as.*",
+                FutureWarning,
+            )
+            np_long = np.long  # type: ignore[attr-defined]
+            np_ulong = np.ulong  # type: ignore[attr-defined]
+    except AttributeError:
+            np_long = np.int_
+            np_ulong = np.uint
+else:
+    np_long = np.int_
+    np_ulong = np.uint
+
+IntNumber = int | np.integer
+DecimalNumber = float | np.floating | np.integer
+
+copy_if_needed: bool | None
+
+if np.lib.NumpyVersion(np.__version__) >= "2.0.0":
+    copy_if_needed = None
+elif np.lib.NumpyVersion(np.__version__) < "1.28.0":
+    copy_if_needed = False
+else:
+    # 2.0.0 dev versions, handle cases where copy may or may not exist
+    try:
+        np.array([1]).__array__(copy=None)  # type: ignore[call-overload]
+        copy_if_needed = None
+    except TypeError:
+        copy_if_needed = False
+
+
+_RNG: TypeAlias = np.random.Generator | np.random.RandomState
+SeedType: TypeAlias = IntNumber | _RNG | None
+
+GeneratorType = TypeVar("GeneratorType", bound=_RNG)
+
+# Since Generator was introduced in numpy 1.17, the following condition is needed for
+# backward compatibility
+try:
+    from numpy.random import Generator as Generator
+except ImportError:
+    class Generator:  # type: ignore[no-redef]
+        pass
+
+
+def _lazywhere(cond, arrays, f, fillvalue=None, f2=None):
+    """Return elements chosen from two possibilities depending on a condition
+
+    Equivalent to ``f(*arrays) if cond else fillvalue`` performed elementwise.
+
+    Parameters
+    ----------
+    cond : array
+        The condition (expressed as a boolean array).
+    arrays : tuple of array
+        Arguments to `f` (and `f2`). Must be broadcastable with `cond`.
+    f : callable
+        Where `cond` is True, output will be ``f(arr1[cond], arr2[cond], ...)``
+    fillvalue : object
+        If provided, value with which to fill output array where `cond` is
+        not True.
+    f2 : callable
+        If provided, output will be ``f2(arr1[cond], arr2[cond], ...)`` where
+        `cond` is not True.
+
+    Returns
+    -------
+    out : array
+        An array with elements from the output of `f` where `cond` is True
+        and `fillvalue` (or elements from the output of `f2`) elsewhere. The
+        returned array has data type determined by Type Promotion Rules
+        with the output of `f` and `fillvalue` (or the output of `f2`).
+
+    Notes
+    -----
+    ``xp.where(cond, x, fillvalue)`` requires explicitly forming `x` even where
+    `cond` is False. This function evaluates ``f(arr1[cond], arr2[cond], ...)``
+    onle where `cond` ``is True.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a, b = np.array([1, 2, 3, 4]), np.array([5, 6, 7, 8])
+    >>> def f(a, b):
+    ...     return a*b
+    >>> _lazywhere(a > 2, (a, b), f, np.nan)
+    array([ nan,  nan,  21.,  32.])
+
+    """
+    xp = array_namespace(cond, *arrays)
+
+    if (f2 is fillvalue is None) or (f2 is not None and fillvalue is not None):
+        raise ValueError("Exactly one of `fillvalue` or `f2` must be given.")
+
+    args = xp.broadcast_arrays(cond, *arrays)
+    bool_dtype = xp.asarray([True]).dtype  # numpy 1.xx doesn't have `bool`
+    cond, arrays = xp.astype(args[0], bool_dtype, copy=False), args[1:]
+
+    temp1 = xp.asarray(f(*(arr[cond] for arr in arrays)))
+
+    if f2 is None:
+        # If `fillvalue` is a Python scalar and we convert to `xp.asarray`, it gets the
+        # default `int` or `float` type of `xp`, so `result_type` could be wrong.
+        # `result_type` should/will handle mixed array/Python scalars;
+        # remove this special logic when it does.
+        if type(fillvalue) in {bool, int, float, complex}:
+            with np.errstate(invalid='ignore'):
+                dtype = (temp1 * fillvalue).dtype
+        else:
+           dtype = xp.result_type(temp1.dtype, fillvalue)
+        out = xp.full(cond.shape, dtype=dtype,
+                      fill_value=xp.asarray(fillvalue, dtype=dtype))
+    else:
+        ncond = ~cond
+        temp2 = xp.asarray(f2(*(arr[ncond] for arr in arrays)))
+        dtype = xp.result_type(temp1, temp2)
+        out = xp.empty(cond.shape, dtype=dtype)
+        out[ncond] = temp2
+
+    out[cond] = temp1
+
+    return out
+
+
+def _lazyselect(condlist, choicelist, arrays, default=0):
+    """
+    Mimic `np.select(condlist, choicelist)`.
+
+    Notice, it assumes that all `arrays` are of the same shape or can be
+    broadcasted together.
+
+    All functions in `choicelist` must accept array arguments in the order
+    given in `arrays` and must return an array of the same shape as broadcasted
+    `arrays`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> x = np.arange(6)
+    >>> np.select([x <3, x > 3], [x**2, x**3], default=0)
+    array([  0,   1,   4,   0,  64, 125])
+
+    >>> _lazyselect([x < 3, x > 3], [lambda x: x**2, lambda x: x**3], (x,))
+    array([   0.,    1.,    4.,   0.,   64.,  125.])
+
+    >>> a = -np.ones_like(x)
+    >>> _lazyselect([x < 3, x > 3],
+    ...             [lambda x, a: x**2, lambda x, a: a * x**3],
+    ...             (x, a), default=np.nan)
+    array([   0.,    1.,    4.,   nan,  -64., -125.])
+
+    """
+    arrays = np.broadcast_arrays(*arrays)
+    tcode = np.mintypecode([a.dtype.char for a in arrays])
+    out = np.full(np.shape(arrays[0]), fill_value=default, dtype=tcode)
+    for func, cond in zip(choicelist, condlist):
+        if np.all(cond is False):
+            continue
+        cond, _ = np.broadcast_arrays(cond, arrays[0])
+        temp = tuple(np.extract(cond, arr) for arr in arrays)
+        np.place(out, cond, func(*temp))
+    return out
+
+
+def _aligned_zeros(shape, dtype=float, order="C", align=None):
+    """Allocate a new ndarray with aligned memory.
+
+    Primary use case for this currently is working around a f2py issue
+    in NumPy 1.9.1, where dtype.alignment is such that np.zeros() does
+    not necessarily create arrays aligned up to it.
+
+    """
+    dtype = np.dtype(dtype)
+    if align is None:
+        align = dtype.alignment
+    if not hasattr(shape, '__len__'):
+        shape = (shape,)
+    size = functools.reduce(operator.mul, shape) * dtype.itemsize
+    buf = np.empty(size + align + 1, np.uint8)
+    offset = buf.__array_interface__['data'][0] % align
+    if offset != 0:
+        offset = align - offset
+    # Note: slices producing 0-size arrays do not necessarily change
+    # data pointer --- so we use and allocate size+1
+    buf = buf[offset:offset+size+1][:-1]
+    data = np.ndarray(shape, dtype, buf, order=order)
+    data.fill(0)
+    return data
+
+
+def _prune_array(array):
+    """Return an array equivalent to the input array. If the input
+    array is a view of a much larger array, copy its contents to a
+    newly allocated array. Otherwise, return the input unchanged.
+    """
+    if array.base is not None and array.size < array.base.size // 2:
+        return array.copy()
+    return array
+
+
+def float_factorial(n: int) -> float:
+    """Compute the factorial and return as a float
+
+    Returns infinity when result is too large for a double
+    """
+    return float(math.factorial(n)) if n < 171 else np.inf
+
+
+_rng_desc = (
+    r"""If `rng` is passed by keyword, types other than `numpy.random.Generator` are
+    passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    If `rng` is already a ``Generator`` instance, then the provided instance is
+    used. Specify `rng` for repeatable function behavior.
+
+    If this argument is passed by position or `{old_name}` is passed by keyword,
+    legacy behavior for the argument `{old_name}` applies:
+
+    - If `{old_name}` is None (or `numpy.random`), the `numpy.random.RandomState`
+      singleton is used.
+    - If `{old_name}` is an int, a new ``RandomState`` instance is used,
+      seeded with `{old_name}`.
+    - If `{old_name}` is already a ``Generator`` or ``RandomState`` instance then
+      that instance is used.
+
+    .. versionchanged:: 1.15.0
+        As part of the `SPEC-007 `_
+        transition from use of `numpy.random.RandomState` to
+        `numpy.random.Generator`, this keyword was changed from `{old_name}` to `rng`.
+        For an interim period, both keywords will continue to work, although only one
+        may be specified at a time. After the interim period, function calls using the
+        `{old_name}` keyword will emit warnings. The behavior of both `{old_name}` and
+        `rng` are outlined above, but only the `rng` keyword should be used in new code.
+        """
+)
+
+
+# SPEC 7
+def _transition_to_rng(old_name, *, position_num=None, end_version=None,
+                       replace_doc=True):
+    """Example decorator to transition from old PRNG usage to new `rng` behavior
+
+    Suppose the decorator is applied to a function that used to accept parameter
+    `old_name='random_state'` either by keyword or as a positional argument at
+    `position_num=1`. At the time of application, the name of the argument in the
+    function signature is manually changed to the new name, `rng`. If positional
+    use was allowed before, this is not changed.*
+
+    - If the function is called with both `random_state` and `rng`, the decorator
+      raises an error.
+    - If `random_state` is provided as a keyword argument, the decorator passes
+      `random_state` to the function's `rng` argument as a keyword. If `end_version`
+      is specified, the decorator will emit a `DeprecationWarning` about the
+      deprecation of keyword `random_state`.
+    - If `random_state` is provided as a positional argument, the decorator passes
+      `random_state` to the function's `rng` argument by position. If `end_version`
+      is specified, the decorator will emit a `FutureWarning` about the changing
+      interpretation of the argument.
+    - If `rng` is provided as a keyword argument, the decorator validates `rng` using
+      `numpy.random.default_rng` before passing it to the function.
+    - If `end_version` is specified and neither `random_state` nor `rng` is provided
+      by the user, the decorator checks whether `np.random.seed` has been used to set
+      the global seed. If so, it emits a `FutureWarning`, noting that usage of
+      `numpy.random.seed` will eventually have no effect. Either way, the decorator
+      calls the function without explicitly passing the `rng` argument.
+
+    If `end_version` is specified, a user must pass `rng` as a keyword to avoid
+    warnings.
+
+    After the deprecation period, the decorator can be removed, and the function
+    can simply validate the `rng` argument by calling `np.random.default_rng(rng)`.
+
+    * A `FutureWarning` is emitted when the PRNG argument is used by
+      position. It indicates that the "Hinsen principle" (same
+      code yielding different results in two versions of the software)
+      will be violated, unless positional use is deprecated. Specifically:
+
+      - If `None` is passed by position and `np.random.seed` has been used,
+        the function will change from being seeded to being unseeded.
+      - If an integer is passed by position, the random stream will change.
+      - If `np.random` or an instance of `RandomState` is passed by position,
+        an error will be raised.
+
+      We suggest that projects consider deprecating positional use of
+      `random_state`/`rng` (i.e., change their function signatures to
+      ``def my_func(..., *, rng=None)``); that might not make sense
+      for all projects, so this SPEC does not make that
+      recommendation, neither does this decorator enforce it.
+
+    Parameters
+    ----------
+    old_name : str
+        The old name of the PRNG argument (e.g. `seed` or `random_state`).
+    position_num : int, optional
+        The (0-indexed) position of the old PRNG argument (if accepted by position).
+        Maintainers are welcome to eliminate this argument and use, for example,
+        `inspect`, if preferred.
+    end_version : str, optional
+        The full version number of the library when the behavior described in
+        `DeprecationWarning`s and `FutureWarning`s will take effect. If left
+        unspecified, no warnings will be emitted by the decorator.
+    replace_doc : bool, default: True
+        Whether the decorator should replace the documentation for parameter `rng` with
+        `_rng_desc` (defined above), which documents both new `rng` keyword behavior
+        and typical legacy `random_state`/`seed` behavior. If True, manually replace
+        the first paragraph of the function's old `random_state`/`seed` documentation
+        with the desired *final* `rng` documentation; this way, no changes to
+        documentation are needed when the decorator is removed. Documentation of `rng`
+        after the first blank line is preserved. Use False if the function's old
+        `random_state`/`seed` behavior does not match that described by `_rng_desc`.
+
+    """
+    NEW_NAME = "rng"
+
+    cmn_msg = (
+        "To silence this warning and ensure consistent behavior in SciPy "
+        f"{end_version}, control the RNG using argument `{NEW_NAME}`. Arguments passed "
+        f"to keyword `{NEW_NAME}` will be validated by `np.random.default_rng`, so the "
+        "behavior corresponding with a given value may change compared to use of "
+        f"`{old_name}`. For example, "
+        "1) `None` will result in unpredictable random numbers, "
+        "2) an integer will result in a different stream of random numbers, (with the "
+        "same distribution), and "
+        "3) `np.random` or `RandomState` instances will result in an error. "
+        "See the documentation of `default_rng` for more information."
+    )
+
+    def decorator(fun):
+        @functools.wraps(fun)
+        def wrapper(*args, **kwargs):
+            # Determine how PRNG was passed
+            as_old_kwarg = old_name in kwargs
+            as_new_kwarg = NEW_NAME in kwargs
+            as_pos_arg = position_num is not None and len(args) >= position_num + 1
+            emit_warning = end_version is not None
+
+            # Can only specify PRNG one of the three ways
+            if int(as_old_kwarg) + int(as_new_kwarg) + int(as_pos_arg) > 1:
+                message = (
+                    f"{fun.__name__}() got multiple values for "
+                    f"argument now known as `{NEW_NAME}`. Specify one of "
+                    f"`{NEW_NAME}` or `{old_name}`."
+                )
+                raise TypeError(message)
+
+            # Check whether global random state has been set
+            global_seed_set = np.random.mtrand._rand._bit_generator._seed_seq is None
+
+            if as_old_kwarg:  # warn about deprecated use of old kwarg
+                kwargs[NEW_NAME] = kwargs.pop(old_name)
+                if emit_warning:
+                    message = (
+                        f"Use of keyword argument `{old_name}` is "
+                        f"deprecated and replaced by `{NEW_NAME}`.  "
+                        f"Support for `{old_name}` will be removed "
+                        f"in SciPy {end_version}. "
+                    ) + cmn_msg
+                    warnings.warn(message, DeprecationWarning, stacklevel=2)
+
+            elif as_pos_arg:
+                # Warn about changing meaning of positional arg
+
+                # Note that this decorator does not deprecate positional use of the
+                # argument; it only warns that the behavior will change in the future.
+                # Simultaneously transitioning to keyword-only use is another option.
+
+                arg = args[position_num]
+                # If the argument is None and the global seed wasn't set, or if the
+                # argument is one of a few new classes, the user will not notice change
+                # in behavior.
+                ok_classes = (
+                    np.random.Generator,
+                    np.random.SeedSequence,
+                    np.random.BitGenerator,
+                )
+                if (arg is None and not global_seed_set) or isinstance(arg, ok_classes):
+                    pass
+                elif emit_warning:
+                    message = (
+                        f"Positional use of `{NEW_NAME}` (formerly known as "
+                        f"`{old_name}`) is still allowed, but the behavior is "
+                        "changing: the argument will be normalized using "
+                        f"`np.random.default_rng` beginning in SciPy {end_version}, "
+                        "and the resulting `Generator` will be used to generate "
+                        "random numbers."
+                    ) + cmn_msg
+                    warnings.warn(message, FutureWarning, stacklevel=2)
+
+            elif as_new_kwarg:  # no warnings; this is the preferred use
+                # After the removal of the decorator, normalization with
+                # np.random.default_rng will be done inside the decorated function
+                kwargs[NEW_NAME] = np.random.default_rng(kwargs[NEW_NAME])
+
+            elif global_seed_set and emit_warning:
+                # Emit FutureWarning if `np.random.seed` was used and no PRNG was passed
+                message = (
+                    "The NumPy global RNG was seeded by calling "
+                    f"`np.random.seed`. Beginning in {end_version}, this "
+                    "function will no longer use the global RNG."
+                ) + cmn_msg
+                warnings.warn(message, FutureWarning, stacklevel=2)
+
+            return fun(*args, **kwargs)
+
+        if replace_doc:
+            doc = FunctionDoc(wrapper)
+            parameter_names = [param.name for param in doc['Parameters']]
+            if 'rng' in parameter_names:
+                _type = "{None, int, `numpy.random.Generator`}, optional"
+                _desc = _rng_desc.replace("{old_name}", old_name)
+                old_doc = doc['Parameters'][parameter_names.index('rng')].desc
+                old_doc_keep = old_doc[old_doc.index("") + 1:] if "" in old_doc else []
+                new_doc = [_desc] + old_doc_keep
+                _rng_parameter_doc = Parameter('rng', _type, new_doc)
+                doc['Parameters'][parameter_names.index('rng')] = _rng_parameter_doc
+                doc = str(doc).split("\n", 1)[1]  # remove signature
+                wrapper.__doc__ = str(doc)
+        return wrapper
+
+    return decorator
+
+
+# copy-pasted from scikit-learn utils/validation.py
+def check_random_state(seed):
+    """Turn `seed` into a `np.random.RandomState` instance.
+
+    Parameters
+    ----------
+    seed : {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optional
+        If `seed` is None (or `np.random`), the `numpy.random.RandomState`
+        singleton is used.
+        If `seed` is an int, a new ``RandomState`` instance is used,
+        seeded with `seed`.
+        If `seed` is already a ``Generator`` or ``RandomState`` instance then
+        that instance is used.
+
+    Returns
+    -------
+    seed : {`numpy.random.Generator`, `numpy.random.RandomState`}
+        Random number generator.
+
+    """
+    if seed is None or seed is np.random:
+        return np.random.mtrand._rand
+    if isinstance(seed, numbers.Integral | np.integer):
+        return np.random.RandomState(seed)
+    if isinstance(seed, np.random.RandomState | np.random.Generator):
+        return seed
+
+    raise ValueError(f"'{seed}' cannot be used to seed a numpy.random.RandomState"
+                     " instance")
+
+
+def _asarray_validated(a, check_finite=True,
+                       sparse_ok=False, objects_ok=False, mask_ok=False,
+                       as_inexact=False):
+    """
+    Helper function for SciPy argument validation.
+
+    Many SciPy linear algebra functions do support arbitrary array-like
+    input arguments. Examples of commonly unsupported inputs include
+    matrices containing inf/nan, sparse matrix representations, and
+    matrices with complicated elements.
+
+    Parameters
+    ----------
+    a : array_like
+        The array-like input.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+        Default: True
+    sparse_ok : bool, optional
+        True if scipy sparse matrices are allowed.
+    objects_ok : bool, optional
+        True if arrays with dype('O') are allowed.
+    mask_ok : bool, optional
+        True if masked arrays are allowed.
+    as_inexact : bool, optional
+        True to convert the input array to a np.inexact dtype.
+
+    Returns
+    -------
+    ret : ndarray
+        The converted validated array.
+
+    """
+    if not sparse_ok:
+        import scipy.sparse
+        if scipy.sparse.issparse(a):
+            msg = ('Sparse arrays/matrices are not supported by this function. '
+                   'Perhaps one of the `scipy.sparse.linalg` functions '
+                   'would work instead.')
+            raise ValueError(msg)
+    if not mask_ok:
+        if np.ma.isMaskedArray(a):
+            raise ValueError('masked arrays are not supported')
+    toarray = np.asarray_chkfinite if check_finite else np.asarray
+    a = toarray(a)
+    if not objects_ok:
+        if a.dtype is np.dtype('O'):
+            raise ValueError('object arrays are not supported')
+    if as_inexact:
+        if not np.issubdtype(a.dtype, np.inexact):
+            a = toarray(a, dtype=np.float64)
+    return a
+
+
+def _validate_int(k, name, minimum=None):
+    """
+    Validate a scalar integer.
+
+    This function can be used to validate an argument to a function
+    that expects the value to be an integer.  It uses `operator.index`
+    to validate the value (so, for example, k=2.0 results in a
+    TypeError).
+
+    Parameters
+    ----------
+    k : int
+        The value to be validated.
+    name : str
+        The name of the parameter.
+    minimum : int, optional
+        An optional lower bound.
+    """
+    try:
+        k = operator.index(k)
+    except TypeError:
+        raise TypeError(f'{name} must be an integer.') from None
+    if minimum is not None and k < minimum:
+        raise ValueError(f'{name} must be an integer not less '
+                         f'than {minimum}') from None
+    return k
+
+
+# Add a replacement for inspect.getfullargspec()/
+# The version below is borrowed from Django,
+# https://github.com/django/django/pull/4846.
+
+# Note an inconsistency between inspect.getfullargspec(func) and
+# inspect.signature(func). If `func` is a bound method, the latter does *not*
+# list `self` as a first argument, while the former *does*.
+# Hence, cook up a common ground replacement: `getfullargspec_no_self` which
+# mimics `inspect.getfullargspec` but does not list `self`.
+#
+# This way, the caller code does not need to know whether it uses a legacy
+# .getfullargspec or a bright and shiny .signature.
+
+FullArgSpec = namedtuple('FullArgSpec',
+                         ['args', 'varargs', 'varkw', 'defaults',
+                          'kwonlyargs', 'kwonlydefaults', 'annotations'])
+
+
+def getfullargspec_no_self(func):
+    """inspect.getfullargspec replacement using inspect.signature.
+
+    If func is a bound method, do not list the 'self' parameter.
+
+    Parameters
+    ----------
+    func : callable
+        A callable to inspect
+
+    Returns
+    -------
+    fullargspec : FullArgSpec(args, varargs, varkw, defaults, kwonlyargs,
+                              kwonlydefaults, annotations)
+
+        NOTE: if the first argument of `func` is self, it is *not*, I repeat
+        *not*, included in fullargspec.args.
+        This is done for consistency between inspect.getargspec() under
+        Python 2.x, and inspect.signature() under Python 3.x.
+
+    """
+    sig = inspect.signature(func)
+    args = [
+        p.name for p in sig.parameters.values()
+        if p.kind in [inspect.Parameter.POSITIONAL_OR_KEYWORD,
+                      inspect.Parameter.POSITIONAL_ONLY]
+    ]
+    varargs = [
+        p.name for p in sig.parameters.values()
+        if p.kind == inspect.Parameter.VAR_POSITIONAL
+    ]
+    varargs = varargs[0] if varargs else None
+    varkw = [
+        p.name for p in sig.parameters.values()
+        if p.kind == inspect.Parameter.VAR_KEYWORD
+    ]
+    varkw = varkw[0] if varkw else None
+    defaults = tuple(
+        p.default for p in sig.parameters.values()
+        if (p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD and
+            p.default is not p.empty)
+    ) or None
+    kwonlyargs = [
+        p.name for p in sig.parameters.values()
+        if p.kind == inspect.Parameter.KEYWORD_ONLY
+    ]
+    kwdefaults = {p.name: p.default for p in sig.parameters.values()
+                  if p.kind == inspect.Parameter.KEYWORD_ONLY and
+                  p.default is not p.empty}
+    annotations = {p.name: p.annotation for p in sig.parameters.values()
+                   if p.annotation is not p.empty}
+    return FullArgSpec(args, varargs, varkw, defaults, kwonlyargs,
+                       kwdefaults or None, annotations)
+
+
+class _FunctionWrapper:
+    """
+    Object to wrap user's function, allowing picklability
+    """
+    def __init__(self, f, args):
+        self.f = f
+        self.args = [] if args is None else args
+
+    def __call__(self, x):
+        return self.f(x, *self.args)
+
+
+class MapWrapper:
+    """
+    Parallelisation wrapper for working with map-like callables, such as
+    `multiprocessing.Pool.map`.
+
+    Parameters
+    ----------
+    pool : int or map-like callable
+        If `pool` is an integer, then it specifies the number of threads to
+        use for parallelization. If ``int(pool) == 1``, then no parallel
+        processing is used and the map builtin is used.
+        If ``pool == -1``, then the pool will utilize all available CPUs.
+        If `pool` is a map-like callable that follows the same
+        calling sequence as the built-in map function, then this callable is
+        used for parallelization.
+    """
+    def __init__(self, pool=1):
+        self.pool = None
+        self._mapfunc = map
+        self._own_pool = False
+
+        if callable(pool):
+            self.pool = pool
+            self._mapfunc = self.pool
+        else:
+            from multiprocessing import Pool
+            # user supplies a number
+            if int(pool) == -1:
+                # use as many processors as possible
+                self.pool = Pool()
+                self._mapfunc = self.pool.map
+                self._own_pool = True
+            elif int(pool) == 1:
+                pass
+            elif int(pool) > 1:
+                # use the number of processors requested
+                self.pool = Pool(processes=int(pool))
+                self._mapfunc = self.pool.map
+                self._own_pool = True
+            else:
+                raise RuntimeError("Number of workers specified must be -1,"
+                                   " an int >= 1, or an object with a 'map' "
+                                   "method")
+
+    def __enter__(self):
+        return self
+
+    def terminate(self):
+        if self._own_pool:
+            self.pool.terminate()
+
+    def join(self):
+        if self._own_pool:
+            self.pool.join()
+
+    def close(self):
+        if self._own_pool:
+            self.pool.close()
+
+    def __exit__(self, exc_type, exc_value, traceback):
+        if self._own_pool:
+            self.pool.close()
+            self.pool.terminate()
+
+    def __call__(self, func, iterable):
+        # only accept one iterable because that's all Pool.map accepts
+        try:
+            return self._mapfunc(func, iterable)
+        except TypeError as e:
+            # wrong number of arguments
+            raise TypeError("The map-like callable must be of the"
+                            " form f(func, iterable)") from e
+
+
+def rng_integers(gen, low, high=None, size=None, dtype='int64',
+                 endpoint=False):
+    """
+    Return random integers from low (inclusive) to high (exclusive), or if
+    endpoint=True, low (inclusive) to high (inclusive). Replaces
+    `RandomState.randint` (with endpoint=False) and
+    `RandomState.random_integers` (with endpoint=True).
+
+    Return random integers from the "discrete uniform" distribution of the
+    specified dtype. If high is None (the default), then results are from
+    0 to low.
+
+    Parameters
+    ----------
+    gen : {None, np.random.RandomState, np.random.Generator}
+        Random number generator. If None, then the np.random.RandomState
+        singleton is used.
+    low : int or array-like of ints
+        Lowest (signed) integers to be drawn from the distribution (unless
+        high=None, in which case this parameter is 0 and this value is used
+        for high).
+    high : int or array-like of ints
+        If provided, one above the largest (signed) integer to be drawn from
+        the distribution (see above for behavior if high=None). If array-like,
+        must contain integer values.
+    size : array-like of ints, optional
+        Output shape. If the given shape is, e.g., (m, n, k), then m * n * k
+        samples are drawn. Default is None, in which case a single value is
+        returned.
+    dtype : {str, dtype}, optional
+        Desired dtype of the result. All dtypes are determined by their name,
+        i.e., 'int64', 'int', etc, so byteorder is not available and a specific
+        precision may have different C types depending on the platform.
+        The default value is 'int64'.
+    endpoint : bool, optional
+        If True, sample from the interval [low, high] instead of the default
+        [low, high) Defaults to False.
+
+    Returns
+    -------
+    out: int or ndarray of ints
+        size-shaped array of random integers from the appropriate distribution,
+        or a single such random int if size not provided.
+    """
+    if isinstance(gen, Generator):
+        return gen.integers(low, high=high, size=size, dtype=dtype,
+                            endpoint=endpoint)
+    else:
+        if gen is None:
+            # default is RandomState singleton used by np.random.
+            gen = np.random.mtrand._rand
+        if endpoint:
+            # inclusive of endpoint
+            # remember that low and high can be arrays, so don't modify in
+            # place
+            if high is None:
+                return gen.randint(low + 1, size=size, dtype=dtype)
+            if high is not None:
+                return gen.randint(low, high=high + 1, size=size, dtype=dtype)
+
+        # exclusive
+        return gen.randint(low, high=high, size=size, dtype=dtype)
+
+
+@contextmanager
+def _fixed_default_rng(seed=1638083107694713882823079058616272161):
+    """Context with a fixed np.random.default_rng seed."""
+    orig_fun = np.random.default_rng
+    np.random.default_rng = lambda seed=seed: orig_fun(seed)
+    try:
+        yield
+    finally:
+        np.random.default_rng = orig_fun
+
+
+def _rng_html_rewrite(func):
+    """Rewrite the HTML rendering of ``np.random.default_rng``.
+
+    This is intended to decorate
+    ``numpydoc.docscrape_sphinx.SphinxDocString._str_examples``.
+
+    Examples are only run by Sphinx when there are plot involved. Even so,
+    it does not change the result values getting printed.
+    """
+    # hexadecimal or number seed, case-insensitive
+    pattern = re.compile(r'np.random.default_rng\((0x[0-9A-F]+|\d+)\)', re.I)
+
+    def _wrapped(*args, **kwargs):
+        res = func(*args, **kwargs)
+        lines = [
+            re.sub(pattern, 'np.random.default_rng()', line)
+            for line in res
+        ]
+        return lines
+
+    return _wrapped
+
+
+def _argmin(a, keepdims=False, axis=None):
+    """
+    argmin with a `keepdims` parameter.
+
+    See https://github.com/numpy/numpy/issues/8710
+
+    If axis is not None, a.shape[axis] must be greater than 0.
+    """
+    res = np.argmin(a, axis=axis)
+    if keepdims and axis is not None:
+        res = np.expand_dims(res, axis=axis)
+    return res
+
+
+def _first_nonnan(a, axis):
+    """
+    Return the first non-nan value along the given axis.
+
+    If a slice is all nan, nan is returned for that slice.
+
+    The shape of the return value corresponds to ``keepdims=True``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> nan = np.nan
+    >>> a = np.array([[ 3.,  3., nan,  3.],
+                      [ 1., nan,  2.,  4.],
+                      [nan, nan,  9., -1.],
+                      [nan,  5.,  4.,  3.],
+                      [ 2.,  2.,  2.,  2.],
+                      [nan, nan, nan, nan]])
+    >>> _first_nonnan(a, axis=0)
+    array([[3., 3., 2., 3.]])
+    >>> _first_nonnan(a, axis=1)
+    array([[ 3.],
+           [ 1.],
+           [ 9.],
+           [ 5.],
+           [ 2.],
+           [nan]])
+    """
+    k = _argmin(np.isnan(a), axis=axis, keepdims=True)
+    return np.take_along_axis(a, k, axis=axis)
+
+
+def _nan_allsame(a, axis, keepdims=False):
+    """
+    Determine if the values along an axis are all the same.
+
+    nan values are ignored.
+
+    `a` must be a numpy array.
+
+    `axis` is assumed to be normalized; that is, 0 <= axis < a.ndim.
+
+    For an axis of length 0, the result is True.  That is, we adopt the
+    convention that ``allsame([])`` is True. (There are no values in the
+    input that are different.)
+
+    `True` is returned for slices that are all nan--not because all the
+    values are the same, but because this is equivalent to ``allsame([])``.
+
+    Examples
+    --------
+    >>> from numpy import nan, array
+    >>> a = array([[ 3.,  3., nan,  3.],
+    ...            [ 1., nan,  2.,  4.],
+    ...            [nan, nan,  9., -1.],
+    ...            [nan,  5.,  4.,  3.],
+    ...            [ 2.,  2.,  2.,  2.],
+    ...            [nan, nan, nan, nan]])
+    >>> _nan_allsame(a, axis=1, keepdims=True)
+    array([[ True],
+           [False],
+           [False],
+           [False],
+           [ True],
+           [ True]])
+    """
+    if axis is None:
+        if a.size == 0:
+            return True
+        a = a.ravel()
+        axis = 0
+    else:
+        shp = a.shape
+        if shp[axis] == 0:
+            shp = shp[:axis] + (1,)*keepdims + shp[axis + 1:]
+            return np.full(shp, fill_value=True, dtype=bool)
+    a0 = _first_nonnan(a, axis=axis)
+    return ((a0 == a) | np.isnan(a)).all(axis=axis, keepdims=keepdims)
+
+
+def _contains_nan(a, nan_policy='propagate', policies=None, *,
+                  xp_omit_okay=False, xp=None):
+    # Regarding `xp_omit_okay`: Temporarily, while `_axis_nan_policy` does not
+    # handle non-NumPy arrays, most functions that call `_contains_nan` want
+    # it to raise an error if `nan_policy='omit'` and `xp` is not `np`.
+    # Some functions support `nan_policy='omit'` natively, so setting this to
+    # `True` prevents the error from being raised.
+    if xp is None:
+        xp = array_namespace(a)
+    not_numpy = not is_numpy(xp)
+
+    if policies is None:
+        policies = {'propagate', 'raise', 'omit'}
+    if nan_policy not in policies:
+        raise ValueError(f"nan_policy must be one of {set(policies)}.")
+
+    if xp_size(a) == 0:
+        contains_nan = False
+    elif xp.isdtype(a.dtype, "real floating"):
+        # Faster and less memory-intensive than xp.any(xp.isnan(a)), and unlike other
+        # reductions, `max`/`min` won't return NaN unless there is a NaN in the data.
+        contains_nan = xp.isnan(xp.max(a))
+    elif xp.isdtype(a.dtype, "complex floating"):
+        # Typically `real` and `imag` produce views; otherwise, `xp.any(xp.isnan(a))`
+        # would be more efficient.
+        contains_nan = xp.isnan(xp.max(xp.real(a))) | xp.isnan(xp.max(xp.imag(a)))
+    elif is_numpy(xp) and np.issubdtype(a.dtype, object):
+        contains_nan = False
+        for el in a.ravel():
+            # isnan doesn't work on non-numeric elements
+            if np.issubdtype(type(el), np.number) and np.isnan(el):
+                contains_nan = True
+                break
+    else:
+        # Only `object` and `inexact` arrays can have NaNs
+        contains_nan = False
+
+    if contains_nan and nan_policy == 'raise':
+        raise ValueError("The input contains nan values")
+
+    if not xp_omit_okay and not_numpy and contains_nan and nan_policy=='omit':
+        message = "`nan_policy='omit' is incompatible with non-NumPy arrays."
+        raise ValueError(message)
+
+    return contains_nan, nan_policy
+
+
+def _rename_parameter(old_name, new_name, dep_version=None):
+    """
+    Generate decorator for backward-compatible keyword renaming.
+
+    Apply the decorator generated by `_rename_parameter` to functions with a
+    recently renamed parameter to maintain backward-compatibility.
+
+    After decoration, the function behaves as follows:
+    If only the new parameter is passed into the function, behave as usual.
+    If only the old parameter is passed into the function (as a keyword), raise
+    a DeprecationWarning if `dep_version` is provided, and behave as usual
+    otherwise.
+    If both old and new parameters are passed into the function, raise a
+    DeprecationWarning if `dep_version` is provided, and raise the appropriate
+    TypeError (function got multiple values for argument).
+
+    Parameters
+    ----------
+    old_name : str
+        Old name of parameter
+    new_name : str
+        New name of parameter
+    dep_version : str, optional
+        Version of SciPy in which old parameter was deprecated in the format
+        'X.Y.Z'. If supplied, the deprecation message will indicate that
+        support for the old parameter will be removed in version 'X.Y+2.Z'
+
+    Notes
+    -----
+    Untested with functions that accept *args. Probably won't work as written.
+
+    """
+    def decorator(fun):
+        @functools.wraps(fun)
+        def wrapper(*args, **kwargs):
+            if old_name in kwargs:
+                if dep_version:
+                    end_version = dep_version.split('.')
+                    end_version[1] = str(int(end_version[1]) + 2)
+                    end_version = '.'.join(end_version)
+                    message = (f"Use of keyword argument `{old_name}` is "
+                               f"deprecated and replaced by `{new_name}`.  "
+                               f"Support for `{old_name}` will be removed "
+                               f"in SciPy {end_version}.")
+                    warnings.warn(message, DeprecationWarning, stacklevel=2)
+                if new_name in kwargs:
+                    message = (f"{fun.__name__}() got multiple values for "
+                               f"argument now known as `{new_name}`")
+                    raise TypeError(message)
+                kwargs[new_name] = kwargs.pop(old_name)
+            return fun(*args, **kwargs)
+        return wrapper
+    return decorator
+
+
+def _rng_spawn(rng, n_children):
+    # spawns independent RNGs from a parent RNG
+    bg = rng._bit_generator
+    ss = bg._seed_seq
+    child_rngs = [np.random.Generator(type(bg)(child_ss))
+                  for child_ss in ss.spawn(n_children)]
+    return child_rngs
+
+
+def _get_nan(*data, xp=None):
+    xp = array_namespace(*data) if xp is None else xp
+    # Get NaN of appropriate dtype for data
+    data = [xp.asarray(item) for item in data]
+    try:
+        min_float = getattr(xp, 'float16', xp.float32)
+        dtype = xp.result_type(*data, min_float)  # must be at least a float
+    except DTypePromotionError:
+        # fallback to float64
+        dtype = xp.float64
+    return xp.asarray(xp.nan, dtype=dtype)[()]
+
+
+def normalize_axis_index(axis, ndim):
+    # Check if `axis` is in the correct range and normalize it
+    if axis < -ndim or axis >= ndim:
+        msg = f"axis {axis} is out of bounds for array of dimension {ndim}"
+        raise AxisError(msg)
+
+    if axis < 0:
+        axis = axis + ndim
+    return axis
+
+
+def _call_callback_maybe_halt(callback, res):
+    """Call wrapped callback; return True if algorithm should stop.
+
+    Parameters
+    ----------
+    callback : callable or None
+        A user-provided callback wrapped with `_wrap_callback`
+    res : OptimizeResult
+        Information about the current iterate
+
+    Returns
+    -------
+    halt : bool
+        True if minimization should stop
+
+    """
+    if callback is None:
+        return False
+    try:
+        callback(res)
+        return False
+    except StopIteration:
+        callback.stop_iteration = True
+        return True
+
+
+class _RichResult(dict):
+    """ Container for multiple outputs with pretty-printing """
+    def __getattr__(self, name):
+        try:
+            return self[name]
+        except KeyError as e:
+            raise AttributeError(name) from e
+
+    __setattr__ = dict.__setitem__  # type: ignore[assignment]
+    __delattr__ = dict.__delitem__  # type: ignore[assignment]
+
+    def __repr__(self):
+        order_keys = ['message', 'success', 'status', 'fun', 'funl', 'x', 'xl',
+                      'col_ind', 'nit', 'lower', 'upper', 'eqlin', 'ineqlin',
+                      'converged', 'flag', 'function_calls', 'iterations',
+                      'root']
+        order_keys = getattr(self, '_order_keys', order_keys)
+        # 'slack', 'con' are redundant with residuals
+        # 'crossover_nit' is probably not interesting to most users
+        omit_keys = {'slack', 'con', 'crossover_nit', '_order_keys'}
+
+        def key(item):
+            try:
+                return order_keys.index(item[0].lower())
+            except ValueError:  # item not in list
+                return np.inf
+
+        def omit_redundant(items):
+            for item in items:
+                if item[0] in omit_keys:
+                    continue
+                yield item
+
+        def item_sorter(d):
+            return sorted(omit_redundant(d.items()), key=key)
+
+        if self.keys():
+            return _dict_formatter(self, sorter=item_sorter)
+        else:
+            return self.__class__.__name__ + "()"
+
+    def __dir__(self):
+        return list(self.keys())
+
+
+def _indenter(s, n=0):
+    """
+    Ensures that lines after the first are indented by the specified amount
+    """
+    split = s.split("\n")
+    indent = " "*n
+    return ("\n" + indent).join(split)
+
+
+def _float_formatter_10(x):
+    """
+    Returns a string representation of a float with exactly ten characters
+    """
+    if np.isposinf(x):
+        return "       inf"
+    elif np.isneginf(x):
+        return "      -inf"
+    elif np.isnan(x):
+        return "       nan"
+    return np.format_float_scientific(x, precision=3, pad_left=2, unique=False)
+
+
+def _dict_formatter(d, n=0, mplus=1, sorter=None):
+    """
+    Pretty printer for dictionaries
+
+    `n` keeps track of the starting indentation;
+    lines are indented by this much after a line break.
+    `mplus` is additional left padding applied to keys
+    """
+    if isinstance(d, dict):
+        m = max(map(len, list(d.keys()))) + mplus  # width to print keys
+        s = '\n'.join([k.rjust(m) + ': ' +  # right justified, width m
+                       _indenter(_dict_formatter(v, m+n+2, 0, sorter), m+2)
+                       for k, v in sorter(d)])  # +2 for ': '
+    else:
+        # By default, NumPy arrays print with linewidth=76. `n` is
+        # the indent at which a line begins printing, so it is subtracted
+        # from the default to avoid exceeding 76 characters total.
+        # `edgeitems` is the number of elements to include before and after
+        # ellipses when arrays are not shown in full.
+        # `threshold` is the maximum number of elements for which an
+        # array is shown in full.
+        # These values tend to work well for use with OptimizeResult.
+        with np.printoptions(linewidth=76-n, edgeitems=2, threshold=12,
+                             formatter={'float_kind': _float_formatter_10}):
+            s = str(d)
+    return s
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e1d446097c89cb4e728c7e267b92edcd9a33f6ed
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/_internal.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/_internal.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6bfbd4faf9cd768ec86fee3df6b7ba9d5a0c9d1c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/__pycache__/_internal.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..91ab1c405e1d700e2bab5a87fc70196a34871e7d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__init__.py
@@ -0,0 +1 @@
+from ._helpers import * # noqa: F403
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3361d779b71550c1c5aecdc966d3937c6fa93dd0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_aliases.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_aliases.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5341bc5196dd853142b59bc9a8756a168fc3a02c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_aliases.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_fft.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_fft.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..79a61a189275ce6c16029a1944c4ea1e8564fc23
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_fft.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_helpers.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_helpers.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0507079dc3897879c95dd68553c73c1aea9fc5bc
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_helpers.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_linalg.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_linalg.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cdbbb7842c0a8a1c1984d33d5980d6a505011761
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/__pycache__/_linalg.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_aliases.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_aliases.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a90f44424d81f25e54babb79b09fef7d1b05660
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_aliases.py
@@ -0,0 +1,555 @@
+"""
+These are functions that are just aliases of existing functions in NumPy.
+"""
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    from typing import Optional, Sequence, Tuple, Union
+    from ._typing import ndarray, Device, Dtype
+
+from typing import NamedTuple
+import inspect
+
+from ._helpers import array_namespace, _check_device, device, is_torch_array, is_cupy_namespace
+
+# These functions are modified from the NumPy versions.
+
+# Creation functions add the device keyword (which does nothing for NumPy)
+
+def arange(
+    start: Union[int, float],
+    /,
+    stop: Optional[Union[int, float]] = None,
+    step: Union[int, float] = 1,
+    *,
+    xp,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.arange(start, stop=stop, step=step, dtype=dtype, **kwargs)
+
+def empty(
+    shape: Union[int, Tuple[int, ...]],
+    xp,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.empty(shape, dtype=dtype, **kwargs)
+
+def empty_like(
+    x: ndarray, /, xp, *, dtype: Optional[Dtype] = None, device: Optional[Device] = None,
+    **kwargs
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.empty_like(x, dtype=dtype, **kwargs)
+
+def eye(
+    n_rows: int,
+    n_cols: Optional[int] = None,
+    /,
+    *,
+    xp,
+    k: int = 0,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.eye(n_rows, M=n_cols, k=k, dtype=dtype, **kwargs)
+
+def full(
+    shape: Union[int, Tuple[int, ...]],
+    fill_value: Union[int, float],
+    xp,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.full(shape, fill_value, dtype=dtype, **kwargs)
+
+def full_like(
+    x: ndarray,
+    /,
+    fill_value: Union[int, float],
+    *,
+    xp,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.full_like(x, fill_value, dtype=dtype, **kwargs)
+
+def linspace(
+    start: Union[int, float],
+    stop: Union[int, float],
+    /,
+    num: int,
+    *,
+    xp,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    endpoint: bool = True,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.linspace(start, stop, num, dtype=dtype, endpoint=endpoint, **kwargs)
+
+def ones(
+    shape: Union[int, Tuple[int, ...]],
+    xp,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.ones(shape, dtype=dtype, **kwargs)
+
+def ones_like(
+    x: ndarray, /, xp, *, dtype: Optional[Dtype] = None, device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.ones_like(x, dtype=dtype, **kwargs)
+
+def zeros(
+    shape: Union[int, Tuple[int, ...]],
+    xp,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.zeros(shape, dtype=dtype, **kwargs)
+
+def zeros_like(
+    x: ndarray, /, xp, *, dtype: Optional[Dtype] = None, device: Optional[Device] = None,
+    **kwargs,
+) -> ndarray:
+    _check_device(xp, device)
+    return xp.zeros_like(x, dtype=dtype, **kwargs)
+
+# np.unique() is split into four functions in the array API:
+# unique_all, unique_counts, unique_inverse, and unique_values (this is done
+# to remove polymorphic return types).
+
+# The functions here return namedtuples (np.unique() returns a normal
+# tuple).
+
+# Note that these named tuples aren't actually part of the standard namespace,
+# but I don't see any issue with exporting the names here regardless.
+class UniqueAllResult(NamedTuple):
+    values: ndarray
+    indices: ndarray
+    inverse_indices: ndarray
+    counts: ndarray
+
+
+class UniqueCountsResult(NamedTuple):
+    values: ndarray
+    counts: ndarray
+
+
+class UniqueInverseResult(NamedTuple):
+    values: ndarray
+    inverse_indices: ndarray
+
+
+def _unique_kwargs(xp):
+    # Older versions of NumPy and CuPy do not have equal_nan. Rather than
+    # trying to parse version numbers, just check if equal_nan is in the
+    # signature.
+    s = inspect.signature(xp.unique)
+    if 'equal_nan' in s.parameters:
+        return {'equal_nan': False}
+    return {}
+
+def unique_all(x: ndarray, /, xp) -> UniqueAllResult:
+    kwargs = _unique_kwargs(xp)
+    values, indices, inverse_indices, counts = xp.unique(
+        x,
+        return_counts=True,
+        return_index=True,
+        return_inverse=True,
+        **kwargs,
+    )
+    # np.unique() flattens inverse indices, but they need to share x's shape
+    # See https://github.com/numpy/numpy/issues/20638
+    inverse_indices = inverse_indices.reshape(x.shape)
+    return UniqueAllResult(
+        values,
+        indices,
+        inverse_indices,
+        counts,
+    )
+
+
+def unique_counts(x: ndarray, /, xp) -> UniqueCountsResult:
+    kwargs = _unique_kwargs(xp)
+    res = xp.unique(
+        x,
+        return_counts=True,
+        return_index=False,
+        return_inverse=False,
+        **kwargs
+    )
+
+    return UniqueCountsResult(*res)
+
+
+def unique_inverse(x: ndarray, /, xp) -> UniqueInverseResult:
+    kwargs = _unique_kwargs(xp)
+    values, inverse_indices = xp.unique(
+        x,
+        return_counts=False,
+        return_index=False,
+        return_inverse=True,
+        **kwargs,
+    )
+    # xp.unique() flattens inverse indices, but they need to share x's shape
+    # See https://github.com/numpy/numpy/issues/20638
+    inverse_indices = inverse_indices.reshape(x.shape)
+    return UniqueInverseResult(values, inverse_indices)
+
+
+def unique_values(x: ndarray, /, xp) -> ndarray:
+    kwargs = _unique_kwargs(xp)
+    return xp.unique(
+        x,
+        return_counts=False,
+        return_index=False,
+        return_inverse=False,
+        **kwargs,
+    )
+
+def astype(x: ndarray, dtype: Dtype, /, *, copy: bool = True) -> ndarray:
+    if not copy and dtype == x.dtype:
+        return x
+    return x.astype(dtype=dtype, copy=copy)
+
+# These functions have different keyword argument names
+
+def std(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    axis: Optional[Union[int, Tuple[int, ...]]] = None,
+    correction: Union[int, float] = 0.0, # correction instead of ddof
+    keepdims: bool = False,
+    **kwargs,
+) -> ndarray:
+    return xp.std(x, axis=axis, ddof=correction, keepdims=keepdims, **kwargs)
+
+def var(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    axis: Optional[Union[int, Tuple[int, ...]]] = None,
+    correction: Union[int, float] = 0.0, # correction instead of ddof
+    keepdims: bool = False,
+    **kwargs,
+) -> ndarray:
+    return xp.var(x, axis=axis, ddof=correction, keepdims=keepdims, **kwargs)
+
+# cumulative_sum is renamed from cumsum, and adds the include_initial keyword
+# argument
+
+def cumulative_sum(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    axis: Optional[int] = None,
+    dtype: Optional[Dtype] = None,
+    include_initial: bool = False,
+    **kwargs
+) -> ndarray:
+    wrapped_xp = array_namespace(x)
+
+    # TODO: The standard is not clear about what should happen when x.ndim == 0.
+    if axis is None:
+        if x.ndim > 1:
+            raise ValueError("axis must be specified in cumulative_sum for more than one dimension")
+        axis = 0
+
+    res = xp.cumsum(x, axis=axis, dtype=dtype, **kwargs)
+
+    # np.cumsum does not support include_initial
+    if include_initial:
+        initial_shape = list(x.shape)
+        initial_shape[axis] = 1
+        res = xp.concatenate(
+            [wrapped_xp.zeros(shape=initial_shape, dtype=res.dtype, device=device(res)), res],
+            axis=axis,
+        )
+    return res
+
+# The min and max argument names in clip are different and not optional in numpy, and type
+# promotion behavior is different.
+def clip(
+    x: ndarray,
+    /,
+    min: Optional[Union[int, float, ndarray]] = None,
+    max: Optional[Union[int, float, ndarray]] = None,
+    *,
+    xp,
+    # TODO: np.clip has other ufunc kwargs
+    out: Optional[ndarray] = None,
+) -> ndarray:
+    def _isscalar(a):
+        return isinstance(a, (int, float, type(None)))
+    min_shape = () if _isscalar(min) else min.shape
+    max_shape = () if _isscalar(max) else max.shape
+
+    wrapped_xp = array_namespace(x)
+
+    result_shape = xp.broadcast_shapes(x.shape, min_shape, max_shape)
+
+    # np.clip does type promotion but the array API clip requires that the
+    # output have the same dtype as x. We do this instead of just downcasting
+    # the result of xp.clip() to handle some corner cases better (e.g.,
+    # avoiding uint64 -> float64 promotion).
+
+    # Note: cases where min or max overflow (integer) or round (float) in the
+    # wrong direction when downcasting to x.dtype are unspecified. This code
+    # just does whatever NumPy does when it downcasts in the assignment, but
+    # other behavior could be preferred, especially for integers. For example,
+    # this code produces:
+
+    # >>> clip(asarray(0, dtype=int8), asarray(128, dtype=int16), None)
+    # -128
+
+    # but an answer of 0 might be preferred. See
+    # https://github.com/numpy/numpy/issues/24976 for more discussion on this issue.
+
+
+    # At least handle the case of Python integers correctly (see
+    # https://github.com/numpy/numpy/pull/26892).
+    if type(min) is int and min <= wrapped_xp.iinfo(x.dtype).min:
+        min = None
+    if type(max) is int and max >= wrapped_xp.iinfo(x.dtype).max:
+        max = None
+
+    if out is None:
+        out = wrapped_xp.asarray(xp.broadcast_to(x, result_shape),
+                                 copy=True, device=device(x))
+    if min is not None:
+        if is_torch_array(x) and x.dtype == xp.float64 and _isscalar(min):
+            # Avoid loss of precision due to torch defaulting to float32
+            min = wrapped_xp.asarray(min, dtype=xp.float64)
+        a = xp.broadcast_to(wrapped_xp.asarray(min, device=device(x)), result_shape)
+        ia = (out < a) | xp.isnan(a)
+        # torch requires an explicit cast here
+        out[ia] = wrapped_xp.astype(a[ia], out.dtype)
+    if max is not None:
+        if is_torch_array(x) and x.dtype == xp.float64 and _isscalar(max):
+            max = wrapped_xp.asarray(max, dtype=xp.float64)
+        b = xp.broadcast_to(wrapped_xp.asarray(max, device=device(x)), result_shape)
+        ib = (out > b) | xp.isnan(b)
+        out[ib] = wrapped_xp.astype(b[ib], out.dtype)
+    # Return a scalar for 0-D
+    return out[()]
+
+# Unlike transpose(), the axes argument to permute_dims() is required.
+def permute_dims(x: ndarray, /, axes: Tuple[int, ...], xp) -> ndarray:
+    return xp.transpose(x, axes)
+
+# np.reshape calls the keyword argument 'newshape' instead of 'shape'
+def reshape(x: ndarray,
+            /,
+            shape: Tuple[int, ...],
+            xp, copy: Optional[bool] = None,
+            **kwargs) -> ndarray:
+    if copy is True:
+        x = x.copy()
+    elif copy is False:
+        y = x.view()
+        y.shape = shape
+        return y
+    return xp.reshape(x, shape, **kwargs)
+
+# The descending keyword is new in sort and argsort, and 'kind' replaced with
+# 'stable'
+def argsort(
+    x: ndarray, /, xp, *, axis: int = -1, descending: bool = False, stable: bool = True,
+    **kwargs,
+) -> ndarray:
+    # Note: this keyword argument is different, and the default is different.
+    # We set it in kwargs like this because numpy.sort uses kind='quicksort'
+    # as the default whereas cupy.sort uses kind=None.
+    if stable:
+        kwargs['kind'] = "stable"
+    if not descending:
+        res = xp.argsort(x, axis=axis, **kwargs)
+    else:
+        # As NumPy has no native descending sort, we imitate it here. Note that
+        # simply flipping the results of xp.argsort(x, ...) would not
+        # respect the relative order like it would in native descending sorts.
+        res = xp.flip(
+            xp.argsort(xp.flip(x, axis=axis), axis=axis, **kwargs),
+            axis=axis,
+        )
+        # Rely on flip()/argsort() to validate axis
+        normalised_axis = axis if axis >= 0 else x.ndim + axis
+        max_i = x.shape[normalised_axis] - 1
+        res = max_i - res
+    return res
+
+def sort(
+    x: ndarray, /, xp, *, axis: int = -1, descending: bool = False, stable: bool = True,
+    **kwargs,
+) -> ndarray:
+    # Note: this keyword argument is different, and the default is different.
+    # We set it in kwargs like this because numpy.sort uses kind='quicksort'
+    # as the default whereas cupy.sort uses kind=None.
+    if stable:
+        kwargs['kind'] = "stable"
+    res = xp.sort(x, axis=axis, **kwargs)
+    if descending:
+        res = xp.flip(res, axis=axis)
+    return res
+
+# nonzero should error for zero-dimensional arrays
+def nonzero(x: ndarray, /, xp, **kwargs) -> Tuple[ndarray, ...]:
+    if x.ndim == 0:
+        raise ValueError("nonzero() does not support zero-dimensional arrays")
+    return xp.nonzero(x, **kwargs)
+
+# ceil, floor, and trunc return integers for integer inputs
+
+def ceil(x: ndarray, /, xp, **kwargs) -> ndarray:
+    if xp.issubdtype(x.dtype, xp.integer):
+        return x
+    return xp.ceil(x, **kwargs)
+
+def floor(x: ndarray, /, xp, **kwargs) -> ndarray:
+    if xp.issubdtype(x.dtype, xp.integer):
+        return x
+    return xp.floor(x, **kwargs)
+
+def trunc(x: ndarray, /, xp, **kwargs) -> ndarray:
+    if xp.issubdtype(x.dtype, xp.integer):
+        return x
+    return xp.trunc(x, **kwargs)
+
+# linear algebra functions
+
+def matmul(x1: ndarray, x2: ndarray, /, xp, **kwargs) -> ndarray:
+    return xp.matmul(x1, x2, **kwargs)
+
+# Unlike transpose, matrix_transpose only transposes the last two axes.
+def matrix_transpose(x: ndarray, /, xp) -> ndarray:
+    if x.ndim < 2:
+        raise ValueError("x must be at least 2-dimensional for matrix_transpose")
+    return xp.swapaxes(x, -1, -2)
+
+def tensordot(x1: ndarray,
+              x2: ndarray,
+              /,
+              xp,
+              *,
+              axes: Union[int, Tuple[Sequence[int], Sequence[int]]] = 2,
+              **kwargs,
+) -> ndarray:
+    return xp.tensordot(x1, x2, axes=axes, **kwargs)
+
+def vecdot(x1: ndarray, x2: ndarray, /, xp, *, axis: int = -1) -> ndarray:
+    if x1.shape[axis] != x2.shape[axis]:
+        raise ValueError("x1 and x2 must have the same size along the given axis")
+
+    if hasattr(xp, 'broadcast_tensors'):
+        _broadcast = xp.broadcast_tensors
+    else:
+        _broadcast = xp.broadcast_arrays
+
+    x1_ = xp.moveaxis(x1, axis, -1)
+    x2_ = xp.moveaxis(x2, axis, -1)
+    x1_, x2_ = _broadcast(x1_, x2_)
+
+    res = x1_[..., None, :] @ x2_[..., None]
+    return res[..., 0, 0]
+
+# isdtype is a new function in the 2022.12 array API specification.
+
+def isdtype(
+    dtype: Dtype, kind: Union[Dtype, str, Tuple[Union[Dtype, str], ...]], xp,
+    *, _tuple=True, # Disallow nested tuples
+) -> bool:
+    """
+    Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``.
+
+    Note that outside of this function, this compat library does not yet fully
+    support complex numbers.
+
+    See
+    https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html
+    for more details
+    """
+    if isinstance(kind, tuple) and _tuple:
+        return any(isdtype(dtype, k, xp, _tuple=False) for k in kind)
+    elif isinstance(kind, str):
+        if kind == 'bool':
+            return dtype == xp.bool_
+        elif kind == 'signed integer':
+            return xp.issubdtype(dtype, xp.signedinteger)
+        elif kind == 'unsigned integer':
+            return xp.issubdtype(dtype, xp.unsignedinteger)
+        elif kind == 'integral':
+            return xp.issubdtype(dtype, xp.integer)
+        elif kind == 'real floating':
+            return xp.issubdtype(dtype, xp.floating)
+        elif kind == 'complex floating':
+            return xp.issubdtype(dtype, xp.complexfloating)
+        elif kind == 'numeric':
+            return xp.issubdtype(dtype, xp.number)
+        else:
+            raise ValueError(f"Unrecognized data type kind: {kind!r}")
+    else:
+        # This will allow things that aren't required by the spec, like
+        # isdtype(np.float64, float) or isdtype(np.int64, 'l'). Should we be
+        # more strict here to match the type annotation? Note that the
+        # array_api_strict implementation will be very strict.
+        return dtype == kind
+
+# unstack is a new function in the 2023.12 array API standard
+def unstack(x: ndarray, /, xp, *, axis: int = 0) -> Tuple[ndarray, ...]:
+    if x.ndim == 0:
+        raise ValueError("Input array must be at least 1-d.")
+    return tuple(xp.moveaxis(x, axis, 0))
+
+# numpy 1.26 does not use the standard definition for sign on complex numbers
+
+def sign(x: ndarray, /, xp, **kwargs) -> ndarray:
+    if isdtype(x.dtype, 'complex floating', xp=xp):
+        out = (x/xp.abs(x, **kwargs))[...]
+        # sign(0) = 0 but the above formula would give nan
+        out[x == 0+0j] = 0+0j
+    else:
+        out = xp.sign(x, **kwargs)
+    # CuPy sign() does not propagate nans. See
+    # https://github.com/data-apis/array-api-compat/issues/136
+    if is_cupy_namespace(xp) and isdtype(x.dtype, 'real floating', xp=xp):
+        out[xp.isnan(x)] = xp.nan
+    return out[()]
+
+__all__ = ['arange', 'empty', 'empty_like', 'eye', 'full', 'full_like',
+           'linspace', 'ones', 'ones_like', 'zeros', 'zeros_like',
+           'UniqueAllResult', 'UniqueCountsResult', 'UniqueInverseResult',
+           'unique_all', 'unique_counts', 'unique_inverse', 'unique_values',
+           'astype', 'std', 'var', 'cumulative_sum', 'clip', 'permute_dims',
+           'reshape', 'argsort', 'sort', 'nonzero', 'ceil', 'floor', 'trunc',
+           'matmul', 'matrix_transpose', 'tensordot', 'vecdot', 'isdtype',
+           'unstack', 'sign']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_fft.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_fft.py
new file mode 100644
index 0000000000000000000000000000000000000000..666b0b1f84211052ac23be8a2a3009457b3b19d2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_fft.py
@@ -0,0 +1,183 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Union, Optional, Literal
+
+if TYPE_CHECKING:
+    from ._typing import Device, ndarray
+    from collections.abc import Sequence
+
+# Note: NumPy fft functions improperly upcast float32 and complex64 to
+# complex128, which is why we require wrapping them all here.
+
+def fft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.fft(x, n=n, axis=axis, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.complex64)
+    return res
+
+def ifft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.ifft(x, n=n, axis=axis, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.complex64)
+    return res
+
+def fftn(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.fftn(x, s=s, axes=axes, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.complex64)
+    return res
+
+def ifftn(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.ifftn(x, s=s, axes=axes, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.complex64)
+    return res
+
+def rfft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.rfft(x, n=n, axis=axis, norm=norm)
+    if x.dtype == xp.float32:
+        return res.astype(xp.complex64)
+    return res
+
+def irfft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.irfft(x, n=n, axis=axis, norm=norm)
+    if x.dtype == xp.complex64:
+        return res.astype(xp.float32)
+    return res
+
+def rfftn(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.rfftn(x, s=s, axes=axes, norm=norm)
+    if x.dtype == xp.float32:
+        return res.astype(xp.complex64)
+    return res
+
+def irfftn(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.irfftn(x, s=s, axes=axes, norm=norm)
+    if x.dtype == xp.complex64:
+        return res.astype(xp.float32)
+    return res
+
+def hfft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.hfft(x, n=n, axis=axis, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.float32)
+    return res
+
+def ihfft(
+    x: ndarray,
+    /,
+    xp,
+    *,
+    n: Optional[int] = None,
+    axis: int = -1,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+) -> ndarray:
+    res = xp.fft.ihfft(x, n=n, axis=axis, norm=norm)
+    if x.dtype in [xp.float32, xp.complex64]:
+        return res.astype(xp.complex64)
+    return res
+
+def fftfreq(n: int, /, xp, *, d: float = 1.0, device: Optional[Device] = None) -> ndarray:
+    if device not in ["cpu", None]:
+        raise ValueError(f"Unsupported device {device!r}")
+    return xp.fft.fftfreq(n, d=d)
+
+def rfftfreq(n: int, /, xp, *, d: float = 1.0, device: Optional[Device] = None) -> ndarray:
+    if device not in ["cpu", None]:
+        raise ValueError(f"Unsupported device {device!r}")
+    return xp.fft.rfftfreq(n, d=d)
+
+def fftshift(x: ndarray, /, xp, *, axes: Union[int, Sequence[int]] = None) -> ndarray:
+    return xp.fft.fftshift(x, axes=axes)
+
+def ifftshift(x: ndarray, /, xp, *, axes: Union[int, Sequence[int]] = None) -> ndarray:
+    return xp.fft.ifftshift(x, axes=axes)
+
+__all__ = [
+    "fft",
+    "ifft",
+    "fftn",
+    "ifftn",
+    "rfft",
+    "irfft",
+    "rfftn",
+    "irfftn",
+    "hfft",
+    "ihfft",
+    "fftfreq",
+    "rfftfreq",
+    "fftshift",
+    "ifftshift",
+]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_linalg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..bfa1f1b937fddc5c2f95ef3a22850403ffd4b955
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_linalg.py
@@ -0,0 +1,156 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, NamedTuple
+if TYPE_CHECKING:
+    from typing import Literal, Optional, Tuple, Union
+    from ._typing import ndarray
+
+import math
+
+import numpy as np
+if np.__version__[0] == "2":
+    from numpy.lib.array_utils import normalize_axis_tuple
+else:
+    from numpy.core.numeric import normalize_axis_tuple
+
+from ._aliases import matmul, matrix_transpose, tensordot, vecdot, isdtype
+from .._internal import get_xp
+
+# These are in the main NumPy namespace but not in numpy.linalg
+def cross(x1: ndarray, x2: ndarray, /, xp, *, axis: int = -1, **kwargs) -> ndarray:
+    return xp.cross(x1, x2, axis=axis, **kwargs)
+
+def outer(x1: ndarray, x2: ndarray, /, xp, **kwargs) -> ndarray:
+    return xp.outer(x1, x2, **kwargs)
+
+class EighResult(NamedTuple):
+    eigenvalues: ndarray
+    eigenvectors: ndarray
+
+class QRResult(NamedTuple):
+    Q: ndarray
+    R: ndarray
+
+class SlogdetResult(NamedTuple):
+    sign: ndarray
+    logabsdet: ndarray
+
+class SVDResult(NamedTuple):
+    U: ndarray
+    S: ndarray
+    Vh: ndarray
+
+# These functions are the same as their NumPy counterparts except they return
+# a namedtuple.
+def eigh(x: ndarray, /, xp, **kwargs) -> EighResult:
+    return EighResult(*xp.linalg.eigh(x, **kwargs))
+
+def qr(x: ndarray, /, xp, *, mode: Literal['reduced', 'complete'] = 'reduced',
+       **kwargs) -> QRResult:
+    return QRResult(*xp.linalg.qr(x, mode=mode, **kwargs))
+
+def slogdet(x: ndarray, /, xp, **kwargs) -> SlogdetResult:
+    return SlogdetResult(*xp.linalg.slogdet(x, **kwargs))
+
+def svd(x: ndarray, /, xp, *, full_matrices: bool = True, **kwargs) -> SVDResult:
+    return SVDResult(*xp.linalg.svd(x, full_matrices=full_matrices, **kwargs))
+
+# These functions have additional keyword arguments
+
+# The upper keyword argument is new from NumPy
+def cholesky(x: ndarray, /, xp, *, upper: bool = False, **kwargs) -> ndarray:
+    L = xp.linalg.cholesky(x, **kwargs)
+    if upper:
+        U = get_xp(xp)(matrix_transpose)(L)
+        if get_xp(xp)(isdtype)(U.dtype, 'complex floating'):
+            U = xp.conj(U)
+        return U
+    return L
+
+# The rtol keyword argument of matrix_rank() and pinv() is new from NumPy.
+# Note that it has a different semantic meaning from tol and rcond.
+def matrix_rank(x: ndarray,
+                /,
+                xp,
+                *,
+                rtol: Optional[Union[float, ndarray]] = None,
+                **kwargs) -> ndarray:
+    # this is different from xp.linalg.matrix_rank, which supports 1
+    # dimensional arrays.
+    if x.ndim < 2:
+        raise xp.linalg.LinAlgError("1-dimensional array given. Array must be at least two-dimensional")
+    S = get_xp(xp)(svdvals)(x, **kwargs)
+    if rtol is None:
+        tol = S.max(axis=-1, keepdims=True) * max(x.shape[-2:]) * xp.finfo(S.dtype).eps
+    else:
+        # this is different from xp.linalg.matrix_rank, which does not
+        # multiply the tolerance by the largest singular value.
+        tol = S.max(axis=-1, keepdims=True)*xp.asarray(rtol)[..., xp.newaxis]
+    return xp.count_nonzero(S > tol, axis=-1)
+
+def pinv(x: ndarray, /, xp, *, rtol: Optional[Union[float, ndarray]] = None, **kwargs) -> ndarray:
+    # this is different from xp.linalg.pinv, which does not multiply the
+    # default tolerance by max(M, N).
+    if rtol is None:
+        rtol = max(x.shape[-2:]) * xp.finfo(x.dtype).eps
+    return xp.linalg.pinv(x, rcond=rtol, **kwargs)
+
+# These functions are new in the array API spec
+
+def matrix_norm(x: ndarray, /, xp, *, keepdims: bool = False, ord: Optional[Union[int, float, Literal['fro', 'nuc']]] = 'fro') -> ndarray:
+    return xp.linalg.norm(x, axis=(-2, -1), keepdims=keepdims, ord=ord)
+
+# svdvals is not in NumPy (but it is in SciPy). It is equivalent to
+# xp.linalg.svd(compute_uv=False).
+def svdvals(x: ndarray, /, xp) -> Union[ndarray, Tuple[ndarray, ...]]:
+    return xp.linalg.svd(x, compute_uv=False)
+
+def vector_norm(x: ndarray, /, xp, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keepdims: bool = False, ord: Optional[Union[int, float]] = 2) -> ndarray:
+    # xp.linalg.norm tries to do a matrix norm whenever axis is a 2-tuple or
+    # when axis=None and the input is 2-D, so to force a vector norm, we make
+    # it so the input is 1-D (for axis=None), or reshape so that norm is done
+    # on a single dimension.
+    if axis is None:
+        # Note: xp.linalg.norm() doesn't handle 0-D arrays
+        _x = x.ravel()
+        _axis = 0
+    elif isinstance(axis, tuple):
+        # Note: The axis argument supports any number of axes, whereas
+        # xp.linalg.norm() only supports a single axis for vector norm.
+        normalized_axis = normalize_axis_tuple(axis, x.ndim)
+        rest = tuple(i for i in range(x.ndim) if i not in normalized_axis)
+        newshape = axis + rest
+        _x = xp.transpose(x, newshape).reshape(
+            (math.prod([x.shape[i] for i in axis]), *[x.shape[i] for i in rest]))
+        _axis = 0
+    else:
+        _x = x
+        _axis = axis
+
+    res = xp.linalg.norm(_x, axis=_axis, ord=ord)
+
+    if keepdims:
+        # We can't reuse xp.linalg.norm(keepdims) because of the reshape hacks
+        # above to avoid matrix norm logic.
+        shape = list(x.shape)
+        _axis = normalize_axis_tuple(range(x.ndim) if axis is None else axis, x.ndim)
+        for i in _axis:
+            shape[i] = 1
+        res = xp.reshape(res, tuple(shape))
+
+    return res
+
+# xp.diagonal and xp.trace operate on the first two axes whereas these
+# operates on the last two
+
+def diagonal(x: ndarray, /, xp, *, offset: int = 0, **kwargs) -> ndarray:
+    return xp.diagonal(x, offset=offset, axis1=-2, axis2=-1, **kwargs)
+
+def trace(x: ndarray, /, xp, *, offset: int = 0, dtype=None, **kwargs) -> ndarray:
+    return xp.asarray(xp.trace(x, offset=offset, dtype=dtype, axis1=-2, axis2=-1, **kwargs))
+
+__all__ = ['cross', 'matmul', 'outer', 'tensordot', 'EighResult',
+           'QRResult', 'SlogdetResult', 'SVDResult', 'eigh', 'qr', 'slogdet',
+           'svd', 'cholesky', 'matrix_rank', 'pinv', 'matrix_norm',
+           'matrix_transpose', 'svdvals', 'vecdot', 'vector_norm', 'diagonal',
+           'trace']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_typing.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_typing.py
new file mode 100644
index 0000000000000000000000000000000000000000..07f3850d21fade94814f9fe1e638286c72a1c552
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/common/_typing.py
@@ -0,0 +1,23 @@
+from __future__ import annotations
+
+__all__ = [
+    "NestedSequence",
+    "SupportsBufferProtocol",
+]
+
+from typing import (
+    Any,
+    TypeVar,
+    Protocol,
+)
+
+_T_co = TypeVar("_T_co", covariant=True)
+
+class NestedSequence(Protocol[_T_co]):
+    def __getitem__(self, key: int, /) -> _T_co | NestedSequence[_T_co]: ...
+    def __len__(self, /) -> int: ...
+
+SupportsBufferProtocol = Any
+
+Array = Any
+Device = Any
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_aliases.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_aliases.py
new file mode 100644
index 0000000000000000000000000000000000000000..3627fb6b97820c292c86d26b9aabcefd899cfed1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_aliases.py
@@ -0,0 +1,136 @@
+from __future__ import annotations
+
+import cupy as cp
+
+from ..common import _aliases
+from .._internal import get_xp
+
+from ._info import __array_namespace_info__
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    from typing import Optional, Union
+    from ._typing import ndarray, Device, Dtype, NestedSequence, SupportsBufferProtocol
+
+bool = cp.bool_
+
+# Basic renames
+acos = cp.arccos
+acosh = cp.arccosh
+asin = cp.arcsin
+asinh = cp.arcsinh
+atan = cp.arctan
+atan2 = cp.arctan2
+atanh = cp.arctanh
+bitwise_left_shift = cp.left_shift
+bitwise_invert = cp.invert
+bitwise_right_shift = cp.right_shift
+concat = cp.concatenate
+pow = cp.power
+
+arange = get_xp(cp)(_aliases.arange)
+empty = get_xp(cp)(_aliases.empty)
+empty_like = get_xp(cp)(_aliases.empty_like)
+eye = get_xp(cp)(_aliases.eye)
+full = get_xp(cp)(_aliases.full)
+full_like = get_xp(cp)(_aliases.full_like)
+linspace = get_xp(cp)(_aliases.linspace)
+ones = get_xp(cp)(_aliases.ones)
+ones_like = get_xp(cp)(_aliases.ones_like)
+zeros = get_xp(cp)(_aliases.zeros)
+zeros_like = get_xp(cp)(_aliases.zeros_like)
+UniqueAllResult = get_xp(cp)(_aliases.UniqueAllResult)
+UniqueCountsResult = get_xp(cp)(_aliases.UniqueCountsResult)
+UniqueInverseResult = get_xp(cp)(_aliases.UniqueInverseResult)
+unique_all = get_xp(cp)(_aliases.unique_all)
+unique_counts = get_xp(cp)(_aliases.unique_counts)
+unique_inverse = get_xp(cp)(_aliases.unique_inverse)
+unique_values = get_xp(cp)(_aliases.unique_values)
+astype = _aliases.astype
+std = get_xp(cp)(_aliases.std)
+var = get_xp(cp)(_aliases.var)
+cumulative_sum = get_xp(cp)(_aliases.cumulative_sum)
+clip = get_xp(cp)(_aliases.clip)
+permute_dims = get_xp(cp)(_aliases.permute_dims)
+reshape = get_xp(cp)(_aliases.reshape)
+argsort = get_xp(cp)(_aliases.argsort)
+sort = get_xp(cp)(_aliases.sort)
+nonzero = get_xp(cp)(_aliases.nonzero)
+ceil = get_xp(cp)(_aliases.ceil)
+floor = get_xp(cp)(_aliases.floor)
+trunc = get_xp(cp)(_aliases.trunc)
+matmul = get_xp(cp)(_aliases.matmul)
+matrix_transpose = get_xp(cp)(_aliases.matrix_transpose)
+tensordot = get_xp(cp)(_aliases.tensordot)
+sign = get_xp(cp)(_aliases.sign)
+
+_copy_default = object()
+
+# asarray also adds the copy keyword, which is not present in numpy 1.0.
+def asarray(
+    obj: Union[
+        ndarray,
+        bool,
+        int,
+        float,
+        NestedSequence[bool | int | float],
+        SupportsBufferProtocol,
+    ],
+    /,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    copy: Optional[bool] = _copy_default,
+    **kwargs,
+) -> ndarray:
+    """
+    Array API compatibility wrapper for asarray().
+
+    See the corresponding documentation in the array library and/or the array API
+    specification for more details.
+    """
+    with cp.cuda.Device(device):
+        # cupy is like NumPy 1.26 (except without _CopyMode). See the comments
+        # in asarray in numpy/_aliases.py.
+        if copy is not _copy_default:
+            # A future version of CuPy will change the meaning of copy=False
+            # to mean no-copy. We don't know for certain what version it will
+            # be yet, so to avoid breaking that version, we use a different
+            # default value for copy so asarray(obj) with no copy kwarg will
+            # always do the copy-if-needed behavior.
+
+            # This will still need to be updated to remove the
+            # NotImplementedError for copy=False, but at least this won't
+            # break the default or existing behavior.
+            if copy is None:
+                copy = False
+            elif copy is False:
+                raise NotImplementedError("asarray(copy=False) is not yet supported in cupy")
+            kwargs['copy'] = copy
+
+        return cp.array(obj, dtype=dtype, **kwargs)
+
+# These functions are completely new here. If the library already has them
+# (i.e., numpy 2.0), use the library version instead of our wrapper.
+if hasattr(cp, 'vecdot'):
+    vecdot = cp.vecdot
+else:
+    vecdot = get_xp(cp)(_aliases.vecdot)
+
+if hasattr(cp, 'isdtype'):
+    isdtype = cp.isdtype
+else:
+    isdtype = get_xp(cp)(_aliases.isdtype)
+
+if hasattr(cp, 'unstack'):
+    unstack = cp.unstack
+else:
+    unstack = get_xp(cp)(_aliases.unstack)
+
+__all__ = _aliases.__all__ + ['__array_namespace_info__', 'asarray', 'bool',
+                              'acos', 'acosh', 'asin', 'asinh', 'atan',
+                              'atan2', 'atanh', 'bitwise_left_shift',
+                              'bitwise_invert', 'bitwise_right_shift',
+                              'concat', 'pow', 'sign']
+
+_all_ignore = ['cp', 'get_xp']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_info.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_info.py
new file mode 100644
index 0000000000000000000000000000000000000000..4440807d2240fb4125229b68a4af8b562b636753
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/_info.py
@@ -0,0 +1,326 @@
+"""
+Array API Inspection namespace
+
+This is the namespace for inspection functions as defined by the array API
+standard. See
+https://data-apis.org/array-api/latest/API_specification/inspection.html for
+more details.
+
+"""
+from cupy import (
+    dtype,
+    cuda,
+    bool_ as bool,
+    intp,
+    int8,
+    int16,
+    int32,
+    int64,
+    uint8,
+    uint16,
+    uint32,
+    uint64,
+    float32,
+    float64,
+    complex64,
+    complex128,
+)
+
+class __array_namespace_info__:
+    """
+    Get the array API inspection namespace for CuPy.
+
+    The array API inspection namespace defines the following functions:
+
+    - capabilities()
+    - default_device()
+    - default_dtypes()
+    - dtypes()
+    - devices()
+
+    See
+    https://data-apis.org/array-api/latest/API_specification/inspection.html
+    for more details.
+
+    Returns
+    -------
+    info : ModuleType
+        The array API inspection namespace for CuPy.
+
+    Examples
+    --------
+    >>> info = np.__array_namespace_info__()
+    >>> info.default_dtypes()
+    {'real floating': cupy.float64,
+     'complex floating': cupy.complex128,
+     'integral': cupy.int64,
+     'indexing': cupy.int64}
+
+    """
+
+    __module__ = 'cupy'
+
+    def capabilities(self):
+        """
+        Return a dictionary of array API library capabilities.
+
+        The resulting dictionary has the following keys:
+
+        - **"boolean indexing"**: boolean indicating whether an array library
+          supports boolean indexing. Always ``True`` for CuPy.
+
+        - **"data-dependent shapes"**: boolean indicating whether an array
+          library supports data-dependent output shapes. Always ``True`` for
+          CuPy.
+
+        See
+        https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html
+        for more details.
+
+        See Also
+        --------
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        capabilities : dict
+            A dictionary of array API library capabilities.
+
+        Examples
+        --------
+        >>> info = xp.__array_namespace_info__()
+        >>> info.capabilities()
+        {'boolean indexing': True,
+         'data-dependent shapes': True}
+
+        """
+        return {
+            "boolean indexing": True,
+            "data-dependent shapes": True,
+            # 'max rank' will be part of the 2024.12 standard
+            # "max rank": 64,
+        }
+
+    def default_device(self):
+        """
+        The default device used for new CuPy arrays.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        device : str
+            The default device used for new CuPy arrays.
+
+        Examples
+        --------
+        >>> info = xp.__array_namespace_info__()
+        >>> info.default_device()
+        Device(0)
+
+        """
+        return cuda.Device(0)
+
+    def default_dtypes(self, *, device=None):
+        """
+        The default data types used for new CuPy arrays.
+
+        For CuPy, this always returns the following dictionary:
+
+        - **"real floating"**: ``cupy.float64``
+        - **"complex floating"**: ``cupy.complex128``
+        - **"integral"**: ``cupy.intp``
+        - **"indexing"**: ``cupy.intp``
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the default data types for.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary describing the default data types used for new CuPy
+            arrays.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = xp.__array_namespace_info__()
+        >>> info.default_dtypes()
+        {'real floating': cupy.float64,
+         'complex floating': cupy.complex128,
+         'integral': cupy.int64,
+         'indexing': cupy.int64}
+
+        """
+        # TODO: Does this depend on device?
+        return {
+            "real floating": dtype(float64),
+            "complex floating": dtype(complex128),
+            "integral": dtype(intp),
+            "indexing": dtype(intp),
+        }
+
+    def dtypes(self, *, device=None, kind=None):
+        """
+        The array API data types supported by CuPy.
+
+        Note that this function only returns data types that are defined by
+        the array API.
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the data types for.
+        kind : str or tuple of str, optional
+            The kind of data types to return. If ``None``, all data types are
+            returned. If a string, only data types of that kind are returned.
+            If a tuple, a dictionary containing the union of the given kinds
+            is returned. The following kinds are supported:
+
+            - ``'bool'``: boolean data types (i.e., ``bool``).
+            - ``'signed integer'``: signed integer data types (i.e., ``int8``,
+              ``int16``, ``int32``, ``int64``).
+            - ``'unsigned integer'``: unsigned integer data types (i.e.,
+              ``uint8``, ``uint16``, ``uint32``, ``uint64``).
+            - ``'integral'``: integer data types. Shorthand for ``('signed
+              integer', 'unsigned integer')``.
+            - ``'real floating'``: real-valued floating-point data types
+              (i.e., ``float32``, ``float64``).
+            - ``'complex floating'``: complex floating-point data types (i.e.,
+              ``complex64``, ``complex128``).
+            - ``'numeric'``: numeric data types. Shorthand for ``('integral',
+              'real floating', 'complex floating')``.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary mapping the names of data types to the corresponding
+            CuPy data types.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = xp.__array_namespace_info__()
+        >>> info.dtypes(kind='signed integer')
+        {'int8': cupy.int8,
+         'int16': cupy.int16,
+         'int32': cupy.int32,
+         'int64': cupy.int64}
+
+        """
+        # TODO: Does this depend on device?
+        if kind is None:
+            return {
+                "bool": dtype(bool),
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if kind == "bool":
+            return {"bool": bool}
+        if kind == "signed integer":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+            }
+        if kind == "unsigned integer":
+            return {
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+            }
+        if kind == "integral":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+            }
+        if kind == "real floating":
+            return {
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+            }
+        if kind == "complex floating":
+            return {
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if kind == "numeric":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if isinstance(kind, tuple):
+            res = {}
+            for k in kind:
+                res.update(self.dtypes(kind=k))
+            return res
+        raise ValueError(f"unsupported kind: {kind!r}")
+
+    def devices(self):
+        """
+        The devices supported by CuPy.
+
+        Returns
+        -------
+        devices : list of str
+            The devices supported by CuPy.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes
+
+        """
+        return [cuda.Device(i) for i in range(cuda.runtime.getDeviceCount())]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/fft.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/fft.py
new file mode 100644
index 0000000000000000000000000000000000000000..307e0f7277710693063ef8c4d2cd7893275ad44a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/fft.py
@@ -0,0 +1,36 @@
+from cupy.fft import * # noqa: F403
+# cupy.fft doesn't have __all__. If it is added, replace this with
+#
+# from cupy.fft import __all__ as linalg_all
+_n = {}
+exec('from cupy.fft import *', _n)
+del _n['__builtins__']
+fft_all = list(_n)
+del _n
+
+from ..common import _fft
+from .._internal import get_xp
+
+import cupy as cp
+
+fft = get_xp(cp)(_fft.fft)
+ifft = get_xp(cp)(_fft.ifft)
+fftn = get_xp(cp)(_fft.fftn)
+ifftn = get_xp(cp)(_fft.ifftn)
+rfft = get_xp(cp)(_fft.rfft)
+irfft = get_xp(cp)(_fft.irfft)
+rfftn = get_xp(cp)(_fft.rfftn)
+irfftn = get_xp(cp)(_fft.irfftn)
+hfft = get_xp(cp)(_fft.hfft)
+ihfft = get_xp(cp)(_fft.ihfft)
+fftfreq = get_xp(cp)(_fft.fftfreq)
+rfftfreq = get_xp(cp)(_fft.rfftfreq)
+fftshift = get_xp(cp)(_fft.fftshift)
+ifftshift = get_xp(cp)(_fft.ifftshift)
+
+__all__ = fft_all + _fft.__all__
+
+del get_xp
+del cp
+del fft_all
+del _fft
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/linalg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..7fcdd498e0073ada094a20a9ae423e01cb0f8ceb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/cupy/linalg.py
@@ -0,0 +1,49 @@
+from cupy.linalg import * # noqa: F403
+# cupy.linalg doesn't have __all__. If it is added, replace this with
+#
+# from cupy.linalg import __all__ as linalg_all
+_n = {}
+exec('from cupy.linalg import *', _n)
+del _n['__builtins__']
+linalg_all = list(_n)
+del _n
+
+from ..common import _linalg
+from .._internal import get_xp
+
+import cupy as cp
+
+# These functions are in both the main and linalg namespaces
+from ._aliases import matmul, matrix_transpose, tensordot, vecdot # noqa: F401
+
+cross = get_xp(cp)(_linalg.cross)
+outer = get_xp(cp)(_linalg.outer)
+EighResult = _linalg.EighResult
+QRResult = _linalg.QRResult
+SlogdetResult = _linalg.SlogdetResult
+SVDResult = _linalg.SVDResult
+eigh = get_xp(cp)(_linalg.eigh)
+qr = get_xp(cp)(_linalg.qr)
+slogdet = get_xp(cp)(_linalg.slogdet)
+svd = get_xp(cp)(_linalg.svd)
+cholesky = get_xp(cp)(_linalg.cholesky)
+matrix_rank = get_xp(cp)(_linalg.matrix_rank)
+pinv = get_xp(cp)(_linalg.pinv)
+matrix_norm = get_xp(cp)(_linalg.matrix_norm)
+svdvals = get_xp(cp)(_linalg.svdvals)
+diagonal = get_xp(cp)(_linalg.diagonal)
+trace = get_xp(cp)(_linalg.trace)
+
+# These functions are completely new here. If the library already has them
+# (i.e., numpy 2.0), use the library version instead of our wrapper.
+if hasattr(cp.linalg, 'vector_norm'):
+    vector_norm = cp.linalg.vector_norm
+else:
+    vector_norm = get_xp(cp)(_linalg.vector_norm)
+
+__all__ = linalg_all + _linalg.__all__
+
+del get_xp
+del cp
+del linalg_all
+del _linalg
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..b49be6cf38f1d905c75278fdb857692f11adcdea
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/__init__.py
@@ -0,0 +1,9 @@
+from dask.array import * # noqa: F403
+
+# These imports may overwrite names from the import * above.
+from ._aliases import * # noqa: F403
+
+__array_api_version__ = '2023.12'
+
+__import__(__package__ + '.linalg')
+__import__(__package__ + '.fft')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_aliases.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_aliases.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee2d88c048b29f603e54818319cb7f7163d43b36
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_aliases.py
@@ -0,0 +1,217 @@
+from __future__ import annotations
+
+from ...common import _aliases
+from ...common._helpers import _check_device
+
+from ..._internal import get_xp
+
+from ._info import __array_namespace_info__
+
+import numpy as np
+from numpy import (
+    # Dtypes
+    iinfo,
+    finfo,
+    bool_ as bool,
+    float32,
+    float64,
+    int8,
+    int16,
+    int32,
+    int64,
+    uint8,
+    uint16,
+    uint32,
+    uint64,
+    complex64,
+    complex128,
+    can_cast,
+    result_type,
+)
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    from typing import Optional, Union
+
+    from ...common._typing import Device, Dtype, Array, NestedSequence, SupportsBufferProtocol
+
+import dask.array as da
+
+isdtype = get_xp(np)(_aliases.isdtype)
+unstack = get_xp(da)(_aliases.unstack)
+astype = _aliases.astype
+
+# Common aliases
+
+# This arange func is modified from the common one to
+# not pass stop/step as keyword arguments, which will cause
+# an error with dask
+
+# TODO: delete the xp stuff, it shouldn't be necessary
+def _dask_arange(
+    start: Union[int, float],
+    /,
+    stop: Optional[Union[int, float]] = None,
+    step: Union[int, float] = 1,
+    *,
+    xp,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    **kwargs,
+) -> Array:
+    _check_device(xp, device)
+    args = [start]
+    if stop is not None:
+        args.append(stop)
+    else:
+        # stop is None, so start is actually stop
+        # prepend the default value for start which is 0
+        args.insert(0, 0)
+    args.append(step)
+    return xp.arange(*args, dtype=dtype, **kwargs)
+
+arange = get_xp(da)(_dask_arange)
+eye = get_xp(da)(_aliases.eye)
+
+linspace = get_xp(da)(_aliases.linspace)
+eye = get_xp(da)(_aliases.eye)
+UniqueAllResult = get_xp(da)(_aliases.UniqueAllResult)
+UniqueCountsResult = get_xp(da)(_aliases.UniqueCountsResult)
+UniqueInverseResult = get_xp(da)(_aliases.UniqueInverseResult)
+unique_all = get_xp(da)(_aliases.unique_all)
+unique_counts = get_xp(da)(_aliases.unique_counts)
+unique_inverse = get_xp(da)(_aliases.unique_inverse)
+unique_values = get_xp(da)(_aliases.unique_values)
+permute_dims = get_xp(da)(_aliases.permute_dims)
+std = get_xp(da)(_aliases.std)
+var = get_xp(da)(_aliases.var)
+cumulative_sum = get_xp(da)(_aliases.cumulative_sum)
+empty = get_xp(da)(_aliases.empty)
+empty_like = get_xp(da)(_aliases.empty_like)
+full = get_xp(da)(_aliases.full)
+full_like = get_xp(da)(_aliases.full_like)
+ones = get_xp(da)(_aliases.ones)
+ones_like = get_xp(da)(_aliases.ones_like)
+zeros = get_xp(da)(_aliases.zeros)
+zeros_like = get_xp(da)(_aliases.zeros_like)
+reshape = get_xp(da)(_aliases.reshape)
+matrix_transpose = get_xp(da)(_aliases.matrix_transpose)
+vecdot = get_xp(da)(_aliases.vecdot)
+
+nonzero = get_xp(da)(_aliases.nonzero)
+ceil = get_xp(np)(_aliases.ceil)
+floor = get_xp(np)(_aliases.floor)
+trunc = get_xp(np)(_aliases.trunc)
+matmul = get_xp(np)(_aliases.matmul)
+tensordot = get_xp(np)(_aliases.tensordot)
+sign = get_xp(np)(_aliases.sign)
+
+# asarray also adds the copy keyword, which is not present in numpy 1.0.
+def asarray(
+    obj: Union[
+        Array,
+        bool,
+        int,
+        float,
+        NestedSequence[bool | int | float],
+        SupportsBufferProtocol,
+    ],
+    /,
+    *,
+    dtype: Optional[Dtype] = None,
+    device: Optional[Device] = None,
+    copy: "Optional[Union[bool, np._CopyMode]]" = None,
+    **kwargs,
+) -> Array:
+    """
+    Array API compatibility wrapper for asarray().
+
+    See the corresponding documentation in the array library and/or the array API
+    specification for more details.
+    """
+    if copy is False:
+        # copy=False is not yet implemented in dask
+        raise NotImplementedError("copy=False is not yet implemented")
+    elif copy is True:
+        if isinstance(obj, da.Array) and dtype is None:
+            return obj.copy()
+        # Go through numpy, since dask copy is no-op by default
+        obj = np.array(obj, dtype=dtype, copy=True)
+        return da.array(obj, dtype=dtype)
+    else:
+        if not isinstance(obj, da.Array) or dtype is not None and obj.dtype != dtype:
+            obj = np.asarray(obj, dtype=dtype)
+            return da.from_array(obj)
+        return obj
+
+    return da.asarray(obj, dtype=dtype, **kwargs)
+
+from dask.array import (
+    # Element wise aliases
+    arccos as acos,
+    arccosh as acosh,
+    arcsin as asin,
+    arcsinh as asinh,
+    arctan as atan,
+    arctan2 as atan2,
+    arctanh as atanh,
+    left_shift as bitwise_left_shift,
+    right_shift as bitwise_right_shift,
+    invert as bitwise_invert,
+    power as pow,
+    # Other
+    concatenate as concat,
+)
+
+# dask.array.clip does not work unless all three arguments are provided.
+# Furthermore, the masking workaround in common._aliases.clip cannot work with
+# dask (meaning uint64 promoting to float64 is going to just be unfixed for
+# now).
+@get_xp(da)
+def clip(
+    x: Array,
+    /,
+    min: Optional[Union[int, float, Array]] = None,
+    max: Optional[Union[int, float, Array]] = None,
+    *,
+    xp,
+) -> Array:
+    def _isscalar(a):
+        return isinstance(a, (int, float, type(None)))
+    min_shape = () if _isscalar(min) else min.shape
+    max_shape = () if _isscalar(max) else max.shape
+
+    # TODO: This won't handle dask unknown shapes
+    import numpy as np
+    result_shape = np.broadcast_shapes(x.shape, min_shape, max_shape)
+
+    if min is not None:
+        min = xp.broadcast_to(xp.asarray(min), result_shape)
+    if max is not None:
+        max = xp.broadcast_to(xp.asarray(max), result_shape)
+
+    if min is None and max is None:
+        return xp.positive(x)
+
+    if min is None:
+        return astype(xp.minimum(x, max), x.dtype)
+    if max is None:
+        return astype(xp.maximum(x, min), x.dtype)
+
+    return astype(xp.minimum(xp.maximum(x, min), max), x.dtype)
+
+# exclude these from all since dask.array has no sorting functions
+_da_unsupported = ['sort', 'argsort']
+
+_common_aliases = [alias for alias in _aliases.__all__ if alias not in _da_unsupported]
+
+__all__ = _common_aliases + ['__array_namespace_info__', 'asarray', 'acos',
+                    'acosh', 'asin', 'asinh', 'atan', 'atan2',
+                    'atanh', 'bitwise_left_shift', 'bitwise_invert',
+                    'bitwise_right_shift', 'concat', 'pow', 'iinfo', 'finfo', 'can_cast',
+                    'result_type', 'bool', 'float32', 'float64', 'int8', 'int16', 'int32', 'int64',
+                    'uint8', 'uint16', 'uint32', 'uint64',
+                    'complex64', 'complex128', 'iinfo', 'finfo',
+                    'can_cast', 'result_type']
+
+_all_ignore = ["get_xp", "da", "np"]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_info.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_info.py
new file mode 100644
index 0000000000000000000000000000000000000000..d3b12dc960f5a7a5d5a8dfb3345c0ad1f4d470e7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/_info.py
@@ -0,0 +1,345 @@
+"""
+Array API Inspection namespace
+
+This is the namespace for inspection functions as defined by the array API
+standard. See
+https://data-apis.org/array-api/latest/API_specification/inspection.html for
+more details.
+
+"""
+from numpy import (
+    dtype,
+    bool_ as bool,
+    intp,
+    int8,
+    int16,
+    int32,
+    int64,
+    uint8,
+    uint16,
+    uint32,
+    uint64,
+    float32,
+    float64,
+    complex64,
+    complex128,
+)
+
+from ...common._helpers import _DASK_DEVICE
+
+class __array_namespace_info__:
+    """
+    Get the array API inspection namespace for Dask.
+
+    The array API inspection namespace defines the following functions:
+
+    - capabilities()
+    - default_device()
+    - default_dtypes()
+    - dtypes()
+    - devices()
+
+    See
+    https://data-apis.org/array-api/latest/API_specification/inspection.html
+    for more details.
+
+    Returns
+    -------
+    info : ModuleType
+        The array API inspection namespace for Dask.
+
+    Examples
+    --------
+    >>> info = np.__array_namespace_info__()
+    >>> info.default_dtypes()
+    {'real floating': dask.float64,
+     'complex floating': dask.complex128,
+     'integral': dask.int64,
+     'indexing': dask.int64}
+
+    """
+
+    __module__ = 'dask.array'
+
+    def capabilities(self):
+        """
+        Return a dictionary of array API library capabilities.
+
+        The resulting dictionary has the following keys:
+
+        - **"boolean indexing"**: boolean indicating whether an array library
+          supports boolean indexing. Always ``False`` for Dask.
+
+        - **"data-dependent shapes"**: boolean indicating whether an array
+          library supports data-dependent output shapes. Always ``False`` for
+          Dask.
+
+        See
+        https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html
+        for more details.
+
+        See Also
+        --------
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        capabilities : dict
+            A dictionary of array API library capabilities.
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.capabilities()
+        {'boolean indexing': True,
+         'data-dependent shapes': True}
+
+        """
+        return {
+            "boolean indexing": False,
+            "data-dependent shapes": False,
+            # 'max rank' will be part of the 2024.12 standard
+            # "max rank": 64,
+        }
+
+    def default_device(self):
+        """
+        The default device used for new Dask arrays.
+
+        For Dask, this always returns ``'cpu'``.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        device : str
+            The default device used for new Dask arrays.
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.default_device()
+        'cpu'
+
+        """
+        return "cpu"
+
+    def default_dtypes(self, *, device=None):
+        """
+        The default data types used for new Dask arrays.
+
+        For Dask, this always returns the following dictionary:
+
+        - **"real floating"**: ``numpy.float64``
+        - **"complex floating"**: ``numpy.complex128``
+        - **"integral"**: ``numpy.intp``
+        - **"indexing"**: ``numpy.intp``
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the default data types for.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary describing the default data types used for new Dask
+            arrays.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.default_dtypes()
+        {'real floating': dask.float64,
+         'complex floating': dask.complex128,
+         'integral': dask.int64,
+         'indexing': dask.int64}
+
+        """
+        if device not in ["cpu", _DASK_DEVICE, None]:
+            raise ValueError(
+                'Device not understood. Only "cpu" or _DASK_DEVICE is allowed, but received:'
+                f' {device}'
+            )
+        return {
+            "real floating": dtype(float64),
+            "complex floating": dtype(complex128),
+            "integral": dtype(intp),
+            "indexing": dtype(intp),
+        }
+
+    def dtypes(self, *, device=None, kind=None):
+        """
+        The array API data types supported by Dask.
+
+        Note that this function only returns data types that are defined by
+        the array API.
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the data types for.
+        kind : str or tuple of str, optional
+            The kind of data types to return. If ``None``, all data types are
+            returned. If a string, only data types of that kind are returned.
+            If a tuple, a dictionary containing the union of the given kinds
+            is returned. The following kinds are supported:
+
+            - ``'bool'``: boolean data types (i.e., ``bool``).
+            - ``'signed integer'``: signed integer data types (i.e., ``int8``,
+              ``int16``, ``int32``, ``int64``).
+            - ``'unsigned integer'``: unsigned integer data types (i.e.,
+              ``uint8``, ``uint16``, ``uint32``, ``uint64``).
+            - ``'integral'``: integer data types. Shorthand for ``('signed
+              integer', 'unsigned integer')``.
+            - ``'real floating'``: real-valued floating-point data types
+              (i.e., ``float32``, ``float64``).
+            - ``'complex floating'``: complex floating-point data types (i.e.,
+              ``complex64``, ``complex128``).
+            - ``'numeric'``: numeric data types. Shorthand for ``('integral',
+              'real floating', 'complex floating')``.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary mapping the names of data types to the corresponding
+            Dask data types.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.dtypes(kind='signed integer')
+        {'int8': dask.int8,
+         'int16': dask.int16,
+         'int32': dask.int32,
+         'int64': dask.int64}
+
+        """
+        if device not in ["cpu", _DASK_DEVICE, None]:
+            raise ValueError(
+                'Device not understood. Only "cpu" or _DASK_DEVICE is allowed, but received:'
+                f' {device}'
+            )
+        if kind is None:
+            return {
+                "bool": dtype(bool),
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if kind == "bool":
+            return {"bool": bool}
+        if kind == "signed integer":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+            }
+        if kind == "unsigned integer":
+            return {
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+            }
+        if kind == "integral":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+            }
+        if kind == "real floating":
+            return {
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+            }
+        if kind == "complex floating":
+            return {
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if kind == "numeric":
+            return {
+                "int8": dtype(int8),
+                "int16": dtype(int16),
+                "int32": dtype(int32),
+                "int64": dtype(int64),
+                "uint8": dtype(uint8),
+                "uint16": dtype(uint16),
+                "uint32": dtype(uint32),
+                "uint64": dtype(uint64),
+                "float32": dtype(float32),
+                "float64": dtype(float64),
+                "complex64": dtype(complex64),
+                "complex128": dtype(complex128),
+            }
+        if isinstance(kind, tuple):
+            res = {}
+            for k in kind:
+                res.update(self.dtypes(kind=k))
+            return res
+        raise ValueError(f"unsupported kind: {kind!r}")
+
+    def devices(self):
+        """
+        The devices supported by Dask.
+
+        For Dask, this always returns ``['cpu', DASK_DEVICE]``.
+
+        Returns
+        -------
+        devices : list of str
+            The devices supported by Dask.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.devices()
+        ['cpu', DASK_DEVICE]
+
+        """
+        return ["cpu", _DASK_DEVICE]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/fft.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/fft.py
new file mode 100644
index 0000000000000000000000000000000000000000..aebd86f7b201d9eb7cd707b25ab3fae117f2d6e5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/fft.py
@@ -0,0 +1,24 @@
+from dask.array.fft import * # noqa: F403
+# dask.array.fft doesn't have __all__. If it is added, replace this with
+#
+# from dask.array.fft import __all__ as linalg_all
+_n = {}
+exec('from dask.array.fft import *', _n)
+del _n['__builtins__']
+fft_all = list(_n)
+del _n
+
+from ...common import _fft
+from ..._internal import get_xp
+
+import dask.array as da
+
+fftfreq = get_xp(da)(_fft.fftfreq)
+rfftfreq = get_xp(da)(_fft.rfftfreq)
+
+__all__ = [elem for elem in fft_all if elem != "annotations"] + ["fftfreq", "rfftfreq"]
+
+del get_xp
+del da
+del fft_all
+del _fft
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/linalg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..49c26d8b819f88e226e34e02947a1ecf50c4895e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/dask/array/linalg.py
@@ -0,0 +1,73 @@
+from __future__ import annotations
+
+from ...common import _linalg
+from ..._internal import get_xp
+
+# Exports
+from dask.array.linalg import * # noqa: F403
+from dask.array import outer
+
+# These functions are in both the main and linalg namespaces
+from dask.array import matmul, tensordot
+from ._aliases import matrix_transpose, vecdot
+
+import dask.array as da
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    from ...common._typing import Array
+    from typing import Literal
+
+# dask.array.linalg doesn't have __all__. If it is added, replace this with
+#
+# from dask.array.linalg import __all__ as linalg_all
+_n = {}
+exec('from dask.array.linalg import *', _n)
+del _n['__builtins__']
+if 'annotations' in _n:
+    del _n['annotations']
+linalg_all = list(_n)
+del _n
+
+EighResult = _linalg.EighResult
+QRResult = _linalg.QRResult
+SlogdetResult = _linalg.SlogdetResult
+SVDResult = _linalg.SVDResult
+# TODO: use the QR wrapper once dask
+# supports the mode keyword on QR
+# https://github.com/dask/dask/issues/10388
+#qr = get_xp(da)(_linalg.qr)
+def qr(x: Array, mode: Literal['reduced', 'complete'] = 'reduced',
+       **kwargs) -> QRResult:
+    if mode != "reduced":
+        raise ValueError("dask arrays only support using mode='reduced'")
+    return QRResult(*da.linalg.qr(x, **kwargs))
+trace = get_xp(da)(_linalg.trace)
+cholesky = get_xp(da)(_linalg.cholesky)
+matrix_rank = get_xp(da)(_linalg.matrix_rank)
+matrix_norm = get_xp(da)(_linalg.matrix_norm)
+
+
+# Wrap the svd functions to not pass full_matrices to dask
+# when full_matrices=False (as that is the default behavior for dask),
+# and dask doesn't have the full_matrices keyword
+def svd(x: Array, full_matrices: bool = True, **kwargs) -> SVDResult:
+    if full_matrices:
+        raise ValueError("full_matrics=True is not supported by dask.")
+    return da.linalg.svd(x, coerce_signs=False, **kwargs)
+
+def svdvals(x: Array) -> Array:
+    # TODO: can't avoid computing U or V for dask
+    _, s, _ =  svd(x)
+    return s
+
+vector_norm = get_xp(da)(_linalg.vector_norm)
+diagonal = get_xp(da)(_linalg.diagonal)
+
+__all__ = linalg_all + ["trace", "outer", "matmul", "tensordot",
+                        "matrix_transpose", "vecdot", "EighResult",
+                        "QRResult", "SlogdetResult", "SVDResult", "qr",
+                        "cholesky", "matrix_rank", "matrix_norm", "svdvals",
+                        "vector_norm", "diagonal"]
+
+_all_ignore = ['get_xp', 'da', 'linalg_all']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..cfa3acf8945a84c8e3fcdc892edc19d4f674cd30
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/__init__.py
@@ -0,0 +1,24 @@
+from torch import * # noqa: F403
+
+# Several names are not included in the above import *
+import torch
+for n in dir(torch):
+    if (n.startswith('_')
+        or n.endswith('_')
+        or 'cuda' in n
+        or 'cpu' in n
+        or 'backward' in n):
+        continue
+    exec(n + ' = torch.' + n)
+
+# These imports may overwrite names from the import * above.
+from ._aliases import * # noqa: F403
+
+# See the comment in the numpy __init__.py
+__import__(__package__ + '.linalg')
+
+__import__(__package__ + '.fft')
+
+from ..common._helpers import * # noqa: F403
+
+__array_api_version__ = '2023.12'
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/_info.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/_info.py
new file mode 100644
index 0000000000000000000000000000000000000000..264caa9e5fbbe9da3d9b9594b8d11f313d8536ef
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/_info.py
@@ -0,0 +1,358 @@
+"""
+Array API Inspection namespace
+
+This is the namespace for inspection functions as defined by the array API
+standard. See
+https://data-apis.org/array-api/latest/API_specification/inspection.html for
+more details.
+
+"""
+import torch
+
+from functools import cache
+
+class __array_namespace_info__:
+    """
+    Get the array API inspection namespace for PyTorch.
+
+    The array API inspection namespace defines the following functions:
+
+    - capabilities()
+    - default_device()
+    - default_dtypes()
+    - dtypes()
+    - devices()
+
+    See
+    https://data-apis.org/array-api/latest/API_specification/inspection.html
+    for more details.
+
+    Returns
+    -------
+    info : ModuleType
+        The array API inspection namespace for PyTorch.
+
+    Examples
+    --------
+    >>> info = np.__array_namespace_info__()
+    >>> info.default_dtypes()
+    {'real floating': numpy.float64,
+     'complex floating': numpy.complex128,
+     'integral': numpy.int64,
+     'indexing': numpy.int64}
+
+    """
+
+    __module__ = 'torch'
+
+    def capabilities(self):
+        """
+        Return a dictionary of array API library capabilities.
+
+        The resulting dictionary has the following keys:
+
+        - **"boolean indexing"**: boolean indicating whether an array library
+          supports boolean indexing. Always ``True`` for PyTorch.
+
+        - **"data-dependent shapes"**: boolean indicating whether an array
+          library supports data-dependent output shapes. Always ``True`` for
+          PyTorch.
+
+        See
+        https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.capabilities.html
+        for more details.
+
+        See Also
+        --------
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        capabilities : dict
+            A dictionary of array API library capabilities.
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.capabilities()
+        {'boolean indexing': True,
+         'data-dependent shapes': True}
+
+        """
+        return {
+            "boolean indexing": True,
+            "data-dependent shapes": True,
+            # 'max rank' will be part of the 2024.12 standard
+            # "max rank": 64,
+        }
+
+    def default_device(self):
+        """
+        The default device used for new PyTorch arrays.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Returns
+        -------
+        device : str
+            The default device used for new PyTorch arrays.
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.default_device()
+        'cpu'
+
+        """
+        return torch.device("cpu")
+
+    def default_dtypes(self, *, device=None):
+        """
+        The default data types used for new PyTorch arrays.
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the default data types for. For PyTorch, only
+            ``'cpu'`` is allowed.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary describing the default data types used for new PyTorch
+            arrays.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.default_dtypes()
+        {'real floating': torch.float32,
+         'complex floating': torch.complex64,
+         'integral': torch.int64,
+         'indexing': torch.int64}
+
+        """
+        # Note: if the default is set to float64, the devices like MPS that
+        # don't support float64 will error. We still return the default_dtype
+        # value here because this error doesn't represent a different default
+        # per-device.
+        default_floating = torch.get_default_dtype()
+        default_complex = torch.complex64 if default_floating == torch.float32 else torch.complex128
+        default_integral = torch.int64
+        return {
+            "real floating": default_floating,
+            "complex floating": default_complex,
+            "integral": default_integral,
+            "indexing": default_integral,
+        }
+
+
+    def _dtypes(self, kind):
+        bool = torch.bool
+        int8 = torch.int8
+        int16 = torch.int16
+        int32 = torch.int32
+        int64 = torch.int64
+        uint8 = torch.uint8
+        # uint16, uint32, and uint64 are present in newer versions of pytorch,
+        # but they aren't generally supported by the array API functions, so
+        # we omit them from this function.
+        float32 = torch.float32
+        float64 = torch.float64
+        complex64 = torch.complex64
+        complex128 = torch.complex128
+
+        if kind is None:
+            return {
+                "bool": bool,
+                "int8": int8,
+                "int16": int16,
+                "int32": int32,
+                "int64": int64,
+                "uint8": uint8,
+                "float32": float32,
+                "float64": float64,
+                "complex64": complex64,
+                "complex128": complex128,
+            }
+        if kind == "bool":
+            return {"bool": bool}
+        if kind == "signed integer":
+            return {
+                "int8": int8,
+                "int16": int16,
+                "int32": int32,
+                "int64": int64,
+            }
+        if kind == "unsigned integer":
+            return {
+                "uint8": uint8,
+            }
+        if kind == "integral":
+            return {
+                "int8": int8,
+                "int16": int16,
+                "int32": int32,
+                "int64": int64,
+                "uint8": uint8,
+            }
+        if kind == "real floating":
+            return {
+                "float32": float32,
+                "float64": float64,
+            }
+        if kind == "complex floating":
+            return {
+                "complex64": complex64,
+                "complex128": complex128,
+            }
+        if kind == "numeric":
+            return {
+                "int8": int8,
+                "int16": int16,
+                "int32": int32,
+                "int64": int64,
+                "uint8": uint8,
+                "float32": float32,
+                "float64": float64,
+                "complex64": complex64,
+                "complex128": complex128,
+            }
+        if isinstance(kind, tuple):
+            res = {}
+            for k in kind:
+                res.update(self.dtypes(kind=k))
+            return res
+        raise ValueError(f"unsupported kind: {kind!r}")
+
+    @cache
+    def dtypes(self, *, device=None, kind=None):
+        """
+        The array API data types supported by PyTorch.
+
+        Note that this function only returns data types that are defined by
+        the array API.
+
+        Parameters
+        ----------
+        device : str, optional
+            The device to get the data types for.
+        kind : str or tuple of str, optional
+            The kind of data types to return. If ``None``, all data types are
+            returned. If a string, only data types of that kind are returned.
+            If a tuple, a dictionary containing the union of the given kinds
+            is returned. The following kinds are supported:
+
+            - ``'bool'``: boolean data types (i.e., ``bool``).
+            - ``'signed integer'``: signed integer data types (i.e., ``int8``,
+              ``int16``, ``int32``, ``int64``).
+            - ``'unsigned integer'``: unsigned integer data types (i.e.,
+              ``uint8``, ``uint16``, ``uint32``, ``uint64``).
+            - ``'integral'``: integer data types. Shorthand for ``('signed
+              integer', 'unsigned integer')``.
+            - ``'real floating'``: real-valued floating-point data types
+              (i.e., ``float32``, ``float64``).
+            - ``'complex floating'``: complex floating-point data types (i.e.,
+              ``complex64``, ``complex128``).
+            - ``'numeric'``: numeric data types. Shorthand for ``('integral',
+              'real floating', 'complex floating')``.
+
+        Returns
+        -------
+        dtypes : dict
+            A dictionary mapping the names of data types to the corresponding
+            PyTorch data types.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.devices
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.dtypes(kind='signed integer')
+        {'int8': numpy.int8,
+         'int16': numpy.int16,
+         'int32': numpy.int32,
+         'int64': numpy.int64}
+
+        """
+        res = self._dtypes(kind)
+        for k, v in res.copy().items():
+            try:
+                torch.empty((0,), dtype=v, device=device)
+            except:
+                del res[k]
+        return res
+
+    @cache
+    def devices(self):
+        """
+        The devices supported by PyTorch.
+
+        Returns
+        -------
+        devices : list of str
+            The devices supported by PyTorch.
+
+        See Also
+        --------
+        __array_namespace_info__.capabilities,
+        __array_namespace_info__.default_device,
+        __array_namespace_info__.default_dtypes,
+        __array_namespace_info__.dtypes
+
+        Examples
+        --------
+        >>> info = np.__array_namespace_info__()
+        >>> info.devices()
+        [device(type='cpu'), device(type='mps', index=0), device(type='meta')]
+
+        """
+        # Torch doesn't have a straightforward way to get the list of all
+        # currently supported devices. To do this, we first parse the error
+        # message of torch.device to get the list of all possible types of
+        # device:
+        try:
+            torch.device('notadevice')
+        except RuntimeError as e:
+            # The error message is something like:
+            # "Expected one of cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, ort, xla, lazy, vulkan, mps, meta, hpu, mtia, privateuseone device type at start of device string: notadevice"
+            devices_names = e.args[0].split('Expected one of ')[1].split(' device type')[0].split(', ')
+
+        # Next we need to check for different indices for different devices.
+        # device(device_name, index=index) doesn't actually check if the
+        # device name or index is valid. We have to try to create a tensor
+        # with it (which is why this function is cached).
+        devices = []
+        for device_name in devices_names:
+            i = 0
+            while True:
+                try:
+                    a = torch.empty((0,), device=torch.device(device_name, index=i))
+                    if a.device in devices:
+                        break
+                    devices.append(a.device)
+                except:
+                    break
+                i += 1
+
+        return devices
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/fft.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/fft.py
new file mode 100644
index 0000000000000000000000000000000000000000..3c9117ee57d3534e3e72329d740632c02e936200
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/fft.py
@@ -0,0 +1,86 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    import torch
+    array = torch.Tensor
+    from typing import Union, Sequence, Literal
+
+from torch.fft import * # noqa: F403
+import torch.fft
+
+# Several torch fft functions do not map axes to dim
+
+def fftn(
+    x: array,
+    /,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+    **kwargs,
+) -> array:
+    return torch.fft.fftn(x, s=s, dim=axes, norm=norm, **kwargs)
+
+def ifftn(
+    x: array,
+    /,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+    **kwargs,
+) -> array:
+    return torch.fft.ifftn(x, s=s, dim=axes, norm=norm, **kwargs)
+
+def rfftn(
+    x: array,
+    /,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+    **kwargs,
+) -> array:
+    return torch.fft.rfftn(x, s=s, dim=axes, norm=norm, **kwargs)
+
+def irfftn(
+    x: array,
+    /,
+    *,
+    s: Sequence[int] = None,
+    axes: Sequence[int] = None,
+    norm: Literal["backward", "ortho", "forward"] = "backward",
+    **kwargs,
+) -> array:
+    return torch.fft.irfftn(x, s=s, dim=axes, norm=norm, **kwargs)
+
+def fftshift(
+    x: array,
+    /,
+    *,
+    axes: Union[int, Sequence[int]] = None,
+    **kwargs,
+) -> array:
+    return torch.fft.fftshift(x, dim=axes, **kwargs)
+
+def ifftshift(
+    x: array,
+    /,
+    *,
+    axes: Union[int, Sequence[int]] = None,
+    **kwargs,
+) -> array:
+    return torch.fft.ifftshift(x, dim=axes, **kwargs)
+
+
+__all__ = torch.fft.__all__ + [
+    "fftn",
+    "ifftn",
+    "rfftn",
+    "irfftn",
+    "fftshift",
+    "ifftshift",
+]
+
+_all_ignore = ['torch']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/linalg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/linalg.py
new file mode 100644
index 0000000000000000000000000000000000000000..e26198b9b562ed307206dd08dd9de7c8aa2a918b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_compat/torch/linalg.py
@@ -0,0 +1,121 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+if TYPE_CHECKING:
+    import torch
+    array = torch.Tensor
+    from torch import dtype as Dtype
+    from typing import Optional, Union, Tuple, Literal
+    inf = float('inf')
+
+from ._aliases import _fix_promotion, sum
+
+from torch.linalg import * # noqa: F403
+
+# torch.linalg doesn't define __all__
+# from torch.linalg import __all__ as linalg_all
+from torch import linalg as torch_linalg
+linalg_all = [i for i in dir(torch_linalg) if not i.startswith('_')]
+
+# outer is implemented in torch but aren't in the linalg namespace
+from torch import outer
+# These functions are in both the main and linalg namespaces
+from ._aliases import matmul, matrix_transpose, tensordot
+
+# Note: torch.linalg.cross does not default to axis=-1 (it defaults to the
+# first axis with size 3), see https://github.com/pytorch/pytorch/issues/58743
+
+# torch.cross also does not support broadcasting when it would add new
+# dimensions https://github.com/pytorch/pytorch/issues/39656
+def cross(x1: array, x2: array, /, *, axis: int = -1) -> array:
+    x1, x2 = _fix_promotion(x1, x2, only_scalar=False)
+    if not (-min(x1.ndim, x2.ndim) <= axis < max(x1.ndim, x2.ndim)):
+        raise ValueError(f"axis {axis} out of bounds for cross product of arrays with shapes {x1.shape} and {x2.shape}")
+    if not (x1.shape[axis] == x2.shape[axis] == 3):
+        raise ValueError(f"cross product axis must have size 3, got {x1.shape[axis]} and {x2.shape[axis]}")
+    x1, x2 = torch.broadcast_tensors(x1, x2)
+    return torch_linalg.cross(x1, x2, dim=axis)
+
+def vecdot(x1: array, x2: array, /, *, axis: int = -1, **kwargs) -> array:
+    from ._aliases import isdtype
+
+    x1, x2 = _fix_promotion(x1, x2, only_scalar=False)
+
+    # torch.linalg.vecdot incorrectly allows broadcasting along the contracted dimension
+    if x1.shape[axis] != x2.shape[axis]:
+        raise ValueError("x1 and x2 must have the same size along the given axis")
+
+    # torch.linalg.vecdot doesn't support integer dtypes
+    if isdtype(x1.dtype, 'integral') or isdtype(x2.dtype, 'integral'):
+        if kwargs:
+            raise RuntimeError("vecdot kwargs not supported for integral dtypes")
+
+        x1_ = torch.moveaxis(x1, axis, -1)
+        x2_ = torch.moveaxis(x2, axis, -1)
+        x1_, x2_ = torch.broadcast_tensors(x1_, x2_)
+
+        res = x1_[..., None, :] @ x2_[..., None]
+        return res[..., 0, 0]
+    return torch.linalg.vecdot(x1, x2, dim=axis, **kwargs)
+
+def solve(x1: array, x2: array, /, **kwargs) -> array:
+    x1, x2 = _fix_promotion(x1, x2, only_scalar=False)
+    # Torch tries to emulate NumPy 1 solve behavior by using batched 1-D solve
+    # whenever
+    # 1. x1.ndim - 1 == x2.ndim
+    # 2. x1.shape[:-1] == x2.shape
+    #
+    # See linalg_solve_is_vector_rhs in
+    # aten/src/ATen/native/LinearAlgebraUtils.h and
+    # TORCH_META_FUNC(_linalg_solve_ex) in
+    # aten/src/ATen/native/BatchLinearAlgebra.cpp in the PyTorch source code.
+    #
+    # The easiest way to work around this is to prepend a size 1 dimension to
+    # x2, since x2 is already one dimension less than x1.
+    #
+    # See https://github.com/pytorch/pytorch/issues/52915
+    if x2.ndim != 1 and x1.ndim - 1 == x2.ndim and x1.shape[:-1] == x2.shape:
+        x2 = x2[None]
+    return torch.linalg.solve(x1, x2, **kwargs)
+
+# torch.trace doesn't support the offset argument and doesn't support stacking
+def trace(x: array, /, *, offset: int = 0, dtype: Optional[Dtype] = None) -> array:
+    # Use our wrapped sum to make sure it does upcasting correctly
+    return sum(torch.diagonal(x, offset=offset, dim1=-2, dim2=-1), axis=-1, dtype=dtype)
+
+def vector_norm(
+    x: array,
+    /,
+    *,
+    axis: Optional[Union[int, Tuple[int, ...]]] = None,
+    keepdims: bool = False,
+    ord: Union[int, float, Literal[inf, -inf]] = 2,
+    **kwargs,
+) -> array:
+    # torch.vector_norm incorrectly treats axis=() the same as axis=None
+    if axis == ():
+        out = kwargs.get('out')
+        if out is None:
+            dtype = None
+            if x.dtype == torch.complex64:
+                dtype = torch.float32
+            elif x.dtype == torch.complex128:
+                dtype = torch.float64
+
+            out = torch.zeros_like(x, dtype=dtype)
+
+        # The norm of a single scalar works out to abs(x) in every case except
+        # for ord=0, which is x != 0.
+        if ord == 0:
+            out[:] = (x != 0)
+        else:
+            out[:] = torch.abs(x)
+        return out
+    return torch.linalg.vector_norm(x, ord=ord, axis=axis, keepdim=keepdims, **kwargs)
+
+__all__ = linalg_all + ['outer', 'matmul', 'matrix_transpose', 'tensordot',
+                        'cross', 'vecdot', 'solve', 'trace', 'vector_norm']
+
+_all_ignore = ['torch_linalg', 'sum']
+
+del linalg_all
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..2062f7d5d6a4d9f5a3556164720a6abc4da456bc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__init__.py
@@ -0,0 +1,15 @@
+from __future__ import annotations
+
+from ._funcs import atleast_nd, cov, create_diagonal, expand_dims, kron, sinc
+
+__version__ = "0.2.0"
+
+__all__ = [
+    "__version__",
+    "atleast_nd",
+    "cov",
+    "create_diagonal",
+    "expand_dims",
+    "kron",
+    "sinc",
+]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..903b6c20269cfa452a9e90dc0a1d66db396b848b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/_funcs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/_funcs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4c05531642458438720d87d39aba5052f366c624
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/__pycache__/_funcs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_funcs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_funcs.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce800189b46d25316c3123a22ce4ff2e7e1e81ce
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_funcs.py
@@ -0,0 +1,484 @@
+from __future__ import annotations
+
+import warnings
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+    from ._typing import Array, ModuleType
+
+__all__ = ["atleast_nd", "cov", "create_diagonal", "expand_dims", "kron", "sinc"]
+
+
+def atleast_nd(x: Array, /, *, ndim: int, xp: ModuleType) -> Array:
+    """
+    Recursively expand the dimension of an array to at least `ndim`.
+
+    Parameters
+    ----------
+    x : array
+    ndim : int
+        The minimum number of dimensions for the result.
+    xp : array_namespace
+        The standard-compatible namespace for `x`.
+
+    Returns
+    -------
+    res : array
+        An array with ``res.ndim`` >= `ndim`.
+        If ``x.ndim`` >= `ndim`, `x` is returned.
+        If ``x.ndim`` < `ndim`, `x` is expanded by prepending new axes
+        until ``res.ndim`` equals `ndim`.
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+    >>> x = xp.asarray([1])
+    >>> xpx.atleast_nd(x, ndim=3, xp=xp)
+    Array([[[1]]], dtype=array_api_strict.int64)
+
+    >>> x = xp.asarray([[[1, 2],
+    ...                  [3, 4]]])
+    >>> xpx.atleast_nd(x, ndim=1, xp=xp) is x
+    True
+
+    """
+    if x.ndim < ndim:
+        x = xp.expand_dims(x, axis=0)
+        x = atleast_nd(x, ndim=ndim, xp=xp)
+    return x
+
+
+def cov(m: Array, /, *, xp: ModuleType) -> Array:
+    """
+    Estimate a covariance matrix.
+
+    Covariance indicates the level to which two variables vary together.
+    If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,
+    then the covariance matrix element :math:`C_{ij}` is the covariance of
+    :math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance
+    of :math:`x_i`.
+
+    This provides a subset of the functionality of ``numpy.cov``.
+
+    Parameters
+    ----------
+    m : array
+        A 1-D or 2-D array containing multiple variables and observations.
+        Each row of `m` represents a variable, and each column a single
+        observation of all those variables.
+    xp : array_namespace
+        The standard-compatible namespace for `m`.
+
+    Returns
+    -------
+    res : array
+        The covariance matrix of the variables.
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+
+    Consider two variables, :math:`x_0` and :math:`x_1`, which
+    correlate perfectly, but in opposite directions:
+
+    >>> x = xp.asarray([[0, 2], [1, 1], [2, 0]]).T
+    >>> x
+    Array([[0, 1, 2],
+           [2, 1, 0]], dtype=array_api_strict.int64)
+
+    Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance
+    matrix shows this clearly:
+
+    >>> xpx.cov(x, xp=xp)
+    Array([[ 1., -1.],
+           [-1.,  1.]], dtype=array_api_strict.float64)
+
+
+    Note that element :math:`C_{0,1}`, which shows the correlation between
+    :math:`x_0` and :math:`x_1`, is negative.
+
+    Further, note how `x` and `y` are combined:
+
+    >>> x = xp.asarray([-2.1, -1,  4.3])
+    >>> y = xp.asarray([3,  1.1,  0.12])
+    >>> X = xp.stack((x, y), axis=0)
+    >>> xpx.cov(X, xp=xp)
+    Array([[11.71      , -4.286     ],
+           [-4.286     ,  2.14413333]], dtype=array_api_strict.float64)
+
+    >>> xpx.cov(x, xp=xp)
+    Array(11.71, dtype=array_api_strict.float64)
+
+    >>> xpx.cov(y, xp=xp)
+    Array(2.14413333, dtype=array_api_strict.float64)
+
+    """
+    m = xp.asarray(m, copy=True)
+    dtype = (
+        xp.float64 if xp.isdtype(m.dtype, "integral") else xp.result_type(m, xp.float64)
+    )
+
+    m = atleast_nd(m, ndim=2, xp=xp)
+    m = xp.astype(m, dtype)
+
+    avg = _mean(m, axis=1, xp=xp)
+    fact = m.shape[1] - 1
+
+    if fact <= 0:
+        warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning, stacklevel=2)
+        fact = 0.0
+
+    m -= avg[:, None]
+    m_transpose = m.T
+    if xp.isdtype(m_transpose.dtype, "complex floating"):
+        m_transpose = xp.conj(m_transpose)
+    c = m @ m_transpose
+    c /= fact
+    axes = tuple(axis for axis, length in enumerate(c.shape) if length == 1)
+    return xp.squeeze(c, axis=axes)
+
+
+def create_diagonal(x: Array, /, *, offset: int = 0, xp: ModuleType) -> Array:
+    """
+    Construct a diagonal array.
+
+    Parameters
+    ----------
+    x : array
+        A 1-D array
+    offset : int, optional
+        Offset from the leading diagonal (default is ``0``).
+        Use positive ints for diagonals above the leading diagonal,
+        and negative ints for diagonals below the leading diagonal.
+    xp : array_namespace
+        The standard-compatible namespace for `x`.
+
+    Returns
+    -------
+    res : array
+        A 2-D array with `x` on the diagonal (offset by `offset`).
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+    >>> x = xp.asarray([2, 4, 8])
+
+    >>> xpx.create_diagonal(x, xp=xp)
+    Array([[2, 0, 0],
+           [0, 4, 0],
+           [0, 0, 8]], dtype=array_api_strict.int64)
+
+    >>> xpx.create_diagonal(x, offset=-2, xp=xp)
+    Array([[0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0],
+           [2, 0, 0, 0, 0],
+           [0, 4, 0, 0, 0],
+           [0, 0, 8, 0, 0]], dtype=array_api_strict.int64)
+
+    """
+    if x.ndim != 1:
+        err_msg = "`x` must be 1-dimensional."
+        raise ValueError(err_msg)
+    n = x.shape[0] + abs(offset)
+    diag = xp.zeros(n**2, dtype=x.dtype)
+    i = offset if offset >= 0 else abs(offset) * n
+    diag[i : min(n * (n - offset), diag.shape[0]) : n + 1] = x
+    return xp.reshape(diag, (n, n))
+
+
+def _mean(
+    x: Array,
+    /,
+    *,
+    axis: int | tuple[int, ...] | None = None,
+    keepdims: bool = False,
+    xp: ModuleType,
+) -> Array:
+    """
+    Complex mean, https://github.com/data-apis/array-api/issues/846.
+    """
+    if xp.isdtype(x.dtype, "complex floating"):
+        x_real = xp.real(x)
+        x_imag = xp.imag(x)
+        mean_real = xp.mean(x_real, axis=axis, keepdims=keepdims)
+        mean_imag = xp.mean(x_imag, axis=axis, keepdims=keepdims)
+        return mean_real + (mean_imag * xp.asarray(1j))
+    return xp.mean(x, axis=axis, keepdims=keepdims)
+
+
+def expand_dims(
+    a: Array, /, *, axis: int | tuple[int, ...] = (0,), xp: ModuleType
+) -> Array:
+    """
+    Expand the shape of an array.
+
+    Insert (a) new axis/axes that will appear at the position(s) specified by
+    `axis` in the expanded array shape.
+
+    This is ``xp.expand_dims`` for `axis` an int *or a tuple of ints*.
+    Roughly equivalent to ``numpy.expand_dims`` for NumPy arrays.
+
+    Parameters
+    ----------
+    a : array
+    axis : int or tuple of ints, optional
+        Position(s) in the expanded axes where the new axis (or axes) is/are placed.
+        If multiple positions are provided, they should be unique (note that a position
+        given by a positive index could also be referred to by a negative index -
+        that will also result in an error).
+        Default: ``(0,)``.
+    xp : array_namespace
+        The standard-compatible namespace for `a`.
+
+    Returns
+    -------
+    res : array
+        `a` with an expanded shape.
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+    >>> x = xp.asarray([1, 2])
+    >>> x.shape
+    (2,)
+
+    The following is equivalent to ``x[xp.newaxis, :]`` or ``x[xp.newaxis]``:
+
+    >>> y = xpx.expand_dims(x, axis=0, xp=xp)
+    >>> y
+    Array([[1, 2]], dtype=array_api_strict.int64)
+    >>> y.shape
+    (1, 2)
+
+    The following is equivalent to ``x[:, xp.newaxis]``:
+
+    >>> y = xpx.expand_dims(x, axis=1, xp=xp)
+    >>> y
+    Array([[1],
+           [2]], dtype=array_api_strict.int64)
+    >>> y.shape
+    (2, 1)
+
+    ``axis`` may also be a tuple:
+
+    >>> y = xpx.expand_dims(x, axis=(0, 1), xp=xp)
+    >>> y
+    Array([[[1, 2]]], dtype=array_api_strict.int64)
+
+    >>> y = xpx.expand_dims(x, axis=(2, 0), xp=xp)
+    >>> y
+    Array([[[1],
+            [2]]], dtype=array_api_strict.int64)
+
+    """
+    if not isinstance(axis, tuple):
+        axis = (axis,)
+    ndim = a.ndim + len(axis)
+    if axis != () and (min(axis) < -ndim or max(axis) >= ndim):
+        err_msg = (
+            f"a provided axis position is out of bounds for array of dimension {a.ndim}"
+        )
+        raise IndexError(err_msg)
+    axis = tuple(dim % ndim for dim in axis)
+    if len(set(axis)) != len(axis):
+        err_msg = "Duplicate dimensions specified in `axis`."
+        raise ValueError(err_msg)
+    for i in sorted(axis):
+        a = xp.expand_dims(a, axis=i)
+    return a
+
+
+def kron(a: Array, b: Array, /, *, xp: ModuleType) -> Array:
+    """
+    Kronecker product of two arrays.
+
+    Computes the Kronecker product, a composite array made of blocks of the
+    second array scaled by the first.
+
+    Equivalent to ``numpy.kron`` for NumPy arrays.
+
+    Parameters
+    ----------
+    a, b : array
+    xp : array_namespace
+        The standard-compatible namespace for `a` and `b`.
+
+    Returns
+    -------
+    res : array
+        The Kronecker product of `a` and `b`.
+
+    Notes
+    -----
+    The function assumes that the number of dimensions of `a` and `b`
+    are the same, if necessary prepending the smallest with ones.
+    If ``a.shape = (r0,r1,..,rN)`` and ``b.shape = (s0,s1,...,sN)``,
+    the Kronecker product has shape ``(r0*s0, r1*s1, ..., rN*SN)``.
+    The elements are products of elements from `a` and `b`, organized
+    explicitly by::
+
+        kron(a,b)[k0,k1,...,kN] = a[i0,i1,...,iN] * b[j0,j1,...,jN]
+
+    where::
+
+        kt = it * st + jt,  t = 0,...,N
+
+    In the common 2-D case (N=1), the block structure can be visualized::
+
+        [[ a[0,0]*b,   a[0,1]*b,  ... , a[0,-1]*b  ],
+         [  ...                              ...   ],
+         [ a[-1,0]*b,  a[-1,1]*b, ... , a[-1,-1]*b ]]
+
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+    >>> xpx.kron(xp.asarray([1, 10, 100]), xp.asarray([5, 6, 7]), xp=xp)
+    Array([  5,   6,   7,  50,  60,  70, 500,
+           600, 700], dtype=array_api_strict.int64)
+
+    >>> xpx.kron(xp.asarray([5, 6, 7]), xp.asarray([1, 10, 100]), xp=xp)
+    Array([  5,  50, 500,   6,  60, 600,   7,
+            70, 700], dtype=array_api_strict.int64)
+
+    >>> xpx.kron(xp.eye(2), xp.ones((2, 2)), xp=xp)
+    Array([[1., 1., 0., 0.],
+           [1., 1., 0., 0.],
+           [0., 0., 1., 1.],
+           [0., 0., 1., 1.]], dtype=array_api_strict.float64)
+
+
+    >>> a = xp.reshape(xp.arange(100), (2, 5, 2, 5))
+    >>> b = xp.reshape(xp.arange(24), (2, 3, 4))
+    >>> c = xpx.kron(a, b, xp=xp)
+    >>> c.shape
+    (2, 10, 6, 20)
+    >>> I = (1, 3, 0, 2)
+    >>> J = (0, 2, 1)
+    >>> J1 = (0,) + J             # extend to ndim=4
+    >>> S1 = (1,) + b.shape
+    >>> K = tuple(xp.asarray(I) * xp.asarray(S1) + xp.asarray(J1))
+    >>> c[K] == a[I]*b[J]
+    Array(True, dtype=array_api_strict.bool)
+
+    """
+
+    b = xp.asarray(b)
+    singletons = (1,) * (b.ndim - a.ndim)
+    a = xp.broadcast_to(xp.asarray(a), singletons + a.shape)
+
+    nd_b, nd_a = b.ndim, a.ndim
+    nd_max = max(nd_b, nd_a)
+    if nd_a == 0 or nd_b == 0:
+        return xp.multiply(a, b)
+
+    a_shape = a.shape
+    b_shape = b.shape
+
+    # Equalise the shapes by prepending smaller one with 1s
+    a_shape = (1,) * max(0, nd_b - nd_a) + a_shape
+    b_shape = (1,) * max(0, nd_a - nd_b) + b_shape
+
+    # Insert empty dimensions
+    a_arr = expand_dims(a, axis=tuple(range(nd_b - nd_a)), xp=xp)
+    b_arr = expand_dims(b, axis=tuple(range(nd_a - nd_b)), xp=xp)
+
+    # Compute the product
+    a_arr = expand_dims(a_arr, axis=tuple(range(1, nd_max * 2, 2)), xp=xp)
+    b_arr = expand_dims(b_arr, axis=tuple(range(0, nd_max * 2, 2)), xp=xp)
+    result = xp.multiply(a_arr, b_arr)
+
+    # Reshape back and return
+    a_shape = xp.asarray(a_shape)
+    b_shape = xp.asarray(b_shape)
+    return xp.reshape(result, tuple(xp.multiply(a_shape, b_shape)))
+
+
+def sinc(x: Array, /, *, xp: ModuleType) -> Array:
+    r"""
+    Return the normalized sinc function.
+
+    The sinc function is equal to :math:`\sin(\pi x)/(\pi x)` for any argument
+    :math:`x\ne 0`. ``sinc(0)`` takes the limit value 1, making ``sinc`` not
+    only everywhere continuous but also infinitely differentiable.
+
+    .. note::
+
+        Note the normalization factor of ``pi`` used in the definition.
+        This is the most commonly used definition in signal processing.
+        Use ``sinc(x / xp.pi)`` to obtain the unnormalized sinc function
+        :math:`\sin(x)/x` that is more common in mathematics.
+
+    Parameters
+    ----------
+    x : array
+        Array (possibly multi-dimensional) of values for which to calculate
+        ``sinc(x)``. Must have a real floating point dtype.
+    xp : array_namespace
+        The standard-compatible namespace for `x`.
+
+    Returns
+    -------
+    res : array
+        ``sinc(x)`` calculated elementwise, which has the same shape as the input.
+
+    Notes
+    -----
+    The name sinc is short for "sine cardinal" or "sinus cardinalis".
+
+    The sinc function is used in various signal processing applications,
+    including in anti-aliasing, in the construction of a Lanczos resampling
+    filter, and in interpolation.
+
+    For bandlimited interpolation of discrete-time signals, the ideal
+    interpolation kernel is proportional to the sinc function.
+
+    References
+    ----------
+    .. [1] Weisstein, Eric W. "Sinc Function." From MathWorld--A Wolfram Web
+           Resource. https://mathworld.wolfram.com/SincFunction.html
+    .. [2] Wikipedia, "Sinc function",
+           https://en.wikipedia.org/wiki/Sinc_function
+
+    Examples
+    --------
+    >>> import array_api_strict as xp
+    >>> import array_api_extra as xpx
+    >>> x = xp.linspace(-4, 4, 41)
+    >>> xpx.sinc(x, xp=xp)
+    Array([-3.89817183e-17, -4.92362781e-02,
+           -8.40918587e-02, -8.90384387e-02,
+           -5.84680802e-02,  3.89817183e-17,
+            6.68206631e-02,  1.16434881e-01,
+            1.26137788e-01,  8.50444803e-02,
+           -3.89817183e-17, -1.03943254e-01,
+           -1.89206682e-01, -2.16236208e-01,
+           -1.55914881e-01,  3.89817183e-17,
+            2.33872321e-01,  5.04551152e-01,
+            7.56826729e-01,  9.35489284e-01,
+            1.00000000e+00,  9.35489284e-01,
+            7.56826729e-01,  5.04551152e-01,
+            2.33872321e-01,  3.89817183e-17,
+           -1.55914881e-01, -2.16236208e-01,
+           -1.89206682e-01, -1.03943254e-01,
+           -3.89817183e-17,  8.50444803e-02,
+            1.26137788e-01,  1.16434881e-01,
+            6.68206631e-02,  3.89817183e-17,
+           -5.84680802e-02, -8.90384387e-02,
+           -8.40918587e-02, -4.92362781e-02,
+           -3.89817183e-17], dtype=array_api_strict.float64)
+
+    """
+    if not xp.isdtype(x.dtype, "real floating"):
+        err_msg = "`x` must have a real floating data type."
+        raise ValueError(err_msg)
+    # no scalars in `where` - array-api#807
+    y = xp.pi * xp.where(
+        x, x, xp.asarray(xp.finfo(x.dtype).smallest_normal, dtype=x.dtype)
+    )
+    return xp.sin(y) / y
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_typing.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_typing.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ffa13f23fc8c52abf5c65206ec1ff5a8481832c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/array_api_extra/_typing.py
@@ -0,0 +1,8 @@
+from __future__ import annotations
+
+from types import ModuleType
+from typing import Any
+
+Array = Any  # To be changed to a Protocol later (see array-api#589)
+
+__all__ = ["Array", "ModuleType"]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e2418395425d7ecce9e1a4da68985c8fde93bc1c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/__init__.py
@@ -0,0 +1,20 @@
+from .main import minimize
+from .utils import show_versions
+
+# PEP0440 compatible formatted version, see:
+# https://www.python.org/dev/peps/pep-0440/
+#
+# Final release markers:
+#   X.Y.0   # For first release after an increment in Y
+#   X.Y.Z   # For bugfix releases
+#
+# Admissible pre-release markers:
+#   X.YaN   # Alpha release
+#   X.YbN   # Beta release
+#   X.YrcN  # Release Candidate
+#
+# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
+# 'X.Y.dev0' is the canonical version of 'X.Y.dev'.
+__version__ = "1.1.2"
+
+__all__ = ["minimize", "show_versions"]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/framework.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/framework.py
new file mode 100644
index 0000000000000000000000000000000000000000..9afea66281067e27a486ff317a4bffa03ec3e68b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/framework.py
@@ -0,0 +1,1240 @@
+import warnings
+
+import numpy as np
+from scipy.optimize import lsq_linear
+
+from .models import Models, Quadratic
+from .settings import Options, Constants
+from .subsolvers import (
+    cauchy_geometry,
+    spider_geometry,
+    normal_byrd_omojokun,
+    tangential_byrd_omojokun,
+    constrained_tangential_byrd_omojokun,
+)
+from .subsolvers.optim import qr_tangential_byrd_omojokun
+from .utils import get_arrays_tol
+
+
+TINY = np.finfo(float).tiny
+EPS = np.finfo(float).eps
+
+
+class TrustRegion:
+    """
+    Trust-region framework.
+    """
+
+    def __init__(self, pb, options, constants):
+        """
+        Initialize the trust-region framework.
+
+        Parameters
+        ----------
+        pb : `cobyqa.problem.Problem`
+            Problem to solve.
+        options : dict
+            Options of the solver.
+        constants : dict
+            Constants of the solver.
+
+        Raises
+        ------
+        `cobyqa.utils.MaxEvalError`
+            If the maximum number of evaluations is reached.
+        `cobyqa.utils.TargetSuccess`
+            If a nearly feasible point has been found with an objective
+            function value below the target.
+        `cobyqa.utils.FeasibleSuccess`
+            If a feasible point has been found for a feasibility problem.
+        `numpy.linalg.LinAlgError`
+            If the initial interpolation system is ill-defined.
+        """
+        # Set the initial penalty parameter.
+        self._penalty = 0.0
+
+        # Initialize the models.
+        self._pb = pb
+        self._models = Models(self._pb, options, self.penalty)
+        self._constants = constants
+
+        # Set the index of the best interpolation point.
+        self._best_index = 0
+        self.set_best_index()
+
+        # Set the initial Lagrange multipliers.
+        self._lm_linear_ub = np.zeros(self.m_linear_ub)
+        self._lm_linear_eq = np.zeros(self.m_linear_eq)
+        self._lm_nonlinear_ub = np.zeros(self.m_nonlinear_ub)
+        self._lm_nonlinear_eq = np.zeros(self.m_nonlinear_eq)
+        self.set_multipliers(self.x_best)
+
+        # Set the initial trust-region radius and the resolution.
+        self._resolution = options[Options.RHOBEG]
+        self._radius = self.resolution
+
+    @property
+    def n(self):
+        """
+        Number of variables.
+
+        Returns
+        -------
+        int
+            Number of variables.
+        """
+        return self._pb.n
+
+    @property
+    def m_linear_ub(self):
+        """
+        Number of linear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear inequality constraints.
+        """
+        return self._pb.m_linear_ub
+
+    @property
+    def m_linear_eq(self):
+        """
+        Number of linear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear equality constraints.
+        """
+        return self._pb.m_linear_eq
+
+    @property
+    def m_nonlinear_ub(self):
+        """
+        Number of nonlinear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear inequality constraints.
+        """
+        return self._pb.m_nonlinear_ub
+
+    @property
+    def m_nonlinear_eq(self):
+        """
+        Number of nonlinear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear equality constraints.
+        """
+        return self._pb.m_nonlinear_eq
+
+    @property
+    def radius(self):
+        """
+        Trust-region radius.
+
+        Returns
+        -------
+        float
+            Trust-region radius.
+        """
+        return self._radius
+
+    @radius.setter
+    def radius(self, radius):
+        """
+        Set the trust-region radius.
+
+        Parameters
+        ----------
+        radius : float
+            New trust-region radius.
+        """
+        self._radius = radius
+        if (
+            self.radius
+            <= self._constants[Constants.DECREASE_RADIUS_THRESHOLD]
+            * self.resolution
+        ):
+            self._radius = self.resolution
+
+    @property
+    def resolution(self):
+        """
+        Resolution of the trust-region framework.
+
+        The resolution is a lower bound on the trust-region radius.
+
+        Returns
+        -------
+        float
+            Resolution of the trust-region framework.
+        """
+        return self._resolution
+
+    @resolution.setter
+    def resolution(self, resolution):
+        """
+        Set the resolution of the trust-region framework.
+
+        Parameters
+        ----------
+        resolution : float
+            New resolution of the trust-region framework.
+        """
+        self._resolution = resolution
+
+    @property
+    def penalty(self):
+        """
+        Penalty parameter.
+
+        Returns
+        -------
+        float
+            Penalty parameter.
+        """
+        return self._penalty
+
+    @property
+    def models(self):
+        """
+        Models of the objective function and constraints.
+
+        Returns
+        -------
+        `cobyqa.models.Models`
+            Models of the objective function and constraints.
+        """
+        return self._models
+
+    @property
+    def best_index(self):
+        """
+        Index of the best interpolation point.
+
+        Returns
+        -------
+        int
+            Index of the best interpolation point.
+        """
+        return self._best_index
+
+    @property
+    def x_best(self):
+        """
+        Best interpolation point.
+
+        Its value is interpreted as relative to the origin, not the base point.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Best interpolation point.
+        """
+        return self.models.interpolation.point(self.best_index)
+
+    @property
+    def fun_best(self):
+        """
+        Value of the objective function at `x_best`.
+
+        Returns
+        -------
+        float
+            Value of the objective function at `x_best`.
+        """
+        return self.models.fun_val[self.best_index]
+
+    @property
+    def cub_best(self):
+        """
+        Values of the nonlinear inequality constraints at `x_best`.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Values of the nonlinear inequality constraints at `x_best`.
+        """
+        return self.models.cub_val[self.best_index, :]
+
+    @property
+    def ceq_best(self):
+        """
+        Values of the nonlinear equality constraints at `x_best`.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_nonlinear_eq,)
+            Values of the nonlinear equality constraints at `x_best`.
+        """
+        return self.models.ceq_val[self.best_index, :]
+
+    def lag_model(self, x):
+        """
+        Evaluate the Lagrangian model at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the Lagrangian model is evaluated.
+
+        Returns
+        -------
+        float
+            Value of the Lagrangian model at `x`.
+        """
+        return (
+            self.models.fun(x)
+            + self._lm_linear_ub
+            @ (self._pb.linear.a_ub @ x - self._pb.linear.b_ub)
+            + self._lm_linear_eq
+            @ (self._pb.linear.a_eq @ x - self._pb.linear.b_eq)
+            + self._lm_nonlinear_ub @ self.models.cub(x)
+            + self._lm_nonlinear_eq @ self.models.ceq(x)
+        )
+
+    def lag_model_grad(self, x):
+        """
+        Evaluate the gradient of the Lagrangian model at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the gradient of the Lagrangian model is evaluated.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Gradient of the Lagrangian model at `x`.
+        """
+        return (
+            self.models.fun_grad(x)
+            + self._lm_linear_ub @ self._pb.linear.a_ub
+            + self._lm_linear_eq @ self._pb.linear.a_eq
+            + self._lm_nonlinear_ub @ self.models.cub_grad(x)
+            + self._lm_nonlinear_eq @ self.models.ceq_grad(x)
+        )
+
+    def lag_model_hess(self):
+        """
+        Evaluate the Hessian matrix of the Lagrangian model at a given point.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n, n)
+            Hessian matrix of the Lagrangian model at `x`.
+        """
+        hess = self.models.fun_hess()
+        if self.m_nonlinear_ub > 0:
+            hess += self._lm_nonlinear_ub @ self.models.cub_hess()
+        if self.m_nonlinear_eq > 0:
+            hess += self._lm_nonlinear_eq @ self.models.ceq_hess()
+        return hess
+
+    def lag_model_hess_prod(self, v):
+        """
+        Evaluate the right product of the Hessian matrix of the Lagrangian
+        model with a given vector.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Vector with which the Hessian matrix of the Lagrangian model is
+            multiplied from the right.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Right product of the Hessian matrix of the Lagrangian model with
+            `v`.
+        """
+        return (
+            self.models.fun_hess_prod(v)
+            + self._lm_nonlinear_ub @ self.models.cub_hess_prod(v)
+            + self._lm_nonlinear_eq @ self.models.ceq_hess_prod(v)
+        )
+
+    def lag_model_curv(self, v):
+        """
+        Evaluate the curvature of the Lagrangian model along a given direction.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Direction along which the curvature of the Lagrangian model is
+            evaluated.
+
+        Returns
+        -------
+        float
+            Curvature of the Lagrangian model along `v`.
+        """
+        return (
+            self.models.fun_curv(v)
+            + self._lm_nonlinear_ub @ self.models.cub_curv(v)
+            + self._lm_nonlinear_eq @ self.models.ceq_curv(v)
+        )
+
+    def sqp_fun(self, step):
+        """
+        Evaluate the objective function of the SQP subproblem.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Step along which the objective function of the SQP subproblem is
+            evaluated.
+
+        Returns
+        -------
+        float
+            Value of the objective function of the SQP subproblem along `step`.
+        """
+        return step @ (
+            self.models.fun_grad(self.x_best)
+            + 0.5 * self.lag_model_hess_prod(step)
+        )
+
+    def sqp_cub(self, step):
+        """
+        Evaluate the linearization of the nonlinear inequality constraints.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Step along which the linearization of the nonlinear inequality
+            constraints is evaluated.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Value of the linearization of the nonlinear inequality constraints
+            along `step`.
+        """
+        return (
+            self.models.cub(self.x_best)
+            + self.models.cub_grad(self.x_best) @ step
+        )
+
+    def sqp_ceq(self, step):
+        """
+        Evaluate the linearization of the nonlinear equality constraints.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Step along which the linearization of the nonlinear equality
+            constraints is evaluated.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Value of the linearization of the nonlinear equality constraints
+            along `step`.
+        """
+        return (
+            self.models.ceq(self.x_best)
+            + self.models.ceq_grad(self.x_best) @ step
+        )
+
+    def merit(self, x, fun_val=None, cub_val=None, ceq_val=None):
+        """
+        Evaluate the merit function at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the merit function is evaluated.
+        fun_val : float, optional
+            Value of the objective function at `x`. If not provided, the
+            objective function is evaluated at `x`.
+        cub_val : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Values of the nonlinear inequality constraints. If not provided,
+            the nonlinear inequality constraints are evaluated at `x`.
+        ceq_val : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Values of the nonlinear equality constraints. If not provided,
+            the nonlinear equality constraints are evaluated at `x`.
+
+        Returns
+        -------
+        float
+            Value of the merit function at `x`.
+        """
+        if fun_val is None or cub_val is None or ceq_val is None:
+            fun_val, cub_val, ceq_val = self._pb(x, self.penalty)
+        m_val = fun_val
+        if self._penalty > 0.0:
+            c_val = self._pb.violation(x, cub_val=cub_val, ceq_val=ceq_val)
+            if np.count_nonzero(c_val):
+                m_val += self._penalty * np.linalg.norm(c_val)
+        return m_val
+
+    def get_constraint_linearizations(self, x):
+        """
+        Get the linearizations of the constraints at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the linearizations of the constraints are evaluated.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_linear_ub + m_nonlinear_ub, n)
+            Left-hand side matrix of the linearized inequality constraints.
+        `numpy.ndarray`, shape (m_linear_ub + m_nonlinear_ub,)
+            Right-hand side vector of the linearized inequality constraints.
+        `numpy.ndarray`, shape (m_linear_eq + m_nonlinear_eq, n)
+            Left-hand side matrix of the linearized equality constraints.
+        `numpy.ndarray`, shape (m_linear_eq + m_nonlinear_eq,)
+            Right-hand side vector of the linearized equality constraints.
+        """
+        aub = np.block(
+            [
+                [self._pb.linear.a_ub],
+                [self.models.cub_grad(x)],
+            ]
+        )
+        bub = np.block(
+            [
+                self._pb.linear.b_ub - self._pb.linear.a_ub @ x,
+                -self.models.cub(x),
+            ]
+        )
+        aeq = np.block(
+            [
+                [self._pb.linear.a_eq],
+                [self.models.ceq_grad(x)],
+            ]
+        )
+        beq = np.block(
+            [
+                self._pb.linear.b_eq - self._pb.linear.a_eq @ x,
+                -self.models.ceq(x),
+            ]
+        )
+        return aub, bub, aeq, beq
+
+    def get_trust_region_step(self, options):
+        """
+        Get the trust-region step.
+
+        The trust-region step is computed by solving the derivative-free
+        trust-region SQP subproblem using a Byrd-Omojokun composite-step
+        approach. For more details, see Section 5.2.3 of [1]_.
+
+        Parameters
+        ----------
+        options : dict
+            Options of the solver.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Normal step.
+        `numpy.ndarray`, shape (n,)
+            Tangential step.
+
+        References
+        ----------
+        .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization
+           Methods and Software*. PhD thesis, Department of Applied
+           Mathematics, The Hong Kong Polytechnic University, Hong Kong, China,
+           2022. URL: https://theses.lib.polyu.edu.hk/handle/200/12294.
+        """
+        # Evaluate the linearizations of the constraints.
+        aub, bub, aeq, beq = self.get_constraint_linearizations(self.x_best)
+        xl = self._pb.bounds.xl - self.x_best
+        xu = self._pb.bounds.xu - self.x_best
+
+        # Evaluate the normal step.
+        radius = self._constants[Constants.BYRD_OMOJOKUN_FACTOR] * self.radius
+        normal_step = normal_byrd_omojokun(
+            aub,
+            bub,
+            aeq,
+            beq,
+            xl,
+            xu,
+            radius,
+            options[Options.DEBUG],
+            **self._constants,
+        )
+        if options[Options.DEBUG]:
+            tol = get_arrays_tol(xl, xu)
+            if (np.any(normal_step + tol < xl)
+                    or np.any(xu < normal_step - tol)):
+                warnings.warn(
+                    "the normal step does not respect the bound constraint.",
+                    RuntimeWarning,
+                    2,
+                )
+            if np.linalg.norm(normal_step) > 1.1 * radius:
+                warnings.warn(
+                    "the normal step does not respect the trust-region "
+                    "constraint.",
+                    RuntimeWarning,
+                    2,
+                )
+
+        # Evaluate the tangential step.
+        radius = np.sqrt(self.radius**2.0 - normal_step @ normal_step)
+        xl -= normal_step
+        xu -= normal_step
+        bub = np.maximum(bub - aub @ normal_step, 0.0)
+        g_best = self.models.fun_grad(self.x_best) + self.lag_model_hess_prod(
+            normal_step
+        )
+        if self._pb.type in ["unconstrained", "bound-constrained"]:
+            tangential_step = tangential_byrd_omojokun(
+                g_best,
+                self.lag_model_hess_prod,
+                xl,
+                xu,
+                radius,
+                options[Options.DEBUG],
+                **self._constants,
+            )
+        else:
+            tangential_step = constrained_tangential_byrd_omojokun(
+                g_best,
+                self.lag_model_hess_prod,
+                xl,
+                xu,
+                aub,
+                bub,
+                aeq,
+                radius,
+                options["debug"],
+                **self._constants,
+            )
+        if options[Options.DEBUG]:
+            tol = get_arrays_tol(xl, xu)
+            if np.any(tangential_step + tol < xl) or np.any(
+                xu < tangential_step - tol
+            ):
+                warnings.warn(
+                    "The tangential step does not respect the bound "
+                    "constraints.",
+                    RuntimeWarning,
+                    2,
+                )
+            if (
+                np.linalg.norm(normal_step + tangential_step)
+                > 1.1 * np.sqrt(2.0) * self.radius
+            ):
+                warnings.warn(
+                    "The trial step does not respect the trust-region "
+                    "constraint.",
+                    RuntimeWarning,
+                    2,
+                )
+        return normal_step, tangential_step
+
+    def get_geometry_step(self, k_new, options):
+        """
+        Get the geometry-improving step.
+
+        Three different geometry-improving steps are computed and the best one
+        is returned. For more details, see Section 5.2.7 of [1]_.
+
+        Parameters
+        ----------
+        k_new : int
+            Index of the interpolation point to be modified.
+        options : dict
+            Options of the solver.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Geometry-improving step.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the computation of a determinant fails.
+
+        References
+        ----------
+        .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization
+           Methods and Software*. PhD thesis, Department of Applied
+           Mathematics, The Hong Kong Polytechnic University, Hong Kong, China,
+           2022. URL: https://theses.lib.polyu.edu.hk/handle/200/12294.
+        """
+        if options[Options.DEBUG]:
+            assert (
+                k_new != self.best_index
+            ), "The index `k_new` must be different from the best index."
+
+        # Build the k_new-th Lagrange polynomial.
+        coord_vec = np.squeeze(np.eye(1, self.models.npt, k_new))
+        lag = Quadratic(
+            self.models.interpolation,
+            coord_vec,
+            options[Options.DEBUG],
+        )
+        g_lag = lag.grad(self.x_best, self.models.interpolation)
+
+        # Compute a simple constrained Cauchy step.
+        xl = self._pb.bounds.xl - self.x_best
+        xu = self._pb.bounds.xu - self.x_best
+        step = cauchy_geometry(
+            0.0,
+            g_lag,
+            lambda v: lag.curv(v, self.models.interpolation),
+            xl,
+            xu,
+            self.radius,
+            options[Options.DEBUG],
+        )
+        sigma = self.models.determinants(self.x_best + step, k_new)
+
+        # Compute the solution on the straight lines joining the interpolation
+        # points to the k-th one, and choose it if it provides a larger value
+        # of the determinant of the interpolation system in absolute value.
+        xpt = (
+            self.models.interpolation.xpt
+            - self.models.interpolation.xpt[:, self.best_index, np.newaxis]
+        )
+        xpt[:, [0, self.best_index]] = xpt[:, [self.best_index, 0]]
+        step_alt = spider_geometry(
+            0.0,
+            g_lag,
+            lambda v: lag.curv(v, self.models.interpolation),
+            xpt[:, 1:],
+            xl,
+            xu,
+            self.radius,
+            options[Options.DEBUG],
+        )
+        sigma_alt = self.models.determinants(self.x_best + step_alt, k_new)
+        if abs(sigma_alt) > abs(sigma):
+            step = step_alt
+            sigma = sigma_alt
+
+        # Compute a Cauchy step on the tangent space of the active constraints.
+        if self._pb.type in [
+            "linearly constrained",
+            "nonlinearly constrained",
+        ]:
+            aub, bub, aeq, beq = (
+                self.get_constraint_linearizations(self.x_best))
+            tol_bd = get_arrays_tol(xl, xu)
+            tol_ub = get_arrays_tol(bub)
+            free_xl = xl <= -tol_bd
+            free_xu = xu >= tol_bd
+            free_ub = bub >= tol_ub
+
+            # Compute the Cauchy step.
+            n_act, q = qr_tangential_byrd_omojokun(
+                aub,
+                aeq,
+                free_xl,
+                free_xu,
+                free_ub,
+            )
+            g_lag_proj = q[:, n_act:] @ (q[:, n_act:].T @ g_lag)
+            norm_g_lag_proj = np.linalg.norm(g_lag_proj)
+            if 0 < n_act < self._pb.n and norm_g_lag_proj > TINY * self.radius:
+                step_alt = (self.radius / norm_g_lag_proj) * g_lag_proj
+                if lag.curv(step_alt, self.models.interpolation) < 0.0:
+                    step_alt = -step_alt
+
+                # Evaluate the constraint violation at the Cauchy step.
+                cbd = np.block([xl - step_alt, step_alt - xu])
+                cub = aub @ step_alt - bub
+                ceq = aeq @ step_alt - beq
+                maxcv_val = max(
+                    np.max(array, initial=0.0)
+                    for array in [cbd, cub, np.abs(ceq)]
+                )
+
+                # Accept the new step if it is nearly feasible and do not
+                # drastically worsen the determinant of the interpolation
+                # system in absolute value.
+                tol = np.max(np.abs(step_alt[~free_xl]), initial=0.0)
+                tol = np.max(np.abs(step_alt[~free_xu]), initial=tol)
+                tol = np.max(np.abs(aub[~free_ub, :] @ step_alt), initial=tol)
+                tol = min(10.0 * tol, 1e-2 * np.linalg.norm(step_alt))
+                if maxcv_val <= tol:
+                    sigma_alt = self.models.determinants(
+                        self.x_best + step_alt, k_new
+                    )
+                    if abs(sigma_alt) >= 0.1 * abs(sigma):
+                        step = np.clip(step_alt, xl, xu)
+
+        if options[Options.DEBUG]:
+            tol = get_arrays_tol(xl, xu)
+            if np.any(step + tol < xl) or np.any(xu < step - tol):
+                warnings.warn(
+                    "The geometry step does not respect the bound "
+                    "constraints.",
+                    RuntimeWarning,
+                    2,
+                )
+            if np.linalg.norm(step) > 1.1 * self.radius:
+                warnings.warn(
+                    "The geometry step does not respect the "
+                    "trust-region constraint.",
+                    RuntimeWarning,
+                    2,
+                )
+        return step
+
+    def get_second_order_correction_step(self, step, options):
+        """
+        Get the second-order correction step.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Trust-region step.
+        options : dict
+            Options of the solver.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Second-order correction step.
+        """
+        # Evaluate the linearizations of the constraints.
+        aub, bub, aeq, beq = self.get_constraint_linearizations(self.x_best)
+        xl = self._pb.bounds.xl - self.x_best
+        xu = self._pb.bounds.xu - self.x_best
+        radius = np.linalg.norm(step)
+        soc_step = normal_byrd_omojokun(
+            aub,
+            bub,
+            aeq,
+            beq,
+            xl,
+            xu,
+            radius,
+            options[Options.DEBUG],
+            **self._constants,
+        )
+        if options[Options.DEBUG]:
+            tol = get_arrays_tol(xl, xu)
+            if np.any(soc_step + tol < xl) or np.any(xu < soc_step - tol):
+                warnings.warn(
+                    "The second-order correction step does not "
+                    "respect the bound constraints.",
+                    RuntimeWarning,
+                    2,
+                )
+            if np.linalg.norm(soc_step) > 1.1 * radius:
+                warnings.warn(
+                    "The second-order correction step does not "
+                    "respect the trust-region constraint.",
+                    RuntimeWarning,
+                    2,
+                )
+        return soc_step
+
+    def get_reduction_ratio(self, step, fun_val, cub_val, ceq_val):
+        """
+        Get the reduction ratio.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Trust-region step.
+        fun_val : float
+            Objective function value at the trial point.
+        cub_val : `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Nonlinear inequality constraint values at the trial point.
+        ceq_val : `numpy.ndarray`, shape (m_nonlinear_eq,)
+            Nonlinear equality constraint values at the trial point.
+
+        Returns
+        -------
+        float
+            Reduction ratio.
+        """
+        merit_old = self.merit(
+            self.x_best,
+            self.fun_best,
+            self.cub_best,
+            self.ceq_best,
+        )
+        merit_new = self.merit(self.x_best + step, fun_val, cub_val, ceq_val)
+        merit_model_old = self.merit(
+            self.x_best,
+            0.0,
+            self.models.cub(self.x_best),
+            self.models.ceq(self.x_best),
+        )
+        merit_model_new = self.merit(
+            self.x_best + step,
+            self.sqp_fun(step),
+            self.sqp_cub(step),
+            self.sqp_ceq(step),
+        )
+        if abs(merit_model_old - merit_model_new) > TINY * abs(
+            merit_old - merit_new
+        ):
+            return (merit_old - merit_new) / abs(
+                merit_model_old - merit_model_new
+            )
+        else:
+            return -1.0
+
+    def increase_penalty(self, step):
+        """
+        Increase the penalty parameter.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Trust-region step.
+        """
+        aub, bub, aeq, beq = self.get_constraint_linearizations(self.x_best)
+        viol_diff = max(
+            np.linalg.norm(
+                np.block(
+                    [
+                        np.maximum(0.0, -bub),
+                        beq,
+                    ]
+                )
+            )
+            - np.linalg.norm(
+                np.block(
+                    [
+                        np.maximum(0.0, aub @ step - bub),
+                        aeq @ step - beq,
+                    ]
+                )
+            ),
+            0.0,
+        )
+        sqp_val = self.sqp_fun(step)
+
+        threshold = np.linalg.norm(
+            np.block(
+                [
+                    self._lm_linear_ub,
+                    self._lm_linear_eq,
+                    self._lm_nonlinear_ub,
+                    self._lm_nonlinear_eq,
+                ]
+            )
+        )
+        if abs(viol_diff) > TINY * abs(sqp_val):
+            threshold = max(threshold, sqp_val / viol_diff)
+        best_index_save = self.best_index
+        if (
+            self._penalty
+            <= self._constants[Constants.PENALTY_INCREASE_THRESHOLD]
+                * threshold
+        ):
+            self._penalty = max(
+                self._constants[Constants.PENALTY_INCREASE_FACTOR] * threshold,
+                1.0,
+            )
+            self.set_best_index()
+        return best_index_save == self.best_index
+
+    def decrease_penalty(self):
+        """
+        Decrease the penalty parameter.
+        """
+        self._penalty = min(self._penalty, self._get_low_penalty())
+        self.set_best_index()
+
+    def set_best_index(self):
+        """
+        Set the index of the best point.
+        """
+        best_index = self.best_index
+        m_best = self.merit(
+            self.x_best,
+            self.models.fun_val[best_index],
+            self.models.cub_val[best_index, :],
+            self.models.ceq_val[best_index, :],
+        )
+        r_best = self._pb.maxcv(
+            self.x_best,
+            self.models.cub_val[best_index, :],
+            self.models.ceq_val[best_index, :],
+        )
+        tol = (
+            10.0
+            * EPS
+            * max(self.models.n, self.models.npt)
+            * max(abs(m_best), 1.0)
+        )
+        for k in range(self.models.npt):
+            if k != self.best_index:
+                x_val = self.models.interpolation.point(k)
+                m_val = self.merit(
+                    x_val,
+                    self.models.fun_val[k],
+                    self.models.cub_val[k, :],
+                    self.models.ceq_val[k, :],
+                )
+                r_val = self._pb.maxcv(
+                    x_val,
+                    self.models.cub_val[k, :],
+                    self.models.ceq_val[k, :],
+                )
+                if m_val < m_best or (m_val < m_best + tol and r_val < r_best):
+                    best_index = k
+                    m_best = m_val
+                    r_best = r_val
+        self._best_index = best_index
+
+    def get_index_to_remove(self, x_new=None):
+        """
+        Get the index of the interpolation point to remove.
+
+        If `x_new` is not provided, the index returned should be used during
+        the geometry-improvement phase. Otherwise, the index returned is the
+        best index for included `x_new` in the interpolation set.
+
+        Parameters
+        ----------
+        x_new : `numpy.ndarray`, shape (n,), optional
+            New point to be included in the interpolation set.
+
+        Returns
+        -------
+        int
+            Index of the interpolation point to remove.
+        float
+            Distance between `x_best` and the removed point.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the computation of a determinant fails.
+        """
+        dist_sq = np.sum(
+            (
+                self.models.interpolation.xpt
+                - self.models.interpolation.xpt[:, self.best_index, np.newaxis]
+            )
+            ** 2.0,
+            axis=0,
+        )
+        if x_new is None:
+            sigma = 1.0
+            weights = dist_sq
+        else:
+            sigma = self.models.determinants(x_new)
+            weights = (
+                np.maximum(
+                    1.0,
+                    dist_sq
+                    / max(
+                        self._constants[Constants.LOW_RADIUS_FACTOR]
+                        * self.radius,
+                        self.resolution,
+                    )
+                    ** 2.0,
+                )
+                ** 3.0
+            )
+            weights[self.best_index] = -1.0  # do not remove the best point
+        k_max = np.argmax(weights * np.abs(sigma))
+        return k_max, np.sqrt(dist_sq[k_max])
+
+    def update_radius(self, step, ratio):
+        """
+        Update the trust-region radius.
+
+        Parameters
+        ----------
+        step : `numpy.ndarray`, shape (n,)
+            Trust-region step.
+        ratio : float
+            Reduction ratio.
+        """
+        s_norm = np.linalg.norm(step)
+        if ratio <= self._constants[Constants.LOW_RATIO]:
+            self.radius *= self._constants[Constants.DECREASE_RADIUS_FACTOR]
+        elif ratio <= self._constants[Constants.HIGH_RATIO]:
+            self.radius = max(
+                self._constants[Constants.DECREASE_RADIUS_FACTOR]
+                * self.radius,
+                s_norm,
+            )
+        else:
+            self.radius = min(
+                self._constants[Constants.INCREASE_RADIUS_FACTOR]
+                * self.radius,
+                max(
+                    self._constants[Constants.DECREASE_RADIUS_FACTOR]
+                    * self.radius,
+                    self._constants[Constants.INCREASE_RADIUS_THRESHOLD]
+                    * s_norm,
+                ),
+            )
+
+    def enhance_resolution(self, options):
+        """
+        Enhance the resolution of the trust-region framework.
+
+        Parameters
+        ----------
+        options : dict
+            Options of the solver.
+        """
+        if (
+            self._constants[Constants.LARGE_RESOLUTION_THRESHOLD]
+            * options[Options.RHOEND]
+            < self.resolution
+        ):
+            self.resolution *= self._constants[
+                Constants.DECREASE_RESOLUTION_FACTOR
+            ]
+        elif (
+            self._constants[Constants.MODERATE_RESOLUTION_THRESHOLD]
+            * options[Options.RHOEND]
+            < self.resolution
+        ):
+            self.resolution = np.sqrt(self.resolution
+                                      * options[Options.RHOEND])
+        else:
+            self.resolution = options[Options.RHOEND]
+
+        # Reduce the trust-region radius.
+        self._radius = max(
+            self._constants[Constants.DECREASE_RADIUS_FACTOR] * self._radius,
+            self.resolution,
+        )
+
+    def shift_x_base(self, options):
+        """
+        Shift the base point to `x_best`.
+
+        Parameters
+        ----------
+        options : dict
+            Options of the solver.
+        """
+        self.models.shift_x_base(np.copy(self.x_best), options)
+
+    def set_multipliers(self, x):
+        """
+        Set the Lagrange multipliers.
+
+        This method computes and set the Lagrange multipliers of the linear and
+        nonlinear constraints to be the QP multipliers.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the Lagrange multipliers are computed.
+        """
+        # Build the constraints of the least-squares problem.
+        incl_linear_ub = self._pb.linear.a_ub @ x >= self._pb.linear.b_ub
+        incl_nonlinear_ub = self.cub_best >= 0.0
+        incl_xl = self._pb.bounds.xl >= x
+        incl_xu = self._pb.bounds.xu <= x
+        m_linear_ub = np.count_nonzero(incl_linear_ub)
+        m_nonlinear_ub = np.count_nonzero(incl_nonlinear_ub)
+        m_xl = np.count_nonzero(incl_xl)
+        m_xu = np.count_nonzero(incl_xu)
+
+        if (
+            m_linear_ub + m_nonlinear_ub + self.m_linear_eq
+                + self.m_nonlinear_eq > 0
+        ):
+            identity = np.eye(self._pb.n)
+            c_jac = np.r_[
+                -identity[incl_xl, :],
+                identity[incl_xu, :],
+                self._pb.linear.a_ub[incl_linear_ub, :],
+                self.models.cub_grad(x, incl_nonlinear_ub),
+                self._pb.linear.a_eq,
+                self.models.ceq_grad(x),
+            ]
+
+            # Solve the least-squares problem.
+            g_best = self.models.fun_grad(x)
+            xl_lm = np.full(c_jac.shape[0], -np.inf)
+            xl_lm[: m_xl + m_xu + m_linear_ub + m_nonlinear_ub] = 0.0
+            res = lsq_linear(
+                c_jac.T,
+                -g_best,
+                bounds=(xl_lm, np.inf),
+                method="bvls",
+            )
+
+            # Extract the Lagrange multipliers.
+            self._lm_linear_ub[incl_linear_ub] = res.x[
+                m_xl + m_xu:m_xl + m_xu + m_linear_ub
+            ]
+            self._lm_linear_ub[~incl_linear_ub] = 0.0
+            self._lm_nonlinear_ub[incl_nonlinear_ub] = res.x[
+                m_xl
+                + m_xu
+                + m_linear_ub:m_xl
+                + m_xu
+                + m_linear_ub
+                + m_nonlinear_ub
+            ]
+            self._lm_nonlinear_ub[~incl_nonlinear_ub] = 0.0
+            self._lm_linear_eq[:] = res.x[
+                m_xl
+                + m_xu
+                + m_linear_ub
+                + m_nonlinear_ub:m_xl
+                + m_xu
+                + m_linear_ub
+                + m_nonlinear_ub
+                + self.m_linear_eq
+            ]
+            self._lm_nonlinear_eq[:] = res.x[
+                m_xl + m_xu + m_linear_ub + m_nonlinear_ub + self.m_linear_eq:
+            ]
+
+    def _get_low_penalty(self):
+        r_val_ub = np.c_[
+            (
+                self.models.interpolation.x_base[np.newaxis, :]
+                + self.models.interpolation.xpt.T
+            )
+            @ self._pb.linear.a_ub.T
+            - self._pb.linear.b_ub[np.newaxis, :],
+            self.models.cub_val,
+        ]
+        r_val_eq = (
+            self.models.interpolation.x_base[np.newaxis, :]
+            + self.models.interpolation.xpt.T
+        ) @ self._pb.linear.a_eq.T - self._pb.linear.b_eq[np.newaxis, :]
+        r_val_eq = np.block(
+            [
+                r_val_eq,
+                -r_val_eq,
+                self.models.ceq_val,
+                -self.models.ceq_val,
+            ]
+        )
+        r_val = np.block([r_val_ub, r_val_eq])
+        c_min = np.nanmin(r_val, axis=0)
+        c_max = np.nanmax(r_val, axis=0)
+        indices = (
+            c_min
+            < self._constants[Constants.THRESHOLD_RATIO_CONSTRAINTS] * c_max
+        )
+        if np.any(indices):
+            f_min = np.nanmin(self.models.fun_val)
+            f_max = np.nanmax(self.models.fun_val)
+            c_min_neg = np.minimum(0.0, c_min[indices])
+            c_diff = np.min(c_max[indices] - c_min_neg)
+            if c_diff > TINY * (f_max - f_min):
+                penalty = (f_max - f_min) / c_diff
+            else:
+                penalty = np.inf
+        else:
+            penalty = 0.0
+        return penalty
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/main.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/main.py
new file mode 100644
index 0000000000000000000000000000000000000000..01e5159e0dfebed9a78c6948cb99bfb1d744b6c7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/main.py
@@ -0,0 +1,1506 @@
+import warnings
+
+import numpy as np
+from scipy.optimize import (
+    Bounds,
+    LinearConstraint,
+    NonlinearConstraint,
+    OptimizeResult,
+)
+
+from .framework import TrustRegion
+from .problem import (
+    ObjectiveFunction,
+    BoundConstraints,
+    LinearConstraints,
+    NonlinearConstraints,
+    Problem,
+)
+from .utils import (
+    MaxEvalError,
+    TargetSuccess,
+    CallbackSuccess,
+    FeasibleSuccess,
+    exact_1d_array,
+)
+from .settings import (
+    ExitStatus,
+    Options,
+    Constants,
+    DEFAULT_OPTIONS,
+    DEFAULT_CONSTANTS,
+    PRINT_OPTIONS,
+)
+
+
+def minimize(
+    fun,
+    x0,
+    args=(),
+    bounds=None,
+    constraints=(),
+    callback=None,
+    options=None,
+    **kwargs,
+):
+    r"""
+    Minimize a scalar function using the COBYQA method.
+
+    The Constrained Optimization BY Quadratic Approximations (COBYQA) method is
+    a derivative-free optimization method designed to solve general nonlinear
+    optimization problems. A complete description of COBYQA is given in [3]_.
+
+    Parameters
+    ----------
+    fun : {callable, None}
+        Objective function to be minimized.
+
+            ``fun(x, *args) -> float``
+
+        where ``x`` is an array with shape (n,) and `args` is a tuple. If `fun`
+        is ``None``, the objective function is assumed to be the zero function,
+        resulting in a feasibility problem.
+    x0 : array_like, shape (n,)
+        Initial guess.
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bounds : {`scipy.optimize.Bounds`, array_like, shape (n, 2)}, optional
+        Bound constraints of the problem. It can be one of the cases below.
+
+        #. An instance of `scipy.optimize.Bounds`. For the time being, the
+           argument ``keep_feasible`` is disregarded, and all the constraints
+           are considered unrelaxable and will be enforced.
+        #. An array with shape (n, 2). The bound constraints for ``x[i]`` are
+           ``bounds[i][0] <= x[i] <= bounds[i][1]``. Set ``bounds[i][0]`` to
+           :math:`-\infty` if there is no lower bound, and set ``bounds[i][1]``
+           to :math:`\infty` if there is no upper bound.
+
+        The COBYQA method always respect the bound constraints.
+    constraints : {Constraint, list}, optional
+        General constraints of the problem. It can be one of the cases below.
+
+        #. An instance of `scipy.optimize.LinearConstraint`. The argument
+           ``keep_feasible`` is disregarded.
+        #. An instance of `scipy.optimize.NonlinearConstraint`. The arguments
+           ``jac``, ``hess``, ``keep_feasible``, ``finite_diff_rel_step``, and
+           ``finite_diff_jac_sparsity`` are disregarded.
+
+        #. A list, each of whose elements are described in the cases above.
+
+    callback : callable, optional
+        A callback executed at each objective function evaluation. The method
+        terminates if a ``StopIteration`` exception is raised by the callback
+        function. Its signature can be one of the following:
+
+            ``callback(intermediate_result)``
+
+        where ``intermediate_result`` is a keyword parameter that contains an
+        instance of `scipy.optimize.OptimizeResult`, with attributes ``x``
+        and ``fun``, being the point at which the objective function is
+        evaluated and the value of the objective function, respectively. The
+        name of the parameter must be ``intermediate_result`` for the callback
+        to be passed an instance of `scipy.optimize.OptimizeResult`.
+
+        Alternatively, the callback function can have the signature:
+
+            ``callback(xk)``
+
+        where ``xk`` is the point at which the objective function is evaluated.
+        Introspection is used to determine which of the signatures to invoke.
+    options : dict, optional
+        Options passed to the solver. Accepted keys are:
+
+            disp : bool, optional
+                Whether to print information about the optimization procedure.
+                Default is ``False``.
+            maxfev : int, optional
+                Maximum number of function evaluations. Default is ``500 * n``.
+            maxiter : int, optional
+                Maximum number of iterations. Default is ``1000 * n``.
+            target : float, optional
+                Target on the objective function value. The optimization
+                procedure is terminated when the objective function value of a
+                feasible point is less than or equal to this target. Default is
+                ``-numpy.inf``.
+            feasibility_tol : float, optional
+                Tolerance on the constraint violation. If the maximum
+                constraint violation at a point is less than or equal to this
+                tolerance, the point is considered feasible. Default is
+                ``numpy.sqrt(numpy.finfo(float).eps)``.
+            radius_init : float, optional
+                Initial trust-region radius. Typically, this value should be in
+                the order of one tenth of the greatest expected change to `x0`.
+                Default is ``1.0``.
+            radius_final : float, optional
+                Final trust-region radius. It should indicate the accuracy
+                required in the final values of the variables. Default is
+                ``1e-6``.
+            nb_points : int, optional
+                Number of interpolation points used to build the quadratic
+                models of the objective and constraint functions. Default is
+                ``2 * n + 1``.
+            scale : bool, optional
+                Whether to scale the variables according to the bounds. Default
+                is ``False``.
+            filter_size : int, optional
+                Maximum number of points in the filter. The filter is used to
+                select the best point returned by the optimization procedure.
+                Default is ``sys.maxsize``.
+            store_history : bool, optional
+                Whether to store the history of the function evaluations.
+                Default is ``False``.
+            history_size : int, optional
+                Maximum number of function evaluations to store in the history.
+                Default is ``sys.maxsize``.
+            debug : bool, optional
+                Whether to perform additional checks during the optimization
+                procedure. This option should be used only for debugging
+                purposes and is highly discouraged to general users. Default is
+                ``False``.
+
+        Other constants (from the keyword arguments) are described below. They
+        are not intended to be changed by general users. They should only be
+        changed by users with a deep understanding of the algorithm, who want
+        to experiment with different settings.
+
+    Returns
+    -------
+    `scipy.optimize.OptimizeResult`
+        Result of the optimization procedure, with the following fields:
+
+            message : str
+                Description of the cause of the termination.
+            success : bool
+                Whether the optimization procedure terminated successfully.
+            status : int
+                Termination status of the optimization procedure.
+            x : `numpy.ndarray`, shape (n,)
+                Solution point.
+            fun : float
+                Objective function value at the solution point.
+            maxcv : float
+                Maximum constraint violation at the solution point.
+            nfev : int
+                Number of function evaluations.
+            nit : int
+                Number of iterations.
+
+        If ``store_history`` is True, the result also has the following fields:
+
+            fun_history : `numpy.ndarray`, shape (nfev,)
+                History of the objective function values.
+            maxcv_history : `numpy.ndarray`, shape (nfev,)
+                History of the maximum constraint violations.
+
+        A description of the termination statuses is given below.
+
+        .. list-table::
+            :widths: 25 75
+            :header-rows: 1
+
+            * - Exit status
+              - Description
+            * - 0
+              - The lower bound for the trust-region radius has been reached.
+            * - 1
+              - The target objective function value has been reached.
+            * - 2
+              - All variables are fixed by the bound constraints.
+            * - 3
+              - The callback requested to stop the optimization procedure.
+            * - 4
+              - The feasibility problem received has been solved successfully.
+            * - 5
+              - The maximum number of function evaluations has been exceeded.
+            * - 6
+              - The maximum number of iterations has been exceeded.
+            * - -1
+              - The bound constraints are infeasible.
+            * - -2
+              - A linear algebra error occurred.
+
+    Other Parameters
+    ----------------
+    decrease_radius_factor : float, optional
+        Factor by which the trust-region radius is reduced when the reduction
+        ratio is low or negative. Default is ``0.5``.
+    increase_radius_factor : float, optional
+        Factor by which the trust-region radius is increased when the reduction
+        ratio is large. Default is ``numpy.sqrt(2.0)``.
+    increase_radius_threshold : float, optional
+        Threshold that controls the increase of the trust-region radius when
+        the reduction ratio is large. Default is ``2.0``.
+    decrease_radius_threshold : float, optional
+        Threshold used to determine whether the trust-region radius should be
+        reduced to the resolution. Default is ``1.4``.
+    decrease_resolution_factor : float, optional
+        Factor by which the resolution is reduced when the current value is far
+        from its final value. Default is ``0.1``.
+    large_resolution_threshold : float, optional
+        Threshold used to determine whether the resolution is far from its
+        final value. Default is ``250.0``.
+    moderate_resolution_threshold : float, optional
+        Threshold used to determine whether the resolution is close to its
+        final value. Default is ``16.0``.
+    low_ratio : float, optional
+        Threshold used to determine whether the reduction ratio is low. Default
+        is ``0.1``.
+    high_ratio : float, optional
+        Threshold used to determine whether the reduction ratio is high.
+        Default is ``0.7``.
+    very_low_ratio : float, optional
+        Threshold used to determine whether the reduction ratio is very low.
+        This is used to determine whether the models should be reset. Default
+        is ``0.01``.
+    penalty_increase_threshold : float, optional
+        Threshold used to determine whether the penalty parameter should be
+        increased. Default is ``1.5``.
+    penalty_increase_factor : float, optional
+        Factor by which the penalty parameter is increased. Default is ``2.0``.
+    short_step_threshold : float, optional
+        Factor used to determine whether the trial step is too short. Default
+        is ``0.5``.
+    low_radius_factor : float, optional
+        Factor used to determine which interpolation point should be removed
+        from the interpolation set at each iteration. Default is ``0.1``.
+    byrd_omojokun_factor : float, optional
+        Factor by which the trust-region radius is reduced for the computations
+        of the normal step in the Byrd-Omojokun composite-step approach.
+        Default is ``0.8``.
+    threshold_ratio_constraints : float, optional
+        Threshold used to determine which constraints should be taken into
+        account when decreasing the penalty parameter. Default is ``2.0``.
+    large_shift_factor : float, optional
+        Factor used to determine whether the point around which the quadratic
+        models are built should be updated. Default is ``10.0``.
+    large_gradient_factor : float, optional
+        Factor used to determine whether the models should be reset. Default is
+        ``10.0``.
+    resolution_factor : float, optional
+        Factor by which the resolution is decreased. Default is ``2.0``.
+    improve_tcg : bool, optional
+        Whether to improve the steps computed by the truncated conjugate
+        gradient method when the trust-region boundary is reached. Default is
+        ``True``.
+
+    References
+    ----------
+    .. [1] J. Nocedal and S. J. Wright. *Numerical Optimization*. Springer Ser.
+       Oper. Res. Financ. Eng. Springer, New York, NY, USA, second edition,
+       2006. `doi:10.1007/978-0-387-40065-5
+       `_.
+    .. [2] M. J. D. Powell. A direct search optimization method that models the
+       objective and constraint functions by linear interpolation. In S. Gomez
+       and J.-P. Hennart, editors, *Advances in Optimization and Numerical
+       Analysis*, volume 275 of Math. Appl., pages 51--67. Springer, Dordrecht,
+       Netherlands, 1994. `doi:10.1007/978-94-015-8330-5_4
+       `_.
+    .. [3] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+
+    Examples
+    --------
+    To demonstrate how to use `minimize`, we first minimize the Rosenbrock
+    function implemented in `scipy.optimize` in an unconstrained setting.
+
+    .. testsetup::
+
+        import numpy as np
+        np.set_printoptions(precision=3, suppress=True)
+
+    >>> from cobyqa import minimize
+    >>> from scipy.optimize import rosen
+
+    To solve the problem using COBYQA, run:
+
+    >>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
+    >>> res = minimize(rosen, x0)
+    >>> res.x
+    array([1., 1., 1., 1., 1.])
+
+    To see how bound and constraints are handled using `minimize`, we solve
+    Example 16.4 of [1]_, defined as
+
+    .. math::
+
+        \begin{aligned}
+            \min_{x \in \mathbb{R}^2}   & \quad (x_1 - 1)^2 + (x_2 - 2.5)^2\\
+            \text{s.t.}                 & \quad -x_1 + 2x_2 \le 2,\\
+                                        & \quad x_1 + 2x_2 \le 6,\\
+                                        & \quad x_1 - 2x_2 \le 2,\\
+                                        & \quad x_1 \ge 0,\\
+                                        & \quad x_2 \ge 0.
+        \end{aligned}
+
+    >>> import numpy as np
+    >>> from scipy.optimize import Bounds, LinearConstraint
+
+    Its objective function can be implemented as:
+
+    >>> def fun(x):
+    ...     return (x[0] - 1.0)**2 + (x[1] - 2.5)**2
+
+    This problem can be solved using `minimize` as:
+
+    >>> x0 = [2.0, 0.0]
+    >>> bounds = Bounds([0.0, 0.0], np.inf)
+    >>> constraints = LinearConstraint([
+    ...     [-1.0, 2.0],
+    ...     [1.0, 2.0],
+    ...     [1.0, -2.0],
+    ... ], -np.inf, [2.0, 6.0, 2.0])
+    >>> res = minimize(fun, x0, bounds=bounds, constraints=constraints)
+    >>> res.x
+    array([1.4, 1.7])
+
+    To see how nonlinear constraints are handled, we solve Problem (F) of [2]_,
+    defined as
+
+    .. math::
+
+        \begin{aligned}
+            \min_{x \in \mathbb{R}^2}   & \quad -x_1 - x_2\\
+            \text{s.t.}                 & \quad x_1^2 - x_2 \le 0,\\
+                                        & \quad x_1^2 + x_2^2 \le 1.
+        \end{aligned}
+
+    >>> from scipy.optimize import NonlinearConstraint
+
+    Its objective and constraint functions can be implemented as:
+
+    >>> def fun(x):
+    ...     return -x[0] - x[1]
+    >>>
+    >>> def cub(x):
+    ...     return [x[0]**2 - x[1], x[0]**2 + x[1]**2]
+
+    This problem can be solved using `minimize` as:
+
+    >>> x0 = [1.0, 1.0]
+    >>> constraints = NonlinearConstraint(cub, -np.inf, [0.0, 1.0])
+    >>> res = minimize(fun, x0, constraints=constraints)
+    >>> res.x
+    array([0.707, 0.707])
+
+    Finally, to see how to supply linear and nonlinear constraints
+    simultaneously, we solve Problem (G) of [2]_, defined as
+
+    .. math::
+
+        \begin{aligned}
+            \min_{x \in \mathbb{R}^3}   & \quad x_3\\
+            \text{s.t.}                 & \quad 5x_1 - x_2 + x_3 \ge 0,\\
+                                        & \quad -5x_1 - x_2 + x_3 \ge 0,\\
+                                        & \quad x_1^2 + x_2^2 + 4x_2 \le x_3.
+        \end{aligned}
+
+    Its objective and nonlinear constraint functions can be implemented as:
+
+    >>> def fun(x):
+    ...     return x[2]
+    >>>
+    >>> def cub(x):
+    ...     return x[0]**2 + x[1]**2 + 4.0*x[1] - x[2]
+
+    This problem can be solved using `minimize` as:
+
+    >>> x0 = [1.0, 1.0, 1.0]
+    >>> constraints = [
+    ...     LinearConstraint(
+    ...         [[5.0, -1.0, 1.0], [-5.0, -1.0, 1.0]],
+    ...         [0.0, 0.0],
+    ...         np.inf,
+    ...     ),
+    ...     NonlinearConstraint(cub, -np.inf, 0.0),
+    ... ]
+    >>> res = minimize(fun, x0, constraints=constraints)
+    >>> res.x
+    array([ 0., -3., -3.])
+    """
+    # Get basic options that are needed for the initialization.
+    if options is None:
+        options = {}
+    else:
+        options = dict(options)
+    verbose = options.get(Options.VERBOSE, DEFAULT_OPTIONS[Options.VERBOSE])
+    verbose = bool(verbose)
+    feasibility_tol = options.get(
+        Options.FEASIBILITY_TOL,
+        DEFAULT_OPTIONS[Options.FEASIBILITY_TOL],
+    )
+    feasibility_tol = float(feasibility_tol)
+    scale = options.get(Options.SCALE, DEFAULT_OPTIONS[Options.SCALE])
+    scale = bool(scale)
+    store_history = options.get(
+        Options.STORE_HISTORY,
+        DEFAULT_OPTIONS[Options.STORE_HISTORY],
+    )
+    store_history = bool(store_history)
+    if Options.HISTORY_SIZE in options and options[Options.HISTORY_SIZE] <= 0:
+        raise ValueError("The size of the history must be positive.")
+    history_size = options.get(
+        Options.HISTORY_SIZE,
+        DEFAULT_OPTIONS[Options.HISTORY_SIZE],
+    )
+    history_size = int(history_size)
+    if Options.FILTER_SIZE in options and options[Options.FILTER_SIZE] <= 0:
+        raise ValueError("The size of the filter must be positive.")
+    filter_size = options.get(
+        Options.FILTER_SIZE,
+        DEFAULT_OPTIONS[Options.FILTER_SIZE],
+    )
+    filter_size = int(filter_size)
+    debug = options.get(Options.DEBUG, DEFAULT_OPTIONS[Options.DEBUG])
+    debug = bool(debug)
+
+    # Initialize the objective function.
+    if not isinstance(args, tuple):
+        args = (args,)
+    obj = ObjectiveFunction(fun, verbose, debug, *args)
+
+    # Initialize the bound constraints.
+    if not hasattr(x0, "__len__"):
+        x0 = [x0]
+    n_orig = len(x0)
+    bounds = BoundConstraints(_get_bounds(bounds, n_orig))
+
+    # Initialize the constraints.
+    linear_constraints, nonlinear_constraints = _get_constraints(constraints)
+    linear = LinearConstraints(linear_constraints, n_orig, debug)
+    nonlinear = NonlinearConstraints(nonlinear_constraints, verbose, debug)
+
+    # Initialize the problem (and remove the fixed variables).
+    pb = Problem(
+        obj,
+        x0,
+        bounds,
+        linear,
+        nonlinear,
+        callback,
+        feasibility_tol,
+        scale,
+        store_history,
+        history_size,
+        filter_size,
+        debug,
+    )
+
+    # Set the default options.
+    _set_default_options(options, pb.n)
+    constants = _set_default_constants(**kwargs)
+
+    # Initialize the models and skip the computations whenever possible.
+    if not pb.bounds.is_feasible:
+        # The bound constraints are infeasible.
+        return _build_result(
+            pb,
+            0.0,
+            False,
+            ExitStatus.INFEASIBLE_ERROR,
+            0,
+            options,
+        )
+    elif pb.n == 0:
+        # All variables are fixed by the bound constraints.
+        return _build_result(
+            pb,
+            0.0,
+            True,
+            ExitStatus.FIXED_SUCCESS,
+            0,
+            options,
+        )
+    if verbose:
+        print("Starting the optimization procedure.")
+        print(f"Initial trust-region radius: {options[Options.RHOBEG]}.")
+        print(f"Final trust-region radius: {options[Options.RHOEND]}.")
+        print(
+            f"Maximum number of function evaluations: "
+            f"{options[Options.MAX_EVAL]}."
+        )
+        print(f"Maximum number of iterations: {options[Options.MAX_ITER]}.")
+        print()
+    try:
+        framework = TrustRegion(pb, options, constants)
+    except TargetSuccess:
+        # The target on the objective function value has been reached
+        return _build_result(
+            pb,
+            0.0,
+            True,
+            ExitStatus.TARGET_SUCCESS,
+            0,
+            options,
+        )
+    except CallbackSuccess:
+        # The callback raised a StopIteration exception.
+        return _build_result(
+            pb,
+            0.0,
+            True,
+            ExitStatus.CALLBACK_SUCCESS,
+            0,
+            options,
+        )
+    except FeasibleSuccess:
+        # The feasibility problem has been solved successfully.
+        return _build_result(
+            pb,
+            0.0,
+            True,
+            ExitStatus.FEASIBLE_SUCCESS,
+            0,
+            options,
+        )
+    except MaxEvalError:
+        # The maximum number of function evaluations has been exceeded.
+        return _build_result(
+            pb,
+            0.0,
+            False,
+            ExitStatus.MAX_ITER_WARNING,
+            0,
+            options,
+        )
+    except np.linalg.LinAlgError:
+        # The construction of the initial interpolation set failed.
+        return _build_result(
+            pb,
+            0.0,
+            False,
+            ExitStatus.LINALG_ERROR,
+            0,
+            options,
+        )
+
+    # Start the optimization procedure.
+    success = False
+    n_iter = 0
+    k_new = None
+    n_short_steps = 0
+    n_very_short_steps = 0
+    n_alt_models = 0
+    while True:
+        # Stop the optimization procedure if the maximum number of iterations
+        # has been exceeded. We do not write the main loop as a for loop
+        # because we want to access the number of iterations outside the loop.
+        if n_iter >= options[Options.MAX_ITER]:
+            status = ExitStatus.MAX_ITER_WARNING
+            break
+        n_iter += 1
+
+        # Update the point around which the quadratic models are built.
+        if (
+            np.linalg.norm(
+                framework.x_best - framework.models.interpolation.x_base
+            )
+            >= constants[Constants.LARGE_SHIFT_FACTOR] * framework.radius
+        ):
+            framework.shift_x_base(options)
+
+        # Evaluate the trial step.
+        radius_save = framework.radius
+        normal_step, tangential_step = framework.get_trust_region_step(options)
+        step = normal_step + tangential_step
+        s_norm = np.linalg.norm(step)
+
+        # If the trial step is too short, we do not attempt to evaluate the
+        # objective and constraint functions. Instead, we reduce the
+        # trust-region radius and check whether the resolution should be
+        # enhanced and whether the geometry of the interpolation set should be
+        # improved. Otherwise, we entertain a classical iteration. The
+        # criterion for performing an exceptional jump is taken from NEWUOA.
+        if (
+            s_norm
+            <= constants[Constants.SHORT_STEP_THRESHOLD] * framework.resolution
+        ):
+            framework.radius *= constants[Constants.DECREASE_RESOLUTION_FACTOR]
+            if radius_save > framework.resolution:
+                n_short_steps = 0
+                n_very_short_steps = 0
+            else:
+                n_short_steps += 1
+                n_very_short_steps += 1
+                if s_norm > 0.1 * framework.resolution:
+                    n_very_short_steps = 0
+            enhance_resolution = n_short_steps >= 5 or n_very_short_steps >= 3
+            if enhance_resolution:
+                n_short_steps = 0
+                n_very_short_steps = 0
+                improve_geometry = False
+            else:
+                try:
+                    k_new, dist_new = framework.get_index_to_remove()
+                except np.linalg.LinAlgError:
+                    status = ExitStatus.LINALG_ERROR
+                    break
+                improve_geometry = dist_new > max(
+                    framework.radius,
+                    constants[Constants.RESOLUTION_FACTOR]
+                    * framework.resolution,
+                )
+        else:
+            # Increase the penalty parameter if necessary.
+            same_best_point = framework.increase_penalty(step)
+            if same_best_point:
+                # Evaluate the objective and constraint functions.
+                try:
+                    fun_val, cub_val, ceq_val = _eval(
+                        pb,
+                        framework,
+                        step,
+                        options,
+                    )
+                except TargetSuccess:
+                    status = ExitStatus.TARGET_SUCCESS
+                    success = True
+                    break
+                except FeasibleSuccess:
+                    status = ExitStatus.FEASIBLE_SUCCESS
+                    success = True
+                    break
+                except CallbackSuccess:
+                    status = ExitStatus.CALLBACK_SUCCESS
+                    success = True
+                    break
+                except MaxEvalError:
+                    status = ExitStatus.MAX_EVAL_WARNING
+                    break
+
+                # Perform a second-order correction step if necessary.
+                merit_old = framework.merit(
+                    framework.x_best,
+                    framework.fun_best,
+                    framework.cub_best,
+                    framework.ceq_best,
+                )
+                merit_new = framework.merit(
+                    framework.x_best + step, fun_val, cub_val, ceq_val
+                )
+                if (
+                    pb.type == "nonlinearly constrained"
+                    and merit_new > merit_old
+                    and np.linalg.norm(normal_step)
+                    > constants[Constants.BYRD_OMOJOKUN_FACTOR] ** 2.0
+                    * framework.radius
+                ):
+                    soc_step = framework.get_second_order_correction_step(
+                        step, options
+                    )
+                    if np.linalg.norm(soc_step) > 0.0:
+                        step += soc_step
+
+                        # Evaluate the objective and constraint functions.
+                        try:
+                            fun_val, cub_val, ceq_val = _eval(
+                                pb,
+                                framework,
+                                step,
+                                options,
+                            )
+                        except TargetSuccess:
+                            status = ExitStatus.TARGET_SUCCESS
+                            success = True
+                            break
+                        except FeasibleSuccess:
+                            status = ExitStatus.FEASIBLE_SUCCESS
+                            success = True
+                            break
+                        except CallbackSuccess:
+                            status = ExitStatus.CALLBACK_SUCCESS
+                            success = True
+                            break
+                        except MaxEvalError:
+                            status = ExitStatus.MAX_EVAL_WARNING
+                            break
+
+                # Calculate the reduction ratio.
+                ratio = framework.get_reduction_ratio(
+                    step,
+                    fun_val,
+                    cub_val,
+                    ceq_val,
+                )
+
+                # Choose an interpolation point to remove.
+                try:
+                    k_new = framework.get_index_to_remove(
+                        framework.x_best + step
+                    )[0]
+                except np.linalg.LinAlgError:
+                    status = ExitStatus.LINALG_ERROR
+                    break
+
+                # Update the interpolation set.
+                try:
+                    ill_conditioned = framework.models.update_interpolation(
+                        k_new, framework.x_best + step, fun_val, cub_val,
+                        ceq_val
+                    )
+                except np.linalg.LinAlgError:
+                    status = ExitStatus.LINALG_ERROR
+                    break
+                framework.set_best_index()
+
+                # Update the trust-region radius.
+                framework.update_radius(step, ratio)
+
+                # Attempt to replace the models by the alternative ones.
+                if framework.radius <= framework.resolution:
+                    if ratio >= constants[Constants.VERY_LOW_RATIO]:
+                        n_alt_models = 0
+                    else:
+                        n_alt_models += 1
+                        grad = framework.models.fun_grad(framework.x_best)
+                        try:
+                            grad_alt = framework.models.fun_alt_grad(
+                                framework.x_best
+                            )
+                        except np.linalg.LinAlgError:
+                            status = ExitStatus.LINALG_ERROR
+                            break
+                        if np.linalg.norm(grad) < constants[
+                            Constants.LARGE_GRADIENT_FACTOR
+                        ] * np.linalg.norm(grad_alt):
+                            n_alt_models = 0
+                        if n_alt_models >= 3:
+                            try:
+                                framework.models.reset_models()
+                            except np.linalg.LinAlgError:
+                                status = ExitStatus.LINALG_ERROR
+                                break
+                            n_alt_models = 0
+
+                # Update the Lagrange multipliers.
+                framework.set_multipliers(framework.x_best + step)
+
+                # Check whether the resolution should be enhanced.
+                try:
+                    k_new, dist_new = framework.get_index_to_remove()
+                except np.linalg.LinAlgError:
+                    status = ExitStatus.LINALG_ERROR
+                    break
+                improve_geometry = (
+                    ill_conditioned
+                    or ratio <= constants[Constants.LOW_RATIO]
+                    and dist_new
+                    > max(
+                        framework.radius,
+                        constants[Constants.RESOLUTION_FACTOR]
+                        * framework.resolution,
+                    )
+                )
+                enhance_resolution = (
+                    radius_save <= framework.resolution
+                    and ratio <= constants[Constants.LOW_RATIO]
+                    and not improve_geometry
+                )
+            else:
+                # When increasing the penalty parameter, the best point so far
+                # may change. In this case, we restart the iteration.
+                enhance_resolution = False
+                improve_geometry = False
+
+        # Reduce the resolution if necessary.
+        if enhance_resolution:
+            if framework.resolution <= options[Options.RHOEND]:
+                success = True
+                status = ExitStatus.RADIUS_SUCCESS
+                break
+            framework.enhance_resolution(options)
+            framework.decrease_penalty()
+
+            if verbose:
+                maxcv_val = pb.maxcv(
+                    framework.x_best, framework.cub_best, framework.ceq_best
+                )
+                _print_step(
+                    f"New trust-region radius: {framework.resolution}",
+                    pb,
+                    pb.build_x(framework.x_best),
+                    framework.fun_best,
+                    maxcv_val,
+                    pb.n_eval,
+                    n_iter,
+                )
+                print()
+
+        # Improve the geometry of the interpolation set if necessary.
+        if improve_geometry:
+            try:
+                step = framework.get_geometry_step(k_new, options)
+            except np.linalg.LinAlgError:
+                status = ExitStatus.LINALG_ERROR
+                break
+
+            # Evaluate the objective and constraint functions.
+            try:
+                fun_val, cub_val, ceq_val = _eval(pb, framework, step, options)
+            except TargetSuccess:
+                status = ExitStatus.TARGET_SUCCESS
+                success = True
+                break
+            except FeasibleSuccess:
+                status = ExitStatus.FEASIBLE_SUCCESS
+                success = True
+                break
+            except CallbackSuccess:
+                status = ExitStatus.CALLBACK_SUCCESS
+                success = True
+                break
+            except MaxEvalError:
+                status = ExitStatus.MAX_EVAL_WARNING
+                break
+
+            # Update the interpolation set.
+            try:
+                framework.models.update_interpolation(
+                    k_new,
+                    framework.x_best + step,
+                    fun_val,
+                    cub_val,
+                    ceq_val,
+                )
+            except np.linalg.LinAlgError:
+                status = ExitStatus.LINALG_ERROR
+                break
+            framework.set_best_index()
+
+    return _build_result(
+        pb,
+        framework.penalty,
+        success,
+        status,
+        n_iter,
+        options,
+    )
+
+
+def _get_bounds(bounds, n):
+    """
+    Uniformize the bounds.
+    """
+    if bounds is None:
+        return Bounds(np.full(n, -np.inf), np.full(n, np.inf))
+    elif isinstance(bounds, Bounds):
+        if bounds.lb.shape != (n,) or bounds.ub.shape != (n,):
+            raise ValueError(f"The bounds must have {n} elements.")
+        return Bounds(bounds.lb, bounds.ub)
+    elif hasattr(bounds, "__len__"):
+        bounds = np.asarray(bounds)
+        if bounds.shape != (n, 2):
+            raise ValueError(
+                "The shape of the bounds is not compatible with "
+                "the number of variables."
+            )
+        return Bounds(bounds[:, 0], bounds[:, 1])
+    else:
+        raise TypeError(
+            "The bounds must be an instance of "
+            "scipy.optimize.Bounds or an array-like object."
+        )
+
+
+def _get_constraints(constraints):
+    """
+    Extract the linear and nonlinear constraints.
+    """
+    if isinstance(constraints, dict) or not hasattr(constraints, "__len__"):
+        constraints = (constraints,)
+
+    # Extract the linear and nonlinear constraints.
+    linear_constraints = []
+    nonlinear_constraints = []
+    for constraint in constraints:
+        if isinstance(constraint, LinearConstraint):
+            lb = exact_1d_array(
+                constraint.lb,
+                "The lower bound of the linear constraints must be a vector.",
+            )
+            ub = exact_1d_array(
+                constraint.ub,
+                "The upper bound of the linear constraints must be a vector.",
+            )
+            linear_constraints.append(
+                LinearConstraint(
+                    constraint.A,
+                    *np.broadcast_arrays(lb, ub),
+                )
+            )
+        elif isinstance(constraint, NonlinearConstraint):
+            lb = exact_1d_array(
+                constraint.lb,
+                "The lower bound of the "
+                "nonlinear constraints must be a "
+                "vector.",
+            )
+            ub = exact_1d_array(
+                constraint.ub,
+                "The upper bound of the "
+                "nonlinear constraints must be a "
+                "vector.",
+            )
+            nonlinear_constraints.append(
+                NonlinearConstraint(
+                    constraint.fun,
+                    *np.broadcast_arrays(lb, ub),
+                )
+            )
+        elif isinstance(constraint, dict):
+            if "type" not in constraint or constraint["type"] not in (
+                "eq",
+                "ineq",
+            ):
+                raise ValueError('The constraint type must be "eq" or "ineq".')
+            if "fun" not in constraint or not callable(constraint["fun"]):
+                raise ValueError("The constraint function must be callable.")
+            nonlinear_constraints.append(
+                {
+                    "fun": constraint["fun"],
+                    "type": constraint["type"],
+                    "args": constraint.get("args", ()),
+                }
+            )
+        else:
+            raise TypeError(
+                "The constraints must be instances of "
+                "scipy.optimize.LinearConstraint, "
+                "scipy.optimize.NonlinearConstraint, or dict."
+            )
+    return linear_constraints, nonlinear_constraints
+
+
+def _set_default_options(options, n):
+    """
+    Set the default options.
+    """
+    if Options.RHOBEG in options and options[Options.RHOBEG] <= 0.0:
+        raise ValueError("The initial trust-region radius must be positive.")
+    if Options.RHOEND in options and options[Options.RHOEND] < 0.0:
+        raise ValueError("The final trust-region radius must be nonnegative.")
+    if Options.RHOBEG in options and Options.RHOEND in options:
+        if options[Options.RHOBEG] < options[Options.RHOEND]:
+            raise ValueError(
+                "The initial trust-region radius must be greater "
+                "than or equal to the final trust-region radius."
+            )
+    elif Options.RHOBEG in options:
+        options[Options.RHOEND.value] = np.min(
+            [
+                DEFAULT_OPTIONS[Options.RHOEND],
+                options[Options.RHOBEG],
+            ]
+        )
+    elif Options.RHOEND in options:
+        options[Options.RHOBEG.value] = np.max(
+            [
+                DEFAULT_OPTIONS[Options.RHOBEG],
+                options[Options.RHOEND],
+            ]
+        )
+    else:
+        options[Options.RHOBEG.value] = DEFAULT_OPTIONS[Options.RHOBEG]
+        options[Options.RHOEND.value] = DEFAULT_OPTIONS[Options.RHOEND]
+    options[Options.RHOBEG.value] = float(options[Options.RHOBEG])
+    options[Options.RHOEND.value] = float(options[Options.RHOEND])
+    if Options.NPT in options and options[Options.NPT] <= 0:
+        raise ValueError("The number of interpolation points must be "
+                         "positive.")
+    if (
+        Options.NPT in options
+        and options[Options.NPT] > ((n + 1) * (n + 2)) // 2
+    ):
+        raise ValueError(
+            f"The number of interpolation points must be at most "
+            f"{((n + 1) * (n + 2)) // 2}."
+        )
+    options.setdefault(Options.NPT.value, DEFAULT_OPTIONS[Options.NPT](n))
+    options[Options.NPT.value] = int(options[Options.NPT])
+    if Options.MAX_EVAL in options and options[Options.MAX_EVAL] <= 0:
+        raise ValueError(
+            "The maximum number of function evaluations must be positive."
+        )
+    options.setdefault(
+        Options.MAX_EVAL.value,
+        np.max(
+            [
+                DEFAULT_OPTIONS[Options.MAX_EVAL](n),
+                options[Options.NPT] + 1,
+            ]
+        ),
+    )
+    options[Options.MAX_EVAL.value] = int(options[Options.MAX_EVAL])
+    if Options.MAX_ITER in options and options[Options.MAX_ITER] <= 0:
+        raise ValueError("The maximum number of iterations must be positive.")
+    options.setdefault(
+        Options.MAX_ITER.value,
+        DEFAULT_OPTIONS[Options.MAX_ITER](n),
+    )
+    options[Options.MAX_ITER.value] = int(options[Options.MAX_ITER])
+    options.setdefault(Options.TARGET.value, DEFAULT_OPTIONS[Options.TARGET])
+    options[Options.TARGET.value] = float(options[Options.TARGET])
+    options.setdefault(
+        Options.FEASIBILITY_TOL.value,
+        DEFAULT_OPTIONS[Options.FEASIBILITY_TOL],
+    )
+    options[Options.FEASIBILITY_TOL.value] = float(
+        options[Options.FEASIBILITY_TOL]
+    )
+    options.setdefault(Options.VERBOSE.value, DEFAULT_OPTIONS[Options.VERBOSE])
+    options[Options.VERBOSE.value] = bool(options[Options.VERBOSE])
+    options.setdefault(Options.SCALE.value, DEFAULT_OPTIONS[Options.SCALE])
+    options[Options.SCALE.value] = bool(options[Options.SCALE])
+    options.setdefault(
+        Options.FILTER_SIZE.value,
+        DEFAULT_OPTIONS[Options.FILTER_SIZE],
+    )
+    options[Options.FILTER_SIZE.value] = int(options[Options.FILTER_SIZE])
+    options.setdefault(
+        Options.STORE_HISTORY.value,
+        DEFAULT_OPTIONS[Options.STORE_HISTORY],
+    )
+    options[Options.STORE_HISTORY.value] = bool(options[Options.STORE_HISTORY])
+    options.setdefault(
+        Options.HISTORY_SIZE.value,
+        DEFAULT_OPTIONS[Options.HISTORY_SIZE],
+    )
+    options[Options.HISTORY_SIZE.value] = int(options[Options.HISTORY_SIZE])
+    options.setdefault(Options.DEBUG.value, DEFAULT_OPTIONS[Options.DEBUG])
+    options[Options.DEBUG.value] = bool(options[Options.DEBUG])
+
+    # Check whether they are any unknown options.
+    for key in options:
+        if key not in Options.__members__.values():
+            warnings.warn(f"Unknown option: {key}.", RuntimeWarning, 3)
+
+
+def _set_default_constants(**kwargs):
+    """
+    Set the default constants.
+    """
+    constants = dict(kwargs)
+    constants.setdefault(
+        Constants.DECREASE_RADIUS_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.DECREASE_RADIUS_FACTOR],
+    )
+    constants[Constants.DECREASE_RADIUS_FACTOR.value] = float(
+        constants[Constants.DECREASE_RADIUS_FACTOR]
+    )
+    if (
+        constants[Constants.DECREASE_RADIUS_FACTOR] <= 0.0
+        or constants[Constants.DECREASE_RADIUS_FACTOR] >= 1.0
+    ):
+        raise ValueError(
+            "The constant decrease_radius_factor must be in the interval "
+            "(0, 1)."
+        )
+    constants.setdefault(
+        Constants.INCREASE_RADIUS_THRESHOLD.value,
+        DEFAULT_CONSTANTS[Constants.INCREASE_RADIUS_THRESHOLD],
+    )
+    constants[Constants.INCREASE_RADIUS_THRESHOLD.value] = float(
+        constants[Constants.INCREASE_RADIUS_THRESHOLD]
+    )
+    if constants[Constants.INCREASE_RADIUS_THRESHOLD] <= 1.0:
+        raise ValueError(
+            "The constant increase_radius_threshold must be greater than 1."
+        )
+    if (
+        Constants.INCREASE_RADIUS_FACTOR in constants
+        and constants[Constants.INCREASE_RADIUS_FACTOR] <= 1.0
+    ):
+        raise ValueError(
+            "The constant increase_radius_factor must be greater than 1."
+        )
+    if (
+        Constants.DECREASE_RADIUS_THRESHOLD in constants
+        and constants[Constants.DECREASE_RADIUS_THRESHOLD] <= 1.0
+    ):
+        raise ValueError(
+            "The constant decrease_radius_threshold must be greater than 1."
+        )
+    if (
+        Constants.INCREASE_RADIUS_FACTOR in constants
+        and Constants.DECREASE_RADIUS_THRESHOLD in constants
+    ):
+        if (
+            constants[Constants.DECREASE_RADIUS_THRESHOLD]
+            >= constants[Constants.INCREASE_RADIUS_FACTOR]
+        ):
+            raise ValueError(
+                "The constant decrease_radius_threshold must be "
+                "less than increase_radius_factor."
+            )
+    elif Constants.INCREASE_RADIUS_FACTOR in constants:
+        constants[Constants.DECREASE_RADIUS_THRESHOLD.value] = np.min(
+            [
+                DEFAULT_CONSTANTS[Constants.DECREASE_RADIUS_THRESHOLD],
+                0.5 * (1.0 + constants[Constants.INCREASE_RADIUS_FACTOR]),
+            ]
+        )
+    elif Constants.DECREASE_RADIUS_THRESHOLD in constants:
+        constants[Constants.INCREASE_RADIUS_FACTOR.value] = np.max(
+            [
+                DEFAULT_CONSTANTS[Constants.INCREASE_RADIUS_FACTOR],
+                2.0 * constants[Constants.DECREASE_RADIUS_THRESHOLD],
+            ]
+        )
+    else:
+        constants[Constants.INCREASE_RADIUS_FACTOR.value] = DEFAULT_CONSTANTS[
+            Constants.INCREASE_RADIUS_FACTOR
+        ]
+        constants[Constants.DECREASE_RADIUS_THRESHOLD.value] = (
+            DEFAULT_CONSTANTS[Constants.DECREASE_RADIUS_THRESHOLD])
+    constants.setdefault(
+        Constants.DECREASE_RESOLUTION_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.DECREASE_RESOLUTION_FACTOR],
+    )
+    constants[Constants.DECREASE_RESOLUTION_FACTOR.value] = float(
+        constants[Constants.DECREASE_RESOLUTION_FACTOR]
+    )
+    if (
+        constants[Constants.DECREASE_RESOLUTION_FACTOR] <= 0.0
+        or constants[Constants.DECREASE_RESOLUTION_FACTOR] >= 1.0
+    ):
+        raise ValueError(
+            "The constant decrease_resolution_factor must be in the interval "
+            "(0, 1)."
+        )
+    if (
+        Constants.LARGE_RESOLUTION_THRESHOLD in constants
+        and constants[Constants.LARGE_RESOLUTION_THRESHOLD] <= 1.0
+    ):
+        raise ValueError(
+            "The constant large_resolution_threshold must be greater than 1."
+        )
+    if (
+        Constants.MODERATE_RESOLUTION_THRESHOLD in constants
+        and constants[Constants.MODERATE_RESOLUTION_THRESHOLD] <= 1.0
+    ):
+        raise ValueError(
+            "The constant moderate_resolution_threshold must be greater than "
+            "1."
+        )
+    if (
+        Constants.LARGE_RESOLUTION_THRESHOLD in constants
+        and Constants.MODERATE_RESOLUTION_THRESHOLD in constants
+    ):
+        if (
+            constants[Constants.MODERATE_RESOLUTION_THRESHOLD]
+            > constants[Constants.LARGE_RESOLUTION_THRESHOLD]
+        ):
+            raise ValueError(
+                "The constant moderate_resolution_threshold "
+                "must be at most large_resolution_threshold."
+            )
+    elif Constants.LARGE_RESOLUTION_THRESHOLD in constants:
+        constants[Constants.MODERATE_RESOLUTION_THRESHOLD.value] = np.min(
+            [
+                DEFAULT_CONSTANTS[Constants.MODERATE_RESOLUTION_THRESHOLD],
+                constants[Constants.LARGE_RESOLUTION_THRESHOLD],
+            ]
+        )
+    elif Constants.MODERATE_RESOLUTION_THRESHOLD in constants:
+        constants[Constants.LARGE_RESOLUTION_THRESHOLD.value] = np.max(
+            [
+                DEFAULT_CONSTANTS[Constants.LARGE_RESOLUTION_THRESHOLD],
+                constants[Constants.MODERATE_RESOLUTION_THRESHOLD],
+            ]
+        )
+    else:
+        constants[Constants.LARGE_RESOLUTION_THRESHOLD.value] = (
+            DEFAULT_CONSTANTS[Constants.LARGE_RESOLUTION_THRESHOLD]
+        )
+        constants[Constants.MODERATE_RESOLUTION_THRESHOLD.value] = (
+            DEFAULT_CONSTANTS[Constants.MODERATE_RESOLUTION_THRESHOLD]
+        )
+    if Constants.LOW_RATIO in constants and (
+        constants[Constants.LOW_RATIO] <= 0.0
+        or constants[Constants.LOW_RATIO] >= 1.0
+    ):
+        raise ValueError(
+            "The constant low_ratio must be in the interval (0, 1)."
+        )
+    if Constants.HIGH_RATIO in constants and (
+        constants[Constants.HIGH_RATIO] <= 0.0
+        or constants[Constants.HIGH_RATIO] >= 1.0
+    ):
+        raise ValueError(
+            "The constant high_ratio must be in the interval (0, 1)."
+        )
+    if Constants.LOW_RATIO in constants and Constants.HIGH_RATIO in constants:
+        if constants[Constants.LOW_RATIO] > constants[Constants.HIGH_RATIO]:
+            raise ValueError(
+                "The constant low_ratio must be at most high_ratio."
+            )
+    elif Constants.LOW_RATIO in constants:
+        constants[Constants.HIGH_RATIO.value] = np.max(
+            [
+                DEFAULT_CONSTANTS[Constants.HIGH_RATIO],
+                constants[Constants.LOW_RATIO],
+            ]
+        )
+    elif Constants.HIGH_RATIO in constants:
+        constants[Constants.LOW_RATIO.value] = np.min(
+            [
+                DEFAULT_CONSTANTS[Constants.LOW_RATIO],
+                constants[Constants.HIGH_RATIO],
+            ]
+        )
+    else:
+        constants[Constants.LOW_RATIO.value] = DEFAULT_CONSTANTS[
+            Constants.LOW_RATIO
+        ]
+        constants[Constants.HIGH_RATIO.value] = DEFAULT_CONSTANTS[
+            Constants.HIGH_RATIO
+        ]
+    constants.setdefault(
+        Constants.VERY_LOW_RATIO.value,
+        DEFAULT_CONSTANTS[Constants.VERY_LOW_RATIO],
+    )
+    constants[Constants.VERY_LOW_RATIO.value] = float(
+        constants[Constants.VERY_LOW_RATIO]
+    )
+    if (
+        constants[Constants.VERY_LOW_RATIO] <= 0.0
+        or constants[Constants.VERY_LOW_RATIO] >= 1.0
+    ):
+        raise ValueError(
+            "The constant very_low_ratio must be in the interval (0, 1)."
+        )
+    if (
+        Constants.PENALTY_INCREASE_THRESHOLD in constants
+        and constants[Constants.PENALTY_INCREASE_THRESHOLD] < 1.0
+    ):
+        raise ValueError(
+            "The constant penalty_increase_threshold must be "
+            "greater than or equal to 1."
+        )
+    if (
+        Constants.PENALTY_INCREASE_FACTOR in constants
+        and constants[Constants.PENALTY_INCREASE_FACTOR] <= 1.0
+    ):
+        raise ValueError(
+            "The constant penalty_increase_factor must be greater than 1."
+        )
+    if (
+        Constants.PENALTY_INCREASE_THRESHOLD in constants
+        and Constants.PENALTY_INCREASE_FACTOR in constants
+    ):
+        if (
+            constants[Constants.PENALTY_INCREASE_FACTOR]
+            < constants[Constants.PENALTY_INCREASE_THRESHOLD]
+        ):
+            raise ValueError(
+                "The constant penalty_increase_factor must be "
+                "greater than or equal to "
+                "penalty_increase_threshold."
+            )
+    elif Constants.PENALTY_INCREASE_THRESHOLD in constants:
+        constants[Constants.PENALTY_INCREASE_FACTOR.value] = np.max(
+            [
+                DEFAULT_CONSTANTS[Constants.PENALTY_INCREASE_FACTOR],
+                constants[Constants.PENALTY_INCREASE_THRESHOLD],
+            ]
+        )
+    elif Constants.PENALTY_INCREASE_FACTOR in constants:
+        constants[Constants.PENALTY_INCREASE_THRESHOLD.value] = np.min(
+            [
+                DEFAULT_CONSTANTS[Constants.PENALTY_INCREASE_THRESHOLD],
+                constants[Constants.PENALTY_INCREASE_FACTOR],
+            ]
+        )
+    else:
+        constants[Constants.PENALTY_INCREASE_THRESHOLD.value] = (
+            DEFAULT_CONSTANTS[Constants.PENALTY_INCREASE_THRESHOLD]
+        )
+        constants[Constants.PENALTY_INCREASE_FACTOR.value] = DEFAULT_CONSTANTS[
+            Constants.PENALTY_INCREASE_FACTOR
+        ]
+    constants.setdefault(
+        Constants.SHORT_STEP_THRESHOLD.value,
+        DEFAULT_CONSTANTS[Constants.SHORT_STEP_THRESHOLD],
+    )
+    constants[Constants.SHORT_STEP_THRESHOLD.value] = float(
+        constants[Constants.SHORT_STEP_THRESHOLD]
+    )
+    if (
+        constants[Constants.SHORT_STEP_THRESHOLD] <= 0.0
+        or constants[Constants.SHORT_STEP_THRESHOLD] >= 1.0
+    ):
+        raise ValueError(
+            "The constant short_step_threshold must be in the interval (0, 1)."
+        )
+    constants.setdefault(
+        Constants.LOW_RADIUS_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.LOW_RADIUS_FACTOR],
+    )
+    constants[Constants.LOW_RADIUS_FACTOR.value] = float(
+        constants[Constants.LOW_RADIUS_FACTOR]
+    )
+    if (
+        constants[Constants.LOW_RADIUS_FACTOR] <= 0.0
+        or constants[Constants.LOW_RADIUS_FACTOR] >= 1.0
+    ):
+        raise ValueError(
+            "The constant low_radius_factor must be in the interval (0, 1)."
+        )
+    constants.setdefault(
+        Constants.BYRD_OMOJOKUN_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.BYRD_OMOJOKUN_FACTOR],
+    )
+    constants[Constants.BYRD_OMOJOKUN_FACTOR.value] = float(
+        constants[Constants.BYRD_OMOJOKUN_FACTOR]
+    )
+    if (
+        constants[Constants.BYRD_OMOJOKUN_FACTOR] <= 0.0
+        or constants[Constants.BYRD_OMOJOKUN_FACTOR] >= 1.0
+    ):
+        raise ValueError(
+            "The constant byrd_omojokun_factor must be in the interval (0, 1)."
+        )
+    constants.setdefault(
+        Constants.THRESHOLD_RATIO_CONSTRAINTS.value,
+        DEFAULT_CONSTANTS[Constants.THRESHOLD_RATIO_CONSTRAINTS],
+    )
+    constants[Constants.THRESHOLD_RATIO_CONSTRAINTS.value] = float(
+        constants[Constants.THRESHOLD_RATIO_CONSTRAINTS]
+    )
+    if constants[Constants.THRESHOLD_RATIO_CONSTRAINTS] <= 1.0:
+        raise ValueError(
+            "The constant threshold_ratio_constraints must be greater than 1."
+        )
+    constants.setdefault(
+        Constants.LARGE_SHIFT_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.LARGE_SHIFT_FACTOR],
+    )
+    constants[Constants.LARGE_SHIFT_FACTOR.value] = float(
+        constants[Constants.LARGE_SHIFT_FACTOR]
+    )
+    if constants[Constants.LARGE_SHIFT_FACTOR] < 0.0:
+        raise ValueError("The constant large_shift_factor must be "
+                         "nonnegative.")
+    constants.setdefault(
+        Constants.LARGE_GRADIENT_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.LARGE_GRADIENT_FACTOR],
+    )
+    constants[Constants.LARGE_GRADIENT_FACTOR.value] = float(
+        constants[Constants.LARGE_GRADIENT_FACTOR]
+    )
+    if constants[Constants.LARGE_GRADIENT_FACTOR] <= 1.0:
+        raise ValueError(
+            "The constant large_gradient_factor must be greater than 1."
+        )
+    constants.setdefault(
+        Constants.RESOLUTION_FACTOR.value,
+        DEFAULT_CONSTANTS[Constants.RESOLUTION_FACTOR],
+    )
+    constants[Constants.RESOLUTION_FACTOR.value] = float(
+        constants[Constants.RESOLUTION_FACTOR]
+    )
+    if constants[Constants.RESOLUTION_FACTOR] <= 1.0:
+        raise ValueError(
+            "The constant resolution_factor must be greater than 1."
+        )
+    constants.setdefault(
+        Constants.IMPROVE_TCG.value,
+        DEFAULT_CONSTANTS[Constants.IMPROVE_TCG],
+    )
+    constants[Constants.IMPROVE_TCG.value] = bool(
+        constants[Constants.IMPROVE_TCG]
+    )
+
+    # Check whether they are any unknown options.
+    for key in kwargs:
+        if key not in Constants.__members__.values():
+            warnings.warn(f"Unknown constant: {key}.", RuntimeWarning, 3)
+    return constants
+
+
+def _eval(pb, framework, step, options):
+    """
+    Evaluate the objective and constraint functions.
+    """
+    if pb.n_eval >= options[Options.MAX_EVAL]:
+        raise MaxEvalError
+    x_eval = framework.x_best + step
+    fun_val, cub_val, ceq_val = pb(x_eval, framework.penalty)
+    r_val = pb.maxcv(x_eval, cub_val, ceq_val)
+    if (
+        fun_val <= options[Options.TARGET]
+        and r_val <= options[Options.FEASIBILITY_TOL]
+    ):
+        raise TargetSuccess
+    if pb.is_feasibility and r_val <= options[Options.FEASIBILITY_TOL]:
+        raise FeasibleSuccess
+    return fun_val, cub_val, ceq_val
+
+
+def _build_result(pb, penalty, success, status, n_iter, options):
+    """
+    Build the result of the optimization process.
+    """
+    # Build the result.
+    x, fun, maxcv = pb.best_eval(penalty)
+    success = success and np.isfinite(fun) and np.isfinite(maxcv)
+    if status not in [ExitStatus.TARGET_SUCCESS, ExitStatus.FEASIBLE_SUCCESS]:
+        success = success and maxcv <= options[Options.FEASIBILITY_TOL]
+    result = OptimizeResult()
+    result.message = {
+        ExitStatus.RADIUS_SUCCESS: "The lower bound for the trust-region "
+                                   "radius has been reached",
+        ExitStatus.TARGET_SUCCESS: "The target objective function value has "
+                                   "been reached",
+        ExitStatus.FIXED_SUCCESS: "All variables are fixed by the bound "
+                                  "constraints",
+        ExitStatus.CALLBACK_SUCCESS: "The callback requested to stop the "
+                                     "optimization procedure",
+        ExitStatus.FEASIBLE_SUCCESS: "The feasibility problem received has "
+                                     "been solved successfully",
+        ExitStatus.MAX_EVAL_WARNING: "The maximum number of function "
+                                     "evaluations has been exceeded",
+        ExitStatus.MAX_ITER_WARNING: "The maximum number of iterations has "
+                                     "been exceeded",
+        ExitStatus.INFEASIBLE_ERROR: "The bound constraints are infeasible",
+        ExitStatus.LINALG_ERROR: "A linear algebra error occurred",
+    }.get(status, "Unknown exit status")
+    result.success = success
+    result.status = status.value
+    result.x = pb.build_x(x)
+    result.fun = fun
+    result.maxcv = maxcv
+    result.nfev = pb.n_eval
+    result.nit = n_iter
+    if options[Options.STORE_HISTORY]:
+        result.fun_history = pb.fun_history
+        result.maxcv_history = pb.maxcv_history
+
+    # Print the result if requested.
+    if options[Options.VERBOSE]:
+        _print_step(
+            result.message,
+            pb,
+            result.x,
+            result.fun,
+            result.maxcv,
+            result.nfev,
+            result.nit,
+        )
+    return result
+
+
+def _print_step(message, pb, x, fun_val, r_val, n_eval, n_iter):
+    """
+    Print information about the current state of the optimization process.
+    """
+    print()
+    print(f"{message}.")
+    print(f"Number of function evaluations: {n_eval}.")
+    print(f"Number of iterations: {n_iter}.")
+    if not pb.is_feasibility:
+        print(f"Least value of {pb.fun_name}: {fun_val}.")
+    print(f"Maximum constraint violation: {r_val}.")
+    with np.printoptions(**PRINT_OPTIONS):
+        print(f"Corresponding point: {x}.")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/models.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/models.py
new file mode 100644
index 0000000000000000000000000000000000000000..4891b074bfd6dd3f7d43fa95b0b845a764cac114
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/models.py
@@ -0,0 +1,1529 @@
+import warnings
+
+import numpy as np
+from scipy.linalg import eigh
+
+from .settings import Options
+from .utils import MaxEvalError, TargetSuccess, FeasibleSuccess
+
+
+EPS = np.finfo(float).eps
+
+
+class Interpolation:
+    """
+    Interpolation set.
+
+    This class stores a base point around which the models are expanded and the
+    interpolation points. The coordinates of the interpolation points are
+    relative to the base point.
+    """
+
+    def __init__(self, pb, options):
+        """
+        Initialize the interpolation set.
+
+        Parameters
+        ----------
+        pb : `cobyqa.problem.Problem`
+            Problem to be solved.
+        options : dict
+            Options of the solver.
+        """
+        # Reduce the initial trust-region radius if necessary.
+        self._debug = options[Options.DEBUG]
+        max_radius = 0.5 * np.min(pb.bounds.xu - pb.bounds.xl)
+        if options[Options.RHOBEG] > max_radius:
+            options[Options.RHOBEG.value] = max_radius
+            options[Options.RHOEND.value] = np.min(
+                [
+                    options[Options.RHOEND],
+                    max_radius,
+                ]
+            )
+
+        # Set the initial point around which the models are expanded.
+        self._x_base = np.copy(pb.x0)
+        very_close_xl_idx = (
+            self.x_base <= pb.bounds.xl + 0.5 * options[Options.RHOBEG]
+        )
+        self.x_base[very_close_xl_idx] = pb.bounds.xl[very_close_xl_idx]
+        close_xl_idx = (
+            pb.bounds.xl + 0.5 * options[Options.RHOBEG] < self.x_base
+        ) & (self.x_base <= pb.bounds.xl + options[Options.RHOBEG])
+        self.x_base[close_xl_idx] = np.minimum(
+            pb.bounds.xl[close_xl_idx] + options[Options.RHOBEG],
+            pb.bounds.xu[close_xl_idx],
+        )
+        very_close_xu_idx = (
+            self.x_base >= pb.bounds.xu - 0.5 * options[Options.RHOBEG]
+        )
+        self.x_base[very_close_xu_idx] = pb.bounds.xu[very_close_xu_idx]
+        close_xu_idx = (
+            self.x_base < pb.bounds.xu - 0.5 * options[Options.RHOBEG]
+        ) & (pb.bounds.xu - options[Options.RHOBEG] <= self.x_base)
+        self.x_base[close_xu_idx] = np.maximum(
+            pb.bounds.xu[close_xu_idx] - options[Options.RHOBEG],
+            pb.bounds.xl[close_xu_idx],
+        )
+
+        # Set the initial interpolation set.
+        self._xpt = np.zeros((pb.n, options[Options.NPT]))
+        for k in range(1, options[Options.NPT]):
+            if k <= pb.n:
+                if very_close_xu_idx[k - 1]:
+                    self.xpt[k - 1, k] = -options[Options.RHOBEG]
+                else:
+                    self.xpt[k - 1, k] = options[Options.RHOBEG]
+            elif k <= 2 * pb.n:
+                if very_close_xl_idx[k - pb.n - 1]:
+                    self.xpt[k - pb.n - 1, k] = 2.0 * options[Options.RHOBEG]
+                elif very_close_xu_idx[k - pb.n - 1]:
+                    self.xpt[k - pb.n - 1, k] = -2.0 * options[Options.RHOBEG]
+                else:
+                    self.xpt[k - pb.n - 1, k] = -options[Options.RHOBEG]
+            else:
+                spread = (k - pb.n - 1) // pb.n
+                k1 = k - (1 + spread) * pb.n - 1
+                k2 = (k1 + spread) % pb.n
+                self.xpt[k1, k] = self.xpt[k1, k1 + 1]
+                self.xpt[k2, k] = self.xpt[k2, k2 + 1]
+
+    @property
+    def n(self):
+        """
+        Number of variables.
+
+        Returns
+        -------
+        int
+            Number of variables.
+        """
+        return self.xpt.shape[0]
+
+    @property
+    def npt(self):
+        """
+        Number of interpolation points.
+
+        Returns
+        -------
+        int
+            Number of interpolation points.
+        """
+        return self.xpt.shape[1]
+
+    @property
+    def xpt(self):
+        """
+        Interpolation points.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n, npt)
+            Interpolation points.
+        """
+        return self._xpt
+
+    @xpt.setter
+    def xpt(self, xpt):
+        """
+        Set the interpolation points.
+
+        Parameters
+        ----------
+        xpt : `numpy.ndarray`, shape (n, npt)
+            New interpolation points.
+        """
+        if self._debug:
+            assert xpt.shape == (
+                self.n,
+                self.npt,
+            ), "The shape of `xpt` is not valid."
+        self._xpt = xpt
+
+    @property
+    def x_base(self):
+        """
+        Base point around which the models are expanded.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Base point around which the models are expanded.
+        """
+        return self._x_base
+
+    @x_base.setter
+    def x_base(self, x_base):
+        """
+        Set the base point around which the models are expanded.
+
+        Parameters
+        ----------
+        x_base : `numpy.ndarray`, shape (n,)
+            New base point around which the models are expanded.
+        """
+        if self._debug:
+            assert x_base.shape == (
+                self.n,
+            ), "The shape of `x_base` is not valid."
+        self._x_base = x_base
+
+    def point(self, k):
+        """
+        Get the `k`-th interpolation point.
+
+        The return point is relative to the origin.
+
+        Parameters
+        ----------
+        k : int
+            Index of the interpolation point.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            `k`-th interpolation point.
+        """
+        if self._debug:
+            assert 0 <= k < self.npt, "The index `k` is not valid."
+        return self.x_base + self.xpt[:, k]
+
+
+_cache = {"xpt": None, "a": None, "right_scaling": None, "eigh": None}
+
+
+def build_system(interpolation):
+    """
+    Build the left-hand side matrix of the interpolation system. The
+    matrix below stores W * diag(right_scaling),
+    where W is the theoretical matrix of the interpolation system. The
+    right scaling matrices is chosen to keep the elements in
+    the matrix well-balanced.
+
+    Parameters
+    ----------
+    interpolation : `cobyqa.models.Interpolation`
+        Interpolation set.
+    """
+
+    # Compute the scaled directions from the base point to the
+    # interpolation points. We scale the directions to avoid numerical
+    # difficulties.
+    if _cache["xpt"] is not None and np.array_equal(
+        interpolation.xpt, _cache["xpt"]
+    ):
+        return _cache["a"], _cache["right_scaling"], _cache["eigh"]
+
+    scale = np.max(np.linalg.norm(interpolation.xpt, axis=0), initial=EPS)
+    xpt_scale = interpolation.xpt / scale
+
+    n, npt = xpt_scale.shape
+    a = np.zeros((npt + n + 1, npt + n + 1))
+    a[:npt, :npt] = 0.5 * (xpt_scale.T @ xpt_scale) ** 2.0
+    a[:npt, npt] = 1.0
+    a[:npt, npt + 1:] = xpt_scale.T
+    a[npt, :npt] = 1.0
+    a[npt + 1:, :npt] = xpt_scale
+
+    # Build the left and right scaling diagonal matrices.
+    right_scaling = np.empty(npt + n + 1)
+    right_scaling[:npt] = 1.0 / scale**2.0
+    right_scaling[npt] = scale**2.0
+    right_scaling[npt + 1:] = scale
+
+    eig_values, eig_vectors = eigh(a, check_finite=False)
+
+    _cache["xpt"] = np.copy(interpolation.xpt)
+    _cache["a"] = np.copy(a)
+    _cache["right_scaling"] = np.copy(right_scaling)
+    _cache["eigh"] = (eig_values, eig_vectors)
+
+    return a, right_scaling, (eig_values, eig_vectors)
+
+
+class Quadratic:
+    """
+    Quadratic model.
+
+    This class stores the Hessian matrix of the quadratic model using the
+    implicit/explicit representation designed by Powell for NEWUOA [1]_.
+
+    References
+    ----------
+    .. [1] M. J. D. Powell. The NEWUOA software for unconstrained optimization
+       without derivatives. In G. Di Pillo and M. Roma, editors, *Large-Scale
+       Nonlinear Optimization*, volume 83 of Nonconvex Optim. Appl., pages
+       255--297. Springer, Boston, MA, USA, 2006. `doi:10.1007/0-387-30065-1_16
+       `_.
+    """
+
+    def __init__(self, interpolation, values, debug):
+        """
+        Initialize the quadratic model.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+        values : `numpy.ndarray`, shape (npt,)
+            Values of the interpolated function at the interpolation points.
+        debug : bool
+            Whether to make debugging tests during the execution.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        self._debug = debug
+        if self._debug:
+            assert values.shape == (
+                interpolation.npt,
+            ), "The shape of `values` is not valid."
+        if interpolation.npt < interpolation.n + 1:
+            raise ValueError(
+                f"The number of interpolation points must be at least "
+                f"{interpolation.n + 1}."
+            )
+        self._const, self._grad, self._i_hess, _ = self._get_model(
+            interpolation,
+            values,
+        )
+        self._e_hess = np.zeros((self.n, self.n))
+
+    def __call__(self, x, interpolation):
+        """
+        Evaluate the quadratic model at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the quadratic model is evaluated.
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+
+        Returns
+        -------
+        float
+            Value of the quadratic model at `x`.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+        x_diff = x - interpolation.x_base
+        return (
+            self._const
+            + self._grad @ x_diff
+            + 0.5
+            * (
+                self._i_hess @ (interpolation.xpt.T @ x_diff) ** 2.0
+                + x_diff @ self._e_hess @ x_diff
+            )
+        )
+
+    @property
+    def n(self):
+        """
+        Number of variables.
+
+        Returns
+        -------
+        int
+            Number of variables.
+        """
+        return self._grad.size
+
+    @property
+    def npt(self):
+        """
+        Number of interpolation points used to define the quadratic model.
+
+        Returns
+        -------
+        int
+            Number of interpolation points used to define the quadratic model.
+        """
+        return self._i_hess.size
+
+    def grad(self, x, interpolation):
+        """
+        Evaluate the gradient of the quadratic model at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which the gradient of the quadratic model is evaluated.
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Gradient of the quadratic model at `x`.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+        x_diff = x - interpolation.x_base
+        return self._grad + self.hess_prod(x_diff, interpolation)
+
+    def hess(self, interpolation):
+        """
+        Evaluate the Hessian matrix of the quadratic model.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n, n)
+            Hessian matrix of the quadratic model.
+        """
+        return self._e_hess + interpolation.xpt @ (
+            self._i_hess[:, np.newaxis] * interpolation.xpt.T
+        )
+
+    def hess_prod(self, v, interpolation):
+        """
+        Evaluate the right product of the Hessian matrix of the quadratic model
+        with a given vector.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Vector with which the Hessian matrix of the quadratic model is
+            multiplied from the right.
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Right product of the Hessian matrix of the quadratic model with
+            `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+        return self._e_hess @ v + interpolation.xpt @ (
+            self._i_hess * (interpolation.xpt.T @ v)
+        )
+
+    def curv(self, v, interpolation):
+        """
+        Evaluate the curvature of the quadratic model along a given direction.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Direction along which the curvature of the quadratic model is
+            evaluated.
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+
+        Returns
+        -------
+        float
+            Curvature of the quadratic model along `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+        return (
+            v @ self._e_hess @ v
+            + self._i_hess @ (interpolation.xpt.T @ v) ** 2.0
+        )
+
+    def update(self, interpolation, k_new, dir_old, values_diff):
+        """
+        Update the quadratic model.
+
+        This method applies the derivative-free symmetric Broyden update to the
+        quadratic model. The `knew`-th interpolation point must be updated
+        before calling this method.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Updated interpolation set.
+        k_new : int
+            Index of the updated interpolation point.
+        dir_old : `numpy.ndarray`, shape (n,)
+            Value of ``interpolation.xpt[:, k_new]`` before the update.
+        values_diff : `numpy.ndarray`, shape (npt,)
+            Differences between the values of the interpolated nonlinear
+            function and the previous quadratic model at the updated
+            interpolation points.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        if self._debug:
+            assert 0 <= k_new < self.npt, "The index `k_new` is not valid."
+            assert dir_old.shape == (
+                self.n,
+            ), "The shape of `dir_old` is not valid."
+            assert values_diff.shape == (
+                self.npt,
+            ), "The shape of `values_diff` is not valid."
+
+        # Forward the k_new-th element of the implicit Hessian matrix to the
+        # explicit Hessian matrix. This must be done because the implicit
+        # Hessian matrix is related to the interpolation points, and the
+        # k_new-th interpolation point is modified.
+        self._e_hess += self._i_hess[k_new] * np.outer(dir_old, dir_old)
+        self._i_hess[k_new] = 0.0
+
+        # Update the quadratic model.
+        const, grad, i_hess, ill_conditioned = self._get_model(
+            interpolation,
+            values_diff,
+        )
+        self._const += const
+        self._grad += grad
+        self._i_hess += i_hess
+        return ill_conditioned
+
+    def shift_x_base(self, interpolation, new_x_base):
+        """
+        Shift the point around which the quadratic model is defined.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Previous interpolation set.
+        new_x_base : `numpy.ndarray`, shape (n,)
+            Point that will replace ``interpolation.x_base``.
+        """
+        if self._debug:
+            assert new_x_base.shape == (
+                self.n,
+            ), "The shape of `new_x_base` is not valid."
+        self._const = self(new_x_base, interpolation)
+        self._grad = self.grad(new_x_base, interpolation)
+        shift = new_x_base - interpolation.x_base
+        update = np.outer(
+            shift,
+            (interpolation.xpt - 0.5 * shift[:, np.newaxis]) @ self._i_hess,
+        )
+        self._e_hess += update + update.T
+
+    @staticmethod
+    def solve_systems(interpolation, rhs):
+        """
+        Solve the interpolation systems.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+        rhs : `numpy.ndarray`, shape (npt + n + 1, m)
+            Right-hand side vectors of the ``m`` interpolation systems.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (npt + n + 1, m)
+            Solutions of the interpolation systems.
+        `numpy.ndarray`, shape (m, )
+            Whether the interpolation systems are ill-conditioned.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation systems are ill-defined.
+        """
+        n, npt = interpolation.xpt.shape
+        assert (
+            rhs.ndim == 2 and rhs.shape[0] == npt + n + 1
+        ), "The shape of `rhs` is not valid."
+
+        # Build the left-hand side matrix of the interpolation system. The
+        # matrix below stores diag(left_scaling) * W * diag(right_scaling),
+        # where W is the theoretical matrix of the interpolation system. The
+        # left and right scaling matrices are chosen to keep the elements in
+        # the matrix well-balanced.
+        a, right_scaling, eig = build_system(interpolation)
+
+        # Build the solution. After a discussion with Mike Saunders and Alexis
+        # Montoison during their visit to the Hong Kong Polytechnic University
+        # in 2024, we decided to use the eigendecomposition of the symmetric
+        # matrix a. This is more stable than the previously employed LBL
+        # decomposition, and allows us to directly detect ill-conditioning of
+        # the system and to build the least-squares solution if necessary.
+        # Numerical experiments have shown that this strategy improves the
+        # performance of the solver.
+        rhs_scaled = rhs * right_scaling[:, np.newaxis]
+        if not (np.all(np.isfinite(a)) and np.all(np.isfinite(rhs_scaled))):
+            raise np.linalg.LinAlgError(
+                "The interpolation system is ill-defined."
+            )
+
+        # calculated in build_system
+        eig_values, eig_vectors = eig
+
+        large_eig_values = np.abs(eig_values) > EPS
+        eig_vectors = eig_vectors[:, large_eig_values]
+        inv_eig_values = 1.0 / eig_values[large_eig_values]
+        ill_conditioned = ~np.all(large_eig_values, 0)
+        left_scaled_solutions = eig_vectors @ (
+            (eig_vectors.T @ rhs_scaled) * inv_eig_values[:, np.newaxis]
+        )
+        return (
+            left_scaled_solutions * right_scaling[:, np.newaxis],
+            ill_conditioned,
+        )
+
+    @staticmethod
+    def _get_model(interpolation, values):
+        """
+        Solve the interpolation system.
+
+        Parameters
+        ----------
+        interpolation : `cobyqa.models.Interpolation`
+            Interpolation set.
+        values : `numpy.ndarray`, shape (npt,)
+            Values of the interpolated function at the interpolation points.
+
+        Returns
+        -------
+        float
+            Constant term of the quadratic model.
+        `numpy.ndarray`, shape (n,)
+            Gradient of the quadratic model at ``interpolation.x_base``.
+        `numpy.ndarray`, shape (npt,)
+            Implicit Hessian matrix of the quadratic model.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        assert values.shape == (
+            interpolation.npt,
+        ), "The shape of `values` is not valid."
+        n, npt = interpolation.xpt.shape
+        x, ill_conditioned = Quadratic.solve_systems(
+            interpolation,
+            np.block(
+                [
+                    [
+                        values,
+                        np.zeros(n + 1),
+                    ]
+                ]
+            ).T,
+        )
+        return x[npt, 0], x[npt + 1:, 0], x[:npt, 0], ill_conditioned
+
+
+class Models:
+    """
+    Models for a nonlinear optimization problem.
+    """
+
+    def __init__(self, pb, options, penalty):
+        """
+        Initialize the models.
+
+        Parameters
+        ----------
+        pb : `cobyqa.problem.Problem`
+            Problem to be solved.
+        options : dict
+            Options of the solver.
+        penalty : float
+            Penalty parameter used to select the point in the filter to forward
+            to the callback function.
+
+        Raises
+        ------
+        `cobyqa.utils.MaxEvalError`
+            If the maximum number of evaluations is reached.
+        `cobyqa.utils.TargetSuccess`
+            If a nearly feasible point has been found with an objective
+            function value below the target.
+        `cobyqa.utils.FeasibleSuccess`
+            If a feasible point has been found for a feasibility problem.
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        # Set the initial interpolation set.
+        self._debug = options[Options.DEBUG]
+        self._interpolation = Interpolation(pb, options)
+
+        # Evaluate the nonlinear functions at the initial interpolation points.
+        x_eval = self.interpolation.point(0)
+        fun_init, cub_init, ceq_init = pb(x_eval, penalty)
+        self._fun_val = np.full(options[Options.NPT], np.nan)
+        self._cub_val = np.full((options[Options.NPT], cub_init.size), np.nan)
+        self._ceq_val = np.full((options[Options.NPT], ceq_init.size), np.nan)
+        for k in range(options[Options.NPT]):
+            if k >= options[Options.MAX_EVAL]:
+                raise MaxEvalError
+            if k == 0:
+                self.fun_val[k] = fun_init
+                self.cub_val[k, :] = cub_init
+                self.ceq_val[k, :] = ceq_init
+            else:
+                x_eval = self.interpolation.point(k)
+                self.fun_val[k], self.cub_val[k, :], self.ceq_val[k, :] = pb(
+                    x_eval,
+                    penalty,
+                )
+
+            # Stop the iterations if the problem is a feasibility problem and
+            # the current interpolation point is feasible.
+            if (
+                pb.is_feasibility
+                and pb.maxcv(
+                    self.interpolation.point(k),
+                    self.cub_val[k, :],
+                    self.ceq_val[k, :],
+                )
+                <= options[Options.FEASIBILITY_TOL]
+            ):
+                raise FeasibleSuccess
+
+            # Stop the iterations if the current interpolation point is nearly
+            # feasible and has an objective function value below the target.
+            if (
+                self._fun_val[k] <= options[Options.TARGET]
+                and pb.maxcv(
+                    self.interpolation.point(k),
+                    self.cub_val[k, :],
+                    self.ceq_val[k, :],
+                )
+                <= options[Options.FEASIBILITY_TOL]
+            ):
+                raise TargetSuccess
+
+        # Build the initial quadratic models.
+        self._fun = Quadratic(
+            self.interpolation,
+            self._fun_val,
+            options[Options.DEBUG],
+        )
+        self._cub = np.empty(self.m_nonlinear_ub, dtype=Quadratic)
+        self._ceq = np.empty(self.m_nonlinear_eq, dtype=Quadratic)
+        for i in range(self.m_nonlinear_ub):
+            self._cub[i] = Quadratic(
+                self.interpolation,
+                self.cub_val[:, i],
+                options[Options.DEBUG],
+            )
+        for i in range(self.m_nonlinear_eq):
+            self._ceq[i] = Quadratic(
+                self.interpolation,
+                self.ceq_val[:, i],
+                options[Options.DEBUG],
+            )
+        if self._debug:
+            self._check_interpolation_conditions()
+
+    @property
+    def n(self):
+        """
+        Dimension of the problem.
+
+        Returns
+        -------
+        int
+            Dimension of the problem.
+        """
+        return self.interpolation.n
+
+    @property
+    def npt(self):
+        """
+        Number of interpolation points.
+
+        Returns
+        -------
+        int
+            Number of interpolation points.
+        """
+        return self.interpolation.npt
+
+    @property
+    def m_nonlinear_ub(self):
+        """
+        Number of nonlinear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear inequality constraints.
+        """
+        return self.cub_val.shape[1]
+
+    @property
+    def m_nonlinear_eq(self):
+        """
+        Number of nonlinear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear equality constraints.
+        """
+        return self.ceq_val.shape[1]
+
+    @property
+    def interpolation(self):
+        """
+        Interpolation set.
+
+        Returns
+        -------
+        `cobyqa.models.Interpolation`
+            Interpolation set.
+        """
+        return self._interpolation
+
+    @property
+    def fun_val(self):
+        """
+        Values of the objective function at the interpolation points.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (npt,)
+            Values of the objective function at the interpolation points.
+        """
+        return self._fun_val
+
+    @property
+    def cub_val(self):
+        """
+        Values of the nonlinear inequality constraint functions at the
+        interpolation points.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (npt, m_nonlinear_ub)
+            Values of the nonlinear inequality constraint functions at the
+            interpolation points.
+        """
+        return self._cub_val
+
+    @property
+    def ceq_val(self):
+        """
+        Values of the nonlinear equality constraint functions at the
+        interpolation points.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (npt, m_nonlinear_eq)
+            Values of the nonlinear equality constraint functions at the
+            interpolation points.
+        """
+        return self._ceq_val
+
+    def fun(self, x):
+        """
+        Evaluate the quadratic model of the objective function at a given
+        point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the quadratic model of the objective
+            function.
+
+        Returns
+        -------
+        float
+            Value of the quadratic model of the objective function at `x`.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+        return self._fun(x, self.interpolation)
+
+    def fun_grad(self, x):
+        """
+        Evaluate the gradient of the quadratic model of the objective function
+        at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the gradient of the quadratic model of
+            the objective function.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Gradient of the quadratic model of the objective function at `x`.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+        return self._fun.grad(x, self.interpolation)
+
+    def fun_hess(self):
+        """
+        Evaluate the Hessian matrix of the quadratic model of the objective
+        function.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n, n)
+            Hessian matrix of the quadratic model of the objective function.
+        """
+        return self._fun.hess(self.interpolation)
+
+    def fun_hess_prod(self, v):
+        """
+        Evaluate the right product of the Hessian matrix of the quadratic model
+        of the objective function with a given vector.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Vector with which the Hessian matrix of the quadratic model of the
+            objective function is multiplied from the right.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Right product of the Hessian matrix of the quadratic model of the
+            objective function with `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+        return self._fun.hess_prod(v, self.interpolation)
+
+    def fun_curv(self, v):
+        """
+        Evaluate the curvature of the quadratic model of the objective function
+        along a given direction.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Direction along which the curvature of the quadratic model of the
+            objective function is evaluated.
+
+        Returns
+        -------
+        float
+            Curvature of the quadratic model of the objective function along
+            `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+        return self._fun.curv(v, self.interpolation)
+
+    def fun_alt_grad(self, x):
+        """
+        Evaluate the gradient of the alternative quadratic model of the
+        objective function at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the gradient of the alternative
+            quadratic model of the objective function.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Gradient of the alternative quadratic model of the objective
+            function at `x`.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+        model = Quadratic(self.interpolation, self.fun_val, self._debug)
+        return model.grad(x, self.interpolation)
+
+    def cub(self, x, mask=None):
+        """
+        Evaluate the quadratic models of the nonlinear inequality functions at
+        a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the quadratic models of the nonlinear
+            inequality functions.
+        mask : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Values of the quadratic model of the nonlinear inequality
+            functions.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `mask` is not valid."
+        return np.array(
+            [model(x, self.interpolation) for model in self._get_cub(mask)]
+        )
+
+    def cub_grad(self, x, mask=None):
+        """
+        Evaluate the gradients of the quadratic models of the nonlinear
+        inequality functions at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the gradients of the quadratic models of
+            the nonlinear inequality functions.
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Gradients of the quadratic model of the nonlinear inequality
+            functions.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [model.grad(x, self.interpolation)
+             for model in self._get_cub(mask)],
+            (-1, self.n),
+        )
+
+    def cub_hess(self, mask=None):
+        """
+        Evaluate the Hessian matrices of the quadratic models of the nonlinear
+        inequality functions.
+
+        Parameters
+        ----------
+        mask : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Hessian matrices of the quadratic models of the nonlinear
+            inequality functions.
+        """
+        if self._debug:
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [model.hess(self.interpolation) for model in self._get_cub(mask)],
+            (-1, self.n, self.n),
+        )
+
+    def cub_hess_prod(self, v, mask=None):
+        """
+        Evaluate the right product of the Hessian matrices of the quadratic
+        models of the nonlinear inequality functions with a given vector.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Vector with which the Hessian matrices of the quadratic models of
+            the nonlinear inequality functions are multiplied from the right.
+        mask : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Right products of the Hessian matrices of the quadratic models of
+            the nonlinear inequality functions with `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [
+                model.hess_prod(v, self.interpolation)
+                for model in self._get_cub(mask)
+            ],
+            (-1, self.n),
+        )
+
+    def cub_curv(self, v, mask=None):
+        """
+        Evaluate the curvature of the quadratic models of the nonlinear
+        inequality functions along a given direction.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Direction along which the curvature of the quadratic models of the
+            nonlinear inequality functions is evaluated.
+        mask : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Curvature of the quadratic models of the nonlinear inequality
+            functions along `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `mask` is not valid."
+        return np.array(
+            [model.curv(v, self.interpolation)
+             for model in self._get_cub(mask)]
+        )
+
+    def ceq(self, x, mask=None):
+        """
+        Evaluate the quadratic models of the nonlinear equality functions at a
+        given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the quadratic models of the nonlinear
+            equality functions.
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Values of the quadratic model of the nonlinear equality functions.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `mask` is not valid."
+        return np.array(
+            [model(x, self.interpolation) for model in self._get_ceq(mask)]
+        )
+
+    def ceq_grad(self, x, mask=None):
+        """
+        Evaluate the gradients of the quadratic models of the nonlinear
+        equality functions at a given point.
+
+        Parameters
+        ----------
+        x : `numpy.ndarray`, shape (n,)
+            Point at which to evaluate the gradients of the quadratic models of
+            the nonlinear equality functions.
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Gradients of the quadratic model of the nonlinear equality
+            functions.
+        """
+        if self._debug:
+            assert x.shape == (self.n,), "The shape of `x` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [model.grad(x, self.interpolation)
+             for model in self._get_ceq(mask)],
+            (-1, self.n),
+        )
+
+    def ceq_hess(self, mask=None):
+        """
+        Evaluate the Hessian matrices of the quadratic models of the nonlinear
+        equality functions.
+
+        Parameters
+        ----------
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Hessian matrices of the quadratic models of the nonlinear equality
+            functions.
+        """
+        if self._debug:
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [model.hess(self.interpolation) for model in self._get_ceq(mask)],
+            (-1, self.n, self.n),
+        )
+
+    def ceq_hess_prod(self, v, mask=None):
+        """
+        Evaluate the right product of the Hessian matrices of the quadratic
+        models of the nonlinear equality functions with a given vector.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Vector with which the Hessian matrices of the quadratic models of
+            the nonlinear equality functions are multiplied from the right.
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Right products of the Hessian matrices of the quadratic models of
+            the nonlinear equality functions with `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `mask` is not valid."
+        return np.reshape(
+            [
+                model.hess_prod(v, self.interpolation)
+                for model in self._get_ceq(mask)
+            ],
+            (-1, self.n),
+        )
+
+    def ceq_curv(self, v, mask=None):
+        """
+        Evaluate the curvature of the quadratic models of the nonlinear
+        equality functions along a given direction.
+
+        Parameters
+        ----------
+        v : `numpy.ndarray`, shape (n,)
+            Direction along which the curvature of the quadratic models of the
+            nonlinear equality functions is evaluated.
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to consider.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Curvature of the quadratic models of the nonlinear equality
+            functions along `v`.
+        """
+        if self._debug:
+            assert v.shape == (self.n,), "The shape of `v` is not valid."
+            assert mask is None or mask.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `mask` is not valid."
+        return np.array(
+            [model.curv(v, self.interpolation)
+             for model in self._get_ceq(mask)]
+        )
+
+    def reset_models(self):
+        """
+        Set the quadratic models of the objective function, nonlinear
+        inequality constraints, and nonlinear equality constraints to the
+        alternative quadratic models.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        self._fun = Quadratic(self.interpolation, self.fun_val, self._debug)
+        for i in range(self.m_nonlinear_ub):
+            self._cub[i] = Quadratic(
+                self.interpolation,
+                self.cub_val[:, i],
+                self._debug,
+            )
+        for i in range(self.m_nonlinear_eq):
+            self._ceq[i] = Quadratic(
+                self.interpolation,
+                self.ceq_val[:, i],
+                self._debug,
+            )
+        if self._debug:
+            self._check_interpolation_conditions()
+
+    def update_interpolation(self, k_new, x_new, fun_val, cub_val, ceq_val):
+        """
+        Update the interpolation set.
+
+        This method updates the interpolation set by replacing the `knew`-th
+        interpolation point with `xnew`. It also updates the function values
+        and the quadratic models.
+
+        Parameters
+        ----------
+        k_new : int
+            Index of the updated interpolation point.
+        x_new : `numpy.ndarray`, shape (n,)
+            New interpolation point. Its value is interpreted as relative to
+            the origin, not the base point.
+        fun_val : float
+            Value of the objective function at `x_new`.
+            Objective function value at `x_new`.
+        cub_val : `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Values of the nonlinear inequality constraints at `x_new`.
+        ceq_val : `numpy.ndarray`, shape (m_nonlinear_eq,)
+            Values of the nonlinear equality constraints at `x_new`.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+        """
+        if self._debug:
+            assert 0 <= k_new < self.npt, "The index `k_new` is not valid."
+            assert x_new.shape == (self.n,), \
+                "The shape of `x_new` is not valid."
+            assert isinstance(fun_val, float), \
+                "The function value is not valid."
+            assert cub_val.shape == (
+                self.m_nonlinear_ub,
+            ), "The shape of `cub_val` is not valid."
+            assert ceq_val.shape == (
+                self.m_nonlinear_eq,
+            ), "The shape of `ceq_val` is not valid."
+
+        # Compute the updates in the interpolation conditions.
+        fun_diff = np.zeros(self.npt)
+        cub_diff = np.zeros(self.cub_val.shape)
+        ceq_diff = np.zeros(self.ceq_val.shape)
+        fun_diff[k_new] = fun_val - self.fun(x_new)
+        cub_diff[k_new, :] = cub_val - self.cub(x_new)
+        ceq_diff[k_new, :] = ceq_val - self.ceq(x_new)
+
+        # Update the function values.
+        self.fun_val[k_new] = fun_val
+        self.cub_val[k_new, :] = cub_val
+        self.ceq_val[k_new, :] = ceq_val
+
+        # Update the interpolation set.
+        dir_old = np.copy(self.interpolation.xpt[:, k_new])
+        self.interpolation.xpt[:, k_new] = x_new - self.interpolation.x_base
+
+        # Update the quadratic models.
+        ill_conditioned = self._fun.update(
+            self.interpolation,
+            k_new,
+            dir_old,
+            fun_diff,
+        )
+        for i in range(self.m_nonlinear_ub):
+            ill_conditioned = ill_conditioned or self._cub[i].update(
+                self.interpolation,
+                k_new,
+                dir_old,
+                cub_diff[:, i],
+            )
+        for i in range(self.m_nonlinear_eq):
+            ill_conditioned = ill_conditioned or self._ceq[i].update(
+                self.interpolation,
+                k_new,
+                dir_old,
+                ceq_diff[:, i],
+            )
+        if self._debug:
+            self._check_interpolation_conditions()
+        return ill_conditioned
+
+    def determinants(self, x_new, k_new=None):
+        """
+        Compute the normalized determinants of the new interpolation systems.
+
+        Parameters
+        ----------
+        x_new : `numpy.ndarray`, shape (n,)
+            New interpolation point. Its value is interpreted as relative to
+            the origin, not the base point.
+        k_new : int, optional
+            Index of the updated interpolation point. If `k_new` is not
+            specified, all the possible determinants are computed.
+
+        Returns
+        -------
+        {float, `numpy.ndarray`, shape (npt,)}
+            Determinant(s) of the new interpolation system.
+
+        Raises
+        ------
+        `numpy.linalg.LinAlgError`
+            If the interpolation system is ill-defined.
+
+        Notes
+        -----
+        The determinants are normalized by the determinant of the current
+        interpolation system. For stability reasons, the calculations are done
+        using the formula (2.12) in [1]_.
+
+        References
+        ----------
+        .. [1] M. J. D. Powell. On updating the inverse of a KKT matrix.
+           Technical Report DAMTP 2004/NA01, Department of Applied Mathematics
+           and Theoretical Physics, University of Cambridge, Cambridge, UK,
+           2004.
+        """
+        if self._debug:
+            assert x_new.shape == (self.n,), \
+                "The shape of `x_new` is not valid."
+            assert (
+                k_new is None or 0 <= k_new < self.npt
+            ), "The index `k_new` is not valid."
+
+        # Compute the values independent of k_new.
+        shift = x_new - self.interpolation.x_base
+        new_col = np.empty((self.npt + self.n + 1, 1))
+        new_col[: self.npt, 0] = (
+                0.5 * (self.interpolation.xpt.T @ shift) ** 2.0)
+        new_col[self.npt, 0] = 1.0
+        new_col[self.npt + 1:, 0] = shift
+        inv_new_col = Quadratic.solve_systems(self.interpolation, new_col)[0]
+        beta = 0.5 * (shift @ shift) ** 2.0 - new_col[:, 0] @ inv_new_col[:, 0]
+
+        # Compute the values that depend on k.
+        if k_new is None:
+            coord_vec = np.eye(self.npt + self.n + 1, self.npt)
+            alpha = np.diag(
+                Quadratic.solve_systems(
+                    self.interpolation,
+                    coord_vec,
+                )[0]
+            )
+            tau = inv_new_col[: self.npt, 0]
+        else:
+            coord_vec = np.eye(self.npt + self.n + 1, 1, -k_new)
+            alpha = Quadratic.solve_systems(
+                self.interpolation,
+                coord_vec,
+            )[
+                0
+            ][k_new, 0]
+            tau = inv_new_col[k_new, 0]
+        return alpha * beta + tau**2.0
+
+    def shift_x_base(self, new_x_base, options):
+        """
+        Shift the base point without changing the interpolation set.
+
+        Parameters
+        ----------
+        new_x_base : `numpy.ndarray`, shape (n,)
+            New base point.
+        options : dict
+            Options of the solver.
+        """
+        if self._debug:
+            assert new_x_base.shape == (
+                self.n,
+            ), "The shape of `new_x_base` is not valid."
+
+        # Update the models.
+        self._fun.shift_x_base(self.interpolation, new_x_base)
+        for model in self._cub:
+            model.shift_x_base(self.interpolation, new_x_base)
+        for model in self._ceq:
+            model.shift_x_base(self.interpolation, new_x_base)
+
+        # Update the base point and the interpolation points.
+        shift = new_x_base - self.interpolation.x_base
+        self.interpolation.x_base += shift
+        self.interpolation.xpt -= shift[:, np.newaxis]
+        if options[Options.DEBUG]:
+            self._check_interpolation_conditions()
+
+    def _get_cub(self, mask=None):
+        """
+        Get the quadratic models of the nonlinear inequality constraints.
+
+        Parameters
+        ----------
+        mask : `numpy.ndarray`, shape (m_nonlinear_ub,), optional
+            Mask of the quadratic models to return.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Quadratic models of the nonlinear inequality constraints.
+        """
+        return self._cub if mask is None else self._cub[mask]
+
+    def _get_ceq(self, mask=None):
+        """
+        Get the quadratic models of the nonlinear equality constraints.
+
+        Parameters
+        ----------
+        mask : `numpy.ndarray`, shape (m_nonlinear_eq,), optional
+            Mask of the quadratic models to return.
+
+        Returns
+        -------
+        `numpy.ndarray`
+            Quadratic models of the nonlinear equality constraints.
+        """
+        return self._ceq if mask is None else self._ceq[mask]
+
+    def _check_interpolation_conditions(self):
+        """
+        Check the interpolation conditions of all quadratic models.
+        """
+        error_fun = 0.0
+        error_cub = 0.0
+        error_ceq = 0.0
+        for k in range(self.npt):
+            error_fun = np.max(
+                [
+                    error_fun,
+                    np.abs(
+                        self.fun(self.interpolation.point(k)) - self.fun_val[k]
+                    ),
+                ]
+            )
+            error_cub = np.max(
+                np.abs(
+                    self.cub(self.interpolation.point(k)) - self.cub_val[k, :]
+                ),
+                initial=error_cub,
+            )
+            error_ceq = np.max(
+                np.abs(
+                    self.ceq(self.interpolation.point(k)) - self.ceq_val[k, :]
+                ),
+                initial=error_ceq,
+            )
+        tol = 10.0 * np.sqrt(EPS) * max(self.n, self.npt)
+        if error_fun > tol * np.max(np.abs(self.fun_val), initial=1.0):
+            warnings.warn(
+                "The interpolation conditions for the objective function are "
+                "not satisfied.",
+                RuntimeWarning,
+                2,
+            )
+        if error_cub > tol * np.max(np.abs(self.cub_val), initial=1.0):
+            warnings.warn(
+                "The interpolation conditions for the inequality constraint "
+                "function are not satisfied.",
+                RuntimeWarning,
+                2,
+            )
+        if error_ceq > tol * np.max(np.abs(self.ceq_val), initial=1.0):
+            warnings.warn(
+                "The interpolation conditions for the equality constraint "
+                "function are not satisfied.",
+                RuntimeWarning,
+                2,
+            )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/problem.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/problem.py
new file mode 100644
index 0000000000000000000000000000000000000000..2dbebce3a48067e97da2b75bd2cdd609e01029b2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/problem.py
@@ -0,0 +1,1296 @@
+from contextlib import suppress
+from inspect import signature
+import copy
+
+import numpy as np
+from scipy.optimize import (
+    Bounds,
+    LinearConstraint,
+    NonlinearConstraint,
+    OptimizeResult,
+)
+from scipy.optimize._constraints import PreparedConstraint
+
+
+from .settings import PRINT_OPTIONS, BARRIER
+from .utils import CallbackSuccess, get_arrays_tol
+from .utils import exact_1d_array
+
+
+class ObjectiveFunction:
+    """
+    Real-valued objective function.
+    """
+
+    def __init__(self, fun, verbose, debug, *args):
+        """
+        Initialize the objective function.
+
+        Parameters
+        ----------
+        fun : {callable, None}
+            Function to evaluate, or None.
+
+                ``fun(x, *args) -> float``
+
+            where ``x`` is an array with shape (n,) and `args` is a tuple.
+        verbose : bool
+            Whether to print the function evaluations.
+        debug : bool
+            Whether to make debugging tests during the execution.
+        *args : tuple
+            Additional arguments to be passed to the function.
+        """
+        if debug:
+            assert fun is None or callable(fun)
+            assert isinstance(verbose, bool)
+            assert isinstance(debug, bool)
+
+        self._fun = fun
+        self._verbose = verbose
+        self._args = args
+        self._n_eval = 0
+
+    def __call__(self, x):
+        """
+        Evaluate the objective function.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the objective function is evaluated.
+
+        Returns
+        -------
+        float
+            Function value at `x`.
+        """
+        x = np.array(x, dtype=float)
+        if self._fun is None:
+            f = 0.0
+        else:
+            f = float(np.squeeze(self._fun(x, *self._args)))
+            self._n_eval += 1
+            if self._verbose:
+                with np.printoptions(**PRINT_OPTIONS):
+                    print(f"{self.name}({x}) = {f}")
+        return f
+
+    @property
+    def n_eval(self):
+        """
+        Number of function evaluations.
+
+        Returns
+        -------
+        int
+            Number of function evaluations.
+        """
+        return self._n_eval
+
+    @property
+    def name(self):
+        """
+        Name of the objective function.
+
+        Returns
+        -------
+        str
+            Name of the objective function.
+        """
+        name = ""
+        if self._fun is not None:
+            try:
+                name = self._fun.__name__
+            except AttributeError:
+                name = "fun"
+        return name
+
+
+class BoundConstraints:
+    """
+    Bound constraints ``xl <= x <= xu``.
+    """
+
+    def __init__(self, bounds):
+        """
+        Initialize the bound constraints.
+
+        Parameters
+        ----------
+        bounds : scipy.optimize.Bounds
+            Bound constraints.
+        """
+        self._xl = np.array(bounds.lb, float)
+        self._xu = np.array(bounds.ub, float)
+
+        # Remove the ill-defined bounds.
+        self.xl[np.isnan(self.xl)] = -np.inf
+        self.xu[np.isnan(self.xu)] = np.inf
+
+        self.is_feasible = (
+            np.all(self.xl <= self.xu)
+            and np.all(self.xl < np.inf)
+            and np.all(self.xu > -np.inf)
+        )
+        self.m = np.count_nonzero(self.xl > -np.inf) + np.count_nonzero(
+            self.xu < np.inf
+        )
+        self.pcs = PreparedConstraint(bounds, np.ones(bounds.lb.size))
+
+    @property
+    def xl(self):
+        """
+        Lower bound.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Lower bound.
+        """
+        return self._xl
+
+    @property
+    def xu(self):
+        """
+        Upper bound.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Upper bound.
+        """
+        return self._xu
+
+    def maxcv(self, x):
+        """
+        Evaluate the maximum constraint violation.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the maximum constraint violation is evaluated.
+
+        Returns
+        -------
+        float
+            Maximum constraint violation at `x`.
+        """
+        x = np.asarray(x, dtype=float)
+        return self.violation(x)
+
+    def violation(self, x):
+        # shortcut for no bounds
+        if self.is_feasible:
+            return np.array([0])
+        else:
+            return self.pcs.violation(x)
+
+    def project(self, x):
+        """
+        Project a point onto the feasible set.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point to be projected.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Projection of `x` onto the feasible set.
+        """
+        return np.clip(x, self.xl, self.xu) if self.is_feasible else x
+
+
+class LinearConstraints:
+    """
+    Linear constraints ``a_ub @ x <= b_ub`` and ``a_eq @ x == b_eq``.
+    """
+
+    def __init__(self, constraints, n, debug):
+        """
+        Initialize the linear constraints.
+
+        Parameters
+        ----------
+        constraints : list of LinearConstraint
+            Linear constraints.
+        n : int
+            Number of variables.
+        debug : bool
+            Whether to make debugging tests during the execution.
+        """
+        if debug:
+            assert isinstance(constraints, list)
+            for constraint in constraints:
+                assert isinstance(constraint, LinearConstraint)
+            assert isinstance(debug, bool)
+
+        self._a_ub = np.empty((0, n))
+        self._b_ub = np.empty(0)
+        self._a_eq = np.empty((0, n))
+        self._b_eq = np.empty(0)
+        for constraint in constraints:
+            is_equality = np.abs(
+                constraint.ub - constraint.lb
+            ) <= get_arrays_tol(constraint.lb, constraint.ub)
+            if np.any(is_equality):
+                self._a_eq = np.vstack((self.a_eq, constraint.A[is_equality]))
+                self._b_eq = np.concatenate(
+                    (
+                        self.b_eq,
+                        0.5
+                        * (
+                            constraint.lb[is_equality]
+                            + constraint.ub[is_equality]
+                        ),
+                    )
+                )
+            if not np.all(is_equality):
+                self._a_ub = np.vstack(
+                    (
+                        self.a_ub,
+                        constraint.A[~is_equality],
+                        -constraint.A[~is_equality],
+                    )
+                )
+                self._b_ub = np.concatenate(
+                    (
+                        self.b_ub,
+                        constraint.ub[~is_equality],
+                        -constraint.lb[~is_equality],
+                    )
+                )
+
+        # Remove the ill-defined constraints.
+        self.a_ub[np.isnan(self.a_ub)] = 0.0
+        self.a_eq[np.isnan(self.a_eq)] = 0.0
+        undef_ub = np.isnan(self.b_ub) | np.isinf(self.b_ub)
+        undef_eq = np.isnan(self.b_eq)
+        self._a_ub = self.a_ub[~undef_ub, :]
+        self._b_ub = self.b_ub[~undef_ub]
+        self._a_eq = self.a_eq[~undef_eq, :]
+        self._b_eq = self.b_eq[~undef_eq]
+        self.pcs = [
+            PreparedConstraint(c, np.ones(n)) for c in constraints if c.A.size
+        ]
+
+    @property
+    def a_ub(self):
+        """
+        Left-hand side matrix of the linear inequality constraints.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m, n)
+            Left-hand side matrix of the linear inequality constraints.
+        """
+        return self._a_ub
+
+    @property
+    def b_ub(self):
+        """
+        Right-hand side vector of the linear inequality constraints.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m, n)
+            Right-hand side vector of the linear inequality constraints.
+        """
+        return self._b_ub
+
+    @property
+    def a_eq(self):
+        """
+        Left-hand side matrix of the linear equality constraints.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m, n)
+            Left-hand side matrix of the linear equality constraints.
+        """
+        return self._a_eq
+
+    @property
+    def b_eq(self):
+        """
+        Right-hand side vector of the linear equality constraints.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m, n)
+            Right-hand side vector of the linear equality constraints.
+        """
+        return self._b_eq
+
+    @property
+    def m_ub(self):
+        """
+        Number of linear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear inequality constraints.
+        """
+        return self.b_ub.size
+
+    @property
+    def m_eq(self):
+        """
+        Number of linear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear equality constraints.
+        """
+        return self.b_eq.size
+
+    def maxcv(self, x):
+        """
+        Evaluate the maximum constraint violation.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the maximum constraint violation is evaluated.
+
+        Returns
+        -------
+        float
+            Maximum constraint violation at `x`.
+        """
+        return np.max(self.violation(x), initial=0.0)
+
+    def violation(self, x):
+        if len(self.pcs):
+            return np.concatenate([pc.violation(x) for pc in self.pcs])
+        return np.array([])
+
+
+class NonlinearConstraints:
+    """
+    Nonlinear constraints ``c_ub(x) <= 0`` and ``c_eq(x) == b_eq``.
+    """
+
+    def __init__(self, constraints, verbose, debug):
+        """
+        Initialize the nonlinear constraints.
+
+        Parameters
+        ----------
+        constraints : list
+            Nonlinear constraints.
+        verbose : bool
+            Whether to print the function evaluations.
+        debug : bool
+            Whether to make debugging tests during the execution.
+        """
+        if debug:
+            assert isinstance(constraints, list)
+            for constraint in constraints:
+                assert isinstance(constraint, NonlinearConstraint)
+            assert isinstance(verbose, bool)
+            assert isinstance(debug, bool)
+
+        self._constraints = constraints
+        self.pcs = []
+        self._verbose = verbose
+
+        # map of indexes for equality and inequality constraints
+        self._map_ub = None
+        self._map_eq = None
+        self._m_ub = self._m_eq = None
+
+    def __call__(self, x):
+        """
+        Calculates the residual (slack) for the constraints.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the constraints are evaluated.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Nonlinear inequality constraint slack values.
+        `numpy.ndarray`, shape (m_nonlinear_eq,)
+            Nonlinear equality constraint slack values.
+        """
+        if not len(self._constraints):
+            self._m_eq = self._m_ub = 0
+            return np.array([]), np.array([])
+
+        x = np.array(x, dtype=float)
+        # first time around the constraints haven't been prepared
+        if not len(self.pcs):
+            self._map_ub = []
+            self._map_eq = []
+            self._m_eq = 0
+            self._m_ub = 0
+
+            for constraint in self._constraints:
+                if not callable(constraint.jac):
+                    # having a callable constraint function prevents
+                    # constraint.fun from being evaluated when preparing
+                    # constraint
+                    c = copy.copy(constraint)
+                    c.jac = lambda x0: x0
+                    c.hess = lambda x0, v: 0.0
+                    pc = PreparedConstraint(c, x)
+                else:
+                    pc = PreparedConstraint(constraint, x)
+                # we're going to be using the same x value again immediately
+                # after this initialisation
+                pc.fun.f_updated = True
+
+                self.pcs.append(pc)
+                idx = np.arange(pc.fun.m)
+
+                # figure out equality and inequality maps
+                lb, ub = pc.bounds[0], pc.bounds[1]
+                arr_tol = get_arrays_tol(lb, ub)
+                is_equality = np.abs(ub - lb) <= arr_tol
+                self._map_eq.append(idx[is_equality])
+                self._map_ub.append(idx[~is_equality])
+
+                # these values will be corrected to their proper values later
+                self._m_eq += np.count_nonzero(is_equality)
+                self._m_ub += np.count_nonzero(~is_equality)
+
+        c_ub = []
+        c_eq = []
+        for i, pc in enumerate(self.pcs):
+            val = pc.fun.fun(x)
+            if self._verbose:
+                with np.printoptions(**PRINT_OPTIONS):
+                    with suppress(AttributeError):
+                        fun_name = self._constraints[i].fun.__name__
+                        print(f"{fun_name}({x}) = {val}")
+
+            # separate violations into c_eq and c_ub
+            eq_idx = self._map_eq[i]
+            ub_idx = self._map_ub[i]
+
+            ub_val = val[ub_idx]
+            if len(ub_idx):
+                xl = pc.bounds[0][ub_idx]
+                xu = pc.bounds[1][ub_idx]
+
+                # calculate slack within lower bound
+                finite_xl = xl > -np.inf
+                _v = xl[finite_xl] - ub_val[finite_xl]
+                c_ub.append(_v)
+
+                # calculate slack within lower bound
+                finite_xu = xu < np.inf
+                _v = ub_val[finite_xu] - xu[finite_xu]
+                c_ub.append(_v)
+
+            # equality constraints taken from midpoint between lb and ub
+            eq_val = val[eq_idx]
+            if len(eq_idx):
+                midpoint = 0.5 * (pc.bounds[1][eq_idx] + pc.bounds[0][eq_idx])
+                eq_val -= midpoint
+            c_eq.append(eq_val)
+
+        if self._m_eq:
+            c_eq = np.concatenate(c_eq)
+        else:
+            c_eq = np.array([])
+
+        if self._m_ub:
+            c_ub = np.concatenate(c_ub)
+        else:
+            c_ub = np.array([])
+
+        self._m_ub = c_ub.size
+        self._m_eq = c_eq.size
+
+        return c_ub, c_eq
+
+    @property
+    def m_ub(self):
+        """
+        Number of nonlinear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear inequality constraints.
+
+        Raises
+        ------
+        ValueError
+            If the number of nonlinear inequality constraints is unknown.
+        """
+        if self._m_ub is None:
+            raise ValueError(
+                "The number of nonlinear inequality constraints is unknown."
+            )
+        else:
+            return self._m_ub
+
+    @property
+    def m_eq(self):
+        """
+        Number of nonlinear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear equality constraints.
+
+        Raises
+        ------
+        ValueError
+            If the number of nonlinear equality constraints is unknown.
+        """
+        if self._m_eq is None:
+            raise ValueError(
+                "The number of nonlinear equality constraints is unknown."
+            )
+        else:
+            return self._m_eq
+
+    @property
+    def n_eval(self):
+        """
+        Number of function evaluations.
+
+        Returns
+        -------
+        int
+            Number of function evaluations.
+        """
+        if len(self.pcs):
+            return self.pcs[0].fun.nfev
+        else:
+            return 0
+
+    def maxcv(self, x, cub_val=None, ceq_val=None):
+        """
+        Evaluate the maximum constraint violation.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the maximum constraint violation is evaluated.
+        cub_val : array_like, shape (m_nonlinear_ub,), optional
+            Values of the nonlinear inequality constraints. If not provided,
+            the nonlinear inequality constraints are evaluated at `x`.
+        ceq_val : array_like, shape (m_nonlinear_eq,), optional
+            Values of the nonlinear equality constraints. If not provided,
+            the nonlinear equality constraints are evaluated at `x`.
+
+        Returns
+        -------
+        float
+            Maximum constraint violation at `x`.
+        """
+        return np.max(
+            self.violation(x, cub_val=cub_val, ceq_val=ceq_val), initial=0.0
+        )
+
+    def violation(self, x, cub_val=None, ceq_val=None):
+        return np.concatenate([pc.violation(x) for pc in self.pcs])
+
+
+class Problem:
+    """
+    Optimization problem.
+    """
+
+    def __init__(
+        self,
+        obj,
+        x0,
+        bounds,
+        linear,
+        nonlinear,
+        callback,
+        feasibility_tol,
+        scale,
+        store_history,
+        history_size,
+        filter_size,
+        debug,
+    ):
+        """
+        Initialize the nonlinear problem.
+
+        The problem is preprocessed to remove all the variables that are fixed
+        by the bound constraints.
+
+        Parameters
+        ----------
+        obj : ObjectiveFunction
+            Objective function.
+        x0 : array_like, shape (n,)
+            Initial guess.
+        bounds : BoundConstraints
+            Bound constraints.
+        linear : LinearConstraints
+            Linear constraints.
+        nonlinear : NonlinearConstraints
+            Nonlinear constraints.
+        callback : {callable, None}
+            Callback function.
+        feasibility_tol : float
+            Tolerance on the constraint violation.
+        scale : bool
+            Whether to scale the problem according to the bounds.
+        store_history : bool
+            Whether to store the function evaluations.
+        history_size : int
+            Maximum number of function evaluations to store.
+        filter_size : int
+            Maximum number of points in the filter.
+        debug : bool
+            Whether to make debugging tests during the execution.
+        """
+        if debug:
+            assert isinstance(obj, ObjectiveFunction)
+            assert isinstance(bounds, BoundConstraints)
+            assert isinstance(linear, LinearConstraints)
+            assert isinstance(nonlinear, NonlinearConstraints)
+            assert isinstance(feasibility_tol, float)
+            assert isinstance(scale, bool)
+            assert isinstance(store_history, bool)
+            assert isinstance(history_size, int)
+            if store_history:
+                assert history_size > 0
+            assert isinstance(filter_size, int)
+            assert filter_size > 0
+            assert isinstance(debug, bool)
+
+        self._obj = obj
+        self._linear = linear
+        self._nonlinear = nonlinear
+        if callback is not None:
+            if not callable(callback):
+                raise TypeError("The callback must be a callable function.")
+        self._callback = callback
+
+        # Check the consistency of the problem.
+        x0 = exact_1d_array(x0, "The initial guess must be a vector.")
+        n = x0.size
+        if bounds.xl.size != n:
+            raise ValueError(f"The bounds must have {n} elements.")
+        if linear.a_ub.shape[1] != n:
+            raise ValueError(
+                f"The left-hand side matrices of the linear constraints must "
+                f"have {n} columns."
+            )
+
+        # Check which variables are fixed.
+        tol = get_arrays_tol(bounds.xl, bounds.xu)
+        self._fixed_idx = (bounds.xl <= bounds.xu) & (
+            np.abs(bounds.xl - bounds.xu) < tol
+        )
+        self._fixed_val = 0.5 * (
+            bounds.xl[self._fixed_idx] + bounds.xu[self._fixed_idx]
+        )
+        self._fixed_val = np.clip(
+            self._fixed_val,
+            bounds.xl[self._fixed_idx],
+            bounds.xu[self._fixed_idx],
+        )
+
+        # Set the bound constraints.
+        self._orig_bounds = bounds
+        self._bounds = BoundConstraints(
+            Bounds(bounds.xl[~self._fixed_idx], bounds.xu[~self._fixed_idx])
+        )
+
+        # Set the initial guess.
+        self._x0 = self._bounds.project(x0[~self._fixed_idx])
+
+        # Set the linear constraints.
+        b_eq = linear.b_eq - linear.a_eq[:, self._fixed_idx] @ self._fixed_val
+        self._linear = LinearConstraints(
+            [
+                LinearConstraint(
+                    linear.a_ub[:, ~self._fixed_idx],
+                    -np.inf,
+                    linear.b_ub
+                    - linear.a_ub[:, self._fixed_idx] @ self._fixed_val,
+                ),
+                LinearConstraint(linear.a_eq[:, ~self._fixed_idx], b_eq, b_eq),
+            ],
+            self.n,
+            debug,
+        )
+
+        # Scale the problem if necessary.
+        scale = (
+            scale
+            and self._bounds.is_feasible
+            and np.all(np.isfinite(self._bounds.xl))
+            and np.all(np.isfinite(self._bounds.xu))
+        )
+        if scale:
+            self._scaling_factor = 0.5 * (self._bounds.xu - self._bounds.xl)
+            self._scaling_shift = 0.5 * (self._bounds.xu + self._bounds.xl)
+            self._bounds = BoundConstraints(
+                Bounds(-np.ones(self.n), np.ones(self.n))
+            )
+            b_eq = self._linear.b_eq - self._linear.a_eq @ self._scaling_shift
+            self._linear = LinearConstraints(
+                [
+                    LinearConstraint(
+                        self._linear.a_ub @ np.diag(self._scaling_factor),
+                        -np.inf,
+                        self._linear.b_ub
+                        - self._linear.a_ub @ self._scaling_shift,
+                    ),
+                    LinearConstraint(
+                        self._linear.a_eq @ np.diag(self._scaling_factor),
+                        b_eq,
+                        b_eq,
+                    ),
+                ],
+                self.n,
+                debug,
+            )
+            self._x0 = (self._x0 - self._scaling_shift) / self._scaling_factor
+        else:
+            self._scaling_factor = np.ones(self.n)
+            self._scaling_shift = np.zeros(self.n)
+
+        # Set the initial filter.
+        self._feasibility_tol = feasibility_tol
+        self._filter_size = filter_size
+        self._fun_filter = []
+        self._maxcv_filter = []
+        self._x_filter = []
+
+        # Set the initial history.
+        self._store_history = store_history
+        self._history_size = history_size
+        self._fun_history = []
+        self._maxcv_history = []
+        self._x_history = []
+
+    def __call__(self, x, penalty=0.0):
+        """
+        Evaluate the objective and nonlinear constraint functions.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the functions are evaluated.
+        penalty : float, optional
+            Penalty parameter used to select the point in the filter to forward
+            to the callback function.
+
+        Returns
+        -------
+        float
+            Objective function value.
+        `numpy.ndarray`, shape (m_nonlinear_ub,)
+            Nonlinear inequality constraint function values.
+        `numpy.ndarray`, shape (m_nonlinear_eq,)
+            Nonlinear equality constraint function values.
+
+        Raises
+        ------
+        `cobyqa.utils.CallbackSuccess`
+            If the callback function raises a ``StopIteration``.
+        """
+        # Evaluate the objective and nonlinear constraint functions.
+        x = np.asarray(x, dtype=float)
+        x_full = self.build_x(x)
+        fun_val = self._obj(x_full)
+        cub_val, ceq_val = self._nonlinear(x_full)
+        maxcv_val = self.maxcv(x, cub_val, ceq_val)
+        if self._store_history:
+            self._fun_history.append(fun_val)
+            self._maxcv_history.append(maxcv_val)
+            self._x_history.append(x)
+            if len(self._fun_history) > self._history_size:
+                self._fun_history.pop(0)
+                self._maxcv_history.pop(0)
+                self._x_history.pop(0)
+
+        # Add the point to the filter if it is not dominated by any point.
+        if np.isnan(fun_val) and np.isnan(maxcv_val):
+            include_point = len(self._fun_filter) == 0
+        elif np.isnan(fun_val):
+            include_point = all(
+                np.isnan(fun_filter)
+                and maxcv_val < maxcv_filter
+                or np.isnan(maxcv_filter)
+                for fun_filter, maxcv_filter in zip(
+                    self._fun_filter,
+                    self._maxcv_filter,
+                )
+            )
+        elif np.isnan(maxcv_val):
+            include_point = all(
+                np.isnan(maxcv_filter)
+                and fun_val < fun_filter
+                or np.isnan(fun_filter)
+                for fun_filter, maxcv_filter in zip(
+                    self._fun_filter,
+                    self._maxcv_filter,
+                )
+            )
+        else:
+            include_point = all(
+                fun_val < fun_filter or maxcv_val < maxcv_filter
+                for fun_filter, maxcv_filter in zip(
+                    self._fun_filter,
+                    self._maxcv_filter,
+                )
+            )
+        if include_point:
+            self._fun_filter.append(fun_val)
+            self._maxcv_filter.append(maxcv_val)
+            self._x_filter.append(x)
+
+            # Remove the points in the filter that are dominated by the new
+            # point. We must iterate in reverse order to avoid problems when
+            # removing elements from the list.
+            for k in range(len(self._fun_filter) - 2, -1, -1):
+                if np.isnan(fun_val):
+                    remove_point = np.isnan(self._fun_filter[k])
+                elif np.isnan(maxcv_val):
+                    remove_point = np.isnan(self._maxcv_filter[k])
+                else:
+                    remove_point = (
+                        np.isnan(self._fun_filter[k])
+                        or np.isnan(self._maxcv_filter[k])
+                        or fun_val <= self._fun_filter[k]
+                        and maxcv_val <= self._maxcv_filter[k]
+                    )
+                if remove_point:
+                    self._fun_filter.pop(k)
+                    self._maxcv_filter.pop(k)
+                    self._x_filter.pop(k)
+
+            # Keep only the most recent points in the filter.
+            if len(self._fun_filter) > self._filter_size:
+                self._fun_filter.pop(0)
+                self._maxcv_filter.pop(0)
+                self._x_filter.pop(0)
+
+        # Evaluate the callback function after updating the filter to ensure
+        # that the current point can be returned by the method.
+        if self._callback is not None:
+            sig = signature(self._callback)
+            try:
+                x_best, fun_best, _ = self.best_eval(penalty)
+                x_best = self.build_x(x_best)
+                if set(sig.parameters) == {"intermediate_result"}:
+                    intermediate_result = OptimizeResult(
+                        x=x_best,
+                        fun=fun_best,
+                        # maxcv=maxcv_best,
+                    )
+                    self._callback(intermediate_result=intermediate_result)
+                else:
+                    self._callback(x_best)
+            except StopIteration as exc:
+                raise CallbackSuccess from exc
+
+        # Apply the extreme barriers and return.
+        if np.isnan(fun_val):
+            fun_val = BARRIER
+        cub_val[np.isnan(cub_val)] = BARRIER
+        ceq_val[np.isnan(ceq_val)] = BARRIER
+        fun_val = max(min(fun_val, BARRIER), -BARRIER)
+        cub_val = np.maximum(np.minimum(cub_val, BARRIER), -BARRIER)
+        ceq_val = np.maximum(np.minimum(ceq_val, BARRIER), -BARRIER)
+        return fun_val, cub_val, ceq_val
+
+    @property
+    def n(self):
+        """
+        Number of variables.
+
+        Returns
+        -------
+        int
+            Number of variables.
+        """
+        return self.x0.size
+
+    @property
+    def n_orig(self):
+        """
+        Number of variables in the original problem (with fixed variables).
+
+        Returns
+        -------
+        int
+            Number of variables in the original problem (with fixed variables).
+        """
+        return self._fixed_idx.size
+
+    @property
+    def x0(self):
+        """
+        Initial guess.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Initial guess.
+        """
+        return self._x0
+
+    @property
+    def n_eval(self):
+        """
+        Number of function evaluations.
+
+        Returns
+        -------
+        int
+            Number of function evaluations.
+        """
+        return self._obj.n_eval
+
+    @property
+    def fun_name(self):
+        """
+        Name of the objective function.
+
+        Returns
+        -------
+        str
+            Name of the objective function.
+        """
+        return self._obj.name
+
+    @property
+    def bounds(self):
+        """
+        Bound constraints.
+
+        Returns
+        -------
+        BoundConstraints
+            Bound constraints.
+        """
+        return self._bounds
+
+    @property
+    def linear(self):
+        """
+        Linear constraints.
+
+        Returns
+        -------
+        LinearConstraints
+            Linear constraints.
+        """
+        return self._linear
+
+    @property
+    def m_bounds(self):
+        """
+        Number of bound constraints.
+
+        Returns
+        -------
+        int
+            Number of bound constraints.
+        """
+        return self.bounds.m
+
+    @property
+    def m_linear_ub(self):
+        """
+        Number of linear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear inequality constraints.
+        """
+        return self.linear.m_ub
+
+    @property
+    def m_linear_eq(self):
+        """
+        Number of linear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of linear equality constraints.
+        """
+        return self.linear.m_eq
+
+    @property
+    def m_nonlinear_ub(self):
+        """
+        Number of nonlinear inequality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear inequality constraints.
+
+        Raises
+        ------
+        ValueError
+            If the number of nonlinear inequality constraints is not known.
+        """
+        return self._nonlinear.m_ub
+
+    @property
+    def m_nonlinear_eq(self):
+        """
+        Number of nonlinear equality constraints.
+
+        Returns
+        -------
+        int
+            Number of nonlinear equality constraints.
+
+        Raises
+        ------
+        ValueError
+            If the number of nonlinear equality constraints is not known.
+        """
+        return self._nonlinear.m_eq
+
+    @property
+    def fun_history(self):
+        """
+        History of objective function evaluations.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n_eval,)
+            History of objective function evaluations.
+        """
+        return np.array(self._fun_history, dtype=float)
+
+    @property
+    def maxcv_history(self):
+        """
+        History of maximum constraint violations.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n_eval,)
+            History of maximum constraint violations.
+        """
+        return np.array(self._maxcv_history, dtype=float)
+
+    @property
+    def type(self):
+        """
+        Type of the problem.
+
+        The problem can be either 'unconstrained', 'bound-constrained',
+        'linearly constrained', or 'nonlinearly constrained'.
+
+        Returns
+        -------
+        str
+            Type of the problem.
+        """
+        try:
+            if self.m_nonlinear_ub > 0 or self.m_nonlinear_eq > 0:
+                return "nonlinearly constrained"
+            elif self.m_linear_ub > 0 or self.m_linear_eq > 0:
+                return "linearly constrained"
+            elif self.m_bounds > 0:
+                return "bound-constrained"
+            else:
+                return "unconstrained"
+        except ValueError:
+            # The number of nonlinear constraints is not known. It may be zero
+            # if the user provided a nonlinear inequality and/or equality
+            # constraint function that returns an empty array. However, as this
+            # is not known before the first call to the function, we assume
+            # that the problem is nonlinearly constrained.
+            return "nonlinearly constrained"
+
+    @property
+    def is_feasibility(self):
+        """
+        Whether the problem is a feasibility problem.
+
+        Returns
+        -------
+        bool
+            Whether the problem is a feasibility problem.
+        """
+        return self.fun_name == ""
+
+    def build_x(self, x):
+        """
+        Build the full vector of variables from the reduced vector.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Reduced vector of variables.
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n_orig,)
+            Full vector of variables.
+        """
+        x_full = np.empty(self.n_orig)
+        x_full[self._fixed_idx] = self._fixed_val
+        x_full[~self._fixed_idx] = (x * self._scaling_factor
+                                    + self._scaling_shift)
+        return self._orig_bounds.project(x_full)
+
+    def maxcv(self, x, cub_val=None, ceq_val=None):
+        """
+        Evaluate the maximum constraint violation.
+
+        Parameters
+        ----------
+        x : array_like, shape (n,)
+            Point at which the maximum constraint violation is evaluated.
+        cub_val : array_like, shape (m_nonlinear_ub,), optional
+            Values of the nonlinear inequality constraints. If not provided,
+            the nonlinear inequality constraints are evaluated at `x`.
+        ceq_val : array_like, shape (m_nonlinear_eq,), optional
+            Values of the nonlinear equality constraints. If not provided,
+            the nonlinear equality constraints are evaluated at `x`.
+
+        Returns
+        -------
+        float
+            Maximum constraint violation at `x`.
+        """
+        violation = self.violation(x, cub_val=cub_val, ceq_val=ceq_val)
+        if np.count_nonzero(violation):
+            return np.max(violation, initial=0.0)
+        else:
+            return 0.0
+
+    def violation(self, x, cub_val=None, ceq_val=None):
+        violation = []
+        if not self.bounds.is_feasible:
+            b = self.bounds.violation(x)
+            violation.append(b)
+
+        if len(self.linear.pcs):
+            lc = self.linear.violation(x)
+            violation.append(lc)
+        if len(self._nonlinear.pcs):
+            nlc = self._nonlinear.violation(x, cub_val, ceq_val)
+            violation.append(nlc)
+
+        if len(violation):
+            return np.concatenate(violation)
+
+    def best_eval(self, penalty):
+        """
+        Return the best point in the filter and the corresponding objective and
+        nonlinear constraint function evaluations.
+
+        Parameters
+        ----------
+        penalty : float
+            Penalty parameter
+
+        Returns
+        -------
+        `numpy.ndarray`, shape (n,)
+            Best point.
+        float
+            Corresponding objective function value.
+        float
+            Corresponding maximum constraint violation.
+        """
+        # If the filter is empty, i.e., if no function evaluation has been
+        # performed, we evaluate the objective and nonlinear constraint
+        # functions at the initial guess.
+        if len(self._fun_filter) == 0:
+            self(self.x0)
+
+        # Find the best point in the filter.
+        fun_filter = np.array(self._fun_filter)
+        maxcv_filter = np.array(self._maxcv_filter)
+        x_filter = np.array(self._x_filter)
+        finite_idx = np.isfinite(maxcv_filter)
+        if np.any(finite_idx):
+            # At least one point has a finite maximum constraint violation.
+            feasible_idx = maxcv_filter <= self._feasibility_tol
+            if np.any(feasible_idx) and not np.all(
+                np.isnan(fun_filter[feasible_idx])
+            ):
+                # At least one point is feasible and has a well-defined
+                # objective function value. We select the point with the least
+                # objective function value. If there is a tie, we select the
+                # point with the least maximum constraint violation. If there
+                # is still a tie, we select the most recent point.
+                fun_min_idx = feasible_idx & (
+                    fun_filter <= np.nanmin(fun_filter[feasible_idx])
+                )
+                if np.count_nonzero(fun_min_idx) > 1:
+                    fun_min_idx &= maxcv_filter <= np.min(
+                        maxcv_filter[fun_min_idx]
+                    )
+                i = np.flatnonzero(fun_min_idx)[-1]
+            elif np.any(feasible_idx):
+                # At least one point is feasible but no feasible point has a
+                # well-defined objective function value. We select the most
+                # recent feasible point.
+                i = np.flatnonzero(feasible_idx)[-1]
+            else:
+                # No point is feasible. We first compute the merit function
+                # value for each point.
+                merit_filter = np.full_like(fun_filter, np.nan)
+                merit_filter[finite_idx] = (
+                    fun_filter[finite_idx] + penalty * maxcv_filter[finite_idx]
+                )
+                if np.all(np.isnan(merit_filter)):
+                    # No point has a well-defined merit function value. In
+                    # other words, among the points with a well-defined maximum
+                    # constraint violation, none has a well-defined objective
+                    # function value. We select the point with the least
+                    # maximum constraint violation. If there is a tie, we
+                    # select the most recent point.
+                    min_maxcv_idx = maxcv_filter <= np.nanmin(maxcv_filter)
+                    i = np.flatnonzero(min_maxcv_idx)[-1]
+                else:
+                    # At least one point has a well-defined merit function
+                    # value. We select the point with the least merit function
+                    # value. If there is a tie, we select the point with the
+                    # least maximum constraint violation. If there is still a
+                    # tie, we select the point with the least objective
+                    # function value. If there is still a tie, we select the
+                    # most recent point.
+                    merit_min_idx = merit_filter <= np.nanmin(merit_filter)
+                    if np.count_nonzero(merit_min_idx) > 1:
+                        merit_min_idx &= maxcv_filter <= np.min(
+                            maxcv_filter[merit_min_idx]
+                        )
+
+                    if np.count_nonzero(merit_min_idx) > 1:
+                        merit_min_idx &= fun_filter <= np.min(
+                            fun_filter[merit_min_idx]
+                        )
+                    i = np.flatnonzero(merit_min_idx)[-1]
+        elif not np.all(np.isnan(fun_filter)):
+            # No maximum constraint violation is well-defined but at least one
+            # point has a well-defined objective function value. We select the
+            # point with the least objective function value. If there is a tie,
+            # we select the most recent point.
+            fun_min_idx = fun_filter <= np.nanmin(fun_filter)
+            i = np.flatnonzero(fun_min_idx)[-1]
+        else:
+            # No point has a well-defined maximum constraint violation or
+            # objective function value. We select the most recent point.
+            i = len(fun_filter) - 1
+        return (
+            self.bounds.project(x_filter[i, :]),
+            fun_filter[i],
+            maxcv_filter[i],
+        )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/settings.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/settings.py
new file mode 100644
index 0000000000000000000000000000000000000000..6394822826e094a803a485556a298e342bf260ac
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/settings.py
@@ -0,0 +1,132 @@
+import sys
+from enum import Enum
+
+import numpy as np
+
+
+# Exit status.
+class ExitStatus(Enum):
+    """
+    Exit statuses.
+    """
+
+    RADIUS_SUCCESS = 0
+    TARGET_SUCCESS = 1
+    FIXED_SUCCESS = 2
+    CALLBACK_SUCCESS = 3
+    FEASIBLE_SUCCESS = 4
+    MAX_EVAL_WARNING = 5
+    MAX_ITER_WARNING = 6
+    INFEASIBLE_ERROR = -1
+    LINALG_ERROR = -2
+
+
+class Options(str, Enum):
+    """
+    Options.
+    """
+
+    DEBUG = "debug"
+    FEASIBILITY_TOL = "feasibility_tol"
+    FILTER_SIZE = "filter_size"
+    HISTORY_SIZE = "history_size"
+    MAX_EVAL = "maxfev"
+    MAX_ITER = "maxiter"
+    NPT = "nb_points"
+    RHOBEG = "radius_init"
+    RHOEND = "radius_final"
+    SCALE = "scale"
+    STORE_HISTORY = "store_history"
+    TARGET = "target"
+    VERBOSE = "disp"
+
+
+class Constants(str, Enum):
+    """
+    Constants.
+    """
+
+    DECREASE_RADIUS_FACTOR = "decrease_radius_factor"
+    INCREASE_RADIUS_FACTOR = "increase_radius_factor"
+    INCREASE_RADIUS_THRESHOLD = "increase_radius_threshold"
+    DECREASE_RADIUS_THRESHOLD = "decrease_radius_threshold"
+    DECREASE_RESOLUTION_FACTOR = "decrease_resolution_factor"
+    LARGE_RESOLUTION_THRESHOLD = "large_resolution_threshold"
+    MODERATE_RESOLUTION_THRESHOLD = "moderate_resolution_threshold"
+    LOW_RATIO = "low_ratio"
+    HIGH_RATIO = "high_ratio"
+    VERY_LOW_RATIO = "very_low_ratio"
+    PENALTY_INCREASE_THRESHOLD = "penalty_increase_threshold"
+    PENALTY_INCREASE_FACTOR = "penalty_increase_factor"
+    SHORT_STEP_THRESHOLD = "short_step_threshold"
+    LOW_RADIUS_FACTOR = "low_radius_factor"
+    BYRD_OMOJOKUN_FACTOR = "byrd_omojokun_factor"
+    THRESHOLD_RATIO_CONSTRAINTS = "threshold_ratio_constraints"
+    LARGE_SHIFT_FACTOR = "large_shift_factor"
+    LARGE_GRADIENT_FACTOR = "large_gradient_factor"
+    RESOLUTION_FACTOR = "resolution_factor"
+    IMPROVE_TCG = "improve_tcg"
+
+
+# Default options.
+DEFAULT_OPTIONS = {
+    Options.DEBUG.value: False,
+    Options.FEASIBILITY_TOL.value: np.sqrt(np.finfo(float).eps),
+    Options.FILTER_SIZE.value: sys.maxsize,
+    Options.HISTORY_SIZE.value: sys.maxsize,
+    Options.MAX_EVAL.value: lambda n: 500 * n,
+    Options.MAX_ITER.value: lambda n: 1000 * n,
+    Options.NPT.value: lambda n: 2 * n + 1,
+    Options.RHOBEG.value: 1.0,
+    Options.RHOEND.value: 1e-6,
+    Options.SCALE.value: False,
+    Options.STORE_HISTORY.value: False,
+    Options.TARGET.value: -np.inf,
+    Options.VERBOSE.value: False,
+}
+
+# Default constants.
+DEFAULT_CONSTANTS = {
+    Constants.DECREASE_RADIUS_FACTOR.value: 0.5,
+    Constants.INCREASE_RADIUS_FACTOR.value: np.sqrt(2.0),
+    Constants.INCREASE_RADIUS_THRESHOLD.value: 2.0,
+    Constants.DECREASE_RADIUS_THRESHOLD.value: 1.4,
+    Constants.DECREASE_RESOLUTION_FACTOR.value: 0.1,
+    Constants.LARGE_RESOLUTION_THRESHOLD.value: 250.0,
+    Constants.MODERATE_RESOLUTION_THRESHOLD.value: 16.0,
+    Constants.LOW_RATIO.value: 0.1,
+    Constants.HIGH_RATIO.value: 0.7,
+    Constants.VERY_LOW_RATIO.value: 0.01,
+    Constants.PENALTY_INCREASE_THRESHOLD.value: 1.5,
+    Constants.PENALTY_INCREASE_FACTOR.value: 2.0,
+    Constants.SHORT_STEP_THRESHOLD.value: 0.5,
+    Constants.LOW_RADIUS_FACTOR.value: 0.1,
+    Constants.BYRD_OMOJOKUN_FACTOR.value: 0.8,
+    Constants.THRESHOLD_RATIO_CONSTRAINTS.value: 2.0,
+    Constants.LARGE_SHIFT_FACTOR.value: 10.0,
+    Constants.LARGE_GRADIENT_FACTOR.value: 10.0,
+    Constants.RESOLUTION_FACTOR.value: 2.0,
+    Constants.IMPROVE_TCG.value: True,
+}
+
+# Printing options.
+PRINT_OPTIONS = {
+    "threshold": 6,
+    "edgeitems": 2,
+    "linewidth": sys.maxsize,
+    "formatter": {
+        "float_kind": lambda x: np.format_float_scientific(
+            x,
+            precision=3,
+            unique=False,
+            pad_left=2,
+        )
+    },
+}
+
+# Constants.
+BARRIER = 2.0 ** min(
+    100,
+    np.finfo(float).maxexp // 2,
+    -np.finfo(float).minexp // 2,
+)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..01a1ad3c6f4cb5c0c9b99d1ce35fea92e7618ff5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/__init__.py
@@ -0,0 +1,14 @@
+from .geometry import cauchy_geometry, spider_geometry
+from .optim import (
+    tangential_byrd_omojokun,
+    constrained_tangential_byrd_omojokun,
+    normal_byrd_omojokun,
+)
+
+__all__ = [
+    "cauchy_geometry",
+    "spider_geometry",
+    "tangential_byrd_omojokun",
+    "constrained_tangential_byrd_omojokun",
+    "normal_byrd_omojokun",
+]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/geometry.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/geometry.py
new file mode 100644
index 0000000000000000000000000000000000000000..7b67fd7c813ee493b18720d1daf71324d72330b6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/geometry.py
@@ -0,0 +1,387 @@
+import inspect
+
+import numpy as np
+
+from ..utils import get_arrays_tol
+
+
+TINY = np.finfo(float).tiny
+
+
+def cauchy_geometry(const, grad, curv, xl, xu, delta, debug):
+    r"""
+    Maximize approximately the absolute value of a quadratic function subject
+    to bound constraints in a trust region.
+
+    This function solves approximately
+
+    .. math::
+
+        \max_{s \in \mathbb{R}^n} \quad \bigg\lvert c + g^{\mathsf{T}} s +
+        \frac{1}{2} s^{\mathsf{T}} H s \bigg\rvert \quad \text{s.t.} \quad
+        \left\{ \begin{array}{l}
+            l \le s \le u,\\
+            \lVert s \rVert \le \Delta,
+        \end{array} \right.
+
+    by maximizing the objective function along the constrained Cauchy
+    direction.
+
+    Parameters
+    ----------
+    const : float
+        Constant :math:`c` as shown above.
+    grad : `numpy.ndarray`, shape (n,)
+        Gradient :math:`g` as shown above.
+    curv : callable
+        Curvature of :math:`H` along any vector.
+
+            ``curv(s) -> float``
+
+        returns :math:`s^{\mathsf{T}} H s`.
+    xl : `numpy.ndarray`, shape (n,)
+        Lower bounds :math:`l` as shown above.
+    xu : `numpy.ndarray`, shape (n,)
+        Upper bounds :math:`u` as shown above.
+    delta : float
+        Trust-region radius :math:`\Delta` as shown above.
+    debug : bool
+        Whether to make debugging tests during the execution.
+
+    Returns
+    -------
+    `numpy.ndarray`, shape (n,)
+        Approximate solution :math:`s`.
+
+    Notes
+    -----
+    This function is described as the first alternative in Section 6.5 of [1]_.
+    It is assumed that the origin is feasible with respect to the bound
+    constraints and that `delta` is finite and positive.
+
+    References
+    ----------
+    .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+    """
+    if debug:
+        assert isinstance(const, float)
+        assert isinstance(grad, np.ndarray) and grad.ndim == 1
+        assert inspect.signature(curv).bind(grad)
+        assert isinstance(xl, np.ndarray) and xl.shape == grad.shape
+        assert isinstance(xu, np.ndarray) and xu.shape == grad.shape
+        assert isinstance(delta, float)
+        assert isinstance(debug, bool)
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= tol)
+        assert np.all(xu >= -tol)
+        assert np.isfinite(delta) and delta > 0.0
+    xl = np.minimum(xl, 0.0)
+    xu = np.maximum(xu, 0.0)
+
+    # To maximize the absolute value of a quadratic function, we maximize the
+    # function itself or its negative, and we choose the solution that provides
+    # the largest function value.
+    step1, q_val1 = _cauchy_geom(const, grad, curv, xl, xu, delta, debug)
+    step2, q_val2 = _cauchy_geom(
+        -const,
+        -grad,
+        lambda x: -curv(x),
+        xl,
+        xu,
+        delta,
+        debug,
+    )
+    step = step1 if abs(q_val1) >= abs(q_val2) else step2
+
+    if debug:
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step
+
+
+def spider_geometry(const, grad, curv, xpt, xl, xu, delta, debug):
+    r"""
+    Maximize approximately the absolute value of a quadratic function subject
+    to bound constraints in a trust region.
+
+    This function solves approximately
+
+    .. math::
+
+        \max_{s \in \mathbb{R}^n} \quad \bigg\lvert c + g^{\mathsf{T}} s +
+        \frac{1}{2} s^{\mathsf{T}} H s \bigg\rvert \quad \text{s.t.} \quad
+        \left\{ \begin{array}{l}
+            l \le s \le u,\\
+            \lVert s \rVert \le \Delta,
+        \end{array} \right.
+
+    by maximizing the objective function along given straight lines.
+
+    Parameters
+    ----------
+    const : float
+        Constant :math:`c` as shown above.
+    grad : `numpy.ndarray`, shape (n,)
+        Gradient :math:`g` as shown above.
+    curv : callable
+        Curvature of :math:`H` along any vector.
+
+            ``curv(s) -> float``
+
+        returns :math:`s^{\mathsf{T}} H s`.
+    xpt : `numpy.ndarray`, shape (n, npt)
+        Points defining the straight lines. The straight lines considered are
+        the ones passing through the origin and the points in `xpt`.
+    xl : `numpy.ndarray`, shape (n,)
+        Lower bounds :math:`l` as shown above.
+    xu : `numpy.ndarray`, shape (n,)
+        Upper bounds :math:`u` as shown above.
+    delta : float
+        Trust-region radius :math:`\Delta` as shown above.
+    debug : bool
+        Whether to make debugging tests during the execution.
+
+    Returns
+    -------
+    `numpy.ndarray`, shape (n,)
+        Approximate solution :math:`s`.
+
+    Notes
+    -----
+    This function is described as the second alternative in Section 6.5 of
+    [1]_. It is assumed that the origin is feasible with respect to the bound
+    constraints and that `delta` is finite and positive.
+
+    References
+    ----------
+    .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+    """
+    if debug:
+        assert isinstance(const, float)
+        assert isinstance(grad, np.ndarray) and grad.ndim == 1
+        assert inspect.signature(curv).bind(grad)
+        assert (
+            isinstance(xpt, np.ndarray)
+            and xpt.ndim == 2
+            and xpt.shape[0] == grad.size
+        )
+        assert isinstance(xl, np.ndarray) and xl.shape == grad.shape
+        assert isinstance(xu, np.ndarray) and xu.shape == grad.shape
+        assert isinstance(delta, float)
+        assert isinstance(debug, bool)
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= tol)
+        assert np.all(xu >= -tol)
+        assert np.isfinite(delta) and delta > 0.0
+    xl = np.minimum(xl, 0.0)
+    xu = np.maximum(xu, 0.0)
+
+    # Iterate through the straight lines.
+    step = np.zeros_like(grad)
+    q_val = const
+    s_norm = np.linalg.norm(xpt, axis=0)
+
+    # Set alpha_xl to the step size for the lower-bound constraint and
+    # alpha_xu to the step size for the upper-bound constraint.
+
+    # xl.shape = (N,)
+    # xpt.shape = (N, M)
+    # i_xl_pos.shape = (M, N)
+    i_xl_pos = (xl > -np.inf) & (xpt.T > -TINY * xl)
+    i_xl_neg = (xl > -np.inf) & (xpt.T < TINY * xl)
+    i_xu_pos = (xu < np.inf) & (xpt.T > TINY * xu)
+    i_xu_neg = (xu < np.inf) & (xpt.T < -TINY * xu)
+
+    # (M, N)
+    alpha_xl_pos = np.atleast_2d(
+        np.broadcast_to(xl, i_xl_pos.shape)[i_xl_pos] / xpt.T[i_xl_pos]
+    )
+    # (M,)
+    alpha_xl_pos = np.max(alpha_xl_pos, axis=1, initial=-np.inf)
+    # make sure it's (M,)
+    alpha_xl_pos = np.broadcast_to(np.atleast_1d(alpha_xl_pos), xpt.shape[1])
+
+    alpha_xl_neg = np.atleast_2d(
+        np.broadcast_to(xl, i_xl_neg.shape)[i_xl_neg] / xpt.T[i_xl_neg]
+    )
+    alpha_xl_neg = np.max(alpha_xl_neg, axis=1, initial=np.inf)
+    alpha_xl_neg = np.broadcast_to(np.atleast_1d(alpha_xl_neg), xpt.shape[1])
+
+    alpha_xu_neg = np.atleast_2d(
+        np.broadcast_to(xu, i_xu_neg.shape)[i_xu_neg] / xpt.T[i_xu_neg]
+    )
+    alpha_xu_neg = np.max(alpha_xu_neg, axis=1, initial=-np.inf)
+    alpha_xu_neg = np.broadcast_to(np.atleast_1d(alpha_xu_neg), xpt.shape[1])
+
+    alpha_xu_pos = np.atleast_2d(
+        np.broadcast_to(xu, i_xu_pos.shape)[i_xu_pos] / xpt.T[i_xu_pos]
+    )
+    alpha_xu_pos = np.max(alpha_xu_pos, axis=1, initial=np.inf)
+    alpha_xu_pos = np.broadcast_to(np.atleast_1d(alpha_xu_pos), xpt.shape[1])
+
+    for k in range(xpt.shape[1]):
+        # Set alpha_tr to the step size for the trust-region constraint.
+        if s_norm[k] > TINY * delta:
+            alpha_tr = max(delta / s_norm[k], 0.0)
+        else:
+            # The current straight line is basically zero.
+            continue
+
+        alpha_bd_pos = max(min(alpha_xu_pos[k], alpha_xl_neg[k]), 0.0)
+        alpha_bd_neg = min(max(alpha_xl_pos[k], alpha_xu_neg[k]), 0.0)
+
+        # Set alpha_quad_pos and alpha_quad_neg to the step size to the extrema
+        # of the quadratic function along the positive and negative directions.
+        grad_step = grad @ xpt[:, k]
+        curv_step = curv(xpt[:, k])
+        if (
+            grad_step >= 0.0
+            and curv_step < -TINY * grad_step
+            or grad_step <= 0.0
+            and curv_step > -TINY * grad_step
+        ):
+            alpha_quad_pos = max(-grad_step / curv_step, 0.0)
+        else:
+            alpha_quad_pos = np.inf
+        if (
+            grad_step >= 0.0
+            and curv_step > TINY * grad_step
+            or grad_step <= 0.0
+            and curv_step < TINY * grad_step
+        ):
+            alpha_quad_neg = min(-grad_step / curv_step, 0.0)
+        else:
+            alpha_quad_neg = -np.inf
+
+        # Select the step that provides the largest value of the objective
+        # function if it improves the current best. The best positive step is
+        # either the one that reaches the constraints or the one that reaches
+        # the extremum of the objective function along the current direction
+        # (only possible if the resulting step is feasible). We test both, and
+        # we perform similar calculations along the negative step.
+        # N.B.: we select the largest possible step among all the ones that
+        # maximize the objective function. This is to avoid returning the zero
+        # step in some extreme cases.
+        alpha_pos = min(alpha_tr, alpha_bd_pos)
+        alpha_neg = max(-alpha_tr, alpha_bd_neg)
+        q_val_pos = (
+            const + alpha_pos * grad_step + 0.5 * alpha_pos**2.0 * curv_step
+        )
+        q_val_neg = (
+            const + alpha_neg * grad_step + 0.5 * alpha_neg**2.0 * curv_step
+        )
+        if alpha_quad_pos < alpha_pos:
+            q_val_quad_pos = (
+                const
+                + alpha_quad_pos * grad_step
+                + 0.5 * alpha_quad_pos**2.0 * curv_step
+            )
+            if abs(q_val_quad_pos) > abs(q_val_pos):
+                alpha_pos = alpha_quad_pos
+                q_val_pos = q_val_quad_pos
+        if alpha_quad_neg > alpha_neg:
+            q_val_quad_neg = (
+                const
+                + alpha_quad_neg * grad_step
+                + 0.5 * alpha_quad_neg**2.0 * curv_step
+            )
+            if abs(q_val_quad_neg) > abs(q_val_neg):
+                alpha_neg = alpha_quad_neg
+                q_val_neg = q_val_quad_neg
+        if abs(q_val_pos) >= abs(q_val_neg) and abs(q_val_pos) > abs(q_val):
+            step = np.clip(alpha_pos * xpt[:, k], xl, xu)
+            q_val = q_val_pos
+        elif abs(q_val_neg) > abs(q_val_pos) and abs(q_val_neg) > abs(q_val):
+            step = np.clip(alpha_neg * xpt[:, k], xl, xu)
+            q_val = q_val_neg
+
+    if debug:
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step
+
+
+def _cauchy_geom(const, grad, curv, xl, xu, delta, debug):
+    """
+    Same as `bound_constrained_cauchy_step` without the absolute value.
+    """
+    # Calculate the initial active set.
+    fixed_xl = (xl < 0.0) & (grad > 0.0)
+    fixed_xu = (xu > 0.0) & (grad < 0.0)
+
+    # Calculate the Cauchy step.
+    cauchy_step = np.zeros_like(grad)
+    cauchy_step[fixed_xl] = xl[fixed_xl]
+    cauchy_step[fixed_xu] = xu[fixed_xu]
+    if np.linalg.norm(cauchy_step) > delta:
+        working = fixed_xl | fixed_xu
+        while True:
+            # Calculate the Cauchy step for the directions in the working set.
+            g_norm = np.linalg.norm(grad[working])
+            delta_reduced = np.sqrt(
+                delta**2.0 - cauchy_step[~working] @ cauchy_step[~working]
+            )
+            if g_norm > TINY * abs(delta_reduced):
+                mu = max(delta_reduced / g_norm, 0.0)
+            else:
+                break
+            cauchy_step[working] = mu * grad[working]
+
+            # Update the working set.
+            fixed_xl = working & (cauchy_step < xl)
+            fixed_xu = working & (cauchy_step > xu)
+            if not np.any(fixed_xl) and not np.any(fixed_xu):
+                # Stop the calculations as the Cauchy step is now feasible.
+                break
+            cauchy_step[fixed_xl] = xl[fixed_xl]
+            cauchy_step[fixed_xu] = xu[fixed_xu]
+            working = working & ~(fixed_xl | fixed_xu)
+
+    # Calculate the step that maximizes the quadratic along the Cauchy step.
+    grad_step = grad @ cauchy_step
+    if grad_step >= 0.0:
+        # Set alpha_tr to the step size for the trust-region constraint.
+        s_norm = np.linalg.norm(cauchy_step)
+        if s_norm > TINY * delta:
+            alpha_tr = max(delta / s_norm, 0.0)
+        else:
+            # The Cauchy step is basically zero.
+            alpha_tr = 0.0
+
+        # Set alpha_quad to the step size for the maximization problem.
+        curv_step = curv(cauchy_step)
+        if curv_step < -TINY * grad_step:
+            alpha_quad = max(-grad_step / curv_step, 0.0)
+        else:
+            alpha_quad = np.inf
+
+        # Set alpha_bd to the step size for the bound constraints.
+        i_xl = (xl > -np.inf) & (cauchy_step < TINY * xl)
+        i_xu = (xu < np.inf) & (cauchy_step > TINY * xu)
+        alpha_xl = np.min(xl[i_xl] / cauchy_step[i_xl], initial=np.inf)
+        alpha_xu = np.min(xu[i_xu] / cauchy_step[i_xu], initial=np.inf)
+        alpha_bd = min(alpha_xl, alpha_xu)
+
+        # Calculate the solution and the corresponding function value.
+        alpha = min(alpha_tr, alpha_quad, alpha_bd)
+        step = np.clip(alpha * cauchy_step, xl, xu)
+        q_val = const + alpha * grad_step + 0.5 * alpha**2.0 * curv_step
+    else:
+        # This case is never reached in exact arithmetic. It prevents this
+        # function to return a step that decreases the objective function.
+        step = np.zeros_like(grad)
+        q_val = const
+
+    if debug:
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step, q_val
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/optim.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/optim.py
new file mode 100644
index 0000000000000000000000000000000000000000..c4a960396fb2e992cf76bac0baf171b5af9b7717
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/subsolvers/optim.py
@@ -0,0 +1,1203 @@
+import inspect
+
+import numpy as np
+from scipy.linalg import qr
+
+from ..utils import get_arrays_tol
+
+
+TINY = np.finfo(float).tiny
+EPS = np.finfo(float).eps
+
+
+def tangential_byrd_omojokun(grad, hess_prod, xl, xu, delta, debug, **kwargs):
+    r"""
+    Minimize approximately a quadratic function subject to bound constraints in
+    a trust region.
+
+    This function solves approximately
+
+    .. math::
+
+        \min_{s \in \mathbb{R}^n} \quad g^{\mathsf{T}} s + \frac{1}{2}
+        s^{\mathsf{T}} H s \quad \text{s.t.} \quad
+        \left\{ \begin{array}{l}
+            l \le s \le u\\
+            \lVert s \rVert \le \Delta,
+        \end{array} \right.
+
+    using an active-set variation of the truncated conjugate gradient method.
+
+    Parameters
+    ----------
+    grad : `numpy.ndarray`, shape (n,)
+        Gradient :math:`g` as shown above.
+    hess_prod : callable
+        Product of the Hessian matrix :math:`H` with any vector.
+
+            ``hess_prod(s) -> `numpy.ndarray`, shape (n,)``
+
+        returns the product :math:`H s`.
+    xl : `numpy.ndarray`, shape (n,)
+        Lower bounds :math:`l` as shown above.
+    xu : `numpy.ndarray`, shape (n,)
+        Upper bounds :math:`u` as shown above.
+    delta : float
+        Trust-region radius :math:`\Delta` as shown above.
+    debug : bool
+        Whether to make debugging tests during the execution.
+
+    Returns
+    -------
+    `numpy.ndarray`, shape (n,)
+        Approximate solution :math:`s`.
+
+    Other Parameters
+    ----------------
+    improve_tcg : bool, optional
+        If True, a solution generated by the truncated conjugate gradient
+        method that is on the boundary of the trust region is improved by
+        moving around the trust-region boundary on the two-dimensional space
+        spanned by the solution and the gradient of the quadratic function at
+        the solution (default is True).
+
+    Notes
+    -----
+    This function implements Algorithm 6.2 of [1]_. It is assumed that the
+    origin is feasible with respect to the bound constraints and that `delta`
+    is finite and positive.
+
+    References
+    ----------
+    .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+    """
+    if debug:
+        assert isinstance(grad, np.ndarray) and grad.ndim == 1
+        assert inspect.signature(hess_prod).bind(grad)
+        assert isinstance(xl, np.ndarray) and xl.shape == grad.shape
+        assert isinstance(xu, np.ndarray) and xu.shape == grad.shape
+        assert isinstance(delta, float)
+        assert isinstance(debug, bool)
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= tol)
+        assert np.all(xu >= -tol)
+        assert np.isfinite(delta) and delta > 0.0
+    xl = np.minimum(xl, 0.0)
+    xu = np.maximum(xu, 0.0)
+
+    # Copy the arrays that may be modified by the code below.
+    n = grad.size
+    grad = np.copy(grad)
+    grad_orig = np.copy(grad)
+
+    # Calculate the initial active set.
+    free_bd = ((xl < 0.0) | (grad < 0.0)) & ((xu > 0.0) | (grad > 0.0))
+
+    # Set the initial iterate and the initial search direction.
+    step = np.zeros_like(grad)
+    sd = np.zeros_like(step)
+    sd[free_bd] = -grad[free_bd]
+
+    k = 0
+    reduct = 0.0
+    boundary_reached = False
+    while k < np.count_nonzero(free_bd):
+        # Stop the computations if sd is not a descent direction.
+        grad_sd = grad @ sd
+        if grad_sd >= -10.0 * EPS * n * max(1.0, np.linalg.norm(grad)):
+            break
+
+        # Set alpha_tr to the step size for the trust-region constraint.
+        try:
+            alpha_tr = _alpha_tr(step, sd, delta)
+        except ZeroDivisionError:
+            break
+
+        # Stop the computations if a step along sd is expected to give a
+        # relatively small reduction in the objective function.
+        if -alpha_tr * grad_sd <= 1e-8 * reduct:
+            break
+
+        # Set alpha_quad to the step size for the minimization problem.
+        hess_sd = hess_prod(sd)
+        curv_sd = sd @ hess_sd
+        if curv_sd > TINY * abs(grad_sd):
+            alpha_quad = max(-grad_sd / curv_sd, 0.0)
+        else:
+            alpha_quad = np.inf
+
+        # Stop the computations if the reduction in the objective function
+        # provided by an unconstrained step is small.
+        alpha = min(alpha_tr, alpha_quad)
+        if -alpha * (grad_sd + 0.5 * alpha * curv_sd) <= 1e-8 * reduct:
+            break
+
+        # Set alpha_bd to the step size for the bound constraints.
+        i_xl = (xl > -np.inf) & (sd < -TINY * np.abs(xl - step))
+        i_xu = (xu < np.inf) & (sd > TINY * np.abs(xu - step))
+        all_alpha_xl = np.full_like(step, np.inf)
+        all_alpha_xu = np.full_like(step, np.inf)
+        all_alpha_xl[i_xl] = np.maximum(
+            (xl[i_xl] - step[i_xl]) / sd[i_xl],
+            0.0,
+        )
+        all_alpha_xu[i_xu] = np.maximum(
+            (xu[i_xu] - step[i_xu]) / sd[i_xu],
+            0.0,
+        )
+        alpha_xl = np.min(all_alpha_xl)
+        alpha_xu = np.min(all_alpha_xu)
+        alpha_bd = min(alpha_xl, alpha_xu)
+
+        # Update the iterate.
+        alpha = min(alpha, alpha_bd)
+        if alpha > 0.0:
+            step[free_bd] = np.clip(
+                step[free_bd] + alpha * sd[free_bd],
+                xl[free_bd],
+                xu[free_bd],
+            )
+            grad += alpha * hess_sd
+            reduct -= alpha * (grad_sd + 0.5 * alpha * curv_sd)
+
+        if alpha < min(alpha_tr, alpha_bd):
+            # The current iteration is a conjugate gradient iteration. Update
+            # the search direction so that it is conjugate (with respect to H)
+            # to all the previous search directions.
+            beta = (grad[free_bd] @ hess_sd[free_bd]) / curv_sd
+            sd[free_bd] = beta * sd[free_bd] - grad[free_bd]
+            sd[~free_bd] = 0.0
+            k += 1
+        elif alpha < alpha_tr:
+            # The iterate is restricted by a bound constraint. Add this bound
+            # constraint to the active set, and restart the calculations.
+            if alpha_xl <= alpha:
+                i_new = np.argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+            else:
+                i_new = np.argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+            free_bd[i_new] = False
+            sd[free_bd] = -grad[free_bd]
+            sd[~free_bd] = 0.0
+            k = 0
+        else:
+            # The current iterate is on the trust-region boundary. Add all the
+            # active bounds to the working set to prepare for the improvement
+            # of the solution, and stop the iterations.
+            if alpha_xl <= alpha:
+                i_new = _argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+                free_bd[i_new] = False
+            if alpha_xu <= alpha:
+                i_new = _argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+                free_bd[i_new] = False
+            boundary_reached = True
+            break
+
+    # Attempt to improve the solution on the trust-region boundary.
+    if kwargs.get("improve_tcg", True) and boundary_reached:
+        step_base = np.copy(step)
+        step_comparator = grad_orig @ step_base + 0.5 * step_base @ hess_prod(
+            step_base
+        )
+
+        while np.count_nonzero(free_bd) > 0:
+            # Check whether a substantial reduction in the objective function
+            # is possible, and set the search direction.
+            step_sq = step[free_bd] @ step[free_bd]
+            grad_sq = grad[free_bd] @ grad[free_bd]
+            grad_step = grad[free_bd] @ step[free_bd]
+            grad_sd = -np.sqrt(max(step_sq * grad_sq - grad_step**2.0, 0.0))
+            sd[free_bd] = grad_step * step[free_bd] - step_sq * grad[free_bd]
+            sd[~free_bd] = 0.0
+            if grad_sd >= -1e-8 * reduct or np.any(
+                grad_sd >= -TINY * np.abs(sd[free_bd])
+            ):
+                break
+            sd[free_bd] /= -grad_sd
+
+            # Calculate an upper bound for the tangent of half the angle theta
+            # of this alternative iteration. The step will be updated as:
+            # step = cos(theta) * step + sin(theta) * sd.
+            temp_xl = np.zeros(n)
+            temp_xu = np.zeros(n)
+            temp_xl[free_bd] = (
+                step[free_bd] ** 2.0 + sd[free_bd] ** 2.0 - xl[free_bd] ** 2.0
+            )
+            temp_xu[free_bd] = (
+                step[free_bd] ** 2.0 + sd[free_bd] ** 2.0 - xu[free_bd] ** 2.0
+            )
+            temp_xl[temp_xl > 0.0] = (
+                np.sqrt(temp_xl[temp_xl > 0.0]) - sd[temp_xl > 0.0]
+            )
+            temp_xu[temp_xu > 0.0] = (
+                np.sqrt(temp_xu[temp_xu > 0.0]) + sd[temp_xu > 0.0]
+            )
+            dist_xl = np.maximum(step - xl, 0.0)
+            dist_xu = np.maximum(xu - step, 0.0)
+            i_xl = temp_xl > TINY * dist_xl
+            i_xu = temp_xu > TINY * dist_xu
+            all_t_xl = np.ones(n)
+            all_t_xu = np.ones(n)
+            all_t_xl[i_xl] = np.minimum(
+                all_t_xl[i_xl],
+                dist_xl[i_xl] / temp_xl[i_xl],
+            )
+            all_t_xu[i_xu] = np.minimum(
+                all_t_xu[i_xu],
+                dist_xu[i_xu] / temp_xu[i_xu],
+            )
+            t_xl = np.min(all_t_xl)
+            t_xu = np.min(all_t_xu)
+            t_bd = min(t_xl, t_xu)
+
+            # Calculate some curvature information.
+            hess_step = hess_prod(step)
+            hess_sd = hess_prod(sd)
+            curv_step = step @ hess_step
+            curv_sd = sd @ hess_sd
+            curv_step_sd = step @ hess_sd
+
+            # For a range of equally spaced values of tan(0.5 * theta),
+            # calculate the reduction in the objective function that would be
+            # obtained by accepting the corresponding angle.
+            n_samples = 20
+            n_samples = int((n_samples - 3) * t_bd + 3)
+            t_samples = np.linspace(t_bd / n_samples, t_bd, n_samples)
+            sin_values = 2.0 * t_samples / (1.0 + t_samples**2.0)
+            all_reduct = sin_values * (
+                grad_step * t_samples
+                - grad_sd
+                - t_samples * curv_step
+                + sin_values
+                * (t_samples * curv_step_sd - 0.5 * (curv_sd - curv_step))
+            )
+            if np.all(all_reduct <= 0.0):
+                # No reduction in the objective function is obtained.
+                break
+
+            # Accept the angle that provides the largest reduction in the
+            # objective function, and update the iterate.
+            i_max = np.argmax(all_reduct)
+            cos_value = (1.0 - t_samples[i_max] ** 2.0) / (
+                1.0 + t_samples[i_max] ** 2.0
+            )
+            step[free_bd] = (
+                cos_value * step[free_bd] + sin_values[i_max] * sd[free_bd]
+            )
+            grad += (cos_value - 1.0) * hess_step + sin_values[i_max] * hess_sd
+            reduct += all_reduct[i_max]
+
+            # If the above angle is restricted by bound constraints, add them
+            # to the working set, and restart the alternative iteration.
+            # Otherwise, the calculations are terminated.
+            if t_bd < 1.0 and i_max == n_samples - 1:
+                if t_xl <= t_bd:
+                    i_new = _argmin(all_t_xl)
+                    step[i_new] = xl[i_new]
+                    free_bd[i_new] = False
+                if t_xu <= t_bd:
+                    i_new = _argmin(all_t_xu)
+                    step[i_new] = xu[i_new]
+                    free_bd[i_new] = False
+            else:
+                break
+
+        # Ensure that the alternative iteration improves the objective
+        # function.
+        if grad_orig @ step + 0.5 * step @ hess_prod(step) > step_comparator:
+            step = step_base
+
+    if debug:
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step
+
+
+def constrained_tangential_byrd_omojokun(
+    grad,
+    hess_prod,
+    xl,
+    xu,
+    aub,
+    bub,
+    aeq,
+    delta,
+    debug,
+    **kwargs,
+):
+    r"""
+    Minimize approximately a quadratic function subject to bound and linear
+    constraints in a trust region.
+
+    This function solves approximately
+
+    .. math::
+
+        \min_{s \in \mathbb{R}^n} \quad g^{\mathsf{T}} s + \frac{1}{2}
+        s^{\mathsf{T}} H s \quad \text{s.t.} \quad
+        \left\{ \begin{array}{l}
+            l \le s \le u,\\
+            A_{\scriptscriptstyle I} s \le b_{\scriptscriptstyle I},\\
+            A_{\scriptscriptstyle E} s = 0,\\
+            \lVert s \rVert \le \Delta,
+        \end{array} \right.
+
+    using an active-set variation of the truncated conjugate gradient method.
+
+    Parameters
+    ----------
+    grad : `numpy.ndarray`, shape (n,)
+        Gradient :math:`g` as shown above.
+    hess_prod : callable
+        Product of the Hessian matrix :math:`H` with any vector.
+
+            ``hess_prod(s) -> `numpy.ndarray`, shape (n,)``
+
+        returns the product :math:`H s`.
+    xl : `numpy.ndarray`, shape (n,)
+        Lower bounds :math:`l` as shown above.
+    xu : `numpy.ndarray`, shape (n,)
+        Upper bounds :math:`u` as shown above.
+    aub : `numpy.ndarray`, shape (m_linear_ub, n)
+        Coefficient matrix :math:`A_{\scriptscriptstyle I}` as shown above.
+    bub : `numpy.ndarray`, shape (m_linear_ub,)
+        Right-hand side :math:`b_{\scriptscriptstyle I}` as shown above.
+    aeq : `numpy.ndarray`, shape (m_linear_eq, n)
+        Coefficient matrix :math:`A_{\scriptscriptstyle E}` as shown above.
+    delta : float
+        Trust-region radius :math:`\Delta` as shown above.
+    debug : bool
+        Whether to make debugging tests during the execution.
+
+    Returns
+    -------
+    `numpy.ndarray`, shape (n,)
+        Approximate solution :math:`s`.
+
+    Other Parameters
+    ----------------
+    improve_tcg : bool, optional
+        If True, a solution generated by the truncated conjugate gradient
+        method that is on the boundary of the trust region is improved by
+        moving around the trust-region boundary on the two-dimensional space
+        spanned by the solution and the gradient of the quadratic function at
+        the solution (default is True).
+
+    Notes
+    -----
+    This function implements Algorithm 6.3 of [1]_. It is assumed that the
+    origin is feasible with respect to the bound and linear constraints, and
+    that `delta` is finite and positive.
+
+    References
+    ----------
+    .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+    """
+    if debug:
+        assert isinstance(grad, np.ndarray) and grad.ndim == 1
+        assert inspect.signature(hess_prod).bind(grad)
+        assert isinstance(xl, np.ndarray) and xl.shape == grad.shape
+        assert isinstance(xu, np.ndarray) and xu.shape == grad.shape
+        assert (
+            isinstance(aub, np.ndarray)
+            and aub.ndim == 2
+            and aub.shape[1] == grad.size
+        )
+        assert (
+            isinstance(bub, np.ndarray)
+            and bub.ndim == 1
+            and bub.size == aub.shape[0]
+        )
+        assert (
+            isinstance(aeq, np.ndarray)
+            and aeq.ndim == 2
+            and aeq.shape[1] == grad.size
+        )
+        assert isinstance(delta, float)
+        assert isinstance(debug, bool)
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= tol)
+        assert np.all(xu >= -tol)
+        assert np.all(bub >= -tol)
+        assert np.isfinite(delta) and delta > 0.0
+    xl = np.minimum(xl, 0.0)
+    xu = np.maximum(xu, 0.0)
+    bub = np.maximum(bub, 0.0)
+
+    # Copy the arrays that may be modified by the code below.
+    n = grad.size
+    grad = np.copy(grad)
+    grad_orig = np.copy(grad)
+
+    # Calculate the initial active set.
+    free_xl = (xl < 0.0) | (grad < 0.0)
+    free_xu = (xu > 0.0) | (grad > 0.0)
+    free_ub = (bub > 0.0) | (aub @ grad > 0.0)
+    n_act, q = qr_tangential_byrd_omojokun(aub, aeq, free_xl, free_xu, free_ub)
+
+    # Set the initial iterate and the initial search direction.
+    step = np.zeros_like(grad)
+    sd = -q[:, n_act:] @ (q[:, n_act:].T @ grad)
+    resid = np.copy(bub)
+
+    k = 0
+    reduct = 0.0
+    boundary_reached = False
+    while k < n - n_act:
+        # Stop the computations if sd is not a descent direction.
+        grad_sd = grad @ sd
+        if grad_sd >= -10.0 * EPS * n * max(1.0, np.linalg.norm(grad)):
+            break
+
+        # Set alpha_tr to the step size for the trust-region constraint.
+        try:
+            alpha_tr = _alpha_tr(step, sd, delta)
+        except ZeroDivisionError:
+            break
+
+        # Stop the computations if a step along sd is expected to give a
+        # relatively small reduction in the objective function.
+        if -alpha_tr * grad_sd <= 1e-8 * reduct:
+            break
+
+        # Set alpha_quad to the step size for the minimization problem.
+        hess_sd = hess_prod(sd)
+        curv_sd = sd @ hess_sd
+        if curv_sd > TINY * abs(grad_sd):
+            alpha_quad = max(-grad_sd / curv_sd, 0.0)
+        else:
+            alpha_quad = np.inf
+
+        # Stop the computations if the reduction in the objective function
+        # provided by an unconstrained step is small.
+        alpha = min(alpha_tr, alpha_quad)
+        if -alpha * (grad_sd + 0.5 * alpha * curv_sd) <= 1e-8 * reduct:
+            break
+
+        # Set alpha_bd to the step size for the bound constraints.
+        i_xl = free_xl & (xl > -np.inf) & (sd < -TINY * np.abs(xl - step))
+        i_xu = free_xu & (xu < np.inf) & (sd > TINY * np.abs(xu - step))
+        all_alpha_xl = np.full_like(step, np.inf)
+        all_alpha_xu = np.full_like(step, np.inf)
+        all_alpha_xl[i_xl] = np.maximum(
+            (xl[i_xl] - step[i_xl]) / sd[i_xl],
+            0.0,
+        )
+        all_alpha_xu[i_xu] = np.maximum(
+            (xu[i_xu] - step[i_xu]) / sd[i_xu],
+            0.0,
+        )
+        alpha_xl = np.min(all_alpha_xl)
+        alpha_xu = np.min(all_alpha_xu)
+        alpha_bd = min(alpha_xl, alpha_xu)
+
+        # Set alpha_ub to the step size for the linear constraints.
+        aub_sd = aub @ sd
+        i_ub = free_ub & (aub_sd > TINY * np.abs(resid))
+        all_alpha_ub = np.full_like(bub, np.inf)
+        all_alpha_ub[i_ub] = resid[i_ub] / aub_sd[i_ub]
+        alpha_ub = np.min(all_alpha_ub, initial=np.inf)
+
+        # Update the iterate.
+        alpha = min(alpha, alpha_bd, alpha_ub)
+        if alpha > 0.0:
+            step = np.clip(step + alpha * sd, xl, xu)
+            grad += alpha * hess_sd
+            resid = np.maximum(0.0, resid - alpha * aub_sd)
+            reduct -= alpha * (grad_sd + 0.5 * alpha * curv_sd)
+
+        if alpha < min(alpha_tr, alpha_bd, alpha_ub):
+            # The current iteration is a conjugate gradient iteration. Update
+            # the search direction so that it is conjugate (with respect to H)
+            # to all the previous search directions.
+            grad_proj = q[:, n_act:] @ (q[:, n_act:].T @ grad)
+            beta = (grad_proj @ hess_sd) / curv_sd
+            sd = beta * sd - grad_proj
+            k += 1
+        elif alpha < alpha_tr:
+            # The iterate is restricted by a bound/linear constraint. Add this
+            # constraint to the active set, and restart the calculations.
+            if alpha_xl <= alpha:
+                i_new = np.argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+                free_xl[i_new] = False
+            elif alpha_xu <= alpha:
+                i_new = np.argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+                free_xu[i_new] = False
+            else:
+                i_new = np.argmin(all_alpha_ub)
+                free_ub[i_new] = False
+            n_act, q = qr_tangential_byrd_omojokun(
+                aub,
+                aeq,
+                free_xl,
+                free_xu,
+                free_ub,
+            )
+            sd = -q[:, n_act:] @ (q[:, n_act:].T @ grad)
+            k = 0
+        else:
+            # The current iterate is on the trust-region boundary. Add all the
+            # active bound/linear constraints to the working set to prepare for
+            # the improvement of the solution, and stop the iterations.
+            if alpha_xl <= alpha:
+                i_new = _argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+                free_xl[i_new] = False
+            if alpha_xu <= alpha:
+                i_new = _argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+                free_xu[i_new] = False
+            if alpha_ub <= alpha:
+                i_new = _argmin(all_alpha_ub)
+                free_ub[i_new] = False
+            n_act, q = qr_tangential_byrd_omojokun(
+                aub,
+                aeq,
+                free_xl,
+                free_xu,
+                free_ub,
+            )
+            boundary_reached = True
+            break
+
+    # Attempt to improve the solution on the trust-region boundary.
+    if kwargs.get("improve_tcg", True) and boundary_reached and n_act < n:
+        step_base = np.copy(step)
+        while n_act < n:
+            # Check whether a substantial reduction in the objective function
+            # is possible, and set the search direction.
+            step_proj = q[:, n_act:] @ (q[:, n_act:].T @ step)
+            grad_proj = q[:, n_act:] @ (q[:, n_act:].T @ grad)
+            step_sq = step_proj @ step_proj
+            grad_sq = grad_proj @ grad_proj
+            grad_step = grad_proj @ step_proj
+            grad_sd = -np.sqrt(max(step_sq * grad_sq - grad_step**2.0, 0.0))
+            sd = q[:, n_act:] @ (
+                q[:, n_act:].T @ (grad_step * step - step_sq * grad)
+            )
+            if grad_sd >= -1e-8 * reduct or np.any(
+                grad_sd >= -TINY * np.abs(sd)
+            ):
+                break
+            sd /= -grad_sd
+
+            # Calculate an upper bound for the tangent of half the angle theta
+            # of this alternative iteration for the bound constraints. The step
+            # will be updated as:
+            # step += (cos(theta) - 1) * step_proj + sin(theta) * sd.
+            temp_xl = np.zeros(n)
+            temp_xu = np.zeros(n)
+            dist_xl = np.maximum(step - xl, 0.0)
+            dist_xu = np.maximum(xu - step, 0.0)
+            temp_xl[free_xl] = sd[free_xl] ** 2.0 - dist_xl[free_xl] * (
+                dist_xl[free_xl] - 2.0 * step_proj[free_xl]
+            )
+            temp_xu[free_xu] = sd[free_xu] ** 2.0 - dist_xu[free_xu] * (
+                dist_xu[free_xu] + 2.0 * step_proj[free_xu]
+            )
+            temp_xl[temp_xl > 0.0] = (
+                np.sqrt(temp_xl[temp_xl > 0.0]) - sd[temp_xl > 0.0]
+            )
+            temp_xu[temp_xu > 0.0] = (
+                np.sqrt(temp_xu[temp_xu > 0.0]) + sd[temp_xu > 0.0]
+            )
+            i_xl = temp_xl > TINY * dist_xl
+            i_xu = temp_xu > TINY * dist_xu
+            all_t_xl = np.ones(n)
+            all_t_xu = np.ones(n)
+            all_t_xl[i_xl] = np.minimum(
+                all_t_xl[i_xl],
+                dist_xl[i_xl] / temp_xl[i_xl],
+            )
+            all_t_xu[i_xu] = np.minimum(
+                all_t_xu[i_xu],
+                dist_xu[i_xu] / temp_xu[i_xu],
+            )
+            t_xl = np.min(all_t_xl)
+            t_xu = np.min(all_t_xu)
+            t_bd = min(t_xl, t_xu)
+
+            # Calculate an upper bound for the tangent of half the angle theta
+            # of this alternative iteration for the linear constraints.
+            temp_ub = np.zeros_like(resid)
+            aub_step = aub @ step_proj
+            aub_sd = aub @ sd
+            temp_ub[free_ub] = aub_sd[free_ub] ** 2.0 - resid[free_ub] * (
+                resid[free_ub] + 2.0 * aub_step[free_ub]
+            )
+            temp_ub[temp_ub > 0.0] = (
+                np.sqrt(temp_ub[temp_ub > 0.0]) + aub_sd[temp_ub > 0.0]
+            )
+            i_ub = temp_ub > TINY * resid
+            all_t_ub = np.ones_like(resid)
+            all_t_ub[i_ub] = np.minimum(
+                all_t_ub[i_ub],
+                resid[i_ub] / temp_ub[i_ub],
+            )
+            t_ub = np.min(all_t_ub, initial=1.0)
+            t_min = min(t_bd, t_ub)
+
+            # Calculate some curvature information.
+            hess_step = hess_prod(step_proj)
+            hess_sd = hess_prod(sd)
+            curv_step = step_proj @ hess_step
+            curv_sd = sd @ hess_sd
+            curv_step_sd = step_proj @ hess_sd
+
+            # For a range of equally spaced values of tan(0.5 * theta),
+            # calculate the reduction in the objective function that would be
+            # obtained by accepting the corresponding angle.
+            n_samples = 20
+            n_samples = int((n_samples - 3) * t_min + 3)
+            t_samples = np.linspace(t_min / n_samples, t_min, n_samples)
+            sin_values = 2.0 * t_samples / (1.0 + t_samples**2.0)
+            all_reduct = sin_values * (
+                grad_step * t_samples
+                - grad_sd
+                - sin_values
+                * (
+                    0.5 * t_samples**2.0 * curv_step
+                    - 2.0 * t_samples * curv_step_sd
+                    + 0.5 * curv_sd
+                )
+            )
+            if np.all(all_reduct <= 0.0):
+                # No reduction in the objective function is obtained.
+                break
+
+            # Accept the angle that provides the largest reduction in the
+            # objective function, and update the iterate.
+            i_max = np.argmax(all_reduct)
+            cos_value = (1.0 - t_samples[i_max] ** 2.0) / (
+                1.0 + t_samples[i_max] ** 2.0
+            )
+            step = np.clip(
+                step + (cos_value - 1.0) * step_proj + sin_values[i_max] * sd,
+                xl,
+                xu,
+            )
+            grad += (cos_value - 1.0) * hess_step + sin_values[i_max] * hess_sd
+            resid = np.maximum(
+                0.0,
+                resid
+                - (cos_value - 1.0) * aub_step
+                - sin_values[i_max] * aub_sd,
+            )
+            reduct += all_reduct[i_max]
+
+            # If the above angle is restricted by bound constraints, add them
+            # to the working set, and restart the alternative iteration.
+            # Otherwise, the calculations are terminated.
+            if t_min < 1.0 and i_max == n_samples - 1:
+                if t_xl <= t_min:
+                    i_new = _argmin(all_t_xl)
+                    step[i_new] = xl[i_new]
+                    free_xl[i_new] = False
+                if t_xu <= t_min:
+                    i_new = _argmin(all_t_xu)
+                    step[i_new] = xu[i_new]
+                    free_xl[i_new] = False
+                if t_ub <= t_min:
+                    i_new = _argmin(all_t_ub)
+                    free_ub[i_new] = False
+                n_act, q = qr_tangential_byrd_omojokun(
+                    aub,
+                    aeq,
+                    free_xl,
+                    free_xu,
+                    free_ub,
+                )
+            else:
+                break
+
+        # Ensure that the alternative iteration improves the objective
+        # function.
+        if grad_orig @ step + 0.5 * step @ hess_prod(
+            step
+        ) > grad_orig @ step_base + 0.5 * step_base @ hess_prod(step_base):
+            step = step_base
+
+    if debug:
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.all(aub @ step <= bub + tol)
+        assert np.all(np.abs(aeq @ step) <= tol)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step
+
+
+def normal_byrd_omojokun(aub, bub, aeq, beq, xl, xu, delta, debug, **kwargs):
+    r"""
+    Minimize approximately a linear constraint violation subject to bound
+    constraints in a trust region.
+
+    This function solves approximately
+
+    .. math::
+
+        \min_{s \in \mathbb{R}^n} \quad \frac{1}{2} \big( \lVert \max \{
+        A_{\scriptscriptstyle I} s - b_{\scriptscriptstyle I}, 0 \} \rVert^2 +
+        \lVert A_{\scriptscriptstyle E} s - b_{\scriptscriptstyle E} \rVert^2
+        \big) \quad \text{s.t.}
+        \quad
+        \left\{ \begin{array}{l}
+            l \le s \le u,\\
+            \lVert s \rVert \le \Delta,
+        \end{array} \right.
+
+    using a variation of the truncated conjugate gradient method.
+
+    Parameters
+    ----------
+    aub : `numpy.ndarray`, shape (m_linear_ub, n)
+        Matrix :math:`A_{\scriptscriptstyle I}` as shown above.
+    bub : `numpy.ndarray`, shape (m_linear_ub,)
+        Vector :math:`b_{\scriptscriptstyle I}` as shown above.
+    aeq : `numpy.ndarray`, shape (m_linear_eq, n)
+        Matrix :math:`A_{\scriptscriptstyle E}` as shown above.
+    beq : `numpy.ndarray`, shape (m_linear_eq,)
+        Vector :math:`b_{\scriptscriptstyle E}` as shown above.
+    xl : `numpy.ndarray`, shape (n,)
+        Lower bounds :math:`l` as shown above.
+    xu : `numpy.ndarray`, shape (n,)
+        Upper bounds :math:`u` as shown above.
+    delta : float
+        Trust-region radius :math:`\Delta` as shown above.
+    debug : bool
+        Whether to make debugging tests during the execution.
+
+    Returns
+    -------
+    `numpy.ndarray`, shape (n,)
+        Approximate solution :math:`s`.
+
+    Other Parameters
+    ----------------
+    improve_tcg : bool, optional
+        If True, a solution generated by the truncated conjugate gradient
+        method that is on the boundary of the trust region is improved by
+        moving around the trust-region boundary on the two-dimensional space
+        spanned by the solution and the gradient of the quadratic function at
+        the solution (default is True).
+
+    Notes
+    -----
+    This function implements Algorithm 6.4 of [1]_. It is assumed that the
+    origin is feasible with respect to the bound constraints and that `delta`
+    is finite and positive.
+
+    References
+    ----------
+    .. [1] T. M. Ragonneau. *Model-Based Derivative-Free Optimization Methods
+       and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+       Kong Polytechnic University, Hong Kong, China, 2022. URL:
+       https://theses.lib.polyu.edu.hk/handle/200/12294.
+    """
+    if debug:
+        assert isinstance(aub, np.ndarray) and aub.ndim == 2
+        assert (
+            isinstance(bub, np.ndarray)
+            and bub.ndim == 1
+            and bub.size == aub.shape[0]
+        )
+        assert (
+            isinstance(aeq, np.ndarray)
+            and aeq.ndim == 2
+            and aeq.shape[1] == aub.shape[1]
+        )
+        assert (
+            isinstance(beq, np.ndarray)
+            and beq.ndim == 1
+            and beq.size == aeq.shape[0]
+        )
+        assert isinstance(xl, np.ndarray) and xl.shape == (aub.shape[1],)
+        assert isinstance(xu, np.ndarray) and xu.shape == (aub.shape[1],)
+        assert isinstance(delta, float)
+        assert isinstance(debug, bool)
+        tol = get_arrays_tol(xl, xu)
+        assert np.all(xl <= tol)
+        assert np.all(xu >= -tol)
+        assert np.isfinite(delta) and delta > 0.0
+    xl = np.minimum(xl, 0.0)
+    xu = np.maximum(xu, 0.0)
+
+    # Calculate the initial active set.
+    m_linear_ub, n = aub.shape
+    grad = np.r_[aeq.T @ -beq, np.maximum(0.0, -bub)]
+    free_xl = (xl < 0.0) | (grad[:n] < 0.0)
+    free_xu = (xu > 0.0) | (grad[:n] > 0.0)
+    free_slack = bub < 0.0
+    free_ub = (bub > 0.0) | (aub @ grad[:n] - grad[n:] > 0.0)
+    n_act, q = qr_normal_byrd_omojokun(
+        aub,
+        free_xl,
+        free_xu,
+        free_slack,
+        free_ub,
+    )
+
+    # Calculate an upper bound on the norm of the slack variables. It is not
+    # used in the original algorithm, but it may prevent undesired behaviors
+    # engendered by computer rounding errors.
+    delta_slack = np.sqrt(beq @ beq + grad[n:] @ grad[n:])
+
+    # Set the initial iterate and the initial search direction.
+    step = np.zeros(n)
+    sd = -q[:, n_act:] @ (q[:, n_act:].T @ grad)
+    resid = bub + grad[n:]
+
+    k = 0
+    reduct = 0.0
+    boundary_reached = False
+    while k < n + m_linear_ub - n_act:
+        # Stop the computations if sd is not a descent direction.
+        grad_sd = grad @ sd
+        if grad_sd >= -10.0 * EPS * n * max(1.0, np.linalg.norm(grad)):
+            break
+
+        # Set alpha_tr to the step size for the trust-region constraint.
+        try:
+            alpha_tr = _alpha_tr(step, sd[:n], delta)
+        except ZeroDivisionError:
+            alpha_tr = np.inf
+
+        # Prevent undesired behaviors engendered by computer rounding errors by
+        # considering the trust-region constraint on the slack variables.
+        try:
+            alpha_tr = min(alpha_tr, _alpha_tr(grad[n:], sd[n:], delta_slack))
+        except ZeroDivisionError:
+            pass
+
+        # Stop the computations if a step along sd is expected to give a
+        # relatively small reduction in the objective function.
+        if -alpha_tr * grad_sd <= 1e-8 * reduct:
+            break
+
+        # Set alpha_quad to the step size for the minimization problem.
+        hess_sd = np.r_[aeq.T @ (aeq @ sd[:n]), sd[n:]]
+        curv_sd = sd @ hess_sd
+        if curv_sd > TINY * abs(grad_sd):
+            alpha_quad = max(-grad_sd / curv_sd, 0.0)
+        else:
+            alpha_quad = np.inf
+
+        # Stop the computations if the reduction in the objective function
+        # provided by an unconstrained step is small.
+        alpha = min(alpha_tr, alpha_quad)
+        if -alpha * (grad_sd + 0.5 * alpha * curv_sd) <= 1e-8 * reduct:
+            break
+
+        # Set alpha_bd to the step size for the bound constraints.
+        i_xl = free_xl & (xl > -np.inf) & (sd[:n] < -TINY * np.abs(xl - step))
+        i_xu = free_xu & (xu < np.inf) & (sd[:n] > TINY * np.abs(xu - step))
+        i_slack = free_slack & (sd[n:] < -TINY * np.abs(grad[n:]))
+        all_alpha_xl = np.full_like(step, np.inf)
+        all_alpha_xu = np.full_like(step, np.inf)
+        all_alpha_slack = np.full_like(bub, np.inf)
+        all_alpha_xl[i_xl] = np.maximum(
+            (xl[i_xl] - step[i_xl]) / sd[:n][i_xl],
+            0.0,
+        )
+        all_alpha_xu[i_xu] = np.maximum(
+            (xu[i_xu] - step[i_xu]) / sd[:n][i_xu],
+            0.0,
+        )
+        all_alpha_slack[i_slack] = np.maximum(
+            -grad[n:][i_slack] / sd[n:][i_slack],
+            0.0,
+        )
+        alpha_xl = np.min(all_alpha_xl)
+        alpha_xu = np.min(all_alpha_xu)
+        alpha_slack = np.min(all_alpha_slack, initial=np.inf)
+        alpha_bd = min(alpha_xl, alpha_xu, alpha_slack)
+
+        # Set alpha_ub to the step size for the linear constraints.
+        aub_sd = aub @ sd[:n] - sd[n:]
+        i_ub = free_ub & (aub_sd > TINY * np.abs(resid))
+        all_alpha_ub = np.full_like(bub, np.inf)
+        all_alpha_ub[i_ub] = resid[i_ub] / aub_sd[i_ub]
+        alpha_ub = np.min(all_alpha_ub, initial=np.inf)
+
+        # Update the iterate.
+        alpha = min(alpha, alpha_bd, alpha_ub)
+        if alpha > 0.0:
+            step = np.clip(step + alpha * sd[:n], xl, xu)
+            grad += alpha * hess_sd
+            resid = np.maximum(0.0, resid - alpha * aub_sd)
+            reduct -= alpha * (grad_sd + 0.5 * alpha * curv_sd)
+
+        if alpha < min(alpha_tr, alpha_bd, alpha_ub):
+            # The current iteration is a conjugate gradient iteration. Update
+            # the search direction so that it is conjugate (with respect to H)
+            # to all the previous search directions.
+            grad_proj = q[:, n_act:] @ (q[:, n_act:].T @ grad)
+            beta = (grad_proj @ hess_sd) / curv_sd
+            sd = beta * sd - grad_proj
+            k += 1
+        elif alpha < alpha_tr:
+            # The iterate is restricted by a bound/linear constraint. Add this
+            # constraint to the active set, and restart the calculations.
+            if alpha_xl <= alpha:
+                i_new = np.argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+                free_xl[i_new] = False
+            elif alpha_xu <= alpha:
+                i_new = np.argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+                free_xu[i_new] = False
+            elif alpha_slack <= alpha:
+                i_new = np.argmin(all_alpha_slack)
+                free_slack[i_new] = False
+            else:
+                i_new = np.argmin(all_alpha_ub)
+                free_ub[i_new] = False
+            n_act, q = qr_normal_byrd_omojokun(
+                aub, free_xl, free_xu, free_slack, free_ub
+            )
+            sd = -q[:, n_act:] @ (q[:, n_act:].T @ grad)
+            k = 0
+        else:
+            # The current iterate is on the trust-region boundary. Add all the
+            # active bound constraints to the working set to prepare for the
+            # improvement of the solution, and stop the iterations.
+            if alpha_xl <= alpha:
+                i_new = _argmin(all_alpha_xl)
+                step[i_new] = xl[i_new]
+                free_xl[i_new] = False
+            if alpha_xu <= alpha:
+                i_new = _argmin(all_alpha_xu)
+                step[i_new] = xu[i_new]
+                free_xu[i_new] = False
+            boundary_reached = True
+            break
+
+    # Attempt to improve the solution on the trust-region boundary.
+    if kwargs.get("improve_tcg", True) and boundary_reached:
+        step_base = np.copy(step)
+        free_bd = free_xl & free_xu
+        grad = aub.T @ np.maximum(aub @ step - bub, 0.0) + aeq.T @ (
+            aeq @ step - beq
+        )
+        sd = np.zeros(n)
+        while np.count_nonzero(free_bd) > 0:
+            # Check whether a substantial reduction in the objective function
+            # is possible, and set the search direction.
+            step_sq = step[free_bd] @ step[free_bd]
+            grad_sq = grad[free_bd] @ grad[free_bd]
+            grad_step = grad[free_bd] @ step[free_bd]
+            grad_sd = -np.sqrt(max(step_sq * grad_sq - grad_step**2.0, 0.0))
+            sd[free_bd] = grad_step * step[free_bd] - step_sq * grad[free_bd]
+            sd[~free_bd] = 0.0
+            if grad_sd >= -1e-8 * reduct or np.any(
+                grad_sd >= -TINY * np.abs(sd[free_bd])
+            ):
+                break
+            sd[free_bd] /= -grad_sd
+
+            # Calculate an upper bound for the tangent of half the angle theta
+            # of this alternative iteration. The step will be updated as:
+            # step = cos(theta) * step + sin(theta) * sd.
+            temp_xl = np.zeros(n)
+            temp_xu = np.zeros(n)
+            temp_xl[free_bd] = (
+                step[free_bd] ** 2.0 + sd[free_bd] ** 2.0 - xl[free_bd] ** 2.0
+            )
+            temp_xu[free_bd] = (
+                step[free_bd] ** 2.0 + sd[free_bd] ** 2.0 - xu[free_bd] ** 2.0
+            )
+            temp_xl[temp_xl > 0.0] = (
+                np.sqrt(temp_xl[temp_xl > 0.0]) - sd[temp_xl > 0.0]
+            )
+            temp_xu[temp_xu > 0.0] = (
+                np.sqrt(temp_xu[temp_xu > 0.0]) + sd[temp_xu > 0.0]
+            )
+            dist_xl = np.maximum(step - xl, 0.0)
+            dist_xu = np.maximum(xu - step, 0.0)
+            i_xl = temp_xl > TINY * dist_xl
+            i_xu = temp_xu > TINY * dist_xu
+            all_t_xl = np.ones(n)
+            all_t_xu = np.ones(n)
+            all_t_xl[i_xl] = np.minimum(
+                all_t_xl[i_xl],
+                dist_xl[i_xl] / temp_xl[i_xl],
+            )
+            all_t_xu[i_xu] = np.minimum(
+                all_t_xu[i_xu],
+                dist_xu[i_xu] / temp_xu[i_xu],
+            )
+            t_xl = np.min(all_t_xl)
+            t_xu = np.min(all_t_xu)
+            t_bd = min(t_xl, t_xu)
+
+            # For a range of equally spaced values of tan(0.5 * theta),
+            # calculate the reduction in the objective function that would be
+            # obtained by accepting the corresponding angle.
+            n_samples = 20
+            n_samples = int((n_samples - 3) * t_bd + 3)
+            t_samples = np.linspace(t_bd / n_samples, t_bd, n_samples)
+            resid_ub = np.maximum(aub @ step - bub, 0.0)
+            resid_eq = aeq @ step - beq
+            step_proj = np.copy(step)
+            step_proj[~free_bd] = 0.0
+            all_reduct = np.empty(n_samples)
+            for i in range(n_samples):
+                sin_value = 2.0 * t_samples[i] / (1.0 + t_samples[i] ** 2.0)
+                step_alt = np.clip(
+                    step + sin_value * (sd - t_samples[i] * step_proj),
+                    xl,
+                    xu,
+                )
+                resid_ub_alt = np.maximum(aub @ step_alt - bub, 0.0)
+                resid_eq_alt = aeq @ step_alt - beq
+                all_reduct[i] = 0.5 * (
+                    resid_ub @ resid_ub
+                    + resid_eq @ resid_eq
+                    - resid_ub_alt @ resid_ub_alt
+                    - resid_eq_alt @ resid_eq_alt
+                )
+            if np.all(all_reduct <= 0.0):
+                # No reduction in the objective function is obtained.
+                break
+
+            # Accept the angle that provides the largest reduction in the
+            # objective function, and update the iterate.
+            i_max = np.argmax(all_reduct)
+            cos_value = (1.0 - t_samples[i_max] ** 2.0) / (
+                1.0 + t_samples[i_max] ** 2.0
+            )
+            sin_value = (2.0 * t_samples[i_max]
+                         / (1.0 + t_samples[i_max] ** 2.0))
+            step[free_bd] = cos_value * step[free_bd] + sin_value * sd[free_bd]
+            grad = aub.T @ np.maximum(aub @ step - bub, 0.0) + aeq.T @ (
+                aeq @ step - beq
+            )
+            reduct += all_reduct[i_max]
+
+            # If the above angle is restricted by bound constraints, add them
+            # to the working set, and restart the alternative iteration.
+            # Otherwise, the calculations are terminated.
+            if t_bd < 1.0 and i_max == n_samples - 1:
+                if t_xl <= t_bd:
+                    i_new = _argmin(all_t_xl)
+                    step[i_new] = xl[i_new]
+                    free_bd[i_new] = False
+                if t_xu <= t_bd:
+                    i_new = _argmin(all_t_xu)
+                    step[i_new] = xu[i_new]
+                    free_bd[i_new] = False
+            else:
+                break
+
+        # Ensure that the alternative iteration improves the objective
+        # function.
+        resid_ub = np.maximum(aub @ step - bub, 0.0)
+        resid_ub_base = np.maximum(aub @ step_base - bub, 0.0)
+        resid_eq = aeq @ step - beq
+        resid_eq_base = aeq @ step_base - beq
+        if (
+            resid_ub @ resid_ub + resid_eq @ resid_eq
+            > resid_ub_base @ resid_ub_base + resid_eq_base @ resid_eq_base
+        ):
+            step = step_base
+
+    if debug:
+        assert np.all(xl <= step)
+        assert np.all(step <= xu)
+        assert np.linalg.norm(step) < 1.1 * delta
+    return step
+
+
+def qr_tangential_byrd_omojokun(aub, aeq, free_xl, free_xu, free_ub):
+    n = free_xl.size
+    identity = np.eye(n)
+    q, r, _ = qr(
+        np.block(
+            [
+                [aeq],
+                [aub[~free_ub, :]],
+                [-identity[~free_xl, :]],
+                [identity[~free_xu, :]],
+            ]
+        ).T,
+        pivoting=True,
+    )
+    n_act = np.count_nonzero(
+        np.abs(np.diag(r))
+        >= 10.0
+        * EPS
+        * n
+        * np.linalg.norm(r[: np.min(r.shape), : np.min(r.shape)], axis=0)
+    )
+    return n_act, q
+
+
+def qr_normal_byrd_omojokun(aub, free_xl, free_xu, free_slack, free_ub):
+    m_linear_ub, n = aub.shape
+    identity_n = np.eye(n)
+    identity_m = np.eye(m_linear_ub)
+    q, r, _ = qr(
+        np.block(
+            [
+                [
+                    aub[~free_ub, :],
+                    -identity_m[~free_ub, :],
+                ],
+                [
+                    np.zeros((m_linear_ub - np.count_nonzero(free_slack), n)),
+                    -identity_m[~free_slack, :],
+                ],
+                [
+                    -identity_n[~free_xl, :],
+                    np.zeros((n - np.count_nonzero(free_xl), m_linear_ub)),
+                ],
+                [
+                    identity_n[~free_xu, :],
+                    np.zeros((n - np.count_nonzero(free_xu), m_linear_ub)),
+                ],
+            ]
+        ).T,
+        pivoting=True,
+    )
+    n_act = np.count_nonzero(
+        np.abs(np.diag(r))
+        >= 10.0
+        * EPS
+        * (n + m_linear_ub)
+        * np.linalg.norm(r[: np.min(r.shape), : np.min(r.shape)], axis=0)
+    )
+    return n_act, q
+
+
+def _alpha_tr(step, sd, delta):
+    step_sd = step @ sd
+    sd_sq = sd @ sd
+    dist_tr_sq = delta**2.0 - step @ step
+    temp = np.sqrt(max(step_sd**2.0 + sd_sq * dist_tr_sq, 0.0))
+    if step_sd <= 0.0 and sd_sq > TINY * abs(temp - step_sd):
+        alpha_tr = max((temp - step_sd) / sd_sq, 0.0)
+    elif abs(temp + step_sd) > TINY * dist_tr_sq:
+        alpha_tr = max(dist_tr_sq / (temp + step_sd), 0.0)
+    else:
+        raise ZeroDivisionError
+    return alpha_tr
+
+
+def _argmax(x):
+    return np.flatnonzero(x >= np.max(x))
+
+
+def _argmin(x):
+    return np.flatnonzero(x <= np.min(x))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..fe6b4841ddff3a04bda5cbff744e30681b6963b9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/__init__.py
@@ -0,0 +1,18 @@
+from .exceptions import (
+    MaxEvalError,
+    TargetSuccess,
+    CallbackSuccess,
+    FeasibleSuccess,
+)
+from .math import get_arrays_tol, exact_1d_array
+from .versions import show_versions
+
+__all__ = [
+    "MaxEvalError",
+    "TargetSuccess",
+    "CallbackSuccess",
+    "FeasibleSuccess",
+    "get_arrays_tol",
+    "exact_1d_array",
+    "show_versions",
+]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/exceptions.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/exceptions.py
new file mode 100644
index 0000000000000000000000000000000000000000..c85094894f378a8e3934ad109ea6166e33e4366b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/exceptions.py
@@ -0,0 +1,22 @@
+class MaxEvalError(Exception):
+    """
+    Exception raised when the maximum number of evaluations is reached.
+    """
+
+
+class TargetSuccess(Exception):
+    """
+    Exception raised when the target value is reached.
+    """
+
+
+class CallbackSuccess(StopIteration):
+    """
+    Exception raised when the callback function raises a ``StopIteration``.
+    """
+
+
+class FeasibleSuccess(Exception):
+    """
+    Exception raised when a feasible point of a feasible problem is found.
+    """
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/math.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/math.py
new file mode 100644
index 0000000000000000000000000000000000000000..1b16ae98a0df38752815f5a69d56da20f856f9f9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/math.py
@@ -0,0 +1,77 @@
+import numpy as np
+
+
+EPS = np.finfo(float).eps
+
+
+def get_arrays_tol(*arrays):
+    """
+    Get a relative tolerance for a set of arrays.
+
+    Parameters
+    ----------
+    *arrays: tuple
+        Set of `numpy.ndarray` to get the tolerance for.
+
+    Returns
+    -------
+    float
+        Relative tolerance for the set of arrays.
+
+    Raises
+    ------
+    ValueError
+        If no array is provided.
+    """
+    if len(arrays) == 0:
+        raise ValueError("At least one array must be provided.")
+    size = max(array.size for array in arrays)
+    weight = max(
+        np.max(np.abs(array[np.isfinite(array)]), initial=1.0)
+        for array in arrays
+    )
+    return 10.0 * EPS * max(size, 1.0) * weight
+
+
+def exact_1d_array(x, message):
+    """
+    Preprocess a 1-dimensional array.
+
+    Parameters
+    ----------
+    x : array_like
+        Array to be preprocessed.
+    message : str
+        Error message if `x` cannot be interpreter as a 1-dimensional array.
+
+    Returns
+    -------
+    `numpy.ndarray`
+        Preprocessed array.
+    """
+    x = np.atleast_1d(np.squeeze(x)).astype(float)
+    if x.ndim != 1:
+        raise ValueError(message)
+    return x
+
+
+def exact_2d_array(x, message):
+    """
+    Preprocess a 2-dimensional array.
+
+    Parameters
+    ----------
+    x : array_like
+        Array to be preprocessed.
+    message : str
+        Error message if `x` cannot be interpreter as a 2-dimensional array.
+
+    Returns
+    -------
+    `numpy.ndarray`
+        Preprocessed array.
+    """
+    x = np.atleast_2d(x).astype(float)
+    if x.ndim != 2:
+        raise ValueError(message)
+    return x
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/versions.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/versions.py
new file mode 100644
index 0000000000000000000000000000000000000000..94a0f8f5cef626354f40901cbe06a84287291c1c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/cobyqa/utils/versions.py
@@ -0,0 +1,67 @@
+import os
+import platform
+import sys
+from importlib.metadata import PackageNotFoundError, version
+
+
+def _get_sys_info():
+    """
+    Get useful system information.
+
+    Returns
+    -------
+    dict
+        Useful system information.
+    """
+    return {
+        "python": sys.version.replace(os.linesep, " "),
+        "executable": sys.executable,
+        "machine": platform.platform(),
+    }
+
+
+def _get_deps_info():
+    """
+    Get the versions of the dependencies.
+
+    Returns
+    -------
+    dict
+        Versions of the dependencies.
+    """
+    deps = ["cobyqa", "numpy", "scipy", "setuptools", "pip"]
+    deps_info = {}
+    for module in deps:
+        try:
+            deps_info[module] = version(module)
+        except PackageNotFoundError:
+            deps_info[module] = None
+    return deps_info
+
+
+def show_versions():
+    """
+    Display useful system and dependencies information.
+
+    When reporting issues, please include this information.
+    """
+    print("System settings")
+    print("---------------")
+    sys_info = _get_sys_info()
+    print(
+        "\n".join(
+            f"{k:>{max(map(len, sys_info.keys())) + 1}}: {v}"
+            for k, v in sys_info.items()
+        )
+    )
+
+    print()
+    print("Python dependencies")
+    print("-------------------")
+    deps_info = _get_deps_info()
+    print(
+        "\n".join(
+            f"{k:>{max(map(len, deps_info.keys())) + 1}}: {v}"
+            for k, v in deps_info.items()
+        )
+    )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/decorator.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/decorator.py
new file mode 100644
index 0000000000000000000000000000000000000000..8c4ab90e3d52db448b6381bc7860f55ac8789c9c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/decorator.py
@@ -0,0 +1,399 @@
+# #########################     LICENSE     ############################ #
+
+# Copyright (c) 2005-2015, Michele Simionato
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+
+#   Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#   Redistributions in bytecode form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in
+#   the documentation and/or other materials provided with the
+#   distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+
+"""
+Decorator module, see https://pypi.python.org/pypi/decorator
+for the documentation.
+"""
+import re
+import sys
+import inspect
+import operator
+import itertools
+import collections
+
+from inspect import getfullargspec
+
+__version__ = '4.0.5'
+
+
+def get_init(cls):
+    return cls.__init__
+
+
+# getargspec has been deprecated in Python 3.5
+ArgSpec = collections.namedtuple(
+    'ArgSpec', 'args varargs varkw defaults')
+
+
+def getargspec(f):
+    """A replacement for inspect.getargspec"""
+    spec = getfullargspec(f)
+    return ArgSpec(spec.args, spec.varargs, spec.varkw, spec.defaults)
+
+
+DEF = re.compile(r'\s*def\s*([_\w][_\w\d]*)\s*\(')
+
+
+# basic functionality
+class FunctionMaker:
+    """
+    An object with the ability to create functions with a given signature.
+    It has attributes name, doc, module, signature, defaults, dict, and
+    methods update and make.
+    """
+
+    # Atomic get-and-increment provided by the GIL
+    _compile_count = itertools.count()
+
+    def __init__(self, func=None, name=None, signature=None,
+                 defaults=None, doc=None, module=None, funcdict=None):
+        self.shortsignature = signature
+        if func:
+            # func can be a class or a callable, but not an instance method
+            self.name = func.__name__
+            if self.name == '':  # small hack for lambda functions
+                self.name = '_lambda_'
+            self.doc = func.__doc__
+            self.module = func.__module__
+            if inspect.isfunction(func):
+                argspec = getfullargspec(func)
+                self.annotations = getattr(func, '__annotations__', {})
+                for a in ('args', 'varargs', 'varkw', 'defaults', 'kwonlyargs',
+                          'kwonlydefaults'):
+                    setattr(self, a, getattr(argspec, a))
+                for i, arg in enumerate(self.args):
+                    setattr(self, 'arg%d' % i, arg)
+                allargs = list(self.args)
+                allshortargs = list(self.args)
+                if self.varargs:
+                    allargs.append('*' + self.varargs)
+                    allshortargs.append('*' + self.varargs)
+                elif self.kwonlyargs:
+                    allargs.append('*')  # single star syntax
+                for a in self.kwonlyargs:
+                    allargs.append(f'{a}=None')
+                    allshortargs.append(f'{a}={a}')
+                if self.varkw:
+                    allargs.append('**' + self.varkw)
+                    allshortargs.append('**' + self.varkw)
+                self.signature = ', '.join(allargs)
+                self.shortsignature = ', '.join(allshortargs)
+                self.dict = func.__dict__.copy()
+        # func=None happens when decorating a caller
+        if name:
+            self.name = name
+        if signature is not None:
+            self.signature = signature
+        if defaults:
+            self.defaults = defaults
+        if doc:
+            self.doc = doc
+        if module:
+            self.module = module
+        if funcdict:
+            self.dict = funcdict
+        # check existence required attributes
+        assert hasattr(self, 'name')
+        if not hasattr(self, 'signature'):
+            raise TypeError(f'You are decorating a non-function: {func}')
+
+    def update(self, func, **kw):
+        "Update the signature of func with the data in self"
+        func.__name__ = self.name
+        func.__doc__ = getattr(self, 'doc', None)
+        func.__dict__ = getattr(self, 'dict', {})
+        func.__defaults__ = getattr(self, 'defaults', ())
+        func.__kwdefaults__ = getattr(self, 'kwonlydefaults', None)
+        func.__annotations__ = getattr(self, 'annotations', None)
+        try:
+            frame = sys._getframe(3)
+        except AttributeError:  # for IronPython and similar implementations
+            callermodule = '?'
+        else:
+            callermodule = frame.f_globals.get('__name__', '?')
+        func.__module__ = getattr(self, 'module', callermodule)
+        func.__dict__.update(kw)
+
+    def make(self, src_templ, evaldict=None, addsource=False, **attrs):
+        "Make a new function from a given template and update the signature"
+        src = src_templ % vars(self)  # expand name and signature
+        evaldict = evaldict or {}
+        mo = DEF.match(src)
+        if mo is None:
+            raise SyntaxError(f'not a valid function template\n{src}')
+        name = mo.group(1)  # extract the function name
+        names = set([name] + [arg.strip(' *') for arg in
+                              self.shortsignature.split(',')])
+        for n in names:
+            if n in ('_func_', '_call_'):
+                raise NameError(f'{n} is overridden in\n{src}')
+        if not src.endswith('\n'):  # add a newline just for safety
+            src += '\n'  # this is needed in old versions of Python
+
+        # Ensure each generated function has a unique filename for profilers
+        # (such as cProfile) that depend on the tuple of (,
+        # , ) being unique.
+        filename = '' % (next(self._compile_count),)
+        try:
+            code = compile(src, filename, 'single')
+            exec(code, evaldict)
+        except:  # noqa: E722
+            print('Error in generated code:', file=sys.stderr)
+            print(src, file=sys.stderr)
+            raise
+        func = evaldict[name]
+        if addsource:
+            attrs['__source__'] = src
+        self.update(func, **attrs)
+        return func
+
+    @classmethod
+    def create(cls, obj, body, evaldict, defaults=None,
+               doc=None, module=None, addsource=True, **attrs):
+        """
+        Create a function from the strings name, signature, and body.
+        evaldict is the evaluation dictionary. If addsource is true, an
+        attribute __source__ is added to the result. The attributes attrs
+        are added, if any.
+        """
+        if isinstance(obj, str):  # "name(signature)"
+            name, rest = obj.strip().split('(', 1)
+            signature = rest[:-1]  # strip a right parens
+            func = None
+        else:  # a function
+            name = None
+            signature = None
+            func = obj
+        self = cls(func, name, signature, defaults, doc, module)
+        ibody = '\n'.join('    ' + line for line in body.splitlines())
+        return self.make('def %(name)s(%(signature)s):\n' + ibody,
+                         evaldict, addsource, **attrs)
+
+
+def decorate(func, caller):
+    """
+    decorate(func, caller) decorates a function using a caller.
+    """
+    evaldict = func.__globals__.copy()
+    evaldict['_call_'] = caller
+    evaldict['_func_'] = func
+    fun = FunctionMaker.create(
+        func, "return _call_(_func_, %(shortsignature)s)",
+        evaldict, __wrapped__=func)
+    if hasattr(func, '__qualname__'):
+        fun.__qualname__ = func.__qualname__
+    return fun
+
+
+def decorator(caller, _func=None):
+    """decorator(caller) converts a caller function into a decorator"""
+    if _func is not None:  # return a decorated function
+        # this is obsolete behavior; you should use decorate instead
+        return decorate(_func, caller)
+    # else return a decorator function
+    if inspect.isclass(caller):
+        name = caller.__name__.lower()
+        callerfunc = get_init(caller)
+        doc = (f'decorator({caller.__name__}) converts functions/generators into ' 
+               f'factories of {caller.__name__} objects')
+    elif inspect.isfunction(caller):
+        if caller.__name__ == '':
+            name = '_lambda_'
+        else:
+            name = caller.__name__
+        callerfunc = caller
+        doc = caller.__doc__
+    else:  # assume caller is an object with a __call__ method
+        name = caller.__class__.__name__.lower()
+        callerfunc = caller.__call__.__func__
+        doc = caller.__call__.__doc__
+    evaldict = callerfunc.__globals__.copy()
+    evaldict['_call_'] = caller
+    evaldict['_decorate_'] = decorate
+    return FunctionMaker.create(
+        f'{name}(func)', 'return _decorate_(func, _call_)',
+        evaldict, doc=doc, module=caller.__module__,
+        __wrapped__=caller)
+
+
+# ####################### contextmanager ####################### #
+
+try:  # Python >= 3.2
+    from contextlib import _GeneratorContextManager
+except ImportError:  # Python >= 2.5
+    from contextlib import GeneratorContextManager as _GeneratorContextManager
+
+
+class ContextManager(_GeneratorContextManager):
+    def __call__(self, func):
+        """Context manager decorator"""
+        return FunctionMaker.create(
+            func, "with _self_: return _func_(%(shortsignature)s)",
+            dict(_self_=self, _func_=func), __wrapped__=func)
+
+
+init = getfullargspec(_GeneratorContextManager.__init__)
+n_args = len(init.args)
+if n_args == 2 and not init.varargs:  # (self, genobj) Python 2.7
+    def __init__(self, g, *a, **k):
+        return _GeneratorContextManager.__init__(self, g(*a, **k))
+    ContextManager.__init__ = __init__
+elif n_args == 2 and init.varargs:  # (self, gen, *a, **k) Python 3.4
+    pass
+elif n_args == 4:  # (self, gen, args, kwds) Python 3.5
+    def __init__(self, g, *a, **k):
+        return _GeneratorContextManager.__init__(self, g, a, k)
+    ContextManager.__init__ = __init__
+
+contextmanager = decorator(ContextManager)
+
+
+# ############################ dispatch_on ############################ #
+
+def append(a, vancestors):
+    """
+    Append ``a`` to the list of the virtual ancestors, unless it is already
+    included.
+    """
+    add = True
+    for j, va in enumerate(vancestors):
+        if issubclass(va, a):
+            add = False
+            break
+        if issubclass(a, va):
+            vancestors[j] = a
+            add = False
+    if add:
+        vancestors.append(a)
+
+
+# inspired from simplegeneric by P.J. Eby and functools.singledispatch
+def dispatch_on(*dispatch_args):
+    """
+    Factory of decorators turning a function into a generic function
+    dispatching on the given arguments.
+    """
+    assert dispatch_args, 'No dispatch args passed'
+    dispatch_str = f"({', '.join(dispatch_args)},)"
+
+    def check(arguments, wrong=operator.ne, msg=''):
+        """Make sure one passes the expected number of arguments"""
+        if wrong(len(arguments), len(dispatch_args)):
+            raise TypeError(f'Expected {len(dispatch_args)} arguments, '
+                            'got {len(arguments)}{msg}')
+
+    def gen_func_dec(func):
+        """Decorator turning a function into a generic function"""
+
+        # first check the dispatch arguments
+        argset = set(getfullargspec(func).args)
+        if not set(dispatch_args) <= argset:
+            raise NameError(f'Unknown dispatch arguments {dispatch_str}')
+
+        typemap = {}
+
+        def vancestors(*types):
+            """
+            Get a list of sets of virtual ancestors for the given types
+            """
+            check(types)
+            ras = [[] for _ in range(len(dispatch_args))]
+            for types_ in typemap:
+                for t, type_, ra in zip(types, types_, ras):
+                    if issubclass(t, type_) and type_ not in t.__mro__:
+                        append(type_, ra)
+            return [set(ra) for ra in ras]
+
+        def ancestors(*types):
+            """
+            Get a list of virtual MROs, one for each type
+            """
+            check(types)
+            lists = []
+            for t, vas in zip(types, vancestors(*types)):
+                n_vas = len(vas)
+                if n_vas > 1:
+                    raise RuntimeError(
+                        f'Ambiguous dispatch for {t}: {vas}')
+                elif n_vas == 1:
+                    va, = vas
+                    mro = type('t', (t, va), {}).__mro__[1:]
+                else:
+                    mro = t.__mro__
+                lists.append(mro[:-1])  # discard t and object
+            return lists
+
+        def register(*types):
+            """
+            Decorator to register an implementation for the given types
+            """
+            check(types)
+
+            def dec(f):
+                check(getfullargspec(f).args, operator.lt, ' in ' + f.__name__)
+                typemap[types] = f
+                return f
+            return dec
+
+        def dispatch_info(*types):
+            """
+            An utility to introspect the dispatch algorithm
+            """
+            check(types)
+            lst = [tuple(a.__name__ for a in anc)
+                   for anc in itertools.product(*ancestors(*types))]
+            return lst
+
+        def _dispatch(dispatch_args, *args, **kw):
+            types = tuple(type(arg) for arg in dispatch_args)
+            try:  # fast path
+                f = typemap[types]
+            except KeyError:
+                pass
+            else:
+                return f(*args, **kw)
+            combinations = itertools.product(*ancestors(*types))
+            next(combinations)  # the first one has been already tried
+            for types_ in combinations:
+                f = typemap.get(types_)
+                if f is not None:
+                    return f(*args, **kw)
+
+            # else call the default implementation
+            return func(*args, **kw)
+
+        return FunctionMaker.create(
+            func, f'return _f_({dispatch_str}, %%(shortsignature)s)',
+            dict(_f_=_dispatch), register=register, default=func,
+            typemap=typemap, vancestors=vancestors, ancestors=ancestors,
+            dispatch_info=dispatch_info, __wrapped__=func)
+
+    gen_func_dec.__name__ = 'dispatch_on' + dispatch_str
+    return gen_func_dec
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/deprecation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/deprecation.py
new file mode 100644
index 0000000000000000000000000000000000000000..82a6ef8f39ba764b46fdc01de9281cdbf72f4736
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/deprecation.py
@@ -0,0 +1,274 @@
+from inspect import Parameter, signature
+import functools
+import warnings
+from importlib import import_module
+from scipy._lib._docscrape import FunctionDoc
+
+
+__all__ = ["_deprecated"]
+
+
+# Object to use as default value for arguments to be deprecated. This should
+# be used over 'None' as the user could parse 'None' as a positional argument
+_NoValue = object()
+
+def _sub_module_deprecation(*, sub_package, module, private_modules, all,
+                            attribute, correct_module=None, dep_version="1.16.0"):
+    """Helper function for deprecating modules that are public but were
+    intended to be private.
+
+    Parameters
+    ----------
+    sub_package : str
+        Subpackage the module belongs to eg. stats
+    module : str
+        Public but intended private module to deprecate
+    private_modules : list
+        Private replacement(s) for `module`; should contain the
+        content of ``all``, possibly spread over several modules.
+    all : list
+        ``__all__`` belonging to `module`
+    attribute : str
+        The attribute in `module` being accessed
+    correct_module : str, optional
+        Module in `sub_package` that `attribute` should be imported from.
+        Default is that `attribute` should be imported from ``scipy.sub_package``.
+    dep_version : str, optional
+        Version in which deprecated attributes will be removed.
+    """
+    if correct_module is not None:
+        correct_import = f"scipy.{sub_package}.{correct_module}"
+    else:
+        correct_import = f"scipy.{sub_package}"
+
+    if attribute not in all:
+        raise AttributeError(
+            f"`scipy.{sub_package}.{module}` has no attribute `{attribute}`; "
+            f"furthermore, `scipy.{sub_package}.{module}` is deprecated "
+            f"and will be removed in SciPy 2.0.0."
+        )
+
+    attr = getattr(import_module(correct_import), attribute, None)
+
+    if attr is not None:
+        message = (
+            f"Please import `{attribute}` from the `{correct_import}` namespace; "
+            f"the `scipy.{sub_package}.{module}` namespace is deprecated "
+            f"and will be removed in SciPy 2.0.0."
+        )
+    else:
+        message = (
+            f"`scipy.{sub_package}.{module}.{attribute}` is deprecated along with "
+            f"the `scipy.{sub_package}.{module}` namespace. "
+            f"`scipy.{sub_package}.{module}.{attribute}` will be removed "
+            f"in SciPy {dep_version}, and the `scipy.{sub_package}.{module}` namespace "
+            f"will be removed in SciPy 2.0.0."
+        )
+
+    warnings.warn(message, category=DeprecationWarning, stacklevel=3)
+
+    for module in private_modules:
+        try:
+            return getattr(import_module(f"scipy.{sub_package}.{module}"), attribute)
+        except AttributeError as e:
+            # still raise an error if the attribute isn't in any of the expected
+            # private modules
+            if module == private_modules[-1]:
+                raise e
+            continue
+    
+
+def _deprecated(msg, stacklevel=2):
+    """Deprecate a function by emitting a warning on use."""
+    def wrap(fun):
+        if isinstance(fun, type):
+            warnings.warn(
+                f"Trying to deprecate class {fun!r}",
+                category=RuntimeWarning, stacklevel=2)
+            return fun
+
+        @functools.wraps(fun)
+        def call(*args, **kwargs):
+            warnings.warn(msg, category=DeprecationWarning,
+                          stacklevel=stacklevel)
+            return fun(*args, **kwargs)
+        call.__doc__ = fun.__doc__
+        return call
+
+    return wrap
+
+
+class _DeprecationHelperStr:
+    """
+    Helper class used by deprecate_cython_api
+    """
+    def __init__(self, content, message):
+        self._content = content
+        self._message = message
+
+    def __hash__(self):
+        return hash(self._content)
+
+    def __eq__(self, other):
+        res = (self._content == other)
+        if res:
+            warnings.warn(self._message, category=DeprecationWarning,
+                          stacklevel=2)
+        return res
+
+
+def deprecate_cython_api(module, routine_name, new_name=None, message=None):
+    """
+    Deprecate an exported cdef function in a public Cython API module.
+
+    Only functions can be deprecated; typedefs etc. cannot.
+
+    Parameters
+    ----------
+    module : module
+        Public Cython API module (e.g. scipy.linalg.cython_blas).
+    routine_name : str
+        Name of the routine to deprecate. May also be a fused-type
+        routine (in which case its all specializations are deprecated).
+    new_name : str
+        New name to include in the deprecation warning message
+    message : str
+        Additional text in the deprecation warning message
+
+    Examples
+    --------
+    Usually, this function would be used in the top-level of the
+    module ``.pyx`` file:
+
+    >>> from scipy._lib.deprecation import deprecate_cython_api
+    >>> import scipy.linalg.cython_blas as mod
+    >>> deprecate_cython_api(mod, "dgemm", "dgemm_new",
+    ...                      message="Deprecated in Scipy 1.5.0")
+    >>> del deprecate_cython_api, mod
+
+    After this, Cython modules that use the deprecated function emit a
+    deprecation warning when they are imported.
+
+    """
+    old_name = f"{module.__name__}.{routine_name}"
+
+    if new_name is None:
+        depdoc = f"`{old_name}` is deprecated!"
+    else:
+        depdoc = f"`{old_name}` is deprecated, use `{new_name}` instead!"
+
+    if message is not None:
+        depdoc += "\n" + message
+
+    d = module.__pyx_capi__
+
+    # Check if the function is a fused-type function with a mangled name
+    j = 0
+    has_fused = False
+    while True:
+        fused_name = f"__pyx_fuse_{j}{routine_name}"
+        if fused_name in d:
+            has_fused = True
+            d[_DeprecationHelperStr(fused_name, depdoc)] = d.pop(fused_name)
+            j += 1
+        else:
+            break
+
+    # If not, apply deprecation to the named routine
+    if not has_fused:
+        d[_DeprecationHelperStr(routine_name, depdoc)] = d.pop(routine_name)
+
+
+# taken from scikit-learn, see
+# https://github.com/scikit-learn/scikit-learn/blob/1.3.0/sklearn/utils/validation.py#L38
+def _deprecate_positional_args(func=None, *, version=None,
+                               deprecated_args=None, custom_message=""):
+    """Decorator for methods that issues warnings for positional arguments.
+
+    Using the keyword-only argument syntax in pep 3102, arguments after the
+    * will issue a warning when passed as a positional argument.
+
+    Parameters
+    ----------
+    func : callable, default=None
+        Function to check arguments on.
+    version : callable, default=None
+        The version when positional arguments will result in error.
+    deprecated_args : set of str, optional
+        Arguments to deprecate - whether passed by position or keyword.
+    custom_message : str, optional
+        Custom message to add to deprecation warning and documentation.
+    """
+    if version is None:
+        msg = "Need to specify a version where signature will be changed"
+        raise ValueError(msg)
+
+    deprecated_args = set() if deprecated_args is None else set(deprecated_args)
+
+    def _inner_deprecate_positional_args(f):
+        sig = signature(f)
+        kwonly_args = []
+        all_args = []
+
+        for name, param in sig.parameters.items():
+            if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
+                all_args.append(name)
+            elif param.kind == Parameter.KEYWORD_ONLY:
+                kwonly_args.append(name)
+
+        def warn_deprecated_args(kwargs):
+            intersection = deprecated_args.intersection(kwargs)
+            if intersection:
+                message = (f"Arguments {intersection} are deprecated, whether passed "
+                           "by position or keyword. They will be removed in SciPy "
+                           f"{version}. ")
+                message += custom_message
+                warnings.warn(message, category=DeprecationWarning, stacklevel=3)
+
+        @functools.wraps(f)
+        def inner_f(*args, **kwargs):
+
+            extra_args = len(args) - len(all_args)
+            if extra_args <= 0:
+                warn_deprecated_args(kwargs)
+                return f(*args, **kwargs)
+
+            # extra_args > 0
+            kwonly_extra_args = set(kwonly_args[:extra_args]) - deprecated_args
+            args_msg = ", ".join(kwonly_extra_args)
+            warnings.warn(
+                (
+                    f"You are passing as positional arguments: {args_msg}. "
+                    "Please change your invocation to use keyword arguments. "
+                    f"From SciPy {version}, passing these as positional "
+                    "arguments will result in an error."
+                ),
+                DeprecationWarning,
+                stacklevel=2,
+            )
+            kwargs.update(zip(sig.parameters, args))
+            warn_deprecated_args(kwargs)
+            return f(**kwargs)
+
+        doc = FunctionDoc(inner_f)
+        kwonly_extra_args = set(kwonly_args) - deprecated_args
+        admonition = f"""
+.. deprecated:: {version}
+    Use of argument(s) ``{kwonly_extra_args}`` by position is deprecated; beginning in 
+    SciPy {version}, these will be keyword-only. """
+        if deprecated_args:
+            admonition += (f"Argument(s) ``{deprecated_args}`` are deprecated, whether "
+                           "passed by position or keyword; they will be removed in "
+                           f"SciPy {version}. ")
+        admonition += custom_message
+        doc['Extended Summary'] += [admonition]
+
+        doc = str(doc).split("\n", 1)[1]  # remove signature
+        inner_f.__doc__ = str(doc)
+
+        return inner_f
+
+    if func is not None:
+        return _inner_deprecate_positional_args(func)
+
+    return _inner_deprecate_positional_args
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/doccer.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/doccer.py
new file mode 100644
index 0000000000000000000000000000000000000000..538b83c482caba1d4a8a2f64e1ad56da1862e286
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/doccer.py
@@ -0,0 +1,372 @@
+"""Utilities to allow inserting docstring fragments for common
+parameters into function and method docstrings."""
+
+from collections.abc import Callable, Iterable, Mapping
+from typing import Protocol, TypeVar
+import sys
+
+__all__ = [
+    "docformat",
+    "inherit_docstring_from",
+    "indentcount_lines",
+    "filldoc",
+    "unindent_dict",
+    "unindent_string",
+    "extend_notes_in_docstring",
+    "replace_notes_in_docstring",
+    "doc_replace",
+]
+
+_F = TypeVar("_F", bound=Callable[..., object])
+
+
+class Decorator(Protocol):
+    """A decorator of a function."""
+
+    def __call__(self, func: _F, /) -> _F: ...
+
+
+def docformat(docstring: str, docdict: Mapping[str, str] | None = None) -> str:
+    """Fill a function docstring from variables in dictionary.
+
+    Adapt the indent of the inserted docs
+
+    Parameters
+    ----------
+    docstring : str
+        A docstring from a function, possibly with dict formatting strings.
+    docdict : dict[str, str], optional
+        A dictionary with keys that match the dict formatting strings
+        and values that are docstring fragments to be inserted. The
+        indentation of the inserted docstrings is set to match the
+        minimum indentation of the ``docstring`` by adding this
+        indentation to all lines of the inserted string, except the
+        first.
+
+    Returns
+    -------
+    docstring : str
+        string with requested ``docdict`` strings inserted.
+
+    Examples
+    --------
+    >>> docformat(' Test string with %(value)s', {'value':'inserted value'})
+    ' Test string with inserted value'
+    >>> docstring = 'First line\\n    Second line\\n    %(value)s'
+    >>> inserted_string = "indented\\nstring"
+    >>> docdict = {'value': inserted_string}
+    >>> docformat(docstring, docdict)
+    'First line\\n    Second line\\n    indented\\n    string'
+    """
+    if not docstring:
+        return docstring
+    if docdict is None:
+        docdict = {}
+    if not docdict:
+        return docstring
+    lines = docstring.expandtabs().splitlines()
+    # Find the minimum indent of the main docstring, after first line
+    if len(lines) < 2:
+        icount = 0
+    else:
+        icount = indentcount_lines(lines[1:])
+    indent = " " * icount
+    # Insert this indent to dictionary docstrings
+    indented = {}
+    for name, dstr in docdict.items():
+        lines = dstr.expandtabs().splitlines()
+        try:
+            newlines = [lines[0]]
+            for line in lines[1:]:
+                newlines.append(indent + line)
+            indented[name] = "\n".join(newlines)
+        except IndexError:
+            indented[name] = dstr
+    return docstring % indented
+
+
+def inherit_docstring_from(cls: object) -> Decorator:
+    """This decorator modifies the decorated function's docstring by
+    replacing occurrences of '%(super)s' with the docstring of the
+    method of the same name from the class `cls`.
+
+    If the decorated method has no docstring, it is simply given the
+    docstring of `cls`s method.
+
+    Parameters
+    ----------
+    cls : type or object
+        A class with a method with the same name as the decorated method.
+        The docstring of the method in this class replaces '%(super)s' in the
+        docstring of the decorated method.
+
+    Returns
+    -------
+    decfunc : function
+        The decorator function that modifies the __doc__ attribute
+        of its argument.
+
+    Examples
+    --------
+    In the following, the docstring for Bar.func created using the
+    docstring of `Foo.func`.
+
+    >>> class Foo:
+    ...     def func(self):
+    ...         '''Do something useful.'''
+    ...         return
+    ...
+    >>> class Bar(Foo):
+    ...     @inherit_docstring_from(Foo)
+    ...     def func(self):
+    ...         '''%(super)s
+    ...         Do it fast.
+    ...         '''
+    ...         return
+    ...
+    >>> b = Bar()
+    >>> b.func.__doc__
+    'Do something useful.\n        Do it fast.\n        '
+    """
+
+    def _doc(func: _F) -> _F:
+        cls_docstring = getattr(cls, func.__name__).__doc__
+        func_docstring = func.__doc__
+        if func_docstring is None:
+            func.__doc__ = cls_docstring
+        else:
+            new_docstring = func_docstring % dict(super=cls_docstring)
+            func.__doc__ = new_docstring
+        return func
+
+    return _doc
+
+
+def extend_notes_in_docstring(cls: object, notes: str) -> Decorator:
+    """This decorator replaces the decorated function's docstring
+    with the docstring from corresponding method in `cls`.
+    It extends the 'Notes' section of that docstring to include
+    the given `notes`.
+
+    Parameters
+    ----------
+    cls : type or object
+        A class with a method with the same name as the decorated method.
+        The docstring of the method in this class replaces the docstring of the
+        decorated method.
+    notes : str
+        Additional notes to append to the 'Notes' section of the docstring.
+
+    Returns
+    -------
+    decfunc : function
+        The decorator function that modifies the __doc__ attribute
+        of its argument.
+    """
+
+    def _doc(func: _F) -> _F:
+        cls_docstring = getattr(cls, func.__name__).__doc__
+        # If python is called with -OO option,
+        # there is no docstring
+        if cls_docstring is None:
+            return func
+        end_of_notes = cls_docstring.find("        References\n")
+        if end_of_notes == -1:
+            end_of_notes = cls_docstring.find("        Examples\n")
+            if end_of_notes == -1:
+                end_of_notes = len(cls_docstring)
+        func.__doc__ = (
+            cls_docstring[:end_of_notes] + notes + cls_docstring[end_of_notes:]
+        )
+        return func
+
+    return _doc
+
+
+def replace_notes_in_docstring(cls: object, notes: str) -> Decorator:
+    """This decorator replaces the decorated function's docstring
+    with the docstring from corresponding method in `cls`.
+    It replaces the 'Notes' section of that docstring with
+    the given `notes`.
+
+    Parameters
+    ----------
+    cls : type or object
+        A class with a method with the same name as the decorated method.
+        The docstring of the method in this class replaces the docstring of the
+        decorated method.
+    notes : str
+        The notes to replace the existing 'Notes' section with.
+
+    Returns
+    -------
+    decfunc : function
+        The decorator function that modifies the __doc__ attribute
+        of its argument.
+    """
+
+    def _doc(func: _F) -> _F:
+        cls_docstring = getattr(cls, func.__name__).__doc__
+        notes_header = "        Notes\n        -----\n"
+        # If python is called with -OO option,
+        # there is no docstring
+        if cls_docstring is None:
+            return func
+        start_of_notes = cls_docstring.find(notes_header)
+        end_of_notes = cls_docstring.find("        References\n")
+        if end_of_notes == -1:
+            end_of_notes = cls_docstring.find("        Examples\n")
+            if end_of_notes == -1:
+                end_of_notes = len(cls_docstring)
+        func.__doc__ = (
+            cls_docstring[: start_of_notes + len(notes_header)]
+            + notes
+            + cls_docstring[end_of_notes:]
+        )
+        return func
+
+    return _doc
+
+
+def indentcount_lines(lines: Iterable[str]) -> int:
+    """Minimum indent for all lines in line list
+
+    Parameters
+    ----------
+    lines : Iterable[str]
+        The lines to find the minimum indent of.
+
+    Returns
+    -------
+    indent : int
+        The minimum indent.
+
+
+    Examples
+    --------
+    >>> lines = [' one', '  two', '   three']
+    >>> indentcount_lines(lines)
+    1
+    >>> lines = []
+    >>> indentcount_lines(lines)
+    0
+    >>> lines = [' one']
+    >>> indentcount_lines(lines)
+    1
+    >>> indentcount_lines(['    '])
+    0
+    """
+    indentno = sys.maxsize
+    for line in lines:
+        stripped = line.lstrip()
+        if stripped:
+            indentno = min(indentno, len(line) - len(stripped))
+    if indentno == sys.maxsize:
+        return 0
+    return indentno
+
+
+def filldoc(docdict: Mapping[str, str], unindent_params: bool = True) -> Decorator:
+    """Return docstring decorator using docdict variable dictionary.
+
+    Parameters
+    ----------
+    docdict : dict[str, str]
+        A dictionary containing name, docstring fragment pairs.
+    unindent_params : bool, optional
+        If True, strip common indentation from all parameters in docdict.
+        Default is False.
+
+    Returns
+    -------
+    decfunc : function
+        The decorator function that applies dictionary to its
+        argument's __doc__ attribute.
+    """
+    if unindent_params:
+        docdict = unindent_dict(docdict)
+
+    def decorate(func: _F) -> _F:
+        # __doc__ may be None for optimized Python (-OO)
+        doc = func.__doc__ or ""
+        func.__doc__ = docformat(doc, docdict)
+        return func
+
+    return decorate
+
+
+def unindent_dict(docdict: Mapping[str, str]) -> dict[str, str]:
+    """Unindent all strings in a docdict.
+
+    Parameters
+    ----------
+    docdict : dict[str, str]
+        A dictionary with string values to unindent.
+
+    Returns
+    -------
+    docdict : dict[str, str]
+        The `docdict` dictionary but each of its string values are unindented.
+    """
+    can_dict: dict[str, str] = {}
+    for name, dstr in docdict.items():
+        can_dict[name] = unindent_string(dstr)
+    return can_dict
+
+
+def unindent_string(docstring: str) -> str:
+    """Set docstring to minimum indent for all lines, including first.
+
+    Parameters
+    ----------
+    docstring : str
+        The input docstring to unindent.
+
+    Returns
+    -------
+    docstring : str
+        The unindented docstring.
+
+    Examples
+    --------
+    >>> unindent_string(' two')
+    'two'
+    >>> unindent_string('  two\\n   three')
+    'two\\n three'
+    """
+    lines = docstring.expandtabs().splitlines()
+    icount = indentcount_lines(lines)
+    if icount == 0:
+        return docstring
+    return "\n".join([line[icount:] for line in lines])
+
+
+def doc_replace(obj: object, oldval: str, newval: str) -> Decorator:
+    """Decorator to take the docstring from obj, with oldval replaced by newval
+
+    Equivalent to ``func.__doc__ = obj.__doc__.replace(oldval, newval)``
+
+    Parameters
+    ----------
+    obj : object
+        A class or object whose docstring will be used as the basis for the
+        replacement operation.
+    oldval : str
+        The string to search for in the docstring.
+    newval : str
+        The string to replace `oldval` with in the docstring.
+
+    Returns
+    -------
+    decfunc : function
+        A decorator function that replaces occurrences of `oldval` with `newval`
+        in the docstring of the decorated function.
+    """
+    # __doc__ may be None for optimized Python (-OO)
+    doc = (obj.__doc__ or "").replace(oldval, newval)
+
+    def inner(func: _F) -> _F:
+        func.__doc__ = doc
+        return func
+
+    return inner
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/uarray.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/uarray.py
new file mode 100644
index 0000000000000000000000000000000000000000..b29fc713efb3e836cc179ac87ce41f87b51870ef
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/_lib/uarray.py
@@ -0,0 +1,31 @@
+"""`uarray` provides functions for generating multimethods that dispatch to
+multiple different backends
+
+This should be imported, rather than `_uarray` so that an installed version could
+be used instead, if available. This means that users can call
+`uarray.set_backend` directly instead of going through SciPy.
+
+"""
+
+
+# Prefer an installed version of uarray, if available
+try:
+    import uarray as _uarray
+except ImportError:
+    _has_uarray = False
+else:
+    from scipy._lib._pep440 import Version as _Version
+
+    _has_uarray = _Version(_uarray.__version__) >= _Version("0.8")
+    del _uarray
+    del _Version
+
+
+if _has_uarray:
+    from uarray import *  # noqa: F403
+    from uarray import _Function
+else:
+    from ._uarray import *  # noqa: F403
+    from ._uarray import _Function  # noqa: F401
+
+del _has_uarray
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..fdf939b249c17256b622c2f2756a5f34c4a128cc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__init__.py
@@ -0,0 +1,358 @@
+r"""
+==================================
+Constants (:mod:`scipy.constants`)
+==================================
+
+.. currentmodule:: scipy.constants
+
+Physical and mathematical constants and units.
+
+
+Mathematical constants
+======================
+
+================  =================================================================
+``pi``            Pi
+``golden``        Golden ratio
+``golden_ratio``  Golden ratio
+================  =================================================================
+
+
+Physical constants
+==================
+The following physical constants are available as attributes of `scipy.constants`.
+All units are `SI `_.
+
+===========================  ================================================================  ===============
+Attribute                    Quantity                                                          Units
+===========================  ================================================================  ===============
+``c``                        speed of light in vacuum                                          m s^-1
+``speed_of_light``           speed of light in vacuum                                          m s^-1
+``mu_0``                     the magnetic constant :math:`\mu_0`                               N A^-2
+``epsilon_0``                the electric constant (vacuum permittivity), :math:`\epsilon_0`   F m^-1
+``h``                        the Planck constant :math:`h`                                     J Hz^-1
+``Planck``                   the Planck constant :math:`h`                                     J Hz^-1
+``hbar``                     the reduced Planck constant, :math:`\hbar = h/(2\pi)`             J s
+``G``                        Newtonian constant of gravitation                                 m^3 kg^-1 s^-2
+``gravitational_constant``   Newtonian constant of gravitation                                 m^3 kg^-1 s^-2
+``g``                        standard acceleration of gravity                                  m s^-2
+``e``                        elementary charge                                                 C
+``elementary_charge``        elementary charge                                                 C
+``R``                        molar gas constant                                                J mol^-1 K^-1
+``gas_constant``             molar gas constant                                                J mol^-1 K^-1
+``alpha``                    fine-structure constant                                           (unitless)
+``fine_structure``           fine-structure constant                                           (unitless)
+``N_A``                      Avogadro constant                                                 mol^-1
+``Avogadro``                 Avogadro constant                                                 mol^-1
+``k``                        Boltzmann constant                                                J K^-1
+``Boltzmann``                Boltzmann constant                                                J K^-1
+``sigma``                    Stefan-Boltzmann constant :math:`\sigma`                          W m^-2 K^-4
+``Stefan_Boltzmann``         Stefan-Boltzmann constant :math:`\sigma`                          W m^-2 K^-4
+``Wien``                     Wien wavelength displacement law constant                         m K
+``Rydberg``                  Rydberg constant                                                  m^-1
+``m_e``                      electron mass                                                     kg
+``electron_mass``            electron mass                                                     kg
+``m_p``                      proton mass                                                       kg
+``proton_mass``              proton mass                                                       kg
+``m_n``                      neutron mass                                                      kg
+``neutron_mass``             neutron mass                                                      kg
+===========================  ================================================================  ===============
+
+
+Constants database
+------------------
+
+In addition to the above variables, :mod:`scipy.constants` also contains the
+2022 CODATA recommended values [CODATA2022]_ database containing more physical
+constants.
+
+.. autosummary::
+   :toctree: generated/
+
+   value      -- Value in physical_constants indexed by key
+   unit       -- Unit in physical_constants indexed by key
+   precision  -- Relative precision in physical_constants indexed by key
+   find       -- Return list of physical_constant keys with a given string
+   ConstantWarning -- Constant sought not in newest CODATA data set
+
+.. data:: physical_constants
+
+   Dictionary of physical constants, of the format
+   ``physical_constants[name] = (value, unit, uncertainty)``.
+   The CODATA database uses ellipses to indicate that a value is defined
+   (exactly) in terms of others but cannot be represented exactly with the
+   allocated number of digits. In these cases, SciPy calculates the derived
+   value and reports it to the full precision of a Python ``float``. Although 
+   ``physical_constants`` lists the uncertainty as ``0.0`` to indicate that
+   the CODATA value is exact, the value in ``physical_constants`` is still
+   subject to the truncation error inherent in double-precision representation.
+
+Available constants:
+
+======================================================================  ====
+%(constant_names)s
+======================================================================  ====
+
+
+Units
+=====
+
+SI prefixes
+-----------
+
+============  =================================================================
+``quetta``    :math:`10^{30}`
+``ronna``     :math:`10^{27}`
+``yotta``     :math:`10^{24}`
+``zetta``     :math:`10^{21}`
+``exa``       :math:`10^{18}`
+``peta``      :math:`10^{15}`
+``tera``      :math:`10^{12}`
+``giga``      :math:`10^{9}`
+``mega``      :math:`10^{6}`
+``kilo``      :math:`10^{3}`
+``hecto``     :math:`10^{2}`
+``deka``      :math:`10^{1}`
+``deci``      :math:`10^{-1}`
+``centi``     :math:`10^{-2}`
+``milli``     :math:`10^{-3}`
+``micro``     :math:`10^{-6}`
+``nano``      :math:`10^{-9}`
+``pico``      :math:`10^{-12}`
+``femto``     :math:`10^{-15}`
+``atto``      :math:`10^{-18}`
+``zepto``     :math:`10^{-21}`
+``yocto``     :math:`10^{-24}`
+``ronto``     :math:`10^{-27}`
+``quecto``    :math:`10^{-30}`
+============  =================================================================
+
+Binary prefixes
+---------------
+
+============  =================================================================
+``kibi``      :math:`2^{10}`
+``mebi``      :math:`2^{20}`
+``gibi``      :math:`2^{30}`
+``tebi``      :math:`2^{40}`
+``pebi``      :math:`2^{50}`
+``exbi``      :math:`2^{60}`
+``zebi``      :math:`2^{70}`
+``yobi``      :math:`2^{80}`
+============  =================================================================
+
+Mass
+----
+
+=================  ============================================================
+``gram``           :math:`10^{-3}` kg
+``metric_ton``     :math:`10^{3}` kg
+``grain``          one grain in kg
+``lb``             one pound (avoirdupous) in kg
+``pound``          one pound (avoirdupous) in kg
+``blob``           one inch version of a slug in kg (added in 1.0.0)
+``slinch``         one inch version of a slug in kg (added in 1.0.0)
+``slug``           one slug in kg (added in 1.0.0)
+``oz``             one ounce in kg
+``ounce``          one ounce in kg
+``stone``          one stone in kg
+``grain``          one grain in kg
+``long_ton``       one long ton in kg
+``short_ton``      one short ton in kg
+``troy_ounce``     one Troy ounce in kg
+``troy_pound``     one Troy pound in kg
+``carat``          one carat in kg
+``m_u``            atomic mass constant (in kg)
+``u``              atomic mass constant (in kg)
+``atomic_mass``    atomic mass constant (in kg)
+=================  ============================================================
+
+Angle
+-----
+
+=================  ============================================================
+``degree``         degree in radians
+``arcmin``         arc minute in radians
+``arcminute``      arc minute in radians
+``arcsec``         arc second in radians
+``arcsecond``      arc second in radians
+=================  ============================================================
+
+
+Time
+----
+
+=================  ============================================================
+``minute``         one minute in seconds
+``hour``           one hour in seconds
+``day``            one day in seconds
+``week``           one week in seconds
+``year``           one year (365 days) in seconds
+``Julian_year``    one Julian year (365.25 days) in seconds
+=================  ============================================================
+
+
+Length
+------
+
+=====================  ============================================================
+``inch``               one inch in meters
+``foot``               one foot in meters
+``yard``               one yard in meters
+``mile``               one mile in meters
+``mil``                one mil in meters
+``pt``                 one point in meters
+``point``              one point in meters
+``survey_foot``        one survey foot in meters
+``survey_mile``        one survey mile in meters
+``nautical_mile``      one nautical mile in meters
+``fermi``              one Fermi in meters
+``angstrom``           one Angstrom in meters
+``micron``             one micron in meters
+``au``                 one astronomical unit in meters
+``astronomical_unit``  one astronomical unit in meters
+``light_year``         one light year in meters
+``parsec``             one parsec in meters
+=====================  ============================================================
+
+Pressure
+--------
+
+=================  ============================================================
+``atm``            standard atmosphere in pascals
+``atmosphere``     standard atmosphere in pascals
+``bar``            one bar in pascals
+``torr``           one torr (mmHg) in pascals
+``mmHg``           one torr (mmHg) in pascals
+``psi``            one psi in pascals
+=================  ============================================================
+
+Area
+----
+
+=================  ============================================================
+``hectare``        one hectare in square meters
+``acre``           one acre in square meters
+=================  ============================================================
+
+
+Volume
+------
+
+===================    ========================================================
+``liter``              one liter in cubic meters
+``litre``              one liter in cubic meters
+``gallon``             one gallon (US) in cubic meters
+``gallon_US``          one gallon (US) in cubic meters
+``gallon_imp``         one gallon (UK) in cubic meters
+``fluid_ounce``        one fluid ounce (US) in cubic meters
+``fluid_ounce_US``     one fluid ounce (US) in cubic meters
+``fluid_ounce_imp``    one fluid ounce (UK) in cubic meters
+``bbl``                one barrel in cubic meters
+``barrel``             one barrel in cubic meters
+===================    ========================================================
+
+Speed
+-----
+
+==================    ==========================================================
+``kmh``               kilometers per hour in meters per second
+``mph``               miles per hour in meters per second
+``mach``              one Mach (approx., at 15 C, 1 atm) in meters per second
+``speed_of_sound``    one Mach (approx., at 15 C, 1 atm) in meters per second
+``knot``              one knot in meters per second
+==================    ==========================================================
+
+
+Temperature
+-----------
+
+=====================  =======================================================
+``zero_Celsius``       zero of Celsius scale in Kelvin
+``degree_Fahrenheit``  one Fahrenheit (only differences) in Kelvins
+=====================  =======================================================
+
+.. autosummary::
+   :toctree: generated/
+
+   convert_temperature
+
+Energy
+------
+
+====================  =======================================================
+``eV``                one electron volt in Joules
+``electron_volt``     one electron volt in Joules
+``calorie``           one calorie (thermochemical) in Joules
+``calorie_th``        one calorie (thermochemical) in Joules
+``calorie_IT``        one calorie (International Steam Table calorie, 1956) in Joules
+``erg``               one erg in Joules
+``Btu``               one British thermal unit (International Steam Table) in Joules
+``Btu_IT``            one British thermal unit (International Steam Table) in Joules
+``Btu_th``            one British thermal unit (thermochemical) in Joules
+``ton_TNT``           one ton of TNT in Joules
+====================  =======================================================
+
+Power
+-----
+
+====================  =======================================================
+``hp``                one horsepower in watts
+``horsepower``        one horsepower in watts
+====================  =======================================================
+
+Force
+-----
+
+====================  =======================================================
+``dyn``               one dyne in newtons
+``dyne``              one dyne in newtons
+``lbf``               one pound force in newtons
+``pound_force``       one pound force in newtons
+``kgf``               one kilogram force in newtons
+``kilogram_force``    one kilogram force in newtons
+====================  =======================================================
+
+Optics
+------
+
+.. autosummary::
+   :toctree: generated/
+
+   lambda2nu
+   nu2lambda
+
+References
+==========
+
+.. [CODATA2022] CODATA Recommended Values of the Fundamental
+   Physical Constants 2022.
+
+   https://physics.nist.gov/cuu/Constants/
+
+"""  # noqa: E501
+# Modules contributed by BasSw (wegwerp@gmail.com)
+from ._codata import *
+from ._constants import *
+from ._codata import _obsolete_constants, physical_constants
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import codata, constants
+
+_constant_names_list = [(_k.lower(), _k, _v)
+                        for _k, _v in physical_constants.items()
+                        if _k not in _obsolete_constants]
+_constant_names = "\n".join(["``{}``{}  {} {}".format(_x[1], " "*(66-len(_x[1])),
+                                                  _x[2][0], _x[2][1])
+                             for _x in sorted(_constant_names_list)])
+if __doc__:
+    __doc__ = __doc__ % dict(constant_names=_constant_names)
+
+del _constant_names
+del _constant_names_list
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cc2ca3f29520e67d9c051946afeafa83366a8463
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/_constants.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/_constants.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..911a2833e63acc9f992db1e9150f15d52599a7f6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/_constants.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/codata.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/codata.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1bc048294ad948e171a4698c485a0c9972263c1f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/codata.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/constants.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/constants.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c175ed1e75c0aad03af29ed096e6adb1cb7be951
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/__pycache__/constants.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_codata.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_codata.py
new file mode 100644
index 0000000000000000000000000000000000000000..4457a8089d9c4b7ba159519e6ec1606fb7b74070
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_codata.py
@@ -0,0 +1,2266 @@
+"""
+Fundamental Physical Constants
+------------------------------
+
+These constants are taken from CODATA Recommended Values of the Fundamental
+Physical Constants 2022.
+
+Object
+------
+physical_constants : dict
+    A dictionary containing physical constants. Keys are the names of physical
+    constants, values are tuples (value, units, precision).
+
+Functions
+---------
+value(key):
+    Returns the value of the physical constant(key).
+unit(key):
+    Returns the units of the physical constant(key).
+precision(key):
+    Returns the relative precision of the physical constant(key).
+find(sub):
+    Prints or returns list of keys containing the string sub, default is all.
+
+Source
+------
+The values of the constants provided at this site are recommended for
+international use by CODATA and are the latest available. Termed the "2018
+CODATA recommended values," they are generally recognized worldwide for use in
+all fields of science and technology. The values became available on 20 May
+2019 and replaced the 2014 CODATA set. Also available is an introduction to the
+constants for non-experts at
+
+https://physics.nist.gov/cuu/Constants/introduction.html
+
+References
+----------
+Theoretical and experimental publications relevant to the fundamental constants
+and closely related precision measurements published since the mid 1980s, but
+also including many older papers of particular interest, some of which date
+back to the 1800s. To search the bibliography, visit
+
+https://physics.nist.gov/cuu/Constants/
+
+"""
+
+# Compiled by Charles Harris, dated October 3, 2002
+# updated to 2002 values by BasSw, 2006
+# Updated to 2006 values by Vincent Davis June 2010
+# Updated to 2014 values by Joseph Booker, 2015
+# Updated to 2018 values by Jakob Jakobson, 2019
+# Updated to 2022 values by Jakob Jakobson, 2024
+
+import warnings
+import math
+
+from typing import Any
+from collections.abc import Callable
+
+__all__ = ['physical_constants', 'value', 'unit', 'precision', 'find',
+           'ConstantWarning']
+
+"""
+Source:  https://physics.nist.gov/cuu/Constants/
+
+The values of the constants provided at this site are recommended for
+international use by CODATA and are the latest available. Termed the "2018
+CODATA recommended values," they are generally recognized worldwide for use in
+all fields of science and technology. The values became available on 20 May
+2019 and replaced the 2014 CODATA set.
+"""
+
+#
+# Source:  https://physics.nist.gov/cuu/Constants/
+#
+
+# Quantity                                             Value                 Uncertainty          Unit
+# ---------------------------------------------------- --------------------- -------------------- -------------
+txt2002 = """\
+Wien displacement law constant                         2.897 7685e-3         0.000 0051e-3         m K
+atomic unit of 1st hyperpolarizablity                  3.206 361 51e-53      0.000 000 28e-53      C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizablity                  6.235 3808e-65        0.000 0011e-65        C^4 m^4 J^-3
+atomic unit of electric dipole moment                  8.478 353 09e-30      0.000 000 73e-30      C m
+atomic unit of electric polarizablity                  1.648 777 274e-41     0.000 000 016e-41     C^2 m^2 J^-1
+atomic unit of electric quadrupole moment              4.486 551 24e-40      0.000 000 39e-40      C m^2
+atomic unit of magn. dipole moment                     1.854 801 90e-23      0.000 000 16e-23      J T^-1
+atomic unit of magn. flux density                      2.350 517 42e5        0.000 000 20e5        T
+deuteron magn. moment                                  0.433 073 482e-26     0.000 000 038e-26     J T^-1
+deuteron magn. moment to Bohr magneton ratio           0.466 975 4567e-3     0.000 000 0050e-3
+deuteron magn. moment to nuclear magneton ratio        0.857 438 2329        0.000 000 0092
+deuteron-electron magn. moment ratio                   -4.664 345 548e-4     0.000 000 050e-4
+deuteron-proton magn. moment ratio                     0.307 012 2084        0.000 000 0045
+deuteron-neutron magn. moment ratio                    -0.448 206 52         0.000 000 11
+electron gyromagn. ratio                               1.760 859 74e11       0.000 000 15e11       s^-1 T^-1
+electron gyromagn. ratio over 2 pi                     28 024.9532           0.0024                MHz T^-1
+electron magn. moment                                  -928.476 412e-26      0.000 080e-26         J T^-1
+electron magn. moment to Bohr magneton ratio           -1.001 159 652 1859   0.000 000 000 0038
+electron magn. moment to nuclear magneton ratio        -1838.281 971 07      0.000 000 85
+electron magn. moment anomaly                          1.159 652 1859e-3     0.000 000 0038e-3
+electron to shielded proton magn. moment ratio         -658.227 5956         0.000 0071
+electron to shielded helion magn. moment ratio         864.058 255           0.000 010
+electron-deuteron magn. moment ratio                   -2143.923 493         0.000 023
+electron-muon magn. moment ratio                       206.766 9894          0.000 0054
+electron-neutron magn. moment ratio                    960.920 50            0.000 23
+electron-proton magn. moment ratio                     -658.210 6862         0.000 0066
+magn. constant                                         12.566 370 614...e-7  (exact)               N A^-2
+magn. flux quantum                                     2.067 833 72e-15      0.000 000 18e-15      Wb
+muon magn. moment                                      -4.490 447 99e-26     0.000 000 40e-26      J T^-1
+muon magn. moment to Bohr magneton ratio               -4.841 970 45e-3      0.000 000 13e-3
+muon magn. moment to nuclear magneton ratio            -8.890 596 98         0.000 000 23
+muon-proton magn. moment ratio                         -3.183 345 118        0.000 000 089
+neutron gyromagn. ratio                                1.832 471 83e8        0.000 000 46e8        s^-1 T^-1
+neutron gyromagn. ratio over 2 pi                      29.164 6950           0.000 0073            MHz T^-1
+neutron magn. moment                                   -0.966 236 45e-26     0.000 000 24e-26      J T^-1
+neutron magn. moment to Bohr magneton ratio            -1.041 875 63e-3      0.000 000 25e-3
+neutron magn. moment to nuclear magneton ratio         -1.913 042 73         0.000 000 45
+neutron to shielded proton magn. moment ratio          -0.684 996 94         0.000 000 16
+neutron-electron magn. moment ratio                    1.040 668 82e-3       0.000 000 25e-3
+neutron-proton magn. moment ratio                      -0.684 979 34         0.000 000 16
+proton gyromagn. ratio                                 2.675 222 05e8        0.000 000 23e8        s^-1 T^-1
+proton gyromagn. ratio over 2 pi                       42.577 4813           0.000 0037            MHz T^-1
+proton magn. moment                                    1.410 606 71e-26      0.000 000 12e-26      J T^-1
+proton magn. moment to Bohr magneton ratio             1.521 032 206e-3      0.000 000 015e-3
+proton magn. moment to nuclear magneton ratio          2.792 847 351         0.000 000 028
+proton magn. shielding correction                      25.689e-6             0.015e-6
+proton-neutron magn. moment ratio                      -1.459 898 05         0.000 000 34
+shielded helion gyromagn. ratio                        2.037 894 70e8        0.000 000 18e8        s^-1 T^-1
+shielded helion gyromagn. ratio over 2 pi              32.434 1015           0.000 0028            MHz T^-1
+shielded helion magn. moment                           -1.074 553 024e-26    0.000 000 093e-26     J T^-1
+shielded helion magn. moment to Bohr magneton ratio    -1.158 671 474e-3     0.000 000 014e-3
+shielded helion magn. moment to nuclear magneton ratio -2.127 497 723        0.000 000 025
+shielded helion to proton magn. moment ratio           -0.761 766 562        0.000 000 012
+shielded helion to shielded proton magn. moment ratio  -0.761 786 1313       0.000 000 0033
+shielded helion gyromagn. ratio                        2.037 894 70e8        0.000 000 18e8        s^-1 T^-1
+shielded helion gyromagn. ratio over 2 pi              32.434 1015           0.000 0028            MHz T^-1
+shielded proton magn. moment                           1.410 570 47e-26      0.000 000 12e-26      J T^-1
+shielded proton magn. moment to Bohr magneton ratio    1.520 993 132e-3      0.000 000 016e-3
+shielded proton magn. moment to nuclear magneton ratio 2.792 775 604         0.000 000 030
+{220} lattice spacing of silicon                       192.015 5965e-12      0.000 0070e-12        m"""
+
+
+def exact2002(exact):
+    replace = {
+        'magn. constant': 4e-7 * math.pi,
+    }
+    return replace
+
+
+txt2006 = """\
+lattice spacing of silicon                             192.015 5762 e-12     0.000 0050 e-12       m
+alpha particle-electron mass ratio                     7294.299 5365         0.000 0031
+alpha particle mass                                    6.644 656 20 e-27     0.000 000 33 e-27     kg
+alpha particle mass energy equivalent                  5.971 919 17 e-10     0.000 000 30 e-10     J
+alpha particle mass energy equivalent in MeV           3727.379 109          0.000 093             MeV
+alpha particle mass in u                               4.001 506 179 127     0.000 000 000 062     u
+alpha particle molar mass                              4.001 506 179 127 e-3 0.000 000 000 062 e-3 kg mol^-1
+alpha particle-proton mass ratio                       3.972 599 689 51      0.000 000 000 41
+Angstrom star                                          1.000 014 98 e-10     0.000 000 90 e-10     m
+atomic mass constant                                   1.660 538 782 e-27    0.000 000 083 e-27    kg
+atomic mass constant energy equivalent                 1.492 417 830 e-10    0.000 000 074 e-10    J
+atomic mass constant energy equivalent in MeV          931.494 028           0.000 023             MeV
+atomic mass unit-electron volt relationship            931.494 028 e6        0.000 023 e6          eV
+atomic mass unit-hartree relationship                  3.423 177 7149 e7     0.000 000 0049 e7     E_h
+atomic mass unit-hertz relationship                    2.252 342 7369 e23    0.000 000 0032 e23    Hz
+atomic mass unit-inverse meter relationship            7.513 006 671 e14     0.000 000 011 e14     m^-1
+atomic mass unit-joule relationship                    1.492 417 830 e-10    0.000 000 074 e-10    J
+atomic mass unit-kelvin relationship                   1.080 9527 e13        0.000 0019 e13        K
+atomic mass unit-kilogram relationship                 1.660 538 782 e-27    0.000 000 083 e-27    kg
+atomic unit of 1st hyperpolarizability                 3.206 361 533 e-53    0.000 000 081 e-53    C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizability                 6.235 380 95 e-65     0.000 000 31 e-65     C^4 m^4 J^-3
+atomic unit of action                                  1.054 571 628 e-34    0.000 000 053 e-34    J s
+atomic unit of charge                                  1.602 176 487 e-19    0.000 000 040 e-19    C
+atomic unit of charge density                          1.081 202 300 e12     0.000 000 027 e12     C m^-3
+atomic unit of current                                 6.623 617 63 e-3      0.000 000 17 e-3      A
+atomic unit of electric dipole mom.                    8.478 352 81 e-30     0.000 000 21 e-30     C m
+atomic unit of electric field                          5.142 206 32 e11      0.000 000 13 e11      V m^-1
+atomic unit of electric field gradient                 9.717 361 66 e21      0.000 000 24 e21      V m^-2
+atomic unit of electric polarizability                 1.648 777 2536 e-41   0.000 000 0034 e-41   C^2 m^2 J^-1
+atomic unit of electric potential                      27.211 383 86         0.000 000 68          V
+atomic unit of electric quadrupole mom.                4.486 551 07 e-40     0.000 000 11 e-40     C m^2
+atomic unit of energy                                  4.359 743 94 e-18     0.000 000 22 e-18     J
+atomic unit of force                                   8.238 722 06 e-8      0.000 000 41 e-8      N
+atomic unit of length                                  0.529 177 208 59 e-10 0.000 000 000 36 e-10 m
+atomic unit of mag. dipole mom.                        1.854 801 830 e-23    0.000 000 046 e-23    J T^-1
+atomic unit of mag. flux density                       2.350 517 382 e5      0.000 000 059 e5      T
+atomic unit of magnetizability                         7.891 036 433 e-29    0.000 000 027 e-29    J T^-2
+atomic unit of mass                                    9.109 382 15 e-31     0.000 000 45 e-31     kg
+atomic unit of momentum                                1.992 851 565 e-24    0.000 000 099 e-24    kg m s^-1
+atomic unit of permittivity                            1.112 650 056... e-10 (exact)               F m^-1
+atomic unit of time                                    2.418 884 326 505 e-17 0.000 000 000 016 e-17 s
+atomic unit of velocity                                2.187 691 2541 e6     0.000 000 0015 e6     m s^-1
+Avogadro constant                                      6.022 141 79 e23      0.000 000 30 e23      mol^-1
+Bohr magneton                                          927.400 915 e-26      0.000 023 e-26        J T^-1
+Bohr magneton in eV/T                                  5.788 381 7555 e-5    0.000 000 0079 e-5    eV T^-1
+Bohr magneton in Hz/T                                  13.996 246 04 e9      0.000 000 35 e9       Hz T^-1
+Bohr magneton in inverse meters per tesla              46.686 4515           0.000 0012            m^-1 T^-1
+Bohr magneton in K/T                                   0.671 7131            0.000 0012            K T^-1
+Bohr radius                                            0.529 177 208 59 e-10 0.000 000 000 36 e-10 m
+Boltzmann constant                                     1.380 6504 e-23       0.000 0024 e-23       J K^-1
+Boltzmann constant in eV/K                             8.617 343 e-5         0.000 015 e-5         eV K^-1
+Boltzmann constant in Hz/K                             2.083 6644 e10        0.000 0036 e10        Hz K^-1
+Boltzmann constant in inverse meters per kelvin        69.503 56             0.000 12              m^-1 K^-1
+characteristic impedance of vacuum                     376.730 313 461...    (exact)               ohm
+classical electron radius                              2.817 940 2894 e-15   0.000 000 0058 e-15   m
+Compton wavelength                                     2.426 310 2175 e-12   0.000 000 0033 e-12   m
+Compton wavelength over 2 pi                           386.159 264 59 e-15   0.000 000 53 e-15     m
+conductance quantum                                    7.748 091 7004 e-5    0.000 000 0053 e-5    S
+conventional value of Josephson constant               483 597.9 e9          (exact)               Hz V^-1
+conventional value of von Klitzing constant            25 812.807            (exact)               ohm
+Cu x unit                                              1.002 076 99 e-13     0.000 000 28 e-13     m
+deuteron-electron mag. mom. ratio                      -4.664 345 537 e-4    0.000 000 039 e-4
+deuteron-electron mass ratio                           3670.482 9654         0.000 0016
+deuteron g factor                                      0.857 438 2308        0.000 000 0072
+deuteron mag. mom.                                     0.433 073 465 e-26    0.000 000 011 e-26    J T^-1
+deuteron mag. mom. to Bohr magneton ratio              0.466 975 4556 e-3    0.000 000 0039 e-3
+deuteron mag. mom. to nuclear magneton ratio           0.857 438 2308        0.000 000 0072
+deuteron mass                                          3.343 583 20 e-27     0.000 000 17 e-27     kg
+deuteron mass energy equivalent                        3.005 062 72 e-10     0.000 000 15 e-10     J
+deuteron mass energy equivalent in MeV                 1875.612 793          0.000 047             MeV
+deuteron mass in u                                     2.013 553 212 724     0.000 000 000 078     u
+deuteron molar mass                                    2.013 553 212 724 e-3 0.000 000 000 078 e-3 kg mol^-1
+deuteron-neutron mag. mom. ratio                       -0.448 206 52         0.000 000 11
+deuteron-proton mag. mom. ratio                        0.307 012 2070        0.000 000 0024
+deuteron-proton mass ratio                             1.999 007 501 08      0.000 000 000 22
+deuteron rms charge radius                             2.1402 e-15           0.0028 e-15           m
+electric constant                                      8.854 187 817... e-12 (exact)               F m^-1
+electron charge to mass quotient                       -1.758 820 150 e11    0.000 000 044 e11     C kg^-1
+electron-deuteron mag. mom. ratio                      -2143.923 498         0.000 018
+electron-deuteron mass ratio                           2.724 437 1093 e-4    0.000 000 0012 e-4
+electron g factor                                      -2.002 319 304 3622   0.000 000 000 0015
+electron gyromag. ratio                                1.760 859 770 e11     0.000 000 044 e11     s^-1 T^-1
+electron gyromag. ratio over 2 pi                      28 024.953 64         0.000 70              MHz T^-1
+electron mag. mom.                                     -928.476 377 e-26     0.000 023 e-26        J T^-1
+electron mag. mom. anomaly                             1.159 652 181 11 e-3  0.000 000 000 74 e-3
+electron mag. mom. to Bohr magneton ratio              -1.001 159 652 181 11 0.000 000 000 000 74
+electron mag. mom. to nuclear magneton ratio           -1838.281 970 92      0.000 000 80
+electron mass                                          9.109 382 15 e-31     0.000 000 45 e-31     kg
+electron mass energy equivalent                        8.187 104 38 e-14     0.000 000 41 e-14     J
+electron mass energy equivalent in MeV                 0.510 998 910         0.000 000 013         MeV
+electron mass in u                                     5.485 799 0943 e-4    0.000 000 0023 e-4    u
+electron molar mass                                    5.485 799 0943 e-7    0.000 000 0023 e-7    kg mol^-1
+electron-muon mag. mom. ratio                          206.766 9877          0.000 0052
+electron-muon mass ratio                               4.836 331 71 e-3      0.000 000 12 e-3
+electron-neutron mag. mom. ratio                       960.920 50            0.000 23
+electron-neutron mass ratio                            5.438 673 4459 e-4    0.000 000 0033 e-4
+electron-proton mag. mom. ratio                        -658.210 6848         0.000 0054
+electron-proton mass ratio                             5.446 170 2177 e-4    0.000 000 0024 e-4
+electron-tau mass ratio                                2.875 64 e-4          0.000 47 e-4
+electron to alpha particle mass ratio                  1.370 933 555 70 e-4  0.000 000 000 58 e-4
+electron to shielded helion mag. mom. ratio            864.058 257           0.000 010
+electron to shielded proton mag. mom. ratio            -658.227 5971         0.000 0072
+electron volt                                          1.602 176 487 e-19    0.000 000 040 e-19    J
+electron volt-atomic mass unit relationship            1.073 544 188 e-9     0.000 000 027 e-9     u
+electron volt-hartree relationship                     3.674 932 540 e-2     0.000 000 092 e-2     E_h
+electron volt-hertz relationship                       2.417 989 454 e14     0.000 000 060 e14     Hz
+electron volt-inverse meter relationship               8.065 544 65 e5       0.000 000 20 e5       m^-1
+electron volt-joule relationship                       1.602 176 487 e-19    0.000 000 040 e-19    J
+electron volt-kelvin relationship                      1.160 4505 e4         0.000 0020 e4         K
+electron volt-kilogram relationship                    1.782 661 758 e-36    0.000 000 044 e-36    kg
+elementary charge                                      1.602 176 487 e-19    0.000 000 040 e-19    C
+elementary charge over h                               2.417 989 454 e14     0.000 000 060 e14     A J^-1
+Faraday constant                                       96 485.3399           0.0024                C mol^-1
+Faraday constant for conventional electric current     96 485.3401           0.0048                C_90 mol^-1
+Fermi coupling constant                                1.166 37 e-5          0.000 01 e-5          GeV^-2
+fine-structure constant                                7.297 352 5376 e-3    0.000 000 0050 e-3
+first radiation constant                               3.741 771 18 e-16     0.000 000 19 e-16     W m^2
+first radiation constant for spectral radiance         1.191 042 759 e-16    0.000 000 059 e-16    W m^2 sr^-1
+hartree-atomic mass unit relationship                  2.921 262 2986 e-8    0.000 000 0042 e-8    u
+hartree-electron volt relationship                     27.211 383 86         0.000 000 68          eV
+Hartree energy                                         4.359 743 94 e-18     0.000 000 22 e-18     J
+Hartree energy in eV                                   27.211 383 86         0.000 000 68          eV
+hartree-hertz relationship                             6.579 683 920 722 e15 0.000 000 000 044 e15 Hz
+hartree-inverse meter relationship                     2.194 746 313 705 e7  0.000 000 000 015 e7  m^-1
+hartree-joule relationship                             4.359 743 94 e-18     0.000 000 22 e-18     J
+hartree-kelvin relationship                            3.157 7465 e5         0.000 0055 e5         K
+hartree-kilogram relationship                          4.850 869 34 e-35     0.000 000 24 e-35     kg
+helion-electron mass ratio                             5495.885 2765         0.000 0052
+helion mass                                            5.006 411 92 e-27     0.000 000 25 e-27     kg
+helion mass energy equivalent                          4.499 538 64 e-10     0.000 000 22 e-10     J
+helion mass energy equivalent in MeV                   2808.391 383          0.000 070             MeV
+helion mass in u                                       3.014 932 2473        0.000 000 0026        u
+helion molar mass                                      3.014 932 2473 e-3    0.000 000 0026 e-3    kg mol^-1
+helion-proton mass ratio                               2.993 152 6713        0.000 000 0026
+hertz-atomic mass unit relationship                    4.439 821 6294 e-24   0.000 000 0064 e-24   u
+hertz-electron volt relationship                       4.135 667 33 e-15     0.000 000 10 e-15     eV
+hertz-hartree relationship                             1.519 829 846 006 e-16 0.000 000 000010e-16 E_h
+hertz-inverse meter relationship                       3.335 640 951... e-9  (exact)               m^-1
+hertz-joule relationship                               6.626 068 96 e-34     0.000 000 33 e-34     J
+hertz-kelvin relationship                              4.799 2374 e-11       0.000 0084 e-11       K
+hertz-kilogram relationship                            7.372 496 00 e-51     0.000 000 37 e-51     kg
+inverse fine-structure constant                        137.035 999 679       0.000 000 094
+inverse meter-atomic mass unit relationship            1.331 025 0394 e-15   0.000 000 0019 e-15   u
+inverse meter-electron volt relationship               1.239 841 875 e-6     0.000 000 031 e-6     eV
+inverse meter-hartree relationship                     4.556 335 252 760 e-8 0.000 000 000 030 e-8 E_h
+inverse meter-hertz relationship                       299 792 458           (exact)               Hz
+inverse meter-joule relationship                       1.986 445 501 e-25    0.000 000 099 e-25    J
+inverse meter-kelvin relationship                      1.438 7752 e-2        0.000 0025 e-2        K
+inverse meter-kilogram relationship                    2.210 218 70 e-42     0.000 000 11 e-42     kg
+inverse of conductance quantum                         12 906.403 7787       0.000 0088            ohm
+Josephson constant                                     483 597.891 e9        0.012 e9              Hz V^-1
+joule-atomic mass unit relationship                    6.700 536 41 e9       0.000 000 33 e9       u
+joule-electron volt relationship                       6.241 509 65 e18      0.000 000 16 e18      eV
+joule-hartree relationship                             2.293 712 69 e17      0.000 000 11 e17      E_h
+joule-hertz relationship                               1.509 190 450 e33     0.000 000 075 e33     Hz
+joule-inverse meter relationship                       5.034 117 47 e24      0.000 000 25 e24      m^-1
+joule-kelvin relationship                              7.242 963 e22         0.000 013 e22         K
+joule-kilogram relationship                            1.112 650 056... e-17 (exact)               kg
+kelvin-atomic mass unit relationship                   9.251 098 e-14        0.000 016 e-14        u
+kelvin-electron volt relationship                      8.617 343 e-5         0.000 015 e-5         eV
+kelvin-hartree relationship                            3.166 8153 e-6        0.000 0055 e-6        E_h
+kelvin-hertz relationship                              2.083 6644 e10        0.000 0036 e10        Hz
+kelvin-inverse meter relationship                      69.503 56             0.000 12              m^-1
+kelvin-joule relationship                              1.380 6504 e-23       0.000 0024 e-23       J
+kelvin-kilogram relationship                           1.536 1807 e-40       0.000 0027 e-40       kg
+kilogram-atomic mass unit relationship                 6.022 141 79 e26      0.000 000 30 e26      u
+kilogram-electron volt relationship                    5.609 589 12 e35      0.000 000 14 e35      eV
+kilogram-hartree relationship                          2.061 486 16 e34      0.000 000 10 e34      E_h
+kilogram-hertz relationship                            1.356 392 733 e50     0.000 000 068 e50     Hz
+kilogram-inverse meter relationship                    4.524 439 15 e41      0.000 000 23 e41      m^-1
+kilogram-joule relationship                            8.987 551 787... e16  (exact)               J
+kilogram-kelvin relationship                           6.509 651 e39         0.000 011 e39         K
+lattice parameter of silicon                           543.102 064 e-12      0.000 014 e-12        m
+Loschmidt constant (273.15 K, 101.325 kPa)             2.686 7774 e25        0.000 0047 e25        m^-3
+mag. constant                                          12.566 370 614... e-7 (exact)               N A^-2
+mag. flux quantum                                      2.067 833 667 e-15    0.000 000 052 e-15    Wb
+molar gas constant                                     8.314 472             0.000 015             J mol^-1 K^-1
+molar mass constant                                    1 e-3                 (exact)               kg mol^-1
+molar mass of carbon-12                                12 e-3                (exact)               kg mol^-1
+molar Planck constant                                  3.990 312 6821 e-10   0.000 000 0057 e-10   J s mol^-1
+molar Planck constant times c                          0.119 626 564 72      0.000 000 000 17      J m mol^-1
+molar volume of ideal gas (273.15 K, 100 kPa)          22.710 981 e-3        0.000 040 e-3         m^3 mol^-1
+molar volume of ideal gas (273.15 K, 101.325 kPa)      22.413 996 e-3        0.000 039 e-3         m^3 mol^-1
+molar volume of silicon                                12.058 8349 e-6       0.000 0011 e-6        m^3 mol^-1
+Mo x unit                                              1.002 099 55 e-13     0.000 000 53 e-13     m
+muon Compton wavelength                                11.734 441 04 e-15    0.000 000 30 e-15     m
+muon Compton wavelength over 2 pi                      1.867 594 295 e-15    0.000 000 047 e-15    m
+muon-electron mass ratio                               206.768 2823          0.000 0052
+muon g factor                                          -2.002 331 8414       0.000 000 0012
+muon mag. mom.                                         -4.490 447 86 e-26    0.000 000 16 e-26     J T^-1
+muon mag. mom. anomaly                                 1.165 920 69 e-3      0.000 000 60 e-3
+muon mag. mom. to Bohr magneton ratio                  -4.841 970 49 e-3     0.000 000 12 e-3
+muon mag. mom. to nuclear magneton ratio               -8.890 597 05         0.000 000 23
+muon mass                                              1.883 531 30 e-28     0.000 000 11 e-28     kg
+muon mass energy equivalent                            1.692 833 510 e-11    0.000 000 095 e-11    J
+muon mass energy equivalent in MeV                     105.658 3668          0.000 0038            MeV
+muon mass in u                                         0.113 428 9256        0.000 000 0029        u
+muon molar mass                                        0.113 428 9256 e-3    0.000 000 0029 e-3    kg mol^-1
+muon-neutron mass ratio                                0.112 454 5167        0.000 000 0029
+muon-proton mag. mom. ratio                            -3.183 345 137        0.000 000 085
+muon-proton mass ratio                                 0.112 609 5261        0.000 000 0029
+muon-tau mass ratio                                    5.945 92 e-2          0.000 97 e-2
+natural unit of action                                 1.054 571 628 e-34    0.000 000 053 e-34    J s
+natural unit of action in eV s                         6.582 118 99 e-16     0.000 000 16 e-16     eV s
+natural unit of energy                                 8.187 104 38 e-14     0.000 000 41 e-14     J
+natural unit of energy in MeV                          0.510 998 910         0.000 000 013         MeV
+natural unit of length                                 386.159 264 59 e-15   0.000 000 53 e-15     m
+natural unit of mass                                   9.109 382 15 e-31     0.000 000 45 e-31     kg
+natural unit of momentum                               2.730 924 06 e-22     0.000 000 14 e-22     kg m s^-1
+natural unit of momentum in MeV/c                      0.510 998 910         0.000 000 013         MeV/c
+natural unit of time                                   1.288 088 6570 e-21   0.000 000 0018 e-21   s
+natural unit of velocity                               299 792 458           (exact)               m s^-1
+neutron Compton wavelength                             1.319 590 8951 e-15   0.000 000 0020 e-15   m
+neutron Compton wavelength over 2 pi                   0.210 019 413 82 e-15 0.000 000 000 31 e-15 m
+neutron-electron mag. mom. ratio                       1.040 668 82 e-3      0.000 000 25 e-3
+neutron-electron mass ratio                            1838.683 6605         0.000 0011
+neutron g factor                                       -3.826 085 45         0.000 000 90
+neutron gyromag. ratio                                 1.832 471 85 e8       0.000 000 43 e8       s^-1 T^-1
+neutron gyromag. ratio over 2 pi                       29.164 6954           0.000 0069            MHz T^-1
+neutron mag. mom.                                      -0.966 236 41 e-26    0.000 000 23 e-26     J T^-1
+neutron mag. mom. to Bohr magneton ratio               -1.041 875 63 e-3     0.000 000 25 e-3
+neutron mag. mom. to nuclear magneton ratio            -1.913 042 73         0.000 000 45
+neutron mass                                           1.674 927 211 e-27    0.000 000 084 e-27    kg
+neutron mass energy equivalent                         1.505 349 505 e-10    0.000 000 075 e-10    J
+neutron mass energy equivalent in MeV                  939.565 346           0.000 023             MeV
+neutron mass in u                                      1.008 664 915 97      0.000 000 000 43      u
+neutron molar mass                                     1.008 664 915 97 e-3  0.000 000 000 43 e-3  kg mol^-1
+neutron-muon mass ratio                                8.892 484 09          0.000 000 23
+neutron-proton mag. mom. ratio                         -0.684 979 34         0.000 000 16
+neutron-proton mass ratio                              1.001 378 419 18      0.000 000 000 46
+neutron-tau mass ratio                                 0.528 740             0.000 086
+neutron to shielded proton mag. mom. ratio             -0.684 996 94         0.000 000 16
+Newtonian constant of gravitation                      6.674 28 e-11         0.000 67 e-11         m^3 kg^-1 s^-2
+Newtonian constant of gravitation over h-bar c         6.708 81 e-39         0.000 67 e-39         (GeV/c^2)^-2
+nuclear magneton                                       5.050 783 24 e-27     0.000 000 13 e-27     J T^-1
+nuclear magneton in eV/T                               3.152 451 2326 e-8    0.000 000 0045 e-8    eV T^-1
+nuclear magneton in inverse meters per tesla           2.542 623 616 e-2     0.000 000 064 e-2     m^-1 T^-1
+nuclear magneton in K/T                                3.658 2637 e-4        0.000 0064 e-4        K T^-1
+nuclear magneton in MHz/T                              7.622 593 84          0.000 000 19          MHz T^-1
+Planck constant                                        6.626 068 96 e-34     0.000 000 33 e-34     J s
+Planck constant in eV s                                4.135 667 33 e-15     0.000 000 10 e-15     eV s
+Planck constant over 2 pi                              1.054 571 628 e-34    0.000 000 053 e-34    J s
+Planck constant over 2 pi in eV s                      6.582 118 99 e-16     0.000 000 16 e-16     eV s
+Planck constant over 2 pi times c in MeV fm            197.326 9631          0.000 0049            MeV fm
+Planck length                                          1.616 252 e-35        0.000 081 e-35        m
+Planck mass                                            2.176 44 e-8          0.000 11 e-8          kg
+Planck mass energy equivalent in GeV                   1.220 892 e19         0.000 061 e19         GeV
+Planck temperature                                     1.416 785 e32         0.000 071 e32         K
+Planck time                                            5.391 24 e-44         0.000 27 e-44         s
+proton charge to mass quotient                         9.578 833 92 e7       0.000 000 24 e7       C kg^-1
+proton Compton wavelength                              1.321 409 8446 e-15   0.000 000 0019 e-15   m
+proton Compton wavelength over 2 pi                    0.210 308 908 61 e-15 0.000 000 000 30 e-15 m
+proton-electron mass ratio                             1836.152 672 47       0.000 000 80
+proton g factor                                        5.585 694 713         0.000 000 046
+proton gyromag. ratio                                  2.675 222 099 e8      0.000 000 070 e8      s^-1 T^-1
+proton gyromag. ratio over 2 pi                        42.577 4821           0.000 0011            MHz T^-1
+proton mag. mom.                                       1.410 606 662 e-26    0.000 000 037 e-26    J T^-1
+proton mag. mom. to Bohr magneton ratio                1.521 032 209 e-3     0.000 000 012 e-3
+proton mag. mom. to nuclear magneton ratio             2.792 847 356         0.000 000 023
+proton mag. shielding correction                       25.694 e-6            0.014 e-6
+proton mass                                            1.672 621 637 e-27    0.000 000 083 e-27    kg
+proton mass energy equivalent                          1.503 277 359 e-10    0.000 000 075 e-10    J
+proton mass energy equivalent in MeV                   938.272 013           0.000 023             MeV
+proton mass in u                                       1.007 276 466 77      0.000 000 000 10      u
+proton molar mass                                      1.007 276 466 77 e-3  0.000 000 000 10 e-3  kg mol^-1
+proton-muon mass ratio                                 8.880 243 39          0.000 000 23
+proton-neutron mag. mom. ratio                         -1.459 898 06         0.000 000 34
+proton-neutron mass ratio                              0.998 623 478 24      0.000 000 000 46
+proton rms charge radius                               0.8768 e-15           0.0069 e-15           m
+proton-tau mass ratio                                  0.528 012             0.000 086
+quantum of circulation                                 3.636 947 5199 e-4    0.000 000 0050 e-4    m^2 s^-1
+quantum of circulation times 2                         7.273 895 040 e-4     0.000 000 010 e-4     m^2 s^-1
+Rydberg constant                                       10 973 731.568 527    0.000 073             m^-1
+Rydberg constant times c in Hz                         3.289 841 960 361 e15 0.000 000 000 022 e15 Hz
+Rydberg constant times hc in eV                        13.605 691 93         0.000 000 34          eV
+Rydberg constant times hc in J                         2.179 871 97 e-18     0.000 000 11 e-18     J
+Sackur-Tetrode constant (1 K, 100 kPa)                 -1.151 7047           0.000 0044
+Sackur-Tetrode constant (1 K, 101.325 kPa)             -1.164 8677           0.000 0044
+second radiation constant                              1.438 7752 e-2        0.000 0025 e-2        m K
+shielded helion gyromag. ratio                         2.037 894 730 e8      0.000 000 056 e8      s^-1 T^-1
+shielded helion gyromag. ratio over 2 pi               32.434 101 98         0.000 000 90          MHz T^-1
+shielded helion mag. mom.                              -1.074 552 982 e-26   0.000 000 030 e-26    J T^-1
+shielded helion mag. mom. to Bohr magneton ratio       -1.158 671 471 e-3    0.000 000 014 e-3
+shielded helion mag. mom. to nuclear magneton ratio    -2.127 497 718        0.000 000 025
+shielded helion to proton mag. mom. ratio              -0.761 766 558        0.000 000 011
+shielded helion to shielded proton mag. mom. ratio     -0.761 786 1313       0.000 000 0033
+shielded proton gyromag. ratio                         2.675 153 362 e8      0.000 000 073 e8      s^-1 T^-1
+shielded proton gyromag. ratio over 2 pi               42.576 3881           0.000 0012            MHz T^-1
+shielded proton mag. mom.                              1.410 570 419 e-26    0.000 000 038 e-26    J T^-1
+shielded proton mag. mom. to Bohr magneton ratio       1.520 993 128 e-3     0.000 000 017 e-3
+shielded proton mag. mom. to nuclear magneton ratio    2.792 775 598         0.000 000 030
+speed of light in vacuum                               299 792 458           (exact)               m s^-1
+standard acceleration of gravity                       9.806 65              (exact)               m s^-2
+standard atmosphere                                    101 325               (exact)               Pa
+Stefan-Boltzmann constant                              5.670 400 e-8         0.000 040 e-8         W m^-2 K^-4
+tau Compton wavelength                                 0.697 72 e-15         0.000 11 e-15         m
+tau Compton wavelength over 2 pi                       0.111 046 e-15        0.000 018 e-15        m
+tau-electron mass ratio                                3477.48               0.57
+tau mass                                               3.167 77 e-27         0.000 52 e-27         kg
+tau mass energy equivalent                             2.847 05 e-10         0.000 46 e-10         J
+tau mass energy equivalent in MeV                      1776.99               0.29                  MeV
+tau mass in u                                          1.907 68              0.000 31              u
+tau molar mass                                         1.907 68 e-3          0.000 31 e-3          kg mol^-1
+tau-muon mass ratio                                    16.8183               0.0027
+tau-neutron mass ratio                                 1.891 29              0.000 31
+tau-proton mass ratio                                  1.893 90              0.000 31
+Thomson cross section                                  0.665 245 8558 e-28   0.000 000 0027 e-28   m^2
+triton-electron mag. mom. ratio                        -1.620 514 423 e-3    0.000 000 021 e-3
+triton-electron mass ratio                             5496.921 5269         0.000 0051
+triton g factor                                        5.957 924 896         0.000 000 076
+triton mag. mom.                                       1.504 609 361 e-26    0.000 000 042 e-26    J T^-1
+triton mag. mom. to Bohr magneton ratio                1.622 393 657 e-3     0.000 000 021 e-3
+triton mag. mom. to nuclear magneton ratio             2.978 962 448         0.000 000 038
+triton mass                                            5.007 355 88 e-27     0.000 000 25 e-27     kg
+triton mass energy equivalent                          4.500 387 03 e-10     0.000 000 22 e-10     J
+triton mass energy equivalent in MeV                   2808.920 906          0.000 070             MeV
+triton mass in u                                       3.015 500 7134        0.000 000 0025        u
+triton molar mass                                      3.015 500 7134 e-3    0.000 000 0025 e-3    kg mol^-1
+triton-neutron mag. mom. ratio                         -1.557 185 53         0.000 000 37
+triton-proton mag. mom. ratio                          1.066 639 908         0.000 000 010
+triton-proton mass ratio                               2.993 717 0309        0.000 000 0025
+unified atomic mass unit                               1.660 538 782 e-27    0.000 000 083 e-27    kg
+von Klitzing constant                                  25 812.807 557        0.000 018             ohm
+weak mixing angle                                      0.222 55              0.000 56
+Wien frequency displacement law constant               5.878 933 e10         0.000 010 e10         Hz K^-1
+Wien wavelength displacement law constant              2.897 7685 e-3        0.000 0051 e-3        m K"""
+
+
+def exact2006(exact):
+    mu0 = 4e-7 * math.pi
+    c = exact['speed of light in vacuum']
+    epsilon0 = 1 / (mu0 * c**2)
+    replace = {
+        'mag. constant': mu0,
+        'electric constant': epsilon0,
+        'atomic unit of permittivity': 4*math.pi*epsilon0,
+        'characteristic impedance of vacuum': math.sqrt(mu0 / epsilon0),
+        'hertz-inverse meter relationship': 1/c,
+        'joule-kilogram relationship': 1/c**2,
+        'kilogram-joule relationship': c**2,
+    }
+    return replace
+
+
+txt2010 = """\
+{220} lattice spacing of silicon                       192.015 5714 e-12     0.000 0032 e-12       m
+alpha particle-electron mass ratio                     7294.299 5361         0.000 0029
+alpha particle mass                                    6.644 656 75 e-27     0.000 000 29 e-27     kg
+alpha particle mass energy equivalent                  5.971 919 67 e-10     0.000 000 26 e-10     J
+alpha particle mass energy equivalent in MeV           3727.379 240          0.000 082             MeV
+alpha particle mass in u                               4.001 506 179 125     0.000 000 000 062     u
+alpha particle molar mass                              4.001 506 179 125 e-3 0.000 000 000 062 e-3 kg mol^-1
+alpha particle-proton mass ratio                       3.972 599 689 33      0.000 000 000 36
+Angstrom star                                          1.000 014 95 e-10     0.000 000 90 e-10     m
+atomic mass constant                                   1.660 538 921 e-27    0.000 000 073 e-27    kg
+atomic mass constant energy equivalent                 1.492 417 954 e-10    0.000 000 066 e-10    J
+atomic mass constant energy equivalent in MeV          931.494 061           0.000 021             MeV
+atomic mass unit-electron volt relationship            931.494 061 e6        0.000 021 e6          eV
+atomic mass unit-hartree relationship                  3.423 177 6845 e7     0.000 000 0024 e7     E_h
+atomic mass unit-hertz relationship                    2.252 342 7168 e23    0.000 000 0016 e23    Hz
+atomic mass unit-inverse meter relationship            7.513 006 6042 e14    0.000 000 0053 e14    m^-1
+atomic mass unit-joule relationship                    1.492 417 954 e-10    0.000 000 066 e-10    J
+atomic mass unit-kelvin relationship                   1.080 954 08 e13      0.000 000 98 e13      K
+atomic mass unit-kilogram relationship                 1.660 538 921 e-27    0.000 000 073 e-27    kg
+atomic unit of 1st hyperpolarizability                 3.206 361 449 e-53    0.000 000 071 e-53    C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizability                 6.235 380 54 e-65     0.000 000 28 e-65     C^4 m^4 J^-3
+atomic unit of action                                  1.054 571 726 e-34    0.000 000 047 e-34    J s
+atomic unit of charge                                  1.602 176 565 e-19    0.000 000 035 e-19    C
+atomic unit of charge density                          1.081 202 338 e12     0.000 000 024 e12     C m^-3
+atomic unit of current                                 6.623 617 95 e-3      0.000 000 15 e-3      A
+atomic unit of electric dipole mom.                    8.478 353 26 e-30     0.000 000 19 e-30     C m
+atomic unit of electric field                          5.142 206 52 e11      0.000 000 11 e11      V m^-1
+atomic unit of electric field gradient                 9.717 362 00 e21      0.000 000 21 e21      V m^-2
+atomic unit of electric polarizability                 1.648 777 2754 e-41   0.000 000 0016 e-41   C^2 m^2 J^-1
+atomic unit of electric potential                      27.211 385 05         0.000 000 60          V
+atomic unit of electric quadrupole mom.                4.486 551 331 e-40    0.000 000 099 e-40    C m^2
+atomic unit of energy                                  4.359 744 34 e-18     0.000 000 19 e-18     J
+atomic unit of force                                   8.238 722 78 e-8      0.000 000 36 e-8      N
+atomic unit of length                                  0.529 177 210 92 e-10 0.000 000 000 17 e-10 m
+atomic unit of mag. dipole mom.                        1.854 801 936 e-23    0.000 000 041 e-23    J T^-1
+atomic unit of mag. flux density                       2.350 517 464 e5      0.000 000 052 e5      T
+atomic unit of magnetizability                         7.891 036 607 e-29    0.000 000 013 e-29    J T^-2
+atomic unit of mass                                    9.109 382 91 e-31     0.000 000 40 e-31     kg
+atomic unit of mom.um                                  1.992 851 740 e-24    0.000 000 088 e-24    kg m s^-1
+atomic unit of permittivity                            1.112 650 056... e-10 (exact)               F m^-1
+atomic unit of time                                    2.418 884 326 502e-17 0.000 000 000 012e-17 s
+atomic unit of velocity                                2.187 691 263 79 e6   0.000 000 000 71 e6   m s^-1
+Avogadro constant                                      6.022 141 29 e23      0.000 000 27 e23      mol^-1
+Bohr magneton                                          927.400 968 e-26      0.000 020 e-26        J T^-1
+Bohr magneton in eV/T                                  5.788 381 8066 e-5    0.000 000 0038 e-5    eV T^-1
+Bohr magneton in Hz/T                                  13.996 245 55 e9      0.000 000 31 e9       Hz T^-1
+Bohr magneton in inverse meters per tesla              46.686 4498           0.000 0010            m^-1 T^-1
+Bohr magneton in K/T                                   0.671 713 88          0.000 000 61          K T^-1
+Bohr radius                                            0.529 177 210 92 e-10 0.000 000 000 17 e-10 m
+Boltzmann constant                                     1.380 6488 e-23       0.000 0013 e-23       J K^-1
+Boltzmann constant in eV/K                             8.617 3324 e-5        0.000 0078 e-5        eV K^-1
+Boltzmann constant in Hz/K                             2.083 6618 e10        0.000 0019 e10        Hz K^-1
+Boltzmann constant in inverse meters per kelvin        69.503 476            0.000 063             m^-1 K^-1
+characteristic impedance of vacuum                     376.730 313 461...    (exact)               ohm
+classical electron radius                              2.817 940 3267 e-15   0.000 000 0027 e-15   m
+Compton wavelength                                     2.426 310 2389 e-12   0.000 000 0016 e-12   m
+Compton wavelength over 2 pi                           386.159 268 00 e-15   0.000 000 25 e-15     m
+conductance quantum                                    7.748 091 7346 e-5    0.000 000 0025 e-5    S
+conventional value of Josephson constant               483 597.9 e9          (exact)               Hz V^-1
+conventional value of von Klitzing constant            25 812.807            (exact)               ohm
+Cu x unit                                              1.002 076 97 e-13     0.000 000 28 e-13     m
+deuteron-electron mag. mom. ratio                      -4.664 345 537 e-4    0.000 000 039 e-4
+deuteron-electron mass ratio                           3670.482 9652         0.000 0015
+deuteron g factor                                      0.857 438 2308        0.000 000 0072
+deuteron mag. mom.                                     0.433 073 489 e-26    0.000 000 010 e-26    J T^-1
+deuteron mag. mom. to Bohr magneton ratio              0.466 975 4556 e-3    0.000 000 0039 e-3
+deuteron mag. mom. to nuclear magneton ratio           0.857 438 2308        0.000 000 0072
+deuteron mass                                          3.343 583 48 e-27     0.000 000 15 e-27     kg
+deuteron mass energy equivalent                        3.005 062 97 e-10     0.000 000 13 e-10     J
+deuteron mass energy equivalent in MeV                 1875.612 859          0.000 041             MeV
+deuteron mass in u                                     2.013 553 212 712     0.000 000 000 077     u
+deuteron molar mass                                    2.013 553 212 712 e-3 0.000 000 000 077 e-3 kg mol^-1
+deuteron-neutron mag. mom. ratio                       -0.448 206 52         0.000 000 11
+deuteron-proton mag. mom. ratio                        0.307 012 2070        0.000 000 0024
+deuteron-proton mass ratio                             1.999 007 500 97      0.000 000 000 18
+deuteron rms charge radius                             2.1424 e-15           0.0021 e-15           m
+electric constant                                      8.854 187 817... e-12 (exact)               F m^-1
+electron charge to mass quotient                       -1.758 820 088 e11    0.000 000 039 e11     C kg^-1
+electron-deuteron mag. mom. ratio                      -2143.923 498         0.000 018
+electron-deuteron mass ratio                           2.724 437 1095 e-4    0.000 000 0011 e-4
+electron g factor                                      -2.002 319 304 361 53 0.000 000 000 000 53
+electron gyromag. ratio                                1.760 859 708 e11     0.000 000 039 e11     s^-1 T^-1
+electron gyromag. ratio over 2 pi                      28 024.952 66         0.000 62              MHz T^-1
+electron-helion mass ratio                             1.819 543 0761 e-4    0.000 000 0017 e-4
+electron mag. mom.                                     -928.476 430 e-26     0.000 021 e-26        J T^-1
+electron mag. mom. anomaly                             1.159 652 180 76 e-3  0.000 000 000 27 e-3
+electron mag. mom. to Bohr magneton ratio              -1.001 159 652 180 76 0.000 000 000 000 27
+electron mag. mom. to nuclear magneton ratio           -1838.281 970 90      0.000 000 75
+electron mass                                          9.109 382 91 e-31     0.000 000 40 e-31     kg
+electron mass energy equivalent                        8.187 105 06 e-14     0.000 000 36 e-14     J
+electron mass energy equivalent in MeV                 0.510 998 928         0.000 000 011         MeV
+electron mass in u                                     5.485 799 0946 e-4    0.000 000 0022 e-4    u
+electron molar mass                                    5.485 799 0946 e-7    0.000 000 0022 e-7    kg mol^-1
+electron-muon mag. mom. ratio                          206.766 9896          0.000 0052
+electron-muon mass ratio                               4.836 331 66 e-3      0.000 000 12 e-3
+electron-neutron mag. mom. ratio                       960.920 50            0.000 23
+electron-neutron mass ratio                            5.438 673 4461 e-4    0.000 000 0032 e-4
+electron-proton mag. mom. ratio                        -658.210 6848         0.000 0054
+electron-proton mass ratio                             5.446 170 2178 e-4    0.000 000 0022 e-4
+electron-tau mass ratio                                2.875 92 e-4          0.000 26 e-4
+electron to alpha particle mass ratio                  1.370 933 555 78 e-4  0.000 000 000 55 e-4
+electron to shielded helion mag. mom. ratio            864.058 257           0.000 010
+electron to shielded proton mag. mom. ratio            -658.227 5971         0.000 0072
+electron-triton mass ratio                             1.819 200 0653 e-4    0.000 000 0017 e-4
+electron volt                                          1.602 176 565 e-19    0.000 000 035 e-19    J
+electron volt-atomic mass unit relationship            1.073 544 150 e-9     0.000 000 024 e-9     u
+electron volt-hartree relationship                     3.674 932 379 e-2     0.000 000 081 e-2     E_h
+electron volt-hertz relationship                       2.417 989 348 e14     0.000 000 053 e14     Hz
+electron volt-inverse meter relationship               8.065 544 29 e5       0.000 000 18 e5       m^-1
+electron volt-joule relationship                       1.602 176 565 e-19    0.000 000 035 e-19    J
+electron volt-kelvin relationship                      1.160 4519 e4         0.000 0011 e4         K
+electron volt-kilogram relationship                    1.782 661 845 e-36    0.000 000 039 e-36    kg
+elementary charge                                      1.602 176 565 e-19    0.000 000 035 e-19    C
+elementary charge over h                               2.417 989 348 e14     0.000 000 053 e14     A J^-1
+Faraday constant                                       96 485.3365           0.0021                C mol^-1
+Faraday constant for conventional electric current     96 485.3321           0.0043                C_90 mol^-1
+Fermi coupling constant                                1.166 364 e-5         0.000 005 e-5         GeV^-2
+fine-structure constant                                7.297 352 5698 e-3    0.000 000 0024 e-3
+first radiation constant                               3.741 771 53 e-16     0.000 000 17 e-16     W m^2
+first radiation constant for spectral radiance         1.191 042 869 e-16    0.000 000 053 e-16    W m^2 sr^-1
+hartree-atomic mass unit relationship                  2.921 262 3246 e-8    0.000 000 0021 e-8    u
+hartree-electron volt relationship                     27.211 385 05         0.000 000 60          eV
+Hartree energy                                         4.359 744 34 e-18     0.000 000 19 e-18     J
+Hartree energy in eV                                   27.211 385 05         0.000 000 60          eV
+hartree-hertz relationship                             6.579 683 920 729 e15 0.000 000 000 033 e15 Hz
+hartree-inverse meter relationship                     2.194 746 313 708 e7  0.000 000 000 011 e7  m^-1
+hartree-joule relationship                             4.359 744 34 e-18     0.000 000 19 e-18     J
+hartree-kelvin relationship                            3.157 7504 e5         0.000 0029 e5         K
+hartree-kilogram relationship                          4.850 869 79 e-35     0.000 000 21 e-35     kg
+helion-electron mass ratio                             5495.885 2754         0.000 0050
+helion g factor                                        -4.255 250 613        0.000 000 050
+helion mag. mom.                                       -1.074 617 486 e-26   0.000 000 027 e-26    J T^-1
+helion mag. mom. to Bohr magneton ratio                -1.158 740 958 e-3    0.000 000 014 e-3
+helion mag. mom. to nuclear magneton ratio             -2.127 625 306        0.000 000 025
+helion mass                                            5.006 412 34 e-27     0.000 000 22 e-27     kg
+helion mass energy equivalent                          4.499 539 02 e-10     0.000 000 20 e-10     J
+helion mass energy equivalent in MeV                   2808.391 482          0.000 062             MeV
+helion mass in u                                       3.014 932 2468        0.000 000 0025        u
+helion molar mass                                      3.014 932 2468 e-3    0.000 000 0025 e-3    kg mol^-1
+helion-proton mass ratio                               2.993 152 6707        0.000 000 0025
+hertz-atomic mass unit relationship                    4.439 821 6689 e-24   0.000 000 0031 e-24   u
+hertz-electron volt relationship                       4.135 667 516 e-15    0.000 000 091 e-15    eV
+hertz-hartree relationship                             1.519 829 8460045e-16 0.000 000 0000076e-16 E_h
+hertz-inverse meter relationship                       3.335 640 951... e-9  (exact)               m^-1
+hertz-joule relationship                               6.626 069 57 e-34     0.000 000 29 e-34     J
+hertz-kelvin relationship                              4.799 2434 e-11       0.000 0044 e-11       K
+hertz-kilogram relationship                            7.372 496 68 e-51     0.000 000 33 e-51     kg
+inverse fine-structure constant                        137.035 999 074       0.000 000 044
+inverse meter-atomic mass unit relationship            1.331 025 051 20 e-15 0.000 000 000 94 e-15 u
+inverse meter-electron volt relationship               1.239 841 930 e-6     0.000 000 027 e-6     eV
+inverse meter-hartree relationship                     4.556 335 252 755 e-8 0.000 000 000 023 e-8 E_h
+inverse meter-hertz relationship                       299 792 458           (exact)               Hz
+inverse meter-joule relationship                       1.986 445 684 e-25    0.000 000 088 e-25    J
+inverse meter-kelvin relationship                      1.438 7770 e-2        0.000 0013 e-2        K
+inverse meter-kilogram relationship                    2.210 218 902 e-42    0.000 000 098 e-42    kg
+inverse of conductance quantum                         12 906.403 7217       0.000 0042            ohm
+Josephson constant                                     483 597.870 e9        0.011 e9              Hz V^-1
+joule-atomic mass unit relationship                    6.700 535 85 e9       0.000 000 30 e9       u
+joule-electron volt relationship                       6.241 509 34 e18      0.000 000 14 e18      eV
+joule-hartree relationship                             2.293 712 48 e17      0.000 000 10 e17      E_h
+joule-hertz relationship                               1.509 190 311 e33     0.000 000 067 e33     Hz
+joule-inverse meter relationship                       5.034 117 01 e24      0.000 000 22 e24      m^-1
+joule-kelvin relationship                              7.242 9716 e22        0.000 0066 e22        K
+joule-kilogram relationship                            1.112 650 056... e-17 (exact)               kg
+kelvin-atomic mass unit relationship                   9.251 0868 e-14       0.000 0084 e-14       u
+kelvin-electron volt relationship                      8.617 3324 e-5        0.000 0078 e-5        eV
+kelvin-hartree relationship                            3.166 8114 e-6        0.000 0029 e-6        E_h
+kelvin-hertz relationship                              2.083 6618 e10        0.000 0019 e10        Hz
+kelvin-inverse meter relationship                      69.503 476            0.000 063             m^-1
+kelvin-joule relationship                              1.380 6488 e-23       0.000 0013 e-23       J
+kelvin-kilogram relationship                           1.536 1790 e-40       0.000 0014 e-40       kg
+kilogram-atomic mass unit relationship                 6.022 141 29 e26      0.000 000 27 e26      u
+kilogram-electron volt relationship                    5.609 588 85 e35      0.000 000 12 e35      eV
+kilogram-hartree relationship                          2.061 485 968 e34     0.000 000 091 e34     E_h
+kilogram-hertz relationship                            1.356 392 608 e50     0.000 000 060 e50     Hz
+kilogram-inverse meter relationship                    4.524 438 73 e41      0.000 000 20 e41      m^-1
+kilogram-joule relationship                            8.987 551 787... e16  (exact)               J
+kilogram-kelvin relationship                           6.509 6582 e39        0.000 0059 e39        K
+lattice parameter of silicon                           543.102 0504 e-12     0.000 0089 e-12       m
+Loschmidt constant (273.15 K, 100 kPa)                 2.651 6462 e25        0.000 0024 e25        m^-3
+Loschmidt constant (273.15 K, 101.325 kPa)             2.686 7805 e25        0.000 0024 e25        m^-3
+mag. constant                                          12.566 370 614... e-7 (exact)               N A^-2
+mag. flux quantum                                      2.067 833 758 e-15    0.000 000 046 e-15    Wb
+molar gas constant                                     8.314 4621            0.000 0075            J mol^-1 K^-1
+molar mass constant                                    1 e-3                 (exact)               kg mol^-1
+molar mass of carbon-12                                12 e-3                (exact)               kg mol^-1
+molar Planck constant                                  3.990 312 7176 e-10   0.000 000 0028 e-10   J s mol^-1
+molar Planck constant times c                          0.119 626 565 779     0.000 000 000 084     J m mol^-1
+molar volume of ideal gas (273.15 K, 100 kPa)          22.710 953 e-3        0.000 021 e-3         m^3 mol^-1
+molar volume of ideal gas (273.15 K, 101.325 kPa)      22.413 968 e-3        0.000 020 e-3         m^3 mol^-1
+molar volume of silicon                                12.058 833 01 e-6     0.000 000 80 e-6      m^3 mol^-1
+Mo x unit                                              1.002 099 52 e-13     0.000 000 53 e-13     m
+muon Compton wavelength                                11.734 441 03 e-15    0.000 000 30 e-15     m
+muon Compton wavelength over 2 pi                      1.867 594 294 e-15    0.000 000 047 e-15    m
+muon-electron mass ratio                               206.768 2843          0.000 0052
+muon g factor                                          -2.002 331 8418       0.000 000 0013
+muon mag. mom.                                         -4.490 448 07 e-26    0.000 000 15 e-26     J T^-1
+muon mag. mom. anomaly                                 1.165 920 91 e-3      0.000 000 63 e-3
+muon mag. mom. to Bohr magneton ratio                  -4.841 970 44 e-3     0.000 000 12 e-3
+muon mag. mom. to nuclear magneton ratio               -8.890 596 97         0.000 000 22
+muon mass                                              1.883 531 475 e-28    0.000 000 096 e-28    kg
+muon mass energy equivalent                            1.692 833 667 e-11    0.000 000 086 e-11    J
+muon mass energy equivalent in MeV                     105.658 3715          0.000 0035            MeV
+muon mass in u                                         0.113 428 9267        0.000 000 0029        u
+muon molar mass                                        0.113 428 9267 e-3    0.000 000 0029 e-3    kg mol^-1
+muon-neutron mass ratio                                0.112 454 5177        0.000 000 0028
+muon-proton mag. mom. ratio                            -3.183 345 107        0.000 000 084
+muon-proton mass ratio                                 0.112 609 5272        0.000 000 0028
+muon-tau mass ratio                                    5.946 49 e-2          0.000 54 e-2
+natural unit of action                                 1.054 571 726 e-34    0.000 000 047 e-34    J s
+natural unit of action in eV s                         6.582 119 28 e-16     0.000 000 15 e-16     eV s
+natural unit of energy                                 8.187 105 06 e-14     0.000 000 36 e-14     J
+natural unit of energy in MeV                          0.510 998 928         0.000 000 011         MeV
+natural unit of length                                 386.159 268 00 e-15   0.000 000 25 e-15     m
+natural unit of mass                                   9.109 382 91 e-31     0.000 000 40 e-31     kg
+natural unit of mom.um                                 2.730 924 29 e-22     0.000 000 12 e-22     kg m s^-1
+natural unit of mom.um in MeV/c                        0.510 998 928         0.000 000 011         MeV/c
+natural unit of time                                   1.288 088 668 33 e-21 0.000 000 000 83 e-21 s
+natural unit of velocity                               299 792 458           (exact)               m s^-1
+neutron Compton wavelength                             1.319 590 9068 e-15   0.000 000 0011 e-15   m
+neutron Compton wavelength over 2 pi                   0.210 019 415 68 e-15 0.000 000 000 17 e-15 m
+neutron-electron mag. mom. ratio                       1.040 668 82 e-3      0.000 000 25 e-3
+neutron-electron mass ratio                            1838.683 6605         0.000 0011
+neutron g factor                                       -3.826 085 45         0.000 000 90
+neutron gyromag. ratio                                 1.832 471 79 e8       0.000 000 43 e8       s^-1 T^-1
+neutron gyromag. ratio over 2 pi                       29.164 6943           0.000 0069            MHz T^-1
+neutron mag. mom.                                      -0.966 236 47 e-26    0.000 000 23 e-26     J T^-1
+neutron mag. mom. to Bohr magneton ratio               -1.041 875 63 e-3     0.000 000 25 e-3
+neutron mag. mom. to nuclear magneton ratio            -1.913 042 72         0.000 000 45
+neutron mass                                           1.674 927 351 e-27    0.000 000 074 e-27    kg
+neutron mass energy equivalent                         1.505 349 631 e-10    0.000 000 066 e-10    J
+neutron mass energy equivalent in MeV                  939.565 379           0.000 021             MeV
+neutron mass in u                                      1.008 664 916 00      0.000 000 000 43      u
+neutron molar mass                                     1.008 664 916 00 e-3  0.000 000 000 43 e-3  kg mol^-1
+neutron-muon mass ratio                                8.892 484 00          0.000 000 22
+neutron-proton mag. mom. ratio                         -0.684 979 34         0.000 000 16
+neutron-proton mass difference                         2.305 573 92 e-30     0.000 000 76 e-30
+neutron-proton mass difference energy equivalent       2.072 146 50 e-13     0.000 000 68 e-13
+neutron-proton mass difference energy equivalent in MeV 1.293 332 17          0.000 000 42
+neutron-proton mass difference in u                    0.001 388 449 19      0.000 000 000 45
+neutron-proton mass ratio                              1.001 378 419 17      0.000 000 000 45
+neutron-tau mass ratio                                 0.528 790             0.000 048
+neutron to shielded proton mag. mom. ratio             -0.684 996 94         0.000 000 16
+Newtonian constant of gravitation                      6.673 84 e-11         0.000 80 e-11         m^3 kg^-1 s^-2
+Newtonian constant of gravitation over h-bar c         6.708 37 e-39         0.000 80 e-39         (GeV/c^2)^-2
+nuclear magneton                                       5.050 783 53 e-27     0.000 000 11 e-27     J T^-1
+nuclear magneton in eV/T                               3.152 451 2605 e-8    0.000 000 0022 e-8    eV T^-1
+nuclear magneton in inverse meters per tesla           2.542 623 527 e-2     0.000 000 056 e-2     m^-1 T^-1
+nuclear magneton in K/T                                3.658 2682 e-4        0.000 0033 e-4        K T^-1
+nuclear magneton in MHz/T                              7.622 593 57          0.000 000 17          MHz T^-1
+Planck constant                                        6.626 069 57 e-34     0.000 000 29 e-34     J s
+Planck constant in eV s                                4.135 667 516 e-15    0.000 000 091 e-15    eV s
+Planck constant over 2 pi                              1.054 571 726 e-34    0.000 000 047 e-34    J s
+Planck constant over 2 pi in eV s                      6.582 119 28 e-16     0.000 000 15 e-16     eV s
+Planck constant over 2 pi times c in MeV fm            197.326 9718          0.000 0044            MeV fm
+Planck length                                          1.616 199 e-35        0.000 097 e-35        m
+Planck mass                                            2.176 51 e-8          0.000 13 e-8          kg
+Planck mass energy equivalent in GeV                   1.220 932 e19         0.000 073 e19         GeV
+Planck temperature                                     1.416 833 e32         0.000 085 e32         K
+Planck time                                            5.391 06 e-44         0.000 32 e-44         s
+proton charge to mass quotient                         9.578 833 58 e7       0.000 000 21 e7       C kg^-1
+proton Compton wavelength                              1.321 409 856 23 e-15 0.000 000 000 94 e-15 m
+proton Compton wavelength over 2 pi                    0.210 308 910 47 e-15 0.000 000 000 15 e-15 m
+proton-electron mass ratio                             1836.152 672 45       0.000 000 75
+proton g factor                                        5.585 694 713         0.000 000 046
+proton gyromag. ratio                                  2.675 222 005 e8      0.000 000 063 e8      s^-1 T^-1
+proton gyromag. ratio over 2 pi                        42.577 4806           0.000 0010            MHz T^-1
+proton mag. mom.                                       1.410 606 743 e-26    0.000 000 033 e-26    J T^-1
+proton mag. mom. to Bohr magneton ratio                1.521 032 210 e-3     0.000 000 012 e-3
+proton mag. mom. to nuclear magneton ratio             2.792 847 356         0.000 000 023
+proton mag. shielding correction                       25.694 e-6            0.014 e-6
+proton mass                                            1.672 621 777 e-27    0.000 000 074 e-27    kg
+proton mass energy equivalent                          1.503 277 484 e-10    0.000 000 066 e-10    J
+proton mass energy equivalent in MeV                   938.272 046           0.000 021             MeV
+proton mass in u                                       1.007 276 466 812     0.000 000 000 090     u
+proton molar mass                                      1.007 276 466 812 e-3 0.000 000 000 090 e-3 kg mol^-1
+proton-muon mass ratio                                 8.880 243 31          0.000 000 22
+proton-neutron mag. mom. ratio                         -1.459 898 06         0.000 000 34
+proton-neutron mass ratio                              0.998 623 478 26      0.000 000 000 45
+proton rms charge radius                               0.8775 e-15           0.0051 e-15           m
+proton-tau mass ratio                                  0.528 063             0.000 048
+quantum of circulation                                 3.636 947 5520 e-4    0.000 000 0024 e-4    m^2 s^-1
+quantum of circulation times 2                         7.273 895 1040 e-4    0.000 000 0047 e-4    m^2 s^-1
+Rydberg constant                                       10 973 731.568 539    0.000 055             m^-1
+Rydberg constant times c in Hz                         3.289 841 960 364 e15 0.000 000 000 017 e15 Hz
+Rydberg constant times hc in eV                        13.605 692 53         0.000 000 30          eV
+Rydberg constant times hc in J                         2.179 872 171 e-18    0.000 000 096 e-18    J
+Sackur-Tetrode constant (1 K, 100 kPa)                 -1.151 7078           0.000 0023
+Sackur-Tetrode constant (1 K, 101.325 kPa)             -1.164 8708           0.000 0023
+second radiation constant                              1.438 7770 e-2        0.000 0013 e-2        m K
+shielded helion gyromag. ratio                         2.037 894 659 e8      0.000 000 051 e8      s^-1 T^-1
+shielded helion gyromag. ratio over 2 pi               32.434 100 84         0.000 000 81          MHz T^-1
+shielded helion mag. mom.                              -1.074 553 044 e-26   0.000 000 027 e-26    J T^-1
+shielded helion mag. mom. to Bohr magneton ratio       -1.158 671 471 e-3    0.000 000 014 e-3
+shielded helion mag. mom. to nuclear magneton ratio    -2.127 497 718        0.000 000 025
+shielded helion to proton mag. mom. ratio              -0.761 766 558        0.000 000 011
+shielded helion to shielded proton mag. mom. ratio     -0.761 786 1313       0.000 000 0033
+shielded proton gyromag. ratio                         2.675 153 268 e8      0.000 000 066 e8      s^-1 T^-1
+shielded proton gyromag. ratio over 2 pi               42.576 3866           0.000 0010            MHz T^-1
+shielded proton mag. mom.                              1.410 570 499 e-26    0.000 000 035 e-26    J T^-1
+shielded proton mag. mom. to Bohr magneton ratio       1.520 993 128 e-3     0.000 000 017 e-3
+shielded proton mag. mom. to nuclear magneton ratio    2.792 775 598         0.000 000 030
+speed of light in vacuum                               299 792 458           (exact)               m s^-1
+standard acceleration of gravity                       9.806 65              (exact)               m s^-2
+standard atmosphere                                    101 325               (exact)               Pa
+standard-state pressure                                100 000               (exact)               Pa
+Stefan-Boltzmann constant                              5.670 373 e-8         0.000 021 e-8         W m^-2 K^-4
+tau Compton wavelength                                 0.697 787 e-15        0.000 063 e-15        m
+tau Compton wavelength over 2 pi                       0.111 056 e-15        0.000 010 e-15        m
+tau-electron mass ratio                                3477.15               0.31
+tau mass                                               3.167 47 e-27         0.000 29 e-27         kg
+tau mass energy equivalent                             2.846 78 e-10         0.000 26 e-10         J
+tau mass energy equivalent in MeV                      1776.82               0.16                  MeV
+tau mass in u                                          1.907 49              0.000 17              u
+tau molar mass                                         1.907 49 e-3          0.000 17 e-3          kg mol^-1
+tau-muon mass ratio                                    16.8167               0.0015
+tau-neutron mass ratio                                 1.891 11              0.000 17
+tau-proton mass ratio                                  1.893 72              0.000 17
+Thomson cross section                                  0.665 245 8734 e-28   0.000 000 0013 e-28   m^2
+triton-electron mass ratio                             5496.921 5267         0.000 0050
+triton g factor                                        5.957 924 896         0.000 000 076
+triton mag. mom.                                       1.504 609 447 e-26    0.000 000 038 e-26    J T^-1
+triton mag. mom. to Bohr magneton ratio                1.622 393 657 e-3     0.000 000 021 e-3
+triton mag. mom. to nuclear magneton ratio             2.978 962 448         0.000 000 038
+triton mass                                            5.007 356 30 e-27     0.000 000 22 e-27     kg
+triton mass energy equivalent                          4.500 387 41 e-10     0.000 000 20 e-10     J
+triton mass energy equivalent in MeV                   2808.921 005          0.000 062             MeV
+triton mass in u                                       3.015 500 7134        0.000 000 0025        u
+triton molar mass                                      3.015 500 7134 e-3    0.000 000 0025 e-3    kg mol^-1
+triton-proton mass ratio                               2.993 717 0308        0.000 000 0025
+unified atomic mass unit                               1.660 538 921 e-27    0.000 000 073 e-27    kg
+von Klitzing constant                                  25 812.807 4434       0.000 0084            ohm
+weak mixing angle                                      0.2223                0.0021
+Wien frequency displacement law constant               5.878 9254 e10        0.000 0053 e10        Hz K^-1
+Wien wavelength displacement law constant              2.897 7721 e-3        0.000 0026 e-3        m K"""
+
+
+exact2010 = exact2006
+
+
+txt2014 = """\
+{220} lattice spacing of silicon                       192.015 5714 e-12     0.000 0032 e-12       m
+alpha particle-electron mass ratio                     7294.299 541 36       0.000 000 24
+alpha particle mass                                    6.644 657 230 e-27    0.000 000 082 e-27    kg
+alpha particle mass energy equivalent                  5.971 920 097 e-10    0.000 000 073 e-10    J
+alpha particle mass energy equivalent in MeV           3727.379 378          0.000 023             MeV
+alpha particle mass in u                               4.001 506 179 127     0.000 000 000 063     u
+alpha particle molar mass                              4.001 506 179 127 e-3 0.000 000 000 063 e-3 kg mol^-1
+alpha particle-proton mass ratio                       3.972 599 689 07      0.000 000 000 36
+Angstrom star                                          1.000 014 95 e-10     0.000 000 90 e-10     m
+atomic mass constant                                   1.660 539 040 e-27    0.000 000 020 e-27    kg
+atomic mass constant energy equivalent                 1.492 418 062 e-10    0.000 000 018 e-10    J
+atomic mass constant energy equivalent in MeV          931.494 0954          0.000 0057            MeV
+atomic mass unit-electron volt relationship            931.494 0954 e6       0.000 0057 e6         eV
+atomic mass unit-hartree relationship                  3.423 177 6902 e7     0.000 000 0016 e7     E_h
+atomic mass unit-hertz relationship                    2.252 342 7206 e23    0.000 000 0010 e23    Hz
+atomic mass unit-inverse meter relationship            7.513 006 6166 e14    0.000 000 0034 e14    m^-1
+atomic mass unit-joule relationship                    1.492 418 062 e-10    0.000 000 018 e-10    J
+atomic mass unit-kelvin relationship                   1.080 954 38 e13      0.000 000 62 e13      K
+atomic mass unit-kilogram relationship                 1.660 539 040 e-27    0.000 000 020 e-27    kg
+atomic unit of 1st hyperpolarizability                 3.206 361 329 e-53    0.000 000 020 e-53    C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizability                 6.235 380 085 e-65    0.000 000 077 e-65    C^4 m^4 J^-3
+atomic unit of action                                  1.054 571 800 e-34    0.000 000 013 e-34    J s
+atomic unit of charge                                  1.602 176 6208 e-19   0.000 000 0098 e-19   C
+atomic unit of charge density                          1.081 202 3770 e12    0.000 000 0067 e12    C m^-3
+atomic unit of current                                 6.623 618 183 e-3     0.000 000 041 e-3     A
+atomic unit of electric dipole mom.                    8.478 353 552 e-30    0.000 000 052 e-30    C m
+atomic unit of electric field                          5.142 206 707 e11     0.000 000 032 e11     V m^-1
+atomic unit of electric field gradient                 9.717 362 356 e21     0.000 000 060 e21     V m^-2
+atomic unit of electric polarizability                 1.648 777 2731 e-41   0.000 000 0011 e-41   C^2 m^2 J^-1
+atomic unit of electric potential                      27.211 386 02         0.000 000 17          V
+atomic unit of electric quadrupole mom.                4.486 551 484 e-40    0.000 000 028 e-40    C m^2
+atomic unit of energy                                  4.359 744 650 e-18    0.000 000 054 e-18    J
+atomic unit of force                                   8.238 723 36 e-8      0.000 000 10 e-8      N
+atomic unit of length                                  0.529 177 210 67 e-10 0.000 000 000 12 e-10 m
+atomic unit of mag. dipole mom.                        1.854 801 999 e-23    0.000 000 011 e-23    J T^-1
+atomic unit of mag. flux density                       2.350 517 550 e5      0.000 000 014 e5      T
+atomic unit of magnetizability                         7.891 036 5886 e-29   0.000 000 0090 e-29   J T^-2
+atomic unit of mass                                    9.109 383 56 e-31     0.000 000 11 e-31     kg
+atomic unit of mom.um                                  1.992 851 882 e-24    0.000 000 024 e-24    kg m s^-1
+atomic unit of permittivity                            1.112 650 056... e-10 (exact)               F m^-1
+atomic unit of time                                    2.418 884 326509e-17  0.000 000 000014e-17  s
+atomic unit of velocity                                2.187 691 262 77 e6   0.000 000 000 50 e6   m s^-1
+Avogadro constant                                      6.022 140 857 e23     0.000 000 074 e23     mol^-1
+Bohr magneton                                          927.400 9994 e-26     0.000 0057 e-26       J T^-1
+Bohr magneton in eV/T                                  5.788 381 8012 e-5    0.000 000 0026 e-5    eV T^-1
+Bohr magneton in Hz/T                                  13.996 245 042 e9     0.000 000 086 e9      Hz T^-1
+Bohr magneton in inverse meters per tesla              46.686 448 14         0.000 000 29          m^-1 T^-1
+Bohr magneton in K/T                                   0.671 714 05          0.000 000 39          K T^-1
+Bohr radius                                            0.529 177 210 67 e-10 0.000 000 000 12 e-10 m
+Boltzmann constant                                     1.380 648 52 e-23     0.000 000 79 e-23     J K^-1
+Boltzmann constant in eV/K                             8.617 3303 e-5        0.000 0050 e-5        eV K^-1
+Boltzmann constant in Hz/K                             2.083 6612 e10        0.000 0012 e10        Hz K^-1
+Boltzmann constant in inverse meters per kelvin        69.503 457            0.000 040             m^-1 K^-1
+characteristic impedance of vacuum                     376.730 313 461...    (exact)               ohm
+classical electron radius                              2.817 940 3227 e-15   0.000 000 0019 e-15   m
+Compton wavelength                                     2.426 310 2367 e-12   0.000 000 0011 e-12   m
+Compton wavelength over 2 pi                           386.159 267 64 e-15   0.000 000 18 e-15     m
+conductance quantum                                    7.748 091 7310 e-5    0.000 000 0018 e-5    S
+conventional value of Josephson constant               483 597.9 e9          (exact)               Hz V^-1
+conventional value of von Klitzing constant            25 812.807            (exact)               ohm
+Cu x unit                                              1.002 076 97 e-13     0.000 000 28 e-13     m
+deuteron-electron mag. mom. ratio                      -4.664 345 535 e-4    0.000 000 026 e-4
+deuteron-electron mass ratio                           3670.482 967 85       0.000 000 13
+deuteron g factor                                      0.857 438 2311        0.000 000 0048
+deuteron mag. mom.                                     0.433 073 5040 e-26   0.000 000 0036 e-26   J T^-1
+deuteron mag. mom. to Bohr magneton ratio              0.466 975 4554 e-3    0.000 000 0026 e-3
+deuteron mag. mom. to nuclear magneton ratio           0.857 438 2311        0.000 000 0048
+deuteron mass                                          3.343 583 719 e-27    0.000 000 041 e-27    kg
+deuteron mass energy equivalent                        3.005 063 183 e-10    0.000 000 037 e-10    J
+deuteron mass energy equivalent in MeV                 1875.612 928          0.000 012             MeV
+deuteron mass in u                                     2.013 553 212 745     0.000 000 000 040     u
+deuteron molar mass                                    2.013 553 212 745 e-3 0.000 000 000 040 e-3 kg mol^-1
+deuteron-neutron mag. mom. ratio                       -0.448 206 52         0.000 000 11
+deuteron-proton mag. mom. ratio                        0.307 012 2077        0.000 000 0015
+deuteron-proton mass ratio                             1.999 007 500 87      0.000 000 000 19
+deuteron rms charge radius                             2.1413 e-15           0.0025 e-15           m
+electric constant                                      8.854 187 817... e-12 (exact)               F m^-1
+electron charge to mass quotient                       -1.758 820 024 e11    0.000 000 011 e11     C kg^-1
+electron-deuteron mag. mom. ratio                      -2143.923 499         0.000 012
+electron-deuteron mass ratio                           2.724 437 107 484 e-4 0.000 000 000 096 e-4
+electron g factor                                      -2.002 319 304 361 82 0.000 000 000 000 52
+electron gyromag. ratio                                1.760 859 644 e11     0.000 000 011 e11     s^-1 T^-1
+electron gyromag. ratio over 2 pi                      28 024.951 64         0.000 17              MHz T^-1
+electron-helion mass ratio                             1.819 543 074 854 e-4 0.000 000 000 088 e-4
+electron mag. mom.                                     -928.476 4620 e-26    0.000 0057 e-26       J T^-1
+electron mag. mom. anomaly                             1.159 652 180 91 e-3  0.000 000 000 26 e-3
+electron mag. mom. to Bohr magneton ratio              -1.001 159 652 180 91 0.000 000 000 000 26
+electron mag. mom. to nuclear magneton ratio           -1838.281 972 34      0.000 000 17
+electron mass                                          9.109 383 56 e-31     0.000 000 11 e-31     kg
+electron mass energy equivalent                        8.187 105 65 e-14     0.000 000 10 e-14     J
+electron mass energy equivalent in MeV                 0.510 998 9461        0.000 000 0031        MeV
+electron mass in u                                     5.485 799 090 70 e-4  0.000 000 000 16 e-4  u
+electron molar mass                                    5.485 799 090 70 e-7  0.000 000 000 16 e-7  kg mol^-1
+electron-muon mag. mom. ratio                          206.766 9880          0.000 0046
+electron-muon mass ratio                               4.836 331 70 e-3      0.000 000 11 e-3
+electron-neutron mag. mom. ratio                       960.920 50            0.000 23
+electron-neutron mass ratio                            5.438 673 4428 e-4    0.000 000 0027 e-4
+electron-proton mag. mom. ratio                        -658.210 6866         0.000 0020
+electron-proton mass ratio                             5.446 170 213 52 e-4  0.000 000 000 52 e-4
+electron-tau mass ratio                                2.875 92 e-4          0.000 26 e-4
+electron to alpha particle mass ratio                  1.370 933 554 798 e-4 0.000 000 000 045 e-4
+electron to shielded helion mag. mom. ratio            864.058 257           0.000 010
+electron to shielded proton mag. mom. ratio            -658.227 5971         0.000 0072
+electron-triton mass ratio                             1.819 200 062 203 e-4 0.000 000 000 084 e-4
+electron volt                                          1.602 176 6208 e-19   0.000 000 0098 e-19   J
+electron volt-atomic mass unit relationship            1.073 544 1105 e-9    0.000 000 0066 e-9    u
+electron volt-hartree relationship                     3.674 932 248 e-2     0.000 000 023 e-2     E_h
+electron volt-hertz relationship                       2.417 989 262 e14     0.000 000 015 e14     Hz
+electron volt-inverse meter relationship               8.065 544 005 e5      0.000 000 050 e5      m^-1
+electron volt-joule relationship                       1.602 176 6208 e-19   0.000 000 0098 e-19   J
+electron volt-kelvin relationship                      1.160 452 21 e4       0.000 000 67 e4       K
+electron volt-kilogram relationship                    1.782 661 907 e-36    0.000 000 011 e-36    kg
+elementary charge                                      1.602 176 6208 e-19   0.000 000 0098 e-19   C
+elementary charge over h                               2.417 989 262 e14     0.000 000 015 e14     A J^-1
+Faraday constant                                       96 485.332 89         0.000 59              C mol^-1
+Faraday constant for conventional electric current     96 485.3251           0.0012                C_90 mol^-1
+Fermi coupling constant                                1.166 3787 e-5        0.000 0006 e-5        GeV^-2
+fine-structure constant                                7.297 352 5664 e-3    0.000 000 0017 e-3
+first radiation constant                               3.741 771 790 e-16    0.000 000 046 e-16    W m^2
+first radiation constant for spectral radiance         1.191 042 953 e-16    0.000 000 015 e-16    W m^2 sr^-1
+hartree-atomic mass unit relationship                  2.921 262 3197 e-8    0.000 000 0013 e-8    u
+hartree-electron volt relationship                     27.211 386 02         0.000 000 17          eV
+Hartree energy                                         4.359 744 650 e-18    0.000 000 054 e-18    J
+Hartree energy in eV                                   27.211 386 02         0.000 000 17          eV
+hartree-hertz relationship                             6.579 683 920 711 e15 0.000 000 000 039 e15 Hz
+hartree-inverse meter relationship                     2.194 746 313 702 e7  0.000 000 000 013 e7  m^-1
+hartree-joule relationship                             4.359 744 650 e-18    0.000 000 054 e-18    J
+hartree-kelvin relationship                            3.157 7513 e5         0.000 0018 e5         K
+hartree-kilogram relationship                          4.850 870 129 e-35    0.000 000 060 e-35    kg
+helion-electron mass ratio                             5495.885 279 22       0.000 000 27
+helion g factor                                        -4.255 250 616        0.000 000 050
+helion mag. mom.                                       -1.074 617 522 e-26   0.000 000 014 e-26    J T^-1
+helion mag. mom. to Bohr magneton ratio                -1.158 740 958 e-3    0.000 000 014 e-3
+helion mag. mom. to nuclear magneton ratio             -2.127 625 308        0.000 000 025
+helion mass                                            5.006 412 700 e-27    0.000 000 062 e-27    kg
+helion mass energy equivalent                          4.499 539 341 e-10    0.000 000 055 e-10    J
+helion mass energy equivalent in MeV                   2808.391 586          0.000 017             MeV
+helion mass in u                                       3.014 932 246 73      0.000 000 000 12      u
+helion molar mass                                      3.014 932 246 73 e-3  0.000 000 000 12 e-3  kg mol^-1
+helion-proton mass ratio                               2.993 152 670 46      0.000 000 000 29
+hertz-atomic mass unit relationship                    4.439 821 6616 e-24   0.000 000 0020 e-24   u
+hertz-electron volt relationship                       4.135 667 662 e-15    0.000 000 025 e-15    eV
+hertz-hartree relationship                             1.5198298460088 e-16  0.0000000000090e-16   E_h
+hertz-inverse meter relationship                       3.335 640 951... e-9  (exact)               m^-1
+hertz-joule relationship                               6.626 070 040 e-34    0.000 000 081 e-34    J
+hertz-kelvin relationship                              4.799 2447 e-11       0.000 0028 e-11       K
+hertz-kilogram relationship                            7.372 497 201 e-51    0.000 000 091 e-51    kg
+inverse fine-structure constant                        137.035 999 139       0.000 000 031
+inverse meter-atomic mass unit relationship            1.331 025 049 00 e-15 0.000 000 000 61 e-15 u
+inverse meter-electron volt relationship               1.239 841 9739 e-6    0.000 000 0076 e-6    eV
+inverse meter-hartree relationship                     4.556 335 252 767 e-8 0.000 000 000 027 e-8 E_h
+inverse meter-hertz relationship                       299 792 458           (exact)               Hz
+inverse meter-joule relationship                       1.986 445 824 e-25    0.000 000 024 e-25    J
+inverse meter-kelvin relationship                      1.438 777 36 e-2      0.000 000 83 e-2      K
+inverse meter-kilogram relationship                    2.210 219 057 e-42    0.000 000 027 e-42    kg
+inverse of conductance quantum                         12 906.403 7278       0.000 0029            ohm
+Josephson constant                                     483 597.8525 e9       0.0030 e9             Hz V^-1
+joule-atomic mass unit relationship                    6.700 535 363 e9      0.000 000 082 e9      u
+joule-electron volt relationship                       6.241 509 126 e18     0.000 000 038 e18     eV
+joule-hartree relationship                             2.293 712 317 e17     0.000 000 028 e17     E_h
+joule-hertz relationship                               1.509 190 205 e33     0.000 000 019 e33     Hz
+joule-inverse meter relationship                       5.034 116 651 e24     0.000 000 062 e24     m^-1
+joule-kelvin relationship                              7.242 9731 e22        0.000 0042 e22        K
+joule-kilogram relationship                            1.112 650 056... e-17 (exact)               kg
+kelvin-atomic mass unit relationship                   9.251 0842 e-14       0.000 0053 e-14       u
+kelvin-electron volt relationship                      8.617 3303 e-5        0.000 0050 e-5        eV
+kelvin-hartree relationship                            3.166 8105 e-6        0.000 0018 e-6        E_h
+kelvin-hertz relationship                              2.083 6612 e10        0.000 0012 e10        Hz
+kelvin-inverse meter relationship                      69.503 457            0.000 040             m^-1
+kelvin-joule relationship                              1.380 648 52 e-23     0.000 000 79 e-23     J
+kelvin-kilogram relationship                           1.536 178 65 e-40     0.000 000 88 e-40     kg
+kilogram-atomic mass unit relationship                 6.022 140 857 e26     0.000 000 074 e26     u
+kilogram-electron volt relationship                    5.609 588 650 e35     0.000 000 034 e35     eV
+kilogram-hartree relationship                          2.061 485 823 e34     0.000 000 025 e34     E_h
+kilogram-hertz relationship                            1.356 392 512 e50     0.000 000 017 e50     Hz
+kilogram-inverse meter relationship                    4.524 438 411 e41     0.000 000 056 e41     m^-1
+kilogram-joule relationship                            8.987 551 787... e16  (exact)               J
+kilogram-kelvin relationship                           6.509 6595 e39        0.000 0037 e39        K
+lattice parameter of silicon                           543.102 0504 e-12     0.000 0089 e-12       m
+Loschmidt constant (273.15 K, 100 kPa)                 2.651 6467 e25        0.000 0015 e25        m^-3
+Loschmidt constant (273.15 K, 101.325 kPa)             2.686 7811 e25        0.000 0015 e25        m^-3
+mag. constant                                          12.566 370 614... e-7 (exact)               N A^-2
+mag. flux quantum                                      2.067 833 831 e-15    0.000 000 013 e-15    Wb
+molar gas constant                                     8.314 4598            0.000 0048            J mol^-1 K^-1
+molar mass constant                                    1 e-3                 (exact)               kg mol^-1
+molar mass of carbon-12                                12 e-3                (exact)               kg mol^-1
+molar Planck constant                                  3.990 312 7110 e-10   0.000 000 0018 e-10   J s mol^-1
+molar Planck constant times c                          0.119 626 565 582     0.000 000 000 054     J m mol^-1
+molar volume of ideal gas (273.15 K, 100 kPa)          22.710 947 e-3        0.000 013 e-3         m^3 mol^-1
+molar volume of ideal gas (273.15 K, 101.325 kPa)      22.413 962 e-3        0.000 013 e-3         m^3 mol^-1
+molar volume of silicon                                12.058 832 14 e-6     0.000 000 61 e-6      m^3 mol^-1
+Mo x unit                                              1.002 099 52 e-13     0.000 000 53 e-13     m
+muon Compton wavelength                                11.734 441 11 e-15    0.000 000 26 e-15     m
+muon Compton wavelength over 2 pi                      1.867 594 308 e-15    0.000 000 042 e-15    m
+muon-electron mass ratio                               206.768 2826          0.000 0046
+muon g factor                                          -2.002 331 8418       0.000 000 0013
+muon mag. mom.                                         -4.490 448 26 e-26    0.000 000 10 e-26     J T^-1
+muon mag. mom. anomaly                                 1.165 920 89 e-3      0.000 000 63 e-3
+muon mag. mom. to Bohr magneton ratio                  -4.841 970 48 e-3     0.000 000 11 e-3
+muon mag. mom. to nuclear magneton ratio               -8.890 597 05         0.000 000 20
+muon mass                                              1.883 531 594 e-28    0.000 000 048 e-28    kg
+muon mass energy equivalent                            1.692 833 774 e-11    0.000 000 043 e-11    J
+muon mass energy equivalent in MeV                     105.658 3745          0.000 0024            MeV
+muon mass in u                                         0.113 428 9257        0.000 000 0025        u
+muon molar mass                                        0.113 428 9257 e-3    0.000 000 0025 e-3    kg mol^-1
+muon-neutron mass ratio                                0.112 454 5167        0.000 000 0025
+muon-proton mag. mom. ratio                            -3.183 345 142        0.000 000 071
+muon-proton mass ratio                                 0.112 609 5262        0.000 000 0025
+muon-tau mass ratio                                    5.946 49 e-2          0.000 54 e-2
+natural unit of action                                 1.054 571 800 e-34    0.000 000 013 e-34    J s
+natural unit of action in eV s                         6.582 119 514 e-16    0.000 000 040 e-16    eV s
+natural unit of energy                                 8.187 105 65 e-14     0.000 000 10 e-14     J
+natural unit of energy in MeV                          0.510 998 9461        0.000 000 0031        MeV
+natural unit of length                                 386.159 267 64 e-15   0.000 000 18 e-15     m
+natural unit of mass                                   9.109 383 56 e-31     0.000 000 11 e-31     kg
+natural unit of mom.um                                 2.730 924 488 e-22    0.000 000 034 e-22    kg m s^-1
+natural unit of mom.um in MeV/c                        0.510 998 9461        0.000 000 0031        MeV/c
+natural unit of time                                   1.288 088 667 12 e-21 0.000 000 000 58 e-21 s
+natural unit of velocity                               299 792 458           (exact)               m s^-1
+neutron Compton wavelength                             1.319 590 904 81 e-15 0.000 000 000 88 e-15 m
+neutron Compton wavelength over 2 pi                   0.210 019 415 36 e-15 0.000 000 000 14 e-15 m
+neutron-electron mag. mom. ratio                       1.040 668 82 e-3      0.000 000 25 e-3
+neutron-electron mass ratio                            1838.683 661 58       0.000 000 90
+neutron g factor                                       -3.826 085 45         0.000 000 90
+neutron gyromag. ratio                                 1.832 471 72 e8       0.000 000 43 e8       s^-1 T^-1
+neutron gyromag. ratio over 2 pi                       29.164 6933           0.000 0069            MHz T^-1
+neutron mag. mom.                                      -0.966 236 50 e-26    0.000 000 23 e-26     J T^-1
+neutron mag. mom. to Bohr magneton ratio               -1.041 875 63 e-3     0.000 000 25 e-3
+neutron mag. mom. to nuclear magneton ratio            -1.913 042 73         0.000 000 45
+neutron mass                                           1.674 927 471 e-27    0.000 000 021 e-27    kg
+neutron mass energy equivalent                         1.505 349 739 e-10    0.000 000 019 e-10    J
+neutron mass energy equivalent in MeV                  939.565 4133          0.000 0058            MeV
+neutron mass in u                                      1.008 664 915 88      0.000 000 000 49      u
+neutron molar mass                                     1.008 664 915 88 e-3  0.000 000 000 49 e-3  kg mol^-1
+neutron-muon mass ratio                                8.892 484 08          0.000 000 20
+neutron-proton mag. mom. ratio                         -0.684 979 34         0.000 000 16
+neutron-proton mass difference                         2.305 573 77 e-30     0.000 000 85 e-30
+neutron-proton mass difference energy equivalent       2.072 146 37 e-13     0.000 000 76 e-13
+neutron-proton mass difference energy equivalent in MeV 1.293 332 05         0.000 000 48
+neutron-proton mass difference in u                    0.001 388 449 00      0.000 000 000 51
+neutron-proton mass ratio                              1.001 378 418 98      0.000 000 000 51
+neutron-tau mass ratio                                 0.528 790             0.000 048
+neutron to shielded proton mag. mom. ratio             -0.684 996 94         0.000 000 16
+Newtonian constant of gravitation                      6.674 08 e-11         0.000 31 e-11         m^3 kg^-1 s^-2
+Newtonian constant of gravitation over h-bar c         6.708 61 e-39         0.000 31 e-39         (GeV/c^2)^-2
+nuclear magneton                                       5.050 783 699 e-27    0.000 000 031 e-27    J T^-1
+nuclear magneton in eV/T                               3.152 451 2550 e-8    0.000 000 0015 e-8    eV T^-1
+nuclear magneton in inverse meters per tesla           2.542 623 432 e-2     0.000 000 016 e-2     m^-1 T^-1
+nuclear magneton in K/T                                3.658 2690 e-4        0.000 0021 e-4        K T^-1
+nuclear magneton in MHz/T                              7.622 593 285         0.000 000 047         MHz T^-1
+Planck constant                                        6.626 070 040 e-34    0.000 000 081 e-34    J s
+Planck constant in eV s                                4.135 667 662 e-15    0.000 000 025 e-15    eV s
+Planck constant over 2 pi                              1.054 571 800 e-34    0.000 000 013 e-34    J s
+Planck constant over 2 pi in eV s                      6.582 119 514 e-16    0.000 000 040 e-16    eV s
+Planck constant over 2 pi times c in MeV fm            197.326 9788          0.000 0012            MeV fm
+Planck length                                          1.616 229 e-35        0.000 038 e-35        m
+Planck mass                                            2.176 470 e-8         0.000 051 e-8         kg
+Planck mass energy equivalent in GeV                   1.220 910 e19         0.000 029 e19         GeV
+Planck temperature                                     1.416 808 e32         0.000 033 e32         K
+Planck time                                            5.391 16 e-44         0.000 13 e-44         s
+proton charge to mass quotient                         9.578 833 226 e7      0.000 000 059 e7      C kg^-1
+proton Compton wavelength                              1.321 409 853 96 e-15 0.000 000 000 61 e-15 m
+proton Compton wavelength over 2 pi                    0.210 308910109e-15   0.000 000 000097e-15  m
+proton-electron mass ratio                             1836.152 673 89       0.000 000 17
+proton g factor                                        5.585 694 702         0.000 000 017
+proton gyromag. ratio                                  2.675 221 900 e8      0.000 000 018 e8      s^-1 T^-1
+proton gyromag. ratio over 2 pi                        42.577 478 92         0.000 000 29          MHz T^-1
+proton mag. mom.                                       1.410 606 7873 e-26   0.000 000 0097 e-26   J T^-1
+proton mag. mom. to Bohr magneton ratio                1.521 032 2053 e-3    0.000 000 0046 e-3
+proton mag. mom. to nuclear magneton ratio             2.792 847 3508        0.000 000 0085
+proton mag. shielding correction                       25.691 e-6            0.011 e-6
+proton mass                                            1.672 621 898 e-27    0.000 000 021 e-27    kg
+proton mass energy equivalent                          1.503 277 593 e-10    0.000 000 018 e-10    J
+proton mass energy equivalent in MeV                   938.272 0813          0.000 0058            MeV
+proton mass in u                                       1.007 276 466 879     0.000 000 000 091     u
+proton molar mass                                      1.007 276 466 879 e-3 0.000 000 000 091 e-3 kg mol^-1
+proton-muon mass ratio                                 8.880 243 38          0.000 000 20
+proton-neutron mag. mom. ratio                         -1.459 898 05         0.000 000 34
+proton-neutron mass ratio                              0.998 623 478 44      0.000 000 000 51
+proton rms charge radius                               0.8751 e-15           0.0061 e-15           m
+proton-tau mass ratio                                  0.528 063             0.000 048
+quantum of circulation                                 3.636 947 5486 e-4    0.000 000 0017 e-4    m^2 s^-1
+quantum of circulation times 2                         7.273 895 0972 e-4    0.000 000 0033 e-4    m^2 s^-1
+Rydberg constant                                       10 973 731.568 508    0.000 065             m^-1
+Rydberg constant times c in Hz                         3.289 841 960 355 e15 0.000 000 000 019 e15 Hz
+Rydberg constant times hc in eV                        13.605 693 009        0.000 000 084         eV
+Rydberg constant times hc in J                         2.179 872 325 e-18    0.000 000 027 e-18    J
+Sackur-Tetrode constant (1 K, 100 kPa)                 -1.151 7084           0.000 0014
+Sackur-Tetrode constant (1 K, 101.325 kPa)             -1.164 8714           0.000 0014
+second radiation constant                              1.438 777 36 e-2      0.000 000 83 e-2      m K
+shielded helion gyromag. ratio                         2.037 894 585 e8      0.000 000 027 e8      s^-1 T^-1
+shielded helion gyromag. ratio over 2 pi               32.434 099 66         0.000 000 43          MHz T^-1
+shielded helion mag. mom.                              -1.074 553 080 e-26   0.000 000 014 e-26    J T^-1
+shielded helion mag. mom. to Bohr magneton ratio       -1.158 671 471 e-3    0.000 000 014 e-3
+shielded helion mag. mom. to nuclear magneton ratio    -2.127 497 720        0.000 000 025
+shielded helion to proton mag. mom. ratio              -0.761 766 5603       0.000 000 0092
+shielded helion to shielded proton mag. mom. ratio     -0.761 786 1313       0.000 000 0033
+shielded proton gyromag. ratio                         2.675 153 171 e8      0.000 000 033 e8      s^-1 T^-1
+shielded proton gyromag. ratio over 2 pi               42.576 385 07         0.000 000 53          MHz T^-1
+shielded proton mag. mom.                              1.410 570 547 e-26    0.000 000 018 e-26    J T^-1
+shielded proton mag. mom. to Bohr magneton ratio       1.520 993 128 e-3     0.000 000 017 e-3
+shielded proton mag. mom. to nuclear magneton ratio    2.792 775 600         0.000 000 030
+speed of light in vacuum                               299 792 458           (exact)               m s^-1
+standard acceleration of gravity                       9.806 65              (exact)               m s^-2
+standard atmosphere                                    101 325               (exact)               Pa
+standard-state pressure                                100 000               (exact)               Pa
+Stefan-Boltzmann constant                              5.670 367 e-8         0.000 013 e-8         W m^-2 K^-4
+tau Compton wavelength                                 0.697 787 e-15        0.000 063 e-15        m
+tau Compton wavelength over 2 pi                       0.111 056 e-15        0.000 010 e-15        m
+tau-electron mass ratio                                3477.15               0.31
+tau mass                                               3.167 47 e-27         0.000 29 e-27         kg
+tau mass energy equivalent                             2.846 78 e-10         0.000 26 e-10         J
+tau mass energy equivalent in MeV                      1776.82               0.16                  MeV
+tau mass in u                                          1.907 49              0.000 17              u
+tau molar mass                                         1.907 49 e-3          0.000 17 e-3          kg mol^-1
+tau-muon mass ratio                                    16.8167               0.0015
+tau-neutron mass ratio                                 1.891 11              0.000 17
+tau-proton mass ratio                                  1.893 72              0.000 17
+Thomson cross section                                  0.665 245 871 58 e-28 0.000 000 000 91 e-28 m^2
+triton-electron mass ratio                             5496.921 535 88       0.000 000 26
+triton g factor                                        5.957 924 920         0.000 000 028
+triton mag. mom.                                       1.504 609 503 e-26    0.000 000 012 e-26    J T^-1
+triton mag. mom. to Bohr magneton ratio                1.622 393 6616 e-3    0.000 000 0076 e-3
+triton mag. mom. to nuclear magneton ratio             2.978 962 460         0.000 000 014
+triton mass                                            5.007 356 665 e-27    0.000 000 062 e-27    kg
+triton mass energy equivalent                          4.500 387 735 e-10    0.000 000 055 e-10    J
+triton mass energy equivalent in MeV                   2808.921 112          0.000 017             MeV
+triton mass in u                                       3.015 500 716 32      0.000 000 000 11      u
+triton molar mass                                      3.015 500 716 32 e-3  0.000 000 000 11 e-3  kg mol^-1
+triton-proton mass ratio                               2.993 717 033 48      0.000 000 000 22
+unified atomic mass unit                               1.660 539 040 e-27    0.000 000 020 e-27    kg
+von Klitzing constant                                  25 812.807 4555       0.000 0059            ohm
+weak mixing angle                                      0.2223                0.0021
+Wien frequency displacement law constant               5.878 9238 e10        0.000 0034 e10        Hz K^-1
+Wien wavelength displacement law constant              2.897 7729 e-3        0.000 0017 e-3        m K"""
+
+
+exact2014 = exact2010
+
+
+txt2018 = """\
+alpha particle-electron mass ratio                          7294.299 541 42          0.000 000 24
+alpha particle mass                                         6.644 657 3357 e-27      0.000 000 0020 e-27      kg
+alpha particle mass energy equivalent                       5.971 920 1914 e-10      0.000 000 0018 e-10      J
+alpha particle mass energy equivalent in MeV                3727.379 4066            0.000 0011               MeV
+alpha particle mass in u                                    4.001 506 179 127        0.000 000 000 063        u
+alpha particle molar mass                                   4.001 506 1777 e-3       0.000 000 0012 e-3       kg mol^-1
+alpha particle-proton mass ratio                            3.972 599 690 09         0.000 000 000 22
+alpha particle relative atomic mass                         4.001 506 179 127        0.000 000 000 063
+Angstrom star                                               1.000 014 95 e-10        0.000 000 90 e-10        m
+atomic mass constant                                        1.660 539 066 60 e-27    0.000 000 000 50 e-27    kg
+atomic mass constant energy equivalent                      1.492 418 085 60 e-10    0.000 000 000 45 e-10    J
+atomic mass constant energy equivalent in MeV               931.494 102 42           0.000 000 28             MeV
+atomic mass unit-electron volt relationship                 9.314 941 0242 e8        0.000 000 0028 e8        eV
+atomic mass unit-hartree relationship                       3.423 177 6874 e7        0.000 000 0010 e7        E_h
+atomic mass unit-hertz relationship                         2.252 342 718 71 e23     0.000 000 000 68 e23     Hz
+atomic mass unit-inverse meter relationship                 7.513 006 6104 e14       0.000 000 0023 e14       m^-1
+atomic mass unit-joule relationship                         1.492 418 085 60 e-10    0.000 000 000 45 e-10    J
+atomic mass unit-kelvin relationship                        1.080 954 019 16 e13     0.000 000 000 33 e13     K
+atomic mass unit-kilogram relationship                      1.660 539 066 60 e-27    0.000 000 000 50 e-27    kg
+atomic unit of 1st hyperpolarizability                      3.206 361 3061 e-53      0.000 000 0015 e-53      C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizability                      6.235 379 9905 e-65      0.000 000 0038 e-65      C^4 m^4 J^-3
+atomic unit of action                                       1.054 571 817... e-34    (exact)                  J s
+atomic unit of charge                                       1.602 176 634 e-19       (exact)                  C
+atomic unit of charge density                               1.081 202 384 57 e12     0.000 000 000 49 e12     C m^-3
+atomic unit of current                                      6.623 618 237 510 e-3    0.000 000 000 013 e-3    A
+atomic unit of electric dipole mom.                         8.478 353 6255 e-30      0.000 000 0013 e-30      C m
+atomic unit of electric field                               5.142 206 747 63 e11     0.000 000 000 78 e11     V m^-1
+atomic unit of electric field gradient                      9.717 362 4292 e21       0.000 000 0029 e21       V m^-2
+atomic unit of electric polarizability                      1.648 777 274 36 e-41    0.000 000 000 50 e-41    C^2 m^2 J^-1
+atomic unit of electric potential                           27.211 386 245 988       0.000 000 000 053        V
+atomic unit of electric quadrupole mom.                     4.486 551 5246 e-40      0.000 000 0014 e-40      C m^2
+atomic unit of energy                                       4.359 744 722 2071 e-18  0.000 000 000 0085 e-18  J
+atomic unit of force                                        8.238 723 4983 e-8       0.000 000 0012 e-8       N
+atomic unit of length                                       5.291 772 109 03 e-11    0.000 000 000 80 e-11    m
+atomic unit of mag. dipole mom.                             1.854 802 015 66 e-23    0.000 000 000 56 e-23    J T^-1
+atomic unit of mag. flux density                            2.350 517 567 58 e5      0.000 000 000 71 e5      T
+atomic unit of magnetizability                              7.891 036 6008 e-29      0.000 000 0048 e-29      J T^-2
+atomic unit of mass                                         9.109 383 7015 e-31      0.000 000 0028 e-31      kg
+atomic unit of momentum                                     1.992 851 914 10 e-24    0.000 000 000 30 e-24    kg m s^-1
+atomic unit of permittivity                                 1.112 650 055 45 e-10    0.000 000 000 17 e-10    F m^-1
+atomic unit of time                                         2.418 884 326 5857 e-17  0.000 000 000 0047 e-17  s
+atomic unit of velocity                                     2.187 691 263 64 e6      0.000 000 000 33 e6      m s^-1
+Avogadro constant                                           6.022 140 76 e23         (exact)                  mol^-1
+Bohr magneton                                               9.274 010 0783 e-24      0.000 000 0028 e-24      J T^-1
+Bohr magneton in eV/T                                       5.788 381 8060 e-5       0.000 000 0017 e-5       eV T^-1
+Bohr magneton in Hz/T                                       1.399 624 493 61 e10     0.000 000 000 42 e10     Hz T^-1
+Bohr magneton in inverse meter per tesla                    46.686 447 783           0.000 000 014            m^-1 T^-1
+Bohr magneton in K/T                                        0.671 713 815 63         0.000 000 000 20         K T^-1
+Bohr radius                                                 5.291 772 109 03 e-11    0.000 000 000 80 e-11    m
+Boltzmann constant                                          1.380 649 e-23           (exact)                  J K^-1
+Boltzmann constant in eV/K                                  8.617 333 262... e-5     (exact)                  eV K^-1
+Boltzmann constant in Hz/K                                  2.083 661 912... e10     (exact)                  Hz K^-1
+Boltzmann constant in inverse meter per kelvin              69.503 480 04...         (exact)                  m^-1 K^-1
+characteristic impedance of vacuum                          376.730 313 668          0.000 000 057            ohm
+classical electron radius                                   2.817 940 3262 e-15      0.000 000 0013 e-15      m
+Compton wavelength                                          2.426 310 238 67 e-12    0.000 000 000 73 e-12    m
+conductance quantum                                         7.748 091 729... e-5     (exact)                  S
+conventional value of ampere-90                             1.000 000 088 87...      (exact)                  A
+conventional value of coulomb-90                            1.000 000 088 87...      (exact)                  C
+conventional value of farad-90                              0.999 999 982 20...      (exact)                  F
+conventional value of henry-90                              1.000 000 017 79...      (exact)                  H
+conventional value of Josephson constant                    483 597.9 e9             (exact)                  Hz V^-1
+conventional value of ohm-90                                1.000 000 017 79...      (exact)                  ohm
+conventional value of volt-90                               1.000 000 106 66...      (exact)                  V
+conventional value of von Klitzing constant                 25 812.807               (exact)                  ohm
+conventional value of watt-90                               1.000 000 195 53...      (exact)                  W
+Cu x unit                                                   1.002 076 97 e-13        0.000 000 28 e-13        m
+deuteron-electron mag. mom. ratio                           -4.664 345 551 e-4       0.000 000 012 e-4
+deuteron-electron mass ratio                                3670.482 967 88          0.000 000 13
+deuteron g factor                                           0.857 438 2338           0.000 000 0022
+deuteron mag. mom.                                          4.330 735 094 e-27       0.000 000 011 e-27       J T^-1
+deuteron mag. mom. to Bohr magneton ratio                   4.669 754 570 e-4        0.000 000 012 e-4
+deuteron mag. mom. to nuclear magneton ratio                0.857 438 2338           0.000 000 0022
+deuteron mass                                               3.343 583 7724 e-27      0.000 000 0010 e-27      kg
+deuteron mass energy equivalent                             3.005 063 231 02 e-10    0.000 000 000 91 e-10    J
+deuteron mass energy equivalent in MeV                      1875.612 942 57          0.000 000 57             MeV
+deuteron mass in u                                          2.013 553 212 745        0.000 000 000 040        u
+deuteron molar mass                                         2.013 553 212 05 e-3     0.000 000 000 61 e-3     kg mol^-1
+deuteron-neutron mag. mom. ratio                            -0.448 206 53            0.000 000 11
+deuteron-proton mag. mom. ratio                             0.307 012 209 39         0.000 000 000 79
+deuteron-proton mass ratio                                  1.999 007 501 39         0.000 000 000 11
+deuteron relative atomic mass                               2.013 553 212 745        0.000 000 000 040
+deuteron rms charge radius                                  2.127 99 e-15            0.000 74 e-15            m
+electron charge to mass quotient                            -1.758 820 010 76 e11    0.000 000 000 53 e11     C kg^-1
+electron-deuteron mag. mom. ratio                           -2143.923 4915           0.000 0056
+electron-deuteron mass ratio                                2.724 437 107 462 e-4    0.000 000 000 096 e-4
+electron g factor                                           -2.002 319 304 362 56    0.000 000 000 000 35
+electron gyromag. ratio                                     1.760 859 630 23 e11     0.000 000 000 53 e11     s^-1 T^-1
+electron gyromag. ratio in MHz/T                            28 024.951 4242          0.000 0085               MHz T^-1
+electron-helion mass ratio                                  1.819 543 074 573 e-4    0.000 000 000 079 e-4
+electron mag. mom.                                          -9.284 764 7043 e-24     0.000 000 0028 e-24      J T^-1
+electron mag. mom. anomaly                                  1.159 652 181 28 e-3     0.000 000 000 18 e-3
+electron mag. mom. to Bohr magneton ratio                   -1.001 159 652 181 28    0.000 000 000 000 18
+electron mag. mom. to nuclear magneton ratio                -1838.281 971 88         0.000 000 11
+electron mass                                               9.109 383 7015 e-31      0.000 000 0028 e-31      kg
+electron mass energy equivalent                             8.187 105 7769 e-14      0.000 000 0025 e-14      J
+electron mass energy equivalent in MeV                      0.510 998 950 00         0.000 000 000 15         MeV
+electron mass in u                                          5.485 799 090 65 e-4     0.000 000 000 16 e-4     u
+electron molar mass                                         5.485 799 0888 e-7       0.000 000 0017 e-7       kg mol^-1
+electron-muon mag. mom. ratio                               206.766 9883             0.000 0046
+electron-muon mass ratio                                    4.836 331 69 e-3         0.000 000 11 e-3
+electron-neutron mag. mom. ratio                            960.920 50               0.000 23
+electron-neutron mass ratio                                 5.438 673 4424 e-4       0.000 000 0026 e-4
+electron-proton mag. mom. ratio                             -658.210 687 89          0.000 000 20
+electron-proton mass ratio                                  5.446 170 214 87 e-4     0.000 000 000 33 e-4
+electron relative atomic mass                               5.485 799 090 65 e-4     0.000 000 000 16 e-4
+electron-tau mass ratio                                     2.875 85 e-4             0.000 19 e-4
+electron to alpha particle mass ratio                       1.370 933 554 787 e-4    0.000 000 000 045 e-4
+electron to shielded helion mag. mom. ratio                 864.058 257              0.000 010
+electron to shielded proton mag. mom. ratio                 -658.227 5971            0.000 0072
+electron-triton mass ratio                                  1.819 200 062 251 e-4    0.000 000 000 090 e-4
+electron volt                                               1.602 176 634 e-19       (exact)                  J
+electron volt-atomic mass unit relationship                 1.073 544 102 33 e-9     0.000 000 000 32 e-9     u
+electron volt-hartree relationship                          3.674 932 217 5655 e-2   0.000 000 000 0071 e-2   E_h
+electron volt-hertz relationship                            2.417 989 242... e14     (exact)                  Hz
+electron volt-inverse meter relationship                    8.065 543 937... e5      (exact)                  m^-1
+electron volt-joule relationship                            1.602 176 634 e-19       (exact)                  J
+electron volt-kelvin relationship                           1.160 451 812... e4      (exact)                  K
+electron volt-kilogram relationship                         1.782 661 921... e-36    (exact)                  kg
+elementary charge                                           1.602 176 634 e-19       (exact)                  C
+elementary charge over h-bar                                1.519 267 447... e15     (exact)                  A J^-1
+Faraday constant                                            96 485.332 12...         (exact)                  C mol^-1
+Fermi coupling constant                                     1.166 3787 e-5           0.000 0006 e-5           GeV^-2
+fine-structure constant                                     7.297 352 5693 e-3       0.000 000 0011 e-3
+first radiation constant                                    3.741 771 852... e-16    (exact)                  W m^2
+first radiation constant for spectral radiance              1.191 042 972... e-16    (exact)                  W m^2 sr^-1
+hartree-atomic mass unit relationship                       2.921 262 322 05 e-8     0.000 000 000 88 e-8     u
+hartree-electron volt relationship                          27.211 386 245 988       0.000 000 000 053        eV
+Hartree energy                                              4.359 744 722 2071 e-18  0.000 000 000 0085 e-18  J
+Hartree energy in eV                                        27.211 386 245 988       0.000 000 000 053        eV
+hartree-hertz relationship                                  6.579 683 920 502 e15    0.000 000 000 013 e15    Hz
+hartree-inverse meter relationship                          2.194 746 313 6320 e7    0.000 000 000 0043 e7    m^-1
+hartree-joule relationship                                  4.359 744 722 2071 e-18  0.000 000 000 0085 e-18  J
+hartree-kelvin relationship                                 3.157 750 248 0407 e5    0.000 000 000 0061 e5    K
+hartree-kilogram relationship                               4.850 870 209 5432 e-35  0.000 000 000 0094 e-35  kg
+helion-electron mass ratio                                  5495.885 280 07          0.000 000 24
+helion g factor                                             -4.255 250 615           0.000 000 050
+helion mag. mom.                                            -1.074 617 532 e-26      0.000 000 013 e-26       J T^-1
+helion mag. mom. to Bohr magneton ratio                     -1.158 740 958 e-3       0.000 000 014 e-3
+helion mag. mom. to nuclear magneton ratio                  -2.127 625 307           0.000 000 025
+helion mass                                                 5.006 412 7796 e-27      0.000 000 0015 e-27      kg
+helion mass energy equivalent                               4.499 539 4125 e-10      0.000 000 0014 e-10      J
+helion mass energy equivalent in MeV                        2808.391 607 43          0.000 000 85             MeV
+helion mass in u                                            3.014 932 247 175        0.000 000 000 097        u
+helion molar mass                                           3.014 932 246 13 e-3     0.000 000 000 91 e-3     kg mol^-1
+helion-proton mass ratio                                    2.993 152 671 67         0.000 000 000 13
+helion relative atomic mass                                 3.014 932 247 175        0.000 000 000 097
+helion shielding shift                                      5.996 743 e-5            0.000 010 e-5
+hertz-atomic mass unit relationship                         4.439 821 6652 e-24      0.000 000 0013 e-24      u
+hertz-electron volt relationship                            4.135 667 696... e-15    (exact)                  eV
+hertz-hartree relationship                                  1.519 829 846 0570 e-16  0.000 000 000 0029 e-16  E_h
+hertz-inverse meter relationship                            3.335 640 951... e-9     (exact)                  m^-1
+hertz-joule relationship                                    6.626 070 15 e-34        (exact)                  J
+hertz-kelvin relationship                                   4.799 243 073... e-11    (exact)                  K
+hertz-kilogram relationship                                 7.372 497 323... e-51    (exact)                  kg
+hyperfine transition frequency of Cs-133                    9 192 631 770            (exact)                  Hz
+inverse fine-structure constant                             137.035 999 084          0.000 000 021
+inverse meter-atomic mass unit relationship                 1.331 025 050 10 e-15    0.000 000 000 40 e-15    u
+inverse meter-electron volt relationship                    1.239 841 984... e-6     (exact)                  eV
+inverse meter-hartree relationship                          4.556 335 252 9120 e-8   0.000 000 000 0088 e-8   E_h
+inverse meter-hertz relationship                            299 792 458              (exact)                  Hz
+inverse meter-joule relationship                            1.986 445 857... e-25    (exact)                  J
+inverse meter-kelvin relationship                           1.438 776 877... e-2     (exact)                  K
+inverse meter-kilogram relationship                         2.210 219 094... e-42    (exact)                  kg
+inverse of conductance quantum                              12 906.403 72...         (exact)                  ohm
+Josephson constant                                          483 597.848 4... e9      (exact)                  Hz V^-1
+joule-atomic mass unit relationship                         6.700 535 2565 e9        0.000 000 0020 e9        u
+joule-electron volt relationship                            6.241 509 074... e18     (exact)                  eV
+joule-hartree relationship                                  2.293 712 278 3963 e17   0.000 000 000 0045 e17   E_h
+joule-hertz relationship                                    1.509 190 179... e33     (exact)                  Hz
+joule-inverse meter relationship                            5.034 116 567... e24     (exact)                  m^-1
+joule-kelvin relationship                                   7.242 970 516... e22     (exact)                  K
+joule-kilogram relationship                                 1.112 650 056... e-17    (exact)                  kg
+kelvin-atomic mass unit relationship                        9.251 087 3014 e-14      0.000 000 0028 e-14      u
+kelvin-electron volt relationship                           8.617 333 262... e-5     (exact)                  eV
+kelvin-hartree relationship                                 3.166 811 563 4556 e-6   0.000 000 000 0061 e-6   E_h
+kelvin-hertz relationship                                   2.083 661 912... e10     (exact)                  Hz
+kelvin-inverse meter relationship                           69.503 480 04...         (exact)                  m^-1
+kelvin-joule relationship                                   1.380 649 e-23           (exact)                  J
+kelvin-kilogram relationship                                1.536 179 187... e-40    (exact)                  kg
+kilogram-atomic mass unit relationship                      6.022 140 7621 e26       0.000 000 0018 e26       u
+kilogram-electron volt relationship                         5.609 588 603... e35     (exact)                  eV
+kilogram-hartree relationship                               2.061 485 788 7409 e34   0.000 000 000 0040 e34   E_h
+kilogram-hertz relationship                                 1.356 392 489... e50     (exact)                  Hz
+kilogram-inverse meter relationship                         4.524 438 335... e41     (exact)                  m^-1
+kilogram-joule relationship                                 8.987 551 787... e16     (exact)                  J
+kilogram-kelvin relationship                                6.509 657 260... e39     (exact)                  K
+lattice parameter of silicon                                5.431 020 511 e-10       0.000 000 089 e-10       m
+lattice spacing of ideal Si (220)                           1.920 155 716 e-10       0.000 000 032 e-10       m
+Loschmidt constant (273.15 K, 100 kPa)                      2.651 645 804... e25     (exact)                  m^-3
+Loschmidt constant (273.15 K, 101.325 kPa)                  2.686 780 111... e25     (exact)                  m^-3
+luminous efficacy                                           683                      (exact)                  lm W^-1
+mag. flux quantum                                           2.067 833 848... e-15    (exact)                  Wb
+molar gas constant                                          8.314 462 618...         (exact)                  J mol^-1 K^-1
+molar mass constant                                         0.999 999 999 65 e-3     0.000 000 000 30 e-3     kg mol^-1
+molar mass of carbon-12                                     11.999 999 9958 e-3      0.000 000 0036 e-3       kg mol^-1
+molar Planck constant                                       3.990 312 712... e-10    (exact)                  J Hz^-1 mol^-1
+molar volume of ideal gas (273.15 K, 100 kPa)               22.710 954 64... e-3     (exact)                  m^3 mol^-1
+molar volume of ideal gas (273.15 K, 101.325 kPa)           22.413 969 54... e-3     (exact)                  m^3 mol^-1
+molar volume of silicon                                     1.205 883 199 e-5        0.000 000 060 e-5        m^3 mol^-1
+Mo x unit                                                   1.002 099 52 e-13        0.000 000 53 e-13        m
+muon Compton wavelength                                     1.173 444 110 e-14       0.000 000 026 e-14       m
+muon-electron mass ratio                                    206.768 2830             0.000 0046
+muon g factor                                               -2.002 331 8418          0.000 000 0013
+muon mag. mom.                                              -4.490 448 30 e-26       0.000 000 10 e-26        J T^-1
+muon mag. mom. anomaly                                      1.165 920 89 e-3         0.000 000 63 e-3
+muon mag. mom. to Bohr magneton ratio                       -4.841 970 47 e-3        0.000 000 11 e-3
+muon mag. mom. to nuclear magneton ratio                    -8.890 597 03            0.000 000 20
+muon mass                                                   1.883 531 627 e-28       0.000 000 042 e-28       kg
+muon mass energy equivalent                                 1.692 833 804 e-11       0.000 000 038 e-11       J
+muon mass energy equivalent in MeV                          105.658 3755             0.000 0023               MeV
+muon mass in u                                              0.113 428 9259           0.000 000 0025           u
+muon molar mass                                             1.134 289 259 e-4        0.000 000 025 e-4        kg mol^-1
+muon-neutron mass ratio                                     0.112 454 5170           0.000 000 0025
+muon-proton mag. mom. ratio                                 -3.183 345 142           0.000 000 071
+muon-proton mass ratio                                      0.112 609 5264           0.000 000 0025
+muon-tau mass ratio                                         5.946 35 e-2             0.000 40 e-2
+natural unit of action                                      1.054 571 817... e-34    (exact)                  J s
+natural unit of action in eV s                              6.582 119 569... e-16    (exact)                  eV s
+natural unit of energy                                      8.187 105 7769 e-14      0.000 000 0025 e-14      J
+natural unit of energy in MeV                               0.510 998 950 00         0.000 000 000 15         MeV
+natural unit of length                                      3.861 592 6796 e-13      0.000 000 0012 e-13      m
+natural unit of mass                                        9.109 383 7015 e-31      0.000 000 0028 e-31      kg
+natural unit of momentum                                    2.730 924 530 75 e-22    0.000 000 000 82 e-22    kg m s^-1
+natural unit of momentum in MeV/c                           0.510 998 950 00         0.000 000 000 15         MeV/c
+natural unit of time                                        1.288 088 668 19 e-21    0.000 000 000 39 e-21    s
+natural unit of velocity                                    299 792 458              (exact)                  m s^-1
+neutron Compton wavelength                                  1.319 590 905 81 e-15    0.000 000 000 75 e-15    m
+neutron-electron mag. mom. ratio                            1.040 668 82 e-3         0.000 000 25 e-3
+neutron-electron mass ratio                                 1838.683 661 73          0.000 000 89
+neutron g factor                                            -3.826 085 45            0.000 000 90
+neutron gyromag. ratio                                      1.832 471 71 e8          0.000 000 43 e8          s^-1 T^-1
+neutron gyromag. ratio in MHz/T                             29.164 6931              0.000 0069               MHz T^-1
+neutron mag. mom.                                           -9.662 3651 e-27         0.000 0023 e-27          J T^-1
+neutron mag. mom. to Bohr magneton ratio                    -1.041 875 63 e-3        0.000 000 25 e-3
+neutron mag. mom. to nuclear magneton ratio                 -1.913 042 73            0.000 000 45
+neutron mass                                                1.674 927 498 04 e-27    0.000 000 000 95 e-27    kg
+neutron mass energy equivalent                              1.505 349 762 87 e-10    0.000 000 000 86 e-10    J
+neutron mass energy equivalent in MeV                       939.565 420 52           0.000 000 54             MeV
+neutron mass in u                                           1.008 664 915 95         0.000 000 000 49         u
+neutron molar mass                                          1.008 664 915 60 e-3     0.000 000 000 57 e-3     kg mol^-1
+neutron-muon mass ratio                                     8.892 484 06             0.000 000 20
+neutron-proton mag. mom. ratio                              -0.684 979 34            0.000 000 16
+neutron-proton mass difference                              2.305 574 35 e-30        0.000 000 82 e-30        kg
+neutron-proton mass difference energy equivalent            2.072 146 89 e-13        0.000 000 74 e-13        J
+neutron-proton mass difference energy equivalent in MeV     1.293 332 36             0.000 000 46             MeV
+neutron-proton mass difference in u                         1.388 449 33 e-3         0.000 000 49 e-3         u
+neutron-proton mass ratio                                   1.001 378 419 31         0.000 000 000 49
+neutron relative atomic mass                                1.008 664 915 95         0.000 000 000 49
+neutron-tau mass ratio                                      0.528 779                0.000 036
+neutron to shielded proton mag. mom. ratio                  -0.684 996 94            0.000 000 16
+Newtonian constant of gravitation                           6.674 30 e-11            0.000 15 e-11            m^3 kg^-1 s^-2
+Newtonian constant of gravitation over h-bar c              6.708 83 e-39            0.000 15 e-39            (GeV/c^2)^-2
+nuclear magneton                                            5.050 783 7461 e-27      0.000 000 0015 e-27      J T^-1
+nuclear magneton in eV/T                                    3.152 451 258 44 e-8     0.000 000 000 96 e-8     eV T^-1
+nuclear magneton in inverse meter per tesla                 2.542 623 413 53 e-2     0.000 000 000 78 e-2     m^-1 T^-1
+nuclear magneton in K/T                                     3.658 267 7756 e-4       0.000 000 0011 e-4       K T^-1
+nuclear magneton in MHz/T                                   7.622 593 2291           0.000 000 0023           MHz T^-1
+Planck constant                                             6.626 070 15 e-34        (exact)                  J Hz^-1
+Planck constant in eV/Hz                                    4.135 667 696... e-15    (exact)                  eV Hz^-1
+Planck length                                               1.616 255 e-35           0.000 018 e-35           m
+Planck mass                                                 2.176 434 e-8            0.000 024 e-8            kg
+Planck mass energy equivalent in GeV                        1.220 890 e19            0.000 014 e19            GeV
+Planck temperature                                          1.416 784 e32            0.000 016 e32            K
+Planck time                                                 5.391 247 e-44           0.000 060 e-44           s
+proton charge to mass quotient                              9.578 833 1560 e7        0.000 000 0029 e7        C kg^-1
+proton Compton wavelength                                   1.321 409 855 39 e-15    0.000 000 000 40 e-15    m
+proton-electron mass ratio                                  1836.152 673 43          0.000 000 11
+proton g factor                                             5.585 694 6893           0.000 000 0016
+proton gyromag. ratio                                       2.675 221 8744 e8        0.000 000 0011 e8        s^-1 T^-1
+proton gyromag. ratio in MHz/T                              42.577 478 518           0.000 000 018            MHz T^-1
+proton mag. mom.                                            1.410 606 797 36 e-26    0.000 000 000 60 e-26    J T^-1
+proton mag. mom. to Bohr magneton ratio                     1.521 032 202 30 e-3     0.000 000 000 46 e-3
+proton mag. mom. to nuclear magneton ratio                  2.792 847 344 63         0.000 000 000 82
+proton mag. shielding correction                            2.5689 e-5               0.0011 e-5
+proton mass                                                 1.672 621 923 69 e-27    0.000 000 000 51 e-27    kg
+proton mass energy equivalent                               1.503 277 615 98 e-10    0.000 000 000 46 e-10    J
+proton mass energy equivalent in MeV                        938.272 088 16           0.000 000 29             MeV
+proton mass in u                                            1.007 276 466 621        0.000 000 000 053        u
+proton molar mass                                           1.007 276 466 27 e-3     0.000 000 000 31 e-3     kg mol^-1
+proton-muon mass ratio                                      8.880 243 37             0.000 000 20
+proton-neutron mag. mom. ratio                              -1.459 898 05            0.000 000 34
+proton-neutron mass ratio                                   0.998 623 478 12         0.000 000 000 49
+proton relative atomic mass                                 1.007 276 466 621        0.000 000 000 053
+proton rms charge radius                                    8.414 e-16               0.019 e-16               m
+proton-tau mass ratio                                       0.528 051                0.000 036
+quantum of circulation                                      3.636 947 5516 e-4       0.000 000 0011 e-4       m^2 s^-1
+quantum of circulation times 2                              7.273 895 1032 e-4       0.000 000 0022 e-4       m^2 s^-1
+reduced Compton wavelength                                  3.861 592 6796 e-13      0.000 000 0012 e-13      m
+reduced muon Compton wavelength                             1.867 594 306 e-15       0.000 000 042 e-15       m
+reduced neutron Compton wavelength                          2.100 194 1552 e-16      0.000 000 0012 e-16      m
+reduced Planck constant                                     1.054 571 817... e-34    (exact)                  J s
+reduced Planck constant in eV s                             6.582 119 569... e-16    (exact)                  eV s
+reduced Planck constant times c in MeV fm                   197.326 980 4...         (exact)                  MeV fm
+reduced proton Compton wavelength                           2.103 089 103 36 e-16    0.000 000 000 64 e-16    m
+reduced tau Compton wavelength                              1.110 538 e-16           0.000 075 e-16           m
+Rydberg constant                                            10 973 731.568 160       0.000 021                m^-1
+Rydberg constant times c in Hz                              3.289 841 960 2508 e15   0.000 000 000 0064 e15   Hz
+Rydberg constant times hc in eV                             13.605 693 122 994       0.000 000 000 026        eV
+Rydberg constant times hc in J                              2.179 872 361 1035 e-18  0.000 000 000 0042 e-18  J
+Sackur-Tetrode constant (1 K, 100 kPa)                      -1.151 707 537 06        0.000 000 000 45
+Sackur-Tetrode constant (1 K, 101.325 kPa)                  -1.164 870 523 58        0.000 000 000 45
+second radiation constant                                   1.438 776 877... e-2     (exact)                  m K
+shielded helion gyromag. ratio                              2.037 894 569 e8         0.000 000 024 e8         s^-1 T^-1
+shielded helion gyromag. ratio in MHz/T                     32.434 099 42            0.000 000 38             MHz T^-1
+shielded helion mag. mom.                                   -1.074 553 090 e-26      0.000 000 013 e-26       J T^-1
+shielded helion mag. mom. to Bohr magneton ratio            -1.158 671 471 e-3       0.000 000 014 e-3
+shielded helion mag. mom. to nuclear magneton ratio         -2.127 497 719           0.000 000 025
+shielded helion to proton mag. mom. ratio                   -0.761 766 5618          0.000 000 0089
+shielded helion to shielded proton mag. mom. ratio          -0.761 786 1313          0.000 000 0033
+shielded proton gyromag. ratio                              2.675 153 151 e8         0.000 000 029 e8         s^-1 T^-1
+shielded proton gyromag. ratio in MHz/T                     42.576 384 74            0.000 000 46             MHz T^-1
+shielded proton mag. mom.                                   1.410 570 560 e-26       0.000 000 015 e-26       J T^-1
+shielded proton mag. mom. to Bohr magneton ratio            1.520 993 128 e-3        0.000 000 017 e-3
+shielded proton mag. mom. to nuclear magneton ratio         2.792 775 599            0.000 000 030
+shielding difference of d and p in HD                       2.0200 e-8               0.0020 e-8
+shielding difference of t and p in HT                       2.4140 e-8               0.0020 e-8
+speed of light in vacuum                                    299 792 458              (exact)                  m s^-1
+standard acceleration of gravity                            9.806 65                 (exact)                  m s^-2
+standard atmosphere                                         101 325                  (exact)                  Pa
+standard-state pressure                                     100 000                  (exact)                  Pa
+Stefan-Boltzmann constant                                   5.670 374 419... e-8     (exact)                  W m^-2 K^-4
+tau Compton wavelength                                      6.977 71 e-16            0.000 47 e-16            m
+tau-electron mass ratio                                     3477.23                  0.23
+tau energy equivalent                                       1776.86                  0.12                     MeV
+tau mass                                                    3.167 54 e-27            0.000 21 e-27            kg
+tau mass energy equivalent                                  2.846 84 e-10            0.000 19 e-10            J
+tau mass in u                                               1.907 54                 0.000 13                 u
+tau molar mass                                              1.907 54 e-3             0.000 13 e-3             kg mol^-1
+tau-muon mass ratio                                         16.8170                  0.0011
+tau-neutron mass ratio                                      1.891 15                 0.000 13
+tau-proton mass ratio                                       1.893 76                 0.000 13
+Thomson cross section                                       6.652 458 7321 e-29      0.000 000 0060 e-29      m^2
+triton-electron mass ratio                                  5496.921 535 73          0.000 000 27
+triton g factor                                             5.957 924 931            0.000 000 012
+triton mag. mom.                                            1.504 609 5202 e-26      0.000 000 0030 e-26      J T^-1
+triton mag. mom. to Bohr magneton ratio                     1.622 393 6651 e-3       0.000 000 0032 e-3
+triton mag. mom. to nuclear magneton ratio                  2.978 962 4656           0.000 000 0059
+triton mass                                                 5.007 356 7446 e-27      0.000 000 0015 e-27      kg
+triton mass energy equivalent                               4.500 387 8060 e-10      0.000 000 0014 e-10      J
+triton mass energy equivalent in MeV                        2808.921 132 98          0.000 000 85             MeV
+triton mass in u                                            3.015 500 716 21         0.000 000 000 12         u
+triton molar mass                                           3.015 500 715 17 e-3     0.000 000 000 92 e-3     kg mol^-1
+triton-proton mass ratio                                    2.993 717 034 14         0.000 000 000 15
+triton relative atomic mass                                 3.015 500 716 21         0.000 000 000 12
+triton to proton mag. mom. ratio                            1.066 639 9191           0.000 000 0021
+unified atomic mass unit                                    1.660 539 066 60 e-27    0.000 000 000 50 e-27    kg
+vacuum electric permittivity                                8.854 187 8128 e-12      0.000 000 0013 e-12      F m^-1
+vacuum mag. permeability                                    1.256 637 062 12 e-6     0.000 000 000 19 e-6     N A^-2
+von Klitzing constant                                       25 812.807 45...         (exact)                  ohm
+weak mixing angle                                           0.222 90                 0.000 30
+Wien frequency displacement law constant                    5.878 925 757... e10     (exact)                  Hz K^-1
+Wien wavelength displacement law constant                   2.897 771 955... e-3     (exact)                  m K
+W to Z mass ratio                                           0.881 53                 0.000 17                   """
+
+
+def exact2018(exact):
+    # SI base constants
+    c = exact['speed of light in vacuum']
+    h = exact['Planck constant']
+    e = exact['elementary charge']
+    k = exact['Boltzmann constant']
+    N_A = exact['Avogadro constant']
+
+    # Other useful constants
+    R = N_A * k
+    hbar = h / (2*math.pi)
+    G_0 = 2 * e**2 / h
+
+    # Wien law numerical constants: https://en.wikipedia.org/wiki/Wien%27s_displacement_law
+    # (alpha - 3)*exp(alpha) + 3 = 0
+    # (x - 5)*exp(x) + 5 = 0
+    alpha_W = 2.821439372122078893403  # 3 + lambertw(-3 * exp(-3))
+    x_W = 4.965114231744276303699  # 5 + lambertw(-5 * exp(-5))
+
+    # Conventional electrical unit
+    # See https://en.wikipedia.org/wiki/Conventional_electrical_unit
+    K_J90 = exact['conventional value of Josephson constant']
+    K_J = 2 * e / h
+    R_K90 = exact['conventional value of von Klitzing constant']
+    R_K = h / e**2
+    V_90 = K_J90 / K_J
+    ohm_90 = R_K / R_K90
+    A_90 = V_90 / ohm_90
+
+    replace = {
+        'atomic unit of action': hbar,
+        'Boltzmann constant in eV/K': k / e,
+        'Boltzmann constant in Hz/K': k / h,
+        'Boltzmann constant in inverse meter per kelvin': k / (h * c),
+        'conductance quantum': G_0,
+        'conventional value of ampere-90': A_90,
+        'conventional value of coulomb-90': A_90,
+        'conventional value of farad-90': 1 / ohm_90,
+        'conventional value of henry-90': ohm_90,
+        'conventional value of ohm-90': ohm_90,
+        'conventional value of volt-90': V_90,
+        'conventional value of watt-90': V_90**2 / ohm_90,
+        'electron volt-hertz relationship': e / h,
+        'electron volt-inverse meter relationship': e / (h * c),
+        'electron volt-kelvin relationship': e / k,
+        'electron volt-kilogram relationship': e / c**2,
+        'elementary charge over h-bar': e / hbar,
+        'Faraday constant': e * N_A,
+        'first radiation constant': 2 * math.pi * h * c**2,
+        'first radiation constant for spectral radiance': 2 * h * c**2,
+        'hertz-electron volt relationship': h / e,
+        'hertz-inverse meter relationship': 1 / c,
+        'hertz-kelvin relationship': h / k,
+        'hertz-kilogram relationship': h / c**2,
+        'inverse meter-electron volt relationship': (h * c) / e,
+        'inverse meter-joule relationship': h * c,
+        'inverse meter-kelvin relationship': h * c / k,
+        'inverse meter-kilogram relationship': h / c,
+        'inverse of conductance quantum': 1 / G_0,
+        'Josephson constant': K_J,
+        'joule-electron volt relationship': 1 / e,
+        'joule-hertz relationship': 1 / h,
+        'joule-inverse meter relationship': 1 / (h * c),
+        'joule-kelvin relationship': 1 / k,
+        'joule-kilogram relationship': 1 / c**2,
+        'kelvin-electron volt relationship': k / e,
+        'kelvin-hertz relationship': k / h,
+        'kelvin-inverse meter relationship': k / (h * c),
+        'kelvin-kilogram relationship': k / c**2,
+        'kilogram-electron volt relationship': c**2 / e,
+        'kilogram-hertz relationship': c**2 / h,
+        'kilogram-inverse meter relationship': c / h,
+        'kilogram-joule relationship': c**2,
+        'kilogram-kelvin relationship': c**2 / k,
+        'Loschmidt constant (273.15 K, 100 kPa)': 100e3 / 273.15 / k,
+        'Loschmidt constant (273.15 K, 101.325 kPa)': 101.325e3 / 273.15 / k,
+        'mag. flux quantum': h / (2 * e),
+        'molar gas constant': R,
+        'molar Planck constant': h * N_A,
+        'molar volume of ideal gas (273.15 K, 100 kPa)': R * 273.15 / 100e3,
+        'molar volume of ideal gas (273.15 K, 101.325 kPa)': R * 273.15 / 101.325e3,
+        'natural unit of action': hbar,
+        'natural unit of action in eV s': hbar / e,
+        'Planck constant in eV/Hz': h / e,
+        'reduced Planck constant': hbar,
+        'reduced Planck constant in eV s': hbar / e,
+        'reduced Planck constant times c in MeV fm': hbar * c / (e * 1e6 * 1e-15),
+        'second radiation constant': h * c / k,
+        'Stefan-Boltzmann constant': 2 * math.pi**5 * k**4 / (15 * h**3 * c**2),
+        'von Klitzing constant': R_K,
+        'Wien frequency displacement law constant': alpha_W * k / h,
+        'Wien wavelength displacement law constant': h * c / (x_W * k),
+    }
+    return replace
+
+
+txt2022 = """\
+alpha particle-electron mass ratio                          7294.299 541 71          0.000 000 17             
+alpha particle mass                                         6.644 657 3450 e-27      0.000 000 0021 e-27      kg
+alpha particle mass energy equivalent                       5.971 920 1997 e-10      0.000 000 0019 e-10      J
+alpha particle mass energy equivalent in MeV                3727.379 4118            0.000 0012               MeV
+alpha particle mass in u                                    4.001 506 179 129        0.000 000 000 062        u
+alpha particle molar mass                                   4.001 506 1833 e-3       0.000 000 0012 e-3       kg mol^-1
+alpha particle-proton mass ratio                            3.972 599 690 252        0.000 000 000 070        
+alpha particle relative atomic mass                         4.001 506 179 129        0.000 000 000 062        
+alpha particle rms charge radius                            1.6785 e-15              0.0021 e-15              m
+Angstrom star                                               1.000 014 95 e-10        0.000 000 90 e-10        m
+atomic mass constant                                        1.660 539 068 92 e-27    0.000 000 000 52 e-27    kg
+atomic mass constant energy equivalent                      1.492 418 087 68 e-10    0.000 000 000 46 e-10    J
+atomic mass constant energy equivalent in MeV               931.494 103 72           0.000 000 29             MeV
+atomic mass unit-electron volt relationship                 9.314 941 0372 e8        0.000 000 0029 e8        eV
+atomic mass unit-hartree relationship                       3.423 177 6922 e7        0.000 000 0011 e7        E_h
+atomic mass unit-hertz relationship                         2.252 342 721 85 e23     0.000 000 000 70 e23     Hz
+atomic mass unit-inverse meter relationship                 7.513 006 6209 e14       0.000 000 0023 e14       m^-1
+atomic mass unit-joule relationship                         1.492 418 087 68 e-10    0.000 000 000 46 e-10    J
+atomic mass unit-kelvin relationship                        1.080 954 020 67 e13     0.000 000 000 34 e13     K
+atomic mass unit-kilogram relationship                      1.660 539 068 92 e-27    0.000 000 000 52 e-27    kg
+atomic unit of 1st hyperpolarizability                      3.206 361 2996 e-53      0.000 000 0015 e-53      C^3 m^3 J^-2
+atomic unit of 2nd hyperpolarizability                      6.235 379 9735 e-65      0.000 000 0039 e-65      C^4 m^4 J^-3
+atomic unit of action                                       1.054 571 817... e-34    (exact)                  J s
+atomic unit of charge                                       1.602 176 634 e-19       (exact)                  C
+atomic unit of charge density                               1.081 202 386 77 e12     0.000 000 000 51 e12     C m^-3
+atomic unit of current                                      6.623 618 237 5082 e-3   0.000 000 000 0072 e-3   A
+atomic unit of electric dipole mom.                         8.478 353 6198 e-30      0.000 000 0013 e-30      C m
+atomic unit of electric field                               5.142 206 751 12 e11     0.000 000 000 80 e11     V m^-1
+atomic unit of electric field gradient                      9.717 362 4424 e21       0.000 000 0030 e21       V m^-2
+atomic unit of electric polarizability                      1.648 777 272 12 e-41    0.000 000 000 51 e-41    C^2 m^2 J^-1
+atomic unit of electric potential                           27.211 386 245 981       0.000 000 000 030        V
+atomic unit of electric quadrupole mom.                     4.486 551 5185 e-40      0.000 000 0014 e-40      C m^2
+atomic unit of energy                                       4.359 744 722 2060 e-18  0.000 000 000 0048 e-18  J
+atomic unit of force                                        8.238 723 5038 e-8       0.000 000 0013 e-8       N
+atomic unit of length                                       5.291 772 105 44 e-11    0.000 000 000 82 e-11    m
+atomic unit of mag. dipole mom.                             1.854 802 013 15 e-23    0.000 000 000 58 e-23    J T^-1
+atomic unit of mag. flux density                            2.350 517 570 77 e5      0.000 000 000 73 e5      T
+atomic unit of magnetizability                              7.891 036 5794 e-29      0.000 000 0049 e-29      J T^-2
+atomic unit of mass                                         9.109 383 7139 e-31      0.000 000 0028 e-31      kg
+atomic unit of momentum                                     1.992 851 915 45 e-24    0.000 000 000 31 e-24    kg m s^-1
+atomic unit of permittivity                                 1.112 650 056 20 e-10    0.000 000 000 17 e-10    F m^-1
+atomic unit of time                                         2.418 884 326 5864 e-17  0.000 000 000 0026 e-17  s
+atomic unit of velocity                                     2.187 691 262 16 e6      0.000 000 000 34 e6      m s^-1
+Avogadro constant                                           6.022 140 76 e23         (exact)                  mol^-1
+Bohr magneton                                               9.274 010 0657 e-24      0.000 000 0029 e-24      J T^-1
+Bohr magneton in eV/T                                       5.788 381 7982 e-5       0.000 000 0018 e-5       eV T^-1
+Bohr magneton in Hz/T                                       1.399 624 491 71 e10     0.000 000 000 44 e10     Hz T^-1
+Bohr magneton in inverse meter per tesla                    46.686 447 719           0.000 000 015            m^-1 T^-1
+Bohr magneton in K/T                                        0.671 713 814 72         0.000 000 000 21         K T^-1
+Bohr radius                                                 5.291 772 105 44 e-11    0.000 000 000 82 e-11    m
+Boltzmann constant                                          1.380 649 e-23           (exact)                  J K^-1
+Boltzmann constant in eV/K                                  8.617 333 262... e-5     (exact)                  eV K^-1
+Boltzmann constant in Hz/K                                  2.083 661 912... e10     (exact)                  Hz K^-1
+Boltzmann constant in inverse meter per kelvin              69.503 480 04...         (exact)                  m^-1 K^-1
+characteristic impedance of vacuum                          376.730 313 412          0.000 000 059            ohm
+classical electron radius                                   2.817 940 3205 e-15      0.000 000 0013 e-15      m
+Compton wavelength                                          2.426 310 235 38 e-12    0.000 000 000 76 e-12    m
+conductance quantum                                         7.748 091 729... e-5     (exact)                  S
+conventional value of ampere-90                             1.000 000 088 87...      (exact)                  A
+conventional value of coulomb-90                            1.000 000 088 87...      (exact)                  C
+conventional value of farad-90                              0.999 999 982 20...      (exact)                  F
+conventional value of henry-90                              1.000 000 017 79...      (exact)                  H
+conventional value of Josephson constant                    483 597.9 e9             (exact)                  Hz V^-1
+conventional value of ohm-90                                1.000 000 017 79...      (exact)                  ohm
+conventional value of volt-90                               1.000 000 106 66...      (exact)                  V
+conventional value of von Klitzing constant                 25 812.807               (exact)                  ohm
+conventional value of watt-90                               1.000 000 195 53...      (exact)                  W
+Copper x unit                                               1.002 076 97 e-13        0.000 000 28 e-13        m
+deuteron-electron mag. mom. ratio                           -4.664 345 550 e-4       0.000 000 012 e-4        
+deuteron-electron mass ratio                                3670.482 967 655         0.000 000 063            
+deuteron g factor                                           0.857 438 2335           0.000 000 0022           
+deuteron mag. mom.                                          4.330 735 087 e-27       0.000 000 011 e-27       J T^-1
+deuteron mag. mom. to Bohr magneton ratio                   4.669 754 568 e-4        0.000 000 012 e-4        
+deuteron mag. mom. to nuclear magneton ratio                0.857 438 2335           0.000 000 0022           
+deuteron mass                                               3.343 583 7768 e-27      0.000 000 0010 e-27      kg
+deuteron mass energy equivalent                             3.005 063 234 91 e-10    0.000 000 000 94 e-10    J
+deuteron mass energy equivalent in MeV                      1875.612 945 00          0.000 000 58             MeV
+deuteron mass in u                                          2.013 553 212 544        0.000 000 000 015        u
+deuteron molar mass                                         2.013 553 214 66 e-3     0.000 000 000 63 e-3     kg mol^-1
+deuteron-neutron mag. mom. ratio                            -0.448 206 52            0.000 000 11             
+deuteron-proton mag. mom. ratio                             0.307 012 209 30         0.000 000 000 79         
+deuteron-proton mass ratio                                  1.999 007 501 2699       0.000 000 000 0084       
+deuteron relative atomic mass                               2.013 553 212 544        0.000 000 000 015        
+deuteron rms charge radius                                  2.127 78 e-15            0.000 27 e-15            m
+electron charge to mass quotient                            -1.758 820 008 38 e11    0.000 000 000 55 e11     C kg^-1
+electron-deuteron mag. mom. ratio                           -2143.923 4921           0.000 0056               
+electron-deuteron mass ratio                                2.724 437 107 629 e-4    0.000 000 000 047 e-4    
+electron g factor                                           -2.002 319 304 360 92    0.000 000 000 000 36     
+electron gyromag. ratio                                     1.760 859 627 84 e11     0.000 000 000 55 e11     s^-1 T^-1
+electron gyromag. ratio in MHz/T                            28 024.951 3861          0.000 0087               MHz T^-1
+electron-helion mass ratio                                  1.819 543 074 649 e-4    0.000 000 000 053 e-4    
+electron mag. mom.                                          -9.284 764 6917 e-24     0.000 000 0029 e-24      J T^-1
+electron mag. mom. anomaly                                  1.159 652 180 46 e-3     0.000 000 000 18 e-3     
+electron mag. mom. to Bohr magneton ratio                   -1.001 159 652 180 46    0.000 000 000 000 18     
+electron mag. mom. to nuclear magneton ratio                -1838.281 971 877        0.000 000 032            
+electron mass                                               9.109 383 7139 e-31      0.000 000 0028 e-31      kg
+electron mass energy equivalent                             8.187 105 7880 e-14      0.000 000 0026 e-14      J
+electron mass energy equivalent in MeV                      0.510 998 950 69         0.000 000 000 16         MeV
+electron mass in u                                          5.485 799 090 441 e-4    0.000 000 000 097 e-4    u
+electron molar mass                                         5.485 799 0962 e-7       0.000 000 0017 e-7       kg mol^-1
+electron-muon mag. mom. ratio                               206.766 9881             0.000 0046               
+electron-muon mass ratio                                    4.836 331 70 e-3         0.000 000 11 e-3         
+electron-neutron mag. mom. ratio                            960.920 48               0.000 23                 
+electron-neutron mass ratio                                 5.438 673 4416 e-4       0.000 000 0022 e-4       
+electron-proton mag. mom. ratio                             -658.210 687 89          0.000 000 19             
+electron-proton mass ratio                                  5.446 170 214 889 e-4    0.000 000 000 094 e-4    
+electron relative atomic mass                               5.485 799 090 441 e-4    0.000 000 000 097 e-4    
+electron-tau mass ratio                                     2.875 85 e-4             0.000 19 e-4             
+electron to alpha particle mass ratio                       1.370 933 554 733 e-4    0.000 000 000 032 e-4    
+electron to shielded helion mag. mom. ratio                 864.058 239 86           0.000 000 70             
+electron to shielded proton mag. mom. ratio                 -658.227 5856            0.000 0027               
+electron-triton mass ratio                                  1.819 200 062 327 e-4    0.000 000 000 068 e-4    
+electron volt                                               1.602 176 634 e-19       (exact)                  J
+electron volt-atomic mass unit relationship                 1.073 544 100 83 e-9     0.000 000 000 33 e-9     u
+electron volt-hartree relationship                          3.674 932 217 5665 e-2   0.000 000 000 0040 e-2   E_h
+electron volt-hertz relationship                            2.417 989 242... e14     (exact)                  Hz
+electron volt-inverse meter relationship                    8.065 543 937... e5      (exact)                  m^-1
+electron volt-joule relationship                            1.602 176 634 e-19       (exact)                  J
+electron volt-kelvin relationship                           1.160 451 812... e4      (exact)                  K
+electron volt-kilogram relationship                         1.782 661 921... e-36    (exact)                  kg
+elementary charge                                           1.602 176 634 e-19       (exact)                  C
+elementary charge over h-bar                                1.519 267 447... e15     (exact)                  A J^-1
+Faraday constant                                            96 485.332 12...         (exact)                  C mol^-1
+Fermi coupling constant                                     1.166 3787 e-5           0.000 0006 e-5           GeV^-2
+fine-structure constant                                     7.297 352 5643 e-3       0.000 000 0011 e-3       
+first radiation constant                                    3.741 771 852... e-16    (exact)                  W m^2
+first radiation constant for spectral radiance              1.191 042 972... e-16    (exact)                  W m^2 sr^-1
+hartree-atomic mass unit relationship                       2.921 262 317 97 e-8     0.000 000 000 91 e-8     u
+hartree-electron volt relationship                          27.211 386 245 981       0.000 000 000 030        eV
+Hartree energy                                              4.359 744 722 2060 e-18  0.000 000 000 0048 e-18  J
+Hartree energy in eV                                        27.211 386 245 981       0.000 000 000 030        eV
+hartree-hertz relationship                                  6.579 683 920 4999 e15   0.000 000 000 0072 e15   Hz
+hartree-inverse meter relationship                          2.194 746 313 6314 e7    0.000 000 000 0024 e7    m^-1
+hartree-joule relationship                                  4.359 744 722 2060 e-18  0.000 000 000 0048 e-18  J
+hartree-kelvin relationship                                 3.157 750 248 0398 e5    0.000 000 000 0034 e5    K
+hartree-kilogram relationship                               4.850 870 209 5419 e-35  0.000 000 000 0053 e-35  kg
+helion-electron mass ratio                                  5495.885 279 84          0.000 000 16             
+helion g factor                                             -4.255 250 6995          0.000 000 0034           
+helion mag. mom.                                            -1.074 617 551 98 e-26   0.000 000 000 93 e-26    J T^-1
+helion mag. mom. to Bohr magneton ratio                     -1.158 740 980 83 e-3    0.000 000 000 94 e-3     
+helion mag. mom. to nuclear magneton ratio                  -2.127 625 3498          0.000 000 0017           
+helion mass                                                 5.006 412 7862 e-27      0.000 000 0016 e-27      kg
+helion mass energy equivalent                               4.499 539 4185 e-10      0.000 000 0014 e-10      J
+helion mass energy equivalent in MeV                        2808.391 611 12          0.000 000 88             MeV
+helion mass in u                                            3.014 932 246 932        0.000 000 000 074        u
+helion molar mass                                           3.014 932 250 10 e-3     0.000 000 000 94 e-3     kg mol^-1
+helion-proton mass ratio                                    2.993 152 671 552        0.000 000 000 070        
+helion relative atomic mass                                 3.014 932 246 932        0.000 000 000 074        
+helion shielding shift                                      5.996 7029 e-5           0.000 0023 e-5           
+hertz-atomic mass unit relationship                         4.439 821 6590 e-24      0.000 000 0014 e-24      u
+hertz-electron volt relationship                            4.135 667 696... e-15    (exact)                  eV
+hertz-hartree relationship                                  1.519 829 846 0574 e-16  0.000 000 000 0017 e-16  E_h
+hertz-inverse meter relationship                            3.335 640 951... e-9     (exact)                  m^-1
+hertz-joule relationship                                    6.626 070 15 e-34        (exact)                  J
+hertz-kelvin relationship                                   4.799 243 073... e-11    (exact)                  K
+hertz-kilogram relationship                                 7.372 497 323... e-51    (exact)                  kg
+hyperfine transition frequency of Cs-133                    9 192 631 770            (exact)                  Hz
+inverse fine-structure constant                             137.035 999 177          0.000 000 021            
+inverse meter-atomic mass unit relationship                 1.331 025 048 24 e-15    0.000 000 000 41 e-15    u
+inverse meter-electron volt relationship                    1.239 841 984... e-6     (exact)                  eV
+inverse meter-hartree relationship                          4.556 335 252 9132 e-8   0.000 000 000 0050 e-8   E_h
+inverse meter-hertz relationship                            299 792 458              (exact)                  Hz
+inverse meter-joule relationship                            1.986 445 857... e-25    (exact)                  J
+inverse meter-kelvin relationship                           1.438 776 877... e-2     (exact)                  K
+inverse meter-kilogram relationship                         2.210 219 094... e-42    (exact)                  kg
+inverse of conductance quantum                              12 906.403 72...         (exact)                  ohm
+Josephson constant                                          483 597.848 4... e9      (exact)                  Hz V^-1
+joule-atomic mass unit relationship                         6.700 535 2471 e9        0.000 000 0021 e9        u
+joule-electron volt relationship                            6.241 509 074... e18     (exact)                  eV
+joule-hartree relationship                                  2.293 712 278 3969 e17   0.000 000 000 0025 e17   E_h
+joule-hertz relationship                                    1.509 190 179... e33     (exact)                  Hz
+joule-inverse meter relationship                            5.034 116 567... e24     (exact)                  m^-1
+joule-kelvin relationship                                   7.242 970 516... e22     (exact)                  K
+joule-kilogram relationship                                 1.112 650 056... e-17    (exact)                  kg
+kelvin-atomic mass unit relationship                        9.251 087 2884 e-14      0.000 000 0029 e-14      u
+kelvin-electron volt relationship                           8.617 333 262... e-5     (exact)                  eV
+kelvin-hartree relationship                                 3.166 811 563 4564 e-6   0.000 000 000 0035 e-6   E_h
+kelvin-hertz relationship                                   2.083 661 912... e10     (exact)                  Hz
+kelvin-inverse meter relationship                           69.503 480 04...         (exact)                  m^-1
+kelvin-joule relationship                                   1.380 649 e-23           (exact)                  J
+kelvin-kilogram relationship                                1.536 179 187... e-40    (exact)                  kg
+kilogram-atomic mass unit relationship                      6.022 140 7537 e26       0.000 000 0019 e26       u
+kilogram-electron volt relationship                         5.609 588 603... e35     (exact)                  eV
+kilogram-hartree relationship                               2.061 485 788 7415 e34   0.000 000 000 0022 e34   E_h
+kilogram-hertz relationship                                 1.356 392 489... e50     (exact)                  Hz
+kilogram-inverse meter relationship                         4.524 438 335... e41     (exact)                  m^-1
+kilogram-joule relationship                                 8.987 551 787... e16     (exact)                  J
+kilogram-kelvin relationship                                6.509 657 260... e39     (exact)                  K
+lattice parameter of silicon                                5.431 020 511 e-10       0.000 000 089 e-10       m
+lattice spacing of ideal Si (220)                           1.920 155 716 e-10       0.000 000 032 e-10       m
+Loschmidt constant (273.15 K, 100 kPa)                      2.651 645 804... e25     (exact)                  m^-3
+Loschmidt constant (273.15 K, 101.325 kPa)                  2.686 780 111... e25     (exact)                  m^-3
+luminous efficacy                                           683                      (exact)                  lm W^-1
+mag. flux quantum                                           2.067 833 848... e-15    (exact)                  Wb
+molar gas constant                                          8.314 462 618...         (exact)                  J mol^-1 K^-1
+molar mass constant                                         1.000 000 001 05 e-3     0.000 000 000 31 e-3     kg mol^-1
+molar mass of carbon-12                                     12.000 000 0126 e-3      0.000 000 0037 e-3       kg mol^-1
+molar Planck constant                                       3.990 312 712... e-10    (exact)                  J Hz^-1 mol^-1
+molar volume of ideal gas (273.15 K, 100 kPa)               22.710 954 64... e-3     (exact)                  m^3 mol^-1
+molar volume of ideal gas (273.15 K, 101.325 kPa)           22.413 969 54... e-3     (exact)                  m^3 mol^-1
+molar volume of silicon                                     1.205 883 199 e-5        0.000 000 060 e-5        m^3 mol^-1
+Molybdenum x unit                                           1.002 099 52 e-13        0.000 000 53 e-13        m
+muon Compton wavelength                                     1.173 444 110 e-14       0.000 000 026 e-14       m
+muon-electron mass ratio                                    206.768 2827             0.000 0046               
+muon g factor                                               -2.002 331 841 23        0.000 000 000 82         
+muon mag. mom.                                              -4.490 448 30 e-26       0.000 000 10 e-26        J T^-1
+muon mag. mom. anomaly                                      1.165 920 62 e-3         0.000 000 41 e-3         
+muon mag. mom. to Bohr magneton ratio                       -4.841 970 48 e-3        0.000 000 11 e-3         
+muon mag. mom. to nuclear magneton ratio                    -8.890 597 04            0.000 000 20             
+muon mass                                                   1.883 531 627 e-28       0.000 000 042 e-28       kg
+muon mass energy equivalent                                 1.692 833 804 e-11       0.000 000 038 e-11       J
+muon mass energy equivalent in MeV                          105.658 3755             0.000 0023               MeV
+muon mass in u                                              0.113 428 9257           0.000 000 0025           u
+muon molar mass                                             1.134 289 258 e-4        0.000 000 025 e-4        kg mol^-1
+muon-neutron mass ratio                                     0.112 454 5168           0.000 000 0025           
+muon-proton mag. mom. ratio                                 -3.183 345 146           0.000 000 071            
+muon-proton mass ratio                                      0.112 609 5262           0.000 000 0025           
+muon-tau mass ratio                                         5.946 35 e-2             0.000 40 e-2             
+natural unit of action                                      1.054 571 817... e-34    (exact)                  J s
+natural unit of action in eV s                              6.582 119 569... e-16    (exact)                  eV s
+natural unit of energy                                      8.187 105 7880 e-14      0.000 000 0026 e-14      J
+natural unit of energy in MeV                               0.510 998 950 69         0.000 000 000 16         MeV
+natural unit of length                                      3.861 592 6744 e-13      0.000 000 0012 e-13      m
+natural unit of mass                                        9.109 383 7139 e-31      0.000 000 0028 e-31      kg
+natural unit of momentum                                    2.730 924 534 46 e-22    0.000 000 000 85 e-22    kg m s^-1
+natural unit of momentum in MeV/c                           0.510 998 950 69         0.000 000 000 16         MeV/c
+natural unit of time                                        1.288 088 666 44 e-21    0.000 000 000 40 e-21    s
+natural unit of velocity                                    299 792 458              (exact)                  m s^-1
+neutron Compton wavelength                                  1.319 590 903 82 e-15    0.000 000 000 67 e-15    m
+neutron-electron mag. mom. ratio                            1.040 668 84 e-3         0.000 000 24 e-3         
+neutron-electron mass ratio                                 1838.683 662 00          0.000 000 74             
+neutron g factor                                            -3.826 085 52            0.000 000 90             
+neutron gyromag. ratio                                      1.832 471 74 e8          0.000 000 43 e8          s^-1 T^-1
+neutron gyromag. ratio in MHz/T                             29.164 6935              0.000 0069               MHz T^-1
+neutron mag. mom.                                           -9.662 3653 e-27         0.000 0023 e-27          J T^-1
+neutron mag. mom. to Bohr magneton ratio                    -1.041 875 65 e-3        0.000 000 25 e-3         
+neutron mag. mom. to nuclear magneton ratio                 -1.913 042 76            0.000 000 45             
+neutron mass                                                1.674 927 500 56 e-27    0.000 000 000 85 e-27    kg
+neutron mass energy equivalent                              1.505 349 765 14 e-10    0.000 000 000 76 e-10    J
+neutron mass energy equivalent in MeV                       939.565 421 94           0.000 000 48             MeV
+neutron mass in u                                           1.008 664 916 06         0.000 000 000 40         u
+neutron molar mass                                          1.008 664 917 12 e-3     0.000 000 000 51 e-3     kg mol^-1
+neutron-muon mass ratio                                     8.892 484 08             0.000 000 20             
+neutron-proton mag. mom. ratio                              -0.684 979 35            0.000 000 16             
+neutron-proton mass difference                              2.305 574 61 e-30        0.000 000 67 e-30        kg
+neutron-proton mass difference energy equivalent            2.072 147 12 e-13        0.000 000 60 e-13        J
+neutron-proton mass difference energy equivalent in MeV     1.293 332 51             0.000 000 38             MeV
+neutron-proton mass difference in u                         1.388 449 48 e-3         0.000 000 40 e-3         u
+neutron-proton mass ratio                                   1.001 378 419 46         0.000 000 000 40         
+neutron relative atomic mass                                1.008 664 916 06         0.000 000 000 40         
+neutron-tau mass ratio                                      0.528 779                0.000 036                
+neutron to shielded proton mag. mom. ratio                  -0.684 996 94            0.000 000 16             
+Newtonian constant of gravitation                           6.674 30 e-11            0.000 15 e-11            m^3 kg^-1 s^-2
+Newtonian constant of gravitation over h-bar c              6.708 83 e-39            0.000 15 e-39            (GeV/c^2)^-2
+nuclear magneton                                            5.050 783 7393 e-27      0.000 000 0016 e-27      J T^-1
+nuclear magneton in eV/T                                    3.152 451 254 17 e-8     0.000 000 000 98 e-8     eV T^-1
+nuclear magneton in inverse meter per tesla                 2.542 623 410 09 e-2     0.000 000 000 79 e-2     m^-1 T^-1
+nuclear magneton in K/T                                     3.658 267 7706 e-4       0.000 000 0011 e-4       K T^-1
+nuclear magneton in MHz/T                                   7.622 593 2188           0.000 000 0024           MHz T^-1
+Planck constant                                             6.626 070 15 e-34        (exact)                  J Hz^-1
+Planck constant in eV/Hz                                    4.135 667 696... e-15    (exact)                  eV Hz^-1
+Planck length                                               1.616 255 e-35           0.000 018 e-35           m
+Planck mass                                                 2.176 434 e-8            0.000 024 e-8            kg
+Planck mass energy equivalent in GeV                        1.220 890 e19            0.000 014 e19            GeV
+Planck temperature                                          1.416 784 e32            0.000 016 e32            K
+Planck time                                                 5.391 247 e-44           0.000 060 e-44           s
+proton charge to mass quotient                              9.578 833 1430 e7        0.000 000 0030 e7        C kg^-1
+proton Compton wavelength                                   1.321 409 853 60 e-15    0.000 000 000 41 e-15    m
+proton-electron mass ratio                                  1836.152 673 426         0.000 000 032            
+proton g factor                                             5.585 694 6893           0.000 000 0016           
+proton gyromag. ratio                                       2.675 221 8708 e8        0.000 000 0011 e8        s^-1 T^-1
+proton gyromag. ratio in MHz/T                              42.577 478 461           0.000 000 018            MHz T^-1
+proton mag. mom.                                            1.410 606 795 45 e-26    0.000 000 000 60 e-26    J T^-1
+proton mag. mom. to Bohr magneton ratio                     1.521 032 202 30 e-3     0.000 000 000 45 e-3     
+proton mag. mom. to nuclear magneton ratio                  2.792 847 344 63         0.000 000 000 82         
+proton mag. shielding correction                            2.567 15 e-5             0.000 41 e-5             
+proton mass                                                 1.672 621 925 95 e-27    0.000 000 000 52 e-27    kg
+proton mass energy equivalent                               1.503 277 618 02 e-10    0.000 000 000 47 e-10    J
+proton mass energy equivalent in MeV                        938.272 089 43           0.000 000 29             MeV
+proton mass in u                                            1.007 276 466 5789       0.000 000 000 0083       u
+proton molar mass                                           1.007 276 467 64 e-3     0.000 000 000 31 e-3     kg mol^-1
+proton-muon mass ratio                                      8.880 243 38             0.000 000 20             
+proton-neutron mag. mom. ratio                              -1.459 898 02            0.000 000 34             
+proton-neutron mass ratio                                   0.998 623 477 97         0.000 000 000 40         
+proton relative atomic mass                                 1.007 276 466 5789       0.000 000 000 0083       
+proton rms charge radius                                    8.4075 e-16              0.0064 e-16              m
+proton-tau mass ratio                                       0.528 051                0.000 036                
+quantum of circulation                                      3.636 947 5467 e-4       0.000 000 0011 e-4       m^2 s^-1
+quantum of circulation times 2                              7.273 895 0934 e-4       0.000 000 0023 e-4       m^2 s^-1
+reduced Compton wavelength                                  3.861 592 6744 e-13      0.000 000 0012 e-13      m
+reduced muon Compton wavelength                             1.867 594 306 e-15       0.000 000 042 e-15       m
+reduced neutron Compton wavelength                          2.100 194 1520 e-16      0.000 000 0011 e-16      m
+reduced Planck constant                                     1.054 571 817... e-34    (exact)                  J s
+reduced Planck constant in eV s                             6.582 119 569... e-16    (exact)                  eV s
+reduced Planck constant times c in MeV fm                   197.326 980 4...         (exact)                  MeV fm
+reduced proton Compton wavelength                           2.103 089 100 51 e-16    0.000 000 000 66 e-16    m
+reduced tau Compton wavelength                              1.110 538 e-16           0.000 075 e-16           m
+Rydberg constant                                            10 973 731.568 157       0.000 012                m^-1
+Rydberg constant times c in Hz                              3.289 841 960 2500 e15   0.000 000 000 0036 e15   Hz
+Rydberg constant times hc in eV                             13.605 693 122 990       0.000 000 000 015        eV
+Rydberg constant times hc in J                              2.179 872 361 1030 e-18  0.000 000 000 0024 e-18  J
+Sackur-Tetrode constant (1 K, 100 kPa)                      -1.151 707 534 96        0.000 000 000 47         
+Sackur-Tetrode constant (1 K, 101.325 kPa)                  -1.164 870 521 49        0.000 000 000 47         
+second radiation constant                                   1.438 776 877... e-2     (exact)                  m K
+shielded helion gyromag. ratio                              2.037 894 6078 e8        0.000 000 0018 e8        s^-1 T^-1
+shielded helion gyromag. ratio in MHz/T                     32.434 100 033           0.000 000 028            MHz T^-1
+shielded helion mag. mom.                                   -1.074 553 110 35 e-26   0.000 000 000 93 e-26    J T^-1
+shielded helion mag. mom. to Bohr magneton ratio            -1.158 671 494 57 e-3    0.000 000 000 94 e-3     
+shielded helion mag. mom. to nuclear magneton ratio         -2.127 497 7624          0.000 000 0017           
+shielded helion to proton mag. mom. ratio                   -0.761 766 577 21        0.000 000 000 66         
+shielded helion to shielded proton mag. mom. ratio          -0.761 786 1334          0.000 000 0031           
+shielded proton gyromag. ratio                              2.675 153 194 e8         0.000 000 011 e8         s^-1 T^-1
+shielded proton gyromag. ratio in MHz/T                     42.576 385 43            0.000 000 17             MHz T^-1
+shielded proton mag. mom.                                   1.410 570 5830 e-26      0.000 000 0058 e-26      J T^-1
+shielded proton mag. mom. to Bohr magneton ratio            1.520 993 1551 e-3       0.000 000 0062 e-3       
+shielded proton mag. mom. to nuclear magneton ratio         2.792 775 648            0.000 000 011            
+shielding difference of d and p in HD                       1.987 70 e-8             0.000 10 e-8             
+shielding difference of t and p in HT                       2.394 50 e-8             0.000 20 e-8             
+speed of light in vacuum                                    299 792 458              (exact)                  m s^-1
+standard acceleration of gravity                            9.806 65                 (exact)                  m s^-2
+standard atmosphere                                         101 325                  (exact)                  Pa
+standard-state pressure                                     100 000                  (exact)                  Pa
+Stefan-Boltzmann constant                                   5.670 374 419... e-8     (exact)                  W m^-2 K^-4
+tau Compton wavelength                                      6.977 71 e-16            0.000 47 e-16            m
+tau-electron mass ratio                                     3477.23                  0.23                     
+tau energy equivalent                                       1776.86                  0.12                     MeV
+tau mass                                                    3.167 54 e-27            0.000 21 e-27            kg
+tau mass energy equivalent                                  2.846 84 e-10            0.000 19 e-10            J
+tau mass in u                                               1.907 54                 0.000 13                 u
+tau molar mass                                              1.907 54 e-3             0.000 13 e-3             kg mol^-1
+tau-muon mass ratio                                         16.8170                  0.0011                   
+tau-neutron mass ratio                                      1.891 15                 0.000 13                 
+tau-proton mass ratio                                       1.893 76                 0.000 13                 
+Thomson cross section                                       6.652 458 7051 e-29      0.000 000 0062 e-29      m^2
+triton-electron mass ratio                                  5496.921 535 51          0.000 000 21             
+triton g factor                                             5.957 924 930            0.000 000 012            
+triton mag. mom.                                            1.504 609 5178 e-26      0.000 000 0030 e-26      J T^-1
+triton mag. mom. to Bohr magneton ratio                     1.622 393 6648 e-3       0.000 000 0032 e-3       
+triton mag. mom. to nuclear magneton ratio                  2.978 962 4650           0.000 000 0059           
+triton mass                                                 5.007 356 7512 e-27      0.000 000 0016 e-27      kg
+triton mass energy equivalent                               4.500 387 8119 e-10      0.000 000 0014 e-10      J
+triton mass energy equivalent in MeV                        2808.921 136 68          0.000 000 88             MeV
+triton mass in u                                            3.015 500 715 97         0.000 000 000 10         u
+triton molar mass                                           3.015 500 719 13 e-3     0.000 000 000 94 e-3     kg mol^-1
+triton-proton mass ratio                                    2.993 717 034 03         0.000 000 000 10         
+triton relative atomic mass                                 3.015 500 715 97         0.000 000 000 10         
+triton to proton mag. mom. ratio                            1.066 639 9189           0.000 000 0021           
+unified atomic mass unit                                    1.660 539 068 92 e-27    0.000 000 000 52 e-27    kg
+vacuum electric permittivity                                8.854 187 8188 e-12      0.000 000 0014 e-12      F m^-1
+vacuum mag. permeability                                    1.256 637 061 27 e-6     0.000 000 000 20 e-6     N A^-2
+von Klitzing constant                                       25 812.807 45...         (exact)                  ohm
+weak mixing angle                                           0.223 05                 0.000 23                 
+Wien frequency displacement law constant                    5.878 925 757... e10     (exact)                  Hz K^-1
+Wien wavelength displacement law constant                   2.897 771 955... e-3     (exact)                  m K
+W to Z mass ratio                                           0.881 45                 0.000 13                    """
+
+
+exact2022 = exact2018
+
+
+# -----------------------------------------------------------------------------
+
+
+def parse_constants_2002to2014(
+    d: str, exact_func: Callable[[Any], Any]
+) -> dict[str, tuple[float, str, float]]:
+    constants: dict[str, tuple[float, str, float]] = {}
+    exact: dict[str, float] = {}
+    need_replace = set()
+    for line in d.split('\n'):
+        name = line[:55].rstrip()
+        val = float(line[55:77].replace(' ', '').replace('...', ''))
+        is_truncated = '...' in line[55:77]
+        is_exact = '(exact)' in line[77:99]
+        if is_truncated and is_exact:
+            # missing decimals, use computed exact value
+            need_replace.add(name)
+        elif is_exact:
+            exact[name] = val
+        else:
+            assert not is_truncated
+        uncert = float(line[77:99].replace(' ', '').replace('(exact)', '0'))
+        units = line[99:].rstrip()
+        constants[name] = (val, units, uncert)
+    replace = exact_func(exact)
+    replace_exact(constants, need_replace, replace)
+    return constants
+
+
+def parse_constants_2018toXXXX(
+    d: str, exact_func: Callable[[Any], Any]
+) -> dict[str, tuple[float, str, float]]:
+    constants: dict[str, tuple[float, str, float]] = {}
+    exact: dict[str, float] = {}
+    need_replace = set()
+    for line in d.split('\n'):
+        name = line[:60].rstrip()
+        val = float(line[60:85].replace(' ', '').replace('...', ''))
+        is_truncated = '...' in line[60:85]
+        is_exact = '(exact)' in line[85:110]
+        if is_truncated and is_exact:
+            # missing decimals, use computed exact value
+            need_replace.add(name)
+        elif is_exact:
+            exact[name] = val
+        else:
+            assert not is_truncated
+        uncert = float(line[85:110].replace(' ', '').replace('(exact)', '0'))
+        units = line[110:].rstrip()
+        constants[name] = (val, units, uncert)
+    replace = exact_func(exact)
+    replace_exact(constants, need_replace, replace)
+    return constants
+
+
+def replace_exact(d, to_replace, exact):
+    for name in to_replace:
+        assert name in exact, f'Missing exact value: {name}'
+        assert abs(exact[name]/d[name][0] - 1) <= 1e-9, \
+            f'Bad exact value: {name}: { exact[name]}, {d[name][0]}'
+        d[name] = (exact[name],) + d[name][1:]
+    assert set(exact.keys()) == set(to_replace)
+
+
+_physical_constants_2002 = parse_constants_2002to2014(txt2002, exact2002)
+_physical_constants_2006 = parse_constants_2002to2014(txt2006, exact2006)
+_physical_constants_2010 = parse_constants_2002to2014(txt2010, exact2010)
+_physical_constants_2014 = parse_constants_2002to2014(txt2014, exact2014)
+_physical_constants_2018 = parse_constants_2018toXXXX(txt2018, exact2018)
+_physical_constants_2022 = parse_constants_2018toXXXX(txt2022, exact2022)
+
+physical_constants: dict[str, tuple[float, str, float]] = {}
+physical_constants.update(_physical_constants_2002)
+physical_constants.update(_physical_constants_2006)
+physical_constants.update(_physical_constants_2010)
+physical_constants.update(_physical_constants_2014)
+physical_constants.update(_physical_constants_2018)
+physical_constants.update(_physical_constants_2022)
+_current_constants = _physical_constants_2022
+_current_codata = "CODATA 2022"
+
+# check obsolete values
+_obsolete_constants = {}
+for k in physical_constants:
+    if k not in _current_constants:
+        _obsolete_constants[k] = True
+
+# generate some additional aliases
+_aliases = {}
+for k in _physical_constants_2002:
+    if 'magn.' in k:
+        _aliases[k] = k.replace('magn.', 'mag.')
+for k in _physical_constants_2006:
+    if 'momentum' in k:
+        _aliases[k] = k.replace('momentum', 'mom.um')
+for k in _physical_constants_2018:
+    if 'momentum' in k:
+        _aliases[k] = k.replace('momentum', 'mom.um')
+for k in _physical_constants_2022:
+    if 'momentum' in k:
+        _aliases[k] = k.replace('momentum', 'mom.um')        
+
+# CODATA 2018 and 2022: renamed and no longer exact; use as aliases
+_aliases['mag. constant'] = 'vacuum mag. permeability'
+_aliases['electric constant'] = 'vacuum electric permittivity'
+
+
+_extra_alias_keys = ['natural unit of velocity',
+                     'natural unit of action',
+                     'natural unit of action in eV s',
+                     'natural unit of mass',
+                     'natural unit of energy',
+                     'natural unit of energy in MeV',
+                     'natural unit of mom.um',
+                     'natural unit of mom.um in MeV/c',
+                     'natural unit of length',
+                     'natural unit of time']
+
+# finally, insert aliases for values
+for k, v in list(_aliases.items()):
+    if v in _current_constants or v in _extra_alias_keys:
+        physical_constants[k] = physical_constants[v]
+    else:
+        del _aliases[k]
+
+
+class ConstantWarning(DeprecationWarning):
+    """Accessing a constant no longer in current CODATA data set"""
+    pass
+
+
+def _check_obsolete(key: str) -> None:
+    if key in _obsolete_constants and key not in _aliases:
+        warnings.warn(f"Constant '{key}' is not in current {_current_codata} data set",
+                      ConstantWarning, stacklevel=3)
+
+
+def value(key: str) -> float:
+    """
+    Value in physical_constants indexed by key
+
+    Parameters
+    ----------
+    key : Python string
+        Key in dictionary `physical_constants`
+
+    Returns
+    -------
+    value : float
+        Value in `physical_constants` corresponding to `key`
+
+    Examples
+    --------
+    >>> from scipy import constants
+    >>> constants.value('elementary charge')
+    1.602176634e-19
+
+    """
+    _check_obsolete(key)
+    return physical_constants[key][0]
+
+
+def unit(key: str) -> str:
+    """
+    Unit in physical_constants indexed by key
+
+    Parameters
+    ----------
+    key : Python string
+        Key in dictionary `physical_constants`
+
+    Returns
+    -------
+    unit : Python string
+        Unit in `physical_constants` corresponding to `key`
+
+    Examples
+    --------
+    >>> from scipy import constants
+    >>> constants.unit('proton mass')
+    'kg'
+
+    """
+    _check_obsolete(key)
+    return physical_constants[key][1]
+
+
+def precision(key: str) -> float:
+    """
+    Relative precision in physical_constants indexed by key
+
+    Parameters
+    ----------
+    key : Python string
+        Key in dictionary `physical_constants`
+
+    Returns
+    -------
+    prec : float
+        Relative precision in `physical_constants` corresponding to `key`
+
+    Examples
+    --------
+    >>> from scipy import constants
+    >>> constants.precision('proton mass')
+    5.1e-37
+
+    """
+    _check_obsolete(key)
+    return physical_constants[key][2] / physical_constants[key][0]
+
+
+def find(sub: str | None = None, disp: bool = False) -> Any:
+    """
+    Return list of physical_constant keys containing a given string.
+
+    Parameters
+    ----------
+    sub : str
+        Sub-string to search keys for. By default, return all keys.
+    disp : bool
+        If True, print the keys that are found and return None.
+        Otherwise, return the list of keys without printing anything.
+
+    Returns
+    -------
+    keys : list or None
+        If `disp` is False, the list of keys is returned.
+        Otherwise, None is returned.
+
+    Examples
+    --------
+    >>> from scipy.constants import find, physical_constants
+
+    Which keys in the ``physical_constants`` dictionary contain 'boltzmann'?
+
+    >>> find('boltzmann')
+    ['Boltzmann constant',
+     'Boltzmann constant in Hz/K',
+     'Boltzmann constant in eV/K',
+     'Boltzmann constant in inverse meter per kelvin',
+     'Stefan-Boltzmann constant']
+
+    Get the constant called 'Boltzmann constant in Hz/K':
+
+    >>> physical_constants['Boltzmann constant in Hz/K']
+    (20836619120.0, 'Hz K^-1', 0.0)
+
+    Find constants with 'radius' in the key:
+
+    >>> find('radius')
+    ['Bohr radius',
+     'alpha particle rms charge radius',
+     'classical electron radius',
+     'deuteron rms charge radius',
+     'proton rms charge radius']
+    >>> physical_constants['classical electron radius']
+    (2.8179403262e-15, 'm', 1.3e-24)
+
+    """
+    if sub is None:
+        result = list(_current_constants.keys())
+    else:
+        result = [key for key in _current_constants
+                  if sub.lower() in key.lower()]
+
+    result.sort()
+    if disp:
+        for key in result:
+            print(key)
+        return
+    else:
+        return result
+
+# This is not used here, but it must be defined to pass
+# scipy/_lib/tests/test_public_api.py::test_private_but_present_deprecation
+c = value('speed of light in vacuum')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_constants.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_constants.py
new file mode 100644
index 0000000000000000000000000000000000000000..a3a098d5469bb7195202a638022b1120ec0969bd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/_constants.py
@@ -0,0 +1,366 @@
+"""
+Collection of physical constants and conversion factors.
+
+Most constants are in SI units, so you can do
+print '10 mile per minute is', 10*mile/minute, 'm/s or', 10*mile/(minute*knot), 'knots'
+
+The list is not meant to be comprehensive, but just convenient for everyday use.
+"""
+
+import math as _math
+from typing import TYPE_CHECKING, Any
+
+from ._codata import value as _cd
+
+if TYPE_CHECKING:
+    import numpy.typing as npt
+
+from scipy._lib._array_api import array_namespace, _asarray
+
+
+"""
+BasSw 2006
+physical constants: imported from CODATA
+unit conversion: see e.g., NIST special publication 811
+Use at own risk: double-check values before calculating your Mars orbit-insertion burn.
+Some constants exist in a few variants, which are marked with suffixes.
+The ones without any suffix should be the most common ones.
+"""
+
+__all__ = [
+    'Avogadro', 'Boltzmann', 'Btu', 'Btu_IT', 'Btu_th', 'G',
+    'Julian_year', 'N_A', 'Planck', 'R', 'Rydberg',
+    'Stefan_Boltzmann', 'Wien', 'acre', 'alpha',
+    'angstrom', 'arcmin', 'arcminute', 'arcsec',
+    'arcsecond', 'astronomical_unit', 'atm',
+    'atmosphere', 'atomic_mass', 'atto', 'au', 'bar',
+    'barrel', 'bbl', 'blob', 'c', 'calorie',
+    'calorie_IT', 'calorie_th', 'carat', 'centi',
+    'convert_temperature', 'day', 'deci', 'degree',
+    'degree_Fahrenheit', 'deka', 'dyn', 'dyne', 'e',
+    'eV', 'electron_mass', 'electron_volt',
+    'elementary_charge', 'epsilon_0', 'erg',
+    'exa', 'exbi', 'femto', 'fermi', 'fine_structure',
+    'fluid_ounce', 'fluid_ounce_US', 'fluid_ounce_imp',
+    'foot', 'g', 'gallon', 'gallon_US', 'gallon_imp',
+    'gas_constant', 'gibi', 'giga', 'golden', 'golden_ratio',
+    'grain', 'gram', 'gravitational_constant', 'h', 'hbar',
+    'hectare', 'hecto', 'horsepower', 'hour', 'hp',
+    'inch', 'k', 'kgf', 'kibi', 'kilo', 'kilogram_force',
+    'kmh', 'knot', 'lambda2nu', 'lb', 'lbf',
+    'light_year', 'liter', 'litre', 'long_ton', 'm_e',
+    'm_n', 'm_p', 'm_u', 'mach', 'mebi', 'mega',
+    'metric_ton', 'micro', 'micron', 'mil', 'mile',
+    'milli', 'minute', 'mmHg', 'mph', 'mu_0', 'nano',
+    'nautical_mile', 'neutron_mass', 'nu2lambda',
+    'ounce', 'oz', 'parsec', 'pebi', 'peta',
+    'pi', 'pico', 'point', 'pound', 'pound_force',
+    'proton_mass', 'psi', 'pt', 'quecto', 'quetta', 'ronna', 'ronto',
+    'short_ton', 'sigma', 'slinch', 'slug', 'speed_of_light',
+    'speed_of_sound', 'stone', 'survey_foot',
+    'survey_mile', 'tebi', 'tera', 'ton_TNT',
+    'torr', 'troy_ounce', 'troy_pound', 'u',
+    'week', 'yard', 'year', 'yobi', 'yocto',
+    'yotta', 'zebi', 'zepto', 'zero_Celsius', 'zetta'
+]
+
+
+# mathematical constants
+pi = _math.pi
+golden = golden_ratio = (1 + _math.sqrt(5)) / 2
+
+# SI prefixes
+quetta = 1e30
+ronna = 1e27
+yotta = 1e24
+zetta = 1e21
+exa = 1e18
+peta = 1e15
+tera = 1e12
+giga = 1e9
+mega = 1e6
+kilo = 1e3
+hecto = 1e2
+deka = 1e1
+deci = 1e-1
+centi = 1e-2
+milli = 1e-3
+micro = 1e-6
+nano = 1e-9
+pico = 1e-12
+femto = 1e-15
+atto = 1e-18
+zepto = 1e-21
+yocto = 1e-24
+ronto = 1e-27
+quecto = 1e-30
+
+# binary prefixes
+kibi = 2**10
+mebi = 2**20
+gibi = 2**30
+tebi = 2**40
+pebi = 2**50
+exbi = 2**60
+zebi = 2**70
+yobi = 2**80
+
+# physical constants
+c = speed_of_light = _cd('speed of light in vacuum')
+mu_0 = _cd('vacuum mag. permeability')
+epsilon_0 = _cd('vacuum electric permittivity')
+h = Planck = _cd('Planck constant')
+hbar = _cd('reduced Planck constant')
+G = gravitational_constant = _cd('Newtonian constant of gravitation')
+g = _cd('standard acceleration of gravity')
+e = elementary_charge = _cd('elementary charge')
+R = gas_constant = _cd('molar gas constant')
+alpha = fine_structure = _cd('fine-structure constant')
+N_A = Avogadro = _cd('Avogadro constant')
+k = Boltzmann = _cd('Boltzmann constant')
+sigma = Stefan_Boltzmann = _cd('Stefan-Boltzmann constant')
+Wien = _cd('Wien wavelength displacement law constant')
+Rydberg = _cd('Rydberg constant')
+
+# mass in kg
+gram = 1e-3
+metric_ton = 1e3
+grain = 64.79891e-6
+lb = pound = 7000 * grain  # avoirdupois
+blob = slinch = pound * g / 0.0254  # lbf*s**2/in (added in 1.0.0)
+slug = blob / 12  # lbf*s**2/foot (added in 1.0.0)
+oz = ounce = pound / 16
+stone = 14 * pound
+long_ton = 2240 * pound
+short_ton = 2000 * pound
+
+troy_ounce = 480 * grain  # only for metals / gems
+troy_pound = 12 * troy_ounce
+carat = 200e-6
+
+m_e = electron_mass = _cd('electron mass')
+m_p = proton_mass = _cd('proton mass')
+m_n = neutron_mass = _cd('neutron mass')
+m_u = u = atomic_mass = _cd('atomic mass constant')
+
+# angle in rad
+degree = pi / 180
+arcmin = arcminute = degree / 60
+arcsec = arcsecond = arcmin / 60
+
+# time in second
+minute = 60.0
+hour = 60 * minute
+day = 24 * hour
+week = 7 * day
+year = 365 * day
+Julian_year = 365.25 * day
+
+# length in meter
+inch = 0.0254
+foot = 12 * inch
+yard = 3 * foot
+mile = 1760 * yard
+mil = inch / 1000
+pt = point = inch / 72  # typography
+survey_foot = 1200.0 / 3937
+survey_mile = 5280 * survey_foot
+nautical_mile = 1852.0
+fermi = 1e-15
+angstrom = 1e-10
+micron = 1e-6
+au = astronomical_unit = 149597870700.0
+light_year = Julian_year * c
+parsec = au / arcsec
+
+# pressure in pascal
+atm = atmosphere = _cd('standard atmosphere')
+bar = 1e5
+torr = mmHg = atm / 760
+psi = pound * g / (inch * inch)
+
+# area in meter**2
+hectare = 1e4
+acre = 43560 * foot**2
+
+# volume in meter**3
+litre = liter = 1e-3
+gallon = gallon_US = 231 * inch**3  # US
+# pint = gallon_US / 8
+fluid_ounce = fluid_ounce_US = gallon_US / 128
+bbl = barrel = 42 * gallon_US  # for oil
+
+gallon_imp = 4.54609e-3  # UK
+fluid_ounce_imp = gallon_imp / 160
+
+# speed in meter per second
+kmh = 1e3 / hour
+mph = mile / hour
+# approx value of mach at 15 degrees in 1 atm. Is this a common value?
+mach = speed_of_sound = 340.5
+knot = nautical_mile / hour
+
+# temperature in kelvin
+zero_Celsius = 273.15
+degree_Fahrenheit = 1/1.8  # only for differences
+
+# energy in joule
+eV = electron_volt = elementary_charge  # * 1 Volt
+calorie = calorie_th = 4.184
+calorie_IT = 4.1868
+erg = 1e-7
+Btu_th = pound * degree_Fahrenheit * calorie_th / gram
+Btu = Btu_IT = pound * degree_Fahrenheit * calorie_IT / gram
+ton_TNT = 1e9 * calorie_th
+# Wh = watt_hour
+
+# power in watt
+hp = horsepower = 550 * foot * pound * g
+
+# force in newton
+dyn = dyne = 1e-5
+lbf = pound_force = pound * g
+kgf = kilogram_force = g  # * 1 kg
+
+# functions for conversions that are not linear
+
+
+def convert_temperature(
+    val: "npt.ArrayLike",
+    old_scale: str,
+    new_scale: str,
+) -> Any:
+    """
+    Convert from a temperature scale to another one among Celsius, Kelvin,
+    Fahrenheit, and Rankine scales.
+
+    Parameters
+    ----------
+    val : array_like
+        Value(s) of the temperature(s) to be converted expressed in the
+        original scale.
+    old_scale : str
+        Specifies as a string the original scale from which the temperature
+        value(s) will be converted. Supported scales are Celsius ('Celsius',
+        'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'),
+        Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f'), and Rankine
+        ('Rankine', 'rankine', 'R', 'r').
+    new_scale : str
+        Specifies as a string the new scale to which the temperature
+        value(s) will be converted. Supported scales are Celsius ('Celsius',
+        'celsius', 'C' or 'c'), Kelvin ('Kelvin', 'kelvin', 'K', 'k'),
+        Fahrenheit ('Fahrenheit', 'fahrenheit', 'F' or 'f'), and Rankine
+        ('Rankine', 'rankine', 'R', 'r').
+
+    Returns
+    -------
+    res : float or array of floats
+        Value(s) of the converted temperature(s) expressed in the new scale.
+
+    Notes
+    -----
+    .. versionadded:: 0.18.0
+
+    Examples
+    --------
+    >>> from scipy.constants import convert_temperature
+    >>> import numpy as np
+    >>> convert_temperature(np.array([-40, 40]), 'Celsius', 'Kelvin')
+    array([ 233.15,  313.15])
+
+    """
+    xp = array_namespace(val)
+    _val = _asarray(val, xp=xp, subok=True)
+    # Convert from `old_scale` to Kelvin
+    if old_scale.lower() in ['celsius', 'c']:
+        tempo = _val + zero_Celsius
+    elif old_scale.lower() in ['kelvin', 'k']:
+        tempo = _val
+    elif old_scale.lower() in ['fahrenheit', 'f']:
+        tempo = (_val - 32) * 5 / 9 + zero_Celsius
+    elif old_scale.lower() in ['rankine', 'r']:
+        tempo = _val * 5 / 9
+    else:
+        raise NotImplementedError(f"{old_scale=} is unsupported: supported scales "
+                                   "are Celsius, Kelvin, Fahrenheit, and "
+                                   "Rankine")
+    # and from Kelvin to `new_scale`.
+    if new_scale.lower() in ['celsius', 'c']:
+        res = tempo - zero_Celsius
+    elif new_scale.lower() in ['kelvin', 'k']:
+        res = tempo
+    elif new_scale.lower() in ['fahrenheit', 'f']:
+        res = (tempo - zero_Celsius) * 9 / 5 + 32
+    elif new_scale.lower() in ['rankine', 'r']:
+        res = tempo * 9 / 5
+    else:
+        raise NotImplementedError(f"{new_scale=} is unsupported: supported "
+                                   "scales are 'Celsius', 'Kelvin', "
+                                   "'Fahrenheit', and 'Rankine'")
+
+    return res
+
+
+# optics
+
+
+def lambda2nu(lambda_: "npt.ArrayLike") -> Any:
+    """
+    Convert wavelength to optical frequency
+
+    Parameters
+    ----------
+    lambda_ : array_like
+        Wavelength(s) to be converted.
+
+    Returns
+    -------
+    nu : float or array of floats
+        Equivalent optical frequency.
+
+    Notes
+    -----
+    Computes ``nu = c / lambda`` where c = 299792458.0, i.e., the
+    (vacuum) speed of light in meters/second.
+
+    Examples
+    --------
+    >>> from scipy.constants import lambda2nu, speed_of_light
+    >>> import numpy as np
+    >>> lambda2nu(np.array((1, speed_of_light)))
+    array([  2.99792458e+08,   1.00000000e+00])
+
+    """
+    xp = array_namespace(lambda_)
+    return c / _asarray(lambda_, xp=xp, subok=True)
+
+
+def nu2lambda(nu: "npt.ArrayLike") -> Any:
+    """
+    Convert optical frequency to wavelength.
+
+    Parameters
+    ----------
+    nu : array_like
+        Optical frequency to be converted.
+
+    Returns
+    -------
+    lambda : float or array of floats
+        Equivalent wavelength(s).
+
+    Notes
+    -----
+    Computes ``lambda = c / nu`` where c = 299792458.0, i.e., the
+    (vacuum) speed of light in meters/second.
+
+    Examples
+    --------
+    >>> from scipy.constants import nu2lambda, speed_of_light
+    >>> import numpy as np
+    >>> nu2lambda(np.array((1, speed_of_light)))
+    array([  2.99792458e+08,   1.00000000e+00])
+
+    """
+    xp = array_namespace(nu)
+    return c / _asarray(nu, xp=xp, subok=True)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/codata.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/codata.py
new file mode 100644
index 0000000000000000000000000000000000000000..912e0bbf7c4f14d23ced4546b6704f7789996d97
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/codata.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.constants` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'physical_constants', 'value', 'unit', 'precision', 'find',
+    'ConstantWarning', 'k', 'c',
+
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="constants", module="codata",
+                                   private_modules=["_codata"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/constants.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/constants.py
new file mode 100644
index 0000000000000000000000000000000000000000..855901ba802881090b99b7e8972de741331c7ab9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/constants.py
@@ -0,0 +1,53 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.constants` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'Avogadro', 'Boltzmann', 'Btu', 'Btu_IT', 'Btu_th', 'G',
+    'Julian_year', 'N_A', 'Planck', 'R', 'Rydberg',
+    'Stefan_Boltzmann', 'Wien', 'acre', 'alpha',
+    'angstrom', 'arcmin', 'arcminute', 'arcsec',
+    'arcsecond', 'astronomical_unit', 'atm',
+    'atmosphere', 'atomic_mass', 'atto', 'au', 'bar',
+    'barrel', 'bbl', 'blob', 'c', 'calorie',
+    'calorie_IT', 'calorie_th', 'carat', 'centi',
+    'convert_temperature', 'day', 'deci', 'degree',
+    'degree_Fahrenheit', 'deka', 'dyn', 'dyne', 'e',
+    'eV', 'electron_mass', 'electron_volt',
+    'elementary_charge', 'epsilon_0', 'erg',
+    'exa', 'exbi', 'femto', 'fermi', 'fine_structure',
+    'fluid_ounce', 'fluid_ounce_US', 'fluid_ounce_imp',
+    'foot', 'g', 'gallon', 'gallon_US', 'gallon_imp',
+    'gas_constant', 'gibi', 'giga', 'golden', 'golden_ratio',
+    'grain', 'gram', 'gravitational_constant', 'h', 'hbar',
+    'hectare', 'hecto', 'horsepower', 'hour', 'hp',
+    'inch', 'k', 'kgf', 'kibi', 'kilo', 'kilogram_force',
+    'kmh', 'knot', 'lambda2nu', 'lb', 'lbf',
+    'light_year', 'liter', 'litre', 'long_ton', 'm_e',
+    'm_n', 'm_p', 'm_u', 'mach', 'mebi', 'mega',
+    'metric_ton', 'micro', 'micron', 'mil', 'mile',
+    'milli', 'minute', 'mmHg', 'mph', 'mu_0', 'nano',
+    'nautical_mile', 'neutron_mass', 'nu2lambda',
+    'ounce', 'oz', 'parsec', 'pebi', 'peta',
+    'pi', 'pico', 'point', 'pound', 'pound_force',
+    'proton_mass', 'psi', 'pt', 'short_ton',
+    'sigma', 'slinch', 'slug', 'speed_of_light',
+    'speed_of_sound', 'stone', 'survey_foot',
+    'survey_mile', 'tebi', 'tera', 'ton_TNT',
+    'torr', 'troy_ounce', 'troy_pound', 'u',
+    'week', 'yard', 'year', 'yobi', 'yocto',
+    'yotta', 'zebi', 'zepto', 'zero_Celsius', 'zetta'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="constants", module="constants",
+                                   private_modules=["_constants"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_codata.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_codata.py
new file mode 100644
index 0000000000000000000000000000000000000000..51b77c491344963c648fef90cdeaa5adac5d9a6f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_codata.py
@@ -0,0 +1,78 @@
+from scipy.constants import find, value, c, speed_of_light, precision
+from numpy.testing import assert_equal, assert_, assert_almost_equal
+import scipy.constants._codata as _cd
+from scipy import constants
+
+
+def test_find():
+    keys = find('weak mixing', disp=False)
+    assert_equal(keys, ['weak mixing angle'])
+
+    keys = find('qwertyuiop', disp=False)
+    assert_equal(keys, [])
+
+    keys = find('natural unit', disp=False)
+    assert_equal(keys, sorted(['natural unit of velocity',
+                                'natural unit of action',
+                                'natural unit of action in eV s',
+                                'natural unit of mass',
+                                'natural unit of energy',
+                                'natural unit of energy in MeV',
+                                'natural unit of momentum',
+                                'natural unit of momentum in MeV/c',
+                                'natural unit of length',
+                                'natural unit of time']))
+
+
+def test_basic_table_parse():
+    c_s = 'speed of light in vacuum'
+    assert_equal(value(c_s), c)
+    assert_equal(value(c_s), speed_of_light)
+
+
+def test_basic_lookup():
+    assert_equal('%d %s' % (_cd.value('speed of light in vacuum'),
+                            _cd.unit('speed of light in vacuum')),
+                 '299792458 m s^-1')
+
+
+def test_find_all():
+    assert_(len(find(disp=False)) > 300)
+
+
+def test_find_single():
+    assert_equal(find('Wien freq', disp=False)[0],
+                 'Wien frequency displacement law constant')
+
+
+def test_2002_vs_2006():
+    assert_almost_equal(value('magn. flux quantum'),
+                        value('mag. flux quantum'))
+
+
+def test_exact_values():
+    # Check that updating stored values with exact ones worked.
+    exact = dict((k, v[0]) for k, v in _cd._physical_constants_2018.items())
+    replace = _cd.exact2018(exact)
+    for key, val in replace.items():
+        assert_equal(val, value(key))
+        assert precision(key) == 0
+
+
+def test_gh11341():
+    # gh-11341 noted that these three constants should exist (for backward
+    # compatibility) and should always have the same value:
+    a = constants.epsilon_0
+    b = constants.physical_constants['electric constant'][0]
+    c = constants.physical_constants['vacuum electric permittivity'][0]
+    assert a == b == c
+
+
+def test_gh14467():
+    # gh-14467 noted that some physical constants in CODATA are rounded
+    # to only ten significant figures even though they are supposed to be
+    # exact. Check that (at least) the case mentioned in the issue is resolved.
+    res = constants.physical_constants['Boltzmann constant in eV/K'][0]
+    ref = (constants.physical_constants['Boltzmann constant'][0]
+           / constants.physical_constants['elementary charge'][0])
+    assert res == ref
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_constants.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_constants.py
new file mode 100644
index 0000000000000000000000000000000000000000..6b9dcd3b5355063cffb3b7a144937a95aab77955
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/constants/tests/test_constants.py
@@ -0,0 +1,90 @@
+import pytest
+
+import scipy.constants as sc
+from scipy.conftest import array_api_compatible
+from scipy._lib._array_api_no_0d import xp_assert_equal, xp_assert_close
+from numpy.testing import assert_allclose
+
+
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends")]
+skip_xp_backends = pytest.mark.skip_xp_backends
+
+
+class TestConvertTemperature:
+    def test_convert_temperature(self, xp):
+        xp_assert_equal(sc.convert_temperature(xp.asarray(32.), 'f', 'Celsius'),
+                        xp.asarray(0.0))
+        xp_assert_equal(sc.convert_temperature(xp.asarray([0., 0.]),
+                                               'celsius', 'Kelvin'),
+                        xp.asarray([273.15, 273.15]))
+        xp_assert_equal(sc.convert_temperature(xp.asarray([0., 0.]), 'kelvin', 'c'),
+                        xp.asarray([-273.15, -273.15]))
+        xp_assert_equal(sc.convert_temperature(xp.asarray([32., 32.]), 'f', 'k'),
+                        xp.asarray([273.15, 273.15]))
+        xp_assert_equal(sc.convert_temperature(xp.asarray([273.15, 273.15]),
+                                               'kelvin', 'F'),
+                        xp.asarray([32., 32.]))
+        xp_assert_equal(sc.convert_temperature(xp.asarray([0., 0.]), 'C', 'fahrenheit'),
+                        xp.asarray([32., 32.]))
+        xp_assert_close(sc.convert_temperature(xp.asarray([0., 0.], dtype=xp.float64),
+                                               'c', 'r'),
+                        xp.asarray([491.67, 491.67], dtype=xp.float64),
+                        rtol=0., atol=1e-13)
+        xp_assert_close(sc.convert_temperature(xp.asarray([491.67, 491.67],
+                                                        dtype=xp.float64),
+                                               'Rankine', 'C'),
+                        xp.asarray([0., 0.], dtype=xp.float64), rtol=0., atol=1e-13)
+        xp_assert_close(sc.convert_temperature(xp.asarray([491.67, 491.67],
+                                                        dtype=xp.float64),
+                                               'r', 'F'),
+                        xp.asarray([32., 32.], dtype=xp.float64), rtol=0., atol=1e-13)
+        xp_assert_close(sc.convert_temperature(xp.asarray([32., 32.], dtype=xp.float64),
+                                               'fahrenheit', 'R'),
+                        xp.asarray([491.67, 491.67], dtype=xp.float64),
+                        rtol=0., atol=1e-13)
+        xp_assert_close(sc.convert_temperature(xp.asarray([273.15, 273.15],
+                                                        dtype=xp.float64),
+                                               'K', 'R'),
+                        xp.asarray([491.67, 491.67], dtype=xp.float64),
+                        rtol=0., atol=1e-13)
+        xp_assert_close(sc.convert_temperature(xp.asarray([491.67, 0.],
+                                                          dtype=xp.float64),
+                                               'rankine', 'kelvin'),
+                        xp.asarray([273.15, 0.], dtype=xp.float64), rtol=0., atol=1e-13)
+
+    @skip_xp_backends(np_only=True, reason='Python list input uses NumPy backend')
+    def test_convert_temperature_array_like(self):
+        assert_allclose(sc.convert_temperature([491.67, 0.], 'rankine', 'kelvin'),
+                        [273.15, 0.], rtol=0., atol=1e-13)
+
+
+    @skip_xp_backends(np_only=True, reason='Python int input uses NumPy backend')
+    def test_convert_temperature_errors(self, xp):
+        with pytest.raises(NotImplementedError, match="old_scale="):
+            sc.convert_temperature(1, old_scale="cheddar", new_scale="kelvin")
+        with pytest.raises(NotImplementedError, match="new_scale="):
+            sc.convert_temperature(1, old_scale="kelvin", new_scale="brie")
+
+
+class TestLambdaToNu:
+    def test_lambda_to_nu(self, xp):
+        xp_assert_equal(sc.lambda2nu(xp.asarray([sc.speed_of_light, 1])),
+                        xp.asarray([1, sc.speed_of_light]))
+
+
+    @skip_xp_backends(np_only=True, reason='Python list input uses NumPy backend')
+    def test_lambda_to_nu_array_like(self, xp):
+        assert_allclose(sc.lambda2nu([sc.speed_of_light, 1]),
+                        [1, sc.speed_of_light])
+
+
+class TestNuToLambda:
+    def test_nu_to_lambda(self, xp):
+        xp_assert_equal(sc.nu2lambda(xp.asarray([sc.speed_of_light, 1])),
+                        xp.asarray([1, sc.speed_of_light]))
+
+    @skip_xp_backends(np_only=True, reason='Python list input uses NumPy backend')
+    def test_nu_to_lambda_array_like(self, xp):
+        assert_allclose(sc.nu2lambda([sc.speed_of_light, 1]),
+                        [1, sc.speed_of_light])
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..243176bd89b7b6f16406d66293d1872ac2712252
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py
@@ -0,0 +1,128 @@
+from scipy.datasets._registry import registry
+from scipy.datasets._fetchers import data_fetcher
+from scipy.datasets._utils import _clear_cache
+from scipy.datasets import ascent, face, electrocardiogram, download_all
+from numpy.testing import assert_equal, assert_almost_equal
+import os
+from threading import get_ident
+import pytest
+
+try:
+    import pooch
+except ImportError:
+    raise ImportError("Missing optional dependency 'pooch' required "
+                      "for scipy.datasets module. Please use pip or "
+                      "conda to install 'pooch'.")
+
+
+data_dir = data_fetcher.path  # type: ignore
+
+
+def _has_hash(path, expected_hash):
+    """Check if the provided path has the expected hash."""
+    if not os.path.exists(path):
+        return False
+    return pooch.file_hash(path) == expected_hash
+
+
+class TestDatasets:
+
+    @pytest.fixture(scope='module', autouse=True)
+    def test_download_all(self):
+        # This fixture requires INTERNET CONNECTION
+
+        # test_setup phase
+        download_all()
+
+        yield
+
+    @pytest.mark.fail_slow(10)
+    def test_existence_all(self):
+        assert len(os.listdir(data_dir)) >= len(registry)
+
+    def test_ascent(self):
+        assert_equal(ascent().shape, (512, 512))
+
+        # hash check
+        assert _has_hash(os.path.join(data_dir, "ascent.dat"),
+                         registry["ascent.dat"])
+
+    def test_face(self):
+        assert_equal(face().shape, (768, 1024, 3))
+
+        # hash check
+        assert _has_hash(os.path.join(data_dir, "face.dat"),
+                         registry["face.dat"])
+
+    def test_electrocardiogram(self):
+        # Test shape, dtype and stats of signal
+        ecg = electrocardiogram()
+        assert_equal(ecg.dtype, float)
+        assert_equal(ecg.shape, (108000,))
+        assert_almost_equal(ecg.mean(), -0.16510875)
+        assert_almost_equal(ecg.std(), 0.5992473991177294)
+
+        # hash check
+        assert _has_hash(os.path.join(data_dir, "ecg.dat"),
+                         registry["ecg.dat"])
+
+
+def test_clear_cache(tmp_path):
+    # Note: `tmp_path` is a pytest fixture, it handles cleanup
+    thread_basepath = tmp_path / str(get_ident())
+    thread_basepath.mkdir()
+
+    dummy_basepath = thread_basepath / "dummy_cache_dir"
+    dummy_basepath.mkdir()
+
+    # Create three dummy dataset files for dummy dataset methods
+    dummy_method_map = {}
+    for i in range(4):
+        dummy_method_map[f"data{i}"] = [f"data{i}.dat"]
+        data_filepath = dummy_basepath / f"data{i}.dat"
+        data_filepath.write_text("")
+
+    # clear files associated to single dataset method data0
+    # also test callable argument instead of list of callables
+    def data0():
+        pass
+    _clear_cache(datasets=data0, cache_dir=dummy_basepath,
+                 method_map=dummy_method_map)
+    assert not os.path.exists(dummy_basepath/"data0.dat")
+
+    # clear files associated to multiple dataset methods "data3" and "data4"
+    def data1():
+        pass
+
+    def data2():
+        pass
+    _clear_cache(datasets=[data1, data2], cache_dir=dummy_basepath,
+                 method_map=dummy_method_map)
+    assert not os.path.exists(dummy_basepath/"data1.dat")
+    assert not os.path.exists(dummy_basepath/"data2.dat")
+
+    # clear multiple dataset files "data3_0.dat" and "data3_1.dat"
+    # associated with dataset method "data3"
+    def data4():
+        pass
+    # create files
+    (dummy_basepath / "data4_0.dat").write_text("")
+    (dummy_basepath / "data4_1.dat").write_text("")
+
+    dummy_method_map["data4"] = ["data4_0.dat", "data4_1.dat"]
+    _clear_cache(datasets=[data4], cache_dir=dummy_basepath,
+                 method_map=dummy_method_map)
+    assert not os.path.exists(dummy_basepath/"data4_0.dat")
+    assert not os.path.exists(dummy_basepath/"data4_1.dat")
+
+    # wrong dataset method should raise ValueError since it
+    # doesn't exist in the dummy_method_map
+    def data5():
+        pass
+    with pytest.raises(ValueError):
+        _clear_cache(datasets=[data5], cache_dir=dummy_basepath,
+                     method_map=dummy_method_map)
+
+    # remove all dataset cache
+    _clear_cache(datasets=None, cache_dir=dummy_basepath)
+    assert not os.path.exists(dummy_basepath)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..c3a7ccc4b33f27dbae7958641a89106cf9580326
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/__init__.py
@@ -0,0 +1,27 @@
+"""
+==============================================================
+Finite Difference Differentiation (:mod:`scipy.differentiate`)
+==============================================================
+
+.. currentmodule:: scipy.differentiate
+
+SciPy ``differentiate`` provides functions for performing finite difference
+numerical differentiation of black-box functions.
+
+.. autosummary::
+   :toctree: generated/
+
+   derivative
+   jacobian
+   hessian
+
+"""
+
+
+from ._differentiate import *
+
+__all__ = ['derivative', 'jacobian', 'hessian']
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/_differentiate.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/_differentiate.py
new file mode 100644
index 0000000000000000000000000000000000000000..0e104a071055161b69f62cec317e8a07b4466653
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/_differentiate.py
@@ -0,0 +1,1129 @@
+# mypy: disable-error-code="attr-defined"
+import warnings
+import numpy as np
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._util import _RichResult
+from scipy._lib._array_api import array_namespace, xp_sign, xp_copy, xp_take_along_axis
+
+_EERRORINCREASE = -1  # used in derivative
+
+def _derivative_iv(f, x, args, tolerances, maxiter, order, initial_step,
+                   step_factor, step_direction, preserve_shape, callback):
+    # Input validation for `derivative`
+    xp = array_namespace(x)
+
+    if not callable(f):
+        raise ValueError('`f` must be callable.')
+
+    if not np.iterable(args):
+        args = (args,)
+
+    tolerances = {} if tolerances is None else tolerances
+    atol = tolerances.get('atol', None)
+    rtol = tolerances.get('rtol', None)
+
+    # tolerances are floats, not arrays; OK to use NumPy
+    message = 'Tolerances and step parameters must be non-negative scalars.'
+    tols = np.asarray([atol if atol is not None else 1,
+                       rtol if rtol is not None else 1,
+                       step_factor])
+    if (not np.issubdtype(tols.dtype, np.number) or np.any(tols < 0)
+            or np.any(np.isnan(tols)) or tols.shape != (3,)):
+        raise ValueError(message)
+    step_factor = float(tols[2])
+
+    maxiter_int = int(maxiter)
+    if maxiter != maxiter_int or maxiter <= 0:
+        raise ValueError('`maxiter` must be a positive integer.')
+
+    order_int = int(order)
+    if order_int != order or order <= 0:
+        raise ValueError('`order` must be a positive integer.')
+
+    step_direction = xp.asarray(step_direction)
+    initial_step = xp.asarray(initial_step)
+    temp = xp.broadcast_arrays(x, step_direction, initial_step)
+    x, step_direction, initial_step = temp
+
+    message = '`preserve_shape` must be True or False.'
+    if preserve_shape not in {True, False}:
+        raise ValueError(message)
+
+    if callback is not None and not callable(callback):
+        raise ValueError('`callback` must be callable.')
+
+    return (f, x, args, atol, rtol, maxiter_int, order_int, initial_step,
+            step_factor, step_direction, preserve_shape, callback)
+
+
+def derivative(f, x, *, args=(), tolerances=None, maxiter=10,
+               order=8, initial_step=0.5, step_factor=2.0,
+               step_direction=0, preserve_shape=False, callback=None):
+    """Evaluate the derivative of a elementwise, real scalar function numerically.
+
+    For each element of the output of `f`, `derivative` approximates the first
+    derivative of `f` at the corresponding element of `x` using finite difference
+    differentiation.
+
+    This function works elementwise when `x`, `step_direction`, and `args` contain
+    (broadcastable) arrays.
+
+    Parameters
+    ----------
+    f : callable
+        The function whose derivative is desired. The signature must be::
+
+            f(xi: ndarray, *argsi) -> ndarray
+
+        where each element of ``xi`` is a finite real number and ``argsi`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable with
+        ``xi``. `f` must be an elementwise function: each scalar element ``f(xi)[j]``
+        must equal ``f(xi[j])`` for valid indices ``j``. It must not mutate the array
+        ``xi`` or the arrays in ``argsi``.
+    x : float array_like
+        Abscissae at which to evaluate the derivative. Must be broadcastable with
+        `args` and `step_direction`.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`. Arrays
+        must be broadcastable with one another and the arrays of `init`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    tolerances : dictionary of floats, optional
+        Absolute and relative tolerances. Valid keys of the dictionary are:
+
+        - ``atol`` - absolute tolerance on the derivative
+        - ``rtol`` - relative tolerance on the derivative
+
+        Iteration will stop when ``res.error < atol + rtol * abs(res.df)``. The default
+        `atol` is the smallest normal number of the appropriate dtype, and
+        the default `rtol` is the square root of the precision of the
+        appropriate dtype.
+    order : int, default: 8
+        The (positive integer) order of the finite difference formula to be
+        used. Odd integers will be rounded up to the next even integer.
+    initial_step : float array_like, default: 0.5
+        The (absolute) initial step size for the finite difference derivative
+        approximation.
+    step_factor : float, default: 2.0
+        The factor by which the step size is *reduced* in each iteration; i.e.
+        the step size in iteration 1 is ``initial_step/step_factor``. If
+        ``step_factor < 1``, subsequent steps will be greater than the initial
+        step; this may be useful if steps smaller than some threshold are
+        undesirable (e.g. due to subtractive cancellation error).
+    maxiter : int, default: 10
+        The maximum number of iterations of the algorithm to perform. See
+        Notes.
+    step_direction : integer array_like
+        An array representing the direction of the finite difference steps (for
+        use when `x` lies near to the boundary of the domain of the function.)
+        Must be broadcastable with `x` and all `args`.
+        Where 0 (default), central differences are used; where negative (e.g.
+        -1), steps are non-positive; and where positive (e.g. 1), all steps are
+        non-negative.
+    preserve_shape : bool, default: False
+        In the following, "arguments of `f`" refers to the array ``xi`` and
+        any arrays within ``argsi``. Let ``shape`` be the broadcasted shape
+        of `x` and all elements of `args` (which is conceptually
+        distinct from ``xi` and ``argsi`` passed into `f`).
+
+        - When ``preserve_shape=False`` (default), `f` must accept arguments
+          of *any* broadcastable shapes.
+
+        - When ``preserve_shape=True``, `f` must accept arguments of shape
+          ``shape`` *or* ``shape + (n,)``, where ``(n,)`` is the number of
+          abscissae at which the function is being evaluated.
+
+        In either case, for each scalar element ``xi[j]`` within ``xi``, the array
+        returned by `f` must include the scalar ``f(xi[j])`` at the same index.
+        Consequently, the shape of the output is always the shape of the input
+        ``xi``.
+
+        See Examples.
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `derivative` (but containing the current
+        iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `derivative` will return a result. `callback` must not mutate
+        `res` or its attributes.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : The error estimate increased, so iteration was terminated.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : Iteration was terminated by `callback`.
+            - ``1`` : The algorithm is proceeding normally (in `callback` only).
+
+        df : float array
+            The derivative of `f` at `x`, if the algorithm terminated
+            successfully.
+        error : float array
+            An estimate of the error: the magnitude of the difference between
+            the current estimate of the derivative and the estimate in the
+            previous iteration.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+        nfev : int array
+            The number of points at which `f` was evaluated.
+        x : float array
+            The value at which the derivative of `f` was evaluated
+            (after broadcasting with `args` and `step_direction`).
+
+    See Also
+    --------
+    jacobian, hessian
+
+    Notes
+    -----
+    The implementation was inspired by jacobi [1]_, numdifftools [2]_, and
+    DERIVEST [3]_, but the implementation follows the theory of Taylor series
+    more straightforwardly (and arguably naively so).
+    In the first iteration, the derivative is estimated using a finite
+    difference formula of order `order` with maximum step size `initial_step`.
+    Each subsequent iteration, the maximum step size is reduced by
+    `step_factor`, and the derivative is estimated again until a termination
+    condition is reached. The error estimate is the magnitude of the difference
+    between the current derivative approximation and that of the previous
+    iteration.
+
+    The stencils of the finite difference formulae are designed such that
+    abscissae are "nested": after `f` is evaluated at ``order + 1``
+    points in the first iteration, `f` is evaluated at only two new points
+    in each subsequent iteration; ``order - 1`` previously evaluated function
+    values required by the finite difference formula are reused, and two
+    function values (evaluations at the points furthest from `x`) are unused.
+
+    Step sizes are absolute. When the step size is small relative to the
+    magnitude of `x`, precision is lost; for example, if `x` is ``1e20``, the
+    default initial step size of ``0.5`` cannot be resolved. Accordingly,
+    consider using larger initial step sizes for large magnitudes of `x`.
+
+    The default tolerances are challenging to satisfy at points where the
+    true derivative is exactly zero. If the derivative may be exactly zero,
+    consider specifying an absolute tolerance (e.g. ``atol=1e-12``) to
+    improve convergence.
+
+    References
+    ----------
+    .. [1] Hans Dembinski (@HDembinski). jacobi.
+           https://github.com/HDembinski/jacobi
+    .. [2] Per A. Brodtkorb and John D'Errico. numdifftools.
+           https://numdifftools.readthedocs.io/en/latest/
+    .. [3] John D'Errico. DERIVEST: Adaptive Robust Numerical Differentiation.
+           https://www.mathworks.com/matlabcentral/fileexchange/13490-adaptive-robust-numerical-differentiation
+    .. [4] Numerical Differentition. Wikipedia.
+           https://en.wikipedia.org/wiki/Numerical_differentiation
+
+    Examples
+    --------
+    Evaluate the derivative of ``np.exp`` at several points ``x``.
+
+    >>> import numpy as np
+    >>> from scipy.differentiate import derivative
+    >>> f = np.exp
+    >>> df = np.exp  # true derivative
+    >>> x = np.linspace(1, 2, 5)
+    >>> res = derivative(f, x)
+    >>> res.df  # approximation of the derivative
+    array([2.71828183, 3.49034296, 4.48168907, 5.75460268, 7.3890561 ])
+    >>> res.error  # estimate of the error
+    array([7.13740178e-12, 9.16600129e-12, 1.17594823e-11, 1.51061386e-11,
+           1.94262384e-11])
+    >>> abs(res.df - df(x))  # true error
+    array([2.53130850e-14, 3.55271368e-14, 5.77315973e-14, 5.59552404e-14,
+           6.92779167e-14])
+
+    Show the convergence of the approximation as the step size is reduced.
+    Each iteration, the step size is reduced by `step_factor`, so for
+    sufficiently small initial step, each iteration reduces the error by a
+    factor of ``1/step_factor**order`` until finite precision arithmetic
+    inhibits further improvement.
+
+    >>> import matplotlib.pyplot as plt
+    >>> iter = list(range(1, 12))  # maximum iterations
+    >>> hfac = 2  # step size reduction per iteration
+    >>> hdir = [-1, 0, 1]  # compare left-, central-, and right- steps
+    >>> order = 4  # order of differentiation formula
+    >>> x = 1
+    >>> ref = df(x)
+    >>> errors = []  # true error
+    >>> for i in iter:
+    ...     res = derivative(f, x, maxiter=i, step_factor=hfac,
+    ...                      step_direction=hdir, order=order,
+    ...                      # prevent early termination
+    ...                      tolerances=dict(atol=0, rtol=0))
+    ...     errors.append(abs(res.df - ref))
+    >>> errors = np.array(errors)
+    >>> plt.semilogy(iter, errors[:, 0], label='left differences')
+    >>> plt.semilogy(iter, errors[:, 1], label='central differences')
+    >>> plt.semilogy(iter, errors[:, 2], label='right differences')
+    >>> plt.xlabel('iteration')
+    >>> plt.ylabel('error')
+    >>> plt.legend()
+    >>> plt.show()
+    >>> (errors[1, 1] / errors[0, 1], 1 / hfac**order)
+    (0.06215223140159822, 0.0625)
+
+    The implementation is vectorized over `x`, `step_direction`, and `args`.
+    The function is evaluated once before the first iteration to perform input
+    validation and standardization, and once per iteration thereafter.
+
+    >>> def f(x, p):
+    ...     f.nit += 1
+    ...     return x**p
+    >>> f.nit = 0
+    >>> def df(x, p):
+    ...     return p*x**(p-1)
+    >>> x = np.arange(1, 5)
+    >>> p = np.arange(1, 6).reshape((-1, 1))
+    >>> hdir = np.arange(-1, 2).reshape((-1, 1, 1))
+    >>> res = derivative(f, x, args=(p,), step_direction=hdir, maxiter=1)
+    >>> np.allclose(res.df, df(x, p))
+    True
+    >>> res.df.shape
+    (3, 5, 4)
+    >>> f.nit
+    2
+
+    By default, `preserve_shape` is False, and therefore the callable
+    `f` may be called with arrays of any broadcastable shapes.
+    For example:
+
+    >>> shapes = []
+    >>> def f(x, c):
+    ...    shape = np.broadcast_shapes(x.shape, c.shape)
+    ...    shapes.append(shape)
+    ...    return np.sin(c*x)
+    >>>
+    >>> c = [1, 5, 10, 20]
+    >>> res = derivative(f, 0, args=(c,))
+    >>> shapes
+    [(4,), (4, 8), (4, 2), (3, 2), (2, 2), (1, 2)]
+
+    To understand where these shapes are coming from - and to better
+    understand how `derivative` computes accurate results - note that
+    higher values of ``c`` correspond with higher frequency sinusoids.
+    The higher frequency sinusoids make the function's derivative change
+    faster, so more function evaluations are required to achieve the target
+    accuracy:
+
+    >>> res.nfev
+    array([11, 13, 15, 17], dtype=int32)
+
+    The initial ``shape``, ``(4,)``, corresponds with evaluating the
+    function at a single abscissa and all four frequencies; this is used
+    for input validation and to determine the size and dtype of the arrays
+    that store results. The next shape corresponds with evaluating the
+    function at an initial grid of abscissae and all four frequencies.
+    Successive calls to the function evaluate the function at two more
+    abscissae, increasing the effective order of the approximation by two.
+    However, in later function evaluations, the function is evaluated at
+    fewer frequencies because the corresponding derivative has already
+    converged to the required tolerance. This saves function evaluations to
+    improve performance, but it requires the function to accept arguments of
+    any shape.
+
+    "Vector-valued" functions are unlikely to satisfy this requirement.
+    For example, consider
+
+    >>> def f(x):
+    ...    return [x, np.sin(3*x), x+np.sin(10*x), np.sin(20*x)*(x-1)**2]
+
+    This integrand is not compatible with `derivative` as written; for instance,
+    the shape of the output will not be the same as the shape of ``x``. Such a
+    function *could* be converted to a compatible form with the introduction of
+    additional parameters, but this would be inconvenient. In such cases,
+    a simpler solution would be to use `preserve_shape`.
+
+    >>> shapes = []
+    >>> def f(x):
+    ...     shapes.append(x.shape)
+    ...     x0, x1, x2, x3 = x
+    ...     return [x0, np.sin(3*x1), x2+np.sin(10*x2), np.sin(20*x3)*(x3-1)**2]
+    >>>
+    >>> x = np.zeros(4)
+    >>> res = derivative(f, x, preserve_shape=True)
+    >>> shapes
+    [(4,), (4, 8), (4, 2), (4, 2), (4, 2), (4, 2)]
+
+    Here, the shape of ``x`` is ``(4,)``. With ``preserve_shape=True``, the
+    function may be called with argument ``x`` of shape ``(4,)`` or ``(4, n)``,
+    and this is what we observe.
+
+    """
+    # TODO (followup):
+    #  - investigate behavior at saddle points
+    #  - multivariate functions?
+    #  - relative steps?
+    #  - show example of `np.vectorize`
+
+    res = _derivative_iv(f, x, args, tolerances, maxiter, order, initial_step,
+                            step_factor, step_direction, preserve_shape, callback)
+    (func, x, args, atol, rtol, maxiter, order,
+     h0, fac, hdir, preserve_shape, callback) = res
+
+    # Initialization
+    # Since f(x) (no step) is not needed for central differences, it may be
+    # possible to eliminate this function evaluation. However, it's useful for
+    # input validation and standardization, and everything else is designed to
+    # reduce function calls, so let's keep it simple.
+    temp = eim._initialize(func, (x,), args, preserve_shape=preserve_shape)
+    func, xs, fs, args, shape, dtype, xp = temp
+
+    finfo = xp.finfo(dtype)
+    atol = finfo.smallest_normal if atol is None else atol
+    rtol = finfo.eps**0.5 if rtol is None else rtol  # keep same as `hessian`
+
+    x, f = xs[0], fs[0]
+    df = xp.full_like(f, xp.nan)
+
+    # Ideally we'd broadcast the shape of `hdir` in `_elementwise_algo_init`, but
+    # it's simpler to do it here than to generalize `_elementwise_algo_init` further.
+    # `hdir` and `x` are already broadcasted in `_derivative_iv`, so we know
+    # that `hdir` can be broadcasted to the final shape. Same with `h0`.
+    hdir = xp.broadcast_to(hdir, shape)
+    hdir = xp.reshape(hdir, (-1,))
+    hdir = xp.astype(xp_sign(hdir), dtype)
+    h0 = xp.broadcast_to(h0, shape)
+    h0 = xp.reshape(h0, (-1,))
+    h0 = xp.astype(h0, dtype)
+    h0[h0 <= 0] = xp.asarray(xp.nan, dtype=dtype)
+
+    status = xp.full_like(x, eim._EINPROGRESS, dtype=xp.int32)  # in progress
+    nit, nfev = 0, 1  # one function evaluations performed above
+    # Boolean indices of left, central, right, and (all) one-sided steps
+    il = hdir < 0
+    ic = hdir == 0
+    ir = hdir > 0
+    io = il | ir
+
+    # Most of these attributes are reasonably obvious, but:
+    # - `fs` holds all the function values of all active `x`. The zeroth
+    #   axis corresponds with active points `x`, the first axis corresponds
+    #   with the different steps (in the order described in
+    #   `_derivative_weights`).
+    # - `terms` (which could probably use a better name) is half the `order`,
+    #   which is always even.
+    work = _RichResult(x=x, df=df, fs=f[:, xp.newaxis], error=xp.nan, h=h0,
+                       df_last=xp.nan, error_last=xp.nan, fac=fac,
+                       atol=atol, rtol=rtol, nit=nit, nfev=nfev,
+                       status=status, dtype=dtype, terms=(order+1)//2,
+                       hdir=hdir, il=il, ic=ic, ir=ir, io=io,
+                       # Store the weights in an object so they can't get compressed
+                       # Using RichResult to allow dot notation, but a dict would work
+                       diff_state=_RichResult(central=[], right=[], fac=None))
+
+    # This is the correspondence between terms in the `work` object and the
+    # final result. In this case, the mapping is trivial. Note that `success`
+    # is prepended automatically.
+    res_work_pairs = [('status', 'status'), ('df', 'df'), ('error', 'error'),
+                      ('nit', 'nit'), ('nfev', 'nfev'), ('x', 'x')]
+
+    def pre_func_eval(work):
+        """Determine the abscissae at which the function needs to be evaluated.
+
+        See `_derivative_weights` for a description of the stencil (pattern
+        of the abscissae).
+
+        In the first iteration, there is only one stored function value in
+        `work.fs`, `f(x)`, so we need to evaluate at `order` new points. In
+        subsequent iterations, we evaluate at two new points. Note that
+        `work.x` is always flattened into a 1D array after broadcasting with
+        all `args`, so we add a new axis at the end and evaluate all point
+        in one call to the function.
+
+        For improvement:
+        - Consider measuring the step size actually taken, since ``(x + h) - x``
+          is not identically equal to `h` with floating point arithmetic.
+        - Adjust the step size automatically if `x` is too big to resolve the
+          step.
+        - We could probably save some work if there are no central difference
+          steps or no one-sided steps.
+        """
+        n = work.terms  # half the order
+        h = work.h[:, xp.newaxis]  # step size
+        c = work.fac  # step reduction factor
+        d = c**0.5  # square root of step reduction factor (one-sided stencil)
+        # Note - no need to be careful about dtypes until we allocate `x_eval`
+
+        if work.nit == 0:
+            hc = h / c**xp.arange(n, dtype=work.dtype)
+            hc = xp.concat((-xp.flip(hc, axis=-1), hc), axis=-1)
+        else:
+            hc = xp.concat((-h, h), axis=-1) / c**(n-1)
+
+        if work.nit == 0:
+            hr = h / d**xp.arange(2*n, dtype=work.dtype)
+        else:
+            hr = xp.concat((h, h/d), axis=-1) / c**(n-1)
+
+        n_new = 2*n if work.nit == 0 else 2  # number of new abscissae
+        x_eval = xp.zeros((work.hdir.shape[0], n_new), dtype=work.dtype)
+        il, ic, ir = work.il, work.ic, work.ir
+        x_eval[ir] = work.x[ir][:, xp.newaxis] + hr[ir]
+        x_eval[ic] = work.x[ic][:, xp.newaxis] + hc[ic]
+        x_eval[il] = work.x[il][:, xp.newaxis] - hr[il]
+        return x_eval
+
+    def post_func_eval(x, f, work):
+        """ Estimate the derivative and error from the function evaluations
+
+        As in `pre_func_eval`: in the first iteration, there is only one stored
+        function value in `work.fs`, `f(x)`, so we need to add the `order` new
+        points. In subsequent iterations, we add two new points. The tricky
+        part is getting the order to match that of the weights, which is
+        described in `_derivative_weights`.
+
+        For improvement:
+        - Change the order of the weights (and steps in `pre_func_eval`) to
+          simplify `work_fc` concatenation and eliminate `fc` concatenation.
+        - It would be simple to do one-step Richardson extrapolation with `df`
+          and `df_last` to increase the order of the estimate and/or improve
+          the error estimate.
+        - Process the function evaluations in a more numerically favorable
+          way. For instance, combining the pairs of central difference evals
+          into a second-order approximation and using Richardson extrapolation
+          to produce a higher order approximation seemed to retain accuracy up
+          to very high order.
+        - Alternatively, we could use `polyfit` like Jacobi. An advantage of
+          fitting polynomial to more points than necessary is improved noise
+          tolerance.
+        """
+        n = work.terms
+        n_new = n if work.nit == 0 else 1
+        il, ic, io = work.il, work.ic, work.io
+
+        # Central difference
+        # `work_fc` is *all* the points at which the function has been evaluated
+        # `fc` is the points we're using *this iteration* to produce the estimate
+        work_fc = (f[ic][:, :n_new], work.fs[ic], f[ic][:, -n_new:])
+        work_fc = xp.concat(work_fc, axis=-1)
+        if work.nit == 0:
+            fc = work_fc
+        else:
+            fc = (work_fc[:, :n], work_fc[:, n:n+1], work_fc[:, -n:])
+            fc = xp.concat(fc, axis=-1)
+
+        # One-sided difference
+        work_fo = xp.concat((work.fs[io], f[io]), axis=-1)
+        if work.nit == 0:
+            fo = work_fo
+        else:
+            fo = xp.concat((work_fo[:, 0:1], work_fo[:, -2*n:]), axis=-1)
+
+        work.fs = xp.zeros((ic.shape[0], work.fs.shape[-1] + 2*n_new), dtype=work.dtype)
+        work.fs[ic] = work_fc
+        work.fs[io] = work_fo
+
+        wc, wo = _derivative_weights(work, n, xp)
+        work.df_last = xp.asarray(work.df, copy=True)
+        work.df[ic] = fc @ wc / work.h[ic]
+        work.df[io] = fo @ wo / work.h[io]
+        work.df[il] *= -1
+
+        work.h /= work.fac
+        work.error_last = work.error
+        # Simple error estimate - the difference in derivative estimates between
+        # this iteration and the last. This is typically conservative because if
+        # convergence has begin, the true error is much closer to the difference
+        # between the current estimate and the *next* error estimate. However,
+        # we could use Richarson extrapolation to produce an error estimate that
+        # is one order higher, and take the difference between that and
+        # `work.df` (which would just be constant factor that depends on `fac`.)
+        work.error = xp.abs(work.df - work.df_last)
+
+    def check_termination(work):
+        """Terminate due to convergence, non-finite values, or error increase"""
+        stop = xp.astype(xp.zeros_like(work.df), xp.bool)
+
+        i = work.error < work.atol + work.rtol*abs(work.df)
+        work.status[i] = eim._ECONVERGED
+        stop[i] = True
+
+        if work.nit > 0:
+            i = ~((xp.isfinite(work.x) & xp.isfinite(work.df)) | stop)
+            work.df[i], work.status[i] = xp.nan, eim._EVALUEERR
+            stop[i] = True
+
+        # With infinite precision, there is a step size below which
+        # all smaller step sizes will reduce the error. But in floating point
+        # arithmetic, catastrophic cancellation will begin to cause the error
+        # to increase again. This heuristic tries to avoid step sizes that are
+        # too small. There may be more theoretically sound approaches for
+        # detecting a step size that minimizes the total error, but this
+        # heuristic seems simple and effective.
+        i = (work.error > work.error_last*10) & ~stop
+        work.status[i] = _EERRORINCREASE
+        stop[i] = True
+
+        return stop
+
+    def post_termination_check(work):
+        return
+
+    def customize_result(res, shape):
+        return shape
+
+    return eim._loop(work, callback, shape, maxiter, func, args, dtype,
+                     pre_func_eval, post_func_eval, check_termination,
+                     post_termination_check, customize_result, res_work_pairs,
+                     xp, preserve_shape)
+
+
+def _derivative_weights(work, n, xp):
+    # This produces the weights of the finite difference formula for a given
+    # stencil. In experiments, use of a second-order central difference formula
+    # with Richardson extrapolation was more accurate numerically, but it was
+    # more complicated, and it would have become even more complicated when
+    # adding support for one-sided differences. However, now that all the
+    # function evaluation values are stored, they can be processed in whatever
+    # way is desired to produce the derivative estimate. We leave alternative
+    # approaches to future work. To be more self-contained, here is the theory
+    # for deriving the weights below.
+    #
+    # Recall that the Taylor expansion of a univariate, scalar-values function
+    # about a point `x` may be expressed as:
+    #      f(x + h)  =     f(x) + f'(x)*h + f''(x)/2!*h**2  + O(h**3)
+    # Suppose we evaluate f(x), f(x+h), and f(x-h).  We have:
+    #      f(x)      =     f(x)
+    #      f(x + h)  =     f(x) + f'(x)*h + f''(x)/2!*h**2  + O(h**3)
+    #      f(x - h)  =     f(x) - f'(x)*h + f''(x)/2!*h**2  + O(h**3)
+    # We can solve for weights `wi` such that:
+    #   w1*f(x)      = w1*(f(x))
+    # + w2*f(x + h)  = w2*(f(x) + f'(x)*h + f''(x)/2!*h**2) + O(h**3)
+    # + w3*f(x - h)  = w3*(f(x) - f'(x)*h + f''(x)/2!*h**2) + O(h**3)
+    #                =     0    + f'(x)*h + 0               + O(h**3)
+    # Then
+    #     f'(x) ~ (w1*f(x) + w2*f(x+h) + w3*f(x-h))/h
+    # is a finite difference derivative approximation with error O(h**2),
+    # and so it is said to be a "second-order" approximation. Under certain
+    # conditions (e.g. well-behaved function, `h` sufficiently small), the
+    # error in the approximation will decrease with h**2; that is, if `h` is
+    # reduced by a factor of 2, the error is reduced by a factor of 4.
+    #
+    # By default, we use eighth-order formulae. Our central-difference formula
+    # uses abscissae:
+    #   x-h/c**3, x-h/c**2, x-h/c, x-h, x, x+h, x+h/c, x+h/c**2, x+h/c**3
+    # where `c` is the step factor. (Typically, the step factor is greater than
+    # one, so the outermost points - as written above - are actually closest to
+    # `x`.) This "stencil" is chosen so that each iteration, the step can be
+    # reduced by the factor `c`, and most of the function evaluations can be
+    # reused with the new step size. For example, in the next iteration, we
+    # will have:
+    #   x-h/c**4, x-h/c**3, x-h/c**2, x-h/c, x, x+h/c, x+h/c**2, x+h/c**3, x+h/c**4
+    # We do not reuse `x-h` and `x+h` for the new derivative estimate.
+    # While this would increase the order of the formula and thus the
+    # theoretical convergence rate, it is also less stable numerically.
+    # (As noted above, there are other ways of processing the values that are
+    # more stable. Thus, even now we store `f(x-h)` and `f(x+h)` in `work.fs`
+    # to simplify future development of this sort of improvement.)
+    #
+    # The (right) one-sided formula is produced similarly using abscissae
+    #   x, x+h, x+h/d, x+h/d**2, ..., x+h/d**6, x+h/d**7, x+h/d**7
+    # where `d` is the square root of `c`. (The left one-sided formula simply
+    # uses -h.) When the step size is reduced by factor `c = d**2`, we have
+    # abscissae:
+    #   x, x+h/d**2, x+h/d**3..., x+h/d**8, x+h/d**9, x+h/d**9
+    # `d` is chosen as the square root of `c` so that the rate of the step-size
+    # reduction is the same per iteration as in the central difference case.
+    # Note that because the central difference formulas are inherently of even
+    # order, for simplicity, we use only even-order formulas for one-sided
+    # differences, too.
+
+    # It's possible for the user to specify `fac` in, say, double precision but
+    # `x` and `args` in single precision. `fac` gets converted to single
+    # precision, but we should always use double precision for the intermediate
+    # calculations here to avoid additional error in the weights.
+    fac = float(work.fac)
+
+    # Note that if the user switches back to floating point precision with
+    # `x` and `args`, then `fac` will not necessarily equal the (lower
+    # precision) cached `_derivative_weights.fac`, and the weights will
+    # need to be recalculated. This could be fixed, but it's late, and of
+    # low consequence.
+
+    diff_state = work.diff_state
+    if fac != diff_state.fac:
+        diff_state.central = []
+        diff_state.right = []
+        diff_state.fac = fac
+
+    if len(diff_state.central) != 2*n + 1:
+        # Central difference weights. Consider refactoring this; it could
+        # probably be more compact.
+        # Note: Using NumPy here is OK; we convert to xp-type at the end
+        i = np.arange(-n, n + 1)
+        p = np.abs(i) - 1.  # center point has power `p` -1, but sign `s` is 0
+        s = np.sign(i)
+
+        h = s / fac ** p
+        A = np.vander(h, increasing=True).T
+        b = np.zeros(2*n + 1)
+        b[1] = 1
+        weights = np.linalg.solve(A, b)
+
+        # Enforce identities to improve accuracy
+        weights[n] = 0
+        for i in range(n):
+            weights[-i-1] = -weights[i]
+
+        # Cache the weights. We only need to calculate them once unless
+        # the step factor changes.
+        diff_state.central = weights
+
+        # One-sided difference weights. The left one-sided weights (with
+        # negative steps) are simply the negative of the right one-sided
+        # weights, so no need to compute them separately.
+        i = np.arange(2*n + 1)
+        p = i - 1.
+        s = np.sign(i)
+
+        h = s / np.sqrt(fac) ** p
+        A = np.vander(h, increasing=True).T
+        b = np.zeros(2 * n + 1)
+        b[1] = 1
+        weights = np.linalg.solve(A, b)
+
+        diff_state.right = weights
+
+    return (xp.asarray(diff_state.central, dtype=work.dtype),
+            xp.asarray(diff_state.right, dtype=work.dtype))
+
+
+def jacobian(f, x, *, tolerances=None, maxiter=10, order=8, initial_step=0.5,
+             step_factor=2.0, step_direction=0):
+    r"""Evaluate the Jacobian of a function numerically.
+
+    Parameters
+    ----------
+    f : callable
+        The function whose Jacobian is desired. The signature must be::
+
+            f(xi: ndarray) -> ndarray
+
+        where each element of ``xi`` is a finite real. If the function to be
+        differentiated accepts additional arguments, wrap it (e.g. using
+        `functools.partial` or ``lambda``) and pass the wrapped callable
+        into `jacobian`. `f` must not mutate the array ``xi``. See Notes
+        regarding vectorization and the dimensionality of the input and output.
+    x : float array_like
+        Points at which to evaluate the Jacobian. Must have at least one dimension.
+        See Notes regarding the dimensionality and vectorization.
+    tolerances : dictionary of floats, optional
+        Absolute and relative tolerances. Valid keys of the dictionary are:
+
+        - ``atol`` - absolute tolerance on the derivative
+        - ``rtol`` - relative tolerance on the derivative
+
+        Iteration will stop when ``res.error < atol + rtol * abs(res.df)``. The default
+        `atol` is the smallest normal number of the appropriate dtype, and
+        the default `rtol` is the square root of the precision of the
+        appropriate dtype.
+    maxiter : int, default: 10
+        The maximum number of iterations of the algorithm to perform. See
+        Notes.
+    order : int, default: 8
+        The (positive integer) order of the finite difference formula to be
+        used. Odd integers will be rounded up to the next even integer.
+    initial_step : float array_like, default: 0.5
+        The (absolute) initial step size for the finite difference derivative
+        approximation. Must be broadcastable with `x` and `step_direction`.
+    step_factor : float, default: 2.0
+        The factor by which the step size is *reduced* in each iteration; i.e.
+        the step size in iteration 1 is ``initial_step/step_factor``. If
+        ``step_factor < 1``, subsequent steps will be greater than the initial
+        step; this may be useful if steps smaller than some threshold are
+        undesirable (e.g. due to subtractive cancellation error).
+    step_direction : integer array_like
+        An array representing the direction of the finite difference steps (e.g.
+        for use when `x` lies near to the boundary of the domain of the function.)
+        Must be broadcastable with `x` and `initial_step`.
+        Where 0 (default), central differences are used; where negative (e.g.
+        -1), steps are non-positive; and where positive (e.g. 1), all steps are
+        non-negative.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : The error estimate increased, so iteration was terminated.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+
+        df : float array
+            The Jacobian of `f` at `x`, if the algorithm terminated
+            successfully.
+        error : float array
+            An estimate of the error: the magnitude of the difference between
+            the current estimate of the Jacobian and the estimate in the
+            previous iteration.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+        nfev : int array
+            The number of points at which `f` was evaluated.
+
+        Each element of an attribute is associated with the corresponding
+        element of `df`. For instance, element ``i`` of `nfev` is the
+        number of points at which `f` was evaluated for the sake of
+        computing element ``i`` of `df`.
+
+    See Also
+    --------
+    derivative, hessian
+
+    Notes
+    -----
+    Suppose we wish to evaluate the Jacobian of a function
+    :math:`f: \mathbf{R}^m \rightarrow \mathbf{R}^n`. Assign to variables
+    ``m`` and ``n`` the positive integer values of :math:`m` and :math:`n`,
+    respectively, and let ``...`` represent an arbitrary tuple of integers.
+    If we wish to evaluate the Jacobian at a single point, then:
+
+    - argument `x` must be an array of shape ``(m,)``
+    - argument `f` must be vectorized to accept an array of shape ``(m, ...)``.
+      The first axis represents the :math:`m` inputs of :math:`f`; the remainder
+      are for evaluating the function at multiple points in a single call.
+    - argument `f` must return an array of shape ``(n, ...)``. The first
+      axis represents the :math:`n` outputs of :math:`f`; the remainder
+      are for the result of evaluating the function at multiple points.
+    - attribute ``df`` of the result object will be an array of shape ``(n, m)``,
+      the Jacobian.
+
+    This function is also vectorized in the sense that the Jacobian can be
+    evaluated at ``k`` points in a single call. In this case, `x` would be an
+    array of shape ``(m, k)``, `f` would accept an array of shape
+    ``(m, k, ...)`` and return an array of shape ``(n, k, ...)``, and the ``df``
+    attribute of the result would have shape ``(n, m, k)``.
+
+    Suppose the desired callable ``f_not_vectorized`` is not vectorized; it can
+    only accept an array of shape ``(m,)``. A simple solution to satisfy the required
+    interface is to wrap ``f_not_vectorized`` as follows::
+
+        def f(x):
+            return np.apply_along_axis(f_not_vectorized, axis=0, arr=x)
+
+    Alternatively, suppose the desired callable ``f_vec_q`` is vectorized, but
+    only for 2-D arrays of shape ``(m, q)``. To satisfy the required interface,
+    consider::
+
+        def f(x):
+            m, batch = x.shape[0], x.shape[1:]  # x.shape is (m, ...)
+            x = np.reshape(x, (m, -1))  # `-1` is short for q = prod(batch)
+            res = f_vec_q(x)  # pass shape (m, q) to function
+            n = res.shape[0]
+            return np.reshape(res, (n,) + batch)  # return shape (n, ...)
+
+    Then pass the wrapped callable ``f`` as the first argument of `jacobian`.
+
+    References
+    ----------
+    .. [1] Jacobian matrix and determinant, *Wikipedia*,
+           https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant
+
+    Examples
+    --------
+    The Rosenbrock function maps from :math:`\mathbf{R}^m \rightarrow \mathbf{R}`;
+    the SciPy implementation `scipy.optimize.rosen` is vectorized to accept an
+    array of shape ``(m, p)`` and return an array of shape ``p``. Suppose we wish
+    to evaluate the Jacobian (AKA the gradient because the function returns a scalar)
+    at ``[0.5, 0.5, 0.5]``.
+
+    >>> import numpy as np
+    >>> from scipy.differentiate import jacobian
+    >>> from scipy.optimize import rosen, rosen_der
+    >>> m = 3
+    >>> x = np.full(m, 0.5)
+    >>> res = jacobian(rosen, x)
+    >>> ref = rosen_der(x)  # reference value of the gradient
+    >>> res.df, ref
+    (array([-51.,  -1.,  50.]), array([-51.,  -1.,  50.]))
+
+    As an example of a function with multiple outputs, consider Example 4
+    from [1]_.
+
+    >>> def f(x):
+    ...     x1, x2, x3 = x
+    ...     return [x1, 5*x3, 4*x2**2 - 2*x3, x3*np.sin(x1)]
+
+    The true Jacobian is given by:
+
+    >>> def df(x):
+    ...         x1, x2, x3 = x
+    ...         one = np.ones_like(x1)
+    ...         return [[one, 0*one, 0*one],
+    ...                 [0*one, 0*one, 5*one],
+    ...                 [0*one, 8*x2, -2*one],
+    ...                 [x3*np.cos(x1), 0*one, np.sin(x1)]]
+
+    Evaluate the Jacobian at an arbitrary point.
+
+    >>> rng = np.random.default_rng(389252938452)
+    >>> x = rng.random(size=3)
+    >>> res = jacobian(f, x)
+    >>> ref = df(x)
+    >>> res.df.shape == (4, 3)
+    True
+    >>> np.allclose(res.df, ref)
+    True
+
+    Evaluate the Jacobian at 10 arbitrary points in a single call.
+
+    >>> x = rng.random(size=(3, 10))
+    >>> res = jacobian(f, x)
+    >>> ref = df(x)
+    >>> res.df.shape == (4, 3, 10)
+    True
+    >>> np.allclose(res.df, ref)
+    True
+
+    """
+    xp = array_namespace(x)
+    x = xp.asarray(x)
+    int_dtype = xp.isdtype(x.dtype, 'integral')
+    x0 = xp.asarray(x, dtype=xp.asarray(1.0).dtype) if int_dtype else x
+
+    if x0.ndim < 1:
+        message = "Argument `x` must be at least 1-D."
+        raise ValueError(message)
+
+    m = x0.shape[0]
+    i = xp.arange(m)
+
+    def wrapped(x):
+        p = () if x.ndim == x0.ndim else (x.shape[-1],)  # number of abscissae
+
+        new_shape = (m, m) + x0.shape[1:] + p
+        xph = xp.expand_dims(x0, axis=1)
+        if x.ndim != x0.ndim:
+            xph = xp.expand_dims(xph, axis=-1)
+        xph = xp_copy(xp.broadcast_to(xph, new_shape), xp=xp)
+        xph[i, i] = x
+        return f(xph)
+
+    res = derivative(wrapped, x, tolerances=tolerances,
+                     maxiter=maxiter, order=order, initial_step=initial_step,
+                     step_factor=step_factor, preserve_shape=True,
+                     step_direction=step_direction)
+
+    del res.x  # the user knows `x`, and the way it gets broadcasted is meaningless here
+    return res
+
+
+def hessian(f, x, *, tolerances=None, maxiter=10,
+            order=8, initial_step=0.5, step_factor=2.0):
+    r"""Evaluate the Hessian of a function numerically.
+
+    Parameters
+    ----------
+    f : callable
+        The function whose Hessian is desired. The signature must be::
+
+            f(xi: ndarray) -> ndarray
+
+        where each element of ``xi`` is a finite real. If the function to be
+        differentiated accepts additional arguments, wrap it (e.g. using
+        `functools.partial` or ``lambda``) and pass the wrapped callable
+        into `hessian`. `f` must not mutate the array ``xi``. See Notes
+        regarding vectorization and the dimensionality of the input and output.
+    x : float array_like
+        Points at which to evaluate the Hessian. Must have at least one dimension.
+        See Notes regarding the dimensionality and vectorization.
+    tolerances : dictionary of floats, optional
+        Absolute and relative tolerances. Valid keys of the dictionary are:
+
+        - ``atol`` - absolute tolerance on the derivative
+        - ``rtol`` - relative tolerance on the derivative
+
+        Iteration will stop when ``res.error < atol + rtol * abs(res.df)``. The default
+        `atol` is the smallest normal number of the appropriate dtype, and
+        the default `rtol` is the square root of the precision of the
+        appropriate dtype.
+    order : int, default: 8
+        The (positive integer) order of the finite difference formula to be
+        used. Odd integers will be rounded up to the next even integer.
+    initial_step : float, default: 0.5
+        The (absolute) initial step size for the finite difference derivative
+        approximation.
+    step_factor : float, default: 2.0
+        The factor by which the step size is *reduced* in each iteration; i.e.
+        the step size in iteration 1 is ``initial_step/step_factor``. If
+        ``step_factor < 1``, subsequent steps will be greater than the initial
+        step; this may be useful if steps smaller than some threshold are
+        undesirable (e.g. due to subtractive cancellation error).
+    maxiter : int, default: 10
+        The maximum number of iterations of the algorithm to perform. See
+        Notes.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : The error estimate increased, so iteration was terminated.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+
+        ddf : float array
+            The Hessian of `f` at `x`, if the algorithm terminated
+            successfully.
+        error : float array
+            An estimate of the error: the magnitude of the difference between
+            the current estimate of the Hessian and the estimate in the
+            previous iteration.
+        nfev : int array
+            The number of points at which `f` was evaluated.
+
+        Each element of an attribute is associated with the corresponding
+        element of `ddf`. For instance, element ``[i, j]`` of `nfev` is the
+        number of points at which `f` was evaluated for the sake of
+        computing element ``[i, j]`` of `ddf`.
+
+    See Also
+    --------
+    derivative, jacobian
+
+    Notes
+    -----
+    Suppose we wish to evaluate the Hessian of a function
+    :math:`f: \mathbf{R}^m \rightarrow \mathbf{R}`, and we assign to variable
+    ``m`` the positive integer value of :math:`m`. If we wish to evaluate
+    the Hessian at a single point, then:
+
+    - argument `x` must be an array of shape ``(m,)``
+    - argument `f` must be vectorized to accept an array of shape
+      ``(m, ...)``. The first axis represents the :math:`m` inputs of
+      :math:`f`; the remaining axes indicated by ellipses are for evaluating
+      the function at several abscissae in a single call.
+    - argument `f` must return an array of shape ``(...)``.
+    - attribute ``dff`` of the result object will be an array of shape ``(m, m)``,
+      the Hessian.
+
+    This function is also vectorized in the sense that the Hessian can be
+    evaluated at ``k`` points in a single call. In this case, `x` would be an
+    array of shape ``(m, k)``, `f` would accept an array of shape
+    ``(m, ...)`` and return an array of shape ``(...)``, and the ``ddf``
+    attribute of the result would have shape ``(m, m, k)``. Note that the
+    axis associated with the ``k`` points is included within the axes
+    denoted by ``(...)``.
+
+    Currently, `hessian` is implemented by nesting calls to `jacobian`.
+    All options passed to `hessian` are used for both the inner and outer
+    calls with one exception: the `rtol` used in the inner `jacobian` call
+    is tightened by a factor of 100 with the expectation that the inner
+    error can be ignored. A consequence is that `rtol` should not be set
+    less than 100 times the precision of the dtype of `x`; a warning is
+    emitted otherwise.
+
+    References
+    ----------
+    .. [1] Hessian matrix, *Wikipedia*,
+           https://en.wikipedia.org/wiki/Hessian_matrix
+
+    Examples
+    --------
+    The Rosenbrock function maps from :math:`\mathbf{R}^m \rightarrow \mathbf{R}`;
+    the SciPy implementation `scipy.optimize.rosen` is vectorized to accept an
+    array of shape ``(m, ...)`` and return an array of shape ``...``. Suppose we
+    wish to evaluate the Hessian at ``[0.5, 0.5, 0.5]``.
+
+    >>> import numpy as np
+    >>> from scipy.differentiate import hessian
+    >>> from scipy.optimize import rosen, rosen_hess
+    >>> m = 3
+    >>> x = np.full(m, 0.5)
+    >>> res = hessian(rosen, x)
+    >>> ref = rosen_hess(x)  # reference value of the Hessian
+    >>> np.allclose(res.ddf, ref)
+    True
+
+    `hessian` is vectorized to evaluate the Hessian at multiple points
+    in a single call.
+
+    >>> rng = np.random.default_rng(4589245925010)
+    >>> x = rng.random((m, 10))
+    >>> res = hessian(rosen, x)
+    >>> ref = [rosen_hess(xi) for xi in x.T]
+    >>> ref = np.moveaxis(ref, 0, -1)
+    >>> np.allclose(res.ddf, ref)
+    True
+
+    """
+    # todo:
+    # - add ability to vectorize over additional parameters (*args?)
+    # - error estimate stack with inner jacobian (or use legit 2D stencil)
+
+    kwargs = dict(maxiter=maxiter, order=order, initial_step=initial_step,
+                  step_factor=step_factor)
+    tolerances = {} if tolerances is None else tolerances
+    atol = tolerances.get('atol', None)
+    rtol = tolerances.get('rtol', None)
+
+    xp = array_namespace(x)
+    x = xp.asarray(x)
+    dtype = x.dtype if not xp.isdtype(x.dtype, 'integral') else xp.asarray(1.).dtype
+    finfo = xp.finfo(dtype)
+    rtol = finfo.eps**0.5 if rtol is None else rtol  # keep same as `derivative`
+
+    # tighten the inner tolerance to make the inner error negligible
+    rtol_min = finfo.eps * 100
+    message = (f"The specified `{rtol=}`, but error estimates are likely to be "
+               f"unreliable when `rtol < {rtol_min}`.")
+    if 0 < rtol < rtol_min:  # rtol <= 0 is an error
+        warnings.warn(message, RuntimeWarning, stacklevel=2)
+        rtol = rtol_min
+
+    def df(x):
+        tolerances = dict(rtol=rtol/100, atol=atol)
+        temp = jacobian(f, x, tolerances=tolerances, **kwargs)
+        nfev.append(temp.nfev if len(nfev) == 0 else temp.nfev.sum(axis=-1))
+        return temp.df
+
+    nfev = []  # track inner function evaluations
+    res = jacobian(df, x, tolerances=tolerances, **kwargs)  # jacobian of jacobian
+
+    nfev = xp.cumulative_sum(xp.stack(nfev), axis=0)
+    res_nit = xp.astype(res.nit[xp.newaxis, ...], xp.int64)  # appease torch
+    res.nfev = xp_take_along_axis(nfev, res_nit, axis=0)[0]
+    res.ddf = res.df
+    del res.df  # this is renamed to ddf
+    del res.nit  # this is only the outer-jacobian nit
+
+    return res
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/tests/test_differentiate.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/tests/test_differentiate.py
new file mode 100644
index 0000000000000000000000000000000000000000..64bc8193cc237465e9427300bedfac8712963e4c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/differentiate/tests/test_differentiate.py
@@ -0,0 +1,695 @@
+import math
+import pytest
+
+import numpy as np
+
+from scipy.conftest import array_api_compatible
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._array_api_no_0d import xp_assert_close, xp_assert_equal, xp_assert_less
+from scipy._lib._array_api import is_numpy, is_torch, array_namespace
+
+from scipy import stats, optimize, special
+from scipy.differentiate import derivative, jacobian, hessian
+from scipy.differentiate._differentiate import _EERRORINCREASE
+
+
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends")]
+
+array_api_strict_skip_reason = 'Array API does not support fancy indexing assignment.'
+jax_skip_reason = 'JAX arrays do not support item assignment.'
+
+
+@pytest.mark.skip_xp_backends('array_api_strict', reason=array_api_strict_skip_reason)
+@pytest.mark.skip_xp_backends('jax.numpy',reason=jax_skip_reason)
+class TestDerivative:
+
+    def f(self, x):
+        return special.ndtr(x)
+
+    @pytest.mark.parametrize('x', [0.6, np.linspace(-0.05, 1.05, 10)])
+    def test_basic(self, x, xp):
+        # Invert distribution CDF and compare against distribution `ppf`
+        default_dtype = xp.asarray(1.).dtype
+        res = derivative(self.f, xp.asarray(x, dtype=default_dtype))
+        ref = xp.asarray(stats.norm().pdf(x), dtype=default_dtype)
+        xp_assert_close(res.df, ref)
+        # This would be nice, but doesn't always work out. `error` is an
+        # estimate, not a bound.
+        if not is_torch(xp):
+            xp_assert_less(xp.abs(res.df - ref), res.error)
+
+    @pytest.mark.skip_xp_backends(np_only=True)
+    @pytest.mark.parametrize('case', stats._distr_params.distcont)
+    def test_accuracy(self, case):
+        distname, params = case
+        dist = getattr(stats, distname)(*params)
+        x = dist.median() + 0.1
+        res = derivative(dist.cdf, x)
+        ref = dist.pdf(x)
+        xp_assert_close(res.df, ref, atol=1e-10)
+
+    @pytest.mark.parametrize('order', [1, 6])
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, order, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        x = np.linspace(-0.05, 1.05, 12).reshape(shape) if shape else 0.6
+        n = np.size(x)
+        state = {}
+
+        @np.vectorize
+        def _derivative_single(x):
+            return derivative(self.f, x, order=order)
+
+        def f(x, *args, **kwargs):
+            state['nit'] += 1
+            state['feval'] += 1 if (x.size == n or x.ndim <=1) else x.shape[-1]
+            return self.f(x, *args, **kwargs)
+
+        state['nit'] = -1
+        state['feval'] = 0
+
+        res = derivative(f, xp.asarray(x, dtype=xp.float64), order=order)
+        refs = _derivative_single(x).ravel()
+
+        ref_x = [ref.x for ref in refs]
+        xp_assert_close(xp.reshape(res.x, (-1,)), xp.asarray(ref_x))
+
+        ref_df = [ref.df for ref in refs]
+        xp_assert_close(xp.reshape(res.df, (-1,)), xp.asarray(ref_df))
+
+        ref_error = [ref.error for ref in refs]
+        xp_assert_close(xp.reshape(res.error, (-1,)), xp.asarray(ref_error),
+                        atol=1e-12)
+
+        ref_success = [bool(ref.success) for ref in refs]
+        xp_assert_equal(xp.reshape(res.success, (-1,)), xp.asarray(ref_success))
+
+        ref_flag = [np.int32(ref.status) for ref in refs]
+        xp_assert_equal(xp.reshape(res.status, (-1,)), xp.asarray(ref_flag))
+
+        ref_nfev = [np.int32(ref.nfev) for ref in refs]
+        xp_assert_equal(xp.reshape(res.nfev, (-1,)), xp.asarray(ref_nfev))
+        if is_numpy(xp):  # can't expect other backends to be exactly the same
+            assert xp.max(res.nfev) == state['feval']
+
+        ref_nit = [np.int32(ref.nit) for ref in refs]
+        xp_assert_equal(xp.reshape(res.nit, (-1,)), xp.asarray(ref_nit))
+        if is_numpy(xp):  # can't expect other backends to be exactly the same
+            assert xp.max(res.nit) == state['nit']
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously.
+        rng = np.random.default_rng(5651219684984213)
+        def f(xs, js):
+            f.nit += 1
+            funcs = [lambda x: x - 2.5,  # converges
+                     lambda x: xp.exp(x)*rng.random(),  # error increases
+                     lambda x: xp.exp(x),  # reaches maxiter due to order=2
+                     lambda x: xp.full_like(x, xp.nan)]  # stops due to NaN
+            res = [funcs[int(j)](x) for x, j in zip(xs, xp.reshape(js, (-1,)))]
+            return xp.stack(res)
+        f.nit = 0
+
+        args = (xp.arange(4, dtype=xp.int64),)
+        res = derivative(f, xp.ones(4, dtype=xp.float64),
+                         tolerances=dict(rtol=1e-14),
+                         order=2, args=args)
+
+        ref_flags = xp.asarray([eim._ECONVERGED,
+                                _EERRORINCREASE,
+                                eim._ECONVERR,
+                                eim._EVALUEERR], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_flags_preserve_shape(self, xp):
+        # Same test as above but using `preserve_shape` option to simplify.
+        rng = np.random.default_rng(5651219684984213)
+        def f(x):
+            out = [x - 2.5,  # converges
+                   xp.exp(x)*rng.random(),  # error increases
+                   xp.exp(x),  # reaches maxiter due to order=2
+                   xp.full_like(x, xp.nan)]  # stops due to NaN
+            return xp.stack(out)
+
+        res = derivative(f, xp.asarray(1, dtype=xp.float64),
+                         tolerances=dict(rtol=1e-14),
+                         order=2, preserve_shape=True)
+
+        ref_flags = xp.asarray([eim._ECONVERGED,
+                                _EERRORINCREASE,
+                                eim._ECONVERR,
+                                eim._EVALUEERR], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_preserve_shape(self, xp):
+        # Test `preserve_shape` option
+        def f(x):
+            out = [x, xp.sin(3*x), x+xp.sin(10*x), xp.sin(20*x)*(x-1)**2]
+            return xp.stack(out)
+
+        x = xp.asarray(0.)
+        ref = xp.asarray([xp.asarray(1), 3*xp.cos(3*x), 1+10*xp.cos(10*x),
+                          20*xp.cos(20*x)*(x-1)**2 + 2*xp.sin(20*x)*(x-1)])
+        res = derivative(f, x, preserve_shape=True)
+        xp_assert_close(res.df, ref)
+
+    def test_convergence(self, xp):
+        # Test that the convergence tolerances behave as expected
+        x = xp.asarray(1., dtype=xp.float64)
+        f = special.ndtr
+        ref = float(stats.norm.pdf(1.))
+        tolerances0 = dict(atol=0, rtol=0)
+
+        tolerances = tolerances0.copy()
+        tolerances['atol'] = 1e-3
+        res1 = derivative(f, x, tolerances=tolerances, order=4)
+        assert abs(res1.df - ref) < 1e-3
+        tolerances['atol'] = 1e-6
+        res2 = derivative(f, x, tolerances=tolerances, order=4)
+        assert abs(res2.df - ref) < 1e-6
+        assert abs(res2.df - ref) < abs(res1.df - ref)
+
+        tolerances = tolerances0.copy()
+        tolerances['rtol'] = 1e-3
+        res1 = derivative(f, x, tolerances=tolerances, order=4)
+        assert abs(res1.df - ref) < 1e-3 * ref
+        tolerances['rtol'] = 1e-6
+        res2 = derivative(f, x, tolerances=tolerances, order=4)
+        assert abs(res2.df - ref) < 1e-6 * ref
+        assert abs(res2.df - ref) < abs(res1.df - ref)
+
+    def test_step_parameters(self, xp):
+        # Test that step factors have the expected effect on accuracy
+        x = xp.asarray(1., dtype=xp.float64)
+        f = special.ndtr
+        ref = float(stats.norm.pdf(1.))
+
+        res1 = derivative(f, x, initial_step=0.5, maxiter=1)
+        res2 = derivative(f, x, initial_step=0.05, maxiter=1)
+        assert abs(res2.df - ref) < abs(res1.df - ref)
+
+        res1 = derivative(f, x, step_factor=2, maxiter=1)
+        res2 = derivative(f, x, step_factor=20, maxiter=1)
+        assert abs(res2.df - ref) < abs(res1.df - ref)
+
+        # `step_factor` can be less than 1: `initial_step` is the minimum step
+        kwargs = dict(order=4, maxiter=1, step_direction=0)
+        res = derivative(f, x, initial_step=0.5, step_factor=0.5, **kwargs)
+        ref = derivative(f, x, initial_step=1, step_factor=2, **kwargs)
+        xp_assert_close(res.df, ref.df, rtol=5e-15)
+
+        # This is a similar test for one-sided difference
+        kwargs = dict(order=2, maxiter=1, step_direction=1)
+        res = derivative(f, x, initial_step=1, step_factor=2, **kwargs)
+        ref = derivative(f, x, initial_step=1/np.sqrt(2), step_factor=0.5, **kwargs)
+        xp_assert_close(res.df, ref.df, rtol=5e-15)
+
+        kwargs['step_direction'] = -1
+        res = derivative(f, x, initial_step=1, step_factor=2, **kwargs)
+        ref = derivative(f, x, initial_step=1/np.sqrt(2), step_factor=0.5, **kwargs)
+        xp_assert_close(res.df, ref.df, rtol=5e-15)
+
+    def test_step_direction(self, xp):
+        # test that `step_direction` works as expected
+        def f(x):
+            y = xp.exp(x)
+            y[(x < 0) + (x > 2)] = xp.nan
+            return y
+
+        x = xp.linspace(0, 2, 10)
+        step_direction = xp.zeros_like(x)
+        step_direction[x < 0.6], step_direction[x > 1.4] = 1, -1
+        res = derivative(f, x, step_direction=step_direction)
+        xp_assert_close(res.df, xp.exp(x))
+        assert xp.all(res.success)
+
+    def test_vectorized_step_direction_args(self, xp):
+        # test that `step_direction` and `args` are vectorized properly
+        def f(x, p):
+            return x ** p
+
+        def df(x, p):
+            return p * x ** (p - 1)
+
+        x = xp.reshape(xp.asarray([1, 2, 3, 4]), (-1, 1, 1))
+        hdir = xp.reshape(xp.asarray([-1, 0, 1]), (1, -1, 1))
+        p = xp.reshape(xp.asarray([2, 3]), (1, 1, -1))
+        res = derivative(f, x, step_direction=hdir, args=(p,))
+        ref = xp.broadcast_to(df(x, p), res.df.shape)
+        ref = xp.asarray(ref, dtype=xp.asarray(1.).dtype)
+        xp_assert_close(res.df, ref)
+
+    def test_initial_step(self, xp):
+        # Test that `initial_step` works as expected and is vectorized
+        def f(x):
+            return xp.exp(x)
+
+        x = xp.asarray(0., dtype=xp.float64)
+        step_direction = xp.asarray([-1, 0, 1])
+        h0 = xp.reshape(xp.logspace(-3, 0, 10), (-1, 1))
+        res = derivative(f, x, initial_step=h0, order=2, maxiter=1,
+                         step_direction=step_direction)
+        err = xp.abs(res.df - f(x))
+
+        # error should be smaller for smaller step sizes
+        assert xp.all(err[:-1, ...] < err[1:, ...])
+
+        # results of vectorized call should match results with
+        # initial_step taken one at a time
+        for i in range(h0.shape[0]):
+            ref = derivative(f, x, initial_step=h0[i, 0], order=2, maxiter=1,
+                             step_direction=step_direction)
+            xp_assert_close(res.df[i, :], ref.df, rtol=1e-14)
+
+    def test_maxiter_callback(self, xp):
+        # Test behavior of `maxiter` parameter and `callback` interface
+        x = xp.asarray(0.612814, dtype=xp.float64)
+        maxiter = 3
+
+        def f(x):
+            res = special.ndtr(x)
+            return res
+
+        default_order = 8
+        res = derivative(f, x, maxiter=maxiter, tolerances=dict(rtol=1e-15))
+        assert not xp.any(res.success)
+        assert xp.all(res.nfev == default_order + 1 + (maxiter - 1)*2)
+        assert xp.all(res.nit == maxiter)
+
+        def callback(res):
+            callback.iter += 1
+            callback.res = res
+            assert hasattr(res, 'x')
+            assert float(res.df) not in callback.dfs
+            callback.dfs.add(float(res.df))
+            assert res.status == eim._EINPROGRESS
+            if callback.iter == maxiter:
+                raise StopIteration
+        callback.iter = -1  # callback called once before first iteration
+        callback.res = None
+        callback.dfs = set()
+
+        res2 = derivative(f, x, callback=callback, tolerances=dict(rtol=1e-15))
+        # terminating with callback is identical to terminating due to maxiter
+        # (except for `status`)
+        for key in res.keys():
+            if key == 'status':
+                assert res[key] == eim._ECONVERR
+                assert res2[key] == eim._ECALLBACK
+            else:
+                assert res2[key] == callback.res[key] == res[key]
+
+    @pytest.mark.parametrize("hdir", (-1, 0, 1))
+    @pytest.mark.parametrize("x", (0.65, [0.65, 0.7]))
+    @pytest.mark.parametrize("dtype", ('float16', 'float32', 'float64'))
+    def test_dtype(self, hdir, x, dtype, xp):
+        if dtype == 'float16' and not is_numpy(xp):
+            pytest.skip('float16 not tested for alternative backends')
+
+        # Test that dtypes are preserved
+        dtype = getattr(xp, dtype)
+        x = xp.asarray(x, dtype=dtype)
+
+        def f(x):
+            assert x.dtype == dtype
+            return xp.exp(x)
+
+        def callback(res):
+            assert res.x.dtype == dtype
+            assert res.df.dtype == dtype
+            assert res.error.dtype == dtype
+
+        res = derivative(f, x, order=4, step_direction=hdir, callback=callback)
+        assert res.x.dtype == dtype
+        assert res.df.dtype == dtype
+        assert res.error.dtype == dtype
+        eps = xp.finfo(dtype).eps
+        # not sure why torch is less accurate here; might be worth investigating
+        rtol = eps**0.5 * 50 if is_torch(xp) else eps**0.5
+        xp_assert_close(res.df, xp.exp(res.x), rtol=rtol)
+
+    def test_input_validation(self, xp):
+        # Test input validation for appropriate error messages
+        one = xp.asarray(1)
+
+        message = '`f` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            derivative(None, one)
+
+        message = 'Abscissae and function output must be real numbers.'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, xp.asarray(-4+1j))
+
+        message = "When `preserve_shape=False`, the shape of the array..."
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: [1, 2, 3], xp.asarray([-2, -3]))
+
+        message = 'Tolerances and step parameters must be non-negative...'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, tolerances=dict(atol=-1))
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, tolerances=dict(rtol='ekki'))
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, step_factor=object())
+
+        message = '`maxiter` must be a positive integer.'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, maxiter=1.5)
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, maxiter=0)
+
+        message = '`order` must be a positive integer'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, order=1.5)
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, order=0)
+
+        message = '`preserve_shape` must be True or False.'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, preserve_shape='herring')
+
+        message = '`callback` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            derivative(lambda x: x, one, callback='shrubbery')
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases
+
+        # Test that integers are not passed to `f`
+        # (otherwise this would overflow)
+        def f(x):
+            xp_test = array_namespace(x)  # needs `isdtype`
+            assert xp_test.isdtype(x.dtype, 'real floating')
+            return x ** 99 - 1
+
+        if not is_torch(xp):  # torch defaults to float32
+            res = derivative(f, xp.asarray(7), tolerances=dict(rtol=1e-10))
+            assert res.success
+            xp_assert_close(res.df, xp.asarray(99*7.**98))
+
+        # Test invalid step size and direction
+        res = derivative(xp.exp, xp.asarray(1), step_direction=xp.nan)
+        xp_assert_equal(res.df, xp.asarray(xp.nan))
+        xp_assert_equal(res.status, xp.asarray(-3, dtype=xp.int32))
+
+        res = derivative(xp.exp, xp.asarray(1), initial_step=0)
+        xp_assert_equal(res.df, xp.asarray(xp.nan))
+        xp_assert_equal(res.status, xp.asarray(-3, dtype=xp.int32))
+
+        # Test that if success is achieved in the correct number
+        # of iterations if function is a polynomial. Ideally, all polynomials
+        # of order 0-2 would get exact result with 0 refinement iterations,
+        # all polynomials of order 3-4 would be differentiated exactly after
+        # 1 iteration, etc. However, it seems that `derivative` needs an
+        # extra iteration to detect convergence based on the error estimate.
+
+        for n in range(6):
+            x = xp.asarray(1.5, dtype=xp.float64)
+            def f(x):
+                return 2*x**n
+
+            ref = 2*n*x**(n-1)
+
+            res = derivative(f, x, maxiter=1, order=max(1, n))
+            xp_assert_close(res.df, ref, rtol=1e-15)
+            xp_assert_equal(res.error, xp.asarray(xp.nan, dtype=xp.float64))
+
+            res = derivative(f, x, order=max(1, n))
+            assert res.success
+            assert res.nit == 2
+            xp_assert_close(res.df, ref, rtol=1e-15)
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return c*x - 1
+
+        res = derivative(f, xp.asarray(2), args=xp.asarray(3))
+        xp_assert_close(res.df, xp.asarray(3.))
+
+    # no need to run a test on multiple backends if it's xfailed
+    @pytest.mark.skip_xp_backends(np_only=True)
+    @pytest.mark.xfail
+    @pytest.mark.parametrize("case", (  # function, evaluation point
+        (lambda x: (x - 1) ** 3, 1),
+        (lambda x: np.where(x > 1, (x - 1) ** 5, (x - 1) ** 3), 1)
+    ))
+    def test_saddle_gh18811(self, case):
+        # With default settings, `derivative` will not always converge when
+        # the true derivative is exactly zero. This tests that specifying a
+        # (tight) `atol` alleviates the problem. See discussion in gh-18811.
+        atol = 1e-16
+        res = derivative(*case, step_direction=[-1, 0, 1], atol=atol)
+        assert np.all(res.success)
+        xp_assert_close(res.df, 0, atol=atol)
+
+
+class JacobianHessianTest:
+    def test_iv(self, xp):
+        jh_func = self.jh_func.__func__
+
+        # Test input validation
+        message = "Argument `x` must be at least 1-D."
+        with pytest.raises(ValueError, match=message):
+            jh_func(xp.sin, 1, tolerances=dict(atol=-1))
+
+        # Confirm that other parameters are being passed to `derivative`,
+        # which raises an appropriate error message.
+        x = xp.ones(3)
+        func = optimize.rosen
+        message = 'Tolerances and step parameters must be non-negative scalars.'
+        with pytest.raises(ValueError, match=message):
+            jh_func(func, x, tolerances=dict(atol=-1))
+        with pytest.raises(ValueError, match=message):
+            jh_func(func, x, tolerances=dict(rtol=-1))
+        with pytest.raises(ValueError, match=message):
+            jh_func(func, x, step_factor=-1)
+
+        message = '`order` must be a positive integer.'
+        with pytest.raises(ValueError, match=message):
+            jh_func(func, x, order=-1)
+
+        message = '`maxiter` must be a positive integer.'
+        with pytest.raises(ValueError, match=message):
+            jh_func(func, x, maxiter=-1)
+
+
+@pytest.mark.skip_xp_backends('array_api_strict', reason=array_api_strict_skip_reason)
+@pytest.mark.skip_xp_backends('jax.numpy',reason=jax_skip_reason)
+class TestJacobian(JacobianHessianTest):
+    jh_func = jacobian
+
+    # Example functions and Jacobians from Wikipedia:
+    # https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant#Examples
+
+    def f1(z, xp):
+        x, y = z
+        return xp.stack([x ** 2 * y, 5 * x + xp.sin(y)])
+
+    def df1(z):
+        x, y = z
+        return [[2 * x * y, x ** 2], [np.full_like(x, 5), np.cos(y)]]
+
+    f1.mn = 2, 2  # type: ignore[attr-defined]
+    f1.ref = df1  # type: ignore[attr-defined]
+
+    def f2(z, xp):
+        r, phi = z
+        return xp.stack([r * xp.cos(phi), r * xp.sin(phi)])
+
+    def df2(z):
+        r, phi = z
+        return [[np.cos(phi), -r * np.sin(phi)],
+                [np.sin(phi), r * np.cos(phi)]]
+
+    f2.mn = 2, 2  # type: ignore[attr-defined]
+    f2.ref = df2  # type: ignore[attr-defined]
+
+    def f3(z, xp):
+        r, phi, th = z
+        return xp.stack([r * xp.sin(phi) * xp.cos(th), r * xp.sin(phi) * xp.sin(th),
+                         r * xp.cos(phi)])
+
+    def df3(z):
+        r, phi, th = z
+        return [[np.sin(phi) * np.cos(th), r * np.cos(phi) * np.cos(th),
+                 -r * np.sin(phi) * np.sin(th)],
+                [np.sin(phi) * np.sin(th), r * np.cos(phi) * np.sin(th),
+                 r * np.sin(phi) * np.cos(th)],
+                [np.cos(phi), -r * np.sin(phi), np.zeros_like(r)]]
+
+    f3.mn = 3, 3  # type: ignore[attr-defined]
+    f3.ref = df3  # type: ignore[attr-defined]
+
+    def f4(x, xp):
+        x1, x2, x3 = x
+        return xp.stack([x1, 5 * x3, 4 * x2 ** 2 - 2 * x3, x3 * xp.sin(x1)])
+
+    def df4(x):
+        x1, x2, x3 = x
+        one = np.ones_like(x1)
+        return [[one, 0 * one, 0 * one],
+                [0 * one, 0 * one, 5 * one],
+                [0 * one, 8 * x2, -2 * one],
+                [x3 * np.cos(x1), 0 * one, np.sin(x1)]]
+
+    f4.mn = 3, 4  # type: ignore[attr-defined]
+    f4.ref = df4  # type: ignore[attr-defined]
+
+    def f5(x, xp):
+        x1, x2, x3 = x
+        return xp.stack([5 * x2, 4 * x1 ** 2 - 2 * xp.sin(x2 * x3), x2 * x3])
+
+    def df5(x):
+        x1, x2, x3 = x
+        one = np.ones_like(x1)
+        return [[0 * one, 5 * one, 0 * one],
+                [8 * x1, -2 * x3 * np.cos(x2 * x3), -2 * x2 * np.cos(x2 * x3)],
+                [0 * one, x3, x2]]
+
+    f5.mn = 3, 3  # type: ignore[attr-defined]
+    f5.ref = df5  # type: ignore[attr-defined]
+
+    def rosen(x, _): return optimize.rosen(x)
+    rosen.mn = 5, 1  # type: ignore[attr-defined]
+    rosen.ref = optimize.rosen_der  # type: ignore[attr-defined]
+
+    @pytest.mark.parametrize('dtype', ('float32', 'float64'))
+    @pytest.mark.parametrize('size', [(), (6,), (2, 3)])
+    @pytest.mark.parametrize('func', [f1, f2, f3, f4, f5, rosen])
+    def test_examples(self, dtype, size, func, xp):
+        atol = 1e-10 if dtype == 'float64' else 1.99e-3
+        dtype = getattr(xp, dtype)
+        rng = np.random.default_rng(458912319542)
+        m, n = func.mn
+        x = rng.random(size=(m,) + size)
+        res = jacobian(lambda x: func(x , xp), xp.asarray(x, dtype=dtype))
+        # convert list of arrays to single array before converting to xp array
+        ref = xp.asarray(np.asarray(func.ref(x)), dtype=dtype)
+        xp_assert_close(res.df, ref, atol=atol)
+
+    def test_attrs(self, xp):
+        # Test attributes of result object
+        z = xp.asarray([0.5, 0.25])
+
+        # case in which some elements of the Jacobian are harder
+        # to calculate than others
+        def df1(z):
+            x, y = z
+            return xp.stack([xp.cos(0.5*x) * xp.cos(y), xp.sin(2*x) * y**2])
+
+        def df1_0xy(x, y):
+            return xp.cos(0.5*x) * xp.cos(y)
+
+        def df1_1xy(x, y):
+            return xp.sin(2*x) * y**2
+
+        res = jacobian(df1, z, initial_step=10)
+        if is_numpy(xp):
+            assert len(np.unique(res.nit)) == 4
+            assert len(np.unique(res.nfev)) == 4
+
+        res00 = jacobian(lambda x: df1_0xy(x, z[1]), z[0:1], initial_step=10)
+        res01 = jacobian(lambda y: df1_0xy(z[0], y), z[1:2], initial_step=10)
+        res10 = jacobian(lambda x: df1_1xy(x, z[1]), z[0:1], initial_step=10)
+        res11 = jacobian(lambda y: df1_1xy(z[0], y), z[1:2], initial_step=10)
+        ref = optimize.OptimizeResult()
+        for attr in ['success', 'status', 'df', 'nit', 'nfev']:
+            ref_attr = xp.asarray([[getattr(res00, attr), getattr(res01, attr)],
+                                   [getattr(res10, attr), getattr(res11, attr)]])
+            ref[attr] = xp.squeeze(ref_attr)
+            rtol = 1.5e-5 if res[attr].dtype == xp.float32 else 1.5e-14
+            xp_assert_close(res[attr], ref[attr], rtol=rtol)
+
+    def test_step_direction_size(self, xp):
+        # Check that `step_direction` and `initial_step` can be used to ensure that
+        # the usable domain of a function is respected.
+        rng = np.random.default_rng(23892589425245)
+        b = rng.random(3)
+        eps = 1e-7  # torch needs wiggle room?
+
+        def f(x):
+            x[0, x[0] < b[0]] = xp.nan
+            x[0, x[0] > b[0] + 0.25] = xp.nan
+            x[1, x[1] > b[1]] = xp.nan
+            x[1, x[1] < b[1] - 0.1-eps] = xp.nan
+            return TestJacobian.f5(x, xp)
+
+        dir = [1, -1, 0]
+        h0 = [0.25, 0.1, 0.5]
+        atol = {'atol': 1e-8}
+        res = jacobian(f, xp.asarray(b, dtype=xp.float64), initial_step=h0,
+                       step_direction=dir, tolerances=atol)
+        ref = xp.asarray(TestJacobian.df5(b), dtype=xp.float64)
+        xp_assert_close(res.df, ref, atol=1e-8)
+        assert xp.all(xp.isfinite(ref))
+
+
+@pytest.mark.skip_xp_backends('array_api_strict', reason=array_api_strict_skip_reason)
+@pytest.mark.skip_xp_backends('jax.numpy',reason=jax_skip_reason)
+class TestHessian(JacobianHessianTest):
+    jh_func = hessian
+
+    @pytest.mark.parametrize('shape', [(), (4,), (2, 4)])
+    def test_example(self, shape, xp):
+        rng = np.random.default_rng(458912319542)
+        m = 3
+        x = xp.asarray(rng.random((m,) + shape), dtype=xp.float64)
+        res = hessian(optimize.rosen, x)
+        if shape:
+            x = xp.reshape(x, (m, -1))
+            ref = xp.stack([optimize.rosen_hess(xi) for xi in x.T])
+            ref = xp.moveaxis(ref, 0, -1)
+            ref = xp.reshape(ref, (m, m,) + shape)
+        else:
+            ref = optimize.rosen_hess(x)
+        xp_assert_close(res.ddf, ref, atol=1e-8)
+
+        # # Removed symmetry enforcement; consider adding back in as a feature
+        # # check symmetry
+        # for key in ['ddf', 'error', 'nfev', 'success', 'status']:
+        #     assert_equal(res[key], np.swapaxes(res[key], 0, 1))
+
+    def test_float32(self, xp):
+        rng = np.random.default_rng(458912319542)
+        x = xp.asarray(rng.random(3), dtype=xp.float32)
+        res = hessian(optimize.rosen, x)
+        ref = optimize.rosen_hess(x)
+        mask = (ref != 0)
+        xp_assert_close(res.ddf[mask], ref[mask])
+        atol = 1e-2 * xp.abs(xp.min(ref[mask]))
+        xp_assert_close(res.ddf[~mask], ref[~mask], atol=atol)
+
+    def test_nfev(self, xp):
+        z = xp.asarray([0.5, 0.25])
+        xp_test = array_namespace(z)
+
+        def f1(z):
+            x, y = xp_test.broadcast_arrays(*z)
+            f1.nfev = f1.nfev + (math.prod(x.shape[2:]) if x.ndim > 2 else 1)
+            return xp.sin(x) * y ** 3
+        f1.nfev = 0
+
+
+        res = hessian(f1, z, initial_step=10)
+        f1.nfev = 0
+        res00 = hessian(lambda x: f1([x[0], z[1]]), z[0:1], initial_step=10)
+        assert res.nfev[0, 0] == f1.nfev == res00.nfev[0, 0]
+
+        f1.nfev = 0
+        res11 = hessian(lambda y: f1([z[0], y[0]]), z[1:2], initial_step=10)
+        assert res.nfev[1, 1] == f1.nfev == res11.nfev[0, 0]
+
+        # Removed symmetry enforcement; consider adding back in as a feature
+        # assert_equal(res.nfev, res.nfev.T)  # check symmetry
+        # assert np.unique(res.nfev).size == 3
+
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.skip_xp_backends(np_only=True,
+                                  reason='Python list input uses NumPy backend')
+    def test_small_rtol_warning(self, xp):
+        message = 'The specified `rtol=1e-15`, but...'
+        with pytest.warns(RuntimeWarning, match=message):
+            hessian(xp.sin, [1.], tolerances=dict(rtol=1e-15))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..10f4b39e48e2d6c0b042582ca65f572bde6ba575
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/__init__.py
@@ -0,0 +1,103 @@
+"""
+=========================================================
+Legacy discrete Fourier transforms (:mod:`scipy.fftpack`)
+=========================================================
+
+.. legacy::
+
+   New code should use :mod:`scipy.fft`.
+
+Fast Fourier Transforms (FFTs)
+==============================
+
+.. autosummary::
+   :toctree: generated/
+
+   fft - Fast (discrete) Fourier Transform (FFT)
+   ifft - Inverse FFT
+   fft2 - 2-D FFT
+   ifft2 - 2-D inverse FFT
+   fftn - N-D FFT
+   ifftn - N-D inverse FFT
+   rfft - FFT of strictly real-valued sequence
+   irfft - Inverse of rfft
+   dct - Discrete cosine transform
+   idct - Inverse discrete cosine transform
+   dctn - N-D Discrete cosine transform
+   idctn - N-D Inverse discrete cosine transform
+   dst - Discrete sine transform
+   idst - Inverse discrete sine transform
+   dstn - N-D Discrete sine transform
+   idstn - N-D Inverse discrete sine transform
+
+Differential and pseudo-differential operators
+==============================================
+
+.. autosummary::
+   :toctree: generated/
+
+   diff - Differentiation and integration of periodic sequences
+   tilbert - Tilbert transform:         cs_diff(x,h,h)
+   itilbert - Inverse Tilbert transform: sc_diff(x,h,h)
+   hilbert - Hilbert transform:         cs_diff(x,inf,inf)
+   ihilbert - Inverse Hilbert transform: sc_diff(x,inf,inf)
+   cs_diff - cosh/sinh pseudo-derivative of periodic sequences
+   sc_diff - sinh/cosh pseudo-derivative of periodic sequences
+   ss_diff - sinh/sinh pseudo-derivative of periodic sequences
+   cc_diff - cosh/cosh pseudo-derivative of periodic sequences
+   shift - Shift periodic sequences
+
+Helper functions
+================
+
+.. autosummary::
+   :toctree: generated/
+
+   fftshift - Shift the zero-frequency component to the center of the spectrum
+   ifftshift - The inverse of `fftshift`
+   fftfreq - Return the Discrete Fourier Transform sample frequencies
+   rfftfreq - DFT sample frequencies (for usage with rfft, irfft)
+   next_fast_len - Find the optimal length to zero-pad an FFT for speed
+
+Note that ``fftshift``, ``ifftshift`` and ``fftfreq`` are numpy functions
+exposed by ``fftpack``; importing them from ``numpy`` should be preferred.
+
+Convolutions (:mod:`scipy.fftpack.convolve`)
+============================================
+
+.. module:: scipy.fftpack.convolve
+
+.. autosummary::
+   :toctree: generated/
+
+   convolve
+   convolve_z
+   init_convolution_kernel
+   destroy_convolve_cache
+
+"""
+
+
+__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
+           'fft2','ifft2',
+           'diff',
+           'tilbert','itilbert','hilbert','ihilbert',
+           'sc_diff','cs_diff','cc_diff','ss_diff',
+           'shift',
+           'fftfreq', 'rfftfreq',
+           'fftshift', 'ifftshift',
+           'next_fast_len',
+           'dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn'
+           ]
+
+from ._basic import *
+from ._pseudo_diffs import *
+from ._helper import *
+from ._realtransforms import *
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import basic, helper, pseudo_diffs, realtransforms
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..59c85ae4b364464a66489ef221f7f7ac45624694
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_basic.py
@@ -0,0 +1,428 @@
+"""
+Discrete Fourier Transforms - _basic.py
+"""
+# Created by Pearu Peterson, August,September 2002
+__all__ = ['fft','ifft','fftn','ifftn','rfft','irfft',
+           'fft2','ifft2']
+
+from scipy.fft import _pocketfft
+from ._helper import _good_shape
+
+
+def fft(x, n=None, axis=-1, overwrite_x=False):
+    """
+    Return discrete Fourier transform of real or complex sequence.
+
+    The returned complex array contains ``y(0), y(1),..., y(n-1)``, where
+
+    ``y(j) = (x * exp(-2*pi*sqrt(-1)*j*np.arange(n)/n)).sum()``.
+
+    Parameters
+    ----------
+    x : array_like
+        Array to Fourier transform.
+    n : int, optional
+        Length of the Fourier transform. If ``n < x.shape[axis]``, `x` is
+        truncated. If ``n > x.shape[axis]``, `x` is zero-padded. The
+        default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the fft's are computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    z : complex ndarray
+        with the elements::
+
+            [y(0),y(1),..,y(n/2),y(1-n/2),...,y(-1)]        if n is even
+            [y(0),y(1),..,y((n-1)/2),y(-(n-1)/2),...,y(-1)]  if n is odd
+
+        where::
+
+            y(j) = sum[k=0..n-1] x[k] * exp(-sqrt(-1)*j*k* 2*pi/n), j = 0..n-1
+
+    See Also
+    --------
+    ifft : Inverse FFT
+    rfft : FFT of a real sequence
+
+    Notes
+    -----
+    The packing of the result is "standard": If ``A = fft(a, n)``, then
+    ``A[0]`` contains the zero-frequency term, ``A[1:n/2]`` contains the
+    positive-frequency terms, and ``A[n/2:]`` contains the negative-frequency
+    terms, in order of decreasingly negative frequency. So ,for an 8-point
+    transform, the frequencies of the result are [0, 1, 2, 3, -4, -3, -2, -1].
+    To rearrange the fft output so that the zero-frequency component is
+    centered, like [-4, -3, -2, -1,  0,  1,  2,  3], use `fftshift`.
+
+    Both single and double precision routines are implemented. Half precision
+    inputs will be converted to single precision. Non-floating-point inputs
+    will be converted to double precision. Long-double precision inputs are
+    not supported.
+
+    This function is most efficient when `n` is a power of two, and least
+    efficient when `n` is prime.
+
+    Note that if ``x`` is real-valued, then ``A[j] == A[n-j].conjugate()``.
+    If ``x`` is real-valued and ``n`` is even, then ``A[n/2]`` is real.
+
+    If the data type of `x` is real, a "real FFT" algorithm is automatically
+    used, which roughly halves the computation time. To increase efficiency
+    a little further, use `rfft`, which does the same calculation, but only
+    outputs half of the symmetrical spectrum. If the data is both real and
+    symmetrical, the `dct` can again double the efficiency by generating
+    half of the spectrum from half of the signal.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import fft, ifft
+    >>> x = np.arange(5)
+    >>> np.allclose(fft(ifft(x)), x, atol=1e-15)  # within numerical accuracy.
+    True
+
+    """
+    return _pocketfft.fft(x, n, axis, None, overwrite_x)
+
+
+def ifft(x, n=None, axis=-1, overwrite_x=False):
+    """
+    Return discrete inverse Fourier transform of real or complex sequence.
+
+    The returned complex array contains ``y(0), y(1),..., y(n-1)``, where
+
+    ``y(j) = (x * exp(2*pi*sqrt(-1)*j*np.arange(n)/n)).mean()``.
+
+    Parameters
+    ----------
+    x : array_like
+        Transformed data to invert.
+    n : int, optional
+        Length of the inverse Fourier transform.  If ``n < x.shape[axis]``,
+        `x` is truncated. If ``n > x.shape[axis]``, `x` is zero-padded.
+        The default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the ifft's are computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    ifft : ndarray of floats
+        The inverse discrete Fourier transform.
+
+    See Also
+    --------
+    fft : Forward FFT
+
+    Notes
+    -----
+    Both single and double precision routines are implemented. Half precision
+    inputs will be converted to single precision. Non-floating-point inputs
+    will be converted to double precision. Long-double precision inputs are
+    not supported.
+
+    This function is most efficient when `n` is a power of two, and least
+    efficient when `n` is prime.
+
+    If the data type of `x` is real, a "real IFFT" algorithm is automatically
+    used, which roughly halves the computation time.
+
+    Examples
+    --------
+    >>> from scipy.fftpack import fft, ifft
+    >>> import numpy as np
+    >>> x = np.arange(5)
+    >>> np.allclose(ifft(fft(x)), x, atol=1e-15)  # within numerical accuracy.
+    True
+
+    """
+    return _pocketfft.ifft(x, n, axis, None, overwrite_x)
+
+
+def rfft(x, n=None, axis=-1, overwrite_x=False):
+    """
+    Discrete Fourier transform of a real sequence.
+
+    Parameters
+    ----------
+    x : array_like, real-valued
+        The data to transform.
+    n : int, optional
+        Defines the length of the Fourier transform. If `n` is not specified
+        (the default) then ``n = x.shape[axis]``. If ``n < x.shape[axis]``,
+        `x` is truncated, if ``n > x.shape[axis]``, `x` is zero-padded.
+    axis : int, optional
+        The axis along which the transform is applied. The default is the
+        last axis.
+    overwrite_x : bool, optional
+        If set to true, the contents of `x` can be overwritten. Default is
+        False.
+
+    Returns
+    -------
+    z : real ndarray
+        The returned real array contains::
+
+          [y(0),Re(y(1)),Im(y(1)),...,Re(y(n/2))]              if n is even
+          [y(0),Re(y(1)),Im(y(1)),...,Re(y(n/2)),Im(y(n/2))]   if n is odd
+
+        where::
+
+          y(j) = sum[k=0..n-1] x[k] * exp(-sqrt(-1)*j*k*2*pi/n)
+          j = 0..n-1
+
+    See Also
+    --------
+    fft, irfft, scipy.fft.rfft
+
+    Notes
+    -----
+    Within numerical accuracy, ``y == rfft(irfft(y))``.
+
+    Both single and double precision routines are implemented. Half precision
+    inputs will be converted to single precision. Non-floating-point inputs
+    will be converted to double precision. Long-double precision inputs are
+    not supported.
+
+    To get an output with a complex datatype, consider using the newer
+    function `scipy.fft.rfft`.
+
+    Examples
+    --------
+    >>> from scipy.fftpack import fft, rfft
+    >>> a = [9, -9, 1, 3]
+    >>> fft(a)
+    array([  4. +0.j,   8.+12.j,  16. +0.j,   8.-12.j])
+    >>> rfft(a)
+    array([  4.,   8.,  12.,  16.])
+
+    """
+    return _pocketfft.rfft_fftpack(x, n, axis, None, overwrite_x)
+
+
+def irfft(x, n=None, axis=-1, overwrite_x=False):
+    """
+    Return inverse discrete Fourier transform of real sequence x.
+
+    The contents of `x` are interpreted as the output of the `rfft`
+    function.
+
+    Parameters
+    ----------
+    x : array_like
+        Transformed data to invert.
+    n : int, optional
+        Length of the inverse Fourier transform.
+        If n < x.shape[axis], x is truncated.
+        If n > x.shape[axis], x is zero-padded.
+        The default results in n = x.shape[axis].
+    axis : int, optional
+        Axis along which the ifft's are computed; the default is over
+        the last axis (i.e., axis=-1).
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    irfft : ndarray of floats
+        The inverse discrete Fourier transform.
+
+    See Also
+    --------
+    rfft, ifft, scipy.fft.irfft
+
+    Notes
+    -----
+    The returned real array contains::
+
+        [y(0),y(1),...,y(n-1)]
+
+    where for n is even::
+
+        y(j) = 1/n (sum[k=1..n/2-1] (x[2*k-1]+sqrt(-1)*x[2*k])
+                                     * exp(sqrt(-1)*j*k* 2*pi/n)
+                    + c.c. + x[0] + (-1)**(j) x[n-1])
+
+    and for n is odd::
+
+        y(j) = 1/n (sum[k=1..(n-1)/2] (x[2*k-1]+sqrt(-1)*x[2*k])
+                                     * exp(sqrt(-1)*j*k* 2*pi/n)
+                    + c.c. + x[0])
+
+    c.c. denotes complex conjugate of preceding expression.
+
+    For details on input parameters, see `rfft`.
+
+    To process (conjugate-symmetric) frequency-domain data with a complex
+    datatype, consider using the newer function `scipy.fft.irfft`.
+
+    Examples
+    --------
+    >>> from scipy.fftpack import rfft, irfft
+    >>> a = [1.0, 2.0, 3.0, 4.0, 5.0]
+    >>> irfft(a)
+    array([ 2.6       , -3.16405192,  1.24398433, -1.14955713,  1.46962473])
+    >>> irfft(rfft(a))
+    array([1., 2., 3., 4., 5.])
+
+    """
+    return _pocketfft.irfft_fftpack(x, n, axis, None, overwrite_x)
+
+
+def fftn(x, shape=None, axes=None, overwrite_x=False):
+    """
+    Return multidimensional discrete Fourier transform.
+
+    The returned array contains::
+
+      y[j_1,..,j_d] = sum[k_1=0..n_1-1, ..., k_d=0..n_d-1]
+         x[k_1,..,k_d] * prod[i=1..d] exp(-sqrt(-1)*2*pi/n_i * j_i * k_i)
+
+    where d = len(x.shape) and n = x.shape.
+
+    Parameters
+    ----------
+    x : array_like
+        The (N-D) array to transform.
+    shape : int or array_like of ints or None, optional
+        The shape of the result. If both `shape` and `axes` (see below) are
+        None, `shape` is ``x.shape``; if `shape` is None but `axes` is
+        not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
+        If ``shape[i] > x.shape[i]``, the ith dimension is padded with zeros.
+        If ``shape[i] < x.shape[i]``, the ith dimension is truncated to
+        length ``shape[i]``.
+        If any element of `shape` is -1, the size of the corresponding
+        dimension of `x` is used.
+    axes : int or array_like of ints or None, optional
+        The axes of `x` (`y` if `shape` is not None) along which the
+        transform is applied.
+        The default is over all axes.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed. Default is False.
+
+    Returns
+    -------
+    y : complex-valued N-D NumPy array
+        The (N-D) DFT of the input array.
+
+    See Also
+    --------
+    ifftn
+
+    Notes
+    -----
+    If ``x`` is real-valued, then
+    ``y[..., j_i, ...] == y[..., n_i-j_i, ...].conjugate()``.
+
+    Both single and double precision routines are implemented. Half precision
+    inputs will be converted to single precision. Non-floating-point inputs
+    will be converted to double precision. Long-double precision inputs are
+    not supported.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import fftn, ifftn
+    >>> y = (-np.arange(16), 8 - np.arange(16), np.arange(16))
+    >>> np.allclose(y, fftn(ifftn(y)))
+    True
+
+    """
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.fftn(x, shape, axes, None, overwrite_x)
+
+
+def ifftn(x, shape=None, axes=None, overwrite_x=False):
+    """
+    Return inverse multidimensional discrete Fourier transform.
+
+    The sequence can be of an arbitrary type.
+
+    The returned array contains::
+
+      y[j_1,..,j_d] = 1/p * sum[k_1=0..n_1-1, ..., k_d=0..n_d-1]
+         x[k_1,..,k_d] * prod[i=1..d] exp(sqrt(-1)*2*pi/n_i * j_i * k_i)
+
+    where ``d = len(x.shape)``, ``n = x.shape``, and ``p = prod[i=1..d] n_i``.
+
+    For description of parameters see `fftn`.
+
+    See Also
+    --------
+    fftn : for detailed information.
+
+    Examples
+    --------
+    >>> from scipy.fftpack import fftn, ifftn
+    >>> import numpy as np
+    >>> y = (-np.arange(16), 8 - np.arange(16), np.arange(16))
+    >>> np.allclose(y, ifftn(fftn(y)))
+    True
+
+    """
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.ifftn(x, shape, axes, None, overwrite_x)
+
+
+def fft2(x, shape=None, axes=(-2,-1), overwrite_x=False):
+    """
+    2-D discrete Fourier transform.
+
+    Return the 2-D discrete Fourier transform of the 2-D argument
+    `x`.
+
+    See Also
+    --------
+    fftn : for detailed information.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import fft2, ifft2
+    >>> y = np.mgrid[:5, :5][0]
+    >>> y
+    array([[0, 0, 0, 0, 0],
+           [1, 1, 1, 1, 1],
+           [2, 2, 2, 2, 2],
+           [3, 3, 3, 3, 3],
+           [4, 4, 4, 4, 4]])
+    >>> np.allclose(y, ifft2(fft2(y)))
+    True
+    """
+    return fftn(x,shape,axes,overwrite_x)
+
+
+def ifft2(x, shape=None, axes=(-2,-1), overwrite_x=False):
+    """
+    2-D discrete inverse Fourier transform of real or complex sequence.
+
+    Return inverse 2-D discrete Fourier transform of
+    arbitrary type sequence x.
+
+    See `ifft` for more information.
+
+    See Also
+    --------
+    fft2, ifft
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import fft2, ifft2
+    >>> y = np.mgrid[:5, :5][0]
+    >>> y
+    array([[0, 0, 0, 0, 0],
+           [1, 1, 1, 1, 1],
+           [2, 2, 2, 2, 2],
+           [3, 3, 3, 3, 3],
+           [4, 4, 4, 4, 4]])
+    >>> np.allclose(y, fft2(ifft2(y)))
+    True
+
+    """
+    return ifftn(x,shape,axes,overwrite_x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_helper.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_helper.py
new file mode 100644
index 0000000000000000000000000000000000000000..7892543732906dcd86b4c1aa9c1f249af701c137
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_helper.py
@@ -0,0 +1,115 @@
+import operator
+
+import numpy as np
+from numpy.fft import fftshift, ifftshift, fftfreq
+
+import scipy.fft._pocketfft.helper as _helper
+
+__all__ = ['fftshift', 'ifftshift', 'fftfreq', 'rfftfreq', 'next_fast_len']
+
+
+def rfftfreq(n, d=1.0):
+    """DFT sample frequencies (for usage with rfft, irfft).
+
+    The returned float array contains the frequency bins in
+    cycles/unit (with zero at the start) given a window length `n` and a
+    sample spacing `d`::
+
+      f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2]/(d*n)   if n is even
+      f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2,n/2]/(d*n)   if n is odd
+
+    Parameters
+    ----------
+    n : int
+        Window length.
+    d : scalar, optional
+        Sample spacing. Default is 1.
+
+    Returns
+    -------
+    out : ndarray
+        The array of length `n`, containing the sample frequencies.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import fftpack
+    >>> sig = np.array([-2, 8, 6, 4, 1, 0, 3, 5], dtype=float)
+    >>> sig_fft = fftpack.rfft(sig)
+    >>> n = sig_fft.size
+    >>> timestep = 0.1
+    >>> freq = fftpack.rfftfreq(n, d=timestep)
+    >>> freq
+    array([ 0.  ,  1.25,  1.25,  2.5 ,  2.5 ,  3.75,  3.75,  5.  ])
+
+    """
+    n = operator.index(n)
+    if n < 0:
+        raise ValueError(f"n = {n} is not valid. "
+                         "n must be a nonnegative integer.")
+
+    return (np.arange(1, n + 1, dtype=int) // 2) / float(n * d)
+
+
+def next_fast_len(target):
+    """
+    Find the next fast size of input data to `fft`, for zero-padding, etc.
+
+    SciPy's FFTPACK has efficient functions for radix {2, 3, 4, 5}, so this
+    returns the next composite of the prime factors 2, 3, and 5 which is
+    greater than or equal to `target`. (These are also known as 5-smooth
+    numbers, regular numbers, or Hamming numbers.)
+
+    Parameters
+    ----------
+    target : int
+        Length to start searching from. Must be a positive integer.
+
+    Returns
+    -------
+    out : int
+        The first 5-smooth number greater than or equal to `target`.
+
+    Notes
+    -----
+    .. versionadded:: 0.18.0
+
+    Examples
+    --------
+    On a particular machine, an FFT of prime length takes 133 ms:
+
+    >>> from scipy import fftpack
+    >>> import numpy as np
+    >>> rng = np.random.default_rng()
+    >>> min_len = 10007  # prime length is worst case for speed
+    >>> a = rng.standard_normal(min_len)
+    >>> b = fftpack.fft(a)
+
+    Zero-padding to the next 5-smooth length reduces computation time to
+    211 us, a speedup of 630 times:
+
+    >>> fftpack.next_fast_len(min_len)
+    10125
+    >>> b = fftpack.fft(a, 10125)
+
+    Rounding up to the next power of 2 is not optimal, taking 367 us to
+    compute, 1.7 times as long as the 5-smooth size:
+
+    >>> b = fftpack.fft(a, 16384)
+
+    """
+    # Real transforms use regular sizes so this is backwards compatible
+    return _helper.good_size(target, True)
+
+
+def _good_shape(x, shape, axes):
+    """Ensure that shape argument is valid for scipy.fftpack
+
+    scipy.fftpack does not support len(shape) < x.ndim when axes is not given.
+    """
+    if shape is not None and axes is None:
+        shape = _helper._iterable_of_int(shape, 'shape')
+        if len(shape) != np.ndim(x):
+            raise ValueError("when given, axes and shape arguments"
+                             " have to be of the same length")
+    return shape
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_pseudo_diffs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_pseudo_diffs.py
new file mode 100644
index 0000000000000000000000000000000000000000..6dbcc8d3979b35c1497266fea34cf565cd3d11d7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_pseudo_diffs.py
@@ -0,0 +1,554 @@
+"""
+Differential and pseudo-differential operators.
+"""
+# Created by Pearu Peterson, September 2002
+
+__all__ = ['diff',
+           'tilbert','itilbert','hilbert','ihilbert',
+           'cs_diff','cc_diff','sc_diff','ss_diff',
+           'shift']
+
+import threading
+
+from numpy import pi, asarray, sin, cos, sinh, cosh, tanh, iscomplexobj
+from . import convolve
+
+from scipy.fft._pocketfft.helper import _datacopied
+
+
+_cache = threading.local()
+
+
+def diff(x,order=1,period=None, _cache=_cache):
+    """
+    Return kth derivative (or integral) of a periodic sequence x.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j
+      y_0 = 0 if order is not 0.
+
+    Parameters
+    ----------
+    x : array_like
+        Input array.
+    order : int, optional
+        The order of differentiation. Default order is 1. If order is
+        negative, then integration is carried out under the assumption
+        that ``x_0 == 0``.
+    period : float, optional
+        The assumed period of the sequence. Default is ``2*pi``.
+
+    Notes
+    -----
+    If ``sum(x, axis=0) = 0`` then ``diff(diff(x, k), -k) == x`` (within
+    numerical accuracy).
+
+    For odd order and even ``len(x)``, the Nyquist mode is taken zero.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'diff_cache'):
+            _cache.diff_cache = {}
+        _cache = _cache.diff_cache
+
+    tmp = asarray(x)
+    if order == 0:
+        return tmp
+    if iscomplexobj(tmp):
+        return diff(tmp.real, order, period, _cache)+1j*diff(
+            tmp.imag, order, period, _cache)
+    if period is not None:
+        c = 2*pi/period
+    else:
+        c = 1.0
+    n = len(x)
+    omega = _cache.get((n,order,c))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,order=order,c=c):
+            if k:
+                return pow(c*k,order)
+            return 0
+        omega = convolve.init_convolution_kernel(n,kernel,d=order,
+                                                 zero_nyquist=1)
+        _cache[(n,order,c)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=order % 2,
+                             overwrite_x=overwrite_x)
+
+
+def tilbert(x, h, period=None, _cache=_cache):
+    """
+    Return h-Tilbert transform of a periodic sequence x.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+        y_j = sqrt(-1)*coth(j*h*2*pi/period) * x_j
+        y_0 = 0
+
+    Parameters
+    ----------
+    x : array_like
+        The input array to transform.
+    h : float
+        Defines the parameter of the Tilbert transform.
+    period : float, optional
+        The assumed period of the sequence. Default period is ``2*pi``.
+
+    Returns
+    -------
+    tilbert : ndarray
+        The result of the transform.
+
+    Notes
+    -----
+    If ``sum(x, axis=0) == 0`` and ``n = len(x)`` is odd, then
+    ``tilbert(itilbert(x)) == x``.
+
+    If ``2 * pi * h / period`` is approximately 10 or larger, then
+    numerically ``tilbert == hilbert``
+    (theoretically oo-Tilbert == Hilbert).
+
+    For even ``len(x)``, the Nyquist mode of ``x`` is taken zero.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'tilbert_cache'):
+            _cache.tilbert_cache = {}
+        _cache = _cache.tilbert_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return tilbert(tmp.real, h, period, _cache) + \
+               1j * tilbert(tmp.imag, h, period, _cache)
+
+    if period is not None:
+        h = h * 2 * pi / period
+
+    n = len(x)
+    omega = _cache.get((n, h))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k, h=h):
+            if k:
+                return 1.0/tanh(h*k)
+
+            return 0
+
+        omega = convolve.init_convolution_kernel(n, kernel, d=1)
+        _cache[(n,h)] = omega
+
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=1,overwrite_x=overwrite_x)
+
+
+def itilbert(x,h,period=None, _cache=_cache):
+    """
+    Return inverse h-Tilbert transform of a periodic sequence x.
+
+    If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = -sqrt(-1)*tanh(j*h*2*pi/period) * x_j
+      y_0 = 0
+
+    For more details, see `tilbert`.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'itilbert_cache'):
+            _cache.itilbert_cache = {}
+        _cache = _cache.itilbert_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return itilbert(tmp.real, h, period, _cache) + \
+               1j*itilbert(tmp.imag, h, period, _cache)
+    if period is not None:
+        h = h*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,h))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,h=h):
+            if k:
+                return -tanh(h*k)
+            return 0
+        omega = convolve.init_convolution_kernel(n,kernel,d=1)
+        _cache[(n,h)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=1,overwrite_x=overwrite_x)
+
+
+def hilbert(x, _cache=_cache):
+    """
+    Return Hilbert transform of a periodic sequence x.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = sqrt(-1)*sign(j) * x_j
+      y_0 = 0
+
+    Parameters
+    ----------
+    x : array_like
+        The input array, should be periodic.
+    _cache : dict, optional
+        Dictionary that contains the kernel used to do a convolution with.
+
+    Returns
+    -------
+    y : ndarray
+        The transformed input.
+
+    See Also
+    --------
+    scipy.signal.hilbert : Compute the analytic signal, using the Hilbert
+                           transform.
+
+    Notes
+    -----
+    If ``sum(x, axis=0) == 0`` then ``hilbert(ihilbert(x)) == x``.
+
+    For even len(x), the Nyquist mode of x is taken zero.
+
+    The sign of the returned transform does not have a factor -1 that is more
+    often than not found in the definition of the Hilbert transform. Note also
+    that `scipy.signal.hilbert` does have an extra -1 factor compared to this
+    function.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'hilbert_cache'):
+            _cache.hilbert_cache = {}
+        _cache = _cache.hilbert_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return hilbert(tmp.real, _cache) + 1j * hilbert(tmp.imag, _cache)
+    n = len(x)
+    omega = _cache.get(n)
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k):
+            if k > 0:
+                return 1.0
+            elif k < 0:
+                return -1.0
+            return 0.0
+        omega = convolve.init_convolution_kernel(n,kernel,d=1)
+        _cache[n] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=1,overwrite_x=overwrite_x)
+
+
+def ihilbert(x, _cache=_cache):
+    """
+    Return inverse Hilbert transform of a periodic sequence x.
+
+    If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = -sqrt(-1)*sign(j) * x_j
+      y_0 = 0
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'ihilbert_cache'):
+            _cache.ihilbert_cache = {}
+        _cache = _cache.ihilbert_cache
+    return -hilbert(x, _cache)
+
+
+def cs_diff(x, a, b, period=None, _cache=_cache):
+    """
+    Return (a,b)-cosh/sinh pseudo-derivative of a periodic sequence.
+
+    If ``x_j`` and ``y_j`` are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = -sqrt(-1)*cosh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
+      y_0 = 0
+
+    Parameters
+    ----------
+    x : array_like
+        The array to take the pseudo-derivative from.
+    a, b : float
+        Defines the parameters of the cosh/sinh pseudo-differential
+        operator.
+    period : float, optional
+        The period of the sequence. Default period is ``2*pi``.
+
+    Returns
+    -------
+    cs_diff : ndarray
+        Pseudo-derivative of periodic sequence `x`.
+
+    Notes
+    -----
+    For even len(`x`), the Nyquist mode of `x` is taken as zero.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'cs_diff_cache'):
+            _cache.cs_diff_cache = {}
+        _cache = _cache.cs_diff_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return cs_diff(tmp.real, a, b, period, _cache) + \
+               1j*cs_diff(tmp.imag, a, b, period, _cache)
+    if period is not None:
+        a = a*2*pi/period
+        b = b*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,a,b))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,a=a,b=b):
+            if k:
+                return -cosh(a*k)/sinh(b*k)
+            return 0
+        omega = convolve.init_convolution_kernel(n,kernel,d=1)
+        _cache[(n,a,b)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=1,overwrite_x=overwrite_x)
+
+
+def sc_diff(x, a, b, period=None, _cache=_cache):
+    """
+    Return (a,b)-sinh/cosh pseudo-derivative of a periodic sequence x.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = sqrt(-1)*sinh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j
+      y_0 = 0
+
+    Parameters
+    ----------
+    x : array_like
+        Input array.
+    a,b : float
+        Defines the parameters of the sinh/cosh pseudo-differential
+        operator.
+    period : float, optional
+        The period of the sequence x. Default is 2*pi.
+
+    Notes
+    -----
+    ``sc_diff(cs_diff(x,a,b),b,a) == x``
+    For even ``len(x)``, the Nyquist mode of x is taken as zero.
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'sc_diff_cache'):
+            _cache.sc_diff_cache = {}
+        _cache = _cache.sc_diff_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return sc_diff(tmp.real, a, b, period, _cache) + \
+               1j * sc_diff(tmp.imag, a, b, period, _cache)
+    if period is not None:
+        a = a*2*pi/period
+        b = b*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,a,b))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,a=a,b=b):
+            if k:
+                return sinh(a*k)/cosh(b*k)
+            return 0
+        omega = convolve.init_convolution_kernel(n,kernel,d=1)
+        _cache[(n,a,b)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,swap_real_imag=1,overwrite_x=overwrite_x)
+
+
+def ss_diff(x, a, b, period=None, _cache=_cache):
+    """
+    Return (a,b)-sinh/sinh pseudo-derivative of a periodic sequence x.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = sinh(j*a*2*pi/period)/sinh(j*b*2*pi/period) * x_j
+      y_0 = a/b * x_0
+
+    Parameters
+    ----------
+    x : array_like
+        The array to take the pseudo-derivative from.
+    a,b
+        Defines the parameters of the sinh/sinh pseudo-differential
+        operator.
+    period : float, optional
+        The period of the sequence x. Default is ``2*pi``.
+
+    Notes
+    -----
+    ``ss_diff(ss_diff(x,a,b),b,a) == x``
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'ss_diff_cache'):
+            _cache.ss_diff_cache = {}
+        _cache = _cache.ss_diff_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return ss_diff(tmp.real, a, b, period, _cache) + \
+               1j*ss_diff(tmp.imag, a, b, period, _cache)
+    if period is not None:
+        a = a*2*pi/period
+        b = b*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,a,b))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,a=a,b=b):
+            if k:
+                return sinh(a*k)/sinh(b*k)
+            return float(a)/b
+        omega = convolve.init_convolution_kernel(n,kernel)
+        _cache[(n,a,b)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,overwrite_x=overwrite_x)
+
+
+def cc_diff(x, a, b, period=None, _cache=_cache):
+    """
+    Return (a,b)-cosh/cosh pseudo-derivative of a periodic sequence.
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+      y_j = cosh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j
+
+    Parameters
+    ----------
+    x : array_like
+        The array to take the pseudo-derivative from.
+    a,b : float
+        Defines the parameters of the sinh/sinh pseudo-differential
+        operator.
+    period : float, optional
+        The period of the sequence x. Default is ``2*pi``.
+
+    Returns
+    -------
+    cc_diff : ndarray
+        Pseudo-derivative of periodic sequence `x`.
+
+    Notes
+    -----
+    ``cc_diff(cc_diff(x,a,b),b,a) == x``
+
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'cc_diff_cache'):
+            _cache.cc_diff_cache = {}
+        _cache = _cache.cc_diff_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return cc_diff(tmp.real, a, b, period, _cache) + \
+               1j * cc_diff(tmp.imag, a, b, period, _cache)
+    if period is not None:
+        a = a*2*pi/period
+        b = b*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,a,b))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel(k,a=a,b=b):
+            return cosh(a*k)/cosh(b*k)
+        omega = convolve.init_convolution_kernel(n,kernel)
+        _cache[(n,a,b)] = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve(tmp,omega,overwrite_x=overwrite_x)
+
+
+def shift(x, a, period=None, _cache=_cache):
+    """
+    Shift periodic sequence x by a: y(u) = x(u+a).
+
+    If x_j and y_j are Fourier coefficients of periodic functions x
+    and y, respectively, then::
+
+          y_j = exp(j*a*2*pi/period*sqrt(-1)) * x_f
+
+    Parameters
+    ----------
+    x : array_like
+        The array to take the pseudo-derivative from.
+    a : float
+        Defines the parameters of the sinh/sinh pseudo-differential
+    period : float, optional
+        The period of the sequences x and y. Default period is ``2*pi``.
+    """
+    if isinstance(_cache, threading.local):
+        if not hasattr(_cache, 'shift_cache'):
+            _cache.shift_cache = {}
+        _cache = _cache.shift_cache
+
+    tmp = asarray(x)
+    if iscomplexobj(tmp):
+        return shift(tmp.real, a, period, _cache) + 1j * shift(
+            tmp.imag, a, period, _cache)
+    if period is not None:
+        a = a*2*pi/period
+    n = len(x)
+    omega = _cache.get((n,a))
+    if omega is None:
+        if len(_cache) > 20:
+            while _cache:
+                _cache.popitem()
+
+        def kernel_real(k,a=a):
+            return cos(a*k)
+
+        def kernel_imag(k,a=a):
+            return sin(a*k)
+        omega_real = convolve.init_convolution_kernel(n,kernel_real,d=0,
+                                                      zero_nyquist=0)
+        omega_imag = convolve.init_convolution_kernel(n,kernel_imag,d=1,
+                                                      zero_nyquist=0)
+        _cache[(n,a)] = omega_real,omega_imag
+    else:
+        omega_real,omega_imag = omega
+    overwrite_x = _datacopied(tmp, x)
+    return convolve.convolve_z(tmp,omega_real,omega_imag,
+                               overwrite_x=overwrite_x)
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_realtransforms.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_realtransforms.py
new file mode 100644
index 0000000000000000000000000000000000000000..ad71d517b0ac829ab71850bf67f7dc38636161f2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/_realtransforms.py
@@ -0,0 +1,598 @@
+"""
+Real spectrum transforms (DCT, DST, MDCT)
+"""
+
+__all__ = ['dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn']
+
+from scipy.fft import _pocketfft
+from ._helper import _good_shape
+
+_inverse_typemap = {1: 1, 2: 3, 3: 2, 4: 4}
+
+
+def dctn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):
+    """
+    Return multidimensional Discrete Cosine Transform along the specified axes.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DCT (see Notes). Default type is 2.
+    shape : int or array_like of ints or None, optional
+        The shape of the result. If both `shape` and `axes` (see below) are
+        None, `shape` is ``x.shape``; if `shape` is None but `axes` is
+        not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
+        If ``shape[i] > x.shape[i]``, the ith dimension is padded with zeros.
+        If ``shape[i] < x.shape[i]``, the ith dimension is truncated to
+        length ``shape[i]``.
+        If any element of `shape` is -1, the size of the corresponding
+        dimension of `x` is used.
+    axes : int or array_like of ints or None, optional
+        Axes along which the DCT is computed.
+        The default is over all axes.
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    y : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    idctn : Inverse multidimensional DCT
+
+    Notes
+    -----
+    For full details of the DCT types and normalization modes, as well as
+    references, see `dct`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import dctn, idctn
+    >>> rng = np.random.default_rng()
+    >>> y = rng.standard_normal((16, 16))
+    >>> np.allclose(y, idctn(dctn(y, norm='ortho'), norm='ortho'))
+    True
+
+    """
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.dctn(x, type, shape, axes, norm, overwrite_x)
+
+
+def idctn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):
+    """
+    Return multidimensional Discrete Cosine Transform along the specified axes.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DCT (see Notes). Default type is 2.
+    shape : int or array_like of ints or None, optional
+        The shape of the result.  If both `shape` and `axes` (see below) are
+        None, `shape` is ``x.shape``; if `shape` is None but `axes` is
+        not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
+        If ``shape[i] > x.shape[i]``, the ith dimension is padded with zeros.
+        If ``shape[i] < x.shape[i]``, the ith dimension is truncated to
+        length ``shape[i]``.
+        If any element of `shape` is -1, the size of the corresponding
+        dimension of `x` is used.
+    axes : int or array_like of ints or None, optional
+        Axes along which the IDCT is computed.
+        The default is over all axes.
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    y : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    dctn : multidimensional DCT
+
+    Notes
+    -----
+    For full details of the IDCT types and normalization modes, as well as
+    references, see `idct`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import dctn, idctn
+    >>> rng = np.random.default_rng()
+    >>> y = rng.standard_normal((16, 16))
+    >>> np.allclose(y, idctn(dctn(y, norm='ortho'), norm='ortho'))
+    True
+
+    """
+    type = _inverse_typemap[type]
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.dctn(x, type, shape, axes, norm, overwrite_x)
+
+
+def dstn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):
+    """
+    Return multidimensional Discrete Sine Transform along the specified axes.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DST (see Notes). Default type is 2.
+    shape : int or array_like of ints or None, optional
+        The shape of the result.  If both `shape` and `axes` (see below) are
+        None, `shape` is ``x.shape``; if `shape` is None but `axes` is
+        not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
+        If ``shape[i] > x.shape[i]``, the ith dimension is padded with zeros.
+        If ``shape[i] < x.shape[i]``, the ith dimension is truncated to
+        length ``shape[i]``.
+        If any element of `shape` is -1, the size of the corresponding
+        dimension of `x` is used.
+    axes : int or array_like of ints or None, optional
+        Axes along which the DCT is computed.
+        The default is over all axes.
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    y : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    idstn : Inverse multidimensional DST
+
+    Notes
+    -----
+    For full details of the DST types and normalization modes, as well as
+    references, see `dst`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import dstn, idstn
+    >>> rng = np.random.default_rng()
+    >>> y = rng.standard_normal((16, 16))
+    >>> np.allclose(y, idstn(dstn(y, norm='ortho'), norm='ortho'))
+    True
+
+    """
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.dstn(x, type, shape, axes, norm, overwrite_x)
+
+
+def idstn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):
+    """
+    Return multidimensional Discrete Sine Transform along the specified axes.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DST (see Notes). Default type is 2.
+    shape : int or array_like of ints or None, optional
+        The shape of the result.  If both `shape` and `axes` (see below) are
+        None, `shape` is ``x.shape``; if `shape` is None but `axes` is
+        not None, then `shape` is ``numpy.take(x.shape, axes, axis=0)``.
+        If ``shape[i] > x.shape[i]``, the ith dimension is padded with zeros.
+        If ``shape[i] < x.shape[i]``, the ith dimension is truncated to
+        length ``shape[i]``.
+        If any element of `shape` is -1, the size of the corresponding
+        dimension of `x` is used.
+    axes : int or array_like of ints or None, optional
+        Axes along which the IDST is computed.
+        The default is over all axes.
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    y : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    dstn : multidimensional DST
+
+    Notes
+    -----
+    For full details of the IDST types and normalization modes, as well as
+    references, see `idst`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.fftpack import dstn, idstn
+    >>> rng = np.random.default_rng()
+    >>> y = rng.standard_normal((16, 16))
+    >>> np.allclose(y, idstn(dstn(y, norm='ortho'), norm='ortho'))
+    True
+
+    """
+    type = _inverse_typemap[type]
+    shape = _good_shape(x, shape, axes)
+    return _pocketfft.dstn(x, type, shape, axes, norm, overwrite_x)
+
+
+def dct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False):
+    r"""
+    Return the Discrete Cosine Transform of arbitrary type sequence x.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DCT (see Notes). Default type is 2.
+    n : int, optional
+        Length of the transform.  If ``n < x.shape[axis]``, `x` is
+        truncated.  If ``n > x.shape[axis]``, `x` is zero-padded. The
+        default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the dct is computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    y : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    idct : Inverse DCT
+
+    Notes
+    -----
+    For a single dimension array ``x``, ``dct(x, norm='ortho')`` is equal to
+    MATLAB ``dct(x)``.
+
+    There are, theoretically, 8 types of the DCT, only the first 4 types are
+    implemented in scipy. 'The' DCT generally refers to DCT type 2, and 'the'
+    Inverse DCT generally refers to DCT type 3.
+
+    **Type I**
+
+    There are several definitions of the DCT-I; we use the following
+    (for ``norm=None``)
+
+    .. math::
+
+       y_k = x_0 + (-1)^k x_{N-1} + 2 \sum_{n=1}^{N-2} x_n \cos\left(
+       \frac{\pi k n}{N-1} \right)
+
+    If ``norm='ortho'``, ``x[0]`` and ``x[N-1]`` are multiplied by a scaling
+    factor of :math:`\sqrt{2}`, and ``y[k]`` is multiplied by a scaling factor
+    ``f``
+
+    .. math::
+
+        f = \begin{cases}
+         \frac{1}{2}\sqrt{\frac{1}{N-1}} & \text{if }k=0\text{ or }N-1, \\
+         \frac{1}{2}\sqrt{\frac{2}{N-1}} & \text{otherwise} \end{cases}
+
+    .. versionadded:: 1.2.0
+       Orthonormalization in DCT-I.
+
+    .. note::
+       The DCT-I is only supported for input size > 1.
+
+    **Type II**
+
+    There are several definitions of the DCT-II; we use the following
+    (for ``norm=None``)
+
+    .. math::
+
+       y_k = 2 \sum_{n=0}^{N-1} x_n \cos\left(\frac{\pi k(2n+1)}{2N} \right)
+
+    If ``norm='ortho'``, ``y[k]`` is multiplied by a scaling factor ``f``
+
+    .. math::
+       f = \begin{cases}
+       \sqrt{\frac{1}{4N}} & \text{if }k=0, \\
+       \sqrt{\frac{1}{2N}} & \text{otherwise} \end{cases}
+
+    which makes the corresponding matrix of coefficients orthonormal
+    (``O @ O.T = np.eye(N)``).
+
+    **Type III**
+
+    There are several definitions, we use the following (for ``norm=None``)
+
+    .. math::
+
+       y_k = x_0 + 2 \sum_{n=1}^{N-1} x_n \cos\left(\frac{\pi(2k+1)n}{2N}\right)
+
+    or, for ``norm='ortho'``
+
+    .. math::
+
+       y_k = \frac{x_0}{\sqrt{N}} + \sqrt{\frac{2}{N}} \sum_{n=1}^{N-1} x_n
+       \cos\left(\frac{\pi(2k+1)n}{2N}\right)
+
+    The (unnormalized) DCT-III is the inverse of the (unnormalized) DCT-II, up
+    to a factor ``2N``. The orthonormalized DCT-III is exactly the inverse of
+    the orthonormalized DCT-II.
+
+    **Type IV**
+
+    There are several definitions of the DCT-IV; we use the following
+    (for ``norm=None``)
+
+    .. math::
+
+       y_k = 2 \sum_{n=0}^{N-1} x_n \cos\left(\frac{\pi(2k+1)(2n+1)}{4N} \right)
+
+    If ``norm='ortho'``, ``y[k]`` is multiplied by a scaling factor ``f``
+
+    .. math::
+
+        f = \frac{1}{\sqrt{2N}}
+
+    .. versionadded:: 1.2.0
+       Support for DCT-IV.
+
+    References
+    ----------
+    .. [1] 'A Fast Cosine Transform in One and Two Dimensions', by J.
+           Makhoul, `IEEE Transactions on acoustics, speech and signal
+           processing` vol. 28(1), pp. 27-34,
+           :doi:`10.1109/TASSP.1980.1163351` (1980).
+    .. [2] Wikipedia, "Discrete cosine transform",
+           https://en.wikipedia.org/wiki/Discrete_cosine_transform
+
+    Examples
+    --------
+    The Type 1 DCT is equivalent to the FFT (though faster) for real,
+    even-symmetrical inputs. The output is also real and even-symmetrical.
+    Half of the FFT input is used to generate half of the FFT output:
+
+    >>> from scipy.fftpack import fft, dct
+    >>> import numpy as np
+    >>> fft(np.array([4., 3., 5., 10., 5., 3.])).real
+    array([ 30.,  -8.,   6.,  -2.,   6.,  -8.])
+    >>> dct(np.array([4., 3., 5., 10.]), 1)
+    array([ 30.,  -8.,   6.,  -2.])
+
+    """
+    return _pocketfft.dct(x, type, n, axis, norm, overwrite_x)
+
+
+def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False):
+    """
+    Return the Inverse Discrete Cosine Transform of an arbitrary type sequence.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DCT (see Notes). Default type is 2.
+    n : int, optional
+        Length of the transform.  If ``n < x.shape[axis]``, `x` is
+        truncated.  If ``n > x.shape[axis]``, `x` is zero-padded. The
+        default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the idct is computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    idct : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    dct : Forward DCT
+
+    Notes
+    -----
+    For a single dimension array `x`, ``idct(x, norm='ortho')`` is equal to
+    MATLAB ``idct(x)``.
+
+    'The' IDCT is the IDCT of type 2, which is the same as DCT of type 3.
+
+    IDCT of type 1 is the DCT of type 1, IDCT of type 2 is the DCT of type
+    3, and IDCT of type 3 is the DCT of type 2. IDCT of type 4 is the DCT
+    of type 4. For the definition of these types, see `dct`.
+
+    Examples
+    --------
+    The Type 1 DCT is equivalent to the DFT for real, even-symmetrical
+    inputs. The output is also real and even-symmetrical. Half of the IFFT
+    input is used to generate half of the IFFT output:
+
+    >>> from scipy.fftpack import ifft, idct
+    >>> import numpy as np
+    >>> ifft(np.array([ 30.,  -8.,   6.,  -2.,   6.,  -8.])).real
+    array([  4.,   3.,   5.,  10.,   5.,   3.])
+    >>> idct(np.array([ 30.,  -8.,   6.,  -2.]), 1) / 6
+    array([  4.,   3.,   5.,  10.])
+
+    """
+    type = _inverse_typemap[type]
+    return _pocketfft.dct(x, type, n, axis, norm, overwrite_x)
+
+
+def dst(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False):
+    r"""
+    Return the Discrete Sine Transform of arbitrary type sequence x.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DST (see Notes). Default type is 2.
+    n : int, optional
+        Length of the transform.  If ``n < x.shape[axis]``, `x` is
+        truncated.  If ``n > x.shape[axis]``, `x` is zero-padded. The
+        default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the dst is computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    dst : ndarray of reals
+        The transformed input array.
+
+    See Also
+    --------
+    idst : Inverse DST
+
+    Notes
+    -----
+    For a single dimension array ``x``.
+
+    There are, theoretically, 8 types of the DST for different combinations of
+    even/odd boundary conditions and boundary off sets [1]_, only the first
+    4 types are implemented in scipy.
+
+    **Type I**
+
+    There are several definitions of the DST-I; we use the following
+    for ``norm=None``. DST-I assumes the input is odd around `n=-1` and `n=N`.
+
+    .. math::
+
+        y_k = 2 \sum_{n=0}^{N-1} x_n \sin\left(\frac{\pi(k+1)(n+1)}{N+1}\right)
+
+    Note that the DST-I is only supported for input size > 1.
+    The (unnormalized) DST-I is its own inverse, up to a factor ``2(N+1)``.
+    The orthonormalized DST-I is exactly its own inverse.
+
+    **Type II**
+
+    There are several definitions of the DST-II; we use the following for
+    ``norm=None``. DST-II assumes the input is odd around `n=-1/2` and
+    `n=N-1/2`; the output is odd around :math:`k=-1` and even around `k=N-1`
+
+    .. math::
+
+        y_k = 2 \sum_{n=0}^{N-1} x_n \sin\left(\frac{\pi(k+1)(2n+1)}{2N}\right)
+
+    if ``norm='ortho'``, ``y[k]`` is multiplied by a scaling factor ``f``
+
+    .. math::
+
+        f = \begin{cases}
+        \sqrt{\frac{1}{4N}} & \text{if }k = 0, \\
+        \sqrt{\frac{1}{2N}} & \text{otherwise} \end{cases}
+
+    **Type III**
+
+    There are several definitions of the DST-III, we use the following (for
+    ``norm=None``). DST-III assumes the input is odd around `n=-1` and even
+    around `n=N-1`
+
+    .. math::
+
+        y_k = (-1)^k x_{N-1} + 2 \sum_{n=0}^{N-2} x_n \sin\left(
+        \frac{\pi(2k+1)(n+1)}{2N}\right)
+
+    The (unnormalized) DST-III is the inverse of the (unnormalized) DST-II, up
+    to a factor ``2N``. The orthonormalized DST-III is exactly the inverse of the
+    orthonormalized DST-II.
+
+    .. versionadded:: 0.11.0
+
+    **Type IV**
+
+    There are several definitions of the DST-IV, we use the following (for
+    ``norm=None``). DST-IV assumes the input is odd around `n=-0.5` and even
+    around `n=N-0.5`
+
+    .. math::
+
+        y_k = 2 \sum_{n=0}^{N-1} x_n \sin\left(\frac{\pi(2k+1)(2n+1)}{4N}\right)
+
+    The (unnormalized) DST-IV is its own inverse, up to a factor ``2N``. The
+    orthonormalized DST-IV is exactly its own inverse.
+
+    .. versionadded:: 1.2.0
+       Support for DST-IV.
+
+    References
+    ----------
+    .. [1] Wikipedia, "Discrete sine transform",
+           https://en.wikipedia.org/wiki/Discrete_sine_transform
+
+    """
+    return _pocketfft.dst(x, type, n, axis, norm, overwrite_x)
+
+
+def idst(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False):
+    """
+    Return the Inverse Discrete Sine Transform of an arbitrary type sequence.
+
+    Parameters
+    ----------
+    x : array_like
+        The input array.
+    type : {1, 2, 3, 4}, optional
+        Type of the DST (see Notes). Default type is 2.
+    n : int, optional
+        Length of the transform.  If ``n < x.shape[axis]``, `x` is
+        truncated. If ``n > x.shape[axis]``, `x` is zero-padded. The
+        default results in ``n = x.shape[axis]``.
+    axis : int, optional
+        Axis along which the idst is computed; the default is over the
+        last axis (i.e., ``axis=-1``).
+    norm : {None, 'ortho'}, optional
+        Normalization mode (see Notes). Default is None.
+    overwrite_x : bool, optional
+        If True, the contents of `x` can be destroyed; the default is False.
+
+    Returns
+    -------
+    idst : ndarray of real
+        The transformed input array.
+
+    See Also
+    --------
+    dst : Forward DST
+
+    Notes
+    -----
+    'The' IDST is the IDST of type 2, which is the same as DST of type 3.
+
+    IDST of type 1 is the DST of type 1, IDST of type 2 is the DST of type
+    3, and IDST of type 3 is the DST of type 2. For the definition of these
+    types, see `dst`.
+
+    .. versionadded:: 0.11.0
+
+    """
+    type = _inverse_typemap[type]
+    return _pocketfft.dst(x, type, n, axis, norm, overwrite_x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..553f456fe1561c28928ecc4ebe2238459cc60443
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/basic.py
@@ -0,0 +1,20 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.fftpack` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'fft','ifft','fftn','ifftn','rfft','irfft',
+    'fft2','ifft2'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="fftpack", module="basic",
+                                   private_modules=["_basic"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/helper.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/helper.py
new file mode 100644
index 0000000000000000000000000000000000000000..fcc7000c215f8a7605a2a59b5767b27b2fcd969d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/helper.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.fftpack` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'fftshift', 'ifftshift', 'fftfreq', 'rfftfreq', 'next_fast_len'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="fftpack", module="helper",
+                                   private_modules=["_helper"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/pseudo_diffs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/pseudo_diffs.py
new file mode 100644
index 0000000000000000000000000000000000000000..ecf71ad3256d48d2131c8058072da724cb001af9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/pseudo_diffs.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.fftpack` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'diff',
+    'tilbert', 'itilbert', 'hilbert', 'ihilbert',
+    'cs_diff', 'cc_diff', 'sc_diff', 'ss_diff',
+    'shift', 'convolve'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="fftpack", module="pseudo_diffs",
+                                   private_modules=["_pseudo_diffs"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/realtransforms.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/realtransforms.py
new file mode 100644
index 0000000000000000000000000000000000000000..9a392198fccf213bc988a79058bd69515e39f510
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/realtransforms.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.fftpack` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="fftpack", module="realtransforms",
+                                   private_modules=["_realtransforms"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..2951471d2abb5c4a88ae0b44c172d3ecc0862d4d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_basic.py
@@ -0,0 +1,879 @@
+# Created by Pearu Peterson, September 2002
+
+from numpy.testing import (assert_, assert_equal, assert_array_almost_equal,
+                           assert_array_almost_equal_nulp, assert_array_less)
+import pytest
+from pytest import raises as assert_raises
+from scipy.fftpack import ifft, fft, fftn, ifftn, rfft, irfft, fft2
+
+from numpy import (arange, array, asarray, zeros, dot, exp, pi,
+                   swapaxes, double, cdouble)
+import numpy as np
+import numpy.fft
+from numpy.random import rand
+
+# "large" composite numbers supported by FFTPACK
+LARGE_COMPOSITE_SIZES = [
+    2**13,
+    2**5 * 3**5,
+    2**3 * 3**3 * 5**2,
+]
+SMALL_COMPOSITE_SIZES = [
+    2,
+    2*3*5,
+    2*2*3*3,
+]
+# prime
+LARGE_PRIME_SIZES = [
+    2011
+]
+SMALL_PRIME_SIZES = [
+    29
+]
+
+
+def _assert_close_in_norm(x, y, rtol, size, rdt):
+    # helper function for testing
+    err_msg = f"size: {size}  rdt: {rdt}"
+    assert_array_less(np.linalg.norm(x - y), rtol*np.linalg.norm(x), err_msg)
+
+
+def random(size):
+    return rand(*size)
+
+
+def direct_dft(x):
+    x = asarray(x)
+    n = len(x)
+    y = zeros(n, dtype=cdouble)
+    w = -arange(n)*(2j*pi/n)
+    for i in range(n):
+        y[i] = dot(exp(i*w), x)
+    return y
+
+
+def direct_idft(x):
+    x = asarray(x)
+    n = len(x)
+    y = zeros(n, dtype=cdouble)
+    w = arange(n)*(2j*pi/n)
+    for i in range(n):
+        y[i] = dot(exp(i*w), x)/n
+    return y
+
+
+def direct_dftn(x):
+    x = asarray(x)
+    for axis in range(len(x.shape)):
+        x = fft(x, axis=axis)
+    return x
+
+
+def direct_idftn(x):
+    x = asarray(x)
+    for axis in range(len(x.shape)):
+        x = ifft(x, axis=axis)
+    return x
+
+
+def direct_rdft(x):
+    x = asarray(x)
+    n = len(x)
+    w = -arange(n)*(2j*pi/n)
+    r = zeros(n, dtype=double)
+    for i in range(n//2+1):
+        y = dot(exp(i*w), x)
+        if i:
+            r[2*i-1] = y.real
+            if 2*i < n:
+                r[2*i] = y.imag
+        else:
+            r[0] = y.real
+    return r
+
+
+def direct_irdft(x):
+    x = asarray(x)
+    n = len(x)
+    x1 = zeros(n, dtype=cdouble)
+    for i in range(n//2+1):
+        if i:
+            if 2*i < n:
+                x1[i] = x[2*i-1] + 1j*x[2*i]
+                x1[n-i] = x[2*i-1] - 1j*x[2*i]
+            else:
+                x1[i] = x[2*i-1]
+        else:
+            x1[0] = x[0]
+    return direct_idft(x1).real
+
+
+class _TestFFTBase:
+    def setup_method(self):
+        self.cdt = None
+        self.rdt = None
+        np.random.seed(1234)
+
+    def test_definition(self):
+        x = np.array([1,2,3,4+1j,1,2,3,4+2j], dtype=self.cdt)
+        y = fft(x)
+        assert_equal(y.dtype, self.cdt)
+        y1 = direct_dft(x)
+        assert_array_almost_equal(y,y1)
+        x = np.array([1,2,3,4+0j,5], dtype=self.cdt)
+        assert_array_almost_equal(fft(x),direct_dft(x))
+
+    def test_n_argument_real(self):
+        x1 = np.array([1,2,3,4], dtype=self.rdt)
+        x2 = np.array([1,2,3,4], dtype=self.rdt)
+        y = fft([x1,x2],n=4)
+        assert_equal(y.dtype, self.cdt)
+        assert_equal(y.shape,(2,4))
+        assert_array_almost_equal(y[0],direct_dft(x1))
+        assert_array_almost_equal(y[1],direct_dft(x2))
+
+    def _test_n_argument_complex(self):
+        x1 = np.array([1,2,3,4+1j], dtype=self.cdt)
+        x2 = np.array([1,2,3,4+1j], dtype=self.cdt)
+        y = fft([x1,x2],n=4)
+        assert_equal(y.dtype, self.cdt)
+        assert_equal(y.shape,(2,4))
+        assert_array_almost_equal(y[0],direct_dft(x1))
+        assert_array_almost_equal(y[1],direct_dft(x2))
+
+    def test_invalid_sizes(self):
+        assert_raises(ValueError, fft, [])
+        assert_raises(ValueError, fft, [[1,1],[2,2]], -5)
+
+
+class TestDoubleFFT(_TestFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex128
+        self.rdt = np.float64
+
+
+class TestSingleFFT(_TestFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex64
+        self.rdt = np.float32
+
+    reason = ("single-precision FFT implementation is partially disabled, "
+              "until accuracy issues with large prime powers are resolved")
+
+    @pytest.mark.xfail(run=False, reason=reason)
+    def test_notice(self):
+        pass
+
+
+class TestFloat16FFT:
+
+    def test_1_argument_real(self):
+        x1 = np.array([1, 2, 3, 4], dtype=np.float16)
+        y = fft(x1, n=4)
+        assert_equal(y.dtype, np.complex64)
+        assert_equal(y.shape, (4, ))
+        assert_array_almost_equal(y, direct_dft(x1.astype(np.float32)))
+
+    def test_n_argument_real(self):
+        x1 = np.array([1, 2, 3, 4], dtype=np.float16)
+        x2 = np.array([1, 2, 3, 4], dtype=np.float16)
+        y = fft([x1, x2], n=4)
+        assert_equal(y.dtype, np.complex64)
+        assert_equal(y.shape, (2, 4))
+        assert_array_almost_equal(y[0], direct_dft(x1.astype(np.float32)))
+        assert_array_almost_equal(y[1], direct_dft(x2.astype(np.float32)))
+
+
+class _TestIFFTBase:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_definition(self):
+        x = np.array([1,2,3,4+1j,1,2,3,4+2j], self.cdt)
+        y = ifft(x)
+        y1 = direct_idft(x)
+        assert_equal(y.dtype, self.cdt)
+        assert_array_almost_equal(y,y1)
+
+        x = np.array([1,2,3,4+0j,5], self.cdt)
+        assert_array_almost_equal(ifft(x),direct_idft(x))
+
+    def test_definition_real(self):
+        x = np.array([1,2,3,4,1,2,3,4], self.rdt)
+        y = ifft(x)
+        assert_equal(y.dtype, self.cdt)
+        y1 = direct_idft(x)
+        assert_array_almost_equal(y,y1)
+
+        x = np.array([1,2,3,4,5], dtype=self.rdt)
+        assert_equal(y.dtype, self.cdt)
+        assert_array_almost_equal(ifft(x),direct_idft(x))
+
+    def test_random_complex(self):
+        for size in [1,51,111,100,200,64,128,256,1024]:
+            x = random([size]).astype(self.cdt)
+            x = random([size]).astype(self.cdt) + 1j*x
+            y1 = ifft(fft(x))
+            y2 = fft(ifft(x))
+            assert_equal(y1.dtype, self.cdt)
+            assert_equal(y2.dtype, self.cdt)
+            assert_array_almost_equal(y1, x)
+            assert_array_almost_equal(y2, x)
+
+    def test_random_real(self):
+        for size in [1,51,111,100,200,64,128,256,1024]:
+            x = random([size]).astype(self.rdt)
+            y1 = ifft(fft(x))
+            y2 = fft(ifft(x))
+            assert_equal(y1.dtype, self.cdt)
+            assert_equal(y2.dtype, self.cdt)
+            assert_array_almost_equal(y1, x)
+            assert_array_almost_equal(y2, x)
+
+    def test_size_accuracy(self):
+        # Sanity check for the accuracy for prime and non-prime sized inputs
+        if self.rdt == np.float32:
+            rtol = 1e-5
+        elif self.rdt == np.float64:
+            rtol = 1e-10
+
+        for size in LARGE_COMPOSITE_SIZES + LARGE_PRIME_SIZES:
+            np.random.seed(1234)
+            x = np.random.rand(size).astype(self.rdt)
+            y = ifft(fft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+            y = fft(ifft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+
+            x = (x + 1j*np.random.rand(size)).astype(self.cdt)
+            y = ifft(fft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+            y = fft(ifft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+
+    def test_invalid_sizes(self):
+        assert_raises(ValueError, ifft, [])
+        assert_raises(ValueError, ifft, [[1,1],[2,2]], -5)
+
+
+class TestDoubleIFFT(_TestIFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex128
+        self.rdt = np.float64
+
+
+class TestSingleIFFT(_TestIFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex64
+        self.rdt = np.float32
+
+
+class _TestRFFTBase:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_definition(self):
+        for t in [[1, 2, 3, 4, 1, 2, 3, 4], [1, 2, 3, 4, 1, 2, 3, 4, 5]]:
+            x = np.array(t, dtype=self.rdt)
+            y = rfft(x)
+            y1 = direct_rdft(x)
+            assert_array_almost_equal(y,y1)
+            assert_equal(y.dtype, self.rdt)
+
+    def test_invalid_sizes(self):
+        assert_raises(ValueError, rfft, [])
+        assert_raises(ValueError, rfft, [[1,1],[2,2]], -5)
+
+    # See gh-5790
+    class MockSeries:
+        def __init__(self, data):
+            self.data = np.asarray(data)
+
+        def __getattr__(self, item):
+            try:
+                return getattr(self.data, item)
+            except AttributeError as e:
+                raise AttributeError("'MockSeries' object "
+                                      f"has no attribute '{item}'") from e
+
+    def test_non_ndarray_with_dtype(self):
+        x = np.array([1., 2., 3., 4., 5.])
+        xs = _TestRFFTBase.MockSeries(x)
+
+        expected = [1, 2, 3, 4, 5]
+        rfft(xs)
+
+        # Data should not have been overwritten
+        assert_equal(x, expected)
+        assert_equal(xs.data, expected)
+
+    def test_complex_input(self):
+        assert_raises(TypeError, rfft, np.arange(4, dtype=np.complex64))
+
+
+class TestRFFTDouble(_TestRFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex128
+        self.rdt = np.float64
+
+
+class TestRFFTSingle(_TestRFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex64
+        self.rdt = np.float32
+
+
+class _TestIRFFTBase:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_definition(self):
+        x1 = [1,2,3,4,1,2,3,4]
+        x1_1 = [1,2+3j,4+1j,2+3j,4,2-3j,4-1j,2-3j]
+        x2 = [1,2,3,4,1,2,3,4,5]
+        x2_1 = [1,2+3j,4+1j,2+3j,4+5j,4-5j,2-3j,4-1j,2-3j]
+
+        def _test(x, xr):
+            y = irfft(np.array(x, dtype=self.rdt))
+            y1 = direct_irdft(x)
+            assert_equal(y.dtype, self.rdt)
+            assert_array_almost_equal(y,y1, decimal=self.ndec)
+            assert_array_almost_equal(y,ifft(xr), decimal=self.ndec)
+
+        _test(x1, x1_1)
+        _test(x2, x2_1)
+
+    def test_random_real(self):
+        for size in [1,51,111,100,200,64,128,256,1024]:
+            x = random([size]).astype(self.rdt)
+            y1 = irfft(rfft(x))
+            y2 = rfft(irfft(x))
+            assert_equal(y1.dtype, self.rdt)
+            assert_equal(y2.dtype, self.rdt)
+            assert_array_almost_equal(y1, x, decimal=self.ndec,
+                                       err_msg="size=%d" % size)
+            assert_array_almost_equal(y2, x, decimal=self.ndec,
+                                       err_msg="size=%d" % size)
+
+    def test_size_accuracy(self):
+        # Sanity check for the accuracy for prime and non-prime sized inputs
+        if self.rdt == np.float32:
+            rtol = 1e-5
+        elif self.rdt == np.float64:
+            rtol = 1e-10
+
+        for size in LARGE_COMPOSITE_SIZES + LARGE_PRIME_SIZES:
+            np.random.seed(1234)
+            x = np.random.rand(size).astype(self.rdt)
+            y = irfft(rfft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+            y = rfft(irfft(x))
+            _assert_close_in_norm(x, y, rtol, size, self.rdt)
+
+    def test_invalid_sizes(self):
+        assert_raises(ValueError, irfft, [])
+        assert_raises(ValueError, irfft, [[1,1],[2,2]], -5)
+
+    def test_complex_input(self):
+        assert_raises(TypeError, irfft, np.arange(4, dtype=np.complex64))
+
+
+# self.ndec is bogus; we should have a assert_array_approx_equal for number of
+# significant digits
+
+class TestIRFFTDouble(_TestIRFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex128
+        self.rdt = np.float64
+        self.ndec = 14
+
+
+class TestIRFFTSingle(_TestIRFFTBase):
+    def setup_method(self):
+        self.cdt = np.complex64
+        self.rdt = np.float32
+        self.ndec = 5
+
+
+class Testfft2:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_regression_244(self):
+        """FFT returns wrong result with axes parameter."""
+        # fftn (and hence fft2) used to break when both axes and shape were
+        # used
+        x = numpy.ones((4, 4, 2))
+        y = fft2(x, shape=(8, 8), axes=(-3, -2))
+        y_r = numpy.fft.fftn(x, s=(8, 8), axes=(-3, -2))
+        assert_array_almost_equal(y, y_r)
+
+    def test_invalid_sizes(self):
+        assert_raises(ValueError, fft2, [[]])
+        assert_raises(ValueError, fft2, [[1, 1], [2, 2]], (4, -3))
+
+
+class TestFftnSingle:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_definition(self):
+        x = [[1, 2, 3],
+             [4, 5, 6],
+             [7, 8, 9]]
+        y = fftn(np.array(x, np.float32))
+        assert_(y.dtype == np.complex64,
+                msg="double precision output with single precision")
+
+        y_r = np.array(fftn(x), np.complex64)
+        assert_array_almost_equal_nulp(y, y_r)
+
+    @pytest.mark.parametrize('size', SMALL_COMPOSITE_SIZES + SMALL_PRIME_SIZES)
+    def test_size_accuracy_small(self, size):
+        rng = np.random.default_rng(1234)
+        x = rng.random((size, size)) + 1j*rng.random((size, size))
+        y1 = fftn(x.real.astype(np.float32))
+        y2 = fftn(x.real.astype(np.float64)).astype(np.complex64)
+
+        assert_equal(y1.dtype, np.complex64)
+        assert_array_almost_equal_nulp(y1, y2, 2000)
+
+    @pytest.mark.parametrize('size', LARGE_COMPOSITE_SIZES + LARGE_PRIME_SIZES)
+    def test_size_accuracy_large(self, size):
+        rand = np.random.default_rng(1234)
+        x = rand.random((size, 3)) + 1j*rand.random((size, 3))
+        y1 = fftn(x.real.astype(np.float32))
+        y2 = fftn(x.real.astype(np.float64)).astype(np.complex64)
+
+        assert_equal(y1.dtype, np.complex64)
+        assert_array_almost_equal_nulp(y1, y2, 2000)
+
+    def test_definition_float16(self):
+        x = [[1, 2, 3],
+             [4, 5, 6],
+             [7, 8, 9]]
+        y = fftn(np.array(x, np.float16))
+        assert_equal(y.dtype, np.complex64)
+        y_r = np.array(fftn(x), np.complex64)
+        assert_array_almost_equal_nulp(y, y_r)
+
+    @pytest.mark.parametrize('size', SMALL_COMPOSITE_SIZES + SMALL_PRIME_SIZES)
+    def test_float16_input_small(self, size):
+        rng = np.random.default_rng(1234)
+        x = rng.random((size, size)) + 1j * rng.random((size, size))
+        y1 = fftn(x.real.astype(np.float16))
+        y2 = fftn(x.real.astype(np.float64)).astype(np.complex64)
+
+        assert_equal(y1.dtype, np.complex64)
+        assert_array_almost_equal_nulp(y1, y2, 5e5)
+
+    @pytest.mark.parametrize('size', LARGE_COMPOSITE_SIZES + LARGE_PRIME_SIZES)
+    def test_float16_input_large(self, size):
+        rng = np.random.default_rng(1234)
+        x = rng.random((size, 3)) + 1j*rng.random((size, 3))
+        y1 = fftn(x.real.astype(np.float16))
+        y2 = fftn(x.real.astype(np.float64)).astype(np.complex64)
+
+        assert_equal(y1.dtype, np.complex64)
+        assert_array_almost_equal_nulp(y1, y2, 2e6)
+
+
+class TestFftn:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_definition(self):
+        x = [[1, 2, 3],
+             [4, 5, 6],
+             [7, 8, 9]]
+        y = fftn(x)
+        assert_array_almost_equal(y, direct_dftn(x))
+
+        x = random((20, 26))
+        assert_array_almost_equal(fftn(x), direct_dftn(x))
+
+        x = random((5, 4, 3, 20))
+        assert_array_almost_equal(fftn(x), direct_dftn(x))
+
+    def test_axes_argument(self):
+        # plane == ji_plane, x== kji_space
+        plane1 = [[1, 2, 3],
+                  [4, 5, 6],
+                  [7, 8, 9]]
+        plane2 = [[10, 11, 12],
+                  [13, 14, 15],
+                  [16, 17, 18]]
+        plane3 = [[19, 20, 21],
+                  [22, 23, 24],
+                  [25, 26, 27]]
+        ki_plane1 = [[1, 2, 3],
+                     [10, 11, 12],
+                     [19, 20, 21]]
+        ki_plane2 = [[4, 5, 6],
+                     [13, 14, 15],
+                     [22, 23, 24]]
+        ki_plane3 = [[7, 8, 9],
+                     [16, 17, 18],
+                     [25, 26, 27]]
+        jk_plane1 = [[1, 10, 19],
+                     [4, 13, 22],
+                     [7, 16, 25]]
+        jk_plane2 = [[2, 11, 20],
+                     [5, 14, 23],
+                     [8, 17, 26]]
+        jk_plane3 = [[3, 12, 21],
+                     [6, 15, 24],
+                     [9, 18, 27]]
+        kj_plane1 = [[1, 4, 7],
+                     [10, 13, 16], [19, 22, 25]]
+        kj_plane2 = [[2, 5, 8],
+                     [11, 14, 17], [20, 23, 26]]
+        kj_plane3 = [[3, 6, 9],
+                     [12, 15, 18], [21, 24, 27]]
+        ij_plane1 = [[1, 4, 7],
+                     [2, 5, 8],
+                     [3, 6, 9]]
+        ij_plane2 = [[10, 13, 16],
+                     [11, 14, 17],
+                     [12, 15, 18]]
+        ij_plane3 = [[19, 22, 25],
+                     [20, 23, 26],
+                     [21, 24, 27]]
+        ik_plane1 = [[1, 10, 19],
+                     [2, 11, 20],
+                     [3, 12, 21]]
+        ik_plane2 = [[4, 13, 22],
+                     [5, 14, 23],
+                     [6, 15, 24]]
+        ik_plane3 = [[7, 16, 25],
+                     [8, 17, 26],
+                     [9, 18, 27]]
+        ijk_space = [jk_plane1, jk_plane2, jk_plane3]
+        ikj_space = [kj_plane1, kj_plane2, kj_plane3]
+        jik_space = [ik_plane1, ik_plane2, ik_plane3]
+        jki_space = [ki_plane1, ki_plane2, ki_plane3]
+        kij_space = [ij_plane1, ij_plane2, ij_plane3]
+        x = array([plane1, plane2, plane3])
+
+        assert_array_almost_equal(fftn(x),
+                                  fftn(x, axes=(-3, -2, -1)))  # kji_space
+        assert_array_almost_equal(fftn(x), fftn(x, axes=(0, 1, 2)))
+        assert_array_almost_equal(fftn(x, axes=(0, 2)), fftn(x, axes=(0, -1)))
+        y = fftn(x, axes=(2, 1, 0))  # ijk_space
+        assert_array_almost_equal(swapaxes(y, -1, -3), fftn(ijk_space))
+        y = fftn(x, axes=(2, 0, 1))  # ikj_space
+        assert_array_almost_equal(swapaxes(swapaxes(y, -1, -3), -1, -2),
+                                  fftn(ikj_space))
+        y = fftn(x, axes=(1, 2, 0))  # jik_space
+        assert_array_almost_equal(swapaxes(swapaxes(y, -1, -3), -3, -2),
+                                  fftn(jik_space))
+        y = fftn(x, axes=(1, 0, 2))  # jki_space
+        assert_array_almost_equal(swapaxes(y, -2, -3), fftn(jki_space))
+        y = fftn(x, axes=(0, 2, 1))  # kij_space
+        assert_array_almost_equal(swapaxes(y, -2, -1), fftn(kij_space))
+
+        y = fftn(x, axes=(-2, -1))  # ji_plane
+        assert_array_almost_equal(fftn(plane1), y[0])
+        assert_array_almost_equal(fftn(plane2), y[1])
+        assert_array_almost_equal(fftn(plane3), y[2])
+
+        y = fftn(x, axes=(1, 2))  # ji_plane
+        assert_array_almost_equal(fftn(plane1), y[0])
+        assert_array_almost_equal(fftn(plane2), y[1])
+        assert_array_almost_equal(fftn(plane3), y[2])
+
+        y = fftn(x, axes=(-3, -2))  # kj_plane
+        assert_array_almost_equal(fftn(x[:, :, 0]), y[:, :, 0])
+        assert_array_almost_equal(fftn(x[:, :, 1]), y[:, :, 1])
+        assert_array_almost_equal(fftn(x[:, :, 2]), y[:, :, 2])
+
+        y = fftn(x, axes=(-3, -1))  # ki_plane
+        assert_array_almost_equal(fftn(x[:, 0, :]), y[:, 0, :])
+        assert_array_almost_equal(fftn(x[:, 1, :]), y[:, 1, :])
+        assert_array_almost_equal(fftn(x[:, 2, :]), y[:, 2, :])
+
+        y = fftn(x, axes=(-1, -2))  # ij_plane
+        assert_array_almost_equal(fftn(ij_plane1), swapaxes(y[0], -2, -1))
+        assert_array_almost_equal(fftn(ij_plane2), swapaxes(y[1], -2, -1))
+        assert_array_almost_equal(fftn(ij_plane3), swapaxes(y[2], -2, -1))
+
+        y = fftn(x, axes=(-1, -3))  # ik_plane
+        assert_array_almost_equal(fftn(ik_plane1),
+                                  swapaxes(y[:, 0, :], -1, -2))
+        assert_array_almost_equal(fftn(ik_plane2),
+                                  swapaxes(y[:, 1, :], -1, -2))
+        assert_array_almost_equal(fftn(ik_plane3),
+                                  swapaxes(y[:, 2, :], -1, -2))
+
+        y = fftn(x, axes=(-2, -3))  # jk_plane
+        assert_array_almost_equal(fftn(jk_plane1),
+                                  swapaxes(y[:, :, 0], -1, -2))
+        assert_array_almost_equal(fftn(jk_plane2),
+                                  swapaxes(y[:, :, 1], -1, -2))
+        assert_array_almost_equal(fftn(jk_plane3),
+                                  swapaxes(y[:, :, 2], -1, -2))
+
+        y = fftn(x, axes=(-1,))  # i_line
+        for i in range(3):
+            for j in range(3):
+                assert_array_almost_equal(fft(x[i, j, :]), y[i, j, :])
+        y = fftn(x, axes=(-2,))  # j_line
+        for i in range(3):
+            for j in range(3):
+                assert_array_almost_equal(fft(x[i, :, j]), y[i, :, j])
+        y = fftn(x, axes=(0,))  # k_line
+        for i in range(3):
+            for j in range(3):
+                assert_array_almost_equal(fft(x[:, i, j]), y[:, i, j])
+
+        y = fftn(x, axes=())  # point
+        assert_array_almost_equal(y, x)
+
+    def test_shape_argument(self):
+        small_x = [[1, 2, 3],
+                   [4, 5, 6]]
+        large_x1 = [[1, 2, 3, 0],
+                    [4, 5, 6, 0],
+                    [0, 0, 0, 0],
+                    [0, 0, 0, 0]]
+
+        y = fftn(small_x, shape=(4, 4))
+        assert_array_almost_equal(y, fftn(large_x1))
+
+        y = fftn(small_x, shape=(3, 4))
+        assert_array_almost_equal(y, fftn(large_x1[:-1]))
+
+    def test_shape_axes_argument(self):
+        small_x = [[1, 2, 3],
+                   [4, 5, 6],
+                   [7, 8, 9]]
+        large_x1 = array([[1, 2, 3, 0],
+                          [4, 5, 6, 0],
+                          [7, 8, 9, 0],
+                          [0, 0, 0, 0]])
+        y = fftn(small_x, shape=(4, 4), axes=(-2, -1))
+        assert_array_almost_equal(y, fftn(large_x1))
+        y = fftn(small_x, shape=(4, 4), axes=(-1, -2))
+
+        assert_array_almost_equal(y, swapaxes(
+            fftn(swapaxes(large_x1, -1, -2)), -1, -2))
+
+    def test_shape_axes_argument2(self):
+        # Change shape of the last axis
+        x = numpy.random.random((10, 5, 3, 7))
+        y = fftn(x, axes=(-1,), shape=(8,))
+        assert_array_almost_equal(y, fft(x, axis=-1, n=8))
+
+        # Change shape of an arbitrary axis which is not the last one
+        x = numpy.random.random((10, 5, 3, 7))
+        y = fftn(x, axes=(-2,), shape=(8,))
+        assert_array_almost_equal(y, fft(x, axis=-2, n=8))
+
+        # Change shape of axes: cf #244, where shape and axes were mixed up
+        x = numpy.random.random((4, 4, 2))
+        y = fftn(x, axes=(-3, -2), shape=(8, 8))
+        assert_array_almost_equal(y,
+                                  numpy.fft.fftn(x, axes=(-3, -2), s=(8, 8)))
+
+    def test_shape_argument_more(self):
+        x = zeros((4, 4, 2))
+        with assert_raises(ValueError,
+                           match="when given, axes and shape arguments"
+                           " have to be of the same length"):
+            fftn(x, shape=(8, 8, 2, 1))
+
+    def test_invalid_sizes(self):
+        with assert_raises(ValueError,
+                           match="invalid number of data points"
+                           r" \(\[1, 0\]\) specified"):
+            fftn([[]])
+
+        with assert_raises(ValueError,
+                           match="invalid number of data points"
+                           r" \(\[4, -3\]\) specified"):
+            fftn([[1, 1], [2, 2]], (4, -3))
+
+
+class TestIfftn:
+    dtype = None
+    cdtype = None
+
+    def setup_method(self):
+        np.random.seed(1234)
+
+    @pytest.mark.parametrize('dtype,cdtype,maxnlp',
+                             [(np.float64, np.complex128, 2000),
+                              (np.float32, np.complex64, 3500)])
+    def test_definition(self, dtype, cdtype, maxnlp):
+        rng = np.random.default_rng(1234)
+        x = np.array([[1, 2, 3],
+                      [4, 5, 6],
+                      [7, 8, 9]], dtype=dtype)
+        y = ifftn(x)
+        assert_equal(y.dtype, cdtype)
+        assert_array_almost_equal_nulp(y, direct_idftn(x), maxnlp)
+
+        x = rng.random((20, 26))
+        assert_array_almost_equal_nulp(ifftn(x), direct_idftn(x), maxnlp)
+
+        x = rng.random((5, 4, 3, 20))
+        assert_array_almost_equal_nulp(ifftn(x), direct_idftn(x), maxnlp)
+
+    @pytest.mark.parametrize('maxnlp', [2000, 3500])
+    @pytest.mark.parametrize('size', [1, 2, 51, 32, 64, 92])
+    def test_random_complex(self, maxnlp, size):
+        rng = np.random.default_rng(1234)
+        x = rng.random([size, size]) + 1j * rng.random([size, size])
+        assert_array_almost_equal_nulp(ifftn(fftn(x)), x, maxnlp)
+        assert_array_almost_equal_nulp(fftn(ifftn(x)), x, maxnlp)
+
+    def test_invalid_sizes(self):
+        with assert_raises(ValueError,
+                           match="invalid number of data points"
+                           r" \(\[1, 0\]\) specified"):
+            ifftn([[]])
+
+        with assert_raises(ValueError,
+                           match="invalid number of data points"
+                           r" \(\[4, -3\]\) specified"):
+            ifftn([[1, 1], [2, 2]], (4, -3))
+
+
+class FakeArray:
+    def __init__(self, data):
+        self._data = data
+        self.__array_interface__ = data.__array_interface__
+
+
+class FakeArray2:
+    def __init__(self, data):
+        self._data = data
+
+    def __array__(self, dtype=None, copy=None):
+        return self._data
+
+
+class TestOverwrite:
+    """Check input overwrite behavior of the FFT functions."""
+
+    real_dtypes = (np.float32, np.float64)
+    dtypes = real_dtypes + (np.complex64, np.complex128)
+    fftsizes = [8, 16, 32]
+
+    def _check(self, x, routine, fftsize, axis, overwrite_x):
+        x2 = x.copy()
+        for fake in [lambda x: x, FakeArray, FakeArray2]:
+            routine(fake(x2), fftsize, axis, overwrite_x=overwrite_x)
+
+            sig = (f"{routine.__name__}({x.dtype}{x.shape!r}, {fftsize!r}, "
+                   f"axis={axis!r}, overwrite_x={overwrite_x!r})")
+            if not overwrite_x:
+                assert_equal(x2, x, err_msg=f"spurious overwrite in {sig}")
+
+    def _check_1d(self, routine, dtype, shape, axis, overwritable_dtypes,
+                  fftsize, overwrite_x):
+        np.random.seed(1234)
+        if np.issubdtype(dtype, np.complexfloating):
+            data = np.random.randn(*shape) + 1j*np.random.randn(*shape)
+        else:
+            data = np.random.randn(*shape)
+        data = data.astype(dtype)
+
+        self._check(data, routine, fftsize, axis,
+                    overwrite_x=overwrite_x)
+
+    @pytest.mark.parametrize('dtype', dtypes)
+    @pytest.mark.parametrize('fftsize', fftsizes)
+    @pytest.mark.parametrize('overwrite_x', [True, False])
+    @pytest.mark.parametrize('shape,axes', [((16,), -1),
+                                            ((16, 2), 0),
+                                            ((2, 16), 1)])
+    def test_fft_ifft(self, dtype, fftsize, overwrite_x, shape, axes):
+        overwritable = (np.complex128, np.complex64)
+        self._check_1d(fft, dtype, shape, axes, overwritable,
+                       fftsize, overwrite_x)
+        self._check_1d(ifft, dtype, shape, axes, overwritable,
+                       fftsize, overwrite_x)
+
+    @pytest.mark.parametrize('dtype', real_dtypes)
+    @pytest.mark.parametrize('fftsize', fftsizes)
+    @pytest.mark.parametrize('overwrite_x', [True, False])
+    @pytest.mark.parametrize('shape,axes', [((16,), -1),
+                                            ((16, 2), 0),
+                                            ((2, 16), 1)])
+    def test_rfft_irfft(self, dtype, fftsize, overwrite_x, shape, axes):
+        overwritable = self.real_dtypes
+        self._check_1d(irfft, dtype, shape, axes, overwritable,
+                       fftsize, overwrite_x)
+        self._check_1d(rfft, dtype, shape, axes, overwritable,
+                       fftsize, overwrite_x)
+
+    def _check_nd_one(self, routine, dtype, shape, axes, overwritable_dtypes,
+                      overwrite_x):
+        np.random.seed(1234)
+        if np.issubdtype(dtype, np.complexfloating):
+            data = np.random.randn(*shape) + 1j*np.random.randn(*shape)
+        else:
+            data = np.random.randn(*shape)
+        data = data.astype(dtype)
+
+        def fftshape_iter(shp):
+            if len(shp) <= 0:
+                yield ()
+            else:
+                for j in (shp[0]//2, shp[0], shp[0]*2):
+                    for rest in fftshape_iter(shp[1:]):
+                        yield (j,) + rest
+
+        if axes is None:
+            part_shape = shape
+        else:
+            part_shape = tuple(np.take(shape, axes))
+
+        for fftshape in fftshape_iter(part_shape):
+            self._check(data, routine, fftshape, axes,
+                        overwrite_x=overwrite_x)
+            if data.ndim > 1:
+                self._check(data.T, routine, fftshape, axes,
+                            overwrite_x=overwrite_x)
+
+    @pytest.mark.parametrize('dtype', dtypes)
+    @pytest.mark.parametrize('overwrite_x', [True, False])
+    @pytest.mark.parametrize('shape,axes', [((16,), None),
+                                            ((16,), (0,)),
+                                            ((16, 2), (0,)),
+                                            ((2, 16), (1,)),
+                                            ((8, 16), None),
+                                            ((8, 16), (0, 1)),
+                                            ((8, 16, 2), (0, 1)),
+                                            ((8, 16, 2), (1, 2)),
+                                            ((8, 16, 2), (0,)),
+                                            ((8, 16, 2), (1,)),
+                                            ((8, 16, 2), (2,)),
+                                            ((8, 16, 2), None),
+                                            ((8, 16, 2), (0, 1, 2))])
+    def test_fftn_ifftn(self, dtype, overwrite_x, shape, axes):
+        overwritable = (np.complex128, np.complex64)
+        self._check_nd_one(fftn, dtype, shape, axes, overwritable,
+                           overwrite_x)
+        self._check_nd_one(ifftn, dtype, shape, axes, overwritable,
+                           overwrite_x)
+
+
+@pytest.mark.parametrize('func', [fftn, ifftn, fft2])
+def test_shape_axes_ndarray(func):
+    # Test fftn and ifftn work with NumPy arrays for shape and axes arguments
+    # Regression test for gh-13342
+    a = np.random.rand(10, 10)
+
+    expect = func(a, shape=(5, 5))
+    actual = func(a, shape=np.array([5, 5]))
+    assert_equal(expect, actual)
+
+    expect = func(a, axes=(-1,))
+    actual = func(a, axes=np.array([-1,]))
+    assert_equal(expect, actual)
+
+    expect = func(a, shape=(4, 7), axes=(1, 0))
+    actual = func(a, shape=np.array([4, 7]), axes=np.array([1, 0]))
+    assert_equal(expect, actual)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_helper.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_helper.py
new file mode 100644
index 0000000000000000000000000000000000000000..5e7be04f3c0291502b50b101db82d299aadc7772
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_helper.py
@@ -0,0 +1,54 @@
+# Created by Pearu Peterson, September 2002
+
+__usage__ = """
+Build fftpack:
+  python setup_fftpack.py build
+Run tests if scipy is installed:
+  python -c 'import scipy;scipy.fftpack.test()'
+Run tests if fftpack is not installed:
+  python tests/test_helper.py []
+"""
+
+from numpy.testing import assert_array_almost_equal
+from scipy.fftpack import fftshift, ifftshift, fftfreq, rfftfreq
+
+from numpy import pi, random
+
+class TestFFTShift:
+
+    def test_definition(self):
+        x = [0,1,2,3,4,-4,-3,-2,-1]
+        y = [-4,-3,-2,-1,0,1,2,3,4]
+        assert_array_almost_equal(fftshift(x),y)
+        assert_array_almost_equal(ifftshift(y),x)
+        x = [0,1,2,3,4,-5,-4,-3,-2,-1]
+        y = [-5,-4,-3,-2,-1,0,1,2,3,4]
+        assert_array_almost_equal(fftshift(x),y)
+        assert_array_almost_equal(ifftshift(y),x)
+
+    def test_inverse(self):
+        for n in [1,4,9,100,211]:
+            x = random.random((n,))
+            assert_array_almost_equal(ifftshift(fftshift(x)),x)
+
+
+class TestFFTFreq:
+
+    def test_definition(self):
+        x = [0,1,2,3,4,-4,-3,-2,-1]
+        assert_array_almost_equal(9*fftfreq(9),x)
+        assert_array_almost_equal(9*pi*fftfreq(9,pi),x)
+        x = [0,1,2,3,4,-5,-4,-3,-2,-1]
+        assert_array_almost_equal(10*fftfreq(10),x)
+        assert_array_almost_equal(10*pi*fftfreq(10,pi),x)
+
+
+class TestRFFTFreq:
+
+    def test_definition(self):
+        x = [0,1,1,2,2,3,3,4,4]
+        assert_array_almost_equal(9*rfftfreq(9),x)
+        assert_array_almost_equal(9*pi*rfftfreq(9,pi),x)
+        x = [0,1,1,2,2,3,3,4,4,5]
+        assert_array_almost_equal(10*rfftfreq(10),x)
+        assert_array_almost_equal(10*pi*rfftfreq(10,pi),x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_import.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_import.py
new file mode 100644
index 0000000000000000000000000000000000000000..e71aec9bd07cd4ef486b7e74b9589b6f1634d629
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_import.py
@@ -0,0 +1,33 @@
+"""Test possibility of patching fftpack with pyfftw.
+
+No module source outside of scipy.fftpack should contain an import of
+the form `from scipy.fftpack import ...`, so that a simple replacement
+of scipy.fftpack by the corresponding fftw interface completely swaps
+the two FFT implementations.
+
+Because this simply inspects source files, we only need to run the test
+on one version of Python.
+"""
+
+
+from pathlib import Path
+import re
+import tokenize
+import pytest
+from numpy.testing import assert_
+import scipy
+
+class TestFFTPackImport:
+    @pytest.mark.slow
+    def test_fftpack_import(self):
+        base = Path(scipy.__file__).parent
+        regexp = r"\s*from.+\.fftpack import .*\n"
+        for path in base.rglob("*.py"):
+            if base / "fftpack" in path.parents:
+                continue
+            # use tokenize to auto-detect encoding on systems where no
+            # default encoding is defined (e.g., LANG='C')
+            with tokenize.open(str(path)) as file:
+                assert_(all(not re.fullmatch(regexp, line)
+                            for line in file),
+                        f"{path} contains an import from fftpack")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_pseudo_diffs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_pseudo_diffs.py
new file mode 100644
index 0000000000000000000000000000000000000000..0a92729626a280c12aa3197e99b0d58ce00812d9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_pseudo_diffs.py
@@ -0,0 +1,388 @@
+# Created by Pearu Peterson, September 2002
+
+__usage__ = """
+Build fftpack:
+  python setup_fftpack.py build
+Run tests if scipy is installed:
+  python -c 'import scipy;scipy.fftpack.test()'
+Run tests if fftpack is not installed:
+  python tests/test_pseudo_diffs.py []
+"""
+
+from numpy.testing import (assert_equal, assert_almost_equal,
+                           assert_array_almost_equal)
+from scipy.fftpack import (diff, fft, ifft, tilbert, itilbert, hilbert,
+                           ihilbert, shift, fftfreq, cs_diff, sc_diff,
+                           ss_diff, cc_diff)
+
+import numpy as np
+from numpy import arange, sin, cos, pi, exp, tanh, sum, sign
+from numpy.random import random
+
+
+def direct_diff(x,k=1,period=None):
+    fx = fft(x)
+    n = len(fx)
+    if period is None:
+        period = 2*pi
+    w = fftfreq(n)*2j*pi/period*n
+    if k < 0:
+        w = 1 / w**k
+        w[0] = 0.0
+    else:
+        w = w**k
+    if n > 2000:
+        w[250:n-250] = 0.0
+    return ifft(w*fx).real
+
+
+def direct_tilbert(x,h=1,period=None):
+    fx = fft(x)
+    n = len(fx)
+    if period is None:
+        period = 2*pi
+    w = fftfreq(n)*h*2*pi/period*n
+    w[0] = 1
+    w = 1j/tanh(w)
+    w[0] = 0j
+    return ifft(w*fx)
+
+
+def direct_itilbert(x,h=1,period=None):
+    fx = fft(x)
+    n = len(fx)
+    if period is None:
+        period = 2*pi
+    w = fftfreq(n)*h*2*pi/period*n
+    w = -1j*tanh(w)
+    return ifft(w*fx)
+
+
+def direct_hilbert(x):
+    fx = fft(x)
+    n = len(fx)
+    w = fftfreq(n)*n
+    w = 1j*sign(w)
+    return ifft(w*fx)
+
+
+def direct_ihilbert(x):
+    return -direct_hilbert(x)
+
+
+def direct_shift(x,a,period=None):
+    n = len(x)
+    if period is None:
+        k = fftfreq(n)*1j*n
+    else:
+        k = fftfreq(n)*2j*pi/period*n
+    return ifft(fft(x)*exp(k*a)).real
+
+
+class TestDiff:
+
+    def test_definition(self):
+        for n in [16,17,64,127,32]:
+            x = arange(n)*2*pi/n
+            assert_array_almost_equal(diff(sin(x)),direct_diff(sin(x)))
+            assert_array_almost_equal(diff(sin(x),2),direct_diff(sin(x),2))
+            assert_array_almost_equal(diff(sin(x),3),direct_diff(sin(x),3))
+            assert_array_almost_equal(diff(sin(x),4),direct_diff(sin(x),4))
+            assert_array_almost_equal(diff(sin(x),5),direct_diff(sin(x),5))
+            assert_array_almost_equal(diff(sin(2*x),3),direct_diff(sin(2*x),3))
+            assert_array_almost_equal(diff(sin(2*x),4),direct_diff(sin(2*x),4))
+            assert_array_almost_equal(diff(cos(x)),direct_diff(cos(x)))
+            assert_array_almost_equal(diff(cos(x),2),direct_diff(cos(x),2))
+            assert_array_almost_equal(diff(cos(x),3),direct_diff(cos(x),3))
+            assert_array_almost_equal(diff(cos(x),4),direct_diff(cos(x),4))
+            assert_array_almost_equal(diff(cos(2*x)),direct_diff(cos(2*x)))
+            assert_array_almost_equal(diff(sin(x*n/8)),direct_diff(sin(x*n/8)))
+            assert_array_almost_equal(diff(cos(x*n/8)),direct_diff(cos(x*n/8)))
+            for k in range(5):
+                assert_array_almost_equal(diff(sin(4*x),k),direct_diff(sin(4*x),k))
+                assert_array_almost_equal(diff(cos(4*x),k),direct_diff(cos(4*x),k))
+
+    def test_period(self):
+        for n in [17,64]:
+            x = arange(n)/float(n)
+            assert_array_almost_equal(diff(sin(2*pi*x),period=1),
+                                      2*pi*cos(2*pi*x))
+            assert_array_almost_equal(diff(sin(2*pi*x),3,period=1),
+                                      -(2*pi)**3*cos(2*pi*x))
+
+    def test_sin(self):
+        for n in [32,64,77]:
+            x = arange(n)*2*pi/n
+            assert_array_almost_equal(diff(sin(x)),cos(x))
+            assert_array_almost_equal(diff(cos(x)),-sin(x))
+            assert_array_almost_equal(diff(sin(x),2),-sin(x))
+            assert_array_almost_equal(diff(sin(x),4),sin(x))
+            assert_array_almost_equal(diff(sin(4*x)),4*cos(4*x))
+            assert_array_almost_equal(diff(sin(sin(x))),cos(x)*cos(sin(x)))
+
+    def test_expr(self):
+        for n in [64,77,100,128,256,512,1024,2048,4096,8192][:5]:
+            x = arange(n)*2*pi/n
+            f = sin(x)*cos(4*x)+exp(sin(3*x))
+            df = cos(x)*cos(4*x)-4*sin(x)*sin(4*x)+3*cos(3*x)*exp(sin(3*x))
+            ddf = -17*sin(x)*cos(4*x)-8*cos(x)*sin(4*x)\
+                 - 9*sin(3*x)*exp(sin(3*x))+9*cos(3*x)**2*exp(sin(3*x))
+            d1 = diff(f)
+            assert_array_almost_equal(d1,df)
+            assert_array_almost_equal(diff(df),ddf)
+            assert_array_almost_equal(diff(f,2),ddf)
+            assert_array_almost_equal(diff(ddf,-1),df)
+
+    def test_expr_large(self):
+        for n in [2048,4096]:
+            x = arange(n)*2*pi/n
+            f = sin(x)*cos(4*x)+exp(sin(3*x))
+            df = cos(x)*cos(4*x)-4*sin(x)*sin(4*x)+3*cos(3*x)*exp(sin(3*x))
+            ddf = -17*sin(x)*cos(4*x)-8*cos(x)*sin(4*x)\
+                 - 9*sin(3*x)*exp(sin(3*x))+9*cos(3*x)**2*exp(sin(3*x))
+            assert_array_almost_equal(diff(f),df)
+            assert_array_almost_equal(diff(df),ddf)
+            assert_array_almost_equal(diff(ddf,-1),df)
+            assert_array_almost_equal(diff(f,2),ddf)
+
+    def test_int(self):
+        n = 64
+        x = arange(n)*2*pi/n
+        assert_array_almost_equal(diff(sin(x),-1),-cos(x))
+        assert_array_almost_equal(diff(sin(x),-2),-sin(x))
+        assert_array_almost_equal(diff(sin(x),-4),sin(x))
+        assert_array_almost_equal(diff(2*cos(2*x),-1),sin(2*x))
+
+    def test_random_even(self):
+        rng = np.random.default_rng(1234)
+        for k in [0,2,4,6]:
+            for n in [60,32,64,56,55]:
+                f = rng.random((n,))
+                af = sum(f,axis=0)/n
+                f = f-af
+                # zeroing Nyquist mode:
+                f = diff(diff(f,1),-1)
+                assert_almost_equal(sum(f,axis=0),0.0)
+                assert_array_almost_equal(diff(diff(f,k),-k),f)
+                assert_array_almost_equal(diff(diff(f,-k),k),f)
+
+    def test_random_odd(self):
+        rng = np.random.default_rng(1234)
+        for k in [0,1,2,3,4,5,6]:
+            for n in [33,65,55]:
+                f = rng.random((n,))
+                af = sum(f,axis=0)/n
+                f = f-af
+                assert_almost_equal(sum(f,axis=0),0.0)
+                assert_array_almost_equal(diff(diff(f,k),-k),f)
+                assert_array_almost_equal(diff(diff(f,-k),k),f)
+
+    def test_zero_nyquist(self):
+        rng = np.random.default_rng(1234)
+        for k in [0,1,2,3,4,5,6]:
+            for n in [32,33,64,56,55]:
+                f = rng.random((n,))
+                af = sum(f,axis=0)/n
+                f = f-af
+                # zeroing Nyquist mode:
+                f = diff(diff(f,1),-1)
+                assert_almost_equal(sum(f,axis=0),0.0)
+                assert_array_almost_equal(diff(diff(f,k),-k),f)
+                assert_array_almost_equal(diff(diff(f,-k),k),f)
+
+
+class TestTilbert:
+
+    def test_definition(self):
+        for h in [0.1,0.5,1,5.5,10]:
+            for n in [16,17,64,127]:
+                x = arange(n)*2*pi/n
+                y = tilbert(sin(x),h)
+                y1 = direct_tilbert(sin(x),h)
+                assert_array_almost_equal(y,y1)
+                assert_array_almost_equal(tilbert(sin(x),h),
+                                          direct_tilbert(sin(x),h))
+                assert_array_almost_equal(tilbert(sin(2*x),h),
+                                          direct_tilbert(sin(2*x),h))
+
+    def test_random_even(self):
+        for h in [0.1,0.5,1,5.5,10]:
+            for n in [32,64,56]:
+                f = random((n,))
+                af = sum(f,axis=0)/n
+                f = f-af
+                assert_almost_equal(sum(f,axis=0),0.0)
+                assert_array_almost_equal(direct_tilbert(direct_itilbert(f,h),h),f)
+
+    def test_random_odd(self):
+        rng = np.random.default_rng(1234)
+        for h in [0.1,0.5,1,5.5,10]:
+            for n in [33,65,55]:
+                f = rng.random((n,))
+                af = sum(f,axis=0)/n
+                f = f-af
+                assert_almost_equal(sum(f,axis=0),0.0)
+                assert_array_almost_equal(itilbert(tilbert(f,h),h),f)
+                assert_array_almost_equal(tilbert(itilbert(f,h),h),f)
+
+
+class TestITilbert:
+
+    def test_definition(self):
+        for h in [0.1,0.5,1,5.5,10]:
+            for n in [16,17,64,127]:
+                x = arange(n)*2*pi/n
+                y = itilbert(sin(x),h)
+                y1 = direct_itilbert(sin(x),h)
+                assert_array_almost_equal(y,y1)
+                assert_array_almost_equal(itilbert(sin(x),h),
+                                          direct_itilbert(sin(x),h))
+                assert_array_almost_equal(itilbert(sin(2*x),h),
+                                          direct_itilbert(sin(2*x),h))
+
+
+class TestHilbert:
+
+    def test_definition(self):
+        for n in [16,17,64,127]:
+            x = arange(n)*2*pi/n
+            y = hilbert(sin(x))
+            y1 = direct_hilbert(sin(x))
+            assert_array_almost_equal(y,y1)
+            assert_array_almost_equal(hilbert(sin(2*x)),
+                                      direct_hilbert(sin(2*x)))
+
+    def test_tilbert_relation(self):
+        for n in [16,17,64,127]:
+            x = arange(n)*2*pi/n
+            f = sin(x)+cos(2*x)*sin(x)
+            y = hilbert(f)
+            y1 = direct_hilbert(f)
+            assert_array_almost_equal(y,y1)
+            y2 = tilbert(f,h=10)
+            assert_array_almost_equal(y,y2)
+
+    def test_random_odd(self):
+        rng = np.random.default_rng(1234)
+        for n in [33,65,55]:
+            f = rng.random((n,))
+            af = sum(f,axis=0)/n
+            f = f-af
+            assert_almost_equal(sum(f,axis=0),0.0)
+            assert_array_almost_equal(ihilbert(hilbert(f)),f)
+            assert_array_almost_equal(hilbert(ihilbert(f)),f)
+
+    def test_random_even(self):
+        rng = np.random.default_rng(1234)
+        for n in [32,64,56]:
+            f = rng.random((n,))
+            af = sum(f,axis=0)/n
+            f = f-af
+            # zeroing Nyquist mode:
+            f = diff(diff(f,1),-1)
+            assert_almost_equal(sum(f,axis=0),0.0)
+            assert_array_almost_equal(direct_hilbert(direct_ihilbert(f)),f)
+            assert_array_almost_equal(hilbert(ihilbert(f)),f)
+
+
+class TestIHilbert:
+
+    def test_definition(self):
+        for n in [16,17,64,127]:
+            x = arange(n)*2*pi/n
+            y = ihilbert(sin(x))
+            y1 = direct_ihilbert(sin(x))
+            assert_array_almost_equal(y,y1)
+            assert_array_almost_equal(ihilbert(sin(2*x)),
+                                      direct_ihilbert(sin(2*x)))
+
+    def test_itilbert_relation(self):
+        for n in [16,17,64,127]:
+            x = arange(n)*2*pi/n
+            f = sin(x)+cos(2*x)*sin(x)
+            y = ihilbert(f)
+            y1 = direct_ihilbert(f)
+            assert_array_almost_equal(y,y1)
+            y2 = itilbert(f,h=10)
+            assert_array_almost_equal(y,y2)
+
+
+class TestShift:
+
+    def test_definition(self):
+        for n in [18,17,64,127,32,2048,256]:
+            x = arange(n)*2*pi/n
+            for a in [0.1,3]:
+                assert_array_almost_equal(shift(sin(x),a),direct_shift(sin(x),a))
+                assert_array_almost_equal(shift(sin(x),a),sin(x+a))
+                assert_array_almost_equal(shift(cos(x),a),cos(x+a))
+                assert_array_almost_equal(shift(cos(2*x)+sin(x),a),
+                                          cos(2*(x+a))+sin(x+a))
+                assert_array_almost_equal(shift(exp(sin(x)),a),exp(sin(x+a)))
+            assert_array_almost_equal(shift(sin(x),2*pi),sin(x))
+            assert_array_almost_equal(shift(sin(x),pi),-sin(x))
+            assert_array_almost_equal(shift(sin(x),pi/2),cos(x))
+
+
+class TestOverwrite:
+    """Check input overwrite behavior """
+
+    real_dtypes = (np.float32, np.float64)
+    dtypes = real_dtypes + (np.complex64, np.complex128)
+
+    def _check(self, x, routine, *args, **kwargs):
+        x2 = x.copy()
+        routine(x2, *args, **kwargs)
+        sig = routine.__name__
+        if args:
+            sig += repr(args)
+        if kwargs:
+            sig += repr(kwargs)
+        assert_equal(x2, x, err_msg=f"spurious overwrite in {sig}")
+
+    def _check_1d(self, routine, dtype, shape, *args, **kwargs):
+        # rng = np.random.default_rng(1234)
+        rng = np.random.RandomState(1234)
+        # np.random.seed(1234)
+        if np.issubdtype(dtype, np.complexfloating):
+            data = rng.randn(*shape) + 1j*rng.randn(*shape)
+        else:
+            data = rng.randn(*shape)
+        data = data.astype(dtype)
+        self._check(data, routine, *args, **kwargs)
+
+    def test_diff(self):
+        for dtype in self.dtypes:
+            self._check_1d(diff, dtype, (16,))
+
+    def test_tilbert(self):
+        for dtype in self.dtypes:
+            self._check_1d(tilbert, dtype, (16,), 1.6)
+
+    def test_itilbert(self):
+        for dtype in self.dtypes:
+            self._check_1d(itilbert, dtype, (16,), 1.6)
+
+    def test_hilbert(self):
+        for dtype in self.dtypes:
+            self._check_1d(hilbert, dtype, (16,))
+
+    def test_cs_diff(self):
+        for dtype in self.dtypes:
+            self._check_1d(cs_diff, dtype, (16,), 1.0, 4.0)
+
+    def test_sc_diff(self):
+        for dtype in self.dtypes:
+            self._check_1d(sc_diff, dtype, (16,), 1.0, 4.0)
+
+    def test_ss_diff(self):
+        for dtype in self.dtypes:
+            self._check_1d(ss_diff, dtype, (16,), 1.0, 4.0)
+
+    def test_cc_diff(self):
+        for dtype in self.dtypes:
+            self._check_1d(cc_diff, dtype, (16,), 1.0, 4.0)
+
+    def test_shift(self):
+        for dtype in self.dtypes:
+            self._check_1d(shift, dtype, (16,), 1.0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_real_transforms.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_real_transforms.py
new file mode 100644
index 0000000000000000000000000000000000000000..876af8f18a312f88c508c6b2ae96f1e5c1dad96d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/fftpack/tests/test_real_transforms.py
@@ -0,0 +1,837 @@
+from os.path import join, dirname
+import threading
+
+import numpy as np
+from numpy.testing import assert_array_almost_equal, assert_equal
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.fftpack._realtransforms import (
+    dct, idct, dst, idst, dctn, idctn, dstn, idstn)
+
+# Matlab reference data
+MDATA = np.load(join(dirname(__file__), 'test.npz'))
+X = [MDATA['x%d' % i] for i in range(8)]
+Y = [MDATA['y%d' % i] for i in range(8)]
+
+# FFTW reference data: the data are organized as follows:
+#    * SIZES is an array containing all available sizes
+#    * for every type (1, 2, 3, 4) and every size, the array dct_type_size
+#    contains the output of the DCT applied to the input np.linspace(0, size-1,
+#    size)
+FFTWDATA_DOUBLE = np.load(join(dirname(__file__), 'fftw_double_ref.npz'))
+FFTWDATA_SINGLE = np.load(join(dirname(__file__), 'fftw_single_ref.npz'))
+FFTWDATA_SIZES = FFTWDATA_DOUBLE['sizes']
+
+
+def fftw_dct_ref(type, size, dt):
+    x = np.linspace(0, size-1, size).astype(dt)
+    dt = np.result_type(np.float32, dt)
+    if dt == np.float64:
+        data = FFTWDATA_DOUBLE
+    elif dt == np.float32:
+        data = FFTWDATA_SINGLE
+    else:
+        raise ValueError()
+    y = (data['dct_%d_%d' % (type, size)]).astype(dt)
+    return x, y, dt
+
+
+def fftw_dst_ref(type, size, dt):
+    x = np.linspace(0, size-1, size).astype(dt)
+    dt = np.result_type(np.float32, dt)
+    if dt == np.float64:
+        data = FFTWDATA_DOUBLE
+    elif dt == np.float32:
+        data = FFTWDATA_SINGLE
+    else:
+        raise ValueError()
+    y = (data['dst_%d_%d' % (type, size)]).astype(dt)
+    return x, y, dt
+
+
+def dct_2d_ref(x, **kwargs):
+    """Calculate reference values for testing dct2."""
+    x = np.array(x, copy=True)
+    for row in range(x.shape[0]):
+        x[row, :] = dct(x[row, :], **kwargs)
+    for col in range(x.shape[1]):
+        x[:, col] = dct(x[:, col], **kwargs)
+    return x
+
+
+def idct_2d_ref(x, **kwargs):
+    """Calculate reference values for testing idct2."""
+    x = np.array(x, copy=True)
+    for row in range(x.shape[0]):
+        x[row, :] = idct(x[row, :], **kwargs)
+    for col in range(x.shape[1]):
+        x[:, col] = idct(x[:, col], **kwargs)
+    return x
+
+
+def dst_2d_ref(x, **kwargs):
+    """Calculate reference values for testing dst2."""
+    x = np.array(x, copy=True)
+    for row in range(x.shape[0]):
+        x[row, :] = dst(x[row, :], **kwargs)
+    for col in range(x.shape[1]):
+        x[:, col] = dst(x[:, col], **kwargs)
+    return x
+
+
+def idst_2d_ref(x, **kwargs):
+    """Calculate reference values for testing idst2."""
+    x = np.array(x, copy=True)
+    for row in range(x.shape[0]):
+        x[row, :] = idst(x[row, :], **kwargs)
+    for col in range(x.shape[1]):
+        x[:, col] = idst(x[:, col], **kwargs)
+    return x
+
+
+def naive_dct1(x, norm=None):
+    """Calculate textbook definition version of DCT-I."""
+    x = np.array(x, copy=True)
+    N = len(x)
+    M = N-1
+    y = np.zeros(N)
+    m0, m = 1, 2
+    if norm == 'ortho':
+        m0 = np.sqrt(1.0/M)
+        m = np.sqrt(2.0/M)
+    for k in range(N):
+        for n in range(1, N-1):
+            y[k] += m*x[n]*np.cos(np.pi*n*k/M)
+        y[k] += m0 * x[0]
+        y[k] += m0 * x[N-1] * (1 if k % 2 == 0 else -1)
+    if norm == 'ortho':
+        y[0] *= 1/np.sqrt(2)
+        y[N-1] *= 1/np.sqrt(2)
+    return y
+
+
+def naive_dst1(x, norm=None):
+    """Calculate textbook definition version  of DST-I."""
+    x = np.array(x, copy=True)
+    N = len(x)
+    M = N+1
+    y = np.zeros(N)
+    for k in range(N):
+        for n in range(N):
+            y[k] += 2*x[n]*np.sin(np.pi*(n+1.0)*(k+1.0)/M)
+    if norm == 'ortho':
+        y *= np.sqrt(0.5/M)
+    return y
+
+
+def naive_dct4(x, norm=None):
+    """Calculate textbook definition version of DCT-IV."""
+    x = np.array(x, copy=True)
+    N = len(x)
+    y = np.zeros(N)
+    for k in range(N):
+        for n in range(N):
+            y[k] += x[n]*np.cos(np.pi*(n+0.5)*(k+0.5)/(N))
+    if norm == 'ortho':
+        y *= np.sqrt(2.0/N)
+    else:
+        y *= 2
+    return y
+
+
+def naive_dst4(x, norm=None):
+    """Calculate textbook definition version of DST-IV."""
+    x = np.array(x, copy=True)
+    N = len(x)
+    y = np.zeros(N)
+    for k in range(N):
+        for n in range(N):
+            y[k] += x[n]*np.sin(np.pi*(n+0.5)*(k+0.5)/(N))
+    if norm == 'ortho':
+        y *= np.sqrt(2.0/N)
+    else:
+        y *= 2
+    return y
+
+
+class TestComplex:
+    def test_dct_complex64(self):
+        y = dct(1j*np.arange(5, dtype=np.complex64))
+        x = 1j*dct(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+    def test_dct_complex(self):
+        y = dct(np.arange(5)*1j)
+        x = 1j*dct(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+    def test_idct_complex(self):
+        y = idct(np.arange(5)*1j)
+        x = 1j*idct(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+    def test_dst_complex64(self):
+        y = dst(np.arange(5, dtype=np.complex64)*1j)
+        x = 1j*dst(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+    def test_dst_complex(self):
+        y = dst(np.arange(5)*1j)
+        x = 1j*dst(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+    def test_idst_complex(self):
+        y = idst(np.arange(5)*1j)
+        x = 1j*idst(np.arange(5))
+        assert_array_almost_equal(x, y)
+
+
+class _TestDCTBase:
+    def setup_method(self):
+        self.rdt = None
+        self.dec = 14
+        self.type = None
+
+    @pytest.fixture
+    def dct_lock(self):
+        return threading.Lock()
+
+    def test_definition(self, dct_lock):
+        for i in FFTWDATA_SIZES:
+            with dct_lock:
+                x, yr, dt = fftw_dct_ref(self.type, i, self.rdt)
+            y = dct(x, type=self.type)
+            assert_equal(y.dtype, dt)
+            # XXX: we divide by np.max(y) because the tests fail otherwise. We
+            # should really use something like assert_array_approx_equal. The
+            # difference is due to fftw using a better algorithm w.r.t error
+            # propagation compared to the ones from fftpack.
+            assert_array_almost_equal(y / np.max(y), yr / np.max(y), decimal=self.dec,
+                    err_msg="Size %d failed" % i)
+
+    def test_axis(self):
+        nt = 2
+        rng = np.random.RandomState(1234)
+        for i in [7, 8, 9, 16, 32, 64]:
+            x = rng.randn(nt, i)
+            y = dct(x, type=self.type)
+            for j in range(nt):
+                assert_array_almost_equal(y[j], dct(x[j], type=self.type),
+                        decimal=self.dec)
+
+            x = x.T
+            y = dct(x, axis=0, type=self.type)
+            for j in range(nt):
+                assert_array_almost_equal(y[:,j], dct(x[:,j], type=self.type),
+                        decimal=self.dec)
+
+
+class _TestDCTIBase(_TestDCTBase):
+    def test_definition_ortho(self):
+        # Test orthornomal mode.
+        dt = np.result_type(np.float32, self.rdt)
+        for xr in X:
+            x = np.array(xr, dtype=self.rdt)
+            y = dct(x, norm='ortho', type=1)
+            y2 = naive_dct1(x, norm='ortho')
+            assert_equal(y.dtype, dt)
+            assert_array_almost_equal(y / np.max(y), y2 / np.max(y), decimal=self.dec)
+
+class _TestDCTIIBase(_TestDCTBase):
+    def test_definition_matlab(self):
+        # Test correspondence with MATLAB (orthornomal mode).
+        dt = np.result_type(np.float32, self.rdt)
+        for xr, yr in zip(X, Y):
+            x = np.array(xr, dtype=dt)
+            y = dct(x, norm="ortho", type=2)
+            assert_equal(y.dtype, dt)
+            assert_array_almost_equal(y, yr, decimal=self.dec)
+
+
+class _TestDCTIIIBase(_TestDCTBase):
+    def test_definition_ortho(self):
+        # Test orthornomal mode.
+        dt = np.result_type(np.float32, self.rdt)
+        for xr in X:
+            x = np.array(xr, dtype=self.rdt)
+            y = dct(x, norm='ortho', type=2)
+            xi = dct(y, norm="ortho", type=3)
+            assert_equal(xi.dtype, dt)
+            assert_array_almost_equal(xi, x, decimal=self.dec)
+
+class _TestDCTIVBase(_TestDCTBase):
+    def test_definition_ortho(self):
+        # Test orthornomal mode.
+        dt = np.result_type(np.float32, self.rdt)
+        for xr in X:
+            x = np.array(xr, dtype=self.rdt)
+            y = dct(x, norm='ortho', type=4)
+            y2 = naive_dct4(x, norm='ortho')
+            assert_equal(y.dtype, dt)
+            assert_array_almost_equal(y / np.max(y), y2 / np.max(y), decimal=self.dec)
+
+
+class TestDCTIDouble(_TestDCTIBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 10
+        self.type = 1
+
+
+class TestDCTIFloat(_TestDCTIBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 4
+        self.type = 1
+
+
+class TestDCTIInt(_TestDCTIBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 1
+
+
+class TestDCTIIDouble(_TestDCTIIBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 10
+        self.type = 2
+
+
+class TestDCTIIFloat(_TestDCTIIBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 2
+
+
+class TestDCTIIInt(_TestDCTIIBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 2
+
+
+class TestDCTIIIDouble(_TestDCTIIIBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 3
+
+
+class TestDCTIIIFloat(_TestDCTIIIBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 3
+
+
+class TestDCTIIIInt(_TestDCTIIIBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 3
+
+
+class TestDCTIVDouble(_TestDCTIVBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 3
+
+
+class TestDCTIVFloat(_TestDCTIVBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 3
+
+
+class TestDCTIVInt(_TestDCTIVBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 3
+
+
+class _TestIDCTBase:
+    def setup_method(self):
+        self.rdt = None
+        self.dec = 14
+        self.type = None
+
+    @pytest.fixture
+    def idct_lock(self):
+        return threading.Lock()
+
+    def test_definition(self, idct_lock):
+        for i in FFTWDATA_SIZES:
+            with idct_lock:
+                xr, yr, dt = fftw_dct_ref(self.type, i, self.rdt)
+            x = idct(yr, type=self.type)
+            if self.type == 1:
+                x /= 2 * (i-1)
+            else:
+                x /= 2 * i
+            assert_equal(x.dtype, dt)
+            # XXX: we divide by np.max(y) because the tests fail otherwise. We
+            # should really use something like assert_array_approx_equal. The
+            # difference is due to fftw using a better algorithm w.r.t error
+            # propagation compared to the ones from fftpack.
+            assert_array_almost_equal(x / np.max(x), xr / np.max(x), decimal=self.dec,
+                    err_msg="Size %d failed" % i)
+
+
+class TestIDCTIDouble(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 10
+        self.type = 1
+
+
+class TestIDCTIFloat(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 4
+        self.type = 1
+
+
+class TestIDCTIInt(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 4
+        self.type = 1
+
+
+class TestIDCTIIDouble(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 10
+        self.type = 2
+
+
+class TestIDCTIIFloat(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 2
+
+
+class TestIDCTIIInt(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 2
+
+
+class TestIDCTIIIDouble(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 3
+
+
+class TestIDCTIIIFloat(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 3
+
+
+class TestIDCTIIIInt(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 3
+
+class TestIDCTIVDouble(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 4
+
+
+class TestIDCTIVFloat(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 5
+        self.type = 4
+
+
+class TestIDCTIVInt(_TestIDCTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 4
+
+class _TestDSTBase:
+    def setup_method(self):
+        self.rdt = None  # dtype
+        self.dec = None  # number of decimals to match
+        self.type = None  # dst type
+
+    @pytest.fixture
+    def dst_lock(self):
+        return threading.Lock()
+
+    def test_definition(self, dst_lock):
+        for i in FFTWDATA_SIZES:
+            with dst_lock:
+                xr, yr, dt = fftw_dst_ref(self.type, i, self.rdt)
+            y = dst(xr, type=self.type)
+            assert_equal(y.dtype, dt)
+            # XXX: we divide by np.max(y) because the tests fail otherwise. We
+            # should really use something like assert_array_approx_equal. The
+            # difference is due to fftw using a better algorithm w.r.t error
+            # propagation compared to the ones from fftpack.
+            assert_array_almost_equal(y / np.max(y), yr / np.max(y), decimal=self.dec,
+                    err_msg="Size %d failed" % i)
+
+
+class _TestDSTIBase(_TestDSTBase):
+    def test_definition_ortho(self):
+        # Test orthornomal mode.
+        dt = np.result_type(np.float32, self.rdt)
+        for xr in X:
+            x = np.array(xr, dtype=self.rdt)
+            y = dst(x, norm='ortho', type=1)
+            y2 = naive_dst1(x, norm='ortho')
+            assert_equal(y.dtype, dt)
+            assert_array_almost_equal(y / np.max(y), y2 / np.max(y), decimal=self.dec)
+
+class _TestDSTIVBase(_TestDSTBase):
+    def test_definition_ortho(self):
+        # Test orthornomal mode.
+        dt = np.result_type(np.float32, self.rdt)
+        for xr in X:
+            x = np.array(xr, dtype=self.rdt)
+            y = dst(x, norm='ortho', type=4)
+            y2 = naive_dst4(x, norm='ortho')
+            assert_equal(y.dtype, dt)
+            assert_array_almost_equal(y, y2, decimal=self.dec)
+
+class TestDSTIDouble(_TestDSTIBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 1
+
+
+class TestDSTIFloat(_TestDSTIBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 4
+        self.type = 1
+
+
+class TestDSTIInt(_TestDSTIBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 1
+
+
+class TestDSTIIDouble(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 2
+
+
+class TestDSTIIFloat(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 6
+        self.type = 2
+
+
+class TestDSTIIInt(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 6
+        self.type = 2
+
+
+class TestDSTIIIDouble(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 3
+
+
+class TestDSTIIIFloat(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 7
+        self.type = 3
+
+
+class TestDSTIIIInt(_TestDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 7
+        self.type = 3
+
+
+class TestDSTIVDouble(_TestDSTIVBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 4
+
+
+class TestDSTIVFloat(_TestDSTIVBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 4
+        self.type = 4
+
+
+class TestDSTIVInt(_TestDSTIVBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 5
+        self.type = 4
+
+
+class _TestIDSTBase:
+    def setup_method(self):
+        self.rdt = None
+        self.dec = None
+        self.type = None
+
+    @pytest.fixture
+    def idst_lock(self):
+        return threading.Lock()
+
+    def test_definition(self, idst_lock):
+        for i in FFTWDATA_SIZES:
+            with idst_lock:
+                xr, yr, dt = fftw_dst_ref(self.type, i, self.rdt)
+            x = idst(yr, type=self.type)
+            if self.type == 1:
+                x /= 2 * (i+1)
+            else:
+                x /= 2 * i
+            assert_equal(x.dtype, dt)
+            # XXX: we divide by np.max(x) because the tests fail otherwise. We
+            # should really use something like assert_array_approx_equal. The
+            # difference is due to fftw using a better algorithm w.r.t error
+            # propagation compared to the ones from fftpack.
+            assert_array_almost_equal(x / np.max(x), xr / np.max(x), decimal=self.dec,
+                    err_msg="Size %d failed" % i)
+
+
+class TestIDSTIDouble(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 1
+
+
+class TestIDSTIFloat(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 4
+        self.type = 1
+
+
+class TestIDSTIInt(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 4
+        self.type = 1
+
+
+class TestIDSTIIDouble(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 2
+
+
+class TestIDSTIIFloat(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 6
+        self.type = 2
+
+
+class TestIDSTIIInt(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 6
+        self.type = 2
+
+
+class TestIDSTIIIDouble(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 14
+        self.type = 3
+
+
+class TestIDSTIIIFloat(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 6
+        self.type = 3
+
+
+class TestIDSTIIIInt(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 6
+        self.type = 3
+
+
+class TestIDSTIVDouble(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float64
+        self.dec = 12
+        self.type = 4
+
+
+class TestIDSTIVFloat(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = np.float32
+        self.dec = 6
+        self.type = 4
+
+
+class TestIDSTIVnt(_TestIDSTBase):
+    def setup_method(self):
+        self.rdt = int
+        self.dec = 6
+        self.type = 4
+
+
+class TestOverwrite:
+    """Check input overwrite behavior."""
+
+    real_dtypes = [np.float32, np.float64]
+
+    def _check(self, x, routine, type, fftsize, axis, norm, overwrite_x, **kw):
+        x2 = x.copy()
+        routine(x2, type, fftsize, axis, norm, overwrite_x=overwrite_x)
+
+        sig = (f"{routine.__name__}({x.dtype}{x.shape!r}, {fftsize!r}, "
+               f"axis={axis!r}, overwrite_x={overwrite_x!r})")
+        if not overwrite_x:
+            assert_equal(x2, x, err_msg=f"spurious overwrite in {sig}")
+
+    def _check_1d(self, routine, dtype, shape, axis):
+        rng = np.random.RandomState(1234)
+        if np.issubdtype(dtype, np.complexfloating):
+            data = rng.randn(*shape) + 1j*rng.randn(*shape)
+        else:
+            data = rng.randn(*shape)
+        data = data.astype(dtype)
+
+        for type in [1, 2, 3, 4]:
+            for overwrite_x in [True, False]:
+                for norm in [None, 'ortho']:
+                    self._check(data, routine, type, None, axis, norm,
+                                overwrite_x)
+
+    def test_dct(self):
+        for dtype in self.real_dtypes:
+            self._check_1d(dct, dtype, (16,), -1)
+            self._check_1d(dct, dtype, (16, 2), 0)
+            self._check_1d(dct, dtype, (2, 16), 1)
+
+    def test_idct(self):
+        for dtype in self.real_dtypes:
+            self._check_1d(idct, dtype, (16,), -1)
+            self._check_1d(idct, dtype, (16, 2), 0)
+            self._check_1d(idct, dtype, (2, 16), 1)
+
+    def test_dst(self):
+        for dtype in self.real_dtypes:
+            self._check_1d(dst, dtype, (16,), -1)
+            self._check_1d(dst, dtype, (16, 2), 0)
+            self._check_1d(dst, dtype, (2, 16), 1)
+
+    def test_idst(self):
+        for dtype in self.real_dtypes:
+            self._check_1d(idst, dtype, (16,), -1)
+            self._check_1d(idst, dtype, (16, 2), 0)
+            self._check_1d(idst, dtype, (2, 16), 1)
+
+
+class Test_DCTN_IDCTN:
+    dec = 14
+    dct_type = [1, 2, 3, 4]
+    norms = [None, 'ortho']
+    rstate = np.random.RandomState(1234)
+    shape = (32, 16)
+    data = rstate.randn(*shape)
+
+    @pytest.mark.parametrize('fforward,finverse', [(dctn, idctn),
+                                                   (dstn, idstn)])
+    @pytest.mark.parametrize('axes', [None,
+                                      1, (1,), [1],
+                                      0, (0,), [0],
+                                      (0, 1), [0, 1],
+                                      (-2, -1), [-2, -1]])
+    @pytest.mark.parametrize('dct_type', dct_type)
+    @pytest.mark.parametrize('norm', ['ortho'])
+    def test_axes_round_trip(self, fforward, finverse, axes, dct_type, norm):
+        tmp = fforward(self.data, type=dct_type, axes=axes, norm=norm)
+        tmp = finverse(tmp, type=dct_type, axes=axes, norm=norm)
+        assert_array_almost_equal(self.data, tmp, decimal=12)
+
+    @pytest.mark.parametrize('fforward,fforward_ref', [(dctn, dct_2d_ref),
+                                                       (dstn, dst_2d_ref)])
+    @pytest.mark.parametrize('dct_type', dct_type)
+    @pytest.mark.parametrize('norm', norms)
+    def test_dctn_vs_2d_reference(self, fforward, fforward_ref,
+                                  dct_type, norm):
+        y1 = fforward(self.data, type=dct_type, axes=None, norm=norm)
+        y2 = fforward_ref(self.data, type=dct_type, norm=norm)
+        assert_array_almost_equal(y1, y2, decimal=11)
+
+    @pytest.mark.parametrize('finverse,finverse_ref', [(idctn, idct_2d_ref),
+                                                       (idstn, idst_2d_ref)])
+    @pytest.mark.parametrize('dct_type', dct_type)
+    @pytest.mark.parametrize('norm', [None, 'ortho'])
+    def test_idctn_vs_2d_reference(self, finverse, finverse_ref,
+                                   dct_type, norm):
+        fdata = dctn(self.data, type=dct_type, norm=norm)
+        y1 = finverse(fdata, type=dct_type, norm=norm)
+        y2 = finverse_ref(fdata, type=dct_type, norm=norm)
+        assert_array_almost_equal(y1, y2, decimal=11)
+
+    @pytest.mark.parametrize('fforward,finverse', [(dctn, idctn),
+                                                   (dstn, idstn)])
+    def test_axes_and_shape(self, fforward, finverse):
+        with assert_raises(ValueError,
+                           match="when given, axes and shape arguments"
+                           " have to be of the same length"):
+            fforward(self.data, shape=self.data.shape[0], axes=(0, 1))
+
+        with assert_raises(ValueError,
+                           match="when given, axes and shape arguments"
+                           " have to be of the same length"):
+            fforward(self.data, shape=self.data.shape[0], axes=None)
+
+        with assert_raises(ValueError,
+                           match="when given, axes and shape arguments"
+                           " have to be of the same length"):
+            fforward(self.data, shape=self.data.shape, axes=0)
+
+    @pytest.mark.parametrize('fforward', [dctn, dstn])
+    def test_shape(self, fforward):
+        tmp = fforward(self.data, shape=(128, 128), axes=None)
+        assert_equal(tmp.shape, (128, 128))
+
+    @pytest.mark.parametrize('fforward,finverse', [(dctn, idctn),
+                                                   (dstn, idstn)])
+    @pytest.mark.parametrize('axes', [1, (1,), [1],
+                                      0, (0,), [0]])
+    def test_shape_is_none_with_axes(self, fforward, finverse, axes):
+        tmp = fforward(self.data, shape=None, axes=axes, norm='ortho')
+        tmp = finverse(tmp, shape=None, axes=axes, norm='ortho')
+        assert_array_almost_equal(self.data, tmp, decimal=self.dec)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..1533b5c60b695fce0abf08e2163dfba3bdd4fb17
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__init__.py
@@ -0,0 +1,122 @@
+"""
+=============================================
+Integration and ODEs (:mod:`scipy.integrate`)
+=============================================
+
+.. currentmodule:: scipy.integrate
+
+Integrating functions, given function object
+============================================
+
+.. autosummary::
+   :toctree: generated/
+
+   quad          -- General purpose integration
+   quad_vec      -- General purpose integration of vector-valued functions
+   cubature      -- General purpose multi-dimensional integration of array-valued functions
+   dblquad       -- General purpose double integration
+   tplquad       -- General purpose triple integration
+   nquad         -- General purpose N-D integration
+   tanhsinh      -- General purpose elementwise integration
+   fixed_quad    -- Integrate func(x) using Gaussian quadrature of order n
+   newton_cotes  -- Weights and error coefficient for Newton-Cotes integration
+   lebedev_rule
+   qmc_quad      -- N-D integration using Quasi-Monte Carlo quadrature
+   IntegrationWarning -- Warning on issues during integration
+
+
+Integrating functions, given fixed samples
+==========================================
+
+.. autosummary::
+   :toctree: generated/
+
+   trapezoid            -- Use trapezoidal rule to compute integral.
+   cumulative_trapezoid -- Use trapezoidal rule to cumulatively compute integral.
+   simpson              -- Use Simpson's rule to compute integral from samples.
+   cumulative_simpson   -- Use Simpson's rule to cumulatively compute integral from samples.
+   romb                 -- Use Romberg Integration to compute integral from
+                        -- (2**k + 1) evenly-spaced samples.
+
+.. seealso::
+
+   :mod:`scipy.special` for orthogonal polynomials (special) for Gaussian
+   quadrature roots and weights for other weighting factors and regions.
+
+Summation
+=========
+
+.. autosummary::
+   :toctree: generated/
+
+   nsum
+
+Solving initial value problems for ODE systems
+==============================================
+
+The solvers are implemented as individual classes, which can be used directly
+(low-level usage) or through a convenience function.
+
+.. autosummary::
+   :toctree: generated/
+
+   solve_ivp     -- Convenient function for ODE integration.
+   RK23          -- Explicit Runge-Kutta solver of order 3(2).
+   RK45          -- Explicit Runge-Kutta solver of order 5(4).
+   DOP853        -- Explicit Runge-Kutta solver of order 8.
+   Radau         -- Implicit Runge-Kutta solver of order 5.
+   BDF           -- Implicit multi-step variable order (1 to 5) solver.
+   LSODA         -- LSODA solver from ODEPACK Fortran package.
+   OdeSolver     -- Base class for ODE solvers.
+   DenseOutput   -- Local interpolant for computing a dense output.
+   OdeSolution   -- Class which represents a continuous ODE solution.
+
+
+Old API
+-------
+
+These are the routines developed earlier for SciPy. They wrap older solvers
+implemented in Fortran (mostly ODEPACK). While the interface to them is not
+particularly convenient and certain features are missing compared to the new
+API, the solvers themselves are of good quality and work fast as compiled
+Fortran code. In some cases, it might be worth using this old API.
+
+.. autosummary::
+   :toctree: generated/
+
+   odeint        -- General integration of ordinary differential equations.
+   ode           -- Integrate ODE using VODE and ZVODE routines.
+   complex_ode   -- Convert a complex-valued ODE to real-valued and integrate.
+   ODEintWarning -- Warning raised during the execution of `odeint`.
+
+
+Solving boundary value problems for ODE systems
+===============================================
+
+.. autosummary::
+   :toctree: generated/
+
+   solve_bvp     -- Solve a boundary value problem for a system of ODEs.
+"""  # noqa: E501
+
+
+from ._quadrature import *
+from ._odepack_py import *
+from ._quadpack_py import *
+from ._ode import *
+from ._bvp import solve_bvp
+from ._ivp import (solve_ivp, OdeSolution, DenseOutput,
+                   OdeSolver, RK23, RK45, DOP853, Radau, BDF, LSODA)
+from ._quad_vec import quad_vec
+from ._tanhsinh import nsum, tanhsinh
+from ._cubature import cubature
+from ._lebedev import lebedev_rule
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import dop, lsoda, vode, odepack, quadpack
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..286ec9d5d697959e5044d952bdce4f088891ee23
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_bvp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_bvp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a0439caf8e312057e65bff86d062ca72b8edf178
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_bvp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_cubature.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_cubature.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2d5293ade6e119b6019a35672848e712d38bec1d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_cubature.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_ode.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_ode.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7d2331257df694a09059a1af5f2ebc04b42d174d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_ode.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_odepack_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_odepack_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..43427e4c1132c89b101110c3c9cdda417ac07084
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_odepack_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quad_vec.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quad_vec.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a446232d86bd75a712a8c51400c907aab2b0619c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quad_vec.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadpack_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadpack_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9e8ef7c24d7ef47ba9e51b11b53c13999dc0cc47
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadpack_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadrature.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadrature.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3a1bb276c7263cfb6312f0b6402dbe54d99a85a1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_quadrature.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_tanhsinh.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_tanhsinh.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c6a070bd6603d672fdce929b4c3d37a5ff717e1b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/_tanhsinh.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/dop.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/dop.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..009bbd437799daba7a1ad672b2adbda23ee0806a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/dop.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/lsoda.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/lsoda.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8f9c819c63509cf75cf34fd371c3e183cea3fb33
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/lsoda.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/odepack.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/odepack.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6ef9201b008f3867925dd3762eda3e438d058542
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/odepack.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/quadpack.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/quadpack.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3183058339e4a34d5b92acefb0564b623aa44f27
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/quadpack.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/vode.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/vode.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..954fd00f8927ab21a8efc79765e75878b5330c8b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/__pycache__/vode.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_bvp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_bvp.py
new file mode 100644
index 0000000000000000000000000000000000000000..74406c89a689edc3de21fcb7274c90d41b8d2dcc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_bvp.py
@@ -0,0 +1,1154 @@
+"""Boundary value problem solver."""
+from warnings import warn
+
+import numpy as np
+from numpy.linalg import pinv
+
+from scipy.sparse import coo_matrix, csc_matrix
+from scipy.sparse.linalg import splu
+from scipy.optimize import OptimizeResult
+
+
+EPS = np.finfo(float).eps
+
+
+def estimate_fun_jac(fun, x, y, p, f0=None):
+    """Estimate derivatives of an ODE system rhs with forward differences.
+
+    Returns
+    -------
+    df_dy : ndarray, shape (n, n, m)
+        Derivatives with respect to y. An element (i, j, q) corresponds to
+        d f_i(x_q, y_q) / d (y_q)_j.
+    df_dp : ndarray with shape (n, k, m) or None
+        Derivatives with respect to p. An element (i, j, q) corresponds to
+        d f_i(x_q, y_q, p) / d p_j. If `p` is empty, None is returned.
+    """
+    n, m = y.shape
+    if f0 is None:
+        f0 = fun(x, y, p)
+
+    dtype = y.dtype
+
+    df_dy = np.empty((n, n, m), dtype=dtype)
+    h = EPS**0.5 * (1 + np.abs(y))
+    for i in range(n):
+        y_new = y.copy()
+        y_new[i] += h[i]
+        hi = y_new[i] - y[i]
+        f_new = fun(x, y_new, p)
+        df_dy[:, i, :] = (f_new - f0) / hi
+
+    k = p.shape[0]
+    if k == 0:
+        df_dp = None
+    else:
+        df_dp = np.empty((n, k, m), dtype=dtype)
+        h = EPS**0.5 * (1 + np.abs(p))
+        for i in range(k):
+            p_new = p.copy()
+            p_new[i] += h[i]
+            hi = p_new[i] - p[i]
+            f_new = fun(x, y, p_new)
+            df_dp[:, i, :] = (f_new - f0) / hi
+
+    return df_dy, df_dp
+
+
+def estimate_bc_jac(bc, ya, yb, p, bc0=None):
+    """Estimate derivatives of boundary conditions with forward differences.
+
+    Returns
+    -------
+    dbc_dya : ndarray, shape (n + k, n)
+        Derivatives with respect to ya. An element (i, j) corresponds to
+        d bc_i / d ya_j.
+    dbc_dyb : ndarray, shape (n + k, n)
+        Derivatives with respect to yb. An element (i, j) corresponds to
+        d bc_i / d ya_j.
+    dbc_dp : ndarray with shape (n + k, k) or None
+        Derivatives with respect to p. An element (i, j) corresponds to
+        d bc_i / d p_j. If `p` is empty, None is returned.
+    """
+    n = ya.shape[0]
+    k = p.shape[0]
+
+    if bc0 is None:
+        bc0 = bc(ya, yb, p)
+
+    dtype = ya.dtype
+
+    dbc_dya = np.empty((n, n + k), dtype=dtype)
+    h = EPS**0.5 * (1 + np.abs(ya))
+    for i in range(n):
+        ya_new = ya.copy()
+        ya_new[i] += h[i]
+        hi = ya_new[i] - ya[i]
+        bc_new = bc(ya_new, yb, p)
+        dbc_dya[i] = (bc_new - bc0) / hi
+    dbc_dya = dbc_dya.T
+
+    h = EPS**0.5 * (1 + np.abs(yb))
+    dbc_dyb = np.empty((n, n + k), dtype=dtype)
+    for i in range(n):
+        yb_new = yb.copy()
+        yb_new[i] += h[i]
+        hi = yb_new[i] - yb[i]
+        bc_new = bc(ya, yb_new, p)
+        dbc_dyb[i] = (bc_new - bc0) / hi
+    dbc_dyb = dbc_dyb.T
+
+    if k == 0:
+        dbc_dp = None
+    else:
+        h = EPS**0.5 * (1 + np.abs(p))
+        dbc_dp = np.empty((k, n + k), dtype=dtype)
+        for i in range(k):
+            p_new = p.copy()
+            p_new[i] += h[i]
+            hi = p_new[i] - p[i]
+            bc_new = bc(ya, yb, p_new)
+            dbc_dp[i] = (bc_new - bc0) / hi
+        dbc_dp = dbc_dp.T
+
+    return dbc_dya, dbc_dyb, dbc_dp
+
+
+def compute_jac_indices(n, m, k):
+    """Compute indices for the collocation system Jacobian construction.
+
+    See `construct_global_jac` for the explanation.
+    """
+    i_col = np.repeat(np.arange((m - 1) * n), n)
+    j_col = (np.tile(np.arange(n), n * (m - 1)) +
+             np.repeat(np.arange(m - 1) * n, n**2))
+
+    i_bc = np.repeat(np.arange((m - 1) * n, m * n + k), n)
+    j_bc = np.tile(np.arange(n), n + k)
+
+    i_p_col = np.repeat(np.arange((m - 1) * n), k)
+    j_p_col = np.tile(np.arange(m * n, m * n + k), (m - 1) * n)
+
+    i_p_bc = np.repeat(np.arange((m - 1) * n, m * n + k), k)
+    j_p_bc = np.tile(np.arange(m * n, m * n + k), n + k)
+
+    i = np.hstack((i_col, i_col, i_bc, i_bc, i_p_col, i_p_bc))
+    j = np.hstack((j_col, j_col + n,
+                   j_bc, j_bc + (m - 1) * n,
+                   j_p_col, j_p_bc))
+
+    return i, j
+
+
+def stacked_matmul(a, b):
+    """Stacked matrix multiply: out[i,:,:] = np.dot(a[i,:,:], b[i,:,:]).
+
+    Empirical optimization. Use outer Python loop and BLAS for large
+    matrices, otherwise use a single einsum call.
+    """
+    if a.shape[1] > 50:
+        out = np.empty((a.shape[0], a.shape[1], b.shape[2]))
+        for i in range(a.shape[0]):
+            out[i] = np.dot(a[i], b[i])
+        return out
+    else:
+        return np.einsum('...ij,...jk->...ik', a, b)
+
+
+def construct_global_jac(n, m, k, i_jac, j_jac, h, df_dy, df_dy_middle, df_dp,
+                         df_dp_middle, dbc_dya, dbc_dyb, dbc_dp):
+    """Construct the Jacobian of the collocation system.
+
+    There are n * m + k functions: m - 1 collocations residuals, each
+    containing n components, followed by n + k boundary condition residuals.
+
+    There are n * m + k variables: m vectors of y, each containing n
+    components, followed by k values of vector p.
+
+    For example, let m = 4, n = 2 and k = 1, then the Jacobian will have
+    the following sparsity structure:
+
+        1 1 2 2 0 0 0 0  5
+        1 1 2 2 0 0 0 0  5
+        0 0 1 1 2 2 0 0  5
+        0 0 1 1 2 2 0 0  5
+        0 0 0 0 1 1 2 2  5
+        0 0 0 0 1 1 2 2  5
+
+        3 3 0 0 0 0 4 4  6
+        3 3 0 0 0 0 4 4  6
+        3 3 0 0 0 0 4 4  6
+
+    Zeros denote identically zero values, other values denote different kinds
+    of blocks in the matrix (see below). The blank row indicates the separation
+    of collocation residuals from boundary conditions. And the blank column
+    indicates the separation of y values from p values.
+
+    Refer to [1]_  (p. 306) for the formula of n x n blocks for derivatives
+    of collocation residuals with respect to y.
+
+    Parameters
+    ----------
+    n : int
+        Number of equations in the ODE system.
+    m : int
+        Number of nodes in the mesh.
+    k : int
+        Number of the unknown parameters.
+    i_jac, j_jac : ndarray
+        Row and column indices returned by `compute_jac_indices`. They
+        represent different blocks in the Jacobian matrix in the following
+        order (see the scheme above):
+
+            * 1: m - 1 diagonal n x n blocks for the collocation residuals.
+            * 2: m - 1 off-diagonal n x n blocks for the collocation residuals.
+            * 3 : (n + k) x n block for the dependency of the boundary
+              conditions on ya.
+            * 4: (n + k) x n block for the dependency of the boundary
+              conditions on yb.
+            * 5: (m - 1) * n x k block for the dependency of the collocation
+              residuals on p.
+            * 6: (n + k) x k block for the dependency of the boundary
+              conditions on p.
+
+    df_dy : ndarray, shape (n, n, m)
+        Jacobian of f with respect to y computed at the mesh nodes.
+    df_dy_middle : ndarray, shape (n, n, m - 1)
+        Jacobian of f with respect to y computed at the middle between the
+        mesh nodes.
+    df_dp : ndarray with shape (n, k, m) or None
+        Jacobian of f with respect to p computed at the mesh nodes.
+    df_dp_middle : ndarray with shape (n, k, m - 1) or None
+        Jacobian of f with respect to p computed at the middle between the
+        mesh nodes.
+    dbc_dya, dbc_dyb : ndarray, shape (n, n)
+        Jacobian of bc with respect to ya and yb.
+    dbc_dp : ndarray with shape (n, k) or None
+        Jacobian of bc with respect to p.
+
+    Returns
+    -------
+    J : csc_matrix, shape (n * m + k, n * m + k)
+        Jacobian of the collocation system in a sparse form.
+
+    References
+    ----------
+    .. [1] J. Kierzenka, L. F. Shampine, "A BVP Solver Based on Residual
+       Control and the Maltab PSE", ACM Trans. Math. Softw., Vol. 27,
+       Number 3, pp. 299-316, 2001.
+    """
+    df_dy = np.transpose(df_dy, (2, 0, 1))
+    df_dy_middle = np.transpose(df_dy_middle, (2, 0, 1))
+
+    h = h[:, np.newaxis, np.newaxis]
+
+    dtype = df_dy.dtype
+
+    # Computing diagonal n x n blocks.
+    dPhi_dy_0 = np.empty((m - 1, n, n), dtype=dtype)
+    dPhi_dy_0[:] = -np.identity(n)
+    dPhi_dy_0 -= h / 6 * (df_dy[:-1] + 2 * df_dy_middle)
+    T = stacked_matmul(df_dy_middle, df_dy[:-1])
+    dPhi_dy_0 -= h**2 / 12 * T
+
+    # Computing off-diagonal n x n blocks.
+    dPhi_dy_1 = np.empty((m - 1, n, n), dtype=dtype)
+    dPhi_dy_1[:] = np.identity(n)
+    dPhi_dy_1 -= h / 6 * (df_dy[1:] + 2 * df_dy_middle)
+    T = stacked_matmul(df_dy_middle, df_dy[1:])
+    dPhi_dy_1 += h**2 / 12 * T
+
+    values = np.hstack((dPhi_dy_0.ravel(), dPhi_dy_1.ravel(), dbc_dya.ravel(),
+                        dbc_dyb.ravel()))
+
+    if k > 0:
+        df_dp = np.transpose(df_dp, (2, 0, 1))
+        df_dp_middle = np.transpose(df_dp_middle, (2, 0, 1))
+        T = stacked_matmul(df_dy_middle, df_dp[:-1] - df_dp[1:])
+        df_dp_middle += 0.125 * h * T
+        dPhi_dp = -h/6 * (df_dp[:-1] + df_dp[1:] + 4 * df_dp_middle)
+        values = np.hstack((values, dPhi_dp.ravel(), dbc_dp.ravel()))
+
+    J = coo_matrix((values, (i_jac, j_jac)))
+    return csc_matrix(J)
+
+
+def collocation_fun(fun, y, p, x, h):
+    """Evaluate collocation residuals.
+
+    This function lies in the core of the method. The solution is sought
+    as a cubic C1 continuous spline with derivatives matching the ODE rhs
+    at given nodes `x`. Collocation conditions are formed from the equality
+    of the spline derivatives and rhs of the ODE system in the middle points
+    between nodes.
+
+    Such method is classified to Lobbato IIIA family in ODE literature.
+    Refer to [1]_ for the formula and some discussion.
+
+    Returns
+    -------
+    col_res : ndarray, shape (n, m - 1)
+        Collocation residuals at the middle points of the mesh intervals.
+    y_middle : ndarray, shape (n, m - 1)
+        Values of the cubic spline evaluated at the middle points of the mesh
+        intervals.
+    f : ndarray, shape (n, m)
+        RHS of the ODE system evaluated at the mesh nodes.
+    f_middle : ndarray, shape (n, m - 1)
+        RHS of the ODE system evaluated at the middle points of the mesh
+        intervals (and using `y_middle`).
+
+    References
+    ----------
+    .. [1] J. Kierzenka, L. F. Shampine, "A BVP Solver Based on Residual
+           Control and the Maltab PSE", ACM Trans. Math. Softw., Vol. 27,
+           Number 3, pp. 299-316, 2001.
+    """
+    f = fun(x, y, p)
+    y_middle = (0.5 * (y[:, 1:] + y[:, :-1]) -
+                0.125 * h * (f[:, 1:] - f[:, :-1]))
+    f_middle = fun(x[:-1] + 0.5 * h, y_middle, p)
+    col_res = y[:, 1:] - y[:, :-1] - h / 6 * (f[:, :-1] + f[:, 1:] +
+                                              4 * f_middle)
+
+    return col_res, y_middle, f, f_middle
+
+
+def prepare_sys(n, m, k, fun, bc, fun_jac, bc_jac, x, h):
+    """Create the function and the Jacobian for the collocation system."""
+    x_middle = x[:-1] + 0.5 * h
+    i_jac, j_jac = compute_jac_indices(n, m, k)
+
+    def col_fun(y, p):
+        return collocation_fun(fun, y, p, x, h)
+
+    def sys_jac(y, p, y_middle, f, f_middle, bc0):
+        if fun_jac is None:
+            df_dy, df_dp = estimate_fun_jac(fun, x, y, p, f)
+            df_dy_middle, df_dp_middle = estimate_fun_jac(
+                fun, x_middle, y_middle, p, f_middle)
+        else:
+            df_dy, df_dp = fun_jac(x, y, p)
+            df_dy_middle, df_dp_middle = fun_jac(x_middle, y_middle, p)
+
+        if bc_jac is None:
+            dbc_dya, dbc_dyb, dbc_dp = estimate_bc_jac(bc, y[:, 0], y[:, -1],
+                                                       p, bc0)
+        else:
+            dbc_dya, dbc_dyb, dbc_dp = bc_jac(y[:, 0], y[:, -1], p)
+
+        return construct_global_jac(n, m, k, i_jac, j_jac, h, df_dy,
+                                    df_dy_middle, df_dp, df_dp_middle, dbc_dya,
+                                    dbc_dyb, dbc_dp)
+
+    return col_fun, sys_jac
+
+
+def solve_newton(n, m, h, col_fun, bc, jac, y, p, B, bvp_tol, bc_tol):
+    """Solve the nonlinear collocation system by a Newton method.
+
+    This is a simple Newton method with a backtracking line search. As
+    advised in [1]_, an affine-invariant criterion function F = ||J^-1 r||^2
+    is used, where J is the Jacobian matrix at the current iteration and r is
+    the vector or collocation residuals (values of the system lhs).
+
+    The method alters between full Newton iterations and the fixed-Jacobian
+    iterations based
+
+    There are other tricks proposed in [1]_, but they are not used as they
+    don't seem to improve anything significantly, and even break the
+    convergence on some test problems I tried.
+
+    All important parameters of the algorithm are defined inside the function.
+
+    Parameters
+    ----------
+    n : int
+        Number of equations in the ODE system.
+    m : int
+        Number of nodes in the mesh.
+    h : ndarray, shape (m-1,)
+        Mesh intervals.
+    col_fun : callable
+        Function computing collocation residuals.
+    bc : callable
+        Function computing boundary condition residuals.
+    jac : callable
+        Function computing the Jacobian of the whole system (including
+        collocation and boundary condition residuals). It is supposed to
+        return csc_matrix.
+    y : ndarray, shape (n, m)
+        Initial guess for the function values at the mesh nodes.
+    p : ndarray, shape (k,)
+        Initial guess for the unknown parameters.
+    B : ndarray with shape (n, n) or None
+        Matrix to force the S y(a) = 0 condition for a problems with the
+        singular term. If None, the singular term is assumed to be absent.
+    bvp_tol : float
+        Tolerance to which we want to solve a BVP.
+    bc_tol : float
+        Tolerance to which we want to satisfy the boundary conditions.
+
+    Returns
+    -------
+    y : ndarray, shape (n, m)
+        Final iterate for the function values at the mesh nodes.
+    p : ndarray, shape (k,)
+        Final iterate for the unknown parameters.
+    singular : bool
+        True, if the LU decomposition failed because Jacobian turned out
+        to be singular.
+
+    References
+    ----------
+    .. [1]  U. Ascher, R. Mattheij and R. Russell "Numerical Solution of
+       Boundary Value Problems for Ordinary Differential Equations"
+    """
+    # We know that the solution residuals at the middle points of the mesh
+    # are connected with collocation residuals  r_middle = 1.5 * col_res / h.
+    # As our BVP solver tries to decrease relative residuals below a certain
+    # tolerance, it seems reasonable to terminated Newton iterations by
+    # comparison of r_middle / (1 + np.abs(f_middle)) with a certain threshold,
+    # which we choose to be 1.5 orders lower than the BVP tolerance. We rewrite
+    # the condition as col_res < tol_r * (1 + np.abs(f_middle)), then tol_r
+    # should be computed as follows:
+    tol_r = 2/3 * h * 5e-2 * bvp_tol
+
+    # Maximum allowed number of Jacobian evaluation and factorization, in
+    # other words, the maximum number of full Newton iterations. A small value
+    # is recommended in the literature.
+    max_njev = 4
+
+    # Maximum number of iterations, considering that some of them can be
+    # performed with the fixed Jacobian. In theory, such iterations are cheap,
+    # but it's not that simple in Python.
+    max_iter = 8
+
+    # Minimum relative improvement of the criterion function to accept the
+    # step (Armijo constant).
+    sigma = 0.2
+
+    # Step size decrease factor for backtracking.
+    tau = 0.5
+
+    # Maximum number of backtracking steps, the minimum step is then
+    # tau ** n_trial.
+    n_trial = 4
+
+    col_res, y_middle, f, f_middle = col_fun(y, p)
+    bc_res = bc(y[:, 0], y[:, -1], p)
+    res = np.hstack((col_res.ravel(order='F'), bc_res))
+
+    njev = 0
+    singular = False
+    recompute_jac = True
+    for iteration in range(max_iter):
+        if recompute_jac:
+            J = jac(y, p, y_middle, f, f_middle, bc_res)
+            njev += 1
+            try:
+                LU = splu(J)
+            except RuntimeError:
+                singular = True
+                break
+
+            step = LU.solve(res)
+            cost = np.dot(step, step)
+
+        y_step = step[:m * n].reshape((n, m), order='F')
+        p_step = step[m * n:]
+
+        alpha = 1
+        for trial in range(n_trial + 1):
+            y_new = y - alpha * y_step
+            if B is not None:
+                y_new[:, 0] = np.dot(B, y_new[:, 0])
+            p_new = p - alpha * p_step
+
+            col_res, y_middle, f, f_middle = col_fun(y_new, p_new)
+            bc_res = bc(y_new[:, 0], y_new[:, -1], p_new)
+            res = np.hstack((col_res.ravel(order='F'), bc_res))
+
+            step_new = LU.solve(res)
+            cost_new = np.dot(step_new, step_new)
+            if cost_new < (1 - 2 * alpha * sigma) * cost:
+                break
+
+            if trial < n_trial:
+                alpha *= tau
+
+        y = y_new
+        p = p_new
+
+        if njev == max_njev:
+            break
+
+        if (np.all(np.abs(col_res) < tol_r * (1 + np.abs(f_middle))) and
+                np.all(np.abs(bc_res) < bc_tol)):
+            break
+
+        # If the full step was taken, then we are going to continue with
+        # the same Jacobian. This is the approach of BVP_SOLVER.
+        if alpha == 1:
+            step = step_new
+            cost = cost_new
+            recompute_jac = False
+        else:
+            recompute_jac = True
+
+    return y, p, singular
+
+
+def print_iteration_header():
+    print(f"{'Iteration':^15}{'Max residual':^15}{'Max BC residual':^15}"
+          f"{'Total nodes':^15}{'Nodes added':^15}")
+
+
+def print_iteration_progress(iteration, residual, bc_residual, total_nodes,
+                             nodes_added):
+    print(f"{iteration:^15}{residual:^15.2e}{bc_residual:^15.2e}"
+          f"{total_nodes:^15}{nodes_added:^15}")
+
+
+class BVPResult(OptimizeResult):
+    pass
+
+
+TERMINATION_MESSAGES = {
+    0: "The algorithm converged to the desired accuracy.",
+    1: "The maximum number of mesh nodes is exceeded.",
+    2: "A singular Jacobian encountered when solving the collocation system.",
+    3: "The solver was unable to satisfy boundary conditions tolerance on iteration 10."
+}
+
+
+def estimate_rms_residuals(fun, sol, x, h, p, r_middle, f_middle):
+    """Estimate rms values of collocation residuals using Lobatto quadrature.
+
+    The residuals are defined as the difference between the derivatives of
+    our solution and rhs of the ODE system. We use relative residuals, i.e.,
+    normalized by 1 + np.abs(f). RMS values are computed as sqrt from the
+    normalized integrals of the squared relative residuals over each interval.
+    Integrals are estimated using 5-point Lobatto quadrature [1]_, we use the
+    fact that residuals at the mesh nodes are identically zero.
+
+    In [2] they don't normalize integrals by interval lengths, which gives
+    a higher rate of convergence of the residuals by the factor of h**0.5.
+    I chose to do such normalization for an ease of interpretation of return
+    values as RMS estimates.
+
+    Returns
+    -------
+    rms_res : ndarray, shape (m - 1,)
+        Estimated rms values of the relative residuals over each interval.
+
+    References
+    ----------
+    .. [1] http://mathworld.wolfram.com/LobattoQuadrature.html
+    .. [2] J. Kierzenka, L. F. Shampine, "A BVP Solver Based on Residual
+       Control and the Maltab PSE", ACM Trans. Math. Softw., Vol. 27,
+       Number 3, pp. 299-316, 2001.
+    """
+    x_middle = x[:-1] + 0.5 * h
+    s = 0.5 * h * (3/7)**0.5
+    x1 = x_middle + s
+    x2 = x_middle - s
+    y1 = sol(x1)
+    y2 = sol(x2)
+    y1_prime = sol(x1, 1)
+    y2_prime = sol(x2, 1)
+    f1 = fun(x1, y1, p)
+    f2 = fun(x2, y2, p)
+    r1 = y1_prime - f1
+    r2 = y2_prime - f2
+
+    r_middle /= 1 + np.abs(f_middle)
+    r1 /= 1 + np.abs(f1)
+    r2 /= 1 + np.abs(f2)
+
+    r1 = np.sum(np.real(r1 * np.conj(r1)), axis=0)
+    r2 = np.sum(np.real(r2 * np.conj(r2)), axis=0)
+    r_middle = np.sum(np.real(r_middle * np.conj(r_middle)), axis=0)
+
+    return (0.5 * (32 / 45 * r_middle + 49 / 90 * (r1 + r2))) ** 0.5
+
+
+def create_spline(y, yp, x, h):
+    """Create a cubic spline given values and derivatives.
+
+    Formulas for the coefficients are taken from interpolate.CubicSpline.
+
+    Returns
+    -------
+    sol : PPoly
+        Constructed spline as a PPoly instance.
+    """
+    from scipy.interpolate import PPoly
+
+    n, m = y.shape
+    c = np.empty((4, n, m - 1), dtype=y.dtype)
+    slope = (y[:, 1:] - y[:, :-1]) / h
+    t = (yp[:, :-1] + yp[:, 1:] - 2 * slope) / h
+    c[0] = t / h
+    c[1] = (slope - yp[:, :-1]) / h - t
+    c[2] = yp[:, :-1]
+    c[3] = y[:, :-1]
+    c = np.moveaxis(c, 1, 0)
+
+    return PPoly(c, x, extrapolate=True, axis=1)
+
+
+def modify_mesh(x, insert_1, insert_2):
+    """Insert nodes into a mesh.
+
+    Nodes removal logic is not established, its impact on the solver is
+    presumably negligible. So, only insertion is done in this function.
+
+    Parameters
+    ----------
+    x : ndarray, shape (m,)
+        Mesh nodes.
+    insert_1 : ndarray
+        Intervals to each insert 1 new node in the middle.
+    insert_2 : ndarray
+        Intervals to each insert 2 new nodes, such that divide an interval
+        into 3 equal parts.
+
+    Returns
+    -------
+    x_new : ndarray
+        New mesh nodes.
+
+    Notes
+    -----
+    `insert_1` and `insert_2` should not have common values.
+    """
+    # Because np.insert implementation apparently varies with a version of
+    # NumPy, we use a simple and reliable approach with sorting.
+    return np.sort(np.hstack((
+        x,
+        0.5 * (x[insert_1] + x[insert_1 + 1]),
+        (2 * x[insert_2] + x[insert_2 + 1]) / 3,
+        (x[insert_2] + 2 * x[insert_2 + 1]) / 3
+    )))
+
+
+def wrap_functions(fun, bc, fun_jac, bc_jac, k, a, S, D, dtype):
+    """Wrap functions for unified usage in the solver."""
+    if fun_jac is None:
+        fun_jac_wrapped = None
+
+    if bc_jac is None:
+        bc_jac_wrapped = None
+
+    if k == 0:
+        def fun_p(x, y, _):
+            return np.asarray(fun(x, y), dtype)
+
+        def bc_wrapped(ya, yb, _):
+            return np.asarray(bc(ya, yb), dtype)
+
+        if fun_jac is not None:
+            def fun_jac_p(x, y, _):
+                return np.asarray(fun_jac(x, y), dtype), None
+
+        if bc_jac is not None:
+            def bc_jac_wrapped(ya, yb, _):
+                dbc_dya, dbc_dyb = bc_jac(ya, yb)
+                return (np.asarray(dbc_dya, dtype),
+                        np.asarray(dbc_dyb, dtype), None)
+    else:
+        def fun_p(x, y, p):
+            return np.asarray(fun(x, y, p), dtype)
+
+        def bc_wrapped(x, y, p):
+            return np.asarray(bc(x, y, p), dtype)
+
+        if fun_jac is not None:
+            def fun_jac_p(x, y, p):
+                df_dy, df_dp = fun_jac(x, y, p)
+                return np.asarray(df_dy, dtype), np.asarray(df_dp, dtype)
+
+        if bc_jac is not None:
+            def bc_jac_wrapped(ya, yb, p):
+                dbc_dya, dbc_dyb, dbc_dp = bc_jac(ya, yb, p)
+                return (np.asarray(dbc_dya, dtype), np.asarray(dbc_dyb, dtype),
+                        np.asarray(dbc_dp, dtype))
+
+    if S is None:
+        fun_wrapped = fun_p
+    else:
+        def fun_wrapped(x, y, p):
+            f = fun_p(x, y, p)
+            if x[0] == a:
+                f[:, 0] = np.dot(D, f[:, 0])
+                f[:, 1:] += np.dot(S, y[:, 1:]) / (x[1:] - a)
+            else:
+                f += np.dot(S, y) / (x - a)
+            return f
+
+    if fun_jac is not None:
+        if S is None:
+            fun_jac_wrapped = fun_jac_p
+        else:
+            Sr = S[:, :, np.newaxis]
+
+            def fun_jac_wrapped(x, y, p):
+                df_dy, df_dp = fun_jac_p(x, y, p)
+                if x[0] == a:
+                    df_dy[:, :, 0] = np.dot(D, df_dy[:, :, 0])
+                    df_dy[:, :, 1:] += Sr / (x[1:] - a)
+                else:
+                    df_dy += Sr / (x - a)
+
+                return df_dy, df_dp
+
+    return fun_wrapped, bc_wrapped, fun_jac_wrapped, bc_jac_wrapped
+
+
+def solve_bvp(fun, bc, x, y, p=None, S=None, fun_jac=None, bc_jac=None,
+              tol=1e-3, max_nodes=1000, verbose=0, bc_tol=None):
+    """Solve a boundary value problem for a system of ODEs.
+
+    This function numerically solves a first order system of ODEs subject to
+    two-point boundary conditions::
+
+        dy / dx = f(x, y, p) + S * y / (x - a), a <= x <= b
+        bc(y(a), y(b), p) = 0
+
+    Here x is a 1-D independent variable, y(x) is an n-D
+    vector-valued function and p is a k-D vector of unknown
+    parameters which is to be found along with y(x). For the problem to be
+    determined, there must be n + k boundary conditions, i.e., bc must be an
+    (n + k)-D function.
+
+    The last singular term on the right-hand side of the system is optional.
+    It is defined by an n-by-n matrix S, such that the solution must satisfy
+    S y(a) = 0. This condition will be forced during iterations, so it must not
+    contradict boundary conditions. See [2]_ for the explanation how this term
+    is handled when solving BVPs numerically.
+
+    Problems in a complex domain can be solved as well. In this case, y and p
+    are considered to be complex, and f and bc are assumed to be complex-valued
+    functions, but x stays real. Note that f and bc must be complex
+    differentiable (satisfy Cauchy-Riemann equations [4]_), otherwise you
+    should rewrite your problem for real and imaginary parts separately. To
+    solve a problem in a complex domain, pass an initial guess for y with a
+    complex data type (see below).
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system. The calling signature is ``fun(x, y)``,
+        or ``fun(x, y, p)`` if parameters are present. All arguments are
+        ndarray: ``x`` with shape (m,), ``y`` with shape (n, m), meaning that
+        ``y[:, i]`` corresponds to ``x[i]``, and ``p`` with shape (k,). The
+        return value must be an array with shape (n, m) and with the same
+        layout as ``y``.
+    bc : callable
+        Function evaluating residuals of the boundary conditions. The calling
+        signature is ``bc(ya, yb)``, or ``bc(ya, yb, p)`` if parameters are
+        present. All arguments are ndarray: ``ya`` and ``yb`` with shape (n,),
+        and ``p`` with shape (k,). The return value must be an array with
+        shape (n + k,).
+    x : array_like, shape (m,)
+        Initial mesh. Must be a strictly increasing sequence of real numbers
+        with ``x[0]=a`` and ``x[-1]=b``.
+    y : array_like, shape (n, m)
+        Initial guess for the function values at the mesh nodes, ith column
+        corresponds to ``x[i]``. For problems in a complex domain pass `y`
+        with a complex data type (even if the initial guess is purely real).
+    p : array_like with shape (k,) or None, optional
+        Initial guess for the unknown parameters. If None (default), it is
+        assumed that the problem doesn't depend on any parameters.
+    S : array_like with shape (n, n) or None
+        Matrix defining the singular term. If None (default), the problem is
+        solved without the singular term.
+    fun_jac : callable or None, optional
+        Function computing derivatives of f with respect to y and p. The
+        calling signature is ``fun_jac(x, y)``, or ``fun_jac(x, y, p)`` if
+        parameters are present. The return must contain 1 or 2 elements in the
+        following order:
+
+            * df_dy : array_like with shape (n, n, m), where an element
+              (i, j, q) equals to d f_i(x_q, y_q, p) / d (y_q)_j.
+            * df_dp : array_like with shape (n, k, m), where an element
+              (i, j, q) equals to d f_i(x_q, y_q, p) / d p_j.
+
+        Here q numbers nodes at which x and y are defined, whereas i and j
+        number vector components. If the problem is solved without unknown
+        parameters, df_dp should not be returned.
+
+        If `fun_jac` is None (default), the derivatives will be estimated
+        by the forward finite differences.
+    bc_jac : callable or None, optional
+        Function computing derivatives of bc with respect to ya, yb, and p.
+        The calling signature is ``bc_jac(ya, yb)``, or ``bc_jac(ya, yb, p)``
+        if parameters are present. The return must contain 2 or 3 elements in
+        the following order:
+
+            * dbc_dya : array_like with shape (n, n), where an element (i, j)
+              equals to d bc_i(ya, yb, p) / d ya_j.
+            * dbc_dyb : array_like with shape (n, n), where an element (i, j)
+              equals to d bc_i(ya, yb, p) / d yb_j.
+            * dbc_dp : array_like with shape (n, k), where an element (i, j)
+              equals to d bc_i(ya, yb, p) / d p_j.
+
+        If the problem is solved without unknown parameters, dbc_dp should not
+        be returned.
+
+        If `bc_jac` is None (default), the derivatives will be estimated by
+        the forward finite differences.
+    tol : float, optional
+        Desired tolerance of the solution. If we define ``r = y' - f(x, y)``,
+        where y is the found solution, then the solver tries to achieve on each
+        mesh interval ``norm(r / (1 + abs(f)) < tol``, where ``norm`` is
+        estimated in a root mean squared sense (using a numerical quadrature
+        formula). Default is 1e-3.
+    max_nodes : int, optional
+        Maximum allowed number of the mesh nodes. If exceeded, the algorithm
+        terminates. Default is 1000.
+    verbose : {0, 1, 2}, optional
+        Level of algorithm's verbosity:
+
+            * 0 (default) : work silently.
+            * 1 : display a termination report.
+            * 2 : display progress during iterations.
+    bc_tol : float, optional
+        Desired absolute tolerance for the boundary condition residuals: `bc`
+        value should satisfy ``abs(bc) < bc_tol`` component-wise.
+        Equals to `tol` by default. Up to 10 iterations are allowed to achieve this
+        tolerance.
+
+    Returns
+    -------
+    Bunch object with the following fields defined:
+    sol : PPoly
+        Found solution for y as `scipy.interpolate.PPoly` instance, a C1
+        continuous cubic spline.
+    p : ndarray or None, shape (k,)
+        Found parameters. None, if the parameters were not present in the
+        problem.
+    x : ndarray, shape (m,)
+        Nodes of the final mesh.
+    y : ndarray, shape (n, m)
+        Solution values at the mesh nodes.
+    yp : ndarray, shape (n, m)
+        Solution derivatives at the mesh nodes.
+    rms_residuals : ndarray, shape (m - 1,)
+        RMS values of the relative residuals over each mesh interval (see the
+        description of `tol` parameter).
+    niter : int
+        Number of completed iterations.
+    status : int
+        Reason for algorithm termination:
+
+            * 0: The algorithm converged to the desired accuracy.
+            * 1: The maximum number of mesh nodes is exceeded.
+            * 2: A singular Jacobian encountered when solving the collocation
+              system.
+
+    message : string
+        Verbal description of the termination reason.
+    success : bool
+        True if the algorithm converged to the desired accuracy (``status=0``).
+
+    Notes
+    -----
+    This function implements a 4th order collocation algorithm with the
+    control of residuals similar to [1]_. A collocation system is solved
+    by a damped Newton method with an affine-invariant criterion function as
+    described in [3]_.
+
+    Note that in [1]_  integral residuals are defined without normalization
+    by interval lengths. So, their definition is different by a multiplier of
+    h**0.5 (h is an interval length) from the definition used here.
+
+    .. versionadded:: 0.18.0
+
+    References
+    ----------
+    .. [1] J. Kierzenka, L. F. Shampine, "A BVP Solver Based on Residual
+           Control and the Maltab PSE", ACM Trans. Math. Softw., Vol. 27,
+           Number 3, pp. 299-316, 2001.
+    .. [2] L.F. Shampine, P. H. Muir and H. Xu, "A User-Friendly Fortran BVP
+           Solver".
+    .. [3] U. Ascher, R. Mattheij and R. Russell "Numerical Solution of
+           Boundary Value Problems for Ordinary Differential Equations".
+    .. [4] `Cauchy-Riemann equations
+            `_ on
+            Wikipedia.
+
+    Examples
+    --------
+    In the first example, we solve Bratu's problem::
+
+        y'' + k * exp(y) = 0
+        y(0) = y(1) = 0
+
+    for k = 1.
+
+    We rewrite the equation as a first-order system and implement its
+    right-hand side evaluation::
+
+        y1' = y2
+        y2' = -exp(y1)
+
+    >>> import numpy as np
+    >>> def fun(x, y):
+    ...     return np.vstack((y[1], -np.exp(y[0])))
+
+    Implement evaluation of the boundary condition residuals:
+
+    >>> def bc(ya, yb):
+    ...     return np.array([ya[0], yb[0]])
+
+    Define the initial mesh with 5 nodes:
+
+    >>> x = np.linspace(0, 1, 5)
+
+    This problem is known to have two solutions. To obtain both of them, we
+    use two different initial guesses for y. We denote them by subscripts
+    a and b.
+
+    >>> y_a = np.zeros((2, x.size))
+    >>> y_b = np.zeros((2, x.size))
+    >>> y_b[0] = 3
+
+    Now we are ready to run the solver.
+
+    >>> from scipy.integrate import solve_bvp
+    >>> res_a = solve_bvp(fun, bc, x, y_a)
+    >>> res_b = solve_bvp(fun, bc, x, y_b)
+
+    Let's plot the two found solutions. We take an advantage of having the
+    solution in a spline form to produce a smooth plot.
+
+    >>> x_plot = np.linspace(0, 1, 100)
+    >>> y_plot_a = res_a.sol(x_plot)[0]
+    >>> y_plot_b = res_b.sol(x_plot)[0]
+    >>> import matplotlib.pyplot as plt
+    >>> plt.plot(x_plot, y_plot_a, label='y_a')
+    >>> plt.plot(x_plot, y_plot_b, label='y_b')
+    >>> plt.legend()
+    >>> plt.xlabel("x")
+    >>> plt.ylabel("y")
+    >>> plt.show()
+
+    We see that the two solutions have similar shape, but differ in scale
+    significantly.
+
+    In the second example, we solve a simple Sturm-Liouville problem::
+
+        y'' + k**2 * y = 0
+        y(0) = y(1) = 0
+
+    It is known that a non-trivial solution y = A * sin(k * x) is possible for
+    k = pi * n, where n is an integer. To establish the normalization constant
+    A = 1 we add a boundary condition::
+
+        y'(0) = k
+
+    Again, we rewrite our equation as a first-order system and implement its
+    right-hand side evaluation::
+
+        y1' = y2
+        y2' = -k**2 * y1
+
+    >>> def fun(x, y, p):
+    ...     k = p[0]
+    ...     return np.vstack((y[1], -k**2 * y[0]))
+
+    Note that parameters p are passed as a vector (with one element in our
+    case).
+
+    Implement the boundary conditions:
+
+    >>> def bc(ya, yb, p):
+    ...     k = p[0]
+    ...     return np.array([ya[0], yb[0], ya[1] - k])
+
+    Set up the initial mesh and guess for y. We aim to find the solution for
+    k = 2 * pi, to achieve that we set values of y to approximately follow
+    sin(2 * pi * x):
+
+    >>> x = np.linspace(0, 1, 5)
+    >>> y = np.zeros((2, x.size))
+    >>> y[0, 1] = 1
+    >>> y[0, 3] = -1
+
+    Run the solver with 6 as an initial guess for k.
+
+    >>> sol = solve_bvp(fun, bc, x, y, p=[6])
+
+    We see that the found k is approximately correct:
+
+    >>> sol.p[0]
+    6.28329460046
+
+    And, finally, plot the solution to see the anticipated sinusoid:
+
+    >>> x_plot = np.linspace(0, 1, 100)
+    >>> y_plot = sol.sol(x_plot)[0]
+    >>> plt.plot(x_plot, y_plot)
+    >>> plt.xlabel("x")
+    >>> plt.ylabel("y")
+    >>> plt.show()
+    """
+    x = np.asarray(x, dtype=float)
+    if x.ndim != 1:
+        raise ValueError("`x` must be 1 dimensional.")
+    h = np.diff(x)
+    if np.any(h <= 0):
+        raise ValueError("`x` must be strictly increasing.")
+    a = x[0]
+
+    y = np.asarray(y)
+    if np.issubdtype(y.dtype, np.complexfloating):
+        dtype = complex
+    else:
+        dtype = float
+    y = y.astype(dtype, copy=False)
+
+    if y.ndim != 2:
+        raise ValueError("`y` must be 2 dimensional.")
+    if y.shape[1] != x.shape[0]:
+        raise ValueError(f"`y` is expected to have {x.shape[0]} columns, but actually "
+                         f"has {y.shape[1]}.")
+
+    if p is None:
+        p = np.array([])
+    else:
+        p = np.asarray(p, dtype=dtype)
+    if p.ndim != 1:
+        raise ValueError("`p` must be 1 dimensional.")
+
+    if tol < 100 * EPS:
+        warn(f"`tol` is too low, setting to {100 * EPS:.2e}", stacklevel=2)
+        tol = 100 * EPS
+
+    if verbose not in [0, 1, 2]:
+        raise ValueError("`verbose` must be in [0, 1, 2].")
+
+    n = y.shape[0]
+    k = p.shape[0]
+
+    if S is not None:
+        S = np.asarray(S, dtype=dtype)
+        if S.shape != (n, n):
+            raise ValueError(f"`S` is expected to have shape {(n, n)}, "
+                             f"but actually has {S.shape}")
+
+        # Compute I - S^+ S to impose necessary boundary conditions.
+        B = np.identity(n) - np.dot(pinv(S), S)
+
+        y[:, 0] = np.dot(B, y[:, 0])
+
+        # Compute (I - S)^+ to correct derivatives at x=a.
+        D = pinv(np.identity(n) - S)
+    else:
+        B = None
+        D = None
+
+    if bc_tol is None:
+        bc_tol = tol
+
+    # Maximum number of iterations
+    max_iteration = 10
+
+    fun_wrapped, bc_wrapped, fun_jac_wrapped, bc_jac_wrapped = wrap_functions(
+        fun, bc, fun_jac, bc_jac, k, a, S, D, dtype)
+
+    f = fun_wrapped(x, y, p)
+    if f.shape != y.shape:
+        raise ValueError(f"`fun` return is expected to have shape {y.shape}, "
+                         f"but actually has {f.shape}.")
+
+    bc_res = bc_wrapped(y[:, 0], y[:, -1], p)
+    if bc_res.shape != (n + k,):
+        raise ValueError(f"`bc` return is expected to have shape {(n + k,)}, "
+                         f"but actually has {bc_res.shape}.")
+
+    status = 0
+    iteration = 0
+    if verbose == 2:
+        print_iteration_header()
+
+    while True:
+        m = x.shape[0]
+
+        col_fun, jac_sys = prepare_sys(n, m, k, fun_wrapped, bc_wrapped,
+                                       fun_jac_wrapped, bc_jac_wrapped, x, h)
+        y, p, singular = solve_newton(n, m, h, col_fun, bc_wrapped, jac_sys,
+                                      y, p, B, tol, bc_tol)
+        iteration += 1
+
+        col_res, y_middle, f, f_middle = collocation_fun(fun_wrapped, y,
+                                                         p, x, h)
+        bc_res = bc_wrapped(y[:, 0], y[:, -1], p)
+        max_bc_res = np.max(abs(bc_res))
+
+        # This relation is not trivial, but can be verified.
+        r_middle = 1.5 * col_res / h
+        sol = create_spline(y, f, x, h)
+        rms_res = estimate_rms_residuals(fun_wrapped, sol, x, h, p,
+                                         r_middle, f_middle)
+        max_rms_res = np.max(rms_res)
+
+        if singular:
+            status = 2
+            break
+
+        insert_1, = np.nonzero((rms_res > tol) & (rms_res < 100 * tol))
+        insert_2, = np.nonzero(rms_res >= 100 * tol)
+        nodes_added = insert_1.shape[0] + 2 * insert_2.shape[0]
+
+        if m + nodes_added > max_nodes:
+            status = 1
+            if verbose == 2:
+                nodes_added = f"({nodes_added})"
+                print_iteration_progress(iteration, max_rms_res, max_bc_res,
+                                         m, nodes_added)
+            break
+
+        if verbose == 2:
+            print_iteration_progress(iteration, max_rms_res, max_bc_res, m,
+                                     nodes_added)
+
+        if nodes_added > 0:
+            x = modify_mesh(x, insert_1, insert_2)
+            h = np.diff(x)
+            y = sol(x)
+        elif max_bc_res <= bc_tol:
+            status = 0
+            break
+        elif iteration >= max_iteration:
+            status = 3
+            break
+
+    if verbose > 0:
+        if status == 0:
+            print(f"Solved in {iteration} iterations, number of nodes {x.shape[0]}. \n"
+                  f"Maximum relative residual: {max_rms_res:.2e} \n"
+                  f"Maximum boundary residual: {max_bc_res:.2e}")
+        elif status == 1:
+            print(f"Number of nodes is exceeded after iteration {iteration}. \n"
+                  f"Maximum relative residual: {max_rms_res:.2e} \n"
+                  f"Maximum boundary residual: {max_bc_res:.2e}")
+        elif status == 2:
+            print("Singular Jacobian encountered when solving the collocation "
+                  f"system on iteration {iteration}. \n"
+                  f"Maximum relative residual: {max_rms_res:.2e} \n"
+                  f"Maximum boundary residual: {max_bc_res:.2e}")
+        elif status == 3:
+            print("The solver was unable to satisfy boundary conditions "
+                  f"tolerance on iteration {iteration}. \n"
+                  f"Maximum relative residual: {max_rms_res:.2e} \n"
+                  f"Maximum boundary residual: {max_bc_res:.2e}")
+
+    if p.size == 0:
+        p = None
+
+    return BVPResult(sol=sol, p=p, x=x, y=y, yp=f, rms_residuals=rms_res,
+                     niter=iteration, status=status,
+                     message=TERMINATION_MESSAGES[status], success=status == 0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_cubature.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_cubature.py
new file mode 100644
index 0000000000000000000000000000000000000000..3e6d8911d13eeaa2420ef65a12e9b4ba34400ca0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_cubature.py
@@ -0,0 +1,728 @@
+import math
+import heapq
+import itertools
+
+from dataclasses import dataclass, field
+from types import ModuleType
+from typing import Any, TypeAlias
+
+from scipy._lib._array_api import (
+    array_namespace,
+    xp_size,
+    xp_copy,
+    xp_broadcast_promote
+)
+from scipy._lib._util import MapWrapper
+
+from scipy.integrate._rules import (
+    ProductNestedFixed,
+    GaussKronrodQuadrature,
+    GenzMalikCubature,
+)
+from scipy.integrate._rules._base import _split_subregion
+
+__all__ = ['cubature']
+
+Array: TypeAlias = Any  # To be changed to an array-api-typing Protocol later
+
+
+@dataclass
+class CubatureRegion:
+    estimate: Array
+    error: Array
+    a: Array
+    b: Array
+    _xp: ModuleType = field(repr=False)
+
+    def __lt__(self, other):
+        # Consider regions with higher error estimates as being "less than" regions with
+        # lower order estimates, so that regions with high error estimates are placed at
+        # the top of the heap.
+
+        this_err = self._xp.max(self._xp.abs(self.error))
+        other_err = self._xp.max(self._xp.abs(other.error))
+
+        return this_err > other_err
+
+
+@dataclass
+class CubatureResult:
+    estimate: Array
+    error: Array
+    status: str
+    regions: list[CubatureRegion]
+    subdivisions: int
+    atol: float
+    rtol: float
+
+
+def cubature(f, a, b, *, rule="gk21", rtol=1e-8, atol=0, max_subdivisions=10000,
+             args=(), workers=1, points=None):
+    r"""
+    Adaptive cubature of multidimensional array-valued function.
+
+    Given an arbitrary integration rule, this function returns an estimate of the
+    integral to the requested tolerance over the region defined by the arrays `a` and
+    `b` specifying the corners of a hypercube.
+
+    Convergence is not guaranteed for all integrals.
+
+    Parameters
+    ----------
+    f : callable
+        Function to integrate. `f` must have the signature::
+
+            f(x : ndarray, *args) -> ndarray
+
+        `f` should accept arrays ``x`` of shape::
+
+            (npoints, ndim)
+
+        and output arrays of shape::
+
+            (npoints, output_dim_1, ..., output_dim_n)
+
+        In this case, `cubature` will return arrays of shape::
+
+            (output_dim_1, ..., output_dim_n)
+    a, b : array_like
+        Lower and upper limits of integration as 1D arrays specifying the left and right
+        endpoints of the intervals being integrated over. Limits can be infinite.
+    rule : str, optional
+        Rule used to estimate the integral. If passing a string, the options are
+        "gauss-kronrod" (21 node), or "genz-malik" (degree 7). If a rule like
+        "gauss-kronrod" is specified for an ``n``-dim integrand, the corresponding
+        Cartesian product rule is used. "gk21", "gk15" are also supported for
+        compatibility with `quad_vec`. See Notes.
+    rtol, atol : float, optional
+        Relative and absolute tolerances. Iterations are performed until the error is
+        estimated to be less than ``atol + rtol * abs(est)``. Here `rtol` controls
+        relative accuracy (number of correct digits), while `atol` controls absolute
+        accuracy (number of correct decimal places). To achieve the desired `rtol`, set
+        `atol` to be smaller than the smallest value that can be expected from
+        ``rtol * abs(y)`` so that `rtol` dominates the allowable error. If `atol` is
+        larger than ``rtol * abs(y)`` the number of correct digits is not guaranteed.
+        Conversely, to achieve the desired `atol`, set `rtol` such that
+        ``rtol * abs(y)`` is always smaller than `atol`. Default values are 1e-8 for
+        `rtol` and 0 for `atol`.
+    max_subdivisions : int, optional
+        Upper bound on the number of subdivisions to perform. Default is 10,000.
+    args : tuple, optional
+        Additional positional args passed to `f`, if any.
+    workers : int or map-like callable, optional
+        If `workers` is an integer, part of the computation is done in parallel
+        subdivided to this many tasks (using :class:`python:multiprocessing.pool.Pool`).
+        Supply `-1` to use all cores available to the Process. Alternatively, supply a
+        map-like callable, such as :meth:`python:multiprocessing.pool.Pool.map` for
+        evaluating the population in parallel. This evaluation is carried out as
+        ``workers(func, iterable)``.
+    points : list of array_like, optional
+        List of points to avoid evaluating `f` at, under the condition that the rule
+        being used does not evaluate `f` on the boundary of a region (which is the
+        case for all Genz-Malik and Gauss-Kronrod rules). This can be useful if `f` has
+        a singularity at the specified point. This should be a list of array-likes where
+        each element has length ``ndim``. Default is empty. See Examples.
+
+    Returns
+    -------
+    res : object
+        Object containing the results of the estimation. It has the following
+        attributes:
+
+        estimate : ndarray
+            Estimate of the value of the integral over the overall region specified.
+        error : ndarray
+            Estimate of the error of the approximation over the overall region
+            specified.
+        status : str
+            Whether the estimation was successful. Can be either: "converged",
+            "not_converged".
+        subdivisions : int
+            Number of subdivisions performed.
+        atol, rtol : float
+            Requested tolerances for the approximation.
+        regions: list of object
+            List of objects containing the estimates of the integral over smaller
+            regions of the domain.
+
+        Each object in ``regions`` has the following attributes:
+
+        a, b : ndarray
+            Points describing the corners of the region. If the original integral
+            contained infinite limits or was over a region described by `region`,
+            then `a` and `b` are in the transformed coordinates.
+        estimate : ndarray
+            Estimate of the value of the integral over this region.
+        error : ndarray
+            Estimate of the error of the approximation over this region.
+
+    Notes
+    -----
+    The algorithm uses a similar algorithm to `quad_vec`, which itself is based on the
+    implementation of QUADPACK's DQAG* algorithms, implementing global error control and
+    adaptive subdivision.
+
+    The source of the nodes and weights used for Gauss-Kronrod quadrature can be found
+    in [1]_, and the algorithm for calculating the nodes and weights in Genz-Malik
+    cubature can be found in [2]_.
+
+    The rules currently supported via the `rule` argument are:
+
+    - ``"gauss-kronrod"``, 21-node Gauss-Kronrod
+    - ``"genz-malik"``, n-node Genz-Malik
+
+    If using Gauss-Kronrod for an ``n``-dim integrand where ``n > 2``, then the
+    corresponding Cartesian product rule will be found by taking the Cartesian product
+    of the nodes in the 1D case. This means that the number of nodes scales
+    exponentially as ``21^n`` in the Gauss-Kronrod case, which may be problematic in a
+    moderate number of dimensions.
+
+    Genz-Malik is typically less accurate than Gauss-Kronrod but has much fewer nodes,
+    so in this situation using "genz-malik" might be preferable.
+
+    Infinite limits are handled with an appropriate variable transformation. Assuming
+    ``a = [a_1, ..., a_n]`` and ``b = [b_1, ..., b_n]``:
+
+    If :math:`a_i = -\infty` and :math:`b_i = \infty`, the i-th integration variable
+    will use the transformation :math:`x = \frac{1-|t|}{t}` and :math:`t \in (-1, 1)`.
+
+    If :math:`a_i \ne \pm\infty` and :math:`b_i = \infty`, the i-th integration variable
+    will use the transformation :math:`x = a_i + \frac{1-t}{t}` and
+    :math:`t \in (0, 1)`.
+
+    If :math:`a_i = -\infty` and :math:`b_i \ne \pm\infty`, the i-th integration
+    variable will use the transformation :math:`x = b_i - \frac{1-t}{t}` and
+    :math:`t \in (0, 1)`.
+
+    References
+    ----------
+    .. [1] R. Piessens, E. de Doncker, Quadpack: A Subroutine Package for Automatic
+        Integration, files: dqk21.f, dqk15.f (1983).
+
+    .. [2] A.C. Genz, A.A. Malik, Remarks on algorithm 006: An adaptive algorithm for
+        numerical integration over an N-dimensional rectangular region, Journal of
+        Computational and Applied Mathematics, Volume 6, Issue 4, 1980, Pages 295-302,
+        ISSN 0377-0427
+        :doi:`10.1016/0771-050X(80)90039-X`
+
+    Examples
+    --------
+    **1D integral with vector output**:
+
+    .. math::
+
+        \int^1_0 \mathbf f(x) \text dx
+
+    Where ``f(x) = x^n`` and ``n = np.arange(10)`` is a vector. Since no rule is
+    specified, the default "gk21" is used, which corresponds to Gauss-Kronrod
+    integration with 21 nodes.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> def f(x, n):
+    ...    # Make sure x and n are broadcastable
+    ...    return x[:, np.newaxis]**n[np.newaxis, :]
+    >>> res = cubature(
+    ...     f,
+    ...     a=[0],
+    ...     b=[1],
+    ...     args=(np.arange(10),),
+    ... )
+    >>> res.estimate
+     array([1.        , 0.5       , 0.33333333, 0.25      , 0.2       ,
+            0.16666667, 0.14285714, 0.125     , 0.11111111, 0.1       ])
+
+    **7D integral with arbitrary-shaped array output**::
+
+        f(x) = cos(2*pi*r + alphas @ x)
+
+    for some ``r`` and ``alphas``, and the integral is performed over the unit
+    hybercube, :math:`[0, 1]^7`. Since the integral is in a moderate number of
+    dimensions, "genz-malik" is used rather than the default "gauss-kronrod" to
+    avoid constructing a product rule with :math:`21^7 \approx 2 \times 10^9` nodes.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> def f(x, r, alphas):
+    ...     # f(x) = cos(2*pi*r + alphas @ x)
+    ...     # Need to allow r and alphas to be arbitrary shape
+    ...     npoints, ndim = x.shape[0], x.shape[-1]
+    ...     alphas = alphas[np.newaxis, ...]
+    ...     x = x.reshape(npoints, *([1]*(len(alphas.shape) - 1)), ndim)
+    ...     return np.cos(2*np.pi*r + np.sum(alphas * x, axis=-1))
+    >>> rng = np.random.default_rng()
+    >>> r, alphas = rng.random((2, 3)), rng.random((2, 3, 7))
+    >>> res = cubature(
+    ...     f=f,
+    ...     a=np.array([0, 0, 0, 0, 0, 0, 0]),
+    ...     b=np.array([1, 1, 1, 1, 1, 1, 1]),
+    ...     rtol=1e-5,
+    ...     rule="genz-malik",
+    ...     args=(r, alphas),
+    ... )
+    >>> res.estimate
+     array([[-0.79812452,  0.35246913, -0.52273628],
+            [ 0.88392779,  0.59139899,  0.41895111]])
+
+    **Parallel computation with** `workers`:
+
+    >>> from concurrent.futures import ThreadPoolExecutor
+    >>> with ThreadPoolExecutor() as executor:
+    ...     res = cubature(
+    ...         f=f,
+    ...         a=np.array([0, 0, 0, 0, 0, 0, 0]),
+    ...         b=np.array([1, 1, 1, 1, 1, 1, 1]),
+    ...         rtol=1e-5,
+    ...         rule="genz-malik",
+    ...         args=(r, alphas),
+    ...         workers=executor.map,
+    ...      )
+    >>> res.estimate
+     array([[-0.79812452,  0.35246913, -0.52273628],
+            [ 0.88392779,  0.59139899,  0.41895111]])
+
+    **2D integral with infinite limits**:
+
+    .. math::
+
+        \int^{ \infty }_{ -\infty }
+        \int^{ \infty }_{ -\infty }
+            e^{-x^2-y^2}
+        \text dy
+        \text dx
+
+    >>> def gaussian(x):
+    ...     return np.exp(-np.sum(x**2, axis=-1))
+    >>> res = cubature(gaussian, [-np.inf, -np.inf], [np.inf, np.inf])
+    >>> res.estimate
+     3.1415926
+
+    **1D integral with singularities avoided using** `points`:
+
+    .. math::
+
+        \int^{ 1 }_{ -1 }
+          \frac{\sin(x)}{x}
+        \text dx
+
+    It is necessary to use the `points` parameter to avoid evaluating `f` at the origin.
+
+    >>> def sinc(x):
+    ...     return np.sin(x)/x
+    >>> res = cubature(sinc, [-1], [1], points=[[0]])
+    >>> res.estimate
+     1.8921661
+    """
+
+    # It is also possible to use a custom rule, but this is not yet part of the public
+    # API. An example of this can be found in the class scipy.integrate._rules.Rule.
+
+    xp = array_namespace(a, b)
+    max_subdivisions = float("inf") if max_subdivisions is None else max_subdivisions
+    points = [] if points is None else points
+
+    # Convert a and b to arrays and convert each point in points to an array, promoting
+    # each to a common floating dtype.
+    a, b, *points = xp_broadcast_promote(a, b, *points, force_floating=True)
+    result_dtype = a.dtype
+
+    if xp_size(a) == 0 or xp_size(b) == 0:
+        raise ValueError("`a` and `b` must be nonempty")
+
+    if a.ndim != 1 or b.ndim != 1:
+        raise ValueError("`a` and `b` must be 1D arrays")
+
+    # If the rule is a string, convert to a corresponding product rule
+    if isinstance(rule, str):
+        ndim = xp_size(a)
+
+        if rule == "genz-malik":
+            rule = GenzMalikCubature(ndim, xp=xp)
+        else:
+            quadratues = {
+                "gauss-kronrod": GaussKronrodQuadrature(21, xp=xp),
+
+                # Also allow names quad_vec uses:
+                "gk21": GaussKronrodQuadrature(21, xp=xp),
+                "gk15": GaussKronrodQuadrature(15, xp=xp),
+            }
+
+            base_rule = quadratues.get(rule)
+
+            if base_rule is None:
+                raise ValueError(f"unknown rule {rule}")
+
+            rule = ProductNestedFixed([base_rule] * ndim)
+
+    # If any of limits are the wrong way around (a > b), flip them and keep track of
+    # the sign.
+    sign = (-1) ** xp.sum(xp.astype(a > b, xp.int8), dtype=result_dtype)
+
+    a_flipped = xp.min(xp.stack([a, b]), axis=0)
+    b_flipped = xp.max(xp.stack([a, b]), axis=0)
+
+    a, b = a_flipped, b_flipped
+
+    # If any of the limits are infinite, apply a transformation
+    if xp.any(xp.isinf(a)) or xp.any(xp.isinf(b)):
+        f = _InfiniteLimitsTransform(f, a, b, xp=xp)
+        a, b = f.transformed_limits
+
+        # Map points from the original coordinates to the new transformed coordinates.
+        #
+        # `points` is a list of arrays of shape (ndim,), but transformations are applied
+        # to arrays of shape (npoints, ndim).
+        #
+        # It is not possible to combine all the points into one array and then apply
+        # f.inv to all of them at once since `points` needs to remain iterable.
+        # Instead, each point is reshaped to an array of shape (1, ndim), `f.inv` is
+        # applied, and then each is reshaped back to (ndim,).
+        points = [xp.reshape(point, (1, -1)) for point in points]
+        points = [f.inv(point) for point in points]
+        points = [xp.reshape(point, (-1,)) for point in points]
+
+        # Include any problematic points introduced by the transformation
+        points.extend(f.points)
+
+    # If any problematic points are specified, divide the initial region so that these
+    # points lie on the edge of a subregion.
+    #
+    # This means ``f`` won't be evaluated there if the rule being used has no evaluation
+    # points on the boundary.
+    if len(points) == 0:
+        initial_regions = [(a, b)]
+    else:
+        initial_regions = _split_region_at_points(a, b, points, xp)
+
+    regions = []
+    est = 0.0
+    err = 0.0
+
+    for a_k, b_k in initial_regions:
+        est_k = rule.estimate(f, a_k, b_k, args)
+        err_k = rule.estimate_error(f, a_k, b_k, args)
+        regions.append(CubatureRegion(est_k, err_k, a_k, b_k, xp))
+
+        est += est_k
+        err += err_k
+
+    subdivisions = 0
+    success = True
+
+    with MapWrapper(workers) as mapwrapper:
+        while xp.any(err > atol + rtol * xp.abs(est)):
+            # region_k is the region with highest estimated error
+            region_k = heapq.heappop(regions)
+
+            est_k = region_k.estimate
+            err_k = region_k.error
+
+            a_k, b_k = region_k.a, region_k.b
+
+            # Subtract the estimate of the integral and its error over this region from
+            # the current global estimates, since these will be refined in the loop over
+            # all subregions.
+            est -= est_k
+            err -= err_k
+
+            # Find all 2^ndim subregions formed by splitting region_k along each axis,
+            # e.g. for 1D integrals this splits an estimate over an interval into an
+            # estimate over two subintervals, for 3D integrals this splits an estimate
+            # over a cube into 8 subcubes.
+            #
+            # For each of the new subregions, calculate an estimate for the integral and
+            # the error there, and push these regions onto the heap for potential
+            # further subdividing.
+
+            executor_args = zip(
+                itertools.repeat(f),
+                itertools.repeat(rule),
+                itertools.repeat(args),
+                _split_subregion(a_k, b_k, xp),
+            )
+
+            for subdivision_result in mapwrapper(_process_subregion, executor_args):
+                a_k_sub, b_k_sub, est_sub, err_sub = subdivision_result
+
+                est += est_sub
+                err += err_sub
+
+                new_region = CubatureRegion(est_sub, err_sub, a_k_sub, b_k_sub, xp)
+
+                heapq.heappush(regions, new_region)
+
+            subdivisions += 1
+
+            if subdivisions >= max_subdivisions:
+                success = False
+                break
+
+        status = "converged" if success else "not_converged"
+
+        # Apply sign change to handle any limits which were initially flipped.
+        est = sign * est
+
+        return CubatureResult(
+            estimate=est,
+            error=err,
+            status=status,
+            subdivisions=subdivisions,
+            regions=regions,
+            atol=atol,
+            rtol=rtol,
+        )
+
+
+def _process_subregion(data):
+    f, rule, args, coord = data
+    a_k_sub, b_k_sub = coord
+
+    est_sub = rule.estimate(f, a_k_sub, b_k_sub, args)
+    err_sub = rule.estimate_error(f, a_k_sub, b_k_sub, args)
+
+    return a_k_sub, b_k_sub, est_sub, err_sub
+
+
+def _is_strictly_in_region(a, b, point, xp):
+    if xp.all(point == a) or xp.all(point == b):
+        return False
+
+    return xp.all(a <= point) and xp.all(point <= b)
+
+
+def _split_region_at_points(a, b, points, xp):
+    """
+    Given the integration limits `a` and `b` describing a rectangular region and a list
+    of `points`, find the list of ``[(a_1, b_1), ..., (a_l, b_l)]`` which breaks up the
+    initial region into smaller subregion such that no `points` lie strictly inside
+    any of the subregions.
+    """
+
+    regions = [(a, b)]
+
+    for point in points:
+        if xp.any(xp.isinf(point)):
+            # If a point is specified at infinity, ignore.
+            #
+            # This case occurs when points are given by the user to avoid, but after
+            # applying a transformation, they are removed.
+            continue
+
+        new_subregions = []
+
+        for a_k, b_k in regions:
+            if _is_strictly_in_region(a_k, b_k, point, xp):
+                subregions = _split_subregion(a_k, b_k, xp, point)
+
+                for left, right in subregions:
+                    # Skip any zero-width regions.
+                    if xp.any(left == right):
+                        continue
+                    else:
+                        new_subregions.append((left, right))
+
+                new_subregions.extend(subregions)
+
+            else:
+                new_subregions.append((a_k, b_k))
+
+        regions = new_subregions
+
+    return regions
+
+
+class _VariableTransform:
+    """
+    A transformation that can be applied to an integral.
+    """
+
+    @property
+    def transformed_limits(self):
+        """
+        New limits of integration after applying the transformation.
+        """
+
+        raise NotImplementedError
+
+    @property
+    def points(self):
+        """
+        Any problematic points introduced by the transformation.
+
+        These should be specified as points where ``_VariableTransform(f)(self, point)``
+        would be problematic.
+
+        For example, if the transformation ``x = 1/((1-t)(1+t))`` is applied to a
+        univariate integral, then points should return ``[ [1], [-1] ]``.
+        """
+
+        return []
+
+    def inv(self, x):
+        """
+        Map points ``x`` to ``t`` such that if ``f`` is the original function and ``g``
+        is the function after the transformation is applied, then::
+
+            f(x) = g(self.inv(x))
+        """
+
+        raise NotImplementedError
+
+    def __call__(self, t, *args, **kwargs):
+        """
+        Apply the transformation to ``f`` and multiply by the Jacobian determinant.
+        This should be the new integrand after the transformation has been applied so
+        that the following is satisfied::
+
+            f_transformed = _VariableTransform(f)
+
+            cubature(f, a, b) == cubature(
+                f_transformed,
+                *f_transformed.transformed_limits(a, b),
+            )
+        """
+
+        raise NotImplementedError
+
+
+class _InfiniteLimitsTransform(_VariableTransform):
+    r"""
+    Transformation for handling infinite limits.
+
+    Assuming ``a = [a_1, ..., a_n]`` and ``b = [b_1, ..., b_n]``:
+
+    If :math:`a_i = -\infty` and :math:`b_i = \infty`, the i-th integration variable
+    will use the transformation :math:`x = \frac{1-|t|}{t}` and :math:`t \in (-1, 1)`.
+
+    If :math:`a_i \ne \pm\infty` and :math:`b_i = \infty`, the i-th integration variable
+    will use the transformation :math:`x = a_i + \frac{1-t}{t}` and
+    :math:`t \in (0, 1)`.
+
+    If :math:`a_i = -\infty` and :math:`b_i \ne \pm\infty`, the i-th integration
+    variable will use the transformation :math:`x = b_i - \frac{1-t}{t}` and
+    :math:`t \in (0, 1)`.
+    """
+
+    def __init__(self, f, a, b, xp):
+        self._xp = xp
+
+        self._f = f
+        self._orig_a = a
+        self._orig_b = b
+
+        # (-oo, oo) will be mapped to (-1, 1).
+        self._double_inf_pos = (a == -math.inf) & (b == math.inf)
+
+        # (start, oo) will be mapped to (0, 1).
+        start_inf_mask = (a != -math.inf) & (b == math.inf)
+
+        # (-oo, end) will be mapped to (0, 1).
+        inf_end_mask = (a == -math.inf) & (b != math.inf)
+
+        # This is handled by making the transformation t = -x and reducing it to
+        # the other semi-infinite case.
+        self._semi_inf_pos = start_inf_mask | inf_end_mask
+
+        # Since we flip the limits, we don't need to separately multiply the
+        # integrand by -1.
+        self._orig_a[inf_end_mask] = -b[inf_end_mask]
+        self._orig_b[inf_end_mask] = -a[inf_end_mask]
+
+        self._num_inf = self._xp.sum(
+            self._xp.astype(self._double_inf_pos | self._semi_inf_pos, self._xp.int64),
+        ).__int__()
+
+    @property
+    def transformed_limits(self):
+        a = xp_copy(self._orig_a)
+        b = xp_copy(self._orig_b)
+
+        a[self._double_inf_pos] = -1
+        b[self._double_inf_pos] = 1
+
+        a[self._semi_inf_pos] = 0
+        b[self._semi_inf_pos] = 1
+
+        return a, b
+
+    @property
+    def points(self):
+        # If there are infinite limits, then the origin becomes a problematic point
+        # due to a division by zero there.
+
+        # If the function using this class only wraps f when a and b contain infinite
+        # limits, this condition will always be met (as is the case with cubature).
+        #
+        # If a and b do not contain infinite limits but f is still wrapped with this
+        # class, then without this condition the initial region of integration will
+        # be split around the origin unnecessarily.
+        if self._num_inf != 0:
+            return [self._xp.zeros(self._orig_a.shape)]
+        else:
+            return []
+
+    def inv(self, x):
+        t = xp_copy(x)
+        npoints = x.shape[0]
+
+        double_inf_mask = self._xp.tile(
+            self._double_inf_pos[self._xp.newaxis, :],
+            (npoints, 1),
+        )
+
+        semi_inf_mask = self._xp.tile(
+            self._semi_inf_pos[self._xp.newaxis, :],
+            (npoints, 1),
+        )
+
+        # If any components of x are 0, then this component will be mapped to infinity
+        # under the transformation used for doubly-infinite limits.
+        #
+        # Handle the zero values and non-zero values separately to avoid division by
+        # zero.
+        zero_mask = x[double_inf_mask] == 0
+        non_zero_mask = double_inf_mask & ~zero_mask
+        t[zero_mask] = math.inf
+        t[non_zero_mask] = 1/(x[non_zero_mask] + self._xp.sign(x[non_zero_mask]))
+
+        start = self._xp.tile(self._orig_a[self._semi_inf_pos], (npoints,))
+        t[semi_inf_mask] = 1/(x[semi_inf_mask] - start + 1)
+
+        return t
+
+    def __call__(self, t, *args, **kwargs):
+        x = xp_copy(t)
+        npoints = t.shape[0]
+
+        double_inf_mask = self._xp.tile(
+            self._double_inf_pos[self._xp.newaxis, :],
+            (npoints, 1),
+        )
+
+        semi_inf_mask = self._xp.tile(
+            self._semi_inf_pos[self._xp.newaxis, :],
+            (npoints, 1),
+        )
+
+        # For (-oo, oo) -> (-1, 1), use the transformation x = (1-|t|)/t.
+        x[double_inf_mask] = (
+            (1 - self._xp.abs(t[double_inf_mask])) / t[double_inf_mask]
+        )
+
+        start = self._xp.tile(self._orig_a[self._semi_inf_pos], (npoints,))
+
+        # For (start, oo) -> (0, 1), use the transformation x = start + (1-t)/t.
+        x[semi_inf_mask] = start + (1 - t[semi_inf_mask]) / t[semi_inf_mask]
+
+        jacobian_det = 1/self._xp.prod(
+            self._xp.reshape(
+                t[semi_inf_mask | double_inf_mask]**2,
+                (-1, self._num_inf),
+            ),
+            axis=-1,
+        )
+
+        f_x = self._f(x, *args, **kwargs)
+        jacobian_det = self._xp.reshape(jacobian_det, (-1, *([1]*(len(f_x.shape) - 1))))
+
+        return f_x * jacobian_det
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3c8aaa36588651ae5e48b58fbb1d443bc71fc77
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__init__.py
@@ -0,0 +1,8 @@
+"""Suite of ODE solvers implemented in Python."""
+from .ivp import solve_ivp
+from .rk import RK23, RK45, DOP853
+from .radau import Radau
+from .bdf import BDF
+from .lsoda import LSODA
+from .common import OdeSolution
+from .base import DenseOutput, OdeSolver
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a5df5c1edeea32cf6440ee0fbd13e72d82c82049
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/base.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/base.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e15823e1f5bcf1e5c6e025a5c845dddc8b6f1e68
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/base.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/bdf.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/bdf.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bc97dd797f91c4b1713b7a92663efab981bac943
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/bdf.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/common.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/common.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0a9ea985f60affe81675f5986d4d449f9c396f86
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/common.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/dop853_coefficients.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/dop853_coefficients.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..59fb953dac14f16ce03493b5948246cb2b3bd650
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/dop853_coefficients.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/ivp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/ivp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1eb58ed22d06fcf03fd1083ad1b572ae6db69f0d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/ivp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/lsoda.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/lsoda.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3e50b8349643ec60f59722c4673482da7cfa4b24
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/lsoda.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/radau.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/radau.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b146863515100dd97cab8815572ddd395a71ea0c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/radau.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/rk.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/rk.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0add5652f3d0a6ac2b40bdf87102e124a960cd0f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/__pycache__/rk.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/base.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/base.py
new file mode 100644
index 0000000000000000000000000000000000000000..46db9a69dfb3e7aee5c150ac6795234cd455dfe5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/base.py
@@ -0,0 +1,290 @@
+import numpy as np
+
+
+def check_arguments(fun, y0, support_complex):
+    """Helper function for checking arguments common to all solvers."""
+    y0 = np.asarray(y0)
+    if np.issubdtype(y0.dtype, np.complexfloating):
+        if not support_complex:
+            raise ValueError("`y0` is complex, but the chosen solver does "
+                             "not support integration in a complex domain.")
+        dtype = complex
+    else:
+        dtype = float
+    y0 = y0.astype(dtype, copy=False)
+
+    if y0.ndim != 1:
+        raise ValueError("`y0` must be 1-dimensional.")
+
+    if not np.isfinite(y0).all():
+        raise ValueError("All components of the initial state `y0` must be finite.")
+
+    def fun_wrapped(t, y):
+        return np.asarray(fun(t, y), dtype=dtype)
+
+    return fun_wrapped, y0
+
+
+class OdeSolver:
+    """Base class for ODE solvers.
+
+    In order to implement a new solver you need to follow the guidelines:
+
+        1. A constructor must accept parameters presented in the base class
+           (listed below) along with any other parameters specific to a solver.
+        2. A constructor must accept arbitrary extraneous arguments
+           ``**extraneous``, but warn that these arguments are irrelevant
+           using `common.warn_extraneous` function. Do not pass these
+           arguments to the base class.
+        3. A solver must implement a private method `_step_impl(self)` which
+           propagates a solver one step further. It must return tuple
+           ``(success, message)``, where ``success`` is a boolean indicating
+           whether a step was successful, and ``message`` is a string
+           containing description of a failure if a step failed or None
+           otherwise.
+        4. A solver must implement a private method `_dense_output_impl(self)`,
+           which returns a `DenseOutput` object covering the last successful
+           step.
+        5. A solver must have attributes listed below in Attributes section.
+           Note that ``t_old`` and ``step_size`` are updated automatically.
+        6. Use `fun(self, t, y)` method for the system rhs evaluation, this
+           way the number of function evaluations (`nfev`) will be tracked
+           automatically.
+        7. For convenience, a base class provides `fun_single(self, t, y)` and
+           `fun_vectorized(self, t, y)` for evaluating the rhs in
+           non-vectorized and vectorized fashions respectively (regardless of
+           how `fun` from the constructor is implemented). These calls don't
+           increment `nfev`.
+        8. If a solver uses a Jacobian matrix and LU decompositions, it should
+           track the number of Jacobian evaluations (`njev`) and the number of
+           LU decompositions (`nlu`).
+        9. By convention, the function evaluations used to compute a finite
+           difference approximation of the Jacobian should not be counted in
+           `nfev`, thus use `fun_single(self, t, y)` or
+           `fun_vectorized(self, t, y)` when computing a finite difference
+           approximation of the Jacobian.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
+        return an array of the same shape as ``y``. See `vectorized` for more
+        information.
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time --- the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    vectorized : bool
+        Whether `fun` can be called in a vectorized fashion. Default is False.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by methods 'Radau' and 'BDF', but
+        will result in slower execution for other methods. It can also
+        result in slower overall execution for 'Radau' and 'BDF' in some
+        circumstances (e.g. small ``len(y0)``).
+    support_complex : bool, optional
+        Whether integration in a complex domain should be supported.
+        Generally determined by a derived solver class capabilities.
+        Default is False.
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number of the system's rhs evaluations.
+    njev : int
+        Number of the Jacobian evaluations.
+    nlu : int
+        Number of LU decompositions.
+    """
+    TOO_SMALL_STEP = "Required step size is less than spacing between numbers."
+
+    def __init__(self, fun, t0, y0, t_bound, vectorized,
+                 support_complex=False):
+        self.t_old = None
+        self.t = t0
+        self._fun, self.y = check_arguments(fun, y0, support_complex)
+        self.t_bound = t_bound
+        self.vectorized = vectorized
+
+        if vectorized:
+            def fun_single(t, y):
+                return self._fun(t, y[:, None]).ravel()
+            fun_vectorized = self._fun
+        else:
+            fun_single = self._fun
+
+            def fun_vectorized(t, y):
+                f = np.empty_like(y)
+                for i, yi in enumerate(y.T):
+                    f[:, i] = self._fun(t, yi)
+                return f
+
+        def fun(t, y):
+            self.nfev += 1
+            return self.fun_single(t, y)
+
+        self.fun = fun
+        self.fun_single = fun_single
+        self.fun_vectorized = fun_vectorized
+
+        self.direction = np.sign(t_bound - t0) if t_bound != t0 else 1
+        self.n = self.y.size
+        self.status = 'running'
+
+        self.nfev = 0
+        self.njev = 0
+        self.nlu = 0
+
+    @property
+    def step_size(self):
+        if self.t_old is None:
+            return None
+        else:
+            return np.abs(self.t - self.t_old)
+
+    def step(self):
+        """Perform one integration step.
+
+        Returns
+        -------
+        message : string or None
+            Report from the solver. Typically a reason for a failure if
+            `self.status` is 'failed' after the step was taken or None
+            otherwise.
+        """
+        if self.status != 'running':
+            raise RuntimeError("Attempt to step on a failed or finished "
+                               "solver.")
+
+        if self.n == 0 or self.t == self.t_bound:
+            # Handle corner cases of empty solver or no integration.
+            self.t_old = self.t
+            self.t = self.t_bound
+            message = None
+            self.status = 'finished'
+        else:
+            t = self.t
+            success, message = self._step_impl()
+
+            if not success:
+                self.status = 'failed'
+            else:
+                self.t_old = t
+                if self.direction * (self.t - self.t_bound) >= 0:
+                    self.status = 'finished'
+
+        return message
+
+    def dense_output(self):
+        """Compute a local interpolant over the last successful step.
+
+        Returns
+        -------
+        sol : `DenseOutput`
+            Local interpolant over the last successful step.
+        """
+        if self.t_old is None:
+            raise RuntimeError("Dense output is available after a successful "
+                               "step was made.")
+
+        if self.n == 0 or self.t == self.t_old:
+            # Handle corner cases of empty solver and no integration.
+            return ConstantDenseOutput(self.t_old, self.t, self.y)
+        else:
+            return self._dense_output_impl()
+
+    def _step_impl(self):
+        raise NotImplementedError
+
+    def _dense_output_impl(self):
+        raise NotImplementedError
+
+
+class DenseOutput:
+    """Base class for local interpolant over step made by an ODE solver.
+
+    It interpolates between `t_min` and `t_max` (see Attributes below).
+    Evaluation outside this interval is not forbidden, but the accuracy is not
+    guaranteed.
+
+    Attributes
+    ----------
+    t_min, t_max : float
+        Time range of the interpolation.
+    """
+    def __init__(self, t_old, t):
+        self.t_old = t_old
+        self.t = t
+        self.t_min = min(t, t_old)
+        self.t_max = max(t, t_old)
+
+    def __call__(self, t):
+        """Evaluate the interpolant.
+
+        Parameters
+        ----------
+        t : float or array_like with shape (n_points,)
+            Points to evaluate the solution at.
+
+        Returns
+        -------
+        y : ndarray, shape (n,) or (n, n_points)
+            Computed values. Shape depends on whether `t` was a scalar or a
+            1-D array.
+        """
+        t = np.asarray(t)
+        if t.ndim > 1:
+            raise ValueError("`t` must be a float or a 1-D array.")
+        return self._call_impl(t)
+
+    def _call_impl(self, t):
+        raise NotImplementedError
+
+
+class ConstantDenseOutput(DenseOutput):
+    """Constant value interpolator.
+
+    This class used for degenerate integration cases: equal integration limits
+    or a system with 0 equations.
+    """
+    def __init__(self, t_old, t, value):
+        super().__init__(t_old, t)
+        self.value = value
+
+    def _call_impl(self, t):
+        if t.ndim == 0:
+            return self.value
+        else:
+            ret = np.empty((self.value.shape[0], t.shape[0]))
+            ret[:] = self.value[:, None]
+            return ret
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/bdf.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/bdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..33b47a642b976e623edc9047f6465e328095dcd2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/bdf.py
@@ -0,0 +1,478 @@
+import numpy as np
+from scipy.linalg import lu_factor, lu_solve
+from scipy.sparse import issparse, csc_matrix, eye
+from scipy.sparse.linalg import splu
+from scipy.optimize._numdiff import group_columns
+from .common import (validate_max_step, validate_tol, select_initial_step,
+                     norm, EPS, num_jac, validate_first_step,
+                     warn_extraneous)
+from .base import OdeSolver, DenseOutput
+
+
+MAX_ORDER = 5
+NEWTON_MAXITER = 4
+MIN_FACTOR = 0.2
+MAX_FACTOR = 10
+
+
+def compute_R(order, factor):
+    """Compute the matrix for changing the differences array."""
+    I = np.arange(1, order + 1)[:, None]
+    J = np.arange(1, order + 1)
+    M = np.zeros((order + 1, order + 1))
+    M[1:, 1:] = (I - 1 - factor * J) / I
+    M[0] = 1
+    return np.cumprod(M, axis=0)
+
+
+def change_D(D, order, factor):
+    """Change differences array in-place when step size is changed."""
+    R = compute_R(order, factor)
+    U = compute_R(order, 1)
+    RU = R.dot(U)
+    D[:order + 1] = np.dot(RU.T, D[:order + 1])
+
+
+def solve_bdf_system(fun, t_new, y_predict, c, psi, LU, solve_lu, scale, tol):
+    """Solve the algebraic system resulting from BDF method."""
+    d = 0
+    y = y_predict.copy()
+    dy_norm_old = None
+    converged = False
+    for k in range(NEWTON_MAXITER):
+        f = fun(t_new, y)
+        if not np.all(np.isfinite(f)):
+            break
+
+        dy = solve_lu(LU, c * f - psi - d)
+        dy_norm = norm(dy / scale)
+
+        if dy_norm_old is None:
+            rate = None
+        else:
+            rate = dy_norm / dy_norm_old
+
+        if (rate is not None and (rate >= 1 or
+                rate ** (NEWTON_MAXITER - k) / (1 - rate) * dy_norm > tol)):
+            break
+
+        y += dy
+        d += dy
+
+        if (dy_norm == 0 or
+                rate is not None and rate / (1 - rate) * dy_norm < tol):
+            converged = True
+            break
+
+        dy_norm_old = dy_norm
+
+    return converged, k + 1, y, d
+
+
+class BDF(OdeSolver):
+    """Implicit method based on backward-differentiation formulas.
+
+    This is a variable order method with the order varying automatically from
+    1 to 5. The general framework of the BDF algorithm is described in [1]_.
+    This class implements a quasi-constant step size as explained in [2]_.
+    The error estimation strategy for the constant-step BDF is derived in [3]_.
+    An accuracy enhancement using modified formulas (NDF) [2]_ is also implemented.
+
+    Can be applied in the complex domain.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
+        return an array of the same shape as ``y``. See `vectorized` for more
+        information.
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    jac : {None, array_like, sparse_matrix, callable}, optional
+        Jacobian matrix of the right-hand side of the system with respect to y,
+        required by this method. The Jacobian matrix has shape (n, n) and its
+        element (i, j) is equal to ``d f_i / d y_j``.
+        There are three ways to define the Jacobian:
+
+            * If array_like or sparse_matrix, the Jacobian is assumed to
+              be constant.
+            * If callable, the Jacobian is assumed to depend on both
+              t and y; it will be called as ``jac(t, y)`` as necessary.
+              For the 'Radau' and 'BDF' methods, the return value might be a
+              sparse matrix.
+            * If None (default), the Jacobian will be approximated by
+              finite differences.
+
+        It is generally recommended to provide the Jacobian rather than
+        relying on a finite-difference approximation.
+    jac_sparsity : {None, array_like, sparse matrix}, optional
+        Defines a sparsity structure of the Jacobian matrix for a
+        finite-difference approximation. Its shape must be (n, n). This argument
+        is ignored if `jac` is not `None`. If the Jacobian has only few non-zero
+        elements in *each* row, providing the sparsity structure will greatly
+        speed up the computations [4]_. A zero entry means that a corresponding
+        element in the Jacobian is always zero. If None (default), the Jacobian
+        is assumed to be dense.
+    vectorized : bool, optional
+        Whether `fun` can be called in a vectorized fashion. Default is False.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by this method, but may result in slower
+        execution overall in some circumstances (e.g. small ``len(y0)``).
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number of evaluations of the right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+    nlu : int
+        Number of LU decompositions.
+
+    References
+    ----------
+    .. [1] G. D. Byrne, A. C. Hindmarsh, "A Polyalgorithm for the Numerical
+           Solution of Ordinary Differential Equations", ACM Transactions on
+           Mathematical Software, Vol. 1, No. 1, pp. 71-96, March 1975.
+    .. [2] L. F. Shampine, M. W. Reichelt, "THE MATLAB ODE SUITE", SIAM J. SCI.
+           COMPUTE., Vol. 18, No. 1, pp. 1-22, January 1997.
+    .. [3] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations I:
+           Nonstiff Problems", Sec. III.2.
+    .. [4] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+           sparse Jacobian matrices", Journal of the Institute of Mathematics
+           and its Applications, 13, pp. 117-120, 1974.
+    """
+    def __init__(self, fun, t0, y0, t_bound, max_step=np.inf,
+                 rtol=1e-3, atol=1e-6, jac=None, jac_sparsity=None,
+                 vectorized=False, first_step=None, **extraneous):
+        warn_extraneous(extraneous)
+        super().__init__(fun, t0, y0, t_bound, vectorized,
+                         support_complex=True)
+        self.max_step = validate_max_step(max_step)
+        self.rtol, self.atol = validate_tol(rtol, atol, self.n)
+        f = self.fun(self.t, self.y)
+        if first_step is None:
+            self.h_abs = select_initial_step(self.fun, self.t, self.y, 
+                                             t_bound, max_step, f,
+                                             self.direction, 1,
+                                             self.rtol, self.atol)
+        else:
+            self.h_abs = validate_first_step(first_step, t0, t_bound)
+        self.h_abs_old = None
+        self.error_norm_old = None
+
+        self.newton_tol = max(10 * EPS / rtol, min(0.03, rtol ** 0.5))
+
+        self.jac_factor = None
+        self.jac, self.J = self._validate_jac(jac, jac_sparsity)
+        if issparse(self.J):
+            def lu(A):
+                self.nlu += 1
+                return splu(A)
+
+            def solve_lu(LU, b):
+                return LU.solve(b)
+
+            I = eye(self.n, format='csc', dtype=self.y.dtype)
+        else:
+            def lu(A):
+                self.nlu += 1
+                return lu_factor(A, overwrite_a=True)
+
+            def solve_lu(LU, b):
+                return lu_solve(LU, b, overwrite_b=True)
+
+            I = np.identity(self.n, dtype=self.y.dtype)
+
+        self.lu = lu
+        self.solve_lu = solve_lu
+        self.I = I
+
+        kappa = np.array([0, -0.1850, -1/9, -0.0823, -0.0415, 0])
+        self.gamma = np.hstack((0, np.cumsum(1 / np.arange(1, MAX_ORDER + 1))))
+        self.alpha = (1 - kappa) * self.gamma
+        self.error_const = kappa * self.gamma + 1 / np.arange(1, MAX_ORDER + 2)
+
+        D = np.empty((MAX_ORDER + 3, self.n), dtype=self.y.dtype)
+        D[0] = self.y
+        D[1] = f * self.h_abs * self.direction
+        self.D = D
+
+        self.order = 1
+        self.n_equal_steps = 0
+        self.LU = None
+
+    def _validate_jac(self, jac, sparsity):
+        t0 = self.t
+        y0 = self.y
+
+        if jac is None:
+            if sparsity is not None:
+                if issparse(sparsity):
+                    sparsity = csc_matrix(sparsity)
+                groups = group_columns(sparsity)
+                sparsity = (sparsity, groups)
+
+            def jac_wrapped(t, y):
+                self.njev += 1
+                f = self.fun_single(t, y)
+                J, self.jac_factor = num_jac(self.fun_vectorized, t, y, f,
+                                             self.atol, self.jac_factor,
+                                             sparsity)
+                return J
+            J = jac_wrapped(t0, y0)
+        elif callable(jac):
+            J = jac(t0, y0)
+            self.njev += 1
+            if issparse(J):
+                J = csc_matrix(J, dtype=y0.dtype)
+
+                def jac_wrapped(t, y):
+                    self.njev += 1
+                    return csc_matrix(jac(t, y), dtype=y0.dtype)
+            else:
+                J = np.asarray(J, dtype=y0.dtype)
+
+                def jac_wrapped(t, y):
+                    self.njev += 1
+                    return np.asarray(jac(t, y), dtype=y0.dtype)
+
+            if J.shape != (self.n, self.n):
+                raise ValueError(f"`jac` is expected to have shape {(self.n, self.n)},"
+                                 f" but actually has {J.shape}.")
+        else:
+            if issparse(jac):
+                J = csc_matrix(jac, dtype=y0.dtype)
+            else:
+                J = np.asarray(jac, dtype=y0.dtype)
+
+            if J.shape != (self.n, self.n):
+                raise ValueError(f"`jac` is expected to have shape {(self.n, self.n)},"
+                                 f" but actually has {J.shape}.")
+            jac_wrapped = None
+
+        return jac_wrapped, J
+
+    def _step_impl(self):
+        t = self.t
+        D = self.D
+
+        max_step = self.max_step
+        min_step = 10 * np.abs(np.nextafter(t, self.direction * np.inf) - t)
+        if self.h_abs > max_step:
+            h_abs = max_step
+            change_D(D, self.order, max_step / self.h_abs)
+            self.n_equal_steps = 0
+        elif self.h_abs < min_step:
+            h_abs = min_step
+            change_D(D, self.order, min_step / self.h_abs)
+            self.n_equal_steps = 0
+        else:
+            h_abs = self.h_abs
+
+        atol = self.atol
+        rtol = self.rtol
+        order = self.order
+
+        alpha = self.alpha
+        gamma = self.gamma
+        error_const = self.error_const
+
+        J = self.J
+        LU = self.LU
+        current_jac = self.jac is None
+
+        step_accepted = False
+        while not step_accepted:
+            if h_abs < min_step:
+                return False, self.TOO_SMALL_STEP
+
+            h = h_abs * self.direction
+            t_new = t + h
+
+            if self.direction * (t_new - self.t_bound) > 0:
+                t_new = self.t_bound
+                change_D(D, order, np.abs(t_new - t) / h_abs)
+                self.n_equal_steps = 0
+                LU = None
+
+            h = t_new - t
+            h_abs = np.abs(h)
+
+            y_predict = np.sum(D[:order + 1], axis=0)
+
+            scale = atol + rtol * np.abs(y_predict)
+            psi = np.dot(D[1: order + 1].T, gamma[1: order + 1]) / alpha[order]
+
+            converged = False
+            c = h / alpha[order]
+            while not converged:
+                if LU is None:
+                    LU = self.lu(self.I - c * J)
+
+                converged, n_iter, y_new, d = solve_bdf_system(
+                    self.fun, t_new, y_predict, c, psi, LU, self.solve_lu,
+                    scale, self.newton_tol)
+
+                if not converged:
+                    if current_jac:
+                        break
+                    J = self.jac(t_new, y_predict)
+                    LU = None
+                    current_jac = True
+
+            if not converged:
+                factor = 0.5
+                h_abs *= factor
+                change_D(D, order, factor)
+                self.n_equal_steps = 0
+                LU = None
+                continue
+
+            safety = 0.9 * (2 * NEWTON_MAXITER + 1) / (2 * NEWTON_MAXITER
+                                                       + n_iter)
+
+            scale = atol + rtol * np.abs(y_new)
+            error = error_const[order] * d
+            error_norm = norm(error / scale)
+
+            if error_norm > 1:
+                factor = max(MIN_FACTOR,
+                             safety * error_norm ** (-1 / (order + 1)))
+                h_abs *= factor
+                change_D(D, order, factor)
+                self.n_equal_steps = 0
+                # As we didn't have problems with convergence, we don't
+                # reset LU here.
+            else:
+                step_accepted = True
+
+        self.n_equal_steps += 1
+
+        self.t = t_new
+        self.y = y_new
+
+        self.h_abs = h_abs
+        self.J = J
+        self.LU = LU
+
+        # Update differences. The principal relation here is
+        # D^{j + 1} y_n = D^{j} y_n - D^{j} y_{n - 1}. Keep in mind that D
+        # contained difference for previous interpolating polynomial and
+        # d = D^{k + 1} y_n. Thus this elegant code follows.
+        D[order + 2] = d - D[order + 1]
+        D[order + 1] = d
+        for i in reversed(range(order + 1)):
+            D[i] += D[i + 1]
+
+        if self.n_equal_steps < order + 1:
+            return True, None
+
+        if order > 1:
+            error_m = error_const[order - 1] * D[order]
+            error_m_norm = norm(error_m / scale)
+        else:
+            error_m_norm = np.inf
+
+        if order < MAX_ORDER:
+            error_p = error_const[order + 1] * D[order + 2]
+            error_p_norm = norm(error_p / scale)
+        else:
+            error_p_norm = np.inf
+
+        error_norms = np.array([error_m_norm, error_norm, error_p_norm])
+        with np.errstate(divide='ignore'):
+            factors = error_norms ** (-1 / np.arange(order, order + 3))
+
+        delta_order = np.argmax(factors) - 1
+        order += delta_order
+        self.order = order
+
+        factor = min(MAX_FACTOR, safety * np.max(factors))
+        self.h_abs *= factor
+        change_D(D, order, factor)
+        self.n_equal_steps = 0
+        self.LU = None
+
+        return True, None
+
+    def _dense_output_impl(self):
+        return BdfDenseOutput(self.t_old, self.t, self.h_abs * self.direction,
+                              self.order, self.D[:self.order + 1].copy())
+
+
+class BdfDenseOutput(DenseOutput):
+    def __init__(self, t_old, t, h, order, D):
+        super().__init__(t_old, t)
+        self.order = order
+        self.t_shift = self.t - h * np.arange(self.order)
+        self.denom = h * (1 + np.arange(self.order))
+        self.D = D
+
+    def _call_impl(self, t):
+        if t.ndim == 0:
+            x = (t - self.t_shift) / self.denom
+            p = np.cumprod(x)
+        else:
+            x = (t - self.t_shift[:, None]) / self.denom[:, None]
+            p = np.cumprod(x, axis=0)
+
+        y = np.dot(self.D[1:].T, p)
+        if y.ndim == 1:
+            y += self.D[0]
+        else:
+            y += self.D[0, :, None]
+
+        return y
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/common.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/common.py
new file mode 100644
index 0000000000000000000000000000000000000000..0c820ad97f5a26955e20f98d80b71168dac54b0a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/common.py
@@ -0,0 +1,451 @@
+from itertools import groupby
+from warnings import warn
+import numpy as np
+from scipy.sparse import find, coo_matrix
+
+
+EPS = np.finfo(float).eps
+
+
+def validate_first_step(first_step, t0, t_bound):
+    """Assert that first_step is valid and return it."""
+    if first_step <= 0:
+        raise ValueError("`first_step` must be positive.")
+    if first_step > np.abs(t_bound - t0):
+        raise ValueError("`first_step` exceeds bounds.")
+    return first_step
+
+
+def validate_max_step(max_step):
+    """Assert that max_Step is valid and return it."""
+    if max_step <= 0:
+        raise ValueError("`max_step` must be positive.")
+    return max_step
+
+
+def warn_extraneous(extraneous):
+    """Display a warning for extraneous keyword arguments.
+
+    The initializer of each solver class is expected to collect keyword
+    arguments that it doesn't understand and warn about them. This function
+    prints a warning for each key in the supplied dictionary.
+
+    Parameters
+    ----------
+    extraneous : dict
+        Extraneous keyword arguments
+    """
+    if extraneous:
+        warn("The following arguments have no effect for a chosen solver: "
+             f"{', '.join(f'`{x}`' for x in extraneous)}.",
+             stacklevel=3)
+
+
+def validate_tol(rtol, atol, n):
+    """Validate tolerance values."""
+
+    if np.any(rtol < 100 * EPS):
+        warn("At least one element of `rtol` is too small. "
+             f"Setting `rtol = np.maximum(rtol, {100 * EPS})`.",
+             stacklevel=3)
+        rtol = np.maximum(rtol, 100 * EPS)
+
+    atol = np.asarray(atol)
+    if atol.ndim > 0 and atol.shape != (n,):
+        raise ValueError("`atol` has wrong shape.")
+
+    if np.any(atol < 0):
+        raise ValueError("`atol` must be positive.")
+
+    return rtol, atol
+
+
+def norm(x):
+    """Compute RMS norm."""
+    return np.linalg.norm(x) / x.size ** 0.5
+
+
+def select_initial_step(fun, t0, y0, t_bound,
+                        max_step, f0, direction, order, rtol, atol):
+    """Empirically select a good initial step.
+
+    The algorithm is described in [1]_.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system.
+    t0 : float
+        Initial value of the independent variable.
+    y0 : ndarray, shape (n,)
+        Initial value of the dependent variable.
+    t_bound : float
+        End-point of integration interval; used to ensure that t0+step<=tbound
+        and that fun is only evaluated in the interval [t0,tbound]
+    max_step : float
+        Maximum allowable step size.
+    f0 : ndarray, shape (n,)
+        Initial value of the derivative, i.e., ``fun(t0, y0)``.
+    direction : float
+        Integration direction.
+    order : float
+        Error estimator order. It means that the error controlled by the
+        algorithm is proportional to ``step_size ** (order + 1)`.
+    rtol : float
+        Desired relative tolerance.
+    atol : float
+        Desired absolute tolerance.
+
+    Returns
+    -------
+    h_abs : float
+        Absolute value of the suggested initial step.
+
+    References
+    ----------
+    .. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
+           Equations I: Nonstiff Problems", Sec. II.4.
+    """
+    if y0.size == 0:
+        return np.inf
+
+    interval_length = abs(t_bound - t0)
+    if interval_length == 0.0:
+        return 0.0
+
+    scale = atol + np.abs(y0) * rtol
+    d0 = norm(y0 / scale)
+    d1 = norm(f0 / scale)
+    if d0 < 1e-5 or d1 < 1e-5:
+        h0 = 1e-6
+    else:
+        h0 = 0.01 * d0 / d1
+    # Check t0+h0*direction doesn't take us beyond t_bound
+    h0 = min(h0, interval_length)
+    y1 = y0 + h0 * direction * f0
+    f1 = fun(t0 + h0 * direction, y1)
+    d2 = norm((f1 - f0) / scale) / h0
+
+    if d1 <= 1e-15 and d2 <= 1e-15:
+        h1 = max(1e-6, h0 * 1e-3)
+    else:
+        h1 = (0.01 / max(d1, d2)) ** (1 / (order + 1))
+
+    return min(100 * h0, h1, interval_length, max_step)
+
+
+class OdeSolution:
+    """Continuous ODE solution.
+
+    It is organized as a collection of `DenseOutput` objects which represent
+    local interpolants. It provides an algorithm to select a right interpolant
+    for each given point.
+
+    The interpolants cover the range between `t_min` and `t_max` (see
+    Attributes below). Evaluation outside this interval is not forbidden, but
+    the accuracy is not guaranteed.
+
+    When evaluating at a breakpoint (one of the values in `ts`) a segment with
+    the lower index is selected.
+
+    Parameters
+    ----------
+    ts : array_like, shape (n_segments + 1,)
+        Time instants between which local interpolants are defined. Must
+        be strictly increasing or decreasing (zero segment with two points is
+        also allowed).
+    interpolants : list of DenseOutput with n_segments elements
+        Local interpolants. An i-th interpolant is assumed to be defined
+        between ``ts[i]`` and ``ts[i + 1]``.
+    alt_segment : boolean
+        Requests the alternative interpolant segment selection scheme. At each
+        solver integration point, two interpolant segments are available. The
+        default (False) and alternative (True) behaviours select the segment
+        for which the requested time corresponded to ``t`` and ``t_old``,
+        respectively. This functionality is only relevant for testing the
+        interpolants' accuracy: different integrators use different
+        construction strategies.
+
+    Attributes
+    ----------
+    t_min, t_max : float
+        Time range of the interpolation.
+    """
+    def __init__(self, ts, interpolants, alt_segment=False):
+        ts = np.asarray(ts)
+        d = np.diff(ts)
+        # The first case covers integration on zero segment.
+        if not ((ts.size == 2 and ts[0] == ts[-1])
+                or np.all(d > 0) or np.all(d < 0)):
+            raise ValueError("`ts` must be strictly increasing or decreasing.")
+
+        self.n_segments = len(interpolants)
+        if ts.shape != (self.n_segments + 1,):
+            raise ValueError("Numbers of time stamps and interpolants "
+                             "don't match.")
+
+        self.ts = ts
+        self.interpolants = interpolants
+        if ts[-1] >= ts[0]:
+            self.t_min = ts[0]
+            self.t_max = ts[-1]
+            self.ascending = True
+            self.side = "right" if alt_segment else "left"
+            self.ts_sorted = ts
+        else:
+            self.t_min = ts[-1]
+            self.t_max = ts[0]
+            self.ascending = False
+            self.side = "left" if alt_segment else "right"
+            self.ts_sorted = ts[::-1]
+
+    def _call_single(self, t):
+        # Here we preserve a certain symmetry that when t is in self.ts,
+        # if alt_segment=False, then we prioritize a segment with a lower
+        # index.
+        ind = np.searchsorted(self.ts_sorted, t, side=self.side)
+
+        segment = min(max(ind - 1, 0), self.n_segments - 1)
+        if not self.ascending:
+            segment = self.n_segments - 1 - segment
+
+        return self.interpolants[segment](t)
+
+    def __call__(self, t):
+        """Evaluate the solution.
+
+        Parameters
+        ----------
+        t : float or array_like with shape (n_points,)
+            Points to evaluate at.
+
+        Returns
+        -------
+        y : ndarray, shape (n_states,) or (n_states, n_points)
+            Computed values. Shape depends on whether `t` is a scalar or a
+            1-D array.
+        """
+        t = np.asarray(t)
+
+        if t.ndim == 0:
+            return self._call_single(t)
+
+        order = np.argsort(t)
+        reverse = np.empty_like(order)
+        reverse[order] = np.arange(order.shape[0])
+        t_sorted = t[order]
+
+        # See comment in self._call_single.
+        segments = np.searchsorted(self.ts_sorted, t_sorted, side=self.side)
+        segments -= 1
+        segments[segments < 0] = 0
+        segments[segments > self.n_segments - 1] = self.n_segments - 1
+        if not self.ascending:
+            segments = self.n_segments - 1 - segments
+
+        ys = []
+        group_start = 0
+        for segment, group in groupby(segments):
+            group_end = group_start + len(list(group))
+            y = self.interpolants[segment](t_sorted[group_start:group_end])
+            ys.append(y)
+            group_start = group_end
+
+        ys = np.hstack(ys)
+        ys = ys[:, reverse]
+
+        return ys
+
+
+NUM_JAC_DIFF_REJECT = EPS ** 0.875
+NUM_JAC_DIFF_SMALL = EPS ** 0.75
+NUM_JAC_DIFF_BIG = EPS ** 0.25
+NUM_JAC_MIN_FACTOR = 1e3 * EPS
+NUM_JAC_FACTOR_INCREASE = 10
+NUM_JAC_FACTOR_DECREASE = 0.1
+
+
+def num_jac(fun, t, y, f, threshold, factor, sparsity=None):
+    """Finite differences Jacobian approximation tailored for ODE solvers.
+
+    This function computes finite difference approximation to the Jacobian
+    matrix of `fun` with respect to `y` using forward differences.
+    The Jacobian matrix has shape (n, n) and its element (i, j) is equal to
+    ``d f_i / d y_j``.
+
+    A special feature of this function is the ability to correct the step
+    size from iteration to iteration. The main idea is to keep the finite
+    difference significantly separated from its round-off error which
+    approximately equals ``EPS * np.abs(f)``. It reduces a possibility of a
+    huge error and assures that the estimated derivative are reasonably close
+    to the true values (i.e., the finite difference approximation is at least
+    qualitatively reflects the structure of the true Jacobian).
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system implemented in a vectorized fashion.
+    t : float
+        Current time.
+    y : ndarray, shape (n,)
+        Current state.
+    f : ndarray, shape (n,)
+        Value of the right hand side at (t, y).
+    threshold : float
+        Threshold for `y` value used for computing the step size as
+        ``factor * np.maximum(np.abs(y), threshold)``. Typically, the value of
+        absolute tolerance (atol) for a solver should be passed as `threshold`.
+    factor : ndarray with shape (n,) or None
+        Factor to use for computing the step size. Pass None for the very
+        evaluation, then use the value returned from this function.
+    sparsity : tuple (structure, groups) or None
+        Sparsity structure of the Jacobian, `structure` must be csc_matrix.
+
+    Returns
+    -------
+    J : ndarray or csc_matrix, shape (n, n)
+        Jacobian matrix.
+    factor : ndarray, shape (n,)
+        Suggested `factor` for the next evaluation.
+    """
+    y = np.asarray(y)
+    n = y.shape[0]
+    if n == 0:
+        return np.empty((0, 0)), factor
+
+    if factor is None:
+        factor = np.full(n, EPS ** 0.5)
+    else:
+        factor = factor.copy()
+
+    # Direct the step as ODE dictates, hoping that such a step won't lead to
+    # a problematic region. For complex ODEs it makes sense to use the real
+    # part of f as we use steps along real axis.
+    f_sign = 2 * (np.real(f) >= 0).astype(float) - 1
+    y_scale = f_sign * np.maximum(threshold, np.abs(y))
+    h = (y + factor * y_scale) - y
+
+    # Make sure that the step is not 0 to start with. Not likely it will be
+    # executed often.
+    for i in np.nonzero(h == 0)[0]:
+        while h[i] == 0:
+            factor[i] *= 10
+            h[i] = (y[i] + factor[i] * y_scale[i]) - y[i]
+
+    if sparsity is None:
+        return _dense_num_jac(fun, t, y, f, h, factor, y_scale)
+    else:
+        structure, groups = sparsity
+        return _sparse_num_jac(fun, t, y, f, h, factor, y_scale,
+                               structure, groups)
+
+
+def _dense_num_jac(fun, t, y, f, h, factor, y_scale):
+    n = y.shape[0]
+    h_vecs = np.diag(h)
+    f_new = fun(t, y[:, None] + h_vecs)
+    diff = f_new - f[:, None]
+    max_ind = np.argmax(np.abs(diff), axis=0)
+    r = np.arange(n)
+    max_diff = np.abs(diff[max_ind, r])
+    scale = np.maximum(np.abs(f[max_ind]), np.abs(f_new[max_ind, r]))
+
+    diff_too_small = max_diff < NUM_JAC_DIFF_REJECT * scale
+    if np.any(diff_too_small):
+        ind, = np.nonzero(diff_too_small)
+        new_factor = NUM_JAC_FACTOR_INCREASE * factor[ind]
+        h_new = (y[ind] + new_factor * y_scale[ind]) - y[ind]
+        h_vecs[ind, ind] = h_new
+        f_new = fun(t, y[:, None] + h_vecs[:, ind])
+        diff_new = f_new - f[:, None]
+        max_ind = np.argmax(np.abs(diff_new), axis=0)
+        r = np.arange(ind.shape[0])
+        max_diff_new = np.abs(diff_new[max_ind, r])
+        scale_new = np.maximum(np.abs(f[max_ind]), np.abs(f_new[max_ind, r]))
+
+        update = max_diff[ind] * scale_new < max_diff_new * scale[ind]
+        if np.any(update):
+            update, = np.nonzero(update)
+            update_ind = ind[update]
+            factor[update_ind] = new_factor[update]
+            h[update_ind] = h_new[update]
+            diff[:, update_ind] = diff_new[:, update]
+            scale[update_ind] = scale_new[update]
+            max_diff[update_ind] = max_diff_new[update]
+
+    diff /= h
+
+    factor[max_diff < NUM_JAC_DIFF_SMALL * scale] *= NUM_JAC_FACTOR_INCREASE
+    factor[max_diff > NUM_JAC_DIFF_BIG * scale] *= NUM_JAC_FACTOR_DECREASE
+    factor = np.maximum(factor, NUM_JAC_MIN_FACTOR)
+
+    return diff, factor
+
+
+def _sparse_num_jac(fun, t, y, f, h, factor, y_scale, structure, groups):
+    n = y.shape[0]
+    n_groups = np.max(groups) + 1
+    h_vecs = np.empty((n_groups, n))
+    for group in range(n_groups):
+        e = np.equal(group, groups)
+        h_vecs[group] = h * e
+    h_vecs = h_vecs.T
+
+    f_new = fun(t, y[:, None] + h_vecs)
+    df = f_new - f[:, None]
+
+    i, j, _ = find(structure)
+    diff = coo_matrix((df[i, groups[j]], (i, j)), shape=(n, n)).tocsc()
+    max_ind = np.array(abs(diff).argmax(axis=0)).ravel()
+    r = np.arange(n)
+    max_diff = np.asarray(np.abs(diff[max_ind, r])).ravel()
+    scale = np.maximum(np.abs(f[max_ind]),
+                       np.abs(f_new[max_ind, groups[r]]))
+
+    diff_too_small = max_diff < NUM_JAC_DIFF_REJECT * scale
+    if np.any(diff_too_small):
+        ind, = np.nonzero(diff_too_small)
+        new_factor = NUM_JAC_FACTOR_INCREASE * factor[ind]
+        h_new = (y[ind] + new_factor * y_scale[ind]) - y[ind]
+        h_new_all = np.zeros(n)
+        h_new_all[ind] = h_new
+
+        groups_unique = np.unique(groups[ind])
+        groups_map = np.empty(n_groups, dtype=int)
+        h_vecs = np.empty((groups_unique.shape[0], n))
+        for k, group in enumerate(groups_unique):
+            e = np.equal(group, groups)
+            h_vecs[k] = h_new_all * e
+            groups_map[group] = k
+        h_vecs = h_vecs.T
+
+        f_new = fun(t, y[:, None] + h_vecs)
+        df = f_new - f[:, None]
+        i, j, _ = find(structure[:, ind])
+        diff_new = coo_matrix((df[i, groups_map[groups[ind[j]]]],
+                               (i, j)), shape=(n, ind.shape[0])).tocsc()
+
+        max_ind_new = np.array(abs(diff_new).argmax(axis=0)).ravel()
+        r = np.arange(ind.shape[0])
+        max_diff_new = np.asarray(np.abs(diff_new[max_ind_new, r])).ravel()
+        scale_new = np.maximum(
+            np.abs(f[max_ind_new]),
+            np.abs(f_new[max_ind_new, groups_map[groups[ind]]]))
+
+        update = max_diff[ind] * scale_new < max_diff_new * scale[ind]
+        if np.any(update):
+            update, = np.nonzero(update)
+            update_ind = ind[update]
+            factor[update_ind] = new_factor[update]
+            h[update_ind] = h_new[update]
+            diff[:, update_ind] = diff_new[:, update]
+            scale[update_ind] = scale_new[update]
+            max_diff[update_ind] = max_diff_new[update]
+
+    diff.data /= np.repeat(h, np.diff(diff.indptr))
+
+    factor[max_diff < NUM_JAC_DIFF_SMALL * scale] *= NUM_JAC_FACTOR_INCREASE
+    factor[max_diff > NUM_JAC_DIFF_BIG * scale] *= NUM_JAC_FACTOR_DECREASE
+    factor = np.maximum(factor, NUM_JAC_MIN_FACTOR)
+
+    return diff, factor
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/dop853_coefficients.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/dop853_coefficients.py
new file mode 100644
index 0000000000000000000000000000000000000000..f39f2f3650d321e2c475d4e220f9769139118a5e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/dop853_coefficients.py
@@ -0,0 +1,193 @@
+import numpy as np
+
+N_STAGES = 12
+N_STAGES_EXTENDED = 16
+INTERPOLATOR_POWER = 7
+
+C = np.array([0.0,
+              0.526001519587677318785587544488e-01,
+              0.789002279381515978178381316732e-01,
+              0.118350341907227396726757197510,
+              0.281649658092772603273242802490,
+              0.333333333333333333333333333333,
+              0.25,
+              0.307692307692307692307692307692,
+              0.651282051282051282051282051282,
+              0.6,
+              0.857142857142857142857142857142,
+              1.0,
+              1.0,
+              0.1,
+              0.2,
+              0.777777777777777777777777777778])
+
+A = np.zeros((N_STAGES_EXTENDED, N_STAGES_EXTENDED))
+A[1, 0] = 5.26001519587677318785587544488e-2
+
+A[2, 0] = 1.97250569845378994544595329183e-2
+A[2, 1] = 5.91751709536136983633785987549e-2
+
+A[3, 0] = 2.95875854768068491816892993775e-2
+A[3, 2] = 8.87627564304205475450678981324e-2
+
+A[4, 0] = 2.41365134159266685502369798665e-1
+A[4, 2] = -8.84549479328286085344864962717e-1
+A[4, 3] = 9.24834003261792003115737966543e-1
+
+A[5, 0] = 3.7037037037037037037037037037e-2
+A[5, 3] = 1.70828608729473871279604482173e-1
+A[5, 4] = 1.25467687566822425016691814123e-1
+
+A[6, 0] = 3.7109375e-2
+A[6, 3] = 1.70252211019544039314978060272e-1
+A[6, 4] = 6.02165389804559606850219397283e-2
+A[6, 5] = -1.7578125e-2
+
+A[7, 0] = 3.70920001185047927108779319836e-2
+A[7, 3] = 1.70383925712239993810214054705e-1
+A[7, 4] = 1.07262030446373284651809199168e-1
+A[7, 5] = -1.53194377486244017527936158236e-2
+A[7, 6] = 8.27378916381402288758473766002e-3
+
+A[8, 0] = 6.24110958716075717114429577812e-1
+A[8, 3] = -3.36089262944694129406857109825
+A[8, 4] = -8.68219346841726006818189891453e-1
+A[8, 5] = 2.75920996994467083049415600797e1
+A[8, 6] = 2.01540675504778934086186788979e1
+A[8, 7] = -4.34898841810699588477366255144e1
+
+A[9, 0] = 4.77662536438264365890433908527e-1
+A[9, 3] = -2.48811461997166764192642586468
+A[9, 4] = -5.90290826836842996371446475743e-1
+A[9, 5] = 2.12300514481811942347288949897e1
+A[9, 6] = 1.52792336328824235832596922938e1
+A[9, 7] = -3.32882109689848629194453265587e1
+A[9, 8] = -2.03312017085086261358222928593e-2
+
+A[10, 0] = -9.3714243008598732571704021658e-1
+A[10, 3] = 5.18637242884406370830023853209
+A[10, 4] = 1.09143734899672957818500254654
+A[10, 5] = -8.14978701074692612513997267357
+A[10, 6] = -1.85200656599969598641566180701e1
+A[10, 7] = 2.27394870993505042818970056734e1
+A[10, 8] = 2.49360555267965238987089396762
+A[10, 9] = -3.0467644718982195003823669022
+
+A[11, 0] = 2.27331014751653820792359768449
+A[11, 3] = -1.05344954667372501984066689879e1
+A[11, 4] = -2.00087205822486249909675718444
+A[11, 5] = -1.79589318631187989172765950534e1
+A[11, 6] = 2.79488845294199600508499808837e1
+A[11, 7] = -2.85899827713502369474065508674
+A[11, 8] = -8.87285693353062954433549289258
+A[11, 9] = 1.23605671757943030647266201528e1
+A[11, 10] = 6.43392746015763530355970484046e-1
+
+A[12, 0] = 5.42937341165687622380535766363e-2
+A[12, 5] = 4.45031289275240888144113950566
+A[12, 6] = 1.89151789931450038304281599044
+A[12, 7] = -5.8012039600105847814672114227
+A[12, 8] = 3.1116436695781989440891606237e-1
+A[12, 9] = -1.52160949662516078556178806805e-1
+A[12, 10] = 2.01365400804030348374776537501e-1
+A[12, 11] = 4.47106157277725905176885569043e-2
+
+A[13, 0] = 5.61675022830479523392909219681e-2
+A[13, 6] = 2.53500210216624811088794765333e-1
+A[13, 7] = -2.46239037470802489917441475441e-1
+A[13, 8] = -1.24191423263816360469010140626e-1
+A[13, 9] = 1.5329179827876569731206322685e-1
+A[13, 10] = 8.20105229563468988491666602057e-3
+A[13, 11] = 7.56789766054569976138603589584e-3
+A[13, 12] = -8.298e-3
+
+A[14, 0] = 3.18346481635021405060768473261e-2
+A[14, 5] = 2.83009096723667755288322961402e-2
+A[14, 6] = 5.35419883074385676223797384372e-2
+A[14, 7] = -5.49237485713909884646569340306e-2
+A[14, 10] = -1.08347328697249322858509316994e-4
+A[14, 11] = 3.82571090835658412954920192323e-4
+A[14, 12] = -3.40465008687404560802977114492e-4
+A[14, 13] = 1.41312443674632500278074618366e-1
+
+A[15, 0] = -4.28896301583791923408573538692e-1
+A[15, 5] = -4.69762141536116384314449447206
+A[15, 6] = 7.68342119606259904184240953878
+A[15, 7] = 4.06898981839711007970213554331
+A[15, 8] = 3.56727187455281109270669543021e-1
+A[15, 12] = -1.39902416515901462129418009734e-3
+A[15, 13] = 2.9475147891527723389556272149
+A[15, 14] = -9.15095847217987001081870187138
+
+
+B = A[N_STAGES, :N_STAGES]
+
+E3 = np.zeros(N_STAGES + 1)
+E3[:-1] = B.copy()
+E3[0] -= 0.244094488188976377952755905512
+E3[8] -= 0.733846688281611857341361741547
+E3[11] -= 0.220588235294117647058823529412e-1
+
+E5 = np.zeros(N_STAGES + 1)
+E5[0] = 0.1312004499419488073250102996e-1
+E5[5] = -0.1225156446376204440720569753e+1
+E5[6] = -0.4957589496572501915214079952
+E5[7] = 0.1664377182454986536961530415e+1
+E5[8] = -0.3503288487499736816886487290
+E5[9] = 0.3341791187130174790297318841
+E5[10] = 0.8192320648511571246570742613e-1
+E5[11] = -0.2235530786388629525884427845e-1
+
+# First 3 coefficients are computed separately.
+D = np.zeros((INTERPOLATOR_POWER - 3, N_STAGES_EXTENDED))
+D[0, 0] = -0.84289382761090128651353491142e+1
+D[0, 5] = 0.56671495351937776962531783590
+D[0, 6] = -0.30689499459498916912797304727e+1
+D[0, 7] = 0.23846676565120698287728149680e+1
+D[0, 8] = 0.21170345824450282767155149946e+1
+D[0, 9] = -0.87139158377797299206789907490
+D[0, 10] = 0.22404374302607882758541771650e+1
+D[0, 11] = 0.63157877876946881815570249290
+D[0, 12] = -0.88990336451333310820698117400e-1
+D[0, 13] = 0.18148505520854727256656404962e+2
+D[0, 14] = -0.91946323924783554000451984436e+1
+D[0, 15] = -0.44360363875948939664310572000e+1
+
+D[1, 0] = 0.10427508642579134603413151009e+2
+D[1, 5] = 0.24228349177525818288430175319e+3
+D[1, 6] = 0.16520045171727028198505394887e+3
+D[1, 7] = -0.37454675472269020279518312152e+3
+D[1, 8] = -0.22113666853125306036270938578e+2
+D[1, 9] = 0.77334326684722638389603898808e+1
+D[1, 10] = -0.30674084731089398182061213626e+2
+D[1, 11] = -0.93321305264302278729567221706e+1
+D[1, 12] = 0.15697238121770843886131091075e+2
+D[1, 13] = -0.31139403219565177677282850411e+2
+D[1, 14] = -0.93529243588444783865713862664e+1
+D[1, 15] = 0.35816841486394083752465898540e+2
+
+D[2, 0] = 0.19985053242002433820987653617e+2
+D[2, 5] = -0.38703730874935176555105901742e+3
+D[2, 6] = -0.18917813819516756882830838328e+3
+D[2, 7] = 0.52780815920542364900561016686e+3
+D[2, 8] = -0.11573902539959630126141871134e+2
+D[2, 9] = 0.68812326946963000169666922661e+1
+D[2, 10] = -0.10006050966910838403183860980e+1
+D[2, 11] = 0.77771377980534432092869265740
+D[2, 12] = -0.27782057523535084065932004339e+1
+D[2, 13] = -0.60196695231264120758267380846e+2
+D[2, 14] = 0.84320405506677161018159903784e+2
+D[2, 15] = 0.11992291136182789328035130030e+2
+
+D[3, 0] = -0.25693933462703749003312586129e+2
+D[3, 5] = -0.15418974869023643374053993627e+3
+D[3, 6] = -0.23152937917604549567536039109e+3
+D[3, 7] = 0.35763911791061412378285349910e+3
+D[3, 8] = 0.93405324183624310003907691704e+2
+D[3, 9] = -0.37458323136451633156875139351e+2
+D[3, 10] = 0.10409964950896230045147246184e+3
+D[3, 11] = 0.29840293426660503123344363579e+2
+D[3, 12] = -0.43533456590011143754432175058e+2
+D[3, 13] = 0.96324553959188282948394950600e+2
+D[3, 14] = -0.39177261675615439165231486172e+2
+D[3, 15] = -0.14972683625798562581422125276e+3
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/ivp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/ivp.py
new file mode 100644
index 0000000000000000000000000000000000000000..8186982e4fddbd8c1058b59c745ca66ab3a9c224
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/ivp.py
@@ -0,0 +1,755 @@
+import inspect
+import numpy as np
+from .bdf import BDF
+from .radau import Radau
+from .rk import RK23, RK45, DOP853
+from .lsoda import LSODA
+from scipy.optimize import OptimizeResult
+from .common import EPS, OdeSolution
+from .base import OdeSolver
+
+
+METHODS = {'RK23': RK23,
+           'RK45': RK45,
+           'DOP853': DOP853,
+           'Radau': Radau,
+           'BDF': BDF,
+           'LSODA': LSODA}
+
+
+MESSAGES = {0: "The solver successfully reached the end of the integration interval.",
+            1: "A termination event occurred."}
+
+
+class OdeResult(OptimizeResult):
+    pass
+
+
+def prepare_events(events):
+    """Standardize event functions and extract attributes."""
+    if callable(events):
+        events = (events,)
+
+    max_events = np.empty(len(events))
+    direction = np.empty(len(events))
+    for i, event in enumerate(events):
+        terminal = getattr(event, 'terminal', None)
+        direction[i] = getattr(event, 'direction', 0)
+
+        message = ('The `terminal` attribute of each event '
+                   'must be a boolean or positive integer.')
+        if terminal is None or terminal == 0:
+            max_events[i] = np.inf
+        elif int(terminal) == terminal and terminal > 0:
+            max_events[i] = terminal
+        else:
+            raise ValueError(message)
+
+    return events, max_events, direction
+
+
+def solve_event_equation(event, sol, t_old, t):
+    """Solve an equation corresponding to an ODE event.
+
+    The equation is ``event(t, y(t)) = 0``, here ``y(t)`` is known from an
+    ODE solver using some sort of interpolation. It is solved by
+    `scipy.optimize.brentq` with xtol=atol=4*EPS.
+
+    Parameters
+    ----------
+    event : callable
+        Function ``event(t, y)``.
+    sol : callable
+        Function ``sol(t)`` which evaluates an ODE solution between `t_old`
+        and  `t`.
+    t_old, t : float
+        Previous and new values of time. They will be used as a bracketing
+        interval.
+
+    Returns
+    -------
+    root : float
+        Found solution.
+    """
+    from scipy.optimize import brentq
+    return brentq(lambda t: event(t, sol(t)), t_old, t,
+                  xtol=4 * EPS, rtol=4 * EPS)
+
+
+def handle_events(sol, events, active_events, event_count, max_events,
+                  t_old, t):
+    """Helper function to handle events.
+
+    Parameters
+    ----------
+    sol : DenseOutput
+        Function ``sol(t)`` which evaluates an ODE solution between `t_old`
+        and  `t`.
+    events : list of callables, length n_events
+        Event functions with signatures ``event(t, y)``.
+    active_events : ndarray
+        Indices of events which occurred.
+    event_count : ndarray
+        Current number of occurrences for each event.
+    max_events : ndarray, shape (n_events,)
+        Number of occurrences allowed for each event before integration
+        termination is issued.
+    t_old, t : float
+        Previous and new values of time.
+
+    Returns
+    -------
+    root_indices : ndarray
+        Indices of events which take zero between `t_old` and `t` and before
+        a possible termination.
+    roots : ndarray
+        Values of t at which events occurred.
+    terminate : bool
+        Whether a terminal event occurred.
+    """
+    roots = [solve_event_equation(events[event_index], sol, t_old, t)
+             for event_index in active_events]
+
+    roots = np.asarray(roots)
+
+    if np.any(event_count[active_events] >= max_events[active_events]):
+        if t > t_old:
+            order = np.argsort(roots)
+        else:
+            order = np.argsort(-roots)
+        active_events = active_events[order]
+        roots = roots[order]
+        t = np.nonzero(event_count[active_events]
+                       >= max_events[active_events])[0][0]
+        active_events = active_events[:t + 1]
+        roots = roots[:t + 1]
+        terminate = True
+    else:
+        terminate = False
+
+    return active_events, roots, terminate
+
+
+def find_active_events(g, g_new, direction):
+    """Find which event occurred during an integration step.
+
+    Parameters
+    ----------
+    g, g_new : array_like, shape (n_events,)
+        Values of event functions at a current and next points.
+    direction : ndarray, shape (n_events,)
+        Event "direction" according to the definition in `solve_ivp`.
+
+    Returns
+    -------
+    active_events : ndarray
+        Indices of events which occurred during the step.
+    """
+    g, g_new = np.asarray(g), np.asarray(g_new)
+    up = (g <= 0) & (g_new >= 0)
+    down = (g >= 0) & (g_new <= 0)
+    either = up | down
+    mask = (up & (direction > 0) |
+            down & (direction < 0) |
+            either & (direction == 0))
+
+    return np.nonzero(mask)[0]
+
+
+def solve_ivp(fun, t_span, y0, method='RK45', t_eval=None, dense_output=False,
+              events=None, vectorized=False, args=None, **options):
+    """Solve an initial value problem for a system of ODEs.
+
+    This function numerically integrates a system of ordinary differential
+    equations given an initial value::
+
+        dy / dt = f(t, y)
+        y(t0) = y0
+
+    Here t is a 1-D independent variable (time), y(t) is an
+    N-D vector-valued function (state), and an N-D
+    vector-valued function f(t, y) determines the differential equations.
+    The goal is to find y(t) approximately satisfying the differential
+    equations, given an initial value y(t0)=y0.
+
+    Some of the solvers support integration in the complex domain, but note
+    that for stiff ODE solvers, the right-hand side must be
+    complex-differentiable (satisfy Cauchy-Riemann equations [11]_).
+    To solve a problem in the complex domain, pass y0 with a complex data type.
+    Another option always available is to rewrite your problem for real and
+    imaginary parts separately.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. Additional
+        arguments need to be passed if ``args`` is used (see documentation of
+        ``args`` argument). ``fun`` must return an array of the same shape as
+        ``y``. See `vectorized` for more information.
+    t_span : 2-member sequence
+        Interval of integration (t0, tf). The solver starts with t=t0 and
+        integrates until it reaches t=tf. Both t0 and tf must be floats
+        or values interpretable by the float conversion function.
+    y0 : array_like, shape (n,)
+        Initial state. For problems in the complex domain, pass `y0` with a
+        complex data type (even if the initial value is purely real).
+    method : string or `OdeSolver`, optional
+        Integration method to use:
+
+            * 'RK45' (default): Explicit Runge-Kutta method of order 5(4) [1]_.
+              The error is controlled assuming accuracy of the fourth-order
+              method, but steps are taken using the fifth-order accurate
+              formula (local extrapolation is done). A quartic interpolation
+              polynomial is used for the dense output [2]_. Can be applied in
+              the complex domain.
+            * 'RK23': Explicit Runge-Kutta method of order 3(2) [3]_. The error
+              is controlled assuming accuracy of the second-order method, but
+              steps are taken using the third-order accurate formula (local
+              extrapolation is done). A cubic Hermite polynomial is used for the
+              dense output. Can be applied in the complex domain.
+            * 'DOP853': Explicit Runge-Kutta method of order 8 [13]_.
+              Python implementation of the "DOP853" algorithm originally
+              written in Fortran [14]_. A 7-th order interpolation polynomial
+              accurate to 7-th order is used for the dense output.
+              Can be applied in the complex domain.
+            * 'Radau': Implicit Runge-Kutta method of the Radau IIA family of
+              order 5 [4]_. The error is controlled with a third-order accurate
+              embedded formula. A cubic polynomial which satisfies the
+              collocation conditions is used for the dense output.
+            * 'BDF': Implicit multi-step variable-order (1 to 5) method based
+              on a backward differentiation formula for the derivative
+              approximation [5]_. The implementation follows the one described
+              in [6]_. A quasi-constant step scheme is used and accuracy is
+              enhanced using the NDF modification. Can be applied in the
+              complex domain.
+            * 'LSODA': Adams/BDF method with automatic stiffness detection and
+              switching [7]_, [8]_. This is a wrapper of the Fortran solver
+              from ODEPACK.
+
+        Explicit Runge-Kutta methods ('RK23', 'RK45', 'DOP853') should be used
+        for non-stiff problems and implicit methods ('Radau', 'BDF') for
+        stiff problems [9]_. Among Runge-Kutta methods, 'DOP853' is recommended
+        for solving with high precision (low values of `rtol` and `atol`).
+
+        If not sure, first try to run 'RK45'. If it makes unusually many
+        iterations, diverges, or fails, your problem is likely to be stiff and
+        you should use 'Radau' or 'BDF'. 'LSODA' can also be a good universal
+        choice, but it might be somewhat less convenient to work with as it
+        wraps old Fortran code.
+
+        You can also pass an arbitrary class derived from `OdeSolver` which
+        implements the solver.
+    t_eval : array_like or None, optional
+        Times at which to store the computed solution, must be sorted and lie
+        within `t_span`. If None (default), use points selected by the solver.
+    dense_output : bool, optional
+        Whether to compute a continuous solution. Default is False.
+    events : callable, or list of callables, optional
+        Events to track. If None (default), no events will be tracked.
+        Each event occurs at the zeros of a continuous function of time and
+        state. Each function must have the signature ``event(t, y)`` where
+        additional argument have to be passed if ``args`` is used (see
+        documentation of ``args`` argument). Each function must return a
+        float. The solver will find an accurate value of `t` at which
+        ``event(t, y(t)) = 0`` using a root-finding algorithm. By default,
+        all zeros will be found. The solver looks for a sign change over
+        each step, so if multiple zero crossings occur within one step,
+        events may be missed. Additionally each `event` function might
+        have the following attributes:
+
+            terminal: bool or int, optional
+                When boolean, whether to terminate integration if this event occurs.
+                When integral, termination occurs after the specified the number of
+                occurrences of this event.
+                Implicitly False if not assigned.
+            direction: float, optional
+                Direction of a zero crossing. If `direction` is positive,
+                `event` will only trigger when going from negative to positive,
+                and vice versa if `direction` is negative. If 0, then either
+                direction will trigger event. Implicitly 0 if not assigned.
+
+        You can assign attributes like ``event.terminal = True`` to any
+        function in Python.
+    vectorized : bool, optional
+        Whether `fun` can be called in a vectorized fashion. Default is False.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by methods 'Radau' and 'BDF', but
+        will result in slower execution for other methods and for 'Radau' and
+        'BDF' in some circumstances (e.g. small ``len(y0)``).
+    args : tuple, optional
+        Additional arguments to pass to the user-defined functions.  If given,
+        the additional arguments are passed to all user-defined functions.
+        So if, for example, `fun` has the signature ``fun(t, y, a, b, c)``,
+        then `jac` (if given) and any event functions must have the same
+        signature, and `args` must be a tuple of length 3.
+    **options
+        Options passed to a chosen solver. All options available for already
+        implemented solvers are listed below.
+    first_step : float or None, optional
+        Initial step size. Default is `None` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float or array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    jac : array_like, sparse_matrix, callable or None, optional
+        Jacobian matrix of the right-hand side of the system with respect
+        to y, required by the 'Radau', 'BDF' and 'LSODA' method. The
+        Jacobian matrix has shape (n, n) and its element (i, j) is equal to
+        ``d f_i / d y_j``.  There are three ways to define the Jacobian:
+
+            * If array_like or sparse_matrix, the Jacobian is assumed to
+              be constant. Not supported by 'LSODA'.
+            * If callable, the Jacobian is assumed to depend on both
+              t and y; it will be called as ``jac(t, y)``, as necessary.
+              Additional arguments have to be passed if ``args`` is
+              used (see documentation of ``args`` argument).
+              For 'Radau' and 'BDF' methods, the return value might be a
+              sparse matrix.
+            * If None (default), the Jacobian will be approximated by
+              finite differences.
+
+        It is generally recommended to provide the Jacobian rather than
+        relying on a finite-difference approximation.
+    jac_sparsity : array_like, sparse matrix or None, optional
+        Defines a sparsity structure of the Jacobian matrix for a finite-
+        difference approximation. Its shape must be (n, n). This argument
+        is ignored if `jac` is not `None`. If the Jacobian has only few
+        non-zero elements in *each* row, providing the sparsity structure
+        will greatly speed up the computations [10]_. A zero entry means that
+        a corresponding element in the Jacobian is always zero. If None
+        (default), the Jacobian is assumed to be dense.
+        Not supported by 'LSODA', see `lband` and `uband` instead.
+    lband, uband : int or None, optional
+        Parameters defining the bandwidth of the Jacobian for the 'LSODA'
+        method, i.e., ``jac[i, j] != 0 only for i - lband <= j <= i + uband``.
+        Default is None. Setting these requires your jac routine to return the
+        Jacobian in the packed format: the returned array must have ``n``
+        columns and ``uband + lband + 1`` rows in which Jacobian diagonals are
+        written. Specifically ``jac_packed[uband + i - j , j] = jac[i, j]``.
+        The same format is used in `scipy.linalg.solve_banded` (check for an
+        illustration).  These parameters can be also used with ``jac=None`` to
+        reduce the number of Jacobian elements estimated by finite differences.
+    min_step : float, optional
+        The minimum allowed step size for 'LSODA' method.
+        By default `min_step` is zero.
+
+    Returns
+    -------
+    Bunch object with the following fields defined:
+    t : ndarray, shape (n_points,)
+        Time points.
+    y : ndarray, shape (n, n_points)
+        Values of the solution at `t`.
+    sol : `OdeSolution` or None
+        Found solution as `OdeSolution` instance; None if `dense_output` was
+        set to False.
+    t_events : list of ndarray or None
+        Contains for each event type a list of arrays at which an event of
+        that type event was detected. None if `events` was None.
+    y_events : list of ndarray or None
+        For each value of `t_events`, the corresponding value of the solution.
+        None if `events` was None.
+    nfev : int
+        Number of evaluations of the right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+    nlu : int
+        Number of LU decompositions.
+    status : int
+        Reason for algorithm termination:
+
+            * -1: Integration step failed.
+            *  0: The solver successfully reached the end of `tspan`.
+            *  1: A termination event occurred.
+
+    message : string
+        Human-readable description of the termination reason.
+    success : bool
+        True if the solver reached the interval end or a termination event
+        occurred (``status >= 0``).
+
+    References
+    ----------
+    .. [1] J. R. Dormand, P. J. Prince, "A family of embedded Runge-Kutta
+           formulae", Journal of Computational and Applied Mathematics, Vol. 6,
+           No. 1, pp. 19-26, 1980.
+    .. [2] L. W. Shampine, "Some Practical Runge-Kutta Formulas", Mathematics
+           of Computation,, Vol. 46, No. 173, pp. 135-150, 1986.
+    .. [3] P. Bogacki, L.F. Shampine, "A 3(2) Pair of Runge-Kutta Formulas",
+           Appl. Math. Lett. Vol. 2, No. 4. pp. 321-325, 1989.
+    .. [4] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations II:
+           Stiff and Differential-Algebraic Problems", Sec. IV.8.
+    .. [5] `Backward Differentiation Formula
+            `_
+            on Wikipedia.
+    .. [6] L. F. Shampine, M. W. Reichelt, "THE MATLAB ODE SUITE", SIAM J. SCI.
+           COMPUTE., Vol. 18, No. 1, pp. 1-22, January 1997.
+    .. [7] A. C. Hindmarsh, "ODEPACK, A Systematized Collection of ODE
+           Solvers," IMACS Transactions on Scientific Computation, Vol 1.,
+           pp. 55-64, 1983.
+    .. [8] L. Petzold, "Automatic selection of methods for solving stiff and
+           nonstiff systems of ordinary differential equations", SIAM Journal
+           on Scientific and Statistical Computing, Vol. 4, No. 1, pp. 136-148,
+           1983.
+    .. [9] `Stiff equation `_ on
+           Wikipedia.
+    .. [10] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+            sparse Jacobian matrices", Journal of the Institute of Mathematics
+            and its Applications, 13, pp. 117-120, 1974.
+    .. [11] `Cauchy-Riemann equations
+             `_ on
+             Wikipedia.
+    .. [12] `Lotka-Volterra equations
+            `_
+            on Wikipedia.
+    .. [13] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
+            Equations I: Nonstiff Problems", Sec. II.
+    .. [14] `Page with original Fortran code of DOP853
+            `_.
+
+    Examples
+    --------
+    Basic exponential decay showing automatically chosen time points.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import solve_ivp
+    >>> def exponential_decay(t, y): return -0.5 * y
+    >>> sol = solve_ivp(exponential_decay, [0, 10], [2, 4, 8])
+    >>> print(sol.t)
+    [ 0.          0.11487653  1.26364188  3.06061781  4.81611105  6.57445806
+      8.33328988 10.        ]
+    >>> print(sol.y)
+    [[2.         1.88836035 1.06327177 0.43319312 0.18017253 0.07483045
+      0.03107158 0.01350781]
+     [4.         3.7767207  2.12654355 0.86638624 0.36034507 0.14966091
+      0.06214316 0.02701561]
+     [8.         7.5534414  4.25308709 1.73277247 0.72069014 0.29932181
+      0.12428631 0.05403123]]
+
+    Specifying points where the solution is desired.
+
+    >>> sol = solve_ivp(exponential_decay, [0, 10], [2, 4, 8],
+    ...                 t_eval=[0, 1, 2, 4, 10])
+    >>> print(sol.t)
+    [ 0  1  2  4 10]
+    >>> print(sol.y)
+    [[2.         1.21305369 0.73534021 0.27066736 0.01350938]
+     [4.         2.42610739 1.47068043 0.54133472 0.02701876]
+     [8.         4.85221478 2.94136085 1.08266944 0.05403753]]
+
+    Cannon fired upward with terminal event upon impact. The ``terminal`` and
+    ``direction`` fields of an event are applied by monkey patching a function.
+    Here ``y[0]`` is position and ``y[1]`` is velocity. The projectile starts
+    at position 0 with velocity +10. Note that the integration never reaches
+    t=100 because the event is terminal.
+
+    >>> def upward_cannon(t, y): return [y[1], -0.5]
+    >>> def hit_ground(t, y): return y[0]
+    >>> hit_ground.terminal = True
+    >>> hit_ground.direction = -1
+    >>> sol = solve_ivp(upward_cannon, [0, 100], [0, 10], events=hit_ground)
+    >>> print(sol.t_events)
+    [array([40.])]
+    >>> print(sol.t)
+    [0.00000000e+00 9.99900010e-05 1.09989001e-03 1.10988901e-02
+     1.11088891e-01 1.11098890e+00 1.11099890e+01 4.00000000e+01]
+
+    Use `dense_output` and `events` to find position, which is 100, at the apex
+    of the cannonball's trajectory. Apex is not defined as terminal, so both
+    apex and hit_ground are found. There is no information at t=20, so the sol
+    attribute is used to evaluate the solution. The sol attribute is returned
+    by setting ``dense_output=True``. Alternatively, the `y_events` attribute
+    can be used to access the solution at the time of the event.
+
+    >>> def apex(t, y): return y[1]
+    >>> sol = solve_ivp(upward_cannon, [0, 100], [0, 10],
+    ...                 events=(hit_ground, apex), dense_output=True)
+    >>> print(sol.t_events)
+    [array([40.]), array([20.])]
+    >>> print(sol.t)
+    [0.00000000e+00 9.99900010e-05 1.09989001e-03 1.10988901e-02
+     1.11088891e-01 1.11098890e+00 1.11099890e+01 4.00000000e+01]
+    >>> print(sol.sol(sol.t_events[1][0]))
+    [100.   0.]
+    >>> print(sol.y_events)
+    [array([[-5.68434189e-14, -1.00000000e+01]]),
+     array([[1.00000000e+02, 1.77635684e-15]])]
+
+    As an example of a system with additional parameters, we'll implement
+    the Lotka-Volterra equations [12]_.
+
+    >>> def lotkavolterra(t, z, a, b, c, d):
+    ...     x, y = z
+    ...     return [a*x - b*x*y, -c*y + d*x*y]
+    ...
+
+    We pass in the parameter values a=1.5, b=1, c=3 and d=1 with the `args`
+    argument.
+
+    >>> sol = solve_ivp(lotkavolterra, [0, 15], [10, 5], args=(1.5, 1, 3, 1),
+    ...                 dense_output=True)
+
+    Compute a dense solution and plot it.
+
+    >>> t = np.linspace(0, 15, 300)
+    >>> z = sol.sol(t)
+    >>> import matplotlib.pyplot as plt
+    >>> plt.plot(t, z.T)
+    >>> plt.xlabel('t')
+    >>> plt.legend(['x', 'y'], shadow=True)
+    >>> plt.title('Lotka-Volterra System')
+    >>> plt.show()
+
+    A couple examples of using solve_ivp to solve the differential
+    equation ``y' = Ay`` with complex matrix ``A``.
+
+    >>> A = np.array([[-0.25 + 0.14j, 0, 0.33 + 0.44j],
+    ...               [0.25 + 0.58j, -0.2 + 0.14j, 0],
+    ...               [0, 0.2 + 0.4j, -0.1 + 0.97j]])
+
+    Solving an IVP with ``A`` from above and ``y`` as 3x1 vector:
+
+    >>> def deriv_vec(t, y):
+    ...     return A @ y
+    >>> result = solve_ivp(deriv_vec, [0, 25],
+    ...                    np.array([10 + 0j, 20 + 0j, 30 + 0j]),
+    ...                    t_eval=np.linspace(0, 25, 101))
+    >>> print(result.y[:, 0])
+    [10.+0.j 20.+0.j 30.+0.j]
+    >>> print(result.y[:, -1])
+    [18.46291039+45.25653651j 10.01569306+36.23293216j
+     -4.98662741+80.07360388j]
+
+    Solving an IVP with ``A`` from above with ``y`` as 3x3 matrix :
+
+    >>> def deriv_mat(t, y):
+    ...     return (A @ y.reshape(3, 3)).flatten()
+    >>> y0 = np.array([[2 + 0j, 3 + 0j, 4 + 0j],
+    ...                [5 + 0j, 6 + 0j, 7 + 0j],
+    ...                [9 + 0j, 34 + 0j, 78 + 0j]])
+
+    >>> result = solve_ivp(deriv_mat, [0, 25], y0.flatten(),
+    ...                    t_eval=np.linspace(0, 25, 101))
+    >>> print(result.y[:, 0].reshape(3, 3))
+    [[ 2.+0.j  3.+0.j  4.+0.j]
+     [ 5.+0.j  6.+0.j  7.+0.j]
+     [ 9.+0.j 34.+0.j 78.+0.j]]
+    >>> print(result.y[:, -1].reshape(3, 3))
+    [[  5.67451179 +12.07938445j  17.2888073  +31.03278837j
+        37.83405768 +63.25138759j]
+     [  3.39949503 +11.82123994j  21.32530996 +44.88668871j
+        53.17531184+103.80400411j]
+     [ -2.26105874 +22.19277664j -15.1255713  +70.19616341j
+       -38.34616845+153.29039931j]]
+
+
+    """
+    if method not in METHODS and not (
+            inspect.isclass(method) and issubclass(method, OdeSolver)):
+        raise ValueError(f"`method` must be one of {METHODS} or OdeSolver class.")
+
+    t0, tf = map(float, t_span)
+
+    if args is not None:
+        # Wrap the user's fun (and jac, if given) in lambdas to hide the
+        # additional parameters.  Pass in the original fun as a keyword
+        # argument to keep it in the scope of the lambda.
+        try:
+            _ = [*(args)]
+        except TypeError as exp:
+            suggestion_tuple = (
+                "Supplied 'args' cannot be unpacked. Please supply `args`"
+                f" as a tuple (e.g. `args=({args},)`)"
+            )
+            raise TypeError(suggestion_tuple) from exp
+
+        def fun(t, x, fun=fun):
+            return fun(t, x, *args)
+        jac = options.get('jac')
+        if callable(jac):
+            options['jac'] = lambda t, x: jac(t, x, *args)
+
+    if t_eval is not None:
+        t_eval = np.asarray(t_eval)
+        if t_eval.ndim != 1:
+            raise ValueError("`t_eval` must be 1-dimensional.")
+
+        if np.any(t_eval < min(t0, tf)) or np.any(t_eval > max(t0, tf)):
+            raise ValueError("Values in `t_eval` are not within `t_span`.")
+
+        d = np.diff(t_eval)
+        if tf > t0 and np.any(d <= 0) or tf < t0 and np.any(d >= 0):
+            raise ValueError("Values in `t_eval` are not properly sorted.")
+
+        if tf > t0:
+            t_eval_i = 0
+        else:
+            # Make order of t_eval decreasing to use np.searchsorted.
+            t_eval = t_eval[::-1]
+            # This will be an upper bound for slices.
+            t_eval_i = t_eval.shape[0]
+
+    if method in METHODS:
+        method = METHODS[method]
+
+    solver = method(fun, t0, y0, tf, vectorized=vectorized, **options)
+
+    if t_eval is None:
+        ts = [t0]
+        ys = [y0]
+    elif t_eval is not None and dense_output:
+        ts = []
+        ti = [t0]
+        ys = []
+    else:
+        ts = []
+        ys = []
+
+    interpolants = []
+
+    if events is not None:
+        events, max_events, event_dir = prepare_events(events)
+        event_count = np.zeros(len(events))
+        if args is not None:
+            # Wrap user functions in lambdas to hide the additional parameters.
+            # The original event function is passed as a keyword argument to the
+            # lambda to keep the original function in scope (i.e., avoid the
+            # late binding closure "gotcha").
+            events = [lambda t, x, event=event: event(t, x, *args)
+                      for event in events]
+        g = [event(t0, y0) for event in events]
+        t_events = [[] for _ in range(len(events))]
+        y_events = [[] for _ in range(len(events))]
+    else:
+        t_events = None
+        y_events = None
+
+    status = None
+    while status is None:
+        message = solver.step()
+
+        if solver.status == 'finished':
+            status = 0
+        elif solver.status == 'failed':
+            status = -1
+            break
+
+        t_old = solver.t_old
+        t = solver.t
+        y = solver.y
+
+        if dense_output:
+            sol = solver.dense_output()
+            interpolants.append(sol)
+        else:
+            sol = None
+
+        if events is not None:
+            g_new = [event(t, y) for event in events]
+            active_events = find_active_events(g, g_new, event_dir)
+            if active_events.size > 0:
+                if sol is None:
+                    sol = solver.dense_output()
+
+                event_count[active_events] += 1
+                root_indices, roots, terminate = handle_events(
+                    sol, events, active_events, event_count, max_events,
+                    t_old, t)
+
+                for e, te in zip(root_indices, roots):
+                    t_events[e].append(te)
+                    y_events[e].append(sol(te))
+
+                if terminate:
+                    status = 1
+                    t = roots[-1]
+                    y = sol(t)
+
+            g = g_new
+
+        if t_eval is None:
+            donot_append = (len(ts) > 1 and
+                            ts[-1] == t and
+                            dense_output)
+            if not donot_append:
+                ts.append(t)
+                ys.append(y)
+            else:
+                if len(interpolants) > 0:
+                    interpolants.pop()
+        else:
+            # The value in t_eval equal to t will be included.
+            if solver.direction > 0:
+                t_eval_i_new = np.searchsorted(t_eval, t, side='right')
+                t_eval_step = t_eval[t_eval_i:t_eval_i_new]
+            else:
+                t_eval_i_new = np.searchsorted(t_eval, t, side='left')
+                # It has to be done with two slice operations, because
+                # you can't slice to 0th element inclusive using backward
+                # slicing.
+                t_eval_step = t_eval[t_eval_i_new:t_eval_i][::-1]
+
+            if t_eval_step.size > 0:
+                if sol is None:
+                    sol = solver.dense_output()
+                ts.append(t_eval_step)
+                ys.append(sol(t_eval_step))
+                t_eval_i = t_eval_i_new
+
+        if t_eval is not None and dense_output:
+            ti.append(t)
+
+    message = MESSAGES.get(status, message)
+
+    if t_events is not None:
+        t_events = [np.asarray(te) for te in t_events]
+        y_events = [np.asarray(ye) for ye in y_events]
+
+    if t_eval is None:
+        ts = np.array(ts)
+        ys = np.vstack(ys).T
+    elif ts:
+        ts = np.hstack(ts)
+        ys = np.hstack(ys)
+
+    if dense_output:
+        if t_eval is None:
+            sol = OdeSolution(
+                ts, interpolants, alt_segment=True if method in [BDF, LSODA] else False
+            )
+        else:
+            sol = OdeSolution(
+                ti, interpolants, alt_segment=True if method in [BDF, LSODA] else False
+            )
+    else:
+        sol = None
+
+    return OdeResult(t=ts, y=ys, sol=sol, t_events=t_events, y_events=y_events,
+                     nfev=solver.nfev, njev=solver.njev, nlu=solver.nlu,
+                     status=status, message=message, success=status >= 0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/lsoda.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/lsoda.py
new file mode 100644
index 0000000000000000000000000000000000000000..2a5a7c530c04eddc9beff44e2d4f6df439d5ef01
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/lsoda.py
@@ -0,0 +1,224 @@
+import numpy as np
+from scipy.integrate import ode
+from .common import validate_tol, validate_first_step, warn_extraneous
+from .base import OdeSolver, DenseOutput
+
+
+class LSODA(OdeSolver):
+    """Adams/BDF method with automatic stiffness detection and switching.
+
+    This is a wrapper to the Fortran solver from ODEPACK [1]_. It switches
+    automatically between the nonstiff Adams method and the stiff BDF method.
+    The method was originally detailed in [2]_.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
+        return an array of the same shape as ``y``. See `vectorized` for more
+        information.
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    min_step : float, optional
+        Minimum allowed step size. Default is 0.0, i.e., the step size is not
+        bounded and determined solely by the solver.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    jac : None or callable, optional
+        Jacobian matrix of the right-hand side of the system with respect to
+        ``y``. The Jacobian matrix has shape (n, n) and its element (i, j) is
+        equal to ``d f_i / d y_j``. The function will be called as
+        ``jac(t, y)``. If None (default), the Jacobian will be
+        approximated by finite differences. It is generally recommended to
+        provide the Jacobian rather than relying on a finite-difference
+        approximation.
+    lband, uband : int or None
+        Parameters defining the bandwidth of the Jacobian,
+        i.e., ``jac[i, j] != 0 only for i - lband <= j <= i + uband``. Setting
+        these requires your jac routine to return the Jacobian in the packed format:
+        the returned array must have ``n`` columns and ``uband + lband + 1``
+        rows in which Jacobian diagonals are written. Specifically
+        ``jac_packed[uband + i - j , j] = jac[i, j]``. The same format is used
+        in `scipy.linalg.solve_banded` (check for an illustration).
+        These parameters can be also used with ``jac=None`` to reduce the
+        number of Jacobian elements estimated by finite differences.
+    vectorized : bool, optional
+        Whether `fun` may be called in a vectorized fashion. False (default)
+        is recommended for this solver.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by methods 'Radau' and 'BDF', but
+        will result in slower execution for this solver.
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    nfev : int
+        Number of evaluations of the right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+
+    References
+    ----------
+    .. [1] A. C. Hindmarsh, "ODEPACK, A Systematized Collection of ODE
+           Solvers," IMACS Transactions on Scientific Computation, Vol 1.,
+           pp. 55-64, 1983.
+    .. [2] L. Petzold, "Automatic selection of methods for solving stiff and
+           nonstiff systems of ordinary differential equations", SIAM Journal
+           on Scientific and Statistical Computing, Vol. 4, No. 1, pp. 136-148,
+           1983.
+    """
+    def __init__(self, fun, t0, y0, t_bound, first_step=None, min_step=0.0,
+                 max_step=np.inf, rtol=1e-3, atol=1e-6, jac=None, lband=None,
+                 uband=None, vectorized=False, **extraneous):
+        warn_extraneous(extraneous)
+        super().__init__(fun, t0, y0, t_bound, vectorized)
+
+        if first_step is None:
+            first_step = 0  # LSODA value for automatic selection.
+        else:
+            first_step = validate_first_step(first_step, t0, t_bound)
+
+        first_step *= self.direction
+
+        if max_step == np.inf:
+            max_step = 0  # LSODA value for infinity.
+        elif max_step <= 0:
+            raise ValueError("`max_step` must be positive.")
+
+        if min_step < 0:
+            raise ValueError("`min_step` must be nonnegative.")
+
+        rtol, atol = validate_tol(rtol, atol, self.n)
+
+        solver = ode(self.fun, jac)
+        solver.set_integrator('lsoda', rtol=rtol, atol=atol, max_step=max_step,
+                              min_step=min_step, first_step=first_step,
+                              lband=lband, uband=uband)
+        solver.set_initial_value(y0, t0)
+
+        # Inject t_bound into rwork array as needed for itask=5.
+        solver._integrator.rwork[0] = self.t_bound
+        solver._integrator.call_args[4] = solver._integrator.rwork
+
+        self._lsoda_solver = solver
+
+    def _step_impl(self):
+        solver = self._lsoda_solver
+        integrator = solver._integrator
+
+        # From lsoda.step and lsoda.integrate itask=5 means take a single
+        # step and do not go past t_bound.
+        itask = integrator.call_args[2]
+        integrator.call_args[2] = 5
+        solver._y, solver.t = integrator.run(
+            solver.f, solver.jac or (lambda: None), solver._y, solver.t,
+            self.t_bound, solver.f_params, solver.jac_params)
+        integrator.call_args[2] = itask
+
+        if solver.successful():
+            self.t = solver.t
+            self.y = solver._y
+            # From LSODA Fortran source njev is equal to nlu.
+            self.njev = integrator.iwork[12]
+            self.nlu = integrator.iwork[12]
+            return True, None
+        else:
+            return False, 'Unexpected istate in LSODA.'
+
+    def _dense_output_impl(self):
+        iwork = self._lsoda_solver._integrator.iwork
+        rwork = self._lsoda_solver._integrator.rwork
+
+        # We want to produce the Nordsieck history array, yh, up to the order
+        # used in the last successful iteration. The step size is unimportant
+        # because it will be scaled out in LsodaDenseOutput. Some additional
+        # work may be required because ODEPACK's LSODA implementation produces
+        # the Nordsieck history in the state needed for the next iteration.
+
+        # iwork[13] contains order from last successful iteration, while
+        # iwork[14] contains order to be attempted next.
+        order = iwork[13]
+
+        # rwork[11] contains the step size to be attempted next, while
+        # rwork[10] contains step size from last successful iteration.
+        h = rwork[11]
+
+        # rwork[20:20 + (iwork[14] + 1) * self.n] contains entries of the
+        # Nordsieck array in state needed for next iteration. We want
+        # the entries up to order for the last successful step so use the 
+        # following.
+        yh = np.reshape(rwork[20:20 + (order + 1) * self.n],
+                        (self.n, order + 1), order='F').copy()
+        if iwork[14] < order:
+            # If the order is set to decrease then the final column of yh
+            # has not been updated within ODEPACK's LSODA
+            # implementation because this column will not be used in the
+            # next iteration. We must rescale this column to make the
+            # associated step size consistent with the other columns.
+            yh[:, -1] *= (h / rwork[10]) ** order
+
+        return LsodaDenseOutput(self.t_old, self.t, h, order, yh)
+
+
+class LsodaDenseOutput(DenseOutput):
+    def __init__(self, t_old, t, h, order, yh):
+        super().__init__(t_old, t)
+        self.h = h
+        self.yh = yh
+        self.p = np.arange(order + 1)
+
+    def _call_impl(self, t):
+        if t.ndim == 0:
+            x = ((t - self.t) / self.h) ** self.p
+        else:
+            x = ((t - self.t) / self.h) ** self.p[:, None]
+
+        return np.dot(self.yh, x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/radau.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/radau.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d572b48de51ebc7e8f8fd278ce1000bdef581b5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/radau.py
@@ -0,0 +1,572 @@
+import numpy as np
+from scipy.linalg import lu_factor, lu_solve
+from scipy.sparse import csc_matrix, issparse, eye
+from scipy.sparse.linalg import splu
+from scipy.optimize._numdiff import group_columns
+from .common import (validate_max_step, validate_tol, select_initial_step,
+                     norm, num_jac, EPS, warn_extraneous,
+                     validate_first_step)
+from .base import OdeSolver, DenseOutput
+
+S6 = 6 ** 0.5
+
+# Butcher tableau. A is not used directly, see below.
+C = np.array([(4 - S6) / 10, (4 + S6) / 10, 1])
+E = np.array([-13 - 7 * S6, -13 + 7 * S6, -1]) / 3
+
+# Eigendecomposition of A is done: A = T L T**-1. There is 1 real eigenvalue
+# and a complex conjugate pair. They are written below.
+MU_REAL = 3 + 3 ** (2 / 3) - 3 ** (1 / 3)
+MU_COMPLEX = (3 + 0.5 * (3 ** (1 / 3) - 3 ** (2 / 3))
+              - 0.5j * (3 ** (5 / 6) + 3 ** (7 / 6)))
+
+# These are transformation matrices.
+T = np.array([
+    [0.09443876248897524, -0.14125529502095421, 0.03002919410514742],
+    [0.25021312296533332, 0.20412935229379994, -0.38294211275726192],
+    [1, 1, 0]])
+TI = np.array([
+    [4.17871859155190428, 0.32768282076106237, 0.52337644549944951],
+    [-4.17871859155190428, -0.32768282076106237, 0.47662355450055044],
+    [0.50287263494578682, -2.57192694985560522, 0.59603920482822492]])
+# These linear combinations are used in the algorithm.
+TI_REAL = TI[0]
+TI_COMPLEX = TI[1] + 1j * TI[2]
+
+# Interpolator coefficients.
+P = np.array([
+    [13/3 + 7*S6/3, -23/3 - 22*S6/3, 10/3 + 5 * S6],
+    [13/3 - 7*S6/3, -23/3 + 22*S6/3, 10/3 - 5 * S6],
+    [1/3, -8/3, 10/3]])
+
+
+NEWTON_MAXITER = 6  # Maximum number of Newton iterations.
+MIN_FACTOR = 0.2  # Minimum allowed decrease in a step size.
+MAX_FACTOR = 10  # Maximum allowed increase in a step size.
+
+
+def solve_collocation_system(fun, t, y, h, Z0, scale, tol,
+                             LU_real, LU_complex, solve_lu):
+    """Solve the collocation system.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system.
+    t : float
+        Current time.
+    y : ndarray, shape (n,)
+        Current state.
+    h : float
+        Step to try.
+    Z0 : ndarray, shape (3, n)
+        Initial guess for the solution. It determines new values of `y` at
+        ``t + h * C`` as ``y + Z0``, where ``C`` is the Radau method constants.
+    scale : ndarray, shape (n)
+        Problem tolerance scale, i.e. ``rtol * abs(y) + atol``.
+    tol : float
+        Tolerance to which solve the system. This value is compared with
+        the normalized by `scale` error.
+    LU_real, LU_complex
+        LU decompositions of the system Jacobians.
+    solve_lu : callable
+        Callable which solves a linear system given a LU decomposition. The
+        signature is ``solve_lu(LU, b)``.
+
+    Returns
+    -------
+    converged : bool
+        Whether iterations converged.
+    n_iter : int
+        Number of completed iterations.
+    Z : ndarray, shape (3, n)
+        Found solution.
+    rate : float
+        The rate of convergence.
+    """
+    n = y.shape[0]
+    M_real = MU_REAL / h
+    M_complex = MU_COMPLEX / h
+
+    W = TI.dot(Z0)
+    Z = Z0
+
+    F = np.empty((3, n))
+    ch = h * C
+
+    dW_norm_old = None
+    dW = np.empty_like(W)
+    converged = False
+    rate = None
+    for k in range(NEWTON_MAXITER):
+        for i in range(3):
+            F[i] = fun(t + ch[i], y + Z[i])
+
+        if not np.all(np.isfinite(F)):
+            break
+
+        f_real = F.T.dot(TI_REAL) - M_real * W[0]
+        f_complex = F.T.dot(TI_COMPLEX) - M_complex * (W[1] + 1j * W[2])
+
+        dW_real = solve_lu(LU_real, f_real)
+        dW_complex = solve_lu(LU_complex, f_complex)
+
+        dW[0] = dW_real
+        dW[1] = dW_complex.real
+        dW[2] = dW_complex.imag
+
+        dW_norm = norm(dW / scale)
+        if dW_norm_old is not None:
+            rate = dW_norm / dW_norm_old
+
+        if (rate is not None and (rate >= 1 or
+                rate ** (NEWTON_MAXITER - k) / (1 - rate) * dW_norm > tol)):
+            break
+
+        W += dW
+        Z = T.dot(W)
+
+        if (dW_norm == 0 or
+                rate is not None and rate / (1 - rate) * dW_norm < tol):
+            converged = True
+            break
+
+        dW_norm_old = dW_norm
+
+    return converged, k + 1, Z, rate
+
+
+def predict_factor(h_abs, h_abs_old, error_norm, error_norm_old):
+    """Predict by which factor to increase/decrease the step size.
+
+    The algorithm is described in [1]_.
+
+    Parameters
+    ----------
+    h_abs, h_abs_old : float
+        Current and previous values of the step size, `h_abs_old` can be None
+        (see Notes).
+    error_norm, error_norm_old : float
+        Current and previous values of the error norm, `error_norm_old` can
+        be None (see Notes).
+
+    Returns
+    -------
+    factor : float
+        Predicted factor.
+
+    Notes
+    -----
+    If `h_abs_old` and `error_norm_old` are both not None then a two-step
+    algorithm is used, otherwise a one-step algorithm is used.
+
+    References
+    ----------
+    .. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
+           Equations II: Stiff and Differential-Algebraic Problems", Sec. IV.8.
+    """
+    if error_norm_old is None or h_abs_old is None or error_norm == 0:
+        multiplier = 1
+    else:
+        multiplier = h_abs / h_abs_old * (error_norm_old / error_norm) ** 0.25
+
+    with np.errstate(divide='ignore'):
+        factor = min(1, multiplier) * error_norm ** -0.25
+
+    return factor
+
+
+class Radau(OdeSolver):
+    """Implicit Runge-Kutta method of Radau IIA family of order 5.
+
+    The implementation follows [1]_. The error is controlled with a
+    third-order accurate embedded formula. A cubic polynomial which satisfies
+    the collocation conditions is used for the dense output.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
+        return an array of the same shape as ``y``. See `vectorized` for more
+        information.
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. HHere `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    jac : {None, array_like, sparse_matrix, callable}, optional
+        Jacobian matrix of the right-hand side of the system with respect to
+        y, required by this method. The Jacobian matrix has shape (n, n) and
+        its element (i, j) is equal to ``d f_i / d y_j``.
+        There are three ways to define the Jacobian:
+
+            * If array_like or sparse_matrix, the Jacobian is assumed to
+              be constant.
+            * If callable, the Jacobian is assumed to depend on both
+              t and y; it will be called as ``jac(t, y)`` as necessary.
+              For the 'Radau' and 'BDF' methods, the return value might be a
+              sparse matrix.
+            * If None (default), the Jacobian will be approximated by
+              finite differences.
+
+        It is generally recommended to provide the Jacobian rather than
+        relying on a finite-difference approximation.
+    jac_sparsity : {None, array_like, sparse matrix}, optional
+        Defines a sparsity structure of the Jacobian matrix for a
+        finite-difference approximation. Its shape must be (n, n). This argument
+        is ignored if `jac` is not `None`. If the Jacobian has only few non-zero
+        elements in *each* row, providing the sparsity structure will greatly
+        speed up the computations [2]_. A zero entry means that a corresponding
+        element in the Jacobian is always zero. If None (default), the Jacobian
+        is assumed to be dense.
+    vectorized : bool, optional
+        Whether `fun` can be called in a vectorized fashion. Default is False.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by this method, but may result in slower
+        execution overall in some circumstances (e.g. small ``len(y0)``).
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number of evaluations of the right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+    nlu : int
+        Number of LU decompositions.
+
+    References
+    ----------
+    .. [1] E. Hairer, G. Wanner, "Solving Ordinary Differential Equations II:
+           Stiff and Differential-Algebraic Problems", Sec. IV.8.
+    .. [2] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+           sparse Jacobian matrices", Journal of the Institute of Mathematics
+           and its Applications, 13, pp. 117-120, 1974.
+    """
+    def __init__(self, fun, t0, y0, t_bound, max_step=np.inf,
+                 rtol=1e-3, atol=1e-6, jac=None, jac_sparsity=None,
+                 vectorized=False, first_step=None, **extraneous):
+        warn_extraneous(extraneous)
+        super().__init__(fun, t0, y0, t_bound, vectorized)
+        self.y_old = None
+        self.max_step = validate_max_step(max_step)
+        self.rtol, self.atol = validate_tol(rtol, atol, self.n)
+        self.f = self.fun(self.t, self.y)
+        # Select initial step assuming the same order which is used to control
+        # the error.
+        if first_step is None:
+            self.h_abs = select_initial_step(
+                self.fun, self.t, self.y, t_bound, max_step, self.f, self.direction,
+                3, self.rtol, self.atol)
+        else:
+            self.h_abs = validate_first_step(first_step, t0, t_bound)
+        self.h_abs_old = None
+        self.error_norm_old = None
+
+        self.newton_tol = max(10 * EPS / rtol, min(0.03, rtol ** 0.5))
+        self.sol = None
+
+        self.jac_factor = None
+        self.jac, self.J = self._validate_jac(jac, jac_sparsity)
+        if issparse(self.J):
+            def lu(A):
+                self.nlu += 1
+                return splu(A)
+
+            def solve_lu(LU, b):
+                return LU.solve(b)
+
+            I = eye(self.n, format='csc')
+        else:
+            def lu(A):
+                self.nlu += 1
+                return lu_factor(A, overwrite_a=True)
+
+            def solve_lu(LU, b):
+                return lu_solve(LU, b, overwrite_b=True)
+
+            I = np.identity(self.n)
+
+        self.lu = lu
+        self.solve_lu = solve_lu
+        self.I = I
+
+        self.current_jac = True
+        self.LU_real = None
+        self.LU_complex = None
+        self.Z = None
+
+    def _validate_jac(self, jac, sparsity):
+        t0 = self.t
+        y0 = self.y
+
+        if jac is None:
+            if sparsity is not None:
+                if issparse(sparsity):
+                    sparsity = csc_matrix(sparsity)
+                groups = group_columns(sparsity)
+                sparsity = (sparsity, groups)
+
+            def jac_wrapped(t, y, f):
+                self.njev += 1
+                J, self.jac_factor = num_jac(self.fun_vectorized, t, y, f,
+                                             self.atol, self.jac_factor,
+                                             sparsity)
+                return J
+            J = jac_wrapped(t0, y0, self.f)
+        elif callable(jac):
+            J = jac(t0, y0)
+            self.njev = 1
+            if issparse(J):
+                J = csc_matrix(J)
+
+                def jac_wrapped(t, y, _=None):
+                    self.njev += 1
+                    return csc_matrix(jac(t, y), dtype=float)
+
+            else:
+                J = np.asarray(J, dtype=float)
+
+                def jac_wrapped(t, y, _=None):
+                    self.njev += 1
+                    return np.asarray(jac(t, y), dtype=float)
+
+            if J.shape != (self.n, self.n):
+                raise ValueError(f"`jac` is expected to have shape {(self.n, self.n)},"
+                                 f" but actually has {J.shape}.")
+        else:
+            if issparse(jac):
+                J = csc_matrix(jac)
+            else:
+                J = np.asarray(jac, dtype=float)
+
+            if J.shape != (self.n, self.n):
+                raise ValueError(f"`jac` is expected to have shape {(self.n, self.n)},"
+                                 f" but actually has {J.shape}.")
+            jac_wrapped = None
+
+        return jac_wrapped, J
+
+    def _step_impl(self):
+        t = self.t
+        y = self.y
+        f = self.f
+
+        max_step = self.max_step
+        atol = self.atol
+        rtol = self.rtol
+
+        min_step = 10 * np.abs(np.nextafter(t, self.direction * np.inf) - t)
+        if self.h_abs > max_step:
+            h_abs = max_step
+            h_abs_old = None
+            error_norm_old = None
+        elif self.h_abs < min_step:
+            h_abs = min_step
+            h_abs_old = None
+            error_norm_old = None
+        else:
+            h_abs = self.h_abs
+            h_abs_old = self.h_abs_old
+            error_norm_old = self.error_norm_old
+
+        J = self.J
+        LU_real = self.LU_real
+        LU_complex = self.LU_complex
+
+        current_jac = self.current_jac
+        jac = self.jac
+
+        rejected = False
+        step_accepted = False
+        message = None
+        while not step_accepted:
+            if h_abs < min_step:
+                return False, self.TOO_SMALL_STEP
+
+            h = h_abs * self.direction
+            t_new = t + h
+
+            if self.direction * (t_new - self.t_bound) > 0:
+                t_new = self.t_bound
+
+            h = t_new - t
+            h_abs = np.abs(h)
+
+            if self.sol is None:
+                Z0 = np.zeros((3, y.shape[0]))
+            else:
+                Z0 = self.sol(t + h * C).T - y
+
+            scale = atol + np.abs(y) * rtol
+
+            converged = False
+            while not converged:
+                if LU_real is None or LU_complex is None:
+                    LU_real = self.lu(MU_REAL / h * self.I - J)
+                    LU_complex = self.lu(MU_COMPLEX / h * self.I - J)
+
+                converged, n_iter, Z, rate = solve_collocation_system(
+                    self.fun, t, y, h, Z0, scale, self.newton_tol,
+                    LU_real, LU_complex, self.solve_lu)
+
+                if not converged:
+                    if current_jac:
+                        break
+
+                    J = self.jac(t, y, f)
+                    current_jac = True
+                    LU_real = None
+                    LU_complex = None
+
+            if not converged:
+                h_abs *= 0.5
+                LU_real = None
+                LU_complex = None
+                continue
+
+            y_new = y + Z[-1]
+            ZE = Z.T.dot(E) / h
+            error = self.solve_lu(LU_real, f + ZE)
+            scale = atol + np.maximum(np.abs(y), np.abs(y_new)) * rtol
+            error_norm = norm(error / scale)
+            safety = 0.9 * (2 * NEWTON_MAXITER + 1) / (2 * NEWTON_MAXITER
+                                                       + n_iter)
+
+            if rejected and error_norm > 1:
+                error = self.solve_lu(LU_real, self.fun(t, y + error) + ZE)
+                error_norm = norm(error / scale)
+
+            if error_norm > 1:
+                factor = predict_factor(h_abs, h_abs_old,
+                                        error_norm, error_norm_old)
+                h_abs *= max(MIN_FACTOR, safety * factor)
+
+                LU_real = None
+                LU_complex = None
+                rejected = True
+            else:
+                step_accepted = True
+
+        recompute_jac = jac is not None and n_iter > 2 and rate > 1e-3
+
+        factor = predict_factor(h_abs, h_abs_old, error_norm, error_norm_old)
+        factor = min(MAX_FACTOR, safety * factor)
+
+        if not recompute_jac and factor < 1.2:
+            factor = 1
+        else:
+            LU_real = None
+            LU_complex = None
+
+        f_new = self.fun(t_new, y_new)
+        if recompute_jac:
+            J = jac(t_new, y_new, f_new)
+            current_jac = True
+        elif jac is not None:
+            current_jac = False
+
+        self.h_abs_old = self.h_abs
+        self.error_norm_old = error_norm
+
+        self.h_abs = h_abs * factor
+
+        self.y_old = y
+
+        self.t = t_new
+        self.y = y_new
+        self.f = f_new
+
+        self.Z = Z
+
+        self.LU_real = LU_real
+        self.LU_complex = LU_complex
+        self.current_jac = current_jac
+        self.J = J
+
+        self.t_old = t
+        self.sol = self._compute_dense_output()
+
+        return step_accepted, message
+
+    def _compute_dense_output(self):
+        Q = np.dot(self.Z.T, P)
+        return RadauDenseOutput(self.t_old, self.t, self.y_old, Q)
+
+    def _dense_output_impl(self):
+        return self.sol
+
+
+class RadauDenseOutput(DenseOutput):
+    def __init__(self, t_old, t, y_old, Q):
+        super().__init__(t_old, t)
+        self.h = t - t_old
+        self.Q = Q
+        self.order = Q.shape[1] - 1
+        self.y_old = y_old
+
+    def _call_impl(self, t):
+        x = (t - self.t_old) / self.h
+        if t.ndim == 0:
+            p = np.tile(x, self.order + 1)
+            p = np.cumprod(p)
+        else:
+            p = np.tile(x, (self.order + 1, 1))
+            p = np.cumprod(p, axis=0)
+        # Here we don't multiply by h, not a mistake.
+        y = np.dot(self.Q, p)
+        if y.ndim == 2:
+            y += self.y_old[:, None]
+        else:
+            y += self.y_old
+
+        return y
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/rk.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/rk.py
new file mode 100644
index 0000000000000000000000000000000000000000..62a5347ffe91afc754e9b818d0b34c010d0c4d12
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/rk.py
@@ -0,0 +1,601 @@
+import numpy as np
+from .base import OdeSolver, DenseOutput
+from .common import (validate_max_step, validate_tol, select_initial_step,
+                     norm, warn_extraneous, validate_first_step)
+from . import dop853_coefficients
+
+# Multiply steps computed from asymptotic behaviour of errors by this.
+SAFETY = 0.9
+
+MIN_FACTOR = 0.2  # Minimum allowed decrease in a step size.
+MAX_FACTOR = 10  # Maximum allowed increase in a step size.
+
+
+def rk_step(fun, t, y, f, h, A, B, C, K):
+    """Perform a single Runge-Kutta step.
+
+    This function computes a prediction of an explicit Runge-Kutta method and
+    also estimates the error of a less accurate method.
+
+    Notation for Butcher tableau is as in [1]_.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system.
+    t : float
+        Current time.
+    y : ndarray, shape (n,)
+        Current state.
+    f : ndarray, shape (n,)
+        Current value of the derivative, i.e., ``fun(x, y)``.
+    h : float
+        Step to use.
+    A : ndarray, shape (n_stages, n_stages)
+        Coefficients for combining previous RK stages to compute the next
+        stage. For explicit methods the coefficients at and above the main
+        diagonal are zeros.
+    B : ndarray, shape (n_stages,)
+        Coefficients for combining RK stages for computing the final
+        prediction.
+    C : ndarray, shape (n_stages,)
+        Coefficients for incrementing time for consecutive RK stages.
+        The value for the first stage is always zero.
+    K : ndarray, shape (n_stages + 1, n)
+        Storage array for putting RK stages here. Stages are stored in rows.
+        The last row is a linear combination of the previous rows with
+        coefficients
+
+    Returns
+    -------
+    y_new : ndarray, shape (n,)
+        Solution at t + h computed with a higher accuracy.
+    f_new : ndarray, shape (n,)
+        Derivative ``fun(t + h, y_new)``.
+
+    References
+    ----------
+    .. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
+           Equations I: Nonstiff Problems", Sec. II.4.
+    """
+    K[0] = f
+    for s, (a, c) in enumerate(zip(A[1:], C[1:]), start=1):
+        dy = np.dot(K[:s].T, a[:s]) * h
+        K[s] = fun(t + c * h, y + dy)
+
+    y_new = y + h * np.dot(K[:-1].T, B)
+    f_new = fun(t + h, y_new)
+
+    K[-1] = f_new
+
+    return y_new, f_new
+
+
+class RungeKutta(OdeSolver):
+    """Base class for explicit Runge-Kutta methods."""
+    C: np.ndarray = NotImplemented
+    A: np.ndarray = NotImplemented
+    B: np.ndarray = NotImplemented
+    E: np.ndarray = NotImplemented
+    P: np.ndarray = NotImplemented
+    order: int = NotImplemented
+    error_estimator_order: int = NotImplemented
+    n_stages: int = NotImplemented
+
+    def __init__(self, fun, t0, y0, t_bound, max_step=np.inf,
+                 rtol=1e-3, atol=1e-6, vectorized=False,
+                 first_step=None, **extraneous):
+        warn_extraneous(extraneous)
+        super().__init__(fun, t0, y0, t_bound, vectorized,
+                         support_complex=True)
+        self.y_old = None
+        self.max_step = validate_max_step(max_step)
+        self.rtol, self.atol = validate_tol(rtol, atol, self.n)
+        self.f = self.fun(self.t, self.y)
+        if first_step is None:
+            self.h_abs = select_initial_step(
+                self.fun, self.t, self.y, t_bound, max_step, self.f, self.direction,
+                self.error_estimator_order, self.rtol, self.atol)
+        else:
+            self.h_abs = validate_first_step(first_step, t0, t_bound)
+        self.K = np.empty((self.n_stages + 1, self.n), dtype=self.y.dtype)
+        self.error_exponent = -1 / (self.error_estimator_order + 1)
+        self.h_previous = None
+
+    def _estimate_error(self, K, h):
+        return np.dot(K.T, self.E) * h
+
+    def _estimate_error_norm(self, K, h, scale):
+        return norm(self._estimate_error(K, h) / scale)
+
+    def _step_impl(self):
+        t = self.t
+        y = self.y
+
+        max_step = self.max_step
+        rtol = self.rtol
+        atol = self.atol
+
+        min_step = 10 * np.abs(np.nextafter(t, self.direction * np.inf) - t)
+
+        if self.h_abs > max_step:
+            h_abs = max_step
+        elif self.h_abs < min_step:
+            h_abs = min_step
+        else:
+            h_abs = self.h_abs
+
+        step_accepted = False
+        step_rejected = False
+
+        while not step_accepted:
+            if h_abs < min_step:
+                return False, self.TOO_SMALL_STEP
+
+            h = h_abs * self.direction
+            t_new = t + h
+
+            if self.direction * (t_new - self.t_bound) > 0:
+                t_new = self.t_bound
+
+            h = t_new - t
+            h_abs = np.abs(h)
+
+            y_new, f_new = rk_step(self.fun, t, y, self.f, h, self.A,
+                                   self.B, self.C, self.K)
+            scale = atol + np.maximum(np.abs(y), np.abs(y_new)) * rtol
+            error_norm = self._estimate_error_norm(self.K, h, scale)
+
+            if error_norm < 1:
+                if error_norm == 0:
+                    factor = MAX_FACTOR
+                else:
+                    factor = min(MAX_FACTOR,
+                                 SAFETY * error_norm ** self.error_exponent)
+
+                if step_rejected:
+                    factor = min(1, factor)
+
+                h_abs *= factor
+
+                step_accepted = True
+            else:
+                h_abs *= max(MIN_FACTOR,
+                             SAFETY * error_norm ** self.error_exponent)
+                step_rejected = True
+
+        self.h_previous = h
+        self.y_old = y
+
+        self.t = t_new
+        self.y = y_new
+
+        self.h_abs = h_abs
+        self.f = f_new
+
+        return True, None
+
+    def _dense_output_impl(self):
+        Q = self.K.T.dot(self.P)
+        return RkDenseOutput(self.t_old, self.t, self.y_old, Q)
+
+
+class RK23(RungeKutta):
+    """Explicit Runge-Kutta method of order 3(2).
+
+    This uses the Bogacki-Shampine pair of formulas [1]_. The error is controlled
+    assuming accuracy of the second-order method, but steps are taken using the
+    third-order accurate formula (local extrapolation is done). A cubic Hermite
+    polynomial is used for the dense output.
+
+    Can be applied in the complex domain.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system: the time derivative of the state ``y``
+        at time ``t``. The calling signature is ``fun(t, y)``, where ``t`` is a
+        scalar and ``y`` is an ndarray with ``len(y) = len(y0)``. ``fun`` must
+        return an array of the same shape as ``y``. See `vectorized` for more
+        information.
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    vectorized : bool, optional
+        Whether `fun` may be called in a vectorized fashion. False (default)
+        is recommended for this solver.
+
+        If ``vectorized`` is False, `fun` will always be called with ``y`` of
+        shape ``(n,)``, where ``n = len(y0)``.
+
+        If ``vectorized`` is True, `fun` may be called with ``y`` of shape
+        ``(n, k)``, where ``k`` is an integer. In this case, `fun` must behave
+        such that ``fun(t, y)[:, i] == fun(t, y[:, i])`` (i.e. each column of
+        the returned array is the time derivative of the state corresponding
+        with a column of ``y``).
+
+        Setting ``vectorized=True`` allows for faster finite difference
+        approximation of the Jacobian by methods 'Radau' and 'BDF', but
+        will result in slower execution for this solver.
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number evaluations of the system's right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+        Is always 0 for this solver as it does not use the Jacobian.
+    nlu : int
+        Number of LU decompositions. Is always 0 for this solver.
+
+    References
+    ----------
+    .. [1] P. Bogacki, L.F. Shampine, "A 3(2) Pair of Runge-Kutta Formulas",
+           Appl. Math. Lett. Vol. 2, No. 4. pp. 321-325, 1989.
+    """
+    order = 3
+    error_estimator_order = 2
+    n_stages = 3
+    C = np.array([0, 1/2, 3/4])
+    A = np.array([
+        [0, 0, 0],
+        [1/2, 0, 0],
+        [0, 3/4, 0]
+    ])
+    B = np.array([2/9, 1/3, 4/9])
+    E = np.array([5/72, -1/12, -1/9, 1/8])
+    P = np.array([[1, -4 / 3, 5 / 9],
+                  [0, 1, -2/3],
+                  [0, 4/3, -8/9],
+                  [0, -1, 1]])
+
+
+class RK45(RungeKutta):
+    """Explicit Runge-Kutta method of order 5(4).
+
+    This uses the Dormand-Prince pair of formulas [1]_. The error is controlled
+    assuming accuracy of the fourth-order method accuracy, but steps are taken
+    using the fifth-order accurate formula (local extrapolation is done).
+    A quartic interpolation polynomial is used for the dense output [2]_.
+
+    Can be applied in the complex domain.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system. The calling signature is ``fun(t, y)``.
+        Here ``t`` is a scalar, and there are two options for the ndarray ``y``:
+        It can either have shape (n,); then ``fun`` must return array_like with
+        shape (n,). Alternatively it can have shape (n, k); then ``fun``
+        must return an array_like with shape (n, k), i.e., each column
+        corresponds to a single column in ``y``. The choice between the two
+        options is determined by `vectorized` argument (see below).
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e., the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    vectorized : bool, optional
+        Whether `fun` is implemented in a vectorized fashion. Default is False.
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number evaluations of the system's right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian.
+        Is always 0 for this solver as it does not use the Jacobian.
+    nlu : int
+        Number of LU decompositions. Is always 0 for this solver.
+
+    References
+    ----------
+    .. [1] J. R. Dormand, P. J. Prince, "A family of embedded Runge-Kutta
+           formulae", Journal of Computational and Applied Mathematics, Vol. 6,
+           No. 1, pp. 19-26, 1980.
+    .. [2] L. W. Shampine, "Some Practical Runge-Kutta Formulas", Mathematics
+           of Computation,, Vol. 46, No. 173, pp. 135-150, 1986.
+    """
+    order = 5
+    error_estimator_order = 4
+    n_stages = 6
+    C = np.array([0, 1/5, 3/10, 4/5, 8/9, 1])
+    A = np.array([
+        [0, 0, 0, 0, 0],
+        [1/5, 0, 0, 0, 0],
+        [3/40, 9/40, 0, 0, 0],
+        [44/45, -56/15, 32/9, 0, 0],
+        [19372/6561, -25360/2187, 64448/6561, -212/729, 0],
+        [9017/3168, -355/33, 46732/5247, 49/176, -5103/18656]
+    ])
+    B = np.array([35/384, 0, 500/1113, 125/192, -2187/6784, 11/84])
+    E = np.array([-71/57600, 0, 71/16695, -71/1920, 17253/339200, -22/525,
+                  1/40])
+    # Corresponds to the optimum value of c_6 from [2]_.
+    P = np.array([
+        [1, -8048581381/2820520608, 8663915743/2820520608,
+         -12715105075/11282082432],
+        [0, 0, 0, 0],
+        [0, 131558114200/32700410799, -68118460800/10900136933,
+         87487479700/32700410799],
+        [0, -1754552775/470086768, 14199869525/1410260304,
+         -10690763975/1880347072],
+        [0, 127303824393/49829197408, -318862633887/49829197408,
+         701980252875 / 199316789632],
+        [0, -282668133/205662961, 2019193451/616988883, -1453857185/822651844],
+        [0, 40617522/29380423, -110615467/29380423, 69997945/29380423]])
+
+
+class DOP853(RungeKutta):
+    """Explicit Runge-Kutta method of order 8.
+
+    This is a Python implementation of "DOP853" algorithm originally written
+    in Fortran [1]_, [2]_. Note that this is not a literal translation, but
+    the algorithmic core and coefficients are the same.
+
+    Can be applied in the complex domain.
+
+    Parameters
+    ----------
+    fun : callable
+        Right-hand side of the system. The calling signature is ``fun(t, y)``.
+        Here, ``t`` is a scalar, and there are two options for the ndarray ``y``:
+        It can either have shape (n,); then ``fun`` must return array_like with
+        shape (n,). Alternatively it can have shape (n, k); then ``fun``
+        must return an array_like with shape (n, k), i.e. each column
+        corresponds to a single column in ``y``. The choice between the two
+        options is determined by `vectorized` argument (see below).
+    t0 : float
+        Initial time.
+    y0 : array_like, shape (n,)
+        Initial state.
+    t_bound : float
+        Boundary time - the integration won't continue beyond it. It also
+        determines the direction of the integration.
+    first_step : float or None, optional
+        Initial step size. Default is ``None`` which means that the algorithm
+        should choose.
+    max_step : float, optional
+        Maximum allowed step size. Default is np.inf, i.e. the step size is not
+        bounded and determined solely by the solver.
+    rtol, atol : float and array_like, optional
+        Relative and absolute tolerances. The solver keeps the local error
+        estimates less than ``atol + rtol * abs(y)``. Here `rtol` controls a
+        relative accuracy (number of correct digits), while `atol` controls
+        absolute accuracy (number of correct decimal places). To achieve the
+        desired `rtol`, set `atol` to be smaller than the smallest value that
+        can be expected from ``rtol * abs(y)`` so that `rtol` dominates the
+        allowable error. If `atol` is larger than ``rtol * abs(y)`` the
+        number of correct digits is not guaranteed. Conversely, to achieve the
+        desired `atol` set `rtol` such that ``rtol * abs(y)`` is always smaller
+        than `atol`. If components of y have different scales, it might be
+        beneficial to set different `atol` values for different components by
+        passing array_like with shape (n,) for `atol`. Default values are
+        1e-3 for `rtol` and 1e-6 for `atol`.
+    vectorized : bool, optional
+        Whether `fun` is implemented in a vectorized fashion. Default is False.
+
+    Attributes
+    ----------
+    n : int
+        Number of equations.
+    status : string
+        Current status of the solver: 'running', 'finished' or 'failed'.
+    t_bound : float
+        Boundary time.
+    direction : float
+        Integration direction: +1 or -1.
+    t : float
+        Current time.
+    y : ndarray
+        Current state.
+    t_old : float
+        Previous time. None if no steps were made yet.
+    step_size : float
+        Size of the last successful step. None if no steps were made yet.
+    nfev : int
+        Number evaluations of the system's right-hand side.
+    njev : int
+        Number of evaluations of the Jacobian. Is always 0 for this solver
+        as it does not use the Jacobian.
+    nlu : int
+        Number of LU decompositions. Is always 0 for this solver.
+
+    References
+    ----------
+    .. [1] E. Hairer, S. P. Norsett G. Wanner, "Solving Ordinary Differential
+           Equations I: Nonstiff Problems", Sec. II.
+    .. [2] `Page with original Fortran code of DOP853
+            `_.
+    """
+    n_stages = dop853_coefficients.N_STAGES
+    order = 8
+    error_estimator_order = 7
+    A = dop853_coefficients.A[:n_stages, :n_stages]
+    B = dop853_coefficients.B
+    C = dop853_coefficients.C[:n_stages]
+    E3 = dop853_coefficients.E3
+    E5 = dop853_coefficients.E5
+    D = dop853_coefficients.D
+
+    A_EXTRA = dop853_coefficients.A[n_stages + 1:]
+    C_EXTRA = dop853_coefficients.C[n_stages + 1:]
+
+    def __init__(self, fun, t0, y0, t_bound, max_step=np.inf,
+                 rtol=1e-3, atol=1e-6, vectorized=False,
+                 first_step=None, **extraneous):
+        super().__init__(fun, t0, y0, t_bound, max_step, rtol, atol,
+                         vectorized, first_step, **extraneous)
+        self.K_extended = np.empty((dop853_coefficients.N_STAGES_EXTENDED,
+                                    self.n), dtype=self.y.dtype)
+        self.K = self.K_extended[:self.n_stages + 1]
+
+    def _estimate_error(self, K, h):  # Left for testing purposes.
+        err5 = np.dot(K.T, self.E5)
+        err3 = np.dot(K.T, self.E3)
+        denom = np.hypot(np.abs(err5), 0.1 * np.abs(err3))
+        correction_factor = np.ones_like(err5)
+        mask = denom > 0
+        correction_factor[mask] = np.abs(err5[mask]) / denom[mask]
+        return h * err5 * correction_factor
+
+    def _estimate_error_norm(self, K, h, scale):
+        err5 = np.dot(K.T, self.E5) / scale
+        err3 = np.dot(K.T, self.E3) / scale
+        err5_norm_2 = np.linalg.norm(err5)**2
+        err3_norm_2 = np.linalg.norm(err3)**2
+        if err5_norm_2 == 0 and err3_norm_2 == 0:
+            return 0.0
+        denom = err5_norm_2 + 0.01 * err3_norm_2
+        return np.abs(h) * err5_norm_2 / np.sqrt(denom * len(scale))
+
+    def _dense_output_impl(self):
+        K = self.K_extended
+        h = self.h_previous
+        for s, (a, c) in enumerate(zip(self.A_EXTRA, self.C_EXTRA),
+                                   start=self.n_stages + 1):
+            dy = np.dot(K[:s].T, a[:s]) * h
+            K[s] = self.fun(self.t_old + c * h, self.y_old + dy)
+
+        F = np.empty((dop853_coefficients.INTERPOLATOR_POWER, self.n),
+                     dtype=self.y_old.dtype)
+
+        f_old = K[0]
+        delta_y = self.y - self.y_old
+
+        F[0] = delta_y
+        F[1] = h * f_old - delta_y
+        F[2] = 2 * delta_y - h * (self.f + f_old)
+        F[3:] = h * np.dot(self.D, K)
+
+        return Dop853DenseOutput(self.t_old, self.t, self.y_old, F)
+
+
+class RkDenseOutput(DenseOutput):
+    def __init__(self, t_old, t, y_old, Q):
+        super().__init__(t_old, t)
+        self.h = t - t_old
+        self.Q = Q
+        self.order = Q.shape[1] - 1
+        self.y_old = y_old
+
+    def _call_impl(self, t):
+        x = (t - self.t_old) / self.h
+        if t.ndim == 0:
+            p = np.tile(x, self.order + 1)
+            p = np.cumprod(p)
+        else:
+            p = np.tile(x, (self.order + 1, 1))
+            p = np.cumprod(p, axis=0)
+        y = self.h * np.dot(self.Q, p)
+        if y.ndim == 2:
+            y += self.y_old[:, None]
+        else:
+            y += self.y_old
+
+        return y
+
+
+class Dop853DenseOutput(DenseOutput):
+    def __init__(self, t_old, t, y_old, F):
+        super().__init__(t_old, t)
+        self.h = t - t_old
+        self.F = F
+        self.y_old = y_old
+
+    def _call_impl(self, t):
+        x = (t - self.t_old) / self.h
+
+        if t.ndim == 0:
+            y = np.zeros_like(self.y_old)
+        else:
+            x = x[:, None]
+            y = np.zeros((len(x), len(self.y_old)), dtype=self.y_old.dtype)
+
+        for i, f in enumerate(reversed(self.F)):
+            y += f
+            if i % 2 == 0:
+                y *= x
+            else:
+                y *= 1 - x
+        y += self.y_old
+
+        return y.T
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_ivp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_ivp.py
new file mode 100644
index 0000000000000000000000000000000000000000..cd318b9a165051293ac13b9b0e63be2df322963b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_ivp.py
@@ -0,0 +1,1287 @@
+from itertools import product
+from numpy.testing import (assert_, assert_allclose, assert_array_less,
+                           assert_equal, assert_no_warnings, suppress_warnings)
+import pytest
+from pytest import raises as assert_raises
+import numpy as np
+from scipy.optimize._numdiff import group_columns
+from scipy.integrate import solve_ivp, RK23, RK45, DOP853, Radau, BDF, LSODA
+from scipy.integrate import OdeSolution
+from scipy.integrate._ivp.common import num_jac, select_initial_step
+from scipy.integrate._ivp.base import ConstantDenseOutput
+from scipy.sparse import coo_matrix, csc_matrix
+
+
+def fun_zero(t, y):
+    return np.zeros_like(y)
+
+
+def fun_linear(t, y):
+    return np.array([-y[0] - 5 * y[1], y[0] + y[1]])
+
+
+def jac_linear():
+    return np.array([[-1, -5], [1, 1]])
+
+
+def sol_linear(t):
+    return np.vstack((-5 * np.sin(2 * t),
+                      2 * np.cos(2 * t) + np.sin(2 * t)))
+
+
+def fun_rational(t, y):
+    return np.array([y[1] / t,
+                     y[1] * (y[0] + 2 * y[1] - 1) / (t * (y[0] - 1))])
+
+
+def fun_rational_vectorized(t, y):
+    return np.vstack((y[1] / t,
+                      y[1] * (y[0] + 2 * y[1] - 1) / (t * (y[0] - 1))))
+
+
+def jac_rational(t, y):
+    return np.array([
+        [0, 1 / t],
+        [-2 * y[1] ** 2 / (t * (y[0] - 1) ** 2),
+         (y[0] + 4 * y[1] - 1) / (t * (y[0] - 1))]
+    ])
+
+
+def jac_rational_sparse(t, y):
+    return csc_matrix([
+        [0, 1 / t],
+        [-2 * y[1] ** 2 / (t * (y[0] - 1) ** 2),
+         (y[0] + 4 * y[1] - 1) / (t * (y[0] - 1))]
+    ])
+
+
+def sol_rational(t):
+    return np.asarray((t / (t + 10), 10 * t / (t + 10) ** 2))
+
+
+def fun_medazko(t, y):
+    n = y.shape[0] // 2
+    k = 100
+    c = 4
+
+    phi = 2 if t <= 5 else 0
+    y = np.hstack((phi, 0, y, y[-2]))
+
+    d = 1 / n
+    j = np.arange(n) + 1
+    alpha = 2 * (j * d - 1) ** 3 / c ** 2
+    beta = (j * d - 1) ** 4 / c ** 2
+
+    j_2_p1 = 2 * j + 2
+    j_2_m3 = 2 * j - 2
+    j_2_m1 = 2 * j
+    j_2 = 2 * j + 1
+
+    f = np.empty(2 * n)
+    f[::2] = (alpha * (y[j_2_p1] - y[j_2_m3]) / (2 * d) +
+              beta * (y[j_2_m3] - 2 * y[j_2_m1] + y[j_2_p1]) / d ** 2 -
+              k * y[j_2_m1] * y[j_2])
+    f[1::2] = -k * y[j_2] * y[j_2_m1]
+
+    return f
+
+
+def medazko_sparsity(n):
+    cols = []
+    rows = []
+
+    i = np.arange(n) * 2
+
+    cols.append(i[1:])
+    rows.append(i[1:] - 2)
+
+    cols.append(i)
+    rows.append(i)
+
+    cols.append(i)
+    rows.append(i + 1)
+
+    cols.append(i[:-1])
+    rows.append(i[:-1] + 2)
+
+    i = np.arange(n) * 2 + 1
+
+    cols.append(i)
+    rows.append(i)
+
+    cols.append(i)
+    rows.append(i - 1)
+
+    cols = np.hstack(cols)
+    rows = np.hstack(rows)
+
+    return coo_matrix((np.ones_like(cols), (cols, rows)))
+
+
+def fun_complex(t, y):
+    return -y
+
+
+def jac_complex(t, y):
+    return -np.eye(y.shape[0])
+
+
+def jac_complex_sparse(t, y):
+    return csc_matrix(jac_complex(t, y))
+
+
+def sol_complex(t):
+    y = (0.5 + 1j) * np.exp(-t)
+    return y.reshape((1, -1))
+
+
+def fun_event_dense_output_LSODA(t, y):
+    return y * (t - 2)
+
+
+def jac_event_dense_output_LSODA(t, y):
+    return t - 2
+
+
+def sol_event_dense_output_LSODA(t):
+    return np.exp(t ** 2 / 2 - 2 * t + np.log(0.05) - 6)
+
+
+def compute_error(y, y_true, rtol, atol):
+    e = (y - y_true) / (atol + rtol * np.abs(y_true))
+    return np.linalg.norm(e, axis=0) / np.sqrt(e.shape[0])
+
+def test_duplicate_timestamps():
+    def upward_cannon(t, y):
+        return [y[1], -9.80665]
+
+    def hit_ground(t, y):
+        return y[0]
+
+    hit_ground.terminal = True
+    hit_ground.direction = -1
+
+    sol = solve_ivp(upward_cannon, [0, np.inf], [0, 0.01],
+                    max_step=0.05 * 0.001 / 9.80665,
+                    events=hit_ground, dense_output=True)
+    assert_allclose(sol.sol(0.01), np.asarray([-0.00039033, -0.08806632]),
+                    rtol=1e-5, atol=1e-8)
+    assert_allclose(sol.t_events, np.asarray([[0.00203943]]), rtol=1e-5, atol=1e-8)
+    assert_allclose(sol.y_events, [np.asarray([[ 0.0, -0.01 ]])], atol=1e-9)
+    assert sol.success
+    assert_equal(sol.status, 1)
+
+@pytest.mark.thread_unsafe
+def test_integration():
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+
+    for vectorized, method, t_span, jac in product(
+            [False, True],
+            ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA'],
+            [[5, 9], [5, 1]],
+            [None, jac_rational, jac_rational_sparse]):
+
+        if vectorized:
+            fun = fun_rational_vectorized
+        else:
+            fun = fun_rational
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       "The following arguments have no effect for a chosen "
+                       "solver: `jac`")
+            res = solve_ivp(fun, t_span, y0, rtol=rtol,
+                            atol=atol, method=method, dense_output=True,
+                            jac=jac, vectorized=vectorized)
+        assert_equal(res.t[0], t_span[0])
+        assert_(res.t_events is None)
+        assert_(res.y_events is None)
+        assert_(res.success)
+        assert_equal(res.status, 0)
+
+        if method == 'DOP853':
+            # DOP853 spends more functions evaluation because it doesn't
+            # have enough time to develop big enough step size.
+            assert_(res.nfev < 50)
+        else:
+            assert_(res.nfev < 40)
+
+        if method in ['RK23', 'RK45', 'DOP853', 'LSODA']:
+            assert_equal(res.njev, 0)
+            assert_equal(res.nlu, 0)
+        else:
+            assert_(0 < res.njev < 3)
+            assert_(0 < res.nlu < 10)
+
+        y_true = sol_rational(res.t)
+        e = compute_error(res.y, y_true, rtol, atol)
+        assert_(np.all(e < 5))
+
+        tc = np.linspace(*t_span)
+        yc_true = sol_rational(tc)
+        yc = res.sol(tc)
+
+        e = compute_error(yc, yc_true, rtol, atol)
+        assert_(np.all(e < 5))
+
+        tc = (t_span[0] + t_span[-1]) / 2
+        yc_true = sol_rational(tc)
+        yc = res.sol(tc)
+
+        e = compute_error(yc, yc_true, rtol, atol)
+        assert_(np.all(e < 5))
+
+        assert_allclose(res.sol(res.t), res.y, rtol=1e-15, atol=1e-15)
+
+
+@pytest.mark.thread_unsafe
+def test_integration_complex():
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [0.5 + 1j]
+    t_span = [0, 1]
+    tc = np.linspace(t_span[0], t_span[1])
+    for method, jac in product(['RK23', 'RK45', 'DOP853', 'BDF'],
+                               [None, jac_complex, jac_complex_sparse]):
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       "The following arguments have no effect for a chosen "
+                       "solver: `jac`")
+            res = solve_ivp(fun_complex, t_span, y0, method=method,
+                            dense_output=True, rtol=rtol, atol=atol, jac=jac)
+
+        assert_equal(res.t[0], t_span[0])
+        assert_(res.t_events is None)
+        assert_(res.y_events is None)
+        assert_(res.success)
+        assert_equal(res.status, 0)
+
+        if method == 'DOP853':
+            assert res.nfev < 35
+        else:
+            assert res.nfev < 25
+
+        if method == 'BDF':
+            assert_equal(res.njev, 1)
+            assert res.nlu < 6
+        else:
+            assert res.njev == 0
+            assert res.nlu == 0
+
+        y_true = sol_complex(res.t)
+        e = compute_error(res.y, y_true, rtol, atol)
+        assert np.all(e < 5)
+
+        yc_true = sol_complex(tc)
+        yc = res.sol(tc)
+        e = compute_error(yc, yc_true, rtol, atol)
+
+        assert np.all(e < 5)
+
+
+@pytest.mark.fail_slow(5)
+def test_integration_sparse_difference():
+    n = 200
+    t_span = [0, 20]
+    y0 = np.zeros(2 * n)
+    y0[1::2] = 1
+    sparsity = medazko_sparsity(n)
+
+    for method in ['BDF', 'Radau']:
+        res = solve_ivp(fun_medazko, t_span, y0, method=method,
+                        jac_sparsity=sparsity)
+
+        assert_equal(res.t[0], t_span[0])
+        assert_(res.t_events is None)
+        assert_(res.y_events is None)
+        assert_(res.success)
+        assert_equal(res.status, 0)
+
+        assert_allclose(res.y[78, -1], 0.233994e-3, rtol=1e-2)
+        assert_allclose(res.y[79, -1], 0, atol=1e-3)
+        assert_allclose(res.y[148, -1], 0.359561e-3, rtol=1e-2)
+        assert_allclose(res.y[149, -1], 0, atol=1e-3)
+        assert_allclose(res.y[198, -1], 0.117374129e-3, rtol=1e-2)
+        assert_allclose(res.y[199, -1], 0.6190807e-5, atol=1e-3)
+        assert_allclose(res.y[238, -1], 0, atol=1e-3)
+        assert_allclose(res.y[239, -1], 0.9999997, rtol=1e-2)
+
+
+def test_integration_const_jac():
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [0, 2]
+    t_span = [0, 2]
+    J = jac_linear()
+    J_sparse = csc_matrix(J)
+
+    for method, jac in product(['Radau', 'BDF'], [J, J_sparse]):
+        res = solve_ivp(fun_linear, t_span, y0, rtol=rtol, atol=atol,
+                        method=method, dense_output=True, jac=jac)
+        assert_equal(res.t[0], t_span[0])
+        assert_(res.t_events is None)
+        assert_(res.y_events is None)
+        assert_(res.success)
+        assert_equal(res.status, 0)
+
+        assert_(res.nfev < 100)
+        assert_equal(res.njev, 0)
+        assert_(0 < res.nlu < 15)
+
+        y_true = sol_linear(res.t)
+        e = compute_error(res.y, y_true, rtol, atol)
+        assert_(np.all(e < 10))
+
+        tc = np.linspace(*t_span)
+        yc_true = sol_linear(tc)
+        yc = res.sol(tc)
+
+        e = compute_error(yc, yc_true, rtol, atol)
+        assert_(np.all(e < 15))
+
+        assert_allclose(res.sol(res.t), res.y, rtol=1e-14, atol=1e-14)
+
+
+@pytest.mark.slow
+@pytest.mark.parametrize('method', ['Radau', 'BDF', 'LSODA'])
+def test_integration_stiff(method, num_parallel_threads):
+    rtol = 1e-6
+    atol = 1e-6
+    y0 = [1e4, 0, 0]
+    tspan = [0, 1e8]
+
+    if method == 'LSODA' and num_parallel_threads > 1:
+        pytest.skip(reason='LSODA does not allow for concurrent calls')
+
+    def fun_robertson(t, state):
+        x, y, z = state
+        return [
+            -0.04 * x + 1e4 * y * z,
+            0.04 * x - 1e4 * y * z - 3e7 * y * y,
+            3e7 * y * y,
+        ]
+
+    res = solve_ivp(fun_robertson, tspan, y0, rtol=rtol,
+                    atol=atol, method=method)
+
+    # If the stiff mode is not activated correctly, these numbers will be much bigger
+    assert res.nfev < 5000
+    assert res.njev < 200
+
+
+def test_events(num_parallel_threads):
+    def event_rational_1(t, y):
+        return y[0] - y[1] ** 0.7
+
+    def event_rational_2(t, y):
+        return y[1] ** 0.6 - y[0]
+
+    def event_rational_3(t, y):
+        return t - 7.4
+
+    event_rational_3.terminal = True
+
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        if method == 'LSODA' and num_parallel_threads > 1:
+            continue
+
+        res = solve_ivp(fun_rational, [5, 8], [1/3, 2/9], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 1)
+        assert_equal(res.t_events[1].size, 1)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+        assert_(7.3 < res.t_events[1][0] < 7.7)
+
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert_equal(res.y_events[1].shape, (1, 2))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+        assert np.isclose(
+            event_rational_2(res.t_events[1][0], res.y_events[1][0]), 0)
+
+        event_rational_1.direction = 1
+        event_rational_2.direction = 1
+        res = solve_ivp(fun_rational, [5, 8], [1 / 3, 2 / 9], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 1)
+        assert_equal(res.t_events[1].size, 0)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert_equal(res.y_events[1].shape, (0,))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+
+        event_rational_1.direction = -1
+        event_rational_2.direction = -1
+        res = solve_ivp(fun_rational, [5, 8], [1 / 3, 2 / 9], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 0)
+        assert_equal(res.t_events[1].size, 1)
+        assert_(7.3 < res.t_events[1][0] < 7.7)
+        assert_equal(res.y_events[0].shape, (0,))
+        assert_equal(res.y_events[1].shape, (1, 2))
+        assert np.isclose(
+            event_rational_2(res.t_events[1][0], res.y_events[1][0]), 0)
+
+        event_rational_1.direction = 0
+        event_rational_2.direction = 0
+
+        res = solve_ivp(fun_rational, [5, 8], [1 / 3, 2 / 9], method=method,
+                        events=(event_rational_1, event_rational_2,
+                                event_rational_3), dense_output=True)
+        assert_equal(res.status, 1)
+        assert_equal(res.t_events[0].size, 1)
+        assert_equal(res.t_events[1].size, 0)
+        assert_equal(res.t_events[2].size, 1)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+        assert_(7.3 < res.t_events[2][0] < 7.5)
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert_equal(res.y_events[1].shape, (0,))
+        assert_equal(res.y_events[2].shape, (1, 2))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+        assert np.isclose(
+            event_rational_3(res.t_events[2][0], res.y_events[2][0]), 0)
+
+        res = solve_ivp(fun_rational, [5, 8], [1 / 3, 2 / 9], method=method,
+                        events=event_rational_1, dense_output=True)
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 1)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+
+        # Also test that termination by event doesn't break interpolants.
+        tc = np.linspace(res.t[0], res.t[-1])
+        yc_true = sol_rational(tc)
+        yc = res.sol(tc)
+        e = compute_error(yc, yc_true, 1e-3, 1e-6)
+        assert_(np.all(e < 5))
+
+        # Test that the y_event matches solution
+        assert np.allclose(sol_rational(res.t_events[0][0]), res.y_events[0][0],
+                           rtol=1e-3, atol=1e-6)
+
+    # Test in backward direction.
+    event_rational_1.direction = 0
+    event_rational_2.direction = 0
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        if method == 'LSODA' and num_parallel_threads > 1:
+            continue
+
+        res = solve_ivp(fun_rational, [8, 5], [4/9, 20/81], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 1)
+        assert_equal(res.t_events[1].size, 1)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+        assert_(7.3 < res.t_events[1][0] < 7.7)
+
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert_equal(res.y_events[1].shape, (1, 2))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+        assert np.isclose(
+            event_rational_2(res.t_events[1][0], res.y_events[1][0]), 0)
+
+        event_rational_1.direction = -1
+        event_rational_2.direction = -1
+        res = solve_ivp(fun_rational, [8, 5], [4/9, 20/81], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 1)
+        assert_equal(res.t_events[1].size, 0)
+        assert_(5.3 < res.t_events[0][0] < 5.7)
+
+        assert_equal(res.y_events[0].shape, (1, 2))
+        assert_equal(res.y_events[1].shape, (0,))
+        assert np.isclose(
+            event_rational_1(res.t_events[0][0], res.y_events[0][0]), 0)
+
+        event_rational_1.direction = 1
+        event_rational_2.direction = 1
+        res = solve_ivp(fun_rational, [8, 5], [4/9, 20/81], method=method,
+                        events=(event_rational_1, event_rational_2))
+        assert_equal(res.status, 0)
+        assert_equal(res.t_events[0].size, 0)
+        assert_equal(res.t_events[1].size, 1)
+        assert_(7.3 < res.t_events[1][0] < 7.7)
+
+        assert_equal(res.y_events[0].shape, (0,))
+        assert_equal(res.y_events[1].shape, (1, 2))
+        assert np.isclose(
+            event_rational_2(res.t_events[1][0], res.y_events[1][0]), 0)
+
+        event_rational_1.direction = 0
+        event_rational_2.direction = 0
+
+        res = solve_ivp(fun_rational, [8, 5], [4/9, 20/81], method=method,
+                        events=(event_rational_1, event_rational_2,
+                                event_rational_3), dense_output=True)
+        assert_equal(res.status, 1)
+        assert_equal(res.t_events[0].size, 0)
+        assert_equal(res.t_events[1].size, 1)
+        assert_equal(res.t_events[2].size, 1)
+        assert_(7.3 < res.t_events[1][0] < 7.7)
+        assert_(7.3 < res.t_events[2][0] < 7.5)
+
+        assert_equal(res.y_events[0].shape, (0,))
+        assert_equal(res.y_events[1].shape, (1, 2))
+        assert_equal(res.y_events[2].shape, (1, 2))
+        assert np.isclose(
+            event_rational_2(res.t_events[1][0], res.y_events[1][0]), 0)
+        assert np.isclose(
+            event_rational_3(res.t_events[2][0], res.y_events[2][0]), 0)
+
+        # Also test that termination by event doesn't break interpolants.
+        tc = np.linspace(res.t[-1], res.t[0])
+        yc_true = sol_rational(tc)
+        yc = res.sol(tc)
+        e = compute_error(yc, yc_true, 1e-3, 1e-6)
+        assert_(np.all(e < 5))
+
+        assert np.allclose(sol_rational(res.t_events[1][0]), res.y_events[1][0],
+                           rtol=1e-3, atol=1e-6)
+        assert np.allclose(sol_rational(res.t_events[2][0]), res.y_events[2][0],
+                           rtol=1e-3, atol=1e-6)
+
+
+def _get_harmonic_oscillator():
+    def f(t, y):
+        return [y[1], -y[0]]
+
+    def event(t, y):
+        return y[0]
+
+    return f, event
+
+
+@pytest.mark.parametrize('n_events', [3, 4])
+def test_event_terminal_integer(n_events):
+    f, event = _get_harmonic_oscillator()
+    event.terminal = n_events
+    res = solve_ivp(f, (0, 100), [1, 0], events=event)
+    assert len(res.t_events[0]) == n_events
+    assert len(res.y_events[0]) == n_events
+    assert_allclose(res.y_events[0][:, 0], 0, atol=1e-14)
+
+
+def test_event_terminal_iv():
+    f, event = _get_harmonic_oscillator()
+    args = (f, (0, 100), [1, 0])
+
+    event.terminal = None
+    res = solve_ivp(*args, events=event)
+    event.terminal = 0
+    ref = solve_ivp(*args, events=event)
+    assert_allclose(res.t_events, ref.t_events)
+
+    message = "The `terminal` attribute..."
+    event.terminal = -1
+    with pytest.raises(ValueError, match=message):
+        solve_ivp(*args, events=event)
+    event.terminal = 3.5
+    with pytest.raises(ValueError, match=message):
+        solve_ivp(*args, events=event)
+
+
+def test_max_step(num_parallel_threads):
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+    for method in [RK23, RK45, DOP853, Radau, BDF, LSODA]:
+        if method is LSODA and num_parallel_threads > 1:
+            continue
+        for t_span in ([5, 9], [5, 1]):
+            res = solve_ivp(fun_rational, t_span, y0, rtol=rtol,
+                            max_step=0.5, atol=atol, method=method,
+                            dense_output=True)
+            assert_equal(res.t[0], t_span[0])
+            assert_equal(res.t[-1], t_span[-1])
+            assert_(np.all(np.abs(np.diff(res.t)) <= 0.5 + 1e-15))
+            assert_(res.t_events is None)
+            assert_(res.success)
+            assert_equal(res.status, 0)
+
+            y_true = sol_rational(res.t)
+            e = compute_error(res.y, y_true, rtol, atol)
+            assert_(np.all(e < 5))
+
+            tc = np.linspace(*t_span)
+            yc_true = sol_rational(tc)
+            yc = res.sol(tc)
+
+            e = compute_error(yc, yc_true, rtol, atol)
+            assert_(np.all(e < 5))
+
+            assert_allclose(res.sol(res.t), res.y, rtol=1e-15, atol=1e-15)
+
+            assert_raises(ValueError, method, fun_rational, t_span[0], y0,
+                          t_span[1], max_step=-1)
+
+            if method is not LSODA:
+                solver = method(fun_rational, t_span[0], y0, t_span[1],
+                                rtol=rtol, atol=atol, max_step=1e-20)
+                message = solver.step()
+                message = solver.step()  # First step succeeds but second step fails.
+                assert_equal(solver.status, 'failed')
+                assert_("step size is less" in message)
+                assert_raises(RuntimeError, solver.step)
+
+
+def test_first_step(num_parallel_threads):
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+    first_step = 0.1
+    for method in [RK23, RK45, DOP853, Radau, BDF, LSODA]:
+        if method is LSODA and num_parallel_threads > 1:
+            continue
+        for t_span in ([5, 9], [5, 1]):
+            res = solve_ivp(fun_rational, t_span, y0, rtol=rtol,
+                            max_step=0.5, atol=atol, method=method,
+                            dense_output=True, first_step=first_step)
+
+            assert_equal(res.t[0], t_span[0])
+            assert_equal(res.t[-1], t_span[-1])
+            assert_allclose(first_step, np.abs(res.t[1] - 5))
+            assert_(res.t_events is None)
+            assert_(res.success)
+            assert_equal(res.status, 0)
+
+            y_true = sol_rational(res.t)
+            e = compute_error(res.y, y_true, rtol, atol)
+            assert_(np.all(e < 5))
+
+            tc = np.linspace(*t_span)
+            yc_true = sol_rational(tc)
+            yc = res.sol(tc)
+
+            e = compute_error(yc, yc_true, rtol, atol)
+            assert_(np.all(e < 5))
+
+            assert_allclose(res.sol(res.t), res.y, rtol=1e-15, atol=1e-15)
+
+            assert_raises(ValueError, method, fun_rational, t_span[0], y0,
+                          t_span[1], first_step=-1)
+            assert_raises(ValueError, method, fun_rational, t_span[0], y0,
+                          t_span[1], first_step=5)
+
+
+def test_t_eval():
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+    for t_span in ([5, 9], [5, 1]):
+        t_eval = np.linspace(t_span[0], t_span[1], 10)
+        res = solve_ivp(fun_rational, t_span, y0, rtol=rtol, atol=atol,
+                        t_eval=t_eval)
+        assert_equal(res.t, t_eval)
+        assert_(res.t_events is None)
+        assert_(res.success)
+        assert_equal(res.status, 0)
+
+        y_true = sol_rational(res.t)
+        e = compute_error(res.y, y_true, rtol, atol)
+        assert_(np.all(e < 5))
+
+    t_eval = [5, 5.01, 7, 8, 8.01, 9]
+    res = solve_ivp(fun_rational, [5, 9], y0, rtol=rtol, atol=atol,
+                    t_eval=t_eval)
+    assert_equal(res.t, t_eval)
+    assert_(res.t_events is None)
+    assert_(res.success)
+    assert_equal(res.status, 0)
+
+    y_true = sol_rational(res.t)
+    e = compute_error(res.y, y_true, rtol, atol)
+    assert_(np.all(e < 5))
+
+    t_eval = [5, 4.99, 3, 1.5, 1.1, 1.01, 1]
+    res = solve_ivp(fun_rational, [5, 1], y0, rtol=rtol, atol=atol,
+                    t_eval=t_eval)
+    assert_equal(res.t, t_eval)
+    assert_(res.t_events is None)
+    assert_(res.success)
+    assert_equal(res.status, 0)
+
+    t_eval = [5.01, 7, 8, 8.01]
+    res = solve_ivp(fun_rational, [5, 9], y0, rtol=rtol, atol=atol,
+                    t_eval=t_eval)
+    assert_equal(res.t, t_eval)
+    assert_(res.t_events is None)
+    assert_(res.success)
+    assert_equal(res.status, 0)
+
+    y_true = sol_rational(res.t)
+    e = compute_error(res.y, y_true, rtol, atol)
+    assert_(np.all(e < 5))
+
+    t_eval = [4.99, 3, 1.5, 1.1, 1.01]
+    res = solve_ivp(fun_rational, [5, 1], y0, rtol=rtol, atol=atol,
+                    t_eval=t_eval)
+    assert_equal(res.t, t_eval)
+    assert_(res.t_events is None)
+    assert_(res.success)
+    assert_equal(res.status, 0)
+
+    t_eval = [4, 6]
+    assert_raises(ValueError, solve_ivp, fun_rational, [5, 9], y0,
+                  rtol=rtol, atol=atol, t_eval=t_eval)
+
+
+def test_t_eval_dense_output():
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+    t_span = [5, 9]
+    t_eval = np.linspace(t_span[0], t_span[1], 10)
+    res = solve_ivp(fun_rational, t_span, y0, rtol=rtol, atol=atol,
+                    t_eval=t_eval)
+    res_d = solve_ivp(fun_rational, t_span, y0, rtol=rtol, atol=atol,
+                      t_eval=t_eval, dense_output=True)
+    assert_equal(res.t, t_eval)
+    assert_(res.t_events is None)
+    assert_(res.success)
+    assert_equal(res.status, 0)
+
+    assert_equal(res.t, res_d.t)
+    assert_equal(res.y, res_d.y)
+    assert_(res_d.t_events is None)
+    assert_(res_d.success)
+    assert_equal(res_d.status, 0)
+
+    # if t and y are equal only test values for one case
+    y_true = sol_rational(res.t)
+    e = compute_error(res.y, y_true, rtol, atol)
+    assert_(np.all(e < 5))
+
+
+@pytest.mark.thread_unsafe
+def test_t_eval_early_event():
+    def early_event(t, y):
+        return t - 7
+
+    early_event.terminal = True
+
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [1/3, 2/9]
+    t_span = [5, 9]
+    t_eval = np.linspace(7.5, 9, 16)
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       "The following arguments have no effect for a chosen "
+                       "solver: `jac`")
+            res = solve_ivp(fun_rational, t_span, y0, rtol=rtol, atol=atol,
+                            method=method, t_eval=t_eval, events=early_event,
+                            jac=jac_rational)
+        assert res.success
+        assert res.message == 'A termination event occurred.'
+        assert res.status == 1
+        assert not res.t and not res.y
+        assert len(res.t_events) == 1
+        assert res.t_events[0].size == 1
+        assert res.t_events[0][0] == 7
+
+
+def test_event_dense_output_LSODA(num_parallel_threads):
+    if num_parallel_threads > 1:
+        pytest.skip('LSODA does not allow for concurrent execution')
+
+    def event_lsoda(t, y):
+        return y[0] - 2.02e-5
+
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = [0.05]
+    t_span = [-2, 2]
+    first_step = 1e-3
+    res = solve_ivp(
+        fun_event_dense_output_LSODA,
+        t_span,
+        y0,
+        method="LSODA",
+        dense_output=True,
+        events=event_lsoda,
+        first_step=first_step,
+        max_step=1,
+        rtol=rtol,
+        atol=atol,
+        jac=jac_event_dense_output_LSODA,
+    )
+
+    assert_equal(res.t[0], t_span[0])
+    assert_equal(res.t[-1], t_span[-1])
+    assert_allclose(first_step, np.abs(res.t[1] - t_span[0]))
+    assert res.success
+    assert_equal(res.status, 0)
+
+    y_true = sol_event_dense_output_LSODA(res.t)
+    e = compute_error(res.y, y_true, rtol, atol)
+    assert_array_less(e, 5)
+
+    tc = np.linspace(*t_span)
+    yc_true = sol_event_dense_output_LSODA(tc)
+    yc = res.sol(tc)
+    e = compute_error(yc, yc_true, rtol, atol)
+    assert_array_less(e, 5)
+
+    assert_allclose(res.sol(res.t), res.y, rtol=1e-15, atol=1e-15)
+
+
+def test_no_integration():
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        sol = solve_ivp(lambda t, y: -y, [4, 4], [2, 3],
+                        method=method, dense_output=True)
+        assert_equal(sol.sol(4), [2, 3])
+        assert_equal(sol.sol([4, 5, 6]), [[2, 2, 2], [3, 3, 3]])
+
+
+def test_no_integration_class():
+    for method in [RK23, RK45, DOP853, Radau, BDF, LSODA]:
+        solver = method(lambda t, y: -y, 0.0, [10.0, 0.0], 0.0)
+        solver.step()
+        assert_equal(solver.status, 'finished')
+        sol = solver.dense_output()
+        assert_equal(sol(0.0), [10.0, 0.0])
+        assert_equal(sol([0, 1, 2]), [[10, 10, 10], [0, 0, 0]])
+
+        solver = method(lambda t, y: -y, 0.0, [], np.inf)
+        solver.step()
+        assert_equal(solver.status, 'finished')
+        sol = solver.dense_output()
+        assert_equal(sol(100.0), [])
+        assert_equal(sol([0, 1, 2]), np.empty((0, 3)))
+
+
+def test_empty():
+    def fun(t, y):
+        return np.zeros((0,))
+
+    y0 = np.zeros((0,))
+
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        sol = assert_no_warnings(solve_ivp, fun, [0, 10], y0,
+                                 method=method, dense_output=True)
+        assert_equal(sol.sol(10), np.zeros((0,)))
+        assert_equal(sol.sol([1, 2, 3]), np.zeros((0, 3)))
+
+    for method in ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA']:
+        sol = assert_no_warnings(solve_ivp, fun, [0, np.inf], y0,
+                                 method=method, dense_output=True)
+        assert_equal(sol.sol(10), np.zeros((0,)))
+        assert_equal(sol.sol([1, 2, 3]), np.zeros((0, 3)))
+
+
+def test_ConstantDenseOutput():
+    sol = ConstantDenseOutput(0, 1, np.array([1, 2]))
+    assert_allclose(sol(1.5), [1, 2])
+    assert_allclose(sol([1, 1.5, 2]), [[1, 1, 1], [2, 2, 2]])
+
+    sol = ConstantDenseOutput(0, 1, np.array([]))
+    assert_allclose(sol(1.5), np.empty(0))
+    assert_allclose(sol([1, 1.5, 2]), np.empty((0, 3)))
+
+
+def test_classes():
+    y0 = [1 / 3, 2 / 9]
+    for cls in [RK23, RK45, DOP853, Radau, BDF, LSODA]:
+        solver = cls(fun_rational, 5, y0, np.inf)
+        assert_equal(solver.n, 2)
+        assert_equal(solver.status, 'running')
+        assert_equal(solver.t_bound, np.inf)
+        assert_equal(solver.direction, 1)
+        assert_equal(solver.t, 5)
+        assert_equal(solver.y, y0)
+        assert_(solver.step_size is None)
+        if cls is not LSODA:
+            assert_(solver.nfev > 0)
+            assert_(solver.njev >= 0)
+            assert_equal(solver.nlu, 0)
+        else:
+            assert_equal(solver.nfev, 0)
+            assert_equal(solver.njev, 0)
+            assert_equal(solver.nlu, 0)
+
+        assert_raises(RuntimeError, solver.dense_output)
+
+        message = solver.step()
+        assert_equal(solver.status, 'running')
+        assert_equal(message, None)
+        assert_equal(solver.n, 2)
+        assert_equal(solver.t_bound, np.inf)
+        assert_equal(solver.direction, 1)
+        assert_(solver.t > 5)
+        assert_(not np.all(np.equal(solver.y, y0)))
+        assert_(solver.step_size > 0)
+        assert_(solver.nfev > 0)
+        assert_(solver.njev >= 0)
+        assert_(solver.nlu >= 0)
+        sol = solver.dense_output()
+        assert_allclose(sol(5), y0, rtol=1e-15, atol=0)
+
+
+def test_OdeSolution():
+    ts = np.array([0, 2, 5], dtype=float)
+    s1 = ConstantDenseOutput(ts[0], ts[1], np.array([-1]))
+    s2 = ConstantDenseOutput(ts[1], ts[2], np.array([1]))
+
+    sol = OdeSolution(ts, [s1, s2])
+
+    assert_equal(sol(-1), [-1])
+    assert_equal(sol(1), [-1])
+    assert_equal(sol(2), [-1])
+    assert_equal(sol(3), [1])
+    assert_equal(sol(5), [1])
+    assert_equal(sol(6), [1])
+
+    assert_equal(sol([0, 6, -2, 1.5, 4.5, 2.5, 5, 5.5, 2]),
+                 np.array([[-1, 1, -1, -1, 1, 1, 1, 1, -1]]))
+
+    ts = np.array([10, 4, -3])
+    s1 = ConstantDenseOutput(ts[0], ts[1], np.array([-1]))
+    s2 = ConstantDenseOutput(ts[1], ts[2], np.array([1]))
+
+    sol = OdeSolution(ts, [s1, s2])
+    assert_equal(sol(11), [-1])
+    assert_equal(sol(10), [-1])
+    assert_equal(sol(5), [-1])
+    assert_equal(sol(4), [-1])
+    assert_equal(sol(0), [1])
+    assert_equal(sol(-3), [1])
+    assert_equal(sol(-4), [1])
+
+    assert_equal(sol([12, -5, 10, -3, 6, 1, 4]),
+                 np.array([[-1, 1, -1, 1, -1, 1, -1]]))
+
+    ts = np.array([1, 1])
+    s = ConstantDenseOutput(1, 1, np.array([10]))
+    sol = OdeSolution(ts, [s])
+    assert_equal(sol(0), [10])
+    assert_equal(sol(1), [10])
+    assert_equal(sol(2), [10])
+
+    assert_equal(sol([2, 1, 0]), np.array([[10, 10, 10]]))
+
+
+def test_num_jac():
+    def fun(t, y):
+        return np.vstack([
+            -0.04 * y[0] + 1e4 * y[1] * y[2],
+            0.04 * y[0] - 1e4 * y[1] * y[2] - 3e7 * y[1] ** 2,
+            3e7 * y[1] ** 2
+        ])
+
+    def jac(t, y):
+        return np.array([
+            [-0.04, 1e4 * y[2], 1e4 * y[1]],
+            [0.04, -1e4 * y[2] - 6e7 * y[1], -1e4 * y[1]],
+            [0, 6e7 * y[1], 0]
+        ])
+
+    t = 1
+    y = np.array([1, 0, 0])
+    J_true = jac(t, y)
+    threshold = 1e-5
+    f = fun(t, y).ravel()
+
+    J_num, factor = num_jac(fun, t, y, f, threshold, None)
+    assert_allclose(J_num, J_true, rtol=1e-5, atol=1e-5)
+
+    J_num, factor = num_jac(fun, t, y, f, threshold, factor)
+    assert_allclose(J_num, J_true, rtol=1e-5, atol=1e-5)
+
+
+def test_num_jac_sparse():
+    def fun(t, y):
+        e = y[1:]**3 - y[:-1]**2
+        z = np.zeros(y.shape[1])
+        return np.vstack((z, 3 * e)) + np.vstack((2 * e, z))
+
+    def structure(n):
+        A = np.zeros((n, n), dtype=int)
+        A[0, 0] = 1
+        A[0, 1] = 1
+        for i in range(1, n - 1):
+            A[i, i - 1: i + 2] = 1
+        A[-1, -1] = 1
+        A[-1, -2] = 1
+
+        return A
+
+    np.random.seed(0)
+    n = 20
+    y = np.random.randn(n)
+    A = structure(n)
+    groups = group_columns(A)
+
+    f = fun(0, y[:, None]).ravel()
+
+    # Compare dense and sparse results, assuming that dense implementation
+    # is correct (as it is straightforward).
+    J_num_sparse, factor_sparse = num_jac(fun, 0, y.ravel(), f, 1e-8, None,
+                                          sparsity=(A, groups))
+    J_num_dense, factor_dense = num_jac(fun, 0, y.ravel(), f, 1e-8, None)
+    assert_allclose(J_num_dense, J_num_sparse.toarray(),
+                    rtol=1e-12, atol=1e-14)
+    assert_allclose(factor_dense, factor_sparse, rtol=1e-12, atol=1e-14)
+
+    # Take small factors to trigger their recomputing inside.
+    factor = np.random.uniform(0, 1e-12, size=n)
+    J_num_sparse, factor_sparse = num_jac(fun, 0, y.ravel(), f, 1e-8, factor,
+                                          sparsity=(A, groups))
+    J_num_dense, factor_dense = num_jac(fun, 0, y.ravel(), f, 1e-8, factor)
+
+    assert_allclose(J_num_dense, J_num_sparse.toarray(),
+                    rtol=1e-12, atol=1e-14)
+    assert_allclose(factor_dense, factor_sparse, rtol=1e-12, atol=1e-14)
+
+
+def test_args():
+
+    # sys3 is actually two decoupled systems. (x, y) form a
+    # linear oscillator, while z is a nonlinear first order
+    # system with equilibria at z=0 and z=1. If k > 0, z=1
+    # is stable and z=0 is unstable.
+
+    def sys3(t, w, omega, k, zfinal):
+        x, y, z = w
+        return [-omega*y, omega*x, k*z*(1 - z)]
+
+    def sys3_jac(t, w, omega, k, zfinal):
+        x, y, z = w
+        J = np.array([[0, -omega, 0],
+                      [omega, 0, 0],
+                      [0, 0, k*(1 - 2*z)]])
+        return J
+
+    def sys3_x0decreasing(t, w, omega, k, zfinal):
+        x, y, z = w
+        return x
+
+    def sys3_y0increasing(t, w, omega, k, zfinal):
+        x, y, z = w
+        return y
+
+    def sys3_zfinal(t, w, omega, k, zfinal):
+        x, y, z = w
+        return z - zfinal
+
+    # Set the event flags for the event functions.
+    sys3_x0decreasing.direction = -1
+    sys3_y0increasing.direction = 1
+    sys3_zfinal.terminal = True
+
+    omega = 2
+    k = 4
+
+    tfinal = 5
+    zfinal = 0.99
+    # Find z0 such that when z(0) = z0, z(tfinal) = zfinal.
+    # The condition z(tfinal) = zfinal is the terminal event.
+    z0 = np.exp(-k*tfinal)/((1 - zfinal)/zfinal + np.exp(-k*tfinal))
+
+    w0 = [0, -1, z0]
+
+    # Provide the jac argument and use the Radau method to ensure that the use
+    # of the Jacobian function is exercised.
+    # If event handling is working, the solution will stop at tfinal, not tend.
+    tend = 2*tfinal
+    sol = solve_ivp(sys3, [0, tend], w0,
+                    events=[sys3_x0decreasing, sys3_y0increasing, sys3_zfinal],
+                    dense_output=True, args=(omega, k, zfinal),
+                    method='Radau', jac=sys3_jac,
+                    rtol=1e-10, atol=1e-13)
+
+    # Check that we got the expected events at the expected times.
+    x0events_t = sol.t_events[0]
+    y0events_t = sol.t_events[1]
+    zfinalevents_t = sol.t_events[2]
+    assert_allclose(x0events_t, [0.5*np.pi, 1.5*np.pi])
+    assert_allclose(y0events_t, [0.25*np.pi, 1.25*np.pi])
+    assert_allclose(zfinalevents_t, [tfinal])
+
+    # Check that the solution agrees with the known exact solution.
+    t = np.linspace(0, zfinalevents_t[0], 250)
+    w = sol.sol(t)
+    assert_allclose(w[0], np.sin(omega*t), rtol=1e-9, atol=1e-12)
+    assert_allclose(w[1], -np.cos(omega*t), rtol=1e-9, atol=1e-12)
+    assert_allclose(w[2], 1/(((1 - z0)/z0)*np.exp(-k*t) + 1),
+                    rtol=1e-9, atol=1e-12)
+
+    # Check that the state variables have the expected values at the events.
+    x0events = sol.sol(x0events_t)
+    y0events = sol.sol(y0events_t)
+    zfinalevents = sol.sol(zfinalevents_t)
+    assert_allclose(x0events[0], np.zeros_like(x0events[0]), atol=5e-14)
+    assert_allclose(x0events[1], np.ones_like(x0events[1]))
+    assert_allclose(y0events[0], np.ones_like(y0events[0]))
+    assert_allclose(y0events[1], np.zeros_like(y0events[1]), atol=5e-14)
+    assert_allclose(zfinalevents[2], [zfinal])
+
+
+@pytest.mark.thread_unsafe
+def test_array_rtol():
+    # solve_ivp had a bug with array_like `rtol`; see gh-15482
+    # check that it's fixed
+    def f(t, y):
+        return y[0], y[1]
+
+    # no warning (or error) when `rtol` is array_like
+    sol = solve_ivp(f, (0, 1), [1., 1.], rtol=[1e-1, 1e-1])
+    err1 = np.abs(np.linalg.norm(sol.y[:, -1] - np.exp(1)))
+
+    # warning when an element of `rtol` is too small
+    with pytest.warns(UserWarning, match="At least one element..."):
+        sol = solve_ivp(f, (0, 1), [1., 1.], rtol=[1e-1, 1e-16])
+        err2 = np.abs(np.linalg.norm(sol.y[:, -1] - np.exp(1)))
+
+    # tighter rtol improves the error
+    assert err2 < err1
+
+
+@pytest.mark.parametrize('method', ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF', 'LSODA'])
+def test_integration_zero_rhs(method, num_parallel_threads):
+    if method == 'LSODA' and num_parallel_threads > 1:
+        pytest.skip(reason='LSODA does not allow for concurrent execution')
+
+    result = solve_ivp(fun_zero, [0, 10], np.ones(3), method=method)
+    assert_(result.success)
+    assert_equal(result.status, 0)
+    assert_allclose(result.y, 1.0, rtol=1e-15)
+
+
+def test_args_single_value():
+    def fun_with_arg(t, y, a):
+        return a*y
+
+    message = "Supplied 'args' cannot be unpacked."
+    with pytest.raises(TypeError, match=message):
+        solve_ivp(fun_with_arg, (0, 0.1), [1], args=-1)
+
+    sol = solve_ivp(fun_with_arg, (0, 0.1), [1], args=(-1,))
+    assert_allclose(sol.y[0, -1], np.exp(-0.1))
+
+
+@pytest.mark.parametrize("f0_fill", [np.nan, np.inf])
+def test_initial_state_finiteness(f0_fill):
+    # regression test for gh-17846
+    msg = "All components of the initial state `y0` must be finite."
+    with pytest.raises(ValueError, match=msg):
+        solve_ivp(fun_zero, [0, 10], np.full(3, f0_fill))
+
+
+@pytest.mark.parametrize('method', ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF'])
+def test_zero_interval(method):
+    # Case where upper and lower limits of integration are the same
+    # Result of integration should match initial state.
+    # f[y(t)] = 2y(t)
+    def f(t, y):
+        return 2 * y
+    res = solve_ivp(f, (0.0, 0.0), np.array([1.0]), method=method)
+    assert res.success
+    assert_allclose(res.y[0, -1], 1.0)
+
+
+@pytest.mark.parametrize('method', ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF'])
+def test_tbound_respected_small_interval(method):
+    """Regression test for gh-17341"""
+    SMALL = 1e-4
+
+    # f[y(t)] = 2y(t) on t in [0,SMALL]
+    #           undefined otherwise
+    def f(t, y):
+        if t > SMALL:
+            raise ValueError("Function was evaluated outside interval")
+        return 2 * y
+    res = solve_ivp(f, (0.0, SMALL), np.array([1]), method=method)
+    assert res.success
+
+
+@pytest.mark.parametrize('method', ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF'])
+def test_tbound_respected_larger_interval(method):
+    """Regression test for gh-8848"""
+    def V(r):
+        return -11/r + 10 * r / (0.05 + r**2)
+
+    def func(t, p):
+        if t < -17 or t > 2:
+            raise ValueError("Function was evaluated outside interval")
+        P = p[0]
+        Q = p[1]
+        r = np.exp(t)
+        dPdr = r * Q
+        dQdr = -2.0 * r * ((-0.2 - V(r)) * P + 1 / r * Q)
+        return np.array([dPdr, dQdr])
+
+    result = solve_ivp(func,
+                       (-17, 2),
+                       y0=np.array([1, -11]),
+                       max_step=0.03,
+                       vectorized=False,
+                       t_eval=None,
+                       atol=1e-8,
+                       rtol=1e-5)
+    assert result.success
+
+
+@pytest.mark.parametrize('method', ['RK23', 'RK45', 'DOP853', 'Radau', 'BDF'])
+def test_tbound_respected_oscillator(method):
+    "Regression test for gh-9198"
+    def reactions_func(t, y):
+        if (t > 205):
+            raise ValueError("Called outside interval")
+        yprime = np.array([1.73307544e-02,
+                           6.49376470e-06,
+                           0.00000000e+00,
+                           0.00000000e+00])
+        return yprime
+
+    def run_sim2(t_end, n_timepoints=10, shortest_delay_line=10000000):
+        init_state = np.array([134.08298555, 138.82348612, 100., 0.])
+        t0 = 100.0
+        t1 = 200.0
+        return solve_ivp(reactions_func,
+                         (t0, t1),
+                         init_state.copy(),
+                         dense_output=True,
+                         max_step=t1 - t0)
+    result = run_sim2(1000, 100, 100)
+    assert result.success
+
+
+def test_inital_maxstep():
+    """Verify that select_inital_step respects max_step"""
+    rtol = 1e-3
+    atol = 1e-6
+    y0 = np.array([1/3, 2/9])
+    for (t0, t_bound) in ((5, 9), (5, 1)):
+        for method_order in [RK23.error_estimator_order,
+                            RK45.error_estimator_order,
+                            DOP853.error_estimator_order,
+                            3, #RADAU
+                            1 #BDF
+                            ]:
+            step_no_max = select_initial_step(fun_rational, t0, y0, t_bound,
+                                            np.inf,
+                                            fun_rational(t0,y0),
+                                            np.sign(t_bound - t0),
+                                            method_order,
+                                            rtol, atol)
+            max_step = step_no_max/2
+            step_with_max = select_initial_step(fun_rational, t0, y0, t_bound,
+                                            max_step,
+                                            fun_rational(t0, y0),
+                                            np.sign(t_bound - t0),
+                                            method_order,
+                                            rtol, atol)
+            assert_equal(max_step, step_with_max)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_rk.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_rk.py
new file mode 100644
index 0000000000000000000000000000000000000000..33cb27d0323d037c0937ab94b4de8f63b46be3d7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ivp/tests/test_rk.py
@@ -0,0 +1,37 @@
+import pytest
+from numpy.testing import assert_allclose, assert_
+import numpy as np
+from scipy.integrate import RK23, RK45, DOP853
+from scipy.integrate._ivp import dop853_coefficients
+
+
+@pytest.mark.parametrize("solver", [RK23, RK45, DOP853])
+def test_coefficient_properties(solver):
+    assert_allclose(np.sum(solver.B), 1, rtol=1e-15)
+    assert_allclose(np.sum(solver.A, axis=1), solver.C, rtol=1e-14)
+
+
+def test_coefficient_properties_dop853():
+    assert_allclose(np.sum(dop853_coefficients.B), 1, rtol=1e-15)
+    assert_allclose(np.sum(dop853_coefficients.A, axis=1),
+                    dop853_coefficients.C,
+                    rtol=1e-14)
+
+
+@pytest.mark.parametrize("solver_class", [RK23, RK45, DOP853])
+def test_error_estimation(solver_class):
+    step = 0.2
+    solver = solver_class(lambda t, y: y, 0, [1], 1, first_step=step)
+    solver.step()
+    error_estimate = solver._estimate_error(solver.K, step)
+    error = solver.y - np.exp([step])
+    assert_(np.abs(error) < np.abs(error_estimate))
+
+
+@pytest.mark.parametrize("solver_class", [RK23, RK45, DOP853])
+def test_error_estimation_complex(solver_class):
+    h = 0.2
+    solver = solver_class(lambda t, y: 1j * y, 0, [1j], 1, first_step=h)
+    solver.step()
+    err_norm = solver._estimate_error_norm(solver.K, h, scale=[1])
+    assert np.isrealobj(err_norm)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_lebedev.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_lebedev.py
new file mode 100644
index 0000000000000000000000000000000000000000..da200972f9d475162f84294ed335149dc86fe94b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_lebedev.py
@@ -0,0 +1,5450 @@
+# getLebedevSphere
+# Copyright (c) 2010, Robert Parrish
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the distribution
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# Brainlessly translated to Python
+
+import numpy as np
+from numpy import pi, zeros, sqrt
+
+
+__all__ = ['lebedev_rule']
+
+
+def get_lebedev_sphere(degree):
+    # getLebedevSphere
+    # @author Rob Parrish, The Sherrill Group, CCMST Georgia Tech
+    # @email robparrish@gmail.com
+    # @date 03/24/2010
+    #
+    # @description - function to compute normalized points and weights
+    # for Lebedev quadratures on the surface of the unit sphere at double precision.
+    # **********Relative error is generally expected to be ~2.0E-14 [1]********
+    # Lebedev quadratures are superbly accurate and efficient quadrature rules for
+    # approximating integrals of the form $v = \iint_{4\pi}  f(\Omega) \ \ud
+    # \Omega$, where $\Omega is the solid angle on the surface of the unit
+    # sphere. Lebedev quadratures integrate all spherical harmonics up to $l =
+    # order$, where $degree \approx order(order+1)/3$. These grids may be easily
+    # combined with radial quadratures to provide robust cubature formulae. For
+    # example, see 'A. Becke, 1988c, J. Chem. Phys., 88(4), pp. 2547' (The first
+    # paper on tractable molecular Density Functional Theory methods, of which
+    # Lebedev grids and numerical cubature are an intrinsic part).
+    #
+    # @param degree - positive integer specifying number of points in the
+    # requested quadrature. Allowed values are (degree -> order):
+    # degree: { 6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302,
+    #   350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074,
+    #   3470, 3890, 4334, 4802, 5294, 5810 }
+    # order: {3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,35,41,47,53,59,65,71,77,
+    #   83,89,95,101,107,113,119,125,131}
+    #
+    #
+    # @return leb_tmp - struct containing fields:
+    #   x - x values of quadrature, constrained to unit sphere
+    #   y - y values of quadrature, constrained to unit sphere
+    #   z - z values of quadrature, constrained to unit sphere
+    #   w - quadrature weights, normalized to $4\pi$.
+    #
+    # @example: $\int_S x^2+y^2-z^2 \ud \Omega = 4.188790204786399$
+    #   f = @(x,y,z) x.^2+y.^2-z.^2
+    #   leb = getLebedevSphere(590)
+    #   v = f(leb.x,leb.y,leb.z)
+    #   int = sum(v.*leb.w)
+    #
+    # @citation - Translated from a Fortran code kindly provided by Christoph van
+    # Wuellen (Ruhr-Universitaet, Bochum, Germany), which in turn came from the
+    # original C routines coded by Dmitri Laikov (Moscow State University,
+    # Moscow, Russia). The MATLAB implementation of this code is designed for
+    # benchmarking of new DFT integration techniques to be implemented in the
+    # open source Psi4 ab initio quantum chemistry program.
+    #
+    # As per Professor Wuellen's request, any papers published using this code
+    # or its derivatives are requested to include the following citation:
+    #
+    # [1] V.I. Lebedev, and D.N. Laikov
+    #    "A quadrature formula for the sphere of the 131st
+    #     algebraic order of accuracy"
+    #    Doklady Mathematics, Vol. 59, No. 3, 1999, pp. 477-481.
+
+    class Leb:
+        x, y, z, w = None, None, None, None
+
+    leb_tmp = Leb()
+
+    leb_tmp.x = zeros(degree)
+    leb_tmp.y = zeros(degree)
+    leb_tmp.z = zeros(degree)
+    leb_tmp.w = zeros(degree)
+
+    start = 0
+    a = 0.0
+    b = 0.0
+
+    match degree:
+
+        case 6:
+
+            v = 0.1666666666666667E+0
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+
+        case 14:
+
+            v = 0.6666666666666667E-1
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.7500000000000000E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+
+        case 26:
+
+            v = 0.4761904761904762E-1
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3809523809523810E-1
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.3214285714285714E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+
+        case 38:
+
+            v = 0.9523809523809524E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3214285714285714E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.4597008433809831E+0
+            v = 0.2857142857142857E-1
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+
+        case 50:
+
+            v = 0.1269841269841270E-1
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2257495590828924E-1
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.2109375000000000E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.3015113445777636E+0
+            v = 0.2017333553791887E-1
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+
+        case 74:
+
+            v = 0.5130671797338464E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1660406956574204E-1
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = -0.2958603896103896E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.4803844614152614E+0
+            v = 0.2657620708215946E-1
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3207726489807764E+0
+            v = 0.1652217099371571E-1
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+
+        case 86:
+
+            v = 0.1154401154401154E-1
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1194390908585628E-1
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.3696028464541502E+0
+            v = 0.1111055571060340E-1
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6943540066026664E+0
+            v = 0.1187650129453714E-1
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3742430390903412E+0
+            v = 0.1181230374690448E-1
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+
+        case 110:
+
+            v = 0.3828270494937162E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.9793737512487512E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1851156353447362E+0
+            v = 0.8211737283191111E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6904210483822922E+0
+            v = 0.9942814891178103E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3956894730559419E+0
+            v = 0.9595471336070963E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4783690288121502E+0
+            v = 0.9694996361663028E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+
+        case 146:
+
+            v = 0.5996313688621381E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.7372999718620756E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.7210515360144488E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.6764410400114264E+0
+            v = 0.7116355493117555E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4174961227965453E+0
+            v = 0.6753829486314477E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1574676672039082E+0
+            v = 0.7574394159054034E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1403553811713183E+0
+            b = 0.4493328323269557E+0
+            v = 0.6991087353303262E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 170:
+
+            v = 0.5544842902037365E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.6071332770670752E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.6383674773515093E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2551252621114134E+0
+            v = 0.5183387587747790E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6743601460362766E+0
+            v = 0.6317929009813725E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4318910696719410E+0
+            v = 0.6201670006589077E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2613931360335988E+0
+            v = 0.5477143385137348E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4990453161796037E+0
+            b = 0.1446630744325115E+0
+            v = 0.5968383987681156E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 194:
+
+            v = 0.1782340447244611E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.5716905949977102E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.5573383178848738E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.6712973442695226E+0
+            v = 0.5608704082587997E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2892465627575439E+0
+            v = 0.5158237711805383E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4446933178717437E+0
+            v = 0.5518771467273614E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1299335447650067E+0
+            v = 0.4106777028169394E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3457702197611283E+0
+            v = 0.5051846064614808E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1590417105383530E+0
+            b = 0.8360360154824589E+0
+            v = 0.5530248916233094E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 230:
+
+            v = -0.5522639919727325E-1
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.4450274607445226E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.4492044687397611E+0
+            v = 0.4496841067921404E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2520419490210201E+0
+            v = 0.5049153450478750E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6981906658447242E+0
+            v = 0.3976408018051883E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6587405243460960E+0
+            v = 0.4401400650381014E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4038544050097660E-1
+            v = 0.1724544350544401E-1
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5823842309715585E+0
+            v = 0.4231083095357343E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3545877390518688E+0
+            v = 0.5198069864064399E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2272181808998187E+0
+            b = 0.4864661535886647E+0
+            v = 0.4695720972568883E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 266:
+
+            v = -0.1313769127326952E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = -0.2522728704859336E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.4186853881700583E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.7039373391585475E+0
+            v = 0.5315167977810885E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1012526248572414E+0
+            v = 0.4047142377086219E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4647448726420539E+0
+            v = 0.4112482394406990E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3277420654971629E+0
+            v = 0.3595584899758782E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6620338663699974E+0
+            v = 0.4256131351428158E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8506508083520399E+0
+            v = 0.4229582700647240E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3233484542692899E+0
+            b = 0.1153112011009701E+0
+            v = 0.4080914225780505E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2314790158712601E+0
+            b = 0.5244939240922365E+0
+            v = 0.4071467593830964E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 302:
+
+            v = 0.8545911725128148E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3599119285025571E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.3515640345570105E+0
+            v = 0.3449788424305883E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6566329410219612E+0
+            v = 0.3604822601419882E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4729054132581005E+0
+            v = 0.3576729661743367E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9618308522614784E-1
+            v = 0.2352101413689164E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2219645236294178E+0
+            v = 0.3108953122413675E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7011766416089545E+0
+            v = 0.3650045807677255E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2644152887060663E+0
+            v = 0.2982344963171804E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5718955891878961E+0
+            v = 0.3600820932216460E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2510034751770465E+0
+            b = 0.8000727494073952E+0
+            v = 0.3571540554273387E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1233548532583327E+0
+            b = 0.4127724083168531E+0
+            v = 0.3392312205006170E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 350:
+
+            v = 0.3006796749453936E-2
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3050627745650771E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.7068965463912316E+0
+            v = 0.1621104600288991E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4794682625712025E+0
+            v = 0.3005701484901752E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1927533154878019E+0
+            v = 0.2990992529653774E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6930357961327123E+0
+            v = 0.2982170644107595E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3608302115520091E+0
+            v = 0.2721564237310992E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6498486161496169E+0
+            v = 0.3033513795811141E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1932945013230339E+0
+            v = 0.3007949555218533E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3800494919899303E+0
+            v = 0.2881964603055307E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2899558825499574E+0
+            b = 0.7934537856582316E+0
+            v = 0.2958357626535696E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9684121455103957E-1
+            b = 0.8280801506686862E+0
+            v = 0.3036020026407088E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1833434647041659E+0
+            b = 0.9074658265305127E+0
+            v = 0.2832187403926303E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 434:
+
+            v = 0.5265897968224436E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2548219972002607E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.2512317418927307E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.6909346307509111E+0
+            v = 0.2530403801186355E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1774836054609158E+0
+            v = 0.2014279020918528E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4914342637784746E+0
+            v = 0.2501725168402936E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6456664707424256E+0
+            v = 0.2513267174597564E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2861289010307638E+0
+            v = 0.2302694782227416E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7568084367178018E-1
+            v = 0.1462495621594614E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3927259763368002E+0
+            v = 0.2445373437312980E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8818132877794288E+0
+            v = 0.2417442375638981E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9776428111182649E+0
+            v = 0.1910951282179532E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2054823696403044E+0
+            b = 0.8689460322872412E+0
+            v = 0.2416930044324775E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5905157048925271E+0
+            b = 0.7999278543857286E+0
+            v = 0.2512236854563495E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5550152361076807E+0
+            b = 0.7717462626915901E+0
+            v = 0.2496644054553086E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9371809858553722E+0
+            b = 0.3344363145343455E+0
+            v = 0.2236607760437849E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 590:
+
+            v = 0.3095121295306187E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1852379698597489E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.7040954938227469E+0
+            v = 0.1871790639277744E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6807744066455243E+0
+            v = 0.1858812585438317E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6372546939258752E+0
+            v = 0.1852028828296213E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5044419707800358E+0
+            v = 0.1846715956151242E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4215761784010967E+0
+            v = 0.1818471778162769E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3317920736472123E+0
+            v = 0.1749564657281154E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2384736701421887E+0
+            v = 0.1617210647254411E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1459036449157763E+0
+            v = 0.1384737234851692E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6095034115507196E-1
+            v = 0.9764331165051050E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6116843442009876E+0
+            v = 0.1857161196774078E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3964755348199858E+0
+            v = 0.1705153996395864E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1724782009907724E+0
+            v = 0.1300321685886048E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5610263808622060E+0
+            b = 0.3518280927733519E+0
+            v = 0.1842866472905286E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4742392842551980E+0
+            b = 0.2634716655937950E+0
+            v = 0.1802658934377451E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5984126497885380E+0
+            b = 0.1816640840360209E+0
+            v = 0.1849830560443660E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3791035407695563E+0
+            b = 0.1720795225656878E+0
+            v = 0.1713904507106709E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2778673190586244E+0
+            b = 0.8213021581932511E-1
+            v = 0.1555213603396808E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5033564271075117E+0
+            b = 0.8999205842074875E-1
+            v = 0.1802239128008525E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 770:
+
+            v = 0.2192942088181184E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1436433617319080E-2
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.1421940344335877E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.5087204410502360E-1
+            v = 0.6798123511050502E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1228198790178831E+0
+            v = 0.9913184235294912E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2026890814408786E+0
+            v = 0.1180207833238949E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2847745156464294E+0
+            v = 0.1296599602080921E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3656719078978026E+0
+            v = 0.1365871427428316E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4428264886713469E+0
+            v = 0.1402988604775325E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5140619627249735E+0
+            v = 0.1418645563595609E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6306401219166803E+0
+            v = 0.1421376741851662E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6716883332022612E+0
+            v = 0.1423996475490962E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6979792685336881E+0
+            v = 0.1431554042178567E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1446865674195309E+0
+            v = 0.9254401499865368E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3390263475411216E+0
+            v = 0.1250239995053509E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5335804651263506E+0
+            v = 0.1394365843329230E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6944024393349413E-1
+            b = 0.2355187894242326E+0
+            v = 0.1127089094671749E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2269004109529460E+0
+            b = 0.4102182474045730E+0
+            v = 0.1345753760910670E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8025574607775339E-1
+            b = 0.6214302417481605E+0
+            v = 0.1424957283316783E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1467999527896572E+0
+            b = 0.3245284345717394E+0
+            v = 0.1261523341237750E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1571507769824727E+0
+            b = 0.5224482189696630E+0
+            v = 0.1392547106052696E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2365702993157246E+0
+            b = 0.6017546634089558E+0
+            v = 0.1418761677877656E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7714815866765732E-1
+            b = 0.4346575516141163E+0
+            v = 0.1338366684479554E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3062936666210730E+0
+            b = 0.4908826589037616E+0
+            v = 0.1393700862676131E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3822477379524787E+0
+            b = 0.5648768149099500E+0
+            v = 0.1415914757466932E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 974:
+
+            v = 0.1438294190527431E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1125772288287004E-2
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.4292963545341347E-1
+            v = 0.4948029341949241E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1051426854086404E+0
+            v = 0.7357990109125470E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1750024867623087E+0
+            v = 0.8889132771304384E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2477653379650257E+0
+            v = 0.9888347838921435E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3206567123955957E+0
+            v = 0.1053299681709471E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3916520749849983E+0
+            v = 0.1092778807014578E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4590825874187624E+0
+            v = 0.1114389394063227E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5214563888415861E+0
+            v = 0.1123724788051555E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6253170244654199E+0
+            v = 0.1125239325243814E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6637926744523170E+0
+            v = 0.1126153271815905E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6910410398498301E+0
+            v = 0.1130286931123841E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7052907007457760E+0
+            v = 0.1134986534363955E-2
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1236686762657990E+0
+            v = 0.6823367927109931E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2940777114468387E+0
+            v = 0.9454158160447096E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4697753849207649E+0
+            v = 0.1074429975385679E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6334563241139567E+0
+            v = 0.1129300086569132E-2
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5974048614181342E-1
+            b = 0.2029128752777523E+0
+            v = 0.8436884500901954E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1375760408473636E+0
+            b = 0.4602621942484054E+0
+            v = 0.1075255720448885E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3391016526336286E+0
+            b = 0.5030673999662036E+0
+            v = 0.1108577236864462E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1271675191439820E+0
+            b = 0.2817606422442134E+0
+            v = 0.9566475323783357E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2693120740413512E+0
+            b = 0.4331561291720157E+0
+            v = 0.1080663250717391E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1419786452601918E+0
+            b = 0.6256167358580814E+0
+            v = 0.1126797131196295E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6709284600738255E-1
+            b = 0.3798395216859157E+0
+            v = 0.1022568715358061E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7057738183256172E-1
+            b = 0.5517505421423520E+0
+            v = 0.1108960267713108E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2783888477882155E+0
+            b = 0.6029619156159187E+0
+            v = 0.1122790653435766E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1979578938917407E+0
+            b = 0.3589606329589096E+0
+            v = 0.1032401847117460E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2087307061103274E+0
+            b = 0.5348666438135476E+0
+            v = 0.1107249382283854E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4055122137872836E+0
+            b = 0.5674997546074373E+0
+            v = 0.1121780048519972E-2
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 1202:
+
+            v = 0.1105189233267572E-3
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.9205232738090741E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.9133159786443561E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.3712636449657089E-1
+            v = 0.3690421898017899E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9140060412262223E-1
+            v = 0.5603990928680660E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1531077852469906E+0
+            v = 0.6865297629282609E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2180928891660612E+0
+            v = 0.7720338551145630E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2839874532200175E+0
+            v = 0.8301545958894795E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3491177600963764E+0
+            v = 0.8686692550179628E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4121431461444309E+0
+            v = 0.8927076285846890E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4718993627149127E+0
+            v = 0.9060820238568219E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5273145452842337E+0
+            v = 0.9119777254940867E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6209475332444019E+0
+            v = 0.9128720138604181E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6569722711857291E+0
+            v = 0.9130714935691735E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6841788309070143E+0
+            v = 0.9152873784554116E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7012604330123631E+0
+            v = 0.9187436274321654E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1072382215478166E+0
+            v = 0.5176977312965694E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2582068959496968E+0
+            v = 0.7331143682101417E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4172752955306717E+0
+            v = 0.8463232836379928E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5700366911792503E+0
+            v = 0.9031122694253992E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9827986018263947E+0
+            b = 0.1771774022615325E+0
+            v = 0.6485778453163257E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9624249230326228E+0
+            b = 0.2475716463426288E+0
+            v = 0.7435030910982369E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9402007994128811E+0
+            b = 0.3354616289066489E+0
+            v = 0.7998527891839054E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9320822040143202E+0
+            b = 0.3173615246611977E+0
+            v = 0.8101731497468018E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9043674199393299E+0
+            b = 0.4090268427085357E+0
+            v = 0.8483389574594331E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8912407560074747E+0
+            b = 0.3854291150669224E+0
+            v = 0.8556299257311812E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8676435628462708E+0
+            b = 0.4932221184851285E+0
+            v = 0.8803208679738260E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8581979986041619E+0
+            b = 0.4785320675922435E+0
+            v = 0.8811048182425720E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8396753624049856E+0
+            b = 0.4507422593157064E+0
+            v = 0.8850282341265444E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8165288564022188E+0
+            b = 0.5632123020762100E+0
+            v = 0.9021342299040653E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8015469370783529E+0
+            b = 0.5434303569693900E+0
+            v = 0.9010091677105086E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7773563069070351E+0
+            b = 0.5123518486419871E+0
+            v = 0.9022692938426915E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7661621213900394E+0
+            b = 0.6394279634749102E+0
+            v = 0.9158016174693465E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7553584143533510E+0
+            b = 0.6269805509024392E+0
+            v = 0.9131578003189435E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7344305757559503E+0
+            b = 0.6031161693096310E+0
+            v = 0.9107813579482705E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.7043837184021765E+0
+            b = 0.5693702498468441E+0
+            v = 0.9105760258970126E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 1454:
+
+            v = 0.7777160743261247E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.7557646413004701E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.3229290663413854E-1
+            v = 0.2841633806090617E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8036733271462222E-1
+            v = 0.4374419127053555E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1354289960531653E+0
+            v = 0.5417174740872172E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1938963861114426E+0
+            v = 0.6148000891358593E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2537343715011275E+0
+            v = 0.6664394485800705E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3135251434752570E+0
+            v = 0.7025039356923220E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3721558339375338E+0
+            v = 0.7268511789249627E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4286809575195696E+0
+            v = 0.7422637534208629E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4822510128282994E+0
+            v = 0.7509545035841214E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5320679333566263E+0
+            v = 0.7548535057718401E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6172998195394274E+0
+            v = 0.7554088969774001E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6510679849127481E+0
+            v = 0.7553147174442808E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6777315251687360E+0
+            v = 0.7564767653292297E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6963109410648741E+0
+            v = 0.7587991808518730E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7058935009831749E+0
+            v = 0.7608261832033027E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9955546194091857E+0
+            v = 0.4021680447874916E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9734115901794209E+0
+            v = 0.5804871793945964E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9275693732388626E+0
+            v = 0.6792151955945159E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.8568022422795103E+0
+            v = 0.7336741211286294E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.7623495553719372E+0
+            v = 0.7581866300989608E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5707522908892223E+0
+            b = 0.4387028039889501E+0
+            v = 0.7538257859800743E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5196463388403083E+0
+            b = 0.3858908414762617E+0
+            v = 0.7483517247053123E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4646337531215351E+0
+            b = 0.3301937372343854E+0
+            v = 0.7371763661112059E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4063901697557691E+0
+            b = 0.2725423573563777E+0
+            v = 0.7183448895756934E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3456329466643087E+0
+            b = 0.2139510237495250E+0
+            v = 0.6895815529822191E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2831395121050332E+0
+            b = 0.1555922309786647E+0
+            v = 0.6480105801792886E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2197682022925330E+0
+            b = 0.9892878979686097E-1
+            v = 0.5897558896594636E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1564696098650355E+0
+            b = 0.4598642910675510E-1
+            v = 0.5095708849247346E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6027356673721295E+0
+            b = 0.3376625140173426E+0
+            v = 0.7536906428909755E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5496032320255096E+0
+            b = 0.2822301309727988E+0
+            v = 0.7472505965575118E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4921707755234567E+0
+            b = 0.2248632342592540E+0
+            v = 0.7343017132279698E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4309422998598483E+0
+            b = 0.1666224723456479E+0
+            v = 0.7130871582177445E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3664108182313672E+0
+            b = 0.1086964901822169E+0
+            v = 0.6817022032112776E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2990189057758436E+0
+            b = 0.5251989784120085E-1
+            v = 0.6380941145604121E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6268724013144998E+0
+            b = 0.2297523657550023E+0
+            v = 0.7550381377920310E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5707324144834607E+0
+            b = 0.1723080607093800E+0
+            v = 0.7478646640144802E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5096360901960365E+0
+            b = 0.1140238465390513E+0
+            v = 0.7335918720601220E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4438729938312456E+0
+            b = 0.5611522095882537E-1
+            v = 0.7110120527658118E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6419978471082389E+0
+            b = 0.1164174423140873E+0
+            v = 0.7571363978689501E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5817218061802611E+0
+            b = 0.5797589531445219E-1
+            v = 0.7489908329079234E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 1730:
+
+            v = 0.6309049437420976E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.6398287705571748E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.6357185073530720E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2860923126194662E-1
+            v = 0.2221207162188168E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7142556767711522E-1
+            v = 0.3475784022286848E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1209199540995559E+0
+            v = 0.4350742443589804E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1738673106594379E+0
+            v = 0.4978569136522127E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2284645438467734E+0
+            v = 0.5435036221998053E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2834807671701512E+0
+            v = 0.5765913388219542E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3379680145467339E+0
+            v = 0.6001200359226003E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3911355454819537E+0
+            v = 0.6162178172717512E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4422860353001403E+0
+            v = 0.6265218152438485E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4907781568726057E+0
+            v = 0.6323987160974212E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5360006153211468E+0
+            v = 0.6350767851540569E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6142105973596603E+0
+            v = 0.6354362775297107E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6459300387977504E+0
+            v = 0.6352302462706235E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6718056125089225E+0
+            v = 0.6358117881417972E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6910888533186254E+0
+            v = 0.6373101590310117E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7030467416823252E+0
+            v = 0.6390428961368665E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8354951166354646E-1
+            v = 0.3186913449946576E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2050143009099486E+0
+            v = 0.4678028558591711E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3370208290706637E+0
+            v = 0.5538829697598626E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4689051484233963E+0
+            v = 0.6044475907190476E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5939400424557334E+0
+            v = 0.6313575103509012E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1394983311832261E+0
+            b = 0.4097581162050343E-1
+            v = 0.4078626431855630E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1967999180485014E+0
+            b = 0.8851987391293348E-1
+            v = 0.4759933057812725E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2546183732548967E+0
+            b = 0.1397680182969819E+0
+            v = 0.5268151186413440E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3121281074713875E+0
+            b = 0.1929452542226526E+0
+            v = 0.5643048560507316E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3685981078502492E+0
+            b = 0.2467898337061562E+0
+            v = 0.5914501076613073E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4233760321547856E+0
+            b = 0.3003104124785409E+0
+            v = 0.6104561257874195E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4758671236059246E+0
+            b = 0.3526684328175033E+0
+            v = 0.6230252860707806E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5255178579796463E+0
+            b = 0.4031134861145713E+0
+            v = 0.6305618761760796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5718025633734589E+0
+            b = 0.4509426448342351E+0
+            v = 0.6343092767597889E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2686927772723415E+0
+            b = 0.4711322502423248E-1
+            v = 0.5176268945737826E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3306006819904809E+0
+            b = 0.9784487303942695E-1
+            v = 0.5564840313313692E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3904906850594983E+0
+            b = 0.1505395810025273E+0
+            v = 0.5856426671038980E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4479957951904390E+0
+            b = 0.2039728156296050E+0
+            v = 0.6066386925777091E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5027076848919780E+0
+            b = 0.2571529941121107E+0
+            v = 0.6208824962234458E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5542087392260217E+0
+            b = 0.3092191375815670E+0
+            v = 0.6296314297822907E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6020850887375187E+0
+            b = 0.3593807506130276E+0
+            v = 0.6340423756791859E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4019851409179594E+0
+            b = 0.5063389934378671E-1
+            v = 0.5829627677107342E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4635614567449800E+0
+            b = 0.1032422269160612E+0
+            v = 0.6048693376081110E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5215860931591575E+0
+            b = 0.1566322094006254E+0
+            v = 0.6202362317732461E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5758202499099271E+0
+            b = 0.2098082827491099E+0
+            v = 0.6299005328403779E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6259893683876795E+0
+            b = 0.2618824114553391E+0
+            v = 0.6347722390609353E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5313795124811891E+0
+            b = 0.5263245019338556E-1
+            v = 0.6203778981238834E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5893317955931995E+0
+            b = 0.1061059730982005E+0
+            v = 0.6308414671239979E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6426246321215801E+0
+            b = 0.1594171564034221E+0
+            v = 0.6362706466959498E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6511904367376113E+0
+            b = 0.5354789536565540E-1
+            v = 0.6375414170333233E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 2030:
+
+            v = 0.4656031899197431E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.5421549195295507E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2540835336814348E-1
+            v = 0.1778522133346553E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6399322800504915E-1
+            v = 0.2811325405682796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1088269469804125E+0
+            v = 0.3548896312631459E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1570670798818287E+0
+            v = 0.4090310897173364E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2071163932282514E+0
+            v = 0.4493286134169965E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2578914044450844E+0
+            v = 0.4793728447962723E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3085687558169623E+0
+            v = 0.5015415319164265E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3584719706267024E+0
+            v = 0.5175127372677937E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4070135594428709E+0
+            v = 0.5285522262081019E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4536618626222638E+0
+            v = 0.5356832703713962E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4979195686463577E+0
+            v = 0.5397914736175170E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5393075111126999E+0
+            v = 0.5416899441599930E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6115617676843916E+0
+            v = 0.5419308476889938E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6414308435160159E+0
+            v = 0.5416936902030596E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6664099412721607E+0
+            v = 0.5419544338703164E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6859161771214913E+0
+            v = 0.5428983656630975E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6993625593503890E+0
+            v = 0.5442286500098193E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7062393387719380E+0
+            v = 0.5452250345057301E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7479028168349763E-1
+            v = 0.2568002497728530E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1848951153969366E+0
+            v = 0.3827211700292145E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3059529066581305E+0
+            v = 0.4579491561917824E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4285556101021362E+0
+            v = 0.5042003969083574E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5468758653496526E+0
+            v = 0.5312708889976025E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6565821978343439E+0
+            v = 0.5438401790747117E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1253901572367117E+0
+            b = 0.3681917226439641E-1
+            v = 0.3316041873197344E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1775721510383941E+0
+            b = 0.7982487607213301E-1
+            v = 0.3899113567153771E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2305693358216114E+0
+            b = 0.1264640966592335E+0
+            v = 0.4343343327201309E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2836502845992063E+0
+            b = 0.1751585683418957E+0
+            v = 0.4679415262318919E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3361794746232590E+0
+            b = 0.2247995907632670E+0
+            v = 0.4930847981631031E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3875979172264824E+0
+            b = 0.2745299257422246E+0
+            v = 0.5115031867540091E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4374019316999074E+0
+            b = 0.3236373482441118E+0
+            v = 0.5245217148457367E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4851275843340022E+0
+            b = 0.3714967859436741E+0
+            v = 0.5332041499895321E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5303391803806868E+0
+            b = 0.4175353646321745E+0
+            v = 0.5384583126021542E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5726197380596287E+0
+            b = 0.4612084406355461E+0
+            v = 0.5411067210798852E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2431520732564863E+0
+            b = 0.4258040133043952E-1
+            v = 0.4259797391468714E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3002096800895869E+0
+            b = 0.8869424306722721E-1
+            v = 0.4604931368460021E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3558554457457432E+0
+            b = 0.1368811706510655E+0
+            v = 0.4871814878255202E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4097782537048887E+0
+            b = 0.1860739985015033E+0
+            v = 0.5072242910074885E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4616337666067458E+0
+            b = 0.2354235077395853E+0
+            v = 0.5217069845235350E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5110707008417874E+0
+            b = 0.2842074921347011E+0
+            v = 0.5315785966280310E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5577415286163795E+0
+            b = 0.3317784414984102E+0
+            v = 0.5376833708758905E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6013060431366950E+0
+            b = 0.3775299002040700E+0
+            v = 0.5408032092069521E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3661596767261781E+0
+            b = 0.4599367887164592E-1
+            v = 0.4842744917904866E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4237633153506581E+0
+            b = 0.9404893773654421E-1
+            v = 0.5048926076188130E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4786328454658452E+0
+            b = 0.1431377109091971E+0
+            v = 0.5202607980478373E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5305702076789774E+0
+            b = 0.1924186388843570E+0
+            v = 0.5309932388325743E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5793436224231788E+0
+            b = 0.2411590944775190E+0
+            v = 0.5377419770895208E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6247069017094747E+0
+            b = 0.2886871491583605E+0
+            v = 0.5411696331677717E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4874315552535204E+0
+            b = 0.4804978774953206E-1
+            v = 0.5197996293282420E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5427337322059053E+0
+            b = 0.9716857199366665E-1
+            v = 0.5311120836622945E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5943493747246700E+0
+            b = 0.1465205839795055E+0
+            v = 0.5384309319956951E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6421314033564943E+0
+            b = 0.1953579449803574E+0
+            v = 0.5421859504051886E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6020628374713980E+0
+            b = 0.4916375015738108E-1
+            v = 0.5390948355046314E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6529222529856881E+0
+            b = 0.9861621540127005E-1
+            v = 0.5433312705027845E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 2354:
+
+            v = 0.3922616270665292E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.4703831750854424E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.4678202801282136E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2290024646530589E-1
+            v = 0.1437832228979900E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5779086652271284E-1
+            v = 0.2303572493577644E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9863103576375984E-1
+            v = 0.2933110752447454E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1428155792982185E+0
+            v = 0.3402905998359838E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1888978116601463E+0
+            v = 0.3759138466870372E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2359091682970210E+0
+            v = 0.4030638447899798E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2831228833706171E+0
+            v = 0.4236591432242211E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3299495857966693E+0
+            v = 0.4390522656946746E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3758840802660796E+0
+            v = 0.4502523466626247E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4204751831009480E+0
+            v = 0.4580577727783541E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4633068518751051E+0
+            v = 0.4631391616615899E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5039849474507313E+0
+            v = 0.4660928953698676E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5421265793440747E+0
+            v = 0.4674751807936953E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6092660230557310E+0
+            v = 0.4676414903932920E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6374654204984869E+0
+            v = 0.4674086492347870E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6615136472609892E+0
+            v = 0.4674928539483207E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6809487285958127E+0
+            v = 0.4680748979686447E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6952980021665196E+0
+            v = 0.4690449806389040E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7041245497695400E+0
+            v = 0.4699877075860818E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6744033088306065E-1
+            v = 0.2099942281069176E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1678684485334166E+0
+            v = 0.3172269150712804E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2793559049539613E+0
+            v = 0.3832051358546523E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3935264218057639E+0
+            v = 0.4252193818146985E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5052629268232558E+0
+            v = 0.4513807963755000E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6107905315437531E+0
+            v = 0.4657797469114178E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1135081039843524E+0
+            b = 0.3331954884662588E-1
+            v = 0.2733362800522836E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1612866626099378E+0
+            b = 0.7247167465436538E-1
+            v = 0.3235485368463559E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2100786550168205E+0
+            b = 0.1151539110849745E+0
+            v = 0.3624908726013453E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2592282009459942E+0
+            b = 0.1599491097143677E+0
+            v = 0.3925540070712828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3081740561320203E+0
+            b = 0.2058699956028027E+0
+            v = 0.4156129781116235E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3564289781578164E+0
+            b = 0.2521624953502911E+0
+            v = 0.4330644984623263E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4035587288240703E+0
+            b = 0.2982090785797674E+0
+            v = 0.4459677725921312E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4491671196373903E+0
+            b = 0.3434762087235733E+0
+            v = 0.4551593004456795E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4928854782917489E+0
+            b = 0.3874831357203437E+0
+            v = 0.4613341462749918E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5343646791958988E+0
+            b = 0.4297814821746926E+0
+            v = 0.4651019618269806E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5732683216530990E+0
+            b = 0.4699402260943537E+0
+            v = 0.4670249536100625E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2214131583218986E+0
+            b = 0.3873602040643895E-1
+            v = 0.3549555576441708E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2741796504750071E+0
+            b = 0.8089496256902013E-1
+            v = 0.3856108245249010E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3259797439149485E+0
+            b = 0.1251732177620872E+0
+            v = 0.4098622845756882E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3765441148826891E+0
+            b = 0.1706260286403185E+0
+            v = 0.4286328604268950E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4255773574530558E+0
+            b = 0.2165115147300408E+0
+            v = 0.4427802198993945E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4727795117058430E+0
+            b = 0.2622089812225259E+0
+            v = 0.4530473511488561E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5178546895819012E+0
+            b = 0.3071721431296201E+0
+            v = 0.4600805475703138E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5605141192097460E+0
+            b = 0.3508998998801138E+0
+            v = 0.4644599059958017E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6004763319352512E+0
+            b = 0.3929160876166931E+0
+            v = 0.4667274455712508E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3352842634946949E+0
+            b = 0.4202563457288019E-1
+            v = 0.4069360518020356E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3891971629814670E+0
+            b = 0.8614309758870850E-1
+            v = 0.4260442819919195E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4409875565542281E+0
+            b = 0.1314500879380001E+0
+            v = 0.4408678508029063E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4904893058592484E+0
+            b = 0.1772189657383859E+0
+            v = 0.4518748115548597E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5375056138769549E+0
+            b = 0.2228277110050294E+0
+            v = 0.4595564875375116E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5818255708669969E+0
+            b = 0.2677179935014386E+0
+            v = 0.4643988774315846E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6232334858144959E+0
+            b = 0.3113675035544165E+0
+            v = 0.4668827491646946E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4489485354492058E+0
+            b = 0.4409162378368174E-1
+            v = 0.4400541823741973E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5015136875933150E+0
+            b = 0.8939009917748489E-1
+            v = 0.4514512890193797E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5511300550512623E+0
+            b = 0.1351806029383365E+0
+            v = 0.4596198627347549E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5976720409858000E+0
+            b = 0.1808370355053196E+0
+            v = 0.4648659016801781E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6409956378989354E+0
+            b = 0.2257852192301602E+0
+            v = 0.4675502017157673E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5581222330827514E+0
+            b = 0.4532173421637160E-1
+            v = 0.4598494476455523E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6074705984161695E+0
+            b = 0.9117488031840314E-1
+            v = 0.4654916955152048E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6532272537379033E+0
+            b = 0.1369294213140155E+0
+            v = 0.4684709779505137E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6594761494500487E+0
+            b = 0.4589901487275583E-1
+            v = 0.4691445539106986E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 2702:
+
+            v = 0.2998675149888161E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.4077860529495355E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2065562538818703E-1
+            v = 0.1185349192520667E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5250918173022379E-1
+            v = 0.1913408643425751E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8993480082038376E-1
+            v = 0.2452886577209897E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1306023924436019E+0
+            v = 0.2862408183288702E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1732060388531418E+0
+            v = 0.3178032258257357E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2168727084820249E+0
+            v = 0.3422945667633690E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2609528309173586E+0
+            v = 0.3612790520235922E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3049252927938952E+0
+            v = 0.3758638229818521E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3483484138084404E+0
+            v = 0.3868711798859953E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3908321549106406E+0
+            v = 0.3949429933189938E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4320210071894814E+0
+            v = 0.4006068107541156E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4715824795890053E+0
+            v = 0.4043192149672723E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5091984794078453E+0
+            v = 0.4064947495808078E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5445580145650803E+0
+            v = 0.4075245619813152E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6072575796841768E+0
+            v = 0.4076423540893566E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6339484505755803E+0
+            v = 0.4074280862251555E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6570718257486958E+0
+            v = 0.4074163756012244E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6762557330090709E+0
+            v = 0.4077647795071246E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6911161696923790E+0
+            v = 0.4084517552782530E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7012841911659961E+0
+            v = 0.4092468459224052E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7064559272410020E+0
+            v = 0.4097872687240906E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6123554989894765E-1
+            v = 0.1738986811745028E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1533070348312393E+0
+            v = 0.2659616045280191E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2563902605244206E+0
+            v = 0.3240596008171533E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3629346991663361E+0
+            v = 0.3621195964432943E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4683949968987538E+0
+            v = 0.3868838330760539E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5694479240657952E+0
+            v = 0.4018911532693111E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6634465430993955E+0
+            v = 0.4089929432983252E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1033958573552305E+0
+            b = 0.3034544009063584E-1
+            v = 0.2279907527706409E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1473521412414395E+0
+            b = 0.6618803044247135E-1
+            v = 0.2715205490578897E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1924552158705967E+0
+            b = 0.1054431128987715E+0
+            v = 0.3057917896703976E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2381094362890328E+0
+            b = 0.1468263551238858E+0
+            v = 0.3326913052452555E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2838121707936760E+0
+            b = 0.1894486108187886E+0
+            v = 0.3537334711890037E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3291323133373415E+0
+            b = 0.2326374238761579E+0
+            v = 0.3700567500783129E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3736896978741460E+0
+            b = 0.2758485808485768E+0
+            v = 0.3825245372589122E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4171406040760013E+0
+            b = 0.3186179331996921E+0
+            v = 0.3918125171518296E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4591677985256915E+0
+            b = 0.3605329796303794E+0
+            v = 0.3984720419937579E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4994733831718418E+0
+            b = 0.4012147253586509E+0
+            v = 0.4029746003338211E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5377731830445096E+0
+            b = 0.4403050025570692E+0
+            v = 0.4057428632156627E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5737917830001331E+0
+            b = 0.4774565904277483E+0
+            v = 0.4071719274114857E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2027323586271389E+0
+            b = 0.3544122504976147E-1
+            v = 0.2990236950664119E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2516942375187273E+0
+            b = 0.7418304388646328E-1
+            v = 0.3262951734212878E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3000227995257181E+0
+            b = 0.1150502745727186E+0
+            v = 0.3482634608242413E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3474806691046342E+0
+            b = 0.1571963371209364E+0
+            v = 0.3656596681700892E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3938103180359209E+0
+            b = 0.1999631877247100E+0
+            v = 0.3791740467794218E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4387519590455703E+0
+            b = 0.2428073457846535E+0
+            v = 0.3894034450156905E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4820503960077787E+0
+            b = 0.2852575132906155E+0
+            v = 0.3968600245508371E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5234573778475101E+0
+            b = 0.3268884208674639E+0
+            v = 0.4019931351420050E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5627318647235282E+0
+            b = 0.3673033321675939E+0
+            v = 0.4052108801278599E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5996390607156954E+0
+            b = 0.4061211551830290E+0
+            v = 0.4068978613940934E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3084780753791947E+0
+            b = 0.3860125523100059E-1
+            v = 0.3454275351319704E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3589988275920223E+0
+            b = 0.7928938987104867E-1
+            v = 0.3629963537007920E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4078628415881973E+0
+            b = 0.1212614643030087E+0
+            v = 0.3770187233889873E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4549287258889735E+0
+            b = 0.1638770827382693E+0
+            v = 0.3878608613694378E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5000278512957279E+0
+            b = 0.2065965798260176E+0
+            v = 0.3959065270221274E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5429785044928199E+0
+            b = 0.2489436378852235E+0
+            v = 0.4015286975463570E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5835939850491711E+0
+            b = 0.2904811368946891E+0
+            v = 0.4050866785614717E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6216870353444856E+0
+            b = 0.3307941957666609E+0
+            v = 0.4069320185051913E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4151104662709091E+0
+            b = 0.4064829146052554E-1
+            v = 0.3760120964062763E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4649804275009218E+0
+            b = 0.8258424547294755E-1
+            v = 0.3870969564418064E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5124695757009662E+0
+            b = 0.1251841962027289E+0
+            v = 0.3955287790534055E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5574711100606224E+0
+            b = 0.1679107505976331E+0
+            v = 0.4015361911302668E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5998597333287227E+0
+            b = 0.2102805057358715E+0
+            v = 0.4053836986719548E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6395007148516600E+0
+            b = 0.2518418087774107E+0
+            v = 0.4073578673299117E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5188456224746252E+0
+            b = 0.4194321676077518E-1
+            v = 0.3954628379231406E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5664190707942778E+0
+            b = 0.8457661551921499E-1
+            v = 0.4017645508847530E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6110464353283153E+0
+            b = 0.1273652932519396E+0
+            v = 0.4059030348651293E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6526430302051563E+0
+            b = 0.1698173239076354E+0
+            v = 0.4080565809484880E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6167551880377548E+0
+            b = 0.4266398851548864E-1
+            v = 0.4063018753664651E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6607195418355383E+0
+            b = 0.8551925814238349E-1
+            v = 0.4087191292799671E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 3074:
+
+            v = 0.2599095953754734E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3603134089687541E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.3586067974412447E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1886108518723392E-1
+            v = 0.9831528474385880E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4800217244625303E-1
+            v = 0.1605023107954450E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8244922058397242E-1
+            v = 0.2072200131464099E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1200408362484023E+0
+            v = 0.2431297618814187E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1595773530809965E+0
+            v = 0.2711819064496707E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2002635973434064E+0
+            v = 0.2932762038321116E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2415127590139982E+0
+            v = 0.3107032514197368E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2828584158458477E+0
+            v = 0.3243808058921213E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3239091015338138E+0
+            v = 0.3349899091374030E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3643225097962194E+0
+            v = 0.3430580688505218E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4037897083691802E+0
+            v = 0.3490124109290343E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4420247515194127E+0
+            v = 0.3532148948561955E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4787572538464938E+0
+            v = 0.3559862669062833E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5137265251275234E+0
+            v = 0.3576224317551411E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5466764056654611E+0
+            v = 0.3584050533086076E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6054859420813535E+0
+            v = 0.3584903581373224E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6308106701764562E+0
+            v = 0.3582991879040586E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6530369230179584E+0
+            v = 0.3582371187963125E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6718609524611158E+0
+            v = 0.3584353631122350E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6869676499894013E+0
+            v = 0.3589120166517785E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6980467077240748E+0
+            v = 0.3595445704531601E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7048241721250522E+0
+            v = 0.3600943557111074E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5591105222058232E-1
+            v = 0.1456447096742039E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1407384078513916E+0
+            v = 0.2252370188283782E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2364035438976309E+0
+            v = 0.2766135443474897E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3360602737818170E+0
+            v = 0.3110729491500851E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4356292630054665E+0
+            v = 0.3342506712303391E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5321569415256174E+0
+            v = 0.3491981834026860E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6232956305040554E+0
+            v = 0.3576003604348932E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9469870086838469E-1
+            b = 0.2778748387309470E-1
+            v = 0.1921921305788564E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1353170300568141E+0
+            b = 0.6076569878628364E-1
+            v = 0.2301458216495632E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1771679481726077E+0
+            b = 0.9703072762711040E-1
+            v = 0.2604248549522893E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2197066664231751E+0
+            b = 0.1354112458524762E+0
+            v = 0.2845275425870697E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2624783557374927E+0
+            b = 0.1750996479744100E+0
+            v = 0.3036870897974840E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3050969521214442E+0
+            b = 0.2154896907449802E+0
+            v = 0.3188414832298066E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3472252637196021E+0
+            b = 0.2560954625740152E+0
+            v = 0.3307046414722089E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3885610219026360E+0
+            b = 0.2965070050624096E+0
+            v = 0.3398330969031360E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4288273776062765E+0
+            b = 0.3363641488734497E+0
+            v = 0.3466757899705373E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4677662471302948E+0
+            b = 0.3753400029836788E+0
+            v = 0.3516095923230054E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5051333589553359E+0
+            b = 0.4131297522144286E+0
+            v = 0.3549645184048486E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5406942145810492E+0
+            b = 0.4494423776081795E+0
+            v = 0.3570415969441392E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5742204122576457E+0
+            b = 0.4839938958841502E+0
+            v = 0.3581251798496118E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1865407027225188E+0
+            b = 0.3259144851070796E-1
+            v = 0.2543491329913348E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2321186453689432E+0
+            b = 0.6835679505297343E-1
+            v = 0.2786711051330776E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2773159142523882E+0
+            b = 0.1062284864451989E+0
+            v = 0.2985552361083679E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3219200192237254E+0
+            b = 0.1454404409323047E+0
+            v = 0.3145867929154039E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3657032593944029E+0
+            b = 0.1854018282582510E+0
+            v = 0.3273290662067609E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4084376778363622E+0
+            b = 0.2256297412014750E+0
+            v = 0.3372705511943501E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4499004945751427E+0
+            b = 0.2657104425000896E+0
+            v = 0.3448274437851510E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4898758141326335E+0
+            b = 0.3052755487631557E+0
+            v = 0.3503592783048583E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5281547442266309E+0
+            b = 0.3439863920645423E+0
+            v = 0.3541854792663162E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5645346989813992E+0
+            b = 0.3815229456121914E+0
+            v = 0.3565995517909428E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5988181252159848E+0
+            b = 0.4175752420966734E+0
+            v = 0.3578802078302898E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2850425424471603E+0
+            b = 0.3562149509862536E-1
+            v = 0.2958644592860982E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3324619433027876E+0
+            b = 0.7330318886871096E-1
+            v = 0.3119548129116835E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3785848333076282E+0
+            b = 0.1123226296008472E+0
+            v = 0.3250745225005984E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4232891028562115E+0
+            b = 0.1521084193337708E+0
+            v = 0.3355153415935208E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4664287050829722E+0
+            b = 0.1921844459223610E+0
+            v = 0.3435847568549328E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5078458493735726E+0
+            b = 0.2321360989678303E+0
+            v = 0.3495786831622488E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5473779816204180E+0
+            b = 0.2715886486360520E+0
+            v = 0.3537767805534621E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5848617133811376E+0
+            b = 0.3101924707571355E+0
+            v = 0.3564459815421428E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6201348281584888E+0
+            b = 0.3476121052890973E+0
+            v = 0.3578464061225468E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3852191185387871E+0
+            b = 0.3763224880035108E-1
+            v = 0.3239748762836212E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4325025061073423E+0
+            b = 0.7659581935637135E-1
+            v = 0.3345491784174287E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4778486229734490E+0
+            b = 0.1163381306083900E+0
+            v = 0.3429126177301782E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5211663693009000E+0
+            b = 0.1563890598752899E+0
+            v = 0.3492420343097421E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5623469504853703E+0
+            b = 0.1963320810149200E+0
+            v = 0.3537399050235257E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6012718188659246E+0
+            b = 0.2357847407258738E+0
+            v = 0.3566209152659172E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6378179206390117E+0
+            b = 0.2743846121244060E+0
+            v = 0.3581084321919782E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4836936460214534E+0
+            b = 0.3895902610739024E-1
+            v = 0.3426522117591512E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5293792562683797E+0
+            b = 0.7871246819312640E-1
+            v = 0.3491848770121379E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5726281253100033E+0
+            b = 0.1187963808202981E+0
+            v = 0.3539318235231476E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6133658776169068E+0
+            b = 0.1587914708061787E+0
+            v = 0.3570231438458694E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6515085491865307E+0
+            b = 0.1983058575227646E+0
+            v = 0.3586207335051714E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5778692716064976E+0
+            b = 0.3977209689791542E-1
+            v = 0.3541196205164025E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6207904288086192E+0
+            b = 0.7990157592981152E-1
+            v = 0.3574296911573953E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6608688171046802E+0
+            b = 0.1199671308754309E+0
+            v = 0.3591993279818963E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6656263089489130E+0
+            b = 0.4015955957805969E-1
+            v = 0.3595855034661997E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 3470:
+
+            v = 0.2040382730826330E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.3178149703889544E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1721420832906233E-1
+            v = 0.8288115128076110E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4408875374981770E-1
+            v = 0.1360883192522954E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7594680813878681E-1
+            v = 0.1766854454542662E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1108335359204799E+0
+            v = 0.2083153161230153E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1476517054388567E+0
+            v = 0.2333279544657158E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1856731870860615E+0
+            v = 0.2532809539930247E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2243634099428821E+0
+            v = 0.2692472184211158E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2633006881662727E+0
+            v = 0.2819949946811885E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3021340904916283E+0
+            v = 0.2920953593973030E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3405594048030089E+0
+            v = 0.2999889782948352E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3783044434007372E+0
+            v = 0.3060292120496902E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4151194767407910E+0
+            v = 0.3105109167522192E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4507705766443257E+0
+            v = 0.3136902387550312E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4850346056573187E+0
+            v = 0.3157984652454632E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5176950817792470E+0
+            v = 0.3170516518425422E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5485384240820989E+0
+            v = 0.3176568425633755E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6039117238943308E+0
+            v = 0.3177198411207062E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6279956655573113E+0
+            v = 0.3175519492394733E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6493636169568952E+0
+            v = 0.3174654952634756E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6677644117704504E+0
+            v = 0.3175676415467654E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6829368572115624E+0
+            v = 0.3178923417835410E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6946195818184121E+0
+            v = 0.3183788287531909E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7025711542057026E+0
+            v = 0.3188755151918807E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7066004767140119E+0
+            v = 0.3191916889313849E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5132537689946062E-1
+            v = 0.1231779611744508E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1297994661331225E+0
+            v = 0.1924661373839880E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2188852049401307E+0
+            v = 0.2380881867403424E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3123174824903457E+0
+            v = 0.2693100663037885E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4064037620738195E+0
+            v = 0.2908673382834366E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4984958396944782E+0
+            v = 0.3053914619381535E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5864975046021365E+0
+            v = 0.3143916684147777E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6686711634580175E+0
+            v = 0.3187042244055363E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.8715738780835950E-1
+            b = 0.2557175233367578E-1
+            v = 0.1635219535869790E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1248383123134007E+0
+            b = 0.5604823383376681E-1
+            v = 0.1968109917696070E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1638062693383378E+0
+            b = 0.8968568601900765E-1
+            v = 0.2236754342249974E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2035586203373176E+0
+            b = 0.1254086651976279E+0
+            v = 0.2453186687017181E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2436798975293774E+0
+            b = 0.1624780150162012E+0
+            v = 0.2627551791580541E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2838207507773806E+0
+            b = 0.2003422342683208E+0
+            v = 0.2767654860152220E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3236787502217692E+0
+            b = 0.2385628026255263E+0
+            v = 0.2879467027765895E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3629849554840691E+0
+            b = 0.2767731148783578E+0
+            v = 0.2967639918918702E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4014948081992087E+0
+            b = 0.3146542308245309E+0
+            v = 0.3035900684660351E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4389818379260225E+0
+            b = 0.3519196415895088E+0
+            v = 0.3087338237298308E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4752331143674377E+0
+            b = 0.3883050984023654E+0
+            v = 0.3124608838860167E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5100457318374018E+0
+            b = 0.4235613423908649E+0
+            v = 0.3150084294226743E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5432238388954868E+0
+            b = 0.4574484717196220E+0
+            v = 0.3165958398598402E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5745758685072442E+0
+            b = 0.4897311639255524E+0
+            v = 0.3174320440957372E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1723981437592809E+0
+            b = 0.3010630597881105E-1
+            v = 0.2182188909812599E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2149553257844597E+0
+            b = 0.6326031554204694E-1
+            v = 0.2399727933921445E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2573256081247422E+0
+            b = 0.9848566980258631E-1
+            v = 0.2579796133514652E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2993163751238106E+0
+            b = 0.1350835952384266E+0
+            v = 0.2727114052623535E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3407238005148000E+0
+            b = 0.1725184055442181E+0
+            v = 0.2846327656281355E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3813454978483264E+0
+            b = 0.2103559279730725E+0
+            v = 0.2941491102051334E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4209848104423343E+0
+            b = 0.2482278774554860E+0
+            v = 0.3016049492136107E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4594519699996300E+0
+            b = 0.2858099509982883E+0
+            v = 0.3072949726175648E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4965640166185930E+0
+            b = 0.3228075659915428E+0
+            v = 0.3114768142886460E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5321441655571562E+0
+            b = 0.3589459907204151E+0
+            v = 0.3143823673666223E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5660208438582166E+0
+            b = 0.3939630088864310E+0
+            v = 0.3162269764661535E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5980264315964364E+0
+            b = 0.4276029922949089E+0
+            v = 0.3172164663759821E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2644215852350733E+0
+            b = 0.3300939429072552E-1
+            v = 0.2554575398967435E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3090113743443063E+0
+            b = 0.6803887650078501E-1
+            v = 0.2701704069135677E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3525871079197808E+0
+            b = 0.1044326136206709E+0
+            v = 0.2823693413468940E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3950418005354029E+0
+            b = 0.1416751597517679E+0
+            v = 0.2922898463214289E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4362475663430163E+0
+            b = 0.1793408610504821E+0
+            v = 0.3001829062162428E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4760661812145854E+0
+            b = 0.2170630750175722E+0
+            v = 0.3062890864542953E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5143551042512103E+0
+            b = 0.2545145157815807E+0
+            v = 0.3108328279264746E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5509709026935597E+0
+            b = 0.2913940101706601E+0
+            v = 0.3140243146201245E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5857711030329428E+0
+            b = 0.3274169910910705E+0
+            v = 0.3160638030977130E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6186149917404392E+0
+            b = 0.3623081329317265E+0
+            v = 0.3171462882206275E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3586894569557064E+0
+            b = 0.3497354386450040E-1
+            v = 0.2812388416031796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4035266610019441E+0
+            b = 0.7129736739757095E-1
+            v = 0.2912137500288045E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4467775312332510E+0
+            b = 0.1084758620193165E+0
+            v = 0.2993241256502206E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4883638346608543E+0
+            b = 0.1460915689241772E+0
+            v = 0.3057101738983822E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5281908348434601E+0
+            b = 0.1837790832369980E+0
+            v = 0.3105319326251432E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5661542687149311E+0
+            b = 0.2212075390874021E+0
+            v = 0.3139565514428167E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6021450102031452E+0
+            b = 0.2580682841160985E+0
+            v = 0.3161543006806366E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6360520783610050E+0
+            b = 0.2940656362094121E+0
+            v = 0.3172985960613294E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4521611065087196E+0
+            b = 0.3631055365867002E-1
+            v = 0.2989400336901431E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4959365651560963E+0
+            b = 0.7348318468484350E-1
+            v = 0.3054555883947677E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5376815804038283E+0
+            b = 0.1111087643812648E+0
+            v = 0.3104764960807702E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5773314480243768E+0
+            b = 0.1488226085145408E+0
+            v = 0.3141015825977616E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6148113245575056E+0
+            b = 0.1862892274135151E+0
+            v = 0.3164520621159896E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6500407462842380E+0
+            b = 0.2231909701714456E+0
+            v = 0.3176652305912204E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5425151448707213E+0
+            b = 0.3718201306118944E-1
+            v = 0.3105097161023939E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5841860556907931E+0
+            b = 0.7483616335067346E-1
+            v = 0.3143014117890550E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6234632186851500E+0
+            b = 0.1125990834266120E+0
+            v = 0.3168172866287200E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6602934551848843E+0
+            b = 0.1501303813157619E+0
+            v = 0.3181401865570968E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6278573968375105E+0
+            b = 0.3767559930245720E-1
+            v = 0.3170663659156037E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6665611711264577E+0
+            b = 0.7548443301360158E-1
+            v = 0.3185447944625510E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 3890:
+
+            v = 0.1807395252196920E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2848008782238827E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.2836065837530581E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1587876419858352E-1
+            v = 0.7013149266673816E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4069193593751206E-1
+            v = 0.1162798021956766E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7025888115257997E-1
+            v = 0.1518728583972105E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1027495450028704E+0
+            v = 0.1798796108216934E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1371457730893426E+0
+            v = 0.2022593385972785E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1727758532671953E+0
+            v = 0.2203093105575464E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2091492038929037E+0
+            v = 0.2349294234299855E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2458813281751915E+0
+            v = 0.2467682058747003E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2826545859450066E+0
+            v = 0.2563092683572224E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3191957291799622E+0
+            v = 0.2639253896763318E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3552621469299578E+0
+            v = 0.2699137479265108E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3906329503406230E+0
+            v = 0.2745196420166739E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4251028614093031E+0
+            v = 0.2779529197397593E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4584777520111870E+0
+            v = 0.2803996086684265E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4905711358710193E+0
+            v = 0.2820302356715842E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5212011669847385E+0
+            v = 0.2830056747491068E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5501878488737995E+0
+            v = 0.2834808950776839E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6025037877479342E+0
+            v = 0.2835282339078929E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6254572689549016E+0
+            v = 0.2833819267065800E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6460107179528248E+0
+            v = 0.2832858336906784E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6639541138154251E+0
+            v = 0.2833268235451244E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6790688515667495E+0
+            v = 0.2835432677029253E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6911338580371512E+0
+            v = 0.2839091722743049E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6999385956126490E+0
+            v = 0.2843308178875841E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7053037748656896E+0
+            v = 0.2846703550533846E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4732224387180115E-1
+            v = 0.1051193406971900E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1202100529326803E+0
+            v = 0.1657871838796974E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2034304820664855E+0
+            v = 0.2064648113714232E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2912285643573002E+0
+            v = 0.2347942745819741E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3802361792726768E+0
+            v = 0.2547775326597726E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4680598511056146E+0
+            v = 0.2686876684847025E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5528151052155599E+0
+            v = 0.2778665755515867E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6329386307803041E+0
+            v = 0.2830996616782929E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.8056516651369069E-1
+            b = 0.2363454684003124E-1
+            v = 0.1403063340168372E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1156476077139389E+0
+            b = 0.5191291632545936E-1
+            v = 0.1696504125939477E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1520473382760421E+0
+            b = 0.8322715736994519E-1
+            v = 0.1935787242745390E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1892986699745931E+0
+            b = 0.1165855667993712E+0
+            v = 0.2130614510521968E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2270194446777792E+0
+            b = 0.1513077167409504E+0
+            v = 0.2289381265931048E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2648908185093273E+0
+            b = 0.1868882025807859E+0
+            v = 0.2418630292816186E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3026389259574136E+0
+            b = 0.2229277629776224E+0
+            v = 0.2523400495631193E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3400220296151384E+0
+            b = 0.2590951840746235E+0
+            v = 0.2607623973449605E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3768217953335510E+0
+            b = 0.2951047291750847E+0
+            v = 0.2674441032689209E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4128372900921884E+0
+            b = 0.3307019714169930E+0
+            v = 0.2726432360343356E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4478807131815630E+0
+            b = 0.3656544101087634E+0
+            v = 0.2765787685924545E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4817742034089257E+0
+            b = 0.3997448951939695E+0
+            v = 0.2794428690642224E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5143472814653344E+0
+            b = 0.4327667110812024E+0
+            v = 0.2814099002062895E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5454346213905650E+0
+            b = 0.4645196123532293E+0
+            v = 0.2826429531578994E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5748739313170252E+0
+            b = 0.4948063555703345E+0
+            v = 0.2832983542550884E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1599598738286342E+0
+            b = 0.2792357590048985E-1
+            v = 0.1886695565284976E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1998097412500951E+0
+            b = 0.5877141038139065E-1
+            v = 0.2081867882748234E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2396228952566202E+0
+            b = 0.9164573914691377E-1
+            v = 0.2245148680600796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2792228341097746E+0
+            b = 0.1259049641962687E+0
+            v = 0.2380370491511872E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3184251107546741E+0
+            b = 0.1610594823400863E+0
+            v = 0.2491398041852455E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3570481164426244E+0
+            b = 0.1967151653460898E+0
+            v = 0.2581632405881230E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3949164710492144E+0
+            b = 0.2325404606175168E+0
+            v = 0.2653965506227417E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4318617293970503E+0
+            b = 0.2682461141151439E+0
+            v = 0.2710857216747087E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4677221009931678E+0
+            b = 0.3035720116011973E+0
+            v = 0.2754434093903659E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5023417939270955E+0
+            b = 0.3382781859197439E+0
+            v = 0.2786579932519380E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5355701836636128E+0
+            b = 0.3721383065625942E+0
+            v = 0.2809011080679474E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5672608451328771E+0
+            b = 0.4049346360466055E+0
+            v = 0.2823336184560987E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5972704202540162E+0
+            b = 0.4364538098633802E+0
+            v = 0.2831101175806309E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2461687022333596E+0
+            b = 0.3070423166833368E-1
+            v = 0.2221679970354546E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2881774566286831E+0
+            b = 0.6338034669281885E-1
+            v = 0.2356185734270703E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3293963604116978E+0
+            b = 0.9742862487067941E-1
+            v = 0.2469228344805590E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3697303822241377E+0
+            b = 0.1323799532282290E+0
+            v = 0.2562726348642046E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4090663023135127E+0
+            b = 0.1678497018129336E+0
+            v = 0.2638756726753028E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4472819355411712E+0
+            b = 0.2035095105326114E+0
+            v = 0.2699311157390862E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4842513377231437E+0
+            b = 0.2390692566672091E+0
+            v = 0.2746233268403837E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5198477629962928E+0
+            b = 0.2742649818076149E+0
+            v = 0.2781225674454771E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5539453011883145E+0
+            b = 0.3088503806580094E+0
+            v = 0.2805881254045684E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5864196762401251E+0
+            b = 0.3425904245906614E+0
+            v = 0.2821719877004913E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6171484466668390E+0
+            b = 0.3752562294789468E+0
+            v = 0.2830222502333124E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3350337830565727E+0
+            b = 0.3261589934634747E-1
+            v = 0.2457995956744870E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3775773224758284E+0
+            b = 0.6658438928081572E-1
+            v = 0.2551474407503706E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4188155229848973E+0
+            b = 0.1014565797157954E+0
+            v = 0.2629065335195311E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4586805892009344E+0
+            b = 0.1368573320843822E+0
+            v = 0.2691900449925075E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4970895714224235E+0
+            b = 0.1724614851951608E+0
+            v = 0.2741275485754276E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5339505133960747E+0
+            b = 0.2079779381416412E+0
+            v = 0.2778530970122595E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5691665792531440E+0
+            b = 0.2431385788322288E+0
+            v = 0.2805010567646741E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6026387682680377E+0
+            b = 0.2776901883049853E+0
+            v = 0.2822055834031040E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6342676150163307E+0
+            b = 0.3113881356386632E+0
+            v = 0.2831016901243473E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4237951119537067E+0
+            b = 0.3394877848664351E-1
+            v = 0.2624474901131803E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4656918683234929E+0
+            b = 0.6880219556291447E-1
+            v = 0.2688034163039377E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5058857069185980E+0
+            b = 0.1041946859721635E+0
+            v = 0.2738932751287636E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5443204666713996E+0
+            b = 0.1398039738736393E+0
+            v = 0.2777944791242523E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5809298813759742E+0
+            b = 0.1753373381196155E+0
+            v = 0.2806011661660987E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6156416039447128E+0
+            b = 0.2105215793514010E+0
+            v = 0.2824181456597460E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6483801351066604E+0
+            b = 0.2450953312157051E+0
+            v = 0.2833585216577828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5103616577251688E+0
+            b = 0.3485560643800719E-1
+            v = 0.2738165236962878E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5506738792580681E+0
+            b = 0.7026308631512033E-1
+            v = 0.2778365208203180E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5889573040995292E+0
+            b = 0.1059035061296403E+0
+            v = 0.2807852940418966E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6251641589516930E+0
+            b = 0.1414823925236026E+0
+            v = 0.2827245949674705E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6592414921570178E+0
+            b = 0.1767207908214530E+0
+            v = 0.2837342344829828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5930314017533384E+0
+            b = 0.3542189339561672E-1
+            v = 0.2809233907610981E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6309812253390175E+0
+            b = 0.7109574040369549E-1
+            v = 0.2829930809742694E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6666296011353230E+0
+            b = 0.1067259792282730E+0
+            v = 0.2841097874111479E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6703715271049922E+0
+            b = 0.3569455268820809E-1
+            v = 0.2843455206008783E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 4334:
+
+            v = 0.1449063022537883E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2546377329828424E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1462896151831013E-1
+            v = 0.6018432961087496E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3769840812493139E-1
+            v = 0.1002286583263673E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6524701904096891E-1
+            v = 0.1315222931028093E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9560543416134648E-1
+            v = 0.1564213746876724E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1278335898929198E+0
+            v = 0.1765118841507736E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1613096104466031E+0
+            v = 0.1928737099311080E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1955806225745371E+0
+            v = 0.2062658534263270E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2302935218498028E+0
+            v = 0.2172395445953787E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2651584344113027E+0
+            v = 0.2262076188876047E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2999276825183209E+0
+            v = 0.2334885699462397E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3343828669718798E+0
+            v = 0.2393355273179203E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3683265013750518E+0
+            v = 0.2439559200468863E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4015763206518108E+0
+            v = 0.2475251866060002E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4339612026399770E+0
+            v = 0.2501965558158773E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4653180651114582E+0
+            v = 0.2521081407925925E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4954893331080803E+0
+            v = 0.2533881002388081E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5243207068924930E+0
+            v = 0.2541582900848261E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5516590479041704E+0
+            v = 0.2545365737525860E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6012371927804176E+0
+            v = 0.2545726993066799E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6231574466449819E+0
+            v = 0.2544456197465555E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6429416514181271E+0
+            v = 0.2543481596881064E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6604124272943595E+0
+            v = 0.2543506451429194E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6753851470408250E+0
+            v = 0.2544905675493763E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6876717970626160E+0
+            v = 0.2547611407344429E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6970895061319234E+0
+            v = 0.2551060375448869E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7034746912553310E+0
+            v = 0.2554291933816039E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7067017217542295E+0
+            v = 0.2556255710686343E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4382223501131123E-1
+            v = 0.9041339695118195E-4
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1117474077400006E+0
+            v = 0.1438426330079022E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1897153252911440E+0
+            v = 0.1802523089820518E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2724023009910331E+0
+            v = 0.2060052290565496E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3567163308709902E+0
+            v = 0.2245002248967466E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4404784483028087E+0
+            v = 0.2377059847731150E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5219833154161411E+0
+            v = 0.2468118955882525E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5998179868977553E+0
+            v = 0.2525410872966528E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6727803154548222E+0
+            v = 0.2553101409933397E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.7476563943166086E-1
+            b = 0.2193168509461185E-1
+            v = 0.1212879733668632E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1075341482001416E+0
+            b = 0.4826419281533887E-1
+            v = 0.1472872881270931E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1416344885203259E+0
+            b = 0.7751191883575742E-1
+            v = 0.1686846601010828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1766325315388586E+0
+            b = 0.1087558139247680E+0
+            v = 0.1862698414660208E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2121744174481514E+0
+            b = 0.1413661374253096E+0
+            v = 0.2007430956991861E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2479669443408145E+0
+            b = 0.1748768214258880E+0
+            v = 0.2126568125394796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2837600452294113E+0
+            b = 0.2089216406612073E+0
+            v = 0.2224394603372113E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3193344933193984E+0
+            b = 0.2431987685545972E+0
+            v = 0.2304264522673135E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3544935442438745E+0
+            b = 0.2774497054377770E+0
+            v = 0.2368854288424087E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3890571932288154E+0
+            b = 0.3114460356156915E+0
+            v = 0.2420352089461772E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4228581214259090E+0
+            b = 0.3449806851913012E+0
+            v = 0.2460597113081295E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4557387211304052E+0
+            b = 0.3778618641248256E+0
+            v = 0.2491181912257687E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4875487950541643E+0
+            b = 0.4099086391698978E+0
+            v = 0.2513528194205857E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5181436529962997E+0
+            b = 0.4409474925853973E+0
+            v = 0.2528943096693220E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5473824095600661E+0
+            b = 0.4708094517711291E+0
+            v = 0.2538660368488136E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5751263398976174E+0
+            b = 0.4993275140354637E+0
+            v = 0.2543868648299022E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1489515746840028E+0
+            b = 0.2599381993267017E-1
+            v = 0.1642595537825183E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1863656444351767E+0
+            b = 0.5479286532462190E-1
+            v = 0.1818246659849308E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2238602880356348E+0
+            b = 0.8556763251425254E-1
+            v = 0.1966565649492420E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2612723375728160E+0
+            b = 0.1177257802267011E+0
+            v = 0.2090677905657991E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2984332990206190E+0
+            b = 0.1508168456192700E+0
+            v = 0.2193820409510504E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3351786584663333E+0
+            b = 0.1844801892177727E+0
+            v = 0.2278870827661928E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3713505522209120E+0
+            b = 0.2184145236087598E+0
+            v = 0.2348283192282090E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4067981098954663E+0
+            b = 0.2523590641486229E+0
+            v = 0.2404139755581477E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4413769993687534E+0
+            b = 0.2860812976901373E+0
+            v = 0.2448227407760734E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4749487182516394E+0
+            b = 0.3193686757808996E+0
+            v = 0.2482110455592573E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5073798105075426E+0
+            b = 0.3520226949547602E+0
+            v = 0.2507192397774103E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5385410448878654E+0
+            b = 0.3838544395667890E+0
+            v = 0.2524765968534880E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5683065353670530E+0
+            b = 0.4146810037640963E+0
+            v = 0.2536052388539425E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5965527620663510E+0
+            b = 0.4443224094681121E+0
+            v = 0.2542230588033068E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2299227700856157E+0
+            b = 0.2865757664057584E-1
+            v = 0.1944817013047896E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2695752998553267E+0
+            b = 0.5923421684485993E-1
+            v = 0.2067862362746635E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3086178716611389E+0
+            b = 0.9117817776057715E-1
+            v = 0.2172440734649114E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3469649871659077E+0
+            b = 0.1240593814082605E+0
+            v = 0.2260125991723423E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3845153566319655E+0
+            b = 0.1575272058259175E+0
+            v = 0.2332655008689523E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4211600033403215E+0
+            b = 0.1912845163525413E+0
+            v = 0.2391699681532458E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4567867834329882E+0
+            b = 0.2250710177858171E+0
+            v = 0.2438801528273928E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4912829319232061E+0
+            b = 0.2586521303440910E+0
+            v = 0.2475370504260665E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5245364793303812E+0
+            b = 0.2918112242865407E+0
+            v = 0.2502707235640574E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5564369788915756E+0
+            b = 0.3243439239067890E+0
+            v = 0.2522031701054241E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5868757697775287E+0
+            b = 0.3560536787835351E+0
+            v = 0.2534511269978784E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6157458853519617E+0
+            b = 0.3867480821242581E+0
+            v = 0.2541284914955151E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3138461110672113E+0
+            b = 0.3051374637507278E-1
+            v = 0.2161509250688394E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3542495872050569E+0
+            b = 0.6237111233730755E-1
+            v = 0.2248778513437852E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3935751553120181E+0
+            b = 0.9516223952401907E-1
+            v = 0.2322388803404617E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4317634668111147E+0
+            b = 0.1285467341508517E+0
+            v = 0.2383265471001355E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4687413842250821E+0
+            b = 0.1622318931656033E+0
+            v = 0.2432476675019525E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5044274237060283E+0
+            b = 0.1959581153836453E+0
+            v = 0.2471122223750674E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5387354077925727E+0
+            b = 0.2294888081183837E+0
+            v = 0.2500291752486870E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5715768898356105E+0
+            b = 0.2626031152713945E+0
+            v = 0.2521055942764682E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6028627200136111E+0
+            b = 0.2950904075286713E+0
+            v = 0.2534472785575503E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6325039812653463E+0
+            b = 0.3267458451113286E+0
+            v = 0.2541599713080121E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3981986708423407E+0
+            b = 0.3183291458749821E-1
+            v = 0.2317380975862936E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4382791182133300E+0
+            b = 0.6459548193880908E-1
+            v = 0.2378550733719775E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4769233057218166E+0
+            b = 0.9795757037087952E-1
+            v = 0.2428884456739118E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5140823911194238E+0
+            b = 0.1316307235126655E+0
+            v = 0.2469002655757292E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5496977833862983E+0
+            b = 0.1653556486358704E+0
+            v = 0.2499657574265851E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5837047306512727E+0
+            b = 0.1988931724126510E+0
+            v = 0.2521676168486082E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6160349566926879E+0
+            b = 0.2320174581438950E+0
+            v = 0.2535935662645334E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6466185353209440E+0
+            b = 0.2645106562168662E+0
+            v = 0.2543356743363214E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4810835158795404E+0
+            b = 0.3275917807743992E-1
+            v = 0.2427353285201535E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5199925041324341E+0
+            b = 0.6612546183967181E-1
+            v = 0.2468258039744386E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5571717692207494E+0
+            b = 0.9981498331474143E-1
+            v = 0.2500060956440310E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5925789250836378E+0
+            b = 0.1335687001410374E+0
+            v = 0.2523238365420979E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6261658523859670E+0
+            b = 0.1671444402896463E+0
+            v = 0.2538399260252846E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6578811126669331E+0
+            b = 0.2003106382156076E+0
+            v = 0.2546255927268069E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5609624612998100E+0
+            b = 0.3337500940231335E-1
+            v = 0.2500583360048449E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5979959659984670E+0
+            b = 0.6708750335901803E-1
+            v = 0.2524777638260203E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6330523711054002E+0
+            b = 0.1008792126424850E+0
+            v = 0.2540951193860656E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6660960998103972E+0
+            b = 0.1345050343171794E+0
+            v = 0.2549524085027472E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6365384364585819E+0
+            b = 0.3372799460737052E-1
+            v = 0.2542569507009158E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6710994302899275E+0
+            b = 0.6755249309678028E-1
+            v = 0.2552114127580376E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 4802:
+
+            v = 0.9687521879420705E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2307897895367918E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.2297310852498558E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2335728608887064E-1
+            v = 0.7386265944001919E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4352987836550653E-1
+            v = 0.8257977698542210E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6439200521088801E-1
+            v = 0.9706044762057630E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.9003943631993181E-1
+            v = 0.1302393847117003E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1196706615548473E+0
+            v = 0.1541957004600968E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1511715412838134E+0
+            v = 0.1704459770092199E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1835982828503801E+0
+            v = 0.1827374890942906E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2165081259155405E+0
+            v = 0.1926360817436107E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2496208720417563E+0
+            v = 0.2008010239494833E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2827200673567900E+0
+            v = 0.2075635983209175E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3156190823994346E+0
+            v = 0.2131306638690909E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3481476793749115E+0
+            v = 0.2176562329937335E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3801466086947226E+0
+            v = 0.2212682262991018E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4114652119634011E+0
+            v = 0.2240799515668565E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4419598786519751E+0
+            v = 0.2261959816187525E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4714925949329543E+0
+            v = 0.2277156368808855E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4999293972879466E+0
+            v = 0.2287351772128336E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5271387221431248E+0
+            v = 0.2293490814084085E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5529896780837761E+0
+            v = 0.2296505312376273E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6000856099481712E+0
+            v = 0.2296793832318756E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6210562192785175E+0
+            v = 0.2295785443842974E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6401165879934240E+0
+            v = 0.2295017931529102E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6571144029244334E+0
+            v = 0.2295059638184868E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6718910821718863E+0
+            v = 0.2296232343237362E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6842845591099010E+0
+            v = 0.2298530178740771E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6941353476269816E+0
+            v = 0.2301579790280501E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7012965242212991E+0
+            v = 0.2304690404996513E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7056471428242644E+0
+            v = 0.2307027995907102E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4595557643585895E-1
+            v = 0.9312274696671092E-4
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1049316742435023E+0
+            v = 0.1199919385876926E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1773548879549274E+0
+            v = 0.1598039138877690E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2559071411236127E+0
+            v = 0.1822253763574900E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3358156837985898E+0
+            v = 0.1988579593655040E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4155835743763893E+0
+            v = 0.2112620102533307E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4937894296167472E+0
+            v = 0.2201594887699007E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5691569694793316E+0
+            v = 0.2261622590895036E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6405840854894251E+0
+            v = 0.2296458453435705E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.7345133894143348E-1
+            b = 0.2177844081486067E-1
+            v = 0.1006006990267000E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1009859834044931E+0
+            b = 0.4590362185775188E-1
+            v = 0.1227676689635876E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1324289619748758E+0
+            b = 0.7255063095690877E-1
+            v = 0.1467864280270117E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1654272109607127E+0
+            b = 0.1017825451960684E+0
+            v = 0.1644178912101232E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1990767186776461E+0
+            b = 0.1325652320980364E+0
+            v = 0.1777664890718961E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2330125945523278E+0
+            b = 0.1642765374496765E+0
+            v = 0.1884825664516690E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2670080611108287E+0
+            b = 0.1965360374337889E+0
+            v = 0.1973269246453848E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3008753376294316E+0
+            b = 0.2290726770542238E+0
+            v = 0.2046767775855328E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3344475596167860E+0
+            b = 0.2616645495370823E+0
+            v = 0.2107600125918040E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3675709724070786E+0
+            b = 0.2941150728843141E+0
+            v = 0.2157416362266829E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4001000887587812E+0
+            b = 0.3262440400919066E+0
+            v = 0.2197557816920721E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4318956350436028E+0
+            b = 0.3578835350611916E+0
+            v = 0.2229192611835437E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4628239056795531E+0
+            b = 0.3888751854043678E+0
+            v = 0.2253385110212775E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4927563229773636E+0
+            b = 0.4190678003222840E+0
+            v = 0.2271137107548774E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5215687136707969E+0
+            b = 0.4483151836883852E+0
+            v = 0.2283414092917525E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5491402346984905E+0
+            b = 0.4764740676087880E+0
+            v = 0.2291161673130077E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5753520160126075E+0
+            b = 0.5034021310998277E+0
+            v = 0.2295313908576598E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1388326356417754E+0
+            b = 0.2435436510372806E-1
+            v = 0.1438204721359031E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1743686900537244E+0
+            b = 0.5118897057342652E-1
+            v = 0.1607738025495257E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2099737037950268E+0
+            b = 0.8014695048539634E-1
+            v = 0.1741483853528379E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2454492590908548E+0
+            b = 0.1105117874155699E+0
+            v = 0.1851918467519151E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2807219257864278E+0
+            b = 0.1417950531570966E+0
+            v = 0.1944628638070613E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3156842271975842E+0
+            b = 0.1736604945719597E+0
+            v = 0.2022495446275152E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3502090945177752E+0
+            b = 0.2058466324693981E+0
+            v = 0.2087462382438514E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3841684849519686E+0
+            b = 0.2381284261195919E+0
+            v = 0.2141074754818308E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4174372367906016E+0
+            b = 0.2703031270422569E+0
+            v = 0.2184640913748162E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4498926465011892E+0
+            b = 0.3021845683091309E+0
+            v = 0.2219309165220329E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4814146229807701E+0
+            b = 0.3335993355165720E+0
+            v = 0.2246123118340624E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5118863625734701E+0
+            b = 0.3643833735518232E+0
+            v = 0.2266062766915125E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5411947455119144E+0
+            b = 0.3943789541958179E+0
+            v = 0.2280072952230796E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5692301500357246E+0
+            b = 0.4234320144403542E+0
+            v = 0.2289082025202583E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5958857204139576E+0
+            b = 0.4513897947419260E+0
+            v = 0.2294012695120025E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2156270284785766E+0
+            b = 0.2681225755444491E-1
+            v = 0.1722434488736947E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2532385054909710E+0
+            b = 0.5557495747805614E-1
+            v = 0.1830237421455091E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2902564617771537E+0
+            b = 0.8569368062950249E-1
+            v = 0.1923855349997633E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3266979823143256E+0
+            b = 0.1167367450324135E+0
+            v = 0.2004067861936271E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3625039627493614E+0
+            b = 0.1483861994003304E+0
+            v = 0.2071817297354263E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3975838937548699E+0
+            b = 0.1803821503011405E+0
+            v = 0.2128250834102103E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4318396099009774E+0
+            b = 0.2124962965666424E+0
+            v = 0.2174513719440102E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4651706555732742E+0
+            b = 0.2445221837805913E+0
+            v = 0.2211661839150214E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4974752649620969E+0
+            b = 0.2762701224322987E+0
+            v = 0.2240665257813102E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5286517579627517E+0
+            b = 0.3075627775211328E+0
+            v = 0.2262439516632620E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5586001195731895E+0
+            b = 0.3382311089826877E+0
+            v = 0.2277874557231869E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5872229902021319E+0
+            b = 0.3681108834741399E+0
+            v = 0.2287854314454994E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6144258616235123E+0
+            b = 0.3970397446872839E+0
+            v = 0.2293268499615575E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2951676508064861E+0
+            b = 0.2867499538750441E-1
+            v = 0.1912628201529828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3335085485472725E+0
+            b = 0.5867879341903510E-1
+            v = 0.1992499672238701E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3709561760636381E+0
+            b = 0.8961099205022284E-1
+            v = 0.2061275533454027E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4074722861667498E+0
+            b = 0.1211627927626297E+0
+            v = 0.2119318215968572E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4429923648839117E+0
+            b = 0.1530748903554898E+0
+            v = 0.2167416581882652E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4774428052721736E+0
+            b = 0.1851176436721877E+0
+            v = 0.2206430730516600E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5107446539535904E+0
+            b = 0.2170829107658179E+0
+            v = 0.2237186938699523E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5428151370542935E+0
+            b = 0.2487786689026271E+0
+            v = 0.2260480075032884E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5735699292556964E+0
+            b = 0.2800239952795016E+0
+            v = 0.2277098884558542E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6029253794562866E+0
+            b = 0.3106445702878119E+0
+            v = 0.2287845715109671E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6307998987073145E+0
+            b = 0.3404689500841194E+0
+            v = 0.2293547268236294E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3752652273692719E+0
+            b = 0.2997145098184479E-1
+            v = 0.2056073839852528E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4135383879344028E+0
+            b = 0.6086725898678011E-1
+            v = 0.2114235865831876E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4506113885153907E+0
+            b = 0.9238849548435643E-1
+            v = 0.2163175629770551E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4864401554606072E+0
+            b = 0.1242786603851851E+0
+            v = 0.2203392158111650E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5209708076611709E+0
+            b = 0.1563086731483386E+0
+            v = 0.2235473176847839E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5541422135830122E+0
+            b = 0.1882696509388506E+0
+            v = 0.2260024141501235E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5858880915113817E+0
+            b = 0.2199672979126059E+0
+            v = 0.2277675929329182E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6161399390603444E+0
+            b = 0.2512165482924867E+0
+            v = 0.2289102112284834E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6448296482255090E+0
+            b = 0.2818368701871888E+0
+            v = 0.2295027954625118E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4544796274917948E+0
+            b = 0.3088970405060312E-1
+            v = 0.2161281589879992E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4919389072146628E+0
+            b = 0.6240947677636835E-1
+            v = 0.2201980477395102E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5279313026985183E+0
+            b = 0.9430706144280313E-1
+            v = 0.2234952066593166E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5624169925571135E+0
+            b = 0.1263547818770374E+0
+            v = 0.2260540098520838E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5953484627093287E+0
+            b = 0.1583430788822594E+0
+            v = 0.2279157981899988E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6266730715339185E+0
+            b = 0.1900748462555988E+0
+            v = 0.2291296918565571E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6563363204278871E+0
+            b = 0.2213599519592567E+0
+            v = 0.2297533752536649E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5314574716585696E+0
+            b = 0.3152508811515374E-1
+            v = 0.2234927356465995E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5674614932298185E+0
+            b = 0.6343865291465561E-1
+            v = 0.2261288012985219E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6017706004970264E+0
+            b = 0.9551503504223951E-1
+            v = 0.2280818160923688E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6343471270264178E+0
+            b = 0.1275440099801196E+0
+            v = 0.2293773295180159E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6651494599127802E+0
+            b = 0.1593252037671960E+0
+            v = 0.2300528767338634E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6050184986005704E+0
+            b = 0.3192538338496105E-1
+            v = 0.2281893855065666E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6390163550880400E+0
+            b = 0.6402824353962306E-1
+            v = 0.2295720444840727E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6711199107088448E+0
+            b = 0.9609805077002909E-1
+            v = 0.2303227649026753E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6741354429572275E+0
+            b = 0.3211853196273233E-1
+            v = 0.2304831913227114E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 5294:
+
+            v = 0.9080510764308163E-4
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.2084824361987793E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.2303261686261450E-1
+            v = 0.5011105657239616E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3757208620162394E-1
+            v = 0.5942520409683854E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5821912033821852E-1
+            v = 0.9564394826109721E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.8403127529194872E-1
+            v = 0.1185530657126338E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1122927798060578E+0
+            v = 0.1364510114230331E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1420125319192987E+0
+            v = 0.1505828825605415E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1726396437341978E+0
+            v = 0.1619298749867023E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2038170058115696E+0
+            v = 0.1712450504267789E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2352849892876508E+0
+            v = 0.1789891098164999E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2668363354312461E+0
+            v = 0.1854474955629795E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2982941279900452E+0
+            v = 0.1908148636673661E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3295002922087076E+0
+            v = 0.1952377405281833E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3603094918363593E+0
+            v = 0.1988349254282232E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3905857895173920E+0
+            v = 0.2017079807160050E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4202005758160837E+0
+            v = 0.2039473082709094E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4490310061597227E+0
+            v = 0.2056360279288953E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4769586160311491E+0
+            v = 0.2068525823066865E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5038679887049750E+0
+            v = 0.2076724877534488E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5296454286519961E+0
+            v = 0.2081694278237885E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5541776207164850E+0
+            v = 0.2084157631219326E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5990467321921213E+0
+            v = 0.2084381531128593E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6191467096294587E+0
+            v = 0.2083476277129307E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6375251212901849E+0
+            v = 0.2082686194459732E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6540514381131168E+0
+            v = 0.2082475686112415E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6685899064391510E+0
+            v = 0.2083139860289915E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6810013009681648E+0
+            v = 0.2084745561831237E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6911469578730340E+0
+            v = 0.2087091313375890E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6988956915141736E+0
+            v = 0.2089718413297697E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7041335794868720E+0
+            v = 0.2092003303479793E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7067754398018567E+0
+            v = 0.2093336148263241E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3840368707853623E-1
+            v = 0.7591708117365267E-4
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9835485954117399E-1
+            v = 0.1083383968169186E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1665774947612998E+0
+            v = 0.1403019395292510E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2405702335362910E+0
+            v = 0.1615970179286436E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3165270770189046E+0
+            v = 0.1771144187504911E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3927386145645443E+0
+            v = 0.1887760022988168E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4678825918374656E+0
+            v = 0.1973474670768214E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5408022024266935E+0
+            v = 0.2033787661234659E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6104967445752438E+0
+            v = 0.2072343626517331E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6760910702685738E+0
+            v = 0.2091177834226918E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6655644120217392E-1
+            b = 0.1936508874588424E-1
+            v = 0.9316684484675566E-4
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.9446246161270182E-1
+            b = 0.4252442002115869E-1
+            v = 0.1116193688682976E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1242651925452509E+0
+            b = 0.6806529315354374E-1
+            v = 0.1298623551559414E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1553438064846751E+0
+            b = 0.9560957491205369E-1
+            v = 0.1450236832456426E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1871137110542670E+0
+            b = 0.1245931657452888E+0
+            v = 0.1572719958149914E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2192612628836257E+0
+            b = 0.1545385828778978E+0
+            v = 0.1673234785867195E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2515682807206955E+0
+            b = 0.1851004249723368E+0
+            v = 0.1756860118725188E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2838535866287290E+0
+            b = 0.2160182608272384E+0
+            v = 0.1826776290439367E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3159578817528521E+0
+            b = 0.2470799012277111E+0
+            v = 0.1885116347992865E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3477370882791392E+0
+            b = 0.2781014208986402E+0
+            v = 0.1933457860170574E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3790576960890540E+0
+            b = 0.3089172523515731E+0
+            v = 0.1973060671902064E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4097938317810200E+0
+            b = 0.3393750055472244E+0
+            v = 0.2004987099616311E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4398256572859637E+0
+            b = 0.3693322470987730E+0
+            v = 0.2030170909281499E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4690384114718480E+0
+            b = 0.3986541005609877E+0
+            v = 0.2049461460119080E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4973216048301053E+0
+            b = 0.4272112491408562E+0
+            v = 0.2063653565200186E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5245681526132446E+0
+            b = 0.4548781735309936E+0
+            v = 0.2073507927381027E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5506733911803888E+0
+            b = 0.4815315355023251E+0
+            v = 0.2079764593256122E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5755339829522475E+0
+            b = 0.5070486445801855E+0
+            v = 0.2083150534968778E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1305472386056362E+0
+            b = 0.2284970375722366E-1
+            v = 0.1262715121590664E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1637327908216477E+0
+            b = 0.4812254338288384E-1
+            v = 0.1414386128545972E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1972734634149637E+0
+            b = 0.7531734457511935E-1
+            v = 0.1538740401313898E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2308694653110130E+0
+            b = 0.1039043639882017E+0
+            v = 0.1642434942331432E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2643899218338160E+0
+            b = 0.1334526587117626E+0
+            v = 0.1729790609237496E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2977171599622171E+0
+            b = 0.1636414868936382E+0
+            v = 0.1803505190260828E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3307293903032310E+0
+            b = 0.1942195406166568E+0
+            v = 0.1865475350079657E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3633069198219073E+0
+            b = 0.2249752879943753E+0
+            v = 0.1917182669679069E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3953346955922727E+0
+            b = 0.2557218821820032E+0
+            v = 0.1959851709034382E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4267018394184914E+0
+            b = 0.2862897925213193E+0
+            v = 0.1994529548117882E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4573009622571704E+0
+            b = 0.3165224536636518E+0
+            v = 0.2022138911146548E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4870279559856109E+0
+            b = 0.3462730221636496E+0
+            v = 0.2043518024208592E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5157819581450322E+0
+            b = 0.3754016870282835E+0
+            v = 0.2059450313018110E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5434651666465393E+0
+            b = 0.4037733784993613E+0
+            v = 0.2070685715318472E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5699823887764627E+0
+            b = 0.4312557784139123E+0
+            v = 0.2077955310694373E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5952403350947741E+0
+            b = 0.4577175367122110E+0
+            v = 0.2081980387824712E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2025152599210369E+0
+            b = 0.2520253617719557E-1
+            v = 0.1521318610377956E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2381066653274425E+0
+            b = 0.5223254506119000E-1
+            v = 0.1622772720185755E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2732823383651612E+0
+            b = 0.8060669688588620E-1
+            v = 0.1710498139420709E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3080137692611118E+0
+            b = 0.1099335754081255E+0
+            v = 0.1785911149448736E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3422405614587601E+0
+            b = 0.1399120955959857E+0
+            v = 0.1850125313687736E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3758808773890420E+0
+            b = 0.1702977801651705E+0
+            v = 0.1904229703933298E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4088458383438932E+0
+            b = 0.2008799256601680E+0
+            v = 0.1949259956121987E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4410450550841152E+0
+            b = 0.2314703052180836E+0
+            v = 0.1986161545363960E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4723879420561312E+0
+            b = 0.2618972111375892E+0
+            v = 0.2015790585641370E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5027843561874343E+0
+            b = 0.2920013195600270E+0
+            v = 0.2038934198707418E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5321453674452458E+0
+            b = 0.3216322555190551E+0
+            v = 0.2056334060538251E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5603839113834030E+0
+            b = 0.3506456615934198E+0
+            v = 0.2068705959462289E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5874150706875146E+0
+            b = 0.3789007181306267E+0
+            v = 0.2076753906106002E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6131559381660038E+0
+            b = 0.4062580170572782E+0
+            v = 0.2081179391734803E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2778497016394506E+0
+            b = 0.2696271276876226E-1
+            v = 0.1700345216228943E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3143733562261912E+0
+            b = 0.5523469316960465E-1
+            v = 0.1774906779990410E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3501485810261827E+0
+            b = 0.8445193201626464E-1
+            v = 0.1839659377002642E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3851430322303653E+0
+            b = 0.1143263119336083E+0
+            v = 0.1894987462975169E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4193013979470415E+0
+            b = 0.1446177898344475E+0
+            v = 0.1941548809452595E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4525585960458567E+0
+            b = 0.1751165438438091E+0
+            v = 0.1980078427252384E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4848447779622947E+0
+            b = 0.2056338306745660E+0
+            v = 0.2011296284744488E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5160871208276894E+0
+            b = 0.2359965487229226E+0
+            v = 0.2035888456966776E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5462112185696926E+0
+            b = 0.2660430223139146E+0
+            v = 0.2054516325352142E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5751425068101757E+0
+            b = 0.2956193664498032E+0
+            v = 0.2067831033092635E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6028073872853596E+0
+            b = 0.3245763905312779E+0
+            v = 0.2076485320284876E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6291338275278409E+0
+            b = 0.3527670026206972E+0
+            v = 0.2081141439525255E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3541797528439391E+0
+            b = 0.2823853479435550E-1
+            v = 0.1834383015469222E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3908234972074657E+0
+            b = 0.5741296374713106E-1
+            v = 0.1889540591777677E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4264408450107590E+0
+            b = 0.8724646633650199E-1
+            v = 0.1936677023597375E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4609949666553286E+0
+            b = 0.1175034422915616E+0
+            v = 0.1976176495066504E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4944389496536006E+0
+            b = 0.1479755652628428E+0
+            v = 0.2008536004560983E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5267194884346086E+0
+            b = 0.1784740659484352E+0
+            v = 0.2034280351712291E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5577787810220990E+0
+            b = 0.2088245700431244E+0
+            v = 0.2053944466027758E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5875563763536670E+0
+            b = 0.2388628136570763E+0
+            v = 0.2068077642882360E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6159910016391269E+0
+            b = 0.2684308928769185E+0
+            v = 0.2077250949661599E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6430219602956268E+0
+            b = 0.2973740761960252E+0
+            v = 0.2082062440705320E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4300647036213646E+0
+            b = 0.2916399920493977E-1
+            v = 0.1934374486546626E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4661486308935531E+0
+            b = 0.5898803024755659E-1
+            v = 0.1974107010484300E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5009658555287261E+0
+            b = 0.8924162698525409E-1
+            v = 0.2007129290388658E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5344824270447704E+0
+            b = 0.1197185199637321E+0
+            v = 0.2033736947471293E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5666575997416371E+0
+            b = 0.1502300756161382E+0
+            v = 0.2054287125902493E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5974457471404752E+0
+            b = 0.1806004191913564E+0
+            v = 0.2069184936818894E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6267984444116886E+0
+            b = 0.2106621764786252E+0
+            v = 0.2078883689808782E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6546664713575417E+0
+            b = 0.2402526932671914E+0
+            v = 0.2083886366116359E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5042711004437253E+0
+            b = 0.2982529203607657E-1
+            v = 0.2006593275470817E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5392127456774380E+0
+            b = 0.6008728062339922E-1
+            v = 0.2033728426135397E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5726819437668618E+0
+            b = 0.9058227674571398E-1
+            v = 0.2055008781377608E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6046469254207278E+0
+            b = 0.1211219235803400E+0
+            v = 0.2070651783518502E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6350716157434952E+0
+            b = 0.1515286404791580E+0
+            v = 0.2080953335094320E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6639177679185454E+0
+            b = 0.1816314681255552E+0
+            v = 0.2086284998988521E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5757276040972253E+0
+            b = 0.3026991752575440E-1
+            v = 0.2055549387644668E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6090265823139755E+0
+            b = 0.6078402297870770E-1
+            v = 0.2071871850267654E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6406735344387661E+0
+            b = 0.9135459984176636E-1
+            v = 0.2082856600431965E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6706397927793709E+0
+            b = 0.1218024155966590E+0
+            v = 0.2088705858819358E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6435019674426665E+0
+            b = 0.3052608357660639E-1
+            v = 0.2083995867536322E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6747218676375681E+0
+            b = 0.6112185773983089E-1
+            v = 0.2090509712889637E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case 5810:
+
+            v = 0.9735347946175486E-5
+            leb_tmp, start = get_lebedev_recurrence_points(1, start, a, b, v, leb_tmp)
+            v = 0.1907581241803167E-3
+            leb_tmp, start = get_lebedev_recurrence_points(2, start, a, b, v, leb_tmp)
+            v = 0.1901059546737578E-3
+            leb_tmp, start = get_lebedev_recurrence_points(3, start, a, b, v, leb_tmp)
+            a = 0.1182361662400277E-1
+            v = 0.3926424538919212E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3062145009138958E-1
+            v = 0.6667905467294382E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5329794036834243E-1
+            v = 0.8868891315019135E-4
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7848165532862220E-1
+            v = 0.1066306000958872E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1054038157636201E+0
+            v = 0.1214506743336128E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1335577797766211E+0
+            v = 0.1338054681640871E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1625769955502252E+0
+            v = 0.1441677023628504E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.1921787193412792E+0
+            v = 0.1528880200826557E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2221340534690548E+0
+            v = 0.1602330623773609E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2522504912791132E+0
+            v = 0.1664102653445244E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.2823610860679697E+0
+            v = 0.1715845854011323E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3123173966267560E+0
+            v = 0.1758901000133069E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3419847036953789E+0
+            v = 0.1794382485256736E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3712386456999758E+0
+            v = 0.1823238106757407E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3999627649876828E+0
+            v = 0.1846293252959976E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4280466458648093E+0
+            v = 0.1864284079323098E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4553844360185711E+0
+            v = 0.1877882694626914E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.4818736094437834E+0
+            v = 0.1887716321852025E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5074138709260629E+0
+            v = 0.1894381638175673E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5319061304570707E+0
+            v = 0.1898454899533629E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5552514978677286E+0
+            v = 0.1900497929577815E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.5981009025246183E+0
+            v = 0.1900671501924092E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6173990192228116E+0
+            v = 0.1899837555533510E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6351365239411131E+0
+            v = 0.1899014113156229E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6512010228227200E+0
+            v = 0.1898581257705106E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6654758363948120E+0
+            v = 0.1898804756095753E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6778410414853370E+0
+            v = 0.1899793610426402E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6881760887484110E+0
+            v = 0.1901464554844117E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.6963645267094598E+0
+            v = 0.1903533246259542E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7023010617153579E+0
+            v = 0.1905556158463228E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.7059004636628753E+0
+            v = 0.1907037155663528E-3
+            leb_tmp, start = get_lebedev_recurrence_points(4, start, a, b, v, leb_tmp)
+            a = 0.3552470312472575E-1
+            v = 0.5992997844249967E-4
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.9151176620841283E-1
+            v = 0.9749059382456978E-4
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.1566197930068980E+0
+            v = 0.1241680804599158E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2265467599271907E+0
+            v = 0.1437626154299360E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.2988242318581361E+0
+            v = 0.1584200054793902E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.3717482419703886E+0
+            v = 0.1694436550982744E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.4440094491758889E+0
+            v = 0.1776617014018108E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5145337096756642E+0
+            v = 0.1836132434440077E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.5824053672860230E+0
+            v = 0.1876494727075983E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6468283961043370E+0
+            v = 0.1899906535336482E-3
+            leb_tmp, start = get_lebedev_recurrence_points(5, start, a, b, v, leb_tmp)
+            a = 0.6095964259104373E-1
+            b = 0.1787828275342931E-1
+            v = 0.8143252820767350E-4
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.8811962270959388E-1
+            b = 0.3953888740792096E-1
+            v = 0.9998859890887728E-4
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1165936722428831E+0
+            b = 0.6378121797722990E-1
+            v = 0.1156199403068359E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1460232857031785E+0
+            b = 0.8985890813745037E-1
+            v = 0.1287632092635513E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1761197110181755E+0
+            b = 0.1172606510576162E+0
+            v = 0.1398378643365139E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2066471190463718E+0
+            b = 0.1456102876970995E+0
+            v = 0.1491876468417391E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2374076026328152E+0
+            b = 0.1746153823011775E+0
+            v = 0.1570855679175456E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2682305474337051E+0
+            b = 0.2040383070295584E+0
+            v = 0.1637483948103775E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2989653312142369E+0
+            b = 0.2336788634003698E+0
+            v = 0.1693500566632843E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3294762752772209E+0
+            b = 0.2633632752654219E+0
+            v = 0.1740322769393633E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3596390887276086E+0
+            b = 0.2929369098051601E+0
+            v = 0.1779126637278296E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3893383046398812E+0
+            b = 0.3222592785275512E+0
+            v = 0.1810908108835412E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4184653789358347E+0
+            b = 0.3512004791195743E+0
+            v = 0.1836529132600190E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4469172319076166E+0
+            b = 0.3796385677684537E+0
+            v = 0.1856752841777379E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4745950813276976E+0
+            b = 0.4074575378263879E+0
+            v = 0.1872270566606832E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5014034601410262E+0
+            b = 0.4345456906027828E+0
+            v = 0.1883722645591307E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5272493404551239E+0
+            b = 0.4607942515205134E+0
+            v = 0.1891714324525297E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5520413051846366E+0
+            b = 0.4860961284181720E+0
+            v = 0.1896827480450146E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5756887237503077E+0
+            b = 0.5103447395342790E+0
+            v = 0.1899628417059528E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1225039430588352E+0
+            b = 0.2136455922655793E-1
+            v = 0.1123301829001669E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1539113217321372E+0
+            b = 0.4520926166137188E-1
+            v = 0.1253698826711277E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1856213098637712E+0
+            b = 0.7086468177864818E-1
+            v = 0.1366266117678531E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2174998728035131E+0
+            b = 0.9785239488772918E-1
+            v = 0.1462736856106918E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2494128336938330E+0
+            b = 0.1258106396267210E+0
+            v = 0.1545076466685412E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2812321562143480E+0
+            b = 0.1544529125047001E+0
+            v = 0.1615096280814007E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3128372276456111E+0
+            b = 0.1835433512202753E+0
+            v = 0.1674366639741759E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3441145160177973E+0
+            b = 0.2128813258619585E+0
+            v = 0.1724225002437900E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3749567714853510E+0
+            b = 0.2422913734880829E+0
+            v = 0.1765810822987288E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4052621732015610E+0
+            b = 0.2716163748391453E+0
+            v = 0.1800104126010751E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4349335453522385E+0
+            b = 0.3007127671240280E+0
+            v = 0.1827960437331284E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4638776641524965E+0
+            b = 0.3294470677216479E+0
+            v = 0.1850140300716308E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4920046410462687E+0
+            b = 0.3576932543699155E+0
+            v = 0.1867333507394938E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5192273554861704E+0
+            b = 0.3853307059757764E+0
+            v = 0.1880178688638289E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5454609081136522E+0
+            b = 0.4122425044452694E+0
+            v = 0.1889278925654758E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5706220661424140E+0
+            b = 0.4383139587781027E+0
+            v = 0.1895213832507346E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5946286755181518E+0
+            b = 0.4634312536300553E+0
+            v = 0.1898548277397420E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.1905370790924295E+0
+            b = 0.2371311537781979E-1
+            v = 0.1349105935937341E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2242518717748009E+0
+            b = 0.4917878059254806E-1
+            v = 0.1444060068369326E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2577190808025936E+0
+            b = 0.7595498960495142E-1
+            v = 0.1526797390930008E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2908724534927187E+0
+            b = 0.1036991083191100E+0
+            v = 0.1598208771406474E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3236354020056219E+0
+            b = 0.1321348584450234E+0
+            v = 0.1659354368615331E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3559267359304543E+0
+            b = 0.1610316571314789E+0
+            v = 0.1711279910946440E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3876637123676956E+0
+            b = 0.1901912080395707E+0
+            v = 0.1754952725601440E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4187636705218842E+0
+            b = 0.2194384950137950E+0
+            v = 0.1791247850802529E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4491449019883107E+0
+            b = 0.2486155334763858E+0
+            v = 0.1820954300877716E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4787270932425445E+0
+            b = 0.2775768931812335E+0
+            v = 0.1844788524548449E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5074315153055574E+0
+            b = 0.3061863786591120E+0
+            v = 0.1863409481706220E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5351810507738336E+0
+            b = 0.3343144718152556E+0
+            v = 0.1877433008795068E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5619001025975381E+0
+            b = 0.3618362729028427E+0
+            v = 0.1887444543705232E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5875144035268046E+0
+            b = 0.3886297583620408E+0
+            v = 0.1894009829375006E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6119507308734495E+0
+            b = 0.4145742277792031E+0
+            v = 0.1897683345035198E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2619733870119463E+0
+            b = 0.2540047186389353E-1
+            v = 0.1517327037467653E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.2968149743237949E+0
+            b = 0.5208107018543989E-1
+            v = 0.1587740557483543E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3310451504860488E+0
+            b = 0.7971828470885599E-1
+            v = 0.1649093382274097E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3646215567376676E+0
+            b = 0.1080465999177927E+0
+            v = 0.1701915216193265E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3974916785279360E+0
+            b = 0.1368413849366629E+0
+            v = 0.1746847753144065E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4295967403772029E+0
+            b = 0.1659073184763559E+0
+            v = 0.1784555512007570E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4608742854473447E+0
+            b = 0.1950703730454614E+0
+            v = 0.1815687562112174E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4912598858949903E+0
+            b = 0.2241721144376724E+0
+            v = 0.1840864370663302E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5206882758945558E+0
+            b = 0.2530655255406489E+0
+            v = 0.1860676785390006E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5490940914019819E+0
+            b = 0.2816118409731066E+0
+            v = 0.1875690583743703E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5764123302025542E+0
+            b = 0.3096780504593238E+0
+            v = 0.1886453236347225E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6025786004213506E+0
+            b = 0.3371348366394987E+0
+            v = 0.1893501123329645E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6275291964794956E+0
+            b = 0.3638547827694396E+0
+            v = 0.1897366184519868E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3348189479861771E+0
+            b = 0.2664841935537443E-1
+            v = 0.1643908815152736E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.3699515545855295E+0
+            b = 0.5424000066843495E-1
+            v = 0.1696300350907768E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4042003071474669E+0
+            b = 0.8251992715430854E-1
+            v = 0.1741553103844483E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4375320100182624E+0
+            b = 0.1112695182483710E+0
+            v = 0.1780015282386092E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4699054490335947E+0
+            b = 0.1402964116467816E+0
+            v = 0.1812116787077125E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5012739879431952E+0
+            b = 0.1694275117584291E+0
+            v = 0.1838323158085421E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5315874883754966E+0
+            b = 0.1985038235312689E+0
+            v = 0.1859113119837737E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5607937109622117E+0
+            b = 0.2273765660020893E+0
+            v = 0.1874969220221698E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5888393223495521E+0
+            b = 0.2559041492849764E+0
+            v = 0.1886375612681076E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6156705979160163E+0
+            b = 0.2839497251976899E+0
+            v = 0.1893819575809276E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6412338809078123E+0
+            b = 0.3113791060500690E+0
+            v = 0.1897794748256767E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4076051259257167E+0
+            b = 0.2757792290858463E-1
+            v = 0.1738963926584846E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4423788125791520E+0
+            b = 0.5584136834984293E-1
+            v = 0.1777442359873466E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4760480917328258E+0
+            b = 0.8457772087727143E-1
+            v = 0.1810010815068719E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5085838725946297E+0
+            b = 0.1135975846359248E+0
+            v = 0.1836920318248129E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5399513637391218E+0
+            b = 0.1427286904765053E+0
+            v = 0.1858489473214328E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5701118433636380E+0
+            b = 0.1718112740057635E+0
+            v = 0.1875079342496592E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5990240530606021E+0
+            b = 0.2006944855985351E+0
+            v = 0.1887080239102310E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6266452685139695E+0
+            b = 0.2292335090598907E+0
+            v = 0.1894905752176822E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6529320971415942E+0
+            b = 0.2572871512353714E+0
+            v = 0.1898991061200695E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.4791583834610126E+0
+            b = 0.2826094197735932E-1
+            v = 0.1809065016458791E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5130373952796940E+0
+            b = 0.5699871359683649E-1
+            v = 0.1836297121596799E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5456252429628476E+0
+            b = 0.8602712528554394E-1
+            v = 0.1858426916241869E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5768956329682385E+0
+            b = 0.1151748137221281E+0
+            v = 0.1875654101134641E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6068186944699046E+0
+            b = 0.1442811654136362E+0
+            v = 0.1888240751833503E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6353622248024907E+0
+            b = 0.1731930321657680E+0
+            v = 0.1896497383866979E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6624927035731797E+0
+            b = 0.2017619958756061E+0
+            v = 0.1900775530219121E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5484933508028488E+0
+            b = 0.2874219755907391E-1
+            v = 0.1858525041478814E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.5810207682142106E+0
+            b = 0.5778312123713695E-1
+            v = 0.1876248690077947E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6120955197181352E+0
+            b = 0.8695262371439526E-1
+            v = 0.1889404439064607E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6416944284294319E+0
+            b = 0.1160893767057166E+0
+            v = 0.1898168539265290E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6697926391731260E+0
+            b = 0.1450378826743251E+0
+            v = 0.1902779940661772E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6147594390585488E+0
+            b = 0.2904957622341456E-1
+            v = 0.1890125641731815E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6455390026356783E+0
+            b = 0.5823809152617197E-1
+            v = 0.1899434637795751E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6747258588365477E+0
+            b = 0.8740384899884715E-1
+            v = 0.1904520856831751E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+            a = 0.6772135750395347E+0
+            b = 0.2919946135808105E-1
+            v = 0.1905534498734563E-3
+            leb_tmp, start = get_lebedev_recurrence_points(6, start, a, b, v, leb_tmp)
+
+        case _:
+            raise Exception('Angular grid unrecognized, choices are 6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350, 434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810')  # noqa: E501
+
+    leb_tmp.n = degree
+    return leb_tmp
+
+
+def get_lebedev_recurrence_points(type_, start, a, b, v, leb):
+    c = 0.0
+
+    match type_:
+
+        case 1:
+            a = 1.0
+
+            leb.x[start] = a
+            leb.y[start] = 0.0
+            leb.z[start] = 0.0
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = -a
+            leb.y[start + 1] = 0.0
+            leb.z[start + 1] = 0.0
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = 0.0
+            leb.y[start + 2] = a
+            leb.z[start + 2] = 0.0
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = 0.0
+            leb.y[start + 3] = -a
+            leb.z[start + 3] = 0.0
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = 0.0
+            leb.y[start + 4] = 0.0
+            leb.z[start + 4] = a
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = 0.0
+            leb.y[start + 5] = 0.0
+            leb.z[start + 5] = -a
+            leb.w[start + 5] = 4.0 * pi * v
+            start = start + 6
+
+        case 2:
+            a = sqrt(0.5)
+            leb.x[start] = 0.0
+            leb.y[start] = a
+            leb.z[start] = a
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = 0.0
+            leb.y[start + 1] = -a
+            leb.z[start + 1] = a
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = 0.0
+            leb.y[start + 2] = a
+            leb.z[start + 2] = -a
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = 0.0
+            leb.y[start + 3] = -a
+            leb.z[start + 3] = -a
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = a
+            leb.y[start + 4] = 0.0
+            leb.z[start + 4] = a
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = a
+            leb.y[start + 5] = 0.0
+            leb.z[start + 5] = -a
+            leb.w[start + 5] = 4.0 * pi * v
+
+            leb.x[start + 6] = -a
+            leb.y[start + 6] = 0.0
+            leb.z[start + 6] = a
+            leb.w[start + 6] = 4.0 * pi * v
+
+            leb.x[start + 7] = -a
+            leb.y[start + 7] = 0.0
+            leb.z[start + 7] = -a
+            leb.w[start + 7] = 4.0 * pi * v
+
+            leb.x[start + 8] = a
+            leb.y[start + 8] = a
+            leb.z[start + 8] = 0.0
+            leb.w[start + 8] = 4.0 * pi * v
+
+            leb.x[start + 9] = -a
+            leb.y[start + 9] = a
+            leb.z[start + 9] = 0.0
+            leb.w[start + 9] = 4.0 * pi * v
+
+            leb.x[start + 10] = a
+            leb.y[start + 10] = -a
+            leb.z[start + 10] = 0.0
+            leb.w[start + 10] = 4.0 * pi * v
+
+            leb.x[start + 11] = -a
+            leb.y[start + 11] = -a
+            leb.z[start + 11] = 0.0
+            leb.w[start + 11] = 4.0 * pi * v
+            start = start + 12
+
+        case 3:
+            a = sqrt(1.0 / 3.0)
+            leb.x[start] = a
+            leb.y[start] = a
+            leb.z[start] = a
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = -a
+            leb.y[start + 1] = a
+            leb.z[start + 1] = a
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = a
+            leb.y[start + 2] = -a
+            leb.z[start + 2] = a
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = a
+            leb.y[start + 3] = a
+            leb.z[start + 3] = -a
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = -a
+            leb.y[start + 4] = -a
+            leb.z[start + 4] = a
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = a
+            leb.y[start + 5] = -a
+            leb.z[start + 5] = -a
+            leb.w[start + 5] = 4.0 * pi * v
+
+            leb.x[start + 6] = -a
+            leb.y[start + 6] = a
+            leb.z[start + 6] = -a
+            leb.w[start + 6] = 4.0 * pi * v
+
+            leb.x[start + 7] = -a
+            leb.y[start + 7] = -a
+            leb.z[start + 7] = -a
+            leb.w[start + 7] = 4.0 * pi * v
+            start = start + 8
+
+        case 4:
+            # /* In this case A is inputed */
+            b = sqrt(1.0 - 2.0 * a * a)
+            leb.x[start] = a
+            leb.y[start] = a
+            leb.z[start] = b
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = -a
+            leb.y[start + 1] = a
+            leb.z[start + 1] = b
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = a
+            leb.y[start + 2] = -a
+            leb.z[start + 2] = b
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = a
+            leb.y[start + 3] = a
+            leb.z[start + 3] = -b
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = -a
+            leb.y[start + 4] = -a
+            leb.z[start + 4] = b
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = -a
+            leb.y[start + 5] = a
+            leb.z[start + 5] = -b
+            leb.w[start + 5] = 4.0 * pi * v
+
+            leb.x[start + 6] = a
+            leb.y[start + 6] = -a
+            leb.z[start + 6] = -b
+            leb.w[start + 6] = 4.0 * pi * v
+
+            leb.x[start + 7] = -a
+            leb.y[start + 7] = -a
+            leb.z[start + 7] = -b
+            leb.w[start + 7] = 4.0 * pi * v
+
+            leb.x[start + 8] = -a
+            leb.y[start + 8] = b
+            leb.z[start + 8] = a
+            leb.w[start + 8] = 4.0 * pi * v
+
+            leb.x[start + 9] = a
+            leb.y[start + 9] = -b
+            leb.z[start + 9] = a
+            leb.w[start + 9] = 4.0 * pi * v
+
+            leb.x[start + 10] = a
+            leb.y[start + 10] = b
+            leb.z[start + 10] = -a
+            leb.w[start + 10] = 4.0 * pi * v
+
+            leb.x[start + 11] = -a
+            leb.y[start + 11] = -b
+            leb.z[start + 11] = a
+            leb.w[start + 11] = 4.0 * pi * v
+
+            leb.x[start + 12] = -a
+            leb.y[start + 12] = b
+            leb.z[start + 12] = -a
+            leb.w[start + 12] = 4.0 * pi * v
+
+            leb.x[start + 13] = a
+            leb.y[start + 13] = -b
+            leb.z[start + 13] = -a
+            leb.w[start + 13] = 4.0 * pi * v
+
+            leb.x[start + 14] = -a
+            leb.y[start + 14] = -b
+            leb.z[start + 14] = -a
+            leb.w[start + 14] = 4.0 * pi * v
+
+            leb.x[start + 15] = a
+            leb.y[start + 15] = b
+            leb.z[start + 15] = a
+            leb.w[start + 15] = 4.0 * pi * v
+
+            leb.x[start + 16] = b
+            leb.y[start + 16] = a
+            leb.z[start + 16] = a
+            leb.w[start + 16] = 4.0 * pi * v
+
+            leb.x[start + 17] = -b
+            leb.y[start + 17] = a
+            leb.z[start + 17] = a
+            leb.w[start + 17] = 4.0 * pi * v
+
+            leb.x[start + 18] = b
+            leb.y[start + 18] = -a
+            leb.z[start + 18] = a
+            leb.w[start + 18] = 4.0 * pi * v
+
+            leb.x[start + 19] = b
+            leb.y[start + 19] = a
+            leb.z[start + 19] = -a
+            leb.w[start + 19] = 4.0 * pi * v
+
+            leb.x[start + 20] = -b
+            leb.y[start + 20] = -a
+            leb.z[start + 20] = a
+            leb.w[start + 20] = 4.0 * pi * v
+
+            leb.x[start + 21] = -b
+            leb.y[start + 21] = a
+            leb.z[start + 21] = -a
+            leb.w[start + 21] = 4.0 * pi * v
+
+            leb.x[start + 22] = b
+            leb.y[start + 22] = -a
+            leb.z[start + 22] = -a
+            leb.w[start + 22] = 4.0 * pi * v
+
+            leb.x[start + 23] = -b
+            leb.y[start + 23] = -a
+            leb.z[start + 23] = -a
+            leb.w[start + 23] = 4.0 * pi * v
+            start = start + 24
+
+        case 5:
+            # /* A is inputed in this case as well*/
+            b = sqrt(1 - a * a)
+            leb.x[start] = a
+            leb.y[start] = b
+            leb.z[start] = 0.0
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = -a
+            leb.y[start + 1] = b
+            leb.z[start + 1] = 0.0
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = a
+            leb.y[start + 2] = -b
+            leb.z[start + 2] = 0.0
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = -a
+            leb.y[start + 3] = -b
+            leb.z[start + 3] = 0.0
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = b
+            leb.y[start + 4] = a
+            leb.z[start + 4] = 0.0
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = -b
+            leb.y[start + 5] = a
+            leb.z[start + 5] = 0.0
+            leb.w[start + 5] = 4.0 * pi * v
+
+            leb.x[start + 6] = b
+            leb.y[start + 6] = -a
+            leb.z[start + 6] = 0.0
+            leb.w[start + 6] = 4.0 * pi * v
+
+            leb.x[start + 7] = -b
+            leb.y[start + 7] = -a
+            leb.z[start + 7] = 0.0
+            leb.w[start + 7] = 4.0 * pi * v
+
+            leb.x[start + 8] = a
+            leb.y[start + 8] = 0.0
+            leb.z[start + 8] = b
+            leb.w[start + 8] = 4.0 * pi * v
+
+            leb.x[start + 9] = -a
+            leb.y[start + 9] = 0.0
+            leb.z[start + 9] = b
+            leb.w[start + 9] = 4.0 * pi * v
+
+            leb.x[start + 10] = a
+            leb.y[start + 10] = 0.0
+            leb.z[start + 10] = -b
+            leb.w[start + 10] = 4.0 * pi * v
+
+            leb.x[start + 11] = -a
+            leb.y[start + 11] = 0.0
+            leb.z[start + 11] = -b
+            leb.w[start + 11] = 4.0 * pi * v
+
+            leb.x[start + 12] = b
+            leb.y[start + 12] = 0.0
+            leb.z[start + 12] = a
+            leb.w[start + 12] = 4.0 * pi * v
+
+            leb.x[start + 13] = -b
+            leb.y[start + 13] = 0.0
+            leb.z[start + 13] = a
+            leb.w[start + 13] = 4.0 * pi * v
+
+            leb.x[start + 14] = b
+            leb.y[start + 14] = 0.0
+            leb.z[start + 14] = -a
+            leb.w[start + 14] = 4.0 * pi * v
+
+            leb.x[start + 15] = -b
+            leb.y[start + 15] = 0.0
+            leb.z[start + 15] = -a
+            leb.w[start + 15] = 4.0 * pi * v
+
+            leb.x[start + 16] = 0.0
+            leb.y[start + 16] = a
+            leb.z[start + 16] = b
+            leb.w[start + 16] = 4.0 * pi * v
+
+            leb.x[start + 17] = 0.0
+            leb.y[start + 17] = -a
+            leb.z[start + 17] = b
+            leb.w[start + 17] = 4.0 * pi * v
+
+            leb.x[start + 18] = 0.0
+            leb.y[start + 18] = a
+            leb.z[start + 18] = -b
+            leb.w[start + 18] = 4.0 * pi * v
+
+            leb.x[start + 19] = 0.0
+            leb.y[start + 19] = -a
+            leb.z[start + 19] = -b
+            leb.w[start + 19] = 4.0 * pi * v
+
+            leb.x[start + 20] = 0.0
+            leb.y[start + 20] = b
+            leb.z[start + 20] = a
+            leb.w[start + 20] = 4.0 * pi * v
+
+            leb.x[start + 21] = 0.0
+            leb.y[start + 21] = -b
+            leb.z[start + 21] = a
+            leb.w[start + 21] = 4.0 * pi * v
+
+            leb.x[start + 22] = 0.0
+            leb.y[start + 22] = b
+            leb.z[start + 22] = -a
+            leb.w[start + 22] = 4.0 * pi * v
+
+            leb.x[start + 23] = 0.0
+            leb.y[start + 23] = -b
+            leb.z[start + 23] = -a
+            leb.w[start + 23] = 4.0 * pi * v
+            start = start + 24
+
+        case 6:
+            # /* both A and B are inputed in this case */
+            c = sqrt(1.0 - a * a - b * b)
+            leb.x[start] = a
+            leb.y[start] = b
+            leb.z[start] = c
+            leb.w[start] = 4.0 * pi * v
+
+            leb.x[start + 1] = -a
+            leb.y[start + 1] = b
+            leb.z[start + 1] = c
+            leb.w[start + 1] = 4.0 * pi * v
+
+            leb.x[start + 2] = a
+            leb.y[start + 2] = -b
+            leb.z[start + 2] = c
+            leb.w[start + 2] = 4.0 * pi * v
+
+            leb.x[start + 3] = a
+            leb.y[start + 3] = b
+            leb.z[start + 3] = -c
+            leb.w[start + 3] = 4.0 * pi * v
+
+            leb.x[start + 4] = -a
+            leb.y[start + 4] = -b
+            leb.z[start + 4] = c
+            leb.w[start + 4] = 4.0 * pi * v
+
+            leb.x[start + 5] = a
+            leb.y[start + 5] = -b
+            leb.z[start + 5] = -c
+            leb.w[start + 5] = 4.0 * pi * v
+
+            leb.x[start + 6] = -a
+            leb.y[start + 6] = b
+            leb.z[start + 6] = -c
+            leb.w[start + 6] = 4.0 * pi * v
+
+            leb.x[start + 7] = -a
+            leb.y[start + 7] = -b
+            leb.z[start + 7] = -c
+            leb.w[start + 7] = 4.0 * pi * v
+
+            leb.x[start + 8] = b
+            leb.y[start + 8] = a
+            leb.z[start + 8] = c
+            leb.w[start + 8] = 4.0 * pi * v
+
+            leb.x[start + 9] = -b
+            leb.y[start + 9] = a
+            leb.z[start + 9] = c
+            leb.w[start + 9] = 4.0 * pi * v
+
+            leb.x[start + 10] = b
+            leb.y[start + 10] = -a
+            leb.z[start + 10] = c
+            leb.w[start + 10] = 4.0 * pi * v
+
+            leb.x[start + 11] = b
+            leb.y[start + 11] = a
+            leb.z[start + 11] = -c
+            leb.w[start + 11] = 4.0 * pi * v
+
+            leb.x[start + 12] = -b
+            leb.y[start + 12] = -a
+            leb.z[start + 12] = c
+            leb.w[start + 12] = 4.0 * pi * v
+
+            leb.x[start + 13] = b
+            leb.y[start + 13] = -a
+            leb.z[start + 13] = -c
+            leb.w[start + 13] = 4.0 * pi * v
+
+            leb.x[start + 14] = -b
+            leb.y[start + 14] = a
+            leb.z[start + 14] = -c
+            leb.w[start + 14] = 4.0 * pi * v
+
+            leb.x[start + 15] = -b
+            leb.y[start + 15] = -a
+            leb.z[start + 15] = -c
+            leb.w[start + 15] = 4.0 * pi * v
+
+            leb.x[start + 16] = c
+            leb.y[start + 16] = a
+            leb.z[start + 16] = b
+            leb.w[start + 16] = 4.0 * pi * v
+
+            leb.x[start + 17] = -c
+            leb.y[start + 17] = a
+            leb.z[start + 17] = b
+            leb.w[start + 17] = 4.0 * pi * v
+
+            leb.x[start + 18] = c
+            leb.y[start + 18] = -a
+            leb.z[start + 18] = b
+            leb.w[start + 18] = 4.0 * pi * v
+
+            leb.x[start + 19] = c
+            leb.y[start + 19] = a
+            leb.z[start + 19] = -b
+            leb.w[start + 19] = 4.0 * pi * v
+
+            leb.x[start + 20] = -c
+            leb.y[start + 20] = -a
+            leb.z[start + 20] = b
+            leb.w[start + 20] = 4.0 * pi * v
+
+            leb.x[start + 21] = c
+            leb.y[start + 21] = -a
+            leb.z[start + 21] = -b
+            leb.w[start + 21] = 4.0 * pi * v
+
+            leb.x[start + 22] = -c
+            leb.y[start + 22] = a
+            leb.z[start + 22] = -b
+            leb.w[start + 22] = 4.0 * pi * v
+
+            leb.x[start + 23] = -c
+            leb.y[start + 23] = -a
+            leb.z[start + 23] = -b
+            leb.w[start + 23] = 4.0 * pi * v
+
+            leb.x[start + 24] = c
+            leb.y[start + 24] = b
+            leb.z[start + 24] = a
+            leb.w[start + 24] = 4.0 * pi * v
+
+            leb.x[start + 25] = -c
+            leb.y[start + 25] = b
+            leb.z[start + 25] = a
+            leb.w[start + 25] = 4.0 * pi * v
+
+            leb.x[start + 26] = c
+            leb.y[start + 26] = -b
+            leb.z[start + 26] = a
+            leb.w[start + 26] = 4.0 * pi * v
+
+            leb.x[start + 27] = c
+            leb.y[start + 27] = b
+            leb.z[start + 27] = -a
+            leb.w[start + 27] = 4.0 * pi * v
+
+            leb.x[start + 28] = -c
+            leb.y[start + 28] = -b
+            leb.z[start + 28] = a
+            leb.w[start + 28] = 4.0 * pi * v
+
+            leb.x[start + 29] = c
+            leb.y[start + 29] = -b
+            leb.z[start + 29] = -a
+            leb.w[start + 29] = 4.0 * pi * v
+
+            leb.x[start + 30] = -c
+            leb.y[start + 30] = b
+            leb.z[start + 30] = -a
+            leb.w[start + 30] = 4.0 * pi * v
+
+            leb.x[start + 31] = -c
+            leb.y[start + 31] = -b
+            leb.z[start + 31] = -a
+            leb.w[start + 31] = 4.0 * pi * v
+
+            leb.x[start + 32] = a
+            leb.y[start + 32] = c
+            leb.z[start + 32] = b
+            leb.w[start + 32] = 4.0 * pi * v
+
+            leb.x[start + 33] = -a
+            leb.y[start + 33] = c
+            leb.z[start + 33] = b
+            leb.w[start + 33] = 4.0 * pi * v
+
+            leb.x[start + 34] = a
+            leb.y[start + 34] = -c
+            leb.z[start + 34] = b
+            leb.w[start + 34] = 4.0 * pi * v
+
+            leb.x[start + 35] = a
+            leb.y[start + 35] = c
+            leb.z[start + 35] = -b
+            leb.w[start + 35] = 4.0 * pi * v
+
+            leb.x[start + 36] = -a
+            leb.y[start + 36] = -c
+            leb.z[start + 36] = b
+            leb.w[start + 36] = 4.0 * pi * v
+
+            leb.x[start + 37] = a
+            leb.y[start + 37] = -c
+            leb.z[start + 37] = -b
+            leb.w[start + 37] = 4.0 * pi * v
+
+            leb.x[start + 38] = -a
+            leb.y[start + 38] = c
+            leb.z[start + 38] = -b
+            leb.w[start + 38] = 4.0 * pi * v
+
+            leb.x[start + 39] = -a
+            leb.y[start + 39] = -c
+            leb.z[start + 39] = -b
+            leb.w[start + 39] = 4.0 * pi * v
+
+            leb.x[start + 40] = b
+            leb.y[start + 40] = c
+            leb.z[start + 40] = a
+            leb.w[start + 40] = 4.0 * pi * v
+
+            leb.x[start + 41] = -b
+            leb.y[start + 41] = c
+            leb.z[start + 41] = a
+            leb.w[start + 41] = 4.0 * pi * v
+
+            leb.x[start + 42] = b
+            leb.y[start + 42] = -c
+            leb.z[start + 42] = a
+            leb.w[start + 42] = 4.0 * pi * v
+
+            leb.x[start + 43] = b
+            leb.y[start + 43] = c
+            leb.z[start + 43] = -a
+            leb.w[start + 43] = 4.0 * pi * v
+
+            leb.x[start + 44] = -b
+            leb.y[start + 44] = -c
+            leb.z[start + 44] = a
+            leb.w[start + 44] = 4.0 * pi * v
+
+            leb.x[start + 45] = b
+            leb.y[start + 45] = -c
+            leb.z[start + 45] = -a
+            leb.w[start + 45] = 4.0 * pi * v
+
+            leb.x[start + 46] = -b
+            leb.y[start + 46] = c
+            leb.z[start + 46] = -a
+            leb.w[start + 46] = 4.0 * pi * v
+
+            leb.x[start + 47] = -b
+            leb.y[start + 47] = -c
+            leb.z[start + 47] = -a
+            leb.w[start + 47] = 4.0 * pi * v
+            start = start + 48
+
+        case _:
+            raise Exception('Bad grid order')
+
+    return leb, start
+
+
+def lebedev_rule(n):
+    r"""Lebedev quadrature.
+
+    Compute the sample points and weights for Lebedev quadrature [1]_
+    for integration of a function over the surface of a unit sphere.
+
+    Parameters
+    ----------
+    n : int
+        Quadrature order. See Notes for supported values.
+
+    Returns
+    -------
+    x : ndarray of shape ``(3, m)``
+        Sample points on the unit sphere in Cartesian coordinates.
+        ``m`` is the "degree" corresponding with the specified order; see Notes.
+    w : ndarray of shape ``(m,)``
+        Weights
+
+    Notes
+    -----
+    Implemented by translating the Matlab code of [2]_ to Python.
+
+    The available orders (argument `n`) are::
+
+        3, 5, 7, 9, 11, 13, 15, 17,
+        19, 21, 23, 25, 27, 29, 31, 35,
+        41, 47, 53, 59, 65, 71, 77, 83,
+        89, 95, 101, 107, 113, 119, 125, 131
+
+    The corresponding degrees ``m`` are::
+
+        6, 14, 26, 38, 50, 74, 86, 110,
+        146, 170, 194, 230, 266, 302, 350, 434,
+        590, 770, 974, 1202, 1454, 1730, 2030, 2354,
+        2702, 3074, 3470, 3890, 4334, 4802, 5294, 5810
+
+    References
+    ----------
+    .. [1] V.I. Lebedev, and D.N. Laikov. "A quadrature formula for the sphere of
+           the 131st algebraic order of accuracy". Doklady Mathematics, Vol. 59,
+           No. 3, 1999, pp. 477-481.
+    .. [2] R. Parrish. ``getLebedevSphere``. Matlab Central File Exchange.
+           https://www.mathworks.com/matlabcentral/fileexchange/27097-getlebedevsphere.
+    .. [3] Bellet, Jean-Baptiste, Matthieu Brachet, and Jean-Pierre Croisille.
+           "Quadrature and symmetry on the Cubed Sphere." Journal of Computational and
+           Applied Mathematics 409 (2022): 114142. :doi:`10.1016/j.cam.2022.114142`.
+
+    Examples
+    --------
+    An example given in [3]_ is integration of :math:`f(x, y, z) = \exp(x)` over a
+    sphere of radius :math:`1`; the reference there is ``14.7680137457653``.
+    Show the convergence to the expected result as the order increases:
+
+    >>> import matplotlib.pyplot as plt
+    >>> import numpy as np
+    >>> from scipy.integrate import lebedev_rule
+    >>>
+    >>> def f(x):
+    ...     return np.exp(x[0])
+    >>>
+    >>> res = []
+    >>> orders = np.arange(3, 20, 2)
+    >>> for n in orders:
+    ...     x, w = lebedev_rule(n)
+    ...     res.append(w @ f(x))
+    >>>
+    >>> ref = np.full_like(res, 14.7680137457653)
+    >>> err = abs(res - ref)/abs(ref)
+    >>> plt.semilogy(orders, err)
+    >>> plt.xlabel('order $n$')
+    >>> plt.ylabel('relative error')
+    >>> plt.title(r'Convergence for $f(x, y, z) = \exp(x)$')
+    >>> plt.show()
+
+    """
+    degree = [6, 14, 26, 38, 50, 74, 86, 110, 146, 170, 194, 230, 266, 302, 350,
+              434, 590, 770, 974, 1202, 1454, 1730, 2030, 2354, 2702, 3074, 3470,
+              3890, 4334, 4802, 5294, 5810]
+    order = [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 41, 47,
+             53, 59, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131]
+    order_degree_map = dict(zip(order, degree))
+
+    if n not in order_degree_map:
+        message = f"Order {n=} not available. Available orders are {order}."
+        raise NotImplementedError(message)
+
+    degree = order_degree_map[n]
+    res = get_lebedev_sphere(degree)
+    x = np.stack((res.x, res.y, res.z))
+    w = res.w
+
+    return x, w
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ode.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ode.py
new file mode 100644
index 0000000000000000000000000000000000000000..72d9da2495da768753f45796e8df1996cd70d382
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_ode.py
@@ -0,0 +1,1388 @@
+# Authors: Pearu Peterson, Pauli Virtanen, John Travers
+"""
+First-order ODE integrators.
+
+User-friendly interface to various numerical integrators for solving a
+system of first order ODEs with prescribed initial conditions::
+
+    d y(t)[i]
+    ---------  = f(t,y(t))[i],
+       d t
+
+    y(t=0)[i] = y0[i],
+
+where::
+
+    i = 0, ..., len(y0) - 1
+
+class ode
+---------
+
+A generic interface class to numeric integrators. It has the following
+methods::
+
+    integrator = ode(f, jac=None)
+    integrator = integrator.set_integrator(name, **params)
+    integrator = integrator.set_initial_value(y0, t0=0.0)
+    integrator = integrator.set_f_params(*args)
+    integrator = integrator.set_jac_params(*args)
+    y1 = integrator.integrate(t1, step=False, relax=False)
+    flag = integrator.successful()
+
+class complex_ode
+-----------------
+
+This class has the same generic interface as ode, except it can handle complex
+f, y and Jacobians by transparently translating them into the equivalent
+real-valued system. It supports the real-valued solvers (i.e., not zvode) and is
+an alternative to ode with the zvode solver, sometimes performing better.
+"""
+# XXX: Integrators must have:
+# ===========================
+# cvode - C version of vode and vodpk with many improvements.
+#   Get it from http://www.netlib.org/ode/cvode.tar.gz.
+#   To wrap cvode to Python, one must write the extension module by
+#   hand. Its interface is too much 'advanced C' that using f2py
+#   would be too complicated (or impossible).
+#
+# How to define a new integrator:
+# ===============================
+#
+# class myodeint(IntegratorBase):
+#
+#     runner =  or None
+#
+#     def __init__(self,...):                           # required
+#         
+#
+#     def reset(self,n,has_jac):                        # optional
+#         # n - the size of the problem (number of equations)
+#         # has_jac - whether user has supplied its own routine for Jacobian
+#         
+#
+#     def run(self,f,jac,y0,t0,t1,f_params,jac_params): # required
+#         # this method is called to integrate from t=t0 to t=t1
+#         # with initial condition y0. f and jac are user-supplied functions
+#         # that define the problem. f_params,jac_params are additional
+#         # arguments
+#         # to these functions.
+#         
+#         if :
+#             self.success = 0
+#         return t1,y1
+#
+#     # In addition, one can define step() and run_relax() methods (they
+#     # take the same arguments as run()) if the integrator can support
+#     # these features (see IntegratorBase doc strings).
+#
+# if myodeint.runner:
+#     IntegratorBase.integrator_classes.append(myodeint)
+
+__all__ = ['ode', 'complex_ode']
+
+import re
+import threading
+import warnings
+
+from numpy import asarray, array, zeros, isscalar, real, imag, vstack
+
+from . import _vode
+from . import _dop
+from . import _lsoda
+
+
+_dop_int_dtype = _dop.types.intvar.dtype
+_vode_int_dtype = _vode.types.intvar.dtype
+_lsoda_int_dtype = _lsoda.types.intvar.dtype
+
+
+# lsoda, vode and zvode are not thread-safe. VODE_LOCK protects both vode and
+# zvode; they share the `def run` implementation
+LSODA_LOCK = threading.Lock()
+VODE_LOCK = threading.Lock()
+
+
+# ------------------------------------------------------------------------------
+# User interface
+# ------------------------------------------------------------------------------
+
+
+class ode:
+    """
+    A generic interface class to numeric integrators.
+
+    Solve an equation system :math:`y'(t) = f(t,y)` with (optional) ``jac = df/dy``.
+
+    *Note*: The first two arguments of ``f(t, y, ...)`` are in the
+    opposite order of the arguments in the system definition function used
+    by `scipy.integrate.odeint`.
+
+    Parameters
+    ----------
+    f : callable ``f(t, y, *f_args)``
+        Right-hand side of the differential equation. t is a scalar,
+        ``y.shape == (n,)``.
+        ``f_args`` is set by calling ``set_f_params(*args)``.
+        `f` should return a scalar, array or list (not a tuple).
+    jac : callable ``jac(t, y, *jac_args)``, optional
+        Jacobian of the right-hand side, ``jac[i,j] = d f[i] / d y[j]``.
+        ``jac_args`` is set by calling ``set_jac_params(*args)``.
+
+    Attributes
+    ----------
+    t : float
+        Current time.
+    y : ndarray
+        Current variable values.
+
+    See also
+    --------
+    odeint : an integrator with a simpler interface based on lsoda from ODEPACK
+    quad : for finding the area under a curve
+
+    Notes
+    -----
+    Available integrators are listed below. They can be selected using
+    the `set_integrator` method.
+
+    "vode"
+
+        Real-valued Variable-coefficient Ordinary Differential Equation
+        solver, with fixed-leading-coefficient implementation. It provides
+        implicit Adams method (for non-stiff problems) and a method based on
+        backward differentiation formulas (BDF) (for stiff problems).
+
+        Source: http://www.netlib.org/ode/vode.f
+
+        .. warning::
+
+           This integrator is not re-entrant. You cannot have two `ode`
+           instances using the "vode" integrator at the same time.
+
+        This integrator accepts the following parameters in `set_integrator`
+        method of the `ode` class:
+
+        - atol : float or sequence
+          absolute tolerance for solution
+        - rtol : float or sequence
+          relative tolerance for solution
+        - lband : None or int
+        - uband : None or int
+          Jacobian band width, jac[i,j] != 0 for i-lband <= j <= i+uband.
+          Setting these requires your jac routine to return the jacobian
+          in packed format, jac_packed[i-j+uband, j] = jac[i,j]. The
+          dimension of the matrix must be (lband+uband+1, len(y)).
+        - method: 'adams' or 'bdf'
+          Which solver to use, Adams (non-stiff) or BDF (stiff)
+        - with_jacobian : bool
+          This option is only considered when the user has not supplied a
+          Jacobian function and has not indicated (by setting either band)
+          that the Jacobian is banded. In this case, `with_jacobian` specifies
+          whether the iteration method of the ODE solver's correction step is
+          chord iteration with an internally generated full Jacobian or
+          functional iteration with no Jacobian.
+        - nsteps : int
+          Maximum number of (internally defined) steps allowed during one
+          call to the solver.
+        - first_step : float
+        - min_step : float
+        - max_step : float
+          Limits for the step sizes used by the integrator.
+        - order : int
+          Maximum order used by the integrator,
+          order <= 12 for Adams, <= 5 for BDF.
+
+    "zvode"
+
+        Complex-valued Variable-coefficient Ordinary Differential Equation
+        solver, with fixed-leading-coefficient implementation. It provides
+        implicit Adams method (for non-stiff problems) and a method based on
+        backward differentiation formulas (BDF) (for stiff problems).
+
+        Source: http://www.netlib.org/ode/zvode.f
+
+        .. warning::
+
+           This integrator is not re-entrant. You cannot have two `ode`
+           instances using the "zvode" integrator at the same time.
+
+        This integrator accepts the same parameters in `set_integrator`
+        as the "vode" solver.
+
+        .. note::
+
+            When using ZVODE for a stiff system, it should only be used for
+            the case in which the function f is analytic, that is, when each f(i)
+            is an analytic function of each y(j). Analyticity means that the
+            partial derivative df(i)/dy(j) is a unique complex number, and this
+            fact is critical in the way ZVODE solves the dense or banded linear
+            systems that arise in the stiff case. For a complex stiff ODE system
+            in which f is not analytic, ZVODE is likely to have convergence
+            failures, and for this problem one should instead use DVODE on the
+            equivalent real system (in the real and imaginary parts of y).
+
+    "lsoda"
+
+        Real-valued Variable-coefficient Ordinary Differential Equation
+        solver, with fixed-leading-coefficient implementation. It provides
+        automatic method switching between implicit Adams method (for non-stiff
+        problems) and a method based on backward differentiation formulas (BDF)
+        (for stiff problems).
+
+        Source: http://www.netlib.org/odepack
+
+        .. warning::
+
+           This integrator is not re-entrant. You cannot have two `ode`
+           instances using the "lsoda" integrator at the same time.
+
+        This integrator accepts the following parameters in `set_integrator`
+        method of the `ode` class:
+
+        - atol : float or sequence
+          absolute tolerance for solution
+        - rtol : float or sequence
+          relative tolerance for solution
+        - lband : None or int
+        - uband : None or int
+          Jacobian band width, jac[i,j] != 0 for i-lband <= j <= i+uband.
+          Setting these requires your jac routine to return the jacobian
+          in packed format, jac_packed[i-j+uband, j] = jac[i,j].
+        - with_jacobian : bool
+          *Not used.*
+        - nsteps : int
+          Maximum number of (internally defined) steps allowed during one
+          call to the solver.
+        - first_step : float
+        - min_step : float
+        - max_step : float
+          Limits for the step sizes used by the integrator.
+        - max_order_ns : int
+          Maximum order used in the nonstiff case (default 12).
+        - max_order_s : int
+          Maximum order used in the stiff case (default 5).
+        - max_hnil : int
+          Maximum number of messages reporting too small step size (t + h = t)
+          (default 0)
+        - ixpr : int
+          Whether to generate extra printing at method switches (default False).
+
+    "dopri5"
+
+        This is an explicit runge-kutta method of order (4)5 due to Dormand &
+        Prince (with stepsize control and dense output).
+
+        Authors:
+
+            E. Hairer and G. Wanner
+            Universite de Geneve, Dept. de Mathematiques
+            CH-1211 Geneve 24, Switzerland
+            e-mail:  ernst.hairer@math.unige.ch, gerhard.wanner@math.unige.ch
+
+        This code is described in [HNW93]_.
+
+        This integrator accepts the following parameters in set_integrator()
+        method of the ode class:
+
+        - atol : float or sequence
+          absolute tolerance for solution
+        - rtol : float or sequence
+          relative tolerance for solution
+        - nsteps : int
+          Maximum number of (internally defined) steps allowed during one
+          call to the solver.
+        - first_step : float
+        - max_step : float
+        - safety : float
+          Safety factor on new step selection (default 0.9)
+        - ifactor : float
+        - dfactor : float
+          Maximum factor to increase/decrease step size by in one step
+        - beta : float
+          Beta parameter for stabilised step size control.
+        - verbosity : int
+          Switch for printing messages (< 0 for no messages).
+
+    "dop853"
+
+        This is an explicit runge-kutta method of order 8(5,3) due to Dormand
+        & Prince (with stepsize control and dense output).
+
+        Options and references the same as "dopri5".
+
+    Examples
+    --------
+
+    A problem to integrate and the corresponding jacobian:
+
+    >>> from scipy.integrate import ode
+    >>>
+    >>> y0, t0 = [1.0j, 2.0], 0
+    >>>
+    >>> def f(t, y, arg1):
+    ...     return [1j*arg1*y[0] + y[1], -arg1*y[1]**2]
+    >>> def jac(t, y, arg1):
+    ...     return [[1j*arg1, 1], [0, -arg1*2*y[1]]]
+
+    The integration:
+
+    >>> r = ode(f, jac).set_integrator('zvode', method='bdf')
+    >>> r.set_initial_value(y0, t0).set_f_params(2.0).set_jac_params(2.0)
+    >>> t1 = 10
+    >>> dt = 1
+    >>> while r.successful() and r.t < t1:
+    ...     print(r.t+dt, r.integrate(r.t+dt))
+    1 [-0.71038232+0.23749653j  0.40000271+0.j        ]
+    2.0 [0.19098503-0.52359246j 0.22222356+0.j        ]
+    3.0 [0.47153208+0.52701229j 0.15384681+0.j        ]
+    4.0 [-0.61905937+0.30726255j  0.11764744+0.j        ]
+    5.0 [0.02340997-0.61418799j 0.09523835+0.j        ]
+    6.0 [0.58643071+0.339819j 0.08000018+0.j      ]
+    7.0 [-0.52070105+0.44525141j  0.06896565+0.j        ]
+    8.0 [-0.15986733-0.61234476j  0.06060616+0.j        ]
+    9.0 [0.64850462+0.15048982j 0.05405414+0.j        ]
+    10.0 [-0.38404699+0.56382299j  0.04878055+0.j        ]
+
+    References
+    ----------
+    .. [HNW93] E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary
+        Differential Equations i. Nonstiff Problems. 2nd edition.
+        Springer Series in Computational Mathematics,
+        Springer-Verlag (1993)
+
+    """
+
+    def __init__(self, f, jac=None):
+        self.stiff = 0
+        self.f = f
+        self.jac = jac
+        self.f_params = ()
+        self.jac_params = ()
+        self._y = []
+
+    @property
+    def y(self):
+        return self._y
+
+    def set_initial_value(self, y, t=0.0):
+        """Set initial conditions y(t) = y."""
+        if isscalar(y):
+            y = [y]
+        n_prev = len(self._y)
+        if not n_prev:
+            self.set_integrator('')  # find first available integrator
+        self._y = asarray(y, self._integrator.scalar)
+        self.t = t
+        self._integrator.reset(len(self._y), self.jac is not None)
+        return self
+
+    def set_integrator(self, name, **integrator_params):
+        """
+        Set integrator by name.
+
+        Parameters
+        ----------
+        name : str
+            Name of the integrator.
+        **integrator_params
+            Additional parameters for the integrator.
+        """
+        integrator = find_integrator(name)
+        if integrator is None:
+            # FIXME: this really should be raise an exception. Will that break
+            # any code?
+            message = f'No integrator name match with {name!r} or is not available.'
+            warnings.warn(message, stacklevel=2)
+        else:
+            self._integrator = integrator(**integrator_params)
+            if not len(self._y):
+                self.t = 0.0
+                self._y = array([0.0], self._integrator.scalar)
+            self._integrator.reset(len(self._y), self.jac is not None)
+        return self
+
+    def integrate(self, t, step=False, relax=False):
+        """Find y=y(t), set y as an initial condition, and return y.
+
+        Parameters
+        ----------
+        t : float
+            The endpoint of the integration step.
+        step : bool
+            If True, and if the integrator supports the step method,
+            then perform a single integration step and return.
+            This parameter is provided in order to expose internals of
+            the implementation, and should not be changed from its default
+            value in most cases.
+        relax : bool
+            If True and if the integrator supports the run_relax method,
+            then integrate until t_1 >= t and return. ``relax`` is not
+            referenced if ``step=True``.
+            This parameter is provided in order to expose internals of
+            the implementation, and should not be changed from its default
+            value in most cases.
+
+        Returns
+        -------
+        y : float
+            The integrated value at t
+        """
+        if step and self._integrator.supports_step:
+            mth = self._integrator.step
+        elif relax and self._integrator.supports_run_relax:
+            mth = self._integrator.run_relax
+        else:
+            mth = self._integrator.run
+
+        try:
+            self._y, self.t = mth(self.f, self.jac or (lambda: None),
+                                  self._y, self.t, t,
+                                  self.f_params, self.jac_params)
+        except SystemError as e:
+            # f2py issue with tuple returns, see ticket 1187.
+            raise ValueError(
+                'Function to integrate must not return a tuple.'
+            ) from e
+
+        return self._y
+
+    def successful(self):
+        """Check if integration was successful."""
+        try:
+            self._integrator
+        except AttributeError:
+            self.set_integrator('')
+        return self._integrator.success == 1
+
+    def get_return_code(self):
+        """Extracts the return code for the integration to enable better control
+        if the integration fails.
+
+        In general, a return code > 0 implies success, while a return code < 0
+        implies failure.
+
+        Notes
+        -----
+        This section describes possible return codes and their meaning, for available
+        integrators that can be selected by `set_integrator` method.
+
+        "vode"
+
+        ===========  =======
+        Return Code  Message
+        ===========  =======
+        2            Integration successful.
+        -1           Excess work done on this call. (Perhaps wrong MF.)
+        -2           Excess accuracy requested. (Tolerances too small.)
+        -3           Illegal input detected. (See printed message.)
+        -4           Repeated error test failures. (Check all input.)
+        -5           Repeated convergence failures. (Perhaps bad Jacobian
+                     supplied or wrong choice of MF or tolerances.)
+        -6           Error weight became zero during problem. (Solution
+                     component i vanished, and ATOL or ATOL(i) = 0.)
+        ===========  =======
+
+        "zvode"
+
+        ===========  =======
+        Return Code  Message
+        ===========  =======
+        2            Integration successful.
+        -1           Excess work done on this call. (Perhaps wrong MF.)
+        -2           Excess accuracy requested. (Tolerances too small.)
+        -3           Illegal input detected. (See printed message.)
+        -4           Repeated error test failures. (Check all input.)
+        -5           Repeated convergence failures. (Perhaps bad Jacobian
+                     supplied or wrong choice of MF or tolerances.)
+        -6           Error weight became zero during problem. (Solution
+                     component i vanished, and ATOL or ATOL(i) = 0.)
+        ===========  =======
+
+        "dopri5"
+
+        ===========  =======
+        Return Code  Message
+        ===========  =======
+        1            Integration successful.
+        2            Integration successful (interrupted by solout).
+        -1           Input is not consistent.
+        -2           Larger nsteps is needed.
+        -3           Step size becomes too small.
+        -4           Problem is probably stiff (interrupted).
+        ===========  =======
+
+        "dop853"
+
+        ===========  =======
+        Return Code  Message
+        ===========  =======
+        1            Integration successful.
+        2            Integration successful (interrupted by solout).
+        -1           Input is not consistent.
+        -2           Larger nsteps is needed.
+        -3           Step size becomes too small.
+        -4           Problem is probably stiff (interrupted).
+        ===========  =======
+
+        "lsoda"
+
+        ===========  =======
+        Return Code  Message
+        ===========  =======
+        2            Integration successful.
+        -1           Excess work done on this call (perhaps wrong Dfun type).
+        -2           Excess accuracy requested (tolerances too small).
+        -3           Illegal input detected (internal error).
+        -4           Repeated error test failures (internal error).
+        -5           Repeated convergence failures (perhaps bad Jacobian or tolerances).
+        -6           Error weight became zero during problem.
+        -7           Internal workspace insufficient to finish (internal error).
+        ===========  =======
+        """
+        try:
+            self._integrator
+        except AttributeError:
+            self.set_integrator('')
+        return self._integrator.istate
+
+    def set_f_params(self, *args):
+        """Set extra parameters for user-supplied function f."""
+        self.f_params = args
+        return self
+
+    def set_jac_params(self, *args):
+        """Set extra parameters for user-supplied function jac."""
+        self.jac_params = args
+        return self
+
+    def set_solout(self, solout):
+        """
+        Set callable to be called at every successful integration step.
+
+        Parameters
+        ----------
+        solout : callable
+            ``solout(t, y)`` is called at each internal integrator step,
+            t is a scalar providing the current independent position
+            y is the current solution ``y.shape == (n,)``
+            solout should return -1 to stop integration
+            otherwise it should return None or 0
+
+        """
+        if self._integrator.supports_solout:
+            self._integrator.set_solout(solout)
+            if self._y is not None:
+                self._integrator.reset(len(self._y), self.jac is not None)
+        else:
+            raise ValueError("selected integrator does not support solout,"
+                             " choose another one")
+
+
+def _transform_banded_jac(bjac):
+    """
+    Convert a real matrix of the form (for example)
+
+        [0 0 A B]        [0 0 0 B]
+        [0 0 C D]        [0 0 A D]
+        [E F G H]   to   [0 F C H]
+        [I J K L]        [E J G L]
+                         [I 0 K 0]
+
+    That is, every other column is shifted up one.
+    """
+    # Shift every other column.
+    newjac = zeros((bjac.shape[0] + 1, bjac.shape[1]))
+    newjac[1:, ::2] = bjac[:, ::2]
+    newjac[:-1, 1::2] = bjac[:, 1::2]
+    return newjac
+
+
+class complex_ode(ode):
+    """
+    A wrapper of ode for complex systems.
+
+    This functions similarly as `ode`, but re-maps a complex-valued
+    equation system to a real-valued one before using the integrators.
+
+    Parameters
+    ----------
+    f : callable ``f(t, y, *f_args)``
+        Rhs of the equation. t is a scalar, ``y.shape == (n,)``.
+        ``f_args`` is set by calling ``set_f_params(*args)``.
+    jac : callable ``jac(t, y, *jac_args)``
+        Jacobian of the rhs, ``jac[i,j] = d f[i] / d y[j]``.
+        ``jac_args`` is set by calling ``set_f_params(*args)``.
+
+    Attributes
+    ----------
+    t : float
+        Current time.
+    y : ndarray
+        Current variable values.
+
+    Examples
+    --------
+    For usage examples, see `ode`.
+
+    """
+
+    def __init__(self, f, jac=None):
+        self.cf = f
+        self.cjac = jac
+        if jac is None:
+            ode.__init__(self, self._wrap, None)
+        else:
+            ode.__init__(self, self._wrap, self._wrap_jac)
+
+    def _wrap(self, t, y, *f_args):
+        f = self.cf(*((t, y[::2] + 1j * y[1::2]) + f_args))
+        # self.tmp is a real-valued array containing the interleaved
+        # real and imaginary parts of f.
+        self.tmp[::2] = real(f)
+        self.tmp[1::2] = imag(f)
+        return self.tmp
+
+    def _wrap_jac(self, t, y, *jac_args):
+        # jac is the complex Jacobian computed by the user-defined function.
+        jac = self.cjac(*((t, y[::2] + 1j * y[1::2]) + jac_args))
+
+        # jac_tmp is the real version of the complex Jacobian.  Each complex
+        # entry in jac, say 2+3j, becomes a 2x2 block of the form
+        #     [2 -3]
+        #     [3  2]
+        jac_tmp = zeros((2 * jac.shape[0], 2 * jac.shape[1]))
+        jac_tmp[1::2, 1::2] = jac_tmp[::2, ::2] = real(jac)
+        jac_tmp[1::2, ::2] = imag(jac)
+        jac_tmp[::2, 1::2] = -jac_tmp[1::2, ::2]
+
+        ml = getattr(self._integrator, 'ml', None)
+        mu = getattr(self._integrator, 'mu', None)
+        if ml is not None or mu is not None:
+            # Jacobian is banded.  The user's Jacobian function has computed
+            # the complex Jacobian in packed format.  The corresponding
+            # real-valued version has every other column shifted up.
+            jac_tmp = _transform_banded_jac(jac_tmp)
+
+        return jac_tmp
+
+    @property
+    def y(self):
+        return self._y[::2] + 1j * self._y[1::2]
+
+    def set_integrator(self, name, **integrator_params):
+        """
+        Set integrator by name.
+
+        Parameters
+        ----------
+        name : str
+            Name of the integrator
+        **integrator_params
+            Additional parameters for the integrator.
+        """
+        if name == 'zvode':
+            raise ValueError("zvode must be used with ode, not complex_ode")
+
+        lband = integrator_params.get('lband')
+        uband = integrator_params.get('uband')
+        if lband is not None or uband is not None:
+            # The Jacobian is banded.  Override the user-supplied bandwidths
+            # (which are for the complex Jacobian) with the bandwidths of
+            # the corresponding real-valued Jacobian wrapper of the complex
+            # Jacobian.
+            integrator_params['lband'] = 2 * (lband or 0) + 1
+            integrator_params['uband'] = 2 * (uband or 0) + 1
+
+        return ode.set_integrator(self, name, **integrator_params)
+
+    def set_initial_value(self, y, t=0.0):
+        """Set initial conditions y(t) = y."""
+        y = asarray(y)
+        self.tmp = zeros(y.size * 2, 'float')
+        self.tmp[::2] = real(y)
+        self.tmp[1::2] = imag(y)
+        return ode.set_initial_value(self, self.tmp, t)
+
+    def integrate(self, t, step=False, relax=False):
+        """Find y=y(t), set y as an initial condition, and return y.
+
+        Parameters
+        ----------
+        t : float
+            The endpoint of the integration step.
+        step : bool
+            If True, and if the integrator supports the step method,
+            then perform a single integration step and return.
+            This parameter is provided in order to expose internals of
+            the implementation, and should not be changed from its default
+            value in most cases.
+        relax : bool
+            If True and if the integrator supports the run_relax method,
+            then integrate until t_1 >= t and return. ``relax`` is not
+            referenced if ``step=True``.
+            This parameter is provided in order to expose internals of
+            the implementation, and should not be changed from its default
+            value in most cases.
+
+        Returns
+        -------
+        y : float
+            The integrated value at t
+        """
+        y = ode.integrate(self, t, step, relax)
+        return y[::2] + 1j * y[1::2]
+
+    def set_solout(self, solout):
+        """
+        Set callable to be called at every successful integration step.
+
+        Parameters
+        ----------
+        solout : callable
+            ``solout(t, y)`` is called at each internal integrator step,
+            t is a scalar providing the current independent position
+            y is the current solution ``y.shape == (n,)``
+            solout should return -1 to stop integration
+            otherwise it should return None or 0
+
+        """
+        if self._integrator.supports_solout:
+            self._integrator.set_solout(solout, complex=True)
+        else:
+            raise TypeError("selected integrator does not support solouta, "
+                            "choose another one")
+
+
+# ------------------------------------------------------------------------------
+# ODE integrators
+# ------------------------------------------------------------------------------
+
+def find_integrator(name):
+    for cl in IntegratorBase.integrator_classes:
+        if re.match(name, cl.__name__, re.I):
+            return cl
+    return None
+
+
+class IntegratorConcurrencyError(RuntimeError):
+    """
+    Failure due to concurrent usage of an integrator that can be used
+    only for a single problem at a time.
+
+    """
+
+    def __init__(self, name):
+        msg = (f"Integrator `{name}` can be used to solve only a single problem "
+                "at a time. If you want to integrate multiple problems, "
+                "consider using a different integrator (see `ode.set_integrator`)")
+        RuntimeError.__init__(self, msg)
+
+
+class IntegratorBase:
+    runner = None  # runner is None => integrator is not available
+    success = None  # success==1 if integrator was called successfully
+    istate = None  # istate > 0 means success, istate < 0 means failure
+    supports_run_relax = None
+    supports_step = None
+    supports_solout = False
+    integrator_classes = []
+    scalar = float
+
+    def acquire_new_handle(self):
+        # Some of the integrators have internal state (ancient
+        # Fortran...), and so only one instance can use them at a time.
+        # We keep track of this, and fail when concurrent usage is tried.
+        self.__class__.active_global_handle += 1
+        self.handle = self.__class__.active_global_handle
+
+    def check_handle(self):
+        if self.handle is not self.__class__.active_global_handle:
+            raise IntegratorConcurrencyError(self.__class__.__name__)
+
+    def reset(self, n, has_jac):
+        """Prepare integrator for call: allocate memory, set flags, etc.
+        n - number of equations.
+        has_jac - if user has supplied function for evaluating Jacobian.
+        """
+
+    def run(self, f, jac, y0, t0, t1, f_params, jac_params):
+        """Integrate from t=t0 to t=t1 using y0 as an initial condition.
+        Return 2-tuple (y1,t1) where y1 is the result and t=t1
+        defines the stoppage coordinate of the result.
+        """
+        raise NotImplementedError('all integrators must define '
+                                  'run(f, jac, t0, t1, y0, f_params, jac_params)')
+
+    def step(self, f, jac, y0, t0, t1, f_params, jac_params):
+        """Make one integration step and return (y1,t1)."""
+        raise NotImplementedError(f'{self.__class__.__name__} '
+                                  'does not support step() method')
+
+    def run_relax(self, f, jac, y0, t0, t1, f_params, jac_params):
+        """Integrate from t=t0 to t>=t1 and return (y1,t)."""
+        raise NotImplementedError(f'{self.__class__.__name__} '
+                                  'does not support run_relax() method')
+
+    # XXX: __str__ method for getting visual state of the integrator
+
+
+def _vode_banded_jac_wrapper(jacfunc, ml, jac_params):
+    """
+    Wrap a banded Jacobian function with a function that pads
+    the Jacobian with `ml` rows of zeros.
+    """
+
+    def jac_wrapper(t, y):
+        jac = asarray(jacfunc(t, y, *jac_params))
+        padded_jac = vstack((jac, zeros((ml, jac.shape[1]))))
+        return padded_jac
+
+    return jac_wrapper
+
+
+class vode(IntegratorBase):
+    runner = getattr(_vode, 'dvode', None)
+
+    messages = {-1: 'Excess work done on this call. (Perhaps wrong MF.)',
+                -2: 'Excess accuracy requested. (Tolerances too small.)',
+                -3: 'Illegal input detected. (See printed message.)',
+                -4: 'Repeated error test failures. (Check all input.)',
+                -5: 'Repeated convergence failures. (Perhaps bad'
+                    ' Jacobian supplied or wrong choice of MF or tolerances.)',
+                -6: 'Error weight became zero during problem. (Solution'
+                    ' component i vanished, and ATOL or ATOL(i) = 0.)'
+                }
+    supports_run_relax = 1
+    supports_step = 1
+    active_global_handle = 0
+
+    def __init__(self,
+                 method='adams',
+                 with_jacobian=False,
+                 rtol=1e-6, atol=1e-12,
+                 lband=None, uband=None,
+                 order=12,
+                 nsteps=500,
+                 max_step=0.0,  # corresponds to infinite
+                 min_step=0.0,
+                 first_step=0.0,  # determined by solver
+                 ):
+
+        if re.match(method, r'adams', re.I):
+            self.meth = 1
+        elif re.match(method, r'bdf', re.I):
+            self.meth = 2
+        else:
+            raise ValueError(f'Unknown integration method {method}')
+        self.with_jacobian = with_jacobian
+        self.rtol = rtol
+        self.atol = atol
+        self.mu = uband
+        self.ml = lband
+
+        self.order = order
+        self.nsteps = nsteps
+        self.max_step = max_step
+        self.min_step = min_step
+        self.first_step = first_step
+        self.success = 1
+
+        self.initialized = False
+
+    def _determine_mf_and_set_bands(self, has_jac):
+        """
+        Determine the `MF` parameter (Method Flag) for the Fortran subroutine `dvode`.
+
+        In the Fortran code, the legal values of `MF` are:
+            10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25,
+            -11, -12, -14, -15, -21, -22, -24, -25
+        but this Python wrapper does not use negative values.
+
+        Returns
+
+            mf  = 10*self.meth + miter
+
+        self.meth is the linear multistep method:
+            self.meth == 1:  method="adams"
+            self.meth == 2:  method="bdf"
+
+        miter is the correction iteration method:
+            miter == 0:  Functional iteration; no Jacobian involved.
+            miter == 1:  Chord iteration with user-supplied full Jacobian.
+            miter == 2:  Chord iteration with internally computed full Jacobian.
+            miter == 3:  Chord iteration with internally computed diagonal Jacobian.
+            miter == 4:  Chord iteration with user-supplied banded Jacobian.
+            miter == 5:  Chord iteration with internally computed banded Jacobian.
+
+        Side effects: If either self.mu or self.ml is not None and the other is None,
+        then the one that is None is set to 0.
+        """
+
+        jac_is_banded = self.mu is not None or self.ml is not None
+        if jac_is_banded:
+            if self.mu is None:
+                self.mu = 0
+            if self.ml is None:
+                self.ml = 0
+
+        # has_jac is True if the user provided a Jacobian function.
+        if has_jac:
+            if jac_is_banded:
+                miter = 4
+            else:
+                miter = 1
+        else:
+            if jac_is_banded:
+                if self.ml == self.mu == 0:
+                    miter = 3  # Chord iteration with internal diagonal Jacobian.
+                else:
+                    miter = 5  # Chord iteration with internal banded Jacobian.
+            else:
+                # self.with_jacobian is set by the user in
+                # the call to ode.set_integrator.
+                if self.with_jacobian:
+                    miter = 2  # Chord iteration with internal full Jacobian.
+                else:
+                    miter = 0  # Functional iteration; no Jacobian involved.
+
+        mf = 10 * self.meth + miter
+        return mf
+
+    def reset(self, n, has_jac):
+        mf = self._determine_mf_and_set_bands(has_jac)
+
+        if mf == 10:
+            lrw = 20 + 16 * n
+        elif mf in [11, 12]:
+            lrw = 22 + 16 * n + 2 * n * n
+        elif mf == 13:
+            lrw = 22 + 17 * n
+        elif mf in [14, 15]:
+            lrw = 22 + 18 * n + (3 * self.ml + 2 * self.mu) * n
+        elif mf == 20:
+            lrw = 20 + 9 * n
+        elif mf in [21, 22]:
+            lrw = 22 + 9 * n + 2 * n * n
+        elif mf == 23:
+            lrw = 22 + 10 * n
+        elif mf in [24, 25]:
+            lrw = 22 + 11 * n + (3 * self.ml + 2 * self.mu) * n
+        else:
+            raise ValueError(f'Unexpected mf={mf}')
+
+        if mf % 10 in [0, 3]:
+            liw = 30
+        else:
+            liw = 30 + n
+
+        rwork = zeros((lrw,), float)
+        rwork[4] = self.first_step
+        rwork[5] = self.max_step
+        rwork[6] = self.min_step
+        self.rwork = rwork
+
+        iwork = zeros((liw,), _vode_int_dtype)
+        if self.ml is not None:
+            iwork[0] = self.ml
+        if self.mu is not None:
+            iwork[1] = self.mu
+        iwork[4] = self.order
+        iwork[5] = self.nsteps
+        iwork[6] = 2  # mxhnil
+        self.iwork = iwork
+
+        self.call_args = [self.rtol, self.atol, 1, 1,
+                          self.rwork, self.iwork, mf]
+        self.success = 1
+        self.initialized = False
+
+    def run(self, f, jac, y0, t0, t1, f_params, jac_params):
+        if self.initialized:
+            self.check_handle()
+        else:
+            self.initialized = True
+            self.acquire_new_handle()
+
+        if self.ml is not None and self.ml > 0:
+            # Banded Jacobian. Wrap the user-provided function with one
+            # that pads the Jacobian array with the extra `self.ml` rows
+            # required by the f2py-generated wrapper.
+            jac = _vode_banded_jac_wrapper(jac, self.ml, jac_params)
+
+        args = ((f, jac, y0, t0, t1) + tuple(self.call_args) +
+                (f_params, jac_params))
+
+        with VODE_LOCK:
+            y1, t, istate = self.runner(*args)
+
+        self.istate = istate
+        if istate < 0:
+            unexpected_istate_msg = f'Unexpected istate={istate:d}'
+            warnings.warn(f'{self.__class__.__name__:s}: '
+                          f'{self.messages.get(istate, unexpected_istate_msg):s}',
+                          stacklevel=2)
+            self.success = 0
+        else:
+            self.call_args[3] = 2  # upgrade istate from 1 to 2
+            self.istate = 2
+        return y1, t
+
+    def step(self, *args):
+        itask = self.call_args[2]
+        self.call_args[2] = 2
+        r = self.run(*args)
+        self.call_args[2] = itask
+        return r
+
+    def run_relax(self, *args):
+        itask = self.call_args[2]
+        self.call_args[2] = 3
+        r = self.run(*args)
+        self.call_args[2] = itask
+        return r
+
+
+if vode.runner is not None:
+    IntegratorBase.integrator_classes.append(vode)
+
+
+class zvode(vode):
+    runner = getattr(_vode, 'zvode', None)
+
+    supports_run_relax = 1
+    supports_step = 1
+    scalar = complex
+    active_global_handle = 0
+
+    def reset(self, n, has_jac):
+        mf = self._determine_mf_and_set_bands(has_jac)
+
+        if mf in (10,):
+            lzw = 15 * n
+        elif mf in (11, 12):
+            lzw = 15 * n + 2 * n ** 2
+        elif mf in (-11, -12):
+            lzw = 15 * n + n ** 2
+        elif mf in (13,):
+            lzw = 16 * n
+        elif mf in (14, 15):
+            lzw = 17 * n + (3 * self.ml + 2 * self.mu) * n
+        elif mf in (-14, -15):
+            lzw = 16 * n + (2 * self.ml + self.mu) * n
+        elif mf in (20,):
+            lzw = 8 * n
+        elif mf in (21, 22):
+            lzw = 8 * n + 2 * n ** 2
+        elif mf in (-21, -22):
+            lzw = 8 * n + n ** 2
+        elif mf in (23,):
+            lzw = 9 * n
+        elif mf in (24, 25):
+            lzw = 10 * n + (3 * self.ml + 2 * self.mu) * n
+        elif mf in (-24, -25):
+            lzw = 9 * n + (2 * self.ml + self.mu) * n
+
+        lrw = 20 + n
+
+        if mf % 10 in (0, 3):
+            liw = 30
+        else:
+            liw = 30 + n
+
+        zwork = zeros((lzw,), complex)
+        self.zwork = zwork
+
+        rwork = zeros((lrw,), float)
+        rwork[4] = self.first_step
+        rwork[5] = self.max_step
+        rwork[6] = self.min_step
+        self.rwork = rwork
+
+        iwork = zeros((liw,), _vode_int_dtype)
+        if self.ml is not None:
+            iwork[0] = self.ml
+        if self.mu is not None:
+            iwork[1] = self.mu
+        iwork[4] = self.order
+        iwork[5] = self.nsteps
+        iwork[6] = 2  # mxhnil
+        self.iwork = iwork
+
+        self.call_args = [self.rtol, self.atol, 1, 1,
+                          self.zwork, self.rwork, self.iwork, mf]
+        self.success = 1
+        self.initialized = False
+
+
+if zvode.runner is not None:
+    IntegratorBase.integrator_classes.append(zvode)
+
+
+class dopri5(IntegratorBase):
+    runner = getattr(_dop, 'dopri5', None)
+    name = 'dopri5'
+    supports_solout = True
+
+    messages = {1: 'computation successful',
+                2: 'computation successful (interrupted by solout)',
+                -1: 'input is not consistent',
+                -2: 'larger nsteps is needed',
+                -3: 'step size becomes too small',
+                -4: 'problem is probably stiff (interrupted)',
+                }
+
+    def __init__(self,
+                 rtol=1e-6, atol=1e-12,
+                 nsteps=500,
+                 max_step=0.0,
+                 first_step=0.0,  # determined by solver
+                 safety=0.9,
+                 ifactor=10.0,
+                 dfactor=0.2,
+                 beta=0.0,
+                 method=None,
+                 verbosity=-1,  # no messages if negative
+                 ):
+        self.rtol = rtol
+        self.atol = atol
+        self.nsteps = nsteps
+        self.max_step = max_step
+        self.first_step = first_step
+        self.safety = safety
+        self.ifactor = ifactor
+        self.dfactor = dfactor
+        self.beta = beta
+        self.verbosity = verbosity
+        self.success = 1
+        self.set_solout(None)
+
+    def set_solout(self, solout, complex=False):
+        self.solout = solout
+        self.solout_cmplx = complex
+        if solout is None:
+            self.iout = 0
+        else:
+            self.iout = 1
+
+    def reset(self, n, has_jac):
+        work = zeros((8 * n + 21,), float)
+        work[1] = self.safety
+        work[2] = self.dfactor
+        work[3] = self.ifactor
+        work[4] = self.beta
+        work[5] = self.max_step
+        work[6] = self.first_step
+        self.work = work
+        iwork = zeros((21,), _dop_int_dtype)
+        iwork[0] = self.nsteps
+        iwork[2] = self.verbosity
+        self.iwork = iwork
+        self.call_args = [self.rtol, self.atol, self._solout,
+                          self.iout, self.work, self.iwork]
+        self.success = 1
+
+    def run(self, f, jac, y0, t0, t1, f_params, jac_params):
+        x, y, iwork, istate = self.runner(*((f, t0, y0, t1) +
+                                          tuple(self.call_args) + (f_params,)))
+        self.istate = istate
+        if istate < 0:
+            unexpected_istate_msg = f'Unexpected istate={istate:d}'
+            warnings.warn(f'{self.__class__.__name__:s}: '
+                          f'{self.messages.get(istate, unexpected_istate_msg):s}',
+                          stacklevel=2)
+            self.success = 0
+        return y, x
+
+    def _solout(self, nr, xold, x, y, nd, icomp, con):
+        if self.solout is not None:
+            if self.solout_cmplx:
+                y = y[::2] + 1j * y[1::2]
+            return self.solout(x, y)
+        else:
+            return 1
+
+
+if dopri5.runner is not None:
+    IntegratorBase.integrator_classes.append(dopri5)
+
+
+class dop853(dopri5):
+    runner = getattr(_dop, 'dop853', None)
+    name = 'dop853'
+
+    def __init__(self,
+                 rtol=1e-6, atol=1e-12,
+                 nsteps=500,
+                 max_step=0.0,
+                 first_step=0.0,  # determined by solver
+                 safety=0.9,
+                 ifactor=6.0,
+                 dfactor=0.3,
+                 beta=0.0,
+                 method=None,
+                 verbosity=-1,  # no messages if negative
+                 ):
+        super().__init__(rtol, atol, nsteps, max_step, first_step, safety,
+                         ifactor, dfactor, beta, method, verbosity)
+
+    def reset(self, n, has_jac):
+        work = zeros((11 * n + 21,), float)
+        work[1] = self.safety
+        work[2] = self.dfactor
+        work[3] = self.ifactor
+        work[4] = self.beta
+        work[5] = self.max_step
+        work[6] = self.first_step
+        self.work = work
+        iwork = zeros((21,), _dop_int_dtype)
+        iwork[0] = self.nsteps
+        iwork[2] = self.verbosity
+        self.iwork = iwork
+        self.call_args = [self.rtol, self.atol, self._solout,
+                          self.iout, self.work, self.iwork]
+        self.success = 1
+
+
+if dop853.runner is not None:
+    IntegratorBase.integrator_classes.append(dop853)
+
+
+class lsoda(IntegratorBase):
+    runner = getattr(_lsoda, 'lsoda', None)
+    active_global_handle = 0
+
+    messages = {
+        2: "Integration successful.",
+        -1: "Excess work done on this call (perhaps wrong Dfun type).",
+        -2: "Excess accuracy requested (tolerances too small).",
+        -3: "Illegal input detected (internal error).",
+        -4: "Repeated error test failures (internal error).",
+        -5: "Repeated convergence failures (perhaps bad Jacobian or tolerances).",
+        -6: "Error weight became zero during problem.",
+        -7: "Internal workspace insufficient to finish (internal error)."
+    }
+
+    def __init__(self,
+                 with_jacobian=False,
+                 rtol=1e-6, atol=1e-12,
+                 lband=None, uband=None,
+                 nsteps=500,
+                 max_step=0.0,  # corresponds to infinite
+                 min_step=0.0,
+                 first_step=0.0,  # determined by solver
+                 ixpr=0,
+                 max_hnil=0,
+                 max_order_ns=12,
+                 max_order_s=5,
+                 method=None
+                 ):
+
+        self.with_jacobian = with_jacobian
+        self.rtol = rtol
+        self.atol = atol
+        self.mu = uband
+        self.ml = lband
+
+        self.max_order_ns = max_order_ns
+        self.max_order_s = max_order_s
+        self.nsteps = nsteps
+        self.max_step = max_step
+        self.min_step = min_step
+        self.first_step = first_step
+        self.ixpr = ixpr
+        self.max_hnil = max_hnil
+        self.success = 1
+
+        self.initialized = False
+
+    def reset(self, n, has_jac):
+        # Calculate parameters for Fortran subroutine dvode.
+        if has_jac:
+            if self.mu is None and self.ml is None:
+                jt = 1
+            else:
+                if self.mu is None:
+                    self.mu = 0
+                if self.ml is None:
+                    self.ml = 0
+                jt = 4
+        else:
+            if self.mu is None and self.ml is None:
+                jt = 2
+            else:
+                if self.mu is None:
+                    self.mu = 0
+                if self.ml is None:
+                    self.ml = 0
+                jt = 5
+        lrn = 20 + (self.max_order_ns + 4) * n
+        if jt in [1, 2]:
+            lrs = 22 + (self.max_order_s + 4) * n + n * n
+        elif jt in [4, 5]:
+            lrs = 22 + (self.max_order_s + 5 + 2 * self.ml + self.mu) * n
+        else:
+            raise ValueError(f'Unexpected jt={jt}')
+        lrw = max(lrn, lrs)
+        liw = 20 + n
+        rwork = zeros((lrw,), float)
+        rwork[4] = self.first_step
+        rwork[5] = self.max_step
+        rwork[6] = self.min_step
+        self.rwork = rwork
+        iwork = zeros((liw,), _lsoda_int_dtype)
+        if self.ml is not None:
+            iwork[0] = self.ml
+        if self.mu is not None:
+            iwork[1] = self.mu
+        iwork[4] = self.ixpr
+        iwork[5] = self.nsteps
+        iwork[6] = self.max_hnil
+        iwork[7] = self.max_order_ns
+        iwork[8] = self.max_order_s
+        self.iwork = iwork
+        self.call_args = [self.rtol, self.atol, 1, 1,
+                          self.rwork, self.iwork, jt]
+        self.success = 1
+        self.initialized = False
+
+    def run(self, f, jac, y0, t0, t1, f_params, jac_params):
+        if self.initialized:
+            self.check_handle()
+        else:
+            self.initialized = True
+            self.acquire_new_handle()
+        args = [f, y0, t0, t1] + self.call_args[:-1] + \
+               [jac, self.call_args[-1], f_params, 0, jac_params]
+
+        with LSODA_LOCK:
+            y1, t, istate = self.runner(*args)
+
+        self.istate = istate
+        if istate < 0:
+            unexpected_istate_msg = f'Unexpected istate={istate:d}'
+            warnings.warn(f'{self.__class__.__name__:s}: '
+                          f'{self.messages.get(istate, unexpected_istate_msg):s}',
+                          stacklevel=2)
+            self.success = 0
+        else:
+            self.call_args[3] = 2  # upgrade istate from 1 to 2
+            self.istate = 2
+        return y1, t
+
+    def step(self, *args):
+        itask = self.call_args[2]
+        self.call_args[2] = 2
+        r = self.run(*args)
+        self.call_args[2] = itask
+        return r
+
+    def run_relax(self, *args):
+        itask = self.call_args[2]
+        self.call_args[2] = 3
+        r = self.run(*args)
+        self.call_args[2] = itask
+        return r
+
+
+if lsoda.runner:
+    IntegratorBase.integrator_classes.append(lsoda)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_odepack_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_odepack_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..75dfe925b312ae609d19ccbec27927c6c945176f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_odepack_py.py
@@ -0,0 +1,273 @@
+# Author: Travis Oliphant
+
+__all__ = ['odeint', 'ODEintWarning']
+
+import numpy as np
+from . import _odepack
+from copy import copy
+import warnings
+
+from threading import Lock
+
+
+ODE_LOCK = Lock()
+
+
+class ODEintWarning(Warning):
+    """Warning raised during the execution of `odeint`."""
+    pass
+
+
+_msgs = {2: "Integration successful.",
+         1: "Nothing was done; the integration time was 0.",
+         -1: "Excess work done on this call (perhaps wrong Dfun type).",
+         -2: "Excess accuracy requested (tolerances too small).",
+         -3: "Illegal input detected (internal error).",
+         -4: "Repeated error test failures (internal error).",
+         -5: "Repeated convergence failures (perhaps bad Jacobian or tolerances).",
+         -6: "Error weight became zero during problem.",
+         -7: "Internal workspace insufficient to finish (internal error).",
+         -8: "Run terminated (internal error)."
+         }
+
+
+def odeint(func, y0, t, args=(), Dfun=None, col_deriv=0, full_output=0,
+           ml=None, mu=None, rtol=None, atol=None, tcrit=None, h0=0.0,
+           hmax=0.0, hmin=0.0, ixpr=0, mxstep=0, mxhnil=0, mxordn=12,
+           mxords=5, printmessg=0, tfirst=False):
+    """
+    Integrate a system of ordinary differential equations.
+
+    .. note:: For new code, use `scipy.integrate.solve_ivp` to solve a
+              differential equation.
+
+    Solve a system of ordinary differential equations using lsoda from the
+    FORTRAN library odepack.
+
+    Solves the initial value problem for stiff or non-stiff systems
+    of first order ode-s::
+
+        dy/dt = func(y, t, ...)  [or func(t, y, ...)]
+
+    where y can be a vector.
+
+    .. note:: By default, the required order of the first two arguments of
+              `func` are in the opposite order of the arguments in the system
+              definition function used by the `scipy.integrate.ode` class and
+              the function `scipy.integrate.solve_ivp`. To use a function with
+              the signature ``func(t, y, ...)``, the argument `tfirst` must be
+              set to ``True``.
+
+    Parameters
+    ----------
+    func : callable(y, t, ...) or callable(t, y, ...)
+        Computes the derivative of y at t.
+        If the signature is ``callable(t, y, ...)``, then the argument
+        `tfirst` must be set ``True``.
+        `func` must not modify the data in `y`, as it is a
+        view of the data used internally by the ODE solver.
+    y0 : array
+        Initial condition on y (can be a vector).
+    t : array
+        A sequence of time points for which to solve for y. The initial
+        value point should be the first element of this sequence.
+        This sequence must be monotonically increasing or monotonically
+        decreasing; repeated values are allowed.
+    args : tuple, optional
+        Extra arguments to pass to function.
+    Dfun : callable(y, t, ...) or callable(t, y, ...)
+        Gradient (Jacobian) of `func`.
+        If the signature is ``callable(t, y, ...)``, then the argument
+        `tfirst` must be set ``True``.
+        `Dfun` must not modify the data in `y`, as it is a
+        view of the data used internally by the ODE solver.
+    col_deriv : bool, optional
+        True if `Dfun` defines derivatives down columns (faster),
+        otherwise `Dfun` should define derivatives across rows.
+    full_output : bool, optional
+        True if to return a dictionary of optional outputs as the second output
+    printmessg : bool, optional
+        Whether to print the convergence message
+    tfirst : bool, optional
+        If True, the first two arguments of `func` (and `Dfun`, if given)
+        must ``t, y`` instead of the default ``y, t``.
+
+        .. versionadded:: 1.1.0
+
+    Returns
+    -------
+    y : array, shape (len(t), len(y0))
+        Array containing the value of y for each desired time in t,
+        with the initial value `y0` in the first row.
+    infodict : dict, only returned if full_output == True
+        Dictionary containing additional output information
+
+        =======  ============================================================
+        key      meaning
+        =======  ============================================================
+        'hu'     vector of step sizes successfully used for each time step
+        'tcur'   vector with the value of t reached for each time step
+                 (will always be at least as large as the input times)
+        'tolsf'  vector of tolerance scale factors, greater than 1.0,
+                 computed when a request for too much accuracy was detected
+        'tsw'    value of t at the time of the last method switch
+                 (given for each time step)
+        'nst'    cumulative number of time steps
+        'nfe'    cumulative number of function evaluations for each time step
+        'nje'    cumulative number of jacobian evaluations for each time step
+        'nqu'    a vector of method orders for each successful step
+        'imxer'  index of the component of largest magnitude in the
+                 weighted local error vector (e / ewt) on an error return, -1
+                 otherwise
+        'lenrw'  the length of the double work array required
+        'leniw'  the length of integer work array required
+        'mused'  a vector of method indicators for each successful time step:
+                 1: adams (nonstiff), 2: bdf (stiff)
+        =======  ============================================================
+
+    Other Parameters
+    ----------------
+    ml, mu : int, optional
+        If either of these are not None or non-negative, then the
+        Jacobian is assumed to be banded. These give the number of
+        lower and upper non-zero diagonals in this banded matrix.
+        For the banded case, `Dfun` should return a matrix whose
+        rows contain the non-zero bands (starting with the lowest diagonal).
+        Thus, the return matrix `jac` from `Dfun` should have shape
+        ``(ml + mu + 1, len(y0))`` when ``ml >=0`` or ``mu >=0``.
+        The data in `jac` must be stored such that ``jac[i - j + mu, j]``
+        holds the derivative of the ``i``\\ th equation with respect to the
+        ``j``\\ th state variable.  If `col_deriv` is True, the transpose of
+        this `jac` must be returned.
+    rtol, atol : float, optional
+        The input parameters `rtol` and `atol` determine the error
+        control performed by the solver.  The solver will control the
+        vector, e, of estimated local errors in y, according to an
+        inequality of the form ``max-norm of (e / ewt) <= 1``,
+        where ewt is a vector of positive error weights computed as
+        ``ewt = rtol * abs(y) + atol``.
+        rtol and atol can be either vectors the same length as y or scalars.
+        Defaults to 1.49012e-8.
+    tcrit : ndarray, optional
+        Vector of critical points (e.g., singularities) where integration
+        care should be taken.
+    h0 : float, (0: solver-determined), optional
+        The step size to be attempted on the first step.
+    hmax : float, (0: solver-determined), optional
+        The maximum absolute step size allowed.
+    hmin : float, (0: solver-determined), optional
+        The minimum absolute step size allowed.
+    ixpr : bool, optional
+        Whether to generate extra printing at method switches.
+    mxstep : int, (0: solver-determined), optional
+        Maximum number of (internally defined) steps allowed for each
+        integration point in t.
+    mxhnil : int, (0: solver-determined), optional
+        Maximum number of messages printed.
+    mxordn : int, (0: solver-determined), optional
+        Maximum order to be allowed for the non-stiff (Adams) method.
+    mxords : int, (0: solver-determined), optional
+        Maximum order to be allowed for the stiff (BDF) method.
+
+    See Also
+    --------
+    solve_ivp : solve an initial value problem for a system of ODEs
+    ode : a more object-oriented integrator based on VODE
+    quad : for finding the area under a curve
+
+    Examples
+    --------
+    The second order differential equation for the angle `theta` of a
+    pendulum acted on by gravity with friction can be written::
+
+        theta''(t) + b*theta'(t) + c*sin(theta(t)) = 0
+
+    where `b` and `c` are positive constants, and a prime (') denotes a
+    derivative. To solve this equation with `odeint`, we must first convert
+    it to a system of first order equations. By defining the angular
+    velocity ``omega(t) = theta'(t)``, we obtain the system::
+
+        theta'(t) = omega(t)
+        omega'(t) = -b*omega(t) - c*sin(theta(t))
+
+    Let `y` be the vector [`theta`, `omega`]. We implement this system
+    in Python as:
+
+    >>> import numpy as np
+    >>> def pend(y, t, b, c):
+    ...     theta, omega = y
+    ...     dydt = [omega, -b*omega - c*np.sin(theta)]
+    ...     return dydt
+    ...
+
+    We assume the constants are `b` = 0.25 and `c` = 5.0:
+
+    >>> b = 0.25
+    >>> c = 5.0
+
+    For initial conditions, we assume the pendulum is nearly vertical
+    with `theta(0)` = `pi` - 0.1, and is initially at rest, so
+    `omega(0)` = 0.  Then the vector of initial conditions is
+
+    >>> y0 = [np.pi - 0.1, 0.0]
+
+    We will generate a solution at 101 evenly spaced samples in the interval
+    0 <= `t` <= 10.  So our array of times is:
+
+    >>> t = np.linspace(0, 10, 101)
+
+    Call `odeint` to generate the solution. To pass the parameters
+    `b` and `c` to `pend`, we give them to `odeint` using the `args`
+    argument.
+
+    >>> from scipy.integrate import odeint
+    >>> sol = odeint(pend, y0, t, args=(b, c))
+
+    The solution is an array with shape (101, 2). The first column
+    is `theta(t)`, and the second is `omega(t)`. The following code
+    plots both components.
+
+    >>> import matplotlib.pyplot as plt
+    >>> plt.plot(t, sol[:, 0], 'b', label='theta(t)')
+    >>> plt.plot(t, sol[:, 1], 'g', label='omega(t)')
+    >>> plt.legend(loc='best')
+    >>> plt.xlabel('t')
+    >>> plt.grid()
+    >>> plt.show()
+    """
+
+    if ml is None:
+        ml = -1  # changed to zero inside function call
+    if mu is None:
+        mu = -1  # changed to zero inside function call
+
+    dt = np.diff(t)
+    if not ((dt >= 0).all() or (dt <= 0).all()):
+        raise ValueError("The values in t must be monotonically increasing "
+                         "or monotonically decreasing; repeated values are "
+                         "allowed.")
+
+    t = copy(t)
+    y0 = copy(y0)
+
+    with ODE_LOCK:
+        output = _odepack.odeint(func, y0, t, args, Dfun, col_deriv, ml, mu,
+                                full_output, rtol, atol, tcrit, h0, hmax, hmin,
+                                ixpr, mxstep, mxhnil, mxordn, mxords,
+                                int(bool(tfirst)))
+    if output[-1] < 0:
+        warning_msg = (f"{_msgs[output[-1]]} Run with full_output = 1 to "
+                       f"get quantitative information.")
+        warnings.warn(warning_msg, ODEintWarning, stacklevel=2)
+    elif printmessg:
+        warning_msg = _msgs[output[-1]]
+        warnings.warn(warning_msg, ODEintWarning, stacklevel=2)
+
+    if full_output:
+        output[1]['message'] = _msgs[output[-1]]
+
+    output = output[:-1]
+    if len(output) == 1:
+        return output[0]
+    else:
+        return output
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quad_vec.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quad_vec.py
new file mode 100644
index 0000000000000000000000000000000000000000..758bac5138777dbe152c2b455b5160196d2282ca
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quad_vec.py
@@ -0,0 +1,682 @@
+import sys
+import copy
+import heapq
+import collections
+import functools
+import warnings
+
+import numpy as np
+
+from scipy._lib._util import MapWrapper, _FunctionWrapper
+
+
+class LRUDict(collections.OrderedDict):
+    def __init__(self, max_size):
+        self.__max_size = max_size
+
+    def __setitem__(self, key, value):
+        existing_key = (key in self)
+        super().__setitem__(key, value)
+        if existing_key:
+            self.move_to_end(key)
+        elif len(self) > self.__max_size:
+            self.popitem(last=False)
+
+    def update(self, other):
+        # Not needed below
+        raise NotImplementedError()
+
+
+class SemiInfiniteFunc:
+    """
+    Argument transform from (start, +-oo) to (0, 1)
+    """
+    def __init__(self, func, start, infty):
+        self._func = func
+        self._start = start
+        self._sgn = -1 if infty < 0 else 1
+
+        # Overflow threshold for the 1/t**2 factor
+        self._tmin = sys.float_info.min**0.5
+
+    def get_t(self, x):
+        z = self._sgn * (x - self._start) + 1
+        if z == 0:
+            # Can happen only if point not in range
+            return np.inf
+        return 1 / z
+
+    def __call__(self, t):
+        if t < self._tmin:
+            return 0.0
+        else:
+            x = self._start + self._sgn * (1 - t) / t
+            f = self._func(x)
+            return self._sgn * (f / t) / t
+
+
+class DoubleInfiniteFunc:
+    """
+    Argument transform from (-oo, oo) to (-1, 1)
+    """
+    def __init__(self, func):
+        self._func = func
+
+        # Overflow threshold for the 1/t**2 factor
+        self._tmin = sys.float_info.min**0.5
+
+    def get_t(self, x):
+        s = -1 if x < 0 else 1
+        return s / (abs(x) + 1)
+
+    def __call__(self, t):
+        if abs(t) < self._tmin:
+            return 0.0
+        else:
+            x = (1 - abs(t)) / t
+            f = self._func(x)
+            return (f / t) / t
+
+
+def _max_norm(x):
+    return np.amax(abs(x))
+
+
+def _get_sizeof(obj):
+    try:
+        return sys.getsizeof(obj)
+    except TypeError:
+        # occurs on pypy
+        if hasattr(obj, '__sizeof__'):
+            return int(obj.__sizeof__())
+        return 64
+
+
+class _Bunch:
+    def __init__(self, **kwargs):
+        self.__keys = kwargs.keys()
+        self.__dict__.update(**kwargs)
+
+    def __repr__(self):
+        key_value_pairs = ', '.join(
+            f'{k}={repr(self.__dict__[k])}' for k in self.__keys
+        )
+        return f"_Bunch({key_value_pairs})"
+
+
+def quad_vec(f, a, b, epsabs=1e-200, epsrel=1e-8, norm='2', cache_size=100e6,
+             limit=10000, workers=1, points=None, quadrature=None, full_output=False,
+             *, args=()):
+    r"""Adaptive integration of a vector-valued function.
+
+    Parameters
+    ----------
+    f : callable
+        Vector-valued function f(x) to integrate.
+    a : float
+        Initial point.
+    b : float
+        Final point.
+    epsabs : float, optional
+        Absolute tolerance.
+    epsrel : float, optional
+        Relative tolerance.
+    norm : {'max', '2'}, optional
+        Vector norm to use for error estimation.
+    cache_size : int, optional
+        Number of bytes to use for memoization.
+    limit : float or int, optional
+        An upper bound on the number of subintervals used in the adaptive
+        algorithm.
+    workers : int or map-like callable, optional
+        If `workers` is an integer, part of the computation is done in
+        parallel subdivided to this many tasks (using
+        :class:`python:multiprocessing.pool.Pool`).
+        Supply `-1` to use all cores available to the Process.
+        Alternatively, supply a map-like callable, such as
+        :meth:`python:multiprocessing.pool.Pool.map` for evaluating the
+        population in parallel.
+        This evaluation is carried out as ``workers(func, iterable)``.
+    points : list, optional
+        List of additional breakpoints.
+    quadrature : {'gk21', 'gk15', 'trapezoid'}, optional
+        Quadrature rule to use on subintervals.
+        Options: 'gk21' (Gauss-Kronrod 21-point rule),
+        'gk15' (Gauss-Kronrod 15-point rule),
+        'trapezoid' (composite trapezoid rule).
+        Default: 'gk21' for finite intervals and 'gk15' for (semi-)infinite
+    full_output : bool, optional
+        Return an additional ``info`` dictionary.
+    args : tuple, optional
+        Extra arguments to pass to function, if any.
+
+        .. versionadded:: 1.8.0
+
+    Returns
+    -------
+    res : {float, array-like}
+        Estimate for the result
+    err : float
+        Error estimate for the result in the given norm
+    info : dict
+        Returned only when ``full_output=True``.
+        Info dictionary. Is an object with the attributes:
+
+            success : bool
+                Whether integration reached target precision.
+            status : int
+                Indicator for convergence, success (0),
+                failure (1), and failure due to rounding error (2).
+            neval : int
+                Number of function evaluations.
+            intervals : ndarray, shape (num_intervals, 2)
+                Start and end points of subdivision intervals.
+            integrals : ndarray, shape (num_intervals, ...)
+                Integral for each interval.
+                Note that at most ``cache_size`` values are recorded,
+                and the array may contains *nan* for missing items.
+            errors : ndarray, shape (num_intervals,)
+                Estimated integration error for each interval.
+
+    Notes
+    -----
+    The algorithm mainly follows the implementation of QUADPACK's
+    DQAG* algorithms, implementing global error control and adaptive
+    subdivision.
+
+    The algorithm here has some differences to the QUADPACK approach:
+
+    Instead of subdividing one interval at a time, the algorithm
+    subdivides N intervals with largest errors at once. This enables
+    (partial) parallelization of the integration.
+
+    The logic of subdividing "next largest" intervals first is then
+    not implemented, and we rely on the above extension to avoid
+    concentrating on "small" intervals only.
+
+    The Wynn epsilon table extrapolation is not used (QUADPACK uses it
+    for infinite intervals). This is because the algorithm here is
+    supposed to work on vector-valued functions, in an user-specified
+    norm, and the extension of the epsilon algorithm to this case does
+    not appear to be widely agreed. For max-norm, using elementwise
+    Wynn epsilon could be possible, but we do not do this here with
+    the hope that the epsilon extrapolation is mainly useful in
+    special cases.
+
+    References
+    ----------
+    [1] R. Piessens, E. de Doncker, QUADPACK (1983).
+
+    Examples
+    --------
+    We can compute integrations of a vector-valued function:
+
+    >>> from scipy.integrate import quad_vec
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> alpha = np.linspace(0.0, 2.0, num=30)
+    >>> f = lambda x: x**alpha
+    >>> x0, x1 = 0, 2
+    >>> y, err = quad_vec(f, x0, x1)
+    >>> plt.plot(alpha, y)
+    >>> plt.xlabel(r"$\alpha$")
+    >>> plt.ylabel(r"$\int_{0}^{2} x^\alpha dx$")
+    >>> plt.show()
+
+    When using the argument `workers`, one should ensure
+    that the main module is import-safe, for instance
+    by rewriting the example above as:
+
+    .. code-block:: python
+
+        from scipy.integrate import quad_vec
+        import numpy as np
+        import matplotlib.pyplot as plt
+
+        alpha = np.linspace(0.0, 2.0, num=30)
+        x0, x1 = 0, 2
+        def f(x):
+            return x**alpha
+
+        if __name__ == "__main__":
+            y, err = quad_vec(f, x0, x1, workers=2)
+    """
+    a = float(a)
+    b = float(b)
+
+    if args:
+        if not isinstance(args, tuple):
+            args = (args,)
+
+        # create a wrapped function to allow the use of map and Pool.map
+        f = _FunctionWrapper(f, args)
+
+    # Use simple transformations to deal with integrals over infinite
+    # intervals.
+    kwargs = dict(epsabs=epsabs,
+                  epsrel=epsrel,
+                  norm=norm,
+                  cache_size=cache_size,
+                  limit=limit,
+                  workers=workers,
+                  points=points,
+                  quadrature='gk15' if quadrature is None else quadrature,
+                  full_output=full_output)
+    if np.isfinite(a) and np.isinf(b):
+        f2 = SemiInfiniteFunc(f, start=a, infty=b)
+        if points is not None:
+            kwargs['points'] = tuple(f2.get_t(xp) for xp in points)
+        return quad_vec(f2, 0, 1, **kwargs)
+    elif np.isfinite(b) and np.isinf(a):
+        f2 = SemiInfiniteFunc(f, start=b, infty=a)
+        if points is not None:
+            kwargs['points'] = tuple(f2.get_t(xp) for xp in points)
+        res = quad_vec(f2, 0, 1, **kwargs)
+        return (-res[0],) + res[1:]
+    elif np.isinf(a) and np.isinf(b):
+        sgn = -1 if b < a else 1
+
+        # NB. explicitly split integral at t=0, which separates
+        # the positive and negative sides
+        f2 = DoubleInfiniteFunc(f)
+        if points is not None:
+            kwargs['points'] = (0,) + tuple(f2.get_t(xp) for xp in points)
+        else:
+            kwargs['points'] = (0,)
+
+        if a != b:
+            res = quad_vec(f2, -1, 1, **kwargs)
+        else:
+            res = quad_vec(f2, 1, 1, **kwargs)
+
+        return (res[0]*sgn,) + res[1:]
+    elif not (np.isfinite(a) and np.isfinite(b)):
+        raise ValueError(f"invalid integration bounds a={a}, b={b}")
+
+    norm_funcs = {
+        None: _max_norm,
+        'max': _max_norm,
+        '2': np.linalg.norm
+    }
+    if callable(norm):
+        norm_func = norm
+    else:
+        norm_func = norm_funcs[norm]
+
+    parallel_count = 128
+    min_intervals = 2
+
+    try:
+        _quadrature = {None: _quadrature_gk21,
+                       'gk21': _quadrature_gk21,
+                       'gk15': _quadrature_gk15,
+                       'trapz': _quadrature_trapezoid,  # alias for backcompat
+                       'trapezoid': _quadrature_trapezoid}[quadrature]
+    except KeyError as e:
+        raise ValueError(f"unknown quadrature {quadrature!r}") from e
+
+    if quadrature == "trapz":
+        msg = ("`quadrature='trapz'` is deprecated in favour of "
+               "`quadrature='trapezoid' and will raise an error from SciPy 1.16.0 "
+               "onwards.")
+        warnings.warn(msg, DeprecationWarning, stacklevel=2)
+
+    # Initial interval set
+    if points is None:
+        initial_intervals = [(a, b)]
+    else:
+        prev = a
+        initial_intervals = []
+        for p in sorted(points):
+            p = float(p)
+            if not (a < p < b) or p == prev:
+                continue
+            initial_intervals.append((prev, p))
+            prev = p
+        initial_intervals.append((prev, b))
+
+    global_integral = None
+    global_error = None
+    rounding_error = None
+    interval_cache = None
+    intervals = []
+    neval = 0
+
+    for x1, x2 in initial_intervals:
+        ig, err, rnd = _quadrature(x1, x2, f, norm_func)
+        neval += _quadrature.num_eval
+
+        if global_integral is None:
+            if isinstance(ig, (float, complex)):
+                # Specialize for scalars
+                if norm_func in (_max_norm, np.linalg.norm):
+                    norm_func = abs
+
+            global_integral = ig
+            global_error = float(err)
+            rounding_error = float(rnd)
+
+            cache_count = cache_size // _get_sizeof(ig)
+            interval_cache = LRUDict(cache_count)
+        else:
+            global_integral += ig
+            global_error += err
+            rounding_error += rnd
+
+        interval_cache[(x1, x2)] = copy.copy(ig)
+        intervals.append((-err, x1, x2))
+
+    heapq.heapify(intervals)
+
+    CONVERGED = 0
+    NOT_CONVERGED = 1
+    ROUNDING_ERROR = 2
+    NOT_A_NUMBER = 3
+
+    status_msg = {
+        CONVERGED: "Target precision reached.",
+        NOT_CONVERGED: "Target precision not reached.",
+        ROUNDING_ERROR: "Target precision could not be reached due to rounding error.",
+        NOT_A_NUMBER: "Non-finite values encountered."
+    }
+
+    # Process intervals
+    with MapWrapper(workers) as mapwrapper:
+        ier = NOT_CONVERGED
+
+        while intervals and len(intervals) < limit:
+            # Select intervals with largest errors for subdivision
+            tol = max(epsabs, epsrel*norm_func(global_integral))
+
+            to_process = []
+            err_sum = 0
+
+            for j in range(parallel_count):
+                if not intervals:
+                    break
+
+                if j > 0 and err_sum > global_error - tol/8:
+                    # avoid unnecessary parallel splitting
+                    break
+
+                interval = heapq.heappop(intervals)
+
+                neg_old_err, a, b = interval
+                old_int = interval_cache.pop((a, b), None)
+                to_process.append(
+                    ((-neg_old_err, a, b, old_int), f, norm_func, _quadrature)
+                )
+                err_sum += -neg_old_err
+
+            # Subdivide intervals
+            for parts in mapwrapper(_subdivide_interval, to_process):
+                dint, derr, dround_err, subint, dneval = parts
+                neval += dneval
+                global_integral += dint
+                global_error += derr
+                rounding_error += dround_err
+                for x in subint:
+                    x1, x2, ig, err = x
+                    interval_cache[(x1, x2)] = ig
+                    heapq.heappush(intervals, (-err, x1, x2))
+
+            # Termination check
+            if len(intervals) >= min_intervals:
+                tol = max(epsabs, epsrel*norm_func(global_integral))
+                if global_error < tol/8:
+                    ier = CONVERGED
+                    break
+                if global_error < rounding_error:
+                    ier = ROUNDING_ERROR
+                    break
+
+            if not (np.isfinite(global_error) and np.isfinite(rounding_error)):
+                ier = NOT_A_NUMBER
+                break
+
+    res = global_integral
+    err = global_error + rounding_error
+
+    if full_output:
+        res_arr = np.asarray(res)
+        dummy = np.full(res_arr.shape, np.nan, dtype=res_arr.dtype)
+        integrals = np.array([interval_cache.get((z[1], z[2]), dummy)
+                                      for z in intervals], dtype=res_arr.dtype)
+        errors = np.array([-z[0] for z in intervals])
+        intervals = np.array([[z[1], z[2]] for z in intervals])
+
+        info = _Bunch(neval=neval,
+                      success=(ier == CONVERGED),
+                      status=ier,
+                      message=status_msg[ier],
+                      intervals=intervals,
+                      integrals=integrals,
+                      errors=errors)
+        return (res, err, info)
+    else:
+        return (res, err)
+
+
+def _subdivide_interval(args):
+    interval, f, norm_func, _quadrature = args
+    old_err, a, b, old_int = interval
+
+    c = 0.5 * (a + b)
+
+    # Left-hand side
+    if getattr(_quadrature, 'cache_size', 0) > 0:
+        f = functools.lru_cache(_quadrature.cache_size)(f)
+
+    s1, err1, round1 = _quadrature(a, c, f, norm_func)
+    dneval = _quadrature.num_eval
+    s2, err2, round2 = _quadrature(c, b, f, norm_func)
+    dneval += _quadrature.num_eval
+    if old_int is None:
+        old_int, _, _ = _quadrature(a, b, f, norm_func)
+        dneval += _quadrature.num_eval
+
+    if getattr(_quadrature, 'cache_size', 0) > 0:
+        dneval = f.cache_info().misses
+
+    dint = s1 + s2 - old_int
+    derr = err1 + err2 - old_err
+    dround_err = round1 + round2
+
+    subintervals = ((a, c, s1, err1), (c, b, s2, err2))
+    return dint, derr, dround_err, subintervals, dneval
+
+
+def _quadrature_trapezoid(x1, x2, f, norm_func):
+    """
+    Composite trapezoid quadrature
+    """
+    x3 = 0.5*(x1 + x2)
+    f1 = f(x1)
+    f2 = f(x2)
+    f3 = f(x3)
+
+    s2 = 0.25 * (x2 - x1) * (f1 + 2*f3 + f2)
+
+    round_err = 0.25 * abs(x2 - x1) * (float(norm_func(f1))
+                                       + 2*float(norm_func(f3))
+                                       + float(norm_func(f2))) * 2e-16
+
+    s1 = 0.5 * (x2 - x1) * (f1 + f2)
+    err = 1/3 * float(norm_func(s1 - s2))
+    return s2, err, round_err
+
+
+_quadrature_trapezoid.cache_size = 3 * 3
+_quadrature_trapezoid.num_eval = 3
+
+
+def _quadrature_gk(a, b, f, norm_func, x, w, v):
+    """
+    Generic Gauss-Kronrod quadrature
+    """
+
+    fv = [0.0]*len(x)
+
+    c = 0.5 * (a + b)
+    h = 0.5 * (b - a)
+
+    # Gauss-Kronrod
+    s_k = 0.0
+    s_k_abs = 0.0
+    for i in range(len(x)):
+        ff = f(c + h*x[i])
+        fv[i] = ff
+
+        vv = v[i]
+
+        # \int f(x)
+        s_k += vv * ff
+        # \int |f(x)|
+        s_k_abs += vv * abs(ff)
+
+    # Gauss
+    s_g = 0.0
+    for i in range(len(w)):
+        s_g += w[i] * fv[2*i + 1]
+
+    # Quadrature of abs-deviation from average
+    s_k_dabs = 0.0
+    y0 = s_k / 2.0
+    for i in range(len(x)):
+        # \int |f(x) - y0|
+        s_k_dabs += v[i] * abs(fv[i] - y0)
+
+    # Use similar error estimation as quadpack
+    err = float(norm_func((s_k - s_g) * h))
+    dabs = float(norm_func(s_k_dabs * h))
+    if dabs != 0 and err != 0:
+        err = dabs * min(1.0, (200 * err / dabs)**1.5)
+
+    eps = sys.float_info.epsilon
+    round_err = float(norm_func(50 * eps * h * s_k_abs))
+
+    if round_err > sys.float_info.min:
+        err = max(err, round_err)
+
+    return h * s_k, err, round_err
+
+
+def _quadrature_gk21(a, b, f, norm_func):
+    """
+    Gauss-Kronrod 21 quadrature with error estimate
+    """
+    # Gauss-Kronrod points
+    x = (0.995657163025808080735527280689003,
+         0.973906528517171720077964012084452,
+         0.930157491355708226001207180059508,
+         0.865063366688984510732096688423493,
+         0.780817726586416897063717578345042,
+         0.679409568299024406234327365114874,
+         0.562757134668604683339000099272694,
+         0.433395394129247190799265943165784,
+         0.294392862701460198131126603103866,
+         0.148874338981631210884826001129720,
+         0,
+         -0.148874338981631210884826001129720,
+         -0.294392862701460198131126603103866,
+         -0.433395394129247190799265943165784,
+         -0.562757134668604683339000099272694,
+         -0.679409568299024406234327365114874,
+         -0.780817726586416897063717578345042,
+         -0.865063366688984510732096688423493,
+         -0.930157491355708226001207180059508,
+         -0.973906528517171720077964012084452,
+         -0.995657163025808080735527280689003)
+
+    # 10-point weights
+    w = (0.066671344308688137593568809893332,
+         0.149451349150580593145776339657697,
+         0.219086362515982043995534934228163,
+         0.269266719309996355091226921569469,
+         0.295524224714752870173892994651338,
+         0.295524224714752870173892994651338,
+         0.269266719309996355091226921569469,
+         0.219086362515982043995534934228163,
+         0.149451349150580593145776339657697,
+         0.066671344308688137593568809893332)
+
+    # 21-point weights
+    v = (0.011694638867371874278064396062192,
+         0.032558162307964727478818972459390,
+         0.054755896574351996031381300244580,
+         0.075039674810919952767043140916190,
+         0.093125454583697605535065465083366,
+         0.109387158802297641899210590325805,
+         0.123491976262065851077958109831074,
+         0.134709217311473325928054001771707,
+         0.142775938577060080797094273138717,
+         0.147739104901338491374841515972068,
+         0.149445554002916905664936468389821,
+         0.147739104901338491374841515972068,
+         0.142775938577060080797094273138717,
+         0.134709217311473325928054001771707,
+         0.123491976262065851077958109831074,
+         0.109387158802297641899210590325805,
+         0.093125454583697605535065465083366,
+         0.075039674810919952767043140916190,
+         0.054755896574351996031381300244580,
+         0.032558162307964727478818972459390,
+         0.011694638867371874278064396062192)
+
+    return _quadrature_gk(a, b, f, norm_func, x, w, v)
+
+
+_quadrature_gk21.num_eval = 21
+
+
+def _quadrature_gk15(a, b, f, norm_func):
+    """
+    Gauss-Kronrod 15 quadrature with error estimate
+    """
+    # Gauss-Kronrod points
+    x = (0.991455371120812639206854697526329,
+         0.949107912342758524526189684047851,
+         0.864864423359769072789712788640926,
+         0.741531185599394439863864773280788,
+         0.586087235467691130294144838258730,
+         0.405845151377397166906606412076961,
+         0.207784955007898467600689403773245,
+         0.000000000000000000000000000000000,
+         -0.207784955007898467600689403773245,
+         -0.405845151377397166906606412076961,
+         -0.586087235467691130294144838258730,
+         -0.741531185599394439863864773280788,
+         -0.864864423359769072789712788640926,
+         -0.949107912342758524526189684047851,
+         -0.991455371120812639206854697526329)
+
+    # 7-point weights
+    w = (0.129484966168869693270611432679082,
+         0.279705391489276667901467771423780,
+         0.381830050505118944950369775488975,
+         0.417959183673469387755102040816327,
+         0.381830050505118944950369775488975,
+         0.279705391489276667901467771423780,
+         0.129484966168869693270611432679082)
+
+    # 15-point weights
+    v = (0.022935322010529224963732008058970,
+         0.063092092629978553290700663189204,
+         0.104790010322250183839876322541518,
+         0.140653259715525918745189590510238,
+         0.169004726639267902826583426598550,
+         0.190350578064785409913256402421014,
+         0.204432940075298892414161999234649,
+         0.209482141084727828012999174891714,
+         0.204432940075298892414161999234649,
+         0.190350578064785409913256402421014,
+         0.169004726639267902826583426598550,
+         0.140653259715525918745189590510238,
+         0.104790010322250183839876322541518,
+         0.063092092629978553290700663189204,
+         0.022935322010529224963732008058970)
+
+    return _quadrature_gk(a, b, f, norm_func, x, w, v)
+
+
+_quadrature_gk15.num_eval = 15
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadpack_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadpack_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d273f6d2c9943f4a35f9b0c761a944b7be84cfe
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadpack_py.py
@@ -0,0 +1,1279 @@
+# Author: Travis Oliphant 2001
+# Author: Nathan Woods 2013 (nquad &c)
+import sys
+import warnings
+from functools import partial
+
+from . import _quadpack
+import numpy as np
+
+__all__ = ["quad", "dblquad", "tplquad", "nquad", "IntegrationWarning"]
+
+
+class IntegrationWarning(UserWarning):
+    """
+    Warning on issues during integration.
+    """
+    pass
+
+
+def quad(func, a, b, args=(), full_output=0, epsabs=1.49e-8, epsrel=1.49e-8,
+         limit=50, points=None, weight=None, wvar=None, wopts=None, maxp1=50,
+         limlst=50, complex_func=False):
+    """
+    Compute a definite integral.
+
+    Integrate func from `a` to `b` (possibly infinite interval) using a
+    technique from the Fortran library QUADPACK.
+
+    Parameters
+    ----------
+    func : {function, scipy.LowLevelCallable}
+        A Python function or method to integrate. If `func` takes many
+        arguments, it is integrated along the axis corresponding to the
+        first argument.
+
+        If the user desires improved integration performance, then `f` may
+        be a `scipy.LowLevelCallable` with one of the signatures::
+
+            double func(double x)
+            double func(double x, void *user_data)
+            double func(int n, double *xx)
+            double func(int n, double *xx, void *user_data)
+
+        The ``user_data`` is the data contained in the `scipy.LowLevelCallable`.
+        In the call forms with ``xx``,  ``n`` is the length of the ``xx``
+        array which contains ``xx[0] == x`` and the rest of the items are
+        numbers contained in the ``args`` argument of quad.
+
+        In addition, certain ctypes call signatures are supported for
+        backward compatibility, but those should not be used in new code.
+    a : float
+        Lower limit of integration (use -numpy.inf for -infinity).
+    b : float
+        Upper limit of integration (use numpy.inf for +infinity).
+    args : tuple, optional
+        Extra arguments to pass to `func`.
+    full_output : int, optional
+        Non-zero to return a dictionary of integration information.
+        If non-zero, warning messages are also suppressed and the
+        message is appended to the output tuple.
+    complex_func : bool, optional
+        Indicate if the function's (`func`) return type is real
+        (``complex_func=False``: default) or complex (``complex_func=True``).
+        In both cases, the function's argument is real.
+        If full_output is also non-zero, the `infodict`, `message`, and
+        `explain` for the real and complex components are returned in
+        a dictionary with keys "real output" and "imag output".
+
+    Returns
+    -------
+    y : float
+        The integral of func from `a` to `b`.
+    abserr : float
+        An estimate of the absolute error in the result.
+    infodict : dict
+        A dictionary containing additional information.
+    message
+        A convergence message.
+    explain
+        Appended only with 'cos' or 'sin' weighting and infinite
+        integration limits, it contains an explanation of the codes in
+        infodict['ierlst']
+
+    Other Parameters
+    ----------------
+    epsabs : float or int, optional
+        Absolute error tolerance. Default is 1.49e-8. `quad` tries to obtain
+        an accuracy of ``abs(i-result) <= max(epsabs, epsrel*abs(i))``
+        where ``i`` = integral of `func` from `a` to `b`, and ``result`` is the
+        numerical approximation. See `epsrel` below.
+    epsrel : float or int, optional
+        Relative error tolerance. Default is 1.49e-8.
+        If ``epsabs <= 0``, `epsrel` must be greater than both 5e-29
+        and ``50 * (machine epsilon)``. See `epsabs` above.
+    limit : float or int, optional
+        An upper bound on the number of subintervals used in the adaptive
+        algorithm.
+    points : (sequence of floats,ints), optional
+        A sequence of break points in the bounded integration interval
+        where local difficulties of the integrand may occur (e.g.,
+        singularities, discontinuities). The sequence does not have
+        to be sorted. Note that this option cannot be used in conjunction
+        with ``weight``.
+    weight : float or int, optional
+        String indicating weighting function. Full explanation for this
+        and the remaining arguments can be found below.
+    wvar : optional
+        Variables for use with weighting functions.
+    wopts : optional
+        Optional input for reusing Chebyshev moments.
+    maxp1 : float or int, optional
+        An upper bound on the number of Chebyshev moments.
+    limlst : int, optional
+        Upper bound on the number of cycles (>=3) for use with a sinusoidal
+        weighting and an infinite end-point.
+
+    See Also
+    --------
+    dblquad : double integral
+    tplquad : triple integral
+    nquad : n-dimensional integrals (uses `quad` recursively)
+    fixed_quad : fixed-order Gaussian quadrature
+    simpson : integrator for sampled data
+    romb : integrator for sampled data
+    scipy.special : for coefficients and roots of orthogonal polynomials
+
+    Notes
+    -----
+    For valid results, the integral must converge; behavior for divergent
+    integrals is not guaranteed.
+
+    **Extra information for quad() inputs and outputs**
+
+    If full_output is non-zero, then the third output argument
+    (infodict) is a dictionary with entries as tabulated below. For
+    infinite limits, the range is transformed to (0,1) and the
+    optional outputs are given with respect to this transformed range.
+    Let M be the input argument limit and let K be infodict['last'].
+    The entries are:
+
+    'neval'
+        The number of function evaluations.
+    'last'
+        The number, K, of subintervals produced in the subdivision process.
+    'alist'
+        A rank-1 array of length M, the first K elements of which are the
+        left end points of the subintervals in the partition of the
+        integration range.
+    'blist'
+        A rank-1 array of length M, the first K elements of which are the
+        right end points of the subintervals.
+    'rlist'
+        A rank-1 array of length M, the first K elements of which are the
+        integral approximations on the subintervals.
+    'elist'
+        A rank-1 array of length M, the first K elements of which are the
+        moduli of the absolute error estimates on the subintervals.
+    'iord'
+        A rank-1 integer array of length M, the first L elements of
+        which are pointers to the error estimates over the subintervals
+        with ``L=K`` if ``K<=M/2+2`` or ``L=M+1-K`` otherwise. Let I be the
+        sequence ``infodict['iord']`` and let E be the sequence
+        ``infodict['elist']``.  Then ``E[I[1]], ..., E[I[L]]`` forms a
+        decreasing sequence.
+
+    If the input argument points is provided (i.e., it is not None),
+    the following additional outputs are placed in the output
+    dictionary. Assume the points sequence is of length P.
+
+    'pts'
+        A rank-1 array of length P+2 containing the integration limits
+        and the break points of the intervals in ascending order.
+        This is an array giving the subintervals over which integration
+        will occur.
+    'level'
+        A rank-1 integer array of length M (=limit), containing the
+        subdivision levels of the subintervals, i.e., if (aa,bb) is a
+        subinterval of ``(pts[1], pts[2])`` where ``pts[0]`` and ``pts[2]``
+        are adjacent elements of ``infodict['pts']``, then (aa,bb) has level l
+        if ``|bb-aa| = |pts[2]-pts[1]| * 2**(-l)``.
+    'ndin'
+        A rank-1 integer array of length P+2. After the first integration
+        over the intervals (pts[1], pts[2]), the error estimates over some
+        of the intervals may have been increased artificially in order to
+        put their subdivision forward. This array has ones in slots
+        corresponding to the subintervals for which this happens.
+
+    **Weighting the integrand**
+
+    The input variables, *weight* and *wvar*, are used to weight the
+    integrand by a select list of functions. Different integration
+    methods are used to compute the integral with these weighting
+    functions, and these do not support specifying break points. The
+    possible values of weight and the corresponding weighting functions are.
+
+    ==========  ===================================   =====================
+    ``weight``  Weight function used                  ``wvar``
+    ==========  ===================================   =====================
+    'cos'       cos(w*x)                              wvar = w
+    'sin'       sin(w*x)                              wvar = w
+    'alg'       g(x) = ((x-a)**alpha)*((b-x)**beta)   wvar = (alpha, beta)
+    'alg-loga'  g(x)*log(x-a)                         wvar = (alpha, beta)
+    'alg-logb'  g(x)*log(b-x)                         wvar = (alpha, beta)
+    'alg-log'   g(x)*log(x-a)*log(b-x)                wvar = (alpha, beta)
+    'cauchy'    1/(x-c)                               wvar = c
+    ==========  ===================================   =====================
+
+    wvar holds the parameter w, (alpha, beta), or c depending on the weight
+    selected. In these expressions, a and b are the integration limits.
+
+    For the 'cos' and 'sin' weighting, additional inputs and outputs are
+    available.
+
+    For finite integration limits, the integration is performed using a
+    Clenshaw-Curtis method which uses Chebyshev moments. For repeated
+    calculations, these moments are saved in the output dictionary:
+
+    'momcom'
+        The maximum level of Chebyshev moments that have been computed,
+        i.e., if ``M_c`` is ``infodict['momcom']`` then the moments have been
+        computed for intervals of length ``|b-a| * 2**(-l)``,
+        ``l=0,1,...,M_c``.
+    'nnlog'
+        A rank-1 integer array of length M(=limit), containing the
+        subdivision levels of the subintervals, i.e., an element of this
+        array is equal to l if the corresponding subinterval is
+        ``|b-a|* 2**(-l)``.
+    'chebmo'
+        A rank-2 array of shape (25, maxp1) containing the computed
+        Chebyshev moments. These can be passed on to an integration
+        over the same interval by passing this array as the second
+        element of the sequence wopts and passing infodict['momcom'] as
+        the first element.
+
+    If one of the integration limits is infinite, then a Fourier integral is
+    computed (assuming w neq 0). If full_output is 1 and a numerical error
+    is encountered, besides the error message attached to the output tuple,
+    a dictionary is also appended to the output tuple which translates the
+    error codes in the array ``info['ierlst']`` to English messages. The
+    output information dictionary contains the following entries instead of
+    'last', 'alist', 'blist', 'rlist', and 'elist':
+
+    'lst'
+        The number of subintervals needed for the integration (call it ``K_f``).
+    'rslst'
+        A rank-1 array of length M_f=limlst, whose first ``K_f`` elements
+        contain the integral contribution over the interval
+        ``(a+(k-1)c, a+kc)`` where ``c = (2*floor(|w|) + 1) * pi / |w|``
+        and ``k=1,2,...,K_f``.
+    'erlst'
+        A rank-1 array of length ``M_f`` containing the error estimate
+        corresponding to the interval in the same position in
+        ``infodict['rslist']``.
+    'ierlst'
+        A rank-1 integer array of length ``M_f`` containing an error flag
+        corresponding to the interval in the same position in
+        ``infodict['rslist']``.  See the explanation dictionary (last entry
+        in the output tuple) for the meaning of the codes.
+
+
+    **Details of QUADPACK level routines**
+
+    `quad` calls routines from the FORTRAN library QUADPACK. This section
+    provides details on the conditions for each routine to be called and a
+    short description of each routine. The routine called depends on
+    `weight`, `points` and the integration limits `a` and `b`.
+
+    ================  ==============  ==========  =====================
+    QUADPACK routine  `weight`        `points`    infinite bounds
+    ================  ==============  ==========  =====================
+    qagse             None            No          No
+    qagie             None            No          Yes
+    qagpe             None            Yes         No
+    qawoe             'sin', 'cos'    No          No
+    qawfe             'sin', 'cos'    No          either `a` or `b`
+    qawse             'alg*'          No          No
+    qawce             'cauchy'        No          No
+    ================  ==============  ==========  =====================
+
+    The following provides a short description from [1]_ for each
+    routine.
+
+    qagse
+        is an integrator based on globally adaptive interval
+        subdivision in connection with extrapolation, which will
+        eliminate the effects of integrand singularities of
+        several types.
+    qagie
+        handles integration over infinite intervals. The infinite range is
+        mapped onto a finite interval and subsequently the same strategy as
+        in ``QAGS`` is applied.
+    qagpe
+        serves the same purposes as QAGS, but also allows the
+        user to provide explicit information about the location
+        and type of trouble-spots i.e. the abscissae of internal
+        singularities, discontinuities and other difficulties of
+        the integrand function.
+    qawoe
+        is an integrator for the evaluation of
+        :math:`\\int^b_a \\cos(\\omega x)f(x)dx` or
+        :math:`\\int^b_a \\sin(\\omega x)f(x)dx`
+        over a finite interval [a,b], where :math:`\\omega` and :math:`f`
+        are specified by the user. The rule evaluation component is based
+        on the modified Clenshaw-Curtis technique
+
+        An adaptive subdivision scheme is used in connection
+        with an extrapolation procedure, which is a modification
+        of that in ``QAGS`` and allows the algorithm to deal with
+        singularities in :math:`f(x)`.
+    qawfe
+        calculates the Fourier transform
+        :math:`\\int^\\infty_a \\cos(\\omega x)f(x)dx` or
+        :math:`\\int^\\infty_a \\sin(\\omega x)f(x)dx`
+        for user-provided :math:`\\omega` and :math:`f`. The procedure of
+        ``QAWO`` is applied on successive finite intervals, and convergence
+        acceleration by means of the :math:`\\varepsilon`-algorithm is applied
+        to the series of integral approximations.
+    qawse
+        approximate :math:`\\int^b_a w(x)f(x)dx`, with :math:`a < b` where
+        :math:`w(x) = (x-a)^{\\alpha}(b-x)^{\\beta}v(x)` with
+        :math:`\\alpha,\\beta > -1`, where :math:`v(x)` may be one of the
+        following functions: :math:`1`, :math:`\\log(x-a)`, :math:`\\log(b-x)`,
+        :math:`\\log(x-a)\\log(b-x)`.
+
+        The user specifies :math:`\\alpha`, :math:`\\beta` and the type of the
+        function :math:`v`. A globally adaptive subdivision strategy is
+        applied, with modified Clenshaw-Curtis integration on those
+        subintervals which contain `a` or `b`.
+    qawce
+        compute :math:`\\int^b_a f(x) / (x-c)dx` where the integral must be
+        interpreted as a Cauchy principal value integral, for user specified
+        :math:`c` and :math:`f`. The strategy is globally adaptive. Modified
+        Clenshaw-Curtis integration is used on those intervals containing the
+        point :math:`x = c`.
+
+    **Integration of Complex Function of a Real Variable**
+
+    A complex valued function, :math:`f`, of a real variable can be written as
+    :math:`f = g + ih`.  Similarly, the integral of :math:`f` can be
+    written as
+
+    .. math::
+        \\int_a^b f(x) dx = \\int_a^b g(x) dx + i\\int_a^b h(x) dx
+
+    assuming that the integrals of :math:`g` and :math:`h` exist
+    over the interval :math:`[a,b]` [2]_. Therefore, ``quad`` integrates
+    complex-valued functions by integrating the real and imaginary components
+    separately.
+
+
+    References
+    ----------
+
+    .. [1] Piessens, Robert; de Doncker-Kapenga, Elise;
+           Überhuber, Christoph W.; Kahaner, David (1983).
+           QUADPACK: A subroutine package for automatic integration.
+           Springer-Verlag.
+           ISBN 978-3-540-12553-2.
+
+    .. [2] McCullough, Thomas; Phillips, Keith (1973).
+           Foundations of Analysis in the Complex Plane.
+           Holt Rinehart Winston.
+           ISBN 0-03-086370-8
+
+    Examples
+    --------
+    Calculate :math:`\\int^4_0 x^2 dx` and compare with an analytic result
+
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> x2 = lambda x: x**2
+    >>> integrate.quad(x2, 0, 4)
+    (21.333333333333332, 2.3684757858670003e-13)
+    >>> print(4**3 / 3.)  # analytical result
+    21.3333333333
+
+    Calculate :math:`\\int^\\infty_0 e^{-x} dx`
+
+    >>> invexp = lambda x: np.exp(-x)
+    >>> integrate.quad(invexp, 0, np.inf)
+    (1.0, 5.842605999138044e-11)
+
+    Calculate :math:`\\int^1_0 a x \\,dx` for :math:`a = 1, 3`
+
+    >>> f = lambda x, a: a*x
+    >>> y, err = integrate.quad(f, 0, 1, args=(1,))
+    >>> y
+    0.5
+    >>> y, err = integrate.quad(f, 0, 1, args=(3,))
+    >>> y
+    1.5
+
+    Calculate :math:`\\int^1_0 x^2 + y^2 dx` with ctypes, holding
+    y parameter as 1::
+
+        testlib.c =>
+            double func(int n, double args[n]){
+                return args[0]*args[0] + args[1]*args[1];}
+        compile to library testlib.*
+
+    ::
+
+       from scipy import integrate
+       import ctypes
+       lib = ctypes.CDLL('/home/.../testlib.*') #use absolute path
+       lib.func.restype = ctypes.c_double
+       lib.func.argtypes = (ctypes.c_int,ctypes.c_double)
+       integrate.quad(lib.func,0,1,(1))
+       #(1.3333333333333333, 1.4802973661668752e-14)
+       print((1.0**3/3.0 + 1.0) - (0.0**3/3.0 + 0.0)) #Analytic result
+       # 1.3333333333333333
+
+    Be aware that pulse shapes and other sharp features as compared to the
+    size of the integration interval may not be integrated correctly using
+    this method. A simplified example of this limitation is integrating a
+    y-axis reflected step function with many zero values within the integrals
+    bounds.
+
+    >>> y = lambda x: 1 if x<=0 else 0
+    >>> integrate.quad(y, -1, 1)
+    (1.0, 1.1102230246251565e-14)
+    >>> integrate.quad(y, -1, 100)
+    (1.0000000002199108, 1.0189464580163188e-08)
+    >>> integrate.quad(y, -1, 10000)
+    (0.0, 0.0)
+
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+
+    # check the limits of integration: \int_a^b, expect a < b
+    flip, a, b = b < a, min(a, b), max(a, b)
+
+    if complex_func:
+        def imfunc(x, *args):
+            return func(x, *args).imag
+
+        def refunc(x, *args):
+            return func(x, *args).real
+
+        re_retval = quad(refunc, a, b, args, full_output, epsabs,
+                         epsrel, limit, points, weight, wvar, wopts,
+                         maxp1, limlst, complex_func=False)
+        im_retval = quad(imfunc, a, b, args, full_output, epsabs,
+                         epsrel, limit, points, weight, wvar, wopts,
+                         maxp1, limlst, complex_func=False)
+        integral = re_retval[0] + 1j*im_retval[0]
+        error_estimate = re_retval[1] + 1j*im_retval[1]
+        retval = integral, error_estimate
+        if full_output:
+            msgexp = {}
+            msgexp["real"] = re_retval[2:]
+            msgexp["imag"] = im_retval[2:]
+            retval = retval + (msgexp,)
+
+        return retval
+
+    if weight is None:
+        retval = _quad(func, a, b, args, full_output, epsabs, epsrel, limit,
+                       points)
+    else:
+        if points is not None:
+            msg = ("Break points cannot be specified when using weighted integrand.\n"
+                   "Continuing, ignoring specified points.")
+            warnings.warn(msg, IntegrationWarning, stacklevel=2)
+        retval = _quad_weight(func, a, b, args, full_output, epsabs, epsrel,
+                              limlst, limit, maxp1, weight, wvar, wopts)
+
+    if flip:
+        retval = (-retval[0],) + retval[1:]
+
+    ier = retval[-1]
+    if ier == 0:
+        return retval[:-1]
+
+    msgs = {80: "A Python error occurred possibly while calling the function.",
+             1: f"The maximum number of subdivisions ({limit}) has been achieved.\n  "
+                f"If increasing the limit yields no improvement it is advised to "
+                f"analyze \n  the integrand in order to determine the difficulties.  "
+                f"If the position of a \n  local difficulty can be determined "
+                f"(singularity, discontinuity) one will \n  probably gain from "
+                f"splitting up the interval and calling the integrator \n  on the "
+                f"subranges.  Perhaps a special-purpose integrator should be used.",
+             2: "The occurrence of roundoff error is detected, which prevents \n  "
+                "the requested tolerance from being achieved.  "
+                "The error may be \n  underestimated.",
+             3: "Extremely bad integrand behavior occurs at some points of the\n  "
+                "integration interval.",
+             4: "The algorithm does not converge.  Roundoff error is detected\n  "
+                "in the extrapolation table.  It is assumed that the requested "
+                "tolerance\n  cannot be achieved, and that the returned result "
+                "(if full_output = 1) is \n  the best which can be obtained.",
+             5: "The integral is probably divergent, or slowly convergent.",
+             6: "The input is invalid.",
+             7: "Abnormal termination of the routine.  The estimates for result\n  "
+                "and error are less reliable.  It is assumed that the requested "
+                "accuracy\n  has not been achieved.",
+            'unknown': "Unknown error."}
+
+    if weight in ['cos','sin'] and (b == np.inf or a == -np.inf):
+        msgs[1] = (
+            "The maximum number of cycles allowed has been achieved., e.e.\n  of "
+            "subintervals (a+(k-1)c, a+kc) where c = (2*int(abs(omega)+1))\n  "
+            "*pi/abs(omega), for k = 1, 2, ..., lst.  "
+            "One can allow more cycles by increasing the value of limlst.  "
+            "Look at info['ierlst'] with full_output=1."
+        )
+        msgs[4] = (
+            "The extrapolation table constructed for convergence acceleration\n  of "
+            "the series formed by the integral contributions over the cycles, \n  does "
+            "not converge to within the requested accuracy.  "
+            "Look at \n  info['ierlst'] with full_output=1."
+        )
+        msgs[7] = (
+            "Bad integrand behavior occurs within one or more of the cycles.\n  "
+            "Location and type of the difficulty involved can be determined from \n  "
+            "the vector info['ierlist'] obtained with full_output=1."
+        )
+        explain = {1: "The maximum number of subdivisions (= limit) has been \n  "
+                      "achieved on this cycle.",
+                   2: "The occurrence of roundoff error is detected and prevents\n  "
+                      "the tolerance imposed on this cycle from being achieved.",
+                   3: "Extremely bad integrand behavior occurs at some points of\n  "
+                      "this cycle.",
+                   4: "The integral over this cycle does not converge (to within the "
+                      "required accuracy) due to roundoff in the extrapolation "
+                      "procedure invoked on this cycle.  It is assumed that the result "
+                      "on this interval is the best which can be obtained.",
+                   5: "The integral over this cycle is probably divergent or "
+                      "slowly convergent."}
+
+    try:
+        msg = msgs[ier]
+    except KeyError:
+        msg = msgs['unknown']
+
+    if ier in [1,2,3,4,5,7]:
+        if full_output:
+            if weight in ['cos', 'sin'] and (b == np.inf or a == -np.inf):
+                return retval[:-1] + (msg, explain)
+            else:
+                return retval[:-1] + (msg,)
+        else:
+            warnings.warn(msg, IntegrationWarning, stacklevel=2)
+            return retval[:-1]
+
+    elif ier == 6:  # Forensic decision tree when QUADPACK throws ier=6
+        if epsabs <= 0:  # Small error tolerance - applies to all methods
+            if epsrel < max(50 * sys.float_info.epsilon, 5e-29):
+                msg = ("If 'epsabs'<=0, 'epsrel' must be greater than both"
+                       " 5e-29 and 50*(machine epsilon).")
+            elif weight in ['sin', 'cos'] and (abs(a) + abs(b) == np.inf):
+                msg = ("Sine or cosine weighted integrals with infinite domain"
+                       " must have 'epsabs'>0.")
+
+        elif weight is None:
+            if points is None:  # QAGSE/QAGIE
+                msg = ("Invalid 'limit' argument. There must be"
+                       " at least one subinterval")
+            else:  # QAGPE
+                if not (min(a, b) <= min(points) <= max(points) <= max(a, b)):
+                    msg = ("All break points in 'points' must lie within the"
+                           " integration limits.")
+                elif len(points) >= limit:
+                    msg = (f"Number of break points ({len(points):d}) "
+                           f"must be less than subinterval limit ({limit:d})")
+
+        else:
+            if maxp1 < 1:
+                msg = "Chebyshev moment limit maxp1 must be >=1."
+
+            elif weight in ('cos', 'sin') and abs(a+b) == np.inf:  # QAWFE
+                msg = "Cycle limit limlst must be >=3."
+
+            elif weight.startswith('alg'):  # QAWSE
+                if min(wvar) < -1:
+                    msg = "wvar parameters (alpha, beta) must both be >= -1."
+                if b < a:
+                    msg = "Integration limits a, b must satistfy a>> import numpy as np
+    >>> from scipy import integrate
+    >>> f = lambda y, x: x*y**2
+    >>> integrate.dblquad(f, 0, 2, 0, 1)
+        (0.6666666666666667, 7.401486830834377e-15)
+
+    Calculate :math:`\\int^{x=\\pi/4}_{x=0} \\int^{y=\\cos(x)}_{y=\\sin(x)} 1
+    \\,dy \\,dx`.
+
+    >>> f = lambda y, x: 1
+    >>> integrate.dblquad(f, 0, np.pi/4, np.sin, np.cos)
+        (0.41421356237309503, 1.1083280054755938e-14)
+
+    Calculate :math:`\\int^{x=1}_{x=0} \\int^{y=2-x}_{y=x} a x y \\,dy \\,dx`
+    for :math:`a=1, 3`.
+
+    >>> f = lambda y, x, a: a*x*y
+    >>> integrate.dblquad(f, 0, 1, lambda x: x, lambda x: 2-x, args=(1,))
+        (0.33333333333333337, 5.551115123125783e-15)
+    >>> integrate.dblquad(f, 0, 1, lambda x: x, lambda x: 2-x, args=(3,))
+        (0.9999999999999999, 1.6653345369377348e-14)
+
+    Compute the two-dimensional Gaussian Integral, which is the integral of the
+    Gaussian function :math:`f(x,y) = e^{-(x^{2} + y^{2})}`, over
+    :math:`(-\\infty,+\\infty)`. That is, compute the integral
+    :math:`\\iint^{+\\infty}_{-\\infty} e^{-(x^{2} + y^{2})} \\,dy\\,dx`.
+
+    >>> f = lambda x, y: np.exp(-(x ** 2 + y ** 2))
+    >>> integrate.dblquad(f, -np.inf, np.inf, -np.inf, np.inf)
+        (3.141592653589777, 2.5173086737433208e-08)
+
+    """
+
+    def temp_ranges(*args):
+        return [gfun(args[0]) if callable(gfun) else gfun,
+                hfun(args[0]) if callable(hfun) else hfun]
+
+    return nquad(func, [temp_ranges, [a, b]], args=args,
+            opts={"epsabs": epsabs, "epsrel": epsrel})
+
+
+def tplquad(func, a, b, gfun, hfun, qfun, rfun, args=(), epsabs=1.49e-8,
+            epsrel=1.49e-8):
+    """
+    Compute a triple (definite) integral.
+
+    Return the triple integral of ``func(z, y, x)`` from ``x = a..b``,
+    ``y = gfun(x)..hfun(x)``, and ``z = qfun(x,y)..rfun(x,y)``.
+
+    Parameters
+    ----------
+    func : function
+        A Python function or method of at least three variables in the
+        order (z, y, x).
+    a, b : float
+        The limits of integration in x: `a` < `b`
+    gfun : function or float
+        The lower boundary curve in y which is a function taking a single
+        floating point argument (x) and returning a floating point result
+        or a float indicating a constant boundary curve.
+    hfun : function or float
+        The upper boundary curve in y (same requirements as `gfun`).
+    qfun : function or float
+        The lower boundary surface in z.  It must be a function that takes
+        two floats in the order (x, y) and returns a float or a float
+        indicating a constant boundary surface.
+    rfun : function or float
+        The upper boundary surface in z. (Same requirements as `qfun`.)
+    args : tuple, optional
+        Extra arguments to pass to `func`.
+    epsabs : float, optional
+        Absolute tolerance passed directly to the innermost 1-D quadrature
+        integration. Default is 1.49e-8.
+    epsrel : float, optional
+        Relative tolerance of the innermost 1-D integrals. Default is 1.49e-8.
+
+    Returns
+    -------
+    y : float
+        The resultant integral.
+    abserr : float
+        An estimate of the error.
+
+    See Also
+    --------
+    quad : Adaptive quadrature using QUADPACK
+    fixed_quad : Fixed-order Gaussian quadrature
+    dblquad : Double integrals
+    nquad : N-dimensional integrals
+    romb : Integrators for sampled data
+    simpson : Integrators for sampled data
+    scipy.special : For coefficients and roots of orthogonal polynomials
+
+    Notes
+    -----
+    For valid results, the integral must converge; behavior for divergent
+    integrals is not guaranteed.
+
+    **Details of QUADPACK level routines**
+
+    `quad` calls routines from the FORTRAN library QUADPACK. This section
+    provides details on the conditions for each routine to be called and a
+    short description of each routine. For each level of integration, ``qagse``
+    is used for finite limits or ``qagie`` is used, if either limit (or both!)
+    are infinite. The following provides a short description from [1]_ for each
+    routine.
+
+    qagse
+        is an integrator based on globally adaptive interval
+        subdivision in connection with extrapolation, which will
+        eliminate the effects of integrand singularities of
+        several types.
+    qagie
+        handles integration over infinite intervals. The infinite range is
+        mapped onto a finite interval and subsequently the same strategy as
+        in ``QAGS`` is applied.
+
+    References
+    ----------
+
+    .. [1] Piessens, Robert; de Doncker-Kapenga, Elise;
+           Überhuber, Christoph W.; Kahaner, David (1983).
+           QUADPACK: A subroutine package for automatic integration.
+           Springer-Verlag.
+           ISBN 978-3-540-12553-2.
+
+    Examples
+    --------
+    Compute the triple integral of ``x * y * z``, over ``x`` ranging
+    from 1 to 2, ``y`` ranging from 2 to 3, ``z`` ranging from 0 to 1.
+    That is, :math:`\\int^{x=2}_{x=1} \\int^{y=3}_{y=2} \\int^{z=1}_{z=0} x y z
+    \\,dz \\,dy \\,dx`.
+
+    >>> import numpy as np
+    >>> from scipy import integrate
+    >>> f = lambda z, y, x: x*y*z
+    >>> integrate.tplquad(f, 1, 2, 2, 3, 0, 1)
+    (1.8749999999999998, 3.3246447942574074e-14)
+
+    Calculate :math:`\\int^{x=1}_{x=0} \\int^{y=1-2x}_{y=0}
+    \\int^{z=1-x-2y}_{z=0} x y z \\,dz \\,dy \\,dx`.
+    Note: `qfun`/`rfun` takes arguments in the order (x, y), even though ``f``
+    takes arguments in the order (z, y, x).
+
+    >>> f = lambda z, y, x: x*y*z
+    >>> integrate.tplquad(f, 0, 1, 0, lambda x: 1-2*x, 0, lambda x, y: 1-x-2*y)
+    (0.05416666666666668, 2.1774196738157757e-14)
+
+    Calculate :math:`\\int^{x=1}_{x=0} \\int^{y=1}_{y=0} \\int^{z=1}_{z=0}
+    a x y z \\,dz \\,dy \\,dx` for :math:`a=1, 3`.
+
+    >>> f = lambda z, y, x, a: a*x*y*z
+    >>> integrate.tplquad(f, 0, 1, 0, 1, 0, 1, args=(1,))
+        (0.125, 5.527033708952211e-15)
+    >>> integrate.tplquad(f, 0, 1, 0, 1, 0, 1, args=(3,))
+        (0.375, 1.6581101126856635e-14)
+
+    Compute the three-dimensional Gaussian Integral, which is the integral of
+    the Gaussian function :math:`f(x,y,z) = e^{-(x^{2} + y^{2} + z^{2})}`, over
+    :math:`(-\\infty,+\\infty)`. That is, compute the integral
+    :math:`\\iiint^{+\\infty}_{-\\infty} e^{-(x^{2} + y^{2} + z^{2})} \\,dz
+    \\,dy\\,dx`.
+
+    >>> f = lambda x, y, z: np.exp(-(x ** 2 + y ** 2 + z ** 2))
+    >>> integrate.tplquad(f, -np.inf, np.inf, -np.inf, np.inf, -np.inf, np.inf)
+        (5.568327996830833, 4.4619078828029765e-08)
+
+    """
+    # f(z, y, x)
+    # qfun/rfun(x, y)
+    # gfun/hfun(x)
+    # nquad will hand (y, x, t0, ...) to ranges0
+    # nquad will hand (x, t0, ...) to ranges1
+    # Only qfun / rfun is different API...
+
+    def ranges0(*args):
+        return [qfun(args[1], args[0]) if callable(qfun) else qfun,
+                rfun(args[1], args[0]) if callable(rfun) else rfun]
+
+    def ranges1(*args):
+        return [gfun(args[0]) if callable(gfun) else gfun,
+                hfun(args[0]) if callable(hfun) else hfun]
+
+    ranges = [ranges0, ranges1, [a, b]]
+    return nquad(func, ranges, args=args,
+            opts={"epsabs": epsabs, "epsrel": epsrel})
+
+
+def nquad(func, ranges, args=None, opts=None, full_output=False):
+    r"""
+    Integration over multiple variables.
+
+    Wraps `quad` to enable integration over multiple variables.
+    Various options allow improved integration of discontinuous functions, as
+    well as the use of weighted integration, and generally finer control of the
+    integration process.
+
+    Parameters
+    ----------
+    func : {callable, scipy.LowLevelCallable}
+        The function to be integrated. Has arguments of ``x0, ... xn``,
+        ``t0, ... tm``, where integration is carried out over ``x0, ... xn``,
+        which must be floats.  Where ``t0, ... tm`` are extra arguments
+        passed in args.
+        Function signature should be ``func(x0, x1, ..., xn, t0, t1, ..., tm)``.
+        Integration is carried out in order.  That is, integration over ``x0``
+        is the innermost integral, and ``xn`` is the outermost.
+
+        If the user desires improved integration performance, then `f` may
+        be a `scipy.LowLevelCallable` with one of the signatures::
+
+            double func(int n, double *xx)
+            double func(int n, double *xx, void *user_data)
+
+        where ``n`` is the number of variables and args.  The ``xx`` array
+        contains the coordinates and extra arguments. ``user_data`` is the data
+        contained in the `scipy.LowLevelCallable`.
+    ranges : iterable object
+        Each element of ranges may be either a sequence  of 2 numbers, or else
+        a callable that returns such a sequence. ``ranges[0]`` corresponds to
+        integration over x0, and so on. If an element of ranges is a callable,
+        then it will be called with all of the integration arguments available,
+        as well as any parametric arguments. e.g., if
+        ``func = f(x0, x1, x2, t0, t1)``, then ``ranges[0]`` may be defined as
+        either ``(a, b)`` or else as ``(a, b) = range0(x1, x2, t0, t1)``.
+    args : iterable object, optional
+        Additional arguments ``t0, ... tn``, required by ``func``, ``ranges``,
+        and ``opts``.
+    opts : iterable object or dict, optional
+        Options to be passed to `quad`. May be empty, a dict, or
+        a sequence of dicts or functions that return a dict. If empty, the
+        default options from scipy.integrate.quad are used. If a dict, the same
+        options are used for all levels of integraion. If a sequence, then each
+        element of the sequence corresponds to a particular integration. e.g.,
+        ``opts[0]`` corresponds to integration over ``x0``, and so on. If a
+        callable, the signature must be the same as for ``ranges``. The
+        available options together with their default values are:
+
+          - epsabs = 1.49e-08
+          - epsrel = 1.49e-08
+          - limit  = 50
+          - points = None
+          - weight = None
+          - wvar   = None
+          - wopts  = None
+
+        For more information on these options, see `quad`.
+
+    full_output : bool, optional
+        Partial implementation of ``full_output`` from scipy.integrate.quad.
+        The number of integrand function evaluations ``neval`` can be obtained
+        by setting ``full_output=True`` when calling nquad.
+
+    Returns
+    -------
+    result : float
+        The result of the integration.
+    abserr : float
+        The maximum of the estimates of the absolute error in the various
+        integration results.
+    out_dict : dict, optional
+        A dict containing additional information on the integration.
+
+    See Also
+    --------
+    quad : 1-D numerical integration
+    dblquad, tplquad : double and triple integrals
+    fixed_quad : fixed-order Gaussian quadrature
+
+    Notes
+    -----
+    For valid results, the integral must converge; behavior for divergent
+    integrals is not guaranteed.
+
+    **Details of QUADPACK level routines**
+
+    `nquad` calls routines from the FORTRAN library QUADPACK. This section
+    provides details on the conditions for each routine to be called and a
+    short description of each routine. The routine called depends on
+    `weight`, `points` and the integration limits `a` and `b`.
+
+    ================  ==============  ==========  =====================
+    QUADPACK routine  `weight`        `points`    infinite bounds
+    ================  ==============  ==========  =====================
+    qagse             None            No          No
+    qagie             None            No          Yes
+    qagpe             None            Yes         No
+    qawoe             'sin', 'cos'    No          No
+    qawfe             'sin', 'cos'    No          either `a` or `b`
+    qawse             'alg*'          No          No
+    qawce             'cauchy'        No          No
+    ================  ==============  ==========  =====================
+
+    The following provides a short description from [1]_ for each
+    routine.
+
+    qagse
+        is an integrator based on globally adaptive interval
+        subdivision in connection with extrapolation, which will
+        eliminate the effects of integrand singularities of
+        several types.
+    qagie
+        handles integration over infinite intervals. The infinite range is
+        mapped onto a finite interval and subsequently the same strategy as
+        in ``QAGS`` is applied.
+    qagpe
+        serves the same purposes as QAGS, but also allows the
+        user to provide explicit information about the location
+        and type of trouble-spots i.e. the abscissae of internal
+        singularities, discontinuities and other difficulties of
+        the integrand function.
+    qawoe
+        is an integrator for the evaluation of
+        :math:`\int^b_a \cos(\omega x)f(x)dx` or
+        :math:`\int^b_a \sin(\omega x)f(x)dx`
+        over a finite interval [a,b], where :math:`\omega` and :math:`f`
+        are specified by the user. The rule evaluation component is based
+        on the modified Clenshaw-Curtis technique
+
+        An adaptive subdivision scheme is used in connection
+        with an extrapolation procedure, which is a modification
+        of that in ``QAGS`` and allows the algorithm to deal with
+        singularities in :math:`f(x)`.
+    qawfe
+        calculates the Fourier transform
+        :math:`\int^\infty_a \cos(\omega x)f(x)dx` or
+        :math:`\int^\infty_a \sin(\omega x)f(x)dx`
+        for user-provided :math:`\omega` and :math:`f`. The procedure of
+        ``QAWO`` is applied on successive finite intervals, and convergence
+        acceleration by means of the :math:`\varepsilon`-algorithm is applied
+        to the series of integral approximations.
+    qawse
+        approximate :math:`\int^b_a w(x)f(x)dx`, with :math:`a < b` where
+        :math:`w(x) = (x-a)^{\alpha}(b-x)^{\beta}v(x)` with
+        :math:`\alpha,\beta > -1`, where :math:`v(x)` may be one of the
+        following functions: :math:`1`, :math:`\log(x-a)`, :math:`\log(b-x)`,
+        :math:`\log(x-a)\log(b-x)`.
+
+        The user specifies :math:`\alpha`, :math:`\beta` and the type of the
+        function :math:`v`. A globally adaptive subdivision strategy is
+        applied, with modified Clenshaw-Curtis integration on those
+        subintervals which contain `a` or `b`.
+    qawce
+        compute :math:`\int^b_a f(x) / (x-c)dx` where the integral must be
+        interpreted as a Cauchy principal value integral, for user specified
+        :math:`c` and :math:`f`. The strategy is globally adaptive. Modified
+        Clenshaw-Curtis integration is used on those intervals containing the
+        point :math:`x = c`.
+
+    References
+    ----------
+
+    .. [1] Piessens, Robert; de Doncker-Kapenga, Elise;
+           Überhuber, Christoph W.; Kahaner, David (1983).
+           QUADPACK: A subroutine package for automatic integration.
+           Springer-Verlag.
+           ISBN 978-3-540-12553-2.
+
+    Examples
+    --------
+    Calculate
+
+    .. math::
+
+        \int^{1}_{-0.15} \int^{0.8}_{0.13} \int^{1}_{-1} \int^{1}_{0}
+        f(x_0, x_1, x_2, x_3) \,dx_0 \,dx_1 \,dx_2 \,dx_3 ,
+
+    where
+
+    .. math::
+
+        f(x_0, x_1, x_2, x_3) = \begin{cases}
+          x_0^2+x_1 x_2-x_3^3+ \sin{x_0}+1 & (x_0-0.2 x_3-0.5-0.25 x_1 > 0) \\
+          x_0^2+x_1 x_2-x_3^3+ \sin{x_0}+0 & (x_0-0.2 x_3-0.5-0.25 x_1 \leq 0)
+        \end{cases} .
+
+    >>> import numpy as np
+    >>> from scipy import integrate
+    >>> func = lambda x0,x1,x2,x3 : x0**2 + x1*x2 - x3**3 + np.sin(x0) + (
+    ...                                 1 if (x0-.2*x3-.5-.25*x1>0) else 0)
+    >>> def opts0(*args, **kwargs):
+    ...     return {'points':[0.2*args[2] + 0.5 + 0.25*args[0]]}
+    >>> integrate.nquad(func, [[0,1], [-1,1], [.13,.8], [-.15,1]],
+    ...                 opts=[opts0,{},{},{}], full_output=True)
+    (1.5267454070738633, 2.9437360001402324e-14, {'neval': 388962})
+
+    Calculate
+
+    .. math::
+
+        \int^{t_0+t_1+1}_{t_0+t_1-1}
+        \int^{x_2+t_0^2 t_1^3+1}_{x_2+t_0^2 t_1^3-1}
+        \int^{t_0 x_1+t_1 x_2+1}_{t_0 x_1+t_1 x_2-1}
+        f(x_0,x_1, x_2,t_0,t_1)
+        \,dx_0 \,dx_1 \,dx_2,
+
+    where
+
+    .. math::
+
+        f(x_0, x_1, x_2, t_0, t_1) = \begin{cases}
+          x_0 x_2^2 + \sin{x_1}+2 & (x_0+t_1 x_1-t_0 > 0) \\
+          x_0 x_2^2 +\sin{x_1}+1 & (x_0+t_1 x_1-t_0 \leq 0)
+        \end{cases}
+
+    and :math:`(t_0, t_1) = (0, 1)` .
+
+    >>> def func2(x0, x1, x2, t0, t1):
+    ...     return x0*x2**2 + np.sin(x1) + 1 + (1 if x0+t1*x1-t0>0 else 0)
+    >>> def lim0(x1, x2, t0, t1):
+    ...     return [t0*x1 + t1*x2 - 1, t0*x1 + t1*x2 + 1]
+    >>> def lim1(x2, t0, t1):
+    ...     return [x2 + t0**2*t1**3 - 1, x2 + t0**2*t1**3 + 1]
+    >>> def lim2(t0, t1):
+    ...     return [t0 + t1 - 1, t0 + t1 + 1]
+    >>> def opts0(x1, x2, t0, t1):
+    ...     return {'points' : [t0 - t1*x1]}
+    >>> def opts1(x2, t0, t1):
+    ...     return {}
+    >>> def opts2(t0, t1):
+    ...     return {}
+    >>> integrate.nquad(func2, [lim0, lim1, lim2], args=(0,1),
+    ...                 opts=[opts0, opts1, opts2])
+    (36.099919226771625, 1.8546948553373528e-07)
+
+    """
+    depth = len(ranges)
+    ranges = [rng if callable(rng) else _RangeFunc(rng) for rng in ranges]
+    if args is None:
+        args = ()
+    if opts is None:
+        opts = [dict([])] * depth
+
+    if isinstance(opts, dict):
+        opts = [_OptFunc(opts)] * depth
+    else:
+        opts = [opt if callable(opt) else _OptFunc(opt) for opt in opts]
+    return _NQuad(func, ranges, opts, full_output).integrate(*args)
+
+
+class _RangeFunc:
+    def __init__(self, range_):
+        self.range_ = range_
+
+    def __call__(self, *args):
+        """Return stored value.
+
+        *args needed because range_ can be float or func, and is called with
+        variable number of parameters.
+        """
+        return self.range_
+
+
+class _OptFunc:
+    def __init__(self, opt):
+        self.opt = opt
+
+    def __call__(self, *args):
+        """Return stored dict."""
+        return self.opt
+
+
+class _NQuad:
+    def __init__(self, func, ranges, opts, full_output):
+        self.abserr = 0
+        self.func = func
+        self.ranges = ranges
+        self.opts = opts
+        self.maxdepth = len(ranges)
+        self.full_output = full_output
+        if self.full_output:
+            self.out_dict = {'neval': 0}
+
+    def integrate(self, *args, **kwargs):
+        depth = kwargs.pop('depth', 0)
+        if kwargs:
+            raise ValueError('unexpected kwargs')
+
+        # Get the integration range and options for this depth.
+        ind = -(depth + 1)
+        fn_range = self.ranges[ind]
+        low, high = fn_range(*args)
+        fn_opt = self.opts[ind]
+        opt = dict(fn_opt(*args))
+
+        if 'points' in opt:
+            opt['points'] = [x for x in opt['points'] if low <= x <= high]
+        if depth + 1 == self.maxdepth:
+            f = self.func
+        else:
+            f = partial(self.integrate, depth=depth+1)
+        quad_r = quad(f, low, high, args=args, full_output=self.full_output,
+                      **opt)
+        value = quad_r[0]
+        abserr = quad_r[1]
+        if self.full_output:
+            infodict = quad_r[2]
+            # The 'neval' parameter in full_output returns the total
+            # number of times the integrand function was evaluated.
+            # Therefore, only the innermost integration loop counts.
+            if depth + 1 == self.maxdepth:
+                self.out_dict['neval'] += infodict['neval']
+        self.abserr = max(self.abserr, abserr)
+        if depth > 0:
+            return value
+        else:
+            # Final result of N-D integration with error
+            if self.full_output:
+                return value, self.abserr, self.out_dict
+            else:
+                return value, self.abserr
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadrature.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadrature.py
new file mode 100644
index 0000000000000000000000000000000000000000..44cf10b32335014cd7cb26459c8dc89ac8f851ff
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_quadrature.py
@@ -0,0 +1,1336 @@
+import numpy as np
+import numpy.typing as npt
+import math
+import warnings
+from collections import namedtuple
+from collections.abc import Callable
+
+from scipy.special import roots_legendre
+from scipy.special import gammaln, logsumexp
+from scipy._lib._util import _rng_spawn
+from scipy._lib._array_api import _asarray, array_namespace, xp_broadcast_promote
+
+
+__all__ = ['fixed_quad', 'romb',
+           'trapezoid', 'simpson',
+           'cumulative_trapezoid', 'newton_cotes',
+           'qmc_quad', 'cumulative_simpson']
+
+
+def trapezoid(y, x=None, dx=1.0, axis=-1):
+    r"""
+    Integrate along the given axis using the composite trapezoidal rule.
+
+    If `x` is provided, the integration happens in sequence along its
+    elements - they are not sorted.
+
+    Integrate `y` (`x`) along each 1d slice on the given axis, compute
+    :math:`\int y(x) dx`.
+    When `x` is specified, this integrates along the parametric curve,
+    computing :math:`\int_t y(t) dt =
+    \int_t y(t) \left.\frac{dx}{dt}\right|_{x=x(t)} dt`.
+
+    Parameters
+    ----------
+    y : array_like
+        Input array to integrate.
+    x : array_like, optional
+        The sample points corresponding to the `y` values. If `x` is None,
+        the sample points are assumed to be evenly spaced `dx` apart. The
+        default is None.
+    dx : scalar, optional
+        The spacing between sample points when `x` is None. The default is 1.
+    axis : int, optional
+        The axis along which to integrate. The default is the last axis.
+
+    Returns
+    -------
+    trapezoid : float or ndarray
+        Definite integral of `y` = n-dimensional array as approximated along
+        a single axis by the trapezoidal rule. If `y` is a 1-dimensional array,
+        then the result is a float. If `n` is greater than 1, then the result
+        is an `n`-1 dimensional array.
+
+    See Also
+    --------
+    cumulative_trapezoid, simpson, romb
+
+    Notes
+    -----
+    Image [2]_ illustrates trapezoidal rule -- y-axis locations of points
+    will be taken from `y` array, by default x-axis distances between
+    points will be 1.0, alternatively they can be provided with `x` array
+    or with `dx` scalar.  Return value will be equal to combined area under
+    the red lines.
+
+    References
+    ----------
+    .. [1] Wikipedia page: https://en.wikipedia.org/wiki/Trapezoidal_rule
+
+    .. [2] Illustration image:
+           https://en.wikipedia.org/wiki/File:Composite_trapezoidal_rule_illustration.png
+
+    Examples
+    --------
+    Use the trapezoidal rule on evenly spaced points:
+
+    >>> import numpy as np
+    >>> from scipy import integrate
+    >>> integrate.trapezoid([1, 2, 3])
+    4.0
+
+    The spacing between sample points can be selected by either the
+    ``x`` or ``dx`` arguments:
+
+    >>> integrate.trapezoid([1, 2, 3], x=[4, 6, 8])
+    8.0
+    >>> integrate.trapezoid([1, 2, 3], dx=2)
+    8.0
+
+    Using a decreasing ``x`` corresponds to integrating in reverse:
+
+    >>> integrate.trapezoid([1, 2, 3], x=[8, 6, 4])
+    -8.0
+
+    More generally ``x`` is used to integrate along a parametric curve. We can
+    estimate the integral :math:`\int_0^1 x^2 = 1/3` using:
+
+    >>> x = np.linspace(0, 1, num=50)
+    >>> y = x**2
+    >>> integrate.trapezoid(y, x)
+    0.33340274885464394
+
+    Or estimate the area of a circle, noting we repeat the sample which closes
+    the curve:
+
+    >>> theta = np.linspace(0, 2 * np.pi, num=1000, endpoint=True)
+    >>> integrate.trapezoid(np.cos(theta), x=np.sin(theta))
+    3.141571941375841
+
+    ``trapezoid`` can be applied along a specified axis to do multiple
+    computations in one call:
+
+    >>> a = np.arange(6).reshape(2, 3)
+    >>> a
+    array([[0, 1, 2],
+           [3, 4, 5]])
+    >>> integrate.trapezoid(a, axis=0)
+    array([1.5, 2.5, 3.5])
+    >>> integrate.trapezoid(a, axis=1)
+    array([2.,  8.])
+    """
+    xp = array_namespace(y)
+    y = _asarray(y, xp=xp, subok=True)
+    # Cannot just use the broadcasted arrays that are returned
+    # because trapezoid does not follow normal broadcasting rules
+    # cf. https://github.com/scipy/scipy/pull/21524#issuecomment-2354105942
+    result_dtype = xp_broadcast_promote(y, force_floating=True, xp=xp)[0].dtype
+    nd = y.ndim
+    slice1 = [slice(None)]*nd
+    slice2 = [slice(None)]*nd
+    slice1[axis] = slice(1, None)
+    slice2[axis] = slice(None, -1)
+    if x is None:
+        d = dx
+    else:
+        x = _asarray(x, xp=xp, subok=True)
+        if x.ndim == 1:
+            d = x[1:] - x[:-1]
+            # make d broadcastable to y
+            slice3 = [None] * nd
+            slice3[axis] = slice(None)
+            d = d[tuple(slice3)]
+        else:
+            # if x is n-D it should be broadcastable to y
+            x = xp.broadcast_to(x, y.shape)
+            d = x[tuple(slice1)] - x[tuple(slice2)]
+    try:
+        ret = xp.sum(
+            d * (y[tuple(slice1)] + y[tuple(slice2)]) / 2.0,
+            axis=axis, dtype=result_dtype
+        )
+    except ValueError:
+        # Operations didn't work, cast to ndarray
+        d = xp.asarray(d)
+        y = xp.asarray(y)
+        ret = xp.sum(
+            d * (y[tuple(slice1)] + y[tuple(slice2)]) / 2.0,
+            axis=axis, dtype=result_dtype
+        )
+    return ret
+
+
+def _cached_roots_legendre(n):
+    """
+    Cache roots_legendre results to speed up calls of the fixed_quad
+    function.
+    """
+    if n in _cached_roots_legendre.cache:
+        return _cached_roots_legendre.cache[n]
+
+    _cached_roots_legendre.cache[n] = roots_legendre(n)
+    return _cached_roots_legendre.cache[n]
+
+
+_cached_roots_legendre.cache = dict()
+
+
+def fixed_quad(func, a, b, args=(), n=5):
+    """
+    Compute a definite integral using fixed-order Gaussian quadrature.
+
+    Integrate `func` from `a` to `b` using Gaussian quadrature of
+    order `n`.
+
+    Parameters
+    ----------
+    func : callable
+        A Python function or method to integrate (must accept vector inputs).
+        If integrating a vector-valued function, the returned array must have
+        shape ``(..., len(x))``.
+    a : float
+        Lower limit of integration.
+    b : float
+        Upper limit of integration.
+    args : tuple, optional
+        Extra arguments to pass to function, if any.
+    n : int, optional
+        Order of quadrature integration. Default is 5.
+
+    Returns
+    -------
+    val : float
+        Gaussian quadrature approximation to the integral
+    none : None
+        Statically returned value of None
+
+    See Also
+    --------
+    quad : adaptive quadrature using QUADPACK
+    dblquad : double integrals
+    tplquad : triple integrals
+    romb : integrators for sampled data
+    simpson : integrators for sampled data
+    cumulative_trapezoid : cumulative integration for sampled data
+
+    Examples
+    --------
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> f = lambda x: x**8
+    >>> integrate.fixed_quad(f, 0.0, 1.0, n=4)
+    (0.1110884353741496, None)
+    >>> integrate.fixed_quad(f, 0.0, 1.0, n=5)
+    (0.11111111111111102, None)
+    >>> print(1/9.0)  # analytical result
+    0.1111111111111111
+
+    >>> integrate.fixed_quad(np.cos, 0.0, np.pi/2, n=4)
+    (0.9999999771971152, None)
+    >>> integrate.fixed_quad(np.cos, 0.0, np.pi/2, n=5)
+    (1.000000000039565, None)
+    >>> np.sin(np.pi/2)-np.sin(0)  # analytical result
+    1.0
+
+    """
+    x, w = _cached_roots_legendre(n)
+    x = np.real(x)
+    if np.isinf(a) or np.isinf(b):
+        raise ValueError("Gaussian quadrature is only available for "
+                         "finite limits.")
+    y = (b-a)*(x+1)/2.0 + a
+    return (b-a)/2.0 * np.sum(w*func(y, *args), axis=-1), None
+
+
+def tupleset(t, i, value):
+    l = list(t)
+    l[i] = value
+    return tuple(l)
+
+
+def cumulative_trapezoid(y, x=None, dx=1.0, axis=-1, initial=None):
+    """
+    Cumulatively integrate y(x) using the composite trapezoidal rule.
+
+    Parameters
+    ----------
+    y : array_like
+        Values to integrate.
+    x : array_like, optional
+        The coordinate to integrate along. If None (default), use spacing `dx`
+        between consecutive elements in `y`.
+    dx : float, optional
+        Spacing between elements of `y`. Only used if `x` is None.
+    axis : int, optional
+        Specifies the axis to cumulate. Default is -1 (last axis).
+    initial : scalar, optional
+        If given, insert this value at the beginning of the returned result.
+        0 or None are the only values accepted. Default is None, which means
+        `res` has one element less than `y` along the axis of integration.
+
+    Returns
+    -------
+    res : ndarray
+        The result of cumulative integration of `y` along `axis`.
+        If `initial` is None, the shape is such that the axis of integration
+        has one less value than `y`. If `initial` is given, the shape is equal
+        to that of `y`.
+
+    See Also
+    --------
+    numpy.cumsum, numpy.cumprod
+    cumulative_simpson : cumulative integration using Simpson's 1/3 rule
+    quad : adaptive quadrature using QUADPACK
+    fixed_quad : fixed-order Gaussian quadrature
+    dblquad : double integrals
+    tplquad : triple integrals
+    romb : integrators for sampled data
+
+    Examples
+    --------
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+
+    >>> x = np.linspace(-2, 2, num=20)
+    >>> y = x
+    >>> y_int = integrate.cumulative_trapezoid(y, x, initial=0)
+    >>> plt.plot(x, y_int, 'ro', x, y[0] + 0.5 * x**2, 'b-')
+    >>> plt.show()
+
+    """
+    y = np.asarray(y)
+    if y.shape[axis] == 0:
+        raise ValueError("At least one point is required along `axis`.")
+    if x is None:
+        d = dx
+    else:
+        x = np.asarray(x)
+        if x.ndim == 1:
+            d = np.diff(x)
+            # reshape to correct shape
+            shape = [1] * y.ndim
+            shape[axis] = -1
+            d = d.reshape(shape)
+        elif len(x.shape) != len(y.shape):
+            raise ValueError("If given, shape of x must be 1-D or the "
+                             "same as y.")
+        else:
+            d = np.diff(x, axis=axis)
+
+        if d.shape[axis] != y.shape[axis] - 1:
+            raise ValueError("If given, length of x along axis must be the "
+                             "same as y.")
+
+    nd = len(y.shape)
+    slice1 = tupleset((slice(None),)*nd, axis, slice(1, None))
+    slice2 = tupleset((slice(None),)*nd, axis, slice(None, -1))
+    res = np.cumsum(d * (y[slice1] + y[slice2]) / 2.0, axis=axis)
+
+    if initial is not None:
+        if initial != 0:
+            raise ValueError("`initial` must be `None` or `0`.")
+        if not np.isscalar(initial):
+            raise ValueError("`initial` parameter should be a scalar.")
+
+        shape = list(res.shape)
+        shape[axis] = 1
+        res = np.concatenate([np.full(shape, initial, dtype=res.dtype), res],
+                             axis=axis)
+
+    return res
+
+
+def _basic_simpson(y, start, stop, x, dx, axis):
+    nd = len(y.shape)
+    if start is None:
+        start = 0
+    step = 2
+    slice_all = (slice(None),)*nd
+    slice0 = tupleset(slice_all, axis, slice(start, stop, step))
+    slice1 = tupleset(slice_all, axis, slice(start+1, stop+1, step))
+    slice2 = tupleset(slice_all, axis, slice(start+2, stop+2, step))
+
+    if x is None:  # Even-spaced Simpson's rule.
+        result = np.sum(y[slice0] + 4.0*y[slice1] + y[slice2], axis=axis)
+        result *= dx / 3.0
+    else:
+        # Account for possibly different spacings.
+        #    Simpson's rule changes a bit.
+        h = np.diff(x, axis=axis)
+        sl0 = tupleset(slice_all, axis, slice(start, stop, step))
+        sl1 = tupleset(slice_all, axis, slice(start+1, stop+1, step))
+        h0 = h[sl0].astype(float, copy=False)
+        h1 = h[sl1].astype(float, copy=False)
+        hsum = h0 + h1
+        hprod = h0 * h1
+        h0divh1 = np.true_divide(h0, h1, out=np.zeros_like(h0), where=h1 != 0)
+        tmp = hsum/6.0 * (y[slice0] *
+                          (2.0 - np.true_divide(1.0, h0divh1,
+                                                out=np.zeros_like(h0divh1),
+                                                where=h0divh1 != 0)) +
+                          y[slice1] * (hsum *
+                                       np.true_divide(hsum, hprod,
+                                                      out=np.zeros_like(hsum),
+                                                      where=hprod != 0)) +
+                          y[slice2] * (2.0 - h0divh1))
+        result = np.sum(tmp, axis=axis)
+    return result
+
+
+def simpson(y, x=None, *, dx=1.0, axis=-1):
+    """
+    Integrate y(x) using samples along the given axis and the composite
+    Simpson's rule. If x is None, spacing of dx is assumed.
+
+    Parameters
+    ----------
+    y : array_like
+        Array to be integrated.
+    x : array_like, optional
+        If given, the points at which `y` is sampled.
+    dx : float, optional
+        Spacing of integration points along axis of `x`. Only used when
+        `x` is None. Default is 1.
+    axis : int, optional
+        Axis along which to integrate. Default is the last axis.
+
+    Returns
+    -------
+    float
+        The estimated integral computed with the composite Simpson's rule.
+
+    See Also
+    --------
+    quad : adaptive quadrature using QUADPACK
+    fixed_quad : fixed-order Gaussian quadrature
+    dblquad : double integrals
+    tplquad : triple integrals
+    romb : integrators for sampled data
+    cumulative_trapezoid : cumulative integration for sampled data
+    cumulative_simpson : cumulative integration using Simpson's 1/3 rule
+
+    Notes
+    -----
+    For an odd number of samples that are equally spaced the result is
+    exact if the function is a polynomial of order 3 or less. If
+    the samples are not equally spaced, then the result is exact only
+    if the function is a polynomial of order 2 or less.
+
+    References
+    ----------
+    .. [1] Cartwright, Kenneth V. Simpson's Rule Cumulative Integration with
+           MS Excel and Irregularly-spaced Data. Journal of Mathematical
+           Sciences and Mathematics Education. 12 (2): 1-9
+
+    Examples
+    --------
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> x = np.arange(0, 10)
+    >>> y = np.arange(0, 10)
+
+    >>> integrate.simpson(y, x=x)
+    40.5
+
+    >>> y = np.power(x, 3)
+    >>> integrate.simpson(y, x=x)
+    1640.5
+    >>> integrate.quad(lambda x: x**3, 0, 9)[0]
+    1640.25
+
+    """
+    y = np.asarray(y)
+    nd = len(y.shape)
+    N = y.shape[axis]
+    last_dx = dx
+    returnshape = 0
+    if x is not None:
+        x = np.asarray(x)
+        if len(x.shape) == 1:
+            shapex = [1] * nd
+            shapex[axis] = x.shape[0]
+            saveshape = x.shape
+            returnshape = 1
+            x = x.reshape(tuple(shapex))
+        elif len(x.shape) != len(y.shape):
+            raise ValueError("If given, shape of x must be 1-D or the "
+                             "same as y.")
+        if x.shape[axis] != N:
+            raise ValueError("If given, length of x along axis must be the "
+                             "same as y.")
+
+    if N % 2 == 0:
+        val = 0.0
+        result = 0.0
+        slice_all = (slice(None),) * nd
+
+        if N == 2:
+            # need at least 3 points in integration axis to form parabolic
+            # segment. If there are two points then any of 'avg', 'first',
+            # 'last' should give the same result.
+            slice1 = tupleset(slice_all, axis, -1)
+            slice2 = tupleset(slice_all, axis, -2)
+            if x is not None:
+                last_dx = x[slice1] - x[slice2]
+            val += 0.5 * last_dx * (y[slice1] + y[slice2])
+        else:
+            # use Simpson's rule on first intervals
+            result = _basic_simpson(y, 0, N-3, x, dx, axis)
+
+            slice1 = tupleset(slice_all, axis, -1)
+            slice2 = tupleset(slice_all, axis, -2)
+            slice3 = tupleset(slice_all, axis, -3)
+
+            h = np.asarray([dx, dx], dtype=np.float64)
+            if x is not None:
+                # grab the last two spacings from the appropriate axis
+                hm2 = tupleset(slice_all, axis, slice(-2, -1, 1))
+                hm1 = tupleset(slice_all, axis, slice(-1, None, 1))
+
+                diffs = np.float64(np.diff(x, axis=axis))
+                h = [np.squeeze(diffs[hm2], axis=axis),
+                     np.squeeze(diffs[hm1], axis=axis)]
+
+            # This is the correction for the last interval according to
+            # Cartwright.
+            # However, I used the equations given at
+            # https://en.wikipedia.org/wiki/Simpson%27s_rule#Composite_Simpson's_rule_for_irregularly_spaced_data
+            # A footnote on Wikipedia says:
+            # Cartwright 2017, Equation 8. The equation in Cartwright is
+            # calculating the first interval whereas the equations in the
+            # Wikipedia article are adjusting for the last integral. If the
+            # proper algebraic substitutions are made, the equation results in
+            # the values shown.
+            num = 2 * h[1] ** 2 + 3 * h[0] * h[1]
+            den = 6 * (h[1] + h[0])
+            alpha = np.true_divide(
+                num,
+                den,
+                out=np.zeros_like(den),
+                where=den != 0
+            )
+
+            num = h[1] ** 2 + 3.0 * h[0] * h[1]
+            den = 6 * h[0]
+            beta = np.true_divide(
+                num,
+                den,
+                out=np.zeros_like(den),
+                where=den != 0
+            )
+
+            num = 1 * h[1] ** 3
+            den = 6 * h[0] * (h[0] + h[1])
+            eta = np.true_divide(
+                num,
+                den,
+                out=np.zeros_like(den),
+                where=den != 0
+            )
+
+            result += alpha*y[slice1] + beta*y[slice2] - eta*y[slice3]
+
+        result += val
+    else:
+        result = _basic_simpson(y, 0, N-2, x, dx, axis)
+    if returnshape:
+        x = x.reshape(saveshape)
+    return result
+
+
+def _cumulatively_sum_simpson_integrals(
+    y: np.ndarray, 
+    dx: np.ndarray, 
+    integration_func: Callable[[np.ndarray, np.ndarray], np.ndarray],
+) -> np.ndarray:
+    """Calculate cumulative sum of Simpson integrals.
+    Takes as input the integration function to be used. 
+    The integration_func is assumed to return the cumulative sum using
+    composite Simpson's rule. Assumes the axis of summation is -1.
+    """
+    sub_integrals_h1 = integration_func(y, dx)
+    sub_integrals_h2 = integration_func(y[..., ::-1], dx[..., ::-1])[..., ::-1]
+    
+    shape = list(sub_integrals_h1.shape)
+    shape[-1] += 1
+    sub_integrals = np.empty(shape)
+    sub_integrals[..., :-1:2] = sub_integrals_h1[..., ::2]
+    sub_integrals[..., 1::2] = sub_integrals_h2[..., ::2]
+    # Integral over last subinterval can only be calculated from 
+    # formula for h2
+    sub_integrals[..., -1] = sub_integrals_h2[..., -1]
+    res = np.cumsum(sub_integrals, axis=-1)
+    return res
+
+
+def _cumulative_simpson_equal_intervals(y: np.ndarray, dx: np.ndarray) -> np.ndarray:
+    """Calculate the Simpson integrals for all h1 intervals assuming equal interval
+    widths. The function can also be used to calculate the integral for all
+    h2 intervals by reversing the inputs, `y` and `dx`.
+    """
+    d = dx[..., :-1]
+    f1 = y[..., :-2]
+    f2 = y[..., 1:-1]
+    f3 = y[..., 2:]
+
+    # Calculate integral over the subintervals (eqn (10) of Reference [2])
+    return d / 3 * (5 * f1 / 4 + 2 * f2 - f3 / 4)
+
+
+def _cumulative_simpson_unequal_intervals(y: np.ndarray, dx: np.ndarray) -> np.ndarray:
+    """Calculate the Simpson integrals for all h1 intervals assuming unequal interval
+    widths. The function can also be used to calculate the integral for all
+    h2 intervals by reversing the inputs, `y` and `dx`.
+    """
+    x21 = dx[..., :-1]
+    x32 = dx[..., 1:]
+    f1 = y[..., :-2]
+    f2 = y[..., 1:-1]
+    f3 = y[..., 2:]
+
+    x31 = x21 + x32
+    x21_x31 = x21/x31
+    x21_x32 = x21/x32
+    x21x21_x31x32 = x21_x31 * x21_x32
+
+    # Calculate integral over the subintervals (eqn (8) of Reference [2])
+    coeff1 = 3 - x21_x31
+    coeff2 = 3 + x21x21_x31x32 + x21_x31
+    coeff3 = -x21x21_x31x32
+
+    return x21/6 * (coeff1*f1 + coeff2*f2 + coeff3*f3)
+
+
+def _ensure_float_array(arr: npt.ArrayLike) -> np.ndarray:
+    arr = np.asarray(arr)
+    if np.issubdtype(arr.dtype, np.integer):
+        arr = arr.astype(float, copy=False)
+    return arr
+
+
+def cumulative_simpson(y, *, x=None, dx=1.0, axis=-1, initial=None):
+    r"""
+    Cumulatively integrate y(x) using the composite Simpson's 1/3 rule.
+    The integral of the samples at every point is calculated by assuming a 
+    quadratic relationship between each point and the two adjacent points.
+
+    Parameters
+    ----------
+    y : array_like
+        Values to integrate. Requires at least one point along `axis`. If two or fewer
+        points are provided along `axis`, Simpson's integration is not possible and the
+        result is calculated with `cumulative_trapezoid`.
+    x : array_like, optional
+        The coordinate to integrate along. Must have the same shape as `y` or
+        must be 1D with the same length as `y` along `axis`. `x` must also be
+        strictly increasing along `axis`.
+        If `x` is None (default), integration is performed using spacing `dx`
+        between consecutive elements in `y`.
+    dx : scalar or array_like, optional
+        Spacing between elements of `y`. Only used if `x` is None. Can either 
+        be a float, or an array with the same shape as `y`, but of length one along
+        `axis`. Default is 1.0.
+    axis : int, optional
+        Specifies the axis to integrate along. Default is -1 (last axis).
+    initial : scalar or array_like, optional
+        If given, insert this value at the beginning of the returned result,
+        and add it to the rest of the result. Default is None, which means no
+        value at ``x[0]`` is returned and `res` has one element less than `y`
+        along the axis of integration. Can either be a float, or an array with
+        the same shape as `y`, but of length one along `axis`.
+
+    Returns
+    -------
+    res : ndarray
+        The result of cumulative integration of `y` along `axis`.
+        If `initial` is None, the shape is such that the axis of integration
+        has one less value than `y`. If `initial` is given, the shape is equal
+        to that of `y`.
+
+    See Also
+    --------
+    numpy.cumsum
+    cumulative_trapezoid : cumulative integration using the composite 
+        trapezoidal rule
+    simpson : integrator for sampled data using the Composite Simpson's Rule
+
+    Notes
+    -----
+
+    .. versionadded:: 1.12.0
+
+    The composite Simpson's 1/3 method can be used to approximate the definite 
+    integral of a sampled input function :math:`y(x)` [1]_. The method assumes 
+    a quadratic relationship over the interval containing any three consecutive
+    sampled points.
+
+    Consider three consecutive points: 
+    :math:`(x_1, y_1), (x_2, y_2), (x_3, y_3)`.
+
+    Assuming a quadratic relationship over the three points, the integral over
+    the subinterval between :math:`x_1` and :math:`x_2` is given by formula
+    (8) of [2]_:
+    
+    .. math::
+        \int_{x_1}^{x_2} y(x) dx\ &= \frac{x_2-x_1}{6}\left[\
+        \left\{3-\frac{x_2-x_1}{x_3-x_1}\right\} y_1 + \
+        \left\{3 + \frac{(x_2-x_1)^2}{(x_3-x_2)(x_3-x_1)} + \
+        \frac{x_2-x_1}{x_3-x_1}\right\} y_2\\
+        - \frac{(x_2-x_1)^2}{(x_3-x_2)(x_3-x_1)} y_3\right]
+
+    The integral between :math:`x_2` and :math:`x_3` is given by swapping
+    appearances of :math:`x_1` and :math:`x_3`. The integral is estimated
+    separately for each subinterval and then cumulatively summed to obtain
+    the final result.
+    
+    For samples that are equally spaced, the result is exact if the function
+    is a polynomial of order three or less [1]_ and the number of subintervals
+    is even. Otherwise, the integral is exact for polynomials of order two or
+    less. 
+
+    References
+    ----------
+    .. [1] Wikipedia page: https://en.wikipedia.org/wiki/Simpson's_rule
+    .. [2] Cartwright, Kenneth V. Simpson's Rule Cumulative Integration with
+            MS Excel and Irregularly-spaced Data. Journal of Mathematical
+            Sciences and Mathematics Education. 12 (2): 1-9
+
+    Examples
+    --------
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> x = np.linspace(-2, 2, num=20)
+    >>> y = x**2
+    >>> y_int = integrate.cumulative_simpson(y, x=x, initial=0)
+    >>> fig, ax = plt.subplots()
+    >>> ax.plot(x, y_int, 'ro', x, x**3/3 - (x[0])**3/3, 'b-')
+    >>> ax.grid()
+    >>> plt.show()
+
+    The output of `cumulative_simpson` is similar to that of iteratively
+    calling `simpson` with successively higher upper limits of integration, but
+    not identical.
+
+    >>> def cumulative_simpson_reference(y, x):
+    ...     return np.asarray([integrate.simpson(y[:i], x=x[:i])
+    ...                        for i in range(2, len(y) + 1)])
+    >>>
+    >>> rng = np.random.default_rng(354673834679465)
+    >>> x, y = rng.random(size=(2, 10))
+    >>> x.sort()
+    >>>
+    >>> res = integrate.cumulative_simpson(y, x=x)
+    >>> ref = cumulative_simpson_reference(y, x)
+    >>> equal = np.abs(res - ref) < 1e-15
+    >>> equal  # not equal when `simpson` has even number of subintervals
+    array([False,  True, False,  True, False,  True, False,  True,  True])
+
+    This is expected: because `cumulative_simpson` has access to more
+    information than `simpson`, it can typically produce more accurate
+    estimates of the underlying integral over subintervals.
+
+    """
+    y = _ensure_float_array(y)
+
+    # validate `axis` and standardize to work along the last axis
+    original_y = y
+    original_shape = y.shape
+    try:
+        y = np.swapaxes(y, axis, -1)
+    except IndexError as e:
+        message = f"`axis={axis}` is not valid for `y` with `y.ndim={y.ndim}`."
+        raise ValueError(message) from e
+    if y.shape[-1] < 3:
+        res = cumulative_trapezoid(original_y, x, dx=dx, axis=axis, initial=None)
+        res = np.swapaxes(res, axis, -1)
+
+    elif x is not None:
+        x = _ensure_float_array(x)
+        message = ("If given, shape of `x` must be the same as `y` or 1-D with "
+                   "the same length as `y` along `axis`.")
+        if not (x.shape == original_shape
+                or (x.ndim == 1 and len(x) == original_shape[axis])):
+            raise ValueError(message)
+
+        x = np.broadcast_to(x, y.shape) if x.ndim == 1 else np.swapaxes(x, axis, -1)
+        dx = np.diff(x, axis=-1)
+        if np.any(dx <= 0):
+            raise ValueError("Input x must be strictly increasing.")
+        res = _cumulatively_sum_simpson_integrals(
+            y, dx, _cumulative_simpson_unequal_intervals
+        )
+
+    else:
+        dx = _ensure_float_array(dx)
+        final_dx_shape = tupleset(original_shape, axis, original_shape[axis] - 1)
+        alt_input_dx_shape = tupleset(original_shape, axis, 1)
+        message = ("If provided, `dx` must either be a scalar or have the same "
+                   "shape as `y` but with only 1 point along `axis`.")
+        if not (dx.ndim == 0 or dx.shape == alt_input_dx_shape):
+            raise ValueError(message)
+        dx = np.broadcast_to(dx, final_dx_shape)
+        dx = np.swapaxes(dx, axis, -1)
+        res = _cumulatively_sum_simpson_integrals(
+            y, dx, _cumulative_simpson_equal_intervals
+        )
+
+    if initial is not None:
+        initial = _ensure_float_array(initial)
+        alt_initial_input_shape = tupleset(original_shape, axis, 1)
+        message = ("If provided, `initial` must either be a scalar or have the "
+                   "same shape as `y` but with only 1 point along `axis`.")
+        if not (initial.ndim == 0 or initial.shape == alt_initial_input_shape):
+            raise ValueError(message)
+        initial = np.broadcast_to(initial, alt_initial_input_shape)
+        initial = np.swapaxes(initial, axis, -1)
+
+        res += initial
+        res = np.concatenate((initial, res), axis=-1)
+
+    res = np.swapaxes(res, -1, axis)
+    return res
+
+
+def romb(y, dx=1.0, axis=-1, show=False):
+    """
+    Romberg integration using samples of a function.
+
+    Parameters
+    ----------
+    y : array_like
+        A vector of ``2**k + 1`` equally-spaced samples of a function.
+    dx : float, optional
+        The sample spacing. Default is 1.
+    axis : int, optional
+        The axis along which to integrate. Default is -1 (last axis).
+    show : bool, optional
+        When `y` is a single 1-D array, then if this argument is True
+        print the table showing Richardson extrapolation from the
+        samples. Default is False.
+
+    Returns
+    -------
+    romb : ndarray
+        The integrated result for `axis`.
+
+    See Also
+    --------
+    quad : adaptive quadrature using QUADPACK
+    fixed_quad : fixed-order Gaussian quadrature
+    dblquad : double integrals
+    tplquad : triple integrals
+    simpson : integrators for sampled data
+    cumulative_trapezoid : cumulative integration for sampled data
+
+    Examples
+    --------
+    >>> from scipy import integrate
+    >>> import numpy as np
+    >>> x = np.arange(10, 14.25, 0.25)
+    >>> y = np.arange(3, 12)
+
+    >>> integrate.romb(y)
+    56.0
+
+    >>> y = np.sin(np.power(x, 2.5))
+    >>> integrate.romb(y)
+    -0.742561336672229
+
+    >>> integrate.romb(y, show=True)
+    Richardson Extrapolation Table for Romberg Integration
+    ======================================================
+    -0.81576
+     4.63862  6.45674
+    -1.10581 -3.02062 -3.65245
+    -2.57379 -3.06311 -3.06595 -3.05664
+    -1.34093 -0.92997 -0.78776 -0.75160 -0.74256
+    ======================================================
+    -0.742561336672229  # may vary
+
+    """
+    y = np.asarray(y)
+    nd = len(y.shape)
+    Nsamps = y.shape[axis]
+    Ninterv = Nsamps-1
+    n = 1
+    k = 0
+    while n < Ninterv:
+        n <<= 1
+        k += 1
+    if n != Ninterv:
+        raise ValueError("Number of samples must be one plus a "
+                         "non-negative power of 2.")
+
+    R = {}
+    slice_all = (slice(None),) * nd
+    slice0 = tupleset(slice_all, axis, 0)
+    slicem1 = tupleset(slice_all, axis, -1)
+    h = Ninterv * np.asarray(dx, dtype=float)
+    R[(0, 0)] = (y[slice0] + y[slicem1])/2.0*h
+    slice_R = slice_all
+    start = stop = step = Ninterv
+    for i in range(1, k+1):
+        start >>= 1
+        slice_R = tupleset(slice_R, axis, slice(start, stop, step))
+        step >>= 1
+        R[(i, 0)] = 0.5*(R[(i-1, 0)] + h*y[slice_R].sum(axis=axis))
+        for j in range(1, i+1):
+            prev = R[(i, j-1)]
+            R[(i, j)] = prev + (prev-R[(i-1, j-1)]) / ((1 << (2*j))-1)
+        h /= 2.0
+
+    if show:
+        if not np.isscalar(R[(0, 0)]):
+            print("*** Printing table only supported for integrals" +
+                  " of a single data set.")
+        else:
+            try:
+                precis = show[0]
+            except (TypeError, IndexError):
+                precis = 5
+            try:
+                width = show[1]
+            except (TypeError, IndexError):
+                width = 8
+            formstr = "%%%d.%df" % (width, precis)
+
+            title = "Richardson Extrapolation Table for Romberg Integration"
+            print(title, "=" * len(title), sep="\n", end="\n")
+            for i in range(k+1):
+                for j in range(i+1):
+                    print(formstr % R[(i, j)], end=" ")
+                print()
+            print("=" * len(title))
+
+    return R[(k, k)]
+
+
+# Coefficients for Newton-Cotes quadrature
+#
+# These are the points being used
+#  to construct the local interpolating polynomial
+#  a are the weights for Newton-Cotes integration
+#  B is the error coefficient.
+#  error in these coefficients grows as N gets larger.
+#  or as samples are closer and closer together
+
+# You can use maxima to find these rational coefficients
+#  for equally spaced data using the commands
+#  a(i,N) := (integrate(product(r-j,j,0,i-1) * product(r-j,j,i+1,N),r,0,N)
+#             / ((N-i)! * i!) * (-1)^(N-i));
+#  Be(N) := N^(N+2)/(N+2)! * (N/(N+3) - sum((i/N)^(N+2)*a(i,N),i,0,N));
+#  Bo(N) := N^(N+1)/(N+1)! * (N/(N+2) - sum((i/N)^(N+1)*a(i,N),i,0,N));
+#  B(N) := (if (mod(N,2)=0) then Be(N) else Bo(N));
+#
+# pre-computed for equally-spaced weights
+#
+# num_a, den_a, int_a, num_B, den_B = _builtincoeffs[N]
+#
+#  a = num_a*array(int_a)/den_a
+#  B = num_B*1.0 / den_B
+#
+#  integrate(f(x),x,x_0,x_N) = dx*sum(a*f(x_i)) + B*(dx)^(2k+3) f^(2k+2)(x*)
+#    where k = N // 2
+#
+_builtincoeffs = {
+    1: (1,2,[1,1],-1,12),
+    2: (1,3,[1,4,1],-1,90),
+    3: (3,8,[1,3,3,1],-3,80),
+    4: (2,45,[7,32,12,32,7],-8,945),
+    5: (5,288,[19,75,50,50,75,19],-275,12096),
+    6: (1,140,[41,216,27,272,27,216,41],-9,1400),
+    7: (7,17280,[751,3577,1323,2989,2989,1323,3577,751],-8183,518400),
+    8: (4,14175,[989,5888,-928,10496,-4540,10496,-928,5888,989],
+        -2368,467775),
+    9: (9,89600,[2857,15741,1080,19344,5778,5778,19344,1080,
+                 15741,2857], -4671, 394240),
+    10: (5,299376,[16067,106300,-48525,272400,-260550,427368,
+                   -260550,272400,-48525,106300,16067],
+         -673175, 163459296),
+    11: (11,87091200,[2171465,13486539,-3237113, 25226685,-9595542,
+                      15493566,15493566,-9595542,25226685,-3237113,
+                      13486539,2171465], -2224234463, 237758976000),
+    12: (1, 5255250, [1364651,9903168,-7587864,35725120,-51491295,
+                      87516288,-87797136,87516288,-51491295,35725120,
+                      -7587864,9903168,1364651], -3012, 875875),
+    13: (13, 402361344000,[8181904909, 56280729661, -31268252574,
+                           156074417954,-151659573325,206683437987,
+                           -43111992612,-43111992612,206683437987,
+                           -151659573325,156074417954,-31268252574,
+                           56280729661,8181904909], -2639651053,
+         344881152000),
+    14: (7, 2501928000, [90241897,710986864,-770720657,3501442784,
+                         -6625093363,12630121616,-16802270373,19534438464,
+                         -16802270373,12630121616,-6625093363,3501442784,
+                         -770720657,710986864,90241897], -3740727473,
+         1275983280000)
+    }
+
+
+def newton_cotes(rn, equal=0):
+    r"""
+    Return weights and error coefficient for Newton-Cotes integration.
+
+    Suppose we have (N+1) samples of f at the positions
+    x_0, x_1, ..., x_N. Then an N-point Newton-Cotes formula for the
+    integral between x_0 and x_N is:
+
+    :math:`\int_{x_0}^{x_N} f(x)dx = \Delta x \sum_{i=0}^{N} a_i f(x_i)
+    + B_N (\Delta x)^{N+2} f^{N+1} (\xi)`
+
+    where :math:`\xi \in [x_0,x_N]`
+    and :math:`\Delta x = \frac{x_N-x_0}{N}` is the average samples spacing.
+
+    If the samples are equally-spaced and N is even, then the error
+    term is :math:`B_N (\Delta x)^{N+3} f^{N+2}(\xi)`.
+
+    Parameters
+    ----------
+    rn : int
+        The integer order for equally-spaced data or the relative positions of
+        the samples with the first sample at 0 and the last at N, where N+1 is
+        the length of `rn`. N is the order of the Newton-Cotes integration.
+    equal : int, optional
+        Set to 1 to enforce equally spaced data.
+
+    Returns
+    -------
+    an : ndarray
+        1-D array of weights to apply to the function at the provided sample
+        positions.
+    B : float
+        Error coefficient.
+
+    Notes
+    -----
+    Normally, the Newton-Cotes rules are used on smaller integration
+    regions and a composite rule is used to return the total integral.
+
+    Examples
+    --------
+    Compute the integral of sin(x) in [0, :math:`\pi`]:
+
+    >>> from scipy.integrate import newton_cotes
+    >>> import numpy as np
+    >>> def f(x):
+    ...     return np.sin(x)
+    >>> a = 0
+    >>> b = np.pi
+    >>> exact = 2
+    >>> for N in [2, 4, 6, 8, 10]:
+    ...     x = np.linspace(a, b, N + 1)
+    ...     an, B = newton_cotes(N, 1)
+    ...     dx = (b - a) / N
+    ...     quad = dx * np.sum(an * f(x))
+    ...     error = abs(quad - exact)
+    ...     print('{:2d}  {:10.9f}  {:.5e}'.format(N, quad, error))
+    ...
+     2   2.094395102   9.43951e-02
+     4   1.998570732   1.42927e-03
+     6   2.000017814   1.78136e-05
+     8   1.999999835   1.64725e-07
+    10   2.000000001   1.14677e-09
+
+    """
+    try:
+        N = len(rn)-1
+        if equal:
+            rn = np.arange(N+1)
+        elif np.all(np.diff(rn) == 1):
+            equal = 1
+    except Exception:
+        N = rn
+        rn = np.arange(N+1)
+        equal = 1
+
+    if equal and N in _builtincoeffs:
+        na, da, vi, nb, db = _builtincoeffs[N]
+        an = na * np.array(vi, dtype=float) / da
+        return an, float(nb)/db
+
+    if (rn[0] != 0) or (rn[-1] != N):
+        raise ValueError("The sample positions must start at 0"
+                         " and end at N")
+    yi = rn / float(N)
+    ti = 2 * yi - 1
+    nvec = np.arange(N+1)
+    C = ti ** nvec[:, np.newaxis]
+    Cinv = np.linalg.inv(C)
+    # improve precision of result
+    for i in range(2):
+        Cinv = 2*Cinv - Cinv.dot(C).dot(Cinv)
+    vec = 2.0 / (nvec[::2]+1)
+    ai = Cinv[:, ::2].dot(vec) * (N / 2.)
+
+    if (N % 2 == 0) and equal:
+        BN = N/(N+3.)
+        power = N+2
+    else:
+        BN = N/(N+2.)
+        power = N+1
+
+    BN = BN - np.dot(yi**power, ai)
+    p1 = power+1
+    fac = power*math.log(N) - gammaln(p1)
+    fac = math.exp(fac)
+    return ai, BN*fac
+
+
+def _qmc_quad_iv(func, a, b, n_points, n_estimates, qrng, log):
+
+    # lazy import to avoid issues with partially-initialized submodule
+    if not hasattr(qmc_quad, 'qmc'):
+        from scipy import stats
+        qmc_quad.stats = stats
+    else:
+        stats = qmc_quad.stats
+
+    if not callable(func):
+        message = "`func` must be callable."
+        raise TypeError(message)
+
+    # a, b will be modified, so copy. Oh well if it's copied twice.
+    a = np.atleast_1d(a).copy()
+    b = np.atleast_1d(b).copy()
+    a, b = np.broadcast_arrays(a, b)
+    dim = a.shape[0]
+
+    try:
+        func((a + b) / 2)
+    except Exception as e:
+        message = ("`func` must evaluate the integrand at points within "
+                   "the integration range; e.g. `func( (a + b) / 2)` "
+                   "must return the integrand at the centroid of the "
+                   "integration volume.")
+        raise ValueError(message) from e
+
+    try:
+        func(np.array([a, b]).T)
+        vfunc = func
+    except Exception as e:
+        message = ("Exception encountered when attempting vectorized call to "
+                   f"`func`: {e}. For better performance, `func` should "
+                   "accept two-dimensional array `x` with shape `(len(a), "
+                   "n_points)` and return an array of the integrand value at "
+                   "each of the `n_points.")
+        warnings.warn(message, stacklevel=3)
+
+        def vfunc(x):
+            return np.apply_along_axis(func, axis=-1, arr=x)
+
+    n_points_int = np.int64(n_points)
+    if n_points != n_points_int:
+        message = "`n_points` must be an integer."
+        raise TypeError(message)
+
+    n_estimates_int = np.int64(n_estimates)
+    if n_estimates != n_estimates_int:
+        message = "`n_estimates` must be an integer."
+        raise TypeError(message)
+
+    if qrng is None:
+        qrng = stats.qmc.Halton(dim)
+    elif not isinstance(qrng, stats.qmc.QMCEngine):
+        message = "`qrng` must be an instance of scipy.stats.qmc.QMCEngine."
+        raise TypeError(message)
+
+    if qrng.d != a.shape[0]:
+        message = ("`qrng` must be initialized with dimensionality equal to "
+                   "the number of variables in `a`, i.e., "
+                   "`qrng.random().shape[-1]` must equal `a.shape[0]`.")
+        raise ValueError(message)
+
+    rng_seed = getattr(qrng, 'rng_seed', None)
+    rng = stats._qmc.check_random_state(rng_seed)
+
+    if log not in {True, False}:
+        message = "`log` must be boolean (`True` or `False`)."
+        raise TypeError(message)
+
+    return (vfunc, a, b, n_points_int, n_estimates_int, qrng, rng, log, stats)
+
+
+QMCQuadResult = namedtuple('QMCQuadResult', ['integral', 'standard_error'])
+
+
+def qmc_quad(func, a, b, *, n_estimates=8, n_points=1024, qrng=None,
+             log=False):
+    """
+    Compute an integral in N-dimensions using Quasi-Monte Carlo quadrature.
+
+    Parameters
+    ----------
+    func : callable
+        The integrand. Must accept a single argument ``x``, an array which
+        specifies the point(s) at which to evaluate the scalar-valued
+        integrand, and return the value(s) of the integrand.
+        For efficiency, the function should be vectorized to accept an array of
+        shape ``(d, n_points)``, where ``d`` is the number of variables (i.e.
+        the dimensionality of the function domain) and `n_points` is the number
+        of quadrature points, and return an array of shape ``(n_points,)``,
+        the integrand at each quadrature point.
+    a, b : array-like
+        One-dimensional arrays specifying the lower and upper integration
+        limits, respectively, of each of the ``d`` variables.
+    n_estimates, n_points : int, optional
+        `n_estimates` (default: 8) statistically independent QMC samples, each
+        of `n_points` (default: 1024) points, will be generated by `qrng`.
+        The total number of points at which the integrand `func` will be
+        evaluated is ``n_points * n_estimates``. See Notes for details.
+    qrng : `~scipy.stats.qmc.QMCEngine`, optional
+        An instance of the QMCEngine from which to sample QMC points.
+        The QMCEngine must be initialized to a number of dimensions ``d``
+        corresponding with the number of variables ``x1, ..., xd`` passed to
+        `func`.
+        The provided QMCEngine is used to produce the first integral estimate.
+        If `n_estimates` is greater than one, additional QMCEngines are
+        spawned from the first (with scrambling enabled, if it is an option.)
+        If a QMCEngine is not provided, the default `scipy.stats.qmc.Halton`
+        will be initialized with the number of dimensions determine from
+        the length of `a`.
+    log : boolean, default: False
+        When set to True, `func` returns the log of the integrand, and
+        the result object contains the log of the integral.
+
+    Returns
+    -------
+    result : object
+        A result object with attributes:
+
+        integral : float
+            The estimate of the integral.
+        standard_error :
+            The error estimate. See Notes for interpretation.
+
+    Notes
+    -----
+    Values of the integrand at each of the `n_points` points of a QMC sample
+    are used to produce an estimate of the integral. This estimate is drawn
+    from a population of possible estimates of the integral, the value of
+    which we obtain depends on the particular points at which the integral
+    was evaluated. We perform this process `n_estimates` times, each time
+    evaluating the integrand at different scrambled QMC points, effectively
+    drawing i.i.d. random samples from the population of integral estimates.
+    The sample mean :math:`m` of these integral estimates is an
+    unbiased estimator of the true value of the integral, and the standard
+    error of the mean :math:`s` of these estimates may be used to generate
+    confidence intervals using the t distribution with ``n_estimates - 1``
+    degrees of freedom. Perhaps counter-intuitively, increasing `n_points`
+    while keeping the total number of function evaluation points
+    ``n_points * n_estimates`` fixed tends to reduce the actual error, whereas
+    increasing `n_estimates` tends to decrease the error estimate.
+
+    Examples
+    --------
+    QMC quadrature is particularly useful for computing integrals in higher
+    dimensions. An example integrand is the probability density function
+    of a multivariate normal distribution.
+
+    >>> import numpy as np
+    >>> from scipy import stats
+    >>> dim = 8
+    >>> mean = np.zeros(dim)
+    >>> cov = np.eye(dim)
+    >>> def func(x):
+    ...     # `multivariate_normal` expects the _last_ axis to correspond with
+    ...     # the dimensionality of the space, so `x` must be transposed
+    ...     return stats.multivariate_normal.pdf(x.T, mean, cov)
+
+    To compute the integral over the unit hypercube:
+
+    >>> from scipy.integrate import qmc_quad
+    >>> a = np.zeros(dim)
+    >>> b = np.ones(dim)
+    >>> rng = np.random.default_rng()
+    >>> qrng = stats.qmc.Halton(d=dim, seed=rng)
+    >>> n_estimates = 8
+    >>> res = qmc_quad(func, a, b, n_estimates=n_estimates, qrng=qrng)
+    >>> res.integral, res.standard_error
+    (0.00018429555666024108, 1.0389431116001344e-07)
+
+    A two-sided, 99% confidence interval for the integral may be estimated
+    as:
+
+    >>> t = stats.t(df=n_estimates-1, loc=res.integral,
+    ...             scale=res.standard_error)
+    >>> t.interval(0.99)
+    (0.0001839319802536469, 0.00018465913306683527)
+
+    Indeed, the value reported by `scipy.stats.multivariate_normal` is
+    within this range.
+
+    >>> stats.multivariate_normal.cdf(b, mean, cov, lower_limit=a)
+    0.00018430867675187443
+
+    """
+    args = _qmc_quad_iv(func, a, b, n_points, n_estimates, qrng, log)
+    func, a, b, n_points, n_estimates, qrng, rng, log, stats = args
+
+    def sum_product(integrands, dA, log=False):
+        if log:
+            return logsumexp(integrands) + np.log(dA)
+        else:
+            return np.sum(integrands * dA)
+
+    def mean(estimates, log=False):
+        if log:
+            return logsumexp(estimates) - np.log(n_estimates)
+        else:
+            return np.mean(estimates)
+
+    def std(estimates, m=None, ddof=0, log=False):
+        m = m or mean(estimates, log)
+        if log:
+            estimates, m = np.broadcast_arrays(estimates, m)
+            temp = np.vstack((estimates, m + np.pi * 1j))
+            diff = logsumexp(temp, axis=0)
+            return np.real(0.5 * (logsumexp(2 * diff)
+                                  - np.log(n_estimates - ddof)))
+        else:
+            return np.std(estimates, ddof=ddof)
+
+    def sem(estimates, m=None, s=None, log=False):
+        m = m or mean(estimates, log)
+        s = s or std(estimates, m, ddof=1, log=log)
+        if log:
+            return s - 0.5*np.log(n_estimates)
+        else:
+            return s / np.sqrt(n_estimates)
+
+    # The sign of the integral depends on the order of the limits. Fix this by
+    # ensuring that lower bounds are indeed lower and setting sign of resulting
+    # integral manually
+    if np.any(a == b):
+        message = ("A lower limit was equal to an upper limit, so the value "
+                   "of the integral is zero by definition.")
+        warnings.warn(message, stacklevel=2)
+        return QMCQuadResult(-np.inf if log else 0, 0)
+
+    i_swap = b < a
+    sign = (-1)**(i_swap.sum(axis=-1))  # odd # of swaps -> negative
+    a[i_swap], b[i_swap] = b[i_swap], a[i_swap]
+
+    A = np.prod(b - a)
+    dA = A / n_points
+
+    estimates = np.zeros(n_estimates)
+    rngs = _rng_spawn(qrng.rng, n_estimates)
+    for i in range(n_estimates):
+        # Generate integral estimate
+        sample = qrng.random(n_points)
+        # The rationale for transposing is that this allows users to easily
+        # unpack `x` into separate variables, if desired. This is consistent
+        # with the `xx` array passed into the `scipy.integrate.nquad` `func`.
+        x = stats.qmc.scale(sample, a, b).T  # (n_dim, n_points)
+        integrands = func(x)
+        estimates[i] = sum_product(integrands, dA, log)
+
+        # Get a new, independently-scrambled QRNG for next time
+        qrng = type(qrng)(seed=rngs[i], **qrng._init_quad)
+
+    integral = mean(estimates, log)
+    standard_error = sem(estimates, m=integral, log=log)
+    integral = integral + np.pi*1j if (log and sign < 0) else integral*sign
+    return QMCQuadResult(integral, standard_error)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c91aa324478d49a8723f05618801f9b256d07af
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__init__.py
@@ -0,0 +1,12 @@
+"""Numerical cubature algorithms"""
+
+from ._base import (
+    Rule, FixedRule,
+    NestedFixedRule,
+    ProductNestedFixed,
+)
+from ._genz_malik import GenzMalikCubature
+from ._gauss_kronrod import GaussKronrodQuadrature
+from ._gauss_legendre import GaussLegendreQuadrature
+
+__all__ = [s for s in dir() if not s.startswith('_')]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f189db34ceccfb2aded6314f908354bb0e5860e5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_base.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_base.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..afb678bb770d4ea02f1c2183688e164709255f2c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_base.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_kronrod.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_kronrod.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c7610d1bb9135bff719c1fbc7ea00460bc60fe8d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_kronrod.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_legendre.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_legendre.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..59bbd88d618e06a4165ef4281e5e93ea61287f4e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_gauss_legendre.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_genz_malik.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_genz_malik.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d286eb76a286738964e9eb3aa86020c309953af0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/__pycache__/_genz_malik.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_base.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_base.py
new file mode 100644
index 0000000000000000000000000000000000000000..3a3ae5f506505c9c03b2ac8be33d301d60074681
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_base.py
@@ -0,0 +1,518 @@
+from scipy._lib._array_api import array_namespace, xp_size
+
+from functools import cached_property
+
+
+class Rule:
+    """
+    Base class for numerical integration algorithms (cubatures).
+
+    Finds an estimate for the integral of ``f`` over the region described by two arrays
+    ``a`` and ``b`` via `estimate`, and find an estimate for the error of this
+    approximation via `estimate_error`.
+
+    If a subclass does not implement its own `estimate_error`, then it will use a
+    default error estimate based on the difference between the estimate over the whole
+    region and the sum of estimates over that region divided into ``2^ndim`` subregions.
+
+    See Also
+    --------
+    FixedRule
+
+    Examples
+    --------
+    In the following, a custom rule is created which uses 3D Genz-Malik cubature for
+    the estimate of the integral, and the difference between this estimate and a less
+    accurate estimate using 5-node Gauss-Legendre quadrature as an estimate for the
+    error.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import (
+    ...     Rule, ProductNestedFixed, GenzMalikCubature, GaussLegendreQuadrature
+    ... )
+    >>> def f(x, r, alphas):
+    ...     # f(x) = cos(2*pi*r + alpha @ x)
+    ...     # Need to allow r and alphas to be arbitrary shape
+    ...     npoints, ndim = x.shape[0], x.shape[-1]
+    ...     alphas_reshaped = alphas[np.newaxis, :]
+    ...     x_reshaped = x.reshape(npoints, *([1]*(len(alphas.shape) - 1)), ndim)
+    ...     return np.cos(2*np.pi*r + np.sum(alphas_reshaped * x_reshaped, axis=-1))
+    >>> genz = GenzMalikCubature(ndim=3)
+    >>> gauss = GaussKronrodQuadrature(npoints=21)
+    >>> # Gauss-Kronrod is 1D, so we find the 3D product rule:
+    >>> gauss_3d = ProductNestedFixed([gauss, gauss, gauss])
+    >>> class CustomRule(Rule):
+    ...     def estimate(self, f, a, b, args=()):
+    ...         return genz.estimate(f, a, b, args)
+    ...     def estimate_error(self, f, a, b, args=()):
+    ...         return np.abs(
+    ...             genz.estimate(f, a, b, args)
+    ...             - gauss_3d.estimate(f, a, b, args)
+    ...         )
+    >>> rng = np.random.default_rng()
+    >>> res = cubature(
+    ...     f=f,
+    ...     a=np.array([0, 0, 0]),
+    ...     b=np.array([1, 1, 1]),
+    ...     rule=CustomRule(),
+    ...     args=(rng.random((2,)), rng.random((3, 2, 3)))
+    ... )
+    >>> res.estimate
+     array([[-0.95179502,  0.12444608],
+            [-0.96247411,  0.60866385],
+            [-0.97360014,  0.25515587]])
+    """
+
+    def estimate(self, f, a, b, args=()):
+        r"""
+        Calculate estimate of integral of `f` in rectangular region described by
+        corners `a` and ``b``.
+
+        Parameters
+        ----------
+        f : callable
+            Function to integrate. `f` must have the signature::
+                f(x : ndarray, \*args) -> ndarray
+
+            `f` should accept arrays ``x`` of shape::
+                (npoints, ndim)
+
+            and output arrays of shape::
+                (npoints, output_dim_1, ..., output_dim_n)
+
+            In this case, `estimate` will return arrays of shape::
+                (output_dim_1, ..., output_dim_n)
+        a, b : ndarray
+            Lower and upper limits of integration as rank-1 arrays specifying the left
+            and right endpoints of the intervals being integrated over. Infinite limits
+            are currently not supported.
+        args : tuple, optional
+            Additional positional args passed to ``f``, if any.
+
+        Returns
+        -------
+        est : ndarray
+            Result of estimation. If `f` returns arrays of shape ``(npoints,
+            output_dim_1, ..., output_dim_n)``, then `est` will be of shape
+            ``(output_dim_1, ..., output_dim_n)``.
+        """
+        raise NotImplementedError
+
+    def estimate_error(self, f, a, b, args=()):
+        r"""
+        Estimate the error of the approximation for the integral of `f` in rectangular
+        region described by corners `a` and `b`.
+
+        If a subclass does not override this method, then a default error estimator is
+        used. This estimates the error as ``|est - refined_est|`` where ``est`` is
+        ``estimate(f, a, b)`` and ``refined_est`` is the sum of
+        ``estimate(f, a_k, b_k)`` where ``a_k, b_k`` are the coordinates of each
+        subregion of the region described by ``a`` and ``b``. In the 1D case, this
+        is equivalent to comparing the integral over an entire interval ``[a, b]`` to
+        the sum of the integrals over the left and right subintervals, ``[a, (a+b)/2]``
+        and ``[(a+b)/2, b]``.
+
+        Parameters
+        ----------
+        f : callable
+            Function to estimate error for. `f` must have the signature::
+                f(x : ndarray, \*args) -> ndarray
+
+            `f` should accept arrays `x` of shape::
+                (npoints, ndim)
+
+            and output arrays of shape::
+                (npoints, output_dim_1, ..., output_dim_n)
+
+            In this case, `estimate` will return arrays of shape::
+                (output_dim_1, ..., output_dim_n)
+        a, b : ndarray
+            Lower and upper limits of integration as rank-1 arrays specifying the left
+            and right endpoints of the intervals being integrated over. Infinite limits
+            are currently not supported.
+        args : tuple, optional
+            Additional positional args passed to `f`, if any.
+
+        Returns
+        -------
+        err_est : ndarray
+            Result of error estimation. If `f` returns arrays of shape
+            ``(npoints, output_dim_1, ..., output_dim_n)``, then `est` will be
+            of shape ``(output_dim_1, ..., output_dim_n)``.
+        """
+
+        est = self.estimate(f, a, b, args)
+        refined_est = 0
+
+        for a_k, b_k in _split_subregion(a, b):
+            refined_est += self.estimate(f, a_k, b_k, args)
+
+        return self.xp.abs(est - refined_est)
+
+
+class FixedRule(Rule):
+    """
+    A rule implemented as the weighted sum of function evaluations at fixed nodes.
+
+    Attributes
+    ----------
+    nodes_and_weights : (ndarray, ndarray)
+        A tuple ``(nodes, weights)`` of nodes at which to evaluate ``f`` and the
+        corresponding weights. ``nodes`` should be of shape ``(num_nodes,)`` for 1D
+        cubature rules (quadratures) and more generally for N-D cubature rules, it
+        should be of shape ``(num_nodes, ndim)``. ``weights`` should be of shape
+        ``(num_nodes,)``. The nodes and weights should be for integrals over
+        :math:`[-1, 1]^n`.
+
+    See Also
+    --------
+    GaussLegendreQuadrature, GaussKronrodQuadrature, GenzMalikCubature
+
+    Examples
+    --------
+
+    Implementing Simpson's 1/3 rule:
+
+    >>> import numpy as np
+    >>> from scipy.integrate._rules import FixedRule
+    >>> class SimpsonsQuad(FixedRule):
+    ...     @property
+    ...     def nodes_and_weights(self):
+    ...         nodes = np.array([-1, 0, 1])
+    ...         weights = np.array([1/3, 4/3, 1/3])
+    ...         return (nodes, weights)
+    >>> rule = SimpsonsQuad()
+    >>> rule.estimate(
+    ...     f=lambda x: x**2,
+    ...     a=np.array([0]),
+    ...     b=np.array([1]),
+    ... )
+     [0.3333333]
+    """
+
+    def __init__(self):
+        self.xp = None
+
+    @property
+    def nodes_and_weights(self):
+        raise NotImplementedError
+
+    def estimate(self, f, a, b, args=()):
+        r"""
+        Calculate estimate of integral of `f` in rectangular region described by
+        corners `a` and `b` as ``sum(weights * f(nodes))``.
+
+        Nodes and weights will automatically be adjusted from calculating integrals over
+        :math:`[-1, 1]^n` to :math:`[a, b]^n`.
+
+        Parameters
+        ----------
+        f : callable
+            Function to integrate. `f` must have the signature::
+                f(x : ndarray, \*args) -> ndarray
+
+            `f` should accept arrays `x` of shape::
+                (npoints, ndim)
+
+            and output arrays of shape::
+                (npoints, output_dim_1, ..., output_dim_n)
+
+            In this case, `estimate` will return arrays of shape::
+                (output_dim_1, ..., output_dim_n)
+        a, b : ndarray
+            Lower and upper limits of integration as rank-1 arrays specifying the left
+            and right endpoints of the intervals being integrated over. Infinite limits
+            are currently not supported.
+        args : tuple, optional
+            Additional positional args passed to `f`, if any.
+
+        Returns
+        -------
+        est : ndarray
+            Result of estimation. If `f` returns arrays of shape ``(npoints,
+            output_dim_1, ..., output_dim_n)``, then `est` will be of shape
+            ``(output_dim_1, ..., output_dim_n)``.
+        """
+        nodes, weights = self.nodes_and_weights
+
+        if self.xp is None:
+            self.xp = array_namespace(nodes)
+
+        return _apply_fixed_rule(f, a, b, nodes, weights, args, self.xp)
+
+
+class NestedFixedRule(FixedRule):
+    r"""
+    A cubature rule with error estimate given by the difference between two underlying
+    fixed rules.
+
+    If constructed as ``NestedFixedRule(higher, lower)``, this will use::
+
+        estimate(f, a, b) := higher.estimate(f, a, b)
+        estimate_error(f, a, b) := \|higher.estimate(f, a, b) - lower.estimate(f, a, b)|
+
+    (where the absolute value is taken elementwise).
+
+    Attributes
+    ----------
+    higher : Rule
+        Higher accuracy rule.
+
+    lower : Rule
+        Lower accuracy rule.
+
+    See Also
+    --------
+    GaussKronrodQuadrature
+
+    Examples
+    --------
+
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import (
+    ...     GaussLegendreQuadrature, NestedFixedRule, ProductNestedFixed
+    ... )
+    >>> higher = GaussLegendreQuadrature(10)
+    >>> lower = GaussLegendreQuadrature(5)
+    >>> rule = NestedFixedRule(
+    ...     higher,
+    ...     lower
+    ... )
+    >>> rule_2d = ProductNestedFixed([rule, rule])
+    """
+
+    def __init__(self, higher, lower):
+        self.higher = higher
+        self.lower = lower
+        self.xp = None
+
+    @property
+    def nodes_and_weights(self):
+        if self.higher is not None:
+            return self.higher.nodes_and_weights
+        else:
+            raise NotImplementedError
+
+    @property
+    def lower_nodes_and_weights(self):
+        if self.lower is not None:
+            return self.lower.nodes_and_weights
+        else:
+            raise NotImplementedError
+
+    def estimate_error(self, f, a, b, args=()):
+        r"""
+        Estimate the error of the approximation for the integral of `f` in rectangular
+        region described by corners `a` and `b`.
+
+        Parameters
+        ----------
+        f : callable
+            Function to estimate error for. `f` must have the signature::
+                f(x : ndarray, \*args) -> ndarray
+
+            `f` should accept arrays `x` of shape::
+                (npoints, ndim)
+
+            and output arrays of shape::
+                (npoints, output_dim_1, ..., output_dim_n)
+
+            In this case, `estimate` will return arrays of shape::
+                (output_dim_1, ..., output_dim_n)
+        a, b : ndarray
+            Lower and upper limits of integration as rank-1 arrays specifying the left
+            and right endpoints of the intervals being integrated over. Infinite limits
+            are currently not supported.
+        args : tuple, optional
+            Additional positional args passed to `f`, if any.
+
+        Returns
+        -------
+        err_est : ndarray
+            Result of error estimation. If `f` returns arrays of shape
+            ``(npoints, output_dim_1, ..., output_dim_n)``, then `est` will be
+            of shape ``(output_dim_1, ..., output_dim_n)``.
+        """
+
+        nodes, weights = self.nodes_and_weights
+        lower_nodes, lower_weights = self.lower_nodes_and_weights
+
+        if self.xp is None:
+            self.xp = array_namespace(nodes)
+
+        error_nodes = self.xp.concat([nodes, lower_nodes], axis=0)
+        error_weights = self.xp.concat([weights, -lower_weights], axis=0)
+
+        return self.xp.abs(
+            _apply_fixed_rule(f, a, b, error_nodes, error_weights, args, self.xp)
+        )
+
+
+class ProductNestedFixed(NestedFixedRule):
+    """
+    Find the n-dimensional cubature rule constructed from the Cartesian product of 1-D
+    `NestedFixedRule` quadrature rules.
+
+    Given a list of N 1-dimensional quadrature rules which support error estimation
+    using NestedFixedRule, this will find the N-dimensional cubature rule obtained by
+    taking the Cartesian product of their nodes, and estimating the error by taking the
+    difference with a lower-accuracy N-dimensional cubature rule obtained using the
+    ``.lower_nodes_and_weights`` rule in each of the base 1-dimensional rules.
+
+    Parameters
+    ----------
+    base_rules : list of NestedFixedRule
+        List of base 1-dimensional `NestedFixedRule` quadrature rules.
+
+    Attributes
+    ----------
+    base_rules : list of NestedFixedRule
+        List of base 1-dimensional `NestedFixedRule` qudarature rules.
+
+    Examples
+    --------
+
+    Evaluate a 2D integral by taking the product of two 1D rules:
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import (
+    ...  ProductNestedFixed, GaussKronrodQuadrature
+    ... )
+    >>> def f(x):
+    ...     # f(x) = cos(x_1) + cos(x_2)
+    ...     return np.sum(np.cos(x), axis=-1)
+    >>> rule = ProductNestedFixed(
+    ...     [GaussKronrodQuadrature(15), GaussKronrodQuadrature(15)]
+    ... ) # Use 15-point Gauss-Kronrod, which implements NestedFixedRule
+    >>> a, b = np.array([0, 0]), np.array([1, 1])
+    >>> rule.estimate(f, a, b) # True value 2*sin(1), approximately 1.6829
+     np.float64(1.682941969615793)
+    >>> rule.estimate_error(f, a, b)
+     np.float64(2.220446049250313e-16)
+    """
+
+    def __init__(self, base_rules):
+        for rule in base_rules:
+            if not isinstance(rule, NestedFixedRule):
+                raise ValueError("base rules for product need to be instance of"
+                                 "NestedFixedRule")
+
+        self.base_rules = base_rules
+        self.xp = None
+
+    @cached_property
+    def nodes_and_weights(self):
+        nodes = _cartesian_product(
+            [rule.nodes_and_weights[0] for rule in self.base_rules]
+        )
+
+        if self.xp is None:
+            self.xp = array_namespace(nodes)
+
+        weights = self.xp.prod(
+            _cartesian_product(
+                [rule.nodes_and_weights[1] for rule in self.base_rules]
+            ),
+            axis=-1,
+        )
+
+        return nodes, weights
+
+    @cached_property
+    def lower_nodes_and_weights(self):
+        nodes = _cartesian_product(
+            [cubature.lower_nodes_and_weights[0] for cubature in self.base_rules]
+        )
+
+        if self.xp is None:
+            self.xp = array_namespace(nodes)
+
+        weights = self.xp.prod(
+            _cartesian_product(
+                [cubature.lower_nodes_and_weights[1] for cubature in self.base_rules]
+            ),
+            axis=-1,
+        )
+
+        return nodes, weights
+
+
+def _cartesian_product(arrays):
+    xp = array_namespace(*arrays)
+
+    arrays_ix = xp.meshgrid(*arrays, indexing='ij')
+    result = xp.reshape(xp.stack(arrays_ix, axis=-1), (-1, len(arrays)))
+
+    return result
+
+
+def _split_subregion(a, b, xp, split_at=None):
+    """
+    Given the coordinates of a region like a=[0, 0] and b=[1, 1], yield the coordinates
+    of all subregions, which in this case would be::
+
+        ([0, 0], [1/2, 1/2]),
+        ([0, 1/2], [1/2, 1]),
+        ([1/2, 0], [1, 1/2]),
+        ([1/2, 1/2], [1, 1])
+    """
+    xp = array_namespace(a, b)
+
+    if split_at is None:
+        split_at = (a + b) / 2
+
+    left = [xp.asarray([a[i], split_at[i]]) for i in range(a.shape[0])]
+    right = [xp.asarray([split_at[i], b[i]]) for i in range(b.shape[0])]
+
+    a_sub = _cartesian_product(left)
+    b_sub = _cartesian_product(right)
+
+    for i in range(a_sub.shape[0]):
+        yield a_sub[i, ...], b_sub[i, ...]
+
+
+def _apply_fixed_rule(f, a, b, orig_nodes, orig_weights, args, xp):
+    # Downcast nodes and weights to common dtype of a and b
+    result_dtype = a.dtype
+    orig_nodes = xp.astype(orig_nodes, result_dtype)
+    orig_weights = xp.astype(orig_weights, result_dtype)
+
+    # Ensure orig_nodes are at least 2D, since 1D cubature methods can return arrays of
+    # shape (npoints,) rather than (npoints, 1)
+    if orig_nodes.ndim == 1:
+        orig_nodes = orig_nodes[:, None]
+
+    rule_ndim = orig_nodes.shape[-1]
+
+    a_ndim = xp_size(a)
+    b_ndim = xp_size(b)
+
+    if rule_ndim != a_ndim or rule_ndim != b_ndim:
+        raise ValueError(f"rule and function are of incompatible dimension, nodes have"
+                         f"ndim {rule_ndim}, while limit of integration has ndim"
+                         f"a_ndim={a_ndim}, b_ndim={b_ndim}")
+
+    lengths = b - a
+
+    # The underlying rule is for the hypercube [-1, 1]^n.
+    #
+    # To handle arbitrary regions of integration, it's necessary to apply a linear
+    # change of coordinates to map each interval [a[i], b[i]] to [-1, 1].
+    nodes = (orig_nodes + 1) * (lengths * 0.5) + a
+
+    # Also need to multiply the weights by a scale factor equal to the determinant
+    # of the Jacobian for this coordinate change.
+    weight_scale_factor = xp.prod(lengths, dtype=result_dtype) / 2**rule_ndim
+    weights = orig_weights * weight_scale_factor
+
+    f_nodes = f(nodes, *args)
+    weights_reshaped = xp.reshape(weights, (-1, *([1] * (f_nodes.ndim - 1))))
+
+    # f(nodes) will have shape (num_nodes, output_dim_1, ..., output_dim_n)
+    # Summing along the first axis means estimate will shape (output_dim_1, ...,
+    # output_dim_n)
+    est = xp.sum(weights_reshaped * f_nodes, axis=0, dtype=result_dtype)
+
+    return est
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_kronrod.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_kronrod.py
new file mode 100644
index 0000000000000000000000000000000000000000..b2a3518c55cf49cd14c777d243ea7e93a489f86c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_kronrod.py
@@ -0,0 +1,202 @@
+from scipy._lib._array_api import np_compat, array_namespace
+
+from functools import cached_property
+
+from ._base import NestedFixedRule
+from ._gauss_legendre import GaussLegendreQuadrature
+
+
+class GaussKronrodQuadrature(NestedFixedRule):
+    """
+    Gauss-Kronrod quadrature.
+
+    Gauss-Kronrod rules consist of two quadrature rules, one higher-order and one
+    lower-order. The higher-order rule is used as the estimate of the integral and the
+    difference between them is used as an estimate for the error.
+
+    Gauss-Kronrod is a 1D rule. To use it for multidimensional integrals, it will be
+    necessary to use ProductNestedFixed and multiple Gauss-Kronrod rules. See Examples.
+
+    For n-node Gauss-Kronrod, the lower-order rule has ``n//2`` nodes, which are the
+    ordinary Gauss-Legendre nodes with corresponding weights. The higher-order rule has
+    ``n`` nodes, ``n//2`` of which are the same as the lower-order rule and the
+    remaining nodes are the Kronrod extension of those nodes.
+
+    Parameters
+    ----------
+    npoints : int
+        Number of nodes for the higher-order rule.
+
+    xp : array_namespace, optional
+        The namespace for the node and weight arrays. Default is None, where NumPy is
+        used.
+
+    Attributes
+    ----------
+    lower : Rule
+        Lower-order rule.
+
+    References
+    ----------
+    .. [1] R. Piessens, E. de Doncker, Quadpack: A Subroutine Package for Automatic
+        Integration, files: dqk21.f, dqk15.f (1983).
+
+    Examples
+    --------
+    Evaluate a 1D integral. Note in this example that ``f`` returns an array, so the
+    estimates will also be arrays, despite the fact that this is a 1D problem.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import GaussKronrodQuadrature
+    >>> def f(x):
+    ...     return np.cos(x)
+    >>> rule = GaussKronrodQuadrature(21) # Use 21-point GaussKronrod
+    >>> a, b = np.array([0]), np.array([1])
+    >>> rule.estimate(f, a, b) # True value sin(1), approximately 0.84147
+     array([0.84147098])
+    >>> rule.estimate_error(f, a, b)
+     array([1.11022302e-16])
+
+    Evaluate a 2D integral. Note that in this example ``f`` returns a float, so the
+    estimates will also be floats.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import (
+    ...     ProductNestedFixed, GaussKronrodQuadrature
+    ... )
+    >>> def f(x):
+    ...     # f(x) = cos(x_1) + cos(x_2)
+    ...     return np.sum(np.cos(x), axis=-1)
+    >>> rule = ProductNestedFixed(
+    ...     [GaussKronrodQuadrature(15), GaussKronrodQuadrature(15)]
+    ... ) # Use 15-point Gauss-Kronrod
+    >>> a, b = np.array([0, 0]), np.array([1, 1])
+    >>> rule.estimate(f, a, b) # True value 2*sin(1), approximately 1.6829
+     np.float64(1.682941969615793)
+    >>> rule.estimate_error(f, a, b)
+     np.float64(2.220446049250313e-16)
+    """
+
+    def __init__(self, npoints, xp=None):
+        # TODO: nodes and weights are currently hard-coded for values 15 and 21, but in
+        # the future it would be best to compute the Kronrod extension of the lower rule
+        if npoints != 15 and npoints != 21:
+            raise NotImplementedError("Gauss-Kronrod quadrature is currently only"
+                                      "supported for 15 or 21 nodes")
+
+        self.npoints = npoints
+
+        if xp is None:
+            xp = np_compat
+
+        self.xp = array_namespace(xp.empty(0))
+
+        self.gauss = GaussLegendreQuadrature(npoints//2, xp=self.xp)
+
+    @cached_property
+    def nodes_and_weights(self):
+        # These values are from QUADPACK's `dqk21.f` and `dqk15.f` (1983).
+        if self.npoints == 21:
+            nodes = self.xp.asarray(
+                [
+                    0.995657163025808080735527280689003,
+                    0.973906528517171720077964012084452,
+                    0.930157491355708226001207180059508,
+                    0.865063366688984510732096688423493,
+                    0.780817726586416897063717578345042,
+                    0.679409568299024406234327365114874,
+                    0.562757134668604683339000099272694,
+                    0.433395394129247190799265943165784,
+                    0.294392862701460198131126603103866,
+                    0.148874338981631210884826001129720,
+                    0,
+                    -0.148874338981631210884826001129720,
+                    -0.294392862701460198131126603103866,
+                    -0.433395394129247190799265943165784,
+                    -0.562757134668604683339000099272694,
+                    -0.679409568299024406234327365114874,
+                    -0.780817726586416897063717578345042,
+                    -0.865063366688984510732096688423493,
+                    -0.930157491355708226001207180059508,
+                    -0.973906528517171720077964012084452,
+                    -0.995657163025808080735527280689003,
+                ],
+                dtype=self.xp.float64,
+            )
+
+            weights = self.xp.asarray(
+                [
+                    0.011694638867371874278064396062192,
+                    0.032558162307964727478818972459390,
+                    0.054755896574351996031381300244580,
+                    0.075039674810919952767043140916190,
+                    0.093125454583697605535065465083366,
+                    0.109387158802297641899210590325805,
+                    0.123491976262065851077958109831074,
+                    0.134709217311473325928054001771707,
+                    0.142775938577060080797094273138717,
+                    0.147739104901338491374841515972068,
+                    0.149445554002916905664936468389821,
+                    0.147739104901338491374841515972068,
+                    0.142775938577060080797094273138717,
+                    0.134709217311473325928054001771707,
+                    0.123491976262065851077958109831074,
+                    0.109387158802297641899210590325805,
+                    0.093125454583697605535065465083366,
+                    0.075039674810919952767043140916190,
+                    0.054755896574351996031381300244580,
+                    0.032558162307964727478818972459390,
+                    0.011694638867371874278064396062192,
+                ],
+                dtype=self.xp.float64,
+            )
+        elif self.npoints == 15:
+            nodes = self.xp.asarray(
+                [
+                    0.991455371120812639206854697526329,
+                    0.949107912342758524526189684047851,
+                    0.864864423359769072789712788640926,
+                    0.741531185599394439863864773280788,
+                    0.586087235467691130294144838258730,
+                    0.405845151377397166906606412076961,
+                    0.207784955007898467600689403773245,
+                    0.000000000000000000000000000000000,
+                    -0.207784955007898467600689403773245,
+                    -0.405845151377397166906606412076961,
+                    -0.586087235467691130294144838258730,
+                    -0.741531185599394439863864773280788,
+                    -0.864864423359769072789712788640926,
+                    -0.949107912342758524526189684047851,
+                    -0.991455371120812639206854697526329,
+                ],
+                dtype=self.xp.float64,
+            )
+
+            weights = self.xp.asarray(
+                [
+                    0.022935322010529224963732008058970,
+                    0.063092092629978553290700663189204,
+                    0.104790010322250183839876322541518,
+                    0.140653259715525918745189590510238,
+                    0.169004726639267902826583426598550,
+                    0.190350578064785409913256402421014,
+                    0.204432940075298892414161999234649,
+                    0.209482141084727828012999174891714,
+                    0.204432940075298892414161999234649,
+                    0.190350578064785409913256402421014,
+                    0.169004726639267902826583426598550,
+                    0.140653259715525918745189590510238,
+                    0.104790010322250183839876322541518,
+                    0.063092092629978553290700663189204,
+                    0.022935322010529224963732008058970,
+                ],
+                dtype=self.xp.float64,
+            )
+
+        return nodes, weights
+
+    @property
+    def lower_nodes_and_weights(self):
+        return self.gauss.nodes_and_weights
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_legendre.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_legendre.py
new file mode 100644
index 0000000000000000000000000000000000000000..1163aec5370fb93951402ab99ee2ae4b79158d52
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_gauss_legendre.py
@@ -0,0 +1,62 @@
+from scipy._lib._array_api import array_namespace, np_compat
+
+from functools import cached_property
+
+from scipy.special import roots_legendre
+
+from ._base import FixedRule
+
+
+class GaussLegendreQuadrature(FixedRule):
+    """
+    Gauss-Legendre quadrature.
+
+    Parameters
+    ----------
+    npoints : int
+        Number of nodes for the higher-order rule.
+
+    xp : array_namespace, optional
+        The namespace for the node and weight arrays. Default is None, where NumPy is
+        used.
+
+    Examples
+    --------
+    Evaluate a 1D integral. Note in this example that ``f`` returns an array, so the
+    estimates will also be arrays.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import GaussLegendreQuadrature
+    >>> def f(x):
+    ...     return np.cos(x)
+    >>> rule = GaussLegendreQuadrature(21) # Use 21-point GaussLegendre
+    >>> a, b = np.array([0]), np.array([1])
+    >>> rule.estimate(f, a, b) # True value sin(1), approximately 0.84147
+     array([0.84147098])
+    >>> rule.estimate_error(f, a, b)
+     array([1.11022302e-16])
+    """
+
+    def __init__(self, npoints, xp=None):
+        if npoints < 2:
+            raise ValueError(
+                "At least 2 nodes required for Gauss-Legendre cubature"
+            )
+
+        self.npoints = npoints
+
+        if xp is None:
+            xp = np_compat
+
+        self.xp = array_namespace(xp.empty(0))
+
+    @cached_property
+    def nodes_and_weights(self):
+        # TODO: current converting to/from numpy
+        nodes, weights = roots_legendre(self.npoints)
+
+        return (
+            self.xp.asarray(nodes, dtype=self.xp.float64),
+            self.xp.asarray(weights, dtype=self.xp.float64)
+        )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_genz_malik.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_genz_malik.py
new file mode 100644
index 0000000000000000000000000000000000000000..4873805e3364b10a3366de47c15fe3c4b306e5d6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_rules/_genz_malik.py
@@ -0,0 +1,210 @@
+import math
+import itertools
+
+from functools import cached_property
+
+from scipy._lib._array_api import array_namespace, np_compat
+
+from scipy.integrate._rules import NestedFixedRule
+
+
+class GenzMalikCubature(NestedFixedRule):
+    """
+    Genz-Malik cubature.
+
+    Genz-Malik is only defined for integrals of dimension >= 2.
+
+    Parameters
+    ----------
+    ndim : int
+        The spatial dimension of the integrand.
+
+    xp : array_namespace, optional
+        The namespace for the node and weight arrays. Default is None, where NumPy is
+        used.
+
+    Attributes
+    ----------
+    higher : Cubature
+        Higher-order rule.
+
+    lower : Cubature
+        Lower-order rule.
+
+    References
+    ----------
+    .. [1] A.C. Genz, A.A. Malik, Remarks on algorithm 006: An adaptive algorithm for
+        numerical integration over an N-dimensional rectangular region, Journal of
+        Computational and Applied Mathematics, Volume 6, Issue 4, 1980, Pages 295-302,
+        ISSN 0377-0427, https://doi.org/10.1016/0771-050X(80)90039-X.
+
+    Examples
+    --------
+    Evaluate a 3D integral:
+
+    >>> import numpy as np
+    >>> from scipy.integrate import cubature
+    >>> from scipy.integrate._rules import GenzMalikCubature
+    >>> def f(x):
+    ...     # f(x) = cos(x_1) + cos(x_2) + cos(x_3)
+    ...     return np.sum(np.cos(x), axis=-1)
+    >>> rule = GenzMalikCubature(3) # Use 3D Genz-Malik
+    >>> a, b = np.array([0, 0, 0]), np.array([1, 1, 1])
+    >>> rule.estimate(f, a, b) # True value 3*sin(1), approximately 2.5244
+     np.float64(2.5244129547230862)
+    >>> rule.estimate_error(f, a, b)
+     np.float64(1.378269656626685e-06)
+    """
+
+    def __init__(self, ndim, degree=7, lower_degree=5, xp=None):
+        if ndim < 2:
+            raise ValueError("Genz-Malik cubature is only defined for ndim >= 2")
+
+        if degree != 7 or lower_degree != 5:
+            raise NotImplementedError("Genz-Malik cubature is currently only supported"
+                                      "for degree=7, lower_degree=5")
+
+        self.ndim = ndim
+        self.degree = degree
+        self.lower_degree = lower_degree
+
+        if xp is None:
+            xp = np_compat
+
+        self.xp = array_namespace(xp.empty(0))
+
+    @cached_property
+    def nodes_and_weights(self):
+        # TODO: Currently only support for degree 7 Genz-Malik cubature, should aim to
+        # support arbitrary degree
+        l_2 = math.sqrt(9/70)
+        l_3 = math.sqrt(9/10)
+        l_4 = math.sqrt(9/10)
+        l_5 = math.sqrt(9/19)
+
+        its = itertools.chain(
+            [(0,) * self.ndim],
+            _distinct_permutations((l_2,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((-l_2,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((l_3,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((-l_3,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((l_4, l_4) + (0,) * (self.ndim - 2)),
+            _distinct_permutations((l_4, -l_4) + (0,) * (self.ndim - 2)),
+            _distinct_permutations((-l_4, -l_4) + (0,) * (self.ndim - 2)),
+            itertools.product((l_5, -l_5), repeat=self.ndim),
+        )
+
+        nodes_size = 1 + (2 * (self.ndim + 1) * self.ndim) + 2**self.ndim
+
+        nodes = self.xp.asarray(
+            list(zip(*its)),
+            dtype=self.xp.float64,
+        )
+
+        nodes = self.xp.reshape(nodes, (self.ndim, nodes_size))
+
+        # It's convenient to generate the nodes as a sequence of evaluation points
+        # as an array of shape (npoints, ndim), but nodes needs to have shape
+        # (ndim, npoints)
+        nodes = nodes.T
+
+        w_1 = (
+            (2**self.ndim) * (12824 - 9120*self.ndim + (400 * self.ndim**2)) / 19683
+        )
+        w_2 = (2**self.ndim) * 980/6561
+        w_3 = (2**self.ndim) * (1820 - 400 * self.ndim) / 19683
+        w_4 = (2**self.ndim) * (200 / 19683)
+        w_5 = 6859 / 19683
+
+        weights = self.xp.concat([
+            self.xp.asarray([w_1] * 1, dtype=self.xp.float64),
+            self.xp.asarray([w_2] * (2 * self.ndim), dtype=self.xp.float64),
+            self.xp.asarray([w_3] * (2 * self.ndim), dtype=self.xp.float64),
+            self.xp.asarray(
+                [w_4] * (2 * (self.ndim - 1) * self.ndim),
+                dtype=self.xp.float64,
+            ),
+            self.xp.asarray([w_5] * (2**self.ndim), dtype=self.xp.float64),
+        ])
+
+        return nodes, weights
+
+    @cached_property
+    def lower_nodes_and_weights(self):
+        # TODO: Currently only support for the degree 5 lower rule, in the future it
+        # would be worth supporting arbitrary degree
+
+        # Nodes are almost the same as the full rule, but there are no nodes
+        # corresponding to l_5.
+        l_2 = math.sqrt(9/70)
+        l_3 = math.sqrt(9/10)
+        l_4 = math.sqrt(9/10)
+
+        its = itertools.chain(
+            [(0,) * self.ndim],
+            _distinct_permutations((l_2,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((-l_2,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((l_3,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((-l_3,) + (0,) * (self.ndim - 1)),
+            _distinct_permutations((l_4, l_4) + (0,) * (self.ndim - 2)),
+            _distinct_permutations((l_4, -l_4) + (0,) * (self.ndim - 2)),
+            _distinct_permutations((-l_4, -l_4) + (0,) * (self.ndim - 2)),
+        )
+
+        nodes_size = 1 + (2 * (self.ndim + 1) * self.ndim)
+
+        nodes = self.xp.asarray(list(zip(*its)), dtype=self.xp.float64)
+        nodes = self.xp.reshape(nodes, (self.ndim, nodes_size))
+        nodes = nodes.T
+
+        # Weights are different from those in the full rule.
+        w_1 = (2**self.ndim) * (729 - 950*self.ndim + 50*self.ndim**2) / 729
+        w_2 = (2**self.ndim) * (245 / 486)
+        w_3 = (2**self.ndim) * (265 - 100*self.ndim) / 1458
+        w_4 = (2**self.ndim) * (25 / 729)
+
+        weights = self.xp.concat([
+            self.xp.asarray([w_1] * 1, dtype=self.xp.float64),
+            self.xp.asarray([w_2] * (2 * self.ndim), dtype=self.xp.float64),
+            self.xp.asarray([w_3] * (2 * self.ndim), dtype=self.xp.float64),
+            self.xp.asarray(
+                [w_4] * (2 * (self.ndim - 1) * self.ndim),
+                dtype=self.xp.float64,
+            ),
+        ])
+
+        return nodes, weights
+
+
+def _distinct_permutations(iterable):
+    """
+    Find the number of distinct permutations of elements of `iterable`.
+    """
+
+    # Algorithm: https://w.wiki/Qai
+
+    items = sorted(iterable)
+    size = len(items)
+
+    while True:
+        # Yield the permutation we have
+        yield tuple(items)
+
+        # Find the largest index i such that A[i] < A[i + 1]
+        for i in range(size - 2, -1, -1):
+            if items[i] < items[i + 1]:
+                break
+
+        #  If no such index exists, this permutation is the last one
+        else:
+            return
+
+        # Find the largest index j greater than j such that A[i] < A[j]
+        for j in range(size - 1, i, -1):
+            if items[i] < items[j]:
+                break
+
+        # Swap the value of A[i] with that of A[j], then reverse the
+        # sequence from A[i + 1] to form the new permutation
+        items[i], items[j] = items[j], items[i]
+        items[i+1:] = items[:i-size:-1]  # A[i + 1:][::-1]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_tanhsinh.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_tanhsinh.py
new file mode 100644
index 0000000000000000000000000000000000000000..de1d844f88f999d96d4616d8060b0b47de1d8dbe
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_tanhsinh.py
@@ -0,0 +1,1384 @@
+# mypy: disable-error-code="attr-defined"
+import math
+import numpy as np
+from scipy import special
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._util import _RichResult
+from scipy._lib._array_api import (array_namespace, xp_copy, xp_ravel,
+                                   xp_real, xp_take_along_axis)
+
+
+__all__ = ['nsum']
+
+
+# todo:
+#  figure out warning situation
+#  address https://github.com/scipy/scipy/pull/18650#discussion_r1233032521
+#  without `minweight`, we are also suppressing infinities within the interval.
+#    Is that OK? If so, we can probably get rid of `status=3`.
+#  Add heuristic to stop when improvement is too slow / antithrashing
+#  support singularities? interval subdivision? this feature will be added
+#    eventually, but do we adjust the interface now?
+#  When doing log-integration, should the tolerances control the error of the
+#    log-integral or the error of the integral?  The trouble is that `log`
+#    inherently looses some precision so it may not be possible to refine
+#    the integral further. Example: 7th moment of stats.f(15, 20)
+#  respect function evaluation limit?
+#  make public?
+
+
+def tanhsinh(f, a, b, *, args=(), log=False, maxlevel=None, minlevel=2,
+             atol=None, rtol=None, preserve_shape=False, callback=None):
+    """Evaluate a convergent integral numerically using tanh-sinh quadrature.
+
+    In practice, tanh-sinh quadrature achieves quadratic convergence for
+    many integrands: the number of accurate *digits* scales roughly linearly
+    with the number of function evaluations [1]_.
+
+    Either or both of the limits of integration may be infinite, and
+    singularities at the endpoints are acceptable. Divergent integrals and
+    integrands with non-finite derivatives or singularities within an interval
+    are out of scope, but the latter may be evaluated be calling `tanhsinh` on
+    each sub-interval separately.
+
+    Parameters
+    ----------
+    f : callable
+        The function to be integrated. The signature must be::
+
+            f(xi: ndarray, *argsi) -> ndarray
+
+        where each element of ``xi`` is a finite real number and ``argsi`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``xi``. `f` must be an elementwise function: see documentation of parameter
+        `preserve_shape` for details. It must not mutate the array ``xi`` or the arrays
+        in ``argsi``.
+        If ``f`` returns a value with complex dtype when evaluated at
+        either endpoint, subsequent arguments ``x`` will have complex dtype
+        (but zero imaginary part).
+    a, b : float array_like
+        Real lower and upper limits of integration. Must be broadcastable with one
+        another and with arrays in `args`. Elements may be infinite.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`. Arrays
+        must be broadcastable with one another and the arrays of `a` and `b`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    log : bool, default: False
+        Setting to True indicates that `f` returns the log of the integrand
+        and that `atol` and `rtol` are expressed as the logs of the absolute
+        and relative errors. In this case, the result object will contain the
+        log of the integral and error. This is useful for integrands for which
+        numerical underflow or overflow would lead to inaccuracies.
+        When ``log=True``, the integrand (the exponential of `f`) must be real,
+        but it may be negative, in which case the log of the integrand is a
+        complex number with an imaginary part that is an odd multiple of π.
+    maxlevel : int, default: 10
+        The maximum refinement level of the algorithm.
+
+        At the zeroth level, `f` is called once, performing 16 function
+        evaluations. At each subsequent level, `f` is called once more,
+        approximately doubling the number of function evaluations that have
+        been performed. Accordingly, for many integrands, each successive level
+        will double the number of accurate digits in the result (up to the
+        limits of floating point precision).
+
+        The algorithm will terminate after completing level `maxlevel` or after
+        another termination condition is satisfied, whichever comes first.
+    minlevel : int, default: 2
+        The level at which to begin iteration (default: 2). This does not
+        change the total number of function evaluations or the abscissae at
+        which the function is evaluated; it changes only the *number of times*
+        `f` is called. If ``minlevel=k``, then the integrand is evaluated at
+        all abscissae from levels ``0`` through ``k`` in a single call.
+        Note that if `minlevel` exceeds `maxlevel`, the provided `minlevel` is
+        ignored, and `minlevel` is set equal to `maxlevel`.
+    atol, rtol : float, optional
+        Absolute termination tolerance (default: 0) and relative termination
+        tolerance (default: ``eps**0.75``, where ``eps`` is the precision of
+        the result dtype), respectively.  Iteration will stop when
+        ``res.error < atol`` or  ``res.error < res.integral * rtol``. The error
+        estimate is as described in [1]_ Section 5 but with a lower bound of
+        ``eps * res.integral``. While not theoretically rigorous or
+        conservative, it is said to work well in practice. Must be non-negative
+        and finite if `log` is False, and must be expressed as the log of a
+        non-negative and finite number if `log` is True.
+    preserve_shape : bool, default: False
+        In the following, "arguments of `f`" refers to the array ``xi`` and
+        any arrays within ``argsi``. Let ``shape`` be the broadcasted shape
+        of `a`, `b`, and all elements of `args` (which is conceptually
+        distinct from ``xi` and ``argsi`` passed into `f`).
+
+        - When ``preserve_shape=False`` (default), `f` must accept arguments
+          of *any* broadcastable shapes.
+
+        - When ``preserve_shape=True``, `f` must accept arguments of shape
+          ``shape`` *or* ``shape + (n,)``, where ``(n,)`` is the number of
+          abscissae at which the function is being evaluated.
+
+        In either case, for each scalar element ``xi[j]`` within ``xi``, the array
+        returned by `f` must include the scalar ``f(xi[j])`` at the same index.
+        Consequently, the shape of the output is always the shape of the input
+        ``xi``.
+
+        See Examples.
+
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `_differentiate` (but containing the
+        current iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `tanhsinh` will return a result object. `callback` must not mutate
+        `res` or its attributes.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. (The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.)
+
+        success : bool array
+            ``True`` when the algorithm terminated successfully (status ``0``).
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : The algorithm converged to the specified tolerances.
+            ``-1`` : (unused)
+            ``-2`` : The maximum number of iterations was reached.
+            ``-3`` : A non-finite value was encountered.
+            ``-4`` : Iteration was terminated by `callback`.
+            ``1`` : The algorithm is proceeding normally (in `callback` only).
+
+        integral : float array
+            An estimate of the integral.
+        error : float array
+            An estimate of the error. Only available if level two or higher
+            has been completed; otherwise NaN.
+        maxlevel : int array
+            The maximum refinement level used.
+        nfev : int array
+            The number of points at which `f` was evaluated.
+
+    See Also
+    --------
+    quad
+
+    Notes
+    -----
+    Implements the algorithm as described in [1]_ with minor adaptations for
+    finite-precision arithmetic, including some described by [2]_ and [3]_. The
+    tanh-sinh scheme was originally introduced in [4]_.
+
+    Due to floating-point error in the abscissae, the function may be evaluated
+    at the endpoints of the interval during iterations, but the values returned by
+    the function at the endpoints will be ignored.
+
+    References
+    ----------
+    .. [1] Bailey, David H., Karthik Jeyabalan, and Xiaoye S. Li. "A comparison of
+           three high-precision quadrature schemes." Experimental Mathematics 14.3
+           (2005): 317-329.
+    .. [2] Vanherck, Joren, Bart Sorée, and Wim Magnus. "Tanh-sinh quadrature for
+           single and multiple integration using floating-point arithmetic."
+           arXiv preprint arXiv:2007.15057 (2020).
+    .. [3] van Engelen, Robert A.  "Improving the Double Exponential Quadrature
+           Tanh-Sinh, Sinh-Sinh and Exp-Sinh Formulas."
+           https://www.genivia.com/files/qthsh.pdf
+    .. [4] Takahasi, Hidetosi, and Masatake Mori. "Double exponential formulas for
+           numerical integration." Publications of the Research Institute for
+           Mathematical Sciences 9.3 (1974): 721-741.
+
+    Examples
+    --------
+    Evaluate the Gaussian integral:
+
+    >>> import numpy as np
+    >>> from scipy.integrate import tanhsinh
+    >>> def f(x):
+    ...     return np.exp(-x**2)
+    >>> res = tanhsinh(f, -np.inf, np.inf)
+    >>> res.integral  # true value is np.sqrt(np.pi), 1.7724538509055159
+    1.7724538509055159
+    >>> res.error  # actual error is 0
+    4.0007963937534104e-16
+
+    The value of the Gaussian function (bell curve) is nearly zero for
+    arguments sufficiently far from zero, so the value of the integral
+    over a finite interval is nearly the same.
+
+    >>> tanhsinh(f, -20, 20).integral
+    1.772453850905518
+
+    However, with unfavorable integration limits, the integration scheme
+    may not be able to find the important region.
+
+    >>> tanhsinh(f, -np.inf, 1000).integral
+    4.500490856616431
+
+    In such cases, or when there are singularities within the interval,
+    break the integral into parts with endpoints at the important points.
+
+    >>> tanhsinh(f, -np.inf, 0).integral + tanhsinh(f, 0, 1000).integral
+    1.772453850905404
+
+    For integration involving very large or very small magnitudes, use
+    log-integration. (For illustrative purposes, the following example shows a
+    case in which both regular and log-integration work, but for more extreme
+    limits of integration, log-integration would avoid the underflow
+    experienced when evaluating the integral normally.)
+
+    >>> res = tanhsinh(f, 20, 30, rtol=1e-10)
+    >>> res.integral, res.error
+    (4.7819613911309014e-176, 4.670364401645202e-187)
+    >>> def log_f(x):
+    ...     return -x**2
+    >>> res = tanhsinh(log_f, 20, 30, log=True, rtol=np.log(1e-10))
+    >>> np.exp(res.integral), np.exp(res.error)
+    (4.7819613911306924e-176, 4.670364401645093e-187)
+
+    The limits of integration and elements of `args` may be broadcastable
+    arrays, and integration is performed elementwise.
+
+    >>> from scipy import stats
+    >>> dist = stats.gausshyper(13.8, 3.12, 2.51, 5.18)
+    >>> a, b = dist.support()
+    >>> x = np.linspace(a, b, 100)
+    >>> res = tanhsinh(dist.pdf, a, x)
+    >>> ref = dist.cdf(x)
+    >>> np.allclose(res.integral, ref)
+    True
+
+    By default, `preserve_shape` is False, and therefore the callable
+    `f` may be called with arrays of any broadcastable shapes.
+    For example:
+
+    >>> shapes = []
+    >>> def f(x, c):
+    ...    shape = np.broadcast_shapes(x.shape, c.shape)
+    ...    shapes.append(shape)
+    ...    return np.sin(c*x)
+    >>>
+    >>> c = [1, 10, 30, 100]
+    >>> res = tanhsinh(f, 0, 1, args=(c,), minlevel=1)
+    >>> shapes
+    [(4,), (4, 34), (4, 32), (3, 64), (2, 128), (1, 256)]
+
+    To understand where these shapes are coming from - and to better
+    understand how `tanhsinh` computes accurate results - note that
+    higher values of ``c`` correspond with higher frequency sinusoids.
+    The higher frequency sinusoids make the integrand more complicated,
+    so more function evaluations are required to achieve the target
+    accuracy:
+
+    >>> res.nfev
+    array([ 67, 131, 259, 515], dtype=int32)
+
+    The initial ``shape``, ``(4,)``, corresponds with evaluating the
+    integrand at a single abscissa and all four frequencies; this is used
+    for input validation and to determine the size and dtype of the arrays
+    that store results. The next shape corresponds with evaluating the
+    integrand at an initial grid of abscissae and all four frequencies.
+    Successive calls to the function double the total number of abscissae at
+    which the function has been evaluated. However, in later function
+    evaluations, the integrand is evaluated at fewer frequencies because
+    the corresponding integral has already converged to the required
+    tolerance. This saves function evaluations to improve performance, but
+    it requires the function to accept arguments of any shape.
+
+    "Vector-valued" integrands, such as those written for use with
+    `scipy.integrate.quad_vec`, are unlikely to satisfy this requirement.
+    For example, consider
+
+    >>> def f(x):
+    ...    return [x, np.sin(10*x), np.cos(30*x), x*np.sin(100*x)**2]
+
+    This integrand is not compatible with `tanhsinh` as written; for instance,
+    the shape of the output will not be the same as the shape of ``x``. Such a
+    function *could* be converted to a compatible form with the introduction of
+    additional parameters, but this would be inconvenient. In such cases,
+    a simpler solution would be to use `preserve_shape`.
+
+    >>> shapes = []
+    >>> def f(x):
+    ...     shapes.append(x.shape)
+    ...     x0, x1, x2, x3 = x
+    ...     return [x0, np.sin(10*x1), np.cos(30*x2), x3*np.sin(100*x3)]
+    >>>
+    >>> a = np.zeros(4)
+    >>> res = tanhsinh(f, a, 1, preserve_shape=True)
+    >>> shapes
+    [(4,), (4, 66), (4, 64), (4, 128), (4, 256)]
+
+    Here, the broadcasted shape of `a` and `b` is ``(4,)``. With
+    ``preserve_shape=True``, the function may be called with argument
+    ``x`` of shape ``(4,)`` or ``(4, n)``, and this is what we observe.
+
+    """
+    maxfun = None  # unused right now
+    (f, a, b, log, maxfun, maxlevel, minlevel,
+     atol, rtol, args, preserve_shape, callback, xp) = _tanhsinh_iv(
+        f, a, b, log, maxfun, maxlevel, minlevel, atol,
+        rtol, args, preserve_shape, callback)
+
+    # Initialization
+    # `eim._initialize` does several important jobs, including
+    # ensuring that limits, each of the `args`, and the output of `f`
+    # broadcast correctly and are of consistent types. To save a function
+    # evaluation, I pass the midpoint of the integration interval. This comes
+    # at a cost of some gymnastics to ensure that the midpoint has the right
+    # shape and dtype. Did you know that 0d and >0d arrays follow different
+    # type promotion rules?
+    with np.errstate(over='ignore', invalid='ignore', divide='ignore'):
+        c = xp.reshape((xp_ravel(a) + xp_ravel(b))/2, a.shape)
+        inf_a, inf_b = xp.isinf(a), xp.isinf(b)
+        c[inf_a] = b[inf_a] - 1.  # takes care of infinite a
+        c[inf_b] = a[inf_b] + 1.  # takes care of infinite b
+        c[inf_a & inf_b] = 0.  # takes care of infinite a and b
+        temp = eim._initialize(f, (c,), args, complex_ok=True,
+                               preserve_shape=preserve_shape, xp=xp)
+    f, xs, fs, args, shape, dtype, xp = temp
+    a = xp_ravel(xp.astype(xp.broadcast_to(a, shape), dtype))
+    b = xp_ravel(xp.astype(xp.broadcast_to(b, shape), dtype))
+
+    # Transform improper integrals
+    a, b, a0, negative, abinf, ainf, binf = _transform_integrals(a, b, xp)
+
+    # Define variables we'll need
+    nit, nfev = 0, 1  # one function evaluation performed above
+    zero = -xp.inf if log else 0
+    pi = xp.asarray(xp.pi, dtype=dtype)[()]
+    maxiter = maxlevel - minlevel + 1
+    eps = xp.finfo(dtype).eps
+    if rtol is None:
+        rtol = 0.75*math.log(eps) if log else eps**0.75
+
+    Sn = xp_ravel(xp.full(shape, zero, dtype=dtype))  # latest integral estimate
+    Sn[xp.isnan(a) | xp.isnan(b) | xp.isnan(fs[0])] = xp.nan
+    Sk = xp.reshape(xp.empty_like(Sn), (-1, 1))[:, 0:0]  # all integral estimates
+    aerr = xp_ravel(xp.full(shape, xp.nan, dtype=dtype))  # absolute error
+    status = xp_ravel(xp.full(shape, eim._EINPROGRESS, dtype=xp.int32))
+    h0 = _get_base_step(dtype, xp)
+    h0 = xp_real(h0) # base step
+
+    # For term `d4` of error estimate ([1] Section 5), we need to keep the
+    # most extreme abscissae and corresponding `fj`s, `wj`s in Euler-Maclaurin
+    # sum. Here, we initialize these variables.
+    xr0 = xp_ravel(xp.full(shape, -xp.inf, dtype=dtype))
+    fr0 = xp_ravel(xp.full(shape, xp.nan, dtype=dtype))
+    wr0 = xp_ravel(xp.zeros(shape, dtype=dtype))
+    xl0 = xp_ravel(xp.full(shape, xp.inf, dtype=dtype))
+    fl0 = xp_ravel(xp.full(shape, xp.nan, dtype=dtype))
+    wl0 = xp_ravel(xp.zeros(shape, dtype=dtype))
+    d4 = xp_ravel(xp.zeros(shape, dtype=dtype))
+
+    work = _RichResult(
+        Sn=Sn, Sk=Sk, aerr=aerr, h=h0, log=log, dtype=dtype, pi=pi, eps=eps,
+        a=xp.reshape(a, (-1, 1)), b=xp.reshape(b, (-1, 1)),  # integration limits
+        n=minlevel, nit=nit, nfev=nfev, status=status,  # iter/eval counts
+        xr0=xr0, fr0=fr0, wr0=wr0, xl0=xl0, fl0=fl0, wl0=wl0, d4=d4,  # err est
+        ainf=ainf, binf=binf, abinf=abinf, a0=xp.reshape(a0, (-1, 1)),  # transforms
+        # Store the xjc/wj pair cache in an object so they can't get compressed
+        # Using RichResult to allow dot notation, but a dictionary would suffice
+        pair_cache=_RichResult(xjc=None, wj=None, indices=[0], h0=None))  # pair cache
+
+    # Constant scalars don't need to be put in `work` unless they need to be
+    # passed outside `tanhsinh`. Examples: atol, rtol, h0, minlevel.
+
+    # Correspondence between terms in the `work` object and the result
+    res_work_pairs = [('status', 'status'), ('integral', 'Sn'),
+                      ('error', 'aerr'), ('nit', 'nit'), ('nfev', 'nfev')]
+
+    def pre_func_eval(work):
+        # Determine abscissae at which to evaluate `f`
+        work.h = h0 / 2**work.n
+        xjc, wj = _get_pairs(work.n, h0, dtype=work.dtype,
+                             inclusive=(work.n == minlevel), xp=xp, work=work)
+        work.xj, work.wj = _transform_to_limits(xjc, wj, work.a, work.b, xp)
+
+        # Perform abscissae substitutions for infinite limits of integration
+        xj = xp_copy(work.xj)
+        # use xp_real here to avoid cupy/cupy#8434
+        xj[work.abinf] = xj[work.abinf] / (1 - xp_real(xj[work.abinf])**2)
+        xj[work.binf] = 1/xj[work.binf] - 1 + work.a0[work.binf]
+        xj[work.ainf] *= -1
+        return xj
+
+    def post_func_eval(x, fj, work):
+        # Weight integrand as required by substitutions for infinite limits
+        if work.log:
+            fj[work.abinf] += (xp.log(1 + work.xj[work.abinf]**2)
+                               - 2*xp.log(1 - work.xj[work.abinf]**2))
+            fj[work.binf] -= 2 * xp.log(work.xj[work.binf])
+        else:
+            fj[work.abinf] *= ((1 + work.xj[work.abinf]**2) /
+                               (1 - work.xj[work.abinf]**2)**2)
+            fj[work.binf] *= work.xj[work.binf]**-2.
+
+        # Estimate integral with Euler-Maclaurin Sum
+        fjwj, Sn = _euler_maclaurin_sum(fj, work, xp)
+        if work.Sk.shape[-1]:
+            Snm1 = work.Sk[:, -1]
+            Sn = (special.logsumexp(xp.stack([Snm1 - math.log(2), Sn]), axis=0) if log
+                  else Snm1 / 2 + Sn)
+
+        work.fjwj = fjwj
+        work.Sn = Sn
+
+    def check_termination(work):
+        """Terminate due to convergence or encountering non-finite values"""
+        stop = xp.zeros(work.Sn.shape, dtype=bool)
+
+        # Terminate before first iteration if integration limits are equal
+        if work.nit == 0:
+            i = xp_ravel(work.a == work.b)  # ravel singleton dimension
+            zero = xp.asarray(-xp.inf if log else 0.)
+            zero = xp.full(work.Sn.shape, zero, dtype=Sn.dtype)
+            zero[xp.isnan(Sn)] = xp.nan
+            work.Sn[i] = zero[i]
+            work.aerr[i] = zero[i]
+            work.status[i] = eim._ECONVERGED
+            stop[i] = True
+        else:
+            # Terminate if convergence criterion is met
+            rerr, aerr = _estimate_error(work, xp)
+            i = (rerr < rtol) | (aerr < atol)
+            work.aerr =  xp.reshape(xp.astype(aerr, work.dtype), work.Sn.shape)
+            work.status[i] = eim._ECONVERGED
+            stop[i] = True
+
+        # Terminate if integral estimate becomes invalid
+        if log:
+            Sn_real = xp_real(work.Sn)
+            Sn_pos_inf = xp.isinf(Sn_real) & (Sn_real > 0)
+            i = (Sn_pos_inf | xp.isnan(work.Sn)) & ~stop
+        else:
+            i = ~xp.isfinite(work.Sn) & ~stop
+        work.status[i] = eim._EVALUEERR
+        stop[i] = True
+
+        return stop
+
+    def post_termination_check(work):
+        work.n += 1
+        work.Sk = xp.concat((work.Sk, work.Sn[:, xp.newaxis]), axis=-1)
+        return
+
+    def customize_result(res, shape):
+        # If the integration limits were such that b < a, we reversed them
+        # to perform the calculation, and the final result needs to be negated.
+        if log and xp.any(negative):
+            dtype = res['integral'].dtype
+            pi = xp.asarray(xp.pi, dtype=dtype)[()]
+            j = xp.asarray(1j, dtype=xp.complex64)[()]  # minimum complex type
+            res['integral'] = res['integral'] + negative*pi*j
+        else:
+            res['integral'][negative] *= -1
+
+        # For this algorithm, it seems more appropriate to report the maximum
+        # level rather than the number of iterations in which it was performed.
+        res['maxlevel'] = minlevel + res['nit'] - 1
+        res['maxlevel'][res['nit'] == 0] = -1
+        del res['nit']
+        return shape
+
+    # Suppress all warnings initially, since there are many places in the code
+    # for which this is expected behavior.
+    with np.errstate(over='ignore', invalid='ignore', divide='ignore'):
+        res = eim._loop(work, callback, shape, maxiter, f, args, dtype, pre_func_eval,
+                        post_func_eval, check_termination, post_termination_check,
+                        customize_result, res_work_pairs, xp, preserve_shape)
+    return res
+
+
+def _get_base_step(dtype, xp):
+    # Compute the base step length for the provided dtype. Theoretically, the
+    # Euler-Maclaurin sum is infinite, but it gets cut off when either the
+    # weights underflow or the abscissae cannot be distinguished from the
+    # limits of integration. The latter happens to occur first for float32 and
+    # float64, and it occurs when `xjc` (the abscissa complement)
+    # in `_compute_pair` underflows. We can solve for the argument `tmax` at
+    # which it will underflow using [2] Eq. 13.
+    fmin = 4*xp.finfo(dtype).smallest_normal  # stay a little away from the limit
+    tmax = math.asinh(math.log(2/fmin - 1) / xp.pi)
+
+    # Based on this, we can choose a base step size `h` for level 0.
+    # The number of function evaluations will be `2 + m*2^(k+1)`, where `k` is
+    # the level and `m` is an integer we get to choose. I choose
+    # m = _N_BASE_STEPS = `8` somewhat arbitrarily, but a rationale is that a
+    # power of 2 makes floating point arithmetic more predictable. It also
+    # results in a base step size close to `1`, which is what [1] uses (and I
+    # used here until I found [2] and these ideas settled).
+    h0 = tmax / _N_BASE_STEPS
+    return xp.asarray(h0, dtype=dtype)[()]
+
+
+_N_BASE_STEPS = 8
+
+
+def _compute_pair(k, h0, xp):
+    # Compute the abscissa-weight pairs for each level k. See [1] page 9.
+
+    # For now, we compute and store in 64-bit precision. If higher-precision
+    # data types become better supported, it would be good to compute these
+    # using the highest precision available. Or, once there is an Array API-
+    # compatible arbitrary precision array, we can compute at the required
+    # precision.
+
+    # "....each level k of abscissa-weight pairs uses h = 2 **-k"
+    # We adapt to floating point arithmetic using ideas of [2].
+    h = h0 / 2**k
+    max = _N_BASE_STEPS * 2**k
+
+    # For iterations after the first, "....the integrand function needs to be
+    # evaluated only at the odd-indexed abscissas at each level."
+    j = xp.arange(max+1) if k == 0 else xp.arange(1, max+1, 2)
+    jh = j * h
+
+    # "In this case... the weights wj = u1/cosh(u2)^2, where..."
+    pi_2 = xp.pi / 2
+    u1 = pi_2*xp.cosh(jh)
+    u2 = pi_2*xp.sinh(jh)
+    # Denominators get big here. Overflow then underflow doesn't need warning.
+    # with np.errstate(under='ignore', over='ignore'):
+    wj = u1 / xp.cosh(u2)**2
+    # "We actually store 1-xj = 1/(...)."
+    xjc = 1 / (xp.exp(u2) * xp.cosh(u2))  # complement of xj = xp.tanh(u2)
+
+    # When level k == 0, the zeroth xj corresponds with xj = 0. To simplify
+    # code, the function will be evaluated there twice; each gets half weight.
+    wj[0] = wj[0] / 2 if k == 0 else wj[0]
+
+    return xjc, wj  # store at full precision
+
+
+def _pair_cache(k, h0, xp, work):
+    # Cache the abscissa-weight pairs up to a specified level.
+    # Abscissae and weights of consecutive levels are concatenated.
+    # `index` records the indices that correspond with each level:
+    # `xjc[index[k]:index[k+1]` extracts the level `k` abscissae.
+    if not isinstance(h0, type(work.pair_cache.h0)) or h0 != work.pair_cache.h0:
+        work.pair_cache.xjc = xp.empty(0)
+        work.pair_cache.wj = xp.empty(0)
+        work.pair_cache.indices = [0]
+
+    xjcs = [work.pair_cache.xjc]
+    wjs = [work.pair_cache.wj]
+
+    for i in range(len(work.pair_cache.indices)-1, k + 1):
+        xjc, wj = _compute_pair(i, h0, xp)
+        xjcs.append(xjc)
+        wjs.append(wj)
+        work.pair_cache.indices.append(work.pair_cache.indices[-1] + xjc.shape[0])
+
+    work.pair_cache.xjc = xp.concat(xjcs)
+    work.pair_cache.wj = xp.concat(wjs)
+    work.pair_cache.h0 = h0
+
+
+def _get_pairs(k, h0, inclusive, dtype, xp, work):
+    # Retrieve the specified abscissa-weight pairs from the cache
+    # If `inclusive`, return all up to and including the specified level
+    if (len(work.pair_cache.indices) <= k+2
+        or not isinstance (h0, type(work.pair_cache.h0))
+        or h0 != work.pair_cache.h0):
+            _pair_cache(k, h0, xp, work)
+
+    xjc = work.pair_cache.xjc
+    wj = work.pair_cache.wj
+    indices = work.pair_cache.indices
+
+    start = 0 if inclusive else indices[k]
+    end = indices[k+1]
+
+    return xp.astype(xjc[start:end], dtype), xp.astype(wj[start:end], dtype)
+
+
+def _transform_to_limits(xjc, wj, a, b, xp):
+    # Transform integral according to user-specified limits. This is just
+    # math that follows from the fact that the standard limits are (-1, 1).
+    # Note: If we had stored xj instead of xjc, we would have
+    # xj = alpha * xj + beta, where beta = (a + b)/2
+    alpha = (b - a) / 2
+    xj = xp.concat((-alpha * xjc + b, alpha * xjc + a), axis=-1)
+    wj = wj*alpha  # arguments get broadcasted, so we can't use *=
+    wj = xp.concat((wj, wj), axis=-1)
+
+    # Points at the boundaries can be generated due to finite precision
+    # arithmetic, but these function values aren't supposed to be included in
+    # the Euler-Maclaurin sum. Ideally we wouldn't evaluate the function at
+    # these points; however, we can't easily filter out points since this
+    # function is vectorized. Instead, zero the weights.
+    # Note: values may have complex dtype, but have zero imaginary part
+    xj_real, a_real, b_real = xp_real(xj), xp_real(a), xp_real(b)
+    invalid = (xj_real <= a_real) | (xj_real >= b_real)
+    wj[invalid] = 0
+    return xj, wj
+
+
+def _euler_maclaurin_sum(fj, work, xp):
+    # Perform the Euler-Maclaurin Sum, [1] Section 4
+
+    # The error estimate needs to know the magnitude of the last term
+    # omitted from the Euler-Maclaurin sum. This is a bit involved because
+    # it may have been computed at a previous level. I sure hope it's worth
+    # all the trouble.
+    xr0, fr0, wr0 = work.xr0, work.fr0, work.wr0
+    xl0, fl0, wl0 = work.xl0, work.fl0, work.wl0
+
+    # It is much more convenient to work with the transposes of our work
+    # variables here.
+    xj, fj, wj = work.xj.T, fj.T, work.wj.T
+    n_x, n_active = xj.shape  # number of abscissae, number of active elements
+
+    # We'll work with the left and right sides separately
+    xr, xl = xp_copy(xp.reshape(xj, (2, n_x // 2, n_active)))  # this gets modified
+    fr, fl = xp.reshape(fj, (2, n_x // 2, n_active))
+    wr, wl = xp.reshape(wj, (2, n_x // 2, n_active))
+
+    invalid_r = ~xp.isfinite(fr) | (wr == 0)
+    invalid_l = ~xp.isfinite(fl) | (wl == 0)
+
+    # integer index of the maximum abscissa at this level
+    xr[invalid_r] = -xp.inf
+    ir = xp.argmax(xp_real(xr), axis=0, keepdims=True)
+    # abscissa, function value, and weight at this index
+    ### Not Array API Compatible... yet ###
+    xr_max = xp_take_along_axis(xr, ir, axis=0)[0]
+    fr_max = xp_take_along_axis(fr, ir, axis=0)[0]
+    wr_max = xp_take_along_axis(wr, ir, axis=0)[0]
+    # boolean indices at which maximum abscissa at this level exceeds
+    # the incumbent maximum abscissa (from all previous levels)
+    # note: abscissa may have complex dtype, but will have zero imaginary part
+    j = xp_real(xr_max) > xp_real(xr0)
+    # Update record of the incumbent abscissa, function value, and weight
+    xr0[j] = xr_max[j]
+    fr0[j] = fr_max[j]
+    wr0[j] = wr_max[j]
+
+    # integer index of the minimum abscissa at this level
+    xl[invalid_l] = xp.inf
+    il = xp.argmin(xp_real(xl), axis=0, keepdims=True)
+    # abscissa, function value, and weight at this index
+    xl_min = xp_take_along_axis(xl, il, axis=0)[0]
+    fl_min = xp_take_along_axis(fl, il, axis=0)[0]
+    wl_min = xp_take_along_axis(wl, il, axis=0)[0]
+    # boolean indices at which minimum abscissa at this level is less than
+    # the incumbent minimum abscissa (from all previous levels)
+    # note: abscissa may have complex dtype, but will have zero imaginary part
+    j = xp_real(xl_min) < xp_real(xl0)
+    # Update record of the incumbent abscissa, function value, and weight
+    xl0[j] = xl_min[j]
+    fl0[j] = fl_min[j]
+    wl0[j] = wl_min[j]
+    fj = fj.T
+
+    # Compute the error estimate `d4` - the magnitude of the leftmost or
+    # rightmost term, whichever is greater.
+    flwl0 = fl0 + xp.log(wl0) if work.log else fl0 * wl0  # leftmost term
+    frwr0 = fr0 + xp.log(wr0) if work.log else fr0 * wr0  # rightmost term
+    magnitude = xp_real if work.log else xp.abs
+    work.d4 = xp.maximum(magnitude(flwl0), magnitude(frwr0))
+
+    # There are two approaches to dealing with function values that are
+    # numerically infinite due to approaching a singularity - zero them, or
+    # replace them with the function value at the nearest non-infinite point.
+    # [3] pg. 22 suggests the latter, so let's do that given that we have the
+    # information.
+    fr0b = xp.broadcast_to(fr0[xp.newaxis, :], fr.shape)
+    fl0b = xp.broadcast_to(fl0[xp.newaxis, :], fl.shape)
+    fr[invalid_r] = fr0b[invalid_r]
+    fl[invalid_l] = fl0b[invalid_l]
+
+    # When wj is zero, log emits a warning
+    # with np.errstate(divide='ignore'):
+    fjwj = fj + xp.log(work.wj) if work.log else fj * work.wj
+
+    # update integral estimate
+    Sn = (special.logsumexp(fjwj + xp.log(work.h), axis=-1) if work.log
+          else xp.sum(fjwj, axis=-1) * work.h)
+
+    work.xr0, work.fr0, work.wr0 = xr0, fr0, wr0
+    work.xl0, work.fl0, work.wl0 = xl0, fl0, wl0
+
+    return fjwj, Sn
+
+
+def _estimate_error(work, xp):
+    # Estimate the error according to [1] Section 5
+
+    if work.n == 0 or work.nit == 0:
+        # The paper says to use "one" as the error before it can be calculated.
+        # NaN seems to be more appropriate.
+        nan = xp.full_like(work.Sn, xp.nan)
+        return nan, nan
+
+    indices = work.pair_cache.indices
+
+    n_active = work.Sn.shape[0]  # number of active elements
+    axis_kwargs = dict(axis=-1, keepdims=True)
+
+    # With a jump start (starting at level higher than 0), we haven't
+    # explicitly calculated the integral estimate at lower levels. But we have
+    # all the function value-weight products, so we can compute the
+    # lower-level estimates.
+    if work.Sk.shape[-1] == 0:
+        h = 2 * work.h  # step size at this level
+        n_x = indices[work.n]  # number of abscissa up to this level
+        # The right and left fjwj terms from all levels are concatenated along
+        # the last axis. Get out only the terms up to this level.
+        fjwj_rl = xp.reshape(work.fjwj, (n_active, 2, -1))
+        fjwj = xp.reshape(fjwj_rl[:, :, :n_x], (n_active, 2*n_x))
+        # Compute the Euler-Maclaurin sum at this level
+        Snm1 = (special.logsumexp(fjwj, **axis_kwargs) + xp.log(h) if work.log
+                else xp.sum(fjwj, **axis_kwargs) * h)
+        work.Sk = xp.concat((Snm1, work.Sk), axis=-1)
+
+    if work.n == 1:
+        nan = xp.full_like(work.Sn, xp.nan)
+        return nan, nan
+
+    # The paper says not to calculate the error for n<=2, but it's not clear
+    # about whether it starts at level 0 or level 1. We start at level 0, so
+    # why not compute the error beginning in level 2?
+    if work.Sk.shape[-1] < 2:
+        h = 4 * work.h  # step size at this level
+        n_x = indices[work.n-1]  # number of abscissa up to this level
+        # The right and left fjwj terms from all levels are concatenated along
+        # the last axis. Get out only the terms up to this level.
+        fjwj_rl = xp.reshape(work.fjwj, (work.Sn.shape[0], 2, -1))
+        fjwj = xp.reshape(fjwj_rl[..., :n_x], (n_active, 2*n_x))
+        # Compute the Euler-Maclaurin sum at this level
+        Snm2 = (special.logsumexp(fjwj, **axis_kwargs) + xp.log(h) if work.log
+                else xp.sum(fjwj, **axis_kwargs) * h)
+        work.Sk = xp.concat((Snm2, work.Sk), axis=-1)
+
+    Snm2 = work.Sk[..., -2]
+    Snm1 = work.Sk[..., -1]
+
+    e1 = xp.asarray(work.eps)[()]
+
+    if work.log:
+        log_e1 = xp.log(e1)
+        # Currently, only real integrals are supported in log-scale. All
+        # complex values have imaginary part in increments of pi*j, which just
+        # carries sign information of the original integral, so use of
+        # `xp.real` here is equivalent to absolute value in real scale.
+        d1 = xp_real(special.logsumexp(xp.stack([work.Sn, Snm1 + work.pi*1j]), axis=0))
+        d2 = xp_real(special.logsumexp(xp.stack([work.Sn, Snm2 + work.pi*1j]), axis=0))
+        d3 = log_e1 + xp.max(xp_real(work.fjwj), axis=-1)
+        d4 = work.d4
+        d5 = log_e1 + xp.real(work.Sn)
+        temp = xp.where(d1 > -xp.inf, d1 ** 2 / d2, -xp.inf)
+        ds = xp.stack([temp, 2 * d1, d3, d4, d5])
+        aerr = xp.max(ds, axis=0)
+        rerr = aerr - xp.real(work.Sn)
+    else:
+        # Note: explicit computation of log10 of each of these is unnecessary.
+        d1 = xp.abs(work.Sn - Snm1)
+        d2 = xp.abs(work.Sn - Snm2)
+        d3 = e1 * xp.max(xp.abs(work.fjwj), axis=-1)
+        d4 = work.d4
+        d5 = e1 * xp.abs(work.Sn)
+        temp = xp.where(d1 > 0, d1**(xp.log(d1)/xp.log(d2)), 0)
+        ds = xp.stack([temp, d1**2, d3, d4, d5])
+        aerr = xp.max(ds, axis=0)
+        rerr = aerr/xp.abs(work.Sn)
+
+    return rerr, aerr
+
+
+def _transform_integrals(a, b, xp):
+    # Transform integrals to a form with finite a <= b
+    # For b == a (even infinite), we ensure that the limits remain equal
+    # For b < a, we reverse the limits and will multiply the final result by -1
+    # For infinite limit on the right, we use the substitution x = 1/t - 1 + a
+    # For infinite limit on the left, we substitute x = -x and treat as above
+    # For infinite limits, we substitute x = t / (1-t**2)
+    ab_same = (a == b)
+    a[ab_same], b[ab_same] = 1, 1
+
+    # `a, b` may have complex dtype but have zero imaginary part
+    negative = xp_real(b) < xp_real(a)
+    a[negative], b[negative] = b[negative], a[negative]
+
+    abinf = xp.isinf(a) & xp.isinf(b)
+    a[abinf], b[abinf] = -1, 1
+
+    ainf = xp.isinf(a)
+    a[ainf], b[ainf] = -b[ainf], -a[ainf]
+
+    binf = xp.isinf(b)
+    a0 = xp_copy(a)
+    a[binf], b[binf] = 0, 1
+
+    return a, b, a0, negative, abinf, ainf, binf
+
+
+def _tanhsinh_iv(f, a, b, log, maxfun, maxlevel, minlevel,
+                 atol, rtol, args, preserve_shape, callback):
+    # Input validation and standardization
+
+    xp = array_namespace(a, b)
+
+    message = '`f` must be callable.'
+    if not callable(f):
+        raise ValueError(message)
+
+    message = 'All elements of `a` and `b` must be real numbers.'
+    a, b = xp.asarray(a), xp.asarray(b)
+    a, b = xp.broadcast_arrays(a, b)
+    if (xp.isdtype(a.dtype, 'complex floating')
+            or xp.isdtype(b.dtype, 'complex floating')):
+        raise ValueError(message)
+
+    message = '`log` must be True or False.'
+    if log not in {True, False}:
+        raise ValueError(message)
+    log = bool(log)
+
+    if atol is None:
+        atol = -xp.inf if log else 0
+
+    rtol_temp = rtol if rtol is not None else 0.
+
+    # using NumPy for convenience here; these are just floats, not arrays
+    params = np.asarray([atol, rtol_temp, 0.])
+    message = "`atol` and `rtol` must be real numbers."
+    if not np.issubdtype(params.dtype, np.floating):
+        raise ValueError(message)
+
+    if log:
+        message = '`atol` and `rtol` may not be positive infinity.'
+        if np.any(np.isposinf(params)):
+            raise ValueError(message)
+    else:
+        message = '`atol` and `rtol` must be non-negative and finite.'
+        if np.any(params < 0) or np.any(np.isinf(params)):
+            raise ValueError(message)
+    atol = params[0]
+    rtol = rtol if rtol is None else params[1]
+
+    BIGINT = float(2**62)
+    if maxfun is None and maxlevel is None:
+        maxlevel = 10
+
+    maxfun = BIGINT if maxfun is None else maxfun
+    maxlevel = BIGINT if maxlevel is None else maxlevel
+
+    message = '`maxfun`, `maxlevel`, and `minlevel` must be integers.'
+    params = np.asarray([maxfun, maxlevel, minlevel])
+    if not (np.issubdtype(params.dtype, np.number)
+            and np.all(np.isreal(params))
+            and np.all(params.astype(np.int64) == params)):
+        raise ValueError(message)
+    message = '`maxfun`, `maxlevel`, and `minlevel` must be non-negative.'
+    if np.any(params < 0):
+        raise ValueError(message)
+    maxfun, maxlevel, minlevel = params.astype(np.int64)
+    minlevel = min(minlevel, maxlevel)
+
+    if not np.iterable(args):
+        args = (args,)
+    args = (xp.asarray(arg) for arg in args)
+
+    message = '`preserve_shape` must be True or False.'
+    if preserve_shape not in {True, False}:
+        raise ValueError(message)
+
+    if callback is not None and not callable(callback):
+        raise ValueError('`callback` must be callable.')
+
+    return (f, a, b, log, maxfun, maxlevel, minlevel,
+            atol, rtol, args, preserve_shape, callback, xp)
+
+
+def _nsum_iv(f, a, b, step, args, log, maxterms, tolerances):
+    # Input validation and standardization
+
+    xp = array_namespace(a, b)
+
+    message = '`f` must be callable.'
+    if not callable(f):
+        raise ValueError(message)
+
+    message = 'All elements of `a`, `b`, and `step` must be real numbers.'
+    a, b, step = xp.broadcast_arrays(xp.asarray(a), xp.asarray(b), xp.asarray(step))
+    dtype = xp.result_type(a.dtype, b.dtype, step.dtype)
+    if not xp.isdtype(dtype, 'numeric') or xp.isdtype(dtype, 'complex floating'):
+        raise ValueError(message)
+
+    valid_b = b >= a  # NaNs will be False
+    valid_step = xp.isfinite(step) & (step > 0)
+    valid_abstep = valid_b & valid_step
+
+    message = '`log` must be True or False.'
+    if log not in {True, False}:
+        raise ValueError(message)
+
+    tolerances = {} if tolerances is None else tolerances
+
+    atol = tolerances.get('atol', None)
+    if atol is None:
+        atol = -xp.inf if log else 0
+
+    rtol = tolerances.get('rtol', None)
+    rtol_temp = rtol if rtol is not None else 0.
+
+    # using NumPy for convenience here; these are just floats, not arrays
+    params = np.asarray([atol, rtol_temp, 0.])
+    message = "`atol` and `rtol` must be real numbers."
+    if not np.issubdtype(params.dtype, np.floating):
+        raise ValueError(message)
+
+    if log:
+        message = '`atol`, `rtol` may not be positive infinity or NaN.'
+        if np.any(np.isposinf(params) | np.isnan(params)):
+            raise ValueError(message)
+    else:
+        message = '`atol`, and `rtol` must be non-negative and finite.'
+        if np.any((params < 0) | (~np.isfinite(params))):
+            raise ValueError(message)
+    atol = params[0]
+    rtol = rtol if rtol is None else params[1]
+
+    maxterms_int = int(maxterms)
+    if maxterms_int != maxterms or maxterms < 0:
+        message = "`maxterms` must be a non-negative integer."
+        raise ValueError(message)
+
+    if not np.iterable(args):
+        args = (args,)
+
+    return f, a, b, step, valid_abstep, args, log, maxterms_int, atol, rtol, xp
+
+
+def nsum(f, a, b, *, step=1, args=(), log=False, maxterms=int(2**20), tolerances=None):
+    r"""Evaluate a convergent finite or infinite series.
+
+    For finite `a` and `b`, this evaluates::
+
+        f(a + np.arange(n)*step).sum()
+
+    where ``n = int((b - a) / step) + 1``, where `f` is smooth, positive, and
+    unimodal. The number of terms in the sum may be very large or infinite,
+    in which case a partial sum is evaluated directly and the remainder is
+    approximated using integration.
+
+    Parameters
+    ----------
+    f : callable
+        The function that evaluates terms to be summed. The signature must be::
+
+            f(x: ndarray, *args) -> ndarray
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``.
+
+        `f` must be an elementwise function: each element ``f(x)[i]``
+        must equal ``f(x[i])`` for all indices ``i``. It must not mutate the
+        array ``x`` or the arrays in ``args``, and it must return NaN where
+        the argument is NaN.
+
+        `f` must represent a smooth, positive, unimodal function of `x` defined at
+        *all reals* between `a` and `b`.
+    a, b : float array_like
+        Real lower and upper limits of summed terms. Must be broadcastable.
+        Each element of `a` must be less than the corresponding element in `b`.
+    step : float array_like
+        Finite, positive, real step between summed terms. Must be broadcastable
+        with `a` and `b`. Note that the number of terms included in the sum will
+        be ``floor((b - a) / step)`` + 1; adjust `b` accordingly to ensure
+        that ``f(b)`` is included if intended.
+    args : tuple of array_like, optional
+        Additional positional arguments to be passed to `f`. Must be arrays
+        broadcastable with `a`, `b`, and `step`. If the callable to be summed
+        requires arguments that are not broadcastable with `a`, `b`, and `step`,
+        wrap that callable with `f` such that `f` accepts only `x` and
+        broadcastable ``*args``. See Examples.
+    log : bool, default: False
+        Setting to True indicates that `f` returns the log of the terms
+        and that `atol` and `rtol` are expressed as the logs of the absolute
+        and relative errors. In this case, the result object will contain the
+        log of the sum and error. This is useful for summands for which
+        numerical underflow or overflow would lead to inaccuracies.
+    maxterms : int, default: 2**20
+        The maximum number of terms to evaluate for direct summation.
+        Additional function evaluations may be performed for input
+        validation and integral evaluation.
+    atol, rtol : float, optional
+        Absolute termination tolerance (default: 0) and relative termination
+        tolerance (default: ``eps**0.5``, where ``eps`` is the precision of
+        the result dtype), respectively. Must be non-negative
+        and finite if `log` is False, and must be expressed as the log of a
+        non-negative and finite number if `log` is True.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. (The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.)
+
+        success : bool
+            ``True`` when the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : Element(s) of `a`, `b`, or `step` are invalid
+            - ``-2`` : Numerical integration reached its iteration limit;
+              the sum may be divergent.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : The magnitude of the last term of the partial sum exceeds
+              the tolerances, so the error estimate exceeds the tolerances.
+              Consider increasing `maxterms` or loosening `tolerances`.
+              Alternatively, the callable may not be unimodal, or the limits of
+              summation may be too far from the function maximum. Consider
+              increasing `maxterms` or breaking the sum into pieces.
+
+        sum : float array
+            An estimate of the sum.
+        error : float array
+            An estimate of the absolute error, assuming all terms are non-negative,
+            the function is computed exactly, and direct summation is accurate to
+            the precision of the result dtype.
+        nfev : int array
+            The number of points at which `f` was evaluated.
+
+    See Also
+    --------
+    mpmath.nsum
+
+    Notes
+    -----
+    The method implemented for infinite summation is related to the integral
+    test for convergence of an infinite series: assuming `step` size 1 for
+    simplicity of exposition, the sum of a monotone decreasing function is bounded by
+
+    .. math::
+
+        \int_u^\infty f(x) dx \leq \sum_{k=u}^\infty f(k) \leq \int_u^\infty f(x) dx + f(u)
+
+    Let :math:`a` represent  `a`, :math:`n` represent `maxterms`, :math:`\epsilon_a`
+    represent `atol`, and :math:`\epsilon_r` represent `rtol`.
+    The implementation first evaluates the integral :math:`S_l=\int_a^\infty f(x) dx`
+    as a lower bound of the infinite sum. Then, it seeks a value :math:`c > a` such
+    that :math:`f(c) < \epsilon_a + S_l \epsilon_r`, if it exists; otherwise,
+    let :math:`c = a + n`. Then the infinite sum is approximated as
+
+    .. math::
+
+        \sum_{k=a}^{c-1} f(k) + \int_c^\infty f(x) dx + f(c)/2
+
+    and the reported error is :math:`f(c)/2` plus the error estimate of
+    numerical integration. Note that the integral approximations may require
+    evaluation of the function at points besides those that appear in the sum,
+    so `f` must be a continuous and monotonically decreasing function defined
+    for all reals within the integration interval. However, due to the nature
+    of the integral approximation, the shape of the function between points
+    that appear in the sum has little effect. If there is not a natural
+    extension of the function to all reals, consider using linear interpolation,
+    which is easy to evaluate and preserves monotonicity.
+
+    The approach described above is generalized for non-unit
+    `step` and finite `b` that is too large for direct evaluation of the sum,
+    i.e. ``b - a + 1 > maxterms``. It is further generalized to unimodal
+    functions by directly summing terms surrounding the maximum.
+    This strategy may fail:
+
+    - If the left limit is finite and the maximum is far from it.
+    - If the right limit is finite and the maximum is far from it.
+    - If both limits are finite and the maximum is far from the origin.
+
+    In these cases, accuracy may be poor, and `nsum` may return status code ``4``.
+
+    Although the callable `f` must be non-negative and unimodal,
+    `nsum` can be used to evaluate more general forms of series. For instance, to
+    evaluate an alternating series, pass a callable that returns the difference
+    between pairs of adjacent terms, and adjust `step` accordingly. See Examples.
+
+    References
+    ----------
+    .. [1] Wikipedia. "Integral test for convergence."
+           https://en.wikipedia.org/wiki/Integral_test_for_convergence
+
+    Examples
+    --------
+    Compute the infinite sum of the reciprocals of squared integers.
+
+    >>> import numpy as np
+    >>> from scipy.integrate import nsum
+    >>> res = nsum(lambda k: 1/k**2, 1, np.inf)
+    >>> ref = np.pi**2/6  # true value
+    >>> res.error  # estimated error
+    np.float64(7.448762306416137e-09)
+    >>> (res.sum - ref)/ref  # true error
+    np.float64(-1.839871898894426e-13)
+    >>> res.nfev  # number of points at which callable was evaluated
+    np.int32(8561)
+
+    Compute the infinite sums of the reciprocals of integers raised to powers ``p``,
+    where ``p`` is an array.
+
+    >>> from scipy import special
+    >>> p = np.arange(3, 10)
+    >>> res = nsum(lambda k, p: 1/k**p, 1, np.inf, maxterms=1e3, args=(p,))
+    >>> ref = special.zeta(p, 1)
+    >>> np.allclose(res.sum, ref)
+    True
+
+    Evaluate the alternating harmonic series.
+
+    >>> res = nsum(lambda x: 1/x - 1/(x+1), 1, np.inf, step=2)
+    >>> res.sum, res.sum - np.log(2)  # result, difference vs analytical sum
+    (np.float64(0.6931471805598691), np.float64(-7.616129948928574e-14))
+
+    """ # noqa: E501
+    # Potential future work:
+    # - improve error estimate of `_direct` sum
+    # - add other methods for convergence acceleration (Richardson, epsilon)
+    # - support negative monotone increasing functions?
+    # - b < a / negative step?
+    # - complex-valued function?
+    # - check for violations of monotonicity?
+
+    # Function-specific input validation / standardization
+    tmp = _nsum_iv(f, a, b, step, args, log, maxterms, tolerances)
+    f, a, b, step, valid_abstep, args, log, maxterms, atol, rtol, xp = tmp
+
+    # Additional elementwise algorithm input validation / standardization
+    tmp = eim._initialize(f, (a,), args, complex_ok=False, xp=xp)
+    f, xs, fs, args, shape, dtype, xp = tmp
+
+    # Finish preparing `a`, `b`, and `step` arrays
+    a = xs[0]
+    b = xp.astype(xp_ravel(xp.broadcast_to(b, shape)), dtype)
+    step = xp.astype(xp_ravel(xp.broadcast_to(step, shape)), dtype)
+    valid_abstep = xp_ravel(xp.broadcast_to(valid_abstep, shape))
+    nterms = xp.floor((b - a) / step)
+    finite_terms = xp.isfinite(nterms)
+    b[finite_terms] = a[finite_terms] + nterms[finite_terms]*step[finite_terms]
+
+    # Define constants
+    eps = xp.finfo(dtype).eps
+    zero = xp.asarray(-xp.inf if log else 0, dtype=dtype)[()]
+    if rtol is None:
+        rtol = 0.5*math.log(eps) if log else eps**0.5
+    constants = (dtype, log, eps, zero, rtol, atol, maxterms)
+
+    # Prepare result arrays
+    S = xp.empty_like(a)
+    E = xp.empty_like(a)
+    status = xp.zeros(len(a), dtype=xp.int32)
+    nfev = xp.ones(len(a), dtype=xp.int32)  # one function evaluation above
+
+    # Branch for direct sum evaluation / integral approximation / invalid input
+    i0 = ~valid_abstep                     # invalid
+    i1 = (nterms + 1 <= maxterms) & ~i0    # direct sum evaluation
+    i2 = xp.isfinite(a) & ~i1 & ~i0        # infinite sum to the right
+    i3 = xp.isfinite(b) & ~i2 & ~i1 & ~i0  # infinite sum to the left
+    i4 = ~i3 & ~i2 & ~i1 & ~i0             # infinite sum on both sides
+
+    if xp.any(i0):
+        S[i0], E[i0] = xp.nan, xp.nan
+        status[i0] = -1
+
+    if xp.any(i1):
+        args_direct = [arg[i1] for arg in args]
+        tmp = _direct(f, a[i1], b[i1], step[i1], args_direct, constants, xp)
+        S[i1], E[i1] = tmp[:-1]
+        nfev[i1] += tmp[-1]
+        status[i1] = -3 * xp.asarray(~xp.isfinite(S[i1]), dtype=xp.int32)
+
+    if xp.any(i2):
+        args_indirect = [arg[i2] for arg in args]
+        tmp = _integral_bound(f, a[i2], b[i2], step[i2],
+                              args_indirect, constants, xp)
+        S[i2], E[i2], status[i2] = tmp[:-1]
+        nfev[i2] += tmp[-1]
+
+    if xp.any(i3):
+        args_indirect = [arg[i3] for arg in args]
+        def _f(x, *args): return f(-x, *args)
+        tmp = _integral_bound(_f, -b[i3], -a[i3], step[i3],
+                              args_indirect, constants, xp)
+        S[i3], E[i3], status[i3] = tmp[:-1]
+        nfev[i3] += tmp[-1]
+
+    if xp.any(i4):
+        args_indirect = [arg[i4] for arg in args]
+
+        # There are two obvious high-level strategies:
+        # - Do two separate half-infinite sums (e.g. from -inf to 0 and 1 to inf)
+        # - Make a callable that returns f(x) + f(-x) and do a single half-infinite sum
+        # I thought the latter would have about half the overhead, so I went that way.
+        # Then there are two ways of ensuring that f(0) doesn't get counted twice.
+        # - Evaluate the sum from 1 to inf and add f(0)
+        # - Evaluate the sum from 0 to inf and subtract f(0)
+        # - Evaluate the sum from 0 to inf, but apply a weight of 0.5 when `x = 0`
+        # The last option has more overhead, but is simpler to implement correctly
+        # (especially getting the status message right)
+        if log:
+            def _f(x, *args):
+                log_factor = xp.where(x==0, math.log(0.5), 0)
+                out = xp.stack([f(x, *args), f(-x, *args)], axis=0)
+                return special.logsumexp(out, axis=0) + log_factor
+
+        else:
+            def _f(x, *args):
+                factor = xp.where(x==0, 0.5, 1)
+                return (f(x, *args) + f(-x, *args)) * factor
+
+        zero = xp.zeros_like(a[i4])
+        tmp = _integral_bound(_f, zero, b[i4], step[i4], args_indirect, constants, xp)
+        S[i4], E[i4], status[i4] = tmp[:-1]
+        nfev[i4] += 2*tmp[-1]
+
+    # Return results
+    S, E = S.reshape(shape)[()], E.reshape(shape)[()]
+    status, nfev = status.reshape(shape)[()], nfev.reshape(shape)[()]
+    return _RichResult(sum=S, error=E, status=status, success=status == 0,
+                       nfev=nfev)
+
+
+def _direct(f, a, b, step, args, constants, xp, inclusive=True):
+    # Directly evaluate the sum.
+
+    # When used in the context of distributions, `args` would contain the
+    # distribution parameters. We have broadcasted for simplicity, but we could
+    # reduce function evaluations when distribution parameters are the same but
+    # sum limits differ. Roughly:
+    # - compute the function at all points between min(a) and max(b),
+    # - compute the cumulative sum,
+    # - take the difference between elements of the cumulative sum
+    #   corresponding with b and a.
+    # This is left to future enhancement
+
+    dtype, log, eps, zero, _, _, _ = constants
+
+    # To allow computation in a single vectorized call, find the maximum number
+    # of points (over all slices) at which the function needs to be evaluated.
+    # Note: if `inclusive` is `True`, then we want `1` more term in the sum.
+    # I didn't think it was great style to use `True` as `1` in Python, so I
+    # explicitly converted it to an `int` before using it.
+    inclusive_adjustment = int(inclusive)
+    steps = xp.round((b - a) / step) + inclusive_adjustment
+    # Equivalently, steps = xp.round((b - a) / step) + inclusive
+    max_steps = int(xp.max(steps))
+
+    # In each slice, the function will be evaluated at the same number of points,
+    # but excessive points (those beyond the right sum limit `b`) are replaced
+    # with NaN to (potentially) reduce the time of these unnecessary calculations.
+    # Use a new last axis for these calculations for consistency with other
+    # elementwise algorithms.
+    a2, b2, step2 = a[:, xp.newaxis], b[:, xp.newaxis], step[:, xp.newaxis]
+    args2 = [arg[:, xp.newaxis] for arg in args]
+    ks = a2 + xp.arange(max_steps, dtype=dtype) * step2
+    i_nan = ks >= (b2 + inclusive_adjustment*step2/2)
+    ks[i_nan] = xp.nan
+    fs = f(ks, *args2)
+
+    # The function evaluated at NaN is NaN, and NaNs are zeroed in the sum.
+    # In some cases it may be faster to loop over slices than to vectorize
+    # like this. This is an optimization that can be added later.
+    fs[i_nan] = zero
+    nfev = max_steps - i_nan.sum(axis=-1)
+    S = special.logsumexp(fs, axis=-1) if log else xp.sum(fs, axis=-1)
+    # Rough, non-conservative error estimate. See gh-19667 for improvement ideas.
+    E = xp_real(S) + math.log(eps) if log else eps * abs(S)
+    return S, E, nfev
+
+
+def _integral_bound(f, a, b, step, args, constants, xp):
+    # Estimate the sum with integral approximation
+    dtype, log, _, _, rtol, atol, maxterms = constants
+    log2 = xp.asarray(math.log(2), dtype=dtype)
+
+    # Get a lower bound on the sum and compute effective absolute tolerance
+    lb = tanhsinh(f, a, b, args=args, atol=atol, rtol=rtol, log=log)
+    tol = xp.broadcast_to(xp.asarray(atol), lb.integral.shape)
+    if log:
+        tol = special.logsumexp(xp.stack((tol, rtol + lb.integral)), axis=0)
+    else:
+        tol = tol + rtol*lb.integral
+    i_skip = lb.status < 0  # avoid unnecessary f_evals if integral is divergent
+    tol[i_skip] = xp.nan
+    status = lb.status
+
+    # As in `_direct`, we'll need a temporary new axis for points
+    # at which to evaluate the function. Append axis at the end for
+    # consistency with other elementwise algorithms.
+    a2 = a[..., xp.newaxis]
+    step2 = step[..., xp.newaxis]
+    args2 = [arg[..., xp.newaxis] for arg in args]
+
+    # Find the location of a term that is less than the tolerance (if possible)
+    log2maxterms = math.floor(math.log2(maxterms)) if maxterms else 0
+    n_steps = xp.concat((2**xp.arange(0, log2maxterms), xp.asarray([maxterms])))
+    n_steps = xp.astype(n_steps, dtype)
+    nfev = len(n_steps) * 2
+    ks = a2 + n_steps * step2
+    fks = f(ks, *args2)
+    fksp1 = f(ks + step2, *args2)  # check that the function is decreasing
+    fk_insufficient = (fks > tol[:, xp.newaxis]) | (fksp1 > fks)
+    n_fk_insufficient = xp.sum(fk_insufficient, axis=-1)
+    nt = xp.minimum(n_fk_insufficient, xp.asarray(n_steps.shape[-1]-1))
+    n_steps = n_steps[nt]
+
+    # If `maxterms` is insufficient (i.e. either the magnitude of the last term of the
+    # partial sum exceeds the tolerance or the function is not decreasing), finish the
+    # calculation, but report nonzero status. (Improvement: separate the status codes
+    # for these two cases.)
+    i_fk_insufficient = (n_fk_insufficient == nfev//2)
+
+    # Directly evaluate the sum up to this term
+    k = a + n_steps * step
+    left, left_error, left_nfev = _direct(f, a, k, step, args,
+                                          constants, xp, inclusive=False)
+    left_is_pos_inf = xp.isinf(left) & (left > 0)
+    i_skip |= left_is_pos_inf  # if sum is infinite, no sense in continuing
+    status[left_is_pos_inf] = -3
+    k[i_skip] = xp.nan
+
+    # Use integration to estimate the remaining sum
+    # Possible optimization for future work: if there were no terms less than
+    # the tolerance, there is no need to compute the integral to better accuracy.
+    # Something like:
+    # atol = xp.maximum(atol, xp.minimum(fk/2 - fb/2))
+    # rtol = xp.maximum(rtol, xp.minimum((fk/2 - fb/2)/left))
+    # where `fk`/`fb` are currently calculated below.
+    right = tanhsinh(f, k, b, args=args, atol=atol, rtol=rtol, log=log)
+
+    # Calculate the full estimate and error from the pieces
+    fk = fks[xp.arange(len(fks)), nt]
+
+    # fb = f(b, *args), but some functions return NaN at infinity.
+    # instead of 0 like they must (for the sum to be convergent).
+    fb = xp.full_like(fk, -xp.inf) if log else xp.zeros_like(fk)
+    i = xp.isfinite(b)
+    if xp.any(i):  # better not call `f` with empty arrays
+        fb[i] = f(b[i], *[arg[i] for arg in args])
+    nfev = nfev + xp.asarray(i, dtype=left_nfev.dtype)
+
+    if log:
+        log_step = xp.log(step)
+        S_terms = (left, right.integral - log_step, fk - log2, fb - log2)
+        S = special.logsumexp(xp.stack(S_terms), axis=0)
+        E_terms = (left_error, right.error - log_step, fk-log2, fb-log2+xp.pi*1j)
+        E = xp_real(special.logsumexp(xp.stack(E_terms), axis=0))
+    else:
+        S = left + right.integral/step + fk/2 + fb/2
+        E = left_error + right.error/step + fk/2 - fb/2
+    status[~i_skip] = right.status[~i_skip]
+
+    status[(status == 0) & i_fk_insufficient] = -4
+    return S, E, status, left_nfev + right.nfev + nfev + lb.nfev
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_test_multivariate.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_test_multivariate.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..fbe799fa8bfe4c5f1b2d2ed5edc07fe91db628ef
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/_test_multivariate.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/dop.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/dop.py
new file mode 100644
index 0000000000000000000000000000000000000000..bf67a9a35b7d2959c2617aadc5638b577a45b9b5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/dop.py
@@ -0,0 +1,15 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="integrate", module="dop",
+                                   private_modules=["_dop"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/lsoda.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/lsoda.py
new file mode 100644
index 0000000000000000000000000000000000000000..1bc1f1da3c4f0aefad9da73b6405b957ce9335b4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/lsoda.py
@@ -0,0 +1,15 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ['lsoda']  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="integrate", module="lsoda",
+                                   private_modules=["_lsoda"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/odepack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/odepack.py
new file mode 100644
index 0000000000000000000000000000000000000000..7bb4c1a8c9be375df855abe6e1b30ca9711f2607
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/odepack.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.integrate` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ['odeint', 'ODEintWarning']  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="integrate", module="odepack",
+                                   private_modules=["_odepack_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/quadpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/quadpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..144584988095c8855da8c34253c045f1a3940572
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/quadpack.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.integrate` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    "quad",
+    "dblquad",
+    "tplquad",
+    "nquad",
+    "IntegrationWarning",
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="integrate", module="quadpack",
+                                   private_modules=["_quadpack_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test__quad_vec.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test__quad_vec.py
new file mode 100644
index 0000000000000000000000000000000000000000..851d28f5671c3eb5821a7379547c1ba66a7e1340
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test__quad_vec.py
@@ -0,0 +1,217 @@
+import pytest
+
+import numpy as np
+from numpy.testing import assert_allclose
+
+from scipy.integrate import quad_vec
+
+from multiprocessing.dummy import Pool
+
+
+quadrature_params = pytest.mark.parametrize(
+    'quadrature', [None, "gk15", "gk21", "trapezoid"])
+
+
+@quadrature_params
+def test_quad_vec_simple(quadrature):
+    n = np.arange(10)
+    def f(x):
+        return x ** n
+    for epsabs in [0.1, 1e-3, 1e-6]:
+        if quadrature == 'trapezoid' and epsabs < 1e-4:
+            # slow: skip
+            continue
+
+        kwargs = dict(epsabs=epsabs, quadrature=quadrature)
+
+        exact = 2**(n+1)/(n + 1)
+
+        res, err = quad_vec(f, 0, 2, norm='max', **kwargs)
+        assert_allclose(res, exact, rtol=0, atol=epsabs)
+
+        res, err = quad_vec(f, 0, 2, norm='2', **kwargs)
+        assert np.linalg.norm(res - exact) < epsabs
+
+        res, err = quad_vec(f, 0, 2, norm='max', points=(0.5, 1.0), **kwargs)
+        assert_allclose(res, exact, rtol=0, atol=epsabs)
+
+        res, err, *rest = quad_vec(f, 0, 2, norm='max',
+                                   epsrel=1e-8,
+                                   full_output=True,
+                                   limit=10000,
+                                   **kwargs)
+        assert_allclose(res, exact, rtol=0, atol=epsabs)
+
+
+@quadrature_params
+def test_quad_vec_simple_inf(quadrature):
+    def f(x):
+        return 1 / (1 + np.float64(x) ** 2)
+
+    for epsabs in [0.1, 1e-3, 1e-6]:
+        if quadrature == 'trapezoid' and epsabs < 1e-4:
+            # slow: skip
+            continue
+
+        kwargs = dict(norm='max', epsabs=epsabs, quadrature=quadrature)
+
+        res, err = quad_vec(f, 0, np.inf, **kwargs)
+        assert_allclose(res, np.pi/2, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, 0, -np.inf, **kwargs)
+        assert_allclose(res, -np.pi/2, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, -np.inf, 0, **kwargs)
+        assert_allclose(res, np.pi/2, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, np.inf, 0, **kwargs)
+        assert_allclose(res, -np.pi/2, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, -np.inf, np.inf, **kwargs)
+        assert_allclose(res, np.pi, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, np.inf, -np.inf, **kwargs)
+        assert_allclose(res, -np.pi, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, np.inf, np.inf, **kwargs)
+        assert_allclose(res, 0, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, -np.inf, -np.inf, **kwargs)
+        assert_allclose(res, 0, rtol=0, atol=max(epsabs, err))
+
+        res, err = quad_vec(f, 0, np.inf, points=(1.0, 2.0), **kwargs)
+        assert_allclose(res, np.pi/2, rtol=0, atol=max(epsabs, err))
+
+    def f(x):
+        return np.sin(x + 2) / (1 + x ** 2)
+    exact = np.pi / np.e * np.sin(2)
+    epsabs = 1e-5
+
+    res, err, info = quad_vec(f, -np.inf, np.inf, limit=1000, norm='max', epsabs=epsabs,
+                              quadrature=quadrature, full_output=True)
+    assert info.status == 1
+    assert_allclose(res, exact, rtol=0, atol=max(epsabs, 1.5 * err))
+
+
+def test_quad_vec_args():
+    def f(x, a):
+        return x * (x + a) * np.arange(3)
+    a = 2
+    exact = np.array([0, 4/3, 8/3])
+
+    res, err = quad_vec(f, 0, 1, args=(a,))
+    assert_allclose(res, exact, rtol=0, atol=1e-4)
+
+
+def _lorenzian(x):
+    return 1 / (1 + x**2)
+
+
+@pytest.mark.fail_slow(10)
+def test_quad_vec_pool():
+    f = _lorenzian
+    res, err = quad_vec(f, -np.inf, np.inf, norm='max', epsabs=1e-4, workers=4)
+    assert_allclose(res, np.pi, rtol=0, atol=1e-4)
+
+    with Pool(10) as pool:
+        def f(x):
+            return 1 / (1 + x ** 2)
+        res, _ = quad_vec(f, -np.inf, np.inf, norm='max', epsabs=1e-4, workers=pool.map)
+        assert_allclose(res, np.pi, rtol=0, atol=1e-4)
+
+
+def _func_with_args(x, a):
+    return x * (x + a) * np.arange(3)
+
+
+@pytest.mark.fail_slow(10)
+@pytest.mark.parametrize('extra_args', [2, (2,)])
+@pytest.mark.parametrize('workers', [1, 10])
+def test_quad_vec_pool_args(extra_args, workers):
+    f = _func_with_args
+    exact = np.array([0, 4/3, 8/3])
+
+    res, err = quad_vec(f, 0, 1, args=extra_args, workers=workers)
+    assert_allclose(res, exact, rtol=0, atol=1e-4)
+
+    with Pool(workers) as pool:
+        res, err = quad_vec(f, 0, 1, args=extra_args, workers=pool.map)
+        assert_allclose(res, exact, rtol=0, atol=1e-4)
+
+
+@quadrature_params
+def test_num_eval(quadrature):
+    def f(x):
+        count[0] += 1
+        return x**5
+
+    count = [0]
+    res = quad_vec(f, 0, 1, norm='max', full_output=True, quadrature=quadrature)
+    assert res[2].neval == count[0]
+
+
+def test_info():
+    def f(x):
+        return np.ones((3, 2, 1))
+
+    res, err, info = quad_vec(f, 0, 1, norm='max', full_output=True)
+
+    assert info.success is True
+    assert info.status == 0
+    assert info.message == 'Target precision reached.'
+    assert info.neval > 0
+    assert info.intervals.shape[1] == 2
+    assert info.integrals.shape == (info.intervals.shape[0], 3, 2, 1)
+    assert info.errors.shape == (info.intervals.shape[0],)
+
+
+def test_nan_inf():
+    def f_nan(x):
+        return np.nan
+
+    def f_inf(x):
+        return np.inf if x < 0.1 else 1/x
+
+    res, err, info = quad_vec(f_nan, 0, 1, full_output=True)
+    assert info.status == 3
+
+    res, err, info = quad_vec(f_inf, 0, 1, full_output=True)
+    assert info.status == 3
+
+
+@pytest.mark.parametrize('a,b', [(0, 1), (0, np.inf), (np.inf, 0),
+                                 (-np.inf, np.inf), (np.inf, -np.inf)])
+def test_points(a, b):
+    # Check that initial interval splitting is done according to
+    # `points`, by checking that consecutive sets of 15 point (for
+    # gk15) function evaluations lie between `points`
+
+    points = (0, 0.25, 0.5, 0.75, 1.0)
+    points += tuple(-x for x in points)
+
+    quadrature_points = 15
+    interval_sets = []
+    count = 0
+
+    def f(x):
+        nonlocal count
+
+        if count % quadrature_points == 0:
+            interval_sets.append(set())
+
+        count += 1
+        interval_sets[-1].add(float(x))
+        return 0.0
+
+    quad_vec(f, a, b, points=points, quadrature='gk15', limit=0)
+
+    # Check that all point sets lie in a single `points` interval
+    for p in interval_sets:
+        j = np.searchsorted(sorted(points), tuple(p))
+        assert np.all(j == j[0])
+
+
+@pytest.mark.thread_unsafe
+def test_trapz_deprecation():
+    with pytest.deprecated_call(match="`quadrature='trapz'`"):
+        quad_vec(lambda x: x, 0, 1, quadrature="trapz")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_banded_ode_solvers.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_banded_ode_solvers.py
new file mode 100644
index 0000000000000000000000000000000000000000..358c5e3d1fcfe7ccd7e3691bd9af2f47656f4e2b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_banded_ode_solvers.py
@@ -0,0 +1,220 @@
+import itertools
+import pytest
+import numpy as np
+from numpy.testing import assert_allclose
+from scipy.integrate import ode
+
+
+def _band_count(a):
+    """Returns ml and mu, the lower and upper band sizes of a."""
+    nrows, ncols = a.shape
+    ml = 0
+    for k in range(-nrows+1, 0):
+        if np.diag(a, k).any():
+            ml = -k
+            break
+    mu = 0
+    for k in range(nrows-1, 0, -1):
+        if np.diag(a, k).any():
+            mu = k
+            break
+    return ml, mu
+
+
+def _linear_func(t, y, a):
+    """Linear system dy/dt = a * y"""
+    return a.dot(y)
+
+
+def _linear_jac(t, y, a):
+    """Jacobian of a * y is a."""
+    return a
+
+
+def _linear_banded_jac(t, y, a):
+    """Banded Jacobian."""
+    ml, mu = _band_count(a)
+    bjac = [np.r_[[0] * k, np.diag(a, k)] for k in range(mu, 0, -1)]
+    bjac.append(np.diag(a))
+    for k in range(-1, -ml-1, -1):
+        bjac.append(np.r_[np.diag(a, k), [0] * (-k)])
+    return bjac
+
+
+def _solve_linear_sys(a, y0, tend=1, dt=0.1,
+                      solver=None, method='bdf', use_jac=True,
+                      with_jacobian=False, banded=False):
+    """Use scipy.integrate.ode to solve a linear system of ODEs.
+
+    a : square ndarray
+        Matrix of the linear system to be solved.
+    y0 : ndarray
+        Initial condition
+    tend : float
+        Stop time.
+    dt : float
+        Step size of the output.
+    solver : str
+        If not None, this must be "vode", "lsoda" or "zvode".
+    method : str
+        Either "bdf" or "adams".
+    use_jac : bool
+        Determines if the jacobian function is passed to ode().
+    with_jacobian : bool
+        Passed to ode.set_integrator().
+    banded : bool
+        Determines whether a banded or full jacobian is used.
+        If `banded` is True, `lband` and `uband` are determined by the
+        values in `a`.
+    """
+    if banded:
+        lband, uband = _band_count(a)
+    else:
+        lband = None
+        uband = None
+
+    if use_jac:
+        if banded:
+            r = ode(_linear_func, _linear_banded_jac)
+        else:
+            r = ode(_linear_func, _linear_jac)
+    else:
+        r = ode(_linear_func)
+
+    if solver is None:
+        if np.iscomplexobj(a):
+            solver = "zvode"
+        else:
+            solver = "vode"
+
+    r.set_integrator(solver,
+                     with_jacobian=with_jacobian,
+                     method=method,
+                     lband=lband, uband=uband,
+                     rtol=1e-9, atol=1e-10,
+                     )
+    t0 = 0
+    r.set_initial_value(y0, t0)
+    r.set_f_params(a)
+    r.set_jac_params(a)
+
+    t = [t0]
+    y = [y0]
+    while r.successful() and r.t < tend:
+        r.integrate(r.t + dt)
+        t.append(r.t)
+        y.append(r.y)
+
+    t = np.array(t)
+    y = np.array(y)
+    return t, y
+
+
+def _analytical_solution(a, y0, t):
+    """
+    Analytical solution to the linear differential equations dy/dt = a*y.
+
+    The solution is only valid if `a` is diagonalizable.
+
+    Returns a 2-D array with shape (len(t), len(y0)).
+    """
+    lam, v = np.linalg.eig(a)
+    c = np.linalg.solve(v, y0)
+    e = c * np.exp(lam * t.reshape(-1, 1))
+    sol = e.dot(v.T)
+    return sol
+
+
+@pytest.mark.thread_unsafe
+def test_banded_ode_solvers():
+    # Test the "lsoda", "vode" and "zvode" solvers of the `ode` class
+    # with a system that has a banded Jacobian matrix.
+
+    t_exact = np.linspace(0, 1.0, 5)
+
+    # --- Real arrays for testing the "lsoda" and "vode" solvers ---
+
+    # lband = 2, uband = 1:
+    a_real = np.array([[-0.6, 0.1, 0.0, 0.0, 0.0],
+                       [0.2, -0.5, 0.9, 0.0, 0.0],
+                       [0.1, 0.1, -0.4, 0.1, 0.0],
+                       [0.0, 0.3, -0.1, -0.9, -0.3],
+                       [0.0, 0.0, 0.1, 0.1, -0.7]])
+
+    # lband = 0, uband = 1:
+    a_real_upper = np.triu(a_real)
+
+    # lband = 2, uband = 0:
+    a_real_lower = np.tril(a_real)
+
+    # lband = 0, uband = 0:
+    a_real_diag = np.triu(a_real_lower)
+
+    real_matrices = [a_real, a_real_upper, a_real_lower, a_real_diag]
+    real_solutions = []
+
+    for a in real_matrices:
+        y0 = np.arange(1, a.shape[0] + 1)
+        y_exact = _analytical_solution(a, y0, t_exact)
+        real_solutions.append((y0, t_exact, y_exact))
+
+    def check_real(idx, solver, meth, use_jac, with_jac, banded):
+        a = real_matrices[idx]
+        y0, t_exact, y_exact = real_solutions[idx]
+        t, y = _solve_linear_sys(a, y0,
+                                 tend=t_exact[-1],
+                                 dt=t_exact[1] - t_exact[0],
+                                 solver=solver,
+                                 method=meth,
+                                 use_jac=use_jac,
+                                 with_jacobian=with_jac,
+                                 banded=banded)
+        assert_allclose(t, t_exact)
+        assert_allclose(y, y_exact)
+
+    for idx in range(len(real_matrices)):
+        p = [['vode', 'lsoda'],  # solver
+             ['bdf', 'adams'],   # method
+             [False, True],      # use_jac
+             [False, True],      # with_jacobian
+             [False, True]]      # banded
+        for solver, meth, use_jac, with_jac, banded in itertools.product(*p):
+            check_real(idx, solver, meth, use_jac, with_jac, banded)
+
+    # --- Complex arrays for testing the "zvode" solver ---
+
+    # complex, lband = 2, uband = 1:
+    a_complex = a_real - 0.5j * a_real
+
+    # complex, lband = 0, uband = 0:
+    a_complex_diag = np.diag(np.diag(a_complex))
+
+    complex_matrices = [a_complex, a_complex_diag]
+    complex_solutions = []
+
+    for a in complex_matrices:
+        y0 = np.arange(1, a.shape[0] + 1) + 1j
+        y_exact = _analytical_solution(a, y0, t_exact)
+        complex_solutions.append((y0, t_exact, y_exact))
+
+    def check_complex(idx, solver, meth, use_jac, with_jac, banded):
+        a = complex_matrices[idx]
+        y0, t_exact, y_exact = complex_solutions[idx]
+        t, y = _solve_linear_sys(a, y0,
+                                 tend=t_exact[-1],
+                                 dt=t_exact[1] - t_exact[0],
+                                 solver=solver,
+                                 method=meth,
+                                 use_jac=use_jac,
+                                 with_jacobian=with_jac,
+                                 banded=banded)
+        assert_allclose(t, t_exact)
+        assert_allclose(y, y_exact)
+
+    for idx in range(len(complex_matrices)):
+        p = [['bdf', 'adams'],   # method
+             [False, True],      # use_jac
+             [False, True],      # with_jacobian
+             [False, True]]      # banded
+        for meth, use_jac, with_jac, banded in itertools.product(*p):
+            check_complex(idx, "zvode", meth, use_jac, with_jac, banded)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_bvp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_bvp.py
new file mode 100644
index 0000000000000000000000000000000000000000..4ef9eb6ff0502e1113d6bea7ad1e0088633d3151
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_bvp.py
@@ -0,0 +1,714 @@
+import sys
+
+try:
+    from StringIO import StringIO
+except ImportError:
+    from io import StringIO
+
+import numpy as np
+from numpy.testing import (assert_, assert_array_equal, assert_allclose,
+                           assert_equal)
+from pytest import raises as assert_raises
+
+from scipy.sparse import coo_matrix
+from scipy.special import erf
+from scipy.integrate._bvp import (modify_mesh, estimate_fun_jac,
+                                  estimate_bc_jac, compute_jac_indices,
+                                  construct_global_jac, solve_bvp)
+
+import pytest
+
+
+def exp_fun(x, y):
+    return np.vstack((y[1], y[0]))
+
+
+def exp_fun_jac(x, y):
+    df_dy = np.empty((2, 2, x.shape[0]))
+    df_dy[0, 0] = 0
+    df_dy[0, 1] = 1
+    df_dy[1, 0] = 1
+    df_dy[1, 1] = 0
+    return df_dy
+
+
+def exp_bc(ya, yb):
+    return np.hstack((ya[0] - 1, yb[0]))
+
+
+def exp_bc_complex(ya, yb):
+    return np.hstack((ya[0] - 1 - 1j, yb[0]))
+
+
+def exp_bc_jac(ya, yb):
+    dbc_dya = np.array([
+        [1, 0],
+        [0, 0]
+    ])
+    dbc_dyb = np.array([
+        [0, 0],
+        [1, 0]
+    ])
+    return dbc_dya, dbc_dyb
+
+
+def exp_sol(x):
+    return (np.exp(-x) - np.exp(x - 2)) / (1 - np.exp(-2))
+
+
+def sl_fun(x, y, p):
+    return np.vstack((y[1], -p[0]**2 * y[0]))
+
+
+def sl_fun_jac(x, y, p):
+    n, m = y.shape
+    df_dy = np.empty((n, 2, m))
+    df_dy[0, 0] = 0
+    df_dy[0, 1] = 1
+    df_dy[1, 0] = -p[0]**2
+    df_dy[1, 1] = 0
+
+    df_dp = np.empty((n, 1, m))
+    df_dp[0, 0] = 0
+    df_dp[1, 0] = -2 * p[0] * y[0]
+
+    return df_dy, df_dp
+
+
+def sl_bc(ya, yb, p):
+    return np.hstack((ya[0], yb[0], ya[1] - p[0]))
+
+
+def sl_bc_jac(ya, yb, p):
+    dbc_dya = np.zeros((3, 2))
+    dbc_dya[0, 0] = 1
+    dbc_dya[2, 1] = 1
+
+    dbc_dyb = np.zeros((3, 2))
+    dbc_dyb[1, 0] = 1
+
+    dbc_dp = np.zeros((3, 1))
+    dbc_dp[2, 0] = -1
+
+    return dbc_dya, dbc_dyb, dbc_dp
+
+
+def sl_sol(x, p):
+    return np.sin(p[0] * x)
+
+
+def emden_fun(x, y):
+    return np.vstack((y[1], -y[0]**5))
+
+
+def emden_fun_jac(x, y):
+    df_dy = np.empty((2, 2, x.shape[0]))
+    df_dy[0, 0] = 0
+    df_dy[0, 1] = 1
+    df_dy[1, 0] = -5 * y[0]**4
+    df_dy[1, 1] = 0
+    return df_dy
+
+
+def emden_bc(ya, yb):
+    return np.array([ya[1], yb[0] - (3/4)**0.5])
+
+
+def emden_bc_jac(ya, yb):
+    dbc_dya = np.array([
+        [0, 1],
+        [0, 0]
+    ])
+    dbc_dyb = np.array([
+        [0, 0],
+        [1, 0]
+    ])
+    return dbc_dya, dbc_dyb
+
+
+def emden_sol(x):
+    return (1 + x**2/3)**-0.5
+
+
+def undefined_fun(x, y):
+    return np.zeros_like(y)
+
+
+def undefined_bc(ya, yb):
+    return np.array([ya[0], yb[0] - 1])
+
+
+def big_fun(x, y):
+    f = np.zeros_like(y)
+    f[::2] = y[1::2]
+    return f
+
+
+def big_bc(ya, yb):
+    return np.hstack((ya[::2], yb[::2] - 1))
+
+
+def big_sol(x, n):
+    y = np.ones((2 * n, x.size))
+    y[::2] = x
+    return x
+
+
+def big_fun_with_parameters(x, y, p):
+    """ Big version of sl_fun, with two parameters.
+
+    The two differential equations represented by sl_fun are broadcast to the
+    number of rows of y, rotating between the parameters p[0] and p[1].
+    Here are the differential equations:
+
+        dy[0]/dt = y[1]
+        dy[1]/dt = -p[0]**2 * y[0]
+        dy[2]/dt = y[3]
+        dy[3]/dt = -p[1]**2 * y[2]
+        dy[4]/dt = y[5]
+        dy[5]/dt = -p[0]**2 * y[4]
+        dy[6]/dt = y[7]
+        dy[7]/dt = -p[1]**2 * y[6]
+        .
+        .
+        .
+
+    """
+    f = np.zeros_like(y)
+    f[::2] = y[1::2]
+    f[1::4] = -p[0]**2 * y[::4]
+    f[3::4] = -p[1]**2 * y[2::4]
+    return f
+
+
+def big_fun_with_parameters_jac(x, y, p):
+    # big version of sl_fun_jac, with two parameters
+    n, m = y.shape
+    df_dy = np.zeros((n, n, m))
+    df_dy[range(0, n, 2), range(1, n, 2)] = 1
+    df_dy[range(1, n, 4), range(0, n, 4)] = -p[0]**2
+    df_dy[range(3, n, 4), range(2, n, 4)] = -p[1]**2
+
+    df_dp = np.zeros((n, 2, m))
+    df_dp[range(1, n, 4), 0] = -2 * p[0] * y[range(0, n, 4)]
+    df_dp[range(3, n, 4), 1] = -2 * p[1] * y[range(2, n, 4)]
+
+    return df_dy, df_dp
+
+
+def big_bc_with_parameters(ya, yb, p):
+    # big version of sl_bc, with two parameters
+    return np.hstack((ya[::2], yb[::2], ya[1] - p[0], ya[3] - p[1]))
+
+
+def big_bc_with_parameters_jac(ya, yb, p):
+    # big version of sl_bc_jac, with two parameters
+    n = ya.shape[0]
+    dbc_dya = np.zeros((n + 2, n))
+    dbc_dyb = np.zeros((n + 2, n))
+
+    dbc_dya[range(n // 2), range(0, n, 2)] = 1
+    dbc_dyb[range(n // 2, n), range(0, n, 2)] = 1
+
+    dbc_dp = np.zeros((n + 2, 2))
+    dbc_dp[n, 0] = -1
+    dbc_dya[n, 1] = 1
+    dbc_dp[n + 1, 1] = -1
+    dbc_dya[n + 1, 3] = 1
+
+    return dbc_dya, dbc_dyb, dbc_dp
+
+
+def big_sol_with_parameters(x, p):
+    # big version of sl_sol, with two parameters
+    return np.vstack((np.sin(p[0] * x), np.sin(p[1] * x)))
+
+
+def shock_fun(x, y):
+    eps = 1e-3
+    return np.vstack((
+        y[1],
+        -(x * y[1] + eps * np.pi**2 * np.cos(np.pi * x) +
+          np.pi * x * np.sin(np.pi * x)) / eps
+    ))
+
+
+def shock_bc(ya, yb):
+    return np.array([ya[0] + 2, yb[0]])
+
+
+def shock_sol(x):
+    eps = 1e-3
+    k = np.sqrt(2 * eps)
+    return np.cos(np.pi * x) + erf(x / k) / erf(1 / k)
+
+
+def nonlin_bc_fun(x, y):
+    # laplace eq.
+    return np.stack([y[1], np.zeros_like(x)])
+
+
+def nonlin_bc_bc(ya, yb):
+    phiA, phipA = ya
+    phiC, phipC = yb
+
+    kappa, ioA, ioC, V, f = 1.64, 0.01, 1.0e-4, 0.5, 38.9
+
+    # Butler-Volmer Kinetics at Anode
+    hA = 0.0-phiA-0.0
+    iA = ioA * (np.exp(f*hA) - np.exp(-f*hA))
+    res0 = iA + kappa * phipA
+
+    # Butler-Volmer Kinetics at Cathode
+    hC = V - phiC - 1.0
+    iC = ioC * (np.exp(f*hC) - np.exp(-f*hC))
+    res1 = iC - kappa*phipC
+
+    return np.array([res0, res1])
+
+
+def nonlin_bc_sol(x):
+    return -0.13426436116763119 - 1.1308709 * x
+
+
+def test_modify_mesh():
+    x = np.array([0, 1, 3, 9], dtype=float)
+    x_new = modify_mesh(x, np.array([0]), np.array([2]))
+    assert_array_equal(x_new, np.array([0, 0.5, 1, 3, 5, 7, 9]))
+
+    x = np.array([-6, -3, 0, 3, 6], dtype=float)
+    x_new = modify_mesh(x, np.array([1], dtype=int), np.array([0, 2, 3]))
+    assert_array_equal(x_new, [-6, -5, -4, -3, -1.5, 0, 1, 2, 3, 4, 5, 6])
+
+
+def test_compute_fun_jac():
+    x = np.linspace(0, 1, 5)
+    y = np.empty((2, x.shape[0]))
+    y[0] = 0.01
+    y[1] = 0.02
+    p = np.array([])
+    df_dy, df_dp = estimate_fun_jac(lambda x, y, p: exp_fun(x, y), x, y, p)
+    df_dy_an = exp_fun_jac(x, y)
+    assert_allclose(df_dy, df_dy_an)
+    assert_(df_dp is None)
+
+    x = np.linspace(0, np.pi, 5)
+    y = np.empty((2, x.shape[0]))
+    y[0] = np.sin(x)
+    y[1] = np.cos(x)
+    p = np.array([1.0])
+    df_dy, df_dp = estimate_fun_jac(sl_fun, x, y, p)
+    df_dy_an, df_dp_an = sl_fun_jac(x, y, p)
+    assert_allclose(df_dy, df_dy_an)
+    assert_allclose(df_dp, df_dp_an)
+
+    x = np.linspace(0, 1, 10)
+    y = np.empty((2, x.shape[0]))
+    y[0] = (3/4)**0.5
+    y[1] = 1e-4
+    p = np.array([])
+    df_dy, df_dp = estimate_fun_jac(lambda x, y, p: emden_fun(x, y), x, y, p)
+    df_dy_an = emden_fun_jac(x, y)
+    assert_allclose(df_dy, df_dy_an)
+    assert_(df_dp is None)
+
+
+def test_compute_bc_jac():
+    ya = np.array([-1.0, 2])
+    yb = np.array([0.5, 3])
+    p = np.array([])
+    dbc_dya, dbc_dyb, dbc_dp = estimate_bc_jac(
+        lambda ya, yb, p: exp_bc(ya, yb), ya, yb, p)
+    dbc_dya_an, dbc_dyb_an = exp_bc_jac(ya, yb)
+    assert_allclose(dbc_dya, dbc_dya_an)
+    assert_allclose(dbc_dyb, dbc_dyb_an)
+    assert_(dbc_dp is None)
+
+    ya = np.array([0.0, 1])
+    yb = np.array([0.0, -1])
+    p = np.array([0.5])
+    dbc_dya, dbc_dyb, dbc_dp = estimate_bc_jac(sl_bc, ya, yb, p)
+    dbc_dya_an, dbc_dyb_an, dbc_dp_an = sl_bc_jac(ya, yb, p)
+    assert_allclose(dbc_dya, dbc_dya_an)
+    assert_allclose(dbc_dyb, dbc_dyb_an)
+    assert_allclose(dbc_dp, dbc_dp_an)
+
+    ya = np.array([0.5, 100])
+    yb = np.array([-1000, 10.5])
+    p = np.array([])
+    dbc_dya, dbc_dyb, dbc_dp = estimate_bc_jac(
+        lambda ya, yb, p: emden_bc(ya, yb), ya, yb, p)
+    dbc_dya_an, dbc_dyb_an = emden_bc_jac(ya, yb)
+    assert_allclose(dbc_dya, dbc_dya_an)
+    assert_allclose(dbc_dyb, dbc_dyb_an)
+    assert_(dbc_dp is None)
+
+
+def test_compute_jac_indices():
+    n = 2
+    m = 4
+    k = 2
+    i, j = compute_jac_indices(n, m, k)
+    s = coo_matrix((np.ones_like(i), (i, j))).toarray()
+    s_true = np.array([
+        [1, 1, 1, 1, 0, 0, 0, 0, 1, 1],
+        [1, 1, 1, 1, 0, 0, 0, 0, 1, 1],
+        [0, 0, 1, 1, 1, 1, 0, 0, 1, 1],
+        [0, 0, 1, 1, 1, 1, 0, 0, 1, 1],
+        [0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
+        [0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
+        [1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
+        [1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
+        [1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
+        [1, 1, 0, 0, 0, 0, 1, 1, 1, 1],
+    ])
+    assert_array_equal(s, s_true)
+
+
+def test_compute_global_jac():
+    n = 2
+    m = 5
+    k = 1
+    i_jac, j_jac = compute_jac_indices(2, 5, 1)
+    x = np.linspace(0, 1, 5)
+    h = np.diff(x)
+    y = np.vstack((np.sin(np.pi * x), np.pi * np.cos(np.pi * x)))
+    p = np.array([3.0])
+
+    f = sl_fun(x, y, p)
+
+    x_middle = x[:-1] + 0.5 * h
+    y_middle = 0.5 * (y[:, :-1] + y[:, 1:]) - h/8 * (f[:, 1:] - f[:, :-1])
+
+    df_dy, df_dp = sl_fun_jac(x, y, p)
+    df_dy_middle, df_dp_middle = sl_fun_jac(x_middle, y_middle, p)
+    dbc_dya, dbc_dyb, dbc_dp = sl_bc_jac(y[:, 0], y[:, -1], p)
+
+    J = construct_global_jac(n, m, k, i_jac, j_jac, h, df_dy, df_dy_middle,
+                             df_dp, df_dp_middle, dbc_dya, dbc_dyb, dbc_dp)
+    J = J.toarray()
+
+    def J_block(h, p):
+        return np.array([
+            [h**2*p**2/12 - 1, -0.5*h, -h**2*p**2/12 + 1, -0.5*h],
+            [0.5*h*p**2, h**2*p**2/12 - 1, 0.5*h*p**2, 1 - h**2*p**2/12]
+        ])
+
+    J_true = np.zeros((m * n + k, m * n + k))
+    for i in range(m - 1):
+        J_true[i * n: (i + 1) * n, i * n: (i + 2) * n] = J_block(h[i], p[0])
+
+    J_true[:(m - 1) * n:2, -1] = p * h**2/6 * (y[0, :-1] - y[0, 1:])
+    J_true[1:(m - 1) * n:2, -1] = p * (h * (y[0, :-1] + y[0, 1:]) +
+                                       h**2/6 * (y[1, :-1] - y[1, 1:]))
+
+    J_true[8, 0] = 1
+    J_true[9, 8] = 1
+    J_true[10, 1] = 1
+    J_true[10, 10] = -1
+
+    assert_allclose(J, J_true, rtol=1e-10)
+
+    df_dy, df_dp = estimate_fun_jac(sl_fun, x, y, p)
+    df_dy_middle, df_dp_middle = estimate_fun_jac(sl_fun, x_middle, y_middle, p)
+    dbc_dya, dbc_dyb, dbc_dp = estimate_bc_jac(sl_bc, y[:, 0], y[:, -1], p)
+    J = construct_global_jac(n, m, k, i_jac, j_jac, h, df_dy, df_dy_middle,
+                             df_dp, df_dp_middle, dbc_dya, dbc_dyb, dbc_dp)
+    J = J.toarray()
+    assert_allclose(J, J_true, rtol=2e-8, atol=2e-8)
+
+
+def test_parameter_validation():
+    x = [0, 1, 0.5]
+    y = np.zeros((2, 3))
+    assert_raises(ValueError, solve_bvp, exp_fun, exp_bc, x, y)
+
+    x = np.linspace(0, 1, 5)
+    y = np.zeros((2, 4))
+    assert_raises(ValueError, solve_bvp, exp_fun, exp_bc, x, y)
+
+    def fun(x, y, p):
+        return exp_fun(x, y)
+    def bc(ya, yb, p):
+        return exp_bc(ya, yb)
+
+    y = np.zeros((2, x.shape[0]))
+    assert_raises(ValueError, solve_bvp, fun, bc, x, y, p=[1])
+
+    def wrong_shape_fun(x, y):
+        return np.zeros(3)
+
+    assert_raises(ValueError, solve_bvp, wrong_shape_fun, bc, x, y)
+
+    S = np.array([[0, 0]])
+    assert_raises(ValueError, solve_bvp, exp_fun, exp_bc, x, y, S=S)
+
+
+def test_no_params():
+    x = np.linspace(0, 1, 5)
+    x_test = np.linspace(0, 1, 100)
+    y = np.zeros((2, x.shape[0]))
+    for fun_jac in [None, exp_fun_jac]:
+        for bc_jac in [None, exp_bc_jac]:
+            sol = solve_bvp(exp_fun, exp_bc, x, y, fun_jac=fun_jac,
+                            bc_jac=bc_jac)
+
+            assert_equal(sol.status, 0)
+            assert_(sol.success)
+
+            assert_equal(sol.x.size, 5)
+
+            sol_test = sol.sol(x_test)
+
+            assert_allclose(sol_test[0], exp_sol(x_test), atol=1e-5)
+
+            f_test = exp_fun(x_test, sol_test)
+            r = sol.sol(x_test, 1) - f_test
+            rel_res = r / (1 + np.abs(f_test))
+            norm_res = np.sum(rel_res**2, axis=0)**0.5
+            assert_(np.all(norm_res < 1e-3))
+
+            assert_(np.all(sol.rms_residuals < 1e-3))
+            assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+            assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_with_params():
+    x = np.linspace(0, np.pi, 5)
+    x_test = np.linspace(0, np.pi, 100)
+    y = np.ones((2, x.shape[0]))
+
+    for fun_jac in [None, sl_fun_jac]:
+        for bc_jac in [None, sl_bc_jac]:
+            sol = solve_bvp(sl_fun, sl_bc, x, y, p=[0.5], fun_jac=fun_jac,
+                            bc_jac=bc_jac)
+
+            assert_equal(sol.status, 0)
+            assert_(sol.success)
+
+            assert_(sol.x.size < 10)
+
+            assert_allclose(sol.p, [1], rtol=1e-4)
+
+            sol_test = sol.sol(x_test)
+
+            assert_allclose(sol_test[0], sl_sol(x_test, [1]),
+                            rtol=1e-4, atol=1e-4)
+
+            f_test = sl_fun(x_test, sol_test, [1])
+            r = sol.sol(x_test, 1) - f_test
+            rel_res = r / (1 + np.abs(f_test))
+            norm_res = np.sum(rel_res ** 2, axis=0) ** 0.5
+            assert_(np.all(norm_res < 1e-3))
+
+            assert_(np.all(sol.rms_residuals < 1e-3))
+            assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+            assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_singular_term():
+    x = np.linspace(0, 1, 10)
+    x_test = np.linspace(0.05, 1, 100)
+    y = np.empty((2, 10))
+    y[0] = (3/4)**0.5
+    y[1] = 1e-4
+    S = np.array([[0, 0], [0, -2]])
+
+    for fun_jac in [None, emden_fun_jac]:
+        for bc_jac in [None, emden_bc_jac]:
+            sol = solve_bvp(emden_fun, emden_bc, x, y, S=S, fun_jac=fun_jac,
+                            bc_jac=bc_jac)
+
+            assert_equal(sol.status, 0)
+            assert_(sol.success)
+
+            assert_equal(sol.x.size, 10)
+
+            sol_test = sol.sol(x_test)
+            assert_allclose(sol_test[0], emden_sol(x_test), atol=1e-5)
+
+            f_test = emden_fun(x_test, sol_test) + S.dot(sol_test) / x_test
+            r = sol.sol(x_test, 1) - f_test
+            rel_res = r / (1 + np.abs(f_test))
+            norm_res = np.sum(rel_res ** 2, axis=0) ** 0.5
+
+            assert_(np.all(norm_res < 1e-3))
+            assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+            assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_complex():
+    # The test is essentially the same as test_no_params, but boundary
+    # conditions are turned into complex.
+    x = np.linspace(0, 1, 5)
+    x_test = np.linspace(0, 1, 100)
+    y = np.zeros((2, x.shape[0]), dtype=complex)
+    for fun_jac in [None, exp_fun_jac]:
+        for bc_jac in [None, exp_bc_jac]:
+            sol = solve_bvp(exp_fun, exp_bc_complex, x, y, fun_jac=fun_jac,
+                            bc_jac=bc_jac)
+
+            assert_equal(sol.status, 0)
+            assert_(sol.success)
+
+            sol_test = sol.sol(x_test)
+
+            assert_allclose(sol_test[0].real, exp_sol(x_test), atol=1e-5)
+            assert_allclose(sol_test[0].imag, exp_sol(x_test), atol=1e-5)
+
+            f_test = exp_fun(x_test, sol_test)
+            r = sol.sol(x_test, 1) - f_test
+            rel_res = r / (1 + np.abs(f_test))
+            norm_res = np.sum(np.real(rel_res * np.conj(rel_res)),
+                              axis=0) ** 0.5
+            assert_(np.all(norm_res < 1e-3))
+
+            assert_(np.all(sol.rms_residuals < 1e-3))
+            assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+            assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_failures():
+    x = np.linspace(0, 1, 2)
+    y = np.zeros((2, x.size))
+    res = solve_bvp(exp_fun, exp_bc, x, y, tol=1e-5, max_nodes=5)
+    assert_equal(res.status, 1)
+    assert_(not res.success)
+
+    x = np.linspace(0, 1, 5)
+    y = np.zeros((2, x.size))
+    res = solve_bvp(undefined_fun, undefined_bc, x, y)
+    assert_equal(res.status, 2)
+    assert_(not res.success)
+
+
+def test_big_problem():
+    n = 30
+    x = np.linspace(0, 1, 5)
+    y = np.zeros((2 * n, x.size))
+    sol = solve_bvp(big_fun, big_bc, x, y)
+
+    assert_equal(sol.status, 0)
+    assert_(sol.success)
+
+    sol_test = sol.sol(x)
+
+    assert_allclose(sol_test[0], big_sol(x, n))
+
+    f_test = big_fun(x, sol_test)
+    r = sol.sol(x, 1) - f_test
+    rel_res = r / (1 + np.abs(f_test))
+    norm_res = np.sum(np.real(rel_res * np.conj(rel_res)), axis=0) ** 0.5
+    assert_(np.all(norm_res < 1e-3))
+
+    assert_(np.all(sol.rms_residuals < 1e-3))
+    assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+    assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_big_problem_with_parameters():
+    n = 30
+    x = np.linspace(0, np.pi, 5)
+    x_test = np.linspace(0, np.pi, 100)
+    y = np.ones((2 * n, x.size))
+
+    for fun_jac in [None, big_fun_with_parameters_jac]:
+        for bc_jac in [None, big_bc_with_parameters_jac]:
+            sol = solve_bvp(big_fun_with_parameters, big_bc_with_parameters, x,
+                            y, p=[0.5, 0.5], fun_jac=fun_jac, bc_jac=bc_jac)
+
+            assert_equal(sol.status, 0)
+            assert_(sol.success)
+
+            assert_allclose(sol.p, [1, 1], rtol=1e-4)
+
+            sol_test = sol.sol(x_test)
+
+            for isol in range(0, n, 4):
+                assert_allclose(sol_test[isol],
+                                big_sol_with_parameters(x_test, [1, 1])[0],
+                                rtol=1e-4, atol=1e-4)
+                assert_allclose(sol_test[isol + 2],
+                                big_sol_with_parameters(x_test, [1, 1])[1],
+                                rtol=1e-4, atol=1e-4)
+
+            f_test = big_fun_with_parameters(x_test, sol_test, [1, 1])
+            r = sol.sol(x_test, 1) - f_test
+            rel_res = r / (1 + np.abs(f_test))
+            norm_res = np.sum(rel_res ** 2, axis=0) ** 0.5
+            assert_(np.all(norm_res < 1e-3))
+
+            assert_(np.all(sol.rms_residuals < 1e-3))
+            assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+            assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_shock_layer():
+    x = np.linspace(-1, 1, 5)
+    x_test = np.linspace(-1, 1, 100)
+    y = np.zeros((2, x.size))
+    sol = solve_bvp(shock_fun, shock_bc, x, y)
+
+    assert_equal(sol.status, 0)
+    assert_(sol.success)
+
+    assert_(sol.x.size < 110)
+
+    sol_test = sol.sol(x_test)
+    assert_allclose(sol_test[0], shock_sol(x_test), rtol=1e-5, atol=1e-5)
+
+    f_test = shock_fun(x_test, sol_test)
+    r = sol.sol(x_test, 1) - f_test
+    rel_res = r / (1 + np.abs(f_test))
+    norm_res = np.sum(rel_res ** 2, axis=0) ** 0.5
+
+    assert_(np.all(norm_res < 1e-3))
+    assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+    assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+def test_nonlin_bc():
+    x = np.linspace(0, 0.1, 5)
+    x_test = x
+    y = np.zeros([2, x.size])
+    sol = solve_bvp(nonlin_bc_fun, nonlin_bc_bc, x, y)
+
+    assert_equal(sol.status, 0)
+    assert_(sol.success)
+
+    assert_(sol.x.size < 8)
+
+    sol_test = sol.sol(x_test)
+    assert_allclose(sol_test[0], nonlin_bc_sol(x_test), rtol=1e-5, atol=1e-5)
+
+    f_test = nonlin_bc_fun(x_test, sol_test)
+    r = sol.sol(x_test, 1) - f_test
+    rel_res = r / (1 + np.abs(f_test))
+    norm_res = np.sum(rel_res ** 2, axis=0) ** 0.5
+
+    assert_(np.all(norm_res < 1e-3))
+    assert_allclose(sol.sol(sol.x), sol.y, rtol=1e-10, atol=1e-10)
+    assert_allclose(sol.sol(sol.x, 1), sol.yp, rtol=1e-10, atol=1e-10)
+
+
+@pytest.mark.thread_unsafe
+def test_verbose():
+    # Smoke test that checks the printing does something and does not crash
+    x = np.linspace(0, 1, 5)
+    y = np.zeros((2, x.shape[0]))
+    for verbose in [0, 1, 2]:
+        old_stdout = sys.stdout
+        sys.stdout = StringIO()
+        try:
+            sol = solve_bvp(exp_fun, exp_bc, x, y, verbose=verbose)
+            text = sys.stdout.getvalue()
+        finally:
+            sys.stdout = old_stdout
+
+        assert_(sol.success)
+        if verbose == 0:
+            assert_(not text, text)
+        if verbose >= 1:
+            assert_("Solved in" in text, text)
+        if verbose >= 2:
+            assert_("Max residual" in text, text)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_cubature.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_cubature.py
new file mode 100644
index 0000000000000000000000000000000000000000..899655c7631fbc86d06eb97c514761d4c882a632
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_cubature.py
@@ -0,0 +1,1389 @@
+import math
+import scipy
+import itertools
+
+import pytest
+
+from scipy._lib._array_api import (
+    array_namespace,
+    xp_assert_close,
+    xp_size,
+    np_compat,
+    is_array_api_strict,
+)
+from scipy.conftest import array_api_compatible
+
+from scipy.integrate import cubature
+
+from scipy.integrate._rules import (
+    Rule, FixedRule,
+    NestedFixedRule,
+    GaussLegendreQuadrature, GaussKronrodQuadrature,
+    GenzMalikCubature,
+)
+
+from scipy.integrate._cubature import _InfiniteLimitsTransform
+
+pytestmark = [pytest.mark.usefixtures("skip_xp_backends"),]
+skip_xp_backends = pytest.mark.skip_xp_backends
+
+# The integrands ``genz_malik_1980_*`` come from the paper:
+#   A.C. Genz, A.A. Malik, Remarks on algorithm 006: An adaptive algorithm for
+#   numerical integration over an N-dimensional rectangular region, Journal of
+#   Computational and Applied Mathematics, Volume 6, Issue 4, 1980, Pages 295-302,
+#   ISSN 0377-0427, https://doi.org/10.1016/0771-050X(80)90039-X.
+
+
+def basic_1d_integrand(x, n, xp):
+    x_reshaped = xp.reshape(x, (-1, 1, 1))
+    n_reshaped = xp.reshape(n, (1, -1, 1))
+
+    return x_reshaped**n_reshaped
+
+
+def basic_1d_integrand_exact(n, xp):
+    # Exact only for integration over interval [0, 2].
+    return xp.reshape(2**(n+1)/(n+1), (-1, 1))
+
+
+def basic_nd_integrand(x, n, xp):
+    return xp.reshape(xp.sum(x, axis=-1), (-1, 1))**xp.reshape(n, (1, -1))
+
+
+def basic_nd_integrand_exact(n, xp):
+    # Exact only for integration over interval [0, 2].
+    return (-2**(3+n) + 4**(2+n))/((1+n)*(2+n))
+
+
+def genz_malik_1980_f_1(x, r, alphas, xp):
+    r"""
+    .. math:: f_1(\mathbf x) = \cos\left(2\pi r + \sum^n_{i = 1}\alpha_i x_i\right)
+
+    .. code-block:: mathematica
+
+        genzMalik1980f1[x_List, r_, alphas_List] := Cos[2*Pi*r + Total[x*alphas]]
+    """
+
+    npoints, ndim = x.shape[0], x.shape[-1]
+
+    alphas_reshaped = alphas[None, ...]
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return xp.cos(2*math.pi*r + xp.sum(alphas_reshaped * x_reshaped, axis=-1))
+
+
+def genz_malik_1980_f_1_exact(a, b, r, alphas, xp):
+    ndim = xp_size(a)
+    a = xp.reshape(a, (*([1]*(len(alphas.shape) - 1)), ndim))
+    b = xp.reshape(b, (*([1]*(len(alphas.shape) - 1)), ndim))
+
+    return (
+        (-2)**ndim
+        * 1/xp.prod(alphas, axis=-1)
+        * xp.cos(2*math.pi*r + xp.sum(alphas * (a+b) * 0.5, axis=-1))
+        * xp.prod(xp.sin(alphas * (a-b)/2), axis=-1)
+    )
+
+
+def genz_malik_1980_f_1_random_args(rng, shape, xp):
+    r = xp.asarray(rng.random(shape[:-1]))
+    alphas = xp.asarray(rng.random(shape))
+
+    difficulty = 9
+    normalisation_factors = xp.sum(alphas, axis=-1)[..., None]
+    alphas = difficulty * alphas / normalisation_factors
+
+    return (r, alphas)
+
+
+def genz_malik_1980_f_2(x, alphas, betas, xp):
+    r"""
+    .. math:: f_2(\mathbf x) = \prod^n_{i = 1} (\alpha_i^2 + (x_i - \beta_i)^2)^{-1}
+
+    .. code-block:: mathematica
+
+        genzMalik1980f2[x_List, alphas_List, betas_List] :=
+            1/Times @@ ((alphas^2 + (x - betas)^2))
+    """
+    npoints, ndim = x.shape[0], x.shape[-1]
+
+    alphas_reshaped = alphas[None, ...]
+    betas_reshaped = betas[None, ...]
+
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return 1/xp.prod(alphas_reshaped**2 + (x_reshaped-betas_reshaped)**2, axis=-1)
+
+
+def genz_malik_1980_f_2_exact(a, b, alphas, betas, xp):
+    ndim = xp_size(a)
+    a = xp.reshape(a, (*([1]*(len(alphas.shape) - 1)), ndim))
+    b = xp.reshape(b, (*([1]*(len(alphas.shape) - 1)), ndim))
+
+    # `xp` is the unwrapped namespace, so `.atan` won't work for `xp = np` and np<2.
+    xp_test = array_namespace(a)
+
+    return (
+        (-1)**ndim * 1/xp.prod(alphas, axis=-1)
+        * xp.prod(
+            xp_test.atan((a - betas)/alphas) - xp_test.atan((b - betas)/alphas),
+            axis=-1,
+        )
+    )
+
+
+def genz_malik_1980_f_2_random_args(rng, shape, xp):
+    ndim = shape[-1]
+    alphas = xp.asarray(rng.random(shape))
+    betas = xp.asarray(rng.random(shape))
+
+    difficulty = 25.0
+    products = xp.prod(alphas**xp.asarray(-2.0), axis=-1)
+    normalisation_factors = (products**xp.asarray(1 / (2*ndim)))[..., None]
+    alphas = alphas * normalisation_factors * math.pow(difficulty, 1 / (2*ndim))
+
+    # Adjust alphas from distribution used in Genz and Malik 1980 since denominator
+    # is very small for high dimensions.
+    alphas *= 10
+
+    return alphas, betas
+
+
+def genz_malik_1980_f_3(x, alphas, xp):
+    r"""
+    .. math:: f_3(\mathbf x) = \exp\left(\sum^n_{i = 1} \alpha_i x_i\right)
+
+    .. code-block:: mathematica
+
+        genzMalik1980f3[x_List, alphas_List] := Exp[Dot[x, alphas]]
+    """
+
+    npoints, ndim = x.shape[0], x.shape[-1]
+
+    alphas_reshaped = alphas[None, ...]
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return xp.exp(xp.sum(alphas_reshaped * x_reshaped, axis=-1))
+
+
+def genz_malik_1980_f_3_exact(a, b, alphas, xp):
+    ndim = xp_size(a)
+    a = xp.reshape(a, (*([1]*(len(alphas.shape) - 1)), ndim))
+    b = xp.reshape(b, (*([1]*(len(alphas.shape) - 1)), ndim))
+
+    return (
+        (-1)**ndim * 1/xp.prod(alphas, axis=-1)
+        * xp.prod(xp.exp(alphas * a) - xp.exp(alphas * b), axis=-1)
+    )
+
+
+def genz_malik_1980_f_3_random_args(rng, shape, xp):
+    alphas = xp.asarray(rng.random(shape))
+    normalisation_factors = xp.sum(alphas, axis=-1)[..., None]
+    difficulty = 12.0
+    alphas = difficulty * alphas / normalisation_factors
+
+    return (alphas,)
+
+
+def genz_malik_1980_f_4(x, alphas, xp):
+    r"""
+    .. math:: f_4(\mathbf x) = \left(1 + \sum^n_{i = 1} \alpha_i x_i\right)^{-n-1}
+
+    .. code-block:: mathematica
+        genzMalik1980f4[x_List, alphas_List] :=
+            (1 + Dot[x, alphas])^(-Length[alphas] - 1)
+    """
+
+    npoints, ndim = x.shape[0], x.shape[-1]
+
+    alphas_reshaped = alphas[None, ...]
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return (1 + xp.sum(alphas_reshaped * x_reshaped, axis=-1))**(-ndim-1)
+
+
+def genz_malik_1980_f_4_exact(a, b, alphas, xp):
+    ndim = xp_size(a)
+
+    def F(x):
+        x_reshaped = xp.reshape(x, (*([1]*(len(alphas.shape) - 1)), ndim))
+
+        return (
+            (-1)**ndim/xp.prod(alphas, axis=-1)
+            / math.factorial(ndim)
+            / (1 + xp.sum(alphas * x_reshaped, axis=-1))
+        )
+
+    return _eval_indefinite_integral(F, a, b, xp)
+
+
+def _eval_indefinite_integral(F, a, b, xp):
+    """
+    Calculates a definite integral from points `a` to `b` by summing up over the corners
+    of the corresponding hyperrectangle.
+    """
+
+    ndim = xp_size(a)
+    points = xp.stack([a, b], axis=0)
+
+    out = 0
+    for ind in itertools.product(range(2), repeat=ndim):
+        selected_points = xp.asarray([points[i, j] for i, j in zip(ind, range(ndim))])
+        out += pow(-1, sum(ind) + ndim) * F(selected_points)
+
+    return out
+
+
+def genz_malik_1980_f_4_random_args(rng, shape, xp):
+    ndim = shape[-1]
+
+    alphas = xp.asarray(rng.random(shape))
+    normalisation_factors = xp.sum(alphas, axis=-1)[..., None]
+    difficulty = 14.0
+    alphas = (difficulty / ndim) * alphas / normalisation_factors
+
+    return (alphas,)
+
+
+def genz_malik_1980_f_5(x, alphas, betas, xp):
+    r"""
+    .. math::
+
+        f_5(\mathbf x) = \exp\left(-\sum^n_{i = 1} \alpha^2_i (x_i - \beta_i)^2\right)
+
+    .. code-block:: mathematica
+
+        genzMalik1980f5[x_List, alphas_List, betas_List] :=
+            Exp[-Total[alphas^2 * (x - betas)^2]]
+    """
+
+    npoints, ndim = x.shape[0], x.shape[-1]
+
+    alphas_reshaped = alphas[None, ...]
+    betas_reshaped = betas[None, ...]
+
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return xp.exp(
+        -xp.sum(alphas_reshaped**2 * (x_reshaped - betas_reshaped)**2, axis=-1)
+    )
+
+
+def genz_malik_1980_f_5_exact(a, b, alphas, betas, xp):
+    ndim = xp_size(a)
+    a = xp.reshape(a, (*([1]*(len(alphas.shape) - 1)), ndim))
+    b = xp.reshape(b, (*([1]*(len(alphas.shape) - 1)), ndim))
+
+    return (
+        (1/2)**ndim
+        * 1/xp.prod(alphas, axis=-1)
+        * (math.pi**(ndim/2))
+        * xp.prod(
+            scipy.special.erf(alphas * (betas - a))
+            + scipy.special.erf(alphas * (b - betas)),
+            axis=-1,
+        )
+    )
+
+
+def genz_malik_1980_f_5_random_args(rng, shape, xp):
+    alphas = xp.asarray(rng.random(shape))
+    betas = xp.asarray(rng.random(shape))
+
+    difficulty = 21.0
+    normalisation_factors = xp.sqrt(xp.sum(alphas**xp.asarray(2.0), axis=-1))[..., None]
+    alphas = alphas / normalisation_factors * math.sqrt(difficulty)
+
+    return alphas, betas
+
+
+def f_gaussian(x, alphas, xp):
+    r"""
+    .. math::
+
+        f(\mathbf x) = \exp\left(-\sum^n_{i = 1} (\alpha_i x_i)^2 \right)
+    """
+    npoints, ndim = x.shape[0], x.shape[-1]
+    alphas_reshaped = alphas[None, ...]
+    x_reshaped = xp.reshape(x, (npoints, *([1]*(len(alphas.shape) - 1)), ndim))
+
+    return xp.exp(-xp.sum((alphas_reshaped * x_reshaped)**2, axis=-1))
+
+
+def f_gaussian_exact(a, b, alphas, xp):
+    # Exact only when `a` and `b` are one of:
+    #   (-oo, oo), or
+    #   (0, oo), or
+    #   (-oo, 0)
+    # `alphas` can be arbitrary.
+
+    ndim = xp_size(a)
+    double_infinite_count = 0
+    semi_infinite_count = 0
+
+    for i in range(ndim):
+        if xp.isinf(a[i]) and xp.isinf(b[i]):   # doubly-infinite
+            double_infinite_count += 1
+        elif xp.isinf(a[i]) != xp.isinf(b[i]):  # exclusive or, so semi-infinite
+            semi_infinite_count += 1
+
+    return (math.sqrt(math.pi) ** ndim) / (
+        2**semi_infinite_count * xp.prod(alphas, axis=-1)
+    )
+
+
+def f_gaussian_random_args(rng, shape, xp):
+    alphas = xp.asarray(rng.random(shape))
+
+    # If alphas are very close to 0 this makes the problem very difficult due to large
+    # values of ``f``.
+    alphas *= 100
+
+    return (alphas,)
+
+
+def f_modified_gaussian(x_arr, n, xp):
+    r"""
+    .. math::
+
+        f(x, y, z, w) = x^n \sqrt{y} \exp(-y-z^2-w^2)
+    """
+    x, y, z, w = x_arr[:, 0], x_arr[:, 1], x_arr[:, 2], x_arr[:, 3]
+    res = (x ** n[:, None]) * xp.sqrt(y) * xp.exp(-y-z**2-w**2)
+
+    return res.T
+
+
+def f_modified_gaussian_exact(a, b, n, xp):
+    # Exact only for the limits
+    #   a = (0, 0, -oo, -oo)
+    #   b = (1, oo, oo, oo)
+    # but defined here as a function to match the format of the other integrands.
+    return 1/(2 + 2*n) * math.pi ** (3/2)
+
+
+def f_with_problematic_points(x_arr, points, xp):
+    """
+    This emulates a function with a list of singularities given by `points`.
+
+    If no `x_arr` are one of the `points`, then this function returns 1.
+    """
+
+    for point in points:
+        if xp.any(x_arr == point):
+            raise ValueError("called with a problematic point")
+
+    return xp.ones(x_arr.shape[0])
+
+
+@array_api_compatible
+class TestCubature:
+    """
+    Tests related to the interface of `cubature`.
+    """
+
+    @pytest.mark.parametrize("rule_str", [
+        "gauss-kronrod",
+        "genz-malik",
+        "gk21",
+        "gk15",
+    ])
+    def test_pass_str(self, rule_str, xp):
+        n = xp.arange(5, dtype=xp.float64)
+        a = xp.asarray([0, 0], dtype=xp.float64)
+        b = xp.asarray([2, 2], dtype=xp.float64)
+
+        res = cubature(basic_nd_integrand, a, b, rule=rule_str, args=(n, xp))
+
+        xp_assert_close(
+            res.estimate,
+            basic_nd_integrand_exact(n, xp),
+            rtol=1e-8,
+            atol=0,
+        )
+
+    @skip_xp_backends(np_only=True,
+                      reason='array-likes only supported for NumPy backend')
+    def test_pass_array_like_not_array(self, xp):
+        n = np_compat.arange(5, dtype=np_compat.float64)
+        a = [0]
+        b = [2]
+
+        res = cubature(
+            basic_1d_integrand,
+            a,
+            b,
+            args=(n, xp)
+        )
+
+        xp_assert_close(
+            res.estimate,
+            basic_1d_integrand_exact(n, xp),
+            rtol=1e-8,
+            atol=0,
+        )
+
+    def test_stops_after_max_subdivisions(self, xp):
+        a = xp.asarray([0])
+        b = xp.asarray([1])
+        rule = BadErrorRule()
+
+        res = cubature(
+            basic_1d_integrand,  # Any function would suffice
+            a,
+            b,
+            rule=rule,
+            max_subdivisions=10,
+            args=(xp.arange(5, dtype=xp.float64), xp),
+        )
+
+        assert res.subdivisions == 10
+        assert res.status == "not_converged"
+
+    def test_a_and_b_must_be_1d(self, xp):
+        a = xp.asarray([[0]], dtype=xp.float64)
+        b = xp.asarray([[1]], dtype=xp.float64)
+
+        with pytest.raises(Exception, match="`a` and `b` must be 1D arrays"):
+            cubature(basic_1d_integrand, a, b, args=(xp,))
+
+    def test_a_and_b_must_be_nonempty(self, xp):
+        a = xp.asarray([])
+        b = xp.asarray([])
+
+        with pytest.raises(Exception, match="`a` and `b` must be nonempty"):
+            cubature(basic_1d_integrand, a, b, args=(xp,))
+
+    def test_zero_width_limits(self, xp):
+        n = xp.arange(5, dtype=xp.float64)
+
+        a = xp.asarray([0], dtype=xp.float64)
+        b = xp.asarray([0], dtype=xp.float64)
+
+        res = cubature(
+            basic_1d_integrand,
+            a,
+            b,
+            args=(n, xp),
+        )
+
+        xp_assert_close(
+            res.estimate,
+            xp.asarray([[0], [0], [0], [0], [0]], dtype=xp.float64),
+            rtol=1e-8,
+            atol=0,
+        )
+
+    def test_limits_other_way_around(self, xp):
+        n = xp.arange(5, dtype=xp.float64)
+
+        a = xp.asarray([2], dtype=xp.float64)
+        b = xp.asarray([0], dtype=xp.float64)
+
+        res = cubature(
+            basic_1d_integrand,
+            a,
+            b,
+            args=(n, xp),
+        )
+
+        xp_assert_close(
+            res.estimate,
+            -basic_1d_integrand_exact(n, xp),
+            rtol=1e-8,
+            atol=0,
+        )
+
+    def test_result_dtype_promoted_correctly(self, xp):
+        result_dtype = cubature(
+            basic_1d_integrand,
+            xp.asarray([0], dtype=xp.float64),
+            xp.asarray([1], dtype=xp.float64),
+            points=[],
+            args=(xp.asarray([1], dtype=xp.float64), xp),
+        ).estimate.dtype
+
+        assert result_dtype == xp.float64
+
+        result_dtype = cubature(
+            basic_1d_integrand,
+            xp.asarray([0], dtype=xp.float32),
+            xp.asarray([1], dtype=xp.float32),
+            points=[],
+            args=(xp.asarray([1], dtype=xp.float32), xp),
+        ).estimate.dtype
+
+        assert result_dtype == xp.float32
+
+        result_dtype = cubature(
+            basic_1d_integrand,
+            xp.asarray([0], dtype=xp.float32),
+            xp.asarray([1], dtype=xp.float64),
+            points=[],
+            args=(xp.asarray([1], dtype=xp.float32), xp),
+        ).estimate.dtype
+
+        assert result_dtype == xp.float64
+
+
+@pytest.mark.parametrize("rtol", [1e-4])
+@pytest.mark.parametrize("atol", [1e-5])
+@pytest.mark.parametrize("rule", [
+    "gk15",
+    "gk21",
+    "genz-malik",
+])
+@array_api_compatible
+class TestCubatureProblems:
+    """
+    Tests that `cubature` gives the correct answer.
+    """
+
+    @pytest.mark.parametrize("problem", [
+        # -- f1 --
+        (
+            # Function to integrate, like `f(x, *args)`
+            genz_malik_1980_f_1,
+
+            # Exact solution, like `exact(a, b, *args)`
+            genz_malik_1980_f_1_exact,
+
+            # Coordinates of `a`
+            [0],
+
+            # Coordinates of `b`
+            [10],
+
+            # Arguments to pass to `f` and `exact`
+            (
+                1/4,
+                [5],
+            )
+        ),
+        (
+            genz_malik_1980_f_1,
+            genz_malik_1980_f_1_exact,
+            [0, 0],
+            [1, 1],
+            (
+                1/4,
+                [2, 4],
+            ),
+        ),
+        (
+            genz_malik_1980_f_1,
+            genz_malik_1980_f_1_exact,
+            [0, 0],
+            [5, 5],
+            (
+                1/2,
+                [2, 4],
+            )
+        ),
+        (
+            genz_malik_1980_f_1,
+            genz_malik_1980_f_1_exact,
+            [0, 0, 0],
+            [5, 5, 5],
+            (
+                1/2,
+                [1, 1, 1],
+            )
+        ),
+
+        # -- f2 --
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            [-1],
+            [1],
+            (
+                [5],
+                [4],
+            )
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+
+            [0, 0],
+            [10, 50],
+            (
+                [-3, 3],
+                [-2, 2],
+            ),
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            [0, 0, 0],
+            [1, 1, 1],
+            (
+                [1, 1, 1],
+                [1, 1, 1],
+            )
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            [0, 0, 0],
+            [1, 1, 1],
+            (
+                [2, 3, 4],
+                [2, 3, 4],
+            )
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            [-1, -1, -1],
+            [1, 1, 1],
+            (
+                [1, 1, 1],
+                [2, 2, 2],
+            )
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            [-1, -1, -1, -1],
+            [1, 1, 1, 1],
+            (
+                [1, 1, 1, 1],
+                [1, 1, 1, 1],
+            )
+        ),
+
+        # -- f3 --
+        (
+            genz_malik_1980_f_3,
+            genz_malik_1980_f_3_exact,
+            [-1],
+            [1],
+            (
+                [1/2],
+            ),
+        ),
+        (
+            genz_malik_1980_f_3,
+            genz_malik_1980_f_3_exact,
+            [0, -1],
+            [1, 1],
+            (
+                [5, 5],
+            ),
+        ),
+        (
+            genz_malik_1980_f_3,
+            genz_malik_1980_f_3_exact,
+            [-1, -1, -1],
+            [1, 1, 1],
+            (
+                [1, 1, 1],
+            ),
+        ),
+
+        # -- f4 --
+        (
+            genz_malik_1980_f_4,
+            genz_malik_1980_f_4_exact,
+            [0],
+            [2],
+            (
+                [1],
+            ),
+        ),
+        (
+            genz_malik_1980_f_4,
+            genz_malik_1980_f_4_exact,
+            [0, 0],
+            [2, 1],
+            ([1, 1],),
+        ),
+        (
+            genz_malik_1980_f_4,
+            genz_malik_1980_f_4_exact,
+            [0, 0, 0],
+            [1, 1, 1],
+            ([1, 1, 1],),
+        ),
+
+        # -- f5 --
+        (
+            genz_malik_1980_f_5,
+            genz_malik_1980_f_5_exact,
+            [-1],
+            [1],
+            (
+                [-2],
+                [2],
+            ),
+        ),
+        (
+            genz_malik_1980_f_5,
+            genz_malik_1980_f_5_exact,
+            [-1, -1],
+            [1, 1],
+            (
+                [2, 3],
+                [4, 5],
+            ),
+        ),
+        (
+            genz_malik_1980_f_5,
+            genz_malik_1980_f_5_exact,
+            [-1, -1],
+            [1, 1],
+            (
+                [-1, 1],
+                [0, 0],
+            ),
+        ),
+        (
+            genz_malik_1980_f_5,
+            genz_malik_1980_f_5_exact,
+            [-1, -1, -1],
+            [1, 1, 1],
+            (
+                [1, 1, 1],
+                [1, 1, 1],
+            ),
+        ),
+    ])
+    def test_scalar_output(self, problem, rule, rtol, atol, xp):
+        f, exact, a, b, args = problem
+
+        a = xp.asarray(a, dtype=xp.float64)
+        b = xp.asarray(b, dtype=xp.float64)
+        args = tuple(xp.asarray(arg, dtype=xp.float64) for arg in args)
+
+        ndim = xp_size(a)
+
+        if rule == "genz-malik" and ndim < 2:
+            pytest.skip("Genz-Malik cubature does not support 1D integrals")
+
+        res = cubature(
+            f,
+            a,
+            b,
+            rule=rule,
+            rtol=rtol,
+            atol=atol,
+            args=(*args, xp),
+        )
+
+        assert res.status == "converged"
+
+        est = res.estimate
+        exact_sol = exact(a, b, *args, xp)
+
+        xp_assert_close(
+            est,
+            exact_sol,
+            rtol=rtol,
+            atol=atol,
+            err_msg=f"estimate_error={res.error}, subdivisions={res.subdivisions}",
+        )
+
+    @pytest.mark.parametrize("problem", [
+        (
+            # Function to integrate, like `f(x, *args)`
+            genz_malik_1980_f_1,
+
+            # Exact solution, like `exact(a, b, *args)`
+            genz_malik_1980_f_1_exact,
+
+            # Function that generates random args of a certain shape.
+            genz_malik_1980_f_1_random_args,
+        ),
+        (
+            genz_malik_1980_f_2,
+            genz_malik_1980_f_2_exact,
+            genz_malik_1980_f_2_random_args,
+        ),
+        (
+            genz_malik_1980_f_3,
+            genz_malik_1980_f_3_exact,
+            genz_malik_1980_f_3_random_args
+        ),
+        (
+            genz_malik_1980_f_4,
+            genz_malik_1980_f_4_exact,
+            genz_malik_1980_f_4_random_args
+        ),
+        (
+            genz_malik_1980_f_5,
+            genz_malik_1980_f_5_exact,
+            genz_malik_1980_f_5_random_args,
+        ),
+    ])
+    @pytest.mark.parametrize("shape", [
+        (2,),
+        (3,),
+        (4,),
+        (1, 2),
+        (1, 3),
+        (1, 4),
+        (3, 2),
+        (3, 4, 2),
+        (2, 1, 3),
+    ])
+    def test_array_output(self, problem, rule, shape, rtol, atol, xp):
+        rng = np_compat.random.default_rng(1)
+        ndim = shape[-1]
+
+        if rule == "genz-malik" and ndim < 2:
+            pytest.skip("Genz-Malik cubature does not support 1D integrals")
+
+        if rule == "genz-malik" and ndim >= 5:
+            pytest.mark.slow("Gauss-Kronrod is slow in >= 5 dim")
+
+        f, exact, random_args = problem
+        args = random_args(rng, shape, xp)
+
+        a = xp.asarray([0] * ndim, dtype=xp.float64)
+        b = xp.asarray([1] * ndim, dtype=xp.float64)
+
+        res = cubature(
+            f,
+            a,
+            b,
+            rule=rule,
+            rtol=rtol,
+            atol=atol,
+            args=(*args, xp),
+        )
+
+        est = res.estimate
+        exact_sol = exact(a, b, *args, xp)
+
+        xp_assert_close(
+            est,
+            exact_sol,
+            rtol=rtol,
+            atol=atol,
+            err_msg=f"estimate_error={res.error}, subdivisions={res.subdivisions}",
+        )
+
+        err_msg = (f"estimate_error={res.error}, "
+                   f"subdivisions= {res.subdivisions}, "
+                   f"true_error={xp.abs(res.estimate - exact_sol)}")
+        assert res.status == "converged", err_msg
+
+        assert res.estimate.shape == shape[:-1]
+
+    @pytest.mark.parametrize("problem", [
+        (
+            # Function to integrate
+            lambda x, xp: x,
+
+            # Exact value
+            [50.0],
+
+            # Coordinates of `a`
+            [0],
+
+            # Coordinates of `b`
+            [10],
+
+            # Points by which to split up the initial region
+            None,
+        ),
+        (
+            lambda x, xp: xp.sin(x)/x,
+            [2.551496047169878],  # si(1) + si(2),
+            [-1],
+            [2],
+            [
+                [0.0],
+            ],
+        ),
+        (
+            lambda x, xp: xp.ones((x.shape[0], 1)),
+            [1.0],
+            [0, 0, 0],
+            [1, 1, 1],
+            [
+                [0.5, 0.5, 0.5],
+            ],
+        ),
+        (
+            lambda x, xp: xp.ones((x.shape[0], 1)),
+            [1.0],
+            [0, 0, 0],
+            [1, 1, 1],
+            [
+                [0.25, 0.25, 0.25],
+                [0.5, 0.5, 0.5],
+            ],
+        ),
+        (
+            lambda x, xp: xp.ones((x.shape[0], 1)),
+            [1.0],
+            [0, 0, 0],
+            [1, 1, 1],
+            [
+                [0.1, 0.25, 0.5],
+                [0.25, 0.25, 0.25],
+                [0.5, 0.5, 0.5],
+            ],
+        )
+    ])
+    def test_break_points(self, problem, rule, rtol, atol, xp):
+        f, exact, a, b, points = problem
+
+        a = xp.asarray(a, dtype=xp.float64)
+        b = xp.asarray(b, dtype=xp.float64)
+        exact = xp.asarray(exact, dtype=xp.float64)
+
+        if points is not None:
+            points = [xp.asarray(point, dtype=xp.float64) for point in points]
+
+        ndim = xp_size(a)
+
+        if rule == "genz-malik" and ndim < 2:
+            pytest.skip("Genz-Malik cubature does not support 1D integrals")
+
+        if rule == "genz-malik" and ndim >= 5:
+            pytest.mark.slow("Gauss-Kronrod is slow in >= 5 dim")
+
+        res = cubature(
+            f,
+            a,
+            b,
+            rule=rule,
+            rtol=rtol,
+            atol=atol,
+            points=points,
+            args=(xp,),
+        )
+
+        xp_assert_close(
+            res.estimate,
+            exact,
+            rtol=rtol,
+            atol=atol,
+            err_msg=f"estimate_error={res.error}, subdivisions={res.subdivisions}",
+            check_dtype=False,
+        )
+
+        err_msg = (f"estimate_error={res.error}, "
+                   f"subdivisions= {res.subdivisions}, "
+                   f"true_error={xp.abs(res.estimate - exact)}")
+        assert res.status == "converged", err_msg
+
+    @skip_xp_backends(
+        "jax.numpy",
+        reasons=["transforms make use of indexing assignment"],
+    )
+    @pytest.mark.parametrize("problem", [
+        (
+            # Function to integrate
+            f_gaussian,
+
+            # Exact solution
+            f_gaussian_exact,
+
+            # Arguments passed to f
+            f_gaussian_random_args,
+            (1, 1),
+
+            # Limits, have to match the shape of the arguments
+            [-math.inf],  # a
+            [math.inf],   # b
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (2, 2),
+            [-math.inf, -math.inf],
+            [math.inf, math.inf],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (1, 1),
+            [0],
+            [math.inf],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (1, 1),
+            [-math.inf],
+            [0],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (2, 2),
+            [0, 0],
+            [math.inf, math.inf],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (2, 2),
+            [0, -math.inf],
+            [math.inf, math.inf],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (1, 4),
+            [0, 0, -math.inf, -math.inf],
+            [math.inf, math.inf, math.inf, math.inf],
+        ),
+        (
+            f_gaussian,
+            f_gaussian_exact,
+            f_gaussian_random_args,
+            (1, 4),
+            [-math.inf, -math.inf, -math.inf, -math.inf],
+            [0, 0, math.inf, math.inf],
+        ),
+        (
+            lambda x, xp: 1/xp.prod(x, axis=-1)**2,
+
+            # Exact only for the below limits, not for general `a` and `b`.
+            lambda a, b, xp: xp.asarray(1/6, dtype=xp.float64),
+
+            # Arguments
+            lambda rng, shape, xp: tuple(),
+            tuple(),
+
+            [1, -math.inf, 3],
+            [math.inf, -2, math.inf],
+        ),
+
+        # This particular problem can be slow
+        pytest.param(
+            (
+                # f(x, y, z, w) = x^n * sqrt(y) * exp(-y-z**2-w**2) for n in [0,1,2,3]
+                f_modified_gaussian,
+
+                # This exact solution is for the below limits, not in general
+                f_modified_gaussian_exact,
+
+                # Constant arguments
+                lambda rng, shape, xp: (xp.asarray([0, 1, 2, 3, 4], dtype=xp.float64),),
+                tuple(),
+
+                [0, 0, -math.inf, -math.inf],
+                [1, math.inf, math.inf, math.inf]
+            ),
+
+            marks=pytest.mark.xslow,
+        ),
+    ])
+    def test_infinite_limits(self, problem, rule, rtol, atol, xp):
+        rng = np_compat.random.default_rng(1)
+        f, exact, random_args_func, random_args_shape, a, b = problem
+
+        a = xp.asarray(a, dtype=xp.float64)
+        b = xp.asarray(b, dtype=xp.float64)
+        args = random_args_func(rng, random_args_shape, xp)
+
+        ndim = xp_size(a)
+
+        if rule == "genz-malik" and ndim < 2:
+            pytest.skip("Genz-Malik cubature does not support 1D integrals")
+
+        if rule == "genz-malik" and ndim >= 4:
+            pytest.mark.slow("Genz-Malik is slow in >= 5 dim")
+
+        if rule == "genz-malik" and ndim >= 4 and is_array_api_strict(xp):
+            pytest.mark.xslow("Genz-Malik very slow for array_api_strict in >= 4 dim")
+
+        res = cubature(
+            f,
+            a,
+            b,
+            rule=rule,
+            rtol=rtol,
+            atol=atol,
+            args=(*args, xp),
+        )
+
+        assert res.status == "converged"
+
+        xp_assert_close(
+            res.estimate,
+            exact(a, b, *args, xp),
+            rtol=rtol,
+            atol=atol,
+            err_msg=f"error_estimate={res.error}, subdivisions={res.subdivisions}",
+            check_0d=False,
+        )
+
+    @skip_xp_backends(
+        "jax.numpy",
+        reasons=["transforms make use of indexing assignment"],
+    )
+    @pytest.mark.parametrize("problem", [
+        (
+            # Function to integrate
+            lambda x, xp: (xp.sin(x) / x)**8,
+
+            # Exact value
+            [151/315 * math.pi],
+
+            # Limits
+            [-math.inf],
+            [math.inf],
+
+            # Breakpoints
+            [[0]],
+
+        ),
+        (
+            # Function to integrate
+            lambda x, xp: (xp.sin(x[:, 0]) / x[:, 0])**8,
+
+            # Exact value
+            151/315 * math.pi,
+
+            # Limits
+            [-math.inf, 0],
+            [math.inf, 1],
+
+            # Breakpoints
+            [[0, 0.5]],
+
+        )
+    ])
+    def test_infinite_limits_and_break_points(self, problem, rule, rtol, atol, xp):
+        f, exact, a, b, points = problem
+
+        a = xp.asarray(a, dtype=xp.float64)
+        b = xp.asarray(b, dtype=xp.float64)
+        exact = xp.asarray(exact, dtype=xp.float64)
+
+        ndim = xp_size(a)
+
+        if rule == "genz-malik" and ndim < 2:
+            pytest.skip("Genz-Malik cubature does not support 1D integrals")
+
+        if points is not None:
+            points = [xp.asarray(point, dtype=xp.float64) for point in points]
+
+        res = cubature(
+            f,
+            a,
+            b,
+            rule=rule,
+            rtol=rtol,
+            atol=atol,
+            points=points,
+            args=(xp,),
+        )
+
+        assert res.status == "converged"
+
+        xp_assert_close(
+            res.estimate,
+            exact,
+            rtol=rtol,
+            atol=atol,
+            err_msg=f"error_estimate={res.error}, subdivisions={res.subdivisions}",
+            check_0d=False,
+        )
+
+
+@array_api_compatible
+class TestRules:
+    """
+    Tests related to the general Rule interface (currently private).
+    """
+
+    @pytest.mark.parametrize("problem", [
+        (
+            # 2D problem, 1D rule
+            [0, 0],
+            [1, 1],
+            GaussKronrodQuadrature,
+            (21,),
+        ),
+        (
+            # 1D problem, 2D rule
+            [0],
+            [1],
+            GenzMalikCubature,
+            (2,),
+        )
+    ])
+    def test_incompatible_dimension_raises_error(self, problem, xp):
+        a, b, quadrature, quadrature_args = problem
+        rule = quadrature(*quadrature_args, xp=xp)
+
+        a = xp.asarray(a, dtype=xp.float64)
+        b = xp.asarray(b, dtype=xp.float64)
+
+        with pytest.raises(Exception, match="incompatible dimension"):
+            rule.estimate(basic_1d_integrand, a, b, args=(xp,))
+
+    def test_estimate_with_base_classes_raise_error(self, xp):
+        a = xp.asarray([0])
+        b = xp.asarray([1])
+
+        for base_class in [Rule(), FixedRule()]:
+            with pytest.raises(Exception):
+                base_class.estimate(basic_1d_integrand, a, b, args=(xp,))
+
+
+@array_api_compatible
+class TestRulesQuadrature:
+    """
+    Tests underlying quadrature rules (ndim == 1).
+    """
+
+    @pytest.mark.parametrize(("rule", "rule_args"), [
+        (GaussLegendreQuadrature, (3,)),
+        (GaussLegendreQuadrature, (5,)),
+        (GaussLegendreQuadrature, (10,)),
+        (GaussKronrodQuadrature, (15,)),
+        (GaussKronrodQuadrature, (21,)),
+    ])
+    def test_base_1d_quadratures_simple(self, rule, rule_args, xp):
+        quadrature = rule(*rule_args, xp=xp)
+
+        n = xp.arange(5, dtype=xp.float64)
+
+        def f(x):
+            x_reshaped = xp.reshape(x, (-1, 1, 1))
+            n_reshaped = xp.reshape(n, (1, -1, 1))
+
+            return x_reshaped**n_reshaped
+
+        a = xp.asarray([0], dtype=xp.float64)
+        b = xp.asarray([2], dtype=xp.float64)
+
+        exact = xp.reshape(2**(n+1)/(n+1), (-1, 1))
+        estimate = quadrature.estimate(f, a, b)
+
+        xp_assert_close(
+            estimate,
+            exact,
+            rtol=1e-8,
+            atol=0,
+        )
+
+    @pytest.mark.parametrize(("rule_pair", "rule_pair_args"), [
+        ((GaussLegendreQuadrature, GaussLegendreQuadrature), (10, 5)),
+    ])
+    def test_base_1d_quadratures_error_from_difference(self, rule_pair, rule_pair_args,
+                                                       xp):
+        n = xp.arange(5, dtype=xp.float64)
+        a = xp.asarray([0], dtype=xp.float64)
+        b = xp.asarray([2], dtype=xp.float64)
+
+        higher = rule_pair[0](rule_pair_args[0], xp=xp)
+        lower = rule_pair[1](rule_pair_args[1], xp=xp)
+
+        rule = NestedFixedRule(higher, lower)
+        res = cubature(
+            basic_1d_integrand,
+            a, b,
+            rule=rule,
+            rtol=1e-8,
+            args=(n, xp),
+        )
+
+        xp_assert_close(
+            res.estimate,
+            basic_1d_integrand_exact(n, xp),
+            rtol=1e-8,
+            atol=0,
+        )
+
+    @pytest.mark.parametrize("quadrature", [
+        GaussLegendreQuadrature
+    ])
+    def test_one_point_fixed_quad_impossible(self, quadrature, xp):
+        with pytest.raises(Exception):
+            quadrature(1, xp=xp)
+
+
+@array_api_compatible
+class TestRulesCubature:
+    """
+    Tests underlying cubature rules (ndim >= 2).
+    """
+
+    @pytest.mark.parametrize("ndim", range(2, 11))
+    def test_genz_malik_func_evaluations(self, ndim, xp):
+        """
+        Tests that the number of function evaluations required for Genz-Malik cubature
+        matches the number in Genz and Malik 1980.
+        """
+
+        nodes, _ = GenzMalikCubature(ndim, xp=xp).nodes_and_weights
+
+        assert nodes.shape[0] == (2**ndim) + 2*ndim**2 + 2*ndim + 1
+
+    def test_genz_malik_1d_raises_error(self, xp):
+        with pytest.raises(Exception, match="only defined for ndim >= 2"):
+            GenzMalikCubature(1, xp=xp)
+
+
+@array_api_compatible
+@skip_xp_backends(
+    "jax.numpy",
+    reasons=["transforms make use of indexing assignment"],
+)
+class TestTransformations:
+    @pytest.mark.parametrize(("a", "b", "points"), [
+        (
+            [0, 1, -math.inf],
+            [1, math.inf, math.inf],
+            [
+                [1, 1, 1],
+                [0.5, 10, 10],
+            ]
+        )
+    ])
+    def test_infinite_limits_maintains_points(self, a, b, points, xp):
+        """
+        Test that break points are correctly mapped under the _InfiniteLimitsTransform
+        transformation.
+        """
+
+        xp_compat = array_namespace(xp.empty(0))
+        points = [xp.asarray(p, dtype=xp.float64) for p in points]
+
+        f_transformed = _InfiniteLimitsTransform(
+            # Bind `points` and `xp` argument in f
+            lambda x: f_with_problematic_points(x, points, xp_compat),
+            xp.asarray(a, dtype=xp_compat.float64),
+            xp.asarray(b, dtype=xp_compat.float64),
+            xp=xp_compat,
+        )
+
+        for point in points:
+            transformed_point = f_transformed.inv(xp_compat.reshape(point, (1, -1)))
+
+            with pytest.raises(Exception, match="called with a problematic point"):
+                f_transformed(transformed_point)
+
+
+class BadErrorRule(Rule):
+    """
+    A rule with fake high error so that cubature will keep on subdividing.
+    """
+
+    def estimate(self, f, a, b, args=()):
+        xp = array_namespace(a, b)
+        underlying = GaussLegendreQuadrature(10, xp=xp)
+
+        return underlying.estimate(f, a, b, args)
+
+    def estimate_error(self, f, a, b, args=()):
+        xp = array_namespace(a, b)
+        return xp.asarray(1e6, dtype=xp.float64)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_integrate.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_integrate.py
new file mode 100644
index 0000000000000000000000000000000000000000..44bfecdaac0f00b413538510c61dd1317a076261
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_integrate.py
@@ -0,0 +1,840 @@
+# Authors: Nils Wagner, Ed Schofield, Pauli Virtanen, John Travers
+"""
+Tests for numerical integration.
+"""
+import numpy as np
+from numpy import (arange, zeros, array, dot, sqrt, cos, sin, eye, pi, exp,
+                   allclose)
+
+from numpy.testing import (
+    assert_, assert_array_almost_equal,
+    assert_allclose, assert_array_equal, assert_equal, assert_warns)
+import pytest
+from pytest import raises as assert_raises
+from scipy.integrate import odeint, ode, complex_ode
+
+#------------------------------------------------------------------------------
+# Test ODE integrators
+#------------------------------------------------------------------------------
+
+
+class TestOdeint:
+    # Check integrate.odeint
+
+    def _do_problem(self, problem):
+        t = arange(0.0, problem.stop_t, 0.05)
+
+        # Basic case
+        z, infodict = odeint(problem.f, problem.z0, t, full_output=True)
+        assert_(problem.verify(z, t))
+
+        # Use tfirst=True
+        z, infodict = odeint(lambda t, y: problem.f(y, t), problem.z0, t,
+                             full_output=True, tfirst=True)
+        assert_(problem.verify(z, t))
+
+        if hasattr(problem, 'jac'):
+            # Use Dfun
+            z, infodict = odeint(problem.f, problem.z0, t, Dfun=problem.jac,
+                                 full_output=True)
+            assert_(problem.verify(z, t))
+
+            # Use Dfun and tfirst=True
+            z, infodict = odeint(lambda t, y: problem.f(y, t), problem.z0, t,
+                                 Dfun=lambda t, y: problem.jac(y, t),
+                                 full_output=True, tfirst=True)
+            assert_(problem.verify(z, t))
+
+    def test_odeint(self):
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.cmplx:
+                continue
+            self._do_problem(problem)
+
+
+class TestODEClass:
+
+    ode_class = None   # Set in subclass.
+
+    def _do_problem(self, problem, integrator, method='adams'):
+
+        # ode has callback arguments in different order than odeint
+        def f(t, z):
+            return problem.f(z, t)
+        jac = None
+        if hasattr(problem, 'jac'):
+            def jac(t, z):
+                return problem.jac(z, t)
+
+        integrator_params = {}
+        if problem.lband is not None or problem.uband is not None:
+            integrator_params['uband'] = problem.uband
+            integrator_params['lband'] = problem.lband
+
+        ig = self.ode_class(f, jac)
+        ig.set_integrator(integrator,
+                          atol=problem.atol/10,
+                          rtol=problem.rtol/10,
+                          method=method,
+                          **integrator_params)
+
+        ig.set_initial_value(problem.z0, t=0.0)
+        z = ig.integrate(problem.stop_t)
+
+        assert_array_equal(z, ig.y)
+        assert_(ig.successful(), (problem, method))
+        assert_(ig.get_return_code() > 0, (problem, method))
+        assert_(problem.verify(array([z]), problem.stop_t), (problem, method))
+
+
+class TestOde(TestODEClass):
+
+    ode_class = ode
+
+    def test_vode(self):
+        # Check the vode solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.cmplx:
+                continue
+            if not problem.stiff:
+                self._do_problem(problem, 'vode', 'adams')
+            self._do_problem(problem, 'vode', 'bdf')
+
+    def test_zvode(self):
+        # Check the zvode solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if not problem.stiff:
+                self._do_problem(problem, 'zvode', 'adams')
+            self._do_problem(problem, 'zvode', 'bdf')
+
+    def test_lsoda(self):
+        # Check the lsoda solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.cmplx:
+                continue
+            self._do_problem(problem, 'lsoda')
+
+    def test_dopri5(self):
+        # Check the dopri5 solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.cmplx:
+                continue
+            if problem.stiff:
+                continue
+            if hasattr(problem, 'jac'):
+                continue
+            self._do_problem(problem, 'dopri5')
+
+    def test_dop853(self):
+        # Check the dop853 solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.cmplx:
+                continue
+            if problem.stiff:
+                continue
+            if hasattr(problem, 'jac'):
+                continue
+            self._do_problem(problem, 'dop853')
+
+    @pytest.mark.thread_unsafe
+    def test_concurrent_fail(self):
+        for sol in ('vode', 'zvode', 'lsoda'):
+            def f(t, y):
+                return 1.0
+
+            r = ode(f).set_integrator(sol)
+            r.set_initial_value(0, 0)
+
+            r2 = ode(f).set_integrator(sol)
+            r2.set_initial_value(0, 0)
+
+            r.integrate(r.t + 0.1)
+            r2.integrate(r2.t + 0.1)
+
+            assert_raises(RuntimeError, r.integrate, r.t + 0.1)
+
+    def test_concurrent_ok(self, num_parallel_threads):
+        def f(t, y):
+            return 1.0
+
+        for k in range(3):
+            for sol in ('vode', 'zvode', 'lsoda', 'dopri5', 'dop853'):
+                if sol in {'vode', 'zvode', 'lsoda'} and num_parallel_threads > 1:
+                    continue
+                r = ode(f).set_integrator(sol)
+                r.set_initial_value(0, 0)
+
+                r2 = ode(f).set_integrator(sol)
+                r2.set_initial_value(0, 0)
+
+                r.integrate(r.t + 0.1)
+                r2.integrate(r2.t + 0.1)
+                r2.integrate(r2.t + 0.1)
+
+                assert_allclose(r.y, 0.1)
+                assert_allclose(r2.y, 0.2)
+
+            for sol in ('dopri5', 'dop853'):
+                r = ode(f).set_integrator(sol)
+                r.set_initial_value(0, 0)
+
+                r2 = ode(f).set_integrator(sol)
+                r2.set_initial_value(0, 0)
+
+                r.integrate(r.t + 0.1)
+                r.integrate(r.t + 0.1)
+                r2.integrate(r2.t + 0.1)
+                r.integrate(r.t + 0.1)
+                r2.integrate(r2.t + 0.1)
+
+                assert_allclose(r.y, 0.3)
+                assert_allclose(r2.y, 0.2)
+
+
+class TestComplexOde(TestODEClass):
+
+    ode_class = complex_ode
+
+    def test_vode(self):
+        # Check the vode solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if not problem.stiff:
+                self._do_problem(problem, 'vode', 'adams')
+            else:
+                self._do_problem(problem, 'vode', 'bdf')
+
+    def test_lsoda(self):
+
+        # Check the lsoda solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            self._do_problem(problem, 'lsoda')
+
+    def test_dopri5(self):
+        # Check the dopri5 solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.stiff:
+                continue
+            if hasattr(problem, 'jac'):
+                continue
+            self._do_problem(problem, 'dopri5')
+
+    def test_dop853(self):
+        # Check the dop853 solver
+        for problem_cls in PROBLEMS:
+            problem = problem_cls()
+            if problem.stiff:
+                continue
+            if hasattr(problem, 'jac'):
+                continue
+            self._do_problem(problem, 'dop853')
+
+
+class TestSolout:
+    # Check integrate.ode correctly handles solout for dopri5 and dop853
+    def _run_solout_test(self, integrator):
+        # Check correct usage of solout
+        ts = []
+        ys = []
+        t0 = 0.0
+        tend = 10.0
+        y0 = [1.0, 2.0]
+
+        def solout(t, y):
+            ts.append(t)
+            ys.append(y.copy())
+
+        def rhs(t, y):
+            return [y[0] + y[1], -y[1]**2]
+
+        ig = ode(rhs).set_integrator(integrator)
+        ig.set_solout(solout)
+        ig.set_initial_value(y0, t0)
+        ret = ig.integrate(tend)
+        assert_array_equal(ys[0], y0)
+        assert_array_equal(ys[-1], ret)
+        assert_equal(ts[0], t0)
+        assert_equal(ts[-1], tend)
+
+    def test_solout(self):
+        for integrator in ('dopri5', 'dop853'):
+            self._run_solout_test(integrator)
+
+    def _run_solout_after_initial_test(self, integrator):
+        # Check if solout works even if it is set after the initial value.
+        ts = []
+        ys = []
+        t0 = 0.0
+        tend = 10.0
+        y0 = [1.0, 2.0]
+
+        def solout(t, y):
+            ts.append(t)
+            ys.append(y.copy())
+
+        def rhs(t, y):
+            return [y[0] + y[1], -y[1]**2]
+
+        ig = ode(rhs).set_integrator(integrator)
+        ig.set_initial_value(y0, t0)
+        ig.set_solout(solout)
+        ret = ig.integrate(tend)
+        assert_array_equal(ys[0], y0)
+        assert_array_equal(ys[-1], ret)
+        assert_equal(ts[0], t0)
+        assert_equal(ts[-1], tend)
+
+    def test_solout_after_initial(self):
+        for integrator in ('dopri5', 'dop853'):
+            self._run_solout_after_initial_test(integrator)
+
+    def _run_solout_break_test(self, integrator):
+        # Check correct usage of stopping via solout
+        ts = []
+        ys = []
+        t0 = 0.0
+        tend = 10.0
+        y0 = [1.0, 2.0]
+
+        def solout(t, y):
+            ts.append(t)
+            ys.append(y.copy())
+            if t > tend/2.0:
+                return -1
+
+        def rhs(t, y):
+            return [y[0] + y[1], -y[1]**2]
+
+        ig = ode(rhs).set_integrator(integrator)
+        ig.set_solout(solout)
+        ig.set_initial_value(y0, t0)
+        ret = ig.integrate(tend)
+        assert_array_equal(ys[0], y0)
+        assert_array_equal(ys[-1], ret)
+        assert_equal(ts[0], t0)
+        assert_(ts[-1] > tend/2.0)
+        assert_(ts[-1] < tend)
+
+    def test_solout_break(self):
+        for integrator in ('dopri5', 'dop853'):
+            self._run_solout_break_test(integrator)
+
+
+class TestComplexSolout:
+    # Check integrate.ode correctly handles solout for dopri5 and dop853
+    def _run_solout_test(self, integrator):
+        # Check correct usage of solout
+        ts = []
+        ys = []
+        t0 = 0.0
+        tend = 20.0
+        y0 = [0.0]
+
+        def solout(t, y):
+            ts.append(t)
+            ys.append(y.copy())
+
+        def rhs(t, y):
+            return [1.0/(t - 10.0 - 1j)]
+
+        ig = complex_ode(rhs).set_integrator(integrator)
+        ig.set_solout(solout)
+        ig.set_initial_value(y0, t0)
+        ret = ig.integrate(tend)
+        assert_array_equal(ys[0], y0)
+        assert_array_equal(ys[-1], ret)
+        assert_equal(ts[0], t0)
+        assert_equal(ts[-1], tend)
+
+    def test_solout(self):
+        for integrator in ('dopri5', 'dop853'):
+            self._run_solout_test(integrator)
+
+    def _run_solout_break_test(self, integrator):
+        # Check correct usage of stopping via solout
+        ts = []
+        ys = []
+        t0 = 0.0
+        tend = 20.0
+        y0 = [0.0]
+
+        def solout(t, y):
+            ts.append(t)
+            ys.append(y.copy())
+            if t > tend/2.0:
+                return -1
+
+        def rhs(t, y):
+            return [1.0/(t - 10.0 - 1j)]
+
+        ig = complex_ode(rhs).set_integrator(integrator)
+        ig.set_solout(solout)
+        ig.set_initial_value(y0, t0)
+        ret = ig.integrate(tend)
+        assert_array_equal(ys[0], y0)
+        assert_array_equal(ys[-1], ret)
+        assert_equal(ts[0], t0)
+        assert_(ts[-1] > tend/2.0)
+        assert_(ts[-1] < tend)
+
+    def test_solout_break(self):
+        for integrator in ('dopri5', 'dop853'):
+            self._run_solout_break_test(integrator)
+
+
+#------------------------------------------------------------------------------
+# Test problems
+#------------------------------------------------------------------------------
+
+
+class ODE:
+    """
+    ODE problem
+    """
+    stiff = False
+    cmplx = False
+    stop_t = 1
+    z0 = []
+
+    lband = None
+    uband = None
+
+    atol = 1e-6
+    rtol = 1e-5
+
+
+class SimpleOscillator(ODE):
+    r"""
+    Free vibration of a simple oscillator::
+        m \ddot{u} + k u = 0, u(0) = u_0 \dot{u}(0) \dot{u}_0
+    Solution::
+        u(t) = u_0*cos(sqrt(k/m)*t)+\dot{u}_0*sin(sqrt(k/m)*t)/sqrt(k/m)
+    """
+    stop_t = 1 + 0.09
+    z0 = array([1.0, 0.1], float)
+
+    k = 4.0
+    m = 1.0
+
+    def f(self, z, t):
+        tmp = zeros((2, 2), float)
+        tmp[0, 1] = 1.0
+        tmp[1, 0] = -self.k / self.m
+        return dot(tmp, z)
+
+    def verify(self, zs, t):
+        omega = sqrt(self.k / self.m)
+        u = self.z0[0]*cos(omega*t) + self.z0[1]*sin(omega*t)/omega
+        return allclose(u, zs[:, 0], atol=self.atol, rtol=self.rtol)
+
+
+class ComplexExp(ODE):
+    r"""The equation :lm:`\dot u = i u`"""
+    stop_t = 1.23*pi
+    z0 = exp([1j, 2j, 3j, 4j, 5j])
+    cmplx = True
+
+    def f(self, z, t):
+        return 1j*z
+
+    def jac(self, z, t):
+        return 1j*eye(5)
+
+    def verify(self, zs, t):
+        u = self.z0 * exp(1j*t)
+        return allclose(u, zs, atol=self.atol, rtol=self.rtol)
+
+
+class Pi(ODE):
+    r"""Integrate 1/(t + 1j) from t=-10 to t=10"""
+    stop_t = 20
+    z0 = [0]
+    cmplx = True
+
+    def f(self, z, t):
+        return array([1./(t - 10 + 1j)])
+
+    def verify(self, zs, t):
+        u = -2j * np.arctan(10)
+        return allclose(u, zs[-1, :], atol=self.atol, rtol=self.rtol)
+
+
+class CoupledDecay(ODE):
+    r"""
+    3 coupled decays suited for banded treatment
+    (banded mode makes it necessary when N>>3)
+    """
+
+    stiff = True
+    stop_t = 0.5
+    z0 = [5.0, 7.0, 13.0]
+    lband = 1
+    uband = 0
+
+    lmbd = [0.17, 0.23, 0.29]  # fictitious decay constants
+
+    def f(self, z, t):
+        lmbd = self.lmbd
+        return np.array([-lmbd[0]*z[0],
+                         -lmbd[1]*z[1] + lmbd[0]*z[0],
+                         -lmbd[2]*z[2] + lmbd[1]*z[1]])
+
+    def jac(self, z, t):
+        # The full Jacobian is
+        #
+        #    [-lmbd[0]      0         0   ]
+        #    [ lmbd[0]  -lmbd[1]      0   ]
+        #    [    0      lmbd[1]  -lmbd[2]]
+        #
+        # The lower and upper bandwidths are lband=1 and uband=0, resp.
+        # The representation of this array in packed format is
+        #
+        #    [-lmbd[0]  -lmbd[1]  -lmbd[2]]
+        #    [ lmbd[0]   lmbd[1]      0   ]
+
+        lmbd = self.lmbd
+        j = np.zeros((self.lband + self.uband + 1, 3), order='F')
+
+        def set_j(ri, ci, val):
+            j[self.uband + ri - ci, ci] = val
+        set_j(0, 0, -lmbd[0])
+        set_j(1, 0, lmbd[0])
+        set_j(1, 1, -lmbd[1])
+        set_j(2, 1, lmbd[1])
+        set_j(2, 2, -lmbd[2])
+        return j
+
+    def verify(self, zs, t):
+        # Formulae derived by hand
+        lmbd = np.array(self.lmbd)
+        d10 = lmbd[1] - lmbd[0]
+        d21 = lmbd[2] - lmbd[1]
+        d20 = lmbd[2] - lmbd[0]
+        e0 = np.exp(-lmbd[0] * t)
+        e1 = np.exp(-lmbd[1] * t)
+        e2 = np.exp(-lmbd[2] * t)
+        u = np.vstack((
+            self.z0[0] * e0,
+            self.z0[1] * e1 + self.z0[0] * lmbd[0] / d10 * (e0 - e1),
+            self.z0[2] * e2 + self.z0[1] * lmbd[1] / d21 * (e1 - e2) +
+            lmbd[1] * lmbd[0] * self.z0[0] / d10 *
+            (1 / d20 * (e0 - e2) - 1 / d21 * (e1 - e2)))).transpose()
+        return allclose(u, zs, atol=self.atol, rtol=self.rtol)
+
+
+PROBLEMS = [SimpleOscillator, ComplexExp, Pi, CoupledDecay]
+
+#------------------------------------------------------------------------------
+
+
+def f(t, x):
+    dxdt = [x[1], -x[0]]
+    return dxdt
+
+
+def jac(t, x):
+    j = array([[0.0, 1.0],
+               [-1.0, 0.0]])
+    return j
+
+
+def f1(t, x, omega):
+    dxdt = [omega*x[1], -omega*x[0]]
+    return dxdt
+
+
+def jac1(t, x, omega):
+    j = array([[0.0, omega],
+               [-omega, 0.0]])
+    return j
+
+
+def f2(t, x, omega1, omega2):
+    dxdt = [omega1*x[1], -omega2*x[0]]
+    return dxdt
+
+
+def jac2(t, x, omega1, omega2):
+    j = array([[0.0, omega1],
+               [-omega2, 0.0]])
+    return j
+
+
+def fv(t, x, omega):
+    dxdt = [omega[0]*x[1], -omega[1]*x[0]]
+    return dxdt
+
+
+def jacv(t, x, omega):
+    j = array([[0.0, omega[0]],
+               [-omega[1], 0.0]])
+    return j
+
+
+class ODECheckParameterUse:
+    """Call an ode-class solver with several cases of parameter use."""
+
+    # solver_name must be set before tests can be run with this class.
+
+    # Set these in subclasses.
+    solver_name = ''
+    solver_uses_jac = False
+
+    def _get_solver(self, f, jac):
+        solver = ode(f, jac)
+        if self.solver_uses_jac:
+            solver.set_integrator(self.solver_name, atol=1e-9, rtol=1e-7,
+                                  with_jacobian=self.solver_uses_jac)
+        else:
+            # XXX Shouldn't set_integrator *always* accept the keyword arg
+            # 'with_jacobian', and perhaps raise an exception if it is set
+            # to True if the solver can't actually use it?
+            solver.set_integrator(self.solver_name, atol=1e-9, rtol=1e-7)
+        return solver
+
+    def _check_solver(self, solver):
+        ic = [1.0, 0.0]
+        solver.set_initial_value(ic, 0.0)
+        solver.integrate(pi)
+        assert_array_almost_equal(solver.y, [-1.0, 0.0])
+
+    def test_no_params(self):
+        solver = self._get_solver(f, jac)
+        self._check_solver(solver)
+
+    def test_one_scalar_param(self):
+        solver = self._get_solver(f1, jac1)
+        omega = 1.0
+        solver.set_f_params(omega)
+        if self.solver_uses_jac:
+            solver.set_jac_params(omega)
+        self._check_solver(solver)
+
+    def test_two_scalar_params(self):
+        solver = self._get_solver(f2, jac2)
+        omega1 = 1.0
+        omega2 = 1.0
+        solver.set_f_params(omega1, omega2)
+        if self.solver_uses_jac:
+            solver.set_jac_params(omega1, omega2)
+        self._check_solver(solver)
+
+    def test_vector_param(self):
+        solver = self._get_solver(fv, jacv)
+        omega = [1.0, 1.0]
+        solver.set_f_params(omega)
+        if self.solver_uses_jac:
+            solver.set_jac_params(omega)
+        self._check_solver(solver)
+
+    @pytest.mark.thread_unsafe
+    def test_warns_on_failure(self):
+        # Set nsteps small to ensure failure
+        solver = self._get_solver(f, jac)
+        solver.set_integrator(self.solver_name, nsteps=1)
+        ic = [1.0, 0.0]
+        solver.set_initial_value(ic, 0.0)
+        assert_warns(UserWarning, solver.integrate, pi)
+
+
+class TestDOPRI5CheckParameterUse(ODECheckParameterUse):
+    solver_name = 'dopri5'
+    solver_uses_jac = False
+
+
+class TestDOP853CheckParameterUse(ODECheckParameterUse):
+    solver_name = 'dop853'
+    solver_uses_jac = False
+
+
+class TestVODECheckParameterUse(ODECheckParameterUse):
+    solver_name = 'vode'
+    solver_uses_jac = True
+
+
+class TestZVODECheckParameterUse(ODECheckParameterUse):
+    solver_name = 'zvode'
+    solver_uses_jac = True
+
+
+class TestLSODACheckParameterUse(ODECheckParameterUse):
+    solver_name = 'lsoda'
+    solver_uses_jac = True
+
+
+def test_odeint_trivial_time():
+    # Test that odeint succeeds when given a single time point
+    # and full_output=True.  This is a regression test for gh-4282.
+    y0 = 1
+    t = [0]
+    y, info = odeint(lambda y, t: -y, y0, t, full_output=True)
+    assert_array_equal(y, np.array([[y0]]))
+
+
+def test_odeint_banded_jacobian():
+    # Test the use of the `Dfun`, `ml` and `mu` options of odeint.
+
+    def func(y, t, c):
+        return c.dot(y)
+
+    def jac(y, t, c):
+        return c
+
+    def jac_transpose(y, t, c):
+        return c.T.copy(order='C')
+
+    def bjac_rows(y, t, c):
+        jac = np.vstack((np.r_[0, np.diag(c, 1)],
+                            np.diag(c),
+                            np.r_[np.diag(c, -1), 0],
+                            np.r_[np.diag(c, -2), 0, 0]))
+        return jac
+
+    def bjac_cols(y, t, c):
+        return bjac_rows(y, t, c).T.copy(order='C')
+
+    c = array([[-205, 0.01, 0.00, 0.0],
+               [0.1, -2.50, 0.02, 0.0],
+               [1e-3, 0.01, -2.0, 0.01],
+               [0.00, 0.00, 0.1, -1.0]])
+
+    y0 = np.ones(4)
+    t = np.array([0, 5, 10, 100])
+
+    # Use the full Jacobian.
+    sol1, info1 = odeint(func, y0, t, args=(c,), full_output=True,
+                         atol=1e-13, rtol=1e-11, mxstep=10000,
+                         Dfun=jac)
+
+    # Use the transposed full Jacobian, with col_deriv=True.
+    sol2, info2 = odeint(func, y0, t, args=(c,), full_output=True,
+                         atol=1e-13, rtol=1e-11, mxstep=10000,
+                         Dfun=jac_transpose, col_deriv=True)
+
+    # Use the banded Jacobian.
+    sol3, info3 = odeint(func, y0, t, args=(c,), full_output=True,
+                         atol=1e-13, rtol=1e-11, mxstep=10000,
+                         Dfun=bjac_rows, ml=2, mu=1)
+
+    # Use the transposed banded Jacobian, with col_deriv=True.
+    sol4, info4 = odeint(func, y0, t, args=(c,), full_output=True,
+                         atol=1e-13, rtol=1e-11, mxstep=10000,
+                         Dfun=bjac_cols, ml=2, mu=1, col_deriv=True)
+
+    assert_allclose(sol1, sol2, err_msg="sol1 != sol2")
+    assert_allclose(sol1, sol3, atol=1e-12, err_msg="sol1 != sol3")
+    assert_allclose(sol3, sol4, err_msg="sol3 != sol4")
+
+    # Verify that the number of jacobian evaluations was the same for the
+    # calls of odeint with a full jacobian and with a banded jacobian. This is
+    # a regression test--there was a bug in the handling of banded jacobians
+    # that resulted in an incorrect jacobian matrix being passed to the LSODA
+    # code.  That would cause errors or excessive jacobian evaluations.
+    assert_array_equal(info1['nje'], info2['nje'])
+    assert_array_equal(info3['nje'], info4['nje'])
+
+    # Test the use of tfirst
+    sol1ty, info1ty = odeint(lambda t, y, c: func(y, t, c), y0, t, args=(c,),
+                             full_output=True, atol=1e-13, rtol=1e-11,
+                             mxstep=10000,
+                             Dfun=lambda t, y, c: jac(y, t, c), tfirst=True)
+    # The code should execute the exact same sequence of floating point
+    # calculations, so these should be exactly equal. We'll be safe and use
+    # a small tolerance.
+    assert_allclose(sol1, sol1ty, rtol=1e-12, err_msg="sol1 != sol1ty")
+
+
+def test_odeint_errors():
+    def sys1d(x, t):
+        return -100*x
+
+    def bad1(x, t):
+        return 1.0/0
+
+    def bad2(x, t):
+        return "foo"
+
+    def bad_jac1(x, t):
+        return 1.0/0
+
+    def bad_jac2(x, t):
+        return [["foo"]]
+
+    def sys2d(x, t):
+        return [-100*x[0], -0.1*x[1]]
+
+    def sys2d_bad_jac(x, t):
+        return [[1.0/0, 0], [0, -0.1]]
+
+    assert_raises(ZeroDivisionError, odeint, bad1, 1.0, [0, 1])
+    assert_raises(ValueError, odeint, bad2, 1.0, [0, 1])
+
+    assert_raises(ZeroDivisionError, odeint, sys1d, 1.0, [0, 1], Dfun=bad_jac1)
+    assert_raises(ValueError, odeint, sys1d, 1.0, [0, 1], Dfun=bad_jac2)
+
+    assert_raises(ZeroDivisionError, odeint, sys2d, [1.0, 1.0], [0, 1],
+                  Dfun=sys2d_bad_jac)
+
+
+def test_odeint_bad_shapes():
+    # Tests of some errors that can occur with odeint.
+
+    def badrhs(x, t):
+        return [1, -1]
+
+    def sys1(x, t):
+        return -100*x
+
+    def badjac(x, t):
+        return [[0, 0, 0]]
+
+    # y0 must be at most 1-d.
+    bad_y0 = [[0, 0], [0, 0]]
+    assert_raises(ValueError, odeint, sys1, bad_y0, [0, 1])
+
+    # t must be at most 1-d.
+    bad_t = [[0, 1], [2, 3]]
+    assert_raises(ValueError, odeint, sys1, [10.0], bad_t)
+
+    # y0 is 10, but badrhs(x, t) returns [1, -1].
+    assert_raises(RuntimeError, odeint, badrhs, 10, [0, 1])
+
+    # shape of array returned by badjac(x, t) is not correct.
+    assert_raises(RuntimeError, odeint, sys1, [10, 10], [0, 1], Dfun=badjac)
+
+
+def test_repeated_t_values():
+    """Regression test for gh-8217."""
+
+    def func(x, t):
+        return -0.25*x
+
+    t = np.zeros(10)
+    sol = odeint(func, [1.], t)
+    assert_array_equal(sol, np.ones((len(t), 1)))
+
+    tau = 4*np.log(2)
+    t = [0]*9 + [tau, 2*tau, 2*tau, 3*tau]
+    sol = odeint(func, [1, 2], t, rtol=1e-12, atol=1e-12)
+    expected_sol = np.array([[1.0, 2.0]]*9 +
+                            [[0.5, 1.0],
+                             [0.25, 0.5],
+                             [0.25, 0.5],
+                             [0.125, 0.25]])
+    assert_allclose(sol, expected_sol)
+
+    # Edge case: empty t sequence.
+    sol = odeint(func, [1.], [])
+    assert_array_equal(sol, np.array([], dtype=np.float64).reshape((0, 1)))
+
+    # t values are not monotonic.
+    assert_raises(ValueError, odeint, func, [1.], [0, 1, 0.5, 0])
+    assert_raises(ValueError, odeint, func, [1, 2, 3], [0, -1, -2, 3])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_odeint_jac.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_odeint_jac.py
new file mode 100644
index 0000000000000000000000000000000000000000..7d28ccc93f4444f3f2e0b71da01c573d4f903dbc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_odeint_jac.py
@@ -0,0 +1,74 @@
+import numpy as np
+from numpy.testing import assert_equal, assert_allclose
+from scipy.integrate import odeint
+import scipy.integrate._test_odeint_banded as banded5x5
+
+
+def rhs(y, t):
+    dydt = np.zeros_like(y)
+    banded5x5.banded5x5(t, y, dydt)
+    return dydt
+
+
+def jac(y, t):
+    n = len(y)
+    jac = np.zeros((n, n), order='F')
+    banded5x5.banded5x5_jac(t, y, 1, 1, jac)
+    return jac
+
+
+def bjac(y, t):
+    n = len(y)
+    bjac = np.zeros((4, n), order='F')
+    banded5x5.banded5x5_bjac(t, y, 1, 1, bjac)
+    return bjac
+
+
+JACTYPE_FULL = 1
+JACTYPE_BANDED = 4
+
+
+def check_odeint(jactype):
+    if jactype == JACTYPE_FULL:
+        ml = None
+        mu = None
+        jacobian = jac
+    elif jactype == JACTYPE_BANDED:
+        ml = 2
+        mu = 1
+        jacobian = bjac
+    else:
+        raise ValueError(f"invalid jactype: {jactype!r}")
+
+    y0 = np.arange(1.0, 6.0)
+    # These tolerances must match the tolerances used in banded5x5.f.
+    rtol = 1e-11
+    atol = 1e-13
+    dt = 0.125
+    nsteps = 64
+    t = dt * np.arange(nsteps+1)
+
+    sol, info = odeint(rhs, y0, t,
+                       Dfun=jacobian, ml=ml, mu=mu,
+                       atol=atol, rtol=rtol, full_output=True)
+    yfinal = sol[-1]
+    odeint_nst = info['nst'][-1]
+    odeint_nfe = info['nfe'][-1]
+    odeint_nje = info['nje'][-1]
+
+    y1 = y0.copy()
+    # Pure Fortran solution. y1 is modified in-place.
+    nst, nfe, nje = banded5x5.banded5x5_solve(y1, nsteps, dt, jactype)
+
+    # It is likely that yfinal and y1 are *exactly* the same, but
+    # we'll be cautious and use assert_allclose.
+    assert_allclose(yfinal, y1, rtol=1e-12)
+    assert_equal((odeint_nst, odeint_nfe, odeint_nje), (nst, nfe, nje))
+
+
+def test_odeint_full_jac():
+    check_odeint(JACTYPE_FULL)
+
+
+def test_odeint_banded_jac():
+    check_odeint(JACTYPE_BANDED)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..e61a69df40f9b5975a6f02f40e6f72e34dbbf297
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadpack.py
@@ -0,0 +1,680 @@
+import sys
+import math
+import numpy as np
+from numpy import sqrt, cos, sin, arctan, exp, log, pi
+from numpy.testing import (assert_,
+        assert_allclose, assert_array_less, assert_almost_equal)
+import pytest
+
+from scipy.integrate import quad, dblquad, tplquad, nquad
+from scipy.special import erf, erfc
+from scipy._lib._ccallback import LowLevelCallable
+
+import ctypes
+import ctypes.util
+from scipy._lib._ccallback_c import sine_ctypes
+
+import scipy.integrate._test_multivariate as clib_test
+
+
+def assert_quad(value_and_err, tabled_value, error_tolerance=1.5e-8):
+    value, err = value_and_err
+    assert_allclose(value, tabled_value, atol=err, rtol=0)
+    if error_tolerance is not None:
+        assert_array_less(err, error_tolerance)
+
+
+def get_clib_test_routine(name, restype, *argtypes):
+    ptr = getattr(clib_test, name)
+    return ctypes.cast(ptr, ctypes.CFUNCTYPE(restype, *argtypes))
+
+
+class TestCtypesQuad:
+    def setup_method(self):
+        if sys.platform == 'win32':
+            files = ['api-ms-win-crt-math-l1-1-0.dll']
+        elif sys.platform == 'darwin':
+            files = ['libm.dylib']
+        else:
+            files = ['libm.so', 'libm.so.6']
+
+        for file in files:
+            try:
+                self.lib = ctypes.CDLL(file)
+                break
+            except OSError:
+                pass
+        else:
+            # This test doesn't work on some Linux platforms (Fedora for
+            # example) that put an ld script in libm.so - see gh-5370
+            pytest.skip("Ctypes can't import libm.so")
+
+        restype = ctypes.c_double
+        argtypes = (ctypes.c_double,)
+        for name in ['sin', 'cos', 'tan']:
+            func = getattr(self.lib, name)
+            func.restype = restype
+            func.argtypes = argtypes
+
+    def test_typical(self):
+        assert_quad(quad(self.lib.sin, 0, 5), quad(math.sin, 0, 5)[0])
+        assert_quad(quad(self.lib.cos, 0, 5), quad(math.cos, 0, 5)[0])
+        assert_quad(quad(self.lib.tan, 0, 1), quad(math.tan, 0, 1)[0])
+
+    def test_ctypes_sine(self):
+        quad(LowLevelCallable(sine_ctypes), 0, 1)
+
+    def test_ctypes_variants(self):
+        sin_0 = get_clib_test_routine('_sin_0', ctypes.c_double,
+                                      ctypes.c_double, ctypes.c_void_p)
+
+        sin_1 = get_clib_test_routine('_sin_1', ctypes.c_double,
+                                      ctypes.c_int, ctypes.POINTER(ctypes.c_double),
+                                      ctypes.c_void_p)
+
+        sin_2 = get_clib_test_routine('_sin_2', ctypes.c_double,
+                                      ctypes.c_double)
+
+        sin_3 = get_clib_test_routine('_sin_3', ctypes.c_double,
+                                      ctypes.c_int, ctypes.POINTER(ctypes.c_double))
+
+        sin_4 = get_clib_test_routine('_sin_3', ctypes.c_double,
+                                      ctypes.c_int, ctypes.c_double)
+
+        all_sigs = [sin_0, sin_1, sin_2, sin_3, sin_4]
+        legacy_sigs = [sin_2, sin_4]
+        legacy_only_sigs = [sin_4]
+
+        # LowLevelCallables work for new signatures
+        for j, func in enumerate(all_sigs):
+            callback = LowLevelCallable(func)
+            if func in legacy_only_sigs:
+                pytest.raises(ValueError, quad, callback, 0, pi)
+            else:
+                assert_allclose(quad(callback, 0, pi)[0], 2.0)
+
+        # Plain ctypes items work only for legacy signatures
+        for j, func in enumerate(legacy_sigs):
+            if func in legacy_sigs:
+                assert_allclose(quad(func, 0, pi)[0], 2.0)
+            else:
+                pytest.raises(ValueError, quad, func, 0, pi)
+
+
+class TestMultivariateCtypesQuad:
+    def setup_method(self):
+        restype = ctypes.c_double
+        argtypes = (ctypes.c_int, ctypes.c_double)
+        for name in ['_multivariate_typical', '_multivariate_indefinite',
+                     '_multivariate_sin']:
+            func = get_clib_test_routine(name, restype, *argtypes)
+            setattr(self, name, func)
+
+    def test_typical(self):
+        # 1) Typical function with two extra arguments:
+        assert_quad(quad(self._multivariate_typical, 0, pi, (2, 1.8)),
+                    0.30614353532540296487)
+
+    def test_indefinite(self):
+        # 2) Infinite integration limits --- Euler's constant
+        assert_quad(quad(self._multivariate_indefinite, 0, np.inf),
+                    0.577215664901532860606512)
+
+    def test_threadsafety(self):
+        # Ensure multivariate ctypes are threadsafe
+        def threadsafety(y):
+            return y + quad(self._multivariate_sin, 0, 1)[0]
+        assert_quad(quad(threadsafety, 0, 1), 0.9596976941318602)
+
+
+class TestQuad:
+    def test_typical(self):
+        # 1) Typical function with two extra arguments:
+        def myfunc(x, n, z):       # Bessel function integrand
+            return cos(n*x-z*sin(x))/pi
+        assert_quad(quad(myfunc, 0, pi, (2, 1.8)), 0.30614353532540296487)
+
+    def test_indefinite(self):
+        # 2) Infinite integration limits --- Euler's constant
+        def myfunc(x):           # Euler's constant integrand
+            return -exp(-x)*log(x)
+        assert_quad(quad(myfunc, 0, np.inf), 0.577215664901532860606512)
+
+    def test_singular(self):
+        # 3) Singular points in region of integration.
+        def myfunc(x):
+            if 0 < x < 2.5:
+                return sin(x)
+            elif 2.5 <= x <= 5.0:
+                return exp(-x)
+            else:
+                return 0.0
+
+        assert_quad(quad(myfunc, 0, 10, points=[2.5, 5.0]),
+                    1 - cos(2.5) + exp(-2.5) - exp(-5.0))
+
+    def test_sine_weighted_finite(self):
+        # 4) Sine weighted integral (finite limits)
+        def myfunc(x, a):
+            return exp(a*(x-1))
+
+        ome = 2.0**3.4
+        assert_quad(quad(myfunc, 0, 1, args=20, weight='sin', wvar=ome),
+                    (20*sin(ome)-ome*cos(ome)+ome*exp(-20))/(20**2 + ome**2))
+
+    def test_sine_weighted_infinite(self):
+        # 5) Sine weighted integral (infinite limits)
+        def myfunc(x, a):
+            return exp(-x*a)
+
+        a = 4.0
+        ome = 3.0
+        assert_quad(quad(myfunc, 0, np.inf, args=a, weight='sin', wvar=ome),
+                    ome/(a**2 + ome**2))
+
+    def test_cosine_weighted_infinite(self):
+        # 6) Cosine weighted integral (negative infinite limits)
+        def myfunc(x, a):
+            return exp(x*a)
+
+        a = 2.5
+        ome = 2.3
+        assert_quad(quad(myfunc, -np.inf, 0, args=a, weight='cos', wvar=ome),
+                    a/(a**2 + ome**2))
+
+    def test_algebraic_log_weight(self):
+        # 6) Algebraic-logarithmic weight.
+        def myfunc(x, a):
+            return 1/(1+x+2**(-a))
+
+        a = 1.5
+        assert_quad(quad(myfunc, -1, 1, args=a, weight='alg',
+                         wvar=(-0.5, -0.5)),
+                    pi/sqrt((1+2**(-a))**2 - 1))
+
+    def test_cauchypv_weight(self):
+        # 7) Cauchy prinicpal value weighting w(x) = 1/(x-c)
+        def myfunc(x, a):
+            return 2.0**(-a)/((x-1)**2+4.0**(-a))
+
+        a = 0.4
+        tabledValue = ((2.0**(-0.4)*log(1.5) -
+                        2.0**(-1.4)*log((4.0**(-a)+16) / (4.0**(-a)+1)) -
+                        arctan(2.0**(a+2)) -
+                        arctan(2.0**a)) /
+                       (4.0**(-a) + 1))
+        assert_quad(quad(myfunc, 0, 5, args=0.4, weight='cauchy', wvar=2.0),
+                    tabledValue, error_tolerance=1.9e-8)
+
+    def test_b_less_than_a(self):
+        def f(x, p, q):
+            return p * np.exp(-q*x)
+
+        val_1, err_1 = quad(f, 0, np.inf, args=(2, 3))
+        val_2, err_2 = quad(f, np.inf, 0, args=(2, 3))
+        assert_allclose(val_1, -val_2, atol=max(err_1, err_2))
+
+    def test_b_less_than_a_2(self):
+        def f(x, s):
+            return np.exp(-x**2 / 2 / s) / np.sqrt(2.*s)
+
+        val_1, err_1 = quad(f, -np.inf, np.inf, args=(2,))
+        val_2, err_2 = quad(f, np.inf, -np.inf, args=(2,))
+        assert_allclose(val_1, -val_2, atol=max(err_1, err_2))
+
+    def test_b_less_than_a_3(self):
+        def f(x):
+            return 1.0
+
+        val_1, err_1 = quad(f, 0, 1, weight='alg', wvar=(0, 0))
+        val_2, err_2 = quad(f, 1, 0, weight='alg', wvar=(0, 0))
+        assert_allclose(val_1, -val_2, atol=max(err_1, err_2))
+
+    def test_b_less_than_a_full_output(self):
+        def f(x):
+            return 1.0
+
+        res_1 = quad(f, 0, 1, weight='alg', wvar=(0, 0), full_output=True)
+        res_2 = quad(f, 1, 0, weight='alg', wvar=(0, 0), full_output=True)
+        err = max(res_1[1], res_2[1])
+        assert_allclose(res_1[0], -res_2[0], atol=err)
+
+    def test_double_integral(self):
+        # 8) Double Integral test
+        def simpfunc(y, x):       # Note order of arguments.
+            return x+y
+
+        a, b = 1.0, 2.0
+        assert_quad(dblquad(simpfunc, a, b, lambda x: x, lambda x: 2*x),
+                    5/6.0 * (b**3.0-a**3.0))
+
+    def test_double_integral2(self):
+        def func(x0, x1, t0, t1):
+            return x0 + x1 + t0 + t1
+        def g(x):
+            return x
+        def h(x):
+            return 2 * x
+        args = 1, 2
+        assert_quad(dblquad(func, 1, 2, g, h, args=args),35./6 + 9*.5)
+
+    def test_double_integral3(self):
+        def func(x0, x1):
+            return x0 + x1 + 1 + 2
+        assert_quad(dblquad(func, 1, 2, 1, 2),6.)
+
+    @pytest.mark.parametrize(
+        "x_lower, x_upper, y_lower, y_upper, expected",
+        [
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, 0] for all n.
+            (-np.inf, 0, -np.inf, 0, np.pi / 4),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, -1] for each n (one at a time).
+            (-np.inf, -1, -np.inf, 0, np.pi / 4 * erfc(1)),
+            (-np.inf, 0, -np.inf, -1, np.pi / 4 * erfc(1)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, -1] for all n.
+            (-np.inf, -1, -np.inf, -1, np.pi / 4 * (erfc(1) ** 2)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, 1] for each n (one at a time).
+            (-np.inf, 1, -np.inf, 0, np.pi / 4 * (erf(1) + 1)),
+            (-np.inf, 0, -np.inf, 1, np.pi / 4 * (erf(1) + 1)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, 1] for all n.
+            (-np.inf, 1, -np.inf, 1, np.pi / 4 * ((erf(1) + 1) ** 2)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain Dx = [-inf, -1] and Dy = [-inf, 1].
+            (-np.inf, -1, -np.inf, 1, np.pi / 4 * ((erf(1) + 1) * erfc(1))),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain Dx = [-inf, 1] and Dy = [-inf, -1].
+            (-np.inf, 1, -np.inf, -1, np.pi / 4 * ((erf(1) + 1) * erfc(1))),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [0, inf] for all n.
+            (0, np.inf, 0, np.inf, np.pi / 4),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [1, inf] for each n (one at a time).
+            (1, np.inf, 0, np.inf, np.pi / 4 * erfc(1)),
+            (0, np.inf, 1, np.inf, np.pi / 4 * erfc(1)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [1, inf] for all n.
+            (1, np.inf, 1, np.inf, np.pi / 4 * (erfc(1) ** 2)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-1, inf] for each n (one at a time).
+            (-1, np.inf, 0, np.inf, np.pi / 4 * (erf(1) + 1)),
+            (0, np.inf, -1, np.inf, np.pi / 4 * (erf(1) + 1)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-1, inf] for all n.
+            (-1, np.inf, -1, np.inf, np.pi / 4 * ((erf(1) + 1) ** 2)),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain Dx = [-1, inf] and Dy = [1, inf].
+            (-1, np.inf, 1, np.inf, np.pi / 4 * ((erf(1) + 1) * erfc(1))),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain Dx = [1, inf] and Dy = [-1, inf].
+            (1, np.inf, -1, np.inf, np.pi / 4 * ((erf(1) + 1) * erfc(1))),
+            # Multiple integration of a function in n = 2 variables: f(x, y, z)
+            # over domain D = [-inf, inf] for all n.
+            (-np.inf, np.inf, -np.inf, np.inf, np.pi)
+        ]
+    )
+    def test_double_integral_improper(
+            self, x_lower, x_upper, y_lower, y_upper, expected
+    ):
+        # The Gaussian Integral.
+        def f(x, y):
+            return np.exp(-x ** 2 - y ** 2)
+
+        assert_quad(
+            dblquad(f, x_lower, x_upper, y_lower, y_upper),
+            expected,
+            error_tolerance=3e-8
+        )
+
+    def test_triple_integral(self):
+        # 9) Triple Integral test
+        def simpfunc(z, y, x, t):      # Note order of arguments.
+            return (x+y+z)*t
+
+        a, b = 1.0, 2.0
+        assert_quad(tplquad(simpfunc, a, b,
+                            lambda x: x, lambda x: 2*x,
+                            lambda x, y: x - y, lambda x, y: x + y,
+                            (2.,)),
+                     2*8/3.0 * (b**4.0 - a**4.0))
+
+    @pytest.mark.xslow
+    @pytest.mark.parametrize(
+        "x_lower, x_upper, y_lower, y_upper, z_lower, z_upper, expected",
+        [
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, 0] for all n.
+            (-np.inf, 0, -np.inf, 0, -np.inf, 0, (np.pi ** (3 / 2)) / 8),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, -1] for each n (one at a time).
+            (-np.inf, -1, -np.inf, 0, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            (-np.inf, 0, -np.inf, -1, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            (-np.inf, 0, -np.inf, 0, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, -1] for each n (two at a time).
+            (-np.inf, -1, -np.inf, -1, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            (-np.inf, -1, -np.inf, 0, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            (-np.inf, 0, -np.inf, -1, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, -1] for all n.
+            (-np.inf, -1, -np.inf, -1, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 3)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = [-inf, -1] and Dy = Dz = [-inf, 1].
+            (-np.inf, -1, -np.inf, 1, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dy = [-inf, -1] and Dz = [-inf, 1].
+            (-np.inf, -1, -np.inf, -1, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dz = [-inf, -1] and Dy = [-inf, 1].
+            (-np.inf, -1, -np.inf, 1, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = [-inf, 1] and Dy = Dz = [-inf, -1].
+            (-np.inf, 1, -np.inf, -1, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dy = [-inf, 1] and Dz = [-inf, -1].
+            (-np.inf, 1, -np.inf, 1, -np.inf, -1,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dz = [-inf, 1] and Dy = [-inf, -1].
+            (-np.inf, 1, -np.inf, -1, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, 1] for each n (one at a time).
+            (-np.inf, 1, -np.inf, 0, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            (-np.inf, 0, -np.inf, 1, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            (-np.inf, 0, -np.inf, 0, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, 1] for each n (two at a time).
+            (-np.inf, 1, -np.inf, 1, -np.inf, 0,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            (-np.inf, 1, -np.inf, 0, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            (-np.inf, 0, -np.inf, 1, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, 1] for all n.
+            (-np.inf, 1, -np.inf, 1, -np.inf, 1,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 3)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [0, inf] for all n.
+            (0, np.inf, 0, np.inf, 0, np.inf, (np.pi ** (3 / 2)) / 8),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [1, inf] for each n (one at a time).
+            (1, np.inf, 0, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            (0, np.inf, 1, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            (0, np.inf, 0, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * erfc(1)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [1, inf] for each n (two at a time).
+            (1, np.inf, 1, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            (1, np.inf, 0, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            (0, np.inf, 1, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 2)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [1, inf] for all n.
+            (1, np.inf, 1, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erfc(1) ** 3)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-1, inf] for each n (one at a time).
+            (-1, np.inf, 0, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            (0, np.inf, -1, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            (0, np.inf, 0, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (erf(1) + 1)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-1, inf] for each n (two at a time).
+            (-1, np.inf, -1, np.inf, 0, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            (-1, np.inf, 0, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            (0, np.inf, -1, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 2)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-1, inf] for all n.
+            (-1, np.inf, -1, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) ** 3)),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = [1, inf] and Dy = Dz = [-1, inf].
+            (1, np.inf, -1, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dy = [1, inf] and Dz = [-1, inf].
+            (1, np.inf, 1, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dz = [1, inf] and Dy = [-1, inf].
+            (1, np.inf, -1, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = [-1, inf] and Dy = Dz = [1, inf].
+            (-1, np.inf, 1, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * ((erf(1) + 1) * (erfc(1) ** 2))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dy = [-1, inf] and Dz = [1, inf].
+            (-1, np.inf, -1, np.inf, 1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain Dx = Dz = [-1, inf] and Dy = [1, inf].
+            (-1, np.inf, 1, np.inf, -1, np.inf,
+             (np.pi ** (3 / 2)) / 8 * (((erf(1) + 1) ** 2) * erfc(1))),
+            # Multiple integration of a function in n = 3 variables: f(x, y, z)
+            # over domain D = [-inf, inf] for all n.
+            (-np.inf, np.inf, -np.inf, np.inf, -np.inf, np.inf,
+             np.pi ** (3 / 2)),
+        ],
+    )
+    def test_triple_integral_improper(
+            self,
+            x_lower,
+            x_upper,
+            y_lower,
+            y_upper,
+            z_lower,
+            z_upper,
+            expected
+    ):
+        # The Gaussian Integral.
+        def f(x, y, z):
+            return np.exp(-x ** 2 - y ** 2 - z ** 2)
+
+        assert_quad(
+            tplquad(f, x_lower, x_upper, y_lower, y_upper, z_lower, z_upper),
+            expected,
+            error_tolerance=6e-8
+        )
+
+    def test_complex(self):
+        def tfunc(x):
+            return np.exp(1j*x)
+
+        assert np.allclose(
+                    quad(tfunc, 0, np.pi/2, complex_func=True)[0],
+                    1+1j)
+
+        # We consider a divergent case in order to force quadpack
+        # to return an error message.  The output is compared
+        # against what is returned by explicit integration
+        # of the parts.
+        kwargs = {'a': 0, 'b': np.inf, 'full_output': True,
+                  'weight': 'cos', 'wvar': 1}
+        res_c = quad(tfunc, complex_func=True, **kwargs)
+        res_r = quad(lambda x: np.real(np.exp(1j*x)),
+                     complex_func=False,
+                     **kwargs)
+        res_i = quad(lambda x: np.imag(np.exp(1j*x)),
+                     complex_func=False,
+                     **kwargs)
+
+        np.testing.assert_equal(res_c[0], res_r[0] + 1j*res_i[0])
+        np.testing.assert_equal(res_c[1], res_r[1] + 1j*res_i[1])
+
+        assert len(res_c[2]['real']) == len(res_r[2:]) == 3
+        assert res_c[2]['real'][2] == res_r[4]
+        assert res_c[2]['real'][1] == res_r[3]
+        assert res_c[2]['real'][0]['lst'] == res_r[2]['lst']
+
+        assert len(res_c[2]['imag']) == len(res_i[2:]) == 1
+        assert res_c[2]['imag'][0]['lst'] == res_i[2]['lst']
+
+
+class TestNQuad:
+    @pytest.mark.fail_slow(5)
+    def test_fixed_limits(self):
+        def func1(x0, x1, x2, x3):
+            val = (x0**2 + x1*x2 - x3**3 + np.sin(x0) +
+                   (1 if (x0 - 0.2*x3 - 0.5 - 0.25*x1 > 0) else 0))
+            return val
+
+        def opts_basic(*args):
+            return {'points': [0.2*args[2] + 0.5 + 0.25*args[0]]}
+
+        res = nquad(func1, [[0, 1], [-1, 1], [.13, .8], [-.15, 1]],
+                    opts=[opts_basic, {}, {}, {}], full_output=True)
+        assert_quad(res[:-1], 1.5267454070738635)
+        assert_(res[-1]['neval'] > 0 and res[-1]['neval'] < 4e5)
+
+    @pytest.mark.fail_slow(5)
+    def test_variable_limits(self):
+        scale = .1
+
+        def func2(x0, x1, x2, x3, t0, t1):
+            val = (x0*x1*x3**2 + np.sin(x2) + 1 +
+                   (1 if x0 + t1*x1 - t0 > 0 else 0))
+            return val
+
+        def lim0(x1, x2, x3, t0, t1):
+            return [scale * (x1**2 + x2 + np.cos(x3)*t0*t1 + 1) - 1,
+                    scale * (x1**2 + x2 + np.cos(x3)*t0*t1 + 1) + 1]
+
+        def lim1(x2, x3, t0, t1):
+            return [scale * (t0*x2 + t1*x3) - 1,
+                    scale * (t0*x2 + t1*x3) + 1]
+
+        def lim2(x3, t0, t1):
+            return [scale * (x3 + t0**2*t1**3) - 1,
+                    scale * (x3 + t0**2*t1**3) + 1]
+
+        def lim3(t0, t1):
+            return [scale * (t0 + t1) - 1, scale * (t0 + t1) + 1]
+
+        def opts0(x1, x2, x3, t0, t1):
+            return {'points': [t0 - t1*x1]}
+
+        def opts1(x2, x3, t0, t1):
+            return {}
+
+        def opts2(x3, t0, t1):
+            return {}
+
+        def opts3(t0, t1):
+            return {}
+
+        res = nquad(func2, [lim0, lim1, lim2, lim3], args=(0, 0),
+                    opts=[opts0, opts1, opts2, opts3])
+        assert_quad(res, 25.066666666666663)
+
+    def test_square_separate_ranges_and_opts(self):
+        def f(y, x):
+            return 1.0
+
+        assert_quad(nquad(f, [[-1, 1], [-1, 1]], opts=[{}, {}]), 4.0)
+
+    def test_square_aliased_ranges_and_opts(self):
+        def f(y, x):
+            return 1.0
+
+        r = [-1, 1]
+        opt = {}
+        assert_quad(nquad(f, [r, r], opts=[opt, opt]), 4.0)
+
+    def test_square_separate_fn_ranges_and_opts(self):
+        def f(y, x):
+            return 1.0
+
+        def fn_range0(*args):
+            return (-1, 1)
+
+        def fn_range1(*args):
+            return (-1, 1)
+
+        def fn_opt0(*args):
+            return {}
+
+        def fn_opt1(*args):
+            return {}
+
+        ranges = [fn_range0, fn_range1]
+        opts = [fn_opt0, fn_opt1]
+        assert_quad(nquad(f, ranges, opts=opts), 4.0)
+
+    def test_square_aliased_fn_ranges_and_opts(self):
+        def f(y, x):
+            return 1.0
+
+        def fn_range(*args):
+            return (-1, 1)
+
+        def fn_opt(*args):
+            return {}
+
+        ranges = [fn_range, fn_range]
+        opts = [fn_opt, fn_opt]
+        assert_quad(nquad(f, ranges, opts=opts), 4.0)
+
+    def test_matching_quad(self):
+        def func(x):
+            return x**2 + 1
+
+        res, reserr = quad(func, 0, 4)
+        res2, reserr2 = nquad(func, ranges=[[0, 4]])
+        assert_almost_equal(res, res2)
+        assert_almost_equal(reserr, reserr2)
+
+    def test_matching_dblquad(self):
+        def func2d(x0, x1):
+            return x0**2 + x1**3 - x0 * x1 + 1
+
+        res, reserr = dblquad(func2d, -2, 2, lambda x: -3, lambda x: 3)
+        res2, reserr2 = nquad(func2d, [[-3, 3], (-2, 2)])
+        assert_almost_equal(res, res2)
+        assert_almost_equal(reserr, reserr2)
+
+    def test_matching_tplquad(self):
+        def func3d(x0, x1, x2, c0, c1):
+            return x0**2 + c0 * x1**3 - x0 * x1 + 1 + c1 * np.sin(x2)
+
+        res = tplquad(func3d, -1, 2, lambda x: -2, lambda x: 2,
+                      lambda x, y: -np.pi, lambda x, y: np.pi,
+                      args=(2, 3))
+        res2 = nquad(func3d, [[-np.pi, np.pi], [-2, 2], (-1, 2)], args=(2, 3))
+        assert_almost_equal(res, res2)
+
+    def test_dict_as_opts(self):
+        try:
+            nquad(lambda x, y: x * y, [[0, 1], [0, 1]], opts={'epsrel': 0.0001})
+        except TypeError:
+            assert False
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadrature.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadrature.py
new file mode 100644
index 0000000000000000000000000000000000000000..0198b53093a79c15d2fd644956cb0d2862ca92a2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_quadrature.py
@@ -0,0 +1,732 @@
+# mypy: disable-error-code="attr-defined"
+import pytest
+import numpy as np
+from numpy.testing import assert_equal, assert_almost_equal, assert_allclose
+from hypothesis import given
+import hypothesis.strategies as st
+import hypothesis.extra.numpy as hyp_num
+
+from scipy.integrate import (romb, newton_cotes,
+                             cumulative_trapezoid, trapezoid,
+                             quad, simpson, fixed_quad,
+                             qmc_quad, cumulative_simpson)
+from scipy.integrate._quadrature import _cumulative_simpson_unequal_intervals
+
+from scipy import stats, special, integrate
+from scipy.conftest import array_api_compatible, skip_xp_invalid_arg
+from scipy._lib._array_api_no_0d import xp_assert_close
+
+skip_xp_backends = pytest.mark.skip_xp_backends
+
+
+class TestFixedQuad:
+    def test_scalar(self):
+        n = 4
+        expected = 1/(2*n)
+        got, _ = fixed_quad(lambda x: x**(2*n - 1), 0, 1, n=n)
+        # quadrature exact for this input
+        assert_allclose(got, expected, rtol=1e-12)
+
+    def test_vector(self):
+        n = 4
+        p = np.arange(1, 2*n)
+        expected = 1/(p + 1)
+        got, _ = fixed_quad(lambda x: x**p[:, None], 0, 1, n=n)
+        assert_allclose(got, expected, rtol=1e-12)
+
+
+class TestQuadrature:
+    def quad(self, x, a, b, args):
+        raise NotImplementedError
+
+    def test_romb(self):
+        assert_equal(romb(np.arange(17)), 128)
+
+    def test_romb_gh_3731(self):
+        # Check that romb makes maximal use of data points
+        x = np.arange(2**4+1)
+        y = np.cos(0.2*x)
+        val = romb(y)
+        val2, err = quad(lambda x: np.cos(0.2*x), x.min(), x.max())
+        assert_allclose(val, val2, rtol=1e-8, atol=0)
+
+    def test_newton_cotes(self):
+        """Test the first few degrees, for evenly spaced points."""
+        n = 1
+        wts, errcoff = newton_cotes(n, 1)
+        assert_equal(wts, n*np.array([0.5, 0.5]))
+        assert_almost_equal(errcoff, -n**3/12.0)
+
+        n = 2
+        wts, errcoff = newton_cotes(n, 1)
+        assert_almost_equal(wts, n*np.array([1.0, 4.0, 1.0])/6.0)
+        assert_almost_equal(errcoff, -n**5/2880.0)
+
+        n = 3
+        wts, errcoff = newton_cotes(n, 1)
+        assert_almost_equal(wts, n*np.array([1.0, 3.0, 3.0, 1.0])/8.0)
+        assert_almost_equal(errcoff, -n**5/6480.0)
+
+        n = 4
+        wts, errcoff = newton_cotes(n, 1)
+        assert_almost_equal(wts, n*np.array([7.0, 32.0, 12.0, 32.0, 7.0])/90.0)
+        assert_almost_equal(errcoff, -n**7/1935360.0)
+
+    def test_newton_cotes2(self):
+        """Test newton_cotes with points that are not evenly spaced."""
+
+        x = np.array([0.0, 1.5, 2.0])
+        y = x**2
+        wts, errcoff = newton_cotes(x)
+        exact_integral = 8.0/3
+        numeric_integral = np.dot(wts, y)
+        assert_almost_equal(numeric_integral, exact_integral)
+
+        x = np.array([0.0, 1.4, 2.1, 3.0])
+        y = x**2
+        wts, errcoff = newton_cotes(x)
+        exact_integral = 9.0
+        numeric_integral = np.dot(wts, y)
+        assert_almost_equal(numeric_integral, exact_integral)
+
+    def test_simpson(self):
+        y = np.arange(17)
+        assert_equal(simpson(y), 128)
+        assert_equal(simpson(y, dx=0.5), 64)
+        assert_equal(simpson(y, x=np.linspace(0, 4, 17)), 32)
+
+        # integral should be exactly 21
+        x = np.linspace(1, 4, 4)
+        def f(x):
+            return x**2
+
+        assert_allclose(simpson(f(x), x=x), 21.0)
+
+        # integral should be exactly 114
+        x = np.linspace(1, 7, 4)
+        assert_allclose(simpson(f(x), dx=2.0), 114)
+
+        # test multi-axis behaviour
+        a = np.arange(16).reshape(4, 4)
+        x = np.arange(64.).reshape(4, 4, 4)
+        y = f(x)
+        for i in range(3):
+            r = simpson(y, x=x, axis=i)
+            it = np.nditer(a, flags=['multi_index'])
+            for _ in it:
+                idx = list(it.multi_index)
+                idx.insert(i, slice(None))
+                integral = x[tuple(idx)][-1]**3 / 3 - x[tuple(idx)][0]**3 / 3
+                assert_allclose(r[it.multi_index], integral)
+
+        # test when integration axis only has two points
+        x = np.arange(16).reshape(8, 2)
+        y = f(x)
+        r = simpson(y, x=x, axis=-1)
+
+        integral = 0.5 * (y[:, 1] + y[:, 0]) * (x[:, 1] - x[:, 0])
+        assert_allclose(r, integral)
+
+        # odd points, test multi-axis behaviour
+        a = np.arange(25).reshape(5, 5)
+        x = np.arange(125).reshape(5, 5, 5)
+        y = f(x)
+        for i in range(3):
+            r = simpson(y, x=x, axis=i)
+            it = np.nditer(a, flags=['multi_index'])
+            for _ in it:
+                idx = list(it.multi_index)
+                idx.insert(i, slice(None))
+                integral = x[tuple(idx)][-1]**3 / 3 - x[tuple(idx)][0]**3 / 3
+                assert_allclose(r[it.multi_index], integral)
+
+        # Tests for checking base case
+        x = np.array([3])
+        y = np.power(x, 2)
+        assert_allclose(simpson(y, x=x, axis=0), 0.0)
+        assert_allclose(simpson(y, x=x, axis=-1), 0.0)
+
+        x = np.array([3, 3, 3, 3])
+        y = np.power(x, 2)
+        assert_allclose(simpson(y, x=x, axis=0), 0.0)
+        assert_allclose(simpson(y, x=x, axis=-1), 0.0)
+
+        x = np.array([[1, 2, 4, 8], [1, 2, 4, 8], [1, 2, 4, 8]])
+        y = np.power(x, 2)
+        zero_axis = [0.0, 0.0, 0.0, 0.0]
+        default_axis = [170 + 1/3] * 3   # 8**3 / 3 - 1/3
+        assert_allclose(simpson(y, x=x, axis=0), zero_axis)
+        # the following should be exact
+        assert_allclose(simpson(y, x=x, axis=-1), default_axis)
+
+        x = np.array([[1, 2, 4, 8], [1, 2, 4, 8], [1, 8, 16, 32]])
+        y = np.power(x, 2)
+        zero_axis = [0.0, 136.0, 1088.0, 8704.0]
+        default_axis = [170 + 1/3, 170 + 1/3, 32**3 / 3 - 1/3]
+        assert_allclose(simpson(y, x=x, axis=0), zero_axis)
+        assert_allclose(simpson(y, x=x, axis=-1), default_axis)
+
+
+    @pytest.mark.parametrize('droplast', [False, True])
+    def test_simpson_2d_integer_no_x(self, droplast):
+        # The inputs are 2d integer arrays.  The results should be
+        # identical to the results when the inputs are floating point.
+        y = np.array([[2, 2, 4, 4, 8, 8, -4, 5],
+                      [4, 4, 2, -4, 10, 22, -2, 10]])
+        if droplast:
+            y = y[:, :-1]
+        result = simpson(y, axis=-1)
+        expected = simpson(np.array(y, dtype=np.float64), axis=-1)
+        assert_equal(result, expected)
+
+
+class TestCumulative_trapezoid:
+    def test_1d(self):
+        x = np.linspace(-2, 2, num=5)
+        y = x
+        y_int = cumulative_trapezoid(y, x, initial=0)
+        y_expected = [0., -1.5, -2., -1.5, 0.]
+        assert_allclose(y_int, y_expected)
+
+        y_int = cumulative_trapezoid(y, x, initial=None)
+        assert_allclose(y_int, y_expected[1:])
+
+    def test_y_nd_x_nd(self):
+        x = np.arange(3 * 2 * 4).reshape(3, 2, 4)
+        y = x
+        y_int = cumulative_trapezoid(y, x, initial=0)
+        y_expected = np.array([[[0., 0.5, 2., 4.5],
+                                [0., 4.5, 10., 16.5]],
+                               [[0., 8.5, 18., 28.5],
+                                [0., 12.5, 26., 40.5]],
+                               [[0., 16.5, 34., 52.5],
+                                [0., 20.5, 42., 64.5]]])
+
+        assert_allclose(y_int, y_expected)
+
+        # Try with all axes
+        shapes = [(2, 2, 4), (3, 1, 4), (3, 2, 3)]
+        for axis, shape in zip([0, 1, 2], shapes):
+            y_int = cumulative_trapezoid(y, x, initial=0, axis=axis)
+            assert_equal(y_int.shape, (3, 2, 4))
+            y_int = cumulative_trapezoid(y, x, initial=None, axis=axis)
+            assert_equal(y_int.shape, shape)
+
+    def test_y_nd_x_1d(self):
+        y = np.arange(3 * 2 * 4).reshape(3, 2, 4)
+        x = np.arange(4)**2
+        # Try with all axes
+        ys_expected = (
+            np.array([[[4., 5., 6., 7.],
+                       [8., 9., 10., 11.]],
+                      [[40., 44., 48., 52.],
+                       [56., 60., 64., 68.]]]),
+            np.array([[[2., 3., 4., 5.]],
+                      [[10., 11., 12., 13.]],
+                      [[18., 19., 20., 21.]]]),
+            np.array([[[0.5, 5., 17.5],
+                       [4.5, 21., 53.5]],
+                      [[8.5, 37., 89.5],
+                       [12.5, 53., 125.5]],
+                      [[16.5, 69., 161.5],
+                       [20.5, 85., 197.5]]]))
+
+        for axis, y_expected in zip([0, 1, 2], ys_expected):
+            y_int = cumulative_trapezoid(y, x=x[:y.shape[axis]], axis=axis,
+                                         initial=None)
+            assert_allclose(y_int, y_expected)
+
+    def test_x_none(self):
+        y = np.linspace(-2, 2, num=5)
+
+        y_int = cumulative_trapezoid(y)
+        y_expected = [-1.5, -2., -1.5, 0.]
+        assert_allclose(y_int, y_expected)
+
+        y_int = cumulative_trapezoid(y, initial=0)
+        y_expected = [0, -1.5, -2., -1.5, 0.]
+        assert_allclose(y_int, y_expected)
+
+        y_int = cumulative_trapezoid(y, dx=3)
+        y_expected = [-4.5, -6., -4.5, 0.]
+        assert_allclose(y_int, y_expected)
+
+        y_int = cumulative_trapezoid(y, dx=3, initial=0)
+        y_expected = [0, -4.5, -6., -4.5, 0.]
+        assert_allclose(y_int, y_expected)
+
+    @pytest.mark.parametrize(
+        "initial", [1, 0.5]
+    )
+    def test_initial_error(self, initial):
+        """If initial is not None or 0, a ValueError is raised."""
+        y = np.linspace(0, 10, num=10)
+        with pytest.raises(ValueError, match="`initial`"):
+            cumulative_trapezoid(y, initial=initial)
+
+    def test_zero_len_y(self):
+        with pytest.raises(ValueError, match="At least one point is required"):
+            cumulative_trapezoid(y=[])
+
+
+@array_api_compatible
+class TestTrapezoid:
+    def test_simple(self, xp):
+        x = xp.arange(-10, 10, .1)
+        r = trapezoid(xp.exp(-.5 * x ** 2) / xp.sqrt(2 * xp.asarray(xp.pi)), dx=0.1)
+        # check integral of normal equals 1
+        xp_assert_close(r, xp.asarray(1.0))
+
+    @skip_xp_backends('jax.numpy',
+                      reasons=["JAX arrays do not support item assignment"])
+    @pytest.mark.usefixtures("skip_xp_backends")
+    def test_ndim(self, xp):
+        x = xp.linspace(0, 1, 3)
+        y = xp.linspace(0, 2, 8)
+        z = xp.linspace(0, 3, 13)
+
+        wx = xp.ones_like(x) * (x[1] - x[0])
+        wx[0] /= 2
+        wx[-1] /= 2
+        wy = xp.ones_like(y) * (y[1] - y[0])
+        wy[0] /= 2
+        wy[-1] /= 2
+        wz = xp.ones_like(z) * (z[1] - z[0])
+        wz[0] /= 2
+        wz[-1] /= 2
+
+        q = x[:, None, None] + y[None,:, None] + z[None, None,:]
+
+        qx = xp.sum(q * wx[:, None, None], axis=0)
+        qy = xp.sum(q * wy[None, :, None], axis=1)
+        qz = xp.sum(q * wz[None, None, :], axis=2)
+
+        # n-d `x`
+        r = trapezoid(q, x=x[:, None, None], axis=0)
+        xp_assert_close(r, qx)
+        r = trapezoid(q, x=y[None,:, None], axis=1)
+        xp_assert_close(r, qy)
+        r = trapezoid(q, x=z[None, None,:], axis=2)
+        xp_assert_close(r, qz)
+
+        # 1-d `x`
+        r = trapezoid(q, x=x, axis=0)
+        xp_assert_close(r, qx)
+        r = trapezoid(q, x=y, axis=1)
+        xp_assert_close(r, qy)
+        r = trapezoid(q, x=z, axis=2)
+        xp_assert_close(r, qz)
+
+    @skip_xp_backends('jax.numpy',
+                      reasons=["JAX arrays do not support item assignment"])
+    @pytest.mark.usefixtures("skip_xp_backends")
+    def test_gh21908(self, xp):
+        # extended testing for n-dim arrays
+        x = xp.reshape(xp.linspace(0, 29, 30), (3, 10))
+        y = xp.reshape(xp.linspace(0, 29, 30), (3, 10))
+
+        out0 = xp.linspace(200, 380, 10)
+        xp_assert_close(trapezoid(y, x=x, axis=0), out0)
+        xp_assert_close(trapezoid(y, x=xp.asarray([0, 10., 20.]), axis=0), out0)
+        # x needs to be broadcastable against y
+        xp_assert_close(
+            trapezoid(y, x=xp.asarray([0, 10., 20.])[:, None], axis=0),
+            out0
+        )
+        with pytest.raises(Exception):
+            # x is not broadcastable against y
+            trapezoid(y, x=xp.asarray([0, 10., 20.])[None, :], axis=0)
+
+        out1 = xp.asarray([ 40.5, 130.5, 220.5])
+        xp_assert_close(trapezoid(y, x=x, axis=1), out1)
+        xp_assert_close(
+            trapezoid(y, x=xp.linspace(0, 9, 10), axis=1),
+            out1
+        )
+
+    @skip_xp_invalid_arg
+    def test_masked(self, xp):
+        # Testing that masked arrays behave as if the function is 0 where
+        # masked
+        x = np.arange(5)
+        y = x * x
+        mask = x == 2
+        ym = np.ma.array(y, mask=mask)
+        r = 13.0  # sum(0.5 * (0 + 1) * 1.0 + 0.5 * (9 + 16))
+        assert_allclose(trapezoid(ym, x), r)
+
+        xm = np.ma.array(x, mask=mask)
+        assert_allclose(trapezoid(ym, xm), r)
+
+        xm = np.ma.array(x, mask=mask)
+        assert_allclose(trapezoid(y, xm), r)
+
+    @skip_xp_backends(np_only=True,
+                      reasons=['array-likes only supported for NumPy backend'])
+    @pytest.mark.usefixtures("skip_xp_backends")
+    def test_array_like(self, xp):
+        x = list(range(5))
+        y = [t * t for t in x]
+        xarr = xp.asarray(x, dtype=xp.float64)
+        yarr = xp.asarray(y, dtype=xp.float64)
+        res = trapezoid(y, x)
+        resarr = trapezoid(yarr, xarr)
+        xp_assert_close(res, resarr)
+
+
+class TestQMCQuad:
+    @pytest.mark.thread_unsafe
+    def test_input_validation(self):
+        message = "`func` must be callable."
+        with pytest.raises(TypeError, match=message):
+            qmc_quad("a duck", [0, 0], [1, 1])
+
+        message = "`func` must evaluate the integrand at points..."
+        with pytest.raises(ValueError, match=message):
+            qmc_quad(lambda: 1, [0, 0], [1, 1])
+
+        def func(x):
+            assert x.ndim == 1
+            return np.sum(x)
+        message = "Exception encountered when attempting vectorized call..."
+        with pytest.warns(UserWarning, match=message):
+            qmc_quad(func, [0, 0], [1, 1])
+
+        message = "`n_points` must be an integer."
+        with pytest.raises(TypeError, match=message):
+            qmc_quad(lambda x: 1, [0, 0], [1, 1], n_points=1024.5)
+
+        message = "`n_estimates` must be an integer."
+        with pytest.raises(TypeError, match=message):
+            qmc_quad(lambda x: 1, [0, 0], [1, 1], n_estimates=8.5)
+
+        message = "`qrng` must be an instance of scipy.stats.qmc.QMCEngine."
+        with pytest.raises(TypeError, match=message):
+            qmc_quad(lambda x: 1, [0, 0], [1, 1], qrng="a duck")
+
+        message = "`qrng` must be initialized with dimensionality equal to "
+        with pytest.raises(ValueError, match=message):
+            qmc_quad(lambda x: 1, [0, 0], [1, 1], qrng=stats.qmc.Sobol(1))
+
+        message = r"`log` must be boolean \(`True` or `False`\)."
+        with pytest.raises(TypeError, match=message):
+            qmc_quad(lambda x: 1, [0, 0], [1, 1], log=10)
+
+    def basic_test(self, n_points=2**8, n_estimates=8, signs=None):
+        if signs is None:
+            signs = np.ones(2)
+        ndim = 2
+        mean = np.zeros(ndim)
+        cov = np.eye(ndim)
+
+        def func(x):
+            return stats.multivariate_normal.pdf(x.T, mean, cov)
+
+        rng = np.random.default_rng(2879434385674690281)
+        qrng = stats.qmc.Sobol(ndim, seed=rng)
+        a = np.zeros(ndim)
+        b = np.ones(ndim) * signs
+        res = qmc_quad(func, a, b, n_points=n_points,
+                       n_estimates=n_estimates, qrng=qrng)
+        ref = stats.multivariate_normal.cdf(b, mean, cov, lower_limit=a)
+        atol = special.stdtrit(n_estimates-1, 0.995) * res.standard_error  # 99% CI
+        assert_allclose(res.integral, ref, atol=atol)
+        assert np.prod(signs)*res.integral > 0
+
+        rng = np.random.default_rng(2879434385674690281)
+        qrng = stats.qmc.Sobol(ndim, seed=rng)
+        logres = qmc_quad(lambda *args: np.log(func(*args)), a, b,
+                          n_points=n_points, n_estimates=n_estimates,
+                          log=True, qrng=qrng)
+        assert_allclose(np.exp(logres.integral), res.integral, rtol=1e-14)
+        assert np.imag(logres.integral) == (np.pi if np.prod(signs) < 0 else 0)
+        assert_allclose(np.exp(logres.standard_error),
+                        res.standard_error, rtol=1e-14, atol=1e-16)
+
+    @pytest.mark.parametrize("n_points", [2**8, 2**12])
+    @pytest.mark.parametrize("n_estimates", [8, 16])
+    def test_basic(self, n_points, n_estimates):
+        self.basic_test(n_points, n_estimates)
+
+    @pytest.mark.parametrize("signs", [[1, 1], [-1, -1], [-1, 1], [1, -1]])
+    def test_sign(self, signs):
+        self.basic_test(signs=signs)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("log", [False, True])
+    def test_zero(self, log):
+        message = "A lower limit was equal to an upper limit, so"
+        with pytest.warns(UserWarning, match=message):
+            res = qmc_quad(lambda x: 1, [0, 0], [0, 1], log=log)
+        assert res.integral == (-np.inf if log else 0)
+        assert res.standard_error == 0
+
+    def test_flexible_input(self):
+        # check that qrng is not required
+        # also checks that for 1d problems, a and b can be scalars
+        def func(x):
+            return stats.norm.pdf(x, scale=2)
+
+        res = qmc_quad(func, 0, 1)
+        ref = stats.norm.cdf(1, scale=2) - stats.norm.cdf(0, scale=2)
+        assert_allclose(res.integral, ref, 1e-2)
+
+
+def cumulative_simpson_nd_reference(y, *, x=None, dx=None, initial=None, axis=-1):
+    # Use cumulative_trapezoid if length of y < 3
+    if y.shape[axis] < 3:
+        if initial is None:
+            return cumulative_trapezoid(y, x=x, dx=dx, axis=axis, initial=None)
+        else:
+            return initial + cumulative_trapezoid(y, x=x, dx=dx, axis=axis, initial=0)
+
+    # Ensure that working axis is last axis
+    y = np.moveaxis(y, axis, -1)
+    x = np.moveaxis(x, axis, -1) if np.ndim(x) > 1 else x
+    dx = np.moveaxis(dx, axis, -1) if np.ndim(dx) > 1 else dx
+    initial = np.moveaxis(initial, axis, -1) if np.ndim(initial) > 1 else initial
+
+    # If `x` is not present, create it from `dx`
+    n = y.shape[-1]
+    x = dx * np.arange(n) if dx is not None else x
+    # Similarly, if `initial` is not present, set it to 0
+    initial_was_none = initial is None
+    initial = 0 if initial_was_none else initial
+
+    # `np.apply_along_axis` accepts only one array, so concatenate arguments
+    x = np.broadcast_to(x, y.shape)
+    initial = np.broadcast_to(initial, y.shape[:-1] + (1,))
+    z = np.concatenate((y, x, initial), axis=-1)
+
+    # Use `np.apply_along_axis` to compute result
+    def f(z):
+        return cumulative_simpson(z[:n], x=z[n:2*n], initial=z[2*n:])
+    res = np.apply_along_axis(f, -1, z)
+
+    # Remove `initial` and undo axis move as needed
+    res = res[..., 1:] if initial_was_none else res
+    res = np.moveaxis(res, -1, axis)
+    return res
+
+
+class TestCumulativeSimpson:
+    x0 = np.arange(4)
+    y0 = x0**2
+
+    @pytest.mark.parametrize('use_dx', (False, True))
+    @pytest.mark.parametrize('use_initial', (False, True))
+    def test_1d(self, use_dx, use_initial):
+        # Test for exact agreement with polynomial of highest
+        # possible order (3 if `dx` is constant, 2 otherwise).
+        rng = np.random.default_rng(82456839535679456794)
+        n = 10
+
+        # Generate random polynomials and ground truth
+        # integral of appropriate order
+        order = 3 if use_dx else 2
+        dx = rng.random()
+        x = (np.sort(rng.random(n)) if order == 2
+             else np.arange(n)*dx + rng.random())
+        i = np.arange(order + 1)[:, np.newaxis]
+        c = rng.random(order + 1)[:, np.newaxis]
+        y = np.sum(c*x**i, axis=0)
+        Y = np.sum(c*x**(i + 1)/(i + 1), axis=0)
+        ref = Y if use_initial else (Y-Y[0])[1:]
+
+        # Integrate with `cumulative_simpson`
+        initial = Y[0] if use_initial else None
+        kwarg = {'dx': dx} if use_dx else {'x': x}
+        res = cumulative_simpson(y, **kwarg, initial=initial)
+
+        # Compare result against reference
+        if not use_dx:
+            assert_allclose(res, ref, rtol=2e-15)
+        else:
+            i0 = 0 if use_initial else 1
+            # all terms are "close"
+            assert_allclose(res, ref, rtol=0.0025)
+            # only even-interval terms are "exact"
+            assert_allclose(res[i0::2], ref[i0::2], rtol=2e-15)
+
+    @pytest.mark.parametrize('axis', np.arange(-3, 3))
+    @pytest.mark.parametrize('x_ndim', (1, 3))
+    @pytest.mark.parametrize('x_len', (1, 2, 7))
+    @pytest.mark.parametrize('i_ndim', (None, 0, 3,))
+    @pytest.mark.parametrize('dx', (None, True))
+    def test_nd(self, axis, x_ndim, x_len, i_ndim, dx):
+        # Test behavior of `cumulative_simpson` with N-D `y`
+        rng = np.random.default_rng(82456839535679456794)
+
+        # determine shapes
+        shape = [5, 6, x_len]
+        shape[axis], shape[-1] = shape[-1], shape[axis]
+        shape_len_1 = shape.copy()
+        shape_len_1[axis] = 1
+        i_shape = shape_len_1 if i_ndim == 3 else ()
+
+        # initialize arguments
+        y = rng.random(size=shape)
+        x, dx = None, None
+        if dx:
+            dx = rng.random(size=shape_len_1) if x_ndim > 1 else rng.random()
+        else:
+            x = (np.sort(rng.random(size=shape), axis=axis) if x_ndim > 1
+                 else np.sort(rng.random(size=shape[axis])))
+        initial = None if i_ndim is None else rng.random(size=i_shape)
+
+        # compare results
+        res = cumulative_simpson(y, x=x, dx=dx, initial=initial, axis=axis)
+        ref = cumulative_simpson_nd_reference(y, x=x, dx=dx, initial=initial, axis=axis)
+        np.testing.assert_allclose(res, ref, rtol=1e-15)
+
+    @pytest.mark.parametrize(('message', 'kwarg_update'), [
+        ("x must be strictly increasing", dict(x=[2, 2, 3, 4])),
+        ("x must be strictly increasing", dict(x=[x0, [2, 2, 4, 8]], y=[y0, y0])),
+        ("x must be strictly increasing", dict(x=[x0, x0, x0], y=[y0, y0, y0], axis=0)),
+        ("At least one point is required", dict(x=[], y=[])),
+        ("`axis=4` is not valid for `y` with `y.ndim=1`", dict(axis=4)),
+        ("shape of `x` must be the same as `y` or 1-D", dict(x=np.arange(5))),
+        ("`initial` must either be a scalar or...", dict(initial=np.arange(5))),
+        ("`dx` must either be a scalar or...", dict(x=None, dx=np.arange(5))),
+    ])
+    def test_simpson_exceptions(self, message, kwarg_update):
+        kwargs0 = dict(y=self.y0, x=self.x0, dx=None, initial=None, axis=-1)
+        with pytest.raises(ValueError, match=message):
+            cumulative_simpson(**dict(kwargs0, **kwarg_update))
+
+    def test_special_cases(self):
+        # Test special cases not checked elsewhere
+        rng = np.random.default_rng(82456839535679456794)
+        y = rng.random(size=10)
+        res = cumulative_simpson(y, dx=0)
+        assert_equal(res, 0)
+
+        # Should add tests of:
+        # - all elements of `x` identical
+        # These should work as they do for `simpson`
+
+    def _get_theoretical_diff_between_simps_and_cum_simps(self, y, x):
+        """`cumulative_simpson` and `simpson` can be tested against other to verify
+        they give consistent results. `simpson` will iteratively be called with
+        successively higher upper limits of integration. This function calculates
+        the theoretical correction required to `simpson` at even intervals to match
+        with `cumulative_simpson`.
+        """
+        d = np.diff(x, axis=-1)
+        sub_integrals_h1 = _cumulative_simpson_unequal_intervals(y, d)
+        sub_integrals_h2 = _cumulative_simpson_unequal_intervals(
+            y[..., ::-1], d[..., ::-1]
+        )[..., ::-1]
+
+        # Concatenate to build difference array
+        zeros_shape = (*y.shape[:-1], 1)
+        theoretical_difference = np.concatenate(
+            [
+                np.zeros(zeros_shape),
+                (sub_integrals_h1[..., 1:] - sub_integrals_h2[..., :-1]),
+                np.zeros(zeros_shape),
+            ],
+            axis=-1,
+        )
+        # Differences only expected at even intervals. Odd intervals will
+        # match exactly so there is no correction
+        theoretical_difference[..., 1::2] = 0.0
+        # Note: the first interval will not match from this correction as
+        # `simpson` uses the trapezoidal rule
+        return theoretical_difference
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.slow
+    @given(
+        y=hyp_num.arrays(
+            np.float64,
+            hyp_num.array_shapes(max_dims=4, min_side=3, max_side=10),
+            elements=st.floats(-10, 10, allow_nan=False).filter(lambda x: abs(x) > 1e-7)
+        )
+    )
+    def test_cumulative_simpson_against_simpson_with_default_dx(
+        self, y
+    ):
+        """Theoretically, the output of `cumulative_simpson` will be identical
+        to `simpson` at all even indices and in the last index. The first index
+        will not match as `simpson` uses the trapezoidal rule when there are only two
+        data points. Odd indices after the first index are shown to match with
+        a mathematically-derived correction."""
+        def simpson_reference(y):
+            return np.stack(
+                [simpson(y[..., :i], dx=1.0) for i in range(2, y.shape[-1]+1)], axis=-1,
+            )
+
+        res = cumulative_simpson(y, dx=1.0)
+        ref = simpson_reference(y)
+        theoretical_difference = self._get_theoretical_diff_between_simps_and_cum_simps(
+            y, x=np.arange(y.shape[-1])
+        )
+        np.testing.assert_allclose(
+            res[..., 1:], ref[..., 1:] + theoretical_difference[..., 1:], atol=1e-16
+        )
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.slow
+    @given(
+        y=hyp_num.arrays(
+            np.float64,
+            hyp_num.array_shapes(max_dims=4, min_side=3, max_side=10),
+            elements=st.floats(-10, 10, allow_nan=False).filter(lambda x: abs(x) > 1e-7)
+        )
+    )
+    def test_cumulative_simpson_against_simpson(
+        self, y
+    ):
+        """Theoretically, the output of `cumulative_simpson` will be identical
+        to `simpson` at all even indices and in the last index. The first index
+        will not match as `simpson` uses the trapezoidal rule when there are only two
+        data points. Odd indices after the first index are shown to match with
+        a mathematically-derived correction."""
+        interval = 10/(y.shape[-1] - 1)
+        x = np.linspace(0, 10, num=y.shape[-1])
+        x[1:] = x[1:] + 0.2*interval*np.random.uniform(-1, 1, len(x) - 1)
+
+        def simpson_reference(y, x):
+            return np.stack(
+                [simpson(y[..., :i], x=x[..., :i]) for i in range(2, y.shape[-1]+1)],
+                axis=-1,
+            )
+
+        res = cumulative_simpson(y, x=x)
+        ref = simpson_reference(y, x)
+        theoretical_difference = self._get_theoretical_diff_between_simps_and_cum_simps(
+            y, x
+        )
+        np.testing.assert_allclose(
+            res[..., 1:], ref[..., 1:] + theoretical_difference[..., 1:]
+        )
+
+class TestLebedev:
+    def test_input_validation(self):
+        # only certain rules are available
+        message = "Order n=-1 not available..."
+        with pytest.raises(NotImplementedError, match=message):
+            integrate.lebedev_rule(-1)
+
+    def test_quadrature(self):
+        # Test points/weights to integrate an example function
+
+        def f(x):
+            return np.exp(x[0])
+
+        x, w = integrate.lebedev_rule(15)
+        res = w @ f(x)
+        ref = 14.7680137457653  # lebedev_rule reference [3]
+        assert_allclose(res, ref, rtol=1e-14)
+        assert_allclose(np.sum(w), 4 * np.pi)
+
+    @pytest.mark.parametrize('order', list(range(3, 32, 2)) + list(range(35, 132, 6)))
+    def test_properties(self, order):
+        x, w = integrate.lebedev_rule(order)
+        # dispersion should be maximal; no clear spherical mean
+        with np.errstate(divide='ignore', invalid='ignore'):
+            res = stats.directional_stats(x.T, axis=0)
+            assert_allclose(res.mean_resultant_length, 0, atol=1e-15)
+        # weights should sum to 4*pi (surface area of unit sphere)
+        assert_allclose(np.sum(w), 4*np.pi)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_tanhsinh.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_tanhsinh.py
new file mode 100644
index 0000000000000000000000000000000000000000..15782ba13efcb16cf8982adf94b8b2f74be63a18
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/tests/test_tanhsinh.py
@@ -0,0 +1,1163 @@
+# mypy: disable-error-code="attr-defined"
+import os
+import pytest
+import math
+
+import numpy as np
+from numpy.testing import assert_allclose
+
+from scipy.conftest import array_api_compatible
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._array_api_no_0d import xp_assert_close, xp_assert_equal
+from scipy._lib._array_api import array_namespace, xp_size, xp_ravel, xp_copy, is_numpy
+from scipy import special, stats
+from scipy.integrate import quad_vec, nsum, tanhsinh as _tanhsinh
+from scipy.integrate._tanhsinh import _pair_cache
+from scipy.stats._discrete_distns import _gen_harmonic_gt1
+
+
+def norm_pdf(x, xp=None):
+    xp = array_namespace(x) if xp is None else xp
+    return 1/(2*xp.pi)**0.5 * xp.exp(-x**2/2)
+
+def norm_logpdf(x, xp=None):
+    xp = array_namespace(x) if xp is None else xp
+    return -0.5*math.log(2*xp.pi) - x**2/2
+
+
+def _vectorize(xp):
+    # xp-compatible version of np.vectorize
+    # assumes arguments are all arrays of the same shape
+    def decorator(f):
+        def wrapped(*arg_arrays):
+            shape = arg_arrays[0].shape
+            arg_arrays = [xp_ravel(arg_array) for arg_array in arg_arrays]
+            res = []
+            for i in range(math.prod(shape)):
+                arg_scalars = [arg_array[i] for arg_array in arg_arrays]
+                res.append(f(*arg_scalars))
+            return res
+
+        return wrapped
+
+    return decorator
+
+
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+@pytest.mark.skip_xp_backends(
+    'array_api_strict', reason='Currently uses fancy indexing assignment.'
+)
+@pytest.mark.skip_xp_backends(
+    'jax.numpy', reason='JAX arrays do not support item assignment.'
+)
+class TestTanhSinh:
+
+    # Test problems from [1] Section 6
+    def f1(self, t):
+        return t * np.log(1 + t)
+
+    f1.ref = 0.25
+    f1.b = 1
+
+    def f2(self, t):
+        return t ** 2 * np.arctan(t)
+
+    f2.ref = (np.pi - 2 + 2 * np.log(2)) / 12
+    f2.b = 1
+
+    def f3(self, t):
+        return np.exp(t) * np.cos(t)
+
+    f3.ref = (np.exp(np.pi / 2) - 1) / 2
+    f3.b = np.pi / 2
+
+    def f4(self, t):
+        a = np.sqrt(2 + t ** 2)
+        return np.arctan(a) / ((1 + t ** 2) * a)
+
+    f4.ref = 5 * np.pi ** 2 / 96
+    f4.b = 1
+
+    def f5(self, t):
+        return np.sqrt(t) * np.log(t)
+
+    f5.ref = -4 / 9
+    f5.b = 1
+
+    def f6(self, t):
+        return np.sqrt(1 - t ** 2)
+
+    f6.ref = np.pi / 4
+    f6.b = 1
+
+    def f7(self, t):
+        return np.sqrt(t) / np.sqrt(1 - t ** 2)
+
+    f7.ref = 2 * np.sqrt(np.pi) * special.gamma(3 / 4) / special.gamma(1 / 4)
+    f7.b = 1
+
+    def f8(self, t):
+        return np.log(t) ** 2
+
+    f8.ref = 2
+    f8.b = 1
+
+    def f9(self, t):
+        return np.log(np.cos(t))
+
+    f9.ref = -np.pi * np.log(2) / 2
+    f9.b = np.pi / 2
+
+    def f10(self, t):
+        return np.sqrt(np.tan(t))
+
+    f10.ref = np.pi * np.sqrt(2) / 2
+    f10.b = np.pi / 2
+
+    def f11(self, t):
+        return 1 / (1 + t ** 2)
+
+    f11.ref = np.pi / 2
+    f11.b = np.inf
+
+    def f12(self, t):
+        return np.exp(-t) / np.sqrt(t)
+
+    f12.ref = np.sqrt(np.pi)
+    f12.b = np.inf
+
+    def f13(self, t):
+        return np.exp(-t ** 2 / 2)
+
+    f13.ref = np.sqrt(np.pi / 2)
+    f13.b = np.inf
+
+    def f14(self, t):
+        return np.exp(-t) * np.cos(t)
+
+    f14.ref = 0.5
+    f14.b = np.inf
+
+    def f15(self, t):
+        return np.sin(t) / t
+
+    f15.ref = np.pi / 2
+    f15.b = np.inf
+
+    def error(self, res, ref, log=False, xp=None):
+        xp = array_namespace(res, ref) if xp is None else xp
+        err = abs(res - ref)
+
+        if not log:
+            return err
+
+        with np.errstate(divide='ignore'):
+            return xp.log10(err)
+
+    def test_input_validation(self, xp):
+        f = self.f1
+
+        zero = xp.asarray(0)
+        f_b = xp.asarray(f.b)
+
+        message = '`f` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(42, zero, f_b)
+
+        message = '...must be True or False.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, log=2)
+
+        message = '...must be real numbers.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, xp.asarray(1+1j), f_b)
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, atol='ekki')
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, rtol=pytest)
+
+        message = '...must be non-negative and finite.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, rtol=-1)
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, atol=xp.inf)
+
+        message = '...may not be positive infinity.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, rtol=xp.inf, log=True)
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, atol=xp.inf, log=True)
+
+        message = '...must be integers.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, maxlevel=object())
+        # with pytest.raises(ValueError, match=message):  # unused for now
+        #     _tanhsinh(f, zero, f_b, maxfun=1+1j)
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, minlevel="migratory coconut")
+
+        message = '...must be non-negative.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, maxlevel=-1)
+        # with pytest.raises(ValueError, match=message):  # unused for now
+        #     _tanhsinh(f, zero, f_b, maxfun=-1)
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, minlevel=-1)
+
+        message = '...must be True or False.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, preserve_shape=2)
+
+        message = '...must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _tanhsinh(f, zero, f_b, callback='elderberry')
+
+    @pytest.mark.parametrize("limits, ref", [
+        [(0, math.inf), 0.5],  # b infinite
+        [(-math.inf, 0), 0.5],  # a infinite
+        [(-math.inf, math.inf), 1.],  # a and b infinite
+        [(math.inf, -math.inf), -1.],  # flipped limits
+        [(1, -1), stats.norm.cdf(-1.) -  stats.norm.cdf(1.)],  # flipped limits
+    ])
+    def test_integral_transforms(self, limits, ref, xp):
+        # Check that the integral transforms are behaving for both normal and
+        # log integration
+        limits = [xp.asarray(limit) for limit in limits]
+        dtype = xp.asarray(float(limits[0])).dtype
+        ref = xp.asarray(ref, dtype=dtype)
+
+        res = _tanhsinh(norm_pdf, *limits)
+        xp_assert_close(res.integral, ref)
+
+        logres = _tanhsinh(norm_logpdf, *limits, log=True)
+        xp_assert_close(xp.exp(logres.integral), ref, check_dtype=False)
+        # Transformation should not make the result complex unnecessarily
+        xp_test = array_namespace(*limits)  # we need xp.isdtype
+        assert (xp_test.isdtype(logres.integral.dtype, "real floating") if ref > 0
+                else xp_test.isdtype(logres.integral.dtype, "complex floating"))
+
+        xp_assert_close(xp.exp(logres.error), res.error, atol=1e-16, check_dtype=False)
+
+    # 15 skipped intentionally; it's very difficult numerically
+    @pytest.mark.skip_xp_backends(np_only=True,
+                                  reason='Cumbersome to convert everything.')
+    @pytest.mark.parametrize('f_number', range(1, 15))
+    def test_basic(self, f_number, xp):
+        f = getattr(self, f"f{f_number}")
+        rtol = 2e-8
+        res = _tanhsinh(f, 0, f.b, rtol=rtol)
+        assert_allclose(res.integral, f.ref, rtol=rtol)
+        if f_number not in {14}:  # mildly underestimates error here
+            true_error = abs(self.error(res.integral, f.ref)/res.integral)
+            assert true_error < res.error
+
+        if f_number in {7, 10, 12}:  # succeeds, but doesn't know it
+            return
+
+        assert res.success
+        assert res.status == 0
+
+    @pytest.mark.skip_xp_backends(np_only=True,
+                                  reason="Distributions aren't xp-compatible.")
+    @pytest.mark.parametrize('ref', (0.5, [0.4, 0.6]))
+    @pytest.mark.parametrize('case', stats._distr_params.distcont)
+    def test_accuracy(self, ref, case, xp):
+        distname, params = case
+        if distname in {'dgamma', 'dweibull', 'laplace', 'kstwo'}:
+            # should split up interval at first-derivative discontinuity
+            pytest.skip('tanh-sinh is not great for non-smooth integrands')
+        if (distname in {'studentized_range', 'levy_stable'}
+                and not int(os.getenv('SCIPY_XSLOW', 0))):
+            pytest.skip('This case passes, but it is too slow.')
+        dist = getattr(stats, distname)(*params)
+        x = dist.interval(ref)
+        res = _tanhsinh(dist.pdf, *x)
+        assert_allclose(res.integral, ref)
+
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        rng = np.random.default_rng(82456839535679456794)
+        a = xp.asarray(rng.random(shape))
+        b = xp.asarray(rng.random(shape))
+        p = xp.asarray(rng.random(shape))
+        n = math.prod(shape)
+
+        def f(x, p):
+            f.ncall += 1
+            f.feval += 1 if (xp_size(x) == n or x.ndim <= 1) else x.shape[-1]
+            return x**p
+        f.ncall = 0
+        f.feval = 0
+
+        @_vectorize(xp)
+        def _tanhsinh_single(a, b, p):
+            return _tanhsinh(lambda x: x**p, a, b)
+
+        res = _tanhsinh(f, a, b, args=(p,))
+        refs = _tanhsinh_single(a, b, p)
+
+        xp_test = array_namespace(a)  # need xp.stack, isdtype
+        attrs = ['integral', 'error', 'success', 'status', 'nfev', 'maxlevel']
+        for attr in attrs:
+            ref_attr = xp_test.stack([getattr(ref, attr) for ref in refs])
+            res_attr = xp_ravel(getattr(res, attr))
+            xp_assert_close(res_attr, ref_attr, rtol=1e-15)
+            assert getattr(res, attr).shape == shape
+
+        assert xp_test.isdtype(res.success.dtype, 'bool')
+        assert xp_test.isdtype(res.status.dtype, 'integral')
+        assert xp_test.isdtype(res.nfev.dtype, 'integral')
+        assert xp_test.isdtype(res.maxlevel.dtype, 'integral')
+        assert xp.max(res.nfev) == f.feval
+        # maxlevel = 2 -> 3 function calls (2 initialization, 1 work)
+        assert xp.max(res.maxlevel) >= 2
+        assert xp.max(res.maxlevel) == f.ncall
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously.
+        def f(xs, js):
+            f.nit += 1
+            funcs = [lambda x: xp.exp(-x**2),  # converges
+                     lambda x: xp.exp(x),  # reaches maxiter due to order=2
+                     lambda x: xp.full_like(x, xp.nan)]  # stops due to NaN
+            res = []
+            for i in range(xp_size(js)):
+                x = xs[i, ...]
+                j = int(xp_ravel(js)[i])
+                res.append(funcs[j](x))
+            return xp.stack(res)
+        f.nit = 0
+
+        args = (xp.arange(3, dtype=xp.int64),)
+        a = xp.asarray([xp.inf]*3)
+        b = xp.asarray([-xp.inf] * 3)
+        res = _tanhsinh(f, a, b, maxlevel=5, args=args)
+        ref_flags = xp.asarray([0, -2, -3], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_flags_preserve_shape(self, xp):
+        # Same test as above but using `preserve_shape` option to simplify.
+        def f(x):
+            res = [xp.exp(-x[0]**2),  # converges
+                   xp.exp(x[1]),  # reaches maxiter due to order=2
+                   xp.full_like(x[2], xp.nan)]  # stops due to NaN
+            return xp.stack(res)
+
+        a = xp.asarray([xp.inf] * 3)
+        b = xp.asarray([-xp.inf] * 3)
+        res = _tanhsinh(f, a, b, maxlevel=5, preserve_shape=True)
+        ref_flags = xp.asarray([0, -2, -3], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_preserve_shape(self, xp):
+        # Test `preserve_shape` option
+        def f(x, xp):
+            return xp.stack([xp.stack([x, xp.sin(10 * x)]),
+                             xp.stack([xp.cos(30 * x), x * xp.sin(100 * x)])])
+
+        ref = quad_vec(lambda x: f(x, np), 0, 1)
+        res = _tanhsinh(lambda x: f(x, xp), xp.asarray(0), xp.asarray(1),
+                        preserve_shape=True)
+        dtype = xp.asarray(0.).dtype
+        xp_assert_close(res.integral, xp.asarray(ref[0], dtype=dtype))
+
+    def test_convergence(self, xp):
+        # demonstrate that number of accurate digits doubles each iteration
+        dtype = xp.float64  # this only works with good precision
+        def f(t):
+            return t * xp.log(1 + t)
+        ref = xp.asarray(0.25, dtype=dtype)
+        a, b = xp.asarray(0., dtype=dtype), xp.asarray(1., dtype=dtype)
+
+        last_logerr = 0
+        for i in range(4):
+            res = _tanhsinh(f, a, b, minlevel=0, maxlevel=i)
+            logerr = self.error(res.integral, ref, log=True, xp=xp)
+            assert (logerr < last_logerr * 2 or logerr < -15.5)
+            last_logerr = logerr
+
+    def test_options_and_result_attributes(self, xp):
+        # demonstrate that options are behaving as advertised and status
+        # messages are as intended
+        xp_test = array_namespace(xp.asarray(1.))  # need xp.atan
+
+        def f(x):
+            f.calls += 1
+            f.feval += xp_size(xp.asarray(x))
+            return x**2 * xp_test.atan(x)
+
+        f.ref = xp.asarray((math.pi - 2 + 2 * math.log(2)) / 12, dtype=xp.float64)
+
+        default_rtol = 1e-12
+        default_atol = f.ref * default_rtol  # effective default absolute tol
+
+        # Keep things simpler by leaving tolerances fixed rather than
+        # having to make them dtype-dependent
+        a = xp.asarray(0., dtype=xp.float64)
+        b = xp.asarray(1., dtype=xp.float64)
+
+        # Test default options
+        f.feval, f.calls = 0, 0
+        ref = _tanhsinh(f, a, b)
+        assert self.error(ref.integral, f.ref) < ref.error < default_atol
+        assert ref.nfev == f.feval
+        ref.calls = f.calls  # reference number of function calls
+        assert ref.success
+        assert ref.status == 0
+
+        # Test `maxlevel` equal to required max level
+        # We should get all the same results
+        f.feval, f.calls = 0, 0
+        maxlevel = int(ref.maxlevel)
+        res = _tanhsinh(f, a, b, maxlevel=maxlevel)
+        res.calls = f.calls
+        assert res == ref
+
+        # Now reduce the maximum level. We won't meet tolerances.
+        f.feval, f.calls = 0, 0
+        maxlevel -= 1
+        assert maxlevel >= 2  # can't compare errors otherwise
+        res = _tanhsinh(f, a, b, maxlevel=maxlevel)
+        assert self.error(res.integral, f.ref) < res.error > default_atol
+        assert res.nfev == f.feval < ref.nfev
+        assert f.calls == ref.calls - 1
+        assert not res.success
+        assert res.status == eim._ECONVERR
+
+        # `maxfun` is currently not enforced
+
+        # # Test `maxfun` equal to required number of function evaluations
+        # # We should get all the same results
+        # f.feval, f.calls = 0, 0
+        # maxfun = ref.nfev
+        # res = _tanhsinh(f, 0, f.b, maxfun = maxfun)
+        # assert res == ref
+        #
+        # # Now reduce `maxfun`. We won't meet tolerances.
+        # f.feval, f.calls = 0, 0
+        # maxfun -= 1
+        # res = _tanhsinh(f, 0, f.b, maxfun=maxfun)
+        # assert self.error(res.integral, f.ref) < res.error > default_atol
+        # assert res.nfev == f.feval < ref.nfev
+        # assert f.calls == ref.calls - 1
+        # assert not res.success
+        # assert res.status == 2
+
+        # Take this result to be the new reference
+        ref = res
+        ref.calls = f.calls
+
+        # Test `atol`
+        f.feval, f.calls = 0, 0
+        # With this tolerance, we should get the exact same result as ref
+        atol = np.nextafter(float(ref.error), np.inf)
+        res = _tanhsinh(f, a, b, rtol=0, atol=atol)
+        assert res.integral == ref.integral
+        assert res.error == ref.error
+        assert res.nfev == f.feval == ref.nfev
+        assert f.calls == ref.calls
+        # Except the result is considered to be successful
+        assert res.success
+        assert res.status == 0
+
+        f.feval, f.calls = 0, 0
+        # With a tighter tolerance, we should get a more accurate result
+        atol = np.nextafter(float(ref.error), -np.inf)
+        res = _tanhsinh(f, a, b, rtol=0, atol=atol)
+        assert self.error(res.integral, f.ref) < res.error < atol
+        assert res.nfev == f.feval > ref.nfev
+        assert f.calls > ref.calls
+        assert res.success
+        assert res.status == 0
+
+        # Test `rtol`
+        f.feval, f.calls = 0, 0
+        # With this tolerance, we should get the exact same result as ref
+        rtol = np.nextafter(float(ref.error/ref.integral), np.inf)
+        res = _tanhsinh(f, a, b, rtol=rtol)
+        assert res.integral == ref.integral
+        assert res.error == ref.error
+        assert res.nfev == f.feval == ref.nfev
+        assert f.calls == ref.calls
+        # Except the result is considered to be successful
+        assert res.success
+        assert res.status == 0
+
+        f.feval, f.calls = 0, 0
+        # With a tighter tolerance, we should get a more accurate result
+        rtol = np.nextafter(float(ref.error/ref.integral), -np.inf)
+        res = _tanhsinh(f, a, b, rtol=rtol)
+        assert self.error(res.integral, f.ref)/f.ref < res.error/res.integral < rtol
+        assert res.nfev == f.feval > ref.nfev
+        assert f.calls > ref.calls
+        assert res.success
+        assert res.status == 0
+
+    @pytest.mark.skip_xp_backends('torch', reason=
+            'https://github.com/scipy/scipy/pull/21149#issuecomment-2330477359',
+    )
+    @pytest.mark.parametrize('rtol', [1e-4, 1e-14])
+    def test_log(self, rtol, xp):
+        # Test equivalence of log-integration and regular integration
+        test_tols = dict(atol=1e-18, rtol=1e-15)
+
+        # Positive integrand (real log-integrand)
+        a = xp.asarray(-1., dtype=xp.float64)
+        b = xp.asarray(2., dtype=xp.float64)
+        res = _tanhsinh(norm_logpdf, a, b, log=True, rtol=math.log(rtol))
+        ref = _tanhsinh(norm_pdf, a, b, rtol=rtol)
+        xp_assert_close(xp.exp(res.integral), ref.integral, **test_tols)
+        xp_assert_close(xp.exp(res.error), ref.error, **test_tols)
+        assert res.nfev == ref.nfev
+
+        # Real integrand (complex log-integrand)
+        def f(x):
+            return -norm_logpdf(x)*norm_pdf(x)
+
+        def logf(x):
+            return xp.log(norm_logpdf(x) + 0j) + norm_logpdf(x) + xp.pi * 1j
+
+        a = xp.asarray(-xp.inf, dtype=xp.float64)
+        b = xp.asarray(xp.inf, dtype=xp.float64)
+        res = _tanhsinh(logf, a, b, log=True)
+        ref = _tanhsinh(f, a, b)
+        # In gh-19173, we saw `invalid` warnings on one CI platform.
+        # Silencing `all` because I can't reproduce locally and don't want
+        # to risk the need to run CI again.
+        with np.errstate(all='ignore'):
+            xp_assert_close(xp.exp(res.integral), ref.integral, **test_tols,
+                            check_dtype=False)
+            xp_assert_close(xp.exp(res.error), ref.error, **test_tols,
+                            check_dtype=False)
+        assert res.nfev == ref.nfev
+
+    def test_complex(self, xp):
+        # Test integration of complex integrand
+        # Finite limits
+        def f(x):
+            return xp.exp(1j * x)
+
+        a, b = xp.asarray(0.), xp.asarray(xp.pi/4)
+        res = _tanhsinh(f, a, b)
+        ref = math.sqrt(2)/2 + (1-math.sqrt(2)/2)*1j
+        xp_assert_close(res.integral, xp.asarray(ref))
+
+        # Infinite limits
+        def f(x):
+            return norm_pdf(x) + 1j/2*norm_pdf(x/2)
+
+        a, b = xp.asarray(xp.inf), xp.asarray(-xp.inf)
+        res = _tanhsinh(f, a, b)
+        xp_assert_close(res.integral, xp.asarray(-(1+1j)))
+
+    @pytest.mark.parametrize("maxlevel", range(4))
+    def test_minlevel(self, maxlevel, xp):
+        # Verify that minlevel does not change the values at which the
+        # integrand is evaluated or the integral/error estimates, only the
+        # number of function calls
+
+        # need `xp.concat`, `xp.atan`, and `xp.sort`
+        xp_test = array_namespace(xp.asarray(1.))
+
+        def f(x):
+            f.calls += 1
+            f.feval += xp_size(xp.asarray(x))
+            f.x = xp_test.concat((f.x, xp_ravel(x)))
+            return x**2 * xp_test.atan(x)
+
+        f.feval, f.calls, f.x = 0, 0, xp.asarray([])
+
+        a = xp.asarray(0, dtype=xp.float64)
+        b = xp.asarray(1, dtype=xp.float64)
+        ref = _tanhsinh(f, a, b, minlevel=0, maxlevel=maxlevel)
+        ref_x = xp_test.sort(f.x)
+
+        for minlevel in range(0, maxlevel + 1):
+            f.feval, f.calls, f.x = 0, 0, xp.asarray([])
+            options = dict(minlevel=minlevel, maxlevel=maxlevel)
+            res = _tanhsinh(f, a, b, **options)
+            # Should be very close; all that has changed is the order of values
+            xp_assert_close(res.integral, ref.integral, rtol=4e-16)
+            # Difference in absolute errors << magnitude of integral
+            xp_assert_close(res.error, ref.error, atol=4e-16 * ref.integral)
+            assert res.nfev == f.feval == f.x.shape[0]
+            assert f.calls == maxlevel - minlevel + 1 + 1  # 1 validation call
+            assert res.status == ref.status
+            xp_assert_equal(ref_x, xp_test.sort(f.x))
+
+    def test_improper_integrals(self, xp):
+        # Test handling of infinite limits of integration (mixed with finite limits)
+        def f(x):
+            x[xp.isinf(x)] = xp.nan
+            return xp.exp(-x**2)
+        a = xp.asarray([-xp.inf, 0, -xp.inf, xp.inf, -20, -xp.inf, -20])
+        b = xp.asarray([xp.inf, xp.inf, 0, -xp.inf, 20, 20, xp.inf])
+        ref = math.sqrt(math.pi)
+        ref = xp.asarray([ref, ref/2, ref/2, -ref, ref, ref, ref])
+        res = _tanhsinh(f, a, b)
+        xp_assert_close(res.integral, ref)
+
+    @pytest.mark.parametrize("limits", ((0, 3), ([-math.inf, 0], [3, 3])))
+    @pytest.mark.parametrize("dtype", ('float32', 'float64'))
+    def test_dtype(self, limits, dtype, xp):
+        # Test that dtypes are preserved
+        dtype = getattr(xp, dtype)
+        a, b = xp.asarray(limits, dtype=dtype)
+
+        def f(x):
+            assert x.dtype == dtype
+            return xp.exp(x)
+
+        rtol = 1e-12 if dtype == xp.float64 else 1e-5
+        res = _tanhsinh(f, a, b, rtol=rtol)
+        assert res.integral.dtype == dtype
+        assert res.error.dtype == dtype
+        assert xp.all(res.success)
+        xp_assert_close(res.integral, xp.exp(b)-xp.exp(a))
+
+    def test_maxiter_callback(self, xp):
+        # Test behavior of `maxiter` parameter and `callback` interface
+        a, b = xp.asarray(-xp.inf), xp.asarray(xp.inf)
+        def f(x):
+            return xp.exp(-x*x)
+
+        minlevel, maxlevel = 0, 2
+        maxiter = maxlevel - minlevel + 1
+        kwargs = dict(minlevel=minlevel, maxlevel=maxlevel, rtol=1e-15)
+        res = _tanhsinh(f, a, b, **kwargs)
+        assert not res.success
+        assert res.maxlevel == maxlevel
+
+        def callback(res):
+            callback.iter += 1
+            callback.res = res
+            assert hasattr(res, 'integral')
+            assert res.status == 1
+            if callback.iter == maxiter:
+                raise StopIteration
+        callback.iter = -1  # callback called once before first iteration
+        callback.res = None
+
+        del kwargs['maxlevel']
+        res2 = _tanhsinh(f, a, b, **kwargs, callback=callback)
+        # terminating with callback is identical to terminating due to maxiter
+        # (except for `status`)
+        for key in res.keys():
+            if key == 'status':
+                assert res[key] == -2
+                assert res2[key] == -4
+            else:
+                assert res2[key] == callback.res[key] == res[key]
+
+    def test_jumpstart(self, xp):
+        # The intermediate results at each level i should be the same as the
+        # final results when jumpstarting at level i; i.e. minlevel=maxlevel=i
+        a = xp.asarray(-xp.inf, dtype=xp.float64)
+        b = xp.asarray(xp.inf, dtype=xp.float64)
+
+        def f(x):
+            return xp.exp(-x*x)
+
+        def callback(res):
+            callback.integrals.append(xp_copy(res.integral)[()])
+            callback.errors.append(xp_copy(res.error)[()])
+        callback.integrals = []
+        callback.errors = []
+
+        maxlevel = 4
+        _tanhsinh(f, a, b, minlevel=0, maxlevel=maxlevel, callback=callback)
+
+        for i in range(maxlevel + 1):
+            res = _tanhsinh(f, a, b, minlevel=i, maxlevel=i)
+            xp_assert_close(callback.integrals[1+i], res.integral, rtol=1e-15)
+            xp_assert_close(callback.errors[1+i], res.error, rtol=1e-15, atol=1e-16)
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases
+        a, b = xp.asarray(0), xp.asarray(1)
+        xp_test = array_namespace(a, b)  # need `xp.isdtype`
+
+        def f(x):
+            assert xp_test.isdtype(x.dtype, "real floating")
+            return x
+
+        res = _tanhsinh(f, a, b)
+        assert res.success
+        xp_assert_close(res.integral, xp.asarray(0.5))
+
+        # Test levels 0 and 1; error is NaN
+        res = _tanhsinh(f, a, b, maxlevel=0)
+        assert res.integral > 0
+        xp_assert_equal(res.error, xp.asarray(xp.nan))
+        res = _tanhsinh(f, a, b, maxlevel=1)
+        assert res.integral > 0
+        xp_assert_equal(res.error, xp.asarray(xp.nan))
+
+        # Test equal left and right integration limits
+        res = _tanhsinh(f, b, b)
+        assert res.success
+        assert res.maxlevel == -1
+        xp_assert_close(res.integral, xp.asarray(0.))
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return x**c
+
+        res = _tanhsinh(f, a, b, args=29)
+        xp_assert_close(res.integral, xp.asarray(1/30))
+
+        # Test NaNs
+        a = xp.asarray([xp.nan, 0, 0, 0])
+        b = xp.asarray([1, xp.nan, 1, 1])
+        c = xp.asarray([1, 1, xp.nan, 1])
+        res = _tanhsinh(f, a, b, args=(c,))
+        xp_assert_close(res.integral, xp.asarray([xp.nan, xp.nan, xp.nan, 0.5]))
+        xp_assert_equal(res.error[:3], xp.full((3,), xp.nan))
+        xp_assert_equal(res.status, xp.asarray([-3, -3, -3, 0], dtype=xp.int32))
+        xp_assert_equal(res.success, xp.asarray([False, False, False, True]))
+        xp_assert_equal(res.nfev[:3], xp.full((3,), 1, dtype=xp.int32))
+
+        # Test complex integral followed by real integral
+        # Previously, h0 was of the result dtype. If the `dtype` were complex,
+        # this could lead to complex cached abscissae/weights. If these get
+        # cast to real dtype for a subsequent real integral, we would get a
+        # ComplexWarning. Check that this is avoided.
+        _pair_cache.xjc = xp.empty(0)
+        _pair_cache.wj = xp.empty(0)
+        _pair_cache.indices = [0]
+        _pair_cache.h0 = None
+        a, b = xp.asarray(0), xp.asarray(1)
+        res = _tanhsinh(lambda x: xp.asarray(x*1j), a, b)
+        xp_assert_close(res.integral, xp.asarray(0.5*1j))
+        res = _tanhsinh(lambda x: x, a, b)
+        xp_assert_close(res.integral, xp.asarray(0.5))
+
+        # Test zero-size
+        shape = (0, 3)
+        res = _tanhsinh(lambda x: x, xp.asarray(0), xp.zeros(shape))
+        attrs = ['integral', 'error', 'success', 'status', 'nfev', 'maxlevel']
+        for attr in attrs:
+            assert res[attr].shape == shape
+
+    @pytest.mark.skip_xp_backends(np_only=True)
+    def test_compress_nodes_weights_gh21496(self, xp):
+        # See discussion in:
+        # https://github.com/scipy/scipy/pull/21496#discussion_r1878681049
+        # This would cause "ValueError: attempt to get argmax of an empty sequence"
+        # Check that this has been resolved.
+        x = np.full(65, 3)
+        x[-1] = 1000
+        _tanhsinh(np.sin, 1, x)
+
+    def test_gh_22681_finite_error(self, xp):
+        # gh-22681 noted a case in which the error was NaN on some platforms;
+        # check that this does in fact fail in CI.
+        a = complex(12, -10)
+        b = complex(12, 39)
+        def f(t):
+            return xp.sin(a * (1 - t) + b * t)
+        res = _tanhsinh(f, xp.asarray(0.), xp.asarray(1.), atol=0, rtol=0, maxlevel=10)
+        assert xp.isfinite(res.error)
+
+
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+@pytest.mark.skip_xp_backends('array_api_strict', reason='No fancy indexing.')
+@pytest.mark.skip_xp_backends('jax.numpy', reason='No mutation.')
+class TestNSum:
+    rng = np.random.default_rng(5895448232066142650)
+    p = rng.uniform(1, 10, size=10).tolist()
+
+    def f1(self, k):
+        # Integers are never passed to `f1`; if they were, we'd get
+        # integer to negative integer power error
+        return k**(-2)
+
+    f1.ref = np.pi**2/6
+    f1.a = 1
+    f1.b = np.inf
+    f1.args = tuple()
+
+    def f2(self, k, p):
+        return 1 / k**p
+
+    f2.ref = special.zeta(p, 1)
+    f2.a = 1.
+    f2.b = np.inf
+    f2.args = (p,)
+
+    def f3(self, k, p):
+        return 1 / k**p
+
+    f3.a = 1
+    f3.b = rng.integers(5, 15, size=(3, 1))
+    f3.ref = _gen_harmonic_gt1(f3.b, p)
+    f3.args = (p,)
+
+    def test_input_validation(self, xp):
+        f = self.f1
+        a, b = xp.asarray(f.a), xp.asarray(f.b)
+
+        message = '`f` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            nsum(42, a, b)
+
+        message = '...must be True or False.'
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, log=2)
+
+        message = '...must be real numbers.'
+        with pytest.raises(ValueError, match=message):
+            nsum(f, xp.asarray(1+1j), b)
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, xp.asarray(1+1j))
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, step=xp.asarray(1+1j))
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(atol='ekki'))
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(rtol=pytest))
+
+        with np.errstate(all='ignore'):
+            res = nsum(f, xp.asarray([np.nan, np.inf]), xp.asarray(1.))
+            assert xp.all((res.status == -1) & xp.isnan(res.sum)
+                          & xp.isnan(res.error) & ~res.success & res.nfev == 1)
+            res = nsum(f, xp.asarray(10.), xp.asarray([np.nan, 1]))
+            assert xp.all((res.status == -1) & xp.isnan(res.sum)
+                          & xp.isnan(res.error) & ~res.success & res.nfev == 1)
+            res = nsum(f, xp.asarray(1.), xp.asarray(10.),
+                       step=xp.asarray([xp.nan, -xp.inf, xp.inf, -1, 0]))
+            assert xp.all((res.status == -1) & xp.isnan(res.sum)
+                          & xp.isnan(res.error) & ~res.success & res.nfev == 1)
+
+        message = '...must be non-negative and finite.'
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(rtol=-1))
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(atol=np.inf))
+
+        message = '...may not be positive infinity.'
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(rtol=np.inf), log=True)
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, tolerances=dict(atol=np.inf), log=True)
+
+        message = '...must be a non-negative integer.'
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, maxterms=3.5)
+        with pytest.raises(ValueError, match=message):
+            nsum(f, a, b, maxterms=-2)
+
+    @pytest.mark.parametrize('f_number', range(1, 4))
+    def test_basic(self, f_number, xp):
+        dtype = xp.asarray(1.).dtype
+        f = getattr(self, f"f{f_number}")
+        a, b = xp.asarray(f.a), xp.asarray(f.b),
+        args = tuple(xp.asarray(arg) for arg in f.args)
+        ref = xp.asarray(f.ref, dtype=dtype)
+        res = nsum(f, a, b, args=args)
+        xp_assert_close(res.sum, ref)
+        xp_assert_equal(res.status, xp.zeros(ref.shape, dtype=xp.int32))
+        xp_test = array_namespace(a)  # CuPy doesn't have `bool`
+        xp_assert_equal(res.success, xp.ones(ref.shape, dtype=xp_test.bool))
+
+        with np.errstate(divide='ignore'):
+            logres = nsum(lambda *args: xp.log(f(*args)),
+                           a, b, log=True, args=args)
+        xp_assert_close(xp.exp(logres.sum), res.sum)
+        xp_assert_close(xp.exp(logres.error), res.error, atol=1e-15)
+        xp_assert_equal(logres.status, res.status)
+        xp_assert_equal(logres.success, res.success)
+
+    @pytest.mark.parametrize('maxterms', [0, 1, 10, 20, 100])
+    def test_integral(self, maxterms, xp):
+        # test precise behavior of integral approximation
+        f = self.f1
+
+        def logf(x):
+            return -2*xp.log(x)
+
+        def F(x):
+            return -1 / x
+
+        a = xp.asarray([1, 5], dtype=xp.float64)[:, xp.newaxis]
+        b = xp.asarray([20, 100, xp.inf], dtype=xp.float64)[:, xp.newaxis, xp.newaxis]
+        step = xp.asarray([0.5, 1, 2], dtype=xp.float64).reshape((-1, 1, 1, 1))
+        nsteps = xp.floor((b - a)/step)
+        b_original = b
+        b = a + nsteps*step
+
+        k = a + maxterms*step
+        # partial sum
+        direct = xp.sum(f(a + xp.arange(maxterms)*step), axis=-1, keepdims=True)
+        integral = (F(b) - F(k))/step  # integral approximation of remainder
+        low = direct + integral + f(b)  # theoretical lower bound
+        high = direct + integral + f(k)  # theoretical upper bound
+        ref_sum = (low + high)/2  # nsum uses average of the two
+        ref_err = (high - low)/2  # error (assuming perfect quadrature)
+
+        # correct reference values where number of terms < maxterms
+        xp_test = array_namespace(a)  # torch needs broadcast_arrays
+        a, b, step = xp_test.broadcast_arrays(a, b, step)
+        for i in np.ndindex(a.shape):
+            ai, bi, stepi = float(a[i]), float(b[i]), float(step[i])
+            if (bi - ai)/stepi + 1 <= maxterms:
+                direct = xp.sum(f(xp.arange(ai, bi+stepi, stepi, dtype=xp.float64)))
+                ref_sum[i] = direct
+                ref_err[i] = direct * xp.finfo(direct.dtype).eps
+
+        rtol = 1e-12
+        res = nsum(f, a, b_original, step=step, maxterms=maxterms,
+                   tolerances=dict(rtol=rtol))
+        xp_assert_close(res.sum, ref_sum, rtol=10*rtol)
+        xp_assert_close(res.error, ref_err, rtol=100*rtol)
+
+        i = ((b_original - a)/step + 1 <= maxterms)
+        xp_assert_close(res.sum[i], ref_sum[i], rtol=1e-15)
+        xp_assert_close(res.error[i], ref_err[i], rtol=1e-15)
+
+        logres = nsum(logf, a, b_original, step=step, log=True,
+                      tolerances=dict(rtol=math.log(rtol)), maxterms=maxterms)
+        xp_assert_close(xp.exp(logres.sum), res.sum)
+        xp_assert_close(xp.exp(logres.error), res.error)
+
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        rng = np.random.default_rng(82456839535679456794)
+        a = rng.integers(1, 10, size=shape)
+        # when the sum can be computed directly or `maxterms` is large enough
+        # to meet `atol`, there are slight differences (for good reason)
+        # between vectorized call and looping.
+        b = np.inf
+        p = rng.random(shape) + 1
+        n = math.prod(shape)
+
+        def f(x, p):
+            f.feval += 1 if (x.size == n or x.ndim <= 1) else x.shape[-1]
+            return 1 / x ** p
+
+        f.feval = 0
+
+        @np.vectorize
+        def nsum_single(a, b, p, maxterms):
+            return nsum(lambda x: 1 / x**p, a, b, maxterms=maxterms)
+
+        res = nsum(f, xp.asarray(a), xp.asarray(b), maxterms=1000,
+                   args=(xp.asarray(p),))
+        refs = nsum_single(a, b, p, maxterms=1000).ravel()
+
+        attrs = ['sum', 'error', 'success', 'status', 'nfev']
+        for attr in attrs:
+            ref_attr = [xp.asarray(getattr(ref, attr)) for ref in refs]
+            res_attr = getattr(res, attr)
+            xp_assert_close(xp_ravel(res_attr), xp.asarray(ref_attr), rtol=1e-15)
+            assert res_attr.shape == shape
+
+        xp_test = array_namespace(xp.asarray(1.))
+        assert xp_test.isdtype(res.success.dtype, 'bool')
+        assert xp_test.isdtype(res.status.dtype, 'integral')
+        assert xp_test.isdtype(res.nfev.dtype, 'integral')
+        if is_numpy(xp):  # other libraries might have different number
+            assert int(xp.max(res.nfev)) == f.feval
+
+    def test_status(self, xp):
+        f = self.f2
+
+        p = [2, 2, 0.9, 1.1, 2, 2]
+        a = xp.asarray([0, 0, 1, 1, 1, np.nan], dtype=xp.float64)
+        b = xp.asarray([10, np.inf, np.inf, np.inf, np.inf, np.inf], dtype=xp.float64)
+        ref = special.zeta(p, 1)
+        p = xp.asarray(p, dtype=xp.float64)
+
+        with np.errstate(divide='ignore'):  # intentionally dividing by zero
+            res = nsum(f, a, b, args=(p,))
+
+        ref_success = xp.asarray([False, False, False, False, True, False])
+        ref_status = xp.asarray([-3, -3, -2, -4, 0, -1], dtype=xp.int32)
+        xp_assert_equal(res.success, ref_success)
+        xp_assert_equal(res.status, ref_status)
+        xp_assert_close(res.sum[res.success], xp.asarray(ref)[res.success])
+
+    def test_nfev(self, xp):
+        def f(x):
+            f.nfev += xp_size(x)
+            return 1 / x**2
+
+        f.nfev = 0
+        res = nsum(f, xp.asarray(1), xp.asarray(10))
+        assert res.nfev == f.nfev
+
+        f.nfev = 0
+        res = nsum(f, xp.asarray(1), xp.asarray(xp.inf), tolerances=dict(atol=1e-6))
+        assert res.nfev == f.nfev
+
+    def test_inclusive(self, xp):
+        # There was an edge case off-by one bug when `_direct` was called with
+        # `inclusive=True`. Check that this is resolved.
+        a = xp.asarray([1, 4])
+        b = xp.asarray(xp.inf)
+        res = nsum(lambda k: 1 / k ** 2, a, b,
+                   maxterms=500, tolerances=dict(atol=0.1))
+        ref = nsum(lambda k: 1 / k ** 2, a, b)
+        assert xp.all(res.sum > (ref.sum - res.error))
+        assert xp.all(res.sum < (ref.sum + res.error))
+
+    @pytest.mark.parametrize('log', [True, False])
+    def test_infinite_bounds(self, log, xp):
+        a = xp.asarray([1, -np.inf, -np.inf])
+        b = xp.asarray([np.inf, -1, np.inf])
+        c = xp.asarray([1, 2, 3])
+
+        def f(x, a):
+            return (xp.log(xp.tanh(a / 2)) - a*xp.abs(x) if log
+                    else xp.tanh(a/2) * xp.exp(-a*xp.abs(x)))
+
+        res = nsum(f, a, b, args=(c,), log=log)
+        ref = xp.asarray([stats.dlaplace.sf(0, 1), stats.dlaplace.sf(0, 2), 1])
+        ref = xp.log(ref) if log else ref
+        atol = (1e-10 if a.dtype==xp.float64 else 1e-5) if log else 0
+        xp_assert_close(res.sum, xp.asarray(ref, dtype=a.dtype), atol=atol)
+
+        # # Make sure the sign of `x` passed into `f` is correct.
+        def f(x, c):
+            return -3*xp.log(c*x) if log else 1 / (c*x)**3
+
+        a = xp.asarray([1, -np.inf])
+        b = xp.asarray([np.inf, -1])
+        arg = xp.asarray([1, -1])
+        res = nsum(f, a, b, args=(arg,), log=log)
+        ref = np.log(special.zeta(3)) if log else special.zeta(3)
+        xp_assert_close(res.sum, xp.full(a.shape, ref, dtype=a.dtype))
+
+    def test_decreasing_check(self, xp):
+        # Test accuracy when we start sum on an uphill slope.
+        # Without the decreasing check, the terms would look small enough to
+        # use the integral approximation. Because the function is not decreasing,
+        # the error is not bounded by the magnitude of the last term of the
+        # partial sum. In this case, the error would be  ~1e-4, causing the test
+        # to fail.
+        def f(x):
+            return xp.exp(-x ** 2)
+
+        a, b = xp.asarray(-25, dtype=xp.float64), xp.asarray(np.inf, dtype=xp.float64)
+        res = nsum(f, a, b)
+
+        # Reference computed with mpmath:
+        # from mpmath import mp
+        # mp.dps = 50
+        # def fmp(x): return mp.exp(-x**2)
+        # ref = mp.nsum(fmp, (-25, 0)) + mp.nsum(fmp, (1, mp.inf))
+        ref = xp.asarray(1.772637204826652, dtype=xp.float64)
+
+        xp_assert_close(res.sum, ref, rtol=1e-15)
+
+    def test_special_case(self, xp):
+        # test equal lower/upper limit
+        f = self.f1
+        a = b = xp.asarray(2)
+        res = nsum(f, a, b)
+        xp_assert_equal(res.sum, xp.asarray(f(2)))
+
+        # Test scalar `args` (not in tuple)
+        res = nsum(self.f2, xp.asarray(1), xp.asarray(np.inf), args=xp.asarray(2))
+        xp_assert_close(res.sum, xp.asarray(self.f1.ref))  # f1.ref is correct w/ args=2
+
+        # Test 0 size input
+        a = xp.empty((3, 1, 1))  # arbitrary broadcastable shapes
+        b = xp.empty((0, 1))  # could use Hypothesis
+        p = xp.empty(4)  # but it's overkill
+        shape = np.broadcast_shapes(a.shape, b.shape, p.shape)
+        res = nsum(self.f2, a, b, args=(p,))
+        assert res.sum.shape == shape
+        assert res.status.shape == shape
+        assert res.nfev.shape == shape
+
+        # Test maxterms=0
+        def f(x):
+            with np.errstate(divide='ignore'):
+                return 1 / x
+
+        res = nsum(f, xp.asarray(0), xp.asarray(10), maxterms=0)
+        assert xp.isnan(res.sum)
+        assert xp.isnan(res.error)
+        assert res.status == -2
+
+        res = nsum(f, xp.asarray(0), xp.asarray(10), maxterms=1)
+        assert xp.isnan(res.sum)
+        assert xp.isnan(res.error)
+        assert res.status == -3
+
+        # Test NaNs
+        # should skip both direct and integral methods if there are NaNs
+        a = xp.asarray([xp.nan, 1, 1, 1])
+        b = xp.asarray([xp.inf, xp.nan, xp.inf, xp.inf])
+        p = xp.asarray([2, 2, xp.nan, 2])
+        res = nsum(self.f2, a, b, args=(p,))
+        xp_assert_close(res.sum, xp.asarray([xp.nan, xp.nan, xp.nan, self.f1.ref]))
+        xp_assert_close(res.error[:3], xp.full((3,), xp.nan))
+        xp_assert_equal(res.status, xp.asarray([-1, -1, -3, 0], dtype=xp.int32))
+        xp_assert_equal(res.success, xp.asarray([False, False, False, True]))
+        # Ideally res.nfev[2] would be 1, but `tanhsinh` has some function evals
+        xp_assert_equal(res.nfev[:2], xp.full((2,), 1, dtype=xp.int32))
+
+    @pytest.mark.parametrize('dtype', ['float32', 'float64'])
+    def test_dtype(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        def f(k):
+            assert k.dtype == dtype
+            return 1 / k ** xp.asarray(2, dtype=dtype)
+
+        a = xp.asarray(1, dtype=dtype)
+        b = xp.asarray([10, xp.inf], dtype=dtype)
+        res = nsum(f, a, b)
+        assert res.sum.dtype == dtype
+        assert res.error.dtype == dtype
+
+        rtol = 1e-12 if dtype == xp.float64 else 1e-6
+        ref = _gen_harmonic_gt1(np.asarray([10, xp.inf]), 2)
+        xp_assert_close(res.sum, xp.asarray(ref, dtype=dtype), rtol=rtol)
+
+    @pytest.mark.parametrize('case', [(10, 100), (100, 10)])
+    def test_nondivisible_interval(self, case, xp):
+        # When the limits of the sum are such that (b - a)/step
+        # is not exactly integral, check that only floor((b - a)/step)
+        # terms are included.
+        n, maxterms = case
+
+        def f(k):
+            return 1 / k ** 2
+
+        a = np.e
+        step = 1 / 3
+        b0 = a + n * step
+        i = np.arange(-2, 3)
+        b = b0 + i * np.spacing(b0)
+        ns = np.floor((b - a) / step)
+        assert len(set(ns)) == 2
+
+        a, b = xp.asarray(a, dtype=xp.float64), xp.asarray(b, dtype=xp.float64)
+        step, ns = xp.asarray(step, dtype=xp.float64), xp.asarray(ns, dtype=xp.float64)
+        res = nsum(f, a, b, step=step, maxterms=maxterms)
+        xp_assert_equal(xp.diff(ns) > 0, xp.diff(res.sum) > 0)
+        xp_assert_close(res.sum[-1], res.sum[0] + f(b0))
+
+    @pytest.mark.skip_xp_backends(np_only=True, reason='Needs beta function.')
+    def test_logser_kurtosis_gh20648(self, xp):
+        # Some functions return NaN at infinity rather than 0 like they should.
+        # Check that this is accounted for.
+        ref = stats.yulesimon.moment(4, 5)
+        def f(x):
+            return stats.yulesimon._pmf(x, 5) * x**4
+
+        with np.errstate(invalid='ignore'):
+            assert np.isnan(f(np.inf))
+
+        res = nsum(f, 1, np.inf)
+        assert_allclose(res.sum, ref)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/vode.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/vode.py
new file mode 100644
index 0000000000000000000000000000000000000000..f92927901084ce33cdeb006057d85dd501b13aae
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/integrate/vode.py
@@ -0,0 +1,15 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="integrate", module="vode",
+                                   private_modules=["_vode"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..a1417abe144142078b38c45794f73178cec486b8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/__init__.py
@@ -0,0 +1,116 @@
+"""
+==================================
+Input and output (:mod:`scipy.io`)
+==================================
+
+.. currentmodule:: scipy.io
+
+SciPy has many modules, classes, and functions available to read data
+from and write data to a variety of file formats.
+
+.. seealso:: `NumPy IO routines `__
+
+MATLAB® files
+=============
+
+.. autosummary::
+   :toctree: generated/
+
+   loadmat - Read a MATLAB style mat file (version 4 through 7.1)
+   savemat - Write a MATLAB style mat file (version 4 through 7.1)
+   whosmat - List contents of a MATLAB style mat file (version 4 through 7.1)
+
+For low-level MATLAB reading and writing utilities, see `scipy.io.matlab`.
+
+IDL® files
+==========
+
+.. autosummary::
+   :toctree: generated/
+
+   readsav - Read an IDL 'save' file
+
+Matrix Market files
+===================
+
+.. autosummary::
+   :toctree: generated/
+
+   mminfo - Query matrix info from Matrix Market formatted file
+   mmread - Read matrix from Matrix Market formatted file
+   mmwrite - Write matrix to Matrix Market formatted file
+
+Unformatted Fortran files
+===============================
+
+.. autosummary::
+   :toctree: generated/
+
+   FortranFile - A file object for unformatted sequential Fortran files
+   FortranEOFError - Exception indicating the end of a well-formed file
+   FortranFormattingError - Exception indicating an inappropriate end
+
+Netcdf
+======
+
+.. autosummary::
+   :toctree: generated/
+
+   netcdf_file - A file object for NetCDF data
+   netcdf_variable - A data object for the netcdf module
+
+Harwell-Boeing files
+====================
+
+.. autosummary::
+   :toctree: generated/
+
+   hb_read   -- read H-B file
+   hb_write  -- write H-B file
+
+Wav sound files (:mod:`scipy.io.wavfile`)
+=========================================
+
+.. module:: scipy.io.wavfile
+
+.. autosummary::
+   :toctree: generated/
+
+   read
+   write
+   WavFileWarning
+
+Arff files (:mod:`scipy.io.arff`)
+=================================
+
+.. module:: scipy.io.arff
+
+.. autosummary::
+   :toctree: generated/
+
+   loadarff
+   MetaData
+   ArffError
+   ParseArffError
+"""
+# matfile read and write
+from .matlab import loadmat, savemat, whosmat
+
+# netCDF file support
+from ._netcdf import netcdf_file, netcdf_variable
+
+# Fortran file support
+from ._fortran import FortranFile, FortranEOFError, FortranFormattingError
+
+from ._fast_matrix_market import mminfo, mmread, mmwrite
+from ._idl import readsav
+from ._harwell_boeing import hb_read, hb_write
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import arff, harwell_boeing, idl, mmio, netcdf, wavfile
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fast_matrix_market/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fast_matrix_market/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..cfd6f8fb30ea8dcc2a9de7b1be23a9538c130718
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fast_matrix_market/__init__.py
@@ -0,0 +1,598 @@
+# Copyright (C) 2022-2023 Adam Lugowski. All rights reserved.
+# Use of this source code is governed by the BSD 2-clause license found in
+# the LICENSE.txt file.
+# SPDX-License-Identifier: BSD-2-Clause
+"""
+Matrix Market I/O with a C++ backend.
+See http://math.nist.gov/MatrixMarket/formats.html
+for information about the Matrix Market format.
+
+.. versionadded:: 1.12.0
+"""
+import io
+import os
+
+import numpy as np
+from scipy.sparse import coo_array, issparse, coo_matrix
+from scipy.io import _mmio
+
+__all__ = ['mminfo', 'mmread', 'mmwrite']
+
+PARALLELISM = 0
+"""
+Number of threads that `mmread()` and `mmwrite()` use.
+0 means number of CPUs in the system.
+Use `threadpoolctl` to set this value.
+"""
+
+ALWAYS_FIND_SYMMETRY = False
+"""
+Whether mmwrite() with symmetry='AUTO' will always search for symmetry
+inside the matrix. This is scipy.io._mmio.mmwrite()'s default behavior,
+but has a significant performance cost on large matrices.
+"""
+
+_field_to_dtype = {
+    "integer": "int64",
+    "unsigned-integer": "uint64",
+    "real": "float64",
+    "complex": "complex",
+    "pattern": "float64",
+}
+
+
+def _fmm_version():
+    from . import _fmm_core
+    return _fmm_core.__version__
+
+
+# Register with threadpoolctl, if available
+try:
+    import threadpoolctl
+
+    class _FMMThreadPoolCtlController(threadpoolctl.LibController):
+        user_api = "scipy"
+        internal_api = "scipy_mmio"
+
+        filename_prefixes = ("_fmm_core",)
+
+        def get_num_threads(self):
+            global PARALLELISM
+            return PARALLELISM
+
+        def set_num_threads(self, num_threads):
+            global PARALLELISM
+            PARALLELISM = num_threads
+
+        def get_version(self):
+            return _fmm_version
+
+        def set_additional_attributes(self):
+            pass
+
+    threadpoolctl.register(_FMMThreadPoolCtlController)
+except (ImportError, AttributeError):
+    # threadpoolctl not installed or version too old
+    pass
+
+
+class _TextToBytesWrapper(io.BufferedReader):
+    """
+    Convert a TextIOBase string stream to a byte stream.
+    """
+
+    def __init__(self, text_io_buffer, encoding=None, errors=None, **kwargs):
+        super().__init__(text_io_buffer, **kwargs)
+        self.encoding = encoding or text_io_buffer.encoding or 'utf-8'
+        self.errors = errors or text_io_buffer.errors or 'strict'
+
+    def __del__(self):
+        # do not close the wrapped stream
+        self.detach()
+
+    def _encoding_call(self, method_name, *args, **kwargs):
+        raw_method = getattr(self.raw, method_name)
+        val = raw_method(*args, **kwargs)
+        return val.encode(self.encoding, errors=self.errors)
+
+    def read(self, size=-1):
+        return self._encoding_call('read', size)
+
+    def read1(self, size=-1):
+        return self._encoding_call('read1', size)
+
+    def peek(self, size=-1):
+        return self._encoding_call('peek', size)
+
+    def seek(self, offset, whence=0):
+        # Random seeks are not allowed because of non-trivial conversion
+        # between byte and character offsets,
+        # with the possibility of a byte offset landing within a character.
+        if offset == 0 and whence == 0 or \
+           offset == 0 and whence == 2:
+            # seek to start or end is ok
+            super().seek(offset, whence)
+        else:
+            # Drop any other seek
+            # In this application this may happen when pystreambuf seeks during sync(),
+            # which can happen when closing a partially-read stream.
+            # Ex. when mminfo() only reads the header then exits.
+            pass
+
+
+def _read_body_array(cursor):
+    """
+    Read MatrixMarket array body
+    """
+    from . import _fmm_core
+
+    vals = np.zeros(cursor.header.shape, dtype=_field_to_dtype.get(cursor.header.field))
+    _fmm_core.read_body_array(cursor, vals)
+    return vals
+
+
+def _read_body_coo(cursor, generalize_symmetry=True):
+    """
+    Read MatrixMarket coordinate body
+    """
+    from . import _fmm_core
+
+    index_dtype = "int32"
+    if cursor.header.nrows >= 2**31 or cursor.header.ncols >= 2**31:
+        # Dimensions are too large to fit in int32
+        index_dtype = "int64"
+
+    i = np.zeros(cursor.header.nnz, dtype=index_dtype)
+    j = np.zeros(cursor.header.nnz, dtype=index_dtype)
+    data = np.zeros(cursor.header.nnz, dtype=_field_to_dtype.get(cursor.header.field))
+
+    _fmm_core.read_body_coo(cursor, i, j, data)
+
+    if generalize_symmetry and cursor.header.symmetry != "general":
+        off_diagonal_mask = (i != j)
+        off_diagonal_rows = i[off_diagonal_mask]
+        off_diagonal_cols = j[off_diagonal_mask]
+        off_diagonal_data = data[off_diagonal_mask]
+
+        if cursor.header.symmetry == "skew-symmetric":
+            off_diagonal_data *= -1
+        elif cursor.header.symmetry == "hermitian":
+            off_diagonal_data = off_diagonal_data.conjugate()
+
+        i = np.concatenate((i, off_diagonal_cols))
+        j = np.concatenate((j, off_diagonal_rows))
+        data = np.concatenate((data, off_diagonal_data))
+
+    return (data, (i, j)), cursor.header.shape
+
+
+def _get_read_cursor(source, parallelism=None):
+    """
+    Open file for reading.
+    """
+    from . import _fmm_core
+
+    ret_stream_to_close = None
+    if parallelism is None:
+        parallelism = PARALLELISM
+
+    try:
+        source = os.fspath(source)
+        # It's a file path
+        is_path = True
+    except TypeError:
+        is_path = False
+
+    if is_path:
+        path = str(source)
+        if path.endswith('.gz'):
+            import gzip
+            source = gzip.GzipFile(path, 'r')
+            ret_stream_to_close = source
+        elif path.endswith('.bz2'):
+            import bz2
+            source = bz2.BZ2File(path, 'rb')
+            ret_stream_to_close = source
+        else:
+            return _fmm_core.open_read_file(path, parallelism), ret_stream_to_close
+
+    # Stream object.
+    if hasattr(source, "read"):
+        if isinstance(source, io.TextIOBase):
+            source = _TextToBytesWrapper(source)
+        return _fmm_core.open_read_stream(source, parallelism), ret_stream_to_close
+    else:
+        raise TypeError("Unknown source type")
+
+
+def _get_write_cursor(target, h=None, comment=None, parallelism=None,
+                      symmetry="general", precision=None):
+    """
+    Open file for writing.
+    """
+    from . import _fmm_core
+
+    if parallelism is None:
+        parallelism = PARALLELISM
+    if comment is None:
+        comment = ''
+    if symmetry is None:
+        symmetry = "general"
+    if precision is None:
+        precision = -1
+
+    if not h:
+        h = _fmm_core.header(comment=comment, symmetry=symmetry)
+
+    try:
+        target = os.fspath(target)
+        # It's a file path
+        if target[-4:] != '.mtx':
+            target += '.mtx'
+        return _fmm_core.open_write_file(str(target), h, parallelism, precision)
+    except TypeError:
+        pass
+
+    if hasattr(target, "write"):
+        # Stream object.
+        if isinstance(target, io.TextIOBase):
+            raise TypeError("target stream must be open in binary mode.")
+        return _fmm_core.open_write_stream(target, h, parallelism, precision)
+    else:
+        raise TypeError("Unknown source object")
+
+
+def _apply_field(data, field, no_pattern=False):
+    """
+    Ensure that ``data.dtype`` is compatible with the specified MatrixMarket field type.
+
+    Parameters
+    ----------
+    data : ndarray
+        Input array.
+
+    field : str
+        Matrix Market field, such as 'real', 'complex', 'integer', 'pattern'.
+
+    no_pattern : bool, optional
+        Whether an empty array may be returned for a 'pattern' field.
+
+    Returns
+    -------
+    data : ndarray
+        Input data if no conversion necessary, or a converted version
+    """
+
+    if field is None:
+        return data
+    if field == "pattern":
+        if no_pattern:
+            return data
+        else:
+            return np.zeros(0)
+
+    dtype = _field_to_dtype.get(field, None)
+    if dtype is None:
+        raise ValueError("Invalid field.")
+
+    return np.asarray(data, dtype=dtype)
+
+
+def _validate_symmetry(symmetry):
+    """
+    Check that the symmetry parameter is one that MatrixMarket allows..
+    """
+    if symmetry is None:
+        return "general"
+
+    symmetry = str(symmetry).lower()
+    symmetries = ["general", "symmetric", "skew-symmetric", "hermitian"]
+    if symmetry not in symmetries:
+        raise ValueError("Invalid symmetry. Must be one of: " + ", ".join(symmetries))
+
+    return symmetry
+
+
+def mmread(source, *, spmatrix=True):
+    """
+    Reads the contents of a Matrix Market file-like 'source' into a matrix.
+
+    Parameters
+    ----------
+    source : str or file-like
+        Matrix Market filename (extensions .mtx, .mtz.gz)
+        or open file-like object.
+    spmatrix : bool, optional (default: True)
+        If ``True``, return sparse ``coo_matrix``. Otherwise return ``coo_array``.
+
+    Returns
+    -------
+    a : ndarray or coo_array
+        Dense or sparse array depending on the matrix format in the
+        Matrix Market file.
+
+    Notes
+    -----
+    .. versionchanged:: 1.12.0
+        C++ implementation.
+
+    Examples
+    --------
+    >>> from io import StringIO
+    >>> from scipy.io import mmread
+
+    >>> text = '''%%MatrixMarket matrix coordinate real general
+    ...  5 5 7
+    ...  2 3 1.0
+    ...  3 4 2.0
+    ...  3 5 3.0
+    ...  4 1 4.0
+    ...  4 2 5.0
+    ...  4 3 6.0
+    ...  4 4 7.0
+    ... '''
+
+    ``mmread(source)`` returns the data as sparse array in COO format.
+
+    >>> m = mmread(StringIO(text), spmatrix=False)
+    >>> m
+    
+    >>> m.toarray()
+    array([[0., 0., 0., 0., 0.],
+           [0., 0., 1., 0., 0.],
+           [0., 0., 0., 2., 3.],
+           [4., 5., 6., 7., 0.],
+           [0., 0., 0., 0., 0.]])
+
+    This method is threaded.
+    The default number of threads is equal to the number of CPUs in the system.
+    Use `threadpoolctl `_ to override:
+
+    >>> import threadpoolctl
+    >>>
+    >>> with threadpoolctl.threadpool_limits(limits=2):
+    ...     m = mmread(StringIO(text), spmatrix=False)
+
+    """
+    cursor, stream_to_close = _get_read_cursor(source)
+
+    if cursor.header.format == "array":
+        mat = _read_body_array(cursor)
+        if stream_to_close:
+            stream_to_close.close()
+        return mat
+    else:
+        triplet, shape = _read_body_coo(cursor, generalize_symmetry=True)
+        if stream_to_close:
+            stream_to_close.close()
+        if spmatrix:
+            return coo_matrix(triplet, shape=shape)
+        return coo_array(triplet, shape=shape)
+
+
+def mmwrite(target, a, comment=None, field=None, precision=None, symmetry="AUTO"):
+    r"""
+    Writes the sparse or dense array `a` to Matrix Market file-like `target`.
+
+    Parameters
+    ----------
+    target : str or file-like
+        Matrix Market filename (extension .mtx) or open file-like object.
+    a : array like
+        Sparse or dense 2-D array.
+    comment : str, optional
+        Comments to be prepended to the Matrix Market file.
+    field : None or str, optional
+        Either 'real', 'complex', 'pattern', or 'integer'.
+    precision : None or int, optional
+        Number of digits to display for real or complex values.
+    symmetry : None or str, optional
+        Either 'AUTO', 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+        If symmetry is None the symmetry type of 'a' is determined by its
+        values. If symmetry is 'AUTO' the symmetry type of 'a' is either
+        determined or set to 'general', at mmwrite's discretion.
+
+    Returns
+    -------
+    None
+
+    Notes
+    -----
+    .. versionchanged:: 1.12.0
+        C++ implementation.
+
+    Examples
+    --------
+    >>> from io import BytesIO
+    >>> import numpy as np
+    >>> from scipy.sparse import coo_array
+    >>> from scipy.io import mmwrite
+
+    Write a small NumPy array to a matrix market file.  The file will be
+    written in the ``'array'`` format.
+
+    >>> a = np.array([[1.0, 0, 0, 0], [0, 2.5, 0, 6.25]])
+    >>> target = BytesIO()
+    >>> mmwrite(target, a)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array real general
+    %
+    2 4
+    1
+    0
+    0
+    2.5
+    0
+    0
+    0
+    6.25
+
+    Add a comment to the output file, and set the precision to 3.
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, a, comment='\n Some test data.\n', precision=3)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array real general
+    %
+    % Some test data.
+    %
+    2 4
+    1.00e+00
+    0.00e+00
+    0.00e+00
+    2.50e+00
+    0.00e+00
+    0.00e+00
+    0.00e+00
+    6.25e+00
+
+    Convert to a sparse matrix before calling ``mmwrite``.  This will
+    result in the output format being ``'coordinate'`` rather than
+    ``'array'``.
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, coo_array(a), precision=3)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix coordinate real general
+    %
+    2 4 3
+    1 1 1.00e+00
+    2 2 2.50e+00
+    2 4 6.25e+00
+
+    Write a complex Hermitian array to a matrix market file.  Note that
+    only six values are actually written to the file; the other values
+    are implied by the symmetry.
+
+    >>> z = np.array([[3, 1+2j, 4-3j], [1-2j, 1, -5j], [4+3j, 5j, 2.5]])
+    >>> z
+    array([[ 3. +0.j,  1. +2.j,  4. -3.j],
+           [ 1. -2.j,  1. +0.j, -0. -5.j],
+           [ 4. +3.j,  0. +5.j,  2.5+0.j]])
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, z, precision=2)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array complex hermitian
+    %
+    3 3
+    3.0e+00 0.0e+00
+    1.0e+00 -2.0e+00
+    4.0e+00 3.0e+00
+    1.0e+00 0.0e+00
+    0.0e+00 5.0e+00
+    2.5e+00 0.0e+00
+
+    This method is threaded.
+    The default number of threads is equal to the number of CPUs in the system.
+    Use `threadpoolctl `_ to override:
+
+    >>> import threadpoolctl
+    >>>
+    >>> target = BytesIO()
+    >>> with threadpoolctl.threadpool_limits(limits=2):
+    ...     mmwrite(target, a)
+
+    """
+    from . import _fmm_core
+
+    if isinstance(a, list) or isinstance(a, tuple) or hasattr(a, "__array__"):
+        a = np.asarray(a)
+
+    if symmetry == "AUTO":
+        if ALWAYS_FIND_SYMMETRY or (hasattr(a, "shape") and max(a.shape) < 100):
+            symmetry = None
+        else:
+            symmetry = "general"
+
+    if symmetry is None:
+        symmetry = _mmio.MMFile()._get_symmetry(a)
+
+    symmetry = _validate_symmetry(symmetry)
+    cursor = _get_write_cursor(target, comment=comment,
+                               precision=precision, symmetry=symmetry)
+
+    if isinstance(a, np.ndarray):
+        # Write dense numpy arrays
+        a = _apply_field(a, field, no_pattern=True)
+        _fmm_core.write_body_array(cursor, a)
+
+    elif issparse(a):
+        # Write sparse scipy matrices
+        a = a.tocoo()
+
+        if symmetry is not None and symmetry != "general":
+            # A symmetric matrix only specifies the elements below the diagonal.
+            # Ensure that the matrix satisfies this requirement.
+            lower_triangle_mask = a.row >= a.col
+            a = coo_array((a.data[lower_triangle_mask],
+                              (a.row[lower_triangle_mask],
+                               a.col[lower_triangle_mask])), shape=a.shape)
+
+        data = _apply_field(a.data, field)
+        _fmm_core.write_body_coo(cursor, a.shape, a.row, a.col, data)
+
+    else:
+        raise ValueError(f"unknown matrix type: {type(a)}")
+
+
+def mminfo(source):
+    """
+    Return size and storage parameters from Matrix Market file-like 'source'.
+
+    Parameters
+    ----------
+    source : str or file-like
+        Matrix Market filename (extension .mtx) or open file-like object
+
+    Returns
+    -------
+    rows : int
+        Number of matrix rows.
+    cols : int
+        Number of matrix columns.
+    entries : int
+        Number of non-zero entries of a sparse matrix
+        or rows*cols for a dense matrix.
+    format : str
+        Either 'coordinate' or 'array'.
+    field : str
+        Either 'real', 'complex', 'pattern', or 'integer'.
+    symmetry : str
+        Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+
+    Notes
+    -----
+    .. versionchanged:: 1.12.0
+        C++ implementation.
+
+    Examples
+    --------
+    >>> from io import StringIO
+    >>> from scipy.io import mminfo
+
+    >>> text = '''%%MatrixMarket matrix coordinate real general
+    ...  5 5 7
+    ...  2 3 1.0
+    ...  3 4 2.0
+    ...  3 5 3.0
+    ...  4 1 4.0
+    ...  4 2 5.0
+    ...  4 3 6.0
+    ...  4 4 7.0
+    ... '''
+
+
+    ``mminfo(source)`` returns the number of rows, number of columns,
+    format, field type and symmetry attribute of the source file.
+
+    >>> mminfo(StringIO(text))
+    (5, 5, 7, 'coordinate', 'real', 'general')
+    """
+    cursor, stream_to_close = _get_read_cursor(source, 1)
+    h = cursor.header
+    cursor.close()
+    if stream_to_close:
+        stream_to_close.close()
+    return h.nrows, h.ncols, h.nnz, h.format, h.field, h.symmetry
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fortran.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fortran.py
new file mode 100644
index 0000000000000000000000000000000000000000..ac491dce68fe2f2f171dcee5a3097b0f4c4ea10c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_fortran.py
@@ -0,0 +1,354 @@
+"""
+Module to read / write Fortran unformatted sequential files.
+
+This is in the spirit of code written by Neil Martinsen-Burrell and Joe Zuntz.
+
+"""
+import warnings
+import numpy as np
+
+__all__ = ['FortranFile', 'FortranEOFError', 'FortranFormattingError']
+
+
+class FortranEOFError(TypeError, OSError):
+    """Indicates that the file ended properly.
+
+    This error descends from TypeError because the code used to raise
+    TypeError (and this was the only way to know that the file had
+    ended) so users might have ``except TypeError:``.
+
+    """
+    pass
+
+
+class FortranFormattingError(TypeError, OSError):
+    """Indicates that the file ended mid-record.
+
+    Descends from TypeError for backward compatibility.
+
+    """
+    pass
+
+
+class FortranFile:
+    """
+    A file object for unformatted sequential files from Fortran code.
+
+    Parameters
+    ----------
+    filename : file or str
+        Open file object or filename.
+    mode : {'r', 'w'}, optional
+        Read-write mode, default is 'r'.
+    header_dtype : dtype, optional
+        Data type of the header. Size and endianness must match the input/output file.
+
+    Notes
+    -----
+    These files are broken up into records of unspecified types. The size of
+    each record is given at the start (although the size of this header is not
+    standard) and the data is written onto disk without any formatting. Fortran
+    compilers supporting the BACKSPACE statement will write a second copy of
+    the size to facilitate backwards seeking.
+
+    This class only supports files written with both sizes for the record.
+    It also does not support the subrecords used in Intel and gfortran compilers
+    for records which are greater than 2GB with a 4-byte header.
+
+    An example of an unformatted sequential file in Fortran would be written as::
+
+        OPEN(1, FILE=myfilename, FORM='unformatted')
+
+        WRITE(1) myvariable
+
+    Since this is a non-standard file format, whose contents depend on the
+    compiler and the endianness of the machine, caution is advised. Files from
+    gfortran 4.8.0 and gfortran 4.1.2 on x86_64 are known to work.
+
+    Consider using Fortran direct-access files or files from the newer Stream
+    I/O, which can be easily read by `numpy.fromfile`.
+
+    Examples
+    --------
+    To create an unformatted sequential Fortran file:
+
+    >>> from scipy.io import FortranFile
+    >>> import numpy as np
+    >>> f = FortranFile('test.unf', 'w')
+    >>> f.write_record(np.array([1,2,3,4,5], dtype=np.int32))
+    >>> f.write_record(np.linspace(0,1,20).reshape((5,4)).T)
+    >>> f.close()
+
+    To read this file:
+
+    >>> f = FortranFile('test.unf', 'r')
+    >>> print(f.read_ints(np.int32))
+    [1 2 3 4 5]
+    >>> print(f.read_reals(float).reshape((5,4), order="F"))
+    [[0.         0.05263158 0.10526316 0.15789474]
+     [0.21052632 0.26315789 0.31578947 0.36842105]
+     [0.42105263 0.47368421 0.52631579 0.57894737]
+     [0.63157895 0.68421053 0.73684211 0.78947368]
+     [0.84210526 0.89473684 0.94736842 1.        ]]
+    >>> f.close()
+
+    Or, in Fortran::
+
+        integer :: a(5), i
+        double precision :: b(5,4)
+        open(1, file='test.unf', form='unformatted')
+        read(1) a
+        read(1) b
+        close(1)
+        write(*,*) a
+        do i = 1, 5
+            write(*,*) b(i,:)
+        end do
+
+    """
+    def __init__(self, filename, mode='r', header_dtype=np.uint32):
+        if header_dtype is None:
+            raise ValueError('Must specify dtype')
+
+        header_dtype = np.dtype(header_dtype)
+        if header_dtype.kind != 'u':
+            warnings.warn("Given a dtype which is not unsigned.", stacklevel=2)
+
+        if mode not in 'rw' or len(mode) != 1:
+            raise ValueError('mode must be either r or w')
+
+        if hasattr(filename, 'seek'):
+            self._fp = filename
+        else:
+            self._fp = open(filename, f'{mode}b')
+
+        self._header_dtype = header_dtype
+
+    def _read_size(self, eof_ok=False):
+        n = self._header_dtype.itemsize
+        b = self._fp.read(n)
+        if (not b) and eof_ok:
+            raise FortranEOFError("End of file occurred at end of record")
+        elif len(b) < n:
+            raise FortranFormattingError(
+                "End of file in the middle of the record size")
+        return int(np.frombuffer(b, dtype=self._header_dtype, count=1)[0])
+
+    def write_record(self, *items):
+        """
+        Write a record (including sizes) to the file.
+
+        Parameters
+        ----------
+        *items : array_like
+            The data arrays to write.
+
+        Notes
+        -----
+        Writes data items to a file::
+
+            write_record(a.T, b.T, c.T, ...)
+
+            write(1) a, b, c, ...
+
+        Note that data in multidimensional arrays is written in
+        row-major order --- to make them read correctly by Fortran
+        programs, you need to transpose the arrays yourself when
+        writing them.
+
+        """
+        items = tuple(np.asarray(item) for item in items)
+        total_size = sum(item.nbytes for item in items)
+
+        nb = np.array([total_size], dtype=self._header_dtype)
+
+        nb.tofile(self._fp)
+        for item in items:
+            item.tofile(self._fp)
+        nb.tofile(self._fp)
+
+    def read_record(self, *dtypes, **kwargs):
+        """
+        Reads a record of a given type from the file.
+
+        Parameters
+        ----------
+        *dtypes : dtypes, optional
+            Data type(s) specifying the size and endianness of the data.
+
+        Returns
+        -------
+        data : ndarray
+            A 1-D array object.
+
+        Raises
+        ------
+        FortranEOFError
+            To signal that no further records are available
+        FortranFormattingError
+            To signal that the end of the file was encountered
+            part-way through a record
+
+        Notes
+        -----
+        If the record contains a multidimensional array, you can specify
+        the size in the dtype. For example::
+
+            INTEGER var(5,4)
+
+        can be read with::
+
+            read_record('(4,5)i4').T
+
+        Note that this function does **not** assume the file data is in Fortran
+        column major order, so you need to (i) swap the order of dimensions
+        when reading and (ii) transpose the resulting array.
+
+        Alternatively, you can read the data as a 1-D array and handle the
+        ordering yourself. For example::
+
+            read_record('i4').reshape(5, 4, order='F')
+
+        For records that contain several variables or mixed types (as opposed
+        to single scalar or array types), give them as separate arguments::
+
+            double precision :: a
+            integer :: b
+            write(1) a, b
+
+            record = f.read_record(' 0, -n and n if n < 0
+
+        Parameters
+        ----------
+        n : int
+            max number one wants to be able to represent
+        min : int
+            minimum number of characters to use for the format
+
+        Returns
+        -------
+        res : IntFormat
+            IntFormat instance with reasonable (see Notes) computed width
+
+        Notes
+        -----
+        Reasonable should be understood as the minimal string length necessary
+        without losing precision. For example, IntFormat.from_number(1) will
+        return an IntFormat instance of width 2, so that any 0 and 1 may be
+        represented as 1-character strings without loss of information.
+        """
+        width = number_digits(n) + 1
+        if n < 0:
+            width += 1
+        repeat = 80 // width
+        return cls(width, min, repeat=repeat)
+
+    def __init__(self, width, min=None, repeat=None):
+        self.width = width
+        self.repeat = repeat
+        self.min = min
+
+    def __repr__(self):
+        r = "IntFormat("
+        if self.repeat:
+            r += "%d" % self.repeat
+        r += "I%d" % self.width
+        if self.min:
+            r += ".%d" % self.min
+        return r + ")"
+
+    @property
+    def fortran_format(self):
+        r = "("
+        if self.repeat:
+            r += "%d" % self.repeat
+        r += "I%d" % self.width
+        if self.min:
+            r += ".%d" % self.min
+        return r + ")"
+
+    @property
+    def python_format(self):
+        return "%" + str(self.width) + "d"
+
+
+class ExpFormat:
+    @classmethod
+    def from_number(cls, n, min=None):
+        """Given a float number, returns a "reasonable" ExpFormat instance to
+        represent any number between -n and n.
+
+        Parameters
+        ----------
+        n : float
+            max number one wants to be able to represent
+        min : int
+            minimum number of characters to use for the format
+
+        Returns
+        -------
+        res : ExpFormat
+            ExpFormat instance with reasonable (see Notes) computed width
+
+        Notes
+        -----
+        Reasonable should be understood as the minimal string length necessary
+        to avoid losing precision.
+        """
+        # len of one number in exp format: sign + 1|0 + "." +
+        # number of digit for fractional part + 'E' + sign of exponent +
+        # len of exponent
+        finfo = np.finfo(n.dtype)
+        # Number of digits for fractional part
+        n_prec = finfo.precision + 1
+        # Number of digits for exponential part
+        n_exp = number_digits(np.max(np.abs([finfo.maxexp, finfo.minexp])))
+        width = 1 + 1 + n_prec + 1 + n_exp + 1
+        if n < 0:
+            width += 1
+        repeat = int(np.floor(80 / width))
+        return cls(width, n_prec, min, repeat=repeat)
+
+    def __init__(self, width, significand, min=None, repeat=None):
+        """\
+        Parameters
+        ----------
+        width : int
+            number of characters taken by the string (includes space).
+        """
+        self.width = width
+        self.significand = significand
+        self.repeat = repeat
+        self.min = min
+
+    def __repr__(self):
+        r = "ExpFormat("
+        if self.repeat:
+            r += "%d" % self.repeat
+        r += "E%d.%d" % (self.width, self.significand)
+        if self.min:
+            r += "E%d" % self.min
+        return r + ")"
+
+    @property
+    def fortran_format(self):
+        r = "("
+        if self.repeat:
+            r += "%d" % self.repeat
+        r += "E%d.%d" % (self.width, self.significand)
+        if self.min:
+            r += "E%d" % self.min
+        return r + ")"
+
+    @property
+    def python_format(self):
+        return "%" + str(self.width-1) + "." + str(self.significand) + "E"
+
+
+class Token:
+    def __init__(self, type, value, pos):
+        self.type = type
+        self.value = value
+        self.pos = pos
+
+    def __str__(self):
+        return f"""Token('{self.type}', "{self.value}")"""
+
+    def __repr__(self):
+        return self.__str__()
+
+
+class Tokenizer:
+    def __init__(self):
+        self.tokens = list(TOKENS.keys())
+        self.res = [re.compile(TOKENS[i]) for i in self.tokens]
+
+    def input(self, s):
+        self.data = s
+        self.curpos = 0
+        self.len = len(s)
+
+    def next_token(self):
+        curpos = self.curpos
+
+        while curpos < self.len:
+            for i, r in enumerate(self.res):
+                m = r.match(self.data, curpos)
+                if m is None:
+                    continue
+                else:
+                    self.curpos = m.end()
+                    return Token(self.tokens[i], m.group(), self.curpos)
+            raise SyntaxError("Unknown character at position %d (%s)"
+                              % (self.curpos, self.data[curpos]))
+
+
+# Grammar for fortran format:
+# format            : LPAR format_string RPAR
+# format_string     : repeated | simple
+# repeated          : repeat simple
+# simple            : int_fmt | exp_fmt
+# int_fmt           : INT_ID width
+# exp_fmt           : simple_exp_fmt
+# simple_exp_fmt    : EXP_ID width DOT significand
+# extended_exp_fmt  : EXP_ID width DOT significand EXP_ID ndigits
+# repeat            : INT
+# width             : INT
+# significand       : INT
+# ndigits           : INT
+
+# Naive fortran formatter - parser is hand-made
+class FortranFormatParser:
+    """Parser for Fortran format strings. The parse method returns a *Format
+    instance.
+
+    Notes
+    -----
+    Only ExpFormat (exponential format for floating values) and IntFormat
+    (integer format) for now.
+    """
+    def __init__(self):
+        self.tokenizer = threading.local()
+
+    def parse(self, s):
+        if not hasattr(self.tokenizer, 't'):
+            self.tokenizer.t = Tokenizer()
+
+        self.tokenizer.t.input(s)
+
+        tokens = []
+
+        try:
+            while True:
+                t = self.tokenizer.t.next_token()
+                if t is None:
+                    break
+                else:
+                    tokens.append(t)
+            return self._parse_format(tokens)
+        except SyntaxError as e:
+            raise BadFortranFormat(str(e)) from e
+
+    def _get_min(self, tokens):
+        next = tokens.pop(0)
+        if not next.type == "DOT":
+            raise SyntaxError()
+        next = tokens.pop(0)
+        return next.value
+
+    def _expect(self, token, tp):
+        if not token.type == tp:
+            raise SyntaxError()
+
+    def _parse_format(self, tokens):
+        if not tokens[0].type == "LPAR":
+            raise SyntaxError("Expected left parenthesis at position "
+                              "%d (got '%s')" % (0, tokens[0].value))
+        elif not tokens[-1].type == "RPAR":
+            raise SyntaxError("Expected right parenthesis at position "
+                              f"{len(tokens)} (got '{tokens[-1].value}')")
+
+        tokens = tokens[1:-1]
+        types = [t.type for t in tokens]
+        if types[0] == "INT":
+            repeat = int(tokens.pop(0).value)
+        else:
+            repeat = None
+
+        next = tokens.pop(0)
+        if next.type == "INT_ID":
+            next = self._next(tokens, "INT")
+            width = int(next.value)
+            if tokens:
+                min = int(self._get_min(tokens))
+            else:
+                min = None
+            return IntFormat(width, min, repeat)
+        elif next.type == "EXP_ID":
+            next = self._next(tokens, "INT")
+            width = int(next.value)
+
+            next = self._next(tokens, "DOT")
+
+            next = self._next(tokens, "INT")
+            significand = int(next.value)
+
+            if tokens:
+                next = self._next(tokens, "EXP_ID")
+
+                next = self._next(tokens, "INT")
+                min = int(next.value)
+            else:
+                min = None
+            return ExpFormat(width, significand, min, repeat)
+        else:
+            raise SyntaxError(f"Invalid formatter type {next.value}")
+
+    def _next(self, tokens, tp):
+        if not len(tokens) > 0:
+            raise SyntaxError()
+        next = tokens.pop(0)
+        self._expect(next, tp)
+        return next
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/hb.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/hb.py
new file mode 100644
index 0000000000000000000000000000000000000000..96fef89ac35a271f3a5501beaefd06da13ede685
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/hb.py
@@ -0,0 +1,575 @@
+"""
+Implementation of Harwell-Boeing read/write.
+
+At the moment not the full Harwell-Boeing format is supported. Supported
+features are:
+
+    - assembled, non-symmetric, real matrices
+    - integer for pointer/indices
+    - exponential format for float values, and int format
+
+"""
+# TODO:
+#   - Add more support (symmetric/complex matrices, non-assembled matrices ?)
+
+# XXX: reading is reasonably efficient (>= 85 % is in numpy.fromstring), but
+# takes a lot of memory. Being faster would require compiled code.
+# write is not efficient. Although not a terribly exciting task,
+# having reusable facilities to efficiently read/write fortran-formatted files
+# would be useful outside this module.
+
+import warnings
+
+import numpy as np
+from scipy.sparse import csc_array, csc_matrix
+from ._fortran_format_parser import FortranFormatParser, IntFormat, ExpFormat
+
+__all__ = ["hb_read", "hb_write"]
+
+
+class MalformedHeader(Exception):
+    pass
+
+
+class LineOverflow(Warning):
+    pass
+
+
+def _nbytes_full(fmt, nlines):
+    """Return the number of bytes to read to get every full lines for the
+    given parsed fortran format."""
+    return (fmt.repeat * fmt.width + 1) * (nlines - 1)
+
+
+class HBInfo:
+    @classmethod
+    def from_data(cls, m, title="Default title", key="0", mxtype=None, fmt=None):
+        """Create a HBInfo instance from an existing sparse matrix.
+
+        Parameters
+        ----------
+        m : sparse array or matrix
+            the HBInfo instance will derive its parameters from m
+        title : str
+            Title to put in the HB header
+        key : str
+            Key
+        mxtype : HBMatrixType
+            type of the input matrix
+        fmt : dict
+            not implemented
+
+        Returns
+        -------
+        hb_info : HBInfo instance
+        """
+        m = m.tocsc(copy=False)
+
+        pointer = m.indptr
+        indices = m.indices
+        values = m.data
+
+        nrows, ncols = m.shape
+        nnon_zeros = m.nnz
+
+        if fmt is None:
+            # +1 because HB use one-based indexing (Fortran), and we will write
+            # the indices /pointer as such
+            pointer_fmt = IntFormat.from_number(np.max(pointer+1))
+            indices_fmt = IntFormat.from_number(np.max(indices+1))
+
+            if values.dtype.kind in np.typecodes["AllFloat"]:
+                values_fmt = ExpFormat.from_number(-np.max(np.abs(values)))
+            elif values.dtype.kind in np.typecodes["AllInteger"]:
+                values_fmt = IntFormat.from_number(-np.max(np.abs(values)))
+            else:
+                message = f"type {values.dtype.kind} not implemented yet"
+                raise NotImplementedError(message)
+        else:
+            raise NotImplementedError("fmt argument not supported yet.")
+
+        if mxtype is None:
+            if not np.isrealobj(values):
+                raise ValueError("Complex values not supported yet")
+            if values.dtype.kind in np.typecodes["AllInteger"]:
+                tp = "integer"
+            elif values.dtype.kind in np.typecodes["AllFloat"]:
+                tp = "real"
+            else:
+                raise NotImplementedError(
+                    f"type {values.dtype} for values not implemented")
+            mxtype = HBMatrixType(tp, "unsymmetric", "assembled")
+        else:
+            raise ValueError("mxtype argument not handled yet.")
+
+        def _nlines(fmt, size):
+            nlines = size // fmt.repeat
+            if nlines * fmt.repeat != size:
+                nlines += 1
+            return nlines
+
+        pointer_nlines = _nlines(pointer_fmt, pointer.size)
+        indices_nlines = _nlines(indices_fmt, indices.size)
+        values_nlines = _nlines(values_fmt, values.size)
+
+        total_nlines = pointer_nlines + indices_nlines + values_nlines
+
+        return cls(title, key,
+            total_nlines, pointer_nlines, indices_nlines, values_nlines,
+            mxtype, nrows, ncols, nnon_zeros,
+            pointer_fmt.fortran_format, indices_fmt.fortran_format,
+            values_fmt.fortran_format)
+
+    @classmethod
+    def from_file(cls, fid):
+        """Create a HBInfo instance from a file object containing a matrix in the
+        HB format.
+
+        Parameters
+        ----------
+        fid : file-like matrix
+            File or file-like object containing a matrix in the HB format.
+
+        Returns
+        -------
+        hb_info : HBInfo instance
+        """
+        # First line
+        line = fid.readline().strip("\n")
+        if not len(line) > 72:
+            raise ValueError("Expected at least 72 characters for first line, "
+                             f"got: \n{line}")
+        title = line[:72]
+        key = line[72:]
+
+        # Second line
+        line = fid.readline().strip("\n")
+        if not len(line.rstrip()) >= 56:
+            raise ValueError("Expected at least 56 characters for second line, "
+                             f"got: \n{line}")
+        total_nlines = _expect_int(line[:14])
+        pointer_nlines = _expect_int(line[14:28])
+        indices_nlines = _expect_int(line[28:42])
+        values_nlines = _expect_int(line[42:56])
+
+        rhs_nlines = line[56:72].strip()
+        if rhs_nlines == '':
+            rhs_nlines = 0
+        else:
+            rhs_nlines = _expect_int(rhs_nlines)
+        if not rhs_nlines == 0:
+            raise ValueError("Only files without right hand side supported for "
+                             "now.")
+
+        # Third line
+        line = fid.readline().strip("\n")
+        if not len(line) >= 70:
+            raise ValueError(f"Expected at least 72 character for third line, "
+                             f"got:\n{line}")
+
+        mxtype_s = line[:3].upper()
+        if not len(mxtype_s) == 3:
+            raise ValueError("mxtype expected to be 3 characters long")
+
+        mxtype = HBMatrixType.from_fortran(mxtype_s)
+        if mxtype.value_type not in ["real", "integer"]:
+            raise ValueError("Only real or integer matrices supported for "
+                             f"now (detected {mxtype})")
+        if not mxtype.structure == "unsymmetric":
+            raise ValueError("Only unsymmetric matrices supported for "
+                             f"now (detected {mxtype})")
+        if not mxtype.storage == "assembled":
+            raise ValueError("Only assembled matrices supported for now")
+
+        if not line[3:14] == " " * 11:
+            raise ValueError(f"Malformed data for third line: {line}")
+
+        nrows = _expect_int(line[14:28])
+        ncols = _expect_int(line[28:42])
+        nnon_zeros = _expect_int(line[42:56])
+        nelementals = _expect_int(line[56:70])
+        if not nelementals == 0:
+            raise ValueError("Unexpected value %d for nltvl (last entry of line 3)"
+                             % nelementals)
+
+        # Fourth line
+        line = fid.readline().strip("\n")
+
+        ct = line.split()
+        if not len(ct) == 3:
+            raise ValueError(f"Expected 3 formats, got {ct}")
+
+        return cls(title, key,
+                   total_nlines, pointer_nlines, indices_nlines, values_nlines,
+                   mxtype, nrows, ncols, nnon_zeros,
+                   ct[0], ct[1], ct[2],
+                   rhs_nlines, nelementals)
+
+    def __init__(self, title, key,
+            total_nlines, pointer_nlines, indices_nlines, values_nlines,
+            mxtype, nrows, ncols, nnon_zeros,
+            pointer_format_str, indices_format_str, values_format_str,
+            right_hand_sides_nlines=0, nelementals=0):
+        """Do not use this directly, but the class ctrs (from_* functions)."""
+        if title is None:
+            title = "No Title"
+        if len(title) > 72:
+            raise ValueError("title cannot be > 72 characters")
+
+        if key is None:
+            key = "|No Key"
+        if len(key) > 8:
+            warnings.warn(f"key is > 8 characters (key is {key})",
+                          LineOverflow, stacklevel=3)
+        self.title = title
+        self.key = key
+
+        self.total_nlines = total_nlines
+        self.pointer_nlines = pointer_nlines
+        self.indices_nlines = indices_nlines
+        self.values_nlines = values_nlines
+
+        parser = FortranFormatParser()
+        pointer_format = parser.parse(pointer_format_str)
+        if not isinstance(pointer_format, IntFormat):
+            raise ValueError("Expected int format for pointer format, got "
+                             f"{pointer_format}")
+
+        indices_format = parser.parse(indices_format_str)
+        if not isinstance(indices_format, IntFormat):
+            raise ValueError("Expected int format for indices format, got "
+                             f"{indices_format}")
+
+        values_format = parser.parse(values_format_str)
+        if isinstance(values_format, ExpFormat):
+            if mxtype.value_type not in ["real", "complex"]:
+                raise ValueError(f"Inconsistency between matrix type {mxtype} and "
+                                 f"value type {values_format}")
+            values_dtype = np.float64
+        elif isinstance(values_format, IntFormat):
+            if mxtype.value_type not in ["integer"]:
+                raise ValueError(f"Inconsistency between matrix type {mxtype} and "
+                                 f"value type {values_format}")
+            # XXX: fortran int -> dtype association ?
+            values_dtype = int
+        else:
+            raise ValueError(f"Unsupported format for values {values_format!r}")
+
+        self.pointer_format = pointer_format
+        self.indices_format = indices_format
+        self.values_format = values_format
+
+        self.pointer_dtype = np.int32
+        self.indices_dtype = np.int32
+        self.values_dtype = values_dtype
+
+        self.pointer_nlines = pointer_nlines
+        self.pointer_nbytes_full = _nbytes_full(pointer_format, pointer_nlines)
+
+        self.indices_nlines = indices_nlines
+        self.indices_nbytes_full = _nbytes_full(indices_format, indices_nlines)
+
+        self.values_nlines = values_nlines
+        self.values_nbytes_full = _nbytes_full(values_format, values_nlines)
+
+        self.nrows = nrows
+        self.ncols = ncols
+        self.nnon_zeros = nnon_zeros
+        self.nelementals = nelementals
+        self.mxtype = mxtype
+
+    def dump(self):
+        """Gives the header corresponding to this instance as a string."""
+        header = [self.title.ljust(72) + self.key.ljust(8)]
+
+        header.append("%14d%14d%14d%14d" %
+                      (self.total_nlines, self.pointer_nlines,
+                       self.indices_nlines, self.values_nlines))
+        header.append("%14s%14d%14d%14d%14d" %
+                      (self.mxtype.fortran_format.ljust(14), self.nrows,
+                       self.ncols, self.nnon_zeros, 0))
+
+        pffmt = self.pointer_format.fortran_format
+        iffmt = self.indices_format.fortran_format
+        vffmt = self.values_format.fortran_format
+        header.append("%16s%16s%20s" %
+                      (pffmt.ljust(16), iffmt.ljust(16), vffmt.ljust(20)))
+        return "\n".join(header)
+
+
+def _expect_int(value, msg=None):
+    try:
+        return int(value)
+    except ValueError as e:
+        if msg is None:
+            msg = "Expected an int, got %s"
+        raise ValueError(msg % value) from e
+
+
+def _read_hb_data(content, header):
+    # XXX: look at a way to reduce memory here (big string creation)
+    ptr_string = "".join([content.read(header.pointer_nbytes_full),
+                           content.readline()])
+    ptr = np.fromstring(ptr_string,
+            dtype=int, sep=' ')
+
+    ind_string = "".join([content.read(header.indices_nbytes_full),
+                       content.readline()])
+    ind = np.fromstring(ind_string,
+            dtype=int, sep=' ')
+
+    val_string = "".join([content.read(header.values_nbytes_full),
+                          content.readline()])
+    val = np.fromstring(val_string,
+            dtype=header.values_dtype, sep=' ')
+
+    return csc_array((val, ind-1, ptr-1), shape=(header.nrows, header.ncols))
+
+
+def _write_data(m, fid, header):
+    m = m.tocsc(copy=False)
+
+    def write_array(f, ar, nlines, fmt):
+        # ar_nlines is the number of full lines, n is the number of items per
+        # line, ffmt the fortran format
+        pyfmt = fmt.python_format
+        pyfmt_full = pyfmt * fmt.repeat
+
+        # for each array to write, we first write the full lines, and special
+        # case for partial line
+        full = ar[:(nlines - 1) * fmt.repeat]
+        for row in full.reshape((nlines-1, fmt.repeat)):
+            f.write(pyfmt_full % tuple(row) + "\n")
+        nremain = ar.size - full.size
+        if nremain > 0:
+            f.write((pyfmt * nremain) % tuple(ar[ar.size - nremain:]) + "\n")
+
+    fid.write(header.dump())
+    fid.write("\n")
+    # +1 is for Fortran one-based indexing
+    write_array(fid, m.indptr+1, header.pointer_nlines,
+                header.pointer_format)
+    write_array(fid, m.indices+1, header.indices_nlines,
+                header.indices_format)
+    write_array(fid, m.data, header.values_nlines,
+                header.values_format)
+
+
+class HBMatrixType:
+    """Class to hold the matrix type."""
+    # q2f* translates qualified names to Fortran character
+    _q2f_type = {
+        "real": "R",
+        "complex": "C",
+        "pattern": "P",
+        "integer": "I",
+    }
+    _q2f_structure = {
+            "symmetric": "S",
+            "unsymmetric": "U",
+            "hermitian": "H",
+            "skewsymmetric": "Z",
+            "rectangular": "R"
+    }
+    _q2f_storage = {
+        "assembled": "A",
+        "elemental": "E",
+    }
+
+    _f2q_type = {j: i for i, j in _q2f_type.items()}
+    _f2q_structure = {j: i for i, j in _q2f_structure.items()}
+    _f2q_storage = {j: i for i, j in _q2f_storage.items()}
+
+    @classmethod
+    def from_fortran(cls, fmt):
+        if not len(fmt) == 3:
+            raise ValueError("Fortran format for matrix type should be 3 "
+                             "characters long")
+        try:
+            value_type = cls._f2q_type[fmt[0]]
+            structure = cls._f2q_structure[fmt[1]]
+            storage = cls._f2q_storage[fmt[2]]
+            return cls(value_type, structure, storage)
+        except KeyError as e:
+            raise ValueError(f"Unrecognized format {fmt}") from e
+
+    def __init__(self, value_type, structure, storage="assembled"):
+        self.value_type = value_type
+        self.structure = structure
+        self.storage = storage
+
+        if value_type not in self._q2f_type:
+            raise ValueError(f"Unrecognized type {value_type}")
+        if structure not in self._q2f_structure:
+            raise ValueError(f"Unrecognized structure {structure}")
+        if storage not in self._q2f_storage:
+            raise ValueError(f"Unrecognized storage {storage}")
+
+    @property
+    def fortran_format(self):
+        return self._q2f_type[self.value_type] + \
+               self._q2f_structure[self.structure] + \
+               self._q2f_storage[self.storage]
+
+    def __repr__(self):
+        return f"HBMatrixType({self.value_type}, {self.structure}, {self.storage})"
+
+
+class HBFile:
+    def __init__(self, file, hb_info=None):
+        """Create a HBFile instance.
+
+        Parameters
+        ----------
+        file : file-object
+            StringIO work as well
+        hb_info : HBInfo, optional
+            Should be given as an argument for writing, in which case the file
+            should be writable.
+        """
+        self._fid = file
+        if hb_info is None:
+            self._hb_info = HBInfo.from_file(file)
+        else:
+            #raise OSError("file %s is not writable, and hb_info "
+            #              "was given." % file)
+            self._hb_info = hb_info
+
+    @property
+    def title(self):
+        return self._hb_info.title
+
+    @property
+    def key(self):
+        return self._hb_info.key
+
+    @property
+    def type(self):
+        return self._hb_info.mxtype.value_type
+
+    @property
+    def structure(self):
+        return self._hb_info.mxtype.structure
+
+    @property
+    def storage(self):
+        return self._hb_info.mxtype.storage
+
+    def read_matrix(self):
+        return _read_hb_data(self._fid, self._hb_info)
+
+    def write_matrix(self, m):
+        return _write_data(m, self._fid, self._hb_info)
+
+
+def hb_read(path_or_open_file, *, spmatrix=True):
+    """Read HB-format file.
+
+    Parameters
+    ----------
+    path_or_open_file : path-like or file-like
+        If a file-like object, it is used as-is. Otherwise, it is opened
+        before reading.
+    spmatrix : bool, optional (default: True)
+        If ``True``, return sparse ``coo_matrix``. Otherwise return ``coo_array``.
+
+    Returns
+    -------
+    data : csc_array or csc_matrix
+        The data read from the HB file as a sparse array.
+
+    Notes
+    -----
+    At the moment not the full Harwell-Boeing format is supported. Supported
+    features are:
+
+        - assembled, non-symmetric, real matrices
+        - integer for pointer/indices
+        - exponential format for float values, and int format
+
+    Examples
+    --------
+    We can read and write a harwell-boeing format file:
+
+    >>> from scipy.io import hb_read, hb_write
+    >>> from scipy.sparse import csr_array, eye
+    >>> data = csr_array(eye(3))  # create a sparse array
+    >>> hb_write("data.hb", data)  # write a hb file
+    >>> print(hb_read("data.hb", spmatrix=False))  # read a hb file
+    
+        Coords	Values
+        (0, 0)	1.0
+        (1, 1)	1.0
+        (2, 2)	1.0
+    """
+    def _get_matrix(fid):
+        hb = HBFile(fid)
+        return hb.read_matrix()
+
+    if hasattr(path_or_open_file, 'read'):
+        data = _get_matrix(path_or_open_file)
+    else:
+        with open(path_or_open_file) as f:
+            data = _get_matrix(f)
+    if spmatrix:
+        return csc_matrix(data)
+    return data
+
+
+def hb_write(path_or_open_file, m, hb_info=None):
+    """Write HB-format file.
+
+    Parameters
+    ----------
+    path_or_open_file : path-like or file-like
+        If a file-like object, it is used as-is. Otherwise, it is opened
+        before writing.
+    m : sparse array or matrix
+        the sparse array to write
+    hb_info : HBInfo
+        contains the meta-data for write
+
+    Returns
+    -------
+    None
+
+    Notes
+    -----
+    At the moment not the full Harwell-Boeing format is supported. Supported
+    features are:
+
+        - assembled, non-symmetric, real matrices
+        - integer for pointer/indices
+        - exponential format for float values, and int format
+
+    Examples
+    --------
+    We can read and write a harwell-boeing format file:
+
+    >>> from scipy.io import hb_read, hb_write
+    >>> from scipy.sparse import csr_array, eye
+    >>> data = csr_array(eye(3))  # create a sparse array
+    >>> hb_write("data.hb", data)  # write a hb file
+    >>> print(hb_read("data.hb", spmatrix=False))  # read a hb file
+    
+        Coords	Values
+        (0, 0)	1.0
+        (1, 1)	1.0
+        (2, 2)	1.0
+    """
+    m = m.tocsc(copy=False)
+
+    if hb_info is None:
+        hb_info = HBInfo.from_data(m)
+
+    def _set_matrix(fid):
+        hb = HBFile(fid, hb_info)
+        return hb.write_matrix(m)
+
+    if hasattr(path_or_open_file, 'write'):
+        return _set_matrix(path_or_open_file)
+    else:
+        with open(path_or_open_file, 'w') as f:
+            return _set_matrix(f)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_fortran_format.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_fortran_format.py
new file mode 100644
index 0000000000000000000000000000000000000000..dae040c523d6a6d618e89402d39a0cb05bad927a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_fortran_format.py
@@ -0,0 +1,74 @@
+import numpy as np
+
+from numpy.testing import assert_equal
+from pytest import raises as assert_raises
+
+from scipy.io._harwell_boeing._fortran_format_parser import (
+        FortranFormatParser, IntFormat, ExpFormat, BadFortranFormat)
+
+
+class TestFortranFormatParser:
+    def setup_method(self):
+        self.parser = FortranFormatParser()
+
+    def _test_equal(self, format, ref):
+        ret = self.parser.parse(format)
+        assert_equal(ret.__dict__, ref.__dict__)
+
+    def test_simple_int(self):
+        self._test_equal("(I4)", IntFormat(4))
+
+    def test_simple_repeated_int(self):
+        self._test_equal("(3I4)", IntFormat(4, repeat=3))
+
+    def test_simple_exp(self):
+        self._test_equal("(E4.3)", ExpFormat(4, 3))
+
+    def test_exp_exp(self):
+        self._test_equal("(E8.3E3)", ExpFormat(8, 3, 3))
+
+    def test_repeat_exp(self):
+        self._test_equal("(2E4.3)", ExpFormat(4, 3, repeat=2))
+
+    def test_repeat_exp_exp(self):
+        self._test_equal("(2E8.3E3)", ExpFormat(8, 3, 3, repeat=2))
+
+    def test_wrong_formats(self):
+        def _test_invalid(bad_format):
+            assert_raises(BadFortranFormat, lambda: self.parser.parse(bad_format))
+        _test_invalid("I4")
+        _test_invalid("(E4)")
+        _test_invalid("(E4.)")
+        _test_invalid("(E4.E3)")
+
+
+class TestIntFormat:
+    def test_to_fortran(self):
+        f = [IntFormat(10), IntFormat(12, 10), IntFormat(12, 10, 3)]
+        res = ["(I10)", "(I12.10)", "(3I12.10)"]
+
+        for i, j in zip(f, res):
+            assert_equal(i.fortran_format, j)
+
+    def test_from_number(self):
+        f = [10, -12, 123456789]
+        r_f = [IntFormat(3, repeat=26), IntFormat(4, repeat=20),
+               IntFormat(10, repeat=8)]
+        for i, j in zip(f, r_f):
+            assert_equal(IntFormat.from_number(i).__dict__, j.__dict__)
+
+
+class TestExpFormat:
+    def test_to_fortran(self):
+        f = [ExpFormat(10, 5), ExpFormat(12, 10), ExpFormat(12, 10, min=3),
+             ExpFormat(10, 5, repeat=3)]
+        res = ["(E10.5)", "(E12.10)", "(E12.10E3)", "(3E10.5)"]
+
+        for i, j in zip(f, res):
+            assert_equal(i.fortran_format, j)
+
+    def test_from_number(self):
+        f = np.array([1.0, -1.2])
+        r_f = [ExpFormat(24, 16, repeat=3), ExpFormat(25, 16, repeat=3)]
+        for i, j in zip(f, r_f):
+            assert_equal(ExpFormat.from_number(i).__dict__, j.__dict__)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_hb.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_hb.py
new file mode 100644
index 0000000000000000000000000000000000000000..d0c9ee5635fdd45c0f6560e686c9e40176ef95e4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_harwell_boeing/tests/test_hb.py
@@ -0,0 +1,70 @@
+from io import StringIO
+import tempfile
+
+import numpy as np
+
+from numpy.testing import assert_equal, \
+    assert_array_almost_equal_nulp
+
+from scipy.sparse import coo_array, csc_array, random_array, isspmatrix
+
+from scipy.io import hb_read, hb_write
+
+
+SIMPLE = """\
+No Title                                                                |No Key
+             9             4             1             4
+RUA                      100           100            10             0
+(26I3)          (26I3)          (3E23.15)
+1  2  2  2  2  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
+3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
+3  3  3  3  3  3  3  4  4  4  6  6  6  6  6  6  6  6  6  6  6  8  9  9  9  9
+9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9  9 11
+37 71 89 18 30 45 70 19 25 52
+2.971243799687726e-01  3.662366682877375e-01  4.786962174699534e-01
+6.490068647991184e-01  6.617490424831662e-02  8.870370343191623e-01
+4.196478590163001e-01  5.649603072111251e-01  9.934423887087086e-01
+6.912334991524289e-01
+"""
+
+SIMPLE_MATRIX = coo_array(
+    ((0.297124379969, 0.366236668288, 0.47869621747, 0.649006864799,
+      0.0661749042483, 0.887037034319, 0.419647859016,
+      0.564960307211, 0.993442388709, 0.691233499152,),
+     (np.array([[36, 70, 88, 17, 29, 44, 69, 18, 24, 51],
+                [0, 4, 58, 61, 61, 72, 72, 73, 99, 99]]))))
+
+
+def assert_csc_almost_equal(r, l):
+    r = csc_array(r)
+    l = csc_array(l)
+    assert_equal(r.indptr, l.indptr)
+    assert_equal(r.indices, l.indices)
+    assert_array_almost_equal_nulp(r.data, l.data, 10000)
+
+
+class TestHBReader:
+    def test_simple(self):
+        m = hb_read(StringIO(SIMPLE), spmatrix=False)
+        assert_csc_almost_equal(m, SIMPLE_MATRIX)
+        assert not isspmatrix(m)
+        m = hb_read(StringIO(SIMPLE), spmatrix=True)
+        assert isspmatrix(m)
+        m = hb_read(StringIO(SIMPLE))  # default
+        assert isspmatrix(m)
+
+
+class TestHBReadWrite:
+
+    def check_save_load(self, value):
+        with tempfile.NamedTemporaryFile(mode='w+t') as file:
+            hb_write(file, value)
+            file.file.seek(0)
+            value_loaded = hb_read(file, spmatrix=False)
+        assert_csc_almost_equal(value, value_loaded)
+
+    def test_simple(self):
+        random_arr = random_array((10, 100), density=0.1)
+        for format in ('coo', 'csc', 'csr', 'bsr', 'dia', 'dok', 'lil'):
+            arr = random_arr.asformat(format, copy=False)
+            self.check_save_load(arr)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_idl.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_idl.py
new file mode 100644
index 0000000000000000000000000000000000000000..5730a9d4fe1beda5a71aa668bda13d17f2fc2436
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_idl.py
@@ -0,0 +1,919 @@
+# IDLSave - a python module to read IDL 'save' files
+# Copyright (c) 2010 Thomas P. Robitaille
+
+# Many thanks to Craig Markwardt for publishing the Unofficial Format
+# Specification for IDL .sav files, without which this Python module would not
+# exist (http://cow.physics.wisc.edu/~craigm/idl/savefmt).
+
+# This code was developed by with permission from ITT Visual Information
+# Systems. IDL(r) is a registered trademark of ITT Visual Information Systems,
+# Inc. for their Interactive Data Language software.
+
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+__all__ = ['readsav']
+
+import struct
+import numpy as np
+import tempfile
+import zlib
+import warnings
+
+# Define the different data types that can be found in an IDL save file
+DTYPE_DICT = {1: '>u1',
+              2: '>i2',
+              3: '>i4',
+              4: '>f4',
+              5: '>f8',
+              6: '>c8',
+              7: '|O',
+              8: '|O',
+              9: '>c16',
+              10: '|O',
+              11: '|O',
+              12: '>u2',
+              13: '>u4',
+              14: '>i8',
+              15: '>u8'}
+
+# Define the different record types that can be found in an IDL save file
+RECTYPE_DICT = {0: "START_MARKER",
+                1: "COMMON_VARIABLE",
+                2: "VARIABLE",
+                3: "SYSTEM_VARIABLE",
+                6: "END_MARKER",
+                10: "TIMESTAMP",
+                12: "COMPILED",
+                13: "IDENTIFICATION",
+                14: "VERSION",
+                15: "HEAP_HEADER",
+                16: "HEAP_DATA",
+                17: "PROMOTE64",
+                19: "NOTICE",
+                20: "DESCRIPTION"}
+
+# Define a dictionary to contain structure definitions
+STRUCT_DICT = {}
+
+
+def _align_32(f):
+    '''Align to the next 32-bit position in a file'''
+
+    pos = f.tell()
+    if pos % 4 != 0:
+        f.seek(pos + 4 - pos % 4)
+    return
+
+
+def _skip_bytes(f, n):
+    '''Skip `n` bytes'''
+    f.read(n)
+    return
+
+
+def _read_bytes(f, n):
+    '''Read the next `n` bytes'''
+    return f.read(n)
+
+
+def _read_byte(f):
+    '''Read a single byte'''
+    return np.uint8(struct.unpack('>B', f.read(4)[:1])[0])
+
+
+def _read_long(f):
+    '''Read a signed 32-bit integer'''
+    return np.int32(struct.unpack('>l', f.read(4))[0])
+
+
+def _read_int16(f):
+    '''Read a signed 16-bit integer'''
+    return np.int16(struct.unpack('>h', f.read(4)[2:4])[0])
+
+
+def _read_int32(f):
+    '''Read a signed 32-bit integer'''
+    return np.int32(struct.unpack('>i', f.read(4))[0])
+
+
+def _read_int64(f):
+    '''Read a signed 64-bit integer'''
+    return np.int64(struct.unpack('>q', f.read(8))[0])
+
+
+def _read_uint16(f):
+    '''Read an unsigned 16-bit integer'''
+    return np.uint16(struct.unpack('>H', f.read(4)[2:4])[0])
+
+
+def _read_uint32(f):
+    '''Read an unsigned 32-bit integer'''
+    return np.uint32(struct.unpack('>I', f.read(4))[0])
+
+
+def _read_uint64(f):
+    '''Read an unsigned 64-bit integer'''
+    return np.uint64(struct.unpack('>Q', f.read(8))[0])
+
+
+def _read_float32(f):
+    '''Read a 32-bit float'''
+    return np.float32(struct.unpack('>f', f.read(4))[0])
+
+
+def _read_float64(f):
+    '''Read a 64-bit float'''
+    return np.float64(struct.unpack('>d', f.read(8))[0])
+
+
+class Pointer:
+    '''Class used to define pointers'''
+
+    def __init__(self, index):
+        self.index = index
+        return
+
+
+class ObjectPointer(Pointer):
+    '''Class used to define object pointers'''
+    pass
+
+
+def _read_string(f):
+    '''Read a string'''
+    length = _read_long(f)
+    if length > 0:
+        chars = _read_bytes(f, length).decode('latin1')
+        _align_32(f)
+    else:
+        chars = ''
+    return chars
+
+
+def _read_string_data(f):
+    '''Read a data string (length is specified twice)'''
+    length = _read_long(f)
+    if length > 0:
+        length = _read_long(f)
+        string_data = _read_bytes(f, length)
+        _align_32(f)
+    else:
+        string_data = ''
+    return string_data
+
+
+def _read_data(f, dtype):
+    '''Read a variable with a specified data type'''
+    if dtype == 1:
+        if _read_int32(f) != 1:
+            raise Exception("Error occurred while reading byte variable")
+        return _read_byte(f)
+    elif dtype == 2:
+        return _read_int16(f)
+    elif dtype == 3:
+        return _read_int32(f)
+    elif dtype == 4:
+        return _read_float32(f)
+    elif dtype == 5:
+        return _read_float64(f)
+    elif dtype == 6:
+        real = _read_float32(f)
+        imag = _read_float32(f)
+        return np.complex64(real + imag * 1j)
+    elif dtype == 7:
+        return _read_string_data(f)
+    elif dtype == 8:
+        raise Exception("Should not be here - please report this")
+    elif dtype == 9:
+        real = _read_float64(f)
+        imag = _read_float64(f)
+        return np.complex128(real + imag * 1j)
+    elif dtype == 10:
+        return Pointer(_read_int32(f))
+    elif dtype == 11:
+        return ObjectPointer(_read_int32(f))
+    elif dtype == 12:
+        return _read_uint16(f)
+    elif dtype == 13:
+        return _read_uint32(f)
+    elif dtype == 14:
+        return _read_int64(f)
+    elif dtype == 15:
+        return _read_uint64(f)
+    else:
+        raise Exception("Unknown IDL type: %i - please report this" % dtype)
+
+
+def _read_structure(f, array_desc, struct_desc):
+    '''
+    Read a structure, with the array and structure descriptors given as
+    `array_desc` and `structure_desc` respectively.
+    '''
+
+    nrows = array_desc['nelements']
+    columns = struct_desc['tagtable']
+
+    dtype = []
+    for col in columns:
+        if col['structure'] or col['array']:
+            dtype.append(((col['name'].lower(), col['name']), np.object_))
+        else:
+            if col['typecode'] in DTYPE_DICT:
+                dtype.append(((col['name'].lower(), col['name']),
+                                    DTYPE_DICT[col['typecode']]))
+            else:
+                raise Exception("Variable type %i not implemented" %
+                                                            col['typecode'])
+
+    structure = np.rec.recarray((nrows, ), dtype=dtype)
+
+    for i in range(nrows):
+        for col in columns:
+            dtype = col['typecode']
+            if col['structure']:
+                structure[col['name']][i] = _read_structure(f,
+                                      struct_desc['arrtable'][col['name']],
+                                      struct_desc['structtable'][col['name']])
+            elif col['array']:
+                structure[col['name']][i] = _read_array(f, dtype,
+                                      struct_desc['arrtable'][col['name']])
+            else:
+                structure[col['name']][i] = _read_data(f, dtype)
+
+    # Reshape structure if needed
+    if array_desc['ndims'] > 1:
+        dims = array_desc['dims'][:int(array_desc['ndims'])]
+        dims.reverse()
+        structure = structure.reshape(dims)
+
+    return structure
+
+
+def _read_array(f, typecode, array_desc):
+    '''
+    Read an array of type `typecode`, with the array descriptor given as
+    `array_desc`.
+    '''
+
+    if typecode in [1, 3, 4, 5, 6, 9, 13, 14, 15]:
+
+        if typecode == 1:
+            nbytes = _read_int32(f)
+            if nbytes != array_desc['nbytes']:
+                warnings.warn("Not able to verify number of bytes from header",
+                              stacklevel=3)
+
+        # Read bytes as numpy array
+        array = np.frombuffer(f.read(array_desc['nbytes']),
+                              dtype=DTYPE_DICT[typecode])
+
+    elif typecode in [2, 12]:
+
+        # These are 2 byte types, need to skip every two as they are not packed
+
+        array = np.frombuffer(f.read(array_desc['nbytes']*2),
+                              dtype=DTYPE_DICT[typecode])[1::2]
+
+    else:
+
+        # Read bytes into list
+        array = []
+        for i in range(array_desc['nelements']):
+            dtype = typecode
+            data = _read_data(f, dtype)
+            array.append(data)
+
+        array = np.array(array, dtype=np.object_)
+
+    # Reshape array if needed
+    if array_desc['ndims'] > 1:
+        dims = array_desc['dims'][:int(array_desc['ndims'])]
+        dims.reverse()
+        array = array.reshape(dims)
+
+    # Go to next alignment position
+    _align_32(f)
+
+    return array
+
+
+def _read_record(f):
+    '''Function to read in a full record'''
+
+    record = {'rectype': _read_long(f)}
+
+    nextrec = _read_uint32(f)
+    nextrec += _read_uint32(f).astype(np.int64) * 2**32
+
+    _skip_bytes(f, 4)
+
+    if record['rectype'] not in RECTYPE_DICT:
+        raise Exception("Unknown RECTYPE: %i" % record['rectype'])
+
+    record['rectype'] = RECTYPE_DICT[record['rectype']]
+
+    if record['rectype'] in ["VARIABLE", "HEAP_DATA"]:
+
+        if record['rectype'] == "VARIABLE":
+            record['varname'] = _read_string(f)
+        else:
+            record['heap_index'] = _read_long(f)
+            _skip_bytes(f, 4)
+
+        rectypedesc = _read_typedesc(f)
+
+        if rectypedesc['typecode'] == 0:
+
+            if nextrec == f.tell():
+                record['data'] = None  # Indicates NULL value
+            else:
+                raise ValueError("Unexpected type code: 0")
+
+        else:
+
+            varstart = _read_long(f)
+            if varstart != 7:
+                raise Exception("VARSTART is not 7")
+
+            if rectypedesc['structure']:
+                record['data'] = _read_structure(f, rectypedesc['array_desc'],
+                                                    rectypedesc['struct_desc'])
+            elif rectypedesc['array']:
+                record['data'] = _read_array(f, rectypedesc['typecode'],
+                                                rectypedesc['array_desc'])
+            else:
+                dtype = rectypedesc['typecode']
+                record['data'] = _read_data(f, dtype)
+
+    elif record['rectype'] == "TIMESTAMP":
+
+        _skip_bytes(f, 4*256)
+        record['date'] = _read_string(f)
+        record['user'] = _read_string(f)
+        record['host'] = _read_string(f)
+
+    elif record['rectype'] == "VERSION":
+
+        record['format'] = _read_long(f)
+        record['arch'] = _read_string(f)
+        record['os'] = _read_string(f)
+        record['release'] = _read_string(f)
+
+    elif record['rectype'] == "IDENTIFICATON":
+
+        record['author'] = _read_string(f)
+        record['title'] = _read_string(f)
+        record['idcode'] = _read_string(f)
+
+    elif record['rectype'] == "NOTICE":
+
+        record['notice'] = _read_string(f)
+
+    elif record['rectype'] == "DESCRIPTION":
+
+        record['description'] = _read_string_data(f)
+
+    elif record['rectype'] == "HEAP_HEADER":
+
+        record['nvalues'] = _read_long(f)
+        record['indices'] = [_read_long(f) for _ in range(record['nvalues'])]
+
+    elif record['rectype'] == "COMMONBLOCK":
+
+        record['nvars'] = _read_long(f)
+        record['name'] = _read_string(f)
+        record['varnames'] = [_read_string(f) for _ in range(record['nvars'])]
+
+    elif record['rectype'] == "END_MARKER":
+
+        record['end'] = True
+
+    elif record['rectype'] == "UNKNOWN":
+
+        warnings.warn("Skipping UNKNOWN record", stacklevel=3)
+
+    elif record['rectype'] == "SYSTEM_VARIABLE":
+
+        warnings.warn("Skipping SYSTEM_VARIABLE record", stacklevel=3)
+
+    else:
+
+        raise Exception(f"record['rectype']={record['rectype']} not implemented")
+
+    f.seek(nextrec)
+
+    return record
+
+
+def _read_typedesc(f):
+    '''Function to read in a type descriptor'''
+
+    typedesc = {'typecode': _read_long(f), 'varflags': _read_long(f)}
+
+    if typedesc['varflags'] & 2 == 2:
+        raise Exception("System variables not implemented")
+
+    typedesc['array'] = typedesc['varflags'] & 4 == 4
+    typedesc['structure'] = typedesc['varflags'] & 32 == 32
+
+    if typedesc['structure']:
+        typedesc['array_desc'] = _read_arraydesc(f)
+        typedesc['struct_desc'] = _read_structdesc(f)
+    elif typedesc['array']:
+        typedesc['array_desc'] = _read_arraydesc(f)
+
+    return typedesc
+
+
+def _read_arraydesc(f):
+    '''Function to read in an array descriptor'''
+
+    arraydesc = {'arrstart': _read_long(f)}
+
+    if arraydesc['arrstart'] == 8:
+
+        _skip_bytes(f, 4)
+
+        arraydesc['nbytes'] = _read_long(f)
+        arraydesc['nelements'] = _read_long(f)
+        arraydesc['ndims'] = _read_long(f)
+
+        _skip_bytes(f, 8)
+
+        arraydesc['nmax'] = _read_long(f)
+
+        arraydesc['dims'] = [_read_long(f) for _ in range(arraydesc['nmax'])]
+
+    elif arraydesc['arrstart'] == 18:
+
+        warnings.warn("Using experimental 64-bit array read", stacklevel=3)
+
+        _skip_bytes(f, 8)
+
+        arraydesc['nbytes'] = _read_uint64(f)
+        arraydesc['nelements'] = _read_uint64(f)
+        arraydesc['ndims'] = _read_long(f)
+
+        _skip_bytes(f, 8)
+
+        arraydesc['nmax'] = 8
+
+        arraydesc['dims'] = []
+        for d in range(arraydesc['nmax']):
+            v = _read_long(f)
+            if v != 0:
+                raise Exception("Expected a zero in ARRAY_DESC")
+            arraydesc['dims'].append(_read_long(f))
+
+    else:
+
+        raise Exception("Unknown ARRSTART: %i" % arraydesc['arrstart'])
+
+    return arraydesc
+
+
+def _read_structdesc(f):
+    '''Function to read in a structure descriptor'''
+
+    structdesc = {}
+
+    structstart = _read_long(f)
+    if structstart != 9:
+        raise Exception("STRUCTSTART should be 9")
+
+    structdesc['name'] = _read_string(f)
+    predef = _read_long(f)
+    structdesc['ntags'] = _read_long(f)
+    structdesc['nbytes'] = _read_long(f)
+
+    structdesc['predef'] = predef & 1
+    structdesc['inherits'] = predef & 2
+    structdesc['is_super'] = predef & 4
+
+    if not structdesc['predef']:
+
+        structdesc['tagtable'] = [_read_tagdesc(f)
+                                  for _ in range(structdesc['ntags'])]
+
+        for tag in structdesc['tagtable']:
+            tag['name'] = _read_string(f)
+
+        structdesc['arrtable'] = {tag['name']: _read_arraydesc(f)
+                                  for tag in structdesc['tagtable']
+                                  if tag['array']}
+
+        structdesc['structtable'] = {tag['name']: _read_structdesc(f)
+                                     for tag in structdesc['tagtable']
+                                     if tag['structure']}
+
+        if structdesc['inherits'] or structdesc['is_super']:
+            structdesc['classname'] = _read_string(f)
+            structdesc['nsupclasses'] = _read_long(f)
+            structdesc['supclassnames'] = [
+                _read_string(f) for _ in range(structdesc['nsupclasses'])]
+            structdesc['supclasstable'] = [
+                _read_structdesc(f) for _ in range(structdesc['nsupclasses'])]
+
+        STRUCT_DICT[structdesc['name']] = structdesc
+
+    else:
+
+        if structdesc['name'] not in STRUCT_DICT:
+            raise Exception("PREDEF=1 but can't find definition")
+
+        structdesc = STRUCT_DICT[structdesc['name']]
+
+    return structdesc
+
+
+def _read_tagdesc(f):
+    '''Function to read in a tag descriptor'''
+
+    tagdesc = {'offset': _read_long(f)}
+
+    if tagdesc['offset'] == -1:
+        tagdesc['offset'] = _read_uint64(f)
+
+    tagdesc['typecode'] = _read_long(f)
+    tagflags = _read_long(f)
+
+    tagdesc['array'] = tagflags & 4 == 4
+    tagdesc['structure'] = tagflags & 32 == 32
+    tagdesc['scalar'] = tagdesc['typecode'] in DTYPE_DICT
+    # Assume '10'x is scalar
+
+    return tagdesc
+
+
+def _replace_heap(variable, heap):
+
+    if isinstance(variable, Pointer):
+
+        while isinstance(variable, Pointer):
+
+            if variable.index == 0:
+                variable = None
+            else:
+                if variable.index in heap:
+                    variable = heap[variable.index]
+                else:
+                    warnings.warn("Variable referenced by pointer not found "
+                                  "in heap: variable will be set to None",
+                                  stacklevel=3)
+                    variable = None
+
+        replace, new = _replace_heap(variable, heap)
+
+        if replace:
+            variable = new
+
+        return True, variable
+
+    elif isinstance(variable, np.rec.recarray):
+
+        # Loop over records
+        for ir, record in enumerate(variable):
+
+            replace, new = _replace_heap(record, heap)
+
+            if replace:
+                variable[ir] = new
+
+        return False, variable
+
+    elif isinstance(variable, np.record):
+
+        # Loop over values
+        for iv, value in enumerate(variable):
+
+            replace, new = _replace_heap(value, heap)
+
+            if replace:
+                variable[iv] = new
+
+        return False, variable
+
+    elif isinstance(variable, np.ndarray):
+
+        # Loop over values if type is np.object_
+        if variable.dtype.type is np.object_:
+
+            for iv in range(variable.size):
+
+                replace, new = _replace_heap(variable.item(iv), heap)
+
+                if replace:
+                    variable.reshape(-1)[iv] = new
+
+        return False, variable
+
+    else:
+
+        return False, variable
+
+
+class AttrDict(dict):
+    '''
+    A case-insensitive dictionary with access via item, attribute, and call
+    notations:
+
+        >>> from scipy.io._idl import AttrDict
+        >>> d = AttrDict()
+        >>> d['Variable'] = 123
+        >>> d['Variable']
+        123
+        >>> d.Variable
+        123
+        >>> d.variable
+        123
+        >>> d('VARIABLE')
+        123
+        >>> d['missing']
+        Traceback (most recent error last):
+        ...
+        KeyError: 'missing'
+        >>> d.missing
+        Traceback (most recent error last):
+        ...
+        AttributeError: 'AttrDict' object has no attribute 'missing'
+    '''
+
+    def __init__(self, init=None):
+        if init is None:
+            init = {}
+        dict.__init__(self, init)
+
+    def __getitem__(self, name):
+        return super().__getitem__(name.lower())
+
+    def __setitem__(self, key, value):
+        return super().__setitem__(key.lower(), value)
+
+    def __getattr__(self, name):
+        try:
+            return self.__getitem__(name)
+        except KeyError:
+            raise AttributeError(
+                f"'{type(self)}' object has no attribute '{name}'") from None
+
+    __setattr__ = __setitem__
+    __call__ = __getitem__
+
+
+def readsav(file_name, idict=None, python_dict=False,
+            uncompressed_file_name=None, verbose=False):
+    """
+    Read an IDL .sav file.
+
+    Parameters
+    ----------
+    file_name : str
+        Name of the IDL save file.
+    idict : dict, optional
+        Dictionary in which to insert .sav file variables.
+    python_dict : bool, optional
+        By default, the object return is not a Python dictionary, but a
+        case-insensitive dictionary with item, attribute, and call access
+        to variables. To get a standard Python dictionary, set this option
+        to True.
+    uncompressed_file_name : str, optional
+        This option only has an effect for .sav files written with the
+        /compress option. If a file name is specified, compressed .sav
+        files are uncompressed to this file. Otherwise, readsav will use
+        the `tempfile` module to determine a temporary filename
+        automatically, and will remove the temporary file upon successfully
+        reading it in.
+    verbose : bool, optional
+        Whether to print out information about the save file, including
+        the records read, and available variables.
+
+    Returns
+    -------
+    idl_dict : AttrDict or dict
+        If `python_dict` is set to False (default), this function returns a
+        case-insensitive dictionary with item, attribute, and call access
+        to variables. If `python_dict` is set to True, this function
+        returns a Python dictionary with all variable names in lowercase.
+        If `idict` was specified, then variables are written to the
+        dictionary specified, and the updated dictionary is returned.
+
+    Examples
+    --------
+    >>> from os.path import dirname, join as pjoin
+    >>> import scipy.io as sio
+    >>> from scipy.io import readsav
+
+    Get the filename for an example .sav file from the tests/data directory.
+
+    >>> data_dir = pjoin(dirname(sio.__file__), 'tests', 'data')
+    >>> sav_fname = pjoin(data_dir, 'array_float32_1d.sav')
+
+    Load the .sav file contents.
+
+    >>> sav_data = readsav(sav_fname)
+
+    Get keys of the .sav file contents.
+
+    >>> print(sav_data.keys())
+    dict_keys(['array1d'])
+
+    Access a content with a key.
+
+    >>> print(sav_data['array1d'])
+    [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
+     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
+     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
+     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
+     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
+     0. 0. 0.]
+
+    """
+
+    # Initialize record and variable holders
+    records = []
+    if python_dict or idict:
+        variables = {}
+    else:
+        variables = AttrDict()
+
+    # Open the IDL file
+    f = open(file_name, 'rb')
+
+    # Read the signature, which should be 'SR'
+    signature = _read_bytes(f, 2)
+    if signature != b'SR':
+        raise Exception(f"Invalid SIGNATURE: {signature}")
+
+    # Next, the record format, which is '\x00\x04' for normal .sav
+    # files, and '\x00\x06' for compressed .sav files.
+    recfmt = _read_bytes(f, 2)
+
+    if recfmt == b'\x00\x04':
+        pass
+
+    elif recfmt == b'\x00\x06':
+
+        if verbose:
+            print("IDL Save file is compressed")
+
+        if uncompressed_file_name:
+            fout = open(uncompressed_file_name, 'w+b')
+        else:
+            fout = tempfile.NamedTemporaryFile(suffix='.sav')
+
+        if verbose:
+            print(f" -> expanding to {fout.name}")
+
+        # Write header
+        fout.write(b'SR\x00\x04')
+
+        # Cycle through records
+        while True:
+
+            # Read record type
+            rectype = _read_long(f)
+            fout.write(struct.pack('>l', int(rectype)))
+
+            # Read position of next record and return as int
+            nextrec = _read_uint32(f)
+            nextrec += _read_uint32(f).astype(np.int64) * 2**32
+
+            # Read the unknown 4 bytes
+            unknown = f.read(4)
+
+            # Check if the end of the file has been reached
+            if RECTYPE_DICT[rectype] == 'END_MARKER':
+                modval = np.int64(2**32)
+                fout.write(struct.pack('>I', int(nextrec) % modval))
+                fout.write(
+                    struct.pack('>I', int((nextrec - (nextrec % modval)) / modval))
+                )
+                fout.write(unknown)
+                break
+
+            # Find current position
+            pos = f.tell()
+
+            # Decompress record
+            rec_string = zlib.decompress(f.read(nextrec-pos))
+
+            # Find new position of next record
+            nextrec = fout.tell() + len(rec_string) + 12
+
+            # Write out record
+            fout.write(struct.pack('>I', int(nextrec % 2**32)))
+            fout.write(struct.pack('>I', int((nextrec - (nextrec % 2**32)) / 2**32)))
+            fout.write(unknown)
+            fout.write(rec_string)
+
+        # Close the original compressed file
+        f.close()
+
+        # Set f to be the decompressed file, and skip the first four bytes
+        f = fout
+        f.seek(4)
+
+    else:
+        raise Exception(f"Invalid RECFMT: {recfmt}")
+
+    # Loop through records, and add them to the list
+    while True:
+        r = _read_record(f)
+        records.append(r)
+        if 'end' in r:
+            if r['end']:
+                break
+
+    # Close the file
+    f.close()
+
+    # Find heap data variables
+    heap = {}
+    for r in records:
+        if r['rectype'] == "HEAP_DATA":
+            heap[r['heap_index']] = r['data']
+
+    # Find all variables
+    for r in records:
+        if r['rectype'] == "VARIABLE":
+            replace, new = _replace_heap(r['data'], heap)
+            if replace:
+                r['data'] = new
+            variables[r['varname'].lower()] = r['data']
+
+    if verbose:
+
+        # Print out timestamp info about the file
+        for record in records:
+            if record['rectype'] == "TIMESTAMP":
+                print("-"*50)
+                print(f"Date: {record['date']}")
+                print(f"User: {record['user']}")
+                print(f"Host: {record['host']}")
+                break
+
+        # Print out version info about the file
+        for record in records:
+            if record['rectype'] == "VERSION":
+                print("-"*50)
+                print(f"Format: {record['format']}")
+                print(f"Architecture: {record['arch']}")
+                print(f"Operating System: {record['os']}")
+                print(f"IDL Version: {record['release']}")
+                break
+
+        # Print out identification info about the file
+        for record in records:
+            if record['rectype'] == "IDENTIFICATON":
+                print("-"*50)
+                print(f"Author: {record['author']}")
+                print(f"Title: {record['title']}")
+                print(f"ID Code: {record['idcode']}")
+                break
+
+        # Print out descriptions saved with the file
+        for record in records:
+            if record['rectype'] == "DESCRIPTION":
+                print("-"*50)
+                print(f"Description: {record['description']}")
+                break
+
+        print("-"*50)
+        print(f"Successfully read {len(records)} records of which:")
+
+        # Create convenience list of record types
+        rectypes = [r['rectype'] for r in records]
+
+        for rt in set(rectypes):
+            if rt != 'END_MARKER':
+                print(" - %i are of type %s" % (rectypes.count(rt), rt))
+        print("-"*50)
+
+        if 'VARIABLE' in rectypes:
+            print("Available variables:")
+            for var in variables:
+                print(f" - {var} [{type(variables[var])}]")
+            print("-"*50)
+
+    if idict:
+        for var in variables:
+            idict[var] = variables[var]
+        return idict
+    else:
+        return variables
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_mmio.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_mmio.py
new file mode 100644
index 0000000000000000000000000000000000000000..32db20065d632d582f04addcf766daa4e6b5fd8e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_mmio.py
@@ -0,0 +1,968 @@
+"""
+  Matrix Market I/O in Python.
+  See http://math.nist.gov/MatrixMarket/formats.html
+  for information about the Matrix Market format.
+"""
+#
+# Author: Pearu Peterson 
+# Created: October, 2004
+#
+# References:
+#  http://math.nist.gov/MatrixMarket/
+#
+import os
+
+import numpy as np
+from numpy import (asarray, real, imag, conj, zeros, ndarray, concatenate,
+                   ones, can_cast)
+
+from scipy.sparse import coo_array, issparse, coo_matrix
+
+__all__ = ['mminfo', 'mmread', 'mmwrite', 'MMFile']
+
+
+# -----------------------------------------------------------------------------
+def asstr(s):
+    if isinstance(s, bytes):
+        return s.decode('latin1')
+    return str(s)
+
+
+def mminfo(source):
+    """
+    Return size and storage parameters from Matrix Market file-like 'source'.
+
+    Parameters
+    ----------
+    source : str or file-like
+        Matrix Market filename (extension .mtx) or open file-like object
+
+    Returns
+    -------
+    rows : int
+        Number of matrix rows.
+    cols : int
+        Number of matrix columns.
+    entries : int
+        Number of non-zero entries of a sparse matrix
+        or rows*cols for a dense matrix.
+    format : str
+        Either 'coordinate' or 'array'.
+    field : str
+        Either 'real', 'complex', 'pattern', or 'integer'.
+    symmetry : str
+        Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+
+    Examples
+    --------
+    >>> from io import StringIO
+    >>> from scipy.io import mminfo
+
+    >>> text = '''%%MatrixMarket matrix coordinate real general
+    ...  5 5 7
+    ...  2 3 1.0
+    ...  3 4 2.0
+    ...  3 5 3.0
+    ...  4 1 4.0
+    ...  4 2 5.0
+    ...  4 3 6.0
+    ...  4 4 7.0
+    ... '''
+
+
+    ``mminfo(source)`` returns the number of rows, number of columns,
+    format, field type and symmetry attribute of the source file.
+
+    >>> mminfo(StringIO(text))
+    (5, 5, 7, 'coordinate', 'real', 'general')
+    """
+    return MMFile.info(source)
+
+# -----------------------------------------------------------------------------
+
+
+def mmread(source, *, spmatrix=True):
+    """
+    Reads the contents of a Matrix Market file-like 'source' into a matrix.
+
+    Parameters
+    ----------
+    source : str or file-like
+        Matrix Market filename (extensions .mtx, .mtz.gz)
+        or open file-like object.
+    spmatrix : bool, optional (default: True)
+        If ``True``, return sparse ``coo_matrix``. Otherwise return ``coo_array``.
+
+    Returns
+    -------
+    a : ndarray or coo_array or coo_matrix
+        Dense or sparse array depending on the matrix format in the
+        Matrix Market file.
+
+    Examples
+    --------
+    >>> from io import StringIO
+    >>> from scipy.io import mmread
+
+    >>> text = '''%%MatrixMarket matrix coordinate real general
+    ...  5 5 7
+    ...  2 3 1.0
+    ...  3 4 2.0
+    ...  3 5 3.0
+    ...  4 1 4.0
+    ...  4 2 5.0
+    ...  4 3 6.0
+    ...  4 4 7.0
+    ... '''
+
+    ``mmread(source)`` returns the data as sparse matrix in COO format.
+
+    >>> m = mmread(StringIO(text), spmatrix=False)
+    >>> m
+    
+    >>> m.toarray()
+    array([[0., 0., 0., 0., 0.],
+           [0., 0., 1., 0., 0.],
+           [0., 0., 0., 2., 3.],
+           [4., 5., 6., 7., 0.],
+           [0., 0., 0., 0., 0.]])
+    """
+    return MMFile().read(source, spmatrix=spmatrix)
+
+# -----------------------------------------------------------------------------
+
+
+def mmwrite(target, a, comment='', field=None, precision=None, symmetry=None):
+    r"""
+    Writes the sparse or dense array `a` to Matrix Market file-like `target`.
+
+    Parameters
+    ----------
+    target : str or file-like
+        Matrix Market filename (extension .mtx) or open file-like object.
+    a : array like
+        Sparse or dense 2-D array.
+    comment : str, optional
+        Comments to be prepended to the Matrix Market file.
+    field : None or str, optional
+        Either 'real', 'complex', 'pattern', or 'integer'.
+    precision : None or int, optional
+        Number of digits to display for real or complex values.
+    symmetry : None or str, optional
+        Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+        If symmetry is None the symmetry type of 'a' is determined by its
+        values.
+
+    Returns
+    -------
+    None
+
+    Examples
+    --------
+    >>> from io import BytesIO
+    >>> import numpy as np
+    >>> from scipy.sparse import coo_array
+    >>> from scipy.io import mmwrite
+
+    Write a small NumPy array to a matrix market file.  The file will be
+    written in the ``'array'`` format.
+
+    >>> a = np.array([[1.0, 0, 0, 0], [0, 2.5, 0, 6.25]])
+    >>> target = BytesIO()
+    >>> mmwrite(target, a)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array real general
+    %
+    2 4
+    1
+    0
+    0
+    2.5
+    0
+    0
+    0
+    6.25
+
+    Add a comment to the output file, and set the precision to 3.
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, a, comment='\n Some test data.\n', precision=3)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array real general
+    %
+    % Some test data.
+    %
+    2 4
+    1.00e+00
+    0.00e+00
+    0.00e+00
+    2.50e+00
+    0.00e+00
+    0.00e+00
+    0.00e+00
+    6.25e+00
+
+    Convert to a sparse matrix before calling ``mmwrite``.  This will
+    result in the output format being ``'coordinate'`` rather than
+    ``'array'``.
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, coo_array(a), precision=3)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix coordinate real general
+    %
+    2 4 3
+    1 1 1.00e+00
+    2 2 2.50e+00
+    2 4 6.25e+00
+
+    Write a complex Hermitian array to a matrix market file.  Note that
+    only six values are actually written to the file; the other values
+    are implied by the symmetry.
+
+    >>> z = np.array([[3, 1+2j, 4-3j], [1-2j, 1, -5j], [4+3j, 5j, 2.5]])
+    >>> z
+    array([[ 3. +0.j,  1. +2.j,  4. -3.j],
+           [ 1. -2.j,  1. +0.j, -0. -5.j],
+           [ 4. +3.j,  0. +5.j,  2.5+0.j]])
+
+    >>> target = BytesIO()
+    >>> mmwrite(target, z, precision=2)
+    >>> print(target.getvalue().decode('latin1'))
+    %%MatrixMarket matrix array complex hermitian
+    %
+    3 3
+    3.0e+00 0.0e+00
+    1.0e+00 -2.0e+00
+    4.0e+00 3.0e+00
+    1.0e+00 0.0e+00
+    0.0e+00 5.0e+00
+    2.5e+00 0.0e+00
+
+    """
+    MMFile().write(target, a, comment, field, precision, symmetry)
+
+
+###############################################################################
+class MMFile:
+    __slots__ = ('_rows',
+                 '_cols',
+                 '_entries',
+                 '_format',
+                 '_field',
+                 '_symmetry')
+
+    @property
+    def rows(self):
+        return self._rows
+
+    @property
+    def cols(self):
+        return self._cols
+
+    @property
+    def entries(self):
+        return self._entries
+
+    @property
+    def format(self):
+        return self._format
+
+    @property
+    def field(self):
+        return self._field
+
+    @property
+    def symmetry(self):
+        return self._symmetry
+
+    @property
+    def has_symmetry(self):
+        return self._symmetry in (self.SYMMETRY_SYMMETRIC,
+                                  self.SYMMETRY_SKEW_SYMMETRIC,
+                                  self.SYMMETRY_HERMITIAN)
+
+    # format values
+    FORMAT_COORDINATE = 'coordinate'
+    FORMAT_ARRAY = 'array'
+    FORMAT_VALUES = (FORMAT_COORDINATE, FORMAT_ARRAY)
+
+    @classmethod
+    def _validate_format(self, format):
+        if format not in self.FORMAT_VALUES:
+            msg = f'unknown format type {format}, must be one of {self.FORMAT_VALUES}'
+            raise ValueError(msg)
+
+    # field values
+    FIELD_INTEGER = 'integer'
+    FIELD_UNSIGNED = 'unsigned-integer'
+    FIELD_REAL = 'real'
+    FIELD_COMPLEX = 'complex'
+    FIELD_PATTERN = 'pattern'
+    FIELD_VALUES = (FIELD_INTEGER, FIELD_UNSIGNED, FIELD_REAL, FIELD_COMPLEX,
+                    FIELD_PATTERN)
+
+    @classmethod
+    def _validate_field(self, field):
+        if field not in self.FIELD_VALUES:
+            msg = f'unknown field type {field}, must be one of {self.FIELD_VALUES}'
+            raise ValueError(msg)
+
+    # symmetry values
+    SYMMETRY_GENERAL = 'general'
+    SYMMETRY_SYMMETRIC = 'symmetric'
+    SYMMETRY_SKEW_SYMMETRIC = 'skew-symmetric'
+    SYMMETRY_HERMITIAN = 'hermitian'
+    SYMMETRY_VALUES = (SYMMETRY_GENERAL, SYMMETRY_SYMMETRIC,
+                       SYMMETRY_SKEW_SYMMETRIC, SYMMETRY_HERMITIAN)
+
+    @classmethod
+    def _validate_symmetry(self, symmetry):
+        if symmetry not in self.SYMMETRY_VALUES:
+            raise ValueError(f'unknown symmetry type {symmetry}, '
+                             f'must be one of {self.SYMMETRY_VALUES}')
+
+    DTYPES_BY_FIELD = {FIELD_INTEGER: 'intp',
+                       FIELD_UNSIGNED: 'uint64',
+                       FIELD_REAL: 'd',
+                       FIELD_COMPLEX: 'D',
+                       FIELD_PATTERN: 'd'}
+
+    # -------------------------------------------------------------------------
+    @staticmethod
+    def reader():
+        pass
+
+    # -------------------------------------------------------------------------
+    @staticmethod
+    def writer():
+        pass
+
+    # -------------------------------------------------------------------------
+    @classmethod
+    def info(self, source):
+        """
+        Return size, storage parameters from Matrix Market file-like 'source'.
+
+        Parameters
+        ----------
+        source : str or file-like
+            Matrix Market filename (extension .mtx) or open file-like object
+
+        Returns
+        -------
+        rows : int
+            Number of matrix rows.
+        cols : int
+            Number of matrix columns.
+        entries : int
+            Number of non-zero entries of a sparse matrix
+            or rows*cols for a dense matrix.
+        format : str
+            Either 'coordinate' or 'array'.
+        field : str
+            Either 'real', 'complex', 'pattern', or 'integer'.
+        symmetry : str
+            Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+        """
+
+        stream, close_it = self._open(source)
+
+        try:
+
+            # read and validate header line
+            line = stream.readline()
+            mmid, matrix, format, field, symmetry = \
+                (asstr(part.strip()) for part in line.split())
+            if not mmid.startswith('%%MatrixMarket'):
+                raise ValueError('source is not in Matrix Market format')
+            if not matrix.lower() == 'matrix':
+                raise ValueError("Problem reading file header: " + line)
+
+            # http://math.nist.gov/MatrixMarket/formats.html
+            if format.lower() == 'array':
+                format = self.FORMAT_ARRAY
+            elif format.lower() == 'coordinate':
+                format = self.FORMAT_COORDINATE
+
+            # skip comments
+            # line.startswith('%')
+            while line:
+                if line.lstrip() and line.lstrip()[0] in ['%', 37]:
+                    line = stream.readline()
+                else:
+                    break
+
+            # skip empty lines
+            while not line.strip():
+                line = stream.readline()
+
+            split_line = line.split()
+            if format == self.FORMAT_ARRAY:
+                if not len(split_line) == 2:
+                    raise ValueError("Header line not of length 2: " +
+                                     line.decode('ascii'))
+                rows, cols = map(int, split_line)
+                entries = rows * cols
+            else:
+                if not len(split_line) == 3:
+                    raise ValueError("Header line not of length 3: " +
+                                     line.decode('ascii'))
+                rows, cols, entries = map(int, split_line)
+
+            return (rows, cols, entries, format, field.lower(),
+                    symmetry.lower())
+
+        finally:
+            if close_it:
+                stream.close()
+
+    # -------------------------------------------------------------------------
+    @staticmethod
+    def _open(filespec, mode='rb'):
+        """ Return an open file stream for reading based on source.
+
+        If source is a file name, open it (after trying to find it with mtx and
+        gzipped mtx extensions). Otherwise, just return source.
+
+        Parameters
+        ----------
+        filespec : str or file-like
+            String giving file name or file-like object
+        mode : str, optional
+            Mode with which to open file, if `filespec` is a file name.
+
+        Returns
+        -------
+        fobj : file-like
+            Open file-like object.
+        close_it : bool
+            True if the calling function should close this file when done,
+            false otherwise.
+        """
+        # If 'filespec' is path-like (str, pathlib.Path, os.DirEntry, other class
+        # implementing a '__fspath__' method), try to convert it to str. If this
+        # fails by throwing a 'TypeError', assume it's an open file handle and
+        # return it as-is.
+        try:
+            filespec = os.fspath(filespec)
+        except TypeError:
+            return filespec, False
+
+        # 'filespec' is definitely a str now
+
+        # open for reading
+        if mode[0] == 'r':
+
+            # determine filename plus extension
+            if not os.path.isfile(filespec):
+                if os.path.isfile(filespec+'.mtx'):
+                    filespec = filespec + '.mtx'
+                elif os.path.isfile(filespec+'.mtx.gz'):
+                    filespec = filespec + '.mtx.gz'
+                elif os.path.isfile(filespec+'.mtx.bz2'):
+                    filespec = filespec + '.mtx.bz2'
+            # open filename
+            if filespec.endswith('.gz'):
+                import gzip
+                stream = gzip.open(filespec, mode)
+            elif filespec.endswith('.bz2'):
+                import bz2
+                stream = bz2.BZ2File(filespec, 'rb')
+            else:
+                stream = open(filespec, mode)
+
+        # open for writing
+        else:
+            if filespec[-4:] != '.mtx':
+                filespec = filespec + '.mtx'
+            stream = open(filespec, mode)
+
+        return stream, True
+
+    # -------------------------------------------------------------------------
+    @staticmethod
+    def _get_symmetry(a):
+        m, n = a.shape
+        if m != n:
+            return MMFile.SYMMETRY_GENERAL
+        issymm = True
+        isskew = True
+        isherm = a.dtype.char in 'FD'
+
+        # sparse input
+        if issparse(a):
+            # check if number of nonzero entries of lower and upper triangle
+            # matrix are equal
+            a = a.tocoo()
+            (row, col) = a.nonzero()
+            if (row < col).sum() != (row > col).sum():
+                return MMFile.SYMMETRY_GENERAL
+
+            # define iterator over symmetric pair entries
+            a = a.todok()
+
+            def symm_iterator():
+                for ((i, j), aij) in a.items():
+                    if i > j:
+                        aji = a[j, i]
+                        yield (aij, aji, False)
+                    elif i == j:
+                        yield (aij, aij, True)
+
+        # non-sparse input
+        else:
+            # define iterator over symmetric pair entries
+            def symm_iterator():
+                for j in range(n):
+                    for i in range(j, n):
+                        aij, aji = a[i][j], a[j][i]
+                        yield (aij, aji, i == j)
+
+        # check for symmetry
+        # yields aij, aji, is_diagonal
+        for (aij, aji, is_diagonal) in symm_iterator():
+            if isskew and is_diagonal and aij != 0:
+                isskew = False
+            else:
+                if issymm and aij != aji:
+                    issymm = False
+                with np.errstate(over="ignore"):
+                    # This can give a warning for uint dtypes, so silence that
+                    if isskew and aij != -aji:
+                        isskew = False
+                if isherm and aij != conj(aji):
+                    isherm = False
+            if not (issymm or isskew or isherm):
+                break
+
+        # return symmetry value
+        if issymm:
+            return MMFile.SYMMETRY_SYMMETRIC
+        if isskew:
+            return MMFile.SYMMETRY_SKEW_SYMMETRIC
+        if isherm:
+            return MMFile.SYMMETRY_HERMITIAN
+        return MMFile.SYMMETRY_GENERAL
+
+    # -------------------------------------------------------------------------
+    @staticmethod
+    def _field_template(field, precision):
+        return {MMFile.FIELD_REAL: '%%.%ie\n' % precision,
+                MMFile.FIELD_INTEGER: '%i\n',
+                MMFile.FIELD_UNSIGNED: '%u\n',
+                MMFile.FIELD_COMPLEX: '%%.%ie %%.%ie\n' %
+                    (precision, precision)
+                }.get(field, None)
+
+    # -------------------------------------------------------------------------
+    def __init__(self, **kwargs):
+        self._init_attrs(**kwargs)
+
+    # -------------------------------------------------------------------------
+    def read(self, source, *, spmatrix=True):
+        """
+        Reads the contents of a Matrix Market file-like 'source' into a matrix.
+
+        Parameters
+        ----------
+        source : str or file-like
+            Matrix Market filename (extensions .mtx, .mtz.gz)
+            or open file object.
+        spmatrix : bool, optional (default: True)
+            If ``True``, return sparse ``coo_matrix``. Otherwise return ``coo_array``.
+
+        Returns
+        -------
+        a : ndarray or coo_array or coo_matrix
+            Dense or sparse array depending on the matrix format in the
+            Matrix Market file.
+        """
+        stream, close_it = self._open(source)
+
+        try:
+            self._parse_header(stream)
+            data = self._parse_body(stream)
+
+        finally:
+            if close_it:
+                stream.close()
+        if spmatrix and isinstance(data, coo_array):
+            data = coo_matrix(data)
+        return data
+
+
+    # -------------------------------------------------------------------------
+    def write(self, target, a, comment='', field=None, precision=None,
+              symmetry=None):
+        """
+        Writes sparse or dense array `a` to Matrix Market file-like `target`.
+
+        Parameters
+        ----------
+        target : str or file-like
+            Matrix Market filename (extension .mtx) or open file-like object.
+        a : array like
+            Sparse or dense 2-D array.
+        comment : str, optional
+            Comments to be prepended to the Matrix Market file.
+        field : None or str, optional
+            Either 'real', 'complex', 'pattern', or 'integer'.
+        precision : None or int, optional
+            Number of digits to display for real or complex values.
+        symmetry : None or str, optional
+            Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
+            If symmetry is None the symmetry type of 'a' is determined by its
+            values.
+        """
+
+        stream, close_it = self._open(target, 'wb')
+
+        try:
+            self._write(stream, a, comment, field, precision, symmetry)
+
+        finally:
+            if close_it:
+                stream.close()
+            else:
+                stream.flush()
+
+    # -------------------------------------------------------------------------
+    def _init_attrs(self, **kwargs):
+        """
+        Initialize each attributes with the corresponding keyword arg value
+        or a default of None
+        """
+
+        attrs = self.__class__.__slots__
+        public_attrs = [attr[1:] for attr in attrs]
+        invalid_keys = set(kwargs.keys()) - set(public_attrs)
+
+        if invalid_keys:
+            raise ValueError(f"found {tuple(invalid_keys)} invalid keyword "
+                             f"arguments, please only use {public_attrs}")
+
+        for attr in attrs:
+            setattr(self, attr, kwargs.get(attr[1:], None))
+
+    # -------------------------------------------------------------------------
+    def _parse_header(self, stream):
+        rows, cols, entries, format, field, symmetry = \
+            self.__class__.info(stream)
+        self._init_attrs(rows=rows, cols=cols, entries=entries, format=format,
+                         field=field, symmetry=symmetry)
+
+    # -------------------------------------------------------------------------
+    def _parse_body(self, stream):
+        rows, cols, entries, format, field, symm = (self.rows, self.cols,
+                                                    self.entries, self.format,
+                                                    self.field, self.symmetry)
+
+        dtype = self.DTYPES_BY_FIELD.get(field, None)
+
+        has_symmetry = self.has_symmetry
+        is_integer = field == self.FIELD_INTEGER
+        is_unsigned_integer = field == self.FIELD_UNSIGNED
+        is_complex = field == self.FIELD_COMPLEX
+        is_skew = symm == self.SYMMETRY_SKEW_SYMMETRIC
+        is_herm = symm == self.SYMMETRY_HERMITIAN
+        is_pattern = field == self.FIELD_PATTERN
+
+        if format == self.FORMAT_ARRAY:
+            a = zeros((rows, cols), dtype=dtype)
+            line = 1
+            i, j = 0, 0
+            if is_skew:
+                a[i, j] = 0
+                if i < rows - 1:
+                    i += 1
+            while line:
+                line = stream.readline()
+                # line.startswith('%')
+                if not line or line[0] in ['%', 37] or not line.strip():
+                    continue
+                if is_integer:
+                    aij = int(line)
+                elif is_unsigned_integer:
+                    aij = int(line)
+                elif is_complex:
+                    aij = complex(*map(float, line.split()))
+                else:
+                    aij = float(line)
+                a[i, j] = aij
+                if has_symmetry and i != j:
+                    if is_skew:
+                        a[j, i] = -aij
+                    elif is_herm:
+                        a[j, i] = conj(aij)
+                    else:
+                        a[j, i] = aij
+                if i < rows-1:
+                    i = i + 1
+                else:
+                    j = j + 1
+                    if not has_symmetry:
+                        i = 0
+                    else:
+                        i = j
+                        if is_skew:
+                            a[i, j] = 0
+                            if i < rows-1:
+                                i += 1
+
+            if is_skew:
+                if not (i in [0, j] and j == cols - 1):
+                    raise ValueError("Parse error, did not read all lines.")
+            else:
+                if not (i in [0, j] and j == cols):
+                    raise ValueError("Parse error, did not read all lines.")
+
+        elif format == self.FORMAT_COORDINATE:
+            # Read sparse COOrdinate format
+
+            if entries == 0:
+                # empty matrix
+                return coo_array((rows, cols), dtype=dtype)
+
+            I = zeros(entries, dtype='intc')
+            J = zeros(entries, dtype='intc')
+            if is_pattern:
+                V = ones(entries, dtype='int8')
+            elif is_integer:
+                V = zeros(entries, dtype='intp')
+            elif is_unsigned_integer:
+                V = zeros(entries, dtype='uint64')
+            elif is_complex:
+                V = zeros(entries, dtype='complex')
+            else:
+                V = zeros(entries, dtype='float')
+
+            entry_number = 0
+            for line in stream:
+                # line.startswith('%')
+                if not line or line[0] in ['%', 37] or not line.strip():
+                    continue
+
+                if entry_number+1 > entries:
+                    raise ValueError("'entries' in header is smaller than "
+                                     "number of entries")
+                l = line.split()
+                I[entry_number], J[entry_number] = map(int, l[:2])
+
+                if not is_pattern:
+                    if is_integer:
+                        V[entry_number] = int(l[2])
+                    elif is_unsigned_integer:
+                        V[entry_number] = int(l[2])
+                    elif is_complex:
+                        V[entry_number] = complex(*map(float, l[2:]))
+                    else:
+                        V[entry_number] = float(l[2])
+                entry_number += 1
+            if entry_number < entries:
+                raise ValueError("'entries' in header is larger than "
+                                 "number of entries")
+
+            I -= 1  # adjust indices (base 1 -> base 0)
+            J -= 1
+
+            if has_symmetry:
+                mask = (I != J)       # off diagonal mask
+                od_I = I[mask]
+                od_J = J[mask]
+                od_V = V[mask]
+
+                I = concatenate((I, od_J))
+                J = concatenate((J, od_I))
+
+                if is_skew:
+                    od_V *= -1
+                elif is_herm:
+                    od_V = od_V.conjugate()
+
+                V = concatenate((V, od_V))
+
+            a = coo_array((V, (I, J)), shape=(rows, cols), dtype=dtype)
+        else:
+            raise NotImplementedError(format)
+
+        return a
+
+    #  ------------------------------------------------------------------------
+    def _write(self, stream, a, comment='', field=None, precision=None,
+               symmetry=None):
+        if isinstance(a, list) or isinstance(a, ndarray) or \
+           isinstance(a, tuple) or hasattr(a, '__array__'):
+            rep = self.FORMAT_ARRAY
+            a = asarray(a)
+            if len(a.shape) != 2:
+                raise ValueError('Expected 2 dimensional array')
+            rows, cols = a.shape
+
+            if field is not None:
+
+                if field == self.FIELD_INTEGER:
+                    if not can_cast(a.dtype, 'intp'):
+                        raise OverflowError("mmwrite does not support integer "
+                                            "dtypes larger than native 'intp'.")
+                    a = a.astype('intp')
+                elif field == self.FIELD_REAL:
+                    if a.dtype.char not in 'fd':
+                        a = a.astype('d')
+                elif field == self.FIELD_COMPLEX:
+                    if a.dtype.char not in 'FD':
+                        a = a.astype('D')
+
+        else:
+            if not issparse(a):
+                raise ValueError(f'unknown matrix type: {type(a)}')
+
+            rep = 'coordinate'
+            rows, cols = a.shape
+
+        typecode = a.dtype.char
+
+        if precision is None:
+            if typecode in 'fF':
+                precision = 8
+            else:
+                precision = 16
+        if field is None:
+            kind = a.dtype.kind
+            if kind == 'i':
+                if not can_cast(a.dtype, 'intp'):
+                    raise OverflowError("mmwrite does not support integer "
+                                        "dtypes larger than native 'intp'.")
+                field = 'integer'
+            elif kind == 'f':
+                field = 'real'
+            elif kind == 'c':
+                field = 'complex'
+            elif kind == 'u':
+                field = 'unsigned-integer'
+            else:
+                raise TypeError('unexpected dtype kind ' + kind)
+
+        if symmetry is None:
+            symmetry = self._get_symmetry(a)
+
+        # validate rep, field, and symmetry
+        self.__class__._validate_format(rep)
+        self.__class__._validate_field(field)
+        self.__class__._validate_symmetry(symmetry)
+
+        # write initial header line
+        data = f'%%MatrixMarket matrix {rep} {field} {symmetry}\n'
+        stream.write(data.encode('latin1'))
+
+        # write comments
+        for line in comment.split('\n'):
+            data = f'%{line}\n'
+            stream.write(data.encode('latin1'))
+
+        template = self._field_template(field, precision)
+        # write dense format
+        if rep == self.FORMAT_ARRAY:
+            # write shape spec
+            data = '%i %i\n' % (rows, cols)
+            stream.write(data.encode('latin1'))
+
+            if field in (self.FIELD_INTEGER, self.FIELD_REAL,
+                         self.FIELD_UNSIGNED):
+                if symmetry == self.SYMMETRY_GENERAL:
+                    for j in range(cols):
+                        for i in range(rows):
+                            data = template % a[i, j]
+                            stream.write(data.encode('latin1'))
+
+                elif symmetry == self.SYMMETRY_SKEW_SYMMETRIC:
+                    for j in range(cols):
+                        for i in range(j + 1, rows):
+                            data = template % a[i, j]
+                            stream.write(data.encode('latin1'))
+
+                else:
+                    for j in range(cols):
+                        for i in range(j, rows):
+                            data = template % a[i, j]
+                            stream.write(data.encode('latin1'))
+
+            elif field == self.FIELD_COMPLEX:
+
+                if symmetry == self.SYMMETRY_GENERAL:
+                    for j in range(cols):
+                        for i in range(rows):
+                            aij = a[i, j]
+                            data = template % (real(aij), imag(aij))
+                            stream.write(data.encode('latin1'))
+                else:
+                    for j in range(cols):
+                        for i in range(j, rows):
+                            aij = a[i, j]
+                            data = template % (real(aij), imag(aij))
+                            stream.write(data.encode('latin1'))
+
+            elif field == self.FIELD_PATTERN:
+                raise ValueError('pattern type inconsisted with dense format')
+
+            else:
+                raise TypeError(f'Unknown field type {field}')
+
+        # write sparse format
+        else:
+            coo = a.tocoo()  # convert to COOrdinate format
+
+            # if symmetry format used, remove values above main diagonal
+            if symmetry != self.SYMMETRY_GENERAL:
+                lower_triangle_mask = coo.row >= coo.col
+                coo = coo_array((coo.data[lower_triangle_mask],
+                                (coo.row[lower_triangle_mask],
+                                 coo.col[lower_triangle_mask])),
+                                shape=coo.shape)
+
+            # write shape spec
+            data = '%i %i %i\n' % (rows, cols, coo.nnz)
+            stream.write(data.encode('latin1'))
+
+            template = self._field_template(field, precision-1)
+
+            if field == self.FIELD_PATTERN:
+                for r, c in zip(coo.row+1, coo.col+1):
+                    data = "%i %i\n" % (r, c)
+                    stream.write(data.encode('latin1'))
+            elif field in (self.FIELD_INTEGER, self.FIELD_REAL,
+                           self.FIELD_UNSIGNED):
+                for r, c, d in zip(coo.row+1, coo.col+1, coo.data):
+                    data = ("%i %i " % (r, c)) + (template % d)
+                    stream.write(data.encode('latin1'))
+            elif field == self.FIELD_COMPLEX:
+                for r, c, d in zip(coo.row+1, coo.col+1, coo.data):
+                    data = ("%i %i " % (r, c)) + (template % (d.real, d.imag))
+                    stream.write(data.encode('latin1'))
+            else:
+                raise TypeError(f'Unknown field type {field}')
+
+
+def _is_fromfile_compatible(stream):
+    """
+    Check whether `stream` is compatible with numpy.fromfile.
+
+    Passing a gzipped file object to ``fromfile/fromstring`` doesn't work with
+    Python 3.
+    """
+
+    bad_cls = []
+    try:
+        import gzip
+        bad_cls.append(gzip.GzipFile)
+    except ImportError:
+        pass
+    try:
+        import bz2
+        bad_cls.append(bz2.BZ2File)
+    except ImportError:
+        pass
+
+    bad_cls = tuple(bad_cls)
+    return not isinstance(stream, bad_cls)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_netcdf.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_netcdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..3f4bddd0126facebd39c7ae996eb885a630cf550
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_netcdf.py
@@ -0,0 +1,1094 @@
+"""
+NetCDF reader/writer module.
+
+This module is used to read and create NetCDF files. NetCDF files are
+accessed through the `netcdf_file` object. Data written to and from NetCDF
+files are contained in `netcdf_variable` objects. Attributes are given
+as member variables of the `netcdf_file` and `netcdf_variable` objects.
+
+This module implements the Scientific.IO.NetCDF API to read and create
+NetCDF files. The same API is also used in the PyNIO and pynetcdf
+modules, allowing these modules to be used interchangeably when working
+with NetCDF files.
+
+Only NetCDF3 is supported here; for NetCDF4 see
+`netCDF4-python `__,
+which has a similar API.
+
+"""
+
+# TODO:
+# * properly implement ``_FillValue``.
+# * fix character variables.
+# * implement PAGESIZE for Python 2.6?
+
+# The Scientific.IO.NetCDF API allows attributes to be added directly to
+# instances of ``netcdf_file`` and ``netcdf_variable``. To differentiate
+# between user-set attributes and instance attributes, user-set attributes
+# are automatically stored in the ``_attributes`` attribute by overloading
+#``__setattr__``. This is the reason why the code sometimes uses
+#``obj.__dict__['key'] = value``, instead of simply ``obj.key = value``;
+# otherwise the key would be inserted into userspace attributes.
+
+
+__all__ = ['netcdf_file', 'netcdf_variable']
+
+
+import warnings
+import weakref
+from operator import mul
+from platform import python_implementation
+
+import mmap as mm
+
+import numpy as np
+from numpy import frombuffer, dtype, empty, array, asarray
+from numpy import little_endian as LITTLE_ENDIAN
+from functools import reduce
+
+
+IS_PYPY = python_implementation() == 'PyPy'
+
+ABSENT = b'\x00\x00\x00\x00\x00\x00\x00\x00'
+ZERO = b'\x00\x00\x00\x00'
+NC_BYTE = b'\x00\x00\x00\x01'
+NC_CHAR = b'\x00\x00\x00\x02'
+NC_SHORT = b'\x00\x00\x00\x03'
+NC_INT = b'\x00\x00\x00\x04'
+NC_FLOAT = b'\x00\x00\x00\x05'
+NC_DOUBLE = b'\x00\x00\x00\x06'
+NC_DIMENSION = b'\x00\x00\x00\n'
+NC_VARIABLE = b'\x00\x00\x00\x0b'
+NC_ATTRIBUTE = b'\x00\x00\x00\x0c'
+FILL_BYTE = b'\x81'
+FILL_CHAR = b'\x00'
+FILL_SHORT = b'\x80\x01'
+FILL_INT = b'\x80\x00\x00\x01'
+FILL_FLOAT = b'\x7C\xF0\x00\x00'
+FILL_DOUBLE = b'\x47\x9E\x00\x00\x00\x00\x00\x00'
+
+TYPEMAP = {NC_BYTE: ('b', 1),
+           NC_CHAR: ('c', 1),
+           NC_SHORT: ('h', 2),
+           NC_INT: ('i', 4),
+           NC_FLOAT: ('f', 4),
+           NC_DOUBLE: ('d', 8)}
+
+FILLMAP = {NC_BYTE: FILL_BYTE,
+           NC_CHAR: FILL_CHAR,
+           NC_SHORT: FILL_SHORT,
+           NC_INT: FILL_INT,
+           NC_FLOAT: FILL_FLOAT,
+           NC_DOUBLE: FILL_DOUBLE}
+
+REVERSE = {('b', 1): NC_BYTE,
+           ('B', 1): NC_CHAR,
+           ('c', 1): NC_CHAR,
+           ('h', 2): NC_SHORT,
+           ('i', 4): NC_INT,
+           ('f', 4): NC_FLOAT,
+           ('d', 8): NC_DOUBLE,
+
+           # these come from asarray(1).dtype.char and asarray('foo').dtype.char,
+           # used when getting the types from generic attributes.
+           ('l', 4): NC_INT,
+           ('S', 1): NC_CHAR}
+
+
+class netcdf_file:
+    """
+    A file object for NetCDF data.
+
+    A `netcdf_file` object has two standard attributes: `dimensions` and
+    `variables`. The values of both are dictionaries, mapping dimension
+    names to their associated lengths and variable names to variables,
+    respectively. Application programs should never modify these
+    dictionaries.
+
+    All other attributes correspond to global attributes defined in the
+    NetCDF file. Global file attributes are created by assigning to an
+    attribute of the `netcdf_file` object.
+
+    Parameters
+    ----------
+    filename : string or file-like
+        string -> filename
+    mode : {'r', 'w', 'a'}, optional
+        read-write-append mode, default is 'r'
+    mmap : None or bool, optional
+        Whether to mmap `filename` when reading.  Default is True
+        when `filename` is a file name, False when `filename` is a
+        file-like object. Note that when mmap is in use, data arrays
+        returned refer directly to the mmapped data on disk, and the
+        file cannot be closed as long as references to it exist.
+    version : {1, 2}, optional
+        version of netcdf to read / write, where 1 means *Classic
+        format* and 2 means *64-bit offset format*.  Default is 1.  See
+        `here `__
+        for more info.
+    maskandscale : bool, optional
+        Whether to automatically scale and/or mask data based on attributes.
+        Default is False.
+
+    Notes
+    -----
+    The major advantage of this module over other modules is that it doesn't
+    require the code to be linked to the NetCDF libraries. This module is
+    derived from `pupynere `_.
+
+    NetCDF files are a self-describing binary data format. The file contains
+    metadata that describes the dimensions and variables in the file. More
+    details about NetCDF files can be found `here
+    `__. There
+    are three main sections to a NetCDF data structure:
+
+    1. Dimensions
+    2. Variables
+    3. Attributes
+
+    The dimensions section records the name and length of each dimension used
+    by the variables. The variables would then indicate which dimensions it
+    uses and any attributes such as data units, along with containing the data
+    values for the variable. It is good practice to include a
+    variable that is the same name as a dimension to provide the values for
+    that axes. Lastly, the attributes section would contain additional
+    information such as the name of the file creator or the instrument used to
+    collect the data.
+
+    When writing data to a NetCDF file, there is often the need to indicate the
+    'record dimension'. A record dimension is the unbounded dimension for a
+    variable. For example, a temperature variable may have dimensions of
+    latitude, longitude and time. If one wants to add more temperature data to
+    the NetCDF file as time progresses, then the temperature variable should
+    have the time dimension flagged as the record dimension.
+
+    In addition, the NetCDF file header contains the position of the data in
+    the file, so access can be done in an efficient manner without loading
+    unnecessary data into memory. It uses the ``mmap`` module to create
+    Numpy arrays mapped to the data on disk, for the same purpose.
+
+    Note that when `netcdf_file` is used to open a file with mmap=True
+    (default for read-only), arrays returned by it refer to data
+    directly on the disk. The file should not be closed, and cannot be cleanly
+    closed when asked, if such arrays are alive. You may want to copy data arrays
+    obtained from mmapped Netcdf file if they are to be processed after the file
+    is closed, see the example below.
+
+    Examples
+    --------
+    To create a NetCDF file:
+
+    >>> from scipy.io import netcdf_file
+    >>> import numpy as np
+    >>> f = netcdf_file('simple.nc', 'w')
+    >>> f.history = 'Created for a test'
+    >>> f.createDimension('time', 10)
+    >>> time = f.createVariable('time', 'i', ('time',))
+    >>> time[:] = np.arange(10)
+    >>> time.units = 'days since 2008-01-01'
+    >>> f.close()
+
+    Note the assignment of ``arange(10)`` to ``time[:]``.  Exposing the slice
+    of the time variable allows for the data to be set in the object, rather
+    than letting ``arange(10)`` overwrite the ``time`` variable.
+
+    To read the NetCDF file we just created:
+
+    >>> from scipy.io import netcdf_file
+    >>> f = netcdf_file('simple.nc', 'r')
+    >>> print(f.history)
+    b'Created for a test'
+    >>> time = f.variables['time']
+    >>> print(time.units)
+    b'days since 2008-01-01'
+    >>> print(time.shape)
+    (10,)
+    >>> print(time[-1])
+    9
+
+    NetCDF files, when opened read-only, return arrays that refer
+    directly to memory-mapped data on disk:
+
+    >>> data = time[:]
+
+    If the data is to be processed after the file is closed, it needs
+    to be copied to main memory:
+
+    >>> data = time[:].copy()
+    >>> del time
+    >>> f.close()
+    >>> data.mean()
+    4.5
+
+    A NetCDF file can also be used as context manager:
+
+    >>> from scipy.io import netcdf_file
+    >>> with netcdf_file('simple.nc', 'r') as f:
+    ...     print(f.history)
+    b'Created for a test'
+
+    """
+    def __init__(self, filename, mode='r', mmap=None, version=1,
+                 maskandscale=False):
+        """Initialize netcdf_file from fileobj (str or file-like)."""
+        if mode not in 'rwa':
+            raise ValueError("Mode must be either 'r', 'w' or 'a'.")
+
+        if hasattr(filename, 'seek'):  # file-like
+            self.fp = filename
+            self.filename = 'None'
+            if mmap is None:
+                mmap = False
+            elif mmap and not hasattr(filename, 'fileno'):
+                raise ValueError('Cannot use file object for mmap')
+        else:  # maybe it's a string
+            self.filename = filename
+            omode = 'r+' if mode == 'a' else mode
+            self.fp = open(self.filename, f'{omode}b')
+            if mmap is None:
+                # Mmapped files on PyPy cannot be usually closed
+                # before the GC runs, so it's better to use mmap=False
+                # as the default.
+                mmap = (not IS_PYPY)
+
+        if mode != 'r':
+            # Cannot read write-only files
+            mmap = False
+
+        self.use_mmap = mmap
+        self.mode = mode
+        self.version_byte = version
+        self.maskandscale = maskandscale
+
+        self.dimensions = {}
+        self.variables = {}
+
+        self._dims = []
+        self._recs = 0
+        self._recsize = 0
+
+        self._mm = None
+        self._mm_buf = None
+        if self.use_mmap:
+            self._mm = mm.mmap(self.fp.fileno(), 0, access=mm.ACCESS_READ)
+            self._mm_buf = np.frombuffer(self._mm, dtype=np.int8)
+
+        self._attributes = {}
+
+        if mode in 'ra':
+            self._read()
+
+    def __setattr__(self, attr, value):
+        # Store user defined attributes in a separate dict,
+        # so we can save them to file later.
+        try:
+            self._attributes[attr] = value
+        except AttributeError:
+            pass
+        self.__dict__[attr] = value
+
+    def close(self):
+        """Closes the NetCDF file."""
+        if hasattr(self, 'fp') and not self.fp.closed:
+            try:
+                self.flush()
+            finally:
+                self.variables = {}
+                if self._mm_buf is not None:
+                    ref = weakref.ref(self._mm_buf)
+                    self._mm_buf = None
+                    if ref() is None:
+                        # self._mm_buf is gc'd, and we can close the mmap
+                        self._mm.close()
+                    else:
+                        # we cannot close self._mm, since self._mm_buf is
+                        # alive and there may still be arrays referring to it
+                        warnings.warn(
+                            "Cannot close a netcdf_file opened with mmap=True, when "
+                            "netcdf_variables or arrays referring to its data still "
+                            "exist. All data arrays obtained from such files refer "
+                            "directly to data on disk, and must be copied before the "
+                            "file can be cleanly closed. "
+                            "(See netcdf_file docstring for more information on mmap.)",
+                            category=RuntimeWarning, stacklevel=2,
+                        )
+                self._mm = None
+                self.fp.close()
+    __del__ = close
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, type, value, traceback):
+        self.close()
+
+    def createDimension(self, name, length):
+        """
+        Adds a dimension to the Dimension section of the NetCDF data structure.
+
+        Note that this function merely adds a new dimension that the variables can
+        reference. The values for the dimension, if desired, should be added as
+        a variable using `createVariable`, referring to this dimension.
+
+        Parameters
+        ----------
+        name : str
+            Name of the dimension (Eg, 'lat' or 'time').
+        length : int
+            Length of the dimension.
+
+        See Also
+        --------
+        createVariable
+
+        """
+        if length is None and self._dims:
+            raise ValueError("Only first dimension may be unlimited!")
+
+        self.dimensions[name] = length
+        self._dims.append(name)
+
+    def createVariable(self, name, type, dimensions):
+        """
+        Create an empty variable for the `netcdf_file` object, specifying its data
+        type and the dimensions it uses.
+
+        Parameters
+        ----------
+        name : str
+            Name of the new variable.
+        type : dtype or str
+            Data type of the variable.
+        dimensions : sequence of str
+            List of the dimension names used by the variable, in the desired order.
+
+        Returns
+        -------
+        variable : netcdf_variable
+            The newly created ``netcdf_variable`` object.
+            This object has also been added to the `netcdf_file` object as well.
+
+        See Also
+        --------
+        createDimension
+
+        Notes
+        -----
+        Any dimensions to be used by the variable should already exist in the
+        NetCDF data structure or should be created by `createDimension` prior to
+        creating the NetCDF variable.
+
+        """
+        shape = tuple([self.dimensions[dim] for dim in dimensions])
+        shape_ = tuple([dim or 0 for dim in shape])  # replace None with 0 for NumPy
+
+        type = dtype(type)
+        typecode, size = type.char, type.itemsize
+        if (typecode, size) not in REVERSE:
+            raise ValueError(f"NetCDF 3 does not support type {type}")
+
+        # convert to big endian always for NetCDF 3
+        data = empty(shape_, dtype=type.newbyteorder("B"))
+        self.variables[name] = netcdf_variable(
+                data, typecode, size, shape, dimensions,
+                maskandscale=self.maskandscale)
+        return self.variables[name]
+
+    def flush(self):
+        """
+        Perform a sync-to-disk flush if the `netcdf_file` object is in write mode.
+
+        See Also
+        --------
+        sync : Identical function
+
+        """
+        if hasattr(self, 'mode') and self.mode in 'wa':
+            self._write()
+    sync = flush
+
+    def _write(self):
+        self.fp.seek(0)
+        self.fp.write(b'CDF')
+        self.fp.write(array(self.version_byte, '>b').tobytes())
+
+        # Write headers and data.
+        self._write_numrecs()
+        self._write_dim_array()
+        self._write_gatt_array()
+        self._write_var_array()
+
+    def _write_numrecs(self):
+        # Get highest record count from all record variables.
+        for var in self.variables.values():
+            if var.isrec and len(var.data) > self._recs:
+                self.__dict__['_recs'] = len(var.data)
+        self._pack_int(self._recs)
+
+    def _write_dim_array(self):
+        if self.dimensions:
+            self.fp.write(NC_DIMENSION)
+            self._pack_int(len(self.dimensions))
+            for name in self._dims:
+                self._pack_string(name)
+                length = self.dimensions[name]
+                self._pack_int(length or 0)  # replace None with 0 for record dimension
+        else:
+            self.fp.write(ABSENT)
+
+    def _write_gatt_array(self):
+        self._write_att_array(self._attributes)
+
+    def _write_att_array(self, attributes):
+        if attributes:
+            self.fp.write(NC_ATTRIBUTE)
+            self._pack_int(len(attributes))
+            for name, values in attributes.items():
+                self._pack_string(name)
+                self._write_att_values(values)
+        else:
+            self.fp.write(ABSENT)
+
+    def _write_var_array(self):
+        if self.variables:
+            self.fp.write(NC_VARIABLE)
+            self._pack_int(len(self.variables))
+
+            # Sort variable names non-recs first, then recs.
+            def sortkey(n):
+                v = self.variables[n]
+                if v.isrec:
+                    return (-1,)
+                return v._shape
+            variables = sorted(self.variables, key=sortkey, reverse=True)
+
+            # Set the metadata for all variables.
+            for name in variables:
+                self._write_var_metadata(name)
+            # Now that we have the metadata, we know the vsize of
+            # each record variable, so we can calculate recsize.
+            self.__dict__['_recsize'] = sum([
+                    var._vsize for var in self.variables.values()
+                    if var.isrec])
+            # Set the data for all variables.
+            for name in variables:
+                self._write_var_data(name)
+        else:
+            self.fp.write(ABSENT)
+
+    def _write_var_metadata(self, name):
+        var = self.variables[name]
+
+        self._pack_string(name)
+        self._pack_int(len(var.dimensions))
+        for dimname in var.dimensions:
+            dimid = self._dims.index(dimname)
+            self._pack_int(dimid)
+
+        self._write_att_array(var._attributes)
+
+        nc_type = REVERSE[var.typecode(), var.itemsize()]
+        self.fp.write(nc_type)
+
+        if not var.isrec:
+            vsize = var.data.size * var.data.itemsize
+            vsize += -vsize % 4
+        else:  # record variable
+            try:
+                vsize = var.data[0].size * var.data.itemsize
+            except IndexError:
+                vsize = 0
+            rec_vars = len([v for v in self.variables.values()
+                            if v.isrec])
+            if rec_vars > 1:
+                vsize += -vsize % 4
+        self.variables[name].__dict__['_vsize'] = vsize
+        self._pack_int(vsize)
+
+        # Pack a bogus begin, and set the real value later.
+        self.variables[name].__dict__['_begin'] = self.fp.tell()
+        self._pack_begin(0)
+
+    def _write_var_data(self, name):
+        var = self.variables[name]
+
+        # Set begin in file header.
+        the_beguine = self.fp.tell()
+        self.fp.seek(var._begin)
+        self._pack_begin(the_beguine)
+        self.fp.seek(the_beguine)
+
+        # Write data.
+        if not var.isrec:
+            self.fp.write(var.data.tobytes())
+            count = var.data.size * var.data.itemsize
+            self._write_var_padding(var, var._vsize - count)
+        else:  # record variable
+            # Handle rec vars with shape[0] < nrecs.
+            if self._recs > len(var.data):
+                shape = (self._recs,) + var.data.shape[1:]
+                # Resize in-place does not always work since
+                # the array might not be single-segment
+                try:
+                    var.data.resize(shape)
+                except ValueError:
+                    dtype = var.data.dtype
+                    var.__dict__['data'] = np.resize(var.data, shape).astype(dtype)
+
+            pos0 = pos = self.fp.tell()
+            for rec in var.data:
+                # Apparently scalars cannot be converted to big endian. If we
+                # try to convert a ``=i4`` scalar to, say, '>i4' the dtype
+                # will remain as ``=i4``.
+                if not rec.shape and (rec.dtype.byteorder == '<' or
+                        (rec.dtype.byteorder == '=' and LITTLE_ENDIAN)):
+                    rec = rec.byteswap()
+                self.fp.write(rec.tobytes())
+                # Padding
+                count = rec.size * rec.itemsize
+                self._write_var_padding(var, var._vsize - count)
+                pos += self._recsize
+                self.fp.seek(pos)
+            self.fp.seek(pos0 + var._vsize)
+
+    def _write_var_padding(self, var, size):
+        encoded_fill_value = var._get_encoded_fill_value()
+        num_fills = size // len(encoded_fill_value)
+        self.fp.write(encoded_fill_value * num_fills)
+
+    def _write_att_values(self, values):
+        if hasattr(values, 'dtype'):
+            nc_type = REVERSE[values.dtype.char, values.dtype.itemsize]
+        else:
+            types = [(int, NC_INT), (float, NC_FLOAT), (str, NC_CHAR)]
+
+            # bytes index into scalars in py3k. Check for "string" types
+            if isinstance(values, (str, bytes)):
+                sample = values
+            else:
+                try:
+                    sample = values[0]  # subscriptable?
+                except TypeError:
+                    sample = values     # scalar
+
+            for class_, nc_type in types:
+                if isinstance(sample, class_):
+                    break
+
+        typecode, size = TYPEMAP[nc_type]
+        dtype_ = f'>{typecode}'
+        # asarray() dies with bytes and '>c' in py3k. Change to 'S'
+        dtype_ = 'S' if dtype_ == '>c' else dtype_
+
+        values = asarray(values, dtype=dtype_)
+
+        self.fp.write(nc_type)
+
+        if values.dtype.char == 'S':
+            nelems = values.itemsize
+        else:
+            nelems = values.size
+        self._pack_int(nelems)
+
+        if not values.shape and (values.dtype.byteorder == '<' or
+                (values.dtype.byteorder == '=' and LITTLE_ENDIAN)):
+            values = values.byteswap()
+        self.fp.write(values.tobytes())
+        count = values.size * values.itemsize
+        self.fp.write(b'\x00' * (-count % 4))  # pad
+
+    def _read(self):
+        # Check magic bytes and version
+        magic = self.fp.read(3)
+        if not magic == b'CDF':
+            raise TypeError(f"Error: {self.filename} is not a valid NetCDF 3 file")
+        self.__dict__['version_byte'] = frombuffer(self.fp.read(1), '>b')[0]
+
+        # Read file headers and set data.
+        self._read_numrecs()
+        self._read_dim_array()
+        self._read_gatt_array()
+        self._read_var_array()
+
+    def _read_numrecs(self):
+        self.__dict__['_recs'] = self._unpack_int()
+
+    def _read_dim_array(self):
+        header = self.fp.read(4)
+        if header not in [ZERO, NC_DIMENSION]:
+            raise ValueError("Unexpected header.")
+        count = self._unpack_int()
+
+        for dim in range(count):
+            name = self._unpack_string().decode('latin1')
+            length = self._unpack_int() or None  # None for record dimension
+            self.dimensions[name] = length
+            self._dims.append(name)  # preserve order
+
+    def _read_gatt_array(self):
+        for k, v in self._read_att_array().items():
+            self.__setattr__(k, v)
+
+    def _read_att_array(self):
+        header = self.fp.read(4)
+        if header not in [ZERO, NC_ATTRIBUTE]:
+            raise ValueError("Unexpected header.")
+        count = self._unpack_int()
+
+        attributes = {}
+        for attr in range(count):
+            name = self._unpack_string().decode('latin1')
+            attributes[name] = self._read_att_values()
+        return attributes
+
+    def _read_var_array(self):
+        header = self.fp.read(4)
+        if header not in [ZERO, NC_VARIABLE]:
+            raise ValueError("Unexpected header.")
+
+        begin = 0
+        dtypes = {'names': [], 'formats': []}
+        rec_vars = []
+        count = self._unpack_int()
+        for var in range(count):
+            (name, dimensions, shape, attributes,
+             typecode, size, dtype_, begin_, vsize) = self._read_var()
+            # https://www.unidata.ucar.edu/software/netcdf/guide_toc.html
+            # Note that vsize is the product of the dimension lengths
+            # (omitting the record dimension) and the number of bytes
+            # per value (determined from the type), increased to the
+            # next multiple of 4, for each variable. If a record
+            # variable, this is the amount of space per record. The
+            # netCDF "record size" is calculated as the sum of the
+            # vsize's of all the record variables.
+            #
+            # The vsize field is actually redundant, because its value
+            # may be computed from other information in the header. The
+            # 32-bit vsize field is not large enough to contain the size
+            # of variables that require more than 2^32 - 4 bytes, so
+            # 2^32 - 1 is used in the vsize field for such variables.
+            if shape and shape[0] is None:  # record variable
+                rec_vars.append(name)
+                # The netCDF "record size" is calculated as the sum of
+                # the vsize's of all the record variables.
+                self.__dict__['_recsize'] += vsize
+                if begin == 0:
+                    begin = begin_
+                dtypes['names'].append(name)
+                dtypes['formats'].append(str(shape[1:]) + dtype_)
+
+                # Handle padding with a virtual variable.
+                if typecode in 'bch':
+                    actual_size = reduce(mul, (1,) + shape[1:]) * size
+                    padding = -actual_size % 4
+                    if padding:
+                        dtypes['names'].append('_padding_%d' % var)
+                        dtypes['formats'].append('(%d,)>b' % padding)
+
+                # Data will be set later.
+                data = None
+            else:  # not a record variable
+                # Calculate size to avoid problems with vsize (above)
+                a_size = reduce(mul, shape, 1) * size
+                if self.use_mmap:
+                    data = self._mm_buf[begin_:begin_+a_size].view(dtype=dtype_)
+                    data.shape = shape
+                else:
+                    pos = self.fp.tell()
+                    self.fp.seek(begin_)
+                    data = frombuffer(self.fp.read(a_size), dtype=dtype_
+                                      ).copy()
+                    data.shape = shape
+                    self.fp.seek(pos)
+
+            # Add variable.
+            self.variables[name] = netcdf_variable(
+                    data, typecode, size, shape, dimensions, attributes,
+                    maskandscale=self.maskandscale)
+
+        if rec_vars:
+            # Remove padding when only one record variable.
+            if len(rec_vars) == 1:
+                dtypes['names'] = dtypes['names'][:1]
+                dtypes['formats'] = dtypes['formats'][:1]
+
+            # Build rec array.
+            if self.use_mmap:
+                buf = self._mm_buf[begin:begin+self._recs*self._recsize]
+                rec_array = buf.view(dtype=dtypes)
+                rec_array.shape = (self._recs,)
+            else:
+                pos = self.fp.tell()
+                self.fp.seek(begin)
+                rec_array = frombuffer(self.fp.read(self._recs*self._recsize),
+                                       dtype=dtypes).copy()
+                rec_array.shape = (self._recs,)
+                self.fp.seek(pos)
+
+            for var in rec_vars:
+                self.variables[var].__dict__['data'] = rec_array[var]
+
+    def _read_var(self):
+        name = self._unpack_string().decode('latin1')
+        dimensions = []
+        shape = []
+        dims = self._unpack_int()
+
+        for i in range(dims):
+            dimid = self._unpack_int()
+            dimname = self._dims[dimid]
+            dimensions.append(dimname)
+            dim = self.dimensions[dimname]
+            shape.append(dim)
+        dimensions = tuple(dimensions)
+        shape = tuple(shape)
+
+        attributes = self._read_att_array()
+        nc_type = self.fp.read(4)
+        vsize = self._unpack_int()
+        begin = [self._unpack_int, self._unpack_int64][self.version_byte-1]()
+
+        typecode, size = TYPEMAP[nc_type]
+        dtype_ = f'>{typecode}'
+
+        return name, dimensions, shape, attributes, typecode, size, dtype_, begin, vsize
+
+    def _read_att_values(self):
+        nc_type = self.fp.read(4)
+        n = self._unpack_int()
+
+        typecode, size = TYPEMAP[nc_type]
+
+        count = n*size
+        values = self.fp.read(int(count))
+        self.fp.read(-count % 4)  # read padding
+
+        if typecode != 'c':
+            values = frombuffer(values, dtype=f'>{typecode}').copy()
+            if values.shape == (1,):
+                values = values[0]
+        else:
+            values = values.rstrip(b'\x00')
+        return values
+
+    def _pack_begin(self, begin):
+        if self.version_byte == 1:
+            self._pack_int(begin)
+        elif self.version_byte == 2:
+            self._pack_int64(begin)
+
+    def _pack_int(self, value):
+        self.fp.write(array(value, '>i').tobytes())
+    _pack_int32 = _pack_int
+
+    def _unpack_int(self):
+        return int(frombuffer(self.fp.read(4), '>i')[0])
+    _unpack_int32 = _unpack_int
+
+    def _pack_int64(self, value):
+        self.fp.write(array(value, '>q').tobytes())
+
+    def _unpack_int64(self):
+        return frombuffer(self.fp.read(8), '>q')[0]
+
+    def _pack_string(self, s):
+        count = len(s)
+        self._pack_int(count)
+        self.fp.write(s.encode('latin1'))
+        self.fp.write(b'\x00' * (-count % 4))  # pad
+
+    def _unpack_string(self):
+        count = self._unpack_int()
+        s = self.fp.read(count).rstrip(b'\x00')
+        self.fp.read(-count % 4)  # read padding
+        return s
+
+
+class netcdf_variable:
+    """
+    A data object for netcdf files.
+
+    `netcdf_variable` objects are constructed by calling the method
+    `netcdf_file.createVariable` on the `netcdf_file` object. `netcdf_variable`
+    objects behave much like array objects defined in numpy, except that their
+    data resides in a file. Data is read by indexing and written by assigning
+    to an indexed subset; the entire array can be accessed by the index ``[:]``
+    or (for scalars) by using the methods `getValue` and `assignValue`.
+    `netcdf_variable` objects also have attribute `shape` with the same meaning
+    as for arrays, but the shape cannot be modified. There is another read-only
+    attribute `dimensions`, whose value is the tuple of dimension names.
+
+    All other attributes correspond to variable attributes defined in
+    the NetCDF file. Variable attributes are created by assigning to an
+    attribute of the `netcdf_variable` object.
+
+    Parameters
+    ----------
+    data : array_like
+        The data array that holds the values for the variable.
+        Typically, this is initialized as empty, but with the proper shape.
+    typecode : dtype character code
+        Desired data-type for the data array.
+    size : int
+        Desired element size for the data array.
+    shape : sequence of ints
+        The shape of the array. This should match the lengths of the
+        variable's dimensions.
+    dimensions : sequence of strings
+        The names of the dimensions used by the variable. Must be in the
+        same order of the dimension lengths given by `shape`.
+    attributes : dict, optional
+        Attribute values (any type) keyed by string names. These attributes
+        become attributes for the netcdf_variable object.
+    maskandscale : bool, optional
+        Whether to automatically scale and/or mask data based on attributes.
+        Default is False.
+
+
+    Attributes
+    ----------
+    dimensions : list of str
+        List of names of dimensions used by the variable object.
+    isrec, shape
+        Properties
+
+    See also
+    --------
+    isrec, shape
+
+    """
+    def __init__(self, data, typecode, size, shape, dimensions,
+                 attributes=None,
+                 maskandscale=False):
+        self.data = data
+        self._typecode = typecode
+        self._size = size
+        self._shape = shape
+        self.dimensions = dimensions
+        self.maskandscale = maskandscale
+
+        self._attributes = attributes or {}
+        for k, v in self._attributes.items():
+            self.__dict__[k] = v
+
+    def __setattr__(self, attr, value):
+        # Store user defined attributes in a separate dict,
+        # so we can save them to file later.
+        try:
+            self._attributes[attr] = value
+        except AttributeError:
+            pass
+        self.__dict__[attr] = value
+
+    def isrec(self):
+        """Returns whether the variable has a record dimension or not.
+
+        A record dimension is a dimension along which additional data could be
+        easily appended in the netcdf data structure without much rewriting of
+        the data file. This attribute is a read-only property of the
+        `netcdf_variable`.
+
+        """
+        return bool(self.data.shape) and not self._shape[0]
+    isrec = property(isrec)
+
+    def shape(self):
+        """Returns the shape tuple of the data variable.
+
+        This is a read-only attribute and can not be modified in the
+        same manner of other numpy arrays.
+        """
+        return self.data.shape
+    shape = property(shape)
+
+    def getValue(self):
+        """
+        Retrieve a scalar value from a `netcdf_variable` of length one.
+
+        Raises
+        ------
+        ValueError
+            If the netcdf variable is an array of length greater than one,
+            this exception will be raised.
+
+        """
+        return self.data.item()
+
+    def assignValue(self, value):
+        """
+        Assign a scalar value to a `netcdf_variable` of length one.
+
+        Parameters
+        ----------
+        value : scalar
+            Scalar value (of compatible type) to assign to a length-one netcdf
+            variable. This value will be written to file.
+
+        Raises
+        ------
+        ValueError
+            If the input is not a scalar, or if the destination is not a length-one
+            netcdf variable.
+
+        """
+        if not self.data.flags.writeable:
+            # Work-around for a bug in NumPy.  Calling itemset() on a read-only
+            # memory-mapped array causes a seg. fault.
+            # See NumPy ticket #1622, and SciPy ticket #1202.
+            # This check for `writeable` can be removed when the oldest version
+            # of NumPy still supported by scipy contains the fix for #1622.
+            raise RuntimeError("variable is not writeable")
+
+        self.data[:] = value
+
+    def typecode(self):
+        """
+        Return the typecode of the variable.
+
+        Returns
+        -------
+        typecode : char
+            The character typecode of the variable (e.g., 'i' for int).
+
+        """
+        return self._typecode
+
+    def itemsize(self):
+        """
+        Return the itemsize of the variable.
+
+        Returns
+        -------
+        itemsize : int
+            The element size of the variable (e.g., 8 for float64).
+
+        """
+        return self._size
+
+    def __getitem__(self, index):
+        if not self.maskandscale:
+            return self.data[index]
+
+        data = self.data[index].copy()
+        missing_value = self._get_missing_value()
+        data = self._apply_missing_value(data, missing_value)
+        scale_factor = self._attributes.get('scale_factor')
+        add_offset = self._attributes.get('add_offset')
+        if add_offset is not None or scale_factor is not None:
+            data = data.astype(np.float64)
+        if scale_factor is not None:
+            data = data * scale_factor
+        if add_offset is not None:
+            data += add_offset
+
+        return data
+
+    def __setitem__(self, index, data):
+        if self.maskandscale:
+            missing_value = (
+                    self._get_missing_value() or
+                    getattr(data, 'fill_value', 999999))
+            self._attributes.setdefault('missing_value', missing_value)
+            self._attributes.setdefault('_FillValue', missing_value)
+            data = ((data - self._attributes.get('add_offset', 0.0)) /
+                    self._attributes.get('scale_factor', 1.0))
+            data = np.ma.asarray(data).filled(missing_value)
+            if self._typecode not in 'fd' and data.dtype.kind == 'f':
+                data = np.round(data)
+
+        # Expand data for record vars?
+        if self.isrec:
+            if isinstance(index, tuple):
+                rec_index = index[0]
+            else:
+                rec_index = index
+            if isinstance(rec_index, slice):
+                recs = (rec_index.start or 0) + len(data)
+            else:
+                recs = rec_index + 1
+            if recs > len(self.data):
+                shape = (recs,) + self._shape[1:]
+                # Resize in-place does not always work since
+                # the array might not be single-segment
+                try:
+                    self.data.resize(shape)
+                except ValueError:
+                    dtype = self.data.dtype
+                    self.__dict__['data'] = np.resize(self.data, shape).astype(dtype)
+        self.data[index] = data
+
+    def _default_encoded_fill_value(self):
+        """
+        The default encoded fill-value for this Variable's data type.
+        """
+        nc_type = REVERSE[self.typecode(), self.itemsize()]
+        return FILLMAP[nc_type]
+
+    def _get_encoded_fill_value(self):
+        """
+        Returns the encoded fill value for this variable as bytes.
+
+        This is taken from either the _FillValue attribute, or the default fill
+        value for this variable's data type.
+        """
+        if '_FillValue' in self._attributes:
+            fill_value = np.array(self._attributes['_FillValue'],
+                                  dtype=self.data.dtype).tobytes()
+            if len(fill_value) == self.itemsize():
+                return fill_value
+            else:
+                return self._default_encoded_fill_value()
+        else:
+            return self._default_encoded_fill_value()
+
+    def _get_missing_value(self):
+        """
+        Returns the value denoting "no data" for this variable.
+
+        If this variable does not have a missing/fill value, returns None.
+
+        If both _FillValue and missing_value are given, give precedence to
+        _FillValue. The netCDF standard gives special meaning to _FillValue;
+        missing_value is  just used for compatibility with old datasets.
+        """
+
+        if '_FillValue' in self._attributes:
+            missing_value = self._attributes['_FillValue']
+        elif 'missing_value' in self._attributes:
+            missing_value = self._attributes['missing_value']
+        else:
+            missing_value = None
+
+        return missing_value
+
+    @staticmethod
+    def _apply_missing_value(data, missing_value):
+        """
+        Applies the given missing value to the data array.
+
+        Returns a numpy.ma array, with any value equal to missing_value masked
+        out (unless missing_value is None, in which case the original array is
+        returned).
+        """
+
+        if missing_value is None:
+            newdata = data
+        else:
+            try:
+                missing_value_isnan = np.isnan(missing_value)
+            except (TypeError, NotImplementedError):
+                # some data types (e.g., characters) cannot be tested for NaN
+                missing_value_isnan = False
+
+            if missing_value_isnan:
+                mymask = np.isnan(data)
+            else:
+                mymask = (data == missing_value)
+
+            newdata = np.ma.masked_where(mymask, data)
+
+        return newdata
+
+
+NetCDFFile = netcdf_file
+NetCDFVariable = netcdf_variable
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_test_fortran.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_test_fortran.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..8a863a591370a3b1bd4afdb05e621c1af8eab3e2
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/_test_fortran.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..dcfe1c4237e69054b582a0fa52f710b25a1d7914
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/__init__.py
@@ -0,0 +1,28 @@
+"""
+Module to read ARFF files
+=========================
+ARFF is the standard data format for WEKA.
+It is a text file format which support numerical, string and data values.
+The format can also represent missing data and sparse data.
+
+Notes
+-----
+The ARFF support in ``scipy.io`` provides file reading functionality only.
+For more extensive ARFF functionality, see `liac-arff
+`_.
+
+See the `WEKA website `_
+for more details about the ARFF format and available datasets.
+
+"""
+from ._arffread import *
+from . import _arffread
+
+# Deprecated namespaces, to be removed in v2.0.0
+from .import arffread
+
+__all__ = _arffread.__all__ + ['arffread']
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/_arffread.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/_arffread.py
new file mode 100644
index 0000000000000000000000000000000000000000..65495b8d98386492eecbccb8968715590c0faf7c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/_arffread.py
@@ -0,0 +1,873 @@
+# Last Change: Mon Aug 20 08:00 PM 2007 J
+import re
+import datetime
+
+import numpy as np
+
+import csv
+import ctypes
+
+"""A module to read arff files."""
+
+__all__ = ['MetaData', 'loadarff', 'ArffError', 'ParseArffError']
+
+# An Arff file is basically two parts:
+#   - header
+#   - data
+#
+# A header has each of its components starting by @META where META is one of
+# the keyword (attribute of relation, for now).
+
+# TODO:
+#   - both integer and reals are treated as numeric -> the integer info
+#    is lost!
+#   - Replace ValueError by ParseError or something
+
+# We know can handle the following:
+#   - numeric and nominal attributes
+#   - missing values for numeric attributes
+
+r_meta = re.compile(r'^\s*@')
+# Match a comment
+r_comment = re.compile(r'^%')
+# Match an empty line
+r_empty = re.compile(r'^\s+$')
+# Match a header line, that is a line which starts by @ + a word
+r_headerline = re.compile(r'^\s*@\S*')
+r_datameta = re.compile(r'^@[Dd][Aa][Tt][Aa]')
+r_relation = re.compile(r'^@[Rr][Ee][Ll][Aa][Tt][Ii][Oo][Nn]\s*(\S*)')
+r_attribute = re.compile(r'^\s*@[Aa][Tt][Tt][Rr][Ii][Bb][Uu][Tt][Ee]\s*(..*$)')
+
+r_nominal = re.compile(r'{(.+)}')
+r_date = re.compile(r"[Dd][Aa][Tt][Ee]\s+[\"']?(.+?)[\"']?$")
+
+# To get attributes name enclosed with ''
+r_comattrval = re.compile(r"'(..+)'\s+(..+$)")
+# To get normal attributes
+r_wcomattrval = re.compile(r"(\S+)\s+(..+$)")
+
+# ------------------------
+# Module defined exception
+# ------------------------
+
+
+class ArffError(OSError):
+    pass
+
+
+class ParseArffError(ArffError):
+    pass
+
+
+# ----------
+# Attributes
+# ----------
+class Attribute:
+
+    type_name = None
+
+    def __init__(self, name):
+        self.name = name
+        self.range = None
+        self.dtype = np.object_
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+        """
+        return None
+
+    def parse_data(self, data_str):
+        """
+        Parse a value of this type.
+        """
+        return None
+
+    def __str__(self):
+        """
+        Parse a value of this type.
+        """
+        return self.name + ',' + self.type_name
+
+
+class NominalAttribute(Attribute):
+
+    type_name = 'nominal'
+
+    def __init__(self, name, values):
+        super().__init__(name)
+        self.values = values
+        self.range = values
+        self.dtype = (np.bytes_, max(len(i) for i in values))
+
+    @staticmethod
+    def _get_nom_val(atrv):
+        """Given a string containing a nominal type, returns a tuple of the
+        possible values.
+
+        A nominal type is defined as something framed between braces ({}).
+
+        Parameters
+        ----------
+        atrv : str
+           Nominal type definition
+
+        Returns
+        -------
+        poss_vals : tuple
+           possible values
+
+        Examples
+        --------
+        >>> from scipy.io.arff._arffread import NominalAttribute
+        >>> NominalAttribute._get_nom_val("{floup, bouga, fl, ratata}")
+        ('floup', 'bouga', 'fl', 'ratata')
+        """
+        m = r_nominal.match(atrv)
+        if m:
+            attrs, _ = split_data_line(m.group(1))
+            return tuple(attrs)
+        else:
+            raise ValueError("This does not look like a nominal string")
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+
+        For nominal attributes, the attribute string would be like '{,
+         , }'.
+        """
+        if attr_string[0] == '{':
+            values = cls._get_nom_val(attr_string)
+            return cls(name, values)
+        else:
+            return None
+
+    def parse_data(self, data_str):
+        """
+        Parse a value of this type.
+        """
+        if data_str in self.values:
+            return data_str
+        elif data_str == '?':
+            return data_str
+        else:
+            raise ValueError(f"{str(data_str)} value not in {str(self.values)}")
+
+    def __str__(self):
+        msg = self.name + ",{"
+        for i in range(len(self.values)-1):
+            msg += self.values[i] + ","
+        msg += self.values[-1]
+        msg += "}"
+        return msg
+
+
+class NumericAttribute(Attribute):
+
+    def __init__(self, name):
+        super().__init__(name)
+        self.type_name = 'numeric'
+        self.dtype = np.float64
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+
+        For numeric attributes, the attribute string would be like
+        'numeric' or 'int' or 'real'.
+        """
+
+        attr_string = attr_string.lower().strip()
+
+        if (attr_string[:len('numeric')] == 'numeric' or
+           attr_string[:len('int')] == 'int' or
+           attr_string[:len('real')] == 'real'):
+            return cls(name)
+        else:
+            return None
+
+    def parse_data(self, data_str):
+        """
+        Parse a value of this type.
+
+        Parameters
+        ----------
+        data_str : str
+           string to convert
+
+        Returns
+        -------
+        f : float
+           where float can be nan
+
+        Examples
+        --------
+        >>> from scipy.io.arff._arffread import NumericAttribute
+        >>> atr = NumericAttribute('atr')
+        >>> atr.parse_data('1')
+        1.0
+        >>> atr.parse_data('1\\n')
+        1.0
+        >>> atr.parse_data('?\\n')
+        nan
+        """
+        if '?' in data_str:
+            return np.nan
+        else:
+            return float(data_str)
+
+    def _basic_stats(self, data):
+        nbfac = data.size * 1. / (data.size - 1)
+        return (np.nanmin(data), np.nanmax(data),
+                np.mean(data), np.std(data) * nbfac)
+
+
+class StringAttribute(Attribute):
+
+    def __init__(self, name):
+        super().__init__(name)
+        self.type_name = 'string'
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+
+        For string attributes, the attribute string would be like
+        'string'.
+        """
+
+        attr_string = attr_string.lower().strip()
+
+        if attr_string[:len('string')] == 'string':
+            return cls(name)
+        else:
+            return None
+
+
+class DateAttribute(Attribute):
+
+    def __init__(self, name, date_format, datetime_unit):
+        super().__init__(name)
+        self.date_format = date_format
+        self.datetime_unit = datetime_unit
+        self.type_name = 'date'
+        self.range = date_format
+        self.dtype = np.datetime64(0, self.datetime_unit)
+
+    @staticmethod
+    def _get_date_format(atrv):
+        m = r_date.match(atrv)
+        if m:
+            pattern = m.group(1).strip()
+            # convert time pattern from Java's SimpleDateFormat to C's format
+            datetime_unit = None
+            if "yyyy" in pattern:
+                pattern = pattern.replace("yyyy", "%Y")
+                datetime_unit = "Y"
+            elif "yy":
+                pattern = pattern.replace("yy", "%y")
+                datetime_unit = "Y"
+            if "MM" in pattern:
+                pattern = pattern.replace("MM", "%m")
+                datetime_unit = "M"
+            if "dd" in pattern:
+                pattern = pattern.replace("dd", "%d")
+                datetime_unit = "D"
+            if "HH" in pattern:
+                pattern = pattern.replace("HH", "%H")
+                datetime_unit = "h"
+            if "mm" in pattern:
+                pattern = pattern.replace("mm", "%M")
+                datetime_unit = "m"
+            if "ss" in pattern:
+                pattern = pattern.replace("ss", "%S")
+                datetime_unit = "s"
+            if "z" in pattern or "Z" in pattern:
+                raise ValueError("Date type attributes with time zone not "
+                                 "supported, yet")
+
+            if datetime_unit is None:
+                raise ValueError("Invalid or unsupported date format")
+
+            return pattern, datetime_unit
+        else:
+            raise ValueError("Invalid or no date format")
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+
+        For date attributes, the attribute string would be like
+        'date '.
+        """
+
+        attr_string_lower = attr_string.lower().strip()
+
+        if attr_string_lower[:len('date')] == 'date':
+            date_format, datetime_unit = cls._get_date_format(attr_string)
+            return cls(name, date_format, datetime_unit)
+        else:
+            return None
+
+    def parse_data(self, data_str):
+        """
+        Parse a value of this type.
+        """
+        date_str = data_str.strip().strip("'").strip('"')
+        if date_str == '?':
+            return np.datetime64('NaT', self.datetime_unit)
+        else:
+            dt = datetime.datetime.strptime(date_str, self.date_format)
+            return np.datetime64(dt).astype(
+                f"datetime64[{self.datetime_unit}]")
+
+    def __str__(self):
+        return super().__str__() + ',' + self.date_format
+
+
+class RelationalAttribute(Attribute):
+
+    def __init__(self, name):
+        super().__init__(name)
+        self.type_name = 'relational'
+        self.dtype = np.object_
+        self.attributes = []
+        self.dialect = None
+
+    @classmethod
+    def parse_attribute(cls, name, attr_string):
+        """
+        Parse the attribute line if it knows how. Returns the parsed
+        attribute, or None.
+
+        For date attributes, the attribute string would be like
+        'date '.
+        """
+
+        attr_string_lower = attr_string.lower().strip()
+
+        if attr_string_lower[:len('relational')] == 'relational':
+            return cls(name)
+        else:
+            return None
+
+    def parse_data(self, data_str):
+        # Copy-pasted
+        elems = list(range(len(self.attributes)))
+
+        escaped_string = data_str.encode().decode("unicode-escape")
+
+        row_tuples = []
+
+        for raw in escaped_string.split("\n"):
+            row, self.dialect = split_data_line(raw, self.dialect)
+
+            row_tuples.append(tuple(
+                [self.attributes[i].parse_data(row[i]) for i in elems]))
+
+        return np.array(row_tuples,
+                        [(a.name, a.dtype) for a in self.attributes])
+
+    def __str__(self):
+        return (super().__str__() + '\n\t' +
+                '\n\t'.join(str(a) for a in self.attributes))
+
+
+# -----------------
+# Various utilities
+# -----------------
+def to_attribute(name, attr_string):
+    attr_classes = (NominalAttribute, NumericAttribute, DateAttribute,
+                    StringAttribute, RelationalAttribute)
+
+    for cls in attr_classes:
+        attr = cls.parse_attribute(name, attr_string)
+        if attr is not None:
+            return attr
+
+    raise ParseArffError(f"unknown attribute {attr_string}")
+
+
+def csv_sniffer_has_bug_last_field():
+    """
+    Checks if the bug https://bugs.python.org/issue30157 is unpatched.
+    """
+
+    # We only compute this once.
+    has_bug = getattr(csv_sniffer_has_bug_last_field, "has_bug", None)
+
+    if has_bug is None:
+        dialect = csv.Sniffer().sniff("3, 'a'")
+        csv_sniffer_has_bug_last_field.has_bug = dialect.quotechar != "'"
+        has_bug = csv_sniffer_has_bug_last_field.has_bug
+
+    return has_bug
+
+
+def workaround_csv_sniffer_bug_last_field(sniff_line, dialect, delimiters):
+    """
+    Workaround for the bug https://bugs.python.org/issue30157 if is unpatched.
+    """
+    if csv_sniffer_has_bug_last_field():
+        # Reuses code from the csv module
+        right_regex = r'(?P[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?:$|\n)'  # noqa: E501
+
+        for restr in (r'(?P[^\w\n"\'])(?P ?)(?P["\']).*?(?P=quote)(?P=delim)',  # ,".*?",  # noqa: E501
+                      r'(?:^|\n)(?P["\']).*?(?P=quote)(?P[^\w\n"\'])(?P ?)',  # .*?",  # noqa: E501
+                      right_regex,  # ,".*?"
+                      r'(?:^|\n)(?P["\']).*?(?P=quote)(?:$|\n)'):  # ".*?" (no delim, no space)  # noqa: E501
+            regexp = re.compile(restr, re.DOTALL | re.MULTILINE)
+            matches = regexp.findall(sniff_line)
+            if matches:
+                break
+
+        # If it does not match the expression that was bugged,
+        # then this bug does not apply
+        if restr != right_regex:
+            return
+
+        groupindex = regexp.groupindex
+
+        # There is only one end of the string
+        assert len(matches) == 1
+        m = matches[0]
+
+        n = groupindex['quote'] - 1
+        quote = m[n]
+
+        n = groupindex['delim'] - 1
+        delim = m[n]
+
+        n = groupindex['space'] - 1
+        space = bool(m[n])
+
+        dq_regexp = re.compile(
+            rf"(({re.escape(delim)})|^)\W*{quote}[^{re.escape(delim)}\n]*{quote}[^{re.escape(delim)}\n]*{quote}\W*(({re.escape(delim)})|$)", re.MULTILINE  # noqa: E501
+        )
+
+        doublequote = bool(dq_regexp.search(sniff_line))
+
+        dialect.quotechar = quote
+        if delim in delimiters:
+            dialect.delimiter = delim
+        dialect.doublequote = doublequote
+        dialect.skipinitialspace = space
+
+
+def split_data_line(line, dialect=None):
+    delimiters = ",\t"
+
+    # This can not be done in a per reader basis, and relational fields
+    # can be HUGE
+    csv.field_size_limit(int(ctypes.c_ulong(-1).value // 2))
+
+    # Remove the line end if any
+    if line[-1] == '\n':
+        line = line[:-1]
+    
+    # Remove potential trailing whitespace
+    line = line.strip()
+    
+    sniff_line = line
+
+    # Add a delimiter if none is present, so that the csv.Sniffer
+    # does not complain for a single-field CSV.
+    if not any(d in line for d in delimiters):
+        sniff_line += ","
+
+    if dialect is None:
+        dialect = csv.Sniffer().sniff(sniff_line, delimiters=delimiters)
+        workaround_csv_sniffer_bug_last_field(sniff_line=sniff_line,
+                                              dialect=dialect,
+                                              delimiters=delimiters)
+
+    row = next(csv.reader([line], dialect))
+
+    return row, dialect
+
+
+# --------------
+# Parsing header
+# --------------
+def tokenize_attribute(iterable, attribute):
+    """Parse a raw string in header (e.g., starts by @attribute).
+
+    Given a raw string attribute, try to get the name and type of the
+    attribute. Constraints:
+
+    * The first line must start with @attribute (case insensitive, and
+      space like characters before @attribute are allowed)
+    * Works also if the attribute is spread on multilines.
+    * Works if empty lines or comments are in between
+
+    Parameters
+    ----------
+    attribute : str
+       the attribute string.
+
+    Returns
+    -------
+    name : str
+       name of the attribute
+    value : str
+       value of the attribute
+    next : str
+       next line to be parsed
+
+    Examples
+    --------
+    If attribute is a string defined in python as r"floupi real", will
+    return floupi as name, and real as value.
+
+    >>> from scipy.io.arff._arffread import tokenize_attribute
+    >>> iterable = iter([0] * 10) # dummy iterator
+    >>> tokenize_attribute(iterable, r"@attribute floupi real")
+    ('floupi', 'real', 0)
+
+    If attribute is r"'floupi 2' real", will return 'floupi 2' as name,
+    and real as value.
+
+    >>> tokenize_attribute(iterable, r"  @attribute 'floupi 2' real   ")
+    ('floupi 2', 'real', 0)
+
+    """
+    sattr = attribute.strip()
+    mattr = r_attribute.match(sattr)
+    if mattr:
+        # atrv is everything after @attribute
+        atrv = mattr.group(1)
+        if r_comattrval.match(atrv):
+            name, type = tokenize_single_comma(atrv)
+            next_item = next(iterable)
+        elif r_wcomattrval.match(atrv):
+            name, type = tokenize_single_wcomma(atrv)
+            next_item = next(iterable)
+        else:
+            # Not sure we should support this, as it does not seem supported by
+            # weka.
+            raise ValueError("multi line not supported yet")
+    else:
+        raise ValueError(f"First line unparsable: {sattr}")
+
+    attribute = to_attribute(name, type)
+
+    if type.lower() == 'relational':
+        next_item = read_relational_attribute(iterable, attribute, next_item)
+    #    raise ValueError("relational attributes not supported yet")
+
+    return attribute, next_item
+
+
+def tokenize_single_comma(val):
+    # XXX we match twice the same string (here and at the caller level). It is
+    # stupid, but it is easier for now...
+    m = r_comattrval.match(val)
+    if m:
+        try:
+            name = m.group(1).strip()
+            type = m.group(2).strip()
+        except IndexError as e:
+            raise ValueError("Error while tokenizing attribute") from e
+    else:
+        raise ValueError(f"Error while tokenizing single {val}")
+    return name, type
+
+
+def tokenize_single_wcomma(val):
+    # XXX we match twice the same string (here and at the caller level). It is
+    # stupid, but it is easier for now...
+    m = r_wcomattrval.match(val)
+    if m:
+        try:
+            name = m.group(1).strip()
+            type = m.group(2).strip()
+        except IndexError as e:
+            raise ValueError("Error while tokenizing attribute") from e
+    else:
+        raise ValueError(f"Error while tokenizing single {val}")
+    return name, type
+
+
+def read_relational_attribute(ofile, relational_attribute, i):
+    """Read the nested attributes of a relational attribute"""
+
+    r_end_relational = re.compile(r'^@[Ee][Nn][Dd]\s*' +
+                                  relational_attribute.name + r'\s*$')
+
+    while not r_end_relational.match(i):
+        m = r_headerline.match(i)
+        if m:
+            isattr = r_attribute.match(i)
+            if isattr:
+                attr, i = tokenize_attribute(ofile, i)
+                relational_attribute.attributes.append(attr)
+            else:
+                raise ValueError(f"Error parsing line {i}")
+        else:
+            i = next(ofile)
+
+    i = next(ofile)
+    return i
+
+
+def read_header(ofile):
+    """Read the header of the iterable ofile."""
+    i = next(ofile)
+
+    # Pass first comments
+    while r_comment.match(i):
+        i = next(ofile)
+
+    # Header is everything up to DATA attribute ?
+    relation = None
+    attributes = []
+    while not r_datameta.match(i):
+        m = r_headerline.match(i)
+        if m:
+            isattr = r_attribute.match(i)
+            if isattr:
+                attr, i = tokenize_attribute(ofile, i)
+                attributes.append(attr)
+            else:
+                isrel = r_relation.match(i)
+                if isrel:
+                    relation = isrel.group(1)
+                else:
+                    raise ValueError(f"Error parsing line {i}")
+                i = next(ofile)
+        else:
+            i = next(ofile)
+
+    return relation, attributes
+
+
+class MetaData:
+    """Small container to keep useful information on a ARFF dataset.
+
+    Knows about attributes names and types.
+
+    Examples
+    --------
+    ::
+
+        data, meta = loadarff('iris.arff')
+        # This will print the attributes names of the iris.arff dataset
+        for i in meta:
+            print(i)
+        # This works too
+        meta.names()
+        # Getting attribute type
+        types = meta.types()
+
+    Methods
+    -------
+    names
+    types
+
+    Notes
+    -----
+    Also maintains the list of attributes in order, i.e., doing for i in
+    meta, where meta is an instance of MetaData, will return the
+    different attribute names in the order they were defined.
+    """
+    def __init__(self, rel, attr):
+        self.name = rel
+        self._attributes = {a.name: a for a in attr}
+
+    def __repr__(self):
+        msg = ""
+        msg += f"Dataset: {self.name}\n"
+        for i in self._attributes:
+            msg += f"\t{i}'s type is {self._attributes[i].type_name}"
+            if self._attributes[i].range:
+                msg += f", range is {str(self._attributes[i].range)}"
+            msg += '\n'
+        return msg
+
+    def __iter__(self):
+        return iter(self._attributes)
+
+    def __getitem__(self, key):
+        attr = self._attributes[key]
+
+        return (attr.type_name, attr.range)
+
+    def names(self):
+        """Return the list of attribute names.
+
+        Returns
+        -------
+        attrnames : list of str
+            The attribute names.
+        """
+        return list(self._attributes)
+
+    def types(self):
+        """Return the list of attribute types.
+
+        Returns
+        -------
+        attr_types : list of str
+            The attribute types.
+        """
+        attr_types = [self._attributes[name].type_name
+                      for name in self._attributes]
+        return attr_types
+
+
+def loadarff(f):
+    """
+    Read an arff file.
+
+    The data is returned as a record array, which can be accessed much like
+    a dictionary of NumPy arrays. For example, if one of the attributes is
+    called 'pressure', then its first 10 data points can be accessed from the
+    ``data`` record array like so: ``data['pressure'][0:10]``
+
+
+    Parameters
+    ----------
+    f : file-like or str
+       File-like object to read from, or filename to open.
+
+    Returns
+    -------
+    data : record array
+       The data of the arff file, accessible by attribute names.
+    meta : `MetaData`
+       Contains information about the arff file such as name and
+       type of attributes, the relation (name of the dataset), etc.
+
+    Raises
+    ------
+    ParseArffError
+        This is raised if the given file is not ARFF-formatted.
+    NotImplementedError
+        The ARFF file has an attribute which is not supported yet.
+
+    Notes
+    -----
+
+    This function should be able to read most arff files. Not
+    implemented functionality include:
+
+    * date type attributes
+    * string type attributes
+
+    It can read files with numeric and nominal attributes. It cannot read
+    files with sparse data ({} in the file). However, this function can
+    read files with missing data (? in the file), representing the data
+    points as NaNs.
+
+    Examples
+    --------
+    >>> from scipy.io import arff
+    >>> from io import StringIO
+    >>> content = \"\"\"
+    ... @relation foo
+    ... @attribute width  numeric
+    ... @attribute height numeric
+    ... @attribute color  {red,green,blue,yellow,black}
+    ... @data
+    ... 5.0,3.25,blue
+    ... 4.5,3.75,green
+    ... 3.0,4.00,red
+    ... \"\"\"
+    >>> f = StringIO(content)
+    >>> data, meta = arff.loadarff(f)
+    >>> data
+    array([(5.0, 3.25, 'blue'), (4.5, 3.75, 'green'), (3.0, 4.0, 'red')],
+          dtype=[('width', '>> meta
+    Dataset: foo
+    \twidth's type is numeric
+    \theight's type is numeric
+    \tcolor's type is nominal, range is ('red', 'green', 'blue', 'yellow', 'black')
+
+    """
+    if hasattr(f, 'read'):
+        ofile = f
+    else:
+        ofile = open(f)
+    try:
+        return _loadarff(ofile)
+    finally:
+        if ofile is not f:  # only close what we opened
+            ofile.close()
+
+
+def _loadarff(ofile):
+    # Parse the header file
+    try:
+        rel, attr = read_header(ofile)
+    except ValueError as e:
+        msg = "Error while parsing header, error was: " + str(e)
+        raise ParseArffError(msg) from e
+
+    # Check whether we have a string attribute (not supported yet)
+    hasstr = False
+    for a in attr:
+        if isinstance(a, StringAttribute):
+            hasstr = True
+
+    meta = MetaData(rel, attr)
+
+    # XXX The following code is not great
+    # Build the type descriptor descr and the list of converters to convert
+    # each attribute to the suitable type (which should match the one in
+    # descr).
+
+    # This can be used once we want to support integer as integer values and
+    # not as numeric anymore (using masked arrays ?).
+
+    if hasstr:
+        # How to support string efficiently ? Ideally, we should know the max
+        # size of the string before allocating the numpy array.
+        raise NotImplementedError("String attributes not supported yet, sorry")
+
+    ni = len(attr)
+
+    def generator(row_iter, delim=','):
+        # TODO: this is where we are spending time (~80%). I think things
+        # could be made more efficiently:
+        #   - We could for example "compile" the function, because some values
+        #   do not change here.
+        #   - The function to convert a line to dtyped values could also be
+        #   generated on the fly from a string and be executed instead of
+        #   looping.
+        #   - The regex are overkill: for comments, checking that a line starts
+        #   by % should be enough and faster, and for empty lines, same thing
+        #   --> this does not seem to change anything.
+
+        # 'compiling' the range since it does not change
+        # Note, I have already tried zipping the converters and
+        # row elements and got slightly worse performance.
+        elems = list(range(ni))
+
+        dialect = None
+        for raw in row_iter:
+            # We do not abstract skipping comments and empty lines for
+            # performance reasons.
+            if r_comment.match(raw) or r_empty.match(raw):
+                continue
+
+            row, dialect = split_data_line(raw, dialect)
+
+            yield tuple([attr[i].parse_data(row[i]) for i in elems])
+
+    a = list(generator(ofile))
+    # No error should happen here: it is a bug otherwise
+    data = np.array(a, [(a.name, a.dtype) for a in attr])
+    return data, meta
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/arffread.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/arffread.py
new file mode 100644
index 0000000000000000000000000000000000000000..c42ae31db6bde3987bd059cc7451d1ae87f0073c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/arffread.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.arff` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'MetaData', 'loadarff', 'ArffError', 'ParseArffError',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.arff", module="arffread",
+                                   private_modules=["_arffread"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/iris.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/iris.arff
new file mode 100644
index 0000000000000000000000000000000000000000..780480c7c6b9a68bf71aaf357c7d3f7a5b3b3f57
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/iris.arff
@@ -0,0 +1,225 @@
+% 1. Title: Iris Plants Database
+% 
+% 2. Sources:
+%      (a) Creator: R.A. Fisher
+%      (b) Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)
+%      (c) Date: July, 1988
+% 
+% 3. Past Usage:
+%    - Publications: too many to mention!!!  Here are a few.
+%    1. Fisher,R.A. "The use of multiple measurements in taxonomic problems"
+%       Annual Eugenics, 7, Part II, 179-188 (1936); also in "Contributions
+%       to Mathematical Statistics" (John Wiley, NY, 1950).
+%    2. Duda,R.O., & Hart,P.E. (1973) Pattern Classification and Scene Analysis.
+%       (Q327.D83) John Wiley & Sons.  ISBN 0-471-22361-1.  See page 218.
+%    3. Dasarathy, B.V. (1980) "Nosing Around the Neighborhood: A New System
+%       Structure and Classification Rule for Recognition in Partially Exposed
+%       Environments".  IEEE Transactions on Pattern Analysis and Machine
+%       Intelligence, Vol. PAMI-2, No. 1, 67-71.
+%       -- Results:
+%          -- very low misclassification rates (0% for the setosa class)
+%    4. Gates, G.W. (1972) "The Reduced Nearest Neighbor Rule".  IEEE 
+%       Transactions on Information Theory, May 1972, 431-433.
+%       -- Results:
+%          -- very low misclassification rates again
+%    5. See also: 1988 MLC Proceedings, 54-64.  Cheeseman et al's AUTOCLASS II
+%       conceptual clustering system finds 3 classes in the data.
+% 
+% 4. Relevant Information:
+%    --- This is perhaps the best known database to be found in the pattern
+%        recognition literature.  Fisher's paper is a classic in the field
+%        and is referenced frequently to this day.  (See Duda & Hart, for
+%        example.)  The data set contains 3 classes of 50 instances each,
+%        where each class refers to a type of iris plant.  One class is
+%        linearly separable from the other 2; the latter are NOT linearly
+%        separable from each other.
+%    --- Predicted attribute: class of iris plant.
+%    --- This is an exceedingly simple domain.
+% 
+% 5. Number of Instances: 150 (50 in each of three classes)
+% 
+% 6. Number of Attributes: 4 numeric, predictive attributes and the class
+% 
+% 7. Attribute Information:
+%    1. sepal length in cm
+%    2. sepal width in cm
+%    3. petal length in cm
+%    4. petal width in cm
+%    5. class: 
+%       -- Iris Setosa
+%       -- Iris Versicolour
+%       -- Iris Virginica
+% 
+% 8. Missing Attribute Values: None
+% 
+% Summary Statistics:
+%  	           Min  Max   Mean    SD   Class Correlation
+%    sepal length: 4.3  7.9   5.84  0.83    0.7826   
+%     sepal width: 2.0  4.4   3.05  0.43   -0.4194
+%    petal length: 1.0  6.9   3.76  1.76    0.9490  (high!)
+%     petal width: 0.1  2.5   1.20  0.76    0.9565  (high!)
+% 
+% 9. Class Distribution: 33.3% for each of 3 classes.
+
+@RELATION iris
+
+@ATTRIBUTE sepallength	REAL
+@ATTRIBUTE sepalwidth 	REAL
+@ATTRIBUTE petallength 	REAL
+@ATTRIBUTE petalwidth	REAL
+@ATTRIBUTE class 	{Iris-setosa,Iris-versicolor,Iris-virginica}
+
+@DATA
+5.1,3.5,1.4,0.2,Iris-setosa
+4.9,3.0,1.4,0.2,Iris-setosa
+4.7,3.2,1.3,0.2,Iris-setosa
+4.6,3.1,1.5,0.2,Iris-setosa
+5.0,3.6,1.4,0.2,Iris-setosa
+5.4,3.9,1.7,0.4,Iris-setosa
+4.6,3.4,1.4,0.3,Iris-setosa
+5.0,3.4,1.5,0.2,Iris-setosa
+4.4,2.9,1.4,0.2,Iris-setosa
+4.9,3.1,1.5,0.1,Iris-setosa
+5.4,3.7,1.5,0.2,Iris-setosa
+4.8,3.4,1.6,0.2,Iris-setosa
+4.8,3.0,1.4,0.1,Iris-setosa
+4.3,3.0,1.1,0.1,Iris-setosa
+5.8,4.0,1.2,0.2,Iris-setosa
+5.7,4.4,1.5,0.4,Iris-setosa
+5.4,3.9,1.3,0.4,Iris-setosa
+5.1,3.5,1.4,0.3,Iris-setosa
+5.7,3.8,1.7,0.3,Iris-setosa
+5.1,3.8,1.5,0.3,Iris-setosa
+5.4,3.4,1.7,0.2,Iris-setosa
+5.1,3.7,1.5,0.4,Iris-setosa
+4.6,3.6,1.0,0.2,Iris-setosa
+5.1,3.3,1.7,0.5,Iris-setosa
+4.8,3.4,1.9,0.2,Iris-setosa
+5.0,3.0,1.6,0.2,Iris-setosa
+5.0,3.4,1.6,0.4,Iris-setosa
+5.2,3.5,1.5,0.2,Iris-setosa
+5.2,3.4,1.4,0.2,Iris-setosa
+4.7,3.2,1.6,0.2,Iris-setosa
+4.8,3.1,1.6,0.2,Iris-setosa
+5.4,3.4,1.5,0.4,Iris-setosa
+5.2,4.1,1.5,0.1,Iris-setosa
+5.5,4.2,1.4,0.2,Iris-setosa
+4.9,3.1,1.5,0.1,Iris-setosa
+5.0,3.2,1.2,0.2,Iris-setosa
+5.5,3.5,1.3,0.2,Iris-setosa
+4.9,3.1,1.5,0.1,Iris-setosa
+4.4,3.0,1.3,0.2,Iris-setosa
+5.1,3.4,1.5,0.2,Iris-setosa
+5.0,3.5,1.3,0.3,Iris-setosa
+4.5,2.3,1.3,0.3,Iris-setosa
+4.4,3.2,1.3,0.2,Iris-setosa
+5.0,3.5,1.6,0.6,Iris-setosa
+5.1,3.8,1.9,0.4,Iris-setosa
+4.8,3.0,1.4,0.3,Iris-setosa
+5.1,3.8,1.6,0.2,Iris-setosa
+4.6,3.2,1.4,0.2,Iris-setosa
+5.3,3.7,1.5,0.2,Iris-setosa
+5.0,3.3,1.4,0.2,Iris-setosa
+7.0,3.2,4.7,1.4,Iris-versicolor
+6.4,3.2,4.5,1.5,Iris-versicolor
+6.9,3.1,4.9,1.5,Iris-versicolor
+5.5,2.3,4.0,1.3,Iris-versicolor
+6.5,2.8,4.6,1.5,Iris-versicolor
+5.7,2.8,4.5,1.3,Iris-versicolor
+6.3,3.3,4.7,1.6,Iris-versicolor
+4.9,2.4,3.3,1.0,Iris-versicolor
+6.6,2.9,4.6,1.3,Iris-versicolor
+5.2,2.7,3.9,1.4,Iris-versicolor
+5.0,2.0,3.5,1.0,Iris-versicolor
+5.9,3.0,4.2,1.5,Iris-versicolor
+6.0,2.2,4.0,1.0,Iris-versicolor
+6.1,2.9,4.7,1.4,Iris-versicolor
+5.6,2.9,3.6,1.3,Iris-versicolor
+6.7,3.1,4.4,1.4,Iris-versicolor
+5.6,3.0,4.5,1.5,Iris-versicolor
+5.8,2.7,4.1,1.0,Iris-versicolor
+6.2,2.2,4.5,1.5,Iris-versicolor
+5.6,2.5,3.9,1.1,Iris-versicolor
+5.9,3.2,4.8,1.8,Iris-versicolor
+6.1,2.8,4.0,1.3,Iris-versicolor
+6.3,2.5,4.9,1.5,Iris-versicolor
+6.1,2.8,4.7,1.2,Iris-versicolor
+6.4,2.9,4.3,1.3,Iris-versicolor
+6.6,3.0,4.4,1.4,Iris-versicolor
+6.8,2.8,4.8,1.4,Iris-versicolor
+6.7,3.0,5.0,1.7,Iris-versicolor
+6.0,2.9,4.5,1.5,Iris-versicolor
+5.7,2.6,3.5,1.0,Iris-versicolor
+5.5,2.4,3.8,1.1,Iris-versicolor
+5.5,2.4,3.7,1.0,Iris-versicolor
+5.8,2.7,3.9,1.2,Iris-versicolor
+6.0,2.7,5.1,1.6,Iris-versicolor
+5.4,3.0,4.5,1.5,Iris-versicolor
+6.0,3.4,4.5,1.6,Iris-versicolor
+6.7,3.1,4.7,1.5,Iris-versicolor
+6.3,2.3,4.4,1.3,Iris-versicolor
+5.6,3.0,4.1,1.3,Iris-versicolor
+5.5,2.5,4.0,1.3,Iris-versicolor
+5.5,2.6,4.4,1.2,Iris-versicolor
+6.1,3.0,4.6,1.4,Iris-versicolor
+5.8,2.6,4.0,1.2,Iris-versicolor
+5.0,2.3,3.3,1.0,Iris-versicolor
+5.6,2.7,4.2,1.3,Iris-versicolor
+5.7,3.0,4.2,1.2,Iris-versicolor
+5.7,2.9,4.2,1.3,Iris-versicolor
+6.2,2.9,4.3,1.3,Iris-versicolor
+5.1,2.5,3.0,1.1,Iris-versicolor
+5.7,2.8,4.1,1.3,Iris-versicolor
+6.3,3.3,6.0,2.5,Iris-virginica
+5.8,2.7,5.1,1.9,Iris-virginica
+7.1,3.0,5.9,2.1,Iris-virginica
+6.3,2.9,5.6,1.8,Iris-virginica
+6.5,3.0,5.8,2.2,Iris-virginica
+7.6,3.0,6.6,2.1,Iris-virginica
+4.9,2.5,4.5,1.7,Iris-virginica
+7.3,2.9,6.3,1.8,Iris-virginica
+6.7,2.5,5.8,1.8,Iris-virginica
+7.2,3.6,6.1,2.5,Iris-virginica
+6.5,3.2,5.1,2.0,Iris-virginica
+6.4,2.7,5.3,1.9,Iris-virginica
+6.8,3.0,5.5,2.1,Iris-virginica
+5.7,2.5,5.0,2.0,Iris-virginica
+5.8,2.8,5.1,2.4,Iris-virginica
+6.4,3.2,5.3,2.3,Iris-virginica
+6.5,3.0,5.5,1.8,Iris-virginica
+7.7,3.8,6.7,2.2,Iris-virginica
+7.7,2.6,6.9,2.3,Iris-virginica
+6.0,2.2,5.0,1.5,Iris-virginica
+6.9,3.2,5.7,2.3,Iris-virginica
+5.6,2.8,4.9,2.0,Iris-virginica
+7.7,2.8,6.7,2.0,Iris-virginica
+6.3,2.7,4.9,1.8,Iris-virginica
+6.7,3.3,5.7,2.1,Iris-virginica
+7.2,3.2,6.0,1.8,Iris-virginica
+6.2,2.8,4.8,1.8,Iris-virginica
+6.1,3.0,4.9,1.8,Iris-virginica
+6.4,2.8,5.6,2.1,Iris-virginica
+7.2,3.0,5.8,1.6,Iris-virginica
+7.4,2.8,6.1,1.9,Iris-virginica
+7.9,3.8,6.4,2.0,Iris-virginica
+6.4,2.8,5.6,2.2,Iris-virginica
+6.3,2.8,5.1,1.5,Iris-virginica
+6.1,2.6,5.6,1.4,Iris-virginica
+7.7,3.0,6.1,2.3,Iris-virginica
+6.3,3.4,5.6,2.4,Iris-virginica
+6.4,3.1,5.5,1.8,Iris-virginica
+6.0,3.0,4.8,1.8,Iris-virginica
+6.9,3.1,5.4,2.1,Iris-virginica
+6.7,3.1,5.6,2.4,Iris-virginica
+6.9,3.1,5.1,2.3,Iris-virginica
+5.8,2.7,5.1,1.9,Iris-virginica
+6.8,3.2,5.9,2.3,Iris-virginica
+6.7,3.3,5.7,2.5,Iris-virginica
+6.7,3.0,5.2,2.3,Iris-virginica
+6.3,2.5,5.0,1.9,Iris-virginica
+6.5,3.0,5.2,2.0,Iris-virginica
+6.2,3.4,5.4,2.3,Iris-virginica
+5.9,3.0,5.1,1.8,Iris-virginica
+%
+%
+%
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/missing.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/missing.arff
new file mode 100644
index 0000000000000000000000000000000000000000..dedc64c8fa2fcdc0081b30b7804be85114495ce2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/missing.arff
@@ -0,0 +1,8 @@
+% This arff file contains some missing data
+@relation missing
+@attribute yop real
+@attribute yap real
+@data
+1,5
+2,4
+?,?
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/nodata.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/nodata.arff
new file mode 100644
index 0000000000000000000000000000000000000000..5766aeb229a1b31378026274c366e8e9e44fd487
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/nodata.arff
@@ -0,0 +1,11 @@
+@RELATION iris
+
+@ATTRIBUTE sepallength  REAL
+@ATTRIBUTE sepalwidth   REAL
+@ATTRIBUTE petallength  REAL
+@ATTRIBUTE petalwidth   REAL
+@ATTRIBUTE class    {Iris-setosa,Iris-versicolor,Iris-virginica}
+
+@DATA
+
+% This file has no data
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal.arff
new file mode 100644
index 0000000000000000000000000000000000000000..7cd16d1ef9b50cc1194d034ef4d458ef3cf0d417
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal.arff
@@ -0,0 +1,13 @@
+% Regression test for issue #10232 : Exception in loadarff with quoted nominal attributes
+% Spaces between elements are stripped by the parser
+
+@relation SOME_DATA
+@attribute age numeric
+@attribute smoker {'yes', 'no'}
+@data
+18,  'no'
+24, 'yes'
+44,     'no'
+56, 'no'
+89,'yes'
+11,  'no'
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal_spaces.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal_spaces.arff
new file mode 100644
index 0000000000000000000000000000000000000000..c799127862b6060442b29c9a0382836cc9c55537
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/quoted_nominal_spaces.arff
@@ -0,0 +1,13 @@
+% Regression test for issue #10232 : Exception in loadarff with quoted nominal attributes
+% Spaces inside quotes are NOT stripped by the parser
+
+@relation SOME_DATA
+@attribute age numeric
+@attribute smoker {'  yes', 'no  '}
+@data
+18,'no  '
+24,'  yes'
+44,'no  '
+56,'no  '
+89,'  yes'
+11,'no  '
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test1.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test1.arff
new file mode 100644
index 0000000000000000000000000000000000000000..ccc8e0cc7c43dc66ad7b3a8e4738c3322d3f79d8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test1.arff
@@ -0,0 +1,10 @@
+@RELATION test1
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	REAL
+@ATTRIBUTE attr2 	REAL
+@ATTRIBUTE attr3	REAL
+@ATTRIBUTE class 	{class0, class1, class2, class3}
+
+@DATA
+0.1, 0.2, 0.3, 0.4,class1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test10.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test10.arff
new file mode 100644
index 0000000000000000000000000000000000000000..094ac5094a842866666726b358d2c66bf927c9d2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test10.arff
@@ -0,0 +1,8 @@
+@relation test9
+
+@attribute attr_relational	    relational
+	@attribute attr_number	integer
+@end attr_relational
+
+@data
+'0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171\n172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191\n192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\n212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231\n232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251\n252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271\n272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291\n292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311\n312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331\n332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351\n352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371\n372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391\n392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411\n412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431\n432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451\n452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471\n472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491\n492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511\n512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531\n532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551\n552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571\n572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591\n592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611\n612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631\n632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651\n652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671\n672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691\n692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711\n712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731\n732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751\n752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771\n772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791\n792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811\n812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831\n832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851\n852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871\n872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891\n892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911\n912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931\n932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951\n952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971\n972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991\n992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011\n1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031\n1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046\n1047\n1048\n1049\n1050\n1051\n1052\n1053\n1054\n1055\n1056\n1057\n1058\n1059\n1060\n1061\n1062\n1063\n1064\n1065\n1066\n1067\n1068\n1069\n1070\n1071\n1072\n1073\n1074\n1075\n1076\n1077\n1078\n1079\n1080\n1081\n1082\n1083\n1084\n1085\n1086\n1087\n1088\n1089\n1090\n1091\n1092\n1093\n1094\n1095\n1096\n1097\n1098\n1099\n1100\n1101\n1102\n1103\n1104\n1105\n1106\n1107\n1108\n1109\n1110\n1111\n1112\n1113\n1114\n1115\n1116\n1117\n1118\n1119\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131\n1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151\n1152\n1153\n1154\n1155\n1156\n1157\n1158\n1159\n1160\n1161\n1162\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171\n1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191\n1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211\n1212\n1213\n1214\n1215\n1216\n1217\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1231\n1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251\n1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271\n1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286\n1287\n1288\n1289\n1290\n1291\n1292\n1293\n1294\n1295\n1296\n1297\n1298\n1299\n1300\n1301\n1302\n1303\n1304\n1305\n1306\n1307\n1308\n1309\n1310\n1311\n1312\n1313\n1314\n1315\n1316\n1317\n1318\n1319\n1320\n1321\n1322\n1323\n1324\n1325\n1326\n1327\n1328\n1329\n1330\n1331\n1332\n1333\n1334\n1335\n1336\n1337\n1338\n1339\n1340\n1341\n1342\n1343\n1344\n1345\n1346\n1347\n1348\n1349\n1350\n1351\n1352\n1353\n1354\n1355\n1356\n1357\n1358\n1359\n1360\n1361\n1362\n1363\n1364\n1365\n1366\n1367\n1368\n1369\n1370\n1371\n1372\n1373\n1374\n1375\n1376\n1377\n1378\n1379\n1380\n1381\n1382\n1383\n1384\n1385\n1386\n1387\n1388\n1389\n1390\n1391\n1392\n1393\n1394\n1395\n1396\n1397\n1398\n1399\n1400\n1401\n1402\n1403\n1404\n1405\n1406\n1407\n1408\n1409\n1410\n1411\n1412\n1413\n1414\n1415\n1416\n1417\n1418\n1419\n1420\n1421\n1422\n1423\n1424\n1425\n1426\n1427\n1428\n1429\n1430\n1431\n1432\n1433\n1434\n1435\n1436\n1437\n1438\n1439\n1440\n1441\n1442\n1443\n1444\n1445\n1446\n1447\n1448\n1449\n1450\n1451\n1452\n1453\n1454\n1455\n1456\n1457\n1458\n1459\n1460\n1461\n1462\n1463\n1464\n1465\n1466\n1467\n1468\n1469\n1470\n1471\n1472\n1473\n1474\n1475\n1476\n1477\n1478\n1479\n1480\n1481\n1482\n1483\n1484\n1485\n1486\n1487\n1488\n1489\n1490\n1491\n1492\n1493\n1494\n1495\n1496\n1497\n1498\n1499\n1500\n1501\n1502\n1503\n1504\n1505\n1506\n1507\n1508\n1509\n1510\n1511\n1512\n1513\n1514\n1515\n1516\n1517\n1518\n1519\n1520\n1521\n1522\n1523\n1524\n1525\n1526\n1527\n1528\n1529\n1530\n1531\n1532\n1533\n1534\n1535\n1536\n1537\n1538\n1539\n1540\n1541\n1542\n1543\n1544\n1545\n1546\n1547\n1548\n1549\n1550\n1551\n1552\n1553\n1554\n1555\n1556\n1557\n1558\n1559\n1560\n1561\n1562\n1563\n1564\n1565\n1566\n1567\n1568\n1569\n1570\n1571\n1572\n1573\n1574\n1575\n1576\n1577\n1578\n1579\n1580\n1581\n1582\n1583\n1584\n1585\n1586\n1587\n1588\n1589\n1590\n1591\n1592\n1593\n1594\n1595\n1596\n1597\n1598\n1599\n1600\n1601\n1602\n1603\n1604\n1605\n1606\n1607\n1608\n1609\n1610\n1611\n1612\n1613\n1614\n1615\n1616\n1617\n1618\n1619\n1620\n1621\n1622\n1623\n1624\n1625\n1626\n1627\n1628\n1629\n1630\n1631\n1632\n1633\n1634\n1635\n1636\n1637\n1638\n1639\n1640\n1641\n1642\n1643\n1644\n1645\n1646\n1647\n1648\n1649\n1650\n1651\n1652\n1653\n1654\n1655\n1656\n1657\n1658\n1659\n1660\n1661\n1662\n1663\n1664\n1665\n1666\n1667\n1668\n1669\n1670\n1671\n1672\n1673\n1674\n1675\n1676\n1677\n1678\n1679\n1680\n1681\n1682\n1683\n1684\n1685\n1686\n1687\n1688\n1689\n1690\n1691\n1692\n1693\n1694\n1695\n1696\n1697\n1698\n1699\n1700\n1701\n1702\n1703\n1704\n1705\n1706\n1707\n1708\n1709\n1710\n1711\n1712\n1713\n1714\n1715\n1716\n1717\n1718\n1719\n1720\n1721\n1722\n1723\n1724\n1725\n1726\n1727\n1728\n1729\n1730\n1731\n1732\n1733\n1734\n1735\n1736\n1737\n1738\n1739\n1740\n1741\n1742\n1743\n1744\n1745\n1746\n1747\n1748\n1749\n1750\n1751\n1752\n1753\n1754\n1755\n1756\n1757\n1758\n1759\n1760\n1761\n1762\n1763\n1764\n1765\n1766\n1767\n1768\n1769\n1770\n1771\n1772\n1773\n1774\n1775\n1776\n1777\n1778\n1779\n1780\n1781\n1782\n1783\n1784\n1785\n1786\n1787\n1788\n1789\n1790\n1791\n1792\n1793\n1794\n1795\n1796\n1797\n1798\n1799\n1800\n1801\n1802\n1803\n1804\n1805\n1806\n1807\n1808\n1809\n1810\n1811\n1812\n1813\n1814\n1815\n1816\n1817\n1818\n1819\n1820\n1821\n1822\n1823\n1824\n1825\n1826\n1827\n1828\n1829\n1830\n1831\n1832\n1833\n1834\n1835\n1836\n1837\n1838\n1839\n1840\n1841\n1842\n1843\n1844\n1845\n1846\n1847\n1848\n1849\n1850\n1851\n1852\n1853\n1854\n1855\n1856\n1857\n1858\n1859\n1860\n1861\n1862\n1863\n1864\n1865\n1866\n1867\n1868\n1869\n1870\n1871\n1872\n1873\n1874\n1875\n1876\n1877\n1878\n1879\n1880\n1881\n1882\n1883\n1884\n1885\n1886\n1887\n1888\n1889\n1890\n1891\n1892\n1893\n1894\n1895\n1896\n1897\n1898\n1899\n1900\n1901\n1902\n1903\n1904\n1905\n1906\n1907\n1908\n1909\n1910\n1911\n1912\n1913\n1914\n1915\n1916\n1917\n1918\n1919\n1920\n1921\n1922\n1923\n1924\n1925\n1926\n1927\n1928\n1929\n1930\n1931\n1932\n1933\n1934\n1935\n1936\n1937\n1938\n1939\n1940\n1941\n1942\n1943\n1944\n1945\n1946\n1947\n1948\n1949\n1950\n1951\n1952\n1953\n1954\n1955\n1956\n1957\n1958\n1959\n1960\n1961\n1962\n1963\n1964\n1965\n1966\n1967\n1968\n1969\n1970\n1971\n1972\n1973\n1974\n1975\n1976\n1977\n1978\n1979\n1980\n1981\n1982\n1983\n1984\n1985\n1986\n1987\n1988\n1989\n1990\n1991\n1992\n1993\n1994\n1995\n1996\n1997\n1998\n1999\n2000\n2001\n2002\n2003\n2004\n2005\n2006\n2007\n2008\n2009\n2010\n2011\n2012\n2013\n2014\n2015\n2016\n2017\n2018\n2019\n2020\n2021\n2022\n2023\n2024\n2025\n2026\n2027\n2028\n2029\n2030\n2031\n2032\n2033\n2034\n2035\n2036\n2037\n2038\n2039\n2040\n2041\n2042\n2043\n2044\n2045\n2046\n2047\n2048\n2049\n2050\n2051\n2052\n2053\n2054\n2055\n2056\n2057\n2058\n2059\n2060\n2061\n2062\n2063\n2064\n2065\n2066\n2067\n2068\n2069\n2070\n2071\n2072\n2073\n2074\n2075\n2076\n2077\n2078\n2079\n2080\n2081\n2082\n2083\n2084\n2085\n2086\n2087\n2088\n2089\n2090\n2091\n2092\n2093\n2094\n2095\n2096\n2097\n2098\n2099\n2100\n2101\n2102\n2103\n2104\n2105\n2106\n2107\n2108\n2109\n2110\n2111\n2112\n2113\n2114\n2115\n2116\n2117\n2118\n2119\n2120\n2121\n2122\n2123\n2124\n2125\n2126\n2127\n2128\n2129\n2130\n2131\n2132\n2133\n2134\n2135\n2136\n2137\n2138\n2139\n2140\n2141\n2142\n2143\n2144\n2145\n2146\n2147\n2148\n2149\n2150\n2151\n2152\n2153\n2154\n2155\n2156\n2157\n2158\n2159\n2160\n2161\n2162\n2163\n2164\n2165\n2166\n2167\n2168\n2169\n2170\n2171\n2172\n2173\n2174\n2175\n2176\n2177\n2178\n2179\n2180\n2181\n2182\n2183\n2184\n2185\n2186\n2187\n2188\n2189\n2190\n2191\n2192\n2193\n2194\n2195\n2196\n2197\n2198\n2199\n2200\n2201\n2202\n2203\n2204\n2205\n2206\n2207\n2208\n2209\n2210\n2211\n2212\n2213\n2214\n2215\n2216\n2217\n2218\n2219\n2220\n2221\n2222\n2223\n2224\n2225\n2226\n2227\n2228\n2229\n2230\n2231\n2232\n2233\n2234\n2235\n2236\n2237\n2238\n2239\n2240\n2241\n2242\n2243\n2244\n2245\n2246\n2247\n2248\n2249\n2250\n2251\n2252\n2253\n2254\n2255\n2256\n2257\n2258\n2259\n2260\n2261\n2262\n2263\n2264\n2265\n2266\n2267\n2268\n2269\n2270\n2271\n2272\n2273\n2274\n2275\n2276\n2277\n2278\n2279\n2280\n2281\n2282\n2283\n2284\n2285\n2286\n2287\n2288\n2289\n2290\n2291\n2292\n2293\n2294\n2295\n2296\n2297\n2298\n2299\n2300\n2301\n2302\n2303\n2304\n2305\n2306\n2307\n2308\n2309\n2310\n2311\n2312\n2313\n2314\n2315\n2316\n2317\n2318\n2319\n2320\n2321\n2322\n2323\n2324\n2325\n2326\n2327\n2328\n2329\n2330\n2331\n2332\n2333\n2334\n2335\n2336\n2337\n2338\n2339\n2340\n2341\n2342\n2343\n2344\n2345\n2346\n2347\n2348\n2349\n2350\n2351\n2352\n2353\n2354\n2355\n2356\n2357\n2358\n2359\n2360\n2361\n2362\n2363\n2364\n2365\n2366\n2367\n2368\n2369\n2370\n2371\n2372\n2373\n2374\n2375\n2376\n2377\n2378\n2379\n2380\n2381\n2382\n2383\n2384\n2385\n2386\n2387\n2388\n2389\n2390\n2391\n2392\n2393\n2394\n2395\n2396\n2397\n2398\n2399\n2400\n2401\n2402\n2403\n2404\n2405\n2406\n2407\n2408\n2409\n2410\n2411\n2412\n2413\n2414\n2415\n2416\n2417\n2418\n2419\n2420\n2421\n2422\n2423\n2424\n2425\n2426\n2427\n2428\n2429\n2430\n2431\n2432\n2433\n2434\n2435\n2436\n2437\n2438\n2439\n2440\n2441\n2442\n2443\n2444\n2445\n2446\n2447\n2448\n2449\n2450\n2451\n2452\n2453\n2454\n2455\n2456\n2457\n2458\n2459\n2460\n2461\n2462\n2463\n2464\n2465\n2466\n2467\n2468\n2469\n2470\n2471\n2472\n2473\n2474\n2475\n2476\n2477\n2478\n2479\n2480\n2481\n2482\n2483\n2484\n2485\n2486\n2487\n2488\n2489\n2490\n2491\n2492\n2493\n2494\n2495\n2496\n2497\n2498\n2499\n2500\n2501\n2502\n2503\n2504\n2505\n2506\n2507\n2508\n2509\n2510\n2511\n2512\n2513\n2514\n2515\n2516\n2517\n2518\n2519\n2520\n2521\n2522\n2523\n2524\n2525\n2526\n2527\n2528\n2529\n2530\n2531\n2532\n2533\n2534\n2535\n2536\n2537\n2538\n2539\n2540\n2541\n2542\n2543\n2544\n2545\n2546\n2547\n2548\n2549\n2550\n2551\n2552\n2553\n2554\n2555\n2556\n2557\n2558\n2559\n2560\n2561\n2562\n2563\n2564\n2565\n2566\n2567\n2568\n2569\n2570\n2571\n2572\n2573\n2574\n2575\n2576\n2577\n2578\n2579\n2580\n2581\n2582\n2583\n2584\n2585\n2586\n2587\n2588\n2589\n2590\n2591\n2592\n2593\n2594\n2595\n2596\n2597\n2598\n2599\n2600\n2601\n2602\n2603\n2604\n2605\n2606\n2607\n2608\n2609\n2610\n2611\n2612\n2613\n2614\n2615\n2616\n2617\n2618\n2619\n2620\n2621\n2622\n2623\n2624\n2625\n2626\n2627\n2628\n2629\n2630\n2631\n2632\n2633\n2634\n2635\n2636\n2637\n2638\n2639\n2640\n2641\n2642\n2643\n2644\n2645\n2646\n2647\n2648\n2649\n2650\n2651\n2652\n2653\n2654\n2655\n2656\n2657\n2658\n2659\n2660\n2661\n2662\n2663\n2664\n2665\n2666\n2667\n2668\n2669\n2670\n2671\n2672\n2673\n2674\n2675\n2676\n2677\n2678\n2679\n2680\n2681\n2682\n2683\n2684\n2685\n2686\n2687\n2688\n2689\n2690\n2691\n2692\n2693\n2694\n2695\n2696\n2697\n2698\n2699\n2700\n2701\n2702\n2703\n2704\n2705\n2706\n2707\n2708\n2709\n2710\n2711\n2712\n2713\n2714\n2715\n2716\n2717\n2718\n2719\n2720\n2721\n2722\n2723\n2724\n2725\n2726\n2727\n2728\n2729\n2730\n2731\n2732\n2733\n2734\n2735\n2736\n2737\n2738\n2739\n2740\n2741\n2742\n2743\n2744\n2745\n2746\n2747\n2748\n2749\n2750\n2751\n2752\n2753\n2754\n2755\n2756\n2757\n2758\n2759\n2760\n2761\n2762\n2763\n2764\n2765\n2766\n2767\n2768\n2769\n2770\n2771\n2772\n2773\n2774\n2775\n2776\n2777\n2778\n2779\n2780\n2781\n2782\n2783\n2784\n2785\n2786\n2787\n2788\n2789\n2790\n2791\n2792\n2793\n2794\n2795\n2796\n2797\n2798\n2799\n2800\n2801\n2802\n2803\n2804\n2805\n2806\n2807\n2808\n2809\n2810\n2811\n2812\n2813\n2814\n2815\n2816\n2817\n2818\n2819\n2820\n2821\n2822\n2823\n2824\n2825\n2826\n2827\n2828\n2829\n2830\n2831\n2832\n2833\n2834\n2835\n2836\n2837\n2838\n2839\n2840\n2841\n2842\n2843\n2844\n2845\n2846\n2847\n2848\n2849\n2850\n2851\n2852\n2853\n2854\n2855\n2856\n2857\n2858\n2859\n2860\n2861\n2862\n2863\n2864\n2865\n2866\n2867\n2868\n2869\n2870\n2871\n2872\n2873\n2874\n2875\n2876\n2877\n2878\n2879\n2880\n2881\n2882\n2883\n2884\n2885\n2886\n2887\n2888\n2889\n2890\n2891\n2892\n2893\n2894\n2895\n2896\n2897\n2898\n2899\n2900\n2901\n2902\n2903\n2904\n2905\n2906\n2907\n2908\n2909\n2910\n2911\n2912\n2913\n2914\n2915\n2916\n2917\n2918\n2919\n2920\n2921\n2922\n2923\n2924\n2925\n2926\n2927\n2928\n2929\n2930\n2931\n2932\n2933\n2934\n2935\n2936\n2937\n2938\n2939\n2940\n2941\n2942\n2943\n2944\n2945\n2946\n2947\n2948\n2949\n2950\n2951\n2952\n2953\n2954\n2955\n2956\n2957\n2958\n2959\n2960\n2961\n2962\n2963\n2964\n2965\n2966\n2967\n2968\n2969\n2970\n2971\n2972\n2973\n2974\n2975\n2976\n2977\n2978\n2979\n2980\n2981\n2982\n2983\n2984\n2985\n2986\n2987\n2988\n2989\n2990\n2991\n2992\n2993\n2994\n2995\n2996\n2997\n2998\n2999\n3000\n3001\n3002\n3003\n3004\n3005\n3006\n3007\n3008\n3009\n3010\n3011\n3012\n3013\n3014\n3015\n3016\n3017\n3018\n3019\n3020\n3021\n3022\n3023\n3024\n3025\n3026\n3027\n3028\n3029\n3030\n3031\n3032\n3033\n3034\n3035\n3036\n3037\n3038\n3039\n3040\n3041\n3042\n3043\n3044\n3045\n3046\n3047\n3048\n3049\n3050\n3051\n3052\n3053\n3054\n3055\n3056\n3057\n3058\n3059\n3060\n3061\n3062\n3063\n3064\n3065\n3066\n3067\n3068\n3069\n3070\n3071\n3072\n3073\n3074\n3075\n3076\n3077\n3078\n3079\n3080\n3081\n3082\n3083\n3084\n3085\n3086\n3087\n3088\n3089\n3090\n3091\n3092\n3093\n3094\n3095\n3096\n3097\n3098\n3099\n3100\n3101\n3102\n3103\n3104\n3105\n3106\n3107\n3108\n3109\n3110\n3111\n3112\n3113\n3114\n3115\n3116\n3117\n3118\n3119\n3120\n3121\n3122\n3123\n3124\n3125\n3126\n3127\n3128\n3129\n3130\n3131\n3132\n3133\n3134\n3135\n3136\n3137\n3138\n3139\n3140\n3141\n3142\n3143\n3144\n3145\n3146\n3147\n3148\n3149\n3150\n3151\n3152\n3153\n3154\n3155\n3156\n3157\n3158\n3159\n3160\n3161\n3162\n3163\n3164\n3165\n3166\n3167\n3168\n3169\n3170\n3171\n3172\n3173\n3174\n3175\n3176\n3177\n3178\n3179\n3180\n3181\n3182\n3183\n3184\n3185\n3186\n3187\n3188\n3189\n3190\n3191\n3192\n3193\n3194\n3195\n3196\n3197\n3198\n3199\n3200\n3201\n3202\n3203\n3204\n3205\n3206\n3207\n3208\n3209\n3210\n3211\n3212\n3213\n3214\n3215\n3216\n3217\n3218\n3219\n3220\n3221\n3222\n3223\n3224\n3225\n3226\n3227\n3228\n3229\n3230\n3231\n3232\n3233\n3234\n3235\n3236\n3237\n3238\n3239\n3240\n3241\n3242\n3243\n3244\n3245\n3246\n3247\n3248\n3249\n3250\n3251\n3252\n3253\n3254\n3255\n3256\n3257\n3258\n3259\n3260\n3261\n3262\n3263\n3264\n3265\n3266\n3267\n3268\n3269\n3270\n3271\n3272\n3273\n3274\n3275\n3276\n3277\n3278\n3279\n3280\n3281\n3282\n3283\n3284\n3285\n3286\n3287\n3288\n3289\n3290\n3291\n3292\n3293\n3294\n3295\n3296\n3297\n3298\n3299\n3300\n3301\n3302\n3303\n3304\n3305\n3306\n3307\n3308\n3309\n3310\n3311\n3312\n3313\n3314\n3315\n3316\n3317\n3318\n3319\n3320\n3321\n3322\n3323\n3324\n3325\n3326\n3327\n3328\n3329\n3330\n3331\n3332\n3333\n3334\n3335\n3336\n3337\n3338\n3339\n3340\n3341\n3342\n3343\n3344\n3345\n3346\n3347\n3348\n3349\n3350\n3351\n3352\n3353\n3354\n3355\n3356\n3357\n3358\n3359\n3360\n3361\n3362\n3363\n3364\n3365\n3366\n3367\n3368\n3369\n3370\n3371\n3372\n3373\n3374\n3375\n3376\n3377\n3378\n3379\n3380\n3381\n3382\n3383\n3384\n3385\n3386\n3387\n3388\n3389\n3390\n3391\n3392\n3393\n3394\n3395\n3396\n3397\n3398\n3399\n3400\n3401\n3402\n3403\n3404\n3405\n3406\n3407\n3408\n3409\n3410\n3411\n3412\n3413\n3414\n3415\n3416\n3417\n3418\n3419\n3420\n3421\n3422\n3423\n3424\n3425\n3426\n3427\n3428\n3429\n3430\n3431\n3432\n3433\n3434\n3435\n3436\n3437\n3438\n3439\n3440\n3441\n3442\n3443\n3444\n3445\n3446\n3447\n3448\n3449\n3450\n3451\n3452\n3453\n3454\n3455\n3456\n3457\n3458\n3459\n3460\n3461\n3462\n3463\n3464\n3465\n3466\n3467\n3468\n3469\n3470\n3471\n3472\n3473\n3474\n3475\n3476\n3477\n3478\n3479\n3480\n3481\n3482\n3483\n3484\n3485\n3486\n3487\n3488\n3489\n3490\n3491\n3492\n3493\n3494\n3495\n3496\n3497\n3498\n3499\n3500\n3501\n3502\n3503\n3504\n3505\n3506\n3507\n3508\n3509\n3510\n3511\n3512\n3513\n3514\n3515\n3516\n3517\n3518\n3519\n3520\n3521\n3522\n3523\n3524\n3525\n3526\n3527\n3528\n3529\n3530\n3531\n3532\n3533\n3534\n3535\n3536\n3537\n3538\n3539\n3540\n3541\n3542\n3543\n3544\n3545\n3546\n3547\n3548\n3549\n3550\n3551\n3552\n3553\n3554\n3555\n3556\n3557\n3558\n3559\n3560\n3561\n3562\n3563\n3564\n3565\n3566\n3567\n3568\n3569\n3570\n3571\n3572\n3573\n3574\n3575\n3576\n3577\n3578\n3579\n3580\n3581\n3582\n3583\n3584\n3585\n3586\n3587\n3588\n3589\n3590\n3591\n3592\n3593\n3594\n3595\n3596\n3597\n3598\n3599\n3600\n3601\n3602\n3603\n3604\n3605\n3606\n3607\n3608\n3609\n3610\n3611\n3612\n3613\n3614\n3615\n3616\n3617\n3618\n3619\n3620\n3621\n3622\n3623\n3624\n3625\n3626\n3627\n3628\n3629\n3630\n3631\n3632\n3633\n3634\n3635\n3636\n3637\n3638\n3639\n3640\n3641\n3642\n3643\n3644\n3645\n3646\n3647\n3648\n3649\n3650\n3651\n3652\n3653\n3654\n3655\n3656\n3657\n3658\n3659\n3660\n3661\n3662\n3663\n3664\n3665\n3666\n3667\n3668\n3669\n3670\n3671\n3672\n3673\n3674\n3675\n3676\n3677\n3678\n3679\n3680\n3681\n3682\n3683\n3684\n3685\n3686\n3687\n3688\n3689\n3690\n3691\n3692\n3693\n3694\n3695\n3696\n3697\n3698\n3699\n3700\n3701\n3702\n3703\n3704\n3705\n3706\n3707\n3708\n3709\n3710\n3711\n3712\n3713\n3714\n3715\n3716\n3717\n3718\n3719\n3720\n3721\n3722\n3723\n3724\n3725\n3726\n3727\n3728\n3729\n3730\n3731\n3732\n3733\n3734\n3735\n3736\n3737\n3738\n3739\n3740\n3741\n3742\n3743\n3744\n3745\n3746\n3747\n3748\n3749\n3750\n3751\n3752\n3753\n3754\n3755\n3756\n3757\n3758\n3759\n3760\n3761\n3762\n3763\n3764\n3765\n3766\n3767\n3768\n3769\n3770\n3771\n3772\n3773\n3774\n3775\n3776\n3777\n3778\n3779\n3780\n3781\n3782\n3783\n3784\n3785\n3786\n3787\n3788\n3789\n3790\n3791\n3792\n3793\n3794\n3795\n3796\n3797\n3798\n3799\n3800\n3801\n3802\n3803\n3804\n3805\n3806\n3807\n3808\n3809\n3810\n3811\n3812\n3813\n3814\n3815\n3816\n3817\n3818\n3819\n3820\n3821\n3822\n3823\n3824\n3825\n3826\n3827\n3828\n3829\n3830\n3831\n3832\n3833\n3834\n3835\n3836\n3837\n3838\n3839\n3840\n3841\n3842\n3843\n3844\n3845\n3846\n3847\n3848\n3849\n3850\n3851\n3852\n3853\n3854\n3855\n3856\n3857\n3858\n3859\n3860\n3861\n3862\n3863\n3864\n3865\n3866\n3867\n3868\n3869\n3870\n3871\n3872\n3873\n3874\n3875\n3876\n3877\n3878\n3879\n3880\n3881\n3882\n3883\n3884\n3885\n3886\n3887\n3888\n3889\n3890\n3891\n3892\n3893\n3894\n3895\n3896\n3897\n3898\n3899\n3900\n3901\n3902\n3903\n3904\n3905\n3906\n3907\n3908\n3909\n3910\n3911\n3912\n3913\n3914\n3915\n3916\n3917\n3918\n3919\n3920\n3921\n3922\n3923\n3924\n3925\n3926\n3927\n3928\n3929\n3930\n3931\n3932\n3933\n3934\n3935\n3936\n3937\n3938\n3939\n3940\n3941\n3942\n3943\n3944\n3945\n3946\n3947\n3948\n3949\n3950\n3951\n3952\n3953\n3954\n3955\n3956\n3957\n3958\n3959\n3960\n3961\n3962\n3963\n3964\n3965\n3966\n3967\n3968\n3969\n3970\n3971\n3972\n3973\n3974\n3975\n3976\n3977\n3978\n3979\n3980\n3981\n3982\n3983\n3984\n3985\n3986\n3987\n3988\n3989\n3990\n3991\n3992\n3993\n3994\n3995\n3996\n3997\n3998\n3999\n4000\n4001\n4002\n4003\n4004\n4005\n4006\n4007\n4008\n4009\n4010\n4011\n4012\n4013\n4014\n4015\n4016\n4017\n4018\n4019\n4020\n4021\n4022\n4023\n4024\n4025\n4026\n4027\n4028\n4029\n4030\n4031\n4032\n4033\n4034\n4035\n4036\n4037\n4038\n4039\n4040\n4041\n4042\n4043\n4044\n4045\n4046\n4047\n4048\n4049\n4050\n4051\n4052\n4053\n4054\n4055\n4056\n4057\n4058\n4059\n4060\n4061\n4062\n4063\n4064\n4065\n4066\n4067\n4068\n4069\n4070\n4071\n4072\n4073\n4074\n4075\n4076\n4077\n4078\n4079\n4080\n4081\n4082\n4083\n4084\n4085\n4086\n4087\n4088\n4089\n4090\n4091\n4092\n4093\n4094\n4095\n4096\n4097\n4098\n4099\n4100\n4101\n4102\n4103\n4104\n4105\n4106\n4107\n4108\n4109\n4110\n4111\n4112\n4113\n4114\n4115\n4116\n4117\n4118\n4119\n4120\n4121\n4122\n4123\n4124\n4125\n4126\n4127\n4128\n4129\n4130\n4131\n4132\n4133\n4134\n4135\n4136\n4137\n4138\n4139\n4140\n4141\n4142\n4143\n4144\n4145\n4146\n4147\n4148\n4149\n4150\n4151\n4152\n4153\n4154\n4155\n4156\n4157\n4158\n4159\n4160\n4161\n4162\n4163\n4164\n4165\n4166\n4167\n4168\n4169\n4170\n4171\n4172\n4173\n4174\n4175\n4176\n4177\n4178\n4179\n4180\n4181\n4182\n4183\n4184\n4185\n4186\n4187\n4188\n4189\n4190\n4191\n4192\n4193\n4194\n4195\n4196\n4197\n4198\n4199\n4200\n4201\n4202\n4203\n4204\n4205\n4206\n4207\n4208\n4209\n4210\n4211\n4212\n4213\n4214\n4215\n4216\n4217\n4218\n4219\n4220\n4221\n4222\n4223\n4224\n4225\n4226\n4227\n4228\n4229\n4230\n4231\n4232\n4233\n4234\n4235\n4236\n4237\n4238\n4239\n4240\n4241\n4242\n4243\n4244\n4245\n4246\n4247\n4248\n4249\n4250\n4251\n4252\n4253\n4254\n4255\n4256\n4257\n4258\n4259\n4260\n4261\n4262\n4263\n4264\n4265\n4266\n4267\n4268\n4269\n4270\n4271\n4272\n4273\n4274\n4275\n4276\n4277\n4278\n4279\n4280\n4281\n4282\n4283\n4284\n4285\n4286\n4287\n4288\n4289\n4290\n4291\n4292\n4293\n4294\n4295\n4296\n4297\n4298\n4299\n4300\n4301\n4302\n4303\n4304\n4305\n4306\n4307\n4308\n4309\n4310\n4311\n4312\n4313\n4314\n4315\n4316\n4317\n4318\n4319\n4320\n4321\n4322\n4323\n4324\n4325\n4326\n4327\n4328\n4329\n4330\n4331\n4332\n4333\n4334\n4335\n4336\n4337\n4338\n4339\n4340\n4341\n4342\n4343\n4344\n4345\n4346\n4347\n4348\n4349\n4350\n4351\n4352\n4353\n4354\n4355\n4356\n4357\n4358\n4359\n4360\n4361\n4362\n4363\n4364\n4365\n4366\n4367\n4368\n4369\n4370\n4371\n4372\n4373\n4374\n4375\n4376\n4377\n4378\n4379\n4380\n4381\n4382\n4383\n4384\n4385\n4386\n4387\n4388\n4389\n4390\n4391\n4392\n4393\n4394\n4395\n4396\n4397\n4398\n4399\n4400\n4401\n4402\n4403\n4404\n4405\n4406\n4407\n4408\n4409\n4410\n4411\n4412\n4413\n4414\n4415\n4416\n4417\n4418\n4419\n4420\n4421\n4422\n4423\n4424\n4425\n4426\n4427\n4428\n4429\n4430\n4431\n4432\n4433\n4434\n4435\n4436\n4437\n4438\n4439\n4440\n4441\n4442\n4443\n4444\n4445\n4446\n4447\n4448\n4449\n4450\n4451\n4452\n4453\n4454\n4455\n4456\n4457\n4458\n4459\n4460\n4461\n4462\n4463\n4464\n4465\n4466\n4467\n4468\n4469\n4470\n4471\n4472\n4473\n4474\n4475\n4476\n4477\n4478\n4479\n4480\n4481\n4482\n4483\n4484\n4485\n4486\n4487\n4488\n4489\n4490\n4491\n4492\n4493\n4494\n4495\n4496\n4497\n4498\n4499\n4500\n4501\n4502\n4503\n4504\n4505\n4506\n4507\n4508\n4509\n4510\n4511\n4512\n4513\n4514\n4515\n4516\n4517\n4518\n4519\n4520\n4521\n4522\n4523\n4524\n4525\n4526\n4527\n4528\n4529\n4530\n4531\n4532\n4533\n4534\n4535\n4536\n4537\n4538\n4539\n4540\n4541\n4542\n4543\n4544\n4545\n4546\n4547\n4548\n4549\n4550\n4551\n4552\n4553\n4554\n4555\n4556\n4557\n4558\n4559\n4560\n4561\n4562\n4563\n4564\n4565\n4566\n4567\n4568\n4569\n4570\n4571\n4572\n4573\n4574\n4575\n4576\n4577\n4578\n4579\n4580\n4581\n4582\n4583\n4584\n4585\n4586\n4587\n4588\n4589\n4590\n4591\n4592\n4593\n4594\n4595\n4596\n4597\n4598\n4599\n4600\n4601\n4602\n4603\n4604\n4605\n4606\n4607\n4608\n4609\n4610\n4611\n4612\n4613\n4614\n4615\n4616\n4617\n4618\n4619\n4620\n4621\n4622\n4623\n4624\n4625\n4626\n4627\n4628\n4629\n4630\n4631\n4632\n4633\n4634\n4635\n4636\n4637\n4638\n4639\n4640\n4641\n4642\n4643\n4644\n4645\n4646\n4647\n4648\n4649\n4650\n4651\n4652\n4653\n4654\n4655\n4656\n4657\n4658\n4659\n4660\n4661\n4662\n4663\n4664\n4665\n4666\n4667\n4668\n4669\n4670\n4671\n4672\n4673\n4674\n4675\n4676\n4677\n4678\n4679\n4680\n4681\n4682\n4683\n4684\n4685\n4686\n4687\n4688\n4689\n4690\n4691\n4692\n4693\n4694\n4695\n4696\n4697\n4698\n4699\n4700\n4701\n4702\n4703\n4704\n4705\n4706\n4707\n4708\n4709\n4710\n4711\n4712\n4713\n4714\n4715\n4716\n4717\n4718\n4719\n4720\n4721\n4722\n4723\n4724\n4725\n4726\n4727\n4728\n4729\n4730\n4731\n4732\n4733\n4734\n4735\n4736\n4737\n4738\n4739\n4740\n4741\n4742\n4743\n4744\n4745\n4746\n4747\n4748\n4749\n4750\n4751\n4752\n4753\n4754\n4755\n4756\n4757\n4758\n4759\n4760\n4761\n4762\n4763\n4764\n4765\n4766\n4767\n4768\n4769\n4770\n4771\n4772\n4773\n4774\n4775\n4776\n4777\n4778\n4779\n4780\n4781\n4782\n4783\n4784\n4785\n4786\n4787\n4788\n4789\n4790\n4791\n4792\n4793\n4794\n4795\n4796\n4797\n4798\n4799\n4800\n4801\n4802\n4803\n4804\n4805\n4806\n4807\n4808\n4809\n4810\n4811\n4812\n4813\n4814\n4815\n4816\n4817\n4818\n4819\n4820\n4821\n4822\n4823\n4824\n4825\n4826\n4827\n4828\n4829\n4830\n4831\n4832\n4833\n4834\n4835\n4836\n4837\n4838\n4839\n4840\n4841\n4842\n4843\n4844\n4845\n4846\n4847\n4848\n4849\n4850\n4851\n4852\n4853\n4854\n4855\n4856\n4857\n4858\n4859\n4860\n4861\n4862\n4863\n4864\n4865\n4866\n4867\n4868\n4869\n4870\n4871\n4872\n4873\n4874\n4875\n4876\n4877\n4878\n4879\n4880\n4881\n4882\n4883\n4884\n4885\n4886\n4887\n4888\n4889\n4890\n4891\n4892\n4893\n4894\n4895\n4896\n4897\n4898\n4899\n4900\n4901\n4902\n4903\n4904\n4905\n4906\n4907\n4908\n4909\n4910\n4911\n4912\n4913\n4914\n4915\n4916\n4917\n4918\n4919\n4920\n4921\n4922\n4923\n4924\n4925\n4926\n4927\n4928\n4929\n4930\n4931\n4932\n4933\n4934\n4935\n4936\n4937\n4938\n4939\n4940\n4941\n4942\n4943\n4944\n4945\n4946\n4947\n4948\n4949\n4950\n4951\n4952\n4953\n4954\n4955\n4956\n4957\n4958\n4959\n4960\n4961\n4962\n4963\n4964\n4965\n4966\n4967\n4968\n4969\n4970\n4971\n4972\n4973\n4974\n4975\n4976\n4977\n4978\n4979\n4980\n4981\n4982\n4983\n4984\n4985\n4986\n4987\n4988\n4989\n4990\n4991\n4992\n4993\n4994\n4995\n4996\n4997\n4998\n4999\n5000\n5001\n5002\n5003\n5004\n5005\n5006\n5007\n5008\n5009\n5010\n5011\n5012\n5013\n5014\n5015\n5016\n5017\n5018\n5019\n5020\n5021\n5022\n5023\n5024\n5025\n5026\n5027\n5028\n5029\n5030\n5031\n5032\n5033\n5034\n5035\n5036\n5037\n5038\n5039\n5040\n5041\n5042\n5043\n5044\n5045\n5046\n5047\n5048\n5049\n5050\n5051\n5052\n5053\n5054\n5055\n5056\n5057\n5058\n5059\n5060\n5061\n5062\n5063\n5064\n5065\n5066\n5067\n5068\n5069\n5070\n5071\n5072\n5073\n5074\n5075\n5076\n5077\n5078\n5079\n5080\n5081\n5082\n5083\n5084\n5085\n5086\n5087\n5088\n5089\n5090\n5091\n5092\n5093\n5094\n5095\n5096\n5097\n5098\n5099\n5100\n5101\n5102\n5103\n5104\n5105\n5106\n5107\n5108\n5109\n5110\n5111\n5112\n5113\n5114\n5115\n5116\n5117\n5118\n5119\n5120\n5121\n5122\n5123\n5124\n5125\n5126\n5127\n5128\n5129\n5130\n5131\n5132\n5133\n5134\n5135\n5136\n5137\n5138\n5139\n5140\n5141\n5142\n5143\n5144\n5145\n5146\n5147\n5148\n5149\n5150\n5151\n5152\n5153\n5154\n5155\n5156\n5157\n5158\n5159\n5160\n5161\n5162\n5163\n5164\n5165\n5166\n5167\n5168\n5169\n5170\n5171\n5172\n5173\n5174\n5175\n5176\n5177\n5178\n5179\n5180\n5181\n5182\n5183\n5184\n5185\n5186\n5187\n5188\n5189\n5190\n5191\n5192\n5193\n5194\n5195\n5196\n5197\n5198\n5199\n5200\n5201\n5202\n5203\n5204\n5205\n5206\n5207\n5208\n5209\n5210\n5211\n5212\n5213\n5214\n5215\n5216\n5217\n5218\n5219\n5220\n5221\n5222\n5223\n5224\n5225\n5226\n5227\n5228\n5229\n5230\n5231\n5232\n5233\n5234\n5235\n5236\n5237\n5238\n5239\n5240\n5241\n5242\n5243\n5244\n5245\n5246\n5247\n5248\n5249\n5250\n5251\n5252\n5253\n5254\n5255\n5256\n5257\n5258\n5259\n5260\n5261\n5262\n5263\n5264\n5265\n5266\n5267\n5268\n5269\n5270\n5271\n5272\n5273\n5274\n5275\n5276\n5277\n5278\n5279\n5280\n5281\n5282\n5283\n5284\n5285\n5286\n5287\n5288\n5289\n5290\n5291\n5292\n5293\n5294\n5295\n5296\n5297\n5298\n5299\n5300\n5301\n5302\n5303\n5304\n5305\n5306\n5307\n5308\n5309\n5310\n5311\n5312\n5313\n5314\n5315\n5316\n5317\n5318\n5319\n5320\n5321\n5322\n5323\n5324\n5325\n5326\n5327\n5328\n5329\n5330\n5331\n5332\n5333\n5334\n5335\n5336\n5337\n5338\n5339\n5340\n5341\n5342\n5343\n5344\n5345\n5346\n5347\n5348\n5349\n5350\n5351\n5352\n5353\n5354\n5355\n5356\n5357\n5358\n5359\n5360\n5361\n5362\n5363\n5364\n5365\n5366\n5367\n5368\n5369\n5370\n5371\n5372\n5373\n5374\n5375\n5376\n5377\n5378\n5379\n5380\n5381\n5382\n5383\n5384\n5385\n5386\n5387\n5388\n5389\n5390\n5391\n5392\n5393\n5394\n5395\n5396\n5397\n5398\n5399\n5400\n5401\n5402\n5403\n5404\n5405\n5406\n5407\n5408\n5409\n5410\n5411\n5412\n5413\n5414\n5415\n5416\n5417\n5418\n5419\n5420\n5421\n5422\n5423\n5424\n5425\n5426\n5427\n5428\n5429\n5430\n5431\n5432\n5433\n5434\n5435\n5436\n5437\n5438\n5439\n5440\n5441\n5442\n5443\n5444\n5445\n5446\n5447\n5448\n5449\n5450\n5451\n5452\n5453\n5454\n5455\n5456\n5457\n5458\n5459\n5460\n5461\n5462\n5463\n5464\n5465\n5466\n5467\n5468\n5469\n5470\n5471\n5472\n5473\n5474\n5475\n5476\n5477\n5478\n5479\n5480\n5481\n5482\n5483\n5484\n5485\n5486\n5487\n5488\n5489\n5490\n5491\n5492\n5493\n5494\n5495\n5496\n5497\n5498\n5499\n5500\n5501\n5502\n5503\n5504\n5505\n5506\n5507\n5508\n5509\n5510\n5511\n5512\n5513\n5514\n5515\n5516\n5517\n5518\n5519\n5520\n5521\n5522\n5523\n5524\n5525\n5526\n5527\n5528\n5529\n5530\n5531\n5532\n5533\n5534\n5535\n5536\n5537\n5538\n5539\n5540\n5541\n5542\n5543\n5544\n5545\n5546\n5547\n5548\n5549\n5550\n5551\n5552\n5553\n5554\n5555\n5556\n5557\n5558\n5559\n5560\n5561\n5562\n5563\n5564\n5565\n5566\n5567\n5568\n5569\n5570\n5571\n5572\n5573\n5574\n5575\n5576\n5577\n5578\n5579\n5580\n5581\n5582\n5583\n5584\n5585\n5586\n5587\n5588\n5589\n5590\n5591\n5592\n5593\n5594\n5595\n5596\n5597\n5598\n5599\n5600\n5601\n5602\n5603\n5604\n5605\n5606\n5607\n5608\n5609\n5610\n5611\n5612\n5613\n5614\n5615\n5616\n5617\n5618\n5619\n5620\n5621\n5622\n5623\n5624\n5625\n5626\n5627\n5628\n5629\n5630\n5631\n5632\n5633\n5634\n5635\n5636\n5637\n5638\n5639\n5640\n5641\n5642\n5643\n5644\n5645\n5646\n5647\n5648\n5649\n5650\n5651\n5652\n5653\n5654\n5655\n5656\n5657\n5658\n5659\n5660\n5661\n5662\n5663\n5664\n5665\n5666\n5667\n5668\n5669\n5670\n5671\n5672\n5673\n5674\n5675\n5676\n5677\n5678\n5679\n5680\n5681\n5682\n5683\n5684\n5685\n5686\n5687\n5688\n5689\n5690\n5691\n5692\n5693\n5694\n5695\n5696\n5697\n5698\n5699\n5700\n5701\n5702\n5703\n5704\n5705\n5706\n5707\n5708\n5709\n5710\n5711\n5712\n5713\n5714\n5715\n5716\n5717\n5718\n5719\n5720\n5721\n5722\n5723\n5724\n5725\n5726\n5727\n5728\n5729\n5730\n5731\n5732\n5733\n5734\n5735\n5736\n5737\n5738\n5739\n5740\n5741\n5742\n5743\n5744\n5745\n5746\n5747\n5748\n5749\n5750\n5751\n5752\n5753\n5754\n5755\n5756\n5757\n5758\n5759\n5760\n5761\n5762\n5763\n5764\n5765\n5766\n5767\n5768\n5769\n5770\n5771\n5772\n5773\n5774\n5775\n5776\n5777\n5778\n5779\n5780\n5781\n5782\n5783\n5784\n5785\n5786\n5787\n5788\n5789\n5790\n5791\n5792\n5793\n5794\n5795\n5796\n5797\n5798\n5799\n5800\n5801\n5802\n5803\n5804\n5805\n5806\n5807\n5808\n5809\n5810\n5811\n5812\n5813\n5814\n5815\n5816\n5817\n5818\n5819\n5820\n5821\n5822\n5823\n5824\n5825\n5826\n5827\n5828\n5829\n5830\n5831\n5832\n5833\n5834\n5835\n5836\n5837\n5838\n5839\n5840\n5841\n5842\n5843\n5844\n5845\n5846\n5847\n5848\n5849\n5850\n5851\n5852\n5853\n5854\n5855\n5856\n5857\n5858\n5859\n5860\n5861\n5862\n5863\n5864\n5865\n5866\n5867\n5868\n5869\n5870\n5871\n5872\n5873\n5874\n5875\n5876\n5877\n5878\n5879\n5880\n5881\n5882\n5883\n5884\n5885\n5886\n5887\n5888\n5889\n5890\n5891\n5892\n5893\n5894\n5895\n5896\n5897\n5898\n5899\n5900\n5901\n5902\n5903\n5904\n5905\n5906\n5907\n5908\n5909\n5910\n5911\n5912\n5913\n5914\n5915\n5916\n5917\n5918\n5919\n5920\n5921\n5922\n5923\n5924\n5925\n5926\n5927\n5928\n5929\n5930\n5931\n5932\n5933\n5934\n5935\n5936\n5937\n5938\n5939\n5940\n5941\n5942\n5943\n5944\n5945\n5946\n5947\n5948\n5949\n5950\n5951\n5952\n5953\n5954\n5955\n5956\n5957\n5958\n5959\n5960\n5961\n5962\n5963\n5964\n5965\n5966\n5967\n5968\n5969\n5970\n5971\n5972\n5973\n5974\n5975\n5976\n5977\n5978\n5979\n5980\n5981\n5982\n5983\n5984\n5985\n5986\n5987\n5988\n5989\n5990\n5991\n5992\n5993\n5994\n5995\n5996\n5997\n5998\n5999\n6000\n6001\n6002\n6003\n6004\n6005\n6006\n6007\n6008\n6009\n6010\n6011\n6012\n6013\n6014\n6015\n6016\n6017\n6018\n6019\n6020\n6021\n6022\n6023\n6024\n6025\n6026\n6027\n6028\n6029\n6030\n6031\n6032\n6033\n6034\n6035\n6036\n6037\n6038\n6039\n6040\n6041\n6042\n6043\n6044\n6045\n6046\n6047\n6048\n6049\n6050\n6051\n6052\n6053\n6054\n6055\n6056\n6057\n6058\n6059\n6060\n6061\n6062\n6063\n6064\n6065\n6066\n6067\n6068\n6069\n6070\n6071\n6072\n6073\n6074\n6075\n6076\n6077\n6078\n6079\n6080\n6081\n6082\n6083\n6084\n6085\n6086\n6087\n6088\n6089\n6090\n6091\n6092\n6093\n6094\n6095\n6096\n6097\n6098\n6099\n6100\n6101\n6102\n6103\n6104\n6105\n6106\n6107\n6108\n6109\n6110\n6111\n6112\n6113\n6114\n6115\n6116\n6117\n6118\n6119\n6120\n6121\n6122\n6123\n6124\n6125\n6126\n6127\n6128\n6129\n6130\n6131\n6132\n6133\n6134\n6135\n6136\n6137\n6138\n6139\n6140\n6141\n6142\n6143\n6144\n6145\n6146\n6147\n6148\n6149\n6150\n6151\n6152\n6153\n6154\n6155\n6156\n6157\n6158\n6159\n6160\n6161\n6162\n6163\n6164\n6165\n6166\n6167\n6168\n6169\n6170\n6171\n6172\n6173\n6174\n6175\n6176\n6177\n6178\n6179\n6180\n6181\n6182\n6183\n6184\n6185\n6186\n6187\n6188\n6189\n6190\n6191\n6192\n6193\n6194\n6195\n6196\n6197\n6198\n6199\n6200\n6201\n6202\n6203\n6204\n6205\n6206\n6207\n6208\n6209\n6210\n6211\n6212\n6213\n6214\n6215\n6216\n6217\n6218\n6219\n6220\n6221\n6222\n6223\n6224\n6225\n6226\n6227\n6228\n6229\n6230\n6231\n6232\n6233\n6234\n6235\n6236\n6237\n6238\n6239\n6240\n6241\n6242\n6243\n6244\n6245\n6246\n6247\n6248\n6249\n6250\n6251\n6252\n6253\n6254\n6255\n6256\n6257\n6258\n6259\n6260\n6261\n6262\n6263\n6264\n6265\n6266\n6267\n6268\n6269\n6270\n6271\n6272\n6273\n6274\n6275\n6276\n6277\n6278\n6279\n6280\n6281\n6282\n6283\n6284\n6285\n6286\n6287\n6288\n6289\n6290\n6291\n6292\n6293\n6294\n6295\n6296\n6297\n6298\n6299\n6300\n6301\n6302\n6303\n6304\n6305\n6306\n6307\n6308\n6309\n6310\n6311\n6312\n6313\n6314\n6315\n6316\n6317\n6318\n6319\n6320\n6321\n6322\n6323\n6324\n6325\n6326\n6327\n6328\n6329\n6330\n6331\n6332\n6333\n6334\n6335\n6336\n6337\n6338\n6339\n6340\n6341\n6342\n6343\n6344\n6345\n6346\n6347\n6348\n6349\n6350\n6351\n6352\n6353\n6354\n6355\n6356\n6357\n6358\n6359\n6360\n6361\n6362\n6363\n6364\n6365\n6366\n6367\n6368\n6369\n6370\n6371\n6372\n6373\n6374\n6375\n6376\n6377\n6378\n6379\n6380\n6381\n6382\n6383\n6384\n6385\n6386\n6387\n6388\n6389\n6390\n6391\n6392\n6393\n6394\n6395\n6396\n6397\n6398\n6399\n6400\n6401\n6402\n6403\n6404\n6405\n6406\n6407\n6408\n6409\n6410\n6411\n6412\n6413\n6414\n6415\n6416\n6417\n6418\n6419\n6420\n6421\n6422\n6423\n6424\n6425\n6426\n6427\n6428\n6429\n6430\n6431\n6432\n6433\n6434\n6435\n6436\n6437\n6438\n6439\n6440\n6441\n6442\n6443\n6444\n6445\n6446\n6447\n6448\n6449\n6450\n6451\n6452\n6453\n6454\n6455\n6456\n6457\n6458\n6459\n6460\n6461\n6462\n6463\n6464\n6465\n6466\n6467\n6468\n6469\n6470\n6471\n6472\n6473\n6474\n6475\n6476\n6477\n6478\n6479\n6480\n6481\n6482\n6483\n6484\n6485\n6486\n6487\n6488\n6489\n6490\n6491\n6492\n6493\n6494\n6495\n6496\n6497\n6498\n6499\n6500\n6501\n6502\n6503\n6504\n6505\n6506\n6507\n6508\n6509\n6510\n6511\n6512\n6513\n6514\n6515\n6516\n6517\n6518\n6519\n6520\n6521\n6522\n6523\n6524\n6525\n6526\n6527\n6528\n6529\n6530\n6531\n6532\n6533\n6534\n6535\n6536\n6537\n6538\n6539\n6540\n6541\n6542\n6543\n6544\n6545\n6546\n6547\n6548\n6549\n6550\n6551\n6552\n6553\n6554\n6555\n6556\n6557\n6558\n6559\n6560\n6561\n6562\n6563\n6564\n6565\n6566\n6567\n6568\n6569\n6570\n6571\n6572\n6573\n6574\n6575\n6576\n6577\n6578\n6579\n6580\n6581\n6582\n6583\n6584\n6585\n6586\n6587\n6588\n6589\n6590\n6591\n6592\n6593\n6594\n6595\n6596\n6597\n6598\n6599\n6600\n6601\n6602\n6603\n6604\n6605\n6606\n6607\n6608\n6609\n6610\n6611\n6612\n6613\n6614\n6615\n6616\n6617\n6618\n6619\n6620\n6621\n6622\n6623\n6624\n6625\n6626\n6627\n6628\n6629\n6630\n6631\n6632\n6633\n6634\n6635\n6636\n6637\n6638\n6639\n6640\n6641\n6642\n6643\n6644\n6645\n6646\n6647\n6648\n6649\n6650\n6651\n6652\n6653\n6654\n6655\n6656\n6657\n6658\n6659\n6660\n6661\n6662\n6663\n6664\n6665\n6666\n6667\n6668\n6669\n6670\n6671\n6672\n6673\n6674\n6675\n6676\n6677\n6678\n6679\n6680\n6681\n6682\n6683\n6684\n6685\n6686\n6687\n6688\n6689\n6690\n6691\n6692\n6693\n6694\n6695\n6696\n6697\n6698\n6699\n6700\n6701\n6702\n6703\n6704\n6705\n6706\n6707\n6708\n6709\n6710\n6711\n6712\n6713\n6714\n6715\n6716\n6717\n6718\n6719\n6720\n6721\n6722\n6723\n6724\n6725\n6726\n6727\n6728\n6729\n6730\n6731\n6732\n6733\n6734\n6735\n6736\n6737\n6738\n6739\n6740\n6741\n6742\n6743\n6744\n6745\n6746\n6747\n6748\n6749\n6750\n6751\n6752\n6753\n6754\n6755\n6756\n6757\n6758\n6759\n6760\n6761\n6762\n6763\n6764\n6765\n6766\n6767\n6768\n6769\n6770\n6771\n6772\n6773\n6774\n6775\n6776\n6777\n6778\n6779\n6780\n6781\n6782\n6783\n6784\n6785\n6786\n6787\n6788\n6789\n6790\n6791\n6792\n6793\n6794\n6795\n6796\n6797\n6798\n6799\n6800\n6801\n6802\n6803\n6804\n6805\n6806\n6807\n6808\n6809\n6810\n6811\n6812\n6813\n6814\n6815\n6816\n6817\n6818\n6819\n6820\n6821\n6822\n6823\n6824\n6825\n6826\n6827\n6828\n6829\n6830\n6831\n6832\n6833\n6834\n6835\n6836\n6837\n6838\n6839\n6840\n6841\n6842\n6843\n6844\n6845\n6846\n6847\n6848\n6849\n6850\n6851\n6852\n6853\n6854\n6855\n6856\n6857\n6858\n6859\n6860\n6861\n6862\n6863\n6864\n6865\n6866\n6867\n6868\n6869\n6870\n6871\n6872\n6873\n6874\n6875\n6876\n6877\n6878\n6879\n6880\n6881\n6882\n6883\n6884\n6885\n6886\n6887\n6888\n6889\n6890\n6891\n6892\n6893\n6894\n6895\n6896\n6897\n6898\n6899\n6900\n6901\n6902\n6903\n6904\n6905\n6906\n6907\n6908\n6909\n6910\n6911\n6912\n6913\n6914\n6915\n6916\n6917\n6918\n6919\n6920\n6921\n6922\n6923\n6924\n6925\n6926\n6927\n6928\n6929\n6930\n6931\n6932\n6933\n6934\n6935\n6936\n6937\n6938\n6939\n6940\n6941\n6942\n6943\n6944\n6945\n6946\n6947\n6948\n6949\n6950\n6951\n6952\n6953\n6954\n6955\n6956\n6957\n6958\n6959\n6960\n6961\n6962\n6963\n6964\n6965\n6966\n6967\n6968\n6969\n6970\n6971\n6972\n6973\n6974\n6975\n6976\n6977\n6978\n6979\n6980\n6981\n6982\n6983\n6984\n6985\n6986\n6987\n6988\n6989\n6990\n6991\n6992\n6993\n6994\n6995\n6996\n6997\n6998\n6999\n7000\n7001\n7002\n7003\n7004\n7005\n7006\n7007\n7008\n7009\n7010\n7011\n7012\n7013\n7014\n7015\n7016\n7017\n7018\n7019\n7020\n7021\n7022\n7023\n7024\n7025\n7026\n7027\n7028\n7029\n7030\n7031\n7032\n7033\n7034\n7035\n7036\n7037\n7038\n7039\n7040\n7041\n7042\n7043\n7044\n7045\n7046\n7047\n7048\n7049\n7050\n7051\n7052\n7053\n7054\n7055\n7056\n7057\n7058\n7059\n7060\n7061\n7062\n7063\n7064\n7065\n7066\n7067\n7068\n7069\n7070\n7071\n7072\n7073\n7074\n7075\n7076\n7077\n7078\n7079\n7080\n7081\n7082\n7083\n7084\n7085\n7086\n7087\n7088\n7089\n7090\n7091\n7092\n7093\n7094\n7095\n7096\n7097\n7098\n7099\n7100\n7101\n7102\n7103\n7104\n7105\n7106\n7107\n7108\n7109\n7110\n7111\n7112\n7113\n7114\n7115\n7116\n7117\n7118\n7119\n7120\n7121\n7122\n7123\n7124\n7125\n7126\n7127\n7128\n7129\n7130\n7131\n7132\n7133\n7134\n7135\n7136\n7137\n7138\n7139\n7140\n7141\n7142\n7143\n7144\n7145\n7146\n7147\n7148\n7149\n7150\n7151\n7152\n7153\n7154\n7155\n7156\n7157\n7158\n7159\n7160\n7161\n7162\n7163\n7164\n7165\n7166\n7167\n7168\n7169\n7170\n7171\n7172\n7173\n7174\n7175\n7176\n7177\n7178\n7179\n7180\n7181\n7182\n7183\n7184\n7185\n7186\n7187\n7188\n7189\n7190\n7191\n7192\n7193\n7194\n7195\n7196\n7197\n7198\n7199\n7200\n7201\n7202\n7203\n7204\n7205\n7206\n7207\n7208\n7209\n7210\n7211\n7212\n7213\n7214\n7215\n7216\n7217\n7218\n7219\n7220\n7221\n7222\n7223\n7224\n7225\n7226\n7227\n7228\n7229\n7230\n7231\n7232\n7233\n7234\n7235\n7236\n7237\n7238\n7239\n7240\n7241\n7242\n7243\n7244\n7245\n7246\n7247\n7248\n7249\n7250\n7251\n7252\n7253\n7254\n7255\n7256\n7257\n7258\n7259\n7260\n7261\n7262\n7263\n7264\n7265\n7266\n7267\n7268\n7269\n7270\n7271\n7272\n7273\n7274\n7275\n7276\n7277\n7278\n7279\n7280\n7281\n7282\n7283\n7284\n7285\n7286\n7287\n7288\n7289\n7290\n7291\n7292\n7293\n7294\n7295\n7296\n7297\n7298\n7299\n7300\n7301\n7302\n7303\n7304\n7305\n7306\n7307\n7308\n7309\n7310\n7311\n7312\n7313\n7314\n7315\n7316\n7317\n7318\n7319\n7320\n7321\n7322\n7323\n7324\n7325\n7326\n7327\n7328\n7329\n7330\n7331\n7332\n7333\n7334\n7335\n7336\n7337\n7338\n7339\n7340\n7341\n7342\n7343\n7344\n7345\n7346\n7347\n7348\n7349\n7350\n7351\n7352\n7353\n7354\n7355\n7356\n7357\n7358\n7359\n7360\n7361\n7362\n7363\n7364\n7365\n7366\n7367\n7368\n7369\n7370\n7371\n7372\n7373\n7374\n7375\n7376\n7377\n7378\n7379\n7380\n7381\n7382\n7383\n7384\n7385\n7386\n7387\n7388\n7389\n7390\n7391\n7392\n7393\n7394\n7395\n7396\n7397\n7398\n7399\n7400\n7401\n7402\n7403\n7404\n7405\n7406\n7407\n7408\n7409\n7410\n7411\n7412\n7413\n7414\n7415\n7416\n7417\n7418\n7419\n7420\n7421\n7422\n7423\n7424\n7425\n7426\n7427\n7428\n7429\n7430\n7431\n7432\n7433\n7434\n7435\n7436\n7437\n7438\n7439\n7440\n7441\n7442\n7443\n7444\n7445\n7446\n7447\n7448\n7449\n7450\n7451\n7452\n7453\n7454\n7455\n7456\n7457\n7458\n7459\n7460\n7461\n7462\n7463\n7464\n7465\n7466\n7467\n7468\n7469\n7470\n7471\n7472\n7473\n7474\n7475\n7476\n7477\n7478\n7479\n7480\n7481\n7482\n7483\n7484\n7485\n7486\n7487\n7488\n7489\n7490\n7491\n7492\n7493\n7494\n7495\n7496\n7497\n7498\n7499\n7500\n7501\n7502\n7503\n7504\n7505\n7506\n7507\n7508\n7509\n7510\n7511\n7512\n7513\n7514\n7515\n7516\n7517\n7518\n7519\n7520\n7521\n7522\n7523\n7524\n7525\n7526\n7527\n7528\n7529\n7530\n7531\n7532\n7533\n7534\n7535\n7536\n7537\n7538\n7539\n7540\n7541\n7542\n7543\n7544\n7545\n7546\n7547\n7548\n7549\n7550\n7551\n7552\n7553\n7554\n7555\n7556\n7557\n7558\n7559\n7560\n7561\n7562\n7563\n7564\n7565\n7566\n7567\n7568\n7569\n7570\n7571\n7572\n7573\n7574\n7575\n7576\n7577\n7578\n7579\n7580\n7581\n7582\n7583\n7584\n7585\n7586\n7587\n7588\n7589\n7590\n7591\n7592\n7593\n7594\n7595\n7596\n7597\n7598\n7599\n7600\n7601\n7602\n7603\n7604\n7605\n7606\n7607\n7608\n7609\n7610\n7611\n7612\n7613\n7614\n7615\n7616\n7617\n7618\n7619\n7620\n7621\n7622\n7623\n7624\n7625\n7626\n7627\n7628\n7629\n7630\n7631\n7632\n7633\n7634\n7635\n7636\n7637\n7638\n7639\n7640\n7641\n7642\n7643\n7644\n7645\n7646\n7647\n7648\n7649\n7650\n7651\n7652\n7653\n7654\n7655\n7656\n7657\n7658\n7659\n7660\n7661\n7662\n7663\n7664\n7665\n7666\n7667\n7668\n7669\n7670\n7671\n7672\n7673\n7674\n7675\n7676\n7677\n7678\n7679\n7680\n7681\n7682\n7683\n7684\n7685\n7686\n7687\n7688\n7689\n7690\n7691\n7692\n7693\n7694\n7695\n7696\n7697\n7698\n7699\n7700\n7701\n7702\n7703\n7704\n7705\n7706\n7707\n7708\n7709\n7710\n7711\n7712\n7713\n7714\n7715\n7716\n7717\n7718\n7719\n7720\n7721\n7722\n7723\n7724\n7725\n7726\n7727\n7728\n7729\n7730\n7731\n7732\n7733\n7734\n7735\n7736\n7737\n7738\n7739\n7740\n7741\n7742\n7743\n7744\n7745\n7746\n7747\n7748\n7749\n7750\n7751\n7752\n7753\n7754\n7755\n7756\n7757\n7758\n7759\n7760\n7761\n7762\n7763\n7764\n7765\n7766\n7767\n7768\n7769\n7770\n7771\n7772\n7773\n7774\n7775\n7776\n7777\n7778\n7779\n7780\n7781\n7782\n7783\n7784\n7785\n7786\n7787\n7788\n7789\n7790\n7791\n7792\n7793\n7794\n7795\n7796\n7797\n7798\n7799\n7800\n7801\n7802\n7803\n7804\n7805\n7806\n7807\n7808\n7809\n7810\n7811\n7812\n7813\n7814\n7815\n7816\n7817\n7818\n7819\n7820\n7821\n7822\n7823\n7824\n7825\n7826\n7827\n7828\n7829\n7830\n7831\n7832\n7833\n7834\n7835\n7836\n7837\n7838\n7839\n7840\n7841\n7842\n7843\n7844\n7845\n7846\n7847\n7848\n7849\n7850\n7851\n7852\n7853\n7854\n7855\n7856\n7857\n7858\n7859\n7860\n7861\n7862\n7863\n7864\n7865\n7866\n7867\n7868\n7869\n7870\n7871\n7872\n7873\n7874\n7875\n7876\n7877\n7878\n7879\n7880\n7881\n7882\n7883\n7884\n7885\n7886\n7887\n7888\n7889\n7890\n7891\n7892\n7893\n7894\n7895\n7896\n7897\n7898\n7899\n7900\n7901\n7902\n7903\n7904\n7905\n7906\n7907\n7908\n7909\n7910\n7911\n7912\n7913\n7914\n7915\n7916\n7917\n7918\n7919\n7920\n7921\n7922\n7923\n7924\n7925\n7926\n7927\n7928\n7929\n7930\n7931\n7932\n7933\n7934\n7935\n7936\n7937\n7938\n7939\n7940\n7941\n7942\n7943\n7944\n7945\n7946\n7947\n7948\n7949\n7950\n7951\n7952\n7953\n7954\n7955\n7956\n7957\n7958\n7959\n7960\n7961\n7962\n7963\n7964\n7965\n7966\n7967\n7968\n7969\n7970\n7971\n7972\n7973\n7974\n7975\n7976\n7977\n7978\n7979\n7980\n7981\n7982\n7983\n7984\n7985\n7986\n7987\n7988\n7989\n7990\n7991\n7992\n7993\n7994\n7995\n7996\n7997\n7998\n7999\n8000\n8001\n8002\n8003\n8004\n8005\n8006\n8007\n8008\n8009\n8010\n8011\n8012\n8013\n8014\n8015\n8016\n8017\n8018\n8019\n8020\n8021\n8022\n8023\n8024\n8025\n8026\n8027\n8028\n8029\n8030\n8031\n8032\n8033\n8034\n8035\n8036\n8037\n8038\n8039\n8040\n8041\n8042\n8043\n8044\n8045\n8046\n8047\n8048\n8049\n8050\n8051\n8052\n8053\n8054\n8055\n8056\n8057\n8058\n8059\n8060\n8061\n8062\n8063\n8064\n8065\n8066\n8067\n8068\n8069\n8070\n8071\n8072\n8073\n8074\n8075\n8076\n8077\n8078\n8079\n8080\n8081\n8082\n8083\n8084\n8085\n8086\n8087\n8088\n8089\n8090\n8091\n8092\n8093\n8094\n8095\n8096\n8097\n8098\n8099\n8100\n8101\n8102\n8103\n8104\n8105\n8106\n8107\n8108\n8109\n8110\n8111\n8112\n8113\n8114\n8115\n8116\n8117\n8118\n8119\n8120\n8121\n8122\n8123\n8124\n8125\n8126\n8127\n8128\n8129\n8130\n8131\n8132\n8133\n8134\n8135\n8136\n8137\n8138\n8139\n8140\n8141\n8142\n8143\n8144\n8145\n8146\n8147\n8148\n8149\n8150\n8151\n8152\n8153\n8154\n8155\n8156\n8157\n8158\n8159\n8160\n8161\n8162\n8163\n8164\n8165\n8166\n8167\n8168\n8169\n8170\n8171\n8172\n8173\n8174\n8175\n8176\n8177\n8178\n8179\n8180\n8181\n8182\n8183\n8184\n8185\n8186\n8187\n8188\n8189\n8190\n8191\n8192\n8193\n8194\n8195\n8196\n8197\n8198\n8199\n8200\n8201\n8202\n8203\n8204\n8205\n8206\n8207\n8208\n8209\n8210\n8211\n8212\n8213\n8214\n8215\n8216\n8217\n8218\n8219\n8220\n8221\n8222\n8223\n8224\n8225\n8226\n8227\n8228\n8229\n8230\n8231\n8232\n8233\n8234\n8235\n8236\n8237\n8238\n8239\n8240\n8241\n8242\n8243\n8244\n8245\n8246\n8247\n8248\n8249\n8250\n8251\n8252\n8253\n8254\n8255\n8256\n8257\n8258\n8259\n8260\n8261\n8262\n8263\n8264\n8265\n8266\n8267\n8268\n8269\n8270\n8271\n8272\n8273\n8274\n8275\n8276\n8277\n8278\n8279\n8280\n8281\n8282\n8283\n8284\n8285\n8286\n8287\n8288\n8289\n8290\n8291\n8292\n8293\n8294\n8295\n8296\n8297\n8298\n8299\n8300\n8301\n8302\n8303\n8304\n8305\n8306\n8307\n8308\n8309\n8310\n8311\n8312\n8313\n8314\n8315\n8316\n8317\n8318\n8319\n8320\n8321\n8322\n8323\n8324\n8325\n8326\n8327\n8328\n8329\n8330\n8331\n8332\n8333\n8334\n8335\n8336\n8337\n8338\n8339\n8340\n8341\n8342\n8343\n8344\n8345\n8346\n8347\n8348\n8349\n8350\n8351\n8352\n8353\n8354\n8355\n8356\n8357\n8358\n8359\n8360\n8361\n8362\n8363\n8364\n8365\n8366\n8367\n8368\n8369\n8370\n8371\n8372\n8373\n8374\n8375\n8376\n8377\n8378\n8379\n8380\n8381\n8382\n8383\n8384\n8385\n8386\n8387\n8388\n8389\n8390\n8391\n8392\n8393\n8394\n8395\n8396\n8397\n8398\n8399\n8400\n8401\n8402\n8403\n8404\n8405\n8406\n8407\n8408\n8409\n8410\n8411\n8412\n8413\n8414\n8415\n8416\n8417\n8418\n8419\n8420\n8421\n8422\n8423\n8424\n8425\n8426\n8427\n8428\n8429\n8430\n8431\n8432\n8433\n8434\n8435\n8436\n8437\n8438\n8439\n8440\n8441\n8442\n8443\n8444\n8445\n8446\n8447\n8448\n8449\n8450\n8451\n8452\n8453\n8454\n8455\n8456\n8457\n8458\n8459\n8460\n8461\n8462\n8463\n8464\n8465\n8466\n8467\n8468\n8469\n8470\n8471\n8472\n8473\n8474\n8475\n8476\n8477\n8478\n8479\n8480\n8481\n8482\n8483\n8484\n8485\n8486\n8487\n8488\n8489\n8490\n8491\n8492\n8493\n8494\n8495\n8496\n8497\n8498\n8499\n8500\n8501\n8502\n8503\n8504\n8505\n8506\n8507\n8508\n8509\n8510\n8511\n8512\n8513\n8514\n8515\n8516\n8517\n8518\n8519\n8520\n8521\n8522\n8523\n8524\n8525\n8526\n8527\n8528\n8529\n8530\n8531\n8532\n8533\n8534\n8535\n8536\n8537\n8538\n8539\n8540\n8541\n8542\n8543\n8544\n8545\n8546\n8547\n8548\n8549\n8550\n8551\n8552\n8553\n8554\n8555\n8556\n8557\n8558\n8559\n8560\n8561\n8562\n8563\n8564\n8565\n8566\n8567\n8568\n8569\n8570\n8571\n8572\n8573\n8574\n8575\n8576\n8577\n8578\n8579\n8580\n8581\n8582\n8583\n8584\n8585\n8586\n8587\n8588\n8589\n8590\n8591\n8592\n8593\n8594\n8595\n8596\n8597\n8598\n8599\n8600\n8601\n8602\n8603\n8604\n8605\n8606\n8607\n8608\n8609\n8610\n8611\n8612\n8613\n8614\n8615\n8616\n8617\n8618\n8619\n8620\n8621\n8622\n8623\n8624\n8625\n8626\n8627\n8628\n8629\n8630\n8631\n8632\n8633\n8634\n8635\n8636\n8637\n8638\n8639\n8640\n8641\n8642\n8643\n8644\n8645\n8646\n8647\n8648\n8649\n8650\n8651\n8652\n8653\n8654\n8655\n8656\n8657\n8658\n8659\n8660\n8661\n8662\n8663\n8664\n8665\n8666\n8667\n8668\n8669\n8670\n8671\n8672\n8673\n8674\n8675\n8676\n8677\n8678\n8679\n8680\n8681\n8682\n8683\n8684\n8685\n8686\n8687\n8688\n8689\n8690\n8691\n8692\n8693\n8694\n8695\n8696\n8697\n8698\n8699\n8700\n8701\n8702\n8703\n8704\n8705\n8706\n8707\n8708\n8709\n8710\n8711\n8712\n8713\n8714\n8715\n8716\n8717\n8718\n8719\n8720\n8721\n8722\n8723\n8724\n8725\n8726\n8727\n8728\n8729\n8730\n8731\n8732\n8733\n8734\n8735\n8736\n8737\n8738\n8739\n8740\n8741\n8742\n8743\n8744\n8745\n8746\n8747\n8748\n8749\n8750\n8751\n8752\n8753\n8754\n8755\n8756\n8757\n8758\n8759\n8760\n8761\n8762\n8763\n8764\n8765\n8766\n8767\n8768\n8769\n8770\n8771\n8772\n8773\n8774\n8775\n8776\n8777\n8778\n8779\n8780\n8781\n8782\n8783\n8784\n8785\n8786\n8787\n8788\n8789\n8790\n8791\n8792\n8793\n8794\n8795\n8796\n8797\n8798\n8799\n8800\n8801\n8802\n8803\n8804\n8805\n8806\n8807\n8808\n8809\n8810\n8811\n8812\n8813\n8814\n8815\n8816\n8817\n8818\n8819\n8820\n8821\n8822\n8823\n8824\n8825\n8826\n8827\n8828\n8829\n8830\n8831\n8832\n8833\n8834\n8835\n8836\n8837\n8838\n8839\n8840\n8841\n8842\n8843\n8844\n8845\n8846\n8847\n8848\n8849\n8850\n8851\n8852\n8853\n8854\n8855\n8856\n8857\n8858\n8859\n8860\n8861\n8862\n8863\n8864\n8865\n8866\n8867\n8868\n8869\n8870\n8871\n8872\n8873\n8874\n8875\n8876\n8877\n8878\n8879\n8880\n8881\n8882\n8883\n8884\n8885\n8886\n8887\n8888\n8889\n8890\n8891\n8892\n8893\n8894\n8895\n8896\n8897\n8898\n8899\n8900\n8901\n8902\n8903\n8904\n8905\n8906\n8907\n8908\n8909\n8910\n8911\n8912\n8913\n8914\n8915\n8916\n8917\n8918\n8919\n8920\n8921\n8922\n8923\n8924\n8925\n8926\n8927\n8928\n8929\n8930\n8931\n8932\n8933\n8934\n8935\n8936\n8937\n8938\n8939\n8940\n8941\n8942\n8943\n8944\n8945\n8946\n8947\n8948\n8949\n8950\n8951\n8952\n8953\n8954\n8955\n8956\n8957\n8958\n8959\n8960\n8961\n8962\n8963\n8964\n8965\n8966\n8967\n8968\n8969\n8970\n8971\n8972\n8973\n8974\n8975\n8976\n8977\n8978\n8979\n8980\n8981\n8982\n8983\n8984\n8985\n8986\n8987\n8988\n8989\n8990\n8991\n8992\n8993\n8994\n8995\n8996\n8997\n8998\n8999\n9000\n9001\n9002\n9003\n9004\n9005\n9006\n9007\n9008\n9009\n9010\n9011\n9012\n9013\n9014\n9015\n9016\n9017\n9018\n9019\n9020\n9021\n9022\n9023\n9024\n9025\n9026\n9027\n9028\n9029\n9030\n9031\n9032\n9033\n9034\n9035\n9036\n9037\n9038\n9039\n9040\n9041\n9042\n9043\n9044\n9045\n9046\n9047\n9048\n9049\n9050\n9051\n9052\n9053\n9054\n9055\n9056\n9057\n9058\n9059\n9060\n9061\n9062\n9063\n9064\n9065\n9066\n9067\n9068\n9069\n9070\n9071\n9072\n9073\n9074\n9075\n9076\n9077\n9078\n9079\n9080\n9081\n9082\n9083\n9084\n9085\n9086\n9087\n9088\n9089\n9090\n9091\n9092\n9093\n9094\n9095\n9096\n9097\n9098\n9099\n9100\n9101\n9102\n9103\n9104\n9105\n9106\n9107\n9108\n9109\n9110\n9111\n9112\n9113\n9114\n9115\n9116\n9117\n9118\n9119\n9120\n9121\n9122\n9123\n9124\n9125\n9126\n9127\n9128\n9129\n9130\n9131\n9132\n9133\n9134\n9135\n9136\n9137\n9138\n9139\n9140\n9141\n9142\n9143\n9144\n9145\n9146\n9147\n9148\n9149\n9150\n9151\n9152\n9153\n9154\n9155\n9156\n9157\n9158\n9159\n9160\n9161\n9162\n9163\n9164\n9165\n9166\n9167\n9168\n9169\n9170\n9171\n9172\n9173\n9174\n9175\n9176\n9177\n9178\n9179\n9180\n9181\n9182\n9183\n9184\n9185\n9186\n9187\n9188\n9189\n9190\n9191\n9192\n9193\n9194\n9195\n9196\n9197\n9198\n9199\n9200\n9201\n9202\n9203\n9204\n9205\n9206\n9207\n9208\n9209\n9210\n9211\n9212\n9213\n9214\n9215\n9216\n9217\n9218\n9219\n9220\n9221\n9222\n9223\n9224\n9225\n9226\n9227\n9228\n9229\n9230\n9231\n9232\n9233\n9234\n9235\n9236\n9237\n9238\n9239\n9240\n9241\n9242\n9243\n9244\n9245\n9246\n9247\n9248\n9249\n9250\n9251\n9252\n9253\n9254\n9255\n9256\n9257\n9258\n9259\n9260\n9261\n9262\n9263\n9264\n9265\n9266\n9267\n9268\n9269\n9270\n9271\n9272\n9273\n9274\n9275\n9276\n9277\n9278\n9279\n9280\n9281\n9282\n9283\n9284\n9285\n9286\n9287\n9288\n9289\n9290\n9291\n9292\n9293\n9294\n9295\n9296\n9297\n9298\n9299\n9300\n9301\n9302\n9303\n9304\n9305\n9306\n9307\n9308\n9309\n9310\n9311\n9312\n9313\n9314\n9315\n9316\n9317\n9318\n9319\n9320\n9321\n9322\n9323\n9324\n9325\n9326\n9327\n9328\n9329\n9330\n9331\n9332\n9333\n9334\n9335\n9336\n9337\n9338\n9339\n9340\n9341\n9342\n9343\n9344\n9345\n9346\n9347\n9348\n9349\n9350\n9351\n9352\n9353\n9354\n9355\n9356\n9357\n9358\n9359\n9360\n9361\n9362\n9363\n9364\n9365\n9366\n9367\n9368\n9369\n9370\n9371\n9372\n9373\n9374\n9375\n9376\n9377\n9378\n9379\n9380\n9381\n9382\n9383\n9384\n9385\n9386\n9387\n9388\n9389\n9390\n9391\n9392\n9393\n9394\n9395\n9396\n9397\n9398\n9399\n9400\n9401\n9402\n9403\n9404\n9405\n9406\n9407\n9408\n9409\n9410\n9411\n9412\n9413\n9414\n9415\n9416\n9417\n9418\n9419\n9420\n9421\n9422\n9423\n9424\n9425\n9426\n9427\n9428\n9429\n9430\n9431\n9432\n9433\n9434\n9435\n9436\n9437\n9438\n9439\n9440\n9441\n9442\n9443\n9444\n9445\n9446\n9447\n9448\n9449\n9450\n9451\n9452\n9453\n9454\n9455\n9456\n9457\n9458\n9459\n9460\n9461\n9462\n9463\n9464\n9465\n9466\n9467\n9468\n9469\n9470\n9471\n9472\n9473\n9474\n9475\n9476\n9477\n9478\n9479\n9480\n9481\n9482\n9483\n9484\n9485\n9486\n9487\n9488\n9489\n9490\n9491\n9492\n9493\n9494\n9495\n9496\n9497\n9498\n9499\n9500\n9501\n9502\n9503\n9504\n9505\n9506\n9507\n9508\n9509\n9510\n9511\n9512\n9513\n9514\n9515\n9516\n9517\n9518\n9519\n9520\n9521\n9522\n9523\n9524\n9525\n9526\n9527\n9528\n9529\n9530\n9531\n9532\n9533\n9534\n9535\n9536\n9537\n9538\n9539\n9540\n9541\n9542\n9543\n9544\n9545\n9546\n9547\n9548\n9549\n9550\n9551\n9552\n9553\n9554\n9555\n9556\n9557\n9558\n9559\n9560\n9561\n9562\n9563\n9564\n9565\n9566\n9567\n9568\n9569\n9570\n9571\n9572\n9573\n9574\n9575\n9576\n9577\n9578\n9579\n9580\n9581\n9582\n9583\n9584\n9585\n9586\n9587\n9588\n9589\n9590\n9591\n9592\n9593\n9594\n9595\n9596\n9597\n9598\n9599\n9600\n9601\n9602\n9603\n9604\n9605\n9606\n9607\n9608\n9609\n9610\n9611\n9612\n9613\n9614\n9615\n9616\n9617\n9618\n9619\n9620\n9621\n9622\n9623\n9624\n9625\n9626\n9627\n9628\n9629\n9630\n9631\n9632\n9633\n9634\n9635\n9636\n9637\n9638\n9639\n9640\n9641\n9642\n9643\n9644\n9645\n9646\n9647\n9648\n9649\n9650\n9651\n9652\n9653\n9654\n9655\n9656\n9657\n9658\n9659\n9660\n9661\n9662\n9663\n9664\n9665\n9666\n9667\n9668\n9669\n9670\n9671\n9672\n9673\n9674\n9675\n9676\n9677\n9678\n9679\n9680\n9681\n9682\n9683\n9684\n9685\n9686\n9687\n9688\n9689\n9690\n9691\n9692\n9693\n9694\n9695\n9696\n9697\n9698\n9699\n9700\n9701\n9702\n9703\n9704\n9705\n9706\n9707\n9708\n9709\n9710\n9711\n9712\n9713\n9714\n9715\n9716\n9717\n9718\n9719\n9720\n9721\n9722\n9723\n9724\n9725\n9726\n9727\n9728\n9729\n9730\n9731\n9732\n9733\n9734\n9735\n9736\n9737\n9738\n9739\n9740\n9741\n9742\n9743\n9744\n9745\n9746\n9747\n9748\n9749\n9750\n9751\n9752\n9753\n9754\n9755\n9756\n9757\n9758\n9759\n9760\n9761\n9762\n9763\n9764\n9765\n9766\n9767\n9768\n9769\n9770\n9771\n9772\n9773\n9774\n9775\n9776\n9777\n9778\n9779\n9780\n9781\n9782\n9783\n9784\n9785\n9786\n9787\n9788\n9789\n9790\n9791\n9792\n9793\n9794\n9795\n9796\n9797\n9798\n9799\n9800\n9801\n9802\n9803\n9804\n9805\n9806\n9807\n9808\n9809\n9810\n9811\n9812\n9813\n9814\n9815\n9816\n9817\n9818\n9819\n9820\n9821\n9822\n9823\n9824\n9825\n9826\n9827\n9828\n9829\n9830\n9831\n9832\n9833\n9834\n9835\n9836\n9837\n9838\n9839\n9840\n9841\n9842\n9843\n9844\n9845\n9846\n9847\n9848\n9849\n9850\n9851\n9852\n9853\n9854\n9855\n9856\n9857\n9858\n9859\n9860\n9861\n9862\n9863\n9864\n9865\n9866\n9867\n9868\n9869\n9870\n9871\n9872\n9873\n9874\n9875\n9876\n9877\n9878\n9879\n9880\n9881\n9882\n9883\n9884\n9885\n9886\n9887\n9888\n9889\n9890\n9891\n9892\n9893\n9894\n9895\n9896\n9897\n9898\n9899\n9900\n9901\n9902\n9903\n9904\n9905\n9906\n9907\n9908\n9909\n9910\n9911\n9912\n9913\n9914\n9915\n9916\n9917\n9918\n9919\n9920\n9921\n9922\n9923\n9924\n9925\n9926\n9927\n9928\n9929\n9930\n9931\n9932\n9933\n9934\n9935\n9936\n9937\n9938\n9939\n9940\n9941\n9942\n9943\n9944\n9945\n9946\n9947\n9948\n9949\n9950\n9951\n9952\n9953\n9954\n9955\n9956\n9957\n9958\n9959\n9960\n9961\n9962\n9963\n9964\n9965\n9966\n9967\n9968\n9969\n9970\n9971\n9972\n9973\n9974\n9975\n9976\n9977\n9978\n9979\n9980\n9981\n9982\n9983\n9984\n9985\n9986\n9987\n9988\n9989\n9990\n9991\n9992\n9993\n9994\n9995\n9996\n9997\n9998\n9999\n10000\n10001\n10002\n10003\n10004\n10005\n10006\n10007\n10008\n10009\n10010\n10011\n10012\n10013\n10014\n10015\n10016\n10017\n10018\n10019\n10020\n10021\n10022\n10023\n10024\n10025\n10026\n10027\n10028\n10029\n10030\n10031\n10032\n10033\n10034\n10035\n10036\n10037\n10038\n10039\n10040\n10041\n10042\n10043\n10044\n10045\n10046\n10047\n10048\n10049\n10050\n10051\n10052\n10053\n10054\n10055\n10056\n10057\n10058\n10059\n10060\n10061\n10062\n10063\n10064\n10065\n10066\n10067\n10068\n10069\n10070\n10071\n10072\n10073\n10074\n10075\n10076\n10077\n10078\n10079\n10080\n10081\n10082\n10083\n10084\n10085\n10086\n10087\n10088\n10089\n10090\n10091\n10092\n10093\n10094\n10095\n10096\n10097\n10098\n10099\n10100\n10101\n10102\n10103\n10104\n10105\n10106\n10107\n10108\n10109\n10110\n10111\n10112\n10113\n10114\n10115\n10116\n10117\n10118\n10119\n10120\n10121\n10122\n10123\n10124\n10125\n10126\n10127\n10128\n10129\n10130\n10131\n10132\n10133\n10134\n10135\n10136\n10137\n10138\n10139\n10140\n10141\n10142\n10143\n10144\n10145\n10146\n10147\n10148\n10149\n10150\n10151\n10152\n10153\n10154\n10155\n10156\n10157\n10158\n10159\n10160\n10161\n10162\n10163\n10164\n10165\n10166\n10167\n10168\n10169\n10170\n10171\n10172\n10173\n10174\n10175\n10176\n10177\n10178\n10179\n10180\n10181\n10182\n10183\n10184\n10185\n10186\n10187\n10188\n10189\n10190\n10191\n10192\n10193\n10194\n10195\n10196\n10197\n10198\n10199\n10200\n10201\n10202\n10203\n10204\n10205\n10206\n10207\n10208\n10209\n10210\n10211\n10212\n10213\n10214\n10215\n10216\n10217\n10218\n10219\n10220\n10221\n10222\n10223\n10224\n10225\n10226\n10227\n10228\n10229\n10230\n10231\n10232\n10233\n10234\n10235\n10236\n10237\n10238\n10239\n10240\n10241\n10242\n10243\n10244\n10245\n10246\n10247\n10248\n10249\n10250\n10251\n10252\n10253\n10254\n10255\n10256\n10257\n10258\n10259\n10260\n10261\n10262\n10263\n10264\n10265\n10266\n10267\n10268\n10269\n10270\n10271\n10272\n10273\n10274\n10275\n10276\n10277\n10278\n10279\n10280\n10281\n10282\n10283\n10284\n10285\n10286\n10287\n10288\n10289\n10290\n10291\n10292\n10293\n10294\n10295\n10296\n10297\n10298\n10299\n10300\n10301\n10302\n10303\n10304\n10305\n10306\n10307\n10308\n10309\n10310\n10311\n10312\n10313\n10314\n10315\n10316\n10317\n10318\n10319\n10320\n10321\n10322\n10323\n10324\n10325\n10326\n10327\n10328\n10329\n10330\n10331\n10332\n10333\n10334\n10335\n10336\n10337\n10338\n10339\n10340\n10341\n10342\n10343\n10344\n10345\n10346\n10347\n10348\n10349\n10350\n10351\n10352\n10353\n10354\n10355\n10356\n10357\n10358\n10359\n10360\n10361\n10362\n10363\n10364\n10365\n10366\n10367\n10368\n10369\n10370\n10371\n10372\n10373\n10374\n10375\n10376\n10377\n10378\n10379\n10380\n10381\n10382\n10383\n10384\n10385\n10386\n10387\n10388\n10389\n10390\n10391\n10392\n10393\n10394\n10395\n10396\n10397\n10398\n10399\n10400\n10401\n10402\n10403\n10404\n10405\n10406\n10407\n10408\n10409\n10410\n10411\n10412\n10413\n10414\n10415\n10416\n10417\n10418\n10419\n10420\n10421\n10422\n10423\n10424\n10425\n10426\n10427\n10428\n10429\n10430\n10431\n10432\n10433\n10434\n10435\n10436\n10437\n10438\n10439\n10440\n10441\n10442\n10443\n10444\n10445\n10446\n10447\n10448\n10449\n10450\n10451\n10452\n10453\n10454\n10455\n10456\n10457\n10458\n10459\n10460\n10461\n10462\n10463\n10464\n10465\n10466\n10467\n10468\n10469\n10470\n10471\n10472\n10473\n10474\n10475\n10476\n10477\n10478\n10479\n10480\n10481\n10482\n10483\n10484\n10485\n10486\n10487\n10488\n10489\n10490\n10491\n10492\n10493\n10494\n10495\n10496\n10497\n10498\n10499\n10500\n10501\n10502\n10503\n10504\n10505\n10506\n10507\n10508\n10509\n10510\n10511\n10512\n10513\n10514\n10515\n10516\n10517\n10518\n10519\n10520\n10521\n10522\n10523\n10524\n10525\n10526\n10527\n10528\n10529\n10530\n10531\n10532\n10533\n10534\n10535\n10536\n10537\n10538\n10539\n10540\n10541\n10542\n10543\n10544\n10545\n10546\n10547\n10548\n10549\n10550\n10551\n10552\n10553\n10554\n10555\n10556\n10557\n10558\n10559\n10560\n10561\n10562\n10563\n10564\n10565\n10566\n10567\n10568\n10569\n10570\n10571\n10572\n10573\n10574\n10575\n10576\n10577\n10578\n10579\n10580\n10581\n10582\n10583\n10584\n10585\n10586\n10587\n10588\n10589\n10590\n10591\n10592\n10593\n10594\n10595\n10596\n10597\n10598\n10599\n10600\n10601\n10602\n10603\n10604\n10605\n10606\n10607\n10608\n10609\n10610\n10611\n10612\n10613\n10614\n10615\n10616\n10617\n10618\n10619\n10620\n10621\n10622\n10623\n10624\n10625\n10626\n10627\n10628\n10629\n10630\n10631\n10632\n10633\n10634\n10635\n10636\n10637\n10638\n10639\n10640\n10641\n10642\n10643\n10644\n10645\n10646\n10647\n10648\n10649\n10650\n10651\n10652\n10653\n10654\n10655\n10656\n10657\n10658\n10659\n10660\n10661\n10662\n10663\n10664\n10665\n10666\n10667\n10668\n10669\n10670\n10671\n10672\n10673\n10674\n10675\n10676\n10677\n10678\n10679\n10680\n10681\n10682\n10683\n10684\n10685\n10686\n10687\n10688\n10689\n10690\n10691\n10692\n10693\n10694\n10695\n10696\n10697\n10698\n10699\n10700\n10701\n10702\n10703\n10704\n10705\n10706\n10707\n10708\n10709\n10710\n10711\n10712\n10713\n10714\n10715\n10716\n10717\n10718\n10719\n10720\n10721\n10722\n10723\n10724\n10725\n10726\n10727\n10728\n10729\n10730\n10731\n10732\n10733\n10734\n10735\n10736\n10737\n10738\n10739\n10740\n10741\n10742\n10743\n10744\n10745\n10746\n10747\n10748\n10749\n10750\n10751\n10752\n10753\n10754\n10755\n10756\n10757\n10758\n10759\n10760\n10761\n10762\n10763\n10764\n10765\n10766\n10767\n10768\n10769\n10770\n10771\n10772\n10773\n10774\n10775\n10776\n10777\n10778\n10779\n10780\n10781\n10782\n10783\n10784\n10785\n10786\n10787\n10788\n10789\n10790\n10791\n10792\n10793\n10794\n10795\n10796\n10797\n10798\n10799\n10800\n10801\n10802\n10803\n10804\n10805\n10806\n10807\n10808\n10809\n10810\n10811\n10812\n10813\n10814\n10815\n10816\n10817\n10818\n10819\n10820\n10821\n10822\n10823\n10824\n10825\n10826\n10827\n10828\n10829\n10830\n10831\n10832\n10833\n10834\n10835\n10836\n10837\n10838\n10839\n10840\n10841\n10842\n10843\n10844\n10845\n10846\n10847\n10848\n10849\n10850\n10851\n10852\n10853\n10854\n10855\n10856\n10857\n10858\n10859\n10860\n10861\n10862\n10863\n10864\n10865\n10866\n10867\n10868\n10869\n10870\n10871\n10872\n10873\n10874\n10875\n10876\n10877\n10878\n10879\n10880\n10881\n10882\n10883\n10884\n10885\n10886\n10887\n10888\n10889\n10890\n10891\n10892\n10893\n10894\n10895\n10896\n10897\n10898\n10899\n10900\n10901\n10902\n10903\n10904\n10905\n10906\n10907\n10908\n10909\n10910\n10911\n10912\n10913\n10914\n10915\n10916\n10917\n10918\n10919\n10920\n10921\n10922\n10923\n10924\n10925\n10926\n10927\n10928\n10929\n10930\n10931\n10932\n10933\n10934\n10935\n10936\n10937\n10938\n10939\n10940\n10941\n10942\n10943\n10944\n10945\n10946\n10947\n10948\n10949\n10950\n10951\n10952\n10953\n10954\n10955\n10956\n10957\n10958\n10959\n10960\n10961\n10962\n10963\n10964\n10965\n10966\n10967\n10968\n10969\n10970\n10971\n10972\n10973\n10974\n10975\n10976\n10977\n10978\n10979\n10980\n10981\n10982\n10983\n10984\n10985\n10986\n10987\n10988\n10989\n10990\n10991\n10992\n10993\n10994\n10995\n10996\n10997\n10998\n10999\n11000\n11001\n11002\n11003\n11004\n11005\n11006\n11007\n11008\n11009\n11010\n11011\n11012\n11013\n11014\n11015\n11016\n11017\n11018\n11019\n11020\n11021\n11022\n11023\n11024\n11025\n11026\n11027\n11028\n11029\n11030\n11031\n11032\n11033\n11034\n11035\n11036\n11037\n11038\n11039\n11040\n11041\n11042\n11043\n11044\n11045\n11046\n11047\n11048\n11049\n11050\n11051\n11052\n11053\n11054\n11055\n11056\n11057\n11058\n11059\n11060\n11061\n11062\n11063\n11064\n11065\n11066\n11067\n11068\n11069\n11070\n11071\n11072\n11073\n11074\n11075\n11076\n11077\n11078\n11079\n11080\n11081\n11082\n11083\n11084\n11085\n11086\n11087\n11088\n11089\n11090\n11091\n11092\n11093\n11094\n11095\n11096\n11097\n11098\n11099\n11100\n11101\n11102\n11103\n11104\n11105\n11106\n11107\n11108\n11109\n11110\n11111\n11112\n11113\n11114\n11115\n11116\n11117\n11118\n11119\n11120\n11121\n11122\n11123\n11124\n11125\n11126\n11127\n11128\n11129\n11130\n11131\n11132\n11133\n11134\n11135\n11136\n11137\n11138\n11139\n11140\n11141\n11142\n11143\n11144\n11145\n11146\n11147\n11148\n11149\n11150\n11151\n11152\n11153\n11154\n11155\n11156\n11157\n11158\n11159\n11160\n11161\n11162\n11163\n11164\n11165\n11166\n11167\n11168\n11169\n11170\n11171\n11172\n11173\n11174\n11175\n11176\n11177\n11178\n11179\n11180\n11181\n11182\n11183\n11184\n11185\n11186\n11187\n11188\n11189\n11190\n11191\n11192\n11193\n11194\n11195\n11196\n11197\n11198\n11199\n11200\n11201\n11202\n11203\n11204\n11205\n11206\n11207\n11208\n11209\n11210\n11211\n11212\n11213\n11214\n11215\n11216\n11217\n11218\n11219\n11220\n11221\n11222\n11223\n11224\n11225\n11226\n11227\n11228\n11229\n11230\n11231\n11232\n11233\n11234\n11235\n11236\n11237\n11238\n11239\n11240\n11241\n11242\n11243\n11244\n11245\n11246\n11247\n11248\n11249\n11250\n11251\n11252\n11253\n11254\n11255\n11256\n11257\n11258\n11259\n11260\n11261\n11262\n11263\n11264\n11265\n11266\n11267\n11268\n11269\n11270\n11271\n11272\n11273\n11274\n11275\n11276\n11277\n11278\n11279\n11280\n11281\n11282\n11283\n11284\n11285\n11286\n11287\n11288\n11289\n11290\n11291\n11292\n11293\n11294\n11295\n11296\n11297\n11298\n11299\n11300\n11301\n11302\n11303\n11304\n11305\n11306\n11307\n11308\n11309\n11310\n11311\n11312\n11313\n11314\n11315\n11316\n11317\n11318\n11319\n11320\n11321\n11322\n11323\n11324\n11325\n11326\n11327\n11328\n11329\n11330\n11331\n11332\n11333\n11334\n11335\n11336\n11337\n11338\n11339\n11340\n11341\n11342\n11343\n11344\n11345\n11346\n11347\n11348\n11349\n11350\n11351\n11352\n11353\n11354\n11355\n11356\n11357\n11358\n11359\n11360\n11361\n11362\n11363\n11364\n11365\n11366\n11367\n11368\n11369\n11370\n11371\n11372\n11373\n11374\n11375\n11376\n11377\n11378\n11379\n11380\n11381\n11382\n11383\n11384\n11385\n11386\n11387\n11388\n11389\n11390\n11391\n11392\n11393\n11394\n11395\n11396\n11397\n11398\n11399\n11400\n11401\n11402\n11403\n11404\n11405\n11406\n11407\n11408\n11409\n11410\n11411\n11412\n11413\n11414\n11415\n11416\n11417\n11418\n11419\n11420\n11421\n11422\n11423\n11424\n11425\n11426\n11427\n11428\n11429\n11430\n11431\n11432\n11433\n11434\n11435\n11436\n11437\n11438\n11439\n11440\n11441\n11442\n11443\n11444\n11445\n11446\n11447\n11448\n11449\n11450\n11451\n11452\n11453\n11454\n11455\n11456\n11457\n11458\n11459\n11460\n11461\n11462\n11463\n11464\n11465\n11466\n11467\n11468\n11469\n11470\n11471\n11472\n11473\n11474\n11475\n11476\n11477\n11478\n11479\n11480\n11481\n11482\n11483\n11484\n11485\n11486\n11487\n11488\n11489\n11490\n11491\n11492\n11493\n11494\n11495\n11496\n11497\n11498\n11499\n11500\n11501\n11502\n11503\n11504\n11505\n11506\n11507\n11508\n11509\n11510\n11511\n11512\n11513\n11514\n11515\n11516\n11517\n11518\n11519\n11520\n11521\n11522\n11523\n11524\n11525\n11526\n11527\n11528\n11529\n11530\n11531\n11532\n11533\n11534\n11535\n11536\n11537\n11538\n11539\n11540\n11541\n11542\n11543\n11544\n11545\n11546\n11547\n11548\n11549\n11550\n11551\n11552\n11553\n11554\n11555\n11556\n11557\n11558\n11559\n11560\n11561\n11562\n11563\n11564\n11565\n11566\n11567\n11568\n11569\n11570\n11571\n11572\n11573\n11574\n11575\n11576\n11577\n11578\n11579\n11580\n11581\n11582\n11583\n11584\n11585\n11586\n11587\n11588\n11589\n11590\n11591\n11592\n11593\n11594\n11595\n11596\n11597\n11598\n11599\n11600\n11601\n11602\n11603\n11604\n11605\n11606\n11607\n11608\n11609\n11610\n11611\n11612\n11613\n11614\n11615\n11616\n11617\n11618\n11619\n11620\n11621\n11622\n11623\n11624\n11625\n11626\n11627\n11628\n11629\n11630\n11631\n11632\n11633\n11634\n11635\n11636\n11637\n11638\n11639\n11640\n11641\n11642\n11643\n11644\n11645\n11646\n11647\n11648\n11649\n11650\n11651\n11652\n11653\n11654\n11655\n11656\n11657\n11658\n11659\n11660\n11661\n11662\n11663\n11664\n11665\n11666\n11667\n11668\n11669\n11670\n11671\n11672\n11673\n11674\n11675\n11676\n11677\n11678\n11679\n11680\n11681\n11682\n11683\n11684\n11685\n11686\n11687\n11688\n11689\n11690\n11691\n11692\n11693\n11694\n11695\n11696\n11697\n11698\n11699\n11700\n11701\n11702\n11703\n11704\n11705\n11706\n11707\n11708\n11709\n11710\n11711\n11712\n11713\n11714\n11715\n11716\n11717\n11718\n11719\n11720\n11721\n11722\n11723\n11724\n11725\n11726\n11727\n11728\n11729\n11730\n11731\n11732\n11733\n11734\n11735\n11736\n11737\n11738\n11739\n11740\n11741\n11742\n11743\n11744\n11745\n11746\n11747\n11748\n11749\n11750\n11751\n11752\n11753\n11754\n11755\n11756\n11757\n11758\n11759\n11760\n11761\n11762\n11763\n11764\n11765\n11766\n11767\n11768\n11769\n11770\n11771\n11772\n11773\n11774\n11775\n11776\n11777\n11778\n11779\n11780\n11781\n11782\n11783\n11784\n11785\n11786\n11787\n11788\n11789\n11790\n11791\n11792\n11793\n11794\n11795\n11796\n11797\n11798\n11799\n11800\n11801\n11802\n11803\n11804\n11805\n11806\n11807\n11808\n11809\n11810\n11811\n11812\n11813\n11814\n11815\n11816\n11817\n11818\n11819\n11820\n11821\n11822\n11823\n11824\n11825\n11826\n11827\n11828\n11829\n11830\n11831\n11832\n11833\n11834\n11835\n11836\n11837\n11838\n11839\n11840\n11841\n11842\n11843\n11844\n11845\n11846\n11847\n11848\n11849\n11850\n11851\n11852\n11853\n11854\n11855\n11856\n11857\n11858\n11859\n11860\n11861\n11862\n11863\n11864\n11865\n11866\n11867\n11868\n11869\n11870\n11871\n11872\n11873\n11874\n11875\n11876\n11877\n11878\n11879\n11880\n11881\n11882\n11883\n11884\n11885\n11886\n11887\n11888\n11889\n11890\n11891\n11892\n11893\n11894\n11895\n11896\n11897\n11898\n11899\n11900\n11901\n11902\n11903\n11904\n11905\n11906\n11907\n11908\n11909\n11910\n11911\n11912\n11913\n11914\n11915\n11916\n11917\n11918\n11919\n11920\n11921\n11922\n11923\n11924\n11925\n11926\n11927\n11928\n11929\n11930\n11931\n11932\n11933\n11934\n11935\n11936\n11937\n11938\n11939\n11940\n11941\n11942\n11943\n11944\n11945\n11946\n11947\n11948\n11949\n11950\n11951\n11952\n11953\n11954\n11955\n11956\n11957\n11958\n11959\n11960\n11961\n11962\n11963\n11964\n11965\n11966\n11967\n11968\n11969\n11970\n11971\n11972\n11973\n11974\n11975\n11976\n11977\n11978\n11979\n11980\n11981\n11982\n11983\n11984\n11985\n11986\n11987\n11988\n11989\n11990\n11991\n11992\n11993\n11994\n11995\n11996\n11997\n11998\n11999\n12000\n12001\n12002\n12003\n12004\n12005\n12006\n12007\n12008\n12009\n12010\n12011\n12012\n12013\n12014\n12015\n12016\n12017\n12018\n12019\n12020\n12021\n12022\n12023\n12024\n12025\n12026\n12027\n12028\n12029\n12030\n12031\n12032\n12033\n12034\n12035\n12036\n12037\n12038\n12039\n12040\n12041\n12042\n12043\n12044\n12045\n12046\n12047\n12048\n12049\n12050\n12051\n12052\n12053\n12054\n12055\n12056\n12057\n12058\n12059\n12060\n12061\n12062\n12063\n12064\n12065\n12066\n12067\n12068\n12069\n12070\n12071\n12072\n12073\n12074\n12075\n12076\n12077\n12078\n12079\n12080\n12081\n12082\n12083\n12084\n12085\n12086\n12087\n12088\n12089\n12090\n12091\n12092\n12093\n12094\n12095\n12096\n12097\n12098\n12099\n12100\n12101\n12102\n12103\n12104\n12105\n12106\n12107\n12108\n12109\n12110\n12111\n12112\n12113\n12114\n12115\n12116\n12117\n12118\n12119\n12120\n12121\n12122\n12123\n12124\n12125\n12126\n12127\n12128\n12129\n12130\n12131\n12132\n12133\n12134\n12135\n12136\n12137\n12138\n12139\n12140\n12141\n12142\n12143\n12144\n12145\n12146\n12147\n12148\n12149\n12150\n12151\n12152\n12153\n12154\n12155\n12156\n12157\n12158\n12159\n12160\n12161\n12162\n12163\n12164\n12165\n12166\n12167\n12168\n12169\n12170\n12171\n12172\n12173\n12174\n12175\n12176\n12177\n12178\n12179\n12180\n12181\n12182\n12183\n12184\n12185\n12186\n12187\n12188\n12189\n12190\n12191\n12192\n12193\n12194\n12195\n12196\n12197\n12198\n12199\n12200\n12201\n12202\n12203\n12204\n12205\n12206\n12207\n12208\n12209\n12210\n12211\n12212\n12213\n12214\n12215\n12216\n12217\n12218\n12219\n12220\n12221\n12222\n12223\n12224\n12225\n12226\n12227\n12228\n12229\n12230\n12231\n12232\n12233\n12234\n12235\n12236\n12237\n12238\n12239\n12240\n12241\n12242\n12243\n12244\n12245\n12246\n12247\n12248\n12249\n12250\n12251\n12252\n12253\n12254\n12255\n12256\n12257\n12258\n12259\n12260\n12261\n12262\n12263\n12264\n12265\n12266\n12267\n12268\n12269\n12270\n12271\n12272\n12273\n12274\n12275\n12276\n12277\n12278\n12279\n12280\n12281\n12282\n12283\n12284\n12285\n12286\n12287\n12288\n12289\n12290\n12291\n12292\n12293\n12294\n12295\n12296\n12297\n12298\n12299\n12300\n12301\n12302\n12303\n12304\n12305\n12306\n12307\n12308\n12309\n12310\n12311\n12312\n12313\n12314\n12315\n12316\n12317\n12318\n12319\n12320\n12321\n12322\n12323\n12324\n12325\n12326\n12327\n12328\n12329\n12330\n12331\n12332\n12333\n12334\n12335\n12336\n12337\n12338\n12339\n12340\n12341\n12342\n12343\n12344\n12345\n12346\n12347\n12348\n12349\n12350\n12351\n12352\n12353\n12354\n12355\n12356\n12357\n12358\n12359\n12360\n12361\n12362\n12363\n12364\n12365\n12366\n12367\n12368\n12369\n12370\n12371\n12372\n12373\n12374\n12375\n12376\n12377\n12378\n12379\n12380\n12381\n12382\n12383\n12384\n12385\n12386\n12387\n12388\n12389\n12390\n12391\n12392\n12393\n12394\n12395\n12396\n12397\n12398\n12399\n12400\n12401\n12402\n12403\n12404\n12405\n12406\n12407\n12408\n12409\n12410\n12411\n12412\n12413\n12414\n12415\n12416\n12417\n12418\n12419\n12420\n12421\n12422\n12423\n12424\n12425\n12426\n12427\n12428\n12429\n12430\n12431\n12432\n12433\n12434\n12435\n12436\n12437\n12438\n12439\n12440\n12441\n12442\n12443\n12444\n12445\n12446\n12447\n12448\n12449\n12450\n12451\n12452\n12453\n12454\n12455\n12456\n12457\n12458\n12459\n12460\n12461\n12462\n12463\n12464\n12465\n12466\n12467\n12468\n12469\n12470\n12471\n12472\n12473\n12474\n12475\n12476\n12477\n12478\n12479\n12480\n12481\n12482\n12483\n12484\n12485\n12486\n12487\n12488\n12489\n12490\n12491\n12492\n12493\n12494\n12495\n12496\n12497\n12498\n12499\n12500\n12501\n12502\n12503\n12504\n12505\n12506\n12507\n12508\n12509\n12510\n12511\n12512\n12513\n12514\n12515\n12516\n12517\n12518\n12519\n12520\n12521\n12522\n12523\n12524\n12525\n12526\n12527\n12528\n12529\n12530\n12531\n12532\n12533\n12534\n12535\n12536\n12537\n12538\n12539\n12540\n12541\n12542\n12543\n12544\n12545\n12546\n12547\n12548\n12549\n12550\n12551\n12552\n12553\n12554\n12555\n12556\n12557\n12558\n12559\n12560\n12561\n12562\n12563\n12564\n12565\n12566\n12567\n12568\n12569\n12570\n12571\n12572\n12573\n12574\n12575\n12576\n12577\n12578\n12579\n12580\n12581\n12582\n12583\n12584\n12585\n12586\n12587\n12588\n12589\n12590\n12591\n12592\n12593\n12594\n12595\n12596\n12597\n12598\n12599\n12600\n12601\n12602\n12603\n12604\n12605\n12606\n12607\n12608\n12609\n12610\n12611\n12612\n12613\n12614\n12615\n12616\n12617\n12618\n12619\n12620\n12621\n12622\n12623\n12624\n12625\n12626\n12627\n12628\n12629\n12630\n12631\n12632\n12633\n12634\n12635\n12636\n12637\n12638\n12639\n12640\n12641\n12642\n12643\n12644\n12645\n12646\n12647\n12648\n12649\n12650\n12651\n12652\n12653\n12654\n12655\n12656\n12657\n12658\n12659\n12660\n12661\n12662\n12663\n12664\n12665\n12666\n12667\n12668\n12669\n12670\n12671\n12672\n12673\n12674\n12675\n12676\n12677\n12678\n12679\n12680\n12681\n12682\n12683\n12684\n12685\n12686\n12687\n12688\n12689\n12690\n12691\n12692\n12693\n12694\n12695\n12696\n12697\n12698\n12699\n12700\n12701\n12702\n12703\n12704\n12705\n12706\n12707\n12708\n12709\n12710\n12711\n12712\n12713\n12714\n12715\n12716\n12717\n12718\n12719\n12720\n12721\n12722\n12723\n12724\n12725\n12726\n12727\n12728\n12729\n12730\n12731\n12732\n12733\n12734\n12735\n12736\n12737\n12738\n12739\n12740\n12741\n12742\n12743\n12744\n12745\n12746\n12747\n12748\n12749\n12750\n12751\n12752\n12753\n12754\n12755\n12756\n12757\n12758\n12759\n12760\n12761\n12762\n12763\n12764\n12765\n12766\n12767\n12768\n12769\n12770\n12771\n12772\n12773\n12774\n12775\n12776\n12777\n12778\n12779\n12780\n12781\n12782\n12783\n12784\n12785\n12786\n12787\n12788\n12789\n12790\n12791\n12792\n12793\n12794\n12795\n12796\n12797\n12798\n12799\n12800\n12801\n12802\n12803\n12804\n12805\n12806\n12807\n12808\n12809\n12810\n12811\n12812\n12813\n12814\n12815\n12816\n12817\n12818\n12819\n12820\n12821\n12822\n12823\n12824\n12825\n12826\n12827\n12828\n12829\n12830\n12831\n12832\n12833\n12834\n12835\n12836\n12837\n12838\n12839\n12840\n12841\n12842\n12843\n12844\n12845\n12846\n12847\n12848\n12849\n12850\n12851\n12852\n12853\n12854\n12855\n12856\n12857\n12858\n12859\n12860\n12861\n12862\n12863\n12864\n12865\n12866\n12867\n12868\n12869\n12870\n12871\n12872\n12873\n12874\n12875\n12876\n12877\n12878\n12879\n12880\n12881\n12882\n12883\n12884\n12885\n12886\n12887\n12888\n12889\n12890\n12891\n12892\n12893\n12894\n12895\n12896\n12897\n12898\n12899\n12900\n12901\n12902\n12903\n12904\n12905\n12906\n12907\n12908\n12909\n12910\n12911\n12912\n12913\n12914\n12915\n12916\n12917\n12918\n12919\n12920\n12921\n12922\n12923\n12924\n12925\n12926\n12927\n12928\n12929\n12930\n12931\n12932\n12933\n12934\n12935\n12936\n12937\n12938\n12939\n12940\n12941\n12942\n12943\n12944\n12945\n12946\n12947\n12948\n12949\n12950\n12951\n12952\n12953\n12954\n12955\n12956\n12957\n12958\n12959\n12960\n12961\n12962\n12963\n12964\n12965\n12966\n12967\n12968\n12969\n12970\n12971\n12972\n12973\n12974\n12975\n12976\n12977\n12978\n12979\n12980\n12981\n12982\n12983\n12984\n12985\n12986\n12987\n12988\n12989\n12990\n12991\n12992\n12993\n12994\n12995\n12996\n12997\n12998\n12999\n13000\n13001\n13002\n13003\n13004\n13005\n13006\n13007\n13008\n13009\n13010\n13011\n13012\n13013\n13014\n13015\n13016\n13017\n13018\n13019\n13020\n13021\n13022\n13023\n13024\n13025\n13026\n13027\n13028\n13029\n13030\n13031\n13032\n13033\n13034\n13035\n13036\n13037\n13038\n13039\n13040\n13041\n13042\n13043\n13044\n13045\n13046\n13047\n13048\n13049\n13050\n13051\n13052\n13053\n13054\n13055\n13056\n13057\n13058\n13059\n13060\n13061\n13062\n13063\n13064\n13065\n13066\n13067\n13068\n13069\n13070\n13071\n13072\n13073\n13074\n13075\n13076\n13077\n13078\n13079\n13080\n13081\n13082\n13083\n13084\n13085\n13086\n13087\n13088\n13089\n13090\n13091\n13092\n13093\n13094\n13095\n13096\n13097\n13098\n13099\n13100\n13101\n13102\n13103\n13104\n13105\n13106\n13107\n13108\n13109\n13110\n13111\n13112\n13113\n13114\n13115\n13116\n13117\n13118\n13119\n13120\n13121\n13122\n13123\n13124\n13125\n13126\n13127\n13128\n13129\n13130\n13131\n13132\n13133\n13134\n13135\n13136\n13137\n13138\n13139\n13140\n13141\n13142\n13143\n13144\n13145\n13146\n13147\n13148\n13149\n13150\n13151\n13152\n13153\n13154\n13155\n13156\n13157\n13158\n13159\n13160\n13161\n13162\n13163\n13164\n13165\n13166\n13167\n13168\n13169\n13170\n13171\n13172\n13173\n13174\n13175\n13176\n13177\n13178\n13179\n13180\n13181\n13182\n13183\n13184\n13185\n13186\n13187\n13188\n13189\n13190\n13191\n13192\n13193\n13194\n13195\n13196\n13197\n13198\n13199\n13200\n13201\n13202\n13203\n13204\n13205\n13206\n13207\n13208\n13209\n13210\n13211\n13212\n13213\n13214\n13215\n13216\n13217\n13218\n13219\n13220\n13221\n13222\n13223\n13224\n13225\n13226\n13227\n13228\n13229\n13230\n13231\n13232\n13233\n13234\n13235\n13236\n13237\n13238\n13239\n13240\n13241\n13242\n13243\n13244\n13245\n13246\n13247\n13248\n13249\n13250\n13251\n13252\n13253\n13254\n13255\n13256\n13257\n13258\n13259\n13260\n13261\n13262\n13263\n13264\n13265\n13266\n13267\n13268\n13269\n13270\n13271\n13272\n13273\n13274\n13275\n13276\n13277\n13278\n13279\n13280\n13281\n13282\n13283\n13284\n13285\n13286\n13287\n13288\n13289\n13290\n13291\n13292\n13293\n13294\n13295\n13296\n13297\n13298\n13299\n13300\n13301\n13302\n13303\n13304\n13305\n13306\n13307\n13308\n13309\n13310\n13311\n13312\n13313\n13314\n13315\n13316\n13317\n13318\n13319\n13320\n13321\n13322\n13323\n13324\n13325\n13326\n13327\n13328\n13329\n13330\n13331\n13332\n13333\n13334\n13335\n13336\n13337\n13338\n13339\n13340\n13341\n13342\n13343\n13344\n13345\n13346\n13347\n13348\n13349\n13350\n13351\n13352\n13353\n13354\n13355\n13356\n13357\n13358\n13359\n13360\n13361\n13362\n13363\n13364\n13365\n13366\n13367\n13368\n13369\n13370\n13371\n13372\n13373\n13374\n13375\n13376\n13377\n13378\n13379\n13380\n13381\n13382\n13383\n13384\n13385\n13386\n13387\n13388\n13389\n13390\n13391\n13392\n13393\n13394\n13395\n13396\n13397\n13398\n13399\n13400\n13401\n13402\n13403\n13404\n13405\n13406\n13407\n13408\n13409\n13410\n13411\n13412\n13413\n13414\n13415\n13416\n13417\n13418\n13419\n13420\n13421\n13422\n13423\n13424\n13425\n13426\n13427\n13428\n13429\n13430\n13431\n13432\n13433\n13434\n13435\n13436\n13437\n13438\n13439\n13440\n13441\n13442\n13443\n13444\n13445\n13446\n13447\n13448\n13449\n13450\n13451\n13452\n13453\n13454\n13455\n13456\n13457\n13458\n13459\n13460\n13461\n13462\n13463\n13464\n13465\n13466\n13467\n13468\n13469\n13470\n13471\n13472\n13473\n13474\n13475\n13476\n13477\n13478\n13479\n13480\n13481\n13482\n13483\n13484\n13485\n13486\n13487\n13488\n13489\n13490\n13491\n13492\n13493\n13494\n13495\n13496\n13497\n13498\n13499\n13500\n13501\n13502\n13503\n13504\n13505\n13506\n13507\n13508\n13509\n13510\n13511\n13512\n13513\n13514\n13515\n13516\n13517\n13518\n13519\n13520\n13521\n13522\n13523\n13524\n13525\n13526\n13527\n13528\n13529\n13530\n13531\n13532\n13533\n13534\n13535\n13536\n13537\n13538\n13539\n13540\n13541\n13542\n13543\n13544\n13545\n13546\n13547\n13548\n13549\n13550\n13551\n13552\n13553\n13554\n13555\n13556\n13557\n13558\n13559\n13560\n13561\n13562\n13563\n13564\n13565\n13566\n13567\n13568\n13569\n13570\n13571\n13572\n13573\n13574\n13575\n13576\n13577\n13578\n13579\n13580\n13581\n13582\n13583\n13584\n13585\n13586\n13587\n13588\n13589\n13590\n13591\n13592\n13593\n13594\n13595\n13596\n13597\n13598\n13599\n13600\n13601\n13602\n13603\n13604\n13605\n13606\n13607\n13608\n13609\n13610\n13611\n13612\n13613\n13614\n13615\n13616\n13617\n13618\n13619\n13620\n13621\n13622\n13623\n13624\n13625\n13626\n13627\n13628\n13629\n13630\n13631\n13632\n13633\n13634\n13635\n13636\n13637\n13638\n13639\n13640\n13641\n13642\n13643\n13644\n13645\n13646\n13647\n13648\n13649\n13650\n13651\n13652\n13653\n13654\n13655\n13656\n13657\n13658\n13659\n13660\n13661\n13662\n13663\n13664\n13665\n13666\n13667\n13668\n13669\n13670\n13671\n13672\n13673\n13674\n13675\n13676\n13677\n13678\n13679\n13680\n13681\n13682\n13683\n13684\n13685\n13686\n13687\n13688\n13689\n13690\n13691\n13692\n13693\n13694\n13695\n13696\n13697\n13698\n13699\n13700\n13701\n13702\n13703\n13704\n13705\n13706\n13707\n13708\n13709\n13710\n13711\n13712\n13713\n13714\n13715\n13716\n13717\n13718\n13719\n13720\n13721\n13722\n13723\n13724\n13725\n13726\n13727\n13728\n13729\n13730\n13731\n13732\n13733\n13734\n13735\n13736\n13737\n13738\n13739\n13740\n13741\n13742\n13743\n13744\n13745\n13746\n13747\n13748\n13749\n13750\n13751\n13752\n13753\n13754\n13755\n13756\n13757\n13758\n13759\n13760\n13761\n13762\n13763\n13764\n13765\n13766\n13767\n13768\n13769\n13770\n13771\n13772\n13773\n13774\n13775\n13776\n13777\n13778\n13779\n13780\n13781\n13782\n13783\n13784\n13785\n13786\n13787\n13788\n13789\n13790\n13791\n13792\n13793\n13794\n13795\n13796\n13797\n13798\n13799\n13800\n13801\n13802\n13803\n13804\n13805\n13806\n13807\n13808\n13809\n13810\n13811\n13812\n13813\n13814\n13815\n13816\n13817\n13818\n13819\n13820\n13821\n13822\n13823\n13824\n13825\n13826\n13827\n13828\n13829\n13830\n13831\n13832\n13833\n13834\n13835\n13836\n13837\n13838\n13839\n13840\n13841\n13842\n13843\n13844\n13845\n13846\n13847\n13848\n13849\n13850\n13851\n13852\n13853\n13854\n13855\n13856\n13857\n13858\n13859\n13860\n13861\n13862\n13863\n13864\n13865\n13866\n13867\n13868\n13869\n13870\n13871\n13872\n13873\n13874\n13875\n13876\n13877\n13878\n13879\n13880\n13881\n13882\n13883\n13884\n13885\n13886\n13887\n13888\n13889\n13890\n13891\n13892\n13893\n13894\n13895\n13896\n13897\n13898\n13899\n13900\n13901\n13902\n13903\n13904\n13905\n13906\n13907\n13908\n13909\n13910\n13911\n13912\n13913\n13914\n13915\n13916\n13917\n13918\n13919\n13920\n13921\n13922\n13923\n13924\n13925\n13926\n13927\n13928\n13929\n13930\n13931\n13932\n13933\n13934\n13935\n13936\n13937\n13938\n13939\n13940\n13941\n13942\n13943\n13944\n13945\n13946\n13947\n13948\n13949\n13950\n13951\n13952\n13953\n13954\n13955\n13956\n13957\n13958\n13959\n13960\n13961\n13962\n13963\n13964\n13965\n13966\n13967\n13968\n13969\n13970\n13971\n13972\n13973\n13974\n13975\n13976\n13977\n13978\n13979\n13980\n13981\n13982\n13983\n13984\n13985\n13986\n13987\n13988\n13989\n13990\n13991\n13992\n13993\n13994\n13995\n13996\n13997\n13998\n13999\n14000\n14001\n14002\n14003\n14004\n14005\n14006\n14007\n14008\n14009\n14010\n14011\n14012\n14013\n14014\n14015\n14016\n14017\n14018\n14019\n14020\n14021\n14022\n14023\n14024\n14025\n14026\n14027\n14028\n14029\n14030\n14031\n14032\n14033\n14034\n14035\n14036\n14037\n14038\n14039\n14040\n14041\n14042\n14043\n14044\n14045\n14046\n14047\n14048\n14049\n14050\n14051\n14052\n14053\n14054\n14055\n14056\n14057\n14058\n14059\n14060\n14061\n14062\n14063\n14064\n14065\n14066\n14067\n14068\n14069\n14070\n14071\n14072\n14073\n14074\n14075\n14076\n14077\n14078\n14079\n14080\n14081\n14082\n14083\n14084\n14085\n14086\n14087\n14088\n14089\n14090\n14091\n14092\n14093\n14094\n14095\n14096\n14097\n14098\n14099\n14100\n14101\n14102\n14103\n14104\n14105\n14106\n14107\n14108\n14109\n14110\n14111\n14112\n14113\n14114\n14115\n14116\n14117\n14118\n14119\n14120\n14121\n14122\n14123\n14124\n14125\n14126\n14127\n14128\n14129\n14130\n14131\n14132\n14133\n14134\n14135\n14136\n14137\n14138\n14139\n14140\n14141\n14142\n14143\n14144\n14145\n14146\n14147\n14148\n14149\n14150\n14151\n14152\n14153\n14154\n14155\n14156\n14157\n14158\n14159\n14160\n14161\n14162\n14163\n14164\n14165\n14166\n14167\n14168\n14169\n14170\n14171\n14172\n14173\n14174\n14175\n14176\n14177\n14178\n14179\n14180\n14181\n14182\n14183\n14184\n14185\n14186\n14187\n14188\n14189\n14190\n14191\n14192\n14193\n14194\n14195\n14196\n14197\n14198\n14199\n14200\n14201\n14202\n14203\n14204\n14205\n14206\n14207\n14208\n14209\n14210\n14211\n14212\n14213\n14214\n14215\n14216\n14217\n14218\n14219\n14220\n14221\n14222\n14223\n14224\n14225\n14226\n14227\n14228\n14229\n14230\n14231\n14232\n14233\n14234\n14235\n14236\n14237\n14238\n14239\n14240\n14241\n14242\n14243\n14244\n14245\n14246\n14247\n14248\n14249\n14250\n14251\n14252\n14253\n14254\n14255\n14256\n14257\n14258\n14259\n14260\n14261\n14262\n14263\n14264\n14265\n14266\n14267\n14268\n14269\n14270\n14271\n14272\n14273\n14274\n14275\n14276\n14277\n14278\n14279\n14280\n14281\n14282\n14283\n14284\n14285\n14286\n14287\n14288\n14289\n14290\n14291\n14292\n14293\n14294\n14295\n14296\n14297\n14298\n14299\n14300\n14301\n14302\n14303\n14304\n14305\n14306\n14307\n14308\n14309\n14310\n14311\n14312\n14313\n14314\n14315\n14316\n14317\n14318\n14319\n14320\n14321\n14322\n14323\n14324\n14325\n14326\n14327\n14328\n14329\n14330\n14331\n14332\n14333\n14334\n14335\n14336\n14337\n14338\n14339\n14340\n14341\n14342\n14343\n14344\n14345\n14346\n14347\n14348\n14349\n14350\n14351\n14352\n14353\n14354\n14355\n14356\n14357\n14358\n14359\n14360\n14361\n14362\n14363\n14364\n14365\n14366\n14367\n14368\n14369\n14370\n14371\n14372\n14373\n14374\n14375\n14376\n14377\n14378\n14379\n14380\n14381\n14382\n14383\n14384\n14385\n14386\n14387\n14388\n14389\n14390\n14391\n14392\n14393\n14394\n14395\n14396\n14397\n14398\n14399\n14400\n14401\n14402\n14403\n14404\n14405\n14406\n14407\n14408\n14409\n14410\n14411\n14412\n14413\n14414\n14415\n14416\n14417\n14418\n14419\n14420\n14421\n14422\n14423\n14424\n14425\n14426\n14427\n14428\n14429\n14430\n14431\n14432\n14433\n14434\n14435\n14436\n14437\n14438\n14439\n14440\n14441\n14442\n14443\n14444\n14445\n14446\n14447\n14448\n14449\n14450\n14451\n14452\n14453\n14454\n14455\n14456\n14457\n14458\n14459\n14460\n14461\n14462\n14463\n14464\n14465\n14466\n14467\n14468\n14469\n14470\n14471\n14472\n14473\n14474\n14475\n14476\n14477\n14478\n14479\n14480\n14481\n14482\n14483\n14484\n14485\n14486\n14487\n14488\n14489\n14490\n14491\n14492\n14493\n14494\n14495\n14496\n14497\n14498\n14499\n14500\n14501\n14502\n14503\n14504\n14505\n14506\n14507\n14508\n14509\n14510\n14511\n14512\n14513\n14514\n14515\n14516\n14517\n14518\n14519\n14520\n14521\n14522\n14523\n14524\n14525\n14526\n14527\n14528\n14529\n14530\n14531\n14532\n14533\n14534\n14535\n14536\n14537\n14538\n14539\n14540\n14541\n14542\n14543\n14544\n14545\n14546\n14547\n14548\n14549\n14550\n14551\n14552\n14553\n14554\n14555\n14556\n14557\n14558\n14559\n14560\n14561\n14562\n14563\n14564\n14565\n14566\n14567\n14568\n14569\n14570\n14571\n14572\n14573\n14574\n14575\n14576\n14577\n14578\n14579\n14580\n14581\n14582\n14583\n14584\n14585\n14586\n14587\n14588\n14589\n14590\n14591\n14592\n14593\n14594\n14595\n14596\n14597\n14598\n14599\n14600\n14601\n14602\n14603\n14604\n14605\n14606\n14607\n14608\n14609\n14610\n14611\n14612\n14613\n14614\n14615\n14616\n14617\n14618\n14619\n14620\n14621\n14622\n14623\n14624\n14625\n14626\n14627\n14628\n14629\n14630\n14631\n14632\n14633\n14634\n14635\n14636\n14637\n14638\n14639\n14640\n14641\n14642\n14643\n14644\n14645\n14646\n14647\n14648\n14649\n14650\n14651\n14652\n14653\n14654\n14655\n14656\n14657\n14658\n14659\n14660\n14661\n14662\n14663\n14664\n14665\n14666\n14667\n14668\n14669\n14670\n14671\n14672\n14673\n14674\n14675\n14676\n14677\n14678\n14679\n14680\n14681\n14682\n14683\n14684\n14685\n14686\n14687\n14688\n14689\n14690\n14691\n14692\n14693\n14694\n14695\n14696\n14697\n14698\n14699\n14700\n14701\n14702\n14703\n14704\n14705\n14706\n14707\n14708\n14709\n14710\n14711\n14712\n14713\n14714\n14715\n14716\n14717\n14718\n14719\n14720\n14721\n14722\n14723\n14724\n14725\n14726\n14727\n14728\n14729\n14730\n14731\n14732\n14733\n14734\n14735\n14736\n14737\n14738\n14739\n14740\n14741\n14742\n14743\n14744\n14745\n14746\n14747\n14748\n14749\n14750\n14751\n14752\n14753\n14754\n14755\n14756\n14757\n14758\n14759\n14760\n14761\n14762\n14763\n14764\n14765\n14766\n14767\n14768\n14769\n14770\n14771\n14772\n14773\n14774\n14775\n14776\n14777\n14778\n14779\n14780\n14781\n14782\n14783\n14784\n14785\n14786\n14787\n14788\n14789\n14790\n14791\n14792\n14793\n14794\n14795\n14796\n14797\n14798\n14799\n14800\n14801\n14802\n14803\n14804\n14805\n14806\n14807\n14808\n14809\n14810\n14811\n14812\n14813\n14814\n14815\n14816\n14817\n14818\n14819\n14820\n14821\n14822\n14823\n14824\n14825\n14826\n14827\n14828\n14829\n14830\n14831\n14832\n14833\n14834\n14835\n14836\n14837\n14838\n14839\n14840\n14841\n14842\n14843\n14844\n14845\n14846\n14847\n14848\n14849\n14850\n14851\n14852\n14853\n14854\n14855\n14856\n14857\n14858\n14859\n14860\n14861\n14862\n14863\n14864\n14865\n14866\n14867\n14868\n14869\n14870\n14871\n14872\n14873\n14874\n14875\n14876\n14877\n14878\n14879\n14880\n14881\n14882\n14883\n14884\n14885\n14886\n14887\n14888\n14889\n14890\n14891\n14892\n14893\n14894\n14895\n14896\n14897\n14898\n14899\n14900\n14901\n14902\n14903\n14904\n14905\n14906\n14907\n14908\n14909\n14910\n14911\n14912\n14913\n14914\n14915\n14916\n14917\n14918\n14919\n14920\n14921\n14922\n14923\n14924\n14925\n14926\n14927\n14928\n14929\n14930\n14931\n14932\n14933\n14934\n14935\n14936\n14937\n14938\n14939\n14940\n14941\n14942\n14943\n14944\n14945\n14946\n14947\n14948\n14949\n14950\n14951\n14952\n14953\n14954\n14955\n14956\n14957\n14958\n14959\n14960\n14961\n14962\n14963\n14964\n14965\n14966\n14967\n14968\n14969\n14970\n14971\n14972\n14973\n14974\n14975\n14976\n14977\n14978\n14979\n14980\n14981\n14982\n14983\n14984\n14985\n14986\n14987\n14988\n14989\n14990\n14991\n14992\n14993\n14994\n14995\n14996\n14997\n14998\n14999\n15000\n15001\n15002\n15003\n15004\n15005\n15006\n15007\n15008\n15009\n15010\n15011\n15012\n15013\n15014\n15015\n15016\n15017\n15018\n15019\n15020\n15021\n15022\n15023\n15024\n15025\n15026\n15027\n15028\n15029\n15030\n15031\n15032\n15033\n15034\n15035\n15036\n15037\n15038\n15039\n15040\n15041\n15042\n15043\n15044\n15045\n15046\n15047\n15048\n15049\n15050\n15051\n15052\n15053\n15054\n15055\n15056\n15057\n15058\n15059\n15060\n15061\n15062\n15063\n15064\n15065\n15066\n15067\n15068\n15069\n15070\n15071\n15072\n15073\n15074\n15075\n15076\n15077\n15078\n15079\n15080\n15081\n15082\n15083\n15084\n15085\n15086\n15087\n15088\n15089\n15090\n15091\n15092\n15093\n15094\n15095\n15096\n15097\n15098\n15099\n15100\n15101\n15102\n15103\n15104\n15105\n15106\n15107\n15108\n15109\n15110\n15111\n15112\n15113\n15114\n15115\n15116\n15117\n15118\n15119\n15120\n15121\n15122\n15123\n15124\n15125\n15126\n15127\n15128\n15129\n15130\n15131\n15132\n15133\n15134\n15135\n15136\n15137\n15138\n15139\n15140\n15141\n15142\n15143\n15144\n15145\n15146\n15147\n15148\n15149\n15150\n15151\n15152\n15153\n15154\n15155\n15156\n15157\n15158\n15159\n15160\n15161\n15162\n15163\n15164\n15165\n15166\n15167\n15168\n15169\n15170\n15171\n15172\n15173\n15174\n15175\n15176\n15177\n15178\n15179\n15180\n15181\n15182\n15183\n15184\n15185\n15186\n15187\n15188\n15189\n15190\n15191\n15192\n15193\n15194\n15195\n15196\n15197\n15198\n15199\n15200\n15201\n15202\n15203\n15204\n15205\n15206\n15207\n15208\n15209\n15210\n15211\n15212\n15213\n15214\n15215\n15216\n15217\n15218\n15219\n15220\n15221\n15222\n15223\n15224\n15225\n15226\n15227\n15228\n15229\n15230\n15231\n15232\n15233\n15234\n15235\n15236\n15237\n15238\n15239\n15240\n15241\n15242\n15243\n15244\n15245\n15246\n15247\n15248\n15249\n15250\n15251\n15252\n15253\n15254\n15255\n15256\n15257\n15258\n15259\n15260\n15261\n15262\n15263\n15264\n15265\n15266\n15267\n15268\n15269\n15270\n15271\n15272\n15273\n15274\n15275\n15276\n15277\n15278\n15279\n15280\n15281\n15282\n15283\n15284\n15285\n15286\n15287\n15288\n15289\n15290\n15291\n15292\n15293\n15294\n15295\n15296\n15297\n15298\n15299\n15300\n15301\n15302\n15303\n15304\n15305\n15306\n15307\n15308\n15309\n15310\n15311\n15312\n15313\n15314\n15315\n15316\n15317\n15318\n15319\n15320\n15321\n15322\n15323\n15324\n15325\n15326\n15327\n15328\n15329\n15330\n15331\n15332\n15333\n15334\n15335\n15336\n15337\n15338\n15339\n15340\n15341\n15342\n15343\n15344\n15345\n15346\n15347\n15348\n15349\n15350\n15351\n15352\n15353\n15354\n15355\n15356\n15357\n15358\n15359\n15360\n15361\n15362\n15363\n15364\n15365\n15366\n15367\n15368\n15369\n15370\n15371\n15372\n15373\n15374\n15375\n15376\n15377\n15378\n15379\n15380\n15381\n15382\n15383\n15384\n15385\n15386\n15387\n15388\n15389\n15390\n15391\n15392\n15393\n15394\n15395\n15396\n15397\n15398\n15399\n15400\n15401\n15402\n15403\n15404\n15405\n15406\n15407\n15408\n15409\n15410\n15411\n15412\n15413\n15414\n15415\n15416\n15417\n15418\n15419\n15420\n15421\n15422\n15423\n15424\n15425\n15426\n15427\n15428\n15429\n15430\n15431\n15432\n15433\n15434\n15435\n15436\n15437\n15438\n15439\n15440\n15441\n15442\n15443\n15444\n15445\n15446\n15447\n15448\n15449\n15450\n15451\n15452\n15453\n15454\n15455\n15456\n15457\n15458\n15459\n15460\n15461\n15462\n15463\n15464\n15465\n15466\n15467\n15468\n15469\n15470\n15471\n15472\n15473\n15474\n15475\n15476\n15477\n15478\n15479\n15480\n15481\n15482\n15483\n15484\n15485\n15486\n15487\n15488\n15489\n15490\n15491\n15492\n15493\n15494\n15495\n15496\n15497\n15498\n15499\n15500\n15501\n15502\n15503\n15504\n15505\n15506\n15507\n15508\n15509\n15510\n15511\n15512\n15513\n15514\n15515\n15516\n15517\n15518\n15519\n15520\n15521\n15522\n15523\n15524\n15525\n15526\n15527\n15528\n15529\n15530\n15531\n15532\n15533\n15534\n15535\n15536\n15537\n15538\n15539\n15540\n15541\n15542\n15543\n15544\n15545\n15546\n15547\n15548\n15549\n15550\n15551\n15552\n15553\n15554\n15555\n15556\n15557\n15558\n15559\n15560\n15561\n15562\n15563\n15564\n15565\n15566\n15567\n15568\n15569\n15570\n15571\n15572\n15573\n15574\n15575\n15576\n15577\n15578\n15579\n15580\n15581\n15582\n15583\n15584\n15585\n15586\n15587\n15588\n15589\n15590\n15591\n15592\n15593\n15594\n15595\n15596\n15597\n15598\n15599\n15600\n15601\n15602\n15603\n15604\n15605\n15606\n15607\n15608\n15609\n15610\n15611\n15612\n15613\n15614\n15615\n15616\n15617\n15618\n15619\n15620\n15621\n15622\n15623\n15624\n15625\n15626\n15627\n15628\n15629\n15630\n15631\n15632\n15633\n15634\n15635\n15636\n15637\n15638\n15639\n15640\n15641\n15642\n15643\n15644\n15645\n15646\n15647\n15648\n15649\n15650\n15651\n15652\n15653\n15654\n15655\n15656\n15657\n15658\n15659\n15660\n15661\n15662\n15663\n15664\n15665\n15666\n15667\n15668\n15669\n15670\n15671\n15672\n15673\n15674\n15675\n15676\n15677\n15678\n15679\n15680\n15681\n15682\n15683\n15684\n15685\n15686\n15687\n15688\n15689\n15690\n15691\n15692\n15693\n15694\n15695\n15696\n15697\n15698\n15699\n15700\n15701\n15702\n15703\n15704\n15705\n15706\n15707\n15708\n15709\n15710\n15711\n15712\n15713\n15714\n15715\n15716\n15717\n15718\n15719\n15720\n15721\n15722\n15723\n15724\n15725\n15726\n15727\n15728\n15729\n15730\n15731\n15732\n15733\n15734\n15735\n15736\n15737\n15738\n15739\n15740\n15741\n15742\n15743\n15744\n15745\n15746\n15747\n15748\n15749\n15750\n15751\n15752\n15753\n15754\n15755\n15756\n15757\n15758\n15759\n15760\n15761\n15762\n15763\n15764\n15765\n15766\n15767\n15768\n15769\n15770\n15771\n15772\n15773\n15774\n15775\n15776\n15777\n15778\n15779\n15780\n15781\n15782\n15783\n15784\n15785\n15786\n15787\n15788\n15789\n15790\n15791\n15792\n15793\n15794\n15795\n15796\n15797\n15798\n15799\n15800\n15801\n15802\n15803\n15804\n15805\n15806\n15807\n15808\n15809\n15810\n15811\n15812\n15813\n15814\n15815\n15816\n15817\n15818\n15819\n15820\n15821\n15822\n15823\n15824\n15825\n15826\n15827\n15828\n15829\n15830\n15831\n15832\n15833\n15834\n15835\n15836\n15837\n15838\n15839\n15840\n15841\n15842\n15843\n15844\n15845\n15846\n15847\n15848\n15849\n15850\n15851\n15852\n15853\n15854\n15855\n15856\n15857\n15858\n15859\n15860\n15861\n15862\n15863\n15864\n15865\n15866\n15867\n15868\n15869\n15870\n15871\n15872\n15873\n15874\n15875\n15876\n15877\n15878\n15879\n15880\n15881\n15882\n15883\n15884\n15885\n15886\n15887\n15888\n15889\n15890\n15891\n15892\n15893\n15894\n15895\n15896\n15897\n15898\n15899\n15900\n15901\n15902\n15903\n15904\n15905\n15906\n15907\n15908\n15909\n15910\n15911\n15912\n15913\n15914\n15915\n15916\n15917\n15918\n15919\n15920\n15921\n15922\n15923\n15924\n15925\n15926\n15927\n15928\n15929\n15930\n15931\n15932\n15933\n15934\n15935\n15936\n15937\n15938\n15939\n15940\n15941\n15942\n15943\n15944\n15945\n15946\n15947\n15948\n15949\n15950\n15951\n15952\n15953\n15954\n15955\n15956\n15957\n15958\n15959\n15960\n15961\n15962\n15963\n15964\n15965\n15966\n15967\n15968\n15969\n15970\n15971\n15972\n15973\n15974\n15975\n15976\n15977\n15978\n15979\n15980\n15981\n15982\n15983\n15984\n15985\n15986\n15987\n15988\n15989\n15990\n15991\n15992\n15993\n15994\n15995\n15996\n15997\n15998\n15999\n16000\n16001\n16002\n16003\n16004\n16005\n16006\n16007\n16008\n16009\n16010\n16011\n16012\n16013\n16014\n16015\n16016\n16017\n16018\n16019\n16020\n16021\n16022\n16023\n16024\n16025\n16026\n16027\n16028\n16029\n16030\n16031\n16032\n16033\n16034\n16035\n16036\n16037\n16038\n16039\n16040\n16041\n16042\n16043\n16044\n16045\n16046\n16047\n16048\n16049\n16050\n16051\n16052\n16053\n16054\n16055\n16056\n16057\n16058\n16059\n16060\n16061\n16062\n16063\n16064\n16065\n16066\n16067\n16068\n16069\n16070\n16071\n16072\n16073\n16074\n16075\n16076\n16077\n16078\n16079\n16080\n16081\n16082\n16083\n16084\n16085\n16086\n16087\n16088\n16089\n16090\n16091\n16092\n16093\n16094\n16095\n16096\n16097\n16098\n16099\n16100\n16101\n16102\n16103\n16104\n16105\n16106\n16107\n16108\n16109\n16110\n16111\n16112\n16113\n16114\n16115\n16116\n16117\n16118\n16119\n16120\n16121\n16122\n16123\n16124\n16125\n16126\n16127\n16128\n16129\n16130\n16131\n16132\n16133\n16134\n16135\n16136\n16137\n16138\n16139\n16140\n16141\n16142\n16143\n16144\n16145\n16146\n16147\n16148\n16149\n16150\n16151\n16152\n16153\n16154\n16155\n16156\n16157\n16158\n16159\n16160\n16161\n16162\n16163\n16164\n16165\n16166\n16167\n16168\n16169\n16170\n16171\n16172\n16173\n16174\n16175\n16176\n16177\n16178\n16179\n16180\n16181\n16182\n16183\n16184\n16185\n16186\n16187\n16188\n16189\n16190\n16191\n16192\n16193\n16194\n16195\n16196\n16197\n16198\n16199\n16200\n16201\n16202\n16203\n16204\n16205\n16206\n16207\n16208\n16209\n16210\n16211\n16212\n16213\n16214\n16215\n16216\n16217\n16218\n16219\n16220\n16221\n16222\n16223\n16224\n16225\n16226\n16227\n16228\n16229\n16230\n16231\n16232\n16233\n16234\n16235\n16236\n16237\n16238\n16239\n16240\n16241\n16242\n16243\n16244\n16245\n16246\n16247\n16248\n16249\n16250\n16251\n16252\n16253\n16254\n16255\n16256\n16257\n16258\n16259\n16260\n16261\n16262\n16263\n16264\n16265\n16266\n16267\n16268\n16269\n16270\n16271\n16272\n16273\n16274\n16275\n16276\n16277\n16278\n16279\n16280\n16281\n16282\n16283\n16284\n16285\n16286\n16287\n16288\n16289\n16290\n16291\n16292\n16293\n16294\n16295\n16296\n16297\n16298\n16299\n16300\n16301\n16302\n16303\n16304\n16305\n16306\n16307\n16308\n16309\n16310\n16311\n16312\n16313\n16314\n16315\n16316\n16317\n16318\n16319\n16320\n16321\n16322\n16323\n16324\n16325\n16326\n16327\n16328\n16329\n16330\n16331\n16332\n16333\n16334\n16335\n16336\n16337\n16338\n16339\n16340\n16341\n16342\n16343\n16344\n16345\n16346\n16347\n16348\n16349\n16350\n16351\n16352\n16353\n16354\n16355\n16356\n16357\n16358\n16359\n16360\n16361\n16362\n16363\n16364\n16365\n16366\n16367\n16368\n16369\n16370\n16371\n16372\n16373\n16374\n16375\n16376\n16377\n16378\n16379\n16380\n16381\n16382\n16383\n16384\n16385\n16386\n16387\n16388\n16389\n16390\n16391\n16392\n16393\n16394\n16395\n16396\n16397\n16398\n16399\n16400\n16401\n16402\n16403\n16404\n16405\n16406\n16407\n16408\n16409\n16410\n16411\n16412\n16413\n16414\n16415\n16416\n16417\n16418\n16419\n16420\n16421\n16422\n16423\n16424\n16425\n16426\n16427\n16428\n16429\n16430\n16431\n16432\n16433\n16434\n16435\n16436\n16437\n16438\n16439\n16440\n16441\n16442\n16443\n16444\n16445\n16446\n16447\n16448\n16449\n16450\n16451\n16452\n16453\n16454\n16455\n16456\n16457\n16458\n16459\n16460\n16461\n16462\n16463\n16464\n16465\n16466\n16467\n16468\n16469\n16470\n16471\n16472\n16473\n16474\n16475\n16476\n16477\n16478\n16479\n16480\n16481\n16482\n16483\n16484\n16485\n16486\n16487\n16488\n16489\n16490\n16491\n16492\n16493\n16494\n16495\n16496\n16497\n16498\n16499\n16500\n16501\n16502\n16503\n16504\n16505\n16506\n16507\n16508\n16509\n16510\n16511\n16512\n16513\n16514\n16515\n16516\n16517\n16518\n16519\n16520\n16521\n16522\n16523\n16524\n16525\n16526\n16527\n16528\n16529\n16530\n16531\n16532\n16533\n16534\n16535\n16536\n16537\n16538\n16539\n16540\n16541\n16542\n16543\n16544\n16545\n16546\n16547\n16548\n16549\n16550\n16551\n16552\n16553\n16554\n16555\n16556\n16557\n16558\n16559\n16560\n16561\n16562\n16563\n16564\n16565\n16566\n16567\n16568\n16569\n16570\n16571\n16572\n16573\n16574\n16575\n16576\n16577\n16578\n16579\n16580\n16581\n16582\n16583\n16584\n16585\n16586\n16587\n16588\n16589\n16590\n16591\n16592\n16593\n16594\n16595\n16596\n16597\n16598\n16599\n16600\n16601\n16602\n16603\n16604\n16605\n16606\n16607\n16608\n16609\n16610\n16611\n16612\n16613\n16614\n16615\n16616\n16617\n16618\n16619\n16620\n16621\n16622\n16623\n16624\n16625\n16626\n16627\n16628\n16629\n16630\n16631\n16632\n16633\n16634\n16635\n16636\n16637\n16638\n16639\n16640\n16641\n16642\n16643\n16644\n16645\n16646\n16647\n16648\n16649\n16650\n16651\n16652\n16653\n16654\n16655\n16656\n16657\n16658\n16659\n16660\n16661\n16662\n16663\n16664\n16665\n16666\n16667\n16668\n16669\n16670\n16671\n16672\n16673\n16674\n16675\n16676\n16677\n16678\n16679\n16680\n16681\n16682\n16683\n16684\n16685\n16686\n16687\n16688\n16689\n16690\n16691\n16692\n16693\n16694\n16695\n16696\n16697\n16698\n16699\n16700\n16701\n16702\n16703\n16704\n16705\n16706\n16707\n16708\n16709\n16710\n16711\n16712\n16713\n16714\n16715\n16716\n16717\n16718\n16719\n16720\n16721\n16722\n16723\n16724\n16725\n16726\n16727\n16728\n16729\n16730\n16731\n16732\n16733\n16734\n16735\n16736\n16737\n16738\n16739\n16740\n16741\n16742\n16743\n16744\n16745\n16746\n16747\n16748\n16749\n16750\n16751\n16752\n16753\n16754\n16755\n16756\n16757\n16758\n16759\n16760\n16761\n16762\n16763\n16764\n16765\n16766\n16767\n16768\n16769\n16770\n16771\n16772\n16773\n16774\n16775\n16776\n16777\n16778\n16779\n16780\n16781\n16782\n16783\n16784\n16785\n16786\n16787\n16788\n16789\n16790\n16791\n16792\n16793\n16794\n16795\n16796\n16797\n16798\n16799\n16800\n16801\n16802\n16803\n16804\n16805\n16806\n16807\n16808\n16809\n16810\n16811\n16812\n16813\n16814\n16815\n16816\n16817\n16818\n16819\n16820\n16821\n16822\n16823\n16824\n16825\n16826\n16827\n16828\n16829\n16830\n16831\n16832\n16833\n16834\n16835\n16836\n16837\n16838\n16839\n16840\n16841\n16842\n16843\n16844\n16845\n16846\n16847\n16848\n16849\n16850\n16851\n16852\n16853\n16854\n16855\n16856\n16857\n16858\n16859\n16860\n16861\n16862\n16863\n16864\n16865\n16866\n16867\n16868\n16869\n16870\n16871\n16872\n16873\n16874\n16875\n16876\n16877\n16878\n16879\n16880\n16881\n16882\n16883\n16884\n16885\n16886\n16887\n16888\n16889\n16890\n16891\n16892\n16893\n16894\n16895\n16896\n16897\n16898\n16899\n16900\n16901\n16902\n16903\n16904\n16905\n16906\n16907\n16908\n16909\n16910\n16911\n16912\n16913\n16914\n16915\n16916\n16917\n16918\n16919\n16920\n16921\n16922\n16923\n16924\n16925\n16926\n16927\n16928\n16929\n16930\n16931\n16932\n16933\n16934\n16935\n16936\n16937\n16938\n16939\n16940\n16941\n16942\n16943\n16944\n16945\n16946\n16947\n16948\n16949\n16950\n16951\n16952\n16953\n16954\n16955\n16956\n16957\n16958\n16959\n16960\n16961\n16962\n16963\n16964\n16965\n16966\n16967\n16968\n16969\n16970\n16971\n16972\n16973\n16974\n16975\n16976\n16977\n16978\n16979\n16980\n16981\n16982\n16983\n16984\n16985\n16986\n16987\n16988\n16989\n16990\n16991\n16992\n16993\n16994\n16995\n16996\n16997\n16998\n16999\n17000\n17001\n17002\n17003\n17004\n17005\n17006\n17007\n17008\n17009\n17010\n17011\n17012\n17013\n17014\n17015\n17016\n17017\n17018\n17019\n17020\n17021\n17022\n17023\n17024\n17025\n17026\n17027\n17028\n17029\n17030\n17031\n17032\n17033\n17034\n17035\n17036\n17037\n17038\n17039\n17040\n17041\n17042\n17043\n17044\n17045\n17046\n17047\n17048\n17049\n17050\n17051\n17052\n17053\n17054\n17055\n17056\n17057\n17058\n17059\n17060\n17061\n17062\n17063\n17064\n17065\n17066\n17067\n17068\n17069\n17070\n17071\n17072\n17073\n17074\n17075\n17076\n17077\n17078\n17079\n17080\n17081\n17082\n17083\n17084\n17085\n17086\n17087\n17088\n17089\n17090\n17091\n17092\n17093\n17094\n17095\n17096\n17097\n17098\n17099\n17100\n17101\n17102\n17103\n17104\n17105\n17106\n17107\n17108\n17109\n17110\n17111\n17112\n17113\n17114\n17115\n17116\n17117\n17118\n17119\n17120\n17121\n17122\n17123\n17124\n17125\n17126\n17127\n17128\n17129\n17130\n17131\n17132\n17133\n17134\n17135\n17136\n17137\n17138\n17139\n17140\n17141\n17142\n17143\n17144\n17145\n17146\n17147\n17148\n17149\n17150\n17151\n17152\n17153\n17154\n17155\n17156\n17157\n17158\n17159\n17160\n17161\n17162\n17163\n17164\n17165\n17166\n17167\n17168\n17169\n17170\n17171\n17172\n17173\n17174\n17175\n17176\n17177\n17178\n17179\n17180\n17181\n17182\n17183\n17184\n17185\n17186\n17187\n17188\n17189\n17190\n17191\n17192\n17193\n17194\n17195\n17196\n17197\n17198\n17199\n17200\n17201\n17202\n17203\n17204\n17205\n17206\n17207\n17208\n17209\n17210\n17211\n17212\n17213\n17214\n17215\n17216\n17217\n17218\n17219\n17220\n17221\n17222\n17223\n17224\n17225\n17226\n17227\n17228\n17229\n17230\n17231\n17232\n17233\n17234\n17235\n17236\n17237\n17238\n17239\n17240\n17241\n17242\n17243\n17244\n17245\n17246\n17247\n17248\n17249\n17250\n17251\n17252\n17253\n17254\n17255\n17256\n17257\n17258\n17259\n17260\n17261\n17262\n17263\n17264\n17265\n17266\n17267\n17268\n17269\n17270\n17271\n17272\n17273\n17274\n17275\n17276\n17277\n17278\n17279\n17280\n17281\n17282\n17283\n17284\n17285\n17286\n17287\n17288\n17289\n17290\n17291\n17292\n17293\n17294\n17295\n17296\n17297\n17298\n17299\n17300\n17301\n17302\n17303\n17304\n17305\n17306\n17307\n17308\n17309\n17310\n17311\n17312\n17313\n17314\n17315\n17316\n17317\n17318\n17319\n17320\n17321\n17322\n17323\n17324\n17325\n17326\n17327\n17328\n17329\n17330\n17331\n17332\n17333\n17334\n17335\n17336\n17337\n17338\n17339\n17340\n17341\n17342\n17343\n17344\n17345\n17346\n17347\n17348\n17349\n17350\n17351\n17352\n17353\n17354\n17355\n17356\n17357\n17358\n17359\n17360\n17361\n17362\n17363\n17364\n17365\n17366\n17367\n17368\n17369\n17370\n17371\n17372\n17373\n17374\n17375\n17376\n17377\n17378\n17379\n17380\n17381\n17382\n17383\n17384\n17385\n17386\n17387\n17388\n17389\n17390\n17391\n17392\n17393\n17394\n17395\n17396\n17397\n17398\n17399\n17400\n17401\n17402\n17403\n17404\n17405\n17406\n17407\n17408\n17409\n17410\n17411\n17412\n17413\n17414\n17415\n17416\n17417\n17418\n17419\n17420\n17421\n17422\n17423\n17424\n17425\n17426\n17427\n17428\n17429\n17430\n17431\n17432\n17433\n17434\n17435\n17436\n17437\n17438\n17439\n17440\n17441\n17442\n17443\n17444\n17445\n17446\n17447\n17448\n17449\n17450\n17451\n17452\n17453\n17454\n17455\n17456\n17457\n17458\n17459\n17460\n17461\n17462\n17463\n17464\n17465\n17466\n17467\n17468\n17469\n17470\n17471\n17472\n17473\n17474\n17475\n17476\n17477\n17478\n17479\n17480\n17481\n17482\n17483\n17484\n17485\n17486\n17487\n17488\n17489\n17490\n17491\n17492\n17493\n17494\n17495\n17496\n17497\n17498\n17499\n17500\n17501\n17502\n17503\n17504\n17505\n17506\n17507\n17508\n17509\n17510\n17511\n17512\n17513\n17514\n17515\n17516\n17517\n17518\n17519\n17520\n17521\n17522\n17523\n17524\n17525\n17526\n17527\n17528\n17529\n17530\n17531\n17532\n17533\n17534\n17535\n17536\n17537\n17538\n17539\n17540\n17541\n17542\n17543\n17544\n17545\n17546\n17547\n17548\n17549\n17550\n17551\n17552\n17553\n17554\n17555\n17556\n17557\n17558\n17559\n17560\n17561\n17562\n17563\n17564\n17565\n17566\n17567\n17568\n17569\n17570\n17571\n17572\n17573\n17574\n17575\n17576\n17577\n17578\n17579\n17580\n17581\n17582\n17583\n17584\n17585\n17586\n17587\n17588\n17589\n17590\n17591\n17592\n17593\n17594\n17595\n17596\n17597\n17598\n17599\n17600\n17601\n17602\n17603\n17604\n17605\n17606\n17607\n17608\n17609\n17610\n17611\n17612\n17613\n17614\n17615\n17616\n17617\n17618\n17619\n17620\n17621\n17622\n17623\n17624\n17625\n17626\n17627\n17628\n17629\n17630\n17631\n17632\n17633\n17634\n17635\n17636\n17637\n17638\n17639\n17640\n17641\n17642\n17643\n17644\n17645\n17646\n17647\n17648\n17649\n17650\n17651\n17652\n17653\n17654\n17655\n17656\n17657\n17658\n17659\n17660\n17661\n17662\n17663\n17664\n17665\n17666\n17667\n17668\n17669\n17670\n17671\n17672\n17673\n17674\n17675\n17676\n17677\n17678\n17679\n17680\n17681\n17682\n17683\n17684\n17685\n17686\n17687\n17688\n17689\n17690\n17691\n17692\n17693\n17694\n17695\n17696\n17697\n17698\n17699\n17700\n17701\n17702\n17703\n17704\n17705\n17706\n17707\n17708\n17709\n17710\n17711\n17712\n17713\n17714\n17715\n17716\n17717\n17718\n17719\n17720\n17721\n17722\n17723\n17724\n17725\n17726\n17727\n17728\n17729\n17730\n17731\n17732\n17733\n17734\n17735\n17736\n17737\n17738\n17739\n17740\n17741\n17742\n17743\n17744\n17745\n17746\n17747\n17748\n17749\n17750\n17751\n17752\n17753\n17754\n17755\n17756\n17757\n17758\n17759\n17760\n17761\n17762\n17763\n17764\n17765\n17766\n17767\n17768\n17769\n17770\n17771\n17772\n17773\n17774\n17775\n17776\n17777\n17778\n17779\n17780\n17781\n17782\n17783\n17784\n17785\n17786\n17787\n17788\n17789\n17790\n17791\n17792\n17793\n17794\n17795\n17796\n17797\n17798\n17799\n17800\n17801\n17802\n17803\n17804\n17805\n17806\n17807\n17808\n17809\n17810\n17811\n17812\n17813\n17814\n17815\n17816\n17817\n17818\n17819\n17820\n17821\n17822\n17823\n17824\n17825\n17826\n17827\n17828\n17829\n17830\n17831\n17832\n17833\n17834\n17835\n17836\n17837\n17838\n17839\n17840\n17841\n17842\n17843\n17844\n17845\n17846\n17847\n17848\n17849\n17850\n17851\n17852\n17853\n17854\n17855\n17856\n17857\n17858\n17859\n17860\n17861\n17862\n17863\n17864\n17865\n17866\n17867\n17868\n17869\n17870\n17871\n17872\n17873\n17874\n17875\n17876\n17877\n17878\n17879\n17880\n17881\n17882\n17883\n17884\n17885\n17886\n17887\n17888\n17889\n17890\n17891\n17892\n17893\n17894\n17895\n17896\n17897\n17898\n17899\n17900\n17901\n17902\n17903\n17904\n17905\n17906\n17907\n17908\n17909\n17910\n17911\n17912\n17913\n17914\n17915\n17916\n17917\n17918\n17919\n17920\n17921\n17922\n17923\n17924\n17925\n17926\n17927\n17928\n17929\n17930\n17931\n17932\n17933\n17934\n17935\n17936\n17937\n17938\n17939\n17940\n17941\n17942\n17943\n17944\n17945\n17946\n17947\n17948\n17949\n17950\n17951\n17952\n17953\n17954\n17955\n17956\n17957\n17958\n17959\n17960\n17961\n17962\n17963\n17964\n17965\n17966\n17967\n17968\n17969\n17970\n17971\n17972\n17973\n17974\n17975\n17976\n17977\n17978\n17979\n17980\n17981\n17982\n17983\n17984\n17985\n17986\n17987\n17988\n17989\n17990\n17991\n17992\n17993\n17994\n17995\n17996\n17997\n17998\n17999\n18000\n18001\n18002\n18003\n18004\n18005\n18006\n18007\n18008\n18009\n18010\n18011\n18012\n18013\n18014\n18015\n18016\n18017\n18018\n18019\n18020\n18021\n18022\n18023\n18024\n18025\n18026\n18027\n18028\n18029\n18030\n18031\n18032\n18033\n18034\n18035\n18036\n18037\n18038\n18039\n18040\n18041\n18042\n18043\n18044\n18045\n18046\n18047\n18048\n18049\n18050\n18051\n18052\n18053\n18054\n18055\n18056\n18057\n18058\n18059\n18060\n18061\n18062\n18063\n18064\n18065\n18066\n18067\n18068\n18069\n18070\n18071\n18072\n18073\n18074\n18075\n18076\n18077\n18078\n18079\n18080\n18081\n18082\n18083\n18084\n18085\n18086\n18087\n18088\n18089\n18090\n18091\n18092\n18093\n18094\n18095\n18096\n18097\n18098\n18099\n18100\n18101\n18102\n18103\n18104\n18105\n18106\n18107\n18108\n18109\n18110\n18111\n18112\n18113\n18114\n18115\n18116\n18117\n18118\n18119\n18120\n18121\n18122\n18123\n18124\n18125\n18126\n18127\n18128\n18129\n18130\n18131\n18132\n18133\n18134\n18135\n18136\n18137\n18138\n18139\n18140\n18141\n18142\n18143\n18144\n18145\n18146\n18147\n18148\n18149\n18150\n18151\n18152\n18153\n18154\n18155\n18156\n18157\n18158\n18159\n18160\n18161\n18162\n18163\n18164\n18165\n18166\n18167\n18168\n18169\n18170\n18171\n18172\n18173\n18174\n18175\n18176\n18177\n18178\n18179\n18180\n18181\n18182\n18183\n18184\n18185\n18186\n18187\n18188\n18189\n18190\n18191\n18192\n18193\n18194\n18195\n18196\n18197\n18198\n18199\n18200\n18201\n18202\n18203\n18204\n18205\n18206\n18207\n18208\n18209\n18210\n18211\n18212\n18213\n18214\n18215\n18216\n18217\n18218\n18219\n18220\n18221\n18222\n18223\n18224\n18225\n18226\n18227\n18228\n18229\n18230\n18231\n18232\n18233\n18234\n18235\n18236\n18237\n18238\n18239\n18240\n18241\n18242\n18243\n18244\n18245\n18246\n18247\n18248\n18249\n18250\n18251\n18252\n18253\n18254\n18255\n18256\n18257\n18258\n18259\n18260\n18261\n18262\n18263\n18264\n18265\n18266\n18267\n18268\n18269\n18270\n18271\n18272\n18273\n18274\n18275\n18276\n18277\n18278\n18279\n18280\n18281\n18282\n18283\n18284\n18285\n18286\n18287\n18288\n18289\n18290\n18291\n18292\n18293\n18294\n18295\n18296\n18297\n18298\n18299\n18300\n18301\n18302\n18303\n18304\n18305\n18306\n18307\n18308\n18309\n18310\n18311\n18312\n18313\n18314\n18315\n18316\n18317\n18318\n18319\n18320\n18321\n18322\n18323\n18324\n18325\n18326\n18327\n18328\n18329\n18330\n18331\n18332\n18333\n18334\n18335\n18336\n18337\n18338\n18339\n18340\n18341\n18342\n18343\n18344\n18345\n18346\n18347\n18348\n18349\n18350\n18351\n18352\n18353\n18354\n18355\n18356\n18357\n18358\n18359\n18360\n18361\n18362\n18363\n18364\n18365\n18366\n18367\n18368\n18369\n18370\n18371\n18372\n18373\n18374\n18375\n18376\n18377\n18378\n18379\n18380\n18381\n18382\n18383\n18384\n18385\n18386\n18387\n18388\n18389\n18390\n18391\n18392\n18393\n18394\n18395\n18396\n18397\n18398\n18399\n18400\n18401\n18402\n18403\n18404\n18405\n18406\n18407\n18408\n18409\n18410\n18411\n18412\n18413\n18414\n18415\n18416\n18417\n18418\n18419\n18420\n18421\n18422\n18423\n18424\n18425\n18426\n18427\n18428\n18429\n18430\n18431\n18432\n18433\n18434\n18435\n18436\n18437\n18438\n18439\n18440\n18441\n18442\n18443\n18444\n18445\n18446\n18447\n18448\n18449\n18450\n18451\n18452\n18453\n18454\n18455\n18456\n18457\n18458\n18459\n18460\n18461\n18462\n18463\n18464\n18465\n18466\n18467\n18468\n18469\n18470\n18471\n18472\n18473\n18474\n18475\n18476\n18477\n18478\n18479\n18480\n18481\n18482\n18483\n18484\n18485\n18486\n18487\n18488\n18489\n18490\n18491\n18492\n18493\n18494\n18495\n18496\n18497\n18498\n18499\n18500\n18501\n18502\n18503\n18504\n18505\n18506\n18507\n18508\n18509\n18510\n18511\n18512\n18513\n18514\n18515\n18516\n18517\n18518\n18519\n18520\n18521\n18522\n18523\n18524\n18525\n18526\n18527\n18528\n18529\n18530\n18531\n18532\n18533\n18534\n18535\n18536\n18537\n18538\n18539\n18540\n18541\n18542\n18543\n18544\n18545\n18546\n18547\n18548\n18549\n18550\n18551\n18552\n18553\n18554\n18555\n18556\n18557\n18558\n18559\n18560\n18561\n18562\n18563\n18564\n18565\n18566\n18567\n18568\n18569\n18570\n18571\n18572\n18573\n18574\n18575\n18576\n18577\n18578\n18579\n18580\n18581\n18582\n18583\n18584\n18585\n18586\n18587\n18588\n18589\n18590\n18591\n18592\n18593\n18594\n18595\n18596\n18597\n18598\n18599\n18600\n18601\n18602\n18603\n18604\n18605\n18606\n18607\n18608\n18609\n18610\n18611\n18612\n18613\n18614\n18615\n18616\n18617\n18618\n18619\n18620\n18621\n18622\n18623\n18624\n18625\n18626\n18627\n18628\n18629\n18630\n18631\n18632\n18633\n18634\n18635\n18636\n18637\n18638\n18639\n18640\n18641\n18642\n18643\n18644\n18645\n18646\n18647\n18648\n18649\n18650\n18651\n18652\n18653\n18654\n18655\n18656\n18657\n18658\n18659\n18660\n18661\n18662\n18663\n18664\n18665\n18666\n18667\n18668\n18669\n18670\n18671\n18672\n18673\n18674\n18675\n18676\n18677\n18678\n18679\n18680\n18681\n18682\n18683\n18684\n18685\n18686\n18687\n18688\n18689\n18690\n18691\n18692\n18693\n18694\n18695\n18696\n18697\n18698\n18699\n18700\n18701\n18702\n18703\n18704\n18705\n18706\n18707\n18708\n18709\n18710\n18711\n18712\n18713\n18714\n18715\n18716\n18717\n18718\n18719\n18720\n18721\n18722\n18723\n18724\n18725\n18726\n18727\n18728\n18729\n18730\n18731\n18732\n18733\n18734\n18735\n18736\n18737\n18738\n18739\n18740\n18741\n18742\n18743\n18744\n18745\n18746\n18747\n18748\n18749\n18750\n18751\n18752\n18753\n18754\n18755\n18756\n18757\n18758\n18759\n18760\n18761\n18762\n18763\n18764\n18765\n18766\n18767\n18768\n18769\n18770\n18771\n18772\n18773\n18774\n18775\n18776\n18777\n18778\n18779\n18780\n18781\n18782\n18783\n18784\n18785\n18786\n18787\n18788\n18789\n18790\n18791\n18792\n18793\n18794\n18795\n18796\n18797\n18798\n18799\n18800\n18801\n18802\n18803\n18804\n18805\n18806\n18807\n18808\n18809\n18810\n18811\n18812\n18813\n18814\n18815\n18816\n18817\n18818\n18819\n18820\n18821\n18822\n18823\n18824\n18825\n18826\n18827\n18828\n18829\n18830\n18831\n18832\n18833\n18834\n18835\n18836\n18837\n18838\n18839\n18840\n18841\n18842\n18843\n18844\n18845\n18846\n18847\n18848\n18849\n18850\n18851\n18852\n18853\n18854\n18855\n18856\n18857\n18858\n18859\n18860\n18861\n18862\n18863\n18864\n18865\n18866\n18867\n18868\n18869\n18870\n18871\n18872\n18873\n18874\n18875\n18876\n18877\n18878\n18879\n18880\n18881\n18882\n18883\n18884\n18885\n18886\n18887\n18888\n18889\n18890\n18891\n18892\n18893\n18894\n18895\n18896\n18897\n18898\n18899\n18900\n18901\n18902\n18903\n18904\n18905\n18906\n18907\n18908\n18909\n18910\n18911\n18912\n18913\n18914\n18915\n18916\n18917\n18918\n18919\n18920\n18921\n18922\n18923\n18924\n18925\n18926\n18927\n18928\n18929\n18930\n18931\n18932\n18933\n18934\n18935\n18936\n18937\n18938\n18939\n18940\n18941\n18942\n18943\n18944\n18945\n18946\n18947\n18948\n18949\n18950\n18951\n18952\n18953\n18954\n18955\n18956\n18957\n18958\n18959\n18960\n18961\n18962\n18963\n18964\n18965\n18966\n18967\n18968\n18969\n18970\n18971\n18972\n18973\n18974\n18975\n18976\n18977\n18978\n18979\n18980\n18981\n18982\n18983\n18984\n18985\n18986\n18987\n18988\n18989\n18990\n18991\n18992\n18993\n18994\n18995\n18996\n18997\n18998\n18999\n19000\n19001\n19002\n19003\n19004\n19005\n19006\n19007\n19008\n19009\n19010\n19011\n19012\n19013\n19014\n19015\n19016\n19017\n19018\n19019\n19020\n19021\n19022\n19023\n19024\n19025\n19026\n19027\n19028\n19029\n19030\n19031\n19032\n19033\n19034\n19035\n19036\n19037\n19038\n19039\n19040\n19041\n19042\n19043\n19044\n19045\n19046\n19047\n19048\n19049\n19050\n19051\n19052\n19053\n19054\n19055\n19056\n19057\n19058\n19059\n19060\n19061\n19062\n19063\n19064\n19065\n19066\n19067\n19068\n19069\n19070\n19071\n19072\n19073\n19074\n19075\n19076\n19077\n19078\n19079\n19080\n19081\n19082\n19083\n19084\n19085\n19086\n19087\n19088\n19089\n19090\n19091\n19092\n19093\n19094\n19095\n19096\n19097\n19098\n19099\n19100\n19101\n19102\n19103\n19104\n19105\n19106\n19107\n19108\n19109\n19110\n19111\n19112\n19113\n19114\n19115\n19116\n19117\n19118\n19119\n19120\n19121\n19122\n19123\n19124\n19125\n19126\n19127\n19128\n19129\n19130\n19131\n19132\n19133\n19134\n19135\n19136\n19137\n19138\n19139\n19140\n19141\n19142\n19143\n19144\n19145\n19146\n19147\n19148\n19149\n19150\n19151\n19152\n19153\n19154\n19155\n19156\n19157\n19158\n19159\n19160\n19161\n19162\n19163\n19164\n19165\n19166\n19167\n19168\n19169\n19170\n19171\n19172\n19173\n19174\n19175\n19176\n19177\n19178\n19179\n19180\n19181\n19182\n19183\n19184\n19185\n19186\n19187\n19188\n19189\n19190\n19191\n19192\n19193\n19194\n19195\n19196\n19197\n19198\n19199\n19200\n19201\n19202\n19203\n19204\n19205\n19206\n19207\n19208\n19209\n19210\n19211\n19212\n19213\n19214\n19215\n19216\n19217\n19218\n19219\n19220\n19221\n19222\n19223\n19224\n19225\n19226\n19227\n19228\n19229\n19230\n19231\n19232\n19233\n19234\n19235\n19236\n19237\n19238\n19239\n19240\n19241\n19242\n19243\n19244\n19245\n19246\n19247\n19248\n19249\n19250\n19251\n19252\n19253\n19254\n19255\n19256\n19257\n19258\n19259\n19260\n19261\n19262\n19263\n19264\n19265\n19266\n19267\n19268\n19269\n19270\n19271\n19272\n19273\n19274\n19275\n19276\n19277\n19278\n19279\n19280\n19281\n19282\n19283\n19284\n19285\n19286\n19287\n19288\n19289\n19290\n19291\n19292\n19293\n19294\n19295\n19296\n19297\n19298\n19299\n19300\n19301\n19302\n19303\n19304\n19305\n19306\n19307\n19308\n19309\n19310\n19311\n19312\n19313\n19314\n19315\n19316\n19317\n19318\n19319\n19320\n19321\n19322\n19323\n19324\n19325\n19326\n19327\n19328\n19329\n19330\n19331\n19332\n19333\n19334\n19335\n19336\n19337\n19338\n19339\n19340\n19341\n19342\n19343\n19344\n19345\n19346\n19347\n19348\n19349\n19350\n19351\n19352\n19353\n19354\n19355\n19356\n19357\n19358\n19359\n19360\n19361\n19362\n19363\n19364\n19365\n19366\n19367\n19368\n19369\n19370\n19371\n19372\n19373\n19374\n19375\n19376\n19377\n19378\n19379\n19380\n19381\n19382\n19383\n19384\n19385\n19386\n19387\n19388\n19389\n19390\n19391\n19392\n19393\n19394\n19395\n19396\n19397\n19398\n19399\n19400\n19401\n19402\n19403\n19404\n19405\n19406\n19407\n19408\n19409\n19410\n19411\n19412\n19413\n19414\n19415\n19416\n19417\n19418\n19419\n19420\n19421\n19422\n19423\n19424\n19425\n19426\n19427\n19428\n19429\n19430\n19431\n19432\n19433\n19434\n19435\n19436\n19437\n19438\n19439\n19440\n19441\n19442\n19443\n19444\n19445\n19446\n19447\n19448\n19449\n19450\n19451\n19452\n19453\n19454\n19455\n19456\n19457\n19458\n19459\n19460\n19461\n19462\n19463\n19464\n19465\n19466\n19467\n19468\n19469\n19470\n19471\n19472\n19473\n19474\n19475\n19476\n19477\n19478\n19479\n19480\n19481\n19482\n19483\n19484\n19485\n19486\n19487\n19488\n19489\n19490\n19491\n19492\n19493\n19494\n19495\n19496\n19497\n19498\n19499\n19500\n19501\n19502\n19503\n19504\n19505\n19506\n19507\n19508\n19509\n19510\n19511\n19512\n19513\n19514\n19515\n19516\n19517\n19518\n19519\n19520\n19521\n19522\n19523\n19524\n19525\n19526\n19527\n19528\n19529\n19530\n19531\n19532\n19533\n19534\n19535\n19536\n19537\n19538\n19539\n19540\n19541\n19542\n19543\n19544\n19545\n19546\n19547\n19548\n19549\n19550\n19551\n19552\n19553\n19554\n19555\n19556\n19557\n19558\n19559\n19560\n19561\n19562\n19563\n19564\n19565\n19566\n19567\n19568\n19569\n19570\n19571\n19572\n19573\n19574\n19575\n19576\n19577\n19578\n19579\n19580\n19581\n19582\n19583\n19584\n19585\n19586\n19587\n19588\n19589\n19590\n19591\n19592\n19593\n19594\n19595\n19596\n19597\n19598\n19599\n19600\n19601\n19602\n19603\n19604\n19605\n19606\n19607\n19608\n19609\n19610\n19611\n19612\n19613\n19614\n19615\n19616\n19617\n19618\n19619\n19620\n19621\n19622\n19623\n19624\n19625\n19626\n19627\n19628\n19629\n19630\n19631\n19632\n19633\n19634\n19635\n19636\n19637\n19638\n19639\n19640\n19641\n19642\n19643\n19644\n19645\n19646\n19647\n19648\n19649\n19650\n19651\n19652\n19653\n19654\n19655\n19656\n19657\n19658\n19659\n19660\n19661\n19662\n19663\n19664\n19665\n19666\n19667\n19668\n19669\n19670\n19671\n19672\n19673\n19674\n19675\n19676\n19677\n19678\n19679\n19680\n19681\n19682\n19683\n19684\n19685\n19686\n19687\n19688\n19689\n19690\n19691\n19692\n19693\n19694\n19695\n19696\n19697\n19698\n19699\n19700\n19701\n19702\n19703\n19704\n19705\n19706\n19707\n19708\n19709\n19710\n19711\n19712\n19713\n19714\n19715\n19716\n19717\n19718\n19719\n19720\n19721\n19722\n19723\n19724\n19725\n19726\n19727\n19728\n19729\n19730\n19731\n19732\n19733\n19734\n19735\n19736\n19737\n19738\n19739\n19740\n19741\n19742\n19743\n19744\n19745\n19746\n19747\n19748\n19749\n19750\n19751\n19752\n19753\n19754\n19755\n19756\n19757\n19758\n19759\n19760\n19761\n19762\n19763\n19764\n19765\n19766\n19767\n19768\n19769\n19770\n19771\n19772\n19773\n19774\n19775\n19776\n19777\n19778\n19779\n19780\n19781\n19782\n19783\n19784\n19785\n19786\n19787\n19788\n19789\n19790\n19791\n19792\n19793\n19794\n19795\n19796\n19797\n19798\n19799\n19800\n19801\n19802\n19803\n19804\n19805\n19806\n19807\n19808\n19809\n19810\n19811\n19812\n19813\n19814\n19815\n19816\n19817\n19818\n19819\n19820\n19821\n19822\n19823\n19824\n19825\n19826\n19827\n19828\n19829\n19830\n19831\n19832\n19833\n19834\n19835\n19836\n19837\n19838\n19839\n19840\n19841\n19842\n19843\n19844\n19845\n19846\n19847\n19848\n19849\n19850\n19851\n19852\n19853\n19854\n19855\n19856\n19857\n19858\n19859\n19860\n19861\n19862\n19863\n19864\n19865\n19866\n19867\n19868\n19869\n19870\n19871\n19872\n19873\n19874\n19875\n19876\n19877\n19878\n19879\n19880\n19881\n19882\n19883\n19884\n19885\n19886\n19887\n19888\n19889\n19890\n19891\n19892\n19893\n19894\n19895\n19896\n19897\n19898\n19899\n19900\n19901\n19902\n19903\n19904\n19905\n19906\n19907\n19908\n19909\n19910\n19911\n19912\n19913\n19914\n19915\n19916\n19917\n19918\n19919\n19920\n19921\n19922\n19923\n19924\n19925\n19926\n19927\n19928\n19929\n19930\n19931\n19932\n19933\n19934\n19935\n19936\n19937\n19938\n19939\n19940\n19941\n19942\n19943\n19944\n19945\n19946\n19947\n19948\n19949\n19950\n19951\n19952\n19953\n19954\n19955\n19956\n19957\n19958\n19959\n19960\n19961\n19962\n19963\n19964\n19965\n19966\n19967\n19968\n19969\n19970\n19971\n19972\n19973\n19974\n19975\n19976\n19977\n19978\n19979\n19980\n19981\n19982\n19983\n19984\n19985\n19986\n19987\n19988\n19989\n19990\n19991\n19992\n19993\n19994\n19995\n19996\n19997\n19998\n19999\n20000\n20001\n20002\n20003\n20004\n20005\n20006\n20007\n20008\n20009\n20010\n20011\n20012\n20013\n20014\n20015\n20016\n20017\n20018\n20019\n20020\n20021\n20022\n20023\n20024\n20025\n20026\n20027\n20028\n20029\n20030\n20031\n20032\n20033\n20034\n20035\n20036\n20037\n20038\n20039\n20040\n20041\n20042\n20043\n20044\n20045\n20046\n20047\n20048\n20049\n20050\n20051\n20052\n20053\n20054\n20055\n20056\n20057\n20058\n20059\n20060\n20061\n20062\n20063\n20064\n20065\n20066\n20067\n20068\n20069\n20070\n20071\n20072\n20073\n20074\n20075\n20076\n20077\n20078\n20079\n20080\n20081\n20082\n20083\n20084\n20085\n20086\n20087\n20088\n20089\n20090\n20091\n20092\n20093\n20094\n20095\n20096\n20097\n20098\n20099\n20100\n20101\n20102\n20103\n20104\n20105\n20106\n20107\n20108\n20109\n20110\n20111\n20112\n20113\n20114\n20115\n20116\n20117\n20118\n20119\n20120\n20121\n20122\n20123\n20124\n20125\n20126\n20127\n20128\n20129\n20130\n20131\n20132\n20133\n20134\n20135\n20136\n20137\n20138\n20139\n20140\n20141\n20142\n20143\n20144\n20145\n20146\n20147\n20148\n20149\n20150\n20151\n20152\n20153\n20154\n20155\n20156\n20157\n20158\n20159\n20160\n20161\n20162\n20163\n20164\n20165\n20166\n20167\n20168\n20169\n20170\n20171\n20172\n20173\n20174\n20175\n20176\n20177\n20178\n20179\n20180\n20181\n20182\n20183\n20184\n20185\n20186\n20187\n20188\n20189\n20190\n20191\n20192\n20193\n20194\n20195\n20196\n20197\n20198\n20199\n20200\n20201\n20202\n20203\n20204\n20205\n20206\n20207\n20208\n20209\n20210\n20211\n20212\n20213\n20214\n20215\n20216\n20217\n20218\n20219\n20220\n20221\n20222\n20223\n20224\n20225\n20226\n20227\n20228\n20229\n20230\n20231\n20232\n20233\n20234\n20235\n20236\n20237\n20238\n20239\n20240\n20241\n20242\n20243\n20244\n20245\n20246\n20247\n20248\n20249\n20250\n20251\n20252\n20253\n20254\n20255\n20256\n20257\n20258\n20259\n20260\n20261\n20262\n20263\n20264\n20265\n20266\n20267\n20268\n20269\n20270\n20271\n20272\n20273\n20274\n20275\n20276\n20277\n20278\n20279\n20280\n20281\n20282\n20283\n20284\n20285\n20286\n20287\n20288\n20289\n20290\n20291\n20292\n20293\n20294\n20295\n20296\n20297\n20298\n20299\n20300\n20301\n20302\n20303\n20304\n20305\n20306\n20307\n20308\n20309\n20310\n20311\n20312\n20313\n20314\n20315\n20316\n20317\n20318\n20319\n20320\n20321\n20322\n20323\n20324\n20325\n20326\n20327\n20328\n20329\n20330\n20331\n20332\n20333\n20334\n20335\n20336\n20337\n20338\n20339\n20340\n20341\n20342\n20343\n20344\n20345\n20346\n20347\n20348\n20349\n20350\n20351\n20352\n20353\n20354\n20355\n20356\n20357\n20358\n20359\n20360\n20361\n20362\n20363\n20364\n20365\n20366\n20367\n20368\n20369\n20370\n20371\n20372\n20373\n20374\n20375\n20376\n20377\n20378\n20379\n20380\n20381\n20382\n20383\n20384\n20385\n20386\n20387\n20388\n20389\n20390\n20391\n20392\n20393\n20394\n20395\n20396\n20397\n20398\n20399\n20400\n20401\n20402\n20403\n20404\n20405\n20406\n20407\n20408\n20409\n20410\n20411\n20412\n20413\n20414\n20415\n20416\n20417\n20418\n20419\n20420\n20421\n20422\n20423\n20424\n20425\n20426\n20427\n20428\n20429\n20430\n20431\n20432\n20433\n20434\n20435\n20436\n20437\n20438\n20439\n20440\n20441\n20442\n20443\n20444\n20445\n20446\n20447\n20448\n20449\n20450\n20451\n20452\n20453\n20454\n20455\n20456\n20457\n20458\n20459\n20460\n20461\n20462\n20463\n20464\n20465\n20466\n20467\n20468\n20469\n20470\n20471\n20472\n20473\n20474\n20475\n20476\n20477\n20478\n20479\n20480\n20481\n20482\n20483\n20484\n20485\n20486\n20487\n20488\n20489\n20490\n20491\n20492\n20493\n20494\n20495\n20496\n20497\n20498\n20499\n20500\n20501\n20502\n20503\n20504\n20505\n20506\n20507\n20508\n20509\n20510\n20511\n20512\n20513\n20514\n20515\n20516\n20517\n20518\n20519\n20520\n20521\n20522\n20523\n20524\n20525\n20526\n20527\n20528\n20529\n20530\n20531\n20532\n20533\n20534\n20535\n20536\n20537\n20538\n20539\n20540\n20541\n20542\n20543\n20544\n20545\n20546\n20547\n20548\n20549\n20550\n20551\n20552\n20553\n20554\n20555\n20556\n20557\n20558\n20559\n20560\n20561\n20562\n20563\n20564\n20565\n20566\n20567\n20568\n20569\n20570\n20571\n20572\n20573\n20574\n20575\n20576\n20577\n20578\n20579\n20580\n20581\n20582\n20583\n20584\n20585\n20586\n20587\n20588\n20589\n20590\n20591\n20592\n20593\n20594\n20595\n20596\n20597\n20598\n20599\n20600\n20601\n20602\n20603\n20604\n20605\n20606\n20607\n20608\n20609\n20610\n20611\n20612\n20613\n20614\n20615\n20616\n20617\n20618\n20619\n20620\n20621\n20622\n20623\n20624\n20625\n20626\n20627\n20628\n20629\n20630\n20631\n20632\n20633\n20634\n20635\n20636\n20637\n20638\n20639\n20640\n20641\n20642\n20643\n20644\n20645\n20646\n20647\n20648\n20649\n20650\n20651\n20652\n20653\n20654\n20655\n20656\n20657\n20658\n20659\n20660\n20661\n20662\n20663\n20664\n20665\n20666\n20667\n20668\n20669\n20670\n20671\n20672\n20673\n20674\n20675\n20676\n20677\n20678\n20679\n20680\n20681\n20682\n20683\n20684\n20685\n20686\n20687\n20688\n20689\n20690\n20691\n20692\n20693\n20694\n20695\n20696\n20697\n20698\n20699\n20700\n20701\n20702\n20703\n20704\n20705\n20706\n20707\n20708\n20709\n20710\n20711\n20712\n20713\n20714\n20715\n20716\n20717\n20718\n20719\n20720\n20721\n20722\n20723\n20724\n20725\n20726\n20727\n20728\n20729\n20730\n20731\n20732\n20733\n20734\n20735\n20736\n20737\n20738\n20739\n20740\n20741\n20742\n20743\n20744\n20745\n20746\n20747\n20748\n20749\n20750\n20751\n20752\n20753\n20754\n20755\n20756\n20757\n20758\n20759\n20760\n20761\n20762\n20763\n20764\n20765\n20766\n20767\n20768\n20769\n20770\n20771\n20772\n20773\n20774\n20775\n20776\n20777\n20778\n20779\n20780\n20781\n20782\n20783\n20784\n20785\n20786\n20787\n20788\n20789\n20790\n20791\n20792\n20793\n20794\n20795\n20796\n20797\n20798\n20799\n20800\n20801\n20802\n20803\n20804\n20805\n20806\n20807\n20808\n20809\n20810\n20811\n20812\n20813\n20814\n20815\n20816\n20817\n20818\n20819\n20820\n20821\n20822\n20823\n20824\n20825\n20826\n20827\n20828\n20829\n20830\n20831\n20832\n20833\n20834\n20835\n20836\n20837\n20838\n20839\n20840\n20841\n20842\n20843\n20844\n20845\n20846\n20847\n20848\n20849\n20850\n20851\n20852\n20853\n20854\n20855\n20856\n20857\n20858\n20859\n20860\n20861\n20862\n20863\n20864\n20865\n20866\n20867\n20868\n20869\n20870\n20871\n20872\n20873\n20874\n20875\n20876\n20877\n20878\n20879\n20880\n20881\n20882\n20883\n20884\n20885\n20886\n20887\n20888\n20889\n20890\n20891\n20892\n20893\n20894\n20895\n20896\n20897\n20898\n20899\n20900\n20901\n20902\n20903\n20904\n20905\n20906\n20907\n20908\n20909\n20910\n20911\n20912\n20913\n20914\n20915\n20916\n20917\n20918\n20919\n20920\n20921\n20922\n20923\n20924\n20925\n20926\n20927\n20928\n20929\n20930\n20931\n20932\n20933\n20934\n20935\n20936\n20937\n20938\n20939\n20940\n20941\n20942\n20943\n20944\n20945\n20946\n20947\n20948\n20949\n20950\n20951\n20952\n20953\n20954\n20955\n20956\n20957\n20958\n20959\n20960\n20961\n20962\n20963\n20964\n20965\n20966\n20967\n20968\n20969\n20970\n20971\n20972\n20973\n20974\n20975\n20976\n20977\n20978\n20979\n20980\n20981\n20982\n20983\n20984\n20985\n20986\n20987\n20988\n20989\n20990\n20991\n20992\n20993\n20994\n20995\n20996\n20997\n20998\n20999\n21000\n21001\n21002\n21003\n21004\n21005\n21006\n21007\n21008\n21009\n21010\n21011\n21012\n21013\n21014\n21015\n21016\n21017\n21018\n21019\n21020\n21021\n21022\n21023\n21024\n21025\n21026\n21027\n21028\n21029\n21030\n21031\n21032\n21033\n21034\n21035\n21036\n21037\n21038\n21039\n21040\n21041\n21042\n21043\n21044\n21045\n21046\n21047\n21048\n21049\n21050\n21051\n21052\n21053\n21054\n21055\n21056\n21057\n21058\n21059\n21060\n21061\n21062\n21063\n21064\n21065\n21066\n21067\n21068\n21069\n21070\n21071\n21072\n21073\n21074\n21075\n21076\n21077\n21078\n21079\n21080\n21081\n21082\n21083\n21084\n21085\n21086\n21087\n21088\n21089\n21090\n21091\n21092\n21093\n21094\n21095\n21096\n21097\n21098\n21099\n21100\n21101\n21102\n21103\n21104\n21105\n21106\n21107\n21108\n21109\n21110\n21111\n21112\n21113\n21114\n21115\n21116\n21117\n21118\n21119\n21120\n21121\n21122\n21123\n21124\n21125\n21126\n21127\n21128\n21129\n21130\n21131\n21132\n21133\n21134\n21135\n21136\n21137\n21138\n21139\n21140\n21141\n21142\n21143\n21144\n21145\n21146\n21147\n21148\n21149\n21150\n21151\n21152\n21153\n21154\n21155\n21156\n21157\n21158\n21159\n21160\n21161\n21162\n21163\n21164\n21165\n21166\n21167\n21168\n21169\n21170\n21171\n21172\n21173\n21174\n21175\n21176\n21177\n21178\n21179\n21180\n21181\n21182\n21183\n21184\n21185\n21186\n21187\n21188\n21189\n21190\n21191\n21192\n21193\n21194\n21195\n21196\n21197\n21198\n21199\n21200\n21201\n21202\n21203\n21204\n21205\n21206\n21207\n21208\n21209\n21210\n21211\n21212\n21213\n21214\n21215\n21216\n21217\n21218\n21219\n21220\n21221\n21222\n21223\n21224\n21225\n21226\n21227\n21228\n21229\n21230\n21231\n21232\n21233\n21234\n21235\n21236\n21237\n21238\n21239\n21240\n21241\n21242\n21243\n21244\n21245\n21246\n21247\n21248\n21249\n21250\n21251\n21252\n21253\n21254\n21255\n21256\n21257\n21258\n21259\n21260\n21261\n21262\n21263\n21264\n21265\n21266\n21267\n21268\n21269\n21270\n21271\n21272\n21273\n21274\n21275\n21276\n21277\n21278\n21279\n21280\n21281\n21282\n21283\n21284\n21285\n21286\n21287\n21288\n21289\n21290\n21291\n21292\n21293\n21294\n21295\n21296\n21297\n21298\n21299\n21300\n21301\n21302\n21303\n21304\n21305\n21306\n21307\n21308\n21309\n21310\n21311\n21312\n21313\n21314\n21315\n21316\n21317\n21318\n21319\n21320\n21321\n21322\n21323\n21324\n21325\n21326\n21327\n21328\n21329\n21330\n21331\n21332\n21333\n21334\n21335\n21336\n21337\n21338\n21339\n21340\n21341\n21342\n21343\n21344\n21345\n21346\n21347\n21348\n21349\n21350\n21351\n21352\n21353\n21354\n21355\n21356\n21357\n21358\n21359\n21360\n21361\n21362\n21363\n21364\n21365\n21366\n21367\n21368\n21369\n21370\n21371\n21372\n21373\n21374\n21375\n21376\n21377\n21378\n21379\n21380\n21381\n21382\n21383\n21384\n21385\n21386\n21387\n21388\n21389\n21390\n21391\n21392\n21393\n21394\n21395\n21396\n21397\n21398\n21399\n21400\n21401\n21402\n21403\n21404\n21405\n21406\n21407\n21408\n21409\n21410\n21411\n21412\n21413\n21414\n21415\n21416\n21417\n21418\n21419\n21420\n21421\n21422\n21423\n21424\n21425\n21426\n21427\n21428\n21429\n21430\n21431\n21432\n21433\n21434\n21435\n21436\n21437\n21438\n21439\n21440\n21441\n21442\n21443\n21444\n21445\n21446\n21447\n21448\n21449\n21450\n21451\n21452\n21453\n21454\n21455\n21456\n21457\n21458\n21459\n21460\n21461\n21462\n21463\n21464\n21465\n21466\n21467\n21468\n21469\n21470\n21471\n21472\n21473\n21474\n21475\n21476\n21477\n21478\n21479\n21480\n21481\n21482\n21483\n21484\n21485\n21486\n21487\n21488\n21489\n21490\n21491\n21492\n21493\n21494\n21495\n21496\n21497\n21498\n21499\n21500\n21501\n21502\n21503\n21504\n21505\n21506\n21507\n21508\n21509\n21510\n21511\n21512\n21513\n21514\n21515\n21516\n21517\n21518\n21519\n21520\n21521\n21522\n21523\n21524\n21525\n21526\n21527\n21528\n21529\n21530\n21531\n21532\n21533\n21534\n21535\n21536\n21537\n21538\n21539\n21540\n21541\n21542\n21543\n21544\n21545\n21546\n21547\n21548\n21549\n21550\n21551\n21552\n21553\n21554\n21555\n21556\n21557\n21558\n21559\n21560\n21561\n21562\n21563\n21564\n21565\n21566\n21567\n21568\n21569\n21570\n21571\n21572\n21573\n21574\n21575\n21576\n21577\n21578\n21579\n21580\n21581\n21582\n21583\n21584\n21585\n21586\n21587\n21588\n21589\n21590\n21591\n21592\n21593\n21594\n21595\n21596\n21597\n21598\n21599\n21600\n21601\n21602\n21603\n21604\n21605\n21606\n21607\n21608\n21609\n21610\n21611\n21612\n21613\n21614\n21615\n21616\n21617\n21618\n21619\n21620\n21621\n21622\n21623\n21624\n21625\n21626\n21627\n21628\n21629\n21630\n21631\n21632\n21633\n21634\n21635\n21636\n21637\n21638\n21639\n21640\n21641\n21642\n21643\n21644\n21645\n21646\n21647\n21648\n21649\n21650\n21651\n21652\n21653\n21654\n21655\n21656\n21657\n21658\n21659\n21660\n21661\n21662\n21663\n21664\n21665\n21666\n21667\n21668\n21669\n21670\n21671\n21672\n21673\n21674\n21675\n21676\n21677\n21678\n21679\n21680\n21681\n21682\n21683\n21684\n21685\n21686\n21687\n21688\n21689\n21690\n21691\n21692\n21693\n21694\n21695\n21696\n21697\n21698\n21699\n21700\n21701\n21702\n21703\n21704\n21705\n21706\n21707\n21708\n21709\n21710\n21711\n21712\n21713\n21714\n21715\n21716\n21717\n21718\n21719\n21720\n21721\n21722\n21723\n21724\n21725\n21726\n21727\n21728\n21729\n21730\n21731\n21732\n21733\n21734\n21735\n21736\n21737\n21738\n21739\n21740\n21741\n21742\n21743\n21744\n21745\n21746\n21747\n21748\n21749\n21750\n21751\n21752\n21753\n21754\n21755\n21756\n21757\n21758\n21759\n21760\n21761\n21762\n21763\n21764\n21765\n21766\n21767\n21768\n21769\n21770\n21771\n21772\n21773\n21774\n21775\n21776\n21777\n21778\n21779\n21780\n21781\n21782\n21783\n21784\n21785\n21786\n21787\n21788\n21789\n21790\n21791\n21792\n21793\n21794\n21795\n21796\n21797\n21798\n21799\n21800\n21801\n21802\n21803\n21804\n21805\n21806\n21807\n21808\n21809\n21810\n21811\n21812\n21813\n21814\n21815\n21816\n21817\n21818\n21819\n21820\n21821\n21822\n21823\n21824\n21825\n21826\n21827\n21828\n21829\n21830\n21831\n21832\n21833\n21834\n21835\n21836\n21837\n21838\n21839\n21840\n21841\n21842\n21843\n21844\n21845\n21846\n21847\n21848\n21849\n21850\n21851\n21852\n21853\n21854\n21855\n21856\n21857\n21858\n21859\n21860\n21861\n21862\n21863\n21864\n21865\n21866\n21867\n21868\n21869\n21870\n21871\n21872\n21873\n21874\n21875\n21876\n21877\n21878\n21879\n21880\n21881\n21882\n21883\n21884\n21885\n21886\n21887\n21888\n21889\n21890\n21891\n21892\n21893\n21894\n21895\n21896\n21897\n21898\n21899\n21900\n21901\n21902\n21903\n21904\n21905\n21906\n21907\n21908\n21909\n21910\n21911\n21912\n21913\n21914\n21915\n21916\n21917\n21918\n21919\n21920\n21921\n21922\n21923\n21924\n21925\n21926\n21927\n21928\n21929\n21930\n21931\n21932\n21933\n21934\n21935\n21936\n21937\n21938\n21939\n21940\n21941\n21942\n21943\n21944\n21945\n21946\n21947\n21948\n21949\n21950\n21951\n21952\n21953\n21954\n21955\n21956\n21957\n21958\n21959\n21960\n21961\n21962\n21963\n21964\n21965\n21966\n21967\n21968\n21969\n21970\n21971\n21972\n21973\n21974\n21975\n21976\n21977\n21978\n21979\n21980\n21981\n21982\n21983\n21984\n21985\n21986\n21987\n21988\n21989\n21990\n21991\n21992\n21993\n21994\n21995\n21996\n21997\n21998\n21999\n22000\n22001\n22002\n22003\n22004\n22005\n22006\n22007\n22008\n22009\n22010\n22011\n22012\n22013\n22014\n22015\n22016\n22017\n22018\n22019\n22020\n22021\n22022\n22023\n22024\n22025\n22026\n22027\n22028\n22029\n22030\n22031\n22032\n22033\n22034\n22035\n22036\n22037\n22038\n22039\n22040\n22041\n22042\n22043\n22044\n22045\n22046\n22047\n22048\n22049\n22050\n22051\n22052\n22053\n22054\n22055\n22056\n22057\n22058\n22059\n22060\n22061\n22062\n22063\n22064\n22065\n22066\n22067\n22068\n22069\n22070\n22071\n22072\n22073\n22074\n22075\n22076\n22077\n22078\n22079\n22080\n22081\n22082\n22083\n22084\n22085\n22086\n22087\n22088\n22089\n22090\n22091\n22092\n22093\n22094\n22095\n22096\n22097\n22098\n22099\n22100\n22101\n22102\n22103\n22104\n22105\n22106\n22107\n22108\n22109\n22110\n22111\n22112\n22113\n22114\n22115\n22116\n22117\n22118\n22119\n22120\n22121\n22122\n22123\n22124\n22125\n22126\n22127\n22128\n22129\n22130\n22131\n22132\n22133\n22134\n22135\n22136\n22137\n22138\n22139\n22140\n22141\n22142\n22143\n22144\n22145\n22146\n22147\n22148\n22149\n22150\n22151\n22152\n22153\n22154\n22155\n22156\n22157\n22158\n22159\n22160\n22161\n22162\n22163\n22164\n22165\n22166\n22167\n22168\n22169\n22170\n22171\n22172\n22173\n22174\n22175\n22176\n22177\n22178\n22179\n22180\n22181\n22182\n22183\n22184\n22185\n22186\n22187\n22188\n22189\n22190\n22191\n22192\n22193\n22194\n22195\n22196\n22197\n22198\n22199\n22200\n22201\n22202\n22203\n22204\n22205\n22206\n22207\n22208\n22209\n22210\n22211\n22212\n22213\n22214\n22215\n22216\n22217\n22218\n22219\n22220\n22221\n22222\n22223\n22224\n22225\n22226\n22227\n22228\n22229\n22230\n22231\n22232\n22233\n22234\n22235\n22236\n22237\n22238\n22239\n22240\n22241\n22242\n22243\n22244\n22245\n22246\n22247\n22248\n22249\n22250\n22251\n22252\n22253\n22254\n22255\n22256\n22257\n22258\n22259\n22260\n22261\n22262\n22263\n22264\n22265\n22266\n22267\n22268\n22269\n22270\n22271\n22272\n22273\n22274\n22275\n22276\n22277\n22278\n22279\n22280\n22281\n22282\n22283\n22284\n22285\n22286\n22287\n22288\n22289\n22290\n22291\n22292\n22293\n22294\n22295\n22296\n22297\n22298\n22299\n22300\n22301\n22302\n22303\n22304\n22305\n22306\n22307\n22308\n22309\n22310\n22311\n22312\n22313\n22314\n22315\n22316\n22317\n22318\n22319\n22320\n22321\n22322\n22323\n22324\n22325\n22326\n22327\n22328\n22329\n22330\n22331\n22332\n22333\n22334\n22335\n22336\n22337\n22338\n22339\n22340\n22341\n22342\n22343\n22344\n22345\n22346\n22347\n22348\n22349\n22350\n22351\n22352\n22353\n22354\n22355\n22356\n22357\n22358\n22359\n22360\n22361\n22362\n22363\n22364\n22365\n22366\n22367\n22368\n22369\n22370\n22371\n22372\n22373\n22374\n22375\n22376\n22377\n22378\n22379\n22380\n22381\n22382\n22383\n22384\n22385\n22386\n22387\n22388\n22389\n22390\n22391\n22392\n22393\n22394\n22395\n22396\n22397\n22398\n22399\n22400\n22401\n22402\n22403\n22404\n22405\n22406\n22407\n22408\n22409\n22410\n22411\n22412\n22413\n22414\n22415\n22416\n22417\n22418\n22419\n22420\n22421\n22422\n22423\n22424\n22425\n22426\n22427\n22428\n22429\n22430\n22431\n22432\n22433\n22434\n22435\n22436\n22437\n22438\n22439\n22440\n22441\n22442\n22443\n22444\n22445\n22446\n22447\n22448\n22449\n22450\n22451\n22452\n22453\n22454\n22455\n22456\n22457\n22458\n22459\n22460\n22461\n22462\n22463\n22464\n22465\n22466\n22467\n22468\n22469\n22470\n22471\n22472\n22473\n22474\n22475\n22476\n22477\n22478\n22479\n22480\n22481\n22482\n22483\n22484\n22485\n22486\n22487\n22488\n22489\n22490\n22491\n22492\n22493\n22494\n22495\n22496\n22497\n22498\n22499\n22500\n22501\n22502\n22503\n22504\n22505\n22506\n22507\n22508\n22509\n22510\n22511\n22512\n22513\n22514\n22515\n22516\n22517\n22518\n22519\n22520\n22521\n22522\n22523\n22524\n22525\n22526\n22527\n22528\n22529\n22530\n22531\n22532\n22533\n22534\n22535\n22536\n22537\n22538\n22539\n22540\n22541\n22542\n22543\n22544\n22545\n22546\n22547\n22548\n22549\n22550\n22551\n22552\n22553\n22554\n22555\n22556\n22557\n22558\n22559\n22560\n22561\n22562\n22563\n22564\n22565\n22566\n22567\n22568\n22569\n22570\n22571\n22572\n22573\n22574\n22575\n22576\n22577\n22578\n22579\n22580\n22581\n22582\n22583\n22584\n22585\n22586\n22587\n22588\n22589\n22590\n22591\n22592\n22593\n22594\n22595\n22596\n22597\n22598\n22599\n22600\n22601\n22602\n22603\n22604\n22605\n22606\n22607\n22608\n22609\n22610\n22611\n22612\n22613\n22614\n22615\n22616\n22617\n22618\n22619\n22620\n22621\n22622\n22623\n22624\n22625\n22626\n22627\n22628\n22629\n22630\n22631\n22632\n22633\n22634\n22635\n22636\n22637\n22638\n22639\n22640\n22641\n22642\n22643\n22644\n22645\n22646\n22647\n22648\n22649\n22650\n22651\n22652\n22653\n22654\n22655\n22656\n22657\n22658\n22659\n22660\n22661\n22662\n22663\n22664\n22665\n22666\n22667\n22668\n22669\n22670\n22671\n22672\n22673\n22674\n22675\n22676\n22677\n22678\n22679\n22680\n22681\n22682\n22683\n22684\n22685\n22686\n22687\n22688\n22689\n22690\n22691\n22692\n22693\n22694\n22695\n22696\n22697\n22698\n22699\n22700\n22701\n22702\n22703\n22704\n22705\n22706\n22707\n22708\n22709\n22710\n22711\n22712\n22713\n22714\n22715\n22716\n22717\n22718\n22719\n22720\n22721\n22722\n22723\n22724\n22725\n22726\n22727\n22728\n22729\n22730\n22731\n22732\n22733\n22734\n22735\n22736\n22737\n22738\n22739\n22740\n22741\n22742\n22743\n22744\n22745\n22746\n22747\n22748\n22749\n22750\n22751\n22752\n22753\n22754\n22755\n22756\n22757\n22758\n22759\n22760\n22761\n22762\n22763\n22764\n22765\n22766\n22767\n22768\n22769\n22770\n22771\n22772\n22773\n22774\n22775\n22776\n22777\n22778\n22779\n22780\n22781\n22782\n22783\n22784\n22785\n22786\n22787\n22788\n22789\n22790\n22791\n22792\n22793\n22794\n22795\n22796\n22797\n22798\n22799\n22800\n22801\n22802\n22803\n22804\n22805\n22806\n22807\n22808\n22809\n22810\n22811\n22812\n22813\n22814\n22815\n22816\n22817\n22818\n22819\n22820\n22821\n22822\n22823\n22824\n22825\n22826\n22827\n22828\n22829\n22830\n22831\n22832\n22833\n22834\n22835\n22836\n22837\n22838\n22839\n22840\n22841\n22842\n22843\n22844\n22845\n22846\n22847\n22848\n22849\n22850\n22851\n22852\n22853\n22854\n22855\n22856\n22857\n22858\n22859\n22860\n22861\n22862\n22863\n22864\n22865\n22866\n22867\n22868\n22869\n22870\n22871\n22872\n22873\n22874\n22875\n22876\n22877\n22878\n22879\n22880\n22881\n22882\n22883\n22884\n22885\n22886\n22887\n22888\n22889\n22890\n22891\n22892\n22893\n22894\n22895\n22896\n22897\n22898\n22899\n22900\n22901\n22902\n22903\n22904\n22905\n22906\n22907\n22908\n22909\n22910\n22911\n22912\n22913\n22914\n22915\n22916\n22917\n22918\n22919\n22920\n22921\n22922\n22923\n22924\n22925\n22926\n22927\n22928\n22929\n22930\n22931\n22932\n22933\n22934\n22935\n22936\n22937\n22938\n22939\n22940\n22941\n22942\n22943\n22944\n22945\n22946\n22947\n22948\n22949\n22950\n22951\n22952\n22953\n22954\n22955\n22956\n22957\n22958\n22959\n22960\n22961\n22962\n22963\n22964\n22965\n22966\n22967\n22968\n22969\n22970\n22971\n22972\n22973\n22974\n22975\n22976\n22977\n22978\n22979\n22980\n22981\n22982\n22983\n22984\n22985\n22986\n22987\n22988\n22989\n22990\n22991\n22992\n22993\n22994\n22995\n22996\n22997\n22998\n22999\n23000\n23001\n23002\n23003\n23004\n23005\n23006\n23007\n23008\n23009\n23010\n23011\n23012\n23013\n23014\n23015\n23016\n23017\n23018\n23019\n23020\n23021\n23022\n23023\n23024\n23025\n23026\n23027\n23028\n23029\n23030\n23031\n23032\n23033\n23034\n23035\n23036\n23037\n23038\n23039\n23040\n23041\n23042\n23043\n23044\n23045\n23046\n23047\n23048\n23049\n23050\n23051\n23052\n23053\n23054\n23055\n23056\n23057\n23058\n23059\n23060\n23061\n23062\n23063\n23064\n23065\n23066\n23067\n23068\n23069\n23070\n23071\n23072\n23073\n23074\n23075\n23076\n23077\n23078\n23079\n23080\n23081\n23082\n23083\n23084\n23085\n23086\n23087\n23088\n23089\n23090\n23091\n23092\n23093\n23094\n23095\n23096\n23097\n23098\n23099\n23100\n23101\n23102\n23103\n23104\n23105\n23106\n23107\n23108\n23109\n23110\n23111\n23112\n23113\n23114\n23115\n23116\n23117\n23118\n23119\n23120\n23121\n23122\n23123\n23124\n23125\n23126\n23127\n23128\n23129\n23130\n23131\n23132\n23133\n23134\n23135\n23136\n23137\n23138\n23139\n23140\n23141\n23142\n23143\n23144\n23145\n23146\n23147\n23148\n23149\n23150\n23151\n23152\n23153\n23154\n23155\n23156\n23157\n23158\n23159\n23160\n23161\n23162\n23163\n23164\n23165\n23166\n23167\n23168\n23169\n23170\n23171\n23172\n23173\n23174\n23175\n23176\n23177\n23178\n23179\n23180\n23181\n23182\n23183\n23184\n23185\n23186\n23187\n23188\n23189\n23190\n23191\n23192\n23193\n23194\n23195\n23196\n23197\n23198\n23199\n23200\n23201\n23202\n23203\n23204\n23205\n23206\n23207\n23208\n23209\n23210\n23211\n23212\n23213\n23214\n23215\n23216\n23217\n23218\n23219\n23220\n23221\n23222\n23223\n23224\n23225\n23226\n23227\n23228\n23229\n23230\n23231\n23232\n23233\n23234\n23235\n23236\n23237\n23238\n23239\n23240\n23241\n23242\n23243\n23244\n23245\n23246\n23247\n23248\n23249\n23250\n23251\n23252\n23253\n23254\n23255\n23256\n23257\n23258\n23259\n23260\n23261\n23262\n23263\n23264\n23265\n23266\n23267\n23268\n23269\n23270\n23271\n23272\n23273\n23274\n23275\n23276\n23277\n23278\n23279\n23280\n23281\n23282\n23283\n23284\n23285\n23286\n23287\n23288\n23289\n23290\n23291\n23292\n23293\n23294\n23295\n23296\n23297\n23298\n23299\n23300\n23301\n23302\n23303\n23304\n23305\n23306\n23307\n23308\n23309\n23310\n23311\n23312\n23313\n23314\n23315\n23316\n23317\n23318\n23319\n23320\n23321\n23322\n23323\n23324\n23325\n23326\n23327\n23328\n23329\n23330\n23331\n23332\n23333\n23334\n23335\n23336\n23337\n23338\n23339\n23340\n23341\n23342\n23343\n23344\n23345\n23346\n23347\n23348\n23349\n23350\n23351\n23352\n23353\n23354\n23355\n23356\n23357\n23358\n23359\n23360\n23361\n23362\n23363\n23364\n23365\n23366\n23367\n23368\n23369\n23370\n23371\n23372\n23373\n23374\n23375\n23376\n23377\n23378\n23379\n23380\n23381\n23382\n23383\n23384\n23385\n23386\n23387\n23388\n23389\n23390\n23391\n23392\n23393\n23394\n23395\n23396\n23397\n23398\n23399\n23400\n23401\n23402\n23403\n23404\n23405\n23406\n23407\n23408\n23409\n23410\n23411\n23412\n23413\n23414\n23415\n23416\n23417\n23418\n23419\n23420\n23421\n23422\n23423\n23424\n23425\n23426\n23427\n23428\n23429\n23430\n23431\n23432\n23433\n23434\n23435\n23436\n23437\n23438\n23439\n23440\n23441\n23442\n23443\n23444\n23445\n23446\n23447\n23448\n23449\n23450\n23451\n23452\n23453\n23454\n23455\n23456\n23457\n23458\n23459\n23460\n23461\n23462\n23463\n23464\n23465\n23466\n23467\n23468\n23469\n23470\n23471\n23472\n23473\n23474\n23475\n23476\n23477\n23478\n23479\n23480\n23481\n23482\n23483\n23484\n23485\n23486\n23487\n23488\n23489\n23490\n23491\n23492\n23493\n23494\n23495\n23496\n23497\n23498\n23499\n23500\n23501\n23502\n23503\n23504\n23505\n23506\n23507\n23508\n23509\n23510\n23511\n23512\n23513\n23514\n23515\n23516\n23517\n23518\n23519\n23520\n23521\n23522\n23523\n23524\n23525\n23526\n23527\n23528\n23529\n23530\n23531\n23532\n23533\n23534\n23535\n23536\n23537\n23538\n23539\n23540\n23541\n23542\n23543\n23544\n23545\n23546\n23547\n23548\n23549\n23550\n23551\n23552\n23553\n23554\n23555\n23556\n23557\n23558\n23559\n23560\n23561\n23562\n23563\n23564\n23565\n23566\n23567\n23568\n23569\n23570\n23571\n23572\n23573\n23574\n23575\n23576\n23577\n23578\n23579\n23580\n23581\n23582\n23583\n23584\n23585\n23586\n23587\n23588\n23589\n23590\n23591\n23592\n23593\n23594\n23595\n23596\n23597\n23598\n23599\n23600\n23601\n23602\n23603\n23604\n23605\n23606\n23607\n23608\n23609\n23610\n23611\n23612\n23613\n23614\n23615\n23616\n23617\n23618\n23619\n23620\n23621\n23622\n23623\n23624\n23625\n23626\n23627\n23628\n23629\n23630\n23631\n23632\n23633\n23634\n23635\n23636\n23637\n23638\n23639\n23640\n23641\n23642\n23643\n23644\n23645\n23646\n23647\n23648\n23649\n23650\n23651\n23652\n23653\n23654\n23655\n23656\n23657\n23658\n23659\n23660\n23661\n23662\n23663\n23664\n23665\n23666\n23667\n23668\n23669\n23670\n23671\n23672\n23673\n23674\n23675\n23676\n23677\n23678\n23679\n23680\n23681\n23682\n23683\n23684\n23685\n23686\n23687\n23688\n23689\n23690\n23691\n23692\n23693\n23694\n23695\n23696\n23697\n23698\n23699\n23700\n23701\n23702\n23703\n23704\n23705\n23706\n23707\n23708\n23709\n23710\n23711\n23712\n23713\n23714\n23715\n23716\n23717\n23718\n23719\n23720\n23721\n23722\n23723\n23724\n23725\n23726\n23727\n23728\n23729\n23730\n23731\n23732\n23733\n23734\n23735\n23736\n23737\n23738\n23739\n23740\n23741\n23742\n23743\n23744\n23745\n23746\n23747\n23748\n23749\n23750\n23751\n23752\n23753\n23754\n23755\n23756\n23757\n23758\n23759\n23760\n23761\n23762\n23763\n23764\n23765\n23766\n23767\n23768\n23769\n23770\n23771\n23772\n23773\n23774\n23775\n23776\n23777\n23778\n23779\n23780\n23781\n23782\n23783\n23784\n23785\n23786\n23787\n23788\n23789\n23790\n23791\n23792\n23793\n23794\n23795\n23796\n23797\n23798\n23799\n23800\n23801\n23802\n23803\n23804\n23805\n23806\n23807\n23808\n23809\n23810\n23811\n23812\n23813\n23814\n23815\n23816\n23817\n23818\n23819\n23820\n23821\n23822\n23823\n23824\n23825\n23826\n23827\n23828\n23829\n23830\n23831\n23832\n23833\n23834\n23835\n23836\n23837\n23838\n23839\n23840\n23841\n23842\n23843\n23844\n23845\n23846\n23847\n23848\n23849\n23850\n23851\n23852\n23853\n23854\n23855\n23856\n23857\n23858\n23859\n23860\n23861\n23862\n23863\n23864\n23865\n23866\n23867\n23868\n23869\n23870\n23871\n23872\n23873\n23874\n23875\n23876\n23877\n23878\n23879\n23880\n23881\n23882\n23883\n23884\n23885\n23886\n23887\n23888\n23889\n23890\n23891\n23892\n23893\n23894\n23895\n23896\n23897\n23898\n23899\n23900\n23901\n23902\n23903\n23904\n23905\n23906\n23907\n23908\n23909\n23910\n23911\n23912\n23913\n23914\n23915\n23916\n23917\n23918\n23919\n23920\n23921\n23922\n23923\n23924\n23925\n23926\n23927\n23928\n23929\n23930\n23931\n23932\n23933\n23934\n23935\n23936\n23937\n23938\n23939\n23940\n23941\n23942\n23943\n23944\n23945\n23946\n23947\n23948\n23949\n23950\n23951\n23952\n23953\n23954\n23955\n23956\n23957\n23958\n23959\n23960\n23961\n23962\n23963\n23964\n23965\n23966\n23967\n23968\n23969\n23970\n23971\n23972\n23973\n23974\n23975\n23976\n23977\n23978\n23979\n23980\n23981\n23982\n23983\n23984\n23985\n23986\n23987\n23988\n23989\n23990\n23991\n23992\n23993\n23994\n23995\n23996\n23997\n23998\n23999\n24000\n24001\n24002\n24003\n24004\n24005\n24006\n24007\n24008\n24009\n24010\n24011\n24012\n24013\n24014\n24015\n24016\n24017\n24018\n24019\n24020\n24021\n24022\n24023\n24024\n24025\n24026\n24027\n24028\n24029\n24030\n24031\n24032\n24033\n24034\n24035\n24036\n24037\n24038\n24039\n24040\n24041\n24042\n24043\n24044\n24045\n24046\n24047\n24048\n24049\n24050\n24051\n24052\n24053\n24054\n24055\n24056\n24057\n24058\n24059\n24060\n24061\n24062\n24063\n24064\n24065\n24066\n24067\n24068\n24069\n24070\n24071\n24072\n24073\n24074\n24075\n24076\n24077\n24078\n24079\n24080\n24081\n24082\n24083\n24084\n24085\n24086\n24087\n24088\n24089\n24090\n24091\n24092\n24093\n24094\n24095\n24096\n24097\n24098\n24099\n24100\n24101\n24102\n24103\n24104\n24105\n24106\n24107\n24108\n24109\n24110\n24111\n24112\n24113\n24114\n24115\n24116\n24117\n24118\n24119\n24120\n24121\n24122\n24123\n24124\n24125\n24126\n24127\n24128\n24129\n24130\n24131\n24132\n24133\n24134\n24135\n24136\n24137\n24138\n24139\n24140\n24141\n24142\n24143\n24144\n24145\n24146\n24147\n24148\n24149\n24150\n24151\n24152\n24153\n24154\n24155\n24156\n24157\n24158\n24159\n24160\n24161\n24162\n24163\n24164\n24165\n24166\n24167\n24168\n24169\n24170\n24171\n24172\n24173\n24174\n24175\n24176\n24177\n24178\n24179\n24180\n24181\n24182\n24183\n24184\n24185\n24186\n24187\n24188\n24189\n24190\n24191\n24192\n24193\n24194\n24195\n24196\n24197\n24198\n24199\n24200\n24201\n24202\n24203\n24204\n24205\n24206\n24207\n24208\n24209\n24210\n24211\n24212\n24213\n24214\n24215\n24216\n24217\n24218\n24219\n24220\n24221\n24222\n24223\n24224\n24225\n24226\n24227\n24228\n24229\n24230\n24231\n24232\n24233\n24234\n24235\n24236\n24237\n24238\n24239\n24240\n24241\n24242\n24243\n24244\n24245\n24246\n24247\n24248\n24249\n24250\n24251\n24252\n24253\n24254\n24255\n24256\n24257\n24258\n24259\n24260\n24261\n24262\n24263\n24264\n24265\n24266\n24267\n24268\n24269\n24270\n24271\n24272\n24273\n24274\n24275\n24276\n24277\n24278\n24279\n24280\n24281\n24282\n24283\n24284\n24285\n24286\n24287\n24288\n24289\n24290\n24291\n24292\n24293\n24294\n24295\n24296\n24297\n24298\n24299\n24300\n24301\n24302\n24303\n24304\n24305\n24306\n24307\n24308\n24309\n24310\n24311\n24312\n24313\n24314\n24315\n24316\n24317\n24318\n24319\n24320\n24321\n24322\n24323\n24324\n24325\n24326\n24327\n24328\n24329\n24330\n24331\n24332\n24333\n24334\n24335\n24336\n24337\n24338\n24339\n24340\n24341\n24342\n24343\n24344\n24345\n24346\n24347\n24348\n24349\n24350\n24351\n24352\n24353\n24354\n24355\n24356\n24357\n24358\n24359\n24360\n24361\n24362\n24363\n24364\n24365\n24366\n24367\n24368\n24369\n24370\n24371\n24372\n24373\n24374\n24375\n24376\n24377\n24378\n24379\n24380\n24381\n24382\n24383\n24384\n24385\n24386\n24387\n24388\n24389\n24390\n24391\n24392\n24393\n24394\n24395\n24396\n24397\n24398\n24399\n24400\n24401\n24402\n24403\n24404\n24405\n24406\n24407\n24408\n24409\n24410\n24411\n24412\n24413\n24414\n24415\n24416\n24417\n24418\n24419\n24420\n24421\n24422\n24423\n24424\n24425\n24426\n24427\n24428\n24429\n24430\n24431\n24432\n24433\n24434\n24435\n24436\n24437\n24438\n24439\n24440\n24441\n24442\n24443\n24444\n24445\n24446\n24447\n24448\n24449\n24450\n24451\n24452\n24453\n24454\n24455\n24456\n24457\n24458\n24459\n24460\n24461\n24462\n24463\n24464\n24465\n24466\n24467\n24468\n24469\n24470\n24471\n24472\n24473\n24474\n24475\n24476\n24477\n24478\n24479\n24480\n24481\n24482\n24483\n24484\n24485\n24486\n24487\n24488\n24489\n24490\n24491\n24492\n24493\n24494\n24495\n24496\n24497\n24498\n24499\n24500\n24501\n24502\n24503\n24504\n24505\n24506\n24507\n24508\n24509\n24510\n24511\n24512\n24513\n24514\n24515\n24516\n24517\n24518\n24519\n24520\n24521\n24522\n24523\n24524\n24525\n24526\n24527\n24528\n24529\n24530\n24531\n24532\n24533\n24534\n24535\n24536\n24537\n24538\n24539\n24540\n24541\n24542\n24543\n24544\n24545\n24546\n24547\n24548\n24549\n24550\n24551\n24552\n24553\n24554\n24555\n24556\n24557\n24558\n24559\n24560\n24561\n24562\n24563\n24564\n24565\n24566\n24567\n24568\n24569\n24570\n24571\n24572\n24573\n24574\n24575\n24576\n24577\n24578\n24579\n24580\n24581\n24582\n24583\n24584\n24585\n24586\n24587\n24588\n24589\n24590\n24591\n24592\n24593\n24594\n24595\n24596\n24597\n24598\n24599\n24600\n24601\n24602\n24603\n24604\n24605\n24606\n24607\n24608\n24609\n24610\n24611\n24612\n24613\n24614\n24615\n24616\n24617\n24618\n24619\n24620\n24621\n24622\n24623\n24624\n24625\n24626\n24627\n24628\n24629\n24630\n24631\n24632\n24633\n24634\n24635\n24636\n24637\n24638\n24639\n24640\n24641\n24642\n24643\n24644\n24645\n24646\n24647\n24648\n24649\n24650\n24651\n24652\n24653\n24654\n24655\n24656\n24657\n24658\n24659\n24660\n24661\n24662\n24663\n24664\n24665\n24666\n24667\n24668\n24669\n24670\n24671\n24672\n24673\n24674\n24675\n24676\n24677\n24678\n24679\n24680\n24681\n24682\n24683\n24684\n24685\n24686\n24687\n24688\n24689\n24690\n24691\n24692\n24693\n24694\n24695\n24696\n24697\n24698\n24699\n24700\n24701\n24702\n24703\n24704\n24705\n24706\n24707\n24708\n24709\n24710\n24711\n24712\n24713\n24714\n24715\n24716\n24717\n24718\n24719\n24720\n24721\n24722\n24723\n24724\n24725\n24726\n24727\n24728\n24729\n24730\n24731\n24732\n24733\n24734\n24735\n24736\n24737\n24738\n24739\n24740\n24741\n24742\n24743\n24744\n24745\n24746\n24747\n24748\n24749\n24750\n24751\n24752\n24753\n24754\n24755\n24756\n24757\n24758\n24759\n24760\n24761\n24762\n24763\n24764\n24765\n24766\n24767\n24768\n24769\n24770\n24771\n24772\n24773\n24774\n24775\n24776\n24777\n24778\n24779\n24780\n24781\n24782\n24783\n24784\n24785\n24786\n24787\n24788\n24789\n24790\n24791\n24792\n24793\n24794\n24795\n24796\n24797\n24798\n24799\n24800\n24801\n24802\n24803\n24804\n24805\n24806\n24807\n24808\n24809\n24810\n24811\n24812\n24813\n24814\n24815\n24816\n24817\n24818\n24819\n24820\n24821\n24822\n24823\n24824\n24825\n24826\n24827\n24828\n24829\n24830\n24831\n24832\n24833\n24834\n24835\n24836\n24837\n24838\n24839\n24840\n24841\n24842\n24843\n24844\n24845\n24846\n24847\n24848\n24849\n24850\n24851\n24852\n24853\n24854\n24855\n24856\n24857\n24858\n24859\n24860\n24861\n24862\n24863\n24864\n24865\n24866\n24867\n24868\n24869\n24870\n24871\n24872\n24873\n24874\n24875\n24876\n24877\n24878\n24879\n24880\n24881\n24882\n24883\n24884\n24885\n24886\n24887\n24888\n24889\n24890\n24891\n24892\n24893\n24894\n24895\n24896\n24897\n24898\n24899\n24900\n24901\n24902\n24903\n24904\n24905\n24906\n24907\n24908\n24909\n24910\n24911\n24912\n24913\n24914\n24915\n24916\n24917\n24918\n24919\n24920\n24921\n24922\n24923\n24924\n24925\n24926\n24927\n24928\n24929\n24930\n24931\n24932\n24933\n24934\n24935\n24936\n24937\n24938\n24939\n24940\n24941\n24942\n24943\n24944\n24945\n24946\n24947\n24948\n24949\n24950\n24951\n24952\n24953\n24954\n24955\n24956\n24957\n24958\n24959\n24960\n24961\n24962\n24963\n24964\n24965\n24966\n24967\n24968\n24969\n24970\n24971\n24972\n24973\n24974\n24975\n24976\n24977\n24978\n24979\n24980\n24981\n24982\n24983\n24984\n24985\n24986\n24987\n24988\n24989\n24990\n24991\n24992\n24993\n24994\n24995\n24996\n24997\n24998\n24999\n25000\n25001\n25002\n25003\n25004\n25005\n25006\n25007\n25008\n25009\n25010\n25011\n25012\n25013\n25014\n25015\n25016\n25017\n25018\n25019\n25020\n25021\n25022\n25023\n25024\n25025\n25026\n25027\n25028\n25029\n25030\n25031\n25032\n25033\n25034\n25035\n25036\n25037\n25038\n25039\n25040\n25041\n25042\n25043\n25044\n25045\n25046\n25047\n25048\n25049\n25050\n25051\n25052\n25053\n25054\n25055\n25056\n25057\n25058\n25059\n25060\n25061\n25062\n25063\n25064\n25065\n25066\n25067\n25068\n25069\n25070\n25071\n25072\n25073\n25074\n25075\n25076\n25077\n25078\n25079\n25080\n25081\n25082\n25083\n25084\n25085\n25086\n25087\n25088\n25089\n25090\n25091\n25092\n25093\n25094\n25095\n25096\n25097\n25098\n25099\n25100\n25101\n25102\n25103\n25104\n25105\n25106\n25107\n25108\n25109\n25110\n25111\n25112\n25113\n25114\n25115\n25116\n25117\n25118\n25119\n25120\n25121\n25122\n25123\n25124\n25125\n25126\n25127\n25128\n25129\n25130\n25131\n25132\n25133\n25134\n25135\n25136\n25137\n25138\n25139\n25140\n25141\n25142\n25143\n25144\n25145\n25146\n25147\n25148\n25149\n25150\n25151\n25152\n25153\n25154\n25155\n25156\n25157\n25158\n25159\n25160\n25161\n25162\n25163\n25164\n25165\n25166\n25167\n25168\n25169\n25170\n25171\n25172\n25173\n25174\n25175\n25176\n25177\n25178\n25179\n25180\n25181\n25182\n25183\n25184\n25185\n25186\n25187\n25188\n25189\n25190\n25191\n25192\n25193\n25194\n25195\n25196\n25197\n25198\n25199\n25200\n25201\n25202\n25203\n25204\n25205\n25206\n25207\n25208\n25209\n25210\n25211\n25212\n25213\n25214\n25215\n25216\n25217\n25218\n25219\n25220\n25221\n25222\n25223\n25224\n25225\n25226\n25227\n25228\n25229\n25230\n25231\n25232\n25233\n25234\n25235\n25236\n25237\n25238\n25239\n25240\n25241\n25242\n25243\n25244\n25245\n25246\n25247\n25248\n25249\n25250\n25251\n25252\n25253\n25254\n25255\n25256\n25257\n25258\n25259\n25260\n25261\n25262\n25263\n25264\n25265\n25266\n25267\n25268\n25269\n25270\n25271\n25272\n25273\n25274\n25275\n25276\n25277\n25278\n25279\n25280\n25281\n25282\n25283\n25284\n25285\n25286\n25287\n25288\n25289\n25290\n25291\n25292\n25293\n25294\n25295\n25296\n25297\n25298\n25299\n25300\n25301\n25302\n25303\n25304\n25305\n25306\n25307\n25308\n25309\n25310\n25311\n25312\n25313\n25314\n25315\n25316\n25317\n25318\n25319\n25320\n25321\n25322\n25323\n25324\n25325\n25326\n25327\n25328\n25329\n25330\n25331\n25332\n25333\n25334\n25335\n25336\n25337\n25338\n25339\n25340\n25341\n25342\n25343\n25344\n25345\n25346\n25347\n25348\n25349\n25350\n25351\n25352\n25353\n25354\n25355\n25356\n25357\n25358\n25359\n25360\n25361\n25362\n25363\n25364\n25365\n25366\n25367\n25368\n25369\n25370\n25371\n25372\n25373\n25374\n25375\n25376\n25377\n25378\n25379\n25380\n25381\n25382\n25383\n25384\n25385\n25386\n25387\n25388\n25389\n25390\n25391\n25392\n25393\n25394\n25395\n25396\n25397\n25398\n25399\n25400\n25401\n25402\n25403\n25404\n25405\n25406\n25407\n25408\n25409\n25410\n25411\n25412\n25413\n25414\n25415\n25416\n25417\n25418\n25419\n25420\n25421\n25422\n25423\n25424\n25425\n25426\n25427\n25428\n25429\n25430\n25431\n25432\n25433\n25434\n25435\n25436\n25437\n25438\n25439\n25440\n25441\n25442\n25443\n25444\n25445\n25446\n25447\n25448\n25449\n25450\n25451\n25452\n25453\n25454\n25455\n25456\n25457\n25458\n25459\n25460\n25461\n25462\n25463\n25464\n25465\n25466\n25467\n25468\n25469\n25470\n25471\n25472\n25473\n25474\n25475\n25476\n25477\n25478\n25479\n25480\n25481\n25482\n25483\n25484\n25485\n25486\n25487\n25488\n25489\n25490\n25491\n25492\n25493\n25494\n25495\n25496\n25497\n25498\n25499\n25500\n25501\n25502\n25503\n25504\n25505\n25506\n25507\n25508\n25509\n25510\n25511\n25512\n25513\n25514\n25515\n25516\n25517\n25518\n25519\n25520\n25521\n25522\n25523\n25524\n25525\n25526\n25527\n25528\n25529\n25530\n25531\n25532\n25533\n25534\n25535\n25536\n25537\n25538\n25539\n25540\n25541\n25542\n25543\n25544\n25545\n25546\n25547\n25548\n25549\n25550\n25551\n25552\n25553\n25554\n25555\n25556\n25557\n25558\n25559\n25560\n25561\n25562\n25563\n25564\n25565\n25566\n25567\n25568\n25569\n25570\n25571\n25572\n25573\n25574\n25575\n25576\n25577\n25578\n25579\n25580\n25581\n25582\n25583\n25584\n25585\n25586\n25587\n25588\n25589\n25590\n25591\n25592\n25593\n25594\n25595\n25596\n25597\n25598\n25599\n25600\n25601\n25602\n25603\n25604\n25605\n25606\n25607\n25608\n25609\n25610\n25611\n25612\n25613\n25614\n25615\n25616\n25617\n25618\n25619\n25620\n25621\n25622\n25623\n25624\n25625\n25626\n25627\n25628\n25629\n25630\n25631\n25632\n25633\n25634\n25635\n25636\n25637\n25638\n25639\n25640\n25641\n25642\n25643\n25644\n25645\n25646\n25647\n25648\n25649\n25650\n25651\n25652\n25653\n25654\n25655\n25656\n25657\n25658\n25659\n25660\n25661\n25662\n25663\n25664\n25665\n25666\n25667\n25668\n25669\n25670\n25671\n25672\n25673\n25674\n25675\n25676\n25677\n25678\n25679\n25680\n25681\n25682\n25683\n25684\n25685\n25686\n25687\n25688\n25689\n25690\n25691\n25692\n25693\n25694\n25695\n25696\n25697\n25698\n25699\n25700\n25701\n25702\n25703\n25704\n25705\n25706\n25707\n25708\n25709\n25710\n25711\n25712\n25713\n25714\n25715\n25716\n25717\n25718\n25719\n25720\n25721\n25722\n25723\n25724\n25725\n25726\n25727\n25728\n25729\n25730\n25731\n25732\n25733\n25734\n25735\n25736\n25737\n25738\n25739\n25740\n25741\n25742\n25743\n25744\n25745\n25746\n25747\n25748\n25749\n25750\n25751\n25752\n25753\n25754\n25755\n25756\n25757\n25758\n25759\n25760\n25761\n25762\n25763\n25764\n25765\n25766\n25767\n25768\n25769\n25770\n25771\n25772\n25773\n25774\n25775\n25776\n25777\n25778\n25779\n25780\n25781\n25782\n25783\n25784\n25785\n25786\n25787\n25788\n25789\n25790\n25791\n25792\n25793\n25794\n25795\n25796\n25797\n25798\n25799\n25800\n25801\n25802\n25803\n25804\n25805\n25806\n25807\n25808\n25809\n25810\n25811\n25812\n25813\n25814\n25815\n25816\n25817\n25818\n25819\n25820\n25821\n25822\n25823\n25824\n25825\n25826\n25827\n25828\n25829\n25830\n25831\n25832\n25833\n25834\n25835\n25836\n25837\n25838\n25839\n25840\n25841\n25842\n25843\n25844\n25845\n25846\n25847\n25848\n25849\n25850\n25851\n25852\n25853\n25854\n25855\n25856\n25857\n25858\n25859\n25860\n25861\n25862\n25863\n25864\n25865\n25866\n25867\n25868\n25869\n25870\n25871\n25872\n25873\n25874\n25875\n25876\n25877\n25878\n25879\n25880\n25881\n25882\n25883\n25884\n25885\n25886\n25887\n25888\n25889\n25890\n25891\n25892\n25893\n25894\n25895\n25896\n25897\n25898\n25899\n25900\n25901\n25902\n25903\n25904\n25905\n25906\n25907\n25908\n25909\n25910\n25911\n25912\n25913\n25914\n25915\n25916\n25917\n25918\n25919\n25920\n25921\n25922\n25923\n25924\n25925\n25926\n25927\n25928\n25929\n25930\n25931\n25932\n25933\n25934\n25935\n25936\n25937\n25938\n25939\n25940\n25941\n25942\n25943\n25944\n25945\n25946\n25947\n25948\n25949\n25950\n25951\n25952\n25953\n25954\n25955\n25956\n25957\n25958\n25959\n25960\n25961\n25962\n25963\n25964\n25965\n25966\n25967\n25968\n25969\n25970\n25971\n25972\n25973\n25974\n25975\n25976\n25977\n25978\n25979\n25980\n25981\n25982\n25983\n25984\n25985\n25986\n25987\n25988\n25989\n25990\n25991\n25992\n25993\n25994\n25995\n25996\n25997\n25998\n25999\n26000\n26001\n26002\n26003\n26004\n26005\n26006\n26007\n26008\n26009\n26010\n26011\n26012\n26013\n26014\n26015\n26016\n26017\n26018\n26019\n26020\n26021\n26022\n26023\n26024\n26025\n26026\n26027\n26028\n26029\n26030\n26031\n26032\n26033\n26034\n26035\n26036\n26037\n26038\n26039\n26040\n26041\n26042\n26043\n26044\n26045\n26046\n26047\n26048\n26049\n26050\n26051\n26052\n26053\n26054\n26055\n26056\n26057\n26058\n26059\n26060\n26061\n26062\n26063\n26064\n26065\n26066\n26067\n26068\n26069\n26070\n26071\n26072\n26073\n26074\n26075\n26076\n26077\n26078\n26079\n26080\n26081\n26082\n26083\n26084\n26085\n26086\n26087\n26088\n26089\n26090\n26091\n26092\n26093\n26094\n26095\n26096\n26097\n26098\n26099\n26100\n26101\n26102\n26103\n26104\n26105\n26106\n26107\n26108\n26109\n26110\n26111\n26112\n26113\n26114\n26115\n26116\n26117\n26118\n26119\n26120\n26121\n26122\n26123\n26124\n26125\n26126\n26127\n26128\n26129\n26130\n26131\n26132\n26133\n26134\n26135\n26136\n26137\n26138\n26139\n26140\n26141\n26142\n26143\n26144\n26145\n26146\n26147\n26148\n26149\n26150\n26151\n26152\n26153\n26154\n26155\n26156\n26157\n26158\n26159\n26160\n26161\n26162\n26163\n26164\n26165\n26166\n26167\n26168\n26169\n26170\n26171\n26172\n26173\n26174\n26175\n26176\n26177\n26178\n26179\n26180\n26181\n26182\n26183\n26184\n26185\n26186\n26187\n26188\n26189\n26190\n26191\n26192\n26193\n26194\n26195\n26196\n26197\n26198\n26199\n26200\n26201\n26202\n26203\n26204\n26205\n26206\n26207\n26208\n26209\n26210\n26211\n26212\n26213\n26214\n26215\n26216\n26217\n26218\n26219\n26220\n26221\n26222\n26223\n26224\n26225\n26226\n26227\n26228\n26229\n26230\n26231\n26232\n26233\n26234\n26235\n26236\n26237\n26238\n26239\n26240\n26241\n26242\n26243\n26244\n26245\n26246\n26247\n26248\n26249\n26250\n26251\n26252\n26253\n26254\n26255\n26256\n26257\n26258\n26259\n26260\n26261\n26262\n26263\n26264\n26265\n26266\n26267\n26268\n26269\n26270\n26271\n26272\n26273\n26274\n26275\n26276\n26277\n26278\n26279\n26280\n26281\n26282\n26283\n26284\n26285\n26286\n26287\n26288\n26289\n26290\n26291\n26292\n26293\n26294\n26295\n26296\n26297\n26298\n26299\n26300\n26301\n26302\n26303\n26304\n26305\n26306\n26307\n26308\n26309\n26310\n26311\n26312\n26313\n26314\n26315\n26316\n26317\n26318\n26319\n26320\n26321\n26322\n26323\n26324\n26325\n26326\n26327\n26328\n26329\n26330\n26331\n26332\n26333\n26334\n26335\n26336\n26337\n26338\n26339\n26340\n26341\n26342\n26343\n26344\n26345\n26346\n26347\n26348\n26349\n26350\n26351\n26352\n26353\n26354\n26355\n26356\n26357\n26358\n26359\n26360\n26361\n26362\n26363\n26364\n26365\n26366\n26367\n26368\n26369\n26370\n26371\n26372\n26373\n26374\n26375\n26376\n26377\n26378\n26379\n26380\n26381\n26382\n26383\n26384\n26385\n26386\n26387\n26388\n26389\n26390\n26391\n26392\n26393\n26394\n26395\n26396\n26397\n26398\n26399\n26400\n26401\n26402\n26403\n26404\n26405\n26406\n26407\n26408\n26409\n26410\n26411\n26412\n26413\n26414\n26415\n26416\n26417\n26418\n26419\n26420\n26421\n26422\n26423\n26424\n26425\n26426\n26427\n26428\n26429\n26430\n26431\n26432\n26433\n26434\n26435\n26436\n26437\n26438\n26439\n26440\n26441\n26442\n26443\n26444\n26445\n26446\n26447\n26448\n26449\n26450\n26451\n26452\n26453\n26454\n26455\n26456\n26457\n26458\n26459\n26460\n26461\n26462\n26463\n26464\n26465\n26466\n26467\n26468\n26469\n26470\n26471\n26472\n26473\n26474\n26475\n26476\n26477\n26478\n26479\n26480\n26481\n26482\n26483\n26484\n26485\n26486\n26487\n26488\n26489\n26490\n26491\n26492\n26493\n26494\n26495\n26496\n26497\n26498\n26499\n26500\n26501\n26502\n26503\n26504\n26505\n26506\n26507\n26508\n26509\n26510\n26511\n26512\n26513\n26514\n26515\n26516\n26517\n26518\n26519\n26520\n26521\n26522\n26523\n26524\n26525\n26526\n26527\n26528\n26529\n26530\n26531\n26532\n26533\n26534\n26535\n26536\n26537\n26538\n26539\n26540\n26541\n26542\n26543\n26544\n26545\n26546\n26547\n26548\n26549\n26550\n26551\n26552\n26553\n26554\n26555\n26556\n26557\n26558\n26559\n26560\n26561\n26562\n26563\n26564\n26565\n26566\n26567\n26568\n26569\n26570\n26571\n26572\n26573\n26574\n26575\n26576\n26577\n26578\n26579\n26580\n26581\n26582\n26583\n26584\n26585\n26586\n26587\n26588\n26589\n26590\n26591\n26592\n26593\n26594\n26595\n26596\n26597\n26598\n26599\n26600\n26601\n26602\n26603\n26604\n26605\n26606\n26607\n26608\n26609\n26610\n26611\n26612\n26613\n26614\n26615\n26616\n26617\n26618\n26619\n26620\n26621\n26622\n26623\n26624\n26625\n26626\n26627\n26628\n26629\n26630\n26631\n26632\n26633\n26634\n26635\n26636\n26637\n26638\n26639\n26640\n26641\n26642\n26643\n26644\n26645\n26646\n26647\n26648\n26649\n26650\n26651\n26652\n26653\n26654\n26655\n26656\n26657\n26658\n26659\n26660\n26661\n26662\n26663\n26664\n26665\n26666\n26667\n26668\n26669\n26670\n26671\n26672\n26673\n26674\n26675\n26676\n26677\n26678\n26679\n26680\n26681\n26682\n26683\n26684\n26685\n26686\n26687\n26688\n26689\n26690\n26691\n26692\n26693\n26694\n26695\n26696\n26697\n26698\n26699\n26700\n26701\n26702\n26703\n26704\n26705\n26706\n26707\n26708\n26709\n26710\n26711\n26712\n26713\n26714\n26715\n26716\n26717\n26718\n26719\n26720\n26721\n26722\n26723\n26724\n26725\n26726\n26727\n26728\n26729\n26730\n26731\n26732\n26733\n26734\n26735\n26736\n26737\n26738\n26739\n26740\n26741\n26742\n26743\n26744\n26745\n26746\n26747\n26748\n26749\n26750\n26751\n26752\n26753\n26754\n26755\n26756\n26757\n26758\n26759\n26760\n26761\n26762\n26763\n26764\n26765\n26766\n26767\n26768\n26769\n26770\n26771\n26772\n26773\n26774\n26775\n26776\n26777\n26778\n26779\n26780\n26781\n26782\n26783\n26784\n26785\n26786\n26787\n26788\n26789\n26790\n26791\n26792\n26793\n26794\n26795\n26796\n26797\n26798\n26799\n26800\n26801\n26802\n26803\n26804\n26805\n26806\n26807\n26808\n26809\n26810\n26811\n26812\n26813\n26814\n26815\n26816\n26817\n26818\n26819\n26820\n26821\n26822\n26823\n26824\n26825\n26826\n26827\n26828\n26829\n26830\n26831\n26832\n26833\n26834\n26835\n26836\n26837\n26838\n26839\n26840\n26841\n26842\n26843\n26844\n26845\n26846\n26847\n26848\n26849\n26850\n26851\n26852\n26853\n26854\n26855\n26856\n26857\n26858\n26859\n26860\n26861\n26862\n26863\n26864\n26865\n26866\n26867\n26868\n26869\n26870\n26871\n26872\n26873\n26874\n26875\n26876\n26877\n26878\n26879\n26880\n26881\n26882\n26883\n26884\n26885\n26886\n26887\n26888\n26889\n26890\n26891\n26892\n26893\n26894\n26895\n26896\n26897\n26898\n26899\n26900\n26901\n26902\n26903\n26904\n26905\n26906\n26907\n26908\n26909\n26910\n26911\n26912\n26913\n26914\n26915\n26916\n26917\n26918\n26919\n26920\n26921\n26922\n26923\n26924\n26925\n26926\n26927\n26928\n26929\n26930\n26931\n26932\n26933\n26934\n26935\n26936\n26937\n26938\n26939\n26940\n26941\n26942\n26943\n26944\n26945\n26946\n26947\n26948\n26949\n26950\n26951\n26952\n26953\n26954\n26955\n26956\n26957\n26958\n26959\n26960\n26961\n26962\n26963\n26964\n26965\n26966\n26967\n26968\n26969\n26970\n26971\n26972\n26973\n26974\n26975\n26976\n26977\n26978\n26979\n26980\n26981\n26982\n26983\n26984\n26985\n26986\n26987\n26988\n26989\n26990\n26991\n26992\n26993\n26994\n26995\n26996\n26997\n26998\n26999\n27000\n27001\n27002\n27003\n27004\n27005\n27006\n27007\n27008\n27009\n27010\n27011\n27012\n27013\n27014\n27015\n27016\n27017\n27018\n27019\n27020\n27021\n27022\n27023\n27024\n27025\n27026\n27027\n27028\n27029\n27030\n27031\n27032\n27033\n27034\n27035\n27036\n27037\n27038\n27039\n27040\n27041\n27042\n27043\n27044\n27045\n27046\n27047\n27048\n27049\n27050\n27051\n27052\n27053\n27054\n27055\n27056\n27057\n27058\n27059\n27060\n27061\n27062\n27063\n27064\n27065\n27066\n27067\n27068\n27069\n27070\n27071\n27072\n27073\n27074\n27075\n27076\n27077\n27078\n27079\n27080\n27081\n27082\n27083\n27084\n27085\n27086\n27087\n27088\n27089\n27090\n27091\n27092\n27093\n27094\n27095\n27096\n27097\n27098\n27099\n27100\n27101\n27102\n27103\n27104\n27105\n27106\n27107\n27108\n27109\n27110\n27111\n27112\n27113\n27114\n27115\n27116\n27117\n27118\n27119\n27120\n27121\n27122\n27123\n27124\n27125\n27126\n27127\n27128\n27129\n27130\n27131\n27132\n27133\n27134\n27135\n27136\n27137\n27138\n27139\n27140\n27141\n27142\n27143\n27144\n27145\n27146\n27147\n27148\n27149\n27150\n27151\n27152\n27153\n27154\n27155\n27156\n27157\n27158\n27159\n27160\n27161\n27162\n27163\n27164\n27165\n27166\n27167\n27168\n27169\n27170\n27171\n27172\n27173\n27174\n27175\n27176\n27177\n27178\n27179\n27180\n27181\n27182\n27183\n27184\n27185\n27186\n27187\n27188\n27189\n27190\n27191\n27192\n27193\n27194\n27195\n27196\n27197\n27198\n27199\n27200\n27201\n27202\n27203\n27204\n27205\n27206\n27207\n27208\n27209\n27210\n27211\n27212\n27213\n27214\n27215\n27216\n27217\n27218\n27219\n27220\n27221\n27222\n27223\n27224\n27225\n27226\n27227\n27228\n27229\n27230\n27231\n27232\n27233\n27234\n27235\n27236\n27237\n27238\n27239\n27240\n27241\n27242\n27243\n27244\n27245\n27246\n27247\n27248\n27249\n27250\n27251\n27252\n27253\n27254\n27255\n27256\n27257\n27258\n27259\n27260\n27261\n27262\n27263\n27264\n27265\n27266\n27267\n27268\n27269\n27270\n27271\n27272\n27273\n27274\n27275\n27276\n27277\n27278\n27279\n27280\n27281\n27282\n27283\n27284\n27285\n27286\n27287\n27288\n27289\n27290\n27291\n27292\n27293\n27294\n27295\n27296\n27297\n27298\n27299\n27300\n27301\n27302\n27303\n27304\n27305\n27306\n27307\n27308\n27309\n27310\n27311\n27312\n27313\n27314\n27315\n27316\n27317\n27318\n27319\n27320\n27321\n27322\n27323\n27324\n27325\n27326\n27327\n27328\n27329\n27330\n27331\n27332\n27333\n27334\n27335\n27336\n27337\n27338\n27339\n27340\n27341\n27342\n27343\n27344\n27345\n27346\n27347\n27348\n27349\n27350\n27351\n27352\n27353\n27354\n27355\n27356\n27357\n27358\n27359\n27360\n27361\n27362\n27363\n27364\n27365\n27366\n27367\n27368\n27369\n27370\n27371\n27372\n27373\n27374\n27375\n27376\n27377\n27378\n27379\n27380\n27381\n27382\n27383\n27384\n27385\n27386\n27387\n27388\n27389\n27390\n27391\n27392\n27393\n27394\n27395\n27396\n27397\n27398\n27399\n27400\n27401\n27402\n27403\n27404\n27405\n27406\n27407\n27408\n27409\n27410\n27411\n27412\n27413\n27414\n27415\n27416\n27417\n27418\n27419\n27420\n27421\n27422\n27423\n27424\n27425\n27426\n27427\n27428\n27429\n27430\n27431\n27432\n27433\n27434\n27435\n27436\n27437\n27438\n27439\n27440\n27441\n27442\n27443\n27444\n27445\n27446\n27447\n27448\n27449\n27450\n27451\n27452\n27453\n27454\n27455\n27456\n27457\n27458\n27459\n27460\n27461\n27462\n27463\n27464\n27465\n27466\n27467\n27468\n27469\n27470\n27471\n27472\n27473\n27474\n27475\n27476\n27477\n27478\n27479\n27480\n27481\n27482\n27483\n27484\n27485\n27486\n27487\n27488\n27489\n27490\n27491\n27492\n27493\n27494\n27495\n27496\n27497\n27498\n27499\n27500\n27501\n27502\n27503\n27504\n27505\n27506\n27507\n27508\n27509\n27510\n27511\n27512\n27513\n27514\n27515\n27516\n27517\n27518\n27519\n27520\n27521\n27522\n27523\n27524\n27525\n27526\n27527\n27528\n27529\n27530\n27531\n27532\n27533\n27534\n27535\n27536\n27537\n27538\n27539\n27540\n27541\n27542\n27543\n27544\n27545\n27546\n27547\n27548\n27549\n27550\n27551\n27552\n27553\n27554\n27555\n27556\n27557\n27558\n27559\n27560\n27561\n27562\n27563\n27564\n27565\n27566\n27567\n27568\n27569\n27570\n27571\n27572\n27573\n27574\n27575\n27576\n27577\n27578\n27579\n27580\n27581\n27582\n27583\n27584\n27585\n27586\n27587\n27588\n27589\n27590\n27591\n27592\n27593\n27594\n27595\n27596\n27597\n27598\n27599\n27600\n27601\n27602\n27603\n27604\n27605\n27606\n27607\n27608\n27609\n27610\n27611\n27612\n27613\n27614\n27615\n27616\n27617\n27618\n27619\n27620\n27621\n27622\n27623\n27624\n27625\n27626\n27627\n27628\n27629\n27630\n27631\n27632\n27633\n27634\n27635\n27636\n27637\n27638\n27639\n27640\n27641\n27642\n27643\n27644\n27645\n27646\n27647\n27648\n27649\n27650\n27651\n27652\n27653\n27654\n27655\n27656\n27657\n27658\n27659\n27660\n27661\n27662\n27663\n27664\n27665\n27666\n27667\n27668\n27669\n27670\n27671\n27672\n27673\n27674\n27675\n27676\n27677\n27678\n27679\n27680\n27681\n27682\n27683\n27684\n27685\n27686\n27687\n27688\n27689\n27690\n27691\n27692\n27693\n27694\n27695\n27696\n27697\n27698\n27699\n27700\n27701\n27702\n27703\n27704\n27705\n27706\n27707\n27708\n27709\n27710\n27711\n27712\n27713\n27714\n27715\n27716\n27717\n27718\n27719\n27720\n27721\n27722\n27723\n27724\n27725\n27726\n27727\n27728\n27729\n27730\n27731\n27732\n27733\n27734\n27735\n27736\n27737\n27738\n27739\n27740\n27741\n27742\n27743\n27744\n27745\n27746\n27747\n27748\n27749\n27750\n27751\n27752\n27753\n27754\n27755\n27756\n27757\n27758\n27759\n27760\n27761\n27762\n27763\n27764\n27765\n27766\n27767\n27768\n27769\n27770\n27771\n27772\n27773\n27774\n27775\n27776\n27777\n27778\n27779\n27780\n27781\n27782\n27783\n27784\n27785\n27786\n27787\n27788\n27789\n27790\n27791\n27792\n27793\n27794\n27795\n27796\n27797\n27798\n27799\n27800\n27801\n27802\n27803\n27804\n27805\n27806\n27807\n27808\n27809\n27810\n27811\n27812\n27813\n27814\n27815\n27816\n27817\n27818\n27819\n27820\n27821\n27822\n27823\n27824\n27825\n27826\n27827\n27828\n27829\n27830\n27831\n27832\n27833\n27834\n27835\n27836\n27837\n27838\n27839\n27840\n27841\n27842\n27843\n27844\n27845\n27846\n27847\n27848\n27849\n27850\n27851\n27852\n27853\n27854\n27855\n27856\n27857\n27858\n27859\n27860\n27861\n27862\n27863\n27864\n27865\n27866\n27867\n27868\n27869\n27870\n27871\n27872\n27873\n27874\n27875\n27876\n27877\n27878\n27879\n27880\n27881\n27882\n27883\n27884\n27885\n27886\n27887\n27888\n27889\n27890\n27891\n27892\n27893\n27894\n27895\n27896\n27897\n27898\n27899\n27900\n27901\n27902\n27903\n27904\n27905\n27906\n27907\n27908\n27909\n27910\n27911\n27912\n27913\n27914\n27915\n27916\n27917\n27918\n27919\n27920\n27921\n27922\n27923\n27924\n27925\n27926\n27927\n27928\n27929\n27930\n27931\n27932\n27933\n27934\n27935\n27936\n27937\n27938\n27939\n27940\n27941\n27942\n27943\n27944\n27945\n27946\n27947\n27948\n27949\n27950\n27951\n27952\n27953\n27954\n27955\n27956\n27957\n27958\n27959\n27960\n27961\n27962\n27963\n27964\n27965\n27966\n27967\n27968\n27969\n27970\n27971\n27972\n27973\n27974\n27975\n27976\n27977\n27978\n27979\n27980\n27981\n27982\n27983\n27984\n27985\n27986\n27987\n27988\n27989\n27990\n27991\n27992\n27993\n27994\n27995\n27996\n27997\n27998\n27999\n28000\n28001\n28002\n28003\n28004\n28005\n28006\n28007\n28008\n28009\n28010\n28011\n28012\n28013\n28014\n28015\n28016\n28017\n28018\n28019\n28020\n28021\n28022\n28023\n28024\n28025\n28026\n28027\n28028\n28029\n28030\n28031\n28032\n28033\n28034\n28035\n28036\n28037\n28038\n28039\n28040\n28041\n28042\n28043\n28044\n28045\n28046\n28047\n28048\n28049\n28050\n28051\n28052\n28053\n28054\n28055\n28056\n28057\n28058\n28059\n28060\n28061\n28062\n28063\n28064\n28065\n28066\n28067\n28068\n28069\n28070\n28071\n28072\n28073\n28074\n28075\n28076\n28077\n28078\n28079\n28080\n28081\n28082\n28083\n28084\n28085\n28086\n28087\n28088\n28089\n28090\n28091\n28092\n28093\n28094\n28095\n28096\n28097\n28098\n28099\n28100\n28101\n28102\n28103\n28104\n28105\n28106\n28107\n28108\n28109\n28110\n28111\n28112\n28113\n28114\n28115\n28116\n28117\n28118\n28119\n28120\n28121\n28122\n28123\n28124\n28125\n28126\n28127\n28128\n28129\n28130\n28131\n28132\n28133\n28134\n28135\n28136\n28137\n28138\n28139\n28140\n28141\n28142\n28143\n28144\n28145\n28146\n28147\n28148\n28149\n28150\n28151\n28152\n28153\n28154\n28155\n28156\n28157\n28158\n28159\n28160\n28161\n28162\n28163\n28164\n28165\n28166\n28167\n28168\n28169\n28170\n28171\n28172\n28173\n28174\n28175\n28176\n28177\n28178\n28179\n28180\n28181\n28182\n28183\n28184\n28185\n28186\n28187\n28188\n28189\n28190\n28191\n28192\n28193\n28194\n28195\n28196\n28197\n28198\n28199\n28200\n28201\n28202\n28203\n28204\n28205\n28206\n28207\n28208\n28209\n28210\n28211\n28212\n28213\n28214\n28215\n28216\n28217\n28218\n28219\n28220\n28221\n28222\n28223\n28224\n28225\n28226\n28227\n28228\n28229\n28230\n28231\n28232\n28233\n28234\n28235\n28236\n28237\n28238\n28239\n28240\n28241\n28242\n28243\n28244\n28245\n28246\n28247\n28248\n28249\n28250\n28251\n28252\n28253\n28254\n28255\n28256\n28257\n28258\n28259\n28260\n28261\n28262\n28263\n28264\n28265\n28266\n28267\n28268\n28269\n28270\n28271\n28272\n28273\n28274\n28275\n28276\n28277\n28278\n28279\n28280\n28281\n28282\n28283\n28284\n28285\n28286\n28287\n28288\n28289\n28290\n28291\n28292\n28293\n28294\n28295\n28296\n28297\n28298\n28299\n28300\n28301\n28302\n28303\n28304\n28305\n28306\n28307\n28308\n28309\n28310\n28311\n28312\n28313\n28314\n28315\n28316\n28317\n28318\n28319\n28320\n28321\n28322\n28323\n28324\n28325\n28326\n28327\n28328\n28329\n28330\n28331\n28332\n28333\n28334\n28335\n28336\n28337\n28338\n28339\n28340\n28341\n28342\n28343\n28344\n28345\n28346\n28347\n28348\n28349\n28350\n28351\n28352\n28353\n28354\n28355\n28356\n28357\n28358\n28359\n28360\n28361\n28362\n28363\n28364\n28365\n28366\n28367\n28368\n28369\n28370\n28371\n28372\n28373\n28374\n28375\n28376\n28377\n28378\n28379\n28380\n28381\n28382\n28383\n28384\n28385\n28386\n28387\n28388\n28389\n28390\n28391\n28392\n28393\n28394\n28395\n28396\n28397\n28398\n28399\n28400\n28401\n28402\n28403\n28404\n28405\n28406\n28407\n28408\n28409\n28410\n28411\n28412\n28413\n28414\n28415\n28416\n28417\n28418\n28419\n28420\n28421\n28422\n28423\n28424\n28425\n28426\n28427\n28428\n28429\n28430\n28431\n28432\n28433\n28434\n28435\n28436\n28437\n28438\n28439\n28440\n28441\n28442\n28443\n28444\n28445\n28446\n28447\n28448\n28449\n28450\n28451\n28452\n28453\n28454\n28455\n28456\n28457\n28458\n28459\n28460\n28461\n28462\n28463\n28464\n28465\n28466\n28467\n28468\n28469\n28470\n28471\n28472\n28473\n28474\n28475\n28476\n28477\n28478\n28479\n28480\n28481\n28482\n28483\n28484\n28485\n28486\n28487\n28488\n28489\n28490\n28491\n28492\n28493\n28494\n28495\n28496\n28497\n28498\n28499\n28500\n28501\n28502\n28503\n28504\n28505\n28506\n28507\n28508\n28509\n28510\n28511\n28512\n28513\n28514\n28515\n28516\n28517\n28518\n28519\n28520\n28521\n28522\n28523\n28524\n28525\n28526\n28527\n28528\n28529\n28530\n28531\n28532\n28533\n28534\n28535\n28536\n28537\n28538\n28539\n28540\n28541\n28542\n28543\n28544\n28545\n28546\n28547\n28548\n28549\n28550\n28551\n28552\n28553\n28554\n28555\n28556\n28557\n28558\n28559\n28560\n28561\n28562\n28563\n28564\n28565\n28566\n28567\n28568\n28569\n28570\n28571\n28572\n28573\n28574\n28575\n28576\n28577\n28578\n28579\n28580\n28581\n28582\n28583\n28584\n28585\n28586\n28587\n28588\n28589\n28590\n28591\n28592\n28593\n28594\n28595\n28596\n28597\n28598\n28599\n28600\n28601\n28602\n28603\n28604\n28605\n28606\n28607\n28608\n28609\n28610\n28611\n28612\n28613\n28614\n28615\n28616\n28617\n28618\n28619\n28620\n28621\n28622\n28623\n28624\n28625\n28626\n28627\n28628\n28629\n28630\n28631\n28632\n28633\n28634\n28635\n28636\n28637\n28638\n28639\n28640\n28641\n28642\n28643\n28644\n28645\n28646\n28647\n28648\n28649\n28650\n28651\n28652\n28653\n28654\n28655\n28656\n28657\n28658\n28659\n28660\n28661\n28662\n28663\n28664\n28665\n28666\n28667\n28668\n28669\n28670\n28671\n28672\n28673\n28674\n28675\n28676\n28677\n28678\n28679\n28680\n28681\n28682\n28683\n28684\n28685\n28686\n28687\n28688\n28689\n28690\n28691\n28692\n28693\n28694\n28695\n28696\n28697\n28698\n28699\n28700\n28701\n28702\n28703\n28704\n28705\n28706\n28707\n28708\n28709\n28710\n28711\n28712\n28713\n28714\n28715\n28716\n28717\n28718\n28719\n28720\n28721\n28722\n28723\n28724\n28725\n28726\n28727\n28728\n28729\n28730\n28731\n28732\n28733\n28734\n28735\n28736\n28737\n28738\n28739\n28740\n28741\n28742\n28743\n28744\n28745\n28746\n28747\n28748\n28749\n28750\n28751\n28752\n28753\n28754\n28755\n28756\n28757\n28758\n28759\n28760\n28761\n28762\n28763\n28764\n28765\n28766\n28767\n28768\n28769\n28770\n28771\n28772\n28773\n28774\n28775\n28776\n28777\n28778\n28779\n28780\n28781\n28782\n28783\n28784\n28785\n28786\n28787\n28788\n28789\n28790\n28791\n28792\n28793\n28794\n28795\n28796\n28797\n28798\n28799\n28800\n28801\n28802\n28803\n28804\n28805\n28806\n28807\n28808\n28809\n28810\n28811\n28812\n28813\n28814\n28815\n28816\n28817\n28818\n28819\n28820\n28821\n28822\n28823\n28824\n28825\n28826\n28827\n28828\n28829\n28830\n28831\n28832\n28833\n28834\n28835\n28836\n28837\n28838\n28839\n28840\n28841\n28842\n28843\n28844\n28845\n28846\n28847\n28848\n28849\n28850\n28851\n28852\n28853\n28854\n28855\n28856\n28857\n28858\n28859\n28860\n28861\n28862\n28863\n28864\n28865\n28866\n28867\n28868\n28869\n28870\n28871\n28872\n28873\n28874\n28875\n28876\n28877\n28878\n28879\n28880\n28881\n28882\n28883\n28884\n28885\n28886\n28887\n28888\n28889\n28890\n28891\n28892\n28893\n28894\n28895\n28896\n28897\n28898\n28899\n28900\n28901\n28902\n28903\n28904\n28905\n28906\n28907\n28908\n28909\n28910\n28911\n28912\n28913\n28914\n28915\n28916\n28917\n28918\n28919\n28920\n28921\n28922\n28923\n28924\n28925\n28926\n28927\n28928\n28929\n28930\n28931\n28932\n28933\n28934\n28935\n28936\n28937\n28938\n28939\n28940\n28941\n28942\n28943\n28944\n28945\n28946\n28947\n28948\n28949\n28950\n28951\n28952\n28953\n28954\n28955\n28956\n28957\n28958\n28959\n28960\n28961\n28962\n28963\n28964\n28965\n28966\n28967\n28968\n28969\n28970\n28971\n28972\n28973\n28974\n28975\n28976\n28977\n28978\n28979\n28980\n28981\n28982\n28983\n28984\n28985\n28986\n28987\n28988\n28989\n28990\n28991\n28992\n28993\n28994\n28995\n28996\n28997\n28998\n28999\n29000\n29001\n29002\n29003\n29004\n29005\n29006\n29007\n29008\n29009\n29010\n29011\n29012\n29013\n29014\n29015\n29016\n29017\n29018\n29019\n29020\n29021\n29022\n29023\n29024\n29025\n29026\n29027\n29028\n29029\n29030\n29031\n29032\n29033\n29034\n29035\n29036\n29037\n29038\n29039\n29040\n29041\n29042\n29043\n29044\n29045\n29046\n29047\n29048\n29049\n29050\n29051\n29052\n29053\n29054\n29055\n29056\n29057\n29058\n29059\n29060\n29061\n29062\n29063\n29064\n29065\n29066\n29067\n29068\n29069\n29070\n29071\n29072\n29073\n29074\n29075\n29076\n29077\n29078\n29079\n29080\n29081\n29082\n29083\n29084\n29085\n29086\n29087\n29088\n29089\n29090\n29091\n29092\n29093\n29094\n29095\n29096\n29097\n29098\n29099\n29100\n29101\n29102\n29103\n29104\n29105\n29106\n29107\n29108\n29109\n29110\n29111\n29112\n29113\n29114\n29115\n29116\n29117\n29118\n29119\n29120\n29121\n29122\n29123\n29124\n29125\n29126\n29127\n29128\n29129\n29130\n29131\n29132\n29133\n29134\n29135\n29136\n29137\n29138\n29139\n29140\n29141\n29142\n29143\n29144\n29145\n29146\n29147\n29148\n29149\n29150\n29151\n29152\n29153\n29154\n29155\n29156\n29157\n29158\n29159\n29160\n29161\n29162\n29163\n29164\n29165\n29166\n29167\n29168\n29169\n29170\n29171\n29172\n29173\n29174\n29175\n29176\n29177\n29178\n29179\n29180\n29181\n29182\n29183\n29184\n29185\n29186\n29187\n29188\n29189\n29190\n29191\n29192\n29193\n29194\n29195\n29196\n29197\n29198\n29199\n29200\n29201\n29202\n29203\n29204\n29205\n29206\n29207\n29208\n29209\n29210\n29211\n29212\n29213\n29214\n29215\n29216\n29217\n29218\n29219\n29220\n29221\n29222\n29223\n29224\n29225\n29226\n29227\n29228\n29229\n29230\n29231\n29232\n29233\n29234\n29235\n29236\n29237\n29238\n29239\n29240\n29241\n29242\n29243\n29244\n29245\n29246\n29247\n29248\n29249\n29250\n29251\n29252\n29253\n29254\n29255\n29256\n29257\n29258\n29259\n29260\n29261\n29262\n29263\n29264\n29265\n29266\n29267\n29268\n29269\n29270\n29271\n29272\n29273\n29274\n29275\n29276\n29277\n29278\n29279\n29280\n29281\n29282\n29283\n29284\n29285\n29286\n29287\n29288\n29289\n29290\n29291\n29292\n29293\n29294\n29295\n29296\n29297\n29298\n29299\n29300\n29301\n29302\n29303\n29304\n29305\n29306\n29307\n29308\n29309\n29310\n29311\n29312\n29313\n29314\n29315\n29316\n29317\n29318\n29319\n29320\n29321\n29322\n29323\n29324\n29325\n29326\n29327\n29328\n29329\n29330\n29331\n29332\n29333\n29334\n29335\n29336\n29337\n29338\n29339\n29340\n29341\n29342\n29343\n29344\n29345\n29346\n29347\n29348\n29349\n29350\n29351\n29352\n29353\n29354\n29355\n29356\n29357\n29358\n29359\n29360\n29361\n29362\n29363\n29364\n29365\n29366\n29367\n29368\n29369\n29370\n29371\n29372\n29373\n29374\n29375\n29376\n29377\n29378\n29379\n29380\n29381\n29382\n29383\n29384\n29385\n29386\n29387\n29388\n29389\n29390\n29391\n29392\n29393\n29394\n29395\n29396\n29397\n29398\n29399\n29400\n29401\n29402\n29403\n29404\n29405\n29406\n29407\n29408\n29409\n29410\n29411\n29412\n29413\n29414\n29415\n29416\n29417\n29418\n29419\n29420\n29421\n29422\n29423\n29424\n29425\n29426\n29427\n29428\n29429\n29430\n29431\n29432\n29433\n29434\n29435\n29436\n29437\n29438\n29439\n29440\n29441\n29442\n29443\n29444\n29445\n29446\n29447\n29448\n29449\n29450\n29451\n29452\n29453\n29454\n29455\n29456\n29457\n29458\n29459\n29460\n29461\n29462\n29463\n29464\n29465\n29466\n29467\n29468\n29469\n29470\n29471\n29472\n29473\n29474\n29475\n29476\n29477\n29478\n29479\n29480\n29481\n29482\n29483\n29484\n29485\n29486\n29487\n29488\n29489\n29490\n29491\n29492\n29493\n29494\n29495\n29496\n29497\n29498\n29499\n29500\n29501\n29502\n29503\n29504\n29505\n29506\n29507\n29508\n29509\n29510\n29511\n29512\n29513\n29514\n29515\n29516\n29517\n29518\n29519\n29520\n29521\n29522\n29523\n29524\n29525\n29526\n29527\n29528\n29529\n29530\n29531\n29532\n29533\n29534\n29535\n29536\n29537\n29538\n29539\n29540\n29541\n29542\n29543\n29544\n29545\n29546\n29547\n29548\n29549\n29550\n29551\n29552\n29553\n29554\n29555\n29556\n29557\n29558\n29559\n29560\n29561\n29562\n29563\n29564\n29565\n29566\n29567\n29568\n29569\n29570\n29571\n29572\n29573\n29574\n29575\n29576\n29577\n29578\n29579\n29580\n29581\n29582\n29583\n29584\n29585\n29586\n29587\n29588\n29589\n29590\n29591\n29592\n29593\n29594\n29595\n29596\n29597\n29598\n29599\n29600\n29601\n29602\n29603\n29604\n29605\n29606\n29607\n29608\n29609\n29610\n29611\n29612\n29613\n29614\n29615\n29616\n29617\n29618\n29619\n29620\n29621\n29622\n29623\n29624\n29625\n29626\n29627\n29628\n29629\n29630\n29631\n29632\n29633\n29634\n29635\n29636\n29637\n29638\n29639\n29640\n29641\n29642\n29643\n29644\n29645\n29646\n29647\n29648\n29649\n29650\n29651\n29652\n29653\n29654\n29655\n29656\n29657\n29658\n29659\n29660\n29661\n29662\n29663\n29664\n29665\n29666\n29667\n29668\n29669\n29670\n29671\n29672\n29673\n29674\n29675\n29676\n29677\n29678\n29679\n29680\n29681\n29682\n29683\n29684\n29685\n29686\n29687\n29688\n29689\n29690\n29691\n29692\n29693\n29694\n29695\n29696\n29697\n29698\n29699\n29700\n29701\n29702\n29703\n29704\n29705\n29706\n29707\n29708\n29709\n29710\n29711\n29712\n29713\n29714\n29715\n29716\n29717\n29718\n29719\n29720\n29721\n29722\n29723\n29724\n29725\n29726\n29727\n29728\n29729\n29730\n29731\n29732\n29733\n29734\n29735\n29736\n29737\n29738\n29739\n29740\n29741\n29742\n29743\n29744\n29745\n29746\n29747\n29748\n29749\n29750\n29751\n29752\n29753\n29754\n29755\n29756\n29757\n29758\n29759\n29760\n29761\n29762\n29763\n29764\n29765\n29766\n29767\n29768\n29769\n29770\n29771\n29772\n29773\n29774\n29775\n29776\n29777\n29778\n29779\n29780\n29781\n29782\n29783\n29784\n29785\n29786\n29787\n29788\n29789\n29790\n29791\n29792\n29793\n29794\n29795\n29796\n29797\n29798\n29799\n29800\n29801\n29802\n29803\n29804\n29805\n29806\n29807\n29808\n29809\n29810\n29811\n29812\n29813\n29814\n29815\n29816\n29817\n29818\n29819\n29820\n29821\n29822\n29823\n29824\n29825\n29826\n29827\n29828\n29829\n29830\n29831\n29832\n29833\n29834\n29835\n29836\n29837\n29838\n29839\n29840\n29841\n29842\n29843\n29844\n29845\n29846\n29847\n29848\n29849\n29850\n29851\n29852\n29853\n29854\n29855\n29856\n29857\n29858\n29859\n29860\n29861\n29862\n29863\n29864\n29865\n29866\n29867\n29868\n29869\n29870\n29871\n29872\n29873\n29874\n29875\n29876\n29877\n29878\n29879\n29880\n29881\n29882\n29883\n29884\n29885\n29886\n29887\n29888\n29889\n29890\n29891\n29892\n29893\n29894\n29895\n29896\n29897\n29898\n29899\n29900\n29901\n29902\n29903\n29904\n29905\n29906\n29907\n29908\n29909\n29910\n29911\n29912\n29913\n29914\n29915\n29916\n29917\n29918\n29919\n29920\n29921\n29922\n29923\n29924\n29925\n29926\n29927\n29928\n29929\n29930\n29931\n29932\n29933\n29934\n29935\n29936\n29937\n29938\n29939\n29940\n29941\n29942\n29943\n29944\n29945\n29946\n29947\n29948\n29949\n29950\n29951\n29952\n29953\n29954\n29955\n29956\n29957\n29958\n29959\n29960\n29961\n29962\n29963\n29964\n29965\n29966\n29967\n29968\n29969\n29970\n29971\n29972\n29973\n29974\n29975\n29976\n29977\n29978\n29979\n29980\n29981\n29982\n29983\n29984\n29985\n29986\n29987\n29988\n29989\n29990\n29991\n29992\n29993\n29994\n29995\n29996\n29997\n29998\n29999'
\ No newline at end of file
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test11.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test11.arff
new file mode 100644
index 0000000000000000000000000000000000000000..fadfaee884e3e91cd59f691afd954a6a6d4042da
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test11.arff
@@ -0,0 +1,11 @@
+@RELATION test11
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	REAL
+@ATTRIBUTE attr2 	REAL
+@ATTRIBUTE attr3	REAL
+@ATTRIBUTE class 	{ class0, class1, class2, class3 }
+@DATA
+0.1, 0.2, 0.3, 0.4,class1
+-0.1, -0.2, -0.3, -0.4,class2
+1, 2, 3, 4,class3
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test2.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test2.arff
new file mode 100644
index 0000000000000000000000000000000000000000..30f0dbf91b078ef670868d5e7321f956a6a7a506
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test2.arff
@@ -0,0 +1,15 @@
+@RELATION test2
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	real
+@ATTRIBUTE attr2 	integer
+@ATTRIBUTE attr3	Integer
+@ATTRIBUTE attr4 	Numeric
+@ATTRIBUTE attr5	numeric
+@ATTRIBUTE attr6 	string
+@ATTRIBUTE attr7 	STRING
+@ATTRIBUTE attr8 	{bla}
+@ATTRIBUTE attr9 	{bla, bla}
+
+@DATA
+0.1, 0.2, 0.3, 0.4,class1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test3.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test3.arff
new file mode 100644
index 0000000000000000000000000000000000000000..23da3b30967fcc95d70883f70be9ef6e39d577fa
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test3.arff
@@ -0,0 +1,6 @@
+@RELATION test3
+
+@ATTRIBUTE attr0	crap
+
+@DATA
+0.1, 0.2, 0.3, 0.4,class1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test4.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test4.arff
new file mode 100644
index 0000000000000000000000000000000000000000..bf5f99ca89375fbd980185fd25711901f23ff844
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test4.arff
@@ -0,0 +1,11 @@
+@RELATION test5
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	REAL
+@ATTRIBUTE attr2 	REAL
+@ATTRIBUTE attr3	REAL
+@ATTRIBUTE class 	{class0, class1, class2, class3}
+@DATA
+0.1, 0.2, 0.3, 0.4,class1
+-0.1, -0.2, -0.3, -0.4,class2
+1, 2, 3, 4,class3
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test5.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test5.arff
new file mode 100644
index 0000000000000000000000000000000000000000..0075daf05e7792e80dcd565e791ce40e4dd49e85
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test5.arff
@@ -0,0 +1,26 @@
+@RELATION test4
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	REAL
+@ATTRIBUTE attr2 	REAL
+@ATTRIBUTE attr3	REAL
+@ATTRIBUTE class 	{class0, class1, class2, class3}
+
+@DATA
+
+% lsdflkjhaksjdhf
+
+% lsdflkjhaksjdhf
+
+0.1, 0.2, 0.3, 0.4,class1
+% laksjdhf
+
+% lsdflkjhaksjdhf
+-0.1, -0.2, -0.3, -0.4,class2
+
+% lsdflkjhaksjdhf
+% lsdflkjhaksjdhf
+
+% lsdflkjhaksjdhf
+
+1, 2, 3, 4,class3
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test6.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test6.arff
new file mode 100644
index 0000000000000000000000000000000000000000..b63280b03aef8e0553a83fbf96692d280a3f86b7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test6.arff
@@ -0,0 +1,12 @@
+@RELATION test6
+
+@ATTRIBUTE attr0	REAL
+@ATTRIBUTE attr1 	REAL
+@ATTRIBUTE attr2 	REAL
+@ATTRIBUTE attr3	REAL
+@ATTRIBUTE class 	{C}
+
+@DATA
+0.1, 0.2, 0.3, 0.4,C
+-0.1, -0.2, -0.3, -0.4,C
+1, 2, 3, 4,C
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test7.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test7.arff
new file mode 100644
index 0000000000000000000000000000000000000000..38ef6c9a7a10afb10caa5913687ea3636ab1d38e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test7.arff
@@ -0,0 +1,15 @@
+@RELATION test7
+
+@ATTRIBUTE attr_year	DATE yyyy
+@ATTRIBUTE attr_month	DATE yyyy-MM
+@ATTRIBUTE attr_date	DATE yyyy-MM-dd
+@ATTRIBUTE attr_datetime_local	DATE "yyyy-MM-dd HH:mm"
+@ATTRIBUTE attr_datetime_missing	DATE "yyyy-MM-dd HH:mm"
+
+@DATA
+1999,1999-01,1999-01-31,"1999-01-31 00:01",?
+2004,2004-12,2004-12-01,"2004-12-01 23:59","2004-12-01 23:59"
+1817,1817-04,1817-04-28,"1817-04-28 13:00",?
+2100,2100-09,2100-09-10,"2100-09-10 12:00",?
+2013,2013-11,2013-11-30,"2013-11-30 04:55","2013-11-30 04:55"
+1631,1631-10,1631-10-15,"1631-10-15 20:04","1631-10-15 20:04"
\ No newline at end of file
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test8.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test8.arff
new file mode 100644
index 0000000000000000000000000000000000000000..776deb4c9e7550eafdb26d16826f5651da37ef12
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test8.arff
@@ -0,0 +1,12 @@
+@RELATION test8
+
+@ATTRIBUTE attr_datetime_utc	DATE "yyyy-MM-dd HH:mm Z"
+@ATTRIBUTE attr_datetime_full	DATE "yy-MM-dd HH:mm:ss z"
+
+@DATA
+"1999-01-31 00:01 UTC","99-01-31 00:01:08 +0430"
+"2004-12-01 23:59 UTC","04-12-01 23:59:59 -0800"
+"1817-04-28 13:00 UTC","17-04-28 13:00:33 +1000"
+"2100-09-10 12:00 UTC","21-09-10 12:00:21 -0300"
+"2013-11-30 04:55 UTC","13-11-30 04:55:48 -1100"
+"1631-10-15 20:04 UTC","31-10-15 20:04:10 +0000"
\ No newline at end of file
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test9.arff b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test9.arff
new file mode 100644
index 0000000000000000000000000000000000000000..b3f97e32a3fd4909a3f9cbf8d5d2e8d250f8dbad
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/data/test9.arff
@@ -0,0 +1,14 @@
+@RELATION test9
+
+@ATTRIBUTE attr_date_number	    RELATIONAL
+	@ATTRIBUTE attr_date	DATE "yyyy-MM-dd"
+	@ATTRIBUTE attr_number	INTEGER
+@END attr_date_number
+
+@DATA
+"1999-01-31	1\n1935-11-27	10"
+"2004-12-01	2\n1942-08-13	20"
+"1817-04-28	3"
+"2100-09-10	4\n1957-04-17	40\n1721-01-14	400"
+"2013-11-30	5"
+"1631-10-15	6"
\ No newline at end of file
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/test_arffread.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/test_arffread.py
new file mode 100644
index 0000000000000000000000000000000000000000..d13ebe6dd1af3044794b28f5375d06ed60787966
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/arff/tests/test_arffread.py
@@ -0,0 +1,421 @@
+import datetime
+import os
+import sys
+from os.path import join as pjoin
+
+from io import StringIO
+
+import numpy as np
+
+from numpy.testing import (assert_array_almost_equal,
+                           assert_array_equal, assert_equal, assert_)
+from pytest import raises as assert_raises
+
+from scipy.io.arff import loadarff
+from scipy.io.arff._arffread import read_header, ParseArffError
+
+
+data_path = pjoin(os.path.dirname(__file__), 'data')
+
+test1 = pjoin(data_path, 'test1.arff')
+test2 = pjoin(data_path, 'test2.arff')
+test3 = pjoin(data_path, 'test3.arff')
+
+test4 = pjoin(data_path, 'test4.arff')
+test5 = pjoin(data_path, 'test5.arff')
+test6 = pjoin(data_path, 'test6.arff')
+test7 = pjoin(data_path, 'test7.arff')
+test8 = pjoin(data_path, 'test8.arff')
+test9 = pjoin(data_path, 'test9.arff')
+test10 = pjoin(data_path, 'test10.arff')
+test11 = pjoin(data_path, 'test11.arff')
+test_quoted_nominal = pjoin(data_path, 'quoted_nominal.arff')
+test_quoted_nominal_spaces = pjoin(data_path, 'quoted_nominal_spaces.arff')
+
+expect4_data = [(0.1, 0.2, 0.3, 0.4, 'class1'),
+                (-0.1, -0.2, -0.3, -0.4, 'class2'),
+                (1, 2, 3, 4, 'class3')]
+expected_types = ['numeric', 'numeric', 'numeric', 'numeric', 'nominal']
+
+missing = pjoin(data_path, 'missing.arff')
+expect_missing_raw = np.array([[1, 5], [2, 4], [np.nan, np.nan]])
+expect_missing = np.empty(3, [('yop', float), ('yap', float)])
+expect_missing['yop'] = expect_missing_raw[:, 0]  # type: ignore[call-overload]
+expect_missing['yap'] = expect_missing_raw[:, 1]  # type: ignore[call-overload]
+
+
+class TestData:
+    def test1(self):
+        # Parsing trivial file with nothing.
+        self._test(test4)
+
+    def test2(self):
+        # Parsing trivial file with some comments in the data section.
+        self._test(test5)
+
+    def test3(self):
+        # Parsing trivial file with nominal attribute of 1 character.
+        self._test(test6)
+
+    def test4(self):
+        # Parsing trivial file with trailing spaces in attribute declaration.
+        self._test(test11)
+
+    def _test(self, test_file):
+        data, meta = loadarff(test_file)
+        for i in range(len(data)):
+            for j in range(4):
+                assert_array_almost_equal(expect4_data[i][j], data[i][j])
+        assert_equal(meta.types(), expected_types)
+
+    def test_filelike(self):
+        # Test reading from file-like object (StringIO)
+        with open(test1) as f1:
+            data1, meta1 = loadarff(f1)
+        with open(test1) as f2:
+            data2, meta2 = loadarff(StringIO(f2.read()))
+        assert_(data1 == data2)
+        assert_(repr(meta1) == repr(meta2))
+
+    def test_path(self):
+        # Test reading from `pathlib.Path` object
+        from pathlib import Path
+
+        with open(test1) as f1:
+            data1, meta1 = loadarff(f1)
+
+        data2, meta2 = loadarff(Path(test1))
+
+        assert_(data1 == data2)
+        assert_(repr(meta1) == repr(meta2))
+
+
+class TestMissingData:
+    def test_missing(self):
+        data, meta = loadarff(missing)
+        for i in ['yop', 'yap']:
+            assert_array_almost_equal(data[i], expect_missing[i])
+
+
+class TestNoData:
+    def test_nodata(self):
+        # The file nodata.arff has no data in the @DATA section.
+        # Reading it should result in an array with length 0.
+        nodata_filename = os.path.join(data_path, 'nodata.arff')
+        data, meta = loadarff(nodata_filename)
+        if sys.byteorder == 'big':
+            end = '>'
+        else:
+            end = '<'
+        expected_dtype = np.dtype([('sepallength', f'{end}f8'),
+                                   ('sepalwidth', f'{end}f8'),
+                                   ('petallength', f'{end}f8'),
+                                   ('petalwidth', f'{end}f8'),
+                                   ('class', 'S15')])
+        assert_equal(data.dtype, expected_dtype)
+        assert_equal(data.size, 0)
+
+
+class TestHeader:
+    def test_type_parsing(self):
+        # Test parsing type of attribute from their value.
+        with open(test2) as ofile:
+            rel, attrs = read_header(ofile)
+
+        expected = ['numeric', 'numeric', 'numeric', 'numeric', 'numeric',
+                    'numeric', 'string', 'string', 'nominal', 'nominal']
+
+        for i in range(len(attrs)):
+            assert_(attrs[i].type_name == expected[i])
+
+    def test_badtype_parsing(self):
+        # Test parsing wrong type of attribute from their value.
+        def badtype_read():
+            with open(test3) as ofile:
+                _, _ = read_header(ofile)
+
+        assert_raises(ParseArffError, badtype_read)
+
+    def test_fullheader1(self):
+        # Parsing trivial header with nothing.
+        with open(test1) as ofile:
+            rel, attrs = read_header(ofile)
+
+        # Test relation
+        assert_(rel == 'test1')
+
+        # Test numerical attributes
+        assert_(len(attrs) == 5)
+        for i in range(4):
+            assert_(attrs[i].name == 'attr%d' % i)
+            assert_(attrs[i].type_name == 'numeric')
+
+        # Test nominal attribute
+        assert_(attrs[4].name == 'class')
+        assert_(attrs[4].values == ('class0', 'class1', 'class2', 'class3'))
+
+    def test_dateheader(self):
+        with open(test7) as ofile:
+            rel, attrs = read_header(ofile)
+
+        assert_(rel == 'test7')
+
+        assert_(len(attrs) == 5)
+
+        assert_(attrs[0].name == 'attr_year')
+        assert_(attrs[0].date_format == '%Y')
+
+        assert_(attrs[1].name == 'attr_month')
+        assert_(attrs[1].date_format == '%Y-%m')
+
+        assert_(attrs[2].name == 'attr_date')
+        assert_(attrs[2].date_format == '%Y-%m-%d')
+
+        assert_(attrs[3].name == 'attr_datetime_local')
+        assert_(attrs[3].date_format == '%Y-%m-%d %H:%M')
+
+        assert_(attrs[4].name == 'attr_datetime_missing')
+        assert_(attrs[4].date_format == '%Y-%m-%d %H:%M')
+
+    def test_dateheader_unsupported(self):
+        def read_dateheader_unsupported():
+            with open(test8) as ofile:
+                _, _ = read_header(ofile)
+
+        assert_raises(ValueError, read_dateheader_unsupported)
+
+
+class TestDateAttribute:
+    def setup_method(self):
+        self.data, self.meta = loadarff(test7)
+
+    def test_year_attribute(self):
+        expected = np.array([
+            '1999',
+            '2004',
+            '1817',
+            '2100',
+            '2013',
+            '1631'
+        ], dtype='datetime64[Y]')
+
+        assert_array_equal(self.data["attr_year"], expected)
+
+    def test_month_attribute(self):
+        expected = np.array([
+            '1999-01',
+            '2004-12',
+            '1817-04',
+            '2100-09',
+            '2013-11',
+            '1631-10'
+        ], dtype='datetime64[M]')
+
+        assert_array_equal(self.data["attr_month"], expected)
+
+    def test_date_attribute(self):
+        expected = np.array([
+            '1999-01-31',
+            '2004-12-01',
+            '1817-04-28',
+            '2100-09-10',
+            '2013-11-30',
+            '1631-10-15'
+        ], dtype='datetime64[D]')
+
+        assert_array_equal(self.data["attr_date"], expected)
+
+    def test_datetime_local_attribute(self):
+        expected = np.array([
+            datetime.datetime(year=1999, month=1, day=31, hour=0, minute=1),
+            datetime.datetime(year=2004, month=12, day=1, hour=23, minute=59),
+            datetime.datetime(year=1817, month=4, day=28, hour=13, minute=0),
+            datetime.datetime(year=2100, month=9, day=10, hour=12, minute=0),
+            datetime.datetime(year=2013, month=11, day=30, hour=4, minute=55),
+            datetime.datetime(year=1631, month=10, day=15, hour=20, minute=4)
+        ], dtype='datetime64[m]')
+
+        assert_array_equal(self.data["attr_datetime_local"], expected)
+
+    def test_datetime_missing(self):
+        expected = np.array([
+            'nat',
+            '2004-12-01T23:59',
+            'nat',
+            'nat',
+            '2013-11-30T04:55',
+            '1631-10-15T20:04'
+        ], dtype='datetime64[m]')
+
+        assert_array_equal(self.data["attr_datetime_missing"], expected)
+
+    def test_datetime_timezone(self):
+        assert_raises(ParseArffError, loadarff, test8)
+
+
+class TestRelationalAttribute:
+    def setup_method(self):
+        self.data, self.meta = loadarff(test9)
+
+    def test_attributes(self):
+        assert_equal(len(self.meta._attributes), 1)
+
+        relational = list(self.meta._attributes.values())[0]
+
+        assert_equal(relational.name, 'attr_date_number')
+        assert_equal(relational.type_name, 'relational')
+        assert_equal(len(relational.attributes), 2)
+        assert_equal(relational.attributes[0].name,
+                     'attr_date')
+        assert_equal(relational.attributes[0].type_name,
+                     'date')
+        assert_equal(relational.attributes[1].name,
+                     'attr_number')
+        assert_equal(relational.attributes[1].type_name,
+                     'numeric')
+
+    def test_data(self):
+        dtype_instance = [('attr_date', 'datetime64[D]'),
+                          ('attr_number', np.float64)]
+
+        expected = [
+            np.array([('1999-01-31', 1), ('1935-11-27', 10)],
+                     dtype=dtype_instance),
+            np.array([('2004-12-01', 2), ('1942-08-13', 20)],
+                     dtype=dtype_instance),
+            np.array([('1817-04-28', 3)],
+                     dtype=dtype_instance),
+            np.array([('2100-09-10', 4), ('1957-04-17', 40),
+                      ('1721-01-14', 400)],
+                     dtype=dtype_instance),
+            np.array([('2013-11-30', 5)],
+                     dtype=dtype_instance),
+            np.array([('1631-10-15', 6)],
+                     dtype=dtype_instance)
+        ]
+
+        for i in range(len(self.data["attr_date_number"])):
+            assert_array_equal(self.data["attr_date_number"][i],
+                               expected[i])
+
+
+class TestRelationalAttributeLong:
+    def setup_method(self):
+        self.data, self.meta = loadarff(test10)
+
+    def test_attributes(self):
+        assert_equal(len(self.meta._attributes), 1)
+
+        relational = list(self.meta._attributes.values())[0]
+
+        assert_equal(relational.name, 'attr_relational')
+        assert_equal(relational.type_name, 'relational')
+        assert_equal(len(relational.attributes), 1)
+        assert_equal(relational.attributes[0].name,
+                     'attr_number')
+        assert_equal(relational.attributes[0].type_name, 'numeric')
+
+    def test_data(self):
+        dtype_instance = [('attr_number', np.float64)]
+
+        expected = np.array([(n,) for n in range(30000)],
+                            dtype=dtype_instance)
+
+        assert_array_equal(self.data["attr_relational"][0],
+                           expected)
+
+
+class TestQuotedNominal:
+    """
+    Regression test for issue #10232:
+
+    Exception in loadarff with quoted nominal attributes.
+    """
+
+    def setup_method(self):
+        self.data, self.meta = loadarff(test_quoted_nominal)
+
+    def test_attributes(self):
+        assert_equal(len(self.meta._attributes), 2)
+
+        age, smoker = self.meta._attributes.values()
+
+        assert_equal(age.name, 'age')
+        assert_equal(age.type_name, 'numeric')
+        assert_equal(smoker.name, 'smoker')
+        assert_equal(smoker.type_name, 'nominal')
+        assert_equal(smoker.values, ['yes', 'no'])
+
+    def test_data(self):
+
+        age_dtype_instance = np.float64
+        smoker_dtype_instance = '' (big endian)
+
+'''
+import sys
+
+__all__ = [
+    'aliases', 'native_code', 'swapped_code',
+    'sys_is_le', 'to_numpy_code'
+]
+
+sys_is_le = sys.byteorder == 'little'
+native_code = sys_is_le and '<' or '>'
+swapped_code = sys_is_le and '>' or '<'
+
+aliases = {'little': ('little', '<', 'l', 'le'),
+           'big': ('big', '>', 'b', 'be'),
+           'native': ('native', '='),
+           'swapped': ('swapped', 'S')}
+
+
+def to_numpy_code(code):
+    """
+    Convert various order codings to NumPy format.
+
+    Parameters
+    ----------
+    code : str
+        The code to convert. It is converted to lower case before parsing.
+        Legal values are:
+        'little', 'big', 'l', 'b', 'le', 'be', '<', '>', 'native', '=',
+        'swapped', 's'.
+
+    Returns
+    -------
+    out_code : {'<', '>'}
+        Here '<' is the numpy dtype code for little endian,
+        and '>' is the code for big endian.
+
+    Examples
+    --------
+    >>> import sys
+    >>> from scipy.io.matlab._byteordercodes import to_numpy_code
+    >>> sys_is_le = (sys.byteorder == 'little')
+    >>> sys_is_le
+    True
+    >>> to_numpy_code('big')
+    '>'
+    >>> to_numpy_code('little')
+    '<'
+    >>> nc = to_numpy_code('native')
+    >>> nc == '<' if sys_is_le else nc == '>'
+    True
+    >>> sc = to_numpy_code('swapped')
+    >>> sc == '>' if sys_is_le else sc == '<'
+    True
+
+    """
+    code = code.lower()
+    if code is None:
+        return native_code
+    if code in aliases['little']:
+        return '<'
+    elif code in aliases['big']:
+        return '>'
+    elif code in aliases['native']:
+        return native_code
+    elif code in aliases['swapped']:
+        return swapped_code
+    else:
+        raise ValueError(
+            f'We cannot handle byte order {code}')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c86d873bd11fb45676d8db37a5d60b032276ecc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio.py
@@ -0,0 +1,372 @@
+"""
+Module for reading and writing matlab (TM) .mat files
+"""
+# Authors: Travis Oliphant, Matthew Brett
+
+from contextlib import contextmanager
+
+from ._miobase import _get_matfile_version, docfiller
+from ._mio4 import MatFile4Reader, MatFile4Writer
+from ._mio5 import MatFile5Reader, MatFile5Writer
+
+__all__ = ['loadmat', 'savemat', 'whosmat']
+
+
+@contextmanager
+def _open_file_context(file_like, appendmat, mode='rb'):
+    f, opened = _open_file(file_like, appendmat, mode)
+    try:
+        yield f
+    finally:
+        if opened:
+            f.close()
+
+
+def _open_file(file_like, appendmat, mode='rb'):
+    """
+    Open `file_like` and return as file-like object. First, check if object is
+    already file-like; if so, return it as-is. Otherwise, try to pass it
+    to open(). If that fails, and `file_like` is a string, and `appendmat` is true,
+    append '.mat' and try again.
+    """
+    reqs = {'read'} if set(mode) & set('r+') else set()
+    if set(mode) & set('wax+'):
+        reqs.add('write')
+    if reqs.issubset(dir(file_like)):
+        return file_like, False
+
+    try:
+        return open(file_like, mode), True
+    except OSError as e:
+        # Probably "not found"
+        if isinstance(file_like, str):
+            if appendmat and not file_like.endswith('.mat'):
+                file_like += '.mat'
+            return open(file_like, mode), True
+        else:
+            raise OSError(
+                'Reader needs file name or open file-like object'
+            ) from e
+
+
+@docfiller
+def mat_reader_factory(file_name, appendmat=True, **kwargs):
+    """
+    Create reader for matlab .mat format files.
+
+    Parameters
+    ----------
+    %(file_arg)s
+    %(append_arg)s
+    %(load_args)s
+    %(struct_arg)s
+
+    Returns
+    -------
+    matreader : MatFileReader object
+       Initialized instance of MatFileReader class matching the mat file
+       type detected in `filename`.
+    file_opened : bool
+       Whether the file was opened by this routine.
+
+    """
+    byte_stream, file_opened = _open_file(file_name, appendmat)
+    mjv, mnv = _get_matfile_version(byte_stream)
+    if mjv == 0:
+        return MatFile4Reader(byte_stream, **kwargs), file_opened
+    elif mjv == 1:
+        return MatFile5Reader(byte_stream, **kwargs), file_opened
+    elif mjv == 2:
+        raise NotImplementedError('Please use HDF reader for matlab v7.3 '
+                                  'files, e.g. h5py')
+    else:
+        raise TypeError(f'Did not recognize version {mjv}')
+
+
+@docfiller
+def loadmat(file_name, mdict=None, appendmat=True, *, spmatrix=True, **kwargs):
+    """
+    Load MATLAB file.
+
+    Parameters
+    ----------
+    file_name : str
+       Name of the mat file (do not need .mat extension if
+       appendmat==True). Can also pass open file-like object.
+    mdict : dict, optional
+        Dictionary in which to insert matfile variables.
+    appendmat : bool, optional
+       True to append the .mat extension to the end of the given
+       filename, if not already present. Default is True.
+    spmatrix : bool, optional (default: True)
+        If ``True``, return sparse ``coo_matrix``. Otherwise return ``coo_array``.
+        Only relevant for sparse variables.
+    byte_order : str or None, optional
+       None by default, implying byte order guessed from mat
+       file. Otherwise can be one of ('native', '=', 'little', '<',
+       'BIG', '>').
+    mat_dtype : bool, optional
+       If True, return arrays in same dtype as would be loaded into
+       MATLAB (instead of the dtype with which they are saved).
+    squeeze_me : bool, optional
+       Whether to squeeze unit matrix dimensions or not.
+    chars_as_strings : bool, optional
+       Whether to convert char arrays to string arrays.
+    matlab_compatible : bool, optional
+       Returns matrices as would be loaded by MATLAB (implies
+       squeeze_me=False, chars_as_strings=False, mat_dtype=True,
+       struct_as_record=True).
+    struct_as_record : bool, optional
+       Whether to load MATLAB structs as NumPy record arrays, or as
+       old-style NumPy arrays with dtype=object. Setting this flag to
+       False replicates the behavior of scipy version 0.7.x (returning
+       NumPy object arrays). The default setting is True, because it
+       allows easier round-trip load and save of MATLAB files.
+    verify_compressed_data_integrity : bool, optional
+        Whether the length of compressed sequences in the MATLAB file
+        should be checked, to ensure that they are not longer than we expect.
+        It is advisable to enable this (the default) because overlong
+        compressed sequences in MATLAB files generally indicate that the
+        files have experienced some sort of corruption.
+    variable_names : None or sequence
+        If None (the default) - read all variables in file. Otherwise,
+        `variable_names` should be a sequence of strings, giving names of the
+        MATLAB variables to read from the file. The reader will skip any
+        variable with a name not in this sequence, possibly saving some read
+        processing.
+    simplify_cells : False, optional
+        If True, return a simplified dict structure (which is useful if the mat
+        file contains cell arrays). Note that this only affects the structure
+        of the result and not its contents (which is identical for both output
+        structures). If True, this automatically sets `struct_as_record` to
+        False and `squeeze_me` to True, which is required to simplify cells.
+    uint16_codec : str, optional
+        The codec to use for decoding characters, which are stored as uint16
+        values. The default uses the system encoding, but this can be manually
+        set to other values such as 'ascii', 'latin1', and 'utf-8'. This
+        parameter is relevant only for files stored as v6 and above, and not
+        for files stored as v4.
+
+    Returns
+    -------
+    mat_dict : dict
+       dictionary with variable names as keys, and loaded matrices as values.
+
+    Notes
+    -----
+    v4 (Level 1.0), v6 and v7 to 7.2 matfiles are supported.
+
+    You will need an HDF5 Python library to read MATLAB 7.3 format mat
+    files. Because SciPy does not supply one, we do not implement the
+    HDF5 / 7.3 interface here.
+
+    Examples
+    --------
+    >>> from os.path import dirname, join as pjoin
+    >>> import scipy.io as sio
+
+    Get the filename for an example .mat file from the tests/data directory.
+
+    >>> data_dir = pjoin(dirname(sio.__file__), 'matlab', 'tests', 'data')
+    >>> mat_fname = pjoin(data_dir, 'testdouble_7.4_GLNX86.mat')
+
+    Load the .mat file contents.
+
+    >>> mat_contents = sio.loadmat(mat_fname, spmatrix=False)
+
+    The result is a dictionary, one key/value pair for each variable:
+
+    >>> sorted(mat_contents.keys())
+    ['__globals__', '__header__', '__version__', 'testdouble']
+    >>> mat_contents['testdouble']
+    array([[0.        , 0.78539816, 1.57079633, 2.35619449, 3.14159265,
+            3.92699082, 4.71238898, 5.49778714, 6.28318531]])
+
+    By default SciPy reads MATLAB structs as structured NumPy arrays where the
+    dtype fields are of type `object` and the names correspond to the MATLAB
+    struct field names. This can be disabled by setting the optional argument
+    `struct_as_record=False`.
+
+    Get the filename for an example .mat file that contains a MATLAB struct
+    called `teststruct` and load the contents.
+
+    >>> matstruct_fname = pjoin(data_dir, 'teststruct_7.4_GLNX86.mat')
+    >>> matstruct_contents = sio.loadmat(matstruct_fname)
+    >>> teststruct = matstruct_contents['teststruct']
+    >>> teststruct.dtype
+    dtype([('stringfield', 'O'), ('doublefield', 'O'), ('complexfield', 'O')])
+
+    The size of the structured array is the size of the MATLAB struct, not the
+    number of elements in any particular field. The shape defaults to 2-D
+    unless the optional argument `squeeze_me=True`, in which case all length 1
+    dimensions are removed.
+
+    >>> teststruct.size
+    1
+    >>> teststruct.shape
+    (1, 1)
+
+    Get the 'stringfield' of the first element in the MATLAB struct.
+
+    >>> teststruct[0, 0]['stringfield']
+    array(['Rats live on no evil star.'],
+      dtype='>> teststruct['doublefield'][0, 0]
+    array([[ 1.41421356,  2.71828183,  3.14159265]])
+
+    Load the MATLAB struct, squeezing out length 1 dimensions, and get the item
+    from the 'complexfield'.
+
+    >>> matstruct_squeezed = sio.loadmat(matstruct_fname, squeeze_me=True)
+    >>> matstruct_squeezed['teststruct'].shape
+    ()
+    >>> matstruct_squeezed['teststruct']['complexfield'].shape
+    ()
+    >>> matstruct_squeezed['teststruct']['complexfield'].item()
+    array([ 1.41421356+1.41421356j,  2.71828183+2.71828183j,
+        3.14159265+3.14159265j])
+    """
+    variable_names = kwargs.pop('variable_names', None)
+    with _open_file_context(file_name, appendmat) as f:
+        MR, _ = mat_reader_factory(f, **kwargs)
+        matfile_dict = MR.get_variables(variable_names)
+    if spmatrix:
+        from scipy.sparse import issparse, coo_matrix
+        for name, var in list(matfile_dict.items()):
+            if issparse(var):
+                matfile_dict[name] = coo_matrix(var)
+
+    if mdict is not None:
+        mdict.update(matfile_dict)
+    else:
+        mdict = matfile_dict
+
+    return mdict
+
+
+@docfiller
+def savemat(file_name, mdict,
+            appendmat=True,
+            format='5',
+            long_field_names=False,
+            do_compression=False,
+            oned_as='row'):
+    """
+    Save a dictionary of names and arrays into a MATLAB-style .mat file.
+
+    This saves the array objects in the given dictionary to a MATLAB-
+    style .mat file.
+
+    Parameters
+    ----------
+    file_name : str or file-like object
+        Name of the .mat file (.mat extension not needed if ``appendmat ==
+        True``).
+        Can also pass open file_like object.
+    mdict : dict
+        Dictionary from which to save matfile variables.
+    appendmat : bool, optional
+        True (the default) to append the .mat extension to the end of the
+        given filename, if not already present.
+    format : {'5', '4'}, string, optional
+        '5' (the default) for MATLAB 5 and up (to 7.2),
+        '4' for MATLAB 4 .mat files.
+    long_field_names : bool, optional
+        False (the default) - maximum field name length in a structure is
+        31 characters which is the documented maximum length.
+        True - maximum field name length in a structure is 63 characters
+        which works for MATLAB 7.6+.
+    do_compression : bool, optional
+        Whether or not to compress matrices on write. Default is False.
+    oned_as : {'row', 'column'}, optional
+        If 'column', write 1-D NumPy arrays as column vectors.
+        If 'row', write 1-D NumPy arrays as row vectors.
+
+    Examples
+    --------
+    >>> from scipy.io import savemat
+    >>> import numpy as np
+    >>> a = np.arange(20)
+    >>> mdic = {"a": a, "label": "experiment"}
+    >>> mdic
+    {'a': array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
+        17, 18, 19]),
+    'label': 'experiment'}
+    >>> savemat("matlab_matrix.mat", mdic)
+    """
+    with _open_file_context(file_name, appendmat, 'wb') as file_stream:
+        if format == '4':
+            if long_field_names:
+                message = "Long field names are not available for version 4 files"
+                raise ValueError(message)
+            MW = MatFile4Writer(file_stream, oned_as)
+        elif format == '5':
+            MW = MatFile5Writer(file_stream,
+                                do_compression=do_compression,
+                                unicode_strings=True,
+                                long_field_names=long_field_names,
+                                oned_as=oned_as)
+        else:
+            raise ValueError("Format should be '4' or '5'")
+        MW.put_variables(mdict)
+
+
+@docfiller
+def whosmat(file_name, appendmat=True, **kwargs):
+    """
+    List variables inside a MATLAB file.
+
+    Parameters
+    ----------
+    %(file_arg)s
+    %(append_arg)s
+    %(load_args)s
+    %(struct_arg)s
+
+    Returns
+    -------
+    variables : list of tuples
+        A list of tuples, where each tuple holds the matrix name (a string),
+        its shape (tuple of ints), and its data class (a string).
+        Possible data classes are: int8, uint8, int16, uint16, int32, uint32,
+        int64, uint64, single, double, cell, struct, object, char, sparse,
+        function, opaque, logical, unknown.
+
+    Notes
+    -----
+    v4 (Level 1.0), v6 and v7 to 7.2 matfiles are supported.
+
+    You will need an HDF5 python library to read matlab 7.3 format mat
+    files (e.g. h5py). Because SciPy does not supply one, we do not implement the
+    HDF5 / 7.3 interface here.
+
+    .. versionadded:: 0.12.0
+
+    Examples
+    --------
+    >>> from io import BytesIO
+    >>> import numpy as np
+    >>> from scipy.io import savemat, whosmat
+
+    Create some arrays, and use `savemat` to write them to a ``BytesIO``
+    instance.
+
+    >>> a = np.array([[10, 20, 30], [11, 21, 31]], dtype=np.int32)
+    >>> b = np.geomspace(1, 10, 5)
+    >>> f = BytesIO()
+    >>> savemat(f, {'a': a, 'b': b})
+
+    Use `whosmat` to inspect ``f``.  Each tuple in the output list gives
+    the name, shape and data type of the array in ``f``.
+
+    >>> whosmat(f)
+    [('a', (2, 3), 'int32'), ('b', (1, 5), 'double')]
+
+    """
+    with _open_file_context(file_name, appendmat) as f:
+        ML, file_opened = mat_reader_factory(f, **kwargs)
+        variables = ML.list_variables()
+    return variables
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio4.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio4.py
new file mode 100644
index 0000000000000000000000000000000000000000..b108386d110e6062d088498259e849603583eb94
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio4.py
@@ -0,0 +1,632 @@
+''' Classes for read / write of matlab (TM) 4 files
+'''
+import sys
+import warnings
+import math
+from operator import mul
+
+import numpy as np
+
+import scipy.sparse
+
+from ._miobase import (MatFileReader, docfiller, matdims, read_dtype,
+                      convert_dtypes, arr_to_chars, arr_dtype_number)
+
+from ._mio_utils import squeeze_element, chars_to_strings
+from functools import reduce
+
+
+__all__ = [
+    'MatFile4Reader', 'MatFile4Writer', 'SYS_LITTLE_ENDIAN',
+    'VarHeader4', 'VarReader4', 'VarWriter4', 'arr_to_2d', 'mclass_info',
+    'mdtypes_template', 'miDOUBLE', 'miINT16', 'miINT32', 'miSINGLE',
+    'miUINT16', 'miUINT8', 'mxCHAR_CLASS', 'mxFULL_CLASS', 'mxSPARSE_CLASS',
+    'np_to_mtypes', 'order_codes'
+]
+
+
+SYS_LITTLE_ENDIAN = sys.byteorder == 'little'
+
+miDOUBLE = 0
+miSINGLE = 1
+miINT32 = 2
+miINT16 = 3
+miUINT16 = 4
+miUINT8 = 5
+
+mdtypes_template = {
+    miDOUBLE: 'f8',
+    miSINGLE: 'f4',
+    miINT32: 'i4',
+    miINT16: 'i2',
+    miUINT16: 'u2',
+    miUINT8: 'u1',
+    'header': [('mopt', 'i4'),
+               ('mrows', 'i4'),
+               ('ncols', 'i4'),
+               ('imagf', 'i4'),
+               ('namlen', 'i4')],
+    'U1': 'U1',
+    }
+
+np_to_mtypes = {
+    'f8': miDOUBLE,
+    'c32': miDOUBLE,
+    'c24': miDOUBLE,
+    'c16': miDOUBLE,
+    'f4': miSINGLE,
+    'c8': miSINGLE,
+    'i4': miINT32,
+    'i2': miINT16,
+    'u2': miUINT16,
+    'u1': miUINT8,
+    'S1': miUINT8,
+    }
+
+# matrix classes
+mxFULL_CLASS = 0
+mxCHAR_CLASS = 1
+mxSPARSE_CLASS = 2
+
+order_codes = {
+    0: '<',
+    1: '>',
+    2: 'VAX D-float',  # !
+    3: 'VAX G-float',
+    4: 'Cray',  # !!
+    }
+
+mclass_info = {
+    mxFULL_CLASS: 'double',
+    mxCHAR_CLASS: 'char',
+    mxSPARSE_CLASS: 'sparse',
+    }
+
+
+_MAX_INTP = np.iinfo(np.intp).max
+
+
+class VarHeader4:
+    # Mat4 variables never logical or global
+    is_logical = False
+    is_global = False
+
+    def __init__(self,
+                 name,
+                 dtype,
+                 mclass,
+                 dims,
+                 is_complex):
+        self.name = name
+        self.dtype = dtype
+        self.mclass = mclass
+        self.dims = dims
+        self.is_complex = is_complex
+
+
+class VarReader4:
+    ''' Class to read matlab 4 variables '''
+
+    def __init__(self, file_reader):
+        self.file_reader = file_reader
+        self.mat_stream = file_reader.mat_stream
+        self.dtypes = file_reader.dtypes
+        self.chars_as_strings = file_reader.chars_as_strings
+        self.squeeze_me = file_reader.squeeze_me
+
+    def read_header(self):
+        ''' Read and return header for variable '''
+        data = read_dtype(self.mat_stream, self.dtypes['header'])
+        name = self.mat_stream.read(int(data['namlen'])).strip(b'\x00')
+        if data['mopt'] < 0 or data['mopt'] > 5000:
+            raise ValueError('Mat 4 mopt wrong format, byteswapping problem?')
+        M, rest = divmod(data['mopt'], 1000)  # order code
+        if M not in (0, 1):
+            warnings.warn(f"We do not support byte ordering '{order_codes[M]}';"
+                          " returned data may be corrupt",
+                          UserWarning, stacklevel=3)
+        O, rest = divmod(rest, 100)  # unused, should be 0
+        if O != 0:
+            raise ValueError('O in MOPT integer should be 0, wrong format?')
+        P, rest = divmod(rest, 10)  # data type code e.g miDOUBLE (see above)
+        T = rest  # matrix type code e.g., mxFULL_CLASS (see above)
+        dims = (data['mrows'], data['ncols'])
+        is_complex = data['imagf'] == 1
+        dtype = self.dtypes[P]
+        return VarHeader4(
+            name,
+            dtype,
+            T,
+            dims,
+            is_complex)
+
+    def array_from_header(self, hdr, process=True):
+        mclass = hdr.mclass
+        if mclass == mxFULL_CLASS:
+            arr = self.read_full_array(hdr)
+        elif mclass == mxCHAR_CLASS:
+            arr = self.read_char_array(hdr)
+            if process and self.chars_as_strings:
+                arr = chars_to_strings(arr)
+        elif mclass == mxSPARSE_CLASS:
+            # no current processing (below) makes sense for sparse
+            return self.read_sparse_array(hdr)
+        else:
+            raise TypeError(f'No reader for class code {mclass}')
+        if process and self.squeeze_me:
+            return squeeze_element(arr)
+        return arr
+
+    def read_sub_array(self, hdr, copy=True):
+        ''' Mat4 read using header `hdr` dtype and dims
+
+        Parameters
+        ----------
+        hdr : object
+           object with attributes ``dtype``, ``dims``. dtype is assumed to be
+           the correct endianness
+        copy : bool, optional
+           copies array before return if True (default True)
+           (buffer is usually read only)
+
+        Returns
+        -------
+        arr : ndarray
+            of dtype given by `hdr` ``dtype`` and shape given by `hdr` ``dims``
+        '''
+        dt = hdr.dtype
+        # Fast product for large (>2GB) arrays.
+        num_bytes = reduce(mul, hdr.dims, np.int64(dt.itemsize))
+        if num_bytes > _MAX_INTP:
+            raise ValueError(
+                f"Variable '{hdr.name.decode('latin1')}' has byte length "
+                f"longer than largest possible NumPy array on this platform.")
+        buffer = self.mat_stream.read(num_bytes)
+        if len(buffer) != num_bytes:
+            raise ValueError(
+                f"Not enough bytes to read matrix "
+                f"'{hdr.name.decode('latin1')}'; is this a badly-formed file? "
+                f"Consider listing matrices with `whosmat` and loading named "
+                f"matrices with `variable_names` kwarg to `loadmat`")
+        arr = np.ndarray(shape=hdr.dims,
+                         dtype=dt,
+                         buffer=buffer,
+                         order='F')
+        if copy:
+            arr = arr.copy()
+        return arr
+
+    def read_full_array(self, hdr):
+        ''' Full (rather than sparse) matrix getter
+
+        Read matrix (array) can be real or complex
+
+        Parameters
+        ----------
+        hdr : ``VarHeader4`` instance
+
+        Returns
+        -------
+        arr : ndarray
+            complex array if ``hdr.is_complex`` is True, otherwise a real
+            numeric array
+        '''
+        if hdr.is_complex:
+            # avoid array copy to save memory
+            res = self.read_sub_array(hdr, copy=False)
+            res_j = self.read_sub_array(hdr, copy=False)
+            return res + (res_j * 1j)
+        return self.read_sub_array(hdr)
+
+    def read_char_array(self, hdr):
+        ''' latin-1 text matrix (char matrix) reader
+
+        Parameters
+        ----------
+        hdr : ``VarHeader4`` instance
+
+        Returns
+        -------
+        arr : ndarray
+            with dtype 'U1', shape given by `hdr` ``dims``
+        '''
+        arr = self.read_sub_array(hdr).astype(np.uint8)
+        S = arr.tobytes().decode('latin-1')
+        return np.ndarray(shape=hdr.dims,
+                          dtype=np.dtype('U1'),
+                          buffer=np.array(S)).copy()
+
+    def read_sparse_array(self, hdr):
+        ''' Read and return sparse matrix type
+
+        Parameters
+        ----------
+        hdr : ``VarHeader4`` instance
+
+        Returns
+        -------
+        arr : coo_array
+            with dtype ``float`` and shape read from the sparse array data
+
+        Notes
+        -----
+        MATLAB 4 real sparse arrays are saved in a N+1 by 3 array format, where
+        N is the number of non-zero values. Column 1 values [0:N] are the
+        (1-based) row indices of the each non-zero value, column 2 [0:N] are the
+        column indices, column 3 [0:N] are the (real) values. The last values
+        [-1,0:2] of the rows, column indices are shape[0] and shape[1]
+        respectively of the output matrix. The last value for the values column
+        is a padding 0. mrows and ncols values from the header give the shape of
+        the stored matrix, here [N+1, 3]. Complex data are saved as a 4 column
+        matrix, where the fourth column contains the imaginary component; the
+        last value is again 0. Complex sparse data do *not* have the header
+        ``imagf`` field set to True; the fact that the data are complex is only
+        detectable because there are 4 storage columns.
+        '''
+        res = self.read_sub_array(hdr)
+        tmp = res[:-1,:]
+        # All numbers are float64 in Matlab, but SciPy sparse expects int shape
+        dims = (int(res[-1,0]), int(res[-1,1]))
+        I = np.ascontiguousarray(tmp[:,0],dtype='intc')  # fixes byte order also
+        J = np.ascontiguousarray(tmp[:,1],dtype='intc')
+        I -= 1  # for 1-based indexing
+        J -= 1
+        if res.shape[1] == 3:
+            V = np.ascontiguousarray(tmp[:,2],dtype='float')
+        else:
+            V = np.ascontiguousarray(tmp[:,2],dtype='complex')
+            V.imag = tmp[:,3]
+        return scipy.sparse.coo_array((V,(I,J)), dims)
+
+    def shape_from_header(self, hdr):
+        '''Read the shape of the array described by the header.
+        The file position after this call is unspecified.
+        '''
+        mclass = hdr.mclass
+        if mclass == mxFULL_CLASS:
+            shape = tuple(map(int, hdr.dims))
+        elif mclass == mxCHAR_CLASS:
+            shape = tuple(map(int, hdr.dims))
+            if self.chars_as_strings:
+                shape = shape[:-1]
+        elif mclass == mxSPARSE_CLASS:
+            dt = hdr.dtype
+            dims = hdr.dims
+
+            if not (len(dims) == 2 and dims[0] >= 1 and dims[1] >= 1):
+                return ()
+
+            # Read only the row and column counts
+            self.mat_stream.seek(dt.itemsize * (dims[0] - 1), 1)
+            rows = np.ndarray(shape=(), dtype=dt,
+                              buffer=self.mat_stream.read(dt.itemsize))
+            self.mat_stream.seek(dt.itemsize * (dims[0] - 1), 1)
+            cols = np.ndarray(shape=(), dtype=dt,
+                              buffer=self.mat_stream.read(dt.itemsize))
+
+            shape = (int(rows), int(cols))
+        else:
+            raise TypeError(f'No reader for class code {mclass}')
+
+        if self.squeeze_me:
+            shape = tuple([x for x in shape if x != 1])
+        return shape
+
+
+class MatFile4Reader(MatFileReader):
+    ''' Reader for Mat4 files '''
+    @docfiller
+    def __init__(self, mat_stream, *args, **kwargs):
+        ''' Initialize matlab 4 file reader
+
+    %(matstream_arg)s
+    %(load_args)s
+        '''
+        super().__init__(mat_stream, *args, **kwargs)
+        self._matrix_reader = None
+
+    def guess_byte_order(self):
+        self.mat_stream.seek(0)
+        mopt = read_dtype(self.mat_stream, np.dtype('i4'))
+        self.mat_stream.seek(0)
+        if mopt == 0:
+            return '<'
+        if mopt < 0 or mopt > 5000:
+            # Number must have been byteswapped
+            return SYS_LITTLE_ENDIAN and '>' or '<'
+        # Not byteswapped
+        return SYS_LITTLE_ENDIAN and '<' or '>'
+
+    def initialize_read(self):
+        ''' Run when beginning read of variables
+
+        Sets up readers from parameters in `self`
+        '''
+        self.dtypes = convert_dtypes(mdtypes_template, self.byte_order)
+        self._matrix_reader = VarReader4(self)
+
+    def read_var_header(self):
+        ''' Read and return header, next position
+
+        Parameters
+        ----------
+        None
+
+        Returns
+        -------
+        header : object
+           object that can be passed to self.read_var_array, and that
+           has attributes ``name`` and ``is_global``
+        next_position : int
+           position in stream of next variable
+        '''
+        hdr = self._matrix_reader.read_header()
+        # Fast product for large (>2GB) arrays.
+        remaining_bytes = reduce(mul, hdr.dims, np.int64(hdr.dtype.itemsize))
+        if hdr.is_complex and not hdr.mclass == mxSPARSE_CLASS:
+            remaining_bytes *= 2
+        next_position = self.mat_stream.tell() + remaining_bytes
+        return hdr, next_position
+
+    def read_var_array(self, header, process=True):
+        ''' Read array, given `header`
+
+        Parameters
+        ----------
+        header : header object
+           object with fields defining variable header
+        process : {True, False}, optional
+           If True, apply recursive post-processing during loading of array.
+
+        Returns
+        -------
+        arr : array
+           array with post-processing applied or not according to
+           `process`.
+        '''
+        return self._matrix_reader.array_from_header(header, process)
+
+    def get_variables(self, variable_names=None):
+        ''' get variables from stream as dictionary
+
+        Parameters
+        ----------
+        variable_names : None or str or sequence of str, optional
+            variable name, or sequence of variable names to get from Mat file /
+            file stream. If None, then get all variables in file.
+        '''
+        if isinstance(variable_names, str):
+            variable_names = [variable_names]
+        elif variable_names is not None:
+            variable_names = list(variable_names)
+        self.mat_stream.seek(0)
+        # set up variable reader
+        self.initialize_read()
+        mdict = {}
+        while not self.end_of_stream():
+            hdr, next_position = self.read_var_header()
+            name = 'None' if hdr.name is None else hdr.name.decode('latin1')
+            if variable_names is not None and name not in variable_names:
+                self.mat_stream.seek(next_position)
+                continue
+            mdict[name] = self.read_var_array(hdr)
+            self.mat_stream.seek(next_position)
+            if variable_names is not None:
+                variable_names.remove(name)
+                if len(variable_names) == 0:
+                    break
+        return mdict
+
+    def list_variables(self):
+        ''' list variables from stream '''
+        self.mat_stream.seek(0)
+        # set up variable reader
+        self.initialize_read()
+        vars = []
+        while not self.end_of_stream():
+            hdr, next_position = self.read_var_header()
+            name = 'None' if hdr.name is None else hdr.name.decode('latin1')
+            shape = self._matrix_reader.shape_from_header(hdr)
+            info = mclass_info.get(hdr.mclass, 'unknown')
+            vars.append((name, shape, info))
+
+            self.mat_stream.seek(next_position)
+        return vars
+
+
+def arr_to_2d(arr, oned_as='row'):
+    ''' Make ``arr`` exactly two dimensional
+
+    If `arr` has more than 2 dimensions, raise a ValueError
+
+    Parameters
+    ----------
+    arr : array
+    oned_as : {'row', 'column'}, optional
+       Whether to reshape 1-D vectors as row vectors or column vectors.
+       See documentation for ``matdims`` for more detail
+
+    Returns
+    -------
+    arr2d : array
+       2-D version of the array
+    '''
+    dims = matdims(arr, oned_as)
+    if len(dims) > 2:
+        raise ValueError('Matlab 4 files cannot save arrays with more than '
+                         '2 dimensions')
+    return arr.reshape(dims)
+
+
+class VarWriter4:
+    def __init__(self, file_writer):
+        self.file_stream = file_writer.file_stream
+        self.oned_as = file_writer.oned_as
+
+    def write_bytes(self, arr):
+        self.file_stream.write(arr.tobytes(order='F'))
+
+    def write_string(self, s):
+        self.file_stream.write(s)
+
+    def write_header(self, name, shape, P=miDOUBLE, T=mxFULL_CLASS, imagf=0):
+        ''' Write header for given data options
+
+        Parameters
+        ----------
+        name : str
+            name of variable
+        shape : sequence
+            Shape of array as it will be read in matlab
+        P : int, optional
+            code for mat4 data type, one of ``miDOUBLE, miSINGLE, miINT32,
+            miINT16, miUINT16, miUINT8``
+        T : int, optional
+            code for mat4 matrix class, one of ``mxFULL_CLASS, mxCHAR_CLASS,
+            mxSPARSE_CLASS``
+        imagf : int, optional
+            flag indicating complex
+        '''
+        header = np.empty((), mdtypes_template['header'])
+        M = not SYS_LITTLE_ENDIAN
+        O = 0
+        header['mopt'] = (M * 1000 +
+                          O * 100 +
+                          P * 10 +
+                          T)
+        header['mrows'] = shape[0]
+        header['ncols'] = shape[1]
+        header['imagf'] = imagf
+        header['namlen'] = len(name) + 1
+        self.write_bytes(header)
+        data = name + '\0'
+        self.write_string(data.encode('latin1'))
+
+    def write(self, arr, name):
+        ''' Write matrix `arr`, with name `name`
+
+        Parameters
+        ----------
+        arr : array_like
+           array to write
+        name : str
+           name in matlab workspace
+        '''
+        # we need to catch sparse first, because np.asarray returns an
+        # an object array for scipy.sparse
+        if scipy.sparse.issparse(arr):
+            self.write_sparse(arr, name)
+            return
+        arr = np.asarray(arr)
+        dt = arr.dtype
+        if not dt.isnative:
+            arr = arr.astype(dt.newbyteorder('='))
+        dtt = dt.type
+        if dtt is np.object_:
+            raise TypeError('Cannot save object arrays in Mat4')
+        elif dtt is np.void:
+            raise TypeError('Cannot save void type arrays')
+        elif dtt in (np.str_, np.bytes_):
+            self.write_char(arr, name)
+            return
+        self.write_numeric(arr, name)
+
+    def write_numeric(self, arr, name):
+        arr = arr_to_2d(arr, self.oned_as)
+        imagf = arr.dtype.kind == 'c'
+        try:
+            P = np_to_mtypes[arr.dtype.str[1:]]
+        except KeyError:
+            if imagf:
+                arr = arr.astype('c128')
+            else:
+                arr = arr.astype('f8')
+            P = miDOUBLE
+        self.write_header(name,
+                          arr.shape,
+                          P=P,
+                          T=mxFULL_CLASS,
+                          imagf=imagf)
+        if imagf:
+            self.write_bytes(arr.real)
+            self.write_bytes(arr.imag)
+        else:
+            self.write_bytes(arr)
+
+    def write_char(self, arr, name):
+        if arr.dtype.type == np.str_ and arr.dtype.itemsize != np.dtype('U1').itemsize:
+            arr = arr_to_chars(arr)
+        arr = arr_to_2d(arr, self.oned_as)
+        dims = arr.shape
+        self.write_header(
+            name,
+            dims,
+            P=miUINT8,
+            T=mxCHAR_CLASS)
+        if arr.dtype.kind == 'U':
+            # Recode unicode to latin1
+            n_chars = math.prod(dims)
+            st_arr = np.ndarray(shape=(),
+                                dtype=arr_dtype_number(arr, n_chars),
+                                buffer=arr)
+            st = st_arr.item().encode('latin-1')
+            arr = np.ndarray(shape=dims, dtype='S1', buffer=st)
+        self.write_bytes(arr)
+
+    def write_sparse(self, arr, name):
+        ''' Sparse matrices are 2-D
+
+        See docstring for VarReader4.read_sparse_array
+        '''
+        A = arr.tocoo()  # convert to sparse COO format (ijv)
+        imagf = A.dtype.kind == 'c'
+        ijv = np.zeros((A.nnz + 1, 3+imagf), dtype='f8')
+        ijv[:-1,0] = A.row
+        ijv[:-1,1] = A.col
+        ijv[:-1,0:2] += 1  # 1 based indexing
+        if imagf:
+            ijv[:-1,2] = A.data.real
+            ijv[:-1,3] = A.data.imag
+        else:
+            ijv[:-1,2] = A.data
+        ijv[-1,0:2] = A.shape
+        self.write_header(
+            name,
+            ijv.shape,
+            P=miDOUBLE,
+            T=mxSPARSE_CLASS)
+        self.write_bytes(ijv)
+
+
+class MatFile4Writer:
+    ''' Class for writing matlab 4 format files '''
+    def __init__(self, file_stream, oned_as=None):
+        self.file_stream = file_stream
+        if oned_as is None:
+            oned_as = 'row'
+        self.oned_as = oned_as
+        self._matrix_writer = None
+
+    def put_variables(self, mdict, write_header=None):
+        ''' Write variables in `mdict` to stream
+
+        Parameters
+        ----------
+        mdict : mapping
+           mapping with method ``items`` return name, contents pairs
+           where ``name`` which will appeak in the matlab workspace in
+           file load, and ``contents`` is something writeable to a
+           matlab file, such as a NumPy array.
+        write_header : {None, True, False}
+           If True, then write the matlab file header before writing the
+           variables. If None (the default) then write the file header
+           if we are at position 0 in the stream. By setting False
+           here, and setting the stream position to the end of the file,
+           you can append variables to a matlab file
+        '''
+        # there is no header for a matlab 4 mat file, so we ignore the
+        # ``write_header`` input argument. It's there for compatibility
+        # with the matlab 5 version of this method
+        self._matrix_writer = VarWriter4(self)
+        for name, var in mdict.items():
+            self._matrix_writer.write(var, name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5.py
new file mode 100644
index 0000000000000000000000000000000000000000..5c4ed0361a603e10338a8d494838ebd861f56cb8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5.py
@@ -0,0 +1,895 @@
+''' Classes for read / write of matlab (TM) 5 files
+
+The matfile specification last found here:
+
+https://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf
+
+(as of December 5 2008)
+
+=================================
+ Note on functions and mat files
+=================================
+
+The document above does not give any hints as to the storage of matlab
+function handles, or anonymous function handles. I had, therefore, to
+guess the format of matlab arrays of ``mxFUNCTION_CLASS`` and
+``mxOPAQUE_CLASS`` by looking at example mat files.
+
+``mxFUNCTION_CLASS`` stores all types of matlab functions. It seems to
+contain a struct matrix with a set pattern of fields. For anonymous
+functions, a sub-fields of one of these fields seems to contain the
+well-named ``mxOPAQUE_CLASS``. This seems to contain:
+
+* array flags as for any matlab matrix
+* 3 int8 strings
+* a matrix
+
+It seems that whenever the mat file contains a ``mxOPAQUE_CLASS``
+instance, there is also an un-named matrix (name == '') at the end of
+the mat file. I'll call this the ``__function_workspace__`` matrix.
+
+When I saved two anonymous functions in a mat file, or appended another
+anonymous function to the mat file, there was still only one
+``__function_workspace__`` un-named matrix at the end, but larger than
+that for a mat file with a single anonymous function, suggesting that
+the workspaces for the two functions had been merged.
+
+The ``__function_workspace__`` matrix appears to be of double class
+(``mxCLASS_DOUBLE``), but stored as uint8, the memory for which is in
+the format of a mini .mat file, without the first 124 bytes of the file
+header (the description and the subsystem_offset), but with the version
+U2 bytes, and the S2 endian test bytes. There follow 4 zero bytes,
+presumably for 8 byte padding, and then a series of ``miMATRIX``
+entries, as in a standard mat file. The ``miMATRIX`` entries appear to
+be series of un-named (name == '') matrices, and may also contain arrays
+of this same mini-mat format.
+
+I guess that:
+
+* saving an anonymous function back to a mat file will need the
+  associated ``__function_workspace__`` matrix saved as well for the
+  anonymous function to work correctly.
+* appending to a mat file that has a ``__function_workspace__`` would
+  involve first pulling off this workspace, appending, checking whether
+  there were any more anonymous functions appended, and then somehow
+  merging the relevant workspaces, and saving at the end of the mat
+  file.
+
+The mat files I was playing with are in ``tests/data``:
+
+* sqr.mat
+* parabola.mat
+* some_functions.mat
+
+See ``tests/test_mio.py:test_mio_funcs.py`` for the debugging
+script I was working with.
+
+Small fragments of current code adapted from matfile.py by Heiko
+Henkelmann; parts of the code for simplify_cells=True adapted from
+http://blog.nephics.com/2019/08/28/better-loadmat-for-scipy/.
+'''
+
+import math
+import os
+import time
+import sys
+import zlib
+
+from io import BytesIO
+
+import warnings
+
+import numpy as np
+
+import scipy.sparse
+
+from ._byteordercodes import native_code, swapped_code
+
+from ._miobase import (MatFileReader, docfiller, matdims, read_dtype,
+                      arr_to_chars, arr_dtype_number, MatWriteError,
+                      MatReadError, MatReadWarning)
+
+# Reader object for matlab 5 format variables
+from ._mio5_utils import VarReader5
+
+# Constants and helper objects
+from ._mio5_params import (MatlabObject, MatlabFunction, MDTYPES, NP_TO_MTYPES,
+                          NP_TO_MXTYPES, miCOMPRESSED, miMATRIX, miINT8,
+                          miUTF8, miUINT32, mxCELL_CLASS, mxSTRUCT_CLASS,
+                          mxOBJECT_CLASS, mxCHAR_CLASS, mxSPARSE_CLASS,
+                          mxDOUBLE_CLASS, mclass_info, mat_struct)
+
+from ._streams import ZlibInputStream
+
+
+def _has_struct(elem):
+    """Determine if elem is an array and if first array item is a struct."""
+    return (isinstance(elem, np.ndarray) and (elem.size > 0) and (elem.ndim > 0) and
+            isinstance(elem[0], mat_struct))
+
+
+def _inspect_cell_array(ndarray):
+    """Construct lists from cell arrays (loaded as numpy ndarrays), recursing
+    into items if they contain mat_struct objects."""
+    elem_list = []
+    for sub_elem in ndarray:
+        if isinstance(sub_elem, mat_struct):
+            elem_list.append(_matstruct_to_dict(sub_elem))
+        elif _has_struct(sub_elem):
+            elem_list.append(_inspect_cell_array(sub_elem))
+        else:
+            elem_list.append(sub_elem)
+    return elem_list
+
+
+def _matstruct_to_dict(matobj):
+    """Construct nested dicts from mat_struct objects."""
+    d = {}
+    for f in matobj._fieldnames:
+        elem = matobj.__dict__[f]
+        if isinstance(elem, mat_struct):
+            d[f] = _matstruct_to_dict(elem)
+        elif _has_struct(elem):
+            d[f] = _inspect_cell_array(elem)
+        else:
+            d[f] = elem
+    return d
+
+
+def _simplify_cells(d):
+    """Convert mat objects in dict to nested dicts."""
+    for key in d:
+        if isinstance(d[key], mat_struct):
+            d[key] = _matstruct_to_dict(d[key])
+        elif _has_struct(d[key]):
+            d[key] = _inspect_cell_array(d[key])
+    return d
+
+
+class MatFile5Reader(MatFileReader):
+    ''' Reader for Mat 5 mat files
+    Adds the following attribute to base class
+
+    uint16_codec - char codec to use for uint16 char arrays
+        (defaults to system default codec)
+
+    Uses variable reader that has the following standard interface (see
+    abstract class in ``miobase``::
+
+       __init__(self, file_reader)
+       read_header(self)
+       array_from_header(self)
+
+    and added interface::
+
+       set_stream(self, stream)
+       read_full_tag(self)
+
+    '''
+    @docfiller
+    def __init__(self,
+                 mat_stream,
+                 byte_order=None,
+                 mat_dtype=False,
+                 squeeze_me=False,
+                 chars_as_strings=True,
+                 matlab_compatible=False,
+                 struct_as_record=True,
+                 verify_compressed_data_integrity=True,
+                 uint16_codec=None,
+                 simplify_cells=False):
+        '''Initializer for matlab 5 file format reader
+
+    %(matstream_arg)s
+    %(load_args)s
+    %(struct_arg)s
+    uint16_codec : {None, string}
+        Set codec to use for uint16 char arrays (e.g., 'utf-8').
+        Use system default codec if None
+        '''
+        super().__init__(
+            mat_stream,
+            byte_order,
+            mat_dtype,
+            squeeze_me,
+            chars_as_strings,
+            matlab_compatible,
+            struct_as_record,
+            verify_compressed_data_integrity,
+            simplify_cells)
+        # Set uint16 codec
+        if not uint16_codec:
+            uint16_codec = sys.getdefaultencoding()
+        self.uint16_codec = uint16_codec
+        # placeholders for readers - see initialize_read method
+        self._file_reader = None
+        self._matrix_reader = None
+
+    def guess_byte_order(self):
+        ''' Guess byte order.
+        Sets stream pointer to 0'''
+        self.mat_stream.seek(126)
+        mi = self.mat_stream.read(2)
+        self.mat_stream.seek(0)
+        return mi == b'IM' and '<' or '>'
+
+    def read_file_header(self):
+        ''' Read in mat 5 file header '''
+        hdict = {}
+        hdr_dtype = MDTYPES[self.byte_order]['dtypes']['file_header']
+        hdr = read_dtype(self.mat_stream, hdr_dtype)
+        hdict['__header__'] = hdr['description'].item().strip(b' \t\n\000')
+        v_major = hdr['version'] >> 8
+        v_minor = hdr['version'] & 0xFF
+        hdict['__version__'] = '%d.%d' % (v_major, v_minor)
+        return hdict
+
+    def initialize_read(self):
+        ''' Run when beginning read of variables
+
+        Sets up readers from parameters in `self`
+        '''
+        # reader for top level stream. We need this extra top-level
+        # reader because we use the matrix_reader object to contain
+        # compressed matrices (so they have their own stream)
+        self._file_reader = VarReader5(self)
+        # reader for matrix streams
+        self._matrix_reader = VarReader5(self)
+
+    def read_var_header(self):
+        ''' Read header, return header, next position
+
+        Header has to define at least .name and .is_global
+
+        Parameters
+        ----------
+        None
+
+        Returns
+        -------
+        header : object
+           object that can be passed to self.read_var_array, and that
+           has attributes .name and .is_global
+        next_position : int
+           position in stream of next variable
+        '''
+        mdtype, byte_count = self._file_reader.read_full_tag()
+        if not byte_count > 0:
+            raise ValueError("Did not read any bytes")
+        next_pos = self.mat_stream.tell() + byte_count
+        if mdtype == miCOMPRESSED:
+            # Make new stream from compressed data
+            stream = ZlibInputStream(self.mat_stream, byte_count)
+            self._matrix_reader.set_stream(stream)
+            check_stream_limit = self.verify_compressed_data_integrity
+            mdtype, byte_count = self._matrix_reader.read_full_tag()
+        else:
+            check_stream_limit = False
+            self._matrix_reader.set_stream(self.mat_stream)
+        if not mdtype == miMATRIX:
+            raise TypeError('Expecting miMATRIX type here, got %d' % mdtype)
+        header = self._matrix_reader.read_header(check_stream_limit)
+        return header, next_pos
+
+    def read_var_array(self, header, process=True):
+        ''' Read array, given `header`
+
+        Parameters
+        ----------
+        header : header object
+           object with fields defining variable header
+        process : {True, False} bool, optional
+           If True, apply recursive post-processing during loading of
+           array.
+
+        Returns
+        -------
+        arr : array
+           array with post-processing applied or not according to
+           `process`.
+        '''
+        return self._matrix_reader.array_from_header(header, process)
+
+    def get_variables(self, variable_names=None):
+        ''' get variables from stream as dictionary
+
+        variable_names   - optional list of variable names to get
+
+        If variable_names is None, then get all variables in file
+        '''
+        if isinstance(variable_names, str):
+            variable_names = [variable_names]
+        elif variable_names is not None:
+            variable_names = list(variable_names)
+
+        self.mat_stream.seek(0)
+        # Here we pass all the parameters in self to the reading objects
+        self.initialize_read()
+        mdict = self.read_file_header()
+        mdict['__globals__'] = []
+        while not self.end_of_stream():
+            hdr, next_position = self.read_var_header()
+            name = 'None' if hdr.name is None else hdr.name.decode('latin1')
+            if name in mdict:
+                msg = (
+                    f'Duplicate variable name "{name}" in stream'
+                    " - replacing previous with new\nConsider"
+                    "scipy.io.matlab.varmats_from_mat to split "
+                    "file into single variable files"
+                )
+                warnings.warn(msg, MatReadWarning, stacklevel=2)
+            if name == '':
+                # can only be a matlab 7 function workspace
+                name = '__function_workspace__'
+                # We want to keep this raw because mat_dtype processing
+                # will break the format (uint8 as mxDOUBLE_CLASS)
+                process = False
+            else:
+                process = True
+            if variable_names is not None and name not in variable_names:
+                self.mat_stream.seek(next_position)
+                continue
+            try:
+                res = self.read_var_array(hdr, process)
+            except MatReadError as err:
+                warnings.warn(
+                    f'Unreadable variable "{name}", because "{err}"',
+                    Warning, stacklevel=2)
+                res = f"Read error: {err}"
+            self.mat_stream.seek(next_position)
+            mdict[name] = res
+            if hdr.is_global:
+                mdict['__globals__'].append(name)
+            if variable_names is not None:
+                variable_names.remove(name)
+                if len(variable_names) == 0:
+                    break
+        if self.simplify_cells:
+            return _simplify_cells(mdict)
+        else:
+            return mdict
+
+    def list_variables(self):
+        ''' list variables from stream '''
+        self.mat_stream.seek(0)
+        # Here we pass all the parameters in self to the reading objects
+        self.initialize_read()
+        self.read_file_header()
+        vars = []
+        while not self.end_of_stream():
+            hdr, next_position = self.read_var_header()
+            name = 'None' if hdr.name is None else hdr.name.decode('latin1')
+            if name == '':
+                # can only be a matlab 7 function workspace
+                name = '__function_workspace__'
+
+            shape = self._matrix_reader.shape_from_header(hdr)
+            if hdr.is_logical:
+                info = 'logical'
+            else:
+                info = mclass_info.get(hdr.mclass, 'unknown')
+            vars.append((name, shape, info))
+
+            self.mat_stream.seek(next_position)
+        return vars
+
+
+def varmats_from_mat(file_obj):
+    """ Pull variables out of mat 5 file as a sequence of mat file objects
+
+    This can be useful with a difficult mat file, containing unreadable
+    variables. This routine pulls the variables out in raw form and puts them,
+    unread, back into a file stream for saving or reading. Another use is the
+    pathological case where there is more than one variable of the same name in
+    the file; this routine returns the duplicates, whereas the standard reader
+    will overwrite duplicates in the returned dictionary.
+
+    The file pointer in `file_obj` will be undefined. File pointers for the
+    returned file-like objects are set at 0.
+
+    Parameters
+    ----------
+    file_obj : file-like
+        file object containing mat file
+
+    Returns
+    -------
+    named_mats : list
+        list contains tuples of (name, BytesIO) where BytesIO is a file-like
+        object containing mat file contents as for a single variable. The
+        BytesIO contains a string with the original header and a single var. If
+        ``var_file_obj`` is an individual BytesIO instance, then save as a mat
+        file with something like ``open('test.mat',
+        'wb').write(var_file_obj.read())``
+
+    Examples
+    --------
+    >>> import scipy.io
+    >>> import numpy as np
+    >>> from io import BytesIO
+    >>> from scipy.io.matlab._mio5 import varmats_from_mat
+    >>> mat_fileobj = BytesIO()
+    >>> scipy.io.savemat(mat_fileobj, {'b': np.arange(10), 'a': 'a string'})
+    >>> varmats = varmats_from_mat(mat_fileobj)
+    >>> sorted([name for name, str_obj in varmats])
+    ['a', 'b']
+    """
+    rdr = MatFile5Reader(file_obj)
+    file_obj.seek(0)
+    # Raw read of top-level file header
+    hdr_len = MDTYPES[native_code]['dtypes']['file_header'].itemsize
+    raw_hdr = file_obj.read(hdr_len)
+    # Initialize variable reading
+    file_obj.seek(0)
+    rdr.initialize_read()
+    rdr.read_file_header()
+    next_position = file_obj.tell()
+    named_mats = []
+    while not rdr.end_of_stream():
+        start_position = next_position
+        hdr, next_position = rdr.read_var_header()
+        name = 'None' if hdr.name is None else hdr.name.decode('latin1')
+        # Read raw variable string
+        file_obj.seek(start_position)
+        byte_count = next_position - start_position
+        var_str = file_obj.read(byte_count)
+        # write to stringio object
+        out_obj = BytesIO()
+        out_obj.write(raw_hdr)
+        out_obj.write(var_str)
+        out_obj.seek(0)
+        named_mats.append((name, out_obj))
+    return named_mats
+
+
+class EmptyStructMarker:
+    """ Class to indicate presence of empty matlab struct on output """
+
+
+def to_writeable(source):
+    ''' Convert input object ``source`` to something we can write
+
+    Parameters
+    ----------
+    source : object
+
+    Returns
+    -------
+    arr : None or ndarray or EmptyStructMarker
+        If `source` cannot be converted to something we can write to a matfile,
+        return None.  If `source` is equivalent to an empty dictionary, return
+        ``EmptyStructMarker``.  Otherwise return `source` converted to an
+        ndarray with contents for writing to matfile.
+    '''
+    if isinstance(source, np.ndarray):
+        return source
+    if source is None:
+        return None
+    if hasattr(source, "__array__"):
+        return np.asarray(source)
+    # Objects that implement mappings
+    is_mapping = (hasattr(source, 'keys') and hasattr(source, 'values') and
+                  hasattr(source, 'items'))
+    # Objects that don't implement mappings, but do have dicts
+    if isinstance(source, np.generic):
+        # NumPy scalars are never mappings (PyPy issue workaround)
+        pass
+    elif not is_mapping and hasattr(source, '__dict__'):
+        source = {key: value for key, value in source.__dict__.items()
+                      if not key.startswith('_')}
+        is_mapping = True
+    if is_mapping:
+        dtype = []
+        values = []
+        for field, value in source.items():
+            if (isinstance(field, str) and
+                    field[0] not in '_0123456789'):
+                dtype.append((str(field), object))
+                values.append(value)
+        if dtype:
+            return np.array([tuple(values)], dtype)
+        else:
+            return EmptyStructMarker
+    # Next try and convert to an array
+    try:
+        narr = np.asanyarray(source)
+    except ValueError:
+        narr = np.asanyarray(source, dtype=object)
+    if narr.dtype.type in (object, np.object_) and \
+       narr.shape == () and narr == source:
+        # No interesting conversion possible
+        return None
+    return narr
+
+
+# Native byte ordered dtypes for convenience for writers
+NDT_FILE_HDR = MDTYPES[native_code]['dtypes']['file_header']
+NDT_TAG_FULL = MDTYPES[native_code]['dtypes']['tag_full']
+NDT_TAG_SMALL = MDTYPES[native_code]['dtypes']['tag_smalldata']
+NDT_ARRAY_FLAGS = MDTYPES[native_code]['dtypes']['array_flags']
+
+
+class VarWriter5:
+    ''' Generic matlab matrix writing class '''
+    mat_tag = np.zeros((), NDT_TAG_FULL)
+    mat_tag['mdtype'] = miMATRIX  # type: ignore[call-overload]
+
+    def __init__(self, file_writer):
+        self.file_stream = file_writer.file_stream
+        self.unicode_strings = file_writer.unicode_strings
+        self.long_field_names = file_writer.long_field_names
+        self.oned_as = file_writer.oned_as
+        # These are used for top level writes, and unset after
+        self._var_name = None
+        self._var_is_global = False
+
+    def write_bytes(self, arr):
+        self.file_stream.write(arr.tobytes(order='F'))
+
+    def write_string(self, s):
+        self.file_stream.write(s)
+
+    def write_element(self, arr, mdtype=None):
+        ''' write tag and data '''
+        if mdtype is None:
+            mdtype = NP_TO_MTYPES[arr.dtype.str[1:]]
+        # Array needs to be in native byte order
+        if arr.dtype.byteorder == swapped_code:
+            arr = arr.byteswap().view(arr.dtype.newbyteorder())
+        byte_count = arr.size*arr.itemsize
+        if byte_count <= 4:
+            self.write_smalldata_element(arr, mdtype, byte_count)
+        else:
+            self.write_regular_element(arr, mdtype, byte_count)
+
+    def write_smalldata_element(self, arr, mdtype, byte_count):
+        # write tag with embedded data
+        tag = np.zeros((), NDT_TAG_SMALL)
+        tag['byte_count_mdtype'] = (byte_count << 16) + mdtype
+        # if arr.tobytes is < 4, the element will be zero-padded as needed.
+        tag['data'] = arr.tobytes(order='F')
+        self.write_bytes(tag)
+
+    def write_regular_element(self, arr, mdtype, byte_count):
+        # write tag, data
+        tag = np.zeros((), NDT_TAG_FULL)
+        tag['mdtype'] = mdtype
+        tag['byte_count'] = byte_count
+        self.write_bytes(tag)
+        self.write_bytes(arr)
+        # pad to next 64-bit boundary
+        bc_mod_8 = byte_count % 8
+        if bc_mod_8:
+            self.file_stream.write(b'\x00' * (8-bc_mod_8))
+
+    def write_header(self,
+                     shape,
+                     mclass,
+                     is_complex=False,
+                     is_logical=False,
+                     nzmax=0):
+        ''' Write header for given data options
+        shape : sequence
+           array shape
+        mclass      - mat5 matrix class
+        is_complex  - True if matrix is complex
+        is_logical  - True if matrix is logical
+        nzmax        - max non zero elements for sparse arrays
+
+        We get the name and the global flag from the object, and reset
+        them to defaults after we've used them
+        '''
+        # get name and is_global from one-shot object store
+        name = self._var_name
+        is_global = self._var_is_global
+        # initialize the top-level matrix tag, store position
+        self._mat_tag_pos = self.file_stream.tell()
+        self.write_bytes(self.mat_tag)
+        # write array flags (complex, global, logical, class, nzmax)
+        af = np.zeros((), NDT_ARRAY_FLAGS)
+        af['data_type'] = miUINT32
+        af['byte_count'] = 8
+        flags = is_complex << 3 | is_global << 2 | is_logical << 1
+        af['flags_class'] = mclass | flags << 8
+        af['nzmax'] = nzmax
+        self.write_bytes(af)
+        # shape
+        self.write_element(np.array(shape, dtype='i4'))
+        # write name
+        name = np.asarray(name)
+        if name == '':  # empty string zero-terminated
+            self.write_smalldata_element(name, miINT8, 0)
+        else:
+            self.write_element(name, miINT8)
+        # reset the one-shot store to defaults
+        self._var_name = ''
+        self._var_is_global = False
+
+    def update_matrix_tag(self, start_pos):
+        curr_pos = self.file_stream.tell()
+        self.file_stream.seek(start_pos)
+        byte_count = curr_pos - start_pos - 8
+        if byte_count >= 2**32:
+            raise MatWriteError("Matrix too large to save with Matlab "
+                                "5 format")
+        self.mat_tag['byte_count'] = byte_count
+        self.write_bytes(self.mat_tag)
+        self.file_stream.seek(curr_pos)
+
+    def write_top(self, arr, name, is_global):
+        """ Write variable at top level of mat file
+
+        Parameters
+        ----------
+        arr : array_like
+            array-like object to create writer for
+        name : str, optional
+            name as it will appear in matlab workspace
+            default is empty string
+        is_global : {False, True}, optional
+            whether variable will be global on load into matlab
+        """
+        # these are set before the top-level header write, and unset at
+        # the end of the same write, because they do not apply for lower levels
+        self._var_is_global = is_global
+        self._var_name = name
+        # write the header and data
+        self.write(arr)
+
+    def write(self, arr):
+        ''' Write `arr` to stream at top and sub levels
+
+        Parameters
+        ----------
+        arr : array_like
+            array-like object to create writer for
+        '''
+        # store position, so we can update the matrix tag
+        mat_tag_pos = self.file_stream.tell()
+        # First check if these are sparse
+        if scipy.sparse.issparse(arr):
+            self.write_sparse(arr)
+            self.update_matrix_tag(mat_tag_pos)
+            return
+        # Try to convert things that aren't arrays
+        narr = to_writeable(arr)
+        if narr is None:
+            raise TypeError(f'Could not convert {arr} (type {type(arr)}) to array')
+        if isinstance(narr, MatlabObject):
+            self.write_object(narr)
+        elif isinstance(narr, MatlabFunction):
+            raise MatWriteError('Cannot write matlab functions')
+        elif narr is EmptyStructMarker:  # empty struct array
+            self.write_empty_struct()
+        elif narr.dtype.fields:  # struct array
+            self.write_struct(narr)
+        elif narr.dtype.hasobject:  # cell array
+            self.write_cells(narr)
+        elif narr.dtype.kind in ('U', 'S'):
+            if self.unicode_strings:
+                codec = 'UTF8'
+            else:
+                codec = 'ascii'
+            self.write_char(narr, codec)
+        else:
+            self.write_numeric(narr)
+        self.update_matrix_tag(mat_tag_pos)
+
+    def write_numeric(self, arr):
+        imagf = arr.dtype.kind == 'c'
+        logif = arr.dtype.kind == 'b'
+        try:
+            mclass = NP_TO_MXTYPES[arr.dtype.str[1:]]
+        except KeyError:
+            # No matching matlab type, probably complex256 / float128 / float96
+            # Cast data to complex128 / float64.
+            if imagf:
+                arr = arr.astype('c128')
+            elif logif:
+                arr = arr.astype('i1')  # Should only contain 0/1
+            else:
+                arr = arr.astype('f8')
+            mclass = mxDOUBLE_CLASS
+        self.write_header(matdims(arr, self.oned_as),
+                          mclass,
+                          is_complex=imagf,
+                          is_logical=logif)
+        if imagf:
+            self.write_element(arr.real)
+            self.write_element(arr.imag)
+        else:
+            self.write_element(arr)
+
+    def write_char(self, arr, codec='ascii'):
+        ''' Write string array `arr` with given `codec`
+        '''
+        if arr.size == 0 or np.all(arr == ''):
+            # This an empty string array or a string array containing
+            # only empty strings. Matlab cannot distinguish between a
+            # string array that is empty, and a string array containing
+            # only empty strings, because it stores strings as arrays of
+            # char. There is no way of having an array of char that is
+            # not empty, but contains an empty string. We have to
+            # special-case the array-with-empty-strings because even
+            # empty strings have zero padding, which would otherwise
+            # appear in matlab as a string with a space.
+            shape = (0,) * np.max([arr.ndim, 2])
+            self.write_header(shape, mxCHAR_CLASS)
+            self.write_smalldata_element(arr, miUTF8, 0)
+            return
+        # non-empty string.
+        #
+        # Convert to char array
+        arr = arr_to_chars(arr)
+        # We have to write the shape directly, because we are going
+        # recode the characters, and the resulting stream of chars
+        # may have a different length
+        shape = arr.shape
+        self.write_header(shape, mxCHAR_CLASS)
+        if arr.dtype.kind == 'U' and arr.size:
+            # Make one long string from all the characters. We need to
+            # transpose here, because we're flattening the array, before
+            # we write the bytes. The bytes have to be written in
+            # Fortran order.
+            n_chars = math.prod(shape)
+            st_arr = np.ndarray(shape=(),
+                                dtype=arr_dtype_number(arr, n_chars),
+                                buffer=arr.T.copy())  # Fortran order
+            # Recode with codec to give byte string
+            st = st_arr.item().encode(codec)
+            # Reconstruct as 1-D byte array
+            arr = np.ndarray(shape=(len(st),),
+                             dtype='S1',
+                             buffer=st)
+        self.write_element(arr, mdtype=miUTF8)
+
+    def write_sparse(self, arr):
+        ''' Sparse matrices are 2D
+        '''
+        A = arr.tocsc()  # convert to sparse CSC format
+        A.sort_indices()     # MATLAB expects sorted row indices
+        is_complex = (A.dtype.kind == 'c')
+        is_logical = (A.dtype.kind == 'b')
+        nz = A.nnz
+        self.write_header(matdims(arr, self.oned_as),
+                          mxSPARSE_CLASS,
+                          is_complex=is_complex,
+                          is_logical=is_logical,
+                          # matlab won't load file with 0 nzmax
+                          nzmax=1 if nz == 0 else nz)
+        self.write_element(A.indices.astype('i4'))
+        self.write_element(A.indptr.astype('i4'))
+        self.write_element(A.data.real)
+        if is_complex:
+            self.write_element(A.data.imag)
+
+    def write_cells(self, arr):
+        self.write_header(matdims(arr, self.oned_as),
+                          mxCELL_CLASS)
+        # loop over data, column major
+        A = np.atleast_2d(arr).flatten('F')
+        for el in A:
+            self.write(el)
+
+    def write_empty_struct(self):
+        self.write_header((1, 1), mxSTRUCT_CLASS)
+        # max field name length set to 1 in an example matlab struct
+        self.write_element(np.array(1, dtype=np.int32))
+        # Field names element is empty
+        self.write_element(np.array([], dtype=np.int8))
+
+    def write_struct(self, arr):
+        self.write_header(matdims(arr, self.oned_as),
+                          mxSTRUCT_CLASS)
+        self._write_items(arr)
+
+    def _write_items(self, arr):
+        # write fieldnames
+        fieldnames = [f[0] for f in arr.dtype.descr]
+        length = max([len(fieldname) for fieldname in fieldnames])+1
+        max_length = (self.long_field_names and 64) or 32
+        if length > max_length:
+            raise ValueError("Field names are restricted to %d characters" %
+                             (max_length-1))
+        self.write_element(np.array([length], dtype='i4'))
+        self.write_element(
+            np.array(fieldnames, dtype='S%d' % (length)),
+            mdtype=miINT8)
+        A = np.atleast_2d(arr).flatten('F')
+        for el in A:
+            for f in fieldnames:
+                self.write(el[f])
+
+    def write_object(self, arr):
+        '''Same as writing structs, except different mx class, and extra
+        classname element after header
+        '''
+        self.write_header(matdims(arr, self.oned_as),
+                          mxOBJECT_CLASS)
+        self.write_element(np.array(arr.classname, dtype='S'),
+                           mdtype=miINT8)
+        self._write_items(arr)
+
+
+class MatFile5Writer:
+    ''' Class for writing mat5 files '''
+
+    @docfiller
+    def __init__(self, file_stream,
+                 do_compression=False,
+                 unicode_strings=False,
+                 global_vars=None,
+                 long_field_names=False,
+                 oned_as='row'):
+        ''' Initialize writer for matlab 5 format files
+
+        Parameters
+        ----------
+        %(do_compression)s
+        %(unicode_strings)s
+        global_vars : None or sequence of strings, optional
+            Names of variables to be marked as global for matlab
+        %(long_fields)s
+        %(oned_as)s
+        '''
+        self.file_stream = file_stream
+        self.do_compression = do_compression
+        self.unicode_strings = unicode_strings
+        if global_vars:
+            self.global_vars = global_vars
+        else:
+            self.global_vars = []
+        self.long_field_names = long_field_names
+        self.oned_as = oned_as
+        self._matrix_writer = None
+
+    def write_file_header(self):
+        # write header
+        hdr = np.zeros((), NDT_FILE_HDR)
+        hdr['description'] = (f'MATLAB 5.0 MAT-file Platform: {os.name}, '
+                              f'Created on: {time.asctime()}')
+        hdr['version'] = 0x0100
+        hdr['endian_test'] = np.ndarray(shape=(),
+                                      dtype='S2',
+                                      buffer=np.uint16(0x4d49))
+        self.file_stream.write(hdr.tobytes())
+
+    def put_variables(self, mdict, write_header=None):
+        ''' Write variables in `mdict` to stream
+
+        Parameters
+        ----------
+        mdict : mapping
+           mapping with method ``items`` returns name, contents pairs where
+           ``name`` which will appear in the matlab workspace in file load, and
+           ``contents`` is something writeable to a matlab file, such as a NumPy
+           array.
+        write_header : {None, True, False}, optional
+           If True, then write the matlab file header before writing the
+           variables. If None (the default) then write the file header
+           if we are at position 0 in the stream. By setting False
+           here, and setting the stream position to the end of the file,
+           you can append variables to a matlab file
+        '''
+        # write header if requested, or None and start of file
+        if write_header is None:
+            write_header = self.file_stream.tell() == 0
+        if write_header:
+            self.write_file_header()
+        self._matrix_writer = VarWriter5(self)
+        for name, var in mdict.items():
+            if name[0] == '_':
+                continue
+            is_global = name in self.global_vars
+            if self.do_compression:
+                stream = BytesIO()
+                self._matrix_writer.file_stream = stream
+                self._matrix_writer.write_top(var, name.encode('latin1'), is_global)
+                out_str = zlib.compress(stream.getvalue())
+                tag = np.empty((), NDT_TAG_FULL)
+                tag['mdtype'] = miCOMPRESSED
+                tag['byte_count'] = len(out_str)
+                self.file_stream.write(tag.tobytes())
+                self.file_stream.write(out_str)
+            else:  # not compressing
+                self._matrix_writer.write_top(var, name.encode('latin1'), is_global)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5_params.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5_params.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d60b8e7a4a2dd1e6a336139f67ce984743e27bb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio5_params.py
@@ -0,0 +1,281 @@
+''' Constants and classes for matlab 5 read and write
+
+See also mio5_utils.pyx where these same constants arise as c enums.
+
+If you make changes in this file, don't forget to change mio5_utils.pyx
+'''
+import numpy as np
+
+from ._miobase import convert_dtypes
+
+
+__all__ = [
+    'MDTYPES', 'MatlabFunction', 'MatlabObject', 'MatlabOpaque',
+    'NP_TO_MTYPES', 'NP_TO_MXTYPES', 'OPAQUE_DTYPE', 'codecs_template',
+    'mat_struct', 'mclass_dtypes_template', 'mclass_info', 'mdtypes_template',
+    'miCOMPRESSED', 'miDOUBLE', 'miINT16', 'miINT32', 'miINT64', 'miINT8',
+    'miMATRIX', 'miSINGLE', 'miUINT16', 'miUINT32', 'miUINT64', 'miUINT8',
+    'miUTF16', 'miUTF32', 'miUTF8', 'mxCELL_CLASS', 'mxCHAR_CLASS',
+    'mxDOUBLE_CLASS', 'mxFUNCTION_CLASS', 'mxINT16_CLASS', 'mxINT32_CLASS',
+    'mxINT64_CLASS', 'mxINT8_CLASS', 'mxOBJECT_CLASS',
+    'mxOBJECT_CLASS_FROM_MATRIX_H', 'mxOPAQUE_CLASS', 'mxSINGLE_CLASS',
+    'mxSPARSE_CLASS', 'mxSTRUCT_CLASS', 'mxUINT16_CLASS', 'mxUINT32_CLASS',
+    'mxUINT64_CLASS', 'mxUINT8_CLASS'
+]
+miINT8 = 1
+miUINT8 = 2
+miINT16 = 3
+miUINT16 = 4
+miINT32 = 5
+miUINT32 = 6
+miSINGLE = 7
+miDOUBLE = 9
+miINT64 = 12
+miUINT64 = 13
+miMATRIX = 14
+miCOMPRESSED = 15
+miUTF8 = 16
+miUTF16 = 17
+miUTF32 = 18
+
+mxCELL_CLASS = 1
+mxSTRUCT_CLASS = 2
+# The March 2008 edition of "Matlab 7 MAT-File Format" says that
+# mxOBJECT_CLASS = 3, whereas matrix.h says that mxLOGICAL = 3.
+# Matlab 2008a appears to save logicals as type 9, so we assume that
+# the document is correct. See type 18, below.
+mxOBJECT_CLASS = 3
+mxCHAR_CLASS = 4
+mxSPARSE_CLASS = 5
+mxDOUBLE_CLASS = 6
+mxSINGLE_CLASS = 7
+mxINT8_CLASS = 8
+mxUINT8_CLASS = 9
+mxINT16_CLASS = 10
+mxUINT16_CLASS = 11
+mxINT32_CLASS = 12
+mxUINT32_CLASS = 13
+# The following are not in the March 2008 edition of "Matlab 7
+# MAT-File Format," but were guessed from matrix.h.
+mxINT64_CLASS = 14
+mxUINT64_CLASS = 15
+mxFUNCTION_CLASS = 16
+# Not doing anything with these at the moment.
+mxOPAQUE_CLASS = 17  # This appears to be a function workspace
+# Thread 'saving/loading symbol table of annymous functions',
+# octave-maintainers, April-May 2007
+# https://lists.gnu.org/archive/html/octave-maintainers/2007-04/msg00031.html
+# https://lists.gnu.org/archive/html/octave-maintainers/2007-05/msg00032.html
+# (Was/Deprecated: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2007-May/002824.html)
+mxOBJECT_CLASS_FROM_MATRIX_H = 18
+
+mdtypes_template = {
+    miINT8: 'i1',
+    miUINT8: 'u1',
+    miINT16: 'i2',
+    miUINT16: 'u2',
+    miINT32: 'i4',
+    miUINT32: 'u4',
+    miSINGLE: 'f4',
+    miDOUBLE: 'f8',
+    miINT64: 'i8',
+    miUINT64: 'u8',
+    miUTF8: 'u1',
+    miUTF16: 'u2',
+    miUTF32: 'u4',
+    'file_header': [('description', 'S116'),
+                    ('subsystem_offset', 'i8'),
+                    ('version', 'u2'),
+                    ('endian_test', 'S2')],
+    'tag_full': [('mdtype', 'u4'), ('byte_count', 'u4')],
+    'tag_smalldata':[('byte_count_mdtype', 'u4'), ('data', 'S4')],
+    'array_flags': [('data_type', 'u4'),
+                    ('byte_count', 'u4'),
+                    ('flags_class','u4'),
+                    ('nzmax', 'u4')],
+    'U1': 'U1',
+    }
+
+mclass_dtypes_template = {
+    mxINT8_CLASS: 'i1',
+    mxUINT8_CLASS: 'u1',
+    mxINT16_CLASS: 'i2',
+    mxUINT16_CLASS: 'u2',
+    mxINT32_CLASS: 'i4',
+    mxUINT32_CLASS: 'u4',
+    mxINT64_CLASS: 'i8',
+    mxUINT64_CLASS: 'u8',
+    mxSINGLE_CLASS: 'f4',
+    mxDOUBLE_CLASS: 'f8',
+    }
+
+mclass_info = {
+    mxINT8_CLASS: 'int8',
+    mxUINT8_CLASS: 'uint8',
+    mxINT16_CLASS: 'int16',
+    mxUINT16_CLASS: 'uint16',
+    mxINT32_CLASS: 'int32',
+    mxUINT32_CLASS: 'uint32',
+    mxINT64_CLASS: 'int64',
+    mxUINT64_CLASS: 'uint64',
+    mxSINGLE_CLASS: 'single',
+    mxDOUBLE_CLASS: 'double',
+    mxCELL_CLASS: 'cell',
+    mxSTRUCT_CLASS: 'struct',
+    mxOBJECT_CLASS: 'object',
+    mxCHAR_CLASS: 'char',
+    mxSPARSE_CLASS: 'sparse',
+    mxFUNCTION_CLASS: 'function',
+    mxOPAQUE_CLASS: 'opaque',
+    }
+
+NP_TO_MTYPES = {
+    'f8': miDOUBLE,
+    'c32': miDOUBLE,
+    'c24': miDOUBLE,
+    'c16': miDOUBLE,
+    'f4': miSINGLE,
+    'c8': miSINGLE,
+    'i8': miINT64,
+    'i4': miINT32,
+    'i2': miINT16,
+    'i1': miINT8,
+    'u8': miUINT64,
+    'u4': miUINT32,
+    'u2': miUINT16,
+    'u1': miUINT8,
+    'S1': miUINT8,
+    'U1': miUTF16,
+    'b1': miUINT8,  # not standard but seems MATLAB uses this (gh-4022)
+    }
+
+
+NP_TO_MXTYPES = {
+    'f8': mxDOUBLE_CLASS,
+    'c32': mxDOUBLE_CLASS,
+    'c24': mxDOUBLE_CLASS,
+    'c16': mxDOUBLE_CLASS,
+    'f4': mxSINGLE_CLASS,
+    'c8': mxSINGLE_CLASS,
+    'i8': mxINT64_CLASS,
+    'i4': mxINT32_CLASS,
+    'i2': mxINT16_CLASS,
+    'i1': mxINT8_CLASS,
+    'u8': mxUINT64_CLASS,
+    'u4': mxUINT32_CLASS,
+    'u2': mxUINT16_CLASS,
+    'u1': mxUINT8_CLASS,
+    'S1': mxUINT8_CLASS,
+    'b1': mxUINT8_CLASS,  # not standard but seems MATLAB uses this
+    }
+
+''' Before release v7.1 (release 14) matlab (TM) used the system
+default character encoding scheme padded out to 16-bits. Release 14
+and later use Unicode. When saving character data, R14 checks if it
+can be encoded in 7-bit ascii, and saves in that format if so.'''
+
+codecs_template = {
+    miUTF8: {'codec': 'utf_8', 'width': 1},
+    miUTF16: {'codec': 'utf_16', 'width': 2},
+    miUTF32: {'codec': 'utf_32','width': 4},
+    }
+
+
+def _convert_codecs(template, byte_order):
+    ''' Convert codec template mapping to byte order
+
+    Set codecs not on this system to None
+
+    Parameters
+    ----------
+    template : mapping
+       key, value are respectively codec name, and root name for codec
+       (without byte order suffix)
+    byte_order : {'<', '>'}
+       code for little or big endian
+
+    Returns
+    -------
+    codecs : dict
+       key, value are name, codec (as in .encode(codec))
+    '''
+    codecs = {}
+    postfix = byte_order == '<' and '_le' or '_be'
+    for k, v in template.items():
+        codec = v['codec']
+        try:
+            " ".encode(codec)
+        except LookupError:
+            codecs[k] = None
+            continue
+        if v['width'] > 1:
+            codec += postfix
+        codecs[k] = codec
+    return codecs.copy()
+
+
+MDTYPES = {}
+for _bytecode in '<>':
+    _def = {'dtypes': convert_dtypes(mdtypes_template, _bytecode),
+            'classes': convert_dtypes(mclass_dtypes_template, _bytecode),
+            'codecs': _convert_codecs(codecs_template, _bytecode)}
+    MDTYPES[_bytecode] = _def
+
+
+class mat_struct:
+    """Placeholder for holding read data from structs.
+
+    We use instances of this class when the user passes False as a value to the
+    ``struct_as_record`` parameter of the :func:`scipy.io.loadmat` function.
+    """
+    pass
+
+
+class MatlabObject(np.ndarray):
+    """Subclass of ndarray to signal this is a matlab object.
+
+    This is a simple subclass of :class:`numpy.ndarray` meant to be used
+    by :func:`scipy.io.loadmat` and should not be instantiated directly.
+    """
+
+    def __new__(cls, input_array, classname=None):
+        # Input array is an already formed ndarray instance
+        # We first cast to be our class type
+        obj = np.asarray(input_array).view(cls)
+        # add the new attribute to the created instance
+        obj.classname = classname
+        # Finally, we must return the newly created object:
+        return obj
+
+    def __array_finalize__(self,obj):
+        # reset the attribute from passed original object
+        self.classname = getattr(obj, 'classname', None)
+        # We do not need to return anything
+
+
+class MatlabFunction(np.ndarray):
+    """Subclass for a MATLAB function.
+
+    This is a simple subclass of :class:`numpy.ndarray` meant to be used
+    by :func:`scipy.io.loadmat` and should not be directly instantiated.
+    """
+
+    def __new__(cls, input_array):
+        obj = np.asarray(input_array).view(cls)
+        return obj
+
+
+class MatlabOpaque(np.ndarray):
+    """Subclass for a MATLAB opaque matrix.
+
+    This is a simple subclass of :class:`numpy.ndarray` meant to be used
+    by :func:`scipy.io.loadmat` and should not be directly instantiated.
+    """
+
+    def __new__(cls, input_array):
+        obj = np.asarray(input_array).view(cls)
+        return obj
+
+
+OPAQUE_DTYPE = np.dtype(
+    [('s0', 'O'), ('s1', 'O'), ('s2', 'O'), ('arr', 'O')])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio_utils.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio_utils.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..fc8a904d06026119fb14be7ced171f184d44e58b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_mio_utils.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_miobase.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_miobase.py
new file mode 100644
index 0000000000000000000000000000000000000000..1ad7fd7395bb67cc2926b03ed7a6002dc4f9e3f6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/_miobase.py
@@ -0,0 +1,432 @@
+# Authors: Travis Oliphant, Matthew Brett
+
+"""
+Base classes for MATLAB file stream reading.
+
+MATLAB is a registered trademark of the Mathworks inc.
+"""
+
+from typing import Final
+
+import numpy as np
+from scipy._lib import doccer
+
+from . import _byteordercodes as boc
+
+__all__ = [
+    'MatReadError', 'MatReadWarning', 'MatWriteError',
+]
+
+class MatReadError(Exception):
+    """Exception indicating a read issue."""
+
+
+class MatWriteError(Exception):
+    """Exception indicating a write issue."""
+
+
+class MatReadWarning(UserWarning):
+    """Warning class for read issues."""
+
+
+doc_dict = \
+    {'file_arg':
+         '''file_name : str
+   Name of the mat file (do not need .mat extension if
+   appendmat==True) Can also pass open file-like object.''',
+     'append_arg':
+         '''appendmat : bool, optional
+   True to append the .mat extension to the end of the given
+   filename, if not already present. Default is True.''',
+     'load_args':
+         '''byte_order : str or None, optional
+   None by default, implying byte order guessed from mat
+   file. Otherwise can be one of ('native', '=', 'little', '<',
+   'BIG', '>').
+mat_dtype : bool, optional
+   If True, return arrays in same dtype as would be loaded into
+   MATLAB (instead of the dtype with which they are saved).
+squeeze_me : bool, optional
+   Whether to squeeze unit matrix dimensions or not.
+chars_as_strings : bool, optional
+   Whether to convert char arrays to string arrays.
+matlab_compatible : bool, optional
+   Returns matrices as would be loaded by MATLAB (implies
+   squeeze_me=False, chars_as_strings=False, mat_dtype=True,
+   struct_as_record=True).''',
+     'struct_arg':
+         '''struct_as_record : bool, optional
+   Whether to load MATLAB structs as NumPy record arrays, or as
+   old-style NumPy arrays with dtype=object. Setting this flag to
+   False replicates the behavior of SciPy version 0.7.x (returning
+   numpy object arrays). The default setting is True, because it
+   allows easier round-trip load and save of MATLAB files.''',
+     'matstream_arg':
+         '''mat_stream : file-like
+   Object with file API, open for reading.''',
+     'long_fields':
+         '''long_field_names : bool, optional
+   * False - maximum field name length in a structure is 31 characters
+     which is the documented maximum length. This is the default.
+   * True - maximum field name length in a structure is 63 characters
+     which works for MATLAB 7.6''',
+     'do_compression':
+         '''do_compression : bool, optional
+   Whether to compress matrices on write. Default is False.''',
+     'oned_as':
+         '''oned_as : {'row', 'column'}, optional
+   If 'column', write 1-D NumPy arrays as column vectors.
+   If 'row', write 1D NumPy arrays as row vectors.''',
+     'unicode_strings':
+         '''unicode_strings : bool, optional
+   If True, write strings as Unicode, else MATLAB usual encoding.'''}
+
+docfiller: Final = doccer.filldoc(doc_dict)
+
+'''
+
+ Note on architecture
+======================
+
+There are three sets of parameters relevant for reading files. The
+first are *file read parameters* - containing options that are common
+for reading the whole file, and therefore every variable within that
+file. At the moment these are:
+
+* mat_stream
+* dtypes (derived from byte code)
+* byte_order
+* chars_as_strings
+* squeeze_me
+* struct_as_record (MATLAB 5 files)
+* class_dtypes (derived from order code, MATLAB 5 files)
+* codecs (MATLAB 5 files)
+* uint16_codec (MATLAB 5 files)
+
+Another set of parameters are those that apply only to the current
+variable being read - the *header*:
+
+* header related variables (different for v4 and v5 mat files)
+* is_complex
+* mclass
+* var_stream
+
+With the header, we need ``next_position`` to tell us where the next
+variable in the stream is.
+
+Then, for each element in a matrix, there can be *element read
+parameters*. An element is, for example, one element in a MATLAB cell
+array. At the moment, these are:
+
+* mat_dtype
+
+The file-reading object contains the *file read parameters*. The
+*header* is passed around as a data object, or may be read and discarded
+in a single function. The *element read parameters* - the mat_dtype in
+this instance, is passed into a general post-processing function - see
+``mio_utils`` for details.
+'''
+
+
+def convert_dtypes(dtype_template, order_code):
+    ''' Convert dtypes in mapping to given order
+
+    Parameters
+    ----------
+    dtype_template : mapping
+       mapping with values returning numpy dtype from ``np.dtype(val)``
+    order_code : str
+       an order code suitable for using in ``dtype.newbyteorder()``
+
+    Returns
+    -------
+    dtypes : mapping
+       mapping where values have been replaced by
+       ``np.dtype(val).newbyteorder(order_code)``
+
+    '''
+    dtypes = dtype_template.copy()
+    for k in dtypes:
+        dtypes[k] = np.dtype(dtypes[k]).newbyteorder(order_code)
+    return dtypes
+
+
+def read_dtype(mat_stream, a_dtype):
+    """
+    Generic get of byte stream data of known type
+
+    Parameters
+    ----------
+    mat_stream : file_like object
+        MATLAB (tm) mat file stream
+    a_dtype : dtype
+        dtype of array to read. `a_dtype` is assumed to be correct
+        endianness.
+
+    Returns
+    -------
+    arr : ndarray
+        Array of dtype `a_dtype` read from stream.
+
+    """
+    num_bytes = a_dtype.itemsize
+    arr = np.ndarray(shape=(),
+                     dtype=a_dtype,
+                     buffer=mat_stream.read(num_bytes),
+                     order='F')
+    return arr
+
+
+def matfile_version(file_name, *, appendmat=True):
+    """
+    Return major, minor tuple depending on apparent mat file type
+
+    Where:
+
+     #. 0,x -> version 4 format mat files
+     #. 1,x -> version 5 format mat files
+     #. 2,x -> version 7.3 format mat files (HDF format)
+
+    Parameters
+    ----------
+    file_name : str
+       Name of the mat file (do not need .mat extension if
+       appendmat==True). Can also pass open file-like object.
+    appendmat : bool, optional
+       True to append the .mat extension to the end of the given
+       filename, if not already present. Default is True.
+
+    Returns
+    -------
+    major_version : {0, 1, 2}
+        major MATLAB File format version
+    minor_version : int
+        minor MATLAB file format version
+
+    Raises
+    ------
+    MatReadError
+        If the file is empty.
+    ValueError
+        The matfile version is unknown.
+
+    Notes
+    -----
+    Has the side effect of setting the file read pointer to 0
+    """
+    from ._mio import _open_file_context
+    with _open_file_context(file_name, appendmat=appendmat) as fileobj:
+        return _get_matfile_version(fileobj)
+
+
+get_matfile_version = matfile_version
+
+
+_HDR_N_BYTES = 20
+
+
+def _get_matfile_version(fileobj):
+    # Mat4 files have a zero somewhere in first 4 bytes
+    fileobj.seek(0)
+    hdr_bytes = fileobj.read(_HDR_N_BYTES)
+    if len(hdr_bytes) < _HDR_N_BYTES:
+        raise MatReadError("Mat file appears to be truncated")
+    if hdr_bytes.count(0) == _HDR_N_BYTES:
+        raise MatReadError("Mat file appears to be corrupt "
+                           f"(first {_HDR_N_BYTES} bytes == 0)")
+    mopt_ints = np.ndarray(shape=(4,), dtype=np.uint8, buffer=hdr_bytes[:4])
+    if 0 in mopt_ints:
+        fileobj.seek(0)
+        return (0,0)
+    # For 5 format or 7.3 format we need to read an integer in the
+    # header. Bytes 124 through 128 contain a version integer and an
+    # endian test string
+    fileobj.seek(124)
+    tst_str = fileobj.read(4)
+    fileobj.seek(0)
+    maj_ind = int(tst_str[2] == b'I'[0])
+    maj_val = int(tst_str[maj_ind])
+    min_val = int(tst_str[1 - maj_ind])
+    ret = (maj_val, min_val)
+    if maj_val in (1, 2):
+        return ret
+    raise ValueError('Unknown mat file type, version {}, {}'.format(*ret))
+
+
+def matdims(arr, oned_as='column'):
+    """
+    Determine equivalent MATLAB dimensions for given array
+
+    Parameters
+    ----------
+    arr : ndarray
+        Input array
+    oned_as : {'column', 'row'}, optional
+        Whether 1-D arrays are returned as MATLAB row or column matrices.
+        Default is 'column'.
+
+    Returns
+    -------
+    dims : tuple
+        Shape tuple, in the form MATLAB expects it.
+
+    Notes
+    -----
+    We had to decide what shape a 1 dimensional array would be by
+    default. ``np.atleast_2d`` thinks it is a row vector. The
+    default for a vector in MATLAB (e.g., ``>> 1:12``) is a row vector.
+
+    Versions of scipy up to and including 0.11 resulted (accidentally)
+    in 1-D arrays being read as column vectors. For the moment, we
+    maintain the same tradition here.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.io.matlab._miobase import matdims
+    >>> matdims(np.array(1)) # NumPy scalar
+    (1, 1)
+    >>> matdims(np.array([1])) # 1-D array, 1 element
+    (1, 1)
+    >>> matdims(np.array([1,2])) # 1-D array, 2 elements
+    (2, 1)
+    >>> matdims(np.array([[2],[3]])) # 2-D array, column vector
+    (2, 1)
+    >>> matdims(np.array([[2,3]])) # 2-D array, row vector
+    (1, 2)
+    >>> matdims(np.array([[[2,3]]])) # 3-D array, rowish vector
+    (1, 1, 2)
+    >>> matdims(np.array([])) # empty 1-D array
+    (0, 0)
+    >>> matdims(np.array([[]])) # empty 2-D array
+    (0, 0)
+    >>> matdims(np.array([[[]]])) # empty 3-D array
+    (0, 0, 0)
+
+    Optional argument flips 1-D shape behavior.
+
+    >>> matdims(np.array([1,2]), 'row') # 1-D array, 2 elements
+    (1, 2)
+
+    The argument has to make sense though
+
+    >>> matdims(np.array([1,2]), 'bizarre')
+    Traceback (most recent call last):
+       ...
+    ValueError: 1-D option "bizarre" is strange
+
+    """
+    shape = arr.shape
+    if shape == ():  # scalar
+        return (1, 1)
+    if len(shape) == 1:  # 1D
+        if shape[0] == 0:
+            return (0, 0)
+        elif oned_as == 'column':
+            return shape + (1,)
+        elif oned_as == 'row':
+            return (1,) + shape
+        else:
+            raise ValueError(f'1-D option "{oned_as}" is strange')
+    return shape
+
+
+class MatVarReader:
+    ''' Abstract class defining required interface for var readers'''
+    def __init__(self, file_reader):
+        pass
+
+    def read_header(self):
+        ''' Returns header '''
+        pass
+
+    def array_from_header(self, header):
+        ''' Reads array given header '''
+        pass
+
+
+class MatFileReader:
+    """ Base object for reading mat files
+
+    To make this class functional, you will need to override the
+    following methods:
+
+    matrix_getter_factory   - gives object to fetch next matrix from stream
+    guess_byte_order        - guesses file byte order from file
+    """
+
+    @docfiller
+    def __init__(self, mat_stream,
+                 byte_order=None,
+                 mat_dtype=False,
+                 squeeze_me=False,
+                 chars_as_strings=True,
+                 matlab_compatible=False,
+                 struct_as_record=True,
+                 verify_compressed_data_integrity=True,
+                 simplify_cells=False):
+        '''
+        Initializer for mat file reader
+
+        mat_stream : file-like
+            object with file API, open for reading
+    %(load_args)s
+        '''
+        # Initialize stream
+        self.mat_stream = mat_stream
+        self.dtypes = {}
+        if not byte_order:
+            byte_order = self.guess_byte_order()
+        else:
+            byte_order = boc.to_numpy_code(byte_order)
+        self.byte_order = byte_order
+        self.struct_as_record = struct_as_record
+        if matlab_compatible:
+            self.set_matlab_compatible()
+        else:
+            self.squeeze_me = squeeze_me
+            self.chars_as_strings = chars_as_strings
+            self.mat_dtype = mat_dtype
+        self.verify_compressed_data_integrity = verify_compressed_data_integrity
+        self.simplify_cells = simplify_cells
+        if simplify_cells:
+            self.squeeze_me = True
+            self.struct_as_record = False
+
+    def set_matlab_compatible(self):
+        ''' Sets options to return arrays as MATLAB loads them '''
+        self.mat_dtype = True
+        self.squeeze_me = False
+        self.chars_as_strings = False
+
+    def guess_byte_order(self):
+        ''' As we do not know what file type we have, assume native '''
+        return boc.native_code
+
+    def end_of_stream(self):
+        b = self.mat_stream.read(1)
+        curpos = self.mat_stream.tell()
+        self.mat_stream.seek(curpos-1)
+        return len(b) == 0
+
+
+def arr_dtype_number(arr, num):
+    ''' Return dtype for given number of items per element'''
+    return np.dtype(arr.dtype.str[:2] + str(num))
+
+
+def arr_to_chars(arr):
+    ''' Convert string array to char array '''
+    dims = list(arr.shape)
+    if not dims:
+        dims = [1]
+    dims.append(int(arr.dtype.str[2:]))
+    arr = np.ndarray(shape=dims,
+                     dtype=arr_dtype_number(arr, 1),
+                     buffer=arr)
+    empties = [arr == np.array('', dtype=arr.dtype)]
+    if not np.any(empties):
+        return arr
+    arr = arr.copy()
+    arr[tuple(empties)] = ' '
+    return arr
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/byteordercodes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/byteordercodes.py
new file mode 100644
index 0000000000000000000000000000000000000000..0a1c5b0f5e77fdd461d6085037bfdf2850f40fa0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/byteordercodes.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="byteordercodes",
+                                   private_modules=["_byteordercodes"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio.py
new file mode 100644
index 0000000000000000000000000000000000000000..65bb31e52dc719b485b12ba1294fc3d09806c9d0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio.py
@@ -0,0 +1,16 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ["loadmat", "savemat", "whosmat"]  # noqa: F822
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio",
+                                   private_modules=["_mio"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio4.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio4.py
new file mode 100644
index 0000000000000000000000000000000000000000..d13b99a0bcedc9746f7681843989791e0918df2e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio4.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio4",
+                                   private_modules=["_mio4"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5.py
new file mode 100644
index 0000000000000000000000000000000000000000..b84ca19799b32999032833b4e1be1b21f6bc70da
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'MatWriteError', 'MatReadError', 'MatReadWarning', 'MatlabObject',
+    'MatlabFunction', 'mat_struct', 'varmats_from_mat',
+]
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio5",
+                                   private_modules=["_mio5"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_params.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_params.py
new file mode 100644
index 0000000000000000000000000000000000000000..2dcc9a4f353794546f0d8c07f9afe369baa992f5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_params.py
@@ -0,0 +1,18 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'MatlabFunction', 'MatlabObject', 'MatlabOpaque', 'mat_struct',
+]
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio5_params",
+                                   private_modules=["_mio5_params"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..37ad9e2dc2f50b85bf5aba517c4ac7d661b5039a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio5_utils.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio5_utils",
+                                   private_modules=["_mio5_utils"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio_utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..6920511d2635b44acd33ce6f5e00247daf6578d9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/mio_utils.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="mio_utils",
+                                   private_modules=["_mio_utils"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/miobase.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/miobase.py
new file mode 100644
index 0000000000000000000000000000000000000000..13e16848394471f9a1744a7b27fa4e6c86a9248b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/miobase.py
@@ -0,0 +1,16 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ["MatReadError", "MatReadWarning", "MatWriteError"]  # noqa: F822
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="miobase",
+                                   private_modules=["_miobase"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/streams.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/streams.py
new file mode 100644
index 0000000000000000000000000000000000000000..8125271b06cc6f44cee19b2f6079d26b8f32e268
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/streams.py
@@ -0,0 +1,16 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io.matlab` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io.matlab", module="streams",
+                                   private_modules=["_streams"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miuint32.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miuint32.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c9ab357ec85972cf0014752a1e0ccb08ff284af9
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miuint32.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miutf8_array_name.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miutf8_array_name.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a17203fbb2a7628db644b953ac7723b866a2a0a4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/bad_miutf8_array_name.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/big_endian.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/big_endian.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2a0c982c298fba9df96fd5a927a9c08ee12b09df
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/big_endian.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/broken_utf8.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/broken_utf8.mat
new file mode 100644
index 0000000000000000000000000000000000000000..4f6323870368cd97a6294e108ffea9067cf5e69b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/broken_utf8.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_checksum.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_checksum.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c88cbb6f54b70d4e795de7cf43f7b46ff6d4d5ef
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_checksum.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_data.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_data.mat
new file mode 100644
index 0000000000000000000000000000000000000000..45a2ef4e39755ea1f41aab045f18a035af58ea07
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/corrupted_zlib_data.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/debigged_m4.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/debigged_m4.mat
new file mode 100644
index 0000000000000000000000000000000000000000..28aad199045d0b3bf31060300aff9231ee6d9a71
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/debigged_m4.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/japanese_utf8.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/japanese_utf8.txt
new file mode 100644
index 0000000000000000000000000000000000000000..1459b6b6ea635b17b5eb04c941e197f98cf04bf1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/japanese_utf8.txt
@@ -0,0 +1,5 @@
+Japanese: 
+すべての人間は、生まれながらにして自由であり、
+かつ、尊厳と権利と について平等である。
+人間は、理性と良心とを授けられており、
+互いに同胞の精神をもって行動しなければならない。
\ No newline at end of file
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/little_endian.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/little_endian.mat
new file mode 100644
index 0000000000000000000000000000000000000000..df6db666dcf2b98d66e04933bd4011f649dcbe30
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/little_endian.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/logical_sparse.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/logical_sparse.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a60ad5b605a9dc6b0d85eb0a0e3e655c4955dd34
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/logical_sparse.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/malformed1.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/malformed1.mat
new file mode 100644
index 0000000000000000000000000000000000000000..54462e27d663770bc33ef73ed70baae65767719d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/malformed1.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miuint32_for_miint32.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miuint32_for_miint32.mat
new file mode 100644
index 0000000000000000000000000000000000000000..fd2c4994578edbf31431902ecfcb601b11f60b0b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miuint32_for_miint32.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miutf8_array_name.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miutf8_array_name.mat
new file mode 100644
index 0000000000000000000000000000000000000000..ccfdaa8adb7879ba852eab9ce55b602e11dad06d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/miutf8_array_name.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat
new file mode 100644
index 0000000000000000000000000000000000000000..35dcb715bca4cb7f4b0dca287648ef8ee797cd73
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/one_by_zero_char.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/one_by_zero_char.mat
new file mode 100644
index 0000000000000000000000000000000000000000..07e7dca456843004dcfd9023a800ea91d309814d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/one_by_zero_char.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/parabola.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/parabola.mat
new file mode 100644
index 0000000000000000000000000000000000000000..66350532a7737c475a3ae6ef1b1d8406543d890e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/parabola.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/single_empty_string.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/single_empty_string.mat
new file mode 100644
index 0000000000000000000000000000000000000000..293f387719e8bdcacb075e0de5737894e5dafed3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/single_empty_string.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/some_functions.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/some_functions.mat
new file mode 100644
index 0000000000000000000000000000000000000000..cc818593b48dd8d29a40a827210b54373e5acf50
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/some_functions.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/sqr.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/sqr.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2436d87cc5dfb6d558b841c2367bfe2363bd1b3c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/sqr.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..453712610bf46501d8dd3667ff72d8033f49d81c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..e04d27d30378655ed14634330c7a8ddcd0b98c10
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..4c0303039826af6f6caa928e505cec10ebb3fa81
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..232a051c774105176c28c9718c2cd46f1a1ee1af
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_empty_struct.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_empty_struct.mat
new file mode 100644
index 0000000000000000000000000000000000000000..30c8c8ad5378be4508bd785da8b7cef38adbd13e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_empty_struct.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_mat4_le_floats.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_mat4_le_floats.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6643c42ddcc9579930980b7eb30e11f339638404
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_mat4_le_floats.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_skip_variable.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_skip_variable.mat
new file mode 100644
index 0000000000000000000000000000000000000000..efbe3fec64ee54c9f8b3998e5035ccfa251e74ff
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/test_skip_variable.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testbool_8_WIN64.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testbool_8_WIN64.mat
new file mode 100644
index 0000000000000000000000000000000000000000..faa30b10bc61ea4889bd9e776c0a1a079e2c2a90
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testbool_8_WIN64.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..512f7d889420a016094a903585f27acaa50bc658
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a7633104c1e4f32fe30fd43f389d7559527c8211
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2ac1da15873c5edac27758b6f91563d2b8aaace0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..fc893f331c985cf17b7ce9b7b8c179eaf2103659
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..4198a4f2aeb8effcccf94a9c0114539f98124179
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2c7826eeacdb456e5290cafba343703c7596d191
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..b3b086cc31dce2de1e300a1d018b0bf5661b69f3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..316f8894c5ecc88468cfa0908c277f730e3163e8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..36621b25c08f18e4545100c6eaec015123c3bf9f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..32fcd2a93c91eff478a3ab3076e5c78e31f09bf1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..f3ecd203376c17b09d97a24aceab824dae0f91c1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c0c083855f38e62e3a29460b745f198c9c79313d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6a187edb1828256362617d3fe24d26cf58e7ca3b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..5dbfcf17dd0e01dc0325dd009340291158906e8d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8e36c0c8ce62d7559b60fde454a96e8eefcbcb92
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a003b6d866f77a25d3b8b236bc95e343221e3019
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3106712e1099345b48dc4e4125d5e739c24b5341
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..9097bb08712d5bfccf172b0366573f503136228d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_5.3_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_5.3_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..e7dec3b81abdae8769e0ae0329948548f4038adf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_5.3_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a1c93483597f364443158132b31b86693891b02a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..f29d4f9327aa906729234a38caa05ebfc50cfc30
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8b244044cf3028df9a019a259d8fc533b80f7fb7
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..adb6c28ee95d1cf8bf3bfeb72295d1a7848020f8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testhdf5_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testhdf5_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6066c1e30f69b76afdb8d251ecefd8cd9e1acde5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testhdf5_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3698c8853b46d4a42194002523b57fddfb225908
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..164be1109d977cf7681b1ea00a5df80d5e8f8e71
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a8735e9a23558ce86a528ceafa8f3475b053e43b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..b6fb05bb7564c863d5bb6c145fe8b06928d3805a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..eb537ab1042b0f989d49711b1a36cc508946fe55
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..cc207ed9f32095f39b7690e2dc1e2dc0d55ee8e0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c2f0ba2ae4c8a1750cace6eae0267e9736272fc0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..b4dbd152d6e9f3d289b3c4a9792729d2735a4c5c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..fadcd2366b1867239782f073291ff327c2af3001
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..9ce65f91116f68332d1c16e21319e965541d0d73
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..9c6ba793cf41bf36447ab7a1890447fe5e939614
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..0c4729c56b6ab1e8945249a4d3144c79d8538e9e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6d3e068977edfe6407f29404f0a7d1737f7d3eba
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..fc13642263a64874f6c2ac602be9cdcb9b788996
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..f68323b0c8eb7fc999dead349ea3bd3a6da66bd4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..83dcad34249afa543bf66dae9b836276246aab4a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..59d243c4de4fbb3fa653753e40651a6d0a4f4967
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..cdb4191c7d2eb0ac66d4f6add250e1f6a604d892
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3b5a428501a53ae7308c7b6edc42f4881820664d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8cef2dd7ea6df8aac26ed067a9427935b81c7ac7
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..5ba4810ac67756c17b0ef3163a496e913c0b5e57
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8964765f7bd207bfab63b4d16569cb1c3763bda7
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..1dcd72e51a51abdcf48bd37f68b9927421c17cb0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsimplecell.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsimplecell.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2a98f48917f8f275e541eeac5ef1fe741c40bb0b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsimplecell.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..55cbd3c1b3d65630beae47832ffbcc7a6fd43354
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..194ca4d7d4d4d22be5669041a25c3ca24ae6edcb
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3e1e9a1ec916040e94c231f428725add10a2709c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..55b510762ee9b0ac04776e38f6b4bb46b0d10021
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..bdb6ce66ce79b808f044124156db4b803dab155e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..81c536d0b067b92cae1b7a2ee71824e2c5e730d9
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..520e1cedb3823b859666b1fa8872e073904fd4c6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..969b7143dfff3bb817dbf70c54af8303c3b5822e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..9117dce3092e3e6a39b67da9a7ad1dcfc3ded385
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a8a615a320f9c8db068a9120c1ceb2e49bb0ea6d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..15424266a3bd4aa1e7525a8fdc4945b51d2b5ad6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..137561e1f636d7b08959e43e969a6984eb7a3b37
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2ad75f2e17d8b3fda285490d52b426d1f27d0d95
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6fd12d884d19df65f1534c13944e988e636166f1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..ab93994f7befe7d1505c84c238d6409bcb3d438a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..63059b84476749119f44ebefda795f85f6ab27d7
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_4.2c_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_4.2c_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..fa687ee988ce530bca87f46235667baa30ac038b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_4.2c_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..11afb412056ad803f0d8ac1d9dcb188d42285fdf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..75e07a0b55e008b070f41dabba7480a4e463b67a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..7d76f63643737834053f80539188c9dad75ed0cb
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..954e39beb8156b460ca904ff66261d8f2fc338cb
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..5086bb7acdc3773186e903000aace436c90dc565
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..6feb6e42375ebebf6dd9440ee09312204cbf1a33
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..b2ff2226223181ec5c42d36afe4f56728f25972d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..028841f9d3aae42d6cf782db14634cbe375f0a05
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..da57365926afe1e8d7dd424a6fcd5b52bc3233ac
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..d1c97a7a2e1edf9683959ec36e899ef8e355073c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c7ca09594106a765e815a55e942019d17c181270
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8716f7e3db67d1fd479f913d12286715029ed1a4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.1_SOL2.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.1_SOL2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..2c34c4d8c1477bc4859880a8d2f800073825dcd1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.1_SOL2.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.5.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.5.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..c6dccc00289f61787b235f4299aa5a14ab4f6d07
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_6.5.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..0f6f5444b0c1e4bcd80dc0f63b28523d655b05d0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..faf9221b776eee67cd5d2971da5ba77732ef8016
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.1_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.1_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..1b7b3d7f002080839f672e4eb858bbfbddda27ec
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.1_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..d22fb57c81fc3ec9ee7e9b447a05e8a89ff1fcfe
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testvec_4_GLNX86.mat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testvec_4_GLNX86.mat
new file mode 100644
index 0000000000000000000000000000000000000000..76c51d01388a1770b348bc603ebfdd51bc011f0c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/data/testvec_4_GLNX86.mat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_byteordercodes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_byteordercodes.py
new file mode 100644
index 0000000000000000000000000000000000000000..535434d188ff575029cc7a0de807b0daa7348f73
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_byteordercodes.py
@@ -0,0 +1,29 @@
+''' Tests for byteorder module '''
+
+import sys
+
+from numpy.testing import assert_
+from pytest import raises as assert_raises
+
+import scipy.io.matlab._byteordercodes as sibc
+
+
+def test_native():
+    native_is_le = sys.byteorder == 'little'
+    assert_(sibc.sys_is_le == native_is_le)
+
+
+def test_to_numpy():
+    if sys.byteorder == 'little':
+        assert_(sibc.to_numpy_code('native') == '<')
+        assert_(sibc.to_numpy_code('swapped') == '>')
+    else:
+        assert_(sibc.to_numpy_code('native') == '>')
+        assert_(sibc.to_numpy_code('swapped') == '<')
+    assert_(sibc.to_numpy_code('native') == sibc.to_numpy_code('='))
+    assert_(sibc.to_numpy_code('big') == '>')
+    for code in ('little', '<', 'l', 'L', 'le'):
+        assert_(sibc.to_numpy_code(code) == '<')
+    for code in ('big', '>', 'b', 'B', 'be'):
+        assert_(sibc.to_numpy_code(code) == '>')
+    assert_raises(ValueError, sibc.to_numpy_code, 'silly string')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio.py
new file mode 100644
index 0000000000000000000000000000000000000000..ef8b3e34ee666fa297d9e25eec1e409ef68edb5f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio.py
@@ -0,0 +1,1371 @@
+import os
+from collections import OrderedDict
+from os.path import join as pjoin, dirname
+from glob import glob
+from io import BytesIO
+import re
+from tempfile import mkdtemp
+
+import warnings
+import shutil
+import gzip
+
+from numpy.testing import (assert_array_equal, assert_array_almost_equal,
+                           assert_equal, assert_, assert_warns, assert_allclose)
+import pytest
+from pytest import raises as assert_raises
+
+import numpy as np
+from numpy import array
+from scipy.sparse import issparse, eye_array, coo_array, csc_array
+
+import scipy.io
+from scipy.io.matlab import MatlabOpaque, MatlabFunction, MatlabObject
+import scipy.io.matlab._byteordercodes as boc
+from scipy.io.matlab._miobase import (
+    matdims, MatWriteError, MatReadError, matfile_version)
+from scipy.io.matlab._mio import mat_reader_factory, loadmat, savemat, whosmat
+from scipy.io.matlab._mio5 import (
+    MatFile5Writer, MatFile5Reader, varmats_from_mat, to_writeable,
+    EmptyStructMarker)
+import scipy.io.matlab._mio5_params as mio5p
+from scipy._lib._util import VisibleDeprecationWarning
+
+
+test_data_path = pjoin(dirname(__file__), 'data')
+pytestmark = pytest.mark.thread_unsafe
+
+
+def mlarr(*args, **kwargs):
+    """Convenience function to return matlab-compatible 2-D array."""
+    arr = np.array(*args, **kwargs)
+    arr.shape = matdims(arr)
+    return arr
+
+
+# Define cases to test
+theta = np.pi/4*np.arange(9,dtype=float).reshape(1,9)
+case_table4 = [
+    {'name': 'double',
+     'classes': {'testdouble': 'double'},
+     'expected': {'testdouble': theta}
+     }]
+case_table4.append(
+    {'name': 'string',
+     'classes': {'teststring': 'char'},
+     'expected': {'teststring':
+                  array(['"Do nine men interpret?" "Nine men," I nod.'])}
+     })
+case_table4.append(
+    {'name': 'complex',
+     'classes': {'testcomplex': 'double'},
+     'expected': {'testcomplex': np.cos(theta) + 1j*np.sin(theta)}
+     })
+A = np.zeros((3,5))
+A[0] = list(range(1,6))
+A[:,0] = list(range(1,4))
+case_table4.append(
+    {'name': 'matrix',
+     'classes': {'testmatrix': 'double'},
+     'expected': {'testmatrix': A},
+     })
+case_table4.append(
+    {'name': 'sparse',
+     'classes': {'testsparse': 'sparse'},
+     'expected': {'testsparse': coo_array(A)},
+     })
+B = A.astype(complex)
+B[0,0] += 1j
+case_table4.append(
+    {'name': 'sparsecomplex',
+     'classes': {'testsparsecomplex': 'sparse'},
+     'expected': {'testsparsecomplex': coo_array(B)},
+     })
+case_table4.append(
+    {'name': 'multi',
+     'classes': {'theta': 'double', 'a': 'double'},
+     'expected': {'theta': theta, 'a': A},
+     })
+case_table4.append(
+    {'name': 'minus',
+     'classes': {'testminus': 'double'},
+     'expected': {'testminus': mlarr(-1)},
+     })
+case_table4.append(
+    {'name': 'onechar',
+     'classes': {'testonechar': 'char'},
+     'expected': {'testonechar': array(['r'])},
+     })
+# Cell arrays stored as object arrays
+CA = mlarr((  # tuple for object array creation
+        [],
+        mlarr([1]),
+        mlarr([[1,2]]),
+        mlarr([[1,2,3]])), dtype=object).reshape(1,-1)
+CA[0,0] = array(
+    ['This cell contains this string and 3 arrays of increasing length'])
+case_table5 = [
+    {'name': 'cell',
+     'classes': {'testcell': 'cell'},
+     'expected': {'testcell': CA}}]
+CAE = mlarr((  # tuple for object array creation
+    mlarr(1),
+    mlarr(2),
+    mlarr([]),
+    mlarr([]),
+    mlarr(3)), dtype=object).reshape(1,-1)
+objarr = np.empty((1,1),dtype=object)
+objarr[0,0] = mlarr(1)
+case_table5.append(
+    {'name': 'scalarcell',
+     'classes': {'testscalarcell': 'cell'},
+     'expected': {'testscalarcell': objarr}
+     })
+case_table5.append(
+    {'name': 'emptycell',
+     'classes': {'testemptycell': 'cell'},
+     'expected': {'testemptycell': CAE}})
+case_table5.append(
+    {'name': 'stringarray',
+     'classes': {'teststringarray': 'char'},
+     'expected': {'teststringarray': array(
+    ['one  ', 'two  ', 'three'])},
+     })
+case_table5.append(
+    {'name': '3dmatrix',
+     'classes': {'test3dmatrix': 'double'},
+     'expected': {
+    'test3dmatrix': np.transpose(np.reshape(list(range(1,25)), (4,3,2)))}
+     })
+st_sub_arr = array([np.sqrt(2),np.exp(1),np.pi]).reshape(1,3)
+dtype = [(n, object) for n in ['stringfield', 'doublefield', 'complexfield']]
+st1 = np.zeros((1,1), dtype)
+st1['stringfield'][0,0] = array(['Rats live on no evil star.'])
+st1['doublefield'][0,0] = st_sub_arr
+st1['complexfield'][0,0] = st_sub_arr * (1 + 1j)
+case_table5.append(
+    {'name': 'struct',
+     'classes': {'teststruct': 'struct'},
+     'expected': {'teststruct': st1}
+     })
+CN = np.zeros((1,2), dtype=object)
+CN[0,0] = mlarr(1)
+CN[0,1] = np.zeros((1,3), dtype=object)
+CN[0,1][0,0] = mlarr(2, dtype=np.uint8)
+CN[0,1][0,1] = mlarr([[3]], dtype=np.uint8)
+CN[0,1][0,2] = np.zeros((1,2), dtype=object)
+CN[0,1][0,2][0,0] = mlarr(4, dtype=np.uint8)
+CN[0,1][0,2][0,1] = mlarr(5, dtype=np.uint8)
+case_table5.append(
+    {'name': 'cellnest',
+     'classes': {'testcellnest': 'cell'},
+     'expected': {'testcellnest': CN},
+     })
+st2 = np.empty((1,1), dtype=[(n, object) for n in ['one', 'two']])
+st2[0,0]['one'] = mlarr(1)
+st2[0,0]['two'] = np.empty((1,1), dtype=[('three', object)])
+st2[0,0]['two'][0,0]['three'] = array(['number 3'])
+case_table5.append(
+    {'name': 'structnest',
+     'classes': {'teststructnest': 'struct'},
+     'expected': {'teststructnest': st2}
+     })
+a = np.empty((1,2), dtype=[(n, object) for n in ['one', 'two']])
+a[0,0]['one'] = mlarr(1)
+a[0,0]['two'] = mlarr(2)
+a[0,1]['one'] = array(['number 1'])
+a[0,1]['two'] = array(['number 2'])
+case_table5.append(
+    {'name': 'structarr',
+     'classes': {'teststructarr': 'struct'},
+     'expected': {'teststructarr': a}
+     })
+ODT = np.dtype([(n, object) for n in
+                 ['expr', 'inputExpr', 'args',
+                  'isEmpty', 'numArgs', 'version']])
+MO = MatlabObject(np.zeros((1,1), dtype=ODT), 'inline')
+m0 = MO[0,0]
+m0['expr'] = array(['x'])
+m0['inputExpr'] = array([' x = INLINE_INPUTS_{1};'])
+m0['args'] = array(['x'])
+m0['isEmpty'] = mlarr(0)
+m0['numArgs'] = mlarr(1)
+m0['version'] = mlarr(1)
+case_table5.append(
+    {'name': 'object',
+     'classes': {'testobject': 'object'},
+     'expected': {'testobject': MO}
+     })
+fp_u_str = open(pjoin(test_data_path, 'japanese_utf8.txt'), 'rb')
+u_str = fp_u_str.read().decode('utf-8')
+fp_u_str.close()
+case_table5.append(
+    {'name': 'unicode',
+     'classes': {'testunicode': 'char'},
+    'expected': {'testunicode': array([u_str])}
+     })
+case_table5.append(
+    {'name': 'sparse',
+     'classes': {'testsparse': 'sparse'},
+     'expected': {'testsparse': coo_array(A)},
+     })
+case_table5.append(
+    {'name': 'sparsecomplex',
+     'classes': {'testsparsecomplex': 'sparse'},
+     'expected': {'testsparsecomplex': coo_array(B)},
+     })
+case_table5.append(
+    {'name': 'bool',
+     'classes': {'testbools': 'logical'},
+     'expected': {'testbools':
+                  array([[True], [False]])},
+     })
+
+case_table5_rt = case_table5[:]
+# Inline functions can't be concatenated in matlab, so RT only
+case_table5_rt.append(
+    {'name': 'objectarray',
+     'classes': {'testobjectarray': 'object'},
+     'expected': {'testobjectarray': np.repeat(MO, 2).reshape(1,2)}})
+
+
+def types_compatible(var1, var2):
+    """Check if types are same or compatible.
+
+    0-D numpy scalars are compatible with bare python scalars.
+    """
+    type1 = type(var1)
+    type2 = type(var2)
+    if type1 is type2:
+        return True
+    if type1 is np.ndarray and var1.shape == ():
+        return type(var1.item()) is type2
+    if type2 is np.ndarray and var2.shape == ():
+        return type(var2.item()) is type1
+    return False
+
+
+def _check_level(label, expected, actual):
+    """ Check one level of a potentially nested array """
+    if issparse(expected):  # allow different types of sparse matrices
+        assert_(issparse(actual))
+        assert_array_almost_equal(actual.toarray(),
+                                  expected.toarray(),
+                                  err_msg=label,
+                                  decimal=5)
+        return
+    # Check types are as expected
+    assert_(types_compatible(expected, actual),
+            f"Expected type {type(expected)}, got {type(actual)} at {label}")
+    # A field in a record array may not be an ndarray
+    # A scalar from a record array will be type np.void
+    if not isinstance(expected, np.void | np.ndarray | MatlabObject):
+        assert_equal(expected, actual)
+        return
+    # This is an ndarray-like thing
+    assert_(expected.shape == actual.shape,
+            msg=f'Expected shape {expected.shape}, got {actual.shape} at {label}')
+    ex_dtype = expected.dtype
+    if ex_dtype.hasobject:  # array of objects
+        if isinstance(expected, MatlabObject):
+            assert_equal(expected.classname, actual.classname)
+        for i, ev in enumerate(expected):
+            level_label = "%s, [%d], " % (label, i)
+            _check_level(level_label, ev, actual[i])
+        return
+    if ex_dtype.fields:  # probably recarray
+        for fn in ex_dtype.fields:
+            level_label = f"{label}, field {fn}, "
+            _check_level(level_label,
+                         expected[fn], actual[fn])
+        return
+    if ex_dtype.type in (str,  # string or bool
+                         np.str_,
+                         np.bool_):
+        assert_equal(actual, expected, err_msg=label)
+        return
+    # Something numeric
+    assert_array_almost_equal(actual, expected, err_msg=label, decimal=5)
+
+
+def _load_check_case(name, files, case):
+    for file_name in files:
+        matdict = loadmat(file_name, struct_as_record=True, spmatrix=False)
+        label = f"test {name}; file {file_name}"
+        for k, expected in case.items():
+            k_label = f"{label}, variable {k}"
+            assert_(k in matdict, f"Missing key at {k_label}")
+            _check_level(k_label, expected, matdict[k])
+
+
+def _whos_check_case(name, files, case, classes):
+    for file_name in files:
+        label = f"test {name}; file {file_name}"
+
+        whos = whosmat(file_name)
+
+        expected_whos = [
+            (k, expected.shape, classes[k]) for k, expected in case.items()]
+
+        whos.sort()
+        expected_whos.sort()
+        assert_equal(whos, expected_whos,
+                     f"{label}: {whos!r} != {expected_whos!r}"
+                     )
+
+
+# Round trip tests
+def _rt_check_case(name, expected, format):
+    mat_stream = BytesIO()
+    savemat(mat_stream, expected, format=format)
+    mat_stream.seek(0)
+    _load_check_case(name, [mat_stream], expected)
+
+
+# generator for tests
+def _cases(version, filt='test%(name)s_*.mat'):
+    if version == '4':
+        cases = case_table4
+    elif version == '5':
+        cases = case_table5
+    else:
+        assert version == '5_rt'
+        cases = case_table5_rt
+    for case in cases:
+        name = case['name']
+        expected = case['expected']
+        if filt is None:
+            files = None
+        else:
+            use_filt = pjoin(test_data_path, filt % dict(name=name))
+            files = glob(use_filt)
+            assert len(files) > 0, \
+                f"No files for test {name} using filter {filt}"
+        classes = case['classes']
+        yield name, files, expected, classes
+
+
+@pytest.mark.parametrize('version', ('4', '5'))
+def test_load(version):
+    for case in _cases(version):
+        _load_check_case(*case[:3])
+
+
+@pytest.mark.parametrize('version', ('4', '5'))
+def test_whos(version):
+    for case in _cases(version):
+        _whos_check_case(*case)
+
+
+# generator for round trip tests
+@pytest.mark.parametrize('version, fmts', [
+    ('4', ['4', '5']),
+    ('5_rt', ['5']),
+])
+def test_round_trip(version, fmts):
+    for case in _cases(version, filt=None):
+        for fmt in fmts:
+            _rt_check_case(case[0], case[2], fmt)
+
+
+def test_gzip_simple():
+    xdense = np.zeros((20,20))
+    xdense[2,3] = 2.3
+    xdense[4,5] = 4.5
+    x = csc_array(xdense)
+
+    name = 'gzip_test'
+    expected = {'x':x}
+    format = '4'
+
+    tmpdir = mkdtemp()
+    try:
+        fname = pjoin(tmpdir,name)
+        mat_stream = gzip.open(fname, mode='wb')
+        savemat(mat_stream, expected, format=format)
+        mat_stream.close()
+
+        mat_stream = gzip.open(fname, mode='rb')
+        actual = loadmat(mat_stream, struct_as_record=True, spmatrix=False)
+        mat_stream.close()
+    finally:
+        shutil.rmtree(tmpdir)
+
+    assert_array_almost_equal(actual['x'].toarray(),
+                              expected['x'].toarray(),
+                              err_msg=repr(actual))
+
+
+def test_multiple_open():
+    # Ticket #1039, on Windows: check that files are not left open
+    tmpdir = mkdtemp()
+    try:
+        x = dict(x=np.zeros((2, 2)))
+
+        fname = pjoin(tmpdir, "a.mat")
+
+        # Check that file is not left open
+        savemat(fname, x)
+        os.unlink(fname)
+        savemat(fname, x)
+        loadmat(fname)
+        os.unlink(fname)
+
+        # Check that stream is left open
+        f = open(fname, 'wb')
+        savemat(f, x)
+        f.seek(0)
+        f.close()
+
+        f = open(fname, 'rb')
+        loadmat(f)
+        f.seek(0)
+        f.close()
+    finally:
+        shutil.rmtree(tmpdir)
+
+
+def test_mat73():
+    # Check any hdf5 files raise an error
+    filenames = glob(
+        pjoin(test_data_path, 'testhdf5*.mat'))
+    assert_(len(filenames) > 0)
+    for filename in filenames:
+        fp = open(filename, 'rb')
+        assert_raises(NotImplementedError,
+                      loadmat,
+                      fp,
+                      struct_as_record=True)
+        fp.close()
+
+
+def test_warnings():
+    # This test is an echo of the previous behavior, which was to raise a
+    # warning if the user triggered a search for mat files on the Python system
+    # path. We can remove the test in the next version after upcoming (0.13).
+    fname = pjoin(test_data_path, 'testdouble_7.1_GLNX86.mat')
+    with warnings.catch_warnings():
+        warnings.simplefilter('error')
+        # This should not generate a warning
+        loadmat(fname, struct_as_record=True)
+        # This neither
+        loadmat(fname, struct_as_record=False)
+
+
+def test_regression_653():
+    # Saving a dictionary with only invalid keys used to raise an error. Now we
+    # save this as an empty struct in matlab space.
+    sio = BytesIO()
+    savemat(sio, {'d':{1:2}}, format='5')
+    back = loadmat(sio)['d']
+    # Check we got an empty struct equivalent
+    assert_equal(back.shape, (1,1))
+    assert_equal(back.dtype, np.dtype(object))
+    assert_(back[0,0] is None)
+
+
+def test_structname_len():
+    # Test limit for length of field names in structs
+    lim = 31
+    fldname = 'a' * lim
+    st1 = np.zeros((1,1), dtype=[(fldname, object)])
+    savemat(BytesIO(), {'longstruct': st1}, format='5')
+    fldname = 'a' * (lim+1)
+    st1 = np.zeros((1,1), dtype=[(fldname, object)])
+    assert_raises(ValueError, savemat, BytesIO(),
+                  {'longstruct': st1}, format='5')
+
+
+def test_4_and_long_field_names_incompatible():
+    # Long field names option not supported in 4
+    my_struct = np.zeros((1,1),dtype=[('my_fieldname',object)])
+    assert_raises(ValueError, savemat, BytesIO(),
+                  {'my_struct':my_struct}, format='4', long_field_names=True)
+
+
+def test_long_field_names():
+    # Test limit for length of field names in structs
+    lim = 63
+    fldname = 'a' * lim
+    st1 = np.zeros((1,1), dtype=[(fldname, object)])
+    savemat(BytesIO(), {'longstruct': st1}, format='5',long_field_names=True)
+    fldname = 'a' * (lim+1)
+    st1 = np.zeros((1,1), dtype=[(fldname, object)])
+    assert_raises(ValueError, savemat, BytesIO(),
+                  {'longstruct': st1}, format='5',long_field_names=True)
+
+
+def test_long_field_names_in_struct():
+    # Regression test - long_field_names was erased if you passed a struct
+    # within a struct
+    lim = 63
+    fldname = 'a' * lim
+    cell = np.ndarray((1,2),dtype=object)
+    st1 = np.zeros((1,1), dtype=[(fldname, object)])
+    cell[0,0] = st1
+    cell[0,1] = st1
+    savemat(BytesIO(), {'longstruct': cell}, format='5',long_field_names=True)
+    #
+    # Check to make sure it fails with long field names off
+    #
+    assert_raises(ValueError, savemat, BytesIO(),
+                  {'longstruct': cell}, format='5', long_field_names=False)
+
+
+def test_cell_with_one_thing_in_it():
+    # Regression test - make a cell array that's 1 x 2 and put two
+    # strings in it. It works. Make a cell array that's 1 x 1 and put
+    # a string in it. It should work but, in the old days, it didn't.
+    cells = np.ndarray((1,2),dtype=object)
+    cells[0,0] = 'Hello'
+    cells[0,1] = 'World'
+    savemat(BytesIO(), {'x': cells}, format='5')
+
+    cells = np.ndarray((1,1),dtype=object)
+    cells[0,0] = 'Hello, world'
+    savemat(BytesIO(), {'x': cells}, format='5')
+
+
+def test_writer_properties():
+    # Tests getting, setting of properties of matrix writer
+    mfw = MatFile5Writer(BytesIO())
+    assert_equal(mfw.global_vars, [])
+    mfw.global_vars = ['avar']
+    assert_equal(mfw.global_vars, ['avar'])
+    assert_equal(mfw.unicode_strings, False)
+    mfw.unicode_strings = True
+    assert_equal(mfw.unicode_strings, True)
+    assert_equal(mfw.long_field_names, False)
+    mfw.long_field_names = True
+    assert_equal(mfw.long_field_names, True)
+
+
+def test_use_small_element():
+    # Test whether we're using small data element or not
+    sio = BytesIO()
+    wtr = MatFile5Writer(sio)
+    # First check size for no sde for name
+    arr = np.zeros(10)
+    wtr.put_variables({'aaaaa': arr})
+    w_sz = len(sio.getvalue())
+    # Check small name results in largish difference in size
+    sio.truncate(0)
+    sio.seek(0)
+    wtr.put_variables({'aaaa': arr})
+    assert_(w_sz - len(sio.getvalue()) > 4)
+    # Whereas increasing name size makes less difference
+    sio.truncate(0)
+    sio.seek(0)
+    wtr.put_variables({'aaaaaa': arr})
+    assert_(len(sio.getvalue()) - w_sz < 4)
+
+
+def test_save_dict():
+    # Test that both dict and OrderedDict can be saved (as recarray),
+    # loaded as matstruct, and preserve order
+    ab_exp = np.array([[(1, 2)]], dtype=[('a', object), ('b', object)])
+    for dict_type in (dict, OrderedDict):
+        # Initialize with tuples to keep order
+        d = dict_type([('a', 1), ('b', 2)])
+        stream = BytesIO()
+        savemat(stream, {'dict': d})
+        stream.seek(0)
+        vals = loadmat(stream)['dict']
+        assert_equal(vals.dtype.names, ('a', 'b'))
+        assert_array_equal(vals, ab_exp)
+
+
+def test_1d_shape():
+    # New 5 behavior is 1D -> row vector
+    arr = np.arange(5)
+    for format in ('4', '5'):
+        # Column is the default
+        stream = BytesIO()
+        savemat(stream, {'oned': arr}, format=format)
+        vals = loadmat(stream)
+        assert_equal(vals['oned'].shape, (1, 5))
+        # can be explicitly 'column' for oned_as
+        stream = BytesIO()
+        savemat(stream, {'oned':arr},
+                format=format,
+                oned_as='column')
+        vals = loadmat(stream)
+        assert_equal(vals['oned'].shape, (5,1))
+        # but different from 'row'
+        stream = BytesIO()
+        savemat(stream, {'oned':arr},
+                format=format,
+                oned_as='row')
+        vals = loadmat(stream)
+        assert_equal(vals['oned'].shape, (1,5))
+
+
+def test_compression():
+    arr = np.zeros(100).reshape((5,20))
+    arr[2,10] = 1
+    stream = BytesIO()
+    savemat(stream, {'arr':arr})
+    raw_len = len(stream.getvalue())
+    vals = loadmat(stream)
+    assert_array_equal(vals['arr'], arr)
+    stream = BytesIO()
+    savemat(stream, {'arr':arr}, do_compression=True)
+    compressed_len = len(stream.getvalue())
+    vals = loadmat(stream)
+    assert_array_equal(vals['arr'], arr)
+    assert_(raw_len > compressed_len)
+    # Concatenate, test later
+    arr2 = arr.copy()
+    arr2[0,0] = 1
+    stream = BytesIO()
+    savemat(stream, {'arr':arr, 'arr2':arr2}, do_compression=False)
+    vals = loadmat(stream)
+    assert_array_equal(vals['arr2'], arr2)
+    stream = BytesIO()
+    savemat(stream, {'arr':arr, 'arr2':arr2}, do_compression=True)
+    vals = loadmat(stream)
+    assert_array_equal(vals['arr2'], arr2)
+
+
+def test_single_object():
+    stream = BytesIO()
+    savemat(stream, {'A':np.array(1, dtype=object)})
+
+
+def test_skip_variable():
+    # Test skipping over the first of two variables in a MAT file
+    # using mat_reader_factory and put_variables to read them in.
+    #
+    # This is a regression test of a problem that's caused by
+    # using the compressed file reader seek instead of the raw file
+    # I/O seek when skipping over a compressed chunk.
+    #
+    # The problem arises when the chunk is large: this file has
+    # a 256x256 array of random (uncompressible) doubles.
+    #
+    filename = pjoin(test_data_path,'test_skip_variable.mat')
+    #
+    # Prove that it loads with loadmat
+    #
+    d = loadmat(filename, struct_as_record=True)
+    assert_('first' in d)
+    assert_('second' in d)
+    #
+    # Make the factory
+    #
+    factory, file_opened = mat_reader_factory(filename, struct_as_record=True)
+    #
+    # This is where the factory breaks with an error in MatMatrixGetter.to_next
+    #
+    d = factory.get_variables('second')
+    assert_('second' in d)
+    factory.mat_stream.close()
+
+
+def test_empty_struct():
+    # ticket 885
+    filename = pjoin(test_data_path,'test_empty_struct.mat')
+    # before ticket fix, this would crash with ValueError, empty data
+    # type
+    d = loadmat(filename, struct_as_record=True)
+    a = d['a']
+    assert_equal(a.shape, (1,1))
+    assert_equal(a.dtype, np.dtype(object))
+    assert_(a[0,0] is None)
+    stream = BytesIO()
+    arr = np.array((), dtype='U')
+    # before ticket fix, this used to give data type not understood
+    savemat(stream, {'arr':arr})
+    d = loadmat(stream)
+    a2 = d['arr']
+    assert_array_equal(a2, arr)
+
+
+def test_save_empty_dict():
+    # saving empty dict also gives empty struct
+    stream = BytesIO()
+    savemat(stream, {'arr': {}})
+    d = loadmat(stream)
+    a = d['arr']
+    assert_equal(a.shape, (1,1))
+    assert_equal(a.dtype, np.dtype(object))
+    assert_(a[0,0] is None)
+
+
+def assert_any_equal(output, alternatives):
+    """ Assert `output` is equal to at least one element in `alternatives`
+    """
+    one_equal = False
+    for expected in alternatives:
+        if np.all(output == expected):
+            one_equal = True
+            break
+    assert_(one_equal)
+
+
+def test_to_writeable():
+    # Test to_writeable function
+    res = to_writeable(np.array([1]))  # pass through ndarrays
+    assert_equal(res.shape, (1,))
+    assert_array_equal(res, 1)
+    # Dict fields can be written in any order
+    expected1 = np.array([(1, 2)], dtype=[('a', '|O8'), ('b', '|O8')])
+    expected2 = np.array([(2, 1)], dtype=[('b', '|O8'), ('a', '|O8')])
+    alternatives = (expected1, expected2)
+    assert_any_equal(to_writeable({'a':1,'b':2}), alternatives)
+    # Fields with underscores discarded
+    assert_any_equal(to_writeable({'a':1,'b':2, '_c':3}), alternatives)
+    # Not-string fields discarded
+    assert_any_equal(to_writeable({'a':1,'b':2, 100:3}), alternatives)
+    # String fields that are valid Python identifiers discarded
+    assert_any_equal(to_writeable({'a':1,'b':2, '99':3}), alternatives)
+    # Object with field names is equivalent
+
+    class klass:
+        pass
+
+    c = klass
+    c.a = 1
+    c.b = 2
+    assert_any_equal(to_writeable(c), alternatives)
+    # empty list and tuple go to empty array
+    res = to_writeable([])
+    assert_equal(res.shape, (0,))
+    assert_equal(res.dtype.type, np.float64)
+    res = to_writeable(())
+    assert_equal(res.shape, (0,))
+    assert_equal(res.dtype.type, np.float64)
+    # None -> None
+    assert_(to_writeable(None) is None)
+    # String to strings
+    assert_equal(to_writeable('a string').dtype.type, np.str_)
+    # Scalars to numpy to NumPy scalars
+    res = to_writeable(1)
+    assert_equal(res.shape, ())
+    assert_equal(res.dtype.type, np.array(1).dtype.type)
+    assert_array_equal(res, 1)
+    # Empty dict returns EmptyStructMarker
+    assert_(to_writeable({}) is EmptyStructMarker)
+    # Object does not have (even empty) __dict__
+    assert_(to_writeable(object()) is None)
+    # Custom object does have empty __dict__, returns EmptyStructMarker
+
+    class C:
+        pass
+
+    assert_(to_writeable(c()) is EmptyStructMarker)
+    # dict keys with legal characters are convertible
+    res = to_writeable({'a': 1})['a']
+    assert_equal(res.shape, (1,))
+    assert_equal(res.dtype.type, np.object_)
+    # Only fields with illegal characters, falls back to EmptyStruct
+    assert_(to_writeable({'1':1}) is EmptyStructMarker)
+    assert_(to_writeable({'_a':1}) is EmptyStructMarker)
+    # Unless there are valid fields, in which case structured array
+    assert_equal(to_writeable({'1':1, 'f': 2}),
+                 np.array([(2,)], dtype=[('f', '|O8')]))
+
+
+def test_recarray():
+    # check roundtrip of structured array
+    dt = [('f1', 'f8'),
+          ('f2', 'S10')]
+    arr = np.zeros((2,), dtype=dt)
+    arr[0]['f1'] = 0.5
+    arr[0]['f2'] = 'python'
+    arr[1]['f1'] = 99
+    arr[1]['f2'] = 'not perl'
+    stream = BytesIO()
+    savemat(stream, {'arr': arr})
+    d = loadmat(stream, struct_as_record=False)
+    a20 = d['arr'][0,0]
+    assert_equal(a20.f1, 0.5)
+    assert_equal(a20.f2, 'python')
+    d = loadmat(stream, struct_as_record=True)
+    a20 = d['arr'][0,0]
+    assert_equal(a20['f1'], 0.5)
+    assert_equal(a20['f2'], 'python')
+    # structs always come back as object types
+    assert_equal(a20.dtype, np.dtype([('f1', 'O'),
+                                      ('f2', 'O')]))
+    a21 = d['arr'].flat[1]
+    assert_equal(a21['f1'], 99)
+    assert_equal(a21['f2'], 'not perl')
+
+
+def test_save_object():
+    class C:
+        pass
+    c = C()
+    c.field1 = 1
+    c.field2 = 'a string'
+    stream = BytesIO()
+    savemat(stream, {'c': c})
+    d = loadmat(stream, struct_as_record=False)
+    c2 = d['c'][0,0]
+    assert_equal(c2.field1, 1)
+    assert_equal(c2.field2, 'a string')
+    d = loadmat(stream, struct_as_record=True)
+    c2 = d['c'][0,0]
+    assert_equal(c2['field1'], 1)
+    assert_equal(c2['field2'], 'a string')
+
+
+def test_read_opts():
+    # tests if read is seeing option sets, at initialization and after
+    # initialization
+    arr = np.arange(6).reshape(1,6)
+    stream = BytesIO()
+    savemat(stream, {'a': arr})
+    rdr = MatFile5Reader(stream)
+    back_dict = rdr.get_variables()
+    rarr = back_dict['a']
+    assert_array_equal(rarr, arr)
+    rdr = MatFile5Reader(stream, squeeze_me=True)
+    assert_array_equal(rdr.get_variables()['a'], arr.reshape((6,)))
+    rdr.squeeze_me = False
+    assert_array_equal(rarr, arr)
+    rdr = MatFile5Reader(stream, byte_order=boc.native_code)
+    assert_array_equal(rdr.get_variables()['a'], arr)
+    # inverted byte code leads to error on read because of swapped
+    # header etc.
+    rdr = MatFile5Reader(stream, byte_order=boc.swapped_code)
+    assert_raises(Exception, rdr.get_variables)
+    rdr.byte_order = boc.native_code
+    assert_array_equal(rdr.get_variables()['a'], arr)
+    arr = np.array(['a string'])
+    stream.truncate(0)
+    stream.seek(0)
+    savemat(stream, {'a': arr})
+    rdr = MatFile5Reader(stream)
+    assert_array_equal(rdr.get_variables()['a'], arr)
+    rdr = MatFile5Reader(stream, chars_as_strings=False)
+    carr = np.atleast_2d(np.array(list(arr.item()), dtype='U1'))
+    assert_array_equal(rdr.get_variables()['a'], carr)
+    rdr.chars_as_strings = True
+    assert_array_equal(rdr.get_variables()['a'], arr)
+
+
+def test_empty_string():
+    # make sure reading empty string does not raise error
+    estring_fname = pjoin(test_data_path, 'single_empty_string.mat')
+    fp = open(estring_fname, 'rb')
+    rdr = MatFile5Reader(fp)
+    d = rdr.get_variables()
+    fp.close()
+    assert_array_equal(d['a'], np.array([], dtype='U1'))
+    # Empty string round trip. Matlab cannot distinguish
+    # between a string array that is empty, and a string array
+    # containing a single empty string, because it stores strings as
+    # arrays of char. There is no way of having an array of char that
+    # is not empty, but contains an empty string.
+    stream = BytesIO()
+    savemat(stream, {'a': np.array([''])})
+    rdr = MatFile5Reader(stream)
+    d = rdr.get_variables()
+    assert_array_equal(d['a'], np.array([], dtype='U1'))
+    stream.truncate(0)
+    stream.seek(0)
+    savemat(stream, {'a': np.array([], dtype='U1')})
+    rdr = MatFile5Reader(stream)
+    d = rdr.get_variables()
+    assert_array_equal(d['a'], np.array([], dtype='U1'))
+    stream.close()
+
+
+def test_corrupted_data():
+    import zlib
+    for exc, fname in [(ValueError, 'corrupted_zlib_data.mat'),
+                       (zlib.error, 'corrupted_zlib_checksum.mat')]:
+        with open(pjoin(test_data_path, fname), 'rb') as fp:
+            rdr = MatFile5Reader(fp)
+            assert_raises(exc, rdr.get_variables)
+
+
+def test_corrupted_data_check_can_be_disabled():
+    with open(pjoin(test_data_path, 'corrupted_zlib_data.mat'), 'rb') as fp:
+        rdr = MatFile5Reader(fp, verify_compressed_data_integrity=False)
+        rdr.get_variables()
+
+
+def test_read_both_endian():
+    # make sure big- and little- endian data is read correctly
+    for fname in ('big_endian.mat', 'little_endian.mat'):
+        fp = open(pjoin(test_data_path, fname), 'rb')
+        rdr = MatFile5Reader(fp)
+        d = rdr.get_variables()
+        fp.close()
+        assert_array_equal(d['strings'],
+                           np.array([['hello'],
+                                     ['world']], dtype=object))
+        assert_array_equal(d['floats'],
+                           np.array([[2., 3.],
+                                     [3., 4.]], dtype=np.float32))
+
+
+def test_write_opposite_endian():
+    # We don't support writing opposite endian .mat files, but we need to behave
+    # correctly if the user supplies an other-endian NumPy array to write out.
+    float_arr = np.array([[2., 3.],
+                          [3., 4.]])
+    int_arr = np.arange(6).reshape((2, 3))
+    uni_arr = np.array(['hello', 'world'], dtype='U')
+    stream = BytesIO()
+    savemat(stream, {
+        'floats': float_arr.byteswap().view(float_arr.dtype.newbyteorder()),
+        'ints': int_arr.byteswap().view(int_arr.dtype.newbyteorder()),
+        'uni_arr': uni_arr.byteswap().view(uni_arr.dtype.newbyteorder()),
+    })
+    rdr = MatFile5Reader(stream)
+    d = rdr.get_variables()
+    assert_array_equal(d['floats'], float_arr)
+    assert_array_equal(d['ints'], int_arr)
+    assert_array_equal(d['uni_arr'], uni_arr)
+    stream.close()
+
+
+def test_logical_array():
+    # The roundtrip test doesn't verify that we load the data up with the
+    # correct (bool) dtype
+    with open(pjoin(test_data_path, 'testbool_8_WIN64.mat'), 'rb') as fobj:
+        rdr = MatFile5Reader(fobj, mat_dtype=True)
+        d = rdr.get_variables()
+    x = np.array([[True], [False]], dtype=np.bool_)
+    assert_array_equal(d['testbools'], x)
+    assert_equal(d['testbools'].dtype, x.dtype)
+
+
+def test_logical_out_type():
+    # Confirm that bool type written as uint8, uint8 class
+    # See gh-4022
+    stream = BytesIO()
+    barr = np.array([False, True, False])
+    savemat(stream, {'barray': barr})
+    stream.seek(0)
+    reader = MatFile5Reader(stream)
+    reader.initialize_read()
+    reader.read_file_header()
+    hdr, _ = reader.read_var_header()
+    assert_equal(hdr.mclass, mio5p.mxUINT8_CLASS)
+    assert_equal(hdr.is_logical, True)
+    var = reader.read_var_array(hdr, False)
+    assert_equal(var.dtype.type, np.uint8)
+
+
+def test_roundtrip_zero_dimensions():
+    stream = BytesIO()
+    savemat(stream, {'d':np.empty((10, 0))})
+    d = loadmat(stream)
+    assert d['d'].shape == (10, 0)
+
+
+def test_mat4_3d():
+    # test behavior when writing 3-D arrays to matlab 4 files
+    stream = BytesIO()
+    arr = np.arange(24).reshape((2,3,4))
+    assert_raises(ValueError, savemat, stream, {'a': arr}, True, '4')
+
+
+def test_func_read():
+    func_eg = pjoin(test_data_path, 'testfunc_7.4_GLNX86.mat')
+    fp = open(func_eg, 'rb')
+    rdr = MatFile5Reader(fp)
+    d = rdr.get_variables()
+    fp.close()
+    assert isinstance(d['testfunc'], MatlabFunction)
+    stream = BytesIO()
+    wtr = MatFile5Writer(stream)
+    assert_raises(MatWriteError, wtr.put_variables, d)
+
+
+def test_mat_dtype():
+    double_eg = pjoin(test_data_path, 'testmatrix_6.1_SOL2.mat')
+    fp = open(double_eg, 'rb')
+    rdr = MatFile5Reader(fp, mat_dtype=False)
+    d = rdr.get_variables()
+    fp.close()
+    assert_equal(d['testmatrix'].dtype.kind, 'u')
+
+    fp = open(double_eg, 'rb')
+    rdr = MatFile5Reader(fp, mat_dtype=True)
+    d = rdr.get_variables()
+    fp.close()
+    assert_equal(d['testmatrix'].dtype.kind, 'f')
+
+
+def test_sparse_in_struct():
+    # reproduces bug found by DC where Cython code was insisting on
+    # ndarray return type, but getting sparse matrix
+    st = {'sparsefield': eye_array(4)}
+    stream = BytesIO()
+    savemat(stream, {'a':st})
+    d = loadmat(stream, struct_as_record=True)
+    assert_array_equal(d['a'][0, 0]['sparsefield'].toarray(), np.eye(4))
+
+
+def test_mat_struct_squeeze():
+    stream = BytesIO()
+    in_d = {'st':{'one':1, 'two':2}}
+    savemat(stream, in_d)
+    # no error without squeeze
+    loadmat(stream, struct_as_record=False)
+    # previous error was with squeeze, with mat_struct
+    loadmat(stream, struct_as_record=False, squeeze_me=True)
+
+
+def test_scalar_squeeze():
+    stream = BytesIO()
+    in_d = {'scalar': [[0.1]], 'string': 'my name', 'st':{'one':1, 'two':2}}
+    savemat(stream, in_d)
+    out_d = loadmat(stream, squeeze_me=True)
+    assert_(isinstance(out_d['scalar'], float))
+    assert_(isinstance(out_d['string'], str))
+    assert_(isinstance(out_d['st'], np.ndarray))
+
+
+def test_str_round():
+    # from report by Angus McMorland on mailing list 3 May 2010
+    stream = BytesIO()
+    in_arr = np.array(['Hello', 'Foob'])
+    out_arr = np.array(['Hello', 'Foob '])
+    savemat(stream, dict(a=in_arr))
+    res = loadmat(stream)
+    # resulted in ['HloolFoa', 'elWrdobr']
+    assert_array_equal(res['a'], out_arr)
+    stream.truncate(0)
+    stream.seek(0)
+    # Make Fortran ordered version of string
+    in_str = in_arr.tobytes(order='F')
+    in_from_str = np.ndarray(shape=a.shape,
+                             dtype=in_arr.dtype,
+                             order='F',
+                             buffer=in_str)
+    savemat(stream, dict(a=in_from_str))
+    assert_array_equal(res['a'], out_arr)
+    # unicode save did lead to buffer too small error
+    stream.truncate(0)
+    stream.seek(0)
+    in_arr_u = in_arr.astype('U')
+    out_arr_u = out_arr.astype('U')
+    savemat(stream, {'a': in_arr_u})
+    res = loadmat(stream)
+    assert_array_equal(res['a'], out_arr_u)
+
+
+def test_fieldnames():
+    # Check that field names are as expected
+    stream = BytesIO()
+    savemat(stream, {'a': {'a':1, 'b':2}})
+    res = loadmat(stream)
+    field_names = res['a'].dtype.names
+    assert_equal(set(field_names), {'a', 'b'})
+
+
+def test_loadmat_varnames():
+    # Test that we can get just one variable from a mat file using loadmat
+    mat5_sys_names = ['__globals__',
+                      '__header__',
+                      '__version__']
+    for eg_file, sys_v_names in (
+        (pjoin(test_data_path, 'testmulti_4.2c_SOL2.mat'), []), (pjoin(
+            test_data_path, 'testmulti_7.4_GLNX86.mat'), mat5_sys_names)):
+        vars = loadmat(eg_file)
+        assert_equal(set(vars.keys()), set(['a', 'theta'] + sys_v_names))
+        vars = loadmat(eg_file, variable_names='a')
+        assert_equal(set(vars.keys()), set(['a'] + sys_v_names))
+        vars = loadmat(eg_file, variable_names=['a'])
+        assert_equal(set(vars.keys()), set(['a'] + sys_v_names))
+        vars = loadmat(eg_file, variable_names=['theta'])
+        assert_equal(set(vars.keys()), set(['theta'] + sys_v_names))
+        vars = loadmat(eg_file, variable_names=('theta',))
+        assert_equal(set(vars.keys()), set(['theta'] + sys_v_names))
+        vars = loadmat(eg_file, variable_names=[])
+        assert_equal(set(vars.keys()), set(sys_v_names))
+        vnames = ['theta']
+        vars = loadmat(eg_file, variable_names=vnames)
+        assert_equal(vnames, ['theta'])
+
+
+def test_round_types():
+    # Check that saving, loading preserves dtype in most cases
+    arr = np.arange(10)
+    stream = BytesIO()
+    for dts in ('f8','f4','i8','i4','i2','i1',
+                'u8','u4','u2','u1','c16','c8'):
+        stream.truncate(0)
+        stream.seek(0)  # needed for BytesIO in Python 3
+        savemat(stream, {'arr': arr.astype(dts)})
+        vars = loadmat(stream)
+        assert_equal(np.dtype(dts), vars['arr'].dtype)
+
+
+def test_varmats_from_mat():
+    # Make a mat file with several variables, write it, read it back
+    names_vars = (('arr', mlarr(np.arange(10))),
+                  ('mystr', mlarr('a string')),
+                  ('mynum', mlarr(10)))
+
+    # Dict like thing to give variables in defined order
+    class C:
+        def items(self):
+            return names_vars
+    stream = BytesIO()
+    savemat(stream, C())
+    varmats = varmats_from_mat(stream)
+    assert_equal(len(varmats), 3)
+    for i in range(3):
+        name, var_stream = varmats[i]
+        exp_name, exp_res = names_vars[i]
+        assert_equal(name, exp_name)
+        res = loadmat(var_stream)
+        assert_array_equal(res[name], exp_res)
+
+
+def test_one_by_zero():
+    # Test 1x0 chars get read correctly
+    func_eg = pjoin(test_data_path, 'one_by_zero_char.mat')
+    fp = open(func_eg, 'rb')
+    rdr = MatFile5Reader(fp)
+    d = rdr.get_variables()
+    fp.close()
+    assert_equal(d['var'].shape, (0,))
+
+
+def test_load_mat4_le():
+    # We were getting byte order wrong when reading little-endian floa64 dense
+    # matrices on big-endian platforms
+    mat4_fname = pjoin(test_data_path, 'test_mat4_le_floats.mat')
+    vars = loadmat(mat4_fname)
+    assert_array_equal(vars['a'], [[0.1, 1.2]])
+
+
+def test_unicode_mat4():
+    # Mat4 should save unicode as latin1
+    bio = BytesIO()
+    var = {'second_cat': 'Schrödinger'}
+    savemat(bio, var, format='4')
+    var_back = loadmat(bio)
+    assert_equal(var_back['second_cat'], var['second_cat'])
+
+
+def test_logical_sparse():
+    # Test we can read logical sparse stored in mat file as bytes.
+    # See https://github.com/scipy/scipy/issues/3539.
+    # In some files saved by MATLAB, the sparse data elements (Real Part
+    # Subelement in MATLAB speak) are stored with apparent type double
+    # (miDOUBLE) but are in fact single bytes.
+    filename = pjoin(test_data_path,'logical_sparse.mat')
+    # Before fix, this would crash with:
+    # ValueError: indices and data should have the same size
+    d = loadmat(filename, struct_as_record=True, spmatrix=False)
+    log_sp = d['sp_log_5_4']
+    assert_(issparse(log_sp) and log_sp.format == "csc")
+    assert_equal(log_sp.dtype.type, np.bool_)
+    assert_array_equal(log_sp.toarray(),
+                       [[True, True, True, False],
+                        [False, False, True, False],
+                        [False, False, True, False],
+                        [False, False, False, False],
+                        [False, False, False, False]])
+
+
+def test_empty_sparse():
+    # Can we read empty sparse matrices?
+    sio = BytesIO()
+    import scipy.sparse
+    empty_sparse = scipy.sparse.csr_array([[0,0],[0,0]])
+    savemat(sio, dict(x=empty_sparse))
+    sio.seek(0)
+
+    res = loadmat(sio, spmatrix=False)
+    assert not scipy.sparse.isspmatrix(res['x'])
+    res = loadmat(sio, spmatrix=True)
+    assert scipy.sparse.isspmatrix(res['x'])
+    res = loadmat(sio)  # chk default
+    assert scipy.sparse.isspmatrix(res['x'])
+
+    assert_array_equal(res['x'].shape, empty_sparse.shape)
+    assert_array_equal(res['x'].toarray(), 0)
+    # Do empty sparse matrices get written with max nnz 1?
+    # See https://github.com/scipy/scipy/issues/4208
+    sio.seek(0)
+    reader = MatFile5Reader(sio)
+    reader.initialize_read()
+    reader.read_file_header()
+    hdr, _ = reader.read_var_header()
+    assert_equal(hdr.nzmax, 1)
+
+
+def test_empty_mat_error():
+    # Test we get a specific warning for an empty mat file
+    sio = BytesIO()
+    assert_raises(MatReadError, loadmat, sio)
+
+
+def test_miuint32_compromise():
+    # Reader should accept miUINT32 for miINT32, but check signs
+    # mat file with miUINT32 for miINT32, but OK values
+    filename = pjoin(test_data_path, 'miuint32_for_miint32.mat')
+    res = loadmat(filename)
+    assert_equal(res['an_array'], np.arange(10)[None, :])
+    # mat file with miUINT32 for miINT32, with negative value
+    filename = pjoin(test_data_path, 'bad_miuint32.mat')
+    with assert_raises(ValueError):
+        loadmat(filename)
+
+
+def test_miutf8_for_miint8_compromise():
+    # Check reader accepts ascii as miUTF8 for array names
+    filename = pjoin(test_data_path, 'miutf8_array_name.mat')
+    res = loadmat(filename)
+    assert_equal(res['array_name'], [[1]])
+    # mat file with non-ascii utf8 name raises error
+    filename = pjoin(test_data_path, 'bad_miutf8_array_name.mat')
+    with assert_raises(ValueError):
+        loadmat(filename)
+
+
+def test_bad_utf8():
+    # Check that reader reads bad UTF with 'replace' option
+    filename = pjoin(test_data_path,'broken_utf8.mat')
+    res = loadmat(filename)
+    assert_equal(res['bad_string'],
+                 b'\x80 am broken'.decode('utf8', 'replace'))
+
+
+def test_save_unicode_field(tmpdir):
+    filename = os.path.join(str(tmpdir), 'test.mat')
+    test_dict = {'a':{'b':1,'c':'test_str'}}
+    savemat(filename, test_dict)
+
+
+def test_save_custom_array_type(tmpdir):
+    class CustomArray:
+        def __array__(self, dtype=None, copy=None):
+            return np.arange(6.0).reshape(2, 3)
+    a = CustomArray()
+    filename = os.path.join(str(tmpdir), 'test.mat')
+    savemat(filename, {'a': a})
+    out = loadmat(filename)
+    assert_array_equal(out['a'], np.array(a))
+
+
+def test_filenotfound():
+    # Check the correct error is thrown
+    assert_raises(OSError, loadmat, "NotExistentFile00.mat")
+    assert_raises(OSError, loadmat, "NotExistentFile00")
+
+
+def test_simplify_cells():
+    # Test output when simplify_cells=True
+    filename = pjoin(test_data_path, 'testsimplecell.mat')
+    res1 = loadmat(filename, simplify_cells=True)
+    res2 = loadmat(filename, simplify_cells=False)
+    assert_(isinstance(res1["s"], dict))
+    assert_(isinstance(res2["s"], np.ndarray))
+    assert_array_equal(res1["s"]["mycell"], np.array(["a", "b", "c"]))
+
+
+@pytest.mark.parametrize('version, filt, regex', [
+    (0, '_4*_*', None),
+    (1, '_5*_*', None),
+    (1, '_6*_*', None),
+    (1, '_7*_*', '^((?!hdf5).)*$'),  # not containing hdf5
+    (2, '_7*_*', '.*hdf5.*'),
+    (1, '8*_*', None),
+])
+def test_matfile_version(version, filt, regex):
+    use_filt = pjoin(test_data_path, f'test*{filt}.mat')
+    files = glob(use_filt)
+    if regex is not None:
+        files = [file for file in files if re.match(regex, file) is not None]
+    assert len(files) > 0, \
+        f"No files for version {version} using filter {filt}"
+    for file in files:
+        got_version = matfile_version(file)
+        assert got_version[0] == version
+
+
+def test_opaque():
+    """Test that we can read a MatlabOpaque object."""
+    data = loadmat(pjoin(test_data_path, 'parabola.mat'))
+    assert isinstance(data['parabola'], MatlabFunction)
+    assert isinstance(data['parabola'].item()[3].item()[3], MatlabOpaque)
+
+
+def test_opaque_simplify():
+    """Test that we can read a MatlabOpaque object when simplify_cells=True."""
+    data = loadmat(pjoin(test_data_path, 'parabola.mat'), simplify_cells=True)
+    assert isinstance(data['parabola'], MatlabFunction)
+
+
+def test_deprecation():
+    """Test that access to previous attributes still works."""
+    # This should be accessible immediately from scipy.io import
+    with assert_warns(DeprecationWarning):
+        scipy.io.matlab.mio5_params.MatlabOpaque
+
+    # These should be importable but warn as well
+    with assert_warns(DeprecationWarning):
+        from scipy.io.matlab.miobase import MatReadError  # noqa: F401
+
+
+def test_gh_17992(tmp_path):
+    rng = np.random.default_rng(12345)
+    outfile = tmp_path / "lists.mat"
+    array_one = rng.random((5,3))
+    array_two = rng.random((6,3))
+    list_of_arrays = [array_one, array_two]
+    # warning suppression only needed for NumPy < 1.24.0
+    with np.testing.suppress_warnings() as sup:
+        sup.filter(VisibleDeprecationWarning)
+        savemat(outfile,
+                {'data': list_of_arrays},
+                long_field_names=True,
+                do_compression=True)
+    # round trip check
+    new_dict = {}
+    loadmat(outfile,
+            new_dict)
+    assert_allclose(new_dict["data"][0][0], array_one)
+    assert_allclose(new_dict["data"][0][1], array_two)
+
+
+def test_gh_19659(tmp_path):
+    d = {
+        "char_array": np.array([list("char"), list("char")], dtype="U1"),
+        "string_array": np.array(["string", "string"]),
+        }
+    outfile = tmp_path / "tmp.mat"
+    # should not error:
+    savemat(outfile, d, format="4")
+
+
+def test_large_m4():
+    # Test we can read a Matlab 4 file with array > 2GB.
+    # (In fact, test we get the correct error from reading a truncated
+    # version).
+    # See https://github.com/scipy/scipy/issues/21256
+    # Data file is first 1024 bytes of:
+    # >>> a = np.zeros((134217728, 3))
+    # >>> siom.savemat('big_m4.mat', {'a': a}, format='4')
+    truncated_mat = pjoin(test_data_path, 'debigged_m4.mat')
+    match = ("Not enough bytes to read matrix 'a';"
+             if np.intp == np.int64 else
+             "Variable 'a' has byte length longer than largest possible")
+    with pytest.raises(ValueError, match=match):
+        loadmat(truncated_mat)
+
+
+def test_gh_19223():
+    from scipy.io.matlab import varmats_from_mat  # noqa: F401
+
+def test_corrupt_files():
+    # Test we can detect truncated or corrupt (all zero) files.
+    for n in (2, 4, 10, 19):
+        with pytest.raises(MatReadError,
+                           match="Mat file appears to be truncated"):
+            loadmat(BytesIO(b'\x00' * n))
+    with pytest.raises(MatReadError,
+                       match="Mat file appears to be corrupt"):
+        loadmat(BytesIO(b'\x00' * 20))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio5_utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio5_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..b3f27114c4a4ed10c1a2526058f4d0dbbd0e5638
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio5_utils.py
@@ -0,0 +1,179 @@
+""" Testing mio5_utils Cython module
+
+"""
+import sys
+
+from io import BytesIO
+
+import numpy as np
+
+from numpy.testing import assert_array_equal, assert_equal, assert_
+from pytest import raises as assert_raises
+
+import scipy.io.matlab._byteordercodes as boc
+import scipy.io.matlab._streams as streams
+import scipy.io.matlab._mio5_params as mio5p
+import scipy.io.matlab._mio5_utils as m5u
+
+
+def test_byteswap():
+    for val in (
+        1,
+        0x100,
+        0x10000):
+        a = np.array(val, dtype=np.uint32)
+        b = a.byteswap()
+        c = m5u.byteswap_u4(a)
+        assert_equal(b.item(), c)
+        d = m5u.byteswap_u4(c)
+        assert_equal(a.item(), d)
+
+
+def _make_tag(base_dt, val, mdtype, sde=False):
+    ''' Makes a simple matlab tag, full or sde '''
+    base_dt = np.dtype(base_dt)
+    bo = boc.to_numpy_code(base_dt.byteorder)
+    byte_count = base_dt.itemsize
+    if not sde:
+        udt = bo + 'u4'
+        padding = 8 - (byte_count % 8)
+        all_dt = [('mdtype', udt),
+                  ('byte_count', udt),
+                  ('val', base_dt)]
+        if padding:
+            all_dt.append(('padding', 'u1', padding))
+    else:  # is sde
+        udt = bo + 'u2'
+        padding = 4-byte_count
+        if bo == '<':  # little endian
+            all_dt = [('mdtype', udt),
+                      ('byte_count', udt),
+                      ('val', base_dt)]
+        else:  # big endian
+            all_dt = [('byte_count', udt),
+                      ('mdtype', udt),
+                      ('val', base_dt)]
+        if padding:
+            all_dt.append(('padding', 'u1', padding))
+    tag = np.zeros((1,), dtype=all_dt)
+    tag['mdtype'] = mdtype
+    tag['byte_count'] = byte_count
+    tag['val'] = val
+    return tag
+
+
+def _write_stream(stream, *strings):
+    stream.truncate(0)
+    stream.seek(0)
+    for s in strings:
+        stream.write(s)
+    stream.seek(0)
+
+
+def _make_readerlike(stream, byte_order=boc.native_code):
+    class R:
+        pass
+    r = R()
+    r.mat_stream = stream
+    r.byte_order = byte_order
+    r.struct_as_record = True
+    r.uint16_codec = sys.getdefaultencoding()
+    r.chars_as_strings = False
+    r.mat_dtype = False
+    r.squeeze_me = False
+    return r
+
+
+def test_read_tag():
+    # mainly to test errors
+    # make reader-like thing
+    str_io = BytesIO()
+    r = _make_readerlike(str_io)
+    c_reader = m5u.VarReader5(r)
+    # This works for StringIO but _not_ BytesIO
+    assert_raises(OSError, c_reader.read_tag)
+    # bad SDE
+    tag = _make_tag('i4', 1, mio5p.miINT32, sde=True)
+    tag['byte_count'] = 5
+    _write_stream(str_io, tag.tobytes())
+    assert_raises(ValueError, c_reader.read_tag)
+
+
+def test_read_stream():
+    tag = _make_tag('i4', 1, mio5p.miINT32, sde=True)
+    tag_str = tag.tobytes()
+    str_io = BytesIO(tag_str)
+    st = streams.make_stream(str_io)
+    s = streams._read_into(st, tag.itemsize)
+    assert_equal(s, tag.tobytes())
+
+
+def test_read_numeric():
+    # make reader-like thing
+    str_io = BytesIO()
+    r = _make_readerlike(str_io)
+    # check simplest of tags
+    for base_dt, val, mdtype in (('u2', 30, mio5p.miUINT16),
+                                 ('i4', 1, mio5p.miINT32),
+                                 ('i2', -1, mio5p.miINT16)):
+        for byte_code in ('<', '>'):
+            r.byte_order = byte_code
+            c_reader = m5u.VarReader5(r)
+            assert_equal(c_reader.little_endian, byte_code == '<')
+            assert_equal(c_reader.is_swapped, byte_code != boc.native_code)
+            for sde_f in (False, True):
+                dt = np.dtype(base_dt).newbyteorder(byte_code)
+                a = _make_tag(dt, val, mdtype, sde_f)
+                a_str = a.tobytes()
+                _write_stream(str_io, a_str)
+                el = c_reader.read_numeric()
+                assert_equal(el, val)
+                # two sequential reads
+                _write_stream(str_io, a_str, a_str)
+                el = c_reader.read_numeric()
+                assert_equal(el, val)
+                el = c_reader.read_numeric()
+                assert_equal(el, val)
+
+
+def test_read_numeric_writeable():
+    # make reader-like thing
+    str_io = BytesIO()
+    r = _make_readerlike(str_io, '<')
+    c_reader = m5u.VarReader5(r)
+    dt = np.dtype(''
+    rdr.mat_stream.read(4)  # presumably byte padding
+    mdict = read_minimat_vars(rdr)
+    fp.close()
+    return mdict
+
+
+def test_jottings():
+    # example
+    fname = os.path.join(test_data_path, 'parabola.mat')
+    read_workspace_vars(fname)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio_utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..1d19a9797faa2221307a7330b69fffa26410f624
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_mio_utils.py
@@ -0,0 +1,45 @@
+""" Testing
+
+"""
+
+import numpy as np
+
+from numpy.testing import assert_array_equal, assert_
+
+from scipy.io.matlab._mio_utils import squeeze_element, chars_to_strings
+
+
+def test_squeeze_element():
+    a = np.zeros((1,3))
+    assert_array_equal(np.squeeze(a), squeeze_element(a))
+    # 0-D output from squeeze gives scalar
+    sq_int = squeeze_element(np.zeros((1,1), dtype=float))
+    assert_(isinstance(sq_int, float))
+    # Unless it's a structured array
+    sq_sa = squeeze_element(np.zeros((1,1),dtype=[('f1', 'f')]))
+    assert_(isinstance(sq_sa, np.ndarray))
+    # Squeezing empty arrays maintain their dtypes.
+    sq_empty = squeeze_element(np.empty(0, np.uint8))
+    assert sq_empty.dtype == np.uint8
+
+
+def test_chars_strings():
+    # chars as strings
+    strings = ['learn ', 'python', 'fast  ', 'here  ']
+    str_arr = np.array(strings, dtype='U6')  # shape (4,)
+    chars = [list(s) for s in strings]
+    char_arr = np.array(chars, dtype='U1')  # shape (4,6)
+    assert_array_equal(chars_to_strings(char_arr), str_arr)
+    ca2d = char_arr.reshape((2,2,6))
+    sa2d = str_arr.reshape((2,2))
+    assert_array_equal(chars_to_strings(ca2d), sa2d)
+    ca3d = char_arr.reshape((1,2,2,6))
+    sa3d = str_arr.reshape((1,2,2))
+    assert_array_equal(chars_to_strings(ca3d), sa3d)
+    # Fortran ordered arrays
+    char_arrf = np.array(chars, dtype='U1', order='F')  # shape (4,6)
+    assert_array_equal(chars_to_strings(char_arrf), str_arr)
+    # empty array
+    arr = np.array([['']], dtype='U1')
+    out_arr = np.array([''], dtype='U1')
+    assert_array_equal(chars_to_strings(arr), out_arr)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_miobase.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_miobase.py
new file mode 100644
index 0000000000000000000000000000000000000000..d8c8eb2a56aaa1d1de77bfb90c859ed0af0b7bc4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_miobase.py
@@ -0,0 +1,32 @@
+""" Testing miobase module
+"""
+
+import numpy as np
+
+from numpy.testing import assert_equal
+from pytest import raises as assert_raises
+
+from scipy.io.matlab._miobase import matdims
+
+
+def test_matdims():
+    # Test matdims dimension finder
+    assert_equal(matdims(np.array(1)), (1, 1))  # NumPy scalar
+    assert_equal(matdims(np.array([1])), (1, 1))  # 1-D array, 1 element
+    assert_equal(matdims(np.array([1,2])), (2, 1))  # 1-D array, 2 elements
+    assert_equal(matdims(np.array([[2],[3]])), (2, 1))  # 2-D array, column vector
+    assert_equal(matdims(np.array([[2,3]])), (1, 2))  # 2-D array, row vector
+    # 3d array, rowish vector
+    assert_equal(matdims(np.array([[[2,3]]])), (1, 1, 2))
+    assert_equal(matdims(np.array([])), (0, 0))  # empty 1-D array
+    assert_equal(matdims(np.array([[]])), (1, 0))  # empty 2-D array
+    assert_equal(matdims(np.array([[[]]])), (1, 1, 0))  # empty 3-D array
+    assert_equal(matdims(np.empty((1, 0, 1))), (1, 0, 1))  # empty 3-D array
+    # Optional argument flips 1-D shape behavior.
+    assert_equal(matdims(np.array([1,2]), 'row'), (1, 2))  # 1-D array, 2 elements
+    # The argument has to make sense though
+    assert_raises(ValueError, matdims, np.array([1,2]), 'bizarre')
+    # Check empty sparse matrices get their own shape
+    from scipy.sparse import csr_array, csc_array
+    assert_equal(matdims(csr_array(np.zeros((3, 3)))), (3, 3))
+    assert_equal(matdims(csc_array(np.zeros((2, 2)))), (2, 2))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_pathological.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_pathological.py
new file mode 100644
index 0000000000000000000000000000000000000000..c5c86decb7e90f69f293e90eba74fb47dd4f1277
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_pathological.py
@@ -0,0 +1,33 @@
+""" Test reading of files not conforming to matlab specification
+
+We try and read any file that matlab reads, these files included
+"""
+from os.path import dirname, join as pjoin
+
+from numpy.testing import assert_
+from pytest import raises as assert_raises
+
+from scipy.io.matlab._mio import loadmat
+
+TEST_DATA_PATH = pjoin(dirname(__file__), 'data')
+
+
+def test_multiple_fieldnames():
+    # Example provided by Dharhas Pothina
+    # Extracted using mio5.varmats_from_mat
+    multi_fname = pjoin(TEST_DATA_PATH, 'nasty_duplicate_fieldnames.mat')
+    vars = loadmat(multi_fname)
+    funny_names = vars['Summary'].dtype.names
+    assert_({'_1_Station_Q', '_2_Station_Q',
+                     '_3_Station_Q'}.issubset(funny_names))
+
+
+def test_malformed1():
+    # Example from gh-6072
+    # Contains malformed header data, which previously resulted into a
+    # buffer overflow.
+    #
+    # Should raise an exception, not segfault
+    fname = pjoin(TEST_DATA_PATH, 'malformed1.mat')
+    with open(fname, 'rb') as f:
+        assert_raises(ValueError, loadmat, f)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_streams.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_streams.py
new file mode 100644
index 0000000000000000000000000000000000000000..d8768d8e9251c6e47debeb65dff3ec056d38ee56
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/matlab/tests/test_streams.py
@@ -0,0 +1,232 @@
+""" Testing
+
+"""
+
+import os
+import zlib
+
+from io import BytesIO
+
+
+from tempfile import mkstemp
+from contextlib import contextmanager
+
+import numpy as np
+
+from numpy.testing import assert_, assert_equal
+from pytest import raises as assert_raises
+
+from scipy.io.matlab._streams import (make_stream,
+    GenericStream, ZlibInputStream,
+    _read_into, _read_string, BLOCK_SIZE)
+
+
+@contextmanager
+def setup_test_file():
+    val = b'a\x00string'
+    fd, fname = mkstemp()
+
+    with os.fdopen(fd, 'wb') as fs:
+        fs.write(val)
+    with open(fname, 'rb') as fs:
+        gs = BytesIO(val)
+        cs = BytesIO(val)
+        yield fs, gs, cs
+    os.unlink(fname)
+
+
+def test_make_stream():
+    with setup_test_file() as (fs, gs, cs):
+        # test stream initialization
+        assert_(isinstance(make_stream(gs), GenericStream))
+
+
+def test_tell_seek():
+    with setup_test_file() as (fs, gs, cs):
+        for s in (fs, gs, cs):
+            st = make_stream(s)
+            res = st.seek(0)
+            assert_equal(res, 0)
+            assert_equal(st.tell(), 0)
+            res = st.seek(5)
+            assert_equal(res, 0)
+            assert_equal(st.tell(), 5)
+            res = st.seek(2, 1)
+            assert_equal(res, 0)
+            assert_equal(st.tell(), 7)
+            res = st.seek(-2, 2)
+            assert_equal(res, 0)
+            assert_equal(st.tell(), 6)
+
+
+def test_read():
+    with setup_test_file() as (fs, gs, cs):
+        for s in (fs, gs, cs):
+            st = make_stream(s)
+            st.seek(0)
+            res = st.read(-1)
+            assert_equal(res, b'a\x00string')
+            st.seek(0)
+            res = st.read(4)
+            assert_equal(res, b'a\x00st')
+            # read into
+            st.seek(0)
+            res = _read_into(st, 4)
+            assert_equal(res, b'a\x00st')
+            res = _read_into(st, 4)
+            assert_equal(res, b'ring')
+            assert_raises(OSError, _read_into, st, 2)
+            # read alloc
+            st.seek(0)
+            res = _read_string(st, 4)
+            assert_equal(res, b'a\x00st')
+            res = _read_string(st, 4)
+            assert_equal(res, b'ring')
+            assert_raises(OSError, _read_string, st, 2)
+
+
+class TestZlibInputStream:
+    def _get_data(self, size):
+        data = np.random.randint(0, 256, size).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data)
+        stream = BytesIO(compressed_data)
+        return stream, len(compressed_data), data
+
+    def test_read(self):
+        SIZES = [0, 1, 10, BLOCK_SIZE//2, BLOCK_SIZE-1,
+                 BLOCK_SIZE, BLOCK_SIZE+1, 2*BLOCK_SIZE-1]
+
+        READ_SIZES = [BLOCK_SIZE//2, BLOCK_SIZE-1,
+                      BLOCK_SIZE, BLOCK_SIZE+1]
+
+        def check(size, read_size):
+            compressed_stream, compressed_data_len, data = self._get_data(size)
+            stream = ZlibInputStream(compressed_stream, compressed_data_len)
+            data2 = b''
+            so_far = 0
+            while True:
+                block = stream.read(min(read_size,
+                                        size - so_far))
+                if not block:
+                    break
+                so_far += len(block)
+                data2 += block
+            assert_equal(data, data2)
+
+        for size in SIZES:
+            for read_size in READ_SIZES:
+                check(size, read_size)
+
+    def test_read_max_length(self):
+        size = 1234
+        data = np.random.randint(0, 256, size).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data)
+        compressed_stream = BytesIO(compressed_data + b"abbacaca")
+        stream = ZlibInputStream(compressed_stream, len(compressed_data))
+
+        stream.read(len(data))
+        assert_equal(compressed_stream.tell(), len(compressed_data))
+
+        assert_raises(OSError, stream.read, 1)
+
+    def test_read_bad_checksum(self):
+        data = np.random.randint(0, 256, 10).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data)
+
+        # break checksum
+        compressed_data = (compressed_data[:-1]
+                           + bytes([(compressed_data[-1] + 1) & 255]))
+
+        compressed_stream = BytesIO(compressed_data)
+        stream = ZlibInputStream(compressed_stream, len(compressed_data))
+
+        assert_raises(zlib.error, stream.read, len(data))
+
+    def test_seek(self):
+        compressed_stream, compressed_data_len, data = self._get_data(1024)
+
+        stream = ZlibInputStream(compressed_stream, compressed_data_len)
+
+        stream.seek(123)
+        p = 123
+        assert_equal(stream.tell(), p)
+        d1 = stream.read(11)
+        assert_equal(d1, data[p:p+11])
+
+        stream.seek(321, 1)
+        p = 123+11+321
+        assert_equal(stream.tell(), p)
+        d2 = stream.read(21)
+        assert_equal(d2, data[p:p+21])
+
+        stream.seek(641, 0)
+        p = 641
+        assert_equal(stream.tell(), p)
+        d3 = stream.read(11)
+        assert_equal(d3, data[p:p+11])
+
+        assert_raises(OSError, stream.seek, 10, 2)
+        assert_raises(OSError, stream.seek, -1, 1)
+        assert_raises(ValueError, stream.seek, 1, 123)
+
+        stream.seek(10000, 1)
+        assert_raises(OSError, stream.read, 12)
+
+    def test_seek_bad_checksum(self):
+        data = np.random.randint(0, 256, 10).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data)
+
+        # break checksum
+        compressed_data = (compressed_data[:-1]
+                           + bytes([(compressed_data[-1] + 1) & 255]))
+
+        compressed_stream = BytesIO(compressed_data)
+        stream = ZlibInputStream(compressed_stream, len(compressed_data))
+
+        assert_raises(zlib.error, stream.seek, len(data))
+
+    def test_all_data_read(self):
+        compressed_stream, compressed_data_len, data = self._get_data(1024)
+        stream = ZlibInputStream(compressed_stream, compressed_data_len)
+        assert_(not stream.all_data_read())
+        stream.seek(512)
+        assert_(not stream.all_data_read())
+        stream.seek(1024)
+        assert_(stream.all_data_read())
+
+    def test_all_data_read_overlap(self):
+        COMPRESSION_LEVEL = 6
+
+        data = np.arange(33707000).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data, COMPRESSION_LEVEL)
+        compressed_data_len = len(compressed_data)
+
+        # check that part of the checksum overlaps
+        assert_(compressed_data_len == BLOCK_SIZE + 2)
+
+        compressed_stream = BytesIO(compressed_data)
+        stream = ZlibInputStream(compressed_stream, compressed_data_len)
+        assert_(not stream.all_data_read())
+        stream.seek(len(data))
+        assert_(stream.all_data_read())
+
+    def test_all_data_read_bad_checksum(self):
+        COMPRESSION_LEVEL = 6
+
+        data = np.arange(33707000).astype(np.uint8).tobytes()
+        compressed_data = zlib.compress(data, COMPRESSION_LEVEL)
+        compressed_data_len = len(compressed_data)
+
+        # check that part of the checksum overlaps
+        assert_(compressed_data_len == BLOCK_SIZE + 2)
+
+        # break checksum
+        compressed_data = (compressed_data[:-1]
+                           + bytes([(compressed_data[-1] + 1) & 255]))
+
+        compressed_stream = BytesIO(compressed_data)
+        stream = ZlibInputStream(compressed_stream, compressed_data_len)
+        assert_(not stream.all_data_read())
+        stream.seek(len(data))
+
+        assert_raises(zlib.error, stream.all_data_read)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/mmio.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/mmio.py
new file mode 100644
index 0000000000000000000000000000000000000000..67cf0684cbf9468468027957a5b7f3da2c43c845
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/mmio.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ["mminfo", "mmread", "mmwrite"]  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io", module="mmio",
+                                   private_modules=["_mmio"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/netcdf.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/netcdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..c1f119dd2bad72d772c3d1db6ceec9fd3d91316d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/netcdf.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.io` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = ["netcdf_file", "netcdf_variable"]  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="io", module="netcdf",
+                                   private_modules=["_netcdf"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/Transparent Busy.ani b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/Transparent Busy.ani
new file mode 100644
index 0000000000000000000000000000000000000000..3be500032786398c3efdbd9f873f705b6c1636bd
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/Transparent Busy.ani differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_1d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_1d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..619a1259670a361ac76ffa86c481a813dbaec07a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_1d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_2d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_2d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..804d8b1a8a90636c880e974b6f85bd385033306b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_2d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..3fa56c450eaa916d9c91b492ba17e7e843df2d53
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_4d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_4d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..4bb951e274a399f091ff70b639d6e3b55ee1e122
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_4d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_5d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_5d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..2854dbc8b1e53f298ac3b135eac1f06e73940152
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_5d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_6d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_6d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..91588d348d5f89af354209840062202d5b28c1df
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_6d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_7d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_7d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..3e978fad540a8979435d4561de151573696affd8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_7d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_8d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_8d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..f699fe2427dfe876283de0fcade2c2325a262061
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_8d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_1d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_1d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..8e3a402c60a515149811e2ca21628e97180c4956
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_1d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_2d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_2d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..dd3504f0ecfaed178ace02e1a8a84650111c3936
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_2d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..285da7f78ffbbf2155fd2e4e648f19a1d3a42ac3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_4d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_4d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..d99fa48f0a43ec06c3101560f9cade829c8b1940
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_4d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_5d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_5d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..de5e984e49f507ae550b1ae2fd54b799e742a195
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_5d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_6d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_6d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..bb76671a65be41fd2a426146c6c366f1e7fb07c3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_6d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_7d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_7d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..995d23c6ed05b095442b6247b09191126f797f23
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_7d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_8d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_8d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..4249ec62119e264d55a81d3faf9c87dcaed1c7c8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/array_float32_pointer_8d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_1.nc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_1.nc
new file mode 100644
index 0000000000000000000000000000000000000000..5775622d0ef85828b436dffcd21366f7538fc55c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_1.nc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_2.nc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_2.nc
new file mode 100644
index 0000000000000000000000000000000000000000..07db1cd986a4c3b9929c01c1f22bcc3f562b1c16
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_2.nc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_3_maskedvals.nc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_3_maskedvals.nc
new file mode 100644
index 0000000000000000000000000000000000000000..57f8bf9da3bca295c15508963c77a870222af0bc
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/example_3_maskedvals.nc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-3x3d-2i.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-3x3d-2i.dat
new file mode 100644
index 0000000000000000000000000000000000000000..87731eb9d4b1f2ac827a212436fe6de175431e11
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-3x3d-2i.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-mixed.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-mixed.dat
new file mode 100644
index 0000000000000000000000000000000000000000..a165a7a30424b20af9a3a0636c5e655239ea6fa5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-mixed.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-11x1x10.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-11x1x10.dat
new file mode 100644
index 0000000000000000000000000000000000000000..c3bb9dcbe50ef784ce3282b28e53f4c40beb48ce
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-11x1x10.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-15x10x22.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-15x10x22.dat
new file mode 100644
index 0000000000000000000000000000000000000000..351801fd47a2e3e48d9b63034fbae28f8318c9f9
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-15x10x22.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x1.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x1.dat
new file mode 100644
index 0000000000000000000000000000000000000000..64bf92f74a457d2f4bc42798493db15cc3ab1008
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x1.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x5.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x5.dat
new file mode 100644
index 0000000000000000000000000000000000000000..3d3f27f88eef4e02451d18204cdcfd51f96f6d15
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x5.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x7.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x7.dat
new file mode 100644
index 0000000000000000000000000000000000000000..0bd683096f18eadceb7168f811c75bf072baecfe
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x1x7.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x3x5.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x3x5.dat
new file mode 100644
index 0000000000000000000000000000000000000000..25269ff9ea4f6dd3f8a9ca0c8ad27d399e4248f5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-sf8-1x3x5.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-11x1x10.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-11x1x10.dat
new file mode 100644
index 0000000000000000000000000000000000000000..9850de37cf86af622b759625c15e6b1a9477ce47
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-11x1x10.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-15x10x22.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-15x10x22.dat
new file mode 100644
index 0000000000000000000000000000000000000000..98c09c2dff6e1ef605e25ed1d00afe94597abddc
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-15x10x22.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x1.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x1.dat
new file mode 100644
index 0000000000000000000000000000000000000000..959098d2a9cdd6140758843e059d4ca529b14279
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x1.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x5.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x5.dat
new file mode 100644
index 0000000000000000000000000000000000000000..49c0ec1d18d9f08111fe2d2a269ed407da71b158
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x5.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x7.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x7.dat
new file mode 100644
index 0000000000000000000000000000000000000000..bb936b8789920ce18281fa754a5c048b31e59ba8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x1x7.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x3x5.dat b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x3x5.dat
new file mode 100644
index 0000000000000000000000000000000000000000..cb3e9e4876249f42924a43232b74f05b91123815
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/fortran-si4-1x3x5.dat differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/invalid_pointer.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/invalid_pointer.sav
new file mode 100644
index 0000000000000000000000000000000000000000..d53893c6c734e6c7771e08042c16874623dc6f0e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/invalid_pointer.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/null_pointer.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/null_pointer.sav
new file mode 100644
index 0000000000000000000000000000000000000000..8cee5ebecc3bef248ed37c438e0731160b31a310
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/null_pointer.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte.sav
new file mode 100644
index 0000000000000000000000000000000000000000..e4027b3cf302b8610b87d9ef8b0aac39d5a40ef9
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte_descr.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte_descr.sav
new file mode 100644
index 0000000000000000000000000000000000000000..182e29bc57dc05154388553a71876820025bca8d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_byte_descr.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex32.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex32.sav
new file mode 100644
index 0000000000000000000000000000000000000000..593e8c6208ab0bf3aa869de89e213b8aa9f8c071
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex32.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex64.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex64.sav
new file mode 100644
index 0000000000000000000000000000000000000000..edb19d388afbaff44e5f0883978e6a74e9755613
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_complex64.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float32.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float32.sav
new file mode 100644
index 0000000000000000000000000000000000000000..be9e3877ea845da76d9466c14d70c4cce882368c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float32.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float64.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float64.sav
new file mode 100644
index 0000000000000000000000000000000000000000..9680b2878c6008a27c8fc9ae6966903ff936cc4a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_float64.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_heap_pointer.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_heap_pointer.sav
new file mode 100644
index 0000000000000000000000000000000000000000..d02b1756ac043a4ba6119acb28ef34c40359a4dd
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_heap_pointer.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int16.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int16.sav
new file mode 100644
index 0000000000000000000000000000000000000000..603525694cc307d47412717c4c2f85ddc960897b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int16.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int32.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int32.sav
new file mode 100644
index 0000000000000000000000000000000000000000..40210b889402c0f27562296ab39ce1a714f0d0ef
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int32.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int64.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int64.sav
new file mode 100644
index 0000000000000000000000000000000000000000..c91cd0a561e011a2f18c86119e45392fbc0be825
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_int64.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_string.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_string.sav
new file mode 100644
index 0000000000000000000000000000000000000000..ee6e69fe8461edfa580f682761118c8afe2add3a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_string.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint16.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint16.sav
new file mode 100644
index 0000000000000000000000000000000000000000..759c2e64fa034c6ddbdbe6181efae1e699a0c314
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint16.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint32.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint32.sav
new file mode 100644
index 0000000000000000000000000000000000000000..74dec7b8933418d30d17c83d617443a73ceef0c6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint32.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint64.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint64.sav
new file mode 100644
index 0000000000000000000000000000000000000000..fc9da5796eab6ce9fb59488b836ba2f567de7b25
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/scalar_uint64.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays.sav
new file mode 100644
index 0000000000000000000000000000000000000000..40c9cd330e0c731968d71dbbfeae9bd8c4a745a2
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_byte_idl80.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_byte_idl80.sav
new file mode 100644
index 0000000000000000000000000000000000000000..f1aa416f8e661893be282a490005536953d4b7af
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_byte_idl80.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated.sav
new file mode 100644
index 0000000000000000000000000000000000000000..6f01fbfd109e76c94b6e6e9bfd9eb388f39d99ee
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..bac9b207488eb9712ec27fb3567155f0dd773f34
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_arrays_replicated_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_inherit.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_inherit.sav
new file mode 100644
index 0000000000000000000000000000000000000000..8babd56306f09fa612f731ce593ae13c75f84f4c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_inherit.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays.sav
new file mode 100644
index 0000000000000000000000000000000000000000..a3c678162911426702a9a6e932761385a01f247e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated.sav
new file mode 100644
index 0000000000000000000000000000000000000000..38b812261125e6aabef8618955b234f6c7b04955
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..db1c256c85a707f0a0d78c28241b78d1eddcab1e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointer_arrays_replicated_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers.sav
new file mode 100644
index 0000000000000000000000000000000000000000..acbb058a307090f6c9e2d8402c7badf6bb48144c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated.sav
new file mode 100644
index 0000000000000000000000000000000000000000..d16f4655cc20318db2b0d629cd5ed6d7be01b518
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..732dd2cbfa9c7fd029bb59b4cfcb630cc1077f54
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_pointers_replicated_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars.sav
new file mode 100644
index 0000000000000000000000000000000000000000..69d7eaf4ecf8747c21d07e14edcf65b4e394974c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated.sav
new file mode 100644
index 0000000000000000000000000000000000000000..2222391ae5b93ba34c1fdb982c02eb97d9658b58
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated_3d.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated_3d.sav
new file mode 100644
index 0000000000000000000000000000000000000000..a35f1acfb4cb93ecb637310bbfa7fc1a2151d483
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/struct_scalars_replicated_3d.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/various_compressed.sav b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/various_compressed.sav
new file mode 100644
index 0000000000000000000000000000000000000000..dcdb0b0d433939d6a240c86e5060214cd8875732
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/data/various_compressed.sav differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_fortran.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_fortran.py
new file mode 100644
index 0000000000000000000000000000000000000000..e6e2ecdb8cd332a0a7806bdbc442c66124225077
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_fortran.py
@@ -0,0 +1,264 @@
+''' Tests for fortran sequential files '''
+
+import tempfile
+import shutil
+import os
+from os import path
+from glob import iglob
+import threading
+import re
+
+from numpy.testing import assert_equal, assert_allclose
+import numpy as np
+import pytest
+
+from scipy.io import (FortranFile,
+                      _test_fortran,
+                      FortranEOFError,
+                      FortranFormattingError)
+
+
+DATA_PATH = path.join(path.dirname(__file__), 'data')
+
+
+@pytest.fixture
+def io_lock():
+    return threading.Lock()
+
+
+def test_fortranfiles_read(io_lock):
+    for filename in iglob(path.join(DATA_PATH, "fortran-*-*x*x*.dat")):
+        m = re.search(r'fortran-([^-]+)-(\d+)x(\d+)x(\d+).dat', filename, re.I)
+        if not m:
+            raise RuntimeError(f"Couldn't match {filename} filename to regex")
+
+        dims = (int(m.group(2)), int(m.group(3)), int(m.group(4)))
+
+        dtype = m.group(1).replace('s', '<')
+
+        with io_lock:
+            f = FortranFile(filename, 'r', ' 0] = 1
+        info = (2, 2, 3, 'coordinate', 'pattern', 'general')
+        mmwrite(self.fn, a, field='pattern')
+        assert_equal(mminfo(self.fn), info)
+        b = mmread(self.fn, spmatrix=False)
+        assert_array_almost_equal(p, b.toarray())
+        assert not scipy.sparse.isspmatrix(b)
+
+        b = mmread(self.fn, spmatrix=True)
+        assert scipy.sparse.isspmatrix(b)
+        b = mmread(self.fn)  # chk default
+        assert scipy.sparse.isspmatrix(b)
+
+    def test_gh13634_non_skew_symmetric_int(self):
+        a = scipy.sparse.csr_array([[1, 2], [-2, 99]], dtype=np.int32)
+        self.check_exact(a, (2, 2, 4, 'coordinate', 'integer', 'general'))
+
+    def test_gh13634_non_skew_symmetric_float(self):
+        a = scipy.sparse.csr_array([[1, 2], [-2, 99.]], dtype=np.float32)
+        self.check(a, (2, 2, 4, 'coordinate', 'real', 'general'))
+
+
+_32bit_integer_dense_example = '''\
+%%MatrixMarket matrix array integer general
+2  2
+2147483647
+2147483646
+2147483647
+2147483646
+'''
+
+_32bit_integer_sparse_example = '''\
+%%MatrixMarket matrix coordinate integer symmetric
+2  2  2
+1  1  2147483647
+2  2  2147483646
+'''
+
+_64bit_integer_dense_example = '''\
+%%MatrixMarket matrix array integer general
+2  2
+          2147483648
+-9223372036854775806
+         -2147483648
+ 9223372036854775807
+'''
+
+_64bit_integer_sparse_general_example = '''\
+%%MatrixMarket matrix coordinate integer general
+2  2  3
+1  1           2147483648
+1  2  9223372036854775807
+2  2  9223372036854775807
+'''
+
+_64bit_integer_sparse_symmetric_example = '''\
+%%MatrixMarket matrix coordinate integer symmetric
+2  2  3
+1  1            2147483648
+1  2  -9223372036854775807
+2  2   9223372036854775807
+'''
+
+_64bit_integer_sparse_skew_example = '''\
+%%MatrixMarket matrix coordinate integer skew-symmetric
+2  2  3
+1  1            2147483648
+1  2  -9223372036854775807
+2  2   9223372036854775807
+'''
+
+_over64bit_integer_dense_example = '''\
+%%MatrixMarket matrix array integer general
+2  2
+         2147483648
+9223372036854775807
+         2147483648
+9223372036854775808
+'''
+
+_over64bit_integer_sparse_example = '''\
+%%MatrixMarket matrix coordinate integer symmetric
+2  2  2
+1  1            2147483648
+2  2  19223372036854775808
+'''
+
+
+class TestMMIOReadLargeIntegers:
+    def setup_method(self):
+        self.tmpdir = mkdtemp(suffix=str(threading.get_native_id()))
+        self.fn = os.path.join(self.tmpdir, 'testfile.mtx')
+
+    def teardown_method(self):
+        shutil.rmtree(self.tmpdir)
+
+    def check_read(self, example, a, info, dense, over32, over64):
+        with open(self.fn, 'w') as f:
+            f.write(example)
+        assert_equal(mminfo(self.fn), info)
+        if ((over32 and (np.intp(0).itemsize < 8) and mmwrite == scipy.io._mmio.mmwrite)
+            or over64):
+            assert_raises(OverflowError, mmread, self.fn)
+        else:
+            b = mmread(self.fn, spmatrix=False)
+            if not dense:
+                b = b.toarray()
+            assert_equal(a, b)
+
+    def test_read_32bit_integer_dense(self):
+        a = array([[2**31-1, 2**31-1],
+                   [2**31-2, 2**31-2]], dtype=np.int64)
+        self.check_read(_32bit_integer_dense_example,
+                        a,
+                        (2, 2, 4, 'array', 'integer', 'general'),
+                        dense=True,
+                        over32=False,
+                        over64=False)
+
+    def test_read_32bit_integer_sparse(self):
+        a = array([[2**31-1, 0],
+                   [0, 2**31-2]], dtype=np.int64)
+        self.check_read(_32bit_integer_sparse_example,
+                        a,
+                        (2, 2, 2, 'coordinate', 'integer', 'symmetric'),
+                        dense=False,
+                        over32=False,
+                        over64=False)
+
+    def test_read_64bit_integer_dense(self):
+        a = array([[2**31, -2**31],
+                   [-2**63+2, 2**63-1]], dtype=np.int64)
+        self.check_read(_64bit_integer_dense_example,
+                        a,
+                        (2, 2, 4, 'array', 'integer', 'general'),
+                        dense=True,
+                        over32=True,
+                        over64=False)
+
+    def test_read_64bit_integer_sparse_general(self):
+        a = array([[2**31, 2**63-1],
+                   [0, 2**63-1]], dtype=np.int64)
+        self.check_read(_64bit_integer_sparse_general_example,
+                        a,
+                        (2, 2, 3, 'coordinate', 'integer', 'general'),
+                        dense=False,
+                        over32=True,
+                        over64=False)
+
+    def test_read_64bit_integer_sparse_symmetric(self):
+        a = array([[2**31, -2**63+1],
+                   [-2**63+1, 2**63-1]], dtype=np.int64)
+        self.check_read(_64bit_integer_sparse_symmetric_example,
+                        a,
+                        (2, 2, 3, 'coordinate', 'integer', 'symmetric'),
+                        dense=False,
+                        over32=True,
+                        over64=False)
+
+    def test_read_64bit_integer_sparse_skew(self):
+        a = array([[2**31, -2**63+1],
+                   [2**63-1, 2**63-1]], dtype=np.int64)
+        self.check_read(_64bit_integer_sparse_skew_example,
+                        a,
+                        (2, 2, 3, 'coordinate', 'integer', 'skew-symmetric'),
+                        dense=False,
+                        over32=True,
+                        over64=False)
+
+    def test_read_over64bit_integer_dense(self):
+        self.check_read(_over64bit_integer_dense_example,
+                        None,
+                        (2, 2, 4, 'array', 'integer', 'general'),
+                        dense=True,
+                        over32=True,
+                        over64=True)
+
+    def test_read_over64bit_integer_sparse(self):
+        self.check_read(_over64bit_integer_sparse_example,
+                        None,
+                        (2, 2, 2, 'coordinate', 'integer', 'symmetric'),
+                        dense=False,
+                        over32=True,
+                        over64=True)
+
+
+_general_example = '''\
+%%MatrixMarket matrix coordinate real general
+%=================================================================================
+%
+% This ASCII file represents a sparse MxN matrix with L
+% nonzeros in the following Matrix Market format:
+%
+% +----------------------------------------------+
+% |%%MatrixMarket matrix coordinate real general | <--- header line
+% |%                                             | <--+
+% |% comments                                    |    |-- 0 or more comment lines
+% |%                                             | <--+
+% |    M  N  L                                   | <--- rows, columns, entries
+% |    I1  J1  A(I1, J1)                         | <--+
+% |    I2  J2  A(I2, J2)                         |    |
+% |    I3  J3  A(I3, J3)                         |    |-- L lines
+% |        . . .                                 |    |
+% |    IL JL  A(IL, JL)                          | <--+
+% +----------------------------------------------+
+%
+% Indices are 1-based, i.e. A(1,1) is the first element.
+%
+%=================================================================================
+  5  5  8
+    1     1   1.000e+00
+    2     2   1.050e+01
+    3     3   1.500e-02
+    1     4   6.000e+00
+    4     2   2.505e+02
+    4     4  -2.800e+02
+    4     5   3.332e+01
+    5     5   1.200e+01
+'''
+
+_hermitian_example = '''\
+%%MatrixMarket matrix coordinate complex hermitian
+  5  5  7
+    1     1     1.0      0
+    2     2    10.5      0
+    4     2   250.5     22.22
+    3     3     1.5e-2   0
+    4     4    -2.8e2    0
+    5     5    12.       0
+    5     4     0       33.32
+'''
+
+_skew_example = '''\
+%%MatrixMarket matrix coordinate real skew-symmetric
+  5  5  7
+    1     1     1.0
+    2     2    10.5
+    4     2   250.5
+    3     3     1.5e-2
+    4     4    -2.8e2
+    5     5    12.
+    5     4     0
+'''
+
+_symmetric_example = '''\
+%%MatrixMarket matrix coordinate real symmetric
+  5  5  7
+    1     1     1.0
+    2     2    10.5
+    4     2   250.5
+    3     3     1.5e-2
+    4     4    -2.8e2
+    5     5    12.
+    5     4     8
+'''
+
+_symmetric_pattern_example = '''\
+%%MatrixMarket matrix coordinate pattern symmetric
+  5  5  7
+    1     1
+    2     2
+    4     2
+    3     3
+    4     4
+    5     5
+    5     4
+'''
+
+# example (without comment lines) from Figure 1 in
+# https://math.nist.gov/MatrixMarket/reports/MMformat.ps
+_empty_lines_example = '''\
+%%MatrixMarket  MATRIX    Coordinate    Real General
+
+   5  5         8
+
+1 1  1.0
+2 2       10.5
+3 3             1.5e-2
+4 4                     -2.8E2
+5 5                              12.
+     1      4      6
+     4      2      250.5
+     4      5      33.32
+
+'''
+
+
+class TestMMIOCoordinate:
+    def setup_method(self):
+        self.tmpdir = mkdtemp(suffix=str(threading.get_native_id()))
+        self.fn = os.path.join(self.tmpdir, 'testfile.mtx')
+
+    def teardown_method(self):
+        shutil.rmtree(self.tmpdir)
+
+    def check_read(self, example, a, info):
+        f = open(self.fn, 'w')
+        f.write(example)
+        f.close()
+        assert_equal(mminfo(self.fn), info)
+        b = mmread(self.fn, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b)
+
+    def test_read_general(self):
+        a = [[1, 0, 0, 6, 0],
+             [0, 10.5, 0, 0, 0],
+             [0, 0, .015, 0, 0],
+             [0, 250.5, 0, -280, 33.32],
+             [0, 0, 0, 0, 12]]
+        self.check_read(_general_example, a,
+                        (5, 5, 8, 'coordinate', 'real', 'general'))
+
+    def test_read_hermitian(self):
+        a = [[1, 0, 0, 0, 0],
+             [0, 10.5, 0, 250.5 - 22.22j, 0],
+             [0, 0, .015, 0, 0],
+             [0, 250.5 + 22.22j, 0, -280, -33.32j],
+             [0, 0, 0, 33.32j, 12]]
+        self.check_read(_hermitian_example, a,
+                        (5, 5, 7, 'coordinate', 'complex', 'hermitian'))
+
+    def test_read_skew(self):
+        a = [[1, 0, 0, 0, 0],
+             [0, 10.5, 0, -250.5, 0],
+             [0, 0, .015, 0, 0],
+             [0, 250.5, 0, -280, 0],
+             [0, 0, 0, 0, 12]]
+        self.check_read(_skew_example, a,
+                        (5, 5, 7, 'coordinate', 'real', 'skew-symmetric'))
+
+    def test_read_symmetric(self):
+        a = [[1, 0, 0, 0, 0],
+             [0, 10.5, 0, 250.5, 0],
+             [0, 0, .015, 0, 0],
+             [0, 250.5, 0, -280, 8],
+             [0, 0, 0, 8, 12]]
+        self.check_read(_symmetric_example, a,
+                        (5, 5, 7, 'coordinate', 'real', 'symmetric'))
+
+    def test_read_symmetric_pattern(self):
+        a = [[1, 0, 0, 0, 0],
+             [0, 1, 0, 1, 0],
+             [0, 0, 1, 0, 0],
+             [0, 1, 0, 1, 1],
+             [0, 0, 0, 1, 1]]
+        self.check_read(_symmetric_pattern_example, a,
+                        (5, 5, 7, 'coordinate', 'pattern', 'symmetric'))
+
+    def test_read_empty_lines(self):
+        a = [[1, 0, 0, 6, 0],
+             [0, 10.5, 0, 0, 0],
+             [0, 0, .015, 0, 0],
+             [0, 250.5, 0, -280, 33.32],
+             [0, 0, 0, 0, 12]]
+        self.check_read(_empty_lines_example, a,
+                        (5, 5, 8, 'coordinate', 'real', 'general'))
+
+    def test_empty_write_read(self):
+        # https://github.com/scipy/scipy/issues/1410 (Trac #883)
+
+        b = scipy.sparse.coo_array((10, 10))
+        mmwrite(self.fn, b)
+
+        assert_equal(mminfo(self.fn),
+                     (10, 10, 0, 'coordinate', 'real', 'symmetric'))
+        a = b.toarray()
+        b = mmread(self.fn, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b)
+
+    def test_bzip2_py3(self):
+        # test if fix for #2152 works
+        try:
+            # bz2 module isn't always built when building Python.
+            import bz2
+        except ImportError:
+            return
+        I = array([0, 0, 1, 2, 3, 3, 3, 4])
+        J = array([0, 3, 1, 2, 1, 3, 4, 4])
+        V = array([1.0, 6.0, 10.5, 0.015, 250.5, -280.0, 33.32, 12.0])
+
+        b = scipy.sparse.coo_array((V, (I, J)), shape=(5, 5))
+
+        mmwrite(self.fn, b)
+
+        fn_bzip2 = f"{self.fn}.bz2"
+        with open(self.fn, 'rb') as f_in:
+            f_out = bz2.BZ2File(fn_bzip2, 'wb')
+            f_out.write(f_in.read())
+            f_out.close()
+
+        a = mmread(fn_bzip2, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b.toarray())
+
+    def test_gzip_py3(self):
+        # test if fix for #2152 works
+        try:
+            # gzip module can be missing from Python installation
+            import gzip
+        except ImportError:
+            return
+        I = array([0, 0, 1, 2, 3, 3, 3, 4])
+        J = array([0, 3, 1, 2, 1, 3, 4, 4])
+        V = array([1.0, 6.0, 10.5, 0.015, 250.5, -280.0, 33.32, 12.0])
+
+        b = scipy.sparse.coo_array((V, (I, J)), shape=(5, 5))
+
+        mmwrite(self.fn, b)
+
+        fn_gzip = f"{self.fn}.gz"
+        with open(self.fn, 'rb') as f_in:
+            f_out = gzip.open(fn_gzip, 'wb')
+            f_out.write(f_in.read())
+            f_out.close()
+
+        a = mmread(fn_gzip, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b.toarray())
+
+    def test_real_write_read(self):
+        I = array([0, 0, 1, 2, 3, 3, 3, 4])
+        J = array([0, 3, 1, 2, 1, 3, 4, 4])
+        V = array([1.0, 6.0, 10.5, 0.015, 250.5, -280.0, 33.32, 12.0])
+
+        b = scipy.sparse.coo_array((V, (I, J)), shape=(5, 5))
+
+        mmwrite(self.fn, b)
+
+        assert_equal(mminfo(self.fn),
+                     (5, 5, 8, 'coordinate', 'real', 'general'))
+        a = b.toarray()
+        b = mmread(self.fn, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b)
+
+    def test_complex_write_read(self):
+        I = array([0, 0, 1, 2, 3, 3, 3, 4])
+        J = array([0, 3, 1, 2, 1, 3, 4, 4])
+        V = array([1.0 + 3j, 6.0 + 2j, 10.50 + 0.9j, 0.015 + -4.4j,
+                   250.5 + 0j, -280.0 + 5j, 33.32 + 6.4j, 12.00 + 0.8j])
+
+        b = scipy.sparse.coo_array((V, (I, J)), shape=(5, 5))
+
+        mmwrite(self.fn, b)
+
+        assert_equal(mminfo(self.fn),
+                     (5, 5, 8, 'coordinate', 'complex', 'general'))
+        a = b.toarray()
+        b = mmread(self.fn, spmatrix=False).toarray()
+        assert_array_almost_equal(a, b)
+
+    def test_sparse_formats(self, tmp_path):
+        # Note: `tmp_path` is a pytest fixture, it handles cleanup
+        tmpdir = tmp_path / 'sparse_formats'
+        tmpdir.mkdir()
+
+        mats = []
+        I = array([0, 0, 1, 2, 3, 3, 3, 4])
+        J = array([0, 3, 1, 2, 1, 3, 4, 4])
+
+        V = array([1.0, 6.0, 10.5, 0.015, 250.5, -280.0, 33.32, 12.0])
+        mats.append(scipy.sparse.coo_array((V, (I, J)), shape=(5, 5)))
+
+        V = array([1.0 + 3j, 6.0 + 2j, 10.50 + 0.9j, 0.015 + -4.4j,
+                   250.5 + 0j, -280.0 + 5j, 33.32 + 6.4j, 12.00 + 0.8j])
+        mats.append(scipy.sparse.coo_array((V, (I, J)), shape=(5, 5)))
+
+        for mat in mats:
+            expected = mat.toarray()
+            for fmt in ['csr', 'csc', 'coo']:
+                fname = tmpdir / (fmt + '.mtx')
+                mmwrite(fname, mat.asformat(fmt))
+                result = mmread(fname, spmatrix=False).toarray()
+                assert_array_almost_equal(result, expected)
+
+    def test_precision(self):
+        test_values = [pi] + [10**(i) for i in range(0, -10, -1)]
+        test_precisions = range(1, 10)
+        for value in test_values:
+            for precision in test_precisions:
+                # construct sparse matrix with test value at last main diagonal
+                n = 10**precision + 1
+                A = scipy.sparse.dok_array((n, n))
+                A[n-1, n-1] = value
+                # write matrix with test precision and read again
+                mmwrite(self.fn, A, precision=precision)
+                A = scipy.io.mmread(self.fn, spmatrix=False)
+                # check for right entries in matrix
+                assert_array_equal(A.row, [n-1])
+                assert_array_equal(A.col, [n-1])
+                assert_allclose(A.data, [float('%%.%dg' % precision % value)])
+
+    def test_bad_number_of_coordinate_header_fields(self):
+        s = """\
+            %%MatrixMarket matrix coordinate real general
+              5  5  8 999
+                1     1   1.000e+00
+                2     2   1.050e+01
+                3     3   1.500e-02
+                1     4   6.000e+00
+                4     2   2.505e+02
+                4     4  -2.800e+02
+                4     5   3.332e+01
+                5     5   1.200e+01
+            """
+        text = textwrap.dedent(s).encode('ascii')
+        with pytest.raises(ValueError, match='not of length 3'):
+            scipy.io.mmread(io.BytesIO(text))
+
+
+def test_gh11389():
+    mmread(io.StringIO("%%MatrixMarket matrix coordinate complex symmetric\n"
+                       " 1 1 1\n"
+                       "1 1 -2.1846000000000e+02  0.0000000000000e+00"),
+           spmatrix=False)
+
+
+def test_gh18123(tmp_path):
+    lines = [" %%MatrixMarket matrix coordinate real general\n",
+             "5 5 3\n",
+             "2 3 1.0\n",
+             "3 4 2.0\n",
+             "3 5 3.0\n"]
+    test_file = tmp_path / "test.mtx"
+    with open(test_file, "w") as f:
+        f.writelines(lines)
+    mmread(test_file, spmatrix=False)
+
+def test_mtx_append(tmp_path):
+    a = mmread(io.StringIO("%%MatrixMarket matrix coordinate complex symmetric\n"
+                           " 1 1 1\n"
+                           "1 1 -2.1846000000000e+02  0.0000000000000e+00"),
+               spmatrix=False)
+    test_writefile = tmp_path / "test_mtx"
+    test_readfile  = tmp_path / "test_mtx.mtx"
+    mmwrite(test_writefile, a)
+    mmread(test_readfile, spmatrix=False)
+
+
+def test_threadpoolctl():
+    try:
+        import threadpoolctl
+        if not hasattr(threadpoolctl, "register"):
+            pytest.skip("threadpoolctl too old")
+            return
+    except ImportError:
+        pytest.skip("no threadpoolctl")
+        return
+
+    with threadpoolctl.threadpool_limits(limits=4):
+        assert_equal(fmm.PARALLELISM, 4)
+
+    with threadpoolctl.threadpool_limits(limits=2, user_api='scipy'):
+        assert_equal(fmm.PARALLELISM, 2)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_netcdf.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_netcdf.py
new file mode 100644
index 0000000000000000000000000000000000000000..161406076d0b5078e8e11aa5762b7715cd83c4a7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_netcdf.py
@@ -0,0 +1,550 @@
+''' Tests for netcdf '''
+import os
+from os.path import join as pjoin, dirname
+import shutil
+import tempfile
+import warnings
+from io import BytesIO
+from glob import glob
+from contextlib import contextmanager
+
+import numpy as np
+from numpy.testing import (assert_, assert_allclose, assert_equal,
+                           break_cycles, suppress_warnings, IS_PYPY)
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.io import netcdf_file
+from scipy._lib._tmpdirs import in_tempdir
+
+TEST_DATA_PATH = pjoin(dirname(__file__), 'data')
+
+N_EG_ELS = 11  # number of elements for example variable
+VARTYPE_EG = 'b'  # var type for example variable
+
+
+pytestmark = pytest.mark.thread_unsafe
+
+
+@contextmanager
+def make_simple(*args, **kwargs):
+    f = netcdf_file(*args, **kwargs)
+    f.history = 'Created for a test'
+    f.createDimension('time', N_EG_ELS)
+    time = f.createVariable('time', VARTYPE_EG, ('time',))
+    time[:] = np.arange(N_EG_ELS)
+    time.units = 'days since 2008-01-01'
+    f.flush()
+    yield f
+    f.close()
+
+
+def check_simple(ncfileobj):
+    '''Example fileobj tests '''
+    assert_equal(ncfileobj.history, b'Created for a test')
+    time = ncfileobj.variables['time']
+    assert_equal(time.units, b'days since 2008-01-01')
+    assert_equal(time.shape, (N_EG_ELS,))
+    assert_equal(time[-1], N_EG_ELS-1)
+
+def assert_mask_matches(arr, expected_mask):
+    '''
+    Asserts that the mask of arr is effectively the same as expected_mask.
+
+    In contrast to numpy.ma.testutils.assert_mask_equal, this function allows
+    testing the 'mask' of a standard numpy array (the mask in this case is treated
+    as all False).
+
+    Parameters
+    ----------
+    arr : ndarray or MaskedArray
+        Array to test.
+    expected_mask : array_like of booleans
+        A list giving the expected mask.
+    '''
+
+    mask = np.ma.getmaskarray(arr)
+    assert_equal(mask, expected_mask)
+
+
+def test_read_write_files():
+    # test round trip for example file
+    cwd = os.getcwd()
+    try:
+        tmpdir = tempfile.mkdtemp()
+        os.chdir(tmpdir)
+        with make_simple('simple.nc', 'w') as f:
+            pass
+        # read the file we just created in 'a' mode
+        with netcdf_file('simple.nc', 'a') as f:
+            check_simple(f)
+            # add something
+            f._attributes['appendRan'] = 1
+
+        # To read the NetCDF file we just created::
+        with netcdf_file('simple.nc') as f:
+            # Using mmap is the default (but not on pypy)
+            assert_equal(f.use_mmap, not IS_PYPY)
+            check_simple(f)
+            assert_equal(f._attributes['appendRan'], 1)
+
+        # Read it in append (and check mmap is off)
+        with netcdf_file('simple.nc', 'a') as f:
+            assert_(not f.use_mmap)
+            check_simple(f)
+            assert_equal(f._attributes['appendRan'], 1)
+
+        # Now without mmap
+        with netcdf_file('simple.nc', mmap=False) as f:
+            # Using mmap is the default
+            assert_(not f.use_mmap)
+            check_simple(f)
+
+        # To read the NetCDF file we just created, as file object, no
+        # mmap.  When n * n_bytes(var_type) is not divisible by 4, this
+        # raised an error in pupynere 1.0.12 and scipy rev 5893, because
+        # calculated vsize was rounding up in units of 4 - see
+        # https://www.unidata.ucar.edu/software/netcdf/guide_toc.html
+        with open('simple.nc', 'rb') as fobj:
+            with netcdf_file(fobj) as f:
+                # by default, don't use mmap for file-like
+                assert_(not f.use_mmap)
+                check_simple(f)
+
+        # Read file from fileobj, with mmap
+        with suppress_warnings() as sup:
+            if IS_PYPY:
+                sup.filter(RuntimeWarning,
+                           "Cannot close a netcdf_file opened with mmap=True.*")
+            with open('simple.nc', 'rb') as fobj:
+                with netcdf_file(fobj, mmap=True) as f:
+                    assert_(f.use_mmap)
+                    check_simple(f)
+
+        # Again read it in append mode (adding another att)
+        with open('simple.nc', 'r+b') as fobj:
+            with netcdf_file(fobj, 'a') as f:
+                assert_(not f.use_mmap)
+                check_simple(f)
+                f.createDimension('app_dim', 1)
+                var = f.createVariable('app_var', 'i', ('app_dim',))
+                var[:] = 42
+
+        # And... check that app_var made it in...
+        with netcdf_file('simple.nc') as f:
+            check_simple(f)
+            assert_equal(f.variables['app_var'][:], 42)
+
+    finally:
+        if IS_PYPY:
+            # windows cannot remove a dead file held by a mmap
+            # that has not been collected in PyPy
+            break_cycles()
+            break_cycles()
+        os.chdir(cwd)
+        shutil.rmtree(tmpdir)
+
+
+def test_read_write_sio():
+    eg_sio1 = BytesIO()
+    with make_simple(eg_sio1, 'w'):
+        str_val = eg_sio1.getvalue()
+
+    eg_sio2 = BytesIO(str_val)
+    with netcdf_file(eg_sio2) as f2:
+        check_simple(f2)
+
+    # Test that error is raised if attempting mmap for sio
+    eg_sio3 = BytesIO(str_val)
+    assert_raises(ValueError, netcdf_file, eg_sio3, 'r', True)
+    # Test 64-bit offset write / read
+    eg_sio_64 = BytesIO()
+    with make_simple(eg_sio_64, 'w', version=2) as f_64:
+        str_val = eg_sio_64.getvalue()
+
+    eg_sio_64 = BytesIO(str_val)
+    with netcdf_file(eg_sio_64) as f_64:
+        check_simple(f_64)
+        assert_equal(f_64.version_byte, 2)
+    # also when version 2 explicitly specified
+    eg_sio_64 = BytesIO(str_val)
+    with netcdf_file(eg_sio_64, version=2) as f_64:
+        check_simple(f_64)
+        assert_equal(f_64.version_byte, 2)
+
+
+def test_bytes():
+    raw_file = BytesIO()
+    f = netcdf_file(raw_file, mode='w')
+    # Dataset only has a single variable, dimension and attribute to avoid
+    # any ambiguity related to order.
+    f.a = 'b'
+    f.createDimension('dim', 1)
+    var = f.createVariable('var', np.int16, ('dim',))
+    var[0] = -9999
+    var.c = 'd'
+    f.sync()
+
+    actual = raw_file.getvalue()
+
+    expected = (b'CDF\x01'
+                b'\x00\x00\x00\x00'
+                b'\x00\x00\x00\x0a'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x03'
+                b'dim\x00'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x0c'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x01'
+                b'a\x00\x00\x00'
+                b'\x00\x00\x00\x02'
+                b'\x00\x00\x00\x01'
+                b'b\x00\x00\x00'
+                b'\x00\x00\x00\x0b'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x03'
+                b'var\x00'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x00'
+                b'\x00\x00\x00\x0c'
+                b'\x00\x00\x00\x01'
+                b'\x00\x00\x00\x01'
+                b'c\x00\x00\x00'
+                b'\x00\x00\x00\x02'
+                b'\x00\x00\x00\x01'
+                b'd\x00\x00\x00'
+                b'\x00\x00\x00\x03'
+                b'\x00\x00\x00\x04'
+                b'\x00\x00\x00\x78'
+                b'\xd8\xf1\x80\x01')
+
+    assert_equal(actual, expected)
+
+
+def test_encoded_fill_value():
+    with netcdf_file(BytesIO(), mode='w') as f:
+        f.createDimension('x', 1)
+        var = f.createVariable('var', 'S1', ('x',))
+        assert_equal(var._get_encoded_fill_value(), b'\x00')
+        var._FillValue = b'\x01'
+        assert_equal(var._get_encoded_fill_value(), b'\x01')
+        var._FillValue = b'\x00\x00'  # invalid, wrong size
+        assert_equal(var._get_encoded_fill_value(), b'\x00')
+
+
+def test_read_example_data():
+    # read any example data files
+    for fname in glob(pjoin(TEST_DATA_PATH, '*.nc')):
+        with netcdf_file(fname, 'r'):
+            pass
+        with netcdf_file(fname, 'r', mmap=False):
+            pass
+
+
+def test_itemset_no_segfault_on_readonly():
+    # Regression test for ticket #1202.
+    # Open the test file in read-only mode.
+
+    filename = pjoin(TEST_DATA_PATH, 'example_1.nc')
+    with suppress_warnings() as sup:
+        message = ("Cannot close a netcdf_file opened with mmap=True, when "
+                   "netcdf_variables or arrays referring to its data still exist")
+        sup.filter(RuntimeWarning, message)
+        with netcdf_file(filename, 'r', mmap=True) as f:
+            time_var = f.variables['time']
+
+    # time_var.assignValue(42) should raise a RuntimeError--not seg. fault!
+    assert_raises(RuntimeError, time_var.assignValue, 42)
+
+
+def test_appending_issue_gh_8625():
+    stream = BytesIO()
+
+    with make_simple(stream, mode='w') as f:
+        f.createDimension('x', 2)
+        f.createVariable('x', float, ('x',))
+        f.variables['x'][...] = 1
+        f.flush()
+        contents = stream.getvalue()
+
+    stream = BytesIO(contents)
+    with netcdf_file(stream, mode='a') as f:
+        f.variables['x'][...] = 2
+
+
+def test_write_invalid_dtype():
+    dtypes = ['int64', 'uint64']
+    if np.dtype('int').itemsize == 8:   # 64-bit machines
+        dtypes.append('int')
+    if np.dtype('uint').itemsize == 8:   # 64-bit machines
+        dtypes.append('uint')
+
+    with netcdf_file(BytesIO(), 'w') as f:
+        f.createDimension('time', N_EG_ELS)
+        for dt in dtypes:
+            assert_raises(ValueError, f.createVariable, 'time', dt, ('time',))
+
+
+def test_flush_rewind():
+    stream = BytesIO()
+    with make_simple(stream, mode='w') as f:
+        f.createDimension('x',4)  # x is used in createVariable
+        v = f.createVariable('v', 'i2', ['x'])
+        v[:] = 1
+        f.flush()
+        len_single = len(stream.getvalue())
+        f.flush()
+        len_double = len(stream.getvalue())
+
+    assert_(len_single == len_double)
+
+
+def test_dtype_specifiers():
+    # Numpy 1.7.0-dev had a bug where 'i2' wouldn't work.
+    # Specifying np.int16 or similar only works from the same commit as this
+    # comment was made.
+    with make_simple(BytesIO(), mode='w') as f:
+        f.createDimension('x',4)
+        f.createVariable('v1', 'i2', ['x'])
+        f.createVariable('v2', np.int16, ['x'])
+        f.createVariable('v3', np.dtype(np.int16), ['x'])
+
+
+def test_ticket_1720():
+    io = BytesIO()
+
+    items = [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
+
+    with netcdf_file(io, 'w') as f:
+        f.history = 'Created for a test'
+        f.createDimension('float_var', 10)
+        float_var = f.createVariable('float_var', 'f', ('float_var',))
+        float_var[:] = items
+        float_var.units = 'metres'
+        f.flush()
+        contents = io.getvalue()
+
+    io = BytesIO(contents)
+    with netcdf_file(io, 'r') as f:
+        assert_equal(f.history, b'Created for a test')
+        float_var = f.variables['float_var']
+        assert_equal(float_var.units, b'metres')
+        assert_equal(float_var.shape, (10,))
+        assert_allclose(float_var[:], items)
+
+
+def test_mmaps_segfault():
+    filename = pjoin(TEST_DATA_PATH, 'example_1.nc')
+
+    if not IS_PYPY:
+        with warnings.catch_warnings():
+            warnings.simplefilter("error")
+            with netcdf_file(filename, mmap=True) as f:
+                x = f.variables['lat'][:]
+                # should not raise warnings
+                del x
+
+    def doit():
+        with netcdf_file(filename, mmap=True) as f:
+            return f.variables['lat'][:]
+
+    # should not crash
+    with suppress_warnings() as sup:
+        message = ("Cannot close a netcdf_file opened with mmap=True, when "
+                   "netcdf_variables or arrays referring to its data still exist")
+        sup.filter(RuntimeWarning, message)
+        x = doit()
+    x.sum()
+
+
+def test_zero_dimensional_var():
+    io = BytesIO()
+    with make_simple(io, 'w') as f:
+        v = f.createVariable('zerodim', 'i2', [])
+        # This is checking that .isrec returns a boolean - don't simplify it
+        # to 'assert not ...'
+        assert v.isrec is False, v.isrec
+        f.flush()
+
+
+def test_byte_gatts():
+    # Check that global "string" atts work like they did before py3k
+    # unicode and general bytes confusion
+    with in_tempdir():
+        filename = 'g_byte_atts.nc'
+        f = netcdf_file(filename, 'w')
+        f._attributes['holy'] = b'grail'
+        f._attributes['witch'] = 'floats'
+        f.close()
+        f = netcdf_file(filename, 'r')
+        assert_equal(f._attributes['holy'], b'grail')
+        assert_equal(f._attributes['witch'], b'floats')
+        f.close()
+
+
+def test_open_append():
+    # open 'w' put one attr
+    with in_tempdir():
+        filename = 'append_dat.nc'
+        f = netcdf_file(filename, 'w')
+        f._attributes['Kilroy'] = 'was here'
+        f.close()
+
+        # open again in 'a', read the att and a new one
+        f = netcdf_file(filename, 'a')
+        assert_equal(f._attributes['Kilroy'], b'was here')
+        f._attributes['naughty'] = b'Zoot'
+        f.close()
+
+        # open yet again in 'r' and check both atts
+        f = netcdf_file(filename, 'r')
+        assert_equal(f._attributes['Kilroy'], b'was here')
+        assert_equal(f._attributes['naughty'], b'Zoot')
+        f.close()
+
+
+def test_append_recordDimension():
+    dataSize = 100
+
+    with in_tempdir():
+        # Create file with record time dimension
+        with netcdf_file('withRecordDimension.nc', 'w') as f:
+            f.createDimension('time', None)
+            f.createVariable('time', 'd', ('time',))
+            f.createDimension('x', dataSize)
+            x = f.createVariable('x', 'd', ('x',))
+            x[:] = np.array(range(dataSize))
+            f.createDimension('y', dataSize)
+            y = f.createVariable('y', 'd', ('y',))
+            y[:] = np.array(range(dataSize))
+            f.createVariable('testData', 'i', ('time', 'x', 'y'))
+            f.flush()
+            f.close()
+
+        for i in range(2):
+            # Open the file in append mode and add data
+            with netcdf_file('withRecordDimension.nc', 'a') as f:
+                f.variables['time'].data = np.append(f.variables["time"].data, i)
+                f.variables['testData'][i, :, :] = np.full((dataSize, dataSize), i)
+                f.flush()
+
+            # Read the file and check that append worked
+            with netcdf_file('withRecordDimension.nc') as f:
+                assert_equal(f.variables['time'][-1], i)
+                assert_equal(f.variables['testData'][-1, :, :].copy(),
+                             np.full((dataSize, dataSize), i))
+                assert_equal(f.variables['time'].data.shape[0], i+1)
+                assert_equal(f.variables['testData'].data.shape[0], i+1)
+
+        # Read the file and check that 'data' was not saved as user defined
+        # attribute of testData variable during append operation
+        with netcdf_file('withRecordDimension.nc') as f:
+            with assert_raises(KeyError) as ar:
+                f.variables['testData']._attributes['data']
+            ex = ar.value
+            assert_equal(ex.args[0], 'data')
+
+def test_maskandscale():
+    t = np.linspace(20, 30, 15)
+    t[3] = 100
+    tm = np.ma.masked_greater(t, 99)
+    fname = pjoin(TEST_DATA_PATH, 'example_2.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        Temp = f.variables['Temperature']
+        assert_equal(Temp.missing_value, 9999)
+        assert_equal(Temp.add_offset, 20)
+        assert_equal(Temp.scale_factor, np.float32(0.01))
+        found = Temp[:].compressed()
+        del Temp  # Remove ref to mmap, so file can be closed.
+        expected = np.round(tm.compressed(), 2)
+        assert_allclose(found, expected)
+
+    with in_tempdir():
+        newfname = 'ms.nc'
+        f = netcdf_file(newfname, 'w', maskandscale=True)
+        f.createDimension('Temperature', len(tm))
+        temp = f.createVariable('Temperature', 'i', ('Temperature',))
+        temp.missing_value = 9999
+        temp.scale_factor = 0.01
+        temp.add_offset = 20
+        temp[:] = tm
+        f.close()
+
+        with netcdf_file(newfname, maskandscale=True) as f:
+            Temp = f.variables['Temperature']
+            assert_equal(Temp.missing_value, 9999)
+            assert_equal(Temp.add_offset, 20)
+            assert_equal(Temp.scale_factor, np.float32(0.01))
+            expected = np.round(tm.compressed(), 2)
+            found = Temp[:].compressed()
+            del Temp
+            assert_allclose(found, expected)
+
+
+# ------------------------------------------------------------------------
+# Test reading with masked values (_FillValue / missing_value)
+# ------------------------------------------------------------------------
+
+def test_read_withValuesNearFillValue():
+    # Regression test for ticket #5626
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var1_fillval0'][:]
+        assert_mask_matches(vardata, [False, True, False])
+
+def test_read_withNoFillValue():
+    # For a variable with no fill value, reading data with maskandscale=True
+    # should return unmasked data
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var2_noFillval'][:]
+        assert_mask_matches(vardata, [False, False, False])
+        assert_equal(vardata, [1,2,3])
+
+def test_read_withFillValueAndMissingValue():
+    # For a variable with both _FillValue and missing_value, the _FillValue
+    # should be used
+    IRRELEVANT_VALUE = 9999
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var3_fillvalAndMissingValue'][:]
+        assert_mask_matches(vardata, [True, False, False])
+        assert_equal(vardata, [IRRELEVANT_VALUE, 2, 3])
+
+def test_read_withMissingValue():
+    # For a variable with missing_value but not _FillValue, the missing_value
+    # should be used
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var4_missingValue'][:]
+        assert_mask_matches(vardata, [False, True, False])
+
+def test_read_withFillValNaN():
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var5_fillvalNaN'][:]
+        assert_mask_matches(vardata, [False, True, False])
+
+def test_read_withChar():
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var6_char'][:]
+        assert_mask_matches(vardata, [False, True, False])
+
+def test_read_with2dVar():
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    with netcdf_file(fname, maskandscale=True) as f:
+        vardata = f.variables['var7_2d'][:]
+        assert_mask_matches(vardata, [[True, False], [False, False], [False, True]])
+
+def test_read_withMaskAndScaleFalse():
+    # If a variable has a _FillValue (or missing_value) attribute, but is read
+    # with maskandscale set to False, the result should be unmasked
+    fname = pjoin(TEST_DATA_PATH, 'example_3_maskedvals.nc')
+    # Open file with mmap=False to avoid problems with closing a mmap'ed file
+    # when arrays referring to its data still exist:
+    with netcdf_file(fname, maskandscale=False, mmap=False) as f:
+        vardata = f.variables['var3_fillvalAndMissingValue'][:]
+        assert_mask_matches(vardata, [False, False, False])
+        assert_equal(vardata, [1, 2, 3])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_paths.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_paths.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e7c4167ace335fb5fc86f6499ee54c3360ded6e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_paths.py
@@ -0,0 +1,93 @@
+"""
+Ensure that we can use pathlib.Path objects in all relevant IO functions.
+"""
+from pathlib import Path
+
+import numpy as np
+
+import scipy.io
+import scipy.io.wavfile
+from scipy._lib._tmpdirs import tempdir
+import scipy.sparse
+
+
+class TestPaths:
+    data = np.arange(5).astype(np.int64)
+
+    def test_savemat(self):
+        with tempdir() as temp_dir:
+            path = Path(temp_dir) / 'data.mat'
+            scipy.io.savemat(path, {'data': self.data})
+            assert path.is_file()
+
+    def test_loadmat(self):
+        # Save data with string path, load with pathlib.Path
+        with tempdir() as temp_dir:
+            path = Path(temp_dir) / 'data.mat'
+            scipy.io.savemat(str(path), {'data': self.data})
+
+            mat_contents = scipy.io.loadmat(path)
+            assert (mat_contents['data'] == self.data).all()
+
+    def test_whosmat(self):
+        # Save data with string path, load with pathlib.Path
+        with tempdir() as temp_dir:
+            path = Path(temp_dir) / 'data.mat'
+            scipy.io.savemat(str(path), {'data': self.data})
+
+            contents = scipy.io.whosmat(path)
+            assert contents[0] == ('data', (1, 5), 'int64')
+
+    def test_readsav(self):
+        path = Path(__file__).parent / 'data/scalar_string.sav'
+        scipy.io.readsav(path)
+
+    def test_hb_read(self):
+        # Save data with string path, load with pathlib.Path
+        with tempdir() as temp_dir:
+            data = scipy.sparse.eye_array(3, format='csr')
+            path = Path(temp_dir) / 'data.hb'
+            scipy.io.hb_write(str(path), data)
+
+            data_new = scipy.io.hb_read(path, spmatrix=False)
+            assert (data_new != data).nnz == 0
+
+    def test_hb_write(self):
+        with tempdir() as temp_dir:
+            data = scipy.sparse.eye_array(3, format='csr')
+            path = Path(temp_dir) / 'data.hb'
+            scipy.io.hb_write(path, data)
+            assert path.is_file()
+
+    def test_mmio_read(self):
+        # Save data with string path, load with pathlib.Path
+        with tempdir() as temp_dir:
+            data = scipy.sparse.eye_array(3, format='csr')
+            path = Path(temp_dir) / 'data.mtx'
+            scipy.io.mmwrite(str(path), data)
+
+            data_new = scipy.io.mmread(path, spmatrix=False)
+            assert (data_new != data).nnz == 0
+
+    def test_mmio_write(self):
+        with tempdir() as temp_dir:
+            data = scipy.sparse.eye_array(3, format='csr')
+            path = Path(temp_dir) / 'data.mtx'
+            scipy.io.mmwrite(path, data)
+
+    def test_netcdf_file(self):
+        path = Path(__file__).parent / 'data/example_1.nc'
+        scipy.io.netcdf_file(path)
+
+    def test_wavfile_read(self):
+        path = Path(__file__).parent / 'data/test-8000Hz-le-2ch-1byteu.wav'
+        scipy.io.wavfile.read(path)
+
+    def test_wavfile_write(self):
+        # Read from str path, write to Path
+        input_path = Path(__file__).parent / 'data/test-8000Hz-le-2ch-1byteu.wav'
+        rate, data = scipy.io.wavfile.read(str(input_path))
+
+        with tempdir() as temp_dir:
+            output_path = Path(temp_dir) / input_path.name
+            scipy.io.wavfile.write(output_path, rate, data)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_wavfile.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_wavfile.py
new file mode 100644
index 0000000000000000000000000000000000000000..8e0a545495a842916a3cddd48c0b1b3859ae4ca5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/tests/test_wavfile.py
@@ -0,0 +1,460 @@
+import os
+import sys
+from io import BytesIO
+import threading
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_, assert_array_equal,
+                           break_cycles, suppress_warnings, IS_PYPY)
+import pytest
+from pytest import raises, warns
+
+from scipy.io import wavfile
+
+
+def datafile(fn):
+    return os.path.join(os.path.dirname(__file__), 'data', fn)
+
+
+def test_read_1():
+    # 32-bit PCM (which uses extensible format)
+    for mmap in [False, True]:
+        filename = 'test-44100Hz-le-1ch-4bytes.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 44100)
+        assert_(np.issubdtype(data.dtype, np.int32))
+        assert_equal(data.shape, (4410,))
+
+        del data
+
+
+def test_read_2():
+    # 8-bit unsigned PCM
+    for mmap in [False, True]:
+        filename = 'test-8000Hz-le-2ch-1byteu.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 8000)
+        assert_(np.issubdtype(data.dtype, np.uint8))
+        assert_equal(data.shape, (800, 2))
+
+        del data
+
+
+def test_read_3():
+    # Little-endian float
+    for mmap in [False, True]:
+        filename = 'test-44100Hz-2ch-32bit-float-le.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 44100)
+        assert_(np.issubdtype(data.dtype, np.float32))
+        assert_equal(data.shape, (441, 2))
+
+        del data
+
+
+def test_read_4():
+    # Contains unsupported 'PEAK' chunk
+    for mmap in [False, True]:
+        with suppress_warnings() as sup:
+            sup.filter(wavfile.WavFileWarning,
+                       "Chunk .non-data. not understood, skipping it")
+            filename = 'test-48000Hz-2ch-64bit-float-le-wavex.wav'
+            rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 48000)
+        assert_(np.issubdtype(data.dtype, np.float64))
+        assert_equal(data.shape, (480, 2))
+
+        del data
+
+
+def test_read_5():
+    # Big-endian float
+    for mmap in [False, True]:
+        filename = 'test-44100Hz-2ch-32bit-float-be.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 44100)
+        assert_(np.issubdtype(data.dtype, np.float32))
+        assert_(data.dtype.byteorder == '>' or (sys.byteorder == 'big' and
+                                                data.dtype.byteorder == '='))
+        assert_equal(data.shape, (441, 2))
+
+        del data
+
+
+def test_5_bit_odd_size_no_pad():
+    # 5-bit, 1 B container, 5 channels, 9 samples, 45 B data chunk
+    # Generated by LTspice, which incorrectly omits pad byte, but should be
+    # readable anyway
+    for mmap in [False, True]:
+        filename = 'test-8000Hz-le-5ch-9S-5bit.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 8000)
+        assert_(np.issubdtype(data.dtype, np.uint8))
+        assert_equal(data.shape, (9, 5))
+
+        # 8-5 = 3 LSBits should be 0
+        assert_equal(data & 0b00000111, 0)
+
+        # Unsigned
+        assert_equal(data.max(), 0b11111000)  # Highest possible
+        assert_equal(data[0, 0], 128)  # Midpoint is 128 for <= 8-bit
+        assert_equal(data.min(), 0)  # Lowest possible
+
+        del data
+
+
+def test_12_bit_even_size():
+    # 12-bit, 2 B container, 4 channels, 9 samples, 72 B data chunk
+    # Generated by LTspice from 1 Vpk sine waves
+    for mmap in [False, True]:
+        filename = 'test-8000Hz-le-4ch-9S-12bit.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 8000)
+        assert_(np.issubdtype(data.dtype, np.int16))
+        assert_equal(data.shape, (9, 4))
+
+        # 16-12 = 4 LSBits should be 0
+        assert_equal(data & 0b00000000_00001111, 0)
+
+        # Signed
+        assert_equal(data.max(), 0b01111111_11110000)  # Highest possible
+        assert_equal(data[0, 0], 0)  # Midpoint is 0 for >= 9-bit
+        assert_equal(data.min(), -0b10000000_00000000)  # Lowest possible
+
+        del data
+
+
+def test_24_bit_odd_size_with_pad():
+    # 24-bit, 3 B container, 3 channels, 5 samples, 45 B data chunk
+    # Should not raise any warnings about the data chunk pad byte
+    filename = 'test-8000Hz-le-3ch-5S-24bit.wav'
+    rate, data = wavfile.read(datafile(filename), mmap=False)
+
+    assert_equal(rate, 8000)
+    assert_(np.issubdtype(data.dtype, np.int32))
+    assert_equal(data.shape, (5, 3))
+
+    # All LSBytes should be 0
+    assert_equal(data & 0xff, 0)
+
+    # Hand-made max/min samples under different conventions:
+    #                      2**(N-1)     2**(N-1)-1     LSB
+    assert_equal(data, [[-0x8000_0000, -0x7fff_ff00, -0x200],
+                        [-0x4000_0000, -0x3fff_ff00, -0x100],
+                        [+0x0000_0000, +0x0000_0000, +0x000],
+                        [+0x4000_0000, +0x3fff_ff00, +0x100],
+                        [+0x7fff_ff00, +0x7fff_ff00, +0x200]])
+    #                     ^ clipped
+
+
+def test_20_bit_extra_data():
+    # 20-bit, 3 B container, 1 channel, 10 samples, 30 B data chunk
+    # with extra data filling container beyond the bit depth
+    filename = 'test-1234Hz-le-1ch-10S-20bit-extra.wav'
+    rate, data = wavfile.read(datafile(filename), mmap=False)
+
+    assert_equal(rate, 1234)
+    assert_(np.issubdtype(data.dtype, np.int32))
+    assert_equal(data.shape, (10,))
+
+    # All LSBytes should still be 0, because 3 B container in 4 B dtype
+    assert_equal(data & 0xff, 0)
+
+    # But it should load the data beyond 20 bits
+    assert_((data & 0xf00).any())
+
+    # Full-scale positive/negative samples, then being halved each time
+    assert_equal(data, [+0x7ffff000,       # +full-scale 20-bit
+                        -0x7ffff000,       # -full-scale 20-bit
+                        +0x7ffff000 >> 1,  # +1/2
+                        -0x7ffff000 >> 1,  # -1/2
+                        +0x7ffff000 >> 2,  # +1/4
+                        -0x7ffff000 >> 2,  # -1/4
+                        +0x7ffff000 >> 3,  # +1/8
+                        -0x7ffff000 >> 3,  # -1/8
+                        +0x7ffff000 >> 4,  # +1/16
+                        -0x7ffff000 >> 4,  # -1/16
+                        ])
+
+
+def test_36_bit_odd_size():
+    # 36-bit, 5 B container, 3 channels, 5 samples, 75 B data chunk + pad
+    filename = 'test-8000Hz-le-3ch-5S-36bit.wav'
+    rate, data = wavfile.read(datafile(filename), mmap=False)
+
+    assert_equal(rate, 8000)
+    assert_(np.issubdtype(data.dtype, np.int64))
+    assert_equal(data.shape, (5, 3))
+
+    # 28 LSBits should be 0
+    assert_equal(data & 0xfffffff, 0)
+
+    # Hand-made max/min samples under different conventions:
+    #            Fixed-point 2**(N-1)    Full-scale 2**(N-1)-1       LSB
+    correct = [[-0x8000_0000_0000_0000, -0x7fff_ffff_f000_0000, -0x2000_0000],
+               [-0x4000_0000_0000_0000, -0x3fff_ffff_f000_0000, -0x1000_0000],
+               [+0x0000_0000_0000_0000, +0x0000_0000_0000_0000, +0x0000_0000],
+               [+0x4000_0000_0000_0000, +0x3fff_ffff_f000_0000, +0x1000_0000],
+               [+0x7fff_ffff_f000_0000, +0x7fff_ffff_f000_0000, +0x2000_0000]]
+    #              ^ clipped
+
+    assert_equal(data, correct)
+
+
+def test_45_bit_even_size():
+    # 45-bit, 6 B container, 3 channels, 5 samples, 90 B data chunk
+    filename = 'test-8000Hz-le-3ch-5S-45bit.wav'
+    rate, data = wavfile.read(datafile(filename), mmap=False)
+
+    assert_equal(rate, 8000)
+    assert_(np.issubdtype(data.dtype, np.int64))
+    assert_equal(data.shape, (5, 3))
+
+    # 19 LSBits should be 0
+    assert_equal(data & 0x7ffff, 0)
+
+    # Hand-made max/min samples under different conventions:
+    #            Fixed-point 2**(N-1)    Full-scale 2**(N-1)-1      LSB
+    correct = [[-0x8000_0000_0000_0000, -0x7fff_ffff_fff8_0000, -0x10_0000],
+               [-0x4000_0000_0000_0000, -0x3fff_ffff_fff8_0000, -0x08_0000],
+               [+0x0000_0000_0000_0000, +0x0000_0000_0000_0000, +0x00_0000],
+               [+0x4000_0000_0000_0000, +0x3fff_ffff_fff8_0000, +0x08_0000],
+               [+0x7fff_ffff_fff8_0000, +0x7fff_ffff_fff8_0000, +0x10_0000]]
+    #              ^ clipped
+
+    assert_equal(data, correct)
+
+
+def test_53_bit_odd_size():
+    # 53-bit, 7 B container, 3 channels, 5 samples, 105 B data chunk + pad
+    filename = 'test-8000Hz-le-3ch-5S-53bit.wav'
+    rate, data = wavfile.read(datafile(filename), mmap=False)
+
+    assert_equal(rate, 8000)
+    assert_(np.issubdtype(data.dtype, np.int64))
+    assert_equal(data.shape, (5, 3))
+
+    # 11 LSBits should be 0
+    assert_equal(data & 0x7ff, 0)
+
+    # Hand-made max/min samples under different conventions:
+    #            Fixed-point 2**(N-1)    Full-scale 2**(N-1)-1    LSB
+    correct = [[-0x8000_0000_0000_0000, -0x7fff_ffff_ffff_f800, -0x1000],
+               [-0x4000_0000_0000_0000, -0x3fff_ffff_ffff_f800, -0x0800],
+               [+0x0000_0000_0000_0000, +0x0000_0000_0000_0000, +0x0000],
+               [+0x4000_0000_0000_0000, +0x3fff_ffff_ffff_f800, +0x0800],
+               [+0x7fff_ffff_ffff_f800, +0x7fff_ffff_ffff_f800, +0x1000]]
+    #              ^ clipped
+
+    assert_equal(data, correct)
+
+
+def test_64_bit_even_size():
+    # 64-bit, 8 B container, 3 channels, 5 samples, 120 B data chunk
+    for mmap in [False, True]:
+        filename = 'test-8000Hz-le-3ch-5S-64bit.wav'
+        rate, data = wavfile.read(datafile(filename), mmap=mmap)
+
+        assert_equal(rate, 8000)
+        assert_(np.issubdtype(data.dtype, np.int64))
+        assert_equal(data.shape, (5, 3))
+
+        # Hand-made max/min samples under different conventions:
+        #            Fixed-point 2**(N-1)    Full-scale 2**(N-1)-1   LSB
+        correct = [[-0x8000_0000_0000_0000, -0x7fff_ffff_ffff_ffff, -0x2],
+                   [-0x4000_0000_0000_0000, -0x3fff_ffff_ffff_ffff, -0x1],
+                   [+0x0000_0000_0000_0000, +0x0000_0000_0000_0000, +0x0],
+                   [+0x4000_0000_0000_0000, +0x3fff_ffff_ffff_ffff, +0x1],
+                   [+0x7fff_ffff_ffff_ffff, +0x7fff_ffff_ffff_ffff, +0x2]]
+        #              ^ clipped
+
+        assert_equal(data, correct)
+
+        del data
+
+
+def test_unsupported_mmap():
+    # Test containers that cannot be mapped to numpy types
+    for filename in {'test-8000Hz-le-3ch-5S-24bit.wav',
+                     'test-8000Hz-le-3ch-5S-36bit.wav',
+                     'test-8000Hz-le-3ch-5S-45bit.wav',
+                     'test-8000Hz-le-3ch-5S-53bit.wav',
+                     'test-1234Hz-le-1ch-10S-20bit-extra.wav'}:
+        with raises(ValueError, match="mmap.*not compatible"):
+            rate, data = wavfile.read(datafile(filename), mmap=True)
+
+
+def test_rifx():
+    # Compare equivalent RIFX and RIFF files
+    for rifx, riff in {('test-44100Hz-be-1ch-4bytes.wav',
+                        'test-44100Hz-le-1ch-4bytes.wav'),
+                       ('test-8000Hz-be-3ch-5S-24bit.wav',
+                        'test-8000Hz-le-3ch-5S-24bit.wav')}:
+        rate1, data1 = wavfile.read(datafile(rifx), mmap=False)
+        rate2, data2 = wavfile.read(datafile(riff), mmap=False)
+        assert_equal(rate1, rate2)
+        assert_equal(data1, data2)
+
+
+def test_rf64():
+    # Compare equivalent RF64 and RIFF files
+    for rf64, riff in {('test-44100Hz-le-1ch-4bytes-rf64.wav',
+                        'test-44100Hz-le-1ch-4bytes.wav'),
+                       ('test-8000Hz-le-3ch-5S-24bit-rf64.wav',
+                        'test-8000Hz-le-3ch-5S-24bit.wav')}:
+        rate1, data1 = wavfile.read(datafile(rf64), mmap=False)
+        rate2, data2 = wavfile.read(datafile(riff), mmap=False)
+        assert_array_equal(rate1, rate2)
+        assert_array_equal(data1, data2)
+
+
+@pytest.mark.xslow
+def test_write_roundtrip_rf64(tmpdir):
+    dtype = np.dtype(" 0
+                assert rate == 44100
+                # also test writing (gh-12176)
+                data[0] = 0
+
+
+def test_read_early_eof():
+    # File ends after 'fact' chunk at boundary, no data read
+    for mmap in [False, True]:
+        filename = 'test-44100Hz-le-1ch-4bytes-early-eof-no-data.wav'
+        with open(datafile(filename), 'rb') as fp:
+            with raises(ValueError, match="Unexpected end of file."):
+                wavfile.read(fp, mmap=mmap)
+
+
+def test_read_incomplete_chunk():
+    # File ends inside 'fmt ' chunk ID, no data read
+    for mmap in [False, True]:
+        filename = 'test-44100Hz-le-1ch-4bytes-incomplete-chunk.wav'
+        with open(datafile(filename), 'rb') as fp:
+            with raises(ValueError, match="Incomplete chunk ID.*b'f'"):
+                wavfile.read(fp, mmap=mmap)
+
+
+def test_read_inconsistent_header():
+    # File header's size fields contradict each other
+    for mmap in [False, True]:
+        filename = 'test-8000Hz-le-3ch-5S-24bit-inconsistent.wav'
+        with open(datafile(filename), 'rb') as fp:
+            with raises(ValueError, match="header is invalid"):
+                wavfile.read(fp, mmap=mmap)
+
+
+# signed 8-bit integer PCM is not allowed
+# unsigned > 8-bit integer PCM is not allowed
+# 8- or 16-bit float PCM is not expected
+# g and q are platform-dependent, so not included
+@pytest.mark.parametrize("dt_str", ["i2", ">i4", ">i8", ">f4", ">f8", '|u1'])
+@pytest.mark.parametrize("channels", [1, 2, 5])
+@pytest.mark.parametrize("rate", [8000, 32000])
+@pytest.mark.parametrize("mmap", [False, True])
+@pytest.mark.parametrize("realfile", [False, True])
+def test_write_roundtrip(realfile, mmap, rate, channels, dt_str, tmpdir):
+    dtype = np.dtype(dt_str)
+    if realfile:
+        tmpfile = str(tmpdir.join(str(threading.get_native_id()), 'temp.wav'))
+        os.makedirs(os.path.dirname(tmpfile), exist_ok=True)
+    else:
+        tmpfile = BytesIO()
+    data = np.random.rand(100, channels)
+    if channels == 1:
+        data = data[:, 0]
+    if dtype.kind == 'f':
+        # The range of the float type should be in [-1, 1]
+        data = data.astype(dtype)
+    else:
+        data = (data*128).astype(dtype)
+
+    wavfile.write(tmpfile, rate, data)
+
+    rate2, data2 = wavfile.read(tmpfile, mmap=mmap)
+
+    assert_equal(rate, rate2)
+    assert_(data2.dtype.byteorder in ('<', '=', '|'), msg=data2.dtype)
+    assert_array_equal(data, data2)
+    # also test writing (gh-12176)
+    if realfile:
+        data2[0] = 0
+    else:
+        with pytest.raises(ValueError, match='read-only'):
+            data2[0] = 0
+
+    if realfile and mmap and IS_PYPY and sys.platform == 'win32':
+        # windows cannot remove a dead file held by a mmap but not collected
+        # in PyPy; since the filename gets reused in this test, clean this up
+        break_cycles()
+        break_cycles()
+
+
+@pytest.mark.parametrize("dtype", [np.float16])
+def test_wavfile_dtype_unsupported(tmpdir, dtype):
+    tmpfile = str(tmpdir.join('temp.wav'))
+    rng = np.random.default_rng(1234)
+    data = rng.random((100, 5)).astype(dtype)
+    rate = 8000
+    with pytest.raises(ValueError, match="Unsupported"):
+        wavfile.write(tmpfile, rate, data)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/wavfile.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/wavfile.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6978a1c461c825e35b8a1f0d7de39fceba38bd6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/io/wavfile.py
@@ -0,0 +1,891 @@
+"""
+Module to read / write wav files using NumPy arrays
+
+Functions
+---------
+`read`: Return the sample rate (in samples/sec) and data from a WAV file.
+
+`write`: Write a NumPy array as a WAV file.
+
+"""
+import io
+import sys
+import numpy as np
+import struct
+import warnings
+from enum import IntEnum
+
+
+__all__ = [
+    'WavFileWarning',
+    'read',
+    'write'
+]
+
+
+class WavFileWarning(UserWarning):
+    pass
+
+
+class WAVE_FORMAT(IntEnum):
+    """
+    WAVE form wFormatTag IDs
+
+    Complete list is in mmreg.h in Windows 10 SDK.  ALAC and OPUS are the
+    newest additions, in v10.0.14393 2016-07
+    """
+    UNKNOWN = 0x0000
+    PCM = 0x0001
+    ADPCM = 0x0002
+    IEEE_FLOAT = 0x0003
+    VSELP = 0x0004
+    IBM_CVSD = 0x0005
+    ALAW = 0x0006
+    MULAW = 0x0007
+    DTS = 0x0008
+    DRM = 0x0009
+    WMAVOICE9 = 0x000A
+    WMAVOICE10 = 0x000B
+    OKI_ADPCM = 0x0010
+    DVI_ADPCM = 0x0011
+    IMA_ADPCM = 0x0011  # Duplicate
+    MEDIASPACE_ADPCM = 0x0012
+    SIERRA_ADPCM = 0x0013
+    G723_ADPCM = 0x0014
+    DIGISTD = 0x0015
+    DIGIFIX = 0x0016
+    DIALOGIC_OKI_ADPCM = 0x0017
+    MEDIAVISION_ADPCM = 0x0018
+    CU_CODEC = 0x0019
+    HP_DYN_VOICE = 0x001A
+    YAMAHA_ADPCM = 0x0020
+    SONARC = 0x0021
+    DSPGROUP_TRUESPEECH = 0x0022
+    ECHOSC1 = 0x0023
+    AUDIOFILE_AF36 = 0x0024
+    APTX = 0x0025
+    AUDIOFILE_AF10 = 0x0026
+    PROSODY_1612 = 0x0027
+    LRC = 0x0028
+    DOLBY_AC2 = 0x0030
+    GSM610 = 0x0031
+    MSNAUDIO = 0x0032
+    ANTEX_ADPCME = 0x0033
+    CONTROL_RES_VQLPC = 0x0034
+    DIGIREAL = 0x0035
+    DIGIADPCM = 0x0036
+    CONTROL_RES_CR10 = 0x0037
+    NMS_VBXADPCM = 0x0038
+    CS_IMAADPCM = 0x0039
+    ECHOSC3 = 0x003A
+    ROCKWELL_ADPCM = 0x003B
+    ROCKWELL_DIGITALK = 0x003C
+    XEBEC = 0x003D
+    G721_ADPCM = 0x0040
+    G728_CELP = 0x0041
+    MSG723 = 0x0042
+    INTEL_G723_1 = 0x0043
+    INTEL_G729 = 0x0044
+    SHARP_G726 = 0x0045
+    MPEG = 0x0050
+    RT24 = 0x0052
+    PAC = 0x0053
+    MPEGLAYER3 = 0x0055
+    LUCENT_G723 = 0x0059
+    CIRRUS = 0x0060
+    ESPCM = 0x0061
+    VOXWARE = 0x0062
+    CANOPUS_ATRAC = 0x0063
+    G726_ADPCM = 0x0064
+    G722_ADPCM = 0x0065
+    DSAT = 0x0066
+    DSAT_DISPLAY = 0x0067
+    VOXWARE_BYTE_ALIGNED = 0x0069
+    VOXWARE_AC8 = 0x0070
+    VOXWARE_AC10 = 0x0071
+    VOXWARE_AC16 = 0x0072
+    VOXWARE_AC20 = 0x0073
+    VOXWARE_RT24 = 0x0074
+    VOXWARE_RT29 = 0x0075
+    VOXWARE_RT29HW = 0x0076
+    VOXWARE_VR12 = 0x0077
+    VOXWARE_VR18 = 0x0078
+    VOXWARE_TQ40 = 0x0079
+    VOXWARE_SC3 = 0x007A
+    VOXWARE_SC3_1 = 0x007B
+    SOFTSOUND = 0x0080
+    VOXWARE_TQ60 = 0x0081
+    MSRT24 = 0x0082
+    G729A = 0x0083
+    MVI_MVI2 = 0x0084
+    DF_G726 = 0x0085
+    DF_GSM610 = 0x0086
+    ISIAUDIO = 0x0088
+    ONLIVE = 0x0089
+    MULTITUDE_FT_SX20 = 0x008A
+    INFOCOM_ITS_G721_ADPCM = 0x008B
+    CONVEDIA_G729 = 0x008C
+    CONGRUENCY = 0x008D
+    SBC24 = 0x0091
+    DOLBY_AC3_SPDIF = 0x0092
+    MEDIASONIC_G723 = 0x0093
+    PROSODY_8KBPS = 0x0094
+    ZYXEL_ADPCM = 0x0097
+    PHILIPS_LPCBB = 0x0098
+    PACKED = 0x0099
+    MALDEN_PHONYTALK = 0x00A0
+    RACAL_RECORDER_GSM = 0x00A1
+    RACAL_RECORDER_G720_A = 0x00A2
+    RACAL_RECORDER_G723_1 = 0x00A3
+    RACAL_RECORDER_TETRA_ACELP = 0x00A4
+    NEC_AAC = 0x00B0
+    RAW_AAC1 = 0x00FF
+    RHETOREX_ADPCM = 0x0100
+    IRAT = 0x0101
+    VIVO_G723 = 0x0111
+    VIVO_SIREN = 0x0112
+    PHILIPS_CELP = 0x0120
+    PHILIPS_GRUNDIG = 0x0121
+    DIGITAL_G723 = 0x0123
+    SANYO_LD_ADPCM = 0x0125
+    SIPROLAB_ACEPLNET = 0x0130
+    SIPROLAB_ACELP4800 = 0x0131
+    SIPROLAB_ACELP8V3 = 0x0132
+    SIPROLAB_G729 = 0x0133
+    SIPROLAB_G729A = 0x0134
+    SIPROLAB_KELVIN = 0x0135
+    VOICEAGE_AMR = 0x0136
+    G726ADPCM = 0x0140
+    DICTAPHONE_CELP68 = 0x0141
+    DICTAPHONE_CELP54 = 0x0142
+    QUALCOMM_PUREVOICE = 0x0150
+    QUALCOMM_HALFRATE = 0x0151
+    TUBGSM = 0x0155
+    MSAUDIO1 = 0x0160
+    WMAUDIO2 = 0x0161
+    WMAUDIO3 = 0x0162
+    WMAUDIO_LOSSLESS = 0x0163
+    WMASPDIF = 0x0164
+    UNISYS_NAP_ADPCM = 0x0170
+    UNISYS_NAP_ULAW = 0x0171
+    UNISYS_NAP_ALAW = 0x0172
+    UNISYS_NAP_16K = 0x0173
+    SYCOM_ACM_SYC008 = 0x0174
+    SYCOM_ACM_SYC701_G726L = 0x0175
+    SYCOM_ACM_SYC701_CELP54 = 0x0176
+    SYCOM_ACM_SYC701_CELP68 = 0x0177
+    KNOWLEDGE_ADVENTURE_ADPCM = 0x0178
+    FRAUNHOFER_IIS_MPEG2_AAC = 0x0180
+    DTS_DS = 0x0190
+    CREATIVE_ADPCM = 0x0200
+    CREATIVE_FASTSPEECH8 = 0x0202
+    CREATIVE_FASTSPEECH10 = 0x0203
+    UHER_ADPCM = 0x0210
+    ULEAD_DV_AUDIO = 0x0215
+    ULEAD_DV_AUDIO_1 = 0x0216
+    QUARTERDECK = 0x0220
+    ILINK_VC = 0x0230
+    RAW_SPORT = 0x0240
+    ESST_AC3 = 0x0241
+    GENERIC_PASSTHRU = 0x0249
+    IPI_HSX = 0x0250
+    IPI_RPELP = 0x0251
+    CS2 = 0x0260
+    SONY_SCX = 0x0270
+    SONY_SCY = 0x0271
+    SONY_ATRAC3 = 0x0272
+    SONY_SPC = 0x0273
+    TELUM_AUDIO = 0x0280
+    TELUM_IA_AUDIO = 0x0281
+    NORCOM_VOICE_SYSTEMS_ADPCM = 0x0285
+    FM_TOWNS_SND = 0x0300
+    MICRONAS = 0x0350
+    MICRONAS_CELP833 = 0x0351
+    BTV_DIGITAL = 0x0400
+    INTEL_MUSIC_CODER = 0x0401
+    INDEO_AUDIO = 0x0402
+    QDESIGN_MUSIC = 0x0450
+    ON2_VP7_AUDIO = 0x0500
+    ON2_VP6_AUDIO = 0x0501
+    VME_VMPCM = 0x0680
+    TPC = 0x0681
+    LIGHTWAVE_LOSSLESS = 0x08AE
+    OLIGSM = 0x1000
+    OLIADPCM = 0x1001
+    OLICELP = 0x1002
+    OLISBC = 0x1003
+    OLIOPR = 0x1004
+    LH_CODEC = 0x1100
+    LH_CODEC_CELP = 0x1101
+    LH_CODEC_SBC8 = 0x1102
+    LH_CODEC_SBC12 = 0x1103
+    LH_CODEC_SBC16 = 0x1104
+    NORRIS = 0x1400
+    ISIAUDIO_2 = 0x1401
+    SOUNDSPACE_MUSICOMPRESS = 0x1500
+    MPEG_ADTS_AAC = 0x1600
+    MPEG_RAW_AAC = 0x1601
+    MPEG_LOAS = 0x1602
+    NOKIA_MPEG_ADTS_AAC = 0x1608
+    NOKIA_MPEG_RAW_AAC = 0x1609
+    VODAFONE_MPEG_ADTS_AAC = 0x160A
+    VODAFONE_MPEG_RAW_AAC = 0x160B
+    MPEG_HEAAC = 0x1610
+    VOXWARE_RT24_SPEECH = 0x181C
+    SONICFOUNDRY_LOSSLESS = 0x1971
+    INNINGS_TELECOM_ADPCM = 0x1979
+    LUCENT_SX8300P = 0x1C07
+    LUCENT_SX5363S = 0x1C0C
+    CUSEEME = 0x1F03
+    NTCSOFT_ALF2CM_ACM = 0x1FC4
+    DVM = 0x2000
+    DTS2 = 0x2001
+    MAKEAVIS = 0x3313
+    DIVIO_MPEG4_AAC = 0x4143
+    NOKIA_ADAPTIVE_MULTIRATE = 0x4201
+    DIVIO_G726 = 0x4243
+    LEAD_SPEECH = 0x434C
+    LEAD_VORBIS = 0x564C
+    WAVPACK_AUDIO = 0x5756
+    OGG_VORBIS_MODE_1 = 0x674F
+    OGG_VORBIS_MODE_2 = 0x6750
+    OGG_VORBIS_MODE_3 = 0x6751
+    OGG_VORBIS_MODE_1_PLUS = 0x676F
+    OGG_VORBIS_MODE_2_PLUS = 0x6770
+    OGG_VORBIS_MODE_3_PLUS = 0x6771
+    ALAC = 0x6C61
+    _3COM_NBX = 0x7000  # Can't have leading digit
+    OPUS = 0x704F
+    FAAD_AAC = 0x706D
+    AMR_NB = 0x7361
+    AMR_WB = 0x7362
+    AMR_WP = 0x7363
+    GSM_AMR_CBR = 0x7A21
+    GSM_AMR_VBR_SID = 0x7A22
+    COMVERSE_INFOSYS_G723_1 = 0xA100
+    COMVERSE_INFOSYS_AVQSBC = 0xA101
+    COMVERSE_INFOSYS_SBC = 0xA102
+    SYMBOL_G729_A = 0xA103
+    VOICEAGE_AMR_WB = 0xA104
+    INGENIENT_G726 = 0xA105
+    MPEG4_AAC = 0xA106
+    ENCORE_G726 = 0xA107
+    ZOLL_ASAO = 0xA108
+    SPEEX_VOICE = 0xA109
+    VIANIX_MASC = 0xA10A
+    WM9_SPECTRUM_ANALYZER = 0xA10B
+    WMF_SPECTRUM_ANAYZER = 0xA10C
+    GSM_610 = 0xA10D
+    GSM_620 = 0xA10E
+    GSM_660 = 0xA10F
+    GSM_690 = 0xA110
+    GSM_ADAPTIVE_MULTIRATE_WB = 0xA111
+    POLYCOM_G722 = 0xA112
+    POLYCOM_G728 = 0xA113
+    POLYCOM_G729_A = 0xA114
+    POLYCOM_SIREN = 0xA115
+    GLOBAL_IP_ILBC = 0xA116
+    RADIOTIME_TIME_SHIFT_RADIO = 0xA117
+    NICE_ACA = 0xA118
+    NICE_ADPCM = 0xA119
+    VOCORD_G721 = 0xA11A
+    VOCORD_G726 = 0xA11B
+    VOCORD_G722_1 = 0xA11C
+    VOCORD_G728 = 0xA11D
+    VOCORD_G729 = 0xA11E
+    VOCORD_G729_A = 0xA11F
+    VOCORD_G723_1 = 0xA120
+    VOCORD_LBC = 0xA121
+    NICE_G728 = 0xA122
+    FRACE_TELECOM_G729 = 0xA123
+    CODIAN = 0xA124
+    FLAC = 0xF1AC
+    EXTENSIBLE = 0xFFFE
+    DEVELOPMENT = 0xFFFF
+
+
+KNOWN_WAVE_FORMATS = {WAVE_FORMAT.PCM, WAVE_FORMAT.IEEE_FLOAT}
+
+
+def _raise_bad_format(format_tag):
+    try:
+        format_name = WAVE_FORMAT(format_tag).name
+    except ValueError:
+        format_name = f'{format_tag:#06x}'
+    raise ValueError(f"Unknown wave file format: {format_name}. Supported "
+                     "formats: " +
+                     ', '.join(x.name for x in KNOWN_WAVE_FORMATS))
+
+
+def _read_fmt_chunk(fid, is_big_endian):
+    """
+    Returns
+    -------
+    size : int
+        size of format subchunk in bytes (minus 8 for "fmt " and itself)
+    format_tag : int
+        PCM, float, or compressed format
+    channels : int
+        number of channels
+    fs : int
+        sampling frequency in samples per second
+    bytes_per_second : int
+        overall byte rate for the file
+    block_align : int
+        bytes per sample, including all channels
+    bit_depth : int
+        bits per sample
+
+    Notes
+    -----
+    Assumes file pointer is immediately after the 'fmt ' id
+    """
+    if is_big_endian:
+        fmt = '>'
+    else:
+        fmt = '<'
+
+    size = struct.unpack(fmt+'I', fid.read(4))[0]
+
+    if size < 16:
+        raise ValueError("Binary structure of wave file is not compliant")
+
+    res = struct.unpack(fmt+'HHIIHH', fid.read(16))
+    bytes_read = 16
+
+    format_tag, channels, fs, bytes_per_second, block_align, bit_depth = res
+
+    if format_tag == WAVE_FORMAT.EXTENSIBLE and size >= (16+2):
+        ext_chunk_size = struct.unpack(fmt+'H', fid.read(2))[0]
+        bytes_read += 2
+        if ext_chunk_size >= 22:
+            extensible_chunk_data = fid.read(22)
+            bytes_read += 22
+            raw_guid = extensible_chunk_data[2+4:2+4+16]
+            # GUID template {XXXXXXXX-0000-0010-8000-00AA00389B71} (RFC-2361)
+            # MS GUID byte order: first three groups are native byte order,
+            # rest is Big Endian
+            if is_big_endian:
+                tail = b'\x00\x00\x00\x10\x80\x00\x00\xAA\x00\x38\x9B\x71'
+            else:
+                tail = b'\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71'
+            if raw_guid.endswith(tail):
+                format_tag = struct.unpack(fmt+'I', raw_guid[:4])[0]
+        else:
+            raise ValueError("Binary structure of wave file is not compliant")
+
+    if format_tag not in KNOWN_WAVE_FORMATS:
+        _raise_bad_format(format_tag)
+
+    # move file pointer to next chunk
+    if size > bytes_read:
+        fid.read(size - bytes_read)
+
+    # fmt should always be 16, 18 or 40, but handle it just in case
+    _handle_pad_byte(fid, size)
+
+    if format_tag == WAVE_FORMAT.PCM:
+        if bytes_per_second != fs * block_align:
+            raise ValueError("WAV header is invalid: nAvgBytesPerSec must"
+                             " equal product of nSamplesPerSec and"
+                             " nBlockAlign, but file has nSamplesPerSec ="
+                             f" {fs}, nBlockAlign = {block_align}, and"
+                             f" nAvgBytesPerSec = {bytes_per_second}")
+
+    return (size, format_tag, channels, fs, bytes_per_second, block_align,
+            bit_depth)
+
+
+def _read_data_chunk(fid, format_tag, channels, bit_depth, is_big_endian, is_rf64,
+                     block_align, mmap=False):
+    """
+    Notes
+    -----
+    Assumes file pointer is immediately after the 'data' id
+
+    It's possible to not use all available bits in a container, or to store
+    samples in a container bigger than necessary, so bytes_per_sample uses
+    the actual reported container size (nBlockAlign / nChannels).  Real-world
+    examples:
+
+    Adobe Audition's "24-bit packed int (type 1, 20-bit)"
+
+        nChannels = 2, nBlockAlign = 6, wBitsPerSample = 20
+
+    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples/AFsp/M1F1-int12-AFsp.wav
+    is:
+
+        nChannels = 2, nBlockAlign = 4, wBitsPerSample = 12
+
+    http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/multichaudP.pdf
+    gives an example of:
+
+        nChannels = 2, nBlockAlign = 8, wBitsPerSample = 20
+    """
+    if is_big_endian:
+        fmt = '>'
+    else:
+        fmt = '<'
+
+    # Size of the data subchunk in bytes
+    if not is_rf64:
+        size = struct.unpack(fmt+'I', fid.read(4))[0]
+    else:
+        pos = fid.tell()
+        # chunk size is stored in global file header for RF64
+        fid.seek(28)
+        size = struct.unpack(' 1:
+        data = data.reshape(-1, channels)
+    return data
+
+
+def _skip_unknown_chunk(fid, is_big_endian):
+    if is_big_endian:
+        fmt = '>I'
+    else:
+        fmt = '>> from os.path import dirname, join as pjoin
+    >>> from scipy.io import wavfile
+    >>> import scipy.io
+
+    Get the filename for an example .wav file from the tests/data directory.
+
+    >>> data_dir = pjoin(dirname(scipy.io.__file__), 'tests', 'data')
+    >>> wav_fname = pjoin(data_dir, 'test-44100Hz-2ch-32bit-float-be.wav')
+
+    Load the .wav file contents.
+
+    >>> samplerate, data = wavfile.read(wav_fname)
+    >>> print(f"number of channels = {data.shape[1]}")
+    number of channels = 2
+    >>> length = data.shape[0] / samplerate
+    >>> print(f"length = {length}s")
+    length = 0.01s
+
+    Plot the waveform.
+
+    >>> import matplotlib.pyplot as plt
+    >>> import numpy as np
+    >>> time = np.linspace(0., length, data.shape[0])
+    >>> plt.plot(time, data[:, 0], label="Left channel")
+    >>> plt.plot(time, data[:, 1], label="Right channel")
+    >>> plt.legend()
+    >>> plt.xlabel("Time [s]")
+    >>> plt.ylabel("Amplitude")
+    >>> plt.show()
+
+    """
+    if hasattr(filename, 'read'):
+        fid = filename
+        mmap = False
+    else:
+        fid = open(filename, 'rb')
+
+    try:
+        file_size, is_big_endian, is_rf64 = _read_riff_chunk(fid)
+        fmt_chunk_received = False
+        data_chunk_received = False
+        while fid.tell() < file_size:
+            # read the next chunk
+            chunk_id = fid.read(4)
+
+            if not chunk_id:
+                if data_chunk_received:
+                    # End of file but data successfully read
+                    warnings.warn(
+                        f"Reached EOF prematurely; finished at {fid.tell():d} bytes, "
+                        f"expected {file_size:d} bytes from header.",
+                        WavFileWarning, stacklevel=2)
+                    break
+                else:
+                    raise ValueError("Unexpected end of file.")
+            elif len(chunk_id) < 4:
+                msg = f"Incomplete chunk ID: {repr(chunk_id)}"
+                # If we have the data, ignore the broken chunk
+                if fmt_chunk_received and data_chunk_received:
+                    warnings.warn(msg + ", ignoring it.", WavFileWarning,
+                                  stacklevel=2)
+                else:
+                    raise ValueError(msg)
+
+            if chunk_id == b'fmt ':
+                fmt_chunk_received = True
+                fmt_chunk = _read_fmt_chunk(fid, is_big_endian)
+                format_tag, channels, fs = fmt_chunk[1:4]
+                bit_depth = fmt_chunk[6]
+                block_align = fmt_chunk[5]
+            elif chunk_id == b'fact':
+                _skip_unknown_chunk(fid, is_big_endian)
+            elif chunk_id == b'data':
+                data_chunk_received = True
+                if not fmt_chunk_received:
+                    raise ValueError("No fmt chunk before data")
+                data = _read_data_chunk(fid, format_tag, channels, bit_depth,
+                                        is_big_endian, is_rf64, block_align, mmap)
+            elif chunk_id == b'LIST':
+                # Someday this could be handled properly but for now skip it
+                _skip_unknown_chunk(fid, is_big_endian)
+            elif chunk_id in {b'JUNK', b'Fake'}:
+                # Skip alignment chunks without warning
+                _skip_unknown_chunk(fid, is_big_endian)
+            else:
+                warnings.warn("Chunk (non-data) not understood, skipping it.",
+                              WavFileWarning, stacklevel=2)
+                _skip_unknown_chunk(fid, is_big_endian)
+    finally:
+        if not hasattr(filename, 'read'):
+            fid.close()
+        else:
+            fid.seek(0)
+
+    return fs, data
+
+
+def write(filename, rate, data):
+    """
+    Write a NumPy array as a WAV file.
+
+    Parameters
+    ----------
+    filename : string or open file handle
+        Output wav file.
+    rate : int
+        The sample rate (in samples/sec).
+    data : ndarray
+        A 1-D or 2-D NumPy array of either integer or float data-type.
+
+    Notes
+    -----
+    * Writes a simple uncompressed WAV file.
+    * To write multiple-channels, use a 2-D array of shape
+      (Nsamples, Nchannels).
+    * The bits-per-sample and PCM/float will be determined by the data-type.
+
+    Common data types: [1]_
+
+    =====================  ===========  ===========  =============
+         WAV format            Min          Max       NumPy dtype
+    =====================  ===========  ===========  =============
+    32-bit floating-point  -1.0         +1.0         float32
+    32-bit PCM             -2147483648  +2147483647  int32
+    16-bit PCM             -32768       +32767       int16
+    8-bit PCM              0            255          uint8
+    =====================  ===========  ===========  =============
+
+    Note that 8-bit PCM is unsigned.
+
+    References
+    ----------
+    .. [1] IBM Corporation and Microsoft Corporation, "Multimedia Programming
+       Interface and Data Specifications 1.0", section "Data Format of the
+       Samples", August 1991
+       http://www.tactilemedia.com/info/MCI_Control_Info.html
+
+    Examples
+    --------
+    Create a 100Hz sine wave, sampled at 44100Hz.
+    Write to 16-bit PCM, Mono.
+
+    >>> from scipy.io.wavfile import write
+    >>> import numpy as np
+    >>> samplerate = 44100; fs = 100
+    >>> t = np.linspace(0., 1., samplerate)
+    >>> amplitude = np.iinfo(np.int16).max
+    >>> data = amplitude * np.sin(2. * np.pi * fs * t)
+    >>> write("example.wav", samplerate, data.astype(np.int16))
+
+    """
+    if hasattr(filename, 'write'):
+        fid = filename
+    else:
+        fid = open(filename, 'wb')
+
+    fs = rate
+
+    try:
+        dkind = data.dtype.kind
+        allowed_dtypes = ['float32', 'float64',
+                          'uint8', 'int16', 'int32', 'int64']
+        if data.dtype.name not in allowed_dtypes:
+            raise ValueError(f"Unsupported data type '{data.dtype}'")
+
+        header_data = b''
+
+        header_data += b'RIFF'
+        header_data += b'\x00\x00\x00\x00'
+        header_data += b'WAVE'
+
+        # fmt chunk
+        header_data += b'fmt '
+        if dkind == 'f':
+            format_tag = WAVE_FORMAT.IEEE_FLOAT
+        else:
+            format_tag = WAVE_FORMAT.PCM
+        if data.ndim == 1:
+            channels = 1
+        else:
+            channels = data.shape[1]
+        bit_depth = data.dtype.itemsize * 8
+        bytes_per_second = fs*(bit_depth // 8)*channels
+        block_align = channels * (bit_depth // 8)
+
+        fmt_chunk_data = struct.pack(' 0xFFFFFFFF
+        if is_rf64:
+            header_data = b''
+            header_data += b'RF64'
+            header_data += b'\xFF\xFF\xFF\xFF'
+            header_data += b'WAVE'
+            header_data += b'ds64'
+            # size of ds64 chunk
+            header_data += struct.pack('' or (data.dtype.byteorder == '=' and
+                                           sys.byteorder == 'big'):
+            data = data.byteswap()
+        _array_tofile(fid, data)
+
+        # Determine file size and place it in correct
+        # position at start of the file or the data chunk.
+        size = fid.tell()
+        if not is_rf64:
+            fid.seek(4)
+            fid.write(struct.pack('`__
+   for more linear algebra functions. Note that
+   although `scipy.linalg` imports most of them, identically named
+   functions from `scipy.linalg` may offer more or slightly differing
+   functionality.
+
+
+Basics
+======
+
+.. autosummary::
+   :toctree: generated/
+
+   inv - Find the inverse of a square matrix
+   solve - Solve a linear system of equations
+   solve_banded - Solve a banded linear system
+   solveh_banded - Solve a Hermitian or symmetric banded system
+   solve_circulant - Solve a circulant system
+   solve_triangular - Solve a triangular matrix
+   solve_toeplitz - Solve a toeplitz matrix
+   matmul_toeplitz - Multiply a Toeplitz matrix with an array.
+   det - Find the determinant of a square matrix
+   norm - Matrix and vector norm
+   lstsq - Solve a linear least-squares problem
+   pinv - Pseudo-inverse (Moore-Penrose) using lstsq
+   pinvh - Pseudo-inverse of hermitian matrix
+   kron - Kronecker product of two arrays
+   khatri_rao - Khatri-Rao product of two arrays
+   orthogonal_procrustes - Solve an orthogonal Procrustes problem
+   matrix_balance - Balance matrix entries with a similarity transformation
+   subspace_angles - Compute the subspace angles between two matrices
+   bandwidth - Return the lower and upper bandwidth of an array
+   issymmetric - Check if a square 2D array is symmetric
+   ishermitian - Check if a square 2D array is Hermitian
+   LinAlgError
+   LinAlgWarning
+
+Eigenvalue Problems
+===================
+
+.. autosummary::
+   :toctree: generated/
+
+   eig - Find the eigenvalues and eigenvectors of a square matrix
+   eigvals - Find just the eigenvalues of a square matrix
+   eigh - Find the e-vals and e-vectors of a Hermitian or symmetric matrix
+   eigvalsh - Find just the eigenvalues of a Hermitian or symmetric matrix
+   eig_banded - Find the eigenvalues and eigenvectors of a banded matrix
+   eigvals_banded - Find just the eigenvalues of a banded matrix
+   eigh_tridiagonal - Find the eigenvalues and eigenvectors of a tridiagonal matrix
+   eigvalsh_tridiagonal - Find just the eigenvalues of a tridiagonal matrix
+
+Decompositions
+==============
+
+.. autosummary::
+   :toctree: generated/
+
+   lu - LU decomposition of a matrix
+   lu_factor - LU decomposition returning unordered matrix and pivots
+   lu_solve - Solve Ax=b using back substitution with output of lu_factor
+   svd - Singular value decomposition of a matrix
+   svdvals - Singular values of a matrix
+   diagsvd - Construct matrix of singular values from output of svd
+   orth - Construct orthonormal basis for the range of A using svd
+   null_space - Construct orthonormal basis for the null space of A using svd
+   ldl - LDL.T decomposition of a Hermitian or a symmetric matrix.
+   cholesky - Cholesky decomposition of a matrix
+   cholesky_banded - Cholesky decomp. of a sym. or Hermitian banded matrix
+   cho_factor - Cholesky decomposition for use in solving a linear system
+   cho_solve - Solve previously factored linear system
+   cho_solve_banded - Solve previously factored banded linear system
+   polar - Compute the polar decomposition.
+   qr - QR decomposition of a matrix
+   qr_multiply - QR decomposition and multiplication by Q
+   qr_update - Rank k QR update
+   qr_delete - QR downdate on row or column deletion
+   qr_insert - QR update on row or column insertion
+   rq - RQ decomposition of a matrix
+   qz - QZ decomposition of a pair of matrices
+   ordqz - QZ decomposition of a pair of matrices with reordering
+   schur - Schur decomposition of a matrix
+   rsf2csf - Real to complex Schur form
+   hessenberg - Hessenberg form of a matrix
+   cdf2rdf - Complex diagonal form to real diagonal block form
+   cossin - Cosine sine decomposition of a unitary or orthogonal matrix
+
+.. seealso::
+
+   `scipy.linalg.interpolative` -- Interpolative matrix decompositions
+
+
+Matrix Functions
+================
+
+.. autosummary::
+   :toctree: generated/
+
+   expm - Matrix exponential
+   logm - Matrix logarithm
+   cosm - Matrix cosine
+   sinm - Matrix sine
+   tanm - Matrix tangent
+   coshm - Matrix hyperbolic cosine
+   sinhm - Matrix hyperbolic sine
+   tanhm - Matrix hyperbolic tangent
+   signm - Matrix sign
+   sqrtm - Matrix square root
+   funm - Evaluating an arbitrary matrix function
+   expm_frechet - Frechet derivative of the matrix exponential
+   expm_cond - Relative condition number of expm in the Frobenius norm
+   fractional_matrix_power - Fractional matrix power
+
+
+Matrix Equation Solvers
+=======================
+
+.. autosummary::
+   :toctree: generated/
+
+   solve_sylvester - Solve the Sylvester matrix equation
+   solve_continuous_are - Solve the continuous-time algebraic Riccati equation
+   solve_discrete_are - Solve the discrete-time algebraic Riccati equation
+   solve_continuous_lyapunov - Solve the continuous-time Lyapunov equation
+   solve_discrete_lyapunov - Solve the discrete-time Lyapunov equation
+
+
+Sketches and Random Projections
+===============================
+
+.. autosummary::
+   :toctree: generated/
+
+   clarkson_woodruff_transform - Applies the Clarkson Woodruff Sketch (a.k.a CountMin Sketch)
+
+Special Matrices
+================
+
+.. autosummary::
+   :toctree: generated/
+
+   block_diag - Construct a block diagonal matrix from submatrices
+   circulant - Circulant matrix
+   companion - Companion matrix
+   convolution_matrix - Convolution matrix
+   dft - Discrete Fourier transform matrix
+   fiedler - Fiedler matrix
+   fiedler_companion - Fiedler companion matrix
+   hadamard - Hadamard matrix of order 2**n
+   hankel - Hankel matrix
+   helmert - Helmert matrix
+   hilbert - Hilbert matrix
+   invhilbert - Inverse Hilbert matrix
+   leslie - Leslie matrix
+   pascal - Pascal matrix
+   invpascal - Inverse Pascal matrix
+   toeplitz - Toeplitz matrix
+
+Low-level routines
+==================
+
+.. autosummary::
+   :toctree: generated/
+
+   get_blas_funcs
+   get_lapack_funcs
+   find_best_blas_type
+
+.. seealso::
+
+   `scipy.linalg.blas` -- Low-level BLAS functions
+
+   `scipy.linalg.lapack` -- Low-level LAPACK functions
+
+   `scipy.linalg.cython_blas` -- Low-level BLAS functions for Cython
+
+   `scipy.linalg.cython_lapack` -- Low-level LAPACK functions for Cython
+
+"""  # noqa: E501
+
+from ._misc import *
+from ._cythonized_array_utils import *
+from ._basic import *
+from ._decomp import *
+from ._decomp_lu import *
+from ._decomp_ldl import *
+from ._decomp_cholesky import *
+from ._decomp_qr import *
+from ._decomp_qz import *
+from ._decomp_svd import *
+from ._decomp_schur import *
+from ._decomp_polar import *
+from ._matfuncs import *
+from .blas import *
+from .lapack import *
+from ._special_matrices import *
+from ._solvers import *
+from ._procrustes import *
+from ._decomp_update import *
+from ._sketches import *
+from ._decomp_cossin import *
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import (
+    decomp, decomp_cholesky, decomp_lu, decomp_qr, decomp_svd, decomp_schur,
+    basic, misc, special_matrices, matfuncs,
+)
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1e6d24b8e00dc1fcf1b19b930605bb15184f909f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_basic.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_basic.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..837e024173df503c14346488d4ee5d72d0d51b8f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_basic.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ab9f5dc81f2fa3d5e69cd3e6d8f0430ccb89587f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1a3b03f53809ffe629410c9e01ca57ff7d6db1cb
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cholesky.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cossin.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cossin.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..692b8548d657942f2e1bff569d569875352f0d2b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_cossin.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7d903a8cff0587c7f9fb3cc2b43761e315fc28d0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_ldl.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_lu.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_lu.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2b8f41c38eb762809457789f618a092feb2d80b5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_lu.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f794ef909bb2fa973cdd25a244ccc97f0e8870d0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_polar.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b78145db3fddd219aaa34a49893ad7ec635eee5a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qz.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qz.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c2996fde63e23bc0856eb155fa996099229e16ed
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_qz.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..884eb6fe033fabaf2c4fb08b9920a480193dc1b6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_schur.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f84d6e8c2d48ce4c7a0ce7489b4ca3fb36b8a2ea
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_decomp_svd.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aa3eb927d1037ed6bcdaebf146d794eed867e770
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_expm_frechet.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..307547312fdb05f5c5e146209aa6b3bc9cf458da
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs_sqrtm.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs_sqrtm.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ca8324f08d0c3e999dd731047c851414a32850ad
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_matfuncs_sqrtm.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_misc.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_misc.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a0d89b02b70d7d4820bca254e7c713aa3e54f7f7
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_misc.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e100475c708e43f3c4997d00b3fffaf02c2b9ef4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_procrustes.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_sketches.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_sketches.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3ef609866d854b68424841af79cc5a029c810070
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_sketches.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8738b69cc98673d9b6b9a88553387c2a03ebb2dd
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_solvers.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..47ed08998d2a1f19ddbde1e64f51ef5c9eec761b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/_special_matrices.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/basic.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/basic.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..191e0477418c183bd501e57953b8d914c95d2d78
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/basic.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/blas.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/blas.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5f070d74c6747eb1b825431cccba17dfb684f097
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/blas.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..44ddbce4591ae37898c74e85bab8b4e2d00a7826
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..865a686192b3b4081ef0d895c162ca152035830a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_cholesky.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_lu.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_lu.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..48d16c95280dd33c9b56cb4b4e87c35d9543b7a6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_lu.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_qr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_qr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aa808b28f271da5f5e95ad200b04d21089517fcf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_qr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_schur.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_schur.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4471f4b860f93609b9bc146c4d891298c0dec03c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_schur.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_svd.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_svd.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..95f065bbaaaefae61b1961e086979ee7af2c012a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/decomp_svd.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/interpolative.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/interpolative.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6bff40d445e443aa213909d470581c1ea825f491
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/interpolative.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..60f359fe308c4bc63979d21f26a4552517ca8701
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/lapack.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/matfuncs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/matfuncs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aac79eb43dfd5d759ca159ec939916a37a8f85de
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/matfuncs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7ea1f73a2068bd7cafe8155803d363d812d39d35
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/misc.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7c2cf0cb71f88af28c0414cd2cb01243cf0456de
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/__pycache__/special_matrices.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..70841fa80976c62ed7d894d824fdfbbcb4673273
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_basic.py
@@ -0,0 +1,2119 @@
+#
+# Author: Pearu Peterson, March 2002
+#
+# w/ additions by Travis Oliphant, March 2002
+#              and Jake Vanderplas, August 2012
+
+import warnings
+from warnings import warn
+from itertools import product
+import numpy as np
+from numpy import atleast_1d, atleast_2d
+from .lapack import get_lapack_funcs, _compute_lwork
+from ._misc import LinAlgError, _datacopied, LinAlgWarning
+from ._decomp import _asarray_validated
+from . import _decomp, _decomp_svd
+from ._solve_toeplitz import levinson
+from ._cythonized_array_utils import (find_det_from_lu, bandwidth, issymmetric,
+                                      ishermitian)
+
+__all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded',
+           'solve_toeplitz', 'solve_circulant', 'inv', 'det', 'lstsq',
+           'pinv', 'pinvh', 'matrix_balance', 'matmul_toeplitz']
+
+
+# The numpy facilities for type-casting checks are too slow for small sized
+# arrays and eat away the time budget for the checkups. Here we set a
+# precomputed dict container of the numpy.can_cast() table.
+
+# It can be used to determine quickly what a dtype can be cast to LAPACK
+# compatible types, i.e., 'float32, float64, complex64, complex128'.
+# Then it can be checked via "casting_dict[arr.dtype.char]"
+lapack_cast_dict = {x: ''.join([y for y in 'fdFD' if np.can_cast(x, y)])
+                    for x in np.typecodes['All']}
+
+
+# Linear equations
+def _solve_check(n, info, lamch=None, rcond=None):
+    """ Check arguments during the different steps of the solution phase """
+    if info < 0:
+        raise ValueError(f'LAPACK reported an illegal value in {-info}-th argument.')
+    elif 0 < info:
+        raise LinAlgError('Matrix is singular.')
+
+    if lamch is None:
+        return
+    E = lamch('E')
+    if rcond < E:
+        warn(f'Ill-conditioned matrix (rcond={rcond:.6g}): '
+             'result may not be accurate.',
+             LinAlgWarning, stacklevel=3)
+
+
+def _find_matrix_structure(a):
+    n = a.shape[0]
+    n_below, n_above = bandwidth(a)
+
+    if n_below == n_above == 0:
+        kind = 'diagonal'
+    elif n_above == 0:
+        kind = 'lower triangular'
+    elif n_below == 0:
+        kind = 'upper triangular'
+    elif n_above <= 1 and n_below <= 1 and n > 3:
+        kind = 'tridiagonal'
+    elif np.issubdtype(a.dtype, np.complexfloating) and ishermitian(a):
+        kind = 'hermitian'
+    elif issymmetric(a):
+        kind = 'symmetric'
+    else:
+        kind = 'general'
+
+    return kind, n_below, n_above
+
+
+def solve(a, b, lower=False, overwrite_a=False,
+          overwrite_b=False, check_finite=True, assume_a=None,
+          transposed=False):
+    """
+    Solves the linear equation set ``a @ x == b`` for the unknown ``x``
+    for square `a` matrix.
+
+    If the data matrix is known to be a particular type then supplying the
+    corresponding string to ``assume_a`` key chooses the dedicated solver.
+    The available options are
+
+    ===================  ================================
+     diagonal             'diagonal'
+     tridiagonal          'tridiagonal'
+     banded               'banded'
+     upper triangular     'upper triangular'
+     lower triangular     'lower triangular'
+     symmetric            'symmetric' (or 'sym')
+     hermitian            'hermitian' (or 'her')
+     positive definite    'positive definite' (or 'pos')
+     general              'general' (or 'gen')
+    ===================  ================================
+
+    Parameters
+    ----------
+    a : (N, N) array_like
+        Square input data
+    b : (N, NRHS) array_like
+        Input data for the right hand side.
+    lower : bool, default: False
+        Ignored unless ``assume_a`` is one of ``'sym'``, ``'her'``, or ``'pos'``.
+        If True, the calculation uses only the data in the lower triangle of `a`;
+        entries above the diagonal are ignored. If False (default), the
+        calculation uses only the data in the upper triangle of `a`; entries
+        below the diagonal are ignored.
+    overwrite_a : bool, default: False
+        Allow overwriting data in `a` (may enhance performance).
+    overwrite_b : bool, default: False
+        Allow overwriting data in `b` (may enhance performance).
+    check_finite : bool, default: True
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    assume_a : str, optional
+        Valid entries are described above.
+        If omitted or ``None``, checks are performed to identify structure so the
+        appropriate solver can be called.
+    transposed : bool, default: False
+        If True, solve ``a.T @ x == b``. Raises `NotImplementedError`
+        for complex `a`.
+
+    Returns
+    -------
+    x : (N, NRHS) ndarray
+        The solution array.
+
+    Raises
+    ------
+    ValueError
+        If size mismatches detected or input a is not square.
+    LinAlgError
+        If the matrix is singular.
+    LinAlgWarning
+        If an ill-conditioned input a is detected.
+    NotImplementedError
+        If transposed is True and input a is a complex matrix.
+
+    Notes
+    -----
+    If the input b matrix is a 1-D array with N elements, when supplied
+    together with an NxN input a, it is assumed as a valid column vector
+    despite the apparent size mismatch. This is compatible with the
+    numpy.dot() behavior and the returned result is still 1-D array.
+
+    The general, symmetric, Hermitian and positive definite solutions are
+    obtained via calling ?GESV, ?SYSV, ?HESV, and ?POSV routines of
+    LAPACK respectively.
+
+    The datatype of the arrays define which solver is called regardless
+    of the values. In other words, even when the complex array entries have
+    precisely zero imaginary parts, the complex solver will be called based
+    on the data type of the array.
+
+    Examples
+    --------
+    Given `a` and `b`, solve for `x`:
+
+    >>> import numpy as np
+    >>> a = np.array([[3, 2, 0], [1, -1, 0], [0, 5, 1]])
+    >>> b = np.array([2, 4, -1])
+    >>> from scipy import linalg
+    >>> x = linalg.solve(a, b)
+    >>> x
+    array([ 2., -2.,  9.])
+    >>> np.dot(a, x) == b
+    array([ True,  True,  True], dtype=bool)
+
+    """
+    # Flags for 1-D or N-D right-hand side
+    b_is_1D = False
+
+    # check finite after determining structure
+    a1 = atleast_2d(_asarray_validated(a, check_finite=False))
+    b1 = atleast_1d(_asarray_validated(b, check_finite=False))
+    a1, b1 = _ensure_dtype_cdsz(a1, b1)
+    n = a1.shape[0]
+
+    overwrite_a = overwrite_a or _datacopied(a1, a)
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+
+    if a1.shape[0] != a1.shape[1]:
+        raise ValueError('Input a needs to be a square matrix.')
+
+    if n != b1.shape[0]:
+        # Last chance to catch 1x1 scalar a and 1-D b arrays
+        if not (n == 1 and b1.size != 0):
+            raise ValueError('Input b has to have same number of rows as '
+                             'input a')
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        dt = solve(np.eye(2, dtype=a1.dtype), np.ones(2, dtype=b1.dtype)).dtype
+        return np.empty_like(b1, dtype=dt)
+
+    # regularize 1-D b arrays to 2D
+    if b1.ndim == 1:
+        if n == 1:
+            b1 = b1[None, :]
+        else:
+            b1 = b1[:, None]
+        b_is_1D = True
+
+    if assume_a not in {None, 'diagonal', 'tridiagonal', 'banded', 'lower triangular',
+                        'upper triangular', 'symmetric', 'hermitian',
+                        'positive definite', 'general', 'sym', 'her', 'pos', 'gen'}:
+        raise ValueError(f'{assume_a} is not a recognized matrix structure')
+
+    # for a real matrix, describe it as "symmetric", not "hermitian"
+    # (lapack doesn't know what to do with real hermitian matrices)
+    if assume_a in {'hermitian', 'her'} and not np.iscomplexobj(a1):
+        assume_a = 'symmetric'
+
+    n_below, n_above = None, None
+    if assume_a is None:
+        assume_a, n_below, n_above = _find_matrix_structure(a1)
+
+    # Get the correct lamch function.
+    # The LAMCH functions only exists for S and D
+    # So for complex values we have to convert to real/double.
+    if a1.dtype.char in 'fF':  # single precision
+        lamch = get_lapack_funcs('lamch', dtype='f')
+    else:
+        lamch = get_lapack_funcs('lamch', dtype='d')
+
+    # Currently we do not have the other forms of the norm calculators
+    #   lansy, lanpo, lanhe.
+    # However, in any case they only reduce computations slightly...
+    if assume_a == 'diagonal':
+        _matrix_norm = _matrix_norm_diagonal
+    elif assume_a == 'tridiagonal':
+        _matrix_norm = _matrix_norm_tridiagonal
+    elif assume_a in {'lower triangular', 'upper triangular'}:
+        _matrix_norm = _matrix_norm_triangular(assume_a)
+    else:
+        _matrix_norm = _matrix_norm_general
+
+    # Since the I-norm and 1-norm are the same for symmetric matrices
+    # we can collect them all in this one call
+    # Note however, that when issuing 'gen' and form!='none', then
+    # the I-norm should be used
+    if transposed:
+        trans = 1
+        norm = 'I'
+        if np.iscomplexobj(a1):
+            raise NotImplementedError('scipy.linalg.solve can currently '
+                                      'not solve a^T x = b or a^H x = b '
+                                      'for complex matrices.')
+    else:
+        trans = 0
+        norm = '1'
+
+    anorm = _matrix_norm(norm, a1, check_finite)
+
+    info, rcond = 0, np.inf
+
+    # Generalized case 'gesv'
+    if assume_a in {'general', 'gen'}:
+        gecon, getrf, getrs = get_lapack_funcs(('gecon', 'getrf', 'getrs'),
+                                               (a1, b1))
+        lu, ipvt, info = getrf(a1, overwrite_a=overwrite_a)
+        _solve_check(n, info)
+        x, info = getrs(lu, ipvt, b1,
+                        trans=trans, overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        rcond, info = gecon(lu, anorm, norm=norm)
+    # Hermitian case 'hesv'
+    elif assume_a in {'hermitian', 'her'}:
+        hecon, hesv, hesv_lw = get_lapack_funcs(('hecon', 'hesv',
+                                                 'hesv_lwork'), (a1, b1))
+        lwork = _compute_lwork(hesv_lw, n, lower)
+        lu, ipvt, x, info = hesv(a1, b1, lwork=lwork,
+                                 lower=lower,
+                                 overwrite_a=overwrite_a,
+                                 overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        rcond, info = hecon(lu, ipvt, anorm)
+    # Symmetric case 'sysv'
+    elif assume_a in {'symmetric', 'sym'}:
+        sycon, sysv, sysv_lw = get_lapack_funcs(('sycon', 'sysv',
+                                                 'sysv_lwork'), (a1, b1))
+        lwork = _compute_lwork(sysv_lw, n, lower)
+        lu, ipvt, x, info = sysv(a1, b1, lwork=lwork,
+                                 lower=lower,
+                                 overwrite_a=overwrite_a,
+                                 overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        rcond, info = sycon(lu, ipvt, anorm)
+    # Diagonal case
+    elif assume_a == 'diagonal':
+        diag_a = np.diag(a1)
+        x = (b1.T / diag_a).T
+        abs_diag_a = np.abs(diag_a)
+        rcond = abs_diag_a.min() / abs_diag_a.max()
+    # Tri-diagonal case
+    elif assume_a == 'tridiagonal':
+        a1 = a1.T if transposed else a1
+        dl, d, du = np.diag(a1, -1), np.diag(a1, 0), np.diag(a1, 1)
+        _gttrf, _gttrs, _gtcon = get_lapack_funcs(('gttrf', 'gttrs', 'gtcon'), (a1, b1))
+        dl, d, du, du2, ipiv, info = _gttrf(dl, d, du)
+        _solve_check(n, info)
+        x, info = _gttrs(dl, d, du, du2, ipiv, b1, overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        rcond, info = _gtcon(dl, d, du, du2, ipiv, anorm)
+    # Banded case
+    elif assume_a == 'banded':
+        a1, n_below, n_above = ((a1.T, n_above, n_below) if transposed
+                                else (a1, n_below, n_above))
+        n_below, n_above = bandwidth(a1) if n_below is None else (n_below, n_above)
+        ab = _to_banded(n_below, n_above, a1)
+        gbsv, = get_lapack_funcs(('gbsv',), (a1, b1))
+        # Next two lines copied from `solve_banded`
+        a2 = np.zeros((2*n_below + n_above + 1, ab.shape[1]), dtype=gbsv.dtype)
+        a2[n_below:, :] = ab
+        _, _, x, info = gbsv(n_below, n_above, a2, b1,
+                             overwrite_ab=True, overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        # TODO: wrap gbcon and use to get rcond
+    # Triangular case
+    elif assume_a in {'lower triangular', 'upper triangular'}:
+        lower = assume_a == 'lower triangular'
+        x, info = _solve_triangular(a1, b1, lower=lower, overwrite_b=overwrite_b,
+                                    trans=transposed)
+        _solve_check(n, info)
+        _trcon = get_lapack_funcs(('trcon'), (a1, b1))
+        rcond, info = _trcon(a1, uplo='L' if lower else 'U')
+    # Positive definite case 'posv'
+    else:
+        pocon, posv = get_lapack_funcs(('pocon', 'posv'),
+                                       (a1, b1))
+        lu, x, info = posv(a1, b1, lower=lower,
+                           overwrite_a=overwrite_a,
+                           overwrite_b=overwrite_b)
+        _solve_check(n, info)
+        rcond, info = pocon(lu, anorm)
+
+    _solve_check(n, info, lamch, rcond)
+
+    if b_is_1D:
+        x = x.ravel()
+
+    return x
+
+
+def _matrix_norm_diagonal(_, a, check_finite):
+    # Equivalent of dlange for diagonal matrix, assuming
+    # norm is either 'I' or '1' (really just not the Frobenius norm)
+    d = np.diag(a)
+    d = np.asarray_chkfinite(d) if check_finite else d
+    return np.abs(d).max()
+
+
+def _matrix_norm_tridiagonal(norm, a, check_finite):
+    # Equivalent of dlange for tridiagonal matrix, assuming
+    # norm is either 'I' or '1'
+    if norm == 'I':
+        a = a.T
+    # Context to avoid warning before error in cases like -inf + inf
+    with np.errstate(invalid='ignore'):
+        d = np.abs(np.diag(a))
+        d[1:] += np.abs(np.diag(a, 1))
+        d[:-1] += np.abs(np.diag(a, -1))
+    d = np.asarray_chkfinite(d) if check_finite else d
+    return d.max()
+
+
+def _matrix_norm_triangular(structure):
+    def fun(norm, a, check_finite):
+        a = np.asarray_chkfinite(a) if check_finite else a
+        lantr = get_lapack_funcs('lantr', (a,))
+        return lantr(norm, a, 'L' if structure == 'lower triangular' else 'U' )
+    return fun
+
+
+def _matrix_norm_general(norm, a, check_finite):
+    a = np.asarray_chkfinite(a) if check_finite else a
+    lange = get_lapack_funcs('lange', (a,))
+    return lange(norm, a)
+
+
+def _to_banded(n_below, n_above, a):
+    n = a.shape[0]
+    rows = n_above + n_below + 1
+    ab = np.zeros((rows, n), dtype=a.dtype)
+    ab[n_above] = np.diag(a)
+    for i in range(1, n_above + 1):
+        ab[n_above - i, i:] = np.diag(a, i)
+    for i in range(1, n_below + 1):
+        ab[n_above + i, :-i] = np.diag(a, -i)
+    return ab
+
+
+def _ensure_dtype_cdsz(*arrays):
+    # Ensure that the dtype of arrays is one of the standard types
+    # compatible with LAPACK functions (single or double precision
+    # real or complex).
+    dtype = np.result_type(*arrays)
+    if not np.issubdtype(dtype, np.inexact):
+        return (array.astype(np.float64) for array in arrays)
+    complex = np.issubdtype(dtype, np.complexfloating)
+    if np.finfo(dtype).bits <= 32:
+        dtype = np.complex64 if complex else np.float32
+    elif np.finfo(dtype).bits >= 64:
+        dtype = np.complex128 if complex else np.float64
+    return (array.astype(dtype, copy=False) for array in arrays)
+
+
+def solve_triangular(a, b, trans=0, lower=False, unit_diagonal=False,
+                     overwrite_b=False, check_finite=True):
+    """
+    Solve the equation ``a x = b`` for `x`, assuming a is a triangular matrix.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        A triangular matrix
+    b : (M,) or (M, N) array_like
+        Right-hand side matrix in ``a x = b``
+    lower : bool, optional
+        Use only data contained in the lower triangle of `a`.
+        Default is to use upper triangle.
+    trans : {0, 1, 2, 'N', 'T', 'C'}, optional
+        Type of system to solve:
+
+        ========  =========
+        trans     system
+        ========  =========
+        0 or 'N'  a x  = b
+        1 or 'T'  a^T x = b
+        2 or 'C'  a^H x = b
+        ========  =========
+    unit_diagonal : bool, optional
+        If True, diagonal elements of `a` are assumed to be 1 and
+        will not be referenced.
+    overwrite_b : bool, optional
+        Allow overwriting data in `b` (may enhance performance)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : (M,) or (M, N) ndarray
+        Solution to the system ``a x = b``.  Shape of return matches `b`.
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is singular
+
+    Notes
+    -----
+    .. versionadded:: 0.9.0
+
+    Examples
+    --------
+    Solve the lower triangular system a x = b, where::
+
+             [3  0  0  0]       [4]
+        a =  [2  1  0  0]   b = [2]
+             [1  0  1  0]       [4]
+             [1  1  1  1]       [2]
+
+    >>> import numpy as np
+    >>> from scipy.linalg import solve_triangular
+    >>> a = np.array([[3, 0, 0, 0], [2, 1, 0, 0], [1, 0, 1, 0], [1, 1, 1, 1]])
+    >>> b = np.array([4, 2, 4, 2])
+    >>> x = solve_triangular(a, b, lower=True)
+    >>> x
+    array([ 1.33333333, -0.66666667,  2.66666667, -1.33333333])
+    >>> a.dot(x)  # Check the result
+    array([ 4.,  2.,  4.,  2.])
+
+    """
+
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    b1 = _asarray_validated(b, check_finite=check_finite)
+
+    if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
+        raise ValueError('expected square matrix')
+
+    if a1.shape[0] != b1.shape[0]:
+        raise ValueError(f'shapes of a {a1.shape} and b {b1.shape} are incompatible')
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        dt_nonempty = solve_triangular(
+            np.eye(2, dtype=a1.dtype), np.ones(2, dtype=b1.dtype)
+        ).dtype
+        return np.empty_like(b1, dtype=dt_nonempty)
+
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+
+    x, _ = _solve_triangular(a1, b1, trans, lower, unit_diagonal, overwrite_b)
+    return x
+
+
+# solve_triangular without the input validation
+def _solve_triangular(a1, b1, trans=0, lower=False, unit_diagonal=False,
+                      overwrite_b=False):
+
+    trans = {'N': 0, 'T': 1, 'C': 2}.get(trans, trans)
+    trtrs, = get_lapack_funcs(('trtrs',), (a1, b1))
+    if a1.flags.f_contiguous or trans == 2:
+        x, info = trtrs(a1, b1, overwrite_b=overwrite_b, lower=lower,
+                        trans=trans, unitdiag=unit_diagonal)
+    else:
+        # transposed system is solved since trtrs expects Fortran ordering
+        x, info = trtrs(a1.T, b1, overwrite_b=overwrite_b, lower=not lower,
+                        trans=not trans, unitdiag=unit_diagonal)
+
+    if info == 0:
+        return x, info
+    if info > 0:
+        raise LinAlgError("singular matrix: resolution failed at diagonal %d" %
+                          (info-1))
+    raise ValueError('illegal value in %dth argument of internal trtrs' %
+                     (-info))
+
+
+def solve_banded(l_and_u, ab, b, overwrite_ab=False, overwrite_b=False,
+                 check_finite=True):
+    """
+    Solve the equation a x = b for x, assuming a is banded matrix.
+
+    The matrix a is stored in `ab` using the matrix diagonal ordered form::
+
+        ab[u + i - j, j] == a[i,j]
+
+    Example of `ab` (shape of a is (6,6), `u` =1, `l` =2)::
+
+        *    a01  a12  a23  a34  a45
+        a00  a11  a22  a33  a44  a55
+        a10  a21  a32  a43  a54   *
+        a20  a31  a42  a53   *    *
+
+    Parameters
+    ----------
+    (l, u) : (integer, integer)
+        Number of non-zero lower and upper diagonals
+    ab : (`l` + `u` + 1, M) array_like
+        Banded matrix
+    b : (M,) or (M, K) array_like
+        Right-hand side
+    overwrite_ab : bool, optional
+        Discard data in `ab` (may enhance performance)
+    overwrite_b : bool, optional
+        Discard data in `b` (may enhance performance)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : (M,) or (M, K) ndarray
+        The solution to the system a x = b. Returned shape depends on the
+        shape of `b`.
+
+    Examples
+    --------
+    Solve the banded system a x = b, where::
+
+            [5  2 -1  0  0]       [0]
+            [1  4  2 -1  0]       [1]
+        a = [0  1  3  2 -1]   b = [2]
+            [0  0  1  2  2]       [2]
+            [0  0  0  1  1]       [3]
+
+    There is one nonzero diagonal below the main diagonal (l = 1), and
+    two above (u = 2). The diagonal banded form of the matrix is::
+
+             [*  * -1 -1 -1]
+        ab = [*  2  2  2  2]
+             [5  4  3  2  1]
+             [1  1  1  1  *]
+
+    >>> import numpy as np
+    >>> from scipy.linalg import solve_banded
+    >>> ab = np.array([[0,  0, -1, -1, -1],
+    ...                [0,  2,  2,  2,  2],
+    ...                [5,  4,  3,  2,  1],
+    ...                [1,  1,  1,  1,  0]])
+    >>> b = np.array([0, 1, 2, 2, 3])
+    >>> x = solve_banded((1, 2), ab, b)
+    >>> x
+    array([-2.37288136,  3.93220339, -4.        ,  4.3559322 , -1.3559322 ])
+
+    """
+
+    a1 = _asarray_validated(ab, check_finite=check_finite, as_inexact=True)
+    b1 = _asarray_validated(b, check_finite=check_finite, as_inexact=True)
+
+    # Validate shapes.
+    if a1.shape[-1] != b1.shape[0]:
+        raise ValueError("shapes of ab and b are not compatible.")
+
+    (nlower, nupper) = l_and_u
+    if nlower + nupper + 1 != a1.shape[0]:
+        raise ValueError("invalid values for the number of lower and upper "
+                         "diagonals: l+u+1 (%d) does not equal ab.shape[0] "
+                         "(%d)" % (nlower + nupper + 1, ab.shape[0]))
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        dt = solve(np.eye(1, dtype=a1.dtype), np.ones(1, dtype=b1.dtype)).dtype
+        return np.empty_like(b1, dtype=dt)
+
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+    if a1.shape[-1] == 1:
+        b2 = np.array(b1, copy=(not overwrite_b))
+        # a1.shape[-1] == 1 -> original matrix is 1x1. Typically, the user
+        # will pass u = l = 0 and `a1` will be 1x1. However, the rest of the
+        # function works with unnecessary rows in `a1` as long as
+        # `a1[u + i - j, j] == a[i,j]`. In the 1x1 case, we want i = j = 0,
+        # so the diagonal is in row `u` of `a1`. See gh-8906.
+        b2 /= a1[nupper, 0]
+        return b2
+    if nlower == nupper == 1:
+        overwrite_ab = overwrite_ab or _datacopied(a1, ab)
+        gtsv, = get_lapack_funcs(('gtsv',), (a1, b1))
+        du = a1[0, 1:]
+        d = a1[1, :]
+        dl = a1[2, :-1]
+        du2, d, du, x, info = gtsv(dl, d, du, b1, overwrite_ab, overwrite_ab,
+                                   overwrite_ab, overwrite_b)
+    else:
+        gbsv, = get_lapack_funcs(('gbsv',), (a1, b1))
+        a2 = np.zeros((2*nlower + nupper + 1, a1.shape[1]), dtype=gbsv.dtype)
+        a2[nlower:, :] = a1
+        lu, piv, x, info = gbsv(nlower, nupper, a2, b1, overwrite_ab=True,
+                                overwrite_b=overwrite_b)
+    if info == 0:
+        return x
+    if info > 0:
+        raise LinAlgError("singular matrix")
+    raise ValueError('illegal value in %d-th argument of internal '
+                     'gbsv/gtsv' % -info)
+
+
+def solveh_banded(ab, b, overwrite_ab=False, overwrite_b=False, lower=False,
+                  check_finite=True):
+    """
+    Solve equation a x = b. a is Hermitian positive-definite banded matrix.
+
+    Uses Thomas' Algorithm, which is more efficient than standard LU
+    factorization, but should only be used for Hermitian positive-definite
+    matrices.
+
+    The matrix ``a`` is stored in `ab` either in lower diagonal or upper
+    diagonal ordered form:
+
+        ab[u + i - j, j] == a[i,j]        (if upper form; i <= j)
+        ab[    i - j, j] == a[i,j]        (if lower form; i >= j)
+
+    Example of `ab` (shape of ``a`` is (6, 6), number of upper diagonals,
+    ``u`` =2)::
+
+        upper form:
+        *   *   a02 a13 a24 a35
+        *   a01 a12 a23 a34 a45
+        a00 a11 a22 a33 a44 a55
+
+        lower form:
+        a00 a11 a22 a33 a44 a55
+        a10 a21 a32 a43 a54 *
+        a20 a31 a42 a53 *   *
+
+    Cells marked with * are not used.
+
+    Parameters
+    ----------
+    ab : (``u`` + 1, M) array_like
+        Banded matrix
+    b : (M,) or (M, K) array_like
+        Right-hand side
+    overwrite_ab : bool, optional
+        Discard data in `ab` (may enhance performance)
+    overwrite_b : bool, optional
+        Discard data in `b` (may enhance performance)
+    lower : bool, optional
+        Is the matrix in the lower form. (Default is upper form)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : (M,) or (M, K) ndarray
+        The solution to the system ``a x = b``. Shape of return matches shape
+        of `b`.
+
+    Notes
+    -----
+    In the case of a non-positive definite matrix ``a``, the solver
+    `solve_banded` may be used.
+
+    Examples
+    --------
+    Solve the banded system ``A x = b``, where::
+
+            [ 4  2 -1  0  0  0]       [1]
+            [ 2  5  2 -1  0  0]       [2]
+        A = [-1  2  6  2 -1  0]   b = [2]
+            [ 0 -1  2  7  2 -1]       [3]
+            [ 0  0 -1  2  8  2]       [3]
+            [ 0  0  0 -1  2  9]       [3]
+
+    >>> import numpy as np
+    >>> from scipy.linalg import solveh_banded
+
+    ``ab`` contains the main diagonal and the nonzero diagonals below the
+    main diagonal. That is, we use the lower form:
+
+    >>> ab = np.array([[ 4,  5,  6,  7, 8, 9],
+    ...                [ 2,  2,  2,  2, 2, 0],
+    ...                [-1, -1, -1, -1, 0, 0]])
+    >>> b = np.array([1, 2, 2, 3, 3, 3])
+    >>> x = solveh_banded(ab, b, lower=True)
+    >>> x
+    array([ 0.03431373,  0.45938375,  0.05602241,  0.47759104,  0.17577031,
+            0.34733894])
+
+
+    Solve the Hermitian banded system ``H x = b``, where::
+
+            [ 8   2-1j   0     0  ]        [ 1  ]
+        H = [2+1j  5     1j    0  ]    b = [1+1j]
+            [ 0   -1j    9   -2-1j]        [1-2j]
+            [ 0    0   -2+1j   6  ]        [ 0  ]
+
+    In this example, we put the upper diagonals in the array ``hb``:
+
+    >>> hb = np.array([[0, 2-1j, 1j, -2-1j],
+    ...                [8,  5,    9,   6  ]])
+    >>> b = np.array([1, 1+1j, 1-2j, 0])
+    >>> x = solveh_banded(hb, b)
+    >>> x
+    array([ 0.07318536-0.02939412j,  0.11877624+0.17696461j,
+            0.10077984-0.23035393j, -0.00479904-0.09358128j])
+
+    """
+    a1 = _asarray_validated(ab, check_finite=check_finite)
+    b1 = _asarray_validated(b, check_finite=check_finite)
+
+    # Validate shapes.
+    if a1.shape[-1] != b1.shape[0]:
+        raise ValueError("shapes of ab and b are not compatible.")
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        dt = solve(np.eye(1, dtype=a1.dtype), np.ones(1, dtype=b1.dtype)).dtype
+        return np.empty_like(b1, dtype=dt)
+
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+    overwrite_ab = overwrite_ab or _datacopied(a1, ab)
+
+    if a1.shape[0] == 2:
+        ptsv, = get_lapack_funcs(('ptsv',), (a1, b1))
+        if lower:
+            d = a1[0, :].real
+            e = a1[1, :-1]
+        else:
+            d = a1[1, :].real
+            e = a1[0, 1:].conj()
+        d, du, x, info = ptsv(d, e, b1, overwrite_ab, overwrite_ab,
+                              overwrite_b)
+    else:
+        pbsv, = get_lapack_funcs(('pbsv',), (a1, b1))
+        c, x, info = pbsv(a1, b1, lower=lower, overwrite_ab=overwrite_ab,
+                          overwrite_b=overwrite_b)
+    if info > 0:
+        raise LinAlgError("%dth leading minor not positive definite" % info)
+    if info < 0:
+        raise ValueError('illegal value in %dth argument of internal '
+                         'pbsv' % -info)
+    return x
+
+
+def solve_toeplitz(c_or_cr, b, check_finite=True):
+    r"""Solve a Toeplitz system using Levinson Recursion
+
+    The Toeplitz matrix has constant diagonals, with c as its first column
+    and r as its first row. If r is not given, ``r == conjugate(c)`` is
+    assumed.
+
+    .. warning::
+
+        Beginning in SciPy 1.17, multidimensional input will be treated as a batch,
+        not ``ravel``\ ed. To preserve the existing behavior, ``ravel`` arguments
+        before passing them to `solve_toeplitz`.
+
+    Parameters
+    ----------
+    c_or_cr : array_like or tuple of (array_like, array_like)
+        The vector ``c``, or a tuple of arrays (``c``, ``r``). If not
+        supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is
+        real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row
+        of the Toeplitz matrix is ``[c[0], r[1:]]``.
+    b : (M,) or (M, K) array_like
+        Right-hand side in ``T x = b``.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (result entirely NaNs) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : (M,) or (M, K) ndarray
+        The solution to the system ``T x = b``. Shape of return matches shape
+        of `b`.
+
+    See Also
+    --------
+    toeplitz : Toeplitz matrix
+
+    Notes
+    -----
+    The solution is computed using Levinson-Durbin recursion, which is faster
+    than generic least-squares methods, but can be less numerically stable.
+
+    Examples
+    --------
+    Solve the Toeplitz system T x = b, where::
+
+            [ 1 -1 -2 -3]       [1]
+        T = [ 3  1 -1 -2]   b = [2]
+            [ 6  3  1 -1]       [2]
+            [10  6  3  1]       [5]
+
+    To specify the Toeplitz matrix, only the first column and the first
+    row are needed.
+
+    >>> import numpy as np
+    >>> c = np.array([1, 3, 6, 10])    # First column of T
+    >>> r = np.array([1, -1, -2, -3])  # First row of T
+    >>> b = np.array([1, 2, 2, 5])
+
+    >>> from scipy.linalg import solve_toeplitz, toeplitz
+    >>> x = solve_toeplitz((c, r), b)
+    >>> x
+    array([ 1.66666667, -1.        , -2.66666667,  2.33333333])
+
+    Check the result by creating the full Toeplitz matrix and
+    multiplying it by `x`.  We should get `b`.
+
+    >>> T = toeplitz(c, r)
+    >>> T.dot(x)
+    array([ 1.,  2.,  2.,  5.])
+
+    """
+    # If numerical stability of this algorithm is a problem, a future
+    # developer might consider implementing other O(N^2) Toeplitz solvers,
+    # such as GKO (https://www.jstor.org/stable/2153371) or Bareiss.
+
+    r, c, b, dtype, b_shape = _validate_args_for_toeplitz_ops(
+        c_or_cr, b, check_finite, keep_b_shape=True)
+
+    # accommodate empty arrays
+    if b.size == 0:
+        return np.empty_like(b)
+
+    # Form a 1-D array of values to be used in the matrix, containing a
+    # reversed copy of r[1:], followed by c.
+    vals = np.concatenate((r[-1:0:-1], c))
+    if b is None:
+        raise ValueError('illegal value, `b` is a required argument')
+
+    if b.ndim == 1:
+        x, _ = levinson(vals, np.ascontiguousarray(b))
+    else:
+        x = np.column_stack([levinson(vals, np.ascontiguousarray(b[:, i]))[0]
+                             for i in range(b.shape[1])])
+        x = x.reshape(*b_shape)
+
+    return x
+
+
+def _get_axis_len(aname, a, axis):
+    ax = axis
+    if ax < 0:
+        ax += a.ndim
+    if 0 <= ax < a.ndim:
+        return a.shape[ax]
+    raise ValueError(f"'{aname}axis' entry is out of bounds")
+
+
+def solve_circulant(c, b, singular='raise', tol=None,
+                    caxis=-1, baxis=0, outaxis=0):
+    """Solve C x = b for x, where C is a circulant matrix.
+
+    `C` is the circulant matrix associated with the vector `c`.
+
+    The system is solved by doing division in Fourier space. The
+    calculation is::
+
+        x = ifft(fft(b) / fft(c))
+
+    where `fft` and `ifft` are the fast Fourier transform and its inverse,
+    respectively. For a large vector `c`, this is *much* faster than
+    solving the system with the full circulant matrix.
+
+    Parameters
+    ----------
+    c : array_like
+        The coefficients of the circulant matrix.
+    b : array_like
+        Right-hand side matrix in ``a x = b``.
+    singular : str, optional
+        This argument controls how a near singular circulant matrix is
+        handled.  If `singular` is "raise" and the circulant matrix is
+        near singular, a `LinAlgError` is raised. If `singular` is
+        "lstsq", the least squares solution is returned. Default is "raise".
+    tol : float, optional
+        If any eigenvalue of the circulant matrix has an absolute value
+        that is less than or equal to `tol`, the matrix is considered to be
+        near singular. If not given, `tol` is set to::
+
+            tol = abs_eigs.max() * abs_eigs.size * np.finfo(np.float64).eps
+
+        where `abs_eigs` is the array of absolute values of the eigenvalues
+        of the circulant matrix.
+    caxis : int
+        When `c` has dimension greater than 1, it is viewed as a collection
+        of circulant vectors. In this case, `caxis` is the axis of `c` that
+        holds the vectors of circulant coefficients.
+    baxis : int
+        When `b` has dimension greater than 1, it is viewed as a collection
+        of vectors. In this case, `baxis` is the axis of `b` that holds the
+        right-hand side vectors.
+    outaxis : int
+        When `c` or `b` are multidimensional, the value returned by
+        `solve_circulant` is multidimensional. In this case, `outaxis` is
+        the axis of the result that holds the solution vectors.
+
+    Returns
+    -------
+    x : ndarray
+        Solution to the system ``C x = b``.
+
+    Raises
+    ------
+    LinAlgError
+        If the circulant matrix associated with `c` is near singular.
+
+    See Also
+    --------
+    circulant : circulant matrix
+
+    Notes
+    -----
+    For a 1-D vector `c` with length `m`, and an array `b`
+    with shape ``(m, ...)``,
+
+        solve_circulant(c, b)
+
+    returns the same result as
+
+        solve(circulant(c), b)
+
+    where `solve` and `circulant` are from `scipy.linalg`.
+
+    .. versionadded:: 0.16.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import solve_circulant, solve, circulant, lstsq
+
+    >>> c = np.array([2, 2, 4])
+    >>> b = np.array([1, 2, 3])
+    >>> solve_circulant(c, b)
+    array([ 0.75, -0.25,  0.25])
+
+    Compare that result to solving the system with `scipy.linalg.solve`:
+
+    >>> solve(circulant(c), b)
+    array([ 0.75, -0.25,  0.25])
+
+    A singular example:
+
+    >>> c = np.array([1, 1, 0, 0])
+    >>> b = np.array([1, 2, 3, 4])
+
+    Calling ``solve_circulant(c, b)`` will raise a `LinAlgError`.  For the
+    least square solution, use the option ``singular='lstsq'``:
+
+    >>> solve_circulant(c, b, singular='lstsq')
+    array([ 0.25,  1.25,  2.25,  1.25])
+
+    Compare to `scipy.linalg.lstsq`:
+
+    >>> x, resid, rnk, s = lstsq(circulant(c), b)
+    >>> x
+    array([ 0.25,  1.25,  2.25,  1.25])
+
+    A broadcasting example:
+
+    Suppose we have the vectors of two circulant matrices stored in an array
+    with shape (2, 5), and three `b` vectors stored in an array with shape
+    (3, 5).  For example,
+
+    >>> c = np.array([[1.5, 2, 3, 0, 0], [1, 1, 4, 3, 2]])
+    >>> b = np.arange(15).reshape(-1, 5)
+
+    We want to solve all combinations of circulant matrices and `b` vectors,
+    with the result stored in an array with shape (2, 3, 5). When we
+    disregard the axes of `c` and `b` that hold the vectors of coefficients,
+    the shapes of the collections are (2,) and (3,), respectively, which are
+    not compatible for broadcasting. To have a broadcast result with shape
+    (2, 3), we add a trivial dimension to `c`: ``c[:, np.newaxis, :]`` has
+    shape (2, 1, 5). The last dimension holds the coefficients of the
+    circulant matrices, so when we call `solve_circulant`, we can use the
+    default ``caxis=-1``. The coefficients of the `b` vectors are in the last
+    dimension of the array `b`, so we use ``baxis=-1``. If we use the
+    default `outaxis`, the result will have shape (5, 2, 3), so we'll use
+    ``outaxis=-1`` to put the solution vectors in the last dimension.
+
+    >>> x = solve_circulant(c[:, np.newaxis, :], b, baxis=-1, outaxis=-1)
+    >>> x.shape
+    (2, 3, 5)
+    >>> np.set_printoptions(precision=3)  # For compact output of numbers.
+    >>> x
+    array([[[-0.118,  0.22 ,  1.277, -0.142,  0.302],
+            [ 0.651,  0.989,  2.046,  0.627,  1.072],
+            [ 1.42 ,  1.758,  2.816,  1.396,  1.841]],
+           [[ 0.401,  0.304,  0.694, -0.867,  0.377],
+            [ 0.856,  0.758,  1.149, -0.412,  0.831],
+            [ 1.31 ,  1.213,  1.603,  0.042,  1.286]]])
+
+    Check by solving one pair of `c` and `b` vectors (cf. ``x[1, 1, :]``):
+
+    >>> solve_circulant(c[1], b[1, :])
+    array([ 0.856,  0.758,  1.149, -0.412,  0.831])
+
+    """
+    c = np.atleast_1d(c)
+    nc = _get_axis_len("c", c, caxis)
+    b = np.atleast_1d(b)
+    nb = _get_axis_len("b", b, baxis)
+    if nc != nb:
+        raise ValueError(f'Shapes of c {c.shape} and b {b.shape} are incompatible')
+
+    # accommodate empty arrays
+    if b.size == 0:
+        dt = solve_circulant(np.arange(3, dtype=c.dtype),
+                             np.ones(3, dtype=b.dtype)).dtype
+        return np.empty_like(b, dtype=dt)
+
+    fc = np.fft.fft(np.moveaxis(c, caxis, -1), axis=-1)
+    abs_fc = np.abs(fc)
+    if tol is None:
+        # This is the same tolerance as used in np.linalg.matrix_rank.
+        tol = abs_fc.max(axis=-1) * nc * np.finfo(np.float64).eps
+        if tol.shape != ():
+            tol.shape = tol.shape + (1,)
+        else:
+            tol = np.atleast_1d(tol)
+
+    near_zeros = abs_fc <= tol
+    is_near_singular = np.any(near_zeros)
+    if is_near_singular:
+        if singular == 'raise':
+            raise LinAlgError("near singular circulant matrix.")
+        else:
+            # Replace the small values with 1 to avoid errors in the
+            # division fb/fc below.
+            fc[near_zeros] = 1
+
+    fb = np.fft.fft(np.moveaxis(b, baxis, -1), axis=-1)
+
+    q = fb / fc
+
+    if is_near_singular:
+        # `near_zeros` is a boolean array, same shape as `c`, that is
+        # True where `fc` is (near) zero. `q` is the broadcasted result
+        # of fb / fc, so to set the values of `q` to 0 where `fc` is near
+        # zero, we use a mask that is the broadcast result of an array
+        # of True values shaped like `b` with `near_zeros`.
+        mask = np.ones_like(b, dtype=bool) & near_zeros
+        q[mask] = 0
+
+    x = np.fft.ifft(q, axis=-1)
+    if not (np.iscomplexobj(c) or np.iscomplexobj(b)):
+        x = x.real
+    if outaxis != -1:
+        x = np.moveaxis(x, -1, outaxis)
+    return x
+
+
+# matrix inversion
+def inv(a, overwrite_a=False, check_finite=True):
+    """
+    Compute the inverse of a matrix.
+
+    Parameters
+    ----------
+    a : array_like
+        Square matrix to be inverted.
+    overwrite_a : bool, optional
+        Discard data in `a` (may improve performance). Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    ainv : ndarray
+        Inverse of the matrix `a`.
+
+    Raises
+    ------
+    LinAlgError
+        If `a` is singular.
+    ValueError
+        If `a` is not square, or not 2D.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[1., 2.], [3., 4.]])
+    >>> linalg.inv(a)
+    array([[-2. ,  1. ],
+           [ 1.5, -0.5]])
+    >>> np.dot(a, linalg.inv(a))
+    array([[ 1.,  0.],
+           [ 0.,  1.]])
+
+    """
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
+        raise ValueError('expected square matrix')
+
+    # accommodate empty square matrices
+    if a1.size == 0:
+        dt = inv(np.eye(2, dtype=a1.dtype)).dtype
+        return np.empty_like(a1, dtype=dt)
+
+    overwrite_a = overwrite_a or _datacopied(a1, a)
+    getrf, getri, getri_lwork = get_lapack_funcs(('getrf', 'getri',
+                                                  'getri_lwork'),
+                                                 (a1,))
+    lu, piv, info = getrf(a1, overwrite_a=overwrite_a)
+    if info == 0:
+        lwork = _compute_lwork(getri_lwork, a1.shape[0])
+
+        # XXX: the following line fixes curious SEGFAULT when
+        # benchmarking 500x500 matrix inverse. This seems to
+        # be a bug in LAPACK ?getri routine because if lwork is
+        # minimal (when using lwork[0] instead of lwork[1]) then
+        # all tests pass. Further investigation is required if
+        # more such SEGFAULTs occur.
+        lwork = int(1.01 * lwork)
+        inv_a, info = getri(lu, piv, lwork=lwork, overwrite_lu=1)
+    if info > 0:
+        raise LinAlgError("singular matrix")
+    if info < 0:
+        raise ValueError('illegal value in %d-th argument of internal '
+                         'getrf|getri' % -info)
+    return inv_a
+
+
+# Determinant
+
+def det(a, overwrite_a=False, check_finite=True):
+    """
+    Compute the determinant of a matrix
+
+    The determinant is a scalar that is a function of the associated square
+    matrix coefficients. The determinant value is zero for singular matrices.
+
+    Parameters
+    ----------
+    a : (..., M, M) array_like
+        Input array to compute determinants for.
+    overwrite_a : bool, optional
+        Allow overwriting data in a (may enhance performance).
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    det : (...) float or complex
+        Determinant of `a`. For stacked arrays, a scalar is returned for each
+        (m, m) slice in the last two dimensions of the input. For example, an
+        input of shape (p, q, m, m) will produce a result of shape (p, q). If
+        all dimensions are 1 a scalar is returned regardless of ndim.
+
+    Notes
+    -----
+    The determinant is computed by performing an LU factorization of the
+    input with LAPACK routine 'getrf', and then calculating the product of
+    diagonal entries of the U factor.
+
+    Even if the input array is single precision (float32 or complex64), the
+    result will be returned in double precision (float64 or complex128) to
+    prevent overflows.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[1,2,3], [4,5,6], [7,8,9]])  # A singular matrix
+    >>> linalg.det(a)
+    0.0
+    >>> b = np.array([[0,2,3], [4,5,6], [7,8,9]])
+    >>> linalg.det(b)
+    3.0
+    >>> # An array with the shape (3, 2, 2, 2)
+    >>> c = np.array([[[[1., 2.], [3., 4.]],
+    ...                [[5., 6.], [7., 8.]]],
+    ...               [[[9., 10.], [11., 12.]],
+    ...                [[13., 14.], [15., 16.]]],
+    ...               [[[17., 18.], [19., 20.]],
+    ...                [[21., 22.], [23., 24.]]]])
+    >>> linalg.det(c)  # The resulting shape is (3, 2)
+    array([[-2., -2.],
+           [-2., -2.],
+           [-2., -2.]])
+    >>> linalg.det(c[0, 0])  # Confirm the (0, 0) slice, [[1, 2], [3, 4]]
+    -2.0
+    """
+    # The goal is to end up with a writable contiguous array to pass to Cython
+
+    # First we check and make arrays.
+    a1 = np.asarray_chkfinite(a) if check_finite else np.asarray(a)
+    if a1.ndim < 2:
+        raise ValueError('The input array must be at least two-dimensional.')
+    if a1.shape[-1] != a1.shape[-2]:
+        raise ValueError('Last 2 dimensions of the array must be square'
+                         f' but received shape {a1.shape}.')
+
+    # Also check if dtype is LAPACK compatible
+    if a1.dtype.char not in 'fdFD':
+        dtype_char = lapack_cast_dict[a1.dtype.char]
+        if not dtype_char:  # No casting possible
+            raise TypeError(f'The dtype "{a1.dtype.name}" cannot be cast '
+                            'to float(32, 64) or complex(64, 128).')
+
+        a1 = a1.astype(dtype_char[0])  # makes a copy, free to scratch
+        overwrite_a = True
+
+    # Empty array has determinant 1 because math.
+    if min(*a1.shape) == 0:
+        dtyp = np.float64 if a1.dtype.char not in 'FD' else np.complex128
+        if a1.ndim == 2:
+            return dtyp(1.0)
+        else:
+            return np.ones(shape=a1.shape[:-2], dtype=dtyp)
+
+    # Scalar case
+    if a1.shape[-2:] == (1, 1):
+        a1 = a1[..., 0, 0]
+        if a1.ndim == 0:
+            a1 = a1[()]
+        # Convert float32 to float64, and complex64 to complex128.
+        if a1.dtype.char in 'dD':
+            return a1
+        return a1.astype('d') if a1.dtype.char == 'f' else a1.astype('D')
+
+    # Then check overwrite permission
+    if not _datacopied(a1, a):  # "a"  still alive through "a1"
+        if not overwrite_a:
+            # Data belongs to "a" so make a copy
+            a1 = a1.copy(order='C')
+        #  else: Do nothing we'll use "a" if possible
+    # else:  a1 has its own data thus free to scratch
+
+    # Then layout checks, might happen that overwrite is allowed but original
+    # array was read-only or non-C-contiguous.
+    if not (a1.flags['C_CONTIGUOUS'] and a1.flags['WRITEABLE']):
+        a1 = a1.copy(order='C')
+
+    if a1.ndim == 2:
+        det = find_det_from_lu(a1)
+        # Convert float, complex to NumPy scalars
+        return (np.float64(det) if np.isrealobj(det) else np.complex128(det))
+
+    # loop over the stacked array, and avoid overflows for single precision
+    # Cf. np.linalg.det(np.diag([1e+38, 1e+38]).astype(np.float32))
+    dtype_char = a1.dtype.char
+    if dtype_char in 'fF':
+        dtype_char = 'd' if dtype_char.islower() else 'D'
+
+    det = np.empty(a1.shape[:-2], dtype=dtype_char)
+    for ind in product(*[range(x) for x in a1.shape[:-2]]):
+        det[ind] = find_det_from_lu(a1[ind])
+    return det
+
+
+# Linear Least Squares
+def lstsq(a, b, cond=None, overwrite_a=False, overwrite_b=False,
+          check_finite=True, lapack_driver=None):
+    """
+    Compute least-squares solution to equation Ax = b.
+
+    Compute a vector x such that the 2-norm ``|b - A x|`` is minimized.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Left-hand side array
+    b : (M,) or (M, K) array_like
+        Right hand side array
+    cond : float, optional
+        Cutoff for 'small' singular values; used to determine effective
+        rank of a. Singular values smaller than
+        ``cond * largest_singular_value`` are considered zero.
+    overwrite_a : bool, optional
+        Discard data in `a` (may enhance performance). Default is False.
+    overwrite_b : bool, optional
+        Discard data in `b` (may enhance performance). Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    lapack_driver : str, optional
+        Which LAPACK driver is used to solve the least-squares problem.
+        Options are ``'gelsd'``, ``'gelsy'``, ``'gelss'``. Default
+        (``'gelsd'``) is a good choice.  However, ``'gelsy'`` can be slightly
+        faster on many problems.  ``'gelss'`` was used historically.  It is
+        generally slow but uses less memory.
+
+        .. versionadded:: 0.17.0
+
+    Returns
+    -------
+    x : (N,) or (N, K) ndarray
+        Least-squares solution.
+    residues : (K,) ndarray or float
+        Square of the 2-norm for each column in ``b - a x``, if ``M > N`` and
+        ``rank(A) == n`` (returns a scalar if ``b`` is 1-D). Otherwise a
+        (0,)-shaped array is returned.
+    rank : int
+        Effective rank of `a`.
+    s : (min(M, N),) ndarray or None
+        Singular values of `a`. The condition number of ``a`` is
+        ``s[0] / s[-1]``.
+
+    Raises
+    ------
+    LinAlgError
+        If computation does not converge.
+
+    ValueError
+        When parameters are not compatible.
+
+    See Also
+    --------
+    scipy.optimize.nnls : linear least squares with non-negativity constraint
+
+    Notes
+    -----
+    When ``'gelsy'`` is used as a driver, `residues` is set to a (0,)-shaped
+    array and `s` is always ``None``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import lstsq
+    >>> import matplotlib.pyplot as plt
+
+    Suppose we have the following data:
+
+    >>> x = np.array([1, 2.5, 3.5, 4, 5, 7, 8.5])
+    >>> y = np.array([0.3, 1.1, 1.5, 2.0, 3.2, 6.6, 8.6])
+
+    We want to fit a quadratic polynomial of the form ``y = a + b*x**2``
+    to this data.  We first form the "design matrix" M, with a constant
+    column of 1s and a column containing ``x**2``:
+
+    >>> M = x[:, np.newaxis]**[0, 2]
+    >>> M
+    array([[  1.  ,   1.  ],
+           [  1.  ,   6.25],
+           [  1.  ,  12.25],
+           [  1.  ,  16.  ],
+           [  1.  ,  25.  ],
+           [  1.  ,  49.  ],
+           [  1.  ,  72.25]])
+
+    We want to find the least-squares solution to ``M.dot(p) = y``,
+    where ``p`` is a vector with length 2 that holds the parameters
+    ``a`` and ``b``.
+
+    >>> p, res, rnk, s = lstsq(M, y)
+    >>> p
+    array([ 0.20925829,  0.12013861])
+
+    Plot the data and the fitted curve.
+
+    >>> plt.plot(x, y, 'o', label='data')
+    >>> xx = np.linspace(0, 9, 101)
+    >>> yy = p[0] + p[1]*xx**2
+    >>> plt.plot(xx, yy, label='least squares fit, $y = a + bx^2$')
+    >>> plt.xlabel('x')
+    >>> plt.ylabel('y')
+    >>> plt.legend(framealpha=1, shadow=True)
+    >>> plt.grid(alpha=0.25)
+    >>> plt.show()
+
+    """
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    b1 = _asarray_validated(b, check_finite=check_finite)
+    if len(a1.shape) != 2:
+        raise ValueError('Input array a should be 2D')
+    m, n = a1.shape
+    if len(b1.shape) == 2:
+        nrhs = b1.shape[1]
+    else:
+        nrhs = 1
+    if m != b1.shape[0]:
+        raise ValueError('Shape mismatch: a and b should have the same number'
+                         f' of rows ({m} != {b1.shape[0]}).')
+    if m == 0 or n == 0:  # Zero-sized problem, confuses LAPACK
+        x = np.zeros((n,) + b1.shape[1:], dtype=np.common_type(a1, b1))
+        if n == 0:
+            residues = np.linalg.norm(b1, axis=0)**2
+        else:
+            residues = np.empty((0,))
+        return x, residues, 0, np.empty((0,))
+
+    driver = lapack_driver
+    if driver is None:
+        driver = lstsq.default_lapack_driver
+    if driver not in ('gelsd', 'gelsy', 'gelss'):
+        raise ValueError(f'LAPACK driver "{driver}" is not found')
+
+    lapack_func, lapack_lwork = get_lapack_funcs((driver,
+                                                 f'{driver}_lwork'),
+                                                 (a1, b1))
+    real_data = True if (lapack_func.dtype.kind == 'f') else False
+
+    if m < n:
+        # need to extend b matrix as it will be filled with
+        # a larger solution matrix
+        if len(b1.shape) == 2:
+            b2 = np.zeros((n, nrhs), dtype=lapack_func.dtype)
+            b2[:m, :] = b1
+        else:
+            b2 = np.zeros(n, dtype=lapack_func.dtype)
+            b2[:m] = b1
+        b1 = b2
+
+    overwrite_a = overwrite_a or _datacopied(a1, a)
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+
+    if cond is None:
+        cond = np.finfo(lapack_func.dtype).eps
+
+    if driver in ('gelss', 'gelsd'):
+        if driver == 'gelss':
+            lwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond)
+            v, x, s, rank, work, info = lapack_func(a1, b1, cond, lwork,
+                                                    overwrite_a=overwrite_a,
+                                                    overwrite_b=overwrite_b)
+
+        elif driver == 'gelsd':
+            if real_data:
+                lwork, iwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond)
+                x, s, rank, info = lapack_func(a1, b1, lwork,
+                                               iwork, cond, False, False)
+            else:  # complex data
+                lwork, rwork, iwork = _compute_lwork(lapack_lwork, m, n,
+                                                     nrhs, cond)
+                x, s, rank, info = lapack_func(a1, b1, lwork, rwork, iwork,
+                                               cond, False, False)
+        if info > 0:
+            raise LinAlgError("SVD did not converge in Linear Least Squares")
+        if info < 0:
+            raise ValueError('illegal value in %d-th argument of internal %s'
+                             % (-info, lapack_driver))
+        resids = np.asarray([], dtype=x.dtype)
+        if m > n:
+            x1 = x[:n]
+            if rank == n:
+                resids = np.sum(np.abs(x[n:])**2, axis=0)
+            x = x1
+        return x, resids, rank, s
+
+    elif driver == 'gelsy':
+        lwork = _compute_lwork(lapack_lwork, m, n, nrhs, cond)
+        jptv = np.zeros((a1.shape[1], 1), dtype=np.int32)
+        v, x, j, rank, info = lapack_func(a1, b1, jptv, cond,
+                                          lwork, False, False)
+        if info < 0:
+            raise ValueError("illegal value in %d-th argument of internal "
+                             "gelsy" % -info)
+        if m > n:
+            x1 = x[:n]
+            x = x1
+        return x, np.array([], x.dtype), rank, None
+
+
+lstsq.default_lapack_driver = 'gelsd'
+
+
+def pinv(a, *, atol=None, rtol=None, return_rank=False, check_finite=True):
+    """
+    Compute the (Moore-Penrose) pseudo-inverse of a matrix.
+
+    Calculate a generalized inverse of a matrix using its
+    singular-value decomposition ``U @ S @ V`` in the economy mode and picking
+    up only the columns/rows that are associated with significant singular
+    values.
+
+    If ``s`` is the maximum singular value of ``a``, then the
+    significance cut-off value is determined by ``atol + rtol * s``. Any
+    singular value below this value is assumed insignificant.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to be pseudo-inverted.
+    atol : float, optional
+        Absolute threshold term, default value is 0.
+
+        .. versionadded:: 1.7.0
+
+    rtol : float, optional
+        Relative threshold term, default value is ``max(M, N) * eps`` where
+        ``eps`` is the machine precision value of the datatype of ``a``.
+
+        .. versionadded:: 1.7.0
+
+    return_rank : bool, optional
+        If True, return the effective rank of the matrix.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    B : (N, M) ndarray
+        The pseudo-inverse of matrix `a`.
+    rank : int
+        The effective rank of the matrix. Returned if `return_rank` is True.
+
+    Raises
+    ------
+    LinAlgError
+        If SVD computation does not converge.
+
+    See Also
+    --------
+    pinvh : Moore-Penrose pseudoinverse of a hermitian matrix.
+
+    Notes
+    -----
+    If ``A`` is invertible then the Moore-Penrose pseudoinverse is exactly
+    the inverse of ``A`` [1]_. If ``A`` is not invertible then the
+    Moore-Penrose pseudoinverse computes the ``x`` solution to ``Ax = b`` such
+    that ``||Ax - b||`` is minimized [1]_.
+
+    References
+    ----------
+    .. [1] Penrose, R. (1956). On best approximate solutions of linear matrix
+           equations. Mathematical Proceedings of the Cambridge Philosophical
+           Society, 52(1), 17-19. doi:10.1017/S0305004100030929
+
+    Examples
+    --------
+
+    Given an ``m x n`` matrix ``A`` and an ``n x m`` matrix ``B`` the four
+    Moore-Penrose conditions are:
+
+    1. ``ABA = A`` (``B`` is a generalized inverse of ``A``),
+    2. ``BAB = B`` (``A`` is a generalized inverse of ``B``),
+    3. ``(AB)* = AB`` (``AB`` is hermitian),
+    4. ``(BA)* = BA`` (``BA`` is hermitian) [1]_.
+
+    Here, ``A*`` denotes the conjugate transpose. The Moore-Penrose
+    pseudoinverse is a unique ``B`` that satisfies all four of these
+    conditions and exists for any ``A``. Note that, unlike the standard
+    matrix inverse, ``A`` does not have to be a square matrix or have
+    linearly independent columns/rows.
+
+    As an example, we can calculate the Moore-Penrose pseudoinverse of a
+    random non-square matrix and verify it satisfies the four conditions.
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> rng = np.random.default_rng()
+    >>> A = rng.standard_normal((9, 6))
+    >>> B = linalg.pinv(A)
+    >>> np.allclose(A @ B @ A, A)  # Condition 1
+    True
+    >>> np.allclose(B @ A @ B, B)  # Condition 2
+    True
+    >>> np.allclose((A @ B).conj().T, A @ B)  # Condition 3
+    True
+    >>> np.allclose((B @ A).conj().T, B @ A)  # Condition 4
+    True
+
+    """
+    a = _asarray_validated(a, check_finite=check_finite)
+    u, s, vh = _decomp_svd.svd(a, full_matrices=False, check_finite=False)
+    t = u.dtype.char.lower()
+    maxS = np.max(s, initial=0.)
+
+    atol = 0. if atol is None else atol
+    rtol = max(a.shape) * np.finfo(t).eps if (rtol is None) else rtol
+
+    if (atol < 0.) or (rtol < 0.):
+        raise ValueError("atol and rtol values must be positive.")
+
+    val = atol + maxS * rtol
+    rank = np.sum(s > val)
+
+    u = u[:, :rank]
+    u /= s[:rank]
+    B = (u @ vh[:rank]).conj().T
+
+    if return_rank:
+        return B, rank
+    else:
+        return B
+
+
+def pinvh(a, atol=None, rtol=None, lower=True, return_rank=False,
+          check_finite=True):
+    """
+    Compute the (Moore-Penrose) pseudo-inverse of a Hermitian matrix.
+
+    Calculate a generalized inverse of a complex Hermitian/real symmetric
+    matrix using its eigenvalue decomposition and including all eigenvalues
+    with 'large' absolute value.
+
+    Parameters
+    ----------
+    a : (N, N) array_like
+        Real symmetric or complex hermetian matrix to be pseudo-inverted
+
+    atol : float, optional
+        Absolute threshold term, default value is 0.
+
+        .. versionadded:: 1.7.0
+
+    rtol : float, optional
+        Relative threshold term, default value is ``N * eps`` where
+        ``eps`` is the machine precision value of the datatype of ``a``.
+
+        .. versionadded:: 1.7.0
+
+    lower : bool, optional
+        Whether the pertinent array data is taken from the lower or upper
+        triangle of `a`. (Default: lower)
+    return_rank : bool, optional
+        If True, return the effective rank of the matrix.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    B : (N, N) ndarray
+        The pseudo-inverse of matrix `a`.
+    rank : int
+        The effective rank of the matrix.  Returned if `return_rank` is True.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue algorithm does not converge.
+
+    See Also
+    --------
+    pinv : Moore-Penrose pseudoinverse of a matrix.
+
+    Examples
+    --------
+
+    For a more detailed example see `pinv`.
+
+    >>> import numpy as np
+    >>> from scipy.linalg import pinvh
+    >>> rng = np.random.default_rng()
+    >>> a = rng.standard_normal((9, 6))
+    >>> a = np.dot(a, a.T)
+    >>> B = pinvh(a)
+    >>> np.allclose(a, a @ B @ a)
+    True
+    >>> np.allclose(B, B @ a @ B)
+    True
+
+    """
+    a = _asarray_validated(a, check_finite=check_finite)
+    s, u = _decomp.eigh(a, lower=lower, check_finite=False, driver='ev')
+    t = u.dtype.char.lower()
+    maxS = np.max(np.abs(s), initial=0.)
+
+    atol = 0. if atol is None else atol
+    rtol = max(a.shape) * np.finfo(t).eps if (rtol is None) else rtol
+
+    if (atol < 0.) or (rtol < 0.):
+        raise ValueError("atol and rtol values must be positive.")
+
+    val = atol + maxS * rtol
+    above_cutoff = (abs(s) > val)
+
+    psigma_diag = 1.0 / s[above_cutoff]
+    u = u[:, above_cutoff]
+
+    B = (u * psigma_diag) @ u.conj().T
+
+    if return_rank:
+        return B, len(psigma_diag)
+    else:
+        return B
+
+
+def matrix_balance(A, permute=True, scale=True, separate=False,
+                   overwrite_a=False):
+    """
+    Compute a diagonal similarity transformation for row/column balancing.
+
+    The balancing tries to equalize the row and column 1-norms by applying
+    a similarity transformation such that the magnitude variation of the
+    matrix entries is reflected to the scaling matrices.
+
+    Moreover, if enabled, the matrix is first permuted to isolate the upper
+    triangular parts of the matrix and, again if scaling is also enabled,
+    only the remaining subblocks are subjected to scaling.
+
+    The balanced matrix satisfies the following equality
+
+    .. math::
+
+                        B = T^{-1} A T
+
+    The scaling coefficients are approximated to the nearest power of 2
+    to avoid round-off errors.
+
+    Parameters
+    ----------
+    A : (n, n) array_like
+        Square data matrix for the balancing.
+    permute : bool, optional
+        The selector to define whether permutation of A is also performed
+        prior to scaling.
+    scale : bool, optional
+        The selector to turn on and off the scaling. If False, the matrix
+        will not be scaled.
+    separate : bool, optional
+        This switches from returning a full matrix of the transformation
+        to a tuple of two separate 1-D permutation and scaling arrays.
+    overwrite_a : bool, optional
+        This is passed to xGEBAL directly. Essentially, overwrites the result
+        to the data. It might increase the space efficiency. See LAPACK manual
+        for details. This is False by default.
+
+    Returns
+    -------
+    B : (n, n) ndarray
+        Balanced matrix
+    T : (n, n) ndarray
+        A possibly permuted diagonal matrix whose nonzero entries are
+        integer powers of 2 to avoid numerical truncation errors.
+    scale, perm : (n,) ndarray
+        If ``separate`` keyword is set to True then instead of the array
+        ``T`` above, the scaling and the permutation vectors are given
+        separately as a tuple without allocating the full array ``T``.
+
+    Notes
+    -----
+    This algorithm is particularly useful for eigenvalue and matrix
+    decompositions and in many cases it is already called by various
+    LAPACK routines.
+
+    The algorithm is based on the well-known technique of [1]_ and has
+    been modified to account for special cases. See [2]_ for details
+    which have been implemented since LAPACK v3.5.0. Before this version
+    there are corner cases where balancing can actually worsen the
+    conditioning. See [3]_ for such examples.
+
+    The code is a wrapper around LAPACK's xGEBAL routine family for matrix
+    balancing.
+
+    .. versionadded:: 0.19.0
+
+    References
+    ----------
+    .. [1] B.N. Parlett and C. Reinsch, "Balancing a Matrix for
+       Calculation of Eigenvalues and Eigenvectors", Numerische Mathematik,
+       Vol.13(4), 1969, :doi:`10.1007/BF02165404`
+    .. [2] R. James, J. Langou, B.R. Lowery, "On matrix balancing and
+       eigenvector computation", 2014, :arxiv:`1401.5766`
+    .. [3] D.S. Watkins. A case where balancing is harmful.
+       Electron. Trans. Numer. Anal, Vol.23, 2006.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> x = np.array([[1,2,0], [9,1,0.01], [1,2,10*np.pi]])
+
+    >>> y, permscale = linalg.matrix_balance(x)
+    >>> np.abs(x).sum(axis=0) / np.abs(x).sum(axis=1)
+    array([ 3.66666667,  0.4995005 ,  0.91312162])
+
+    >>> np.abs(y).sum(axis=0) / np.abs(y).sum(axis=1)
+    array([ 1.2       ,  1.27041742,  0.92658316])  # may vary
+
+    >>> permscale  # only powers of 2 (0.5 == 2^(-1))
+    array([[  0.5,   0. ,  0. ],  # may vary
+           [  0. ,   1. ,  0. ],
+           [  0. ,   0. ,  1. ]])
+
+    """
+
+    A = np.atleast_2d(_asarray_validated(A, check_finite=True))
+
+    if not np.equal(*A.shape):
+        raise ValueError('The data matrix for balancing should be square.')
+
+    # accommodate empty arrays
+    if A.size == 0:
+        b_n, t_n = matrix_balance(np.eye(2, dtype=A.dtype))
+        B = np.empty_like(A, dtype=b_n.dtype)
+        if separate:
+            scaling = np.ones_like(A, shape=len(A))
+            perm = np.arange(len(A))
+            return B, (scaling, perm)
+        return B, np.empty_like(A, dtype=t_n.dtype)
+
+    gebal = get_lapack_funcs(('gebal'), (A,))
+    B, lo, hi, ps, info = gebal(A, scale=scale, permute=permute,
+                                overwrite_a=overwrite_a)
+
+    if info < 0:
+        raise ValueError('xGEBAL exited with the internal error '
+                         f'"illegal value in argument number {-info}.". See '
+                         'LAPACK documentation for the xGEBAL error codes.')
+
+    # Separate the permutations from the scalings and then convert to int
+    scaling = np.ones_like(ps, dtype=float)
+    scaling[lo:hi+1] = ps[lo:hi+1]
+
+    # gebal uses 1-indexing
+    ps = ps.astype(int, copy=False) - 1
+    n = A.shape[0]
+    perm = np.arange(n)
+
+    # LAPACK permutes with the ordering n --> hi, then 0--> lo
+    if hi < n:
+        for ind, x in enumerate(ps[hi+1:][::-1], 1):
+            if n-ind == x:
+                continue
+            perm[[x, n-ind]] = perm[[n-ind, x]]
+
+    if lo > 0:
+        for ind, x in enumerate(ps[:lo]):
+            if ind == x:
+                continue
+            perm[[x, ind]] = perm[[ind, x]]
+
+    if separate:
+        return B, (scaling, perm)
+
+    # get the inverse permutation
+    iperm = np.empty_like(perm)
+    iperm[perm] = np.arange(n)
+
+    return B, np.diag(scaling)[iperm, :]
+
+
+def _validate_args_for_toeplitz_ops(c_or_cr, b, check_finite, keep_b_shape,
+                                    enforce_square=True):
+    """Validate arguments and format inputs for toeplitz functions
+
+    Parameters
+    ----------
+    c_or_cr : array_like or tuple of (array_like, array_like)
+        The vector ``c``, or a tuple of arrays (``c``, ``r``). Whatever the
+        actual shape of ``c``, it will be converted to a 1-D array. If not
+        supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is
+        real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row
+        of the Toeplitz matrix is ``[c[0], r[1:]]``. Whatever the actual shape
+        of ``r``, it will be converted to a 1-D array.
+    b : (M,) or (M, K) array_like
+        Right-hand side in ``T x = b``.
+    check_finite : bool
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (result entirely NaNs) if the inputs do contain infinities or NaNs.
+    keep_b_shape : bool
+        Whether to convert a (M,) dimensional b into a (M, 1) dimensional
+        matrix.
+    enforce_square : bool, optional
+        If True (default), this verifies that the Toeplitz matrix is square.
+
+    Returns
+    -------
+    r : array
+        1d array corresponding to the first row of the Toeplitz matrix.
+    c: array
+        1d array corresponding to the first column of the Toeplitz matrix.
+    b: array
+        (M,), (M, 1) or (M, K) dimensional array, post validation,
+        corresponding to ``b``.
+    dtype: numpy datatype
+        ``dtype`` stores the datatype of ``r``, ``c`` and ``b``. If any of
+        ``r``, ``c`` or ``b`` are complex, ``dtype`` is ``np.complex128``,
+        otherwise, it is ``np.float``.
+    b_shape: tuple
+        Shape of ``b`` after passing it through ``_asarray_validated``.
+
+    """
+
+    if isinstance(c_or_cr, tuple):
+        c, r = c_or_cr
+        c = _asarray_validated(c, check_finite=check_finite)
+        r = _asarray_validated(r, check_finite=check_finite)
+    else:
+        c = _asarray_validated(c_or_cr, check_finite=check_finite)
+        r = c.conjugate()
+
+    if c.ndim > 1 or r.ndim > 1:
+        msg = ("Beginning in SciPy 1.17, multidimensional input will be treated as a "
+               "batch, not `ravel`ed. To preserve the existing behavior and silence "
+               "this warning, `ravel` arguments before passing them to "
+               "`toeplitz`, `matmul_toeplitz`, and `solve_toeplitz`.")
+        warnings.warn(msg, FutureWarning, stacklevel=2)
+        c = c.ravel()
+        r = r.ravel()
+
+    if b is None:
+        raise ValueError('`b` must be an array, not None.')
+
+    b = _asarray_validated(b, check_finite=check_finite)
+    b_shape = b.shape
+
+    is_not_square = r.shape[0] != c.shape[0]
+    if (enforce_square and is_not_square) or b.shape[0] != r.shape[0]:
+        raise ValueError('Incompatible dimensions.')
+
+    is_cmplx = np.iscomplexobj(r) or np.iscomplexobj(c) or np.iscomplexobj(b)
+    dtype = np.complex128 if is_cmplx else np.float64
+    r, c, b = (np.asarray(i, dtype=dtype) for i in (r, c, b))
+
+    if b.ndim == 1 and not keep_b_shape:
+        b = b.reshape(-1, 1)
+    elif b.ndim != 1:
+        b = b.reshape(b.shape[0], -1 if b.size > 0 else 0)
+
+    return r, c, b, dtype, b_shape
+
+
+def matmul_toeplitz(c_or_cr, x, check_finite=False, workers=None):
+    r"""Efficient Toeplitz Matrix-Matrix Multiplication using FFT
+
+    This function returns the matrix multiplication between a Toeplitz
+    matrix and a dense matrix.
+
+    The Toeplitz matrix has constant diagonals, with c as its first column
+    and r as its first row. If r is not given, ``r == conjugate(c)`` is
+    assumed.
+
+    .. warning::
+
+        Beginning in SciPy 1.17, multidimensional input will be treated as a batch,
+        not ``ravel``\ ed. To preserve the existing behavior, ``ravel`` arguments
+        before passing them to `matmul_toeplitz`.
+
+    Parameters
+    ----------
+    c_or_cr : array_like or tuple of (array_like, array_like)
+        The vector ``c``, or a tuple of arrays (``c``, ``r``). If not
+        supplied, ``r = conjugate(c)`` is assumed; in this case, if c[0] is
+        real, the Toeplitz matrix is Hermitian. r[0] is ignored; the first row
+        of the Toeplitz matrix is ``[c[0], r[1:]]``.
+    x : (M,) or (M, K) array_like
+        Matrix with which to multiply.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (result entirely NaNs) if the inputs do contain infinities or NaNs.
+    workers : int, optional
+        To pass to scipy.fft.fft and ifft. Maximum number of workers to use
+        for parallel computation. If negative, the value wraps around from
+        ``os.cpu_count()``. See scipy.fft.fft for more details.
+
+    Returns
+    -------
+    T @ x : (M,) or (M, K) ndarray
+        The result of the matrix multiplication ``T @ x``. Shape of return
+        matches shape of `x`.
+
+    See Also
+    --------
+    toeplitz : Toeplitz matrix
+    solve_toeplitz : Solve a Toeplitz system using Levinson Recursion
+
+    Notes
+    -----
+    The Toeplitz matrix is embedded in a circulant matrix and the FFT is used
+    to efficiently calculate the matrix-matrix product.
+
+    Because the computation is based on the FFT, integer inputs will
+    result in floating point outputs.  This is unlike NumPy's `matmul`,
+    which preserves the data type of the input.
+
+    This is partly based on the implementation that can be found in [1]_,
+    licensed under the MIT license. More information about the method can be
+    found in reference [2]_. References [3]_ and [4]_ have more reference
+    implementations in Python.
+
+    .. versionadded:: 1.6.0
+
+    References
+    ----------
+    .. [1] Jacob R Gardner, Geoff Pleiss, David Bindel, Kilian
+       Q Weinberger, Andrew Gordon Wilson, "GPyTorch: Blackbox Matrix-Matrix
+       Gaussian Process Inference with GPU Acceleration" with contributions
+       from Max Balandat and Ruihan Wu. Available online:
+       https://github.com/cornellius-gp/gpytorch
+
+    .. [2] J. Demmel, P. Koev, and X. Li, "A Brief Survey of Direct Linear
+       Solvers". In Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. van der
+       Vorst, editors. Templates for the Solution of Algebraic Eigenvalue
+       Problems: A Practical Guide. SIAM, Philadelphia, 2000. Available at:
+       http://www.netlib.org/utk/people/JackDongarra/etemplates/node384.html
+
+    .. [3] R. Scheibler, E. Bezzam, I. Dokmanic, Pyroomacoustics: A Python
+       package for audio room simulations and array processing algorithms,
+       Proc. IEEE ICASSP, Calgary, CA, 2018.
+       https://github.com/LCAV/pyroomacoustics/blob/pypi-release/
+       pyroomacoustics/adaptive/util.py
+
+    .. [4] Marano S, Edwards B, Ferrari G and Fah D (2017), "Fitting
+       Earthquake Spectra: Colored Noise and Incomplete Data", Bulletin of
+       the Seismological Society of America., January, 2017. Vol. 107(1),
+       pp. 276-291.
+
+    Examples
+    --------
+    Multiply the Toeplitz matrix T with matrix x::
+
+            [ 1 -1 -2 -3]       [1 10]
+        T = [ 3  1 -1 -2]   x = [2 11]
+            [ 6  3  1 -1]       [2 11]
+            [10  6  3  1]       [5 19]
+
+    To specify the Toeplitz matrix, only the first column and the first
+    row are needed.
+
+    >>> import numpy as np
+    >>> c = np.array([1, 3, 6, 10])    # First column of T
+    >>> r = np.array([1, -1, -2, -3])  # First row of T
+    >>> x = np.array([[1, 10], [2, 11], [2, 11], [5, 19]])
+
+    >>> from scipy.linalg import toeplitz, matmul_toeplitz
+    >>> matmul_toeplitz((c, r), x)
+    array([[-20., -80.],
+           [ -7.,  -8.],
+           [  9.,  85.],
+           [ 33., 218.]])
+
+    Check the result by creating the full Toeplitz matrix and
+    multiplying it by ``x``.
+
+    >>> toeplitz(c, r) @ x
+    array([[-20, -80],
+           [ -7,  -8],
+           [  9,  85],
+           [ 33, 218]])
+
+    The full matrix is never formed explicitly, so this routine
+    is suitable for very large Toeplitz matrices.
+
+    >>> n = 1000000
+    >>> matmul_toeplitz([1] + [0]*(n-1), np.ones(n))
+    array([1., 1., 1., ..., 1., 1., 1.], shape=(1000000,))
+
+    """
+
+    from ..fft import fft, ifft, rfft, irfft
+
+    r, c, x, dtype, x_shape = _validate_args_for_toeplitz_ops(
+        c_or_cr, x, check_finite, keep_b_shape=False, enforce_square=False)
+    n, m = x.shape
+
+    T_nrows = len(c)
+    T_ncols = len(r)
+    p = T_nrows + T_ncols - 1  # equivalent to len(embedded_col)
+    return_shape = (T_nrows,) if len(x_shape) == 1 else (T_nrows, m)
+
+    # accommodate empty arrays
+    if x.size == 0:
+        return np.empty_like(x, shape=return_shape)
+
+    embedded_col = np.concatenate((c, r[-1:0:-1]))
+
+    if np.iscomplexobj(embedded_col) or np.iscomplexobj(x):
+        fft_mat = fft(embedded_col, axis=0, workers=workers).reshape(-1, 1)
+        fft_x = fft(x, n=p, axis=0, workers=workers)
+
+        mat_times_x = ifft(fft_mat*fft_x, axis=0,
+                           workers=workers)[:T_nrows, :]
+    else:
+        # Real inputs; using rfft is faster
+        fft_mat = rfft(embedded_col, axis=0, workers=workers).reshape(-1, 1)
+        fft_x = rfft(x, n=p, axis=0, workers=workers)
+
+        mat_times_x = irfft(fft_mat*fft_x, axis=0,
+                            workers=workers, n=p)[:T_nrows, :]
+
+    return mat_times_x.reshape(*return_shape)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h
new file mode 100644
index 0000000000000000000000000000000000000000..a175ca15f4adbed6d5c576e9e5ee1117abbd31ec
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_blas_subroutines.h
@@ -0,0 +1,164 @@
+/*
+This file was generated by _generate_pyx.py.
+Do not edit this file directly.
+*/
+
+#include "npy_cblas.h"
+#include "fortran_defs.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void BLAS_FUNC(caxpy)(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy);
+void BLAS_FUNC(ccopy)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy);
+void F_FUNC(cdotcwrp,CDOTCWRP)(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy);
+void F_FUNC(cdotuwrp,CDOTUWRP)(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy);
+void BLAS_FUNC(cgbmv)(char *trans, int *m, int *n, int *kl, int *ku, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(cgemm)(char *transa, char *transb, int *m, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(cgemv)(char *trans, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(cgerc)(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda);
+void BLAS_FUNC(cgeru)(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda);
+void BLAS_FUNC(chbmv)(char *uplo, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(chemm)(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(chemv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(cher)(char *uplo, int *n, float *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda);
+void BLAS_FUNC(cher2)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda);
+void BLAS_FUNC(cher2k)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(cherk)(char *uplo, char *trans, int *n, int *k, float *alpha, npy_complex64 *a, int *lda, float *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(chpmv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(chpr)(char *uplo, int *n, float *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap);
+void BLAS_FUNC(chpr2)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *ap);
+void BLAS_FUNC(crotg)(npy_complex64 *ca, npy_complex64 *cb, float *c, npy_complex64 *s);
+void BLAS_FUNC(cscal)(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx);
+void BLAS_FUNC(csrot)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, float *c, float *s);
+void BLAS_FUNC(csscal)(int *n, float *sa, npy_complex64 *cx, int *incx);
+void BLAS_FUNC(cswap)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy);
+void BLAS_FUNC(csymm)(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(csyr2k)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(csyrk)(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *beta, npy_complex64 *c, int *ldc);
+void BLAS_FUNC(ctbmv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx);
+void BLAS_FUNC(ctbsv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx);
+void BLAS_FUNC(ctpmv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx);
+void BLAS_FUNC(ctpsv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx);
+void BLAS_FUNC(ctrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(ctrmv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx);
+void BLAS_FUNC(ctrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(ctrsv)(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx);
+double BLAS_FUNC(dasum)(int *n, double *dx, int *incx);
+void BLAS_FUNC(daxpy)(int *n, double *da, double *dx, int *incx, double *dy, int *incy);
+double BLAS_FUNC(dcabs1)(npy_complex128 *z);
+void BLAS_FUNC(dcopy)(int *n, double *dx, int *incx, double *dy, int *incy);
+double BLAS_FUNC(ddot)(int *n, double *dx, int *incx, double *dy, int *incy);
+void BLAS_FUNC(dgbmv)(char *trans, int *m, int *n, int *kl, int *ku, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy);
+void BLAS_FUNC(dgemm)(char *transa, char *transb, int *m, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc);
+void BLAS_FUNC(dgemv)(char *trans, int *m, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy);
+void BLAS_FUNC(dger)(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda);
+double BLAS_FUNC(dnrm2)(int *n, double *x, int *incx);
+void BLAS_FUNC(drot)(int *n, double *dx, int *incx, double *dy, int *incy, double *c, double *s);
+void BLAS_FUNC(drotg)(double *da, double *db, double *c, double *s);
+void BLAS_FUNC(drotm)(int *n, double *dx, int *incx, double *dy, int *incy, double *dparam);
+void BLAS_FUNC(drotmg)(double *dd1, double *dd2, double *dx1, double *dy1, double *dparam);
+void BLAS_FUNC(dsbmv)(char *uplo, int *n, int *k, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy);
+void BLAS_FUNC(dscal)(int *n, double *da, double *dx, int *incx);
+double BLAS_FUNC(dsdot)(int *n, float *sx, int *incx, float *sy, int *incy);
+void BLAS_FUNC(dspmv)(char *uplo, int *n, double *alpha, double *ap, double *x, int *incx, double *beta, double *y, int *incy);
+void BLAS_FUNC(dspr)(char *uplo, int *n, double *alpha, double *x, int *incx, double *ap);
+void BLAS_FUNC(dspr2)(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *ap);
+void BLAS_FUNC(dswap)(int *n, double *dx, int *incx, double *dy, int *incy);
+void BLAS_FUNC(dsymm)(char *side, char *uplo, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc);
+void BLAS_FUNC(dsymv)(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy);
+void BLAS_FUNC(dsyr)(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda);
+void BLAS_FUNC(dsyr2)(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda);
+void BLAS_FUNC(dsyr2k)(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *b, int *ldb, double *beta, double *c, int *ldc);
+void BLAS_FUNC(dsyrk)(char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c, int *ldc);
+void BLAS_FUNC(dtbmv)(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx);
+void BLAS_FUNC(dtbsv)(char *uplo, char *trans, char *diag, int *n, int *k, double *a, int *lda, double *x, int *incx);
+void BLAS_FUNC(dtpmv)(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx);
+void BLAS_FUNC(dtpsv)(char *uplo, char *trans, char *diag, int *n, double *ap, double *x, int *incx);
+void BLAS_FUNC(dtrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb);
+void BLAS_FUNC(dtrmv)(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx);
+void BLAS_FUNC(dtrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, double *alpha, double *a, int *lda, double *b, int *ldb);
+void BLAS_FUNC(dtrsv)(char *uplo, char *trans, char *diag, int *n, double *a, int *lda, double *x, int *incx);
+double BLAS_FUNC(dzasum)(int *n, npy_complex128 *zx, int *incx);
+double BLAS_FUNC(dznrm2)(int *n, npy_complex128 *x, int *incx);
+int BLAS_FUNC(icamax)(int *n, npy_complex64 *cx, int *incx);
+int BLAS_FUNC(idamax)(int *n, double *dx, int *incx);
+int BLAS_FUNC(isamax)(int *n, float *sx, int *incx);
+int BLAS_FUNC(izamax)(int *n, npy_complex128 *zx, int *incx);
+int BLAS_FUNC(lsame)(char *ca, char *cb);
+float BLAS_FUNC(sasum)(int *n, float *sx, int *incx);
+void BLAS_FUNC(saxpy)(int *n, float *sa, float *sx, int *incx, float *sy, int *incy);
+float BLAS_FUNC(scasum)(int *n, npy_complex64 *cx, int *incx);
+float BLAS_FUNC(scnrm2)(int *n, npy_complex64 *x, int *incx);
+void BLAS_FUNC(scopy)(int *n, float *sx, int *incx, float *sy, int *incy);
+float BLAS_FUNC(sdot)(int *n, float *sx, int *incx, float *sy, int *incy);
+float BLAS_FUNC(sdsdot)(int *n, float *sb, float *sx, int *incx, float *sy, int *incy);
+void BLAS_FUNC(sgbmv)(char *trans, int *m, int *n, int *kl, int *ku, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy);
+void BLAS_FUNC(sgemm)(char *transa, char *transb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc);
+void BLAS_FUNC(sgemv)(char *trans, int *m, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy);
+void BLAS_FUNC(sger)(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda);
+float BLAS_FUNC(snrm2)(int *n, float *x, int *incx);
+void BLAS_FUNC(srot)(int *n, float *sx, int *incx, float *sy, int *incy, float *c, float *s);
+void BLAS_FUNC(srotg)(float *sa, float *sb, float *c, float *s);
+void BLAS_FUNC(srotm)(int *n, float *sx, int *incx, float *sy, int *incy, float *sparam);
+void BLAS_FUNC(srotmg)(float *sd1, float *sd2, float *sx1, float *sy1, float *sparam);
+void BLAS_FUNC(ssbmv)(char *uplo, int *n, int *k, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy);
+void BLAS_FUNC(sscal)(int *n, float *sa, float *sx, int *incx);
+void BLAS_FUNC(sspmv)(char *uplo, int *n, float *alpha, float *ap, float *x, int *incx, float *beta, float *y, int *incy);
+void BLAS_FUNC(sspr)(char *uplo, int *n, float *alpha, float *x, int *incx, float *ap);
+void BLAS_FUNC(sspr2)(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *ap);
+void BLAS_FUNC(sswap)(int *n, float *sx, int *incx, float *sy, int *incy);
+void BLAS_FUNC(ssymm)(char *side, char *uplo, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc);
+void BLAS_FUNC(ssymv)(char *uplo, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy);
+void BLAS_FUNC(ssyr)(char *uplo, int *n, float *alpha, float *x, int *incx, float *a, int *lda);
+void BLAS_FUNC(ssyr2)(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda);
+void BLAS_FUNC(ssyr2k)(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc);
+void BLAS_FUNC(ssyrk)(char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c, int *ldc);
+void BLAS_FUNC(stbmv)(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx);
+void BLAS_FUNC(stbsv)(char *uplo, char *trans, char *diag, int *n, int *k, float *a, int *lda, float *x, int *incx);
+void BLAS_FUNC(stpmv)(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx);
+void BLAS_FUNC(stpsv)(char *uplo, char *trans, char *diag, int *n, float *ap, float *x, int *incx);
+void BLAS_FUNC(strmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb);
+void BLAS_FUNC(strmv)(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx);
+void BLAS_FUNC(strsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb);
+void BLAS_FUNC(strsv)(char *uplo, char *trans, char *diag, int *n, float *a, int *lda, float *x, int *incx);
+void BLAS_FUNC(zaxpy)(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy);
+void BLAS_FUNC(zcopy)(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy);
+void F_FUNC(zdotcwrp,ZDOTCWRP)(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy);
+void F_FUNC(zdotuwrp,ZDOTUWRP)(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy);
+void BLAS_FUNC(zdrot)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, double *c, double *s);
+void BLAS_FUNC(zdscal)(int *n, double *da, npy_complex128 *zx, int *incx);
+void BLAS_FUNC(zgbmv)(char *trans, int *m, int *n, int *kl, int *ku, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zgemm)(char *transa, char *transb, int *m, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zgemv)(char *trans, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zgerc)(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zgeru)(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zhbmv)(char *uplo, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zhemm)(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zhemv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zher)(char *uplo, int *n, double *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zher2)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zher2k)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zherk)(char *uplo, char *trans, int *n, int *k, double *alpha, npy_complex128 *a, int *lda, double *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zhpmv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zhpr)(char *uplo, int *n, double *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap);
+void BLAS_FUNC(zhpr2)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *ap);
+void BLAS_FUNC(zrotg)(npy_complex128 *ca, npy_complex128 *cb, double *c, npy_complex128 *s);
+void BLAS_FUNC(zscal)(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx);
+void BLAS_FUNC(zswap)(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy);
+void BLAS_FUNC(zsymm)(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zsyr2k)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(zsyrk)(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *beta, npy_complex128 *c, int *ldc);
+void BLAS_FUNC(ztbmv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx);
+void BLAS_FUNC(ztbsv)(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx);
+void BLAS_FUNC(ztpmv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx);
+void BLAS_FUNC(ztpsv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx);
+void BLAS_FUNC(ztrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(ztrmv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx);
+void BLAS_FUNC(ztrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(ztrsv)(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..ccec61c078e57ba7b6a310ec57189fcf236c972d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pxd
@@ -0,0 +1,40 @@
+cimport numpy as cnp
+
+ctypedef fused lapack_t:
+    float
+    double
+    (float complex)
+    (double complex)
+
+ctypedef fused lapack_cz_t:
+    (float complex)
+    (double complex)
+
+ctypedef fused lapack_sd_t:
+    float
+    double
+
+ctypedef fused np_numeric_t:
+    cnp.int8_t
+    cnp.int16_t
+    cnp.int32_t
+    cnp.int64_t
+    cnp.uint8_t
+    cnp.uint16_t
+    cnp.uint32_t
+    cnp.uint64_t
+    cnp.float32_t
+    cnp.float64_t
+    cnp.longdouble_t
+    cnp.complex64_t
+    cnp.complex128_t
+
+ctypedef fused np_complex_numeric_t:
+    cnp.complex64_t
+    cnp.complex128_t
+
+
+cdef void swap_c_and_f_layout(lapack_t *a, lapack_t *b, int r, int c) noexcept nogil
+cdef (int, int) band_check_internal_c(np_numeric_t[:, ::1]A) noexcept nogil
+cdef bint is_sym_her_real_c_internal(np_numeric_t[:, ::1]A) noexcept nogil
+cdef bint is_sym_her_complex_c_internal(np_complex_numeric_t[:, ::1]A) noexcept nogil
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..5633cb61ecf3a90eba901120f64fa6cc6634fa5a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_cythonized_array_utils.pyi
@@ -0,0 +1,16 @@
+from numpy.typing import NDArray
+from typing import Any
+
+def bandwidth(a: NDArray[Any]) -> tuple[int, int]: ...
+
+def issymmetric(
+    a: NDArray[Any],
+    atol: None | float = ...,
+    rtol: None | float = ...,
+) -> bool: ...
+
+def ishermitian(
+    a: NDArray[Any],
+    atol: None | float = ...,
+    rtol: None | float = ...,
+) -> bool: ...
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py
new file mode 100644
index 0000000000000000000000000000000000000000..c520d6b04b6bf0a22c4fcad62d98a17faea7c9fd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp.py
@@ -0,0 +1,1632 @@
+#
+# Author: Pearu Peterson, March 2002
+#
+# additions by Travis Oliphant, March 2002
+# additions by Eric Jones,      June 2002
+# additions by Johannes Loehnert, June 2006
+# additions by Bart Vandereycken, June 2006
+# additions by Andrew D Straw, May 2007
+# additions by Tiziano Zito, November 2008
+#
+# April 2010: Functions for LU, QR, SVD, Schur, and Cholesky decompositions
+# were moved to their own files. Still in this file are functions for
+# eigenstuff and for the Hessenberg form.
+
+__all__ = ['eig', 'eigvals', 'eigh', 'eigvalsh',
+           'eig_banded', 'eigvals_banded',
+           'eigh_tridiagonal', 'eigvalsh_tridiagonal', 'hessenberg', 'cdf2rdf']
+
+import numpy as np
+from numpy import (array, isfinite, inexact, nonzero, iscomplexobj,
+                   flatnonzero, conj, asarray, argsort, empty,
+                   iscomplex, zeros, einsum, eye, inf)
+# Local imports
+from scipy._lib._util import _asarray_validated
+from ._misc import LinAlgError, _datacopied, norm
+from .lapack import get_lapack_funcs, _compute_lwork
+
+
+_I = np.array(1j, dtype='F')
+
+
+def _make_complex_eigvecs(w, vin, dtype):
+    """
+    Produce complex-valued eigenvectors from LAPACK DGGEV real-valued output
+    """
+    # - see LAPACK man page DGGEV at ALPHAI
+    v = np.array(vin, dtype=dtype)
+    m = (w.imag > 0)
+    m[:-1] |= (w.imag[1:] < 0)  # workaround for LAPACK bug, cf. ticket #709
+    for i in flatnonzero(m):
+        v.imag[:, i] = vin[:, i+1]
+        conj(v[:, i], v[:, i+1])
+    return v
+
+
+def _make_eigvals(alpha, beta, homogeneous_eigvals):
+    if homogeneous_eigvals:
+        if beta is None:
+            return np.vstack((alpha, np.ones_like(alpha)))
+        else:
+            return np.vstack((alpha, beta))
+    else:
+        if beta is None:
+            return alpha
+        else:
+            w = np.empty_like(alpha)
+            alpha_zero = (alpha == 0)
+            beta_zero = (beta == 0)
+            beta_nonzero = ~beta_zero
+            w[beta_nonzero] = alpha[beta_nonzero]/beta[beta_nonzero]
+            # Use np.inf for complex values too since
+            # 1/np.inf = 0, i.e., it correctly behaves as projective
+            # infinity.
+            w[~alpha_zero & beta_zero] = np.inf
+            if np.all(alpha.imag == 0):
+                w[alpha_zero & beta_zero] = np.nan
+            else:
+                w[alpha_zero & beta_zero] = complex(np.nan, np.nan)
+            return w
+
+
+def _geneig(a1, b1, left, right, overwrite_a, overwrite_b,
+            homogeneous_eigvals):
+    ggev, = get_lapack_funcs(('ggev',), (a1, b1))
+    cvl, cvr = left, right
+    res = ggev(a1, b1, lwork=-1)
+    lwork = res[-2][0].real.astype(np.int_)
+    if ggev.typecode in 'cz':
+        alpha, beta, vl, vr, work, info = ggev(a1, b1, cvl, cvr, lwork,
+                                               overwrite_a, overwrite_b)
+        w = _make_eigvals(alpha, beta, homogeneous_eigvals)
+    else:
+        alphar, alphai, beta, vl, vr, work, info = ggev(a1, b1, cvl, cvr,
+                                                        lwork, overwrite_a,
+                                                        overwrite_b)
+        alpha = alphar + _I * alphai
+        w = _make_eigvals(alpha, beta, homogeneous_eigvals)
+    _check_info(info, 'generalized eig algorithm (ggev)')
+
+    only_real = np.all(w.imag == 0.0)
+    if not (ggev.typecode in 'cz' or only_real):
+        t = w.dtype.char
+        if left:
+            vl = _make_complex_eigvecs(w, vl, t)
+        if right:
+            vr = _make_complex_eigvecs(w, vr, t)
+
+    # the eigenvectors returned by the lapack function are NOT normalized
+    for i in range(vr.shape[0]):
+        if right:
+            vr[:, i] /= norm(vr[:, i])
+        if left:
+            vl[:, i] /= norm(vl[:, i])
+
+    if not (left or right):
+        return w
+    if left:
+        if right:
+            return w, vl, vr
+        return w, vl
+    return w, vr
+
+
+def eig(a, b=None, left=False, right=True, overwrite_a=False,
+        overwrite_b=False, check_finite=True, homogeneous_eigvals=False):
+    """
+    Solve an ordinary or generalized eigenvalue problem of a square matrix.
+
+    Find eigenvalues w and right or left eigenvectors of a general matrix::
+
+        a   vr[:,i] = w[i]        b   vr[:,i]
+        a.H vl[:,i] = w[i].conj() b.H vl[:,i]
+
+    where ``.H`` is the Hermitian conjugation.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        A complex or real matrix whose eigenvalues and eigenvectors
+        will be computed.
+    b : (M, M) array_like, optional
+        Right-hand side matrix in a generalized eigenvalue problem.
+        Default is None, identity matrix is assumed.
+    left : bool, optional
+        Whether to calculate and return left eigenvectors.  Default is False.
+    right : bool, optional
+        Whether to calculate and return right eigenvectors.  Default is True.
+    overwrite_a : bool, optional
+        Whether to overwrite `a`; may improve performance.  Default is False.
+    overwrite_b : bool, optional
+        Whether to overwrite `b`; may improve performance.  Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    homogeneous_eigvals : bool, optional
+        If True, return the eigenvalues in homogeneous coordinates.
+        In this case ``w`` is a (2, M) array so that::
+
+            w[1,i] a vr[:,i] = w[0,i] b vr[:,i]
+
+        Default is False.
+
+    Returns
+    -------
+    w : (M,) or (2, M) double or complex ndarray
+        The eigenvalues, each repeated according to its
+        multiplicity. The shape is (M,) unless
+        ``homogeneous_eigvals=True``.
+    vl : (M, M) double or complex ndarray
+        The left eigenvector corresponding to the eigenvalue
+        ``w[i]`` is the column ``vl[:,i]``. Only returned if ``left=True``.
+        The left eigenvector is not normalized.
+    vr : (M, M) double or complex ndarray
+        The normalized right eigenvector corresponding to the eigenvalue
+        ``w[i]`` is the column ``vr[:,i]``.  Only returned if ``right=True``.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigvals : eigenvalues of general arrays
+    eigh : Eigenvalues and right eigenvectors for symmetric/Hermitian arrays.
+    eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian
+        band matrices
+    eigh_tridiagonal : eigenvalues and right eiegenvectors for
+        symmetric/Hermitian tridiagonal matrices
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[0., -1.], [1., 0.]])
+    >>> linalg.eigvals(a)
+    array([0.+1.j, 0.-1.j])
+
+    >>> b = np.array([[0., 1.], [1., 1.]])
+    >>> linalg.eigvals(a, b)
+    array([ 1.+0.j, -1.+0.j])
+
+    >>> a = np.array([[3., 0., 0.], [0., 8., 0.], [0., 0., 7.]])
+    >>> linalg.eigvals(a, homogeneous_eigvals=True)
+    array([[3.+0.j, 8.+0.j, 7.+0.j],
+           [1.+0.j, 1.+0.j, 1.+0.j]])
+
+    >>> a = np.array([[0., -1.], [1., 0.]])
+    >>> linalg.eigvals(a) == linalg.eig(a)[0]
+    array([ True,  True])
+    >>> linalg.eig(a, left=True, right=False)[1] # normalized left eigenvector
+    array([[-0.70710678+0.j        , -0.70710678-0.j        ],
+           [-0.        +0.70710678j, -0.        -0.70710678j]])
+    >>> linalg.eig(a, left=False, right=True)[1] # normalized right eigenvector
+    array([[0.70710678+0.j        , 0.70710678-0.j        ],
+           [0.        -0.70710678j, 0.        +0.70710678j]])
+
+
+
+    """
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
+        raise ValueError('expected square matrix')
+
+    # accommodate square empty matrices
+    if a1.size == 0:
+        w_n, vr_n = eig(np.eye(2, dtype=a1.dtype))
+        w = np.empty_like(a1, shape=(0,), dtype=w_n.dtype)
+        w = _make_eigvals(w, None, homogeneous_eigvals)
+        vl = np.empty_like(a1, shape=(0, 0), dtype=vr_n.dtype)
+        vr = np.empty_like(a1, shape=(0, 0), dtype=vr_n.dtype)
+        if not (left or right):
+            return w
+        if left:
+            if right:
+                return w, vl, vr
+            return w, vl
+        return w, vr
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+    if b is not None:
+        b1 = _asarray_validated(b, check_finite=check_finite)
+        overwrite_b = overwrite_b or _datacopied(b1, b)
+        if len(b1.shape) != 2 or b1.shape[0] != b1.shape[1]:
+            raise ValueError('expected square matrix')
+        if b1.shape != a1.shape:
+            raise ValueError('a and b must have the same shape')
+        return _geneig(a1, b1, left, right, overwrite_a, overwrite_b,
+                       homogeneous_eigvals)
+
+    geev, geev_lwork = get_lapack_funcs(('geev', 'geev_lwork'), (a1,))
+    compute_vl, compute_vr = left, right
+
+    lwork = _compute_lwork(geev_lwork, a1.shape[0],
+                           compute_vl=compute_vl,
+                           compute_vr=compute_vr)
+
+    if geev.typecode in 'cz':
+        w, vl, vr, info = geev(a1, lwork=lwork,
+                               compute_vl=compute_vl,
+                               compute_vr=compute_vr,
+                               overwrite_a=overwrite_a)
+        w = _make_eigvals(w, None, homogeneous_eigvals)
+    else:
+        wr, wi, vl, vr, info = geev(a1, lwork=lwork,
+                                    compute_vl=compute_vl,
+                                    compute_vr=compute_vr,
+                                    overwrite_a=overwrite_a)
+        w = wr + _I * wi
+        w = _make_eigvals(w, None, homogeneous_eigvals)
+
+    _check_info(info, 'eig algorithm (geev)',
+                positive='did not converge (only eigenvalues '
+                         'with order >= %d have converged)')
+
+    only_real = np.all(w.imag == 0.0)
+    if not (geev.typecode in 'cz' or only_real):
+        t = w.dtype.char
+        if left:
+            vl = _make_complex_eigvecs(w, vl, t)
+        if right:
+            vr = _make_complex_eigvecs(w, vr, t)
+    if not (left or right):
+        return w
+    if left:
+        if right:
+            return w, vl, vr
+        return w, vl
+    return w, vr
+
+
+def eigh(a, b=None, *, lower=True, eigvals_only=False, overwrite_a=False,
+         overwrite_b=False, type=1, check_finite=True, subset_by_index=None,
+         subset_by_value=None, driver=None):
+    """
+    Solve a standard or generalized eigenvalue problem for a complex
+    Hermitian or real symmetric matrix.
+
+    Find eigenvalues array ``w`` and optionally eigenvectors array ``v`` of
+    array ``a``, where ``b`` is positive definite such that for every
+    eigenvalue λ (i-th entry of w) and its eigenvector ``vi`` (i-th column of
+    ``v``) satisfies::
+
+                      a @ vi = λ * b @ vi
+        vi.conj().T @ a @ vi = λ
+        vi.conj().T @ b @ vi = 1
+
+    In the standard problem, ``b`` is assumed to be the identity matrix.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        A complex Hermitian or real symmetric matrix whose eigenvalues and
+        eigenvectors will be computed.
+    b : (M, M) array_like, optional
+        A complex Hermitian or real symmetric definite positive matrix in.
+        If omitted, identity matrix is assumed.
+    lower : bool, optional
+        Whether the pertinent array data is taken from the lower or upper
+        triangle of ``a`` and, if applicable, ``b``. (Default: lower)
+    eigvals_only : bool, optional
+        Whether to calculate only eigenvalues and no eigenvectors.
+        (Default: both are calculated)
+    subset_by_index : iterable, optional
+        If provided, this two-element iterable defines the start and the end
+        indices of the desired eigenvalues (ascending order and 0-indexed).
+        To return only the second smallest to fifth smallest eigenvalues,
+        ``[1, 4]`` is used. ``[n-3, n-1]`` returns the largest three. Only
+        available with "evr", "evx", and "gvx" drivers. The entries are
+        directly converted to integers via ``int()``.
+    subset_by_value : iterable, optional
+        If provided, this two-element iterable defines the half-open interval
+        ``(a, b]`` that, if any, only the eigenvalues between these values
+        are returned. Only available with "evr", "evx", and "gvx" drivers. Use
+        ``np.inf`` for the unconstrained ends.
+    driver : str, optional
+        Defines which LAPACK driver should be used. Valid options are "ev",
+        "evd", "evr", "evx" for standard problems and "gv", "gvd", "gvx" for
+        generalized (where b is not None) problems. See the Notes section.
+        The default for standard problems is "evr". For generalized problems,
+        "gvd" is used for full set, and "gvx" for subset requested cases.
+    type : int, optional
+        For the generalized problems, this keyword specifies the problem type
+        to be solved for ``w`` and ``v`` (only takes 1, 2, 3 as possible
+        inputs)::
+
+            1 =>     a @ v = w @ b @ v
+            2 => a @ b @ v = w @ v
+            3 => b @ a @ v = w @ v
+
+        This keyword is ignored for standard problems.
+    overwrite_a : bool, optional
+        Whether to overwrite data in ``a`` (may improve performance). Default
+        is False.
+    overwrite_b : bool, optional
+        Whether to overwrite data in ``b`` (may improve performance). Default
+        is False.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    w : (N,) ndarray
+        The N (N<=M) selected eigenvalues, in ascending order, each
+        repeated according to its multiplicity.
+    v : (M, N) ndarray
+        The normalized eigenvector corresponding to the eigenvalue ``w[i]`` is
+        the column ``v[:,i]``. Only returned if ``eigvals_only=False``.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge, an error occurred, or
+        b matrix is not definite positive. Note that if input matrices are
+        not symmetric or Hermitian, no error will be reported but results will
+        be wrong.
+
+    See Also
+    --------
+    eigvalsh : eigenvalues of symmetric or Hermitian arrays
+    eig : eigenvalues and right eigenvectors for non-symmetric arrays
+    eigh_tridiagonal : eigenvalues and right eiegenvectors for
+        symmetric/Hermitian tridiagonal matrices
+
+    Notes
+    -----
+    This function does not check the input array for being Hermitian/symmetric
+    in order to allow for representing arrays with only their upper/lower
+    triangular parts. Also, note that even though not taken into account,
+    finiteness check applies to the whole array and unaffected by "lower"
+    keyword.
+
+    This function uses LAPACK drivers for computations in all possible keyword
+    combinations, prefixed with ``sy`` if arrays are real and ``he`` if
+    complex, e.g., a float array with "evr" driver is solved via
+    "syevr", complex arrays with "gvx" driver problem is solved via "hegvx"
+    etc.
+
+    As a brief summary, the slowest and the most robust driver is the
+    classical ``ev`` which uses symmetric QR. ``evr`` is seen as
+    the optimal choice for the most general cases. However, there are certain
+    occasions that ``evd`` computes faster at the expense of more
+    memory usage. ``evx``, while still being faster than ``ev``,
+    often performs worse than the rest except when very few eigenvalues are
+    requested for large arrays though there is still no performance guarantee.
+
+    Note that the underlying LAPACK algorithms are different depending on whether
+    `eigvals_only` is True or False --- thus the eigenvalues may differ
+    depending on whether eigenvectors are requested or not. The difference is
+    generally of the order of machine epsilon times the largest eigenvalue,
+    so is likely only visible for zero or nearly zero eigenvalues.
+
+    For the generalized problem, normalization with respect to the given
+    type argument::
+
+            type 1 and 3 :      v.conj().T @ a @ v = w
+            type 2       : inv(v).conj().T @ a @ inv(v) = w
+
+            type 1 or 2  :      v.conj().T @ b @ v  = I
+            type 3       : v.conj().T @ inv(b) @ v  = I
+
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import eigh
+    >>> A = np.array([[6, 3, 1, 5], [3, 0, 5, 1], [1, 5, 6, 2], [5, 1, 2, 2]])
+    >>> w, v = eigh(A)
+    >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4)))
+    True
+
+    Request only the eigenvalues
+
+    >>> w = eigh(A, eigvals_only=True)
+
+    Request eigenvalues that are less than 10.
+
+    >>> A = np.array([[34, -4, -10, -7, 2],
+    ...               [-4, 7, 2, 12, 0],
+    ...               [-10, 2, 44, 2, -19],
+    ...               [-7, 12, 2, 79, -34],
+    ...               [2, 0, -19, -34, 29]])
+    >>> eigh(A, eigvals_only=True, subset_by_value=[-np.inf, 10])
+    array([6.69199443e-07, 9.11938152e+00])
+
+    Request the second smallest eigenvalue and its eigenvector
+
+    >>> w, v = eigh(A, subset_by_index=[1, 1])
+    >>> w
+    array([9.11938152])
+    >>> v.shape  # only a single column is returned
+    (5, 1)
+
+    """
+    # set lower
+    uplo = 'L' if lower else 'U'
+    # Set job for Fortran routines
+    _job = 'N' if eigvals_only else 'V'
+
+    drv_str = [None, "ev", "evd", "evr", "evx", "gv", "gvd", "gvx"]
+    if driver not in drv_str:
+        raise ValueError('"{}" is unknown. Possible values are "None", "{}".'
+                         ''.format(driver, '", "'.join(drv_str[1:])))
+
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
+        raise ValueError('expected square "a" matrix')
+
+    # accommodate square empty matrices
+    if a1.size == 0:
+        w_n, v_n = eigh(np.eye(2, dtype=a1.dtype))
+
+        w = np.empty_like(a1, shape=(0,), dtype=w_n.dtype)
+        v = np.empty_like(a1, shape=(0, 0), dtype=v_n.dtype)
+        if eigvals_only:
+            return w
+        else:
+            return w, v
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+    cplx = True if iscomplexobj(a1) else False
+    n = a1.shape[0]
+    drv_args = {'overwrite_a': overwrite_a}
+
+    if b is not None:
+        b1 = _asarray_validated(b, check_finite=check_finite)
+        overwrite_b = overwrite_b or _datacopied(b1, b)
+        if len(b1.shape) != 2 or b1.shape[0] != b1.shape[1]:
+            raise ValueError('expected square "b" matrix')
+
+        if b1.shape != a1.shape:
+            raise ValueError(f"wrong b dimensions {b1.shape}, should be {a1.shape}")
+
+        if type not in [1, 2, 3]:
+            raise ValueError('"type" keyword only accepts 1, 2, and 3.')
+
+        cplx = True if iscomplexobj(b1) else (cplx or False)
+        drv_args.update({'overwrite_b': overwrite_b, 'itype': type})
+
+    subset = (subset_by_index is not None) or (subset_by_value is not None)
+
+    # Both subsets can't be given
+    if subset_by_index and subset_by_value:
+        raise ValueError('Either index or value subset can be requested.')
+
+    # Check indices if given
+    if subset_by_index:
+        lo, hi = (int(x) for x in subset_by_index)
+        if not (0 <= lo <= hi < n):
+            raise ValueError('Requested eigenvalue indices are not valid. '
+                             f'Valid range is [0, {n-1}] and start <= end, but '
+                             f'start={lo}, end={hi} is given')
+        # fortran is 1-indexed
+        drv_args.update({'range': 'I', 'il': lo + 1, 'iu': hi + 1})
+
+    if subset_by_value:
+        lo, hi = subset_by_value
+        if not (-inf <= lo < hi <= inf):
+            raise ValueError('Requested eigenvalue bounds are not valid. '
+                             'Valid range is (-inf, inf) and low < high, but '
+                             f'low={lo}, high={hi} is given')
+
+        drv_args.update({'range': 'V', 'vl': lo, 'vu': hi})
+
+    # fix prefix for lapack routines
+    pfx = 'he' if cplx else 'sy'
+
+    # decide on the driver if not given
+    # first early exit on incompatible choice
+    if driver:
+        if b is None and (driver in ["gv", "gvd", "gvx"]):
+            raise ValueError(f'{driver} requires input b array to be supplied '
+                             'for generalized eigenvalue problems.')
+        if (b is not None) and (driver in ['ev', 'evd', 'evr', 'evx']):
+            raise ValueError(f'"{driver}" does not accept input b array '
+                             'for standard eigenvalue problems.')
+        if subset and (driver in ["ev", "evd", "gv", "gvd"]):
+            raise ValueError(f'"{driver}" cannot compute subsets of eigenvalues')
+
+    # Default driver is evr and gvd
+    else:
+        driver = "evr" if b is None else ("gvx" if subset else "gvd")
+
+    lwork_spec = {
+                  'syevd': ['lwork', 'liwork'],
+                  'syevr': ['lwork', 'liwork'],
+                  'heevd': ['lwork', 'liwork', 'lrwork'],
+                  'heevr': ['lwork', 'lrwork', 'liwork'],
+                  }
+
+    if b is None:  # Standard problem
+        drv, drvlw = get_lapack_funcs((pfx + driver, pfx+driver+'_lwork'),
+                                      [a1])
+        clw_args = {'n': n, 'lower': lower}
+        if driver == 'evd':
+            clw_args.update({'compute_v': 0 if _job == "N" else 1})
+
+        lw = _compute_lwork(drvlw, **clw_args)
+        # Multiple lwork vars
+        if isinstance(lw, tuple):
+            lwork_args = dict(zip(lwork_spec[pfx+driver], lw))
+        else:
+            lwork_args = {'lwork': lw}
+
+        drv_args.update({'lower': lower, 'compute_v': 0 if _job == "N" else 1})
+        w, v, *other_args, info = drv(a=a1, **drv_args, **lwork_args)
+
+    else:  # Generalized problem
+        # 'gvd' doesn't have lwork query
+        if driver == "gvd":
+            drv = get_lapack_funcs(pfx + "gvd", [a1, b1])
+            lwork_args = {}
+        else:
+            drv, drvlw = get_lapack_funcs((pfx + driver, pfx+driver+'_lwork'),
+                                          [a1, b1])
+            # generalized drivers use uplo instead of lower
+            lw = _compute_lwork(drvlw, n, uplo=uplo)
+            lwork_args = {'lwork': lw}
+
+        drv_args.update({'uplo': uplo, 'jobz': _job})
+
+        w, v, *other_args, info = drv(a=a1, b=b1, **drv_args, **lwork_args)
+
+    # m is always the first extra argument
+    w = w[:other_args[0]] if subset else w
+    v = v[:, :other_args[0]] if (subset and not eigvals_only) else v
+
+    # Check if we had a  successful exit
+    if info == 0:
+        if eigvals_only:
+            return w
+        else:
+            return w, v
+    else:
+        if info < -1:
+            raise LinAlgError(f'Illegal value in argument {-info} of internal '
+                              f'{drv.typecode + pfx + driver}')
+        elif info > n:
+            raise LinAlgError(f'The leading minor of order {info-n} of B is not '
+                              'positive definite. The factorization of B '
+                              'could not be completed and no eigenvalues '
+                              'or eigenvectors were computed.')
+        else:
+            drv_err = {'ev': 'The algorithm failed to converge; {} '
+                             'off-diagonal elements of an intermediate '
+                             'tridiagonal form did not converge to zero.',
+                       'evx': '{} eigenvectors failed to converge.',
+                       'evd': 'The algorithm failed to compute an eigenvalue '
+                              'while working on the submatrix lying in rows '
+                              'and columns {0}/{1} through mod({0},{1}).',
+                       'evr': 'Internal Error.'
+                       }
+            if driver in ['ev', 'gv']:
+                msg = drv_err['ev'].format(info)
+            elif driver in ['evx', 'gvx']:
+                msg = drv_err['evx'].format(info)
+            elif driver in ['evd', 'gvd']:
+                if eigvals_only:
+                    msg = drv_err['ev'].format(info)
+                else:
+                    msg = drv_err['evd'].format(info, n+1)
+            else:
+                msg = drv_err['evr']
+
+            raise LinAlgError(msg)
+
+
+_conv_dict = {0: 0, 1: 1, 2: 2,
+              'all': 0, 'value': 1, 'index': 2,
+              'a': 0, 'v': 1, 'i': 2}
+
+
+def _check_select(select, select_range, max_ev, max_len):
+    """Check that select is valid, convert to Fortran style."""
+    if isinstance(select, str):
+        select = select.lower()
+    try:
+        select = _conv_dict[select]
+    except KeyError as e:
+        raise ValueError('invalid argument for select') from e
+    vl, vu = 0., 1.
+    il = iu = 1
+    if select != 0:  # (non-all)
+        sr = asarray(select_range)
+        if sr.ndim != 1 or sr.size != 2 or sr[1] < sr[0]:
+            raise ValueError('select_range must be a 2-element array-like '
+                             'in nondecreasing order')
+        if select == 1:  # (value)
+            vl, vu = sr
+            if max_ev == 0:
+                max_ev = max_len
+        else:  # 2 (index)
+            if sr.dtype.char.lower() not in 'hilqp':
+                raise ValueError(
+                    f'when using select="i", select_range must '
+                    f'contain integers, got dtype {sr.dtype} ({sr.dtype.char})'
+                )
+            # translate Python (0 ... N-1) into Fortran (1 ... N) with + 1
+            il, iu = sr + 1
+            if min(il, iu) < 1 or max(il, iu) > max_len:
+                raise ValueError('select_range out of bounds')
+            max_ev = iu - il + 1
+    return select, vl, vu, il, iu, max_ev
+
+
+def eig_banded(a_band, lower=False, eigvals_only=False, overwrite_a_band=False,
+               select='a', select_range=None, max_ev=0, check_finite=True):
+    """
+    Solve real symmetric or complex Hermitian band matrix eigenvalue problem.
+
+    Find eigenvalues w and optionally right eigenvectors v of a::
+
+        a v[:,i] = w[i] v[:,i]
+        v.H v    = identity
+
+    The matrix a is stored in a_band either in lower diagonal or upper
+    diagonal ordered form:
+
+        a_band[u + i - j, j] == a[i,j]        (if upper form; i <= j)
+        a_band[    i - j, j] == a[i,j]        (if lower form; i >= j)
+
+    where u is the number of bands above the diagonal.
+
+    Example of a_band (shape of a is (6,6), u=2)::
+
+        upper form:
+        *   *   a02 a13 a24 a35
+        *   a01 a12 a23 a34 a45
+        a00 a11 a22 a33 a44 a55
+
+        lower form:
+        a00 a11 a22 a33 a44 a55
+        a10 a21 a32 a43 a54 *
+        a20 a31 a42 a53 *   *
+
+    Cells marked with * are not used.
+
+    Parameters
+    ----------
+    a_band : (u+1, M) array_like
+        The bands of the M by M matrix a.
+    lower : bool, optional
+        Is the matrix in the lower form. (Default is upper form)
+    eigvals_only : bool, optional
+        Compute only the eigenvalues and no eigenvectors.
+        (Default: calculate also eigenvectors)
+    overwrite_a_band : bool, optional
+        Discard data in a_band (may enhance performance)
+    select : {'a', 'v', 'i'}, optional
+        Which eigenvalues to calculate
+
+        ======  ========================================
+        select  calculated
+        ======  ========================================
+        'a'     All eigenvalues
+        'v'     Eigenvalues in the interval (min, max]
+        'i'     Eigenvalues with indices min <= i <= max
+        ======  ========================================
+    select_range : (min, max), optional
+        Range of selected eigenvalues
+    max_ev : int, optional
+        For select=='v', maximum number of eigenvalues expected.
+        For other values of select, has no meaning.
+
+        In doubt, leave this parameter untouched.
+
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    w : (M,) ndarray
+        The eigenvalues, in ascending order, each repeated according to its
+        multiplicity.
+    v : (M, M) float or complex ndarray
+        The normalized eigenvector corresponding to the eigenvalue w[i] is
+        the column v[:,i]. Only returned if ``eigvals_only=False``.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigvals_banded : eigenvalues for symmetric/Hermitian band matrices
+    eig : eigenvalues and right eigenvectors of general arrays.
+    eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays
+    eigh_tridiagonal : eigenvalues and right eigenvectors for
+        symmetric/Hermitian tridiagonal matrices
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import eig_banded
+    >>> A = np.array([[1, 5, 2, 0], [5, 2, 5, 2], [2, 5, 3, 5], [0, 2, 5, 4]])
+    >>> Ab = np.array([[1, 2, 3, 4], [5, 5, 5, 0], [2, 2, 0, 0]])
+    >>> w, v = eig_banded(Ab, lower=True)
+    >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4)))
+    True
+    >>> w = eig_banded(Ab, lower=True, eigvals_only=True)
+    >>> w
+    array([-4.26200532, -2.22987175,  3.95222349, 12.53965359])
+
+    Request only the eigenvalues between ``[-3, 4]``
+
+    >>> w, v = eig_banded(Ab, lower=True, select='v', select_range=[-3, 4])
+    >>> w
+    array([-2.22987175,  3.95222349])
+
+    """
+    if eigvals_only or overwrite_a_band:
+        a1 = _asarray_validated(a_band, check_finite=check_finite)
+        overwrite_a_band = overwrite_a_band or (_datacopied(a1, a_band))
+    else:
+        a1 = array(a_band)
+        if issubclass(a1.dtype.type, inexact) and not isfinite(a1).all():
+            raise ValueError("array must not contain infs or NaNs")
+        overwrite_a_band = 1
+
+    if len(a1.shape) != 2:
+        raise ValueError('expected a 2-D array')
+
+    # accommodate square empty matrices
+    if a1.size == 0:
+        w_n, v_n = eig_banded(np.array([[0, 0], [1, 1]], dtype=a1.dtype))
+
+        w = np.empty_like(a1, shape=(0,), dtype=w_n.dtype)
+        v = np.empty_like(a1, shape=(0, 0), dtype=v_n.dtype)
+        if eigvals_only:
+            return w
+        else:
+            return w, v
+
+    select, vl, vu, il, iu, max_ev = _check_select(
+        select, select_range, max_ev, a1.shape[1])
+
+    del select_range
+    if select == 0:
+        if a1.dtype.char in 'GFD':
+            # FIXME: implement this somewhen, for now go with builtin values
+            # FIXME: calc optimal lwork by calling ?hbevd(lwork=-1)
+            #        or by using calc_lwork.f ???
+            # lwork = calc_lwork.hbevd(bevd.typecode, a1.shape[0], lower)
+            internal_name = 'hbevd'
+        else:  # a1.dtype.char in 'fd':
+            # FIXME: implement this somewhen, for now go with builtin values
+            #         see above
+            # lwork = calc_lwork.sbevd(bevd.typecode, a1.shape[0], lower)
+            internal_name = 'sbevd'
+        bevd, = get_lapack_funcs((internal_name,), (a1,))
+        w, v, info = bevd(a1, compute_v=not eigvals_only,
+                          lower=lower, overwrite_ab=overwrite_a_band)
+    else:  # select in [1, 2]
+        if eigvals_only:
+            max_ev = 1
+        # calculate optimal abstol for dsbevx (see manpage)
+        if a1.dtype.char in 'fF':  # single precision
+            lamch, = get_lapack_funcs(('lamch',), (array(0, dtype='f'),))
+        else:
+            lamch, = get_lapack_funcs(('lamch',), (array(0, dtype='d'),))
+        abstol = 2 * lamch('s')
+        if a1.dtype.char in 'GFD':
+            internal_name = 'hbevx'
+        else:  # a1.dtype.char in 'gfd'
+            internal_name = 'sbevx'
+        bevx, = get_lapack_funcs((internal_name,), (a1,))
+        w, v, m, ifail, info = bevx(
+            a1, vl, vu, il, iu, compute_v=not eigvals_only, mmax=max_ev,
+            range=select, lower=lower, overwrite_ab=overwrite_a_band,
+            abstol=abstol)
+        # crop off w and v
+        w = w[:m]
+        if not eigvals_only:
+            v = v[:, :m]
+    _check_info(info, internal_name)
+
+    if eigvals_only:
+        return w
+    return w, v
+
+
+def eigvals(a, b=None, overwrite_a=False, check_finite=True,
+            homogeneous_eigvals=False):
+    """
+    Compute eigenvalues from an ordinary or generalized eigenvalue problem.
+
+    Find eigenvalues of a general matrix::
+
+        a   vr[:,i] = w[i]        b   vr[:,i]
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        A complex or real matrix whose eigenvalues and eigenvectors
+        will be computed.
+    b : (M, M) array_like, optional
+        Right-hand side matrix in a generalized eigenvalue problem.
+        If omitted, identity matrix is assumed.
+    overwrite_a : bool, optional
+        Whether to overwrite data in a (may improve performance)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities
+        or NaNs.
+    homogeneous_eigvals : bool, optional
+        If True, return the eigenvalues in homogeneous coordinates.
+        In this case ``w`` is a (2, M) array so that::
+
+            w[1,i] a vr[:,i] = w[0,i] b vr[:,i]
+
+        Default is False.
+
+    Returns
+    -------
+    w : (M,) or (2, M) double or complex ndarray
+        The eigenvalues, each repeated according to its multiplicity
+        but not in any specific order. The shape is (M,) unless
+        ``homogeneous_eigvals=True``.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge
+
+    See Also
+    --------
+    eig : eigenvalues and right eigenvectors of general arrays.
+    eigvalsh : eigenvalues of symmetric or Hermitian arrays
+    eigvals_banded : eigenvalues for symmetric/Hermitian band matrices
+    eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal
+        matrices
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[0., -1.], [1., 0.]])
+    >>> linalg.eigvals(a)
+    array([0.+1.j, 0.-1.j])
+
+    >>> b = np.array([[0., 1.], [1., 1.]])
+    >>> linalg.eigvals(a, b)
+    array([ 1.+0.j, -1.+0.j])
+
+    >>> a = np.array([[3., 0., 0.], [0., 8., 0.], [0., 0., 7.]])
+    >>> linalg.eigvals(a, homogeneous_eigvals=True)
+    array([[3.+0.j, 8.+0.j, 7.+0.j],
+           [1.+0.j, 1.+0.j, 1.+0.j]])
+
+    """
+    return eig(a, b=b, left=0, right=0, overwrite_a=overwrite_a,
+               check_finite=check_finite,
+               homogeneous_eigvals=homogeneous_eigvals)
+
+
+def eigvalsh(a, b=None, *, lower=True, overwrite_a=False,
+             overwrite_b=False, type=1, check_finite=True, subset_by_index=None,
+             subset_by_value=None, driver=None):
+    """
+    Solves a standard or generalized eigenvalue problem for a complex
+    Hermitian or real symmetric matrix.
+
+    Find eigenvalues array ``w`` of array ``a``, where ``b`` is positive
+    definite such that for every eigenvalue λ (i-th entry of w) and its
+    eigenvector vi (i-th column of v) satisfies::
+
+                      a @ vi = λ * b @ vi
+        vi.conj().T @ a @ vi = λ
+        vi.conj().T @ b @ vi = 1
+
+    In the standard problem, b is assumed to be the identity matrix.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        A complex Hermitian or real symmetric matrix whose eigenvalues will
+        be computed.
+    b : (M, M) array_like, optional
+        A complex Hermitian or real symmetric definite positive matrix in.
+        If omitted, identity matrix is assumed.
+    lower : bool, optional
+        Whether the pertinent array data is taken from the lower or upper
+        triangle of ``a`` and, if applicable, ``b``. (Default: lower)
+    overwrite_a : bool, optional
+        Whether to overwrite data in ``a`` (may improve performance). Default
+        is False.
+    overwrite_b : bool, optional
+        Whether to overwrite data in ``b`` (may improve performance). Default
+        is False.
+    type : int, optional
+        For the generalized problems, this keyword specifies the problem type
+        to be solved for ``w`` and ``v`` (only takes 1, 2, 3 as possible
+        inputs)::
+
+            1 =>     a @ v = w @ b @ v
+            2 => a @ b @ v = w @ v
+            3 => b @ a @ v = w @ v
+
+        This keyword is ignored for standard problems.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    subset_by_index : iterable, optional
+        If provided, this two-element iterable defines the start and the end
+        indices of the desired eigenvalues (ascending order and 0-indexed).
+        To return only the second smallest to fifth smallest eigenvalues,
+        ``[1, 4]`` is used. ``[n-3, n-1]`` returns the largest three. Only
+        available with "evr", "evx", and "gvx" drivers. The entries are
+        directly converted to integers via ``int()``.
+    subset_by_value : iterable, optional
+        If provided, this two-element iterable defines the half-open interval
+        ``(a, b]`` that, if any, only the eigenvalues between these values
+        are returned. Only available with "evr", "evx", and "gvx" drivers. Use
+        ``np.inf`` for the unconstrained ends.
+    driver : str, optional
+        Defines which LAPACK driver should be used. Valid options are "ev",
+        "evd", "evr", "evx" for standard problems and "gv", "gvd", "gvx" for
+        generalized (where b is not None) problems. See the Notes section of
+        `scipy.linalg.eigh`.
+
+    Returns
+    -------
+    w : (N,) ndarray
+        The N (N<=M) selected eigenvalues, in ascending order, each
+        repeated according to its multiplicity.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge, an error occurred, or
+        b matrix is not definite positive. Note that if input matrices are
+        not symmetric or Hermitian, no error will be reported but results will
+        be wrong.
+
+    See Also
+    --------
+    eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays
+    eigvals : eigenvalues of general arrays
+    eigvals_banded : eigenvalues for symmetric/Hermitian band matrices
+    eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal
+        matrices
+
+    Notes
+    -----
+    This function does not check the input array for being Hermitian/symmetric
+    in order to allow for representing arrays with only their upper/lower
+    triangular parts.
+
+    This function serves as a one-liner shorthand for `scipy.linalg.eigh` with
+    the option ``eigvals_only=True`` to get the eigenvalues and not the
+    eigenvectors. Here it is kept as a legacy convenience. It might be
+    beneficial to use the main function to have full control and to be a bit
+    more pythonic.
+
+    Examples
+    --------
+    For more examples see `scipy.linalg.eigh`.
+
+    >>> import numpy as np
+    >>> from scipy.linalg import eigvalsh
+    >>> A = np.array([[6, 3, 1, 5], [3, 0, 5, 1], [1, 5, 6, 2], [5, 1, 2, 2]])
+    >>> w = eigvalsh(A)
+    >>> w
+    array([-3.74637491, -0.76263923,  6.08502336, 12.42399079])
+
+    """
+    return eigh(a, b=b, lower=lower, eigvals_only=True, overwrite_a=overwrite_a,
+                overwrite_b=overwrite_b, type=type, check_finite=check_finite,
+                subset_by_index=subset_by_index, subset_by_value=subset_by_value,
+                driver=driver)
+
+
+def eigvals_banded(a_band, lower=False, overwrite_a_band=False,
+                   select='a', select_range=None, check_finite=True):
+    """
+    Solve real symmetric or complex Hermitian band matrix eigenvalue problem.
+
+    Find eigenvalues w of a::
+
+        a v[:,i] = w[i] v[:,i]
+        v.H v    = identity
+
+    The matrix a is stored in a_band either in lower diagonal or upper
+    diagonal ordered form:
+
+        a_band[u + i - j, j] == a[i,j]        (if upper form; i <= j)
+        a_band[    i - j, j] == a[i,j]        (if lower form; i >= j)
+
+    where u is the number of bands above the diagonal.
+
+    Example of a_band (shape of a is (6,6), u=2)::
+
+        upper form:
+        *   *   a02 a13 a24 a35
+        *   a01 a12 a23 a34 a45
+        a00 a11 a22 a33 a44 a55
+
+        lower form:
+        a00 a11 a22 a33 a44 a55
+        a10 a21 a32 a43 a54 *
+        a20 a31 a42 a53 *   *
+
+    Cells marked with * are not used.
+
+    Parameters
+    ----------
+    a_band : (u+1, M) array_like
+        The bands of the M by M matrix a.
+    lower : bool, optional
+        Is the matrix in the lower form. (Default is upper form)
+    overwrite_a_band : bool, optional
+        Discard data in a_band (may enhance performance)
+    select : {'a', 'v', 'i'}, optional
+        Which eigenvalues to calculate
+
+        ======  ========================================
+        select  calculated
+        ======  ========================================
+        'a'     All eigenvalues
+        'v'     Eigenvalues in the interval (min, max]
+        'i'     Eigenvalues with indices min <= i <= max
+        ======  ========================================
+    select_range : (min, max), optional
+        Range of selected eigenvalues
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    w : (M,) ndarray
+        The eigenvalues, in ascending order, each repeated according to its
+        multiplicity.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian
+        band matrices
+    eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal
+        matrices
+    eigvals : eigenvalues of general arrays
+    eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays
+    eig : eigenvalues and right eigenvectors for non-symmetric arrays
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import eigvals_banded
+    >>> A = np.array([[1, 5, 2, 0], [5, 2, 5, 2], [2, 5, 3, 5], [0, 2, 5, 4]])
+    >>> Ab = np.array([[1, 2, 3, 4], [5, 5, 5, 0], [2, 2, 0, 0]])
+    >>> w = eigvals_banded(Ab, lower=True)
+    >>> w
+    array([-4.26200532, -2.22987175,  3.95222349, 12.53965359])
+    """
+    return eig_banded(a_band, lower=lower, eigvals_only=1,
+                      overwrite_a_band=overwrite_a_band, select=select,
+                      select_range=select_range, check_finite=check_finite)
+
+
+def eigvalsh_tridiagonal(d, e, select='a', select_range=None,
+                         check_finite=True, tol=0., lapack_driver='auto'):
+    """
+    Solve eigenvalue problem for a real symmetric tridiagonal matrix.
+
+    Find eigenvalues `w` of ``a``::
+
+        a v[:,i] = w[i] v[:,i]
+        v.H v    = identity
+
+    For a real symmetric matrix ``a`` with diagonal elements `d` and
+    off-diagonal elements `e`.
+
+    Parameters
+    ----------
+    d : ndarray, shape (ndim,)
+        The diagonal elements of the array.
+    e : ndarray, shape (ndim-1,)
+        The off-diagonal elements of the array.
+    select : {'a', 'v', 'i'}, optional
+        Which eigenvalues to calculate
+
+        ======  ========================================
+        select  calculated
+        ======  ========================================
+        'a'     All eigenvalues
+        'v'     Eigenvalues in the interval (min, max]
+        'i'     Eigenvalues with indices min <= i <= max
+        ======  ========================================
+    select_range : (min, max), optional
+        Range of selected eigenvalues
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    tol : float
+        The absolute tolerance to which each eigenvalue is required
+        (only used when ``lapack_driver='stebz'``).
+        An eigenvalue (or cluster) is considered to have converged if it
+        lies in an interval of this width. If <= 0. (default),
+        the value ``eps*|a|`` is used where eps is the machine precision,
+        and ``|a|`` is the 1-norm of the matrix ``a``.
+    lapack_driver : str
+        LAPACK function to use, can be 'auto', 'stemr', 'stebz',  'sterf',
+        or 'stev'. When 'auto' (default), it will use 'stemr' if ``select='a'``
+        and 'stebz' otherwise. 'sterf' and 'stev' can only be used when
+        ``select='a'``.
+
+    Returns
+    -------
+    w : (M,) ndarray
+        The eigenvalues, in ascending order, each repeated according to its
+        multiplicity.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigh_tridiagonal : eigenvalues and right eiegenvectors for
+        symmetric/Hermitian tridiagonal matrices
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import eigvalsh_tridiagonal, eigvalsh
+    >>> d = 3*np.ones(4)
+    >>> e = -1*np.ones(3)
+    >>> w = eigvalsh_tridiagonal(d, e)
+    >>> A = np.diag(d) + np.diag(e, k=1) + np.diag(e, k=-1)
+    >>> w2 = eigvalsh(A)  # Verify with other eigenvalue routines
+    >>> np.allclose(w - w2, np.zeros(4))
+    True
+    """
+    return eigh_tridiagonal(
+        d, e, eigvals_only=True, select=select, select_range=select_range,
+        check_finite=check_finite, tol=tol, lapack_driver=lapack_driver)
+
+
+def eigh_tridiagonal(d, e, eigvals_only=False, select='a', select_range=None,
+                     check_finite=True, tol=0., lapack_driver='auto'):
+    """
+    Solve eigenvalue problem for a real symmetric tridiagonal matrix.
+
+    Find eigenvalues `w` and optionally right eigenvectors `v` of ``a``::
+
+        a v[:,i] = w[i] v[:,i]
+        v.H v    = identity
+
+    For a real symmetric matrix ``a`` with diagonal elements `d` and
+    off-diagonal elements `e`.
+
+    Parameters
+    ----------
+    d : ndarray, shape (ndim,)
+        The diagonal elements of the array.
+    e : ndarray, shape (ndim-1,)
+        The off-diagonal elements of the array.
+    eigvals_only : bool, optional
+        Compute only the eigenvalues and no eigenvectors.
+        (Default: calculate also eigenvectors)
+    select : {'a', 'v', 'i'}, optional
+        Which eigenvalues to calculate
+
+        ======  ========================================
+        select  calculated
+        ======  ========================================
+        'a'     All eigenvalues
+        'v'     Eigenvalues in the interval (min, max]
+        'i'     Eigenvalues with indices min <= i <= max
+        ======  ========================================
+    select_range : (min, max), optional
+        Range of selected eigenvalues
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    tol : float
+        The absolute tolerance to which each eigenvalue is required
+        (only used when 'stebz' is the `lapack_driver`).
+        An eigenvalue (or cluster) is considered to have converged if it
+        lies in an interval of this width. If <= 0. (default),
+        the value ``eps*|a|`` is used where eps is the machine precision,
+        and ``|a|`` is the 1-norm of the matrix ``a``.
+    lapack_driver : str
+        LAPACK function to use, can be 'auto', 'stemr', 'stebz', 'sterf',
+        or 'stev'. When 'auto' (default), it will use 'stemr' if ``select='a'``
+        and 'stebz' otherwise. When 'stebz' is used to find the eigenvalues and
+        ``eigvals_only=False``, then a second LAPACK call (to ``?STEIN``) is
+        used to find the corresponding eigenvectors. 'sterf' can only be
+        used when ``eigvals_only=True`` and ``select='a'``. 'stev' can only
+        be used when ``select='a'``.
+
+    Returns
+    -------
+    w : (M,) ndarray
+        The eigenvalues, in ascending order, each repeated according to its
+        multiplicity.
+    v : (M, M) ndarray
+        The normalized eigenvector corresponding to the eigenvalue ``w[i]`` is
+        the column ``v[:,i]``. Only returned if ``eigvals_only=False``.
+
+    Raises
+    ------
+    LinAlgError
+        If eigenvalue computation does not converge.
+
+    See Also
+    --------
+    eigvalsh_tridiagonal : eigenvalues of symmetric/Hermitian tridiagonal
+        matrices
+    eig : eigenvalues and right eigenvectors for non-symmetric arrays
+    eigh : eigenvalues and right eigenvectors for symmetric/Hermitian arrays
+    eig_banded : eigenvalues and right eigenvectors for symmetric/Hermitian
+        band matrices
+
+    Notes
+    -----
+    This function makes use of LAPACK ``S/DSTEMR`` routines.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import eigh_tridiagonal
+    >>> d = 3*np.ones(4)
+    >>> e = -1*np.ones(3)
+    >>> w, v = eigh_tridiagonal(d, e)
+    >>> A = np.diag(d) + np.diag(e, k=1) + np.diag(e, k=-1)
+    >>> np.allclose(A @ v - v @ np.diag(w), np.zeros((4, 4)))
+    True
+    """
+    d = _asarray_validated(d, check_finite=check_finite)
+    e = _asarray_validated(e, check_finite=check_finite)
+    for check in (d, e):
+        if check.ndim != 1:
+            raise ValueError('expected a 1-D array')
+        if check.dtype.char in 'GFD':  # complex
+            raise TypeError('Only real arrays currently supported')
+    if d.size != e.size + 1:
+        raise ValueError(f'd ({d.size}) must have one more element than e ({e.size})')
+    select, vl, vu, il, iu, _ = _check_select(
+        select, select_range, 0, d.size)
+    if not isinstance(lapack_driver, str):
+        raise TypeError('lapack_driver must be str')
+    drivers = ('auto', 'stemr', 'sterf', 'stebz', 'stev')
+    if lapack_driver not in drivers:
+        raise ValueError(f'lapack_driver must be one of {drivers}, '
+                         f'got {lapack_driver}')
+    if lapack_driver == 'auto':
+        lapack_driver = 'stemr' if select == 0 else 'stebz'
+
+    # Quick exit for 1x1 case
+    if len(d) == 1:
+        if select == 1 and (not (vl < d[0] <= vu)):  # request by value
+            w = array([])
+            v = empty([1, 0], dtype=d.dtype)
+        else:  # all and request by index
+            w = array([d[0]], dtype=d.dtype)
+            v = array([[1.]], dtype=d.dtype)
+
+        if eigvals_only:
+            return w
+        else:
+            return w, v
+
+    func, = get_lapack_funcs((lapack_driver,), (d, e))
+    compute_v = not eigvals_only
+    if lapack_driver == 'sterf':
+        if select != 0:
+            raise ValueError('sterf can only be used when select == "a"')
+        if not eigvals_only:
+            raise ValueError('sterf can only be used when eigvals_only is '
+                             'True')
+        w, info = func(d, e)
+        m = len(w)
+    elif lapack_driver == 'stev':
+        if select != 0:
+            raise ValueError('stev can only be used when select == "a"')
+        w, v, info = func(d, e, compute_v=compute_v)
+        m = len(w)
+    elif lapack_driver == 'stebz':
+        tol = float(tol)
+        internal_name = 'stebz'
+        stebz, = get_lapack_funcs((internal_name,), (d, e))
+        # If getting eigenvectors, needs to be block-ordered (B) instead of
+        # matrix-ordered (E), and we will reorder later
+        order = 'E' if eigvals_only else 'B'
+        m, w, iblock, isplit, info = stebz(d, e, select, vl, vu, il, iu, tol,
+                                           order)
+    else:   # 'stemr'
+        # ?STEMR annoyingly requires size N instead of N-1
+        e_ = empty(e.size+1, e.dtype)
+        e_[:-1] = e
+        stemr_lwork, = get_lapack_funcs(('stemr_lwork',), (d, e))
+        lwork, liwork, info = stemr_lwork(d, e_, select, vl, vu, il, iu,
+                                          compute_v=compute_v)
+        _check_info(info, 'stemr_lwork')
+        m, w, v, info = func(d, e_, select, vl, vu, il, iu,
+                             compute_v=compute_v, lwork=lwork, liwork=liwork)
+    _check_info(info, lapack_driver + ' (eigh_tridiagonal)')
+    w = w[:m]
+    if eigvals_only:
+        return w
+    else:
+        # Do we still need to compute the eigenvalues?
+        if lapack_driver == 'stebz':
+            func, = get_lapack_funcs(('stein',), (d, e))
+            v, info = func(d, e, w, iblock, isplit)
+            _check_info(info, 'stein (eigh_tridiagonal)',
+                        positive='%d eigenvectors failed to converge')
+            # Convert block-order to matrix-order
+            order = argsort(w)
+            w, v = w[order], v[:, order]
+        else:
+            v = v[:, :m]
+        return w, v
+
+
+def _check_info(info, driver, positive='did not converge (LAPACK info=%d)'):
+    """Check info return value."""
+    if info < 0:
+        raise ValueError('illegal value in argument %d of internal %s'
+                         % (-info, driver))
+    if info > 0 and positive:
+        raise LinAlgError(("%s " + positive) % (driver, info,))
+
+
+def hessenberg(a, calc_q=False, overwrite_a=False, check_finite=True):
+    """
+    Compute Hessenberg form of a matrix.
+
+    The Hessenberg decomposition is::
+
+        A = Q H Q^H
+
+    where `Q` is unitary/orthogonal and `H` has only zero elements below
+    the first sub-diagonal.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Matrix to bring into Hessenberg form.
+    calc_q : bool, optional
+        Whether to compute the transformation matrix.  Default is False.
+    overwrite_a : bool, optional
+        Whether to overwrite `a`; may improve performance.
+        Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    H : (M, M) ndarray
+        Hessenberg form of `a`.
+    Q : (M, M) ndarray
+        Unitary/orthogonal similarity transformation matrix ``A = Q H Q^H``.
+        Only returned if ``calc_q=True``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import hessenberg
+    >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
+    >>> H, Q = hessenberg(A, calc_q=True)
+    >>> H
+    array([[  2.        , -11.65843866,   1.42005301,   0.25349066],
+           [ -9.94987437,  14.53535354,  -5.31022304,   2.43081618],
+           [  0.        ,  -1.83299243,   0.38969961,  -0.51527034],
+           [  0.        ,   0.        ,  -3.83189513,   1.07494686]])
+    >>> np.allclose(Q @ H @ Q.conj().T - A, np.zeros((4, 4)))
+    True
+    """
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    if len(a1.shape) != 2 or (a1.shape[0] != a1.shape[1]):
+        raise ValueError('expected square matrix')
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+
+    if a1.size == 0:
+        h3 = hessenberg(np.eye(3, dtype=a1.dtype))
+        h = np.empty(a1.shape, dtype=h3.dtype)
+        if not calc_q:
+            return h
+        else:
+            h3, q3 = hessenberg(np.eye(3, dtype=a1.dtype), calc_q=True)
+            q = np.empty(a1.shape, dtype=q3.dtype)
+            h = np.empty(a1.shape, dtype=h3.dtype)
+            return h, q
+
+    # if 2x2 or smaller: already in Hessenberg
+    if a1.shape[0] <= 2:
+        if calc_q:
+            return a1, eye(a1.shape[0])
+        return a1
+
+    gehrd, gebal, gehrd_lwork = get_lapack_funcs(('gehrd', 'gebal',
+                                                  'gehrd_lwork'), (a1,))
+    ba, lo, hi, pivscale, info = gebal(a1, permute=0, overwrite_a=overwrite_a)
+    _check_info(info, 'gebal (hessenberg)', positive=False)
+    n = len(a1)
+
+    lwork = _compute_lwork(gehrd_lwork, ba.shape[0], lo=lo, hi=hi)
+
+    hq, tau, info = gehrd(ba, lo=lo, hi=hi, lwork=lwork, overwrite_a=1)
+    _check_info(info, 'gehrd (hessenberg)', positive=False)
+    h = np.triu(hq, -1)
+    if not calc_q:
+        return h
+
+    # use orghr/unghr to compute q
+    orghr, orghr_lwork = get_lapack_funcs(('orghr', 'orghr_lwork'), (a1,))
+    lwork = _compute_lwork(orghr_lwork, n, lo=lo, hi=hi)
+
+    q, info = orghr(a=hq, tau=tau, lo=lo, hi=hi, lwork=lwork, overwrite_a=1)
+    _check_info(info, 'orghr (hessenberg)', positive=False)
+    return h, q
+
+
+def cdf2rdf(w, v):
+    """
+    Converts complex eigenvalues ``w`` and eigenvectors ``v`` to real
+    eigenvalues in a block diagonal form ``wr`` and the associated real
+    eigenvectors ``vr``, such that::
+
+        vr @ wr = X @ vr
+
+    continues to hold, where ``X`` is the original array for which ``w`` and
+    ``v`` are the eigenvalues and eigenvectors.
+
+    .. versionadded:: 1.1.0
+
+    Parameters
+    ----------
+    w : (..., M) array_like
+        Complex or real eigenvalues, an array or stack of arrays
+
+        Conjugate pairs must not be interleaved, else the wrong result
+        will be produced. So ``[1+1j, 1, 1-1j]`` will give a correct result,
+        but ``[1+1j, 2+1j, 1-1j, 2-1j]`` will not.
+
+    v : (..., M, M) array_like
+        Complex or real eigenvectors, a square array or stack of square arrays.
+
+    Returns
+    -------
+    wr : (..., M, M) ndarray
+        Real diagonal block form of eigenvalues
+    vr : (..., M, M) ndarray
+        Real eigenvectors associated with ``wr``
+
+    See Also
+    --------
+    eig : Eigenvalues and right eigenvectors for non-symmetric arrays
+    rsf2csf : Convert real Schur form to complex Schur form
+
+    Notes
+    -----
+    ``w``, ``v`` must be the eigenstructure for some *real* matrix ``X``.
+    For example, obtained by ``w, v = scipy.linalg.eig(X)`` or
+    ``w, v = numpy.linalg.eig(X)`` in which case ``X`` can also represent
+    stacked arrays.
+
+    .. versionadded:: 1.1.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> X = np.array([[1, 2, 3], [0, 4, 5], [0, -5, 4]])
+    >>> X
+    array([[ 1,  2,  3],
+           [ 0,  4,  5],
+           [ 0, -5,  4]])
+
+    >>> from scipy import linalg
+    >>> w, v = linalg.eig(X)
+    >>> w
+    array([ 1.+0.j,  4.+5.j,  4.-5.j])
+    >>> v
+    array([[ 1.00000+0.j     , -0.01906-0.40016j, -0.01906+0.40016j],
+           [ 0.00000+0.j     ,  0.00000-0.64788j,  0.00000+0.64788j],
+           [ 0.00000+0.j     ,  0.64788+0.j     ,  0.64788-0.j     ]])
+
+    >>> wr, vr = linalg.cdf2rdf(w, v)
+    >>> wr
+    array([[ 1.,  0.,  0.],
+           [ 0.,  4.,  5.],
+           [ 0., -5.,  4.]])
+    >>> vr
+    array([[ 1.     ,  0.40016, -0.01906],
+           [ 0.     ,  0.64788,  0.     ],
+           [ 0.     ,  0.     ,  0.64788]])
+
+    >>> vr @ wr
+    array([[ 1.     ,  1.69593,  1.9246 ],
+           [ 0.     ,  2.59153,  3.23942],
+           [ 0.     , -3.23942,  2.59153]])
+    >>> X @ vr
+    array([[ 1.     ,  1.69593,  1.9246 ],
+           [ 0.     ,  2.59153,  3.23942],
+           [ 0.     , -3.23942,  2.59153]])
+    """
+    w, v = _asarray_validated(w), _asarray_validated(v)
+
+    # check dimensions
+    if w.ndim < 1:
+        raise ValueError('expected w to be at least 1D')
+    if v.ndim < 2:
+        raise ValueError('expected v to be at least 2D')
+    if v.ndim != w.ndim + 1:
+        raise ValueError('expected eigenvectors array to have exactly one '
+                         'dimension more than eigenvalues array')
+
+    # check shapes
+    n = w.shape[-1]
+    M = w.shape[:-1]
+    if v.shape[-2] != v.shape[-1]:
+        raise ValueError('expected v to be a square matrix or stacked square '
+                         'matrices: v.shape[-2] = v.shape[-1]')
+    if v.shape[-1] != n:
+        raise ValueError('expected the same number of eigenvalues as '
+                         'eigenvectors')
+
+    # get indices for each first pair of complex eigenvalues
+    complex_mask = iscomplex(w)
+    n_complex = complex_mask.sum(axis=-1)
+
+    # check if all complex eigenvalues have conjugate pairs
+    if not (n_complex % 2 == 0).all():
+        raise ValueError('expected complex-conjugate pairs of eigenvalues')
+
+    # find complex indices
+    idx = nonzero(complex_mask)
+    idx_stack = idx[:-1]
+    idx_elem = idx[-1]
+
+    # filter them to conjugate indices, assuming pairs are not interleaved
+    j = idx_elem[0::2]
+    k = idx_elem[1::2]
+    stack_ind = ()
+    for i in idx_stack:
+        # should never happen, assuming nonzero orders by the last axis
+        assert (i[0::2] == i[1::2]).all(), \
+                "Conjugate pair spanned different arrays!"
+        stack_ind += (i[0::2],)
+
+    # all eigenvalues to diagonal form
+    wr = zeros(M + (n, n), dtype=w.real.dtype)
+    di = range(n)
+    wr[..., di, di] = w.real
+
+    # complex eigenvalues to real block diagonal form
+    wr[stack_ind + (j, k)] = w[stack_ind + (j,)].imag
+    wr[stack_ind + (k, j)] = w[stack_ind + (k,)].imag
+
+    # compute real eigenvectors associated with real block diagonal eigenvalues
+    u = zeros(M + (n, n), dtype=np.cdouble)
+    u[..., di, di] = 1.0
+    u[stack_ind + (j, j)] = 0.5j
+    u[stack_ind + (j, k)] = 0.5
+    u[stack_ind + (k, j)] = -0.5j
+    u[stack_ind + (k, k)] = 0.5
+
+    # multiply matrices v and u (equivalent to v @ u)
+    vr = einsum('...ij,...jk->...ik', v, u).real
+
+    return wr, vr
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py
new file mode 100644
index 0000000000000000000000000000000000000000..c35b6a4920dea6bb638fe54a1fa719ebc74fb773
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cholesky.py
@@ -0,0 +1,398 @@
+"""Cholesky decomposition functions."""
+
+import numpy as np
+from numpy import asarray_chkfinite, asarray, atleast_2d, empty_like
+
+# Local imports
+from ._misc import LinAlgError, _datacopied
+from .lapack import get_lapack_funcs
+
+__all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded',
+           'cho_solve_banded']
+
+
+def _cholesky(a, lower=False, overwrite_a=False, clean=True,
+              check_finite=True):
+    """Common code for cholesky() and cho_factor()."""
+
+    a1 = asarray_chkfinite(a) if check_finite else asarray(a)
+    a1 = atleast_2d(a1)
+
+    # Dimension check
+    if a1.ndim != 2:
+        raise ValueError(f'Input array needs to be 2D but received a {a1.ndim}d-array.')
+    # Squareness check
+    if a1.shape[0] != a1.shape[1]:
+        raise ValueError('Input array is expected to be square but has '
+                         f'the shape: {a1.shape}.')
+
+    # Quick return for square empty array
+    if a1.size == 0:
+        dt = cholesky(np.eye(1, dtype=a1.dtype)).dtype
+        return empty_like(a1, dtype=dt), lower
+
+    overwrite_a = overwrite_a or _datacopied(a1, a)
+    potrf, = get_lapack_funcs(('potrf',), (a1,))
+    c, info = potrf(a1, lower=lower, overwrite_a=overwrite_a, clean=clean)
+    if info > 0:
+        raise LinAlgError("%d-th leading minor of the array is not positive "
+                          "definite" % info)
+    if info < 0:
+        raise ValueError(f'LAPACK reported an illegal value in {-info}-th argument'
+                         'on entry to "POTRF".')
+    return c, lower
+
+
+def cholesky(a, lower=False, overwrite_a=False, check_finite=True):
+    """
+    Compute the Cholesky decomposition of a matrix.
+
+    Returns the Cholesky decomposition, :math:`A = L L^*` or
+    :math:`A = U^* U` of a Hermitian positive-definite matrix A.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Matrix to be decomposed
+    lower : bool, optional
+        Whether to compute the upper- or lower-triangular Cholesky
+        factorization. During decomposition, only the selected half of the
+        matrix is referenced. Default is upper-triangular.
+    overwrite_a : bool, optional
+        Whether to overwrite data in `a` (may improve performance).
+    check_finite : bool, optional
+        Whether to check that the entire input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    c : (M, M) ndarray
+        Upper- or lower-triangular Cholesky factor of `a`.
+
+    Raises
+    ------
+    LinAlgError : if decomposition fails.
+
+    Notes
+    -----
+    During the finiteness check (if selected), the entire matrix `a` is
+    checked. During decomposition, `a` is assumed to be symmetric or Hermitian
+    (as applicable), and only the half selected by option `lower` is referenced.
+    Consequently, if `a` is asymmetric/non-Hermitian, `cholesky` may still
+    succeed if the symmetric/Hermitian matrix represented by the selected half
+    is positive definite, yet it may fail if an element in the other half is
+    non-finite.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cholesky
+    >>> a = np.array([[1,-2j],[2j,5]])
+    >>> L = cholesky(a, lower=True)
+    >>> L
+    array([[ 1.+0.j,  0.+0.j],
+           [ 0.+2.j,  1.+0.j]])
+    >>> L @ L.T.conj()
+    array([[ 1.+0.j,  0.-2.j],
+           [ 0.+2.j,  5.+0.j]])
+
+    """
+    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True,
+                         check_finite=check_finite)
+    return c
+
+
+def cho_factor(a, lower=False, overwrite_a=False, check_finite=True):
+    """
+    Compute the Cholesky decomposition of a matrix, to use in cho_solve
+
+    Returns a matrix containing the Cholesky decomposition,
+    ``A = L L*`` or ``A = U* U`` of a Hermitian positive-definite matrix `a`.
+    The return value can be directly used as the first parameter to cho_solve.
+
+    .. warning::
+        The returned matrix also contains random data in the entries not
+        used by the Cholesky decomposition. If you need to zero these
+        entries, use the function `cholesky` instead.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Matrix to be decomposed
+    lower : bool, optional
+        Whether to compute the upper or lower triangular Cholesky factorization.
+        During decomposition, only the selected half of the matrix is referenced.
+        (Default: upper-triangular)
+    overwrite_a : bool, optional
+        Whether to overwrite data in a (may improve performance)
+    check_finite : bool, optional
+        Whether to check that the entire input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    c : (M, M) ndarray
+        Matrix whose upper or lower triangle contains the Cholesky factor
+        of `a`. Other parts of the matrix contain random data.
+    lower : bool
+        Flag indicating whether the factor is in the lower or upper triangle
+
+    Raises
+    ------
+    LinAlgError
+        Raised if decomposition fails.
+
+    See Also
+    --------
+    cho_solve : Solve a linear set equations using the Cholesky factorization
+                of a matrix.
+
+    Notes
+    -----
+    During the finiteness check (if selected), the entire matrix `a` is
+    checked. During decomposition, `a` is assumed to be symmetric or Hermitian
+    (as applicable), and only the half selected by option `lower` is referenced.
+    Consequently, if `a` is asymmetric/non-Hermitian, `cholesky` may still
+    succeed if the symmetric/Hermitian matrix represented by the selected half
+    is positive definite, yet it may fail if an element in the other half is
+    non-finite.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cho_factor
+    >>> A = np.array([[9, 3, 1, 5], [3, 7, 5, 1], [1, 5, 9, 2], [5, 1, 2, 6]])
+    >>> c, low = cho_factor(A)
+    >>> c
+    array([[3.        , 1.        , 0.33333333, 1.66666667],
+           [3.        , 2.44948974, 1.90515869, -0.27216553],
+           [1.        , 5.        , 2.29330749, 0.8559528 ],
+           [5.        , 1.        , 2.        , 1.55418563]])
+    >>> np.allclose(np.triu(c).T @ np. triu(c) - A, np.zeros((4, 4)))
+    True
+
+    """
+    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=False,
+                         check_finite=check_finite)
+    return c, lower
+
+
+def cho_solve(c_and_lower, b, overwrite_b=False, check_finite=True):
+    """Solve the linear equations A x = b, given the Cholesky factorization of A.
+
+    Parameters
+    ----------
+    (c, lower) : tuple, (array, bool)
+        Cholesky factorization of a, as given by cho_factor
+    b : array
+        Right-hand side
+    overwrite_b : bool, optional
+        Whether to overwrite data in b (may improve performance)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : array
+        The solution to the system A x = b
+
+    See Also
+    --------
+    cho_factor : Cholesky factorization of a matrix
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cho_factor, cho_solve
+    >>> A = np.array([[9, 3, 1, 5], [3, 7, 5, 1], [1, 5, 9, 2], [5, 1, 2, 6]])
+    >>> c, low = cho_factor(A)
+    >>> x = cho_solve((c, low), [1, 1, 1, 1])
+    >>> np.allclose(A @ x - [1, 1, 1, 1], np.zeros(4))
+    True
+
+    """
+    (c, lower) = c_and_lower
+    if check_finite:
+        b1 = asarray_chkfinite(b)
+        c = asarray_chkfinite(c)
+    else:
+        b1 = asarray(b)
+        c = asarray(c)
+
+    if c.ndim != 2 or c.shape[0] != c.shape[1]:
+        raise ValueError("The factored matrix c is not square.")
+    if c.shape[1] != b1.shape[0]:
+        raise ValueError(f"incompatible dimensions ({c.shape} and {b1.shape})")
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        dt = cho_solve((np.eye(2, dtype=b1.dtype), True),
+                        np.ones(2, dtype=c.dtype)).dtype
+        return empty_like(b1, dtype=dt)
+
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+
+    potrs, = get_lapack_funcs(('potrs',), (c, b1))
+    x, info = potrs(c, b1, lower=lower, overwrite_b=overwrite_b)
+    if info != 0:
+        raise ValueError('illegal value in %dth argument of internal potrs'
+                         % -info)
+    return x
+
+
+def cholesky_banded(ab, overwrite_ab=False, lower=False, check_finite=True):
+    """
+    Cholesky decompose a banded Hermitian positive-definite matrix
+
+    The matrix a is stored in ab either in lower-diagonal or upper-
+    diagonal ordered form::
+
+        ab[u + i - j, j] == a[i,j]        (if upper form; i <= j)
+        ab[    i - j, j] == a[i,j]        (if lower form; i >= j)
+
+    Example of ab (shape of a is (6,6), u=2)::
+
+        upper form:
+        *   *   a02 a13 a24 a35
+        *   a01 a12 a23 a34 a45
+        a00 a11 a22 a33 a44 a55
+
+        lower form:
+        a00 a11 a22 a33 a44 a55
+        a10 a21 a32 a43 a54 *
+        a20 a31 a42 a53 *   *
+
+    Parameters
+    ----------
+    ab : (u + 1, M) array_like
+        Banded matrix
+    overwrite_ab : bool, optional
+        Discard data in ab (may enhance performance)
+    lower : bool, optional
+        Is the matrix in the lower form. (Default is upper form)
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    c : (u + 1, M) ndarray
+        Cholesky factorization of a, in the same banded format as ab
+
+    See Also
+    --------
+    cho_solve_banded :
+        Solve a linear set equations, given the Cholesky factorization
+        of a banded Hermitian.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cholesky_banded
+    >>> from numpy import allclose, zeros, diag
+    >>> Ab = np.array([[0, 0, 1j, 2, 3j], [0, -1, -2, 3, 4], [9, 8, 7, 6, 9]])
+    >>> A = np.diag(Ab[0,2:], k=2) + np.diag(Ab[1,1:], k=1)
+    >>> A = A + A.conj().T + np.diag(Ab[2, :])
+    >>> c = cholesky_banded(Ab)
+    >>> C = np.diag(c[0, 2:], k=2) + np.diag(c[1, 1:], k=1) + np.diag(c[2, :])
+    >>> np.allclose(C.conj().T @ C - A, np.zeros((5, 5)))
+    True
+
+    """
+    if check_finite:
+        ab = asarray_chkfinite(ab)
+    else:
+        ab = asarray(ab)
+
+    # accommodate square empty matrices
+    if ab.size == 0:
+        dt = cholesky_banded(np.array([[0, 0], [1, 1]], dtype=ab.dtype)).dtype
+        return empty_like(ab, dtype=dt)
+
+    pbtrf, = get_lapack_funcs(('pbtrf',), (ab,))
+    c, info = pbtrf(ab, lower=lower, overwrite_ab=overwrite_ab)
+    if info > 0:
+        raise LinAlgError("%d-th leading minor not positive definite" % info)
+    if info < 0:
+        raise ValueError('illegal value in %d-th argument of internal pbtrf'
+                         % -info)
+    return c
+
+
+def cho_solve_banded(cb_and_lower, b, overwrite_b=False, check_finite=True):
+    """
+    Solve the linear equations ``A x = b``, given the Cholesky factorization of
+    the banded Hermitian ``A``.
+
+    Parameters
+    ----------
+    (cb, lower) : tuple, (ndarray, bool)
+        `cb` is the Cholesky factorization of A, as given by cholesky_banded.
+        `lower` must be the same value that was given to cholesky_banded.
+    b : array_like
+        Right-hand side
+    overwrite_b : bool, optional
+        If True, the function will overwrite the values in `b`.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : array
+        The solution to the system A x = b
+
+    See Also
+    --------
+    cholesky_banded : Cholesky factorization of a banded matrix
+
+    Notes
+    -----
+
+    .. versionadded:: 0.8.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cholesky_banded, cho_solve_banded
+    >>> Ab = np.array([[0, 0, 1j, 2, 3j], [0, -1, -2, 3, 4], [9, 8, 7, 6, 9]])
+    >>> A = np.diag(Ab[0,2:], k=2) + np.diag(Ab[1,1:], k=1)
+    >>> A = A + A.conj().T + np.diag(Ab[2, :])
+    >>> c = cholesky_banded(Ab)
+    >>> x = cho_solve_banded((c, False), np.ones(5))
+    >>> np.allclose(A @ x - np.ones(5), np.zeros(5))
+    True
+
+    """
+    (cb, lower) = cb_and_lower
+    if check_finite:
+        cb = asarray_chkfinite(cb)
+        b = asarray_chkfinite(b)
+    else:
+        cb = asarray(cb)
+        b = asarray(b)
+
+    # Validate shapes.
+    if cb.shape[-1] != b.shape[0]:
+        raise ValueError("shapes of cb and b are not compatible.")
+
+    # accommodate empty arrays
+    if b.size == 0:
+        m = cholesky_banded(np.array([[0, 0], [1, 1]], dtype=cb.dtype))
+        dt = cho_solve_banded((m, True), np.ones(2, dtype=b.dtype)).dtype
+        return empty_like(b, dtype=dt)
+
+    pbtrs, = get_lapack_funcs(('pbtrs',), (cb, b))
+    x, info = pbtrs(cb, b, lower=lower, overwrite_b=overwrite_b)
+    if info > 0:
+        raise LinAlgError("%dth leading minor not positive definite" % info)
+    if info < 0:
+        raise ValueError('illegal value in %dth argument of internal pbtrs'
+                         % -info)
+    return x
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py
new file mode 100644
index 0000000000000000000000000000000000000000..e10c04fe5ebc196e1b84724b25f0fc20a5e46857
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_cossin.py
@@ -0,0 +1,221 @@
+from collections.abc import Iterable
+import numpy as np
+
+from scipy._lib._util import _asarray_validated
+from scipy.linalg import block_diag, LinAlgError
+from .lapack import _compute_lwork, get_lapack_funcs
+
+__all__ = ['cossin']
+
+
+def cossin(X, p=None, q=None, separate=False,
+           swap_sign=False, compute_u=True, compute_vh=True):
+    """
+    Compute the cosine-sine (CS) decomposition of an orthogonal/unitary matrix.
+
+    X is an ``(m, m)`` orthogonal/unitary matrix, partitioned as the following
+    where upper left block has the shape of ``(p, q)``::
+
+                                   ┌                   ┐
+                                   │ I  0  0 │ 0  0  0 │
+        ┌           ┐   ┌         ┐│ 0  C  0 │ 0 -S  0 │┌         ┐*
+        │ X11 │ X12 │   │ U1 │    ││ 0  0  0 │ 0  0 -I ││ V1 │    │
+        │ ────┼──── │ = │────┼────││─────────┼─────────││────┼────│
+        │ X21 │ X22 │   │    │ U2 ││ 0  0  0 │ I  0  0 ││    │ V2 │
+        └           ┘   └         ┘│ 0  S  0 │ 0  C  0 │└         ┘
+                                   │ 0  0  I │ 0  0  0 │
+                                   └                   ┘
+
+    ``U1``, ``U2``, ``V1``, ``V2`` are square orthogonal/unitary matrices of
+    dimensions ``(p,p)``, ``(m-p,m-p)``, ``(q,q)``, and ``(m-q,m-q)``
+    respectively, and ``C`` and ``S`` are ``(r, r)`` nonnegative diagonal
+    matrices satisfying ``C^2 + S^2 = I`` where ``r = min(p, m-p, q, m-q)``.
+
+    Moreover, the rank of the identity matrices are ``min(p, q) - r``,
+    ``min(p, m - q) - r``, ``min(m - p, q) - r``, and ``min(m - p, m - q) - r``
+    respectively.
+
+    X can be supplied either by itself and block specifications p, q or its
+    subblocks in an iterable from which the shapes would be derived. See the
+    examples below.
+
+    Parameters
+    ----------
+    X : array_like, iterable
+        complex unitary or real orthogonal matrix to be decomposed, or iterable
+        of subblocks ``X11``, ``X12``, ``X21``, ``X22``, when ``p``, ``q`` are
+        omitted.
+    p : int, optional
+        Number of rows of the upper left block ``X11``, used only when X is
+        given as an array.
+    q : int, optional
+        Number of columns of the upper left block ``X11``, used only when X is
+        given as an array.
+    separate : bool, optional
+        if ``True``, the low level components are returned instead of the
+        matrix factors, i.e. ``(u1,u2)``, ``theta``, ``(v1h,v2h)`` instead of
+        ``u``, ``cs``, ``vh``.
+    swap_sign : bool, optional
+        if ``True``, the ``-S``, ``-I`` block will be the bottom left,
+        otherwise (by default) they will be in the upper right block.
+    compute_u : bool, optional
+        if ``False``, ``u`` won't be computed and an empty array is returned.
+    compute_vh : bool, optional
+        if ``False``, ``vh`` won't be computed and an empty array is returned.
+
+    Returns
+    -------
+    u : ndarray
+        When ``compute_u=True``, contains the block diagonal orthogonal/unitary
+        matrix consisting of the blocks ``U1`` (``p`` x ``p``) and ``U2``
+        (``m-p`` x ``m-p``) orthogonal/unitary matrices. If ``separate=True``,
+        this contains the tuple of ``(U1, U2)``.
+    cs : ndarray
+        The cosine-sine factor with the structure described above.
+         If ``separate=True``, this contains the ``theta`` array containing the
+         angles in radians.
+    vh : ndarray
+        When ``compute_vh=True`, contains the block diagonal orthogonal/unitary
+        matrix consisting of the blocks ``V1H`` (``q`` x ``q``) and ``V2H``
+        (``m-q`` x ``m-q``) orthogonal/unitary matrices. If ``separate=True``,
+        this contains the tuple of ``(V1H, V2H)``.
+
+    References
+    ----------
+    .. [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+           Algorithms, 50(1):33-65, 2009.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import cossin
+    >>> from scipy.stats import unitary_group
+    >>> x = unitary_group.rvs(4)
+    >>> u, cs, vdh = cossin(x, p=2, q=2)
+    >>> np.allclose(x, u @ cs @ vdh)
+    True
+
+    Same can be entered via subblocks without the need of ``p`` and ``q``. Also
+    let's skip the computation of ``u``
+
+    >>> ue, cs, vdh = cossin((x[:2, :2], x[:2, 2:], x[2:, :2], x[2:, 2:]),
+    ...                      compute_u=False)
+    >>> print(ue)
+    []
+    >>> np.allclose(x, u @ cs @ vdh)
+    True
+
+    """
+
+    if p or q:
+        p = 1 if p is None else int(p)
+        q = 1 if q is None else int(q)
+        X = _asarray_validated(X, check_finite=True)
+        if not np.equal(*X.shape):
+            raise ValueError("Cosine Sine decomposition only supports square"
+                             f" matrices, got {X.shape}")
+        m = X.shape[0]
+        if p >= m or p <= 0:
+            raise ValueError(f"invalid p={p}, 0= m or q <= 0:
+            raise ValueError(f"invalid q={q}, 0 0:
+        raise LinAlgError(f"{method_name} did not converge: {info}")
+
+    if separate:
+        return (u1, u2), theta, (v1h, v2h)
+
+    U = block_diag(u1, u2)
+    VDH = block_diag(v1h, v2h)
+
+    # Construct the middle factor CS
+    c = np.diag(np.cos(theta))
+    s = np.diag(np.sin(theta))
+    r = min(p, q, m - p, m - q)
+    n11 = min(p, q) - r
+    n12 = min(p, m - q) - r
+    n21 = min(m - p, q) - r
+    n22 = min(m - p, m - q) - r
+    Id = np.eye(np.max([n11, n12, n21, n22, r]), dtype=theta.dtype)
+    CS = np.zeros((m, m), dtype=theta.dtype)
+
+    CS[:n11, :n11] = Id[:n11, :n11]
+
+    xs = n11 + r
+    xe = n11 + r + n12
+    ys = n11 + n21 + n22 + 2 * r
+    ye = n11 + n21 + n22 + 2 * r + n12
+    CS[xs: xe, ys:ye] = Id[:n12, :n12] if swap_sign else -Id[:n12, :n12]
+
+    xs = p + n22 + r
+    xe = p + n22 + r + + n21
+    ys = n11 + r
+    ye = n11 + r + n21
+    CS[xs:xe, ys:ye] = -Id[:n21, :n21] if swap_sign else Id[:n21, :n21]
+
+    CS[p:p + n22, q:q + n22] = Id[:n22, :n22]
+    CS[n11:n11 + r, n11:n11 + r] = c
+    CS[p + n22:p + n22 + r, n11 + r + n21 + n22:2 * r + n11 + n21 + n22] = c
+
+    xs = n11
+    xe = n11 + r
+    ys = n11 + n21 + n22 + r
+    ye = n11 + n21 + n22 + 2 * r
+    CS[xs:xe, ys:ye] = s if swap_sign else -s
+
+    CS[p + n22:p + n22 + r, n11:n11 + r] = -s if swap_sign else s
+
+    return U, CS, VDH
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py
new file mode 100644
index 0000000000000000000000000000000000000000..336df1d5fb416f635c91afe3cc2cfb3c340239fc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_ldl.py
@@ -0,0 +1,353 @@
+from warnings import warn
+
+import numpy as np
+from numpy import (atleast_2d, arange, zeros_like, imag, diag,
+                   iscomplexobj, tril, triu, argsort, empty_like)
+from scipy._lib._util import ComplexWarning
+from ._decomp import _asarray_validated
+from .lapack import get_lapack_funcs, _compute_lwork
+
+__all__ = ['ldl']
+
+
+def ldl(A, lower=True, hermitian=True, overwrite_a=False, check_finite=True):
+    """ Computes the LDLt or Bunch-Kaufman factorization of a symmetric/
+    hermitian matrix.
+
+    This function returns a block diagonal matrix D consisting blocks of size
+    at most 2x2 and also a possibly permuted unit lower triangular matrix
+    ``L`` such that the factorization ``A = L D L^H`` or ``A = L D L^T``
+    holds. If `lower` is False then (again possibly permuted) upper
+    triangular matrices are returned as outer factors.
+
+    The permutation array can be used to triangularize the outer factors
+    simply by a row shuffle, i.e., ``lu[perm, :]`` is an upper/lower
+    triangular matrix. This is also equivalent to multiplication with a
+    permutation matrix ``P.dot(lu)``, where ``P`` is a column-permuted
+    identity matrix ``I[:, perm]``.
+
+    Depending on the value of the boolean `lower`, only upper or lower
+    triangular part of the input array is referenced. Hence, a triangular
+    matrix on entry would give the same result as if the full matrix is
+    supplied.
+
+    Parameters
+    ----------
+    A : array_like
+        Square input array
+    lower : bool, optional
+        This switches between the lower and upper triangular outer factors of
+        the factorization. Lower triangular (``lower=True``) is the default.
+    hermitian : bool, optional
+        For complex-valued arrays, this defines whether ``A = A.conj().T`` or
+        ``A = A.T`` is assumed. For real-valued arrays, this switch has no
+        effect.
+    overwrite_a : bool, optional
+        Allow overwriting data in `A` (may enhance performance). The default
+        is False.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    lu : ndarray
+        The (possibly) permuted upper/lower triangular outer factor of the
+        factorization.
+    d : ndarray
+        The block diagonal multiplier of the factorization.
+    perm : ndarray
+        The row-permutation index array that brings lu into triangular form.
+
+    Raises
+    ------
+    ValueError
+        If input array is not square.
+    ComplexWarning
+        If a complex-valued array with nonzero imaginary parts on the
+        diagonal is given and hermitian is set to True.
+
+    See Also
+    --------
+    cholesky, lu
+
+    Notes
+    -----
+    This function uses ``?SYTRF`` routines for symmetric matrices and
+    ``?HETRF`` routines for Hermitian matrices from LAPACK. See [1]_ for
+    the algorithm details.
+
+    Depending on the `lower` keyword value, only lower or upper triangular
+    part of the input array is referenced. Moreover, this keyword also defines
+    the structure of the outer factors of the factorization.
+
+    .. versionadded:: 1.1.0
+
+    References
+    ----------
+    .. [1] J.R. Bunch, L. Kaufman, Some stable methods for calculating
+       inertia and solving symmetric linear systems, Math. Comput. Vol.31,
+       1977. :doi:`10.2307/2005787`
+
+    Examples
+    --------
+    Given an upper triangular array ``a`` that represents the full symmetric
+    array with its entries, obtain ``l``, 'd' and the permutation vector `perm`:
+
+    >>> import numpy as np
+    >>> from scipy.linalg import ldl
+    >>> a = np.array([[2, -1, 3], [0, 2, 0], [0, 0, 1]])
+    >>> lu, d, perm = ldl(a, lower=0) # Use the upper part
+    >>> lu
+    array([[ 0. ,  0. ,  1. ],
+           [ 0. ,  1. , -0.5],
+           [ 1. ,  1. ,  1.5]])
+    >>> d
+    array([[-5. ,  0. ,  0. ],
+           [ 0. ,  1.5,  0. ],
+           [ 0. ,  0. ,  2. ]])
+    >>> perm
+    array([2, 1, 0])
+    >>> lu[perm, :]
+    array([[ 1. ,  1. ,  1.5],
+           [ 0. ,  1. , -0.5],
+           [ 0. ,  0. ,  1. ]])
+    >>> lu.dot(d).dot(lu.T)
+    array([[ 2., -1.,  3.],
+           [-1.,  2.,  0.],
+           [ 3.,  0.,  1.]])
+
+    """
+    a = atleast_2d(_asarray_validated(A, check_finite=check_finite))
+    if a.shape[0] != a.shape[1]:
+        raise ValueError('The input array "a" should be square.')
+    # Return empty arrays for empty square input
+    if a.size == 0:
+        return empty_like(a), empty_like(a), np.array([], dtype=int)
+
+    n = a.shape[0]
+    r_or_c = complex if iscomplexobj(a) else float
+
+    # Get the LAPACK routine
+    if r_or_c is complex and hermitian:
+        s, sl = 'hetrf', 'hetrf_lwork'
+        if np.any(imag(diag(a))):
+            warn('scipy.linalg.ldl():\nThe imaginary parts of the diagonal'
+                 'are ignored. Use "hermitian=False" for factorization of'
+                 'complex symmetric arrays.', ComplexWarning, stacklevel=2)
+    else:
+        s, sl = 'sytrf', 'sytrf_lwork'
+
+    solver, solver_lwork = get_lapack_funcs((s, sl), (a,))
+    lwork = _compute_lwork(solver_lwork, n, lower=lower)
+    ldu, piv, info = solver(a, lwork=lwork, lower=lower,
+                            overwrite_a=overwrite_a)
+    if info < 0:
+        raise ValueError(f'{s.upper()} exited with the internal error "illegal value '
+                         f'in argument number {-info}". See LAPACK documentation '
+                         'for the error codes.')
+
+    swap_arr, pivot_arr = _ldl_sanitize_ipiv(piv, lower=lower)
+    d, lu = _ldl_get_d_and_l(ldu, pivot_arr, lower=lower, hermitian=hermitian)
+    lu, perm = _ldl_construct_tri_factor(lu, swap_arr, pivot_arr, lower=lower)
+
+    return lu, d, perm
+
+
+def _ldl_sanitize_ipiv(a, lower=True):
+    """
+    This helper function takes the rather strangely encoded permutation array
+    returned by the LAPACK routines ?(HE/SY)TRF and converts it into
+    regularized permutation and diagonal pivot size format.
+
+    Since FORTRAN uses 1-indexing and LAPACK uses different start points for
+    upper and lower formats there are certain offsets in the indices used
+    below.
+
+    Let's assume a result where the matrix is 6x6 and there are two 2x2
+    and two 1x1 blocks reported by the routine. To ease the coding efforts,
+    we still populate a 6-sized array and fill zeros as the following ::
+
+        pivots = [2, 0, 2, 0, 1, 1]
+
+    This denotes a diagonal matrix of the form ::
+
+        [x x        ]
+        [x x        ]
+        [    x x    ]
+        [    x x    ]
+        [        x  ]
+        [          x]
+
+    In other words, we write 2 when the 2x2 block is first encountered and
+    automatically write 0 to the next entry and skip the next spin of the
+    loop. Thus, a separate counter or array appends to keep track of block
+    sizes are avoided. If needed, zeros can be filtered out later without
+    losing the block structure.
+
+    Parameters
+    ----------
+    a : ndarray
+        The permutation array ipiv returned by LAPACK
+    lower : bool, optional
+        The switch to select whether upper or lower triangle is chosen in
+        the LAPACK call.
+
+    Returns
+    -------
+    swap_ : ndarray
+        The array that defines the row/column swap operations. For example,
+        if row two is swapped with row four, the result is [0, 3, 2, 3].
+    pivots : ndarray
+        The array that defines the block diagonal structure as given above.
+
+    """
+    n = a.size
+    swap_ = arange(n)
+    pivots = zeros_like(swap_, dtype=int)
+    skip_2x2 = False
+
+    # Some upper/lower dependent offset values
+    # range (s)tart, r(e)nd, r(i)ncrement
+    x, y, rs, re, ri = (1, 0, 0, n, 1) if lower else (-1, -1, n-1, -1, -1)
+
+    for ind in range(rs, re, ri):
+        # If previous spin belonged already to a 2x2 block
+        if skip_2x2:
+            skip_2x2 = False
+            continue
+
+        cur_val = a[ind]
+        # do we have a 1x1 block or not?
+        if cur_val > 0:
+            if cur_val != ind+1:
+                # Index value != array value --> permutation required
+                swap_[ind] = swap_[cur_val-1]
+            pivots[ind] = 1
+        # Not.
+        elif cur_val < 0 and cur_val == a[ind+x]:
+            # first neg entry of 2x2 block identifier
+            if -cur_val != ind+2:
+                # Index value != array value --> permutation required
+                swap_[ind+x] = swap_[-cur_val-1]
+            pivots[ind+y] = 2
+            skip_2x2 = True
+        else:  # Doesn't make sense, give up
+            raise ValueError('While parsing the permutation array '
+                             'in "scipy.linalg.ldl", invalid entries '
+                             'found. The array syntax is invalid.')
+    return swap_, pivots
+
+
+def _ldl_get_d_and_l(ldu, pivs, lower=True, hermitian=True):
+    """
+    Helper function to extract the diagonal and triangular matrices for
+    LDL.T factorization.
+
+    Parameters
+    ----------
+    ldu : ndarray
+        The compact output returned by the LAPACK routing
+    pivs : ndarray
+        The sanitized array of {0, 1, 2} denoting the sizes of the pivots. For
+        every 2 there is a succeeding 0.
+    lower : bool, optional
+        If set to False, upper triangular part is considered.
+    hermitian : bool, optional
+        If set to False a symmetric complex array is assumed.
+
+    Returns
+    -------
+    d : ndarray
+        The block diagonal matrix.
+    lu : ndarray
+        The upper/lower triangular matrix
+    """
+    is_c = iscomplexobj(ldu)
+    d = diag(diag(ldu))
+    n = d.shape[0]
+    blk_i = 0  # block index
+
+    # row/column offsets for selecting sub-, super-diagonal
+    x, y = (1, 0) if lower else (0, 1)
+
+    lu = tril(ldu, -1) if lower else triu(ldu, 1)
+    diag_inds = arange(n)
+    lu[diag_inds, diag_inds] = 1
+
+    for blk in pivs[pivs != 0]:
+        # increment the block index and check for 2s
+        # if 2 then copy the off diagonals depending on uplo
+        inc = blk_i + blk
+
+        if blk == 2:
+            d[blk_i+x, blk_i+y] = ldu[blk_i+x, blk_i+y]
+            # If Hermitian matrix is factorized, the cross-offdiagonal element
+            # should be conjugated.
+            if is_c and hermitian:
+                d[blk_i+y, blk_i+x] = ldu[blk_i+x, blk_i+y].conj()
+            else:
+                d[blk_i+y, blk_i+x] = ldu[blk_i+x, blk_i+y]
+
+            lu[blk_i+x, blk_i+y] = 0.
+        blk_i = inc
+
+    return d, lu
+
+
+def _ldl_construct_tri_factor(lu, swap_vec, pivs, lower=True):
+    """
+    Helper function to construct explicit outer factors of LDL factorization.
+
+    If lower is True the permuted factors are multiplied as L(1)*L(2)*...*L(k).
+    Otherwise, the permuted factors are multiplied as L(k)*...*L(2)*L(1). See
+    LAPACK documentation for more details.
+
+    Parameters
+    ----------
+    lu : ndarray
+        The triangular array that is extracted from LAPACK routine call with
+        ones on the diagonals.
+    swap_vec : ndarray
+        The array that defines the row swapping indices. If the kth entry is m
+        then rows k,m are swapped. Notice that the mth entry is not necessarily
+        k to avoid undoing the swapping.
+    pivs : ndarray
+        The array that defines the block diagonal structure returned by
+        _ldl_sanitize_ipiv().
+    lower : bool, optional
+        The boolean to switch between lower and upper triangular structure.
+
+    Returns
+    -------
+    lu : ndarray
+        The square outer factor which satisfies the L * D * L.T = A
+    perm : ndarray
+        The permutation vector that brings the lu to the triangular form
+
+    Notes
+    -----
+    Note that the original argument "lu" is overwritten.
+
+    """
+    n = lu.shape[0]
+    perm = arange(n)
+    # Setup the reading order of the permutation matrix for upper/lower
+    rs, re, ri = (n-1, -1, -1) if lower else (0, n, 1)
+
+    for ind in range(rs, re, ri):
+        s_ind = swap_vec[ind]
+        if s_ind != ind:
+            # Column start and end positions
+            col_s = ind if lower else 0
+            col_e = n if lower else ind+1
+
+            # If we stumble upon a 2x2 block include both cols in the perm.
+            if pivs[ind] == (0 if lower else 2):
+                col_s += -1 if lower else 0
+                col_e += 0 if lower else 1
+            lu[[s_ind, ind], col_s:col_e] = lu[[ind, s_ind], col_s:col_e]
+            perm[[s_ind, ind]] = perm[[ind, s_ind]]
+
+    return lu, argsort(perm)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py
new file mode 100644
index 0000000000000000000000000000000000000000..06562a4a490a4328c08d4de45a5463427e33562b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu.py
@@ -0,0 +1,389 @@
+"""LU decomposition functions."""
+
+from warnings import warn
+
+from numpy import asarray, asarray_chkfinite
+import numpy as np
+from itertools import product
+
+# Local imports
+from ._misc import _datacopied, LinAlgWarning
+from .lapack import get_lapack_funcs
+from ._decomp_lu_cython import lu_dispatcher
+
+lapack_cast_dict = {x: ''.join([y for y in 'fdFD' if np.can_cast(x, y)])
+                    for x in np.typecodes['All']}
+
+__all__ = ['lu', 'lu_solve', 'lu_factor']
+
+
+def lu_factor(a, overwrite_a=False, check_finite=True):
+    """
+    Compute pivoted LU decomposition of a matrix.
+
+    The decomposition is::
+
+        A = P L U
+
+    where P is a permutation matrix, L lower triangular with unit
+    diagonal elements, and U upper triangular.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to decompose
+    overwrite_a : bool, optional
+        Whether to overwrite data in A (may increase performance)
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    lu : (M, N) ndarray
+        Matrix containing U in its upper triangle, and L in its lower triangle.
+        The unit diagonal elements of L are not stored.
+    piv : (K,) ndarray
+        Pivot indices representing the permutation matrix P:
+        row i of matrix was interchanged with row piv[i].
+        Of shape ``(K,)``, with ``K = min(M, N)``.
+
+    See Also
+    --------
+    lu : gives lu factorization in more user-friendly format
+    lu_solve : solve an equation system using the LU factorization of a matrix
+
+    Notes
+    -----
+    This is a wrapper to the ``*GETRF`` routines from LAPACK. Unlike
+    :func:`lu`, it outputs the L and U factors into a single array
+    and returns pivot indices instead of a permutation matrix.
+
+    While the underlying ``*GETRF`` routines return 1-based pivot indices, the
+    ``piv`` array returned by ``lu_factor`` contains 0-based indices.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import lu_factor
+    >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
+    >>> lu, piv = lu_factor(A)
+    >>> piv
+    array([2, 2, 3, 3], dtype=int32)
+
+    Convert LAPACK's ``piv`` array to NumPy index and test the permutation
+
+    >>> def pivot_to_permutation(piv):
+    ...     perm = np.arange(len(piv))
+    ...     for i in range(len(piv)):
+    ...         perm[i], perm[piv[i]] = perm[piv[i]], perm[i]
+    ...     return perm
+    ...
+    >>> p_inv = pivot_to_permutation(piv)
+    >>> p_inv
+    array([2, 0, 3, 1])
+    >>> L, U = np.tril(lu, k=-1) + np.eye(4), np.triu(lu)
+    >>> np.allclose(A[p_inv] - L @ U, np.zeros((4, 4)))
+    True
+
+    The P matrix in P L U is defined by the inverse permutation and
+    can be recovered using argsort:
+
+    >>> p = np.argsort(p_inv)
+    >>> p
+    array([1, 3, 0, 2])
+    >>> np.allclose(A - L[p] @ U, np.zeros((4, 4)))
+    True
+
+    or alternatively:
+
+    >>> P = np.eye(4)[p]
+    >>> np.allclose(A - P @ L @ U, np.zeros((4, 4)))
+    True
+    """
+    if check_finite:
+        a1 = asarray_chkfinite(a)
+    else:
+        a1 = asarray(a)
+
+    # accommodate empty arrays
+    if a1.size == 0:
+        lu = np.empty_like(a1)
+        piv = np.arange(0, dtype=np.int32)
+        return lu, piv
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+
+    getrf, = get_lapack_funcs(('getrf',), (a1,))
+    lu, piv, info = getrf(a1, overwrite_a=overwrite_a)
+    if info < 0:
+        raise ValueError('illegal value in %dth argument of '
+                         'internal getrf (lu_factor)' % -info)
+    if info > 0:
+        warn("Diagonal number %d is exactly zero. Singular matrix." % info,
+             LinAlgWarning, stacklevel=2)
+    return lu, piv
+
+
+def lu_solve(lu_and_piv, b, trans=0, overwrite_b=False, check_finite=True):
+    """Solve an equation system, a x = b, given the LU factorization of a
+
+    Parameters
+    ----------
+    (lu, piv)
+        Factorization of the coefficient matrix a, as given by lu_factor.
+        In particular piv are 0-indexed pivot indices.
+    b : array
+        Right-hand side
+    trans : {0, 1, 2}, optional
+        Type of system to solve:
+
+        =====  =========
+        trans  system
+        =====  =========
+        0      a x   = b
+        1      a^T x = b
+        2      a^H x = b
+        =====  =========
+    overwrite_b : bool, optional
+        Whether to overwrite data in b (may increase performance)
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    x : array
+        Solution to the system
+
+    See Also
+    --------
+    lu_factor : LU factorize a matrix
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import lu_factor, lu_solve
+    >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
+    >>> b = np.array([1, 1, 1, 1])
+    >>> lu, piv = lu_factor(A)
+    >>> x = lu_solve((lu, piv), b)
+    >>> np.allclose(A @ x - b, np.zeros((4,)))
+    True
+
+    """
+    (lu, piv) = lu_and_piv
+    if check_finite:
+        b1 = asarray_chkfinite(b)
+    else:
+        b1 = asarray(b)
+
+    overwrite_b = overwrite_b or _datacopied(b1, b)
+
+    if lu.shape[0] != b1.shape[0]:
+        raise ValueError(f"Shapes of lu {lu.shape} and b {b1.shape} are incompatible")
+
+    # accommodate empty arrays
+    if b1.size == 0:
+        m = lu_solve((np.eye(2, dtype=lu.dtype), [0, 1]), np.ones(2, dtype=b.dtype))
+        return np.empty_like(b1, dtype=m.dtype)
+
+    getrs, = get_lapack_funcs(('getrs',), (lu, b1))
+    x, info = getrs(lu, piv, b1, trans=trans, overwrite_b=overwrite_b)
+    if info == 0:
+        return x
+    raise ValueError('illegal value in %dth argument of internal gesv|posv'
+                     % -info)
+
+
+def lu(a, permute_l=False, overwrite_a=False, check_finite=True,
+       p_indices=False):
+    """
+    Compute LU decomposition of a matrix with partial pivoting.
+
+    The decomposition satisfies::
+
+        A = P @ L @ U
+
+    where ``P`` is a permutation matrix, ``L`` lower triangular with unit
+    diagonal elements, and ``U`` upper triangular. If `permute_l` is set to
+    ``True`` then ``L`` is returned already permuted and hence satisfying
+    ``A = L @ U``.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Array to decompose
+    permute_l : bool, optional
+        Perform the multiplication P*L (Default: do not permute)
+    overwrite_a : bool, optional
+        Whether to overwrite data in a (may improve performance)
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    p_indices : bool, optional
+        If ``True`` the permutation information is returned as row indices.
+        The default is ``False`` for backwards-compatibility reasons.
+
+    Returns
+    -------
+    **(If `permute_l` is ``False``)**
+
+    p : (..., M, M) ndarray
+        Permutation arrays or vectors depending on `p_indices`
+    l : (..., M, K) ndarray
+        Lower triangular or trapezoidal array with unit diagonal.
+        ``K = min(M, N)``
+    u : (..., K, N) ndarray
+        Upper triangular or trapezoidal array
+
+    **(If `permute_l` is ``True``)**
+
+    pl : (..., M, K) ndarray
+        Permuted L matrix.
+        ``K = min(M, N)``
+    u : (..., K, N) ndarray
+        Upper triangular or trapezoidal array
+
+    Notes
+    -----
+    Permutation matrices are costly since they are nothing but row reorder of
+    ``L`` and hence indices are strongly recommended to be used instead if the
+    permutation is required. The relation in the 2D case then becomes simply
+    ``A = L[P, :] @ U``. In higher dimensions, it is better to use `permute_l`
+    to avoid complicated indexing tricks.
+
+    In 2D case, if one has the indices however, for some reason, the
+    permutation matrix is still needed then it can be constructed by
+    ``np.eye(M)[P, :]``.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.linalg import lu
+    >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
+    >>> p, l, u = lu(A)
+    >>> np.allclose(A, p @ l @ u)
+    True
+    >>> p  # Permutation matrix
+    array([[0., 1., 0., 0.],  # Row index 1
+           [0., 0., 0., 1.],  # Row index 3
+           [1., 0., 0., 0.],  # Row index 0
+           [0., 0., 1., 0.]]) # Row index 2
+    >>> p, _, _ = lu(A, p_indices=True)
+    >>> p
+    array([1, 3, 0, 2], dtype=int32)  # as given by row indices above
+    >>> np.allclose(A, l[p, :] @ u)
+    True
+
+    We can also use nd-arrays, for example, a demonstration with 4D array:
+
+    >>> rng = np.random.default_rng()
+    >>> A = rng.uniform(low=-4, high=4, size=[3, 2, 4, 8])
+    >>> p, l, u = lu(A)
+    >>> p.shape, l.shape, u.shape
+    ((3, 2, 4, 4), (3, 2, 4, 4), (3, 2, 4, 8))
+    >>> np.allclose(A, p @ l @ u)
+    True
+    >>> PL, U = lu(A, permute_l=True)
+    >>> np.allclose(A, PL @ U)
+    True
+
+    """
+    a1 = np.asarray_chkfinite(a) if check_finite else np.asarray(a)
+    if a1.ndim < 2:
+        raise ValueError('The input array must be at least two-dimensional.')
+
+    # Also check if dtype is LAPACK compatible
+    if a1.dtype.char not in 'fdFD':
+        dtype_char = lapack_cast_dict[a1.dtype.char]
+        if not dtype_char:  # No casting possible
+            raise TypeError(f'The dtype {a1.dtype} cannot be cast '
+                            'to float(32, 64) or complex(64, 128).')
+
+        a1 = a1.astype(dtype_char[0])  # makes a copy, free to scratch
+        overwrite_a = True
+
+    *nd, m, n = a1.shape
+    k = min(m, n)
+    real_dchar = 'f' if a1.dtype.char in 'fF' else 'd'
+
+    # Empty input
+    if min(*a1.shape) == 0:
+        if permute_l:
+            PL = np.empty(shape=[*nd, m, k], dtype=a1.dtype)
+            U = np.empty(shape=[*nd, k, n], dtype=a1.dtype)
+            return PL, U
+        else:
+            P = (np.empty([*nd, 0], dtype=np.int32) if p_indices else
+                 np.empty([*nd, 0, 0], dtype=real_dchar))
+            L = np.empty(shape=[*nd, m, k], dtype=a1.dtype)
+            U = np.empty(shape=[*nd, k, n], dtype=a1.dtype)
+            return P, L, U
+
+    # Scalar case
+    if a1.shape[-2:] == (1, 1):
+        if permute_l:
+            return np.ones_like(a1), (a1 if overwrite_a else a1.copy())
+        else:
+            P = (np.zeros(shape=[*nd, m], dtype=int) if p_indices
+                 else np.ones_like(a1))
+            return P, np.ones_like(a1), (a1 if overwrite_a else a1.copy())
+
+    # Then check overwrite permission
+    if not _datacopied(a1, a):  # "a"  still alive through "a1"
+        if not overwrite_a:
+            # Data belongs to "a" so make a copy
+            a1 = a1.copy(order='C')
+        #  else: Do nothing we'll use "a" if possible
+    # else:  a1 has its own data thus free to scratch
+
+    # Then layout checks, might happen that overwrite is allowed but original
+    # array was read-only or non-contiguous.
+
+    if not (a1.flags['C_CONTIGUOUS'] and a1.flags['WRITEABLE']):
+        a1 = a1.copy(order='C')
+
+    if not nd:  # 2D array
+
+        p = np.empty(m, dtype=np.int32)
+        u = np.zeros([k, k], dtype=a1.dtype)
+        lu_dispatcher(a1, u, p, permute_l)
+        P, L, U = (p, a1, u) if m > n else (p, u, a1)
+
+    else:  # Stacked array
+
+        # Prepare the contiguous data holders
+        P = np.empty([*nd, m], dtype=np.int32)  # perm vecs
+
+        if m > n:  # Tall arrays, U will be created
+            U = np.zeros([*nd, k, k], dtype=a1.dtype)
+            for ind in product(*[range(x) for x in a1.shape[:-2]]):
+                lu_dispatcher(a1[ind], U[ind], P[ind], permute_l)
+            L = a1
+
+        else:  # Fat arrays, L will be created
+            L = np.zeros([*nd, k, k], dtype=a1.dtype)
+            for ind in product(*[range(x) for x in a1.shape[:-2]]):
+                lu_dispatcher(a1[ind], L[ind], P[ind], permute_l)
+            U = a1
+
+    # Convert permutation vecs to permutation arrays
+    # permute_l=False needed to enter here to avoid wasted efforts
+    if (not p_indices) and (not permute_l):
+        if nd:
+            Pa = np.zeros([*nd, m, m], dtype=real_dchar)
+            # An unreadable index hack - One-hot encoding for perm matrices
+            nd_ix = np.ix_(*([np.arange(x) for x in nd]+[np.arange(m)]))
+            Pa[(*nd_ix, P)] = 1
+            P = Pa
+        else:  # 2D case
+            Pa = np.zeros([m, m], dtype=real_dchar)
+            Pa[np.arange(m), P] = 1
+            P = Pa
+
+    return (L, U) if permute_l else (P, L, U)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0a175b1de32806102318cf69f7c5b4c3deddb03c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_lu_cython.pyi
@@ -0,0 +1,6 @@
+from numpy.typing import NDArray
+from typing import Any
+
+def lu_decompose(a: NDArray[Any], lu: NDArray[Any], perm: NDArray[Any], permute_l: bool) -> None: ...  # noqa: E501
+
+def lu_dispatcher(a: NDArray[Any], lu: NDArray[Any], perm: NDArray[Any], permute_l: bool) -> None: ...  # noqa: E501
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py
new file mode 100644
index 0000000000000000000000000000000000000000..2fc3652899bed607ab1dd5e3f1663345010e93c1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_polar.py
@@ -0,0 +1,111 @@
+import numpy as np
+from scipy.linalg import svd
+
+
+__all__ = ['polar']
+
+
+def polar(a, side="right"):
+    """
+    Compute the polar decomposition.
+
+    Returns the factors of the polar decomposition [1]_ `u` and `p` such
+    that ``a = up`` (if `side` is "right") or ``a = pu`` (if `side` is
+    "left"), where `p` is positive semidefinite. Depending on the shape
+    of `a`, either the rows or columns of `u` are orthonormal. When `a`
+    is a square array, `u` is a square unitary array. When `a` is not
+    square, the "canonical polar decomposition" [2]_ is computed.
+
+    Parameters
+    ----------
+    a : (m, n) array_like
+        The array to be factored.
+    side : {'left', 'right'}, optional
+        Determines whether a right or left polar decomposition is computed.
+        If `side` is "right", then ``a = up``.  If `side` is "left",  then
+        ``a = pu``.  The default is "right".
+
+    Returns
+    -------
+    u : (m, n) ndarray
+        If `a` is square, then `u` is unitary. If m > n, then the columns
+        of `a` are orthonormal, and if m < n, then the rows of `u` are
+        orthonormal.
+    p : ndarray
+        `p` is Hermitian positive semidefinite. If `a` is nonsingular, `p`
+        is positive definite. The shape of `p` is (n, n) or (m, m), depending
+        on whether `side` is "right" or "left", respectively.
+
+    References
+    ----------
+    .. [1] R. A. Horn and C. R. Johnson, "Matrix Analysis", Cambridge
+           University Press, 1985.
+    .. [2] N. J. Higham, "Functions of Matrices: Theory and Computation",
+           SIAM, 2008.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import polar
+    >>> a = np.array([[1, -1], [2, 4]])
+    >>> u, p = polar(a)
+    >>> u
+    array([[ 0.85749293, -0.51449576],
+           [ 0.51449576,  0.85749293]])
+    >>> p
+    array([[ 1.88648444,  1.2004901 ],
+           [ 1.2004901 ,  3.94446746]])
+
+    A non-square example, with m < n:
+
+    >>> b = np.array([[0.5, 1, 2], [1.5, 3, 4]])
+    >>> u, p = polar(b)
+    >>> u
+    array([[-0.21196618, -0.42393237,  0.88054056],
+           [ 0.39378971,  0.78757942,  0.4739708 ]])
+    >>> p
+    array([[ 0.48470147,  0.96940295,  1.15122648],
+           [ 0.96940295,  1.9388059 ,  2.30245295],
+           [ 1.15122648,  2.30245295,  3.65696431]])
+    >>> u.dot(p)   # Verify the decomposition.
+    array([[ 0.5,  1. ,  2. ],
+           [ 1.5,  3. ,  4. ]])
+    >>> u.dot(u.T)   # The rows of u are orthonormal.
+    array([[  1.00000000e+00,  -2.07353665e-17],
+           [ -2.07353665e-17,   1.00000000e+00]])
+
+    Another non-square example, with m > n:
+
+    >>> c = b.T
+    >>> u, p = polar(c)
+    >>> u
+    array([[-0.21196618,  0.39378971],
+           [-0.42393237,  0.78757942],
+           [ 0.88054056,  0.4739708 ]])
+    >>> p
+    array([[ 1.23116567,  1.93241587],
+           [ 1.93241587,  4.84930602]])
+    >>> u.dot(p)   # Verify the decomposition.
+    array([[ 0.5,  1.5],
+           [ 1. ,  3. ],
+           [ 2. ,  4. ]])
+    >>> u.T.dot(u)  # The columns of u are orthonormal.
+    array([[  1.00000000e+00,  -1.26363763e-16],
+           [ -1.26363763e-16,   1.00000000e+00]])
+
+    """
+    if side not in ['right', 'left']:
+        raise ValueError("`side` must be either 'right' or 'left'")
+    a = np.asarray(a)
+    if a.ndim != 2:
+        raise ValueError("`a` must be a 2-D array.")
+
+    w, s, vh = svd(a, full_matrices=False)
+    u = w.dot(vh)
+    if side == 'right':
+        # a = up
+        p = (vh.T.conj() * s).dot(vh)
+    else:
+        # a = pu
+        p = (w * s).dot(w.T.conj())
+    return u, p
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py
new file mode 100644
index 0000000000000000000000000000000000000000..a41ad90770e3d53c741d85e6f46d4040bf203e7a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qr.py
@@ -0,0 +1,490 @@
+"""QR decomposition functions."""
+import numpy as np
+
+# Local imports
+from .lapack import get_lapack_funcs
+from ._misc import _datacopied
+
+__all__ = ['qr', 'qr_multiply', 'rq']
+
+
+def safecall(f, name, *args, **kwargs):
+    """Call a LAPACK routine, determining lwork automatically and handling
+    error return values"""
+    lwork = kwargs.get("lwork", None)
+    if lwork in (None, -1):
+        kwargs['lwork'] = -1
+        ret = f(*args, **kwargs)
+        kwargs['lwork'] = ret[-2][0].real.astype(np.int_)
+    ret = f(*args, **kwargs)
+    if ret[-1] < 0:
+        raise ValueError("illegal value in %dth argument of internal %s"
+                         % (-ret[-1], name))
+    return ret[:-2]
+
+
+def qr(a, overwrite_a=False, lwork=None, mode='full', pivoting=False,
+       check_finite=True):
+    """
+    Compute QR decomposition of a matrix.
+
+    Calculate the decomposition ``A = Q R`` where Q is unitary/orthogonal
+    and R upper triangular.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to be decomposed
+    overwrite_a : bool, optional
+        Whether data in `a` is overwritten (may improve performance if
+        `overwrite_a` is set to True by reusing the existing input data
+        structure rather than creating a new one.)
+    lwork : int, optional
+        Work array size, lwork >= a.shape[1]. If None or -1, an optimal size
+        is computed.
+    mode : {'full', 'r', 'economic', 'raw'}, optional
+        Determines what information is to be returned: either both Q and R
+        ('full', default), only R ('r') or both Q and R but computed in
+        economy-size ('economic', see Notes). The final option 'raw'
+        (added in SciPy 0.11) makes the function return two matrices
+        (Q, TAU) in the internal format used by LAPACK.
+    pivoting : bool, optional
+        Whether or not factorization should include pivoting for rank-revealing
+        qr decomposition. If pivoting, compute the decomposition
+        ``A[:, P] = Q @ R`` as above, but where P is chosen such that the
+        diagonal of R is non-increasing. Equivalently, albeit less efficiently,
+        an explicit P matrix may be formed explicitly by permuting the rows or columns
+        (depending on the side of the equation on which it is to be used) of
+        an identity matrix. See Examples.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    Q : float or complex ndarray
+        Of shape (M, M), or (M, K) for ``mode='economic'``. Not returned
+        if ``mode='r'``. Replaced by tuple ``(Q, TAU)`` if ``mode='raw'``.
+    R : float or complex ndarray
+        Of shape (M, N), or (K, N) for ``mode in ['economic', 'raw']``.
+        ``K = min(M, N)``.
+    P : int ndarray
+        Of shape (N,) for ``pivoting=True``. Not returned if
+        ``pivoting=False``.
+
+    Raises
+    ------
+    LinAlgError
+        Raised if decomposition fails
+
+    Notes
+    -----
+    This is an interface to the LAPACK routines dgeqrf, zgeqrf,
+    dorgqr, zungqr, dgeqp3, and zgeqp3.
+
+    If ``mode=economic``, the shapes of Q and R are (M, K) and (K, N) instead
+    of (M,M) and (M,N), with ``K=min(M,N)``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> rng = np.random.default_rng()
+    >>> a = rng.standard_normal((9, 6))
+
+    >>> q, r = linalg.qr(a)
+    >>> np.allclose(a, np.dot(q, r))
+    True
+    >>> q.shape, r.shape
+    ((9, 9), (9, 6))
+
+    >>> r2 = linalg.qr(a, mode='r')
+    >>> np.allclose(r, r2)
+    True
+
+    >>> q3, r3 = linalg.qr(a, mode='economic')
+    >>> q3.shape, r3.shape
+    ((9, 6), (6, 6))
+
+    >>> q4, r4, p4 = linalg.qr(a, pivoting=True)
+    >>> d = np.abs(np.diag(r4))
+    >>> np.all(d[1:] <= d[:-1])
+    True
+    >>> np.allclose(a[:, p4], np.dot(q4, r4))
+    True
+    >>> P = np.eye(p4.size)[p4]
+    >>> np.allclose(a, np.dot(q4, r4) @ P)
+    True
+    >>> np.allclose(a @ P.T, np.dot(q4, r4))
+    True
+    >>> q4.shape, r4.shape, p4.shape
+    ((9, 9), (9, 6), (6,))
+
+    >>> q5, r5, p5 = linalg.qr(a, mode='economic', pivoting=True)
+    >>> q5.shape, r5.shape, p5.shape
+    ((9, 6), (6, 6), (6,))
+    >>> P = np.eye(6)[:, p5]
+    >>> np.allclose(a @ P, np.dot(q5, r5))
+    True
+
+    """
+    # 'qr' was the old default, equivalent to 'full'. Neither 'full' nor
+    # 'qr' are used below.
+    # 'raw' is used internally by qr_multiply
+    if mode not in ['full', 'qr', 'r', 'economic', 'raw']:
+        raise ValueError("Mode argument should be one of ['full', 'r', "
+                         "'economic', 'raw']")
+
+    if check_finite:
+        a1 = np.asarray_chkfinite(a)
+    else:
+        a1 = np.asarray(a)
+    if len(a1.shape) != 2:
+        raise ValueError("expected a 2-D array")
+
+    M, N = a1.shape
+
+    # accommodate empty arrays
+    if a1.size == 0:
+        K = min(M, N)
+
+        if mode not in ['economic', 'raw']:
+            Q = np.empty_like(a1, shape=(M, M))
+            Q[...] = np.identity(M)
+            R = np.empty_like(a1)
+        else:
+            Q = np.empty_like(a1, shape=(M, K))
+            R = np.empty_like(a1, shape=(K, N))
+
+        if pivoting:
+            Rj = R, np.arange(N, dtype=np.int32)
+        else:
+            Rj = R,
+
+        if mode == 'r':
+            return Rj
+        elif mode == 'raw':
+            qr = np.empty_like(a1, shape=(M, N))
+            tau = np.zeros_like(a1, shape=(K,))
+            return ((qr, tau),) + Rj
+        return (Q,) + Rj
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+
+    if pivoting:
+        geqp3, = get_lapack_funcs(('geqp3',), (a1,))
+        qr, jpvt, tau = safecall(geqp3, "geqp3", a1, overwrite_a=overwrite_a)
+        jpvt -= 1  # geqp3 returns a 1-based index array, so subtract 1
+    else:
+        geqrf, = get_lapack_funcs(('geqrf',), (a1,))
+        qr, tau = safecall(geqrf, "geqrf", a1, lwork=lwork,
+                           overwrite_a=overwrite_a)
+
+    if mode not in ['economic', 'raw'] or M < N:
+        R = np.triu(qr)
+    else:
+        R = np.triu(qr[:N, :])
+
+    if pivoting:
+        Rj = R, jpvt
+    else:
+        Rj = R,
+
+    if mode == 'r':
+        return Rj
+    elif mode == 'raw':
+        return ((qr, tau),) + Rj
+
+    gor_un_gqr, = get_lapack_funcs(('orgqr',), (qr,))
+
+    if M < N:
+        Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qr[:, :M], tau,
+                      lwork=lwork, overwrite_a=1)
+    elif mode == 'economic':
+        Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qr, tau, lwork=lwork,
+                      overwrite_a=1)
+    else:
+        t = qr.dtype.char
+        qqr = np.empty((M, M), dtype=t)
+        qqr[:, :N] = qr
+        Q, = safecall(gor_un_gqr, "gorgqr/gungqr", qqr, tau, lwork=lwork,
+                      overwrite_a=1)
+
+    return (Q,) + Rj
+
+
+def qr_multiply(a, c, mode='right', pivoting=False, conjugate=False,
+                overwrite_a=False, overwrite_c=False):
+    """
+    Calculate the QR decomposition and multiply Q with a matrix.
+
+    Calculate the decomposition ``A = Q R`` where Q is unitary/orthogonal
+    and R upper triangular. Multiply Q with a vector or a matrix c.
+
+    Parameters
+    ----------
+    a : (M, N), array_like
+        Input array
+    c : array_like
+        Input array to be multiplied by ``q``.
+    mode : {'left', 'right'}, optional
+        ``Q @ c`` is returned if mode is 'left', ``c @ Q`` is returned if
+        mode is 'right'.
+        The shape of c must be appropriate for the matrix multiplications,
+        if mode is 'left', ``min(a.shape) == c.shape[0]``,
+        if mode is 'right', ``a.shape[0] == c.shape[1]``.
+    pivoting : bool, optional
+        Whether or not factorization should include pivoting for rank-revealing
+        qr decomposition, see the documentation of qr.
+    conjugate : bool, optional
+        Whether Q should be complex-conjugated. This might be faster
+        than explicit conjugation.
+    overwrite_a : bool, optional
+        Whether data in a is overwritten (may improve performance)
+    overwrite_c : bool, optional
+        Whether data in c is overwritten (may improve performance).
+        If this is used, c must be big enough to keep the result,
+        i.e. ``c.shape[0]`` = ``a.shape[0]`` if mode is 'left'.
+
+    Returns
+    -------
+    CQ : ndarray
+        The product of ``Q`` and ``c``.
+    R : (K, N), ndarray
+        R array of the resulting QR factorization where ``K = min(M, N)``.
+    P : (N,) ndarray
+        Integer pivot array. Only returned when ``pivoting=True``.
+
+    Raises
+    ------
+    LinAlgError
+        Raised if QR decomposition fails.
+
+    Notes
+    -----
+    This is an interface to the LAPACK routines ``?GEQRF``, ``?ORMQR``,
+    ``?UNMQR``, and ``?GEQP3``.
+
+    .. versionadded:: 0.11.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import qr_multiply, qr
+    >>> A = np.array([[1, 3, 3], [2, 3, 2], [2, 3, 3], [1, 3, 2]])
+    >>> qc, r1, piv1 = qr_multiply(A, 2*np.eye(4), pivoting=1)
+    >>> qc
+    array([[-1.,  1., -1.],
+           [-1., -1.,  1.],
+           [-1., -1., -1.],
+           [-1.,  1.,  1.]])
+    >>> r1
+    array([[-6., -3., -5.            ],
+           [ 0., -1., -1.11022302e-16],
+           [ 0.,  0., -1.            ]])
+    >>> piv1
+    array([1, 0, 2], dtype=int32)
+    >>> q2, r2, piv2 = qr(A, mode='economic', pivoting=1)
+    >>> np.allclose(2*q2 - qc, np.zeros((4, 3)))
+    True
+
+    """
+    if mode not in ['left', 'right']:
+        raise ValueError("Mode argument can only be 'left' or 'right' but "
+                         f"not '{mode}'")
+    c = np.asarray_chkfinite(c)
+    if c.ndim < 2:
+        onedim = True
+        c = np.atleast_2d(c)
+        if mode == "left":
+            c = c.T
+    else:
+        onedim = False
+
+    a = np.atleast_2d(np.asarray(a))  # chkfinite done in qr
+    M, N = a.shape
+
+    if mode == 'left':
+        if c.shape[0] != min(M, N + overwrite_c*(M-N)):
+            raise ValueError('Array shapes are not compatible for Q @ c'
+                             f' operation: {a.shape} vs {c.shape}')
+    else:
+        if M != c.shape[1]:
+            raise ValueError('Array shapes are not compatible for c @ Q'
+                             f' operation: {c.shape} vs {a.shape}')
+
+    raw = qr(a, overwrite_a, None, "raw", pivoting)
+    Q, tau = raw[0]
+
+    # accommodate empty arrays
+    if c.size == 0:
+        return (np.empty_like(c),) + raw[1:]
+
+    gor_un_mqr, = get_lapack_funcs(('ormqr',), (Q,))
+    if gor_un_mqr.typecode in ('s', 'd'):
+        trans = "T"
+    else:
+        trans = "C"
+
+    Q = Q[:, :min(M, N)]
+    if M > N and mode == "left" and not overwrite_c:
+        if conjugate:
+            cc = np.zeros((c.shape[1], M), dtype=c.dtype, order="F")
+            cc[:, :N] = c.T
+        else:
+            cc = np.zeros((M, c.shape[1]), dtype=c.dtype, order="F")
+            cc[:N, :] = c
+            trans = "N"
+        if conjugate:
+            lr = "R"
+        else:
+            lr = "L"
+        overwrite_c = True
+    elif c.flags["C_CONTIGUOUS"] and trans == "T" or conjugate:
+        cc = c.T
+        if mode == "left":
+            lr = "R"
+        else:
+            lr = "L"
+    else:
+        trans = "N"
+        cc = c
+        if mode == "left":
+            lr = "L"
+        else:
+            lr = "R"
+    cQ, = safecall(gor_un_mqr, "gormqr/gunmqr", lr, trans, Q, tau, cc,
+                   overwrite_c=overwrite_c)
+    if trans != "N":
+        cQ = cQ.T
+    if mode == "right":
+        cQ = cQ[:, :min(M, N)]
+    if onedim:
+        cQ = cQ.ravel()
+
+    return (cQ,) + raw[1:]
+
+
+def rq(a, overwrite_a=False, lwork=None, mode='full', check_finite=True):
+    """
+    Compute RQ decomposition of a matrix.
+
+    Calculate the decomposition ``A = R Q`` where Q is unitary/orthogonal
+    and R upper triangular.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to be decomposed
+    overwrite_a : bool, optional
+        Whether data in a is overwritten (may improve performance)
+    lwork : int, optional
+        Work array size, lwork >= a.shape[1]. If None or -1, an optimal size
+        is computed.
+    mode : {'full', 'r', 'economic'}, optional
+        Determines what information is to be returned: either both Q and R
+        ('full', default), only R ('r') or both Q and R but computed in
+        economy-size ('economic', see Notes).
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    R : float or complex ndarray
+        Of shape (M, N) or (M, K) for ``mode='economic'``. ``K = min(M, N)``.
+    Q : float or complex ndarray
+        Of shape (N, N) or (K, N) for ``mode='economic'``. Not returned
+        if ``mode='r'``.
+
+    Raises
+    ------
+    LinAlgError
+        If decomposition fails.
+
+    Notes
+    -----
+    This is an interface to the LAPACK routines sgerqf, dgerqf, cgerqf, zgerqf,
+    sorgrq, dorgrq, cungrq and zungrq.
+
+    If ``mode=economic``, the shapes of Q and R are (K, N) and (M, K) instead
+    of (N,N) and (M,N), with ``K=min(M,N)``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> rng = np.random.default_rng()
+    >>> a = rng.standard_normal((6, 9))
+    >>> r, q = linalg.rq(a)
+    >>> np.allclose(a, r @ q)
+    True
+    >>> r.shape, q.shape
+    ((6, 9), (9, 9))
+    >>> r2 = linalg.rq(a, mode='r')
+    >>> np.allclose(r, r2)
+    True
+    >>> r3, q3 = linalg.rq(a, mode='economic')
+    >>> r3.shape, q3.shape
+    ((6, 6), (6, 9))
+
+    """
+    if mode not in ['full', 'r', 'economic']:
+        raise ValueError(
+                 "Mode argument should be one of ['full', 'r', 'economic']")
+
+    if check_finite:
+        a1 = np.asarray_chkfinite(a)
+    else:
+        a1 = np.asarray(a)
+    if len(a1.shape) != 2:
+        raise ValueError('expected matrix')
+
+    M, N = a1.shape
+
+    # accommodate empty arrays
+    if a1.size == 0:
+        K = min(M, N)
+
+        if not mode == 'economic':
+            R = np.empty_like(a1)
+            Q = np.empty_like(a1, shape=(N, N))
+            Q[...] = np.identity(N)
+        else:
+            R = np.empty_like(a1, shape=(M, K))
+            Q = np.empty_like(a1, shape=(K, N))
+
+        if mode == 'r':
+            return R
+        return R, Q
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+
+    gerqf, = get_lapack_funcs(('gerqf',), (a1,))
+    rq, tau = safecall(gerqf, 'gerqf', a1, lwork=lwork,
+                       overwrite_a=overwrite_a)
+    if not mode == 'economic' or N < M:
+        R = np.triu(rq, N-M)
+    else:
+        R = np.triu(rq[-M:, -M:])
+
+    if mode == 'r':
+        return R
+
+    gor_un_grq, = get_lapack_funcs(('orgrq',), (rq,))
+
+    if N < M:
+        Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq[-N:], tau, lwork=lwork,
+                      overwrite_a=1)
+    elif mode == 'economic':
+        Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq, tau, lwork=lwork,
+                      overwrite_a=1)
+    else:
+        rq1 = np.empty((N, N), dtype=rq.dtype)
+        rq1[-M:] = rq
+        Q, = safecall(gor_un_grq, "gorgrq/gungrq", rq1, tau, lwork=lwork,
+                      overwrite_a=1)
+
+    return R, Q
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py
new file mode 100644
index 0000000000000000000000000000000000000000..39361f172df7f1985c7ed0fbc4d919b5c4545725
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_qz.py
@@ -0,0 +1,449 @@
+import warnings
+
+import numpy as np
+from numpy import asarray_chkfinite
+from ._misc import LinAlgError, _datacopied, LinAlgWarning
+from .lapack import get_lapack_funcs
+
+
+__all__ = ['qz', 'ordqz']
+
+_double_precision = ['i', 'l', 'd']
+
+
+def _select_function(sort):
+    if callable(sort):
+        # assume the user knows what they're doing
+        sfunction = sort
+    elif sort == 'lhp':
+        sfunction = _lhp
+    elif sort == 'rhp':
+        sfunction = _rhp
+    elif sort == 'iuc':
+        sfunction = _iuc
+    elif sort == 'ouc':
+        sfunction = _ouc
+    else:
+        raise ValueError("sort parameter must be None, a callable, or "
+                         "one of ('lhp','rhp','iuc','ouc')")
+
+    return sfunction
+
+
+def _lhp(x, y):
+    out = np.empty_like(x, dtype=bool)
+    nonzero = (y != 0)
+    # handles (x, y) = (0, 0) too
+    out[~nonzero] = False
+    out[nonzero] = (np.real(x[nonzero]/y[nonzero]) < 0.0)
+    return out
+
+
+def _rhp(x, y):
+    out = np.empty_like(x, dtype=bool)
+    nonzero = (y != 0)
+    # handles (x, y) = (0, 0) too
+    out[~nonzero] = False
+    out[nonzero] = (np.real(x[nonzero]/y[nonzero]) > 0.0)
+    return out
+
+
+def _iuc(x, y):
+    out = np.empty_like(x, dtype=bool)
+    nonzero = (y != 0)
+    # handles (x, y) = (0, 0) too
+    out[~nonzero] = False
+    out[nonzero] = (abs(x[nonzero]/y[nonzero]) < 1.0)
+    return out
+
+
+def _ouc(x, y):
+    out = np.empty_like(x, dtype=bool)
+    xzero = (x == 0)
+    yzero = (y == 0)
+    out[xzero & yzero] = False
+    out[~xzero & yzero] = True
+    out[~yzero] = (abs(x[~yzero]/y[~yzero]) > 1.0)
+    return out
+
+
+def _qz(A, B, output='real', lwork=None, sort=None, overwrite_a=False,
+        overwrite_b=False, check_finite=True):
+    if sort is not None:
+        # Disabled due to segfaults on win32, see ticket 1717.
+        raise ValueError("The 'sort' input of qz() has to be None and will be "
+                         "removed in a future release. Use ordqz instead.")
+
+    if output not in ['real', 'complex', 'r', 'c']:
+        raise ValueError("argument must be 'real', or 'complex'")
+
+    if check_finite:
+        a1 = asarray_chkfinite(A)
+        b1 = asarray_chkfinite(B)
+    else:
+        a1 = np.asarray(A)
+        b1 = np.asarray(B)
+
+    a_m, a_n = a1.shape
+    b_m, b_n = b1.shape
+    if not (a_m == a_n == b_m == b_n):
+        raise ValueError("Array dimensions must be square and agree")
+
+    typa = a1.dtype.char
+    if output in ['complex', 'c'] and typa not in ['F', 'D']:
+        if typa in _double_precision:
+            a1 = a1.astype('D')
+            typa = 'D'
+        else:
+            a1 = a1.astype('F')
+            typa = 'F'
+    typb = b1.dtype.char
+    if output in ['complex', 'c'] and typb not in ['F', 'D']:
+        if typb in _double_precision:
+            b1 = b1.astype('D')
+            typb = 'D'
+        else:
+            b1 = b1.astype('F')
+            typb = 'F'
+
+    overwrite_a = overwrite_a or (_datacopied(a1, A))
+    overwrite_b = overwrite_b or (_datacopied(b1, B))
+
+    gges, = get_lapack_funcs(('gges',), (a1, b1))
+
+    if lwork is None or lwork == -1:
+        # get optimal work array size
+        result = gges(lambda x: None, a1, b1, lwork=-1)
+        lwork = result[-2][0].real.astype(int)
+
+    def sfunction(x):
+        return None
+    result = gges(sfunction, a1, b1, lwork=lwork, overwrite_a=overwrite_a,
+                  overwrite_b=overwrite_b, sort_t=0)
+
+    info = result[-1]
+    if info < 0:
+        raise ValueError(f"Illegal value in argument {-info} of gges")
+    elif info > 0 and info <= a_n:
+        warnings.warn("The QZ iteration failed. (a,b) are not in Schur "
+                      "form, but ALPHAR(j), ALPHAI(j), and BETA(j) should be "
+                      f"correct for J={info-1},...,N", LinAlgWarning,
+                      stacklevel=3)
+    elif info == a_n+1:
+        raise LinAlgError("Something other than QZ iteration failed")
+    elif info == a_n+2:
+        raise LinAlgError("After reordering, roundoff changed values of some "
+                          "complex eigenvalues so that leading eigenvalues "
+                          "in the Generalized Schur form no longer satisfy "
+                          "sort=True. This could also be due to scaling.")
+    elif info == a_n+3:
+        raise LinAlgError("Reordering failed in tgsen")
+
+    return result, gges.typecode
+
+
+def qz(A, B, output='real', lwork=None, sort=None, overwrite_a=False,
+       overwrite_b=False, check_finite=True):
+    """
+    QZ decomposition for generalized eigenvalues of a pair of matrices.
+
+    The QZ, or generalized Schur, decomposition for a pair of n-by-n
+    matrices (A,B) is::
+
+        (A,B) = (Q @ AA @ Z*, Q @ BB @ Z*)
+
+    where AA, BB is in generalized Schur form if BB is upper-triangular
+    with non-negative diagonal and AA is upper-triangular, or for real QZ
+    decomposition (``output='real'``) block upper triangular with 1x1
+    and 2x2 blocks. In this case, the 1x1 blocks correspond to real
+    generalized eigenvalues and 2x2 blocks are 'standardized' by making
+    the corresponding elements of BB have the form::
+
+        [ a 0 ]
+        [ 0 b ]
+
+    and the pair of corresponding 2x2 blocks in AA and BB will have a complex
+    conjugate pair of generalized eigenvalues. If (``output='complex'``) or
+    A and B are complex matrices, Z' denotes the conjugate-transpose of Z.
+    Q and Z are unitary matrices.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        2-D array to decompose
+    B : (N, N) array_like
+        2-D array to decompose
+    output : {'real', 'complex'}, optional
+        Construct the real or complex QZ decomposition for real matrices.
+        Default is 'real'.
+    lwork : int, optional
+        Work array size. If None or -1, it is automatically computed.
+    sort : {None, callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional
+        NOTE: THIS INPUT IS DISABLED FOR NOW. Use ordqz instead.
+
+        Specifies whether the upper eigenvalues should be sorted. A callable
+        may be passed that, given a eigenvalue, returns a boolean denoting
+        whether the eigenvalue should be sorted to the top-left (True). For
+        real matrix pairs, the sort function takes three real arguments
+        (alphar, alphai, beta). The eigenvalue
+        ``x = (alphar + alphai*1j)/beta``. For complex matrix pairs or
+        output='complex', the sort function takes two complex arguments
+        (alpha, beta). The eigenvalue ``x = (alpha/beta)``.  Alternatively,
+        string parameters may be used:
+
+            - 'lhp'   Left-hand plane (x.real < 0.0)
+            - 'rhp'   Right-hand plane (x.real > 0.0)
+            - 'iuc'   Inside the unit circle (x*x.conjugate() < 1.0)
+            - 'ouc'   Outside the unit circle (x*x.conjugate() > 1.0)
+
+        Defaults to None (no sorting).
+    overwrite_a : bool, optional
+        Whether to overwrite data in a (may improve performance)
+    overwrite_b : bool, optional
+        Whether to overwrite data in b (may improve performance)
+    check_finite : bool, optional
+        If true checks the elements of `A` and `B` are finite numbers. If
+        false does no checking and passes matrix through to
+        underlying algorithm.
+
+    Returns
+    -------
+    AA : (N, N) ndarray
+        Generalized Schur form of A.
+    BB : (N, N) ndarray
+        Generalized Schur form of B.
+    Q : (N, N) ndarray
+        The left Schur vectors.
+    Z : (N, N) ndarray
+        The right Schur vectors.
+
+    See Also
+    --------
+    ordqz
+
+    Notes
+    -----
+    Q is transposed versus the equivalent function in Matlab.
+
+    .. versionadded:: 0.11.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import qz
+
+    >>> A = np.array([[1, 2, -1], [5, 5, 5], [2, 4, -8]])
+    >>> B = np.array([[1, 1, -3], [3, 1, -1], [5, 6, -2]])
+
+    Compute the decomposition.  The QZ decomposition is not unique, so
+    depending on the underlying library that is used, there may be
+    differences in the signs of coefficients in the following output.
+
+    >>> AA, BB, Q, Z = qz(A, B)
+    >>> AA
+    array([[-1.36949157, -4.05459025,  7.44389431],
+           [ 0.        ,  7.65653432,  5.13476017],
+           [ 0.        , -0.65978437,  2.4186015 ]])  # may vary
+    >>> BB
+    array([[ 1.71890633, -1.64723705, -0.72696385],
+           [ 0.        ,  8.6965692 , -0.        ],
+           [ 0.        ,  0.        ,  2.27446233]])  # may vary
+    >>> Q
+    array([[-0.37048362,  0.1903278 ,  0.90912992],
+           [-0.90073232,  0.16534124, -0.40167593],
+           [ 0.22676676,  0.96769706, -0.11017818]])  # may vary
+    >>> Z
+    array([[-0.67660785,  0.63528924, -0.37230283],
+           [ 0.70243299,  0.70853819, -0.06753907],
+           [ 0.22088393, -0.30721526, -0.92565062]])  # may vary
+
+    Verify the QZ decomposition.  With real output, we only need the
+    transpose of ``Z`` in the following expressions.
+
+    >>> Q @ AA @ Z.T  # Should be A
+    array([[ 1.,  2., -1.],
+           [ 5.,  5.,  5.],
+           [ 2.,  4., -8.]])
+    >>> Q @ BB @ Z.T  # Should be B
+    array([[ 1.,  1., -3.],
+           [ 3.,  1., -1.],
+           [ 5.,  6., -2.]])
+
+    Repeat the decomposition, but with ``output='complex'``.
+
+    >>> AA, BB, Q, Z = qz(A, B, output='complex')
+
+    For conciseness in the output, we use ``np.set_printoptions()`` to set
+    the output precision of NumPy arrays to 3 and display tiny values as 0.
+
+    >>> np.set_printoptions(precision=3, suppress=True)
+    >>> AA
+    array([[-1.369+0.j   ,  2.248+4.237j,  4.861-5.022j],
+           [ 0.   +0.j   ,  7.037+2.922j,  0.794+4.932j],
+           [ 0.   +0.j   ,  0.   +0.j   ,  2.655-1.103j]])  # may vary
+    >>> BB
+    array([[ 1.719+0.j   , -1.115+1.j   , -0.763-0.646j],
+           [ 0.   +0.j   ,  7.24 +0.j   , -3.144+3.322j],
+           [ 0.   +0.j   ,  0.   +0.j   ,  2.732+0.j   ]])  # may vary
+    >>> Q
+    array([[ 0.326+0.175j, -0.273-0.029j, -0.886-0.052j],
+           [ 0.794+0.426j, -0.093+0.134j,  0.402-0.02j ],
+           [-0.2  -0.107j, -0.816+0.482j,  0.151-0.167j]])  # may vary
+    >>> Z
+    array([[ 0.596+0.32j , -0.31 +0.414j,  0.393-0.347j],
+           [-0.619-0.332j, -0.479+0.314j,  0.154-0.393j],
+           [-0.195-0.104j,  0.576+0.27j ,  0.715+0.187j]])  # may vary
+
+    With complex arrays, we must use ``Z.conj().T`` in the following
+    expressions to verify the decomposition.
+
+    >>> Q @ AA @ Z.conj().T  # Should be A
+    array([[ 1.-0.j,  2.-0.j, -1.-0.j],
+           [ 5.+0.j,  5.+0.j,  5.-0.j],
+           [ 2.+0.j,  4.+0.j, -8.+0.j]])
+    >>> Q @ BB @ Z.conj().T  # Should be B
+    array([[ 1.+0.j,  1.+0.j, -3.+0.j],
+           [ 3.-0.j,  1.-0.j, -1.+0.j],
+           [ 5.+0.j,  6.+0.j, -2.+0.j]])
+
+    """
+    # output for real
+    # AA, BB, sdim, alphar, alphai, beta, vsl, vsr, work, info
+    # output for complex
+    # AA, BB, sdim, alpha, beta, vsl, vsr, work, info
+    result, _ = _qz(A, B, output=output, lwork=lwork, sort=sort,
+                    overwrite_a=overwrite_a, overwrite_b=overwrite_b,
+                    check_finite=check_finite)
+    return result[0], result[1], result[-4], result[-3]
+
+
+def ordqz(A, B, sort='lhp', output='real', overwrite_a=False,
+          overwrite_b=False, check_finite=True):
+    """QZ decomposition for a pair of matrices with reordering.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        2-D array to decompose
+    B : (N, N) array_like
+        2-D array to decompose
+    sort : {callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional
+        Specifies whether the upper eigenvalues should be sorted. A
+        callable may be passed that, given an ordered pair ``(alpha,
+        beta)`` representing the eigenvalue ``x = (alpha/beta)``,
+        returns a boolean denoting whether the eigenvalue should be
+        sorted to the top-left (True). For the real matrix pairs
+        ``beta`` is real while ``alpha`` can be complex, and for
+        complex matrix pairs both ``alpha`` and ``beta`` can be
+        complex. The callable must be able to accept a NumPy
+        array. Alternatively, string parameters may be used:
+
+            - 'lhp'   Left-hand plane (x.real < 0.0)
+            - 'rhp'   Right-hand plane (x.real > 0.0)
+            - 'iuc'   Inside the unit circle (x*x.conjugate() < 1.0)
+            - 'ouc'   Outside the unit circle (x*x.conjugate() > 1.0)
+
+        With the predefined sorting functions, an infinite eigenvalue
+        (i.e., ``alpha != 0`` and ``beta = 0``) is considered to lie in
+        neither the left-hand nor the right-hand plane, but it is
+        considered to lie outside the unit circle. For the eigenvalue
+        ``(alpha, beta) = (0, 0)``, the predefined sorting functions
+        all return `False`.
+    output : str {'real','complex'}, optional
+        Construct the real or complex QZ decomposition for real matrices.
+        Default is 'real'.
+    overwrite_a : bool, optional
+        If True, the contents of A are overwritten.
+    overwrite_b : bool, optional
+        If True, the contents of B are overwritten.
+    check_finite : bool, optional
+        If true checks the elements of `A` and `B` are finite numbers. If
+        false does no checking and passes matrix through to
+        underlying algorithm.
+
+    Returns
+    -------
+    AA : (N, N) ndarray
+        Generalized Schur form of A.
+    BB : (N, N) ndarray
+        Generalized Schur form of B.
+    alpha : (N,) ndarray
+        alpha = alphar + alphai * 1j. See notes.
+    beta : (N,) ndarray
+        See notes.
+    Q : (N, N) ndarray
+        The left Schur vectors.
+    Z : (N, N) ndarray
+        The right Schur vectors.
+
+    See Also
+    --------
+    qz
+
+    Notes
+    -----
+    On exit, ``(ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N``, will be the
+    generalized eigenvalues.  ``ALPHAR(j) + ALPHAI(j)*i`` and
+    ``BETA(j),j=1,...,N`` are the diagonals of the complex Schur form (S,T)
+    that would result if the 2-by-2 diagonal blocks of the real generalized
+    Schur form of (A,B) were further reduced to triangular form using complex
+    unitary transformations. If ALPHAI(j) is zero, then the jth eigenvalue is
+    real; if positive, then the ``j``\\ th and ``(j+1)``\\ st eigenvalues are a
+    complex conjugate pair, with ``ALPHAI(j+1)`` negative.
+
+    .. versionadded:: 0.17.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import ordqz
+    >>> A = np.array([[2, 5, 8, 7], [5, 2, 2, 8], [7, 5, 6, 6], [5, 4, 4, 8]])
+    >>> B = np.array([[0, 6, 0, 0], [5, 0, 2, 1], [5, 2, 6, 6], [4, 7, 7, 7]])
+    >>> AA, BB, alpha, beta, Q, Z = ordqz(A, B, sort='lhp')
+
+    Since we have sorted for left half plane eigenvalues, negatives come first
+
+    >>> (alpha/beta).real < 0
+    array([ True,  True, False, False], dtype=bool)
+
+    """
+    (AA, BB, _, *ab, Q, Z, _, _), typ = _qz(A, B, output=output, sort=None,
+                                            overwrite_a=overwrite_a,
+                                            overwrite_b=overwrite_b,
+                                            check_finite=check_finite)
+
+    if typ == 's':
+        alpha, beta = ab[0] + ab[1]*np.complex64(1j), ab[2]
+    elif typ == 'd':
+        alpha, beta = ab[0] + ab[1]*1.j, ab[2]
+    else:
+        alpha, beta = ab
+
+    sfunction = _select_function(sort)
+    select = sfunction(alpha, beta)
+
+    tgsen = get_lapack_funcs('tgsen', (AA, BB))
+    # the real case needs 4n + 16 lwork
+    lwork = 4*AA.shape[0] + 16 if typ in 'sd' else 1
+    AAA, BBB, *ab, QQ, ZZ, _, _, _, _, info = tgsen(select, AA, BB, Q, Z,
+                                                    ijob=0,
+                                                    lwork=lwork, liwork=1)
+
+    # Once more for tgsen output
+    if typ == 's':
+        alpha, beta = ab[0] + ab[1]*np.complex64(1j), ab[2]
+    elif typ == 'd':
+        alpha, beta = ab[0] + ab[1]*1.j, ab[2]
+    else:
+        alpha, beta = ab
+
+    if info < 0:
+        raise ValueError(f"Illegal value in argument {-info} of tgsen")
+    elif info == 1:
+        raise ValueError("Reordering of (A, B) failed because the transformed"
+                         " matrix pair (A, B) would be too far from "
+                         "generalized Schur form; the problem is very "
+                         "ill-conditioned. (A, B) may have been partially "
+                         "reordered.")
+
+    return AAA, BBB, alpha, beta, QQ, ZZ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py
new file mode 100644
index 0000000000000000000000000000000000000000..8609a175e16d663938386c6b45d190cd0e5dafd8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_schur.py
@@ -0,0 +1,334 @@
+"""Schur decomposition functions."""
+import numpy as np
+from numpy import asarray_chkfinite, single, asarray, array
+from numpy.linalg import norm
+
+
+# Local imports.
+from ._misc import LinAlgError, _datacopied
+from .lapack import get_lapack_funcs
+from ._decomp import eigvals
+
+__all__ = ['schur', 'rsf2csf']
+
+_double_precision = ['i', 'l', 'd']
+
+
+def schur(a, output='real', lwork=None, overwrite_a=False, sort=None,
+          check_finite=True):
+    """
+    Compute Schur decomposition of a matrix.
+
+    The Schur decomposition is::
+
+        A = Z T Z^H
+
+    where Z is unitary and T is either upper-triangular, or for real
+    Schur decomposition (output='real'), quasi-upper triangular. In
+    the quasi-triangular form, 2x2 blocks describing complex-valued
+    eigenvalue pairs may extrude from the diagonal.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Matrix to decompose
+    output : {'real', 'complex'}, optional
+        When the dtype of `a` is real, this specifies whether to compute
+        the real or complex Schur decomposition.
+        When the dtype of `a` is complex, this argument is ignored, and the
+        complex Schur decomposition is computed.
+    lwork : int, optional
+        Work array size. If None or -1, it is automatically computed.
+    overwrite_a : bool, optional
+        Whether to overwrite data in a (may improve performance).
+    sort : {None, callable, 'lhp', 'rhp', 'iuc', 'ouc'}, optional
+        Specifies whether the upper eigenvalues should be sorted. A callable
+        may be passed that, given an eigenvalue, returns a boolean denoting
+        whether the eigenvalue should be sorted to the top-left (True).
+
+        - If ``output='complex'`` OR the dtype of `a` is complex, the callable
+          should have one argument: the eigenvalue expressed as a complex number.
+        - If ``output='real'`` AND the dtype of `a` is real, the callable should have
+          two arguments: the real and imaginary parts of the eigenvalue, respectively.
+
+        Alternatively, string parameters may be used::
+
+            'lhp'   Left-hand plane (real(eigenvalue) < 0.0)
+            'rhp'   Right-hand plane (real(eigenvalue) >= 0.0)
+            'iuc'   Inside the unit circle (abs(eigenvalue) <= 1.0)
+            'ouc'   Outside the unit circle (abs(eigenvalue) > 1.0)
+
+        Defaults to None (no sorting).
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    T : (M, M) ndarray
+        Schur form of A. It is real-valued for the real Schur decomposition.
+    Z : (M, M) ndarray
+        An unitary Schur transformation matrix for A.
+        It is real-valued for the real Schur decomposition.
+    sdim : int
+        If and only if sorting was requested, a third return value will
+        contain the number of eigenvalues satisfying the sort condition.
+        Note that complex conjugate pairs for which the condition is true
+        for either eigenvalue count as 2.
+
+    Raises
+    ------
+    LinAlgError
+        Error raised under three conditions:
+
+        1. The algorithm failed due to a failure of the QR algorithm to
+           compute all eigenvalues.
+        2. If eigenvalue sorting was requested, the eigenvalues could not be
+           reordered due to a failure to separate eigenvalues, usually because
+           of poor conditioning.
+        3. If eigenvalue sorting was requested, roundoff errors caused the
+           leading eigenvalues to no longer satisfy the sorting condition.
+
+    See Also
+    --------
+    rsf2csf : Convert real Schur form to complex Schur form
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import schur, eigvals
+    >>> A = np.array([[0, 2, 2], [0, 1, 2], [1, 0, 1]])
+    >>> T, Z = schur(A)
+    >>> T
+    array([[ 2.65896708,  1.42440458, -1.92933439],
+           [ 0.        , -0.32948354, -0.49063704],
+           [ 0.        ,  1.31178921, -0.32948354]])
+    >>> Z
+    array([[0.72711591, -0.60156188, 0.33079564],
+           [0.52839428, 0.79801892, 0.28976765],
+           [0.43829436, 0.03590414, -0.89811411]])
+
+    >>> T2, Z2 = schur(A, output='complex')
+    >>> T2
+    array([[ 2.65896708, -1.22839825+1.32378589j,  0.42590089+1.51937378j], # may vary
+           [ 0.        , -0.32948354+0.80225456j, -0.59877807+0.56192146j],
+           [ 0.        ,  0.                    , -0.32948354-0.80225456j]])
+    >>> eigvals(T2)
+    array([2.65896708, -0.32948354+0.80225456j, -0.32948354-0.80225456j])   # may vary
+
+    A custom eigenvalue-sorting condition that sorts by positive imaginary part
+    is satisfied by only one eigenvalue.
+
+    >>> _, _, sdim = schur(A, output='complex', sort=lambda x: x.imag > 1e-15)
+    >>> sdim
+    1
+
+    When ``output='real'`` and the array `a` is real, the `sort` callable must accept
+    the real and imaginary parts as separate arguments. Note that now the complex
+    eigenvalues ``-0.32948354+0.80225456j`` and ``-0.32948354-0.80225456j`` will be
+    treated as a complex conjugate pair, and according to the `sdim` documentation,
+    complex conjugate pairs for which the condition is True for *either* eigenvalue
+    increase `sdim` by *two*.
+
+    >>> _, _, sdim = schur(A, output='real', sort=lambda x, y: y > 1e-15)
+    >>> sdim
+    2
+
+    """
+    if output not in ['real', 'complex', 'r', 'c']:
+        raise ValueError("argument must be 'real', or 'complex'")
+    if check_finite:
+        a1 = asarray_chkfinite(a)
+    else:
+        a1 = asarray(a)
+    if np.issubdtype(a1.dtype, np.integer):
+        a1 = asarray(a, dtype=np.dtype("long"))
+    if len(a1.shape) != 2 or (a1.shape[0] != a1.shape[1]):
+        raise ValueError('expected square matrix')
+
+    typ = a1.dtype.char
+    if output in ['complex', 'c'] and typ not in ['F', 'D']:
+        if typ in _double_precision:
+            a1 = a1.astype('D')
+        else:
+            a1 = a1.astype('F')
+
+    # accommodate empty matrix
+    if a1.size == 0:
+        t0, z0 = schur(np.eye(2, dtype=a1.dtype))
+        if sort is None:
+            return (np.empty_like(a1, dtype=t0.dtype),
+                    np.empty_like(a1, dtype=z0.dtype))
+        else:
+            return (np.empty_like(a1, dtype=t0.dtype),
+                    np.empty_like(a1, dtype=z0.dtype), 0)
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+    gees, = get_lapack_funcs(('gees',), (a1,))
+    if lwork is None or lwork == -1:
+        # get optimal work array
+        result = gees(lambda x: None, a1, lwork=-1)
+        lwork = result[-2][0].real.astype(np.int_)
+
+    if sort is None:
+        sort_t = 0
+        def sfunction(x, y=None):
+            return None
+    else:
+        sort_t = 1
+        if callable(sort):
+            sfunction = sort
+        elif sort == 'lhp':
+            def sfunction(x, y=None):
+                return x.real < 0.0
+        elif sort == 'rhp':
+            def sfunction(x, y=None):
+                return x.real >= 0.0
+        elif sort == 'iuc':
+            def sfunction(x, y=None):
+                z = x if y is None else x + y*1j
+                return abs(z) <= 1.0
+        elif sort == 'ouc':
+            def sfunction(x, y=None):
+                z = x if y is None else x + y*1j
+                return abs(z) > 1.0
+        else:
+            raise ValueError("'sort' parameter must either be 'None', or a "
+                             "callable, or one of ('lhp','rhp','iuc','ouc')")
+
+    result = gees(sfunction, a1, lwork=lwork, overwrite_a=overwrite_a,
+                  sort_t=sort_t)
+
+    info = result[-1]
+    if info < 0:
+        raise ValueError(f'illegal value in {-info}-th argument of internal gees')
+    elif info == a1.shape[0] + 1:
+        raise LinAlgError('Eigenvalues could not be separated for reordering.')
+    elif info == a1.shape[0] + 2:
+        raise LinAlgError('Leading eigenvalues do not satisfy sort condition.')
+    elif info > 0:
+        raise LinAlgError("Schur form not found. Possibly ill-conditioned.")
+
+    if sort is None:
+        return result[0], result[-3]
+    else:
+        return result[0], result[-3], result[1]
+
+
+eps = np.finfo(float).eps
+feps = np.finfo(single).eps
+
+_array_kind = {'b': 0, 'h': 0, 'B': 0, 'i': 0, 'l': 0,
+               'f': 0, 'd': 0, 'F': 1, 'D': 1}
+_array_precision = {'i': 1, 'l': 1, 'f': 0, 'd': 1, 'F': 0, 'D': 1}
+_array_type = [['f', 'd'], ['F', 'D']]
+
+
+def _commonType(*arrays):
+    kind = 0
+    precision = 0
+    for a in arrays:
+        t = a.dtype.char
+        kind = max(kind, _array_kind[t])
+        precision = max(precision, _array_precision[t])
+    return _array_type[kind][precision]
+
+
+def _castCopy(type, *arrays):
+    cast_arrays = ()
+    for a in arrays:
+        if a.dtype.char == type:
+            cast_arrays = cast_arrays + (a.copy(),)
+        else:
+            cast_arrays = cast_arrays + (a.astype(type),)
+    if len(cast_arrays) == 1:
+        return cast_arrays[0]
+    else:
+        return cast_arrays
+
+
+def rsf2csf(T, Z, check_finite=True):
+    """
+    Convert real Schur form to complex Schur form.
+
+    Convert a quasi-diagonal real-valued Schur form to the upper-triangular
+    complex-valued Schur form.
+
+    Parameters
+    ----------
+    T : (M, M) array_like
+        Real Schur form of the original array
+    Z : (M, M) array_like
+        Schur transformation matrix
+    check_finite : bool, optional
+        Whether to check that the input arrays contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    T : (M, M) ndarray
+        Complex Schur form of the original array
+    Z : (M, M) ndarray
+        Schur transformation matrix corresponding to the complex form
+
+    See Also
+    --------
+    schur : Schur decomposition of an array
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import schur, rsf2csf
+    >>> A = np.array([[0, 2, 2], [0, 1, 2], [1, 0, 1]])
+    >>> T, Z = schur(A)
+    >>> T
+    array([[ 2.65896708,  1.42440458, -1.92933439],
+           [ 0.        , -0.32948354, -0.49063704],
+           [ 0.        ,  1.31178921, -0.32948354]])
+    >>> Z
+    array([[0.72711591, -0.60156188, 0.33079564],
+           [0.52839428, 0.79801892, 0.28976765],
+           [0.43829436, 0.03590414, -0.89811411]])
+    >>> T2 , Z2 = rsf2csf(T, Z)
+    >>> T2
+    array([[2.65896708+0.j, -1.64592781+0.743164187j, -1.21516887+1.00660462j],
+           [0.+0.j , -0.32948354+8.02254558e-01j, -0.82115218-2.77555756e-17j],
+           [0.+0.j , 0.+0.j, -0.32948354-0.802254558j]])
+    >>> Z2
+    array([[0.72711591+0.j,  0.28220393-0.31385693j,  0.51319638-0.17258824j],
+           [0.52839428+0.j,  0.24720268+0.41635578j, -0.68079517-0.15118243j],
+           [0.43829436+0.j, -0.76618703+0.01873251j, -0.03063006+0.46857912j]])
+
+    """
+    if check_finite:
+        Z, T = map(asarray_chkfinite, (Z, T))
+    else:
+        Z, T = map(asarray, (Z, T))
+
+    for ind, X in enumerate([Z, T]):
+        if X.ndim != 2 or X.shape[0] != X.shape[1]:
+            raise ValueError(f"Input '{'ZT'[ind]}' must be square.")
+
+    if T.shape[0] != Z.shape[0]:
+        message = f"Input array shapes must match: Z: {Z.shape} vs. T: {T.shape}"
+        raise ValueError(message)
+    N = T.shape[0]
+    t = _commonType(Z, T, array([3.0], 'F'))
+    Z, T = _castCopy(t, Z, T)
+
+    for m in range(N-1, 0, -1):
+        if abs(T[m, m-1]) > eps*(abs(T[m-1, m-1]) + abs(T[m, m])):
+            mu = eigvals(T[m-1:m+1, m-1:m+1]) - T[m, m]
+            r = norm([mu[0], T[m, m-1]])
+            c = mu[0] / r
+            s = T[m, m-1] / r
+            G = array([[c.conj(), s], [-s, c]], dtype=t)
+
+            T[m-1:m+1, m-1:] = G.dot(T[m-1:m+1, m-1:])
+            T[:m+1, m-1:m+1] = T[:m+1, m-1:m+1].dot(G.conj().T)
+            Z[:, m-1:m+1] = Z[:, m-1:m+1].dot(G.conj().T)
+
+        T[m, m-1] = 0.0
+    return T, Z
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py
new file mode 100644
index 0000000000000000000000000000000000000000..98425f6c11e727d582102dce72baeb9cbdb6c40b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_decomp_svd.py
@@ -0,0 +1,534 @@
+"""SVD decomposition functions."""
+import numpy as np
+from numpy import zeros, r_, diag, dot, arccos, arcsin, where, clip
+
+# Local imports.
+from ._misc import LinAlgError, _datacopied
+from .lapack import get_lapack_funcs, _compute_lwork
+from ._decomp import _asarray_validated
+
+__all__ = ['svd', 'svdvals', 'diagsvd', 'orth', 'subspace_angles', 'null_space']
+
+
+def svd(a, full_matrices=True, compute_uv=True, overwrite_a=False,
+        check_finite=True, lapack_driver='gesdd'):
+    """
+    Singular Value Decomposition.
+
+    Factorizes the matrix `a` into two unitary matrices ``U`` and ``Vh``, and
+    a 1-D array ``s`` of singular values (real, non-negative) such that
+    ``a == U @ S @ Vh``, where ``S`` is a suitably shaped matrix of zeros with
+    main diagonal ``s``.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to decompose.
+    full_matrices : bool, optional
+        If True (default), `U` and `Vh` are of shape ``(M, M)``, ``(N, N)``.
+        If False, the shapes are ``(M, K)`` and ``(K, N)``, where
+        ``K = min(M, N)``.
+    compute_uv : bool, optional
+        Whether to compute also ``U`` and ``Vh`` in addition to ``s``.
+        Default is True.
+    overwrite_a : bool, optional
+        Whether to overwrite `a`; may improve performance.
+        Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    lapack_driver : {'gesdd', 'gesvd'}, optional
+        Whether to use the more efficient divide-and-conquer approach
+        (``'gesdd'``) or general rectangular approach (``'gesvd'``)
+        to compute the SVD. MATLAB and Octave use the ``'gesvd'`` approach.
+        Default is ``'gesdd'``.
+
+    Returns
+    -------
+    U : ndarray
+        Unitary matrix having left singular vectors as columns.
+        Of shape ``(M, M)`` or ``(M, K)``, depending on `full_matrices`.
+    s : ndarray
+        The singular values, sorted in non-increasing order.
+        Of shape (K,), with ``K = min(M, N)``.
+    Vh : ndarray
+        Unitary matrix having right singular vectors as rows.
+        Of shape ``(N, N)`` or ``(K, N)`` depending on `full_matrices`.
+
+    For ``compute_uv=False``, only ``s`` is returned.
+
+    Raises
+    ------
+    LinAlgError
+        If SVD computation does not converge.
+
+    See Also
+    --------
+    svdvals : Compute singular values of a matrix.
+    diagsvd : Construct the Sigma matrix, given the vector s.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> rng = np.random.default_rng()
+    >>> m, n = 9, 6
+    >>> a = rng.standard_normal((m, n)) + 1.j*rng.standard_normal((m, n))
+    >>> U, s, Vh = linalg.svd(a)
+    >>> U.shape,  s.shape, Vh.shape
+    ((9, 9), (6,), (6, 6))
+
+    Reconstruct the original matrix from the decomposition:
+
+    >>> sigma = np.zeros((m, n))
+    >>> for i in range(min(m, n)):
+    ...     sigma[i, i] = s[i]
+    >>> a1 = np.dot(U, np.dot(sigma, Vh))
+    >>> np.allclose(a, a1)
+    True
+
+    Alternatively, use ``full_matrices=False`` (notice that the shape of
+    ``U`` is then ``(m, n)`` instead of ``(m, m)``):
+
+    >>> U, s, Vh = linalg.svd(a, full_matrices=False)
+    >>> U.shape, s.shape, Vh.shape
+    ((9, 6), (6,), (6, 6))
+    >>> S = np.diag(s)
+    >>> np.allclose(a, np.dot(U, np.dot(S, Vh)))
+    True
+
+    >>> s2 = linalg.svd(a, compute_uv=False)
+    >>> np.allclose(s, s2)
+    True
+
+    """
+    a1 = _asarray_validated(a, check_finite=check_finite)
+    if len(a1.shape) != 2:
+        raise ValueError('expected matrix')
+    m, n = a1.shape
+
+    # accommodate empty matrix
+    if a1.size == 0:
+        u0, s0, v0 = svd(np.eye(2, dtype=a1.dtype))
+
+        s = np.empty_like(a1, shape=(0,), dtype=s0.dtype)
+        if full_matrices:
+            u = np.empty_like(a1, shape=(m, m), dtype=u0.dtype)
+            u[...] = np.identity(m)
+            v = np.empty_like(a1, shape=(n, n), dtype=v0.dtype)
+            v[...] = np.identity(n)
+        else:
+            u = np.empty_like(a1, shape=(m, 0), dtype=u0.dtype)
+            v = np.empty_like(a1, shape=(0, n), dtype=v0.dtype)
+        if compute_uv:
+            return u, s, v
+        else:
+            return s
+
+    overwrite_a = overwrite_a or (_datacopied(a1, a))
+
+    if not isinstance(lapack_driver, str):
+        raise TypeError('lapack_driver must be a string')
+    if lapack_driver not in ('gesdd', 'gesvd'):
+        message = f'lapack_driver must be "gesdd" or "gesvd", not "{lapack_driver}"'
+        raise ValueError(message)
+
+    if compute_uv:
+        # XXX: revisit int32 when ILP64 lapack becomes a thing
+        max_mn, min_mn = (m, n) if m > n else (n, m)
+        if full_matrices:
+            if max_mn*max_mn > np.iinfo(np.int32).max:
+                raise ValueError(f"Indexing a matrix size {max_mn} x {max_mn} "
+                                  "would incur integer overflow in LAPACK. "
+                                  "Try using numpy.linalg.svd instead.")
+        else:
+            sz = max(m * min_mn, n * min_mn)
+            if max(m * min_mn, n * min_mn) > np.iinfo(np.int32).max:
+                raise ValueError(f"Indexing a matrix of {sz} elements would "
+                                  "incur an in integer overflow in LAPACK. "
+                                  "Try using numpy.linalg.svd instead.")
+
+    funcs = (lapack_driver, lapack_driver + '_lwork')
+    # XXX: As of 1.14.1 it isn't possible to build SciPy with ILP64,
+    # so the following line always yields a LP64 (32-bit pointer size) variant
+    gesXd, gesXd_lwork = get_lapack_funcs(funcs, (a1,), ilp64="preferred")
+
+    # compute optimal lwork
+    lwork = _compute_lwork(gesXd_lwork, a1.shape[0], a1.shape[1],
+                           compute_uv=compute_uv, full_matrices=full_matrices)
+
+    # perform decomposition
+    u, s, v, info = gesXd(a1, compute_uv=compute_uv, lwork=lwork,
+                          full_matrices=full_matrices, overwrite_a=overwrite_a)
+
+    if info > 0:
+        raise LinAlgError("SVD did not converge")
+    if info < 0:
+        raise ValueError('illegal value in %dth argument of internal gesdd'
+                         % -info)
+    if compute_uv:
+        return u, s, v
+    else:
+        return s
+
+
+def svdvals(a, overwrite_a=False, check_finite=True):
+    """
+    Compute singular values of a matrix.
+
+    Parameters
+    ----------
+    a : (M, N) array_like
+        Matrix to decompose.
+    overwrite_a : bool, optional
+        Whether to overwrite `a`; may improve performance.
+        Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    s : (min(M, N),) ndarray
+        The singular values, sorted in decreasing order.
+
+    Raises
+    ------
+    LinAlgError
+        If SVD computation does not converge.
+
+    See Also
+    --------
+    svd : Compute the full singular value decomposition of a matrix.
+    diagsvd : Construct the Sigma matrix, given the vector s.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import svdvals
+    >>> m = np.array([[1.0, 0.0],
+    ...               [2.0, 3.0],
+    ...               [1.0, 1.0],
+    ...               [0.0, 2.0],
+    ...               [1.0, 0.0]])
+    >>> svdvals(m)
+    array([ 4.28091555,  1.63516424])
+
+    We can verify the maximum singular value of `m` by computing the maximum
+    length of `m.dot(u)` over all the unit vectors `u` in the (x,y) plane.
+    We approximate "all" the unit vectors with a large sample. Because
+    of linearity, we only need the unit vectors with angles in [0, pi].
+
+    >>> t = np.linspace(0, np.pi, 2000)
+    >>> u = np.array([np.cos(t), np.sin(t)])
+    >>> np.linalg.norm(m.dot(u), axis=0).max()
+    4.2809152422538475
+
+    `p` is a projection matrix with rank 1. With exact arithmetic,
+    its singular values would be [1, 0, 0, 0].
+
+    >>> v = np.array([0.1, 0.3, 0.9, 0.3])
+    >>> p = np.outer(v, v)
+    >>> svdvals(p)
+    array([  1.00000000e+00,   2.02021698e-17,   1.56692500e-17,
+             8.15115104e-34])
+
+    The singular values of an orthogonal matrix are all 1. Here, we
+    create a random orthogonal matrix by using the `rvs()` method of
+    `scipy.stats.ortho_group`.
+
+    >>> from scipy.stats import ortho_group
+    >>> orth = ortho_group.rvs(4)
+    >>> svdvals(orth)
+    array([ 1.,  1.,  1.,  1.])
+
+    """
+    return svd(a, compute_uv=0, overwrite_a=overwrite_a,
+               check_finite=check_finite)
+
+
+def diagsvd(s, M, N):
+    """
+    Construct the sigma matrix in SVD from singular values and size M, N.
+
+    Parameters
+    ----------
+    s : (M,) or (N,) array_like
+        Singular values
+    M : int
+        Size of the matrix whose singular values are `s`.
+    N : int
+        Size of the matrix whose singular values are `s`.
+
+    Returns
+    -------
+    S : (M, N) ndarray
+        The S-matrix in the singular value decomposition
+
+    See Also
+    --------
+    svd : Singular value decomposition of a matrix
+    svdvals : Compute singular values of a matrix.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import diagsvd
+    >>> vals = np.array([1, 2, 3])  # The array representing the computed svd
+    >>> diagsvd(vals, 3, 4)
+    array([[1, 0, 0, 0],
+           [0, 2, 0, 0],
+           [0, 0, 3, 0]])
+    >>> diagsvd(vals, 4, 3)
+    array([[1, 0, 0],
+           [0, 2, 0],
+           [0, 0, 3],
+           [0, 0, 0]])
+
+    """
+    part = diag(s)
+    typ = part.dtype.char
+    MorN = len(s)
+    if MorN == M:
+        return np.hstack((part, zeros((M, N - M), dtype=typ)))
+    elif MorN == N:
+        return r_[part, zeros((M - N, N), dtype=typ)]
+    else:
+        raise ValueError("Length of s must be M or N.")
+
+
+# Orthonormal decomposition
+
+def orth(A, rcond=None):
+    """
+    Construct an orthonormal basis for the range of A using SVD
+
+    Parameters
+    ----------
+    A : (M, N) array_like
+        Input array
+    rcond : float, optional
+        Relative condition number. Singular values ``s`` smaller than
+        ``rcond * max(s)`` are considered zero.
+        Default: floating point eps * max(M,N).
+
+    Returns
+    -------
+    Q : (M, K) ndarray
+        Orthonormal basis for the range of A.
+        K = effective rank of A, as determined by rcond
+
+    See Also
+    --------
+    svd : Singular value decomposition of a matrix
+    null_space : Matrix null space
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import orth
+    >>> A = np.array([[2, 0, 0], [0, 5, 0]])  # rank 2 array
+    >>> orth(A)
+    array([[0., 1.],
+           [1., 0.]])
+    >>> orth(A.T)
+    array([[0., 1.],
+           [1., 0.],
+           [0., 0.]])
+
+    """
+    u, s, vh = svd(A, full_matrices=False)
+    M, N = u.shape[0], vh.shape[1]
+    if rcond is None:
+        rcond = np.finfo(s.dtype).eps * max(M, N)
+    tol = np.amax(s, initial=0.) * rcond
+    num = np.sum(s > tol, dtype=int)
+    Q = u[:, :num]
+    return Q
+
+
+def null_space(A, rcond=None, *, overwrite_a=False, check_finite=True,
+               lapack_driver='gesdd'):
+    """
+    Construct an orthonormal basis for the null space of A using SVD
+
+    Parameters
+    ----------
+    A : (M, N) array_like
+        Input array
+    rcond : float, optional
+        Relative condition number. Singular values ``s`` smaller than
+        ``rcond * max(s)`` are considered zero.
+        Default: floating point eps * max(M,N).
+    overwrite_a : bool, optional
+        Whether to overwrite `a`; may improve performance.
+        Default is False.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+    lapack_driver : {'gesdd', 'gesvd'}, optional
+        Whether to use the more efficient divide-and-conquer approach
+        (``'gesdd'``) or general rectangular approach (``'gesvd'``)
+        to compute the SVD. MATLAB and Octave use the ``'gesvd'`` approach.
+        Default is ``'gesdd'``.
+
+    Returns
+    -------
+    Z : (N, K) ndarray
+        Orthonormal basis for the null space of A.
+        K = dimension of effective null space, as determined by rcond
+
+    See Also
+    --------
+    svd : Singular value decomposition of a matrix
+    orth : Matrix range
+
+    Examples
+    --------
+    1-D null space:
+
+    >>> import numpy as np
+    >>> from scipy.linalg import null_space
+    >>> A = np.array([[1, 1], [1, 1]])
+    >>> ns = null_space(A)
+    >>> ns * np.copysign(1, ns[0,0])  # Remove the sign ambiguity of the vector
+    array([[ 0.70710678],
+           [-0.70710678]])
+
+    2-D null space:
+
+    >>> from numpy.random import default_rng
+    >>> rng = default_rng()
+    >>> B = rng.random((3, 5))
+    >>> Z = null_space(B)
+    >>> Z.shape
+    (5, 2)
+    >>> np.allclose(B.dot(Z), 0)
+    True
+
+    The basis vectors are orthonormal (up to rounding error):
+
+    >>> Z.T.dot(Z)
+    array([[  1.00000000e+00,   6.92087741e-17],
+           [  6.92087741e-17,   1.00000000e+00]])
+
+    """
+    u, s, vh = svd(A, full_matrices=True, overwrite_a=overwrite_a,
+                   check_finite=check_finite, lapack_driver=lapack_driver)
+    M, N = u.shape[0], vh.shape[1]
+    if rcond is None:
+        rcond = np.finfo(s.dtype).eps * max(M, N)
+    tol = np.amax(s, initial=0.) * rcond
+    num = np.sum(s > tol, dtype=int)
+    Q = vh[num:,:].T.conj()
+    return Q
+
+
+def subspace_angles(A, B):
+    r"""
+    Compute the subspace angles between two matrices.
+
+    Parameters
+    ----------
+    A : (M, N) array_like
+        The first input array.
+    B : (M, K) array_like
+        The second input array.
+
+    Returns
+    -------
+    angles : ndarray, shape (min(N, K),)
+        The subspace angles between the column spaces of `A` and `B` in
+        descending order.
+
+    See Also
+    --------
+    orth
+    svd
+
+    Notes
+    -----
+    This computes the subspace angles according to the formula
+    provided in [1]_. For equivalence with MATLAB and Octave behavior,
+    use ``angles[0]``.
+
+    .. versionadded:: 1.0
+
+    References
+    ----------
+    .. [1] Knyazev A, Argentati M (2002) Principal Angles between Subspaces
+           in an A-Based Scalar Product: Algorithms and Perturbation
+           Estimates. SIAM J. Sci. Comput. 23:2008-2040.
+
+    Examples
+    --------
+    An Hadamard matrix, which has orthogonal columns, so we expect that
+    the suspace angle to be :math:`\frac{\pi}{2}`:
+
+    >>> import numpy as np
+    >>> from scipy.linalg import hadamard, subspace_angles
+    >>> rng = np.random.default_rng()
+    >>> H = hadamard(4)
+    >>> print(H)
+    [[ 1  1  1  1]
+     [ 1 -1  1 -1]
+     [ 1  1 -1 -1]
+     [ 1 -1 -1  1]]
+    >>> np.rad2deg(subspace_angles(H[:, :2], H[:, 2:]))
+    array([ 90.,  90.])
+
+    And the subspace angle of a matrix to itself should be zero:
+
+    >>> subspace_angles(H[:, :2], H[:, :2]) <= 2 * np.finfo(float).eps
+    array([ True,  True], dtype=bool)
+
+    The angles between non-orthogonal subspaces are in between these extremes:
+
+    >>> x = rng.standard_normal((4, 3))
+    >>> np.rad2deg(subspace_angles(x[:, :2], x[:, [2]]))
+    array([ 55.832])  # random
+    """
+    # Steps here omit the U and V calculation steps from the paper
+
+    # 1. Compute orthonormal bases of column-spaces
+    A = _asarray_validated(A, check_finite=True)
+    if len(A.shape) != 2:
+        raise ValueError(f'expected 2D array, got shape {A.shape}')
+    QA = orth(A)
+    del A
+
+    B = _asarray_validated(B, check_finite=True)
+    if len(B.shape) != 2:
+        raise ValueError(f'expected 2D array, got shape {B.shape}')
+    if len(B) != len(QA):
+        raise ValueError('A and B must have the same number of rows, got '
+                         f'{QA.shape[0]} and {B.shape[0]}')
+    QB = orth(B)
+    del B
+
+    # 2. Compute SVD for cosine
+    QA_H_QB = dot(QA.T.conj(), QB)
+    sigma = svdvals(QA_H_QB)
+
+    # 3. Compute matrix B
+    if QA.shape[1] >= QB.shape[1]:
+        B = QB - dot(QA, QA_H_QB)
+    else:
+        B = QA - dot(QB, QA_H_QB.T.conj())
+    del QA, QB, QA_H_QB
+
+    # 4. Compute SVD for sine
+    mask = sigma ** 2 >= 0.5
+    if mask.any():
+        mu_arcsin = arcsin(clip(svdvals(B, overwrite_a=True), -1., 1.))
+    else:
+        mu_arcsin = 0.
+
+    # 5. Compute the principal angles
+    # with reverse ordering of sigma because smallest sigma belongs to largest
+    # angle theta
+    theta = where(mask, mu_arcsin, arccos(clip(sigma[::-1], -1., 1.)))
+    return theta
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py
new file mode 100644
index 0000000000000000000000000000000000000000..56ddbc45c3bc47f6beb122e2acadd274ebd9be95
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_expm_frechet.py
@@ -0,0 +1,413 @@
+"""Frechet derivative of the matrix exponential."""
+import numpy as np
+import scipy.linalg
+
+__all__ = ['expm_frechet', 'expm_cond']
+
+
+def expm_frechet(A, E, method=None, compute_expm=True, check_finite=True):
+    """
+    Frechet derivative of the matrix exponential of A in the direction E.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix of which to take the matrix exponential.
+    E : (N, N) array_like
+        Matrix direction in which to take the Frechet derivative.
+    method : str, optional
+        Choice of algorithm. Should be one of
+
+        - `SPS` (default)
+        - `blockEnlarge`
+
+    compute_expm : bool, optional
+        Whether to compute also `expm_A` in addition to `expm_frechet_AE`.
+        Default is True.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    expm_A : ndarray
+        Matrix exponential of A.
+    expm_frechet_AE : ndarray
+        Frechet derivative of the matrix exponential of A in the direction E.
+    For ``compute_expm = False``, only `expm_frechet_AE` is returned.
+
+    See Also
+    --------
+    expm : Compute the exponential of a matrix.
+
+    Notes
+    -----
+    This section describes the available implementations that can be selected
+    by the `method` parameter. The default method is *SPS*.
+
+    Method *blockEnlarge* is a naive algorithm.
+
+    Method *SPS* is Scaling-Pade-Squaring [1]_.
+    It is a sophisticated implementation which should take
+    only about 3/8 as much time as the naive implementation.
+    The asymptotics are the same.
+
+    .. versionadded:: 0.13.0
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2009)
+           Computing the Frechet Derivative of the Matrix Exponential,
+           with an application to Condition Number Estimation.
+           SIAM Journal On Matrix Analysis and Applications.,
+           30 (4). pp. 1639-1657. ISSN 1095-7162
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> rng = np.random.default_rng()
+
+    >>> A = rng.standard_normal((3, 3))
+    >>> E = rng.standard_normal((3, 3))
+    >>> expm_A, expm_frechet_AE = linalg.expm_frechet(A, E)
+    >>> expm_A.shape, expm_frechet_AE.shape
+    ((3, 3), (3, 3))
+
+    Create a 6x6 matrix containing [[A, E], [0, A]]:
+
+    >>> M = np.zeros((6, 6))
+    >>> M[:3, :3] = A
+    >>> M[:3, 3:] = E
+    >>> M[3:, 3:] = A
+
+    >>> expm_M = linalg.expm(M)
+    >>> np.allclose(expm_A, expm_M[:3, :3])
+    True
+    >>> np.allclose(expm_frechet_AE, expm_M[:3, 3:])
+    True
+
+    """
+    if check_finite:
+        A = np.asarray_chkfinite(A)
+        E = np.asarray_chkfinite(E)
+    else:
+        A = np.asarray(A)
+        E = np.asarray(E)
+    if A.ndim != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected A to be a square matrix')
+    if E.ndim != 2 or E.shape[0] != E.shape[1]:
+        raise ValueError('expected E to be a square matrix')
+    if A.shape != E.shape:
+        raise ValueError('expected A and E to be the same shape')
+    if method is None:
+        method = 'SPS'
+    if method == 'SPS':
+        expm_A, expm_frechet_AE = expm_frechet_algo_64(A, E)
+    elif method == 'blockEnlarge':
+        expm_A, expm_frechet_AE = expm_frechet_block_enlarge(A, E)
+    else:
+        raise ValueError(f'Unknown implementation {method}')
+    if compute_expm:
+        return expm_A, expm_frechet_AE
+    else:
+        return expm_frechet_AE
+
+
+def expm_frechet_block_enlarge(A, E):
+    """
+    This is a helper function, mostly for testing and profiling.
+    Return expm(A), frechet(A, E)
+    """
+    n = A.shape[0]
+    M = np.vstack([
+        np.hstack([A, E]),
+        np.hstack([np.zeros_like(A), A])])
+    expm_M = scipy.linalg.expm(M)
+    return expm_M[:n, :n], expm_M[:n, n:]
+
+
+"""
+Maximal values ell_m of ||2**-s A|| such that the backward error bound
+does not exceed 2**-53.
+"""
+ell_table_61 = (
+        None,
+        # 1
+        2.11e-8,
+        3.56e-4,
+        1.08e-2,
+        6.49e-2,
+        2.00e-1,
+        4.37e-1,
+        7.83e-1,
+        1.23e0,
+        1.78e0,
+        2.42e0,
+        # 11
+        3.13e0,
+        3.90e0,
+        4.74e0,
+        5.63e0,
+        6.56e0,
+        7.52e0,
+        8.53e0,
+        9.56e0,
+        1.06e1,
+        1.17e1,
+        )
+
+
+# The b vectors and U and V are copypasted
+# from scipy.sparse.linalg.matfuncs.py.
+# M, Lu, Lv follow (6.11), (6.12), (6.13), (3.3)
+
+def _diff_pade3(A, E, ident):
+    b = (120., 60., 12., 1.)
+    A2 = A.dot(A)
+    M2 = np.dot(A, E) + np.dot(E, A)
+    U = A.dot(b[3]*A2 + b[1]*ident)
+    V = b[2]*A2 + b[0]*ident
+    Lu = A.dot(b[3]*M2) + E.dot(b[3]*A2 + b[1]*ident)
+    Lv = b[2]*M2
+    return U, V, Lu, Lv
+
+
+def _diff_pade5(A, E, ident):
+    b = (30240., 15120., 3360., 420., 30., 1.)
+    A2 = A.dot(A)
+    M2 = np.dot(A, E) + np.dot(E, A)
+    A4 = np.dot(A2, A2)
+    M4 = np.dot(A2, M2) + np.dot(M2, A2)
+    U = A.dot(b[5]*A4 + b[3]*A2 + b[1]*ident)
+    V = b[4]*A4 + b[2]*A2 + b[0]*ident
+    Lu = (A.dot(b[5]*M4 + b[3]*M2) +
+            E.dot(b[5]*A4 + b[3]*A2 + b[1]*ident))
+    Lv = b[4]*M4 + b[2]*M2
+    return U, V, Lu, Lv
+
+
+def _diff_pade7(A, E, ident):
+    b = (17297280., 8648640., 1995840., 277200., 25200., 1512., 56., 1.)
+    A2 = A.dot(A)
+    M2 = np.dot(A, E) + np.dot(E, A)
+    A4 = np.dot(A2, A2)
+    M4 = np.dot(A2, M2) + np.dot(M2, A2)
+    A6 = np.dot(A2, A4)
+    M6 = np.dot(A4, M2) + np.dot(M4, A2)
+    U = A.dot(b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident)
+    V = b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident
+    Lu = (A.dot(b[7]*M6 + b[5]*M4 + b[3]*M2) +
+            E.dot(b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident))
+    Lv = b[6]*M6 + b[4]*M4 + b[2]*M2
+    return U, V, Lu, Lv
+
+
+def _diff_pade9(A, E, ident):
+    b = (17643225600., 8821612800., 2075673600., 302702400., 30270240.,
+            2162160., 110880., 3960., 90., 1.)
+    A2 = A.dot(A)
+    M2 = np.dot(A, E) + np.dot(E, A)
+    A4 = np.dot(A2, A2)
+    M4 = np.dot(A2, M2) + np.dot(M2, A2)
+    A6 = np.dot(A2, A4)
+    M6 = np.dot(A4, M2) + np.dot(M4, A2)
+    A8 = np.dot(A4, A4)
+    M8 = np.dot(A4, M4) + np.dot(M4, A4)
+    U = A.dot(b[9]*A8 + b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident)
+    V = b[8]*A8 + b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident
+    Lu = (A.dot(b[9]*M8 + b[7]*M6 + b[5]*M4 + b[3]*M2) +
+            E.dot(b[9]*A8 + b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident))
+    Lv = b[8]*M8 + b[6]*M6 + b[4]*M4 + b[2]*M2
+    return U, V, Lu, Lv
+
+
+def expm_frechet_algo_64(A, E):
+    n = A.shape[0]
+    s = None
+    ident = np.identity(n)
+    A_norm_1 = scipy.linalg.norm(A, 1)
+    m_pade_pairs = (
+            (3, _diff_pade3),
+            (5, _diff_pade5),
+            (7, _diff_pade7),
+            (9, _diff_pade9))
+    for m, pade in m_pade_pairs:
+        if A_norm_1 <= ell_table_61[m]:
+            U, V, Lu, Lv = pade(A, E, ident)
+            s = 0
+            break
+    if s is None:
+        # scaling
+        s = max(0, int(np.ceil(np.log2(A_norm_1 / ell_table_61[13]))))
+        A = A * 2.0**-s
+        E = E * 2.0**-s
+        # pade order 13
+        A2 = np.dot(A, A)
+        M2 = np.dot(A, E) + np.dot(E, A)
+        A4 = np.dot(A2, A2)
+        M4 = np.dot(A2, M2) + np.dot(M2, A2)
+        A6 = np.dot(A2, A4)
+        M6 = np.dot(A4, M2) + np.dot(M4, A2)
+        b = (64764752532480000., 32382376266240000., 7771770303897600.,
+                1187353796428800., 129060195264000., 10559470521600.,
+                670442572800., 33522128640., 1323241920., 40840800., 960960.,
+                16380., 182., 1.)
+        W1 = b[13]*A6 + b[11]*A4 + b[9]*A2
+        W2 = b[7]*A6 + b[5]*A4 + b[3]*A2 + b[1]*ident
+        Z1 = b[12]*A6 + b[10]*A4 + b[8]*A2
+        Z2 = b[6]*A6 + b[4]*A4 + b[2]*A2 + b[0]*ident
+        W = np.dot(A6, W1) + W2
+        U = np.dot(A, W)
+        V = np.dot(A6, Z1) + Z2
+        Lw1 = b[13]*M6 + b[11]*M4 + b[9]*M2
+        Lw2 = b[7]*M6 + b[5]*M4 + b[3]*M2
+        Lz1 = b[12]*M6 + b[10]*M4 + b[8]*M2
+        Lz2 = b[6]*M6 + b[4]*M4 + b[2]*M2
+        Lw = np.dot(A6, Lw1) + np.dot(M6, W1) + Lw2
+        Lu = np.dot(A, Lw) + np.dot(E, W)
+        Lv = np.dot(A6, Lz1) + np.dot(M6, Z1) + Lz2
+    # factor once and solve twice
+    lu_piv = scipy.linalg.lu_factor(-U + V)
+    R = scipy.linalg.lu_solve(lu_piv, U + V)
+    L = scipy.linalg.lu_solve(lu_piv, Lu + Lv + np.dot((Lu - Lv), R))
+    # squaring
+    for k in range(s):
+        L = np.dot(R, L) + np.dot(L, R)
+        R = np.dot(R, R)
+    return R, L
+
+
+def vec(M):
+    """
+    Stack columns of M to construct a single vector.
+
+    This is somewhat standard notation in linear algebra.
+
+    Parameters
+    ----------
+    M : 2-D array_like
+        Input matrix
+
+    Returns
+    -------
+    v : 1-D ndarray
+        Output vector
+
+    """
+    return M.T.ravel()
+
+
+def expm_frechet_kronform(A, method=None, check_finite=True):
+    """
+    Construct the Kronecker form of the Frechet derivative of expm.
+
+    Parameters
+    ----------
+    A : array_like with shape (N, N)
+        Matrix to be expm'd.
+    method : str, optional
+        Extra keyword to be passed to expm_frechet.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    K : 2-D ndarray with shape (N*N, N*N)
+        Kronecker form of the Frechet derivative of the matrix exponential.
+
+    Notes
+    -----
+    This function is used to help compute the condition number
+    of the matrix exponential.
+
+    See Also
+    --------
+    expm : Compute a matrix exponential.
+    expm_frechet : Compute the Frechet derivative of the matrix exponential.
+    expm_cond : Compute the relative condition number of the matrix exponential
+                in the Frobenius norm.
+
+    """
+    if check_finite:
+        A = np.asarray_chkfinite(A)
+    else:
+        A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected a square matrix')
+
+    n = A.shape[0]
+    ident = np.identity(n)
+    cols = []
+    for i in range(n):
+        for j in range(n):
+            E = np.outer(ident[i], ident[j])
+            F = expm_frechet(A, E,
+                    method=method, compute_expm=False, check_finite=False)
+            cols.append(vec(F))
+    return np.vstack(cols).T
+
+
+def expm_cond(A, check_finite=True):
+    """
+    Relative condition number of the matrix exponential in the Frobenius norm.
+
+    Parameters
+    ----------
+    A : 2-D array_like
+        Square input matrix with shape (N, N).
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    kappa : float
+        The relative condition number of the matrix exponential
+        in the Frobenius norm
+
+    See Also
+    --------
+    expm : Compute the exponential of a matrix.
+    expm_frechet : Compute the Frechet derivative of the matrix exponential.
+
+    Notes
+    -----
+    A faster estimate for the condition number in the 1-norm
+    has been published but is not yet implemented in SciPy.
+
+    .. versionadded:: 0.14.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import expm_cond
+    >>> A = np.array([[-0.3, 0.2, 0.6], [0.6, 0.3, -0.1], [-0.7, 1.2, 0.9]])
+    >>> k = expm_cond(A)
+    >>> k
+    1.7787805864469866
+
+    """
+    if check_finite:
+        A = np.asarray_chkfinite(A)
+    else:
+        A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected a square matrix')
+
+    X = scipy.linalg.expm(A)
+    K = expm_frechet_kronform(A, check_finite=False)
+
+    # The following norm choices are deliberate.
+    # The norms of A and X are Frobenius norms,
+    # and the norm of K is the induced 2-norm.
+    A_norm = scipy.linalg.norm(A, 'fro')
+    X_norm = scipy.linalg.norm(X, 'fro')
+    K_norm = scipy.linalg.norm(K, 2)
+
+    kappa = (K_norm * A_norm) / X_norm
+    return kappa
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h
new file mode 100644
index 0000000000000000000000000000000000000000..676658205e41bcde69e3899e8e065c90738af246
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_lapack_subroutines.h
@@ -0,0 +1,1521 @@
+/*
+This file was generated by _generate_pyx.py.
+Do not edit this file directly.
+*/
+
+#include "npy_cblas.h"
+#include "fortran_defs.h"
+
+typedef int (*_cselect1)(npy_complex64*);
+typedef int (*_cselect2)(npy_complex64*, npy_complex64*);
+typedef int (*_dselect2)(double*, double*);
+typedef int (*_dselect3)(double*, double*, double*);
+typedef int (*_sselect2)(float*, float*);
+typedef int (*_sselect3)(float*, float*, float*);
+typedef int (*_zselect1)(npy_complex128*);
+typedef int (*_zselect2)(npy_complex128*, npy_complex128*);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void BLAS_FUNC(cbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, float *theta, float *phi, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, float *b11d, float *b11e, float *b12d, float *b12e, float *b21d, float *b21e, float *b22d, float *b22e, float *rwork, int *lrwork, int *info);
+void BLAS_FUNC(cbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, npy_complex64 *vt, int *ldvt, npy_complex64 *u, int *ldu, npy_complex64 *c, int *ldc, float *rwork, int *info);
+void BLAS_FUNC(cgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *pt, int *ldpt, npy_complex64 *c, int *ldc, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgbcon)(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgbequ)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(cgbequb)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(cgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgbsv)(int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgbtf2)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(cgbtrf)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(cgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cgebak)(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, npy_complex64 *v, int *ldv, int *info);
+void BLAS_FUNC(cgebal)(char *job, int *n, npy_complex64 *a, int *lda, int *ilo, int *ihi, float *scale, int *info);
+void BLAS_FUNC(cgebd2)(int *m, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgebrd)(int *m, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgecon)(char *norm, int *n, npy_complex64 *a, int *lda, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgeequ)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(cgeequb)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(cgees)(char *jobvs, char *sort, _cselect1 *select, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info);
+void BLAS_FUNC(cgeesx)(char *jobvs, char *sort, _cselect1 *select, char *sense, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info);
+void BLAS_FUNC(cgeev)(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgehd2)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgehrd)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgelq2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgelqf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgels)(char *trans, int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgelsd)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *s, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *info);
+void BLAS_FUNC(cgelss)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *s, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgelsy)(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *jpvt, float *rcond, int *rank, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgeql2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgeqlf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgeqp3)(int *m, int *n, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgeqr2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgeqr2p)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgeqrf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgeqrfp)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgeqrt)(int *m, int *n, int *nb, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgeqrt2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info);
+void BLAS_FUNC(cgeqrt3)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info);
+void BLAS_FUNC(cgerfs)(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgerq2)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgerqf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgesc2)(int *n, npy_complex64 *a, int *lda, npy_complex64 *rhs, int *ipiv, int *jpiv, float *scale);
+void BLAS_FUNC(cgesdd)(char *jobz, int *m, int *n, npy_complex64 *a, int *lda, float *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *info);
+void BLAS_FUNC(cgesv)(int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cgesvd)(char *jobu, char *jobvt, int *m, int *n, npy_complex64 *a, int *lda, float *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cgesvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgetc2)(int *n, npy_complex64 *a, int *lda, int *ipiv, int *jpiv, int *info);
+void BLAS_FUNC(cgetf2)(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(cgetrf)(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(cgetri)(int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgetrs)(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cggbak)(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, npy_complex64 *v, int *ldv, int *info);
+void BLAS_FUNC(cggbal)(char *job, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info);
+void BLAS_FUNC(cgges)(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, npy_complex64 *work, int *lwork, float *rwork, int *bwork, int *info);
+void BLAS_FUNC(cggesx)(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(cggev)(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *bwork, int *info);
+void BLAS_FUNC(cggglm)(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *d, npy_complex64 *x, npy_complex64 *y, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *info);
+void BLAS_FUNC(cgglse)(int *m, int *n, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, npy_complex64 *d, npy_complex64 *x, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cggqrf)(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cggrqf)(int *m, int *p, int *n, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cgtcon)(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info);
+void BLAS_FUNC(cgtrfs)(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgtsv)(int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cgtsvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cgttrf)(int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, int *info);
+void BLAS_FUNC(cgttrs)(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cgtts2)(int *itrans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(chbev)(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chbevd)(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(chbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(chbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *x, int *ldx, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(chbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(chbtrd)(char *vect, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info);
+void BLAS_FUNC(checon)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info);
+void BLAS_FUNC(cheequb)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, npy_complex64 *work, int *info);
+void BLAS_FUNC(cheev)(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, float *w, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cheevd)(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, float *w, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(cheevr)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, int *isuppz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(cheevx)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(chegs2)(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(chegst)(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(chegv)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *w, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(chegvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *w, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(chegvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(cherfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chesv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(chesvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(cheswapr)(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(chetd2)(char *uplo, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tau, int *info);
+void BLAS_FUNC(chetf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(chetrd)(char *uplo, int *n, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(chetrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(chetri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info);
+void BLAS_FUNC(chetri2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(chetri2x)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info);
+void BLAS_FUNC(chetrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(chetrs2)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info);
+void BLAS_FUNC(chfrk)(char *transr, char *uplo, char *trans, int *n, int *k, float *alpha, npy_complex64 *a, int *lda, float *beta, npy_complex64 *c);
+void BLAS_FUNC(chgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *t, int *ldt, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *info);
+char BLAS_FUNC(chla_transtype)(int *trans);
+void BLAS_FUNC(chpcon)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info);
+void BLAS_FUNC(chpev)(char *jobz, char *uplo, int *n, npy_complex64 *ap, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chpevd)(char *jobz, char *uplo, int *n, npy_complex64 *ap, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(chpevx)(char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(chpgst)(int *itype, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, int *info);
+void BLAS_FUNC(chpgv)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chpgvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(chpgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, npy_complex64 *work, float *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(chprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chpsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(chpsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(chptrd)(char *uplo, int *n, npy_complex64 *ap, float *d, float *e, npy_complex64 *tau, int *info);
+void BLAS_FUNC(chptrf)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info);
+void BLAS_FUNC(chptri)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info);
+void BLAS_FUNC(chptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(chsein)(char *side, char *eigsrc, char *initv, int *select, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *ifaill, int *ifailr, int *info);
+void BLAS_FUNC(chseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(clabrd)(int *m, int *n, int *nb, npy_complex64 *a, int *lda, float *d, float *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *x, int *ldx, npy_complex64 *y, int *ldy);
+void BLAS_FUNC(clacgv)(int *n, npy_complex64 *x, int *incx);
+void BLAS_FUNC(clacn2)(int *n, npy_complex64 *v, npy_complex64 *x, float *est, int *kase, int *isave);
+void BLAS_FUNC(clacon)(int *n, npy_complex64 *v, npy_complex64 *x, float *est, int *kase);
+void BLAS_FUNC(clacp2)(char *uplo, int *m, int *n, float *a, int *lda, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(clacpy)(char *uplo, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(clacrm)(int *m, int *n, npy_complex64 *a, int *lda, float *b, int *ldb, npy_complex64 *c, int *ldc, float *rwork);
+void BLAS_FUNC(clacrt)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, npy_complex64 *c, npy_complex64 *s);
+void F_FUNC(cladivwrp,CLADIVWRP)(npy_complex64 *out, npy_complex64 *x, npy_complex64 *y);
+void BLAS_FUNC(claed0)(int *qsiz, int *n, float *d, float *e, npy_complex64 *q, int *ldq, npy_complex64 *qstore, int *ldqs, float *rwork, int *iwork, int *info);
+void BLAS_FUNC(claed7)(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, float *d, npy_complex64 *q, int *ldq, float *rho, int *indxq, float *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, npy_complex64 *work, float *rwork, int *iwork, int *info);
+void BLAS_FUNC(claed8)(int *k, int *n, int *qsiz, npy_complex64 *q, int *ldq, float *d, float *rho, int *cutpnt, float *z, float *dlamda, npy_complex64 *q2, int *ldq2, float *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, float *givnum, int *info);
+void BLAS_FUNC(claein)(int *rightv, int *noinit, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *v, npy_complex64 *b, int *ldb, float *rwork, float *eps3, float *smlnum, int *info);
+void BLAS_FUNC(claesy)(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, npy_complex64 *rt1, npy_complex64 *rt2, npy_complex64 *evscal, npy_complex64 *cs1, npy_complex64 *sn1);
+void BLAS_FUNC(claev2)(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, float *rt1, float *rt2, float *cs1, npy_complex64 *sn1);
+void BLAS_FUNC(clag2z)(int *m, int *n, npy_complex64 *sa, int *ldsa, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(clags2)(int *upper, float *a1, npy_complex64 *a2, float *a3, float *b1, npy_complex64 *b2, float *b3, float *csu, npy_complex64 *snu, float *csv, npy_complex64 *snv, float *csq, npy_complex64 *snq);
+void BLAS_FUNC(clagtm)(char *trans, int *n, int *nrhs, float *alpha, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *x, int *ldx, float *beta, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(clahef)(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info);
+void BLAS_FUNC(clahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *info);
+void BLAS_FUNC(clahr2)(int *n, int *k, int *nb, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *t, int *ldt, npy_complex64 *y, int *ldy);
+void BLAS_FUNC(claic1)(int *job, int *j, npy_complex64 *x, float *sest, npy_complex64 *w, npy_complex64 *gamma, float *sestpr, npy_complex64 *s, npy_complex64 *c);
+void BLAS_FUNC(clals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *rwork, int *info);
+void BLAS_FUNC(clalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *rwork, int *iwork, int *info);
+void BLAS_FUNC(clalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, float *d, float *e, npy_complex64 *b, int *ldb, float *rcond, int *rank, npy_complex64 *work, float *rwork, int *iwork, int *info);
+float BLAS_FUNC(clangb)(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *work);
+float BLAS_FUNC(clange)(char *norm, int *m, int *n, npy_complex64 *a, int *lda, float *work);
+float BLAS_FUNC(clangt)(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du);
+float BLAS_FUNC(clanhb)(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, float *work);
+float BLAS_FUNC(clanhe)(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, float *work);
+float BLAS_FUNC(clanhf)(char *norm, char *transr, char *uplo, int *n, npy_complex64 *a, float *work);
+float BLAS_FUNC(clanhp)(char *norm, char *uplo, int *n, npy_complex64 *ap, float *work);
+float BLAS_FUNC(clanhs)(char *norm, int *n, npy_complex64 *a, int *lda, float *work);
+float BLAS_FUNC(clanht)(char *norm, int *n, float *d, npy_complex64 *e);
+float BLAS_FUNC(clansb)(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, float *work);
+float BLAS_FUNC(clansp)(char *norm, char *uplo, int *n, npy_complex64 *ap, float *work);
+float BLAS_FUNC(clansy)(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, float *work);
+float BLAS_FUNC(clantb)(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex64 *ab, int *ldab, float *work);
+float BLAS_FUNC(clantp)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, float *work);
+float BLAS_FUNC(clantr)(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex64 *a, int *lda, float *work);
+void BLAS_FUNC(clapll)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *ssmin);
+void BLAS_FUNC(clapmr)(int *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k);
+void BLAS_FUNC(clapmt)(int *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k);
+void BLAS_FUNC(claqgb)(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed);
+void BLAS_FUNC(claqge)(int *m, int *n, npy_complex64 *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed);
+void BLAS_FUNC(claqhb)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(claqhe)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(claqhp)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(claqp2)(int *m, int *n, int *offset, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, float *vn1, float *vn2, npy_complex64 *work);
+void BLAS_FUNC(claqps)(int *m, int *n, int *offset, int *nb, int *kb, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, float *vn1, float *vn2, npy_complex64 *auxv, npy_complex64 *f, int *ldf);
+void BLAS_FUNC(claqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(claqr1)(int *n, npy_complex64 *h, int *ldh, npy_complex64 *s1, npy_complex64 *s2, npy_complex64 *v);
+void BLAS_FUNC(claqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork);
+void BLAS_FUNC(claqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork);
+void BLAS_FUNC(claqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(claqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex64 *s, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *v, int *ldv, npy_complex64 *u, int *ldu, int *nv, npy_complex64 *wv, int *ldwv, int *nh, npy_complex64 *wh, int *ldwh);
+void BLAS_FUNC(claqsb)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(claqsp)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(claqsy)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(clar1v)(int *n, int *b1, int *bn, float *lambda_, float *d, float *l, float *ld, float *lld, float *pivmin, float *gaptol, npy_complex64 *z, int *wantnc, int *negcnt, float *ztz, float *mingma, int *r, int *isuppz, float *nrminv, float *resid, float *rqcorr, float *work);
+void BLAS_FUNC(clar2v)(int *n, npy_complex64 *x, npy_complex64 *y, npy_complex64 *z, int *incx, float *c, npy_complex64 *s, int *incc);
+void BLAS_FUNC(clarcm)(int *m, int *n, float *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, float *rwork);
+void BLAS_FUNC(clarf)(char *side, int *m, int *n, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work);
+void BLAS_FUNC(clarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork);
+void BLAS_FUNC(clarfg)(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau);
+void BLAS_FUNC(clarfgp)(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau);
+void BLAS_FUNC(clarft)(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt);
+void BLAS_FUNC(clarfx)(char *side, int *m, int *n, npy_complex64 *v, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work);
+void BLAS_FUNC(clargv)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *c, int *incc);
+void BLAS_FUNC(clarnv)(int *idist, int *iseed, int *n, npy_complex64 *x);
+void BLAS_FUNC(clarrv)(int *n, float *vl, float *vu, float *d, float *l, float *pivmin, int *isplit, int *m, int *dol, int *dou, float *minrgp, float *rtol1, float *rtol2, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, npy_complex64 *z, int *ldz, int *isuppz, float *work, int *iwork, int *info);
+void BLAS_FUNC(clartg)(npy_complex64 *f, npy_complex64 *g, float *cs, npy_complex64 *sn, npy_complex64 *r);
+void BLAS_FUNC(clartv)(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, float *c, npy_complex64 *s, int *incc);
+void BLAS_FUNC(clarz)(char *side, int *m, int *n, int *l, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work);
+void BLAS_FUNC(clarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork);
+void BLAS_FUNC(clarzt)(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt);
+void BLAS_FUNC(clascl)(char *type_bn, int *kl, int *ku, float *cfrom, float *cto, int *m, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(claset)(char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *a, int *lda);
+void BLAS_FUNC(clasr)(char *side, char *pivot, char *direct, int *m, int *n, float *c, float *s, npy_complex64 *a, int *lda);
+void BLAS_FUNC(classq)(int *n, npy_complex64 *x, int *incx, float *scale, float *sumsq);
+void BLAS_FUNC(claswp)(int *n, npy_complex64 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
+void BLAS_FUNC(clasyf)(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info);
+void BLAS_FUNC(clatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(clatdf)(int *ijob, int *n, npy_complex64 *z, int *ldz, npy_complex64 *rhs, float *rdsum, float *rdscal, int *ipiv, int *jpiv);
+void BLAS_FUNC(clatps)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *ap, npy_complex64 *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(clatrd)(char *uplo, int *n, int *nb, npy_complex64 *a, int *lda, float *e, npy_complex64 *tau, npy_complex64 *w, int *ldw);
+void BLAS_FUNC(clatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(clatrz)(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work);
+void BLAS_FUNC(clauu2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(clauum)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(cpbcon)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpbequ)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(cpbrfs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpbstf)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info);
+void BLAS_FUNC(cpbsv)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpbtf2)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info);
+void BLAS_FUNC(cpbtrf)(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info);
+void BLAS_FUNC(cpbtrs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cpftrf)(char *transr, char *uplo, int *n, npy_complex64 *a, int *info);
+void BLAS_FUNC(cpftri)(char *transr, char *uplo, int *n, npy_complex64 *a, int *info);
+void BLAS_FUNC(cpftrs)(char *transr, char *uplo, int *n, int *nrhs, npy_complex64 *a, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cpocon)(char *uplo, int *n, npy_complex64 *a, int *lda, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpoequ)(int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(cpoequb)(int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(cporfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cposv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cposvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpotf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(cpotrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(cpotri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(cpotrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cppcon)(char *uplo, int *n, npy_complex64 *ap, float *anorm, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cppequ)(char *uplo, int *n, npy_complex64 *ap, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(cpprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cppsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cppsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, char *equed, float *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpptrf)(char *uplo, int *n, npy_complex64 *ap, int *info);
+void BLAS_FUNC(cpptri)(char *uplo, int *n, npy_complex64 *ap, int *info);
+void BLAS_FUNC(cpptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cpstf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info);
+void BLAS_FUNC(cpstrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info);
+void BLAS_FUNC(cptcon)(int *n, float *d, npy_complex64 *e, float *anorm, float *rcond, float *rwork, int *info);
+void BLAS_FUNC(cpteqr)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(cptrfs)(char *uplo, int *n, int *nrhs, float *d, npy_complex64 *e, float *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cptsv)(int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cptsvx)(char *fact, int *n, int *nrhs, float *d, npy_complex64 *e, float *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cpttrf)(int *n, float *d, npy_complex64 *e, int *info);
+void BLAS_FUNC(cpttrs)(char *uplo, int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cptts2)(int *iuplo, int *n, int *nrhs, float *d, npy_complex64 *e, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(crot)(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, float *c, npy_complex64 *s);
+void BLAS_FUNC(cspcon)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info);
+void BLAS_FUNC(cspmv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(cspr)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap);
+void BLAS_FUNC(csprfs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(cspsv)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(cspsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(csptrf)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info);
+void BLAS_FUNC(csptri)(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info);
+void BLAS_FUNC(csptrs)(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(csrscl)(int *n, float *sa, npy_complex64 *sx, int *incx);
+void BLAS_FUNC(cstedc)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(cstegr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, npy_complex64 *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(cstein)(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, npy_complex64 *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(cstemr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, int *m, float *w, npy_complex64 *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(csteqr)(char *compz, int *n, float *d, float *e, npy_complex64 *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(csycon)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, float *anorm, float *rcond, npy_complex64 *work, int *info);
+void BLAS_FUNC(csyconv)(char *uplo, char *way, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info);
+void BLAS_FUNC(csyequb)(char *uplo, int *n, npy_complex64 *a, int *lda, float *s, float *scond, float *amax, npy_complex64 *work, int *info);
+void BLAS_FUNC(csymv)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy);
+void BLAS_FUNC(csyr)(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda);
+void BLAS_FUNC(csyrfs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(csysv)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(csysvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *rcond, float *ferr, float *berr, npy_complex64 *work, int *lwork, float *rwork, int *info);
+void BLAS_FUNC(csyswapr)(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(csytf2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(csytrf)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(csytri)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info);
+void BLAS_FUNC(csytri2)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(csytri2x)(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info);
+void BLAS_FUNC(csytrs)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(csytrs2)(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info);
+void BLAS_FUNC(ctbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex64 *ab, int *ldab, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(ctfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, npy_complex64 *b, int *ldb);
+void BLAS_FUNC(ctftri)(char *transr, char *uplo, char *diag, int *n, npy_complex64 *a, int *info);
+void BLAS_FUNC(ctfttp)(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *ap, int *info);
+void BLAS_FUNC(ctfttr)(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(ctgevc)(char *side, char *howmny, int *select, int *n, npy_complex64 *s, int *lds, npy_complex64 *p, int *ldp, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctgex2)(int *wantq, int *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *j1, int *info);
+void BLAS_FUNC(ctgexc)(int *wantq, int *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *ifst, int *ilst, int *info);
+void BLAS_FUNC(ctgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *m, float *pl, float *pr, float *dif, npy_complex64 *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ctgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, npy_complex64 *u, int *ldu, npy_complex64 *v, int *ldv, npy_complex64 *q, int *ldq, npy_complex64 *work, int *ncycle, int *info);
+void BLAS_FUNC(ctgsna)(char *job, char *howmny, int *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, float *s, float *dif, int *mm, int *m, npy_complex64 *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(ctgsy2)(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, float *scale, float *rdsum, float *rdscal, int *info);
+void BLAS_FUNC(ctgsyl)(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, float *scale, float *dif, npy_complex64 *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(ctpcon)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info);
+void BLAS_FUNC(ctpqrt)(int *m, int *n, int *l, int *nb, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info);
+void BLAS_FUNC(ctpqrt2)(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, int *info);
+void BLAS_FUNC(ctprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *ldwork);
+void BLAS_FUNC(ctprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctptri)(char *uplo, char *diag, int *n, npy_complex64 *ap, int *info);
+void BLAS_FUNC(ctptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(ctpttf)(char *transr, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *arf, int *info);
+void BLAS_FUNC(ctpttr)(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(ctrcon)(char *norm, char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, float *rcond, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctrevc)(char *side, char *howmny, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctrexc)(char *compq, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, int *ifst, int *ilst, int *info);
+void BLAS_FUNC(ctrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, float *ferr, float *berr, npy_complex64 *work, float *rwork, int *info);
+void BLAS_FUNC(ctrsen)(char *job, char *compq, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, npy_complex64 *w, int *m, float *s, float *sep, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(ctrsna)(char *job, char *howmny, int *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, float *s, float *sep, int *mm, int *m, npy_complex64 *work, int *ldwork, float *rwork, int *info);
+void BLAS_FUNC(ctrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, float *scale, int *info);
+void BLAS_FUNC(ctrti2)(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(ctrtri)(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info);
+void BLAS_FUNC(ctrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info);
+void BLAS_FUNC(ctrttf)(char *transr, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *arf, int *info);
+void BLAS_FUNC(ctrttp)(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *ap, int *info);
+void BLAS_FUNC(ctzrzf)(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunbdb)(char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, float *theta, float *phi, npy_complex64 *taup1, npy_complex64 *taup2, npy_complex64 *tauq1, npy_complex64 *tauq2, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cuncsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, float *theta, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, npy_complex64 *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *info);
+void BLAS_FUNC(cung2l)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cung2r)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cungbr)(char *vect, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunghr)(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cungl2)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunglq)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cungql)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cungqr)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cungr2)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info);
+void BLAS_FUNC(cungrq)(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cungtr)(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunm2l)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunm2r)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunmbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunml2)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunmlq)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmql)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmqr)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmr2)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunmr3)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(cunmrq)(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmrz)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cunmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info);
+void BLAS_FUNC(cupgtr)(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info);
+void BLAS_FUNC(cupmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info);
+void BLAS_FUNC(dbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, double *theta, double *phi, double *u1, int *ldu1, double *u2, int *ldu2, double *v1t, int *ldv1t, double *v2t, int *ldv2t, double *b11d, double *b11e, double *b12d, double *b12e, double *b21d, double *b21e, double *b22d, double *b22e, double *work, int *lwork, int *info);
+void BLAS_FUNC(dbdsdc)(char *uplo, char *compq, int *n, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, int *iq, double *work, int *iwork, int *info);
+void BLAS_FUNC(dbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(ddisna)(char *job, int *m, int *n, double *d, double *sep, int *info);
+void BLAS_FUNC(dgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *pt, int *ldpt, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dgbcon)(char *norm, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgbequ)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(dgbequb)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(dgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgbsv)(int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgbtf2)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(dgbtrf)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(dgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, double *ab, int *ldab, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dgebak)(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, double *v, int *ldv, int *info);
+void BLAS_FUNC(dgebal)(char *job, int *n, double *a, int *lda, int *ilo, int *ihi, double *scale, int *info);
+void BLAS_FUNC(dgebd2)(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *info);
+void BLAS_FUNC(dgebrd)(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgecon)(char *norm, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgeequ)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(dgeequb)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(dgees)(char *jobvs, char *sort, _dselect2 *select, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *work, int *lwork, int *bwork, int *info);
+void BLAS_FUNC(dgeesx)(char *jobvs, char *sort, _dselect2 *select, char *sense, int *n, double *a, int *lda, int *sdim, double *wr, double *wi, double *vs, int *ldvs, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(dgeev)(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dgehd2)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgehrd)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgejsv)(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, double *a, int *lda, double *sva, double *u, int *ldu, double *v, int *ldv, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dgelq2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgelqf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgels)(char *trans, int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgelsd)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dgelss)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *s, double *rcond, int *rank, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgelsy)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *jpvt, double *rcond, int *rank, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dgeql2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgeqlf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgeqp3)(int *m, int *n, double *a, int *lda, int *jpvt, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgeqr2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgeqr2p)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgeqrf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgeqrfp)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgeqrt)(int *m, int *n, int *nb, double *a, int *lda, double *t, int *ldt, double *work, int *info);
+void BLAS_FUNC(dgeqrt2)(int *m, int *n, double *a, int *lda, double *t, int *ldt, int *info);
+void BLAS_FUNC(dgeqrt3)(int *m, int *n, double *a, int *lda, double *t, int *ldt, int *info);
+void BLAS_FUNC(dgerfs)(char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgerq2)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dgerqf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgesc2)(int *n, double *a, int *lda, double *rhs, int *ipiv, int *jpiv, double *scale);
+void BLAS_FUNC(dgesdd)(char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dgesv)(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dgesvd)(char *jobu, char *jobvt, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgesvj)(char *joba, char *jobu, char *jobv, int *m, int *n, double *a, int *lda, double *sva, int *mv, double *v, int *ldv, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgesvx)(char *fact, char *trans, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgetc2)(int *n, double *a, int *lda, int *ipiv, int *jpiv, int *info);
+void BLAS_FUNC(dgetf2)(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(dgetrf)(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(dgetri)(int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgetrs)(char *trans, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dggbak)(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, double *v, int *ldv, int *info);
+void BLAS_FUNC(dggbal)(char *job, int *n, double *a, int *lda, double *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info);
+void BLAS_FUNC(dgges)(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *work, int *lwork, int *bwork, int *info);
+void BLAS_FUNC(dggesx)(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, char *sense, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(dggev)(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info);
+void BLAS_FUNC(dggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, double *work, int *lwork, int *iwork, int *bwork, int *info);
+void BLAS_FUNC(dggglm)(int *n, int *m, int *p, double *a, int *lda, double *b, int *ldb, double *d, double *x, double *y, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *info);
+void BLAS_FUNC(dgglse)(int *m, int *n, int *p, double *a, int *lda, double *b, int *ldb, double *c, double *d, double *x, double *work, int *lwork, int *info);
+void BLAS_FUNC(dggqrf)(int *n, int *m, int *p, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info);
+void BLAS_FUNC(dggrqf)(int *m, int *p, int *n, double *a, int *lda, double *taua, double *b, int *ldb, double *taub, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgsvj0)(char *jobv, int *m, int *n, double *a, int *lda, double *d, double *sva, int *mv, double *v, int *ldv, double *eps, double *sfmin, double *tol, int *nsweep, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgsvj1)(char *jobv, int *m, int *n, int *n1, double *a, int *lda, double *d, double *sva, int *mv, double *v, int *ldv, double *eps, double *sfmin, double *tol, int *nsweep, double *work, int *lwork, int *info);
+void BLAS_FUNC(dgtcon)(char *norm, int *n, double *dl, double *d, double *du, double *du2, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgtrfs)(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgtsv)(int *n, int *nrhs, double *dl, double *d, double *du, double *b, int *ldb, int *info);
+void BLAS_FUNC(dgtsvx)(char *fact, char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *dlf, double *df, double *duf, double *du2, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dgttrf)(int *n, double *dl, double *d, double *du, double *du2, int *ipiv, int *info);
+void BLAS_FUNC(dgttrs)(char *trans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dgtts2)(int *itrans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb);
+void BLAS_FUNC(dhgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *t, int *ldt, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, double *work, int *lwork, int *info);
+void BLAS_FUNC(dhsein)(char *side, char *eigsrc, char *initv, int *select, int *n, double *h, int *ldh, double *wr, double *wi, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *ifaill, int *ifailr, int *info);
+void BLAS_FUNC(dhseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, double *z, int *ldz, double *work, int *lwork, int *info);
+int BLAS_FUNC(disnan)(double *din);
+void BLAS_FUNC(dlabad)(double *small, double *large);
+void BLAS_FUNC(dlabrd)(int *m, int *n, int *nb, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *x, int *ldx, double *y, int *ldy);
+void BLAS_FUNC(dlacn2)(int *n, double *v, double *x, int *isgn, double *est, int *kase, int *isave);
+void BLAS_FUNC(dlacon)(int *n, double *v, double *x, int *isgn, double *est, int *kase);
+void BLAS_FUNC(dlacpy)(char *uplo, int *m, int *n, double *a, int *lda, double *b, int *ldb);
+void BLAS_FUNC(dladiv)(double *a, double *b, double *c, double *d, double *p, double *q);
+void BLAS_FUNC(dlae2)(double *a, double *b, double *c, double *rt1, double *rt2);
+void BLAS_FUNC(dlaebz)(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, double *abstol, double *reltol, double *pivmin, double *d, double *e, double *e2, int *nval, double *ab, double *c, int *mout, int *nab, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlaed0)(int *icompq, int *qsiz, int *n, double *d, double *e, double *q, int *ldq, double *qstore, int *ldqs, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlaed1)(int *n, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlaed2)(int *k, int *n, int *n1, double *d, double *q, int *ldq, int *indxq, double *rho, double *z, double *dlamda, double *w, double *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info);
+void BLAS_FUNC(dlaed3)(int *k, int *n, int *n1, double *d, double *q, int *ldq, double *rho, double *dlamda, double *q2, int *indx, int *ctot, double *w, double *s, int *info);
+void BLAS_FUNC(dlaed4)(int *n, int *i, double *d, double *z, double *delta, double *rho, double *dlam, int *info);
+void BLAS_FUNC(dlaed5)(int *i, double *d, double *z, double *delta, double *rho, double *dlam);
+void BLAS_FUNC(dlaed6)(int *kniter, int *orgati, double *rho, double *d, double *z, double *finit, double *tau, int *info);
+void BLAS_FUNC(dlaed7)(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlaed8)(int *icompq, int *k, int *n, int *qsiz, double *d, double *q, int *ldq, int *indxq, double *rho, int *cutpnt, double *z, double *dlamda, double *q2, int *ldq2, double *w, int *perm, int *givptr, int *givcol, double *givnum, int *indxp, int *indx, int *info);
+void BLAS_FUNC(dlaed9)(int *k, int *kstart, int *kstop, int *n, double *d, double *q, int *ldq, double *rho, double *dlamda, double *w, double *s, int *lds, int *info);
+void BLAS_FUNC(dlaeda)(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, double *q, int *qptr, double *z, double *ztemp, int *info);
+void BLAS_FUNC(dlaein)(int *rightv, int *noinit, int *n, double *h, int *ldh, double *wr, double *wi, double *vr, double *vi, double *b, int *ldb, double *work, double *eps3, double *smlnum, double *bignum, int *info);
+void BLAS_FUNC(dlaev2)(double *a, double *b, double *c, double *rt1, double *rt2, double *cs1, double *sn1);
+void BLAS_FUNC(dlaexc)(int *wantq, int *n, double *t, int *ldt, double *q, int *ldq, int *j1, int *n1, int *n2, double *work, int *info);
+void BLAS_FUNC(dlag2)(double *a, int *lda, double *b, int *ldb, double *safmin, double *scale1, double *scale2, double *wr1, double *wr2, double *wi);
+void BLAS_FUNC(dlag2s)(int *m, int *n, double *a, int *lda, float *sa, int *ldsa, int *info);
+void BLAS_FUNC(dlags2)(int *upper, double *a1, double *a2, double *a3, double *b1, double *b2, double *b3, double *csu, double *snu, double *csv, double *snv, double *csq, double *snq);
+void BLAS_FUNC(dlagtf)(int *n, double *a, double *lambda_, double *b, double *c, double *tol, double *d, int *in_, int *info);
+void BLAS_FUNC(dlagtm)(char *trans, int *n, int *nrhs, double *alpha, double *dl, double *d, double *du, double *x, int *ldx, double *beta, double *b, int *ldb);
+void BLAS_FUNC(dlagts)(int *job, int *n, double *a, double *b, double *c, double *d, int *in_, double *y, double *tol, int *info);
+void BLAS_FUNC(dlagv2)(double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *csl, double *snl, double *csr, double *snr);
+void BLAS_FUNC(dlahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, int *info);
+void BLAS_FUNC(dlahr2)(int *n, int *k, int *nb, double *a, int *lda, double *tau, double *t, int *ldt, double *y, int *ldy);
+void BLAS_FUNC(dlaic1)(int *job, int *j, double *x, double *sest, double *w, double *gamma, double *sestpr, double *s, double *c);
+void BLAS_FUNC(dlaln2)(int *ltrans, int *na, int *nw, double *smin, double *ca, double *a, int *lda, double *d1, double *d2, double *b, int *ldb, double *wr, double *wi, double *x, int *ldx, double *scale, double *xnorm, int *info);
+void BLAS_FUNC(dlals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, double *b, int *ldb, double *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *work, int *info);
+void BLAS_FUNC(dlalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, double *b, int *ldb, double *bx, int *ldbx, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, double *d, double *e, double *b, int *ldb, double *rcond, int *rank, double *work, int *iwork, int *info);
+double BLAS_FUNC(dlamch)(char *cmach);
+void BLAS_FUNC(dlamrg)(int *n1, int *n2, double *a, int *dtrd1, int *dtrd2, int *index_bn);
+int BLAS_FUNC(dlaneg)(int *n, double *d, double *lld, double *sigma, double *pivmin, int *r);
+double BLAS_FUNC(dlangb)(char *norm, int *n, int *kl, int *ku, double *ab, int *ldab, double *work);
+double BLAS_FUNC(dlange)(char *norm, int *m, int *n, double *a, int *lda, double *work);
+double BLAS_FUNC(dlangt)(char *norm, int *n, double *dl, double *d_, double *du);
+double BLAS_FUNC(dlanhs)(char *norm, int *n, double *a, int *lda, double *work);
+double BLAS_FUNC(dlansb)(char *norm, char *uplo, int *n, int *k, double *ab, int *ldab, double *work);
+double BLAS_FUNC(dlansf)(char *norm, char *transr, char *uplo, int *n, double *a, double *work);
+double BLAS_FUNC(dlansp)(char *norm, char *uplo, int *n, double *ap, double *work);
+double BLAS_FUNC(dlanst)(char *norm, int *n, double *d_, double *e);
+double BLAS_FUNC(dlansy)(char *norm, char *uplo, int *n, double *a, int *lda, double *work);
+double BLAS_FUNC(dlantb)(char *norm, char *uplo, char *diag, int *n, int *k, double *ab, int *ldab, double *work);
+double BLAS_FUNC(dlantp)(char *norm, char *uplo, char *diag, int *n, double *ap, double *work);
+double BLAS_FUNC(dlantr)(char *norm, char *uplo, char *diag, int *m, int *n, double *a, int *lda, double *work);
+void BLAS_FUNC(dlanv2)(double *a, double *b, double *c, double *d, double *rt1r, double *rt1i, double *rt2r, double *rt2i, double *cs, double *sn);
+void BLAS_FUNC(dlapll)(int *n, double *x, int *incx, double *y, int *incy, double *ssmin);
+void BLAS_FUNC(dlapmr)(int *forwrd, int *m, int *n, double *x, int *ldx, int *k);
+void BLAS_FUNC(dlapmt)(int *forwrd, int *m, int *n, double *x, int *ldx, int *k);
+double BLAS_FUNC(dlapy2)(double *x, double *y);
+double BLAS_FUNC(dlapy3)(double *x, double *y, double *z);
+void BLAS_FUNC(dlaqgb)(int *m, int *n, int *kl, int *ku, double *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed);
+void BLAS_FUNC(dlaqge)(int *m, int *n, double *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed);
+void BLAS_FUNC(dlaqp2)(int *m, int *n, int *offset, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *work);
+void BLAS_FUNC(dlaqps)(int *m, int *n, int *offset, int *nb, int *kb, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *auxv, double *f, int *ldf);
+void BLAS_FUNC(dlaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, double *work, int *lwork, int *info);
+void BLAS_FUNC(dlaqr1)(int *n, double *h, int *ldh, double *sr1, double *si1, double *sr2, double *si2, double *v);
+void BLAS_FUNC(dlaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, int *ns, int *nd, double *sr, double *si, double *v, int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *ldwv, double *work, int *lwork);
+void BLAS_FUNC(dlaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, int *ns, int *nd, double *sr, double *si, double *v, int *ldv, int *nh, double *t, int *ldt, int *nv, double *wv, int *ldwv, double *work, int *lwork);
+void BLAS_FUNC(dlaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, double *h, int *ldh, double *wr, double *wi, int *iloz, int *ihiz, double *z, int *ldz, double *work, int *lwork, int *info);
+void BLAS_FUNC(dlaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, double *sr, double *si, double *h, int *ldh, int *iloz, int *ihiz, double *z, int *ldz, double *v, int *ldv, double *u, int *ldu, int *nv, double *wv, int *ldwv, int *nh, double *wh, int *ldwh);
+void BLAS_FUNC(dlaqsb)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(dlaqsp)(char *uplo, int *n, double *ap, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(dlaqsy)(char *uplo, int *n, double *a, int *lda, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(dlaqtr)(int *ltran, int *lreal, int *n, double *t, int *ldt, double *b, double *w, double *scale, double *x, double *work, int *info);
+void BLAS_FUNC(dlar1v)(int *n, int *b1, int *bn, double *lambda_, double *d, double *l, double *ld, double *lld, double *pivmin, double *gaptol, double *z, int *wantnc, int *negcnt, double *ztz, double *mingma, int *r, int *isuppz, double *nrminv, double *resid, double *rqcorr, double *work);
+void BLAS_FUNC(dlar2v)(int *n, double *x, double *y, double *z, int *incx, double *c, double *s, int *incc);
+void BLAS_FUNC(dlarf)(char *side, int *m, int *n, double *v, int *incv, double *tau, double *c, int *ldc, double *work);
+void BLAS_FUNC(dlarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *ldwork);
+void BLAS_FUNC(dlarfg)(int *n, double *alpha, double *x, int *incx, double *tau);
+void BLAS_FUNC(dlarfgp)(int *n, double *alpha, double *x, int *incx, double *tau);
+void BLAS_FUNC(dlarft)(char *direct, char *storev, int *n, int *k, double *v, int *ldv, double *tau, double *t, int *ldt);
+void BLAS_FUNC(dlarfx)(char *side, int *m, int *n, double *v, double *tau, double *c, int *ldc, double *work);
+void BLAS_FUNC(dlargv)(int *n, double *x, int *incx, double *y, int *incy, double *c, int *incc);
+void BLAS_FUNC(dlarnv)(int *idist, int *iseed, int *n, double *x);
+void BLAS_FUNC(dlarra)(int *n, double *d, double *e, double *e2, double *spltol, double *tnrm, int *nsplit, int *isplit, int *info);
+void BLAS_FUNC(dlarrb)(int *n, double *d, double *lld, int *ifirst, int *ilast, double *rtol1, double *rtol2, int *offset, double *w, double *wgap, double *werr, double *work, int *iwork, double *pivmin, double *spdiam, int *twist, int *info);
+void BLAS_FUNC(dlarrc)(char *jobt, int *n, double *vl, double *vu, double *d, double *e, double *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info);
+void BLAS_FUNC(dlarrd)(char *range, char *order, int *n, double *vl, double *vu, int *il, int *iu, double *gers, double *reltol, double *d, double *e, double *e2, double *pivmin, int *nsplit, int *isplit, int *m, double *w, double *werr, double *wl, double *wu, int *iblock, int *indexw, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlarre)(char *range, int *n, double *vl, double *vu, int *il, int *iu, double *d, double *e, double *e2, double *rtol1, double *rtol2, double *spltol, int *nsplit, int *isplit, int *m, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, double *pivmin, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlarrf)(int *n, double *d, double *l, double *ld, int *clstrt, int *clend, double *w, double *wgap, double *werr, double *spdiam, double *clgapl, double *clgapr, double *pivmin, double *sigma, double *dplus, double *lplus, double *work, int *info);
+void BLAS_FUNC(dlarrj)(int *n, double *d, double *e2, int *ifirst, int *ilast, double *rtol, int *offset, double *w, double *werr, double *work, int *iwork, double *pivmin, double *spdiam, int *info);
+void BLAS_FUNC(dlarrk)(int *n, int *iw, double *gl, double *gu, double *d, double *e2, double *pivmin, double *reltol, double *w, double *werr, int *info);
+void BLAS_FUNC(dlarrr)(int *n, double *d, double *e, int *info);
+void BLAS_FUNC(dlarrv)(int *n, double *vl, double *vu, double *d, double *l, double *pivmin, int *isplit, int *m, int *dol, int *dou, double *minrgp, double *rtol1, double *rtol2, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, double *z, int *ldz, int *isuppz, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlartg)(double *f, double *g, double *cs, double *sn, double *r);
+void BLAS_FUNC(dlartgp)(double *f, double *g, double *cs, double *sn, double *r);
+void BLAS_FUNC(dlartgs)(double *x, double *y, double *sigma, double *cs, double *sn);
+void BLAS_FUNC(dlartv)(int *n, double *x, int *incx, double *y, int *incy, double *c, double *s, int *incc);
+void BLAS_FUNC(dlaruv)(int *iseed, int *n, double *x);
+void BLAS_FUNC(dlarz)(char *side, int *m, int *n, int *l, double *v, int *incv, double *tau, double *c, int *ldc, double *work);
+void BLAS_FUNC(dlarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, double *v, int *ldv, double *t, int *ldt, double *c, int *ldc, double *work, int *ldwork);
+void BLAS_FUNC(dlarzt)(char *direct, char *storev, int *n, int *k, double *v, int *ldv, double *tau, double *t, int *ldt);
+void BLAS_FUNC(dlas2)(double *f, double *g, double *h, double *ssmin, double *ssmax);
+void BLAS_FUNC(dlascl)(char *type_bn, int *kl, int *ku, double *cfrom, double *cto, int *m, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dlasd0)(int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, int *smlsiz, int *iwork, double *work, int *info);
+void BLAS_FUNC(dlasd1)(int *nl, int *nr, int *sqre, double *d, double *alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, int *idxq, int *iwork, double *work, int *info);
+void BLAS_FUNC(dlasd2)(int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, double *dsigma, double *u2, int *ldu2, double *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info);
+void BLAS_FUNC(dlasd3)(int *nl, int *nr, int *sqre, int *k, double *d, double *q, int *ldq, double *dsigma, double *u, int *ldu, double *u2, int *ldu2, double *vt, int *ldvt, double *vt2, int *ldvt2, int *idxc, int *ctot, double *z, int *info);
+void BLAS_FUNC(dlasd4)(int *n, int *i, double *d, double *z, double *delta, double *rho, double *sigma, double *work, int *info);
+void BLAS_FUNC(dlasd5)(int *i, double *d, double *z, double *delta, double *rho, double *dsigma, double *work);
+void BLAS_FUNC(dlasd6)(int *icompq, int *nl, int *nr, int *sqre, double *d, double *vf, double *vl, double *alpha, double *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlasd7)(int *icompq, int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *zw, double *vf, double *vfw, double *vl, double *vlw, double *alpha, double *beta, double *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *c, double *s, int *info);
+void BLAS_FUNC(dlasd8)(int *icompq, int *k, double *d, double *z, double *vf, double *vl, double *difl, double *difr, int *lddifr, double *dsigma, double *work, int *info);
+void BLAS_FUNC(dlasda)(int *icompq, int *smlsiz, int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *work, int *iwork, int *info);
+void BLAS_FUNC(dlasdq)(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dlasdt)(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub);
+void BLAS_FUNC(dlaset)(char *uplo, int *m, int *n, double *alpha, double *beta, double *a, int *lda);
+void BLAS_FUNC(dlasq1)(int *n, double *d, double *e, double *work, int *info);
+void BLAS_FUNC(dlasq2)(int *n, double *z, int *info);
+void BLAS_FUNC(dlasq3)(int *i0, int *n0, double *z, int *pp, double *dmin, double *sigma, double *desig, double *qmax, int *nfail, int *iter, int *ndiv, int *ieee, int *ttype, double *dmin1, double *dmin2, double *dn, double *dn1, double *dn2, double *g, double *tau);
+void BLAS_FUNC(dlasq4)(int *i0, int *n0, double *z, int *pp, int *n0in, double *dmin, double *dmin1, double *dmin2, double *dn, double *dn1, double *dn2, double *tau, int *ttype, double *g);
+void BLAS_FUNC(dlasq6)(int *i0, int *n0, double *z, int *pp, double *dmin, double *dmin1, double *dmin2, double *dn, double *dnm1, double *dnm2);
+void BLAS_FUNC(dlasr)(char *side, char *pivot, char *direct, int *m, int *n, double *c, double *s, double *a, int *lda);
+void BLAS_FUNC(dlasrt)(char *id, int *n, double *d, int *info);
+void BLAS_FUNC(dlassq)(int *n, double *x, int *incx, double *scale, double *sumsq);
+void BLAS_FUNC(dlasv2)(double *f, double *g, double *h, double *ssmin, double *ssmax, double *snr, double *csr, double *snl, double *csl);
+void BLAS_FUNC(dlaswp)(int *n, double *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
+void BLAS_FUNC(dlasy2)(int *ltranl, int *ltranr, int *isgn, int *n1, int *n2, double *tl, int *ldtl, double *tr, int *ldtr, double *b, int *ldb, double *scale, double *x, int *ldx, double *xnorm, int *info);
+void BLAS_FUNC(dlasyf)(char *uplo, int *n, int *nb, int *kb, double *a, int *lda, int *ipiv, double *w, int *ldw, int *info);
+void BLAS_FUNC(dlat2s)(char *uplo, int *n, double *a, int *lda, float *sa, int *ldsa, int *info);
+void BLAS_FUNC(dlatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, double *ab, int *ldab, double *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(dlatdf)(int *ijob, int *n, double *z, int *ldz, double *rhs, double *rdsum, double *rdscal, int *ipiv, int *jpiv);
+void BLAS_FUNC(dlatps)(char *uplo, char *trans, char *diag, char *normin, int *n, double *ap, double *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(dlatrd)(char *uplo, int *n, int *nb, double *a, int *lda, double *e, double *tau, double *w, int *ldw);
+void BLAS_FUNC(dlatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, double *a, int *lda, double *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(dlatrz)(int *m, int *n, int *l, double *a, int *lda, double *tau, double *work);
+void BLAS_FUNC(dlauu2)(char *uplo, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dlauum)(char *uplo, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dopgtr)(char *uplo, int *n, double *ap, double *tau, double *q, int *ldq, double *work, int *info);
+void BLAS_FUNC(dopmtr)(char *side, char *uplo, char *trans, int *m, int *n, double *ap, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dorbdb)(char *trans, char *signs, int *m, int *p, int *q, double *x11, int *ldx11, double *x12, int *ldx12, double *x21, int *ldx21, double *x22, int *ldx22, double *theta, double *phi, double *taup1, double *taup2, double *tauq1, double *tauq2, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, double *x11, int *ldx11, double *x12, int *ldx12, double *x21, int *ldx21, double *x22, int *ldx22, double *theta, double *u1, int *ldu1, double *u2, int *ldu2, double *v1t, int *ldv1t, double *v2t, int *ldv2t, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dorg2l)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dorg2r)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dorgbr)(char *vect, int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorghr)(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorgl2)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dorglq)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorgql)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorgqr)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorgr2)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *info);
+void BLAS_FUNC(dorgrq)(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorgtr)(char *uplo, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorm2l)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dorm2r)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dormbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dorml2)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dormlq)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormql)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormqr)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormr2)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dormr3)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info);
+void BLAS_FUNC(dormrq)(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormrz)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dormtr)(char *side, char *uplo, char *trans, int *m, int *n, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info);
+void BLAS_FUNC(dpbcon)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpbequ)(char *uplo, int *n, int *kd, double *ab, int *ldab, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(dpbrfs)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpbstf)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info);
+void BLAS_FUNC(dpbsv)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info);
+void BLAS_FUNC(dpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *afb, int *ldafb, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpbtf2)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info);
+void BLAS_FUNC(dpbtrf)(char *uplo, int *n, int *kd, double *ab, int *ldab, int *info);
+void BLAS_FUNC(dpbtrs)(char *uplo, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info);
+void BLAS_FUNC(dpftrf)(char *transr, char *uplo, int *n, double *a, int *info);
+void BLAS_FUNC(dpftri)(char *transr, char *uplo, int *n, double *a, int *info);
+void BLAS_FUNC(dpftrs)(char *transr, char *uplo, int *n, int *nrhs, double *a, double *b, int *ldb, int *info);
+void BLAS_FUNC(dpocon)(char *uplo, int *n, double *a, int *lda, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpoequ)(int *n, double *a, int *lda, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(dpoequb)(int *n, double *a, int *lda, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(dporfs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dposv)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info);
+void BLAS_FUNC(dposvx)(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpotf2)(char *uplo, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dpotrf)(char *uplo, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dpotri)(char *uplo, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dpotrs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info);
+void BLAS_FUNC(dppcon)(char *uplo, int *n, double *ap, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dppequ)(char *uplo, int *n, double *ap, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(dpprfs)(char *uplo, int *n, int *nrhs, double *ap, double *afp, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dppsv)(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info);
+void BLAS_FUNC(dppsvx)(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, char *equed, double *s, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dpptrf)(char *uplo, int *n, double *ap, int *info);
+void BLAS_FUNC(dpptri)(char *uplo, int *n, double *ap, int *info);
+void BLAS_FUNC(dpptrs)(char *uplo, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info);
+void BLAS_FUNC(dpstf2)(char *uplo, int *n, double *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info);
+void BLAS_FUNC(dpstrf)(char *uplo, int *n, double *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info);
+void BLAS_FUNC(dptcon)(int *n, double *d, double *e, double *anorm, double *rcond, double *work, int *info);
+void BLAS_FUNC(dpteqr)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dptrfs)(int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *info);
+void BLAS_FUNC(dptsv)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info);
+void BLAS_FUNC(dptsvx)(char *fact, int *n, int *nrhs, double *d, double *e, double *df, double *ef, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *info);
+void BLAS_FUNC(dpttrf)(int *n, double *d, double *e, int *info);
+void BLAS_FUNC(dpttrs)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb, int *info);
+void BLAS_FUNC(dptts2)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb);
+void BLAS_FUNC(drscl)(int *n, double *sa, double *sx, int *incx);
+void BLAS_FUNC(dsbev)(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dsbevd)(char *jobz, char *uplo, int *n, int *kd, double *ab, int *ldab, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, double *ab, int *ldab, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *x, int *ldx, double *work, int *info);
+void BLAS_FUNC(dsbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dsbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int *ldbb, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsbtrd)(char *vect, char *uplo, int *n, int *kd, double *ab, int *ldab, double *d, double *e, double *q, int *ldq, double *work, int *info);
+void BLAS_FUNC(dsfrk)(char *transr, char *uplo, char *trans, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c);
+void BLAS_FUNC(dsgesv)(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *work, float *swork, int *iter, int *info);
+void BLAS_FUNC(dspcon)(char *uplo, int *n, double *ap, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dspev)(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dspevd)(char *jobz, char *uplo, int *n, double *ap, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dspevx)(char *jobz, char *range, char *uplo, int *n, double *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dspgst)(int *itype, char *uplo, int *n, double *ap, double *bp, int *info);
+void BLAS_FUNC(dspgv)(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dspgvd)(int *itype, char *jobz, char *uplo, int *n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dspgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, double *ap, double *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsposv)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *x, int *ldx, double *work, float *swork, int *iter, int *info);
+void BLAS_FUNC(dsprfs)(char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dspsv)(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dspsvx)(char *fact, char *uplo, int *n, int *nrhs, double *ap, double *afp, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dsptrd)(char *uplo, int *n, double *ap, double *d, double *e, double *tau, int *info);
+void BLAS_FUNC(dsptrf)(char *uplo, int *n, double *ap, int *ipiv, int *info);
+void BLAS_FUNC(dsptri)(char *uplo, int *n, double *ap, int *ipiv, double *work, int *info);
+void BLAS_FUNC(dsptrs)(char *uplo, int *n, int *nrhs, double *ap, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dstebz)(char *range, char *order, int *n, double *vl, double *vu, int *il, int *iu, double *abstol, double *d, double *e, int *m, int *nsplit, double *w, int *iblock, int *isplit, double *work, int *iwork, int *info);
+void BLAS_FUNC(dstedc)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dstegr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dstein)(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dstemr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, int *m, double *w, double *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsteqr)(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dsterf)(int *n, double *d, double *e, int *info);
+void BLAS_FUNC(dstev)(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(dstevd)(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dstevr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dstevx)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsycon)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *anorm, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dsyconv)(char *uplo, char *way, int *n, double *a, int *lda, int *ipiv, double *work, int *info);
+void BLAS_FUNC(dsyequb)(char *uplo, int *n, double *a, int *lda, double *s, double *scond, double *amax, double *work, int *info);
+void BLAS_FUNC(dsyev)(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsyevd)(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsyevr)(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsyevx)(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsygs2)(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info);
+void BLAS_FUNC(dsygst)(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info);
+void BLAS_FUNC(dsygv)(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsygvd)(int *itype, char *jobz, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dsygvx)(int *itype, char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(dsyrfs)(char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dsysv)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsysvx)(char *fact, char *uplo, int *n, int *nrhs, double *a, int *lda, double *af, int *ldaf, int *ipiv, double *b, int *ldb, double *x, int *ldx, double *rcond, double *ferr, double *berr, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dsyswapr)(char *uplo, int *n, double *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(dsytd2)(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, int *info);
+void BLAS_FUNC(dsytf2)(char *uplo, int *n, double *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(dsytrd)(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsytrf)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsytri)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *info);
+void BLAS_FUNC(dsytri2)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *lwork, int *info);
+void BLAS_FUNC(dsytri2x)(char *uplo, int *n, double *a, int *lda, int *ipiv, double *work, int *nb, int *info);
+void BLAS_FUNC(dsytrs)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
+void BLAS_FUNC(dsytrs2)(char *uplo, int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, double *work, int *info);
+void BLAS_FUNC(dtbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, double *ab, int *ldab, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, double *ab, int *ldab, double *b, int *ldb, int *info);
+void BLAS_FUNC(dtfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, double *alpha, double *a, double *b, int *ldb);
+void BLAS_FUNC(dtftri)(char *transr, char *uplo, char *diag, int *n, double *a, int *info);
+void BLAS_FUNC(dtfttp)(char *transr, char *uplo, int *n, double *arf, double *ap, int *info);
+void BLAS_FUNC(dtfttr)(char *transr, char *uplo, int *n, double *arf, double *a, int *lda, int *info);
+void BLAS_FUNC(dtgevc)(char *side, char *howmny, int *select, int *n, double *s, int *lds, double *p, int *ldp, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info);
+void BLAS_FUNC(dtgex2)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *j1, int *n1, int *n2, double *work, int *lwork, int *info);
+void BLAS_FUNC(dtgexc)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double *q, int *ldq, double *z, int *ldz, int *ifst, int *ilst, double *work, int *lwork, int *info);
+void BLAS_FUNC(dtgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *q, int *ldq, double *z, int *ldz, int *m, double *pl, double *pr, double *dif, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dtgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, double *a, int *lda, double *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, double *work, int *ncycle, int *info);
+void BLAS_FUNC(dtgsna)(char *job, char *howmny, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *dif, int *mm, int *m, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dtgsy2)(char *trans, int *ijob, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double *scale, double *rdsum, double *rdscal, int *iwork, int *pq, int *info);
+void BLAS_FUNC(dtgsyl)(char *trans, int *ijob, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double *scale, double *dif, double *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(dtpcon)(char *norm, char *uplo, char *diag, int *n, double *ap, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, double *v, int *ldv, double *t, int *ldt, double *a, int *lda, double *b, int *ldb, double *work, int *info);
+void BLAS_FUNC(dtpqrt)(int *m, int *n, int *l, int *nb, double *a, int *lda, double *b, int *ldb, double *t, int *ldt, double *work, int *info);
+void BLAS_FUNC(dtpqrt2)(int *m, int *n, int *l, double *a, int *lda, double *b, int *ldb, double *t, int *ldt, int *info);
+void BLAS_FUNC(dtprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, double *v, int *ldv, double *t, int *ldt, double *a, int *lda, double *b, int *ldb, double *work, int *ldwork);
+void BLAS_FUNC(dtprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtptri)(char *uplo, char *diag, int *n, double *ap, int *info);
+void BLAS_FUNC(dtptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *ap, double *b, int *ldb, int *info);
+void BLAS_FUNC(dtpttf)(char *transr, char *uplo, int *n, double *ap, double *arf, int *info);
+void BLAS_FUNC(dtpttr)(char *uplo, int *n, double *ap, double *a, int *lda, int *info);
+void BLAS_FUNC(dtrcon)(char *norm, char *uplo, char *diag, int *n, double *a, int *lda, double *rcond, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtrevc)(char *side, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, int *mm, int *m, double *work, int *info);
+void BLAS_FUNC(dtrexc)(char *compq, int *n, double *t, int *ldt, double *q, int *ldq, int *ifst, int *ilst, double *work, int *info);
+void BLAS_FUNC(dtrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double *x, int *ldx, double *ferr, double *berr, double *work, int *iwork, int *info);
+void BLAS_FUNC(dtrsen)(char *job, char *compq, int *select, int *n, double *t, int *ldt, double *q, int *ldq, double *wr, double *wi, int *m, double *s, double *sep, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(dtrsna)(char *job, char *howmny, int *select, int *n, double *t, int *ldt, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *sep, int *mm, int *m, double *work, int *ldwork, int *iwork, int *info);
+void BLAS_FUNC(dtrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *scale, int *info);
+void BLAS_FUNC(dtrti2)(char *uplo, char *diag, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dtrtri)(char *uplo, char *diag, int *n, double *a, int *lda, int *info);
+void BLAS_FUNC(dtrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int *info);
+void BLAS_FUNC(dtrttf)(char *transr, char *uplo, int *n, double *a, int *lda, double *arf, int *info);
+void BLAS_FUNC(dtrttp)(char *uplo, int *n, double *a, int *lda, double *ap, int *info);
+void BLAS_FUNC(dtzrzf)(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info);
+double BLAS_FUNC(dzsum1)(int *n, npy_complex128 *cx, int *incx);
+int BLAS_FUNC(icmax1)(int *n, npy_complex64 *cx, int *incx);
+int BLAS_FUNC(ieeeck)(int *ispec, float *zero, float *one);
+int BLAS_FUNC(ilaclc)(int *m, int *n, npy_complex64 *a, int *lda);
+int BLAS_FUNC(ilaclr)(int *m, int *n, npy_complex64 *a, int *lda);
+int BLAS_FUNC(iladiag)(char *diag);
+int BLAS_FUNC(iladlc)(int *m, int *n, double *a, int *lda);
+int BLAS_FUNC(iladlr)(int *m, int *n, double *a, int *lda);
+int BLAS_FUNC(ilaprec)(char *prec);
+int BLAS_FUNC(ilaslc)(int *m, int *n, float *a, int *lda);
+int BLAS_FUNC(ilaslr)(int *m, int *n, float *a, int *lda);
+int BLAS_FUNC(ilatrans)(char *trans);
+int BLAS_FUNC(ilauplo)(char *uplo);
+void BLAS_FUNC(ilaver)(int *vers_major, int *vers_minor, int *vers_patch);
+int BLAS_FUNC(ilazlc)(int *m, int *n, npy_complex128 *a, int *lda);
+int BLAS_FUNC(ilazlr)(int *m, int *n, npy_complex128 *a, int *lda);
+int BLAS_FUNC(izmax1)(int *n, npy_complex128 *cx, int *incx);
+void BLAS_FUNC(sbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, float *theta, float *phi, float *u1, int *ldu1, float *u2, int *ldu2, float *v1t, int *ldv1t, float *v2t, int *ldv2t, float *b11d, float *b11e, float *b12d, float *b12e, float *b21d, float *b21e, float *b22d, float *b22e, float *work, int *lwork, int *info);
+void BLAS_FUNC(sbdsdc)(char *uplo, char *compq, int *n, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, float *q, int *iq, float *work, int *iwork, int *info);
+void BLAS_FUNC(sbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *work, int *info);
+float BLAS_FUNC(scsum1)(int *n, npy_complex64 *cx, int *incx);
+void BLAS_FUNC(sdisna)(char *job, int *m, int *n, float *d, float *sep, int *info);
+void BLAS_FUNC(sgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *pt, int *ldpt, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sgbcon)(char *norm, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgbequ)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(sgbequb)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(sgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgbsv)(int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgbtf2)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(sgbtrf)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(sgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, float *ab, int *ldab, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sgebak)(char *job, char *side, int *n, int *ilo, int *ihi, float *scale, int *m, float *v, int *ldv, int *info);
+void BLAS_FUNC(sgebal)(char *job, int *n, float *a, int *lda, int *ilo, int *ihi, float *scale, int *info);
+void BLAS_FUNC(sgebd2)(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *info);
+void BLAS_FUNC(sgebrd)(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgecon)(char *norm, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgeequ)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(sgeequb)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, int *info);
+void BLAS_FUNC(sgees)(char *jobvs, char *sort, _sselect2 *select, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *work, int *lwork, int *bwork, int *info);
+void BLAS_FUNC(sgeesx)(char *jobvs, char *sort, _sselect2 *select, char *sense, int *n, float *a, int *lda, int *sdim, float *wr, float *wi, float *vs, int *ldvs, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(sgeev)(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *scale, float *abnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(sgehd2)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgehrd)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgejsv)(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, float *a, int *lda, float *sva, float *u, int *ldu, float *v, int *ldv, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(sgelq2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgelqf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgels)(char *trans, int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgelsd)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(sgelss)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *s, float *rcond, int *rank, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgelsy)(int *m, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *jpvt, float *rcond, int *rank, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sgeql2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgeqlf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgeqp3)(int *m, int *n, float *a, int *lda, int *jpvt, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgeqr2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgeqr2p)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgeqrf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgeqrfp)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgeqrt)(int *m, int *n, int *nb, float *a, int *lda, float *t, int *ldt, float *work, int *info);
+void BLAS_FUNC(sgeqrt2)(int *m, int *n, float *a, int *lda, float *t, int *ldt, int *info);
+void BLAS_FUNC(sgeqrt3)(int *m, int *n, float *a, int *lda, float *t, int *ldt, int *info);
+void BLAS_FUNC(sgerfs)(char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgerq2)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sgerqf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgesc2)(int *n, float *a, int *lda, float *rhs, int *ipiv, int *jpiv, float *scale);
+void BLAS_FUNC(sgesdd)(char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(sgesv)(int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sgesvd)(char *jobu, char *jobvt, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgesvj)(char *joba, char *jobu, char *jobv, int *m, int *n, float *a, int *lda, float *sva, int *mv, float *v, int *ldv, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgesvx)(char *fact, char *trans, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, char *equed, float *r, float *c, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgetc2)(int *n, float *a, int *lda, int *ipiv, int *jpiv, int *info);
+void BLAS_FUNC(sgetf2)(int *m, int *n, float *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(sgetrf)(int *m, int *n, float *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(sgetri)(int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgetrs)(char *trans, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sggbak)(char *job, char *side, int *n, int *ilo, int *ihi, float *lscale, float *rscale, int *m, float *v, int *ldv, int *info);
+void BLAS_FUNC(sggbal)(char *job, int *n, float *a, int *lda, float *b, int *ldb, int *ilo, int *ihi, float *lscale, float *rscale, float *work, int *info);
+void BLAS_FUNC(sgges)(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *work, int *lwork, int *bwork, int *info);
+void BLAS_FUNC(sggesx)(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, char *sense, int *n, float *a, int *lda, float *b, int *ldb, int *sdim, float *alphar, float *alphai, float *beta, float *vsl, int *ldvsl, float *vsr, int *ldvsr, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(sggev)(char *jobvl, char *jobvr, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, float *work, int *lwork, int *info);
+void BLAS_FUNC(sggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *vl, int *ldvl, float *vr, int *ldvr, int *ilo, int *ihi, float *lscale, float *rscale, float *abnrm, float *bbnrm, float *rconde, float *rcondv, float *work, int *lwork, int *iwork, int *bwork, int *info);
+void BLAS_FUNC(sggglm)(int *n, int *m, int *p, float *a, int *lda, float *b, int *ldb, float *d, float *x, float *y, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *info);
+void BLAS_FUNC(sgglse)(int *m, int *n, int *p, float *a, int *lda, float *b, int *ldb, float *c, float *d, float *x, float *work, int *lwork, int *info);
+void BLAS_FUNC(sggqrf)(int *n, int *m, int *p, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info);
+void BLAS_FUNC(sggrqf)(int *m, int *p, int *n, float *a, int *lda, float *taua, float *b, int *ldb, float *taub, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgsvj0)(char *jobv, int *m, int *n, float *a, int *lda, float *d, float *sva, int *mv, float *v, int *ldv, float *eps, float *sfmin, float *tol, int *nsweep, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgsvj1)(char *jobv, int *m, int *n, int *n1, float *a, int *lda, float *d, float *sva, int *mv, float *v, int *ldv, float *eps, float *sfmin, float *tol, int *nsweep, float *work, int *lwork, int *info);
+void BLAS_FUNC(sgtcon)(char *norm, int *n, float *dl, float *d, float *du, float *du2, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgtrfs)(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgtsv)(int *n, int *nrhs, float *dl, float *d, float *du, float *b, int *ldb, int *info);
+void BLAS_FUNC(sgtsvx)(char *fact, char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *dlf, float *df, float *duf, float *du2, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sgttrf)(int *n, float *dl, float *d, float *du, float *du2, int *ipiv, int *info);
+void BLAS_FUNC(sgttrs)(char *trans, int *n, int *nrhs, float *dl, float *d, float *du, float *du2, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sgtts2)(int *itrans, int *n, int *nrhs, float *dl, float *d, float *du, float *du2, int *ipiv, float *b, int *ldb);
+void BLAS_FUNC(shgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *t, int *ldt, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, float *work, int *lwork, int *info);
+void BLAS_FUNC(shsein)(char *side, char *eigsrc, char *initv, int *select, int *n, float *h, int *ldh, float *wr, float *wi, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *ifaill, int *ifailr, int *info);
+void BLAS_FUNC(shseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, float *z, int *ldz, float *work, int *lwork, int *info);
+void BLAS_FUNC(slabad)(float *small, float *large);
+void BLAS_FUNC(slabrd)(int *m, int *n, int *nb, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *x, int *ldx, float *y, int *ldy);
+void BLAS_FUNC(slacn2)(int *n, float *v, float *x, int *isgn, float *est, int *kase, int *isave);
+void BLAS_FUNC(slacon)(int *n, float *v, float *x, int *isgn, float *est, int *kase);
+void BLAS_FUNC(slacpy)(char *uplo, int *m, int *n, float *a, int *lda, float *b, int *ldb);
+void BLAS_FUNC(sladiv)(float *a, float *b, float *c, float *d, float *p, float *q);
+void BLAS_FUNC(slae2)(float *a, float *b, float *c, float *rt1, float *rt2);
+void BLAS_FUNC(slaebz)(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, float *abstol, float *reltol, float *pivmin, float *d, float *e, float *e2, int *nval, float *ab, float *c, int *mout, int *nab, float *work, int *iwork, int *info);
+void BLAS_FUNC(slaed0)(int *icompq, int *qsiz, int *n, float *d, float *e, float *q, int *ldq, float *qstore, int *ldqs, float *work, int *iwork, int *info);
+void BLAS_FUNC(slaed1)(int *n, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *work, int *iwork, int *info);
+void BLAS_FUNC(slaed2)(int *k, int *n, int *n1, float *d, float *q, int *ldq, int *indxq, float *rho, float *z, float *dlamda, float *w, float *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info);
+void BLAS_FUNC(slaed3)(int *k, int *n, int *n1, float *d, float *q, int *ldq, float *rho, float *dlamda, float *q2, int *indx, int *ctot, float *w, float *s, int *info);
+void BLAS_FUNC(slaed4)(int *n, int *i, float *d, float *z, float *delta, float *rho, float *dlam, int *info);
+void BLAS_FUNC(slaed5)(int *i, float *d, float *z, float *delta, float *rho, float *dlam);
+void BLAS_FUNC(slaed6)(int *kniter, int *orgati, float *rho, float *d, float *z, float *finit, float *tau, int *info);
+void BLAS_FUNC(slaed7)(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, float *work, int *iwork, int *info);
+void BLAS_FUNC(slaed8)(int *icompq, int *k, int *n, int *qsiz, float *d, float *q, int *ldq, int *indxq, float *rho, int *cutpnt, float *z, float *dlamda, float *q2, int *ldq2, float *w, int *perm, int *givptr, int *givcol, float *givnum, int *indxp, int *indx, int *info);
+void BLAS_FUNC(slaed9)(int *k, int *kstart, int *kstop, int *n, float *d, float *q, int *ldq, float *rho, float *dlamda, float *w, float *s, int *lds, int *info);
+void BLAS_FUNC(slaeda)(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, float *givnum, float *q, int *qptr, float *z, float *ztemp, int *info);
+void BLAS_FUNC(slaein)(int *rightv, int *noinit, int *n, float *h, int *ldh, float *wr, float *wi, float *vr, float *vi, float *b, int *ldb, float *work, float *eps3, float *smlnum, float *bignum, int *info);
+void BLAS_FUNC(slaev2)(float *a, float *b, float *c, float *rt1, float *rt2, float *cs1, float *sn1);
+void BLAS_FUNC(slaexc)(int *wantq, int *n, float *t, int *ldt, float *q, int *ldq, int *j1, int *n1, int *n2, float *work, int *info);
+void BLAS_FUNC(slag2)(float *a, int *lda, float *b, int *ldb, float *safmin, float *scale1, float *scale2, float *wr1, float *wr2, float *wi);
+void BLAS_FUNC(slag2d)(int *m, int *n, float *sa, int *ldsa, double *a, int *lda, int *info);
+void BLAS_FUNC(slags2)(int *upper, float *a1, float *a2, float *a3, float *b1, float *b2, float *b3, float *csu, float *snu, float *csv, float *snv, float *csq, float *snq);
+void BLAS_FUNC(slagtf)(int *n, float *a, float *lambda_, float *b, float *c, float *tol, float *d, int *in_, int *info);
+void BLAS_FUNC(slagtm)(char *trans, int *n, int *nrhs, float *alpha, float *dl, float *d, float *du, float *x, int *ldx, float *beta, float *b, int *ldb);
+void BLAS_FUNC(slagts)(int *job, int *n, float *a, float *b, float *c, float *d, int *in_, float *y, float *tol, int *info);
+void BLAS_FUNC(slagv2)(float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *csl, float *snl, float *csr, float *snr);
+void BLAS_FUNC(slahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, int *info);
+void BLAS_FUNC(slahr2)(int *n, int *k, int *nb, float *a, int *lda, float *tau, float *t, int *ldt, float *y, int *ldy);
+void BLAS_FUNC(slaic1)(int *job, int *j, float *x, float *sest, float *w, float *gamma, float *sestpr, float *s, float *c);
+void BLAS_FUNC(slaln2)(int *ltrans, int *na, int *nw, float *smin, float *ca, float *a, int *lda, float *d1, float *d2, float *b, int *ldb, float *wr, float *wi, float *x, int *ldx, float *scale, float *xnorm, int *info);
+void BLAS_FUNC(slals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, float *b, int *ldb, float *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *work, int *info);
+void BLAS_FUNC(slalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, float *b, int *ldb, float *bx, int *ldbx, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *work, int *iwork, int *info);
+void BLAS_FUNC(slalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, float *d, float *e, float *b, int *ldb, float *rcond, int *rank, float *work, int *iwork, int *info);
+float BLAS_FUNC(slamch)(char *cmach);
+void BLAS_FUNC(slamrg)(int *n1, int *n2, float *a, int *strd1, int *strd2, int *index_bn);
+float BLAS_FUNC(slangb)(char *norm, int *n, int *kl, int *ku, float *ab, int *ldab, float *work);
+float BLAS_FUNC(slange)(char *norm, int *m, int *n, float *a, int *lda, float *work);
+float BLAS_FUNC(slangt)(char *norm, int *n, float *dl, float *d, float *du);
+float BLAS_FUNC(slanhs)(char *norm, int *n, float *a, int *lda, float *work);
+float BLAS_FUNC(slansb)(char *norm, char *uplo, int *n, int *k, float *ab, int *ldab, float *work);
+float BLAS_FUNC(slansf)(char *norm, char *transr, char *uplo, int *n, float *a, float *work);
+float BLAS_FUNC(slansp)(char *norm, char *uplo, int *n, float *ap, float *work);
+float BLAS_FUNC(slanst)(char *norm, int *n, float *d, float *e);
+float BLAS_FUNC(slansy)(char *norm, char *uplo, int *n, float *a, int *lda, float *work);
+float BLAS_FUNC(slantb)(char *norm, char *uplo, char *diag, int *n, int *k, float *ab, int *ldab, float *work);
+float BLAS_FUNC(slantp)(char *norm, char *uplo, char *diag, int *n, float *ap, float *work);
+float BLAS_FUNC(slantr)(char *norm, char *uplo, char *diag, int *m, int *n, float *a, int *lda, float *work);
+void BLAS_FUNC(slanv2)(float *a, float *b, float *c, float *d, float *rt1r, float *rt1i, float *rt2r, float *rt2i, float *cs, float *sn);
+void BLAS_FUNC(slapll)(int *n, float *x, int *incx, float *y, int *incy, float *ssmin);
+void BLAS_FUNC(slapmr)(int *forwrd, int *m, int *n, float *x, int *ldx, int *k);
+void BLAS_FUNC(slapmt)(int *forwrd, int *m, int *n, float *x, int *ldx, int *k);
+float BLAS_FUNC(slapy2)(float *x, float *y);
+float BLAS_FUNC(slapy3)(float *x, float *y, float *z);
+void BLAS_FUNC(slaqgb)(int *m, int *n, int *kl, int *ku, float *ab, int *ldab, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed);
+void BLAS_FUNC(slaqge)(int *m, int *n, float *a, int *lda, float *r, float *c, float *rowcnd, float *colcnd, float *amax, char *equed);
+void BLAS_FUNC(slaqp2)(int *m, int *n, int *offset, float *a, int *lda, int *jpvt, float *tau, float *vn1, float *vn2, float *work);
+void BLAS_FUNC(slaqps)(int *m, int *n, int *offset, int *nb, int *kb, float *a, int *lda, int *jpvt, float *tau, float *vn1, float *vn2, float *auxv, float *f, int *ldf);
+void BLAS_FUNC(slaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, float *work, int *lwork, int *info);
+void BLAS_FUNC(slaqr1)(int *n, float *h, int *ldh, float *sr1, float *si1, float *sr2, float *si2, float *v);
+void BLAS_FUNC(slaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, int *ns, int *nd, float *sr, float *si, float *v, int *ldv, int *nh, float *t, int *ldt, int *nv, float *wv, int *ldwv, float *work, int *lwork);
+void BLAS_FUNC(slaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, int *ns, int *nd, float *sr, float *si, float *v, int *ldv, int *nh, float *t, int *ldt, int *nv, float *wv, int *ldwv, float *work, int *lwork);
+void BLAS_FUNC(slaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, float *h, int *ldh, float *wr, float *wi, int *iloz, int *ihiz, float *z, int *ldz, float *work, int *lwork, int *info);
+void BLAS_FUNC(slaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, float *sr, float *si, float *h, int *ldh, int *iloz, int *ihiz, float *z, int *ldz, float *v, int *ldv, float *u, int *ldu, int *nv, float *wv, int *ldwv, int *nh, float *wh, int *ldwh);
+void BLAS_FUNC(slaqsb)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(slaqsp)(char *uplo, int *n, float *ap, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(slaqsy)(char *uplo, int *n, float *a, int *lda, float *s, float *scond, float *amax, char *equed);
+void BLAS_FUNC(slaqtr)(int *ltran, int *lreal, int *n, float *t, int *ldt, float *b, float *w, float *scale, float *x, float *work, int *info);
+void BLAS_FUNC(slar1v)(int *n, int *b1, int *bn, float *lambda_, float *d, float *l, float *ld, float *lld, float *pivmin, float *gaptol, float *z, int *wantnc, int *negcnt, float *ztz, float *mingma, int *r, int *isuppz, float *nrminv, float *resid, float *rqcorr, float *work);
+void BLAS_FUNC(slar2v)(int *n, float *x, float *y, float *z, int *incx, float *c, float *s, int *incc);
+void BLAS_FUNC(slarf)(char *side, int *m, int *n, float *v, int *incv, float *tau, float *c, int *ldc, float *work);
+void BLAS_FUNC(slarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *ldwork);
+void BLAS_FUNC(slarfg)(int *n, float *alpha, float *x, int *incx, float *tau);
+void BLAS_FUNC(slarfgp)(int *n, float *alpha, float *x, int *incx, float *tau);
+void BLAS_FUNC(slarft)(char *direct, char *storev, int *n, int *k, float *v, int *ldv, float *tau, float *t, int *ldt);
+void BLAS_FUNC(slarfx)(char *side, int *m, int *n, float *v, float *tau, float *c, int *ldc, float *work);
+void BLAS_FUNC(slargv)(int *n, float *x, int *incx, float *y, int *incy, float *c, int *incc);
+void BLAS_FUNC(slarnv)(int *idist, int *iseed, int *n, float *x);
+void BLAS_FUNC(slarra)(int *n, float *d, float *e, float *e2, float *spltol, float *tnrm, int *nsplit, int *isplit, int *info);
+void BLAS_FUNC(slarrb)(int *n, float *d, float *lld, int *ifirst, int *ilast, float *rtol1, float *rtol2, int *offset, float *w, float *wgap, float *werr, float *work, int *iwork, float *pivmin, float *spdiam, int *twist, int *info);
+void BLAS_FUNC(slarrc)(char *jobt, int *n, float *vl, float *vu, float *d, float *e, float *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info);
+void BLAS_FUNC(slarrd)(char *range, char *order, int *n, float *vl, float *vu, int *il, int *iu, float *gers, float *reltol, float *d, float *e, float *e2, float *pivmin, int *nsplit, int *isplit, int *m, float *w, float *werr, float *wl, float *wu, int *iblock, int *indexw, float *work, int *iwork, int *info);
+void BLAS_FUNC(slarre)(char *range, int *n, float *vl, float *vu, int *il, int *iu, float *d, float *e, float *e2, float *rtol1, float *rtol2, float *spltol, int *nsplit, int *isplit, int *m, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, float *pivmin, float *work, int *iwork, int *info);
+void BLAS_FUNC(slarrf)(int *n, float *d, float *l, float *ld, int *clstrt, int *clend, float *w, float *wgap, float *werr, float *spdiam, float *clgapl, float *clgapr, float *pivmin, float *sigma, float *dplus, float *lplus, float *work, int *info);
+void BLAS_FUNC(slarrj)(int *n, float *d, float *e2, int *ifirst, int *ilast, float *rtol, int *offset, float *w, float *werr, float *work, int *iwork, float *pivmin, float *spdiam, int *info);
+void BLAS_FUNC(slarrk)(int *n, int *iw, float *gl, float *gu, float *d, float *e2, float *pivmin, float *reltol, float *w, float *werr, int *info);
+void BLAS_FUNC(slarrr)(int *n, float *d, float *e, int *info);
+void BLAS_FUNC(slarrv)(int *n, float *vl, float *vu, float *d, float *l, float *pivmin, int *isplit, int *m, int *dol, int *dou, float *minrgp, float *rtol1, float *rtol2, float *w, float *werr, float *wgap, int *iblock, int *indexw, float *gers, float *z, int *ldz, int *isuppz, float *work, int *iwork, int *info);
+void BLAS_FUNC(slartg)(float *f, float *g, float *cs, float *sn, float *r);
+void BLAS_FUNC(slartgp)(float *f, float *g, float *cs, float *sn, float *r);
+void BLAS_FUNC(slartgs)(float *x, float *y, float *sigma, float *cs, float *sn);
+void BLAS_FUNC(slartv)(int *n, float *x, int *incx, float *y, int *incy, float *c, float *s, int *incc);
+void BLAS_FUNC(slaruv)(int *iseed, int *n, float *x);
+void BLAS_FUNC(slarz)(char *side, int *m, int *n, int *l, float *v, int *incv, float *tau, float *c, int *ldc, float *work);
+void BLAS_FUNC(slarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, float *v, int *ldv, float *t, int *ldt, float *c, int *ldc, float *work, int *ldwork);
+void BLAS_FUNC(slarzt)(char *direct, char *storev, int *n, int *k, float *v, int *ldv, float *tau, float *t, int *ldt);
+void BLAS_FUNC(slas2)(float *f, float *g, float *h, float *ssmin, float *ssmax);
+void BLAS_FUNC(slascl)(char *type_bn, int *kl, int *ku, float *cfrom, float *cto, int *m, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(slasd0)(int *n, int *sqre, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, int *smlsiz, int *iwork, float *work, int *info);
+void BLAS_FUNC(slasd1)(int *nl, int *nr, int *sqre, float *d, float *alpha, float *beta, float *u, int *ldu, float *vt, int *ldvt, int *idxq, int *iwork, float *work, int *info);
+void BLAS_FUNC(slasd2)(int *nl, int *nr, int *sqre, int *k, float *d, float *z, float *alpha, float *beta, float *u, int *ldu, float *vt, int *ldvt, float *dsigma, float *u2, int *ldu2, float *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info);
+void BLAS_FUNC(slasd3)(int *nl, int *nr, int *sqre, int *k, float *d, float *q, int *ldq, float *dsigma, float *u, int *ldu, float *u2, int *ldu2, float *vt, int *ldvt, float *vt2, int *ldvt2, int *idxc, int *ctot, float *z, int *info);
+void BLAS_FUNC(slasd4)(int *n, int *i, float *d, float *z, float *delta, float *rho, float *sigma, float *work, int *info);
+void BLAS_FUNC(slasd5)(int *i, float *d, float *z, float *delta, float *rho, float *dsigma, float *work);
+void BLAS_FUNC(slasd6)(int *icompq, int *nl, int *nr, int *sqre, float *d, float *vf, float *vl, float *alpha, float *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *poles, float *difl, float *difr, float *z, int *k, float *c, float *s, float *work, int *iwork, int *info);
+void BLAS_FUNC(slasd7)(int *icompq, int *nl, int *nr, int *sqre, int *k, float *d, float *z, float *zw, float *vf, float *vfw, float *vl, float *vlw, float *alpha, float *beta, float *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, float *givnum, int *ldgnum, float *c, float *s, int *info);
+void BLAS_FUNC(slasd8)(int *icompq, int *k, float *d, float *z, float *vf, float *vl, float *difl, float *difr, int *lddifr, float *dsigma, float *work, int *info);
+void BLAS_FUNC(slasda)(int *icompq, int *smlsiz, int *n, int *sqre, float *d, float *e, float *u, int *ldu, float *vt, int *k, float *difl, float *difr, float *z, float *poles, int *givptr, int *givcol, int *ldgcol, int *perm, float *givnum, float *c, float *s, float *work, int *iwork, int *info);
+void BLAS_FUNC(slasdq)(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(slasdt)(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub);
+void BLAS_FUNC(slaset)(char *uplo, int *m, int *n, float *alpha, float *beta, float *a, int *lda);
+void BLAS_FUNC(slasq1)(int *n, float *d, float *e, float *work, int *info);
+void BLAS_FUNC(slasq2)(int *n, float *z, int *info);
+void BLAS_FUNC(slasq3)(int *i0, int *n0, float *z, int *pp, float *dmin, float *sigma, float *desig, float *qmax, int *nfail, int *iter, int *ndiv, int *ieee, int *ttype, float *dmin1, float *dmin2, float *dn, float *dn1, float *dn2, float *g, float *tau);
+void BLAS_FUNC(slasq4)(int *i0, int *n0, float *z, int *pp, int *n0in, float *dmin, float *dmin1, float *dmin2, float *dn, float *dn1, float *dn2, float *tau, int *ttype, float *g);
+void BLAS_FUNC(slasq6)(int *i0, int *n0, float *z, int *pp, float *dmin, float *dmin1, float *dmin2, float *dn, float *dnm1, float *dnm2);
+void BLAS_FUNC(slasr)(char *side, char *pivot, char *direct, int *m, int *n, float *c, float *s, float *a, int *lda);
+void BLAS_FUNC(slasrt)(char *id, int *n, float *d, int *info);
+void BLAS_FUNC(slassq)(int *n, float *x, int *incx, float *scale, float *sumsq);
+void BLAS_FUNC(slasv2)(float *f, float *g, float *h, float *ssmin, float *ssmax, float *snr, float *csr, float *snl, float *csl);
+void BLAS_FUNC(slaswp)(int *n, float *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
+void BLAS_FUNC(slasy2)(int *ltranl, int *ltranr, int *isgn, int *n1, int *n2, float *tl, int *ldtl, float *tr, int *ldtr, float *b, int *ldb, float *scale, float *x, int *ldx, float *xnorm, int *info);
+void BLAS_FUNC(slasyf)(char *uplo, int *n, int *nb, int *kb, float *a, int *lda, int *ipiv, float *w, int *ldw, int *info);
+void BLAS_FUNC(slatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, float *ab, int *ldab, float *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(slatdf)(int *ijob, int *n, float *z, int *ldz, float *rhs, float *rdsum, float *rdscal, int *ipiv, int *jpiv);
+void BLAS_FUNC(slatps)(char *uplo, char *trans, char *diag, char *normin, int *n, float *ap, float *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(slatrd)(char *uplo, int *n, int *nb, float *a, int *lda, float *e, float *tau, float *w, int *ldw);
+void BLAS_FUNC(slatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, float *a, int *lda, float *x, float *scale, float *cnorm, int *info);
+void BLAS_FUNC(slatrz)(int *m, int *n, int *l, float *a, int *lda, float *tau, float *work);
+void BLAS_FUNC(slauu2)(char *uplo, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(slauum)(char *uplo, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(sopgtr)(char *uplo, int *n, float *ap, float *tau, float *q, int *ldq, float *work, int *info);
+void BLAS_FUNC(sopmtr)(char *side, char *uplo, char *trans, int *m, int *n, float *ap, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sorbdb)(char *trans, char *signs, int *m, int *p, int *q, float *x11, int *ldx11, float *x12, int *ldx12, float *x21, int *ldx21, float *x22, int *ldx22, float *theta, float *phi, float *taup1, float *taup2, float *tauq1, float *tauq2, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, float *x11, int *ldx11, float *x12, int *ldx12, float *x21, int *ldx21, float *x22, int *ldx22, float *theta, float *u1, int *ldu1, float *u2, int *ldu2, float *v1t, int *ldv1t, float *v2t, int *ldv2t, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(sorg2l)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sorg2r)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sorgbr)(char *vect, int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorghr)(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorgl2)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sorglq)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorgql)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorgqr)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorgr2)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *info);
+void BLAS_FUNC(sorgrq)(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorgtr)(char *uplo, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorm2l)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sorm2r)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sormbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sorml2)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sormlq)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormql)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormqr)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormr2)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sormr3)(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *info);
+void BLAS_FUNC(sormrq)(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormrz)(char *side, char *trans, int *m, int *n, int *k, int *l, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(sormtr)(char *side, char *uplo, char *trans, int *m, int *n, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info);
+void BLAS_FUNC(spbcon)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(spbequ)(char *uplo, int *n, int *kd, float *ab, int *ldab, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(spbrfs)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(spbstf)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info);
+void BLAS_FUNC(spbsv)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info);
+void BLAS_FUNC(spbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *afb, int *ldafb, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(spbtf2)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info);
+void BLAS_FUNC(spbtrf)(char *uplo, int *n, int *kd, float *ab, int *ldab, int *info);
+void BLAS_FUNC(spbtrs)(char *uplo, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info);
+void BLAS_FUNC(spftrf)(char *transr, char *uplo, int *n, float *a, int *info);
+void BLAS_FUNC(spftri)(char *transr, char *uplo, int *n, float *a, int *info);
+void BLAS_FUNC(spftrs)(char *transr, char *uplo, int *n, int *nrhs, float *a, float *b, int *ldb, int *info);
+void BLAS_FUNC(spocon)(char *uplo, int *n, float *a, int *lda, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(spoequ)(int *n, float *a, int *lda, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(spoequb)(int *n, float *a, int *lda, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(sporfs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sposv)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info);
+void BLAS_FUNC(sposvx)(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(spotf2)(char *uplo, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(spotrf)(char *uplo, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(spotri)(char *uplo, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(spotrs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info);
+void BLAS_FUNC(sppcon)(char *uplo, int *n, float *ap, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(sppequ)(char *uplo, int *n, float *ap, float *s, float *scond, float *amax, int *info);
+void BLAS_FUNC(spprfs)(char *uplo, int *n, int *nrhs, float *ap, float *afp, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sppsv)(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info);
+void BLAS_FUNC(sppsvx)(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, char *equed, float *s, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(spptrf)(char *uplo, int *n, float *ap, int *info);
+void BLAS_FUNC(spptri)(char *uplo, int *n, float *ap, int *info);
+void BLAS_FUNC(spptrs)(char *uplo, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info);
+void BLAS_FUNC(spstf2)(char *uplo, int *n, float *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info);
+void BLAS_FUNC(spstrf)(char *uplo, int *n, float *a, int *lda, int *piv, int *rank, float *tol, float *work, int *info);
+void BLAS_FUNC(sptcon)(int *n, float *d, float *e, float *anorm, float *rcond, float *work, int *info);
+void BLAS_FUNC(spteqr)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(sptrfs)(int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *info);
+void BLAS_FUNC(sptsv)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info);
+void BLAS_FUNC(sptsvx)(char *fact, int *n, int *nrhs, float *d, float *e, float *df, float *ef, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *info);
+void BLAS_FUNC(spttrf)(int *n, float *d, float *e, int *info);
+void BLAS_FUNC(spttrs)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb, int *info);
+void BLAS_FUNC(sptts2)(int *n, int *nrhs, float *d, float *e, float *b, int *ldb);
+void BLAS_FUNC(srscl)(int *n, float *sa, float *sx, int *incx);
+void BLAS_FUNC(ssbev)(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(ssbevd)(char *jobz, char *uplo, int *n, int *kd, float *ab, int *ldab, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, float *ab, int *ldab, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *x, int *ldx, float *work, int *info);
+void BLAS_FUNC(ssbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(ssbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, float *ab, int *ldab, float *bb, int *ldbb, float *q, int *ldq, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssbtrd)(char *vect, char *uplo, int *n, int *kd, float *ab, int *ldab, float *d, float *e, float *q, int *ldq, float *work, int *info);
+void BLAS_FUNC(ssfrk)(char *transr, char *uplo, char *trans, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c);
+void BLAS_FUNC(sspcon)(char *uplo, int *n, float *ap, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(sspev)(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(sspevd)(char *jobz, char *uplo, int *n, float *ap, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sspevx)(char *jobz, char *range, char *uplo, int *n, float *ap, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(sspgst)(int *itype, char *uplo, int *n, float *ap, float *bp, int *info);
+void BLAS_FUNC(sspgv)(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(sspgvd)(int *itype, char *jobz, char *uplo, int *n, float *ap, float *bp, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sspgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, float *ap, float *bp, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssprfs)(char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(sspsv)(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sspsvx)(char *fact, char *uplo, int *n, int *nrhs, float *ap, float *afp, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(ssptrd)(char *uplo, int *n, float *ap, float *d, float *e, float *tau, int *info);
+void BLAS_FUNC(ssptrf)(char *uplo, int *n, float *ap, int *ipiv, int *info);
+void BLAS_FUNC(ssptri)(char *uplo, int *n, float *ap, int *ipiv, float *work, int *info);
+void BLAS_FUNC(ssptrs)(char *uplo, int *n, int *nrhs, float *ap, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(sstebz)(char *range, char *order, int *n, float *vl, float *vu, int *il, int *iu, float *abstol, float *d, float *e, int *m, int *nsplit, float *w, int *iblock, int *isplit, float *work, int *iwork, int *info);
+void BLAS_FUNC(sstedc)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sstegr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sstein)(int *n, float *d, float *e, int *m, float *w, int *iblock, int *isplit, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(sstemr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, int *m, float *w, float *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssteqr)(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(ssterf)(int *n, float *d, float *e, int *info);
+void BLAS_FUNC(sstev)(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info);
+void BLAS_FUNC(sstevd)(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sstevr)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(sstevx)(char *jobz, char *range, int *n, float *d, float *e, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssycon)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *anorm, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(ssyconv)(char *uplo, char *way, int *n, float *a, int *lda, int *ipiv, float *work, int *info);
+void BLAS_FUNC(ssyequb)(char *uplo, int *n, float *a, int *lda, float *s, float *scond, float *amax, float *work, int *info);
+void BLAS_FUNC(ssyev)(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssyevd)(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssyevr)(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssyevx)(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssygs2)(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info);
+void BLAS_FUNC(ssygst)(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info);
+void BLAS_FUNC(ssygv)(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssygvd)(int *itype, char *jobz, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ssygvx)(int *itype, char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, float *work, int *lwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(ssyrfs)(char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(ssysv)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssysvx)(char *fact, char *uplo, int *n, int *nrhs, float *a, int *lda, float *af, int *ldaf, int *ipiv, float *b, int *ldb, float *x, int *ldx, float *rcond, float *ferr, float *berr, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(ssyswapr)(char *uplo, int *n, float *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(ssytd2)(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, int *info);
+void BLAS_FUNC(ssytf2)(char *uplo, int *n, float *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(ssytrd)(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssytrf)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssytri)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *info);
+void BLAS_FUNC(ssytri2)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *lwork, int *info);
+void BLAS_FUNC(ssytri2x)(char *uplo, int *n, float *a, int *lda, int *ipiv, float *work, int *nb, int *info);
+void BLAS_FUNC(ssytrs)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info);
+void BLAS_FUNC(ssytrs2)(char *uplo, int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, float *work, int *info);
+void BLAS_FUNC(stbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, float *ab, int *ldab, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(stbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(stbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, float *ab, int *ldab, float *b, int *ldb, int *info);
+void BLAS_FUNC(stfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, float *alpha, float *a, float *b, int *ldb);
+void BLAS_FUNC(stftri)(char *transr, char *uplo, char *diag, int *n, float *a, int *info);
+void BLAS_FUNC(stfttp)(char *transr, char *uplo, int *n, float *arf, float *ap, int *info);
+void BLAS_FUNC(stfttr)(char *transr, char *uplo, int *n, float *arf, float *a, int *lda, int *info);
+void BLAS_FUNC(stgevc)(char *side, char *howmny, int *select, int *n, float *s, int *lds, float *p, int *ldp, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info);
+void BLAS_FUNC(stgex2)(int *wantq, int *wantz, int *n, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *j1, int *n1, int *n2, float *work, int *lwork, int *info);
+void BLAS_FUNC(stgexc)(int *wantq, int *wantz, int *n, float *a, int *lda, float *b, int *ldb, float *q, int *ldq, float *z, int *ldz, int *ifst, int *ilst, float *work, int *lwork, int *info);
+void BLAS_FUNC(stgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *alphar, float *alphai, float *beta, float *q, int *ldq, float *z, int *ldz, int *m, float *pl, float *pr, float *dif, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(stgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, float *a, int *lda, float *b, int *ldb, float *tola, float *tolb, float *alpha, float *beta, float *u, int *ldu, float *v, int *ldv, float *q, int *ldq, float *work, int *ncycle, int *info);
+void BLAS_FUNC(stgsna)(char *job, char *howmny, int *select, int *n, float *a, int *lda, float *b, int *ldb, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *dif, int *mm, int *m, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(stgsy2)(char *trans, int *ijob, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *d, int *ldd, float *e, int *lde, float *f, int *ldf, float *scale, float *rdsum, float *rdscal, int *iwork, int *pq, int *info);
+void BLAS_FUNC(stgsyl)(char *trans, int *ijob, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *d, int *ldd, float *e, int *lde, float *f, int *ldf, float *scale, float *dif, float *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(stpcon)(char *norm, char *uplo, char *diag, int *n, float *ap, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(stpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, float *v, int *ldv, float *t, int *ldt, float *a, int *lda, float *b, int *ldb, float *work, int *info);
+void BLAS_FUNC(stpqrt)(int *m, int *n, int *l, int *nb, float *a, int *lda, float *b, int *ldb, float *t, int *ldt, float *work, int *info);
+void BLAS_FUNC(stpqrt2)(int *m, int *n, int *l, float *a, int *lda, float *b, int *ldb, float *t, int *ldt, int *info);
+void BLAS_FUNC(stprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, float *v, int *ldv, float *t, int *ldt, float *a, int *lda, float *b, int *ldb, float *work, int *ldwork);
+void BLAS_FUNC(stprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(stptri)(char *uplo, char *diag, int *n, float *ap, int *info);
+void BLAS_FUNC(stptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *ap, float *b, int *ldb, int *info);
+void BLAS_FUNC(stpttf)(char *transr, char *uplo, int *n, float *ap, float *arf, int *info);
+void BLAS_FUNC(stpttr)(char *uplo, int *n, float *ap, float *a, int *lda, int *info);
+void BLAS_FUNC(strcon)(char *norm, char *uplo, char *diag, int *n, float *a, int *lda, float *rcond, float *work, int *iwork, int *info);
+void BLAS_FUNC(strevc)(char *side, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, int *mm, int *m, float *work, int *info);
+void BLAS_FUNC(strexc)(char *compq, int *n, float *t, int *ldt, float *q, int *ldq, int *ifst, int *ilst, float *work, int *info);
+void BLAS_FUNC(strrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, float *x, int *ldx, float *ferr, float *berr, float *work, int *iwork, int *info);
+void BLAS_FUNC(strsen)(char *job, char *compq, int *select, int *n, float *t, int *ldt, float *q, int *ldq, float *wr, float *wi, int *m, float *s, float *sep, float *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(strsna)(char *job, char *howmny, int *select, int *n, float *t, int *ldt, float *vl, int *ldvl, float *vr, int *ldvr, float *s, float *sep, int *mm, int *m, float *work, int *ldwork, int *iwork, int *info);
+void BLAS_FUNC(strsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *scale, int *info);
+void BLAS_FUNC(strti2)(char *uplo, char *diag, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(strtri)(char *uplo, char *diag, int *n, float *a, int *lda, int *info);
+void BLAS_FUNC(strtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, float *a, int *lda, float *b, int *ldb, int *info);
+void BLAS_FUNC(strttf)(char *transr, char *uplo, int *n, float *a, int *lda, float *arf, int *info);
+void BLAS_FUNC(strttp)(char *uplo, int *n, float *a, int *lda, float *ap, int *info);
+void BLAS_FUNC(stzrzf)(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info);
+void BLAS_FUNC(xerbla_array)(char *srname_array, int *srname_len, int *info);
+void BLAS_FUNC(zbbcsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, double *theta, double *phi, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, double *b11d, double *b11e, double *b12d, double *b12e, double *b21d, double *b21e, double *b22d, double *b22e, double *rwork, int *lrwork, int *info);
+void BLAS_FUNC(zbdsqr)(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, npy_complex128 *vt, int *ldvt, npy_complex128 *u, int *ldu, npy_complex128 *c, int *ldc, double *rwork, int *info);
+void BLAS_FUNC(zcgesv)(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, double *rwork, int *iter, int *info);
+void BLAS_FUNC(zcposv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, double *rwork, int *iter, int *info);
+void BLAS_FUNC(zdrscl)(int *n, double *sa, npy_complex128 *sx, int *incx);
+void BLAS_FUNC(zgbbrd)(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *pt, int *ldpt, npy_complex128 *c, int *ldc, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgbcon)(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgbequ)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(zgbequb)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(zgbrfs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgbsv)(int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zgbsvx)(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, char *equed, double *r, double *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgbtf2)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(zgbtrf)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info);
+void BLAS_FUNC(zgbtrs)(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zgebak)(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, npy_complex128 *v, int *ldv, int *info);
+void BLAS_FUNC(zgebal)(char *job, int *n, npy_complex128 *a, int *lda, int *ilo, int *ihi, double *scale, int *info);
+void BLAS_FUNC(zgebd2)(int *m, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgebrd)(int *m, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgecon)(char *norm, int *n, npy_complex128 *a, int *lda, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgeequ)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(zgeequb)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, int *info);
+void BLAS_FUNC(zgees)(char *jobvs, char *sort, _zselect1 *select, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info);
+void BLAS_FUNC(zgeesx)(char *jobvs, char *sort, _zselect1 *select, char *sense, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info);
+void BLAS_FUNC(zgeev)(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgeevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, double *scale, double *abnrm, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgehd2)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgehrd)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgelq2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgelqf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgels)(char *trans, int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgelsd)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *s, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *info);
+void BLAS_FUNC(zgelss)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *s, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgelsy)(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *jpvt, double *rcond, int *rank, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgemqrt)(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgeql2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgeqlf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgeqp3)(int *m, int *n, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgeqr2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgeqr2p)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgeqrf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgeqrfp)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgeqrt)(int *m, int *n, int *nb, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgeqrt2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info);
+void BLAS_FUNC(zgeqrt3)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info);
+void BLAS_FUNC(zgerfs)(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgerq2)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgerqf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgesc2)(int *n, npy_complex128 *a, int *lda, npy_complex128 *rhs, int *ipiv, int *jpiv, double *scale);
+void BLAS_FUNC(zgesdd)(char *jobz, int *m, int *n, npy_complex128 *a, int *lda, double *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *info);
+void BLAS_FUNC(zgesv)(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zgesvd)(char *jobu, char *jobvt, int *m, int *n, npy_complex128 *a, int *lda, double *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zgesvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, char *equed, double *r, double *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgetc2)(int *n, npy_complex128 *a, int *lda, int *ipiv, int *jpiv, int *info);
+void BLAS_FUNC(zgetf2)(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(zgetrf)(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(zgetri)(int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgetrs)(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zggbak)(char *job, char *side, int *n, int *ilo, int *ihi, double *lscale, double *rscale, int *m, npy_complex128 *v, int *ldv, int *info);
+void BLAS_FUNC(zggbal)(char *job, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *ilo, int *ihi, double *lscale, double *rscale, double *work, int *info);
+void BLAS_FUNC(zgges)(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, npy_complex128 *work, int *lwork, double *rwork, int *bwork, int *info);
+void BLAS_FUNC(zggesx)(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *liwork, int *bwork, int *info);
+void BLAS_FUNC(zggev)(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zggevx)(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *bwork, int *info);
+void BLAS_FUNC(zggglm)(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *d, npy_complex128 *x, npy_complex128 *y, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgghrd)(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *info);
+void BLAS_FUNC(zgglse)(int *m, int *n, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, npy_complex128 *d, npy_complex128 *x, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zggqrf)(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zggrqf)(int *m, int *p, int *n, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zgtcon)(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info);
+void BLAS_FUNC(zgtrfs)(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgtsv)(int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zgtsvx)(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zgttrf)(int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, int *info);
+void BLAS_FUNC(zgttrs)(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zgtts2)(int *itrans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(zhbev)(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhbevd)(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zhbevx)(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zhbgst)(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *x, int *ldx, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhbgv)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zhbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zhbtrd)(char *vect, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info);
+void BLAS_FUNC(zhecon)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info);
+void BLAS_FUNC(zheequb)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, npy_complex128 *work, int *info);
+void BLAS_FUNC(zheev)(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, double *w, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zheevd)(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, double *w, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zheevr)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, int *isuppz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zheevx)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zhegs2)(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zhegst)(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zhegv)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *w, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zhegvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *w, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zhegvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zherfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhesv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zhesvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zheswapr)(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(zhetd2)(char *uplo, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tau, int *info);
+void BLAS_FUNC(zhetf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(zhetrd)(char *uplo, int *n, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zhetrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zhetri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info);
+void BLAS_FUNC(zhetri2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zhetri2x)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info);
+void BLAS_FUNC(zhetrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zhetrs2)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info);
+void BLAS_FUNC(zhfrk)(char *transr, char *uplo, char *trans, int *n, int *k, double *alpha, npy_complex128 *a, int *lda, double *beta, npy_complex128 *c);
+void BLAS_FUNC(zhgeqz)(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *t, int *ldt, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zhpcon)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info);
+void BLAS_FUNC(zhpev)(char *jobz, char *uplo, int *n, npy_complex128 *ap, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhpevd)(char *jobz, char *uplo, int *n, npy_complex128 *ap, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zhpevx)(char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zhpgst)(int *itype, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, int *info);
+void BLAS_FUNC(zhpgv)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhpgvd)(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zhpgvx)(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, npy_complex128 *work, double *rwork, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zhprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhpsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zhpsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zhptrd)(char *uplo, int *n, npy_complex128 *ap, double *d, double *e, npy_complex128 *tau, int *info);
+void BLAS_FUNC(zhptrf)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info);
+void BLAS_FUNC(zhptri)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info);
+void BLAS_FUNC(zhptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zhsein)(char *side, char *eigsrc, char *initv, int *select, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *ifaill, int *ifailr, int *info);
+void BLAS_FUNC(zhseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zlabrd)(int *m, int *n, int *nb, npy_complex128 *a, int *lda, double *d, double *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *x, int *ldx, npy_complex128 *y, int *ldy);
+void BLAS_FUNC(zlacgv)(int *n, npy_complex128 *x, int *incx);
+void BLAS_FUNC(zlacn2)(int *n, npy_complex128 *v, npy_complex128 *x, double *est, int *kase, int *isave);
+void BLAS_FUNC(zlacon)(int *n, npy_complex128 *v, npy_complex128 *x, double *est, int *kase);
+void BLAS_FUNC(zlacp2)(char *uplo, int *m, int *n, double *a, int *lda, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(zlacpy)(char *uplo, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(zlacrm)(int *m, int *n, npy_complex128 *a, int *lda, double *b, int *ldb, npy_complex128 *c, int *ldc, double *rwork);
+void BLAS_FUNC(zlacrt)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, npy_complex128 *c, npy_complex128 *s);
+void F_FUNC(zladivwrp,ZLADIVWRP)(npy_complex128 *out, npy_complex128 *x, npy_complex128 *y);
+void BLAS_FUNC(zlaed0)(int *qsiz, int *n, double *d, double *e, npy_complex128 *q, int *ldq, npy_complex128 *qstore, int *ldqs, double *rwork, int *iwork, int *info);
+void BLAS_FUNC(zlaed7)(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, double *d, npy_complex128 *q, int *ldq, double *rho, int *indxq, double *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, double *givnum, npy_complex128 *work, double *rwork, int *iwork, int *info);
+void BLAS_FUNC(zlaed8)(int *k, int *n, int *qsiz, npy_complex128 *q, int *ldq, double *d, double *rho, int *cutpnt, double *z, double *dlamda, npy_complex128 *q2, int *ldq2, double *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, double *givnum, int *info);
+void BLAS_FUNC(zlaein)(int *rightv, int *noinit, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *v, npy_complex128 *b, int *ldb, double *rwork, double *eps3, double *smlnum, int *info);
+void BLAS_FUNC(zlaesy)(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, npy_complex128 *rt1, npy_complex128 *rt2, npy_complex128 *evscal, npy_complex128 *cs1, npy_complex128 *sn1);
+void BLAS_FUNC(zlaev2)(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, double *rt1, double *rt2, double *cs1, npy_complex128 *sn1);
+void BLAS_FUNC(zlag2c)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info);
+void BLAS_FUNC(zlags2)(int *upper, double *a1, npy_complex128 *a2, double *a3, double *b1, npy_complex128 *b2, double *b3, double *csu, npy_complex128 *snu, double *csv, npy_complex128 *snv, double *csq, npy_complex128 *snq);
+void BLAS_FUNC(zlagtm)(char *trans, int *n, int *nrhs, double *alpha, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *x, int *ldx, double *beta, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(zlahef)(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info);
+void BLAS_FUNC(zlahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *info);
+void BLAS_FUNC(zlahr2)(int *n, int *k, int *nb, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *t, int *ldt, npy_complex128 *y, int *ldy);
+void BLAS_FUNC(zlaic1)(int *job, int *j, npy_complex128 *x, double *sest, npy_complex128 *w, npy_complex128 *gamma, double *sestpr, npy_complex128 *s, npy_complex128 *c);
+void BLAS_FUNC(zlals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double *difr, double *z, int *k, double *c, double *s, double *rwork, int *info);
+void BLAS_FUNC(zlalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *rwork, int *iwork, int *info);
+void BLAS_FUNC(zlalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, double *d, double *e, npy_complex128 *b, int *ldb, double *rcond, int *rank, npy_complex128 *work, double *rwork, int *iwork, int *info);
+double BLAS_FUNC(zlangb)(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *work);
+double BLAS_FUNC(zlange)(char *norm, int *m, int *n, npy_complex128 *a, int *lda, double *work);
+double BLAS_FUNC(zlangt)(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d_, npy_complex128 *du);
+double BLAS_FUNC(zlanhb)(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, double *work);
+double BLAS_FUNC(zlanhe)(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, double *work);
+double BLAS_FUNC(zlanhf)(char *norm, char *transr, char *uplo, int *n, npy_complex128 *a, double *work);
+double BLAS_FUNC(zlanhp)(char *norm, char *uplo, int *n, npy_complex128 *ap, double *work);
+double BLAS_FUNC(zlanhs)(char *norm, int *n, npy_complex128 *a, int *lda, double *work);
+double BLAS_FUNC(zlanht)(char *norm, int *n, double *d_, npy_complex128 *e);
+double BLAS_FUNC(zlansb)(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, double *work);
+double BLAS_FUNC(zlansp)(char *norm, char *uplo, int *n, npy_complex128 *ap, double *work);
+double BLAS_FUNC(zlansy)(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, double *work);
+double BLAS_FUNC(zlantb)(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex128 *ab, int *ldab, double *work);
+double BLAS_FUNC(zlantp)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, double *work);
+double BLAS_FUNC(zlantr)(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex128 *a, int *lda, double *work);
+void BLAS_FUNC(zlapll)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *ssmin);
+void BLAS_FUNC(zlapmr)(int *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k);
+void BLAS_FUNC(zlapmt)(int *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k);
+void BLAS_FUNC(zlaqgb)(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed);
+void BLAS_FUNC(zlaqge)(int *m, int *n, npy_complex128 *a, int *lda, double *r, double *c, double *rowcnd, double *colcnd, double *amax, char *equed);
+void BLAS_FUNC(zlaqhb)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlaqhe)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlaqhp)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlaqp2)(int *m, int *n, int *offset, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, double *vn1, double *vn2, npy_complex128 *work);
+void BLAS_FUNC(zlaqps)(int *m, int *n, int *offset, int *nb, int *kb, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, double *vn1, double *vn2, npy_complex128 *auxv, npy_complex128 *f, int *ldf);
+void BLAS_FUNC(zlaqr0)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zlaqr1)(int *n, npy_complex128 *h, int *ldh, npy_complex128 *s1, npy_complex128 *s2, npy_complex128 *v);
+void BLAS_FUNC(zlaqr2)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork);
+void BLAS_FUNC(zlaqr3)(int *wantt, int *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork);
+void BLAS_FUNC(zlaqr4)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zlaqr5)(int *wantt, int *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex128 *s, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *v, int *ldv, npy_complex128 *u, int *ldu, int *nv, npy_complex128 *wv, int *ldwv, int *nh, npy_complex128 *wh, int *ldwh);
+void BLAS_FUNC(zlaqsb)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlaqsp)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlaqsy)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, char *equed);
+void BLAS_FUNC(zlar1v)(int *n, int *b1, int *bn, double *lambda_, double *d, double *l, double *ld, double *lld, double *pivmin, double *gaptol, npy_complex128 *z, int *wantnc, int *negcnt, double *ztz, double *mingma, int *r, int *isuppz, double *nrminv, double *resid, double *rqcorr, double *work);
+void BLAS_FUNC(zlar2v)(int *n, npy_complex128 *x, npy_complex128 *y, npy_complex128 *z, int *incx, double *c, npy_complex128 *s, int *incc);
+void BLAS_FUNC(zlarcm)(int *m, int *n, double *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, double *rwork);
+void BLAS_FUNC(zlarf)(char *side, int *m, int *n, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work);
+void BLAS_FUNC(zlarfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork);
+void BLAS_FUNC(zlarfg)(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau);
+void BLAS_FUNC(zlarfgp)(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau);
+void BLAS_FUNC(zlarft)(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt);
+void BLAS_FUNC(zlarfx)(char *side, int *m, int *n, npy_complex128 *v, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work);
+void BLAS_FUNC(zlargv)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *c, int *incc);
+void BLAS_FUNC(zlarnv)(int *idist, int *iseed, int *n, npy_complex128 *x);
+void BLAS_FUNC(zlarrv)(int *n, double *vl, double *vu, double *d, double *l, double *pivmin, int *isplit, int *m, int *dol, int *dou, double *minrgp, double *rtol1, double *rtol2, double *w, double *werr, double *wgap, int *iblock, int *indexw, double *gers, npy_complex128 *z, int *ldz, int *isuppz, double *work, int *iwork, int *info);
+void BLAS_FUNC(zlartg)(npy_complex128 *f, npy_complex128 *g, double *cs, npy_complex128 *sn, npy_complex128 *r);
+void BLAS_FUNC(zlartv)(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, double *c, npy_complex128 *s, int *incc);
+void BLAS_FUNC(zlarz)(char *side, int *m, int *n, int *l, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work);
+void BLAS_FUNC(zlarzb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork);
+void BLAS_FUNC(zlarzt)(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt);
+void BLAS_FUNC(zlascl)(char *type_bn, int *kl, int *ku, double *cfrom, double *cto, int *m, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zlaset)(char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zlasr)(char *side, char *pivot, char *direct, int *m, int *n, double *c, double *s, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zlassq)(int *n, npy_complex128 *x, int *incx, double *scale, double *sumsq);
+void BLAS_FUNC(zlaswp)(int *n, npy_complex128 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx);
+void BLAS_FUNC(zlasyf)(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info);
+void BLAS_FUNC(zlat2c)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info);
+void BLAS_FUNC(zlatbs)(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(zlatdf)(int *ijob, int *n, npy_complex128 *z, int *ldz, npy_complex128 *rhs, double *rdsum, double *rdscal, int *ipiv, int *jpiv);
+void BLAS_FUNC(zlatps)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *ap, npy_complex128 *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(zlatrd)(char *uplo, int *n, int *nb, npy_complex128 *a, int *lda, double *e, npy_complex128 *tau, npy_complex128 *w, int *ldw);
+void BLAS_FUNC(zlatrs)(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, double *scale, double *cnorm, int *info);
+void BLAS_FUNC(zlatrz)(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work);
+void BLAS_FUNC(zlauu2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zlauum)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zpbcon)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpbequ)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(zpbrfs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpbstf)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info);
+void BLAS_FUNC(zpbsv)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zpbsvx)(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpbtf2)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info);
+void BLAS_FUNC(zpbtrf)(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info);
+void BLAS_FUNC(zpbtrs)(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zpftrf)(char *transr, char *uplo, int *n, npy_complex128 *a, int *info);
+void BLAS_FUNC(zpftri)(char *transr, char *uplo, int *n, npy_complex128 *a, int *info);
+void BLAS_FUNC(zpftrs)(char *transr, char *uplo, int *n, int *nrhs, npy_complex128 *a, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zpocon)(char *uplo, int *n, npy_complex128 *a, int *lda, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpoequ)(int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(zpoequb)(int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(zporfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zposv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zposvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpotf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zpotrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zpotri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(zpotrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zppcon)(char *uplo, int *n, npy_complex128 *ap, double *anorm, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zppequ)(char *uplo, int *n, npy_complex128 *ap, double *s, double *scond, double *amax, int *info);
+void BLAS_FUNC(zpprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zppsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zppsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, char *equed, double *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpptrf)(char *uplo, int *n, npy_complex128 *ap, int *info);
+void BLAS_FUNC(zpptri)(char *uplo, int *n, npy_complex128 *ap, int *info);
+void BLAS_FUNC(zpptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zpstf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info);
+void BLAS_FUNC(zpstrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, double *tol, double *work, int *info);
+void BLAS_FUNC(zptcon)(int *n, double *d, npy_complex128 *e, double *anorm, double *rcond, double *rwork, int *info);
+void BLAS_FUNC(zpteqr)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(zptrfs)(char *uplo, int *n, int *nrhs, double *d, npy_complex128 *e, double *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zptsv)(int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zptsvx)(char *fact, int *n, int *nrhs, double *d, npy_complex128 *e, double *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zpttrf)(int *n, double *d, npy_complex128 *e, int *info);
+void BLAS_FUNC(zpttrs)(char *uplo, int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zptts2)(int *iuplo, int *n, int *nrhs, double *d, npy_complex128 *e, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(zrot)(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, double *c, npy_complex128 *s);
+void BLAS_FUNC(zspcon)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info);
+void BLAS_FUNC(zspmv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zspr)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap);
+void BLAS_FUNC(zsprfs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zspsv)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zspsvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zsptrf)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info);
+void BLAS_FUNC(zsptri)(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info);
+void BLAS_FUNC(zsptrs)(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zstedc)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zstegr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, npy_complex128 *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zstein)(int *n, double *d, double *e, int *m, double *w, int *iblock, int *isplit, npy_complex128 *z, int *ldz, double *work, int *iwork, int *ifail, int *info);
+void BLAS_FUNC(zstemr)(char *jobz, char *range, int *n, double *d, double *e, double *vl, double *vu, int *il, int *iu, int *m, double *w, npy_complex128 *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(zsteqr)(char *compz, int *n, double *d, double *e, npy_complex128 *z, int *ldz, double *work, int *info);
+void BLAS_FUNC(zsycon)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, double *anorm, double *rcond, npy_complex128 *work, int *info);
+void BLAS_FUNC(zsyconv)(char *uplo, char *way, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info);
+void BLAS_FUNC(zsyequb)(char *uplo, int *n, npy_complex128 *a, int *lda, double *s, double *scond, double *amax, npy_complex128 *work, int *info);
+void BLAS_FUNC(zsymv)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy);
+void BLAS_FUNC(zsyr)(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda);
+void BLAS_FUNC(zsyrfs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(zsysv)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zsysvx)(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *rcond, double *ferr, double *berr, npy_complex128 *work, int *lwork, double *rwork, int *info);
+void BLAS_FUNC(zsyswapr)(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2);
+void BLAS_FUNC(zsytf2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info);
+void BLAS_FUNC(zsytrf)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zsytri)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info);
+void BLAS_FUNC(zsytri2)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zsytri2x)(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info);
+void BLAS_FUNC(zsytrs)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(zsytrs2)(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info);
+void BLAS_FUNC(ztbcon)(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex128 *ab, int *ldab, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztbrfs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztbtrs)(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(ztfsm)(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, npy_complex128 *b, int *ldb);
+void BLAS_FUNC(ztftri)(char *transr, char *uplo, char *diag, int *n, npy_complex128 *a, int *info);
+void BLAS_FUNC(ztfttp)(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *ap, int *info);
+void BLAS_FUNC(ztfttr)(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(ztgevc)(char *side, char *howmny, int *select, int *n, npy_complex128 *s, int *lds, npy_complex128 *p, int *ldp, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztgex2)(int *wantq, int *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *j1, int *info);
+void BLAS_FUNC(ztgexc)(int *wantq, int *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *ifst, int *ilst, int *info);
+void BLAS_FUNC(ztgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *m, double *pl, double *pr, double *dif, npy_complex128 *work, int *lwork, int *iwork, int *liwork, int *info);
+void BLAS_FUNC(ztgsja)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, double *tola, double *tolb, double *alpha, double *beta, npy_complex128 *u, int *ldu, npy_complex128 *v, int *ldv, npy_complex128 *q, int *ldq, npy_complex128 *work, int *ncycle, int *info);
+void BLAS_FUNC(ztgsna)(char *job, char *howmny, int *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, double *s, double *dif, int *mm, int *m, npy_complex128 *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(ztgsy2)(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, double *scale, double *rdsum, double *rdscal, int *info);
+void BLAS_FUNC(ztgsyl)(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, double *scale, double *dif, npy_complex128 *work, int *lwork, int *iwork, int *info);
+void BLAS_FUNC(ztpcon)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztpmqrt)(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info);
+void BLAS_FUNC(ztpqrt)(int *m, int *n, int *l, int *nb, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info);
+void BLAS_FUNC(ztpqrt2)(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, int *info);
+void BLAS_FUNC(ztprfb)(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *ldwork);
+void BLAS_FUNC(ztprfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztptri)(char *uplo, char *diag, int *n, npy_complex128 *ap, int *info);
+void BLAS_FUNC(ztptrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(ztpttf)(char *transr, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *arf, int *info);
+void BLAS_FUNC(ztpttr)(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(ztrcon)(char *norm, char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, double *rcond, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztrevc)(char *side, char *howmny, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztrexc)(char *compq, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, int *ifst, int *ilst, int *info);
+void BLAS_FUNC(ztrrfs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, double *ferr, double *berr, npy_complex128 *work, double *rwork, int *info);
+void BLAS_FUNC(ztrsen)(char *job, char *compq, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, npy_complex128 *w, int *m, double *s, double *sep, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(ztrsna)(char *job, char *howmny, int *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, double *s, double *sep, int *mm, int *m, npy_complex128 *work, int *ldwork, double *rwork, int *info);
+void BLAS_FUNC(ztrsyl)(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, double *scale, int *info);
+void BLAS_FUNC(ztrti2)(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(ztrtri)(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info);
+void BLAS_FUNC(ztrtrs)(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info);
+void BLAS_FUNC(ztrttf)(char *transr, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *arf, int *info);
+void BLAS_FUNC(ztrttp)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *ap, int *info);
+void BLAS_FUNC(ztzrzf)(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunbdb)(char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, double *theta, double *phi, npy_complex128 *taup1, npy_complex128 *taup2, npy_complex128 *tauq1, npy_complex128 *tauq2, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zuncsd)(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, double *theta, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, npy_complex128 *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *info);
+void BLAS_FUNC(zung2l)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zung2r)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zungbr)(char *vect, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunghr)(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zungl2)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunglq)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zungql)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zungqr)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zungr2)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info);
+void BLAS_FUNC(zungrq)(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zungtr)(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunm2l)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunm2r)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunmbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmhr)(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunml2)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunmlq)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmql)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmqr)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmr2)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunmr3)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+void BLAS_FUNC(zunmrq)(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmrz)(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zunmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info);
+void BLAS_FUNC(zupgtr)(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info);
+void BLAS_FUNC(zupmtr)(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..3a0ba92af71f3f3188cc73ca441187db9701b052
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs.py
@@ -0,0 +1,867 @@
+#
+# Author: Travis Oliphant, March 2002
+#
+import warnings
+from itertools import product
+
+import numpy as np
+from numpy import (dot, diag, prod, logical_not, ravel, transpose,
+                   conjugate, absolute, amax, sign, isfinite, triu)
+
+# Local imports
+from scipy.linalg import LinAlgError, bandwidth
+from ._misc import norm
+from ._basic import solve, inv
+from ._decomp_svd import svd
+from ._decomp_schur import schur, rsf2csf
+from ._expm_frechet import expm_frechet, expm_cond
+from ._matfuncs_sqrtm import sqrtm
+from ._matfuncs_expm import pick_pade_structure, pade_UV_calc
+from ._linalg_pythran import _funm_loops  # type: ignore[import-not-found]
+
+__all__ = ['expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm', 'tanhm', 'logm',
+           'funm', 'signm', 'sqrtm', 'fractional_matrix_power', 'expm_frechet',
+           'expm_cond', 'khatri_rao']
+
+eps = np.finfo('d').eps
+feps = np.finfo('f').eps
+
+_array_precision = {'i': 1, 'l': 1, 'f': 0, 'd': 1, 'F': 0, 'D': 1}
+
+
+###############################################################################
+# Utility functions.
+
+
+def _asarray_square(A):
+    """
+    Wraps asarray with the extra requirement that the input be a square matrix.
+
+    The motivation is that the matfuncs module has real functions that have
+    been lifted to square matrix functions.
+
+    Parameters
+    ----------
+    A : array_like
+        A square matrix.
+
+    Returns
+    -------
+    out : ndarray
+        An ndarray copy or view or other representation of A.
+
+    """
+    A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected square array_like input')
+    return A
+
+
+def _maybe_real(A, B, tol=None):
+    """
+    Return either B or the real part of B, depending on properties of A and B.
+
+    The motivation is that B has been computed as a complicated function of A,
+    and B may be perturbed by negligible imaginary components.
+    If A is real and B is complex with small imaginary components,
+    then return a real copy of B.  The assumption in that case would be that
+    the imaginary components of B are numerical artifacts.
+
+    Parameters
+    ----------
+    A : ndarray
+        Input array whose type is to be checked as real vs. complex.
+    B : ndarray
+        Array to be returned, possibly without its imaginary part.
+    tol : float
+        Absolute tolerance.
+
+    Returns
+    -------
+    out : real or complex array
+        Either the input array B or only the real part of the input array B.
+
+    """
+    # Note that booleans and integers compare as real.
+    if np.isrealobj(A) and np.iscomplexobj(B):
+        if tol is None:
+            tol = {0: feps*1e3, 1: eps*1e6}[_array_precision[B.dtype.char]]
+        if np.allclose(B.imag, 0.0, atol=tol):
+            B = B.real
+    return B
+
+
+###############################################################################
+# Matrix functions.
+
+
+def fractional_matrix_power(A, t):
+    """
+    Compute the fractional power of a matrix.
+
+    Proceeds according to the discussion in section (6) of [1]_.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix whose fractional power to evaluate.
+    t : float
+        Fractional power.
+
+    Returns
+    -------
+    X : (N, N) array_like
+        The fractional power of the matrix.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import fractional_matrix_power
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> b = fractional_matrix_power(a, 0.5)
+    >>> b
+    array([[ 0.75592895,  1.13389342],
+           [ 0.37796447,  1.88982237]])
+    >>> np.dot(b, b)      # Verify square root
+    array([[ 1.,  3.],
+           [ 1.,  4.]])
+
+    """
+    # This fixes some issue with imports;
+    # this function calls onenormest which is in scipy.sparse.
+    A = _asarray_square(A)
+    import scipy.linalg._matfuncs_inv_ssq
+    return scipy.linalg._matfuncs_inv_ssq._fractional_matrix_power(A, t)
+
+
+def logm(A, disp=True):
+    """
+    Compute matrix logarithm.
+
+    The matrix logarithm is the inverse of
+    expm: expm(logm(`A`)) == `A`
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix whose logarithm to evaluate
+    disp : bool, optional
+        Emit warning if error in the result is estimated large
+        instead of returning estimated error. (Default: True)
+
+    Returns
+    -------
+    logm : (N, N) ndarray
+        Matrix logarithm of `A`
+    errest : float
+        (if disp == False)
+
+        1-norm of the estimated error, ||err||_1 / ||A||_1
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2012)
+           "Improved Inverse Scaling and Squaring Algorithms
+           for the Matrix Logarithm."
+           SIAM Journal on Scientific Computing, 34 (4). C152-C169.
+           ISSN 1095-7197
+
+    .. [2] Nicholas J. Higham (2008)
+           "Functions of Matrices: Theory and Computation"
+           ISBN 978-0-898716-46-7
+
+    .. [3] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import logm, expm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> b = logm(a)
+    >>> b
+    array([[-1.02571087,  2.05142174],
+           [ 0.68380725,  1.02571087]])
+    >>> expm(b)         # Verify expm(logm(a)) returns a
+    array([[ 1.,  3.],
+           [ 1.,  4.]])
+
+    """
+    A = np.asarray(A)  # squareness checked in `_logm`
+    # Avoid circular import ... this is OK, right?
+    import scipy.linalg._matfuncs_inv_ssq
+    F = scipy.linalg._matfuncs_inv_ssq._logm(A)
+    F = _maybe_real(A, F)
+    errtol = 1000*eps
+    # TODO use a better error approximation
+    with np.errstate(divide='ignore', invalid='ignore'):
+        errest = norm(expm(F)-A, 1) / np.asarray(norm(A, 1), dtype=A.dtype).real[()]
+    if disp:
+        if not isfinite(errest) or errest >= errtol:
+            message = f"logm result may be inaccurate, approximate err = {errest}"
+            warnings.warn(message, RuntimeWarning, stacklevel=2)
+        return F
+    else:
+        return F, errest
+
+
+def expm(A):
+    """Compute the matrix exponential of an array.
+
+    Parameters
+    ----------
+    A : ndarray
+        Input with last two dimensions are square ``(..., n, n)``.
+
+    Returns
+    -------
+    eA : ndarray
+        The resulting matrix exponential with the same shape of ``A``
+
+    Notes
+    -----
+    Implements the algorithm given in [1], which is essentially a Pade
+    approximation with a variable order that is decided based on the array
+    data.
+
+    For input with size ``n``, the memory usage is in the worst case in the
+    order of ``8*(n**2)``. If the input data is not of single and double
+    precision of real and complex dtypes, it is copied to a new array.
+
+    For cases ``n >= 400``, the exact 1-norm computation cost, breaks even with
+    1-norm estimation and from that point on the estimation scheme given in
+    [2] is used to decide on the approximation order.
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham, (2009), "A New Scaling
+           and Squaring Algorithm for the Matrix Exponential", SIAM J. Matrix
+           Anal. Appl. 31(3):970-989, :doi:`10.1137/09074721X`
+
+    .. [2] Nicholas J. Higham and Francoise Tisseur (2000), "A Block Algorithm
+           for Matrix 1-Norm Estimation, with an Application to 1-Norm
+           Pseudospectra." SIAM J. Matrix Anal. Appl. 21(4):1185-1201,
+           :doi:`10.1137/S0895479899356080`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import expm, sinm, cosm
+
+    Matrix version of the formula exp(0) = 1:
+
+    >>> expm(np.zeros((3, 2, 2)))
+    array([[[1., 0.],
+            [0., 1.]],
+    
+           [[1., 0.],
+            [0., 1.]],
+    
+           [[1., 0.],
+            [0., 1.]]])
+
+    Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta))
+    applied to a matrix:
+
+    >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]])
+    >>> expm(1j*a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+    >>> cosm(a) + 1j*sinm(a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+
+    """
+    a = np.asarray(A)
+    if a.size == 1 and a.ndim < 2:
+        return np.array([[np.exp(a.item())]])
+
+    if a.ndim < 2:
+        raise LinAlgError('The input array must be at least two-dimensional')
+    if a.shape[-1] != a.shape[-2]:
+        raise LinAlgError('Last 2 dimensions of the array must be square')
+
+    # Empty array
+    if min(*a.shape) == 0:
+        dtype = expm(np.eye(2, dtype=a.dtype)).dtype
+        return np.empty_like(a, dtype=dtype)
+
+    # Scalar case
+    if a.shape[-2:] == (1, 1):
+        return np.exp(a)
+
+    if not np.issubdtype(a.dtype, np.inexact):
+        a = a.astype(np.float64)
+    elif a.dtype == np.float16:
+        a = a.astype(np.float32)
+
+    # An explicit formula for 2x2 case exists (formula (2.2) in [1]). However, without
+    # Kahan's method, numerical instabilities can occur (See gh-19584). Hence removed
+    # here until we have a more stable implementation.
+
+    n = a.shape[-1]
+    eA = np.empty(a.shape, dtype=a.dtype)
+    # working memory to hold intermediate arrays
+    Am = np.empty((5, n, n), dtype=a.dtype)
+
+    # Main loop to go through the slices of an ndarray and passing to expm
+    for ind in product(*[range(x) for x in a.shape[:-2]]):
+        aw = a[ind]
+
+        lu = bandwidth(aw)
+        if not any(lu):  # a is diagonal?
+            eA[ind] = np.diag(np.exp(np.diag(aw)))
+            continue
+
+        # Generic/triangular case; copy the slice into scratch and send.
+        # Am will be mutated by pick_pade_structure
+        # If s != 0, scaled Am will be returned from pick_pade_structure.
+        Am[0, :, :] = aw
+        m, s = pick_pade_structure(Am)
+        if (m < 0):
+            raise MemoryError("scipy.linalg.expm could not allocate sufficient"
+                              " memory while trying to compute the Pade "
+                              f"structure (error code {m}).")
+        info = pade_UV_calc(Am, m)
+        if info != 0:
+            if info <= -11:
+                # We raise it from failed mallocs; negative LAPACK codes > -7
+                raise MemoryError("scipy.linalg.expm could not allocate "
+                              "sufficient memory while trying to compute the "
+                              f"exponential (error code {info}).")
+            else:
+                # LAPACK wrong argument error or exact singularity.
+                # Neither should happen.
+                raise RuntimeError("scipy.linalg.expm got an internal LAPACK "
+                                   "error during the exponential computation "
+                                   f"(error code {info})")
+        eAw = Am[0]
+
+        if s != 0:  # squaring needed
+
+            if (lu[1] == 0) or (lu[0] == 0):  # lower/upper triangular
+                # This branch implements Code Fragment 2.1 of [1]
+
+                diag_aw = np.diag(aw)
+                # einsum returns a writable view
+                np.einsum('ii->i', eAw)[:] = np.exp(diag_aw * 2**(-s))
+                # super/sub diagonal
+                sd = np.diag(aw, k=-1 if lu[1] == 0 else 1)
+
+                for i in range(s-1, -1, -1):
+                    eAw = eAw @ eAw
+
+                    # diagonal
+                    np.einsum('ii->i', eAw)[:] = np.exp(diag_aw * 2.**(-i))
+                    exp_sd = _exp_sinch(diag_aw * (2.**(-i))) * (sd * 2**(-i))
+                    if lu[1] == 0:  # lower
+                        np.einsum('ii->i', eAw[1:, :-1])[:] = exp_sd
+                    else:  # upper
+                        np.einsum('ii->i', eAw[:-1, 1:])[:] = exp_sd
+
+            else:  # generic
+                for _ in range(s):
+                    eAw = eAw @ eAw
+
+        # Zero out the entries from np.empty in case of triangular input
+        if (lu[0] == 0) or (lu[1] == 0):
+            eA[ind] = np.triu(eAw) if lu[0] == 0 else np.tril(eAw)
+        else:
+            eA[ind] = eAw
+
+    return eA
+
+
+def _exp_sinch(x):
+    # Higham's formula (10.42), might overflow, see GH-11839
+    lexp_diff = np.diff(np.exp(x))
+    l_diff = np.diff(x)
+    mask_z = l_diff == 0.
+    lexp_diff[~mask_z] /= l_diff[~mask_z]
+    lexp_diff[mask_z] = np.exp(x[:-1][mask_z])
+    return lexp_diff
+
+
+def cosm(A):
+    """
+    Compute the matrix cosine.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array
+
+    Returns
+    -------
+    cosm : (N, N) ndarray
+        Matrix cosine of A
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import expm, sinm, cosm
+
+    Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta))
+    applied to a matrix:
+
+    >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]])
+    >>> expm(1j*a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+    >>> cosm(a) + 1j*sinm(a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+
+    """
+    A = _asarray_square(A)
+    if np.iscomplexobj(A):
+        return 0.5*(expm(1j*A) + expm(-1j*A))
+    else:
+        return expm(1j*A).real
+
+
+def sinm(A):
+    """
+    Compute the matrix sine.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array.
+
+    Returns
+    -------
+    sinm : (N, N) ndarray
+        Matrix sine of `A`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import expm, sinm, cosm
+
+    Euler's identity (exp(i*theta) = cos(theta) + i*sin(theta))
+    applied to a matrix:
+
+    >>> a = np.array([[1.0, 2.0], [-1.0, 3.0]])
+    >>> expm(1j*a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+    >>> cosm(a) + 1j*sinm(a)
+    array([[ 0.42645930+1.89217551j, -2.13721484-0.97811252j],
+           [ 1.06860742+0.48905626j, -1.71075555+0.91406299j]])
+
+    """
+    A = _asarray_square(A)
+    if np.iscomplexobj(A):
+        return -0.5j*(expm(1j*A) - expm(-1j*A))
+    else:
+        return expm(1j*A).imag
+
+
+def tanm(A):
+    """
+    Compute the matrix tangent.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array.
+
+    Returns
+    -------
+    tanm : (N, N) ndarray
+        Matrix tangent of `A`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import tanm, sinm, cosm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> t = tanm(a)
+    >>> t
+    array([[ -2.00876993,  -8.41880636],
+           [ -2.80626879, -10.42757629]])
+
+    Verify tanm(a) = sinm(a).dot(inv(cosm(a)))
+
+    >>> s = sinm(a)
+    >>> c = cosm(a)
+    >>> s.dot(np.linalg.inv(c))
+    array([[ -2.00876993,  -8.41880636],
+           [ -2.80626879, -10.42757629]])
+
+    """
+    A = _asarray_square(A)
+    return _maybe_real(A, solve(cosm(A), sinm(A)))
+
+
+def coshm(A):
+    """
+    Compute the hyperbolic matrix cosine.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array.
+
+    Returns
+    -------
+    coshm : (N, N) ndarray
+        Hyperbolic matrix cosine of `A`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import tanhm, sinhm, coshm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> c = coshm(a)
+    >>> c
+    array([[ 11.24592233,  38.76236492],
+           [ 12.92078831,  50.00828725]])
+
+    Verify tanhm(a) = sinhm(a).dot(inv(coshm(a)))
+
+    >>> t = tanhm(a)
+    >>> s = sinhm(a)
+    >>> t - s.dot(np.linalg.inv(c))
+    array([[  2.72004641e-15,   4.55191440e-15],
+           [  0.00000000e+00,  -5.55111512e-16]])
+
+    """
+    A = _asarray_square(A)
+    return _maybe_real(A, 0.5 * (expm(A) + expm(-A)))
+
+
+def sinhm(A):
+    """
+    Compute the hyperbolic matrix sine.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array.
+
+    Returns
+    -------
+    sinhm : (N, N) ndarray
+        Hyperbolic matrix sine of `A`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import tanhm, sinhm, coshm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> s = sinhm(a)
+    >>> s
+    array([[ 10.57300653,  39.28826594],
+           [ 13.09608865,  49.86127247]])
+
+    Verify tanhm(a) = sinhm(a).dot(inv(coshm(a)))
+
+    >>> t = tanhm(a)
+    >>> c = coshm(a)
+    >>> t - s.dot(np.linalg.inv(c))
+    array([[  2.72004641e-15,   4.55191440e-15],
+           [  0.00000000e+00,  -5.55111512e-16]])
+
+    """
+    A = _asarray_square(A)
+    return _maybe_real(A, 0.5 * (expm(A) - expm(-A)))
+
+
+def tanhm(A):
+    """
+    Compute the hyperbolic matrix tangent.
+
+    This routine uses expm to compute the matrix exponentials.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input array
+
+    Returns
+    -------
+    tanhm : (N, N) ndarray
+        Hyperbolic matrix tangent of `A`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import tanhm, sinhm, coshm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> t = tanhm(a)
+    >>> t
+    array([[ 0.3428582 ,  0.51987926],
+           [ 0.17329309,  0.86273746]])
+
+    Verify tanhm(a) = sinhm(a).dot(inv(coshm(a)))
+
+    >>> s = sinhm(a)
+    >>> c = coshm(a)
+    >>> t - s.dot(np.linalg.inv(c))
+    array([[  2.72004641e-15,   4.55191440e-15],
+           [  0.00000000e+00,  -5.55111512e-16]])
+
+    """
+    A = _asarray_square(A)
+    return _maybe_real(A, solve(coshm(A), sinhm(A)))
+
+
+def funm(A, func, disp=True):
+    """
+    Evaluate a matrix function specified by a callable.
+
+    Returns the value of matrix-valued function ``f`` at `A`. The
+    function ``f`` is an extension of the scalar-valued function `func`
+    to matrices.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix at which to evaluate the function
+    func : callable
+        Callable object that evaluates a scalar function f.
+        Must be vectorized (eg. using vectorize).
+    disp : bool, optional
+        Print warning if error in the result is estimated large
+        instead of returning estimated error. (Default: True)
+
+    Returns
+    -------
+    funm : (N, N) ndarray
+        Value of the matrix function specified by func evaluated at `A`
+    errest : float
+        (if disp == False)
+
+        1-norm of the estimated error, ||err||_1 / ||A||_1
+
+    Notes
+    -----
+    This function implements the general algorithm based on Schur decomposition
+    (Algorithm 9.1.1. in [1]_).
+
+    If the input matrix is known to be diagonalizable, then relying on the
+    eigendecomposition is likely to be faster. For example, if your matrix is
+    Hermitian, you can do
+
+    >>> from scipy.linalg import eigh
+    >>> def funm_herm(a, func, check_finite=False):
+    ...     w, v = eigh(a, check_finite=check_finite)
+    ...     ## if you further know that your matrix is positive semidefinite,
+    ...     ## you can optionally guard against precision errors by doing
+    ...     # w = np.maximum(w, 0)
+    ...     w = func(w)
+    ...     return (v * w).dot(v.conj().T)
+
+    References
+    ----------
+    .. [1] Gene H. Golub, Charles F. van Loan, Matrix Computations 4th ed.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import funm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> funm(a, lambda x: x*x)
+    array([[  4.,  15.],
+           [  5.,  19.]])
+    >>> a.dot(a)
+    array([[  4.,  15.],
+           [  5.,  19.]])
+
+    """
+    A = _asarray_square(A)
+    # Perform Shur decomposition (lapack ?gees)
+    T, Z = schur(A)
+    T, Z = rsf2csf(T, Z)
+    n, n = T.shape
+    F = diag(func(diag(T)))  # apply function to diagonal elements
+    F = F.astype(T.dtype.char)  # e.g., when F is real but T is complex
+
+    minden = abs(T[0, 0])
+
+    # implement Algorithm 11.1.1 from Golub and Van Loan
+    #                 "matrix Computations."
+    F, minden = _funm_loops(F, T, n, minden)
+
+    F = dot(dot(Z, F), transpose(conjugate(Z)))
+    F = _maybe_real(A, F)
+
+    tol = {0: feps, 1: eps}[_array_precision[F.dtype.char]]
+    if minden == 0.0:
+        minden = tol
+    err = min(1, max(tol, (tol/minden)*norm(triu(T, 1), 1)))
+    if prod(ravel(logical_not(isfinite(F))), axis=0):
+        err = np.inf
+    if disp:
+        if err > 1000*tol:
+            print("funm result may be inaccurate, approximate err =", err)
+        return F
+    else:
+        return F, err
+
+
+def signm(A, disp=True):
+    """
+    Matrix sign function.
+
+    Extension of the scalar sign(x) to matrices.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix at which to evaluate the sign function
+    disp : bool, optional
+        Print warning if error in the result is estimated large
+        instead of returning estimated error. (Default: True)
+
+    Returns
+    -------
+    signm : (N, N) ndarray
+        Value of the sign function at `A`
+    errest : float
+        (if disp == False)
+
+        1-norm of the estimated error, ||err||_1 / ||A||_1
+
+    Examples
+    --------
+    >>> from scipy.linalg import signm, eigvals
+    >>> a = [[1,2,3], [1,2,1], [1,1,1]]
+    >>> eigvals(a)
+    array([ 4.12488542+0.j, -0.76155718+0.j,  0.63667176+0.j])
+    >>> eigvals(signm(a))
+    array([-1.+0.j,  1.+0.j,  1.+0.j])
+
+    """
+    A = _asarray_square(A)
+
+    def rounded_sign(x):
+        rx = np.real(x)
+        if rx.dtype.char == 'f':
+            c = 1e3*feps*amax(x)
+        else:
+            c = 1e3*eps*amax(x)
+        return sign((absolute(rx) > c) * rx)
+    result, errest = funm(A, rounded_sign, disp=0)
+    errtol = {0: 1e3*feps, 1: 1e3*eps}[_array_precision[result.dtype.char]]
+    if errest < errtol:
+        return result
+
+    # Handle signm of defective matrices:
+
+    # See "E.D.Denman and J.Leyva-Ramos, Appl.Math.Comp.,
+    # 8:237-250,1981" for how to improve the following (currently a
+    # rather naive) iteration process:
+
+    # a = result # sometimes iteration converges faster but where??
+
+    # Shifting to avoid zero eigenvalues. How to ensure that shifting does
+    # not change the spectrum too much?
+    vals = svd(A, compute_uv=False)
+    max_sv = np.amax(vals)
+    # min_nonzero_sv = vals[(vals>max_sv*errtol).tolist().count(1)-1]
+    # c = 0.5/min_nonzero_sv
+    c = 0.5/max_sv
+    S0 = A + c*np.identity(A.shape[0])
+    prev_errest = errest
+    for i in range(100):
+        iS0 = inv(S0)
+        S0 = 0.5*(S0 + iS0)
+        Pp = 0.5*(dot(S0, S0)+S0)
+        errest = norm(dot(Pp, Pp)-Pp, 1)
+        if errest < errtol or prev_errest == errest:
+            break
+        prev_errest = errest
+    if disp:
+        if not isfinite(errest) or errest >= errtol:
+            print("signm result may be inaccurate, approximate err =", errest)
+        return S0
+    else:
+        return S0, errest
+
+
+def khatri_rao(a, b):
+    r"""
+    Khatri-rao product
+
+    A column-wise Kronecker product of two matrices
+
+    Parameters
+    ----------
+    a : (n, k) array_like
+        Input array
+    b : (m, k) array_like
+        Input array
+
+    Returns
+    -------
+    c:  (n*m, k) ndarray
+        Khatri-rao product of `a` and `b`.
+
+    Notes
+    -----
+    The mathematical definition of the Khatri-Rao product is:
+
+    .. math::
+
+        (A_{ij}  \bigotimes B_{ij})_{ij}
+
+    which is the Kronecker product of every column of A and B, e.g.::
+
+        c = np.vstack([np.kron(a[:, k], b[:, k]) for k in range(b.shape[1])]).T
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[1, 2, 3], [4, 5, 6]])
+    >>> b = np.array([[3, 4, 5], [6, 7, 8], [2, 3, 9]])
+    >>> linalg.khatri_rao(a, b)
+    array([[ 3,  8, 15],
+           [ 6, 14, 24],
+           [ 2,  6, 27],
+           [12, 20, 30],
+           [24, 35, 48],
+           [ 8, 15, 54]])
+
+    """
+    a = np.asarray(a)
+    b = np.asarray(b)
+
+    if not (a.ndim == 2 and b.ndim == 2):
+        raise ValueError("The both arrays should be 2-dimensional.")
+
+    if not a.shape[1] == b.shape[1]:
+        raise ValueError("The number of columns for both arrays "
+                         "should be equal.")
+
+    # accommodate empty arrays
+    if a.size == 0 or b.size == 0:
+        m = a.shape[0] * b.shape[0]
+        n = a.shape[1]
+        return np.empty_like(a, shape=(m, n))
+
+    # c = np.vstack([np.kron(a[:, k], b[:, k]) for k in range(b.shape[1])]).T
+    c = a[..., :, np.newaxis, :] * b[..., np.newaxis, :, :]
+    return c.reshape((-1,) + c.shape[2:])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..98ca455c6eb06c1e95e6e11d3db2dc346a295fde
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_expm.pyi
@@ -0,0 +1,6 @@
+from numpy.typing import NDArray
+from typing import Any
+
+def pick_pade_structure(a: NDArray[Any]) -> tuple[int, int]: ...
+
+def pade_UV_calc(Am: NDArray[Any], m: int) -> int: ...
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py
new file mode 100644
index 0000000000000000000000000000000000000000..1decffae2e521f0a9325b873cc33b095a4e3c166
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_inv_ssq.py
@@ -0,0 +1,886 @@
+"""
+Matrix functions that use Pade approximation with inverse scaling and squaring.
+
+"""
+import warnings
+
+import numpy as np
+
+from scipy.linalg._matfuncs_sqrtm import SqrtmError, _sqrtm_triu
+from scipy.linalg._decomp_schur import schur, rsf2csf
+from scipy.linalg._matfuncs import funm
+from scipy.linalg import svdvals, solve_triangular
+from scipy.sparse.linalg._interface import LinearOperator
+from scipy.sparse.linalg import onenormest
+import scipy.special
+
+
+class LogmRankWarning(UserWarning):
+    pass
+
+
+class LogmExactlySingularWarning(LogmRankWarning):
+    pass
+
+
+class LogmNearlySingularWarning(LogmRankWarning):
+    pass
+
+
+class LogmError(np.linalg.LinAlgError):
+    pass
+
+
+class FractionalMatrixPowerError(np.linalg.LinAlgError):
+    pass
+
+
+#TODO renovate or move this class when scipy operators are more mature
+class _MatrixM1PowerOperator(LinearOperator):
+    """
+    A representation of the linear operator (A - I)^p.
+    """
+
+    def __init__(self, A, p):
+        if A.ndim != 2 or A.shape[0] != A.shape[1]:
+            raise ValueError('expected A to be like a square matrix')
+        if p < 0 or p != int(p):
+            raise ValueError('expected p to be a non-negative integer')
+        self._A = A
+        self._p = p
+        self.ndim = A.ndim
+        self.shape = A.shape
+
+    def _matvec(self, x):
+        for i in range(self._p):
+            x = self._A.dot(x) - x
+        return x
+
+    def _rmatvec(self, x):
+        for i in range(self._p):
+            x = x.dot(self._A) - x
+        return x
+
+    def _matmat(self, X):
+        for i in range(self._p):
+            X = self._A.dot(X) - X
+        return X
+
+    def _adjoint(self):
+        return _MatrixM1PowerOperator(self._A.T, self._p)
+
+
+#TODO renovate or move this function when SciPy operators are more mature
+def _onenormest_m1_power(A, p,
+        t=2, itmax=5, compute_v=False, compute_w=False):
+    """
+    Efficiently estimate the 1-norm of (A - I)^p.
+
+    Parameters
+    ----------
+    A : ndarray
+        Matrix whose 1-norm of a power is to be computed.
+    p : int
+        Non-negative integer power.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+        Larger values take longer and use more memory
+        but give more accurate output.
+    itmax : int, optional
+        Use at most this many iterations.
+    compute_v : bool, optional
+        Request a norm-maximizing linear operator input vector if True.
+    compute_w : bool, optional
+        Request a norm-maximizing linear operator output vector if True.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse matrix.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+
+    """
+    return onenormest(_MatrixM1PowerOperator(A, p),
+            t=t, itmax=itmax, compute_v=compute_v, compute_w=compute_w)
+
+
+def _unwindk(z):
+    """
+    Compute the scalar unwinding number.
+
+    Uses Eq. (5.3) in [1]_, and should be equal to (z - log(exp(z)) / (2 pi i).
+    Note that this definition differs in sign from the original definition
+    in equations (5, 6) in [2]_.  The sign convention is justified in [3]_.
+
+    Parameters
+    ----------
+    z : complex
+        A complex number.
+
+    Returns
+    -------
+    unwinding_number : integer
+        The scalar unwinding number of z.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    .. [2] Robert M. Corless and David J. Jeffrey,
+           "The unwinding number." Newsletter ACM SIGSAM Bulletin
+           Volume 30, Issue 2, June 1996, Pages 28-35.
+
+    .. [3] Russell Bradford and Robert M. Corless and James H. Davenport and
+           David J. Jeffrey and Stephen M. Watt,
+           "Reasoning about the elementary functions of complex analysis"
+           Annals of Mathematics and Artificial Intelligence,
+           36: 303-318, 2002.
+
+    """
+    return int(np.ceil((z.imag - np.pi) / (2*np.pi)))
+
+
+def _briggs_helper_function(a, k):
+    """
+    Computes r = a^(1 / (2^k)) - 1.
+
+    This is algorithm (2) of [1]_.
+    The purpose is to avoid a danger of subtractive cancellation.
+    For more computational efficiency it should probably be cythonized.
+
+    Parameters
+    ----------
+    a : complex
+        A complex number.
+    k : integer
+        A nonnegative integer.
+
+    Returns
+    -------
+    r : complex
+        The value r = a^(1 / (2^k)) - 1 computed with less cancellation.
+
+    Notes
+    -----
+    The algorithm as formulated in the reference does not handle k=0 or k=1
+    correctly, so these are special-cased in this implementation.
+    This function is intended to not allow `a` to belong to the closed
+    negative real axis, but this constraint is relaxed.
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy (2012)
+           "A more accurate Briggs method for the logarithm",
+           Numerical Algorithms, 59 : 393--402.
+
+    """
+    if k < 0 or int(k) != k:
+        raise ValueError('expected a nonnegative integer k')
+    if k == 0:
+        return a - 1
+    elif k == 1:
+        return np.sqrt(a) - 1
+    else:
+        k_hat = k
+        if np.angle(a) >= np.pi / 2:
+            a = np.sqrt(a)
+            k_hat = k - 1
+        z0 = a - 1
+        a = np.sqrt(a)
+        r = 1 + a
+        for j in range(1, k_hat):
+            a = np.sqrt(a)
+            r = r * (1 + a)
+        r = z0 / r
+        return r
+
+
+def _fractional_power_superdiag_entry(l1, l2, t12, p):
+    """
+    Compute a superdiagonal entry of a fractional matrix power.
+
+    This is Eq. (5.6) in [1]_.
+
+    Parameters
+    ----------
+    l1 : complex
+        A diagonal entry of the matrix.
+    l2 : complex
+        A diagonal entry of the matrix.
+    t12 : complex
+        A superdiagonal entry of the matrix.
+    p : float
+        A fractional power.
+
+    Returns
+    -------
+    f12 : complex
+        A superdiagonal entry of the fractional matrix power.
+
+    Notes
+    -----
+    Care has been taken to return a real number if possible when
+    all of the inputs are real numbers.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    """
+    if l1 == l2:
+        f12 = t12 * p * l1**(p-1)
+    elif abs(l2 - l1) > abs(l1 + l2) / 2:
+        f12 = t12 * ((l2**p) - (l1**p)) / (l2 - l1)
+    else:
+        # This is Eq. (5.5) in [1].
+        z = (l2 - l1) / (l2 + l1)
+        log_l1 = np.log(l1)
+        log_l2 = np.log(l2)
+        arctanh_z = np.arctanh(z)
+        tmp_a = t12 * np.exp((p/2)*(log_l2 + log_l1))
+        tmp_u = _unwindk(log_l2 - log_l1)
+        if tmp_u:
+            tmp_b = p * (arctanh_z + np.pi * 1j * tmp_u)
+        else:
+            tmp_b = p * arctanh_z
+        tmp_c = 2 * np.sinh(tmp_b) / (l2 - l1)
+        f12 = tmp_a * tmp_c
+    return f12
+
+
+def _logm_superdiag_entry(l1, l2, t12):
+    """
+    Compute a superdiagonal entry of a matrix logarithm.
+
+    This is like Eq. (11.28) in [1]_, except the determination of whether
+    l1 and l2 are sufficiently far apart has been modified.
+
+    Parameters
+    ----------
+    l1 : complex
+        A diagonal entry of the matrix.
+    l2 : complex
+        A diagonal entry of the matrix.
+    t12 : complex
+        A superdiagonal entry of the matrix.
+
+    Returns
+    -------
+    f12 : complex
+        A superdiagonal entry of the matrix logarithm.
+
+    Notes
+    -----
+    Care has been taken to return a real number if possible when
+    all of the inputs are real numbers.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham (2008)
+           "Functions of Matrices: Theory and Computation"
+           ISBN 978-0-898716-46-7
+
+    """
+    if l1 == l2:
+        f12 = t12 / l1
+    elif abs(l2 - l1) > abs(l1 + l2) / 2:
+        f12 = t12 * (np.log(l2) - np.log(l1)) / (l2 - l1)
+    else:
+        z = (l2 - l1) / (l2 + l1)
+        u = _unwindk(np.log(l2) - np.log(l1))
+        if u:
+            f12 = t12 * 2 * (np.arctanh(z) + np.pi*1j*u) / (l2 - l1)
+        else:
+            f12 = t12 * 2 * np.arctanh(z) / (l2 - l1)
+    return f12
+
+
+def _inverse_squaring_helper(T0, theta):
+    """
+    A helper function for inverse scaling and squaring for Pade approximation.
+
+    Parameters
+    ----------
+    T0 : (N, N) array_like upper triangular
+        Matrix involved in inverse scaling and squaring.
+    theta : indexable
+        The values theta[1] .. theta[7] must be available.
+        They represent bounds related to Pade approximation, and they depend
+        on the matrix function which is being computed.
+        For example, different values of theta are required for
+        matrix logarithm than for fractional matrix power.
+
+    Returns
+    -------
+    R : (N, N) array_like upper triangular
+        Composition of zero or more matrix square roots of T0, minus I.
+    s : non-negative integer
+        Number of square roots taken.
+    m : positive integer
+        The degree of the Pade approximation.
+
+    Notes
+    -----
+    This subroutine appears as a chunk of lines within
+    a couple of published algorithms; for example it appears
+    as lines 4--35 in algorithm (3.1) of [1]_, and
+    as lines 3--34 in algorithm (4.1) of [2]_.
+    The instances of 'goto line 38' in algorithm (3.1) of [1]_
+    probably mean 'goto line 36' and have been interpreted accordingly.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing Lin (2013)
+           "An Improved Schur-Pade Algorithm for Fractional Powers
+           of a Matrix and their Frechet Derivatives."
+
+    .. [2] Awad H. Al-Mohy and Nicholas J. Higham (2012)
+           "Improved Inverse Scaling and Squaring Algorithms
+           for the Matrix Logarithm."
+           SIAM Journal on Scientific Computing, 34 (4). C152-C169.
+           ISSN 1095-7197
+
+    """
+    if len(T0.shape) != 2 or T0.shape[0] != T0.shape[1]:
+        raise ValueError('expected an upper triangular square matrix')
+    n, n = T0.shape
+    T = T0
+
+    # Find s0, the smallest s such that the spectral radius
+    # of a certain diagonal matrix is at most theta[7].
+    # Note that because theta[7] < 1,
+    # this search will not terminate if any diagonal entry of T is zero.
+    s0 = 0
+    tmp_diag = np.diag(T)
+    if np.count_nonzero(tmp_diag) != n:
+        raise Exception('Diagonal entries of T must be nonzero')
+    while np.max(np.absolute(tmp_diag - 1), initial=0.) > theta[7]:
+        tmp_diag = np.sqrt(tmp_diag)
+        s0 += 1
+
+    # Take matrix square roots of T.
+    for i in range(s0):
+        T = _sqrtm_triu(T)
+
+    # Flow control in this section is a little odd.
+    # This is because I am translating algorithm descriptions
+    # which have GOTOs in the publication.
+    s = s0
+    k = 0
+    d2 = _onenormest_m1_power(T, 2) ** (1/2)
+    d3 = _onenormest_m1_power(T, 3) ** (1/3)
+    a2 = max(d2, d3)
+    m = None
+    for i in (1, 2):
+        if a2 <= theta[i]:
+            m = i
+            break
+    while m is None:
+        if s > s0:
+            d3 = _onenormest_m1_power(T, 3) ** (1/3)
+        d4 = _onenormest_m1_power(T, 4) ** (1/4)
+        a3 = max(d3, d4)
+        if a3 <= theta[7]:
+            j1 = min(i for i in (3, 4, 5, 6, 7) if a3 <= theta[i])
+            if j1 <= 6:
+                m = j1
+                break
+            elif a3 / 2 <= theta[5] and k < 2:
+                k += 1
+                T = _sqrtm_triu(T)
+                s += 1
+                continue
+        d5 = _onenormest_m1_power(T, 5) ** (1/5)
+        a4 = max(d4, d5)
+        eta = min(a3, a4)
+        for i in (6, 7):
+            if eta <= theta[i]:
+                m = i
+                break
+        if m is not None:
+            break
+        T = _sqrtm_triu(T)
+        s += 1
+
+    # The subtraction of the identity is redundant here,
+    # because the diagonal will be replaced for improved numerical accuracy,
+    # but this formulation should help clarify the meaning of R.
+    R = T - np.identity(n)
+
+    # Replace the diagonal and first superdiagonal of T0^(1/(2^s)) - I
+    # using formulas that have less subtractive cancellation.
+    # Skip this step if the principal branch
+    # does not exist at T0; this happens when a diagonal entry of T0
+    # is negative with imaginary part 0.
+    has_principal_branch = all(x.real > 0 or x.imag != 0 for x in np.diag(T0))
+    if has_principal_branch:
+        for j in range(n):
+            a = T0[j, j]
+            r = _briggs_helper_function(a, s)
+            R[j, j] = r
+        p = np.exp2(-s)
+        for j in range(n-1):
+            l1 = T0[j, j]
+            l2 = T0[j+1, j+1]
+            t12 = T0[j, j+1]
+            f12 = _fractional_power_superdiag_entry(l1, l2, t12, p)
+            R[j, j+1] = f12
+
+    # Return the T-I matrix, the number of square roots, and the Pade degree.
+    if not np.array_equal(R, np.triu(R)):
+        raise Exception('R is not upper triangular')
+    return R, s, m
+
+
+def _fractional_power_pade_constant(i, t):
+    # A helper function for matrix fractional power.
+    if i < 1:
+        raise ValueError('expected a positive integer i')
+    if not (-1 < t < 1):
+        raise ValueError('expected -1 < t < 1')
+    if i == 1:
+        return -t
+    elif i % 2 == 0:
+        j = i // 2
+        return (-j + t) / (2 * (2*j - 1))
+    elif i % 2 == 1:
+        j = (i - 1) // 2
+        return (-j - t) / (2 * (2*j + 1))
+    else:
+        raise Exception(f'unnexpected value of i, i = {i}')
+
+
+def _fractional_power_pade(R, t, m):
+    """
+    Evaluate the Pade approximation of a fractional matrix power.
+
+    Evaluate the degree-m Pade approximation of R
+    to the fractional matrix power t using the continued fraction
+    in bottom-up fashion using algorithm (4.1) in [1]_.
+
+    Parameters
+    ----------
+    R : (N, N) array_like
+        Upper triangular matrix whose fractional power to evaluate.
+    t : float
+        Fractional power between -1 and 1 exclusive.
+    m : positive integer
+        Degree of Pade approximation.
+
+    Returns
+    -------
+    U : (N, N) array_like
+        The degree-m Pade approximation of R to the fractional power t.
+        This matrix will be upper triangular.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    """
+    if m < 1 or int(m) != m:
+        raise ValueError('expected a positive integer m')
+    if not (-1 < t < 1):
+        raise ValueError('expected -1 < t < 1')
+    R = np.asarray(R)
+    if len(R.shape) != 2 or R.shape[0] != R.shape[1]:
+        raise ValueError('expected an upper triangular square matrix')
+    n, n = R.shape
+    ident = np.identity(n)
+    Y = R * _fractional_power_pade_constant(2*m, t)
+    for j in range(2*m - 1, 0, -1):
+        rhs = R * _fractional_power_pade_constant(j, t)
+        Y = solve_triangular(ident + Y, rhs)
+    U = ident + Y
+    if not np.array_equal(U, np.triu(U)):
+        raise Exception('U is not upper triangular')
+    return U
+
+
+def _remainder_matrix_power_triu(T, t):
+    """
+    Compute a fractional power of an upper triangular matrix.
+
+    The fractional power is restricted to fractions -1 < t < 1.
+    This uses algorithm (3.1) of [1]_.
+    The Pade approximation itself uses algorithm (4.1) of [2]_.
+
+    Parameters
+    ----------
+    T : (N, N) array_like
+        Upper triangular matrix whose fractional power to evaluate.
+    t : float
+        Fractional power between -1 and 1 exclusive.
+
+    Returns
+    -------
+    X : (N, N) array_like
+        The fractional power of the matrix.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing Lin (2013)
+           "An Improved Schur-Pade Algorithm for Fractional Powers
+           of a Matrix and their Frechet Derivatives."
+
+    .. [2] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    """
+    m_to_theta = {
+            1: 1.51e-5,
+            2: 2.24e-3,
+            3: 1.88e-2,
+            4: 6.04e-2,
+            5: 1.24e-1,
+            6: 2.00e-1,
+            7: 2.79e-1,
+            }
+    n, n = T.shape
+    T0 = T
+    T0_diag = np.diag(T0)
+    if np.array_equal(T0, np.diag(T0_diag)):
+        U = np.diag(T0_diag ** t)
+    else:
+        R, s, m = _inverse_squaring_helper(T0, m_to_theta)
+
+        # Evaluate the Pade approximation.
+        # Note that this function expects the negative of the matrix
+        # returned by the inverse squaring helper.
+        U = _fractional_power_pade(-R, t, m)
+
+        # Undo the inverse scaling and squaring.
+        # Be less clever about this
+        # if the principal branch does not exist at T0;
+        # this happens when a diagonal entry of T0
+        # is negative with imaginary part 0.
+        eivals = np.diag(T0)
+        has_principal_branch = all(x.real > 0 or x.imag != 0 for x in eivals)
+        for i in range(s, -1, -1):
+            if i < s:
+                U = U.dot(U)
+            else:
+                if has_principal_branch:
+                    p = t * np.exp2(-i)
+                    U[np.diag_indices(n)] = T0_diag ** p
+                    for j in range(n-1):
+                        l1 = T0[j, j]
+                        l2 = T0[j+1, j+1]
+                        t12 = T0[j, j+1]
+                        f12 = _fractional_power_superdiag_entry(l1, l2, t12, p)
+                        U[j, j+1] = f12
+    if not np.array_equal(U, np.triu(U)):
+        raise Exception('U is not upper triangular')
+    return U
+
+
+def _remainder_matrix_power(A, t):
+    """
+    Compute the fractional power of a matrix, for fractions -1 < t < 1.
+
+    This uses algorithm (3.1) of [1]_.
+    The Pade approximation itself uses algorithm (4.1) of [2]_.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix whose fractional power to evaluate.
+    t : float
+        Fractional power between -1 and 1 exclusive.
+
+    Returns
+    -------
+    X : (N, N) array_like
+        The fractional power of the matrix.
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Lijing Lin (2013)
+           "An Improved Schur-Pade Algorithm for Fractional Powers
+           of a Matrix and their Frechet Derivatives."
+
+    .. [2] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    """
+    # This code block is copied from numpy.matrix_power().
+    A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('input must be a square array')
+
+    # Get the number of rows and columns.
+    n, n = A.shape
+
+    # Triangularize the matrix if necessary,
+    # attempting to preserve dtype if possible.
+    if np.array_equal(A, np.triu(A)):
+        Z = None
+        T = A
+    else:
+        if np.isrealobj(A):
+            T, Z = schur(A)
+            if not np.array_equal(T, np.triu(T)):
+                T, Z = rsf2csf(T, Z)
+        else:
+            T, Z = schur(A, output='complex')
+
+    # Zeros on the diagonal of the triangular matrix are forbidden,
+    # because the inverse scaling and squaring cannot deal with it.
+    T_diag = np.diag(T)
+    if np.count_nonzero(T_diag) != n:
+        raise FractionalMatrixPowerError(
+                'cannot use inverse scaling and squaring to find '
+                'the fractional matrix power of a singular matrix')
+
+    # If the triangular matrix is real and has a negative
+    # entry on the diagonal, then force the matrix to be complex.
+    if np.isrealobj(T) and np.min(T_diag) < 0:
+        T = T.astype(complex)
+
+    # Get the fractional power of the triangular matrix,
+    # and de-triangularize it if necessary.
+    U = _remainder_matrix_power_triu(T, t)
+    if Z is not None:
+        ZH = np.conjugate(Z).T
+        return Z.dot(U).dot(ZH)
+    else:
+        return U
+
+
+def _fractional_matrix_power(A, p):
+    """
+    Compute the fractional power of a matrix.
+
+    See the fractional_matrix_power docstring in matfuncs.py for more info.
+
+    """
+    A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected a square matrix')
+    if p == int(p):
+        return np.linalg.matrix_power(A, int(p))
+    # Compute singular values.
+    s = svdvals(A)
+    # Inverse scaling and squaring cannot deal with a singular matrix,
+    # because the process of repeatedly taking square roots
+    # would not converge to the identity matrix.
+    if s[-1]:
+        # Compute the condition number relative to matrix inversion,
+        # and use this to decide between floor(p) and ceil(p).
+        k2 = s[0] / s[-1]
+        p1 = p - np.floor(p)
+        p2 = p - np.ceil(p)
+        if p1 * k2 ** (1 - p1) <= -p2 * k2:
+            a = int(np.floor(p))
+            b = p1
+        else:
+            a = int(np.ceil(p))
+            b = p2
+        try:
+            R = _remainder_matrix_power(A, b)
+            Q = np.linalg.matrix_power(A, a)
+            return Q.dot(R)
+        except np.linalg.LinAlgError:
+            pass
+    # If p is negative then we are going to give up.
+    # If p is non-negative then we can fall back to generic funm.
+    if p < 0:
+        X = np.empty_like(A)
+        X.fill(np.nan)
+        return X
+    else:
+        p1 = p - np.floor(p)
+        a = int(np.floor(p))
+        b = p1
+        R, info = funm(A, lambda x: pow(x, b), disp=False)
+        Q = np.linalg.matrix_power(A, a)
+        return Q.dot(R)
+
+
+def _logm_triu(T):
+    """
+    Compute matrix logarithm of an upper triangular matrix.
+
+    The matrix logarithm is the inverse of
+    expm: expm(logm(`T`)) == `T`
+
+    Parameters
+    ----------
+    T : (N, N) array_like
+        Upper triangular matrix whose logarithm to evaluate
+
+    Returns
+    -------
+    logm : (N, N) ndarray
+        Matrix logarithm of `T`
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2012)
+           "Improved Inverse Scaling and Squaring Algorithms
+           for the Matrix Logarithm."
+           SIAM Journal on Scientific Computing, 34 (4). C152-C169.
+           ISSN 1095-7197
+
+    .. [2] Nicholas J. Higham (2008)
+           "Functions of Matrices: Theory and Computation"
+           ISBN 978-0-898716-46-7
+
+    .. [3] Nicholas J. Higham and Lijing lin (2011)
+           "A Schur-Pade Algorithm for Fractional Powers of a Matrix."
+           SIAM Journal on Matrix Analysis and Applications,
+           32 (3). pp. 1056-1078. ISSN 0895-4798
+
+    """
+    T = np.asarray(T)
+    if len(T.shape) != 2 or T.shape[0] != T.shape[1]:
+        raise ValueError('expected an upper triangular square matrix')
+    n, n = T.shape
+
+    # Construct T0 with the appropriate type,
+    # depending on the dtype and the spectrum of T.
+    T_diag = np.diag(T)
+    keep_it_real = np.isrealobj(T) and np.min(T_diag, initial=0.) >= 0
+    if keep_it_real:
+        T0 = T
+    else:
+        T0 = T.astype(complex)
+
+    # Define bounds given in Table (2.1).
+    theta = (None,
+            1.59e-5, 2.31e-3, 1.94e-2, 6.21e-2,
+            1.28e-1, 2.06e-1, 2.88e-1, 3.67e-1,
+            4.39e-1, 5.03e-1, 5.60e-1, 6.09e-1,
+            6.52e-1, 6.89e-1, 7.21e-1, 7.49e-1)
+
+    R, s, m = _inverse_squaring_helper(T0, theta)
+
+    # Evaluate U = 2**s r_m(T - I) using the partial fraction expansion (1.1).
+    # This requires the nodes and weights
+    # corresponding to degree-m Gauss-Legendre quadrature.
+    # These quadrature arrays need to be transformed from the [-1, 1] interval
+    # to the [0, 1] interval.
+    nodes, weights = scipy.special.p_roots(m)
+    nodes = nodes.real
+    if nodes.shape != (m,) or weights.shape != (m,):
+        raise Exception('internal error')
+    nodes = 0.5 + 0.5 * nodes
+    weights = 0.5 * weights
+    ident = np.identity(n)
+    U = np.zeros_like(R)
+    for alpha, beta in zip(weights, nodes):
+        U += solve_triangular(ident + beta*R, alpha*R)
+    U *= np.exp2(s)
+
+    # Skip this step if the principal branch
+    # does not exist at T0; this happens when a diagonal entry of T0
+    # is negative with imaginary part 0.
+    has_principal_branch = all(x.real > 0 or x.imag != 0 for x in np.diag(T0))
+    if has_principal_branch:
+
+        # Recompute diagonal entries of U.
+        U[np.diag_indices(n)] = np.log(np.diag(T0))
+
+        # Recompute superdiagonal entries of U.
+        # This indexing of this code should be renovated
+        # when newer np.diagonal() becomes available.
+        for i in range(n-1):
+            l1 = T0[i, i]
+            l2 = T0[i+1, i+1]
+            t12 = T0[i, i+1]
+            U[i, i+1] = _logm_superdiag_entry(l1, l2, t12)
+
+    # Return the logm of the upper triangular matrix.
+    if not np.array_equal(U, np.triu(U)):
+        raise Exception('U is not upper triangular')
+    return U
+
+
+def _logm_force_nonsingular_triangular_matrix(T, inplace=False):
+    # The input matrix should be upper triangular.
+    # The eps is ad hoc and is not meant to be machine precision.
+    tri_eps = 1e-20
+    abs_diag = np.absolute(np.diag(T))
+    if np.any(abs_diag == 0):
+        exact_singularity_msg = 'The logm input matrix is exactly singular.'
+        warnings.warn(exact_singularity_msg, LogmExactlySingularWarning, stacklevel=3)
+        if not inplace:
+            T = T.copy()
+        n = T.shape[0]
+        for i in range(n):
+            if not T[i, i]:
+                T[i, i] = tri_eps
+    elif np.any(abs_diag < tri_eps):
+        near_singularity_msg = 'The logm input matrix may be nearly singular.'
+        warnings.warn(near_singularity_msg, LogmNearlySingularWarning, stacklevel=3)
+    return T
+
+
+def _logm(A):
+    """
+    Compute the matrix logarithm.
+
+    See the logm docstring in matfuncs.py for more info.
+
+    Notes
+    -----
+    In this function we look at triangular matrices that are similar
+    to the input matrix. If any diagonal entry of such a triangular matrix
+    is exactly zero then the original matrix is singular.
+    The matrix logarithm does not exist for such matrices,
+    but in such cases we will pretend that the diagonal entries that are zero
+    are actually slightly positive by an ad-hoc amount, in the interest
+    of returning something more useful than NaN. This will cause a warning.
+
+    """
+    A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected a square matrix')
+
+    # If the input matrix dtype is integer then copy to a float dtype matrix.
+    if issubclass(A.dtype.type, np.integer):
+        A = np.asarray(A, dtype=float)
+
+    keep_it_real = np.isrealobj(A)
+    try:
+        if np.array_equal(A, np.triu(A)):
+            A = _logm_force_nonsingular_triangular_matrix(A)
+            if np.min(np.diag(A), initial=0.) < 0:
+                A = A.astype(complex)
+            return _logm_triu(A)
+        else:
+            if keep_it_real:
+                T, Z = schur(A)
+                if not np.array_equal(T, np.triu(T)):
+                    T, Z = rsf2csf(T, Z)
+            else:
+                T, Z = schur(A, output='complex')
+            T = _logm_force_nonsingular_triangular_matrix(T, inplace=True)
+            U = _logm_triu(T)
+            ZH = np.conjugate(Z).T
+            return Z.dot(U).dot(ZH)
+    except (SqrtmError, LogmError):
+        X = np.empty_like(A)
+        X.fill(np.nan)
+        return X
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py
new file mode 100644
index 0000000000000000000000000000000000000000..b7da6ced474ee3db548a24ecc08d7e2627f0d7a4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_matfuncs_sqrtm.py
@@ -0,0 +1,205 @@
+"""
+Matrix square root for general matrices and for upper triangular matrices.
+
+This module exists to avoid cyclic imports.
+
+"""
+__all__ = ['sqrtm']
+
+import numpy as np
+
+from scipy._lib._util import _asarray_validated
+
+# Local imports
+from ._misc import norm
+from .lapack import ztrsyl, dtrsyl
+from ._decomp_schur import schur, rsf2csf
+from ._basic import _ensure_dtype_cdsz
+
+
+
+class SqrtmError(np.linalg.LinAlgError):
+    pass
+
+
+from ._matfuncs_sqrtm_triu import within_block_loop  # noqa: E402
+
+
+def _sqrtm_triu(T, blocksize=64):
+    """
+    Matrix square root of an upper triangular matrix.
+
+    This is a helper function for `sqrtm` and `logm`.
+
+    Parameters
+    ----------
+    T : (N, N) array_like upper triangular
+        Matrix whose square root to evaluate
+    blocksize : int, optional
+        If the blocksize is not degenerate with respect to the
+        size of the input array, then use a blocked algorithm. (Default: 64)
+
+    Returns
+    -------
+    sqrtm : (N, N) ndarray
+        Value of the sqrt function at `T`
+
+    References
+    ----------
+    .. [1] Edvin Deadman, Nicholas J. Higham, Rui Ralha (2013)
+           "Blocked Schur Algorithms for Computing the Matrix Square Root,
+           Lecture Notes in Computer Science, 7782. pp. 171-182.
+
+    """
+    T_diag = np.diag(T)
+    keep_it_real = np.isrealobj(T) and np.min(T_diag, initial=0.) >= 0
+
+    # Cast to complex as necessary + ensure double precision
+    if not keep_it_real:
+        T = np.asarray(T, dtype=np.complex128, order="C")
+        T_diag = np.asarray(T_diag, dtype=np.complex128)
+    else:
+        T = np.asarray(T, dtype=np.float64, order="C")
+        T_diag = np.asarray(T_diag, dtype=np.float64)
+
+    R = np.diag(np.sqrt(T_diag))
+
+    # Compute the number of blocks to use; use at least one block.
+    n, n = T.shape
+    nblocks = max(n // blocksize, 1)
+
+    # Compute the smaller of the two sizes of blocks that
+    # we will actually use, and compute the number of large blocks.
+    bsmall, nlarge = divmod(n, nblocks)
+    blarge = bsmall + 1
+    nsmall = nblocks - nlarge
+    if nsmall * bsmall + nlarge * blarge != n:
+        raise Exception('internal inconsistency')
+
+    # Define the index range covered by each block.
+    start_stop_pairs = []
+    start = 0
+    for count, size in ((nsmall, bsmall), (nlarge, blarge)):
+        for i in range(count):
+            start_stop_pairs.append((start, start + size))
+            start += size
+
+    # Within-block interactions (Cythonized)
+    try:
+        within_block_loop(R, T, start_stop_pairs, nblocks)
+    except RuntimeError as e:
+        raise SqrtmError(*e.args) from e
+
+    # Between-block interactions (Cython would give no significant speedup)
+    for j in range(nblocks):
+        jstart, jstop = start_stop_pairs[j]
+        for i in range(j-1, -1, -1):
+            istart, istop = start_stop_pairs[i]
+            S = T[istart:istop, jstart:jstop]
+            if j - i > 1:
+                S = S - R[istart:istop, istop:jstart].dot(R[istop:jstart,
+                                                            jstart:jstop])
+
+            # Invoke LAPACK.
+            # For more details, see the solve_sylvester implementation
+            # and the fortran dtrsyl and ztrsyl docs.
+            Rii = R[istart:istop, istart:istop]
+            Rjj = R[jstart:jstop, jstart:jstop]
+            if keep_it_real:
+                x, scale, info = dtrsyl(Rii, Rjj, S)
+            else:
+                x, scale, info = ztrsyl(Rii, Rjj, S)
+            R[istart:istop, jstart:jstop] = x * scale
+
+    # Return the matrix square root.
+    return R
+
+
+def sqrtm(A, disp=True, blocksize=64):
+    """
+    Matrix square root.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Matrix whose square root to evaluate
+    disp : bool, optional
+        Print warning if error in the result is estimated large
+        instead of returning estimated error. (Default: True)
+    blocksize : integer, optional
+        If the blocksize is not degenerate with respect to the
+        size of the input array, then use a blocked algorithm. (Default: 64)
+
+    Returns
+    -------
+    sqrtm : (N, N) ndarray
+        Value of the sqrt function at `A`. The dtype is float or complex.
+        The precision (data size) is determined based on the precision of
+        input `A`.
+
+    errest : float
+        (if disp == False)
+
+        Frobenius norm of the estimated error, ||err||_F / ||A||_F
+
+    References
+    ----------
+    .. [1] Edvin Deadman, Nicholas J. Higham, Rui Ralha (2013)
+           "Blocked Schur Algorithms for Computing the Matrix Square Root,
+           Lecture Notes in Computer Science, 7782. pp. 171-182.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import sqrtm
+    >>> a = np.array([[1.0, 3.0], [1.0, 4.0]])
+    >>> r = sqrtm(a)
+    >>> r
+    array([[ 0.75592895,  1.13389342],
+           [ 0.37796447,  1.88982237]])
+    >>> r.dot(r)
+    array([[ 1.,  3.],
+           [ 1.,  4.]])
+
+    """
+    A = _asarray_validated(A, check_finite=True, as_inexact=True)
+    if len(A.shape) != 2:
+        raise ValueError("Non-matrix input to matrix function.")
+    if blocksize < 1:
+        raise ValueError("The blocksize should be at least 1.")
+    A, = _ensure_dtype_cdsz(A)
+    keep_it_real = np.isrealobj(A)
+    if keep_it_real:
+        T, Z = schur(A)
+        d0 = np.diagonal(T)
+        d1 = np.diagonal(T, -1)
+        eps = np.finfo(T.dtype).eps
+        needs_conversion = abs(d1) > eps * (abs(d0[1:]) + abs(d0[:-1]))
+        if needs_conversion.any():
+            T, Z = rsf2csf(T, Z)
+    else:
+        T, Z = schur(A, output='complex')
+    failflag = False
+    try:
+        R = _sqrtm_triu(T, blocksize=blocksize)
+        ZH = np.conjugate(Z).T
+        X = Z.dot(R).dot(ZH)
+        dtype = np.result_type(A.dtype, 1j if np.iscomplexobj(X) else 1)
+        X = X.astype(dtype, copy=False)
+    except SqrtmError:
+        failflag = True
+        X = np.empty_like(A)
+        X.fill(np.nan)
+
+    if disp:
+        if failflag:
+            print("Failed to find a square root.")
+        return X
+    else:
+        try:
+            arg2 = norm(X.dot(X) - A, 'fro')**2 / norm(A, 'fro')
+        except ValueError:
+            # NaNs in matrix
+            arg2 = np.inf
+
+        return X, arg2
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_misc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_misc.py
new file mode 100644
index 0000000000000000000000000000000000000000..27cd442080c8569417694a8a612fe0a461c1a2ca
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_misc.py
@@ -0,0 +1,191 @@
+import numpy as np
+from numpy.linalg import LinAlgError
+from .blas import get_blas_funcs
+from .lapack import get_lapack_funcs
+
+__all__ = ['LinAlgError', 'LinAlgWarning', 'norm']
+
+
+class LinAlgWarning(RuntimeWarning):
+    """
+    The warning emitted when a linear algebra related operation is close
+    to fail conditions of the algorithm or loss of accuracy is expected.
+    """
+    pass
+
+
+def norm(a, ord=None, axis=None, keepdims=False, check_finite=True):
+    """
+    Matrix or vector norm.
+
+    This function is able to return one of eight different matrix norms,
+    or one of an infinite number of vector norms (described below), depending
+    on the value of the ``ord`` parameter. For tensors with rank different from
+    1 or 2, only `ord=None` is supported.
+
+    Parameters
+    ----------
+    a : array_like
+        Input array. If `axis` is None, `a` must be 1-D or 2-D, unless `ord`
+        is None. If both `axis` and `ord` are None, the 2-norm of
+        ``a.ravel`` will be returned.
+    ord : {int, inf, -inf, 'fro', 'nuc', None}, optional
+        Order of the norm (see table under ``Notes``). inf means NumPy's
+        `inf` object.
+    axis : {int, 2-tuple of ints, None}, optional
+        If `axis` is an integer, it specifies the axis of `a` along which to
+        compute the vector norms. If `axis` is a 2-tuple, it specifies the
+        axes that hold 2-D matrices, and the matrix norms of these matrices
+        are computed. If `axis` is None then either a vector norm (when `a`
+        is 1-D) or a matrix norm (when `a` is 2-D) is returned.
+    keepdims : bool, optional
+        If this is set to True, the axes which are normed over are left in the
+        result as dimensions with size one. With this option the result will
+        broadcast correctly against the original `a`.
+    check_finite : bool, optional
+        Whether to check that the input matrix contains only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    n : float or ndarray
+        Norm of the matrix or vector(s).
+
+    Notes
+    -----
+    For values of ``ord <= 0``, the result is, strictly speaking, not a
+    mathematical 'norm', but it may still be useful for various numerical
+    purposes.
+
+    The following norms can be calculated:
+
+    =====  ============================  ==========================
+    ord    norm for matrices             norm for vectors
+    =====  ============================  ==========================
+    None   Frobenius norm                2-norm
+    'fro'  Frobenius norm                --
+    'nuc'  nuclear norm                  --
+    inf    max(sum(abs(a), axis=1))      max(abs(a))
+    -inf   min(sum(abs(a), axis=1))      min(abs(a))
+    0      --                            sum(a != 0)
+    1      max(sum(abs(a), axis=0))      as below
+    -1     min(sum(abs(a), axis=0))      as below
+    2      2-norm (largest sing. value)  as below
+    -2     smallest singular value       as below
+    other  --                            sum(abs(a)**ord)**(1./ord)
+    =====  ============================  ==========================
+
+    The Frobenius norm is given by [1]_:
+
+        :math:`||A||_F = [\\sum_{i,j} abs(a_{i,j})^2]^{1/2}`
+
+    The nuclear norm is the sum of the singular values.
+
+    Both the Frobenius and nuclear norm orders are only defined for
+    matrices.
+
+    References
+    ----------
+    .. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*,
+           Baltimore, MD, Johns Hopkins University Press, 1985, pg. 15
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import norm
+    >>> a = np.arange(9) - 4.0
+    >>> a
+    array([-4., -3., -2., -1.,  0.,  1.,  2.,  3.,  4.])
+    >>> b = a.reshape((3, 3))
+    >>> b
+    array([[-4., -3., -2.],
+           [-1.,  0.,  1.],
+           [ 2.,  3.,  4.]])
+
+    >>> norm(a)
+    7.745966692414834
+    >>> norm(b)
+    7.745966692414834
+    >>> norm(b, 'fro')
+    7.745966692414834
+    >>> norm(a, np.inf)
+    4.0
+    >>> norm(b, np.inf)
+    9.0
+    >>> norm(a, -np.inf)
+    0.0
+    >>> norm(b, -np.inf)
+    2.0
+
+    >>> norm(a, 1)
+    20.0
+    >>> norm(b, 1)
+    7.0
+    >>> norm(a, -1)
+    -4.6566128774142013e-010
+    >>> norm(b, -1)
+    6.0
+    >>> norm(a, 2)
+    7.745966692414834
+    >>> norm(b, 2)
+    7.3484692283495345
+
+    >>> norm(a, -2)
+    0.0
+    >>> norm(b, -2)
+    1.8570331885190563e-016
+    >>> norm(a, 3)
+    5.8480354764257312
+    >>> norm(a, -3)
+    0.0
+
+    """
+    # Differs from numpy only in non-finite handling and the use of blas.
+    if check_finite:
+        a = np.asarray_chkfinite(a)
+    else:
+        a = np.asarray(a)
+
+    if a.size and a.dtype.char in 'fdFD' and axis is None and not keepdims:
+
+        if ord in (None, 2) and (a.ndim == 1):
+            # use blas for fast and stable euclidean norm
+            nrm2 = get_blas_funcs('nrm2', dtype=a.dtype, ilp64='preferred')
+            return nrm2(a)
+
+        if a.ndim == 2:
+            # Use lapack for a couple fast matrix norms.
+            # For some reason the *lange frobenius norm is slow.
+            lange_args = None
+            # Make sure this works if the user uses the axis keywords
+            # to apply the norm to the transpose.
+            if ord == 1:
+                if np.isfortran(a):
+                    lange_args = '1', a
+                elif np.isfortran(a.T):
+                    lange_args = 'i', a.T
+            elif ord == np.inf:
+                if np.isfortran(a):
+                    lange_args = 'i', a
+                elif np.isfortran(a.T):
+                    lange_args = '1', a.T
+            if lange_args:
+                lange = get_lapack_funcs('lange', dtype=a.dtype, ilp64='preferred')
+                return lange(*lange_args)
+
+    # fall back to numpy in every other case
+    return np.linalg.norm(a, ord=ord, axis=axis, keepdims=keepdims)
+
+
+def _datacopied(arr, original):
+    """
+    Strict check for `arr` not sharing any data with `original`,
+    under the assumption that arr = asarray(original)
+
+    """
+    if arr is original:
+        return False
+    if not isinstance(original, np.ndarray) and hasattr(original, '__array__'):
+        return False
+    return arr.base is None
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py
new file mode 100644
index 0000000000000000000000000000000000000000..7d68f0b737ead5d581095ad32a34ae88d153264c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_procrustes.py
@@ -0,0 +1,111 @@
+"""
+Solve the orthogonal Procrustes problem.
+
+"""
+import numpy as np
+from ._decomp_svd import svd
+
+
+__all__ = ['orthogonal_procrustes']
+
+
+def orthogonal_procrustes(A, B, check_finite=True):
+    """
+    Compute the matrix solution of the orthogonal (or unitary) Procrustes problem.
+
+    Given matrices `A` and `B` of the same shape, find an orthogonal (or unitary in
+    the case of complex input) matrix `R` that most closely maps `A` to `B` using the
+    algorithm given in [1]_.
+
+    Parameters
+    ----------
+    A : (M, N) array_like
+        Matrix to be mapped.
+    B : (M, N) array_like
+        Target matrix.
+    check_finite : bool, optional
+        Whether to check that the input matrices contain only finite numbers.
+        Disabling may give a performance gain, but may result in problems
+        (crashes, non-termination) if the inputs do contain infinities or NaNs.
+
+    Returns
+    -------
+    R : (N, N) ndarray
+        The matrix solution of the orthogonal Procrustes problem.
+        Minimizes the Frobenius norm of ``(A @ R) - B``, subject to
+        ``R.conj().T @ R = I``.
+    scale : float
+        Sum of the singular values of ``A.conj().T @ B``.
+
+    Raises
+    ------
+    ValueError
+        If the input array shapes don't match or if check_finite is True and
+        the arrays contain Inf or NaN.
+
+    Notes
+    -----
+    Note that unlike higher level Procrustes analyses of spatial data, this
+    function only uses orthogonal transformations like rotations and
+    reflections, and it does not use scaling or translation.
+
+    .. versionadded:: 0.15.0
+
+    References
+    ----------
+    .. [1] Peter H. Schonemann, "A generalized solution of the orthogonal
+           Procrustes problem", Psychometrica -- Vol. 31, No. 1, March, 1966.
+           :doi:`10.1007/BF02289451`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import orthogonal_procrustes
+    >>> A = np.array([[ 2,  0,  1], [-2,  0,  0]])
+
+    Flip the order of columns and check for the anti-diagonal mapping
+
+    >>> R, sca = orthogonal_procrustes(A, np.fliplr(A))
+    >>> R
+    array([[-5.34384992e-17,  0.00000000e+00,  1.00000000e+00],
+           [ 0.00000000e+00,  1.00000000e+00,  0.00000000e+00],
+           [ 1.00000000e+00,  0.00000000e+00, -7.85941422e-17]])
+    >>> sca
+    9.0
+
+    As an example of the unitary Procrustes problem, generate a
+    random complex matrix ``A``, a random unitary matrix ``Q``,
+    and their product ``B``.
+
+    >>> shape = (4, 4)
+    >>> rng = np.random.default_rng(589234981235)
+    >>> A = rng.random(shape) + rng.random(shape)*1j
+    >>> Q = rng.random(shape) + rng.random(shape)*1j
+    >>> Q, _ = np.linalg.qr(Q)
+    >>> B = A @ Q
+
+    `orthogonal_procrustes` recovers the unitary matrix ``Q``
+    from ``A`` and ``B``.
+
+    >>> R, _ = orthogonal_procrustes(A, B)
+    >>> np.allclose(R, Q)
+    True
+
+    """
+    if check_finite:
+        A = np.asarray_chkfinite(A)
+        B = np.asarray_chkfinite(B)
+    else:
+        A = np.asanyarray(A)
+        B = np.asanyarray(B)
+    if A.ndim != 2:
+        raise ValueError(f'expected ndim to be 2, but observed {A.ndim}')
+    if A.shape != B.shape:
+        raise ValueError(f'the shapes of A and B differ ({A.shape} vs {B.shape})')
+    # Be clever with transposes, with the intention to save memory.
+    # The conjugate has no effect for real inputs, but gives the correct solution
+    # for complex inputs.
+    u, w, vt = svd((B.T @ np.conjugate(A)).T)
+    R = u @ vt
+    scale = w.sum()
+    return R, scale
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py
new file mode 100644
index 0000000000000000000000000000000000000000..589172827f528799203cb3e93a4a013e07dc5ff8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_sketches.py
@@ -0,0 +1,178 @@
+""" Sketching-based Matrix Computations """
+
+# Author: Jordi Montes 
+# August 28, 2017
+
+import numpy as np
+
+from scipy._lib._util import (check_random_state, rng_integers,
+                              _transition_to_rng)
+from scipy.sparse import csc_matrix
+
+__all__ = ['clarkson_woodruff_transform']
+
+
+def cwt_matrix(n_rows, n_columns, rng=None):
+    r"""
+    Generate a matrix S which represents a Clarkson-Woodruff transform.
+
+    Given the desired size of matrix, the method returns a matrix S of size
+    (n_rows, n_columns) where each column has all the entries set to 0
+    except for one position which has been randomly set to +1 or -1 with
+    equal probability.
+
+    Parameters
+    ----------
+    n_rows : int
+        Number of rows of S
+    n_columns : int
+        Number of columns of S
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+
+    Returns
+    -------
+    S : (n_rows, n_columns) csc_matrix
+        The returned matrix has ``n_columns`` nonzero entries.
+
+    Notes
+    -----
+    Given a matrix A, with probability at least 9/10,
+    .. math:: \|SA\| = (1 \pm \epsilon)\|A\|
+    Where the error epsilon is related to the size of S.
+    """
+    rng = check_random_state(rng)
+    rows = rng_integers(rng, 0, n_rows, n_columns)
+    cols = np.arange(n_columns+1)
+    signs = rng.choice([1, -1], n_columns)
+    S = csc_matrix((signs, rows, cols), shape=(n_rows, n_columns))
+    return S
+
+
+@_transition_to_rng("seed", position_num=2)
+def clarkson_woodruff_transform(input_matrix, sketch_size, rng=None):
+    r"""
+    Applies a Clarkson-Woodruff Transform/sketch to the input matrix.
+
+    Given an input_matrix ``A`` of size ``(n, d)``, compute a matrix ``A'`` of
+    size (sketch_size, d) so that
+
+    .. math:: \|Ax\| \approx \|A'x\|
+
+    with high probability via the Clarkson-Woodruff Transform, otherwise
+    known as the CountSketch matrix.
+
+    Parameters
+    ----------
+    input_matrix : array_like
+        Input matrix, of shape ``(n, d)``.
+    sketch_size : int
+        Number of rows for the sketch.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+    Returns
+    -------
+    A' : array_like
+        Sketch of the input matrix ``A``, of size ``(sketch_size, d)``.
+
+    Notes
+    -----
+    To make the statement
+
+    .. math:: \|Ax\| \approx \|A'x\|
+
+    precise, observe the following result which is adapted from the
+    proof of Theorem 14 of [2]_ via Markov's Inequality. If we have
+    a sketch size ``sketch_size=k`` which is at least
+
+    .. math:: k \geq \frac{2}{\epsilon^2\delta}
+
+    Then for any fixed vector ``x``,
+
+    .. math:: \|Ax\| = (1\pm\epsilon)\|A'x\|
+
+    with probability at least one minus delta.
+
+    This implementation takes advantage of sparsity: computing
+    a sketch takes time proportional to ``A.nnz``. Data ``A`` which
+    is in ``scipy.sparse.csc_matrix`` format gives the quickest
+    computation time for sparse input.
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> from scipy import sparse
+    >>> rng = np.random.default_rng()
+    >>> n_rows, n_columns, density, sketch_n_rows = 15000, 100, 0.01, 200
+    >>> A = sparse.rand(n_rows, n_columns, density=density, format='csc')
+    >>> B = sparse.rand(n_rows, n_columns, density=density, format='csr')
+    >>> C = sparse.rand(n_rows, n_columns, density=density, format='coo')
+    >>> D = rng.standard_normal((n_rows, n_columns))
+    >>> SA = linalg.clarkson_woodruff_transform(A, sketch_n_rows) # fastest
+    >>> SB = linalg.clarkson_woodruff_transform(B, sketch_n_rows) # fast
+    >>> SC = linalg.clarkson_woodruff_transform(C, sketch_n_rows) # slower
+    >>> SD = linalg.clarkson_woodruff_transform(D, sketch_n_rows) # slowest
+
+    That said, this method does perform well on dense inputs, just slower
+    on a relative scale.
+
+    References
+    ----------
+    .. [1] Kenneth L. Clarkson and David P. Woodruff. Low rank approximation
+           and regression in input sparsity time. In STOC, 2013.
+    .. [2] David P. Woodruff. Sketching as a tool for numerical linear algebra.
+           In Foundations and Trends in Theoretical Computer Science, 2014.
+
+    Examples
+    --------
+    Create a big dense matrix ``A`` for the example:
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> n_rows, n_columns  = 15000, 100
+    >>> rng = np.random.default_rng()
+    >>> A = rng.standard_normal((n_rows, n_columns))
+
+    Apply the transform to create a new matrix with 200 rows:
+
+    >>> sketch_n_rows = 200
+    >>> sketch = linalg.clarkson_woodruff_transform(A, sketch_n_rows, seed=rng)
+    >>> sketch.shape
+    (200, 100)
+
+    Now with high probability, the true norm is close to the sketched norm
+    in absolute value.
+
+    >>> linalg.norm(A)
+    1224.2812927123198
+    >>> linalg.norm(sketch)
+    1226.518328407333
+
+    Similarly, applying our sketch preserves the solution to a linear
+    regression of :math:`\min \|Ax - b\|`.
+
+    >>> b = rng.standard_normal(n_rows)
+    >>> x = linalg.lstsq(A, b)[0]
+    >>> Ab = np.hstack((A, b.reshape(-1, 1)))
+    >>> SAb = linalg.clarkson_woodruff_transform(Ab, sketch_n_rows, seed=rng)
+    >>> SA, Sb = SAb[:, :-1], SAb[:, -1]
+    >>> x_sketched = linalg.lstsq(SA, Sb)[0]
+
+    As with the matrix norm example, ``linalg.norm(A @ x - b)`` is close
+    to ``linalg.norm(A @ x_sketched - b)`` with high probability.
+
+    >>> linalg.norm(A @ x - b)
+    122.83242365433877
+    >>> linalg.norm(A @ x_sketched - b)
+    166.58473879945151
+
+    """
+    S = cwt_matrix(sketch_size, input_matrix.shape[0], rng=rng)
+    return S.dot(input_matrix)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py
new file mode 100644
index 0000000000000000000000000000000000000000..60a6a73e7bf9cce36090137c0e884d3ed22c55a8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_solvers.py
@@ -0,0 +1,857 @@
+"""Matrix equation solver routines"""
+# Author: Jeffrey Armstrong 
+# February 24, 2012
+
+# Modified: Chad Fulton 
+# June 19, 2014
+
+# Modified: Ilhan Polat 
+# September 13, 2016
+
+import warnings
+import numpy as np
+from numpy.linalg import inv, LinAlgError, norm, cond, svd
+
+from ._basic import solve, solve_triangular, matrix_balance
+from .lapack import get_lapack_funcs
+from ._decomp_schur import schur
+from ._decomp_lu import lu
+from ._decomp_qr import qr
+from ._decomp_qz import ordqz
+from ._decomp import _asarray_validated
+from ._special_matrices import block_diag
+
+__all__ = ['solve_sylvester',
+           'solve_continuous_lyapunov', 'solve_discrete_lyapunov',
+           'solve_lyapunov',
+           'solve_continuous_are', 'solve_discrete_are']
+
+
+def solve_sylvester(a, b, q):
+    """
+    Computes a solution (X) to the Sylvester equation :math:`AX + XB = Q`.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Leading matrix of the Sylvester equation
+    b : (N, N) array_like
+        Trailing matrix of the Sylvester equation
+    q : (M, N) array_like
+        Right-hand side
+
+    Returns
+    -------
+    x : (M, N) ndarray
+        The solution to the Sylvester equation.
+
+    Raises
+    ------
+    LinAlgError
+        If solution was not found
+
+    Notes
+    -----
+    Computes a solution to the Sylvester matrix equation via the Bartels-
+    Stewart algorithm. The A and B matrices first undergo Schur
+    decompositions. The resulting matrices are used to construct an
+    alternative Sylvester equation (``RY + YS^T = F``) where the R and S
+    matrices are in quasi-triangular form (or, when R, S or F are complex,
+    triangular form). The simplified equation is then solved using
+    ``*TRSYL`` from LAPACK directly.
+
+    .. versionadded:: 0.11.0
+
+    Examples
+    --------
+    Given `a`, `b`, and `q` solve for `x`:
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[-3, -2, 0], [-1, -1, 3], [3, -5, -1]])
+    >>> b = np.array([[1]])
+    >>> q = np.array([[1],[2],[3]])
+    >>> x = linalg.solve_sylvester(a, b, q)
+    >>> x
+    array([[ 0.0625],
+           [-0.5625],
+           [ 0.6875]])
+    >>> np.allclose(a.dot(x) + x.dot(b), q)
+    True
+
+    """
+    # Accommodate empty a
+    if a.size == 0 or b.size == 0:
+        tdict = {'s': np.float32, 'd': np.float64,
+                 'c': np.complex64, 'z': np.complex128}
+        func, = get_lapack_funcs(('trsyl',), arrays=(a, b, q))
+        return np.empty(q.shape, dtype=tdict[func.typecode])
+
+    # Compute the Schur decomposition form of a
+    r, u = schur(a, output='real')
+
+    # Compute the Schur decomposition of b
+    s, v = schur(b.conj().transpose(), output='real')
+
+    # Construct f = u'*q*v
+    f = np.dot(np.dot(u.conj().transpose(), q), v)
+
+    # Call the Sylvester equation solver
+    trsyl, = get_lapack_funcs(('trsyl',), (r, s, f))
+    if trsyl is None:
+        raise RuntimeError('LAPACK implementation does not contain a proper '
+                           'Sylvester equation solver (TRSYL)')
+    y, scale, info = trsyl(r, s, f, tranb='C')
+
+    y = scale*y
+
+    if info < 0:
+        raise LinAlgError("Illegal value encountered in "
+                          "the %d term" % (-info,))
+
+    return np.dot(np.dot(u, y), v.conj().transpose())
+
+
+def solve_continuous_lyapunov(a, q):
+    """
+    Solves the continuous Lyapunov equation :math:`AX + XA^H = Q`.
+
+    Uses the Bartels-Stewart algorithm to find :math:`X`.
+
+    Parameters
+    ----------
+    a : array_like
+        A square matrix
+
+    q : array_like
+        Right-hand side square matrix
+
+    Returns
+    -------
+    x : ndarray
+        Solution to the continuous Lyapunov equation
+
+    See Also
+    --------
+    solve_discrete_lyapunov : computes the solution to the discrete-time
+        Lyapunov equation
+    solve_sylvester : computes the solution to the Sylvester equation
+
+    Notes
+    -----
+    The continuous Lyapunov equation is a special form of the Sylvester
+    equation, hence this solver relies on LAPACK routine ?TRSYL.
+
+    .. versionadded:: 0.11.0
+
+    Examples
+    --------
+    Given `a` and `q` solve for `x`:
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[-3, -2, 0], [-1, -1, 0], [0, -5, -1]])
+    >>> b = np.array([2, 4, -1])
+    >>> q = np.eye(3)
+    >>> x = linalg.solve_continuous_lyapunov(a, q)
+    >>> x
+    array([[ -0.75  ,   0.875 ,  -3.75  ],
+           [  0.875 ,  -1.375 ,   5.3125],
+           [ -3.75  ,   5.3125, -27.0625]])
+    >>> np.allclose(a.dot(x) + x.dot(a.T), q)
+    True
+    """
+
+    a = np.atleast_2d(_asarray_validated(a, check_finite=True))
+    q = np.atleast_2d(_asarray_validated(q, check_finite=True))
+
+    r_or_c = float
+
+    for ind, _ in enumerate((a, q)):
+        if np.iscomplexobj(_):
+            r_or_c = complex
+
+        if not np.equal(*_.shape):
+            raise ValueError(f"Matrix {'aq'[ind]} should be square.")
+
+    # Shape consistency check
+    if a.shape != q.shape:
+        raise ValueError("Matrix a and q should have the same shape.")
+
+    # Accommodate empty array
+    if a.size == 0:
+        tdict = {'s': np.float32, 'd': np.float64,
+                 'c': np.complex64, 'z': np.complex128}
+        func, = get_lapack_funcs(('trsyl',), arrays=(a, q))
+        return np.empty(a.shape, dtype=tdict[func.typecode])
+
+    # Compute the Schur decomposition form of a
+    r, u = schur(a, output='real')
+
+    # Construct f = u'*q*u
+    f = u.conj().T.dot(q.dot(u))
+
+    # Call the Sylvester equation solver
+    trsyl = get_lapack_funcs('trsyl', (r, f))
+
+    dtype_string = 'T' if r_or_c is float else 'C'
+    y, scale, info = trsyl(r, r, f, tranb=dtype_string)
+
+    if info < 0:
+        raise ValueError('?TRSYL exited with the internal error '
+                         f'"illegal value in argument number {-info}.". See '
+                         'LAPACK documentation for the ?TRSYL error codes.')
+    elif info == 1:
+        warnings.warn('Input "a" has an eigenvalue pair whose sum is '
+                      'very close to or exactly zero. The solution is '
+                      'obtained via perturbing the coefficients.',
+                      RuntimeWarning, stacklevel=2)
+    y *= scale
+
+    return u.dot(y).dot(u.conj().T)
+
+
+# For backwards compatibility, keep the old name
+solve_lyapunov = solve_continuous_lyapunov
+
+
+def _solve_discrete_lyapunov_direct(a, q):
+    """
+    Solves the discrete Lyapunov equation directly.
+
+    This function is called by the `solve_discrete_lyapunov` function with
+    `method=direct`. It is not supposed to be called directly.
+    """
+
+    lhs = np.kron(a, a.conj())
+    lhs = np.eye(lhs.shape[0]) - lhs
+    x = solve(lhs, q.flatten())
+
+    return np.reshape(x, q.shape)
+
+
+def _solve_discrete_lyapunov_bilinear(a, q):
+    """
+    Solves the discrete Lyapunov equation using a bilinear transformation.
+
+    This function is called by the `solve_discrete_lyapunov` function with
+    `method=bilinear`. It is not supposed to be called directly.
+    """
+    eye = np.eye(a.shape[0])
+    aH = a.conj().transpose()
+    aHI_inv = inv(aH + eye)
+    b = np.dot(aH - eye, aHI_inv)
+    c = 2*np.dot(np.dot(inv(a + eye), q), aHI_inv)
+    return solve_lyapunov(b.conj().transpose(), -c)
+
+
+def solve_discrete_lyapunov(a, q, method=None):
+    """
+    Solves the discrete Lyapunov equation :math:`AXA^H - X + Q = 0`.
+
+    Parameters
+    ----------
+    a, q : (M, M) array_like
+        Square matrices corresponding to A and Q in the equation
+        above respectively. Must have the same shape.
+
+    method : {'direct', 'bilinear'}, optional
+        Type of solver.
+
+        If not given, chosen to be ``direct`` if ``M`` is less than 10 and
+        ``bilinear`` otherwise.
+
+    Returns
+    -------
+    x : ndarray
+        Solution to the discrete Lyapunov equation
+
+    See Also
+    --------
+    solve_continuous_lyapunov : computes the solution to the continuous-time
+        Lyapunov equation
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter. The default method is *direct* if ``M`` is less than 10
+    and ``bilinear`` otherwise.
+
+    Method *direct* uses a direct analytical solution to the discrete Lyapunov
+    equation. The algorithm is given in, for example, [1]_. However, it requires
+    the linear solution of a system with dimension :math:`M^2` so that
+    performance degrades rapidly for even moderately sized matrices.
+
+    Method *bilinear* uses a bilinear transformation to convert the discrete
+    Lyapunov equation to a continuous Lyapunov equation :math:`(BX+XB'=-C)`
+    where :math:`B=(A-I)(A+I)^{-1}` and
+    :math:`C=2(A' + I)^{-1} Q (A + I)^{-1}`. The continuous equation can be
+    efficiently solved since it is a special case of a Sylvester equation.
+    The transformation algorithm is from Popov (1964) as described in [2]_.
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1] "Lyapunov equation", Wikipedia,
+       https://en.wikipedia.org/wiki/Lyapunov_equation#Discrete_time
+    .. [2] Gajic, Z., and M.T.J. Qureshi. 2008.
+       Lyapunov Matrix Equation in System Stability and Control.
+       Dover Books on Engineering Series. Dover Publications.
+
+    Examples
+    --------
+    Given `a` and `q` solve for `x`:
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[0.2, 0.5],[0.7, -0.9]])
+    >>> q = np.eye(2)
+    >>> x = linalg.solve_discrete_lyapunov(a, q)
+    >>> x
+    array([[ 0.70872893,  1.43518822],
+           [ 1.43518822, -2.4266315 ]])
+    >>> np.allclose(a.dot(x).dot(a.T)-x, -q)
+    True
+
+    """
+    a = np.asarray(a)
+    q = np.asarray(q)
+    if method is None:
+        # Select automatically based on size of matrices
+        if a.shape[0] >= 10:
+            method = 'bilinear'
+        else:
+            method = 'direct'
+
+    meth = method.lower()
+
+    if meth == 'direct':
+        x = _solve_discrete_lyapunov_direct(a, q)
+    elif meth == 'bilinear':
+        x = _solve_discrete_lyapunov_bilinear(a, q)
+    else:
+        raise ValueError(f'Unknown solver {method}')
+
+    return x
+
+
+def solve_continuous_are(a, b, q, r, e=None, s=None, balanced=True):
+    r"""
+    Solves the continuous-time algebraic Riccati equation (CARE).
+
+    The CARE is defined as
+
+    .. math::
+
+          X A + A^H X - X B R^{-1} B^H X + Q = 0
+
+    The limitations for a solution to exist are :
+
+        * All eigenvalues of :math:`A` on the right half plane, should be
+          controllable.
+
+        * The associated hamiltonian pencil (See Notes), should have
+          eigenvalues sufficiently away from the imaginary axis.
+
+    Moreover, if ``e`` or ``s`` is not precisely ``None``, then the
+    generalized version of CARE
+
+    .. math::
+
+          E^HXA + A^HXE - (E^HXB + S) R^{-1} (B^HXE + S^H) + Q = 0
+
+    is solved. When omitted, ``e`` is assumed to be the identity and ``s``
+    is assumed to be the zero matrix with sizes compatible with ``a`` and
+    ``b``, respectively.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Square matrix
+    b : (M, N) array_like
+        Input
+    q : (M, M) array_like
+        Input
+    r : (N, N) array_like
+        Nonsingular square matrix
+    e : (M, M) array_like, optional
+        Nonsingular square matrix
+    s : (M, N) array_like, optional
+        Input
+    balanced : bool, optional
+        The boolean that indicates whether a balancing step is performed
+        on the data. The default is set to True.
+
+    Returns
+    -------
+    x : (M, M) ndarray
+        Solution to the continuous-time algebraic Riccati equation.
+
+    Raises
+    ------
+    LinAlgError
+        For cases where the stable subspace of the pencil could not be
+        isolated. See Notes section and the references for details.
+
+    See Also
+    --------
+    solve_discrete_are : Solves the discrete-time algebraic Riccati equation
+
+    Notes
+    -----
+    The equation is solved by forming the extended hamiltonian matrix pencil,
+    as described in [1]_, :math:`H - \lambda J` given by the block matrices ::
+
+        [ A    0    B ]             [ E   0    0 ]
+        [-Q  -A^H  -S ] - \lambda * [ 0  E^H   0 ]
+        [ S^H B^H   R ]             [ 0   0    0 ]
+
+    and using a QZ decomposition method.
+
+    In this algorithm, the fail conditions are linked to the symmetry
+    of the product :math:`U_2 U_1^{-1}` and condition number of
+    :math:`U_1`. Here, :math:`U` is the 2m-by-m matrix that holds the
+    eigenvectors spanning the stable subspace with 2-m rows and partitioned
+    into two m-row matrices. See [1]_ and [2]_ for more details.
+
+    In order to improve the QZ decomposition accuracy, the pencil goes
+    through a balancing step where the sum of absolute values of
+    :math:`H` and :math:`J` entries (after removing the diagonal entries of
+    the sum) is balanced following the recipe given in [3]_.
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1]  P. van Dooren , "A Generalized Eigenvalue Approach For Solving
+       Riccati Equations.", SIAM Journal on Scientific and Statistical
+       Computing, Vol.2(2), :doi:`10.1137/0902010`
+
+    .. [2] A.J. Laub, "A Schur Method for Solving Algebraic Riccati
+       Equations.", Massachusetts Institute of Technology. Laboratory for
+       Information and Decision Systems. LIDS-R ; 859. Available online :
+       http://hdl.handle.net/1721.1/1301
+
+    .. [3] P. Benner, "Symplectic Balancing of Hamiltonian Matrices", 2001,
+       SIAM J. Sci. Comput., 2001, Vol.22(5), :doi:`10.1137/S1064827500367993`
+
+    Examples
+    --------
+    Given `a`, `b`, `q`, and `r` solve for `x`:
+
+    >>> import numpy as np
+    >>> from scipy import linalg
+    >>> a = np.array([[4, 3], [-4.5, -3.5]])
+    >>> b = np.array([[1], [-1]])
+    >>> q = np.array([[9, 6], [6, 4.]])
+    >>> r = 1
+    >>> x = linalg.solve_continuous_are(a, b, q, r)
+    >>> x
+    array([[ 21.72792206,  14.48528137],
+           [ 14.48528137,   9.65685425]])
+    >>> np.allclose(a.T.dot(x) + x.dot(a)-x.dot(b).dot(b.T).dot(x), -q)
+    True
+
+    """
+
+    # Validate input arguments
+    a, b, q, r, e, s, m, n, r_or_c, gen_are = _are_validate_args(
+                                                     a, b, q, r, e, s, 'care')
+
+    H = np.empty((2*m+n, 2*m+n), dtype=r_or_c)
+    H[:m, :m] = a
+    H[:m, m:2*m] = 0.
+    H[:m, 2*m:] = b
+    H[m:2*m, :m] = -q
+    H[m:2*m, m:2*m] = -a.conj().T
+    H[m:2*m, 2*m:] = 0. if s is None else -s
+    H[2*m:, :m] = 0. if s is None else s.conj().T
+    H[2*m:, m:2*m] = b.conj().T
+    H[2*m:, 2*m:] = r
+
+    if gen_are and e is not None:
+        J = block_diag(e, e.conj().T, np.zeros_like(r, dtype=r_or_c))
+    else:
+        J = block_diag(np.eye(2*m), np.zeros_like(r, dtype=r_or_c))
+
+    if balanced:
+        # xGEBAL does not remove the diagonals before scaling. Also
+        # to avoid destroying the Symplectic structure, we follow Ref.3
+        M = np.abs(H) + np.abs(J)
+        np.fill_diagonal(M, 0.)
+        _, (sca, _) = matrix_balance(M, separate=1, permute=0)
+        # do we need to bother?
+        if not np.allclose(sca, np.ones_like(sca)):
+            # Now impose diag(D,inv(D)) from Benner where D is
+            # square root of s_i/s_(n+i) for i=0,....
+            sca = np.log2(sca)
+            # NOTE: Py3 uses "Bankers Rounding: round to the nearest even" !!
+            s = np.round((sca[m:2*m] - sca[:m])/2)
+            sca = 2 ** np.r_[s, -s, sca[2*m:]]
+            # Elementwise multiplication via broadcasting.
+            elwisescale = sca[:, None] * np.reciprocal(sca)
+            H *= elwisescale
+            J *= elwisescale
+
+    # Deflate the pencil to 2m x 2m ala Ref.1, eq.(55)
+    q, r = qr(H[:, -n:])
+    H = q[:, n:].conj().T.dot(H[:, :2*m])
+    J = q[:2*m, n:].conj().T.dot(J[:2*m, :2*m])
+
+    # Decide on which output type is needed for QZ
+    out_str = 'real' if r_or_c is float else 'complex'
+
+    _, _, _, _, _, u = ordqz(H, J, sort='lhp', overwrite_a=True,
+                             overwrite_b=True, check_finite=False,
+                             output=out_str)
+
+    # Get the relevant parts of the stable subspace basis
+    if e is not None:
+        u, _ = qr(np.vstack((e.dot(u[:m, :m]), u[m:, :m])))
+    u00 = u[:m, :m]
+    u10 = u[m:, :m]
+
+    # Solve via back-substituion after checking the condition of u00
+    up, ul, uu = lu(u00)
+    if 1/cond(uu) < np.spacing(1.):
+        raise LinAlgError('Failed to find a finite solution.')
+
+    # Exploit the triangular structure
+    x = solve_triangular(ul.conj().T,
+                         solve_triangular(uu.conj().T,
+                                          u10.conj().T,
+                                          lower=True),
+                         unit_diagonal=True,
+                         ).conj().T.dot(up.conj().T)
+    if balanced:
+        x *= sca[:m, None] * sca[:m]
+
+    # Check the deviation from symmetry for lack of success
+    # See proof of Thm.5 item 3 in [2]
+    u_sym = u00.conj().T.dot(u10)
+    n_u_sym = norm(u_sym, 1)
+    u_sym = u_sym - u_sym.conj().T
+    sym_threshold = np.max([np.spacing(1000.), 0.1*n_u_sym])
+
+    if norm(u_sym, 1) > sym_threshold:
+        raise LinAlgError('The associated Hamiltonian pencil has eigenvalues '
+                          'too close to the imaginary axis')
+
+    return (x + x.conj().T)/2
+
+
+def solve_discrete_are(a, b, q, r, e=None, s=None, balanced=True):
+    r"""
+    Solves the discrete-time algebraic Riccati equation (DARE).
+
+    The DARE is defined as
+
+    .. math::
+
+          A^HXA - X - (A^HXB) (R + B^HXB)^{-1} (B^HXA) + Q = 0
+
+    The limitations for a solution to exist are :
+
+        * All eigenvalues of :math:`A` outside the unit disc, should be
+          controllable.
+
+        * The associated symplectic pencil (See Notes), should have
+          eigenvalues sufficiently away from the unit circle.
+
+    Moreover, if ``e`` and ``s`` are not both precisely ``None``, then the
+    generalized version of DARE
+
+    .. math::
+
+          A^HXA - E^HXE - (A^HXB+S) (R+B^HXB)^{-1} (B^HXA+S^H) + Q = 0
+
+    is solved. When omitted, ``e`` is assumed to be the identity and ``s``
+    is assumed to be the zero matrix.
+
+    Parameters
+    ----------
+    a : (M, M) array_like
+        Square matrix
+    b : (M, N) array_like
+        Input
+    q : (M, M) array_like
+        Input
+    r : (N, N) array_like
+        Square matrix
+    e : (M, M) array_like, optional
+        Nonsingular square matrix
+    s : (M, N) array_like, optional
+        Input
+    balanced : bool
+        The boolean that indicates whether a balancing step is performed
+        on the data. The default is set to True.
+
+    Returns
+    -------
+    x : (M, M) ndarray
+        Solution to the discrete algebraic Riccati equation.
+
+    Raises
+    ------
+    LinAlgError
+        For cases where the stable subspace of the pencil could not be
+        isolated. See Notes section and the references for details.
+
+    See Also
+    --------
+    solve_continuous_are : Solves the continuous algebraic Riccati equation
+
+    Notes
+    -----
+    The equation is solved by forming the extended symplectic matrix pencil,
+    as described in [1]_, :math:`H - \lambda J` given by the block matrices ::
+
+           [  A   0   B ]             [ E   0   B ]
+           [ -Q  E^H -S ] - \lambda * [ 0  A^H  0 ]
+           [ S^H  0   R ]             [ 0 -B^H  0 ]
+
+    and using a QZ decomposition method.
+
+    In this algorithm, the fail conditions are linked to the symmetry
+    of the product :math:`U_2 U_1^{-1}` and condition number of
+    :math:`U_1`. Here, :math:`U` is the 2m-by-m matrix that holds the
+    eigenvectors spanning the stable subspace with 2-m rows and partitioned
+    into two m-row matrices. See [1]_ and [2]_ for more details.
+
+    In order to improve the QZ decomposition accuracy, the pencil goes
+    through a balancing step where the sum of absolute values of
+    :math:`H` and :math:`J` rows/cols (after removing the diagonal entries)
+    is balanced following the recipe given in [3]_. If the data has small
+    numerical noise, balancing may amplify their effects and some clean up
+    is required.
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1]  P. van Dooren , "A Generalized Eigenvalue Approach For Solving
+       Riccati Equations.", SIAM Journal on Scientific and Statistical
+       Computing, Vol.2(2), :doi:`10.1137/0902010`
+
+    .. [2] A.J. Laub, "A Schur Method for Solving Algebraic Riccati
+       Equations.", Massachusetts Institute of Technology. Laboratory for
+       Information and Decision Systems. LIDS-R ; 859. Available online :
+       http://hdl.handle.net/1721.1/1301
+
+    .. [3] P. Benner, "Symplectic Balancing of Hamiltonian Matrices", 2001,
+       SIAM J. Sci. Comput., 2001, Vol.22(5), :doi:`10.1137/S1064827500367993`
+
+    Examples
+    --------
+    Given `a`, `b`, `q`, and `r` solve for `x`:
+
+    >>> import numpy as np
+    >>> from scipy import linalg as la
+    >>> a = np.array([[0, 1], [0, -1]])
+    >>> b = np.array([[1, 0], [2, 1]])
+    >>> q = np.array([[-4, -4], [-4, 7]])
+    >>> r = np.array([[9, 3], [3, 1]])
+    >>> x = la.solve_discrete_are(a, b, q, r)
+    >>> x
+    array([[-4., -4.],
+           [-4.,  7.]])
+    >>> R = la.solve(r + b.T.dot(x).dot(b), b.T.dot(x).dot(a))
+    >>> np.allclose(a.T.dot(x).dot(a) - x - a.T.dot(x).dot(b).dot(R), -q)
+    True
+
+    """
+
+    # Validate input arguments
+    a, b, q, r, e, s, m, n, r_or_c, gen_are = _are_validate_args(
+                                                     a, b, q, r, e, s, 'dare')
+
+    # Form the matrix pencil
+    H = np.zeros((2*m+n, 2*m+n), dtype=r_or_c)
+    H[:m, :m] = a
+    H[:m, 2*m:] = b
+    H[m:2*m, :m] = -q
+    H[m:2*m, m:2*m] = np.eye(m) if e is None else e.conj().T
+    H[m:2*m, 2*m:] = 0. if s is None else -s
+    H[2*m:, :m] = 0. if s is None else s.conj().T
+    H[2*m:, 2*m:] = r
+
+    J = np.zeros_like(H, dtype=r_or_c)
+    J[:m, :m] = np.eye(m) if e is None else e
+    J[m:2*m, m:2*m] = a.conj().T
+    J[2*m:, m:2*m] = -b.conj().T
+
+    if balanced:
+        # xGEBAL does not remove the diagonals before scaling. Also
+        # to avoid destroying the Symplectic structure, we follow Ref.3
+        M = np.abs(H) + np.abs(J)
+        np.fill_diagonal(M, 0.)
+        _, (sca, _) = matrix_balance(M, separate=1, permute=0)
+        # do we need to bother?
+        if not np.allclose(sca, np.ones_like(sca)):
+            # Now impose diag(D,inv(D)) from Benner where D is
+            # square root of s_i/s_(n+i) for i=0,....
+            sca = np.log2(sca)
+            # NOTE: Py3 uses "Bankers Rounding: round to the nearest even" !!
+            s = np.round((sca[m:2*m] - sca[:m])/2)
+            sca = 2 ** np.r_[s, -s, sca[2*m:]]
+            # Elementwise multiplication via broadcasting.
+            elwisescale = sca[:, None] * np.reciprocal(sca)
+            H *= elwisescale
+            J *= elwisescale
+
+    # Deflate the pencil by the R column ala Ref.1
+    q_of_qr, _ = qr(H[:, -n:])
+    H = q_of_qr[:, n:].conj().T.dot(H[:, :2*m])
+    J = q_of_qr[:, n:].conj().T.dot(J[:, :2*m])
+
+    # Decide on which output type is needed for QZ
+    out_str = 'real' if r_or_c is float else 'complex'
+
+    _, _, _, _, _, u = ordqz(H, J, sort='iuc',
+                             overwrite_a=True,
+                             overwrite_b=True,
+                             check_finite=False,
+                             output=out_str)
+
+    # Get the relevant parts of the stable subspace basis
+    if e is not None:
+        u, _ = qr(np.vstack((e.dot(u[:m, :m]), u[m:, :m])))
+    u00 = u[:m, :m]
+    u10 = u[m:, :m]
+
+    # Solve via back-substituion after checking the condition of u00
+    up, ul, uu = lu(u00)
+
+    if 1/cond(uu) < np.spacing(1.):
+        raise LinAlgError('Failed to find a finite solution.')
+
+    # Exploit the triangular structure
+    x = solve_triangular(ul.conj().T,
+                         solve_triangular(uu.conj().T,
+                                          u10.conj().T,
+                                          lower=True),
+                         unit_diagonal=True,
+                         ).conj().T.dot(up.conj().T)
+    if balanced:
+        x *= sca[:m, None] * sca[:m]
+
+    # Check the deviation from symmetry for lack of success
+    # See proof of Thm.5 item 3 in [2]
+    u_sym = u00.conj().T.dot(u10)
+    n_u_sym = norm(u_sym, 1)
+    u_sym = u_sym - u_sym.conj().T
+    sym_threshold = np.max([np.spacing(1000.), 0.1*n_u_sym])
+
+    if norm(u_sym, 1) > sym_threshold:
+        raise LinAlgError('The associated symplectic pencil has eigenvalues '
+                          'too close to the unit circle')
+
+    return (x + x.conj().T)/2
+
+
+def _are_validate_args(a, b, q, r, e, s, eq_type='care'):
+    """
+    A helper function to validate the arguments supplied to the
+    Riccati equation solvers. Any discrepancy found in the input
+    matrices leads to a ``ValueError`` exception.
+
+    Essentially, it performs:
+
+        - a check whether the input is free of NaN and Infs
+        - a pass for the data through ``numpy.atleast_2d()``
+        - squareness check of the relevant arrays
+        - shape consistency check of the arrays
+        - singularity check of the relevant arrays
+        - symmetricity check of the relevant matrices
+        - a check whether the regular or the generalized version is asked.
+
+    This function is used by ``solve_continuous_are`` and
+    ``solve_discrete_are``.
+
+    Parameters
+    ----------
+    a, b, q, r, e, s : array_like
+        Input data
+    eq_type : str
+        Accepted arguments are 'care' and 'dare'.
+
+    Returns
+    -------
+    a, b, q, r, e, s : ndarray
+        Regularized input data
+    m, n : int
+        shape of the problem
+    r_or_c : type
+        Data type of the problem, returns float or complex
+    gen_or_not : bool
+        Type of the equation, True for generalized and False for regular ARE.
+
+    """
+
+    if eq_type.lower() not in ("dare", "care"):
+        raise ValueError("Equation type unknown. "
+                         "Only 'care' and 'dare' is understood")
+
+    a = np.atleast_2d(_asarray_validated(a, check_finite=True))
+    b = np.atleast_2d(_asarray_validated(b, check_finite=True))
+    q = np.atleast_2d(_asarray_validated(q, check_finite=True))
+    r = np.atleast_2d(_asarray_validated(r, check_finite=True))
+
+    # Get the correct data types otherwise NumPy complains
+    # about pushing complex numbers into real arrays.
+    r_or_c = complex if np.iscomplexobj(b) else float
+
+    for ind, mat in enumerate((a, q, r)):
+        if np.iscomplexobj(mat):
+            r_or_c = complex
+
+        if not np.equal(*mat.shape):
+            raise ValueError(f"Matrix {'aqr'[ind]} should be square.")
+
+    # Shape consistency checks
+    m, n = b.shape
+    if m != a.shape[0]:
+        raise ValueError("Matrix a and b should have the same number of rows.")
+    if m != q.shape[0]:
+        raise ValueError("Matrix a and q should have the same shape.")
+    if n != r.shape[0]:
+        raise ValueError("Matrix b and r should have the same number of cols.")
+
+    # Check if the data matrices q, r are (sufficiently) hermitian
+    for ind, mat in enumerate((q, r)):
+        if norm(mat - mat.conj().T, 1) > np.spacing(norm(mat, 1))*100:
+            raise ValueError(f"Matrix {'qr'[ind]} should be symmetric/hermitian.")
+
+    # Continuous time ARE should have a nonsingular r matrix.
+    if eq_type == 'care':
+        min_sv = svd(r, compute_uv=False)[-1]
+        if min_sv == 0. or min_sv < np.spacing(1.)*norm(r, 1):
+            raise ValueError('Matrix r is numerically singular.')
+
+    # Check if the generalized case is required with omitted arguments
+    # perform late shape checking etc.
+    generalized_case = e is not None or s is not None
+
+    if generalized_case:
+        if e is not None:
+            e = np.atleast_2d(_asarray_validated(e, check_finite=True))
+            if not np.equal(*e.shape):
+                raise ValueError("Matrix e should be square.")
+            if m != e.shape[0]:
+                raise ValueError("Matrix a and e should have the same shape.")
+            # numpy.linalg.cond doesn't check for exact zeros and
+            # emits a runtime warning. Hence the following manual check.
+            min_sv = svd(e, compute_uv=False)[-1]
+            if min_sv == 0. or min_sv < np.spacing(1.) * norm(e, 1):
+                raise ValueError('Matrix e is numerically singular.')
+            if np.iscomplexobj(e):
+                r_or_c = complex
+        if s is not None:
+            s = np.atleast_2d(_asarray_validated(s, check_finite=True))
+            if s.shape != b.shape:
+                raise ValueError("Matrix b and s should have the same shape.")
+            if np.iscomplexobj(s):
+                r_or_c = complex
+
+    return a, b, q, r, e, s, m, n, r_or_c, generalized_case
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py
new file mode 100644
index 0000000000000000000000000000000000000000..7dca572f2d5a12a27ccb468425f03c75e86d5da7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_special_matrices.py
@@ -0,0 +1,1332 @@
+import math
+import warnings
+
+import numpy as np
+from numpy.lib.stride_tricks import as_strided
+
+
+__all__ = ['toeplitz', 'circulant', 'hankel',
+           'hadamard', 'leslie', 'kron', 'block_diag', 'companion',
+           'helmert', 'hilbert', 'invhilbert', 'pascal', 'invpascal', 'dft',
+           'fiedler', 'fiedler_companion', 'convolution_matrix']
+
+
+# -----------------------------------------------------------------------------
+#  matrix construction functions
+# -----------------------------------------------------------------------------
+
+
+def toeplitz(c, r=None):
+    r"""
+    Construct a Toeplitz matrix.
+
+    The Toeplitz matrix has constant diagonals, with c as its first column
+    and r as its first row. If r is not given, ``r == conjugate(c)`` is
+    assumed.
+
+    Parameters
+    ----------
+    c : array_like
+        First column of the matrix.
+    r : array_like, optional
+        First row of the matrix. If None, ``r = conjugate(c)`` is assumed;
+        in this case, if c[0] is real, the result is a Hermitian matrix.
+        r[0] is ignored; the first row of the returned matrix is
+        ``[c[0], r[1:]]``.
+
+        .. warning::
+
+            Beginning in SciPy 1.17, multidimensional input will be treated as a batch,
+            not ``ravel``\ ed. To preserve the existing behavior, ``ravel`` arguments
+            before passing them to `toeplitz`.
+
+    Returns
+    -------
+    A : (len(c), len(r)) ndarray
+        The Toeplitz matrix. Dtype is the same as ``(c[0] + r[0]).dtype``.
+
+    See Also
+    --------
+    circulant : circulant matrix
+    hankel : Hankel matrix
+    solve_toeplitz : Solve a Toeplitz system.
+
+    Notes
+    -----
+    The behavior when `c` or `r` is a scalar, or when `c` is complex and
+    `r` is None, was changed in version 0.8.0. The behavior in previous
+    versions was undocumented and is no longer supported.
+
+    Examples
+    --------
+    >>> from scipy.linalg import toeplitz
+    >>> toeplitz([1,2,3], [1,4,5,6])
+    array([[1, 4, 5, 6],
+           [2, 1, 4, 5],
+           [3, 2, 1, 4]])
+    >>> toeplitz([1.0, 2+3j, 4-1j])
+    array([[ 1.+0.j,  2.-3.j,  4.+1.j],
+           [ 2.+3.j,  1.+0.j,  2.-3.j],
+           [ 4.-1.j,  2.+3.j,  1.+0.j]])
+
+    """
+    c = np.asarray(c)
+    if r is None:
+        r = c.conjugate()
+    else:
+        r = np.asarray(r)
+
+    if c.ndim > 1 or r.ndim > 1:
+        msg = ("Beginning in SciPy 1.17, multidimensional input will be treated as a "
+               "batch, not `ravel`ed. To preserve the existing behavior and silence "
+               "this warning, `ravel` arguments before passing them to `toeplitz`.")
+        warnings.warn(msg, FutureWarning, stacklevel=2)
+
+    c, r = c.ravel(), r.ravel()
+    # Form a 1-D array containing a reversed c followed by r[1:] that could be
+    # strided to give us toeplitz matrix.
+    vals = np.concatenate((c[::-1], r[1:]))
+    out_shp = len(c), len(r)
+    n = vals.strides[0]
+    return as_strided(vals[len(c)-1:], shape=out_shp, strides=(-n, n)).copy()
+
+
+def circulant(c):
+    """
+    Construct a circulant matrix.
+
+    Parameters
+    ----------
+    c : (..., N,)  array_like
+        The first column(s) of the matrix. Multidimensional arrays are treated as a
+        batch: each slice along the last axis is the first column of an output matrix.
+
+    Returns
+    -------
+    A : (..., N, N) ndarray
+        A circulant matrix whose first column is given by `c`.  For batch input, each
+        slice of shape ``(N, N)`` along the last two dimensions of the output
+        corresponds with a slice of shape ``(N,)`` along the last dimension of the
+        input.
+
+
+    See Also
+    --------
+    toeplitz : Toeplitz matrix
+    hankel : Hankel matrix
+    solve_circulant : Solve a circulant system.
+
+    Notes
+    -----
+    .. versionadded:: 0.8.0
+
+    Examples
+    --------
+    >>> from scipy.linalg import circulant
+    >>> circulant([1, 2, 3])
+    array([[1, 3, 2],
+           [2, 1, 3],
+           [3, 2, 1]])
+
+    >>> circulant([[1, 2, 3], [4, 5, 6]])
+    array([[[1, 3, 2],
+            [2, 1, 3],
+            [3, 2, 1]],
+           [[4, 6, 5],
+            [5, 4, 6],
+            [6, 5, 4]]])
+    """
+    c = np.atleast_1d(c)
+    batch_shape, N = c.shape[:-1], c.shape[-1]
+    # Need to use `prod(batch_shape)` instead of `-1` in case array has zero size
+    c = c.reshape(math.prod(batch_shape), N) if batch_shape else c
+    # Form an extended array that could be strided to give circulant version
+    c_ext = np.concatenate((c[..., ::-1], c[..., :0:-1]), axis=-1).ravel()
+    L = c.shape[-1]
+    n = c_ext.strides[-1]
+    if c.ndim == 1:
+        A = as_strided(c_ext[L-1:], shape=(L, L), strides=(-n, n))
+    else:
+        m = c.shape[0]
+        A = as_strided(c_ext[L-1:], shape=(m, L, L), strides=(n*(2*L-1), -n, n))
+    return A.reshape(batch_shape + (N, N)).copy()
+
+
+def hankel(c, r=None):
+    """
+    Construct a Hankel matrix.
+
+    The Hankel matrix has constant anti-diagonals, with `c` as its
+    first column and `r` as its last row. If the first element of `r`
+    differs from the last element of `c`, the first element of `r` is
+    replaced by the last element of `c` to ensure that anti-diagonals
+    remain constant. If `r` is not given, then `r = zeros_like(c)` is
+    assumed.
+
+    Parameters
+    ----------
+    c : array_like
+        First column of the matrix. Whatever the actual shape of `c`, it
+        will be converted to a 1-D array.
+    r : array_like, optional
+        Last row of the matrix. If None, ``r = zeros_like(c)`` is assumed.
+        r[0] is ignored; the last row of the returned matrix is
+        ``[c[-1], r[1:]]``. Whatever the actual shape of `r`, it will be
+        converted to a 1-D array.
+
+    Returns
+    -------
+    A : (len(c), len(r)) ndarray
+        The Hankel matrix. Dtype is the same as ``(c[0] + r[0]).dtype``.
+
+    See Also
+    --------
+    toeplitz : Toeplitz matrix
+    circulant : circulant matrix
+
+    Examples
+    --------
+    >>> from scipy.linalg import hankel
+    >>> hankel([1, 17, 99])
+    array([[ 1, 17, 99],
+           [17, 99,  0],
+           [99,  0,  0]])
+    >>> hankel([1,2,3,4], [4,7,7,8,9])
+    array([[1, 2, 3, 4, 7],
+           [2, 3, 4, 7, 7],
+           [3, 4, 7, 7, 8],
+           [4, 7, 7, 8, 9]])
+
+    """
+    c = np.asarray(c).ravel()
+    if r is None:
+        r = np.zeros_like(c)
+    else:
+        r = np.asarray(r).ravel()
+    # Form a 1-D array of values to be used in the matrix, containing `c`
+    # followed by r[1:].
+    vals = np.concatenate((c, r[1:]))
+    # Stride on concatenated array to get hankel matrix
+    out_shp = len(c), len(r)
+    n = vals.strides[0]
+    return as_strided(vals, shape=out_shp, strides=(n, n)).copy()
+
+
+def hadamard(n, dtype=int):
+    """
+    Construct an Hadamard matrix.
+
+    Constructs an n-by-n Hadamard matrix, using Sylvester's
+    construction. `n` must be a power of 2.
+
+    Parameters
+    ----------
+    n : int
+        The order of the matrix. `n` must be a power of 2.
+    dtype : dtype, optional
+        The data type of the array to be constructed.
+
+    Returns
+    -------
+    H : (n, n) ndarray
+        The Hadamard matrix.
+
+    Notes
+    -----
+    .. versionadded:: 0.8.0
+
+    Examples
+    --------
+    >>> from scipy.linalg import hadamard
+    >>> hadamard(2, dtype=complex)
+    array([[ 1.+0.j,  1.+0.j],
+           [ 1.+0.j, -1.-0.j]])
+    >>> hadamard(4)
+    array([[ 1,  1,  1,  1],
+           [ 1, -1,  1, -1],
+           [ 1,  1, -1, -1],
+           [ 1, -1, -1,  1]])
+
+    """
+
+    # This function is a slightly modified version of the
+    # function contributed by Ivo in ticket #675.
+
+    if n < 1:
+        lg2 = 0
+    else:
+        lg2 = int(math.log(n, 2))
+    if 2 ** lg2 != n:
+        raise ValueError("n must be an positive integer, and n must be "
+                         "a power of 2")
+
+    H = np.array([[1]], dtype=dtype)
+
+    # Sylvester's construction
+    for i in range(0, lg2):
+        H = np.vstack((np.hstack((H, H)), np.hstack((H, -H))))
+
+    return H
+
+
+def leslie(f, s):
+    """
+    Create a Leslie matrix.
+
+    Given the length n array of fecundity coefficients `f` and the length
+    n-1 array of survival coefficients `s`, return the associated Leslie
+    matrix.
+
+    Parameters
+    ----------
+    f : (..., N,) array_like
+        The "fecundity" coefficients.
+    s : (..., N-1,) array_like
+        The "survival" coefficients. The length of each slice of `s` (along the last
+        axis) must be one less than the length of `f`, and it must be at least 1.
+
+    Returns
+    -------
+    L : (..., N, N) ndarray
+        The array is zero except for the first row,
+        which is `f`, and the first sub-diagonal, which is `s`.
+        For 1-D input, the data-type of the array will be the data-type of
+        ``f[0]+s[0]``.
+
+    Notes
+    -----
+    .. versionadded:: 0.8.0
+
+    The Leslie matrix is used to model discrete-time, age-structured
+    population growth [1]_ [2]_. In a population with `n` age classes, two sets
+    of parameters define a Leslie matrix: the `n` "fecundity coefficients",
+    which give the number of offspring per-capita produced by each age
+    class, and the `n` - 1 "survival coefficients", which give the
+    per-capita survival rate of each age class.
+
+    N-dimensional input are treated as a batches of coefficient arrays: each
+    slice along the last axis of the input arrays is a 1-D coefficient array,
+    and each slice along the last two dimensions of the output is the
+    corresponding Leslie matrix.
+
+    References
+    ----------
+    .. [1] P. H. Leslie, On the use of matrices in certain population
+           mathematics, Biometrika, Vol. 33, No. 3, 183--212 (Nov. 1945)
+    .. [2] P. H. Leslie, Some further notes on the use of matrices in
+           population mathematics, Biometrika, Vol. 35, No. 3/4, 213--245
+           (Dec. 1948)
+
+    Examples
+    --------
+    >>> from scipy.linalg import leslie
+    >>> leslie([0.1, 2.0, 1.0, 0.1], [0.2, 0.8, 0.7])
+    array([[ 0.1,  2. ,  1. ,  0.1],
+           [ 0.2,  0. ,  0. ,  0. ],
+           [ 0. ,  0.8,  0. ,  0. ],
+           [ 0. ,  0. ,  0.7,  0. ]])
+
+    """
+    f = np.atleast_1d(f)
+    s = np.atleast_1d(s)
+
+    if f.shape[-1] != s.shape[-1] + 1:
+        raise ValueError("Incorrect lengths for f and s. The length of s along "
+                         "the last axis must be one less than the length of f.")
+    if s.shape[-1] == 0:
+        raise ValueError("The length of s must be at least 1.")
+
+    n = f.shape[-1]
+
+    if f.ndim > 1 or s.ndim > 1:
+        from scipy.stats._resampling import _vectorize_statistic
+        _leslie_nd = _vectorize_statistic(leslie)
+        return np.moveaxis(_leslie_nd(f, s, axis=-1), [0, 1], [-2, -1])
+
+    tmp = f[0] + s[0]
+    a = np.zeros((n, n), dtype=tmp.dtype)
+    a[0] = f
+    a[list(range(1, n)), list(range(0, n - 1))] = s
+    return a
+
+
+def kron(a, b):
+    """
+    Kronecker product.
+
+    .. deprecated:: 1.15.0
+        `kron` has been deprecated in favour of `numpy.kron` and will be
+        removed in SciPy 1.17.0.
+
+    The result is the block matrix::
+
+        a[0,0]*b    a[0,1]*b  ... a[0,-1]*b
+        a[1,0]*b    a[1,1]*b  ... a[1,-1]*b
+        ...
+        a[-1,0]*b   a[-1,1]*b ... a[-1,-1]*b
+
+    Parameters
+    ----------
+    a : (M, N) ndarray
+        Input array
+    b : (P, Q) ndarray
+        Input array
+
+    Returns
+    -------
+    A : (M*P, N*Q) ndarray
+        Kronecker product of `a` and `b`.
+
+    Examples
+    --------
+    >>> from numpy import array
+    >>> from scipy.linalg import kron
+    >>> kron(array([[1,2],[3,4]]), array([[1,1,1]]))
+    array([[1, 1, 1, 2, 2, 2],
+           [3, 3, 3, 4, 4, 4]])
+
+    """
+    msg = ("`kron` has been deprecated in favour of `numpy.kron` in SciPy"
+           " 1.15.0 and will be removed in SciPy 1.17.0.")
+    warnings.warn(msg, DeprecationWarning, stacklevel=2)
+    # accommodate empty arrays
+    if a.size == 0 or b.size == 0:
+        m = a.shape[0] * b.shape[0]
+        n = a.shape[1] * b.shape[1]
+        return np.empty_like(a, shape=(m, n))
+
+    if not a.flags['CONTIGUOUS']:
+        a = np.reshape(a, a.shape)
+    if not b.flags['CONTIGUOUS']:
+        b = np.reshape(b, b.shape)
+    o = np.outer(a, b)
+    o = o.reshape(a.shape + b.shape)
+    return np.concatenate(np.concatenate(o, axis=1), axis=1)
+
+
+def block_diag(*arrs):
+    """
+    Create a block diagonal matrix from provided arrays.
+
+    Given the inputs `A`, `B` and `C`, the output will have these
+    arrays arranged on the diagonal::
+
+        [[A, 0, 0],
+         [0, B, 0],
+         [0, 0, C]]
+
+    Parameters
+    ----------
+    A, B, C, ... : array_like, up to 2-D
+        Input arrays.  A 1-D array or array_like sequence of length `n` is
+        treated as a 2-D array with shape ``(1,n)``.
+
+    Returns
+    -------
+    D : ndarray
+        Array with `A`, `B`, `C`, ... on the diagonal. `D` has the
+        same dtype as `A`.
+
+    Notes
+    -----
+    If all the input arrays are square, the output is known as a
+    block diagonal matrix.
+
+    Empty sequences (i.e., array-likes of zero size) will not be ignored.
+    Noteworthy, both [] and [[]] are treated as matrices with shape ``(1,0)``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import block_diag
+    >>> A = [[1, 0],
+    ...      [0, 1]]
+    >>> B = [[3, 4, 5],
+    ...      [6, 7, 8]]
+    >>> C = [[7]]
+    >>> P = np.zeros((2, 0), dtype='int32')
+    >>> block_diag(A, B, C)
+    array([[1, 0, 0, 0, 0, 0],
+           [0, 1, 0, 0, 0, 0],
+           [0, 0, 3, 4, 5, 0],
+           [0, 0, 6, 7, 8, 0],
+           [0, 0, 0, 0, 0, 7]])
+    >>> block_diag(A, P, B, C)
+    array([[1, 0, 0, 0, 0, 0],
+           [0, 1, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 3, 4, 5, 0],
+           [0, 0, 6, 7, 8, 0],
+           [0, 0, 0, 0, 0, 7]])
+    >>> block_diag(1.0, [2, 3], [[4, 5], [6, 7]])
+    array([[ 1.,  0.,  0.,  0.,  0.],
+           [ 0.,  2.,  3.,  0.,  0.],
+           [ 0.,  0.,  0.,  4.,  5.],
+           [ 0.,  0.,  0.,  6.,  7.]])
+
+    """
+    if arrs == ():
+        arrs = ([],)
+    arrs = [np.atleast_2d(a) for a in arrs]
+
+    bad_args = [k for k in range(len(arrs)) if arrs[k].ndim > 2]
+    if bad_args:
+        raise ValueError("arguments in the following positions "
+                         f"have dimension greater than 2: {bad_args}")
+
+    shapes = np.array([a.shape for a in arrs])
+    out_dtype = np.result_type(*[arr.dtype for arr in arrs])
+    out = np.zeros(np.sum(shapes, axis=0), dtype=out_dtype)
+
+    r, c = 0, 0
+    for i, (rr, cc) in enumerate(shapes):
+        out[r:r + rr, c:c + cc] = arrs[i]
+        r += rr
+        c += cc
+    return out
+
+
+def companion(a):
+    """
+    Create a companion matrix.
+
+    Create the companion matrix [1]_ associated with the polynomial whose
+    coefficients are given in `a`.
+
+    Parameters
+    ----------
+    a : (..., N) array_like
+        1-D array of polynomial coefficients. The length of `a` must be
+        at least two, and ``a[0]`` must not be zero.
+        M-dimensional arrays are treated as a batch: each slice along the last
+        axis is a 1-D array of polynomial coefficients.
+
+    Returns
+    -------
+    c : (..., N-1, N-1) ndarray
+        For 1-D input, the first row of `c` is ``-a[1:]/a[0]``, and the first
+        sub-diagonal is all ones.  The data-type of the array is the same
+        as the data-type of ``1.0*a[0]``.
+        For batch input, each slice of shape ``(N-1, N-1)`` along the last two
+        dimensions of the output corresponds with a slice of shape ``(N,)``
+        along the last dimension of the input.
+
+    Raises
+    ------
+    ValueError
+        If any of the following are true: a) ``a.shape[-1] < 2``; b) ``a[..., 0] == 0``.
+
+    Notes
+    -----
+    .. versionadded:: 0.8.0
+
+    References
+    ----------
+    .. [1] R. A. Horn & C. R. Johnson, *Matrix Analysis*.  Cambridge, UK:
+        Cambridge University Press, 1999, pp. 146-7.
+
+    Examples
+    --------
+    >>> from scipy.linalg import companion
+    >>> companion([1, -10, 31, -30])
+    array([[ 10., -31.,  30.],
+           [  1.,   0.,   0.],
+           [  0.,   1.,   0.]])
+
+    """
+    a = np.atleast_1d(a)
+    n = a.shape[-1]
+
+    if n < 2:
+        raise ValueError("The length of `a` along the last axis must be at least 2.")
+
+    if np.any(a[..., 0] == 0):
+        raise ValueError("The first coefficient(s) of `a` (i.e. elements "
+                         "of `a[..., 0]`) must not be zero.")
+
+    first_row = -a[..., 1:] / (1.0 * a[..., 0:1])
+    c = np.zeros(a.shape[:-1] + (n - 1, n - 1), dtype=first_row.dtype)
+    c[..., 0, :] = first_row
+    c[..., np.arange(1, n - 1), np.arange(0, n - 2)] = 1
+    return c
+
+
+def helmert(n, full=False):
+    """
+    Create an Helmert matrix of order `n`.
+
+    This has applications in statistics, compositional or simplicial analysis,
+    and in Aitchison geometry.
+
+    Parameters
+    ----------
+    n : int
+        The size of the array to create.
+    full : bool, optional
+        If True the (n, n) ndarray will be returned.
+        Otherwise the submatrix that does not include the first
+        row will be returned.
+        Default: False.
+
+    Returns
+    -------
+    M : ndarray
+        The Helmert matrix.
+        The shape is (n, n) or (n-1, n) depending on the `full` argument.
+
+    Examples
+    --------
+    >>> from scipy.linalg import helmert
+    >>> helmert(5, full=True)
+    array([[ 0.4472136 ,  0.4472136 ,  0.4472136 ,  0.4472136 ,  0.4472136 ],
+           [ 0.70710678, -0.70710678,  0.        ,  0.        ,  0.        ],
+           [ 0.40824829,  0.40824829, -0.81649658,  0.        ,  0.        ],
+           [ 0.28867513,  0.28867513,  0.28867513, -0.8660254 ,  0.        ],
+           [ 0.2236068 ,  0.2236068 ,  0.2236068 ,  0.2236068 , -0.89442719]])
+
+    """
+    H = np.tril(np.ones((n, n)), -1) - np.diag(np.arange(n))
+    d = np.arange(n) * np.arange(1, n+1)
+    H[0] = 1
+    d[0] = n
+    H_full = H / np.sqrt(d)[:, np.newaxis]
+    if full:
+        return H_full
+    else:
+        return H_full[1:]
+
+
+def hilbert(n):
+    """
+    Create a Hilbert matrix of order `n`.
+
+    Returns the `n` by `n` array with entries `h[i,j] = 1 / (i + j + 1)`.
+
+    Parameters
+    ----------
+    n : int
+        The size of the array to create.
+
+    Returns
+    -------
+    h : (n, n) ndarray
+        The Hilbert matrix.
+
+    See Also
+    --------
+    invhilbert : Compute the inverse of a Hilbert matrix.
+
+    Notes
+    -----
+    .. versionadded:: 0.10.0
+
+    Examples
+    --------
+    >>> from scipy.linalg import hilbert
+    >>> hilbert(3)
+    array([[ 1.        ,  0.5       ,  0.33333333],
+           [ 0.5       ,  0.33333333,  0.25      ],
+           [ 0.33333333,  0.25      ,  0.2       ]])
+
+    """
+    values = 1.0 / (1.0 + np.arange(2 * n - 1))
+    h = hankel(values[:n], r=values[n - 1:])
+    return h
+
+
+def invhilbert(n, exact=False):
+    """
+    Compute the inverse of the Hilbert matrix of order `n`.
+
+    The entries in the inverse of a Hilbert matrix are integers. When `n`
+    is greater than 14, some entries in the inverse exceed the upper limit
+    of 64 bit integers. The `exact` argument provides two options for
+    dealing with these large integers.
+
+    Parameters
+    ----------
+    n : int
+        The order of the Hilbert matrix.
+    exact : bool, optional
+        If False, the data type of the array that is returned is np.float64,
+        and the array is an approximation of the inverse.
+        If True, the array is the exact integer inverse array. To represent
+        the exact inverse when n > 14, the returned array is an object array
+        of long integers. For n <= 14, the exact inverse is returned as an
+        array with data type np.int64.
+
+    Returns
+    -------
+    invh : (n, n) ndarray
+        The data type of the array is np.float64 if `exact` is False.
+        If `exact` is True, the data type is either np.int64 (for n <= 14)
+        or object (for n > 14). In the latter case, the objects in the
+        array will be long integers.
+
+    See Also
+    --------
+    hilbert : Create a Hilbert matrix.
+
+    Notes
+    -----
+    .. versionadded:: 0.10.0
+
+    Examples
+    --------
+    >>> from scipy.linalg import invhilbert
+    >>> invhilbert(4)
+    array([[   16.,  -120.,   240.,  -140.],
+           [ -120.,  1200., -2700.,  1680.],
+           [  240., -2700.,  6480., -4200.],
+           [ -140.,  1680., -4200.,  2800.]])
+    >>> invhilbert(4, exact=True)
+    array([[   16,  -120,   240,  -140],
+           [ -120,  1200, -2700,  1680],
+           [  240, -2700,  6480, -4200],
+           [ -140,  1680, -4200,  2800]], dtype=int64)
+    >>> invhilbert(16)[7,7]
+    4.2475099528537506e+19
+    >>> invhilbert(16, exact=True)[7,7]
+    42475099528537378560
+
+    """
+    from scipy.special import comb
+    if exact:
+        if n > 14:
+            dtype = object
+        else:
+            dtype = np.int64
+    else:
+        dtype = np.float64
+    invh = np.empty((n, n), dtype=dtype)
+    for i in range(n):
+        for j in range(0, i + 1):
+            s = i + j
+            invh[i, j] = ((-1) ** s * (s + 1) *
+                          comb(n + i, n - j - 1, exact=exact) *
+                          comb(n + j, n - i - 1, exact=exact) *
+                          comb(s, i, exact=exact) ** 2)
+            if i != j:
+                invh[j, i] = invh[i, j]
+    return invh
+
+
+def pascal(n, kind='symmetric', exact=True):
+    """
+    Returns the n x n Pascal matrix.
+
+    The Pascal matrix is a matrix containing the binomial coefficients as
+    its elements.
+
+    Parameters
+    ----------
+    n : int
+        The size of the matrix to create; that is, the result is an n x n
+        matrix.
+    kind : str, optional
+        Must be one of 'symmetric', 'lower', or 'upper'.
+        Default is 'symmetric'.
+    exact : bool, optional
+        If `exact` is True, the result is either an array of type
+        numpy.uint64 (if n < 35) or an object array of Python long integers.
+        If `exact` is False, the coefficients in the matrix are computed using
+        `scipy.special.comb` with ``exact=False``. The result will be a floating
+        point array, and the values in the array will not be the exact
+        coefficients, but this version is much faster than ``exact=True``.
+
+    Returns
+    -------
+    p : (n, n) ndarray
+        The Pascal matrix.
+
+    See Also
+    --------
+    invpascal
+
+    Notes
+    -----
+    See https://en.wikipedia.org/wiki/Pascal_matrix for more information
+    about Pascal matrices.
+
+    .. versionadded:: 0.11.0
+
+    Examples
+    --------
+    >>> from scipy.linalg import pascal
+    >>> pascal(4)
+    array([[ 1,  1,  1,  1],
+           [ 1,  2,  3,  4],
+           [ 1,  3,  6, 10],
+           [ 1,  4, 10, 20]], dtype=uint64)
+    >>> pascal(4, kind='lower')
+    array([[1, 0, 0, 0],
+           [1, 1, 0, 0],
+           [1, 2, 1, 0],
+           [1, 3, 3, 1]], dtype=uint64)
+    >>> pascal(50)[-1, -1]
+    25477612258980856902730428600
+    >>> from scipy.special import comb
+    >>> comb(98, 49, exact=True)
+    25477612258980856902730428600
+
+    """
+
+    from scipy.special import comb
+    if kind not in ['symmetric', 'lower', 'upper']:
+        raise ValueError("kind must be 'symmetric', 'lower', or 'upper'")
+
+    if exact:
+        if n >= 35:
+            L_n = np.empty((n, n), dtype=object)
+            L_n.fill(0)
+        else:
+            L_n = np.zeros((n, n), dtype=np.uint64)
+        for i in range(n):
+            for j in range(i + 1):
+                L_n[i, j] = comb(i, j, exact=True)
+    else:
+        L_n = comb(*np.ogrid[:n, :n])
+
+    if kind == 'lower':
+        p = L_n
+    elif kind == 'upper':
+        p = L_n.T
+    else:
+        p = np.dot(L_n, L_n.T)
+
+    return p
+
+
+def invpascal(n, kind='symmetric', exact=True):
+    """
+    Returns the inverse of the n x n Pascal matrix.
+
+    The Pascal matrix is a matrix containing the binomial coefficients as
+    its elements.
+
+    Parameters
+    ----------
+    n : int
+        The size of the matrix to create; that is, the result is an n x n
+        matrix.
+    kind : str, optional
+        Must be one of 'symmetric', 'lower', or 'upper'.
+        Default is 'symmetric'.
+    exact : bool, optional
+        If `exact` is True, the result is either an array of type
+        ``numpy.int64`` (if `n` <= 35) or an object array of Python integers.
+        If `exact` is False, the coefficients in the matrix are computed using
+        `scipy.special.comb` with `exact=False`. The result will be a floating
+        point array, and for large `n`, the values in the array will not be the
+        exact coefficients.
+
+    Returns
+    -------
+    invp : (n, n) ndarray
+        The inverse of the Pascal matrix.
+
+    See Also
+    --------
+    pascal
+
+    Notes
+    -----
+
+    .. versionadded:: 0.16.0
+
+    References
+    ----------
+    .. [1] "Pascal matrix", https://en.wikipedia.org/wiki/Pascal_matrix
+    .. [2] Cohen, A. M., "The inverse of a Pascal matrix", Mathematical
+           Gazette, 59(408), pp. 111-112, 1975.
+
+    Examples
+    --------
+    >>> from scipy.linalg import invpascal, pascal
+    >>> invp = invpascal(5)
+    >>> invp
+    array([[  5, -10,  10,  -5,   1],
+           [-10,  30, -35,  19,  -4],
+           [ 10, -35,  46, -27,   6],
+           [ -5,  19, -27,  17,  -4],
+           [  1,  -4,   6,  -4,   1]])
+
+    >>> p = pascal(5)
+    >>> p.dot(invp)
+    array([[ 1.,  0.,  0.,  0.,  0.],
+           [ 0.,  1.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  1.,  0.],
+           [ 0.,  0.,  0.,  0.,  1.]])
+
+    An example of the use of `kind` and `exact`:
+
+    >>> invpascal(5, kind='lower', exact=False)
+    array([[ 1., -0.,  0., -0.,  0.],
+           [-1.,  1., -0.,  0., -0.],
+           [ 1., -2.,  1., -0.,  0.],
+           [-1.,  3., -3.,  1., -0.],
+           [ 1., -4.,  6., -4.,  1.]])
+
+    """
+    from scipy.special import comb
+
+    if kind not in ['symmetric', 'lower', 'upper']:
+        raise ValueError("'kind' must be 'symmetric', 'lower' or 'upper'.")
+
+    if kind == 'symmetric':
+        if exact:
+            if n > 34:
+                dt = object
+            else:
+                dt = np.int64
+        else:
+            dt = np.float64
+        invp = np.empty((n, n), dtype=dt)
+        for i in range(n):
+            for j in range(0, i + 1):
+                v = 0
+                for k in range(n - i):
+                    v += comb(i + k, k, exact=exact) * comb(i + k, i + k - j,
+                                                            exact=exact)
+                invp[i, j] = (-1)**(i - j) * v
+                if i != j:
+                    invp[j, i] = invp[i, j]
+    else:
+        # For the 'lower' and 'upper' cases, we computer the inverse by
+        # changing the sign of every other diagonal of the pascal matrix.
+        invp = pascal(n, kind=kind, exact=exact)
+        if invp.dtype == np.uint64:
+            # This cast from np.uint64 to int64 OK, because if `kind` is not
+            # "symmetric", the values in invp are all much less than 2**63.
+            invp = invp.view(np.int64)
+
+        # The toeplitz matrix has alternating bands of 1 and -1.
+        invp *= toeplitz((-1)**np.arange(n)).astype(invp.dtype)
+
+    return invp
+
+
+def dft(n, scale=None):
+    """
+    Discrete Fourier transform matrix.
+
+    Create the matrix that computes the discrete Fourier transform of a
+    sequence [1]_. The nth primitive root of unity used to generate the
+    matrix is exp(-2*pi*i/n), where i = sqrt(-1).
+
+    Parameters
+    ----------
+    n : int
+        Size the matrix to create.
+    scale : str, optional
+        Must be None, 'sqrtn', or 'n'.
+        If `scale` is 'sqrtn', the matrix is divided by `sqrt(n)`.
+        If `scale` is 'n', the matrix is divided by `n`.
+        If `scale` is None (the default), the matrix is not normalized, and the
+        return value is simply the Vandermonde matrix of the roots of unity.
+
+    Returns
+    -------
+    m : (n, n) ndarray
+        The DFT matrix.
+
+    Notes
+    -----
+    When `scale` is None, multiplying a vector by the matrix returned by
+    `dft` is mathematically equivalent to (but much less efficient than)
+    the calculation performed by `scipy.fft.fft`.
+
+    .. versionadded:: 0.14.0
+
+    References
+    ----------
+    .. [1] "DFT matrix", https://en.wikipedia.org/wiki/DFT_matrix
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import dft
+    >>> np.set_printoptions(precision=2, suppress=True)  # for compact output
+    >>> m = dft(5)
+    >>> m
+    array([[ 1.  +0.j  ,  1.  +0.j  ,  1.  +0.j  ,  1.  +0.j  ,  1.  +0.j  ],
+           [ 1.  +0.j  ,  0.31-0.95j, -0.81-0.59j, -0.81+0.59j,  0.31+0.95j],
+           [ 1.  +0.j  , -0.81-0.59j,  0.31+0.95j,  0.31-0.95j, -0.81+0.59j],
+           [ 1.  +0.j  , -0.81+0.59j,  0.31-0.95j,  0.31+0.95j, -0.81-0.59j],
+           [ 1.  +0.j  ,  0.31+0.95j, -0.81+0.59j, -0.81-0.59j,  0.31-0.95j]])
+    >>> x = np.array([1, 2, 3, 0, 3])
+    >>> m @ x  # Compute the DFT of x
+    array([ 9.  +0.j  ,  0.12-0.81j, -2.12+3.44j, -2.12-3.44j,  0.12+0.81j])
+
+    Verify that ``m @ x`` is the same as ``fft(x)``.
+
+    >>> from scipy.fft import fft
+    >>> fft(x)     # Same result as m @ x
+    array([ 9.  +0.j  ,  0.12-0.81j, -2.12+3.44j, -2.12-3.44j,  0.12+0.81j])
+    """
+    if scale not in [None, 'sqrtn', 'n']:
+        raise ValueError("scale must be None, 'sqrtn', or 'n'; "
+                         f"{scale!r} is not valid.")
+
+    omegas = np.exp(-2j * np.pi * np.arange(n) / n).reshape(-1, 1)
+    m = omegas ** np.arange(n)
+    if scale == 'sqrtn':
+        m /= math.sqrt(n)
+    elif scale == 'n':
+        m /= n
+    return m
+
+
+def fiedler(a):
+    """Returns a symmetric Fiedler matrix
+
+    Given an sequence of numbers `a`, Fiedler matrices have the structure
+    ``F[i, j] = np.abs(a[i] - a[j])``, and hence zero diagonals and nonnegative
+    entries. A Fiedler matrix has a dominant positive eigenvalue and other
+    eigenvalues are negative. Although not valid generally, for certain inputs,
+    the inverse and the determinant can be derived explicitly as given in [1]_.
+
+    Parameters
+    ----------
+    a : (..., n,) array_like
+        Coefficient array. N-dimensional arrays are treated as a batch:
+        each slice along the last axis is a 1-D coefficient array.
+
+    Returns
+    -------
+    F : (..., n, n) ndarray
+        Fiedler matrix. For batch input, each slice of shape ``(n, n)``
+        along the last two dimensions of the output corresponds with a
+        slice of shape ``(n,)`` along the last dimension of the input.
+
+    See Also
+    --------
+    circulant, toeplitz
+
+    Notes
+    -----
+
+    .. versionadded:: 1.3.0
+
+    References
+    ----------
+    .. [1] J. Todd, "Basic Numerical Mathematics: Vol.2 : Numerical Algebra",
+        1977, Birkhauser, :doi:`10.1007/978-3-0348-7286-7`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import det, inv, fiedler
+    >>> a = [1, 4, 12, 45, 77]
+    >>> n = len(a)
+    >>> A = fiedler(a)
+    >>> A
+    array([[ 0,  3, 11, 44, 76],
+           [ 3,  0,  8, 41, 73],
+           [11,  8,  0, 33, 65],
+           [44, 41, 33,  0, 32],
+           [76, 73, 65, 32,  0]])
+
+    The explicit formulas for determinant and inverse seem to hold only for
+    monotonically increasing/decreasing arrays. Note the tridiagonal structure
+    and the corners.
+
+    >>> Ai = inv(A)
+    >>> Ai[np.abs(Ai) < 1e-12] = 0.  # cleanup the numerical noise for display
+    >>> Ai
+    array([[-0.16008772,  0.16666667,  0.        ,  0.        ,  0.00657895],
+           [ 0.16666667, -0.22916667,  0.0625    ,  0.        ,  0.        ],
+           [ 0.        ,  0.0625    , -0.07765152,  0.01515152,  0.        ],
+           [ 0.        ,  0.        ,  0.01515152, -0.03077652,  0.015625  ],
+           [ 0.00657895,  0.        ,  0.        ,  0.015625  , -0.00904605]])
+    >>> det(A)
+    15409151.999999998
+    >>> (-1)**(n-1) * 2**(n-2) * np.diff(a).prod() * (a[-1] - a[0])
+    15409152
+
+    """
+    a = np.atleast_1d(a)
+
+    if a.ndim > 1:
+        return np.apply_along_axis(fiedler, -1, a)
+
+    if a.size == 0:
+        return np.array([], dtype=float)
+    elif a.size == 1:
+        return np.array([[0.]])
+    else:
+        return np.abs(a[:, None] - a)
+
+
+def fiedler_companion(a):
+    """ Returns a Fiedler companion matrix
+
+    Given a polynomial coefficient array ``a``, this function forms a
+    pentadiagonal matrix with a special structure whose eigenvalues coincides
+    with the roots of ``a``.
+
+    Parameters
+    ----------
+    a : (..., N) array_like
+        1-D array of polynomial coefficients in descending order with a nonzero
+        leading coefficient. For ``N < 2``, an empty array is returned.
+        N-dimensional arrays are treated as a batch: each slice along the last
+        axis is a 1-D array of polynomial coefficients.
+
+    Returns
+    -------
+    c : (..., N-1, N-1) ndarray
+        Resulting companion matrix. For batch input, each slice of shape
+        ``(N-1, N-1)`` along the last two dimensions of the output corresponds
+        with a slice of shape ``(N,)`` along the last dimension of the input.
+
+    See Also
+    --------
+    companion
+
+    Notes
+    -----
+    Similar to `companion`, each leading coefficient along the last axis of the
+    input should be nonzero.
+    If the leading coefficient is not 1, other coefficients are rescaled before
+    the array generation. To avoid numerical issues, it is best to provide a
+    monic polynomial.
+
+    .. versionadded:: 1.3.0
+
+    References
+    ----------
+    .. [1] M. Fiedler, " A note on companion matrices", Linear Algebra and its
+        Applications, 2003, :doi:`10.1016/S0024-3795(03)00548-2`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import fiedler_companion, eigvals
+    >>> p = np.poly(np.arange(1, 9, 2))  # [1., -16., 86., -176., 105.]
+    >>> fc = fiedler_companion(p)
+    >>> fc
+    array([[  16.,  -86.,    1.,    0.],
+           [   1.,    0.,    0.,    0.],
+           [   0.,  176.,    0., -105.],
+           [   0.,    1.,    0.,    0.]])
+    >>> eigvals(fc)
+    array([7.+0.j, 5.+0.j, 3.+0.j, 1.+0.j])
+
+    """
+    a = np.atleast_1d(a)
+
+    if a.ndim > 1:
+        return np.apply_along_axis(fiedler_companion, -1, a)
+
+    if a.size <= 2:
+        if a.size == 2:
+            return np.array([[-(a/a[0])[-1]]])
+        return np.array([], dtype=a.dtype)
+
+    if a[0] == 0.:
+        raise ValueError('Leading coefficient is zero.')
+
+    a = a/a[0]
+    n = a.size - 1
+    c = np.zeros((n, n), dtype=a.dtype)
+    # subdiagonals
+    c[range(3, n, 2), range(1, n-2, 2)] = 1.
+    c[range(2, n, 2), range(1, n-1, 2)] = -a[3::2]
+    # superdiagonals
+    c[range(0, n-2, 2), range(2, n, 2)] = 1.
+    c[range(0, n-1, 2), range(1, n, 2)] = -a[2::2]
+    c[[0, 1], 0] = [-a[1], 1]
+
+    return c
+
+
+def convolution_matrix(a, n, mode='full'):
+    """
+    Construct a convolution matrix.
+
+    Constructs the Toeplitz matrix representing one-dimensional
+    convolution [1]_.  See the notes below for details.
+
+    Parameters
+    ----------
+    a : (..., m) array_like
+        The 1-D array to convolve. N-dimensional arrays are treated as a
+        batch: each slice along the last axis is a 1-D array to convolve.
+    n : int
+        The number of columns in the resulting matrix.  It gives the length
+        of the input to be convolved with `a`.  This is analogous to the
+        length of `v` in ``numpy.convolve(a, v)``.
+    mode : str
+        This is analogous to `mode` in ``numpy.convolve(v, a, mode)``.
+        It must be one of ('full', 'valid', 'same').
+        See below for how `mode` determines the shape of the result.
+
+    Returns
+    -------
+    A : (..., k, n) ndarray
+        The convolution matrix whose row count `k` depends on `mode`::
+
+            =======  =========================
+             mode    k
+            =======  =========================
+            'full'   m + n -1
+            'same'   max(m, n)
+            'valid'  max(m, n) - min(m, n) + 1
+            =======  =========================
+
+        For batch input, each slice of shape ``(k, n)`` along the last two
+        dimensions of the output corresponds with a slice of shape ``(m,)``
+        along the last dimension of the input.
+
+    See Also
+    --------
+    toeplitz : Toeplitz matrix
+
+    Notes
+    -----
+    The code::
+
+        A = convolution_matrix(a, n, mode)
+
+    creates a Toeplitz matrix `A` such that ``A @ v`` is equivalent to
+    using ``convolve(a, v, mode)``.  The returned array always has `n`
+    columns.  The number of rows depends on the specified `mode`, as
+    explained above.
+
+    In the default 'full' mode, the entries of `A` are given by::
+
+        A[i, j] == (a[i-j] if (0 <= (i-j) < m) else 0)
+
+    where ``m = len(a)``.  Suppose, for example, the input array is
+    ``[x, y, z]``.  The convolution matrix has the form::
+
+        [x, 0, 0, ..., 0, 0]
+        [y, x, 0, ..., 0, 0]
+        [z, y, x, ..., 0, 0]
+        ...
+        [0, 0, 0, ..., x, 0]
+        [0, 0, 0, ..., y, x]
+        [0, 0, 0, ..., z, y]
+        [0, 0, 0, ..., 0, z]
+
+    In 'valid' mode, the entries of `A` are given by::
+
+        A[i, j] == (a[i-j+m-1] if (0 <= (i-j+m-1) < m) else 0)
+
+    This corresponds to a matrix whose rows are the subset of those from
+    the 'full' case where all the coefficients in `a` are contained in the
+    row.  For input ``[x, y, z]``, this array looks like::
+
+        [z, y, x, 0, 0, ..., 0, 0, 0]
+        [0, z, y, x, 0, ..., 0, 0, 0]
+        [0, 0, z, y, x, ..., 0, 0, 0]
+        ...
+        [0, 0, 0, 0, 0, ..., x, 0, 0]
+        [0, 0, 0, 0, 0, ..., y, x, 0]
+        [0, 0, 0, 0, 0, ..., z, y, x]
+
+    In the 'same' mode, the entries of `A` are given by::
+
+        d = (m - 1) // 2
+        A[i, j] == (a[i-j+d] if (0 <= (i-j+d) < m) else 0)
+
+    The typical application of the 'same' mode is when one has a signal of
+    length `n` (with `n` greater than ``len(a)``), and the desired output
+    is a filtered signal that is still of length `n`.
+
+    For input ``[x, y, z]``, this array looks like::
+
+        [y, x, 0, 0, ..., 0, 0, 0]
+        [z, y, x, 0, ..., 0, 0, 0]
+        [0, z, y, x, ..., 0, 0, 0]
+        [0, 0, z, y, ..., 0, 0, 0]
+        ...
+        [0, 0, 0, 0, ..., y, x, 0]
+        [0, 0, 0, 0, ..., z, y, x]
+        [0, 0, 0, 0, ..., 0, z, y]
+
+    .. versionadded:: 1.5.0
+
+    References
+    ----------
+    .. [1] "Convolution", https://en.wikipedia.org/wiki/Convolution
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.linalg import convolution_matrix
+    >>> A = convolution_matrix([-1, 4, -2], 5, mode='same')
+    >>> A
+    array([[ 4, -1,  0,  0,  0],
+           [-2,  4, -1,  0,  0],
+           [ 0, -2,  4, -1,  0],
+           [ 0,  0, -2,  4, -1],
+           [ 0,  0,  0, -2,  4]])
+
+    Compare multiplication by `A` with the use of `numpy.convolve`.
+
+    >>> x = np.array([1, 2, 0, -3, 0.5])
+    >>> A @ x
+    array([  2. ,   6. ,  -1. , -12.5,   8. ])
+
+    Verify that ``A @ x`` produced the same result as applying the
+    convolution function.
+
+    >>> np.convolve([-1, 4, -2], x, mode='same')
+    array([  2. ,   6. ,  -1. , -12.5,   8. ])
+
+    For comparison to the case ``mode='same'`` shown above, here are the
+    matrices produced by ``mode='full'`` and ``mode='valid'`` for the
+    same coefficients and size.
+
+    >>> convolution_matrix([-1, 4, -2], 5, mode='full')
+    array([[-1,  0,  0,  0,  0],
+           [ 4, -1,  0,  0,  0],
+           [-2,  4, -1,  0,  0],
+           [ 0, -2,  4, -1,  0],
+           [ 0,  0, -2,  4, -1],
+           [ 0,  0,  0, -2,  4],
+           [ 0,  0,  0,  0, -2]])
+
+    >>> convolution_matrix([-1, 4, -2], 5, mode='valid')
+    array([[-2,  4, -1,  0,  0],
+           [ 0, -2,  4, -1,  0],
+           [ 0,  0, -2,  4, -1]])
+    """
+    if n <= 0:
+        raise ValueError('n must be a positive integer.')
+
+    a = np.asarray(a)
+
+    if a.size == 0:
+        raise ValueError('len(a) must be at least 1.')
+
+    if mode not in ('full', 'valid', 'same'):
+        raise ValueError(
+            "'mode' argument must be one of ('full', 'valid', 'same')")
+
+    if a.ndim > 1:
+        return np.apply_along_axis(lambda a: convolution_matrix(a, n, mode), -1, a)
+
+    # create zero padded versions of the array
+    az = np.pad(a, (0, n-1), 'constant')
+    raz = np.pad(a[::-1], (0, n-1), 'constant')
+
+    if mode == 'same':
+        trim = min(n, len(a)) - 1
+        tb = trim//2
+        te = trim - tb
+        col0 = az[tb:len(az)-te]
+        row0 = raz[-n-tb:len(raz)-tb]
+    elif mode == 'valid':
+        tb = min(n, len(a)) - 1
+        te = tb
+        col0 = az[tb:len(az)-te]
+        row0 = raz[-n-tb:len(raz)-tb]
+    else:  # 'full'
+        col0 = az
+        row0 = raz[-n:]
+    return toeplitz(col0, row0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..f6d01d2b6e59b040f39c0b53cc2788bbd3d0888f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/_testutils.py
@@ -0,0 +1,65 @@
+import numpy as np
+
+
+class _FakeMatrix:
+    def __init__(self, data):
+        self._data = data
+        self.__array_interface__ = data.__array_interface__
+
+
+class _FakeMatrix2:
+    def __init__(self, data):
+        self._data = data
+
+    def __array__(self, dtype=None, copy=None):
+        if copy:
+            return self._data.copy()
+        return self._data
+
+
+def _get_array(shape, dtype):
+    """
+    Get a test array of given shape and data type.
+    Returned NxN matrices are posdef, and 2xN are banded-posdef.
+
+    """
+    if len(shape) == 2 and shape[0] == 2:
+        # yield a banded positive definite one
+        x = np.zeros(shape, dtype=dtype)
+        x[0, 1:] = -1
+        x[1] = 2
+        return x
+    elif len(shape) == 2 and shape[0] == shape[1]:
+        # always yield a positive definite matrix
+        x = np.zeros(shape, dtype=dtype)
+        j = np.arange(shape[0])
+        x[j, j] = 2
+        x[j[:-1], j[:-1]+1] = -1
+        x[j[:-1]+1, j[:-1]] = -1
+        return x
+    else:
+        np.random.seed(1234)
+        return np.random.randn(*shape).astype(dtype)
+
+
+def _id(x):
+    return x
+
+
+def assert_no_overwrite(call, shapes, dtypes=None):
+    """
+    Test that a call does not overwrite its input arguments
+    """
+
+    if dtypes is None:
+        dtypes = [np.float32, np.float64, np.complex64, np.complex128]
+
+    for dtype in dtypes:
+        for order in ["C", "F"]:
+            for faker in [_id, _FakeMatrix, _FakeMatrix2]:
+                orig_inputs = [_get_array(s, dtype) for s in shapes]
+                inputs = [faker(x.copy(order)) for x in orig_inputs]
+                call(*inputs)
+                msg = f"call modified inputs [{dtype!r}, {faker!r}]"
+                for a, b in zip(inputs, orig_inputs):
+                    np.testing.assert_equal(a, b, err_msg=msg)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..04ef3645a2ed6a22106ed8ca1acf9e9ac93df5cf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/basic.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'solve', 'solve_triangular', 'solveh_banded', 'solve_banded',
+    'solve_toeplitz', 'solve_circulant', 'inv', 'det', 'lstsq',
+    'pinv', 'pinvh', 'matrix_balance', 'matmul_toeplitz',
+    'get_lapack_funcs', 'LinAlgError', 'LinAlgWarning',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="basic",
+                                   private_modules=["_basic"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/blas.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/blas.py
new file mode 100644
index 0000000000000000000000000000000000000000..c943460e6bafcd9a382586d5a5155357382ea596
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/blas.py
@@ -0,0 +1,484 @@
+"""
+Low-level BLAS functions (:mod:`scipy.linalg.blas`)
+===================================================
+
+This module contains low-level functions from the BLAS library.
+
+.. versionadded:: 0.12.0
+
+.. note::
+
+   The common ``overwrite_<>`` option in many routines, allows the
+   input arrays to be overwritten to avoid extra memory allocation.
+   However this requires the array to satisfy two conditions
+   which are memory order and the data type to match exactly the
+   order and the type expected by the routine.
+
+   As an example, if you pass a double precision float array to any
+   ``S....`` routine which expects single precision arguments, f2py
+   will create an intermediate array to match the argument types and
+   overwriting will be performed on that intermediate array.
+
+   Similarly, if a C-contiguous array is passed, f2py will pass a
+   FORTRAN-contiguous array internally. Please make sure that these
+   details are satisfied. More information can be found in the f2py
+   documentation.
+
+.. warning::
+
+   These functions do little to no error checking.
+   It is possible to cause crashes by mis-using them,
+   so prefer using the higher-level routines in `scipy.linalg`.
+
+Finding functions
+-----------------
+
+.. autosummary::
+   :toctree: generated/
+
+   get_blas_funcs
+   find_best_blas_type
+
+BLAS Level 1 functions
+----------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   caxpy
+   ccopy
+   cdotc
+   cdotu
+   crotg
+   cscal
+   csrot
+   csscal
+   cswap
+   dasum
+   daxpy
+   dcopy
+   ddot
+   dnrm2
+   drot
+   drotg
+   drotm
+   drotmg
+   dscal
+   dswap
+   dzasum
+   dznrm2
+   icamax
+   idamax
+   isamax
+   izamax
+   sasum
+   saxpy
+   scasum
+   scnrm2
+   scopy
+   sdot
+   snrm2
+   srot
+   srotg
+   srotm
+   srotmg
+   sscal
+   sswap
+   zaxpy
+   zcopy
+   zdotc
+   zdotu
+   zdrot
+   zdscal
+   zrotg
+   zscal
+   zswap
+
+BLAS Level 2 functions
+----------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   sgbmv
+   sgemv
+   sger
+   ssbmv
+   sspr
+   sspr2
+   ssymv
+   ssyr
+   ssyr2
+   stbmv
+   stpsv
+   strmv
+   strsv
+   dgbmv
+   dgemv
+   dger
+   dsbmv
+   dspr
+   dspr2
+   dsymv
+   dsyr
+   dsyr2
+   dtbmv
+   dtpsv
+   dtrmv
+   dtrsv
+   cgbmv
+   cgemv
+   cgerc
+   cgeru
+   chbmv
+   chemv
+   cher
+   cher2
+   chpmv
+   chpr
+   chpr2
+   ctbmv
+   ctbsv
+   ctpmv
+   ctpsv
+   ctrmv
+   ctrsv
+   csyr
+   zgbmv
+   zgemv
+   zgerc
+   zgeru
+   zhbmv
+   zhemv
+   zher
+   zher2
+   zhpmv
+   zhpr
+   zhpr2
+   ztbmv
+   ztbsv
+   ztpmv
+   ztrmv
+   ztrsv
+   zsyr
+
+BLAS Level 3 functions
+----------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   sgemm
+   ssymm
+   ssyr2k
+   ssyrk
+   strmm
+   strsm
+   dgemm
+   dsymm
+   dsyr2k
+   dsyrk
+   dtrmm
+   dtrsm
+   cgemm
+   chemm
+   cher2k
+   cherk
+   csymm
+   csyr2k
+   csyrk
+   ctrmm
+   ctrsm
+   zgemm
+   zhemm
+   zher2k
+   zherk
+   zsymm
+   zsyr2k
+   zsyrk
+   ztrmm
+   ztrsm
+
+"""
+#
+# Author: Pearu Peterson, March 2002
+#         refactoring by Fabian Pedregosa, March 2010
+#
+
+__all__ = ['get_blas_funcs', 'find_best_blas_type']
+
+import numpy as np
+import functools
+
+from scipy.linalg import _fblas
+try:
+    from scipy.linalg import _cblas
+except ImportError:
+    _cblas = None
+
+try:
+    from scipy.linalg import _fblas_64
+    HAS_ILP64 = True
+except ImportError:
+    HAS_ILP64 = False
+    _fblas_64 = None
+
+# Expose all functions (only fblas --- cblas is an implementation detail)
+empty_module = None
+from scipy.linalg._fblas import *  # noqa: E402, F403
+del empty_module
+
+# all numeric dtypes '?bBhHiIlLqQefdgFDGO' that are safe to be converted to
+
+# single precision float   : '?bBhH!!!!!!ef!!!!!!'
+# double precision float   : '?bBhHiIlLqQefdg!!!!'
+# single precision complex : '?bBhH!!!!!!ef!!F!!!'
+# double precision complex : '?bBhHiIlLqQefdgFDG!'
+
+_type_score = {x: 1 for x in '?bBhHef'}
+_type_score.update({x: 2 for x in 'iIlLqQd'})
+
+# Handle float128(g) and complex256(G) separately in case non-Windows systems.
+# On Windows, the values will be rewritten to the same key with the same value.
+_type_score.update({'F': 3, 'D': 4, 'g': 2, 'G': 4})
+
+# Final mapping to the actual prefixes and dtypes
+_type_conv = {1: ('s', np.dtype('float32')),
+              2: ('d', np.dtype('float64')),
+              3: ('c', np.dtype('complex64')),
+              4: ('z', np.dtype('complex128'))}
+
+# some convenience alias for complex functions
+_blas_alias = {'cnrm2': 'scnrm2', 'znrm2': 'dznrm2',
+               'cdot': 'cdotc', 'zdot': 'zdotc',
+               'cger': 'cgerc', 'zger': 'zgerc',
+               'sdotc': 'sdot', 'sdotu': 'sdot',
+               'ddotc': 'ddot', 'ddotu': 'ddot'}
+
+
+def find_best_blas_type(arrays=(), dtype=None):
+    """Find best-matching BLAS/LAPACK type.
+
+    Arrays are used to determine the optimal prefix of BLAS routines.
+
+    Parameters
+    ----------
+    arrays : sequence of ndarrays, optional
+        Arrays can be given to determine optimal prefix of BLAS
+        routines. If not given, double-precision routines will be
+        used, otherwise the most generic type in arrays will be used.
+    dtype : str or dtype, optional
+        Data-type specifier. Not used if `arrays` is non-empty.
+
+    Returns
+    -------
+    prefix : str
+        BLAS/LAPACK prefix character.
+    dtype : dtype
+        Inferred Numpy data type.
+    prefer_fortran : bool
+        Whether to prefer Fortran order routines over C order.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import scipy.linalg.blas as bla
+    >>> rng = np.random.default_rng()
+    >>> a = rng.random((10,15))
+    >>> b = np.asfortranarray(a)  # Change the memory layout order
+    >>> bla.find_best_blas_type((a,))
+    ('d', dtype('float64'), False)
+    >>> bla.find_best_blas_type((a*1j,))
+    ('z', dtype('complex128'), False)
+    >>> bla.find_best_blas_type((b,))
+    ('d', dtype('float64'), True)
+
+    """
+    dtype = np.dtype(dtype)
+    max_score = _type_score.get(dtype.char, 5)
+    prefer_fortran = False
+
+    if arrays:
+        # In most cases, single element is passed through, quicker route
+        if len(arrays) == 1:
+            max_score = _type_score.get(arrays[0].dtype.char, 5)
+            prefer_fortran = arrays[0].flags['FORTRAN']
+        else:
+            # use the most generic type in arrays
+            scores = [_type_score.get(x.dtype.char, 5) for x in arrays]
+            max_score = max(scores)
+            ind_max_score = scores.index(max_score)
+            # safe upcasting for mix of float64 and complex64 --> prefix 'z'
+            if max_score == 3 and (2 in scores):
+                max_score = 4
+
+            if arrays[ind_max_score].flags['FORTRAN']:
+                # prefer Fortran for leading array with column major order
+                prefer_fortran = True
+
+    # Get the LAPACK prefix and the corresponding dtype if not fall back
+    # to 'd' and double precision float.
+    prefix, dtype = _type_conv.get(max_score, ('d', np.dtype('float64')))
+
+    return prefix, dtype, prefer_fortran
+
+
+def _get_funcs(names, arrays, dtype,
+               lib_name, fmodule, cmodule,
+               fmodule_name, cmodule_name, alias,
+               ilp64=False):
+    """
+    Return available BLAS/LAPACK functions.
+
+    Used also in lapack.py. See get_blas_funcs for docstring.
+    """
+
+    funcs = []
+    unpack = False
+    dtype = np.dtype(dtype)
+    module1 = (cmodule, cmodule_name)
+    module2 = (fmodule, fmodule_name)
+
+    if isinstance(names, str):
+        names = (names,)
+        unpack = True
+
+    prefix, dtype, prefer_fortran = find_best_blas_type(arrays, dtype)
+
+    if prefer_fortran:
+        module1, module2 = module2, module1
+
+    for name in names:
+        func_name = prefix + name
+        func_name = alias.get(func_name, func_name)
+        func = getattr(module1[0], func_name, None)
+        module_name = module1[1]
+        if func is None:
+            func = getattr(module2[0], func_name, None)
+            module_name = module2[1]
+        if func is None:
+            raise ValueError(
+                f'{lib_name} function {func_name} could not be found')
+        func.module_name, func.typecode = module_name, prefix
+        func.dtype = dtype
+        if not ilp64:
+            func.int_dtype = np.dtype(np.intc)
+        else:
+            func.int_dtype = np.dtype(np.int64)
+        func.prefix = prefix  # Backward compatibility
+        funcs.append(func)
+
+    if unpack:
+        return funcs[0]
+    else:
+        return funcs
+
+
+def _memoize_get_funcs(func):
+    """
+    Memoized fast path for _get_funcs instances
+    """
+    memo = {}
+    func.memo = memo
+
+    @functools.wraps(func)
+    def getter(names, arrays=(), dtype=None, ilp64=False):
+        key = (names, dtype, ilp64)
+        for array in arrays:
+            # cf. find_blas_funcs
+            key += (array.dtype.char, array.flags.fortran)
+
+        try:
+            value = memo.get(key)
+        except TypeError:
+            # unhashable key etc.
+            key = None
+            value = None
+
+        if value is not None:
+            return value
+
+        value = func(names, arrays, dtype, ilp64)
+
+        if key is not None:
+            memo[key] = value
+
+        return value
+
+    return getter
+
+
+@_memoize_get_funcs
+def get_blas_funcs(names, arrays=(), dtype=None, ilp64=False):
+    """Return available BLAS function objects from names.
+
+    Arrays are used to determine the optimal prefix of BLAS routines.
+
+    Parameters
+    ----------
+    names : str or sequence of str
+        Name(s) of BLAS functions without type prefix.
+
+    arrays : sequence of ndarrays, optional
+        Arrays can be given to determine optimal prefix of BLAS
+        routines. If not given, double-precision routines will be
+        used, otherwise the most generic type in arrays will be used.
+
+    dtype : str or dtype, optional
+        Data-type specifier. Not used if `arrays` is non-empty.
+
+    ilp64 : {True, False, 'preferred'}, optional
+        Whether to return ILP64 routine variant.
+        Choosing 'preferred' returns ILP64 routine if available,
+        and otherwise the 32-bit routine. Default: False
+
+    Returns
+    -------
+    funcs : list
+        List containing the found function(s).
+
+
+    Notes
+    -----
+    This routine automatically chooses between Fortran/C
+    interfaces. Fortran code is used whenever possible for arrays with
+    column major order. In all other cases, C code is preferred.
+
+    In BLAS, the naming convention is that all functions start with a
+    type prefix, which depends on the type of the principal
+    matrix. These can be one of {'s', 'd', 'c', 'z'} for the NumPy
+    types {float32, float64, complex64, complex128} respectively.
+    The code and the dtype are stored in attributes `typecode` and `dtype`
+    of the returned functions.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import scipy.linalg as LA
+    >>> rng = np.random.default_rng()
+    >>> a = rng.random((3,2))
+    >>> x_gemv = LA.get_blas_funcs('gemv', (a,))
+    >>> x_gemv.typecode
+    'd'
+    >>> x_gemv = LA.get_blas_funcs('gemv',(a*1j,))
+    >>> x_gemv.typecode
+    'z'
+
+    """
+    if isinstance(ilp64, str):
+        if ilp64 == 'preferred':
+            ilp64 = HAS_ILP64
+        else:
+            raise ValueError("Invalid value for 'ilp64'")
+
+    if not ilp64:
+        return _get_funcs(names, arrays, dtype,
+                          "BLAS", _fblas, _cblas, "fblas", "cblas",
+                          _blas_alias, ilp64=False)
+    else:
+        if not HAS_ILP64:
+            raise RuntimeError("BLAS ILP64 routine requested, but Scipy "
+                               "compiled only with 32-bit BLAS")
+        return _get_funcs(names, arrays, dtype,
+                          "BLAS", _fblas_64, None, "fblas_64", None,
+                          _blas_alias, ilp64=True)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..7ed44f6ea8611f926e3ea5fd2670446cdf9b398c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pxd
@@ -0,0 +1,169 @@
+"""
+This file was generated by _generate_pyx.py.
+Do not edit this file directly.
+"""
+
+# Within scipy, these wrappers can be used via relative or absolute cimport.
+# Examples:
+# from ..linalg cimport cython_blas
+# from scipy.linalg cimport cython_blas
+# cimport scipy.linalg.cython_blas as cython_blas
+# cimport ..linalg.cython_blas as cython_blas
+
+# Within SciPy, if BLAS functions are needed in C/C++/Fortran,
+# these wrappers should not be used.
+# The original libraries should be linked directly.
+
+ctypedef float s
+ctypedef double d
+ctypedef float complex c
+ctypedef double complex z
+
+cdef void caxpy(int *n, c *ca, c *cx, int *incx, c *cy, int *incy) noexcept nogil
+cdef void ccopy(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil
+cdef c cdotc(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil
+cdef c cdotu(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil
+cdef void cgbmv(char *trans, int *m, int *n, int *kl, int *ku, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void cgemm(char *transa, char *transb, int *m, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil
+cdef void cgemv(char *trans, int *m, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void cgerc(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil
+cdef void cgeru(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil
+cdef void chbmv(char *uplo, int *n, int *k, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void chemm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil
+cdef void chemv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void cher(char *uplo, int *n, s *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil
+cdef void cher2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil
+cdef void cher2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, s *beta, c *c, int *ldc) noexcept nogil
+cdef void cherk(char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c, int *ldc) noexcept nogil
+cdef void chpmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void chpr(char *uplo, int *n, s *alpha, c *x, int *incx, c *ap) noexcept nogil
+cdef void chpr2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *ap) noexcept nogil
+cdef void crotg(c *ca, c *cb, s *c, c *s) noexcept nogil
+cdef void cscal(int *n, c *ca, c *cx, int *incx) noexcept nogil
+cdef void csrot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, s *s) noexcept nogil
+cdef void csscal(int *n, s *sa, c *cx, int *incx) noexcept nogil
+cdef void cswap(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil
+cdef void csymm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil
+cdef void csyr2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil
+cdef void csyrk(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *beta, c *c, int *ldc) noexcept nogil
+cdef void ctbmv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil
+cdef void ctbsv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil
+cdef void ctpmv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil
+cdef void ctpsv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil
+cdef void ctrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil
+cdef void ctrmv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil
+cdef void ctrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil
+cdef void ctrsv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil
+cdef d dasum(int *n, d *dx, int *incx) noexcept nogil
+cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) noexcept nogil
+cdef d dcabs1(z *z) noexcept nogil
+cdef void dcopy(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil
+cdef d ddot(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil
+cdef void dgbmv(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil
+cdef void dgemm(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil
+cdef void dgemv(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil
+cdef void dger(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil
+cdef d dnrm2(int *n, d *x, int *incx) noexcept nogil
+cdef void drot(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) noexcept nogil
+cdef void drotg(d *da, d *db, d *c, d *s) noexcept nogil
+cdef void drotm(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) noexcept nogil
+cdef void drotmg(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) noexcept nogil
+cdef void dsbmv(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil
+cdef void dscal(int *n, d *da, d *dx, int *incx) noexcept nogil
+cdef d dsdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef void dspmv(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil
+cdef void dspr(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) noexcept nogil
+cdef void dspr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) noexcept nogil
+cdef void dswap(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil
+cdef void dsymm(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil
+cdef void dsymv(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil
+cdef void dsyr(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) noexcept nogil
+cdef void dsyr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil
+cdef void dsyr2k(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil
+cdef void dsyrk(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) noexcept nogil
+cdef void dtbmv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil
+cdef void dtbsv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil
+cdef void dtpmv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil
+cdef void dtpsv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil
+cdef void dtrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil
+cdef void dtrmv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil
+cdef void dtrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil
+cdef void dtrsv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil
+cdef d dzasum(int *n, z *zx, int *incx) noexcept nogil
+cdef d dznrm2(int *n, z *x, int *incx) noexcept nogil
+cdef int icamax(int *n, c *cx, int *incx) noexcept nogil
+cdef int idamax(int *n, d *dx, int *incx) noexcept nogil
+cdef int isamax(int *n, s *sx, int *incx) noexcept nogil
+cdef int izamax(int *n, z *zx, int *incx) noexcept nogil
+cdef bint lsame(char *ca, char *cb) noexcept nogil
+cdef s sasum(int *n, s *sx, int *incx) noexcept nogil
+cdef void saxpy(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef s scasum(int *n, c *cx, int *incx) noexcept nogil
+cdef s scnrm2(int *n, c *x, int *incx) noexcept nogil
+cdef void scopy(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef s sdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef s sdsdot(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef void sgbmv(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil
+cdef void sgemm(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil
+cdef void sgemv(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil
+cdef void sger(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil
+cdef s snrm2(int *n, s *x, int *incx) noexcept nogil
+cdef void srot(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) noexcept nogil
+cdef void srotg(s *sa, s *sb, s *c, s *s) noexcept nogil
+cdef void srotm(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) noexcept nogil
+cdef void srotmg(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) noexcept nogil
+cdef void ssbmv(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil
+cdef void sscal(int *n, s *sa, s *sx, int *incx) noexcept nogil
+cdef void sspmv(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil
+cdef void sspr(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) noexcept nogil
+cdef void sspr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) noexcept nogil
+cdef void sswap(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil
+cdef void ssymm(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil
+cdef void ssymv(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil
+cdef void ssyr(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) noexcept nogil
+cdef void ssyr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil
+cdef void ssyr2k(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil
+cdef void ssyrk(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) noexcept nogil
+cdef void stbmv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil
+cdef void stbsv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil
+cdef void stpmv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil
+cdef void stpsv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil
+cdef void strmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil
+cdef void strmv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil
+cdef void strsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil
+cdef void strsv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil
+cdef void zaxpy(int *n, z *za, z *zx, int *incx, z *zy, int *incy) noexcept nogil
+cdef void zcopy(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil
+cdef z zdotc(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil
+cdef z zdotu(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil
+cdef void zdrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, d *s) noexcept nogil
+cdef void zdscal(int *n, d *da, z *zx, int *incx) noexcept nogil
+cdef void zgbmv(char *trans, int *m, int *n, int *kl, int *ku, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zgemm(char *transa, char *transb, int *m, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil
+cdef void zgemv(char *trans, int *m, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zgerc(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil
+cdef void zgeru(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil
+cdef void zhbmv(char *uplo, int *n, int *k, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zhemm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil
+cdef void zhemv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zher(char *uplo, int *n, d *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil
+cdef void zher2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil
+cdef void zher2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, d *beta, z *c, int *ldc) noexcept nogil
+cdef void zherk(char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c, int *ldc) noexcept nogil
+cdef void zhpmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zhpr(char *uplo, int *n, d *alpha, z *x, int *incx, z *ap) noexcept nogil
+cdef void zhpr2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *ap) noexcept nogil
+cdef void zrotg(z *ca, z *cb, d *c, z *s) noexcept nogil
+cdef void zscal(int *n, z *za, z *zx, int *incx) noexcept nogil
+cdef void zswap(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil
+cdef void zsymm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil
+cdef void zsyr2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil
+cdef void zsyrk(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *beta, z *c, int *ldc) noexcept nogil
+cdef void ztbmv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil
+cdef void ztbsv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil
+cdef void ztpmv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil
+cdef void ztpsv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil
+cdef void ztrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil
+cdef void ztrmv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil
+cdef void ztrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil
+cdef void ztrsv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..35286fe11d72226269c0e459d9a3109151f74a4a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_blas.pyx
@@ -0,0 +1,1432 @@
+# This file was generated by _generate_pyx.py.
+# Do not edit this file directly.
+# cython: boundscheck = False
+# cython: wraparound = False
+# cython: cdivision = True
+
+"""
+BLAS Functions for Cython
+=========================
+
+Usable from Cython via::
+
+    cimport scipy.linalg.cython_blas
+
+These wrappers do not check for alignment of arrays.
+Alignment should be checked before these wrappers are used.
+
+If using ``cdotu``, ``cdotc``, ``zdotu``, ``zdotc``, ``sladiv``, or ``dladiv``,
+the ``CYTHON_CCOMPLEX`` define must be set to 0 during compilation. For
+example, in a ``meson.build`` file when using Meson::
+
+    py.extension_module('ext_module'
+        'ext_module.pyx',
+        c_args: ['-DCYTHON_CCOMPLEX=0'],
+        ...
+    )
+
+Raw function pointers (Fortran-style pointer arguments):
+
+- caxpy
+- ccopy
+- cdotc
+- cdotu
+- cgbmv
+- cgemm
+- cgemv
+- cgerc
+- cgeru
+- chbmv
+- chemm
+- chemv
+- cher
+- cher2
+- cher2k
+- cherk
+- chpmv
+- chpr
+- chpr2
+- crotg
+- cscal
+- csrot
+- csscal
+- cswap
+- csymm
+- csyr2k
+- csyrk
+- ctbmv
+- ctbsv
+- ctpmv
+- ctpsv
+- ctrmm
+- ctrmv
+- ctrsm
+- ctrsv
+- dasum
+- daxpy
+- dcabs1
+- dcopy
+- ddot
+- dgbmv
+- dgemm
+- dgemv
+- dger
+- dnrm2
+- drot
+- drotg
+- drotm
+- drotmg
+- dsbmv
+- dscal
+- dsdot
+- dspmv
+- dspr
+- dspr2
+- dswap
+- dsymm
+- dsymv
+- dsyr
+- dsyr2
+- dsyr2k
+- dsyrk
+- dtbmv
+- dtbsv
+- dtpmv
+- dtpsv
+- dtrmm
+- dtrmv
+- dtrsm
+- dtrsv
+- dzasum
+- dznrm2
+- icamax
+- idamax
+- isamax
+- izamax
+- lsame
+- sasum
+- saxpy
+- scasum
+- scnrm2
+- scopy
+- sdot
+- sdsdot
+- sgbmv
+- sgemm
+- sgemv
+- sger
+- snrm2
+- srot
+- srotg
+- srotm
+- srotmg
+- ssbmv
+- sscal
+- sspmv
+- sspr
+- sspr2
+- sswap
+- ssymm
+- ssymv
+- ssyr
+- ssyr2
+- ssyr2k
+- ssyrk
+- stbmv
+- stbsv
+- stpmv
+- stpsv
+- strmm
+- strmv
+- strsm
+- strsv
+- zaxpy
+- zcopy
+- zdotc
+- zdotu
+- zdrot
+- zdscal
+- zgbmv
+- zgemm
+- zgemv
+- zgerc
+- zgeru
+- zhbmv
+- zhemm
+- zhemv
+- zher
+- zher2
+- zher2k
+- zherk
+- zhpmv
+- zhpr
+- zhpr2
+- zrotg
+- zscal
+- zswap
+- zsymm
+- zsyr2k
+- zsyrk
+- ztbmv
+- ztbsv
+- ztpmv
+- ztpsv
+- ztrmm
+- ztrmv
+- ztrsm
+- ztrsv
+
+
+"""
+
+# Within SciPy, these wrappers can be used via relative or absolute cimport.
+# Examples:
+# from ..linalg cimport cython_blas
+# from scipy.linalg cimport cython_blas
+# cimport scipy.linalg.cython_blas as cython_blas
+# cimport ..linalg.cython_blas as cython_blas
+
+# Within SciPy, if BLAS functions are needed in C/C++/Fortran,
+# these wrappers should not be used.
+# The original libraries should be linked directly.
+
+cdef extern from "fortran_defs.h":
+    pass
+
+from numpy cimport npy_complex64, npy_complex128
+
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_caxpy "BLAS_FUNC(caxpy)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
+cdef void caxpy(int *n, c *ca, c *cx, int *incx, c *cy, int *incy) noexcept nogil:
+    
+    _fortran_caxpy(n, ca, cx, incx, cy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ccopy "BLAS_FUNC(ccopy)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
+cdef void ccopy(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil:
+    
+    _fortran_ccopy(n, cx, incx, cy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cdotc "F_FUNC(cdotcwrp,CDOTCWRP)"(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
+cdef c cdotc(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil:
+    cdef c out
+    _fortran_cdotc(&out, n, cx, incx, cy, incy)
+    return out
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cdotu "F_FUNC(cdotuwrp,CDOTUWRP)"(npy_complex64 *out, int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
+cdef c cdotu(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil:
+    cdef c out
+    _fortran_cdotu(&out, n, cx, incx, cy, incy)
+    return out
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cgbmv "BLAS_FUNC(cgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void cgbmv(char *trans, int *m, int *n, int *kl, int *ku, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cgemm "BLAS_FUNC(cgemm)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
+cdef void cgemm(char *transa, char *transb, int *m, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cgemv "BLAS_FUNC(cgemv)"(char *trans, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void cgemv(char *trans, int *m, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cgerc "BLAS_FUNC(cgerc)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
+cdef void cgerc(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil:
+    
+    _fortran_cgerc(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cgeru "BLAS_FUNC(cgeru)"(int *m, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
+cdef void cgeru(int *m, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil:
+    
+    _fortran_cgeru(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chbmv "BLAS_FUNC(chbmv)"(char *uplo, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void chbmv(char *uplo, int *n, int *k, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_chbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chemm "BLAS_FUNC(chemm)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
+cdef void chemm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_chemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chemv "BLAS_FUNC(chemv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void chemv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_chemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cher "BLAS_FUNC(cher)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda) nogil
+cdef void cher(char *uplo, int *n, s *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil:
+    
+    _fortran_cher(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cher2 "BLAS_FUNC(cher2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *a, int *lda) nogil
+cdef void cher2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *a, int *lda) noexcept nogil:
+    
+    _fortran_cher2(uplo, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cher2k "BLAS_FUNC(cher2k)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *beta, npy_complex64 *c, int *ldc) nogil
+cdef void cher2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, s *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cherk "BLAS_FUNC(cherk)"(char *uplo, char *trans, int *n, int *k, s *alpha, npy_complex64 *a, int *lda, s *beta, npy_complex64 *c, int *ldc) nogil
+cdef void cherk(char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_cherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chpmv "BLAS_FUNC(chpmv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void chpmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_chpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chpr "BLAS_FUNC(chpr)"(char *uplo, int *n, s *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap) nogil
+cdef void chpr(char *uplo, int *n, s *alpha, c *x, int *incx, c *ap) noexcept nogil:
+    
+    _fortran_chpr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_chpr2 "BLAS_FUNC(chpr2)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, npy_complex64 *ap) nogil
+cdef void chpr2(char *uplo, int *n, c *alpha, c *x, int *incx, c *y, int *incy, c *ap) noexcept nogil:
+    
+    _fortran_chpr2(uplo, n, alpha, x, incx, y, incy, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_crotg "BLAS_FUNC(crotg)"(npy_complex64 *ca, npy_complex64 *cb, s *c, npy_complex64 *s) nogil
+cdef void crotg(c *ca, c *cb, s *c, c *s) noexcept nogil:
+    
+    _fortran_crotg(ca, cb, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cscal "BLAS_FUNC(cscal)"(int *n, npy_complex64 *ca, npy_complex64 *cx, int *incx) nogil
+cdef void cscal(int *n, c *ca, c *cx, int *incx) noexcept nogil:
+    
+    _fortran_cscal(n, ca, cx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_csrot "BLAS_FUNC(csrot)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, s *c, s *s) nogil
+cdef void csrot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, s *s) noexcept nogil:
+    
+    _fortran_csrot(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_csscal "BLAS_FUNC(csscal)"(int *n, s *sa, npy_complex64 *cx, int *incx) nogil
+cdef void csscal(int *n, s *sa, c *cx, int *incx) noexcept nogil:
+    
+    _fortran_csscal(n, sa, cx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_cswap "BLAS_FUNC(cswap)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy) nogil
+cdef void cswap(int *n, c *cx, int *incx, c *cy, int *incy) noexcept nogil:
+    
+    _fortran_cswap(n, cx, incx, cy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_csymm "BLAS_FUNC(csymm)"(char *side, char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
+cdef void csymm(char *side, char *uplo, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_csymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_csyr2k "BLAS_FUNC(csyr2k)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
+cdef void csyr2k(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *b, int *ldb, c *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_csyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_csyrk "BLAS_FUNC(csyrk)"(char *uplo, char *trans, int *n, int *k, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *beta, npy_complex64 *c, int *ldc) nogil
+cdef void csyrk(char *uplo, char *trans, int *n, int *k, c *alpha, c *a, int *lda, c *beta, c *c, int *ldc) noexcept nogil:
+    
+    _fortran_csyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctbmv "BLAS_FUNC(ctbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
+cdef void ctbmv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctbmv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctbsv "BLAS_FUNC(ctbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
+cdef void ctbsv(char *uplo, char *trans, char *diag, int *n, int *k, c *a, int *lda, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctbsv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctpmv "BLAS_FUNC(ctpmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil
+cdef void ctpmv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctpmv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctpsv "BLAS_FUNC(ctpsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *ap, npy_complex64 *x, int *incx) nogil
+cdef void ctpsv(char *uplo, char *trans, char *diag, int *n, c *ap, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctpsv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctrmm "BLAS_FUNC(ctrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil
+cdef void ctrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctrmv "BLAS_FUNC(ctrmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
+cdef void ctrmv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctrmv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctrsm "BLAS_FUNC(ctrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil
+cdef void ctrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, c *alpha, c *a, int *lda, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ctrsv "BLAS_FUNC(ctrsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx) nogil
+cdef void ctrsv(char *uplo, char *trans, char *diag, int *n, c *a, int *lda, c *x, int *incx) noexcept nogil:
+    
+    _fortran_ctrsv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dasum "BLAS_FUNC(dasum)"(int *n, d *dx, int *incx) nogil
+cdef d dasum(int *n, d *dx, int *incx) noexcept nogil:
+    
+    return _fortran_dasum(n, dx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_daxpy "BLAS_FUNC(daxpy)"(int *n, d *da, d *dx, int *incx, d *dy, int *incy) nogil
+cdef void daxpy(int *n, d *da, d *dx, int *incx, d *dy, int *incy) noexcept nogil:
+    
+    _fortran_daxpy(n, da, dx, incx, dy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dcabs1 "BLAS_FUNC(dcabs1)"(npy_complex128 *z) nogil
+cdef d dcabs1(z *z) noexcept nogil:
+    
+    return _fortran_dcabs1(z)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dcopy "BLAS_FUNC(dcopy)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil
+cdef void dcopy(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil:
+    
+    _fortran_dcopy(n, dx, incx, dy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_ddot "BLAS_FUNC(ddot)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil
+cdef d ddot(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil:
+    
+    return _fortran_ddot(n, dx, incx, dy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dgbmv "BLAS_FUNC(dgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
+cdef void dgbmv(char *trans, int *m, int *n, int *kl, int *ku, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil:
+    
+    _fortran_dgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dgemm "BLAS_FUNC(dgemm)"(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
+cdef void dgemm(char *transa, char *transb, int *m, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil:
+    
+    _fortran_dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dgemv "BLAS_FUNC(dgemv)"(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
+cdef void dgemv(char *trans, int *m, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil:
+    
+    _fortran_dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dger "BLAS_FUNC(dger)"(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil
+cdef void dger(int *m, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil:
+    
+    _fortran_dger(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dnrm2 "BLAS_FUNC(dnrm2)"(int *n, d *x, int *incx) nogil
+cdef d dnrm2(int *n, d *x, int *incx) noexcept nogil:
+    
+    return _fortran_dnrm2(n, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_drot "BLAS_FUNC(drot)"(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) nogil
+cdef void drot(int *n, d *dx, int *incx, d *dy, int *incy, d *c, d *s) noexcept nogil:
+    
+    _fortran_drot(n, dx, incx, dy, incy, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_drotg "BLAS_FUNC(drotg)"(d *da, d *db, d *c, d *s) nogil
+cdef void drotg(d *da, d *db, d *c, d *s) noexcept nogil:
+    
+    _fortran_drotg(da, db, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_drotm "BLAS_FUNC(drotm)"(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) nogil
+cdef void drotm(int *n, d *dx, int *incx, d *dy, int *incy, d *dparam) noexcept nogil:
+    
+    _fortran_drotm(n, dx, incx, dy, incy, dparam)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_drotmg "BLAS_FUNC(drotmg)"(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) nogil
+cdef void drotmg(d *dd1, d *dd2, d *dx1, d *dy1, d *dparam) noexcept nogil:
+    
+    _fortran_drotmg(dd1, dd2, dx1, dy1, dparam)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsbmv "BLAS_FUNC(dsbmv)"(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
+cdef void dsbmv(char *uplo, int *n, int *k, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil:
+    
+    _fortran_dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dscal "BLAS_FUNC(dscal)"(int *n, d *da, d *dx, int *incx) nogil
+cdef void dscal(int *n, d *da, d *dx, int *incx) noexcept nogil:
+    
+    _fortran_dscal(n, da, dx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dsdot "BLAS_FUNC(dsdot)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
+cdef d dsdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    return _fortran_dsdot(n, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dspmv "BLAS_FUNC(dspmv)"(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) nogil
+cdef void dspmv(char *uplo, int *n, d *alpha, d *ap, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil:
+    
+    _fortran_dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dspr "BLAS_FUNC(dspr)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) nogil
+cdef void dspr(char *uplo, int *n, d *alpha, d *x, int *incx, d *ap) noexcept nogil:
+    
+    _fortran_dspr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dspr2 "BLAS_FUNC(dspr2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) nogil
+cdef void dspr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *ap) noexcept nogil:
+    
+    _fortran_dspr2(uplo, n, alpha, x, incx, y, incy, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dswap "BLAS_FUNC(dswap)"(int *n, d *dx, int *incx, d *dy, int *incy) nogil
+cdef void dswap(int *n, d *dx, int *incx, d *dy, int *incy) noexcept nogil:
+    
+    _fortran_dswap(n, dx, incx, dy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsymm "BLAS_FUNC(dsymm)"(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
+cdef void dsymm(char *side, char *uplo, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil:
+    
+    _fortran_dsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsymv "BLAS_FUNC(dsymv)"(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) nogil
+cdef void dsymv(char *uplo, int *n, d *alpha, d *a, int *lda, d *x, int *incx, d *beta, d *y, int *incy) noexcept nogil:
+    
+    _fortran_dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsyr "BLAS_FUNC(dsyr)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) nogil
+cdef void dsyr(char *uplo, int *n, d *alpha, d *x, int *incx, d *a, int *lda) noexcept nogil:
+    
+    _fortran_dsyr(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsyr2 "BLAS_FUNC(dsyr2)"(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) nogil
+cdef void dsyr2(char *uplo, int *n, d *alpha, d *x, int *incx, d *y, int *incy, d *a, int *lda) noexcept nogil:
+    
+    _fortran_dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsyr2k "BLAS_FUNC(dsyr2k)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) nogil
+cdef void dsyr2k(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *b, int *ldb, d *beta, d *c, int *ldc) noexcept nogil:
+    
+    _fortran_dsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dsyrk "BLAS_FUNC(dsyrk)"(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) nogil
+cdef void dsyrk(char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c, int *ldc) noexcept nogil:
+    
+    _fortran_dsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtbmv "BLAS_FUNC(dtbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil
+cdef void dtbmv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtbmv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtbsv "BLAS_FUNC(dtbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) nogil
+cdef void dtbsv(char *uplo, char *trans, char *diag, int *n, int *k, d *a, int *lda, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtbsv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtpmv "BLAS_FUNC(dtpmv)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil
+cdef void dtpmv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtpmv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtpsv "BLAS_FUNC(dtpsv)"(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) nogil
+cdef void dtpsv(char *uplo, char *trans, char *diag, int *n, d *ap, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtpsv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtrmm "BLAS_FUNC(dtrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil
+cdef void dtrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dtrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtrmv "BLAS_FUNC(dtrmv)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil
+cdef void dtrmv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtrmv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtrsm "BLAS_FUNC(dtrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) nogil
+cdef void dtrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, d *alpha, d *a, int *lda, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_dtrsv "BLAS_FUNC(dtrsv)"(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) nogil
+cdef void dtrsv(char *uplo, char *trans, char *diag, int *n, d *a, int *lda, d *x, int *incx) noexcept nogil:
+    
+    _fortran_dtrsv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dzasum "BLAS_FUNC(dzasum)"(int *n, npy_complex128 *zx, int *incx) nogil
+cdef d dzasum(int *n, z *zx, int *incx) noexcept nogil:
+    
+    return _fortran_dzasum(n, zx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    d _fortran_dznrm2 "BLAS_FUNC(dznrm2)"(int *n, npy_complex128 *x, int *incx) nogil
+cdef d dznrm2(int *n, z *x, int *incx) noexcept nogil:
+    
+    return _fortran_dznrm2(n, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    int _fortran_icamax "BLAS_FUNC(icamax)"(int *n, npy_complex64 *cx, int *incx) nogil
+cdef int icamax(int *n, c *cx, int *incx) noexcept nogil:
+    
+    return _fortran_icamax(n, cx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    int _fortran_idamax "BLAS_FUNC(idamax)"(int *n, d *dx, int *incx) nogil
+cdef int idamax(int *n, d *dx, int *incx) noexcept nogil:
+    
+    return _fortran_idamax(n, dx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    int _fortran_isamax "BLAS_FUNC(isamax)"(int *n, s *sx, int *incx) nogil
+cdef int isamax(int *n, s *sx, int *incx) noexcept nogil:
+    
+    return _fortran_isamax(n, sx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    int _fortran_izamax "BLAS_FUNC(izamax)"(int *n, npy_complex128 *zx, int *incx) nogil
+cdef int izamax(int *n, z *zx, int *incx) noexcept nogil:
+    
+    return _fortran_izamax(n, zx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    bint _fortran_lsame "BLAS_FUNC(lsame)"(char *ca, char *cb) nogil
+cdef bint lsame(char *ca, char *cb) noexcept nogil:
+    
+    return _fortran_lsame(ca, cb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_sasum "BLAS_FUNC(sasum)"(int *n, s *sx, int *incx) nogil
+cdef s sasum(int *n, s *sx, int *incx) noexcept nogil:
+    
+    return _fortran_sasum(n, sx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_saxpy "BLAS_FUNC(saxpy)"(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) nogil
+cdef void saxpy(int *n, s *sa, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    _fortran_saxpy(n, sa, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_scasum "BLAS_FUNC(scasum)"(int *n, npy_complex64 *cx, int *incx) nogil
+cdef s scasum(int *n, c *cx, int *incx) noexcept nogil:
+    
+    return _fortran_scasum(n, cx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_scnrm2 "BLAS_FUNC(scnrm2)"(int *n, npy_complex64 *x, int *incx) nogil
+cdef s scnrm2(int *n, c *x, int *incx) noexcept nogil:
+    
+    return _fortran_scnrm2(n, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_scopy "BLAS_FUNC(scopy)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
+cdef void scopy(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    _fortran_scopy(n, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_sdot "BLAS_FUNC(sdot)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
+cdef s sdot(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    return _fortran_sdot(n, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_sdsdot "BLAS_FUNC(sdsdot)"(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) nogil
+cdef s sdsdot(int *n, s *sb, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    return _fortran_sdsdot(n, sb, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sgbmv "BLAS_FUNC(sgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
+cdef void sgbmv(char *trans, int *m, int *n, int *kl, int *ku, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil:
+    
+    _fortran_sgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sgemm "BLAS_FUNC(sgemm)"(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
+cdef void sgemm(char *transa, char *transb, int *m, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil:
+    
+    _fortran_sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sgemv "BLAS_FUNC(sgemv)"(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
+cdef void sgemv(char *trans, int *m, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil:
+    
+    _fortran_sgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sger "BLAS_FUNC(sger)"(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil
+cdef void sger(int *m, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil:
+    
+    _fortran_sger(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    s _fortran_snrm2 "BLAS_FUNC(snrm2)"(int *n, s *x, int *incx) nogil
+cdef s snrm2(int *n, s *x, int *incx) noexcept nogil:
+    
+    return _fortran_snrm2(n, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_srot "BLAS_FUNC(srot)"(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) nogil
+cdef void srot(int *n, s *sx, int *incx, s *sy, int *incy, s *c, s *s) noexcept nogil:
+    
+    _fortran_srot(n, sx, incx, sy, incy, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_srotg "BLAS_FUNC(srotg)"(s *sa, s *sb, s *c, s *s) nogil
+cdef void srotg(s *sa, s *sb, s *c, s *s) noexcept nogil:
+    
+    _fortran_srotg(sa, sb, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_srotm "BLAS_FUNC(srotm)"(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) nogil
+cdef void srotm(int *n, s *sx, int *incx, s *sy, int *incy, s *sparam) noexcept nogil:
+    
+    _fortran_srotm(n, sx, incx, sy, incy, sparam)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_srotmg "BLAS_FUNC(srotmg)"(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) nogil
+cdef void srotmg(s *sd1, s *sd2, s *sx1, s *sy1, s *sparam) noexcept nogil:
+    
+    _fortran_srotmg(sd1, sd2, sx1, sy1, sparam)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssbmv "BLAS_FUNC(ssbmv)"(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
+cdef void ssbmv(char *uplo, int *n, int *k, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil:
+    
+    _fortran_ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sscal "BLAS_FUNC(sscal)"(int *n, s *sa, s *sx, int *incx) nogil
+cdef void sscal(int *n, s *sa, s *sx, int *incx) noexcept nogil:
+    
+    _fortran_sscal(n, sa, sx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sspmv "BLAS_FUNC(sspmv)"(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) nogil
+cdef void sspmv(char *uplo, int *n, s *alpha, s *ap, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil:
+    
+    _fortran_sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sspr "BLAS_FUNC(sspr)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) nogil
+cdef void sspr(char *uplo, int *n, s *alpha, s *x, int *incx, s *ap) noexcept nogil:
+    
+    _fortran_sspr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sspr2 "BLAS_FUNC(sspr2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) nogil
+cdef void sspr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *ap) noexcept nogil:
+    
+    _fortran_sspr2(uplo, n, alpha, x, incx, y, incy, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_sswap "BLAS_FUNC(sswap)"(int *n, s *sx, int *incx, s *sy, int *incy) nogil
+cdef void sswap(int *n, s *sx, int *incx, s *sy, int *incy) noexcept nogil:
+    
+    _fortran_sswap(n, sx, incx, sy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssymm "BLAS_FUNC(ssymm)"(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
+cdef void ssymm(char *side, char *uplo, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil:
+    
+    _fortran_ssymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssymv "BLAS_FUNC(ssymv)"(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) nogil
+cdef void ssymv(char *uplo, int *n, s *alpha, s *a, int *lda, s *x, int *incx, s *beta, s *y, int *incy) noexcept nogil:
+    
+    _fortran_ssymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssyr "BLAS_FUNC(ssyr)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) nogil
+cdef void ssyr(char *uplo, int *n, s *alpha, s *x, int *incx, s *a, int *lda) noexcept nogil:
+    
+    _fortran_ssyr(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssyr2 "BLAS_FUNC(ssyr2)"(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) nogil
+cdef void ssyr2(char *uplo, int *n, s *alpha, s *x, int *incx, s *y, int *incy, s *a, int *lda) noexcept nogil:
+    
+    _fortran_ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssyr2k "BLAS_FUNC(ssyr2k)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) nogil
+cdef void ssyr2k(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *b, int *ldb, s *beta, s *c, int *ldc) noexcept nogil:
+    
+    _fortran_ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ssyrk "BLAS_FUNC(ssyrk)"(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) nogil
+cdef void ssyrk(char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c, int *ldc) noexcept nogil:
+    
+    _fortran_ssyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_stbmv "BLAS_FUNC(stbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil
+cdef void stbmv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil:
+    
+    _fortran_stbmv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_stbsv "BLAS_FUNC(stbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) nogil
+cdef void stbsv(char *uplo, char *trans, char *diag, int *n, int *k, s *a, int *lda, s *x, int *incx) noexcept nogil:
+    
+    _fortran_stbsv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_stpmv "BLAS_FUNC(stpmv)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil
+cdef void stpmv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil:
+    
+    _fortran_stpmv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_stpsv "BLAS_FUNC(stpsv)"(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) nogil
+cdef void stpsv(char *uplo, char *trans, char *diag, int *n, s *ap, s *x, int *incx) noexcept nogil:
+    
+    _fortran_stpsv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_strmm "BLAS_FUNC(strmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil
+cdef void strmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_strmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_strmv "BLAS_FUNC(strmv)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil
+cdef void strmv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil:
+    
+    _fortran_strmv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_strsm "BLAS_FUNC(strsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) nogil
+cdef void strsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, s *alpha, s *a, int *lda, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_strsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_strsv "BLAS_FUNC(strsv)"(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) nogil
+cdef void strsv(char *uplo, char *trans, char *diag, int *n, s *a, int *lda, s *x, int *incx) noexcept nogil:
+    
+    _fortran_strsv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zaxpy "BLAS_FUNC(zaxpy)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
+cdef void zaxpy(int *n, z *za, z *zx, int *incx, z *zy, int *incy) noexcept nogil:
+    
+    _fortran_zaxpy(n, za, zx, incx, zy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zcopy "BLAS_FUNC(zcopy)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
+cdef void zcopy(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil:
+    
+    _fortran_zcopy(n, zx, incx, zy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zdotc "F_FUNC(zdotcwrp,ZDOTCWRP)"(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
+cdef z zdotc(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil:
+    cdef z out
+    _fortran_zdotc(&out, n, zx, incx, zy, incy)
+    return out
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zdotu "F_FUNC(zdotuwrp,ZDOTUWRP)"(npy_complex128 *out, int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
+cdef z zdotu(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil:
+    cdef z out
+    _fortran_zdotu(&out, n, zx, incx, zy, incy)
+    return out
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zdrot "BLAS_FUNC(zdrot)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, d *c, d *s) nogil
+cdef void zdrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, d *s) noexcept nogil:
+    
+    _fortran_zdrot(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zdscal "BLAS_FUNC(zdscal)"(int *n, d *da, npy_complex128 *zx, int *incx) nogil
+cdef void zdscal(int *n, d *da, z *zx, int *incx) noexcept nogil:
+    
+    _fortran_zdscal(n, da, zx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zgbmv "BLAS_FUNC(zgbmv)"(char *trans, int *m, int *n, int *kl, int *ku, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zgbmv(char *trans, int *m, int *n, int *kl, int *ku, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zgemm "BLAS_FUNC(zgemm)"(char *transa, char *transb, int *m, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zgemm(char *transa, char *transb, int *m, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zgemv "BLAS_FUNC(zgemv)"(char *trans, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zgemv(char *trans, int *m, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zgerc "BLAS_FUNC(zgerc)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
+cdef void zgerc(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zgerc(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zgeru "BLAS_FUNC(zgeru)"(int *m, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
+cdef void zgeru(int *m, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zgeru(m, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhbmv "BLAS_FUNC(zhbmv)"(char *uplo, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zhbmv(char *uplo, int *n, int *k, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zhbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhemm "BLAS_FUNC(zhemm)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zhemm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zhemm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhemv "BLAS_FUNC(zhemv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zhemv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zhemv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zher "BLAS_FUNC(zher)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda) nogil
+cdef void zher(char *uplo, int *n, d *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zher(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zher2 "BLAS_FUNC(zher2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *a, int *lda) nogil
+cdef void zher2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zher2(uplo, n, alpha, x, incx, y, incy, a, lda)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zher2k "BLAS_FUNC(zher2k)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zher2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, d *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zherk "BLAS_FUNC(zherk)"(char *uplo, char *trans, int *n, int *k, d *alpha, npy_complex128 *a, int *lda, d *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zherk(char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zherk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhpmv "BLAS_FUNC(zhpmv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zhpmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhpr "BLAS_FUNC(zhpr)"(char *uplo, int *n, d *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap) nogil
+cdef void zhpr(char *uplo, int *n, d *alpha, z *x, int *incx, z *ap) noexcept nogil:
+    
+    _fortran_zhpr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zhpr2 "BLAS_FUNC(zhpr2)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, npy_complex128 *ap) nogil
+cdef void zhpr2(char *uplo, int *n, z *alpha, z *x, int *incx, z *y, int *incy, z *ap) noexcept nogil:
+    
+    _fortran_zhpr2(uplo, n, alpha, x, incx, y, incy, ap)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zrotg "BLAS_FUNC(zrotg)"(npy_complex128 *ca, npy_complex128 *cb, d *c, npy_complex128 *s) nogil
+cdef void zrotg(z *ca, z *cb, d *c, z *s) noexcept nogil:
+    
+    _fortran_zrotg(ca, cb, c, s)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zscal "BLAS_FUNC(zscal)"(int *n, npy_complex128 *za, npy_complex128 *zx, int *incx) nogil
+cdef void zscal(int *n, z *za, z *zx, int *incx) noexcept nogil:
+    
+    _fortran_zscal(n, za, zx, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zswap "BLAS_FUNC(zswap)"(int *n, npy_complex128 *zx, int *incx, npy_complex128 *zy, int *incy) nogil
+cdef void zswap(int *n, z *zx, int *incx, z *zy, int *incy) noexcept nogil:
+    
+    _fortran_zswap(n, zx, incx, zy, incy)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zsymm "BLAS_FUNC(zsymm)"(char *side, char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zsymm(char *side, char *uplo, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zsymm(side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zsyr2k "BLAS_FUNC(zsyr2k)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zsyr2k(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *b, int *ldb, z *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zsyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_zsyrk "BLAS_FUNC(zsyrk)"(char *uplo, char *trans, int *n, int *k, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *beta, npy_complex128 *c, int *ldc) nogil
+cdef void zsyrk(char *uplo, char *trans, int *n, int *k, z *alpha, z *a, int *lda, z *beta, z *c, int *ldc) noexcept nogil:
+    
+    _fortran_zsyrk(uplo, trans, n, k, alpha, a, lda, beta, c, ldc)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztbmv "BLAS_FUNC(ztbmv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
+cdef void ztbmv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztbmv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztbsv "BLAS_FUNC(ztbsv)"(char *uplo, char *trans, char *diag, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
+cdef void ztbsv(char *uplo, char *trans, char *diag, int *n, int *k, z *a, int *lda, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztbsv(uplo, trans, diag, n, k, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztpmv "BLAS_FUNC(ztpmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil
+cdef void ztpmv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztpmv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztpsv "BLAS_FUNC(ztpsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *ap, npy_complex128 *x, int *incx) nogil
+cdef void ztpsv(char *uplo, char *trans, char *diag, int *n, z *ap, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztpsv(uplo, trans, diag, n, ap, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztrmm "BLAS_FUNC(ztrmm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil
+cdef void ztrmm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztrmv "BLAS_FUNC(ztrmv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
+cdef void ztrmv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztrmv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztrsm "BLAS_FUNC(ztrsm)"(char *side, char *uplo, char *transa, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil
+cdef void ztrsm(char *side, char *uplo, char *transa, char *diag, int *m, int *n, z *alpha, z *a, int *lda, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
+    
+
+cdef extern from "_blas_subroutines.h":
+    void _fortran_ztrsv "BLAS_FUNC(ztrsv)"(char *uplo, char *trans, char *diag, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx) nogil
+cdef void ztrsv(char *uplo, char *trans, char *diag, int *n, z *a, int *lda, z *x, int *incx) noexcept nogil:
+    
+    _fortran_ztrsv(uplo, trans, diag, n, a, lda, x, incx)
+    
+
+
+# Python-accessible wrappers for testing:
+
+cdef inline bint _is_contiguous(double[:,:] a, int axis) noexcept nogil:
+    return (a.strides[axis] == sizeof(a[0,0]) or a.shape[axis] == 1)
+
+cpdef float complex _test_cdotc(float complex[:] cx, float complex[:] cy) noexcept nogil:
+    cdef:
+        int n = cx.shape[0]
+        int incx = cx.strides[0] // sizeof(cx[0])
+        int incy = cy.strides[0] // sizeof(cy[0])
+    return cdotc(&n, &cx[0], &incx, &cy[0], &incy)
+
+cpdef float complex _test_cdotu(float complex[:] cx, float complex[:] cy) noexcept nogil:
+    cdef:
+        int n = cx.shape[0]
+        int incx = cx.strides[0] // sizeof(cx[0])
+        int incy = cy.strides[0] // sizeof(cy[0])
+    return cdotu(&n, &cx[0], &incx, &cy[0], &incy)
+
+cpdef double _test_dasum(double[:] dx) noexcept nogil:
+    cdef:
+        int n = dx.shape[0]
+        int incx = dx.strides[0] // sizeof(dx[0])
+    return dasum(&n, &dx[0], &incx)
+
+cpdef double _test_ddot(double[:] dx, double[:] dy) noexcept nogil:
+    cdef:
+        int n = dx.shape[0]
+        int incx = dx.strides[0] // sizeof(dx[0])
+        int incy = dy.strides[0] // sizeof(dy[0])
+    return ddot(&n, &dx[0], &incx, &dy[0], &incy)
+
+cpdef int _test_dgemm(double alpha, double[:,:] a, double[:,:] b, double beta,
+                double[:,:] c) except -1 nogil:
+    cdef:
+        char *transa
+        char *transb
+        int m, n, k, lda, ldb, ldc
+        double *a0=&a[0,0]
+        double *b0=&b[0,0]
+        double *c0=&c[0,0]
+    # In the case that c is C contiguous, swap a and b and
+    # swap whether or not each of them is transposed.
+    # This can be done because a.dot(b) = b.T.dot(a.T).T.
+    if _is_contiguous(c, 1):
+        if _is_contiguous(a, 1):
+            transb = 'n'
+            ldb = (&a[1,0]) - a0 if a.shape[0] > 1 else 1
+        elif _is_contiguous(a, 0):
+            transb = 't'
+            ldb = (&a[0,1]) - a0 if a.shape[1] > 1 else 1
+        else:
+            with gil:
+                raise ValueError("Input 'a' is neither C nor Fortran contiguous.")
+        if _is_contiguous(b, 1):
+            transa = 'n'
+            lda = (&b[1,0]) - b0 if b.shape[0] > 1 else 1
+        elif _is_contiguous(b, 0):
+            transa = 't'
+            lda = (&b[0,1]) - b0 if b.shape[1] > 1 else 1
+        else:
+            with gil:
+                raise ValueError("Input 'b' is neither C nor Fortran contiguous.")
+        k = b.shape[0]
+        if k != a.shape[1]:
+            with gil:
+                raise ValueError("Shape mismatch in input arrays.")
+        m = b.shape[1]
+        n = a.shape[0]
+        if n != c.shape[0] or m != c.shape[1]:
+            with gil:
+                raise ValueError("Output array does not have the correct shape.")
+        ldc = (&c[1,0]) - c0 if c.shape[0] > 1 else 1
+        dgemm(transa, transb, &m, &n, &k, &alpha, b0, &lda, a0,
+                   &ldb, &beta, c0, &ldc)
+    elif _is_contiguous(c, 0):
+        if _is_contiguous(a, 1):
+            transa = 't'
+            lda = (&a[1,0]) - a0 if a.shape[0] > 1 else 1
+        elif _is_contiguous(a, 0):
+            transa = 'n'
+            lda = (&a[0,1]) - a0 if a.shape[1] > 1 else 1
+        else:
+            with gil:
+                raise ValueError("Input 'a' is neither C nor Fortran contiguous.")
+        if _is_contiguous(b, 1):
+            transb = 't'
+            ldb = (&b[1,0]) - b0 if b.shape[0] > 1 else 1
+        elif _is_contiguous(b, 0):
+            transb = 'n'
+            ldb = (&b[0,1]) - b0 if b.shape[1] > 1 else 1
+        else:
+            with gil:
+                raise ValueError("Input 'b' is neither C nor Fortran contiguous.")
+        m = a.shape[0]
+        k = a.shape[1]
+        if k != b.shape[0]:
+            with gil:
+                raise ValueError("Shape mismatch in input arrays.")
+        n = b.shape[1]
+        if m != c.shape[0] or n != c.shape[1]:
+            with gil:
+                raise ValueError("Output array does not have the correct shape.")
+        ldc = (&c[0,1]) - c0 if c.shape[1] > 1 else 1
+        dgemm(transa, transb, &m, &n, &k, &alpha, a0, &lda, b0,
+                   &ldb, &beta, c0, &ldc)
+    else:
+        with gil:
+            raise ValueError("Input 'c' is neither C nor Fortran contiguous.")
+    return 0
+
+cpdef double _test_dnrm2(double[:] x) noexcept nogil:
+    cdef:
+        int n = x.shape[0]
+        int incx = x.strides[0] // sizeof(x[0])
+    return dnrm2(&n, &x[0], &incx)
+
+cpdef double _test_dzasum(double complex[:] zx) noexcept nogil:
+    cdef:
+        int n = zx.shape[0]
+        int incx = zx.strides[0] // sizeof(zx[0])
+    return dzasum(&n, &zx[0], &incx)
+
+cpdef double _test_dznrm2(double complex[:] x) noexcept nogil:
+    cdef:
+        int n = x.shape[0]
+        int incx = x.strides[0] // sizeof(x[0])
+    return dznrm2(&n, &x[0], &incx)
+
+cpdef int _test_icamax(float complex[:] cx) noexcept nogil:
+    cdef:
+        int n = cx.shape[0]
+        int incx = cx.strides[0] // sizeof(cx[0])
+    return icamax(&n, &cx[0], &incx)
+
+cpdef int _test_idamax(double[:] dx) noexcept nogil:
+    cdef:
+        int n = dx.shape[0]
+        int incx = dx.strides[0] // sizeof(dx[0])
+    return idamax(&n, &dx[0], &incx)
+
+cpdef int _test_isamax(float[:] sx) noexcept nogil:
+    cdef:
+        int n = sx.shape[0]
+        int incx = sx.strides[0] // sizeof(sx[0])
+    return isamax(&n, &sx[0], &incx)
+
+cpdef int _test_izamax(double complex[:] zx) noexcept nogil:
+    cdef:
+        int n = zx.shape[0]
+        int incx = zx.strides[0] // sizeof(zx[0])
+    return izamax(&n, &zx[0], &incx)
+
+cpdef float _test_sasum(float[:] sx) noexcept nogil:
+    cdef:
+        int n = sx.shape[0]
+        int incx = sx.strides[0] // sizeof(sx[0])
+    return sasum(&n, &sx[0], &incx)
+
+cpdef float _test_scasum(float complex[:] cx) noexcept nogil:
+    cdef:
+        int n = cx.shape[0]
+        int incx = cx.strides[0] // sizeof(cx[0])
+    return scasum(&n, &cx[0], &incx)
+
+cpdef float _test_scnrm2(float complex[:] x) noexcept nogil:
+    cdef:
+        int n = x.shape[0]
+        int incx = x.strides[0] // sizeof(x[0])
+    return scnrm2(&n, &x[0], &incx)
+
+cpdef float _test_sdot(float[:] sx, float[:] sy) noexcept nogil:
+    cdef:
+        int n = sx.shape[0]
+        int incx = sx.strides[0] // sizeof(sx[0])
+        int incy = sy.strides[0] // sizeof(sy[0])
+    return sdot(&n, &sx[0], &incx, &sy[0], &incy)
+
+cpdef float _test_snrm2(float[:] x) noexcept nogil:
+    cdef:
+        int n = x.shape[0]
+        int incx = x.strides[0] // sizeof(x[0])
+    return snrm2(&n, &x[0], &incx)
+
+cpdef double complex _test_zdotc(double complex[:] zx, double complex[:] zy) noexcept nogil:
+    cdef:
+        int n = zx.shape[0]
+        int incx = zx.strides[0] // sizeof(zx[0])
+        int incy = zy.strides[0] // sizeof(zy[0])
+    return zdotc(&n, &zx[0], &incx, &zy[0], &incy)
+
+cpdef double complex _test_zdotu(double complex[:] zx, double complex[:] zy) noexcept nogil:
+    cdef:
+        int n = zx.shape[0]
+        int incx = zx.strides[0] // sizeof(zx[0])
+        int incy = zy.strides[0] // sizeof(zy[0])
+    return zdotu(&n, &zx[0], &incx, &zy[0], &incy)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..7964c52d766cd1b08bda6411960a29dbeb6bfe2d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pxd
@@ -0,0 +1,1528 @@
+"""
+This file was generated by _generate_pyx.py.
+Do not edit this file directly.
+"""
+
+# Within SciPy, these wrappers can be used via relative or absolute cimport.
+# Examples:
+# from ..linalg cimport cython_lapack
+# from scipy.linalg cimport cython_lapack
+# cimport scipy.linalg.cython_lapack as cython_lapack
+# cimport ..linalg.cython_lapack as cython_lapack
+
+# Within SciPy, if LAPACK functions are needed in C/C++/Fortran,
+# these wrappers should not be used.
+# The original libraries should be linked directly.
+
+ctypedef float s
+ctypedef double d
+ctypedef float complex c
+ctypedef double complex z
+
+# Function pointer type declarations for
+# gees and gges families of functions.
+ctypedef bint cselect1(c*)
+ctypedef bint cselect2(c*, c*)
+ctypedef bint dselect2(d*, d*)
+ctypedef bint dselect3(d*, d*, d*)
+ctypedef bint sselect2(s*, s*)
+ctypedef bint sselect3(s*, s*, s*)
+ctypedef bint zselect1(z*)
+ctypedef bint zselect2(z*, z*)
+
+cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) noexcept nogil
+cdef void cbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, c *vt, int *ldvt, c *u, int *ldu, c *c, int *ldc, s *rwork, int *info) noexcept nogil
+cdef void cgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *pt, int *ldpt, c *c, int *ldc, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgbcon(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgbequ(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void cgbequb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void cgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgbsv(int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgbtf2(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void cgbtrf(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void cgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, c *v, int *ldv, int *info) noexcept nogil
+cdef void cgebal(char *job, int *n, c *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil
+cdef void cgebd2(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *info) noexcept nogil
+cdef void cgebrd(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgecon(char *norm, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgeequ(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void cgeequb(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void cgees(char *jobvs, char *sort, cselect1 *select, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil
+cdef void cgeesx(char *jobvs, char *sort, cselect1 *select, char *sense, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil
+cdef void cgeev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgehd2(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgehrd(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgelq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgelqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgels(char *trans, int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgelsd(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil
+cdef void cgelss(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgelsy(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *jpvt, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cgeql2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgeqlf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgeqp3(int *m, int *n, c *a, int *lda, int *jpvt, c *tau, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgeqr2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgeqr2p(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgeqrf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgeqrfp(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgeqrt(int *m, int *n, int *nb, c *a, int *lda, c *t, int *ldt, c *work, int *info) noexcept nogil
+cdef void cgeqrt2(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil
+cdef void cgeqrt3(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil
+cdef void cgerfs(char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgerq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cgerqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgesc2(int *n, c *a, int *lda, c *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil
+cdef void cgesdd(char *jobz, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil
+cdef void cgesv(int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cgesvd(char *jobu, char *jobvt, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cgesvx(char *fact, char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgetc2(int *n, c *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil
+cdef void cgetf2(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void cgetrf(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void cgetri(int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgetrs(char *trans, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, c *v, int *ldv, int *info) noexcept nogil
+cdef void cggbal(char *job, int *n, c *a, int *lda, c *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil
+cdef void cgges(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil
+cdef void cggesx(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, char *sense, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void cggev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) noexcept nogil
+cdef void cggglm(int *n, int *m, int *p, c *a, int *lda, c *b, int *ldb, c *d, c *x, c *y, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *info) noexcept nogil
+cdef void cgglse(int *m, int *n, int *p, c *a, int *lda, c *b, int *ldb, c *c, c *d, c *x, c *work, int *lwork, int *info) noexcept nogil
+cdef void cggqrf(int *n, int *m, int *p, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil
+cdef void cggrqf(int *m, int *p, int *n, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil
+cdef void cgtcon(char *norm, int *n, c *dl, c *d, c *du, c *du2, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil
+cdef void cgtrfs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgtsv(int *n, int *nrhs, c *dl, c *d, c *du, c *b, int *ldb, int *info) noexcept nogil
+cdef void cgtsvx(char *fact, char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cgttrf(int *n, c *dl, c *d, c *du, c *du2, int *ipiv, int *info) noexcept nogil
+cdef void cgttrs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cgtts2(int *itrans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb) noexcept nogil
+cdef void chbev(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil
+cdef void chbevd(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void chbevx(char *jobz, char *range, char *uplo, int *n, int *kd, c *ab, int *ldab, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void chbgst(char *vect, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *x, int *ldx, c *work, s *rwork, int *info) noexcept nogil
+cdef void chbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil
+cdef void chbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void chbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void chbtrd(char *vect, char *uplo, int *n, int *kd, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *work, int *info) noexcept nogil
+cdef void checon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil
+cdef void cheequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil
+cdef void cheev(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cheevd(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void cheevr(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void cheevx(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void chegs2(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil
+cdef void chegst(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil
+cdef void chegv(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void chegvd(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void chegvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void cherfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void chesv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil
+cdef void chesvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void cheswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void chetd2(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, int *info) noexcept nogil
+cdef void chetf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void chetrd(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void chetrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil
+cdef void chetri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil
+cdef void chetri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil
+cdef void chetri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil
+cdef void chetrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void chetrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil
+cdef void chfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c) noexcept nogil
+cdef void chgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *t, int *ldt, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef char chla_transtype(int *trans) noexcept nogil
+cdef void chpcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil
+cdef void chpev(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil
+cdef void chpevd(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void chpevx(char *jobz, char *range, char *uplo, int *n, c *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void chpgst(int *itype, char *uplo, int *n, c *ap, c *bp, int *info) noexcept nogil
+cdef void chpgv(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil
+cdef void chpgvd(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void chpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *ap, c *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void chprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void chpsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void chpsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void chptrd(char *uplo, int *n, c *ap, s *d, s *e, c *tau, int *info) noexcept nogil
+cdef void chptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil
+cdef void chptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil
+cdef void chptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void chsein(char *side, char *eigsrc, char *initv, bint *select, int *n, c *h, int *ldh, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil
+cdef void chseqr(char *job, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil
+cdef void clabrd(int *m, int *n, int *nb, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *x, int *ldx, c *y, int *ldy) noexcept nogil
+cdef void clacgv(int *n, c *x, int *incx) noexcept nogil
+cdef void clacn2(int *n, c *v, c *x, s *est, int *kase, int *isave) noexcept nogil
+cdef void clacon(int *n, c *v, c *x, s *est, int *kase) noexcept nogil
+cdef void clacp2(char *uplo, int *m, int *n, s *a, int *lda, c *b, int *ldb) noexcept nogil
+cdef void clacpy(char *uplo, int *m, int *n, c *a, int *lda, c *b, int *ldb) noexcept nogil
+cdef void clacrm(int *m, int *n, c *a, int *lda, s *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil
+cdef void clacrt(int *n, c *cx, int *incx, c *cy, int *incy, c *c, c *s) noexcept nogil
+cdef c cladiv(c *x, c *y) noexcept nogil
+cdef void claed0(int *qsiz, int *n, s *d, s *e, c *q, int *ldq, c *qstore, int *ldqs, s *rwork, int *iwork, int *info) noexcept nogil
+cdef void claed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, c *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, c *work, s *rwork, int *iwork, int *info) noexcept nogil
+cdef void claed8(int *k, int *n, int *qsiz, c *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, c *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) noexcept nogil
+cdef void claein(bint *rightv, bint *noinit, int *n, c *h, int *ldh, c *w, c *v, c *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) noexcept nogil
+cdef void claesy(c *a, c *b, c *c, c *rt1, c *rt2, c *evscal, c *cs1, c *sn1) noexcept nogil
+cdef void claev2(c *a, c *b, c *c, s *rt1, s *rt2, s *cs1, c *sn1) noexcept nogil
+cdef void clag2z(int *m, int *n, c *sa, int *ldsa, z *a, int *lda, int *info) noexcept nogil
+cdef void clags2(bint *upper, s *a1, c *a2, s *a3, s *b1, c *b2, s *b3, s *csu, c *snu, s *csv, c *snv, s *csq, c *snq) noexcept nogil
+cdef void clagtm(char *trans, int *n, int *nrhs, s *alpha, c *dl, c *d, c *du, c *x, int *ldx, s *beta, c *b, int *ldb) noexcept nogil
+cdef void clahef(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil
+cdef void clahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, int *info) noexcept nogil
+cdef void clahr2(int *n, int *k, int *nb, c *a, int *lda, c *tau, c *t, int *ldt, c *y, int *ldy) noexcept nogil
+cdef void claic1(int *job, int *j, c *x, s *sest, c *w, c *gamma, s *sestpr, c *s, c *c) noexcept nogil
+cdef void clals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) noexcept nogil
+cdef void clalsa(int *icompq, int *smlsiz, int *n, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) noexcept nogil
+cdef void clalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, c *b, int *ldb, s *rcond, int *rank, c *work, s *rwork, int *iwork, int *info) noexcept nogil
+cdef s clangb(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, s *work) noexcept nogil
+cdef s clange(char *norm, int *m, int *n, c *a, int *lda, s *work) noexcept nogil
+cdef s clangt(char *norm, int *n, c *dl, c *d, c *du) noexcept nogil
+cdef s clanhb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil
+cdef s clanhe(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil
+cdef s clanhf(char *norm, char *transr, char *uplo, int *n, c *a, s *work) noexcept nogil
+cdef s clanhp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil
+cdef s clanhs(char *norm, int *n, c *a, int *lda, s *work) noexcept nogil
+cdef s clanht(char *norm, int *n, s *d, c *e) noexcept nogil
+cdef s clansb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil
+cdef s clansp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil
+cdef s clansy(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil
+cdef s clantb(char *norm, char *uplo, char *diag, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil
+cdef s clantp(char *norm, char *uplo, char *diag, int *n, c *ap, s *work) noexcept nogil
+cdef s clantr(char *norm, char *uplo, char *diag, int *m, int *n, c *a, int *lda, s *work) noexcept nogil
+cdef void clapll(int *n, c *x, int *incx, c *y, int *incy, s *ssmin) noexcept nogil
+cdef void clapmr(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil
+cdef void clapmt(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil
+cdef void claqgb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil
+cdef void claqge(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil
+cdef void claqhb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void claqhe(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void claqhp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void claqp2(int *m, int *n, int *offset, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *work) noexcept nogil
+cdef void claqps(int *m, int *n, int *offset, int *nb, int *kb, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *auxv, c *f, int *ldf) noexcept nogil
+cdef void claqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil
+cdef void claqr1(int *n, c *h, int *ldh, c *s1, c *s2, c *v) noexcept nogil
+cdef void claqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil
+cdef void claqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil
+cdef void claqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil
+cdef void claqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, c *s, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, c *v, int *ldv, c *u, int *ldu, int *nv, c *wv, int *ldwv, int *nh, c *wh, int *ldwh) noexcept nogil
+cdef void claqsb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void claqsp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void claqsy(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void clar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, c *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil
+cdef void clar2v(int *n, c *x, c *y, c *z, int *incx, s *c, c *s, int *incc) noexcept nogil
+cdef void clarcm(int *m, int *n, s *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil
+cdef void clarf(char *side, int *m, int *n, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil
+cdef void clarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil
+cdef void clarfg(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil
+cdef void clarfgp(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil
+cdef void clarft(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil
+cdef void clarfx(char *side, int *m, int *n, c *v, c *tau, c *c, int *ldc, c *work) noexcept nogil
+cdef void clargv(int *n, c *x, int *incx, c *y, int *incy, s *c, int *incc) noexcept nogil
+cdef void clarnv(int *idist, int *iseed, int *n, c *x) noexcept nogil
+cdef void clarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, c *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil
+cdef void clartg(c *f, c *g, s *cs, c *sn, c *r) noexcept nogil
+cdef void clartv(int *n, c *x, int *incx, c *y, int *incy, s *c, c *s, int *incc) noexcept nogil
+cdef void clarz(char *side, int *m, int *n, int *l, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil
+cdef void clarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil
+cdef void clarzt(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil
+cdef void clascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void claset(char *uplo, int *m, int *n, c *alpha, c *beta, c *a, int *lda) noexcept nogil
+cdef void clasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, c *a, int *lda) noexcept nogil
+cdef void classq(int *n, c *x, int *incx, s *scale, s *sumsq) noexcept nogil
+cdef void claswp(int *n, c *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil
+cdef void clasyf(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil
+cdef void clatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, c *ab, int *ldab, c *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void clatdf(int *ijob, int *n, c *z, int *ldz, c *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil
+cdef void clatps(char *uplo, char *trans, char *diag, char *normin, int *n, c *ap, c *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void clatrd(char *uplo, int *n, int *nb, c *a, int *lda, s *e, c *tau, c *w, int *ldw) noexcept nogil
+cdef void clatrs(char *uplo, char *trans, char *diag, char *normin, int *n, c *a, int *lda, c *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void clatrz(int *m, int *n, int *l, c *a, int *lda, c *tau, c *work) noexcept nogil
+cdef void clauu2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void clauum(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void cpbcon(char *uplo, int *n, int *kd, c *ab, int *ldab, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpbequ(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void cpbrfs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpbstf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil
+cdef void cpbsv(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil
+cdef void cpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpbtf2(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil
+cdef void cpbtrf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil
+cdef void cpbtrs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil
+cdef void cpftrf(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil
+cdef void cpftri(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil
+cdef void cpftrs(char *transr, char *uplo, int *n, int *nrhs, c *a, c *b, int *ldb, int *info) noexcept nogil
+cdef void cpocon(char *uplo, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpoequ(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void cpoequb(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void cporfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cposv(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil
+cdef void cposvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpotf2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void cpotrf(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void cpotri(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void cpotrs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil
+cdef void cppcon(char *uplo, int *n, c *ap, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void cppequ(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void cpprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cppsv(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil
+cdef void cppsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpptrf(char *uplo, int *n, c *ap, int *info) noexcept nogil
+cdef void cpptri(char *uplo, int *n, c *ap, int *info) noexcept nogil
+cdef void cpptrs(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil
+cdef void cpstf2(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil
+cdef void cpstrf(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil
+cdef void cptcon(int *n, s *d, c *e, s *anorm, s *rcond, s *rwork, int *info) noexcept nogil
+cdef void cpteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void cptrfs(char *uplo, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cptsv(int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil
+cdef void cptsvx(char *fact, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cpttrf(int *n, s *d, c *e, int *info) noexcept nogil
+cdef void cpttrs(char *uplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil
+cdef void cptts2(int *iuplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb) noexcept nogil
+cdef void crot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, c *s) noexcept nogil
+cdef void cspcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil
+cdef void cspmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void cspr(char *uplo, int *n, c *alpha, c *x, int *incx, c *ap) noexcept nogil
+cdef void csprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void cspsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void cspsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void csptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil
+cdef void csptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil
+cdef void csptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void csrscl(int *n, s *sa, c *sx, int *incx) noexcept nogil
+cdef void cstedc(char *compz, int *n, s *d, s *e, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void cstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void cstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, c *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void cstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, c *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void csteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void csycon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil
+cdef void csyconv(char *uplo, char *way, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil
+cdef void csyequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil
+cdef void csymv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil
+cdef void csyr(char *uplo, int *n, c *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil
+cdef void csyrfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void csysv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil
+cdef void csysvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil
+cdef void csyswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void csytf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void csytrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil
+cdef void csytri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil
+cdef void csytri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil
+cdef void csytri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil
+cdef void csytrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil
+cdef void csytrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil
+cdef void ctbcon(char *norm, char *uplo, char *diag, int *n, int *kd, c *ab, int *ldab, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil
+cdef void ctfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, c *alpha, c *a, c *b, int *ldb) noexcept nogil
+cdef void ctftri(char *transr, char *uplo, char *diag, int *n, c *a, int *info) noexcept nogil
+cdef void ctfttp(char *transr, char *uplo, int *n, c *arf, c *ap, int *info) noexcept nogil
+cdef void ctfttr(char *transr, char *uplo, int *n, c *arf, c *a, int *lda, int *info) noexcept nogil
+cdef void ctgevc(char *side, char *howmny, bint *select, int *n, c *s, int *lds, c *p, int *ldp, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctgex2(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *j1, int *info) noexcept nogil
+cdef void ctgexc(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil
+cdef void ctgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, int *m, s *pl, s *pr, s *dif, c *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ctgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, c *a, int *lda, c *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, c *u, int *ldu, c *v, int *ldv, c *q, int *ldq, c *work, int *ncycle, int *info) noexcept nogil
+cdef void ctgsna(char *job, char *howmny, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *dif, int *mm, int *m, c *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void ctgsy2(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) noexcept nogil
+cdef void ctgsyl(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *dif, c *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void ctpcon(char *norm, char *uplo, char *diag, int *n, c *ap, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *info) noexcept nogil
+cdef void ctpqrt(int *m, int *n, int *l, int *nb, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, c *work, int *info) noexcept nogil
+cdef void ctpqrt2(int *m, int *n, int *l, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, int *info) noexcept nogil
+cdef void ctprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *ldwork) noexcept nogil
+cdef void ctprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctptri(char *uplo, char *diag, int *n, c *ap, int *info) noexcept nogil
+cdef void ctptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil
+cdef void ctpttf(char *transr, char *uplo, int *n, c *ap, c *arf, int *info) noexcept nogil
+cdef void ctpttr(char *uplo, int *n, c *ap, c *a, int *lda, int *info) noexcept nogil
+cdef void ctrcon(char *norm, char *uplo, char *diag, int *n, c *a, int *lda, s *rcond, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctrevc(char *side, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctrexc(char *compq, int *n, c *t, int *ldt, c *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil
+cdef void ctrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil
+cdef void ctrsen(char *job, char *compq, bint *select, int *n, c *t, int *ldt, c *q, int *ldq, c *w, int *m, s *s, s *sep, c *work, int *lwork, int *info) noexcept nogil
+cdef void ctrsna(char *job, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *sep, int *mm, int *m, c *work, int *ldwork, s *rwork, int *info) noexcept nogil
+cdef void ctrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *scale, int *info) noexcept nogil
+cdef void ctrti2(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void ctrtri(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil
+cdef void ctrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil
+cdef void ctrttf(char *transr, char *uplo, int *n, c *a, int *lda, c *arf, int *info) noexcept nogil
+cdef void ctrttp(char *uplo, int *n, c *a, int *lda, c *ap, int *info) noexcept nogil
+cdef void ctzrzf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunbdb(char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, s *phi, c *taup1, c *taup2, c *tauq1, c *tauq2, c *work, int *lwork, int *info) noexcept nogil
+cdef void cuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) noexcept nogil
+cdef void cung2l(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cung2r(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cungbr(char *vect, int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunghr(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cungl2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cunglq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cungql(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cungqr(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cungr2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil
+cdef void cungrq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cungtr(char *uplo, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunm2l(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cunm2r(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunml2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cunmlq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmql(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmqr(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmr2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void cunmrq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cunmtr(char *side, char *uplo, char *trans, int *m, int *n, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil
+cdef void cupgtr(char *uplo, int *n, c *ap, c *tau, c *q, int *ldq, c *work, int *info) noexcept nogil
+cdef void cupmtr(char *side, char *uplo, char *trans, int *m, int *n, c *ap, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil
+cdef void dbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) noexcept nogil
+cdef void dbdsdc(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) noexcept nogil
+cdef void dbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void ddisna(char *job, int *m, int *n, d *d, d *sep, int *info) noexcept nogil
+cdef void dgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dgbcon(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgbequ(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void dgbequb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void dgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgbsv(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgbtf2(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void dgbtrf(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void dgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) noexcept nogil
+cdef void dgebal(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil
+cdef void dgebd2(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) noexcept nogil
+cdef void dgebrd(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgecon(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgeequ(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void dgeequb(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void dgees(char *jobvs, char *sort, dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) noexcept nogil
+cdef void dgeesx(char *jobvs, char *sort, dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void dgeev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dgehd2(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgehrd(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dgelq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgelqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgels(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgelsd(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dgelss(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgelsy(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dgeql2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgeqlf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgeqp3(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgeqr2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgeqr2p(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgeqrf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgeqrfp(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgeqrt(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) noexcept nogil
+cdef void dgeqrt2(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil
+cdef void dgeqrt3(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil
+cdef void dgerfs(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgerq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dgerqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgesc2(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil
+cdef void dgesdd(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dgesvd(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgesvx(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgetc2(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil
+cdef void dgetf2(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void dgetrf(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void dgetri(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgetrs(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) noexcept nogil
+cdef void dggbal(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil
+cdef void dgges(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) noexcept nogil
+cdef void dggesx(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void dggev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil
+cdef void dggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil
+cdef void dggglm(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) noexcept nogil
+cdef void dgglse(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) noexcept nogil
+cdef void dggqrf(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil
+cdef void dggrqf(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgsvj0(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgsvj1(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil
+cdef void dgtcon(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgtrfs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgtsv(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) noexcept nogil
+cdef void dgtsvx(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dgttrf(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) noexcept nogil
+cdef void dgttrs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dgtts2(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) noexcept nogil
+cdef void dhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil
+cdef void dhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) noexcept nogil
+cdef void dhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil
+cdef bint disnan(d *din) noexcept nogil
+cdef void dlabad(d *small, d *large) noexcept nogil
+cdef void dlabrd(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) noexcept nogil
+cdef void dlacn2(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) noexcept nogil
+cdef void dlacon(int *n, d *v, d *x, int *isgn, d *est, int *kase) noexcept nogil
+cdef void dlacpy(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) noexcept nogil
+cdef void dladiv(d *a, d *b, d *c, d *d, d *p, d *q) noexcept nogil
+cdef void dlae2(d *a, d *b, d *c, d *rt1, d *rt2) noexcept nogil
+cdef void dlaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlaed0(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlaed1(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlaed2(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil
+cdef void dlaed3(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) noexcept nogil
+cdef void dlaed4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) noexcept nogil
+cdef void dlaed5(int *i, d *d, d *z, d *delta, d *rho, d *dlam) noexcept nogil
+cdef void dlaed6(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) noexcept nogil
+cdef void dlaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlaed8(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) noexcept nogil
+cdef void dlaed9(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) noexcept nogil
+cdef void dlaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) noexcept nogil
+cdef void dlaein(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) noexcept nogil
+cdef void dlaev2(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) noexcept nogil
+cdef void dlaexc(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) noexcept nogil
+cdef void dlag2(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) noexcept nogil
+cdef void dlag2s(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil
+cdef void dlags2(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) noexcept nogil
+cdef void dlagtf(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) noexcept nogil
+cdef void dlagtm(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) noexcept nogil
+cdef void dlagts(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) noexcept nogil
+cdef void dlagv2(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) noexcept nogil
+cdef void dlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) noexcept nogil
+cdef void dlahr2(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) noexcept nogil
+cdef void dlaic1(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) noexcept nogil
+cdef void dlaln2(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) noexcept nogil
+cdef void dlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) noexcept nogil
+cdef void dlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) noexcept nogil
+cdef d dlamch(char *cmach) noexcept nogil
+cdef void dlamrg(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) noexcept nogil
+cdef int dlaneg(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) noexcept nogil
+cdef d dlangb(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) noexcept nogil
+cdef d dlange(char *norm, int *m, int *n, d *a, int *lda, d *work) noexcept nogil
+cdef d dlangt(char *norm, int *n, d *dl, d *d_, d *du) noexcept nogil
+cdef d dlanhs(char *norm, int *n, d *a, int *lda, d *work) noexcept nogil
+cdef d dlansb(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil
+cdef d dlansf(char *norm, char *transr, char *uplo, int *n, d *a, d *work) noexcept nogil
+cdef d dlansp(char *norm, char *uplo, int *n, d *ap, d *work) noexcept nogil
+cdef d dlanst(char *norm, int *n, d *d_, d *e) noexcept nogil
+cdef d dlansy(char *norm, char *uplo, int *n, d *a, int *lda, d *work) noexcept nogil
+cdef d dlantb(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil
+cdef d dlantp(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) noexcept nogil
+cdef d dlantr(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) noexcept nogil
+cdef void dlanv2(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) noexcept nogil
+cdef void dlapll(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) noexcept nogil
+cdef void dlapmr(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil
+cdef void dlapmt(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil
+cdef d dlapy2(d *x, d *y) noexcept nogil
+cdef d dlapy3(d *x, d *y, d *z) noexcept nogil
+cdef void dlaqgb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil
+cdef void dlaqge(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil
+cdef void dlaqp2(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) noexcept nogil
+cdef void dlaqps(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) noexcept nogil
+cdef void dlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil
+cdef void dlaqr1(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) noexcept nogil
+cdef void dlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil
+cdef void dlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil
+cdef void dlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil
+cdef void dlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) noexcept nogil
+cdef void dlaqsb(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void dlaqsp(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void dlaqsy(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void dlaqtr(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) noexcept nogil
+cdef void dlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil
+cdef void dlar2v(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) noexcept nogil
+cdef void dlarf(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil
+cdef void dlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil
+cdef void dlarfg(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil
+cdef void dlarfgp(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil
+cdef void dlarft(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil
+cdef void dlarfx(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) noexcept nogil
+cdef void dlargv(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) noexcept nogil
+cdef void dlarnv(int *idist, int *iseed, int *n, d *x) noexcept nogil
+cdef void dlarra(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil
+cdef void dlarrb(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) noexcept nogil
+cdef void dlarrc(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil
+cdef void dlarrd(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlarre(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlarrf(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) noexcept nogil
+cdef void dlarrj(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) noexcept nogil
+cdef void dlarrk(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) noexcept nogil
+cdef void dlarrr(int *n, d *d, d *e, int *info) noexcept nogil
+cdef void dlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlartg(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil
+cdef void dlartgp(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil
+cdef void dlartgs(d *x, d *y, d *sigma, d *cs, d *sn) noexcept nogil
+cdef void dlartv(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) noexcept nogil
+cdef void dlaruv(int *iseed, int *n, d *x) noexcept nogil
+cdef void dlarz(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil
+cdef void dlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil
+cdef void dlarzt(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil
+cdef void dlas2(d *f, d *g, d *h, d *ssmin, d *ssmax) noexcept nogil
+cdef void dlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dlasd0(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) noexcept nogil
+cdef void dlasd1(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) noexcept nogil
+cdef void dlasd2(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil
+cdef void dlasd3(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) noexcept nogil
+cdef void dlasd4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) noexcept nogil
+cdef void dlasd5(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) noexcept nogil
+cdef void dlasd6(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) noexcept nogil
+cdef void dlasd8(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) noexcept nogil
+cdef void dlasda(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil
+cdef void dlasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dlasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil
+cdef void dlaset(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) noexcept nogil
+cdef void dlasq1(int *n, d *d, d *e, d *work, int *info) noexcept nogil
+cdef void dlasq2(int *n, d *z, int *info) noexcept nogil
+cdef void dlasq3(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) noexcept nogil
+cdef void dlasq4(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) noexcept nogil
+cdef void dlasq6(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) noexcept nogil
+cdef void dlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) noexcept nogil
+cdef void dlasrt(char *id, int *n, d *d, int *info) noexcept nogil
+cdef void dlassq(int *n, d *x, int *incx, d *scale, d *sumsq) noexcept nogil
+cdef void dlasv2(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) noexcept nogil
+cdef void dlaswp(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil
+cdef void dlasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) noexcept nogil
+cdef void dlasyf(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) noexcept nogil
+cdef void dlat2s(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil
+cdef void dlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void dlatdf(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil
+cdef void dlatps(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void dlatrd(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) noexcept nogil
+cdef void dlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void dlatrz(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) noexcept nogil
+cdef void dlauu2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dlauum(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dopgtr(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) noexcept nogil
+cdef void dopmtr(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dorbdb(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dorg2l(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dorg2r(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dorgbr(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorghr(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorgl2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dorglq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorgql(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorgqr(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorgr2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil
+cdef void dorgrq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorgtr(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorm2l(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dorm2r(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dorml2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dormlq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormql(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormqr(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormr2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dormr3(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil
+cdef void dormrq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormrz(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dormtr(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil
+cdef void dpbcon(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpbequ(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void dpbrfs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpbstf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil
+cdef void dpbsv(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil
+cdef void dpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpbtf2(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil
+cdef void dpbtrf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil
+cdef void dpbtrs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil
+cdef void dpftrf(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil
+cdef void dpftri(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil
+cdef void dpftrs(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) noexcept nogil
+cdef void dpocon(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpoequ(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void dpoequb(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void dporfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil
+cdef void dposvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpotf2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dpotrf(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dpotri(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dpotrs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil
+cdef void dppcon(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dppequ(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void dpprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dppsv(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil
+cdef void dppsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dpptrf(char *uplo, int *n, d *ap, int *info) noexcept nogil
+cdef void dpptri(char *uplo, int *n, d *ap, int *info) noexcept nogil
+cdef void dpptrs(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil
+cdef void dpstf2(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil
+cdef void dpstrf(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil
+cdef void dptcon(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) noexcept nogil
+cdef void dpteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dptrfs(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) noexcept nogil
+cdef void dptsv(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil
+cdef void dptsvx(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) noexcept nogil
+cdef void dpttrf(int *n, d *d, d *e, int *info) noexcept nogil
+cdef void dpttrs(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil
+cdef void dptts2(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) noexcept nogil
+cdef void drscl(int *n, d *sa, d *sx, int *incx) noexcept nogil
+cdef void dsbev(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dsbevd(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsbevx(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsbgst(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) noexcept nogil
+cdef void dsbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dsbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsbtrd(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) noexcept nogil
+cdef void dsfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) noexcept nogil
+cdef void dsgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil
+cdef void dspcon(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dspev(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dspevd(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dspevx(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dspgst(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) noexcept nogil
+cdef void dspgv(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dspgvd(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil
+cdef void dsprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dspsv(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dspsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dsptrd(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) noexcept nogil
+cdef void dsptrf(char *uplo, int *n, d *ap, int *ipiv, int *info) noexcept nogil
+cdef void dsptri(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) noexcept nogil
+cdef void dsptrs(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dstebz(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) noexcept nogil
+cdef void dstedc(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dsterf(int *n, d *d, d *e, int *info) noexcept nogil
+cdef void dstev(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void dstevd(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dstevr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dstevx(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsycon(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dsyconv(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil
+cdef void dsyequb(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) noexcept nogil
+cdef void dsyev(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsyevd(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsyevr(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsyevx(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsygs2(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil
+cdef void dsygst(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil
+cdef void dsygv(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsygvd(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dsygvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void dsyrfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dsysv(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsysvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dsyswapr(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void dsytd2(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) noexcept nogil
+cdef void dsytf2(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void dsytrd(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsytrf(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsytri(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil
+cdef void dsytri2(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil
+cdef void dsytri2x(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) noexcept nogil
+cdef void dsytrs(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil
+cdef void dsytrs2(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) noexcept nogil
+cdef void dtbcon(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil
+cdef void dtfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) noexcept nogil
+cdef void dtftri(char *transr, char *uplo, char *diag, int *n, d *a, int *info) noexcept nogil
+cdef void dtfttp(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) noexcept nogil
+cdef void dtfttr(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) noexcept nogil
+cdef void dtgevc(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil
+cdef void dtgex2(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) noexcept nogil
+cdef void dtgexc(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) noexcept nogil
+cdef void dtgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dtgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) noexcept nogil
+cdef void dtgsna(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dtgsy2(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) noexcept nogil
+cdef void dtgsyl(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void dtpcon(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) noexcept nogil
+cdef void dtpqrt(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) noexcept nogil
+cdef void dtpqrt2(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) noexcept nogil
+cdef void dtprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) noexcept nogil
+cdef void dtprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtptri(char *uplo, char *diag, int *n, d *ap, int *info) noexcept nogil
+cdef void dtptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil
+cdef void dtpttf(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) noexcept nogil
+cdef void dtpttr(char *uplo, int *n, d *ap, d *a, int *lda, int *info) noexcept nogil
+cdef void dtrcon(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtrevc(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil
+cdef void dtrexc(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) noexcept nogil
+cdef void dtrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil
+cdef void dtrsen(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void dtrsna(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) noexcept nogil
+cdef void dtrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) noexcept nogil
+cdef void dtrti2(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dtrtri(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil
+cdef void dtrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil
+cdef void dtrttf(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) noexcept nogil
+cdef void dtrttp(char *uplo, int *n, d *a, int *lda, d *ap, int *info) noexcept nogil
+cdef void dtzrzf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil
+cdef d dzsum1(int *n, z *cx, int *incx) noexcept nogil
+cdef int icmax1(int *n, c *cx, int *incx) noexcept nogil
+cdef int ieeeck(int *ispec, s *zero, s *one) noexcept nogil
+cdef int ilaclc(int *m, int *n, c *a, int *lda) noexcept nogil
+cdef int ilaclr(int *m, int *n, c *a, int *lda) noexcept nogil
+cdef int iladiag(char *diag) noexcept nogil
+cdef int iladlc(int *m, int *n, d *a, int *lda) noexcept nogil
+cdef int iladlr(int *m, int *n, d *a, int *lda) noexcept nogil
+cdef int ilaprec(char *prec) noexcept nogil
+cdef int ilaslc(int *m, int *n, s *a, int *lda) noexcept nogil
+cdef int ilaslr(int *m, int *n, s *a, int *lda) noexcept nogil
+cdef int ilatrans(char *trans) noexcept nogil
+cdef int ilauplo(char *uplo) noexcept nogil
+cdef void ilaver(int *vers_major, int *vers_minor, int *vers_patch) noexcept nogil
+cdef int ilazlc(int *m, int *n, z *a, int *lda) noexcept nogil
+cdef int ilazlr(int *m, int *n, z *a, int *lda) noexcept nogil
+cdef int izmax1(int *n, z *cx, int *incx) noexcept nogil
+cdef void sbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) noexcept nogil
+cdef void sbdsdc(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) noexcept nogil
+cdef void sbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef s scsum1(int *n, c *cx, int *incx) noexcept nogil
+cdef void sdisna(char *job, int *m, int *n, s *d, s *sep, int *info) noexcept nogil
+cdef void sgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sgbcon(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgbequ(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void sgbequb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void sgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgbsv(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgbtf2(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void sgbtrf(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void sgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) noexcept nogil
+cdef void sgebal(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil
+cdef void sgebd2(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) noexcept nogil
+cdef void sgebrd(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgecon(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgeequ(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void sgeequb(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil
+cdef void sgees(char *jobvs, char *sort, sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) noexcept nogil
+cdef void sgeesx(char *jobvs, char *sort, sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void sgeev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void sgehd2(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgehrd(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void sgelq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgelqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgels(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgelsd(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void sgelss(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgelsy(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sgeql2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgeqlf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgeqp3(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgeqr2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgeqr2p(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgeqrf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgeqrfp(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgeqrt(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) noexcept nogil
+cdef void sgeqrt2(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil
+cdef void sgeqrt3(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil
+cdef void sgerfs(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgerq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sgerqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgesc2(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil
+cdef void sgesdd(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void sgesv(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sgesvd(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgesvx(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgetc2(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil
+cdef void sgetf2(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void sgetrf(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void sgetri(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgetrs(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) noexcept nogil
+cdef void sggbal(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil
+cdef void sgges(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) noexcept nogil
+cdef void sggesx(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void sggev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil
+cdef void sggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil
+cdef void sggglm(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) noexcept nogil
+cdef void sgglse(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) noexcept nogil
+cdef void sggqrf(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil
+cdef void sggrqf(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgsvj0(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgsvj1(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil
+cdef void sgtcon(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgtrfs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgtsv(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) noexcept nogil
+cdef void sgtsvx(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sgttrf(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) noexcept nogil
+cdef void sgttrs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sgtts2(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) noexcept nogil
+cdef void shgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil
+cdef void shsein(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) noexcept nogil
+cdef void shseqr(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil
+cdef void slabad(s *small, s *large) noexcept nogil
+cdef void slabrd(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) noexcept nogil
+cdef void slacn2(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) noexcept nogil
+cdef void slacon(int *n, s *v, s *x, int *isgn, s *est, int *kase) noexcept nogil
+cdef void slacpy(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) noexcept nogil
+cdef void sladiv(s *a, s *b, s *c, s *d, s *p, s *q) noexcept nogil
+cdef void slae2(s *a, s *b, s *c, s *rt1, s *rt2) noexcept nogil
+cdef void slaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) noexcept nogil
+cdef void slaed0(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) noexcept nogil
+cdef void slaed1(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) noexcept nogil
+cdef void slaed2(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil
+cdef void slaed3(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) noexcept nogil
+cdef void slaed4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) noexcept nogil
+cdef void slaed5(int *i, s *d, s *z, s *delta, s *rho, s *dlam) noexcept nogil
+cdef void slaed6(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) noexcept nogil
+cdef void slaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) noexcept nogil
+cdef void slaed8(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) noexcept nogil
+cdef void slaed9(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) noexcept nogil
+cdef void slaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) noexcept nogil
+cdef void slaein(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) noexcept nogil
+cdef void slaev2(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) noexcept nogil
+cdef void slaexc(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) noexcept nogil
+cdef void slag2(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) noexcept nogil
+cdef void slag2d(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) noexcept nogil
+cdef void slags2(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) noexcept nogil
+cdef void slagtf(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) noexcept nogil
+cdef void slagtm(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) noexcept nogil
+cdef void slagts(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) noexcept nogil
+cdef void slagv2(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) noexcept nogil
+cdef void slahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) noexcept nogil
+cdef void slahr2(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) noexcept nogil
+cdef void slaic1(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) noexcept nogil
+cdef void slaln2(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) noexcept nogil
+cdef void slals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) noexcept nogil
+cdef void slalsa(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil
+cdef void slalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) noexcept nogil
+cdef s slamch(char *cmach) noexcept nogil
+cdef void slamrg(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) noexcept nogil
+cdef s slangb(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) noexcept nogil
+cdef s slange(char *norm, int *m, int *n, s *a, int *lda, s *work) noexcept nogil
+cdef s slangt(char *norm, int *n, s *dl, s *d, s *du) noexcept nogil
+cdef s slanhs(char *norm, int *n, s *a, int *lda, s *work) noexcept nogil
+cdef s slansb(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil
+cdef s slansf(char *norm, char *transr, char *uplo, int *n, s *a, s *work) noexcept nogil
+cdef s slansp(char *norm, char *uplo, int *n, s *ap, s *work) noexcept nogil
+cdef s slanst(char *norm, int *n, s *d, s *e) noexcept nogil
+cdef s slansy(char *norm, char *uplo, int *n, s *a, int *lda, s *work) noexcept nogil
+cdef s slantb(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil
+cdef s slantp(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) noexcept nogil
+cdef s slantr(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) noexcept nogil
+cdef void slanv2(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) noexcept nogil
+cdef void slapll(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) noexcept nogil
+cdef void slapmr(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil
+cdef void slapmt(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil
+cdef s slapy2(s *x, s *y) noexcept nogil
+cdef s slapy3(s *x, s *y, s *z) noexcept nogil
+cdef void slaqgb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil
+cdef void slaqge(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil
+cdef void slaqp2(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) noexcept nogil
+cdef void slaqps(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) noexcept nogil
+cdef void slaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil
+cdef void slaqr1(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) noexcept nogil
+cdef void slaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil
+cdef void slaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil
+cdef void slaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil
+cdef void slaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) noexcept nogil
+cdef void slaqsb(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void slaqsp(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void slaqsy(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil
+cdef void slaqtr(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) noexcept nogil
+cdef void slar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil
+cdef void slar2v(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) noexcept nogil
+cdef void slarf(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil
+cdef void slarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil
+cdef void slarfg(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil
+cdef void slarfgp(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil
+cdef void slarft(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil
+cdef void slarfx(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) noexcept nogil
+cdef void slargv(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) noexcept nogil
+cdef void slarnv(int *idist, int *iseed, int *n, s *x) noexcept nogil
+cdef void slarra(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil
+cdef void slarrb(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) noexcept nogil
+cdef void slarrc(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil
+cdef void slarrd(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) noexcept nogil
+cdef void slarre(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) noexcept nogil
+cdef void slarrf(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) noexcept nogil
+cdef void slarrj(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) noexcept nogil
+cdef void slarrk(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) noexcept nogil
+cdef void slarrr(int *n, s *d, s *e, int *info) noexcept nogil
+cdef void slarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil
+cdef void slartg(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil
+cdef void slartgp(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil
+cdef void slartgs(s *x, s *y, s *sigma, s *cs, s *sn) noexcept nogil
+cdef void slartv(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) noexcept nogil
+cdef void slaruv(int *iseed, int *n, s *x) noexcept nogil
+cdef void slarz(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil
+cdef void slarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil
+cdef void slarzt(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil
+cdef void slas2(s *f, s *g, s *h, s *ssmin, s *ssmax) noexcept nogil
+cdef void slascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void slasd0(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) noexcept nogil
+cdef void slasd1(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) noexcept nogil
+cdef void slasd2(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil
+cdef void slasd3(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) noexcept nogil
+cdef void slasd4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) noexcept nogil
+cdef void slasd5(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) noexcept nogil
+cdef void slasd6(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil
+cdef void slasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) noexcept nogil
+cdef void slasd8(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) noexcept nogil
+cdef void slasda(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil
+cdef void slasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void slasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil
+cdef void slaset(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) noexcept nogil
+cdef void slasq1(int *n, s *d, s *e, s *work, int *info) noexcept nogil
+cdef void slasq2(int *n, s *z, int *info) noexcept nogil
+cdef void slasq3(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) noexcept nogil
+cdef void slasq4(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) noexcept nogil
+cdef void slasq6(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) noexcept nogil
+cdef void slasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) noexcept nogil
+cdef void slasrt(char *id, int *n, s *d, int *info) noexcept nogil
+cdef void slassq(int *n, s *x, int *incx, s *scale, s *sumsq) noexcept nogil
+cdef void slasv2(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) noexcept nogil
+cdef void slaswp(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil
+cdef void slasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) noexcept nogil
+cdef void slasyf(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) noexcept nogil
+cdef void slatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void slatdf(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil
+cdef void slatps(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void slatrd(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) noexcept nogil
+cdef void slatrs(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) noexcept nogil
+cdef void slatrz(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) noexcept nogil
+cdef void slauu2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void slauum(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void sopgtr(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) noexcept nogil
+cdef void sopmtr(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sorbdb(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void sorg2l(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sorg2r(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sorgbr(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorghr(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorgl2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sorglq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorgql(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorgqr(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorgr2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil
+cdef void sorgrq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorgtr(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorm2l(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sorm2r(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sorml2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sormlq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormql(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormqr(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormr2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sormr3(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil
+cdef void sormrq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormrz(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void sormtr(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil
+cdef void spbcon(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void spbequ(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void spbrfs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void spbstf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil
+cdef void spbsv(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil
+cdef void spbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void spbtf2(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil
+cdef void spbtrf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil
+cdef void spbtrs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil
+cdef void spftrf(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil
+cdef void spftri(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil
+cdef void spftrs(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) noexcept nogil
+cdef void spocon(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void spoequ(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void spoequb(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void sporfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sposv(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil
+cdef void sposvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void spotf2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void spotrf(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void spotri(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void spotrs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil
+cdef void sppcon(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void sppequ(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) noexcept nogil
+cdef void spprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sppsv(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil
+cdef void sppsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void spptrf(char *uplo, int *n, s *ap, int *info) noexcept nogil
+cdef void spptri(char *uplo, int *n, s *ap, int *info) noexcept nogil
+cdef void spptrs(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil
+cdef void spstf2(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil
+cdef void spstrf(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil
+cdef void sptcon(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) noexcept nogil
+cdef void spteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void sptrfs(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) noexcept nogil
+cdef void sptsv(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil
+cdef void sptsvx(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) noexcept nogil
+cdef void spttrf(int *n, s *d, s *e, int *info) noexcept nogil
+cdef void spttrs(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil
+cdef void sptts2(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) noexcept nogil
+cdef void srscl(int *n, s *sa, s *sx, int *incx) noexcept nogil
+cdef void ssbev(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void ssbevd(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssbevx(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssbgst(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) noexcept nogil
+cdef void ssbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void ssbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssbtrd(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) noexcept nogil
+cdef void ssfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) noexcept nogil
+cdef void sspcon(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void sspev(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void sspevd(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sspevx(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void sspgst(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) noexcept nogil
+cdef void sspgv(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void sspgvd(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void sspsv(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sspsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void ssptrd(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) noexcept nogil
+cdef void ssptrf(char *uplo, int *n, s *ap, int *ipiv, int *info) noexcept nogil
+cdef void ssptri(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) noexcept nogil
+cdef void ssptrs(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void sstebz(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) noexcept nogil
+cdef void sstedc(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void sstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void ssterf(int *n, s *d, s *e, int *info) noexcept nogil
+cdef void sstev(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil
+cdef void sstevd(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sstevr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void sstevx(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssycon(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void ssyconv(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil
+cdef void ssyequb(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) noexcept nogil
+cdef void ssyev(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssyevd(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssyevr(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssyevx(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssygs2(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil
+cdef void ssygst(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil
+cdef void ssygv(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssygvd(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ssygvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void ssyrfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void ssysv(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssysvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void ssyswapr(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void ssytd2(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) noexcept nogil
+cdef void ssytf2(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void ssytrd(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssytrf(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssytri(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil
+cdef void ssytri2(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil
+cdef void ssytri2x(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) noexcept nogil
+cdef void ssytrs(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil
+cdef void ssytrs2(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) noexcept nogil
+cdef void stbcon(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void stbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void stbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil
+cdef void stfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) noexcept nogil
+cdef void stftri(char *transr, char *uplo, char *diag, int *n, s *a, int *info) noexcept nogil
+cdef void stfttp(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) noexcept nogil
+cdef void stfttr(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) noexcept nogil
+cdef void stgevc(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil
+cdef void stgex2(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) noexcept nogil
+cdef void stgexc(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) noexcept nogil
+cdef void stgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void stgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) noexcept nogil
+cdef void stgsna(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void stgsy2(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) noexcept nogil
+cdef void stgsyl(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void stpcon(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void stpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) noexcept nogil
+cdef void stpqrt(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) noexcept nogil
+cdef void stpqrt2(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) noexcept nogil
+cdef void stprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) noexcept nogil
+cdef void stprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void stptri(char *uplo, char *diag, int *n, s *ap, int *info) noexcept nogil
+cdef void stptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil
+cdef void stpttf(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) noexcept nogil
+cdef void stpttr(char *uplo, int *n, s *ap, s *a, int *lda, int *info) noexcept nogil
+cdef void strcon(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) noexcept nogil
+cdef void strevc(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil
+cdef void strexc(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) noexcept nogil
+cdef void strrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil
+cdef void strsen(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void strsna(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) noexcept nogil
+cdef void strsyl(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) noexcept nogil
+cdef void strti2(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void strtri(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil
+cdef void strtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil
+cdef void strttf(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) noexcept nogil
+cdef void strttp(char *uplo, int *n, s *a, int *lda, s *ap, int *info) noexcept nogil
+cdef void stzrzf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil
+cdef void xerbla_array(char *srname_array, int *srname_len, int *info) noexcept nogil
+cdef void zbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) noexcept nogil
+cdef void zbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, z *vt, int *ldvt, z *u, int *ldu, z *c, int *ldc, d *rwork, int *info) noexcept nogil
+cdef void zcgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil
+cdef void zcposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil
+cdef void zdrscl(int *n, d *sa, z *sx, int *incx) noexcept nogil
+cdef void zgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *pt, int *ldpt, z *c, int *ldc, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgbcon(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgbequ(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void zgbequb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void zgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgbsv(int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgbtf2(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void zgbtrf(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil
+cdef void zgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, z *v, int *ldv, int *info) noexcept nogil
+cdef void zgebal(char *job, int *n, z *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil
+cdef void zgebd2(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *info) noexcept nogil
+cdef void zgebrd(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgecon(char *norm, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgeequ(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void zgeequb(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil
+cdef void zgees(char *jobvs, char *sort, zselect1 *select, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil
+cdef void zgeesx(char *jobvs, char *sort, zselect1 *select, char *sense, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil
+cdef void zgeev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgehd2(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgehrd(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgelq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgelqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgels(char *trans, int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgelsd(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil
+cdef void zgelss(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgelsy(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *jpvt, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zgeql2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgeqlf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgeqp3(int *m, int *n, z *a, int *lda, int *jpvt, z *tau, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgeqr2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgeqr2p(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgeqrf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgeqrfp(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgeqrt(int *m, int *n, int *nb, z *a, int *lda, z *t, int *ldt, z *work, int *info) noexcept nogil
+cdef void zgeqrt2(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil
+cdef void zgeqrt3(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil
+cdef void zgerfs(char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgerq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zgerqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgesc2(int *n, z *a, int *lda, z *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil
+cdef void zgesdd(char *jobz, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil
+cdef void zgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zgesvd(char *jobu, char *jobvt, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zgesvx(char *fact, char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgetc2(int *n, z *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil
+cdef void zgetf2(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void zgetrf(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void zgetri(int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgetrs(char *trans, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, z *v, int *ldv, int *info) noexcept nogil
+cdef void zggbal(char *job, int *n, z *a, int *lda, z *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil
+cdef void zgges(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil
+cdef void zggesx(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, char *sense, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil
+cdef void zggev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) noexcept nogil
+cdef void zggglm(int *n, int *m, int *p, z *a, int *lda, z *b, int *ldb, z *d, z *x, z *y, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *info) noexcept nogil
+cdef void zgglse(int *m, int *n, int *p, z *a, int *lda, z *b, int *ldb, z *c, z *d, z *x, z *work, int *lwork, int *info) noexcept nogil
+cdef void zggqrf(int *n, int *m, int *p, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil
+cdef void zggrqf(int *m, int *p, int *n, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil
+cdef void zgtcon(char *norm, int *n, z *dl, z *d, z *du, z *du2, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil
+cdef void zgtrfs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgtsv(int *n, int *nrhs, z *dl, z *d, z *du, z *b, int *ldb, int *info) noexcept nogil
+cdef void zgtsvx(char *fact, char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zgttrf(int *n, z *dl, z *d, z *du, z *du2, int *ipiv, int *info) noexcept nogil
+cdef void zgttrs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zgtts2(int *itrans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb) noexcept nogil
+cdef void zhbev(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhbevd(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zhbevx(char *jobz, char *range, char *uplo, int *n, int *kd, z *ab, int *ldab, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zhbgst(char *vect, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *x, int *ldx, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zhbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zhbtrd(char *vect, char *uplo, int *n, int *kd, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *work, int *info) noexcept nogil
+cdef void zhecon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil
+cdef void zheequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil
+cdef void zheev(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zheevd(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zheevr(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zheevx(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zhegs2(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil
+cdef void zhegst(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil
+cdef void zhegv(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zhegvd(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zhegvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zherfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhesv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil
+cdef void zhesvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zheswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void zhetd2(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, int *info) noexcept nogil
+cdef void zhetf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void zhetrd(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zhetrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil
+cdef void zhetri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil
+cdef void zhetri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil
+cdef void zhetri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil
+cdef void zhetrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zhetrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil
+cdef void zhfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c) noexcept nogil
+cdef void zhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *t, int *ldt, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zhpcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil
+cdef void zhpev(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhpevd(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zhpevx(char *jobz, char *range, char *uplo, int *n, z *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zhpgst(int *itype, char *uplo, int *n, z *ap, z *bp, int *info) noexcept nogil
+cdef void zhpgv(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhpgvd(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zhpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *ap, z *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zhprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhpsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zhpsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zhptrd(char *uplo, int *n, z *ap, d *d, d *e, z *tau, int *info) noexcept nogil
+cdef void zhptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil
+cdef void zhptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil
+cdef void zhptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, z *h, int *ldh, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil
+cdef void zhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil
+cdef void zlabrd(int *m, int *n, int *nb, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *x, int *ldx, z *y, int *ldy) noexcept nogil
+cdef void zlacgv(int *n, z *x, int *incx) noexcept nogil
+cdef void zlacn2(int *n, z *v, z *x, d *est, int *kase, int *isave) noexcept nogil
+cdef void zlacon(int *n, z *v, z *x, d *est, int *kase) noexcept nogil
+cdef void zlacp2(char *uplo, int *m, int *n, d *a, int *lda, z *b, int *ldb) noexcept nogil
+cdef void zlacpy(char *uplo, int *m, int *n, z *a, int *lda, z *b, int *ldb) noexcept nogil
+cdef void zlacrm(int *m, int *n, z *a, int *lda, d *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil
+cdef void zlacrt(int *n, z *cx, int *incx, z *cy, int *incy, z *c, z *s) noexcept nogil
+cdef z zladiv(z *x, z *y) noexcept nogil
+cdef void zlaed0(int *qsiz, int *n, d *d, d *e, z *q, int *ldq, z *qstore, int *ldqs, d *rwork, int *iwork, int *info) noexcept nogil
+cdef void zlaed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, z *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, z *work, d *rwork, int *iwork, int *info) noexcept nogil
+cdef void zlaed8(int *k, int *n, int *qsiz, z *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, z *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) noexcept nogil
+cdef void zlaein(bint *rightv, bint *noinit, int *n, z *h, int *ldh, z *w, z *v, z *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) noexcept nogil
+cdef void zlaesy(z *a, z *b, z *c, z *rt1, z *rt2, z *evscal, z *cs1, z *sn1) noexcept nogil
+cdef void zlaev2(z *a, z *b, z *c, d *rt1, d *rt2, d *cs1, z *sn1) noexcept nogil
+cdef void zlag2c(int *m, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil
+cdef void zlags2(bint *upper, d *a1, z *a2, d *a3, d *b1, z *b2, d *b3, d *csu, z *snu, d *csv, z *snv, d *csq, z *snq) noexcept nogil
+cdef void zlagtm(char *trans, int *n, int *nrhs, d *alpha, z *dl, z *d, z *du, z *x, int *ldx, d *beta, z *b, int *ldb) noexcept nogil
+cdef void zlahef(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil
+cdef void zlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, int *info) noexcept nogil
+cdef void zlahr2(int *n, int *k, int *nb, z *a, int *lda, z *tau, z *t, int *ldt, z *y, int *ldy) noexcept nogil
+cdef void zlaic1(int *job, int *j, z *x, d *sest, z *w, z *gamma, d *sestpr, z *s, z *c) noexcept nogil
+cdef void zlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) noexcept nogil
+cdef void zlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) noexcept nogil
+cdef void zlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, z *b, int *ldb, d *rcond, int *rank, z *work, d *rwork, int *iwork, int *info) noexcept nogil
+cdef d zlangb(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, d *work) noexcept nogil
+cdef d zlange(char *norm, int *m, int *n, z *a, int *lda, d *work) noexcept nogil
+cdef d zlangt(char *norm, int *n, z *dl, z *d_, z *du) noexcept nogil
+cdef d zlanhb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil
+cdef d zlanhe(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil
+cdef d zlanhf(char *norm, char *transr, char *uplo, int *n, z *a, d *work) noexcept nogil
+cdef d zlanhp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil
+cdef d zlanhs(char *norm, int *n, z *a, int *lda, d *work) noexcept nogil
+cdef d zlanht(char *norm, int *n, d *d_, z *e) noexcept nogil
+cdef d zlansb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil
+cdef d zlansp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil
+cdef d zlansy(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil
+cdef d zlantb(char *norm, char *uplo, char *diag, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil
+cdef d zlantp(char *norm, char *uplo, char *diag, int *n, z *ap, d *work) noexcept nogil
+cdef d zlantr(char *norm, char *uplo, char *diag, int *m, int *n, z *a, int *lda, d *work) noexcept nogil
+cdef void zlapll(int *n, z *x, int *incx, z *y, int *incy, d *ssmin) noexcept nogil
+cdef void zlapmr(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil
+cdef void zlapmt(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil
+cdef void zlaqgb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil
+cdef void zlaqge(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil
+cdef void zlaqhb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlaqhe(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlaqhp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlaqp2(int *m, int *n, int *offset, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *work) noexcept nogil
+cdef void zlaqps(int *m, int *n, int *offset, int *nb, int *kb, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *auxv, z *f, int *ldf) noexcept nogil
+cdef void zlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil
+cdef void zlaqr1(int *n, z *h, int *ldh, z *s1, z *s2, z *v) noexcept nogil
+cdef void zlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil
+cdef void zlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil
+cdef void zlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil
+cdef void zlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, z *s, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, z *v, int *ldv, z *u, int *ldu, int *nv, z *wv, int *ldwv, int *nh, z *wh, int *ldwh) noexcept nogil
+cdef void zlaqsb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlaqsp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlaqsy(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil
+cdef void zlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, z *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil
+cdef void zlar2v(int *n, z *x, z *y, z *z, int *incx, d *c, z *s, int *incc) noexcept nogil
+cdef void zlarcm(int *m, int *n, d *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil
+cdef void zlarf(char *side, int *m, int *n, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil
+cdef void zlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil
+cdef void zlarfg(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil
+cdef void zlarfgp(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil
+cdef void zlarft(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil
+cdef void zlarfx(char *side, int *m, int *n, z *v, z *tau, z *c, int *ldc, z *work) noexcept nogil
+cdef void zlargv(int *n, z *x, int *incx, z *y, int *incy, d *c, int *incc) noexcept nogil
+cdef void zlarnv(int *idist, int *iseed, int *n, z *x) noexcept nogil
+cdef void zlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, z *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil
+cdef void zlartg(z *f, z *g, d *cs, z *sn, z *r) noexcept nogil
+cdef void zlartv(int *n, z *x, int *incx, z *y, int *incy, d *c, z *s, int *incc) noexcept nogil
+cdef void zlarz(char *side, int *m, int *n, int *l, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil
+cdef void zlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil
+cdef void zlarzt(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil
+cdef void zlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zlaset(char *uplo, int *m, int *n, z *alpha, z *beta, z *a, int *lda) noexcept nogil
+cdef void zlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, z *a, int *lda) noexcept nogil
+cdef void zlassq(int *n, z *x, int *incx, d *scale, d *sumsq) noexcept nogil
+cdef void zlaswp(int *n, z *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil
+cdef void zlasyf(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil
+cdef void zlat2c(char *uplo, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil
+cdef void zlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, z *ab, int *ldab, z *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void zlatdf(int *ijob, int *n, z *z, int *ldz, z *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil
+cdef void zlatps(char *uplo, char *trans, char *diag, char *normin, int *n, z *ap, z *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void zlatrd(char *uplo, int *n, int *nb, z *a, int *lda, d *e, z *tau, z *w, int *ldw) noexcept nogil
+cdef void zlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, z *a, int *lda, z *x, d *scale, d *cnorm, int *info) noexcept nogil
+cdef void zlatrz(int *m, int *n, int *l, z *a, int *lda, z *tau, z *work) noexcept nogil
+cdef void zlauu2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zlauum(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zpbcon(char *uplo, int *n, int *kd, z *ab, int *ldab, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpbequ(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void zpbrfs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpbstf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil
+cdef void zpbsv(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil
+cdef void zpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpbtf2(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil
+cdef void zpbtrf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil
+cdef void zpbtrs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil
+cdef void zpftrf(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil
+cdef void zpftri(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil
+cdef void zpftrs(char *transr, char *uplo, int *n, int *nrhs, z *a, z *b, int *ldb, int *info) noexcept nogil
+cdef void zpocon(char *uplo, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpoequ(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void zpoequb(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void zporfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil
+cdef void zposvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpotf2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zpotrf(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zpotri(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void zpotrs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil
+cdef void zppcon(char *uplo, int *n, z *ap, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void zppequ(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, int *info) noexcept nogil
+cdef void zpprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zppsv(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil
+cdef void zppsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpptrf(char *uplo, int *n, z *ap, int *info) noexcept nogil
+cdef void zpptri(char *uplo, int *n, z *ap, int *info) noexcept nogil
+cdef void zpptrs(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil
+cdef void zpstf2(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil
+cdef void zpstrf(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil
+cdef void zptcon(int *n, d *d, z *e, d *anorm, d *rcond, d *rwork, int *info) noexcept nogil
+cdef void zpteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void zptrfs(char *uplo, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zptsv(int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil
+cdef void zptsvx(char *fact, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zpttrf(int *n, d *d, z *e, int *info) noexcept nogil
+cdef void zpttrs(char *uplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil
+cdef void zptts2(int *iuplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb) noexcept nogil
+cdef void zrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, z *s) noexcept nogil
+cdef void zspcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil
+cdef void zspmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zspr(char *uplo, int *n, z *alpha, z *x, int *incx, z *ap) noexcept nogil
+cdef void zsprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zspsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zspsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zsptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil
+cdef void zsptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil
+cdef void zsptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zstedc(char *compz, int *n, d *d, d *e, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, z *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil
+cdef void zstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, z *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void zsteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil
+cdef void zsycon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil
+cdef void zsyconv(char *uplo, char *way, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil
+cdef void zsyequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil
+cdef void zsymv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil
+cdef void zsyr(char *uplo, int *n, z *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil
+cdef void zsyrfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void zsysv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil
+cdef void zsysvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil
+cdef void zsyswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil
+cdef void zsytf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil
+cdef void zsytrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil
+cdef void zsytri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil
+cdef void zsytri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil
+cdef void zsytri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil
+cdef void zsytrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil
+cdef void zsytrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil
+cdef void ztbcon(char *norm, char *uplo, char *diag, int *n, int *kd, z *ab, int *ldab, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil
+cdef void ztfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, z *alpha, z *a, z *b, int *ldb) noexcept nogil
+cdef void ztftri(char *transr, char *uplo, char *diag, int *n, z *a, int *info) noexcept nogil
+cdef void ztfttp(char *transr, char *uplo, int *n, z *arf, z *ap, int *info) noexcept nogil
+cdef void ztfttr(char *transr, char *uplo, int *n, z *arf, z *a, int *lda, int *info) noexcept nogil
+cdef void ztgevc(char *side, char *howmny, bint *select, int *n, z *s, int *lds, z *p, int *ldp, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztgex2(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *j1, int *info) noexcept nogil
+cdef void ztgexc(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil
+cdef void ztgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, int *m, d *pl, d *pr, d *dif, z *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil
+cdef void ztgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, z *a, int *lda, z *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, z *u, int *ldu, z *v, int *ldv, z *q, int *ldq, z *work, int *ncycle, int *info) noexcept nogil
+cdef void ztgsna(char *job, char *howmny, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *dif, int *mm, int *m, z *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void ztgsy2(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) noexcept nogil
+cdef void ztgsyl(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *dif, z *work, int *lwork, int *iwork, int *info) noexcept nogil
+cdef void ztpcon(char *norm, char *uplo, char *diag, int *n, z *ap, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *info) noexcept nogil
+cdef void ztpqrt(int *m, int *n, int *l, int *nb, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, z *work, int *info) noexcept nogil
+cdef void ztpqrt2(int *m, int *n, int *l, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, int *info) noexcept nogil
+cdef void ztprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *ldwork) noexcept nogil
+cdef void ztprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztptri(char *uplo, char *diag, int *n, z *ap, int *info) noexcept nogil
+cdef void ztptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil
+cdef void ztpttf(char *transr, char *uplo, int *n, z *ap, z *arf, int *info) noexcept nogil
+cdef void ztpttr(char *uplo, int *n, z *ap, z *a, int *lda, int *info) noexcept nogil
+cdef void ztrcon(char *norm, char *uplo, char *diag, int *n, z *a, int *lda, d *rcond, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztrevc(char *side, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztrexc(char *compq, int *n, z *t, int *ldt, z *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil
+cdef void ztrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil
+cdef void ztrsen(char *job, char *compq, bint *select, int *n, z *t, int *ldt, z *q, int *ldq, z *w, int *m, d *s, d *sep, z *work, int *lwork, int *info) noexcept nogil
+cdef void ztrsna(char *job, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *sep, int *mm, int *m, z *work, int *ldwork, d *rwork, int *info) noexcept nogil
+cdef void ztrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *scale, int *info) noexcept nogil
+cdef void ztrti2(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void ztrtri(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil
+cdef void ztrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil
+cdef void ztrttf(char *transr, char *uplo, int *n, z *a, int *lda, z *arf, int *info) noexcept nogil
+cdef void ztrttp(char *uplo, int *n, z *a, int *lda, z *ap, int *info) noexcept nogil
+cdef void ztzrzf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunbdb(char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, d *phi, z *taup1, z *taup2, z *tauq1, z *tauq2, z *work, int *lwork, int *info) noexcept nogil
+cdef void zuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) noexcept nogil
+cdef void zung2l(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zung2r(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zungbr(char *vect, int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunghr(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zungl2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zunglq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zungql(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zungqr(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zungr2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil
+cdef void zungrq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zungtr(char *uplo, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunm2l(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zunm2r(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunml2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zunmlq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmql(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmqr(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmr2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
+cdef void zunmrq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zunmtr(char *side, char *uplo, char *trans, int *m, int *n, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil
+cdef void zupgtr(char *uplo, int *n, z *ap, z *tau, z *q, int *ldq, z *work, int *info) noexcept nogil
+cdef void zupmtr(char *side, char *uplo, char *trans, int *m, int *n, z *ap, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..7f9cbfbb519603d4107af51ac353e0650720cf8c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/cython_lapack.pyx
@@ -0,0 +1,12045 @@
+# This file was generated by _generate_pyx.py.
+# Do not edit this file directly.
+"""
+LAPACK functions for Cython
+===========================
+
+Usable from Cython via::
+
+    cimport scipy.linalg.cython_lapack
+
+This module provides Cython-level wrappers for all primary routines included
+in LAPACK 3.4.0 except for ``zcgesv`` since its interface is not consistent
+from LAPACK 3.4.0 to 3.6.0. It also provides some of the
+fixed-api auxiliary routines.
+
+These wrappers do not check for alignment of arrays.
+Alignment should be checked before these wrappers are used.
+
+Raw function pointers (Fortran-style pointer arguments):
+
+- cbbcsd
+- cbdsqr
+- cgbbrd
+- cgbcon
+- cgbequ
+- cgbequb
+- cgbrfs
+- cgbsv
+- cgbsvx
+- cgbtf2
+- cgbtrf
+- cgbtrs
+- cgebak
+- cgebal
+- cgebd2
+- cgebrd
+- cgecon
+- cgeequ
+- cgeequb
+- cgees
+- cgeesx
+- cgeev
+- cgeevx
+- cgehd2
+- cgehrd
+- cgelq2
+- cgelqf
+- cgels
+- cgelsd
+- cgelss
+- cgelsy
+- cgemqrt
+- cgeql2
+- cgeqlf
+- cgeqp3
+- cgeqr2
+- cgeqr2p
+- cgeqrf
+- cgeqrfp
+- cgeqrt
+- cgeqrt2
+- cgeqrt3
+- cgerfs
+- cgerq2
+- cgerqf
+- cgesc2
+- cgesdd
+- cgesv
+- cgesvd
+- cgesvx
+- cgetc2
+- cgetf2
+- cgetrf
+- cgetri
+- cgetrs
+- cggbak
+- cggbal
+- cgges
+- cggesx
+- cggev
+- cggevx
+- cggglm
+- cgghrd
+- cgglse
+- cggqrf
+- cggrqf
+- cgtcon
+- cgtrfs
+- cgtsv
+- cgtsvx
+- cgttrf
+- cgttrs
+- cgtts2
+- chbev
+- chbevd
+- chbevx
+- chbgst
+- chbgv
+- chbgvd
+- chbgvx
+- chbtrd
+- checon
+- cheequb
+- cheev
+- cheevd
+- cheevr
+- cheevx
+- chegs2
+- chegst
+- chegv
+- chegvd
+- chegvx
+- cherfs
+- chesv
+- chesvx
+- cheswapr
+- chetd2
+- chetf2
+- chetrd
+- chetrf
+- chetri
+- chetri2
+- chetri2x
+- chetrs
+- chetrs2
+- chfrk
+- chgeqz
+- chla_transtype
+- chpcon
+- chpev
+- chpevd
+- chpevx
+- chpgst
+- chpgv
+- chpgvd
+- chpgvx
+- chprfs
+- chpsv
+- chpsvx
+- chptrd
+- chptrf
+- chptri
+- chptrs
+- chsein
+- chseqr
+- clabrd
+- clacgv
+- clacn2
+- clacon
+- clacp2
+- clacpy
+- clacrm
+- clacrt
+- cladiv
+- claed0
+- claed7
+- claed8
+- claein
+- claesy
+- claev2
+- clag2z
+- clags2
+- clagtm
+- clahef
+- clahqr
+- clahr2
+- claic1
+- clals0
+- clalsa
+- clalsd
+- clangb
+- clange
+- clangt
+- clanhb
+- clanhe
+- clanhf
+- clanhp
+- clanhs
+- clanht
+- clansb
+- clansp
+- clansy
+- clantb
+- clantp
+- clantr
+- clapll
+- clapmr
+- clapmt
+- claqgb
+- claqge
+- claqhb
+- claqhe
+- claqhp
+- claqp2
+- claqps
+- claqr0
+- claqr1
+- claqr2
+- claqr3
+- claqr4
+- claqr5
+- claqsb
+- claqsp
+- claqsy
+- clar1v
+- clar2v
+- clarcm
+- clarf
+- clarfb
+- clarfg
+- clarfgp
+- clarft
+- clarfx
+- clargv
+- clarnv
+- clarrv
+- clartg
+- clartv
+- clarz
+- clarzb
+- clarzt
+- clascl
+- claset
+- clasr
+- classq
+- claswp
+- clasyf
+- clatbs
+- clatdf
+- clatps
+- clatrd
+- clatrs
+- clatrz
+- clauu2
+- clauum
+- cpbcon
+- cpbequ
+- cpbrfs
+- cpbstf
+- cpbsv
+- cpbsvx
+- cpbtf2
+- cpbtrf
+- cpbtrs
+- cpftrf
+- cpftri
+- cpftrs
+- cpocon
+- cpoequ
+- cpoequb
+- cporfs
+- cposv
+- cposvx
+- cpotf2
+- cpotrf
+- cpotri
+- cpotrs
+- cppcon
+- cppequ
+- cpprfs
+- cppsv
+- cppsvx
+- cpptrf
+- cpptri
+- cpptrs
+- cpstf2
+- cpstrf
+- cptcon
+- cpteqr
+- cptrfs
+- cptsv
+- cptsvx
+- cpttrf
+- cpttrs
+- cptts2
+- crot
+- cspcon
+- cspmv
+- cspr
+- csprfs
+- cspsv
+- cspsvx
+- csptrf
+- csptri
+- csptrs
+- csrscl
+- cstedc
+- cstegr
+- cstein
+- cstemr
+- csteqr
+- csycon
+- csyconv
+- csyequb
+- csymv
+- csyr
+- csyrfs
+- csysv
+- csysvx
+- csyswapr
+- csytf2
+- csytrf
+- csytri
+- csytri2
+- csytri2x
+- csytrs
+- csytrs2
+- ctbcon
+- ctbrfs
+- ctbtrs
+- ctfsm
+- ctftri
+- ctfttp
+- ctfttr
+- ctgevc
+- ctgex2
+- ctgexc
+- ctgsen
+- ctgsja
+- ctgsna
+- ctgsy2
+- ctgsyl
+- ctpcon
+- ctpmqrt
+- ctpqrt
+- ctpqrt2
+- ctprfb
+- ctprfs
+- ctptri
+- ctptrs
+- ctpttf
+- ctpttr
+- ctrcon
+- ctrevc
+- ctrexc
+- ctrrfs
+- ctrsen
+- ctrsna
+- ctrsyl
+- ctrti2
+- ctrtri
+- ctrtrs
+- ctrttf
+- ctrttp
+- ctzrzf
+- cunbdb
+- cuncsd
+- cung2l
+- cung2r
+- cungbr
+- cunghr
+- cungl2
+- cunglq
+- cungql
+- cungqr
+- cungr2
+- cungrq
+- cungtr
+- cunm2l
+- cunm2r
+- cunmbr
+- cunmhr
+- cunml2
+- cunmlq
+- cunmql
+- cunmqr
+- cunmr2
+- cunmr3
+- cunmrq
+- cunmrz
+- cunmtr
+- cupgtr
+- cupmtr
+- dbbcsd
+- dbdsdc
+- dbdsqr
+- ddisna
+- dgbbrd
+- dgbcon
+- dgbequ
+- dgbequb
+- dgbrfs
+- dgbsv
+- dgbsvx
+- dgbtf2
+- dgbtrf
+- dgbtrs
+- dgebak
+- dgebal
+- dgebd2
+- dgebrd
+- dgecon
+- dgeequ
+- dgeequb
+- dgees
+- dgeesx
+- dgeev
+- dgeevx
+- dgehd2
+- dgehrd
+- dgejsv
+- dgelq2
+- dgelqf
+- dgels
+- dgelsd
+- dgelss
+- dgelsy
+- dgemqrt
+- dgeql2
+- dgeqlf
+- dgeqp3
+- dgeqr2
+- dgeqr2p
+- dgeqrf
+- dgeqrfp
+- dgeqrt
+- dgeqrt2
+- dgeqrt3
+- dgerfs
+- dgerq2
+- dgerqf
+- dgesc2
+- dgesdd
+- dgesv
+- dgesvd
+- dgesvj
+- dgesvx
+- dgetc2
+- dgetf2
+- dgetrf
+- dgetri
+- dgetrs
+- dggbak
+- dggbal
+- dgges
+- dggesx
+- dggev
+- dggevx
+- dggglm
+- dgghrd
+- dgglse
+- dggqrf
+- dggrqf
+- dgsvj0
+- dgsvj1
+- dgtcon
+- dgtrfs
+- dgtsv
+- dgtsvx
+- dgttrf
+- dgttrs
+- dgtts2
+- dhgeqz
+- dhsein
+- dhseqr
+- disnan
+- dlabad
+- dlabrd
+- dlacn2
+- dlacon
+- dlacpy
+- dladiv
+- dlae2
+- dlaebz
+- dlaed0
+- dlaed1
+- dlaed2
+- dlaed3
+- dlaed4
+- dlaed5
+- dlaed6
+- dlaed7
+- dlaed8
+- dlaed9
+- dlaeda
+- dlaein
+- dlaev2
+- dlaexc
+- dlag2
+- dlag2s
+- dlags2
+- dlagtf
+- dlagtm
+- dlagts
+- dlagv2
+- dlahqr
+- dlahr2
+- dlaic1
+- dlaln2
+- dlals0
+- dlalsa
+- dlalsd
+- dlamch
+- dlamrg
+- dlaneg
+- dlangb
+- dlange
+- dlangt
+- dlanhs
+- dlansb
+- dlansf
+- dlansp
+- dlanst
+- dlansy
+- dlantb
+- dlantp
+- dlantr
+- dlanv2
+- dlapll
+- dlapmr
+- dlapmt
+- dlapy2
+- dlapy3
+- dlaqgb
+- dlaqge
+- dlaqp2
+- dlaqps
+- dlaqr0
+- dlaqr1
+- dlaqr2
+- dlaqr3
+- dlaqr4
+- dlaqr5
+- dlaqsb
+- dlaqsp
+- dlaqsy
+- dlaqtr
+- dlar1v
+- dlar2v
+- dlarf
+- dlarfb
+- dlarfg
+- dlarfgp
+- dlarft
+- dlarfx
+- dlargv
+- dlarnv
+- dlarra
+- dlarrb
+- dlarrc
+- dlarrd
+- dlarre
+- dlarrf
+- dlarrj
+- dlarrk
+- dlarrr
+- dlarrv
+- dlartg
+- dlartgp
+- dlartgs
+- dlartv
+- dlaruv
+- dlarz
+- dlarzb
+- dlarzt
+- dlas2
+- dlascl
+- dlasd0
+- dlasd1
+- dlasd2
+- dlasd3
+- dlasd4
+- dlasd5
+- dlasd6
+- dlasd7
+- dlasd8
+- dlasda
+- dlasdq
+- dlasdt
+- dlaset
+- dlasq1
+- dlasq2
+- dlasq3
+- dlasq4
+- dlasq6
+- dlasr
+- dlasrt
+- dlassq
+- dlasv2
+- dlaswp
+- dlasy2
+- dlasyf
+- dlat2s
+- dlatbs
+- dlatdf
+- dlatps
+- dlatrd
+- dlatrs
+- dlatrz
+- dlauu2
+- dlauum
+- dopgtr
+- dopmtr
+- dorbdb
+- dorcsd
+- dorg2l
+- dorg2r
+- dorgbr
+- dorghr
+- dorgl2
+- dorglq
+- dorgql
+- dorgqr
+- dorgr2
+- dorgrq
+- dorgtr
+- dorm2l
+- dorm2r
+- dormbr
+- dormhr
+- dorml2
+- dormlq
+- dormql
+- dormqr
+- dormr2
+- dormr3
+- dormrq
+- dormrz
+- dormtr
+- dpbcon
+- dpbequ
+- dpbrfs
+- dpbstf
+- dpbsv
+- dpbsvx
+- dpbtf2
+- dpbtrf
+- dpbtrs
+- dpftrf
+- dpftri
+- dpftrs
+- dpocon
+- dpoequ
+- dpoequb
+- dporfs
+- dposv
+- dposvx
+- dpotf2
+- dpotrf
+- dpotri
+- dpotrs
+- dppcon
+- dppequ
+- dpprfs
+- dppsv
+- dppsvx
+- dpptrf
+- dpptri
+- dpptrs
+- dpstf2
+- dpstrf
+- dptcon
+- dpteqr
+- dptrfs
+- dptsv
+- dptsvx
+- dpttrf
+- dpttrs
+- dptts2
+- drscl
+- dsbev
+- dsbevd
+- dsbevx
+- dsbgst
+- dsbgv
+- dsbgvd
+- dsbgvx
+- dsbtrd
+- dsfrk
+- dsgesv
+- dspcon
+- dspev
+- dspevd
+- dspevx
+- dspgst
+- dspgv
+- dspgvd
+- dspgvx
+- dsposv
+- dsprfs
+- dspsv
+- dspsvx
+- dsptrd
+- dsptrf
+- dsptri
+- dsptrs
+- dstebz
+- dstedc
+- dstegr
+- dstein
+- dstemr
+- dsteqr
+- dsterf
+- dstev
+- dstevd
+- dstevr
+- dstevx
+- dsycon
+- dsyconv
+- dsyequb
+- dsyev
+- dsyevd
+- dsyevr
+- dsyevx
+- dsygs2
+- dsygst
+- dsygv
+- dsygvd
+- dsygvx
+- dsyrfs
+- dsysv
+- dsysvx
+- dsyswapr
+- dsytd2
+- dsytf2
+- dsytrd
+- dsytrf
+- dsytri
+- dsytri2
+- dsytri2x
+- dsytrs
+- dsytrs2
+- dtbcon
+- dtbrfs
+- dtbtrs
+- dtfsm
+- dtftri
+- dtfttp
+- dtfttr
+- dtgevc
+- dtgex2
+- dtgexc
+- dtgsen
+- dtgsja
+- dtgsna
+- dtgsy2
+- dtgsyl
+- dtpcon
+- dtpmqrt
+- dtpqrt
+- dtpqrt2
+- dtprfb
+- dtprfs
+- dtptri
+- dtptrs
+- dtpttf
+- dtpttr
+- dtrcon
+- dtrevc
+- dtrexc
+- dtrrfs
+- dtrsen
+- dtrsna
+- dtrsyl
+- dtrti2
+- dtrtri
+- dtrtrs
+- dtrttf
+- dtrttp
+- dtzrzf
+- dzsum1
+- icmax1
+- ieeeck
+- ilaclc
+- ilaclr
+- iladiag
+- iladlc
+- iladlr
+- ilaprec
+- ilaslc
+- ilaslr
+- ilatrans
+- ilauplo
+- ilaver
+- ilazlc
+- ilazlr
+- izmax1
+- sbbcsd
+- sbdsdc
+- sbdsqr
+- scsum1
+- sdisna
+- sgbbrd
+- sgbcon
+- sgbequ
+- sgbequb
+- sgbrfs
+- sgbsv
+- sgbsvx
+- sgbtf2
+- sgbtrf
+- sgbtrs
+- sgebak
+- sgebal
+- sgebd2
+- sgebrd
+- sgecon
+- sgeequ
+- sgeequb
+- sgees
+- sgeesx
+- sgeev
+- sgeevx
+- sgehd2
+- sgehrd
+- sgejsv
+- sgelq2
+- sgelqf
+- sgels
+- sgelsd
+- sgelss
+- sgelsy
+- sgemqrt
+- sgeql2
+- sgeqlf
+- sgeqp3
+- sgeqr2
+- sgeqr2p
+- sgeqrf
+- sgeqrfp
+- sgeqrt
+- sgeqrt2
+- sgeqrt3
+- sgerfs
+- sgerq2
+- sgerqf
+- sgesc2
+- sgesdd
+- sgesv
+- sgesvd
+- sgesvj
+- sgesvx
+- sgetc2
+- sgetf2
+- sgetrf
+- sgetri
+- sgetrs
+- sggbak
+- sggbal
+- sgges
+- sggesx
+- sggev
+- sggevx
+- sggglm
+- sgghrd
+- sgglse
+- sggqrf
+- sggrqf
+- sgsvj0
+- sgsvj1
+- sgtcon
+- sgtrfs
+- sgtsv
+- sgtsvx
+- sgttrf
+- sgttrs
+- sgtts2
+- shgeqz
+- shsein
+- shseqr
+- slabad
+- slabrd
+- slacn2
+- slacon
+- slacpy
+- sladiv
+- slae2
+- slaebz
+- slaed0
+- slaed1
+- slaed2
+- slaed3
+- slaed4
+- slaed5
+- slaed6
+- slaed7
+- slaed8
+- slaed9
+- slaeda
+- slaein
+- slaev2
+- slaexc
+- slag2
+- slag2d
+- slags2
+- slagtf
+- slagtm
+- slagts
+- slagv2
+- slahqr
+- slahr2
+- slaic1
+- slaln2
+- slals0
+- slalsa
+- slalsd
+- slamch
+- slamrg
+- slangb
+- slange
+- slangt
+- slanhs
+- slansb
+- slansf
+- slansp
+- slanst
+- slansy
+- slantb
+- slantp
+- slantr
+- slanv2
+- slapll
+- slapmr
+- slapmt
+- slapy2
+- slapy3
+- slaqgb
+- slaqge
+- slaqp2
+- slaqps
+- slaqr0
+- slaqr1
+- slaqr2
+- slaqr3
+- slaqr4
+- slaqr5
+- slaqsb
+- slaqsp
+- slaqsy
+- slaqtr
+- slar1v
+- slar2v
+- slarf
+- slarfb
+- slarfg
+- slarfgp
+- slarft
+- slarfx
+- slargv
+- slarnv
+- slarra
+- slarrb
+- slarrc
+- slarrd
+- slarre
+- slarrf
+- slarrj
+- slarrk
+- slarrr
+- slarrv
+- slartg
+- slartgp
+- slartgs
+- slartv
+- slaruv
+- slarz
+- slarzb
+- slarzt
+- slas2
+- slascl
+- slasd0
+- slasd1
+- slasd2
+- slasd3
+- slasd4
+- slasd5
+- slasd6
+- slasd7
+- slasd8
+- slasda
+- slasdq
+- slasdt
+- slaset
+- slasq1
+- slasq2
+- slasq3
+- slasq4
+- slasq6
+- slasr
+- slasrt
+- slassq
+- slasv2
+- slaswp
+- slasy2
+- slasyf
+- slatbs
+- slatdf
+- slatps
+- slatrd
+- slatrs
+- slatrz
+- slauu2
+- slauum
+- sopgtr
+- sopmtr
+- sorbdb
+- sorcsd
+- sorg2l
+- sorg2r
+- sorgbr
+- sorghr
+- sorgl2
+- sorglq
+- sorgql
+- sorgqr
+- sorgr2
+- sorgrq
+- sorgtr
+- sorm2l
+- sorm2r
+- sormbr
+- sormhr
+- sorml2
+- sormlq
+- sormql
+- sormqr
+- sormr2
+- sormr3
+- sormrq
+- sormrz
+- sormtr
+- spbcon
+- spbequ
+- spbrfs
+- spbstf
+- spbsv
+- spbsvx
+- spbtf2
+- spbtrf
+- spbtrs
+- spftrf
+- spftri
+- spftrs
+- spocon
+- spoequ
+- spoequb
+- sporfs
+- sposv
+- sposvx
+- spotf2
+- spotrf
+- spotri
+- spotrs
+- sppcon
+- sppequ
+- spprfs
+- sppsv
+- sppsvx
+- spptrf
+- spptri
+- spptrs
+- spstf2
+- spstrf
+- sptcon
+- spteqr
+- sptrfs
+- sptsv
+- sptsvx
+- spttrf
+- spttrs
+- sptts2
+- srscl
+- ssbev
+- ssbevd
+- ssbevx
+- ssbgst
+- ssbgv
+- ssbgvd
+- ssbgvx
+- ssbtrd
+- ssfrk
+- sspcon
+- sspev
+- sspevd
+- sspevx
+- sspgst
+- sspgv
+- sspgvd
+- sspgvx
+- ssprfs
+- sspsv
+- sspsvx
+- ssptrd
+- ssptrf
+- ssptri
+- ssptrs
+- sstebz
+- sstedc
+- sstegr
+- sstein
+- sstemr
+- ssteqr
+- ssterf
+- sstev
+- sstevd
+- sstevr
+- sstevx
+- ssycon
+- ssyconv
+- ssyequb
+- ssyev
+- ssyevd
+- ssyevr
+- ssyevx
+- ssygs2
+- ssygst
+- ssygv
+- ssygvd
+- ssygvx
+- ssyrfs
+- ssysv
+- ssysvx
+- ssyswapr
+- ssytd2
+- ssytf2
+- ssytrd
+- ssytrf
+- ssytri
+- ssytri2
+- ssytri2x
+- ssytrs
+- ssytrs2
+- stbcon
+- stbrfs
+- stbtrs
+- stfsm
+- stftri
+- stfttp
+- stfttr
+- stgevc
+- stgex2
+- stgexc
+- stgsen
+- stgsja
+- stgsna
+- stgsy2
+- stgsyl
+- stpcon
+- stpmqrt
+- stpqrt
+- stpqrt2
+- stprfb
+- stprfs
+- stptri
+- stptrs
+- stpttf
+- stpttr
+- strcon
+- strevc
+- strexc
+- strrfs
+- strsen
+- strsna
+- strsyl
+- strti2
+- strtri
+- strtrs
+- strttf
+- strttp
+- stzrzf
+- xerbla_array
+- zbbcsd
+- zbdsqr
+- zcgesv
+- zcposv
+- zdrscl
+- zgbbrd
+- zgbcon
+- zgbequ
+- zgbequb
+- zgbrfs
+- zgbsv
+- zgbsvx
+- zgbtf2
+- zgbtrf
+- zgbtrs
+- zgebak
+- zgebal
+- zgebd2
+- zgebrd
+- zgecon
+- zgeequ
+- zgeequb
+- zgees
+- zgeesx
+- zgeev
+- zgeevx
+- zgehd2
+- zgehrd
+- zgelq2
+- zgelqf
+- zgels
+- zgelsd
+- zgelss
+- zgelsy
+- zgemqrt
+- zgeql2
+- zgeqlf
+- zgeqp3
+- zgeqr2
+- zgeqr2p
+- zgeqrf
+- zgeqrfp
+- zgeqrt
+- zgeqrt2
+- zgeqrt3
+- zgerfs
+- zgerq2
+- zgerqf
+- zgesc2
+- zgesdd
+- zgesv
+- zgesvd
+- zgesvx
+- zgetc2
+- zgetf2
+- zgetrf
+- zgetri
+- zgetrs
+- zggbak
+- zggbal
+- zgges
+- zggesx
+- zggev
+- zggevx
+- zggglm
+- zgghrd
+- zgglse
+- zggqrf
+- zggrqf
+- zgtcon
+- zgtrfs
+- zgtsv
+- zgtsvx
+- zgttrf
+- zgttrs
+- zgtts2
+- zhbev
+- zhbevd
+- zhbevx
+- zhbgst
+- zhbgv
+- zhbgvd
+- zhbgvx
+- zhbtrd
+- zhecon
+- zheequb
+- zheev
+- zheevd
+- zheevr
+- zheevx
+- zhegs2
+- zhegst
+- zhegv
+- zhegvd
+- zhegvx
+- zherfs
+- zhesv
+- zhesvx
+- zheswapr
+- zhetd2
+- zhetf2
+- zhetrd
+- zhetrf
+- zhetri
+- zhetri2
+- zhetri2x
+- zhetrs
+- zhetrs2
+- zhfrk
+- zhgeqz
+- zhpcon
+- zhpev
+- zhpevd
+- zhpevx
+- zhpgst
+- zhpgv
+- zhpgvd
+- zhpgvx
+- zhprfs
+- zhpsv
+- zhpsvx
+- zhptrd
+- zhptrf
+- zhptri
+- zhptrs
+- zhsein
+- zhseqr
+- zlabrd
+- zlacgv
+- zlacn2
+- zlacon
+- zlacp2
+- zlacpy
+- zlacrm
+- zlacrt
+- zladiv
+- zlaed0
+- zlaed7
+- zlaed8
+- zlaein
+- zlaesy
+- zlaev2
+- zlag2c
+- zlags2
+- zlagtm
+- zlahef
+- zlahqr
+- zlahr2
+- zlaic1
+- zlals0
+- zlalsa
+- zlalsd
+- zlangb
+- zlange
+- zlangt
+- zlanhb
+- zlanhe
+- zlanhf
+- zlanhp
+- zlanhs
+- zlanht
+- zlansb
+- zlansp
+- zlansy
+- zlantb
+- zlantp
+- zlantr
+- zlapll
+- zlapmr
+- zlapmt
+- zlaqgb
+- zlaqge
+- zlaqhb
+- zlaqhe
+- zlaqhp
+- zlaqp2
+- zlaqps
+- zlaqr0
+- zlaqr1
+- zlaqr2
+- zlaqr3
+- zlaqr4
+- zlaqr5
+- zlaqsb
+- zlaqsp
+- zlaqsy
+- zlar1v
+- zlar2v
+- zlarcm
+- zlarf
+- zlarfb
+- zlarfg
+- zlarfgp
+- zlarft
+- zlarfx
+- zlargv
+- zlarnv
+- zlarrv
+- zlartg
+- zlartv
+- zlarz
+- zlarzb
+- zlarzt
+- zlascl
+- zlaset
+- zlasr
+- zlassq
+- zlaswp
+- zlasyf
+- zlat2c
+- zlatbs
+- zlatdf
+- zlatps
+- zlatrd
+- zlatrs
+- zlatrz
+- zlauu2
+- zlauum
+- zpbcon
+- zpbequ
+- zpbrfs
+- zpbstf
+- zpbsv
+- zpbsvx
+- zpbtf2
+- zpbtrf
+- zpbtrs
+- zpftrf
+- zpftri
+- zpftrs
+- zpocon
+- zpoequ
+- zpoequb
+- zporfs
+- zposv
+- zposvx
+- zpotf2
+- zpotrf
+- zpotri
+- zpotrs
+- zppcon
+- zppequ
+- zpprfs
+- zppsv
+- zppsvx
+- zpptrf
+- zpptri
+- zpptrs
+- zpstf2
+- zpstrf
+- zptcon
+- zpteqr
+- zptrfs
+- zptsv
+- zptsvx
+- zpttrf
+- zpttrs
+- zptts2
+- zrot
+- zspcon
+- zspmv
+- zspr
+- zsprfs
+- zspsv
+- zspsvx
+- zsptrf
+- zsptri
+- zsptrs
+- zstedc
+- zstegr
+- zstein
+- zstemr
+- zsteqr
+- zsycon
+- zsyconv
+- zsyequb
+- zsymv
+- zsyr
+- zsyrfs
+- zsysv
+- zsysvx
+- zsyswapr
+- zsytf2
+- zsytrf
+- zsytri
+- zsytri2
+- zsytri2x
+- zsytrs
+- zsytrs2
+- ztbcon
+- ztbrfs
+- ztbtrs
+- ztfsm
+- ztftri
+- ztfttp
+- ztfttr
+- ztgevc
+- ztgex2
+- ztgexc
+- ztgsen
+- ztgsja
+- ztgsna
+- ztgsy2
+- ztgsyl
+- ztpcon
+- ztpmqrt
+- ztpqrt
+- ztpqrt2
+- ztprfb
+- ztprfs
+- ztptri
+- ztptrs
+- ztpttf
+- ztpttr
+- ztrcon
+- ztrevc
+- ztrexc
+- ztrrfs
+- ztrsen
+- ztrsna
+- ztrsyl
+- ztrti2
+- ztrtri
+- ztrtrs
+- ztrttf
+- ztrttp
+- ztzrzf
+- zunbdb
+- zuncsd
+- zung2l
+- zung2r
+- zungbr
+- zunghr
+- zungl2
+- zunglq
+- zungql
+- zungqr
+- zungr2
+- zungrq
+- zungtr
+- zunm2l
+- zunm2r
+- zunmbr
+- zunmhr
+- zunml2
+- zunmlq
+- zunmql
+- zunmqr
+- zunmr2
+- zunmr3
+- zunmrq
+- zunmrz
+- zunmtr
+- zupgtr
+- zupmtr
+
+
+"""
+
+# Within SciPy, these wrappers can be used via relative or absolute cimport.
+# Examples:
+# from ..linalg cimport cython_lapack
+# from scipy.linalg cimport cython_lapack
+# cimport scipy.linalg.cython_lapack as cython_lapack
+# cimport ..linalg.cython_lapack as cython_lapack
+
+# Within SciPy, if LAPACK functions are needed in C/C++/Fortran,
+# these wrappers should not be used.
+# The original libraries should be linked directly.
+
+cdef extern from "fortran_defs.h":
+    pass
+
+from numpy cimport npy_complex64, npy_complex128
+
+cdef extern from "_lapack_subroutines.h":
+    # Function pointer type declarations for
+    # gees and gges families of functions.
+    ctypedef bint _cselect1(npy_complex64*)
+    ctypedef bint _cselect2(npy_complex64*, npy_complex64*)
+    ctypedef bint _dselect2(d*, d*)
+    ctypedef bint _dselect3(d*, d*, d*)
+    ctypedef bint _sselect2(s*, s*)
+    ctypedef bint _sselect3(s*, s*, s*)
+    ctypedef bint _zselect1(npy_complex128*)
+    ctypedef bint _zselect2(npy_complex128*, npy_complex128*)
+
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cbbcsd "BLAS_FUNC(cbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) nogil
+cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) noexcept nogil:
+    
+    _fortran_cbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, lrwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cbdsqr "BLAS_FUNC(cbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, npy_complex64 *vt, int *ldvt, npy_complex64 *u, int *ldu, npy_complex64 *c, int *ldc, s *rwork, int *info) nogil
+cdef void cbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, c *vt, int *ldvt, c *u, int *ldu, c *c, int *ldc, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbbrd "BLAS_FUNC(cgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *pt, int *ldpt, npy_complex64 *c, int *ldc, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *pt, int *ldpt, c *c, int *ldc, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbcon "BLAS_FUNC(cgbcon)"(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgbcon(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbequ "BLAS_FUNC(cgbequ)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void cgbequ(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbequb "BLAS_FUNC(cgbequb)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void cgbequb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbrfs "BLAS_FUNC(cgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbsv "BLAS_FUNC(cgbsv)"(int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgbsv(int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbsvx "BLAS_FUNC(cgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbtf2 "BLAS_FUNC(cgbtf2)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void cgbtf2(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_cgbtf2(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbtrf "BLAS_FUNC(cgbtrf)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void cgbtrf(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_cgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgbtrs "BLAS_FUNC(cgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex64 *ab, int *ldab, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, c *ab, int *ldab, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgebak "BLAS_FUNC(cgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, npy_complex64 *v, int *ldv, int *info) nogil
+cdef void cgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, c *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_cgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgebal "BLAS_FUNC(cgebal)"(char *job, int *n, npy_complex64 *a, int *lda, int *ilo, int *ihi, s *scale, int *info) nogil
+cdef void cgebal(char *job, int *n, c *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil:
+    
+    _fortran_cgebal(job, n, a, lda, ilo, ihi, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgebd2 "BLAS_FUNC(cgebd2)"(int *m, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *info) nogil
+cdef void cgebd2(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgebrd "BLAS_FUNC(cgebrd)"(int *m, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgebrd(int *m, int *n, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgecon "BLAS_FUNC(cgecon)"(char *norm, int *n, npy_complex64 *a, int *lda, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgecon(char *norm, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgecon(norm, n, a, lda, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeequ "BLAS_FUNC(cgeequ)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void cgeequ(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeequb "BLAS_FUNC(cgeequb)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void cgeequb(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgees "BLAS_FUNC(cgees)"(char *jobvs, char *sort, _cselect1 *select, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil
+cdef void cgees(char *jobvs, char *sort, cselect1 *select, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_cgees(jobvs, sort, <_cselect1*>select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeesx "BLAS_FUNC(cgeesx)"(char *jobvs, char *sort, _cselect1 *select, char *sense, int *n, npy_complex64 *a, int *lda, int *sdim, npy_complex64 *w, npy_complex64 *vs, int *ldvs, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil
+cdef void cgeesx(char *jobvs, char *sort, cselect1 *select, char *sense, int *n, c *a, int *lda, int *sdim, c *w, c *vs, int *ldvs, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_cgeesx(jobvs, sort, <_cselect1*>select, sense, n, a, lda, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeev "BLAS_FUNC(cgeev)"(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgeev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgeev(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeevx "BLAS_FUNC(cgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgeevx(balanc, jobvl, jobvr, sense, n, a, lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgehd2 "BLAS_FUNC(cgehd2)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgehd2(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgehd2(n, ilo, ihi, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgehrd "BLAS_FUNC(cgehrd)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgehrd(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgelq2 "BLAS_FUNC(cgelq2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgelq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgelq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgelqf "BLAS_FUNC(cgelqf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgelqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgelqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgels "BLAS_FUNC(cgels)"(char *trans, int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgels(char *trans, int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgelsd "BLAS_FUNC(cgelsd)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *s, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *info) nogil
+cdef void cgelsd(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_cgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgelss "BLAS_FUNC(cgelss)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *s, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgelss(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, s *s, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgelsy "BLAS_FUNC(cgelsy)"(int *m, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *jpvt, s *rcond, int *rank, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgelsy(int *m, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *jpvt, s *rcond, int *rank, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgemqrt "BLAS_FUNC(cgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeql2 "BLAS_FUNC(cgeql2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgeql2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgeql2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqlf "BLAS_FUNC(cgeqlf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgeqlf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgeqlf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqp3 "BLAS_FUNC(cgeqp3)"(int *m, int *n, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgeqp3(int *m, int *n, c *a, int *lda, int *jpvt, c *tau, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqr2 "BLAS_FUNC(cgeqr2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgeqr2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgeqr2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqr2p "BLAS_FUNC(cgeqr2p)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgeqr2p(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgeqr2p(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqrf "BLAS_FUNC(cgeqrf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgeqrf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgeqrf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqrfp "BLAS_FUNC(cgeqrfp)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgeqrfp(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgeqrfp(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqrt "BLAS_FUNC(cgeqrt)"(int *m, int *n, int *nb, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info) nogil
+cdef void cgeqrt(int *m, int *n, int *nb, c *a, int *lda, c *t, int *ldt, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgeqrt(m, n, nb, a, lda, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqrt2 "BLAS_FUNC(cgeqrt2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info) nogil
+cdef void cgeqrt2(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_cgeqrt2(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgeqrt3 "BLAS_FUNC(cgeqrt3)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *t, int *ldt, int *info) nogil
+cdef void cgeqrt3(int *m, int *n, c *a, int *lda, c *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_cgeqrt3(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgerfs "BLAS_FUNC(cgerfs)"(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgerfs(char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgerq2 "BLAS_FUNC(cgerq2)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cgerq2(int *m, int *n, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgerq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgerqf "BLAS_FUNC(cgerqf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgerqf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgerqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgesc2 "BLAS_FUNC(cgesc2)"(int *n, npy_complex64 *a, int *lda, npy_complex64 *rhs, int *ipiv, int *jpiv, s *scale) nogil
+cdef void cgesc2(int *n, c *a, int *lda, c *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil:
+    
+    _fortran_cgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgesdd "BLAS_FUNC(cgesdd)"(char *jobz, int *m, int *n, npy_complex64 *a, int *lda, s *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *info) nogil
+cdef void cgesdd(char *jobz, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_cgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgesv "BLAS_FUNC(cgesv)"(int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgesv(int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgesvd "BLAS_FUNC(cgesvd)"(char *jobu, char *jobvt, int *m, int *n, npy_complex64 *a, int *lda, s *s, npy_complex64 *u, int *ldu, npy_complex64 *vt, int *ldvt, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cgesvd(char *jobu, char *jobvt, int *m, int *n, c *a, int *lda, s *s, c *u, int *ldu, c *vt, int *ldvt, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgesvx "BLAS_FUNC(cgesvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgesvx(char *fact, char *trans, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgetc2 "BLAS_FUNC(cgetc2)"(int *n, npy_complex64 *a, int *lda, int *ipiv, int *jpiv, int *info) nogil
+cdef void cgetc2(int *n, c *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil:
+    
+    _fortran_cgetc2(n, a, lda, ipiv, jpiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgetf2 "BLAS_FUNC(cgetf2)"(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil
+cdef void cgetf2(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_cgetf2(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgetrf "BLAS_FUNC(cgetrf)"(int *m, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil
+cdef void cgetrf(int *m, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_cgetrf(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgetri "BLAS_FUNC(cgetri)"(int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgetri(int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgetri(n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgetrs "BLAS_FUNC(cgetrs)"(char *trans, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgetrs(char *trans, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggbak "BLAS_FUNC(cggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, npy_complex64 *v, int *ldv, int *info) nogil
+cdef void cggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, c *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_cggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggbal "BLAS_FUNC(cggbal)"(char *job, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) nogil
+cdef void cggbal(char *job, int *n, c *a, int *lda, c *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil:
+    
+    _fortran_cggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgges "BLAS_FUNC(cgges)"(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, npy_complex64 *work, int *lwork, s *rwork, bint *bwork, int *info) nogil
+cdef void cgges(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, c *work, int *lwork, s *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_cgges(jobvsl, jobvsr, sort, <_cselect2*>selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggesx "BLAS_FUNC(cggesx)"(char *jobvsl, char *jobvsr, char *sort, _cselect2 *selctg, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *sdim, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vsl, int *ldvsl, npy_complex64 *vsr, int *ldvsr, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void cggesx(char *jobvsl, char *jobvsr, char *sort, cselect2 *selctg, char *sense, int *n, c *a, int *lda, c *b, int *ldb, int *sdim, c *alpha, c *beta, c *vsl, int *ldvsl, c *vsr, int *ldvsr, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_cggesx(jobvsl, jobvsr, sort, <_cselect2*>selctg, sense, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggev "BLAS_FUNC(cggev)"(char *jobvl, char *jobvr, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cggev(char *jobvl, char *jobvr, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cggev(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggevx "BLAS_FUNC(cggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, npy_complex64 *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) nogil
+cdef void cggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *vl, int *ldvl, c *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, c *work, int *lwork, s *rwork, int *iwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_cggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggglm "BLAS_FUNC(cggglm)"(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *d, npy_complex64 *x, npy_complex64 *y, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cggglm(int *n, int *m, int *p, c *a, int *lda, c *b, int *ldb, c *d, c *x, c *y, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgghrd "BLAS_FUNC(cgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *info) nogil
+cdef void cgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_cgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgglse "BLAS_FUNC(cgglse)"(int *m, int *n, int *p, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, npy_complex64 *d, npy_complex64 *x, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cgglse(int *m, int *n, int *p, c *a, int *lda, c *b, int *ldb, c *c, c *d, c *x, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggqrf "BLAS_FUNC(cggqrf)"(int *n, int *m, int *p, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cggqrf(int *n, int *m, int *p, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cggrqf "BLAS_FUNC(cggrqf)"(int *m, int *p, int *n, npy_complex64 *a, int *lda, npy_complex64 *taua, npy_complex64 *b, int *ldb, npy_complex64 *taub, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cggrqf(int *m, int *p, int *n, c *a, int *lda, c *taua, c *b, int *ldb, c *taub, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgtcon "BLAS_FUNC(cgtcon)"(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil
+cdef void cgtcon(char *norm, int *n, c *dl, c *d, c *du, c *du2, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil:
+    
+    _fortran_cgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgtrfs "BLAS_FUNC(cgtrfs)"(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgtrfs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgtsv "BLAS_FUNC(cgtsv)"(int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgtsv(int *n, int *nrhs, c *dl, c *d, c *du, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgtsv(n, nrhs, dl, d, du, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgtsvx "BLAS_FUNC(cgtsvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *dlf, npy_complex64 *df, npy_complex64 *duf, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cgtsvx(char *fact, char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *dlf, c *df, c *duf, c *du2, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgttrf "BLAS_FUNC(cgttrf)"(int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, int *info) nogil
+cdef void cgttrf(int *n, c *dl, c *d, c *du, c *du2, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_cgttrf(n, dl, d, du, du2, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgttrs "BLAS_FUNC(cgttrs)"(char *trans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cgttrs(char *trans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cgtts2 "BLAS_FUNC(cgtts2)"(int *itrans, int *n, int *nrhs, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *du2, int *ipiv, npy_complex64 *b, int *ldb) nogil
+cdef void cgtts2(int *itrans, int *n, int *nrhs, c *dl, c *d, c *du, c *du2, int *ipiv, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_cgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbev "BLAS_FUNC(chbev)"(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chbev(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbevd "BLAS_FUNC(chbevd)"(char *jobz, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void chbevd(char *jobz, char *uplo, int *n, int *kd, c *ab, int *ldab, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_chbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbevx "BLAS_FUNC(chbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void chbevx(char *jobz, char *range, char *uplo, int *n, int *kd, c *ab, int *ldab, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_chbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbgst "BLAS_FUNC(chbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *x, int *ldx, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chbgst(char *vect, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *x, int *ldx, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbgv "BLAS_FUNC(chbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbgvd "BLAS_FUNC(chbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void chbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_chbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbgvx "BLAS_FUNC(chbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex64 *ab, int *ldab, npy_complex64 *bb, int *ldbb, npy_complex64 *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void chbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, c *ab, int *ldab, c *bb, int *ldbb, c *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_chbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chbtrd "BLAS_FUNC(chbtrd)"(char *vect, char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info) nogil
+cdef void chbtrd(char *vect, char *uplo, int *n, int *kd, c *ab, int *ldab, s *d, s *e, c *q, int *ldq, c *work, int *info) noexcept nogil:
+    
+    _fortran_chbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_checon "BLAS_FUNC(checon)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil
+cdef void checon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil:
+    
+    _fortran_checon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheequb "BLAS_FUNC(cheequb)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, npy_complex64 *work, int *info) nogil
+cdef void cheequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil:
+    
+    _fortran_cheequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheev "BLAS_FUNC(cheev)"(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, s *w, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void cheev(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheevd "BLAS_FUNC(cheevd)"(char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, s *w, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void cheevd(char *jobz, char *uplo, int *n, c *a, int *lda, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_cheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheevr "BLAS_FUNC(cheevr)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, int *isuppz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void cheevr(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_cheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheevx "BLAS_FUNC(cheevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void cheevx(char *jobz, char *range, char *uplo, int *n, c *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_cheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chegs2 "BLAS_FUNC(chegs2)"(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void chegs2(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_chegs2(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chegst "BLAS_FUNC(chegst)"(int *itype, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void chegst(int *itype, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_chegst(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chegv "BLAS_FUNC(chegv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *w, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void chegv(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chegv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chegvd "BLAS_FUNC(chegvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *w, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void chegvd(int *itype, char *jobz, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *w, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_chegvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chegvx "BLAS_FUNC(chegvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void chegvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *a, int *lda, c *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_chegvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cherfs "BLAS_FUNC(cherfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cherfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cherfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chesv "BLAS_FUNC(chesv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void chesv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_chesv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chesvx "BLAS_FUNC(chesvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void chesvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chesvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cheswapr "BLAS_FUNC(cheswapr)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2) nogil
+cdef void cheswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_cheswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetd2 "BLAS_FUNC(chetd2)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tau, int *info) nogil
+cdef void chetd2(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, int *info) noexcept nogil:
+    
+    _fortran_chetd2(uplo, n, a, lda, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetf2 "BLAS_FUNC(chetf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil
+cdef void chetf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_chetf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetrd "BLAS_FUNC(chetrd)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void chetrd(char *uplo, int *n, c *a, int *lda, s *d, s *e, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_chetrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetrf "BLAS_FUNC(chetrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void chetrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_chetrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetri "BLAS_FUNC(chetri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil
+cdef void chetri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil:
+    
+    _fortran_chetri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetri2 "BLAS_FUNC(chetri2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void chetri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_chetri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetri2x "BLAS_FUNC(chetri2x)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info) nogil
+cdef void chetri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_chetri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetrs "BLAS_FUNC(chetrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void chetrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_chetrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chetrs2 "BLAS_FUNC(chetrs2)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil
+cdef void chetrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil:
+    
+    _fortran_chetrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chfrk "BLAS_FUNC(chfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, npy_complex64 *a, int *lda, s *beta, npy_complex64 *c) nogil
+cdef void chfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, c *a, int *lda, s *beta, c *c) noexcept nogil:
+    
+    _fortran_chfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chgeqz "BLAS_FUNC(chgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *t, int *ldt, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void chgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *t, int *ldt, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    char _fortran_chla_transtype "BLAS_FUNC(chla_transtype)"(int *trans) nogil
+cdef char chla_transtype(int *trans) noexcept nogil:
+    
+    return _fortran_chla_transtype(trans)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpcon "BLAS_FUNC(chpcon)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil
+cdef void chpcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil:
+    
+    _fortran_chpcon(uplo, n, ap, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpev "BLAS_FUNC(chpev)"(char *jobz, char *uplo, int *n, npy_complex64 *ap, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chpev(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpevd "BLAS_FUNC(chpevd)"(char *jobz, char *uplo, int *n, npy_complex64 *ap, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void chpevd(char *jobz, char *uplo, int *n, c *ap, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_chpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpevx "BLAS_FUNC(chpevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void chpevx(char *jobz, char *range, char *uplo, int *n, c *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_chpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpgst "BLAS_FUNC(chpgst)"(int *itype, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, int *info) nogil
+cdef void chpgst(int *itype, char *uplo, int *n, c *ap, c *bp, int *info) noexcept nogil:
+    
+    _fortran_chpgst(itype, uplo, n, ap, bp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpgv "BLAS_FUNC(chpgv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chpgv(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chpgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpgvd "BLAS_FUNC(chpgvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void chpgvd(int *itype, char *jobz, char *uplo, int *n, c *ap, c *bp, s *w, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_chpgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpgvx "BLAS_FUNC(chpgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, npy_complex64 *work, s *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void chpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, c *ap, c *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, c *work, s *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_chpgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chprfs "BLAS_FUNC(chprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpsv "BLAS_FUNC(chpsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void chpsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_chpsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chpsvx "BLAS_FUNC(chpsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void chpsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_chpsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chptrd "BLAS_FUNC(chptrd)"(char *uplo, int *n, npy_complex64 *ap, s *d, s *e, npy_complex64 *tau, int *info) nogil
+cdef void chptrd(char *uplo, int *n, c *ap, s *d, s *e, c *tau, int *info) noexcept nogil:
+    
+    _fortran_chptrd(uplo, n, ap, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chptrf "BLAS_FUNC(chptrf)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info) nogil
+cdef void chptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_chptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chptri "BLAS_FUNC(chptri)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info) nogil
+cdef void chptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil:
+    
+    _fortran_chptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chptrs "BLAS_FUNC(chptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void chptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_chptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chsein "BLAS_FUNC(chsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *ifaill, int *ifailr, int *info) nogil
+cdef void chsein(char *side, char *eigsrc, char *initv, bint *select, int *n, c *h, int *ldh, c *w, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil:
+    
+    _fortran_chsein(side, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_chseqr "BLAS_FUNC(chseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void chseqr(char *job, char *compz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_chseqr(job, compz, n, ilo, ihi, h, ldh, w, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clabrd "BLAS_FUNC(clabrd)"(int *m, int *n, int *nb, npy_complex64 *a, int *lda, s *d, s *e, npy_complex64 *tauq, npy_complex64 *taup, npy_complex64 *x, int *ldx, npy_complex64 *y, int *ldy) nogil
+cdef void clabrd(int *m, int *n, int *nb, c *a, int *lda, s *d, s *e, c *tauq, c *taup, c *x, int *ldx, c *y, int *ldy) noexcept nogil:
+    
+    _fortran_clabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacgv "BLAS_FUNC(clacgv)"(int *n, npy_complex64 *x, int *incx) nogil
+cdef void clacgv(int *n, c *x, int *incx) noexcept nogil:
+    
+    _fortran_clacgv(n, x, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacn2 "BLAS_FUNC(clacn2)"(int *n, npy_complex64 *v, npy_complex64 *x, s *est, int *kase, int *isave) nogil
+cdef void clacn2(int *n, c *v, c *x, s *est, int *kase, int *isave) noexcept nogil:
+    
+    _fortran_clacn2(n, v, x, est, kase, isave)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacon "BLAS_FUNC(clacon)"(int *n, npy_complex64 *v, npy_complex64 *x, s *est, int *kase) nogil
+cdef void clacon(int *n, c *v, c *x, s *est, int *kase) noexcept nogil:
+    
+    _fortran_clacon(n, v, x, est, kase)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacp2 "BLAS_FUNC(clacp2)"(char *uplo, int *m, int *n, s *a, int *lda, npy_complex64 *b, int *ldb) nogil
+cdef void clacp2(char *uplo, int *m, int *n, s *a, int *lda, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_clacp2(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacpy "BLAS_FUNC(clacpy)"(char *uplo, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb) nogil
+cdef void clacpy(char *uplo, int *m, int *n, c *a, int *lda, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_clacpy(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacrm "BLAS_FUNC(clacrm)"(int *m, int *n, npy_complex64 *a, int *lda, s *b, int *ldb, npy_complex64 *c, int *ldc, s *rwork) nogil
+cdef void clacrm(int *m, int *n, c *a, int *lda, s *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil:
+    
+    _fortran_clacrm(m, n, a, lda, b, ldb, c, ldc, rwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clacrt "BLAS_FUNC(clacrt)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, npy_complex64 *c, npy_complex64 *s) nogil
+cdef void clacrt(int *n, c *cx, int *incx, c *cy, int *incy, c *c, c *s) noexcept nogil:
+    
+    _fortran_clacrt(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cladiv "F_FUNC(cladivwrp,CLADIVWRP)"(npy_complex64 *out, npy_complex64 *x, npy_complex64 *y) nogil
+cdef c cladiv(c *x, c *y) noexcept nogil:
+    cdef c out
+    _fortran_cladiv(&out, x, y)
+    return out
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claed0 "BLAS_FUNC(claed0)"(int *qsiz, int *n, s *d, s *e, npy_complex64 *q, int *ldq, npy_complex64 *qstore, int *ldqs, s *rwork, int *iwork, int *info) nogil
+cdef void claed0(int *qsiz, int *n, s *d, s *e, c *q, int *ldq, c *qstore, int *ldqs, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_claed0(qsiz, n, d, e, q, ldq, qstore, ldqs, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claed7 "BLAS_FUNC(claed7)"(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, npy_complex64 *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, npy_complex64 *work, s *rwork, int *iwork, int *info) nogil
+cdef void claed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, c *q, int *ldq, s *rho, int *indxq, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, c *work, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_claed7(n, cutpnt, qsiz, tlvls, curlvl, curpbm, d, q, ldq, rho, indxq, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claed8 "BLAS_FUNC(claed8)"(int *k, int *n, int *qsiz, npy_complex64 *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, npy_complex64 *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) nogil
+cdef void claed8(int *k, int *n, int *qsiz, c *q, int *ldq, s *d, s *rho, int *cutpnt, s *z, s *dlamda, c *q2, int *ldq2, s *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, s *givnum, int *info) noexcept nogil:
+    
+    _fortran_claed8(k, n, qsiz, q, ldq, d, rho, cutpnt, z, dlamda, q2, ldq2, w, indxp, indx, indxq, perm, givptr, givcol, givnum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claein "BLAS_FUNC(claein)"(bint *rightv, bint *noinit, int *n, npy_complex64 *h, int *ldh, npy_complex64 *w, npy_complex64 *v, npy_complex64 *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) nogil
+cdef void claein(bint *rightv, bint *noinit, int *n, c *h, int *ldh, c *w, c *v, c *b, int *ldb, s *rwork, s *eps3, s *smlnum, int *info) noexcept nogil:
+    
+    _fortran_claein(rightv, noinit, n, h, ldh, w, v, b, ldb, rwork, eps3, smlnum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claesy "BLAS_FUNC(claesy)"(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, npy_complex64 *rt1, npy_complex64 *rt2, npy_complex64 *evscal, npy_complex64 *cs1, npy_complex64 *sn1) nogil
+cdef void claesy(c *a, c *b, c *c, c *rt1, c *rt2, c *evscal, c *cs1, c *sn1) noexcept nogil:
+    
+    _fortran_claesy(a, b, c, rt1, rt2, evscal, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claev2 "BLAS_FUNC(claev2)"(npy_complex64 *a, npy_complex64 *b, npy_complex64 *c, s *rt1, s *rt2, s *cs1, npy_complex64 *sn1) nogil
+cdef void claev2(c *a, c *b, c *c, s *rt1, s *rt2, s *cs1, c *sn1) noexcept nogil:
+    
+    _fortran_claev2(a, b, c, rt1, rt2, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clag2z "BLAS_FUNC(clag2z)"(int *m, int *n, npy_complex64 *sa, int *ldsa, npy_complex128 *a, int *lda, int *info) nogil
+cdef void clag2z(int *m, int *n, c *sa, int *ldsa, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_clag2z(m, n, sa, ldsa, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clags2 "BLAS_FUNC(clags2)"(bint *upper, s *a1, npy_complex64 *a2, s *a3, s *b1, npy_complex64 *b2, s *b3, s *csu, npy_complex64 *snu, s *csv, npy_complex64 *snv, s *csq, npy_complex64 *snq) nogil
+cdef void clags2(bint *upper, s *a1, c *a2, s *a3, s *b1, c *b2, s *b3, s *csu, c *snu, s *csv, c *snv, s *csq, c *snq) noexcept nogil:
+    
+    _fortran_clags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clagtm "BLAS_FUNC(clagtm)"(char *trans, int *n, int *nrhs, s *alpha, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du, npy_complex64 *x, int *ldx, s *beta, npy_complex64 *b, int *ldb) nogil
+cdef void clagtm(char *trans, int *n, int *nrhs, s *alpha, c *dl, c *d, c *du, c *x, int *ldx, s *beta, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_clagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clahef "BLAS_FUNC(clahef)"(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info) nogil
+cdef void clahef(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_clahef(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clahqr "BLAS_FUNC(clahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *info) nogil
+cdef void clahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_clahqr(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clahr2 "BLAS_FUNC(clahr2)"(int *n, int *k, int *nb, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *t, int *ldt, npy_complex64 *y, int *ldy) nogil
+cdef void clahr2(int *n, int *k, int *nb, c *a, int *lda, c *tau, c *t, int *ldt, c *y, int *ldy) noexcept nogil:
+    
+    _fortran_clahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claic1 "BLAS_FUNC(claic1)"(int *job, int *j, npy_complex64 *x, s *sest, npy_complex64 *w, npy_complex64 *gamma, s *sestpr, npy_complex64 *s, npy_complex64 *c) nogil
+cdef void claic1(int *job, int *j, c *x, s *sest, c *w, c *gamma, s *sestpr, c *s, c *c) noexcept nogil:
+    
+    _fortran_claic1(job, j, x, sest, w, gamma, sestpr, s, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clals0 "BLAS_FUNC(clals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) nogil
+cdef void clals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_clals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clalsa "BLAS_FUNC(clalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex64 *b, int *ldb, npy_complex64 *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) nogil
+cdef void clalsa(int *icompq, int *smlsiz, int *n, int *nrhs, c *b, int *ldb, c *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_clalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clalsd "BLAS_FUNC(clalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, npy_complex64 *b, int *ldb, s *rcond, int *rank, npy_complex64 *work, s *rwork, int *iwork, int *info) nogil
+cdef void clalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, c *b, int *ldb, s *rcond, int *rank, c *work, s *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_clalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clangb "BLAS_FUNC(clangb)"(char *norm, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *work) nogil
+cdef s clangb(char *norm, int *n, int *kl, int *ku, c *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_clangb(norm, n, kl, ku, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clange "BLAS_FUNC(clange)"(char *norm, int *m, int *n, npy_complex64 *a, int *lda, s *work) nogil
+cdef s clange(char *norm, int *m, int *n, c *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_clange(norm, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clangt "BLAS_FUNC(clangt)"(char *norm, int *n, npy_complex64 *dl, npy_complex64 *d, npy_complex64 *du) nogil
+cdef s clangt(char *norm, int *n, c *dl, c *d, c *du) noexcept nogil:
+    
+    return _fortran_clangt(norm, n, dl, d, du)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanhb "BLAS_FUNC(clanhb)"(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil
+cdef s clanhb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_clanhb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanhe "BLAS_FUNC(clanhe)"(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, s *work) nogil
+cdef s clanhe(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_clanhe(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanhf "BLAS_FUNC(clanhf)"(char *norm, char *transr, char *uplo, int *n, npy_complex64 *a, s *work) nogil
+cdef s clanhf(char *norm, char *transr, char *uplo, int *n, c *a, s *work) noexcept nogil:
+    
+    return _fortran_clanhf(norm, transr, uplo, n, a, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanhp "BLAS_FUNC(clanhp)"(char *norm, char *uplo, int *n, npy_complex64 *ap, s *work) nogil
+cdef s clanhp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil:
+    
+    return _fortran_clanhp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanhs "BLAS_FUNC(clanhs)"(char *norm, int *n, npy_complex64 *a, int *lda, s *work) nogil
+cdef s clanhs(char *norm, int *n, c *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_clanhs(norm, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clanht "BLAS_FUNC(clanht)"(char *norm, int *n, s *d, npy_complex64 *e) nogil
+cdef s clanht(char *norm, int *n, s *d, c *e) noexcept nogil:
+    
+    return _fortran_clanht(norm, n, d, e)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clansb "BLAS_FUNC(clansb)"(char *norm, char *uplo, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil
+cdef s clansb(char *norm, char *uplo, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_clansb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clansp "BLAS_FUNC(clansp)"(char *norm, char *uplo, int *n, npy_complex64 *ap, s *work) nogil
+cdef s clansp(char *norm, char *uplo, int *n, c *ap, s *work) noexcept nogil:
+    
+    return _fortran_clansp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clansy "BLAS_FUNC(clansy)"(char *norm, char *uplo, int *n, npy_complex64 *a, int *lda, s *work) nogil
+cdef s clansy(char *norm, char *uplo, int *n, c *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_clansy(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clantb "BLAS_FUNC(clantb)"(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex64 *ab, int *ldab, s *work) nogil
+cdef s clantb(char *norm, char *uplo, char *diag, int *n, int *k, c *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_clantb(norm, uplo, diag, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clantp "BLAS_FUNC(clantp)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, s *work) nogil
+cdef s clantp(char *norm, char *uplo, char *diag, int *n, c *ap, s *work) noexcept nogil:
+    
+    return _fortran_clantp(norm, uplo, diag, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_clantr "BLAS_FUNC(clantr)"(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex64 *a, int *lda, s *work) nogil
+cdef s clantr(char *norm, char *uplo, char *diag, int *m, int *n, c *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_clantr(norm, uplo, diag, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clapll "BLAS_FUNC(clapll)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *ssmin) nogil
+cdef void clapll(int *n, c *x, int *incx, c *y, int *incy, s *ssmin) noexcept nogil:
+    
+    _fortran_clapll(n, x, incx, y, incy, ssmin)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clapmr "BLAS_FUNC(clapmr)"(bint *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k) nogil
+cdef void clapmr(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_clapmr(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clapmt "BLAS_FUNC(clapmt)"(bint *forwrd, int *m, int *n, npy_complex64 *x, int *ldx, int *k) nogil
+cdef void clapmt(bint *forwrd, int *m, int *n, c *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_clapmt(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqgb "BLAS_FUNC(claqgb)"(int *m, int *n, int *kl, int *ku, npy_complex64 *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil
+cdef void claqgb(int *m, int *n, int *kl, int *ku, c *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqge "BLAS_FUNC(claqge)"(int *m, int *n, npy_complex64 *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil
+cdef void claqge(int *m, int *n, c *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqhb "BLAS_FUNC(claqhb)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqhb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqhb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqhe "BLAS_FUNC(claqhe)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqhe(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqhe(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqhp "BLAS_FUNC(claqhp)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqhp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqhp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqp2 "BLAS_FUNC(claqp2)"(int *m, int *n, int *offset, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, s *vn1, s *vn2, npy_complex64 *work) nogil
+cdef void claqp2(int *m, int *n, int *offset, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *work) noexcept nogil:
+    
+    _fortran_claqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqps "BLAS_FUNC(claqps)"(int *m, int *n, int *offset, int *nb, int *kb, npy_complex64 *a, int *lda, int *jpvt, npy_complex64 *tau, s *vn1, s *vn2, npy_complex64 *auxv, npy_complex64 *f, int *ldf) nogil
+cdef void claqps(int *m, int *n, int *offset, int *nb, int *kb, c *a, int *lda, int *jpvt, c *tau, s *vn1, s *vn2, c *auxv, c *f, int *ldf) noexcept nogil:
+    
+    _fortran_claqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr0 "BLAS_FUNC(claqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void claqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_claqr0(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr1 "BLAS_FUNC(claqr1)"(int *n, npy_complex64 *h, int *ldh, npy_complex64 *s1, npy_complex64 *s2, npy_complex64 *v) nogil
+cdef void claqr1(int *n, c *h, int *ldh, c *s1, c *s2, c *v) noexcept nogil:
+    
+    _fortran_claqr1(n, h, ldh, s1, s2, v)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr2 "BLAS_FUNC(claqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork) nogil
+cdef void claqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil:
+    
+    _fortran_claqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr3 "BLAS_FUNC(claqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, int *ns, int *nd, npy_complex64 *sh, npy_complex64 *v, int *ldv, int *nh, npy_complex64 *t, int *ldt, int *nv, npy_complex64 *wv, int *ldwv, npy_complex64 *work, int *lwork) nogil
+cdef void claqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, int *ns, int *nd, c *sh, c *v, int *ldv, int *nh, c *t, int *ldt, int *nv, c *wv, int *ldwv, c *work, int *lwork) noexcept nogil:
+    
+    _fortran_claqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr4 "BLAS_FUNC(claqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex64 *h, int *ldh, npy_complex64 *w, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void claqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, c *h, int *ldh, c *w, int *iloz, int *ihiz, c *z, int *ldz, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_claqr4(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqr5 "BLAS_FUNC(claqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex64 *s, npy_complex64 *h, int *ldh, int *iloz, int *ihiz, npy_complex64 *z, int *ldz, npy_complex64 *v, int *ldv, npy_complex64 *u, int *ldu, int *nv, npy_complex64 *wv, int *ldwv, int *nh, npy_complex64 *wh, int *ldwh) nogil
+cdef void claqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, c *s, c *h, int *ldh, int *iloz, int *ihiz, c *z, int *ldz, c *v, int *ldv, c *u, int *ldu, int *nv, c *wv, int *ldwv, int *nh, c *wh, int *ldwh) noexcept nogil:
+    
+    _fortran_claqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, s, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqsb "BLAS_FUNC(claqsb)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqsb(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqsp "BLAS_FUNC(claqsp)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqsp(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqsp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claqsy "BLAS_FUNC(claqsy)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil
+cdef void claqsy(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_claqsy(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clar1v "BLAS_FUNC(clar1v)"(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, npy_complex64 *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) nogil
+cdef void clar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, c *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil:
+    
+    _fortran_clar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clar2v "BLAS_FUNC(clar2v)"(int *n, npy_complex64 *x, npy_complex64 *y, npy_complex64 *z, int *incx, s *c, npy_complex64 *s, int *incc) nogil
+cdef void clar2v(int *n, c *x, c *y, c *z, int *incx, s *c, c *s, int *incc) noexcept nogil:
+    
+    _fortran_clar2v(n, x, y, z, incx, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarcm "BLAS_FUNC(clarcm)"(int *m, int *n, s *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, s *rwork) nogil
+cdef void clarcm(int *m, int *n, s *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *rwork) noexcept nogil:
+    
+    _fortran_clarcm(m, n, a, lda, b, ldb, c, ldc, rwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarf "BLAS_FUNC(clarf)"(char *side, int *m, int *n, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil
+cdef void clarf(char *side, int *m, int *n, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil:
+    
+    _fortran_clarf(side, m, n, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarfb "BLAS_FUNC(clarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork) nogil
+cdef void clarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil:
+    
+    _fortran_clarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarfg "BLAS_FUNC(clarfg)"(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau) nogil
+cdef void clarfg(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil:
+    
+    _fortran_clarfg(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarfgp "BLAS_FUNC(clarfgp)"(int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *tau) nogil
+cdef void clarfgp(int *n, c *alpha, c *x, int *incx, c *tau) noexcept nogil:
+    
+    _fortran_clarfgp(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarft "BLAS_FUNC(clarft)"(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt) nogil
+cdef void clarft(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil:
+    
+    _fortran_clarft(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarfx "BLAS_FUNC(clarfx)"(char *side, int *m, int *n, npy_complex64 *v, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil
+cdef void clarfx(char *side, int *m, int *n, c *v, c *tau, c *c, int *ldc, c *work) noexcept nogil:
+    
+    _fortran_clarfx(side, m, n, v, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clargv "BLAS_FUNC(clargv)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *c, int *incc) nogil
+cdef void clargv(int *n, c *x, int *incx, c *y, int *incy, s *c, int *incc) noexcept nogil:
+    
+    _fortran_clargv(n, x, incx, y, incy, c, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarnv "BLAS_FUNC(clarnv)"(int *idist, int *iseed, int *n, npy_complex64 *x) nogil
+cdef void clarnv(int *idist, int *iseed, int *n, c *x) noexcept nogil:
+    
+    _fortran_clarnv(idist, iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarrv "BLAS_FUNC(clarrv)"(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, npy_complex64 *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) nogil
+cdef void clarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, c *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_clarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clartg "BLAS_FUNC(clartg)"(npy_complex64 *f, npy_complex64 *g, s *cs, npy_complex64 *sn, npy_complex64 *r) nogil
+cdef void clartg(c *f, c *g, s *cs, c *sn, c *r) noexcept nogil:
+    
+    _fortran_clartg(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clartv "BLAS_FUNC(clartv)"(int *n, npy_complex64 *x, int *incx, npy_complex64 *y, int *incy, s *c, npy_complex64 *s, int *incc) nogil
+cdef void clartv(int *n, c *x, int *incx, c *y, int *incy, s *c, c *s, int *incc) noexcept nogil:
+    
+    _fortran_clartv(n, x, incx, y, incy, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarz "BLAS_FUNC(clarz)"(char *side, int *m, int *n, int *l, npy_complex64 *v, int *incv, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work) nogil
+cdef void clarz(char *side, int *m, int *n, int *l, c *v, int *incv, c *tau, c *c, int *ldc, c *work) noexcept nogil:
+    
+    _fortran_clarz(side, m, n, l, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarzb "BLAS_FUNC(clarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *c, int *ldc, npy_complex64 *work, int *ldwork) nogil
+cdef void clarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *c, int *ldc, c *work, int *ldwork) noexcept nogil:
+    
+    _fortran_clarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clarzt "BLAS_FUNC(clarzt)"(char *direct, char *storev, int *n, int *k, npy_complex64 *v, int *ldv, npy_complex64 *tau, npy_complex64 *t, int *ldt) nogil
+cdef void clarzt(char *direct, char *storev, int *n, int *k, c *v, int *ldv, c *tau, c *t, int *ldt) noexcept nogil:
+    
+    _fortran_clarzt(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clascl "BLAS_FUNC(clascl)"(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void clascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_clascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claset "BLAS_FUNC(claset)"(char *uplo, int *m, int *n, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *a, int *lda) nogil
+cdef void claset(char *uplo, int *m, int *n, c *alpha, c *beta, c *a, int *lda) noexcept nogil:
+    
+    _fortran_claset(uplo, m, n, alpha, beta, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clasr "BLAS_FUNC(clasr)"(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, npy_complex64 *a, int *lda) nogil
+cdef void clasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, c *a, int *lda) noexcept nogil:
+    
+    _fortran_clasr(side, pivot, direct, m, n, c, s, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_classq "BLAS_FUNC(classq)"(int *n, npy_complex64 *x, int *incx, s *scale, s *sumsq) nogil
+cdef void classq(int *n, c *x, int *incx, s *scale, s *sumsq) noexcept nogil:
+    
+    _fortran_classq(n, x, incx, scale, sumsq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_claswp "BLAS_FUNC(claswp)"(int *n, npy_complex64 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil
+cdef void claswp(int *n, c *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil:
+    
+    _fortran_claswp(n, a, lda, k1, k2, ipiv, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clasyf "BLAS_FUNC(clasyf)"(char *uplo, int *n, int *nb, int *kb, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *w, int *ldw, int *info) nogil
+cdef void clasyf(char *uplo, int *n, int *nb, int *kb, c *a, int *lda, int *ipiv, c *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_clasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatbs "BLAS_FUNC(clatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex64 *ab, int *ldab, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil
+cdef void clatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, c *ab, int *ldab, c *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_clatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatdf "BLAS_FUNC(clatdf)"(int *ijob, int *n, npy_complex64 *z, int *ldz, npy_complex64 *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) nogil
+cdef void clatdf(int *ijob, int *n, c *z, int *ldz, c *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil:
+    
+    _fortran_clatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatps "BLAS_FUNC(clatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *ap, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil
+cdef void clatps(char *uplo, char *trans, char *diag, char *normin, int *n, c *ap, c *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_clatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatrd "BLAS_FUNC(clatrd)"(char *uplo, int *n, int *nb, npy_complex64 *a, int *lda, s *e, npy_complex64 *tau, npy_complex64 *w, int *ldw) nogil
+cdef void clatrd(char *uplo, int *n, int *nb, c *a, int *lda, s *e, c *tau, c *w, int *ldw) noexcept nogil:
+    
+    _fortran_clatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatrs "BLAS_FUNC(clatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex64 *a, int *lda, npy_complex64 *x, s *scale, s *cnorm, int *info) nogil
+cdef void clatrs(char *uplo, char *trans, char *diag, char *normin, int *n, c *a, int *lda, c *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_clatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clatrz "BLAS_FUNC(clatrz)"(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work) nogil
+cdef void clatrz(int *m, int *n, int *l, c *a, int *lda, c *tau, c *work) noexcept nogil:
+    
+    _fortran_clatrz(m, n, l, a, lda, tau, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clauu2 "BLAS_FUNC(clauu2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void clauu2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_clauu2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_clauum "BLAS_FUNC(clauum)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void clauum(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_clauum(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbcon "BLAS_FUNC(cpbcon)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cpbcon(char *uplo, int *n, int *kd, c *ab, int *ldab, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbequ "BLAS_FUNC(cpbequ)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, s *s, s *scond, s *amax, int *info) nogil
+cdef void cpbequ(char *uplo, int *n, int *kd, c *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbrfs "BLAS_FUNC(cpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cpbrfs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbstf "BLAS_FUNC(cpbstf)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil
+cdef void cpbstf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_cpbstf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbsv "BLAS_FUNC(cpbsv)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpbsv(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbsvx "BLAS_FUNC(cpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *afb, int *ldafb, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *afb, int *ldafb, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbtf2 "BLAS_FUNC(cpbtf2)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil
+cdef void cpbtf2(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_cpbtf2(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbtrf "BLAS_FUNC(cpbtrf)"(char *uplo, int *n, int *kd, npy_complex64 *ab, int *ldab, int *info) nogil
+cdef void cpbtrf(char *uplo, int *n, int *kd, c *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_cpbtrf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpbtrs "BLAS_FUNC(cpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpbtrs(char *uplo, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpftrf "BLAS_FUNC(cpftrf)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *info) nogil
+cdef void cpftrf(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil:
+    
+    _fortran_cpftrf(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpftri "BLAS_FUNC(cpftri)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *info) nogil
+cdef void cpftri(char *transr, char *uplo, int *n, c *a, int *info) noexcept nogil:
+    
+    _fortran_cpftri(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpftrs "BLAS_FUNC(cpftrs)"(char *transr, char *uplo, int *n, int *nrhs, npy_complex64 *a, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpftrs(char *transr, char *uplo, int *n, int *nrhs, c *a, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpftrs(transr, uplo, n, nrhs, a, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpocon "BLAS_FUNC(cpocon)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cpocon(char *uplo, int *n, c *a, int *lda, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpoequ "BLAS_FUNC(cpoequ)"(int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, int *info) nogil
+cdef void cpoequ(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cpoequ(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpoequb "BLAS_FUNC(cpoequb)"(int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, int *info) nogil
+cdef void cpoequb(int *n, c *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cpoequb(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cporfs "BLAS_FUNC(cporfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cporfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cposv "BLAS_FUNC(cposv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cposv(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cposv(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cposvx "BLAS_FUNC(cposvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cposvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpotf2 "BLAS_FUNC(cpotf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void cpotf2(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_cpotf2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpotrf "BLAS_FUNC(cpotrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void cpotrf(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_cpotrf(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpotri "BLAS_FUNC(cpotri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void cpotri(char *uplo, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_cpotri(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpotrs "BLAS_FUNC(cpotrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpotrs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cppcon "BLAS_FUNC(cppcon)"(char *uplo, int *n, npy_complex64 *ap, s *anorm, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cppcon(char *uplo, int *n, c *ap, s *anorm, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cppequ "BLAS_FUNC(cppequ)"(char *uplo, int *n, npy_complex64 *ap, s *s, s *scond, s *amax, int *info) nogil
+cdef void cppequ(char *uplo, int *n, c *ap, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_cppequ(uplo, n, ap, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpprfs "BLAS_FUNC(cpprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cpprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cppsv "BLAS_FUNC(cppsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cppsv(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cppsv(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cppsvx "BLAS_FUNC(cppsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, char *equed, s *s, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cppsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, char *equed, s *s, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpptrf "BLAS_FUNC(cpptrf)"(char *uplo, int *n, npy_complex64 *ap, int *info) nogil
+cdef void cpptrf(char *uplo, int *n, c *ap, int *info) noexcept nogil:
+    
+    _fortran_cpptrf(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpptri "BLAS_FUNC(cpptri)"(char *uplo, int *n, npy_complex64 *ap, int *info) nogil
+cdef void cpptri(char *uplo, int *n, c *ap, int *info) noexcept nogil:
+    
+    _fortran_cpptri(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpptrs "BLAS_FUNC(cpptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpptrs(char *uplo, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpptrs(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpstf2 "BLAS_FUNC(cpstf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil
+cdef void cpstf2(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil:
+    
+    _fortran_cpstf2(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpstrf "BLAS_FUNC(cpstrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil
+cdef void cpstrf(char *uplo, int *n, c *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil:
+    
+    _fortran_cpstrf(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cptcon "BLAS_FUNC(cptcon)"(int *n, s *d, npy_complex64 *e, s *anorm, s *rcond, s *rwork, int *info) nogil
+cdef void cptcon(int *n, s *d, c *e, s *anorm, s *rcond, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cptcon(n, d, e, anorm, rcond, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpteqr "BLAS_FUNC(cpteqr)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, s *work, int *info) nogil
+cdef void cpteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_cpteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cptrfs "BLAS_FUNC(cptrfs)"(char *uplo, int *n, int *nrhs, s *d, npy_complex64 *e, s *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cptrfs(char *uplo, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cptrfs(uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cptsv "BLAS_FUNC(cptsv)"(int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cptsv(int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cptsv(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cptsvx "BLAS_FUNC(cptsvx)"(char *fact, int *n, int *nrhs, s *d, npy_complex64 *e, s *df, npy_complex64 *ef, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cptsvx(char *fact, int *n, int *nrhs, s *d, c *e, s *df, c *ef, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpttrf "BLAS_FUNC(cpttrf)"(int *n, s *d, npy_complex64 *e, int *info) nogil
+cdef void cpttrf(int *n, s *d, c *e, int *info) noexcept nogil:
+    
+    _fortran_cpttrf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cpttrs "BLAS_FUNC(cpttrs)"(char *uplo, int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cpttrs(char *uplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cpttrs(uplo, n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cptts2 "BLAS_FUNC(cptts2)"(int *iuplo, int *n, int *nrhs, s *d, npy_complex64 *e, npy_complex64 *b, int *ldb) nogil
+cdef void cptts2(int *iuplo, int *n, int *nrhs, s *d, c *e, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_cptts2(iuplo, n, nrhs, d, e, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_crot "BLAS_FUNC(crot)"(int *n, npy_complex64 *cx, int *incx, npy_complex64 *cy, int *incy, s *c, npy_complex64 *s) nogil
+cdef void crot(int *n, c *cx, int *incx, c *cy, int *incy, s *c, c *s) noexcept nogil:
+    
+    _fortran_crot(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cspcon "BLAS_FUNC(cspcon)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil
+cdef void cspcon(char *uplo, int *n, c *ap, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil:
+    
+    _fortran_cspcon(uplo, n, ap, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cspmv "BLAS_FUNC(cspmv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *ap, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void cspmv(char *uplo, int *n, c *alpha, c *ap, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_cspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cspr "BLAS_FUNC(cspr)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *ap) nogil
+cdef void cspr(char *uplo, int *n, c *alpha, c *x, int *incx, c *ap) noexcept nogil:
+    
+    _fortran_cspr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csprfs "BLAS_FUNC(csprfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void csprfs(char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_csprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cspsv "BLAS_FUNC(cspsv)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void cspsv(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_cspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cspsvx "BLAS_FUNC(cspsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *afp, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void cspsvx(char *fact, char *uplo, int *n, int *nrhs, c *ap, c *afp, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_cspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csptrf "BLAS_FUNC(csptrf)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, int *info) nogil
+cdef void csptrf(char *uplo, int *n, c *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_csptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csptri "BLAS_FUNC(csptri)"(char *uplo, int *n, npy_complex64 *ap, int *ipiv, npy_complex64 *work, int *info) nogil
+cdef void csptri(char *uplo, int *n, c *ap, int *ipiv, c *work, int *info) noexcept nogil:
+    
+    _fortran_csptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csptrs "BLAS_FUNC(csptrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *ap, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void csptrs(char *uplo, int *n, int *nrhs, c *ap, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_csptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csrscl "BLAS_FUNC(csrscl)"(int *n, s *sa, npy_complex64 *sx, int *incx) nogil
+cdef void csrscl(int *n, s *sa, c *sx, int *incx) noexcept nogil:
+    
+    _fortran_csrscl(n, sa, sx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cstedc "BLAS_FUNC(cstedc)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void cstedc(char *compz, int *n, s *d, s *e, c *z, int *ldz, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_cstedc(compz, n, d, e, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cstegr "BLAS_FUNC(cstegr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, npy_complex64 *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void cstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, c *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_cstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cstein "BLAS_FUNC(cstein)"(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, npy_complex64 *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void cstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, c *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_cstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cstemr "BLAS_FUNC(cstemr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, npy_complex64 *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void cstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, c *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_cstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csteqr "BLAS_FUNC(csteqr)"(char *compz, int *n, s *d, s *e, npy_complex64 *z, int *ldz, s *work, int *info) nogil
+cdef void csteqr(char *compz, int *n, s *d, s *e, c *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_csteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csycon "BLAS_FUNC(csycon)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, s *anorm, s *rcond, npy_complex64 *work, int *info) nogil
+cdef void csycon(char *uplo, int *n, c *a, int *lda, int *ipiv, s *anorm, s *rcond, c *work, int *info) noexcept nogil:
+    
+    _fortran_csycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csyconv "BLAS_FUNC(csyconv)"(char *uplo, char *way, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil
+cdef void csyconv(char *uplo, char *way, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil:
+    
+    _fortran_csyconv(uplo, way, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csyequb "BLAS_FUNC(csyequb)"(char *uplo, int *n, npy_complex64 *a, int *lda, s *s, s *scond, s *amax, npy_complex64 *work, int *info) nogil
+cdef void csyequb(char *uplo, int *n, c *a, int *lda, s *s, s *scond, s *amax, c *work, int *info) noexcept nogil:
+    
+    _fortran_csyequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csymv "BLAS_FUNC(csymv)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *a, int *lda, npy_complex64 *x, int *incx, npy_complex64 *beta, npy_complex64 *y, int *incy) nogil
+cdef void csymv(char *uplo, int *n, c *alpha, c *a, int *lda, c *x, int *incx, c *beta, c *y, int *incy) noexcept nogil:
+    
+    _fortran_csymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csyr "BLAS_FUNC(csyr)"(char *uplo, int *n, npy_complex64 *alpha, npy_complex64 *x, int *incx, npy_complex64 *a, int *lda) nogil
+cdef void csyr(char *uplo, int *n, c *alpha, c *x, int *incx, c *a, int *lda) noexcept nogil:
+    
+    _fortran_csyr(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csyrfs "BLAS_FUNC(csyrfs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void csyrfs(char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_csyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csysv "BLAS_FUNC(csysv)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void csysv(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_csysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csysvx "BLAS_FUNC(csysvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *af, int *ldaf, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *rcond, s *ferr, s *berr, npy_complex64 *work, int *lwork, s *rwork, int *info) nogil
+cdef void csysvx(char *fact, char *uplo, int *n, int *nrhs, c *a, int *lda, c *af, int *ldaf, int *ipiv, c *b, int *ldb, c *x, int *ldx, s *rcond, s *ferr, s *berr, c *work, int *lwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_csysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csyswapr "BLAS_FUNC(csyswapr)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *i1, int *i2) nogil
+cdef void csyswapr(char *uplo, int *n, c *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_csyswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytf2 "BLAS_FUNC(csytf2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, int *info) nogil
+cdef void csytf2(char *uplo, int *n, c *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_csytf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytrf "BLAS_FUNC(csytrf)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void csytrf(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_csytrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytri "BLAS_FUNC(csytri)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *info) nogil
+cdef void csytri(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *info) noexcept nogil:
+    
+    _fortran_csytri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytri2 "BLAS_FUNC(csytri2)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void csytri2(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_csytri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytri2x "BLAS_FUNC(csytri2x)"(char *uplo, int *n, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *work, int *nb, int *info) nogil
+cdef void csytri2x(char *uplo, int *n, c *a, int *lda, int *ipiv, c *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_csytri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytrs "BLAS_FUNC(csytrs)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void csytrs(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_csytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_csytrs2 "BLAS_FUNC(csytrs2)"(char *uplo, int *n, int *nrhs, npy_complex64 *a, int *lda, int *ipiv, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil
+cdef void csytrs2(char *uplo, int *n, int *nrhs, c *a, int *lda, int *ipiv, c *b, int *ldb, c *work, int *info) noexcept nogil:
+    
+    _fortran_csytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctbcon "BLAS_FUNC(ctbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex64 *ab, int *ldab, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctbcon(char *norm, char *uplo, char *diag, int *n, int *kd, c *ab, int *ldab, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctbrfs "BLAS_FUNC(ctbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctbtrs "BLAS_FUNC(ctbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex64 *ab, int *ldab, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void ctbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, c *ab, int *ldab, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ctbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctfsm "BLAS_FUNC(ctfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex64 *alpha, npy_complex64 *a, npy_complex64 *b, int *ldb) nogil
+cdef void ctfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, c *alpha, c *a, c *b, int *ldb) noexcept nogil:
+    
+    _fortran_ctfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctftri "BLAS_FUNC(ctftri)"(char *transr, char *uplo, char *diag, int *n, npy_complex64 *a, int *info) nogil
+cdef void ctftri(char *transr, char *uplo, char *diag, int *n, c *a, int *info) noexcept nogil:
+    
+    _fortran_ctftri(transr, uplo, diag, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctfttp "BLAS_FUNC(ctfttp)"(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *ap, int *info) nogil
+cdef void ctfttp(char *transr, char *uplo, int *n, c *arf, c *ap, int *info) noexcept nogil:
+    
+    _fortran_ctfttp(transr, uplo, n, arf, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctfttr "BLAS_FUNC(ctfttr)"(char *transr, char *uplo, int *n, npy_complex64 *arf, npy_complex64 *a, int *lda, int *info) nogil
+cdef void ctfttr(char *transr, char *uplo, int *n, c *arf, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ctfttr(transr, uplo, n, arf, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgevc "BLAS_FUNC(ctgevc)"(char *side, char *howmny, bint *select, int *n, npy_complex64 *s, int *lds, npy_complex64 *p, int *ldp, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctgevc(char *side, char *howmny, bint *select, int *n, c *s, int *lds, c *p, int *ldp, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgex2 "BLAS_FUNC(ctgex2)"(bint *wantq, bint *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *j1, int *info) nogil
+cdef void ctgex2(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *j1, int *info) noexcept nogil:
+    
+    _fortran_ctgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgexc "BLAS_FUNC(ctgexc)"(bint *wantq, bint *wantz, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *ifst, int *ilst, int *info) nogil
+cdef void ctgexc(bint *wantq, bint *wantz, int *n, c *a, int *lda, c *b, int *ldb, c *q, int *ldq, c *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil:
+    
+    _fortran_ctgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgsen "BLAS_FUNC(ctgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *alpha, npy_complex64 *beta, npy_complex64 *q, int *ldq, npy_complex64 *z, int *ldz, int *m, s *pl, s *pr, s *dif, npy_complex64 *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ctgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *alpha, c *beta, c *q, int *ldq, c *z, int *ldz, int *m, s *pl, s *pr, s *dif, c *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ctgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgsja "BLAS_FUNC(ctgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, npy_complex64 *u, int *ldu, npy_complex64 *v, int *ldv, npy_complex64 *q, int *ldq, npy_complex64 *work, int *ncycle, int *info) nogil
+cdef void ctgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, c *a, int *lda, c *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, c *u, int *ldu, c *v, int *ldv, c *q, int *ldq, c *work, int *ncycle, int *info) noexcept nogil:
+    
+    _fortran_ctgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgsna "BLAS_FUNC(ctgsna)"(char *job, char *howmny, bint *select, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, s *s, s *dif, int *mm, int *m, npy_complex64 *work, int *lwork, int *iwork, int *info) nogil
+cdef void ctgsna(char *job, char *howmny, bint *select, int *n, c *a, int *lda, c *b, int *ldb, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *dif, int *mm, int *m, c *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ctgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgsy2 "BLAS_FUNC(ctgsy2)"(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) nogil
+cdef void ctgsy2(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *info) noexcept nogil:
+    
+    _fortran_ctgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctgsyl "BLAS_FUNC(ctgsyl)"(char *trans, int *ijob, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, npy_complex64 *d, int *ldd, npy_complex64 *e, int *lde, npy_complex64 *f, int *ldf, s *scale, s *dif, npy_complex64 *work, int *lwork, int *iwork, int *info) nogil
+cdef void ctgsyl(char *trans, int *ijob, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, c *d, int *ldd, c *e, int *lde, c *f, int *ldf, s *scale, s *dif, c *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ctgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpcon "BLAS_FUNC(ctpcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *ap, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctpcon(char *norm, char *uplo, char *diag, int *n, c *ap, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpmqrt "BLAS_FUNC(ctpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *info) nogil
+cdef void ctpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *info) noexcept nogil:
+    
+    _fortran_ctpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpqrt "BLAS_FUNC(ctpqrt)"(int *m, int *n, int *l, int *nb, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, npy_complex64 *work, int *info) nogil
+cdef void ctpqrt(int *m, int *n, int *l, int *nb, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, c *work, int *info) noexcept nogil:
+    
+    _fortran_ctpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpqrt2 "BLAS_FUNC(ctpqrt2)"(int *m, int *n, int *l, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *t, int *ldt, int *info) nogil
+cdef void ctpqrt2(int *m, int *n, int *l, c *a, int *lda, c *b, int *ldb, c *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_ctpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctprfb "BLAS_FUNC(ctprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex64 *v, int *ldv, npy_complex64 *t, int *ldt, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *work, int *ldwork) nogil
+cdef void ctprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, c *v, int *ldv, c *t, int *ldt, c *a, int *lda, c *b, int *ldb, c *work, int *ldwork) noexcept nogil:
+    
+    _fortran_ctprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctprfs "BLAS_FUNC(ctprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctptri "BLAS_FUNC(ctptri)"(char *uplo, char *diag, int *n, npy_complex64 *ap, int *info) nogil
+cdef void ctptri(char *uplo, char *diag, int *n, c *ap, int *info) noexcept nogil:
+    
+    _fortran_ctptri(uplo, diag, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctptrs "BLAS_FUNC(ctptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *ap, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void ctptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *ap, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ctptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpttf "BLAS_FUNC(ctpttf)"(char *transr, char *uplo, int *n, npy_complex64 *ap, npy_complex64 *arf, int *info) nogil
+cdef void ctpttf(char *transr, char *uplo, int *n, c *ap, c *arf, int *info) noexcept nogil:
+    
+    _fortran_ctpttf(transr, uplo, n, ap, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctpttr "BLAS_FUNC(ctpttr)"(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *a, int *lda, int *info) nogil
+cdef void ctpttr(char *uplo, int *n, c *ap, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ctpttr(uplo, n, ap, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrcon "BLAS_FUNC(ctrcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, s *rcond, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctrcon(char *norm, char *uplo, char *diag, int *n, c *a, int *lda, s *rcond, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrevc "BLAS_FUNC(ctrevc)"(char *side, char *howmny, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, int *mm, int *m, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctrevc(char *side, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, int *mm, int *m, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrexc "BLAS_FUNC(ctrexc)"(char *compq, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, int *ifst, int *ilst, int *info) nogil
+cdef void ctrexc(char *compq, int *n, c *t, int *ldt, c *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil:
+    
+    _fortran_ctrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrrfs "BLAS_FUNC(ctrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *x, int *ldx, s *ferr, s *berr, npy_complex64 *work, s *rwork, int *info) nogil
+cdef void ctrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, c *x, int *ldx, s *ferr, s *berr, c *work, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrsen "BLAS_FUNC(ctrsen)"(char *job, char *compq, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *q, int *ldq, npy_complex64 *w, int *m, s *s, s *sep, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void ctrsen(char *job, char *compq, bint *select, int *n, c *t, int *ldt, c *q, int *ldq, c *w, int *m, s *s, s *sep, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ctrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrsna "BLAS_FUNC(ctrsna)"(char *job, char *howmny, bint *select, int *n, npy_complex64 *t, int *ldt, npy_complex64 *vl, int *ldvl, npy_complex64 *vr, int *ldvr, s *s, s *sep, int *mm, int *m, npy_complex64 *work, int *ldwork, s *rwork, int *info) nogil
+cdef void ctrsna(char *job, char *howmny, bint *select, int *n, c *t, int *ldt, c *vl, int *ldvl, c *vr, int *ldvr, s *s, s *sep, int *mm, int *m, c *work, int *ldwork, s *rwork, int *info) noexcept nogil:
+    
+    _fortran_ctrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrsyl "BLAS_FUNC(ctrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, npy_complex64 *c, int *ldc, s *scale, int *info) nogil
+cdef void ctrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, c *a, int *lda, c *b, int *ldb, c *c, int *ldc, s *scale, int *info) noexcept nogil:
+    
+    _fortran_ctrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrti2 "BLAS_FUNC(ctrti2)"(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void ctrti2(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ctrti2(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrtri "BLAS_FUNC(ctrtri)"(char *uplo, char *diag, int *n, npy_complex64 *a, int *lda, int *info) nogil
+cdef void ctrtri(char *uplo, char *diag, int *n, c *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ctrtri(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrtrs "BLAS_FUNC(ctrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex64 *a, int *lda, npy_complex64 *b, int *ldb, int *info) nogil
+cdef void ctrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, c *a, int *lda, c *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ctrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrttf "BLAS_FUNC(ctrttf)"(char *transr, char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *arf, int *info) nogil
+cdef void ctrttf(char *transr, char *uplo, int *n, c *a, int *lda, c *arf, int *info) noexcept nogil:
+    
+    _fortran_ctrttf(transr, uplo, n, a, lda, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctrttp "BLAS_FUNC(ctrttp)"(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *ap, int *info) nogil
+cdef void ctrttp(char *uplo, int *n, c *a, int *lda, c *ap, int *info) noexcept nogil:
+    
+    _fortran_ctrttp(uplo, n, a, lda, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ctzrzf "BLAS_FUNC(ctzrzf)"(int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void ctzrzf(int *m, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ctzrzf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunbdb "BLAS_FUNC(cunbdb)"(char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, s *theta, s *phi, npy_complex64 *taup1, npy_complex64 *taup2, npy_complex64 *tauq1, npy_complex64 *tauq2, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunbdb(char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, s *phi, c *taup1, c *taup2, c *tauq1, c *tauq2, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cuncsd "BLAS_FUNC(cuncsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex64 *x11, int *ldx11, npy_complex64 *x12, int *ldx12, npy_complex64 *x21, int *ldx21, npy_complex64 *x22, int *ldx22, s *theta, npy_complex64 *u1, int *ldu1, npy_complex64 *u2, int *ldu2, npy_complex64 *v1t, int *ldv1t, npy_complex64 *v2t, int *ldv2t, npy_complex64 *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) nogil
+cdef void cuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, c *x11, int *ldx11, c *x12, int *ldx12, c *x21, int *ldx21, c *x22, int *ldx22, s *theta, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, c *work, int *lwork, s *rwork, int *lrwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_cuncsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, rwork, lrwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cung2l "BLAS_FUNC(cung2l)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cung2l(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cung2l(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cung2r "BLAS_FUNC(cung2r)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cung2r(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cung2r(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungbr "BLAS_FUNC(cungbr)"(char *vect, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cungbr(char *vect, int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cungbr(vect, m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunghr "BLAS_FUNC(cunghr)"(int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunghr(int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungl2 "BLAS_FUNC(cungl2)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cungl2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cungl2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunglq "BLAS_FUNC(cunglq)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunglq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunglq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungql "BLAS_FUNC(cungql)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cungql(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cungql(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungqr "BLAS_FUNC(cungqr)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cungqr(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cungqr(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungr2 "BLAS_FUNC(cungr2)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *info) nogil
+cdef void cungr2(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *info) noexcept nogil:
+    
+    _fortran_cungr2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungrq "BLAS_FUNC(cungrq)"(int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cungrq(int *m, int *n, int *k, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cungrq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cungtr "BLAS_FUNC(cungtr)"(char *uplo, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cungtr(char *uplo, int *n, c *a, int *lda, c *tau, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cungtr(uplo, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunm2l "BLAS_FUNC(cunm2l)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cunm2l(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cunm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunm2r "BLAS_FUNC(cunm2r)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cunm2r(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cunm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmbr "BLAS_FUNC(cunmbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmhr "BLAS_FUNC(cunmhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunml2 "BLAS_FUNC(cunml2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cunml2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmlq "BLAS_FUNC(cunmlq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmlq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmql "BLAS_FUNC(cunmql)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmql(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmqr "BLAS_FUNC(cunmqr)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmqr(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmr2 "BLAS_FUNC(cunmr2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cunmr2(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cunmr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmr3 "BLAS_FUNC(cunmr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cunmr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmrq "BLAS_FUNC(cunmrq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmrq(char *side, char *trans, int *m, int *n, int *k, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmrz "BLAS_FUNC(cunmrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cunmtr "BLAS_FUNC(cunmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *a, int *lda, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *lwork, int *info) nogil
+cdef void cunmtr(char *side, char *uplo, char *trans, int *m, int *n, c *a, int *lda, c *tau, c *c, int *ldc, c *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_cunmtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cupgtr "BLAS_FUNC(cupgtr)"(char *uplo, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *q, int *ldq, npy_complex64 *work, int *info) nogil
+cdef void cupgtr(char *uplo, int *n, c *ap, c *tau, c *q, int *ldq, c *work, int *info) noexcept nogil:
+    
+    _fortran_cupgtr(uplo, n, ap, tau, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_cupmtr "BLAS_FUNC(cupmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex64 *ap, npy_complex64 *tau, npy_complex64 *c, int *ldc, npy_complex64 *work, int *info) nogil
+cdef void cupmtr(char *side, char *uplo, char *trans, int *m, int *n, c *ap, c *tau, c *c, int *ldc, c *work, int *info) noexcept nogil:
+    
+    _fortran_cupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dbbcsd "BLAS_FUNC(dbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) nogil
+cdef void dbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dbdsdc "BLAS_FUNC(dbdsdc)"(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) nogil
+cdef void dbdsdc(char *uplo, char *compq, int *n, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, d *q, int *iq, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dbdsqr "BLAS_FUNC(dbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) nogil
+cdef void dbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ddisna "BLAS_FUNC(ddisna)"(char *job, int *m, int *n, d *d, d *sep, int *info) nogil
+cdef void ddisna(char *job, int *m, int *n, d *d, d *sep, int *info) noexcept nogil:
+    
+    _fortran_ddisna(job, m, n, d, sep, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbbrd "BLAS_FUNC(dgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) nogil
+cdef void dgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *pt, int *ldpt, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbcon "BLAS_FUNC(dgbcon)"(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dgbcon(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbequ "BLAS_FUNC(dgbequ)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void dgbequ(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbequb "BLAS_FUNC(dgbequb)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void dgbequb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbrfs "BLAS_FUNC(dgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbsv "BLAS_FUNC(dgbsv)"(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dgbsv(int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbsvx "BLAS_FUNC(dgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbtf2 "BLAS_FUNC(dgbtf2)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void dgbtf2(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dgbtf2(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbtrf "BLAS_FUNC(dgbtrf)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void dgbtrf(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgbtrs "BLAS_FUNC(dgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, d *ab, int *ldab, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgebak "BLAS_FUNC(dgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) nogil
+cdef void dgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, d *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_dgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgebal "BLAS_FUNC(dgebal)"(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) nogil
+cdef void dgebal(char *job, int *n, d *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil:
+    
+    _fortran_dgebal(job, n, a, lda, ilo, ihi, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgebd2 "BLAS_FUNC(dgebd2)"(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) nogil
+cdef void dgebd2(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgebrd "BLAS_FUNC(dgebrd)"(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) nogil
+cdef void dgebrd(int *m, int *n, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgecon "BLAS_FUNC(dgecon)"(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dgecon(char *norm, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgecon(norm, n, a, lda, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeequ "BLAS_FUNC(dgeequ)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void dgeequ(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeequb "BLAS_FUNC(dgeequb)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void dgeequb(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgees "BLAS_FUNC(dgees)"(char *jobvs, char *sort, _dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) nogil
+cdef void dgees(char *jobvs, char *sort, dselect2 *select, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *work, int *lwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_dgees(jobvs, sort, <_dselect2*>select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeesx "BLAS_FUNC(dgeesx)"(char *jobvs, char *sort, _dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void dgeesx(char *jobvs, char *sort, dselect2 *select, char *sense, int *n, d *a, int *lda, int *sdim, d *wr, d *wi, d *vs, int *ldvs, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_dgeesx(jobvs, sort, <_dselect2*>select, sense, n, a, lda, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeev "BLAS_FUNC(dgeev)"(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) nogil
+cdef void dgeev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeevx "BLAS_FUNC(dgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgeevx(balanc, jobvl, jobvr, sense, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgehd2 "BLAS_FUNC(dgehd2)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgehd2(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgehd2(n, ilo, ihi, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgehrd "BLAS_FUNC(dgehrd)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgehrd(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgejsv "BLAS_FUNC(dgejsv)"(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, d *a, int *lda, d *sva, d *u, int *ldu, d *v, int *ldv, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgejsv(joba, jobu, jobv, jobr, jobt, jobp, m, n, a, lda, sva, u, ldu, v, ldv, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgelq2 "BLAS_FUNC(dgelq2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgelq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgelq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgelqf "BLAS_FUNC(dgelqf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgelqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgelqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgels "BLAS_FUNC(dgels)"(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) nogil
+cdef void dgels(char *trans, int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgelsd "BLAS_FUNC(dgelsd)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dgelsd(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgelss "BLAS_FUNC(dgelss)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) nogil
+cdef void dgelss(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *s, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgelsy "BLAS_FUNC(dgelsy)"(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) nogil
+cdef void dgelsy(int *m, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *jpvt, d *rcond, int *rank, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgemqrt "BLAS_FUNC(dgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) nogil
+cdef void dgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeql2 "BLAS_FUNC(dgeql2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgeql2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgeql2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqlf "BLAS_FUNC(dgeqlf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgeqlf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgeqlf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqp3 "BLAS_FUNC(dgeqp3)"(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgeqp3(int *m, int *n, d *a, int *lda, int *jpvt, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqr2 "BLAS_FUNC(dgeqr2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgeqr2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgeqr2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqr2p "BLAS_FUNC(dgeqr2p)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgeqr2p(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgeqr2p(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqrf "BLAS_FUNC(dgeqrf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgeqrf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgeqrf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqrfp "BLAS_FUNC(dgeqrfp)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgeqrfp(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgeqrfp(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqrt "BLAS_FUNC(dgeqrt)"(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) nogil
+cdef void dgeqrt(int *m, int *n, int *nb, d *a, int *lda, d *t, int *ldt, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgeqrt(m, n, nb, a, lda, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqrt2 "BLAS_FUNC(dgeqrt2)"(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) nogil
+cdef void dgeqrt2(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_dgeqrt2(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgeqrt3 "BLAS_FUNC(dgeqrt3)"(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) nogil
+cdef void dgeqrt3(int *m, int *n, d *a, int *lda, d *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_dgeqrt3(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgerfs "BLAS_FUNC(dgerfs)"(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgerfs(char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgerq2 "BLAS_FUNC(dgerq2)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dgerq2(int *m, int *n, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dgerq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgerqf "BLAS_FUNC(dgerqf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dgerqf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgerqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesc2 "BLAS_FUNC(dgesc2)"(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) nogil
+cdef void dgesc2(int *n, d *a, int *lda, d *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil:
+    
+    _fortran_dgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesdd "BLAS_FUNC(dgesdd)"(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dgesdd(char *jobz, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesv "BLAS_FUNC(dgesv)"(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesvd "BLAS_FUNC(dgesvd)"(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) nogil
+cdef void dgesvd(char *jobu, char *jobvt, int *m, int *n, d *a, int *lda, d *s, d *u, int *ldu, d *vt, int *ldvt, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesvj "BLAS_FUNC(dgesvj)"(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) nogil
+cdef void dgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, d *a, int *lda, d *sva, int *mv, d *v, int *ldv, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgesvj(joba, jobu, jobv, m, n, a, lda, sva, mv, v, ldv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgesvx "BLAS_FUNC(dgesvx)"(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgesvx(char *fact, char *trans, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgetc2 "BLAS_FUNC(dgetc2)"(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) nogil
+cdef void dgetc2(int *n, d *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil:
+    
+    _fortran_dgetc2(n, a, lda, ipiv, jpiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgetf2 "BLAS_FUNC(dgetf2)"(int *m, int *n, d *a, int *lda, int *ipiv, int *info) nogil
+cdef void dgetf2(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dgetf2(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgetrf "BLAS_FUNC(dgetrf)"(int *m, int *n, d *a, int *lda, int *ipiv, int *info) nogil
+cdef void dgetrf(int *m, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dgetrf(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgetri "BLAS_FUNC(dgetri)"(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil
+cdef void dgetri(int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgetri(n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgetrs "BLAS_FUNC(dgetrs)"(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dgetrs(char *trans, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggbak "BLAS_FUNC(dggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) nogil
+cdef void dggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, d *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_dggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggbal "BLAS_FUNC(dggbal)"(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) nogil
+cdef void dggbal(char *job, int *n, d *a, int *lda, d *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil:
+    
+    _fortran_dggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgges "BLAS_FUNC(dgges)"(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) nogil
+cdef void dgges(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *work, int *lwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_dgges(jobvsl, jobvsr, sort, <_dselect3*>selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggesx "BLAS_FUNC(dggesx)"(char *jobvsl, char *jobvsr, char *sort, _dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void dggesx(char *jobvsl, char *jobvsr, char *sort, dselect3 *selctg, char *sense, int *n, d *a, int *lda, d *b, int *ldb, int *sdim, d *alphar, d *alphai, d *beta, d *vsl, int *ldvsl, d *vsr, int *ldvsr, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_dggesx(jobvsl, jobvsr, sort, <_dselect3*>selctg, sense, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggev "BLAS_FUNC(dggev)"(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) nogil
+cdef void dggev(char *jobvl, char *jobvr, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dggev(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggevx "BLAS_FUNC(dggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) nogil
+cdef void dggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *vl, int *ldvl, d *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, d *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_dggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggglm "BLAS_FUNC(dggglm)"(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) nogil
+cdef void dggglm(int *n, int *m, int *p, d *a, int *lda, d *b, int *ldb, d *d, d *x, d *y, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgghrd "BLAS_FUNC(dgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) nogil
+cdef void dgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_dgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgglse "BLAS_FUNC(dgglse)"(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) nogil
+cdef void dgglse(int *m, int *n, int *p, d *a, int *lda, d *b, int *ldb, d *c, d *d, d *x, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggqrf "BLAS_FUNC(dggqrf)"(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) nogil
+cdef void dggqrf(int *n, int *m, int *p, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dggrqf "BLAS_FUNC(dggrqf)"(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) nogil
+cdef void dggrqf(int *m, int *p, int *n, d *a, int *lda, d *taua, d *b, int *ldb, d *taub, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgsvj0 "BLAS_FUNC(dgsvj0)"(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) nogil
+cdef void dgsvj0(char *jobv, int *m, int *n, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgsvj0(jobv, m, n, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgsvj1 "BLAS_FUNC(dgsvj1)"(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) nogil
+cdef void dgsvj1(char *jobv, int *m, int *n, int *n1, d *a, int *lda, d *d, d *sva, int *mv, d *v, int *ldv, d *eps, d *sfmin, d *tol, int *nsweep, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dgsvj1(jobv, m, n, n1, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgtcon "BLAS_FUNC(dgtcon)"(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dgtcon(char *norm, int *n, d *dl, d *d, d *du, d *du2, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgtrfs "BLAS_FUNC(dgtrfs)"(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgtrfs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgtsv "BLAS_FUNC(dgtsv)"(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) nogil
+cdef void dgtsv(int *n, int *nrhs, d *dl, d *d, d *du, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgtsv(n, nrhs, dl, d, du, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgtsvx "BLAS_FUNC(dgtsvx)"(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dgtsvx(char *fact, char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *dlf, d *df, d *duf, d *du2, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgttrf "BLAS_FUNC(dgttrf)"(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) nogil
+cdef void dgttrf(int *n, d *dl, d *d, d *du, d *du2, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dgttrf(n, dl, d, du, du2, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgttrs "BLAS_FUNC(dgttrs)"(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dgttrs(char *trans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dgtts2 "BLAS_FUNC(dgtts2)"(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) nogil
+cdef void dgtts2(int *itrans, int *n, int *nrhs, d *dl, d *d, d *du, d *du2, int *ipiv, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dhgeqz "BLAS_FUNC(dhgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) nogil
+cdef void dhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *t, int *ldt, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dhgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dhsein "BLAS_FUNC(dhsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) nogil
+cdef void dhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, d *h, int *ldh, d *wr, d *wi, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *ifaill, int *ifailr, int *info) noexcept nogil:
+    
+    _fortran_dhsein(side, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dhseqr "BLAS_FUNC(dhseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) nogil
+cdef void dhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dhseqr(job, compz, n, ilo, ihi, h, ldh, wr, wi, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    bint _fortran_disnan "BLAS_FUNC(disnan)"(d *din) nogil
+cdef bint disnan(d *din) noexcept nogil:
+    
+    return _fortran_disnan(din)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlabad "BLAS_FUNC(dlabad)"(d *small, d *large) nogil
+cdef void dlabad(d *small, d *large) noexcept nogil:
+    
+    _fortran_dlabad(small, large)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlabrd "BLAS_FUNC(dlabrd)"(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) nogil
+cdef void dlabrd(int *m, int *n, int *nb, d *a, int *lda, d *d, d *e, d *tauq, d *taup, d *x, int *ldx, d *y, int *ldy) noexcept nogil:
+    
+    _fortran_dlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlacn2 "BLAS_FUNC(dlacn2)"(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) nogil
+cdef void dlacn2(int *n, d *v, d *x, int *isgn, d *est, int *kase, int *isave) noexcept nogil:
+    
+    _fortran_dlacn2(n, v, x, isgn, est, kase, isave)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlacon "BLAS_FUNC(dlacon)"(int *n, d *v, d *x, int *isgn, d *est, int *kase) nogil
+cdef void dlacon(int *n, d *v, d *x, int *isgn, d *est, int *kase) noexcept nogil:
+    
+    _fortran_dlacon(n, v, x, isgn, est, kase)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlacpy "BLAS_FUNC(dlacpy)"(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) nogil
+cdef void dlacpy(char *uplo, int *m, int *n, d *a, int *lda, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dlacpy(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dladiv "BLAS_FUNC(dladiv)"(d *a, d *b, d *c, d *d, d *p, d *q) nogil
+cdef void dladiv(d *a, d *b, d *c, d *d, d *p, d *q) noexcept nogil:
+    
+    _fortran_dladiv(a, b, c, d, p, q)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlae2 "BLAS_FUNC(dlae2)"(d *a, d *b, d *c, d *rt1, d *rt2) nogil
+cdef void dlae2(d *a, d *b, d *c, d *rt1, d *rt2) noexcept nogil:
+    
+    _fortran_dlae2(a, b, c, rt1, rt2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaebz "BLAS_FUNC(dlaebz)"(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) nogil
+cdef void dlaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, d *abstol, d *reltol, d *pivmin, d *d, d *e, d *e2, int *nval, d *ab, d *c, int *mout, int *nab, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlaebz(ijob, nitmax, n, mmax, minp, nbmin, abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed0 "BLAS_FUNC(dlaed0)"(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) nogil
+cdef void dlaed0(int *icompq, int *qsiz, int *n, d *d, d *e, d *q, int *ldq, d *qstore, int *ldqs, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlaed0(icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed1 "BLAS_FUNC(dlaed1)"(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) nogil
+cdef void dlaed1(int *n, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlaed1(n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed2 "BLAS_FUNC(dlaed2)"(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) nogil
+cdef void dlaed2(int *k, int *n, int *n1, d *d, d *q, int *ldq, int *indxq, d *rho, d *z, d *dlamda, d *w, d *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil:
+    
+    _fortran_dlaed2(k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed3 "BLAS_FUNC(dlaed3)"(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) nogil
+cdef void dlaed3(int *k, int *n, int *n1, d *d, d *q, int *ldq, d *rho, d *dlamda, d *q2, int *indx, int *ctot, d *w, d *s, int *info) noexcept nogil:
+    
+    _fortran_dlaed3(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed4 "BLAS_FUNC(dlaed4)"(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) nogil
+cdef void dlaed4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *dlam, int *info) noexcept nogil:
+    
+    _fortran_dlaed4(n, i, d, z, delta, rho, dlam, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed5 "BLAS_FUNC(dlaed5)"(int *i, d *d, d *z, d *delta, d *rho, d *dlam) nogil
+cdef void dlaed5(int *i, d *d, d *z, d *delta, d *rho, d *dlam) noexcept nogil:
+    
+    _fortran_dlaed5(i, d, z, delta, rho, dlam)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed6 "BLAS_FUNC(dlaed6)"(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) nogil
+cdef void dlaed6(int *kniter, bint *orgati, d *rho, d *d, d *z, d *finit, d *tau, int *info) noexcept nogil:
+    
+    _fortran_dlaed6(kniter, orgati, rho, d, z, finit, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed7 "BLAS_FUNC(dlaed7)"(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) nogil
+cdef void dlaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlaed7(icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed8 "BLAS_FUNC(dlaed8)"(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) nogil
+cdef void dlaed8(int *icompq, int *k, int *n, int *qsiz, d *d, d *q, int *ldq, int *indxq, d *rho, int *cutpnt, d *z, d *dlamda, d *q2, int *ldq2, d *w, int *perm, int *givptr, int *givcol, d *givnum, int *indxp, int *indx, int *info) noexcept nogil:
+    
+    _fortran_dlaed8(icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaed9 "BLAS_FUNC(dlaed9)"(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) nogil
+cdef void dlaed9(int *k, int *kstart, int *kstop, int *n, d *d, d *q, int *ldq, d *rho, d *dlamda, d *w, d *s, int *lds, int *info) noexcept nogil:
+    
+    _fortran_dlaed9(k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaeda "BLAS_FUNC(dlaeda)"(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) nogil
+cdef void dlaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, d *q, int *qptr, d *z, d *ztemp, int *info) noexcept nogil:
+    
+    _fortran_dlaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaein "BLAS_FUNC(dlaein)"(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) nogil
+cdef void dlaein(bint *rightv, bint *noinit, int *n, d *h, int *ldh, d *wr, d *wi, d *vr, d *vi, d *b, int *ldb, d *work, d *eps3, d *smlnum, d *bignum, int *info) noexcept nogil:
+    
+    _fortran_dlaein(rightv, noinit, n, h, ldh, wr, wi, vr, vi, b, ldb, work, eps3, smlnum, bignum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaev2 "BLAS_FUNC(dlaev2)"(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) nogil
+cdef void dlaev2(d *a, d *b, d *c, d *rt1, d *rt2, d *cs1, d *sn1) noexcept nogil:
+    
+    _fortran_dlaev2(a, b, c, rt1, rt2, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaexc "BLAS_FUNC(dlaexc)"(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) nogil
+cdef void dlaexc(bint *wantq, int *n, d *t, int *ldt, d *q, int *ldq, int *j1, int *n1, int *n2, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlaexc(wantq, n, t, ldt, q, ldq, j1, n1, n2, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlag2 "BLAS_FUNC(dlag2)"(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) nogil
+cdef void dlag2(d *a, int *lda, d *b, int *ldb, d *safmin, d *scale1, d *scale2, d *wr1, d *wr2, d *wi) noexcept nogil:
+    
+    _fortran_dlag2(a, lda, b, ldb, safmin, scale1, scale2, wr1, wr2, wi)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlag2s "BLAS_FUNC(dlag2s)"(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) nogil
+cdef void dlag2s(int *m, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil:
+    
+    _fortran_dlag2s(m, n, a, lda, sa, ldsa, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlags2 "BLAS_FUNC(dlags2)"(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) nogil
+cdef void dlags2(bint *upper, d *a1, d *a2, d *a3, d *b1, d *b2, d *b3, d *csu, d *snu, d *csv, d *snv, d *csq, d *snq) noexcept nogil:
+    
+    _fortran_dlags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlagtf "BLAS_FUNC(dlagtf)"(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) nogil
+cdef void dlagtf(int *n, d *a, d *lambda_, d *b, d *c, d *tol, d *d, int *in_, int *info) noexcept nogil:
+    
+    _fortran_dlagtf(n, a, lambda_, b, c, tol, d, in_, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlagtm "BLAS_FUNC(dlagtm)"(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) nogil
+cdef void dlagtm(char *trans, int *n, int *nrhs, d *alpha, d *dl, d *d, d *du, d *x, int *ldx, d *beta, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dlagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlagts "BLAS_FUNC(dlagts)"(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) nogil
+cdef void dlagts(int *job, int *n, d *a, d *b, d *c, d *d, int *in_, d *y, d *tol, int *info) noexcept nogil:
+    
+    _fortran_dlagts(job, n, a, b, c, d, in_, y, tol, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlagv2 "BLAS_FUNC(dlagv2)"(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) nogil
+cdef void dlagv2(d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *csl, d *snl, d *csr, d *snr) noexcept nogil:
+    
+    _fortran_dlagv2(a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlahqr "BLAS_FUNC(dlahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) nogil
+cdef void dlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_dlahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlahr2 "BLAS_FUNC(dlahr2)"(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) nogil
+cdef void dlahr2(int *n, int *k, int *nb, d *a, int *lda, d *tau, d *t, int *ldt, d *y, int *ldy) noexcept nogil:
+    
+    _fortran_dlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaic1 "BLAS_FUNC(dlaic1)"(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) nogil
+cdef void dlaic1(int *job, int *j, d *x, d *sest, d *w, d *gamma, d *sestpr, d *s, d *c) noexcept nogil:
+    
+    _fortran_dlaic1(job, j, x, sest, w, gamma, sestpr, s, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaln2 "BLAS_FUNC(dlaln2)"(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) nogil
+cdef void dlaln2(bint *ltrans, int *na, int *nw, d *smin, d *ca, d *a, int *lda, d *d1, d *d2, d *b, int *ldb, d *wr, d *wi, d *x, int *ldx, d *scale, d *xnorm, int *info) noexcept nogil:
+    
+    _fortran_dlaln2(ltrans, na, nw, smin, ca, a, lda, d1, d2, b, ldb, wr, wi, x, ldx, scale, xnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlals0 "BLAS_FUNC(dlals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) nogil
+cdef void dlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlalsa "BLAS_FUNC(dlalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) nogil
+cdef void dlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, d *b, int *ldb, d *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlalsd "BLAS_FUNC(dlalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) nogil
+cdef void dlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, d *b, int *ldb, d *rcond, int *rank, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlamch "BLAS_FUNC(dlamch)"(char *cmach) nogil
+cdef d dlamch(char *cmach) noexcept nogil:
+    
+    return _fortran_dlamch(cmach)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlamrg "BLAS_FUNC(dlamrg)"(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) nogil
+cdef void dlamrg(int *n1, int *n2, d *a, int *dtrd1, int *dtrd2, int *index_bn) noexcept nogil:
+    
+    _fortran_dlamrg(n1, n2, a, dtrd1, dtrd2, index_bn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_dlaneg "BLAS_FUNC(dlaneg)"(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) nogil
+cdef int dlaneg(int *n, d *d, d *lld, d *sigma, d *pivmin, int *r) noexcept nogil:
+    
+    return _fortran_dlaneg(n, d, lld, sigma, pivmin, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlangb "BLAS_FUNC(dlangb)"(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) nogil
+cdef d dlangb(char *norm, int *n, int *kl, int *ku, d *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_dlangb(norm, n, kl, ku, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlange "BLAS_FUNC(dlange)"(char *norm, int *m, int *n, d *a, int *lda, d *work) nogil
+cdef d dlange(char *norm, int *m, int *n, d *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_dlange(norm, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlangt "BLAS_FUNC(dlangt)"(char *norm, int *n, d *dl, d *d_, d *du) nogil
+cdef d dlangt(char *norm, int *n, d *dl, d *d_, d *du) noexcept nogil:
+    
+    return _fortran_dlangt(norm, n, dl, d_, du)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlanhs "BLAS_FUNC(dlanhs)"(char *norm, int *n, d *a, int *lda, d *work) nogil
+cdef d dlanhs(char *norm, int *n, d *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_dlanhs(norm, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlansb "BLAS_FUNC(dlansb)"(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) nogil
+cdef d dlansb(char *norm, char *uplo, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_dlansb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlansf "BLAS_FUNC(dlansf)"(char *norm, char *transr, char *uplo, int *n, d *a, d *work) nogil
+cdef d dlansf(char *norm, char *transr, char *uplo, int *n, d *a, d *work) noexcept nogil:
+    
+    return _fortran_dlansf(norm, transr, uplo, n, a, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlansp "BLAS_FUNC(dlansp)"(char *norm, char *uplo, int *n, d *ap, d *work) nogil
+cdef d dlansp(char *norm, char *uplo, int *n, d *ap, d *work) noexcept nogil:
+    
+    return _fortran_dlansp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlanst "BLAS_FUNC(dlanst)"(char *norm, int *n, d *d_, d *e) nogil
+cdef d dlanst(char *norm, int *n, d *d_, d *e) noexcept nogil:
+    
+    return _fortran_dlanst(norm, n, d_, e)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlansy "BLAS_FUNC(dlansy)"(char *norm, char *uplo, int *n, d *a, int *lda, d *work) nogil
+cdef d dlansy(char *norm, char *uplo, int *n, d *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_dlansy(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlantb "BLAS_FUNC(dlantb)"(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) nogil
+cdef d dlantb(char *norm, char *uplo, char *diag, int *n, int *k, d *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_dlantb(norm, uplo, diag, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlantp "BLAS_FUNC(dlantp)"(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) nogil
+cdef d dlantp(char *norm, char *uplo, char *diag, int *n, d *ap, d *work) noexcept nogil:
+    
+    return _fortran_dlantp(norm, uplo, diag, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlantr "BLAS_FUNC(dlantr)"(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) nogil
+cdef d dlantr(char *norm, char *uplo, char *diag, int *m, int *n, d *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_dlantr(norm, uplo, diag, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlanv2 "BLAS_FUNC(dlanv2)"(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) nogil
+cdef void dlanv2(d *a, d *b, d *c, d *d, d *rt1r, d *rt1i, d *rt2r, d *rt2i, d *cs, d *sn) noexcept nogil:
+    
+    _fortran_dlanv2(a, b, c, d, rt1r, rt1i, rt2r, rt2i, cs, sn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlapll "BLAS_FUNC(dlapll)"(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) nogil
+cdef void dlapll(int *n, d *x, int *incx, d *y, int *incy, d *ssmin) noexcept nogil:
+    
+    _fortran_dlapll(n, x, incx, y, incy, ssmin)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlapmr "BLAS_FUNC(dlapmr)"(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) nogil
+cdef void dlapmr(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_dlapmr(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlapmt "BLAS_FUNC(dlapmt)"(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) nogil
+cdef void dlapmt(bint *forwrd, int *m, int *n, d *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_dlapmt(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlapy2 "BLAS_FUNC(dlapy2)"(d *x, d *y) nogil
+cdef d dlapy2(d *x, d *y) noexcept nogil:
+    
+    return _fortran_dlapy2(x, y)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dlapy3 "BLAS_FUNC(dlapy3)"(d *x, d *y, d *z) nogil
+cdef d dlapy3(d *x, d *y, d *z) noexcept nogil:
+    
+    return _fortran_dlapy3(x, y, z)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqgb "BLAS_FUNC(dlaqgb)"(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil
+cdef void dlaqgb(int *m, int *n, int *kl, int *ku, d *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_dlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqge "BLAS_FUNC(dlaqge)"(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil
+cdef void dlaqge(int *m, int *n, d *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_dlaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqp2 "BLAS_FUNC(dlaqp2)"(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) nogil
+cdef void dlaqp2(int *m, int *n, int *offset, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *work) noexcept nogil:
+    
+    _fortran_dlaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqps "BLAS_FUNC(dlaqps)"(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) nogil
+cdef void dlaqps(int *m, int *n, int *offset, int *nb, int *kb, d *a, int *lda, int *jpvt, d *tau, d *vn1, d *vn2, d *auxv, d *f, int *ldf) noexcept nogil:
+    
+    _fortran_dlaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr0 "BLAS_FUNC(dlaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) nogil
+cdef void dlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dlaqr0(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr1 "BLAS_FUNC(dlaqr1)"(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) nogil
+cdef void dlaqr1(int *n, d *h, int *ldh, d *sr1, d *si1, d *sr2, d *si2, d *v) noexcept nogil:
+    
+    _fortran_dlaqr1(n, h, ldh, sr1, si1, sr2, si2, v)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr2 "BLAS_FUNC(dlaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) nogil
+cdef void dlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil:
+    
+    _fortran_dlaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr3 "BLAS_FUNC(dlaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) nogil
+cdef void dlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, int *ns, int *nd, d *sr, d *si, d *v, int *ldv, int *nh, d *t, int *ldt, int *nv, d *wv, int *ldwv, d *work, int *lwork) noexcept nogil:
+    
+    _fortran_dlaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr4 "BLAS_FUNC(dlaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) nogil
+cdef void dlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, d *h, int *ldh, d *wr, d *wi, int *iloz, int *ihiz, d *z, int *ldz, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dlaqr4(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqr5 "BLAS_FUNC(dlaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) nogil
+cdef void dlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, d *sr, d *si, d *h, int *ldh, int *iloz, int *ihiz, d *z, int *ldz, d *v, int *ldv, d *u, int *ldu, int *nv, d *wv, int *ldwv, int *nh, d *wh, int *ldwh) noexcept nogil:
+    
+    _fortran_dlaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, sr, si, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqsb "BLAS_FUNC(dlaqsb)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil
+cdef void dlaqsb(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_dlaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqsp "BLAS_FUNC(dlaqsp)"(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) nogil
+cdef void dlaqsp(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_dlaqsp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqsy "BLAS_FUNC(dlaqsy)"(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil
+cdef void dlaqsy(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_dlaqsy(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaqtr "BLAS_FUNC(dlaqtr)"(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) nogil
+cdef void dlaqtr(bint *ltran, bint *lreal, int *n, d *t, int *ldt, d *b, d *w, d *scale, d *x, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlaqtr(ltran, lreal, n, t, ldt, b, w, scale, x, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlar1v "BLAS_FUNC(dlar1v)"(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) nogil
+cdef void dlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, d *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil:
+    
+    _fortran_dlar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlar2v "BLAS_FUNC(dlar2v)"(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) nogil
+cdef void dlar2v(int *n, d *x, d *y, d *z, int *incx, d *c, d *s, int *incc) noexcept nogil:
+    
+    _fortran_dlar2v(n, x, y, z, incx, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarf "BLAS_FUNC(dlarf)"(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) nogil
+cdef void dlarf(char *side, int *m, int *n, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil:
+    
+    _fortran_dlarf(side, m, n, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarfb "BLAS_FUNC(dlarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) nogil
+cdef void dlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil:
+    
+    _fortran_dlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarfg "BLAS_FUNC(dlarfg)"(int *n, d *alpha, d *x, int *incx, d *tau) nogil
+cdef void dlarfg(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil:
+    
+    _fortran_dlarfg(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarfgp "BLAS_FUNC(dlarfgp)"(int *n, d *alpha, d *x, int *incx, d *tau) nogil
+cdef void dlarfgp(int *n, d *alpha, d *x, int *incx, d *tau) noexcept nogil:
+    
+    _fortran_dlarfgp(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarft "BLAS_FUNC(dlarft)"(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) nogil
+cdef void dlarft(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil:
+    
+    _fortran_dlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarfx "BLAS_FUNC(dlarfx)"(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) nogil
+cdef void dlarfx(char *side, int *m, int *n, d *v, d *tau, d *c, int *ldc, d *work) noexcept nogil:
+    
+    _fortran_dlarfx(side, m, n, v, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlargv "BLAS_FUNC(dlargv)"(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) nogil
+cdef void dlargv(int *n, d *x, int *incx, d *y, int *incy, d *c, int *incc) noexcept nogil:
+    
+    _fortran_dlargv(n, x, incx, y, incy, c, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarnv "BLAS_FUNC(dlarnv)"(int *idist, int *iseed, int *n, d *x) nogil
+cdef void dlarnv(int *idist, int *iseed, int *n, d *x) noexcept nogil:
+    
+    _fortran_dlarnv(idist, iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarra "BLAS_FUNC(dlarra)"(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) nogil
+cdef void dlarra(int *n, d *d, d *e, d *e2, d *spltol, d *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil:
+    
+    _fortran_dlarra(n, d, e, e2, spltol, tnrm, nsplit, isplit, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrb "BLAS_FUNC(dlarrb)"(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) nogil
+cdef void dlarrb(int *n, d *d, d *lld, int *ifirst, int *ilast, d *rtol1, d *rtol2, int *offset, d *w, d *wgap, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *twist, int *info) noexcept nogil:
+    
+    _fortran_dlarrb(n, d, lld, ifirst, ilast, rtol1, rtol2, offset, w, wgap, werr, work, iwork, pivmin, spdiam, twist, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrc "BLAS_FUNC(dlarrc)"(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) nogil
+cdef void dlarrc(char *jobt, int *n, d *vl, d *vu, d *d, d *e, d *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil:
+    
+    _fortran_dlarrc(jobt, n, vl, vu, d, e, pivmin, eigcnt, lcnt, rcnt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrd "BLAS_FUNC(dlarrd)"(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) nogil
+cdef void dlarrd(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *gers, d *reltol, d *d, d *e, d *e2, d *pivmin, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wl, d *wu, int *iblock, int *indexw, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlarrd(range, order, n, vl, vu, il, iu, gers, reltol, d, e, e2, pivmin, nsplit, isplit, m, w, werr, wl, wu, iblock, indexw, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarre "BLAS_FUNC(dlarre)"(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) nogil
+cdef void dlarre(char *range, int *n, d *vl, d *vu, int *il, int *iu, d *d, d *e, d *e2, d *rtol1, d *rtol2, d *spltol, int *nsplit, int *isplit, int *m, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *pivmin, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlarre(range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrf "BLAS_FUNC(dlarrf)"(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) nogil
+cdef void dlarrf(int *n, d *d, d *l, d *ld, int *clstrt, int *clend, d *w, d *wgap, d *werr, d *spdiam, d *clgapl, d *clgapr, d *pivmin, d *sigma, d *dplus, d *lplus, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlarrf(n, d, l, ld, clstrt, clend, w, wgap, werr, spdiam, clgapl, clgapr, pivmin, sigma, dplus, lplus, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrj "BLAS_FUNC(dlarrj)"(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) nogil
+cdef void dlarrj(int *n, d *d, d *e2, int *ifirst, int *ilast, d *rtol, int *offset, d *w, d *werr, d *work, int *iwork, d *pivmin, d *spdiam, int *info) noexcept nogil:
+    
+    _fortran_dlarrj(n, d, e2, ifirst, ilast, rtol, offset, w, werr, work, iwork, pivmin, spdiam, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrk "BLAS_FUNC(dlarrk)"(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) nogil
+cdef void dlarrk(int *n, int *iw, d *gl, d *gu, d *d, d *e2, d *pivmin, d *reltol, d *w, d *werr, int *info) noexcept nogil:
+    
+    _fortran_dlarrk(n, iw, gl, gu, d, e2, pivmin, reltol, w, werr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrr "BLAS_FUNC(dlarrr)"(int *n, d *d, d *e, int *info) nogil
+cdef void dlarrr(int *n, d *d, d *e, int *info) noexcept nogil:
+    
+    _fortran_dlarrr(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarrv "BLAS_FUNC(dlarrv)"(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) nogil
+cdef void dlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, d *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlartg "BLAS_FUNC(dlartg)"(d *f, d *g, d *cs, d *sn, d *r) nogil
+cdef void dlartg(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil:
+    
+    _fortran_dlartg(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlartgp "BLAS_FUNC(dlartgp)"(d *f, d *g, d *cs, d *sn, d *r) nogil
+cdef void dlartgp(d *f, d *g, d *cs, d *sn, d *r) noexcept nogil:
+    
+    _fortran_dlartgp(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlartgs "BLAS_FUNC(dlartgs)"(d *x, d *y, d *sigma, d *cs, d *sn) nogil
+cdef void dlartgs(d *x, d *y, d *sigma, d *cs, d *sn) noexcept nogil:
+    
+    _fortran_dlartgs(x, y, sigma, cs, sn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlartv "BLAS_FUNC(dlartv)"(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) nogil
+cdef void dlartv(int *n, d *x, int *incx, d *y, int *incy, d *c, d *s, int *incc) noexcept nogil:
+    
+    _fortran_dlartv(n, x, incx, y, incy, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaruv "BLAS_FUNC(dlaruv)"(int *iseed, int *n, d *x) nogil
+cdef void dlaruv(int *iseed, int *n, d *x) noexcept nogil:
+    
+    _fortran_dlaruv(iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarz "BLAS_FUNC(dlarz)"(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) nogil
+cdef void dlarz(char *side, int *m, int *n, int *l, d *v, int *incv, d *tau, d *c, int *ldc, d *work) noexcept nogil:
+    
+    _fortran_dlarz(side, m, n, l, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarzb "BLAS_FUNC(dlarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) nogil
+cdef void dlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *c, int *ldc, d *work, int *ldwork) noexcept nogil:
+    
+    _fortran_dlarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlarzt "BLAS_FUNC(dlarzt)"(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) nogil
+cdef void dlarzt(char *direct, char *storev, int *n, int *k, d *v, int *ldv, d *tau, d *t, int *ldt) noexcept nogil:
+    
+    _fortran_dlarzt(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlas2 "BLAS_FUNC(dlas2)"(d *f, d *g, d *h, d *ssmin, d *ssmax) nogil
+cdef void dlas2(d *f, d *g, d *h, d *ssmin, d *ssmax) noexcept nogil:
+    
+    _fortran_dlas2(f, g, h, ssmin, ssmax)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlascl "BLAS_FUNC(dlascl)"(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) nogil
+cdef void dlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dlascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd0 "BLAS_FUNC(dlasd0)"(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) nogil
+cdef void dlasd0(int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *ldvt, int *smlsiz, int *iwork, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasd0(n, sqre, d, e, u, ldu, vt, ldvt, smlsiz, iwork, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd1 "BLAS_FUNC(dlasd1)"(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) nogil
+cdef void dlasd1(int *nl, int *nr, int *sqre, d *d, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, int *idxq, int *iwork, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasd1(nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd2 "BLAS_FUNC(dlasd2)"(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) nogil
+cdef void dlasd2(int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *alpha, d *beta, d *u, int *ldu, d *vt, int *ldvt, d *dsigma, d *u2, int *ldu2, d *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil:
+    
+    _fortran_dlasd2(nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt, dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd3 "BLAS_FUNC(dlasd3)"(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) nogil
+cdef void dlasd3(int *nl, int *nr, int *sqre, int *k, d *d, d *q, int *ldq, d *dsigma, d *u, int *ldu, d *u2, int *ldu2, d *vt, int *ldvt, d *vt2, int *ldvt2, int *idxc, int *ctot, d *z, int *info) noexcept nogil:
+    
+    _fortran_dlasd3(nl, nr, sqre, k, d, q, ldq, dsigma, u, ldu, u2, ldu2, vt, ldvt, vt2, ldvt2, idxc, ctot, z, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd4 "BLAS_FUNC(dlasd4)"(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) nogil
+cdef void dlasd4(int *n, int *i, d *d, d *z, d *delta, d *rho, d *sigma, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasd4(n, i, d, z, delta, rho, sigma, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd5 "BLAS_FUNC(dlasd5)"(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) nogil
+cdef void dlasd5(int *i, d *d, d *z, d *delta, d *rho, d *dsigma, d *work) noexcept nogil:
+    
+    _fortran_dlasd5(i, d, z, delta, rho, dsigma, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd6 "BLAS_FUNC(dlasd6)"(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) nogil
+cdef void dlasd6(int *icompq, int *nl, int *nr, int *sqre, d *d, d *vf, d *vl, d *alpha, d *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlasd6(icompq, nl, nr, sqre, d, vf, vl, alpha, beta, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd7 "BLAS_FUNC(dlasd7)"(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) nogil
+cdef void dlasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, d *d, d *z, d *zw, d *vf, d *vfw, d *vl, d *vlw, d *alpha, d *beta, d *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *c, d *s, int *info) noexcept nogil:
+    
+    _fortran_dlasd7(icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw, alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, c, s, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasd8 "BLAS_FUNC(dlasd8)"(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) nogil
+cdef void dlasd8(int *icompq, int *k, d *d, d *z, d *vf, d *vl, d *difl, d *difr, int *lddifr, d *dsigma, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasda "BLAS_FUNC(dlasda)"(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) nogil
+cdef void dlasda(int *icompq, int *smlsiz, int *n, int *sqre, d *d, d *e, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dlasda(icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasdq "BLAS_FUNC(dlasdq)"(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) nogil
+cdef void dlasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, d *vt, int *ldvt, d *u, int *ldu, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasdq(uplo, sqre, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasdt "BLAS_FUNC(dlasdt)"(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) nogil
+cdef void dlasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil:
+    
+    _fortran_dlasdt(n, lvl, nd, inode, ndiml, ndimr, msub)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaset "BLAS_FUNC(dlaset)"(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) nogil
+cdef void dlaset(char *uplo, int *m, int *n, d *alpha, d *beta, d *a, int *lda) noexcept nogil:
+    
+    _fortran_dlaset(uplo, m, n, alpha, beta, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasq1 "BLAS_FUNC(dlasq1)"(int *n, d *d, d *e, d *work, int *info) nogil
+cdef void dlasq1(int *n, d *d, d *e, d *work, int *info) noexcept nogil:
+    
+    _fortran_dlasq1(n, d, e, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasq2 "BLAS_FUNC(dlasq2)"(int *n, d *z, int *info) nogil
+cdef void dlasq2(int *n, d *z, int *info) noexcept nogil:
+    
+    _fortran_dlasq2(n, z, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasq3 "BLAS_FUNC(dlasq3)"(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) nogil
+cdef void dlasq3(int *i0, int *n0, d *z, int *pp, d *dmin, d *sigma, d *desig, d *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *g, d *tau) noexcept nogil:
+    
+    _fortran_dlasq3(i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasq4 "BLAS_FUNC(dlasq4)"(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) nogil
+cdef void dlasq4(int *i0, int *n0, d *z, int *pp, int *n0in, d *dmin, d *dmin1, d *dmin2, d *dn, d *dn1, d *dn2, d *tau, int *ttype, d *g) noexcept nogil:
+    
+    _fortran_dlasq4(i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasq6 "BLAS_FUNC(dlasq6)"(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) nogil
+cdef void dlasq6(int *i0, int *n0, d *z, int *pp, d *dmin, d *dmin1, d *dmin2, d *dn, d *dnm1, d *dnm2) noexcept nogil:
+    
+    _fortran_dlasq6(i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasr "BLAS_FUNC(dlasr)"(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) nogil
+cdef void dlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, d *a, int *lda) noexcept nogil:
+    
+    _fortran_dlasr(side, pivot, direct, m, n, c, s, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasrt "BLAS_FUNC(dlasrt)"(char *id, int *n, d *d, int *info) nogil
+cdef void dlasrt(char *id, int *n, d *d, int *info) noexcept nogil:
+    
+    _fortran_dlasrt(id, n, d, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlassq "BLAS_FUNC(dlassq)"(int *n, d *x, int *incx, d *scale, d *sumsq) nogil
+cdef void dlassq(int *n, d *x, int *incx, d *scale, d *sumsq) noexcept nogil:
+    
+    _fortran_dlassq(n, x, incx, scale, sumsq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasv2 "BLAS_FUNC(dlasv2)"(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) nogil
+cdef void dlasv2(d *f, d *g, d *h, d *ssmin, d *ssmax, d *snr, d *csr, d *snl, d *csl) noexcept nogil:
+    
+    _fortran_dlasv2(f, g, h, ssmin, ssmax, snr, csr, snl, csl)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlaswp "BLAS_FUNC(dlaswp)"(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil
+cdef void dlaswp(int *n, d *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil:
+    
+    _fortran_dlaswp(n, a, lda, k1, k2, ipiv, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasy2 "BLAS_FUNC(dlasy2)"(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) nogil
+cdef void dlasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, d *tl, int *ldtl, d *tr, int *ldtr, d *b, int *ldb, d *scale, d *x, int *ldx, d *xnorm, int *info) noexcept nogil:
+    
+    _fortran_dlasy2(ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlasyf "BLAS_FUNC(dlasyf)"(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) nogil
+cdef void dlasyf(char *uplo, int *n, int *nb, int *kb, d *a, int *lda, int *ipiv, d *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_dlasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlat2s "BLAS_FUNC(dlat2s)"(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) nogil
+cdef void dlat2s(char *uplo, int *n, d *a, int *lda, s *sa, int *ldsa, int *info) noexcept nogil:
+    
+    _fortran_dlat2s(uplo, n, a, lda, sa, ldsa, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatbs "BLAS_FUNC(dlatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) nogil
+cdef void dlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, d *ab, int *ldab, d *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_dlatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatdf "BLAS_FUNC(dlatdf)"(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) nogil
+cdef void dlatdf(int *ijob, int *n, d *z, int *ldz, d *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil:
+    
+    _fortran_dlatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatps "BLAS_FUNC(dlatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) nogil
+cdef void dlatps(char *uplo, char *trans, char *diag, char *normin, int *n, d *ap, d *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_dlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatrd "BLAS_FUNC(dlatrd)"(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) nogil
+cdef void dlatrd(char *uplo, int *n, int *nb, d *a, int *lda, d *e, d *tau, d *w, int *ldw) noexcept nogil:
+    
+    _fortran_dlatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatrs "BLAS_FUNC(dlatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) nogil
+cdef void dlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, d *a, int *lda, d *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_dlatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlatrz "BLAS_FUNC(dlatrz)"(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) nogil
+cdef void dlatrz(int *m, int *n, int *l, d *a, int *lda, d *tau, d *work) noexcept nogil:
+    
+    _fortran_dlatrz(m, n, l, a, lda, tau, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlauu2 "BLAS_FUNC(dlauu2)"(char *uplo, int *n, d *a, int *lda, int *info) nogil
+cdef void dlauu2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dlauu2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dlauum "BLAS_FUNC(dlauum)"(char *uplo, int *n, d *a, int *lda, int *info) nogil
+cdef void dlauum(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dlauum(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dopgtr "BLAS_FUNC(dopgtr)"(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) nogil
+cdef void dopgtr(char *uplo, int *n, d *ap, d *tau, d *q, int *ldq, d *work, int *info) noexcept nogil:
+    
+    _fortran_dopgtr(uplo, n, ap, tau, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dopmtr "BLAS_FUNC(dopmtr)"(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dopmtr(char *side, char *uplo, char *trans, int *m, int *n, d *ap, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorbdb "BLAS_FUNC(dorbdb)"(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) nogil
+cdef void dorbdb(char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *phi, d *taup1, d *taup2, d *tauq1, d *tauq2, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorcsd "BLAS_FUNC(dorcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, d *x11, int *ldx11, d *x12, int *ldx12, d *x21, int *ldx21, d *x22, int *ldx22, d *theta, d *u1, int *ldu1, d *u2, int *ldu2, d *v1t, int *ldv1t, d *v2t, int *ldv2t, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dorcsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorg2l "BLAS_FUNC(dorg2l)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dorg2l(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorg2l(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorg2r "BLAS_FUNC(dorg2r)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dorg2r(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorg2r(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgbr "BLAS_FUNC(dorgbr)"(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorgbr(char *vect, int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorgbr(vect, m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorghr "BLAS_FUNC(dorghr)"(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorghr(int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgl2 "BLAS_FUNC(dorgl2)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dorgl2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorgl2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorglq "BLAS_FUNC(dorglq)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorglq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorglq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgql "BLAS_FUNC(dorgql)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorgql(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorgql(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgqr "BLAS_FUNC(dorgqr)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorgqr(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorgqr(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgr2 "BLAS_FUNC(dorgr2)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) nogil
+cdef void dorgr2(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorgr2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgrq "BLAS_FUNC(dorgrq)"(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorgrq(int *m, int *n, int *k, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorgrq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorgtr "BLAS_FUNC(dorgtr)"(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dorgtr(char *uplo, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dorgtr(uplo, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorm2l "BLAS_FUNC(dorm2l)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dorm2l(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorm2r "BLAS_FUNC(dorm2r)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dorm2r(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormbr "BLAS_FUNC(dormbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormhr "BLAS_FUNC(dormhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dorml2 "BLAS_FUNC(dorml2)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dorml2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormlq "BLAS_FUNC(dormlq)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormlq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormql "BLAS_FUNC(dormql)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormql(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormqr "BLAS_FUNC(dormqr)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormqr(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormr2 "BLAS_FUNC(dormr2)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dormr2(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormr3 "BLAS_FUNC(dormr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) nogil
+cdef void dormr3(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *info) noexcept nogil:
+    
+    _fortran_dormr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormrq "BLAS_FUNC(dormrq)"(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormrq(char *side, char *trans, int *m, int *n, int *k, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormrz "BLAS_FUNC(dormrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormrz(char *side, char *trans, int *m, int *n, int *k, int *l, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dormtr "BLAS_FUNC(dormtr)"(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) nogil
+cdef void dormtr(char *side, char *uplo, char *trans, int *m, int *n, d *a, int *lda, d *tau, d *c, int *ldc, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbcon "BLAS_FUNC(dpbcon)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dpbcon(char *uplo, int *n, int *kd, d *ab, int *ldab, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbequ "BLAS_FUNC(dpbequ)"(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) nogil
+cdef void dpbequ(char *uplo, int *n, int *kd, d *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbrfs "BLAS_FUNC(dpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dpbrfs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbstf "BLAS_FUNC(dpbstf)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil
+cdef void dpbstf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_dpbstf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbsv "BLAS_FUNC(dpbsv)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil
+cdef void dpbsv(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbsvx "BLAS_FUNC(dpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *afb, int *ldafb, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbtf2 "BLAS_FUNC(dpbtf2)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil
+cdef void dpbtf2(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_dpbtf2(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbtrf "BLAS_FUNC(dpbtrf)"(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) nogil
+cdef void dpbtrf(char *uplo, int *n, int *kd, d *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_dpbtrf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpbtrs "BLAS_FUNC(dpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil
+cdef void dpbtrs(char *uplo, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpftrf "BLAS_FUNC(dpftrf)"(char *transr, char *uplo, int *n, d *a, int *info) nogil
+cdef void dpftrf(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil:
+    
+    _fortran_dpftrf(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpftri "BLAS_FUNC(dpftri)"(char *transr, char *uplo, int *n, d *a, int *info) nogil
+cdef void dpftri(char *transr, char *uplo, int *n, d *a, int *info) noexcept nogil:
+    
+    _fortran_dpftri(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpftrs "BLAS_FUNC(dpftrs)"(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) nogil
+cdef void dpftrs(char *transr, char *uplo, int *n, int *nrhs, d *a, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpftrs(transr, uplo, n, nrhs, a, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpocon "BLAS_FUNC(dpocon)"(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dpocon(char *uplo, int *n, d *a, int *lda, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dpocon(uplo, n, a, lda, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpoequ "BLAS_FUNC(dpoequ)"(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) nogil
+cdef void dpoequ(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dpoequ(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpoequb "BLAS_FUNC(dpoequb)"(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) nogil
+cdef void dpoequb(int *n, d *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dpoequb(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dporfs "BLAS_FUNC(dporfs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dporfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dposv "BLAS_FUNC(dposv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil
+cdef void dposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dposv(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dposvx "BLAS_FUNC(dposvx)"(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dposvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpotf2 "BLAS_FUNC(dpotf2)"(char *uplo, int *n, d *a, int *lda, int *info) nogil
+cdef void dpotf2(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dpotf2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpotrf "BLAS_FUNC(dpotrf)"(char *uplo, int *n, d *a, int *lda, int *info) nogil
+cdef void dpotrf(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dpotrf(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpotri "BLAS_FUNC(dpotri)"(char *uplo, int *n, d *a, int *lda, int *info) nogil
+cdef void dpotri(char *uplo, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dpotri(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpotrs "BLAS_FUNC(dpotrs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil
+cdef void dpotrs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dppcon "BLAS_FUNC(dppcon)"(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dppcon(char *uplo, int *n, d *ap, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dppcon(uplo, n, ap, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dppequ "BLAS_FUNC(dppequ)"(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) nogil
+cdef void dppequ(char *uplo, int *n, d *ap, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_dppequ(uplo, n, ap, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpprfs "BLAS_FUNC(dpprfs)"(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dpprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dppsv "BLAS_FUNC(dppsv)"(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil
+cdef void dppsv(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dppsv(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dppsvx "BLAS_FUNC(dppsvx)"(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dppsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, char *equed, d *s, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpptrf "BLAS_FUNC(dpptrf)"(char *uplo, int *n, d *ap, int *info) nogil
+cdef void dpptrf(char *uplo, int *n, d *ap, int *info) noexcept nogil:
+    
+    _fortran_dpptrf(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpptri "BLAS_FUNC(dpptri)"(char *uplo, int *n, d *ap, int *info) nogil
+cdef void dpptri(char *uplo, int *n, d *ap, int *info) noexcept nogil:
+    
+    _fortran_dpptri(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpptrs "BLAS_FUNC(dpptrs)"(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil
+cdef void dpptrs(char *uplo, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpptrs(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpstf2 "BLAS_FUNC(dpstf2)"(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil
+cdef void dpstf2(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil:
+    
+    _fortran_dpstf2(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpstrf "BLAS_FUNC(dpstrf)"(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil
+cdef void dpstrf(char *uplo, int *n, d *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil:
+    
+    _fortran_dpstrf(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dptcon "BLAS_FUNC(dptcon)"(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) nogil
+cdef void dptcon(int *n, d *d, d *e, d *anorm, d *rcond, d *work, int *info) noexcept nogil:
+    
+    _fortran_dptcon(n, d, e, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpteqr "BLAS_FUNC(dpteqr)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil
+cdef void dpteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dpteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dptrfs "BLAS_FUNC(dptrfs)"(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) nogil
+cdef void dptrfs(int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *info) noexcept nogil:
+    
+    _fortran_dptrfs(n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dptsv "BLAS_FUNC(dptsv)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) nogil
+cdef void dptsv(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dptsv(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dptsvx "BLAS_FUNC(dptsvx)"(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) nogil
+cdef void dptsvx(char *fact, int *n, int *nrhs, d *d, d *e, d *df, d *ef, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *info) noexcept nogil:
+    
+    _fortran_dptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpttrf "BLAS_FUNC(dpttrf)"(int *n, d *d, d *e, int *info) nogil
+cdef void dpttrf(int *n, d *d, d *e, int *info) noexcept nogil:
+    
+    _fortran_dpttrf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dpttrs "BLAS_FUNC(dpttrs)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) nogil
+cdef void dpttrs(int *n, int *nrhs, d *d, d *e, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dpttrs(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dptts2 "BLAS_FUNC(dptts2)"(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) nogil
+cdef void dptts2(int *n, int *nrhs, d *d, d *e, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dptts2(n, nrhs, d, e, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_drscl "BLAS_FUNC(drscl)"(int *n, d *sa, d *sx, int *incx) nogil
+cdef void drscl(int *n, d *sa, d *sx, int *incx) noexcept nogil:
+    
+    _fortran_drscl(n, sa, sx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbev "BLAS_FUNC(dsbev)"(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) nogil
+cdef void dsbev(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbevd "BLAS_FUNC(dsbevd)"(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dsbevd(char *jobz, char *uplo, int *n, int *kd, d *ab, int *ldab, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dsbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbevx "BLAS_FUNC(dsbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dsbevx(char *jobz, char *range, char *uplo, int *n, int *kd, d *ab, int *ldab, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dsbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbgst "BLAS_FUNC(dsbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) nogil
+cdef void dsbgst(char *vect, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *x, int *ldx, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbgv "BLAS_FUNC(dsbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) nogil
+cdef void dsbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbgvd "BLAS_FUNC(dsbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dsbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dsbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbgvx "BLAS_FUNC(dsbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dsbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, d *ab, int *ldab, d *bb, int *ldbb, d *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dsbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsbtrd "BLAS_FUNC(dsbtrd)"(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) nogil
+cdef void dsbtrd(char *vect, char *uplo, int *n, int *kd, d *ab, int *ldab, d *d, d *e, d *q, int *ldq, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsfrk "BLAS_FUNC(dsfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) nogil
+cdef void dsfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, d *a, int *lda, d *beta, d *c) noexcept nogil:
+    
+    _fortran_dsfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsgesv "BLAS_FUNC(dsgesv)"(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) nogil
+cdef void dsgesv(int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil:
+    
+    _fortran_dsgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, iter, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspcon "BLAS_FUNC(dspcon)"(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dspcon(char *uplo, int *n, d *ap, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dspcon(uplo, n, ap, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspev "BLAS_FUNC(dspev)"(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) nogil
+cdef void dspev(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dspev(jobz, uplo, n, ap, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspevd "BLAS_FUNC(dspevd)"(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dspevd(char *jobz, char *uplo, int *n, d *ap, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspevx "BLAS_FUNC(dspevx)"(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dspevx(char *jobz, char *range, char *uplo, int *n, d *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspgst "BLAS_FUNC(dspgst)"(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) nogil
+cdef void dspgst(int *itype, char *uplo, int *n, d *ap, d *bp, int *info) noexcept nogil:
+    
+    _fortran_dspgst(itype, uplo, n, ap, bp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspgv "BLAS_FUNC(dspgv)"(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) nogil
+cdef void dspgv(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dspgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspgvd "BLAS_FUNC(dspgvd)"(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dspgvd(int *itype, char *jobz, char *uplo, int *n, d *ap, d *bp, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dspgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspgvx "BLAS_FUNC(dspgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *ap, d *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dspgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsposv "BLAS_FUNC(dsposv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) nogil
+cdef void dsposv(char *uplo, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *work, s *swork, int *iter, int *info) noexcept nogil:
+    
+    _fortran_dsposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, iter, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsprfs "BLAS_FUNC(dsprfs)"(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dsprfs(char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dsprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspsv "BLAS_FUNC(dspsv)"(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dspsv(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dspsvx "BLAS_FUNC(dspsvx)"(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dspsvx(char *fact, char *uplo, int *n, int *nrhs, d *ap, d *afp, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsptrd "BLAS_FUNC(dsptrd)"(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) nogil
+cdef void dsptrd(char *uplo, int *n, d *ap, d *d, d *e, d *tau, int *info) noexcept nogil:
+    
+    _fortran_dsptrd(uplo, n, ap, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsptrf "BLAS_FUNC(dsptrf)"(char *uplo, int *n, d *ap, int *ipiv, int *info) nogil
+cdef void dsptrf(char *uplo, int *n, d *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dsptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsptri "BLAS_FUNC(dsptri)"(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) nogil
+cdef void dsptri(char *uplo, int *n, d *ap, int *ipiv, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsptrs "BLAS_FUNC(dsptrs)"(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dsptrs(char *uplo, int *n, int *nrhs, d *ap, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dsptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstebz "BLAS_FUNC(dstebz)"(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) nogil
+cdef void dstebz(char *range, char *order, int *n, d *vl, d *vu, int *il, int *iu, d *abstol, d *d, d *e, int *m, int *nsplit, d *w, int *iblock, int *isplit, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstedc "BLAS_FUNC(dstedc)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dstedc(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstegr "BLAS_FUNC(dstegr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstein "BLAS_FUNC(dstein)"(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstemr "BLAS_FUNC(dstemr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, d *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsteqr "BLAS_FUNC(dsteqr)"(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil
+cdef void dsteqr(char *compz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsterf "BLAS_FUNC(dsterf)"(int *n, d *d, d *e, int *info) nogil
+cdef void dsterf(int *n, d *d, d *e, int *info) noexcept nogil:
+    
+    _fortran_dsterf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstev "BLAS_FUNC(dstev)"(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) nogil
+cdef void dstev(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_dstev(jobz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstevd "BLAS_FUNC(dstevd)"(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dstevd(char *jobz, int *n, d *d, d *e, d *z, int *ldz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dstevd(jobz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstevr "BLAS_FUNC(dstevr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dstevr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dstevx "BLAS_FUNC(dstevx)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void dstevx(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dstevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsycon "BLAS_FUNC(dsycon)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dsycon(char *uplo, int *n, d *a, int *lda, int *ipiv, d *anorm, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dsycon(uplo, n, a, lda, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyconv "BLAS_FUNC(dsyconv)"(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) nogil
+cdef void dsyconv(char *uplo, char *way, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsyconv(uplo, way, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyequb "BLAS_FUNC(dsyequb)"(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) nogil
+cdef void dsyequb(char *uplo, int *n, d *a, int *lda, d *s, d *scond, d *amax, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsyequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyev "BLAS_FUNC(dsyev)"(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) nogil
+cdef void dsyev(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsyev(jobz, uplo, n, a, lda, w, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyevd "BLAS_FUNC(dsyevd)"(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dsyevd(char *jobz, char *uplo, int *n, d *a, int *lda, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dsyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyevr "BLAS_FUNC(dsyevr)"(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dsyevr(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dsyevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyevx "BLAS_FUNC(dsyevx)"(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) nogil
+cdef void dsyevx(char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dsyevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsygs2 "BLAS_FUNC(dsygs2)"(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) nogil
+cdef void dsygs2(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dsygs2(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsygst "BLAS_FUNC(dsygst)"(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) nogil
+cdef void dsygst(int *itype, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dsygst(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsygv "BLAS_FUNC(dsygv)"(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) nogil
+cdef void dsygv(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsygvd "BLAS_FUNC(dsygvd)"(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dsygvd(int *itype, char *jobz, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *w, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dsygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsygvx "BLAS_FUNC(dsygvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) nogil
+cdef void dsygvx(int *itype, char *jobz, char *range, char *uplo, int *n, d *a, int *lda, d *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, d *z, int *ldz, d *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_dsygvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyrfs "BLAS_FUNC(dsyrfs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dsyrfs(char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsysv "BLAS_FUNC(dsysv)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) nogil
+cdef void dsysv(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsysvx "BLAS_FUNC(dsysvx)"(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dsysvx(char *fact, char *uplo, int *n, int *nrhs, d *a, int *lda, d *af, int *ldaf, int *ipiv, d *b, int *ldb, d *x, int *ldx, d *rcond, d *ferr, d *berr, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsyswapr "BLAS_FUNC(dsyswapr)"(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) nogil
+cdef void dsyswapr(char *uplo, int *n, d *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_dsyswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytd2 "BLAS_FUNC(dsytd2)"(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) nogil
+cdef void dsytd2(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, int *info) noexcept nogil:
+    
+    _fortran_dsytd2(uplo, n, a, lda, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytf2 "BLAS_FUNC(dsytf2)"(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) nogil
+cdef void dsytf2(char *uplo, int *n, d *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_dsytf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytrd "BLAS_FUNC(dsytrd)"(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dsytrd(char *uplo, int *n, d *a, int *lda, d *d, d *e, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytrf "BLAS_FUNC(dsytrf)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil
+cdef void dsytrf(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsytrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytri "BLAS_FUNC(dsytri)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) nogil
+cdef void dsytri(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsytri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytri2 "BLAS_FUNC(dsytri2)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) nogil
+cdef void dsytri2(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dsytri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytri2x "BLAS_FUNC(dsytri2x)"(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) nogil
+cdef void dsytri2x(char *uplo, int *n, d *a, int *lda, int *ipiv, d *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_dsytri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytrs "BLAS_FUNC(dsytrs)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) nogil
+cdef void dsytrs(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dsytrs2 "BLAS_FUNC(dsytrs2)"(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) nogil
+cdef void dsytrs2(char *uplo, int *n, int *nrhs, d *a, int *lda, int *ipiv, d *b, int *ldb, d *work, int *info) noexcept nogil:
+    
+    _fortran_dsytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtbcon "BLAS_FUNC(dtbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dtbcon(char *norm, char *uplo, char *diag, int *n, int *kd, d *ab, int *ldab, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtbrfs "BLAS_FUNC(dtbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dtbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtbtrs "BLAS_FUNC(dtbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) nogil
+cdef void dtbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, d *ab, int *ldab, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dtbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtfsm "BLAS_FUNC(dtfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) nogil
+cdef void dtfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, d *alpha, d *a, d *b, int *ldb) noexcept nogil:
+    
+    _fortran_dtfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtftri "BLAS_FUNC(dtftri)"(char *transr, char *uplo, char *diag, int *n, d *a, int *info) nogil
+cdef void dtftri(char *transr, char *uplo, char *diag, int *n, d *a, int *info) noexcept nogil:
+    
+    _fortran_dtftri(transr, uplo, diag, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtfttp "BLAS_FUNC(dtfttp)"(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) nogil
+cdef void dtfttp(char *transr, char *uplo, int *n, d *arf, d *ap, int *info) noexcept nogil:
+    
+    _fortran_dtfttp(transr, uplo, n, arf, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtfttr "BLAS_FUNC(dtfttr)"(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) nogil
+cdef void dtfttr(char *transr, char *uplo, int *n, d *arf, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dtfttr(transr, uplo, n, arf, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgevc "BLAS_FUNC(dtgevc)"(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) nogil
+cdef void dtgevc(char *side, char *howmny, bint *select, int *n, d *s, int *lds, d *p, int *ldp, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil:
+    
+    _fortran_dtgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgex2 "BLAS_FUNC(dtgex2)"(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) nogil
+cdef void dtgex2(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *j1, int *n1, int *n2, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dtgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, n1, n2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgexc "BLAS_FUNC(dtgexc)"(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) nogil
+cdef void dtgexc(bint *wantq, bint *wantz, int *n, d *a, int *lda, d *b, int *ldb, d *q, int *ldq, d *z, int *ldz, int *ifst, int *ilst, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dtgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgsen "BLAS_FUNC(dtgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dtgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *alphar, d *alphai, d *beta, d *q, int *ldq, d *z, int *ldz, int *m, d *pl, d *pr, d *dif, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dtgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgsja "BLAS_FUNC(dtgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) nogil
+cdef void dtgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, d *a, int *lda, d *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, d *u, int *ldu, d *v, int *ldv, d *q, int *ldq, d *work, int *ncycle, int *info) noexcept nogil:
+    
+    _fortran_dtgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgsna "BLAS_FUNC(dtgsna)"(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dtgsna(char *job, char *howmny, bint *select, int *n, d *a, int *lda, d *b, int *ldb, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *dif, int *mm, int *m, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgsy2 "BLAS_FUNC(dtgsy2)"(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) nogil
+cdef void dtgsy2(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *iwork, int *pq, int *info) noexcept nogil:
+    
+    _fortran_dtgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, iwork, pq, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtgsyl "BLAS_FUNC(dtgsyl)"(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) nogil
+cdef void dtgsyl(char *trans, int *ijob, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *d, int *ldd, d *e, int *lde, d *f, int *ldf, d *scale, d *dif, d *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpcon "BLAS_FUNC(dtpcon)"(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dtpcon(char *norm, char *uplo, char *diag, int *n, d *ap, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpmqrt "BLAS_FUNC(dtpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) nogil
+cdef void dtpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *info) noexcept nogil:
+    
+    _fortran_dtpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpqrt "BLAS_FUNC(dtpqrt)"(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) nogil
+cdef void dtpqrt(int *m, int *n, int *l, int *nb, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, d *work, int *info) noexcept nogil:
+    
+    _fortran_dtpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpqrt2 "BLAS_FUNC(dtpqrt2)"(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) nogil
+cdef void dtpqrt2(int *m, int *n, int *l, d *a, int *lda, d *b, int *ldb, d *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_dtpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtprfb "BLAS_FUNC(dtprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) nogil
+cdef void dtprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, d *v, int *ldv, d *t, int *ldt, d *a, int *lda, d *b, int *ldb, d *work, int *ldwork) noexcept nogil:
+    
+    _fortran_dtprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtprfs "BLAS_FUNC(dtprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dtprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtptri "BLAS_FUNC(dtptri)"(char *uplo, char *diag, int *n, d *ap, int *info) nogil
+cdef void dtptri(char *uplo, char *diag, int *n, d *ap, int *info) noexcept nogil:
+    
+    _fortran_dtptri(uplo, diag, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtptrs "BLAS_FUNC(dtptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) nogil
+cdef void dtptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *ap, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dtptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpttf "BLAS_FUNC(dtpttf)"(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) nogil
+cdef void dtpttf(char *transr, char *uplo, int *n, d *ap, d *arf, int *info) noexcept nogil:
+    
+    _fortran_dtpttf(transr, uplo, n, ap, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtpttr "BLAS_FUNC(dtpttr)"(char *uplo, int *n, d *ap, d *a, int *lda, int *info) nogil
+cdef void dtpttr(char *uplo, int *n, d *ap, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dtpttr(uplo, n, ap, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrcon "BLAS_FUNC(dtrcon)"(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) nogil
+cdef void dtrcon(char *norm, char *uplo, char *diag, int *n, d *a, int *lda, d *rcond, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtrcon(norm, uplo, diag, n, a, lda, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrevc "BLAS_FUNC(dtrevc)"(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) nogil
+cdef void dtrevc(char *side, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, int *mm, int *m, d *work, int *info) noexcept nogil:
+    
+    _fortran_dtrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrexc "BLAS_FUNC(dtrexc)"(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) nogil
+cdef void dtrexc(char *compq, int *n, d *t, int *ldt, d *q, int *ldq, int *ifst, int *ilst, d *work, int *info) noexcept nogil:
+    
+    _fortran_dtrexc(compq, n, t, ldt, q, ldq, ifst, ilst, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrrfs "BLAS_FUNC(dtrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) nogil
+cdef void dtrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, d *x, int *ldx, d *ferr, d *berr, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrsen "BLAS_FUNC(dtrsen)"(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void dtrsen(char *job, char *compq, bint *select, int *n, d *t, int *ldt, d *q, int *ldq, d *wr, d *wi, int *m, d *s, d *sep, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_dtrsen(job, compq, select, n, t, ldt, q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrsna "BLAS_FUNC(dtrsna)"(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) nogil
+cdef void dtrsna(char *job, char *howmny, bint *select, int *n, d *t, int *ldt, d *vl, int *ldvl, d *vr, int *ldvr, d *s, d *sep, int *mm, int *m, d *work, int *ldwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_dtrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrsyl "BLAS_FUNC(dtrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) nogil
+cdef void dtrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, d *a, int *lda, d *b, int *ldb, d *c, int *ldc, d *scale, int *info) noexcept nogil:
+    
+    _fortran_dtrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrti2 "BLAS_FUNC(dtrti2)"(char *uplo, char *diag, int *n, d *a, int *lda, int *info) nogil
+cdef void dtrti2(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dtrti2(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrtri "BLAS_FUNC(dtrtri)"(char *uplo, char *diag, int *n, d *a, int *lda, int *info) nogil
+cdef void dtrtri(char *uplo, char *diag, int *n, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_dtrtri(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrtrs "BLAS_FUNC(dtrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) nogil
+cdef void dtrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, d *a, int *lda, d *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_dtrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrttf "BLAS_FUNC(dtrttf)"(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) nogil
+cdef void dtrttf(char *transr, char *uplo, int *n, d *a, int *lda, d *arf, int *info) noexcept nogil:
+    
+    _fortran_dtrttf(transr, uplo, n, a, lda, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtrttp "BLAS_FUNC(dtrttp)"(char *uplo, int *n, d *a, int *lda, d *ap, int *info) nogil
+cdef void dtrttp(char *uplo, int *n, d *a, int *lda, d *ap, int *info) noexcept nogil:
+    
+    _fortran_dtrttp(uplo, n, a, lda, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_dtzrzf "BLAS_FUNC(dtzrzf)"(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) nogil
+cdef void dtzrzf(int *m, int *n, d *a, int *lda, d *tau, d *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_dtzrzf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_dzsum1 "BLAS_FUNC(dzsum1)"(int *n, npy_complex128 *cx, int *incx) nogil
+cdef d dzsum1(int *n, z *cx, int *incx) noexcept nogil:
+    
+    return _fortran_dzsum1(n, cx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_icmax1 "BLAS_FUNC(icmax1)"(int *n, npy_complex64 *cx, int *incx) nogil
+cdef int icmax1(int *n, c *cx, int *incx) noexcept nogil:
+    
+    return _fortran_icmax1(n, cx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ieeeck "BLAS_FUNC(ieeeck)"(int *ispec, s *zero, s *one) nogil
+cdef int ieeeck(int *ispec, s *zero, s *one) noexcept nogil:
+    
+    return _fortran_ieeeck(ispec, zero, one)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilaclc "BLAS_FUNC(ilaclc)"(int *m, int *n, npy_complex64 *a, int *lda) nogil
+cdef int ilaclc(int *m, int *n, c *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilaclc(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilaclr "BLAS_FUNC(ilaclr)"(int *m, int *n, npy_complex64 *a, int *lda) nogil
+cdef int ilaclr(int *m, int *n, c *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilaclr(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_iladiag "BLAS_FUNC(iladiag)"(char *diag) nogil
+cdef int iladiag(char *diag) noexcept nogil:
+    
+    return _fortran_iladiag(diag)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_iladlc "BLAS_FUNC(iladlc)"(int *m, int *n, d *a, int *lda) nogil
+cdef int iladlc(int *m, int *n, d *a, int *lda) noexcept nogil:
+    
+    return _fortran_iladlc(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_iladlr "BLAS_FUNC(iladlr)"(int *m, int *n, d *a, int *lda) nogil
+cdef int iladlr(int *m, int *n, d *a, int *lda) noexcept nogil:
+    
+    return _fortran_iladlr(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilaprec "BLAS_FUNC(ilaprec)"(char *prec) nogil
+cdef int ilaprec(char *prec) noexcept nogil:
+    
+    return _fortran_ilaprec(prec)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilaslc "BLAS_FUNC(ilaslc)"(int *m, int *n, s *a, int *lda) nogil
+cdef int ilaslc(int *m, int *n, s *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilaslc(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilaslr "BLAS_FUNC(ilaslr)"(int *m, int *n, s *a, int *lda) nogil
+cdef int ilaslr(int *m, int *n, s *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilaslr(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilatrans "BLAS_FUNC(ilatrans)"(char *trans) nogil
+cdef int ilatrans(char *trans) noexcept nogil:
+    
+    return _fortran_ilatrans(trans)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilauplo "BLAS_FUNC(ilauplo)"(char *uplo) nogil
+cdef int ilauplo(char *uplo) noexcept nogil:
+    
+    return _fortran_ilauplo(uplo)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ilaver "BLAS_FUNC(ilaver)"(int *vers_major, int *vers_minor, int *vers_patch) nogil
+cdef void ilaver(int *vers_major, int *vers_minor, int *vers_patch) noexcept nogil:
+    
+    _fortran_ilaver(vers_major, vers_minor, vers_patch)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilazlc "BLAS_FUNC(ilazlc)"(int *m, int *n, npy_complex128 *a, int *lda) nogil
+cdef int ilazlc(int *m, int *n, z *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilazlc(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_ilazlr "BLAS_FUNC(ilazlr)"(int *m, int *n, npy_complex128 *a, int *lda) nogil
+cdef int ilazlr(int *m, int *n, z *a, int *lda) noexcept nogil:
+    
+    return _fortran_ilazlr(m, n, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    int _fortran_izmax1 "BLAS_FUNC(izmax1)"(int *n, npy_complex128 *cx, int *incx) nogil
+cdef int izmax1(int *n, z *cx, int *incx) noexcept nogil:
+    
+    return _fortran_izmax1(n, cx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sbbcsd "BLAS_FUNC(sbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) nogil
+cdef void sbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sbdsdc "BLAS_FUNC(sbdsdc)"(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) nogil
+cdef void sbdsdc(char *uplo, char *compq, int *n, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, s *q, int *iq, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sbdsdc(uplo, compq, n, d, e, u, ldu, vt, ldvt, q, iq, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sbdsqr "BLAS_FUNC(sbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) nogil
+cdef void sbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_scsum1 "BLAS_FUNC(scsum1)"(int *n, npy_complex64 *cx, int *incx) nogil
+cdef s scsum1(int *n, c *cx, int *incx) noexcept nogil:
+    
+    return _fortran_scsum1(n, cx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sdisna "BLAS_FUNC(sdisna)"(char *job, int *m, int *n, s *d, s *sep, int *info) nogil
+cdef void sdisna(char *job, int *m, int *n, s *d, s *sep, int *info) noexcept nogil:
+    
+    _fortran_sdisna(job, m, n, d, sep, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbbrd "BLAS_FUNC(sgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) nogil
+cdef void sgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *pt, int *ldpt, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbcon "BLAS_FUNC(sgbcon)"(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void sgbcon(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbequ "BLAS_FUNC(sgbequ)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void sgbequ(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_sgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbequb "BLAS_FUNC(sgbequb)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void sgbequb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_sgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbrfs "BLAS_FUNC(sgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbsv "BLAS_FUNC(sgbsv)"(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sgbsv(int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbsvx "BLAS_FUNC(sgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbtf2 "BLAS_FUNC(sgbtf2)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void sgbtf2(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_sgbtf2(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbtrf "BLAS_FUNC(sgbtrf)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void sgbtrf(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_sgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgbtrs "BLAS_FUNC(sgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, s *ab, int *ldab, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgebak "BLAS_FUNC(sgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) nogil
+cdef void sgebak(char *job, char *side, int *n, int *ilo, int *ihi, s *scale, int *m, s *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_sgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgebal "BLAS_FUNC(sgebal)"(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) nogil
+cdef void sgebal(char *job, int *n, s *a, int *lda, int *ilo, int *ihi, s *scale, int *info) noexcept nogil:
+    
+    _fortran_sgebal(job, n, a, lda, ilo, ihi, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgebd2 "BLAS_FUNC(sgebd2)"(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) nogil
+cdef void sgebd2(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgebrd "BLAS_FUNC(sgebrd)"(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) nogil
+cdef void sgebrd(int *m, int *n, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgecon "BLAS_FUNC(sgecon)"(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void sgecon(char *norm, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgecon(norm, n, a, lda, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeequ "BLAS_FUNC(sgeequ)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void sgeequ(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_sgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeequb "BLAS_FUNC(sgeequb)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) nogil
+cdef void sgeequb(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, int *info) noexcept nogil:
+    
+    _fortran_sgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgees "BLAS_FUNC(sgees)"(char *jobvs, char *sort, _sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) nogil
+cdef void sgees(char *jobvs, char *sort, sselect2 *select, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *work, int *lwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_sgees(jobvs, sort, <_sselect2*>select, n, a, lda, sdim, wr, wi, vs, ldvs, work, lwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeesx "BLAS_FUNC(sgeesx)"(char *jobvs, char *sort, _sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void sgeesx(char *jobvs, char *sort, sselect2 *select, char *sense, int *n, s *a, int *lda, int *sdim, s *wr, s *wi, s *vs, int *ldvs, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_sgeesx(jobvs, sort, <_sselect2*>select, sense, n, a, lda, sdim, wr, wi, vs, ldvs, rconde, rcondv, work, lwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeev "BLAS_FUNC(sgeev)"(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) nogil
+cdef void sgeev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeevx "BLAS_FUNC(sgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void sgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *scale, s *abnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgeevx(balanc, jobvl, jobvr, sense, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgehd2 "BLAS_FUNC(sgehd2)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgehd2(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgehd2(n, ilo, ihi, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgehrd "BLAS_FUNC(sgehrd)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgehrd(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgejsv "BLAS_FUNC(sgejsv)"(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void sgejsv(char *joba, char *jobu, char *jobv, char *jobr, char *jobt, char *jobp, int *m, int *n, s *a, int *lda, s *sva, s *u, int *ldu, s *v, int *ldv, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgejsv(joba, jobu, jobv, jobr, jobt, jobp, m, n, a, lda, sva, u, ldu, v, ldv, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgelq2 "BLAS_FUNC(sgelq2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgelq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgelq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgelqf "BLAS_FUNC(sgelqf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgelqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgelqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgels "BLAS_FUNC(sgels)"(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) nogil
+cdef void sgels(char *trans, int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgelsd "BLAS_FUNC(sgelsd)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void sgelsd(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgelss "BLAS_FUNC(sgelss)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) nogil
+cdef void sgelss(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *s, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgelsy "BLAS_FUNC(sgelsy)"(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) nogil
+cdef void sgelsy(int *m, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *jpvt, s *rcond, int *rank, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgemqrt "BLAS_FUNC(sgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) nogil
+cdef void sgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeql2 "BLAS_FUNC(sgeql2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgeql2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgeql2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqlf "BLAS_FUNC(sgeqlf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgeqlf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgeqlf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqp3 "BLAS_FUNC(sgeqp3)"(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgeqp3(int *m, int *n, s *a, int *lda, int *jpvt, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqr2 "BLAS_FUNC(sgeqr2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgeqr2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgeqr2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqr2p "BLAS_FUNC(sgeqr2p)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgeqr2p(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgeqr2p(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqrf "BLAS_FUNC(sgeqrf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgeqrf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgeqrf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqrfp "BLAS_FUNC(sgeqrfp)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgeqrfp(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgeqrfp(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqrt "BLAS_FUNC(sgeqrt)"(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) nogil
+cdef void sgeqrt(int *m, int *n, int *nb, s *a, int *lda, s *t, int *ldt, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgeqrt(m, n, nb, a, lda, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqrt2 "BLAS_FUNC(sgeqrt2)"(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) nogil
+cdef void sgeqrt2(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_sgeqrt2(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgeqrt3 "BLAS_FUNC(sgeqrt3)"(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) nogil
+cdef void sgeqrt3(int *m, int *n, s *a, int *lda, s *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_sgeqrt3(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgerfs "BLAS_FUNC(sgerfs)"(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgerfs(char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgerq2 "BLAS_FUNC(sgerq2)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sgerq2(int *m, int *n, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sgerq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgerqf "BLAS_FUNC(sgerqf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sgerqf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgerqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesc2 "BLAS_FUNC(sgesc2)"(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) nogil
+cdef void sgesc2(int *n, s *a, int *lda, s *rhs, int *ipiv, int *jpiv, s *scale) noexcept nogil:
+    
+    _fortran_sgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesdd "BLAS_FUNC(sgesdd)"(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void sgesdd(char *jobz, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesv "BLAS_FUNC(sgesv)"(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sgesv(int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesvd "BLAS_FUNC(sgesvd)"(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) nogil
+cdef void sgesvd(char *jobu, char *jobvt, int *m, int *n, s *a, int *lda, s *s, s *u, int *ldu, s *vt, int *ldvt, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesvj "BLAS_FUNC(sgesvj)"(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) nogil
+cdef void sgesvj(char *joba, char *jobu, char *jobv, int *m, int *n, s *a, int *lda, s *sva, int *mv, s *v, int *ldv, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgesvj(joba, jobu, jobv, m, n, a, lda, sva, mv, v, ldv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgesvx "BLAS_FUNC(sgesvx)"(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgesvx(char *fact, char *trans, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, char *equed, s *r, s *c, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgetc2 "BLAS_FUNC(sgetc2)"(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) nogil
+cdef void sgetc2(int *n, s *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil:
+    
+    _fortran_sgetc2(n, a, lda, ipiv, jpiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgetf2 "BLAS_FUNC(sgetf2)"(int *m, int *n, s *a, int *lda, int *ipiv, int *info) nogil
+cdef void sgetf2(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_sgetf2(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgetrf "BLAS_FUNC(sgetrf)"(int *m, int *n, s *a, int *lda, int *ipiv, int *info) nogil
+cdef void sgetrf(int *m, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_sgetrf(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgetri "BLAS_FUNC(sgetri)"(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil
+cdef void sgetri(int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgetri(n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgetrs "BLAS_FUNC(sgetrs)"(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sgetrs(char *trans, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggbak "BLAS_FUNC(sggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) nogil
+cdef void sggbak(char *job, char *side, int *n, int *ilo, int *ihi, s *lscale, s *rscale, int *m, s *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_sggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggbal "BLAS_FUNC(sggbal)"(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) nogil
+cdef void sggbal(char *job, int *n, s *a, int *lda, s *b, int *ldb, int *ilo, int *ihi, s *lscale, s *rscale, s *work, int *info) noexcept nogil:
+    
+    _fortran_sggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgges "BLAS_FUNC(sgges)"(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) nogil
+cdef void sgges(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *work, int *lwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_sgges(jobvsl, jobvsr, sort, <_sselect3*>selctg, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggesx "BLAS_FUNC(sggesx)"(char *jobvsl, char *jobvsr, char *sort, _sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void sggesx(char *jobvsl, char *jobvsr, char *sort, sselect3 *selctg, char *sense, int *n, s *a, int *lda, s *b, int *ldb, int *sdim, s *alphar, s *alphai, s *beta, s *vsl, int *ldvsl, s *vsr, int *ldvsr, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_sggesx(jobvsl, jobvsr, sort, <_sselect3*>selctg, sense, n, a, lda, b, ldb, sdim, alphar, alphai, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggev "BLAS_FUNC(sggev)"(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) nogil
+cdef void sggev(char *jobvl, char *jobvr, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sggev(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggevx "BLAS_FUNC(sggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) nogil
+cdef void sggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *vl, int *ldvl, s *vr, int *ldvr, int *ilo, int *ihi, s *lscale, s *rscale, s *abnrm, s *bbnrm, s *rconde, s *rcondv, s *work, int *lwork, int *iwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_sggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggglm "BLAS_FUNC(sggglm)"(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) nogil
+cdef void sggglm(int *n, int *m, int *p, s *a, int *lda, s *b, int *ldb, s *d, s *x, s *y, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgghrd "BLAS_FUNC(sgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) nogil
+cdef void sgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_sgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgglse "BLAS_FUNC(sgglse)"(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) nogil
+cdef void sgglse(int *m, int *n, int *p, s *a, int *lda, s *b, int *ldb, s *c, s *d, s *x, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggqrf "BLAS_FUNC(sggqrf)"(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) nogil
+cdef void sggqrf(int *n, int *m, int *p, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sggrqf "BLAS_FUNC(sggrqf)"(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) nogil
+cdef void sggrqf(int *m, int *p, int *n, s *a, int *lda, s *taua, s *b, int *ldb, s *taub, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgsvj0 "BLAS_FUNC(sgsvj0)"(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) nogil
+cdef void sgsvj0(char *jobv, int *m, int *n, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgsvj0(jobv, m, n, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgsvj1 "BLAS_FUNC(sgsvj1)"(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) nogil
+cdef void sgsvj1(char *jobv, int *m, int *n, int *n1, s *a, int *lda, s *d, s *sva, int *mv, s *v, int *ldv, s *eps, s *sfmin, s *tol, int *nsweep, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sgsvj1(jobv, m, n, n1, a, lda, d, sva, mv, v, ldv, eps, sfmin, tol, nsweep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgtcon "BLAS_FUNC(sgtcon)"(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void sgtcon(char *norm, int *n, s *dl, s *d, s *du, s *du2, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgtrfs "BLAS_FUNC(sgtrfs)"(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgtrfs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgtsv "BLAS_FUNC(sgtsv)"(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) nogil
+cdef void sgtsv(int *n, int *nrhs, s *dl, s *d, s *du, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgtsv(n, nrhs, dl, d, du, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgtsvx "BLAS_FUNC(sgtsvx)"(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sgtsvx(char *fact, char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *dlf, s *df, s *duf, s *du2, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgttrf "BLAS_FUNC(sgttrf)"(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) nogil
+cdef void sgttrf(int *n, s *dl, s *d, s *du, s *du2, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_sgttrf(n, dl, d, du, du2, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgttrs "BLAS_FUNC(sgttrs)"(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sgttrs(char *trans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sgtts2 "BLAS_FUNC(sgtts2)"(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) nogil
+cdef void sgtts2(int *itrans, int *n, int *nrhs, s *dl, s *d, s *du, s *du2, int *ipiv, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_sgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_shgeqz "BLAS_FUNC(shgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) nogil
+cdef void shgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *t, int *ldt, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_shgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_shsein "BLAS_FUNC(shsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) nogil
+cdef void shsein(char *side, char *eigsrc, char *initv, bint *select, int *n, s *h, int *ldh, s *wr, s *wi, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *ifaill, int *ifailr, int *info) noexcept nogil:
+    
+    _fortran_shsein(side, eigsrc, initv, select, n, h, ldh, wr, wi, vl, ldvl, vr, ldvr, mm, m, work, ifaill, ifailr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_shseqr "BLAS_FUNC(shseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) nogil
+cdef void shseqr(char *job, char *compz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_shseqr(job, compz, n, ilo, ihi, h, ldh, wr, wi, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slabad "BLAS_FUNC(slabad)"(s *small, s *large) nogil
+cdef void slabad(s *small, s *large) noexcept nogil:
+    
+    _fortran_slabad(small, large)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slabrd "BLAS_FUNC(slabrd)"(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) nogil
+cdef void slabrd(int *m, int *n, int *nb, s *a, int *lda, s *d, s *e, s *tauq, s *taup, s *x, int *ldx, s *y, int *ldy) noexcept nogil:
+    
+    _fortran_slabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slacn2 "BLAS_FUNC(slacn2)"(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) nogil
+cdef void slacn2(int *n, s *v, s *x, int *isgn, s *est, int *kase, int *isave) noexcept nogil:
+    
+    _fortran_slacn2(n, v, x, isgn, est, kase, isave)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slacon "BLAS_FUNC(slacon)"(int *n, s *v, s *x, int *isgn, s *est, int *kase) nogil
+cdef void slacon(int *n, s *v, s *x, int *isgn, s *est, int *kase) noexcept nogil:
+    
+    _fortran_slacon(n, v, x, isgn, est, kase)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slacpy "BLAS_FUNC(slacpy)"(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) nogil
+cdef void slacpy(char *uplo, int *m, int *n, s *a, int *lda, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_slacpy(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sladiv "BLAS_FUNC(sladiv)"(s *a, s *b, s *c, s *d, s *p, s *q) nogil
+cdef void sladiv(s *a, s *b, s *c, s *d, s *p, s *q) noexcept nogil:
+    
+    _fortran_sladiv(a, b, c, d, p, q)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slae2 "BLAS_FUNC(slae2)"(s *a, s *b, s *c, s *rt1, s *rt2) nogil
+cdef void slae2(s *a, s *b, s *c, s *rt1, s *rt2) noexcept nogil:
+    
+    _fortran_slae2(a, b, c, rt1, rt2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaebz "BLAS_FUNC(slaebz)"(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) nogil
+cdef void slaebz(int *ijob, int *nitmax, int *n, int *mmax, int *minp, int *nbmin, s *abstol, s *reltol, s *pivmin, s *d, s *e, s *e2, int *nval, s *ab, s *c, int *mout, int *nab, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slaebz(ijob, nitmax, n, mmax, minp, nbmin, abstol, reltol, pivmin, d, e, e2, nval, ab, c, mout, nab, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed0 "BLAS_FUNC(slaed0)"(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) nogil
+cdef void slaed0(int *icompq, int *qsiz, int *n, s *d, s *e, s *q, int *ldq, s *qstore, int *ldqs, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slaed0(icompq, qsiz, n, d, e, q, ldq, qstore, ldqs, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed1 "BLAS_FUNC(slaed1)"(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) nogil
+cdef void slaed1(int *n, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slaed1(n, d, q, ldq, indxq, rho, cutpnt, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed2 "BLAS_FUNC(slaed2)"(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) nogil
+cdef void slaed2(int *k, int *n, int *n1, s *d, s *q, int *ldq, int *indxq, s *rho, s *z, s *dlamda, s *w, s *q2, int *indx, int *indxc, int *indxp, int *coltyp, int *info) noexcept nogil:
+    
+    _fortran_slaed2(k, n, n1, d, q, ldq, indxq, rho, z, dlamda, w, q2, indx, indxc, indxp, coltyp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed3 "BLAS_FUNC(slaed3)"(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) nogil
+cdef void slaed3(int *k, int *n, int *n1, s *d, s *q, int *ldq, s *rho, s *dlamda, s *q2, int *indx, int *ctot, s *w, s *s, int *info) noexcept nogil:
+    
+    _fortran_slaed3(k, n, n1, d, q, ldq, rho, dlamda, q2, indx, ctot, w, s, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed4 "BLAS_FUNC(slaed4)"(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) nogil
+cdef void slaed4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *dlam, int *info) noexcept nogil:
+    
+    _fortran_slaed4(n, i, d, z, delta, rho, dlam, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed5 "BLAS_FUNC(slaed5)"(int *i, s *d, s *z, s *delta, s *rho, s *dlam) nogil
+cdef void slaed5(int *i, s *d, s *z, s *delta, s *rho, s *dlam) noexcept nogil:
+    
+    _fortran_slaed5(i, d, z, delta, rho, dlam)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed6 "BLAS_FUNC(slaed6)"(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) nogil
+cdef void slaed6(int *kniter, bint *orgati, s *rho, s *d, s *z, s *finit, s *tau, int *info) noexcept nogil:
+    
+    _fortran_slaed6(kniter, orgati, rho, d, z, finit, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed7 "BLAS_FUNC(slaed7)"(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) nogil
+cdef void slaed7(int *icompq, int *n, int *qsiz, int *tlvls, int *curlvl, int *curpbm, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slaed7(icompq, n, qsiz, tlvls, curlvl, curpbm, d, q, ldq, indxq, rho, cutpnt, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed8 "BLAS_FUNC(slaed8)"(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) nogil
+cdef void slaed8(int *icompq, int *k, int *n, int *qsiz, s *d, s *q, int *ldq, int *indxq, s *rho, int *cutpnt, s *z, s *dlamda, s *q2, int *ldq2, s *w, int *perm, int *givptr, int *givcol, s *givnum, int *indxp, int *indx, int *info) noexcept nogil:
+    
+    _fortran_slaed8(icompq, k, n, qsiz, d, q, ldq, indxq, rho, cutpnt, z, dlamda, q2, ldq2, w, perm, givptr, givcol, givnum, indxp, indx, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaed9 "BLAS_FUNC(slaed9)"(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) nogil
+cdef void slaed9(int *k, int *kstart, int *kstop, int *n, s *d, s *q, int *ldq, s *rho, s *dlamda, s *w, s *s, int *lds, int *info) noexcept nogil:
+    
+    _fortran_slaed9(k, kstart, kstop, n, d, q, ldq, rho, dlamda, w, s, lds, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaeda "BLAS_FUNC(slaeda)"(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) nogil
+cdef void slaeda(int *n, int *tlvls, int *curlvl, int *curpbm, int *prmptr, int *perm, int *givptr, int *givcol, s *givnum, s *q, int *qptr, s *z, s *ztemp, int *info) noexcept nogil:
+    
+    _fortran_slaeda(n, tlvls, curlvl, curpbm, prmptr, perm, givptr, givcol, givnum, q, qptr, z, ztemp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaein "BLAS_FUNC(slaein)"(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) nogil
+cdef void slaein(bint *rightv, bint *noinit, int *n, s *h, int *ldh, s *wr, s *wi, s *vr, s *vi, s *b, int *ldb, s *work, s *eps3, s *smlnum, s *bignum, int *info) noexcept nogil:
+    
+    _fortran_slaein(rightv, noinit, n, h, ldh, wr, wi, vr, vi, b, ldb, work, eps3, smlnum, bignum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaev2 "BLAS_FUNC(slaev2)"(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) nogil
+cdef void slaev2(s *a, s *b, s *c, s *rt1, s *rt2, s *cs1, s *sn1) noexcept nogil:
+    
+    _fortran_slaev2(a, b, c, rt1, rt2, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaexc "BLAS_FUNC(slaexc)"(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) nogil
+cdef void slaexc(bint *wantq, int *n, s *t, int *ldt, s *q, int *ldq, int *j1, int *n1, int *n2, s *work, int *info) noexcept nogil:
+    
+    _fortran_slaexc(wantq, n, t, ldt, q, ldq, j1, n1, n2, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slag2 "BLAS_FUNC(slag2)"(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) nogil
+cdef void slag2(s *a, int *lda, s *b, int *ldb, s *safmin, s *scale1, s *scale2, s *wr1, s *wr2, s *wi) noexcept nogil:
+    
+    _fortran_slag2(a, lda, b, ldb, safmin, scale1, scale2, wr1, wr2, wi)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slag2d "BLAS_FUNC(slag2d)"(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) nogil
+cdef void slag2d(int *m, int *n, s *sa, int *ldsa, d *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_slag2d(m, n, sa, ldsa, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slags2 "BLAS_FUNC(slags2)"(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) nogil
+cdef void slags2(bint *upper, s *a1, s *a2, s *a3, s *b1, s *b2, s *b3, s *csu, s *snu, s *csv, s *snv, s *csq, s *snq) noexcept nogil:
+    
+    _fortran_slags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slagtf "BLAS_FUNC(slagtf)"(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) nogil
+cdef void slagtf(int *n, s *a, s *lambda_, s *b, s *c, s *tol, s *d, int *in_, int *info) noexcept nogil:
+    
+    _fortran_slagtf(n, a, lambda_, b, c, tol, d, in_, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slagtm "BLAS_FUNC(slagtm)"(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) nogil
+cdef void slagtm(char *trans, int *n, int *nrhs, s *alpha, s *dl, s *d, s *du, s *x, int *ldx, s *beta, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_slagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slagts "BLAS_FUNC(slagts)"(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) nogil
+cdef void slagts(int *job, int *n, s *a, s *b, s *c, s *d, int *in_, s *y, s *tol, int *info) noexcept nogil:
+    
+    _fortran_slagts(job, n, a, b, c, d, in_, y, tol, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slagv2 "BLAS_FUNC(slagv2)"(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) nogil
+cdef void slagv2(s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *csl, s *snl, s *csr, s *snr) noexcept nogil:
+    
+    _fortran_slagv2(a, lda, b, ldb, alphar, alphai, beta, csl, snl, csr, snr)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slahqr "BLAS_FUNC(slahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) nogil
+cdef void slahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_slahqr(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slahr2 "BLAS_FUNC(slahr2)"(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) nogil
+cdef void slahr2(int *n, int *k, int *nb, s *a, int *lda, s *tau, s *t, int *ldt, s *y, int *ldy) noexcept nogil:
+    
+    _fortran_slahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaic1 "BLAS_FUNC(slaic1)"(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) nogil
+cdef void slaic1(int *job, int *j, s *x, s *sest, s *w, s *gamma, s *sestpr, s *s, s *c) noexcept nogil:
+    
+    _fortran_slaic1(job, j, x, sest, w, gamma, sestpr, s, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaln2 "BLAS_FUNC(slaln2)"(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) nogil
+cdef void slaln2(bint *ltrans, int *na, int *nw, s *smin, s *ca, s *a, int *lda, s *d1, s *d2, s *b, int *ldb, s *wr, s *wi, s *x, int *ldx, s *scale, s *xnorm, int *info) noexcept nogil:
+    
+    _fortran_slaln2(ltrans, na, nw, smin, ca, a, lda, d1, d2, b, ldb, wr, wi, x, ldx, scale, xnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slals0 "BLAS_FUNC(slals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) nogil
+cdef void slals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *info) noexcept nogil:
+    
+    _fortran_slals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slalsa "BLAS_FUNC(slalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) nogil
+cdef void slalsa(int *icompq, int *smlsiz, int *n, int *nrhs, s *b, int *ldb, s *bx, int *ldbx, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slalsd "BLAS_FUNC(slalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) nogil
+cdef void slalsd(char *uplo, int *smlsiz, int *n, int *nrhs, s *d, s *e, s *b, int *ldb, s *rcond, int *rank, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slamch "BLAS_FUNC(slamch)"(char *cmach) nogil
+cdef s slamch(char *cmach) noexcept nogil:
+    
+    return _fortran_slamch(cmach)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slamrg "BLAS_FUNC(slamrg)"(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) nogil
+cdef void slamrg(int *n1, int *n2, s *a, int *strd1, int *strd2, int *index_bn) noexcept nogil:
+    
+    _fortran_slamrg(n1, n2, a, strd1, strd2, index_bn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slangb "BLAS_FUNC(slangb)"(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) nogil
+cdef s slangb(char *norm, int *n, int *kl, int *ku, s *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_slangb(norm, n, kl, ku, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slange "BLAS_FUNC(slange)"(char *norm, int *m, int *n, s *a, int *lda, s *work) nogil
+cdef s slange(char *norm, int *m, int *n, s *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_slange(norm, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slangt "BLAS_FUNC(slangt)"(char *norm, int *n, s *dl, s *d, s *du) nogil
+cdef s slangt(char *norm, int *n, s *dl, s *d, s *du) noexcept nogil:
+    
+    return _fortran_slangt(norm, n, dl, d, du)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slanhs "BLAS_FUNC(slanhs)"(char *norm, int *n, s *a, int *lda, s *work) nogil
+cdef s slanhs(char *norm, int *n, s *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_slanhs(norm, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slansb "BLAS_FUNC(slansb)"(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) nogil
+cdef s slansb(char *norm, char *uplo, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_slansb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slansf "BLAS_FUNC(slansf)"(char *norm, char *transr, char *uplo, int *n, s *a, s *work) nogil
+cdef s slansf(char *norm, char *transr, char *uplo, int *n, s *a, s *work) noexcept nogil:
+    
+    return _fortran_slansf(norm, transr, uplo, n, a, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slansp "BLAS_FUNC(slansp)"(char *norm, char *uplo, int *n, s *ap, s *work) nogil
+cdef s slansp(char *norm, char *uplo, int *n, s *ap, s *work) noexcept nogil:
+    
+    return _fortran_slansp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slanst "BLAS_FUNC(slanst)"(char *norm, int *n, s *d, s *e) nogil
+cdef s slanst(char *norm, int *n, s *d, s *e) noexcept nogil:
+    
+    return _fortran_slanst(norm, n, d, e)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slansy "BLAS_FUNC(slansy)"(char *norm, char *uplo, int *n, s *a, int *lda, s *work) nogil
+cdef s slansy(char *norm, char *uplo, int *n, s *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_slansy(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slantb "BLAS_FUNC(slantb)"(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) nogil
+cdef s slantb(char *norm, char *uplo, char *diag, int *n, int *k, s *ab, int *ldab, s *work) noexcept nogil:
+    
+    return _fortran_slantb(norm, uplo, diag, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slantp "BLAS_FUNC(slantp)"(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) nogil
+cdef s slantp(char *norm, char *uplo, char *diag, int *n, s *ap, s *work) noexcept nogil:
+    
+    return _fortran_slantp(norm, uplo, diag, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slantr "BLAS_FUNC(slantr)"(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) nogil
+cdef s slantr(char *norm, char *uplo, char *diag, int *m, int *n, s *a, int *lda, s *work) noexcept nogil:
+    
+    return _fortran_slantr(norm, uplo, diag, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slanv2 "BLAS_FUNC(slanv2)"(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) nogil
+cdef void slanv2(s *a, s *b, s *c, s *d, s *rt1r, s *rt1i, s *rt2r, s *rt2i, s *cs, s *sn) noexcept nogil:
+    
+    _fortran_slanv2(a, b, c, d, rt1r, rt1i, rt2r, rt2i, cs, sn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slapll "BLAS_FUNC(slapll)"(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) nogil
+cdef void slapll(int *n, s *x, int *incx, s *y, int *incy, s *ssmin) noexcept nogil:
+    
+    _fortran_slapll(n, x, incx, y, incy, ssmin)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slapmr "BLAS_FUNC(slapmr)"(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) nogil
+cdef void slapmr(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_slapmr(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slapmt "BLAS_FUNC(slapmt)"(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) nogil
+cdef void slapmt(bint *forwrd, int *m, int *n, s *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_slapmt(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slapy2 "BLAS_FUNC(slapy2)"(s *x, s *y) nogil
+cdef s slapy2(s *x, s *y) noexcept nogil:
+    
+    return _fortran_slapy2(x, y)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    s _fortran_slapy3 "BLAS_FUNC(slapy3)"(s *x, s *y, s *z) nogil
+cdef s slapy3(s *x, s *y, s *z) noexcept nogil:
+    
+    return _fortran_slapy3(x, y, z)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqgb "BLAS_FUNC(slaqgb)"(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil
+cdef void slaqgb(int *m, int *n, int *kl, int *ku, s *ab, int *ldab, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_slaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqge "BLAS_FUNC(slaqge)"(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) nogil
+cdef void slaqge(int *m, int *n, s *a, int *lda, s *r, s *c, s *rowcnd, s *colcnd, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_slaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqp2 "BLAS_FUNC(slaqp2)"(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) nogil
+cdef void slaqp2(int *m, int *n, int *offset, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *work) noexcept nogil:
+    
+    _fortran_slaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqps "BLAS_FUNC(slaqps)"(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) nogil
+cdef void slaqps(int *m, int *n, int *offset, int *nb, int *kb, s *a, int *lda, int *jpvt, s *tau, s *vn1, s *vn2, s *auxv, s *f, int *ldf) noexcept nogil:
+    
+    _fortran_slaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr0 "BLAS_FUNC(slaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) nogil
+cdef void slaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_slaqr0(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr1 "BLAS_FUNC(slaqr1)"(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) nogil
+cdef void slaqr1(int *n, s *h, int *ldh, s *sr1, s *si1, s *sr2, s *si2, s *v) noexcept nogil:
+    
+    _fortran_slaqr1(n, h, ldh, sr1, si1, sr2, si2, v)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr2 "BLAS_FUNC(slaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) nogil
+cdef void slaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil:
+    
+    _fortran_slaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr3 "BLAS_FUNC(slaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) nogil
+cdef void slaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, int *ns, int *nd, s *sr, s *si, s *v, int *ldv, int *nh, s *t, int *ldt, int *nv, s *wv, int *ldwv, s *work, int *lwork) noexcept nogil:
+    
+    _fortran_slaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sr, si, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr4 "BLAS_FUNC(slaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) nogil
+cdef void slaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, s *h, int *ldh, s *wr, s *wi, int *iloz, int *ihiz, s *z, int *ldz, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_slaqr4(wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqr5 "BLAS_FUNC(slaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) nogil
+cdef void slaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, s *sr, s *si, s *h, int *ldh, int *iloz, int *ihiz, s *z, int *ldz, s *v, int *ldv, s *u, int *ldu, int *nv, s *wv, int *ldwv, int *nh, s *wh, int *ldwh) noexcept nogil:
+    
+    _fortran_slaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, sr, si, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqsb "BLAS_FUNC(slaqsb)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) nogil
+cdef void slaqsb(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_slaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqsp "BLAS_FUNC(slaqsp)"(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) nogil
+cdef void slaqsp(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_slaqsp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqsy "BLAS_FUNC(slaqsy)"(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) nogil
+cdef void slaqsy(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, char *equed) noexcept nogil:
+    
+    _fortran_slaqsy(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaqtr "BLAS_FUNC(slaqtr)"(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) nogil
+cdef void slaqtr(bint *ltran, bint *lreal, int *n, s *t, int *ldt, s *b, s *w, s *scale, s *x, s *work, int *info) noexcept nogil:
+    
+    _fortran_slaqtr(ltran, lreal, n, t, ldt, b, w, scale, x, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slar1v "BLAS_FUNC(slar1v)"(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) nogil
+cdef void slar1v(int *n, int *b1, int *bn, s *lambda_, s *d, s *l, s *ld, s *lld, s *pivmin, s *gaptol, s *z, bint *wantnc, int *negcnt, s *ztz, s *mingma, int *r, int *isuppz, s *nrminv, s *resid, s *rqcorr, s *work) noexcept nogil:
+    
+    _fortran_slar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slar2v "BLAS_FUNC(slar2v)"(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) nogil
+cdef void slar2v(int *n, s *x, s *y, s *z, int *incx, s *c, s *s, int *incc) noexcept nogil:
+    
+    _fortran_slar2v(n, x, y, z, incx, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarf "BLAS_FUNC(slarf)"(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) nogil
+cdef void slarf(char *side, int *m, int *n, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil:
+    
+    _fortran_slarf(side, m, n, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarfb "BLAS_FUNC(slarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) nogil
+cdef void slarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil:
+    
+    _fortran_slarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarfg "BLAS_FUNC(slarfg)"(int *n, s *alpha, s *x, int *incx, s *tau) nogil
+cdef void slarfg(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil:
+    
+    _fortran_slarfg(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarfgp "BLAS_FUNC(slarfgp)"(int *n, s *alpha, s *x, int *incx, s *tau) nogil
+cdef void slarfgp(int *n, s *alpha, s *x, int *incx, s *tau) noexcept nogil:
+    
+    _fortran_slarfgp(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarft "BLAS_FUNC(slarft)"(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) nogil
+cdef void slarft(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil:
+    
+    _fortran_slarft(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarfx "BLAS_FUNC(slarfx)"(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) nogil
+cdef void slarfx(char *side, int *m, int *n, s *v, s *tau, s *c, int *ldc, s *work) noexcept nogil:
+    
+    _fortran_slarfx(side, m, n, v, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slargv "BLAS_FUNC(slargv)"(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) nogil
+cdef void slargv(int *n, s *x, int *incx, s *y, int *incy, s *c, int *incc) noexcept nogil:
+    
+    _fortran_slargv(n, x, incx, y, incy, c, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarnv "BLAS_FUNC(slarnv)"(int *idist, int *iseed, int *n, s *x) nogil
+cdef void slarnv(int *idist, int *iseed, int *n, s *x) noexcept nogil:
+    
+    _fortran_slarnv(idist, iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarra "BLAS_FUNC(slarra)"(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) nogil
+cdef void slarra(int *n, s *d, s *e, s *e2, s *spltol, s *tnrm, int *nsplit, int *isplit, int *info) noexcept nogil:
+    
+    _fortran_slarra(n, d, e, e2, spltol, tnrm, nsplit, isplit, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrb "BLAS_FUNC(slarrb)"(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) nogil
+cdef void slarrb(int *n, s *d, s *lld, int *ifirst, int *ilast, s *rtol1, s *rtol2, int *offset, s *w, s *wgap, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *twist, int *info) noexcept nogil:
+    
+    _fortran_slarrb(n, d, lld, ifirst, ilast, rtol1, rtol2, offset, w, wgap, werr, work, iwork, pivmin, spdiam, twist, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrc "BLAS_FUNC(slarrc)"(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) nogil
+cdef void slarrc(char *jobt, int *n, s *vl, s *vu, s *d, s *e, s *pivmin, int *eigcnt, int *lcnt, int *rcnt, int *info) noexcept nogil:
+    
+    _fortran_slarrc(jobt, n, vl, vu, d, e, pivmin, eigcnt, lcnt, rcnt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrd "BLAS_FUNC(slarrd)"(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) nogil
+cdef void slarrd(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *gers, s *reltol, s *d, s *e, s *e2, s *pivmin, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wl, s *wu, int *iblock, int *indexw, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slarrd(range, order, n, vl, vu, il, iu, gers, reltol, d, e, e2, pivmin, nsplit, isplit, m, w, werr, wl, wu, iblock, indexw, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarre "BLAS_FUNC(slarre)"(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) nogil
+cdef void slarre(char *range, int *n, s *vl, s *vu, int *il, int *iu, s *d, s *e, s *e2, s *rtol1, s *rtol2, s *spltol, int *nsplit, int *isplit, int *m, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *pivmin, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slarre(range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrf "BLAS_FUNC(slarrf)"(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) nogil
+cdef void slarrf(int *n, s *d, s *l, s *ld, int *clstrt, int *clend, s *w, s *wgap, s *werr, s *spdiam, s *clgapl, s *clgapr, s *pivmin, s *sigma, s *dplus, s *lplus, s *work, int *info) noexcept nogil:
+    
+    _fortran_slarrf(n, d, l, ld, clstrt, clend, w, wgap, werr, spdiam, clgapl, clgapr, pivmin, sigma, dplus, lplus, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrj "BLAS_FUNC(slarrj)"(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) nogil
+cdef void slarrj(int *n, s *d, s *e2, int *ifirst, int *ilast, s *rtol, int *offset, s *w, s *werr, s *work, int *iwork, s *pivmin, s *spdiam, int *info) noexcept nogil:
+    
+    _fortran_slarrj(n, d, e2, ifirst, ilast, rtol, offset, w, werr, work, iwork, pivmin, spdiam, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrk "BLAS_FUNC(slarrk)"(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) nogil
+cdef void slarrk(int *n, int *iw, s *gl, s *gu, s *d, s *e2, s *pivmin, s *reltol, s *w, s *werr, int *info) noexcept nogil:
+    
+    _fortran_slarrk(n, iw, gl, gu, d, e2, pivmin, reltol, w, werr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrr "BLAS_FUNC(slarrr)"(int *n, s *d, s *e, int *info) nogil
+cdef void slarrr(int *n, s *d, s *e, int *info) noexcept nogil:
+    
+    _fortran_slarrr(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarrv "BLAS_FUNC(slarrv)"(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) nogil
+cdef void slarrv(int *n, s *vl, s *vu, s *d, s *l, s *pivmin, int *isplit, int *m, int *dol, int *dou, s *minrgp, s *rtol1, s *rtol2, s *w, s *werr, s *wgap, int *iblock, int *indexw, s *gers, s *z, int *ldz, int *isuppz, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slartg "BLAS_FUNC(slartg)"(s *f, s *g, s *cs, s *sn, s *r) nogil
+cdef void slartg(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil:
+    
+    _fortran_slartg(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slartgp "BLAS_FUNC(slartgp)"(s *f, s *g, s *cs, s *sn, s *r) nogil
+cdef void slartgp(s *f, s *g, s *cs, s *sn, s *r) noexcept nogil:
+    
+    _fortran_slartgp(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slartgs "BLAS_FUNC(slartgs)"(s *x, s *y, s *sigma, s *cs, s *sn) nogil
+cdef void slartgs(s *x, s *y, s *sigma, s *cs, s *sn) noexcept nogil:
+    
+    _fortran_slartgs(x, y, sigma, cs, sn)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slartv "BLAS_FUNC(slartv)"(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) nogil
+cdef void slartv(int *n, s *x, int *incx, s *y, int *incy, s *c, s *s, int *incc) noexcept nogil:
+    
+    _fortran_slartv(n, x, incx, y, incy, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaruv "BLAS_FUNC(slaruv)"(int *iseed, int *n, s *x) nogil
+cdef void slaruv(int *iseed, int *n, s *x) noexcept nogil:
+    
+    _fortran_slaruv(iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarz "BLAS_FUNC(slarz)"(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) nogil
+cdef void slarz(char *side, int *m, int *n, int *l, s *v, int *incv, s *tau, s *c, int *ldc, s *work) noexcept nogil:
+    
+    _fortran_slarz(side, m, n, l, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarzb "BLAS_FUNC(slarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) nogil
+cdef void slarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *c, int *ldc, s *work, int *ldwork) noexcept nogil:
+    
+    _fortran_slarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slarzt "BLAS_FUNC(slarzt)"(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) nogil
+cdef void slarzt(char *direct, char *storev, int *n, int *k, s *v, int *ldv, s *tau, s *t, int *ldt) noexcept nogil:
+    
+    _fortran_slarzt(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slas2 "BLAS_FUNC(slas2)"(s *f, s *g, s *h, s *ssmin, s *ssmax) nogil
+cdef void slas2(s *f, s *g, s *h, s *ssmin, s *ssmax) noexcept nogil:
+    
+    _fortran_slas2(f, g, h, ssmin, ssmax)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slascl "BLAS_FUNC(slascl)"(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) nogil
+cdef void slascl(char *type_bn, int *kl, int *ku, s *cfrom, s *cto, int *m, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_slascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd0 "BLAS_FUNC(slasd0)"(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) nogil
+cdef void slasd0(int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *ldvt, int *smlsiz, int *iwork, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasd0(n, sqre, d, e, u, ldu, vt, ldvt, smlsiz, iwork, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd1 "BLAS_FUNC(slasd1)"(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) nogil
+cdef void slasd1(int *nl, int *nr, int *sqre, s *d, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, int *idxq, int *iwork, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasd1(nl, nr, sqre, d, alpha, beta, u, ldu, vt, ldvt, idxq, iwork, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd2 "BLAS_FUNC(slasd2)"(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) nogil
+cdef void slasd2(int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *alpha, s *beta, s *u, int *ldu, s *vt, int *ldvt, s *dsigma, s *u2, int *ldu2, s *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int *idxq, int *coltyp, int *info) noexcept nogil:
+    
+    _fortran_slasd2(nl, nr, sqre, k, d, z, alpha, beta, u, ldu, vt, ldvt, dsigma, u2, ldu2, vt2, ldvt2, idxp, idx, idxc, idxq, coltyp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd3 "BLAS_FUNC(slasd3)"(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) nogil
+cdef void slasd3(int *nl, int *nr, int *sqre, int *k, s *d, s *q, int *ldq, s *dsigma, s *u, int *ldu, s *u2, int *ldu2, s *vt, int *ldvt, s *vt2, int *ldvt2, int *idxc, int *ctot, s *z, int *info) noexcept nogil:
+    
+    _fortran_slasd3(nl, nr, sqre, k, d, q, ldq, dsigma, u, ldu, u2, ldu2, vt, ldvt, vt2, ldvt2, idxc, ctot, z, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd4 "BLAS_FUNC(slasd4)"(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) nogil
+cdef void slasd4(int *n, int *i, s *d, s *z, s *delta, s *rho, s *sigma, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasd4(n, i, d, z, delta, rho, sigma, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd5 "BLAS_FUNC(slasd5)"(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) nogil
+cdef void slasd5(int *i, s *d, s *z, s *delta, s *rho, s *dsigma, s *work) noexcept nogil:
+    
+    _fortran_slasd5(i, d, z, delta, rho, dsigma, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd6 "BLAS_FUNC(slasd6)"(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) nogil
+cdef void slasd6(int *icompq, int *nl, int *nr, int *sqre, s *d, s *vf, s *vl, s *alpha, s *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *poles, s *difl, s *difr, s *z, int *k, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slasd6(icompq, nl, nr, sqre, d, vf, vl, alpha, beta, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd7 "BLAS_FUNC(slasd7)"(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) nogil
+cdef void slasd7(int *icompq, int *nl, int *nr, int *sqre, int *k, s *d, s *z, s *zw, s *vf, s *vfw, s *vl, s *vlw, s *alpha, s *beta, s *dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, s *givnum, int *ldgnum, s *c, s *s, int *info) noexcept nogil:
+    
+    _fortran_slasd7(icompq, nl, nr, sqre, k, d, z, zw, vf, vfw, vl, vlw, alpha, beta, dsigma, idx, idxp, idxq, perm, givptr, givcol, ldgcol, givnum, ldgnum, c, s, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasd8 "BLAS_FUNC(slasd8)"(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) nogil
+cdef void slasd8(int *icompq, int *k, s *d, s *z, s *vf, s *vl, s *difl, s *difr, int *lddifr, s *dsigma, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasd8(icompq, k, d, z, vf, vl, difl, difr, lddifr, dsigma, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasda "BLAS_FUNC(slasda)"(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) nogil
+cdef void slasda(int *icompq, int *smlsiz, int *n, int *sqre, s *d, s *e, s *u, int *ldu, s *vt, int *k, s *difl, s *difr, s *z, s *poles, int *givptr, int *givcol, int *ldgcol, int *perm, s *givnum, s *c, s *s, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_slasda(icompq, smlsiz, n, sqre, d, e, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasdq "BLAS_FUNC(slasdq)"(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) nogil
+cdef void slasdq(char *uplo, int *sqre, int *n, int *ncvt, int *nru, int *ncc, s *d, s *e, s *vt, int *ldvt, s *u, int *ldu, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasdq(uplo, sqre, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasdt "BLAS_FUNC(slasdt)"(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) nogil
+cdef void slasdt(int *n, int *lvl, int *nd, int *inode, int *ndiml, int *ndimr, int *msub) noexcept nogil:
+    
+    _fortran_slasdt(n, lvl, nd, inode, ndiml, ndimr, msub)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaset "BLAS_FUNC(slaset)"(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) nogil
+cdef void slaset(char *uplo, int *m, int *n, s *alpha, s *beta, s *a, int *lda) noexcept nogil:
+    
+    _fortran_slaset(uplo, m, n, alpha, beta, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasq1 "BLAS_FUNC(slasq1)"(int *n, s *d, s *e, s *work, int *info) nogil
+cdef void slasq1(int *n, s *d, s *e, s *work, int *info) noexcept nogil:
+    
+    _fortran_slasq1(n, d, e, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasq2 "BLAS_FUNC(slasq2)"(int *n, s *z, int *info) nogil
+cdef void slasq2(int *n, s *z, int *info) noexcept nogil:
+    
+    _fortran_slasq2(n, z, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasq3 "BLAS_FUNC(slasq3)"(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) nogil
+cdef void slasq3(int *i0, int *n0, s *z, int *pp, s *dmin, s *sigma, s *desig, s *qmax, int *nfail, int *iter, int *ndiv, bint *ieee, int *ttype, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *g, s *tau) noexcept nogil:
+    
+    _fortran_slasq3(i0, n0, z, pp, dmin, sigma, desig, qmax, nfail, iter, ndiv, ieee, ttype, dmin1, dmin2, dn, dn1, dn2, g, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasq4 "BLAS_FUNC(slasq4)"(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) nogil
+cdef void slasq4(int *i0, int *n0, s *z, int *pp, int *n0in, s *dmin, s *dmin1, s *dmin2, s *dn, s *dn1, s *dn2, s *tau, int *ttype, s *g) noexcept nogil:
+    
+    _fortran_slasq4(i0, n0, z, pp, n0in, dmin, dmin1, dmin2, dn, dn1, dn2, tau, ttype, g)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasq6 "BLAS_FUNC(slasq6)"(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) nogil
+cdef void slasq6(int *i0, int *n0, s *z, int *pp, s *dmin, s *dmin1, s *dmin2, s *dn, s *dnm1, s *dnm2) noexcept nogil:
+    
+    _fortran_slasq6(i0, n0, z, pp, dmin, dmin1, dmin2, dn, dnm1, dnm2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasr "BLAS_FUNC(slasr)"(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) nogil
+cdef void slasr(char *side, char *pivot, char *direct, int *m, int *n, s *c, s *s, s *a, int *lda) noexcept nogil:
+    
+    _fortran_slasr(side, pivot, direct, m, n, c, s, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasrt "BLAS_FUNC(slasrt)"(char *id, int *n, s *d, int *info) nogil
+cdef void slasrt(char *id, int *n, s *d, int *info) noexcept nogil:
+    
+    _fortran_slasrt(id, n, d, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slassq "BLAS_FUNC(slassq)"(int *n, s *x, int *incx, s *scale, s *sumsq) nogil
+cdef void slassq(int *n, s *x, int *incx, s *scale, s *sumsq) noexcept nogil:
+    
+    _fortran_slassq(n, x, incx, scale, sumsq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasv2 "BLAS_FUNC(slasv2)"(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) nogil
+cdef void slasv2(s *f, s *g, s *h, s *ssmin, s *ssmax, s *snr, s *csr, s *snl, s *csl) noexcept nogil:
+    
+    _fortran_slasv2(f, g, h, ssmin, ssmax, snr, csr, snl, csl)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slaswp "BLAS_FUNC(slaswp)"(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil
+cdef void slaswp(int *n, s *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil:
+    
+    _fortran_slaswp(n, a, lda, k1, k2, ipiv, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasy2 "BLAS_FUNC(slasy2)"(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) nogil
+cdef void slasy2(bint *ltranl, bint *ltranr, int *isgn, int *n1, int *n2, s *tl, int *ldtl, s *tr, int *ldtr, s *b, int *ldb, s *scale, s *x, int *ldx, s *xnorm, int *info) noexcept nogil:
+    
+    _fortran_slasy2(ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b, ldb, scale, x, ldx, xnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slasyf "BLAS_FUNC(slasyf)"(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) nogil
+cdef void slasyf(char *uplo, int *n, int *nb, int *kb, s *a, int *lda, int *ipiv, s *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_slasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatbs "BLAS_FUNC(slatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) nogil
+cdef void slatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, s *ab, int *ldab, s *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_slatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatdf "BLAS_FUNC(slatdf)"(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) nogil
+cdef void slatdf(int *ijob, int *n, s *z, int *ldz, s *rhs, s *rdsum, s *rdscal, int *ipiv, int *jpiv) noexcept nogil:
+    
+    _fortran_slatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatps "BLAS_FUNC(slatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) nogil
+cdef void slatps(char *uplo, char *trans, char *diag, char *normin, int *n, s *ap, s *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_slatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatrd "BLAS_FUNC(slatrd)"(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) nogil
+cdef void slatrd(char *uplo, int *n, int *nb, s *a, int *lda, s *e, s *tau, s *w, int *ldw) noexcept nogil:
+    
+    _fortran_slatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatrs "BLAS_FUNC(slatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) nogil
+cdef void slatrs(char *uplo, char *trans, char *diag, char *normin, int *n, s *a, int *lda, s *x, s *scale, s *cnorm, int *info) noexcept nogil:
+    
+    _fortran_slatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slatrz "BLAS_FUNC(slatrz)"(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) nogil
+cdef void slatrz(int *m, int *n, int *l, s *a, int *lda, s *tau, s *work) noexcept nogil:
+    
+    _fortran_slatrz(m, n, l, a, lda, tau, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slauu2 "BLAS_FUNC(slauu2)"(char *uplo, int *n, s *a, int *lda, int *info) nogil
+cdef void slauu2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_slauu2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_slauum "BLAS_FUNC(slauum)"(char *uplo, int *n, s *a, int *lda, int *info) nogil
+cdef void slauum(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_slauum(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sopgtr "BLAS_FUNC(sopgtr)"(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) nogil
+cdef void sopgtr(char *uplo, int *n, s *ap, s *tau, s *q, int *ldq, s *work, int *info) noexcept nogil:
+    
+    _fortran_sopgtr(uplo, n, ap, tau, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sopmtr "BLAS_FUNC(sopmtr)"(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sopmtr(char *side, char *uplo, char *trans, int *m, int *n, s *ap, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorbdb "BLAS_FUNC(sorbdb)"(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) nogil
+cdef void sorbdb(char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *phi, s *taup1, s *taup2, s *tauq1, s *tauq2, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorcsd "BLAS_FUNC(sorcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void sorcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, s *x11, int *ldx11, s *x12, int *ldx12, s *x21, int *ldx21, s *x22, int *ldx22, s *theta, s *u1, int *ldu1, s *u2, int *ldu2, s *v1t, int *ldv1t, s *v2t, int *ldv2t, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sorcsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorg2l "BLAS_FUNC(sorg2l)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sorg2l(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorg2l(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorg2r "BLAS_FUNC(sorg2r)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sorg2r(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorg2r(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgbr "BLAS_FUNC(sorgbr)"(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorgbr(char *vect, int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorgbr(vect, m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorghr "BLAS_FUNC(sorghr)"(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorghr(int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgl2 "BLAS_FUNC(sorgl2)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sorgl2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorgl2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorglq "BLAS_FUNC(sorglq)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorglq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorglq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgql "BLAS_FUNC(sorgql)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorgql(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorgql(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgqr "BLAS_FUNC(sorgqr)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorgqr(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorgqr(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgr2 "BLAS_FUNC(sorgr2)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) nogil
+cdef void sorgr2(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorgr2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgrq "BLAS_FUNC(sorgrq)"(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorgrq(int *m, int *n, int *k, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorgrq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorgtr "BLAS_FUNC(sorgtr)"(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void sorgtr(char *uplo, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sorgtr(uplo, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorm2l "BLAS_FUNC(sorm2l)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sorm2l(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorm2r "BLAS_FUNC(sorm2r)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sorm2r(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormbr "BLAS_FUNC(sormbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormhr "BLAS_FUNC(sormhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sorml2 "BLAS_FUNC(sorml2)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sorml2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sorml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormlq "BLAS_FUNC(sormlq)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormlq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormql "BLAS_FUNC(sormql)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormql(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormqr "BLAS_FUNC(sormqr)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormqr(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormr2 "BLAS_FUNC(sormr2)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sormr2(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sormr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormr3 "BLAS_FUNC(sormr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) nogil
+cdef void sormr3(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *info) noexcept nogil:
+    
+    _fortran_sormr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormrq "BLAS_FUNC(sormrq)"(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormrq(char *side, char *trans, int *m, int *n, int *k, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormrz "BLAS_FUNC(sormrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormrz(char *side, char *trans, int *m, int *n, int *k, int *l, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sormtr "BLAS_FUNC(sormtr)"(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) nogil
+cdef void sormtr(char *side, char *uplo, char *trans, int *m, int *n, s *a, int *lda, s *tau, s *c, int *ldc, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_sormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbcon "BLAS_FUNC(spbcon)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void spbcon(char *uplo, int *n, int *kd, s *ab, int *ldab, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_spbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbequ "BLAS_FUNC(spbequ)"(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) nogil
+cdef void spbequ(char *uplo, int *n, int *kd, s *ab, int *ldab, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_spbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbrfs "BLAS_FUNC(spbrfs)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void spbrfs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_spbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbstf "BLAS_FUNC(spbstf)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil
+cdef void spbstf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_spbstf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbsv "BLAS_FUNC(spbsv)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil
+cdef void spbsv(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbsvx "BLAS_FUNC(spbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void spbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *afb, int *ldafb, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_spbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbtf2 "BLAS_FUNC(spbtf2)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil
+cdef void spbtf2(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_spbtf2(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbtrf "BLAS_FUNC(spbtrf)"(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) nogil
+cdef void spbtrf(char *uplo, int *n, int *kd, s *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_spbtrf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spbtrs "BLAS_FUNC(spbtrs)"(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil
+cdef void spbtrs(char *uplo, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spftrf "BLAS_FUNC(spftrf)"(char *transr, char *uplo, int *n, s *a, int *info) nogil
+cdef void spftrf(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil:
+    
+    _fortran_spftrf(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spftri "BLAS_FUNC(spftri)"(char *transr, char *uplo, int *n, s *a, int *info) nogil
+cdef void spftri(char *transr, char *uplo, int *n, s *a, int *info) noexcept nogil:
+    
+    _fortran_spftri(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spftrs "BLAS_FUNC(spftrs)"(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) nogil
+cdef void spftrs(char *transr, char *uplo, int *n, int *nrhs, s *a, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spftrs(transr, uplo, n, nrhs, a, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spocon "BLAS_FUNC(spocon)"(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void spocon(char *uplo, int *n, s *a, int *lda, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_spocon(uplo, n, a, lda, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spoequ "BLAS_FUNC(spoequ)"(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) nogil
+cdef void spoequ(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_spoequ(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spoequb "BLAS_FUNC(spoequb)"(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) nogil
+cdef void spoequb(int *n, s *a, int *lda, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_spoequb(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sporfs "BLAS_FUNC(sporfs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sporfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sposv "BLAS_FUNC(sposv)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil
+cdef void sposv(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sposv(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sposvx "BLAS_FUNC(sposvx)"(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sposvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spotf2 "BLAS_FUNC(spotf2)"(char *uplo, int *n, s *a, int *lda, int *info) nogil
+cdef void spotf2(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_spotf2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spotrf "BLAS_FUNC(spotrf)"(char *uplo, int *n, s *a, int *lda, int *info) nogil
+cdef void spotrf(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_spotrf(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spotri "BLAS_FUNC(spotri)"(char *uplo, int *n, s *a, int *lda, int *info) nogil
+cdef void spotri(char *uplo, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_spotri(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spotrs "BLAS_FUNC(spotrs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil
+cdef void spotrs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spotrs(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sppcon "BLAS_FUNC(sppcon)"(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void sppcon(char *uplo, int *n, s *ap, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sppcon(uplo, n, ap, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sppequ "BLAS_FUNC(sppequ)"(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) nogil
+cdef void sppequ(char *uplo, int *n, s *ap, s *s, s *scond, s *amax, int *info) noexcept nogil:
+    
+    _fortran_sppequ(uplo, n, ap, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spprfs "BLAS_FUNC(spprfs)"(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void spprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_spprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sppsv "BLAS_FUNC(sppsv)"(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil
+cdef void sppsv(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sppsv(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sppsvx "BLAS_FUNC(sppsvx)"(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sppsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, char *equed, s *s, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spptrf "BLAS_FUNC(spptrf)"(char *uplo, int *n, s *ap, int *info) nogil
+cdef void spptrf(char *uplo, int *n, s *ap, int *info) noexcept nogil:
+    
+    _fortran_spptrf(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spptri "BLAS_FUNC(spptri)"(char *uplo, int *n, s *ap, int *info) nogil
+cdef void spptri(char *uplo, int *n, s *ap, int *info) noexcept nogil:
+    
+    _fortran_spptri(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spptrs "BLAS_FUNC(spptrs)"(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil
+cdef void spptrs(char *uplo, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spptrs(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spstf2 "BLAS_FUNC(spstf2)"(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil
+cdef void spstf2(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil:
+    
+    _fortran_spstf2(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spstrf "BLAS_FUNC(spstrf)"(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) nogil
+cdef void spstrf(char *uplo, int *n, s *a, int *lda, int *piv, int *rank, s *tol, s *work, int *info) noexcept nogil:
+    
+    _fortran_spstrf(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sptcon "BLAS_FUNC(sptcon)"(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) nogil
+cdef void sptcon(int *n, s *d, s *e, s *anorm, s *rcond, s *work, int *info) noexcept nogil:
+    
+    _fortran_sptcon(n, d, e, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spteqr "BLAS_FUNC(spteqr)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil
+cdef void spteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_spteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sptrfs "BLAS_FUNC(sptrfs)"(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) nogil
+cdef void sptrfs(int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *info) noexcept nogil:
+    
+    _fortran_sptrfs(n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sptsv "BLAS_FUNC(sptsv)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) nogil
+cdef void sptsv(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sptsv(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sptsvx "BLAS_FUNC(sptsvx)"(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) nogil
+cdef void sptsvx(char *fact, int *n, int *nrhs, s *d, s *e, s *df, s *ef, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *info) noexcept nogil:
+    
+    _fortran_sptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spttrf "BLAS_FUNC(spttrf)"(int *n, s *d, s *e, int *info) nogil
+cdef void spttrf(int *n, s *d, s *e, int *info) noexcept nogil:
+    
+    _fortran_spttrf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_spttrs "BLAS_FUNC(spttrs)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) nogil
+cdef void spttrs(int *n, int *nrhs, s *d, s *e, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_spttrs(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sptts2 "BLAS_FUNC(sptts2)"(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) nogil
+cdef void sptts2(int *n, int *nrhs, s *d, s *e, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_sptts2(n, nrhs, d, e, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_srscl "BLAS_FUNC(srscl)"(int *n, s *sa, s *sx, int *incx) nogil
+cdef void srscl(int *n, s *sa, s *sx, int *incx) noexcept nogil:
+    
+    _fortran_srscl(n, sa, sx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbev "BLAS_FUNC(ssbev)"(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) nogil
+cdef void ssbev(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbevd "BLAS_FUNC(ssbevd)"(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ssbevd(char *jobz, char *uplo, int *n, int *kd, s *ab, int *ldab, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ssbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbevx "BLAS_FUNC(ssbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void ssbevx(char *jobz, char *range, char *uplo, int *n, int *kd, s *ab, int *ldab, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_ssbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbgst "BLAS_FUNC(ssbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) nogil
+cdef void ssbgst(char *vect, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *x, int *ldx, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbgv "BLAS_FUNC(ssbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) nogil
+cdef void ssbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbgvd "BLAS_FUNC(ssbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ssbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ssbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbgvx "BLAS_FUNC(ssbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void ssbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, s *ab, int *ldab, s *bb, int *ldbb, s *q, int *ldq, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_ssbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssbtrd "BLAS_FUNC(ssbtrd)"(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) nogil
+cdef void ssbtrd(char *vect, char *uplo, int *n, int *kd, s *ab, int *ldab, s *d, s *e, s *q, int *ldq, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssfrk "BLAS_FUNC(ssfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) nogil
+cdef void ssfrk(char *transr, char *uplo, char *trans, int *n, int *k, s *alpha, s *a, int *lda, s *beta, s *c) noexcept nogil:
+    
+    _fortran_ssfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspcon "BLAS_FUNC(sspcon)"(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void sspcon(char *uplo, int *n, s *ap, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sspcon(uplo, n, ap, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspev "BLAS_FUNC(sspev)"(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) nogil
+cdef void sspev(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_sspev(jobz, uplo, n, ap, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspevd "BLAS_FUNC(sspevd)"(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sspevd(char *jobz, char *uplo, int *n, s *ap, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspevx "BLAS_FUNC(sspevx)"(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void sspevx(char *jobz, char *range, char *uplo, int *n, s *ap, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_sspevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspgst "BLAS_FUNC(sspgst)"(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) nogil
+cdef void sspgst(int *itype, char *uplo, int *n, s *ap, s *bp, int *info) noexcept nogil:
+    
+    _fortran_sspgst(itype, uplo, n, ap, bp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspgv "BLAS_FUNC(sspgv)"(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) nogil
+cdef void sspgv(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_sspgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspgvd "BLAS_FUNC(sspgvd)"(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sspgvd(int *itype, char *jobz, char *uplo, int *n, s *ap, s *bp, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sspgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspgvx "BLAS_FUNC(sspgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void sspgvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *ap, s *bp, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_sspgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssprfs "BLAS_FUNC(ssprfs)"(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void ssprfs(char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ssprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspsv "BLAS_FUNC(sspsv)"(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void sspsv(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_sspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sspsvx "BLAS_FUNC(sspsvx)"(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void sspsvx(char *fact, char *uplo, int *n, int *nrhs, s *ap, s *afp, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssptrd "BLAS_FUNC(ssptrd)"(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) nogil
+cdef void ssptrd(char *uplo, int *n, s *ap, s *d, s *e, s *tau, int *info) noexcept nogil:
+    
+    _fortran_ssptrd(uplo, n, ap, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssptrf "BLAS_FUNC(ssptrf)"(char *uplo, int *n, s *ap, int *ipiv, int *info) nogil
+cdef void ssptrf(char *uplo, int *n, s *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_ssptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssptri "BLAS_FUNC(ssptri)"(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) nogil
+cdef void ssptri(char *uplo, int *n, s *ap, int *ipiv, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssptrs "BLAS_FUNC(ssptrs)"(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void ssptrs(char *uplo, int *n, int *nrhs, s *ap, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ssptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstebz "BLAS_FUNC(sstebz)"(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) nogil
+cdef void sstebz(char *range, char *order, int *n, s *vl, s *vu, int *il, int *iu, s *abstol, s *d, s *e, int *m, int *nsplit, s *w, int *iblock, int *isplit, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstedc "BLAS_FUNC(sstedc)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sstedc(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstegr "BLAS_FUNC(sstegr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sstegr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstein "BLAS_FUNC(sstein)"(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void sstein(int *n, s *d, s *e, int *m, s *w, int *iblock, int *isplit, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_sstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstemr "BLAS_FUNC(sstemr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sstemr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, int *m, s *w, s *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssteqr "BLAS_FUNC(ssteqr)"(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil
+cdef void ssteqr(char *compz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssterf "BLAS_FUNC(ssterf)"(int *n, s *d, s *e, int *info) nogil
+cdef void ssterf(int *n, s *d, s *e, int *info) noexcept nogil:
+    
+    _fortran_ssterf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstev "BLAS_FUNC(sstev)"(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) nogil
+cdef void sstev(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *info) noexcept nogil:
+    
+    _fortran_sstev(jobz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstevd "BLAS_FUNC(sstevd)"(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sstevd(char *jobz, int *n, s *d, s *e, s *z, int *ldz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sstevd(jobz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstevr "BLAS_FUNC(sstevr)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void sstevr(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_sstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_sstevx "BLAS_FUNC(sstevx)"(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) nogil
+cdef void sstevx(char *jobz, char *range, int *n, s *d, s *e, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_sstevx(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssycon "BLAS_FUNC(ssycon)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void ssycon(char *uplo, int *n, s *a, int *lda, int *ipiv, s *anorm, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ssycon(uplo, n, a, lda, ipiv, anorm, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyconv "BLAS_FUNC(ssyconv)"(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) nogil
+cdef void ssyconv(char *uplo, char *way, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssyconv(uplo, way, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyequb "BLAS_FUNC(ssyequb)"(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) nogil
+cdef void ssyequb(char *uplo, int *n, s *a, int *lda, s *s, s *scond, s *amax, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssyequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyev "BLAS_FUNC(ssyev)"(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) nogil
+cdef void ssyev(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssyev(jobz, uplo, n, a, lda, w, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyevd "BLAS_FUNC(ssyevd)"(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ssyevd(char *jobz, char *uplo, int *n, s *a, int *lda, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ssyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyevr "BLAS_FUNC(ssyevr)"(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ssyevr(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, int *isuppz, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ssyevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyevx "BLAS_FUNC(ssyevx)"(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) nogil
+cdef void ssyevx(char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_ssyevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssygs2 "BLAS_FUNC(ssygs2)"(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) nogil
+cdef void ssygs2(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ssygs2(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssygst "BLAS_FUNC(ssygst)"(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) nogil
+cdef void ssygst(int *itype, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ssygst(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssygv "BLAS_FUNC(ssygv)"(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) nogil
+cdef void ssygv(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssygv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssygvd "BLAS_FUNC(ssygvd)"(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ssygvd(int *itype, char *jobz, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *w, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ssygvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssygvx "BLAS_FUNC(ssygvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) nogil
+cdef void ssygvx(int *itype, char *jobz, char *range, char *uplo, int *n, s *a, int *lda, s *b, int *ldb, s *vl, s *vu, int *il, int *iu, s *abstol, int *m, s *w, s *z, int *ldz, s *work, int *lwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_ssygvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyrfs "BLAS_FUNC(ssyrfs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void ssyrfs(char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ssyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssysv "BLAS_FUNC(ssysv)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) nogil
+cdef void ssysv(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssysvx "BLAS_FUNC(ssysvx)"(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void ssysvx(char *fact, char *uplo, int *n, int *nrhs, s *a, int *lda, s *af, int *ldaf, int *ipiv, s *b, int *ldb, s *x, int *ldx, s *rcond, s *ferr, s *berr, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ssysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssyswapr "BLAS_FUNC(ssyswapr)"(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) nogil
+cdef void ssyswapr(char *uplo, int *n, s *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_ssyswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytd2 "BLAS_FUNC(ssytd2)"(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) nogil
+cdef void ssytd2(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, int *info) noexcept nogil:
+    
+    _fortran_ssytd2(uplo, n, a, lda, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytf2 "BLAS_FUNC(ssytf2)"(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) nogil
+cdef void ssytf2(char *uplo, int *n, s *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_ssytf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytrd "BLAS_FUNC(ssytrd)"(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) nogil
+cdef void ssytrd(char *uplo, int *n, s *a, int *lda, s *d, s *e, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytrf "BLAS_FUNC(ssytrf)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil
+cdef void ssytrf(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssytrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytri "BLAS_FUNC(ssytri)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) nogil
+cdef void ssytri(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssytri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytri2 "BLAS_FUNC(ssytri2)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) nogil
+cdef void ssytri2(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ssytri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytri2x "BLAS_FUNC(ssytri2x)"(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) nogil
+cdef void ssytri2x(char *uplo, int *n, s *a, int *lda, int *ipiv, s *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_ssytri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytrs "BLAS_FUNC(ssytrs)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) nogil
+cdef void ssytrs(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ssytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ssytrs2 "BLAS_FUNC(ssytrs2)"(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) nogil
+cdef void ssytrs2(char *uplo, int *n, int *nrhs, s *a, int *lda, int *ipiv, s *b, int *ldb, s *work, int *info) noexcept nogil:
+    
+    _fortran_ssytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stbcon "BLAS_FUNC(stbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void stbcon(char *norm, char *uplo, char *diag, int *n, int *kd, s *ab, int *ldab, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stbrfs "BLAS_FUNC(stbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void stbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stbtrs "BLAS_FUNC(stbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) nogil
+cdef void stbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, s *ab, int *ldab, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_stbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stfsm "BLAS_FUNC(stfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) nogil
+cdef void stfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, s *alpha, s *a, s *b, int *ldb) noexcept nogil:
+    
+    _fortran_stfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stftri "BLAS_FUNC(stftri)"(char *transr, char *uplo, char *diag, int *n, s *a, int *info) nogil
+cdef void stftri(char *transr, char *uplo, char *diag, int *n, s *a, int *info) noexcept nogil:
+    
+    _fortran_stftri(transr, uplo, diag, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stfttp "BLAS_FUNC(stfttp)"(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) nogil
+cdef void stfttp(char *transr, char *uplo, int *n, s *arf, s *ap, int *info) noexcept nogil:
+    
+    _fortran_stfttp(transr, uplo, n, arf, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stfttr "BLAS_FUNC(stfttr)"(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) nogil
+cdef void stfttr(char *transr, char *uplo, int *n, s *arf, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_stfttr(transr, uplo, n, arf, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgevc "BLAS_FUNC(stgevc)"(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) nogil
+cdef void stgevc(char *side, char *howmny, bint *select, int *n, s *s, int *lds, s *p, int *ldp, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil:
+    
+    _fortran_stgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgex2 "BLAS_FUNC(stgex2)"(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) nogil
+cdef void stgex2(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *j1, int *n1, int *n2, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_stgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, n1, n2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgexc "BLAS_FUNC(stgexc)"(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) nogil
+cdef void stgexc(bint *wantq, bint *wantz, int *n, s *a, int *lda, s *b, int *ldb, s *q, int *ldq, s *z, int *ldz, int *ifst, int *ilst, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_stgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgsen "BLAS_FUNC(stgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void stgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *alphar, s *alphai, s *beta, s *q, int *ldq, s *z, int *ldz, int *m, s *pl, s *pr, s *dif, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_stgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgsja "BLAS_FUNC(stgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) nogil
+cdef void stgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, s *a, int *lda, s *b, int *ldb, s *tola, s *tolb, s *alpha, s *beta, s *u, int *ldu, s *v, int *ldv, s *q, int *ldq, s *work, int *ncycle, int *info) noexcept nogil:
+    
+    _fortran_stgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgsna "BLAS_FUNC(stgsna)"(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void stgsna(char *job, char *howmny, bint *select, int *n, s *a, int *lda, s *b, int *ldb, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *dif, int *mm, int *m, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgsy2 "BLAS_FUNC(stgsy2)"(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) nogil
+cdef void stgsy2(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *rdsum, s *rdscal, int *iwork, int *pq, int *info) noexcept nogil:
+    
+    _fortran_stgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, iwork, pq, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stgsyl "BLAS_FUNC(stgsyl)"(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) nogil
+cdef void stgsyl(char *trans, int *ijob, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *d, int *ldd, s *e, int *lde, s *f, int *ldf, s *scale, s *dif, s *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpcon "BLAS_FUNC(stpcon)"(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void stpcon(char *norm, char *uplo, char *diag, int *n, s *ap, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stpcon(norm, uplo, diag, n, ap, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpmqrt "BLAS_FUNC(stpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) nogil
+cdef void stpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *info) noexcept nogil:
+    
+    _fortran_stpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpqrt "BLAS_FUNC(stpqrt)"(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) nogil
+cdef void stpqrt(int *m, int *n, int *l, int *nb, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, s *work, int *info) noexcept nogil:
+    
+    _fortran_stpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpqrt2 "BLAS_FUNC(stpqrt2)"(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) nogil
+cdef void stpqrt2(int *m, int *n, int *l, s *a, int *lda, s *b, int *ldb, s *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_stpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stprfb "BLAS_FUNC(stprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) nogil
+cdef void stprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, s *v, int *ldv, s *t, int *ldt, s *a, int *lda, s *b, int *ldb, s *work, int *ldwork) noexcept nogil:
+    
+    _fortran_stprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stprfs "BLAS_FUNC(stprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void stprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_stprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stptri "BLAS_FUNC(stptri)"(char *uplo, char *diag, int *n, s *ap, int *info) nogil
+cdef void stptri(char *uplo, char *diag, int *n, s *ap, int *info) noexcept nogil:
+    
+    _fortran_stptri(uplo, diag, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stptrs "BLAS_FUNC(stptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) nogil
+cdef void stptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *ap, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_stptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpttf "BLAS_FUNC(stpttf)"(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) nogil
+cdef void stpttf(char *transr, char *uplo, int *n, s *ap, s *arf, int *info) noexcept nogil:
+    
+    _fortran_stpttf(transr, uplo, n, ap, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stpttr "BLAS_FUNC(stpttr)"(char *uplo, int *n, s *ap, s *a, int *lda, int *info) nogil
+cdef void stpttr(char *uplo, int *n, s *ap, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_stpttr(uplo, n, ap, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strcon "BLAS_FUNC(strcon)"(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) nogil
+cdef void strcon(char *norm, char *uplo, char *diag, int *n, s *a, int *lda, s *rcond, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_strcon(norm, uplo, diag, n, a, lda, rcond, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strevc "BLAS_FUNC(strevc)"(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) nogil
+cdef void strevc(char *side, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, int *mm, int *m, s *work, int *info) noexcept nogil:
+    
+    _fortran_strevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strexc "BLAS_FUNC(strexc)"(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) nogil
+cdef void strexc(char *compq, int *n, s *t, int *ldt, s *q, int *ldq, int *ifst, int *ilst, s *work, int *info) noexcept nogil:
+    
+    _fortran_strexc(compq, n, t, ldt, q, ldq, ifst, ilst, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strrfs "BLAS_FUNC(strrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) nogil
+cdef void strrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, s *x, int *ldx, s *ferr, s *berr, s *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_strrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strsen "BLAS_FUNC(strsen)"(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void strsen(char *job, char *compq, bint *select, int *n, s *t, int *ldt, s *q, int *ldq, s *wr, s *wi, int *m, s *s, s *sep, s *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_strsen(job, compq, select, n, t, ldt, q, ldq, wr, wi, m, s, sep, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strsna "BLAS_FUNC(strsna)"(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) nogil
+cdef void strsna(char *job, char *howmny, bint *select, int *n, s *t, int *ldt, s *vl, int *ldvl, s *vr, int *ldvr, s *s, s *sep, int *mm, int *m, s *work, int *ldwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_strsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strsyl "BLAS_FUNC(strsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) nogil
+cdef void strsyl(char *trana, char *tranb, int *isgn, int *m, int *n, s *a, int *lda, s *b, int *ldb, s *c, int *ldc, s *scale, int *info) noexcept nogil:
+    
+    _fortran_strsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strti2 "BLAS_FUNC(strti2)"(char *uplo, char *diag, int *n, s *a, int *lda, int *info) nogil
+cdef void strti2(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_strti2(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strtri "BLAS_FUNC(strtri)"(char *uplo, char *diag, int *n, s *a, int *lda, int *info) nogil
+cdef void strtri(char *uplo, char *diag, int *n, s *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_strtri(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strtrs "BLAS_FUNC(strtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) nogil
+cdef void strtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, s *a, int *lda, s *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_strtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strttf "BLAS_FUNC(strttf)"(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) nogil
+cdef void strttf(char *transr, char *uplo, int *n, s *a, int *lda, s *arf, int *info) noexcept nogil:
+    
+    _fortran_strttf(transr, uplo, n, a, lda, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_strttp "BLAS_FUNC(strttp)"(char *uplo, int *n, s *a, int *lda, s *ap, int *info) nogil
+cdef void strttp(char *uplo, int *n, s *a, int *lda, s *ap, int *info) noexcept nogil:
+    
+    _fortran_strttp(uplo, n, a, lda, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_stzrzf "BLAS_FUNC(stzrzf)"(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) nogil
+cdef void stzrzf(int *m, int *n, s *a, int *lda, s *tau, s *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_stzrzf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_xerbla_array "BLAS_FUNC(xerbla_array)"(char *srname_array, int *srname_len, int *info) nogil
+cdef void xerbla_array(char *srname_array, int *srname_len, int *info) noexcept nogil:
+    
+    _fortran_xerbla_array(srname_array, srname_len, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zbbcsd "BLAS_FUNC(zbbcsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) nogil
+cdef void zbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, d *theta, d *phi, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, d *b11d, d *b11e, d *b12d, d *b12e, d *b21d, d *b21e, d *b22d, d *b22e, d *rwork, int *lrwork, int *info) noexcept nogil:
+    
+    _fortran_zbbcsd(jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta, phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d, b12e, b21d, b21e, b22d, b22e, rwork, lrwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zbdsqr "BLAS_FUNC(zbdsqr)"(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, npy_complex128 *vt, int *ldvt, npy_complex128 *u, int *ldu, npy_complex128 *c, int *ldc, d *rwork, int *info) nogil
+cdef void zbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, d *d, d *e, z *vt, int *ldvt, z *u, int *ldu, z *c, int *ldc, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zbdsqr(uplo, n, ncvt, nru, ncc, d, e, vt, ldvt, u, ldu, c, ldc, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zcgesv "BLAS_FUNC(zcgesv)"(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, d *rwork, int *iter, int *info) nogil
+cdef void zcgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil:
+    
+    _fortran_zcgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, rwork, iter, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zcposv "BLAS_FUNC(zcposv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, npy_complex128 *work, npy_complex64 *swork, d *rwork, int *iter, int *info) nogil
+cdef void zcposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, z *work, c *swork, d *rwork, int *iter, int *info) noexcept nogil:
+    
+    _fortran_zcposv(uplo, n, nrhs, a, lda, b, ldb, x, ldx, work, swork, rwork, iter, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zdrscl "BLAS_FUNC(zdrscl)"(int *n, d *sa, npy_complex128 *sx, int *incx) nogil
+cdef void zdrscl(int *n, d *sa, z *sx, int *incx) noexcept nogil:
+    
+    _fortran_zdrscl(n, sa, sx, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbbrd "BLAS_FUNC(zgbbrd)"(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *pt, int *ldpt, npy_complex128 *c, int *ldc, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgbbrd(char *vect, int *m, int *n, int *ncc, int *kl, int *ku, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *pt, int *ldpt, z *c, int *ldc, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgbbrd(vect, m, n, ncc, kl, ku, ab, ldab, d, e, q, ldq, pt, ldpt, c, ldc, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbcon "BLAS_FUNC(zgbcon)"(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgbcon(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgbcon(norm, n, kl, ku, ab, ldab, ipiv, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbequ "BLAS_FUNC(zgbequ)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void zgbequ(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zgbequ(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbequb "BLAS_FUNC(zgbequb)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void zgbequb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbrfs "BLAS_FUNC(zgbrfs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgbrfs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgbrfs(trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbsv "BLAS_FUNC(zgbsv)"(int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgbsv(int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgbsv(n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbsvx "BLAS_FUNC(zgbsvx)"(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgbsvx(char *fact, char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgbsvx(fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbtf2 "BLAS_FUNC(zgbtf2)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void zgbtf2(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zgbtf2(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbtrf "BLAS_FUNC(zgbtrf)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, int *ipiv, int *info) nogil
+cdef void zgbtrf(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgbtrs "BLAS_FUNC(zgbtrs)"(char *trans, int *n, int *kl, int *ku, int *nrhs, npy_complex128 *ab, int *ldab, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgbtrs(char *trans, int *n, int *kl, int *ku, int *nrhs, z *ab, int *ldab, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgebak "BLAS_FUNC(zgebak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, npy_complex128 *v, int *ldv, int *info) nogil
+cdef void zgebak(char *job, char *side, int *n, int *ilo, int *ihi, d *scale, int *m, z *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_zgebak(job, side, n, ilo, ihi, scale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgebal "BLAS_FUNC(zgebal)"(char *job, int *n, npy_complex128 *a, int *lda, int *ilo, int *ihi, d *scale, int *info) nogil
+cdef void zgebal(char *job, int *n, z *a, int *lda, int *ilo, int *ihi, d *scale, int *info) noexcept nogil:
+    
+    _fortran_zgebal(job, n, a, lda, ilo, ihi, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgebd2 "BLAS_FUNC(zgebd2)"(int *m, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *info) nogil
+cdef void zgebd2(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgebd2(m, n, a, lda, d, e, tauq, taup, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgebrd "BLAS_FUNC(zgebrd)"(int *m, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgebrd(int *m, int *n, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgebrd(m, n, a, lda, d, e, tauq, taup, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgecon "BLAS_FUNC(zgecon)"(char *norm, int *n, npy_complex128 *a, int *lda, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgecon(char *norm, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgecon(norm, n, a, lda, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeequ "BLAS_FUNC(zgeequ)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void zgeequ(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zgeequ(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeequb "BLAS_FUNC(zgeequb)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) nogil
+cdef void zgeequb(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zgeequb(m, n, a, lda, r, c, rowcnd, colcnd, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgees "BLAS_FUNC(zgees)"(char *jobvs, char *sort, _zselect1 *select, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil
+cdef void zgees(char *jobvs, char *sort, zselect1 *select, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_zgees(jobvs, sort, <_zselect1*>select, n, a, lda, sdim, w, vs, ldvs, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeesx "BLAS_FUNC(zgeesx)"(char *jobvs, char *sort, _zselect1 *select, char *sense, int *n, npy_complex128 *a, int *lda, int *sdim, npy_complex128 *w, npy_complex128 *vs, int *ldvs, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil
+cdef void zgeesx(char *jobvs, char *sort, zselect1 *select, char *sense, int *n, z *a, int *lda, int *sdim, z *w, z *vs, int *ldvs, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_zgeesx(jobvs, sort, <_zselect1*>select, sense, n, a, lda, sdim, w, vs, ldvs, rconde, rcondv, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeev "BLAS_FUNC(zgeev)"(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgeev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgeev(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeevx "BLAS_FUNC(zgeevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgeevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *scale, d *abnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgeevx(balanc, jobvl, jobvr, sense, n, a, lda, w, vl, ldvl, vr, ldvr, ilo, ihi, scale, abnrm, rconde, rcondv, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgehd2 "BLAS_FUNC(zgehd2)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgehd2(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgehd2(n, ilo, ihi, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgehrd "BLAS_FUNC(zgehrd)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgehrd(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgelq2 "BLAS_FUNC(zgelq2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgelq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgelq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgelqf "BLAS_FUNC(zgelqf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgelqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgelqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgels "BLAS_FUNC(zgels)"(char *trans, int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgels(char *trans, int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgelsd "BLAS_FUNC(zgelsd)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *s, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *info) nogil
+cdef void zgelsd(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zgelsd(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgelss "BLAS_FUNC(zgelss)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *s, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgelss(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, d *s, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgelsy "BLAS_FUNC(zgelsy)"(int *m, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *jpvt, d *rcond, int *rank, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgelsy(int *m, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *jpvt, d *rcond, int *rank, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgemqrt "BLAS_FUNC(zgemqrt)"(char *side, char *trans, int *m, int *n, int *k, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zgemqrt(char *side, char *trans, int *m, int *n, int *k, int *nb, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgemqrt(side, trans, m, n, k, nb, v, ldv, t, ldt, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeql2 "BLAS_FUNC(zgeql2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgeql2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgeql2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqlf "BLAS_FUNC(zgeqlf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgeqlf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgeqlf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqp3 "BLAS_FUNC(zgeqp3)"(int *m, int *n, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgeqp3(int *m, int *n, z *a, int *lda, int *jpvt, z *tau, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqr2 "BLAS_FUNC(zgeqr2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgeqr2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgeqr2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqr2p "BLAS_FUNC(zgeqr2p)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgeqr2p(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgeqr2p(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqrf "BLAS_FUNC(zgeqrf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgeqrf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgeqrf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqrfp "BLAS_FUNC(zgeqrfp)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgeqrfp(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgeqrfp(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqrt "BLAS_FUNC(zgeqrt)"(int *m, int *n, int *nb, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info) nogil
+cdef void zgeqrt(int *m, int *n, int *nb, z *a, int *lda, z *t, int *ldt, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgeqrt(m, n, nb, a, lda, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqrt2 "BLAS_FUNC(zgeqrt2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info) nogil
+cdef void zgeqrt2(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_zgeqrt2(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgeqrt3 "BLAS_FUNC(zgeqrt3)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *t, int *ldt, int *info) nogil
+cdef void zgeqrt3(int *m, int *n, z *a, int *lda, z *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_zgeqrt3(m, n, a, lda, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgerfs "BLAS_FUNC(zgerfs)"(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgerfs(char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgerfs(trans, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgerq2 "BLAS_FUNC(zgerq2)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zgerq2(int *m, int *n, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgerq2(m, n, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgerqf "BLAS_FUNC(zgerqf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgerqf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgerqf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgesc2 "BLAS_FUNC(zgesc2)"(int *n, npy_complex128 *a, int *lda, npy_complex128 *rhs, int *ipiv, int *jpiv, d *scale) nogil
+cdef void zgesc2(int *n, z *a, int *lda, z *rhs, int *ipiv, int *jpiv, d *scale) noexcept nogil:
+    
+    _fortran_zgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgesdd "BLAS_FUNC(zgesdd)"(char *jobz, int *m, int *n, npy_complex128 *a, int *lda, d *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *info) nogil
+cdef void zgesdd(char *jobz, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zgesdd(jobz, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgesv "BLAS_FUNC(zgesv)"(int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgesv(int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgesvd "BLAS_FUNC(zgesvd)"(char *jobu, char *jobvt, int *m, int *n, npy_complex128 *a, int *lda, d *s, npy_complex128 *u, int *ldu, npy_complex128 *vt, int *ldvt, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zgesvd(char *jobu, char *jobvt, int *m, int *n, z *a, int *lda, d *s, z *u, int *ldu, z *vt, int *ldvt, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgesvx "BLAS_FUNC(zgesvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgesvx(char *fact, char *trans, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, char *equed, d *r, d *c, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgesvx(fact, trans, n, nrhs, a, lda, af, ldaf, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgetc2 "BLAS_FUNC(zgetc2)"(int *n, npy_complex128 *a, int *lda, int *ipiv, int *jpiv, int *info) nogil
+cdef void zgetc2(int *n, z *a, int *lda, int *ipiv, int *jpiv, int *info) noexcept nogil:
+    
+    _fortran_zgetc2(n, a, lda, ipiv, jpiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgetf2 "BLAS_FUNC(zgetf2)"(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil
+cdef void zgetf2(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zgetf2(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgetrf "BLAS_FUNC(zgetrf)"(int *m, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil
+cdef void zgetrf(int *m, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zgetrf(m, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgetri "BLAS_FUNC(zgetri)"(int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgetri(int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgetri(n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgetrs "BLAS_FUNC(zgetrs)"(char *trans, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgetrs(char *trans, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggbak "BLAS_FUNC(zggbak)"(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, npy_complex128 *v, int *ldv, int *info) nogil
+cdef void zggbak(char *job, char *side, int *n, int *ilo, int *ihi, d *lscale, d *rscale, int *m, z *v, int *ldv, int *info) noexcept nogil:
+    
+    _fortran_zggbak(job, side, n, ilo, ihi, lscale, rscale, m, v, ldv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggbal "BLAS_FUNC(zggbal)"(char *job, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) nogil
+cdef void zggbal(char *job, int *n, z *a, int *lda, z *b, int *ldb, int *ilo, int *ihi, d *lscale, d *rscale, d *work, int *info) noexcept nogil:
+    
+    _fortran_zggbal(job, n, a, lda, b, ldb, ilo, ihi, lscale, rscale, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgges "BLAS_FUNC(zgges)"(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, npy_complex128 *work, int *lwork, d *rwork, bint *bwork, int *info) nogil
+cdef void zgges(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, z *work, int *lwork, d *rwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_zgges(jobvsl, jobvsr, sort, <_zselect2*>selctg, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, work, lwork, rwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggesx "BLAS_FUNC(zggesx)"(char *jobvsl, char *jobvsr, char *sort, _zselect2 *selctg, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *sdim, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vsl, int *ldvsl, npy_complex128 *vsr, int *ldvsr, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) nogil
+cdef void zggesx(char *jobvsl, char *jobvsr, char *sort, zselect2 *selctg, char *sense, int *n, z *a, int *lda, z *b, int *ldb, int *sdim, z *alpha, z *beta, z *vsl, int *ldvsl, z *vsr, int *ldvsr, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, int *liwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_zggesx(jobvsl, jobvsr, sort, <_zselect2*>selctg, sense, n, a, lda, b, ldb, sdim, alpha, beta, vsl, ldvsl, vsr, ldvsr, rconde, rcondv, work, lwork, rwork, iwork, liwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggev "BLAS_FUNC(zggev)"(char *jobvl, char *jobvr, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zggev(char *jobvl, char *jobvr, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zggev(jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggevx "BLAS_FUNC(zggevx)"(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, npy_complex128 *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) nogil
+cdef void zggevx(char *balanc, char *jobvl, char *jobvr, char *sense, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *vl, int *ldvl, z *vr, int *ldvr, int *ilo, int *ihi, d *lscale, d *rscale, d *abnrm, d *bbnrm, d *rconde, d *rcondv, z *work, int *lwork, d *rwork, int *iwork, bint *bwork, int *info) noexcept nogil:
+    
+    _fortran_zggevx(balanc, jobvl, jobvr, sense, n, a, lda, b, ldb, alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm, bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggglm "BLAS_FUNC(zggglm)"(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *d, npy_complex128 *x, npy_complex128 *y, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zggglm(int *n, int *m, int *p, z *a, int *lda, z *b, int *ldb, z *d, z *x, z *y, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zggglm(n, m, p, a, lda, b, ldb, d, x, y, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgghrd "BLAS_FUNC(zgghrd)"(char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *info) nogil
+cdef void zgghrd(char *compq, char *compz, int *n, int *ilo, int *ihi, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_zgghrd(compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgglse "BLAS_FUNC(zgglse)"(int *m, int *n, int *p, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, npy_complex128 *d, npy_complex128 *x, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zgglse(int *m, int *n, int *p, z *a, int *lda, z *b, int *ldb, z *c, z *d, z *x, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zgglse(m, n, p, a, lda, b, ldb, c, d, x, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggqrf "BLAS_FUNC(zggqrf)"(int *n, int *m, int *p, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zggqrf(int *n, int *m, int *p, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zggqrf(n, m, p, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zggrqf "BLAS_FUNC(zggrqf)"(int *m, int *p, int *n, npy_complex128 *a, int *lda, npy_complex128 *taua, npy_complex128 *b, int *ldb, npy_complex128 *taub, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zggrqf(int *m, int *p, int *n, z *a, int *lda, z *taua, z *b, int *ldb, z *taub, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zggrqf(m, p, n, a, lda, taua, b, ldb, taub, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgtcon "BLAS_FUNC(zgtcon)"(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil
+cdef void zgtcon(char *norm, int *n, z *dl, z *d, z *du, z *du2, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil:
+    
+    _fortran_zgtcon(norm, n, dl, d, du, du2, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgtrfs "BLAS_FUNC(zgtrfs)"(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgtrfs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgtrfs(trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgtsv "BLAS_FUNC(zgtsv)"(int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgtsv(int *n, int *nrhs, z *dl, z *d, z *du, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgtsv(n, nrhs, dl, d, du, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgtsvx "BLAS_FUNC(zgtsvx)"(char *fact, char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *dlf, npy_complex128 *df, npy_complex128 *duf, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zgtsvx(char *fact, char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *dlf, z *df, z *duf, z *du2, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zgtsvx(fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgttrf "BLAS_FUNC(zgttrf)"(int *n, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, int *info) nogil
+cdef void zgttrf(int *n, z *dl, z *d, z *du, z *du2, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zgttrf(n, dl, d, du, du2, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgttrs "BLAS_FUNC(zgttrs)"(char *trans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zgttrs(char *trans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zgttrs(trans, n, nrhs, dl, d, du, du2, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zgtts2 "BLAS_FUNC(zgtts2)"(int *itrans, int *n, int *nrhs, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *du2, int *ipiv, npy_complex128 *b, int *ldb) nogil
+cdef void zgtts2(int *itrans, int *n, int *nrhs, z *dl, z *d, z *du, z *du2, int *ipiv, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_zgtts2(itrans, n, nrhs, dl, d, du, du2, ipiv, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbev "BLAS_FUNC(zhbev)"(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhbev(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhbev(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbevd "BLAS_FUNC(zhbevd)"(char *jobz, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zhbevd(char *jobz, char *uplo, int *n, int *kd, z *ab, int *ldab, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zhbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbevx "BLAS_FUNC(zhbevx)"(char *jobz, char *range, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zhbevx(char *jobz, char *range, char *uplo, int *n, int *kd, z *ab, int *ldab, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zhbevx(jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbgst "BLAS_FUNC(zhbgst)"(char *vect, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *x, int *ldx, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhbgst(char *vect, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *x, int *ldx, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbgv "BLAS_FUNC(zhbgv)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhbgv(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhbgv(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbgvd "BLAS_FUNC(zhbgvd)"(char *jobz, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zhbgvd(char *jobz, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zhbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbgvx "BLAS_FUNC(zhbgvx)"(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, npy_complex128 *ab, int *ldab, npy_complex128 *bb, int *ldbb, npy_complex128 *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zhbgvx(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, z *ab, int *ldab, z *bb, int *ldbb, z *q, int *ldq, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zhbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhbtrd "BLAS_FUNC(zhbtrd)"(char *vect, char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info) nogil
+cdef void zhbtrd(char *vect, char *uplo, int *n, int *kd, z *ab, int *ldab, d *d, d *e, z *q, int *ldq, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhecon "BLAS_FUNC(zhecon)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil
+cdef void zhecon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhecon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheequb "BLAS_FUNC(zheequb)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, npy_complex128 *work, int *info) nogil
+cdef void zheequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil:
+    
+    _fortran_zheequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheev "BLAS_FUNC(zheev)"(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, d *w, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zheev(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheevd "BLAS_FUNC(zheevd)"(char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, d *w, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zheevd(char *jobz, char *uplo, int *n, z *a, int *lda, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zheevd(jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheevr "BLAS_FUNC(zheevr)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, int *isuppz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zheevr(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zheevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheevx "BLAS_FUNC(zheevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zheevx(char *jobz, char *range, char *uplo, int *n, z *a, int *lda, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhegs2 "BLAS_FUNC(zhegs2)"(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zhegs2(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zhegs2(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhegst "BLAS_FUNC(zhegst)"(int *itype, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zhegst(int *itype, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zhegst(itype, uplo, n, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhegv "BLAS_FUNC(zhegv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *w, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zhegv(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhegv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhegvd "BLAS_FUNC(zhegvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *w, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zhegvd(int *itype, char *jobz, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *w, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zhegvd(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhegvx "BLAS_FUNC(zhegvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zhegvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *a, int *lda, z *b, int *ldb, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zhegvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zherfs "BLAS_FUNC(zherfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zherfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zherfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhesv "BLAS_FUNC(zhesv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zhesv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zhesv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhesvx "BLAS_FUNC(zhesvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zhesvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhesvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zheswapr "BLAS_FUNC(zheswapr)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2) nogil
+cdef void zheswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_zheswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetd2 "BLAS_FUNC(zhetd2)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tau, int *info) nogil
+cdef void zhetd2(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, int *info) noexcept nogil:
+    
+    _fortran_zhetd2(uplo, n, a, lda, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetf2 "BLAS_FUNC(zhetf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil
+cdef void zhetf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zhetf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetrd "BLAS_FUNC(zhetrd)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zhetrd(char *uplo, int *n, z *a, int *lda, d *d, d *e, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zhetrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetrf "BLAS_FUNC(zhetrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zhetrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zhetrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetri "BLAS_FUNC(zhetri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil
+cdef void zhetri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhetri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetri2 "BLAS_FUNC(zhetri2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zhetri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zhetri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetri2x "BLAS_FUNC(zhetri2x)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info) nogil
+cdef void zhetri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_zhetri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetrs "BLAS_FUNC(zhetrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zhetrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zhetrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhetrs2 "BLAS_FUNC(zhetrs2)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil
+cdef void zhetrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhetrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhfrk "BLAS_FUNC(zhfrk)"(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, npy_complex128 *a, int *lda, d *beta, npy_complex128 *c) nogil
+cdef void zhfrk(char *transr, char *uplo, char *trans, int *n, int *k, d *alpha, z *a, int *lda, d *beta, z *c) noexcept nogil:
+    
+    _fortran_zhfrk(transr, uplo, trans, n, k, alpha, a, lda, beta, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhgeqz "BLAS_FUNC(zhgeqz)"(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *t, int *ldt, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zhgeqz(char *job, char *compq, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *t, int *ldt, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhgeqz(job, compq, compz, n, ilo, ihi, h, ldh, t, ldt, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpcon "BLAS_FUNC(zhpcon)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil
+cdef void zhpcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhpcon(uplo, n, ap, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpev "BLAS_FUNC(zhpev)"(char *jobz, char *uplo, int *n, npy_complex128 *ap, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhpev(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhpev(jobz, uplo, n, ap, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpevd "BLAS_FUNC(zhpevd)"(char *jobz, char *uplo, int *n, npy_complex128 *ap, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zhpevd(char *jobz, char *uplo, int *n, z *ap, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zhpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpevx "BLAS_FUNC(zhpevx)"(char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zhpevx(char *jobz, char *range, char *uplo, int *n, z *ap, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zhpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpgst "BLAS_FUNC(zhpgst)"(int *itype, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, int *info) nogil
+cdef void zhpgst(int *itype, char *uplo, int *n, z *ap, z *bp, int *info) noexcept nogil:
+    
+    _fortran_zhpgst(itype, uplo, n, ap, bp, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpgv "BLAS_FUNC(zhpgv)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhpgv(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhpgv(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpgvd "BLAS_FUNC(zhpgvd)"(int *itype, char *jobz, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zhpgvd(int *itype, char *jobz, char *uplo, int *n, z *ap, z *bp, d *w, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zhpgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpgvx "BLAS_FUNC(zhpgvx)"(int *itype, char *jobz, char *range, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, npy_complex128 *work, d *rwork, int *iwork, int *ifail, int *info) nogil
+cdef void zhpgvx(int *itype, char *jobz, char *range, char *uplo, int *n, z *ap, z *bp, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, z *work, d *rwork, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zhpgvx(itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhprfs "BLAS_FUNC(zhprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpsv "BLAS_FUNC(zhpsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zhpsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zhpsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhpsvx "BLAS_FUNC(zhpsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zhpsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zhpsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhptrd "BLAS_FUNC(zhptrd)"(char *uplo, int *n, npy_complex128 *ap, d *d, d *e, npy_complex128 *tau, int *info) nogil
+cdef void zhptrd(char *uplo, int *n, z *ap, d *d, d *e, z *tau, int *info) noexcept nogil:
+    
+    _fortran_zhptrd(uplo, n, ap, d, e, tau, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhptrf "BLAS_FUNC(zhptrf)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info) nogil
+cdef void zhptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zhptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhptri "BLAS_FUNC(zhptri)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info) nogil
+cdef void zhptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil:
+    
+    _fortran_zhptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhptrs "BLAS_FUNC(zhptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zhptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zhptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhsein "BLAS_FUNC(zhsein)"(char *side, char *eigsrc, char *initv, bint *select, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *ifaill, int *ifailr, int *info) nogil
+cdef void zhsein(char *side, char *eigsrc, char *initv, bint *select, int *n, z *h, int *ldh, z *w, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *ifaill, int *ifailr, int *info) noexcept nogil:
+    
+    _fortran_zhsein(side, eigsrc, initv, select, n, h, ldh, w, vl, ldvl, vr, ldvr, mm, m, work, rwork, ifaill, ifailr, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zhseqr "BLAS_FUNC(zhseqr)"(char *job, char *compz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zhseqr(char *job, char *compz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zhseqr(job, compz, n, ilo, ihi, h, ldh, w, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlabrd "BLAS_FUNC(zlabrd)"(int *m, int *n, int *nb, npy_complex128 *a, int *lda, d *d, d *e, npy_complex128 *tauq, npy_complex128 *taup, npy_complex128 *x, int *ldx, npy_complex128 *y, int *ldy) nogil
+cdef void zlabrd(int *m, int *n, int *nb, z *a, int *lda, d *d, d *e, z *tauq, z *taup, z *x, int *ldx, z *y, int *ldy) noexcept nogil:
+    
+    _fortran_zlabrd(m, n, nb, a, lda, d, e, tauq, taup, x, ldx, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacgv "BLAS_FUNC(zlacgv)"(int *n, npy_complex128 *x, int *incx) nogil
+cdef void zlacgv(int *n, z *x, int *incx) noexcept nogil:
+    
+    _fortran_zlacgv(n, x, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacn2 "BLAS_FUNC(zlacn2)"(int *n, npy_complex128 *v, npy_complex128 *x, d *est, int *kase, int *isave) nogil
+cdef void zlacn2(int *n, z *v, z *x, d *est, int *kase, int *isave) noexcept nogil:
+    
+    _fortran_zlacn2(n, v, x, est, kase, isave)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacon "BLAS_FUNC(zlacon)"(int *n, npy_complex128 *v, npy_complex128 *x, d *est, int *kase) nogil
+cdef void zlacon(int *n, z *v, z *x, d *est, int *kase) noexcept nogil:
+    
+    _fortran_zlacon(n, v, x, est, kase)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacp2 "BLAS_FUNC(zlacp2)"(char *uplo, int *m, int *n, d *a, int *lda, npy_complex128 *b, int *ldb) nogil
+cdef void zlacp2(char *uplo, int *m, int *n, d *a, int *lda, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_zlacp2(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacpy "BLAS_FUNC(zlacpy)"(char *uplo, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb) nogil
+cdef void zlacpy(char *uplo, int *m, int *n, z *a, int *lda, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_zlacpy(uplo, m, n, a, lda, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacrm "BLAS_FUNC(zlacrm)"(int *m, int *n, npy_complex128 *a, int *lda, d *b, int *ldb, npy_complex128 *c, int *ldc, d *rwork) nogil
+cdef void zlacrm(int *m, int *n, z *a, int *lda, d *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil:
+    
+    _fortran_zlacrm(m, n, a, lda, b, ldb, c, ldc, rwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlacrt "BLAS_FUNC(zlacrt)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, npy_complex128 *c, npy_complex128 *s) nogil
+cdef void zlacrt(int *n, z *cx, int *incx, z *cy, int *incy, z *c, z *s) noexcept nogil:
+    
+    _fortran_zlacrt(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zladiv "F_FUNC(zladivwrp,ZLADIVWRP)"(npy_complex128 *out, npy_complex128 *x, npy_complex128 *y) nogil
+cdef z zladiv(z *x, z *y) noexcept nogil:
+    cdef z out
+    _fortran_zladiv(&out, x, y)
+    return out
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaed0 "BLAS_FUNC(zlaed0)"(int *qsiz, int *n, d *d, d *e, npy_complex128 *q, int *ldq, npy_complex128 *qstore, int *ldqs, d *rwork, int *iwork, int *info) nogil
+cdef void zlaed0(int *qsiz, int *n, d *d, d *e, z *q, int *ldq, z *qstore, int *ldqs, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zlaed0(qsiz, n, d, e, q, ldq, qstore, ldqs, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaed7 "BLAS_FUNC(zlaed7)"(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, npy_complex128 *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, npy_complex128 *work, d *rwork, int *iwork, int *info) nogil
+cdef void zlaed7(int *n, int *cutpnt, int *qsiz, int *tlvls, int *curlvl, int *curpbm, d *d, z *q, int *ldq, d *rho, int *indxq, d *qstore, int *qptr, int *prmptr, int *perm, int *givptr, int *givcol, d *givnum, z *work, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zlaed7(n, cutpnt, qsiz, tlvls, curlvl, curpbm, d, q, ldq, rho, indxq, qstore, qptr, prmptr, perm, givptr, givcol, givnum, work, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaed8 "BLAS_FUNC(zlaed8)"(int *k, int *n, int *qsiz, npy_complex128 *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, npy_complex128 *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) nogil
+cdef void zlaed8(int *k, int *n, int *qsiz, z *q, int *ldq, d *d, d *rho, int *cutpnt, d *z, d *dlamda, z *q2, int *ldq2, d *w, int *indxp, int *indx, int *indxq, int *perm, int *givptr, int *givcol, d *givnum, int *info) noexcept nogil:
+    
+    _fortran_zlaed8(k, n, qsiz, q, ldq, d, rho, cutpnt, z, dlamda, q2, ldq2, w, indxp, indx, indxq, perm, givptr, givcol, givnum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaein "BLAS_FUNC(zlaein)"(bint *rightv, bint *noinit, int *n, npy_complex128 *h, int *ldh, npy_complex128 *w, npy_complex128 *v, npy_complex128 *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) nogil
+cdef void zlaein(bint *rightv, bint *noinit, int *n, z *h, int *ldh, z *w, z *v, z *b, int *ldb, d *rwork, d *eps3, d *smlnum, int *info) noexcept nogil:
+    
+    _fortran_zlaein(rightv, noinit, n, h, ldh, w, v, b, ldb, rwork, eps3, smlnum, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaesy "BLAS_FUNC(zlaesy)"(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, npy_complex128 *rt1, npy_complex128 *rt2, npy_complex128 *evscal, npy_complex128 *cs1, npy_complex128 *sn1) nogil
+cdef void zlaesy(z *a, z *b, z *c, z *rt1, z *rt2, z *evscal, z *cs1, z *sn1) noexcept nogil:
+    
+    _fortran_zlaesy(a, b, c, rt1, rt2, evscal, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaev2 "BLAS_FUNC(zlaev2)"(npy_complex128 *a, npy_complex128 *b, npy_complex128 *c, d *rt1, d *rt2, d *cs1, npy_complex128 *sn1) nogil
+cdef void zlaev2(z *a, z *b, z *c, d *rt1, d *rt2, d *cs1, z *sn1) noexcept nogil:
+    
+    _fortran_zlaev2(a, b, c, rt1, rt2, cs1, sn1)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlag2c "BLAS_FUNC(zlag2c)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info) nogil
+cdef void zlag2c(int *m, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil:
+    
+    _fortran_zlag2c(m, n, a, lda, sa, ldsa, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlags2 "BLAS_FUNC(zlags2)"(bint *upper, d *a1, npy_complex128 *a2, d *a3, d *b1, npy_complex128 *b2, d *b3, d *csu, npy_complex128 *snu, d *csv, npy_complex128 *snv, d *csq, npy_complex128 *snq) nogil
+cdef void zlags2(bint *upper, d *a1, z *a2, d *a3, d *b1, z *b2, d *b3, d *csu, z *snu, d *csv, z *snv, d *csq, z *snq) noexcept nogil:
+    
+    _fortran_zlags2(upper, a1, a2, a3, b1, b2, b3, csu, snu, csv, snv, csq, snq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlagtm "BLAS_FUNC(zlagtm)"(char *trans, int *n, int *nrhs, d *alpha, npy_complex128 *dl, npy_complex128 *d, npy_complex128 *du, npy_complex128 *x, int *ldx, d *beta, npy_complex128 *b, int *ldb) nogil
+cdef void zlagtm(char *trans, int *n, int *nrhs, d *alpha, z *dl, z *d, z *du, z *x, int *ldx, d *beta, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_zlagtm(trans, n, nrhs, alpha, dl, d, du, x, ldx, beta, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlahef "BLAS_FUNC(zlahef)"(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info) nogil
+cdef void zlahef(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_zlahef(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlahqr "BLAS_FUNC(zlahqr)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *info) nogil
+cdef void zlahqr(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, int *info) noexcept nogil:
+    
+    _fortran_zlahqr(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlahr2 "BLAS_FUNC(zlahr2)"(int *n, int *k, int *nb, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *t, int *ldt, npy_complex128 *y, int *ldy) nogil
+cdef void zlahr2(int *n, int *k, int *nb, z *a, int *lda, z *tau, z *t, int *ldt, z *y, int *ldy) noexcept nogil:
+    
+    _fortran_zlahr2(n, k, nb, a, lda, tau, t, ldt, y, ldy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaic1 "BLAS_FUNC(zlaic1)"(int *job, int *j, npy_complex128 *x, d *sest, npy_complex128 *w, npy_complex128 *gamma, d *sestpr, npy_complex128 *s, npy_complex128 *c) nogil
+cdef void zlaic1(int *job, int *j, z *x, d *sest, z *w, z *gamma, d *sestpr, z *s, z *c) noexcept nogil:
+    
+    _fortran_zlaic1(job, j, x, sest, w, gamma, sestpr, s, c)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlals0 "BLAS_FUNC(zlals0)"(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) nogil
+cdef void zlals0(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, d *givnum, int *ldgnum, d *poles, d *difl, d *difr, d *z, int *k, d *c, d *s, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zlals0(icompq, nl, nr, sqre, nrhs, b, ldb, bx, ldbx, perm, givptr, givcol, ldgcol, givnum, ldgnum, poles, difl, difr, z, k, c, s, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlalsa "BLAS_FUNC(zlalsa)"(int *icompq, int *smlsiz, int *n, int *nrhs, npy_complex128 *b, int *ldb, npy_complex128 *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) nogil
+cdef void zlalsa(int *icompq, int *smlsiz, int *n, int *nrhs, z *b, int *ldb, z *bx, int *ldbx, d *u, int *ldu, d *vt, int *k, d *difl, d *difr, d *z, d *poles, int *givptr, int *givcol, int *ldgcol, int *perm, d *givnum, d *c, d *s, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zlalsa(icompq, smlsiz, n, nrhs, b, ldb, bx, ldbx, u, ldu, vt, k, difl, difr, z, poles, givptr, givcol, ldgcol, perm, givnum, c, s, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlalsd "BLAS_FUNC(zlalsd)"(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, npy_complex128 *b, int *ldb, d *rcond, int *rank, npy_complex128 *work, d *rwork, int *iwork, int *info) nogil
+cdef void zlalsd(char *uplo, int *smlsiz, int *n, int *nrhs, d *d, d *e, z *b, int *ldb, d *rcond, int *rank, z *work, d *rwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zlalsd(uplo, smlsiz, n, nrhs, d, e, b, ldb, rcond, rank, work, rwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlangb "BLAS_FUNC(zlangb)"(char *norm, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *work) nogil
+cdef d zlangb(char *norm, int *n, int *kl, int *ku, z *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_zlangb(norm, n, kl, ku, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlange "BLAS_FUNC(zlange)"(char *norm, int *m, int *n, npy_complex128 *a, int *lda, d *work) nogil
+cdef d zlange(char *norm, int *m, int *n, z *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_zlange(norm, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlangt "BLAS_FUNC(zlangt)"(char *norm, int *n, npy_complex128 *dl, npy_complex128 *d_, npy_complex128 *du) nogil
+cdef d zlangt(char *norm, int *n, z *dl, z *d_, z *du) noexcept nogil:
+    
+    return _fortran_zlangt(norm, n, dl, d_, du)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanhb "BLAS_FUNC(zlanhb)"(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil
+cdef d zlanhb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_zlanhb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanhe "BLAS_FUNC(zlanhe)"(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, d *work) nogil
+cdef d zlanhe(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_zlanhe(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanhf "BLAS_FUNC(zlanhf)"(char *norm, char *transr, char *uplo, int *n, npy_complex128 *a, d *work) nogil
+cdef d zlanhf(char *norm, char *transr, char *uplo, int *n, z *a, d *work) noexcept nogil:
+    
+    return _fortran_zlanhf(norm, transr, uplo, n, a, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanhp "BLAS_FUNC(zlanhp)"(char *norm, char *uplo, int *n, npy_complex128 *ap, d *work) nogil
+cdef d zlanhp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil:
+    
+    return _fortran_zlanhp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanhs "BLAS_FUNC(zlanhs)"(char *norm, int *n, npy_complex128 *a, int *lda, d *work) nogil
+cdef d zlanhs(char *norm, int *n, z *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_zlanhs(norm, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlanht "BLAS_FUNC(zlanht)"(char *norm, int *n, d *d_, npy_complex128 *e) nogil
+cdef d zlanht(char *norm, int *n, d *d_, z *e) noexcept nogil:
+    
+    return _fortran_zlanht(norm, n, d_, e)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlansb "BLAS_FUNC(zlansb)"(char *norm, char *uplo, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil
+cdef d zlansb(char *norm, char *uplo, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_zlansb(norm, uplo, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlansp "BLAS_FUNC(zlansp)"(char *norm, char *uplo, int *n, npy_complex128 *ap, d *work) nogil
+cdef d zlansp(char *norm, char *uplo, int *n, z *ap, d *work) noexcept nogil:
+    
+    return _fortran_zlansp(norm, uplo, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlansy "BLAS_FUNC(zlansy)"(char *norm, char *uplo, int *n, npy_complex128 *a, int *lda, d *work) nogil
+cdef d zlansy(char *norm, char *uplo, int *n, z *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_zlansy(norm, uplo, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlantb "BLAS_FUNC(zlantb)"(char *norm, char *uplo, char *diag, int *n, int *k, npy_complex128 *ab, int *ldab, d *work) nogil
+cdef d zlantb(char *norm, char *uplo, char *diag, int *n, int *k, z *ab, int *ldab, d *work) noexcept nogil:
+    
+    return _fortran_zlantb(norm, uplo, diag, n, k, ab, ldab, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlantp "BLAS_FUNC(zlantp)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, d *work) nogil
+cdef d zlantp(char *norm, char *uplo, char *diag, int *n, z *ap, d *work) noexcept nogil:
+    
+    return _fortran_zlantp(norm, uplo, diag, n, ap, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    d _fortran_zlantr "BLAS_FUNC(zlantr)"(char *norm, char *uplo, char *diag, int *m, int *n, npy_complex128 *a, int *lda, d *work) nogil
+cdef d zlantr(char *norm, char *uplo, char *diag, int *m, int *n, z *a, int *lda, d *work) noexcept nogil:
+    
+    return _fortran_zlantr(norm, uplo, diag, m, n, a, lda, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlapll "BLAS_FUNC(zlapll)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *ssmin) nogil
+cdef void zlapll(int *n, z *x, int *incx, z *y, int *incy, d *ssmin) noexcept nogil:
+    
+    _fortran_zlapll(n, x, incx, y, incy, ssmin)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlapmr "BLAS_FUNC(zlapmr)"(bint *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k) nogil
+cdef void zlapmr(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_zlapmr(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlapmt "BLAS_FUNC(zlapmt)"(bint *forwrd, int *m, int *n, npy_complex128 *x, int *ldx, int *k) nogil
+cdef void zlapmt(bint *forwrd, int *m, int *n, z *x, int *ldx, int *k) noexcept nogil:
+    
+    _fortran_zlapmt(forwrd, m, n, x, ldx, k)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqgb "BLAS_FUNC(zlaqgb)"(int *m, int *n, int *kl, int *ku, npy_complex128 *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil
+cdef void zlaqgb(int *m, int *n, int *kl, int *ku, z *ab, int *ldab, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqge "BLAS_FUNC(zlaqge)"(int *m, int *n, npy_complex128 *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) nogil
+cdef void zlaqge(int *m, int *n, z *a, int *lda, d *r, d *c, d *rowcnd, d *colcnd, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqge(m, n, a, lda, r, c, rowcnd, colcnd, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqhb "BLAS_FUNC(zlaqhb)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqhb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqhb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqhe "BLAS_FUNC(zlaqhe)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqhe(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqhe(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqhp "BLAS_FUNC(zlaqhp)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqhp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqhp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqp2 "BLAS_FUNC(zlaqp2)"(int *m, int *n, int *offset, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, d *vn1, d *vn2, npy_complex128 *work) nogil
+cdef void zlaqp2(int *m, int *n, int *offset, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *work) noexcept nogil:
+    
+    _fortran_zlaqp2(m, n, offset, a, lda, jpvt, tau, vn1, vn2, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqps "BLAS_FUNC(zlaqps)"(int *m, int *n, int *offset, int *nb, int *kb, npy_complex128 *a, int *lda, int *jpvt, npy_complex128 *tau, d *vn1, d *vn2, npy_complex128 *auxv, npy_complex128 *f, int *ldf) nogil
+cdef void zlaqps(int *m, int *n, int *offset, int *nb, int *kb, z *a, int *lda, int *jpvt, z *tau, d *vn1, d *vn2, z *auxv, z *f, int *ldf) noexcept nogil:
+    
+    _fortran_zlaqps(m, n, offset, nb, kb, a, lda, jpvt, tau, vn1, vn2, auxv, f, ldf)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr0 "BLAS_FUNC(zlaqr0)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zlaqr0(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zlaqr0(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr1 "BLAS_FUNC(zlaqr1)"(int *n, npy_complex128 *h, int *ldh, npy_complex128 *s1, npy_complex128 *s2, npy_complex128 *v) nogil
+cdef void zlaqr1(int *n, z *h, int *ldh, z *s1, z *s2, z *v) noexcept nogil:
+    
+    _fortran_zlaqr1(n, h, ldh, s1, s2, v)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr2 "BLAS_FUNC(zlaqr2)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork) nogil
+cdef void zlaqr2(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil:
+    
+    _fortran_zlaqr2(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr3 "BLAS_FUNC(zlaqr3)"(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, int *ns, int *nd, npy_complex128 *sh, npy_complex128 *v, int *ldv, int *nh, npy_complex128 *t, int *ldt, int *nv, npy_complex128 *wv, int *ldwv, npy_complex128 *work, int *lwork) nogil
+cdef void zlaqr3(bint *wantt, bint *wantz, int *n, int *ktop, int *kbot, int *nw, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, int *ns, int *nd, z *sh, z *v, int *ldv, int *nh, z *t, int *ldt, int *nv, z *wv, int *ldwv, z *work, int *lwork) noexcept nogil:
+    
+    _fortran_zlaqr3(wantt, wantz, n, ktop, kbot, nw, h, ldh, iloz, ihiz, z, ldz, ns, nd, sh, v, ldv, nh, t, ldt, nv, wv, ldwv, work, lwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr4 "BLAS_FUNC(zlaqr4)"(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, npy_complex128 *h, int *ldh, npy_complex128 *w, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zlaqr4(bint *wantt, bint *wantz, int *n, int *ilo, int *ihi, z *h, int *ldh, z *w, int *iloz, int *ihiz, z *z, int *ldz, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zlaqr4(wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqr5 "BLAS_FUNC(zlaqr5)"(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, npy_complex128 *s, npy_complex128 *h, int *ldh, int *iloz, int *ihiz, npy_complex128 *z, int *ldz, npy_complex128 *v, int *ldv, npy_complex128 *u, int *ldu, int *nv, npy_complex128 *wv, int *ldwv, int *nh, npy_complex128 *wh, int *ldwh) nogil
+cdef void zlaqr5(bint *wantt, bint *wantz, int *kacc22, int *n, int *ktop, int *kbot, int *nshfts, z *s, z *h, int *ldh, int *iloz, int *ihiz, z *z, int *ldz, z *v, int *ldv, z *u, int *ldu, int *nv, z *wv, int *ldwv, int *nh, z *wh, int *ldwh) noexcept nogil:
+    
+    _fortran_zlaqr5(wantt, wantz, kacc22, n, ktop, kbot, nshfts, s, h, ldh, iloz, ihiz, z, ldz, v, ldv, u, ldu, nv, wv, ldwv, nh, wh, ldwh)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqsb "BLAS_FUNC(zlaqsb)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqsb(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqsp "BLAS_FUNC(zlaqsp)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqsp(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqsp(uplo, n, ap, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaqsy "BLAS_FUNC(zlaqsy)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, char *equed) nogil
+cdef void zlaqsy(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, char *equed) noexcept nogil:
+    
+    _fortran_zlaqsy(uplo, n, a, lda, s, scond, amax, equed)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlar1v "BLAS_FUNC(zlar1v)"(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, npy_complex128 *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) nogil
+cdef void zlar1v(int *n, int *b1, int *bn, d *lambda_, d *d, d *l, d *ld, d *lld, d *pivmin, d *gaptol, z *z, bint *wantnc, int *negcnt, d *ztz, d *mingma, int *r, int *isuppz, d *nrminv, d *resid, d *rqcorr, d *work) noexcept nogil:
+    
+    _fortran_zlar1v(n, b1, bn, lambda_, d, l, ld, lld, pivmin, gaptol, z, wantnc, negcnt, ztz, mingma, r, isuppz, nrminv, resid, rqcorr, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlar2v "BLAS_FUNC(zlar2v)"(int *n, npy_complex128 *x, npy_complex128 *y, npy_complex128 *z, int *incx, d *c, npy_complex128 *s, int *incc) nogil
+cdef void zlar2v(int *n, z *x, z *y, z *z, int *incx, d *c, z *s, int *incc) noexcept nogil:
+    
+    _fortran_zlar2v(n, x, y, z, incx, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarcm "BLAS_FUNC(zlarcm)"(int *m, int *n, d *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, d *rwork) nogil
+cdef void zlarcm(int *m, int *n, d *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *rwork) noexcept nogil:
+    
+    _fortran_zlarcm(m, n, a, lda, b, ldb, c, ldc, rwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarf "BLAS_FUNC(zlarf)"(char *side, int *m, int *n, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil
+cdef void zlarf(char *side, int *m, int *n, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil:
+    
+    _fortran_zlarf(side, m, n, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarfb "BLAS_FUNC(zlarfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork) nogil
+cdef void zlarfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil:
+    
+    _fortran_zlarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarfg "BLAS_FUNC(zlarfg)"(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau) nogil
+cdef void zlarfg(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil:
+    
+    _fortran_zlarfg(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarfgp "BLAS_FUNC(zlarfgp)"(int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *tau) nogil
+cdef void zlarfgp(int *n, z *alpha, z *x, int *incx, z *tau) noexcept nogil:
+    
+    _fortran_zlarfgp(n, alpha, x, incx, tau)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarft "BLAS_FUNC(zlarft)"(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt) nogil
+cdef void zlarft(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil:
+    
+    _fortran_zlarft(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarfx "BLAS_FUNC(zlarfx)"(char *side, int *m, int *n, npy_complex128 *v, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil
+cdef void zlarfx(char *side, int *m, int *n, z *v, z *tau, z *c, int *ldc, z *work) noexcept nogil:
+    
+    _fortran_zlarfx(side, m, n, v, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlargv "BLAS_FUNC(zlargv)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *c, int *incc) nogil
+cdef void zlargv(int *n, z *x, int *incx, z *y, int *incy, d *c, int *incc) noexcept nogil:
+    
+    _fortran_zlargv(n, x, incx, y, incy, c, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarnv "BLAS_FUNC(zlarnv)"(int *idist, int *iseed, int *n, npy_complex128 *x) nogil
+cdef void zlarnv(int *idist, int *iseed, int *n, z *x) noexcept nogil:
+    
+    _fortran_zlarnv(idist, iseed, n, x)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarrv "BLAS_FUNC(zlarrv)"(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, npy_complex128 *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) nogil
+cdef void zlarrv(int *n, d *vl, d *vu, d *d, d *l, d *pivmin, int *isplit, int *m, int *dol, int *dou, d *minrgp, d *rtol1, d *rtol2, d *w, d *werr, d *wgap, int *iblock, int *indexw, d *gers, z *z, int *ldz, int *isuppz, d *work, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zlarrv(n, vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, z, ldz, isuppz, work, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlartg "BLAS_FUNC(zlartg)"(npy_complex128 *f, npy_complex128 *g, d *cs, npy_complex128 *sn, npy_complex128 *r) nogil
+cdef void zlartg(z *f, z *g, d *cs, z *sn, z *r) noexcept nogil:
+    
+    _fortran_zlartg(f, g, cs, sn, r)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlartv "BLAS_FUNC(zlartv)"(int *n, npy_complex128 *x, int *incx, npy_complex128 *y, int *incy, d *c, npy_complex128 *s, int *incc) nogil
+cdef void zlartv(int *n, z *x, int *incx, z *y, int *incy, d *c, z *s, int *incc) noexcept nogil:
+    
+    _fortran_zlartv(n, x, incx, y, incy, c, s, incc)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarz "BLAS_FUNC(zlarz)"(char *side, int *m, int *n, int *l, npy_complex128 *v, int *incv, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work) nogil
+cdef void zlarz(char *side, int *m, int *n, int *l, z *v, int *incv, z *tau, z *c, int *ldc, z *work) noexcept nogil:
+    
+    _fortran_zlarz(side, m, n, l, v, incv, tau, c, ldc, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarzb "BLAS_FUNC(zlarzb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *c, int *ldc, npy_complex128 *work, int *ldwork) nogil
+cdef void zlarzb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *c, int *ldc, z *work, int *ldwork) noexcept nogil:
+    
+    _fortran_zlarzb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, c, ldc, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlarzt "BLAS_FUNC(zlarzt)"(char *direct, char *storev, int *n, int *k, npy_complex128 *v, int *ldv, npy_complex128 *tau, npy_complex128 *t, int *ldt) nogil
+cdef void zlarzt(char *direct, char *storev, int *n, int *k, z *v, int *ldv, z *tau, z *t, int *ldt) noexcept nogil:
+    
+    _fortran_zlarzt(direct, storev, n, k, v, ldv, tau, t, ldt)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlascl "BLAS_FUNC(zlascl)"(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zlascl(char *type_bn, int *kl, int *ku, d *cfrom, d *cto, int *m, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zlascl(type_bn, kl, ku, cfrom, cto, m, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaset "BLAS_FUNC(zlaset)"(char *uplo, int *m, int *n, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *a, int *lda) nogil
+cdef void zlaset(char *uplo, int *m, int *n, z *alpha, z *beta, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zlaset(uplo, m, n, alpha, beta, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlasr "BLAS_FUNC(zlasr)"(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, npy_complex128 *a, int *lda) nogil
+cdef void zlasr(char *side, char *pivot, char *direct, int *m, int *n, d *c, d *s, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zlasr(side, pivot, direct, m, n, c, s, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlassq "BLAS_FUNC(zlassq)"(int *n, npy_complex128 *x, int *incx, d *scale, d *sumsq) nogil
+cdef void zlassq(int *n, z *x, int *incx, d *scale, d *sumsq) noexcept nogil:
+    
+    _fortran_zlassq(n, x, incx, scale, sumsq)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlaswp "BLAS_FUNC(zlaswp)"(int *n, npy_complex128 *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) nogil
+cdef void zlaswp(int *n, z *a, int *lda, int *k1, int *k2, int *ipiv, int *incx) noexcept nogil:
+    
+    _fortran_zlaswp(n, a, lda, k1, k2, ipiv, incx)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlasyf "BLAS_FUNC(zlasyf)"(char *uplo, int *n, int *nb, int *kb, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *w, int *ldw, int *info) nogil
+cdef void zlasyf(char *uplo, int *n, int *nb, int *kb, z *a, int *lda, int *ipiv, z *w, int *ldw, int *info) noexcept nogil:
+    
+    _fortran_zlasyf(uplo, n, nb, kb, a, lda, ipiv, w, ldw, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlat2c "BLAS_FUNC(zlat2c)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex64 *sa, int *ldsa, int *info) nogil
+cdef void zlat2c(char *uplo, int *n, z *a, int *lda, c *sa, int *ldsa, int *info) noexcept nogil:
+    
+    _fortran_zlat2c(uplo, n, a, lda, sa, ldsa, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatbs "BLAS_FUNC(zlatbs)"(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, npy_complex128 *ab, int *ldab, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil
+cdef void zlatbs(char *uplo, char *trans, char *diag, char *normin, int *n, int *kd, z *ab, int *ldab, z *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_zlatbs(uplo, trans, diag, normin, n, kd, ab, ldab, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatdf "BLAS_FUNC(zlatdf)"(int *ijob, int *n, npy_complex128 *z, int *ldz, npy_complex128 *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) nogil
+cdef void zlatdf(int *ijob, int *n, z *z, int *ldz, z *rhs, d *rdsum, d *rdscal, int *ipiv, int *jpiv) noexcept nogil:
+    
+    _fortran_zlatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatps "BLAS_FUNC(zlatps)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *ap, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil
+cdef void zlatps(char *uplo, char *trans, char *diag, char *normin, int *n, z *ap, z *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_zlatps(uplo, trans, diag, normin, n, ap, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatrd "BLAS_FUNC(zlatrd)"(char *uplo, int *n, int *nb, npy_complex128 *a, int *lda, d *e, npy_complex128 *tau, npy_complex128 *w, int *ldw) nogil
+cdef void zlatrd(char *uplo, int *n, int *nb, z *a, int *lda, d *e, z *tau, z *w, int *ldw) noexcept nogil:
+    
+    _fortran_zlatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatrs "BLAS_FUNC(zlatrs)"(char *uplo, char *trans, char *diag, char *normin, int *n, npy_complex128 *a, int *lda, npy_complex128 *x, d *scale, d *cnorm, int *info) nogil
+cdef void zlatrs(char *uplo, char *trans, char *diag, char *normin, int *n, z *a, int *lda, z *x, d *scale, d *cnorm, int *info) noexcept nogil:
+    
+    _fortran_zlatrs(uplo, trans, diag, normin, n, a, lda, x, scale, cnorm, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlatrz "BLAS_FUNC(zlatrz)"(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work) nogil
+cdef void zlatrz(int *m, int *n, int *l, z *a, int *lda, z *tau, z *work) noexcept nogil:
+    
+    _fortran_zlatrz(m, n, l, a, lda, tau, work)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlauu2 "BLAS_FUNC(zlauu2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zlauu2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zlauu2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zlauum "BLAS_FUNC(zlauum)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zlauum(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zlauum(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbcon "BLAS_FUNC(zpbcon)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zpbcon(char *uplo, int *n, int *kd, z *ab, int *ldab, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zpbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbequ "BLAS_FUNC(zpbequ)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, d *s, d *scond, d *amax, int *info) nogil
+cdef void zpbequ(char *uplo, int *n, int *kd, z *ab, int *ldab, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zpbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbrfs "BLAS_FUNC(zpbrfs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zpbrfs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbstf "BLAS_FUNC(zpbstf)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil
+cdef void zpbstf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_zpbstf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbsv "BLAS_FUNC(zpbsv)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpbsv(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpbsv(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbsvx "BLAS_FUNC(zpbsvx)"(char *fact, char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *afb, int *ldafb, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zpbsvx(char *fact, char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *afb, int *ldafb, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbtf2 "BLAS_FUNC(zpbtf2)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil
+cdef void zpbtf2(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_zpbtf2(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbtrf "BLAS_FUNC(zpbtrf)"(char *uplo, int *n, int *kd, npy_complex128 *ab, int *ldab, int *info) nogil
+cdef void zpbtrf(char *uplo, int *n, int *kd, z *ab, int *ldab, int *info) noexcept nogil:
+    
+    _fortran_zpbtrf(uplo, n, kd, ab, ldab, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpbtrs "BLAS_FUNC(zpbtrs)"(char *uplo, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpbtrs(char *uplo, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpftrf "BLAS_FUNC(zpftrf)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *info) nogil
+cdef void zpftrf(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil:
+    
+    _fortran_zpftrf(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpftri "BLAS_FUNC(zpftri)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *info) nogil
+cdef void zpftri(char *transr, char *uplo, int *n, z *a, int *info) noexcept nogil:
+    
+    _fortran_zpftri(transr, uplo, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpftrs "BLAS_FUNC(zpftrs)"(char *transr, char *uplo, int *n, int *nrhs, npy_complex128 *a, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpftrs(char *transr, char *uplo, int *n, int *nrhs, z *a, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpftrs(transr, uplo, n, nrhs, a, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpocon "BLAS_FUNC(zpocon)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zpocon(char *uplo, int *n, z *a, int *lda, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpoequ "BLAS_FUNC(zpoequ)"(int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, int *info) nogil
+cdef void zpoequ(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zpoequ(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpoequb "BLAS_FUNC(zpoequb)"(int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, int *info) nogil
+cdef void zpoequb(int *n, z *a, int *lda, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zpoequb(n, a, lda, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zporfs "BLAS_FUNC(zporfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zporfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zposv "BLAS_FUNC(zposv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zposv(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zposv(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zposvx "BLAS_FUNC(zposvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zposvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpotf2 "BLAS_FUNC(zpotf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zpotf2(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zpotf2(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpotrf "BLAS_FUNC(zpotrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zpotrf(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zpotrf(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpotri "BLAS_FUNC(zpotri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void zpotri(char *uplo, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_zpotri(uplo, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpotrs "BLAS_FUNC(zpotrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpotrs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zppcon "BLAS_FUNC(zppcon)"(char *uplo, int *n, npy_complex128 *ap, d *anorm, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zppcon(char *uplo, int *n, z *ap, d *anorm, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zppequ "BLAS_FUNC(zppequ)"(char *uplo, int *n, npy_complex128 *ap, d *s, d *scond, d *amax, int *info) nogil
+cdef void zppequ(char *uplo, int *n, z *ap, d *s, d *scond, d *amax, int *info) noexcept nogil:
+    
+    _fortran_zppequ(uplo, n, ap, s, scond, amax, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpprfs "BLAS_FUNC(zpprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zpprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zppsv "BLAS_FUNC(zppsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zppsv(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zppsv(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zppsvx "BLAS_FUNC(zppsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, char *equed, d *s, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zppsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, char *equed, d *s, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpptrf "BLAS_FUNC(zpptrf)"(char *uplo, int *n, npy_complex128 *ap, int *info) nogil
+cdef void zpptrf(char *uplo, int *n, z *ap, int *info) noexcept nogil:
+    
+    _fortran_zpptrf(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpptri "BLAS_FUNC(zpptri)"(char *uplo, int *n, npy_complex128 *ap, int *info) nogil
+cdef void zpptri(char *uplo, int *n, z *ap, int *info) noexcept nogil:
+    
+    _fortran_zpptri(uplo, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpptrs "BLAS_FUNC(zpptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpptrs(char *uplo, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpptrs(uplo, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpstf2 "BLAS_FUNC(zpstf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil
+cdef void zpstf2(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil:
+    
+    _fortran_zpstf2(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpstrf "BLAS_FUNC(zpstrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) nogil
+cdef void zpstrf(char *uplo, int *n, z *a, int *lda, int *piv, int *rank, d *tol, d *work, int *info) noexcept nogil:
+    
+    _fortran_zpstrf(uplo, n, a, lda, piv, rank, tol, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zptcon "BLAS_FUNC(zptcon)"(int *n, d *d, npy_complex128 *e, d *anorm, d *rcond, d *rwork, int *info) nogil
+cdef void zptcon(int *n, d *d, z *e, d *anorm, d *rcond, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zptcon(n, d, e, anorm, rcond, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpteqr "BLAS_FUNC(zpteqr)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, d *work, int *info) nogil
+cdef void zpteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_zpteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zptrfs "BLAS_FUNC(zptrfs)"(char *uplo, int *n, int *nrhs, d *d, npy_complex128 *e, d *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zptrfs(char *uplo, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zptrfs(uplo, n, nrhs, d, e, df, ef, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zptsv "BLAS_FUNC(zptsv)"(int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zptsv(int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zptsv(n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zptsvx "BLAS_FUNC(zptsvx)"(char *fact, int *n, int *nrhs, d *d, npy_complex128 *e, d *df, npy_complex128 *ef, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zptsvx(char *fact, int *n, int *nrhs, d *d, z *e, d *df, z *ef, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zptsvx(fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpttrf "BLAS_FUNC(zpttrf)"(int *n, d *d, npy_complex128 *e, int *info) nogil
+cdef void zpttrf(int *n, d *d, z *e, int *info) noexcept nogil:
+    
+    _fortran_zpttrf(n, d, e, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zpttrs "BLAS_FUNC(zpttrs)"(char *uplo, int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zpttrs(char *uplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zpttrs(uplo, n, nrhs, d, e, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zptts2 "BLAS_FUNC(zptts2)"(int *iuplo, int *n, int *nrhs, d *d, npy_complex128 *e, npy_complex128 *b, int *ldb) nogil
+cdef void zptts2(int *iuplo, int *n, int *nrhs, d *d, z *e, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_zptts2(iuplo, n, nrhs, d, e, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zrot "BLAS_FUNC(zrot)"(int *n, npy_complex128 *cx, int *incx, npy_complex128 *cy, int *incy, d *c, npy_complex128 *s) nogil
+cdef void zrot(int *n, z *cx, int *incx, z *cy, int *incy, d *c, z *s) noexcept nogil:
+    
+    _fortran_zrot(n, cx, incx, cy, incy, c, s)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zspcon "BLAS_FUNC(zspcon)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil
+cdef void zspcon(char *uplo, int *n, z *ap, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil:
+    
+    _fortran_zspcon(uplo, n, ap, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zspmv "BLAS_FUNC(zspmv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *ap, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zspmv(char *uplo, int *n, z *alpha, z *ap, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zspr "BLAS_FUNC(zspr)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *ap) nogil
+cdef void zspr(char *uplo, int *n, z *alpha, z *x, int *incx, z *ap) noexcept nogil:
+    
+    _fortran_zspr(uplo, n, alpha, x, incx, ap)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsprfs "BLAS_FUNC(zsprfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zsprfs(char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zsprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zspsv "BLAS_FUNC(zspsv)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zspsv(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zspsv(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zspsvx "BLAS_FUNC(zspsvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *afp, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zspsvx(char *fact, char *uplo, int *n, int *nrhs, z *ap, z *afp, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zspsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsptrf "BLAS_FUNC(zsptrf)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, int *info) nogil
+cdef void zsptrf(char *uplo, int *n, z *ap, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zsptrf(uplo, n, ap, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsptri "BLAS_FUNC(zsptri)"(char *uplo, int *n, npy_complex128 *ap, int *ipiv, npy_complex128 *work, int *info) nogil
+cdef void zsptri(char *uplo, int *n, z *ap, int *ipiv, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsptri(uplo, n, ap, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsptrs "BLAS_FUNC(zsptrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *ap, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zsptrs(char *uplo, int *n, int *nrhs, z *ap, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zsptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zstedc "BLAS_FUNC(zstedc)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) nogil
+cdef void zstedc(char *compz, int *n, d *d, d *e, z *z, int *ldz, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zstedc(compz, n, d, e, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zstegr "BLAS_FUNC(zstegr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, npy_complex128 *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void zstegr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, d *abstol, int *m, d *w, z *z, int *ldz, int *isuppz, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zstegr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zstein "BLAS_FUNC(zstein)"(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, npy_complex128 *z, int *ldz, d *work, int *iwork, int *ifail, int *info) nogil
+cdef void zstein(int *n, d *d, d *e, int *m, d *w, int *iblock, int *isplit, z *z, int *ldz, d *work, int *iwork, int *ifail, int *info) noexcept nogil:
+    
+    _fortran_zstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zstemr "BLAS_FUNC(zstemr)"(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, npy_complex128 *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void zstemr(char *jobz, char *range, int *n, d *d, d *e, d *vl, d *vu, int *il, int *iu, int *m, d *w, z *z, int *ldz, int *nzc, int *isuppz, bint *tryrac, d *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_zstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsteqr "BLAS_FUNC(zsteqr)"(char *compz, int *n, d *d, d *e, npy_complex128 *z, int *ldz, d *work, int *info) nogil
+cdef void zsteqr(char *compz, int *n, d *d, d *e, z *z, int *ldz, d *work, int *info) noexcept nogil:
+    
+    _fortran_zsteqr(compz, n, d, e, z, ldz, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsycon "BLAS_FUNC(zsycon)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, d *anorm, d *rcond, npy_complex128 *work, int *info) nogil
+cdef void zsycon(char *uplo, int *n, z *a, int *lda, int *ipiv, d *anorm, d *rcond, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsyconv "BLAS_FUNC(zsyconv)"(char *uplo, char *way, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil
+cdef void zsyconv(char *uplo, char *way, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsyconv(uplo, way, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsyequb "BLAS_FUNC(zsyequb)"(char *uplo, int *n, npy_complex128 *a, int *lda, d *s, d *scond, d *amax, npy_complex128 *work, int *info) nogil
+cdef void zsyequb(char *uplo, int *n, z *a, int *lda, d *s, d *scond, d *amax, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsyequb(uplo, n, a, lda, s, scond, amax, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsymv "BLAS_FUNC(zsymv)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *a, int *lda, npy_complex128 *x, int *incx, npy_complex128 *beta, npy_complex128 *y, int *incy) nogil
+cdef void zsymv(char *uplo, int *n, z *alpha, z *a, int *lda, z *x, int *incx, z *beta, z *y, int *incy) noexcept nogil:
+    
+    _fortran_zsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsyr "BLAS_FUNC(zsyr)"(char *uplo, int *n, npy_complex128 *alpha, npy_complex128 *x, int *incx, npy_complex128 *a, int *lda) nogil
+cdef void zsyr(char *uplo, int *n, z *alpha, z *x, int *incx, z *a, int *lda) noexcept nogil:
+    
+    _fortran_zsyr(uplo, n, alpha, x, incx, a, lda)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsyrfs "BLAS_FUNC(zsyrfs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void zsyrfs(char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsysv "BLAS_FUNC(zsysv)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zsysv(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zsysv(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsysvx "BLAS_FUNC(zsysvx)"(char *fact, char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *af, int *ldaf, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *rcond, d *ferr, d *berr, npy_complex128 *work, int *lwork, d *rwork, int *info) nogil
+cdef void zsysvx(char *fact, char *uplo, int *n, int *nrhs, z *a, int *lda, z *af, int *ldaf, int *ipiv, z *b, int *ldb, z *x, int *ldx, d *rcond, d *ferr, d *berr, z *work, int *lwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_zsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsyswapr "BLAS_FUNC(zsyswapr)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *i1, int *i2) nogil
+cdef void zsyswapr(char *uplo, int *n, z *a, int *lda, int *i1, int *i2) noexcept nogil:
+    
+    _fortran_zsyswapr(uplo, n, a, lda, i1, i2)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytf2 "BLAS_FUNC(zsytf2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, int *info) nogil
+cdef void zsytf2(char *uplo, int *n, z *a, int *lda, int *ipiv, int *info) noexcept nogil:
+    
+    _fortran_zsytf2(uplo, n, a, lda, ipiv, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytrf "BLAS_FUNC(zsytrf)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zsytrf(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zsytrf(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytri "BLAS_FUNC(zsytri)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *info) nogil
+cdef void zsytri(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsytri(uplo, n, a, lda, ipiv, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytri2 "BLAS_FUNC(zsytri2)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zsytri2(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zsytri2(uplo, n, a, lda, ipiv, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytri2x "BLAS_FUNC(zsytri2x)"(char *uplo, int *n, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *work, int *nb, int *info) nogil
+cdef void zsytri2x(char *uplo, int *n, z *a, int *lda, int *ipiv, z *work, int *nb, int *info) noexcept nogil:
+    
+    _fortran_zsytri2x(uplo, n, a, lda, ipiv, work, nb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytrs "BLAS_FUNC(zsytrs)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void zsytrs(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_zsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zsytrs2 "BLAS_FUNC(zsytrs2)"(char *uplo, int *n, int *nrhs, npy_complex128 *a, int *lda, int *ipiv, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil
+cdef void zsytrs2(char *uplo, int *n, int *nrhs, z *a, int *lda, int *ipiv, z *b, int *ldb, z *work, int *info) noexcept nogil:
+    
+    _fortran_zsytrs2(uplo, n, nrhs, a, lda, ipiv, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztbcon "BLAS_FUNC(ztbcon)"(char *norm, char *uplo, char *diag, int *n, int *kd, npy_complex128 *ab, int *ldab, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztbcon(char *norm, char *uplo, char *diag, int *n, int *kd, z *ab, int *ldab, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztbcon(norm, uplo, diag, n, kd, ab, ldab, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztbrfs "BLAS_FUNC(ztbrfs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztbrfs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztbrfs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztbtrs "BLAS_FUNC(ztbtrs)"(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, npy_complex128 *ab, int *ldab, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void ztbtrs(char *uplo, char *trans, char *diag, int *n, int *kd, int *nrhs, z *ab, int *ldab, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ztbtrs(uplo, trans, diag, n, kd, nrhs, ab, ldab, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztfsm "BLAS_FUNC(ztfsm)"(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, npy_complex128 *alpha, npy_complex128 *a, npy_complex128 *b, int *ldb) nogil
+cdef void ztfsm(char *transr, char *side, char *uplo, char *trans, char *diag, int *m, int *n, z *alpha, z *a, z *b, int *ldb) noexcept nogil:
+    
+    _fortran_ztfsm(transr, side, uplo, trans, diag, m, n, alpha, a, b, ldb)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztftri "BLAS_FUNC(ztftri)"(char *transr, char *uplo, char *diag, int *n, npy_complex128 *a, int *info) nogil
+cdef void ztftri(char *transr, char *uplo, char *diag, int *n, z *a, int *info) noexcept nogil:
+    
+    _fortran_ztftri(transr, uplo, diag, n, a, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztfttp "BLAS_FUNC(ztfttp)"(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *ap, int *info) nogil
+cdef void ztfttp(char *transr, char *uplo, int *n, z *arf, z *ap, int *info) noexcept nogil:
+    
+    _fortran_ztfttp(transr, uplo, n, arf, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztfttr "BLAS_FUNC(ztfttr)"(char *transr, char *uplo, int *n, npy_complex128 *arf, npy_complex128 *a, int *lda, int *info) nogil
+cdef void ztfttr(char *transr, char *uplo, int *n, z *arf, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ztfttr(transr, uplo, n, arf, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgevc "BLAS_FUNC(ztgevc)"(char *side, char *howmny, bint *select, int *n, npy_complex128 *s, int *lds, npy_complex128 *p, int *ldp, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztgevc(char *side, char *howmny, bint *select, int *n, z *s, int *lds, z *p, int *ldp, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztgevc(side, howmny, select, n, s, lds, p, ldp, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgex2 "BLAS_FUNC(ztgex2)"(bint *wantq, bint *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *j1, int *info) nogil
+cdef void ztgex2(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *j1, int *info) noexcept nogil:
+    
+    _fortran_ztgex2(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, j1, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgexc "BLAS_FUNC(ztgexc)"(bint *wantq, bint *wantz, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *ifst, int *ilst, int *info) nogil
+cdef void ztgexc(bint *wantq, bint *wantz, int *n, z *a, int *lda, z *b, int *ldb, z *q, int *ldq, z *z, int *ldz, int *ifst, int *ilst, int *info) noexcept nogil:
+    
+    _fortran_ztgexc(wantq, wantz, n, a, lda, b, ldb, q, ldq, z, ldz, ifst, ilst, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgsen "BLAS_FUNC(ztgsen)"(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *alpha, npy_complex128 *beta, npy_complex128 *q, int *ldq, npy_complex128 *z, int *ldz, int *m, d *pl, d *pr, d *dif, npy_complex128 *work, int *lwork, int *iwork, int *liwork, int *info) nogil
+cdef void ztgsen(int *ijob, bint *wantq, bint *wantz, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *alpha, z *beta, z *q, int *ldq, z *z, int *ldz, int *m, d *pl, d *pr, d *dif, z *work, int *lwork, int *iwork, int *liwork, int *info) noexcept nogil:
+    
+    _fortran_ztgsen(ijob, wantq, wantz, select, n, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, m, pl, pr, dif, work, lwork, iwork, liwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgsja "BLAS_FUNC(ztgsja)"(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, npy_complex128 *u, int *ldu, npy_complex128 *v, int *ldv, npy_complex128 *q, int *ldq, npy_complex128 *work, int *ncycle, int *info) nogil
+cdef void ztgsja(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, int *k, int *l, z *a, int *lda, z *b, int *ldb, d *tola, d *tolb, d *alpha, d *beta, z *u, int *ldu, z *v, int *ldv, z *q, int *ldq, z *work, int *ncycle, int *info) noexcept nogil:
+    
+    _fortran_ztgsja(jobu, jobv, jobq, m, p, n, k, l, a, lda, b, ldb, tola, tolb, alpha, beta, u, ldu, v, ldv, q, ldq, work, ncycle, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgsna "BLAS_FUNC(ztgsna)"(char *job, char *howmny, bint *select, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, d *s, d *dif, int *mm, int *m, npy_complex128 *work, int *lwork, int *iwork, int *info) nogil
+cdef void ztgsna(char *job, char *howmny, bint *select, int *n, z *a, int *lda, z *b, int *ldb, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *dif, int *mm, int *m, z *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ztgsna(job, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, s, dif, mm, m, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgsy2 "BLAS_FUNC(ztgsy2)"(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) nogil
+cdef void ztgsy2(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *rdsum, d *rdscal, int *info) noexcept nogil:
+    
+    _fortran_ztgsy2(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, rdsum, rdscal, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztgsyl "BLAS_FUNC(ztgsyl)"(char *trans, int *ijob, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, npy_complex128 *d, int *ldd, npy_complex128 *e, int *lde, npy_complex128 *f, int *ldf, d *scale, d *dif, npy_complex128 *work, int *lwork, int *iwork, int *info) nogil
+cdef void ztgsyl(char *trans, int *ijob, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, z *d, int *ldd, z *e, int *lde, z *f, int *ldf, d *scale, d *dif, z *work, int *lwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_ztgsyl(trans, ijob, m, n, a, lda, b, ldb, c, ldc, d, ldd, e, lde, f, ldf, scale, dif, work, lwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpcon "BLAS_FUNC(ztpcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *ap, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztpcon(char *norm, char *uplo, char *diag, int *n, z *ap, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztpcon(norm, uplo, diag, n, ap, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpmqrt "BLAS_FUNC(ztpmqrt)"(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *info) nogil
+cdef void ztpmqrt(char *side, char *trans, int *m, int *n, int *k, int *l, int *nb, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *info) noexcept nogil:
+    
+    _fortran_ztpmqrt(side, trans, m, n, k, l, nb, v, ldv, t, ldt, a, lda, b, ldb, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpqrt "BLAS_FUNC(ztpqrt)"(int *m, int *n, int *l, int *nb, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, npy_complex128 *work, int *info) nogil
+cdef void ztpqrt(int *m, int *n, int *l, int *nb, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, z *work, int *info) noexcept nogil:
+    
+    _fortran_ztpqrt(m, n, l, nb, a, lda, b, ldb, t, ldt, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpqrt2 "BLAS_FUNC(ztpqrt2)"(int *m, int *n, int *l, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *t, int *ldt, int *info) nogil
+cdef void ztpqrt2(int *m, int *n, int *l, z *a, int *lda, z *b, int *ldb, z *t, int *ldt, int *info) noexcept nogil:
+    
+    _fortran_ztpqrt2(m, n, l, a, lda, b, ldb, t, ldt, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztprfb "BLAS_FUNC(ztprfb)"(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, npy_complex128 *v, int *ldv, npy_complex128 *t, int *ldt, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *work, int *ldwork) nogil
+cdef void ztprfb(char *side, char *trans, char *direct, char *storev, int *m, int *n, int *k, int *l, z *v, int *ldv, z *t, int *ldt, z *a, int *lda, z *b, int *ldb, z *work, int *ldwork) noexcept nogil:
+    
+    _fortran_ztprfb(side, trans, direct, storev, m, n, k, l, v, ldv, t, ldt, a, lda, b, ldb, work, ldwork)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztprfs "BLAS_FUNC(ztprfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztprfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztprfs(uplo, trans, diag, n, nrhs, ap, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztptri "BLAS_FUNC(ztptri)"(char *uplo, char *diag, int *n, npy_complex128 *ap, int *info) nogil
+cdef void ztptri(char *uplo, char *diag, int *n, z *ap, int *info) noexcept nogil:
+    
+    _fortran_ztptri(uplo, diag, n, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztptrs "BLAS_FUNC(ztptrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *ap, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void ztptrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *ap, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ztptrs(uplo, trans, diag, n, nrhs, ap, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpttf "BLAS_FUNC(ztpttf)"(char *transr, char *uplo, int *n, npy_complex128 *ap, npy_complex128 *arf, int *info) nogil
+cdef void ztpttf(char *transr, char *uplo, int *n, z *ap, z *arf, int *info) noexcept nogil:
+    
+    _fortran_ztpttf(transr, uplo, n, ap, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztpttr "BLAS_FUNC(ztpttr)"(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *a, int *lda, int *info) nogil
+cdef void ztpttr(char *uplo, int *n, z *ap, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ztpttr(uplo, n, ap, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrcon "BLAS_FUNC(ztrcon)"(char *norm, char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, d *rcond, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztrcon(char *norm, char *uplo, char *diag, int *n, z *a, int *lda, d *rcond, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztrcon(norm, uplo, diag, n, a, lda, rcond, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrevc "BLAS_FUNC(ztrevc)"(char *side, char *howmny, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, int *mm, int *m, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztrevc(char *side, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, int *mm, int *m, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztrevc(side, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrexc "BLAS_FUNC(ztrexc)"(char *compq, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, int *ifst, int *ilst, int *info) nogil
+cdef void ztrexc(char *compq, int *n, z *t, int *ldt, z *q, int *ldq, int *ifst, int *ilst, int *info) noexcept nogil:
+    
+    _fortran_ztrexc(compq, n, t, ldt, q, ldq, ifst, ilst, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrrfs "BLAS_FUNC(ztrrfs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *x, int *ldx, d *ferr, d *berr, npy_complex128 *work, d *rwork, int *info) nogil
+cdef void ztrrfs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, z *x, int *ldx, d *ferr, d *berr, z *work, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztrrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrsen "BLAS_FUNC(ztrsen)"(char *job, char *compq, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *q, int *ldq, npy_complex128 *w, int *m, d *s, d *sep, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void ztrsen(char *job, char *compq, bint *select, int *n, z *t, int *ldt, z *q, int *ldq, z *w, int *m, d *s, d *sep, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ztrsen(job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrsna "BLAS_FUNC(ztrsna)"(char *job, char *howmny, bint *select, int *n, npy_complex128 *t, int *ldt, npy_complex128 *vl, int *ldvl, npy_complex128 *vr, int *ldvr, d *s, d *sep, int *mm, int *m, npy_complex128 *work, int *ldwork, d *rwork, int *info) nogil
+cdef void ztrsna(char *job, char *howmny, bint *select, int *n, z *t, int *ldt, z *vl, int *ldvl, z *vr, int *ldvr, d *s, d *sep, int *mm, int *m, z *work, int *ldwork, d *rwork, int *info) noexcept nogil:
+    
+    _fortran_ztrsna(job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, rwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrsyl "BLAS_FUNC(ztrsyl)"(char *trana, char *tranb, int *isgn, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, npy_complex128 *c, int *ldc, d *scale, int *info) nogil
+cdef void ztrsyl(char *trana, char *tranb, int *isgn, int *m, int *n, z *a, int *lda, z *b, int *ldb, z *c, int *ldc, d *scale, int *info) noexcept nogil:
+    
+    _fortran_ztrsyl(trana, tranb, isgn, m, n, a, lda, b, ldb, c, ldc, scale, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrti2 "BLAS_FUNC(ztrti2)"(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void ztrti2(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ztrti2(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrtri "BLAS_FUNC(ztrtri)"(char *uplo, char *diag, int *n, npy_complex128 *a, int *lda, int *info) nogil
+cdef void ztrtri(char *uplo, char *diag, int *n, z *a, int *lda, int *info) noexcept nogil:
+    
+    _fortran_ztrtri(uplo, diag, n, a, lda, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrtrs "BLAS_FUNC(ztrtrs)"(char *uplo, char *trans, char *diag, int *n, int *nrhs, npy_complex128 *a, int *lda, npy_complex128 *b, int *ldb, int *info) nogil
+cdef void ztrtrs(char *uplo, char *trans, char *diag, int *n, int *nrhs, z *a, int *lda, z *b, int *ldb, int *info) noexcept nogil:
+    
+    _fortran_ztrtrs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrttf "BLAS_FUNC(ztrttf)"(char *transr, char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *arf, int *info) nogil
+cdef void ztrttf(char *transr, char *uplo, int *n, z *a, int *lda, z *arf, int *info) noexcept nogil:
+    
+    _fortran_ztrttf(transr, uplo, n, a, lda, arf, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztrttp "BLAS_FUNC(ztrttp)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *ap, int *info) nogil
+cdef void ztrttp(char *uplo, int *n, z *a, int *lda, z *ap, int *info) noexcept nogil:
+    
+    _fortran_ztrttp(uplo, n, a, lda, ap, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_ztzrzf "BLAS_FUNC(ztzrzf)"(int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void ztzrzf(int *m, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_ztzrzf(m, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunbdb "BLAS_FUNC(zunbdb)"(char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, d *theta, d *phi, npy_complex128 *taup1, npy_complex128 *taup2, npy_complex128 *tauq1, npy_complex128 *tauq2, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunbdb(char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, d *phi, z *taup1, z *taup2, z *tauq1, z *tauq2, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunbdb(trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, phi, taup1, taup2, tauq1, tauq2, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zuncsd "BLAS_FUNC(zuncsd)"(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, npy_complex128 *x11, int *ldx11, npy_complex128 *x12, int *ldx12, npy_complex128 *x21, int *ldx21, npy_complex128 *x22, int *ldx22, d *theta, npy_complex128 *u1, int *ldu1, npy_complex128 *u2, int *ldu2, npy_complex128 *v1t, int *ldv1t, npy_complex128 *v2t, int *ldv2t, npy_complex128 *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) nogil
+cdef void zuncsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, char *signs, int *m, int *p, int *q, z *x11, int *ldx11, z *x12, int *ldx12, z *x21, int *ldx21, z *x22, int *ldx22, d *theta, z *u1, int *ldu1, z *u2, int *ldu2, z *v1t, int *ldv1t, z *v2t, int *ldv2t, z *work, int *lwork, d *rwork, int *lrwork, int *iwork, int *info) noexcept nogil:
+    
+    _fortran_zuncsd(jobu1, jobu2, jobv1t, jobv2t, trans, signs, m, p, q, x11, ldx11, x12, ldx12, x21, ldx21, x22, ldx22, theta, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, work, lwork, rwork, lrwork, iwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zung2l "BLAS_FUNC(zung2l)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zung2l(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zung2l(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zung2r "BLAS_FUNC(zung2r)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zung2r(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zung2r(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungbr "BLAS_FUNC(zungbr)"(char *vect, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zungbr(char *vect, int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zungbr(vect, m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunghr "BLAS_FUNC(zunghr)"(int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunghr(int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunghr(n, ilo, ihi, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungl2 "BLAS_FUNC(zungl2)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zungl2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zungl2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunglq "BLAS_FUNC(zunglq)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunglq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunglq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungql "BLAS_FUNC(zungql)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zungql(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zungql(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungqr "BLAS_FUNC(zungqr)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zungqr(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zungqr(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungr2 "BLAS_FUNC(zungr2)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *info) nogil
+cdef void zungr2(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *info) noexcept nogil:
+    
+    _fortran_zungr2(m, n, k, a, lda, tau, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungrq "BLAS_FUNC(zungrq)"(int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zungrq(int *m, int *n, int *k, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zungrq(m, n, k, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zungtr "BLAS_FUNC(zungtr)"(char *uplo, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zungtr(char *uplo, int *n, z *a, int *lda, z *tau, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zungtr(uplo, n, a, lda, tau, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunm2l "BLAS_FUNC(zunm2l)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zunm2l(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zunm2l(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunm2r "BLAS_FUNC(zunm2r)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zunm2r(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zunm2r(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmbr "BLAS_FUNC(zunmbr)"(char *vect, char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmbr(vect, side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmhr "BLAS_FUNC(zunmhr)"(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmhr(char *side, char *trans, int *m, int *n, int *ilo, int *ihi, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmhr(side, trans, m, n, ilo, ihi, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunml2 "BLAS_FUNC(zunml2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zunml2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zunml2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmlq "BLAS_FUNC(zunmlq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmlq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmql "BLAS_FUNC(zunmql)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmql(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmqr "BLAS_FUNC(zunmqr)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmqr(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmr2 "BLAS_FUNC(zunmr2)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zunmr2(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zunmr2(side, trans, m, n, k, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmr3 "BLAS_FUNC(zunmr3)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zunmr3(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zunmr3(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmrq "BLAS_FUNC(zunmrq)"(char *side, char *trans, int *m, int *n, int *k, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmrq(char *side, char *trans, int *m, int *n, int *k, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmrq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmrz "BLAS_FUNC(zunmrz)"(char *side, char *trans, int *m, int *n, int *k, int *l, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmrz(char *side, char *trans, int *m, int *n, int *k, int *l, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zunmtr "BLAS_FUNC(zunmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *a, int *lda, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *lwork, int *info) nogil
+cdef void zunmtr(char *side, char *uplo, char *trans, int *m, int *n, z *a, int *lda, z *tau, z *c, int *ldc, z *work, int *lwork, int *info) noexcept nogil:
+    
+    _fortran_zunmtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zupgtr "BLAS_FUNC(zupgtr)"(char *uplo, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *q, int *ldq, npy_complex128 *work, int *info) nogil
+cdef void zupgtr(char *uplo, int *n, z *ap, z *tau, z *q, int *ldq, z *work, int *info) noexcept nogil:
+    
+    _fortran_zupgtr(uplo, n, ap, tau, q, ldq, work, info)
+    
+
+cdef extern from "_lapack_subroutines.h":
+    void _fortran_zupmtr "BLAS_FUNC(zupmtr)"(char *side, char *uplo, char *trans, int *m, int *n, npy_complex128 *ap, npy_complex128 *tau, npy_complex128 *c, int *ldc, npy_complex128 *work, int *info) nogil
+cdef void zupmtr(char *side, char *uplo, char *trans, int *m, int *n, z *ap, z *tau, z *c, int *ldc, z *work, int *info) noexcept nogil:
+    
+    _fortran_zupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
+    
+
+
+# Python accessible wrappers for testing:
+
+def _test_dlamch(cmach):
+    # This conversion is necessary to handle Python 3 strings.
+    cmach_bytes = bytes(cmach)
+    # Now that it is a bytes representation, a non-temporary variable
+    # must be passed as a part of the function call.
+    cdef char* cmach_char = cmach_bytes
+    return dlamch(cmach_char)
+
+def _test_slamch(cmach):
+    # This conversion is necessary to handle Python 3 strings.
+    cmach_bytes = bytes(cmach)
+    # Now that it is a bytes representation, a non-temporary variable
+    # must be passed as a part of the function call.
+    cdef char* cmach_char = cmach_bytes
+    return slamch(cmach_char)
+
+cpdef double complex _test_zladiv(double complex zx, double complex zy) noexcept nogil:
+    return zladiv(&zx, &zy)
+
+cpdef float complex _test_cladiv(float complex cx, float complex cy) noexcept nogil:
+    return cladiv(&cx, &cy)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d82ab157ce3be763f63e453c9a6fee064557c85
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'eig', 'eigvals', 'eigh', 'eigvalsh',
+    'eig_banded', 'eigvals_banded',
+    'eigh_tridiagonal', 'eigvalsh_tridiagonal', 'hessenberg', 'cdf2rdf',
+    'LinAlgError', 'norm', 'get_lapack_funcs'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp",
+                                   private_modules=["_decomp"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py
new file mode 100644
index 0000000000000000000000000000000000000000..92545a5c6af5fe7a4de13f8746b96696d68b5bd2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_cholesky.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded',
+    'cho_solve_banded', 'LinAlgError', 'get_lapack_funcs'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp_cholesky",
+                                   private_modules=["_decomp_cholesky"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py
new file mode 100644
index 0000000000000000000000000000000000000000..9d5d9a98a04a689fb735f81299e129dc7f307590
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_lu.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'lu', 'lu_solve', 'lu_factor',
+    'LinAlgWarning', 'get_lapack_funcs',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp_lu",
+                                   private_modules=["_decomp_lu"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py
new file mode 100644
index 0000000000000000000000000000000000000000..4ef58729412ce2c83310b7817a143d14b8f28c19
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_qr.py
@@ -0,0 +1,20 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'qr', 'qr_multiply', 'rq', 'get_lapack_funcs'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp_qr",
+                                   private_modules=["_decomp_qr"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py
new file mode 100644
index 0000000000000000000000000000000000000000..c3c6cc494db9b35dce8e4007c8c30d823b03881f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_schur.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'schur', 'rsf2csf', 'norm', 'LinAlgError', 'get_lapack_funcs', 'eigvals',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp_schur",
+                                   private_modules=["_decomp_schur"], all=__all__,
+                                   attribute=name)
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py
new file mode 100644
index 0000000000000000000000000000000000000000..64d0ce8562f06a3837df050f0ea6b8b15a2b359e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/decomp_svd.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'svd', 'svdvals', 'diagsvd', 'orth', 'subspace_angles', 'null_space',
+    'LinAlgError', 'get_lapack_funcs'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="decomp_svd",
+                                   private_modules=["_decomp_svd"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py
new file mode 100644
index 0000000000000000000000000000000000000000..38070863aa515266b0b130dbbdbd3d645da4aa0c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/interpolative.py
@@ -0,0 +1,989 @@
+#  ******************************************************************************
+#   Copyright (C) 2013 Kenneth L. Ho
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions are met:
+#
+#   Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer. Redistributions in binary
+#   form must reproduce the above copyright notice, this list of conditions and
+#   the following disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#
+#   None of the names of the copyright holders may be used to endorse or
+#   promote products derived from this software without specific prior written
+#   permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+#   POSSIBILITY OF SUCH DAMAGE.
+#  ******************************************************************************
+
+r"""
+======================================================================
+Interpolative matrix decomposition (:mod:`scipy.linalg.interpolative`)
+======================================================================
+
+.. versionadded:: 0.13
+
+.. versionchanged:: 1.15.0
+    The underlying algorithms have been ported to Python from the original Fortran77
+    code. See references below for more details.
+
+.. currentmodule:: scipy.linalg.interpolative
+
+An interpolative decomposition (ID) of a matrix :math:`A \in
+\mathbb{C}^{m \times n}` of rank :math:`k \leq \min \{ m, n \}` is a
+factorization
+
+.. math::
+  A \Pi =
+  \begin{bmatrix}
+   A \Pi_{1} & A \Pi_{2}
+  \end{bmatrix} =
+  A \Pi_{1}
+  \begin{bmatrix}
+   I & T
+  \end{bmatrix},
+
+where :math:`\Pi = [\Pi_{1}, \Pi_{2}]` is a permutation matrix with
+:math:`\Pi_{1} \in \{ 0, 1 \}^{n \times k}`, i.e., :math:`A \Pi_{2} =
+A \Pi_{1} T`. This can equivalently be written as :math:`A = BP`,
+where :math:`B = A \Pi_{1}` and :math:`P = [I, T] \Pi^{\mathsf{T}}`
+are the *skeleton* and *interpolation matrices*, respectively.
+
+If :math:`A` does not have exact rank :math:`k`, then there exists an
+approximation in the form of an ID such that :math:`A = BP + E`, where
+:math:`\| E \| \sim \sigma_{k + 1}` is on the order of the :math:`(k +
+1)`-th largest singular value of :math:`A`. Note that :math:`\sigma_{k
++ 1}` is the best possible error for a rank-:math:`k` approximation
+and, in fact, is achieved by the singular value decomposition (SVD)
+:math:`A \approx U S V^{*}`, where :math:`U \in \mathbb{C}^{m \times
+k}` and :math:`V \in \mathbb{C}^{n \times k}` have orthonormal columns
+and :math:`S = \mathop{\mathrm{diag}} (\sigma_{i}) \in \mathbb{C}^{k
+\times k}` is diagonal with nonnegative entries. The principal
+advantages of using an ID over an SVD are that:
+
+- it is cheaper to construct;
+- it preserves the structure of :math:`A`; and
+- it is more efficient to compute with in light of the identity submatrix of :math:`P`.
+
+Routines
+========
+
+Main functionality:
+
+.. autosummary::
+   :toctree: generated/
+
+   interp_decomp
+   reconstruct_matrix_from_id
+   reconstruct_interp_matrix
+   reconstruct_skel_matrix
+   id_to_svd
+   svd
+   estimate_spectral_norm
+   estimate_spectral_norm_diff
+   estimate_rank
+
+Following support functions are deprecated and will be removed in SciPy 1.17.0:
+
+.. autosummary::
+   :toctree: generated/
+
+   seed
+   rand
+
+
+References
+==========
+
+This module uses the algorithms found in ID software package [1]_ by Martinsson,
+Rokhlin, Shkolnisky, and Tygert, which is a Fortran library for computing IDs using
+various algorithms, including the rank-revealing QR approach of [2]_ and the more
+recent randomized methods described in [3]_, [4]_, and [5]_.
+
+We advise the user to consult also the documentation for the `ID package
+`_.
+
+.. [1] P.G. Martinsson, V. Rokhlin, Y. Shkolnisky, M. Tygert. "ID: a
+    software package for low-rank approximation of matrices via interpolative
+    decompositions, version 0.2." http://tygert.com/id_doc.4.pdf.
+
+.. [2] H. Cheng, Z. Gimbutas, P.G. Martinsson, V. Rokhlin. "On the
+    compression of low rank matrices." *SIAM J. Sci. Comput.* 26 (4): 1389--1404,
+    2005. :doi:`10.1137/030602678`.
+
+.. [3] E. Liberty, F. Woolfe, P.G. Martinsson, V. Rokhlin, M.
+    Tygert. "Randomized algorithms for the low-rank approximation of matrices."
+    *Proc. Natl. Acad. Sci. U.S.A.* 104 (51): 20167--20172, 2007.
+    :doi:`10.1073/pnas.0709640104`.
+
+.. [4] P.G. Martinsson, V. Rokhlin, M. Tygert. "A randomized
+    algorithm for the decomposition of matrices." *Appl. Comput. Harmon. Anal.* 30
+    (1): 47--68,  2011. :doi:`10.1016/j.acha.2010.02.003`.
+
+.. [5] F. Woolfe, E. Liberty, V. Rokhlin, M. Tygert. "A fast
+    randomized algorithm for the approximation of matrices." *Appl. Comput.
+    Harmon. Anal.* 25 (3): 335--366, 2008. :doi:`10.1016/j.acha.2007.12.002`.
+
+
+Tutorial
+========
+
+Initializing
+------------
+
+The first step is to import :mod:`scipy.linalg.interpolative` by issuing the
+command:
+
+>>> import scipy.linalg.interpolative as sli
+
+Now let's build a matrix. For this, we consider a Hilbert matrix, which is well
+know to have low rank:
+
+>>> from scipy.linalg import hilbert
+>>> n = 1000
+>>> A = hilbert(n)
+
+We can also do this explicitly via:
+
+>>> import numpy as np
+>>> n = 1000
+>>> A = np.empty((n, n), order='F')
+>>> for j in range(n):
+...     for i in range(n):
+...         A[i,j] = 1. / (i + j + 1)
+
+Note the use of the flag ``order='F'`` in :func:`numpy.empty`. This
+instantiates the matrix in Fortran-contiguous order and is important for
+avoiding data copying when passing to the backend.
+
+We then define multiplication routines for the matrix by regarding it as a
+:class:`scipy.sparse.linalg.LinearOperator`:
+
+>>> from scipy.sparse.linalg import aslinearoperator
+>>> L = aslinearoperator(A)
+
+This automatically sets up methods describing the action of the matrix and its
+adjoint on a vector.
+
+Computing an ID
+---------------
+
+We have several choices of algorithm to compute an ID. These fall largely
+according to two dichotomies:
+
+1. how the matrix is represented, i.e., via its entries or via its action on a
+   vector; and
+2. whether to approximate it to a fixed relative precision or to a fixed rank.
+
+We step through each choice in turn below.
+
+In all cases, the ID is represented by three parameters:
+
+1. a rank ``k``;
+2. an index array ``idx``; and
+3. interpolation coefficients ``proj``.
+
+The ID is specified by the relation
+``np.dot(A[:,idx[:k]], proj) == A[:,idx[k:]]``.
+
+From matrix entries
+...................
+
+We first consider a matrix given in terms of its entries.
+
+To compute an ID to a fixed precision, type:
+
+>>> eps = 1e-3
+>>> k, idx, proj = sli.interp_decomp(A, eps)
+
+where ``eps < 1`` is the desired precision.
+
+To compute an ID to a fixed rank, use:
+
+>>> idx, proj = sli.interp_decomp(A, k)
+
+where ``k >= 1`` is the desired rank.
+
+Both algorithms use random sampling and are usually faster than the
+corresponding older, deterministic algorithms, which can be accessed via the
+commands:
+
+>>> k, idx, proj = sli.interp_decomp(A, eps, rand=False)
+
+and:
+
+>>> idx, proj = sli.interp_decomp(A, k, rand=False)
+
+respectively.
+
+From matrix action
+..................
+
+Now consider a matrix given in terms of its action on a vector as a
+:class:`scipy.sparse.linalg.LinearOperator`.
+
+To compute an ID to a fixed precision, type:
+
+>>> k, idx, proj = sli.interp_decomp(L, eps)
+
+To compute an ID to a fixed rank, use:
+
+>>> idx, proj = sli.interp_decomp(L, k)
+
+These algorithms are randomized.
+
+Reconstructing an ID
+--------------------
+
+The ID routines above do not output the skeleton and interpolation matrices
+explicitly but instead return the relevant information in a more compact (and
+sometimes more useful) form. To build these matrices, write:
+
+>>> B = sli.reconstruct_skel_matrix(A, k, idx)
+
+for the skeleton matrix and:
+
+>>> P = sli.reconstruct_interp_matrix(idx, proj)
+
+for the interpolation matrix. The ID approximation can then be computed as:
+
+>>> C = np.dot(B, P)
+
+This can also be constructed directly using:
+
+>>> C = sli.reconstruct_matrix_from_id(B, idx, proj)
+
+without having to first compute ``P``.
+
+Alternatively, this can be done explicitly as well using:
+
+>>> B = A[:,idx[:k]]
+>>> P = np.hstack([np.eye(k), proj])[:,np.argsort(idx)]
+>>> C = np.dot(B, P)
+
+Computing an SVD
+----------------
+
+An ID can be converted to an SVD via the command:
+
+>>> U, S, V = sli.id_to_svd(B, idx, proj)
+
+The SVD approximation is then:
+
+>>> approx = U @ np.diag(S) @ V.conj().T
+
+The SVD can also be computed "fresh" by combining both the ID and conversion
+steps into one command. Following the various ID algorithms above, there are
+correspondingly various SVD algorithms that one can employ.
+
+From matrix entries
+...................
+
+We consider first SVD algorithms for a matrix given in terms of its entries.
+
+To compute an SVD to a fixed precision, type:
+
+>>> U, S, V = sli.svd(A, eps)
+
+To compute an SVD to a fixed rank, use:
+
+>>> U, S, V = sli.svd(A, k)
+
+Both algorithms use random sampling; for the deterministic versions, issue the
+keyword ``rand=False`` as above.
+
+From matrix action
+..................
+
+Now consider a matrix given in terms of its action on a vector.
+
+To compute an SVD to a fixed precision, type:
+
+>>> U, S, V = sli.svd(L, eps)
+
+To compute an SVD to a fixed rank, use:
+
+>>> U, S, V = sli.svd(L, k)
+
+Utility routines
+----------------
+
+Several utility routines are also available.
+
+To estimate the spectral norm of a matrix, use:
+
+>>> snorm = sli.estimate_spectral_norm(A)
+
+This algorithm is based on the randomized power method and thus requires only
+matrix-vector products. The number of iterations to take can be set using the
+keyword ``its`` (default: ``its=20``). The matrix is interpreted as a
+:class:`scipy.sparse.linalg.LinearOperator`, but it is also valid to supply it
+as a :class:`numpy.ndarray`, in which case it is trivially converted using
+:func:`scipy.sparse.linalg.aslinearoperator`.
+
+The same algorithm can also estimate the spectral norm of the difference of two
+matrices ``A1`` and ``A2`` as follows:
+
+>>> A1, A2 = A**2, A
+>>> diff = sli.estimate_spectral_norm_diff(A1, A2)
+
+This is often useful for checking the accuracy of a matrix approximation.
+
+Some routines in :mod:`scipy.linalg.interpolative` require estimating the rank
+of a matrix as well. This can be done with either:
+
+>>> k = sli.estimate_rank(A, eps)
+
+or:
+
+>>> k = sli.estimate_rank(L, eps)
+
+depending on the representation. The parameter ``eps`` controls the definition
+of the numerical rank.
+
+Finally, the random number generation required for all randomized routines can
+be controlled via providing NumPy pseudo-random generators with a fixed seed. See
+:class:`numpy.random.Generator` and :func:`numpy.random.default_rng` for more details.
+
+Remarks
+-------
+
+The above functions all automatically detect the appropriate interface and work
+with both real and complex data types, passing input arguments to the proper
+backend routine.
+
+"""
+
+import scipy.linalg._decomp_interpolative as _backend
+import numpy as np
+import warnings
+
+__all__ = [
+    'estimate_rank',
+    'estimate_spectral_norm',
+    'estimate_spectral_norm_diff',
+    'id_to_svd',
+    'interp_decomp',
+    'rand',
+    'reconstruct_interp_matrix',
+    'reconstruct_matrix_from_id',
+    'reconstruct_skel_matrix',
+    'seed',
+    'svd',
+]
+
+_DTYPE_ERROR = ValueError("invalid input dtype (input must be float64 or complex128)")
+_TYPE_ERROR = TypeError("invalid input type (must be array or LinearOperator)")
+
+
+def _C_contiguous_copy(A):
+    """
+    Same as np.ascontiguousarray, but ensure a copy
+    """
+    A = np.asarray(A)
+    if A.flags.c_contiguous:
+        A = A.copy()
+    else:
+        A = np.ascontiguousarray(A)
+    return A
+
+
+def _is_real(A):
+    try:
+        if A.dtype == np.complex128:
+            return False
+        elif A.dtype == np.float64:
+            return True
+        else:
+            raise _DTYPE_ERROR
+    except AttributeError as e:
+        raise _TYPE_ERROR from e
+
+
+def seed(seed=None):
+    """
+    This function, historically, used to set the seed of the randomization algorithms
+    used in the `scipy.linalg.interpolative` functions written in Fortran77.
+
+    The library has been ported to Python and now the functions use the native NumPy
+    generators and this function has no content and returns None. Thus this function
+    should not be used and will be removed in SciPy version 1.17.0.
+    """
+    warnings.warn("`scipy.linalg.interpolative.seed` is deprecated and will be "
+                  "removed in SciPy 1.17.0.", DeprecationWarning, stacklevel=3)
+
+
+def rand(*shape):
+    """
+    This function, historically, used to generate uniformly distributed random number
+    for the randomization algorithms used in the `scipy.linalg.interpolative` functions
+    written in Fortran77.
+
+    The library has been ported to Python and now the functions use the native NumPy
+    generators. Thus this function should not be used and will be removed in the
+    SciPy version 1.17.0.
+
+    If pseudo-random numbers are needed, NumPy pseudo-random generators should be used
+    instead.
+
+    Parameters
+    ----------
+    *shape
+        Shape of output array
+
+    """
+    warnings.warn("`scipy.linalg.interpolative.rand` is deprecated and will be "
+                  "removed in SciPy 1.17.0.", DeprecationWarning, stacklevel=3)
+    rng = np.random.default_rng()
+    return rng.uniform(low=0., high=1.0, size=shape)
+
+
+def interp_decomp(A, eps_or_k, rand=True, rng=None):
+    """
+    Compute ID of a matrix.
+
+    An ID of a matrix `A` is a factorization defined by a rank `k`, a column
+    index array `idx`, and interpolation coefficients `proj` such that::
+
+        numpy.dot(A[:,idx[:k]], proj) = A[:,idx[k:]]
+
+    The original matrix can then be reconstructed as::
+
+        numpy.hstack([A[:,idx[:k]],
+                                    numpy.dot(A[:,idx[:k]], proj)]
+                                )[:,numpy.argsort(idx)]
+
+    or via the routine :func:`reconstruct_matrix_from_id`. This can
+    equivalently be written as::
+
+        numpy.dot(A[:,idx[:k]],
+                            numpy.hstack([numpy.eye(k), proj])
+                          )[:,np.argsort(idx)]
+
+    in terms of the skeleton and interpolation matrices::
+
+        B = A[:,idx[:k]]
+
+    and::
+
+        P = numpy.hstack([numpy.eye(k), proj])[:,np.argsort(idx)]
+
+    respectively. See also :func:`reconstruct_interp_matrix` and
+    :func:`reconstruct_skel_matrix`.
+
+    The ID can be computed to any relative precision or rank (depending on the
+    value of `eps_or_k`). If a precision is specified (`eps_or_k < 1`), then
+    this function has the output signature::
+
+        k, idx, proj = interp_decomp(A, eps_or_k)
+
+    Otherwise, if a rank is specified (`eps_or_k >= 1`), then the output
+    signature is::
+
+        idx, proj = interp_decomp(A, eps_or_k)
+
+    ..  This function automatically detects the form of the input parameters
+        and passes them to the appropriate backend. For details, see
+        :func:`_backend.iddp_id`, :func:`_backend.iddp_aid`,
+        :func:`_backend.iddp_rid`, :func:`_backend.iddr_id`,
+        :func:`_backend.iddr_aid`, :func:`_backend.iddr_rid`,
+        :func:`_backend.idzp_id`, :func:`_backend.idzp_aid`,
+        :func:`_backend.idzp_rid`, :func:`_backend.idzr_id`,
+        :func:`_backend.idzr_aid`, and :func:`_backend.idzr_rid`.
+
+    Parameters
+    ----------
+    A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator` with `rmatvec`
+        Matrix to be factored
+    eps_or_k : float or int
+        Relative error (if ``eps_or_k < 1``) or rank (if ``eps_or_k >= 1``) of
+        approximation.
+    rand : bool, optional
+        Whether to use random sampling if `A` is of type :class:`numpy.ndarray`
+        (randomized algorithms are always used if `A` is of type
+        :class:`scipy.sparse.linalg.LinearOperator`).
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rand` is ``False``, the argument is ignored.
+
+    Returns
+    -------
+    k : int
+        Rank required to achieve specified relative precision if
+        ``eps_or_k < 1``.
+    idx : :class:`numpy.ndarray`
+        Column index array.
+    proj : :class:`numpy.ndarray`
+        Interpolation coefficients.
+    """  # numpy/numpydoc#87  # noqa: E501
+    from scipy.sparse.linalg import LinearOperator
+    rng = np.random.default_rng(rng)
+    real = _is_real(A)
+
+    if isinstance(A, np.ndarray):
+        A = _C_contiguous_copy(A)
+        if eps_or_k < 1:
+            eps = eps_or_k
+            if rand:
+                if real:
+                    k, idx, proj = _backend.iddp_aid(A, eps, rng=rng)
+                else:
+                    k, idx, proj = _backend.idzp_aid(A, eps, rng=rng)
+            else:
+                if real:
+                    k, idx, proj = _backend.iddp_id(A, eps)
+                else:
+                    k, idx, proj = _backend.idzp_id(A, eps)
+            return k, idx, proj
+        else:
+            k = int(eps_or_k)
+            if rand:
+                if real:
+                    idx, proj = _backend.iddr_aid(A, k, rng=rng)
+                else:
+                    idx, proj = _backend.idzr_aid(A, k, rng=rng)
+            else:
+                if real:
+                    idx, proj = _backend.iddr_id(A, k)
+                else:
+                    idx, proj = _backend.idzr_id(A, k)
+            return idx, proj
+    elif isinstance(A, LinearOperator):
+
+        if eps_or_k < 1:
+            eps = eps_or_k
+            if real:
+                k, idx, proj = _backend.iddp_rid(A, eps, rng=rng)
+            else:
+                k, idx, proj = _backend.idzp_rid(A, eps, rng=rng)
+            return k, idx, proj
+        else:
+            k = int(eps_or_k)
+            if real:
+                idx, proj = _backend.iddr_rid(A, k, rng=rng)
+            else:
+                idx, proj = _backend.idzr_rid(A, k, rng=rng)
+            return idx, proj
+    else:
+        raise _TYPE_ERROR
+
+
+def reconstruct_matrix_from_id(B, idx, proj):
+    """
+    Reconstruct matrix from its ID.
+
+    A matrix `A` with skeleton matrix `B` and ID indices and coefficients `idx`
+    and `proj`, respectively, can be reconstructed as::
+
+        numpy.hstack([B, numpy.dot(B, proj)])[:,numpy.argsort(idx)]
+
+    See also :func:`reconstruct_interp_matrix` and
+    :func:`reconstruct_skel_matrix`.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_reconid` and
+        :func:`_backend.idz_reconid`.
+
+    Parameters
+    ----------
+    B : :class:`numpy.ndarray`
+        Skeleton matrix.
+    idx : :class:`numpy.ndarray`
+        Column index array.
+    proj : :class:`numpy.ndarray`
+        Interpolation coefficients.
+
+    Returns
+    -------
+    :class:`numpy.ndarray`
+        Reconstructed matrix.
+    """
+    if _is_real(B):
+        return _backend.idd_reconid(B, idx, proj)
+    else:
+        return _backend.idz_reconid(B, idx, proj)
+
+
+def reconstruct_interp_matrix(idx, proj):
+    """
+    Reconstruct interpolation matrix from ID.
+
+    The interpolation matrix can be reconstructed from the ID indices and
+    coefficients `idx` and `proj`, respectively, as::
+
+        P = numpy.hstack([numpy.eye(proj.shape[0]), proj])[:,numpy.argsort(idx)]
+
+    The original matrix can then be reconstructed from its skeleton matrix ``B``
+    via ``A = B @ P``
+
+    See also :func:`reconstruct_matrix_from_id` and
+    :func:`reconstruct_skel_matrix`.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_reconint` and
+        :func:`_backend.idz_reconint`.
+
+    Parameters
+    ----------
+    idx : :class:`numpy.ndarray`
+        1D column index array.
+    proj : :class:`numpy.ndarray`
+        Interpolation coefficients.
+
+    Returns
+    -------
+    :class:`numpy.ndarray`
+        Interpolation matrix.
+    """
+    n, krank = len(idx), proj.shape[0]
+    if _is_real(proj):
+        p = np.zeros([krank, n], dtype=np.float64)
+    else:
+        p = np.zeros([krank, n], dtype=np.complex128)
+
+    for ci in range(krank):
+        p[ci, idx[ci]] = 1.0
+    p[:, idx[krank:]] = proj[:, :]
+
+    return p
+
+
+def reconstruct_skel_matrix(A, k, idx):
+    """
+    Reconstruct skeleton matrix from ID.
+
+    The skeleton matrix can be reconstructed from the original matrix `A` and its
+    ID rank and indices `k` and `idx`, respectively, as::
+
+        B = A[:,idx[:k]]
+
+    The original matrix can then be reconstructed via::
+
+        numpy.hstack([B, numpy.dot(B, proj)])[:,numpy.argsort(idx)]
+
+    See also :func:`reconstruct_matrix_from_id` and
+    :func:`reconstruct_interp_matrix`.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_copycols` and
+        :func:`_backend.idz_copycols`.
+
+    Parameters
+    ----------
+    A : :class:`numpy.ndarray`
+        Original matrix.
+    k : int
+        Rank of ID.
+    idx : :class:`numpy.ndarray`
+        Column index array.
+
+    Returns
+    -------
+    :class:`numpy.ndarray`
+        Skeleton matrix.
+    """
+    return A[:, idx[:k]]
+
+
+def id_to_svd(B, idx, proj):
+    """
+    Convert ID to SVD.
+
+    The SVD reconstruction of a matrix with skeleton matrix `B` and ID indices and
+    coefficients `idx` and `proj`, respectively, is::
+
+        U, S, V = id_to_svd(B, idx, proj)
+        A = numpy.dot(U, numpy.dot(numpy.diag(S), V.conj().T))
+
+    See also :func:`svd`.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_id2svd` and
+        :func:`_backend.idz_id2svd`.
+
+    Parameters
+    ----------
+    B : :class:`numpy.ndarray`
+        Skeleton matrix.
+    idx : :class:`numpy.ndarray`
+        1D column index array.
+    proj : :class:`numpy.ndarray`
+        Interpolation coefficients.
+
+    Returns
+    -------
+    U : :class:`numpy.ndarray`
+        Left singular vectors.
+    S : :class:`numpy.ndarray`
+        Singular values.
+    V : :class:`numpy.ndarray`
+        Right singular vectors.
+    """
+    B = _C_contiguous_copy(B)
+    if _is_real(B):
+        U, S, V = _backend.idd_id2svd(B, idx, proj)
+    else:
+        U, S, V = _backend.idz_id2svd(B, idx, proj)
+
+    return U, S, V
+
+
+def estimate_spectral_norm(A, its=20, rng=None):
+    """
+    Estimate spectral norm of a matrix by the randomized power method.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_snorm` and
+        :func:`_backend.idz_snorm`.
+
+    Parameters
+    ----------
+    A : :class:`scipy.sparse.linalg.LinearOperator`
+        Matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with the
+        `matvec` and `rmatvec` methods (to apply the matrix and its adjoint).
+    its : int, optional
+        Number of power method iterations.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rand` is ``False``, the argument is ignored.
+
+    Returns
+    -------
+    float
+        Spectral norm estimate.
+    """
+    from scipy.sparse.linalg import aslinearoperator
+    rng = np.random.default_rng(rng)
+    A = aslinearoperator(A)
+
+    if _is_real(A):
+        return _backend.idd_snorm(A, its=its, rng=rng)
+    else:
+        return _backend.idz_snorm(A, its=its, rng=rng)
+
+
+def estimate_spectral_norm_diff(A, B, its=20, rng=None):
+    """
+    Estimate spectral norm of the difference of two matrices by the randomized
+    power method.
+
+    ..  This function automatically detects the matrix data type and calls the
+        appropriate backend. For details, see :func:`_backend.idd_diffsnorm` and
+        :func:`_backend.idz_diffsnorm`.
+
+    Parameters
+    ----------
+    A : :class:`scipy.sparse.linalg.LinearOperator`
+        First matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with the
+        `matvec` and `rmatvec` methods (to apply the matrix and its adjoint).
+    B : :class:`scipy.sparse.linalg.LinearOperator`
+        Second matrix given as a :class:`scipy.sparse.linalg.LinearOperator` with
+        the `matvec` and `rmatvec` methods (to apply the matrix and its adjoint).
+    its : int, optional
+        Number of power method iterations.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rand` is ``False``, the argument is ignored.
+
+    Returns
+    -------
+    float
+        Spectral norm estimate of matrix difference.
+    """
+    from scipy.sparse.linalg import aslinearoperator
+    rng = np.random.default_rng(rng)
+    A = aslinearoperator(A)
+    B = aslinearoperator(B)
+
+    if _is_real(A):
+        return _backend.idd_diffsnorm(A, B, its=its, rng=rng)
+    else:
+        return _backend.idz_diffsnorm(A, B, its=its, rng=rng)
+
+
+def svd(A, eps_or_k, rand=True, rng=None):
+    """
+    Compute SVD of a matrix via an ID.
+
+    An SVD of a matrix `A` is a factorization::
+
+        A = U @ np.diag(S) @ V.conj().T
+
+    where `U` and `V` have orthonormal columns and `S` is nonnegative.
+
+    The SVD can be computed to any relative precision or rank (depending on the
+    value of `eps_or_k`).
+
+    See also :func:`interp_decomp` and :func:`id_to_svd`.
+
+    ..  This function automatically detects the form of the input parameters and
+        passes them to the appropriate backend. For details, see
+        :func:`_backend.iddp_svd`, :func:`_backend.iddp_asvd`,
+        :func:`_backend.iddp_rsvd`, :func:`_backend.iddr_svd`,
+        :func:`_backend.iddr_asvd`, :func:`_backend.iddr_rsvd`,
+        :func:`_backend.idzp_svd`, :func:`_backend.idzp_asvd`,
+        :func:`_backend.idzp_rsvd`, :func:`_backend.idzr_svd`,
+        :func:`_backend.idzr_asvd`, and :func:`_backend.idzr_rsvd`.
+
+    Parameters
+    ----------
+    A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator`
+        Matrix to be factored, given as either a :class:`numpy.ndarray` or a
+        :class:`scipy.sparse.linalg.LinearOperator` with the `matvec` and
+        `rmatvec` methods (to apply the matrix and its adjoint).
+    eps_or_k : float or int
+        Relative error (if ``eps_or_k < 1``) or rank (if ``eps_or_k >= 1``) of
+        approximation.
+    rand : bool, optional
+        Whether to use random sampling if `A` is of type :class:`numpy.ndarray`
+        (randomized algorithms are always used if `A` is of type
+        :class:`scipy.sparse.linalg.LinearOperator`).
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rand` is ``False``, the argument is ignored.
+
+    Returns
+    -------
+    U : :class:`numpy.ndarray`
+        2D array of left singular vectors.
+    S : :class:`numpy.ndarray`
+        1D array of singular values.
+    V : :class:`numpy.ndarray`
+        2D array right singular vectors.
+    """
+    from scipy.sparse.linalg import LinearOperator
+    rng = np.random.default_rng(rng)
+
+    real = _is_real(A)
+
+    if isinstance(A, np.ndarray):
+        A = _C_contiguous_copy(A)
+        if eps_or_k < 1:
+            eps = eps_or_k
+            if rand:
+                if real:
+                    U, S, V = _backend.iddp_asvd(A, eps, rng=rng)
+                else:
+                    U, S, V = _backend.idzp_asvd(A, eps, rng=rng)
+            else:
+                if real:
+                    U, S, V = _backend.iddp_svd(A, eps)
+                    V = V.T.conj()
+                else:
+                    U, S, V = _backend.idzp_svd(A, eps)
+                    V = V.T.conj()
+        else:
+            k = int(eps_or_k)
+            if k > min(A.shape):
+                raise ValueError(f"Approximation rank {k} exceeds min(A.shape) = "
+                                 f" {min(A.shape)} ")
+            if rand:
+                if real:
+                    U, S, V = _backend.iddr_asvd(A, k, rng=rng)
+                else:
+                    U, S, V = _backend.idzr_asvd(A, k, rng=rng)
+            else:
+                if real:
+                    U, S, V = _backend.iddr_svd(A, k)
+                    V = V.T.conj()
+                else:
+                    U, S, V = _backend.idzr_svd(A, k)
+                    V = V.T.conj()
+    elif isinstance(A, LinearOperator):
+        if eps_or_k < 1:
+            eps = eps_or_k
+            if real:
+                U, S, V = _backend.iddp_rsvd(A, eps, rng=rng)
+            else:
+                U, S, V = _backend.idzp_rsvd(A, eps, rng=rng)
+        else:
+            k = int(eps_or_k)
+            if real:
+                U, S, V = _backend.iddr_rsvd(A, k, rng=rng)
+            else:
+                U, S, V = _backend.idzr_rsvd(A, k, rng=rng)
+    else:
+        raise _TYPE_ERROR
+    return U, S, V
+
+
+def estimate_rank(A, eps, rng=None):
+    """
+    Estimate matrix rank to a specified relative precision using randomized
+    methods.
+
+    The matrix `A` can be given as either a :class:`numpy.ndarray` or a
+    :class:`scipy.sparse.linalg.LinearOperator`, with different algorithms used
+    for each case. If `A` is of type :class:`numpy.ndarray`, then the output
+    rank is typically about 8 higher than the actual numerical rank.
+
+    ..  This function automatically detects the form of the input parameters and
+        passes them to the appropriate backend. For details,
+        see :func:`_backend.idd_estrank`, :func:`_backend.idd_findrank`,
+        :func:`_backend.idz_estrank`, and :func:`_backend.idz_findrank`.
+
+    Parameters
+    ----------
+    A : :class:`numpy.ndarray` or :class:`scipy.sparse.linalg.LinearOperator`
+        Matrix whose rank is to be estimated, given as either a
+        :class:`numpy.ndarray` or a :class:`scipy.sparse.linalg.LinearOperator`
+        with the `rmatvec` method (to apply the matrix adjoint).
+    eps : float
+        Relative error for numerical rank definition.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rand` is ``False``, the argument is ignored.
+
+    Returns
+    -------
+    int
+        Estimated matrix rank.
+    """
+    from scipy.sparse.linalg import LinearOperator
+
+    rng = np.random.default_rng(rng)
+    real = _is_real(A)
+
+    if isinstance(A, np.ndarray):
+        A = _C_contiguous_copy(A)
+        if real:
+            rank, _ = _backend.idd_estrank(A, eps, rng=rng)
+        else:
+            rank, _ = _backend.idz_estrank(A, eps, rng=rng)
+        if rank == 0:
+            # special return value for nearly full rank
+            rank = min(A.shape)
+        return rank
+    elif isinstance(A, LinearOperator):
+        if real:
+            return _backend.idd_findrank(A, eps, rng=rng)[0]
+        else:
+            return _backend.idz_findrank(A, eps, rng=rng)[0]
+    else:
+        raise _TYPE_ERROR
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/lapack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/lapack.py
new file mode 100644
index 0000000000000000000000000000000000000000..2d15cf4d72d19f4b7949cd80bc77aa31553841c1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/lapack.py
@@ -0,0 +1,1061 @@
+"""
+Low-level LAPACK functions (:mod:`scipy.linalg.lapack`)
+=======================================================
+
+This module contains low-level functions from the LAPACK library.
+
+.. versionadded:: 0.12.0
+
+.. note::
+
+    The common ``overwrite_<>`` option in many routines, allows the
+    input arrays to be overwritten to avoid extra memory allocation.
+    However this requires the array to satisfy two conditions
+    which are memory order and the data type to match exactly the
+    order and the type expected by the routine.
+
+    As an example, if you pass a double precision float array to any
+    ``S....`` routine which expects single precision arguments, f2py
+    will create an intermediate array to match the argument types and
+    overwriting will be performed on that intermediate array.
+
+    Similarly, if a C-contiguous array is passed, f2py will pass a
+    FORTRAN-contiguous array internally. Please make sure that these
+    details are satisfied. More information can be found in the f2py
+    documentation.
+
+.. warning::
+
+   These functions do little to no error checking.
+   It is possible to cause crashes by mis-using them,
+   so prefer using the higher-level routines in `scipy.linalg`.
+
+Finding functions
+-----------------
+
+.. autosummary::
+   :toctree: generated/
+
+   get_lapack_funcs
+
+All functions
+-------------
+
+.. autosummary::
+   :toctree: generated/
+
+   sgbsv
+   dgbsv
+   cgbsv
+   zgbsv
+
+   sgbtrf
+   dgbtrf
+   cgbtrf
+   zgbtrf
+
+   sgbtrs
+   dgbtrs
+   cgbtrs
+   zgbtrs
+
+   sgebal
+   dgebal
+   cgebal
+   zgebal
+
+   sgecon
+   dgecon
+   cgecon
+   zgecon
+
+   sgeequ
+   dgeequ
+   cgeequ
+   zgeequ
+
+   sgeequb
+   dgeequb
+   cgeequb
+   zgeequb
+
+   sgees
+   dgees
+   cgees
+   zgees
+
+   sgeev
+   dgeev
+   cgeev
+   zgeev
+
+   sgeev_lwork
+   dgeev_lwork
+   cgeev_lwork
+   zgeev_lwork
+
+   sgehrd
+   dgehrd
+   cgehrd
+   zgehrd
+
+   sgehrd_lwork
+   dgehrd_lwork
+   cgehrd_lwork
+   zgehrd_lwork
+
+   sgejsv
+   dgejsv
+
+   sgels
+   dgels
+   cgels
+   zgels
+
+   sgels_lwork
+   dgels_lwork
+   cgels_lwork
+   zgels_lwork
+
+   sgelsd
+   dgelsd
+   cgelsd
+   zgelsd
+
+   sgelsd_lwork
+   dgelsd_lwork
+   cgelsd_lwork
+   zgelsd_lwork
+
+   sgelss
+   dgelss
+   cgelss
+   zgelss
+
+   sgelss_lwork
+   dgelss_lwork
+   cgelss_lwork
+   zgelss_lwork
+
+   sgelsy
+   dgelsy
+   cgelsy
+   zgelsy
+
+   sgelsy_lwork
+   dgelsy_lwork
+   cgelsy_lwork
+   zgelsy_lwork
+
+   sgeqp3
+   dgeqp3
+   cgeqp3
+   zgeqp3
+
+   sgeqrf
+   dgeqrf
+   cgeqrf
+   zgeqrf
+
+   sgeqrf_lwork
+   dgeqrf_lwork
+   cgeqrf_lwork
+   zgeqrf_lwork
+
+   sgeqrfp
+   dgeqrfp
+   cgeqrfp
+   zgeqrfp
+
+   sgeqrfp_lwork
+   dgeqrfp_lwork
+   cgeqrfp_lwork
+   zgeqrfp_lwork
+
+   sgerqf
+   dgerqf
+   cgerqf
+   zgerqf
+
+   sgesdd
+   dgesdd
+   cgesdd
+   zgesdd
+
+   sgesdd_lwork
+   dgesdd_lwork
+   cgesdd_lwork
+   zgesdd_lwork
+
+   sgesv
+   dgesv
+   cgesv
+   zgesv
+
+   sgesvd
+   dgesvd
+   cgesvd
+   zgesvd
+
+   sgesvd_lwork
+   dgesvd_lwork
+   cgesvd_lwork
+   zgesvd_lwork
+
+   sgesvx
+   dgesvx
+   cgesvx
+   zgesvx
+
+   sgetrf
+   dgetrf
+   cgetrf
+   zgetrf
+
+   sgetc2
+   dgetc2
+   cgetc2
+   zgetc2
+
+   sgetri
+   dgetri
+   cgetri
+   zgetri
+
+   sgetri_lwork
+   dgetri_lwork
+   cgetri_lwork
+   zgetri_lwork
+
+   sgetrs
+   dgetrs
+   cgetrs
+   zgetrs
+
+   sgesc2
+   dgesc2
+   cgesc2
+   zgesc2
+
+   sgges
+   dgges
+   cgges
+   zgges
+
+   sggev
+   dggev
+   cggev
+   zggev
+
+   sgglse
+   dgglse
+   cgglse
+   zgglse
+
+   sgglse_lwork
+   dgglse_lwork
+   cgglse_lwork
+   zgglse_lwork
+
+   sgtsv
+   dgtsv
+   cgtsv
+   zgtsv
+
+   sgtsvx
+   dgtsvx
+   cgtsvx
+   zgtsvx
+
+   chbevd
+   zhbevd
+
+   chbevx
+   zhbevx
+
+   checon
+   zhecon
+
+   cheequb
+   zheequb
+
+   cheev
+   zheev
+
+   cheev_lwork
+   zheev_lwork
+
+   cheevd
+   zheevd
+
+   cheevd_lwork
+   zheevd_lwork
+
+   cheevr
+   zheevr
+
+   cheevr_lwork
+   zheevr_lwork
+
+   cheevx
+   zheevx
+
+   cheevx_lwork
+   zheevx_lwork
+
+   chegst
+   zhegst
+
+   chegv
+   zhegv
+
+   chegv_lwork
+   zhegv_lwork
+
+   chegvd
+   zhegvd
+
+   chegvx
+   zhegvx
+
+   chegvx_lwork
+   zhegvx_lwork
+
+   chesv
+   zhesv
+
+   chesv_lwork
+   zhesv_lwork
+
+   chesvx
+   zhesvx
+
+   chesvx_lwork
+   zhesvx_lwork
+
+   chetrd
+   zhetrd
+
+   chetrd_lwork
+   zhetrd_lwork
+
+   chetrf
+   zhetrf
+
+   chetrf_lwork
+   zhetrf_lwork
+
+   chetrs
+   zhetrs
+
+   chfrk
+   zhfrk
+
+   slamch
+   dlamch
+
+   slange
+   dlange
+   clange
+   zlange
+
+   slantr
+   dlantr
+   clantr
+   zlantr
+
+   slarf
+   dlarf
+   clarf
+   zlarf
+
+   slarfg
+   dlarfg
+   clarfg
+   zlarfg
+
+   slartg
+   dlartg
+   clartg
+   zlartg
+
+   slasd4
+   dlasd4
+
+   slaswp
+   dlaswp
+   claswp
+   zlaswp
+
+   slauum
+   dlauum
+   clauum
+   zlauum
+
+   sorcsd
+   dorcsd
+   sorcsd_lwork
+   dorcsd_lwork
+
+   sorghr
+   dorghr
+   sorghr_lwork
+   dorghr_lwork
+
+   sorgqr
+   dorgqr
+
+   sorgrq
+   dorgrq
+
+   sormqr
+   dormqr
+
+   sormrz
+   dormrz
+
+   sormrz_lwork
+   dormrz_lwork
+
+   spbsv
+   dpbsv
+   cpbsv
+   zpbsv
+
+   spbtrf
+   dpbtrf
+   cpbtrf
+   zpbtrf
+
+   spbtrs
+   dpbtrs
+   cpbtrs
+   zpbtrs
+
+   spftrf
+   dpftrf
+   cpftrf
+   zpftrf
+
+   spftri
+   dpftri
+   cpftri
+   zpftri
+
+   spftrs
+   dpftrs
+   cpftrs
+   zpftrs
+
+   spocon
+   dpocon
+   cpocon
+   zpocon
+
+   spstrf
+   dpstrf
+   cpstrf
+   zpstrf
+
+   spstf2
+   dpstf2
+   cpstf2
+   zpstf2
+
+   sposv
+   dposv
+   cposv
+   zposv
+
+   sposvx
+   dposvx
+   cposvx
+   zposvx
+
+   spotrf
+   dpotrf
+   cpotrf
+   zpotrf
+
+   spotri
+   dpotri
+   cpotri
+   zpotri
+
+   spotrs
+   dpotrs
+   cpotrs
+   zpotrs
+
+   sppcon
+   dppcon
+   cppcon
+   zppcon
+
+   sppsv
+   dppsv
+   cppsv
+   zppsv
+
+   spptrf
+   dpptrf
+   cpptrf
+   zpptrf
+
+   spptri
+   dpptri
+   cpptri
+   zpptri
+
+   spptrs
+   dpptrs
+   cpptrs
+   zpptrs
+
+   sptsv
+   dptsv
+   cptsv
+   zptsv
+
+   sptsvx
+   dptsvx
+   cptsvx
+   zptsvx
+
+   spttrf
+   dpttrf
+   cpttrf
+   zpttrf
+
+   spttrs
+   dpttrs
+   cpttrs
+   zpttrs
+
+   spteqr
+   dpteqr
+   cpteqr
+   zpteqr
+
+   crot
+   zrot
+
+   ssbev
+   dsbev
+
+   ssbevd
+   dsbevd
+
+   ssbevx
+   dsbevx
+
+   ssfrk
+   dsfrk
+
+   sstebz
+   dstebz
+
+   sstein
+   dstein
+
+   sstemr
+   dstemr
+
+   sstemr_lwork
+   dstemr_lwork
+
+   ssterf
+   dsterf
+
+   sstev
+   dstev
+
+   ssycon
+   dsycon
+   csycon
+   zsycon
+
+   ssyconv
+   dsyconv
+   csyconv
+   zsyconv
+
+   ssyequb
+   dsyequb
+   csyequb
+   zsyequb
+
+   ssyev
+   dsyev
+
+   ssyev_lwork
+   dsyev_lwork
+
+   ssyevd
+   dsyevd
+
+   ssyevd_lwork
+   dsyevd_lwork
+
+   ssyevr
+   dsyevr
+
+   ssyevr_lwork
+   dsyevr_lwork
+
+   ssyevx
+   dsyevx
+
+   ssyevx_lwork
+   dsyevx_lwork
+
+   ssygst
+   dsygst
+
+   ssygv
+   dsygv
+
+   ssygv_lwork
+   dsygv_lwork
+
+   ssygvd
+   dsygvd
+
+   ssygvx
+   dsygvx
+
+   ssygvx_lwork
+   dsygvx_lwork
+
+   ssysv
+   dsysv
+   csysv
+   zsysv
+
+   ssysv_lwork
+   dsysv_lwork
+   csysv_lwork
+   zsysv_lwork
+
+   ssysvx
+   dsysvx
+   csysvx
+   zsysvx
+
+   ssysvx_lwork
+   dsysvx_lwork
+   csysvx_lwork
+   zsysvx_lwork
+
+   ssytf2
+   dsytf2
+   csytf2
+   zsytf2
+
+   ssytrd
+   dsytrd
+
+   ssytrd_lwork
+   dsytrd_lwork
+
+   ssytrf
+   dsytrf
+   csytrf
+   zsytrf
+
+   ssytrf_lwork
+   dsytrf_lwork
+   csytrf_lwork
+   zsytrf_lwork
+
+   ssytrs
+   dsytrs
+   csytrs
+   zsytrs
+
+   stbtrs
+   dtbtrs
+   ctbtrs
+   ztbtrs
+
+   stfsm
+   dtfsm
+   ctfsm
+   ztfsm
+
+   stfttp
+   dtfttp
+   ctfttp
+   ztfttp
+
+   stfttr
+   dtfttr
+   ctfttr
+   ztfttr
+
+   stgexc
+   dtgexc
+   ctgexc
+   ztgexc
+
+   stgsen
+   dtgsen
+   ctgsen
+   ztgsen
+
+   stgsen_lwork
+   dtgsen_lwork
+   ctgsen_lwork
+   ztgsen_lwork
+
+   stgsyl
+   dtgsyl
+
+   stpttf
+   dtpttf
+   ctpttf
+   ztpttf
+
+   stpttr
+   dtpttr
+   ctpttr
+   ztpttr
+
+   strcon
+   dtrcon
+   ctrcon
+   ztrcon
+
+   strexc
+   dtrexc
+   ctrexc
+   ztrexc
+
+   strsen
+   dtrsen
+   ctrsen
+   ztrsen
+
+   strsen_lwork
+   dtrsen_lwork
+   ctrsen_lwork
+   ztrsen_lwork
+
+   strsyl
+   dtrsyl
+   ctrsyl
+   ztrsyl
+
+   strtri
+   dtrtri
+   ctrtri
+   ztrtri
+
+   strtrs
+   dtrtrs
+   ctrtrs
+   ztrtrs
+
+   strttf
+   dtrttf
+   ctrttf
+   ztrttf
+
+   strttp
+   dtrttp
+   ctrttp
+   ztrttp
+
+   stzrzf
+   dtzrzf
+   ctzrzf
+   ztzrzf
+
+   stzrzf_lwork
+   dtzrzf_lwork
+   ctzrzf_lwork
+   ztzrzf_lwork
+
+   cunghr
+   zunghr
+
+   cunghr_lwork
+   zunghr_lwork
+
+   cungqr
+   zungqr
+
+   cungrq
+   zungrq
+
+   cunmqr
+   zunmqr
+
+   sgeqrt
+   dgeqrt
+   cgeqrt
+   zgeqrt
+
+   sgemqrt
+   dgemqrt
+   cgemqrt
+   zgemqrt
+
+   sgttrf
+   dgttrf
+   cgttrf
+   zgttrf
+
+   sgttrs
+   dgttrs
+   cgttrs
+   zgttrs
+
+   sgtcon
+   dgtcon
+   cgtcon
+   zgtcon
+
+   stpqrt
+   dtpqrt
+   ctpqrt
+   ztpqrt
+
+   stpmqrt
+   dtpmqrt
+   ctpmqrt
+   ztpmqrt
+
+   cuncsd
+   zuncsd
+
+   cuncsd_lwork
+   zuncsd_lwork
+
+   cunmrz
+   zunmrz
+
+   cunmrz_lwork
+   zunmrz_lwork
+
+   ilaver
+
+"""
+#
+# Author: Pearu Peterson, March 2002
+#
+
+import numpy as np
+from .blas import _get_funcs, _memoize_get_funcs
+from scipy.linalg import _flapack
+from re import compile as regex_compile
+try:
+    from scipy.linalg import _clapack
+except ImportError:
+    _clapack = None
+
+try:
+    from scipy.linalg import _flapack_64
+    HAS_ILP64 = True
+except ImportError:
+    HAS_ILP64 = False
+    _flapack_64 = None
+
+
+# Expose all functions (only flapack --- clapack is an implementation detail)
+empty_module = None
+from scipy.linalg._flapack import *  # noqa: E402, F403
+del empty_module
+
+__all__ = ['get_lapack_funcs']
+
+# some convenience alias for complex functions
+_lapack_alias = {
+    'corghr': 'cunghr', 'zorghr': 'zunghr',
+    'corghr_lwork': 'cunghr_lwork', 'zorghr_lwork': 'zunghr_lwork',
+    'corgqr': 'cungqr', 'zorgqr': 'zungqr',
+    'cormqr': 'cunmqr', 'zormqr': 'zunmqr',
+    'corgrq': 'cungrq', 'zorgrq': 'zungrq',
+}
+
+
+# Place guards against docstring rendering issues with special characters
+p1 = regex_compile(r'with bounds (?P.*?)( and (?P.*?) storage){0,1}\n')
+p2 = regex_compile(r'Default: (?P.*?)\n')
+
+
+def backtickrepl(m):
+    if m.group('s'):
+        return (f"with bounds ``{m.group('b')}`` with ``{m.group('s')}`` storage\n")
+    else:
+        return f"with bounds ``{m.group('b')}``\n"
+
+
+for routine in [ssyevr, dsyevr, cheevr, zheevr,
+                ssyevx, dsyevx, cheevx, zheevx,
+                ssygvd, dsygvd, chegvd, zhegvd]:
+    if routine.__doc__:
+        routine.__doc__ = p1.sub(backtickrepl, routine.__doc__)
+        routine.__doc__ = p2.sub('Default ``\\1``\n', routine.__doc__)
+    else:
+        continue
+
+del regex_compile, p1, p2, backtickrepl
+
+
+@_memoize_get_funcs
+def get_lapack_funcs(names, arrays=(), dtype=None, ilp64=False):
+    """Return available LAPACK function objects from names.
+
+    Arrays are used to determine the optimal prefix of LAPACK routines.
+
+    Parameters
+    ----------
+    names : str or sequence of str
+        Name(s) of LAPACK functions without type prefix.
+
+    arrays : sequence of ndarrays, optional
+        Arrays can be given to determine optimal prefix of LAPACK
+        routines. If not given, double-precision routines will be
+        used, otherwise the most generic type in arrays will be used.
+
+    dtype : str or dtype, optional
+        Data-type specifier. Not used if `arrays` is non-empty.
+
+    ilp64 : {True, False, 'preferred'}, optional
+        Whether to return ILP64 routine variant.
+        Choosing 'preferred' returns ILP64 routine if available, and
+        otherwise the 32-bit routine. Default: False
+
+    Returns
+    -------
+    funcs : list
+        List containing the found function(s).
+
+    Notes
+    -----
+    This routine automatically chooses between Fortran/C
+    interfaces. Fortran code is used whenever possible for arrays with
+    column major order. In all other cases, C code is preferred.
+
+    In LAPACK, the naming convention is that all functions start with a
+    type prefix, which depends on the type of the principal
+    matrix. These can be one of {'s', 'd', 'c', 'z'} for the NumPy
+    types {float32, float64, complex64, complex128} respectively, and
+    are stored in attribute ``typecode`` of the returned functions.
+
+    Examples
+    --------
+    Suppose we would like to use '?lange' routine which computes the selected
+    norm of an array. We pass our array in order to get the correct 'lange'
+    flavor.
+
+    >>> import numpy as np
+    >>> import scipy.linalg as LA
+    >>> rng = np.random.default_rng()
+
+    >>> a = rng.random((3,2))
+    >>> x_lange = LA.get_lapack_funcs('lange', (a,))
+    >>> x_lange.typecode
+    'd'
+    >>> x_lange = LA.get_lapack_funcs('lange',(a*1j,))
+    >>> x_lange.typecode
+    'z'
+
+    Several LAPACK routines work best when its internal WORK array has
+    the optimal size (big enough for fast computation and small enough to
+    avoid waste of memory). This size is determined also by a dedicated query
+    to the function which is often wrapped as a standalone function and
+    commonly denoted as ``###_lwork``. Below is an example for ``?sysv``
+
+    >>> a = rng.random((1000, 1000))
+    >>> b = rng.random((1000, 1)) * 1j
+    >>> # We pick up zsysv and zsysv_lwork due to b array
+    ... xsysv, xlwork = LA.get_lapack_funcs(('sysv', 'sysv_lwork'), (a, b))
+    >>> opt_lwork, _ = xlwork(a.shape[0])  # returns a complex for 'z' prefix
+    >>> udut, ipiv, x, info = xsysv(a, b, lwork=int(opt_lwork.real))
+
+    """
+    if isinstance(ilp64, str):
+        if ilp64 == 'preferred':
+            ilp64 = HAS_ILP64
+        else:
+            raise ValueError("Invalid value for 'ilp64'")
+
+    if not ilp64:
+        return _get_funcs(names, arrays, dtype,
+                          "LAPACK", _flapack, _clapack,
+                          "flapack", "clapack", _lapack_alias,
+                          ilp64=False)
+    else:
+        if not HAS_ILP64:
+            raise RuntimeError("LAPACK ILP64 routine requested, but Scipy "
+                               "compiled only with 32-bit BLAS")
+        return _get_funcs(names, arrays, dtype,
+                          "LAPACK", _flapack_64, None,
+                          "flapack_64", None, _lapack_alias,
+                          ilp64=True)
+
+
+_int32_max = np.iinfo(np.int32).max
+_int64_max = np.iinfo(np.int64).max
+
+
+def _compute_lwork(routine, *args, **kwargs):
+    """
+    Round floating-point lwork returned by lapack to integer.
+
+    Several LAPACK routines compute optimal values for LWORK, which
+    they return in a floating-point variable. However, for large
+    values of LWORK, single-precision floating point is not sufficient
+    to hold the exact value --- some LAPACK versions (<= 3.5.0 at
+    least) truncate the returned integer to single precision and in
+    some cases this can be smaller than the required value.
+
+    Examples
+    --------
+    >>> from scipy.linalg import lapack
+    >>> n = 5000
+    >>> s_r, s_lw = lapack.get_lapack_funcs(('sysvx', 'sysvx_lwork'))
+    >>> lwork = lapack._compute_lwork(s_lw, n)
+    >>> lwork
+    32000
+
+    """
+    dtype = getattr(routine, 'dtype', None)
+    int_dtype = getattr(routine, 'int_dtype', None)
+    ret = routine(*args, **kwargs)
+    if ret[-1] != 0:
+        raise ValueError("Internal work array size computation failed: "
+                         "%d" % (ret[-1],))
+
+    if len(ret) == 2:
+        return _check_work_float(ret[0].real, dtype, int_dtype)
+    else:
+        return tuple(_check_work_float(x.real, dtype, int_dtype)
+                     for x in ret[:-1])
+
+
+def _check_work_float(value, dtype, int_dtype):
+    """
+    Convert LAPACK-returned work array size float to integer,
+    carefully for single-precision types.
+    """
+
+    if dtype == np.float32 or dtype == np.complex64:
+        # Single-precision routine -- take next fp value to work
+        # around possible truncation in LAPACK code
+        value = np.nextafter(value, np.inf, dtype=np.float32)
+
+    value = int(value)
+    if int_dtype.itemsize == 4:
+        if value < 0 or value > _int32_max:
+            raise ValueError("Too large work array required -- computation "
+                             "cannot be performed with standard 32-bit"
+                             " LAPACK.")
+    elif int_dtype.itemsize == 8:
+        if value < 0 or value > _int64_max:
+            raise ValueError("Too large work array required -- computation"
+                             " cannot be performed with standard 64-bit"
+                             " LAPACK.")
+    return value
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ec8123b3ad8df096d5791c29bb28cce8271d4ad
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/matfuncs.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'expm', 'cosm', 'sinm', 'tanm', 'coshm', 'sinhm',
+    'tanhm', 'logm', 'funm', 'signm', 'sqrtm',
+    'expm_frechet', 'expm_cond', 'fractional_matrix_power',
+    'khatri_rao', 'norm', 'solve', 'inv', 'svd', 'schur', 'rsf2csf'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="matfuncs",
+                                   private_modules=["_matfuncs"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/misc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/misc.py
new file mode 100644
index 0000000000000000000000000000000000000000..1fad087489c6a24c8e33df54b811b6c37a3a46d4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/misc.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'LinAlgError', 'LinAlgWarning', 'norm', 'get_blas_funcs',
+    'get_lapack_funcs'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="misc",
+                                   private_modules=["_misc"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py
new file mode 100644
index 0000000000000000000000000000000000000000..a881ce765dfa3a3c4c2853c405f8129aafc615b5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/special_matrices.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'toeplitz', 'circulant', 'hankel',
+    'hadamard', 'leslie', 'kron', 'block_diag', 'companion',
+    'helmert', 'hilbert', 'invhilbert', 'pascal', 'invpascal', 'dft',
+    'fiedler', 'fiedler_companion', 'convolution_matrix'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="linalg", module="special_matrices",
+                                   private_modules=["_special_matrices"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/extending.pyx b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/extending.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..3954d08791cceb3a2b66669fe3c0ec4180089208
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/extending.pyx
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+#cython: language_level=3
+#cython: boundscheck=False
+#cython: wraparound=False
+
+cimport scipy.linalg
+from scipy.linalg.cython_blas cimport cdotu
+from scipy.linalg.cython_lapack cimport dgtsv
+
+cpdef tridiag(double[:] a, double[:] b, double[:] c, double[:] x):
+    """ Solve the system A y = x for y where A is the tridiagonal matrix with
+    subdiagonal 'a', diagonal 'b', and superdiagonal 'c'. """
+    cdef int n=b.shape[0], nrhs=1, info
+    # Solution is written over the values in x.
+    dgtsv(&n, &nrhs, &a[0], &b[0], &c[0], &x[0], &n, &info)
+
+cpdef float complex complex_dot(float complex[:] cx, float complex[:] cy):
+    """ Take dot product of two complex vectors """
+    cdef:
+        int n = cx.shape[0]
+        int incx = cx.strides[0] // sizeof(cx[0])
+        int incy = cy.strides[0] // sizeof(cy[0])
+    return cdotu(&n, &cx[0], &incx, &cy[0], &incy)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/meson.build b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..88f23170ac0bbe382d8470bd22a42a92d9473008
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/_cython_examples/meson.build
@@ -0,0 +1,27 @@
+project('random-build-examples', 'c', 'cpp', 'cython')
+
+fs = import('fs')
+
+py3 = import('python').find_installation(pure: false)
+
+cy = meson.get_compiler('cython')
+
+if not cy.version().version_compare('>=3.0.8')
+  error('tests requires Cython >= 3.0.8')
+endif
+
+py3.extension_module(
+  'extending',
+  'extending.pyx',
+  install: false,
+  c_args: ['-DCYTHON_CCOMPLEX=0'] # see gh-18975 for why we need this
+)
+
+extending_cpp = fs.copyfile('extending.pyx', 'extending_cpp.pyx')
+py3.extension_module(
+  'extending_cpp',
+  extending_cpp,
+  install: false,
+  override_options : ['cython_language=cpp'],
+  cpp_args: ['-DCYTHON_CCOMPLEX=0'] # see gh-18975 for why we need this
+)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_basic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_basic.py
new file mode 100644
index 0000000000000000000000000000000000000000..fe51dcc21824ae122a17376940d43e34ec9ac22c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_basic.py
@@ -0,0 +1,2059 @@
+import itertools
+
+import numpy as np
+from numpy import (arange, array, dot, zeros, identity, conjugate, transpose,
+                   float32)
+from numpy.random import random
+
+from numpy.testing import (assert_equal, assert_almost_equal, assert_,
+                           assert_array_almost_equal, assert_allclose,
+                           assert_array_equal, suppress_warnings)
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.linalg import (solve, inv, det, lstsq, pinv, pinvh, norm,
+                          solve_banded, solveh_banded, solve_triangular,
+                          solve_circulant, circulant, LinAlgError, block_diag,
+                          matrix_balance, qr, LinAlgWarning)
+
+from scipy.linalg._testutils import assert_no_overwrite
+from scipy._lib._testutils import check_free_memory, IS_MUSL
+from scipy.linalg.blas import HAS_ILP64
+
+REAL_DTYPES = (np.float32, np.float64, np.longdouble)
+COMPLEX_DTYPES = (np.complex64, np.complex128, np.clongdouble)
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+def _eps_cast(dtyp):
+    """Get the epsilon for dtype, possibly downcast to BLAS types."""
+    dt = dtyp
+    if dt == np.longdouble:
+        dt = np.float64
+    elif dt == np.clongdouble:
+        dt = np.complex128
+    return np.finfo(dt).eps
+
+
+class TestSolveBanded:
+
+    def test_real(self):
+        a = array([[1.0, 20, 0, 0],
+                   [-30, 4, 6, 0],
+                   [2, 1, 20, 2],
+                   [0, -1, 7, 14]])
+        ab = array([[0.0, 20, 6, 2],
+                    [1, 4, 20, 14],
+                    [-30, 1, 7, 0],
+                    [2, -1, 0, 0]])
+        l, u = 2, 1
+        b4 = array([10.0, 0.0, 2.0, 14.0])
+        b4by1 = b4.reshape(-1, 1)
+        b4by2 = array([[2, 1],
+                       [-30, 4],
+                       [2, 3],
+                       [1, 3]])
+        b4by4 = array([[1, 0, 0, 0],
+                       [0, 0, 0, 1],
+                       [0, 1, 0, 0],
+                       [0, 1, 0, 0]])
+        for b in [b4, b4by1, b4by2, b4by4]:
+            x = solve_banded((l, u), ab, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_complex(self):
+        a = array([[1.0, 20, 0, 0],
+                   [-30, 4, 6, 0],
+                   [2j, 1, 20, 2j],
+                   [0, -1, 7, 14]])
+        ab = array([[0.0, 20, 6, 2j],
+                    [1, 4, 20, 14],
+                    [-30, 1, 7, 0],
+                    [2j, -1, 0, 0]])
+        l, u = 2, 1
+        b4 = array([10.0, 0.0, 2.0, 14.0j])
+        b4by1 = b4.reshape(-1, 1)
+        b4by2 = array([[2, 1],
+                       [-30, 4],
+                       [2, 3],
+                       [1, 3]])
+        b4by4 = array([[1, 0, 0, 0],
+                       [0, 0, 0, 1j],
+                       [0, 1, 0, 0],
+                       [0, 1, 0, 0]])
+        for b in [b4, b4by1, b4by2, b4by4]:
+            x = solve_banded((l, u), ab, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_tridiag_real(self):
+        ab = array([[0.0, 20, 6, 2],
+                   [1, 4, 20, 14],
+                   [-30, 1, 7, 0]])
+        a = np.diag(ab[0, 1:], 1) + np.diag(ab[1, :], 0) + np.diag(
+                                                                ab[2, :-1], -1)
+        b4 = array([10.0, 0.0, 2.0, 14.0])
+        b4by1 = b4.reshape(-1, 1)
+        b4by2 = array([[2, 1],
+                       [-30, 4],
+                       [2, 3],
+                       [1, 3]])
+        b4by4 = array([[1, 0, 0, 0],
+                       [0, 0, 0, 1],
+                       [0, 1, 0, 0],
+                       [0, 1, 0, 0]])
+        for b in [b4, b4by1, b4by2, b4by4]:
+            x = solve_banded((1, 1), ab, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_tridiag_complex(self):
+        ab = array([[0.0, 20, 6, 2j],
+                   [1, 4, 20, 14],
+                   [-30, 1, 7, 0]])
+        a = np.diag(ab[0, 1:], 1) + np.diag(ab[1, :], 0) + np.diag(
+                                                               ab[2, :-1], -1)
+        b4 = array([10.0, 0.0, 2.0, 14.0j])
+        b4by1 = b4.reshape(-1, 1)
+        b4by2 = array([[2, 1],
+                       [-30, 4],
+                       [2, 3],
+                       [1, 3]])
+        b4by4 = array([[1, 0, 0, 0],
+                       [0, 0, 0, 1],
+                       [0, 1, 0, 0],
+                       [0, 1, 0, 0]])
+        for b in [b4, b4by1, b4by2, b4by4]:
+            x = solve_banded((1, 1), ab, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_check_finite(self):
+        a = array([[1.0, 20, 0, 0],
+                   [-30, 4, 6, 0],
+                   [2, 1, 20, 2],
+                   [0, -1, 7, 14]])
+        ab = array([[0.0, 20, 6, 2],
+                    [1, 4, 20, 14],
+                    [-30, 1, 7, 0],
+                    [2, -1, 0, 0]])
+        l, u = 2, 1
+        b4 = array([10.0, 0.0, 2.0, 14.0])
+        x = solve_banded((l, u), ab, b4, check_finite=False)
+        assert_array_almost_equal(dot(a, x), b4)
+
+    def test_bad_shape(self):
+        ab = array([[0.0, 20, 6, 2],
+                    [1, 4, 20, 14],
+                    [-30, 1, 7, 0],
+                    [2, -1, 0, 0]])
+        l, u = 2, 1
+        bad = array([1.0, 2.0, 3.0, 4.0]).reshape(-1, 4)
+        assert_raises(ValueError, solve_banded, (l, u), ab, bad)
+        assert_raises(ValueError, solve_banded, (l, u), ab, [1.0, 2.0])
+
+        # Values of (l,u) are not compatible with ab.
+        assert_raises(ValueError, solve_banded, (1, 1), ab, [1.0, 2.0])
+
+    def test_1x1(self):
+        # gh-8906 noted that the case of A@x = b with 1x1 A was handled
+        # incorrectly; check that this is resolved. Typical case:
+        # nupper == nlower == 0
+        # A = [[2]]
+        b = array([[1., 2., 3.]])
+        ref = array([[0.5, 1.0, 1.5]])
+        x = solve_banded((0, 0), [[2]], b)
+        assert_allclose(x, ref, rtol=1e-15)
+
+        # However, the user *can* represent the same system with garbage rows
+        # in `ab`. Test the case with `nupper == 1, nlower == 1`.
+        x = solve_banded((1, 1), [[0], [2], [0]], b)
+        assert_allclose(x, ref, rtol=1e-15)
+        assert_equal(x.dtype, np.dtype('f8'))
+        assert_array_equal(b, [[1.0, 2.0, 3.0]])
+
+    def test_native_list_arguments(self):
+        a = [[1.0, 20, 0, 0],
+             [-30, 4, 6, 0],
+             [2, 1, 20, 2],
+             [0, -1, 7, 14]]
+        ab = [[0.0, 20, 6, 2],
+              [1, 4, 20, 14],
+              [-30, 1, 7, 0],
+              [2, -1, 0, 0]]
+        l, u = 2, 1
+        b = [10.0, 0.0, 2.0, 14.0]
+        x = solve_banded((l, u), ab, b)
+        assert_array_almost_equal(dot(a, x), b)
+
+    @pytest.mark.thread_unsafe  # due to Cython fused types, see cython#6506
+    @pytest.mark.parametrize('dt_ab', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt_ab, dt_b):
+        # ab contains one empty row corresponding to the diagonal
+        ab = np.array([[]], dtype=dt_ab)
+        b = np.array([], dtype=dt_b)
+        x = solve_banded((0, 0), ab, b)
+
+        assert x.shape == (0,)
+        assert x.dtype == solve(np.eye(1, dtype=dt_ab), np.ones(1, dtype=dt_b)).dtype
+
+        b = np.empty((0, 0), dtype=dt_b)
+        x = solve_banded((0, 0), ab, b)
+
+        assert x.shape == (0, 0)
+        assert x.dtype == solve(np.eye(1, dtype=dt_ab), np.ones(1, dtype=dt_b)).dtype
+
+
+class TestSolveHBanded:
+
+    def test_01_upper(self):
+        # Solve
+        # [ 4 1 2 0]     [1]
+        # [ 1 4 1 2] X = [4]
+        # [ 2 1 4 1]     [1]
+        # [ 0 2 1 4]     [2]
+        # with the RHS as a 1D array.
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, 1.0, 1.0, 1.0],
+                    [4.0, 4.0, 4.0, 4.0]])
+        b = array([1.0, 4.0, 1.0, 2.0])
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0, 0.0])
+
+    def test_02_upper(self):
+        # Solve
+        # [ 4 1 2 0]     [1 6]
+        # [ 1 4 1 2] X = [4 2]
+        # [ 2 1 4 1]     [1 6]
+        # [ 0 2 1 4]     [2 1]
+        #
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, 1.0, 1.0, 1.0],
+                    [4.0, 4.0, 4.0, 4.0]])
+        b = array([[1.0, 6.0],
+                   [4.0, 2.0],
+                   [1.0, 6.0],
+                   [2.0, 1.0]])
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0],
+                          [0.0, 0.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_03_upper(self):
+        # Solve
+        # [ 4 1 2 0]     [1]
+        # [ 1 4 1 2] X = [4]
+        # [ 2 1 4 1]     [1]
+        # [ 0 2 1 4]     [2]
+        # with the RHS as a 2D array with shape (3,1).
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, 1.0, 1.0, 1.0],
+                    [4.0, 4.0, 4.0, 4.0]])
+        b = array([1.0, 4.0, 1.0, 2.0]).reshape(-1, 1)
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, array([0., 1., 0., 0.]).reshape(-1, 1))
+
+    def test_01_lower(self):
+        # Solve
+        # [ 4 1 2 0]     [1]
+        # [ 1 4 1 2] X = [4]
+        # [ 2 1 4 1]     [1]
+        # [ 0 2 1 4]     [2]
+        #
+        ab = array([[4.0, 4.0, 4.0, 4.0],
+                    [1.0, 1.0, 1.0, -99],
+                    [2.0, 2.0, 0.0, 0.0]])
+        b = array([1.0, 4.0, 1.0, 2.0])
+        x = solveh_banded(ab, b, lower=True)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0, 0.0])
+
+    def test_02_lower(self):
+        # Solve
+        # [ 4 1 2 0]     [1 6]
+        # [ 1 4 1 2] X = [4 2]
+        # [ 2 1 4 1]     [1 6]
+        # [ 0 2 1 4]     [2 1]
+        #
+        ab = array([[4.0, 4.0, 4.0, 4.0],
+                    [1.0, 1.0, 1.0, -99],
+                    [2.0, 2.0, 0.0, 0.0]])
+        b = array([[1.0, 6.0],
+                   [4.0, 2.0],
+                   [1.0, 6.0],
+                   [2.0, 1.0]])
+        x = solveh_banded(ab, b, lower=True)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0],
+                          [0.0, 0.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_01_float32(self):
+        # Solve
+        # [ 4 1 2 0]     [1]
+        # [ 1 4 1 2] X = [4]
+        # [ 2 1 4 1]     [1]
+        # [ 0 2 1 4]     [2]
+        #
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, 1.0, 1.0, 1.0],
+                    [4.0, 4.0, 4.0, 4.0]], dtype=float32)
+        b = array([1.0, 4.0, 1.0, 2.0], dtype=float32)
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0, 0.0])
+
+    def test_02_float32(self):
+        # Solve
+        # [ 4 1 2 0]     [1 6]
+        # [ 1 4 1 2] X = [4 2]
+        # [ 2 1 4 1]     [1 6]
+        # [ 0 2 1 4]     [2 1]
+        #
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, 1.0, 1.0, 1.0],
+                    [4.0, 4.0, 4.0, 4.0]], dtype=float32)
+        b = array([[1.0, 6.0],
+                   [4.0, 2.0],
+                   [1.0, 6.0],
+                   [2.0, 1.0]], dtype=float32)
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0],
+                          [0.0, 0.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_01_complex(self):
+        # Solve
+        # [ 4 -j  2  0]     [2-j]
+        # [ j  4 -j  2] X = [4-j]
+        # [ 2  j  4 -j]     [4+j]
+        # [ 0  2  j  4]     [2+j]
+        #
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, -1.0j, -1.0j, -1.0j],
+                    [4.0, 4.0, 4.0, 4.0]])
+        b = array([2-1.0j, 4.0-1j, 4+1j, 2+1j])
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 1.0, 0.0])
+
+    def test_02_complex(self):
+        # Solve
+        # [ 4 -j  2  0]     [2-j 2+4j]
+        # [ j  4 -j  2] X = [4-j -1-j]
+        # [ 2  j  4 -j]     [4+j 4+2j]
+        # [ 0  2  j  4]     [2+j j]
+        #
+        ab = array([[0.0, 0.0, 2.0, 2.0],
+                    [-99, -1.0j, -1.0j, -1.0j],
+                    [4.0, 4.0, 4.0, 4.0]])
+        b = array([[2-1j, 2+4j],
+                   [4.0-1j, -1-1j],
+                   [4.0+1j, 4+2j],
+                   [2+1j, 1j]])
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0j],
+                          [1.0, 0.0],
+                          [1.0, 1.0],
+                          [0.0, 0.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_tridiag_01_upper(self):
+        # Solve
+        # [ 4 1 0]     [1]
+        # [ 1 4 1] X = [4]
+        # [ 0 1 4]     [1]
+        # with the RHS as a 1D array.
+        ab = array([[-99, 1.0, 1.0], [4.0, 4.0, 4.0]])
+        b = array([1.0, 4.0, 1.0])
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0])
+
+    def test_tridiag_02_upper(self):
+        # Solve
+        # [ 4 1 0]     [1 4]
+        # [ 1 4 1] X = [4 2]
+        # [ 0 1 4]     [1 4]
+        #
+        ab = array([[-99, 1.0, 1.0],
+                    [4.0, 4.0, 4.0]])
+        b = array([[1.0, 4.0],
+                   [4.0, 2.0],
+                   [1.0, 4.0]])
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_tridiag_03_upper(self):
+        # Solve
+        # [ 4 1 0]     [1]
+        # [ 1 4 1] X = [4]
+        # [ 0 1 4]     [1]
+        # with the RHS as a 2D array with shape (3,1).
+        ab = array([[-99, 1.0, 1.0], [4.0, 4.0, 4.0]])
+        b = array([1.0, 4.0, 1.0]).reshape(-1, 1)
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, array([0.0, 1.0, 0.0]).reshape(-1, 1))
+
+    def test_tridiag_01_lower(self):
+        # Solve
+        # [ 4 1 0]     [1]
+        # [ 1 4 1] X = [4]
+        # [ 0 1 4]     [1]
+        #
+        ab = array([[4.0, 4.0, 4.0],
+                    [1.0, 1.0, -99]])
+        b = array([1.0, 4.0, 1.0])
+        x = solveh_banded(ab, b, lower=True)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0])
+
+    def test_tridiag_02_lower(self):
+        # Solve
+        # [ 4 1 0]     [1 4]
+        # [ 1 4 1] X = [4 2]
+        # [ 0 1 4]     [1 4]
+        #
+        ab = array([[4.0, 4.0, 4.0],
+                    [1.0, 1.0, -99]])
+        b = array([[1.0, 4.0],
+                   [4.0, 2.0],
+                   [1.0, 4.0]])
+        x = solveh_banded(ab, b, lower=True)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_tridiag_01_float32(self):
+        # Solve
+        # [ 4 1 0]     [1]
+        # [ 1 4 1] X = [4]
+        # [ 0 1 4]     [1]
+        #
+        ab = array([[-99, 1.0, 1.0], [4.0, 4.0, 4.0]], dtype=float32)
+        b = array([1.0, 4.0, 1.0], dtype=float32)
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0])
+
+    def test_tridiag_02_float32(self):
+        # Solve
+        # [ 4 1 0]     [1 4]
+        # [ 1 4 1] X = [4 2]
+        # [ 0 1 4]     [1 4]
+        #
+        ab = array([[-99, 1.0, 1.0],
+                    [4.0, 4.0, 4.0]], dtype=float32)
+        b = array([[1.0, 4.0],
+                   [4.0, 2.0],
+                   [1.0, 4.0]], dtype=float32)
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0],
+                          [1.0, 0.0],
+                          [0.0, 1.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_tridiag_01_complex(self):
+        # Solve
+        # [ 4 -j 0]     [ -j]
+        # [ j 4 -j] X = [4-j]
+        # [ 0 j  4]     [4+j]
+        #
+        ab = array([[-99, -1.0j, -1.0j], [4.0, 4.0, 4.0]])
+        b = array([-1.0j, 4.0-1j, 4+1j])
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 1.0])
+
+    def test_tridiag_02_complex(self):
+        # Solve
+        # [ 4 -j 0]     [ -j    4j]
+        # [ j 4 -j] X = [4-j  -1-j]
+        # [ 0 j  4]     [4+j   4  ]
+        #
+        ab = array([[-99, -1.0j, -1.0j],
+                    [4.0, 4.0, 4.0]])
+        b = array([[-1j, 4.0j],
+                   [4.0-1j, -1.0-1j],
+                   [4.0+1j, 4.0]])
+        x = solveh_banded(ab, b)
+        expected = array([[0.0, 1.0j],
+                          [1.0, 0.0],
+                          [1.0, 1.0]])
+        assert_array_almost_equal(x, expected)
+
+    def test_check_finite(self):
+        # Solve
+        # [ 4 1 0]     [1]
+        # [ 1 4 1] X = [4]
+        # [ 0 1 4]     [1]
+        # with the RHS as a 1D array.
+        ab = array([[-99, 1.0, 1.0], [4.0, 4.0, 4.0]])
+        b = array([1.0, 4.0, 1.0])
+        x = solveh_banded(ab, b, check_finite=False)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0])
+
+    def test_bad_shapes(self):
+        ab = array([[-99, 1.0, 1.0],
+                    [4.0, 4.0, 4.0]])
+        b = array([[1.0, 4.0],
+                   [4.0, 2.0]])
+        assert_raises(ValueError, solveh_banded, ab, b)
+        assert_raises(ValueError, solveh_banded, ab, [1.0, 2.0])
+        assert_raises(ValueError, solveh_banded, ab, [1.0])
+
+    def test_1x1(self):
+        x = solveh_banded([[1]], [[1, 2, 3]])
+        assert_array_equal(x, [[1.0, 2.0, 3.0]])
+        assert_equal(x.dtype, np.dtype('f8'))
+
+    def test_native_list_arguments(self):
+        # Same as test_01_upper, using python's native list.
+        ab = [[0.0, 0.0, 2.0, 2.0],
+              [-99, 1.0, 1.0, 1.0],
+              [4.0, 4.0, 4.0, 4.0]]
+        b = [1.0, 4.0, 1.0, 2.0]
+        x = solveh_banded(ab, b)
+        assert_array_almost_equal(x, [0.0, 1.0, 0.0, 0.0])
+
+    @pytest.mark.parametrize('dt_ab', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt_ab, dt_b):
+        # ab contains one empty row corresponding to the diagonal
+        ab = np.array([[]], dtype=dt_ab)
+        b = np.array([], dtype=dt_b)
+        x = solveh_banded(ab, b)
+
+        assert x.shape == (0,)
+        assert x.dtype == solve(np.eye(1, dtype=dt_ab), np.ones(1, dtype=dt_b)).dtype
+
+        b = np.empty((0, 0), dtype=dt_b)
+        x = solveh_banded(ab, b)
+
+        assert x.shape == (0, 0)
+        assert x.dtype == solve(np.eye(1, dtype=dt_ab), np.ones(1, dtype=dt_b)).dtype
+
+
+class TestSolve:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    @pytest.mark.thread_unsafe
+    def test_20Feb04_bug(self):
+        a = [[1, 1], [1.0, 0]]  # ok
+        x0 = solve(a, [1, 0j])
+        assert_array_almost_equal(dot(a, x0), [1, 0])
+
+        # gives failure with clapack.zgesv(..,rowmajor=0)
+        a = [[1, 1], [1.2, 0]]
+        b = [1, 0j]
+        x0 = solve(a, b)
+        assert_array_almost_equal(dot(a, x0), [1, 0])
+
+    def test_simple(self):
+        a = [[1, 20], [-30, 4]]
+        for b in ([[1, 0], [0, 1]],
+                  [1, 0],
+                  [[2, 1], [-30, 4]]
+                  ):
+            x = solve(a, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_complex(self):
+        a = array([[5, 2], [2j, 4]], 'D')
+        for b in ([1j, 0],
+                  [[1j, 1j], [0, 2]],
+                  [1, 0j],
+                  array([1, 0], 'D'),
+                  ):
+            x = solve(a, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_pos(self):
+        a = [[2, 3], [3, 5]]
+        for lower in [0, 1]:
+            for b in ([[1, 0], [0, 1]],
+                      [1, 0]
+                      ):
+                x = solve(a, b, assume_a='pos', lower=lower)
+                assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_pos_complexb(self):
+        a = [[5, 2], [2, 4]]
+        for b in ([1j, 0],
+                  [[1j, 1j], [0, 2]],
+                  ):
+            x = solve(a, b, assume_a='pos')
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_sym(self):
+        a = [[2, 3], [3, -5]]
+        for lower in [0, 1]:
+            for b in ([[1, 0], [0, 1]],
+                      [1, 0]
+                      ):
+                x = solve(a, b, assume_a='sym', lower=lower)
+                assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_sym_complexb(self):
+        a = [[5, 2], [2, -4]]
+        for b in ([1j, 0],
+                  [[1j, 1j], [0, 2]]
+                  ):
+            x = solve(a, b, assume_a='sym')
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_sym_complex(self):
+        a = [[5, 2+1j], [2+1j, -4]]
+        for b in ([1j, 0],
+                  [1, 0],
+                  [[1j, 1j], [0, 2]]
+                  ):
+            x = solve(a, b, assume_a='sym')
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_her_actuallysym(self):
+        a = [[2, 3], [3, -5]]
+        for lower in [0, 1]:
+            for b in ([[1, 0], [0, 1]],
+                      [1, 0],
+                      [1j, 0],
+                      ):
+                x = solve(a, b, assume_a='her', lower=lower)
+                assert_array_almost_equal(dot(a, x), b)
+
+    def test_simple_her(self):
+        a = [[5, 2+1j], [2-1j, -4]]
+        for b in ([1j, 0],
+                  [1, 0],
+                  [[1j, 1j], [0, 2]]
+                  ):
+            x = solve(a, b, assume_a='her')
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_nils_20Feb04(self):
+        n = 2
+        A = random([n, n])+random([n, n])*1j
+        X = zeros((n, n), 'D')
+        Ainv = inv(A)
+        R = identity(n)+identity(n)*0j
+        for i in arange(0, n):
+            r = R[:, i]
+            X[:, i] = solve(A, r)
+        assert_array_almost_equal(X, Ainv)
+
+    def test_random(self):
+
+        n = 20
+        a = random([n, n])
+        for i in range(n):
+            a[i, i] = 20*(.1+a[i, i])
+        for i in range(4):
+            b = random([n, 3])
+            x = solve(a, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_random_complex(self):
+        n = 20
+        a = random([n, n]) + 1j * random([n, n])
+        for i in range(n):
+            a[i, i] = 20*(.1+a[i, i])
+        for i in range(2):
+            b = random([n, 3])
+            x = solve(a, b)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_random_sym(self):
+        n = 20
+        a = random([n, n])
+        for i in range(n):
+            a[i, i] = abs(20*(.1+a[i, i]))
+            for j in range(i):
+                a[i, j] = a[j, i]
+        for i in range(4):
+            b = random([n])
+            x = solve(a, b, assume_a="pos")
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_random_sym_complex(self):
+        n = 20
+        a = random([n, n])
+        a = a + 1j*random([n, n])
+        for i in range(n):
+            a[i, i] = abs(20*(.1+a[i, i]))
+            for j in range(i):
+                a[i, j] = conjugate(a[j, i])
+        b = random([n])+2j*random([n])
+        for i in range(2):
+            x = solve(a, b, assume_a="pos")
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_check_finite(self):
+        a = [[1, 20], [-30, 4]]
+        for b in ([[1, 0], [0, 1]], [1, 0],
+                  [[2, 1], [-30, 4]]):
+            x = solve(a, b, check_finite=False)
+            assert_array_almost_equal(dot(a, x), b)
+
+    def test_scalar_a_and_1D_b(self):
+        a = 1
+        b = [1, 2, 3]
+        x = solve(a, b)
+        assert_array_almost_equal(x.ravel(), b)
+        assert_(x.shape == (3,), 'Scalar_a_1D_b test returned wrong shape')
+
+    def test_simple2(self):
+        a = np.array([[1.80, 2.88, 2.05, -0.89],
+                      [525.00, -295.00, -95.00, -380.00],
+                      [1.58, -2.69, -2.90, -1.04],
+                      [-1.11, -0.66, -0.59, 0.80]])
+
+        b = np.array([[9.52, 18.47],
+                      [2435.00, 225.00],
+                      [0.77, -13.28],
+                      [-6.22, -6.21]])
+
+        x = solve(a, b)
+        assert_array_almost_equal(x, np.array([[1., -1, 3, -5],
+                                               [3, 2, 4, 1]]).T)
+
+    def test_simple_complex2(self):
+        a = np.array([[-1.34+2.55j, 0.28+3.17j, -6.39-2.20j, 0.72-0.92j],
+                      [-1.70-14.10j, 33.10-1.50j, -1.50+13.40j, 12.90+13.80j],
+                      [-3.29-2.39j, -1.91+4.42j, -0.14-1.35j, 1.72+1.35j],
+                      [2.41+0.39j, -0.56+1.47j, -0.83-0.69j, -1.96+0.67j]])
+
+        b = np.array([[26.26+51.78j, 31.32-6.70j],
+                      [64.30-86.80j, 158.60-14.20j],
+                      [-5.75+25.31j, -2.15+30.19j],
+                      [1.16+2.57j, -2.56+7.55j]])
+
+        x = solve(a, b)
+        assert_array_almost_equal(x, np. array([[1+1.j, -1-2.j],
+                                                [2-3.j, 5+1.j],
+                                                [-4-5.j, -3+4.j],
+                                                [6.j, 2-3.j]]))
+
+    def test_hermitian(self):
+        # An upper triangular matrix will be used for hermitian matrix a
+        a = np.array([[-1.84, 0.11-0.11j, -1.78-1.18j, 3.91-1.50j],
+                      [0, -4.63, -1.84+0.03j, 2.21+0.21j],
+                      [0, 0, -8.87, 1.58-0.90j],
+                      [0, 0, 0, -1.36]])
+        b = np.array([[2.98-10.18j, 28.68-39.89j],
+                      [-9.58+3.88j, -24.79-8.40j],
+                      [-0.77-16.05j, 4.23-70.02j],
+                      [7.79+5.48j, -35.39+18.01j]])
+        res = np.array([[2.+1j, -8+6j],
+                        [3.-2j, 7-2j],
+                        [-1+2j, -1+5j],
+                        [1.-1j, 3-4j]])
+        x = solve(a, b, assume_a='her')
+        assert_array_almost_equal(x, res)
+        # Also conjugate a and test for lower triangular data
+        x = solve(a.conj().T, b, assume_a='her', lower=True)
+        assert_array_almost_equal(x, res)
+
+    def test_pos_and_sym(self):
+        A = np.arange(1, 10).reshape(3, 3)
+        x = solve(np.tril(A)/9, np.ones(3), assume_a='pos')
+        assert_array_almost_equal(x, [9., 1.8, 1.])
+        x = solve(np.tril(A)/9, np.ones(3), assume_a='sym')
+        assert_array_almost_equal(x, [9., 1.8, 1.])
+
+    def test_singularity(self):
+        a = np.array([[1, 0, 0, 0, 0, 0, 1, 0, 1],
+                      [1, 1, 1, 0, 0, 0, 1, 0, 1],
+                      [0, 1, 1, 0, 0, 0, 1, 0, 1],
+                      [1, 0, 1, 1, 1, 1, 0, 0, 0],
+                      [1, 0, 1, 1, 1, 1, 0, 0, 0],
+                      [1, 0, 1, 1, 1, 1, 0, 0, 0],
+                      [1, 0, 1, 1, 1, 1, 0, 0, 0],
+                      [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                      [1, 1, 1, 1, 1, 1, 1, 1, 1]])
+        b = np.arange(9)[:, None]
+        assert_raises(LinAlgError, solve, a, b)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('structure',
+                             ('diagonal', 'tridiagonal', 'lower triangular',
+                              'upper triangular', 'symmetric', 'hermitian',
+                              'positive definite', 'general', None))
+    def test_ill_condition_warning(self, structure):
+        rng = np.random.default_rng(234859349452)
+        n = 10
+        d = np.logspace(0, 50, n)
+        A = np.diag(d)
+        b = rng.random(size=n)
+        message = "Ill-conditioned matrix..."
+        with pytest.warns(LinAlgWarning, match=message):
+            solve(A, b, assume_a=structure)
+
+    def test_multiple_rhs(self):
+        a = np.eye(2)
+        b = np.random.rand(2, 3, 4)
+        x = solve(a, b)
+        assert_array_almost_equal(x, b)
+
+    def test_transposed_keyword(self):
+        A = np.arange(9).reshape(3, 3) + 1
+        x = solve(np.tril(A)/9, np.ones(3), transposed=True)
+        assert_array_almost_equal(x, [1.2, 0.2, 1])
+        x = solve(np.tril(A)/9, np.ones(3), transposed=False)
+        assert_array_almost_equal(x, [9, -5.4, -1.2])
+
+    def test_transposed_notimplemented(self):
+        a = np.eye(3).astype(complex)
+        with assert_raises(NotImplementedError):
+            solve(a, a, transposed=True)
+
+    def test_nonsquare_a(self):
+        assert_raises(ValueError, solve, [1, 2], 1)
+
+    def test_size_mismatch_with_1D_b(self):
+        assert_array_almost_equal(solve(np.eye(3), np.ones(3)), np.ones(3))
+        assert_raises(ValueError, solve, np.eye(3), np.ones(4))
+
+    def test_assume_a_keyword(self):
+        assert_raises(ValueError, solve, 1, 1, assume_a='zxcv')
+
+    @pytest.mark.skip(reason="Failure on OS X (gh-7500), "
+                             "crash on Windows (gh-8064)")
+    def test_all_type_size_routine_combinations(self):
+        sizes = [10, 100]
+        assume_as = ['gen', 'sym', 'pos', 'her']
+        dtypes = [np.float32, np.float64, np.complex64, np.complex128]
+        for size, assume_a, dtype in itertools.product(sizes, assume_as,
+                                                       dtypes):
+            is_complex = dtype in (np.complex64, np.complex128)
+            if assume_a == 'her' and not is_complex:
+                continue
+
+            err_msg = (f"Failed for size: {size}, assume_a: {assume_a},"
+                       f"dtype: {dtype}")
+
+            a = np.random.randn(size, size).astype(dtype)
+            b = np.random.randn(size).astype(dtype)
+            if is_complex:
+                a = a + (1j*np.random.randn(size, size)).astype(dtype)
+
+            if assume_a == 'sym':  # Can still be complex but only symmetric
+                a = a + a.T
+            elif assume_a == 'her':  # Handle hermitian matrices here instead
+                a = a + a.T.conj()
+            elif assume_a == 'pos':
+                a = a.conj().T.dot(a) + 0.1*np.eye(size)
+
+            tol = 1e-12 if dtype in (np.float64, np.complex128) else 1e-6
+
+            if assume_a in ['gen', 'sym', 'her']:
+                # We revert the tolerance from before
+                #   4b4a6e7c34fa4060533db38f9a819b98fa81476c
+                if dtype in (np.float32, np.complex64):
+                    tol *= 10
+
+            x = solve(a, b, assume_a=assume_a)
+            assert_allclose(a.dot(x), b,
+                            atol=tol * size,
+                            rtol=tol * size,
+                            err_msg=err_msg)
+
+            if assume_a == 'sym' and dtype not in (np.complex64,
+                                                   np.complex128):
+                x = solve(a, b, assume_a=assume_a, transposed=True)
+                assert_allclose(a.dot(x), b,
+                                atol=tol * size,
+                                rtol=tol * size,
+                                err_msg=err_msg)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('dt_a', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt_a, dt_b):
+        a = np.empty((0, 0), dtype=dt_a)
+        b = np.empty(0, dtype=dt_b)
+        x = solve(a, b)
+
+        assert x.size == 0
+        dt_nonempty = solve(np.eye(2, dtype=dt_a), np.ones(2, dtype=dt_b)).dtype
+        assert x.dtype == dt_nonempty
+
+    def test_empty_rhs(self):
+        a = np.eye(2)
+        b = [[], []]
+        x = solve(a, b)
+        assert_(x.size == 0, 'Returned array is not empty')
+        assert_(x.shape == (2, 0), 'Returned empty array shape is wrong')
+
+    @pytest.mark.parametrize('dtype', [np.float64, np.complex128])
+    # "pos" and "positive definite" need to be added
+    @pytest.mark.parametrize('assume_a', ['diagonal', 'tridiagonal', 'banded',
+                                          'lower triangular', 'upper triangular',
+                                          'symmetric', 'hermitian',
+                                          'general', 'sym', 'her', 'gen'])
+    @pytest.mark.parametrize('nrhs', [(), (5,)])
+    @pytest.mark.parametrize('transposed', [True, False])
+    @pytest.mark.parametrize('overwrite', [True, False])
+    @pytest.mark.parametrize('fortran', [True, False])
+    def test_structure_detection(self, dtype, assume_a, nrhs, transposed,
+                                 overwrite, fortran):
+        rng = np.random.default_rng(982345982439826)
+        n = 5 if not assume_a == 'banded' else 20
+        b = rng.random(size=(n,) + nrhs)
+        A = rng.random(size=(n, n))
+
+        if np.issubdtype(dtype, np.complexfloating):
+            b = b + rng.random(size=(n,) + nrhs) * 1j
+            A = A + rng.random(size=(n, n)) * 1j
+
+        if assume_a == 'diagonal':
+            A = np.diag(np.diag(A))
+        elif assume_a == 'lower triangular':
+            A = np.tril(A)
+        elif assume_a == 'upper triangular':
+            A = np.triu(A)
+        elif assume_a == 'tridiagonal':
+            A = (np.diag(np.diag(A))
+                 + np.diag(np.diag(A, -1), -1)
+                 + np.diag(np.diag(A, 1), 1))
+        elif assume_a == 'banded':
+            A = np.triu(np.tril(A, 2), -1)
+        elif assume_a in {'symmetric', 'sym'}:
+            A = A + A.T
+        elif assume_a in {'hermitian', 'her'}:
+            A = A + A.conj().T
+        elif assume_a in {'positive definite', 'pos'}:
+            A = A + A.T
+            A += np.diag(A.sum(axis=1))
+
+        if fortran:
+            A = np.asfortranarray(A)
+
+        A_copy = A.copy(order='A')
+        b_copy = b.copy()
+
+        if np.issubdtype(dtype, np.complexfloating) and transposed:
+            message = "scipy.linalg.solve can currently..."
+            with pytest.raises(NotImplementedError, match=message):
+                solve(A, b, overwrite_a=overwrite, overwrite_b=overwrite,
+                      transposed=transposed)
+            return
+
+        res = solve(A, b, overwrite_a=overwrite, overwrite_b=overwrite,
+                    transposed=transposed, assume_a=assume_a)
+
+        # Check that solution this solution is *correct*
+        ref = np.linalg.solve(A_copy.T if transposed else A_copy, b_copy)
+        assert_allclose(res, ref)
+
+        # Check that `solve` correctly identifies the structure and returns
+        # *exactly* the same solution whether `assume_a` is specified or not
+        if assume_a != 'banded':  # structure detection removed for banded
+            assert_equal(solve(A_copy, b_copy, transposed=transposed), res)
+
+        # Check that overwrite was respected
+        if not overwrite:
+            assert_equal(A, A_copy)
+            assert_equal(b, b_copy)
+
+
+class TestSolveTriangular:
+
+    def test_simple(self):
+        """
+        solve_triangular on a simple 2x2 matrix.
+        """
+        A = array([[1, 0], [1, 2]])
+        b = [1, 1]
+        sol = solve_triangular(A, b, lower=True)
+        assert_array_almost_equal(sol, [1, 0])
+
+        # check that it works also for non-contiguous matrices
+        sol = solve_triangular(A.T, b, lower=False)
+        assert_array_almost_equal(sol, [.5, .5])
+
+        # and that it gives the same result as trans=1
+        sol = solve_triangular(A, b, lower=True, trans=1)
+        assert_array_almost_equal(sol, [.5, .5])
+
+        b = identity(2)
+        sol = solve_triangular(A, b, lower=True, trans=1)
+        assert_array_almost_equal(sol, [[1., -.5], [0, 0.5]])
+
+    def test_simple_complex(self):
+        """
+        solve_triangular on a simple 2x2 complex matrix
+        """
+        A = array([[1+1j, 0], [1j, 2]])
+        b = identity(2)
+        sol = solve_triangular(A, b, lower=True, trans=1)
+        assert_array_almost_equal(sol, [[.5-.5j, -.25-.25j], [0, 0.5]])
+
+        # check other option combinations with complex rhs
+        b = np.diag([1+1j, 1+2j])
+        sol = solve_triangular(A, b, lower=True, trans=0)
+        assert_array_almost_equal(sol, [[1, 0], [-0.5j, 0.5+1j]])
+
+        sol = solve_triangular(A, b, lower=True, trans=1)
+        assert_array_almost_equal(sol, [[1, 0.25-0.75j], [0, 0.5+1j]])
+
+        sol = solve_triangular(A, b, lower=True, trans=2)
+        assert_array_almost_equal(sol, [[1j, -0.75-0.25j], [0, 0.5+1j]])
+
+        sol = solve_triangular(A.T, b, lower=False, trans=0)
+        assert_array_almost_equal(sol, [[1, 0.25-0.75j], [0, 0.5+1j]])
+
+        sol = solve_triangular(A.T, b, lower=False, trans=1)
+        assert_array_almost_equal(sol, [[1, 0], [-0.5j, 0.5+1j]])
+
+        sol = solve_triangular(A.T, b, lower=False, trans=2)
+        assert_array_almost_equal(sol, [[1j, 0], [-0.5, 0.5+1j]])
+
+    def test_check_finite(self):
+        """
+        solve_triangular on a simple 2x2 matrix.
+        """
+        A = array([[1, 0], [1, 2]])
+        b = [1, 1]
+        sol = solve_triangular(A, b, lower=True, check_finite=False)
+        assert_array_almost_equal(sol, [1, 0])
+
+    @pytest.mark.parametrize('dt_a', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt_a, dt_b):
+        a = np.empty((0, 0), dtype=dt_a)
+        b = np.empty(0, dtype=dt_b)
+        x = solve_triangular(a, b)
+
+        assert x.size == 0
+        dt_nonempty = solve_triangular(
+            np.eye(2, dtype=dt_a), np.ones(2, dtype=dt_b)
+        ).dtype
+        assert x.dtype == dt_nonempty
+
+    def test_empty_rhs(self):
+        a = np.eye(2)
+        b = [[], []]
+        x = solve_triangular(a, b)
+        assert_(x.size == 0, 'Returned array is not empty')
+        assert_(x.shape == (2, 0), 'Returned empty array shape is wrong')
+
+
+class TestInv:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_simple(self):
+        a = [[1, 2], [3, 4]]
+        a_inv = inv(a)
+        assert_array_almost_equal(dot(a, a_inv), np.eye(2))
+        a = [[1, 2, 3], [4, 5, 6], [7, 8, 10]]
+        a_inv = inv(a)
+        assert_array_almost_equal(dot(a, a_inv), np.eye(3))
+
+    def test_random(self):
+        n = 20
+        for i in range(4):
+            a = random([n, n])
+            for i in range(n):
+                a[i, i] = 20*(.1+a[i, i])
+            a_inv = inv(a)
+            assert_array_almost_equal(dot(a, a_inv),
+                                      identity(n))
+
+    def test_simple_complex(self):
+        a = [[1, 2], [3, 4j]]
+        a_inv = inv(a)
+        assert_array_almost_equal(dot(a, a_inv), [[1, 0], [0, 1]])
+
+    def test_random_complex(self):
+        n = 20
+        for i in range(4):
+            a = random([n, n])+2j*random([n, n])
+            for i in range(n):
+                a[i, i] = 20*(.1+a[i, i])
+            a_inv = inv(a)
+            assert_array_almost_equal(dot(a, a_inv),
+                                      identity(n))
+
+    def test_check_finite(self):
+        a = [[1, 2], [3, 4]]
+        a_inv = inv(a, check_finite=False)
+        assert_array_almost_equal(dot(a, a_inv), [[1, 0], [0, 1]])
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        a_inv = inv(a)
+        assert a_inv.size == 0
+        assert a_inv.dtype == inv(np.eye(2, dtype=dt)).dtype
+
+
+class TestDet:
+    def setup_method(self):
+        self.rng = np.random.default_rng(1680305949878959)
+
+    def test_1x1_all_singleton_dims(self):
+        a = np.array([[1]])
+        deta = det(a)
+        assert deta.dtype.char == 'd'
+        assert np.isscalar(deta)
+        assert deta == 1.
+        a = np.array([[[[1]]]], dtype='f')
+        deta = det(a)
+        assert deta.dtype.char == 'd'
+        assert deta.shape == (1, 1)
+        assert_equal(deta, [[1.0]])
+        a = np.array([[[1 + 3.j]]], dtype=np.complex64)
+        deta = det(a)
+        assert deta.dtype.char == 'D'
+        assert deta.shape == (1,)
+        assert_equal(deta, [1.+3.j])
+
+    def test_1by1_stacked_input_output(self):
+        a = self.rng.random([4, 5, 1, 1], dtype=np.float32)
+        deta = det(a)
+        assert deta.dtype.char == 'd'
+        assert deta.shape == (4, 5)
+        assert_allclose(deta, np.squeeze(a))
+
+        a = self.rng.random([4, 5, 1, 1], dtype=np.float32)*np.complex64(1.j)
+        deta = det(a)
+        assert deta.dtype.char == 'D'
+        assert deta.shape == (4, 5)
+        assert_allclose(deta, np.squeeze(a))
+
+    @pytest.mark.parametrize('shape', [[2, 2], [20, 20], [3, 2, 20, 20]])
+    def test_simple_det_shapes_real_complex(self, shape):
+        a = self.rng.uniform(-1., 1., size=shape)
+        d1, d2 = det(a), np.linalg.det(a)
+        assert_allclose(d1, d2)
+
+        b = self.rng.uniform(-1., 1., size=shape)*1j
+        b += self.rng.uniform(-0.5, 0.5, size=shape)
+        d3, d4 = det(b), np.linalg.det(b)
+        assert_allclose(d3, d4)
+
+    def test_for_known_det_values(self):
+        # Hadamard8
+        a = np.array([[1, 1, 1, 1, 1, 1, 1, 1],
+                      [1, -1, 1, -1, 1, -1, 1, -1],
+                      [1, 1, -1, -1, 1, 1, -1, -1],
+                      [1, -1, -1, 1, 1, -1, -1, 1],
+                      [1, 1, 1, 1, -1, -1, -1, -1],
+                      [1, -1, 1, -1, -1, 1, -1, 1],
+                      [1, 1, -1, -1, -1, -1, 1, 1],
+                      [1, -1, -1, 1, -1, 1, 1, -1]])
+        assert_allclose(det(a), 4096.)
+
+        # consecutive number array always singular
+        assert_allclose(det(np.arange(25).reshape(5, 5)), 0.)
+
+        # simple anti-diagonal block array
+        # Upper right has det (-2+1j) and lower right has (-2-1j)
+        # det(a) = - (-2+1j) (-2-1j) = 5.
+        a = np.array([[0.+0.j, 0.+0.j, 0.-1.j, 1.-1.j],
+                      [0.+0.j, 0.+0.j, 1.+0.j, 0.-1.j],
+                      [0.+1.j, 1.+1.j, 0.+0.j, 0.+0.j],
+                      [1.+0.j, 0.+1.j, 0.+0.j, 0.+0.j]], dtype=np.complex64)
+        assert_allclose(det(a), 5.+0.j)
+
+        # Fiedler companion complexified
+        # >>> a = scipy.linalg.fiedler_companion(np.arange(1, 10))
+        a = np.array([[-2., -3., 1., 0., 0., 0., 0., 0.],
+                      [1., 0., 0., 0., 0., 0., 0., 0.],
+                      [0., -4., 0., -5., 1., 0., 0., 0.],
+                      [0., 1., 0., 0., 0., 0., 0., 0.],
+                      [0., 0., 0., -6., 0., -7., 1., 0.],
+                      [0., 0., 0., 1., 0., 0., 0., 0.],
+                      [0., 0., 0., 0., 0., -8., 0., -9.],
+                      [0., 0., 0., 0., 0., 1., 0., 0.]])*1.j
+        assert_allclose(det(a), 9.)
+
+    # g and G dtypes are handled differently in windows and other platforms
+    @pytest.mark.parametrize('typ', [x for x in np.typecodes['All'][:20]
+                                     if x not in 'gG'])
+    def test_sample_compatible_dtype_input(self, typ):
+        n = 4
+        a = self.rng.random([n, n]).astype(typ)  # value is not important
+        assert isinstance(det(a), (np.float64 | np.complex128))
+
+    def test_incompatible_dtype_input(self):
+        # Double backslashes needed for escaping pytest regex.
+        msg = 'cannot be cast to float\\(32, 64\\)'
+
+        for c, t in zip('SUO', ['bytes8', 'str32', 'object']):
+            with assert_raises(TypeError, match=msg):
+                det(np.array([['a', 'b']]*2, dtype=c))
+        with assert_raises(TypeError, match=msg):
+            det(np.array([[b'a', b'b']]*2, dtype='V'))
+        with assert_raises(TypeError, match=msg):
+            det(np.array([[100, 200]]*2, dtype='datetime64[s]'))
+        with assert_raises(TypeError, match=msg):
+            det(np.array([[100, 200]]*2, dtype='timedelta64[s]'))
+
+    def test_empty_edge_cases(self):
+        assert_allclose(det(np.empty([0, 0])), 1.)
+        assert_allclose(det(np.empty([0, 0, 0])), np.array([]))
+        assert_allclose(det(np.empty([3, 0, 0])), np.array([1., 1., 1.]))
+        with assert_raises(ValueError, match='Last 2 dimensions'):
+            det(np.empty([0, 0, 3]))
+        with assert_raises(ValueError, match='at least two-dimensional'):
+            det(np.array([]))
+        with assert_raises(ValueError, match='Last 2 dimensions'):
+            det(np.array([[]]))
+        with assert_raises(ValueError, match='Last 2 dimensions'):
+            det(np.array([[[]]]))
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty_dtype(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        d = det(a)
+        assert d.shape == ()
+        assert d.dtype == det(np.eye(2, dtype=dt)).dtype
+
+        a = np.empty((3, 0, 0), dtype=dt)
+        d = det(a)
+        assert d.shape == (3,)
+        assert d.dtype == det(np.zeros((3, 1, 1), dtype=dt)).dtype
+
+    def test_overwrite_a(self):
+        # If all conditions are met then input should be overwritten;
+        #   - dtype is one of 'fdFD'
+        #   - C-contiguous
+        #   - writeable
+        a = np.arange(9).reshape(3, 3).astype(np.float32)
+        ac = a.copy()
+        deta = det(ac, overwrite_a=True)
+        assert_allclose(deta, 0.)
+        assert not (a == ac).all()
+
+    def test_readonly_array(self):
+        a = np.array([[2., 0., 1.], [5., 3., -1.], [1., 1., 1.]])
+        a.setflags(write=False)
+        # overwrite_a will be overridden
+        assert_allclose(det(a, overwrite_a=True), 10.)
+
+    def test_simple_check_finite(self):
+        a = [[1, 2], [3, np.inf]]
+        with assert_raises(ValueError, match='array must not contain'):
+            det(a)
+
+
+def direct_lstsq(a, b, cmplx=0):
+    at = transpose(a)
+    if cmplx:
+        at = conjugate(at)
+    a1 = dot(at, a)
+    b1 = dot(at, b)
+    return solve(a1, b1)
+
+
+class TestLstsq:
+    lapack_drivers = ('gelsd', 'gelss', 'gelsy', None)
+
+    def test_simple_exact(self):
+        for dtype in REAL_DTYPES:
+            a = np.array([[1, 20], [-30, 4]], dtype=dtype)
+            for lapack_driver in TestLstsq.lapack_drivers:
+                for overwrite in (True, False):
+                    for bt in (((1, 0), (0, 1)), (1, 0),
+                               ((2, 1), (-30, 4))):
+                        # Store values in case they are overwritten
+                        # later
+                        a1 = a.copy()
+                        b = np.array(bt, dtype=dtype)
+                        b1 = b.copy()
+                        out = lstsq(a1, b1,
+                                    lapack_driver=lapack_driver,
+                                    overwrite_a=overwrite,
+                                    overwrite_b=overwrite)
+                        x = out[0]
+                        r = out[2]
+                        assert_(r == 2,
+                                f'expected efficient rank 2, got {r}')
+                        assert_allclose(dot(a, x), b,
+                                        atol=25 * _eps_cast(a1.dtype),
+                                        rtol=25 * _eps_cast(a1.dtype),
+                                        err_msg=f"driver: {lapack_driver}")
+
+    def test_simple_overdet(self):
+        for dtype in REAL_DTYPES:
+            a = np.array([[1, 2], [4, 5], [3, 4]], dtype=dtype)
+            b = np.array([1, 2, 3], dtype=dtype)
+            for lapack_driver in TestLstsq.lapack_drivers:
+                for overwrite in (True, False):
+                    # Store values in case they are overwritten later
+                    a1 = a.copy()
+                    b1 = b.copy()
+                    out = lstsq(a1, b1, lapack_driver=lapack_driver,
+                                overwrite_a=overwrite,
+                                overwrite_b=overwrite)
+                    x = out[0]
+                    if lapack_driver == 'gelsy':
+                        residuals = np.sum((b - a.dot(x))**2)
+                    else:
+                        residuals = out[1]
+                    r = out[2]
+                    assert_(r == 2, f'expected efficient rank 2, got {r}')
+                    assert_allclose(abs((dot(a, x) - b)**2).sum(axis=0),
+                                    residuals,
+                                    rtol=25 * _eps_cast(a1.dtype),
+                                    atol=25 * _eps_cast(a1.dtype),
+                                    err_msg=f"driver: {lapack_driver}")
+                    assert_allclose(x, (-0.428571428571429, 0.85714285714285),
+                                    rtol=25 * _eps_cast(a1.dtype),
+                                    atol=25 * _eps_cast(a1.dtype),
+                                    err_msg=f"driver: {lapack_driver}")
+
+    def test_simple_overdet_complex(self):
+        for dtype in COMPLEX_DTYPES:
+            a = np.array([[1+2j, 2], [4, 5], [3, 4]], dtype=dtype)
+            b = np.array([1, 2+4j, 3], dtype=dtype)
+            for lapack_driver in TestLstsq.lapack_drivers:
+                for overwrite in (True, False):
+                    # Store values in case they are overwritten later
+                    a1 = a.copy()
+                    b1 = b.copy()
+                    out = lstsq(a1, b1, lapack_driver=lapack_driver,
+                                overwrite_a=overwrite,
+                                overwrite_b=overwrite)
+
+                    x = out[0]
+                    if lapack_driver == 'gelsy':
+                        res = b - a.dot(x)
+                        residuals = np.sum(res * res.conj())
+                    else:
+                        residuals = out[1]
+                    r = out[2]
+                    assert_(r == 2, f'expected efficient rank 2, got {r}')
+                    assert_allclose(abs((dot(a, x) - b)**2).sum(axis=0),
+                                    residuals,
+                                    rtol=25 * _eps_cast(a1.dtype),
+                                    atol=25 * _eps_cast(a1.dtype),
+                                    err_msg=f"driver: {lapack_driver}")
+                    assert_allclose(
+                                x, (-0.4831460674157303 + 0.258426966292135j,
+                                    0.921348314606741 + 0.292134831460674j),
+                                rtol=25 * _eps_cast(a1.dtype),
+                                atol=25 * _eps_cast(a1.dtype),
+                                err_msg=f"driver: {lapack_driver}")
+
+    def test_simple_underdet(self):
+        for dtype in REAL_DTYPES:
+            a = np.array([[1, 2, 3], [4, 5, 6]], dtype=dtype)
+            b = np.array([1, 2], dtype=dtype)
+            for lapack_driver in TestLstsq.lapack_drivers:
+                for overwrite in (True, False):
+                    # Store values in case they are overwritten later
+                    a1 = a.copy()
+                    b1 = b.copy()
+                    out = lstsq(a1, b1, lapack_driver=lapack_driver,
+                                overwrite_a=overwrite,
+                                overwrite_b=overwrite)
+
+                    x = out[0]
+                    r = out[2]
+                    assert_(r == 2, f'expected efficient rank 2, got {r}')
+                    assert_allclose(x, (-0.055555555555555, 0.111111111111111,
+                                        0.277777777777777),
+                                    rtol=25 * _eps_cast(a1.dtype),
+                                    atol=25 * _eps_cast(a1.dtype),
+                                    err_msg=f"driver: {lapack_driver}")
+
+    @pytest.mark.parametrize("dtype", REAL_DTYPES)
+    @pytest.mark.parametrize("n", (20, 200))
+    @pytest.mark.parametrize("lapack_driver", lapack_drivers)
+    @pytest.mark.parametrize("overwrite", (True, False))
+    def test_random_exact(self, dtype, n, lapack_driver, overwrite):
+        rng = np.random.RandomState(1234)
+
+        a = np.asarray(rng.random([n, n]), dtype=dtype)
+        for i in range(n):
+            a[i, i] = 20 * (0.1 + a[i, i])
+        for i in range(4):
+            b = np.asarray(rng.random([n, 3]), dtype=dtype)
+            # Store values in case they are overwritten later
+            a1 = a.copy()
+            b1 = b.copy()
+            out = lstsq(a1, b1,
+                        lapack_driver=lapack_driver,
+                        overwrite_a=overwrite,
+                        overwrite_b=overwrite)
+            x = out[0]
+            r = out[2]
+            assert_(r == n, f'expected efficient rank {n}, '
+                    f'got {r}')
+            if dtype is np.float32:
+                assert_allclose(
+                          dot(a, x), b,
+                          rtol=500 * _eps_cast(a1.dtype),
+                          atol=500 * _eps_cast(a1.dtype),
+                          err_msg=f"driver: {lapack_driver}")
+            else:
+                assert_allclose(
+                          dot(a, x), b,
+                          rtol=1000 * _eps_cast(a1.dtype),
+                          atol=1000 * _eps_cast(a1.dtype),
+                          err_msg=f"driver: {lapack_driver}")
+
+    @pytest.mark.skipif(IS_MUSL, reason="may segfault on Alpine, see gh-17630")
+    @pytest.mark.parametrize("dtype", COMPLEX_DTYPES)
+    @pytest.mark.parametrize("n", (20, 200))
+    @pytest.mark.parametrize("lapack_driver", lapack_drivers)
+    @pytest.mark.parametrize("overwrite", (True, False))
+    def test_random_complex_exact(self, dtype, n, lapack_driver, overwrite):
+        rng = np.random.RandomState(1234)
+
+        a = np.asarray(rng.random([n, n]) + 1j*rng.random([n, n]),
+                       dtype=dtype)
+        for i in range(n):
+            a[i, i] = 20 * (0.1 + a[i, i])
+        for i in range(2):
+            b = np.asarray(rng.random([n, 3]), dtype=dtype)
+            # Store values in case they are overwritten later
+            a1 = a.copy()
+            b1 = b.copy()
+            out = lstsq(a1, b1, lapack_driver=lapack_driver,
+                        overwrite_a=overwrite,
+                        overwrite_b=overwrite)
+            x = out[0]
+            r = out[2]
+            assert_(r == n, f'expected efficient rank {n}, '
+                    f'got {r}')
+            if dtype is np.complex64:
+                assert_allclose(
+                          dot(a, x), b,
+                          rtol=400 * _eps_cast(a1.dtype),
+                          atol=400 * _eps_cast(a1.dtype),
+                          err_msg=f"driver: {lapack_driver}")
+            else:
+                assert_allclose(
+                          dot(a, x), b,
+                          rtol=1000 * _eps_cast(a1.dtype),
+                          atol=1000 * _eps_cast(a1.dtype),
+                          err_msg=f"driver: {lapack_driver}")
+
+    def test_random_overdet(self):
+        rng = np.random.RandomState(1234)
+        for dtype in REAL_DTYPES:
+            for (n, m) in ((20, 15), (200, 2)):
+                for lapack_driver in TestLstsq.lapack_drivers:
+                    for overwrite in (True, False):
+                        a = np.asarray(rng.random([n, m]), dtype=dtype)
+                        for i in range(m):
+                            a[i, i] = 20 * (0.1 + a[i, i])
+                        for i in range(4):
+                            b = np.asarray(rng.random([n, 3]), dtype=dtype)
+                            # Store values in case they are overwritten later
+                            a1 = a.copy()
+                            b1 = b.copy()
+                            out = lstsq(a1, b1,
+                                        lapack_driver=lapack_driver,
+                                        overwrite_a=overwrite,
+                                        overwrite_b=overwrite)
+                            x = out[0]
+                            r = out[2]
+                            assert_(r == m, f'expected efficient rank {m}, '
+                                    f'got {r}')
+                            assert_allclose(
+                                          x, direct_lstsq(a, b, cmplx=0),
+                                          rtol=25 * _eps_cast(a1.dtype),
+                                          atol=25 * _eps_cast(a1.dtype),
+                                          err_msg=f"driver: {lapack_driver}")
+
+    def test_random_complex_overdet(self):
+        rng = np.random.RandomState(1234)
+        for dtype in COMPLEX_DTYPES:
+            for (n, m) in ((20, 15), (200, 2)):
+                for lapack_driver in TestLstsq.lapack_drivers:
+                    for overwrite in (True, False):
+                        a = np.asarray(rng.random([n, m]) + 1j*rng.random([n, m]),
+                                       dtype=dtype)
+                        for i in range(m):
+                            a[i, i] = 20 * (0.1 + a[i, i])
+                        for i in range(2):
+                            b = np.asarray(rng.random([n, 3]), dtype=dtype)
+                            # Store values in case they are overwritten
+                            # later
+                            a1 = a.copy()
+                            b1 = b.copy()
+                            out = lstsq(a1, b1,
+                                        lapack_driver=lapack_driver,
+                                        overwrite_a=overwrite,
+                                        overwrite_b=overwrite)
+                            x = out[0]
+                            r = out[2]
+                            assert_(r == m, f'expected efficient rank {m}, '
+                                    f'got {r}')
+                            assert_allclose(
+                                      x, direct_lstsq(a, b, cmplx=1),
+                                      rtol=25 * _eps_cast(a1.dtype),
+                                      atol=25 * _eps_cast(a1.dtype),
+                                      err_msg=f"driver: {lapack_driver}")
+
+    def test_check_finite(self):
+        with suppress_warnings() as sup:
+            # On (some) OSX this tests triggers a warning (gh-7538)
+            sup.filter(RuntimeWarning,
+                       "internal gelsd driver lwork query error,.*"
+                       "Falling back to 'gelss' driver.")
+
+        at = np.array(((1, 20), (-30, 4)))
+        for dtype, bt, lapack_driver, overwrite, check_finite in \
+            itertools.product(REAL_DTYPES,
+                              (((1, 0), (0, 1)), (1, 0), ((2, 1), (-30, 4))),
+                              TestLstsq.lapack_drivers,
+                              (True, False),
+                              (True, False)):
+
+            a = at.astype(dtype)
+            b = np.array(bt, dtype=dtype)
+            # Store values in case they are overwritten
+            # later
+            a1 = a.copy()
+            b1 = b.copy()
+            out = lstsq(a1, b1, lapack_driver=lapack_driver,
+                        check_finite=check_finite, overwrite_a=overwrite,
+                        overwrite_b=overwrite)
+            x = out[0]
+            r = out[2]
+            assert_(r == 2, f'expected efficient rank 2, got {r}')
+            assert_allclose(dot(a, x), b,
+                            rtol=25 * _eps_cast(a.dtype),
+                            atol=25 * _eps_cast(a.dtype),
+                            err_msg=f"driver: {lapack_driver}")
+
+    def test_empty(self):
+        for a_shape, b_shape in (((0, 2), (0,)),
+                                 ((0, 4), (0, 2)),
+                                 ((4, 0), (4,)),
+                                 ((4, 0), (4, 2))):
+            b = np.ones(b_shape)
+            x, residues, rank, s = lstsq(np.zeros(a_shape), b)
+            assert_equal(x, np.zeros((a_shape[1],) + b_shape[1:]))
+            residues_should_be = (np.empty((0,)) if a_shape[1]
+                                  else np.linalg.norm(b, axis=0)**2)
+            assert_equal(residues, residues_should_be)
+            assert_(rank == 0, 'expected rank 0')
+            assert_equal(s, np.empty((0,)))
+
+    @pytest.mark.parametrize('dt_a', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty_dtype(self, dt_a, dt_b):
+        a = np.empty((0, 0), dtype=dt_a)
+        b = np.empty(0, dtype=dt_b)
+        x, residues, rank, s = lstsq(a, b)
+
+        assert x.size == 0
+        dt_nonempty = lstsq(np.eye(2, dtype=dt_a), np.ones(2, dtype=dt_b))[0].dtype
+        assert x.dtype == dt_nonempty
+
+
+class TestPinv:
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_simple_real(self):
+        a = array([[1, 2, 3], [4, 5, 6], [7, 8, 10]], dtype=float)
+        a_pinv = pinv(a)
+        assert_array_almost_equal(dot(a, a_pinv), np.eye(3))
+
+    def test_simple_complex(self):
+        a = (array([[1, 2, 3], [4, 5, 6], [7, 8, 10]],
+             dtype=float) + 1j * array([[10, 8, 7], [6, 5, 4], [3, 2, 1]],
+                                       dtype=float))
+        a_pinv = pinv(a)
+        assert_array_almost_equal(dot(a, a_pinv), np.eye(3))
+
+    def test_simple_singular(self):
+        a = array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=float)
+        a_pinv = pinv(a)
+        expected = array([[-6.38888889e-01, -1.66666667e-01, 3.05555556e-01],
+                          [-5.55555556e-02, 1.30136518e-16, 5.55555556e-02],
+                          [5.27777778e-01, 1.66666667e-01, -1.94444444e-01]])
+        assert_array_almost_equal(a_pinv, expected)
+
+    def test_simple_cols(self):
+        a = array([[1, 2, 3], [4, 5, 6]], dtype=float)
+        a_pinv = pinv(a)
+        expected = array([[-0.94444444, 0.44444444],
+                          [-0.11111111, 0.11111111],
+                          [0.72222222, -0.22222222]])
+        assert_array_almost_equal(a_pinv, expected)
+
+    def test_simple_rows(self):
+        a = array([[1, 2], [3, 4], [5, 6]], dtype=float)
+        a_pinv = pinv(a)
+        expected = array([[-1.33333333, -0.33333333, 0.66666667],
+                          [1.08333333, 0.33333333, -0.41666667]])
+        assert_array_almost_equal(a_pinv, expected)
+
+    def test_check_finite(self):
+        a = array([[1, 2, 3], [4, 5, 6.], [7, 8, 10]])
+        a_pinv = pinv(a, check_finite=False)
+        assert_array_almost_equal(dot(a, a_pinv), np.eye(3))
+
+    def test_native_list_argument(self):
+        a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
+        a_pinv = pinv(a)
+        expected = array([[-6.38888889e-01, -1.66666667e-01, 3.05555556e-01],
+                          [-5.55555556e-02, 1.30136518e-16, 5.55555556e-02],
+                          [5.27777778e-01, 1.66666667e-01, -1.94444444e-01]])
+        assert_array_almost_equal(a_pinv, expected)
+
+    def test_atol_rtol(self):
+        n = 12
+        # get a random ortho matrix for shuffling
+        q, _ = qr(np.random.rand(n, n))
+        a_m = np.arange(35.0).reshape(7, 5)
+        a = a_m.copy()
+        a[0, 0] = 0.001
+        atol = 1e-5
+        rtol = 0.05
+        # svds of a_m is ~ [116.906, 4.234, tiny, tiny, tiny]
+        # svds of a is ~ [116.906, 4.234, 4.62959e-04, tiny, tiny]
+        # Just abs cutoff such that we arrive at a_modified
+        a_p = pinv(a_m, atol=atol, rtol=0.)
+        adiff1 = a @ a_p @ a - a
+        adiff2 = a_m @ a_p @ a_m - a_m
+        # Now adiff1 should be around atol value while adiff2 should be
+        # relatively tiny
+        assert_allclose(np.linalg.norm(adiff1), 5e-4, atol=5.e-4)
+        assert_allclose(np.linalg.norm(adiff2), 5e-14, atol=5.e-14)
+
+        # Now do the same but remove another sv ~4.234 via rtol
+        a_p = pinv(a_m, atol=atol, rtol=rtol)
+        adiff1 = a @ a_p @ a - a
+        adiff2 = a_m @ a_p @ a_m - a_m
+        assert_allclose(np.linalg.norm(adiff1), 4.233, rtol=0.01)
+        assert_allclose(np.linalg.norm(adiff2), 4.233, rtol=0.01)
+
+    @pytest.mark.parametrize('dt', [float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        a_pinv = pinv(a)
+        assert a_pinv.size == 0
+        assert a_pinv.dtype == pinv(np.eye(2, dtype=dt)).dtype
+
+
+class TestPinvSymmetric:
+
+    def setup_method(self):
+        np.random.seed(1234)
+
+    def test_simple_real(self):
+        a = array([[1, 2, 3], [4, 5, 6], [7, 8, 10]], dtype=float)
+        a = np.dot(a, a.T)
+        a_pinv = pinvh(a)
+        assert_array_almost_equal(np.dot(a, a_pinv), np.eye(3))
+
+    def test_nonpositive(self):
+        a = array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=float)
+        a = np.dot(a, a.T)
+        u, s, vt = np.linalg.svd(a)
+        s[0] *= -1
+        a = np.dot(u * s, vt)  # a is now symmetric non-positive and singular
+        a_pinv = pinv(a)
+        a_pinvh = pinvh(a)
+        assert_array_almost_equal(a_pinv, a_pinvh)
+
+    def test_simple_complex(self):
+        a = (array([[1, 2, 3], [4, 5, 6], [7, 8, 10]],
+             dtype=float) + 1j * array([[10, 8, 7], [6, 5, 4], [3, 2, 1]],
+                                       dtype=float))
+        a = np.dot(a, a.conj().T)
+        a_pinv = pinvh(a)
+        assert_array_almost_equal(np.dot(a, a_pinv), np.eye(3))
+
+    def test_native_list_argument(self):
+        a = array([[1, 2, 3], [4, 5, 6], [7, 8, 10]], dtype=float)
+        a = np.dot(a, a.T)
+        a_pinv = pinvh(a.tolist())
+        assert_array_almost_equal(np.dot(a, a_pinv), np.eye(3))
+
+    def test_zero_eigenvalue(self):
+        # https://github.com/scipy/scipy/issues/12515
+        # the SYEVR eigh driver may give the zero eigenvalue > eps
+        a = np.array([[1, -1, 0], [-1, 2, -1], [0, -1, 1]])
+        p = pinvh(a)
+        assert_allclose(p @ a @ p, p, atol=1e-15)
+        assert_allclose(a @ p @ a, a, atol=1e-15)
+
+    def test_atol_rtol(self):
+        n = 12
+        # get a random ortho matrix for shuffling
+        q, _ = qr(np.random.rand(n, n))
+        a = np.diag([4, 3, 2, 1, 0.99e-4, 0.99e-5] + [0.99e-6]*(n-6))
+        a = q.T @ a @ q
+        a_m = np.diag([4, 3, 2, 1, 0.99e-4, 0.] + [0.]*(n-6))
+        a_m = q.T @ a_m @ q
+        atol = 1e-5
+        rtol = (4.01e-4 - 4e-5)/4
+        # Just abs cutoff such that we arrive at a_modified
+        a_p = pinvh(a, atol=atol, rtol=0.)
+        adiff1 = a @ a_p @ a - a
+        adiff2 = a_m @ a_p @ a_m - a_m
+        # Now adiff1 should dance around atol value since truncation
+        # while adiff2 should be relatively tiny
+        assert_allclose(norm(adiff1), atol, rtol=0.1)
+        assert_allclose(norm(adiff2), 1e-12, atol=1e-11)
+
+        # Now do the same but through rtol cancelling atol value
+        a_p = pinvh(a, atol=atol, rtol=rtol)
+        adiff1 = a @ a_p @ a - a
+        adiff2 = a_m @ a_p @ a_m - a_m
+        # adiff1 and adiff2 should be elevated to ~1e-4 due to mismatch
+        assert_allclose(norm(adiff1), 1e-4, rtol=0.1)
+        assert_allclose(norm(adiff2), 1e-4, rtol=0.1)
+
+    @pytest.mark.parametrize('dt', [float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        a_pinv = pinvh(a)
+        assert a_pinv.size == 0
+        assert a_pinv.dtype == pinv(np.eye(2, dtype=dt)).dtype
+
+
+@pytest.mark.parametrize('scale', (1e-20, 1., 1e20))
+@pytest.mark.parametrize('pinv_', (pinv, pinvh))
+def test_auto_rcond(scale, pinv_):
+    x = np.array([[1, 0], [0, 1e-10]]) * scale
+    expected = np.diag(1. / np.diag(x))
+    x_inv = pinv_(x)
+    assert_allclose(x_inv, expected)
+
+
+class TestVectorNorms:
+
+    def test_types(self):
+        for dtype in np.typecodes['AllFloat']:
+            x = np.array([1, 2, 3], dtype=dtype)
+            tol = max(1e-15, np.finfo(dtype).eps.real * 20)
+            assert_allclose(norm(x), np.sqrt(14), rtol=tol)
+            assert_allclose(norm(x, 2), np.sqrt(14), rtol=tol)
+
+        for dtype in np.typecodes['Complex']:
+            x = np.array([1j, 2j, 3j], dtype=dtype)
+            tol = max(1e-15, np.finfo(dtype).eps.real * 20)
+            assert_allclose(norm(x), np.sqrt(14), rtol=tol)
+            assert_allclose(norm(x, 2), np.sqrt(14), rtol=tol)
+
+    def test_overflow(self):
+        # unlike numpy's norm, this one is
+        # safer on overflow
+        a = array([1e20], dtype=float32)
+        assert_almost_equal(norm(a), a)
+
+    def test_stable(self):
+        # more stable than numpy's norm
+        a = array([1e4] + [1]*10000, dtype=float32)
+        try:
+            # snrm in double precision; we obtain the same as for float64
+            # -- large atol needed due to varying blas implementations
+            assert_allclose(norm(a) - 1e4, 0.5, atol=1e-2)
+        except AssertionError:
+            # snrm implemented in single precision, == np.linalg.norm result
+            msg = ": Result should equal either 0.0 or 0.5 (depending on " \
+                  "implementation of snrm2)."
+            assert_almost_equal(norm(a) - 1e4, 0.0, err_msg=msg)
+
+    def test_zero_norm(self):
+        assert_equal(norm([1, 0, 3], 0), 2)
+        assert_equal(norm([1, 2, 3], 0), 3)
+
+    def test_axis_kwd(self):
+        a = np.array([[[2, 1], [3, 4]]] * 2, 'd')
+        assert_allclose(norm(a, axis=1), [[3.60555128, 4.12310563]] * 2)
+        assert_allclose(norm(a, 1, axis=1), [[5.] * 2] * 2)
+
+    def test_keepdims_kwd(self):
+        a = np.array([[[2, 1], [3, 4]]] * 2, 'd')
+        b = norm(a, axis=1, keepdims=True)
+        assert_allclose(b, [[[3.60555128, 4.12310563]]] * 2)
+        assert_(b.shape == (2, 1, 2))
+        assert_allclose(norm(a, 1, axis=2, keepdims=True), [[[3.], [7.]]] * 2)
+
+    @pytest.mark.skipif(not HAS_ILP64, reason="64-bit BLAS required")
+    def test_large_vector(self):
+        check_free_memory(free_mb=17000)
+        x = np.zeros([2**31], dtype=np.float64)
+        x[-1] = 1
+        res = norm(x)
+        del x
+        assert_allclose(res, 1.0)
+
+
+class TestMatrixNorms:
+
+    def test_matrix_norms(self):
+        # Not all of these are matrix norms in the most technical sense.
+        np.random.seed(1234)
+        for n, m in (1, 1), (1, 3), (3, 1), (4, 4), (4, 5), (5, 4):
+            for t in np.float32, np.float64, np.complex64, np.complex128, np.int64:
+                A = 10 * np.random.randn(n, m).astype(t)
+                if np.issubdtype(A.dtype, np.complexfloating):
+                    A = (A + 10j * np.random.randn(n, m)).astype(t)
+                    t_high = np.complex128
+                else:
+                    t_high = np.float64
+                for order in (None, 'fro', 1, -1, 2, -2, np.inf, -np.inf):
+                    actual = norm(A, ord=order)
+                    desired = np.linalg.norm(A, ord=order)
+                    # SciPy may return higher precision matrix norms.
+                    # This is a consequence of using LAPACK.
+                    if not np.allclose(actual, desired):
+                        desired = np.linalg.norm(A.astype(t_high), ord=order)
+                        assert_allclose(actual, desired)
+
+    def test_axis_kwd(self):
+        a = np.array([[[2, 1], [3, 4]]] * 2, 'd')
+        b = norm(a, ord=np.inf, axis=(1, 0))
+        c = norm(np.swapaxes(a, 0, 1), ord=np.inf, axis=(0, 1))
+        d = norm(a, ord=1, axis=(0, 1))
+        assert_allclose(b, c)
+        assert_allclose(c, d)
+        assert_allclose(b, d)
+        assert_(b.shape == c.shape == d.shape)
+        b = norm(a, ord=1, axis=(1, 0))
+        c = norm(np.swapaxes(a, 0, 1), ord=1, axis=(0, 1))
+        d = norm(a, ord=np.inf, axis=(0, 1))
+        assert_allclose(b, c)
+        assert_allclose(c, d)
+        assert_allclose(b, d)
+        assert_(b.shape == c.shape == d.shape)
+
+    def test_keepdims_kwd(self):
+        a = np.arange(120, dtype='d').reshape(2, 3, 4, 5)
+        b = norm(a, ord=np.inf, axis=(1, 0), keepdims=True)
+        c = norm(a, ord=1, axis=(0, 1), keepdims=True)
+        assert_allclose(b, c)
+        assert_(b.shape == c.shape)
+
+    def test_empty(self):
+        a = np.empty((0, 0))
+        assert_allclose(norm(a), 0.)
+        assert_allclose(norm(a, axis=0), np.zeros((0,)))
+        assert_allclose(norm(a, keepdims=True), np.zeros((1, 1)))
+
+        a = np.empty((0, 3))
+        assert_allclose(norm(a), 0.)
+        assert_allclose(norm(a, axis=0), np.zeros((3,)))
+        assert_allclose(norm(a, keepdims=True), np.zeros((1, 1)))
+
+
+class TestOverwrite:
+    def test_solve(self):
+        assert_no_overwrite(solve, [(3, 3), (3,)])
+
+    def test_solve_triangular(self):
+        assert_no_overwrite(solve_triangular, [(3, 3), (3,)])
+
+    def test_solve_banded(self):
+        assert_no_overwrite(lambda ab, b: solve_banded((2, 1), ab, b),
+                            [(4, 6), (6,)])
+
+    def test_solveh_banded(self):
+        assert_no_overwrite(solveh_banded, [(2, 6), (6,)])
+
+    def test_inv(self):
+        assert_no_overwrite(inv, [(3, 3)])
+
+    def test_det(self):
+        assert_no_overwrite(det, [(3, 3)])
+
+    def test_lstsq(self):
+        assert_no_overwrite(lstsq, [(3, 2), (3,)])
+
+    def test_pinv(self):
+        assert_no_overwrite(pinv, [(3, 3)])
+
+    def test_pinvh(self):
+        assert_no_overwrite(pinvh, [(3, 3)])
+
+
+class TestSolveCirculant:
+
+    def test_basic1(self):
+        c = np.array([1, 2, 3, 5])
+        b = np.array([1, -1, 1, 0])
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    def test_basic2(self):
+        # b is a 2-d matrix.
+        c = np.array([1, 2, -3, -5])
+        b = np.arange(12).reshape(4, 3)
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    def test_basic3(self):
+        # b is a 3-d matrix.
+        c = np.array([1, 2, -3, -5])
+        b = np.arange(24).reshape(4, 3, 2)
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    def test_complex(self):
+        # Complex b and c
+        c = np.array([1+2j, -3, 4j, 5])
+        b = np.arange(8).reshape(4, 2) + 0.5j
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    def test_random_b_and_c(self):
+        # Random b and c
+        rng = np.random.RandomState(54321)
+        c = rng.randn(50)
+        b = rng.randn(50)
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    def test_singular(self):
+        # c gives a singular circulant matrix.
+        c = np.array([1, 1, 0, 0])
+        b = np.array([1, 2, 3, 4])
+        x = solve_circulant(c, b, singular='lstsq')
+        y, res, rnk, s = lstsq(circulant(c), b)
+        assert_allclose(x, y)
+        assert_raises(LinAlgError, solve_circulant, x, y)
+
+    def test_axis_args(self):
+        # Test use of caxis, baxis and outaxis.
+
+        # c has shape (2, 1, 4)
+        c = np.array([[[-1, 2.5, 3, 3.5]], [[1, 6, 6, 6.5]]])
+
+        # b has shape (3, 4)
+        b = np.array([[0, 0, 1, 1], [1, 1, 0, 0], [1, -1, 0, 0]])
+
+        x = solve_circulant(c, b, baxis=1)
+        assert_equal(x.shape, (4, 2, 3))
+        expected = np.empty_like(x)
+        expected[:, 0, :] = solve(circulant(c[0].ravel()), b.T)
+        expected[:, 1, :] = solve(circulant(c[1].ravel()), b.T)
+        assert_allclose(x, expected)
+
+        x = solve_circulant(c, b, baxis=1, outaxis=-1)
+        assert_equal(x.shape, (2, 3, 4))
+        assert_allclose(np.moveaxis(x, -1, 0), expected)
+
+        # np.swapaxes(c, 1, 2) has shape (2, 4, 1); b.T has shape (4, 3).
+        x = solve_circulant(np.swapaxes(c, 1, 2), b.T, caxis=1)
+        assert_equal(x.shape, (4, 2, 3))
+        assert_allclose(x, expected)
+
+    def test_native_list_arguments(self):
+        # Same as test_basic1 using python's native list.
+        c = [1, 2, 3, 5]
+        b = [1, -1, 1, 0]
+        x = solve_circulant(c, b)
+        y = solve(circulant(c), b)
+        assert_allclose(x, y)
+
+    @pytest.mark.parametrize('dt_c', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt_c, dt_b):
+        c = np.array([], dtype=dt_c)
+        b = np.array([], dtype=dt_b)
+        x = solve_circulant(c, b)
+        assert x.shape == (0,)
+        assert x.dtype == solve_circulant(np.arange(3, dtype=dt_c),
+                                          np.ones(3, dtype=dt_b)).dtype
+
+        b = np.empty((0, 0), dtype=dt_b)
+        x1 = solve_circulant(c, b)
+        assert x1.shape == (0, 0)
+        assert x1.dtype == x.dtype
+
+
+class TestMatrix_Balance:
+
+    def test_string_arg(self):
+        assert_raises(ValueError, matrix_balance, 'Some string for fail')
+
+    def test_infnan_arg(self):
+        assert_raises(ValueError, matrix_balance,
+                      np.array([[1, 2], [3, np.inf]]))
+        assert_raises(ValueError, matrix_balance,
+                      np.array([[1, 2], [3, np.nan]]))
+
+    def test_scaling(self):
+        _, y = matrix_balance(np.array([[1000, 1], [1000, 0]]))
+        # Pre/post LAPACK 3.5.0 gives the same result up to an offset
+        # since in each case col norm is x1000 greater and
+        # 1000 / 32 ~= 1 * 32 hence balanced with 2 ** 5.
+        assert_allclose(np.diff(np.log2(np.diag(y))), [5])
+
+    def test_scaling_order(self):
+        A = np.array([[1, 0, 1e-4], [1, 1, 1e-2], [1e4, 1e2, 1]])
+        x, y = matrix_balance(A)
+        assert_allclose(solve(y, A).dot(y), x)
+
+    def test_separate(self):
+        _, (y, z) = matrix_balance(np.array([[1000, 1], [1000, 0]]),
+                                   separate=1)
+        assert_equal(np.diff(np.log2(y)), [5])
+        assert_allclose(z, np.arange(2))
+
+    def test_permutation(self):
+        A = block_diag(np.ones((2, 2)), np.tril(np.ones((2, 2))),
+                       np.ones((3, 3)))
+        x, (y, z) = matrix_balance(A, separate=1)
+        assert_allclose(y, np.ones_like(y))
+        assert_allclose(z, np.array([0, 1, 6, 5, 4, 3, 2]))
+
+    def test_perm_and_scaling(self):
+        # Matrix with its diagonal removed
+        cases = (  # Case 0
+                 np.array([[0., 0., 0., 0., 0.000002],
+                           [0., 0., 0., 0., 0.],
+                           [2., 2., 0., 0., 0.],
+                           [2., 2., 0., 0., 0.],
+                           [0., 0., 0.000002, 0., 0.]]),
+                 #  Case 1 user reported GH-7258
+                 np.array([[-0.5, 0., 0., 0.],
+                           [0., -1., 0., 0.],
+                           [1., 0., -0.5, 0.],
+                           [0., 1., 0., -1.]]),
+                 #  Case 2 user reported GH-7258
+                 np.array([[-3., 0., 1., 0.],
+                           [-1., -1., -0., 1.],
+                           [-3., -0., -0., 0.],
+                           [-1., -0., 1., -1.]])
+                 )
+
+        for A in cases:
+            x, y = matrix_balance(A)
+            x, (s, p) = matrix_balance(A, separate=1)
+            ip = np.empty_like(p)
+            ip[p] = np.arange(A.shape[0])
+            assert_allclose(y, np.diag(s)[ip, :])
+            assert_allclose(solve(y, A).dot(y), x)
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        b, t = matrix_balance(a)
+
+        assert b.size == 0
+        assert t.size == 0
+
+        b_n, t_n = matrix_balance(np.eye(2, dtype=dt))
+        assert b.dtype == b_n.dtype
+        assert t.dtype == t_n.dtype
+
+        b, (scale, perm) = matrix_balance(a, separate=True)
+        assert b.size == 0
+        assert scale.size == 0
+        assert perm.size == 0
+
+        b_n, (scale_n, perm_n) = matrix_balance(a, separate=True)
+        assert b.dtype == b_n.dtype
+        assert scale.dtype == scale_n.dtype
+        assert perm.dtype == perm_n.dtype
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_blas.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_blas.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6645d0ad5d967ca00a2a5193d51e7ee74b8ad73
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_blas.py
@@ -0,0 +1,1127 @@
+#
+# Created by: Pearu Peterson, April 2002
+#
+
+import math
+import pytest
+import numpy as np
+import numpy.random
+from numpy.testing import (assert_equal, assert_almost_equal, assert_,
+                           assert_array_almost_equal, assert_allclose)
+from pytest import raises as assert_raises
+
+from numpy import float32, float64, complex64, complex128, arange, triu, \
+                  tril, zeros, tril_indices, ones, mod, diag, append, eye, \
+                  nonzero
+
+import scipy
+from scipy.linalg import _fblas as fblas, get_blas_funcs, toeplitz, solve
+
+try:
+    from scipy.linalg import _cblas as cblas
+except ImportError:
+    cblas = None
+
+REAL_DTYPES = [float32, float64]
+COMPLEX_DTYPES = [complex64, complex128]
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+def test_get_blas_funcs():
+    # check that it returns Fortran code for arrays that are
+    # fortran-ordered
+    f1, f2, f3 = get_blas_funcs(
+        ('axpy', 'axpy', 'axpy'),
+        (np.empty((2, 2), dtype=np.complex64, order='F'),
+         np.empty((2, 2), dtype=np.complex128, order='C'))
+        )
+
+    # get_blas_funcs will choose libraries depending on most generic
+    # array
+    assert_equal(f1.typecode, 'z')
+    assert_equal(f2.typecode, 'z')
+    if cblas is not None:
+        assert_equal(f1.module_name, 'cblas')
+        assert_equal(f2.module_name, 'cblas')
+
+    # check defaults.
+    f1 = get_blas_funcs('rotg')
+    assert_equal(f1.typecode, 'd')
+
+    # check also dtype interface
+    f1 = get_blas_funcs('gemm', dtype=np.complex64)
+    assert_equal(f1.typecode, 'c')
+    f1 = get_blas_funcs('gemm', dtype='F')
+    assert_equal(f1.typecode, 'c')
+
+    # extended precision complex
+    f1 = get_blas_funcs('gemm', dtype=np.clongdouble)
+    assert_equal(f1.typecode, 'z')
+
+    # check safe complex upcasting
+    f1 = get_blas_funcs('axpy',
+                        (np.empty((2, 2), dtype=np.float64),
+                         np.empty((2, 2), dtype=np.complex64))
+                        )
+    assert_equal(f1.typecode, 'z')
+
+
+def test_get_blas_funcs_alias():
+    # check alias for get_blas_funcs
+    f, g = get_blas_funcs(('nrm2', 'dot'), dtype=np.complex64)
+    assert f.typecode == 'c'
+    assert g.typecode == 'c'
+
+    f, g, h = get_blas_funcs(('dot', 'dotc', 'dotu'), dtype=np.float64)
+    assert f is g
+    assert f is h
+
+
+class TestCBLAS1Simple:
+
+    def test_axpy(self):
+        for p in 'sd':
+            f = getattr(cblas, p+'axpy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([1, 2, 3], [2, -1, 3], a=5),
+                                      [7, 9, 18])
+        for p in 'cz':
+            f = getattr(cblas, p+'axpy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([1, 2j, 3], [2, -1, 3], a=5),
+                                      [7, 10j-1, 18])
+
+
+class TestFBLAS1Simple:
+
+    def test_axpy(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'axpy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([1, 2, 3], [2, -1, 3], a=5),
+                                      [7, 9, 18])
+        for p in 'cz':
+            f = getattr(fblas, p+'axpy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([1, 2j, 3], [2, -1, 3], a=5),
+                                      [7, 10j-1, 18])
+
+    def test_copy(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'copy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([3, 4, 5], [8]*3), [3, 4, 5])
+        for p in 'cz':
+            f = getattr(fblas, p+'copy', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f([3, 4j, 5+3j], [8]*3), [3, 4j, 5+3j])
+
+    def test_asum(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'asum', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3, -4, 5]), 12)
+        for p in ['sc', 'dz']:
+            f = getattr(fblas, p+'asum', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3j, -4, 3-4j]), 14)
+
+    def test_dot(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'dot', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3, -4, 5], [2, 5, 1]), -9)
+
+    def test_complex_dotu(self):
+        for p in 'cz':
+            f = getattr(fblas, p+'dotu', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3j, -4, 3-4j], [2, 3, 1]), -9+2j)
+
+    def test_complex_dotc(self):
+        for p in 'cz':
+            f = getattr(fblas, p+'dotc', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3j, -4, 3-4j], [2, 3j, 1]), 3-14j)
+
+    def test_nrm2(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'nrm2', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3, -4, 5]), math.sqrt(50))
+        for p in ['c', 'z', 'sc', 'dz']:
+            f = getattr(fblas, p+'nrm2', None)
+            if f is None:
+                continue
+            assert_almost_equal(f([3j, -4, 3-4j]), math.sqrt(50))
+
+    def test_scal(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'scal', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(2, [3, -4, 5]), [6, -8, 10])
+        for p in 'cz':
+            f = getattr(fblas, p+'scal', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3j, [3j, -4, 3-4j]), [-9, -12j, 12+9j])
+        for p in ['cs', 'zd']:
+            f = getattr(fblas, p+'scal', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3, [3j, -4, 3-4j]), [9j, -12, 9-12j])
+
+    def test_swap(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'swap', None)
+            if f is None:
+                continue
+            x, y = [2, 3, 1], [-2, 3, 7]
+            x1, y1 = f(x, y)
+            assert_array_almost_equal(x1, y)
+            assert_array_almost_equal(y1, x)
+        for p in 'cz':
+            f = getattr(fblas, p+'swap', None)
+            if f is None:
+                continue
+            x, y = [2, 3j, 1], [-2, 3, 7-3j]
+            x1, y1 = f(x, y)
+            assert_array_almost_equal(x1, y)
+            assert_array_almost_equal(y1, x)
+
+    def test_amax(self):
+        for p in 'sd':
+            f = getattr(fblas, 'i'+p+'amax')
+            assert_equal(f([-2, 4, 3]), 1)
+        for p in 'cz':
+            f = getattr(fblas, 'i'+p+'amax')
+            assert_equal(f([-5, 4+3j, 6]), 1)
+    # XXX: need tests for rot,rotm,rotg,rotmg
+
+
+class TestFBLAS2Simple:
+
+    def test_gemv(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'gemv', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3, [[3]], [-4]), [-36])
+            assert_array_almost_equal(f(3, [[3]], [-4], 3, [5]), [-21])
+        for p in 'cz':
+            f = getattr(fblas, p+'gemv', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3j, [[3-4j]], [-4]), [-48-36j])
+            assert_array_almost_equal(f(3j, [[3-4j]], [-4], 3, [5j]),
+                                      [-48-21j])
+
+    # All of these *ger* functions are segfaulting when called from multiple
+    # threads under free-threaded CPython, see gh-21936.
+    @pytest.mark.thread_unsafe
+    def test_ger(self):
+
+        for p in 'sd':
+            f = getattr(fblas, p+'ger', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(1, [1, 2], [3, 4]), [[3, 4], [6, 8]])
+            assert_array_almost_equal(f(2, [1, 2, 3], [3, 4]),
+                                      [[6, 8], [12, 16], [18, 24]])
+
+            assert_array_almost_equal(f(1, [1, 2], [3, 4],
+                                        a=[[1, 2], [3, 4]]), [[4, 6], [9, 12]])
+
+        for p in 'cz':
+            f = getattr(fblas, p+'geru', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(1, [1j, 2], [3, 4]),
+                                      [[3j, 4j], [6, 8]])
+            assert_array_almost_equal(f(-2, [1j, 2j, 3j], [3j, 4j]),
+                                      [[6, 8], [12, 16], [18, 24]])
+
+        for p in 'cz':
+            for name in ('ger', 'gerc'):
+                f = getattr(fblas, p+name, None)
+                if f is None:
+                    continue
+                assert_array_almost_equal(f(1, [1j, 2], [3, 4]),
+                                          [[3j, 4j], [6, 8]])
+                assert_array_almost_equal(f(2, [1j, 2j, 3j], [3j, 4j]),
+                                          [[6, 8], [12, 16], [18, 24]])
+
+    def test_syr_her(self):
+        x = np.arange(1, 5, dtype='d')
+        resx = np.triu(x[:, np.newaxis] * x)
+        resx_reverse = np.triu(x[::-1, np.newaxis] * x[::-1])
+
+        y = np.linspace(0, 8.5, 17, endpoint=False)
+
+        z = np.arange(1, 9, dtype='d').view('D')
+        resz = np.triu(z[:, np.newaxis] * z)
+        resz_reverse = np.triu(z[::-1, np.newaxis] * z[::-1])
+        rehz = np.triu(z[:, np.newaxis] * z.conj())
+        rehz_reverse = np.triu(z[::-1, np.newaxis] * z[::-1].conj())
+
+        w = np.c_[np.zeros(4), z, np.zeros(4)].ravel()
+
+        for p, rtol in zip('sd', [1e-7, 1e-14]):
+            f = getattr(fblas, p+'syr', None)
+            if f is None:
+                continue
+            assert_allclose(f(1.0, x), resx, rtol=rtol)
+            assert_allclose(f(1.0, x, lower=True), resx.T, rtol=rtol)
+            assert_allclose(f(1.0, y, incx=2, offx=2, n=4), resx, rtol=rtol)
+            # negative increments imply reversed vectors in blas
+            assert_allclose(f(1.0, y, incx=-2, offx=2, n=4),
+                            resx_reverse, rtol=rtol)
+
+            a = np.zeros((4, 4), 'f' if p == 's' else 'd', 'F')
+            b = f(1.0, x, a=a, overwrite_a=True)
+            assert_allclose(a, resx, rtol=rtol)
+
+            b = f(2.0, x, a=a)
+            assert_(a is not b)
+            assert_allclose(b, 3*resx, rtol=rtol)
+
+            assert_raises(Exception, f, 1.0, x, incx=0)
+            assert_raises(Exception, f, 1.0, x, offx=5)
+            assert_raises(Exception, f, 1.0, x, offx=-2)
+            assert_raises(Exception, f, 1.0, x, n=-2)
+            assert_raises(Exception, f, 1.0, x, n=5)
+            assert_raises(Exception, f, 1.0, x, lower=2)
+            assert_raises(Exception, f, 1.0, x, a=np.zeros((2, 2), 'd', 'F'))
+
+        for p, rtol in zip('cz', [1e-7, 1e-14]):
+            f = getattr(fblas, p+'syr', None)
+            if f is None:
+                continue
+            assert_allclose(f(1.0, z), resz, rtol=rtol)
+            assert_allclose(f(1.0, z, lower=True), resz.T, rtol=rtol)
+            assert_allclose(f(1.0, w, incx=3, offx=1, n=4), resz, rtol=rtol)
+            # negative increments imply reversed vectors in blas
+            assert_allclose(f(1.0, w, incx=-3, offx=1, n=4),
+                            resz_reverse, rtol=rtol)
+
+            a = np.zeros((4, 4), 'F' if p == 'c' else 'D', 'F')
+            b = f(1.0, z, a=a, overwrite_a=True)
+            assert_allclose(a, resz, rtol=rtol)
+
+            b = f(2.0, z, a=a)
+            assert_(a is not b)
+            assert_allclose(b, 3*resz, rtol=rtol)
+
+            assert_raises(Exception, f, 1.0, x, incx=0)
+            assert_raises(Exception, f, 1.0, x, offx=5)
+            assert_raises(Exception, f, 1.0, x, offx=-2)
+            assert_raises(Exception, f, 1.0, x, n=-2)
+            assert_raises(Exception, f, 1.0, x, n=5)
+            assert_raises(Exception, f, 1.0, x, lower=2)
+            assert_raises(Exception, f, 1.0, x, a=np.zeros((2, 2), 'd', 'F'))
+
+        for p, rtol in zip('cz', [1e-7, 1e-14]):
+            f = getattr(fblas, p+'her', None)
+            if f is None:
+                continue
+            assert_allclose(f(1.0, z), rehz, rtol=rtol)
+            assert_allclose(f(1.0, z, lower=True), rehz.T.conj(), rtol=rtol)
+            assert_allclose(f(1.0, w, incx=3, offx=1, n=4), rehz, rtol=rtol)
+            # negative increments imply reversed vectors in blas
+            assert_allclose(f(1.0, w, incx=-3, offx=1, n=4),
+                            rehz_reverse, rtol=rtol)
+
+            a = np.zeros((4, 4), 'F' if p == 'c' else 'D', 'F')
+            b = f(1.0, z, a=a, overwrite_a=True)
+            assert_allclose(a, rehz, rtol=rtol)
+
+            b = f(2.0, z, a=a)
+            assert_(a is not b)
+            assert_allclose(b, 3*rehz, rtol=rtol)
+
+            assert_raises(Exception, f, 1.0, x, incx=0)
+            assert_raises(Exception, f, 1.0, x, offx=5)
+            assert_raises(Exception, f, 1.0, x, offx=-2)
+            assert_raises(Exception, f, 1.0, x, n=-2)
+            assert_raises(Exception, f, 1.0, x, n=5)
+            assert_raises(Exception, f, 1.0, x, lower=2)
+            assert_raises(Exception, f, 1.0, x, a=np.zeros((2, 2), 'd', 'F'))
+
+    def test_syr2(self):
+        x = np.arange(1, 5, dtype='d')
+        y = np.arange(5, 9, dtype='d')
+        resxy = np.triu(x[:, np.newaxis] * y + y[:, np.newaxis] * x)
+        resxy_reverse = np.triu(x[::-1, np.newaxis] * y[::-1]
+                                + y[::-1, np.newaxis] * x[::-1])
+
+        q = np.linspace(0, 8.5, 17, endpoint=False)
+
+        for p, rtol in zip('sd', [1e-7, 1e-14]):
+            f = getattr(fblas, p+'syr2', None)
+            if f is None:
+                continue
+            assert_allclose(f(1.0, x, y), resxy, rtol=rtol)
+            assert_allclose(f(1.0, x, y, n=3), resxy[:3, :3], rtol=rtol)
+            assert_allclose(f(1.0, x, y, lower=True), resxy.T, rtol=rtol)
+
+            assert_allclose(f(1.0, q, q, incx=2, offx=2, incy=2, offy=10),
+                            resxy, rtol=rtol)
+            assert_allclose(f(1.0, q, q, incx=2, offx=2, incy=2, offy=10, n=3),
+                            resxy[:3, :3], rtol=rtol)
+            # negative increments imply reversed vectors in blas
+            assert_allclose(f(1.0, q, q, incx=-2, offx=2, incy=-2, offy=10),
+                            resxy_reverse, rtol=rtol)
+
+            a = np.zeros((4, 4), 'f' if p == 's' else 'd', 'F')
+            b = f(1.0, x, y, a=a, overwrite_a=True)
+            assert_allclose(a, resxy, rtol=rtol)
+
+            b = f(2.0, x, y, a=a)
+            assert_(a is not b)
+            assert_allclose(b, 3*resxy, rtol=rtol)
+
+            assert_raises(Exception, f, 1.0, x, y, incx=0)
+            assert_raises(Exception, f, 1.0, x, y, offx=5)
+            assert_raises(Exception, f, 1.0, x, y, offx=-2)
+            assert_raises(Exception, f, 1.0, x, y, incy=0)
+            assert_raises(Exception, f, 1.0, x, y, offy=5)
+            assert_raises(Exception, f, 1.0, x, y, offy=-2)
+            assert_raises(Exception, f, 1.0, x, y, n=-2)
+            assert_raises(Exception, f, 1.0, x, y, n=5)
+            assert_raises(Exception, f, 1.0, x, y, lower=2)
+            assert_raises(Exception, f, 1.0, x, y,
+                          a=np.zeros((2, 2), 'd', 'F'))
+
+    def test_her2(self):
+        x = np.arange(1, 9, dtype='d').view('D')
+        y = np.arange(9, 17, dtype='d').view('D')
+        resxy = x[:, np.newaxis] * y.conj() + y[:, np.newaxis] * x.conj()
+        resxy = np.triu(resxy)
+
+        resxy_reverse = x[::-1, np.newaxis] * y[::-1].conj()
+        resxy_reverse += y[::-1, np.newaxis] * x[::-1].conj()
+        resxy_reverse = np.triu(resxy_reverse)
+
+        u = np.c_[np.zeros(4), x, np.zeros(4)].ravel()
+        v = np.c_[np.zeros(4), y, np.zeros(4)].ravel()
+
+        for p, rtol in zip('cz', [1e-7, 1e-14]):
+            f = getattr(fblas, p+'her2', None)
+            if f is None:
+                continue
+            assert_allclose(f(1.0, x, y), resxy, rtol=rtol)
+            assert_allclose(f(1.0, x, y, n=3), resxy[:3, :3], rtol=rtol)
+            assert_allclose(f(1.0, x, y, lower=True), resxy.T.conj(),
+                            rtol=rtol)
+
+            assert_allclose(f(1.0, u, v, incx=3, offx=1, incy=3, offy=1),
+                            resxy, rtol=rtol)
+            assert_allclose(f(1.0, u, v, incx=3, offx=1, incy=3, offy=1, n=3),
+                            resxy[:3, :3], rtol=rtol)
+            # negative increments imply reversed vectors in blas
+            assert_allclose(f(1.0, u, v, incx=-3, offx=1, incy=-3, offy=1),
+                            resxy_reverse, rtol=rtol)
+
+            a = np.zeros((4, 4), 'F' if p == 'c' else 'D', 'F')
+            b = f(1.0, x, y, a=a, overwrite_a=True)
+            assert_allclose(a, resxy, rtol=rtol)
+
+            b = f(2.0, x, y, a=a)
+            assert_(a is not b)
+            assert_allclose(b, 3*resxy, rtol=rtol)
+
+            assert_raises(Exception, f, 1.0, x, y, incx=0)
+            assert_raises(Exception, f, 1.0, x, y, offx=5)
+            assert_raises(Exception, f, 1.0, x, y, offx=-2)
+            assert_raises(Exception, f, 1.0, x, y, incy=0)
+            assert_raises(Exception, f, 1.0, x, y, offy=5)
+            assert_raises(Exception, f, 1.0, x, y, offy=-2)
+            assert_raises(Exception, f, 1.0, x, y, n=-2)
+            assert_raises(Exception, f, 1.0, x, y, n=5)
+            assert_raises(Exception, f, 1.0, x, y, lower=2)
+            assert_raises(Exception, f, 1.0, x, y,
+                          a=np.zeros((2, 2), 'd', 'F'))
+
+    def test_gbmv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 7
+            m = 5
+            kl = 1
+            ku = 2
+            # fake a banded matrix via toeplitz
+            A = toeplitz(append(rng.random(kl+1), zeros(m-kl-1)),
+                         append(rng.random(ku+1), zeros(n-ku-1)))
+            A = A.astype(dtype)
+            Ab = zeros((kl+ku+1, n), dtype=dtype)
+
+            # Form the banded storage
+            Ab[2, :5] = A[0, 0]  # diag
+            Ab[1, 1:6] = A[0, 1]  # sup1
+            Ab[0, 2:7] = A[0, 2]  # sup2
+            Ab[3, :4] = A[1, 0]  # sub1
+
+            x = rng.random(n).astype(dtype)
+            y = rng.random(m).astype(dtype)
+            alpha, beta = dtype(3), dtype(-5)
+
+            func, = get_blas_funcs(('gbmv',), dtype=dtype)
+            y1 = func(m=m, n=n, ku=ku, kl=kl, alpha=alpha, a=Ab,
+                      x=x, y=y, beta=beta)
+            y2 = alpha * A.dot(x) + beta * y
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(m=m, n=n, ku=ku, kl=kl, alpha=alpha, a=Ab,
+                      x=y, y=x, beta=beta, trans=1)
+            y2 = alpha * A.T.dot(y) + beta * x
+            assert_array_almost_equal(y1, y2)
+
+    def test_sbmv_hbmv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 6
+            k = 2
+            A = zeros((n, n), dtype=dtype)
+            Ab = zeros((k+1, n), dtype=dtype)
+
+            # Form the array and its packed banded storage
+            A[arange(n), arange(n)] = rng.random(n)
+            for ind2 in range(1, k+1):
+                temp = rng.random(n-ind2)
+                A[arange(n-ind2), arange(ind2, n)] = temp
+                Ab[-1-ind2, ind2:] = temp
+            A = A.astype(dtype)
+            A = A + A.T if ind < 2 else A + A.conj().T
+            Ab[-1, :] = diag(A)
+            x = rng.random(n).astype(dtype)
+            y = rng.random(n).astype(dtype)
+            alpha, beta = dtype(1.25), dtype(3)
+
+            if ind > 1:
+                func, = get_blas_funcs(('hbmv',), dtype=dtype)
+            else:
+                func, = get_blas_funcs(('sbmv',), dtype=dtype)
+            y1 = func(k=k, alpha=alpha, a=Ab, x=x, y=y, beta=beta)
+            y2 = alpha * A.dot(x) + beta * y
+            assert_array_almost_equal(y1, y2)
+
+    def test_spmv_hpmv(self):
+        rng = np.random.default_rng(12345698)
+        for ind, dtype in enumerate(DTYPES+COMPLEX_DTYPES):
+            n = 3
+            A = rng.random((n, n)).astype(dtype)
+            if ind > 1:
+                A += rng.random((n, n))*1j
+            A = A.astype(dtype)
+            A = A + A.T if ind < 4 else A + A.conj().T
+            c, r = tril_indices(n)
+            Ap = A[r, c]
+            x = rng.random(n).astype(dtype)
+            y = rng.random(n).astype(dtype)
+            xlong = arange(2*n).astype(dtype)
+            ylong = ones(2*n).astype(dtype)
+            alpha, beta = dtype(1.25), dtype(2)
+
+            if ind > 3:
+                func, = get_blas_funcs(('hpmv',), dtype=dtype)
+            else:
+                func, = get_blas_funcs(('spmv',), dtype=dtype)
+            y1 = func(n=n, alpha=alpha, ap=Ap, x=x, y=y, beta=beta)
+            y2 = alpha * A.dot(x) + beta * y
+            assert_array_almost_equal(y1, y2)
+
+            # Test inc and offsets
+            y1 = func(n=n-1, alpha=alpha, beta=beta, x=xlong, y=ylong, ap=Ap,
+                      incx=2, incy=2, offx=n, offy=n)
+            y2 = (alpha * A[:-1, :-1]).dot(xlong[3::2]) + beta * ylong[3::2]
+            assert_array_almost_equal(y1[3::2], y2)
+            assert_almost_equal(y1[4], ylong[4])
+
+    def test_spr_hpr(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES+COMPLEX_DTYPES):
+            n = 3
+            A = rng.random((n, n)).astype(dtype)
+            if ind > 1:
+                A += rng.random((n, n))*1j
+            A = A.astype(dtype)
+            A = A + A.T if ind < 4 else A + A.conj().T
+            c, r = tril_indices(n)
+            Ap = A[r, c]
+            x = rng.random(n).astype(dtype)
+            alpha = (DTYPES+COMPLEX_DTYPES)[mod(ind, 4)](2.5)
+
+            if ind > 3:
+                func, = get_blas_funcs(('hpr',), dtype=dtype)
+                y2 = alpha * x[:, None].dot(x[None, :].conj()) + A
+            else:
+                func, = get_blas_funcs(('spr',), dtype=dtype)
+                y2 = alpha * x[:, None].dot(x[None, :]) + A
+
+            y1 = func(n=n, alpha=alpha, ap=Ap, x=x)
+            y1f = zeros((3, 3), dtype=dtype)
+            y1f[r, c] = y1
+            y1f[c, r] = y1.conj() if ind > 3 else y1
+            assert_array_almost_equal(y1f, y2)
+
+    def test_spr2_hpr2(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 3
+            A = rng.random((n, n)).astype(dtype)
+            if ind > 1:
+                A += rng.random((n, n))*1j
+            A = A.astype(dtype)
+            A = A + A.T if ind < 2 else A + A.conj().T
+            c, r = tril_indices(n)
+            Ap = A[r, c]
+            x = rng.random(n).astype(dtype)
+            y = rng.random(n).astype(dtype)
+            alpha = dtype(2)
+
+            if ind > 1:
+                func, = get_blas_funcs(('hpr2',), dtype=dtype)
+            else:
+                func, = get_blas_funcs(('spr2',), dtype=dtype)
+
+            u = alpha.conj() * x[:, None].dot(y[None, :].conj())
+            y2 = A + u + u.conj().T
+            y1 = func(n=n, alpha=alpha, x=x, y=y, ap=Ap)
+            y1f = zeros((3, 3), dtype=dtype)
+            y1f[r, c] = y1
+            y1f[[1, 2, 2], [0, 0, 1]] = y1[[1, 3, 4]].conj()
+            assert_array_almost_equal(y1f, y2)
+
+    def test_tbmv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 10
+            k = 3
+            x = rng.random(n).astype(dtype)
+            A = zeros((n, n), dtype=dtype)
+            # Banded upper triangular array
+            for sup in range(k+1):
+                A[arange(n-sup), arange(sup, n)] = rng.random(n-sup)
+
+            # Add complex parts for c,z
+            if ind > 1:
+                A[nonzero(A)] += 1j * rng.random((k+1)*n-(k*(k+1)//2)).astype(dtype)
+
+            # Form the banded storage
+            Ab = zeros((k+1, n), dtype=dtype)
+            for row in range(k+1):
+                Ab[-row-1, row:] = diag(A, k=row)
+            func, = get_blas_funcs(('tbmv',), dtype=dtype)
+
+            y1 = func(k=k, a=Ab, x=x)
+            y2 = A.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = A.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1, trans=1)
+            y2 = A.T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1, trans=2)
+            y2 = A.conj().T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+    def test_tbsv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 6
+            k = 3
+            x = rng.random(n).astype(dtype)
+            A = zeros((n, n), dtype=dtype)
+            # Banded upper triangular array
+            for sup in range(k+1):
+                A[arange(n-sup), arange(sup, n)] = rng.random(n-sup)
+
+            # Add complex parts for c,z
+            if ind > 1:
+                A[nonzero(A)] += 1j * rng.random((k+1)*n-(k*(k+1)//2)).astype(dtype)
+
+            # Form the banded storage
+            Ab = zeros((k+1, n), dtype=dtype)
+            for row in range(k+1):
+                Ab[-row-1, row:] = diag(A, k=row)
+            func, = get_blas_funcs(('tbsv',), dtype=dtype)
+
+            y1 = func(k=k, a=Ab, x=x)
+            y2 = solve(A, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = solve(A, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1, trans=1)
+            y2 = solve(A.T, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(k=k, a=Ab, x=x, diag=1, trans=2)
+            y2 = solve(A.conj().T, x)
+            assert_array_almost_equal(y1, y2)
+
+    def test_tpmv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 10
+            x = rng.random(n).astype(dtype)
+            # Upper triangular array
+            if ind < 2:
+                A = triu(rng.random((n, n)))
+            else:
+                A = triu(rng.random((n, n)) + rng.random((n, n))*1j)
+
+            # Form the packed storage
+            c, r = tril_indices(n)
+            Ap = A[r, c]
+            func, = get_blas_funcs(('tpmv',), dtype=dtype)
+
+            y1 = func(n=n, ap=Ap, x=x)
+            y2 = A.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = A.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1, trans=1)
+            y2 = A.T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1, trans=2)
+            y2 = A.conj().T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+    def test_tpsv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 10
+            x = rng.random(n).astype(dtype)
+            # Upper triangular array
+            if ind < 2:
+                A = triu(rng.random((n, n)))
+            else:
+                A = triu(rng.random((n, n)) + rng.random((n, n))*1j)
+            A += eye(n)
+            # Form the packed storage
+            c, r = tril_indices(n)
+            Ap = A[r, c]
+            func, = get_blas_funcs(('tpsv',), dtype=dtype)
+
+            y1 = func(n=n, ap=Ap, x=x)
+            y2 = solve(A, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = solve(A, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1, trans=1)
+            y2 = solve(A.T, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(n=n, ap=Ap, x=x, diag=1, trans=2)
+            y2 = solve(A.conj().T, x)
+            assert_array_almost_equal(y1, y2)
+
+    def test_trmv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 3
+            A = (rng.random((n, n))+eye(n)).astype(dtype)
+            x = rng.random(3).astype(dtype)
+            func, = get_blas_funcs(('trmv',), dtype=dtype)
+
+            y1 = func(a=A, x=x)
+            y2 = triu(A).dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = triu(A).dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1, trans=1)
+            y2 = triu(A).T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1, trans=2)
+            y2 = triu(A).conj().T.dot(x)
+            assert_array_almost_equal(y1, y2)
+
+    def test_trsv(self):
+        rng = np.random.default_rng(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 15
+            A = (rng.random((n, n))+eye(n)).astype(dtype)
+            x = rng.random(n).astype(dtype)
+            func, = get_blas_funcs(('trsv',), dtype=dtype)
+
+            y1 = func(a=A, x=x)
+            y2 = solve(triu(A), x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, lower=1)
+            y2 = solve(tril(A), x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1)
+            A[arange(n), arange(n)] = dtype(1)
+            y2 = solve(triu(A), x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1, trans=1)
+            y2 = solve(triu(A).T, x)
+            assert_array_almost_equal(y1, y2)
+
+            y1 = func(a=A, x=x, diag=1, trans=2)
+            y2 = solve(triu(A).conj().T, x)
+            assert_array_almost_equal(y1, y2)
+
+
+class TestFBLAS3Simple:
+
+    def test_gemm(self):
+        for p in 'sd':
+            f = getattr(fblas, p+'gemm', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3, [3], [-4]), [[-36]])
+            assert_array_almost_equal(f(3, [3], [-4], 3, [5]), [-21])
+        for p in 'cz':
+            f = getattr(fblas, p+'gemm', None)
+            if f is None:
+                continue
+            assert_array_almost_equal(f(3j, [3-4j], [-4]), [[-48-36j]])
+            assert_array_almost_equal(f(3j, [3-4j], [-4], 3, [5j]), [-48-21j])
+
+
+def _get_func(func, ps='sdzc'):
+    """Just a helper: return a specified BLAS function w/typecode."""
+    for p in ps:
+        f = getattr(fblas, p+func, None)
+        if f is None:
+            continue
+        yield f
+
+
+class TestBLAS3Symm:
+
+    def setup_method(self):
+        self.a = np.array([[1., 2.],
+                           [0., 1.]])
+        self.b = np.array([[1., 0., 3.],
+                           [0., -1., 2.]])
+        self.c = np.ones((2, 3))
+        self.t = np.array([[2., -1., 8.],
+                           [3., 0., 9.]])
+
+    def test_symm(self):
+        for f in _get_func('symm'):
+            res = f(a=self.a, b=self.b, c=self.c, alpha=1., beta=1.)
+            assert_array_almost_equal(res, self.t)
+
+            res = f(a=self.a.T, b=self.b, lower=1, c=self.c, alpha=1., beta=1.)
+            assert_array_almost_equal(res, self.t)
+
+            res = f(a=self.a, b=self.b.T, side=1, c=self.c.T,
+                    alpha=1., beta=1.)
+            assert_array_almost_equal(res, self.t.T)
+
+    def test_summ_wrong_side(self):
+        f = getattr(fblas, 'dsymm', None)
+        if f is not None:
+            assert_raises(Exception, f, **{'a': self.a, 'b': self.b,
+                                           'alpha': 1, 'side': 1})
+            # `side=1` means C <- B*A, hence shapes of A and B are to be
+            #  compatible. Otherwise, f2py exception is raised
+
+    def test_symm_wrong_uplo(self):
+        """SYMM only considers the upper/lower part of A. Hence setting
+        wrong value for `lower` (default is lower=0, meaning upper triangle)
+        gives a wrong result.
+        """
+        f = getattr(fblas, 'dsymm', None)
+        if f is not None:
+            res = f(a=self.a, b=self.b, c=self.c, alpha=1., beta=1.)
+            assert np.allclose(res, self.t)
+
+            res = f(a=self.a, b=self.b, lower=1, c=self.c, alpha=1., beta=1.)
+            assert not np.allclose(res, self.t)
+
+
+class TestBLAS3Syrk:
+    def setup_method(self):
+        self.a = np.array([[1., 0.],
+                           [0., -2.],
+                           [2., 3.]])
+        self.t = np.array([[1., 0., 2.],
+                           [0., 4., -6.],
+                           [2., -6., 13.]])
+        self.tt = np.array([[5., 6.],
+                            [6., 13.]])
+
+    def test_syrk(self):
+        for f in _get_func('syrk'):
+            c = f(a=self.a, alpha=1.)
+            assert_array_almost_equal(np.triu(c), np.triu(self.t))
+
+            c = f(a=self.a, alpha=1., lower=1)
+            assert_array_almost_equal(np.tril(c), np.tril(self.t))
+
+            c0 = np.ones(self.t.shape)
+            c = f(a=self.a, alpha=1., beta=1., c=c0)
+            assert_array_almost_equal(np.triu(c), np.triu(self.t+c0))
+
+            c = f(a=self.a, alpha=1., trans=1)
+            assert_array_almost_equal(np.triu(c), np.triu(self.tt))
+
+    # prints '0-th dimension must be fixed to 3 but got 5',
+    # FIXME: suppress?
+    # FIXME: how to catch the _fblas.error?
+    def test_syrk_wrong_c(self):
+        f = getattr(fblas, 'dsyrk', None)
+        if f is not None:
+            assert_raises(Exception, f, **{'a': self.a, 'alpha': 1.,
+                                           'c': np.ones((5, 8))})
+        # if C is supplied, it must have compatible dimensions
+
+
+class TestBLAS3Syr2k:
+    def setup_method(self):
+        self.a = np.array([[1., 0.],
+                           [0., -2.],
+                           [2., 3.]])
+        self.b = np.array([[0., 1.],
+                           [1., 0.],
+                           [0, 1.]])
+        self.t = np.array([[0., -1., 3.],
+                           [-1., 0., 0.],
+                           [3., 0., 6.]])
+        self.tt = np.array([[0., 1.],
+                            [1., 6]])
+
+    def test_syr2k(self):
+        for f in _get_func('syr2k'):
+            c = f(a=self.a, b=self.b, alpha=1.)
+            assert_array_almost_equal(np.triu(c), np.triu(self.t))
+
+            c = f(a=self.a, b=self.b, alpha=1., lower=1)
+            assert_array_almost_equal(np.tril(c), np.tril(self.t))
+
+            c0 = np.ones(self.t.shape)
+            c = f(a=self.a, b=self.b, alpha=1., beta=1., c=c0)
+            assert_array_almost_equal(np.triu(c), np.triu(self.t+c0))
+
+            c = f(a=self.a, b=self.b, alpha=1., trans=1)
+            assert_array_almost_equal(np.triu(c), np.triu(self.tt))
+
+    # prints '0-th dimension must be fixed to 3 but got 5', FIXME: suppress?
+    def test_syr2k_wrong_c(self):
+        f = getattr(fblas, 'dsyr2k', None)
+        if f is not None:
+            assert_raises(Exception, f, **{'a': self.a,
+                                           'b': self.b,
+                                           'alpha': 1.,
+                                           'c': np.zeros((15, 8))})
+        # if C is supplied, it must have compatible dimensions
+
+
+class TestSyHe:
+    """Quick and simple tests for (zc)-symm, syrk, syr2k."""
+
+    def setup_method(self):
+        self.sigma_y = np.array([[0., -1.j],
+                                 [1.j, 0.]])
+
+    def test_symm_zc(self):
+        for f in _get_func('symm', 'zc'):
+            # NB: a is symmetric w/upper diag of ONLY
+            res = f(a=self.sigma_y, b=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), np.diag([1, -1]))
+
+    def test_hemm_zc(self):
+        for f in _get_func('hemm', 'zc'):
+            # NB: a is hermitian w/upper diag of ONLY
+            res = f(a=self.sigma_y, b=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), np.diag([1, 1]))
+
+    def test_syrk_zr(self):
+        for f in _get_func('syrk', 'zc'):
+            res = f(a=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), np.diag([-1, -1]))
+
+    def test_herk_zr(self):
+        for f in _get_func('herk', 'zc'):
+            res = f(a=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), np.diag([1, 1]))
+
+    def test_syr2k_zr(self):
+        for f in _get_func('syr2k', 'zc'):
+            res = f(a=self.sigma_y, b=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), 2.*np.diag([-1, -1]))
+
+    def test_her2k_zr(self):
+        for f in _get_func('her2k', 'zc'):
+            res = f(a=self.sigma_y, b=self.sigma_y, alpha=1.)
+            assert_array_almost_equal(np.triu(res), 2.*np.diag([1, 1]))
+
+
+class TestTRMM:
+    """Quick and simple tests for dtrmm."""
+
+    def setup_method(self):
+        self.a = np.array([[1., 2., ],
+                           [-2., 1.]])
+        self.b = np.array([[3., 4., -1.],
+                           [5., 6., -2.]])
+
+        self.a2 = np.array([[1, 1, 2, 3],
+                            [0, 1, 4, 5],
+                            [0, 0, 1, 6],
+                            [0, 0, 0, 1]], order="f")
+        self.b2 = np.array([[1, 4], [2, 5], [3, 6], [7, 8], [9, 10]],
+                           order="f")
+
+    @pytest.mark.parametrize("dtype_", DTYPES)
+    def test_side(self, dtype_):
+        trmm = get_blas_funcs("trmm", dtype=dtype_)
+        # Provide large A array that works for side=1 but not 0 (see gh-10841)
+        assert_raises(Exception, trmm, 1.0, self.a2, self.b2)
+        res = trmm(1.0, self.a2.astype(dtype_), self.b2.astype(dtype_),
+                   side=1)
+        k = self.b2.shape[1]
+        assert_allclose(res, self.b2 @ self.a2[:k, :k], rtol=0.,
+                        atol=100*np.finfo(dtype_).eps)
+
+    def test_ab(self):
+        f = getattr(fblas, 'dtrmm', None)
+        if f is not None:
+            result = f(1., self.a, self.b)
+            # default a is upper triangular
+            expected = np.array([[13., 16., -5.],
+                                 [5., 6., -2.]])
+            assert_array_almost_equal(result, expected)
+
+    def test_ab_lower(self):
+        f = getattr(fblas, 'dtrmm', None)
+        if f is not None:
+            result = f(1., self.a, self.b, lower=True)
+            expected = np.array([[3., 4., -1.],
+                                 [-1., -2., 0.]])  # now a is lower triangular
+            assert_array_almost_equal(result, expected)
+
+    def test_b_overwrites(self):
+        # BLAS dtrmm modifies B argument in-place.
+        # Here the default is to copy, but this can be overridden
+        f = getattr(fblas, 'dtrmm', None)
+        if f is not None:
+            for overwr in [True, False]:
+                bcopy = self.b.copy()
+                result = f(1., self.a, bcopy, overwrite_b=overwr)
+                # C-contiguous arrays are copied
+                assert_(bcopy.flags.f_contiguous is False and
+                        np.may_share_memory(bcopy, result) is False)
+                assert_equal(bcopy, self.b)
+
+            bcopy = np.asfortranarray(self.b.copy())  # or just transpose it
+            result = f(1., self.a, bcopy, overwrite_b=True)
+            assert_(bcopy.flags.f_contiguous is True and
+                    np.may_share_memory(bcopy, result) is True)
+            assert_array_almost_equal(bcopy, result)
+
+
+def test_trsm():
+    rng = np.random.default_rng(1234)
+    for ind, dtype in enumerate(DTYPES):
+        tol = np.finfo(dtype).eps*1000
+        func, = get_blas_funcs(('trsm',), dtype=dtype)
+
+        # Test protection against size mismatches
+        A = rng.random((4, 5)).astype(dtype)
+        B = rng.random((4, 4)).astype(dtype)
+        alpha = dtype(1)
+        assert_raises(Exception, func, alpha, A, B)
+        assert_raises(Exception, func, alpha, A.T, B)
+
+        n = 8
+        m = 7
+        alpha = dtype(-2.5)
+        if ind < 2:
+            A = rng.random((m, m)) + eye(m)
+        else:
+            A = (rng.random((m, m)) + rng.random((m, m))*1j) + eye(m)
+        A = A.astype(dtype)
+        Au = triu(A)
+        Al = tril(A)
+        B1 = rng.random((m, n)).astype(dtype)
+        B2 = rng.random((n, m)).astype(dtype)
+
+        x1 = func(alpha=alpha, a=A, b=B1)
+        assert_equal(B1.shape, x1.shape)
+        x2 = solve(Au, alpha*B1)
+        assert_allclose(x1, x2, atol=tol)
+
+        x1 = func(alpha=alpha, a=A, b=B1, trans_a=1)
+        x2 = solve(Au.T, alpha*B1)
+        assert_allclose(x1, x2, atol=tol)
+
+        x1 = func(alpha=alpha, a=A, b=B1, trans_a=2)
+        x2 = solve(Au.conj().T, alpha*B1)
+        assert_allclose(x1, x2, atol=tol)
+
+        x1 = func(alpha=alpha, a=A, b=B1, diag=1)
+        Au[arange(m), arange(m)] = dtype(1)
+        x2 = solve(Au, alpha*B1)
+        assert_allclose(x1, x2, atol=tol)
+
+        x1 = func(alpha=alpha, a=A, b=B2, diag=1, side=1)
+        x2 = solve(Au.conj().T, alpha*B2.conj().T)
+        assert_allclose(x1, x2.conj().T, atol=tol)
+
+        x1 = func(alpha=alpha, a=A, b=B2, diag=1, side=1, lower=1)
+        Al[arange(m), arange(m)] = dtype(1)
+        x2 = solve(Al.conj().T, alpha*B2.conj().T)
+        assert_allclose(x1, x2.conj().T, atol=tol)
+
+
+@pytest.mark.xfail(run=False,
+                   reason="gh-16930")
+def test_gh_169309():
+    x = np.repeat(10, 9)
+    actual = scipy.linalg.blas.dnrm2(x, 5, 3, -1)
+    expected = math.sqrt(500)
+    assert_allclose(actual, expected)
+
+
+def test_dnrm2_neg_incx():
+    # check that dnrm2(..., incx < 0) raises
+    # XXX: remove the test after the lowest supported BLAS implements
+    # negative incx (new in LAPACK 3.10)
+    x = np.repeat(10, 9)
+    incx = -1
+    with assert_raises(fblas.__fblas_error):
+        scipy.linalg.blas.dnrm2(x, 5, 3, incx)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_blas.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_blas.py
new file mode 100644
index 0000000000000000000000000000000000000000..284e214d38ed331cf0493d1e3bba6e1214939b2c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_blas.py
@@ -0,0 +1,118 @@
+import numpy as np
+from numpy.testing import (assert_allclose,
+                           assert_equal)
+import scipy.linalg.cython_blas as blas
+
+class TestDGEMM:
+    
+    def test_transposes(self):
+
+        a = np.arange(12, dtype='d').reshape((3, 4))[:2,:2]
+        b = np.arange(1, 13, dtype='d').reshape((4, 3))[:2,:2]
+        c = np.empty((2, 4))[:2,:2]
+
+        blas._test_dgemm(1., a, b, 0., c)
+        assert_allclose(c, a.dot(b))
+
+        blas._test_dgemm(1., a.T, b, 0., c)
+        assert_allclose(c, a.T.dot(b))
+
+        blas._test_dgemm(1., a, b.T, 0., c)
+        assert_allclose(c, a.dot(b.T))
+
+        blas._test_dgemm(1., a.T, b.T, 0., c)
+        assert_allclose(c, a.T.dot(b.T))
+
+        blas._test_dgemm(1., a, b, 0., c.T)
+        assert_allclose(c, a.dot(b).T)
+
+        blas._test_dgemm(1., a.T, b, 0., c.T)
+        assert_allclose(c, a.T.dot(b).T)
+
+        blas._test_dgemm(1., a, b.T, 0., c.T)
+        assert_allclose(c, a.dot(b.T).T)
+
+        blas._test_dgemm(1., a.T, b.T, 0., c.T)
+        assert_allclose(c, a.T.dot(b.T).T)
+    
+    def test_shapes(self):
+        a = np.arange(6, dtype='d').reshape((3, 2))
+        b = np.arange(-6, 2, dtype='d').reshape((2, 4))
+        c = np.empty((3, 4))
+
+        blas._test_dgemm(1., a, b, 0., c)
+        assert_allclose(c, a.dot(b))
+
+        blas._test_dgemm(1., b.T, a.T, 0., c.T)
+        assert_allclose(c, b.T.dot(a.T).T)
+        
+class TestWfuncPointers:
+    """ Test the function pointers that are expected to fail on
+    Mac OS X without the additional entry statement in their definitions
+    in fblas_l1.pyf.src. """
+
+    def test_complex_args(self):
+
+        cx = np.array([.5 + 1.j, .25 - .375j, 12.5 - 4.j], np.complex64)
+        cy = np.array([.8 + 2.j, .875 - .625j, -1. + 2.j], np.complex64)
+
+        assert_allclose(blas._test_cdotc(cx, cy),
+                        -17.6468753815+21.3718757629j)
+        assert_allclose(blas._test_cdotu(cx, cy),
+                        -6.11562538147+30.3156242371j)
+
+        assert_equal(blas._test_icamax(cx), 3)
+
+        assert_allclose(blas._test_scasum(cx), 18.625)
+        assert_allclose(blas._test_scnrm2(cx), 13.1796483994)
+
+        assert_allclose(blas._test_cdotc(cx[::2], cy[::2]),
+                        -18.1000003815+21.2000007629j)
+        assert_allclose(blas._test_cdotu(cx[::2], cy[::2]),
+                        -6.10000038147+30.7999992371j)
+        assert_allclose(blas._test_scasum(cx[::2]), 18.)
+        assert_allclose(blas._test_scnrm2(cx[::2]), 13.1719398499)
+    
+    def test_double_args(self):
+
+        x = np.array([5., -3, -.5], np.float64)
+        y = np.array([2, 1, .5], np.float64)
+
+        assert_allclose(blas._test_dasum(x), 8.5)
+        assert_allclose(blas._test_ddot(x, y), 6.75)
+        assert_allclose(blas._test_dnrm2(x), 5.85234975815)
+
+        assert_allclose(blas._test_dasum(x[::2]), 5.5)
+        assert_allclose(blas._test_ddot(x[::2], y[::2]), 9.75)
+        assert_allclose(blas._test_dnrm2(x[::2]), 5.0249376297)
+
+        assert_equal(blas._test_idamax(x), 1)
+
+    def test_float_args(self):
+
+        x = np.array([5., -3, -.5], np.float32)
+        y = np.array([2, 1, .5], np.float32)
+
+        assert_equal(blas._test_isamax(x), 1)
+
+        assert_allclose(blas._test_sasum(x), 8.5)
+        assert_allclose(blas._test_sdot(x, y), 6.75)
+        assert_allclose(blas._test_snrm2(x), 5.85234975815)
+
+        assert_allclose(blas._test_sasum(x[::2]), 5.5)
+        assert_allclose(blas._test_sdot(x[::2], y[::2]), 9.75)
+        assert_allclose(blas._test_snrm2(x[::2]), 5.0249376297)
+
+    def test_double_complex_args(self):
+
+        cx = np.array([.5 + 1.j, .25 - .375j, 13. - 4.j], np.complex128)
+        cy = np.array([.875 + 2.j, .875 - .625j, -1. + 2.j], np.complex128)
+
+        assert_equal(blas._test_izamax(cx), 3)
+
+        assert_allclose(blas._test_zdotc(cx, cy), -18.109375+22.296875j)
+        assert_allclose(blas._test_zdotu(cx, cy), -6.578125+31.390625j)
+
+        assert_allclose(blas._test_zdotc(cx[::2], cy[::2]), -18.5625+22.125j)
+        assert_allclose(blas._test_zdotu(cx[::2], cy[::2]), -6.5625+31.875j)
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_lapack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_lapack.py
new file mode 100644
index 0000000000000000000000000000000000000000..2a4e7b34b62042efdb0ce0f8ee61ce0189320995
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cython_lapack.py
@@ -0,0 +1,22 @@
+from numpy.testing import assert_allclose
+from scipy.linalg import cython_lapack as cython_lapack
+from scipy.linalg import lapack
+
+
+class TestLamch:
+
+    def test_slamch(self):
+        for c in [b'e', b's', b'b', b'p', b'n', b'r', b'm', b'u', b'l', b'o']:
+            assert_allclose(cython_lapack._test_slamch(c),
+                            lapack.slamch(c))
+
+    def test_dlamch(self):
+        for c in [b'e', b's', b'b', b'p', b'n', b'r', b'm', b'u', b'l', b'o']:
+            assert_allclose(cython_lapack._test_dlamch(c),
+                            lapack.dlamch(c))
+
+    def test_complex_ladiv(self):
+        cx = .5 + 1.j
+        cy = .875 + 2.j
+        assert_allclose(cython_lapack._test_zladiv(cy, cx), 1.95+0.1j)
+        assert_allclose(cython_lapack._test_cladiv(cy, cx), 1.95+0.1j)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cythonized_array_utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cythonized_array_utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..d52c93950b6398c010b8bb8e5312153b3102fdf4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_cythonized_array_utils.py
@@ -0,0 +1,132 @@
+import numpy as np
+from scipy.linalg import bandwidth, issymmetric, ishermitian
+import pytest
+from pytest import raises
+
+
+def test_bandwidth_dtypes():
+    n = 5
+    for t in np.typecodes['All']:
+        A = np.zeros([n, n], dtype=t)
+        if t in 'eUVOMm':
+            raises(TypeError, bandwidth, A)
+        elif t == 'G':  # No-op test. On win these pass on others fail.
+            pass
+        else:
+            _ = bandwidth(A)
+
+
+def test_bandwidth_non2d_input():
+    A = np.array([1, 2, 3])
+    raises(ValueError, bandwidth, A)
+    A = np.array([[[1, 2, 3], [4, 5, 6]]])
+    raises(ValueError, bandwidth, A)
+
+
+@pytest.mark.parametrize('T', [x for x in np.typecodes['All']
+                               if x not in 'eGUVOMm'])
+def test_bandwidth_square_inputs(T):
+    n = 20
+    k = 4
+    R = np.zeros([n, n], dtype=T, order='F')
+    # form a banded matrix inplace
+    R[[x for x in range(n)], [x for x in range(n)]] = 1
+    R[[x for x in range(n-k)], [x for x in range(k, n)]] = 1
+    R[[x for x in range(1, n)], [x for x in range(n-1)]] = 1
+    R[[x for x in range(k, n)], [x for x in range(n-k)]] = 1
+    assert bandwidth(R) == (k, k)
+    A = np.array([
+        [1, 1, 0, 0, 0, 0, 0, 0],
+        [1, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0],
+        [0, 0, 0, 0, 0, 1, 1, 1],
+        [0, 0, 0, 0, 0, 1, 0, 0],
+        [0, 0, 0, 0, 0, 1, 0, 0],
+    ])
+    assert bandwidth(A) == (2, 2)
+
+
+@pytest.mark.parametrize('T', [x for x in np.typecodes['All']
+                               if x not in 'eGUVOMm'])
+def test_bandwidth_rect_inputs(T):
+    n, m = 10, 20
+    k = 5
+    R = np.zeros([n, m], dtype=T, order='F')
+    # form a banded matrix inplace
+    R[[x for x in range(n)], [x for x in range(n)]] = 1
+    R[[x for x in range(n-k)], [x for x in range(k, n)]] = 1
+    R[[x for x in range(1, n)], [x for x in range(n-1)]] = 1
+    R[[x for x in range(k, n)], [x for x in range(n-k)]] = 1
+    assert bandwidth(R) == (k, k)
+
+
+def test_issymetric_ishermitian_dtypes():
+    n = 5
+    for t in np.typecodes['All']:
+        A = np.zeros([n, n], dtype=t)
+        if t in 'eUVOMm':
+            raises(TypeError, issymmetric, A)
+            raises(TypeError, ishermitian, A)
+        elif t == 'G':  # No-op test. On win these pass on others fail.
+            pass
+        else:
+            assert issymmetric(A)
+            assert ishermitian(A)
+
+
+def test_issymmetric_ishermitian_invalid_input():
+    A = np.array([1, 2, 3])
+    raises(ValueError, issymmetric, A)
+    raises(ValueError, ishermitian, A)
+    A = np.array([[[1, 2, 3], [4, 5, 6]]])
+    raises(ValueError, issymmetric, A)
+    raises(ValueError, ishermitian, A)
+    A = np.array([[1, 2, 3], [4, 5, 6]])
+    raises(ValueError, issymmetric, A)
+    raises(ValueError, ishermitian, A)
+
+
+def test_issymetric_complex_decimals():
+    A = np.arange(1, 10).astype(complex).reshape(3, 3)
+    A += np.arange(-4, 5).astype(complex).reshape(3, 3)*1j
+    # make entries decimal
+    A /= np.pi
+    A = A + A.T
+    assert issymmetric(A)
+
+
+def test_ishermitian_complex_decimals():
+    A = np.arange(1, 10).astype(complex).reshape(3, 3)
+    A += np.arange(-4, 5).astype(complex).reshape(3, 3)*1j
+    # make entries decimal
+    A /= np.pi
+    A = A + A.T.conj()
+    assert ishermitian(A)
+
+
+def test_issymmetric_approximate_results():
+    n = 20
+    rng = np.random.RandomState(123456789)
+    x = rng.uniform(high=5., size=[n, n])
+    y = x @ x.T  # symmetric
+    p = rng.standard_normal([n, n])
+    z = p @ y @ p.T
+    assert issymmetric(z, atol=1e-10)
+    assert issymmetric(z, atol=1e-10, rtol=0.)
+    assert issymmetric(z, atol=0., rtol=1e-12)
+    assert issymmetric(z, atol=1e-13, rtol=1e-12)
+
+
+def test_ishermitian_approximate_results():
+    n = 20
+    rng = np.random.RandomState(987654321)
+    x = rng.uniform(high=5., size=[n, n])
+    y = x @ x.T  # symmetric
+    p = rng.standard_normal([n, n]) + rng.standard_normal([n, n])*1j
+    z = p @ y @ p.conj().T
+    assert ishermitian(z, atol=1e-10)
+    assert ishermitian(z, atol=1e-10, rtol=0.)
+    assert ishermitian(z, atol=0., rtol=1e-12)
+    assert ishermitian(z, atol=1e-13, rtol=1e-12)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp.py
new file mode 100644
index 0000000000000000000000000000000000000000..605496721f8eec7a522fbba0a77ed33d6c1fdeaf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp.py
@@ -0,0 +1,3152 @@
+import itertools
+import platform
+import sys
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_almost_equal,
+                           assert_array_almost_equal, assert_array_equal,
+                           assert_, assert_allclose)
+
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.linalg import (eig, eigvals, lu, svd, svdvals, cholesky, qr,
+                          schur, rsf2csf, lu_solve, lu_factor, solve, diagsvd,
+                          hessenberg, rq, eig_banded, eigvals_banded, eigh,
+                          eigvalsh, qr_multiply, qz, orth, ordqz,
+                          subspace_angles, hadamard, eigvalsh_tridiagonal,
+                          eigh_tridiagonal, null_space, cdf2rdf, LinAlgError)
+
+from scipy.linalg.lapack import (dgbtrf, dgbtrs, zgbtrf, zgbtrs, dsbev,
+                                 dsbevd, dsbevx, zhbevd, zhbevx)
+
+from scipy.linalg._misc import norm
+from scipy.linalg._decomp_qz import _select_function
+from scipy.stats import ortho_group
+
+from numpy import (array, diag, full, linalg, argsort, zeros, arange,
+                   float32, complex64, ravel, sqrt, iscomplex, shape, sort,
+                   sign, asarray, isfinite, ndarray, eye,)
+
+from scipy.linalg._testutils import assert_no_overwrite
+from scipy.sparse._sputils import matrix
+
+from scipy._lib._testutils import check_free_memory
+from scipy.linalg.blas import HAS_ILP64
+try:
+    from scipy.__config__ import CONFIG
+except ImportError:
+    CONFIG = None
+
+IS_WASM = (sys.platform == "emscripten" or platform.machine() in ["wasm32", "wasm64"])
+
+
+def _random_hermitian_matrix(n, posdef=False, dtype=float):
+    "Generate random sym/hermitian array of the given size n"
+    if dtype in COMPLEX_DTYPES:
+        A = np.random.rand(n, n) + np.random.rand(n, n)*1.0j
+        A = (A + A.conj().T)/2
+    else:
+        A = np.random.rand(n, n)
+        A = (A + A.T)/2
+
+    if posdef:
+        A += sqrt(2*n)*np.eye(n)
+
+    return A.astype(dtype)
+
+
+REAL_DTYPES = [np.float32, np.float64]
+COMPLEX_DTYPES = [np.complex64, np.complex128]
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+# XXX: This function should not be defined here, but somewhere in
+#      scipy.linalg namespace
+def symrand(dim_or_eigv, rng):
+    """Return a random symmetric (Hermitian) matrix.
+
+    If 'dim_or_eigv' is an integer N, return a NxN matrix, with eigenvalues
+        uniformly distributed on (-1,1).
+
+    If 'dim_or_eigv' is  1-D real array 'a', return a matrix whose
+                      eigenvalues are 'a'.
+    """
+    if isinstance(dim_or_eigv, int):
+        dim = dim_or_eigv
+        d = rng.random(dim)*2 - 1
+    elif (isinstance(dim_or_eigv, ndarray) and
+          len(dim_or_eigv.shape) == 1):
+        dim = dim_or_eigv.shape[0]
+        d = dim_or_eigv
+    else:
+        raise TypeError("input type not supported.")
+
+    v = ortho_group.rvs(dim)
+    h = v.T.conj() @ diag(d) @ v
+    # to avoid roundoff errors, symmetrize the matrix (again)
+    h = 0.5*(h.T+h)
+    return h
+
+
+class TestEigVals:
+
+    def test_simple(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        w = eigvals(a)
+        exact_w = [(9+sqrt(93))/2, 0, (9-sqrt(93))/2]
+        assert_array_almost_equal(w, exact_w)
+
+    def test_simple_tr(self):
+        a = array([[1, 2, 3], [1, 2, 3], [2, 5, 6]], 'd').T
+        a = a.copy()
+        a = a.T
+        w = eigvals(a)
+        exact_w = [(9+sqrt(93))/2, 0, (9-sqrt(93))/2]
+        assert_array_almost_equal(w, exact_w)
+
+    def test_simple_complex(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6+1j]]
+        w = eigvals(a)
+        exact_w = [(9+1j+sqrt(92+6j))/2,
+                   0,
+                   (9+1j-sqrt(92+6j))/2]
+        assert_array_almost_equal(w, exact_w)
+
+    def test_finite(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        w = eigvals(a, check_finite=False)
+        exact_w = [(9+sqrt(93))/2, 0, (9-sqrt(93))/2]
+        assert_array_almost_equal(w, exact_w)
+
+    @pytest.mark.parametrize('dt', [int, float, float32, complex, complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        w = eigvals(a)
+        assert w.shape == (0,)
+        assert w.dtype == eigvals(np.eye(2, dtype=dt)).dtype
+
+        w = eigvals(a, homogeneous_eigvals=True)
+        assert w.shape == (2, 0)
+        assert w.dtype == eigvals(np.eye(2, dtype=dt)).dtype
+
+
+class TestEig:
+
+    def test_simple(self):
+        a = array([[1, 2, 3], [1, 2, 3], [2, 5, 6]])
+        w, v = eig(a)
+        exact_w = [(9+sqrt(93))/2, 0, (9-sqrt(93))/2]
+        v0 = array([1, 1, (1+sqrt(93)/3)/2])
+        v1 = array([3., 0, -1])
+        v2 = array([1, 1, (1-sqrt(93)/3)/2])
+        v0 = v0 / norm(v0)
+        v1 = v1 / norm(v1)
+        v2 = v2 / norm(v2)
+        assert_array_almost_equal(w, exact_w)
+        assert_array_almost_equal(v0, v[:, 0]*sign(v[0, 0]))
+        assert_array_almost_equal(v1, v[:, 1]*sign(v[0, 1]))
+        assert_array_almost_equal(v2, v[:, 2]*sign(v[0, 2]))
+        for i in range(3):
+            assert_array_almost_equal(a @ v[:, i], w[i]*v[:, i])
+        w, v = eig(a, left=1, right=0)
+        for i in range(3):
+            assert_array_almost_equal(a.T @ v[:, i], w[i]*v[:, i])
+
+    def test_simple_complex_eig(self):
+        a = array([[1, 2], [-2, 1]])
+        w, vl, vr = eig(a, left=1, right=1)
+        assert_array_almost_equal(w, array([1+2j, 1-2j]))
+        for i in range(2):
+            assert_array_almost_equal(a @ vr[:, i], w[i]*vr[:, i])
+        for i in range(2):
+            assert_array_almost_equal(a.conj().T @ vl[:, i],
+                                      w[i].conj()*vl[:, i])
+
+    def test_simple_complex(self):
+        a = array([[1, 2, 3], [1, 2, 3], [2, 5, 6+1j]])
+        w, vl, vr = eig(a, left=1, right=1)
+        for i in range(3):
+            assert_array_almost_equal(a @ vr[:, i], w[i]*vr[:, i])
+        for i in range(3):
+            assert_array_almost_equal(a.conj().T @ vl[:, i],
+                                      w[i].conj()*vl[:, i])
+
+    def test_gh_3054(self):
+        a = [[1]]
+        b = [[0]]
+        w, vr = eig(a, b, homogeneous_eigvals=True)
+        assert_allclose(w[1, 0], 0)
+        assert_(w[0, 0] != 0)
+        assert_allclose(vr, 1)
+
+        w, vr = eig(a, b)
+        assert_equal(w, np.inf)
+        assert_allclose(vr, 1)
+
+    def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13,
+                                   atol=1e-13, rtol=1e-13):
+        if B is not None:
+            A, B = asarray(A), asarray(B)
+            B0 = B
+        else:
+            A = asarray(A)
+            B0 = B
+            B = np.eye(*A.shape)
+        msg = f"\n{A!r}\n{B!r}"
+
+        # Eigenvalues in homogeneous coordinates
+        w, vr = eig(A, B0, homogeneous_eigvals=True)
+        wt = eigvals(A, B0, homogeneous_eigvals=True)
+        val1 = A @ vr * w[1, :]
+        val2 = B @ vr * w[0, :]
+        for i in range(val1.shape[1]):
+            assert_allclose(val1[:, i], val2[:, i],
+                            rtol=rtol_homog, atol=atol_homog, err_msg=msg)
+
+        if B0 is None:
+            assert_allclose(w[1, :], 1)
+            assert_allclose(wt[1, :], 1)
+
+        perm = np.lexsort(w)
+        permt = np.lexsort(wt)
+        assert_allclose(w[:, perm], wt[:, permt], atol=1e-7, rtol=1e-7,
+                        err_msg=msg)
+
+        length = np.empty(len(vr))
+
+        for i in range(len(vr)):
+            length[i] = norm(vr[:, i])
+
+        assert_allclose(length, np.ones(length.size), err_msg=msg,
+                        atol=1e-7, rtol=1e-7)
+
+        # Convert homogeneous coordinates
+        beta_nonzero = (w[1, :] != 0)
+        wh = w[0, beta_nonzero] / w[1, beta_nonzero]
+
+        # Eigenvalues in standard coordinates
+        w, vr = eig(A, B0)
+        wt = eigvals(A, B0)
+        val1 = A @ vr
+        val2 = B @ vr * w
+        res = val1 - val2
+        for i in range(res.shape[1]):
+            if np.all(isfinite(res[:, i])):
+                assert_allclose(res[:, i], 0,
+                                rtol=rtol, atol=atol, err_msg=msg)
+
+        # try to consistently order eigenvalues, including complex conjugate pairs
+        w_fin = w[isfinite(w)]
+        wt_fin = wt[isfinite(wt)]
+
+        # prune noise in the real parts
+        w_fin = -1j * np.real_if_close(1j*w_fin, tol=1e-10)
+        wt_fin = -1j * np.real_if_close(1j*wt_fin, tol=1e-10)
+
+        perm = argsort(abs(w_fin) + w_fin.imag)
+        permt = argsort(abs(wt_fin) + wt_fin.imag)
+
+        assert_allclose(w_fin[perm], wt_fin[permt],
+                        atol=1e-7, rtol=1e-7, err_msg=msg)
+
+        length = np.empty(len(vr))
+        for i in range(len(vr)):
+            length[i] = norm(vr[:, i])
+        assert_allclose(length, np.ones(length.size), err_msg=msg)
+
+        # Compare homogeneous and nonhomogeneous versions
+        assert_allclose(sort(wh), sort(w[np.isfinite(w)]))
+
+    def test_singular(self):
+        # Example taken from
+        # https://web.archive.org/web/20040903121217/http://www.cs.umu.se/research/nla/singular_pairs/guptri/matlab.html
+        A = array([[22, 34, 31, 31, 17],
+                   [45, 45, 42, 19, 29],
+                   [39, 47, 49, 26, 34],
+                   [27, 31, 26, 21, 15],
+                   [38, 44, 44, 24, 30]])
+        B = array([[13, 26, 25, 17, 24],
+                   [31, 46, 40, 26, 37],
+                   [26, 40, 19, 25, 25],
+                   [16, 25, 27, 14, 23],
+                   [24, 35, 18, 21, 22]])
+
+        with np.errstate(all='ignore'):
+            self._check_gen_eig(A, B, atol_homog=5e-13, atol=5e-13)
+
+    def test_falker(self):
+        # Test matrices giving some Nan generalized eigenvalues.
+        M = diag(array([1, 0, 3]))
+        K = array(([2, -1, -1], [-1, 2, -1], [-1, -1, 2]))
+        D = array(([1, -1, 0], [-1, 1, 0], [0, 0, 0]))
+        Z = zeros((3, 3))
+        I3 = eye(3)
+        A = np.block([[I3, Z], [Z, -K]])
+        B = np.block([[Z, I3], [M, D]])
+
+        with np.errstate(all='ignore'):
+            self._check_gen_eig(A, B)
+
+    def test_bad_geneig(self):
+        # Ticket #709 (strange return values from DGGEV)
+
+        def matrices(omega):
+            c1 = -9 + omega**2
+            c2 = 2*omega
+            A = [[1, 0, 0, 0],
+                 [0, 1, 0, 0],
+                 [0, 0, c1, 0],
+                 [0, 0, 0, c1]]
+            B = [[0, 0, 1, 0],
+                 [0, 0, 0, 1],
+                 [1, 0, 0, -c2],
+                 [0, 1, c2, 0]]
+            return A, B
+
+        # With a buggy LAPACK, this can fail for different omega on different
+        # machines -- so we need to test several values
+        with np.errstate(all='ignore'):
+            for k in range(100):
+                A, B = matrices(omega=k*5./100)
+                self._check_gen_eig(A, B)
+
+    def test_make_eigvals(self):
+        # Step through all paths in _make_eigvals
+        # Real eigenvalues
+        rng = np.random.RandomState(1234)
+        A = symrand(3, rng)
+        self._check_gen_eig(A, None)
+        B = symrand(3, rng)
+        self._check_gen_eig(A, B)
+        # Complex eigenvalues
+        A = rng.random((3, 3)) + 1j*rng.random((3, 3))
+        self._check_gen_eig(A, None)
+        B = rng.random((3, 3)) + 1j*rng.random((3, 3))
+        self._check_gen_eig(A, B)
+
+    def test_check_finite(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        w, v = eig(a, check_finite=False)
+        exact_w = [(9+sqrt(93))/2, 0, (9-sqrt(93))/2]
+        v0 = array([1, 1, (1+sqrt(93)/3)/2])
+        v1 = array([3., 0, -1])
+        v2 = array([1, 1, (1-sqrt(93)/3)/2])
+        v0 = v0 / norm(v0)
+        v1 = v1 / norm(v1)
+        v2 = v2 / norm(v2)
+        assert_array_almost_equal(w, exact_w)
+        assert_array_almost_equal(v0, v[:, 0]*sign(v[0, 0]))
+        assert_array_almost_equal(v1, v[:, 1]*sign(v[0, 1]))
+        assert_array_almost_equal(v2, v[:, 2]*sign(v[0, 2]))
+        for i in range(3):
+            assert_array_almost_equal(a @ v[:, i], w[i]*v[:, i])
+
+    def test_not_square_error(self):
+        """Check that passing a non-square array raises a ValueError."""
+        A = np.arange(6).reshape(3, 2)
+        assert_raises(ValueError, eig, A)
+
+    def test_shape_mismatch(self):
+        """Check that passing arrays of with different shapes
+        raises a ValueError."""
+        A = eye(2)
+        B = np.arange(9.0).reshape(3, 3)
+        assert_raises(ValueError, eig, A, B)
+        assert_raises(ValueError, eig, B, A)
+
+    def test_gh_11577(self):
+        # https://github.com/scipy/scipy/issues/11577
+        # `A - lambda B` should have 4 and 8 among the eigenvalues, and this
+        # was apparently broken on some platforms
+        A = np.array([[12.0, 28.0, 76.0, 220.0],
+                      [16.0, 32.0, 80.0, 224.0],
+                      [24.0, 40.0, 88.0, 232.0],
+                      [40.0, 56.0, 104.0, 248.0]], dtype='float64')
+        B = np.array([[2.0, 4.0, 10.0, 28.0],
+                      [3.0, 5.0, 11.0, 29.0],
+                      [5.0, 7.0, 13.0, 31.0],
+                      [9.0, 11.0, 17.0, 35.0]], dtype='float64')
+
+        D, V = eig(A, B)
+
+        # The problem is ill-conditioned, and two other eigenvalues
+        # depend on ATLAS/OpenBLAS version, compiler version etc
+        # see gh-11577 for discussion
+        #
+        # NB: it is tempting to use `assert_allclose(D[:2], [4, 8])` instead but
+        # the ordering of eigenvalues also comes out different on different
+        # systems depending on who knows what.
+        with np.testing.suppress_warnings() as sup:
+            # isclose chokes on inf/nan values
+            sup.filter(RuntimeWarning, "invalid value encountered in multiply")
+            assert np.isclose(D, 4.0, atol=1e-14).any()
+            assert np.isclose(D, 8.0, atol=1e-14).any()
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        w, vr = eig(a)
+
+        w_n, vr_n = eig(np.eye(2, dtype=dt))
+
+        assert w.shape == (0,)
+        assert w.dtype == w_n.dtype  #eigvals(np.eye(2, dtype=dt)).dtype
+
+        assert_allclose(vr, np.empty((0, 0)))
+        assert vr.shape == (0, 0)
+        assert vr.dtype == vr_n.dtype
+
+        w, vr = eig(a, homogeneous_eigvals=True)
+        assert w.shape == (2, 0)
+        assert w.dtype == w_n.dtype
+
+        assert vr.shape == (0, 0)
+        assert vr.dtype == vr_n.dtype
+
+
+
+class TestEigBanded:
+    def setup_method(self):
+        self.create_bandmat()
+
+    def create_bandmat(self):
+        """Create the full matrix `self.fullmat` and
+           the corresponding band matrix `self.bandmat`."""
+        N = 10
+        self.KL = 2   # number of subdiagonals (below the diagonal)
+        self.KU = 2   # number of superdiagonals (above the diagonal)
+
+        # symmetric band matrix
+        self.sym_mat = (diag(full(N, 1.0))
+                        + diag(full(N-1, -1.0), -1) + diag(full(N-1, -1.0), 1)
+                        + diag(full(N-2, -2.0), -2) + diag(full(N-2, -2.0), 2))
+
+        # hermitian band matrix
+        self.herm_mat = (diag(full(N, -1.0))
+                         + 1j*diag(full(N-1, 1.0), -1)
+                         - 1j*diag(full(N-1, 1.0), 1)
+                         + diag(full(N-2, -2.0), -2)
+                         + diag(full(N-2, -2.0), 2))
+
+        # general real band matrix
+        self.real_mat = (diag(full(N, 1.0))
+                         + diag(full(N-1, -1.0), -1) + diag(full(N-1, -3.0), 1)
+                         + diag(full(N-2, 2.0), -2) + diag(full(N-2, -2.0), 2))
+
+        # general complex band matrix
+        self.comp_mat = (1j*diag(full(N, 1.0))
+                         + diag(full(N-1, -1.0), -1)
+                         + 1j*diag(full(N-1, -3.0), 1)
+                         + diag(full(N-2, 2.0), -2)
+                         + diag(full(N-2, -2.0), 2))
+
+        # Eigenvalues and -vectors from linalg.eig
+        ew, ev = linalg.eig(self.sym_mat)
+        ew = ew.real
+        args = argsort(ew)
+        self.w_sym_lin = ew[args]
+        self.evec_sym_lin = ev[:, args]
+
+        ew, ev = linalg.eig(self.herm_mat)
+        ew = ew.real
+        args = argsort(ew)
+        self.w_herm_lin = ew[args]
+        self.evec_herm_lin = ev[:, args]
+
+        # Extract upper bands from symmetric and hermitian band matrices
+        # (for use in dsbevd, dsbevx, zhbevd, zhbevx
+        #  and their single precision versions)
+        LDAB = self.KU + 1
+        self.bandmat_sym = zeros((LDAB, N), dtype=float)
+        self.bandmat_herm = zeros((LDAB, N), dtype=complex)
+        for i in range(LDAB):
+            self.bandmat_sym[LDAB-i-1, i:N] = diag(self.sym_mat, i)
+            self.bandmat_herm[LDAB-i-1, i:N] = diag(self.herm_mat, i)
+
+        # Extract bands from general real and complex band matrix
+        # (for use in dgbtrf, dgbtrs and their single precision versions)
+        LDAB = 2*self.KL + self.KU + 1
+        self.bandmat_real = zeros((LDAB, N), dtype=float)
+        self.bandmat_real[2*self.KL, :] = diag(self.real_mat)  # diagonal
+        for i in range(self.KL):
+            # superdiagonals
+            self.bandmat_real[2*self.KL-1-i, i+1:N] = diag(self.real_mat, i+1)
+            # subdiagonals
+            self.bandmat_real[2*self.KL+1+i, 0:N-1-i] = diag(self.real_mat,
+                                                             -i-1)
+
+        self.bandmat_comp = zeros((LDAB, N), dtype=complex)
+        self.bandmat_comp[2*self.KL, :] = diag(self.comp_mat)  # diagonal
+        for i in range(self.KL):
+            # superdiagonals
+            self.bandmat_comp[2*self.KL-1-i, i+1:N] = diag(self.comp_mat, i+1)
+            # subdiagonals
+            self.bandmat_comp[2*self.KL+1+i, 0:N-1-i] = diag(self.comp_mat,
+                                                             -i-1)
+
+        # absolute value for linear equation system A*x = b
+        self.b = 1.0*arange(N)
+        self.bc = self.b * (1 + 1j)
+
+    #####################################################################
+
+    def test_dsbev(self):
+        """Compare dsbev eigenvalues and eigenvectors with
+           the result of linalg.eig."""
+        w, evec, info = dsbev(self.bandmat_sym, compute_v=1)
+        evec_ = evec[:, argsort(w)]
+        assert_array_almost_equal(sort(w), self.w_sym_lin)
+        assert_array_almost_equal(abs(evec_), abs(self.evec_sym_lin))
+
+    def test_dsbevd(self):
+        """Compare dsbevd eigenvalues and eigenvectors with
+           the result of linalg.eig."""
+        w, evec, info = dsbevd(self.bandmat_sym, compute_v=1)
+        evec_ = evec[:, argsort(w)]
+        assert_array_almost_equal(sort(w), self.w_sym_lin)
+        assert_array_almost_equal(abs(evec_), abs(self.evec_sym_lin))
+
+    def test_dsbevx(self):
+        """Compare dsbevx eigenvalues and eigenvectors
+           with the result of linalg.eig."""
+        N, N = shape(self.sym_mat)
+        # Achtung: Argumente 0.0,0.0,range?
+        w, evec, num, ifail, info = dsbevx(self.bandmat_sym, 0.0, 0.0, 1, N,
+                                           compute_v=1, range=2)
+        evec_ = evec[:, argsort(w)]
+        assert_array_almost_equal(sort(w), self.w_sym_lin)
+        assert_array_almost_equal(abs(evec_), abs(self.evec_sym_lin))
+
+    def test_zhbevd(self):
+        """Compare zhbevd eigenvalues and eigenvectors
+           with the result of linalg.eig."""
+        w, evec, info = zhbevd(self.bandmat_herm, compute_v=1)
+        evec_ = evec[:, argsort(w)]
+        assert_array_almost_equal(sort(w), self.w_herm_lin)
+        assert_array_almost_equal(abs(evec_), abs(self.evec_herm_lin))
+
+    def test_zhbevx(self):
+        """Compare zhbevx eigenvalues and eigenvectors
+           with the result of linalg.eig."""
+        N, N = shape(self.herm_mat)
+        # Achtung: Argumente 0.0,0.0,range?
+        w, evec, num, ifail, info = zhbevx(self.bandmat_herm, 0.0, 0.0, 1, N,
+                                           compute_v=1, range=2)
+        evec_ = evec[:, argsort(w)]
+        assert_array_almost_equal(sort(w), self.w_herm_lin)
+        assert_array_almost_equal(abs(evec_), abs(self.evec_herm_lin))
+
+    def test_eigvals_banded(self):
+        """Compare eigenvalues of eigvals_banded with those of linalg.eig."""
+        w_sym = eigvals_banded(self.bandmat_sym)
+        w_sym = w_sym.real
+        assert_array_almost_equal(sort(w_sym), self.w_sym_lin)
+
+        w_herm = eigvals_banded(self.bandmat_herm)
+        w_herm = w_herm.real
+        assert_array_almost_equal(sort(w_herm), self.w_herm_lin)
+
+        # extracting eigenvalues with respect to an index range
+        ind1 = 2
+        ind2 = np.longlong(6)
+        w_sym_ind = eigvals_banded(self.bandmat_sym,
+                                   select='i', select_range=(ind1, ind2))
+        assert_array_almost_equal(sort(w_sym_ind),
+                                  self.w_sym_lin[ind1:ind2+1])
+        w_herm_ind = eigvals_banded(self.bandmat_herm,
+                                    select='i', select_range=(ind1, ind2))
+        assert_array_almost_equal(sort(w_herm_ind),
+                                  self.w_herm_lin[ind1:ind2+1])
+
+        # extracting eigenvalues with respect to a value range
+        v_lower = self.w_sym_lin[ind1] - 1.0e-5
+        v_upper = self.w_sym_lin[ind2] + 1.0e-5
+        w_sym_val = eigvals_banded(self.bandmat_sym,
+                                   select='v', select_range=(v_lower, v_upper))
+        assert_array_almost_equal(sort(w_sym_val),
+                                  self.w_sym_lin[ind1:ind2+1])
+
+        v_lower = self.w_herm_lin[ind1] - 1.0e-5
+        v_upper = self.w_herm_lin[ind2] + 1.0e-5
+        w_herm_val = eigvals_banded(self.bandmat_herm,
+                                    select='v',
+                                    select_range=(v_lower, v_upper))
+        assert_array_almost_equal(sort(w_herm_val),
+                                  self.w_herm_lin[ind1:ind2+1])
+
+        w_sym = eigvals_banded(self.bandmat_sym, check_finite=False)
+        w_sym = w_sym.real
+        assert_array_almost_equal(sort(w_sym), self.w_sym_lin)
+
+    def test_eig_banded(self):
+        """Compare eigenvalues and eigenvectors of eig_banded
+           with those of linalg.eig. """
+        w_sym, evec_sym = eig_banded(self.bandmat_sym)
+        evec_sym_ = evec_sym[:, argsort(w_sym.real)]
+        assert_array_almost_equal(sort(w_sym), self.w_sym_lin)
+        assert_array_almost_equal(abs(evec_sym_), abs(self.evec_sym_lin))
+
+        w_herm, evec_herm = eig_banded(self.bandmat_herm)
+        evec_herm_ = evec_herm[:, argsort(w_herm.real)]
+        assert_array_almost_equal(sort(w_herm), self.w_herm_lin)
+        assert_array_almost_equal(abs(evec_herm_), abs(self.evec_herm_lin))
+
+        # extracting eigenvalues with respect to an index range
+        ind1 = 2
+        ind2 = 6
+        w_sym_ind, evec_sym_ind = eig_banded(self.bandmat_sym,
+                                             select='i',
+                                             select_range=(ind1, ind2))
+        assert_array_almost_equal(sort(w_sym_ind),
+                                  self.w_sym_lin[ind1:ind2+1])
+        assert_array_almost_equal(abs(evec_sym_ind),
+                                  abs(self.evec_sym_lin[:, ind1:ind2+1]))
+
+        w_herm_ind, evec_herm_ind = eig_banded(self.bandmat_herm,
+                                               select='i',
+                                               select_range=(ind1, ind2))
+        assert_array_almost_equal(sort(w_herm_ind),
+                                  self.w_herm_lin[ind1:ind2+1])
+        assert_array_almost_equal(abs(evec_herm_ind),
+                                  abs(self.evec_herm_lin[:, ind1:ind2+1]))
+
+        # extracting eigenvalues with respect to a value range
+        v_lower = self.w_sym_lin[ind1] - 1.0e-5
+        v_upper = self.w_sym_lin[ind2] + 1.0e-5
+        w_sym_val, evec_sym_val = eig_banded(self.bandmat_sym,
+                                             select='v',
+                                             select_range=(v_lower, v_upper))
+        assert_array_almost_equal(sort(w_sym_val),
+                                  self.w_sym_lin[ind1:ind2+1])
+        assert_array_almost_equal(abs(evec_sym_val),
+                                  abs(self.evec_sym_lin[:, ind1:ind2+1]))
+
+        v_lower = self.w_herm_lin[ind1] - 1.0e-5
+        v_upper = self.w_herm_lin[ind2] + 1.0e-5
+        w_herm_val, evec_herm_val = eig_banded(self.bandmat_herm,
+                                               select='v',
+                                               select_range=(v_lower, v_upper))
+        assert_array_almost_equal(sort(w_herm_val),
+                                  self.w_herm_lin[ind1:ind2+1])
+        assert_array_almost_equal(abs(evec_herm_val),
+                                  abs(self.evec_herm_lin[:, ind1:ind2+1]))
+
+        w_sym, evec_sym = eig_banded(self.bandmat_sym, check_finite=False)
+        evec_sym_ = evec_sym[:, argsort(w_sym.real)]
+        assert_array_almost_equal(sort(w_sym), self.w_sym_lin)
+        assert_array_almost_equal(abs(evec_sym_), abs(self.evec_sym_lin))
+
+    def test_dgbtrf(self):
+        """Compare dgbtrf  LU factorisation with the LU factorisation result
+           of linalg.lu."""
+        M, N = shape(self.real_mat)
+        lu_symm_band, ipiv, info = dgbtrf(self.bandmat_real, self.KL, self.KU)
+
+        # extract matrix u from lu_symm_band
+        u = diag(lu_symm_band[2*self.KL, :])
+        for i in range(self.KL + self.KU):
+            u += diag(lu_symm_band[2*self.KL-1-i, i+1:N], i+1)
+
+        p_lin, l_lin, u_lin = lu(self.real_mat, permute_l=0)
+        assert_array_almost_equal(u, u_lin)
+
+    def test_zgbtrf(self):
+        """Compare zgbtrf  LU factorisation with the LU factorisation result
+           of linalg.lu."""
+        M, N = shape(self.comp_mat)
+        lu_symm_band, ipiv, info = zgbtrf(self.bandmat_comp, self.KL, self.KU)
+
+        # extract matrix u from lu_symm_band
+        u = diag(lu_symm_band[2*self.KL, :])
+        for i in range(self.KL + self.KU):
+            u += diag(lu_symm_band[2*self.KL-1-i, i+1:N], i+1)
+
+        p_lin, l_lin, u_lin = lu(self.comp_mat, permute_l=0)
+        assert_array_almost_equal(u, u_lin)
+
+    def test_dgbtrs(self):
+        """Compare dgbtrs  solutions for linear equation system  A*x = b
+           with solutions of linalg.solve."""
+
+        lu_symm_band, ipiv, info = dgbtrf(self.bandmat_real, self.KL, self.KU)
+        y, info = dgbtrs(lu_symm_band, self.KL, self.KU, self.b, ipiv)
+
+        y_lin = linalg.solve(self.real_mat, self.b)
+        assert_array_almost_equal(y, y_lin)
+
+    def test_zgbtrs(self):
+        """Compare zgbtrs  solutions for linear equation system  A*x = b
+           with solutions of linalg.solve."""
+
+        lu_symm_band, ipiv, info = zgbtrf(self.bandmat_comp, self.KL, self.KU)
+        y, info = zgbtrs(lu_symm_band, self.KL, self.KU, self.bc, ipiv)
+
+        y_lin = linalg.solve(self.comp_mat, self.bc)
+        assert_array_almost_equal(y, y_lin)
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a_band = np.empty((0, 0), dtype=dt)
+        w, v = eig_banded(a_band)
+
+        w_n, v_n = eig_banded(np.array([[0, 0], [1, 1]], dtype=dt))
+
+        assert w.shape == (0,)
+        assert w.dtype == w_n.dtype
+
+        assert v.shape == (0, 0)
+        assert v.dtype == v_n.dtype
+
+        w = eig_banded(a_band, eigvals_only=True)
+        assert w.shape == (0,)
+        assert w.dtype == w_n.dtype
+
+class TestEigTridiagonal:
+    def setup_method(self):
+        self.create_trimat()
+
+    def create_trimat(self):
+        """Create the full matrix `self.fullmat`, `self.d`, and `self.e`."""
+        N = 10
+
+        # symmetric band matrix
+        self.d = full(N, 1.0)
+        self.e = full(N-1, -1.0)
+        self.full_mat = (diag(self.d) + diag(self.e, -1) + diag(self.e, 1))
+
+        ew, ev = linalg.eig(self.full_mat)
+        ew = ew.real
+        args = argsort(ew)
+        self.w = ew[args]
+        self.evec = ev[:, args]
+
+    def test_degenerate(self):
+        """Test error conditions."""
+        # Wrong sizes
+        assert_raises(ValueError, eigvalsh_tridiagonal, self.d, self.e[:-1])
+        # Must be real
+        assert_raises(TypeError, eigvalsh_tridiagonal, self.d, self.e * 1j)
+        # Bad driver
+        assert_raises(TypeError, eigvalsh_tridiagonal, self.d, self.e,
+                      lapack_driver=1.)
+        assert_raises(ValueError, eigvalsh_tridiagonal, self.d, self.e,
+                      lapack_driver='foo')
+        # Bad bounds
+        assert_raises(ValueError, eigvalsh_tridiagonal, self.d, self.e,
+                      select='i', select_range=(0, -1))
+
+    def test_eigvalsh_tridiagonal(self):
+        """Compare eigenvalues of eigvalsh_tridiagonal with those of eig."""
+        # can't use ?STERF with subselection
+        for driver in ('sterf', 'stev', 'stebz', 'stemr', 'auto'):
+            w = eigvalsh_tridiagonal(self.d, self.e, lapack_driver=driver)
+            assert_array_almost_equal(sort(w), self.w)
+
+        for driver in ('sterf', 'stev'):
+            assert_raises(ValueError, eigvalsh_tridiagonal, self.d, self.e,
+                          lapack_driver=driver, select='i',
+                          select_range=(0, 1))
+        for driver in ('stebz', 'stemr', 'auto'):
+            # extracting eigenvalues with respect to the full index range
+            w_ind = eigvalsh_tridiagonal(
+                self.d, self.e, select='i', select_range=(0, len(self.d)-1),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w_ind), self.w)
+
+            # extracting eigenvalues with respect to an index range
+            ind1 = 2
+            ind2 = 6
+            w_ind = eigvalsh_tridiagonal(
+                self.d, self.e, select='i', select_range=(ind1, ind2),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w_ind), self.w[ind1:ind2+1])
+
+            # extracting eigenvalues with respect to a value range
+            v_lower = self.w[ind1] - 1.0e-5
+            v_upper = self.w[ind2] + 1.0e-5
+            w_val = eigvalsh_tridiagonal(
+                self.d, self.e, select='v', select_range=(v_lower, v_upper),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w_val), self.w[ind1:ind2+1])
+
+    def test_eigh_tridiagonal(self):
+        """Compare eigenvalues and eigenvectors of eigh_tridiagonal
+           with those of eig. """
+        # can't use ?STERF when eigenvectors are requested
+        assert_raises(ValueError, eigh_tridiagonal, self.d, self.e,
+                      lapack_driver='sterf')
+        for driver in ('stebz', 'stev', 'stemr', 'auto'):
+            w, evec = eigh_tridiagonal(self.d, self.e, lapack_driver=driver)
+            evec_ = evec[:, argsort(w)]
+            assert_array_almost_equal(sort(w), self.w)
+            assert_array_almost_equal(abs(evec_), abs(self.evec))
+
+        assert_raises(ValueError, eigh_tridiagonal, self.d, self.e,
+                      lapack_driver='stev', select='i', select_range=(0, 1))
+        for driver in ('stebz', 'stemr', 'auto'):
+            # extracting eigenvalues with respect to an index range
+            ind1 = 0
+            ind2 = len(self.d)-1
+            w, evec = eigh_tridiagonal(
+                self.d, self.e, select='i', select_range=(ind1, ind2),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w), self.w)
+            assert_array_almost_equal(abs(evec), abs(self.evec))
+            ind1 = 2
+            ind2 = 6
+            w, evec = eigh_tridiagonal(
+                self.d, self.e, select='i', select_range=(ind1, ind2),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w), self.w[ind1:ind2+1])
+            assert_array_almost_equal(abs(evec),
+                                      abs(self.evec[:, ind1:ind2+1]))
+
+            # extracting eigenvalues with respect to a value range
+            v_lower = self.w[ind1] - 1.0e-5
+            v_upper = self.w[ind2] + 1.0e-5
+            w, evec = eigh_tridiagonal(
+                self.d, self.e, select='v', select_range=(v_lower, v_upper),
+                lapack_driver=driver)
+            assert_array_almost_equal(sort(w), self.w[ind1:ind2+1])
+            assert_array_almost_equal(abs(evec),
+                                      abs(self.evec[:, ind1:ind2+1]))
+
+    def test_eigh_tridiagonal_1x1(self):
+        """See gh-20075"""
+        a = np.array([-2.0])
+        b = np.array([])
+        x = eigh_tridiagonal(a, b, eigvals_only=True)
+        assert x.ndim == 1
+        assert_allclose(x, a)
+        x, V = eigh_tridiagonal(a, b, select="i", select_range=(0, 0))
+        assert x.ndim == 1
+        assert V.ndim == 2
+        assert_allclose(x, a)
+        assert_allclose(V, array([[1.]]))
+
+        x, V = eigh_tridiagonal(a, b, select="v", select_range=(-2, 0))
+        assert x.size == 0
+        assert x.shape == (0,)
+        assert V.shape == (1, 0)
+
+
+class TestEigh:
+    def setup_class(self):
+        np.random.seed(1234)
+
+    def test_wrong_inputs(self):
+        # Nonsquare a
+        assert_raises(ValueError, eigh, np.ones([1, 2]))
+        # Nonsquare b
+        assert_raises(ValueError, eigh, np.ones([2, 2]), np.ones([2, 1]))
+        # Incompatible a, b sizes
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([2, 2]))
+        # Wrong type parameter for generalized problem
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      type=4)
+        # Both value and index subsets requested
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      subset_by_value=[1, 2], subset_by_index=[2, 4])
+        # Invalid upper index spec
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      subset_by_index=[0, 4])
+        # Invalid lower index
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      subset_by_index=[-2, 2])
+        # Invalid index spec #2
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      subset_by_index=[2, 0])
+        # Invalid value spec
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      subset_by_value=[2, 0])
+        # Invalid driver name
+        assert_raises(ValueError, eigh, np.ones([2, 2]), driver='wrong')
+        # Generalized driver selection without b
+        assert_raises(ValueError, eigh, np.ones([3, 3]), None, driver='gvx')
+        # Standard driver with b
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      driver='evr')
+        # Subset request from invalid driver
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      driver='gvd', subset_by_index=[1, 2])
+        assert_raises(ValueError, eigh, np.ones([3, 3]), np.ones([3, 3]),
+                      driver='gvd', subset_by_index=[1, 2])
+
+    def test_nonpositive_b(self):
+        assert_raises(LinAlgError, eigh, np.ones([3, 3]), np.ones([3, 3]))
+
+    # index based subsets are done in the legacy test_eigh()
+    def test_value_subsets(self):
+        for ind, dt in enumerate(DTYPES):
+
+            a = _random_hermitian_matrix(20, dtype=dt)
+            w, v = eigh(a, subset_by_value=[-2, 2])
+            assert_equal(v.shape[1], len(w))
+            assert all((w > -2) & (w < 2))
+
+            b = _random_hermitian_matrix(20, posdef=True, dtype=dt)
+            w, v = eigh(a, b, subset_by_value=[-2, 2])
+            assert_equal(v.shape[1], len(w))
+            assert all((w > -2) & (w < 2))
+
+    def test_eigh_integer(self):
+        a = array([[1, 2], [2, 7]])
+        b = array([[3, 1], [1, 5]])
+        w, z = eigh(a)
+        w, z = eigh(a, b)
+
+    def test_eigh_of_sparse(self):
+        # This tests the rejection of inputs that eigh cannot currently handle.
+        import scipy.sparse
+        a = scipy.sparse.identity(2).tocsc()
+        b = np.atleast_2d(a)
+        assert_raises(ValueError, eigh, a)
+        assert_raises(ValueError, eigh, b)
+
+    @pytest.mark.parametrize('dtype_', DTYPES)
+    @pytest.mark.parametrize('driver', ("ev", "evd", "evr", "evx"))
+    def test_various_drivers_standard(self, driver, dtype_):
+        a = _random_hermitian_matrix(n=20, dtype=dtype_)
+        w, v = eigh(a, driver=driver)
+        assert_allclose(a @ v - (v * w), 0.,
+                        atol=1000*np.finfo(dtype_).eps,
+                        rtol=0.)
+
+    @pytest.mark.parametrize('driver', ("ev", "evd", "evr", "evx"))
+    def test_1x1_lwork(self, driver):
+        w, v = eigh([[1]], driver=driver)
+        assert_allclose(w, array([1.]), atol=1e-15)
+        assert_allclose(v, array([[1.]]), atol=1e-15)
+
+        # complex case now
+        w, v = eigh([[1j]], driver=driver)
+        assert_allclose(w, array([0]), atol=1e-15)
+        assert_allclose(v, array([[1.]]), atol=1e-15)
+
+    @pytest.mark.parametrize('type', (1, 2, 3))
+    @pytest.mark.parametrize('driver', ("gv", "gvd", "gvx"))
+    def test_various_drivers_generalized(self, driver, type):
+        atol = np.spacing(5000.)
+        a = _random_hermitian_matrix(20)
+        b = _random_hermitian_matrix(20, posdef=True)
+        w, v = eigh(a=a, b=b, driver=driver, type=type)
+        if type == 1:
+            assert_allclose(a @ v - w*(b @ v), 0., atol=atol, rtol=0.)
+        elif type == 2:
+            assert_allclose(a @ b @ v - v * w, 0., atol=atol, rtol=0.)
+        else:
+            assert_allclose(b @ a @ v - v * w, 0., atol=atol, rtol=0.)
+
+    def test_eigvalsh_new_args(self):
+        a = _random_hermitian_matrix(5)
+        w = eigvalsh(a, subset_by_index=[1, 2])
+        assert_equal(len(w), 2)
+
+        w2 = eigvalsh(a, subset_by_index=[1, 2])
+        assert_equal(len(w2), 2)
+        assert_allclose(w, w2)
+
+        b = np.diag([1, 1.2, 1.3, 1.5, 2])
+        w3 = eigvalsh(b, subset_by_value=[1, 1.4])
+        assert_equal(len(w3), 2)
+        assert_allclose(w3, np.array([1.2, 1.3]))
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        w, v = eigh(a)
+
+        w_n, v_n = eigh(np.eye(2, dtype=dt))
+
+        assert w.shape == (0,)
+        assert w.dtype == w_n.dtype
+
+        assert v.shape == (0, 0)
+        assert v.dtype == v_n.dtype
+
+        w = eigh(a, eigvals_only=True)
+        assert_allclose(w, np.empty((0,)))
+
+        assert w.shape == (0,)
+        assert w.dtype == w_n.dtype
+
+class TestSVD_GESDD:
+    lapack_driver = 'gesdd'
+
+    def test_degenerate(self):
+        assert_raises(TypeError, svd, [[1.]], lapack_driver=1.)
+        assert_raises(ValueError, svd, [[1.]], lapack_driver='foo')
+
+    def test_simple(self):
+        a = [[1, 2, 3], [1, 20, 3], [2, 5, 6]]
+        for full_matrices in (True, False):
+            u, s, vh = svd(a, full_matrices=full_matrices,
+                           lapack_driver=self.lapack_driver)
+            assert_array_almost_equal(u.T @ u, eye(3))
+            assert_array_almost_equal(vh.T @ vh, eye(3))
+            sigma = zeros((u.shape[0], vh.shape[0]), s.dtype.char)
+            for i in range(len(s)):
+                sigma[i, i] = s[i]
+            assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_simple_singular(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        for full_matrices in (True, False):
+            u, s, vh = svd(a, full_matrices=full_matrices,
+                           lapack_driver=self.lapack_driver)
+            assert_array_almost_equal(u.T @ u, eye(3))
+            assert_array_almost_equal(vh.T @ vh, eye(3))
+            sigma = zeros((u.shape[0], vh.shape[0]), s.dtype.char)
+            for i in range(len(s)):
+                sigma[i, i] = s[i]
+            assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_simple_underdet(self):
+        a = [[1, 2, 3], [4, 5, 6]]
+        for full_matrices in (True, False):
+            u, s, vh = svd(a, full_matrices=full_matrices,
+                           lapack_driver=self.lapack_driver)
+            assert_array_almost_equal(u.T @ u, eye(u.shape[0]))
+            sigma = zeros((u.shape[0], vh.shape[0]), s.dtype.char)
+            for i in range(len(s)):
+                sigma[i, i] = s[i]
+            assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_simple_overdet(self):
+        a = [[1, 2], [4, 5], [3, 4]]
+        for full_matrices in (True, False):
+            u, s, vh = svd(a, full_matrices=full_matrices,
+                           lapack_driver=self.lapack_driver)
+            assert_array_almost_equal(u.T @ u, eye(u.shape[1]))
+            assert_array_almost_equal(vh.T @ vh, eye(2))
+            sigma = zeros((u.shape[1], vh.shape[0]), s.dtype.char)
+            for i in range(len(s)):
+                sigma[i, i] = s[i]
+            assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_random(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        m = 15
+        for i in range(3):
+            for a in [rng.random([n, m]), rng.random([m, n])]:
+                for full_matrices in (True, False):
+                    u, s, vh = svd(a, full_matrices=full_matrices,
+                                   lapack_driver=self.lapack_driver)
+                    assert_array_almost_equal(u.T @ u, eye(u.shape[1]))
+                    assert_array_almost_equal(vh @ vh.T, eye(vh.shape[0]))
+                    sigma = zeros((u.shape[1], vh.shape[0]), s.dtype.char)
+                    for i in range(len(s)):
+                        sigma[i, i] = s[i]
+                    assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_simple_complex(self):
+        a = [[1, 2, 3], [1, 2j, 3], [2, 5, 6]]
+        for full_matrices in (True, False):
+            u, s, vh = svd(a, full_matrices=full_matrices,
+                           lapack_driver=self.lapack_driver)
+            assert_array_almost_equal(u.conj().T @ u, eye(u.shape[1]))
+            assert_array_almost_equal(vh.conj().T @ vh, eye(vh.shape[0]))
+            sigma = zeros((u.shape[0], vh.shape[0]), s.dtype.char)
+            for i in range(len(s)):
+                sigma[i, i] = s[i]
+            assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_random_complex(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        m = 15
+        for i in range(3):
+            for full_matrices in (True, False):
+                for a in [rng.random([n, m]), rng.random([m, n])]:
+                    a = a + 1j*rng.random(list(a.shape))
+                    u, s, vh = svd(a, full_matrices=full_matrices,
+                                   lapack_driver=self.lapack_driver)
+                    assert_array_almost_equal(u.conj().T @ u,
+                                              eye(u.shape[1]))
+                    # This fails when [m,n]
+                    # assert_array_almost_equal(vh.conj().T @ vh,
+                    #                        eye(len(vh),dtype=vh.dtype.char))
+                    sigma = zeros((u.shape[1], vh.shape[0]), s.dtype.char)
+                    for i in range(len(s)):
+                        sigma[i, i] = s[i]
+                    assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_crash_1580(self):
+        rng = np.random.RandomState(1234)
+        sizes = [(13, 23), (30, 50), (60, 100)]
+        for sz in sizes:
+            for dt in [np.float32, np.float64, np.complex64, np.complex128]:
+                a = rng.rand(*sz).astype(dt)
+                # should not crash
+                svd(a, lapack_driver=self.lapack_driver)
+
+    def test_check_finite(self):
+        a = [[1, 2, 3], [1, 20, 3], [2, 5, 6]]
+        u, s, vh = svd(a, check_finite=False, lapack_driver=self.lapack_driver)
+        assert_array_almost_equal(u.T @ u, eye(3))
+        assert_array_almost_equal(vh.T @ vh, eye(3))
+        sigma = zeros((u.shape[0], vh.shape[0]), s.dtype.char)
+        for i in range(len(s)):
+            sigma[i, i] = s[i]
+        assert_array_almost_equal(u @ sigma @ vh, a)
+
+    def test_gh_5039(self):
+        # This is a smoke test for https://github.com/scipy/scipy/issues/5039
+        #
+        # The following is reported to raise "ValueError: On entry to DGESDD
+        # parameter number 12 had an illegal value".
+        # `interp1d([1,2,3,4], [1,2,3,4], kind='cubic')`
+        # This is reported to only show up on LAPACK 3.0.3.
+        #
+        # The matrix below is taken from the call to
+        # `B = _fitpack._bsplmat(order, xk)` in interpolate._find_smoothest
+        b = np.array(
+            [[0.16666667, 0.66666667, 0.16666667, 0., 0., 0.],
+             [0., 0.16666667, 0.66666667, 0.16666667, 0., 0.],
+             [0., 0., 0.16666667, 0.66666667, 0.16666667, 0.],
+             [0., 0., 0., 0.16666667, 0.66666667, 0.16666667]])
+        svd(b, lapack_driver=self.lapack_driver)
+
+    @pytest.mark.skipif(not HAS_ILP64, reason="64-bit LAPACK required")
+    @pytest.mark.slow
+    def test_large_matrix(self):
+        check_free_memory(free_mb=17000)
+        A = np.zeros([1, 2**31], dtype=np.float32)
+        A[0, -1] = 1
+        u, s, vh = svd(A, full_matrices=False)
+        assert_allclose(s[0], 1.0)
+        assert_allclose(u[0, 0] * vh[0, -1], 1.0)
+
+    @pytest.mark.parametrize("m", [0, 1, 2])
+    @pytest.mark.parametrize("n", [0, 1, 2])
+    @pytest.mark.parametrize('dtype', DTYPES)
+    def test_shape_dtype(self, m, n, dtype):
+        a = np.zeros((m, n), dtype=dtype)
+        k = min(m, n)
+        dchar = a.dtype.char
+        real_dchar = dchar.lower() if dchar in 'FD' else dchar
+
+        u, s, v = svd(a)
+        assert_equal(u.shape, (m, m))
+        assert_equal(u.dtype, dtype)
+        assert_equal(s.shape, (k,))
+        assert_equal(s.dtype, np.dtype(real_dchar))
+        assert_equal(v.shape, (n, n))
+        assert_equal(v.dtype, dtype)
+
+        u, s, v = svd(a, full_matrices=False)
+        assert_equal(u.shape, (m, k))
+        assert_equal(u.dtype, dtype)
+        assert_equal(s.shape, (k,))
+        assert_equal(s.dtype, np.dtype(real_dchar))
+        assert_equal(v.shape, (k, n))
+        assert_equal(v.dtype, dtype)
+
+        s = svd(a, compute_uv=False)
+        assert_equal(s.shape, (k,))
+        assert_equal(s.dtype, np.dtype(real_dchar))
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize(("m", "n"), [(0, 0), (0, 2), (2, 0)])
+    def test_empty(self, dt, m, n):
+        a0 = np.eye(3, dtype=dt)
+        u0, s0, v0 = svd(a0)
+
+        a = np.empty((m, n), dtype=dt)
+        u, s, v = svd(a)
+        assert_allclose(u, np.identity(m))
+        assert_allclose(s, np.empty((0,)))
+        assert_allclose(v, np.identity(n))
+
+        assert u.dtype == u0.dtype
+        assert v.dtype == v0.dtype
+        assert s.dtype == s0.dtype
+
+        u, s, v = svd(a, full_matrices=False)
+        assert_allclose(u, np.empty((m, 0)))
+        assert_allclose(s, np.empty((0,)))
+        assert_allclose(v, np.empty((0, n)))
+
+        assert u.dtype == u0.dtype
+        assert v.dtype == v0.dtype
+        assert s.dtype == s0.dtype
+
+        s = svd(a, compute_uv=False)
+        assert_allclose(s, np.empty((0,)))
+
+        assert s.dtype == s0.dtype
+
+class TestSVD_GESVD(TestSVD_GESDD):
+    lapack_driver = 'gesvd'
+
+
+# Allocating an array of such a size leads to _ArrayMemoryError(s)
+# since the maximum memory that can be in 32-bit (WASM) is 4GB
+@pytest.mark.skipif(IS_WASM, reason="out of memory in WASM")
+@pytest.mark.fail_slow(10)
+def test_svd_gesdd_nofegfault():
+    # svd(a) with {U,VT}.size > INT_MAX does not segfault
+    # cf https://github.com/scipy/scipy/issues/14001
+    df=np.ones((4799, 53130), dtype=np.float64)
+    with assert_raises(ValueError):
+        svd(df)
+
+
+class TestSVDVals:
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        for a in [[]], np.empty((2, 0)), np.ones((0, 3)):
+            a = np.array(a, dtype=dt)
+            s = svdvals(a)
+            assert_equal(s, np.empty(0))
+
+            s0 = svdvals(np.eye(2, dtype=dt))
+            assert s.dtype == s0.dtype
+
+    def test_simple(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        s = svdvals(a)
+        assert_(len(s) == 3)
+        assert_(s[0] >= s[1] >= s[2])
+
+    def test_simple_underdet(self):
+        a = [[1, 2, 3], [4, 5, 6]]
+        s = svdvals(a)
+        assert_(len(s) == 2)
+        assert_(s[0] >= s[1])
+
+    def test_simple_overdet(self):
+        a = [[1, 2], [4, 5], [3, 4]]
+        s = svdvals(a)
+        assert_(len(s) == 2)
+        assert_(s[0] >= s[1])
+
+    def test_simple_complex(self):
+        a = [[1, 2, 3], [1, 20, 3j], [2, 5, 6]]
+        s = svdvals(a)
+        assert_(len(s) == 3)
+        assert_(s[0] >= s[1] >= s[2])
+
+    def test_simple_underdet_complex(self):
+        a = [[1, 2, 3], [4, 5j, 6]]
+        s = svdvals(a)
+        assert_(len(s) == 2)
+        assert_(s[0] >= s[1])
+
+    def test_simple_overdet_complex(self):
+        a = [[1, 2], [4, 5], [3j, 4]]
+        s = svdvals(a)
+        assert_(len(s) == 2)
+        assert_(s[0] >= s[1])
+
+    def test_check_finite(self):
+        a = [[1, 2, 3], [1, 2, 3], [2, 5, 6]]
+        s = svdvals(a, check_finite=False)
+        assert_(len(s) == 3)
+        assert_(s[0] >= s[1] >= s[2])
+
+    @pytest.mark.slow
+    def test_crash_2609(self):
+        np.random.seed(1234)
+        a = np.random.rand(1500, 2800)
+        # Shouldn't crash:
+        svdvals(a)
+
+
+class TestDiagSVD:
+
+    def test_simple(self):
+        assert_array_almost_equal(diagsvd([1, 0, 0], 3, 3),
+                                  [[1, 0, 0], [0, 0, 0], [0, 0, 0]])
+
+
+class TestQR:
+    def test_simple(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r = qr(a)
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a)
+
+    def test_simple_left(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r = qr(a)
+        c = [1, 2, 3]
+        qc, r2 = qr_multiply(a, c, "left")
+        assert_array_almost_equal(q @ c, qc)
+        assert_array_almost_equal(r, r2)
+        qc, r2 = qr_multiply(a, eye(3), "left")
+        assert_array_almost_equal(q, qc)
+
+    def test_simple_right(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r = qr(a)
+        c = [1, 2, 3]
+        qc, r2 = qr_multiply(a, c)
+        assert_array_almost_equal(c @ q, qc)
+        assert_array_almost_equal(r, r2)
+        qc, r = qr_multiply(a, eye(3))
+        assert_array_almost_equal(q, qc)
+
+    def test_simple_pivoting(self):
+        a = np.asarray([[8, 2, 3], [2, 9, 3], [5, 3, 6]])
+        q, r, p = qr(a, pivoting=True)
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a[:, p])
+        q2, r2 = qr(a[:, p])
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_left_pivoting(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r, jpvt = qr(a, pivoting=True)
+        c = [1, 2, 3]
+        qc, r, jpvt = qr_multiply(a, c, "left", True)
+        assert_array_almost_equal(q @ c, qc)
+
+    def test_simple_right_pivoting(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r, jpvt = qr(a, pivoting=True)
+        c = [1, 2, 3]
+        qc, r, jpvt = qr_multiply(a, c, pivoting=True)
+        assert_array_almost_equal(c @ q, qc)
+
+    def test_simple_trap(self):
+        a = [[8, 2, 3], [2, 9, 3]]
+        q, r = qr(a)
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a)
+
+    def test_simple_trap_pivoting(self):
+        a = np.asarray([[8, 2, 3], [2, 9, 3]])
+        q, r, p = qr(a, pivoting=True)
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a[:, p])
+        q2, r2 = qr(a[:, p])
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_tall(self):
+        # full version
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r = qr(a)
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a)
+
+    def test_simple_tall_pivoting(self):
+        # full version pivoting
+        a = np.asarray([[8, 2], [2, 9], [5, 3]])
+        q, r, p = qr(a, pivoting=True)
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a[:, p])
+        q2, r2 = qr(a[:, p])
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_tall_e(self):
+        # economy version
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r = qr(a, mode='economic')
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a)
+        assert_equal(q.shape, (3, 2))
+        assert_equal(r.shape, (2, 2))
+
+    def test_simple_tall_e_pivoting(self):
+        # economy version pivoting
+        a = np.asarray([[8, 2], [2, 9], [5, 3]])
+        q, r, p = qr(a, pivoting=True, mode='economic')
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a[:, p])
+        q2, r2 = qr(a[:, p], mode='economic')
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_tall_left(self):
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r = qr(a, mode="economic")
+        c = [1, 2]
+        qc, r2 = qr_multiply(a, c, "left")
+        assert_array_almost_equal(q @ c, qc)
+        assert_array_almost_equal(r, r2)
+        c = array([1, 2, 0])
+        qc, r2 = qr_multiply(a, c, "left", overwrite_c=True)
+        assert_array_almost_equal(q @ c[:2], qc)
+        qc, r = qr_multiply(a, eye(2), "left")
+        assert_array_almost_equal(qc, q)
+
+    def test_simple_tall_left_pivoting(self):
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r, jpvt = qr(a, mode="economic", pivoting=True)
+        c = [1, 2]
+        qc, r, kpvt = qr_multiply(a, c, "left", True)
+        assert_array_equal(jpvt, kpvt)
+        assert_array_almost_equal(q @ c, qc)
+        qc, r, jpvt = qr_multiply(a, eye(2), "left", True)
+        assert_array_almost_equal(qc, q)
+
+    def test_simple_tall_right(self):
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r = qr(a, mode="economic")
+        c = [1, 2, 3]
+        cq, r2 = qr_multiply(a, c)
+        assert_array_almost_equal(c @ q, cq)
+        assert_array_almost_equal(r, r2)
+        cq, r = qr_multiply(a, eye(3))
+        assert_array_almost_equal(cq, q)
+
+    def test_simple_tall_right_pivoting(self):
+        a = [[8, 2], [2, 9], [5, 3]]
+        q, r, jpvt = qr(a, pivoting=True, mode="economic")
+        c = [1, 2, 3]
+        cq, r, jpvt = qr_multiply(a, c, pivoting=True)
+        assert_array_almost_equal(c @ q, cq)
+        cq, r, jpvt = qr_multiply(a, eye(3), pivoting=True)
+        assert_array_almost_equal(cq, q)
+
+    def test_simple_fat(self):
+        # full version
+        a = [[8, 2, 5], [2, 9, 3]]
+        q, r = qr(a)
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a)
+        assert_equal(q.shape, (2, 2))
+        assert_equal(r.shape, (2, 3))
+
+    def test_simple_fat_pivoting(self):
+        # full version pivoting
+        a = np.asarray([[8, 2, 5], [2, 9, 3]])
+        q, r, p = qr(a, pivoting=True)
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a[:, p])
+        assert_equal(q.shape, (2, 2))
+        assert_equal(r.shape, (2, 3))
+        q2, r2 = qr(a[:, p])
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_fat_e(self):
+        # economy version
+        a = [[8, 2, 3], [2, 9, 5]]
+        q, r = qr(a, mode='economic')
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a)
+        assert_equal(q.shape, (2, 2))
+        assert_equal(r.shape, (2, 3))
+
+    def test_simple_fat_e_pivoting(self):
+        # economy version pivoting
+        a = np.asarray([[8, 2, 3], [2, 9, 5]])
+        q, r, p = qr(a, pivoting=True, mode='economic')
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(q @ r, a[:, p])
+        assert_equal(q.shape, (2, 2))
+        assert_equal(r.shape, (2, 3))
+        q2, r2 = qr(a[:, p], mode='economic')
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_fat_left(self):
+        a = [[8, 2, 3], [2, 9, 5]]
+        q, r = qr(a, mode="economic")
+        c = [1, 2]
+        qc, r2 = qr_multiply(a, c, "left")
+        assert_array_almost_equal(q @ c, qc)
+        assert_array_almost_equal(r, r2)
+        qc, r = qr_multiply(a, eye(2), "left")
+        assert_array_almost_equal(qc, q)
+
+    def test_simple_fat_left_pivoting(self):
+        a = [[8, 2, 3], [2, 9, 5]]
+        q, r, jpvt = qr(a, mode="economic", pivoting=True)
+        c = [1, 2]
+        qc, r, jpvt = qr_multiply(a, c, "left", True)
+        assert_array_almost_equal(q @ c, qc)
+        qc, r, jpvt = qr_multiply(a, eye(2), "left", True)
+        assert_array_almost_equal(qc, q)
+
+    def test_simple_fat_right(self):
+        a = [[8, 2, 3], [2, 9, 5]]
+        q, r = qr(a, mode="economic")
+        c = [1, 2]
+        cq, r2 = qr_multiply(a, c)
+        assert_array_almost_equal(c @ q, cq)
+        assert_array_almost_equal(r, r2)
+        cq, r = qr_multiply(a, eye(2))
+        assert_array_almost_equal(cq, q)
+
+    def test_simple_fat_right_pivoting(self):
+        a = [[8, 2, 3], [2, 9, 5]]
+        q, r, jpvt = qr(a, pivoting=True, mode="economic")
+        c = [1, 2]
+        cq, r, jpvt = qr_multiply(a, c, pivoting=True)
+        assert_array_almost_equal(c @ q, cq)
+        cq, r, jpvt = qr_multiply(a, eye(2), pivoting=True)
+        assert_array_almost_equal(cq, q)
+
+    def test_simple_complex(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        q, r = qr(a)
+        assert_array_almost_equal(q.conj().T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a)
+
+    def test_simple_complex_left(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        q, r = qr(a)
+        c = [1, 2, 3+4j]
+        qc, r = qr_multiply(a, c, "left")
+        assert_array_almost_equal(q @ c, qc)
+        qc, r = qr_multiply(a, eye(3), "left")
+        assert_array_almost_equal(q, qc)
+
+    def test_simple_complex_right(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        q, r = qr(a)
+        c = [1, 2, 3+4j]
+        qc, r = qr_multiply(a, c)
+        assert_array_almost_equal(c @ q, qc)
+        qc, r = qr_multiply(a, eye(3))
+        assert_array_almost_equal(q, qc)
+
+    def test_simple_tall_complex_left(self):
+        a = [[8, 2+3j], [2, 9], [5+7j, 3]]
+        q, r = qr(a, mode="economic")
+        c = [1, 2+2j]
+        qc, r2 = qr_multiply(a, c, "left")
+        assert_array_almost_equal(q @ c, qc)
+        assert_array_almost_equal(r, r2)
+        c = array([1, 2, 0])
+        qc, r2 = qr_multiply(a, c, "left", overwrite_c=True)
+        assert_array_almost_equal(q @ c[:2], qc)
+        qc, r = qr_multiply(a, eye(2), "left")
+        assert_array_almost_equal(qc, q)
+
+    def test_simple_complex_left_conjugate(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        q, r = qr(a)
+        c = [1, 2, 3+4j]
+        qc, r = qr_multiply(a, c, "left", conjugate=True)
+        assert_array_almost_equal(q.conj() @ c, qc)
+
+    def test_simple_complex_tall_left_conjugate(self):
+        a = [[3, 3+4j], [5, 2+2j], [3, 2]]
+        q, r = qr(a, mode='economic')
+        c = [1, 3+4j]
+        qc, r = qr_multiply(a, c, "left", conjugate=True)
+        assert_array_almost_equal(q.conj() @ c, qc)
+
+    def test_simple_complex_right_conjugate(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        q, r = qr(a)
+        c = np.array([1, 2, 3+4j])
+        qc, r = qr_multiply(a, c, conjugate=True)
+        assert_array_almost_equal(c @ q.conj(), qc)
+
+    def test_simple_complex_pivoting(self):
+        a = array([[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]])
+        q, r, p = qr(a, pivoting=True)
+        d = abs(diag(r))
+        assert_(np.all(d[1:] <= d[:-1]))
+        assert_array_almost_equal(q.conj().T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a[:, p])
+        q2, r2 = qr(a[:, p])
+        assert_array_almost_equal(q, q2)
+        assert_array_almost_equal(r, r2)
+
+    def test_simple_complex_left_pivoting(self):
+        a = array([[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]])
+        q, r, jpvt = qr(a, pivoting=True)
+        c = [1, 2, 3+4j]
+        qc, r, jpvt = qr_multiply(a, c, "left", True)
+        assert_array_almost_equal(q @ c, qc)
+
+    def test_simple_complex_right_pivoting(self):
+        a = array([[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]])
+        q, r, jpvt = qr(a, pivoting=True)
+        c = [1, 2, 3+4j]
+        qc, r, jpvt = qr_multiply(a, c, pivoting=True)
+        assert_array_almost_equal(c @ q, qc)
+
+    def test_random(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            q, r = qr(a)
+            assert_array_almost_equal(q.T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a)
+
+    def test_random_left(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            q, r = qr(a)
+            c = rng.random([n])
+            qc, r = qr_multiply(a, c, "left")
+            assert_array_almost_equal(q @ c, qc)
+            qc, r = qr_multiply(a, eye(n), "left")
+            assert_array_almost_equal(q, qc)
+
+    def test_random_right(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            q, r = qr(a)
+            c = rng.random([n])
+            cq, r = qr_multiply(a, c)
+            assert_array_almost_equal(c @ q, cq)
+            cq, r = qr_multiply(a, eye(n))
+            assert_array_almost_equal(q, cq)
+
+    def test_random_pivoting(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            q, r, p = qr(a, pivoting=True)
+            d = abs(diag(r))
+            assert_(np.all(d[1:] <= d[:-1]))
+            assert_array_almost_equal(q.T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a[:, p])
+            q2, r2 = qr(a[:, p])
+            assert_array_almost_equal(q, q2)
+            assert_array_almost_equal(r, r2)
+
+    def test_random_tall(self):
+        rng = np.random.RandomState(1234)
+        # full version
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r = qr(a)
+            assert_array_almost_equal(q.T @ q, eye(m))
+            assert_array_almost_equal(q @ r, a)
+
+    def test_random_tall_left(self):
+        rng = np.random.RandomState(1234)
+        # full version
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r = qr(a, mode="economic")
+            c = rng.random([n])
+            qc, r = qr_multiply(a, c, "left")
+            assert_array_almost_equal(q @ c, qc)
+            qc, r = qr_multiply(a, eye(n), "left")
+            assert_array_almost_equal(qc, q)
+
+    def test_random_tall_right(self):
+        rng = np.random.RandomState(1234)
+        # full version
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r = qr(a, mode="economic")
+            c = rng.random([m])
+            cq, r = qr_multiply(a, c)
+            assert_array_almost_equal(c @ q, cq)
+            cq, r = qr_multiply(a, eye(m))
+            assert_array_almost_equal(cq, q)
+
+    def test_random_tall_pivoting(self):
+        rng = np.random.RandomState(1234)
+        # full version pivoting
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r, p = qr(a, pivoting=True)
+            d = abs(diag(r))
+            assert_(np.all(d[1:] <= d[:-1]))
+            assert_array_almost_equal(q.T @ q, eye(m))
+            assert_array_almost_equal(q @ r, a[:, p])
+            q2, r2 = qr(a[:, p])
+            assert_array_almost_equal(q, q2)
+            assert_array_almost_equal(r, r2)
+
+    def test_random_tall_e(self):
+        rng = np.random.RandomState(1234)
+        # economy version
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r = qr(a, mode='economic')
+            assert_array_almost_equal(q.T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a)
+            assert_equal(q.shape, (m, n))
+            assert_equal(r.shape, (n, n))
+
+    def test_random_tall_e_pivoting(self):
+        rng = np.random.RandomState(1234)
+        # economy version pivoting
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r, p = qr(a, pivoting=True, mode='economic')
+            d = abs(diag(r))
+            assert_(np.all(d[1:] <= d[:-1]))
+            assert_array_almost_equal(q.T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a[:, p])
+            assert_equal(q.shape, (m, n))
+            assert_equal(r.shape, (n, n))
+            q2, r2 = qr(a[:, p], mode='economic')
+            assert_array_almost_equal(q, q2)
+            assert_array_almost_equal(r, r2)
+
+    def test_random_trap(self):
+        rng = np.random.RandomState(1234)
+        m = 100
+        n = 200
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r = qr(a)
+            assert_array_almost_equal(q.T @ q, eye(m))
+            assert_array_almost_equal(q @ r, a)
+
+    def test_random_trap_pivoting(self):
+        rng = np.random.RandomState(1234)
+        m = 100
+        n = 200
+        for k in range(2):
+            a = rng.random([m, n])
+            q, r, p = qr(a, pivoting=True)
+            d = abs(diag(r))
+            assert_(np.all(d[1:] <= d[:-1]))
+            assert_array_almost_equal(q.T @ q, eye(m))
+            assert_array_almost_equal(q @ r, a[:, p])
+            q2, r2 = qr(a[:, p])
+            assert_array_almost_equal(q, q2)
+            assert_array_almost_equal(r, r2)
+
+    def test_random_complex(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            q, r = qr(a)
+            assert_array_almost_equal(q.conj().T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a)
+
+    def test_random_complex_left(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            q, r = qr(a)
+            c = rng.random([n]) + 1j*rng.random([n])
+            qc, r = qr_multiply(a, c, "left")
+            assert_array_almost_equal(q @ c, qc)
+            qc, r = qr_multiply(a, eye(n), "left")
+            assert_array_almost_equal(q, qc)
+
+    def test_random_complex_right(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            q, r = qr(a)
+            c = rng.random([n]) + 1j*rng.random([n])
+            cq, r = qr_multiply(a, c)
+            assert_array_almost_equal(c @ q, cq)
+            cq, r = qr_multiply(a, eye(n))
+            assert_array_almost_equal(q, cq)
+
+    def test_random_complex_pivoting(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            q, r, p = qr(a, pivoting=True)
+            d = abs(diag(r))
+            assert_(np.all(d[1:] <= d[:-1]))
+            assert_array_almost_equal(q.conj().T @ q, eye(n))
+            assert_array_almost_equal(q @ r, a[:, p])
+            q2, r2 = qr(a[:, p])
+            assert_array_almost_equal(q, q2)
+            assert_array_almost_equal(r, r2)
+
+    def test_check_finite(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        q, r = qr(a, check_finite=False)
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(q @ r, a)
+
+    def test_lwork(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        # Get comparison values
+        q, r = qr(a, lwork=None)
+
+        # Test against minimum valid lwork
+        q2, r2 = qr(a, lwork=3)
+        assert_array_almost_equal(q2, q)
+        assert_array_almost_equal(r2, r)
+
+        # Test against larger lwork
+        q3, r3 = qr(a, lwork=10)
+        assert_array_almost_equal(q3, q)
+        assert_array_almost_equal(r3, r)
+
+        # Test against explicit lwork=-1
+        q4, r4 = qr(a, lwork=-1)
+        assert_array_almost_equal(q4, q)
+        assert_array_almost_equal(r4, r)
+
+        # Test against invalid lwork
+        assert_raises(Exception, qr, (a,), {'lwork': 0})
+        assert_raises(Exception, qr, (a,), {'lwork': 2})
+
+    @pytest.mark.parametrize("m", [0, 1, 2])
+    @pytest.mark.parametrize("n", [0, 1, 2])
+    @pytest.mark.parametrize("pivoting", [False, True])
+    @pytest.mark.parametrize('dtype', DTYPES)
+    def test_shape_dtype(self, m, n, pivoting, dtype):
+        k = min(m, n)
+
+        a = np.zeros((m, n), dtype=dtype)
+        q, r, *other = qr(a, pivoting=pivoting)
+        assert_equal(q.shape, (m, m))
+        assert_equal(q.dtype, dtype)
+        assert_equal(r.shape, (m, n))
+        assert_equal(r.dtype, dtype)
+        assert len(other) == (1 if pivoting else 0)
+        if pivoting:
+            p, = other
+            assert_equal(p.shape, (n,))
+            assert_equal(p.dtype, np.int32)
+
+        r, *other = qr(a, mode='r', pivoting=pivoting)
+        assert_equal(r.shape, (m, n))
+        assert_equal(r.dtype, dtype)
+        assert len(other) == (1 if pivoting else 0)
+        if pivoting:
+            p, = other
+            assert_equal(p.shape, (n,))
+            assert_equal(p.dtype, np.int32)
+
+        q, r, *other = qr(a, mode='economic', pivoting=pivoting)
+        assert_equal(q.shape, (m, k))
+        assert_equal(q.dtype, dtype)
+        assert_equal(r.shape, (k, n))
+        assert_equal(r.dtype, dtype)
+        assert len(other) == (1 if pivoting else 0)
+        if pivoting:
+            p, = other
+            assert_equal(p.shape, (n,))
+            assert_equal(p.dtype, np.int32)
+
+        (raw, tau), r, *other = qr(a, mode='raw', pivoting=pivoting)
+        assert_equal(raw.shape, (m, n))
+        assert_equal(raw.dtype, dtype)
+        assert_equal(tau.shape, (k,))
+        assert_equal(tau.dtype, dtype)
+        assert_equal(r.shape, (k, n))
+        assert_equal(r.dtype, dtype)
+        assert len(other) == (1 if pivoting else 0)
+        if pivoting:
+            p, = other
+            assert_equal(p.shape, (n,))
+            assert_equal(p.dtype, np.int32)
+
+    @pytest.mark.parametrize(("m", "n"), [(0, 0), (0, 2), (2, 0)])
+    def test_empty(self, m, n):
+        k = min(m, n)
+
+        a = np.empty((m, n))
+        q, r = qr(a)
+        assert_allclose(q, np.identity(m))
+        assert_allclose(r, np.empty((m, n)))
+
+        q, r, p = qr(a, pivoting=True)
+        assert_allclose(q, np.identity(m))
+        assert_allclose(r, np.empty((m, n)))
+        assert_allclose(p, np.arange(n))
+
+        r, = qr(a, mode='r')
+        assert_allclose(r, np.empty((m, n)))
+
+        q, r = qr(a, mode='economic')
+        assert_allclose(q, np.empty((m, k)))
+        assert_allclose(r, np.empty((k, n)))
+
+        (raw, tau), r = qr(a, mode='raw')
+        assert_allclose(raw, np.empty((m, n)))
+        assert_allclose(tau, np.empty((k,)))
+        assert_allclose(r, np.empty((k, n)))
+
+    def test_multiply_empty(self):
+        a = np.empty((0, 0))
+        c = np.empty((0, 0))
+        cq, r = qr_multiply(a, c)
+        assert_allclose(cq, np.empty((0, 0)))
+
+        a = np.empty((0, 2))
+        c = np.empty((2, 0))
+        cq, r = qr_multiply(a, c)
+        assert_allclose(cq, np.empty((2, 0)))
+
+        a = np.empty((2, 0))
+        c = np.empty((0, 2))
+        cq, r = qr_multiply(a, c)
+        assert_allclose(cq, np.empty((0, 2)))
+
+
+class TestRQ:
+    def test_simple(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        r, q = rq(a)
+        assert_array_almost_equal(q @ q.T, eye(3))
+        assert_array_almost_equal(r @ q, a)
+
+    def test_r(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        r, q = rq(a)
+        r2 = rq(a, mode='r')
+        assert_array_almost_equal(r, r2)
+
+    def test_random(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            r, q = rq(a)
+            assert_array_almost_equal(q @ q.T, eye(n))
+            assert_array_almost_equal(r @ q, a)
+
+    def test_simple_trap(self):
+        a = [[8, 2, 3], [2, 9, 3]]
+        r, q = rq(a)
+        assert_array_almost_equal(q.T @ q, eye(3))
+        assert_array_almost_equal(r @ q, a)
+
+    def test_simple_tall(self):
+        a = [[8, 2], [2, 9], [5, 3]]
+        r, q = rq(a)
+        assert_array_almost_equal(q.T @ q, eye(2))
+        assert_array_almost_equal(r @ q, a)
+
+    def test_simple_fat(self):
+        a = [[8, 2, 5], [2, 9, 3]]
+        r, q = rq(a)
+        assert_array_almost_equal(q @ q.T, eye(3))
+        assert_array_almost_equal(r @ q, a)
+
+    def test_simple_complex(self):
+        a = [[3, 3+4j, 5], [5, 2, 2+7j], [3, 2, 7]]
+        r, q = rq(a)
+        assert_array_almost_equal(q @ q.conj().T, eye(3))
+        assert_array_almost_equal(r @ q, a)
+
+    def test_random_tall(self):
+        rng = np.random.RandomState(1234)
+        m = 200
+        n = 100
+        for k in range(2):
+            a = rng.random([m, n])
+            r, q = rq(a)
+            assert_array_almost_equal(q @ q.T, eye(n))
+            assert_array_almost_equal(r @ q, a)
+
+    def test_random_trap(self):
+        rng = np.random.RandomState(1234)
+        m = 100
+        n = 200
+        for k in range(2):
+            a = rng.random([m, n])
+            r, q = rq(a)
+            assert_array_almost_equal(q @ q.T, eye(n))
+            assert_array_almost_equal(r @ q, a)
+
+    def test_random_trap_economic(self):
+        rng = np.random.RandomState(1234)
+        m = 100
+        n = 200
+        for k in range(2):
+            a = rng.random([m, n])
+            r, q = rq(a, mode='economic')
+            assert_array_almost_equal(q @ q.T, eye(m))
+            assert_array_almost_equal(r @ q, a)
+            assert_equal(q.shape, (m, n))
+            assert_equal(r.shape, (m, m))
+
+    def test_random_complex(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            r, q = rq(a)
+            assert_array_almost_equal(q @ q.conj().T, eye(n))
+            assert_array_almost_equal(r @ q, a)
+
+    def test_random_complex_economic(self):
+        rng = np.random.RandomState(1234)
+        m = 100
+        n = 200
+        for k in range(2):
+            a = rng.random([m, n]) + 1j*rng.random([m, n])
+            r, q = rq(a, mode='economic')
+            assert_array_almost_equal(q @ q.conj().T, eye(m))
+            assert_array_almost_equal(r @ q, a)
+            assert_equal(q.shape, (m, n))
+            assert_equal(r.shape, (m, m))
+
+    def test_check_finite(self):
+        a = [[8, 2, 3], [2, 9, 3], [5, 3, 6]]
+        r, q = rq(a, check_finite=False)
+        assert_array_almost_equal(q @ q.T, eye(3))
+        assert_array_almost_equal(r @ q, a)
+
+    @pytest.mark.parametrize("m", [0, 1, 2])
+    @pytest.mark.parametrize("n", [0, 1, 2])
+    @pytest.mark.parametrize('dtype', DTYPES)
+    def test_shape_dtype(self, m, n, dtype):
+        k = min(m, n)
+
+        a = np.zeros((m, n), dtype=dtype)
+        r, q = rq(a)
+        assert_equal(q.shape, (n, n))
+        assert_equal(r.shape, (m, n))
+        assert_equal(r.dtype, dtype)
+        assert_equal(q.dtype, dtype)
+
+        r = rq(a, mode='r')
+        assert_equal(r.shape, (m, n))
+        assert_equal(r.dtype, dtype)
+
+        r, q = rq(a, mode='economic')
+        assert_equal(r.shape, (m, k))
+        assert_equal(r.dtype, dtype)
+        assert_equal(q.shape, (k, n))
+        assert_equal(q.dtype, dtype)
+
+    @pytest.mark.parametrize(("m", "n"), [(0, 0), (0, 2), (2, 0)])
+    def test_empty(self, m, n):
+        k = min(m, n)
+
+        a = np.empty((m, n))
+        r, q = rq(a)
+        assert_allclose(r, np.empty((m, n)))
+        assert_allclose(q, np.identity(n))
+
+        r = rq(a, mode='r')
+        assert_allclose(r, np.empty((m, n)))
+
+        r, q = rq(a, mode='economic')
+        assert_allclose(r, np.empty((m, k)))
+        assert_allclose(q, np.empty((k, n)))
+
+
+class TestSchur:
+
+    def check_schur(self, a, t, u, rtol, atol):
+        # Check that the Schur decomposition is correct.
+        assert_allclose(u @ t @ u.conj().T, a, rtol=rtol, atol=atol,
+                        err_msg="Schur decomposition does not match 'a'")
+        # The expected value of u @ u.H - I is all zeros, so test
+        # with absolute tolerance only.
+        assert_allclose(u @ u.conj().T - np.eye(len(u)), 0, rtol=0, atol=atol,
+                        err_msg="u is not unitary")
+
+    def test_simple(self):
+        a = [[8, 12, 3], [2, 9, 3], [10, 3, 6]]
+        t, z = schur(a)
+        self.check_schur(a, t, z, rtol=1e-14, atol=5e-15)
+        tc, zc = schur(a, 'complex')
+        assert_(np.any(ravel(iscomplex(zc))) and np.any(ravel(iscomplex(tc))))
+        self.check_schur(a, tc, zc, rtol=1e-14, atol=5e-15)
+        tc2, zc2 = rsf2csf(tc, zc)
+        self.check_schur(a, tc2, zc2, rtol=1e-14, atol=5e-15)
+
+    @pytest.mark.parametrize(
+        'sort, expected_diag',
+        [('lhp', [-np.sqrt(2), -0.5, np.sqrt(2), 0.5]),
+         ('rhp', [np.sqrt(2), 0.5, -np.sqrt(2), -0.5]),
+         ('iuc', [-0.5, 0.5, np.sqrt(2), -np.sqrt(2)]),
+         ('ouc', [np.sqrt(2), -np.sqrt(2), -0.5, 0.5]),
+         (lambda x: x >= 0.0, [np.sqrt(2), 0.5, -np.sqrt(2), -0.5])]
+    )
+    def test_sort(self, sort, expected_diag):
+        # The exact eigenvalues of this matrix are
+        #   -sqrt(2), sqrt(2), -1/2, 1/2.
+        a = [[4., 3., 1., -1.],
+             [-4.5, -3.5, -1., 1.],
+             [9., 6., -4., 4.5],
+             [6., 4., -3., 3.5]]
+        t, u, sdim = schur(a, sort=sort)
+        self.check_schur(a, t, u, rtol=1e-14, atol=5e-15)
+        assert_allclose(np.diag(t), expected_diag, rtol=1e-12)
+        assert_equal(2, sdim)
+
+    def test_sort_errors(self):
+        a = [[4., 3., 1., -1.],
+             [-4.5, -3.5, -1., 1.],
+             [9., 6., -4., 4.5],
+             [6., 4., -3., 3.5]]
+        assert_raises(ValueError, schur, a, sort='unsupported')
+        assert_raises(ValueError, schur, a, sort=1)
+
+    def test_check_finite(self):
+        a = [[8, 12, 3], [2, 9, 3], [10, 3, 6]]
+        t, z = schur(a, check_finite=False)
+        assert_array_almost_equal(z @ t @ z.conj().T, a)
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        t, z = schur(a)
+        t0, z0 = schur(np.eye(2, dtype=dt))
+        assert_allclose(t, np.empty((0, 0)))
+        assert_allclose(z, np.empty((0, 0)))
+        assert t.dtype == t0.dtype
+        assert z.dtype == z0.dtype
+
+        t, z, sdim = schur(a, sort='lhp')
+        assert_allclose(t, np.empty((0, 0)))
+        assert_allclose(z, np.empty((0, 0)))
+        assert_equal(sdim, 0)
+        assert t.dtype == t0.dtype
+        assert z.dtype == z0.dtype
+
+    @pytest.mark.parametrize('sort', ['iuc', 'ouc'])
+    @pytest.mark.parametrize('output', ['real', 'complex'])
+    @pytest.mark.parametrize('dtype', [np.float32, np.float64,
+                                       np.complex64, np.complex128])
+    def test_gh_13137_sort_str(self, sort, output, dtype):
+        # gh-13137 reported that sort values 'iuc' and 'ouc' were not
+        # correct because the callables assumed that the eigenvalues would
+        # always be expressed as a single complex number.
+        # In fact, when `output='real'` and the dtype is real, the
+        # eigenvalues are passed as separate real and imaginary components
+        # (yet no error is raised if the callable accepts only one argument).
+        #
+        # This tests these sort values by counting the number of eigenvalues
+        # `schur` reports as being inside/outside the unit circle.
+
+        # Real matrix with eigenvalues 0.1 +- 2j
+        A = np.asarray([[0.1, -2], [2, 0.1]])
+
+        # Previously, this would fail for `output='real'` with real dtypes
+        sdim = schur(A.astype(dtype), sort=sort, output=output)[-1]
+        assert sdim == 0 if sort == 'iuc' else sdim == 2
+
+    @pytest.mark.parametrize('output', ['real', 'complex'])
+    @pytest.mark.parametrize('dtype', [np.float32, np.float64,
+                                       np.complex64, np.complex128])
+    def test_gh_13137_sort_custom(self, output, dtype):
+        # This simply tests our understanding of how eigenvalues are
+        # passed to a sort callable. If `output='real'` and the dtype is real,
+        # real and imaginary parts are passed as separate real arguments;
+        # otherwise, they are passed a single complex argument.
+        # Also, if `output='real'` and the dtype is real, when either
+        # eigenvalue in a complex conjugate pair satisfies the sort condition,
+        # `sdim` is incremented by TWO.
+
+        # Real matrix with eigenvalues 0.1 +- 2j
+        A = np.asarray([[0.1, -2], [2, 0.1]])
+
+        all_real = output=='real' and dtype in {np.float32, np.float64}
+
+        def sort(x, y=None):
+            if all_real:
+                assert not np.iscomplexobj(x)
+                assert y is not None and np.isreal(y)
+                z = x + y*1j
+            else:
+                assert np.iscomplexobj(x)
+                assert y is None
+                z = x
+            return z.imag > 1e-15
+
+        # Only one complex eigenvalue satisfies the condition, but when
+        # `all_real` applies, both eigenvalues in the complex conjugate pair
+        # are counted.
+        sdim = schur(A.astype(dtype), sort=sort, output=output)[-1]
+        assert sdim == 2 if all_real else sdim == 1
+
+
+class TestHessenberg:
+
+    def test_simple(self):
+        a = [[-149, -50, -154],
+             [537, 180, 546],
+             [-27, -9, -25]]
+        h1 = [[-149.0000, 42.2037, -156.3165],
+              [-537.6783, 152.5511, -554.9272],
+              [0, 0.0728, 2.4489]]
+        h, q = hessenberg(a, calc_q=1)
+        assert_array_almost_equal(q.T @ a @ q, h)
+        assert_array_almost_equal(h, h1, decimal=4)
+
+    def test_simple_complex(self):
+        a = [[-149, -50, -154],
+             [537, 180j, 546],
+             [-27j, -9, -25]]
+        h, q = hessenberg(a, calc_q=1)
+        assert_array_almost_equal(q.conj().T @ a @ q, h)
+
+    def test_simple2(self):
+        a = [[1, 2, 3, 4, 5, 6, 7],
+             [0, 2, 3, 4, 6, 7, 2],
+             [0, 2, 2, 3, 0, 3, 2],
+             [0, 0, 2, 8, 0, 0, 2],
+             [0, 3, 1, 2, 0, 1, 2],
+             [0, 1, 2, 3, 0, 1, 0],
+             [0, 0, 0, 0, 0, 1, 2]]
+        h, q = hessenberg(a, calc_q=1)
+        assert_array_almost_equal(q.T @ a @ q, h)
+
+    def test_simple3(self):
+        a = np.eye(3)
+        a[-1, 0] = 2
+        h, q = hessenberg(a, calc_q=1)
+        assert_array_almost_equal(q.T @ a @ q, h)
+
+    def test_random(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n])
+            h, q = hessenberg(a, calc_q=1)
+            assert_array_almost_equal(q.T @ a @ q, h)
+
+    def test_random_complex(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        for k in range(2):
+            a = rng.random([n, n]) + 1j*rng.random([n, n])
+            h, q = hessenberg(a, calc_q=1)
+            assert_array_almost_equal(q.conj().T @ a @ q, h)
+
+    def test_check_finite(self):
+        a = [[-149, -50, -154],
+             [537, 180, 546],
+             [-27, -9, -25]]
+        h1 = [[-149.0000, 42.2037, -156.3165],
+              [-537.6783, 152.5511, -554.9272],
+              [0, 0.0728, 2.4489]]
+        h, q = hessenberg(a, calc_q=1, check_finite=False)
+        assert_array_almost_equal(q.T @ a @ q, h)
+        assert_array_almost_equal(h, h1, decimal=4)
+
+    def test_2x2(self):
+        a = [[2, 1], [7, 12]]
+
+        h, q = hessenberg(a, calc_q=1)
+        assert_array_almost_equal(q, np.eye(2))
+        assert_array_almost_equal(h, a)
+
+        b = [[2-7j, 1+2j], [7+3j, 12-2j]]
+        h2, q2 = hessenberg(b, calc_q=1)
+        assert_array_almost_equal(q2, np.eye(2))
+        assert_array_almost_equal(h2, b)
+
+    @pytest.mark.parametrize('dt', [int, float, float32, complex, complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        h = hessenberg(a)
+        assert h.shape == (0, 0)
+        assert h.dtype == hessenberg(np.eye(3, dtype=dt)).dtype
+
+        h, q = hessenberg(a, calc_q=True)
+        h3, q3 = hessenberg(a, calc_q=True)
+        assert h.shape == (0, 0)
+        assert h.dtype == h3.dtype
+
+        assert q.shape == (0, 0)
+        assert q.dtype == q3.dtype
+
+
+blas_provider = blas_version = None
+if CONFIG is not None:
+    blas_provider = CONFIG['Build Dependencies']['blas']['name']
+    blas_version = CONFIG['Build Dependencies']['blas']['version']
+
+
+class TestQZ:
+    def test_qz_single(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = rng.random([n, n]).astype(float32)
+        B = rng.random([n, n]).astype(float32)
+        AA, BB, Q, Z = qz(A, B)
+        assert_array_almost_equal(Q @ AA @ Z.T, A, decimal=5)
+        assert_array_almost_equal(Q @ BB @ Z.T, B, decimal=5)
+        assert_array_almost_equal(Q @ Q.T, eye(n), decimal=5)
+        assert_array_almost_equal(Z @ Z.T, eye(n), decimal=5)
+        assert_(np.all(diag(BB) >= 0))
+
+    def test_qz_double(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = rng.random([n, n])
+        B = rng.random([n, n])
+        AA, BB, Q, Z = qz(A, B)
+        assert_array_almost_equal(Q @ AA @ Z.T, A)
+        assert_array_almost_equal(Q @ BB @ Z.T, B)
+        assert_array_almost_equal(Q @ Q.T, eye(n))
+        assert_array_almost_equal(Z @ Z.T, eye(n))
+        assert_(np.all(diag(BB) >= 0))
+
+    def test_qz_complex(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = rng.random([n, n]) + 1j*rng.random([n, n])
+        B = rng.random([n, n]) + 1j*rng.random([n, n])
+        AA, BB, Q, Z = qz(A, B)
+        assert_array_almost_equal(Q @ AA @ Z.conj().T, A)
+        assert_array_almost_equal(Q @ BB @ Z.conj().T, B)
+        assert_array_almost_equal(Q @ Q.conj().T, eye(n))
+        assert_array_almost_equal(Z @ Z.conj().T, eye(n))
+        assert_(np.all(diag(BB) >= 0))
+        assert_(np.all(diag(BB).imag == 0))
+
+    def test_qz_complex64(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = (rng.random([n, n]) + 1j*rng.random([n, n])).astype(complex64)
+        B = (rng.random([n, n]) + 1j*rng.random([n, n])).astype(complex64)
+        AA, BB, Q, Z = qz(A, B)
+        assert_array_almost_equal(Q @ AA @ Z.conj().T, A, decimal=5)
+        assert_array_almost_equal(Q @ BB @ Z.conj().T, B, decimal=5)
+        assert_array_almost_equal(Q @ Q.conj().T, eye(n), decimal=5)
+        assert_array_almost_equal(Z @ Z.conj().T, eye(n), decimal=5)
+        assert_(np.all(diag(BB) >= 0))
+        assert_(np.all(diag(BB).imag == 0))
+
+    def test_qz_double_complex(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = rng.random([n, n])
+        B = rng.random([n, n])
+        AA, BB, Q, Z = qz(A, B, output='complex')
+        aa = Q @ AA @ Z.conj().T
+        assert_array_almost_equal(aa.real, A)
+        assert_array_almost_equal(aa.imag, 0)
+        bb = Q @ BB @ Z.conj().T
+        assert_array_almost_equal(bb.real, B)
+        assert_array_almost_equal(bb.imag, 0)
+        assert_array_almost_equal(Q @ Q.conj().T, eye(n))
+        assert_array_almost_equal(Z @ Z.conj().T, eye(n))
+        assert_(np.all(diag(BB) >= 0))
+
+    def test_qz_double_sort(self):
+        # from https://www.nag.com/lapack-ex/node119.html
+        # NOTE: These matrices may be ill-conditioned and lead to a
+        # seg fault on certain python versions when compiled with
+        # sse2 or sse3 older ATLAS/LAPACK binaries for windows
+        # A =   np.array([[3.9,  12.5, -34.5,  -0.5],
+        #                [ 4.3,  21.5, -47.5,   7.5],
+        #                [ 4.3,  21.5, -43.5,   3.5],
+        #                [ 4.4,  26.0, -46.0,   6.0 ]])
+
+        # B = np.array([[ 1.0,   2.0,  -3.0,   1.0],
+        #              [1.0,   3.0,  -5.0,   4.0],
+        #              [1.0,   3.0,  -4.0,   3.0],
+        #              [1.0,   3.0,  -4.0,   4.0]])
+        A = np.array([[3.9, 12.5, -34.5, 2.5],
+                      [4.3, 21.5, -47.5, 7.5],
+                      [4.3, 1.5, -43.5, 3.5],
+                      [4.4, 6.0, -46.0, 6.0]])
+
+        B = np.array([[1.0, 1.0, -3.0, 1.0],
+                      [1.0, 3.0, -5.0, 4.4],
+                      [1.0, 2.0, -4.0, 1.0],
+                      [1.2, 3.0, -4.0, 4.0]])
+
+        assert_raises(ValueError, qz, A, B, sort=lambda ar, ai, beta: ai == 0)
+        if False:
+            AA, BB, Q, Z, sdim = qz(A, B, sort=lambda ar, ai, beta: ai == 0)
+            # assert_(sdim == 2)
+            assert_(sdim == 4)
+            assert_array_almost_equal(Q @ AA @ Z.T, A)
+            assert_array_almost_equal(Q @ BB @ Z.T, B)
+
+            # test absolute values bc the sign is ambiguous and
+            # might be platform dependent
+            assert_array_almost_equal(np.abs(AA), np.abs(np.array(
+                            [[35.7864, -80.9061, -12.0629, -9.498],
+                             [0., 2.7638, -2.3505, 7.3256],
+                             [0., 0., 0.6258, -0.0398],
+                             [0., 0., 0., -12.8217]])), 4)
+            assert_array_almost_equal(np.abs(BB), np.abs(np.array(
+                            [[4.5324, -8.7878, 3.2357, -3.5526],
+                             [0., 1.4314, -2.1894, 0.9709],
+                             [0., 0., 1.3126, -0.3468],
+                             [0., 0., 0., 0.559]])), 4)
+            assert_array_almost_equal(np.abs(Q), np.abs(np.array(
+                            [[-0.4193, -0.605, -0.1894, -0.6498],
+                             [-0.5495, 0.6987, 0.2654, -0.3734],
+                             [-0.4973, -0.3682, 0.6194, 0.4832],
+                             [-0.5243, 0.1008, -0.7142, 0.4526]])), 4)
+            assert_array_almost_equal(np.abs(Z), np.abs(np.array(
+                            [[-0.9471, -0.2971, -0.1217, 0.0055],
+                             [-0.0367, 0.1209, 0.0358, 0.9913],
+                             [0.3171, -0.9041, -0.2547, 0.1312],
+                             [0.0346, 0.2824, -0.9587, 0.0014]])), 4)
+
+        # test absolute values bc the sign is ambiguous and might be platform
+        # dependent
+        # assert_array_almost_equal(abs(AA), abs(np.array([
+        #                [3.8009, -69.4505, 50.3135, -43.2884],
+        #                [0.0000, 9.2033, -0.2001, 5.9881],
+        #                [0.0000, 0.0000, 1.4279, 4.4453],
+        #                [0.0000, 0.0000, 0.9019, -1.1962]])), 4)
+        # assert_array_almost_equal(abs(BB), abs(np.array([
+        #                [1.9005, -10.2285, 0.8658, -5.2134],
+        #                [0.0000,   2.3008, 0.7915,  0.4262],
+        #                [0.0000,   0.0000, 0.8101,  0.0000],
+        #                [0.0000,   0.0000, 0.0000, -0.2823]])), 4)
+        # assert_array_almost_equal(abs(Q), abs(np.array([
+        #                [0.4642,  0.7886,  0.2915, -0.2786],
+        #                [0.5002, -0.5986,  0.5638, -0.2713],
+        #                [0.5002,  0.0154, -0.0107,  0.8657],
+        #                [0.5331, -0.1395, -0.7727, -0.3151]])), 4)
+        # assert_array_almost_equal(dot(Q,Q.T), eye(4))
+        # assert_array_almost_equal(abs(Z), abs(np.array([
+        #                [0.9961, -0.0014,  0.0887, -0.0026],
+        #                [0.0057, -0.0404, -0.0938, -0.9948],
+        #                [0.0626,  0.7194, -0.6908,  0.0363],
+        #                [0.0626, -0.6934, -0.7114,  0.0956]])), 4)
+        # assert_array_almost_equal(dot(Z,Z.T), eye(4))
+
+    # def test_qz_complex_sort(self):
+    #    cA = np.array([
+    #   [-21.10+22.50*1j, 53.50+-50.50*1j, -34.50+127.50*1j, 7.50+  0.50*1j],
+    #   [-0.46+ -7.78*1j, -3.50+-37.50*1j, -15.50+ 58.50*1j,-10.50+ -1.50*1j],
+    #   [ 4.30+ -5.50*1j, 39.70+-17.10*1j, -68.50+ 12.50*1j, -7.50+ -3.50*1j],
+    #   [ 5.50+  4.40*1j, 14.40+ 43.30*1j, -32.50+-46.00*1j,-19.00+-32.50*1j]])
+
+    #    cB =  np.array([
+    #   [1.00+ -5.00*1j, 1.60+  1.20*1j,-3.00+  0.00*1j, 0.00+ -1.00*1j],
+    #   [0.80+ -0.60*1j, 3.00+ -5.00*1j,-4.00+  3.00*1j,-2.40+ -3.20*1j],
+    #   [1.00+  0.00*1j, 2.40+  1.80*1j,-4.00+ -5.00*1j, 0.00+ -3.00*1j],
+    #   [0.00+  1.00*1j,-1.80+  2.40*1j, 0.00+ -4.00*1j, 4.00+ -5.00*1j]])
+
+    #    AAS,BBS,QS,ZS,sdim = qz(cA,cB,sort='lhp')
+
+    #    eigenvalues = diag(AAS)/diag(BBS)
+    #    assert_(np.all(np.real(eigenvalues[:sdim] < 0)))
+    #    assert_(np.all(np.real(eigenvalues[sdim:] > 0)))
+
+    def test_check_finite(self):
+        rng = np.random.RandomState(12345)
+        n = 5
+        A = rng.random([n, n])
+        B = rng.random([n, n])
+        AA, BB, Q, Z = qz(A, B, check_finite=False)
+        assert_array_almost_equal(Q @ AA @ Z.T, A)
+        assert_array_almost_equal(Q @ BB @ Z.T, B)
+        assert_array_almost_equal(Q @ Q.T, eye(n))
+        assert_array_almost_equal(Z @ Z.T, eye(n))
+        assert_(np.all(diag(BB) >= 0))
+
+
+class TestOrdQZ:
+    @classmethod
+    def setup_class(cls):
+        # https://www.nag.com/lapack-ex/node119.html
+        A1 = np.array([[-21.10 - 22.50j, 53.5 - 50.5j, -34.5 + 127.5j,
+                        7.5 + 0.5j],
+                       [-0.46 - 7.78j, -3.5 - 37.5j, -15.5 + 58.5j,
+                        -10.5 - 1.5j],
+                       [4.30 - 5.50j, 39.7 - 17.1j, -68.5 + 12.5j,
+                        -7.5 - 3.5j],
+                       [5.50 + 4.40j, 14.4 + 43.3j, -32.5 - 46.0j,
+                        -19.0 - 32.5j]])
+
+        B1 = np.array([[1.0 - 5.0j, 1.6 + 1.2j, -3 + 0j, 0.0 - 1.0j],
+                       [0.8 - 0.6j, .0 - 5.0j, -4 + 3j, -2.4 - 3.2j],
+                       [1.0 + 0.0j, 2.4 + 1.8j, -4 - 5j, 0.0 - 3.0j],
+                       [0.0 + 1.0j, -1.8 + 2.4j, 0 - 4j, 4.0 - 5.0j]])
+
+        # https://www.nag.com/numeric/fl/nagdoc_fl23/xhtml/F08/f08yuf.xml
+        A2 = np.array([[3.9, 12.5, -34.5, -0.5],
+                       [4.3, 21.5, -47.5, 7.5],
+                       [4.3, 21.5, -43.5, 3.5],
+                       [4.4, 26.0, -46.0, 6.0]])
+
+        B2 = np.array([[1, 2, -3, 1],
+                       [1, 3, -5, 4],
+                       [1, 3, -4, 3],
+                       [1, 3, -4, 4]])
+
+        # example with the eigenvalues
+        # -0.33891648, 1.61217396+0.74013521j, 1.61217396-0.74013521j,
+        # 0.61244091
+        # thus featuring:
+        #  * one complex conjugate eigenvalue pair,
+        #  * one eigenvalue in the lhp
+        #  * 2 eigenvalues in the unit circle
+        #  * 2 non-real eigenvalues
+        A3 = np.array([[5., 1., 3., 3.],
+                       [4., 4., 2., 7.],
+                       [7., 4., 1., 3.],
+                       [0., 4., 8., 7.]])
+        B3 = np.array([[8., 10., 6., 10.],
+                       [7., 7., 2., 9.],
+                       [9., 1., 6., 6.],
+                       [5., 1., 4., 7.]])
+
+        # example with infinite eigenvalues
+        A4 = np.eye(2)
+        B4 = np.diag([0, 1])
+
+        # example with (alpha, beta) = (0, 0)
+        A5 = np.diag([1, 0])
+
+        cls.A = [A1, A2, A3, A4, A5]
+        cls.B = [B1, B2, B3, B4, A5]
+
+    def qz_decomp(self, sort):
+        with np.errstate(all='raise'):
+            ret = [ordqz(Ai, Bi, sort=sort) for Ai, Bi in zip(self.A, self.B)]
+        return tuple(ret)
+
+    def check(self, A, B, sort, AA, BB, alpha, beta, Q, Z):
+        Id = np.eye(*A.shape)
+        # make sure Q and Z are orthogonal
+        assert_array_almost_equal(Q @ Q.T.conj(), Id)
+        assert_array_almost_equal(Z @ Z.T.conj(), Id)
+        # check factorization
+        assert_array_almost_equal(Q @ AA, A @ Z)
+        assert_array_almost_equal(Q @ BB, B @ Z)
+        # check shape of AA and BB
+        assert_array_equal(np.tril(AA, -2), np.zeros(AA.shape))
+        assert_array_equal(np.tril(BB, -1), np.zeros(BB.shape))
+        # check eigenvalues
+        for i in range(A.shape[0]):
+            # does the current diagonal element belong to a 2-by-2 block
+            # that was already checked?
+            if i > 0 and A[i, i - 1] != 0:
+                continue
+            # take care of 2-by-2 blocks
+            if i < AA.shape[0] - 1 and AA[i + 1, i] != 0:
+                evals, _ = eig(AA[i:i + 2, i:i + 2], BB[i:i + 2, i:i + 2])
+                # make sure the pair of complex conjugate eigenvalues
+                # is ordered consistently (positive imaginary part first)
+                if evals[0].imag < 0:
+                    evals = evals[[1, 0]]
+                tmp = alpha[i:i + 2]/beta[i:i + 2]
+                if tmp[0].imag < 0:
+                    tmp = tmp[[1, 0]]
+                assert_array_almost_equal(evals, tmp)
+            else:
+                if alpha[i] == 0 and beta[i] == 0:
+                    assert_equal(AA[i, i], 0)
+                    assert_equal(BB[i, i], 0)
+                elif beta[i] == 0:
+                    assert_equal(BB[i, i], 0)
+                else:
+                    assert_almost_equal(AA[i, i]/BB[i, i], alpha[i]/beta[i])
+        sortfun = _select_function(sort)
+        lastsort = True
+        for i in range(A.shape[0]):
+            cursort = sortfun(np.array([alpha[i]]), np.array([beta[i]]))
+            # once the sorting criterion was not matched all subsequent
+            # eigenvalues also shouldn't match
+            if not lastsort:
+                assert not cursort
+            lastsort = cursort
+
+    def check_all(self, sort):
+        ret = self.qz_decomp(sort)
+
+        for reti, Ai, Bi in zip(ret, self.A, self.B):
+            self.check(Ai, Bi, sort, *reti)
+
+    def test_lhp(self):
+        self.check_all('lhp')
+
+    def test_rhp(self):
+        self.check_all('rhp')
+
+    def test_iuc(self):
+        self.check_all('iuc')
+
+    def test_ouc(self):
+        self.check_all('ouc')
+
+    def test_ref(self):
+        # real eigenvalues first (top-left corner)
+        def sort(x, y):
+            out = np.empty_like(x, dtype=bool)
+            nonzero = (y != 0)
+            out[~nonzero] = False
+            out[nonzero] = (x[nonzero]/y[nonzero]).imag == 0
+            return out
+
+        self.check_all(sort)
+
+    def test_cef(self):
+        # complex eigenvalues first (top-left corner)
+        def sort(x, y):
+            out = np.empty_like(x, dtype=bool)
+            nonzero = (y != 0)
+            out[~nonzero] = False
+            out[nonzero] = (x[nonzero]/y[nonzero]).imag != 0
+            return out
+
+        self.check_all(sort)
+
+    def test_diff_input_types(self):
+        ret = ordqz(self.A[1], self.B[2], sort='lhp')
+        self.check(self.A[1], self.B[2], 'lhp', *ret)
+
+        ret = ordqz(self.B[2], self.A[1], sort='lhp')
+        self.check(self.B[2], self.A[1], 'lhp', *ret)
+
+    def test_sort_explicit(self):
+        # Test order of the eigenvalues in the 2 x 2 case where we can
+        # explicitly compute the solution
+        A1 = np.eye(2)
+        B1 = np.diag([-2, 0.5])
+        expected1 = [('lhp', [-0.5, 2]),
+                     ('rhp', [2, -0.5]),
+                     ('iuc', [-0.5, 2]),
+                     ('ouc', [2, -0.5])]
+        A2 = np.eye(2)
+        B2 = np.diag([-2 + 1j, 0.5 + 0.5j])
+        expected2 = [('lhp', [1/(-2 + 1j), 1/(0.5 + 0.5j)]),
+                     ('rhp', [1/(0.5 + 0.5j), 1/(-2 + 1j)]),
+                     ('iuc', [1/(-2 + 1j), 1/(0.5 + 0.5j)]),
+                     ('ouc', [1/(0.5 + 0.5j), 1/(-2 + 1j)])]
+        # 'lhp' is ambiguous so don't test it
+        A3 = np.eye(2)
+        B3 = np.diag([2, 0])
+        expected3 = [('rhp', [0.5, np.inf]),
+                     ('iuc', [0.5, np.inf]),
+                     ('ouc', [np.inf, 0.5])]
+        # 'rhp' is ambiguous so don't test it
+        A4 = np.eye(2)
+        B4 = np.diag([-2, 0])
+        expected4 = [('lhp', [-0.5, np.inf]),
+                     ('iuc', [-0.5, np.inf]),
+                     ('ouc', [np.inf, -0.5])]
+        A5 = np.diag([0, 1])
+        B5 = np.diag([0, 0.5])
+        # 'lhp' and 'iuc' are ambiguous so don't test them
+        expected5 = [('rhp', [2, np.nan]),
+                     ('ouc', [2, np.nan])]
+
+        A = [A1, A2, A3, A4, A5]
+        B = [B1, B2, B3, B4, B5]
+        expected = [expected1, expected2, expected3, expected4, expected5]
+        for Ai, Bi, expectedi in zip(A, B, expected):
+            for sortstr, expected_eigvals in expectedi:
+                _, _, alpha, beta, _, _ = ordqz(Ai, Bi, sort=sortstr)
+                azero = (alpha == 0)
+                bzero = (beta == 0)
+                x = np.empty_like(alpha)
+                x[azero & bzero] = np.nan
+                x[~azero & bzero] = np.inf
+                x[~bzero] = alpha[~bzero]/beta[~bzero]
+                assert_allclose(expected_eigvals, x)
+
+
+class TestOrdQZWorkspaceSize:
+    @pytest.mark.fail_slow(5)
+    def test_decompose(self):
+        rng = np.random.RandomState(12345)
+        N = 202
+        # raises error if lwork parameter to dtrsen is too small
+        for ddtype in [np.float32, np.float64]:
+            A = rng.random((N, N)).astype(ddtype)
+            B = rng.random((N, N)).astype(ddtype)
+            # sort = lambda ar, ai, b: ar**2 + ai**2 < b**2
+            _ = ordqz(A, B, sort=lambda alpha, beta: alpha < beta,
+                      output='real')
+
+        for ddtype in [np.complex128, np.complex64]:
+            A = rng.random((N, N)).astype(ddtype)
+            B = rng.random((N, N)).astype(ddtype)
+            _ = ordqz(A, B, sort=lambda alpha, beta: alpha < beta,
+                      output='complex')
+
+    @pytest.mark.slow
+    def test_decompose_ouc(self):
+        rng = np.random.RandomState(12345)
+        N = 202
+        # segfaults if lwork parameter to dtrsen is too small
+        for ddtype in [np.float32, np.float64, np.complex128, np.complex64]:
+            A = rng.random((N, N)).astype(ddtype)
+            B = rng.random((N, N)).astype(ddtype)
+            S, T, alpha, beta, U, V = ordqz(A, B, sort='ouc')
+
+
+class TestDatacopied:
+
+    def test_datacopied(self):
+        from scipy.linalg._decomp import _datacopied
+
+        M = matrix([[0, 1], [2, 3]])
+        A = asarray(M)
+        L = M.tolist()
+        M2 = M.copy()
+
+        class Fake1:
+            def __array__(self, dtype=None, copy=None):
+                return A
+
+        class Fake2:
+            __array_interface__ = A.__array_interface__
+
+        F1 = Fake1()
+        F2 = Fake2()
+
+        for item, status in [(M, False), (A, False), (L, True),
+                             (M2, False), (F1, False), (F2, False)]:
+            arr = asarray(item)
+            assert_equal(_datacopied(arr, item), status,
+                         err_msg=repr(item))
+
+
+def test_aligned_mem_float():
+    """Check linalg works with non-aligned memory (float32)"""
+    # Allocate 402 bytes of memory (allocated on boundary)
+    a = arange(402, dtype=np.uint8)
+
+    # Create an array with boundary offset 4
+    z = np.frombuffer(a.data, offset=2, count=100, dtype=float32)
+    z.shape = 10, 10
+
+    eig(z, overwrite_a=True)
+    eig(z.T, overwrite_a=True)
+
+
+@pytest.mark.skipif(platform.machine() == 'ppc64le',
+                    reason="crashes on ppc64le")
+def test_aligned_mem():
+    """Check linalg works with non-aligned memory (float64)"""
+    # Allocate 804 bytes of memory (allocated on boundary)
+    a = arange(804, dtype=np.uint8)
+
+    # Create an array with boundary offset 4
+    z = np.frombuffer(a.data, offset=4, count=100, dtype=float)
+    z.shape = 10, 10
+
+    eig(z, overwrite_a=True)
+    eig(z.T, overwrite_a=True)
+
+
+def test_aligned_mem_complex():
+    """Check that complex objects don't need to be completely aligned"""
+    # Allocate 1608 bytes of memory (allocated on boundary)
+    a = zeros(1608, dtype=np.uint8)
+
+    # Create an array with boundary offset 8
+    z = np.frombuffer(a.data, offset=8, count=100, dtype=complex)
+    z.shape = 10, 10
+
+    eig(z, overwrite_a=True)
+    # This does not need special handling
+    eig(z.T, overwrite_a=True)
+
+
+def check_lapack_misaligned(func, args, kwargs):
+    args = list(args)
+    for i in range(len(args)):
+        a = args[:]
+        if isinstance(a[i], np.ndarray):
+            # Try misaligning a[i]
+            aa = np.zeros(a[i].size*a[i].dtype.itemsize+8, dtype=np.uint8)
+            aa = np.frombuffer(aa.data, offset=4, count=a[i].size,
+                               dtype=a[i].dtype)
+            aa.shape = a[i].shape
+            aa[...] = a[i]
+            a[i] = aa
+            func(*a, **kwargs)
+            if len(a[i].shape) > 1:
+                a[i] = a[i].T
+                func(*a, **kwargs)
+
+
+@pytest.mark.xfail(run=False,
+                   reason="Ticket #1152, triggers a segfault in rare cases.")
+def test_lapack_misaligned():
+    M = np.eye(10, dtype=float)
+    R = np.arange(100)
+    R.shape = 10, 10
+    S = np.arange(20000, dtype=np.uint8)
+    S = np.frombuffer(S.data, offset=4, count=100, dtype=float)
+    S.shape = 10, 10
+    b = np.ones(10)
+    LU, piv = lu_factor(S)
+    for (func, args, kwargs) in [
+            (eig, (S,), dict(overwrite_a=True)),  # crash
+            (eigvals, (S,), dict(overwrite_a=True)),  # no crash
+            (lu, (S,), dict(overwrite_a=True)),  # no crash
+            (lu_factor, (S,), dict(overwrite_a=True)),  # no crash
+            (lu_solve, ((LU, piv), b), dict(overwrite_b=True)),
+            (solve, (S, b), dict(overwrite_a=True, overwrite_b=True)),
+            (svd, (M,), dict(overwrite_a=True)),  # no crash
+            (svd, (R,), dict(overwrite_a=True)),  # no crash
+            (svd, (S,), dict(overwrite_a=True)),  # crash
+            (svdvals, (S,), dict()),  # no crash
+            (svdvals, (S,), dict(overwrite_a=True)),  # crash
+            (cholesky, (M,), dict(overwrite_a=True)),  # no crash
+            (qr, (S,), dict(overwrite_a=True)),  # crash
+            (rq, (S,), dict(overwrite_a=True)),  # crash
+            (hessenberg, (S,), dict(overwrite_a=True)),  # crash
+            (schur, (S,), dict(overwrite_a=True)),  # crash
+            ]:
+        check_lapack_misaligned(func, args, kwargs)
+# not properly tested
+# cholesky, rsf2csf, lu_solve, solve, eig_banded, eigvals_banded, eigh, diagsvd
+
+
+class TestOverwrite:
+    def test_eig(self):
+        assert_no_overwrite(eig, [(3, 3)])
+        assert_no_overwrite(eig, [(3, 3), (3, 3)])
+
+    def test_eigh(self):
+        assert_no_overwrite(eigh, [(3, 3)])
+        assert_no_overwrite(eigh, [(3, 3), (3, 3)])
+
+    def test_eig_banded(self):
+        assert_no_overwrite(eig_banded, [(3, 2)])
+
+    def test_eigvals(self):
+        assert_no_overwrite(eigvals, [(3, 3)])
+
+    def test_eigvalsh(self):
+        assert_no_overwrite(eigvalsh, [(3, 3)])
+
+    def test_eigvals_banded(self):
+        assert_no_overwrite(eigvals_banded, [(3, 2)])
+
+    def test_hessenberg(self):
+        assert_no_overwrite(hessenberg, [(3, 3)])
+
+    def test_lu_factor(self):
+        assert_no_overwrite(lu_factor, [(3, 3)])
+
+    def test_lu_solve(self):
+        x = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 8]])
+        xlu = lu_factor(x)
+        assert_no_overwrite(lambda b: lu_solve(xlu, b), [(3,)])
+
+    def test_lu(self):
+        assert_no_overwrite(lu, [(3, 3)])
+
+    def test_qr(self):
+        assert_no_overwrite(qr, [(3, 3)])
+
+    def test_rq(self):
+        assert_no_overwrite(rq, [(3, 3)])
+
+    def test_schur(self):
+        assert_no_overwrite(schur, [(3, 3)])
+
+    def test_schur_complex(self):
+        assert_no_overwrite(lambda a: schur(a, 'complex'), [(3, 3)],
+                            dtypes=[np.float32, np.float64])
+
+    def test_svd(self):
+        assert_no_overwrite(svd, [(3, 3)])
+        assert_no_overwrite(lambda a: svd(a, lapack_driver='gesvd'), [(3, 3)])
+
+    def test_svdvals(self):
+        assert_no_overwrite(svdvals, [(3, 3)])
+
+
+def _check_orth(n, dtype, skip_big=False):
+    X = np.ones((n, 2), dtype=float).astype(dtype)
+
+    eps = np.finfo(dtype).eps
+    tol = 1000 * eps
+
+    Y = orth(X)
+    assert_equal(Y.shape, (n, 1))
+    assert_allclose(Y, Y.mean(), atol=tol)
+
+    Y = orth(X.T)
+    assert_equal(Y.shape, (2, 1))
+    assert_allclose(Y, Y.mean(), atol=tol)
+
+    if n > 5 and not skip_big:
+        rng = np.random.RandomState(1)
+        X = rng.rand(n, 5) @ rng.rand(5, n)
+        X = X + 1e-4 * rng.rand(n, 1) @ rng.rand(1, n)
+        X = X.astype(dtype)
+
+        Y = orth(X, rcond=1e-3)
+        assert_equal(Y.shape, (n, 5))
+
+        Y = orth(X, rcond=1e-6)
+        assert_equal(Y.shape, (n, 5 + 1))
+
+
+@pytest.mark.slow
+@pytest.mark.skipif(np.dtype(np.intp).itemsize < 8,
+                    reason="test only on 64-bit, else too slow")
+def test_orth_memory_efficiency():
+    # Pick n so that 16*n bytes is reasonable but 8*n*n bytes is unreasonable.
+    # Keep in mind that @pytest.mark.slow tests are likely to be running
+    # under configurations that support 4Gb+ memory for tests related to
+    # 32 bit overflow.
+    n = 10*1000*1000
+    try:
+        _check_orth(n, np.float64, skip_big=True)
+    except MemoryError as e:
+        raise AssertionError(
+            'memory error perhaps caused by orth regression'
+        ) from e
+
+
+def test_orth():
+    dtypes = [np.float32, np.float64, np.complex64, np.complex128]
+    sizes = [1, 2, 3, 10, 100]
+    for dt, n in itertools.product(dtypes, sizes):
+        _check_orth(n, dt)
+
+@pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+def test_orth_empty(dt):
+    a = np.empty((0, 0), dtype=dt)
+    a0 = np.eye(2, dtype=dt)
+
+    oa = orth(a)
+    assert oa.dtype == orth(a0).dtype
+    assert oa.shape == (0, 0)
+
+
+class TestNullSpace:
+    def test_null_space(self):
+        rng = np.random.RandomState(1)
+
+        dtypes = [np.float32, np.float64, np.complex64, np.complex128]
+        sizes = [1, 2, 3, 10, 100]
+
+        for dt, n in itertools.product(dtypes, sizes):
+            X = np.ones((2, n), dtype=dt)
+
+            eps = np.finfo(dt).eps
+            tol = 1000 * eps
+
+            Y = null_space(X)
+            assert_equal(Y.shape, (n, n-1))
+            assert_allclose(X @ Y, 0, atol=tol)
+
+            Y = null_space(X.T)
+            assert_equal(Y.shape, (2, 1))
+            assert_allclose(X.T @ Y, 0, atol=tol)
+
+            X = rng.randn(1 + n//2, n)
+            Y = null_space(X)
+            assert_equal(Y.shape, (n, n - 1 - n//2))
+            assert_allclose(X @ Y, 0, atol=tol)
+
+            if n > 5:
+                rng = np.random.RandomState(1)
+                X = rng.rand(n, 5) @ rng.rand(5, n)
+                X = X + 1e-4 * rng.rand(n, 1) @ rng.rand(1, n)
+                X = X.astype(dt)
+
+                Y = null_space(X, rcond=1e-3)
+                assert_equal(Y.shape, (n, n - 5))
+
+                Y = null_space(X, rcond=1e-6)
+                assert_equal(Y.shape, (n, n - 6))
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_null_space_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        a0 = np.eye(2, dtype=dt)
+        nsa = null_space(a)
+
+        assert nsa.shape == (0, 0)
+        assert nsa.dtype == null_space(a0).dtype
+
+    @pytest.mark.parametrize("overwrite_a", [True, False])
+    @pytest.mark.parametrize("check_finite", [True, False])
+    @pytest.mark.parametrize("lapack_driver", ["gesdd", "gesvd"])
+    def test_null_space_options(self, overwrite_a, check_finite, lapack_driver):
+        rng = np.random.default_rng(42887289350573064398746)
+        n = 10
+        X = rng.standard_normal((1 + n//2, n))
+        Y = null_space(X.copy(), overwrite_a=overwrite_a, check_finite=check_finite,
+                       lapack_driver=lapack_driver)
+        assert_allclose(X @ Y, 0, atol=np.finfo(X.dtype).eps*100)
+
+
+def test_subspace_angles():
+    H = hadamard(8, float)
+    A = H[:, :3]
+    B = H[:, 3:]
+    assert_allclose(subspace_angles(A, B), [np.pi / 2.] * 3, atol=1e-14)
+    assert_allclose(subspace_angles(B, A), [np.pi / 2.] * 3, atol=1e-14)
+    for x in (A, B):
+        assert_allclose(subspace_angles(x, x), np.zeros(x.shape[1]),
+                        atol=1e-14)
+    # From MATLAB function "subspace", which effectively only returns the
+    # last value that we calculate
+    x = np.array(
+        [[0.537667139546100, 0.318765239858981, 3.578396939725760, 0.725404224946106],  # noqa: E501
+         [1.833885014595086, -1.307688296305273, 2.769437029884877, -0.063054873189656],  # noqa: E501
+         [-2.258846861003648, -0.433592022305684, -1.349886940156521, 0.714742903826096],  # noqa: E501
+         [0.862173320368121, 0.342624466538650, 3.034923466331855, -0.204966058299775]])  # noqa: E501
+    expected = 1.481454682101605
+    assert_allclose(subspace_angles(x[:, :2], x[:, 2:])[0], expected,
+                    rtol=1e-12)
+    assert_allclose(subspace_angles(x[:, 2:], x[:, :2])[0], expected,
+                    rtol=1e-12)
+    expected = 0.746361174247302
+    assert_allclose(subspace_angles(x[:, :2], x[:, [2]]), expected, rtol=1e-12)
+    assert_allclose(subspace_angles(x[:, [2]], x[:, :2]), expected, rtol=1e-12)
+    expected = 0.487163718534313
+    assert_allclose(subspace_angles(x[:, :3], x[:, [3]]), expected, rtol=1e-12)
+    assert_allclose(subspace_angles(x[:, [3]], x[:, :3]), expected, rtol=1e-12)
+    expected = 0.328950515907756
+    assert_allclose(subspace_angles(x[:, :2], x[:, 1:]), [expected, 0],
+                    atol=1e-12)
+    # Degenerate conditions
+    assert_raises(ValueError, subspace_angles, x[0], x)
+    assert_raises(ValueError, subspace_angles, x, x[0])
+    assert_raises(ValueError, subspace_angles, x[:-1], x)
+
+    # Test branch if mask.any is True:
+    A = np.array([[1, 0, 0],
+                  [0, 1, 0],
+                  [0, 0, 1],
+                  [0, 0, 0],
+                  [0, 0, 0]])
+    B = np.array([[1, 0, 0],
+                  [0, 1, 0],
+                  [0, 0, 0],
+                  [0, 0, 0],
+                  [0, 0, 1]])
+    expected = np.array([np.pi/2, 0, 0])
+    assert_allclose(subspace_angles(A, B), expected, rtol=1e-12)
+
+    # Complex
+    # second column in "b" does not affect result, just there so that
+    # b can have more cols than a, and vice-versa (both conditional code paths)
+    a = [[1 + 1j], [0]]
+    b = [[1 - 1j, 0], [0, 1]]
+    assert_allclose(subspace_angles(a, b), 0., atol=1e-14)
+    assert_allclose(subspace_angles(b, a), 0., atol=1e-14)
+
+    # Empty
+    a = np.empty((0, 0))
+    b = np.empty((0, 0))
+    assert_allclose(subspace_angles(a, b), np.empty((0,)))
+    a = np.empty((2, 0))
+    b = np.empty((2, 0))
+    assert_allclose(subspace_angles(a, b), np.empty((0,)))
+    a = np.empty((0, 2))
+    b = np.empty((0, 3))
+    assert_allclose(subspace_angles(a, b), np.empty((0,)))
+
+
+class TestCDF2RDF:
+
+    def matmul(self, a, b):
+        return np.einsum('...ij,...jk->...ik', a, b)
+
+    def assert_eig_valid(self, w, v, x):
+        assert_array_almost_equal(
+            self.matmul(v, w),
+            self.matmul(x, v)
+        )
+
+    def test_single_array0x0real(self):
+        # eig doesn't support 0x0 in old versions of numpy
+        X = np.empty((0, 0))
+        w, v = np.empty(0), np.empty((0, 0))
+        wr, vr = cdf2rdf(w, v)
+        self.assert_eig_valid(wr, vr, X)
+
+    def test_single_array2x2_real(self):
+        X = np.array([[1, 2], [3, -1]])
+        w, v = np.linalg.eig(X)
+        wr, vr = cdf2rdf(w, v)
+        self.assert_eig_valid(wr, vr, X)
+
+    def test_single_array2x2_complex(self):
+        X = np.array([[1, 2], [-2, 1]])
+        w, v = np.linalg.eig(X)
+        wr, vr = cdf2rdf(w, v)
+        self.assert_eig_valid(wr, vr, X)
+
+    def test_single_array3x3_real(self):
+        X = np.array([[1, 2, 3], [1, 2, 3], [2, 5, 6]])
+        w, v = np.linalg.eig(X)
+        wr, vr = cdf2rdf(w, v)
+        self.assert_eig_valid(wr, vr, X)
+
+    def test_single_array3x3_complex(self):
+        X = np.array([[1, 2, 3], [0, 4, 5], [0, -5, 4]])
+        w, v = np.linalg.eig(X)
+        wr, vr = cdf2rdf(w, v)
+        self.assert_eig_valid(wr, vr, X)
+
+    def test_random_1d_stacked_arrays(self):
+        # cannot test M == 0 due to bug in old numpy
+        for M in range(1, 7):
+            np.random.seed(999999999)
+            X = np.random.rand(100, M, M)
+            w, v = np.linalg.eig(X)
+            wr, vr = cdf2rdf(w, v)
+            self.assert_eig_valid(wr, vr, X)
+
+    def test_random_2d_stacked_arrays(self):
+        # cannot test M == 0 due to bug in old numpy
+        for M in range(1, 7):
+            X = np.random.rand(10, 10, M, M)
+            w, v = np.linalg.eig(X)
+            wr, vr = cdf2rdf(w, v)
+            self.assert_eig_valid(wr, vr, X)
+
+    def test_low_dimensionality_error(self):
+        w, v = np.empty(()), np.array((2,))
+        assert_raises(ValueError, cdf2rdf, w, v)
+
+    def test_not_square_error(self):
+        # Check that passing a non-square array raises a ValueError.
+        w, v = np.arange(3), np.arange(6).reshape(3, 2)
+        assert_raises(ValueError, cdf2rdf, w, v)
+
+    def test_swapped_v_w_error(self):
+        # Check that exchanging places of w and v raises ValueError.
+        X = np.array([[1, 2, 3], [0, 4, 5], [0, -5, 4]])
+        w, v = np.linalg.eig(X)
+        assert_raises(ValueError, cdf2rdf, v, w)
+
+    def test_non_associated_error(self):
+        # Check that passing non-associated eigenvectors raises a ValueError.
+        w, v = np.arange(3), np.arange(16).reshape(4, 4)
+        assert_raises(ValueError, cdf2rdf, w, v)
+
+    def test_not_conjugate_pairs(self):
+        # Check that passing non-conjugate pairs raises a ValueError.
+        X = np.array([[1, 2, 3], [1, 2, 3], [2, 5, 6+1j]])
+        w, v = np.linalg.eig(X)
+        assert_raises(ValueError, cdf2rdf, w, v)
+
+        # different arrays in the stack, so not conjugate
+        X = np.array([
+            [[1, 2, 3], [1, 2, 3], [2, 5, 6+1j]],
+            [[1, 2, 3], [1, 2, 3], [2, 5, 6-1j]],
+        ])
+        w, v = np.linalg.eig(X)
+        assert_raises(ValueError, cdf2rdf, w, v)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cholesky.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cholesky.py
new file mode 100644
index 0000000000000000000000000000000000000000..61bbc7e544f10fc834034fbadd7141f6deb1d423
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cholesky.py
@@ -0,0 +1,268 @@
+import pytest
+import numpy as np
+from numpy.testing import assert_array_almost_equal
+from pytest import raises as assert_raises
+
+from numpy import array, transpose, dot, conjugate, zeros_like, empty
+from numpy.random import random
+from scipy.linalg import (cholesky, cholesky_banded, cho_solve_banded,
+     cho_factor, cho_solve)
+
+from scipy.linalg._testutils import assert_no_overwrite
+
+
+class TestCholesky:
+
+    def test_simple(self):
+        a = [[8, 2, 3], [2, 9, 3], [3, 3, 6]]
+        c = cholesky(a)
+        assert_array_almost_equal(dot(transpose(c), c), a)
+        c = transpose(c)
+        a = dot(c, transpose(c))
+        assert_array_almost_equal(cholesky(a, lower=1), c)
+
+    def test_check_finite(self):
+        a = [[8, 2, 3], [2, 9, 3], [3, 3, 6]]
+        c = cholesky(a, check_finite=False)
+        assert_array_almost_equal(dot(transpose(c), c), a)
+        c = transpose(c)
+        a = dot(c, transpose(c))
+        assert_array_almost_equal(cholesky(a, lower=1, check_finite=False), c)
+
+    def test_simple_complex(self):
+        m = array([[3+1j, 3+4j, 5], [0, 2+2j, 2+7j], [0, 0, 7+4j]])
+        a = dot(transpose(conjugate(m)), m)
+        c = cholesky(a)
+        a1 = dot(transpose(conjugate(c)), c)
+        assert_array_almost_equal(a, a1)
+        c = transpose(c)
+        a = dot(c, transpose(conjugate(c)))
+        assert_array_almost_equal(cholesky(a, lower=1), c)
+
+    def test_random(self):
+        n = 20
+        for k in range(2):
+            m = random([n, n])
+            for i in range(n):
+                m[i, i] = 20*(.1+m[i, i])
+            a = dot(transpose(m), m)
+            c = cholesky(a)
+            a1 = dot(transpose(c), c)
+            assert_array_almost_equal(a, a1)
+            c = transpose(c)
+            a = dot(c, transpose(c))
+            assert_array_almost_equal(cholesky(a, lower=1), c)
+
+    def test_random_complex(self):
+        n = 20
+        for k in range(2):
+            m = random([n, n])+1j*random([n, n])
+            for i in range(n):
+                m[i, i] = 20*(.1+abs(m[i, i]))
+            a = dot(transpose(conjugate(m)), m)
+            c = cholesky(a)
+            a1 = dot(transpose(conjugate(c)), c)
+            assert_array_almost_equal(a, a1)
+            c = transpose(c)
+            a = dot(c, transpose(conjugate(c)))
+            assert_array_almost_equal(cholesky(a, lower=1), c)
+
+    @pytest.mark.xslow
+    def test_int_overflow(self):
+       # regression test for
+       # https://github.com/scipy/scipy/issues/17436
+       # the problem was an int overflow in zeroing out
+       # the unused triangular part
+       n = 47_000
+       x = np.eye(n, dtype=np.float64, order='F')
+       x[:4, :4] = np.array([[4, -2, 3, -1],
+                             [-2, 4, -3, 1],
+                             [3, -3, 5, 0],
+                             [-1, 1, 0, 5]])
+
+       cholesky(x, check_finite=False, overwrite_a=True)  # should not segfault
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt, dt_b):
+        a = empty((0, 0), dtype=dt)
+
+        c = cholesky(a)
+        assert c.shape == (0, 0)
+        assert c.dtype == cholesky(np.eye(2, dtype=dt)).dtype
+
+        c_and_lower = (c, True)
+        b = np.asarray([], dtype=dt_b)
+        x = cho_solve(c_and_lower, b)
+        assert x.shape == (0,)
+        assert x.dtype == cho_solve((np.eye(2, dtype=dt), True),
+                                     np.ones(2, dtype=dt_b)).dtype
+
+        b = empty((0, 0), dtype=dt_b)
+        x = cho_solve(c_and_lower, b)
+        assert x.shape == (0, 0)
+        assert x.dtype == cho_solve((np.eye(2, dtype=dt), True),
+                                     np.ones(2, dtype=dt_b)).dtype
+
+        a1 = array([])
+        a2 = array([[]])
+        a3 = []
+        a4 = [[]]
+        for x in ([a1, a2, a3, a4]):
+            assert_raises(ValueError, cholesky, x)
+
+
+class TestCholeskyBanded:
+    """Tests for cholesky_banded() and cho_solve_banded."""
+
+    def test_check_finite(self):
+        # Symmetric positive definite banded matrix `a`
+        a = array([[4.0, 1.0, 0.0, 0.0],
+                   [1.0, 4.0, 0.5, 0.0],
+                   [0.0, 0.5, 4.0, 0.2],
+                   [0.0, 0.0, 0.2, 4.0]])
+        # Banded storage form of `a`.
+        ab = array([[-1.0, 1.0, 0.5, 0.2],
+                    [4.0, 4.0, 4.0, 4.0]])
+        c = cholesky_banded(ab, lower=False, check_finite=False)
+        ufac = zeros_like(a)
+        ufac[list(range(4)), list(range(4))] = c[-1]
+        ufac[(0, 1, 2), (1, 2, 3)] = c[0, 1:]
+        assert_array_almost_equal(a, dot(ufac.T, ufac))
+
+        b = array([0.0, 0.5, 4.2, 4.2])
+        x = cho_solve_banded((c, False), b, check_finite=False)
+        assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
+
+    def test_upper_real(self):
+        # Symmetric positive definite banded matrix `a`
+        a = array([[4.0, 1.0, 0.0, 0.0],
+                   [1.0, 4.0, 0.5, 0.0],
+                   [0.0, 0.5, 4.0, 0.2],
+                   [0.0, 0.0, 0.2, 4.0]])
+        # Banded storage form of `a`.
+        ab = array([[-1.0, 1.0, 0.5, 0.2],
+                    [4.0, 4.0, 4.0, 4.0]])
+        c = cholesky_banded(ab, lower=False)
+        ufac = zeros_like(a)
+        ufac[list(range(4)), list(range(4))] = c[-1]
+        ufac[(0, 1, 2), (1, 2, 3)] = c[0, 1:]
+        assert_array_almost_equal(a, dot(ufac.T, ufac))
+
+        b = array([0.0, 0.5, 4.2, 4.2])
+        x = cho_solve_banded((c, False), b)
+        assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
+
+    def test_upper_complex(self):
+        # Hermitian positive definite banded matrix `a`
+        a = array([[4.0, 1.0, 0.0, 0.0],
+                   [1.0, 4.0, 0.5, 0.0],
+                   [0.0, 0.5, 4.0, -0.2j],
+                   [0.0, 0.0, 0.2j, 4.0]])
+        # Banded storage form of `a`.
+        ab = array([[-1.0, 1.0, 0.5, -0.2j],
+                    [4.0, 4.0, 4.0, 4.0]])
+        c = cholesky_banded(ab, lower=False)
+        ufac = zeros_like(a)
+        ufac[list(range(4)), list(range(4))] = c[-1]
+        ufac[(0, 1, 2), (1, 2, 3)] = c[0, 1:]
+        assert_array_almost_equal(a, dot(ufac.conj().T, ufac))
+
+        b = array([0.0, 0.5, 4.0-0.2j, 0.2j + 4.0])
+        x = cho_solve_banded((c, False), b)
+        assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
+
+    def test_lower_real(self):
+        # Symmetric positive definite banded matrix `a`
+        a = array([[4.0, 1.0, 0.0, 0.0],
+                   [1.0, 4.0, 0.5, 0.0],
+                   [0.0, 0.5, 4.0, 0.2],
+                   [0.0, 0.0, 0.2, 4.0]])
+        # Banded storage form of `a`.
+        ab = array([[4.0, 4.0, 4.0, 4.0],
+                    [1.0, 0.5, 0.2, -1.0]])
+        c = cholesky_banded(ab, lower=True)
+        lfac = zeros_like(a)
+        lfac[list(range(4)), list(range(4))] = c[0]
+        lfac[(1, 2, 3), (0, 1, 2)] = c[1, :3]
+        assert_array_almost_equal(a, dot(lfac, lfac.T))
+
+        b = array([0.0, 0.5, 4.2, 4.2])
+        x = cho_solve_banded((c, True), b)
+        assert_array_almost_equal(x, [0.0, 0.0, 1.0, 1.0])
+
+    def test_lower_complex(self):
+        # Hermitian positive definite banded matrix `a`
+        a = array([[4.0, 1.0, 0.0, 0.0],
+                   [1.0, 4.0, 0.5, 0.0],
+                   [0.0, 0.5, 4.0, -0.2j],
+                   [0.0, 0.0, 0.2j, 4.0]])
+        # Banded storage form of `a`.
+        ab = array([[4.0, 4.0, 4.0, 4.0],
+                    [1.0, 0.5, 0.2j, -1.0]])
+        c = cholesky_banded(ab, lower=True)
+        lfac = zeros_like(a)
+        lfac[list(range(4)), list(range(4))] = c[0]
+        lfac[(1, 2, 3), (0, 1, 2)] = c[1, :3]
+        assert_array_almost_equal(a, dot(lfac, lfac.conj().T))
+
+        b = array([0.0, 0.5j, 3.8j, 3.8])
+        x = cho_solve_banded((c, True), b)
+        assert_array_almost_equal(x, [0.0, 0.0, 1.0j, 1.0])
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt, dt_b):
+        ab = empty((0, 0), dtype=dt)
+
+        cb = cholesky_banded(ab)
+        assert cb.shape == (0, 0)
+
+        m = cholesky_banded(np.array([[0, 0], [1, 1]], dtype=dt))
+        assert cb.dtype == m.dtype
+
+        cb_and_lower = (cb, True)
+        b = np.asarray([], dtype=dt_b)
+        x = cho_solve_banded(cb_and_lower, b)
+        assert x.shape == (0,)
+
+        dtype_nonempty = cho_solve_banded((m, True), np.ones(2, dtype=dt_b)).dtype
+        assert x.dtype == dtype_nonempty
+
+        b = empty((0, 0), dtype=dt_b)
+        x = cho_solve_banded(cb_and_lower, b)
+        assert x.shape == (0, 0)
+        assert x.dtype == dtype_nonempty
+
+
+class TestOverwrite:
+    def test_cholesky(self):
+        assert_no_overwrite(cholesky, [(3, 3)])
+
+    def test_cho_factor(self):
+        assert_no_overwrite(cho_factor, [(3, 3)])
+
+    def test_cho_solve(self):
+        x = array([[2, -1, 0], [-1, 2, -1], [0, -1, 2]])
+        xcho = cho_factor(x)
+        assert_no_overwrite(lambda b: cho_solve(xcho, b), [(3,)])
+
+    def test_cholesky_banded(self):
+        assert_no_overwrite(cholesky_banded, [(2, 3)])
+
+    def test_cho_solve_banded(self):
+        x = array([[0, -1, -1], [2, 2, 2]])
+        xcho = cholesky_banded(x)
+        assert_no_overwrite(lambda b: cho_solve_banded((xcho, False), b),
+                            [(3,)])
+
+class TestChoFactor:
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        x, lower = cho_factor(a)
+
+        assert x.shape == (0, 0)
+
+        xx, lower = cho_factor(np.eye(2, dtype=dt))
+        assert x.dtype == xx.dtype
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cossin.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cossin.py
new file mode 100644
index 0000000000000000000000000000000000000000..df112f0e4cf75d03d2787c24306665b7027967ee
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_cossin.py
@@ -0,0 +1,300 @@
+import pytest
+import numpy as np
+from numpy.random import default_rng
+from numpy.testing import assert_allclose
+
+from scipy import linalg
+from scipy.linalg.lapack import _compute_lwork
+from scipy.stats import ortho_group, unitary_group
+from scipy.linalg import cossin, get_lapack_funcs
+
+REAL_DTYPES = (np.float32, np.float64)
+COMPLEX_DTYPES = (np.complex64, np.complex128)
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+@pytest.mark.parametrize('dtype_', DTYPES)
+@pytest.mark.parametrize('m, p, q',
+                         [
+                             (2, 1, 1),
+                             (3, 2, 1),
+                             (3, 1, 2),
+                             (4, 2, 2),
+                             (4, 1, 2),
+                             (40, 12, 20),
+                             (40, 30, 1),
+                             (40, 1, 30),
+                             (100, 50, 1),
+                             (100, 50, 50),
+                         ])
+@pytest.mark.parametrize('swap_sign', [True, False])
+def test_cossin(dtype_, m, p, q, swap_sign):
+    rng = default_rng(1708093570726217)
+    if dtype_ in COMPLEX_DTYPES:
+        x = np.array(unitary_group.rvs(m, random_state=rng), dtype=dtype_)
+    else:
+        x = np.array(ortho_group.rvs(m, random_state=rng), dtype=dtype_)
+
+    u, cs, vh = cossin(x, p, q,
+                       swap_sign=swap_sign)
+    assert_allclose(x, u @ cs @ vh, rtol=0., atol=m*1e3*np.finfo(dtype_).eps)
+    assert u.dtype == dtype_
+    # Test for float32 or float 64
+    assert cs.dtype == np.real(u).dtype
+    assert vh.dtype == dtype_
+
+    u, cs, vh = cossin([x[:p, :q], x[:p, q:], x[p:, :q], x[p:, q:]],
+                       swap_sign=swap_sign)
+    assert_allclose(x, u @ cs @ vh, rtol=0., atol=m*1e3*np.finfo(dtype_).eps)
+    assert u.dtype == dtype_
+    assert cs.dtype == np.real(u).dtype
+    assert vh.dtype == dtype_
+
+    _, cs2, vh2 = cossin(x, p, q,
+                         compute_u=False,
+                         swap_sign=swap_sign)
+    assert_allclose(cs, cs2, rtol=0., atol=10*np.finfo(dtype_).eps)
+    assert_allclose(vh, vh2, rtol=0., atol=10*np.finfo(dtype_).eps)
+
+    u2, cs2, _ = cossin(x, p, q,
+                        compute_vh=False,
+                        swap_sign=swap_sign)
+    assert_allclose(u, u2, rtol=0., atol=10*np.finfo(dtype_).eps)
+    assert_allclose(cs, cs2, rtol=0., atol=10*np.finfo(dtype_).eps)
+
+    _, cs2, _ = cossin(x, p, q,
+                       compute_u=False,
+                       compute_vh=False,
+                       swap_sign=swap_sign)
+    assert_allclose(cs, cs2, rtol=0., atol=10*np.finfo(dtype_).eps)
+
+
+def test_cossin_mixed_types():
+    rng = default_rng(1708093736390459)
+    x = np.array(ortho_group.rvs(4, random_state=rng), dtype=np.float64)
+    u, cs, vh = cossin([x[:2, :2],
+                        np.array(x[:2, 2:], dtype=np.complex128),
+                        x[2:, :2],
+                        x[2:, 2:]])
+
+    assert u.dtype == np.complex128
+    assert cs.dtype == np.float64
+    assert vh.dtype == np.complex128
+    assert_allclose(x, u @ cs @ vh, rtol=0.,
+                    atol=1e4 * np.finfo(np.complex128).eps)
+
+
+def test_cossin_error_incorrect_subblocks():
+    with pytest.raises(ValueError, match="be due to missing p, q arguments."):
+        cossin(([1, 2], [3, 4, 5], [6, 7], [8, 9, 10]))
+
+
+def test_cossin_error_empty_subblocks():
+    with pytest.raises(ValueError, match="x11.*empty"):
+        cossin(([], [], [], []))
+    with pytest.raises(ValueError, match="x12.*empty"):
+        cossin(([1, 2], [], [6, 7], [8, 9, 10]))
+    with pytest.raises(ValueError, match="x21.*empty"):
+        cossin(([1, 2], [3, 4, 5], [], [8, 9, 10]))
+    with pytest.raises(ValueError, match="x22.*empty"):
+        cossin(([1, 2], [3, 4, 5], [2], []))
+
+
+def test_cossin_error_missing_partitioning():
+    with pytest.raises(ValueError, match=".*exactly four arrays.* got 2"):
+        cossin(unitary_group.rvs(2))
+
+    with pytest.raises(ValueError, match=".*might be due to missing p, q"):
+        cossin(unitary_group.rvs(4))
+
+
+def test_cossin_error_non_iterable():
+    with pytest.raises(ValueError, match="containing the subblocks of X"):
+        cossin(12j)
+
+
+def test_cossin_error_non_square():
+    with pytest.raises(ValueError, match="only supports square"):
+        cossin(np.array([[1, 2]]), 1, 1)
+
+
+def test_cossin_error_partitioning():
+    x = np.array(ortho_group.rvs(4), dtype=np.float64)
+    with pytest.raises(ValueError, match="invalid p=0.*0= m) or (q >= m):
+        pytest.skip("`0 < p < m` and `0 < q < m` must hold")
+
+    # Generate unitary input
+    rng = np.random.default_rng(329548272348596421)
+    X = unitary_group.rvs(m, random_state=rng)
+    np.testing.assert_allclose(X @ X.conj().T, np.eye(m), atol=1e-15)
+
+    # Perform the decomposition
+    u0, cs0, vh0 = linalg.cossin(X, p=p, q=q, separate=True, swap_sign=swap_sign)
+    u1, u2 = u0
+    v1, v2 = vh0
+    v1, v2 = v1.conj().T, v2.conj().T
+
+    # "U1, U2, V1, V2 are square orthogonal/unitary matrices
+    # of dimensions (p,p), (m-p,m-p), (q,q), and (m-q,m-q) respectively"
+    np.testing.assert_allclose(u1 @ u1.conj().T, np.eye(p), atol=1e-13)
+    np.testing.assert_allclose(u2 @ u2.conj().T, np.eye(m-p), atol=1e-13)
+    np.testing.assert_allclose(v1 @ v1.conj().T, np.eye(q), atol=1e-13)
+    np.testing.assert_allclose(v2 @ v2.conj().T, np.eye(m-q), atol=1e-13)
+
+    # "and C and S are (r, r) nonnegative diagonal matrices..."
+    C = np.diag(np.cos(cs0))
+    S = np.diag(np.sin(cs0))
+    # "...satisfying C^2 + S^2 = I where r = min(p, m-p, q, m-q)."
+    r = min(p, m-p, q, m-q)
+    np.testing.assert_allclose(C**2 + S**2, np.eye(r))
+
+    # "Moreover, the rank of the identity matrices are
+    # min(p, q) - r, min(p, m - q) - r, min(m - p, q) - r,
+    # and min(m - p, m - q) - r respectively."
+    I11 = np.eye(min(p, q) - r)
+    I12 = np.eye(min(p, m - q) - r)
+    I21 = np.eye(min(m - p, q) - r)
+    I22 = np.eye(min(m - p, m - q) - r)
+
+    # From:
+    #                            ┌                   ┐
+    #                            │ I  0  0 │ 0  0  0 │
+    # ┌           ┐   ┌         ┐│ 0  C  0 │ 0 -S  0 │┌         ┐*
+    # │ X11 │ X12 │   │ U1 │    ││ 0  0  0 │ 0  0 -I ││ V1 │    │
+    # │ ────┼──── │ = │────┼────││─────────┼─────────││────┼────│
+    # │ X21 │ X22 │   │    │ U2 ││ 0  0  0 │ I  0  0 ││    │ V2 │
+    # └           ┘   └         ┘│ 0  S  0 │ 0  C  0 │└         ┘
+    #                            │ 0  0  I │ 0  0  0 │
+    #                            └                   ┘
+
+    # We can see that U and V are block diagonal matrices like so:
+    U = linalg.block_diag(u1, u2)
+    V = linalg.block_diag(v1, v2)
+
+    # And the center matrix, which we'll call Q here, must be:
+    Q11 = np.zeros((u1.shape[1], v1.shape[0]))
+    IC11 = linalg.block_diag(I11, C)
+    Q11[:IC11.shape[0], :IC11.shape[1]] = IC11
+
+    Q12 = np.zeros((u1.shape[1], v2.shape[0]))
+    SI12 = linalg.block_diag(S, I12) if swap_sign else linalg.block_diag(-S, -I12)
+    Q12[-SI12.shape[0]:, -SI12.shape[1]:] = SI12
+
+    Q21 = np.zeros((u2.shape[1], v1.shape[0]))
+    SI21 = linalg.block_diag(-S, -I21) if swap_sign else linalg.block_diag(S, I21)
+    Q21[-SI21.shape[0]:, -SI21.shape[1]:] = SI21
+
+    Q22 = np.zeros((u2.shape[1], v2.shape[0]))
+    IC22 = linalg.block_diag(I22, C)
+    Q22[:IC22.shape[0], :IC22.shape[1]] = IC22
+
+    Q = np.block([[Q11, Q12], [Q21, Q22]])
+
+    # Confirm that `cossin` decomposes `X` as shown
+    np.testing.assert_allclose(X, U @ Q @ V.conj().T)
+
+    # And check that `separate=False` agrees
+    U0, CS0, Vh0 = linalg.cossin(X, p=p, q=q, swap_sign=swap_sign)
+    np.testing.assert_allclose(U, U0)
+    np.testing.assert_allclose(Q, CS0)
+    np.testing.assert_allclose(V, Vh0.conj().T)
+
+    # Confirm that `compute_u`/`compute_vh` don't affect the results
+    kwargs = dict(p=p, q=q, swap_sign=swap_sign)
+
+    # `compute_u=False`
+    u, cs, vh = linalg.cossin(X, separate=True, compute_u=False, **kwargs)
+    assert u[0].shape == (0, 0)  # probably not ideal, but this is what it does
+    assert u[1].shape == (0, 0)
+    assert_allclose(cs, cs0, rtol=1e-15)
+    assert_allclose(vh[0], vh0[0], rtol=1e-15)
+    assert_allclose(vh[1], vh0[1], rtol=1e-15)
+
+    U, CS, Vh = linalg.cossin(X, compute_u=False, **kwargs)
+    assert U.shape == (0, 0)
+    assert_allclose(CS, CS0, rtol=1e-15)
+    assert_allclose(Vh, Vh0, rtol=1e-15)
+
+    # `compute_vh=False`
+    u, cs, vh = linalg.cossin(X, separate=True, compute_vh=False, **kwargs)
+    assert_allclose(u[0], u[0], rtol=1e-15)
+    assert_allclose(u[1], u[1], rtol=1e-15)
+    assert_allclose(cs, cs0, rtol=1e-15)
+    assert vh[0].shape == (0, 0)
+    assert vh[1].shape == (0, 0)
+
+    U, CS, Vh = linalg.cossin(X, compute_vh=False, **kwargs)
+    assert_allclose(U, U0, rtol=1e-15)
+    assert_allclose(CS, CS0, rtol=1e-15)
+    assert Vh.shape == (0, 0)
+
+    # `compute_u=False, compute_vh=False`
+    u, cs, vh = linalg.cossin(X, separate=True, compute_u=False,
+                              compute_vh=False, **kwargs)
+    assert u[0].shape == (0, 0)
+    assert u[1].shape == (0, 0)
+    assert_allclose(cs, cs0, rtol=1e-15)
+    assert vh[0].shape == (0, 0)
+    assert vh[1].shape == (0, 0)
+
+    U, CS, Vh = linalg.cossin(X, compute_u=False, compute_vh=False, **kwargs)
+    assert U.shape == (0, 0)
+    assert_allclose(CS, CS0, rtol=1e-15)
+    assert Vh.shape == (0, 0)
+
+
+def test_indexing_bug_gh19365():
+    # Regression test for gh-19365, which reported a bug with `separate=False`
+    rng = np.random.default_rng(32954827234421)
+    m = rng.integers(50, high=100)
+    p = rng.integers(10, 40)  # always p < m
+    q = rng.integers(m - p + 1, m - 1)  # always m-p < q < m
+    X = unitary_group.rvs(m, random_state=rng)  # random unitary matrix
+    U, D, Vt = linalg.cossin(X, p=p, q=q, separate=False)
+    assert np.allclose(U @ D @ Vt, X)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_ldl.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_ldl.py
new file mode 100644
index 0000000000000000000000000000000000000000..2d74a746b4dd7bb6367500b4c893aa9f767de51f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_ldl.py
@@ -0,0 +1,137 @@
+from numpy.testing import assert_array_almost_equal, assert_allclose, assert_
+from numpy import (array, eye, zeros, empty_like, empty, tril_indices_from,
+                   tril, triu_indices_from, spacing, float32, float64,
+                   complex64, complex128)
+from numpy.random import rand, randint, seed
+from scipy.linalg import ldl
+from scipy._lib._util import ComplexWarning
+import pytest
+from pytest import raises as assert_raises, warns
+
+
+@pytest.mark.thread_unsafe
+def test_args():
+    A = eye(3)
+    # Nonsquare array
+    assert_raises(ValueError, ldl, A[:, :2])
+    # Complex matrix with imaginary diagonal entries with "hermitian=True"
+    with warns(ComplexWarning):
+        ldl(A*1j)
+
+
+def test_empty_array():
+    a = empty((0, 0), dtype=complex)
+    l, d, p = ldl(empty((0, 0)))
+    assert_array_almost_equal(l, empty_like(a))
+    assert_array_almost_equal(d, empty_like(a))
+    assert_array_almost_equal(p, array([], dtype=int))
+
+
+def test_simple():
+    a = array([[-0.39-0.71j, 5.14-0.64j, -7.86-2.96j, 3.80+0.92j],
+               [5.14-0.64j, 8.86+1.81j, -3.52+0.58j, 5.32-1.59j],
+               [-7.86-2.96j, -3.52+0.58j, -2.83-0.03j, -1.54-2.86j],
+               [3.80+0.92j, 5.32-1.59j, -1.54-2.86j, -0.56+0.12j]])
+    b = array([[5., 10, 1, 18],
+               [10., 2, 11, 1],
+               [1., 11, 19, 9],
+               [18., 1, 9, 0]])
+    c = array([[52., 97, 112, 107, 50],
+               [97., 114, 89, 98, 13],
+               [112., 89, 64, 33, 6],
+               [107., 98, 33, 60, 73],
+               [50., 13, 6, 73, 77]])
+
+    d = array([[2., 2, -4, 0, 4],
+               [2., -2, -2, 10, -8],
+               [-4., -2, 6, -8, -4],
+               [0., 10, -8, 6, -6],
+               [4., -8, -4, -6, 10]])
+    e = array([[-1.36+0.00j, 0+0j, 0+0j, 0+0j],
+               [1.58-0.90j, -8.87+0j, 0+0j, 0+0j],
+               [2.21+0.21j, -1.84+0.03j, -4.63+0j, 0+0j],
+               [3.91-1.50j, -1.78-1.18j, 0.11-0.11j, -1.84+0.00j]])
+    for x in (b, c, d):
+        l, d, p = ldl(x)
+        assert_allclose(l.dot(d).dot(l.T), x, atol=spacing(1000.), rtol=0)
+
+        u, d, p = ldl(x, lower=False)
+        assert_allclose(u.dot(d).dot(u.T), x, atol=spacing(1000.), rtol=0)
+
+    l, d, p = ldl(a, hermitian=False)
+    assert_allclose(l.dot(d).dot(l.T), a, atol=spacing(1000.), rtol=0)
+
+    u, d, p = ldl(a, lower=False, hermitian=False)
+    assert_allclose(u.dot(d).dot(u.T), a, atol=spacing(1000.), rtol=0)
+
+    # Use upper part for the computation and use the lower part for comparison
+    l, d, p = ldl(e.conj().T, lower=0)
+    assert_allclose(tril(l.dot(d).dot(l.conj().T)-e), zeros((4, 4)),
+                    atol=spacing(1000.), rtol=0)
+
+
+def test_permutations():
+    seed(1234)
+    for _ in range(10):
+        n = randint(1, 100)
+        # Random real/complex array
+        x = rand(n, n) if randint(2) else rand(n, n) + rand(n, n)*1j
+        x = x + x.conj().T
+        x += eye(n)*randint(5, 1e6)
+        l_ind = tril_indices_from(x, k=-1)
+        u_ind = triu_indices_from(x, k=1)
+
+        # Test whether permutations lead to a triangular array
+        u, d, p = ldl(x, lower=0)
+        # lower part should be zero
+        assert_(not any(u[p, :][l_ind]), f'Spin {_} failed')
+
+        l, d, p = ldl(x, lower=1)
+        # upper part should be zero
+        assert_(not any(l[p, :][u_ind]), f'Spin {_} failed')
+
+
+@pytest.mark.parametrize("dtype", [float32, float64])
+@pytest.mark.parametrize("n", [30, 150])
+def test_ldl_type_size_combinations_real(n, dtype):
+    seed(1234)
+    msg = (f"Failed for size: {n}, dtype: {dtype}")
+
+    x = rand(n, n).astype(dtype)
+    x = x + x.T
+    x += eye(n, dtype=dtype)*dtype(randint(5, 1e6))
+
+    l, d1, p = ldl(x)
+    u, d2, p = ldl(x, lower=0)
+    rtol = 1e-4 if dtype is float32 else 1e-10
+    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg)
+    assert_allclose(u.dot(d2).dot(u.T), x, rtol=rtol, err_msg=msg)
+
+
+@pytest.mark.parametrize("dtype", [complex64, complex128])
+@pytest.mark.parametrize("n", [30, 150])
+def test_ldl_type_size_combinations_complex(n, dtype):
+    seed(1234)
+    msg1 = (f"Her failed for size: {n}, dtype: {dtype}")
+    msg2 = (f"Sym failed for size: {n}, dtype: {dtype}")
+
+    # Complex hermitian upper/lower
+    x = (rand(n, n)+1j*rand(n, n)).astype(dtype)
+    x = x+x.conj().T
+    x += eye(n, dtype=dtype)*dtype(randint(5, 1e6))
+
+    l, d1, p = ldl(x)
+    u, d2, p = ldl(x, lower=0)
+    rtol = 2e-4 if dtype is complex64 else 1e-10
+    assert_allclose(l.dot(d1).dot(l.conj().T), x, rtol=rtol, err_msg=msg1)
+    assert_allclose(u.dot(d2).dot(u.conj().T), x, rtol=rtol, err_msg=msg1)
+
+    # Complex symmetric upper/lower
+    x = (rand(n, n)+1j*rand(n, n)).astype(dtype)
+    x = x+x.T
+    x += eye(n, dtype=dtype)*dtype(randint(5, 1e6))
+
+    l, d1, p = ldl(x, hermitian=0)
+    u, d2, p = ldl(x, lower=0, hermitian=0)
+    assert_allclose(l.dot(d1).dot(l.T), x, rtol=rtol, err_msg=msg2)
+    assert_allclose(u.dot(d2).dot(u.T), x, rtol=rtol, err_msg=msg2)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_lu.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_lu.py
new file mode 100644
index 0000000000000000000000000000000000000000..da0beccf1f0e66baf4ac4ec80d7ff7129b2df345
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_lu.py
@@ -0,0 +1,308 @@
+import pytest
+from pytest import raises as assert_raises
+
+import numpy as np
+from scipy.linalg import lu, lu_factor, lu_solve, get_lapack_funcs, solve
+from numpy.testing import assert_allclose, assert_array_equal, assert_equal
+
+
+REAL_DTYPES = [np.float32, np.float64]
+COMPLEX_DTYPES = [np.complex64, np.complex128]
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+class TestLU:
+    def setup_method(self):
+        self.rng = np.random.default_rng(1682281250228846)
+
+    def test_old_lu_smoke_tests(self):
+        "Tests from old fortran based lu test suite"
+        a = np.array([[1, 2, 3], [1, 2, 3], [2, 5, 6]])
+        p, l, u = lu(a)
+        result_lu = np.array([[2., 5., 6.], [0.5, -0.5, 0.], [0.5, 1., 0.]])
+        assert_allclose(p, np.rot90(np.eye(3)))
+        assert_allclose(l, np.tril(result_lu, k=-1)+np.eye(3))
+        assert_allclose(u, np.triu(result_lu))
+
+        a = np.array([[1, 2, 3], [1, 2, 3], [2, 5j, 6]])
+        p, l, u = lu(a)
+        result_lu = np.array([[2., 5.j, 6.], [0.5, 2-2.5j, 0.], [0.5, 1., 0.]])
+        assert_allclose(p, np.rot90(np.eye(3)))
+        assert_allclose(l, np.tril(result_lu, k=-1)+np.eye(3))
+        assert_allclose(u, np.triu(result_lu))
+
+        b = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
+        p, l, u = lu(b)
+        assert_allclose(p, np.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]]))
+        assert_allclose(l, np.array([[1, 0, 0], [1/7, 1, 0], [4/7, 0.5, 1]]))
+        assert_allclose(u, np.array([[7, 8, 9], [0, 6/7, 12/7], [0, 0, 0]]),
+                        rtol=0., atol=1e-14)
+
+        cb = np.array([[1.j, 2.j, 3.j], [4j, 5j, 6j], [7j, 8j, 9j]])
+        p, l, u = lu(cb)
+        assert_allclose(p, np.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]]))
+        assert_allclose(l, np.array([[1, 0, 0], [1/7, 1, 0], [4/7, 0.5, 1]]))
+        assert_allclose(u, np.array([[7, 8, 9], [0, 6/7, 12/7], [0, 0, 0]])*1j,
+                        rtol=0., atol=1e-14)
+
+        # Rectangular matrices
+        hrect = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 12, 12]])
+        p, l, u = lu(hrect)
+        assert_allclose(p, np.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]]))
+        assert_allclose(l, np.array([[1, 0, 0], [1/9, 1, 0], [5/9, 0.5, 1]]))
+        assert_allclose(u, np.array([[9, 10, 12, 12], [0, 8/9,  15/9,  24/9],
+                                     [0, 0, -0.5, 0]]), rtol=0., atol=1e-14)
+
+        chrect = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 12, 12]])*1.j
+        p, l, u = lu(chrect)
+        assert_allclose(p, np.array([[0, 1, 0], [0, 0, 1], [1, 0, 0]]))
+        assert_allclose(l, np.array([[1, 0, 0], [1/9, 1, 0], [5/9, 0.5, 1]]))
+        assert_allclose(u, np.array([[9, 10, 12, 12], [0, 8/9,  15/9,  24/9],
+                                     [0, 0, -0.5, 0]])*1j, rtol=0., atol=1e-14)
+
+        vrect = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 12, 12]])
+        p, l, u = lu(vrect)
+        assert_allclose(p, np.eye(4)[[1, 3, 2, 0], :])
+        assert_allclose(l, np.array([[1., 0, 0], [0.1, 1, 0], [0.7, -0.5, 1],
+                                     [0.4, 0.25, 0.5]]))
+        assert_allclose(u, np.array([[10, 12, 12],
+                                     [0, 0.8, 1.8],
+                                     [0, 0,  1.5]]))
+
+        cvrect = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 12, 12]])*1j
+        p, l, u = lu(cvrect)
+        assert_allclose(p, np.eye(4)[[1, 3, 2, 0], :])
+        assert_allclose(l, np.array([[1., 0, 0],
+                                     [0.1, 1, 0],
+                                     [0.7, -0.5, 1],
+                                     [0.4, 0.25, 0.5]]))
+        assert_allclose(u, np.array([[10, 12, 12],
+                                     [0, 0.8, 1.8],
+                                     [0, 0,  1.5]])*1j)
+
+    @pytest.mark.parametrize('shape', [[2, 2], [2, 4], [4, 2], [20, 20],
+                                       [20, 4], [4, 20], [3, 2, 9, 9],
+                                       [2, 2, 17, 5], [2, 2, 11, 7]])
+    def test_simple_lu_shapes_real_complex(self, shape):
+        a = self.rng.uniform(-10., 10., size=shape)
+        p, l, u = lu(a)
+        assert_allclose(a, p @ l @ u)
+        pl, u = lu(a, permute_l=True)
+        assert_allclose(a, pl @ u)
+
+        b = self.rng.uniform(-10., 10., size=shape)*1j
+        b += self.rng.uniform(-10, 10, size=shape)
+        pl, u = lu(b, permute_l=True)
+        assert_allclose(b, pl @ u)
+
+    @pytest.mark.parametrize('shape', [[2, 2], [2, 4], [4, 2], [20, 20],
+                                       [20, 4], [4, 20]])
+    def test_simple_lu_shapes_real_complex_2d_indices(self, shape):
+        a = self.rng.uniform(-10., 10., size=shape)
+        p, l, u = lu(a, p_indices=True)
+        assert_allclose(a, l[p, :] @ u)
+
+    def test_1by1_input_output(self):
+        a = self.rng.random([4, 5, 1, 1], dtype=np.float32)
+        p, l, u = lu(a, p_indices=True)
+        assert_allclose(p, np.zeros(shape=(4, 5, 1), dtype=int))
+        assert_allclose(l, np.ones(shape=(4, 5, 1, 1), dtype=np.float32))
+        assert_allclose(u, a)
+
+        a = self.rng.random([4, 5, 1, 1], dtype=np.float32)
+        p, l, u = lu(a)
+        assert_allclose(p, np.ones(shape=(4, 5, 1, 1), dtype=np.float32))
+        assert_allclose(l, np.ones(shape=(4, 5, 1, 1), dtype=np.float32))
+        assert_allclose(u, a)
+
+        pl, u = lu(a, permute_l=True)
+        assert_allclose(pl, np.ones(shape=(4, 5, 1, 1), dtype=np.float32))
+        assert_allclose(u, a)
+
+        a = self.rng.random([4, 5, 1, 1], dtype=np.float32)*np.complex64(1.j)
+        p, l, u = lu(a)
+        assert_allclose(p, np.ones(shape=(4, 5, 1, 1), dtype=np.complex64))
+        assert_allclose(l, np.ones(shape=(4, 5, 1, 1), dtype=np.complex64))
+        assert_allclose(u, a)
+
+    def test_empty_edge_cases(self):
+        a = np.empty([0, 0])
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(0, 0), dtype=np.float64))
+        assert_allclose(l, np.empty(shape=(0, 0), dtype=np.float64))
+        assert_allclose(u, np.empty(shape=(0, 0), dtype=np.float64))
+
+        a = np.empty([0, 3], dtype=np.float16)
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(0, 0), dtype=np.float32))
+        assert_allclose(l, np.empty(shape=(0, 0), dtype=np.float32))
+        assert_allclose(u, np.empty(shape=(0, 3), dtype=np.float32))
+
+        a = np.empty([3, 0], dtype=np.complex64)
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(0, 0), dtype=np.float32))
+        assert_allclose(l, np.empty(shape=(3, 0), dtype=np.complex64))
+        assert_allclose(u, np.empty(shape=(0, 0), dtype=np.complex64))
+        p, l, u = lu(a, p_indices=True)
+        assert_allclose(p, np.empty(shape=(0,), dtype=int))
+        assert_allclose(l, np.empty(shape=(3, 0), dtype=np.complex64))
+        assert_allclose(u, np.empty(shape=(0, 0), dtype=np.complex64))
+        pl, u = lu(a, permute_l=True)
+        assert_allclose(pl, np.empty(shape=(3, 0), dtype=np.complex64))
+        assert_allclose(u, np.empty(shape=(0, 0), dtype=np.complex64))
+
+        a = np.empty([3, 0, 0], dtype=np.complex64)
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(3, 0, 0), dtype=np.float32))
+        assert_allclose(l, np.empty(shape=(3, 0, 0), dtype=np.complex64))
+        assert_allclose(u, np.empty(shape=(3, 0, 0), dtype=np.complex64))
+
+        a = np.empty([0, 0, 3])
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(0, 0, 0)))
+        assert_allclose(l, np.empty(shape=(0, 0, 0)))
+        assert_allclose(u, np.empty(shape=(0, 0, 3)))
+
+        with assert_raises(ValueError, match='at least two-dimensional'):
+            lu(np.array([]))
+
+        a = np.array([[]])
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(0, 0)))
+        assert_allclose(l, np.empty(shape=(1, 0)))
+        assert_allclose(u, np.empty(shape=(0, 0)))
+
+        a = np.array([[[]]])
+        p, l, u = lu(a)
+        assert_allclose(p, np.empty(shape=(1, 0, 0)))
+        assert_allclose(l, np.empty(shape=(1, 1, 0)))
+        assert_allclose(u, np.empty(shape=(1, 0, 0)))
+
+
+class TestLUFactor:
+    def setup_method(self):
+        self.rng = np.random.default_rng(1682281250228846)
+
+        self.a = np.array([[1, 2, 3], [1, 2, 3], [2, 5, 6]])
+        self.ca = np.array([[1, 2, 3], [1, 2, 3], [2, 5j, 6]])
+        # Those matrices are more robust to detect problems in permutation
+        # matrices than the ones above
+        self.b = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
+        self.cb = np.array([[1j, 2j, 3j], [4j, 5j, 6j], [7j, 8j, 9j]])
+
+        # Rectangular matrices
+        self.hrect = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 12, 12]])
+        self.chrect = np.array([[1, 2, 3, 4], [5, 6, 7, 8],
+                                [9, 10, 12, 12]]) * 1.j
+
+        self.vrect = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 12, 12]])
+        self.cvrect = 1.j * np.array([[1, 2, 3],
+                                      [4, 5, 6],
+                                      [7, 8, 9],
+                                      [10, 12, 12]])
+
+        # Medium sizes matrices
+        self.med = self.rng.random((30, 40))
+        self.cmed = self.rng.random((30, 40)) + 1.j*self.rng.random((30, 40))
+
+    def _test_common_lu_factor(self, data):
+        l_and_u1, piv1 = lu_factor(data)
+        (getrf,) = get_lapack_funcs(("getrf",), (data,))
+        l_and_u2, piv2, _ = getrf(data, overwrite_a=False)
+        assert_allclose(l_and_u1, l_and_u2)
+        assert_allclose(piv1, piv2)
+
+    # Simple tests.
+    # For lu_factor gives a LinAlgWarning because these matrices are singular
+    def test_hrectangular(self):
+        self._test_common_lu_factor(self.hrect)
+
+    def test_vrectangular(self):
+        self._test_common_lu_factor(self.vrect)
+
+    def test_hrectangular_complex(self):
+        self._test_common_lu_factor(self.chrect)
+
+    def test_vrectangular_complex(self):
+        self._test_common_lu_factor(self.cvrect)
+
+    # Bigger matrices
+    def test_medium1(self):
+        """Check lu decomposition on medium size, rectangular matrix."""
+        self._test_common_lu_factor(self.med)
+
+    def test_medium1_complex(self):
+        """Check lu decomposition on medium size, rectangular matrix."""
+        self._test_common_lu_factor(self.cmed)
+
+    def test_check_finite(self):
+        p, l, u = lu(self.a, check_finite=False)
+        assert_allclose(p @ l @ u, self.a)
+
+    def test_simple_known(self):
+        # Ticket #1458
+        for order in ['C', 'F']:
+            A = np.array([[2, 1], [0, 1.]], order=order)
+            LU, P = lu_factor(A)
+            assert_allclose(LU, np.array([[2, 1], [0, 1]]))
+            assert_array_equal(P, np.array([0, 1]))
+
+    @pytest.mark.parametrize("m", [0, 1, 2])
+    @pytest.mark.parametrize("n", [0, 1, 2])
+    @pytest.mark.parametrize('dtype', DTYPES)
+    def test_shape_dtype(self, m, n,  dtype):
+        k = min(m, n)
+
+        a = np.eye(m, n, dtype=dtype)
+        lu, p = lu_factor(a)
+        assert_equal(lu.shape, (m, n))
+        assert_equal(lu.dtype, dtype)
+        assert_equal(p.shape, (k,))
+        assert_equal(p.dtype, np.int32)
+
+    @pytest.mark.parametrize(("m", "n"), [(0, 0), (0, 2), (2, 0)])
+    def test_empty(self, m, n):
+        a = np.zeros((m, n))
+        lu, p = lu_factor(a)
+        assert_allclose(lu, np.empty((m, n)))
+        assert_allclose(p, np.arange(0))
+
+
+class TestLUSolve:
+    def setup_method(self):
+        self.rng = np.random.default_rng(1682281250228846)
+
+    def test_lu(self):
+        a0 = self.rng.random((10, 10))
+        b = self.rng.random((10,))
+
+        for order in ['C', 'F']:
+            a = np.array(a0, order=order)
+            x1 = solve(a, b)
+            lu_a = lu_factor(a)
+            x2 = lu_solve(lu_a, b)
+            assert_allclose(x1, x2)
+
+    def test_check_finite(self):
+        a = self.rng.random((10, 10))
+        b = self.rng.random((10,))
+        x1 = solve(a, b)
+        lu_a = lu_factor(a, check_finite=False)
+        x2 = lu_solve(lu_a, b, check_finite=False)
+        assert_allclose(x1, x2)
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt, dt_b):
+        lu_and_piv = (np.empty((0, 0), dtype=dt), np.array([]))
+        b = np.asarray([], dtype=dt_b)
+        x = lu_solve(lu_and_piv, b)
+        assert x.shape == (0,)
+
+        m = lu_solve((np.eye(2, dtype=dt), [0, 1]), np.ones(2, dtype=dt_b))
+        assert x.dtype == m.dtype
+
+        b = np.empty((0, 0), dtype=dt_b)
+        x = lu_solve(lu_and_piv, b)
+        assert x.shape == (0, 0)
+        assert x.dtype == m.dtype
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_polar.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_polar.py
new file mode 100644
index 0000000000000000000000000000000000000000..607238842b3cc643d9665e40f29e41b15d8951a1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_polar.py
@@ -0,0 +1,110 @@
+import pytest
+import numpy as np
+from numpy.linalg import norm
+from numpy.testing import (assert_, assert_allclose, assert_equal)
+from scipy.linalg import polar, eigh
+
+
+diag2 = np.array([[2, 0], [0, 3]])
+a13 = np.array([[1, 2, 2]])
+
+precomputed_cases = [
+    [[[0]], 'right', [[1]], [[0]]],
+    [[[0]], 'left', [[1]], [[0]]],
+    [[[9]], 'right', [[1]], [[9]]],
+    [[[9]], 'left', [[1]], [[9]]],
+    [diag2, 'right', np.eye(2), diag2],
+    [diag2, 'left', np.eye(2), diag2],
+    [a13, 'right', a13/norm(a13[0]), a13.T.dot(a13)/norm(a13[0])],
+]
+
+verify_cases = [
+    [[1, 2], [3, 4]],
+    [[1, 2, 3]],
+    [[1], [2], [3]],
+    [[1, 2, 3], [3, 4, 0]],
+    [[1, 2], [3, 4], [5, 5]],
+    [[1, 2], [3, 4+5j]],
+    [[1, 2, 3j]],
+    [[1], [2], [3j]],
+    [[1, 2, 3+2j], [3, 4-1j, -4j]],
+    [[1, 2], [3-2j, 4+0.5j], [5, 5]],
+    [[10000, 10, 1], [-1, 2, 3j], [0, 1, 2]],
+    np.empty((0, 0)),
+    np.empty((0, 2)),
+    np.empty((2, 0)),
+]
+
+
+def check_precomputed_polar(a, side, expected_u, expected_p):
+    # Compare the result of the polar decomposition to a
+    # precomputed result.
+    u, p = polar(a, side=side)
+    assert_allclose(u, expected_u, atol=1e-15)
+    assert_allclose(p, expected_p, atol=1e-15)
+
+
+def verify_polar(a):
+    # Compute the polar decomposition, and then verify that
+    # the result has all the expected properties.
+    product_atol = np.sqrt(np.finfo(float).eps)
+
+    aa = np.asarray(a)
+    m, n = aa.shape
+
+    u, p = polar(a, side='right')
+    assert_equal(u.shape, (m, n))
+    assert_equal(p.shape, (n, n))
+    # a = up
+    assert_allclose(u.dot(p), a, atol=product_atol)
+    if m >= n:
+        assert_allclose(u.conj().T.dot(u), np.eye(n), atol=1e-15)
+    else:
+        assert_allclose(u.dot(u.conj().T), np.eye(m), atol=1e-15)
+    # p is Hermitian positive semidefinite.
+    assert_allclose(p.conj().T, p)
+    evals = eigh(p, eigvals_only=True)
+    nonzero_evals = evals[abs(evals) > 1e-14]
+    assert_((nonzero_evals >= 0).all())
+
+    u, p = polar(a, side='left')
+    assert_equal(u.shape, (m, n))
+    assert_equal(p.shape, (m, m))
+    # a = pu
+    assert_allclose(p.dot(u), a, atol=product_atol)
+    if m >= n:
+        assert_allclose(u.conj().T.dot(u), np.eye(n), atol=1e-15)
+    else:
+        assert_allclose(u.dot(u.conj().T), np.eye(m), atol=1e-15)
+    # p is Hermitian positive semidefinite.
+    assert_allclose(p.conj().T, p)
+    evals = eigh(p, eigvals_only=True)
+    nonzero_evals = evals[abs(evals) > 1e-14]
+    assert_((nonzero_evals >= 0).all())
+
+
+def test_precomputed_cases():
+    for a, side, expected_u, expected_p in precomputed_cases:
+        check_precomputed_polar(a, side, expected_u, expected_p)
+
+
+def test_verify_cases():
+    for a in verify_cases:
+        verify_polar(a)
+
+@pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+@pytest.mark.parametrize('shape',  [(0, 0), (0, 2), (2, 0)])
+@pytest.mark.parametrize('side', ['left', 'right'])
+def test_empty(dt, shape, side):
+    a = np.empty(shape, dtype=dt)
+    m, n = shape
+    p_shape = (m, m) if side == 'left' else (n, n)
+
+    u, p = polar(a, side=side)
+    u_n, p_n = polar(np.eye(5, dtype=dt))
+
+    assert_equal(u.dtype, u_n.dtype)
+    assert_equal(p.dtype, p_n.dtype)
+    assert u.shape == shape
+    assert p.shape == p_shape
+    assert np.all(p == 0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_update.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_update.py
new file mode 100644
index 0000000000000000000000000000000000000000..7553e21d61ceaa774d24c48d9d4bc2e3a8e3cc00
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_decomp_update.py
@@ -0,0 +1,1701 @@
+import itertools
+
+import numpy as np
+from numpy.testing import assert_, assert_allclose, assert_equal
+from pytest import raises as assert_raises
+from scipy import linalg
+import scipy.linalg._decomp_update as _decomp_update
+from scipy.linalg._decomp_update import qr_delete, qr_update, qr_insert
+
+def assert_unitary(a, rtol=None, atol=None, assert_sqr=True):
+    if rtol is None:
+        rtol = 10.0 ** -(np.finfo(a.dtype).precision-2)
+    if atol is None:
+        atol = 10*np.finfo(a.dtype).eps
+
+    if assert_sqr:
+        assert_(a.shape[0] == a.shape[1], 'unitary matrices must be square')
+    aTa = np.dot(a.T.conj(), a)
+    assert_allclose(aTa, np.eye(a.shape[1]), rtol=rtol, atol=atol)
+
+def assert_upper_tri(a, rtol=None, atol=None):
+    if rtol is None:
+        rtol = 10.0 ** -(np.finfo(a.dtype).precision-2)
+    if atol is None:
+        atol = 2*np.finfo(a.dtype).eps
+    mask = np.tri(a.shape[0], a.shape[1], -1, np.bool_)
+    assert_allclose(a[mask], 0.0, rtol=rtol, atol=atol)
+
+def check_qr(q, r, a, rtol, atol, assert_sqr=True):
+    assert_unitary(q, rtol, atol, assert_sqr)
+    assert_upper_tri(r, rtol, atol)
+    assert_allclose(q.dot(r), a, rtol=rtol, atol=atol)
+
+def make_strided(arrs):
+    strides = [(3, 7), (2, 2), (3, 4), (4, 2), (5, 4), (2, 3), (2, 1), (4, 5)]
+    kmax = len(strides)
+    k = 0
+    ret = []
+    for a in arrs:
+        if a.ndim == 1:
+            s = strides[k % kmax]
+            k += 1
+            base = np.zeros(s[0]*a.shape[0]+s[1], a.dtype)
+            view = base[s[1]::s[0]]
+            view[...] = a
+        elif a.ndim == 2:
+            s = strides[k % kmax]
+            t = strides[(k+1) % kmax]
+            k += 2
+            base = np.zeros((s[0]*a.shape[0]+s[1], t[0]*a.shape[1]+t[1]),
+                            a.dtype)
+            view = base[s[1]::s[0], t[1]::t[0]]
+            view[...] = a
+        else:
+            raise ValueError('make_strided only works for ndim = 1 or'
+                             ' 2 arrays')
+        ret.append(view)
+    return ret
+
+def negate_strides(arrs):
+    ret = []
+    for a in arrs:
+        b = np.zeros_like(a)
+        if b.ndim == 2:
+            b = b[::-1, ::-1]
+        elif b.ndim == 1:
+            b = b[::-1]
+        else:
+            raise ValueError('negate_strides only works for ndim = 1 or'
+                             ' 2 arrays')
+        b[...] = a
+        ret.append(b)
+    return ret
+
+def nonitemsize_strides(arrs):
+    out = []
+    for a in arrs:
+        a_dtype = a.dtype
+        b = np.zeros(a.shape, [('a', a_dtype), ('junk', 'S1')])
+        c = b.getfield(a_dtype)
+        c[...] = a
+        out.append(c)
+    return out
+
+
+def make_nonnative(arrs):
+    return [a.astype(a.dtype.newbyteorder()) for a in arrs]
+
+
+class BaseQRdeltas:
+    def setup_method(self):
+        self.rtol = 10.0 ** -(np.finfo(self.dtype).precision-2)
+        self.atol = 10 * np.finfo(self.dtype).eps
+
+    def generate(self, type, mode='full'):
+        np.random.seed(29382)
+        shape = {'sqr': (8, 8), 'tall': (12, 7), 'fat': (7, 12),
+                 'Mx1': (8, 1), '1xN': (1, 8), '1x1': (1, 1)}[type]
+        a = np.random.random(shape)
+        if np.iscomplexobj(self.dtype.type(1)):
+            b = np.random.random(shape)
+            a = a + 1j * b
+        a = a.astype(self.dtype)
+        q, r = linalg.qr(a, mode=mode)
+        return a, q, r
+
+class BaseQRdelete(BaseQRdeltas):
+    def test_sqr_1_row(self):
+        a, q, r = self.generate('sqr')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_p_row(self):
+        a, q, r = self.generate('sqr')
+        for ndel in range(2, 6):
+            for row in range(a.shape[0]-ndel):
+                q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+                a1 = np.delete(a, slice(row, row+ndel), 0)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_1_col(self):
+        a, q, r = self.generate('sqr')
+        for col in range(r.shape[1]):
+            q1, r1 = qr_delete(q, r, col, which='col', overwrite_qr=False)
+            a1 = np.delete(a, col, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_p_col(self):
+        a, q, r = self.generate('sqr')
+        for ndel in range(2, 6):
+            for col in range(r.shape[1]-ndel):
+                q1, r1 = qr_delete(q, r, col, ndel, which='col',
+                                   overwrite_qr=False)
+                a1 = np.delete(a, slice(col, col+ndel), 1)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_1_row(self):
+        a, q, r = self.generate('tall')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_p_row(self):
+        a, q, r = self.generate('tall')
+        for ndel in range(2, 6):
+            for row in range(a.shape[0]-ndel):
+                q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+                a1 = np.delete(a, slice(row, row+ndel), 0)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_1_col(self):
+        a, q, r = self.generate('tall')
+        for col in range(r.shape[1]):
+            q1, r1 = qr_delete(q, r, col, which='col', overwrite_qr=False)
+            a1 = np.delete(a, col, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_p_col(self):
+        a, q, r = self.generate('tall')
+        for ndel in range(2, 6):
+            for col in range(r.shape[1]-ndel):
+                q1, r1 = qr_delete(q, r, col, ndel, which='col',
+                                   overwrite_qr=False)
+                a1 = np.delete(a, slice(col, col+ndel), 1)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_1_row(self):
+        a, q, r = self.generate('fat')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_p_row(self):
+        a, q, r = self.generate('fat')
+        for ndel in range(2, 6):
+            for row in range(a.shape[0]-ndel):
+                q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+                a1 = np.delete(a, slice(row, row+ndel), 0)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_1_col(self):
+        a, q, r = self.generate('fat')
+        for col in range(r.shape[1]):
+            q1, r1 = qr_delete(q, r, col, which='col', overwrite_qr=False)
+            a1 = np.delete(a, col, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_p_col(self):
+        a, q, r = self.generate('fat')
+        for ndel in range(2, 6):
+            for col in range(r.shape[1]-ndel):
+                q1, r1 = qr_delete(q, r, col, ndel, which='col',
+                                   overwrite_qr=False)
+                a1 = np.delete(a, slice(col, col+ndel), 1)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_economic_1_row(self):
+        # this test always starts and ends with an economic decomp.
+        a, q, r = self.generate('tall', 'economic')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    # for economic row deletes
+    # eco - prow = eco
+    # eco - prow = sqr
+    # eco - prow = fat
+    def base_economic_p_row_xxx(self, ndel):
+        a, q, r = self.generate('tall', 'economic')
+        for row in range(a.shape[0]-ndel):
+            q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+            a1 = np.delete(a, slice(row, row+ndel), 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_p_row_economic(self):
+        # (12, 7) - (3, 7) = (9,7) --> stays economic
+        self.base_economic_p_row_xxx(3)
+
+    def test_economic_p_row_sqr(self):
+        # (12, 7) - (5, 7) = (7, 7) --> becomes square
+        self.base_economic_p_row_xxx(5)
+
+    def test_economic_p_row_fat(self):
+        # (12, 7) - (7,7) = (5, 7) --> becomes fat
+        self.base_economic_p_row_xxx(7)
+
+    def test_economic_1_col(self):
+        a, q, r = self.generate('tall', 'economic')
+        for col in range(r.shape[1]):
+            q1, r1 = qr_delete(q, r, col, which='col', overwrite_qr=False)
+            a1 = np.delete(a, col, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_p_col(self):
+        a, q, r = self.generate('tall', 'economic')
+        for ndel in range(2, 6):
+            for col in range(r.shape[1]-ndel):
+                q1, r1 = qr_delete(q, r, col, ndel, which='col',
+                                   overwrite_qr=False)
+                a1 = np.delete(a, slice(col, col+ndel), 1)
+                check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_1_row(self):
+        a, q, r = self.generate('Mx1')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_p_row(self):
+        a, q, r = self.generate('Mx1')
+        for ndel in range(2, 6):
+            for row in range(a.shape[0]-ndel):
+                q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+                a1 = np.delete(a, slice(row, row+ndel), 0)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_1_col(self):
+        a, q, r = self.generate('1xN')
+        for col in range(r.shape[1]):
+            q1, r1 = qr_delete(q, r, col, which='col', overwrite_qr=False)
+            a1 = np.delete(a, col, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_p_col(self):
+        a, q, r = self.generate('1xN')
+        for ndel in range(2, 6):
+            for col in range(r.shape[1]-ndel):
+                q1, r1 = qr_delete(q, r, col, ndel, which='col',
+                                   overwrite_qr=False)
+                a1 = np.delete(a, slice(col, col+ndel), 1)
+                check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_economic_1_row(self):
+        a, q, r = self.generate('Mx1', 'economic')
+        for row in range(r.shape[0]):
+            q1, r1 = qr_delete(q, r, row, overwrite_qr=False)
+            a1 = np.delete(a, row, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_economic_p_row(self):
+        a, q, r = self.generate('Mx1', 'economic')
+        for ndel in range(2, 6):
+            for row in range(a.shape[0]-ndel):
+                q1, r1 = qr_delete(q, r, row, ndel, overwrite_qr=False)
+                a1 = np.delete(a, slice(row, row+ndel), 0)
+                check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_delete_last_1_row(self):
+        # full and eco are the same for 1xN
+        a, q, r = self.generate('1xN')
+        q1, r1 = qr_delete(q, r, 0, 1, 'row')
+        assert_equal(q1, np.ndarray(shape=(0, 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, r.shape[1]), dtype=r.dtype))
+
+    def test_delete_last_p_row(self):
+        a, q, r = self.generate('tall', 'full')
+        q1, r1 = qr_delete(q, r, 0, a.shape[0], 'row')
+        assert_equal(q1, np.ndarray(shape=(0, 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, r.shape[1]), dtype=r.dtype))
+
+        a, q, r = self.generate('tall', 'economic')
+        q1, r1 = qr_delete(q, r, 0, a.shape[0], 'row')
+        assert_equal(q1, np.ndarray(shape=(0, 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, r.shape[1]), dtype=r.dtype))
+
+    def test_delete_last_1_col(self):
+        a, q, r = self.generate('Mx1', 'economic')
+        q1, r1 = qr_delete(q, r, 0, 1, 'col')
+        assert_equal(q1, np.ndarray(shape=(q.shape[0], 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, 0), dtype=r.dtype))
+
+        a, q, r = self.generate('Mx1', 'full')
+        q1, r1 = qr_delete(q, r, 0, 1, 'col')
+        assert_unitary(q1)
+        assert_(q1.dtype == q.dtype)
+        assert_(q1.shape == q.shape)
+        assert_equal(r1, np.ndarray(shape=(r.shape[0], 0), dtype=r.dtype))
+
+    def test_delete_last_p_col(self):
+        a, q, r = self.generate('tall', 'full')
+        q1, r1 = qr_delete(q, r, 0, a.shape[1], 'col')
+        assert_unitary(q1)
+        assert_(q1.dtype == q.dtype)
+        assert_(q1.shape == q.shape)
+        assert_equal(r1, np.ndarray(shape=(r.shape[0], 0), dtype=r.dtype))
+
+        a, q, r = self.generate('tall', 'economic')
+        q1, r1 = qr_delete(q, r, 0, a.shape[1], 'col')
+        assert_equal(q1, np.ndarray(shape=(q.shape[0], 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, 0), dtype=r.dtype))
+
+    def test_delete_1x1_row_col(self):
+        a, q, r = self.generate('1x1')
+        q1, r1 = qr_delete(q, r, 0, 1, 'row')
+        assert_equal(q1, np.ndarray(shape=(0, 0), dtype=q.dtype))
+        assert_equal(r1, np.ndarray(shape=(0, r.shape[1]), dtype=r.dtype))
+
+        a, q, r = self.generate('1x1')
+        q1, r1 = qr_delete(q, r, 0, 1, 'col')
+        assert_unitary(q1)
+        assert_(q1.dtype == q.dtype)
+        assert_(q1.shape == q.shape)
+        assert_equal(r1, np.ndarray(shape=(r.shape[0], 0), dtype=r.dtype))
+
+    # all full qr, row deletes and single column deletes should be able to
+    # handle any non negative strides. (only row and column vector
+    # operations are used.) p column delete require fortran ordered
+    # Q and R and will make a copy as necessary.  Economic qr row deletes
+    # require a contiguous q.
+
+    def base_non_simple_strides(self, adjust_strides, ks, p, which,
+                                overwriteable):
+        if which == 'row':
+            qind = (slice(p,None), slice(p,None))
+            rind = (slice(p,None), slice(None))
+        else:
+            qind = (slice(None), slice(None))
+            rind = (slice(None), slice(None,-p))
+
+        for type, k in itertools.product(['sqr', 'tall', 'fat'], ks):
+            a, q0, r0, = self.generate(type)
+            qs, rs = adjust_strides((q0, r0))
+            if p == 1:
+                a1 = np.delete(a, k, 0 if which == 'row' else 1)
+            else:
+                s = slice(k,k+p)
+                if k < 0:
+                    s = slice(k, k + p +
+                              (a.shape[0] if which == 'row' else a.shape[1]))
+                a1 = np.delete(a, s, 0 if which == 'row' else 1)
+
+            # for each variable, q, r we try with it strided and
+            # overwrite=False. Then we try with overwrite=True, and make
+            # sure that q and r are still overwritten.
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            q1, r1 = qr_delete(qs, r, k, p, which, False)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+            q1o, r1o = qr_delete(qs, r, k, p, which, True)
+            check_qr(q1o, r1o, a1, self.rtol, self.atol)
+            if overwriteable:
+                assert_allclose(q1o, qs[qind], rtol=self.rtol, atol=self.atol)
+                assert_allclose(r1o, r[rind], rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            q2, r2 = qr_delete(q, rs, k, p, which, False)
+            check_qr(q2, r2, a1, self.rtol, self.atol)
+            q2o, r2o = qr_delete(q, rs, k, p, which, True)
+            check_qr(q2o, r2o, a1, self.rtol, self.atol)
+            if overwriteable:
+                assert_allclose(q2o, q[qind], rtol=self.rtol, atol=self.atol)
+                assert_allclose(r2o, rs[rind], rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            # since some of these were consumed above
+            qs, rs = adjust_strides((q, r))
+            q3, r3 = qr_delete(qs, rs, k, p, which, False)
+            check_qr(q3, r3, a1, self.rtol, self.atol)
+            q3o, r3o = qr_delete(qs, rs, k, p, which, True)
+            check_qr(q3o, r3o, a1, self.rtol, self.atol)
+            if overwriteable:
+                assert_allclose(q2o, qs[qind], rtol=self.rtol, atol=self.atol)
+                assert_allclose(r3o, rs[rind], rtol=self.rtol, atol=self.atol)
+
+    def test_non_unit_strides_1_row(self):
+        self.base_non_simple_strides(make_strided, [0], 1, 'row', True)
+
+    def test_non_unit_strides_p_row(self):
+        self.base_non_simple_strides(make_strided, [0], 3, 'row', True)
+
+    def test_non_unit_strides_1_col(self):
+        self.base_non_simple_strides(make_strided, [0], 1, 'col', True)
+
+    def test_non_unit_strides_p_col(self):
+        self.base_non_simple_strides(make_strided, [0], 3, 'col', False)
+
+    def test_neg_strides_1_row(self):
+        self.base_non_simple_strides(negate_strides, [0], 1, 'row', False)
+
+    def test_neg_strides_p_row(self):
+        self.base_non_simple_strides(negate_strides, [0], 3, 'row', False)
+
+    def test_neg_strides_1_col(self):
+        self.base_non_simple_strides(negate_strides, [0], 1, 'col', False)
+
+    def test_neg_strides_p_col(self):
+        self.base_non_simple_strides(negate_strides, [0], 3, 'col', False)
+
+    def test_non_itemize_strides_1_row(self):
+        self.base_non_simple_strides(nonitemsize_strides, [0], 1, 'row', False)
+
+    def test_non_itemize_strides_p_row(self):
+        self.base_non_simple_strides(nonitemsize_strides, [0], 3, 'row', False)
+
+    def test_non_itemize_strides_1_col(self):
+        self.base_non_simple_strides(nonitemsize_strides, [0], 1, 'col', False)
+
+    def test_non_itemize_strides_p_col(self):
+        self.base_non_simple_strides(nonitemsize_strides, [0], 3, 'col', False)
+
+    def test_non_native_byte_order_1_row(self):
+        self.base_non_simple_strides(make_nonnative, [0], 1, 'row', False)
+
+    def test_non_native_byte_order_p_row(self):
+        self.base_non_simple_strides(make_nonnative, [0], 3, 'row', False)
+
+    def test_non_native_byte_order_1_col(self):
+        self.base_non_simple_strides(make_nonnative, [0], 1, 'col', False)
+
+    def test_non_native_byte_order_p_col(self):
+        self.base_non_simple_strides(make_nonnative, [0], 3, 'col', False)
+
+    def test_neg_k(self):
+        a, q, r = self.generate('sqr')
+        for k, p, w in itertools.product([-3, -7], [1, 3], ['row', 'col']):
+            q1, r1 = qr_delete(q, r, k, p, w, overwrite_qr=False)
+            if w == 'row':
+                a1 = np.delete(a, slice(k+a.shape[0], k+p+a.shape[0]), 0)
+            else:
+                a1 = np.delete(a, slice(k+a.shape[0], k+p+a.shape[1]), 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def base_overwrite_qr(self, which, p, test_C, test_F, mode='full'):
+        assert_sqr = True if mode == 'full' else False
+        if which == 'row':
+            qind = (slice(p,None), slice(p,None))
+            rind = (slice(p,None), slice(None))
+        else:
+            qind = (slice(None), slice(None))
+            rind = (slice(None), slice(None,-p))
+        a, q0, r0 = self.generate('sqr', mode)
+        if p == 1:
+            a1 = np.delete(a, 3, 0 if which == 'row' else 1)
+        else:
+            a1 = np.delete(a, slice(3, 3+p), 0 if which == 'row' else 1)
+
+        # don't overwrite
+        q = q0.copy('F')
+        r = r0.copy('F')
+        q1, r1 = qr_delete(q, r, 3, p, which, False)
+        check_qr(q1, r1, a1, self.rtol, self.atol, assert_sqr)
+        check_qr(q, r, a, self.rtol, self.atol, assert_sqr)
+
+        if test_F:
+            q = q0.copy('F')
+            r = r0.copy('F')
+            q2, r2 = qr_delete(q, r, 3, p, which, True)
+            check_qr(q2, r2, a1, self.rtol, self.atol, assert_sqr)
+            # verify the overwriting
+            assert_allclose(q2, q[qind], rtol=self.rtol, atol=self.atol)
+            assert_allclose(r2, r[rind], rtol=self.rtol, atol=self.atol)
+
+        if test_C:
+            q = q0.copy('C')
+            r = r0.copy('C')
+            q3, r3 = qr_delete(q, r, 3, p, which, True)
+            check_qr(q3, r3, a1, self.rtol, self.atol, assert_sqr)
+            assert_allclose(q3, q[qind], rtol=self.rtol, atol=self.atol)
+            assert_allclose(r3, r[rind], rtol=self.rtol, atol=self.atol)
+
+    def test_overwrite_qr_1_row(self):
+        # any positively strided q and r.
+        self.base_overwrite_qr('row', 1, True, True)
+
+    def test_overwrite_economic_qr_1_row(self):
+        # Any contiguous q and positively strided r.
+        self.base_overwrite_qr('row', 1, True, True, 'economic')
+
+    def test_overwrite_qr_1_col(self):
+        # any positively strided q and r.
+        # full and eco share code paths
+        self.base_overwrite_qr('col', 1, True, True)
+
+    def test_overwrite_qr_p_row(self):
+        # any positively strided q and r.
+        self.base_overwrite_qr('row', 3, True, True)
+
+    def test_overwrite_economic_qr_p_row(self):
+        # any contiguous q and positively strided r
+        self.base_overwrite_qr('row', 3, True, True, 'economic')
+
+    def test_overwrite_qr_p_col(self):
+        # only F ordered q and r can be overwritten for cols
+        # full and eco share code paths
+        self.base_overwrite_qr('col', 3, False, True)
+
+    def test_bad_which(self):
+        a, q, r = self.generate('sqr')
+        assert_raises(ValueError, qr_delete, q, r, 0, which='foo')
+
+    def test_bad_k(self):
+        a, q, r = self.generate('tall')
+        assert_raises(ValueError, qr_delete, q, r, q.shape[0], 1)
+        assert_raises(ValueError, qr_delete, q, r, -q.shape[0]-1, 1)
+        assert_raises(ValueError, qr_delete, q, r, r.shape[0], 1, 'col')
+        assert_raises(ValueError, qr_delete, q, r, -r.shape[0]-1, 1, 'col')
+
+    def test_bad_p(self):
+        a, q, r = self.generate('tall')
+        # p must be positive
+        assert_raises(ValueError, qr_delete, q, r, 0, -1)
+        assert_raises(ValueError, qr_delete, q, r, 0, -1, 'col')
+
+        # and nonzero
+        assert_raises(ValueError, qr_delete, q, r, 0, 0)
+        assert_raises(ValueError, qr_delete, q, r, 0, 0, 'col')
+
+        # must have at least k+p rows or cols, depending.
+        assert_raises(ValueError, qr_delete, q, r, 3, q.shape[0]-2)
+        assert_raises(ValueError, qr_delete, q, r, 3, r.shape[1]-2, 'col')
+
+    def test_empty_q(self):
+        a, q, r = self.generate('tall')
+        # same code path for 'row' and 'col'
+        assert_raises(ValueError, qr_delete, np.array([]), r, 0, 1)
+
+    def test_empty_r(self):
+        a, q, r = self.generate('tall')
+        # same code path for 'row' and 'col'
+        assert_raises(ValueError, qr_delete, q, np.array([]), 0, 1)
+
+    def test_mismatched_q_and_r(self):
+        a, q, r = self.generate('tall')
+        r = r[1:]
+        assert_raises(ValueError, qr_delete, q, r, 0, 1)
+
+    def test_unsupported_dtypes(self):
+        dts = ['int8', 'int16', 'int32', 'int64',
+               'uint8', 'uint16', 'uint32', 'uint64',
+               'float16', 'longdouble', 'clongdouble',
+               'bool']
+        a, q0, r0 = self.generate('tall')
+        for dtype in dts:
+            q = q0.real.astype(dtype)
+            with np.errstate(invalid="ignore"):
+                r = r0.real.astype(dtype)
+            assert_raises(ValueError, qr_delete, q, r0, 0, 1, 'row')
+            assert_raises(ValueError, qr_delete, q, r0, 0, 2, 'row')
+            assert_raises(ValueError, qr_delete, q, r0, 0, 1, 'col')
+            assert_raises(ValueError, qr_delete, q, r0, 0, 2, 'col')
+
+            assert_raises(ValueError, qr_delete, q0, r, 0, 1, 'row')
+            assert_raises(ValueError, qr_delete, q0, r, 0, 2, 'row')
+            assert_raises(ValueError, qr_delete, q0, r, 0, 1, 'col')
+            assert_raises(ValueError, qr_delete, q0, r, 0, 2, 'col')
+
+    def test_check_finite(self):
+        a0, q0, r0 = self.generate('tall')
+
+        q = q0.copy('F')
+        q[1,1] = np.nan
+        assert_raises(ValueError, qr_delete, q, r0, 0, 1, 'row')
+        assert_raises(ValueError, qr_delete, q, r0, 0, 3, 'row')
+        assert_raises(ValueError, qr_delete, q, r0, 0, 1, 'col')
+        assert_raises(ValueError, qr_delete, q, r0, 0, 3, 'col')
+
+        r = r0.copy('F')
+        r[1,1] = np.nan
+        assert_raises(ValueError, qr_delete, q0, r, 0, 1, 'row')
+        assert_raises(ValueError, qr_delete, q0, r, 0, 3, 'row')
+        assert_raises(ValueError, qr_delete, q0, r, 0, 1, 'col')
+        assert_raises(ValueError, qr_delete, q0, r, 0, 3, 'col')
+
+    def test_qr_scalar(self):
+        a, q, r = self.generate('1x1')
+        assert_raises(ValueError, qr_delete, q[0, 0], r, 0, 1, 'row')
+        assert_raises(ValueError, qr_delete, q, r[0, 0], 0, 1, 'row')
+        assert_raises(ValueError, qr_delete, q[0, 0], r, 0, 1, 'col')
+        assert_raises(ValueError, qr_delete, q, r[0, 0], 0, 1, 'col')
+
+class TestQRdelete_f(BaseQRdelete):
+    dtype = np.dtype('f')
+
+class TestQRdelete_F(BaseQRdelete):
+    dtype = np.dtype('F')
+
+class TestQRdelete_d(BaseQRdelete):
+    dtype = np.dtype('d')
+
+class TestQRdelete_D(BaseQRdelete):
+    dtype = np.dtype('D')
+
+class BaseQRinsert(BaseQRdeltas):
+    def generate(self, type, mode='full', which='row', p=1):
+        a, q, r = super().generate(type, mode)
+
+        assert_(p > 0)
+        rng = np.random.RandomState(1234)
+
+        # super call set the seed...
+        if which == 'row':
+            if p == 1:
+                u = rng.random(a.shape[1])
+            else:
+                u = rng.random((p, a.shape[1]))
+        elif which == 'col':
+            if p == 1:
+                u = rng.random(a.shape[0])
+            else:
+                u = rng.random((a.shape[0], p))
+        else:
+            ValueError('which should be either "row" or "col"')
+
+        if np.iscomplexobj(self.dtype.type(1)):
+            b = rng.random(u.shape)
+            u = u + 1j * b
+
+        u = u.astype(self.dtype)
+        return a, q, r, u
+
+    def test_sqr_1_row(self):
+        a, q, r, u = self.generate('sqr', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_p_row(self):
+        # sqr + rows --> fat always
+        a, q, r, u = self.generate('sqr', which='row', p=3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_1_col(self):
+        a, q, r, u = self.generate('sqr', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_p_col(self):
+        # sqr + cols --> fat always
+        a, q, r, u = self.generate('sqr', which='col', p=3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_1_row(self):
+        a, q, r, u = self.generate('tall', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_p_row(self):
+        # tall + rows --> tall always
+        a, q, r, u = self.generate('tall', which='row', p=3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_1_col(self):
+        a, q, r, u = self.generate('tall', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    # for column adds to tall matrices there are three cases to test
+    # tall + pcol --> tall
+    # tall + pcol --> sqr
+    # tall + pcol --> fat
+    def base_tall_p_col_xxx(self, p):
+        a, q, r, u = self.generate('tall', which='col', p=p)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(p, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_p_col_tall(self):
+        # 12x7 + 12x3 = 12x10 --> stays tall
+        self.base_tall_p_col_xxx(3)
+
+    def test_tall_p_col_sqr(self):
+        # 12x7 + 12x5 = 12x12 --> becomes sqr
+        self.base_tall_p_col_xxx(5)
+
+    def test_tall_p_col_fat(self):
+        # 12x7 + 12x7 = 12x14 --> becomes fat
+        self.base_tall_p_col_xxx(7)
+
+    def test_fat_1_row(self):
+        a, q, r, u = self.generate('fat', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    # for row adds to fat matrices there are three cases to test
+    # fat + prow --> fat
+    # fat + prow --> sqr
+    # fat + prow --> tall
+    def base_fat_p_row_xxx(self, p):
+        a, q, r, u = self.generate('fat', which='row', p=p)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(p, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_p_row_fat(self):
+        # 7x12 + 3x12 = 10x12 --> stays fat
+        self.base_fat_p_row_xxx(3)
+
+    def test_fat_p_row_sqr(self):
+        # 7x12 + 5x12 = 12x12 --> becomes sqr
+        self.base_fat_p_row_xxx(5)
+
+    def test_fat_p_row_tall(self):
+        # 7x12 + 7x12 = 14x12 --> becomes tall
+        self.base_fat_p_row_xxx(7)
+
+    def test_fat_1_col(self):
+        a, q, r, u = self.generate('fat', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_p_col(self):
+        # fat + cols --> fat always
+        a, q, r, u = self.generate('fat', which='col', p=3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_economic_1_row(self):
+        a, q, r, u = self.generate('tall', 'economic', 'row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row, overwrite_qru=False)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_p_row(self):
+        # tall + rows --> tall always
+        a, q, r, u = self.generate('tall', 'economic', 'row', 3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row, overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_1_col(self):
+        a, q, r, u = self.generate('tall', 'economic', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u.copy(), col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_1_col_bad_update(self):
+        # When the column to be added lies in the span of Q, the update is
+        # not meaningful.  This is detected, and a LinAlgError is issued.
+        q = np.eye(5, 3, dtype=self.dtype)
+        r = np.eye(3, dtype=self.dtype)
+        u = np.array([1, 0, 0, 0, 0], self.dtype)
+        assert_raises(linalg.LinAlgError, qr_insert, q, r, u, 0, 'col')
+
+    # for column adds to economic matrices there are three cases to test
+    # eco + pcol --> eco
+    # eco + pcol --> sqr
+    # eco + pcol --> fat
+    def base_economic_p_col_xxx(self, p):
+        a, q, r, u = self.generate('tall', 'economic', which='col', p=p)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(p, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_p_col_eco(self):
+        # 12x7 + 12x3 = 12x10 --> stays eco
+        self.base_economic_p_col_xxx(3)
+
+    def test_economic_p_col_sqr(self):
+        # 12x7 + 12x5 = 12x12 --> becomes sqr
+        self.base_economic_p_col_xxx(5)
+
+    def test_economic_p_col_fat(self):
+        # 12x7 + 12x7 = 12x14 --> becomes fat
+        self.base_economic_p_col_xxx(7)
+
+    def test_Mx1_1_row(self):
+        a, q, r, u = self.generate('Mx1', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_p_row(self):
+        a, q, r, u = self.generate('Mx1', which='row', p=3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_1_col(self):
+        a, q, r, u = self.generate('Mx1', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_p_col(self):
+        a, q, r, u = self.generate('Mx1', which='col', p=3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_economic_1_row(self):
+        a, q, r, u = self.generate('Mx1', 'economic', 'row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_economic_p_row(self):
+        a, q, r, u = self.generate('Mx1', 'economic', 'row', 3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_economic_1_col(self):
+        a, q, r, u = self.generate('Mx1', 'economic', 'col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_economic_p_col(self):
+        a, q, r, u = self.generate('Mx1', 'economic', 'col', 3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_1xN_1_row(self):
+        a, q, r, u = self.generate('1xN', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_p_row(self):
+        a, q, r, u = self.generate('1xN', which='row', p=3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_1_col(self):
+        a, q, r, u = self.generate('1xN', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_p_col(self):
+        a, q, r, u = self.generate('1xN', which='col', p=3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_1_row(self):
+        a, q, r, u = self.generate('1x1', which='row')
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, row, u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_p_row(self):
+        a, q, r, u = self.generate('1x1', which='row', p=3)
+        for row in range(r.shape[0] + 1):
+            q1, r1 = qr_insert(q, r, u, row)
+            a1 = np.insert(a, np.full(3, row, np.intp), u, 0)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_1_col(self):
+        a, q, r, u = self.generate('1x1', which='col')
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, col, u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_p_col(self):
+        a, q, r, u = self.generate('1x1', which='col', p=3)
+        for col in range(r.shape[1] + 1):
+            q1, r1 = qr_insert(q, r, u, col, 'col', overwrite_qru=False)
+            a1 = np.insert(a, np.full(3, col, np.intp), u, 1)
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_1_scalar(self):
+        a, q, r, u = self.generate('1x1', which='row')
+        assert_raises(ValueError, qr_insert, q[0, 0], r, u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r[0, 0], u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r, u[0], 0, 'row')
+
+        assert_raises(ValueError, qr_insert, q[0, 0], r, u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q, r[0, 0], u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q, r, u[0], 0, 'col')
+
+    def base_non_simple_strides(self, adjust_strides, k, p, which):
+        for type in ['sqr', 'tall', 'fat']:
+            a, q0, r0, u0 = self.generate(type, which=which, p=p)
+            qs, rs, us = adjust_strides((q0, r0, u0))
+            if p == 1:
+                ai = np.insert(a, k, u0, 0 if which == 'row' else 1)
+            else:
+                ai = np.insert(a, np.full(p, k, np.intp),
+                        u0 if which == 'row' else u0,
+                        0 if which == 'row' else 1)
+
+            # for each variable, q, r, u we try with it strided and
+            # overwrite=False. Then we try with overwrite=True. Nothing
+            # is checked to see if it can be overwritten, since only
+            # F ordered Q can be overwritten when adding columns.
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            q1, r1 = qr_insert(qs, r, u, k, which, overwrite_qru=False)
+            check_qr(q1, r1, ai, self.rtol, self.atol)
+            q1o, r1o = qr_insert(qs, r, u, k, which, overwrite_qru=True)
+            check_qr(q1o, r1o, ai, self.rtol, self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            q2, r2 = qr_insert(q, rs, u, k, which, overwrite_qru=False)
+            check_qr(q2, r2, ai, self.rtol, self.atol)
+            q2o, r2o = qr_insert(q, rs, u, k, which, overwrite_qru=True)
+            check_qr(q2o, r2o, ai, self.rtol, self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            q3, r3 = qr_insert(q, r, us, k, which, overwrite_qru=False)
+            check_qr(q3, r3, ai, self.rtol, self.atol)
+            q3o, r3o = qr_insert(q, r, us, k, which, overwrite_qru=True)
+            check_qr(q3o, r3o, ai, self.rtol, self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            # since some of these were consumed above
+            qs, rs, us = adjust_strides((q, r, u))
+            q5, r5 = qr_insert(qs, rs, us, k, which, overwrite_qru=False)
+            check_qr(q5, r5, ai, self.rtol, self.atol)
+            q5o, r5o = qr_insert(qs, rs, us, k, which, overwrite_qru=True)
+            check_qr(q5o, r5o, ai, self.rtol, self.atol)
+
+    def test_non_unit_strides_1_row(self):
+        self.base_non_simple_strides(make_strided, 0, 1, 'row')
+
+    def test_non_unit_strides_p_row(self):
+        self.base_non_simple_strides(make_strided, 0, 3, 'row')
+
+    def test_non_unit_strides_1_col(self):
+        self.base_non_simple_strides(make_strided, 0, 1, 'col')
+
+    def test_non_unit_strides_p_col(self):
+        self.base_non_simple_strides(make_strided, 0, 3, 'col')
+
+    def test_neg_strides_1_row(self):
+        self.base_non_simple_strides(negate_strides, 0, 1, 'row')
+
+    def test_neg_strides_p_row(self):
+        self.base_non_simple_strides(negate_strides, 0, 3, 'row')
+
+    def test_neg_strides_1_col(self):
+        self.base_non_simple_strides(negate_strides, 0, 1, 'col')
+
+    def test_neg_strides_p_col(self):
+        self.base_non_simple_strides(negate_strides, 0, 3, 'col')
+
+    def test_non_itemsize_strides_1_row(self):
+        self.base_non_simple_strides(nonitemsize_strides, 0, 1, 'row')
+
+    def test_non_itemsize_strides_p_row(self):
+        self.base_non_simple_strides(nonitemsize_strides, 0, 3, 'row')
+
+    def test_non_itemsize_strides_1_col(self):
+        self.base_non_simple_strides(nonitemsize_strides, 0, 1, 'col')
+
+    def test_non_itemsize_strides_p_col(self):
+        self.base_non_simple_strides(nonitemsize_strides, 0, 3, 'col')
+
+    def test_non_native_byte_order_1_row(self):
+        self.base_non_simple_strides(make_nonnative, 0, 1, 'row')
+
+    def test_non_native_byte_order_p_row(self):
+        self.base_non_simple_strides(make_nonnative, 0, 3, 'row')
+
+    def test_non_native_byte_order_1_col(self):
+        self.base_non_simple_strides(make_nonnative, 0, 1, 'col')
+
+    def test_non_native_byte_order_p_col(self):
+        self.base_non_simple_strides(make_nonnative, 0, 3, 'col')
+
+    def test_overwrite_qu_rank_1(self):
+        # when inserting rows, the size of both Q and R change, so only
+        # column inserts can overwrite q. Only complex column inserts
+        # with C ordered Q overwrite u. Any contiguous Q is overwritten
+        # when inserting 1 column
+        a, q0, r, u, = self.generate('sqr', which='col', p=1)
+        q = q0.copy('C')
+        u0 = u.copy()
+        # don't overwrite
+        q1, r1 = qr_insert(q, r, u, 0, 'col', overwrite_qru=False)
+        a1 = np.insert(a, 0, u0, 1)
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+        check_qr(q, r, a, self.rtol, self.atol)
+
+        # try overwriting
+        q2, r2 = qr_insert(q, r, u, 0, 'col', overwrite_qru=True)
+        check_qr(q2, r2, a1, self.rtol, self.atol)
+        # verify the overwriting
+        assert_allclose(q2, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(u, u0.conj(), self.rtol, self.atol)
+
+        # now try with a fortran ordered Q
+        qF = q0.copy('F')
+        u1 = u0.copy()
+        q3, r3 = qr_insert(qF, r, u1, 0, 'col', overwrite_qru=False)
+        check_qr(q3, r3, a1, self.rtol, self.atol)
+        check_qr(qF, r, a, self.rtol, self.atol)
+
+        # try overwriting
+        q4, r4 = qr_insert(qF, r, u1, 0, 'col', overwrite_qru=True)
+        check_qr(q4, r4, a1, self.rtol, self.atol)
+        assert_allclose(q4, qF, rtol=self.rtol, atol=self.atol)
+
+    def test_overwrite_qu_rank_p(self):
+        # when inserting rows, the size of both Q and R change, so only
+        # column inserts can potentially overwrite Q.  In practice, only
+        # F ordered Q are overwritten with a rank p update.
+        a, q0, r, u, = self.generate('sqr', which='col', p=3)
+        q = q0.copy('F')
+        a1 = np.insert(a, np.zeros(3, np.intp), u, 1)
+
+        # don't overwrite
+        q1, r1 = qr_insert(q, r, u, 0, 'col', overwrite_qru=False)
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+        check_qr(q, r, a, self.rtol, self.atol)
+
+        # try overwriting
+        q2, r2 = qr_insert(q, r, u, 0, 'col', overwrite_qru=True)
+        check_qr(q2, r2, a1, self.rtol, self.atol)
+        assert_allclose(q2, q, rtol=self.rtol, atol=self.atol)
+
+    def test_empty_inputs(self):
+        a, q, r, u = self.generate('sqr', which='row')
+        assert_raises(ValueError, qr_insert, np.array([]), r, u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, np.array([]), u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r, np.array([]), 0, 'row')
+        assert_raises(ValueError, qr_insert, np.array([]), r, u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q, np.array([]), u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q, r, np.array([]), 0, 'col')
+
+    def test_mismatched_shapes(self):
+        a, q, r, u = self.generate('tall', which='row')
+        assert_raises(ValueError, qr_insert, q, r[1:], u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q[:-2], r, u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r, u[1:], 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r[1:], u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q[:-2], r, u, 0, 'col')
+        assert_raises(ValueError, qr_insert, q, r, u[1:], 0, 'col')
+
+    def test_unsupported_dtypes(self):
+        dts = ['int8', 'int16', 'int32', 'int64',
+               'uint8', 'uint16', 'uint32', 'uint64',
+               'float16', 'longdouble', 'clongdouble',
+               'bool']
+        a, q0, r0, u0 = self.generate('sqr', which='row')
+        for dtype in dts:
+            q = q0.real.astype(dtype)
+            with np.errstate(invalid="ignore"):
+                r = r0.real.astype(dtype)
+            u = u0.real.astype(dtype)
+            assert_raises(ValueError, qr_insert, q, r0, u0, 0, 'row')
+            assert_raises(ValueError, qr_insert, q, r0, u0, 0, 'col')
+            assert_raises(ValueError, qr_insert, q0, r, u0, 0, 'row')
+            assert_raises(ValueError, qr_insert, q0, r, u0, 0, 'col')
+            assert_raises(ValueError, qr_insert, q0, r0, u, 0, 'row')
+            assert_raises(ValueError, qr_insert, q0, r0, u, 0, 'col')
+
+    def test_check_finite(self):
+        a0, q0, r0, u0 = self.generate('sqr', which='row', p=3)
+
+        q = q0.copy('F')
+        q[1,1] = np.nan
+        assert_raises(ValueError, qr_insert, q, r0, u0[:,0], 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r0, u0, 0, 'row')
+        assert_raises(ValueError, qr_insert, q, r0, u0[:,0], 0, 'col')
+        assert_raises(ValueError, qr_insert, q, r0, u0, 0, 'col')
+
+        r = r0.copy('F')
+        r[1,1] = np.nan
+        assert_raises(ValueError, qr_insert, q0, r, u0[:,0], 0, 'row')
+        assert_raises(ValueError, qr_insert, q0, r, u0, 0, 'row')
+        assert_raises(ValueError, qr_insert, q0, r, u0[:,0], 0, 'col')
+        assert_raises(ValueError, qr_insert, q0, r, u0, 0, 'col')
+
+        u = u0.copy('F')
+        u[0,0] = np.nan
+        assert_raises(ValueError, qr_insert, q0, r0, u[:,0], 0, 'row')
+        assert_raises(ValueError, qr_insert, q0, r0, u, 0, 'row')
+        assert_raises(ValueError, qr_insert, q0, r0, u[:,0], 0, 'col')
+        assert_raises(ValueError, qr_insert, q0, r0, u, 0, 'col')
+
+class TestQRinsert_f(BaseQRinsert):
+    dtype = np.dtype('f')
+
+class TestQRinsert_F(BaseQRinsert):
+    dtype = np.dtype('F')
+
+class TestQRinsert_d(BaseQRinsert):
+    dtype = np.dtype('d')
+
+class TestQRinsert_D(BaseQRinsert):
+    dtype = np.dtype('D')
+
+class BaseQRupdate(BaseQRdeltas):
+    def generate(self, type, mode='full', p=1):
+        a, q, r = super().generate(type, mode)
+
+        # super call set the seed...
+        if p == 1:
+            u = np.random.random(q.shape[0])
+            v = np.random.random(r.shape[1])
+        else:
+            u = np.random.random((q.shape[0], p))
+            v = np.random.random((r.shape[1], p))
+
+        if np.iscomplexobj(self.dtype.type(1)):
+            b = np.random.random(u.shape)
+            u = u + 1j * b
+
+            c = np.random.random(v.shape)
+            v = v + 1j * c
+
+        u = u.astype(self.dtype)
+        v = v.astype(self.dtype)
+        return a, q, r, u, v
+
+    def test_sqr_rank_1(self):
+        a, q, r, u, v = self.generate('sqr')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_sqr_rank_p(self):
+        # test ndim = 2, rank 1 updates here too
+        for p in [1, 2, 3, 5]:
+            a, q, r, u, v = self.generate('sqr', p=p)
+            if p == 1:
+                u = u.reshape(u.size, 1)
+                v = v.reshape(v.size, 1)
+            q1, r1 = qr_update(q, r, u, v, False)
+            a1 = a + np.dot(u, v.T.conj())
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_rank_1(self):
+        a, q, r, u, v = self.generate('tall')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_tall_rank_p(self):
+        for p in [1, 2, 3, 5]:
+            a, q, r, u, v = self.generate('tall', p=p)
+            if p == 1:
+                u = u.reshape(u.size, 1)
+                v = v.reshape(v.size, 1)
+            q1, r1 = qr_update(q, r, u, v, False)
+            a1 = a + np.dot(u, v.T.conj())
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_rank_1(self):
+        a, q, r, u, v = self.generate('fat')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_fat_rank_p(self):
+        for p in [1, 2, 3, 5]:
+            a, q, r, u, v = self.generate('fat', p=p)
+            if p == 1:
+                u = u.reshape(u.size, 1)
+                v = v.reshape(v.size, 1)
+            q1, r1 = qr_update(q, r, u, v, False)
+            a1 = a + np.dot(u, v.T.conj())
+            check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_economic_rank_1(self):
+        a, q, r, u, v = self.generate('tall', 'economic')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_economic_rank_p(self):
+        for p in [1, 2, 3, 5]:
+            a, q, r, u, v = self.generate('tall', 'economic', p)
+            if p == 1:
+                u = u.reshape(u.size, 1)
+                v = v.reshape(v.size, 1)
+            q1, r1 = qr_update(q, r, u, v, False)
+            a1 = a + np.dot(u, v.T.conj())
+            check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_rank_1(self):
+        a, q, r, u, v = self.generate('Mx1')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_rank_p(self):
+        # when M or N == 1, only a rank 1 update is allowed. This isn't
+        # fundamental limitation, but the code does not support it.
+        a, q, r, u, v = self.generate('Mx1', p=1)
+        u = u.reshape(u.size, 1)
+        v = v.reshape(v.size, 1)
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.dot(u, v.T.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_Mx1_economic_rank_1(self):
+        a, q, r, u, v = self.generate('Mx1', 'economic')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_Mx1_economic_rank_p(self):
+        # when M or N == 1, only a rank 1 update is allowed. This isn't
+        # fundamental limitation, but the code does not support it.
+        a, q, r, u, v = self.generate('Mx1', 'economic', p=1)
+        u = u.reshape(u.size, 1)
+        v = v.reshape(v.size, 1)
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.dot(u, v.T.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+    def test_1xN_rank_1(self):
+        a, q, r, u, v = self.generate('1xN')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1xN_rank_p(self):
+        # when M or N == 1, only a rank 1 update is allowed. This isn't
+        # fundamental limitation, but the code does not support it.
+        a, q, r, u, v = self.generate('1xN', p=1)
+        u = u.reshape(u.size, 1)
+        v = v.reshape(v.size, 1)
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.dot(u, v.T.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_rank_1(self):
+        a, q, r, u, v = self.generate('1x1')
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_rank_p(self):
+        # when M or N == 1, only a rank 1 update is allowed. This isn't
+        # fundamental limitation, but the code does not support it.
+        a, q, r, u, v = self.generate('1x1', p=1)
+        u = u.reshape(u.size, 1)
+        v = v.reshape(v.size, 1)
+        q1, r1 = qr_update(q, r, u, v, False)
+        a1 = a + np.dot(u, v.T.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+
+    def test_1x1_rank_1_scalar(self):
+        a, q, r, u, v = self.generate('1x1')
+        assert_raises(ValueError, qr_update, q[0, 0], r, u, v)
+        assert_raises(ValueError, qr_update, q, r[0, 0], u, v)
+        assert_raises(ValueError, qr_update, q, r, u[0], v)
+        assert_raises(ValueError, qr_update, q, r, u, v[0])
+
+    def base_non_simple_strides(self, adjust_strides, mode, p, overwriteable):
+        assert_sqr = False if mode == 'economic' else True
+        for type in ['sqr', 'tall', 'fat']:
+            a, q0, r0, u0, v0 = self.generate(type, mode, p)
+            qs, rs, us, vs = adjust_strides((q0, r0, u0, v0))
+            if p == 1:
+                aup = a + np.outer(u0, v0.conj())
+            else:
+                aup = a + np.dot(u0, v0.T.conj())
+
+            # for each variable, q, r, u, v we try with it strided and
+            # overwrite=False. Then we try with overwrite=True, and make
+            # sure that if p == 1, r and v are still overwritten.
+            # a strided q and u must always be copied.
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            v = v0.copy('C')
+            q1, r1 = qr_update(qs, r, u, v, False)
+            check_qr(q1, r1, aup, self.rtol, self.atol, assert_sqr)
+            q1o, r1o = qr_update(qs, r, u, v, True)
+            check_qr(q1o, r1o, aup, self.rtol, self.atol, assert_sqr)
+            if overwriteable:
+                assert_allclose(r1o, r, rtol=self.rtol, atol=self.atol)
+                assert_allclose(v, v0.conj(), rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            v = v0.copy('C')
+            q2, r2 = qr_update(q, rs, u, v, False)
+            check_qr(q2, r2, aup, self.rtol, self.atol, assert_sqr)
+            q2o, r2o = qr_update(q, rs, u, v, True)
+            check_qr(q2o, r2o, aup, self.rtol, self.atol, assert_sqr)
+            if overwriteable:
+                assert_allclose(r2o, rs, rtol=self.rtol, atol=self.atol)
+                assert_allclose(v, v0.conj(), rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            v = v0.copy('C')
+            q3, r3 = qr_update(q, r, us, v, False)
+            check_qr(q3, r3, aup, self.rtol, self.atol, assert_sqr)
+            q3o, r3o = qr_update(q, r, us, v, True)
+            check_qr(q3o, r3o, aup, self.rtol, self.atol, assert_sqr)
+            if overwriteable:
+                assert_allclose(r3o, r, rtol=self.rtol, atol=self.atol)
+                assert_allclose(v, v0.conj(), rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            v = v0.copy('C')
+            q4, r4 = qr_update(q, r, u, vs, False)
+            check_qr(q4, r4, aup, self.rtol, self.atol, assert_sqr)
+            q4o, r4o = qr_update(q, r, u, vs, True)
+            check_qr(q4o, r4o, aup, self.rtol, self.atol, assert_sqr)
+            if overwriteable:
+                assert_allclose(r4o, r, rtol=self.rtol, atol=self.atol)
+                assert_allclose(vs, v0.conj(), rtol=self.rtol, atol=self.atol)
+
+            q = q0.copy('F')
+            r = r0.copy('F')
+            u = u0.copy('F')
+            v = v0.copy('C')
+            # since some of these were consumed above
+            qs, rs, us, vs = adjust_strides((q, r, u, v))
+            q5, r5 = qr_update(qs, rs, us, vs, False)
+            check_qr(q5, r5, aup, self.rtol, self.atol, assert_sqr)
+            q5o, r5o = qr_update(qs, rs, us, vs, True)
+            check_qr(q5o, r5o, aup, self.rtol, self.atol, assert_sqr)
+            if overwriteable:
+                assert_allclose(r5o, rs, rtol=self.rtol, atol=self.atol)
+                assert_allclose(vs, v0.conj(), rtol=self.rtol, atol=self.atol)
+
+    def test_non_unit_strides_rank_1(self):
+        self.base_non_simple_strides(make_strided, 'full', 1, True)
+
+    def test_non_unit_strides_economic_rank_1(self):
+        self.base_non_simple_strides(make_strided, 'economic', 1, True)
+
+    def test_non_unit_strides_rank_p(self):
+        self.base_non_simple_strides(make_strided, 'full', 3, False)
+
+    def test_non_unit_strides_economic_rank_p(self):
+        self.base_non_simple_strides(make_strided, 'economic', 3, False)
+
+    def test_neg_strides_rank_1(self):
+        self.base_non_simple_strides(negate_strides, 'full', 1, False)
+
+    def test_neg_strides_economic_rank_1(self):
+        self.base_non_simple_strides(negate_strides, 'economic', 1, False)
+
+    def test_neg_strides_rank_p(self):
+        self.base_non_simple_strides(negate_strides, 'full', 3, False)
+
+    def test_neg_strides_economic_rank_p(self):
+        self.base_non_simple_strides(negate_strides, 'economic', 3, False)
+
+    def test_non_itemsize_strides_rank_1(self):
+        self.base_non_simple_strides(nonitemsize_strides, 'full', 1, False)
+
+    def test_non_itemsize_strides_economic_rank_1(self):
+        self.base_non_simple_strides(nonitemsize_strides, 'economic', 1, False)
+
+    def test_non_itemsize_strides_rank_p(self):
+        self.base_non_simple_strides(nonitemsize_strides, 'full', 3, False)
+
+    def test_non_itemsize_strides_economic_rank_p(self):
+        self.base_non_simple_strides(nonitemsize_strides, 'economic', 3, False)
+
+    def test_non_native_byte_order_rank_1(self):
+        self.base_non_simple_strides(make_nonnative, 'full', 1, False)
+
+    def test_non_native_byte_order_economic_rank_1(self):
+        self.base_non_simple_strides(make_nonnative, 'economic', 1, False)
+
+    def test_non_native_byte_order_rank_p(self):
+        self.base_non_simple_strides(make_nonnative, 'full', 3, False)
+
+    def test_non_native_byte_order_economic_rank_p(self):
+        self.base_non_simple_strides(make_nonnative, 'economic', 3, False)
+
+    def test_overwrite_qruv_rank_1(self):
+        # Any positive strided q, r, u, and v can be overwritten for a rank 1
+        # update, only checking C and F contiguous.
+        a, q0, r0, u0, v0 = self.generate('sqr')
+        a1 = a + np.outer(u0, v0.conj())
+        q = q0.copy('F')
+        r = r0.copy('F')
+        u = u0.copy('F')
+        v = v0.copy('F')
+
+        # don't overwrite
+        q1, r1 = qr_update(q, r, u, v, False)
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+        check_qr(q, r, a, self.rtol, self.atol)
+
+        q2, r2 = qr_update(q, r, u, v, True)
+        check_qr(q2, r2, a1, self.rtol, self.atol)
+        # verify the overwriting, no good way to check u and v.
+        assert_allclose(q2, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(r2, r, rtol=self.rtol, atol=self.atol)
+
+        q = q0.copy('C')
+        r = r0.copy('C')
+        u = u0.copy('C')
+        v = v0.copy('C')
+        q3, r3 = qr_update(q, r, u, v, True)
+        check_qr(q3, r3, a1, self.rtol, self.atol)
+        assert_allclose(q3, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(r3, r, rtol=self.rtol, atol=self.atol)
+
+    def test_overwrite_qruv_rank_1_economic(self):
+        # updating economic decompositions can overwrite any contiguous r,
+        # and positively strided r and u. V is only ever read.
+        # only checking C and F contiguous.
+        a, q0, r0, u0, v0 = self.generate('tall', 'economic')
+        a1 = a + np.outer(u0, v0.conj())
+        q = q0.copy('F')
+        r = r0.copy('F')
+        u = u0.copy('F')
+        v = v0.copy('F')
+
+        # don't overwrite
+        q1, r1 = qr_update(q, r, u, v, False)
+        check_qr(q1, r1, a1, self.rtol, self.atol, False)
+        check_qr(q, r, a, self.rtol, self.atol, False)
+
+        q2, r2 = qr_update(q, r, u, v, True)
+        check_qr(q2, r2, a1, self.rtol, self.atol, False)
+        # verify the overwriting, no good way to check u and v.
+        assert_allclose(q2, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(r2, r, rtol=self.rtol, atol=self.atol)
+
+        q = q0.copy('C')
+        r = r0.copy('C')
+        u = u0.copy('C')
+        v = v0.copy('C')
+        q3, r3 = qr_update(q, r, u, v, True)
+        check_qr(q3, r3, a1, self.rtol, self.atol, False)
+        assert_allclose(q3, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(r3, r, rtol=self.rtol, atol=self.atol)
+
+    def test_overwrite_qruv_rank_p(self):
+        # for rank p updates, q r must be F contiguous, v must be C (v.T --> F)
+        # and u can be C or F, but is only overwritten if Q is C and complex
+        a, q0, r0, u0, v0 = self.generate('sqr', p=3)
+        a1 = a + np.dot(u0, v0.T.conj())
+        q = q0.copy('F')
+        r = r0.copy('F')
+        u = u0.copy('F')
+        v = v0.copy('C')
+
+        # don't overwrite
+        q1, r1 = qr_update(q, r, u, v, False)
+        check_qr(q1, r1, a1, self.rtol, self.atol)
+        check_qr(q, r, a, self.rtol, self.atol)
+
+        q2, r2 = qr_update(q, r, u, v, True)
+        check_qr(q2, r2, a1, self.rtol, self.atol)
+        # verify the overwriting, no good way to check u and v.
+        assert_allclose(q2, q, rtol=self.rtol, atol=self.atol)
+        assert_allclose(r2, r, rtol=self.rtol, atol=self.atol)
+
+    def test_empty_inputs(self):
+        a, q, r, u, v = self.generate('tall')
+        assert_raises(ValueError, qr_update, np.array([]), r, u, v)
+        assert_raises(ValueError, qr_update, q, np.array([]), u, v)
+        assert_raises(ValueError, qr_update, q, r, np.array([]), v)
+        assert_raises(ValueError, qr_update, q, r, u, np.array([]))
+
+    def test_mismatched_shapes(self):
+        a, q, r, u, v = self.generate('tall')
+        assert_raises(ValueError, qr_update, q, r[1:], u, v)
+        assert_raises(ValueError, qr_update, q[:-2], r, u, v)
+        assert_raises(ValueError, qr_update, q, r, u[1:], v)
+        assert_raises(ValueError, qr_update, q, r, u, v[1:])
+
+    def test_unsupported_dtypes(self):
+        dts = ['int8', 'int16', 'int32', 'int64',
+               'uint8', 'uint16', 'uint32', 'uint64',
+               'float16', 'longdouble', 'clongdouble',
+               'bool']
+        a, q0, r0, u0, v0 = self.generate('tall')
+        for dtype in dts:
+            q = q0.real.astype(dtype)
+            with np.errstate(invalid="ignore"):
+                r = r0.real.astype(dtype)
+            u = u0.real.astype(dtype)
+            v = v0.real.astype(dtype)
+            assert_raises(ValueError, qr_update, q, r0, u0, v0)
+            assert_raises(ValueError, qr_update, q0, r, u0, v0)
+            assert_raises(ValueError, qr_update, q0, r0, u, v0)
+            assert_raises(ValueError, qr_update, q0, r0, u0, v)
+
+    def test_integer_input(self):
+        q = np.arange(16).reshape(4, 4)
+        r = q.copy()  # doesn't matter
+        u = q[:, 0].copy()
+        v = r[0, :].copy()
+        assert_raises(ValueError, qr_update, q, r, u, v)
+
+    def test_check_finite(self):
+        a0, q0, r0, u0, v0 = self.generate('tall', p=3)
+
+        q = q0.copy('F')
+        q[1,1] = np.nan
+        assert_raises(ValueError, qr_update, q, r0, u0[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q, r0, u0, v0)
+
+        r = r0.copy('F')
+        r[1,1] = np.nan
+        assert_raises(ValueError, qr_update, q0, r, u0[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q0, r, u0, v0)
+
+        u = u0.copy('F')
+        u[0,0] = np.nan
+        assert_raises(ValueError, qr_update, q0, r0, u[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q0, r0, u, v0)
+
+        v = v0.copy('F')
+        v[0,0] = np.nan
+        assert_raises(ValueError, qr_update, q0, r0, u[:,0], v[:,0])
+        assert_raises(ValueError, qr_update, q0, r0, u, v)
+
+    def test_economic_check_finite(self):
+        a0, q0, r0, u0, v0 = self.generate('tall', mode='economic', p=3)
+
+        q = q0.copy('F')
+        q[1,1] = np.nan
+        assert_raises(ValueError, qr_update, q, r0, u0[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q, r0, u0, v0)
+
+        r = r0.copy('F')
+        r[1,1] = np.nan
+        assert_raises(ValueError, qr_update, q0, r, u0[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q0, r, u0, v0)
+
+        u = u0.copy('F')
+        u[0,0] = np.nan
+        assert_raises(ValueError, qr_update, q0, r0, u[:,0], v0[:,0])
+        assert_raises(ValueError, qr_update, q0, r0, u, v0)
+
+        v = v0.copy('F')
+        v[0,0] = np.nan
+        assert_raises(ValueError, qr_update, q0, r0, u[:,0], v[:,0])
+        assert_raises(ValueError, qr_update, q0, r0, u, v)
+
+    def test_u_exactly_in_span_q(self):
+        q = np.array([[0, 0], [0, 0], [1, 0], [0, 1]], self.dtype)
+        r = np.array([[1, 0], [0, 1]], self.dtype)
+        u = np.array([0, 0, 0, -1], self.dtype)
+        v = np.array([1, 2], self.dtype)
+        q1, r1 = qr_update(q, r, u, v)
+        a1 = np.dot(q, r) + np.outer(u, v.conj())
+        check_qr(q1, r1, a1, self.rtol, self.atol, False)
+
+class TestQRupdate_f(BaseQRupdate):
+    dtype = np.dtype('f')
+
+class TestQRupdate_F(BaseQRupdate):
+    dtype = np.dtype('F')
+
+class TestQRupdate_d(BaseQRupdate):
+    dtype = np.dtype('d')
+
+class TestQRupdate_D(BaseQRupdate):
+    dtype = np.dtype('D')
+
+def test_form_qTu():
+    # We want to ensure that all of the code paths through this function are
+    # tested. Most of them should be hit with the rest of test suite, but
+    # explicit tests make clear precisely what is being tested.
+    #
+    # This function expects that Q is either C or F contiguous and square.
+    # Economic mode decompositions (Q is (M, N), M != N) do not go through this
+    # function. U may have any positive strides.
+    #
+    # Some of these test are duplicates, since contiguous 1d arrays are both C
+    # and F.
+
+    q_order = ['F', 'C']
+    q_shape = [(8, 8), ]
+    u_order = ['F', 'C', 'A']  # here A means is not F not C
+    u_shape = [1, 3]
+    dtype = ['f', 'd', 'F', 'D']
+
+    for qo, qs, uo, us, d in \
+            itertools.product(q_order, q_shape, u_order, u_shape, dtype):
+        if us == 1:
+            check_form_qTu(qo, qs, uo, us, 1, d)
+            check_form_qTu(qo, qs, uo, us, 2, d)
+        else:
+            check_form_qTu(qo, qs, uo, us, 2, d)
+
+def check_form_qTu(q_order, q_shape, u_order, u_shape, u_ndim, dtype):
+    np.random.seed(47)
+    if u_shape == 1 and u_ndim == 1:
+        u_shape = (q_shape[0],)
+    else:
+        u_shape = (q_shape[0], u_shape)
+    dtype = np.dtype(dtype)
+
+    if dtype.char in 'fd':
+        q = np.random.random(q_shape)
+        u = np.random.random(u_shape)
+    elif dtype.char in 'FD':
+        q = np.random.random(q_shape) + 1j*np.random.random(q_shape)
+        u = np.random.random(u_shape) + 1j*np.random.random(u_shape)
+    else:
+        ValueError("form_qTu doesn't support this dtype")
+
+    q = np.require(q, dtype, q_order)
+    if u_order != 'A':
+        u = np.require(u, dtype, u_order)
+    else:
+        u, = make_strided((u.astype(dtype),))
+
+    rtol = 10.0 ** -(np.finfo(dtype).precision-2)
+    atol = 2*np.finfo(dtype).eps
+
+    expected = np.dot(q.T.conj(), u)
+    res = _decomp_update._form_qTu(q, u)
+    assert_allclose(res, expected, rtol=rtol, atol=atol)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_extending.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..36e4692cd9717a221cc683a663e8ee23a81aa5b6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_extending.py
@@ -0,0 +1,46 @@
+import os
+import platform
+import sysconfig
+
+import numpy as np
+import pytest
+
+from scipy._lib._testutils import IS_EDITABLE, _test_cython_extension, cython
+from scipy.linalg.blas import cdotu  # type: ignore[attr-defined]
+from scipy.linalg.lapack import dgtsv  # type: ignore[attr-defined]
+
+
+@pytest.mark.fail_slow(120)
+# essential per https://github.com/scipy/scipy/pull/20487#discussion_r1567057247
+@pytest.mark.skipif(IS_EDITABLE,
+                    reason='Editable install cannot find .pxd headers.')
+@pytest.mark.skipif((platform.system() == 'Windows' and
+                     sysconfig.get_config_var('Py_GIL_DISABLED')),
+                    reason='gh-22039')
+@pytest.mark.skipif(platform.machine() in ["wasm32", "wasm64"],
+                    reason="Can't start subprocess")
+@pytest.mark.skipif(cython is None, reason="requires cython")
+def test_cython(tmp_path):
+    srcdir = os.path.dirname(os.path.dirname(__file__))
+    extensions, extensions_cpp = _test_cython_extension(tmp_path, srcdir)
+    # actually test the cython c-extensions
+    a = np.ones(8) * 3
+    b = np.ones(9)
+    c = np.ones(8) * 4
+    x = np.ones(9)
+    _, _, _, x, _ = dgtsv(a, b, c, x)
+    a = np.ones(8) * 3
+    b = np.ones(9)
+    c = np.ones(8) * 4
+    x_c = np.ones(9)
+    extensions.tridiag(a, b, c, x_c)
+    a = np.ones(8) * 3
+    b = np.ones(9)
+    c = np.ones(8) * 4
+    x_cpp = np.ones(9)
+    extensions_cpp.tridiag(a, b, c, x_cpp)
+    np.testing.assert_array_equal(x, x_cpp)
+    cx = np.array([1-1j, 2+2j, 3-3j], dtype=np.complex64)
+    cy = np.array([4+4j, 5-5j, 6+6j], dtype=np.complex64)
+    np.testing.assert_array_equal(cdotu(cx, cy), extensions.complex_dot(cx, cy))
+    np.testing.assert_array_equal(cdotu(cx, cy), extensions_cpp.complex_dot(cx, cy))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_fblas.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_fblas.py
new file mode 100644
index 0000000000000000000000000000000000000000..7c5ada830043af0eecb6d04bf39aef13d29d777c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_fblas.py
@@ -0,0 +1,607 @@
+# Test interfaces to fortran blas.
+#
+# The tests are more of interface than they are of the underlying blas.
+# Only very small matrices checked -- N=3 or so.
+#
+# !! Complex calculations really aren't checked that carefully.
+# !! Only real valued complex numbers are used in tests.
+
+from numpy import float32, float64, complex64, complex128, arange, array, \
+                  zeros, shape, transpose, newaxis, common_type, conjugate
+
+from scipy.linalg import _fblas as fblas
+
+from numpy.testing import assert_array_equal, \
+    assert_allclose, assert_array_almost_equal, assert_
+
+import pytest
+
+# decimal accuracy to require between Python and LAPACK/BLAS calculations
+accuracy = 5
+
+# Since numpy.dot likely uses the same blas, use this routine
+# to check.
+
+
+def matrixmultiply(a, b):
+    if len(b.shape) == 1:
+        b_is_vector = True
+        b = b[:, newaxis]
+    else:
+        b_is_vector = False
+    assert_(a.shape[1] == b.shape[0])
+    c = zeros((a.shape[0], b.shape[1]), common_type(a, b))
+    for i in range(a.shape[0]):
+        for j in range(b.shape[1]):
+            s = 0
+            for k in range(a.shape[1]):
+                s += a[i, k] * b[k, j]
+            c[i, j] = s
+    if b_is_vector:
+        c = c.reshape((a.shape[0],))
+    return c
+
+##################################################
+# Test blas ?axpy
+
+
+class BaseAxpy:
+    ''' Mixin class for axpy tests '''
+
+    def test_default_a(self):
+        x = arange(3., dtype=self.dtype)
+        y = arange(3., dtype=x.dtype)
+        real_y = x*1.+y
+        y = self.blas_func(x, y)
+        assert_array_equal(real_y, y)
+
+    def test_simple(self):
+        x = arange(3., dtype=self.dtype)
+        y = arange(3., dtype=x.dtype)
+        real_y = x*3.+y
+        y = self.blas_func(x, y, a=3.)
+        assert_array_equal(real_y, y)
+
+    def test_x_stride(self):
+        x = arange(6., dtype=self.dtype)
+        y = zeros(3, x.dtype)
+        y = arange(3., dtype=x.dtype)
+        real_y = x[::2]*3.+y
+        y = self.blas_func(x, y, a=3., n=3, incx=2)
+        assert_array_equal(real_y, y)
+
+    def test_y_stride(self):
+        x = arange(3., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        real_y = x*3.+y[::2]
+        y = self.blas_func(x, y, a=3., n=3, incy=2)
+        assert_array_equal(real_y, y[::2])
+
+    def test_x_and_y_stride(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        real_y = x[::4]*3.+y[::2]
+        y = self.blas_func(x, y, a=3., n=3, incx=4, incy=2)
+        assert_array_equal(real_y, y[::2])
+
+    def test_x_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=4, incx=5)
+
+    def test_y_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=3, incy=5)
+
+
+try:
+    class TestSaxpy(BaseAxpy):
+        blas_func = fblas.saxpy
+        dtype = float32
+except AttributeError:
+    class TestSaxpy:
+        pass
+
+
+class TestDaxpy(BaseAxpy):
+    blas_func = fblas.daxpy
+    dtype = float64
+
+
+try:
+    class TestCaxpy(BaseAxpy):
+        blas_func = fblas.caxpy
+        dtype = complex64
+except AttributeError:
+    class TestCaxpy:
+        pass
+
+
+class TestZaxpy(BaseAxpy):
+    blas_func = fblas.zaxpy
+    dtype = complex128
+
+
+##################################################
+# Test blas ?scal
+
+class BaseScal:
+    ''' Mixin class for scal testing '''
+
+    def test_simple(self):
+        x = arange(3., dtype=self.dtype)
+        real_x = x*3.
+        x = self.blas_func(3., x)
+        assert_array_equal(real_x, x)
+
+    def test_x_stride(self):
+        x = arange(6., dtype=self.dtype)
+        real_x = x.copy()
+        real_x[::2] = x[::2]*array(3., self.dtype)
+        x = self.blas_func(3., x, n=3, incx=2)
+        assert_array_equal(real_x, x)
+
+    def test_x_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(2., x, n=4, incx=5)
+
+
+try:
+    class TestSscal(BaseScal):
+        blas_func = fblas.sscal
+        dtype = float32
+except AttributeError:
+    class TestSscal:
+        pass
+
+
+class TestDscal(BaseScal):
+    blas_func = fblas.dscal
+    dtype = float64
+
+
+try:
+    class TestCscal(BaseScal):
+        blas_func = fblas.cscal
+        dtype = complex64
+except AttributeError:
+    class TestCscal:
+        pass
+
+
+class TestZscal(BaseScal):
+    blas_func = fblas.zscal
+    dtype = complex128
+
+
+##################################################
+# Test blas ?copy
+
+class BaseCopy:
+    ''' Mixin class for copy testing '''
+
+    def test_simple(self):
+        x = arange(3., dtype=self.dtype)
+        y = zeros(shape(x), x.dtype)
+        y = self.blas_func(x, y)
+        assert_array_equal(x, y)
+
+    def test_x_stride(self):
+        x = arange(6., dtype=self.dtype)
+        y = zeros(3, x.dtype)
+        y = self.blas_func(x, y, n=3, incx=2)
+        assert_array_equal(x[::2], y)
+
+    def test_y_stride(self):
+        x = arange(3., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        y = self.blas_func(x, y, n=3, incy=2)
+        assert_array_equal(x, y[::2])
+
+    def test_x_and_y_stride(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        y = self.blas_func(x, y, n=3, incx=4, incy=2)
+        assert_array_equal(x[::4], y[::2])
+
+    def test_x_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=4, incx=5)
+
+    def test_y_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=3, incy=5)
+
+    # def test_y_bad_type(self):
+    ##   Hmmm. Should this work?  What should be the output.
+    #    x = arange(3.,dtype=self.dtype)
+    #    y = zeros(shape(x))
+    #    self.blas_func(x,y)
+    #    assert_array_equal(x,y)
+
+
+try:
+    class TestScopy(BaseCopy):
+        blas_func = fblas.scopy
+        dtype = float32
+except AttributeError:
+    class TestScopy:
+        pass
+
+
+class TestDcopy(BaseCopy):
+    blas_func = fblas.dcopy
+    dtype = float64
+
+
+try:
+    class TestCcopy(BaseCopy):
+        blas_func = fblas.ccopy
+        dtype = complex64
+except AttributeError:
+    class TestCcopy:
+        pass
+
+
+class TestZcopy(BaseCopy):
+    blas_func = fblas.zcopy
+    dtype = complex128
+
+
+##################################################
+# Test blas ?swap
+
+class BaseSwap:
+    ''' Mixin class for swap tests '''
+
+    def test_simple(self):
+        x = arange(3., dtype=self.dtype)
+        y = zeros(shape(x), x.dtype)
+        desired_x = y.copy()
+        desired_y = x.copy()
+        x, y = self.blas_func(x, y)
+        assert_array_equal(desired_x, x)
+        assert_array_equal(desired_y, y)
+
+    def test_x_stride(self):
+        x = arange(6., dtype=self.dtype)
+        y = zeros(3, x.dtype)
+        desired_x = y.copy()
+        desired_y = x.copy()[::2]
+        x, y = self.blas_func(x, y, n=3, incx=2)
+        assert_array_equal(desired_x, x[::2])
+        assert_array_equal(desired_y, y)
+
+    def test_y_stride(self):
+        x = arange(3., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        desired_x = y.copy()[::2]
+        desired_y = x.copy()
+        x, y = self.blas_func(x, y, n=3, incy=2)
+        assert_array_equal(desired_x, x)
+        assert_array_equal(desired_y, y[::2])
+
+    def test_x_and_y_stride(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        desired_x = y.copy()[::2]
+        desired_y = x.copy()[::4]
+        x, y = self.blas_func(x, y, n=3, incx=4, incy=2)
+        assert_array_equal(desired_x, x[::4])
+        assert_array_equal(desired_y, y[::2])
+
+    def test_x_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=4, incx=5)
+
+    def test_y_bad_size(self):
+        x = arange(12., dtype=self.dtype)
+        y = zeros(6, x.dtype)
+        with pytest.raises(Exception, match='failed for 1st keyword'):
+            self.blas_func(x, y, n=3, incy=5)
+
+
+try:
+    class TestSswap(BaseSwap):
+        blas_func = fblas.sswap
+        dtype = float32
+except AttributeError:
+    class TestSswap:
+        pass
+
+
+class TestDswap(BaseSwap):
+    blas_func = fblas.dswap
+    dtype = float64
+
+
+try:
+    class TestCswap(BaseSwap):
+        blas_func = fblas.cswap
+        dtype = complex64
+except AttributeError:
+    class TestCswap:
+        pass
+
+
+class TestZswap(BaseSwap):
+    blas_func = fblas.zswap
+    dtype = complex128
+
+##################################################
+# Test blas ?gemv
+# This will be a mess to test all cases.
+
+
+class BaseGemv:
+    ''' Mixin class for gemv tests '''
+
+    def get_data(self, x_stride=1, y_stride=1):
+        mult = array(1, dtype=self.dtype)
+        if self.dtype in [complex64, complex128]:
+            mult = array(1+1j, dtype=self.dtype)
+        from numpy.random import normal, seed
+        seed(1234)
+        alpha = array(1., dtype=self.dtype) * mult
+        beta = array(1., dtype=self.dtype) * mult
+        a = normal(0., 1., (3, 3)).astype(self.dtype) * mult
+        x = arange(shape(a)[0]*x_stride, dtype=self.dtype) * mult
+        y = arange(shape(a)[1]*y_stride, dtype=self.dtype) * mult
+        return alpha, beta, a, x, y
+
+    def test_simple(self):
+        alpha, beta, a, x, y = self.get_data()
+        desired_y = alpha*matrixmultiply(a, x)+beta*y
+        y = self.blas_func(alpha, a, x, beta, y)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_default_beta_y(self):
+        alpha, beta, a, x, y = self.get_data()
+        desired_y = matrixmultiply(a, x)
+        y = self.blas_func(1, a, x)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_simple_transpose(self):
+        alpha, beta, a, x, y = self.get_data()
+        desired_y = alpha*matrixmultiply(transpose(a), x)+beta*y
+        y = self.blas_func(alpha, a, x, beta, y, trans=1)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_simple_transpose_conj(self):
+        alpha, beta, a, x, y = self.get_data()
+        desired_y = alpha*matrixmultiply(transpose(conjugate(a)), x)+beta*y
+        y = self.blas_func(alpha, a, x, beta, y, trans=2)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_x_stride(self):
+        alpha, beta, a, x, y = self.get_data(x_stride=2)
+        desired_y = alpha*matrixmultiply(a, x[::2])+beta*y
+        y = self.blas_func(alpha, a, x, beta, y, incx=2)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_x_stride_transpose(self):
+        alpha, beta, a, x, y = self.get_data(x_stride=2)
+        desired_y = alpha*matrixmultiply(transpose(a), x[::2])+beta*y
+        y = self.blas_func(alpha, a, x, beta, y, trans=1, incx=2)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_x_stride_assert(self):
+        # What is the use of this test?
+        alpha, beta, a, x, y = self.get_data(x_stride=2)
+        with pytest.raises(Exception, match='failed for 3rd argument'):
+            y = self.blas_func(1, a, x, 1, y, trans=0, incx=3)
+        with pytest.raises(Exception, match='failed for 3rd argument'):
+            y = self.blas_func(1, a, x, 1, y, trans=1, incx=3)
+
+    def test_y_stride(self):
+        alpha, beta, a, x, y = self.get_data(y_stride=2)
+        desired_y = y.copy()
+        desired_y[::2] = alpha*matrixmultiply(a, x)+beta*y[::2]
+        y = self.blas_func(alpha, a, x, beta, y, incy=2)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_y_stride_transpose(self):
+        alpha, beta, a, x, y = self.get_data(y_stride=2)
+        desired_y = y.copy()
+        desired_y[::2] = alpha*matrixmultiply(transpose(a), x)+beta*y[::2]
+        y = self.blas_func(alpha, a, x, beta, y, trans=1, incy=2)
+        assert_array_almost_equal(desired_y, y)
+
+    def test_y_stride_assert(self):
+        # What is the use of this test?
+        alpha, beta, a, x, y = self.get_data(y_stride=2)
+        with pytest.raises(Exception, match='failed for 2nd keyword'):
+            y = self.blas_func(1, a, x, 1, y, trans=0, incy=3)
+        with pytest.raises(Exception, match='failed for 2nd keyword'):
+            y = self.blas_func(1, a, x, 1, y, trans=1, incy=3)
+
+
+try:
+    class TestSgemv(BaseGemv):
+        blas_func = fblas.sgemv
+        dtype = float32
+
+        def test_sgemv_on_osx(self):
+            from itertools import product
+            import sys
+            import numpy as np
+
+            if sys.platform != 'darwin':
+                return
+
+            def aligned_array(shape, align, dtype, order='C'):
+                # Make array shape `shape` with aligned at `align` bytes
+                d = dtype()
+                # Make array of correct size with `align` extra bytes
+                N = np.prod(shape)
+                tmp = np.zeros(N * d.nbytes + align, dtype=np.uint8)
+                address = tmp.__array_interface__["data"][0]
+                # Find offset into array giving desired alignment
+                for offset in range(align):
+                    if (address + offset) % align == 0:
+                        break
+                tmp = tmp[offset:offset+N*d.nbytes].view(dtype=dtype)
+                return tmp.reshape(shape, order=order)
+
+            def as_aligned(arr, align, dtype, order='C'):
+                # Copy `arr` into an aligned array with same shape
+                aligned = aligned_array(arr.shape, align, dtype, order)
+                aligned[:] = arr[:]
+                return aligned
+
+            def assert_dot_close(A, X, desired):
+                assert_allclose(self.blas_func(1.0, A, X), desired,
+                                rtol=1e-5, atol=1e-7)
+
+            testdata = product((15, 32), (10000,), (200, 89), ('C', 'F'))
+            for align, m, n, a_order in testdata:
+                A_d = np.random.rand(m, n)
+                X_d = np.random.rand(n)
+                desired = np.dot(A_d, X_d)
+                # Calculation with aligned single precision
+                A_f = as_aligned(A_d, align, np.float32, order=a_order)
+                X_f = as_aligned(X_d, align, np.float32, order=a_order)
+                assert_dot_close(A_f, X_f, desired)
+
+except AttributeError:
+    class TestSgemv:
+        pass
+
+
+class TestDgemv(BaseGemv):
+    blas_func = fblas.dgemv
+    dtype = float64
+
+
+try:
+    class TestCgemv(BaseGemv):
+        blas_func = fblas.cgemv
+        dtype = complex64
+except AttributeError:
+    class TestCgemv:
+        pass
+
+
+class TestZgemv(BaseGemv):
+    blas_func = fblas.zgemv
+    dtype = complex128
+
+
+"""
+##################################################
+### Test blas ?ger
+### This will be a mess to test all cases.
+
+class BaseGer:
+    def get_data(self,x_stride=1,y_stride=1):
+        from numpy.random import normal, seed
+        seed(1234)
+        alpha = array(1., dtype = self.dtype)
+        a = normal(0.,1.,(3,3)).astype(self.dtype)
+        x = arange(shape(a)[0]*x_stride,dtype=self.dtype)
+        y = arange(shape(a)[1]*y_stride,dtype=self.dtype)
+        return alpha,a,x,y
+    def test_simple(self):
+        alpha,a,x,y = self.get_data()
+        # transpose takes care of Fortran vs. C(and Python) memory layout
+        desired_a = alpha*transpose(x[:,newaxis]*y) + a
+        self.blas_func(x,y,a)
+        assert_array_almost_equal(desired_a,a)
+    def test_x_stride(self):
+        alpha,a,x,y = self.get_data(x_stride=2)
+        desired_a = alpha*transpose(x[::2,newaxis]*y) + a
+        self.blas_func(x,y,a,incx=2)
+        assert_array_almost_equal(desired_a,a)
+    def test_x_stride_assert(self):
+        alpha,a,x,y = self.get_data(x_stride=2)
+        with pytest.raises(ValueError, match='foo'):
+            self.blas_func(x,y,a,incx=3)
+    def test_y_stride(self):
+        alpha,a,x,y = self.get_data(y_stride=2)
+        desired_a = alpha*transpose(x[:,newaxis]*y[::2]) + a
+        self.blas_func(x,y,a,incy=2)
+        assert_array_almost_equal(desired_a,a)
+
+    def test_y_stride_assert(self):
+        alpha,a,x,y = self.get_data(y_stride=2)
+        with pytest.raises(ValueError, match='foo'):
+            self.blas_func(a,x,y,incy=3)
+
+class TestSger(BaseGer):
+    blas_func = fblas.sger
+    dtype = float32
+class TestDger(BaseGer):
+    blas_func = fblas.dger
+    dtype = float64
+"""
+##################################################
+# Test blas ?gerc
+# This will be a mess to test all cases.
+
+"""
+class BaseGerComplex(BaseGer):
+    def get_data(self,x_stride=1,y_stride=1):
+        from numpy.random import normal, seed
+        seed(1234)
+        alpha = array(1+1j, dtype = self.dtype)
+        a = normal(0.,1.,(3,3)).astype(self.dtype)
+        a = a + normal(0.,1.,(3,3)) * array(1j, dtype = self.dtype)
+        x = normal(0.,1.,shape(a)[0]*x_stride).astype(self.dtype)
+        x = x + x * array(1j, dtype = self.dtype)
+        y = normal(0.,1.,shape(a)[1]*y_stride).astype(self.dtype)
+        y = y + y * array(1j, dtype = self.dtype)
+        return alpha,a,x,y
+    def test_simple(self):
+        alpha,a,x,y = self.get_data()
+        # transpose takes care of Fortran vs. C(and Python) memory layout
+        a = a * array(0.,dtype = self.dtype)
+        #desired_a = alpha*transpose(x[:,newaxis]*self.transform(y)) + a
+        desired_a = alpha*transpose(x[:,newaxis]*y) + a
+        #self.blas_func(x,y,a,alpha = alpha)
+        fblas.cgeru(x,y,a,alpha = alpha)
+        assert_array_almost_equal(desired_a,a)
+
+    #def test_x_stride(self):
+    #    alpha,a,x,y = self.get_data(x_stride=2)
+    #    desired_a = alpha*transpose(x[::2,newaxis]*self.transform(y)) + a
+    #    self.blas_func(x,y,a,incx=2)
+    #    assert_array_almost_equal(desired_a,a)
+    #def test_y_stride(self):
+    #    alpha,a,x,y = self.get_data(y_stride=2)
+    #    desired_a = alpha*transpose(x[:,newaxis]*self.transform(y[::2])) + a
+    #    self.blas_func(x,y,a,incy=2)
+    #    assert_array_almost_equal(desired_a,a)
+
+class TestCgeru(BaseGerComplex):
+    blas_func = fblas.cgeru
+    dtype = complex64
+    def transform(self,x):
+        return x
+class TestZgeru(BaseGerComplex):
+    blas_func = fblas.zgeru
+    dtype = complex128
+    def transform(self,x):
+        return x
+
+class TestCgerc(BaseGerComplex):
+    blas_func = fblas.cgerc
+    dtype = complex64
+    def transform(self,x):
+        return conjugate(x)
+
+class TestZgerc(BaseGerComplex):
+    blas_func = fblas.zgerc
+    dtype = complex128
+    def transform(self,x):
+        return conjugate(x)
+"""
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_interpolative.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_interpolative.py
new file mode 100644
index 0000000000000000000000000000000000000000..6e1cc5496eafe19ced81ea546e3bad386148ae7b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_interpolative.py
@@ -0,0 +1,232 @@
+#  ******************************************************************************
+#   Copyright (C) 2013 Kenneth L. Ho
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions are met:
+#
+#   Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer. Redistributions in binary
+#   form must reproduce the above copyright notice, this list of conditions and
+#   the following disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#
+#   None of the names of the copyright holders may be used to endorse or
+#   promote products derived from this software without specific prior written
+#   permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+#   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+#   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+#   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+#   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+#   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+#   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+#   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+#   POSSIBILITY OF SUCH DAMAGE.
+#  ******************************************************************************
+
+import scipy.linalg.interpolative as pymatrixid
+import numpy as np
+from scipy.linalg import hilbert, svdvals, norm
+from scipy.sparse.linalg import aslinearoperator
+from scipy.linalg.interpolative import interp_decomp
+
+from numpy.testing import (assert_, assert_allclose, assert_equal,
+                           assert_array_equal)
+import pytest
+from pytest import raises as assert_raises
+
+
+@pytest.fixture()
+def eps():
+    yield 1e-12
+
+
+@pytest.fixture()
+def rng():
+    rng = np.random.default_rng(1718313768084012)
+    yield rng
+
+
+@pytest.fixture(params=[np.float64, np.complex128])
+def A(request):
+    # construct Hilbert matrix
+    # set parameters
+    n = 300
+    yield hilbert(n).astype(request.param)
+
+
+@pytest.fixture()
+def L(A):
+    yield aslinearoperator(A)
+
+
+@pytest.fixture()
+def rank(A, eps):
+    S = np.linalg.svd(A, compute_uv=False)
+    try:
+        rank = np.nonzero(S < eps)[0][0]
+    except IndexError:
+        rank = A.shape[0]
+    return rank
+
+
+class TestInterpolativeDecomposition:
+
+    @pytest.mark.parametrize(
+        "rand,lin_op",
+        [(False, False), (True, False), (True, True)])
+    def test_real_id_fixed_precision(self, A, L, eps, rand, lin_op, rng):
+        # Test ID routines on a Hilbert matrix.
+        A_or_L = A if not lin_op else L
+
+        k, idx, proj = pymatrixid.interp_decomp(A_or_L, eps, rand=rand, rng=rng)
+        B = pymatrixid.reconstruct_matrix_from_id(A[:, idx[:k]], idx, proj)
+        assert_allclose(A, B, rtol=eps, atol=1e-08)
+
+    @pytest.mark.parametrize(
+        "rand,lin_op",
+        [(False, False), (True, False), (True, True)])
+    def test_real_id_fixed_rank(self, A, L, eps, rank, rand, lin_op, rng):
+        k = rank
+        A_or_L = A if not lin_op else L
+
+        idx, proj = pymatrixid.interp_decomp(A_or_L, k, rand=rand, rng=rng)
+        B = pymatrixid.reconstruct_matrix_from_id(A[:, idx[:k]], idx, proj)
+        assert_allclose(A, B, rtol=eps, atol=1e-08)
+
+    @pytest.mark.parametrize("rand,lin_op", [(False, False)])
+    def test_real_id_skel_and_interp_matrices(
+            self, A, L, eps, rank, rand, lin_op, rng):
+        k = rank
+        A_or_L = A if not lin_op else L
+
+        idx, proj = pymatrixid.interp_decomp(A_or_L, k, rand=rand, rng=rng)
+        P = pymatrixid.reconstruct_interp_matrix(idx, proj)
+        B = pymatrixid.reconstruct_skel_matrix(A, k, idx)
+        assert_allclose(B, A[:, idx[:k]], rtol=eps, atol=1e-08)
+        assert_allclose(B @ P, A, rtol=eps, atol=1e-08)
+
+    @pytest.mark.parametrize(
+        "rand,lin_op",
+        [(False, False), (True, False), (True, True)])
+    def test_svd_fixed_precision(self, A, L, eps, rand, lin_op, rng):
+        A_or_L = A if not lin_op else L
+
+        U, S, V = pymatrixid.svd(A_or_L, eps, rand=rand, rng=rng)
+        B = U * S @ V.T.conj()
+        assert_allclose(A, B, rtol=eps, atol=1e-08)
+
+    @pytest.mark.parametrize(
+        "rand,lin_op",
+        [(False, False), (True, False), (True, True)])
+    def test_svd_fixed_rank(self, A, L, eps, rank, rand, lin_op, rng):
+        k = rank
+        A_or_L = A if not lin_op else L
+
+        U, S, V = pymatrixid.svd(A_or_L, k, rand=rand, rng=rng)
+        B = U * S @ V.T.conj()
+        assert_allclose(A, B, rtol=eps, atol=1e-08)
+
+    def test_id_to_svd(self, A, eps, rank):
+        k = rank
+
+        idx, proj = pymatrixid.interp_decomp(A, k, rand=False)
+        U, S, V = pymatrixid.id_to_svd(A[:, idx[:k]], idx, proj)
+        B = U * S @ V.T.conj()
+        assert_allclose(A, B, rtol=eps, atol=1e-08)
+
+    def test_estimate_spectral_norm(self, A, rng):
+        s = svdvals(A)
+        norm_2_est = pymatrixid.estimate_spectral_norm(A, rng=rng)
+        assert_allclose(norm_2_est, s[0], rtol=1e-6, atol=1e-8)
+
+    def test_estimate_spectral_norm_diff(self, A, rng):
+        B = A.copy()
+        B[:, 0] *= 1.2
+        s = svdvals(A - B)
+        norm_2_est = pymatrixid.estimate_spectral_norm_diff(A, B, rng=rng)
+        assert_allclose(norm_2_est, s[0], rtol=1e-6, atol=1e-8)
+
+    def test_rank_estimates_array(self, A, rng):
+        B = np.array([[1, 1, 0], [0, 0, 1], [0, 0, 1]], dtype=A.dtype)
+
+        for M in [A, B]:
+            rank_tol = 1e-9
+            rank_np = np.linalg.matrix_rank(M, norm(M, 2) * rank_tol)
+            rank_est = pymatrixid.estimate_rank(M, rank_tol, rng=rng)
+            assert_(rank_est >= rank_np)
+            assert_(rank_est <= rank_np + 10)
+
+    def test_rank_estimates_lin_op(self, A, rng):
+        B = np.array([[1, 1, 0], [0, 0, 1], [0, 0, 1]], dtype=A.dtype)
+
+        for M in [A, B]:
+            ML = aslinearoperator(M)
+            rank_tol = 1e-9
+            rank_np = np.linalg.matrix_rank(M, norm(M, 2) * rank_tol)
+            rank_est = pymatrixid.estimate_rank(ML, rank_tol, rng=rng)
+            assert_(rank_est >= rank_np - 4)
+            assert_(rank_est <= rank_np + 4)
+
+    def test_badcall(self):
+        A = hilbert(5).astype(np.float32)
+        with assert_raises(ValueError):
+            pymatrixid.interp_decomp(A, 1e-6, rand=False)
+
+    def test_rank_too_large(self):
+        # svd(array, k) should not segfault
+        a = np.ones((4, 3))
+        with assert_raises(ValueError):
+            pymatrixid.svd(a, 4)
+
+    def test_full_rank(self):
+        eps = 1.0e-12
+
+        # fixed precision
+        A = np.random.rand(16, 8)
+        k, idx, proj = pymatrixid.interp_decomp(A, eps)
+        assert_equal(k, A.shape[1])
+
+        P = pymatrixid.reconstruct_interp_matrix(idx, proj)
+        B = pymatrixid.reconstruct_skel_matrix(A, k, idx)
+        assert_allclose(A, B @ P)
+
+        # fixed rank
+        idx, proj = pymatrixid.interp_decomp(A, k)
+
+        P = pymatrixid.reconstruct_interp_matrix(idx, proj)
+        B = pymatrixid.reconstruct_skel_matrix(A, k, idx)
+        assert_allclose(A, B @ P)
+
+    @pytest.mark.parametrize("dtype", [np.float64, np.complex128])
+    @pytest.mark.parametrize("rand", [True, False])
+    @pytest.mark.parametrize("eps", [1, 0.1])
+    def test_bug_9793(self, dtype, rand, eps):
+        A = np.array([[-1, -1, -1, 0, 0, 0],
+                      [0, 0, 0, 1, 1, 1],
+                      [1, 0, 0, 1, 0, 0],
+                      [0, 1, 0, 0, 1, 0],
+                      [0, 0, 1, 0, 0, 1]],
+                     dtype=dtype, order="C")
+        B = A.copy()
+        interp_decomp(A.T, eps, rand=rand)
+        assert_array_equal(A, B)
+
+    def test_svd_aslinearoperator_shape_check(self):
+        # See gh-issue #22451
+        rng = np.random.default_rng(1744580941832515)
+        x = rng.uniform(size=[7, 5])
+        xl = aslinearoperator(x)
+        u, s, v = pymatrixid.svd(xl, 3)
+        assert_equal(u.shape, (7, 3))
+        assert_equal(s.shape, (3,))
+        assert_equal(v.shape, (5, 3))
+
+        x = rng.uniform(size=[4, 9])
+        xl = aslinearoperator(x)
+        u, s, v = pymatrixid.svd(xl, 2)
+        assert_equal(u.shape, (4, 2))
+        assert_equal(s.shape, (2,))
+        assert_equal(v.shape, (9, 2))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_lapack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_lapack.py
new file mode 100644
index 0000000000000000000000000000000000000000..86555d6c19916c8ae1f6a796fb009a6b803b2159
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_lapack.py
@@ -0,0 +1,3508 @@
+#
+# Created by: Pearu Peterson, September 2002
+#
+
+from functools import reduce
+import random
+
+from numpy.testing import (assert_equal, assert_array_almost_equal, assert_,
+                           assert_allclose, assert_almost_equal,
+                           assert_array_equal)
+import pytest
+from pytest import raises as assert_raises
+
+import numpy as np
+from numpy import (eye, ones, zeros, zeros_like, triu, tril, tril_indices,
+                   triu_indices)
+
+from numpy.random import rand, randint, seed
+
+from scipy.linalg import (_flapack as flapack, lapack, inv, svd, cholesky,
+                          solve, ldl, norm, block_diag, qr, eigh, qz)
+
+from scipy.linalg.lapack import _compute_lwork
+from scipy.stats import ortho_group, unitary_group
+
+import scipy.sparse as sps
+try:
+    from scipy.__config__ import CONFIG
+except ImportError:
+    CONFIG = None
+
+try:
+    from scipy.linalg import _clapack as clapack
+except ImportError:
+    clapack = None
+from scipy.linalg.lapack import get_lapack_funcs
+from scipy.linalg.blas import get_blas_funcs
+
+REAL_DTYPES = [np.float32, np.float64]
+COMPLEX_DTYPES = [np.complex64, np.complex128]
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+blas_provider = blas_version = None
+if CONFIG is not None:
+    blas_provider = CONFIG['Build Dependencies']['blas']['name']
+    blas_version = CONFIG['Build Dependencies']['blas']['version']
+
+
+def generate_random_dtype_array(shape, dtype, rng):
+    # generates a random matrix of desired data type of shape
+    if dtype in COMPLEX_DTYPES:
+        return (rng.rand(*shape)
+                + rng.rand(*shape)*1.0j).astype(dtype)
+    return rng.rand(*shape).astype(dtype)
+
+
+def test_lapack_documented():
+    """Test that all entries are in the doc."""
+    if lapack.__doc__ is None:  # just in case there is a python -OO
+        pytest.skip('lapack.__doc__ is None')
+    names = set(lapack.__doc__.split())
+    ignore_list = {
+        "absolute_import",
+        "clapack",
+        "division",
+        "find_best_lapack_type",
+        "flapack",
+        "print_function",
+        "HAS_ILP64",
+        "np",
+    }
+    missing = list()
+    for name in dir(lapack):
+        if (not name.startswith('_') and name not in ignore_list and
+                name not in names):
+            missing.append(name)
+    assert missing == [], 'Name(s) missing from lapack.__doc__ or ignore_list'
+
+
+class TestFlapackSimple:
+
+    def test_gebal(self):
+        a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
+        a1 = [[1, 0, 0, 3e-4],
+              [4, 0, 0, 2e-3],
+              [7, 1, 0, 0],
+              [0, 1, 0, 0]]
+        for p in 'sdzc':
+            f = getattr(flapack, p+'gebal', None)
+            if f is None:
+                continue
+            ba, lo, hi, pivscale, info = f(a)
+            assert_(not info, repr(info))
+            assert_array_almost_equal(ba, a)
+            assert_equal((lo, hi), (0, len(a[0])-1))
+            assert_array_almost_equal(pivscale, np.ones(len(a)))
+
+            ba, lo, hi, pivscale, info = f(a1, permute=1, scale=1)
+            assert_(not info, repr(info))
+            # print(a1)
+            # print(ba, lo, hi, pivscale)
+
+    def test_gehrd(self):
+        a = [[-149, -50, -154],
+             [537, 180, 546],
+             [-27, -9, -25]]
+        for p in 'd':
+            f = getattr(flapack, p+'gehrd', None)
+            if f is None:
+                continue
+            ht, tau, info = f(a)
+            assert_(not info, repr(info))
+
+    def test_trsyl(self):
+        a = np.array([[1, 2], [0, 4]])
+        b = np.array([[5, 6], [0, 8]])
+        c = np.array([[9, 10], [11, 12]])
+        trans = 'T'
+
+        # Test single and double implementations, including most
+        # of the options
+        for dtype in 'fdFD':
+            a1, b1, c1 = a.astype(dtype), b.astype(dtype), c.astype(dtype)
+            trsyl, = get_lapack_funcs(('trsyl',), (a1,))
+            if dtype.isupper():  # is complex dtype
+                a1[0] += 1j
+                trans = 'C'
+
+            x, scale, info = trsyl(a1, b1, c1)
+            assert_array_almost_equal(np.dot(a1, x) + np.dot(x, b1),
+                                      scale * c1)
+
+            x, scale, info = trsyl(a1, b1, c1, trana=trans, tranb=trans)
+            assert_array_almost_equal(
+                    np.dot(a1.conjugate().T, x) + np.dot(x, b1.conjugate().T),
+                    scale * c1, decimal=4)
+
+            x, scale, info = trsyl(a1, b1, c1, isgn=-1)
+            assert_array_almost_equal(np.dot(a1, x) - np.dot(x, b1),
+                                      scale * c1, decimal=4)
+
+    def test_lange(self):
+        a = np.array([
+            [-149, -50, -154],
+            [537, 180, 546],
+            [-27, -9, -25]])
+
+        for dtype in 'fdFD':
+            for norm_str in 'Mm1OoIiFfEe':
+                a1 = a.astype(dtype)
+                if dtype.isupper():
+                    # is complex dtype
+                    a1[0, 0] += 1j
+
+                lange, = get_lapack_funcs(('lange',), (a1,))
+                value = lange(norm_str, a1)
+
+                if norm_str in 'FfEe':
+                    if dtype in 'Ff':
+                        decimal = 3
+                    else:
+                        decimal = 7
+                    ref = np.sqrt(np.sum(np.square(np.abs(a1))))
+                    assert_almost_equal(value, ref, decimal)
+                else:
+                    if norm_str in 'Mm':
+                        ref = np.max(np.abs(a1))
+                    elif norm_str in '1Oo':
+                        ref = np.max(np.sum(np.abs(a1), axis=0))
+                    elif norm_str in 'Ii':
+                        ref = np.max(np.sum(np.abs(a1), axis=1))
+
+                    assert_equal(value, ref)
+
+
+class TestLapack:
+
+    def test_flapack(self):
+        if hasattr(flapack, 'empty_module'):
+            # flapack module is empty
+            pass
+
+    def test_clapack(self):
+        if hasattr(clapack, 'empty_module'):
+            # clapack module is empty
+            pass
+
+
+class TestLeastSquaresSolvers:
+
+    def test_gels(self):
+        seed(1234)
+        # Test fat/tall matrix argument handling - gh-issue #8329
+        for ind, dtype in enumerate(DTYPES):
+            m = 10
+            n = 20
+            nrhs = 1
+            a1 = rand(m, n).astype(dtype)
+            b1 = rand(n).astype(dtype)
+            gls, glslw = get_lapack_funcs(('gels', 'gels_lwork'), dtype=dtype)
+
+            # Request of sizes
+            lwork = _compute_lwork(glslw, m, n, nrhs)
+            _, _, info = gls(a1, b1, lwork=lwork)
+            assert_(info >= 0)
+            _, _, info = gls(a1, b1, trans='TTCC'[ind], lwork=lwork)
+            assert_(info >= 0)
+
+        for dtype in REAL_DTYPES:
+            a1 = np.array([[1.0, 2.0],
+                           [4.0, 5.0],
+                           [7.0, 8.0]], dtype=dtype)
+            b1 = np.array([16.0, 17.0, 20.0], dtype=dtype)
+            gels, gels_lwork, geqrf = get_lapack_funcs(
+                    ('gels', 'gels_lwork', 'geqrf'), (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            lwork = _compute_lwork(gels_lwork, m, n, nrhs)
+
+            lqr, x, info = gels(a1, b1, lwork=lwork)
+            assert_allclose(x[:-1], np.array([-14.333333333333323,
+                                              14.999999999999991],
+                                             dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+            lqr_truth, _, _, _ = geqrf(a1)
+            assert_array_equal(lqr, lqr_truth)
+
+        for dtype in COMPLEX_DTYPES:
+            a1 = np.array([[1.0+4.0j, 2.0],
+                           [4.0+0.5j, 5.0-3.0j],
+                           [7.0-2.0j, 8.0+0.7j]], dtype=dtype)
+            b1 = np.array([16.0, 17.0+2.0j, 20.0-4.0j], dtype=dtype)
+            gels, gels_lwork, geqrf = get_lapack_funcs(
+                    ('gels', 'gels_lwork', 'geqrf'), (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            lwork = _compute_lwork(gels_lwork, m, n, nrhs)
+
+            lqr, x, info = gels(a1, b1, lwork=lwork)
+            assert_allclose(x[:-1],
+                            np.array([1.161753632288328-1.901075709391912j,
+                                      1.735882340522193+1.521240901196909j],
+                                     dtype=dtype), rtol=25*np.finfo(dtype).eps)
+            lqr_truth, _, _, _ = geqrf(a1)
+            assert_array_equal(lqr, lqr_truth)
+
+    def test_gelsd(self):
+        for dtype in REAL_DTYPES:
+            a1 = np.array([[1.0, 2.0],
+                           [4.0, 5.0],
+                           [7.0, 8.0]], dtype=dtype)
+            b1 = np.array([16.0, 17.0, 20.0], dtype=dtype)
+            gelsd, gelsd_lwork = get_lapack_funcs(('gelsd', 'gelsd_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, iwork, info = gelsd_lwork(m, n, nrhs, -1)
+            lwork = int(np.real(work))
+            iwork_size = iwork
+
+            x, s, rank, info = gelsd(a1, b1, lwork, iwork_size,
+                                     -1, False, False)
+            assert_allclose(x[:-1], np.array([-14.333333333333323,
+                                              14.999999999999991],
+                                             dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+            assert_allclose(s, np.array([12.596017180511966,
+                                         0.583396253199685], dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+
+        for dtype in COMPLEX_DTYPES:
+            a1 = np.array([[1.0+4.0j, 2.0],
+                           [4.0+0.5j, 5.0-3.0j],
+                           [7.0-2.0j, 8.0+0.7j]], dtype=dtype)
+            b1 = np.array([16.0, 17.0+2.0j, 20.0-4.0j], dtype=dtype)
+            gelsd, gelsd_lwork = get_lapack_funcs(('gelsd', 'gelsd_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, rwork, iwork, info = gelsd_lwork(m, n, nrhs, -1)
+            lwork = int(np.real(work))
+            rwork_size = int(rwork)
+            iwork_size = iwork
+
+            x, s, rank, info = gelsd(a1, b1, lwork, rwork_size, iwork_size,
+                                     -1, False, False)
+            assert_allclose(x[:-1],
+                            np.array([1.161753632288328-1.901075709391912j,
+                                      1.735882340522193+1.521240901196909j],
+                                     dtype=dtype), rtol=25*np.finfo(dtype).eps)
+            assert_allclose(s,
+                            np.array([13.035514762572043, 4.337666985231382],
+                                     dtype=dtype), rtol=25*np.finfo(dtype).eps)
+
+    def test_gelss(self):
+
+        for dtype in REAL_DTYPES:
+            a1 = np.array([[1.0, 2.0],
+                           [4.0, 5.0],
+                           [7.0, 8.0]], dtype=dtype)
+            b1 = np.array([16.0, 17.0, 20.0], dtype=dtype)
+            gelss, gelss_lwork = get_lapack_funcs(('gelss', 'gelss_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, info = gelss_lwork(m, n, nrhs, -1)
+            lwork = int(np.real(work))
+
+            v, x, s, rank, work, info = gelss(a1, b1, -1, lwork, False, False)
+            assert_allclose(x[:-1], np.array([-14.333333333333323,
+                                              14.999999999999991],
+                                             dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+            assert_allclose(s, np.array([12.596017180511966,
+                                         0.583396253199685], dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+
+        for dtype in COMPLEX_DTYPES:
+            a1 = np.array([[1.0+4.0j, 2.0],
+                           [4.0+0.5j, 5.0-3.0j],
+                           [7.0-2.0j, 8.0+0.7j]], dtype=dtype)
+            b1 = np.array([16.0, 17.0+2.0j, 20.0-4.0j], dtype=dtype)
+            gelss, gelss_lwork = get_lapack_funcs(('gelss', 'gelss_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, info = gelss_lwork(m, n, nrhs, -1)
+            lwork = int(np.real(work))
+
+            v, x, s, rank, work, info = gelss(a1, b1, -1, lwork, False, False)
+            assert_allclose(x[:-1],
+                            np.array([1.161753632288328-1.901075709391912j,
+                                      1.735882340522193+1.521240901196909j],
+                                     dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+            assert_allclose(s, np.array([13.035514762572043,
+                                         4.337666985231382], dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+
+    def test_gelsy(self):
+
+        for dtype in REAL_DTYPES:
+            a1 = np.array([[1.0, 2.0],
+                           [4.0, 5.0],
+                           [7.0, 8.0]], dtype=dtype)
+            b1 = np.array([16.0, 17.0, 20.0], dtype=dtype)
+            gelsy, gelsy_lwork = get_lapack_funcs(('gelsy', 'gelss_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, info = gelsy_lwork(m, n, nrhs, 10*np.finfo(dtype).eps)
+            lwork = int(np.real(work))
+
+            jptv = np.zeros((a1.shape[1], 1), dtype=np.int32)
+            v, x, j, rank, info = gelsy(a1, b1, jptv, np.finfo(dtype).eps,
+                                        lwork, False, False)
+            assert_allclose(x[:-1], np.array([-14.333333333333323,
+                                              14.999999999999991],
+                                             dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+
+        for dtype in COMPLEX_DTYPES:
+            a1 = np.array([[1.0+4.0j, 2.0],
+                           [4.0+0.5j, 5.0-3.0j],
+                           [7.0-2.0j, 8.0+0.7j]], dtype=dtype)
+            b1 = np.array([16.0, 17.0+2.0j, 20.0-4.0j], dtype=dtype)
+            gelsy, gelsy_lwork = get_lapack_funcs(('gelsy', 'gelss_lwork'),
+                                                  (a1, b1))
+
+            m, n = a1.shape
+            if len(b1.shape) == 2:
+                nrhs = b1.shape[1]
+            else:
+                nrhs = 1
+
+            # Request of sizes
+            work, info = gelsy_lwork(m, n, nrhs, 10*np.finfo(dtype).eps)
+            lwork = int(np.real(work))
+
+            jptv = np.zeros((a1.shape[1], 1), dtype=np.int32)
+            v, x, j, rank, info = gelsy(a1, b1, jptv, np.finfo(dtype).eps,
+                                        lwork, False, False)
+            assert_allclose(x[:-1],
+                            np.array([1.161753632288328-1.901075709391912j,
+                                      1.735882340522193+1.521240901196909j],
+                                     dtype=dtype),
+                            rtol=25*np.finfo(dtype).eps)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('shape', [(3, 4), (5, 2), (2**18, 2**18)])
+def test_geqrf_lwork(dtype, shape):
+    geqrf_lwork = get_lapack_funcs(('geqrf_lwork'), dtype=dtype)
+    m, n = shape
+    lwork, info = geqrf_lwork(m=m, n=n)
+    assert_equal(info, 0)
+
+
+class TestRegression:
+
+    def test_ticket_1645(self):
+        # Check that RQ routines have correct lwork
+        for dtype in DTYPES:
+            a = np.zeros((300, 2), dtype=dtype)
+
+            gerqf, = get_lapack_funcs(['gerqf'], [a])
+            assert_raises(Exception, gerqf, a, lwork=2)
+            rq, tau, work, info = gerqf(a)
+
+            if dtype in REAL_DTYPES:
+                orgrq, = get_lapack_funcs(['orgrq'], [a])
+                assert_raises(Exception, orgrq, rq[-2:], tau, lwork=1)
+                orgrq(rq[-2:], tau, lwork=2)
+            elif dtype in COMPLEX_DTYPES:
+                ungrq, = get_lapack_funcs(['ungrq'], [a])
+                assert_raises(Exception, ungrq, rq[-2:], tau, lwork=1)
+                ungrq(rq[-2:], tau, lwork=2)
+
+
+class TestDpotr:
+    def test_gh_2691(self):
+        # 'lower' argument of dportf/dpotri
+        for lower in [True, False]:
+            for clean in [True, False]:
+                np.random.seed(42)
+                x = np.random.normal(size=(3, 3))
+                a = x.dot(x.T)
+
+                dpotrf, dpotri = get_lapack_funcs(("potrf", "potri"), (a, ))
+
+                c, info = dpotrf(a, lower, clean=clean)
+                dpt = dpotri(c, lower)[0]
+
+                if lower:
+                    assert_allclose(np.tril(dpt), np.tril(inv(a)))
+                else:
+                    assert_allclose(np.triu(dpt), np.triu(inv(a)))
+
+
+class TestDlasd4:
+    def test_sing_val_update(self):
+
+        sigmas = np.array([4., 3., 2., 0])
+        m_vec = np.array([3.12, 5.7, -4.8, -2.2])
+
+        M = np.hstack((np.vstack((np.diag(sigmas[0:-1]),
+                                  np.zeros((1, len(m_vec) - 1)))),
+                       m_vec[:, np.newaxis]))
+        SM = svd(M, full_matrices=False, compute_uv=False, overwrite_a=False,
+                 check_finite=False)
+
+        it_len = len(sigmas)
+        sgm = np.concatenate((sigmas[::-1], [sigmas[0] + it_len*norm(m_vec)]))
+        mvc = np.concatenate((m_vec[::-1], (0,)))
+
+        lasd4 = get_lapack_funcs('lasd4', (sigmas,))
+
+        roots = []
+        for i in range(0, it_len):
+            res = lasd4(i, sgm, mvc)
+            roots.append(res[1])
+
+            assert_((res[3] <= 0), "LAPACK root finding dlasd4 failed to find \
+                                    the singular value %i" % i)
+        roots = np.array(roots)[::-1]
+
+        assert_((not np.any(np.isnan(roots)), "There are NaN roots"))
+        assert_allclose(SM, roots, atol=100*np.finfo(np.float64).eps,
+                        rtol=100*np.finfo(np.float64).eps)
+
+
+class TestTbtrs:
+
+    @pytest.mark.parametrize('dtype', DTYPES)
+    def test_nag_example_f07vef_f07vsf(self, dtype):
+        """Test real (f07vef) and complex (f07vsf) examples from NAG
+
+        Examples available from:
+        * https://www.nag.com/numeric/fl/nagdoc_latest/html/f07/f07vef.html
+        * https://www.nag.com/numeric/fl/nagdoc_latest/html/f07/f07vsf.html
+
+        """
+        if dtype in REAL_DTYPES:
+            ab = np.array([[-4.16, 4.78, 6.32, 0.16],
+                           [-2.25, 5.86, -4.82, 0]],
+                          dtype=dtype)
+            b = np.array([[-16.64, -4.16],
+                          [-13.78, -16.59],
+                          [13.10, -4.94],
+                          [-14.14, -9.96]],
+                         dtype=dtype)
+            x_out = np.array([[4, 1],
+                              [-1, -3],
+                              [3, 2],
+                              [2, -2]],
+                             dtype=dtype)
+        elif dtype in COMPLEX_DTYPES:
+            ab = np.array([[-1.94+4.43j, 4.12-4.27j, 0.43-2.66j, 0.44+0.1j],
+                           [-3.39+3.44j, -1.84+5.52j, 1.74 - 0.04j, 0],
+                           [1.62+3.68j, -2.77-1.93j, 0, 0]],
+                          dtype=dtype)
+            b = np.array([[-8.86 - 3.88j, -24.09 - 5.27j],
+                          [-15.57 - 23.41j, -57.97 + 8.14j],
+                          [-7.63 + 22.78j, 19.09 - 29.51j],
+                          [-14.74 - 2.40j, 19.17 + 21.33j]],
+                         dtype=dtype)
+            x_out = np.array([[2j, 1 + 5j],
+                              [1 - 3j, -7 - 2j],
+                              [-4.001887 - 4.988417j, 3.026830 + 4.003182j],
+                              [1.996158 - 1.045105j, -6.103357 - 8.986653j]],
+                             dtype=dtype)
+        else:
+            raise ValueError(f"Datatype {dtype} not understood.")
+
+        tbtrs = get_lapack_funcs(('tbtrs'), dtype=dtype)
+        x, info = tbtrs(ab=ab, b=b, uplo='L')
+        assert_equal(info, 0)
+        assert_allclose(x, x_out, rtol=0, atol=1e-5)
+
+    @pytest.mark.parametrize('dtype,trans',
+                             [(dtype, trans)
+                              for dtype in DTYPES for trans in ['N', 'T', 'C']
+                              if not (trans == 'C' and dtype in REAL_DTYPES)])
+    @pytest.mark.parametrize('uplo', ['U', 'L'])
+    @pytest.mark.parametrize('diag', ['N', 'U'])
+    def test_random_matrices(self, dtype, trans, uplo, diag):
+        rng = np.random.RandomState(1724)
+
+        # n, nrhs, kd are used to specify A and b.
+        # A is of shape n x n with kd super/sub-diagonals
+        # b is of shape n x nrhs matrix
+        n, nrhs, kd = 4, 3, 2
+        tbtrs = get_lapack_funcs('tbtrs', dtype=dtype)
+
+        is_upper = (uplo == 'U')
+        ku = kd * is_upper
+        kl = kd - ku
+
+        # Construct the diagonal and kd super/sub diagonals of A with
+        # the corresponding offsets.
+        band_offsets = range(ku, -kl - 1, -1)
+        band_widths = [n - abs(x) for x in band_offsets]
+        bands = [generate_random_dtype_array((width,), dtype, rng)
+                 for width in band_widths]
+
+        if diag == 'U':  # A must be unit triangular
+            bands[ku] = np.ones(n, dtype=dtype)
+
+        # Construct the diagonal banded matrix A from the bands and offsets.
+        a = sps.diags(bands, band_offsets, format='dia')
+
+        # Convert A into banded storage form
+        ab = np.zeros((kd + 1, n), dtype)
+        for row, k in enumerate(band_offsets):
+            ab[row, max(k, 0):min(n+k, n)] = a.diagonal(k)
+
+        # The RHS values.
+        b = generate_random_dtype_array((n, nrhs), dtype, rng)
+
+        x, info = tbtrs(ab=ab, b=b, uplo=uplo, trans=trans, diag=diag)
+        assert_equal(info, 0)
+
+        if trans == 'N':
+            assert_allclose(a @ x, b, rtol=5e-5)
+        elif trans == 'T':
+            assert_allclose(a.T @ x, b, rtol=5e-5)
+        elif trans == 'C':
+            assert_allclose(a.T.conjugate() @ x, b, rtol=5e-5)
+        else:
+            raise ValueError('Invalid trans argument')
+
+    @pytest.mark.parametrize('uplo,trans,diag',
+                             [['U', 'N', 'Invalid'],
+                              ['U', 'Invalid', 'N'],
+                              ['Invalid', 'N', 'N']])
+    def test_invalid_argument_raises_exception(self, uplo, trans, diag):
+        """Test if invalid values of uplo, trans and diag raise exceptions"""
+        # Argument checks occur independently of used datatype.
+        # This mean we must not parameterize all available datatypes.
+        tbtrs = get_lapack_funcs('tbtrs', dtype=np.float64)
+        ab = rand(4, 2)
+        b = rand(2, 4)
+        assert_raises(Exception, tbtrs, ab, b, uplo, trans, diag)
+
+    def test_zero_element_in_diagonal(self):
+        """Test if a matrix with a zero diagonal element is singular
+
+        If the i-th diagonal of A is zero, ?tbtrs should return `i` in `info`
+        indicating the provided matrix is singular.
+
+        Note that ?tbtrs requires the matrix A to be stored in banded form.
+        In this form the diagonal corresponds to the last row."""
+        ab = np.ones((3, 4), dtype=float)
+        b = np.ones(4, dtype=float)
+        tbtrs = get_lapack_funcs('tbtrs', dtype=float)
+
+        ab[-1, 3] = 0
+        _, info = tbtrs(ab=ab, b=b, uplo='U')
+        assert_equal(info, 4)
+
+    @pytest.mark.parametrize('ldab,n,ldb,nrhs', [
+                              (5, 5, 0, 5),
+                              (5, 5, 3, 5)
+    ])
+    def test_invalid_matrix_shapes(self, ldab, n, ldb, nrhs):
+        """Test ?tbtrs fails correctly if shapes are invalid."""
+        ab = np.ones((ldab, n), dtype=float)
+        b = np.ones((ldb, nrhs), dtype=float)
+        tbtrs = get_lapack_funcs('tbtrs', dtype=float)
+        assert_raises(Exception, tbtrs, ab, b)
+
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('norm', ['I', '1', 'O'])
+@pytest.mark.parametrize('uplo', ['U', 'L'])
+@pytest.mark.parametrize('diag', ['N', 'U'])
+@pytest.mark.parametrize('n', [3, 10])
+def test_trcon(dtype, norm, uplo, diag, n):
+    # Simple way to get deterministic (unlike `hash`) integer seed based on arguments
+    random.seed(f"{dtype}{norm}{uplo}{diag}{n}")
+    rng = np.random.default_rng(random.randint(0, 9999999999999))
+
+    A = rng.random(size=(n, n)) + rng.random(size=(n, n))*1j
+    # make the condition numbers more interesting
+    offset = rng.permuted(np.logspace(0, rng.integers(0, 10), n))
+    A += offset
+    A = A.real if np.issubdtype(dtype, np.floating) else A
+    A = np.triu(A) if uplo == 'U' else np.tril(A)
+    if diag == 'U':
+        A /= np.diag(A)[:, np.newaxis]
+    A = A.astype(dtype)
+
+    trcon = get_lapack_funcs('trcon', (A,))
+    res, _ = trcon(A, norm=norm, uplo=uplo, diag=diag)
+
+    if norm == 'I':
+        norm_A = np.linalg.norm(A, ord=np.inf)
+        norm_inv_A = np.linalg.norm(np.linalg.inv(A), ord=np.inf)
+        ref = 1 / (norm_A * norm_inv_A)
+    else:
+        anorm = np.abs(A).sum(axis=0).max()
+        gecon, getrf = get_lapack_funcs(('gecon', 'getrf'), (A,))
+        lu, ipvt, info = getrf(A)
+        ref, _ = gecon(lu, anorm, norm=norm)
+
+    # This is an estimate of reciprocal condition number; we just need order of
+    # magnitude. In testing, we observed that much smaller rtol is OK in almost
+    # all cases... but sometimes it isn't.
+    rtol = 1  # np.finfo(dtype).eps**0.75
+    assert_allclose(res, ref, rtol=rtol)
+
+
+def test_lartg():
+    for dtype in 'fdFD':
+        lartg = get_lapack_funcs('lartg', dtype=dtype)
+
+        f = np.array(3, dtype)
+        g = np.array(4, dtype)
+
+        if np.iscomplexobj(g):
+            g *= 1j
+
+        cs, sn, r = lartg(f, g)
+
+        assert_allclose(cs, 3.0/5.0)
+        assert_allclose(r, 5.0)
+
+        if np.iscomplexobj(g):
+            assert_allclose(sn, -4.0j/5.0)
+            assert_(isinstance(r, complex))
+            assert_(isinstance(cs, float))
+        else:
+            assert_allclose(sn, 4.0/5.0)
+
+
+def test_rot():
+    # srot, drot from blas and crot and zrot from lapack.
+
+    for dtype in 'fdFD':
+        c = 0.6
+        s = 0.8
+
+        u = np.full(4, 3, dtype)
+        v = np.full(4, 4, dtype)
+        atol = 10**-(np.finfo(dtype).precision-1)
+
+        if dtype in 'fd':
+            rot = get_blas_funcs('rot', dtype=dtype)
+            f = 4
+        else:
+            rot = get_lapack_funcs('rot', dtype=dtype)
+            s *= -1j
+            v *= 1j
+            f = 4j
+
+        assert_allclose(rot(u, v, c, s), [[5, 5, 5, 5],
+                                          [0, 0, 0, 0]], atol=atol)
+        assert_allclose(rot(u, v, c, s, n=2), [[5, 5, 3, 3],
+                                               [0, 0, f, f]], atol=atol)
+        assert_allclose(rot(u, v, c, s, offx=2, offy=2),
+                        [[3, 3, 5, 5], [f, f, 0, 0]], atol=atol)
+        assert_allclose(rot(u, v, c, s, incx=2, offy=2, n=2),
+                        [[5, 3, 5, 3], [f, f, 0, 0]], atol=atol)
+        assert_allclose(rot(u, v, c, s, offx=2, incy=2, n=2),
+                        [[3, 3, 5, 5], [0, f, 0, f]], atol=atol)
+        assert_allclose(rot(u, v, c, s, offx=2, incx=2, offy=2, incy=2, n=1),
+                        [[3, 3, 5, 3], [f, f, 0, f]], atol=atol)
+        assert_allclose(rot(u, v, c, s, incx=-2, incy=-2, n=2),
+                        [[5, 3, 5, 3], [0, f, 0, f]], atol=atol)
+
+        a, b = rot(u, v, c, s, overwrite_x=1, overwrite_y=1)
+        assert_(a is u)
+        assert_(b is v)
+        assert_allclose(a, [5, 5, 5, 5], atol=atol)
+        assert_allclose(b, [0, 0, 0, 0], atol=atol)
+
+
+def test_larfg_larf():
+    np.random.seed(1234)
+    a0 = np.random.random((4, 4))
+    a0 = a0.T.dot(a0)
+
+    a0j = np.random.random((4, 4)) + 1j*np.random.random((4, 4))
+    a0j = a0j.T.conj().dot(a0j)
+
+    # our test here will be to do one step of reducing a hermetian matrix to
+    # tridiagonal form using householder transforms.
+
+    for dtype in 'fdFD':
+        larfg, larf = get_lapack_funcs(['larfg', 'larf'], dtype=dtype)
+
+        if dtype in 'FD':
+            a = a0j.copy()
+        else:
+            a = a0.copy()
+
+        # generate a householder transform to clear a[2:,0]
+        alpha, x, tau = larfg(a.shape[0]-1, a[1, 0], a[2:, 0])
+
+        # create expected output
+        expected = np.zeros_like(a[:, 0])
+        expected[0] = a[0, 0]
+        expected[1] = alpha
+
+        # assemble householder vector
+        v = np.zeros_like(a[1:, 0])
+        v[0] = 1.0
+        v[1:] = x
+
+        # apply transform from the left
+        a[1:, :] = larf(v, tau.conjugate(), a[1:, :], np.zeros(a.shape[1]))
+
+        # apply transform from the right
+        a[:, 1:] = larf(v, tau, a[:, 1:], np.zeros(a.shape[0]), side='R')
+
+        assert_allclose(a[:, 0], expected, atol=1e-5)
+        assert_allclose(a[0, :], expected, atol=1e-5)
+
+
+def test_sgesdd_lwork_bug_workaround():
+    # Test that SGESDD lwork is sufficiently large for LAPACK.
+    #
+    # This checks that _compute_lwork() correctly works around a bug in
+    # LAPACK versions older than 3.10.1.
+
+    sgesdd_lwork = get_lapack_funcs('gesdd_lwork', dtype=np.float32,
+                                    ilp64='preferred')
+    n = 9537
+    lwork = _compute_lwork(sgesdd_lwork, n, n,
+                           compute_uv=True, full_matrices=True)
+    # If we called the Fortran function SGESDD directly with IWORK=-1, the
+    # LAPACK bug would result in lwork being 272929856, which was too small.
+    # (The result was returned in a single precision float, which does not
+    # have sufficient precision to represent the exact integer value that it
+    # computed internally.)  The work-around implemented in _compute_lwork()
+    # will convert that to 272929888.  If we are using LAPACK 3.10.1 or later
+    # (such as in OpenBLAS 0.3.21 or later), the work-around will return
+    # 272929920, because it does not know which version of LAPACK is being
+    # used, so it always applies the correction to whatever it is given.  We
+    # will accept either 272929888 or 272929920.
+    # Note that the acceptable values are a LAPACK implementation detail.
+    # If a future version of LAPACK changes how SGESDD works, and therefore
+    # changes the required LWORK size, the acceptable values might have to
+    # be updated.
+    assert lwork == 272929888 or lwork == 272929920
+
+
+class TestSytrd:
+    @pytest.mark.parametrize('dtype', REAL_DTYPES)
+    def test_sytrd_with_zero_dim_array(self, dtype):
+        # Assert that a 0x0 matrix raises an error
+        A = np.zeros((0, 0), dtype=dtype)
+        sytrd = get_lapack_funcs('sytrd', (A,))
+        assert_raises(ValueError, sytrd, A)
+
+    @pytest.mark.parametrize('dtype', REAL_DTYPES)
+    @pytest.mark.parametrize('n', (1, 3))
+    def test_sytrd(self, dtype, n):
+        A = np.zeros((n, n), dtype=dtype)
+
+        sytrd, sytrd_lwork = \
+            get_lapack_funcs(('sytrd', 'sytrd_lwork'), (A,))
+
+        # some upper triangular array
+        A[np.triu_indices_from(A)] = \
+            np.arange(1, n*(n+1)//2+1, dtype=dtype)
+
+        # query lwork
+        lwork, info = sytrd_lwork(n)
+        assert_equal(info, 0)
+
+        # check lower=1 behavior (shouldn't do much since the matrix is
+        # upper triangular)
+        data, d, e, tau, info = sytrd(A, lower=1, lwork=lwork)
+        assert_equal(info, 0)
+
+        assert_allclose(data, A, atol=5*np.finfo(dtype).eps, rtol=1.0)
+        assert_allclose(d, np.diag(A))
+        assert_allclose(e, 0.0)
+        assert_allclose(tau, 0.0)
+
+        # and now for the proper test (lower=0 is the default)
+        data, d, e, tau, info = sytrd(A, lwork=lwork)
+        assert_equal(info, 0)
+
+        # assert Q^T*A*Q = tridiag(e, d, e)
+
+        # build tridiagonal matrix
+        T = np.zeros_like(A, dtype=dtype)
+        k = np.arange(A.shape[0])
+        T[k, k] = d
+        k2 = np.arange(A.shape[0]-1)
+        T[k2+1, k2] = e
+        T[k2, k2+1] = e
+
+        # build Q
+        Q = np.eye(n, n, dtype=dtype)
+        for i in range(n-1):
+            v = np.zeros(n, dtype=dtype)
+            v[:i] = data[:i, i+1]
+            v[i] = 1.0
+            H = np.eye(n, n, dtype=dtype) - tau[i] * np.outer(v, v)
+            Q = np.dot(H, Q)
+
+        # Make matrix fully symmetric
+        i_lower = np.tril_indices(n, -1)
+        A[i_lower] = A.T[i_lower]
+
+        QTAQ = np.dot(Q.T, np.dot(A, Q))
+
+        # disable rtol here since some values in QTAQ and T are very close
+        # to 0.
+        assert_allclose(QTAQ, T, atol=5*np.finfo(dtype).eps, rtol=1.0)
+
+
+class TestHetrd:
+    @pytest.mark.parametrize('complex_dtype', COMPLEX_DTYPES)
+    def test_hetrd_with_zero_dim_array(self, complex_dtype):
+        # Assert that a 0x0 matrix raises an error
+        A = np.zeros((0, 0), dtype=complex_dtype)
+        hetrd = get_lapack_funcs('hetrd', (A,))
+        assert_raises(ValueError, hetrd, A)
+
+    @pytest.mark.parametrize('real_dtype,complex_dtype',
+                             zip(REAL_DTYPES, COMPLEX_DTYPES))
+    @pytest.mark.parametrize('n', (1, 3))
+    def test_hetrd(self, n, real_dtype, complex_dtype):
+        A = np.zeros((n, n), dtype=complex_dtype)
+        hetrd, hetrd_lwork = \
+            get_lapack_funcs(('hetrd', 'hetrd_lwork'), (A,))
+
+        # some upper triangular array
+        A[np.triu_indices_from(A)] = (
+            np.arange(1, n*(n+1)//2+1, dtype=real_dtype)
+            + 1j * np.arange(1, n*(n+1)//2+1, dtype=real_dtype)
+            )
+        np.fill_diagonal(A, np.real(np.diag(A)))
+
+        # test query lwork
+        for x in [0, 1]:
+            _, info = hetrd_lwork(n, lower=x)
+            assert_equal(info, 0)
+        # lwork returns complex which segfaults hetrd call (gh-10388)
+        # use the safe and recommended option
+        lwork = _compute_lwork(hetrd_lwork, n)
+
+        # check lower=1 behavior (shouldn't do much since the matrix is
+        # upper triangular)
+        data, d, e, tau, info = hetrd(A, lower=1, lwork=lwork)
+        assert_equal(info, 0)
+
+        assert_allclose(data, A, atol=5*np.finfo(real_dtype).eps, rtol=1.0)
+
+        assert_allclose(d, np.real(np.diag(A)))
+        assert_allclose(e, 0.0)
+        assert_allclose(tau, 0.0)
+
+        # and now for the proper test (lower=0 is the default)
+        data, d, e, tau, info = hetrd(A, lwork=lwork)
+        assert_equal(info, 0)
+
+        # assert Q^T*A*Q = tridiag(e, d, e)
+
+        # build tridiagonal matrix
+        T = np.zeros_like(A, dtype=real_dtype)
+        k = np.arange(A.shape[0], dtype=int)
+        T[k, k] = d
+        k2 = np.arange(A.shape[0]-1, dtype=int)
+        T[k2+1, k2] = e
+        T[k2, k2+1] = e
+
+        # build Q
+        Q = np.eye(n, n, dtype=complex_dtype)
+        for i in range(n-1):
+            v = np.zeros(n, dtype=complex_dtype)
+            v[:i] = data[:i, i+1]
+            v[i] = 1.0
+            H = np.eye(n, n, dtype=complex_dtype) \
+                - tau[i] * np.outer(v, np.conj(v))
+            Q = np.dot(H, Q)
+
+        # Make matrix fully Hermitian
+        i_lower = np.tril_indices(n, -1)
+        A[i_lower] = np.conj(A.T[i_lower])
+
+        QHAQ = np.dot(np.conj(Q.T), np.dot(A, Q))
+
+        # disable rtol here since some values in QTAQ and T are very close
+        # to 0.
+        assert_allclose(
+            QHAQ, T, atol=10*np.finfo(real_dtype).eps, rtol=1.0
+            )
+
+
+def test_gglse():
+    # Example data taken from NAG manual
+    for ind, dtype in enumerate(DTYPES):
+        # DTYPES =  gglse
+        func, func_lwork = get_lapack_funcs(('gglse', 'gglse_lwork'),
+                                            dtype=dtype)
+        lwork = _compute_lwork(func_lwork, m=6, n=4, p=2)
+        # For gglse
+        if ind < 2:
+            a = np.array([[-0.57, -1.28, -0.39, 0.25],
+                          [-1.93, 1.08, -0.31, -2.14],
+                          [2.30, 0.24, 0.40, -0.35],
+                          [-1.93, 0.64, -0.66, 0.08],
+                          [0.15, 0.30, 0.15, -2.13],
+                          [-0.02, 1.03, -1.43, 0.50]], dtype=dtype)
+            c = np.array([-1.50, -2.14, 1.23, -0.54, -1.68, 0.82], dtype=dtype)
+            d = np.array([0., 0.], dtype=dtype)
+        # For gglse
+        else:
+            a = np.array([[0.96-0.81j, -0.03+0.96j, -0.91+2.06j, -0.05+0.41j],
+                          [-0.98+1.98j, -1.20+0.19j, -0.66+0.42j, -0.81+0.56j],
+                          [0.62-0.46j, 1.01+0.02j, 0.63-0.17j, -1.11+0.60j],
+                          [0.37+0.38j, 0.19-0.54j, -0.98-0.36j, 0.22-0.20j],
+                          [0.83+0.51j, 0.20+0.01j, -0.17-0.46j, 1.47+1.59j],
+                          [1.08-0.28j, 0.20-0.12j, -0.07+1.23j, 0.26+0.26j]])
+            c = np.array([[-2.54+0.09j],
+                          [1.65-2.26j],
+                          [-2.11-3.96j],
+                          [1.82+3.30j],
+                          [-6.41+3.77j],
+                          [2.07+0.66j]])
+            d = np.zeros(2, dtype=dtype)
+
+        b = np.array([[1., 0., -1., 0.], [0., 1., 0., -1.]], dtype=dtype)
+
+        _, _, _, result, _ = func(a, b, c, d, lwork=lwork)
+        if ind < 2:
+            expected = np.array([0.48904455,
+                                 0.99754786,
+                                 0.48904455,
+                                 0.99754786])
+        else:
+            expected = np.array([1.08742917-1.96205783j,
+                                 -0.74093902+3.72973919j,
+                                 1.08742917-1.96205759j,
+                                 -0.74093896+3.72973895j])
+        assert_array_almost_equal(result, expected, decimal=4)
+
+
+def test_sycon_hecon():
+    seed(1234)
+    for ind, dtype in enumerate(DTYPES+COMPLEX_DTYPES):
+        # DTYPES + COMPLEX DTYPES =  sycon + hecon
+        n = 10
+        # For sycon
+        if ind < 4:
+            func_lwork = get_lapack_funcs('sytrf_lwork', dtype=dtype)
+            funcon, functrf = get_lapack_funcs(('sycon', 'sytrf'), dtype=dtype)
+            A = (rand(n, n)).astype(dtype)
+        # For hecon
+        else:
+            func_lwork = get_lapack_funcs('hetrf_lwork', dtype=dtype)
+            funcon, functrf = get_lapack_funcs(('hecon', 'hetrf'), dtype=dtype)
+            A = (rand(n, n) + rand(n, n)*1j).astype(dtype)
+
+        # Since sycon only refers to upper/lower part, conj() is safe here.
+        A = (A + A.conj().T)/2 + 2*np.eye(n, dtype=dtype)
+
+        anorm = norm(A, 1)
+        lwork = _compute_lwork(func_lwork, n)
+        ldu, ipiv, _ = functrf(A, lwork=lwork, lower=1)
+        rcond, _ = funcon(a=ldu, ipiv=ipiv, anorm=anorm, lower=1)
+        # The error is at most 1-fold
+        assert_(abs(1/rcond - np.linalg.cond(A, p=1))*rcond < 1)
+
+
+def test_sygst():
+    seed(1234)
+    for ind, dtype in enumerate(REAL_DTYPES):
+        # DTYPES =  sygst
+        n = 10
+
+        potrf, sygst, syevd, sygvd = get_lapack_funcs(('potrf', 'sygst',
+                                                       'syevd', 'sygvd'),
+                                                      dtype=dtype)
+
+        A = rand(n, n).astype(dtype)
+        A = (A + A.T)/2
+        # B must be positive definite
+        B = rand(n, n).astype(dtype)
+        B = (B + B.T)/2 + 2 * np.eye(n, dtype=dtype)
+
+        # Perform eig (sygvd)
+        eig_gvd, _, info = sygvd(A, B)
+        assert_(info == 0)
+
+        # Convert to std problem potrf
+        b, info = potrf(B)
+        assert_(info == 0)
+        a, info = sygst(A, b)
+        assert_(info == 0)
+
+        eig, _, info = syevd(a)
+        assert_(info == 0)
+        assert_allclose(eig, eig_gvd, rtol=1.2e-4)
+
+
+def test_hegst():
+    seed(1234)
+    for ind, dtype in enumerate(COMPLEX_DTYPES):
+        # DTYPES =  hegst
+        n = 10
+
+        potrf, hegst, heevd, hegvd = get_lapack_funcs(('potrf', 'hegst',
+                                                       'heevd', 'hegvd'),
+                                                      dtype=dtype)
+
+        A = rand(n, n).astype(dtype) + 1j * rand(n, n).astype(dtype)
+        A = (A + A.conj().T)/2
+        # B must be positive definite
+        B = rand(n, n).astype(dtype) + 1j * rand(n, n).astype(dtype)
+        B = (B + B.conj().T)/2 + 2 * np.eye(n, dtype=dtype)
+
+        # Perform eig (hegvd)
+        eig_gvd, _, info = hegvd(A, B)
+        assert_(info == 0)
+
+        # Convert to std problem potrf
+        b, info = potrf(B)
+        assert_(info == 0)
+        a, info = hegst(A, b)
+        assert_(info == 0)
+
+        eig, _, info = heevd(a)
+        assert_(info == 0)
+        assert_allclose(eig, eig_gvd, rtol=1e-4)
+
+
+def test_tzrzf():
+    """
+    This test performs an RZ decomposition in which an m x n upper trapezoidal
+    array M (m <= n) is factorized as M = [R 0] * Z where R is upper triangular
+    and Z is unitary.
+    """
+    rng = np.random.RandomState(1234)
+    m, n = 10, 15
+    for ind, dtype in enumerate(DTYPES):
+        tzrzf, tzrzf_lw = get_lapack_funcs(('tzrzf', 'tzrzf_lwork'),
+                                           dtype=dtype)
+        lwork = _compute_lwork(tzrzf_lw, m, n)
+
+        if ind < 2:
+            A = triu(rng.rand(m, n).astype(dtype))
+        else:
+            A = triu((rng.rand(m, n) + rng.rand(m, n)*1j).astype(dtype))
+
+        # assert wrong shape arg, f2py returns generic error
+        assert_raises(Exception, tzrzf, A.T)
+        rz, tau, info = tzrzf(A, lwork=lwork)
+        # Check success
+        assert_(info == 0)
+
+        # Get Z manually for comparison
+        R = np.hstack((rz[:, :m], np.zeros((m, n-m), dtype=dtype)))
+        V = np.hstack((np.eye(m, dtype=dtype), rz[:, m:]))
+        Id = np.eye(n, dtype=dtype)
+        ref = [Id-tau[x]*V[[x], :].T.dot(V[[x], :].conj()) for x in range(m)]
+        Z = reduce(np.dot, ref)
+        assert_allclose(R.dot(Z) - A, zeros_like(A, dtype=dtype),
+                        atol=10*np.spacing(dtype(1.0).real), rtol=0.)
+
+
+def test_tfsm():
+    """
+    Test for solving a linear system with the coefficient matrix is a
+    triangular array stored in Full Packed (RFP) format.
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A = triu(rng.rand(n, n) + rng.rand(n, n)*1j + eye(n)).astype(dtype)
+            trans = 'C'
+        else:
+            A = triu(rng.rand(n, n) + eye(n)).astype(dtype)
+            trans = 'T'
+
+        trttf, tfttr, tfsm = get_lapack_funcs(('trttf', 'tfttr', 'tfsm'),
+                                              dtype=dtype)
+
+        Afp, _ = trttf(A)
+        B = rng.rand(n, 2).astype(dtype)
+        soln = tfsm(-1, Afp, B)
+        assert_array_almost_equal(soln, solve(-A, B),
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+        soln = tfsm(-1, Afp, B, trans=trans)
+        assert_array_almost_equal(soln, solve(-A.conj().T, B),
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+        # Make A, unit diagonal
+        A[np.arange(n), np.arange(n)] = dtype(1.)
+        soln = tfsm(-1, Afp, B, trans=trans, diag='U')
+        assert_array_almost_equal(soln, solve(-A.conj().T, B),
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+        # Change side
+        B2 = rng.rand(3, n).astype(dtype)
+        soln = tfsm(-1, Afp, B2, trans=trans, diag='U', side='R')
+        assert_array_almost_equal(soln, solve(-A, B2.T).conj().T,
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+
+def test_ormrz_unmrz():
+    """
+    This test performs a matrix multiplication with an arbitrary m x n matrix C
+    and a unitary matrix Q without explicitly forming the array. The array data
+    is encoded in the rectangular part of A which is obtained from ?TZRZF. Q
+    size is inferred by m, n, side keywords.
+    """
+    rng = np.random.RandomState(1234)
+    qm, qn, cn = 10, 15, 15
+    for ind, dtype in enumerate(DTYPES):
+        tzrzf, tzrzf_lw = get_lapack_funcs(('tzrzf', 'tzrzf_lwork'),
+                                           dtype=dtype)
+        lwork_rz = _compute_lwork(tzrzf_lw, qm, qn)
+
+        if ind < 2:
+            A = triu(rng.rand(qm, qn).astype(dtype))
+            C = rng.rand(cn, cn).astype(dtype)
+            orun_mrz, orun_mrz_lw = get_lapack_funcs(('ormrz', 'ormrz_lwork'),
+                                                     dtype=dtype)
+        else:
+            A = triu((rng.rand(qm, qn) + rng.rand(qm, qn)*1j).astype(dtype))
+            C = (rng.rand(cn, cn) + rand(cn, cn)*1j).astype(dtype)
+            orun_mrz, orun_mrz_lw = get_lapack_funcs(('unmrz', 'unmrz_lwork'),
+                                                     dtype=dtype)
+
+        lwork_mrz = _compute_lwork(orun_mrz_lw, cn, cn)
+        rz, tau, info = tzrzf(A, lwork=lwork_rz)
+
+        # Get Q manually for comparison
+        V = np.hstack((np.eye(qm, dtype=dtype), rz[:, qm:]))
+        Id = np.eye(qn, dtype=dtype)
+        ref = [Id-tau[x]*V[[x], :].T.dot(V[[x], :].conj()) for x in range(qm)]
+        Q = reduce(np.dot, ref)
+
+        # Now that we have Q, we can test whether lapack results agree with
+        # each case of CQ, CQ^H, QC, and QC^H
+        trans = 'T' if ind < 2 else 'C'
+        tol = 10*np.spacing(dtype(1.0).real)
+
+        cq, info = orun_mrz(rz, tau, C, lwork=lwork_mrz)
+        assert_(info == 0)
+        assert_allclose(cq - Q.dot(C), zeros_like(C), atol=tol, rtol=0.)
+
+        cq, info = orun_mrz(rz, tau, C, trans=trans, lwork=lwork_mrz)
+        assert_(info == 0)
+        assert_allclose(cq - Q.conj().T.dot(C), zeros_like(C), atol=tol,
+                        rtol=0.)
+
+        cq, info = orun_mrz(rz, tau, C, side='R', lwork=lwork_mrz)
+        assert_(info == 0)
+        assert_allclose(cq - C.dot(Q), zeros_like(C), atol=tol, rtol=0.)
+
+        cq, info = orun_mrz(rz, tau, C, side='R', trans=trans, lwork=lwork_mrz)
+        assert_(info == 0)
+        assert_allclose(cq - C.dot(Q.conj().T), zeros_like(C), atol=tol,
+                        rtol=0.)
+
+
+def test_tfttr_trttf():
+    """
+    Test conversion routines between the Rectangular Full Packed (RFP) format
+    and Standard Triangular Array (TR)
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A_full = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            transr = 'C'
+        else:
+            A_full = (rng.rand(n, n)).astype(dtype)
+            transr = 'T'
+
+        trttf, tfttr = get_lapack_funcs(('trttf', 'tfttr'), dtype=dtype)
+        A_tf_U, info = trttf(A_full)
+        assert_(info == 0)
+        A_tf_L, info = trttf(A_full, uplo='L')
+        assert_(info == 0)
+        A_tf_U_T, info = trttf(A_full, transr=transr, uplo='U')
+        assert_(info == 0)
+        A_tf_L_T, info = trttf(A_full, transr=transr, uplo='L')
+        assert_(info == 0)
+
+        # Create the RFP array manually (n is even!)
+        A_tf_U_m = zeros((n+1, n//2), dtype=dtype)
+        A_tf_U_m[:-1, :] = triu(A_full)[:, n//2:]
+        A_tf_U_m[n//2+1:, :] += triu(A_full)[:n//2, :n//2].conj().T
+
+        A_tf_L_m = zeros((n+1, n//2), dtype=dtype)
+        A_tf_L_m[1:, :] = tril(A_full)[:, :n//2]
+        A_tf_L_m[:n//2, :] += tril(A_full)[n//2:, n//2:].conj().T
+
+        assert_array_almost_equal(A_tf_U, A_tf_U_m.reshape(-1, order='F'))
+        assert_array_almost_equal(A_tf_U_T,
+                                  A_tf_U_m.conj().T.reshape(-1, order='F'))
+
+        assert_array_almost_equal(A_tf_L, A_tf_L_m.reshape(-1, order='F'))
+        assert_array_almost_equal(A_tf_L_T,
+                                  A_tf_L_m.conj().T.reshape(-1, order='F'))
+
+        # Get the original array from RFP
+        A_tr_U, info = tfttr(n, A_tf_U)
+        assert_(info == 0)
+        A_tr_L, info = tfttr(n, A_tf_L, uplo='L')
+        assert_(info == 0)
+        A_tr_U_T, info = tfttr(n, A_tf_U_T, transr=transr, uplo='U')
+        assert_(info == 0)
+        A_tr_L_T, info = tfttr(n, A_tf_L_T, transr=transr, uplo='L')
+        assert_(info == 0)
+
+        assert_array_almost_equal(A_tr_U, triu(A_full))
+        assert_array_almost_equal(A_tr_U_T, triu(A_full))
+        assert_array_almost_equal(A_tr_L, tril(A_full))
+        assert_array_almost_equal(A_tr_L_T, tril(A_full))
+
+
+def test_tpttr_trttp():
+    """
+    Test conversion routines between the Rectangular Full Packed (RFP) format
+    and Standard Triangular Array (TR)
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A_full = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+        else:
+            A_full = (rng.rand(n, n)).astype(dtype)
+
+        trttp, tpttr = get_lapack_funcs(('trttp', 'tpttr'), dtype=dtype)
+        A_tp_U, info = trttp(A_full)
+        assert_(info == 0)
+        A_tp_L, info = trttp(A_full, uplo='L')
+        assert_(info == 0)
+
+        # Create the TP array manually
+        inds = tril_indices(n)
+        A_tp_U_m = zeros(n*(n+1)//2, dtype=dtype)
+        A_tp_U_m[:] = (triu(A_full).T)[inds]
+
+        inds = triu_indices(n)
+        A_tp_L_m = zeros(n*(n+1)//2, dtype=dtype)
+        A_tp_L_m[:] = (tril(A_full).T)[inds]
+
+        assert_array_almost_equal(A_tp_U, A_tp_U_m)
+        assert_array_almost_equal(A_tp_L, A_tp_L_m)
+
+        # Get the original array from TP
+        A_tr_U, info = tpttr(n, A_tp_U)
+        assert_(info == 0)
+        A_tr_L, info = tpttr(n, A_tp_L, uplo='L')
+        assert_(info == 0)
+
+        assert_array_almost_equal(A_tr_U, triu(A_full))
+        assert_array_almost_equal(A_tr_L, tril(A_full))
+
+
+def test_pftrf():
+    """
+    Test Cholesky factorization of a positive definite Rectangular Full
+    Packed (RFP) format array
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            A = A + A.conj().T + n*eye(n)
+        else:
+            A = (rng.rand(n, n)).astype(dtype)
+            A = A + A.T + n*eye(n)
+
+        pftrf, trttf, tfttr = get_lapack_funcs(('pftrf', 'trttf', 'tfttr'),
+                                               dtype=dtype)
+
+        # Get the original array from TP
+        Afp, info = trttf(A)
+        Achol_rfp, info = pftrf(n, Afp)
+        assert_(info == 0)
+        A_chol_r, _ = tfttr(n, Achol_rfp)
+        Achol = cholesky(A)
+        assert_array_almost_equal(A_chol_r, Achol)
+
+
+def test_pftri():
+    """
+    Test Cholesky factorization of a positive definite Rectangular Full
+    Packed (RFP) format array to find its inverse
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            A = A + A.conj().T + n*eye(n)
+        else:
+            A = (rng.rand(n, n)).astype(dtype)
+            A = A + A.T + n*eye(n)
+
+        pftri, pftrf, trttf, tfttr = get_lapack_funcs(('pftri',
+                                                       'pftrf',
+                                                       'trttf',
+                                                       'tfttr'),
+                                                      dtype=dtype)
+
+        # Get the original array from TP
+        Afp, info = trttf(A)
+        A_chol_rfp, info = pftrf(n, Afp)
+        A_inv_rfp, info = pftri(n, A_chol_rfp)
+        assert_(info == 0)
+        A_inv_r, _ = tfttr(n, A_inv_rfp)
+        Ainv = inv(A)
+        assert_array_almost_equal(A_inv_r, triu(Ainv),
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+
+def test_pftrs():
+    """
+    Test Cholesky factorization of a positive definite Rectangular Full
+    Packed (RFP) format array and solve a linear system
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            A = A + A.conj().T + n*eye(n)
+        else:
+            A = (rng.rand(n, n)).astype(dtype)
+            A = A + A.T + n*eye(n)
+
+        B = ones((n, 3), dtype=dtype)
+        Bf1 = ones((n+2, 3), dtype=dtype)
+        Bf2 = ones((n-2, 3), dtype=dtype)
+        pftrs, pftrf, trttf, tfttr = get_lapack_funcs(('pftrs',
+                                                       'pftrf',
+                                                       'trttf',
+                                                       'tfttr'),
+                                                      dtype=dtype)
+
+        # Get the original array from TP
+        Afp, info = trttf(A)
+        A_chol_rfp, info = pftrf(n, Afp)
+        # larger B arrays shouldn't segfault
+        soln, info = pftrs(n, A_chol_rfp, Bf1)
+        assert_(info == 0)
+        assert_raises(Exception, pftrs, n, A_chol_rfp, Bf2)
+        soln, info = pftrs(n, A_chol_rfp, B)
+        assert_(info == 0)
+        assert_array_almost_equal(solve(A, B), soln,
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+
+def test_sfrk_hfrk():
+    """
+    Test for performing a symmetric rank-k operation for matrix in RFP format.
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 20
+        if ind > 1:
+            A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            A = A + A.conj().T + n*eye(n)
+        else:
+            A = (rng.rand(n, n)).astype(dtype)
+            A = A + A.T + n*eye(n)
+
+        prefix = 's'if ind < 2 else 'h'
+        trttf, tfttr, shfrk = get_lapack_funcs(('trttf', 'tfttr', f'{prefix}frk'),
+                                               dtype=dtype)
+
+        Afp, _ = trttf(A)
+        C = rng.rand(n, 2).astype(dtype)
+        Afp_out = shfrk(n, 2, -1, C, 2, Afp)
+        A_out, _ = tfttr(n, Afp_out)
+        assert_array_almost_equal(A_out, triu(-C.dot(C.conj().T) + 2*A),
+                                  decimal=4 if ind % 2 == 0 else 6)
+
+
+def test_syconv():
+    """
+    Test for going back and forth between the returned format of he/sytrf to
+    L and D factors/permutations.
+    """
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        n = 10
+
+        if ind > 1:
+            A = (rng.randint(-30, 30, (n, n)) +
+                 rng.randint(-30, 30, (n, n))*1j).astype(dtype)
+
+            A = A + A.conj().T
+        else:
+            A = rng.randint(-30, 30, (n, n)).astype(dtype)
+            A = A + A.T + n*eye(n)
+
+        tol = 100*np.spacing(dtype(1.0).real)
+        syconv, trf, trf_lwork = get_lapack_funcs(('syconv', 'sytrf',
+                                                   'sytrf_lwork'), dtype=dtype)
+        lw = _compute_lwork(trf_lwork, n, lower=1)
+        L, D, perm = ldl(A, lower=1, hermitian=False)
+        lw = _compute_lwork(trf_lwork, n, lower=1)
+        ldu, ipiv, info = trf(A, lower=1, lwork=lw)
+        a, e, info = syconv(ldu, ipiv, lower=1)
+        assert_allclose(tril(a, -1,), tril(L[perm, :], -1), atol=tol, rtol=0.)
+
+        # Test also upper
+        U, D, perm = ldl(A, lower=0, hermitian=False)
+        ldu, ipiv, info = trf(A, lower=0)
+        a, e, info = syconv(ldu, ipiv, lower=0)
+        assert_allclose(triu(a, 1), triu(U[perm, :], 1), atol=tol, rtol=0.)
+
+
+class TestBlockedQR:
+    """
+    Tests for the blocked QR factorization, namely through geqrt, gemqrt, tpqrt
+    and tpmqr.
+    """
+
+    def test_geqrt_gemqrt(self):
+        rng = np.random.RandomState(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 20
+
+            if ind > 1:
+                A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            else:
+                A = (rng.rand(n, n)).astype(dtype)
+
+            tol = 100*np.spacing(dtype(1.0).real)
+            geqrt, gemqrt = get_lapack_funcs(('geqrt', 'gemqrt'), dtype=dtype)
+
+            a, t, info = geqrt(n, A)
+            assert info == 0
+
+            # Extract elementary reflectors from lower triangle, adding the
+            # main diagonal of ones.
+            v = np.tril(a, -1) + np.eye(n, dtype=dtype)
+            # Generate the block Householder transform I - VTV^H
+            Q = np.eye(n, dtype=dtype) - v @ t @ v.T.conj()
+            R = np.triu(a)
+
+            # Test columns of Q are orthogonal
+            assert_allclose(Q.T.conj() @ Q, np.eye(n, dtype=dtype), atol=tol,
+                            rtol=0.)
+            assert_allclose(Q @ R, A, atol=tol, rtol=0.)
+
+            if ind > 1:
+                C = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+                transpose = 'C'
+            else:
+                C = (rng.rand(n, n)).astype(dtype)
+                transpose = 'T'
+
+            for side in ('L', 'R'):
+                for trans in ('N', transpose):
+                    c, info = gemqrt(a, t, C, side=side, trans=trans)
+                    assert info == 0
+
+                    if trans == transpose:
+                        q = Q.T.conj()
+                    else:
+                        q = Q
+
+                    if side == 'L':
+                        qC = q @ C
+                    else:
+                        qC = C @ q
+
+                    assert_allclose(c, qC, atol=tol, rtol=0.)
+
+                    # Test default arguments
+                    if (side, trans) == ('L', 'N'):
+                        c_default, info = gemqrt(a, t, C)
+                        assert info == 0
+                        assert_equal(c_default, c)
+
+            # Test invalid side/trans
+            assert_raises(Exception, gemqrt, a, t, C, side='A')
+            assert_raises(Exception, gemqrt, a, t, C, trans='A')
+
+    def test_tpqrt_tpmqrt(self):
+        rng = np.random.RandomState(1234)
+        for ind, dtype in enumerate(DTYPES):
+            n = 20
+
+            if ind > 1:
+                A = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+                B = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+            else:
+                A = (rng.rand(n, n)).astype(dtype)
+                B = (rng.rand(n, n)).astype(dtype)
+
+            tol = 100*np.spacing(dtype(1.0).real)
+            tpqrt, tpmqrt = get_lapack_funcs(('tpqrt', 'tpmqrt'), dtype=dtype)
+
+            # Test for the range of pentagonal B, from square to upper
+            # triangular
+            for l in (0, n // 2, n):
+                a, b, t, info = tpqrt(l, n, A, B)
+                assert info == 0
+
+                # Check that lower triangular part of A has not been modified
+                assert_equal(np.tril(a, -1), np.tril(A, -1))
+                # Check that elements not part of the pentagonal portion of B
+                # have not been modified.
+                assert_equal(np.tril(b, l - n - 1), np.tril(B, l - n - 1))
+
+                # Extract pentagonal portion of B
+                B_pent, b_pent = np.triu(B, l - n), np.triu(b, l - n)
+
+                # Generate elementary reflectors
+                v = np.concatenate((np.eye(n, dtype=dtype), b_pent))
+                # Generate the block Householder transform I - VTV^H
+                Q = np.eye(2 * n, dtype=dtype) - v @ t @ v.T.conj()
+                R = np.concatenate((np.triu(a), np.zeros_like(a)))
+
+                # Test columns of Q are orthogonal
+                assert_allclose(Q.T.conj() @ Q, np.eye(2 * n, dtype=dtype),
+                                atol=tol, rtol=0.)
+                assert_allclose(Q @ R, np.concatenate((np.triu(A), B_pent)),
+                                atol=tol, rtol=0.)
+
+                if ind > 1:
+                    C = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+                    D = (rng.rand(n, n) + rng.rand(n, n)*1j).astype(dtype)
+                    transpose = 'C'
+                else:
+                    C = (rng.rand(n, n)).astype(dtype)
+                    D = (rng.rand(n, n)).astype(dtype)
+                    transpose = 'T'
+
+                for side in ('L', 'R'):
+                    for trans in ('N', transpose):
+                        c, d, info = tpmqrt(l, b, t, C, D, side=side,
+                                            trans=trans)
+                        assert info == 0
+
+                        if trans == transpose:
+                            q = Q.T.conj()
+                        else:
+                            q = Q
+
+                        if side == 'L':
+                            cd = np.concatenate((c, d), axis=0)
+                            CD = np.concatenate((C, D), axis=0)
+                            qCD = q @ CD
+                        else:
+                            cd = np.concatenate((c, d), axis=1)
+                            CD = np.concatenate((C, D), axis=1)
+                            qCD = CD @ q
+
+                        assert_allclose(cd, qCD, atol=tol, rtol=0.)
+
+                        if (side, trans) == ('L', 'N'):
+                            c_default, d_default, info = tpmqrt(l, b, t, C, D)
+                            assert info == 0
+                            assert_equal(c_default, c)
+                            assert_equal(d_default, d)
+
+                # Test invalid side/trans
+                assert_raises(Exception, tpmqrt, l, b, t, C, D, side='A')
+                assert_raises(Exception, tpmqrt, l, b, t, C, D, trans='A')
+
+
+def test_pstrf():
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        # DTYPES =  pstrf
+        n = 10
+        r = 2
+        pstrf = get_lapack_funcs('pstrf', dtype=dtype)
+
+        # Create positive semidefinite A
+        if ind > 1:
+            A = rng.rand(n, n-r).astype(dtype) + 1j * rng.rand(n, n-r).astype(dtype)
+            A = A @ A.conj().T
+        else:
+            A = rng.rand(n, n-r).astype(dtype)
+            A = A @ A.T
+
+        c, piv, r_c, info = pstrf(A)
+        U = triu(c)
+        U[r_c - n:, r_c - n:] = 0.
+
+        assert_equal(info, 1)
+        # python-dbg 3.5.2 runs cause trouble with the following assertion.
+        # assert_equal(r_c, n - r)
+        single_atol = 1000 * np.finfo(np.float32).eps
+        double_atol = 1000 * np.finfo(np.float64).eps
+        atol = single_atol if ind in [0, 2] else double_atol
+        assert_allclose(A[piv-1][:, piv-1], U.conj().T @ U, rtol=0., atol=atol)
+
+        c, piv, r_c, info = pstrf(A, lower=1)
+        L = tril(c)
+        L[r_c - n:, r_c - n:] = 0.
+
+        assert_equal(info, 1)
+        # assert_equal(r_c, n - r)
+        single_atol = 1000 * np.finfo(np.float32).eps
+        double_atol = 1000 * np.finfo(np.float64).eps
+        atol = single_atol if ind in [0, 2] else double_atol
+        assert_allclose(A[piv-1][:, piv-1], L @ L.conj().T, rtol=0., atol=atol)
+
+
+def test_pstf2():
+    rng = np.random.RandomState(1234)
+    for ind, dtype in enumerate(DTYPES):
+        # DTYPES =  pstf2
+        n = 10
+        r = 2
+        pstf2 = get_lapack_funcs('pstf2', dtype=dtype)
+
+        # Create positive semidefinite A
+        if ind > 1:
+            A = rng.rand(n, n-r).astype(dtype) + 1j * rng.rand(n, n-r).astype(dtype)
+            A = A @ A.conj().T
+        else:
+            A = rng.rand(n, n-r).astype(dtype)
+            A = A @ A.T
+
+        c, piv, r_c, info = pstf2(A)
+        U = triu(c)
+        U[r_c - n:, r_c - n:] = 0.
+
+        assert_equal(info, 1)
+        # python-dbg 3.5.2 runs cause trouble with the commented assertions.
+        # assert_equal(r_c, n - r)
+        single_atol = 1000 * np.finfo(np.float32).eps
+        double_atol = 1000 * np.finfo(np.float64).eps
+        atol = single_atol if ind in [0, 2] else double_atol
+        assert_allclose(A[piv-1][:, piv-1], U.conj().T @ U, rtol=0., atol=atol)
+
+        c, piv, r_c, info = pstf2(A, lower=1)
+        L = tril(c)
+        L[r_c - n:, r_c - n:] = 0.
+
+        assert_equal(info, 1)
+        # assert_equal(r_c, n - r)
+        single_atol = 1000 * np.finfo(np.float32).eps
+        double_atol = 1000 * np.finfo(np.float64).eps
+        atol = single_atol if ind in [0, 2] else double_atol
+        assert_allclose(A[piv-1][:, piv-1], L @ L.conj().T, rtol=0., atol=atol)
+
+
+def test_geequ():
+    desired_real = np.array([[0.6250, 1.0000, 0.0393, -0.4269],
+                             [1.0000, -0.5619, -1.0000, -1.0000],
+                             [0.5874, -1.0000, -0.0596, -0.5341],
+                             [-1.0000, -0.5946, -0.0294, 0.9957]])
+
+    desired_cplx = np.array([[-0.2816+0.5359*1j,
+                              0.0812+0.9188*1j,
+                              -0.7439-0.2561*1j],
+                             [-0.3562-0.2954*1j,
+                              0.9566-0.0434*1j,
+                              -0.0174+0.1555*1j],
+                             [0.8607+0.1393*1j,
+                              -0.2759+0.7241*1j,
+                              -0.1642-0.1365*1j]])
+
+    for ind, dtype in enumerate(DTYPES):
+        if ind < 2:
+            # Use examples from the NAG documentation
+            A = np.array([[1.80e+10, 2.88e+10, 2.05e+00, -8.90e+09],
+                          [5.25e+00, -2.95e+00, -9.50e-09, -3.80e+00],
+                          [1.58e+00, -2.69e+00, -2.90e-10, -1.04e+00],
+                          [-1.11e+00, -6.60e-01, -5.90e-11, 8.00e-01]])
+            A = A.astype(dtype)
+        else:
+            A = np.array([[-1.34e+00, 0.28e+10, -6.39e+00],
+                          [-1.70e+00, 3.31e+10, -0.15e+00],
+                          [2.41e-10, -0.56e+00, -0.83e-10]], dtype=dtype)
+            A += np.array([[2.55e+00, 3.17e+10, -2.20e+00],
+                           [-1.41e+00, -0.15e+10, 1.34e+00],
+                           [0.39e-10, 1.47e+00, -0.69e-10]])*1j
+
+            A = A.astype(dtype)
+
+        geequ = get_lapack_funcs('geequ', dtype=dtype)
+        r, c, rowcnd, colcnd, amax, info = geequ(A)
+
+        if ind < 2:
+            assert_allclose(desired_real.astype(dtype), r[:, None]*A*c,
+                            rtol=0, atol=1e-4)
+        else:
+            assert_allclose(desired_cplx.astype(dtype), r[:, None]*A*c,
+                            rtol=0, atol=1e-4)
+
+
+def test_syequb():
+    desired_log2s = np.array([0, 0, 0, 0, 0, 0, -1, -1, -2, -3])
+
+    for ind, dtype in enumerate(DTYPES):
+        A = np.eye(10, dtype=dtype)
+        alpha = dtype(1. if ind < 2 else 1.j)
+        d = np.array([alpha * 2.**x for x in range(-5, 5)], dtype=dtype)
+        A += np.rot90(np.diag(d))
+
+        syequb = get_lapack_funcs('syequb', dtype=dtype)
+        s, scond, amax, info = syequb(A)
+
+        assert_equal(np.log2(s).astype(int), desired_log2s)
+
+
+@pytest.mark.skipif(True,
+                    reason="Failing on some OpenBLAS version, see gh-12276")
+def test_heequb():
+    # zheequb has a bug for versions =< LAPACK 3.9.0
+    # See Reference-LAPACK gh-61 and gh-408
+    # Hence the zheequb test is customized accordingly to avoid
+    # work scaling.
+    A = np.diag([2]*5 + [1002]*5) + np.diag(np.ones(9), k=1)*1j
+    s, scond, amax, info = lapack.zheequb(A)
+    assert_equal(info, 0)
+    assert_allclose(np.log2(s), [0., -1.]*2 + [0.] + [-4]*5)
+
+    A = np.diag(2**np.abs(np.arange(-5, 6)) + 0j)
+    A[5, 5] = 1024
+    A[5, 0] = 16j
+    s, scond, amax, info = lapack.cheequb(A.astype(np.complex64), lower=1)
+    assert_equal(info, 0)
+    assert_allclose(np.log2(s), [-2, -1, -1, 0, 0, -5, 0, -1, -1, -2, -2])
+
+
+def test_getc2_gesc2():
+    rng = np.random.RandomState(42)
+    n = 10
+    desired_real = rng.rand(n)
+    desired_cplx = rng.rand(n) + rng.rand(n)*1j
+
+    for ind, dtype in enumerate(DTYPES):
+        if ind < 2:
+            A = rng.rand(n, n)
+            A = A.astype(dtype)
+            b = A @ desired_real
+            b = b.astype(dtype)
+        else:
+            A = rng.rand(n, n) + rng.rand(n, n)*1j
+            A = A.astype(dtype)
+            b = A @ desired_cplx
+            b = b.astype(dtype)
+
+        getc2 = get_lapack_funcs('getc2', dtype=dtype)
+        gesc2 = get_lapack_funcs('gesc2', dtype=dtype)
+        lu, ipiv, jpiv, info = getc2(A, overwrite_a=0)
+        x, scale = gesc2(lu, b, ipiv, jpiv, overwrite_rhs=0)
+
+        if ind < 2:
+            assert_array_almost_equal(desired_real.astype(dtype),
+                                      x/scale, decimal=4)
+        else:
+            assert_array_almost_equal(desired_cplx.astype(dtype),
+                                      x/scale, decimal=4)
+
+
+@pytest.mark.parametrize('size', [(6, 5), (5, 5)])
+@pytest.mark.parametrize('dtype', REAL_DTYPES)
+@pytest.mark.parametrize('joba', range(6))  # 'C', 'E', 'F', 'G', 'A', 'R'
+@pytest.mark.parametrize('jobu', range(4))  # 'U', 'F', 'W', 'N'
+@pytest.mark.parametrize('jobv', range(4))  # 'V', 'J', 'W', 'N'
+@pytest.mark.parametrize('jobr', [0, 1])
+@pytest.mark.parametrize('jobp', [0, 1])
+def test_gejsv_general(size, dtype, joba, jobu, jobv, jobr, jobp, jobt=0):
+    """Test the lapack routine ?gejsv.
+
+    This function tests that a singular value decomposition can be performed
+    on the random M-by-N matrix A. The test performs the SVD using ?gejsv
+    then performs the following checks:
+
+    * ?gejsv exist successfully (info == 0)
+    * The returned singular values are correct
+    * `A` can be reconstructed from `u`, `SIGMA`, `v`
+    * Ensure that u.T @ u is the identity matrix
+    * Ensure that v.T @ v is the identity matrix
+    * The reported matrix rank
+    * The reported number of singular values
+    * If denormalized floats are required
+
+    Notes
+    -----
+    joba specifies several choices effecting the calculation's accuracy
+    Although all arguments are tested, the tests only check that the correct
+    solution is returned - NOT that the prescribed actions are performed
+    internally.
+
+    jobt is, as of v3.9.0, still experimental and removed to cut down number of
+    test cases. However keyword itself is tested externally.
+    """
+    rng = np.random.RandomState(42)
+
+    # Define some constants for later use:
+    m, n = size
+    atol = 100 * np.finfo(dtype).eps
+    A = generate_random_dtype_array(size, dtype, rng)
+    gejsv = get_lapack_funcs('gejsv', dtype=dtype)
+
+    # Set up checks for invalid job? combinations
+    # if an invalid combination occurs we set the appropriate
+    # exit status.
+    lsvec = jobu < 2  # Calculate left singular vectors
+    rsvec = jobv < 2  # Calculate right singular vectors
+    l2tran = (jobt == 1) and (m == n)
+    is_complex = np.iscomplexobj(A)
+
+    invalid_real_jobv = (jobv == 1) and (not lsvec) and (not is_complex)
+    invalid_cplx_jobu = (jobu == 2) and not (rsvec and l2tran) and is_complex
+    invalid_cplx_jobv = (jobv == 2) and not (lsvec and l2tran) and is_complex
+
+    # Set the exit status to the expected value.
+    # Here we only check for invalid combinations, not individual
+    # parameters.
+    if invalid_cplx_jobu:
+        exit_status = -2
+    elif invalid_real_jobv or invalid_cplx_jobv:
+        exit_status = -3
+    else:
+        exit_status = 0
+
+    if (jobu > 1) and (jobv == 1):
+        assert_raises(Exception, gejsv, A, joba, jobu, jobv, jobr, jobt, jobp)
+    else:
+        sva, u, v, work, iwork, info = gejsv(A,
+                                             joba=joba,
+                                             jobu=jobu,
+                                             jobv=jobv,
+                                             jobr=jobr,
+                                             jobt=jobt,
+                                             jobp=jobp)
+
+        # Check that ?gejsv exited successfully/as expected
+        assert_equal(info, exit_status)
+
+        # If exit_status is non-zero the combination of jobs is invalid.
+        # We test this above but no calculations are performed.
+        if not exit_status:
+
+            # Check the returned singular values
+            sigma = (work[0] / work[1]) * sva[:n]
+            assert_allclose(sigma, svd(A, compute_uv=False), atol=atol)
+
+            if jobu == 1:
+                # If JOBU = 'F', then u contains the M-by-M matrix of
+                # the left singular vectors, including an ONB of the orthogonal
+                # complement of the Range(A)
+                # However, to recalculate A we are concerned about the
+                # first n singular values and so can ignore the latter.
+                # TODO: Add a test for ONB?
+                u = u[:, :n]
+
+            if lsvec and rsvec:
+                assert_allclose(u @ np.diag(sigma) @ v.conj().T, A, atol=atol)
+            if lsvec:
+                assert_allclose(u.conj().T @ u, np.identity(n), atol=atol)
+            if rsvec:
+                assert_allclose(v.conj().T @ v, np.identity(n), atol=atol)
+
+            assert_equal(iwork[0], np.linalg.matrix_rank(A))
+            assert_equal(iwork[1], np.count_nonzero(sigma))
+            # iwork[2] is non-zero if requested accuracy is not warranted for
+            # the data. This should never occur for these tests.
+            assert_equal(iwork[2], 0)
+
+
+@pytest.mark.parametrize('dtype', REAL_DTYPES)
+def test_gejsv_edge_arguments(dtype):
+    """Test edge arguments return expected status"""
+    gejsv = get_lapack_funcs('gejsv', dtype=dtype)
+
+    # scalar A
+    sva, u, v, work, iwork, info = gejsv(1.)
+    assert_equal(info, 0)
+    assert_equal(u.shape, (1, 1))
+    assert_equal(v.shape, (1, 1))
+    assert_equal(sva, np.array([1.], dtype=dtype))
+
+    # 1d A
+    A = np.ones((1,), dtype=dtype)
+    sva, u, v, work, iwork, info = gejsv(A)
+    assert_equal(info, 0)
+    assert_equal(u.shape, (1, 1))
+    assert_equal(v.shape, (1, 1))
+    assert_equal(sva, np.array([1.], dtype=dtype))
+
+    # 2d empty A
+    A = np.ones((1, 0), dtype=dtype)
+    sva, u, v, work, iwork, info = gejsv(A)
+    assert_equal(info, 0)
+    assert_equal(u.shape, (1, 0))
+    assert_equal(v.shape, (1, 0))
+    assert_equal(sva, np.array([], dtype=dtype))
+
+    # make sure "overwrite_a" is respected - user reported in gh-13191
+    A = np.sin(np.arange(100).reshape(10, 10)).astype(dtype)
+    A = np.asfortranarray(A + A.T)  # make it symmetric and column major
+    Ac = A.copy('A')
+    _ = gejsv(A)
+    assert_allclose(A, Ac)
+
+
+@pytest.mark.parametrize(('kwargs'),
+                         ({'joba': 9},
+                          {'jobu': 9},
+                          {'jobv': 9},
+                          {'jobr': 9},
+                          {'jobt': 9},
+                          {'jobp': 9})
+                         )
+def test_gejsv_invalid_job_arguments(kwargs):
+    """Test invalid job arguments raise an Exception"""
+    A = np.ones((2, 2), dtype=float)
+    gejsv = get_lapack_funcs('gejsv', dtype=float)
+    assert_raises(Exception, gejsv, A, **kwargs)
+
+
+@pytest.mark.parametrize("A,sva_expect,u_expect,v_expect",
+                         [(np.array([[2.27, -1.54, 1.15, -1.94],
+                                     [0.28, -1.67, 0.94, -0.78],
+                                     [-0.48, -3.09, 0.99, -0.21],
+                                     [1.07, 1.22, 0.79, 0.63],
+                                     [-2.35, 2.93, -1.45, 2.30],
+                                     [0.62, -7.39, 1.03, -2.57]]),
+                           np.array([9.9966, 3.6831, 1.3569, 0.5000]),
+                           np.array([[0.2774, -0.6003, -0.1277, 0.1323],
+                                     [0.2020, -0.0301, 0.2805, 0.7034],
+                                     [0.2918, 0.3348, 0.6453, 0.1906],
+                                     [-0.0938, -0.3699, 0.6781, -0.5399],
+                                     [-0.4213, 0.5266, 0.0413, -0.0575],
+                                     [0.7816, 0.3353, -0.1645, -0.3957]]),
+                           np.array([[0.1921, -0.8030, 0.0041, -0.5642],
+                                     [-0.8794, -0.3926, -0.0752, 0.2587],
+                                     [0.2140, -0.2980, 0.7827, 0.5027],
+                                     [-0.3795, 0.3351, 0.6178, -0.6017]]))])
+def test_gejsv_NAG(A, sva_expect, u_expect, v_expect):
+    """
+    This test implements the example found in the NAG manual, f08khf.
+    An example was not found for the complex case.
+    """
+    # NAG manual provides accuracy up to 4 decimals
+    atol = 1e-4
+    gejsv = get_lapack_funcs('gejsv', dtype=A.dtype)
+
+    sva, u, v, work, iwork, info = gejsv(A)
+
+    assert_allclose(sva_expect, sva, atol=atol)
+    assert_allclose(u_expect, u, atol=atol)
+    assert_allclose(v_expect, v, atol=atol)
+
+
+@pytest.mark.parametrize("dtype", DTYPES)
+def test_gttrf_gttrs(dtype):
+    # The test uses ?gttrf and ?gttrs to solve a random system for each dtype,
+    # tests that the output of ?gttrf define LU matrices, that input
+    # parameters are unmodified, transposal options function correctly, that
+    # incompatible matrix shapes raise an error, and singular matrices return
+    # non zero info.
+
+    rng = np.random.RandomState(42)
+    n = 10
+    atol = 100 * np.finfo(dtype).eps
+
+    # create the matrix in accordance with the data type
+    du = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    d = generate_random_dtype_array((n,), dtype=dtype, rng=rng)
+    dl = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+
+    diag_cpy = [dl.copy(), d.copy(), du.copy()]
+
+    A = np.diag(d) + np.diag(dl, -1) + np.diag(du, 1)
+    x = np.random.rand(n)
+    b = A @ x
+
+    gttrf, gttrs = get_lapack_funcs(('gttrf', 'gttrs'), dtype=dtype)
+
+    _dl, _d, _du, du2, ipiv, info = gttrf(dl, d, du)
+    # test to assure that the inputs of ?gttrf are unmodified
+    assert_array_equal(dl, diag_cpy[0])
+    assert_array_equal(d, diag_cpy[1])
+    assert_array_equal(du, diag_cpy[2])
+
+    # generate L and U factors from ?gttrf return values
+    # L/U are lower/upper triangular by construction (initially and at end)
+    U = np.diag(_d, 0) + np.diag(_du, 1) + np.diag(du2, 2)
+    L = np.eye(n, dtype=dtype)
+
+    for i, m in enumerate(_dl):
+        # L is given in a factored form.
+        # See
+        # www.hpcavf.uclan.ac.uk/softwaredoc/sgi_scsl_html/sgi_html/ch03.html
+        piv = ipiv[i] - 1
+        # right multiply by permutation matrix
+        L[:, [i, piv]] = L[:, [piv, i]]
+        # right multiply by Li, rank-one modification of identity
+        L[:, i] += L[:, i+1]*m
+
+    # one last permutation
+    i, piv = -1, ipiv[-1] - 1
+    # right multiply by final permutation matrix
+    L[:, [i, piv]] = L[:, [piv, i]]
+
+    # check that the outputs of ?gttrf define an LU decomposition of A
+    assert_allclose(A, L @ U, atol=atol)
+
+    b_cpy = b.copy()
+    x_gttrs, info = gttrs(_dl, _d, _du, du2, ipiv, b)
+    # test that the inputs of ?gttrs are unmodified
+    assert_array_equal(b, b_cpy)
+    # test that the result of ?gttrs matches the expected input
+    assert_allclose(x, x_gttrs, atol=atol)
+
+    # test that ?gttrf and ?gttrs work with transposal options
+    if dtype in REAL_DTYPES:
+        trans = "T"
+        b_trans = A.T @ x
+    else:
+        trans = "C"
+        b_trans = A.conj().T @ x
+
+    x_gttrs, info = gttrs(_dl, _d, _du, du2, ipiv, b_trans, trans=trans)
+    assert_allclose(x, x_gttrs, atol=atol)
+
+    # test that ValueError is raised with incompatible matrix shapes
+    with assert_raises(ValueError):
+        gttrf(dl[:-1], d, du)
+    with assert_raises(ValueError):
+        gttrf(dl, d[:-1], du)
+    with assert_raises(ValueError):
+        gttrf(dl, d, du[:-1])
+
+    # test that matrix of size n=2 raises exception
+    with assert_raises(ValueError):
+        gttrf(dl[0], d[:1], du[0])
+
+    # test that singular (row of all zeroes) matrix fails via info
+    du[0] = 0
+    d[0] = 0
+    __dl, __d, __du, _du2, _ipiv, _info = gttrf(dl, d, du)
+    np.testing.assert_(__d[info - 1] == 0, (f"?gttrf: _d[info-1] is {__d[info - 1]},"
+                                            " not the illegal value :0."))
+
+
+@pytest.mark.parametrize("du, d, dl, du_exp, d_exp, du2_exp, ipiv_exp, b, x",
+                         [(np.array([2.1, -1.0, 1.9, 8.0]),
+                             np.array([3.0, 2.3, -5.0, -.9, 7.1]),
+                             np.array([3.4, 3.6, 7.0, -6.0]),
+                             np.array([2.3, -5, -.9, 7.1]),
+                             np.array([3.4, 3.6, 7, -6, -1.015373]),
+                             np.array([-1, 1.9, 8]),
+                             np.array([2, 3, 4, 5, 5]),
+                             np.array([[2.7, 6.6],
+                                       [-0.5, 10.8],
+                                       [2.6, -3.2],
+                                       [0.6, -11.2],
+                                       [2.7, 19.1]
+                                       ]),
+                             np.array([[-4, 5],
+                                       [7, -4],
+                                       [3, -3],
+                                       [-4, -2],
+                                       [-3, 1]])),
+                          (
+                             np.array([2 - 1j, 2 + 1j, -1 + 1j, 1 - 1j]),
+                             np.array([-1.3 + 1.3j, -1.3 + 1.3j,
+                                       -1.3 + 3.3j, - .3 + 4.3j,
+                                       -3.3 + 1.3j]),
+                             np.array([1 - 2j, 1 + 1j, 2 - 3j, 1 + 1j]),
+                             # du exp
+                             np.array([-1.3 + 1.3j, -1.3 + 3.3j,
+                                       -0.3 + 4.3j, -3.3 + 1.3j]),
+                             np.array([1 - 2j, 1 + 1j, 2 - 3j, 1 + 1j,
+                                       -1.3399 + 0.2875j]),
+                             np.array([2 + 1j, -1 + 1j, 1 - 1j]),
+                             np.array([2, 3, 4, 5, 5]),
+                             np.array([[2.4 - 5j, 2.7 + 6.9j],
+                                       [3.4 + 18.2j, - 6.9 - 5.3j],
+                                       [-14.7 + 9.7j, - 6 - .6j],
+                                       [31.9 - 7.7j, -3.9 + 9.3j],
+                                       [-1 + 1.6j, -3 + 12.2j]]),
+                             np.array([[1 + 1j, 2 - 1j],
+                                       [3 - 1j, 1 + 2j],
+                                       [4 + 5j, -1 + 1j],
+                                       [-1 - 2j, 2 + 1j],
+                                       [1 - 1j, 2 - 2j]])
+                            )])
+def test_gttrf_gttrs_NAG_f07cdf_f07cef_f07crf_f07csf(du, d, dl, du_exp, d_exp,
+                                                     du2_exp, ipiv_exp, b, x):
+    # test to assure that wrapper is consistent with NAG Library Manual Mark 26
+    # example problems: f07cdf and f07cef (real)
+    # examples: f07crf and f07csf (complex)
+    # (Links may expire, so search for "NAG Library Manual Mark 26" online)
+
+    gttrf, gttrs = get_lapack_funcs(('gttrf', "gttrs"), (du[0], du[0]))
+
+    _dl, _d, _du, du2, ipiv, info = gttrf(dl, d, du)
+    assert_allclose(du2, du2_exp)
+    assert_allclose(_du, du_exp)
+    assert_allclose(_d, d_exp, atol=1e-4)  # NAG examples provide 4 decimals.
+    assert_allclose(ipiv, ipiv_exp)
+
+    x_gttrs, info = gttrs(_dl, _d, _du, du2, ipiv, b)
+
+    assert_allclose(x_gttrs, x)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('norm', ['1', 'I', 'O'])
+@pytest.mark.parametrize('n', [3, 10])
+def test_gtcon(dtype, norm, n):
+    rng = np.random.default_rng(23498324)
+
+    d = rng.random(n) + rng.random(n)*1j
+    dl = rng.random(n - 1) + rng.random(n - 1)*1j
+    du = rng.random(n - 1) + rng.random(n - 1)*1j
+    A = np.diag(d) + np.diag(dl, -1) + np.diag(du, 1)
+    if np.issubdtype(dtype, np.floating):
+        A, d, dl, du = A.real, d.real, dl.real, du.real
+    A, d, dl, du = A.astype(dtype), d.astype(dtype), dl.astype(dtype), du.astype(dtype)
+
+    anorm = np.abs(A).sum(axis=0).max()
+
+    gttrf, gtcon = get_lapack_funcs(('gttrf', 'gtcon'), (A,))
+    dl, d, du, du2, ipiv, info = gttrf(dl, d, du)
+    res, _ = gtcon(dl, d, du, du2, ipiv, anorm, norm=norm)
+
+    gecon, getrf = get_lapack_funcs(('gecon', 'getrf'), (A,))
+    lu, ipvt, info = getrf(A)
+    ref, _ = gecon(lu, anorm, norm=norm)
+
+    rtol = np.finfo(dtype).eps**0.75
+    assert_allclose(res, ref, rtol=rtol)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('shape', [(3, 7), (7, 3), (2**18, 2**18)])
+def test_geqrfp_lwork(dtype, shape):
+    geqrfp_lwork = get_lapack_funcs(('geqrfp_lwork'), dtype=dtype)
+    m, n = shape
+    lwork, info = geqrfp_lwork(m=m, n=n)
+    assert_equal(info, 0)
+
+
+@pytest.mark.parametrize("ddtype,dtype",
+                         zip(REAL_DTYPES + REAL_DTYPES, DTYPES))
+def test_pttrf_pttrs(ddtype, dtype):
+    rng = np.random.RandomState(42)
+    # set test tolerance appropriate for dtype
+    atol = 100*np.finfo(dtype).eps
+    # n is the length diagonal of A
+    n = 10
+    # create diagonals according to size and dtype
+
+    # diagonal d should always be real.
+    # add 4 to d so it will be dominant for all dtypes
+    d = generate_random_dtype_array((n,), ddtype, rng) + 4
+    # diagonal e may be real or complex.
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+
+    # assemble diagonals together into matrix
+    A = np.diag(d) + np.diag(e, -1) + np.diag(np.conj(e), 1)
+    # store a copy of diagonals to later verify
+    diag_cpy = [d.copy(), e.copy()]
+
+    pttrf = get_lapack_funcs('pttrf', dtype=dtype)
+
+    _d, _e, info = pttrf(d, e)
+    # test to assure that the inputs of ?pttrf are unmodified
+    assert_array_equal(d, diag_cpy[0])
+    assert_array_equal(e, diag_cpy[1])
+    assert_equal(info, 0, err_msg=f"pttrf: info = {info}, should be 0")
+
+    # test that the factors from pttrf can be recombined to make A
+    L = np.diag(_e, -1) + np.diag(np.ones(n))
+    D = np.diag(_d)
+
+    assert_allclose(A, L@D@L.conjugate().T, atol=atol)
+
+    # generate random solution x
+    x = generate_random_dtype_array((n,), dtype, rng)
+    # determine accompanying b to get soln x
+    b = A@x
+
+    # determine _x from pttrs
+    pttrs = get_lapack_funcs('pttrs', dtype=dtype)
+    _x, info = pttrs(_d, _e.conj(), b)
+    assert_equal(info, 0, err_msg=f"pttrs: info = {info}, should be 0")
+
+    # test that _x from pttrs matches the expected x
+    assert_allclose(x, _x, atol=atol)
+
+
+@pytest.mark.parametrize("ddtype,dtype",
+                         zip(REAL_DTYPES + REAL_DTYPES, DTYPES))
+def test_pttrf_pttrs_errors_incompatible_shape(ddtype, dtype):
+    n = 10
+    rng = np.random.RandomState(1234)
+    pttrf = get_lapack_funcs('pttrf', dtype=dtype)
+    d = generate_random_dtype_array((n,), ddtype, rng) + 2
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+    # test that ValueError is raised with incompatible matrix shapes
+    assert_raises(ValueError, pttrf, d[:-1], e)
+    assert_raises(ValueError, pttrf, d, e[:-1])
+
+
+@pytest.mark.parametrize("ddtype,dtype",
+                         zip(REAL_DTYPES + REAL_DTYPES, DTYPES))
+def test_pttrf_pttrs_errors_singular_nonSPD(ddtype, dtype):
+    n = 10
+    rng = np.random.RandomState(42)
+    pttrf = get_lapack_funcs('pttrf', dtype=dtype)
+    d = generate_random_dtype_array((n,), ddtype, rng) + 2
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+    # test that singular (row of all zeroes) matrix fails via info
+    d[0] = 0
+    e[0] = 0
+    _d, _e, info = pttrf(d, e)
+    assert_equal(_d[info - 1], 0,
+                 f"?pttrf: _d[info-1] is {_d[info - 1]}, not the illegal value :0.")
+
+    # test with non-spd matrix
+    d = generate_random_dtype_array((n,), ddtype, rng)
+    _d, _e, info = pttrf(d, e)
+    assert_(info != 0, "?pttrf should fail with non-spd matrix, but didn't")
+
+
+@pytest.mark.parametrize(("d, e, d_expect, e_expect, b, x_expect"), [
+                         (np.array([4, 10, 29, 25, 5]),
+                          np.array([-2, -6, 15, 8]),
+                          np.array([4, 9, 25, 16, 1]),
+                          np.array([-.5, -.6667, .6, .5]),
+                          np.array([[6, 10], [9, 4], [2, 9], [14, 65],
+                                    [7, 23]]),
+                          np.array([[2.5, 2], [2, -1], [1, -3], [-1, 6],
+                                    [3, -5]])
+                          ), (
+                          np.array([16, 41, 46, 21]),
+                          np.array([16 + 16j, 18 - 9j, 1 - 4j]),
+                          np.array([16, 9, 1, 4]),
+                          np.array([1+1j, 2-1j, 1-4j]),
+                          np.array([[64+16j, -16-32j], [93+62j, 61-66j],
+                                    [78-80j, 71-74j], [14-27j, 35+15j]]),
+                          np.array([[2+1j, -3-2j], [1+1j, 1+1j], [1-2j, 1-2j],
+                                    [1-1j, 2+1j]])
+                         )])
+def test_pttrf_pttrs_NAG(d, e, d_expect, e_expect, b, x_expect):
+    # test to assure that wrapper is consistent with NAG Manual Mark 26
+    # example problems: f07jdf and f07jef (real)
+    # examples: f07jrf and f07csf (complex)
+    # NAG examples provide 4 decimals.
+    # (Links expire, so please search for "NAG Library Manual Mark 26" online)
+
+    atol = 1e-4
+    pttrf = get_lapack_funcs('pttrf', dtype=e[0])
+    _d, _e, info = pttrf(d, e)
+    assert_allclose(_d, d_expect, atol=atol)
+    assert_allclose(_e, e_expect, atol=atol)
+
+    pttrs = get_lapack_funcs('pttrs', dtype=e[0])
+    _x, info = pttrs(_d, _e.conj(), b)
+    assert_allclose(_x, x_expect, atol=atol)
+
+    # also test option `lower`
+    if e.dtype in COMPLEX_DTYPES:
+        _x, info = pttrs(_d, _e, b, lower=1)
+        assert_allclose(_x, x_expect, atol=atol)
+
+
+def pteqr_get_d_e_A_z(dtype, realtype, n, compute_z):
+    # used by ?pteqr tests to build parameters
+    # returns tuple of (d, e, A, z)
+    rng = np.random.RandomState(42)
+    if compute_z == 1:
+        # build Hermitian A from Q**T * tri * Q = A by creating Q and tri
+        A_eig = generate_random_dtype_array((n, n), dtype, rng)
+        A_eig = A_eig + np.diag(np.zeros(n) + 4*n)
+        A_eig = (A_eig + A_eig.conj().T) / 2
+        # obtain right eigenvectors (orthogonal)
+        vr = eigh(A_eig)[1]
+        # create tridiagonal matrix
+        d = generate_random_dtype_array((n,), realtype, rng) + 4
+        e = generate_random_dtype_array((n-1,), realtype, rng)
+        tri = np.diag(d) + np.diag(e, 1) + np.diag(e, -1)
+        # Build A using these factors that sytrd would: (Q**T * tri * Q = A)
+        A = vr @ tri @ vr.conj().T
+        # vr is orthogonal
+        z = vr
+
+    else:
+        # d and e are always real per lapack docs.
+        d = generate_random_dtype_array((n,), realtype, rng)
+        e = generate_random_dtype_array((n-1,), realtype, rng)
+
+        # make SPD
+        d = d + 4
+        A = np.diag(d) + np.diag(e, 1) + np.diag(e, -1)
+        z = np.diag(d) + np.diag(e, -1) + np.diag(e, 1)
+    return (d, e, A, z)
+
+
+@pytest.mark.parametrize("dtype,realtype",
+                         zip(DTYPES, REAL_DTYPES + REAL_DTYPES))
+@pytest.mark.parametrize("compute_z", range(3))
+def test_pteqr(dtype, realtype, compute_z):
+    '''
+    Tests the ?pteqr lapack routine for all dtypes and compute_z parameters.
+    It generates random SPD matrix diagonals d and e, and then confirms
+    correct eigenvalues with scipy.linalg.eig. With applicable compute_z=2 it
+    tests that z can reform A.
+    '''
+    seed(42)
+    atol = 1000*np.finfo(dtype).eps
+    pteqr = get_lapack_funcs(('pteqr'), dtype=dtype)
+
+    n = 10
+
+    d, e, A, z = pteqr_get_d_e_A_z(dtype, realtype, n, compute_z)
+
+    d_pteqr, e_pteqr, z_pteqr, info = pteqr(d=d, e=e, z=z, compute_z=compute_z)
+    assert_equal(info, 0, f"info = {info}, should be 0.")
+
+    # compare the routine's eigenvalues with scipy.linalg.eig's.
+    assert_allclose(np.sort(eigh(A)[0]), np.sort(d_pteqr), atol=atol)
+
+    if compute_z:
+        # verify z_pteqr as orthogonal
+        assert_allclose(z_pteqr @ np.conj(z_pteqr).T, np.identity(n),
+                        atol=atol)
+        # verify that z_pteqr recombines to A
+        assert_allclose(z_pteqr @ np.diag(d_pteqr) @ np.conj(z_pteqr).T,
+                        A, atol=atol)
+
+
+@pytest.mark.parametrize("dtype,realtype",
+                         zip(DTYPES, REAL_DTYPES + REAL_DTYPES))
+@pytest.mark.parametrize("compute_z", range(3))
+def test_pteqr_error_non_spd(dtype, realtype, compute_z):
+    seed(42)
+    pteqr = get_lapack_funcs(('pteqr'), dtype=dtype)
+
+    n = 10
+    d, e, A, z = pteqr_get_d_e_A_z(dtype, realtype, n, compute_z)
+
+    # test with non-spd matrix
+    d_pteqr, e_pteqr, z_pteqr, info = pteqr(d - 4, e, z=z, compute_z=compute_z)
+    assert info > 0
+
+
+@pytest.mark.parametrize("dtype,realtype",
+                         zip(DTYPES, REAL_DTYPES + REAL_DTYPES))
+@pytest.mark.parametrize("compute_z", range(3))
+def test_pteqr_raise_error_wrong_shape(dtype, realtype, compute_z):
+    seed(42)
+    pteqr = get_lapack_funcs(('pteqr'), dtype=dtype)
+    n = 10
+    d, e, A, z = pteqr_get_d_e_A_z(dtype, realtype, n, compute_z)
+    # test with incorrect/incompatible array sizes
+    assert_raises(ValueError, pteqr, d[:-1], e, z=z, compute_z=compute_z)
+    assert_raises(ValueError, pteqr, d, e[:-1], z=z, compute_z=compute_z)
+    if compute_z:
+        assert_raises(ValueError, pteqr, d, e, z=z[:-1], compute_z=compute_z)
+
+
+@pytest.mark.parametrize("dtype,realtype",
+                         zip(DTYPES, REAL_DTYPES + REAL_DTYPES))
+@pytest.mark.parametrize("compute_z", range(3))
+def test_pteqr_error_singular(dtype, realtype, compute_z):
+    seed(42)
+    pteqr = get_lapack_funcs(('pteqr'), dtype=dtype)
+    n = 10
+    d, e, A, z = pteqr_get_d_e_A_z(dtype, realtype, n, compute_z)
+    # test with singular matrix
+    d[0] = 0
+    e[0] = 0
+    d_pteqr, e_pteqr, z_pteqr, info = pteqr(d, e, z=z, compute_z=compute_z)
+    assert info > 0
+
+
+@pytest.mark.parametrize("compute_z,d,e,d_expect,z_expect",
+                         [(2,  # "I"
+                           np.array([4.16, 5.25, 1.09, .62]),
+                           np.array([3.17, -.97, .55]),
+                           np.array([8.0023, 1.9926, 1.0014, 0.1237]),
+                           np.array([[0.6326, 0.6245, -0.4191, 0.1847],
+                                     [0.7668, -0.4270, 0.4176, -0.2352],
+                                     [-0.1082, 0.6071, 0.4594, -0.6393],
+                                     [-0.0081, 0.2432, 0.6625, 0.7084]])),
+                          ])
+def test_pteqr_NAG_f08jgf(compute_z, d, e, d_expect, z_expect):
+    '''
+    Implements real (f08jgf) example from NAG Manual Mark 26.
+    Tests for correct outputs.
+    '''
+    # the NAG manual has 4 decimals accuracy
+    atol = 1e-4
+    pteqr = get_lapack_funcs(('pteqr'), dtype=d.dtype)
+
+    z = np.diag(d) + np.diag(e, 1) + np.diag(e, -1)
+    _d, _e, _z, info = pteqr(d=d, e=e, z=z, compute_z=compute_z)
+    assert_allclose(_d, d_expect, atol=atol)
+    assert_allclose(np.abs(_z), np.abs(z_expect), atol=atol)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('matrix_size', [(3, 4), (7, 6), (6, 6)])
+def test_geqrfp(dtype, matrix_size):
+    # Tests for all dytpes, tall, wide, and square matrices.
+    # Using the routine with random matrix A, Q and R are obtained and then
+    # tested such that R is upper triangular and non-negative on the diagonal,
+    # and Q is an orthogonal matrix. Verifies that A=Q@R. It also
+    # tests against a matrix that for which the  linalg.qr method returns
+    # negative diagonals, and for error messaging.
+
+    # set test tolerance appropriate for dtype
+    rng = np.random.RandomState(42)
+    rtol = 250*np.finfo(dtype).eps
+    atol = 100*np.finfo(dtype).eps
+    # get appropriate ?geqrfp for dtype
+    geqrfp = get_lapack_funcs(('geqrfp'), dtype=dtype)
+    gqr = get_lapack_funcs(("orgqr"), dtype=dtype)
+
+    m, n = matrix_size
+
+    # create random matrix of dimensions m x n
+    A = generate_random_dtype_array((m, n), dtype=dtype, rng=rng)
+    # create qr matrix using geqrfp
+    qr_A, tau, info = geqrfp(A)
+
+    # obtain r from the upper triangular area
+    r = np.triu(qr_A)
+
+    # obtain q from the orgqr lapack routine
+    # based on linalg.qr's extraction strategy of q with orgqr
+
+    if m > n:
+        # this adds an extra column to the end of qr_A
+        # let qqr be an empty m x m matrix
+        qqr = np.zeros((m, m), dtype=dtype)
+        # set first n columns of qqr to qr_A
+        qqr[:, :n] = qr_A
+        # determine q from this qqr
+        # note that m is a sufficient for lwork based on LAPACK documentation
+        q = gqr(qqr, tau=tau, lwork=m)[0]
+    else:
+        q = gqr(qr_A[:, :m], tau=tau, lwork=m)[0]
+
+    # test that q and r still make A
+    assert_allclose(q@r, A, rtol=rtol)
+    # ensure that q is orthogonal (that q @ transposed q is the identity)
+    assert_allclose(np.eye(q.shape[0]), q@(q.conj().T), rtol=rtol,
+                    atol=atol)
+    # ensure r is upper tri by comparing original r to r as upper triangular
+    assert_allclose(r, np.triu(r), rtol=rtol)
+    # make sure diagonals of r are positive for this random solution
+    assert_(np.all(np.diag(r) > np.zeros(len(np.diag(r)))))
+    # ensure that info is zero for this success
+    assert_(info == 0)
+
+    # test that this routine gives r diagonals that are positive for a
+    # matrix that returns negatives in the diagonal with scipy.linalg.rq
+    A_negative = generate_random_dtype_array((n, m), dtype=dtype, rng=rng) * -1
+    r_rq_neg, q_rq_neg = qr(A_negative)
+    rq_A_neg, tau_neg, info_neg = geqrfp(A_negative)
+    # assert that any of the entries on the diagonal from linalg.qr
+    #   are negative and that all of geqrfp are positive.
+    assert_(np.any(np.diag(r_rq_neg) < 0) and
+            np.all(np.diag(r) > 0))
+
+
+def test_geqrfp_errors_with_empty_array():
+    # check that empty array raises good error message
+    A_empty = np.array([])
+    geqrfp = get_lapack_funcs('geqrfp', dtype=A_empty.dtype)
+    assert_raises(Exception, geqrfp, A_empty)
+
+
+@pytest.mark.parametrize("driver", ['ev', 'evd', 'evr', 'evx'])
+@pytest.mark.parametrize("pfx", ['sy', 'he'])
+def test_standard_eigh_lworks(pfx, driver):
+    n = 1200  # Some sufficiently big arbitrary number
+    dtype = REAL_DTYPES if pfx == 'sy' else COMPLEX_DTYPES
+    sc_dlw = get_lapack_funcs(pfx+driver+'_lwork', dtype=dtype[0])
+    dz_dlw = get_lapack_funcs(pfx+driver+'_lwork', dtype=dtype[1])
+    try:
+        _compute_lwork(sc_dlw, n, lower=1)
+        _compute_lwork(dz_dlw, n, lower=1)
+    except Exception as e:
+        pytest.fail(f"{pfx+driver}_lwork raised unexpected exception: {e}")
+
+
+@pytest.mark.parametrize("driver", ['gv', 'gvx'])
+@pytest.mark.parametrize("pfx", ['sy', 'he'])
+def test_generalized_eigh_lworks(pfx, driver):
+    n = 1200  # Some sufficiently big arbitrary number
+    dtype = REAL_DTYPES if pfx == 'sy' else COMPLEX_DTYPES
+    sc_dlw = get_lapack_funcs(pfx+driver+'_lwork', dtype=dtype[0])
+    dz_dlw = get_lapack_funcs(pfx+driver+'_lwork', dtype=dtype[1])
+    # Shouldn't raise any exceptions
+    try:
+        _compute_lwork(sc_dlw, n, uplo="L")
+        _compute_lwork(dz_dlw, n, uplo="L")
+    except Exception as e:
+        pytest.fail(f"{pfx+driver}_lwork raised unexpected exception: {e}")
+
+
+@pytest.mark.parametrize("dtype_", DTYPES)
+@pytest.mark.parametrize("m", [1, 10, 100, 1000])
+def test_orcsd_uncsd_lwork(dtype_, m):
+    seed(1234)
+    p = randint(0, m)
+    q = m - p
+    pfx = 'or' if dtype_ in REAL_DTYPES else 'un'
+    dlw = pfx + 'csd_lwork'
+    lw = get_lapack_funcs(dlw, dtype=dtype_)
+    lwval = _compute_lwork(lw, m, p, q)
+    lwval = lwval if pfx == 'un' else (lwval,)
+    assert all([x > 0 for x in lwval])
+
+
+@pytest.mark.parametrize("dtype_", DTYPES)
+def test_orcsd_uncsd(dtype_):
+    m, p, q = 250, 80, 170
+
+    pfx = 'or' if dtype_ in REAL_DTYPES else 'un'
+    X = ortho_group.rvs(m) if pfx == 'or' else unitary_group.rvs(m)
+
+    drv, dlw = get_lapack_funcs((pfx + 'csd', pfx + 'csd_lwork'), dtype=dtype_)
+    lwval = _compute_lwork(dlw, m, p, q)
+    lwvals = {'lwork': lwval} if pfx == 'or' else dict(zip(['lwork',
+                                                            'lrwork'], lwval))
+
+    cs11, cs12, cs21, cs22, theta, u1, u2, v1t, v2t, info =\
+        drv(X[:p, :q], X[:p, q:], X[p:, :q], X[p:, q:], **lwvals)
+
+    assert info == 0
+
+    U = block_diag(u1, u2)
+    VH = block_diag(v1t, v2t)
+    r = min(min(p, q), min(m-p, m-q))
+    n11 = min(p, q) - r
+    n12 = min(p, m-q) - r
+    n21 = min(m-p, q) - r
+    n22 = min(m-p, m-q) - r
+
+    S = np.zeros((m, m), dtype=dtype_)
+    one = dtype_(1.)
+    for i in range(n11):
+        S[i, i] = one
+    for i in range(n22):
+        S[p+i, q+i] = one
+    for i in range(n12):
+        S[i+n11+r, i+n11+r+n21+n22+r] = -one
+    for i in range(n21):
+        S[p+n22+r+i, n11+r+i] = one
+
+    for i in range(r):
+        S[i+n11, i+n11] = np.cos(theta[i])
+        S[p+n22+i, i+r+n21+n22] = np.cos(theta[i])
+
+        S[i+n11, i+n11+n21+n22+r] = -np.sin(theta[i])
+        S[p+n22+i, i+n11] = np.sin(theta[i])
+
+    Xc = U @ S @ VH
+    assert_allclose(X, Xc, rtol=0., atol=1e4*np.finfo(dtype_).eps)
+
+
+@pytest.mark.parametrize("dtype", DTYPES)
+@pytest.mark.parametrize("trans_bool", [False, True])
+@pytest.mark.parametrize("fact", ["F", "N"])
+def test_gtsvx(dtype, trans_bool, fact):
+    """
+    These tests uses ?gtsvx to solve a random Ax=b system for each dtype.
+    It tests that the outputs define an LU matrix, that inputs are unmodified,
+    transposal options, incompatible shapes, singular matrices, and
+    singular factorizations. It parametrizes DTYPES and the 'fact' value along
+    with the fact related inputs.
+    """
+    rng = np.random.RandomState(42)
+    # set test tolerance appropriate for dtype
+    atol = 100 * np.finfo(dtype).eps
+    # obtain routine
+    gtsvx, gttrf = get_lapack_funcs(('gtsvx', 'gttrf'), dtype=dtype)
+    # Generate random tridiagonal matrix A
+    n = 10
+    dl = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    d = generate_random_dtype_array((n,), dtype=dtype, rng=rng)
+    du = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    A = np.diag(dl, -1) + np.diag(d) + np.diag(du, 1)
+    # generate random solution x
+    x = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    # create b from x for equation Ax=b
+    trans = ("T" if dtype in REAL_DTYPES else "C") if trans_bool else "N"
+    b = (A.conj().T if trans_bool else A) @ x
+
+    # store a copy of the inputs to check they haven't been modified later
+    inputs_cpy = [dl.copy(), d.copy(), du.copy(), b.copy()]
+
+    # set these to None if fact = 'N', or the output of gttrf is fact = 'F'
+    dlf_, df_, duf_, du2f_, ipiv_, info_ = \
+        gttrf(dl, d, du) if fact == 'F' else [None]*6
+
+    gtsvx_out = gtsvx(dl, d, du, b, fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+    dlf, df, duf, du2f, ipiv, x_soln, rcond, ferr, berr, info = gtsvx_out
+    assert_(info == 0, f"?gtsvx info = {info}, should be zero")
+
+    # assure that inputs are unmodified
+    assert_array_equal(dl, inputs_cpy[0])
+    assert_array_equal(d, inputs_cpy[1])
+    assert_array_equal(du, inputs_cpy[2])
+    assert_array_equal(b, inputs_cpy[3])
+
+    # test that x_soln matches the expected x
+    assert_allclose(x, x_soln, atol=atol)
+
+    # assert that the outputs are of correct type or shape
+    # rcond should be a scalar
+    assert_(hasattr(rcond, "__len__") is not True,
+            f"rcond should be scalar but is {rcond}")
+    # ferr should be length of # of cols in x
+    assert_(ferr.shape[0] == b.shape[1], (f"ferr.shape is {ferr.shape[0]} but should"
+                                          f" be {b.shape[1]}"))
+    # berr should be length of # of cols in x
+    assert_(berr.shape[0] == b.shape[1], (f"berr.shape is {berr.shape[0]} but should"
+                                          f" be {b.shape[1]}"))
+
+
+@pytest.mark.parametrize("dtype", DTYPES)
+@pytest.mark.parametrize("trans_bool", [0, 1])
+@pytest.mark.parametrize("fact", ["F", "N"])
+def test_gtsvx_error_singular(dtype, trans_bool, fact):
+    rng = np.random.RandomState(42)
+    # obtain routine
+    gtsvx, gttrf = get_lapack_funcs(('gtsvx', 'gttrf'), dtype=dtype)
+    # Generate random tridiagonal matrix A
+    n = 10
+    dl = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    d = generate_random_dtype_array((n,), dtype=dtype, rng=rng)
+    du = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    A = np.diag(dl, -1) + np.diag(d) + np.diag(du, 1)
+    # generate random solution x
+    x = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    # create b from x for equation Ax=b
+    trans = "T" if dtype in REAL_DTYPES else "C"
+    b = (A.conj().T if trans_bool else A) @ x
+
+    # set these to None if fact = 'N', or the output of gttrf is fact = 'F'
+    dlf_, df_, duf_, du2f_, ipiv_, info_ = \
+        gttrf(dl, d, du) if fact == 'F' else [None]*6
+
+    gtsvx_out = gtsvx(dl, d, du, b, fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+    dlf, df, duf, du2f, ipiv, x_soln, rcond, ferr, berr, info = gtsvx_out
+    # test with singular matrix
+    # no need to test inputs with fact "F" since ?gttrf already does.
+    if fact == "N":
+        # Construct a singular example manually
+        d[-1] = 0
+        dl[-1] = 0
+        # solve using routine
+        gtsvx_out = gtsvx(dl, d, du, b)
+        dlf, df, duf, du2f, ipiv, x_soln, rcond, ferr, berr, info = gtsvx_out
+        # test for the singular matrix.
+        assert info > 0, "info should be > 0 for singular matrix"
+
+    elif fact == 'F':
+        # assuming that a singular factorization is input
+        df_[-1] = 0
+        duf_[-1] = 0
+        du2f_[-1] = 0
+
+        gtsvx_out = gtsvx(dl, d, du, b, fact=fact, dlf=dlf_, df=df_, duf=duf_,
+                          du2=du2f_, ipiv=ipiv_)
+        dlf, df, duf, du2f, ipiv, x_soln, rcond, ferr, berr, info = gtsvx_out
+        # info should not be zero and should provide index of illegal value
+        assert info > 0, "info should be > 0 for singular matrix"
+
+
+@pytest.mark.parametrize("dtype", DTYPES*2)
+@pytest.mark.parametrize("trans_bool", [False, True])
+@pytest.mark.parametrize("fact", ["F", "N"])
+def test_gtsvx_error_incompatible_size(dtype, trans_bool, fact):
+    rng = np.random.RandomState(42)
+    # obtain routine
+    gtsvx, gttrf = get_lapack_funcs(('gtsvx', 'gttrf'), dtype=dtype)
+    # Generate random tridiagonal matrix A
+    n = 10
+    dl = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    d = generate_random_dtype_array((n,), dtype=dtype, rng=rng)
+    du = generate_random_dtype_array((n-1,), dtype=dtype, rng=rng)
+    A = np.diag(dl, -1) + np.diag(d) + np.diag(du, 1)
+    # generate random solution x
+    x = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    # create b from x for equation Ax=b
+    trans = "T" if dtype in REAL_DTYPES else "C"
+    b = (A.conj().T if trans_bool else A) @ x
+
+    # set these to None if fact = 'N', or the output of gttrf is fact = 'F'
+    dlf_, df_, duf_, du2f_, ipiv_, info_ = \
+        gttrf(dl, d, du) if fact == 'F' else [None]*6
+
+    if fact == "N":
+        assert_raises(ValueError, gtsvx, dl[:-1], d, du, b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+        assert_raises(ValueError, gtsvx, dl, d[:-1], du, b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+        assert_raises(ValueError, gtsvx, dl, d, du[:-1], b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+        assert_raises(Exception, gtsvx, dl, d, du, b[:-1],
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+    else:
+        assert_raises(ValueError, gtsvx, dl, d, du, b,
+                      fact=fact, trans=trans, dlf=dlf_[:-1], df=df_,
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+        assert_raises(ValueError, gtsvx, dl, d, du, b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_[:-1],
+                      duf=duf_, du2=du2f_, ipiv=ipiv_)
+        assert_raises(ValueError, gtsvx, dl, d, du, b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_[:-1], du2=du2f_, ipiv=ipiv_)
+        assert_raises(ValueError, gtsvx, dl, d, du, b,
+                      fact=fact, trans=trans, dlf=dlf_, df=df_,
+                      duf=duf_, du2=du2f_[:-1], ipiv=ipiv_)
+
+
+@pytest.mark.parametrize("du,d,dl,b,x",
+                         [(np.array([2.1, -1.0, 1.9, 8.0]),
+                           np.array([3.0, 2.3, -5.0, -0.9, 7.1]),
+                           np.array([3.4, 3.6, 7.0, -6.0]),
+                           np.array([[2.7, 6.6], [-.5, 10.8], [2.6, -3.2],
+                                     [.6, -11.2], [2.7, 19.1]]),
+                           np.array([[-4, 5], [7, -4], [3, -3], [-4, -2],
+                                     [-3, 1]])),
+                          (np.array([2 - 1j, 2 + 1j, -1 + 1j, 1 - 1j]),
+                           np.array([-1.3 + 1.3j, -1.3 + 1.3j, -1.3 + 3.3j,
+                                     -.3 + 4.3j, -3.3 + 1.3j]),
+                           np.array([1 - 2j, 1 + 1j, 2 - 3j, 1 + 1j]),
+                           np.array([[2.4 - 5j, 2.7 + 6.9j],
+                                     [3.4 + 18.2j, -6.9 - 5.3j],
+                                     [-14.7 + 9.7j, -6 - .6j],
+                                     [31.9 - 7.7j, -3.9 + 9.3j],
+                                     [-1 + 1.6j, -3 + 12.2j]]),
+                           np.array([[1 + 1j, 2 - 1j], [3 - 1j, 1 + 2j],
+                                     [4 + 5j, -1 + 1j], [-1 - 2j, 2 + 1j],
+                                     [1 - 1j, 2 - 2j]]))])
+def test_gtsvx_NAG(du, d, dl, b, x):
+    # Test to ensure wrapper is consistent with NAG Manual Mark 26
+    # example problems: real (f07cbf) and complex (f07cpf)
+    gtsvx = get_lapack_funcs('gtsvx', dtype=d.dtype)
+
+    gtsvx_out = gtsvx(dl, d, du, b)
+    dlf, df, duf, du2f, ipiv, x_soln, rcond, ferr, berr, info = gtsvx_out
+
+    assert_array_almost_equal(x, x_soln)
+
+
+@pytest.mark.parametrize("dtype,realtype", zip(DTYPES, REAL_DTYPES
+                                               + REAL_DTYPES))
+@pytest.mark.parametrize("fact,df_de_lambda",
+                         [("F",
+                           lambda d, e: get_lapack_funcs('pttrf',
+                                                         dtype=e.dtype)(d, e)),
+                          ("N", lambda d, e: (None, None, None))])
+def test_ptsvx(dtype, realtype, fact, df_de_lambda):
+    '''
+    This tests the ?ptsvx lapack routine wrapper to solve a random system
+    Ax = b for all dtypes and input variations. Tests for: unmodified
+    input parameters, fact options, incompatible matrix shapes raise an error,
+    and singular matrices return info of illegal value.
+    '''
+    rng = np.random.RandomState(42)
+    # set test tolerance appropriate for dtype
+    atol = 100 * np.finfo(dtype).eps
+    ptsvx = get_lapack_funcs('ptsvx', dtype=dtype)
+    n = 5
+    # create diagonals according to size and dtype
+    d = generate_random_dtype_array((n,), realtype, rng) + 4
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+    A = np.diag(d) + np.diag(e, -1) + np.diag(np.conj(e), 1)
+    x_soln = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    b = A @ x_soln
+
+    # use lambda to determine what df, ef are
+    df, ef, info = df_de_lambda(d, e)
+
+    # create copy to later test that they are unmodified
+    diag_cpy = [d.copy(), e.copy(), b.copy()]
+
+    # solve using routine
+    df, ef, x, rcond, ferr, berr, info = ptsvx(d, e, b, fact=fact,
+                                               df=df, ef=ef)
+    # d, e, and b should be unmodified
+    assert_array_equal(d, diag_cpy[0])
+    assert_array_equal(e, diag_cpy[1])
+    assert_array_equal(b, diag_cpy[2])
+    assert_(info == 0, f"info should be 0 but is {info}.")
+    assert_array_almost_equal(x_soln, x)
+
+    # test that the factors from ptsvx can be recombined to make A
+    L = np.diag(ef, -1) + np.diag(np.ones(n))
+    D = np.diag(df)
+    assert_allclose(A, L@D@(np.conj(L).T), atol=atol)
+
+    # assert that the outputs are of correct type or shape
+    # rcond should be a scalar
+    assert not hasattr(rcond, "__len__"), \
+        f"rcond should be scalar but is {rcond}"
+    # ferr should be length of # of cols in x
+    assert_(ferr.shape == (2,), (f"ferr.shape is {ferr.shape} but should be "
+                                 "({x_soln.shape[1]},)"))
+    # berr should be length of # of cols in x
+    assert_(berr.shape == (2,), (f"berr.shape is {berr.shape} but should be "
+                                 "({x_soln.shape[1]},)"))
+
+
+@pytest.mark.parametrize("dtype,realtype", zip(DTYPES, REAL_DTYPES
+                                               + REAL_DTYPES))
+@pytest.mark.parametrize("fact,df_de_lambda",
+                         [("F",
+                           lambda d, e: get_lapack_funcs('pttrf',
+                                                         dtype=e.dtype)(d, e)),
+                          ("N", lambda d, e: (None, None, None))])
+def test_ptsvx_error_raise_errors(dtype, realtype, fact, df_de_lambda):
+    rng = np.random.RandomState(42)
+    ptsvx = get_lapack_funcs('ptsvx', dtype=dtype)
+    n = 5
+    # create diagonals according to size and dtype
+    d = generate_random_dtype_array((n,), realtype, rng) + 4
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+    A = np.diag(d) + np.diag(e, -1) + np.diag(np.conj(e), 1)
+    x_soln = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    b = A @ x_soln
+
+    # use lambda to determine what df, ef are
+    df, ef, info = df_de_lambda(d, e)
+
+    # test with malformatted array sizes
+    assert_raises(ValueError, ptsvx, d[:-1], e, b, fact=fact, df=df, ef=ef)
+    assert_raises(ValueError, ptsvx, d, e[:-1], b, fact=fact, df=df, ef=ef)
+    assert_raises(Exception, ptsvx, d, e, b[:-1], fact=fact, df=df, ef=ef)
+
+
+@pytest.mark.parametrize("dtype,realtype", zip(DTYPES, REAL_DTYPES
+                                               + REAL_DTYPES))
+@pytest.mark.parametrize("fact,df_de_lambda",
+                         [("F",
+                           lambda d, e: get_lapack_funcs('pttrf',
+                                                         dtype=e.dtype)(d, e)),
+                          ("N", lambda d, e: (None, None, None))])
+def test_ptsvx_non_SPD_singular(dtype, realtype, fact, df_de_lambda):
+    rng = np.random.RandomState(42)
+    ptsvx = get_lapack_funcs('ptsvx', dtype=dtype)
+    n = 5
+    # create diagonals according to size and dtype
+    d = generate_random_dtype_array((n,), realtype, rng) + 4
+    e = generate_random_dtype_array((n-1,), dtype, rng)
+    A = np.diag(d) + np.diag(e, -1) + np.diag(np.conj(e), 1)
+    x_soln = generate_random_dtype_array((n, 2), dtype=dtype, rng=rng)
+    b = A @ x_soln
+
+    # use lambda to determine what df, ef are
+    df, ef, info = df_de_lambda(d, e)
+
+    if fact == "N":
+        d[3] = 0
+        # obtain new df, ef
+        df, ef, info = df_de_lambda(d, e)
+        # solve using routine
+        df, ef, x, rcond, ferr, berr, info = ptsvx(d, e, b)
+        # test for the singular matrix.
+        assert info > 0 and info <= n
+
+        # non SPD matrix
+        d = generate_random_dtype_array((n,), realtype, rng)
+        df, ef, x, rcond, ferr, berr, info = ptsvx(d, e, b)
+        assert info > 0 and info <= n
+    else:
+        # assuming that someone is using a singular factorization
+        df, ef, info = df_de_lambda(d, e)
+        df[0] = 0
+        ef[0] = 0
+        df, ef, x, rcond, ferr, berr, info = ptsvx(d, e, b, fact=fact,
+                                                   df=df, ef=ef)
+        assert info > 0
+
+
+@pytest.mark.parametrize('d,e,b,x',
+                         [(np.array([4, 10, 29, 25, 5]),
+                           np.array([-2, -6, 15, 8]),
+                           np.array([[6, 10], [9, 4], [2, 9], [14, 65],
+                                     [7, 23]]),
+                           np.array([[2.5, 2], [2, -1], [1, -3],
+                                     [-1, 6], [3, -5]])),
+                          (np.array([16, 41, 46, 21]),
+                           np.array([16 + 16j, 18 - 9j, 1 - 4j]),
+                           np.array([[64 + 16j, -16 - 32j],
+                                     [93 + 62j, 61 - 66j],
+                                     [78 - 80j, 71 - 74j],
+                                     [14 - 27j, 35 + 15j]]),
+                           np.array([[2 + 1j, -3 - 2j],
+                                     [1 + 1j, 1 + 1j],
+                                     [1 - 2j, 1 - 2j],
+                                     [1 - 1j, 2 + 1j]]))])
+def test_ptsvx_NAG(d, e, b, x):
+    # test to assure that wrapper is consistent with NAG Manual Mark 26
+    # example problems: f07jbf, f07jpf
+    # (Links expire, so please search for "NAG Library Manual Mark 26" online)
+
+    # obtain routine with correct type based on e.dtype
+    ptsvx = get_lapack_funcs('ptsvx', dtype=e.dtype)
+    # solve using routine
+    df, ef, x_ptsvx, rcond, ferr, berr, info = ptsvx(d, e, b)
+    # determine ptsvx's solution and x are the same.
+    assert_array_almost_equal(x, x_ptsvx)
+
+
+@pytest.mark.parametrize('lower', [False, True])
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_pptrs_pptri_pptrf_ppsv_ppcon(dtype, lower):
+    rng = np.random.RandomState(1234)
+    atol = np.finfo(dtype).eps*100
+    # Manual conversion to/from packed format is feasible here.
+    n, nrhs = 10, 4
+    a = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+    b = generate_random_dtype_array([n, nrhs], dtype=dtype, rng=rng)
+
+    a = a.conj().T + a + np.eye(n, dtype=dtype) * dtype(5.)
+    if lower:
+        inds = ([x for y in range(n) for x in range(y, n)],
+                [y for y in range(n) for x in range(y, n)])
+    else:
+        inds = ([x for y in range(1, n+1) for x in range(y)],
+                [y-1 for y in range(1, n+1) for x in range(y)])
+    ap = a[inds]
+    ppsv, pptrf, pptrs, pptri, ppcon = get_lapack_funcs(
+        ('ppsv', 'pptrf', 'pptrs', 'pptri', 'ppcon'),
+        dtype=dtype,
+        ilp64="preferred")
+
+    ul, info = pptrf(n, ap, lower=lower)
+    assert_equal(info, 0)
+    aul = cholesky(a, lower=lower)[inds]
+    assert_allclose(ul, aul, rtol=0, atol=atol)
+
+    uli, info = pptri(n, ul, lower=lower)
+    assert_equal(info, 0)
+    auli = inv(a)[inds]
+    assert_allclose(uli, auli, rtol=0, atol=atol)
+
+    x, info = pptrs(n, ul, b, lower=lower)
+    assert_equal(info, 0)
+    bx = solve(a, b)
+    assert_allclose(x, bx, rtol=0, atol=atol)
+
+    xv, info = ppsv(n, ap, b, lower=lower)
+    assert_equal(info, 0)
+    assert_allclose(xv, bx, rtol=0, atol=atol)
+
+    anorm = np.linalg.norm(a, 1)
+    rcond, info = ppcon(n, ap, anorm=anorm, lower=lower)
+    assert_equal(info, 0)
+    assert_(abs(1/rcond - np.linalg.cond(a, p=1))*rcond < 1)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_gees_trexc(dtype):
+    rng = np.random.RandomState(1234)
+    atol = np.finfo(dtype).eps*100
+
+    n = 10
+    a = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+
+    gees, trexc = get_lapack_funcs(('gees', 'trexc'), dtype=dtype)
+
+    result = gees(lambda x: None, a, overwrite_a=False)
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    z = result[-3]
+
+    d2 = t[6, 6]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(z @ t @ z.conj().T, a, rtol=0, atol=atol)
+
+    result = trexc(t, z, 7, 1)
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    z = result[-2]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(z @ t @ z.conj().T, a, rtol=0, atol=atol)
+
+    assert_allclose(t[0, 0], d2, rtol=0, atol=atol)
+
+
+@pytest.mark.parametrize(
+    "t, expect, ifst, ilst",
+    [(np.array([[0.80, -0.11, 0.01, 0.03],
+                [0.00, -0.10, 0.25, 0.35],
+                [0.00, -0.65, -0.10, 0.20],
+                [0.00, 0.00, 0.00, -0.10]]),
+      np.array([[-0.1000, -0.6463, 0.0874, 0.2010],
+                [0.2514, -0.1000, 0.0927, 0.3505],
+                [0.0000, 0.0000, 0.8000, -0.0117],
+                [0.0000, 0.0000, 0.0000, -0.1000]]),
+      2, 1),
+     (np.array([[-6.00 - 7.00j, 0.36 - 0.36j, -0.19 + 0.48j, 0.88 - 0.25j],
+                [0.00 + 0.00j, -5.00 + 2.00j, -0.03 - 0.72j, -0.23 + 0.13j],
+                [0.00 + 0.00j, 0.00 + 0.00j, 8.00 - 1.00j, 0.94 + 0.53j],
+                [0.00 + 0.00j, 0.00 + 0.00j, 0.00 + 0.00j, 3.00 - 4.00j]]),
+      np.array([[-5.0000 + 2.0000j, -0.1574 + 0.7143j,
+                 0.1781 - 0.1913j, 0.3950 + 0.3861j],
+                [0.0000 + 0.0000j, 8.0000 - 1.0000j,
+                 1.0742 + 0.1447j, 0.2515 - 0.3397j],
+                [0.0000 + 0.0000j, 0.0000 + 0.0000j,
+                 3.0000 - 4.0000j, 0.2264 + 0.8962j],
+                [0.0000 + 0.0000j, 0.0000 + 0.0000j,
+                 0.0000 + 0.0000j, -6.0000 - 7.0000j]]),
+      1, 4)])
+def test_trexc_NAG(t, ifst, ilst, expect):
+    """
+    This test implements the example found in the NAG manual,
+    f08qfc, f08qtc, f08qgc, f08quc.
+    """
+    # NAG manual provides accuracy up to 4 decimals
+    atol = 1e-4
+    trexc = get_lapack_funcs('trexc', dtype=t.dtype)
+
+    result = trexc(t, t, ifst, ilst, wantq=0)
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    assert_allclose(expect, t, atol=atol)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_gges_tgexc(dtype):
+    rng = np.random.RandomState(1234)
+    atol = np.finfo(dtype).eps*100
+
+    n = 10
+    a = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+    b = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+
+    gges, tgexc = get_lapack_funcs(('gges', 'tgexc'), dtype=dtype)
+
+    result = gges(lambda x: None, a, b, overwrite_a=False, overwrite_b=False)
+    assert_equal(result[-1], 0)
+
+    s = result[0]
+    t = result[1]
+    q = result[-4]
+    z = result[-3]
+
+    d1 = s[0, 0] / t[0, 0]
+    d2 = s[6, 6] / t[6, 6]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(s, np.triu(s), rtol=0, atol=atol)
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(q @ s @ z.conj().T, a, rtol=0, atol=atol)
+    assert_allclose(q @ t @ z.conj().T, b, rtol=0, atol=atol)
+
+    result = tgexc(s, t, q, z, 7, 1)
+    assert_equal(result[-1], 0)
+
+    s = result[0]
+    t = result[1]
+    q = result[2]
+    z = result[3]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(s, np.triu(s), rtol=0, atol=atol)
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(q @ s @ z.conj().T, a, rtol=0, atol=atol)
+    assert_allclose(q @ t @ z.conj().T, b, rtol=0, atol=atol)
+
+    assert_allclose(s[0, 0] / t[0, 0], d2, rtol=0, atol=atol)
+    assert_allclose(s[1, 1] / t[1, 1], d1, rtol=0, atol=atol)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_gees_trsen(dtype):
+    rng = np.random.RandomState(1234)
+    atol = np.finfo(dtype).eps*100
+
+    n = 10
+    a = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+
+    gees, trsen, trsen_lwork = get_lapack_funcs(
+        ('gees', 'trsen', 'trsen_lwork'), dtype=dtype)
+
+    result = gees(lambda x: None, a, overwrite_a=False)
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    z = result[-3]
+
+    d2 = t[6, 6]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(z @ t @ z.conj().T, a, rtol=0, atol=atol)
+
+    select = np.zeros(n)
+    select[6] = 1
+
+    lwork = _compute_lwork(trsen_lwork, select, t)
+
+    if dtype in COMPLEX_DTYPES:
+        result = trsen(select, t, z, lwork=lwork)
+    else:
+        result = trsen(select, t, z, lwork=lwork, liwork=lwork[1])
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    z = result[1]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(z @ t @ z.conj().T, a, rtol=0, atol=atol)
+
+    assert_allclose(t[0, 0], d2, rtol=0, atol=atol)
+
+
+@pytest.mark.parametrize(
+    "t, q, expect, select, expect_s, expect_sep",
+    [(np.array([[0.7995, -0.1144, 0.0060, 0.0336],
+                [0.0000, -0.0994, 0.2478, 0.3474],
+                [0.0000, -0.6483, -0.0994, 0.2026],
+                [0.0000, 0.0000, 0.0000, -0.1007]]),
+      np.array([[0.6551, 0.1037, 0.3450, 0.6641],
+                [0.5236, -0.5807, -0.6141, -0.1068],
+                [-0.5362, -0.3073, -0.2935, 0.7293],
+                [0.0956, 0.7467, -0.6463, 0.1249]]),
+      np.array([[0.3500, 0.4500, -0.1400, -0.1700],
+                [0.0900, 0.0700, -0.5399, 0.3500],
+                [-0.4400, -0.3300, -0.0300, 0.1700],
+                [0.2500, -0.3200, -0.1300, 0.1100]]),
+      np.array([1, 0, 0, 1]),
+      1.75e+00, 3.22e+00),
+     (np.array([[-6.0004 - 6.9999j, 0.3637 - 0.3656j,
+                 -0.1880 + 0.4787j, 0.8785 - 0.2539j],
+                [0.0000 + 0.0000j, -5.0000 + 2.0060j,
+                 -0.0307 - 0.7217j, -0.2290 + 0.1313j],
+                [0.0000 + 0.0000j, 0.0000 + 0.0000j,
+                 7.9982 - 0.9964j, 0.9357 + 0.5359j],
+                [0.0000 + 0.0000j, 0.0000 + 0.0000j,
+                 0.0000 + 0.0000j, 3.0023 - 3.9998j]]),
+      np.array([[-0.8347 - 0.1364j, -0.0628 + 0.3806j,
+                 0.2765 - 0.0846j, 0.0633 - 0.2199j],
+                [0.0664 - 0.2968j, 0.2365 + 0.5240j,
+                 -0.5877 - 0.4208j, 0.0835 + 0.2183j],
+                [-0.0362 - 0.3215j, 0.3143 - 0.5473j,
+                 0.0576 - 0.5736j, 0.0057 - 0.4058j],
+                [0.0086 + 0.2958j, -0.3416 - 0.0757j,
+                 -0.1900 - 0.1600j, 0.8327 - 0.1868j]]),
+      np.array([[-3.9702 - 5.0406j, -4.1108 + 3.7002j,
+                 -0.3403 + 1.0098j, 1.2899 - 0.8590j],
+                [0.3397 - 1.5006j, 1.5201 - 0.4301j,
+                 1.8797 - 5.3804j, 3.3606 + 0.6498j],
+                [3.3101 - 3.8506j, 2.4996 + 3.4504j,
+                 0.8802 - 1.0802j, 0.6401 - 1.4800j],
+                [-1.0999 + 0.8199j, 1.8103 - 1.5905j,
+                 3.2502 + 1.3297j, 1.5701 - 3.4397j]]),
+      np.array([1, 0, 0, 1]),
+      1.02e+00, 1.82e-01)])
+def test_trsen_NAG(t, q, select, expect, expect_s, expect_sep):
+    """
+    This test implements the example found in the NAG manual,
+    f08qgc, f08quc.
+    """
+    # NAG manual provides accuracy up to 4 and 2 decimals
+    atol = 1e-4
+    atol2 = 1e-2
+    trsen, trsen_lwork = get_lapack_funcs(
+        ('trsen', 'trsen_lwork'), dtype=t.dtype)
+
+    lwork = _compute_lwork(trsen_lwork, select, t)
+
+    if t.dtype in COMPLEX_DTYPES:
+        result = trsen(select, t, q, lwork=lwork)
+    else:
+        result = trsen(select, t, q, lwork=lwork, liwork=lwork[1])
+    assert_equal(result[-1], 0)
+
+    t = result[0]
+    q = result[1]
+    if t.dtype in COMPLEX_DTYPES:
+        s = result[4]
+        sep = result[5]
+    else:
+        s = result[5]
+        sep = result[6]
+
+    assert_allclose(expect, q @ t @ q.conj().T, atol=atol)
+    assert_allclose(expect_s, 1 / s, atol=atol2)
+    assert_allclose(expect_sep, 1 / sep, atol=atol2)
+
+
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_gges_tgsen(dtype):
+    rng = np.random.RandomState(1234)
+    atol = np.finfo(dtype).eps*100
+
+    n = 10
+    a = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+    b = generate_random_dtype_array([n, n], dtype=dtype, rng=rng)
+
+    gges, tgsen, tgsen_lwork = get_lapack_funcs(
+        ('gges', 'tgsen', 'tgsen_lwork'), dtype=dtype)
+
+    result = gges(lambda x: None, a, b, overwrite_a=False, overwrite_b=False)
+    assert_equal(result[-1], 0)
+
+    s = result[0]
+    t = result[1]
+    q = result[-4]
+    z = result[-3]
+
+    d1 = s[0, 0] / t[0, 0]
+    d2 = s[6, 6] / t[6, 6]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(s, np.triu(s), rtol=0, atol=atol)
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(q @ s @ z.conj().T, a, rtol=0, atol=atol)
+    assert_allclose(q @ t @ z.conj().T, b, rtol=0, atol=atol)
+
+    select = np.zeros(n)
+    select[6] = 1
+
+    lwork = _compute_lwork(tgsen_lwork, select, s, t)
+
+    # off-by-one error in LAPACK, see gh-issue #13397
+    lwork = (lwork[0]+1, lwork[1])
+
+    result = tgsen(select, s, t, q, z, lwork=lwork)
+    assert_equal(result[-1], 0)
+
+    s = result[0]
+    t = result[1]
+    q = result[-7]
+    z = result[-6]
+
+    if dtype in COMPLEX_DTYPES:
+        assert_allclose(s, np.triu(s), rtol=0, atol=atol)
+        assert_allclose(t, np.triu(t), rtol=0, atol=atol)
+
+    assert_allclose(q @ s @ z.conj().T, a, rtol=0, atol=atol)
+    assert_allclose(q @ t @ z.conj().T, b, rtol=0, atol=atol)
+
+    assert_allclose(s[0, 0] / t[0, 0], d2, rtol=0, atol=atol)
+    assert_allclose(s[1, 1] / t[1, 1], d1, rtol=0, atol=atol)
+
+
+@pytest.mark.parametrize(
+    "a, b, c, d, e, f, rans, lans",
+    [(np.array([[4.0,   1.0,  1.0,  2.0],
+                [0.0,   3.0,  4.0,  1.0],
+                [0.0,   1.0,  3.0,  1.0],
+                [0.0,   0.0,  0.0,  6.0]]),
+      np.array([[1.0,   1.0,  1.0,  1.0],
+                [0.0,   3.0,  4.0,  1.0],
+                [0.0,   1.0,  3.0,  1.0],
+                [0.0,   0.0,  0.0,  4.0]]),
+      np.array([[-4.0,  7.0,  1.0, 12.0],
+                [-9.0,  2.0, -2.0, -2.0],
+                [-4.0,  2.0, -2.0,  8.0],
+                [-7.0,  7.0, -6.0, 19.0]]),
+      np.array([[2.0,   1.0,  1.0,  3.0],
+                [0.0,   1.0,  2.0,  1.0],
+                [0.0,   0.0,  1.0,  1.0],
+                [0.0,   0.0,  0.0,  2.0]]),
+      np.array([[1.0,   1.0,  1.0,  2.0],
+                [0.0,   1.0,  4.0,  1.0],
+                [0.0,   0.0,  1.0,  1.0],
+                [0.0,   0.0,  0.0,  1.0]]),
+      np.array([[-7.0,  5.0,  0.0,  7.0],
+                [-5.0,  1.0, -8.0,  0.0],
+                [-1.0,  2.0, -3.0,  5.0],
+                [-3.0,  2.0,  0.0,  5.0]]),
+      np.array([[1.0,   1.0,  1.0,  1.0],
+                [-1.0,  2.0, -1.0, -1.0],
+                [-1.0,  1.0,  3.0,  1.0],
+                [-1.0,  1.0, -1.0,  4.0]]),
+      np.array([[4.0,  -1.0,  1.0, -1.0],
+                [1.0,   3.0, -1.0,  1.0],
+                [-1.0,  1.0,  2.0, -1.0],
+                [1.0,  -1.0,  1.0,  1.0]]))])
+@pytest.mark.parametrize('dtype', REAL_DTYPES)
+def test_tgsyl_NAG(a, b, c, d, e, f, rans, lans, dtype):
+    atol = 1e-4
+
+    tgsyl = get_lapack_funcs(('tgsyl'), dtype=dtype)
+    rout, lout, scale, dif, info = tgsyl(a, b, c, d, e, f)
+
+    assert_equal(info, 0)
+    assert_allclose(scale, 1.0, rtol=0, atol=np.finfo(dtype).eps*100,
+                    err_msg="SCALE must be 1.0")
+    assert_allclose(dif, 0.0, rtol=0, atol=np.finfo(dtype).eps*100,
+                    err_msg="DIF must be nearly 0")
+    assert_allclose(rout, rans, atol=atol,
+                    err_msg="Solution for R is incorrect")
+    assert_allclose(lout, lans, atol=atol,
+                    err_msg="Solution for L is incorrect")
+
+
+@pytest.mark.parametrize('dtype', REAL_DTYPES)
+@pytest.mark.parametrize('trans', ('N', 'T'))
+@pytest.mark.parametrize('ijob', [0, 1, 2, 3, 4])
+def test_tgsyl(dtype, trans, ijob):
+
+    atol = 1e-3 if dtype == np.float32 else 1e-10
+    rng = np.random.default_rng(1685779866898198)
+    m, n = 10, 15
+
+    a, d, *_ = qz(rng.uniform(-10, 10, [m, m]).astype(dtype),
+                  rng.uniform(-10, 10, [m, m]).astype(dtype),
+                  output='real')
+
+    b, e, *_ = qz(rng.uniform(-10, 10, [n, n]).astype(dtype),
+                  rng.uniform(-10, 10, [n, n]).astype(dtype),
+                  output='real')
+
+    c = rng.uniform(-2, 2, [m, n]).astype(dtype)
+    f = rng.uniform(-2, 2, [m, n]).astype(dtype)
+
+    tgsyl = get_lapack_funcs(('tgsyl'), dtype=dtype)
+    rout, lout, scale, dif, info = tgsyl(a, b, c, d, e, f,
+                                         trans=trans, ijob=ijob)
+
+    assert info == 0, "INFO is non-zero"
+    assert scale >= 0.0, "SCALE must be non-negative"
+    if ijob == 0:
+        assert_allclose(dif, 0.0, rtol=0, atol=np.finfo(dtype).eps*100,
+                        err_msg="DIF must be 0 for ijob =0")
+    else:
+        assert dif >= 0.0, "DIF must be non-negative"
+
+    # Only DIF is calculated for ijob = 3/4
+    if ijob <= 2:
+        if trans == 'N':
+            lhs1 = a @ rout - lout @ b
+            rhs1 = scale*c
+            lhs2 = d @ rout - lout @ e
+            rhs2 = scale*f
+        elif trans == 'T':
+            lhs1 = np.transpose(a) @ rout + np.transpose(d) @ lout
+            rhs1 = scale*c
+            lhs2 = rout @ np.transpose(b) + lout @ np.transpose(e)
+            rhs2 = -1.0*scale*f
+
+        assert_allclose(lhs1, rhs1, atol=atol, rtol=0.,
+                        err_msg='lhs1 and rhs1 do not match')
+        assert_allclose(lhs2, rhs2, atol=atol, rtol=0.,
+                        err_msg='lhs2 and rhs2 do not match')
+
+
+@pytest.mark.parametrize('mtype', ['sy', 'he'])  # matrix type
+@pytest.mark.parametrize('dtype', DTYPES)
+@pytest.mark.parametrize('lower', (0, 1))
+def test_sy_hetrs(mtype, dtype, lower):
+    if mtype == 'he' and dtype in REAL_DTYPES:
+        pytest.skip("hetrs not for real dtypes.")
+    rng = np.random.default_rng(1723059677121834)
+    n, nrhs = 20, 5
+    if dtype in COMPLEX_DTYPES:
+        A = (rng.uniform(size=(n, n)) + rng.uniform(size=(n, n))*1j).astype(dtype)
+    else:
+        A = rng.uniform(size=(n, n)).astype(dtype)
+
+    A = A + A.T if mtype == 'sy' else A + A.conj().T
+    b = rng.uniform(size=(n, nrhs)).astype(dtype)
+    names = f'{mtype}trf', f'{mtype}trf_lwork', f'{mtype}trs'
+    trf, trf_lwork, trs = get_lapack_funcs(names, dtype=dtype)
+    lwork = trf_lwork(n, lower=lower)
+    ldu, ipiv, info = trf(A, lwork=lwork)
+    assert info == 0
+    x, info = trs(a=ldu, ipiv=ipiv, b=b)
+    assert info == 0
+    eps = np.finfo(dtype).eps
+    assert_allclose(A@x, b, atol=100*n*eps)
+
+
+@pytest.mark.parametrize('norm', list('Mm1OoIiFfEe'))
+@pytest.mark.parametrize('uplo, m, n', [('U', 5, 10), ('U', 10, 10),
+                                        ('L', 10, 5), ('L', 10, 10)])
+@pytest.mark.parametrize('diag', ['N', 'U'])
+@pytest.mark.parametrize('dtype', DTYPES)
+def test_lantr(norm, uplo, m, n, diag, dtype):
+    rng = np.random.default_rng(98426598246982456)
+    A = rng.random(size=(m, n)).astype(dtype)
+    lantr, lange = get_lapack_funcs(('lantr', 'lange'), (A,))
+    res = lantr(norm, A, uplo=uplo, diag=diag)
+
+    # now modify the matrix according to assumptions made by `lantr`
+    A = np.triu(A) if uplo == 'U' else np.tril(A)
+    if diag == 'U':
+        i = np.arange(min(m, n))
+        A[i, i] = 1
+    ref = lange(norm, A)
+
+    assert_allclose(res, ref, rtol=2e-6)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e87333c40b64d3f54024779dfb959be7a599178
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matfuncs.py
@@ -0,0 +1,1063 @@
+#
+# Created by: Pearu Peterson, March 2002
+#
+""" Test functions for linalg.matfuncs module
+
+"""
+import functools
+
+import numpy as np
+from numpy import array, identity, dot, sqrt
+from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_,
+                           assert_array_less, assert_array_equal, assert_warns)
+import pytest
+
+import scipy.linalg
+from scipy.linalg import (funm, signm, logm, sqrtm, fractional_matrix_power,
+                          expm, expm_frechet, expm_cond, norm, khatri_rao,
+                          cosm, sinm, tanm, coshm, sinhm, tanhm)
+from scipy.linalg import _matfuncs_inv_ssq
+from scipy.linalg._matfuncs import pick_pade_structure
+from scipy.linalg._matfuncs_inv_ssq import LogmExactlySingularWarning
+import scipy.linalg._expm_frechet
+
+from scipy.optimize import minimize
+
+
+def _get_al_mohy_higham_2012_experiment_1():
+    """
+    Return the test matrix from Experiment (1) of [1]_.
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2012)
+           "Improved Inverse Scaling and Squaring Algorithms
+           for the Matrix Logarithm."
+           SIAM Journal on Scientific Computing, 34 (4). C152-C169.
+           ISSN 1095-7197
+
+    """
+    A = np.array([
+        [3.2346e-1, 3e4, 3e4, 3e4],
+        [0, 3.0089e-1, 3e4, 3e4],
+        [0, 0, 3.2210e-1, 3e4],
+        [0, 0, 0, 3.0744e-1]], dtype=float)
+    return A
+
+
+class TestSignM:
+
+    def test_nils(self):
+        a = array([[29.2, -24.2, 69.5, 49.8, 7.],
+                   [-9.2, 5.2, -18., -16.8, -2.],
+                   [-10., 6., -20., -18., -2.],
+                   [-9.6, 9.6, -25.5, -15.4, -2.],
+                   [9.8, -4.8, 18., 18.2, 2.]])
+        cr = array([[11.94933333,-2.24533333,15.31733333,21.65333333,-2.24533333],
+                    [-3.84266667,0.49866667,-4.59066667,-7.18666667,0.49866667],
+                    [-4.08,0.56,-4.92,-7.6,0.56],
+                    [-4.03466667,1.04266667,-5.59866667,-7.02666667,1.04266667],
+                    [4.15733333,-0.50133333,4.90933333,7.81333333,-0.50133333]])
+        r = signm(a)
+        assert_array_almost_equal(r,cr)
+
+    def test_defective1(self):
+        a = array([[0.0,1,0,0],[1,0,1,0],[0,0,0,1],[0,0,1,0]])
+        signm(a, disp=False)
+        #XXX: what would be the correct result?
+
+    def test_defective2(self):
+        a = array((
+            [29.2,-24.2,69.5,49.8,7.0],
+            [-9.2,5.2,-18.0,-16.8,-2.0],
+            [-10.0,6.0,-20.0,-18.0,-2.0],
+            [-9.6,9.6,-25.5,-15.4,-2.0],
+            [9.8,-4.8,18.0,18.2,2.0]))
+        signm(a, disp=False)
+        #XXX: what would be the correct result?
+
+    def test_defective3(self):
+        a = array([[-2., 25., 0., 0., 0., 0., 0.],
+                   [0., -3., 10., 3., 3., 3., 0.],
+                   [0., 0., 2., 15., 3., 3., 0.],
+                   [0., 0., 0., 0., 15., 3., 0.],
+                   [0., 0., 0., 0., 3., 10., 0.],
+                   [0., 0., 0., 0., 0., -2., 25.],
+                   [0., 0., 0., 0., 0., 0., -3.]])
+        signm(a, disp=False)
+        #XXX: what would be the correct result?
+
+
+class TestLogM:
+
+    def test_nils(self):
+        a = array([[-2., 25., 0., 0., 0., 0., 0.],
+                   [0., -3., 10., 3., 3., 3., 0.],
+                   [0., 0., 2., 15., 3., 3., 0.],
+                   [0., 0., 0., 0., 15., 3., 0.],
+                   [0., 0., 0., 0., 3., 10., 0.],
+                   [0., 0., 0., 0., 0., -2., 25.],
+                   [0., 0., 0., 0., 0., 0., -3.]])
+        m = (identity(7)*3.1+0j)-a
+        logm(m, disp=False)
+        #XXX: what would be the correct result?
+
+    def test_al_mohy_higham_2012_experiment_1_logm(self):
+        # The logm completes the round trip successfully.
+        # Note that the expm leg of the round trip is badly conditioned.
+        A = _get_al_mohy_higham_2012_experiment_1()
+        A_logm, info = logm(A, disp=False)
+        A_round_trip = expm(A_logm)
+        assert_allclose(A_round_trip, A, rtol=5e-5, atol=1e-14)
+
+    def test_al_mohy_higham_2012_experiment_1_funm_log(self):
+        # The raw funm with np.log does not complete the round trip.
+        # Note that the expm leg of the round trip is badly conditioned.
+        A = _get_al_mohy_higham_2012_experiment_1()
+        A_funm_log, info = funm(A, np.log, disp=False)
+        A_round_trip = expm(A_funm_log)
+        assert_(not np.allclose(A_round_trip, A, rtol=1e-5, atol=1e-14))
+
+    def test_round_trip_random_float(self):
+        np.random.seed(1234)
+        for n in range(1, 6):
+            M_unscaled = np.random.randn(n, n)
+            for scale in np.logspace(-4, 4, 9):
+                M = M_unscaled * scale
+
+                # Eigenvalues are related to the branch cut.
+                W = np.linalg.eigvals(M)
+                err_msg = f'M:{M} eivals:{W}'
+
+                # Check sqrtm round trip because it is used within logm.
+                M_sqrtm, info = sqrtm(M, disp=False)
+                M_sqrtm_round_trip = M_sqrtm.dot(M_sqrtm)
+                assert_allclose(M_sqrtm_round_trip, M)
+
+                # Check logm round trip.
+                M_logm, info = logm(M, disp=False)
+                M_logm_round_trip = expm(M_logm)
+                assert_allclose(M_logm_round_trip, M, err_msg=err_msg)
+
+    def test_round_trip_random_complex(self):
+        np.random.seed(1234)
+        for n in range(1, 6):
+            M_unscaled = np.random.randn(n, n) + 1j * np.random.randn(n, n)
+            for scale in np.logspace(-4, 4, 9):
+                M = M_unscaled * scale
+                M_logm, info = logm(M, disp=False)
+                M_round_trip = expm(M_logm)
+                assert_allclose(M_round_trip, M)
+
+    def test_logm_type_preservation_and_conversion(self):
+        # The logm matrix function should preserve the type of a matrix
+        # whose eigenvalues are positive with zero imaginary part.
+        # Test this preservation for variously structured matrices.
+        complex_dtype_chars = ('F', 'D', 'G')
+        for matrix_as_list in (
+                [[1, 0], [0, 1]],
+                [[1, 0], [1, 1]],
+                [[2, 1], [1, 1]],
+                [[2, 3], [1, 2]]):
+
+            # check that the spectrum has the expected properties
+            W = scipy.linalg.eigvals(matrix_as_list)
+            assert_(not any(w.imag or w.real < 0 for w in W))
+
+            # check float type preservation
+            A = np.array(matrix_as_list, dtype=float)
+            A_logm, info = logm(A, disp=False)
+            assert_(A_logm.dtype.char not in complex_dtype_chars)
+
+            # check complex type preservation
+            A = np.array(matrix_as_list, dtype=complex)
+            A_logm, info = logm(A, disp=False)
+            assert_(A_logm.dtype.char in complex_dtype_chars)
+
+            # check float->complex type conversion for the matrix negation
+            A = -np.array(matrix_as_list, dtype=float)
+            A_logm, info = logm(A, disp=False)
+            assert_(A_logm.dtype.char in complex_dtype_chars)
+
+    def test_complex_spectrum_real_logm(self):
+        # This matrix has complex eigenvalues and real logm.
+        # Its output dtype depends on its input dtype.
+        M = [[1, 1, 2], [2, 1, 1], [1, 2, 1]]
+        for dt in float, complex:
+            X = np.array(M, dtype=dt)
+            w = scipy.linalg.eigvals(X)
+            assert_(1e-2 < np.absolute(w.imag).sum())
+            Y, info = logm(X, disp=False)
+            assert_(np.issubdtype(Y.dtype, np.inexact))
+            assert_allclose(expm(Y), X)
+
+    def test_real_mixed_sign_spectrum(self):
+        # These matrices have real eigenvalues with mixed signs.
+        # The output logm dtype is complex, regardless of input dtype.
+        for M in (
+                [[1, 0], [0, -1]],
+                [[0, 1], [1, 0]]):
+            for dt in float, complex:
+                A = np.array(M, dtype=dt)
+                A_logm, info = logm(A, disp=False)
+                assert_(np.issubdtype(A_logm.dtype, np.complexfloating))
+
+    @pytest.mark.thread_unsafe
+    def test_exactly_singular(self):
+        A = np.array([[0, 0], [1j, 1j]])
+        B = np.asarray([[1, 1], [0, 0]])
+        for M in A, A.T, B, B.T:
+            expected_warning = _matfuncs_inv_ssq.LogmExactlySingularWarning
+            L, info = assert_warns(expected_warning, logm, M, disp=False)
+            E = expm(L)
+            assert_allclose(E, M, atol=1e-14)
+
+    @pytest.mark.thread_unsafe
+    def test_nearly_singular(self):
+        M = np.array([[1e-100]])
+        expected_warning = _matfuncs_inv_ssq.LogmNearlySingularWarning
+        L, info = assert_warns(expected_warning, logm, M, disp=False)
+        E = expm(L)
+        assert_allclose(E, M, atol=1e-14)
+
+    def test_opposite_sign_complex_eigenvalues(self):
+        # See gh-6113
+        E = [[0, 1], [-1, 0]]
+        L = [[0, np.pi*0.5], [-np.pi*0.5, 0]]
+        assert_allclose(expm(L), E, atol=1e-14)
+        assert_allclose(logm(E), L, atol=1e-14)
+        E = [[1j, 4], [0, -1j]]
+        L = [[1j*np.pi*0.5, 2*np.pi], [0, -1j*np.pi*0.5]]
+        assert_allclose(expm(L), E, atol=1e-14)
+        assert_allclose(logm(E), L, atol=1e-14)
+        E = [[1j, 0], [0, -1j]]
+        L = [[1j*np.pi*0.5, 0], [0, -1j*np.pi*0.5]]
+        assert_allclose(expm(L), E, atol=1e-14)
+        assert_allclose(logm(E), L, atol=1e-14)
+
+    def test_readonly(self):
+        n = 5
+        a = np.ones((n, n)) + np.identity(n)
+        a.flags.writeable = False
+        logm(a)
+
+    @pytest.mark.xfail(reason="ValueError: attempt to get argmax of an empty sequence")
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        log_a = logm(a)
+        a0 = np.eye(2, dtype=dt)
+        log_a0 = logm(a0)
+
+        assert log_a.shape == (0, 0)
+        assert log_a.dtype == log_a0.dtype
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('dtype', [int, float, np.float32, complex, np.complex64])
+    def test_no_ZeroDivisionError(self, dtype):
+        # gh-17136 reported inconsistent behavior in `logm` depending on input dtype:
+        # sometimes it raised an error, and sometimes it printed a warning message.
+        # check that this is resolved and that the warning is emitted properly.
+        with (pytest.warns(RuntimeWarning, match="logm result may be inaccurate"),
+              pytest.warns(LogmExactlySingularWarning)):
+            logm(np.zeros((2, 2), dtype=dtype))
+
+
+class TestSqrtM:
+    def test_round_trip_random_float(self):
+        rng = np.random.RandomState(1234)
+        for n in range(1, 6):
+            M_unscaled = rng.randn(n, n)
+            for scale in np.logspace(-4, 4, 9):
+                M = M_unscaled * scale
+                M_sqrtm, info = sqrtm(M, disp=False)
+                M_sqrtm_round_trip = M_sqrtm.dot(M_sqrtm)
+                assert_allclose(M_sqrtm_round_trip, M)
+
+    def test_round_trip_random_complex(self):
+        rng = np.random.RandomState(1234)
+        for n in range(1, 6):
+            M_unscaled = rng.randn(n, n) + 1j * rng.randn(n, n)
+            for scale in np.logspace(-4, 4, 9):
+                M = M_unscaled * scale
+                M_sqrtm, info = sqrtm(M, disp=False)
+                M_sqrtm_round_trip = M_sqrtm.dot(M_sqrtm)
+                assert_allclose(M_sqrtm_round_trip, M)
+
+    def test_bad(self):
+        # See https://web.archive.org/web/20051220232650/http://www.maths.man.ac.uk/~nareports/narep336.ps.gz
+        e = 2**-5
+        se = sqrt(e)
+        a = array([[1.0,0,0,1],
+                   [0,e,0,0],
+                   [0,0,e,0],
+                   [0,0,0,1]])
+        sa = array([[1,0,0,0.5],
+                    [0,se,0,0],
+                    [0,0,se,0],
+                    [0,0,0,1]])
+        n = a.shape[0]
+        assert_array_almost_equal(dot(sa,sa),a)
+        # Check default sqrtm.
+        esa = sqrtm(a, disp=False, blocksize=n)[0]
+        assert_array_almost_equal(dot(esa,esa),a)
+        # Check sqrtm with 2x2 blocks.
+        esa = sqrtm(a, disp=False, blocksize=2)[0]
+        assert_array_almost_equal(dot(esa,esa),a)
+
+    def test_sqrtm_type_preservation_and_conversion(self):
+        # The sqrtm matrix function should preserve the type of a matrix
+        # whose eigenvalues are nonnegative with zero imaginary part.
+        # Test this preservation for variously structured matrices.
+        complex_dtype_chars = ('F', 'D', 'G')
+        for matrix_as_list in (
+                [[1, 0], [0, 1]],
+                [[1, 0], [1, 1]],
+                [[2, 1], [1, 1]],
+                [[2, 3], [1, 2]],
+                [[1, 1], [1, 1]]):
+
+            # check that the spectrum has the expected properties
+            W = scipy.linalg.eigvals(matrix_as_list)
+            assert_(not any(w.imag or w.real < 0 for w in W))
+
+            # check float type preservation
+            A = np.array(matrix_as_list, dtype=float)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(A_sqrtm.dtype.char not in complex_dtype_chars)
+
+            # check complex type preservation
+            A = np.array(matrix_as_list, dtype=complex)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(A_sqrtm.dtype.char in complex_dtype_chars)
+
+            # check float->complex type conversion for the matrix negation
+            A = -np.array(matrix_as_list, dtype=float)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(A_sqrtm.dtype.char in complex_dtype_chars)
+
+    def test_sqrtm_type_conversion_mixed_sign_or_complex_spectrum(self):
+        complex_dtype_chars = ('F', 'D', 'G')
+        for matrix_as_list in (
+                [[1, 0], [0, -1]],
+                [[0, 1], [1, 0]],
+                [[0, 1, 0], [0, 0, 1], [1, 0, 0]]):
+
+            # check that the spectrum has the expected properties
+            W = scipy.linalg.eigvals(matrix_as_list)
+            assert_(any(w.imag or w.real < 0 for w in W))
+
+            # check complex->complex
+            A = np.array(matrix_as_list, dtype=complex)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(A_sqrtm.dtype.char in complex_dtype_chars)
+
+            # check float->complex
+            A = np.array(matrix_as_list, dtype=float)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(A_sqrtm.dtype.char in complex_dtype_chars)
+
+    def test_blocksizes(self):
+        # Make sure I do not goof up the blocksizes when they do not divide n.
+        np.random.seed(1234)
+        for n in range(1, 8):
+            A = np.random.rand(n, n) + 1j*np.random.randn(n, n)
+            A_sqrtm_default, info = sqrtm(A, disp=False, blocksize=n)
+            assert_allclose(A, np.linalg.matrix_power(A_sqrtm_default, 2))
+            for blocksize in range(1, 10):
+                A_sqrtm_new, info = sqrtm(A, disp=False, blocksize=blocksize)
+                assert_allclose(A_sqrtm_default, A_sqrtm_new)
+
+    def test_al_mohy_higham_2012_experiment_1(self):
+        # Matrix square root of a tricky upper triangular matrix.
+        A = _get_al_mohy_higham_2012_experiment_1()
+        A_sqrtm, info = sqrtm(A, disp=False)
+        A_round_trip = A_sqrtm.dot(A_sqrtm)
+        assert_allclose(A_round_trip, A, rtol=1e-5)
+        assert_allclose(np.tril(A_round_trip), np.tril(A))
+
+    def test_strict_upper_triangular(self):
+        # This matrix has no square root.
+        for dt in int, float:
+            A = np.array([
+                [0, 3, 0, 0],
+                [0, 0, 3, 0],
+                [0, 0, 0, 3],
+                [0, 0, 0, 0]], dtype=dt)
+            A_sqrtm, info = sqrtm(A, disp=False)
+            assert_(np.isnan(A_sqrtm).all())
+
+    def test_weird_matrix(self):
+        # The square root of matrix B exists.
+        for dt in int, float:
+            A = np.array([
+                [0, 0, 1],
+                [0, 0, 0],
+                [0, 1, 0]], dtype=dt)
+            B = np.array([
+                [0, 1, 0],
+                [0, 0, 0],
+                [0, 0, 0]], dtype=dt)
+            assert_array_equal(B, A.dot(A))
+
+            # But scipy sqrtm is not clever enough to find it.
+            B_sqrtm, info = sqrtm(B, disp=False)
+            assert_(np.isnan(B_sqrtm).all())
+
+    def test_disp(self):
+        np.random.seed(1234)
+
+        A = np.random.rand(3, 3)
+        B = sqrtm(A, disp=True)
+        assert_allclose(B.dot(B), A)
+
+    def test_opposite_sign_complex_eigenvalues(self):
+        M = [[2j, 4], [0, -2j]]
+        R = [[1+1j, 2], [0, 1-1j]]
+        assert_allclose(np.dot(R, R), M, atol=1e-14)
+        assert_allclose(sqrtm(M), R, atol=1e-14)
+
+    def test_gh4866(self):
+        M = np.array([[1, 0, 0, 1],
+                      [0, 0, 0, 0],
+                      [0, 0, 0, 0],
+                      [1, 0, 0, 1]])
+        R = np.array([[sqrt(0.5), 0, 0, sqrt(0.5)],
+                      [0, 0, 0, 0],
+                      [0, 0, 0, 0],
+                      [sqrt(0.5), 0, 0, sqrt(0.5)]])
+        assert_allclose(np.dot(R, R), M, atol=1e-14)
+        assert_allclose(sqrtm(M), R, atol=1e-14)
+
+    def test_gh5336(self):
+        M = np.diag([2, 1, 0])
+        R = np.diag([sqrt(2), 1, 0])
+        assert_allclose(np.dot(R, R), M, atol=1e-14)
+        assert_allclose(sqrtm(M), R, atol=1e-14)
+
+    def test_gh7839(self):
+        M = np.zeros((2, 2))
+        R = np.zeros((2, 2))
+        assert_allclose(np.dot(R, R), M, atol=1e-14)
+        assert_allclose(sqrtm(M), R, atol=1e-14)
+
+    @pytest.mark.xfail(reason="failing on macOS after gh-20212")
+    def test_gh17918(self):
+        M = np.empty((19, 19))
+        M.fill(0.94)
+        np.fill_diagonal(M, 1)
+        assert np.isrealobj(sqrtm(M))
+
+    def test_data_size_preservation_uint_in_float_out(self):
+        M = np.zeros((10, 10), dtype=np.uint8)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.uint16)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.uint32)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.uint64)
+        assert sqrtm(M).dtype == np.float64
+
+    def test_data_size_preservation_int_in_float_out(self):
+        M = np.zeros((10, 10), dtype=np.int8)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.int16)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.int32)
+        assert sqrtm(M).dtype == np.float64
+        M = np.zeros((10, 10), dtype=np.int64)
+        assert sqrtm(M).dtype == np.float64
+
+    def test_data_size_preservation_int_in_comp_out(self):
+        M = np.array([[2, 4], [0, -2]], dtype=np.int8)
+        assert sqrtm(M).dtype == np.complex128
+        M = np.array([[2, 4], [0, -2]], dtype=np.int16)
+        assert sqrtm(M).dtype == np.complex128
+        M = np.array([[2, 4], [0, -2]], dtype=np.int32)
+        assert sqrtm(M).dtype == np.complex128
+        M = np.array([[2, 4], [0, -2]], dtype=np.int64)
+        assert sqrtm(M).dtype == np.complex128
+
+    def test_data_size_preservation_float_in_float_out(self):
+        M = np.zeros((10, 10), dtype=np.float16)
+        assert sqrtm(M).dtype == np.float32
+        M = np.zeros((10, 10), dtype=np.float32)
+        assert sqrtm(M).dtype == np.float32
+        M = np.zeros((10, 10), dtype=np.float64)
+        assert sqrtm(M).dtype == np.float64
+        if hasattr(np, 'float128'):
+            M = np.zeros((10, 10), dtype=np.float128)
+            assert sqrtm(M).dtype == np.float64
+
+    def test_data_size_preservation_float_in_comp_out(self):
+        M = np.array([[2, 4], [0, -2]], dtype=np.float16)
+        assert sqrtm(M).dtype == np.complex64
+        M = np.array([[2, 4], [0, -2]], dtype=np.float32)
+        assert sqrtm(M).dtype == np.complex64
+        M = np.array([[2, 4], [0, -2]], dtype=np.float64)
+        assert sqrtm(M).dtype == np.complex128
+        if hasattr(np, 'float128') and hasattr(np, 'complex256'):
+            M = np.array([[2, 4], [0, -2]], dtype=np.float128)
+            assert sqrtm(M).dtype == np.complex128
+
+    def test_data_size_preservation_comp_in_comp_out(self):
+        M = np.array([[2j, 4], [0, -2j]], dtype=np.complex64)
+        assert sqrtm(M).dtype == np.complex64
+        M = np.array([[2j, 4], [0, -2j]], dtype=np.complex128)
+        assert sqrtm(M).dtype == np.complex128
+        if hasattr(np, 'complex256'):
+            M = np.array([[2j, 4], [0, -2j]], dtype=np.complex256)
+            assert sqrtm(M).dtype == np.complex128
+
+    @pytest.mark.parametrize('dt', [int, float, np.float32, complex, np.complex64])
+    def test_empty(self, dt):
+        a = np.empty((0, 0), dtype=dt)
+        s = sqrtm(a)
+        a0 = np.eye(2, dtype=dt)
+        s0 = sqrtm(a0)
+
+        assert s.shape == (0, 0)
+        assert s.dtype == s0.dtype
+
+
+class TestFractionalMatrixPower:
+    def test_round_trip_random_complex(self):
+        np.random.seed(1234)
+        for p in range(1, 5):
+            for n in range(1, 5):
+                M_unscaled = np.random.randn(n, n) + 1j * np.random.randn(n, n)
+                for scale in np.logspace(-4, 4, 9):
+                    M = M_unscaled * scale
+                    M_root = fractional_matrix_power(M, 1/p)
+                    M_round_trip = np.linalg.matrix_power(M_root, p)
+                    assert_allclose(M_round_trip, M)
+
+    def test_round_trip_random_float(self):
+        # This test is more annoying because it can hit the branch cut;
+        # this happens when the matrix has an eigenvalue
+        # with no imaginary component and with a real negative component,
+        # and it means that the principal branch does not exist.
+        np.random.seed(1234)
+        for p in range(1, 5):
+            for n in range(1, 5):
+                M_unscaled = np.random.randn(n, n)
+                for scale in np.logspace(-4, 4, 9):
+                    M = M_unscaled * scale
+                    M_root = fractional_matrix_power(M, 1/p)
+                    M_round_trip = np.linalg.matrix_power(M_root, p)
+                    assert_allclose(M_round_trip, M)
+
+    def test_larger_abs_fractional_matrix_powers(self):
+        np.random.seed(1234)
+        for n in (2, 3, 5):
+            for i in range(10):
+                M = np.random.randn(n, n) + 1j * np.random.randn(n, n)
+                M_one_fifth = fractional_matrix_power(M, 0.2)
+                # Test the round trip.
+                M_round_trip = np.linalg.matrix_power(M_one_fifth, 5)
+                assert_allclose(M, M_round_trip)
+                # Test a large abs fractional power.
+                X = fractional_matrix_power(M, -5.4)
+                Y = np.linalg.matrix_power(M_one_fifth, -27)
+                assert_allclose(X, Y)
+                # Test another large abs fractional power.
+                X = fractional_matrix_power(M, 3.8)
+                Y = np.linalg.matrix_power(M_one_fifth, 19)
+                assert_allclose(X, Y)
+
+    def test_random_matrices_and_powers(self):
+        # Each independent iteration of this fuzz test picks random parameters.
+        # It tries to hit some edge cases.
+        rng = np.random.default_rng(1726500458620605)
+        nsamples = 20
+        for i in range(nsamples):
+            # Sample a matrix size and a random real power.
+            n = rng.integers(1, 5)
+            p = rng.random()
+
+            # Sample a random real or complex matrix.
+            matrix_scale = np.exp(rng.integers(-4, 5))
+            A = rng.random(size=[n, n])
+            if [True, False][rng.choice(2)]:
+                A = A + 1j * rng.random(size=[n, n])
+            A = A * matrix_scale
+
+            # Check a couple of analytically equivalent ways
+            # to compute the fractional matrix power.
+            # These can be compared because they both use the principal branch.
+            A_power = fractional_matrix_power(A, p)
+            A_logm, info = logm(A, disp=False)
+            A_power_expm_logm = expm(A_logm * p)
+            assert_allclose(A_power, A_power_expm_logm)
+
+    def test_al_mohy_higham_2012_experiment_1(self):
+        # Fractional powers of a tricky upper triangular matrix.
+        A = _get_al_mohy_higham_2012_experiment_1()
+
+        # Test remainder matrix power.
+        A_funm_sqrt, info = funm(A, np.sqrt, disp=False)
+        A_sqrtm, info = sqrtm(A, disp=False)
+        A_rem_power = _matfuncs_inv_ssq._remainder_matrix_power(A, 0.5)
+        A_power = fractional_matrix_power(A, 0.5)
+        assert_allclose(A_rem_power, A_power, rtol=1e-11)
+        assert_allclose(A_sqrtm, A_power)
+        assert_allclose(A_sqrtm, A_funm_sqrt)
+
+        # Test more fractional powers.
+        for p in (1/2, 5/3):
+            A_power = fractional_matrix_power(A, p)
+            A_round_trip = fractional_matrix_power(A_power, 1/p)
+            assert_allclose(A_round_trip, A, rtol=1e-2)
+            assert_allclose(np.tril(A_round_trip, 1), np.tril(A, 1))
+
+    def test_briggs_helper_function(self):
+        np.random.seed(1234)
+        for a in np.random.randn(10) + 1j * np.random.randn(10):
+            for k in range(5):
+                x_observed = _matfuncs_inv_ssq._briggs_helper_function(a, k)
+                x_expected = a ** np.exp2(-k) - 1
+                assert_allclose(x_observed, x_expected)
+
+    def test_type_preservation_and_conversion(self):
+        # The fractional_matrix_power matrix function should preserve
+        # the type of a matrix whose eigenvalues
+        # are positive with zero imaginary part.
+        # Test this preservation for variously structured matrices.
+        complex_dtype_chars = ('F', 'D', 'G')
+        for matrix_as_list in (
+                [[1, 0], [0, 1]],
+                [[1, 0], [1, 1]],
+                [[2, 1], [1, 1]],
+                [[2, 3], [1, 2]]):
+
+            # check that the spectrum has the expected properties
+            W = scipy.linalg.eigvals(matrix_as_list)
+            assert_(not any(w.imag or w.real < 0 for w in W))
+
+            # Check various positive and negative powers
+            # with absolute values bigger and smaller than 1.
+            for p in (-2.4, -0.9, 0.2, 3.3):
+
+                # check float type preservation
+                A = np.array(matrix_as_list, dtype=float)
+                A_power = fractional_matrix_power(A, p)
+                assert_(A_power.dtype.char not in complex_dtype_chars)
+
+                # check complex type preservation
+                A = np.array(matrix_as_list, dtype=complex)
+                A_power = fractional_matrix_power(A, p)
+                assert_(A_power.dtype.char in complex_dtype_chars)
+
+                # check float->complex for the matrix negation
+                A = -np.array(matrix_as_list, dtype=float)
+                A_power = fractional_matrix_power(A, p)
+                assert_(A_power.dtype.char in complex_dtype_chars)
+
+    def test_type_conversion_mixed_sign_or_complex_spectrum(self):
+        complex_dtype_chars = ('F', 'D', 'G')
+        for matrix_as_list in (
+                [[1, 0], [0, -1]],
+                [[0, 1], [1, 0]],
+                [[0, 1, 0], [0, 0, 1], [1, 0, 0]]):
+
+            # check that the spectrum has the expected properties
+            W = scipy.linalg.eigvals(matrix_as_list)
+            assert_(any(w.imag or w.real < 0 for w in W))
+
+            # Check various positive and negative powers
+            # with absolute values bigger and smaller than 1.
+            for p in (-2.4, -0.9, 0.2, 3.3):
+
+                # check complex->complex
+                A = np.array(matrix_as_list, dtype=complex)
+                A_power = fractional_matrix_power(A, p)
+                assert_(A_power.dtype.char in complex_dtype_chars)
+
+                # check float->complex
+                A = np.array(matrix_as_list, dtype=float)
+                A_power = fractional_matrix_power(A, p)
+                assert_(A_power.dtype.char in complex_dtype_chars)
+
+    @pytest.mark.xfail(reason='Too unstable across LAPACKs.')
+    def test_singular(self):
+        # Negative fractional powers do not work with singular matrices.
+        for matrix_as_list in (
+                [[0, 0], [0, 0]],
+                [[1, 1], [1, 1]],
+                [[1, 2], [3, 6]],
+                [[0, 0, 0], [0, 1, 1], [0, -1, 1]]):
+
+            # Check fractional powers both for float and for complex types.
+            for newtype in (float, complex):
+                A = np.array(matrix_as_list, dtype=newtype)
+                for p in (-0.7, -0.9, -2.4, -1.3):
+                    A_power = fractional_matrix_power(A, p)
+                    assert_(np.isnan(A_power).all())
+                for p in (0.2, 1.43):
+                    A_power = fractional_matrix_power(A, p)
+                    A_round_trip = fractional_matrix_power(A_power, 1/p)
+                    assert_allclose(A_round_trip, A)
+
+    def test_opposite_sign_complex_eigenvalues(self):
+        M = [[2j, 4], [0, -2j]]
+        R = [[1+1j, 2], [0, 1-1j]]
+        assert_allclose(np.dot(R, R), M, atol=1e-14)
+        assert_allclose(fractional_matrix_power(M, 0.5), R, atol=1e-14)
+
+
+class TestExpM:
+    def test_zero(self):
+        a = array([[0.,0],[0,0]])
+        assert_array_almost_equal(expm(a),[[1,0],[0,1]])
+
+    def test_single_elt(self):
+        elt = expm(1)
+        assert_allclose(elt, np.array([[np.e]]))
+
+    @pytest.mark.parametrize('func', [expm, cosm, sinm, tanm, coshm, sinhm, tanhm])
+    @pytest.mark.parametrize('dt',[int, float, np.float32, complex, np.complex64])
+    @pytest.mark.parametrize('shape', [(0, 0), (1, 1)])
+    def test_small_empty_matrix_input(self, func, dt, shape):
+        # regression test for gh-11082 / gh-20372 - test behavior of expm
+        # and related functions for small and zero-sized arrays.
+        A = np.zeros(shape, dtype=dt)
+        A0 = np.zeros((10, 10), dtype=dt)
+        result = func(A)
+        result0 = func(A0)
+        assert result.shape == shape
+        assert result.dtype == result0.dtype
+
+    def test_2x2_input(self):
+        E = np.e
+        a = array([[1, 4], [1, 1]])
+        aa = (E**4 + 1)/(2*E)
+        bb = (E**4 - 1)/E
+        assert_allclose(expm(a), array([[aa, bb], [bb/4, aa]]))
+        assert expm(a.astype(np.complex64)).dtype.char == 'F'
+        assert expm(a.astype(np.float32)).dtype.char == 'f'
+
+    def test_nx2x2_input(self):
+        E = np.e
+        # These are integer matrices with integer eigenvalues
+        a = np.array([[[1, 4], [1, 1]],
+                      [[1, 3], [1, -1]],
+                      [[1, 3], [4, 5]],
+                      [[1, 3], [5, 3]],
+                      [[4, 5], [-3, -4]]], order='F')
+        # Exact results are computed symbolically
+        a_res = np.array([
+                          [[(E**4+1)/(2*E), (E**4-1)/E],
+                           [(E**4-1)/4/E, (E**4+1)/(2*E)]],
+                          [[1/(4*E**2)+(3*E**2)/4, (3*E**2)/4-3/(4*E**2)],
+                           [E**2/4-1/(4*E**2), 3/(4*E**2)+E**2/4]],
+                          [[3/(4*E)+E**7/4, -3/(8*E)+(3*E**7)/8],
+                           [-1/(2*E)+E**7/2, 1/(4*E)+(3*E**7)/4]],
+                          [[5/(8*E**2)+(3*E**6)/8, -3/(8*E**2)+(3*E**6)/8],
+                           [-5/(8*E**2)+(5*E**6)/8, 3/(8*E**2)+(5*E**6)/8]],
+                          [[-3/(2*E)+(5*E)/2, -5/(2*E)+(5*E)/2],
+                           [3/(2*E)-(3*E)/2, 5/(2*E)-(3*E)/2]]
+                         ])
+        assert_allclose(expm(a), a_res)
+
+    def test_readonly(self):
+        n = 7
+        a = np.ones((n, n))
+        a.flags.writeable = False
+        expm(a)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.fail_slow(5)
+    def test_gh18086(self):
+        A = np.zeros((400, 400), dtype=float)
+        rng = np.random.default_rng(100)
+        i = rng.integers(0, 399, 500)
+        j = rng.integers(0, 399, 500)
+        A[i, j] = rng.random(500)
+        # Problem appears when m = 9
+        Am = np.empty((5, 400, 400), dtype=float)
+        Am[0] = A.copy()
+        m, s = pick_pade_structure(Am)
+        assert m == 9
+        # Check that result is accurate
+        first_res = expm(A)
+        np.testing.assert_array_almost_equal(logm(first_res), A)
+        # Check that result is consistent
+        for i in range(5):
+            next_res = expm(A)
+            np.testing.assert_array_almost_equal(first_res, next_res)
+
+
+class TestExpmFrechet:
+
+    def test_expm_frechet(self):
+        # a test of the basic functionality
+        M = np.array([
+            [1, 2, 3, 4],
+            [5, 6, 7, 8],
+            [0, 0, 1, 2],
+            [0, 0, 5, 6],
+            ], dtype=float)
+        A = np.array([
+            [1, 2],
+            [5, 6],
+            ], dtype=float)
+        E = np.array([
+            [3, 4],
+            [7, 8],
+            ], dtype=float)
+        expected_expm = scipy.linalg.expm(A)
+        expected_frechet = scipy.linalg.expm(M)[:2, 2:]
+        for kwargs in ({}, {'method':'SPS'}, {'method':'blockEnlarge'}):
+            observed_expm, observed_frechet = expm_frechet(A, E, **kwargs)
+            assert_allclose(expected_expm, observed_expm)
+            assert_allclose(expected_frechet, observed_frechet)
+
+    def test_small_norm_expm_frechet(self):
+        # methodically test matrices with a range of norms, for better coverage
+        M_original = np.array([
+            [1, 2, 3, 4],
+            [5, 6, 7, 8],
+            [0, 0, 1, 2],
+            [0, 0, 5, 6],
+            ], dtype=float)
+        A_original = np.array([
+            [1, 2],
+            [5, 6],
+            ], dtype=float)
+        E_original = np.array([
+            [3, 4],
+            [7, 8],
+            ], dtype=float)
+        A_original_norm_1 = scipy.linalg.norm(A_original, 1)
+        selected_m_list = [1, 3, 5, 7, 9, 11, 13, 15]
+        m_neighbor_pairs = zip(selected_m_list[:-1], selected_m_list[1:])
+        for ma, mb in m_neighbor_pairs:
+            ell_a = scipy.linalg._expm_frechet.ell_table_61[ma]
+            ell_b = scipy.linalg._expm_frechet.ell_table_61[mb]
+            target_norm_1 = 0.5 * (ell_a + ell_b)
+            scale = target_norm_1 / A_original_norm_1
+            M = scale * M_original
+            A = scale * A_original
+            E = scale * E_original
+            expected_expm = scipy.linalg.expm(A)
+            expected_frechet = scipy.linalg.expm(M)[:2, 2:]
+            observed_expm, observed_frechet = expm_frechet(A, E)
+            assert_allclose(expected_expm, observed_expm)
+            assert_allclose(expected_frechet, observed_frechet)
+
+    def test_fuzz(self):
+        rng = np.random.default_rng(1726500908359153)
+        # try a bunch of crazy inputs
+        rfuncs = (
+                np.random.uniform,
+                np.random.normal,
+                np.random.standard_cauchy,
+                np.random.exponential)
+        ntests = 100
+        for i in range(ntests):
+            rfunc = rfuncs[rng.choice(4)]
+            target_norm_1 = rng.exponential()
+            n = rng.integers(2, 16)
+            A_original = rfunc(size=(n,n))
+            E_original = rfunc(size=(n,n))
+            A_original_norm_1 = scipy.linalg.norm(A_original, 1)
+            scale = target_norm_1 / A_original_norm_1
+            A = scale * A_original
+            E = scale * E_original
+            M = np.vstack([
+                np.hstack([A, E]),
+                np.hstack([np.zeros_like(A), A])])
+            expected_expm = scipy.linalg.expm(A)
+            expected_frechet = scipy.linalg.expm(M)[:n, n:]
+            observed_expm, observed_frechet = expm_frechet(A, E)
+            assert_allclose(expected_expm, observed_expm, atol=5e-8)
+            assert_allclose(expected_frechet, observed_frechet, atol=1e-7)
+
+    def test_problematic_matrix(self):
+        # this test case uncovered a bug which has since been fixed
+        A = np.array([
+                [1.50591997, 1.93537998],
+                [0.41203263, 0.23443516],
+                ], dtype=float)
+        E = np.array([
+                [1.87864034, 2.07055038],
+                [1.34102727, 0.67341123],
+                ], dtype=float)
+        scipy.linalg.norm(A, 1)
+        sps_expm, sps_frechet = expm_frechet(
+                A, E, method='SPS')
+        blockEnlarge_expm, blockEnlarge_frechet = expm_frechet(
+                A, E, method='blockEnlarge')
+        assert_allclose(sps_expm, blockEnlarge_expm)
+        assert_allclose(sps_frechet, blockEnlarge_frechet)
+
+    @pytest.mark.slow
+    @pytest.mark.skip(reason='this test is deliberately slow')
+    def test_medium_matrix(self):
+        # profile this to see the speed difference
+        n = 1000
+        A = np.random.exponential(size=(n, n))
+        E = np.random.exponential(size=(n, n))
+        sps_expm, sps_frechet = expm_frechet(
+                A, E, method='SPS')
+        blockEnlarge_expm, blockEnlarge_frechet = expm_frechet(
+                A, E, method='blockEnlarge')
+        assert_allclose(sps_expm, blockEnlarge_expm)
+        assert_allclose(sps_frechet, blockEnlarge_frechet)
+
+
+def _help_expm_cond_search(A, A_norm, X, X_norm, eps, p):
+    p = np.reshape(p, A.shape)
+    p_norm = norm(p)
+    perturbation = eps * p * (A_norm / p_norm)
+    X_prime = expm(A + perturbation)
+    scaled_relative_error = norm(X_prime - X) / (X_norm * eps)
+    return -scaled_relative_error
+
+
+def _normalized_like(A, B):
+    return A * (scipy.linalg.norm(B) / scipy.linalg.norm(A))
+
+
+def _relative_error(f, A, perturbation):
+    X = f(A)
+    X_prime = f(A + perturbation)
+    return norm(X_prime - X) / norm(X)
+
+
+class TestExpmConditionNumber:
+    def test_expm_cond_smoke(self):
+        np.random.seed(1234)
+        for n in range(1, 4):
+            A = np.random.randn(n, n)
+            kappa = expm_cond(A)
+            assert_array_less(0, kappa)
+
+    def test_expm_bad_condition_number(self):
+        A = np.array([
+            [-1.128679820, 9.614183771e4, -4.524855739e9, 2.924969411e14],
+            [0, -1.201010529, 9.634696872e4, -4.681048289e9],
+            [0, 0, -1.132893222, 9.532491830e4],
+            [0, 0, 0, -1.179475332],
+            ])
+        kappa = expm_cond(A)
+        assert_array_less(1e36, kappa)
+
+    def test_univariate(self):
+        np.random.seed(12345)
+        for x in np.linspace(-5, 5, num=11):
+            A = np.array([[x]])
+            assert_allclose(expm_cond(A), abs(x))
+        for x in np.logspace(-2, 2, num=11):
+            A = np.array([[x]])
+            assert_allclose(expm_cond(A), abs(x))
+        for i in range(10):
+            A = np.random.randn(1, 1)
+            assert_allclose(expm_cond(A), np.absolute(A)[0, 0])
+
+    @pytest.mark.slow
+    def test_expm_cond_fuzz(self):
+        rng = np.random.RandomState(12345)
+        eps = 1e-5
+        nsamples = 10
+        for i in range(nsamples):
+            n = rng.randint(2, 5)
+            A = rng.randn(n, n)
+            A_norm = scipy.linalg.norm(A)
+            X = expm(A)
+            X_norm = scipy.linalg.norm(X)
+            kappa = expm_cond(A)
+
+            # Look for the small perturbation that gives the greatest
+            # relative error.
+            f = functools.partial(_help_expm_cond_search,
+                    A, A_norm, X, X_norm, eps)
+            guess = np.ones(n*n)
+            out = minimize(f, guess, method='L-BFGS-B')
+            xopt = out.x
+            yopt = f(xopt)
+            p_best = eps * _normalized_like(np.reshape(xopt, A.shape), A)
+            p_best_relerr = _relative_error(expm, A, p_best)
+            assert_allclose(p_best_relerr, -yopt * eps)
+
+            # Check that the identified perturbation indeed gives greater
+            # relative error than random perturbations with similar norms.
+            for j in range(5):
+                p_rand = eps * _normalized_like(rng.randn(*A.shape), A)
+                assert_allclose(norm(p_best), norm(p_rand))
+                p_rand_relerr = _relative_error(expm, A, p_rand)
+                assert_array_less(p_rand_relerr, p_best_relerr)
+
+            # The greatest relative error should not be much greater than
+            # eps times the condition number kappa.
+            # In the limit as eps approaches zero it should never be greater.
+            assert_array_less(p_best_relerr, (1 + 2*eps) * eps * kappa)
+
+
+class TestKhatriRao:
+
+    def test_basic(self):
+        a = khatri_rao(array([[1, 2], [3, 4]]),
+                       array([[5, 6], [7, 8]]))
+
+        assert_array_equal(a, array([[5, 12],
+                                     [7, 16],
+                                     [15, 24],
+                                     [21, 32]]))
+
+        b = khatri_rao(np.empty([2, 2]), np.empty([2, 2]))
+        assert_array_equal(b.shape, (4, 2))
+
+    def test_number_of_columns_equality(self):
+        with pytest.raises(ValueError):
+            a = array([[1, 2, 3],
+                       [4, 5, 6]])
+            b = array([[1, 2],
+                       [3, 4]])
+            khatri_rao(a, b)
+
+    def test_to_assure_2d_array(self):
+        with pytest.raises(ValueError):
+            # both arrays are 1-D
+            a = array([1, 2, 3])
+            b = array([4, 5, 6])
+            khatri_rao(a, b)
+
+        with pytest.raises(ValueError):
+            # first array is 1-D
+            a = array([1, 2, 3])
+            b = array([
+                [1, 2, 3],
+                [4, 5, 6]
+            ])
+            khatri_rao(a, b)
+
+        with pytest.raises(ValueError):
+            # second array is 1-D
+            a = array([
+                [1, 2, 3],
+                [7, 8, 9]
+            ])
+            b = array([4, 5, 6])
+            khatri_rao(a, b)
+
+    def test_equality_of_two_equations(self):
+        a = array([[1, 2], [3, 4]])
+        b = array([[5, 6], [7, 8]])
+
+        res1 = khatri_rao(a, b)
+        res2 = np.vstack([np.kron(a[:, k], b[:, k])
+                          for k in range(b.shape[1])]).T
+
+        assert_array_equal(res1, res2)
+
+    def test_empty(self):
+        a = np.empty((0, 2))
+        b = np.empty((3, 2))
+        res = khatri_rao(a, b)
+        assert_allclose(res, np.empty((0, 2)))
+
+        a = np.empty((3, 0))
+        b = np.empty((5, 0))
+        res = khatri_rao(a, b)
+        assert_allclose(res, np.empty((15, 0)))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matmul_toeplitz.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matmul_toeplitz.py
new file mode 100644
index 0000000000000000000000000000000000000000..22f8f94fd10a5404d4013adf995bba54f76ff803
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_matmul_toeplitz.py
@@ -0,0 +1,136 @@
+"""Test functions for linalg.matmul_toeplitz function
+"""
+
+import numpy as np
+from scipy.linalg import toeplitz, matmul_toeplitz
+
+from pytest import raises as assert_raises
+from numpy.testing import assert_allclose
+
+
+class TestMatmulToeplitz:
+
+    def setup_method(self):
+        self.rng = np.random.RandomState(42)
+        self.tolerance = 1.5e-13
+
+    def test_real(self):
+        cases = []
+
+        n = 1
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=(n, 1))
+        cases.append((x, c, r, False))
+
+        n = 2
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=(n, 1))
+        cases.append((x, c, r, False))
+
+        n = 101
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=(n, 1))
+        cases.append((x, c, r, True))
+
+        n = 1000
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=(n, 1))
+        cases.append((x, c, r, False))
+
+        n = 100
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=(n, self.rng.randint(1, 10)))
+        cases.append((x, c, r, False))
+
+        n = 100
+        c = self.rng.normal(size=(n, 1))
+        r = self.rng.normal(size=(n, 1))
+        x = self.rng.normal(size=(n, self.rng.randint(1, 10)))
+        cases.append((x, c, r, True))
+
+        n = 100
+        c = self.rng.normal(size=(n, 1))
+        r = None
+        x = self.rng.normal(size=(n, self.rng.randint(1, 10)))
+        cases.append((x, c, r, True, -1))
+
+        n = 100
+        c = self.rng.normal(size=(n, 1))
+        r = None
+        x = self.rng.normal(size=n)
+        cases.append((x, c, r, False))
+
+        n = 101
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n-27)
+        x = self.rng.normal(size=(n-27, 1))
+        cases.append((x, c, r, True))
+
+        n = 100
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n//4)
+        x = self.rng.normal(size=(n//4, self.rng.randint(1, 10)))
+        cases.append((x, c, r, True))
+
+        [self.do(*i) for i in cases]
+
+    def test_complex(self):
+        n = 127
+        c = self.rng.normal(size=(n, 1)) + self.rng.normal(size=(n, 1))*1j
+        r = self.rng.normal(size=(n, 1)) + self.rng.normal(size=(n, 1))*1j
+        x = self.rng.normal(size=(n, 3)) + self.rng.normal(size=(n, 3))*1j
+        self.do(x, c, r, False)
+
+        n = 100
+        c = self.rng.normal(size=(n, 1)) + self.rng.normal(size=(n, 1))*1j
+        r = self.rng.normal(size=(n//2, 1)) +\
+            self.rng.normal(size=(n//2, 1))*1j
+        x = self.rng.normal(size=(n//2, 3)) +\
+            self.rng.normal(size=(n//2, 3))*1j
+        self.do(x, c, r, False)
+
+    def test_empty(self):
+        c = []
+        r = []
+        x = []
+        self.do(x, c, r, False)
+
+        x = np.empty((0, 0))
+        self.do(x, c, r, False)
+
+    def test_exceptions(self):
+
+        n = 100
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=2*n)
+        x = self.rng.normal(size=n)
+        assert_raises(ValueError, matmul_toeplitz, (c, r), x, True)
+
+        n = 100
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n)
+        x = self.rng.normal(size=n-1)
+        assert_raises(ValueError, matmul_toeplitz, (c, r), x, True)
+
+        n = 100
+        c = self.rng.normal(size=n)
+        r = self.rng.normal(size=n//2)
+        x = self.rng.normal(size=n//2-1)
+        assert_raises(ValueError, matmul_toeplitz, (c, r), x, True)
+
+    # For toeplitz matrices, matmul_toeplitz() should be equivalent to @.
+    def do(self, x, c, r=None, check_finite=False, workers=None):
+        c = np.ravel(c)
+        if r is None:
+            actual = matmul_toeplitz(c, x, check_finite, workers)
+        else:
+            r = np.ravel(r)
+            actual = matmul_toeplitz((c, r), x, check_finite)
+        desired = toeplitz(c, r) @ x
+        assert_allclose(actual, desired,
+            rtol=self.tolerance, atol=self.tolerance)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_procrustes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_procrustes.py
new file mode 100644
index 0000000000000000000000000000000000000000..4efa433c2cab01a4f77ef1c4f1bde3ab4d5c421b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_procrustes.py
@@ -0,0 +1,221 @@
+from itertools import product, permutations
+
+import numpy as np
+import pytest
+from numpy.testing import assert_array_less, assert_allclose
+from pytest import raises as assert_raises
+
+from scipy.linalg import inv, eigh, norm, svd
+from scipy.linalg import orthogonal_procrustes
+from scipy.sparse._sputils import matrix
+
+
+def test_orthogonal_procrustes_ndim_too_large():
+    rng = np.random.RandomState(1234)
+    A = rng.randn(3, 4, 5)
+    B = rng.randn(3, 4, 5)
+    assert_raises(ValueError, orthogonal_procrustes, A, B)
+
+
+def test_orthogonal_procrustes_ndim_too_small():
+    rng = np.random.RandomState(1234)
+    A = rng.randn(3)
+    B = rng.randn(3)
+    assert_raises(ValueError, orthogonal_procrustes, A, B)
+
+
+def test_orthogonal_procrustes_shape_mismatch():
+    rng = np.random.RandomState(1234)
+    shapes = ((3, 3), (3, 4), (4, 3), (4, 4))
+    for a, b in permutations(shapes, 2):
+        A = rng.randn(*a)
+        B = rng.randn(*b)
+        assert_raises(ValueError, orthogonal_procrustes, A, B)
+
+
+def test_orthogonal_procrustes_checkfinite_exception():
+    rng = np.random.RandomState(1234)
+    m, n = 2, 3
+    A_good = rng.randn(m, n)
+    B_good = rng.randn(m, n)
+    for bad_value in np.inf, -np.inf, np.nan:
+        A_bad = A_good.copy()
+        A_bad[1, 2] = bad_value
+        B_bad = B_good.copy()
+        B_bad[1, 2] = bad_value
+        for A, B in ((A_good, B_bad), (A_bad, B_good), (A_bad, B_bad)):
+            assert_raises(ValueError, orthogonal_procrustes, A, B)
+
+
+def test_orthogonal_procrustes_scale_invariance():
+    rng = np.random.RandomState(1234)
+    m, n = 4, 3
+    for i in range(3):
+        A_orig = rng.randn(m, n)
+        B_orig = rng.randn(m, n)
+        R_orig, s = orthogonal_procrustes(A_orig, B_orig)
+        for A_scale in np.square(rng.randn(3)):
+            for B_scale in np.square(rng.randn(3)):
+                R, s = orthogonal_procrustes(A_orig * A_scale, B_orig * B_scale)
+                assert_allclose(R, R_orig)
+
+
+def test_orthogonal_procrustes_array_conversion():
+    rng = np.random.RandomState(1234)
+    for m, n in ((6, 4), (4, 4), (4, 6)):
+        A_arr = rng.randn(m, n)
+        B_arr = rng.randn(m, n)
+        As = (A_arr, A_arr.tolist(), matrix(A_arr))
+        Bs = (B_arr, B_arr.tolist(), matrix(B_arr))
+        R_arr, s = orthogonal_procrustes(A_arr, B_arr)
+        AR_arr = A_arr.dot(R_arr)
+        for A, B in product(As, Bs):
+            R, s = orthogonal_procrustes(A, B)
+            AR = A_arr.dot(R)
+            assert_allclose(AR, AR_arr)
+
+
+def test_orthogonal_procrustes():
+    rng = np.random.RandomState(1234)
+    for m, n in ((6, 4), (4, 4), (4, 6)):
+        # Sample a random target matrix.
+        B = rng.randn(m, n)
+        # Sample a random orthogonal matrix
+        # by computing eigh of a sampled symmetric matrix.
+        X = rng.randn(n, n)
+        w, V = eigh(X.T + X)
+        assert_allclose(inv(V), V.T)
+        # Compute a matrix with a known orthogonal transformation that gives B.
+        A = np.dot(B, V.T)
+        # Check that an orthogonal transformation from A to B can be recovered.
+        R, s = orthogonal_procrustes(A, B)
+        assert_allclose(inv(R), R.T)
+        assert_allclose(A.dot(R), B)
+        # Create a perturbed input matrix.
+        A_perturbed = A + 1e-2 * rng.randn(m, n)
+        # Check that the orthogonal procrustes function can find an orthogonal
+        # transformation that is better than the orthogonal transformation
+        # computed from the original input matrix.
+        R_prime, s = orthogonal_procrustes(A_perturbed, B)
+        assert_allclose(inv(R_prime), R_prime.T)
+        # Compute the naive and optimal transformations of the perturbed input.
+        naive_approx = A_perturbed.dot(R)
+        optim_approx = A_perturbed.dot(R_prime)
+        # Compute the Frobenius norm errors of the matrix approximations.
+        naive_approx_error = norm(naive_approx - B, ord='fro')
+        optim_approx_error = norm(optim_approx - B, ord='fro')
+        # Check that the orthogonal Procrustes approximation is better.
+        assert_array_less(optim_approx_error, naive_approx_error)
+
+
+def _centered(A):
+    mu = A.mean(axis=0)
+    return A - mu, mu
+
+
+def test_orthogonal_procrustes_exact_example():
+    # Check a small application.
+    # It uses translation, scaling, reflection, and rotation.
+    #
+    #         |
+    #   a  b  |
+    #         |
+    #   d  c  |        w
+    #         |
+    # --------+--- x ----- z ---
+    #         |
+    #         |        y
+    #         |
+    #
+    A_orig = np.array([[-3, 3], [-2, 3], [-2, 2], [-3, 2]], dtype=float)
+    B_orig = np.array([[3, 2], [1, 0], [3, -2], [5, 0]], dtype=float)
+    A, A_mu = _centered(A_orig)
+    B, B_mu = _centered(B_orig)
+    R, s = orthogonal_procrustes(A, B)
+    scale = s / np.square(norm(A))
+    B_approx = scale * np.dot(A, R) + B_mu
+    assert_allclose(B_approx, B_orig, atol=1e-8)
+
+
+def test_orthogonal_procrustes_stretched_example():
+    # Try again with a target with a stretched y axis.
+    A_orig = np.array([[-3, 3], [-2, 3], [-2, 2], [-3, 2]], dtype=float)
+    B_orig = np.array([[3, 40], [1, 0], [3, -40], [5, 0]], dtype=float)
+    A, A_mu = _centered(A_orig)
+    B, B_mu = _centered(B_orig)
+    R, s = orthogonal_procrustes(A, B)
+    scale = s / np.square(norm(A))
+    B_approx = scale * np.dot(A, R) + B_mu
+    expected = np.array([[3, 21], [-18, 0], [3, -21], [24, 0]], dtype=float)
+    assert_allclose(B_approx, expected, atol=1e-8)
+    # Check disparity symmetry.
+    expected_disparity = 0.4501246882793018
+    AB_disparity = np.square(norm(B_approx - B_orig) / norm(B))
+    assert_allclose(AB_disparity, expected_disparity)
+    R, s = orthogonal_procrustes(B, A)
+    scale = s / np.square(norm(B))
+    A_approx = scale * np.dot(B, R) + A_mu
+    BA_disparity = np.square(norm(A_approx - A_orig) / norm(A))
+    assert_allclose(BA_disparity, expected_disparity)
+
+
+def test_orthogonal_procrustes_skbio_example():
+    # This transformation is also exact.
+    # It uses translation, scaling, and reflection.
+    #
+    #   |
+    #   | a
+    #   | b
+    #   | c d
+    # --+---------
+    #   |
+    #   |       w
+    #   |
+    #   |       x
+    #   |
+    #   |   z   y
+    #   |
+    #
+    A_orig = np.array([[4, -2], [4, -4], [4, -6], [2, -6]], dtype=float)
+    B_orig = np.array([[1, 3], [1, 2], [1, 1], [2, 1]], dtype=float)
+    B_standardized = np.array([
+        [-0.13363062, 0.6681531],
+        [-0.13363062, 0.13363062],
+        [-0.13363062, -0.40089186],
+        [0.40089186, -0.40089186]])
+    A, A_mu = _centered(A_orig)
+    B, B_mu = _centered(B_orig)
+    R, s = orthogonal_procrustes(A, B)
+    scale = s / np.square(norm(A))
+    B_approx = scale * np.dot(A, R) + B_mu
+    assert_allclose(B_approx, B_orig)
+    assert_allclose(B / norm(B), B_standardized)
+
+
+def test_empty():
+    a = np.empty((0, 0))
+    r, s = orthogonal_procrustes(a, a)
+    assert_allclose(r, np.empty((0, 0)))
+
+    a = np.empty((0, 3))
+    r, s = orthogonal_procrustes(a, a)
+    assert_allclose(r, np.identity(3))
+
+
+@pytest.mark.parametrize('shape', [(4, 5), (5, 5), (5, 4)])
+def test_unitary(shape):
+    # gh-12071 added support for unitary matrices; check that it
+    # works as intended.
+    m, n = shape
+    rng = np.random.default_rng(589234981235)
+    A = rng.random(shape) + rng.random(shape) * 1j
+    Q = rng.random((n, n)) + rng.random((n, n)) * 1j
+    Q, _ = np.linalg.qr(Q)
+    B = A @ Q
+    R, scale = orthogonal_procrustes(A, B)
+    assert_allclose(R @ R.conj().T, np.eye(n), atol=1e-14)
+    assert_allclose(A @ Q, B)
+    if shape != (4, 5):  # solution is unique
+        assert_allclose(R, Q)
+    _, s, _ = svd(A.conj().T @ B)
+    assert_allclose(scale, np.sum(s))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_sketches.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_sketches.py
new file mode 100644
index 0000000000000000000000000000000000000000..7fc5a8540510f57a2b00334b5e190d4ddd474d09
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_sketches.py
@@ -0,0 +1,118 @@
+"""Tests for _sketches.py."""
+
+import numpy as np
+from numpy.testing import assert_, assert_equal
+from scipy.linalg import clarkson_woodruff_transform
+from scipy.linalg._sketches import cwt_matrix
+from scipy.sparse import issparse, rand
+from scipy.sparse.linalg import norm
+
+
+class TestClarksonWoodruffTransform:
+    """
+    Testing the Clarkson Woodruff Transform
+    """
+    # set seed for generating test matrices
+    rng = np.random.default_rng(1179103485)
+
+    # Test matrix parameters
+    n_rows = 2000
+    n_cols = 100
+    density = 0.1
+
+    # Sketch matrix dimensions
+    n_sketch_rows = 200
+
+    # Seeds to test with
+    seeds = [1755490010, 934377150, 1391612830, 1752708722, 2008891431,
+             1302443994, 1521083269, 1501189312, 1126232505, 1533465685]
+
+    A_dense = rng.random((n_rows, n_cols))
+    A_csc = rand(
+        n_rows, n_cols, density=density, format='csc', random_state=rng,
+    )
+    A_csr = rand(
+        n_rows, n_cols, density=density, format='csr', random_state=rng,
+    )
+    A_coo = rand(
+        n_rows, n_cols, density=density, format='coo', random_state=rng,
+    )
+
+    # Collect the test matrices
+    test_matrices = [
+        A_dense, A_csc, A_csr, A_coo,
+    ]
+
+    # Test vector with norm ~1
+    x = rng.random((n_rows, 1)) / np.sqrt(n_rows)
+
+    def test_sketch_dimensions(self):
+        for A in self.test_matrices:
+            for seed in self.seeds:
+                # seed to ensure backwards compatibility post SPEC7
+                sketch = clarkson_woodruff_transform(
+                    A, self.n_sketch_rows, seed=seed
+                )
+                assert_(sketch.shape == (self.n_sketch_rows, self.n_cols))
+
+    def test_seed_returns_identical_transform_matrix(self):
+        for seed in self.seeds:
+            S1 = cwt_matrix(
+                self.n_sketch_rows, self.n_rows, rng=seed
+            ).toarray()
+            S2 = cwt_matrix(
+                self.n_sketch_rows, self.n_rows, rng=seed
+            ).toarray()
+            assert_equal(S1, S2)
+
+    def test_seed_returns_identically(self):
+        for A in self.test_matrices:
+            for seed in self.seeds:
+                sketch1 = clarkson_woodruff_transform(
+                    A, self.n_sketch_rows, rng=seed
+                )
+                sketch2 = clarkson_woodruff_transform(
+                    A, self.n_sketch_rows, rng=seed
+                )
+                if issparse(sketch1):
+                    sketch1 = sketch1.toarray()
+                if issparse(sketch2):
+                    sketch2 = sketch2.toarray()
+                assert_equal(sketch1, sketch2)
+
+    def test_sketch_preserves_frobenius_norm(self):
+        # Given the probabilistic nature of the sketches
+        # we run the test multiple times and check that
+        # we pass all/almost all the tries.
+        n_errors = 0
+        for A in self.test_matrices:
+            if issparse(A):
+                true_norm = norm(A)
+            else:
+                true_norm = np.linalg.norm(A)
+            for seed in self.seeds:
+                sketch = clarkson_woodruff_transform(
+                    A, self.n_sketch_rows, rng=seed,
+                )
+                if issparse(sketch):
+                    sketch_norm = norm(sketch)
+                else:
+                    sketch_norm = np.linalg.norm(sketch)
+
+                if np.abs(true_norm - sketch_norm) > 0.1 * true_norm:
+                    n_errors += 1
+        assert_(n_errors == 0)
+
+    def test_sketch_preserves_vector_norm(self):
+        n_errors = 0
+        n_sketch_rows = int(np.ceil(2. / (0.01 * 0.5**2)))
+        true_norm = np.linalg.norm(self.x)
+        for seed in self.seeds:
+            sketch = clarkson_woodruff_transform(
+                self.x, n_sketch_rows, rng=seed,
+            )
+            sketch_norm = np.linalg.norm(sketch)
+
+            if np.abs(true_norm - sketch_norm) > 0.5 * true_norm:
+                n_errors += 1
+        assert_(n_errors == 0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solve_toeplitz.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solve_toeplitz.py
new file mode 100644
index 0000000000000000000000000000000000000000..440a73abc8c83bc32887c37c75577b790f3f1be9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solve_toeplitz.py
@@ -0,0 +1,150 @@
+"""Test functions for linalg._solve_toeplitz module
+"""
+import numpy as np
+from scipy.linalg._solve_toeplitz import levinson
+from scipy.linalg import solve, toeplitz, solve_toeplitz, matmul_toeplitz
+from numpy.testing import assert_equal, assert_allclose
+
+import pytest
+from pytest import raises as assert_raises
+
+
+def test_solve_equivalence():
+    # For toeplitz matrices, solve_toeplitz() should be equivalent to solve().
+    random = np.random.RandomState(1234)
+    for n in (1, 2, 3, 10):
+        c = random.randn(n)
+        if random.rand() < 0.5:
+            c = c + 1j * random.randn(n)
+        r = random.randn(n)
+        if random.rand() < 0.5:
+            r = r + 1j * random.randn(n)
+        y = random.randn(n)
+        if random.rand() < 0.5:
+            y = y + 1j * random.randn(n)
+
+        # Check equivalence when both the column and row are provided.
+        actual = solve_toeplitz((c,r), y)
+        desired = solve(toeplitz(c, r=r), y)
+        assert_allclose(actual, desired)
+
+        # Check equivalence when the column is provided but not the row.
+        actual = solve_toeplitz(c, b=y)
+        desired = solve(toeplitz(c), y)
+        assert_allclose(actual, desired)
+
+
+def test_multiple_rhs():
+    random = np.random.RandomState(1234)
+    c = random.randn(4)
+    r = random.randn(4)
+    for offset in [0, 1j]:
+        for yshape in ((4,), (4, 3), (4, 3, 2)):
+            y = random.randn(*yshape) + offset
+            actual = solve_toeplitz((c,r), b=y)
+            desired = solve(toeplitz(c, r=r), y)
+            assert_equal(actual.shape, yshape)
+            assert_equal(desired.shape, yshape)
+            assert_allclose(actual, desired)
+
+
+def test_native_list_arguments():
+    c = [1,2,4,7]
+    r = [1,3,9,12]
+    y = [5,1,4,2]
+    actual = solve_toeplitz((c,r), y)
+    desired = solve(toeplitz(c, r=r), y)
+    assert_allclose(actual, desired)
+
+
+def test_zero_diag_error():
+    # The Levinson-Durbin implementation fails when the diagonal is zero.
+    random = np.random.RandomState(1234)
+    n = 4
+    c = random.randn(n)
+    r = random.randn(n)
+    y = random.randn(n)
+    c[0] = 0
+    assert_raises(np.linalg.LinAlgError,
+        solve_toeplitz, (c, r), b=y)
+
+
+def test_wikipedia_counterexample():
+    # The Levinson-Durbin implementation also fails in other cases.
+    # This example is from the talk page of the wikipedia article.
+    random = np.random.RandomState(1234)
+    c = [2, 2, 1]
+    y = random.randn(3)
+    assert_raises(np.linalg.LinAlgError, solve_toeplitz, c, b=y)
+
+
+def test_reflection_coeffs():
+    # check that the partial solutions are given by the reflection
+    # coefficients
+
+    random = np.random.RandomState(1234)
+    y_d = random.randn(10)
+    y_z = random.randn(10) + 1j
+    reflection_coeffs_d = [1]
+    reflection_coeffs_z = [1]
+    for i in range(2, 10):
+        reflection_coeffs_d.append(solve_toeplitz(y_d[:(i-1)], b=y_d[1:i])[-1])
+        reflection_coeffs_z.append(solve_toeplitz(y_z[:(i-1)], b=y_z[1:i])[-1])
+
+    y_d_concat = np.concatenate((y_d[-2:0:-1], y_d[:-1]))
+    y_z_concat = np.concatenate((y_z[-2:0:-1].conj(), y_z[:-1]))
+    _, ref_d = levinson(y_d_concat, b=y_d[1:])
+    _, ref_z = levinson(y_z_concat, b=y_z[1:])
+
+    assert_allclose(reflection_coeffs_d, ref_d[:-1])
+    assert_allclose(reflection_coeffs_z, ref_z[:-1])
+
+
+@pytest.mark.xfail(reason='Instability of Levinson iteration')
+def test_unstable():
+    # this is a "Gaussian Toeplitz matrix", as mentioned in Example 2 of
+    # I. Gohbert, T. Kailath and V. Olshevsky "Fast Gaussian Elimination with
+    # Partial Pivoting for Matrices with Displacement Structure"
+    # Mathematics of Computation, 64, 212 (1995), pp 1557-1576
+    # which can be unstable for levinson recursion.
+
+    # other fast toeplitz solvers such as GKO or Burg should be better.
+    random = np.random.RandomState(1234)
+    n = 100
+    c = 0.9 ** (np.arange(n)**2)
+    y = random.randn(n)
+
+    solution1 = solve_toeplitz(c, b=y)
+    solution2 = solve(toeplitz(c), y)
+
+    assert_allclose(solution1, solution2)
+
+
+@pytest.mark.parametrize('dt_c', [int, float, np.float32, complex, np.complex64])
+@pytest.mark.parametrize('dt_b', [int, float, np.float32, complex, np.complex64])
+def test_empty(dt_c, dt_b):
+    c = np.array([], dtype=dt_c)
+    b = np.array([], dtype=dt_b)
+    x = solve_toeplitz(c, b)
+    assert x.shape == (0,)
+    assert x.dtype == solve_toeplitz(np.array([2, 1], dtype=dt_c),
+                                      np.ones(2, dtype=dt_b)).dtype
+
+    b = np.empty((0, 0), dtype=dt_b)
+    x1 = solve_toeplitz(c, b)
+    assert x1.shape == (0, 0)
+    assert x1.dtype == x.dtype
+
+
+@pytest.mark.parametrize('fun', [solve_toeplitz, matmul_toeplitz])
+def test_nd_FutureWarning(fun):
+    # Test future warnings with n-D `c`/`r`
+    rng = np.random.default_rng(283592436523456)
+    c = rng.random((2, 3, 4))
+    r = rng.random((2, 3, 4))
+    b_or_x = rng.random(24)
+    message = "Beginning in SciPy 1.17, multidimensional input will be..."
+    with pytest.warns(FutureWarning, match=message):
+         fun(c, b_or_x)
+    with pytest.warns(FutureWarning, match=message):
+         fun((c, r), b_or_x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solvers.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solvers.py
new file mode 100644
index 0000000000000000000000000000000000000000..a4a39c5e86939bddabafaaf87c643c0a4ad570fe
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_solvers.py
@@ -0,0 +1,844 @@
+import os
+import numpy as np
+
+from numpy.testing import assert_array_almost_equal, assert_allclose
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.linalg import solve_sylvester
+from scipy.linalg import solve_continuous_lyapunov, solve_discrete_lyapunov
+from scipy.linalg import solve_continuous_are, solve_discrete_are
+from scipy.linalg import block_diag, solve, LinAlgError
+from scipy.sparse._sputils import matrix
+
+
+# dtypes for testing size-0 case following precedent set in gh-20295
+dtypes = [int, float, np.float32, complex, np.complex64]
+
+
+def _load_data(name):
+    """
+    Load npz data file under data/
+    Returns a copy of the data, rather than keeping the npz file open.
+    """
+    filename = os.path.join(os.path.abspath(os.path.dirname(__file__)),
+                            'data', name)
+    with np.load(filename) as f:
+        return dict(f.items())
+
+
+class TestSolveLyapunov:
+
+    cases = [
+        # empty case
+        (np.empty((0, 0)),
+         np.empty((0, 0))),
+        (np.array([[1, 2], [3, 4]]),
+         np.array([[9, 10], [11, 12]])),
+        # a, q all complex.
+        (np.array([[1.0+1j, 2.0], [3.0-4.0j, 5.0]]),
+         np.array([[2.0-2j, 2.0+2j], [-1.0-1j, 2.0]])),
+        # a real; q complex.
+        (np.array([[1.0, 2.0], [3.0, 5.0]]),
+         np.array([[2.0-2j, 2.0+2j], [-1.0-1j, 2.0]])),
+        # a complex; q real.
+        (np.array([[1.0+1j, 2.0], [3.0-4.0j, 5.0]]),
+         np.array([[2.0, 2.0], [-1.0, 2.0]])),
+        # An example from Kitagawa, 1977
+        (np.array([[3, 9, 5, 1, 4], [1, 2, 3, 8, 4], [4, 6, 6, 6, 3],
+                   [1, 5, 2, 0, 7], [5, 3, 3, 1, 5]]),
+         np.array([[2, 4, 1, 0, 1], [4, 1, 0, 2, 0], [1, 0, 3, 0, 3],
+                   [0, 2, 0, 1, 0], [1, 0, 3, 0, 4]])),
+        # Companion matrix example. a complex; q real; a.shape[0] = 11
+        (np.array([[0.100+0.j, 0.091+0.j, 0.082+0.j, 0.073+0.j, 0.064+0.j,
+                    0.055+0.j, 0.046+0.j, 0.037+0.j, 0.028+0.j, 0.019+0.j,
+                    0.010+0.j],
+                   [1.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 1.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 1.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 1.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 1.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    1.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 1.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 1.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 1.000+0.j, 0.000+0.j,
+                    0.000+0.j],
+                   [0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j,
+                    0.000+0.j, 0.000+0.j, 0.000+0.j, 0.000+0.j, 1.000+0.j,
+                    0.000+0.j]]),
+         np.eye(11)),
+        # https://github.com/scipy/scipy/issues/4176
+        (matrix([[0, 1], [-1/2, -1]]),
+         (matrix([0, 3]).T @ matrix([0, 3]).T.T)),
+        # https://github.com/scipy/scipy/issues/4176
+        (matrix([[0, 1], [-1/2, -1]]),
+         (np.array(matrix([0, 3]).T @ matrix([0, 3]).T.T))),
+        ]
+
+    def test_continuous_squareness_and_shape(self):
+        nsq = np.ones((3, 2))
+        sq = np.eye(3)
+        assert_raises(ValueError, solve_continuous_lyapunov, nsq, sq)
+        assert_raises(ValueError, solve_continuous_lyapunov, sq, nsq)
+        assert_raises(ValueError, solve_continuous_lyapunov, sq, np.eye(2))
+
+    def check_continuous_case(self, a, q):
+        x = solve_continuous_lyapunov(a, q)
+        assert_array_almost_equal(
+                          np.dot(a, x) + np.dot(x, a.conj().transpose()), q)
+
+    def check_discrete_case(self, a, q, method=None):
+        x = solve_discrete_lyapunov(a, q, method=method)
+        assert_array_almost_equal(
+                      np.dot(np.dot(a, x), a.conj().transpose()) - x, -1.0*q)
+
+    def test_cases(self):
+        for case in self.cases:
+            self.check_continuous_case(case[0], case[1])
+            self.check_discrete_case(case[0], case[1])
+            self.check_discrete_case(case[0], case[1], method='direct')
+            self.check_discrete_case(case[0], case[1], method='bilinear')
+
+    @pytest.mark.parametrize("dtype_a", dtypes)
+    @pytest.mark.parametrize("dtype_q", dtypes)
+    def test_size_0(self, dtype_a, dtype_q):
+        rng = np.random.default_rng(234598235)
+
+        a = np.zeros((0, 0), dtype=dtype_a)
+        q = np.zeros((0, 0), dtype=dtype_q)
+        res = solve_continuous_lyapunov(a, q)
+
+        a = (rng.random((5, 5))*100).astype(dtype_a)
+        q = (rng.random((5, 5))*100).astype(dtype_q)
+        ref = solve_continuous_lyapunov(a, q)
+
+        assert res.shape == (0, 0)
+        assert res.dtype == ref.dtype
+
+
+class TestSolveContinuousAre:
+    mat6 = _load_data('carex_6_data.npz')
+    mat15 = _load_data('carex_15_data.npz')
+    mat18 = _load_data('carex_18_data.npz')
+    mat19 = _load_data('carex_19_data.npz')
+    mat20 = _load_data('carex_20_data.npz')
+    cases = [
+        # Carex examples taken from (with default parameters):
+        # [1] P.BENNER, A.J. LAUB, V. MEHRMANN: 'A Collection of Benchmark
+        #     Examples for the Numerical Solution of Algebraic Riccati
+        #     Equations II: Continuous-Time Case', Tech. Report SPC 95_23,
+        #     Fak. f. Mathematik, TU Chemnitz-Zwickau (Germany), 1995.
+        #
+        # The format of the data is (a, b, q, r, knownfailure), where
+        # knownfailure is None if the test passes or a string
+        # indicating the reason for failure.
+        #
+        # Test Case 0: carex #1
+        (np.diag([1.], 1),
+         np.array([[0], [1]]),
+         block_diag(1., 2.),
+         1,
+         None),
+        # Test Case 1: carex #2
+        (np.array([[4, 3], [-4.5, -3.5]]),
+         np.array([[1], [-1]]),
+         np.array([[9, 6], [6, 4.]]),
+         1,
+         None),
+        # Test Case 2: carex #3
+        (np.array([[0, 1, 0, 0],
+                   [0, -1.89, 0.39, -5.53],
+                   [0, -0.034, -2.98, 2.43],
+                   [0.034, -0.0011, -0.99, -0.21]]),
+         np.array([[0, 0], [0.36, -1.6], [-0.95, -0.032], [0.03, 0]]),
+         np.array([[2.313, 2.727, 0.688, 0.023],
+                   [2.727, 4.271, 1.148, 0.323],
+                   [0.688, 1.148, 0.313, 0.102],
+                   [0.023, 0.323, 0.102, 0.083]]),
+         np.eye(2),
+         None),
+        # Test Case 3: carex #4
+        (np.array([[-0.991, 0.529, 0, 0, 0, 0, 0, 0],
+                   [0.522, -1.051, 0.596, 0, 0, 0, 0, 0],
+                   [0, 0.522, -1.118, 0.596, 0, 0, 0, 0],
+                   [0, 0, 0.522, -1.548, 0.718, 0, 0, 0],
+                   [0, 0, 0, 0.922, -1.64, 0.799, 0, 0],
+                   [0, 0, 0, 0, 0.922, -1.721, 0.901, 0],
+                   [0, 0, 0, 0, 0, 0.922, -1.823, 1.021],
+                   [0, 0, 0, 0, 0, 0, 0.922, -1.943]]),
+         np.array([[3.84, 4.00, 37.60, 3.08, 2.36, 2.88, 3.08, 3.00],
+                   [-2.88, -3.04, -2.80, -2.32, -3.32, -3.82, -4.12, -3.96]]
+                  ).T * 0.001,
+         np.array([[1.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.1],
+                   [0.0, 1.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0],
+                   [0.0, 0.0, 1.0, 0.0, 0.0, 0.5, 0.0, 0.0],
+                   [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
+                   [0.5, 0.1, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0],
+                   [0.0, 0.0, 0.5, 0.0, 0.0, 0.1, 0.0, 0.0],
+                   [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0],
+                   [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1]]),
+         np.eye(2),
+         None),
+        # Test Case 4: carex #5
+        (np.array(
+          [[-4.019, 5.120, 0., 0., -2.082, 0., 0., 0., 0.870],
+           [-0.346, 0.986, 0., 0., -2.340, 0., 0., 0., 0.970],
+           [-7.909, 15.407, -4.069, 0., -6.450, 0., 0., 0., 2.680],
+           [-21.816, 35.606, -0.339, -3.870, -17.800, 0., 0., 0., 7.390],
+           [-60.196, 98.188, -7.907, 0.340, -53.008, 0., 0., 0., 20.400],
+           [0, 0, 0, 0, 94.000, -147.200, 0., 53.200, 0.],
+           [0, 0, 0, 0, 0, 94.000, -147.200, 0, 0],
+           [0, 0, 0, 0, 0, 12.800, 0.000, -31.600, 0],
+           [0, 0, 0, 0, 12.800, 0.000, 0.000, 18.800, -31.600]]),
+         np.array([[0.010, -0.011, -0.151],
+                   [0.003, -0.021, 0.000],
+                   [0.009, -0.059, 0.000],
+                   [0.024, -0.162, 0.000],
+                   [0.068, -0.445, 0.000],
+                   [0.000, 0.000, 0.000],
+                   [0.000, 0.000, 0.000],
+                   [0.000, 0.000, 0.000],
+                   [0.000, 0.000, 0.000]]),
+         np.eye(9),
+         np.eye(3),
+         None),
+        # Test Case 5: carex #6
+        (mat6['A'], mat6['B'], mat6['Q'], mat6['R'], None),
+        # Test Case 6: carex #7
+        (np.array([[1, 0], [0, -2.]]),
+         np.array([[1e-6], [0]]),
+         np.ones((2, 2)),
+         1.,
+         'Bad residual accuracy'),
+        # Test Case 7: carex #8
+        (block_diag(-0.1, -0.02),
+         np.array([[0.100, 0.000], [0.001, 0.010]]),
+         np.array([[100, 1000], [1000, 10000]]),
+         np.ones((2, 2)) + block_diag(1e-6, 0),
+         None),
+        # Test Case 8: carex #9
+        (np.array([[0, 1e6], [0, 0]]),
+         np.array([[0], [1.]]),
+         np.eye(2),
+         1.,
+         None),
+        # Test Case 9: carex #10
+        (np.array([[1.0000001, 1], [1., 1.0000001]]),
+         np.eye(2),
+         np.eye(2),
+         np.eye(2),
+         None),
+        # Test Case 10: carex #11
+        (np.array([[3, 1.], [4, 2]]),
+         np.array([[1], [1]]),
+         np.array([[-11, -5], [-5, -2.]]),
+         1.,
+         None),
+        # Test Case 11: carex #12
+        (np.array([[7000000., 2000000., -0.],
+                   [2000000., 6000000., -2000000.],
+                   [0., -2000000., 5000000.]]) / 3,
+         np.eye(3),
+         np.array([[1., -2., -2.], [-2., 1., -2.], [-2., -2., 1.]]).dot(
+                np.diag([1e-6, 1, 1e6])).dot(
+            np.array([[1., -2., -2.], [-2., 1., -2.], [-2., -2., 1.]])) / 9,
+         np.eye(3) * 1e6,
+         'Bad Residual Accuracy'),
+        # Test Case 12: carex #13
+        (np.array([[0, 0.4, 0, 0],
+                   [0, 0, 0.345, 0],
+                   [0, -0.524e6, -0.465e6, 0.262e6],
+                   [0, 0, 0, -1e6]]),
+         np.array([[0, 0, 0, 1e6]]).T,
+         np.diag([1, 0, 1, 0]),
+         1.,
+         None),
+        # Test Case 13: carex #14
+        (np.array([[-1e-6, 1, 0, 0],
+                   [-1, -1e-6, 0, 0],
+                   [0, 0, 1e-6, 1],
+                   [0, 0, -1, 1e-6]]),
+         np.ones((4, 1)),
+         np.ones((4, 4)),
+         1.,
+         None),
+        # Test Case 14: carex #15
+        (mat15['A'], mat15['B'], mat15['Q'], mat15['R'], None),
+        # Test Case 15: carex #16
+        (np.eye(64, 64, k=-1) + np.eye(64, 64)*(-2.) + np.rot90(
+                 block_diag(1, np.zeros((62, 62)), 1)) + np.eye(64, 64, k=1),
+         np.eye(64),
+         np.eye(64),
+         np.eye(64),
+         None),
+        # Test Case 16: carex #17
+        (np.diag(np.ones((20, )), 1),
+         np.flipud(np.eye(21, 1)),
+         np.eye(21, 1) * np.eye(21, 1).T,
+         1,
+         'Bad Residual Accuracy'),
+        # Test Case 17: carex #18
+        (mat18['A'], mat18['B'], mat18['Q'], mat18['R'], None),
+        # Test Case 18: carex #19
+        (mat19['A'], mat19['B'], mat19['Q'], mat19['R'],
+         'Bad Residual Accuracy'),
+        # Test Case 19: carex #20
+        (mat20['A'], mat20['B'], mat20['Q'], mat20['R'],
+         'Bad Residual Accuracy')
+        ]
+    # Makes the minimum precision requirements customized to the test.
+    # Here numbers represent the number of decimals that agrees with zero
+    # matrix when the solution x is plugged in to the equation.
+    #
+    # res = array([[8e-3,1e-16],[1e-16,1e-20]]) --> min_decimal[k] = 2
+    #
+    # If the test is failing use "None" for that entry.
+    #
+    min_decimal = (14, 12, 13, 14, 11, 6, None, 5, 7, 14, 14,
+                   None, 9, 14, 13, 14, None, 12, None, None)
+
+    @pytest.mark.parametrize("j, case", enumerate(cases))
+    def test_solve_continuous_are(self, j, case):
+        """Checks if 0 = XA + A'X - XB(R)^{-1} B'X + Q is true"""
+        a, b, q, r, knownfailure = case
+        if knownfailure:
+            pytest.xfail(reason=knownfailure)
+
+        dec = self.min_decimal[j]
+        x = solve_continuous_are(a, b, q, r)
+        res = x @ a + a.conj().T @ x + q
+        out_fact = x @ b
+        res -= out_fact @ solve(np.atleast_2d(r), out_fact.conj().T)
+        assert_array_almost_equal(res, np.zeros_like(res), decimal=dec)
+
+
+class TestSolveDiscreteAre:
+    cases = [
+        # Darex examples taken from (with default parameters):
+        # [1] P.BENNER, A.J. LAUB, V. MEHRMANN: 'A Collection of Benchmark
+        #     Examples for the Numerical Solution of Algebraic Riccati
+        #     Equations II: Discrete-Time Case', Tech. Report SPC 95_23,
+        #     Fak. f. Mathematik, TU Chemnitz-Zwickau (Germany), 1995.
+        # [2] T. GUDMUNDSSON, C. KENNEY, A.J. LAUB: 'Scaling of the
+        #     Discrete-Time Algebraic Riccati Equation to Enhance Stability
+        #     of the Schur Solution Method', IEEE Trans.Aut.Cont., vol.37(4)
+        #
+        # The format of the data is (a, b, q, r, knownfailure), where
+        # knownfailure is None if the test passes or a string
+        # indicating the reason for failure.
+        #
+        # TEST CASE 0 : Complex a; real b, q, r
+        (np.array([[2, 1-2j], [0, -3j]]),
+         np.array([[0], [1]]),
+         np.array([[1, 0], [0, 2]]),
+         np.array([[1]]),
+         None),
+        # TEST CASE 1 :Real a, q, r; complex b
+        (np.array([[2, 1], [0, -1]]),
+         np.array([[-2j], [1j]]),
+         np.array([[1, 0], [0, 2]]),
+         np.array([[1]]),
+         None),
+        # TEST CASE 2 : Real a, b; complex q, r
+        (np.array([[3, 1], [0, -1]]),
+         np.array([[1, 2], [1, 3]]),
+         np.array([[1, 1+1j], [1-1j, 2]]),
+         np.array([[2, -2j], [2j, 3]]),
+         None),
+        # TEST CASE 3 : User-reported gh-2251 (Trac #1732)
+        (np.array([[0.63399379, 0.54906824, 0.76253406],
+                   [0.5404729, 0.53745766, 0.08731853],
+                   [0.27524045, 0.84922129, 0.4681622]]),
+         np.array([[0.96861695], [0.05532739], [0.78934047]]),
+         np.eye(3),
+         np.eye(1),
+         None),
+        # TEST CASE 4 : darex #1
+        (np.array([[4, 3], [-4.5, -3.5]]),
+         np.array([[1], [-1]]),
+         np.array([[9, 6], [6, 4]]),
+         np.array([[1]]),
+         None),
+        # TEST CASE 5 : darex #2
+        (np.array([[0.9512, 0], [0, 0.9048]]),
+         np.array([[4.877, 4.877], [-1.1895, 3.569]]),
+         np.array([[0.005, 0], [0, 0.02]]),
+         np.array([[1/3, 0], [0, 3]]),
+         None),
+        # TEST CASE 6 : darex #3
+        (np.array([[2, -1], [1, 0]]),
+         np.array([[1], [0]]),
+         np.array([[0, 0], [0, 1]]),
+         np.array([[0]]),
+         None),
+        # TEST CASE 7 : darex #4 (skipped the gen. Ric. term S)
+        (np.array([[0, 1], [0, -1]]),
+         np.array([[1, 0], [2, 1]]),
+         np.array([[-4, -4], [-4, 7]]) * (1/11),
+         np.array([[9, 3], [3, 1]]),
+         None),
+        # TEST CASE 8 : darex #5
+        (np.array([[0, 1], [0, 0]]),
+         np.array([[0], [1]]),
+         np.array([[1, 2], [2, 4]]),
+         np.array([[1]]),
+         None),
+        # TEST CASE 9 : darex #6
+        (np.array([[0.998, 0.067, 0, 0],
+                   [-.067, 0.998, 0, 0],
+                   [0, 0, 0.998, 0.153],
+                   [0, 0, -.153, 0.998]]),
+         np.array([[0.0033, 0.0200],
+                   [0.1000, -.0007],
+                   [0.0400, 0.0073],
+                   [-.0028, 0.1000]]),
+         np.array([[1.87, 0, 0, -0.244],
+                   [0, 0.744, 0.205, 0],
+                   [0, 0.205, 0.589, 0],
+                   [-0.244, 0, 0, 1.048]]),
+         np.eye(2),
+         None),
+        # TEST CASE 10 : darex #7
+        (np.array([[0.984750, -.079903, 0.0009054, -.0010765],
+                   [0.041588, 0.998990, -.0358550, 0.0126840],
+                   [-.546620, 0.044916, -.3299100, 0.1931800],
+                   [2.662400, -.100450, -.9245500, -.2632500]]),
+         np.array([[0.0037112, 0.0007361],
+                   [-.0870510, 9.3411e-6],
+                   [-1.198440, -4.1378e-4],
+                   [-3.192700, 9.2535e-4]]),
+         np.eye(4)*1e-2,
+         np.eye(2),
+         None),
+        # TEST CASE 11 : darex #8
+        (np.array([[-0.6000000, -2.2000000, -3.6000000, -5.4000180],
+                   [1.0000000, 0.6000000, 0.8000000, 3.3999820],
+                   [0.0000000, 1.0000000, 1.8000000, 3.7999820],
+                   [0.0000000, 0.0000000, 0.0000000, -0.9999820]]),
+         np.array([[1.0, -1.0, -1.0, -1.0],
+                   [0.0, 1.0, -1.0, -1.0],
+                   [0.0, 0.0, 1.0, -1.0],
+                   [0.0, 0.0, 0.0, 1.0]]),
+         np.array([[2, 1, 3, 6],
+                   [1, 2, 2, 5],
+                   [3, 2, 6, 11],
+                   [6, 5, 11, 22]]),
+         np.eye(4),
+         None),
+        # TEST CASE 12 : darex #9
+        (np.array([[95.4070, 1.9643, 0.3597, 0.0673, 0.0190],
+                   [40.8490, 41.3170, 16.0840, 4.4679, 1.1971],
+                   [12.2170, 26.3260, 36.1490, 15.9300, 12.3830],
+                   [4.1118, 12.8580, 27.2090, 21.4420, 40.9760],
+                   [0.1305, 0.5808, 1.8750, 3.6162, 94.2800]]) * 0.01,
+         np.array([[0.0434, -0.0122],
+                   [2.6606, -1.0453],
+                   [3.7530, -5.5100],
+                   [3.6076, -6.6000],
+                   [0.4617, -0.9148]]) * 0.01,
+         np.eye(5),
+         np.eye(2),
+         None),
+        # TEST CASE 13 : darex #10
+        (np.kron(np.eye(2), np.diag([1, 1], k=1)),
+         np.kron(np.eye(2), np.array([[0], [0], [1]])),
+         np.array([[1, 1, 0, 0, 0, 0],
+                   [1, 1, 0, 0, 0, 0],
+                   [0, 0, 0, 0, 0, 0],
+                   [0, 0, 0, 1, -1, 0],
+                   [0, 0, 0, -1, 1, 0],
+                   [0, 0, 0, 0, 0, 0]]),
+         np.array([[3, 0], [0, 1]]),
+         None),
+        # TEST CASE 14 : darex #11
+        (0.001 * np.array(
+         [[870.1, 135.0, 11.59, .5014, -37.22, .3484, 0, 4.242, 7.249],
+          [76.55, 897.4, 12.72, 0.5504, -40.16, .3743, 0, 4.53, 7.499],
+          [-127.2, 357.5, 817, 1.455, -102.8, .987, 0, 11.85, 18.72],
+          [-363.5, 633.9, 74.91, 796.6, -273.5, 2.653, 0, 31.72, 48.82],
+          [-960, 1645.9, -128.9, -5.597, 71.42, 7.108, 0, 84.52, 125.9],
+          [-664.4, 112.96, -88.89, -3.854, 84.47, 13.6, 0, 144.3, 101.6],
+          [-410.2, 693, -54.71, -2.371, 66.49, 12.49, .1063, 99.97, 69.67],
+          [-179.9, 301.7, -23.93, -1.035, 60.59, 22.16, 0, 213.9, 35.54],
+          [-345.1, 580.4, -45.96, -1.989, 105.6, 19.86, 0, 219.1, 215.2]]),
+         np.array([[4.7600, -0.5701, -83.6800],
+                   [0.8790, -4.7730, -2.7300],
+                   [1.4820, -13.1200, 8.8760],
+                   [3.8920, -35.1300, 24.8000],
+                   [10.3400, -92.7500, 66.8000],
+                   [7.2030, -61.5900, 38.3400],
+                   [4.4540, -36.8300, 20.2900],
+                   [1.9710, -15.5400, 6.9370],
+                   [3.7730, -30.2800, 14.6900]]) * 0.001,
+         np.diag([50, 0, 0, 0, 50, 0, 0, 0, 0]),
+         np.eye(3),
+         None),
+        # TEST CASE 15 : darex #12 - numerically least accurate example
+        (np.array([[0, 1e6], [0, 0]]),
+         np.array([[0], [1]]),
+         np.eye(2),
+         np.array([[1]]),
+        None),
+        # TEST CASE 16 : darex #13
+        (np.array([[16, 10, -2],
+                  [10, 13, -8],
+                  [-2, -8, 7]]) * (1/9),
+         np.eye(3),
+         1e6 * np.eye(3),
+         1e6 * np.eye(3),
+        None),
+        # TEST CASE 17 : darex #14
+        (np.array([[1 - 1/1e8, 0, 0, 0],
+                  [1, 0, 0, 0],
+                  [0, 1, 0, 0],
+                  [0, 0, 1, 0]]),
+         np.array([[1e-08], [0], [0], [0]]),
+         np.diag([0, 0, 0, 1]),
+         np.array([[0.25]]),
+         None),
+        # TEST CASE 18 : darex #15
+        (np.eye(100, k=1),
+         np.flipud(np.eye(100, 1)),
+         np.eye(100),
+         np.array([[1]]),
+         None)
+        ]
+
+    # Makes the minimum precision requirements customized to the test.
+    # Here numbers represent the number of decimals that agrees with zero
+    # matrix when the solution x is plugged in to the equation.
+    #
+    # res = array([[8e-3,1e-16],[1e-16,1e-20]]) --> min_decimal[k] = 2
+    #
+    # If the test is failing use "None" for that entry.
+    #
+    min_decimal = (12, 14, 13, 14, 13, 16, 18, 14, 14, 13,
+                   14, 13, 13, 14, 12, 2, 4, 6, 10)
+    max_tol = [1.5 * 10**-ind for ind in min_decimal]
+    # relaxed tolerance in gh-18012 after bump to OpenBLAS
+    max_tol[11] = 2.5e-13
+
+    # relaxed tolerance in gh-20335 for linux-aarch64 build on Cirrus
+    # with OpenBLAS from ubuntu jammy
+    max_tol[15] = 2.0e-2
+
+    # relaxed tolerance in gh-20335 for OpenBLAS 3.20 on ubuntu jammy
+    # bump not needed for OpenBLAS 3.26
+    max_tol[16] = 2.0e-4
+
+    @pytest.mark.parametrize("j, case", enumerate(cases))
+    def test_solve_discrete_are(self, j, case):
+        """Checks if X = A'XA-(A'XB)(R+B'XB)^-1(B'XA)+Q) is true"""
+        a, b, q, r, knownfailure = case
+        if knownfailure:
+            pytest.xfail(reason=knownfailure)
+
+        atol = self.max_tol[j]
+
+        x = solve_discrete_are(a, b, q, r)
+        bH = b.conj().T
+        xa, xb = x @ a, x @ b
+
+        res = a.conj().T @ xa - x + q
+        res -= a.conj().T @ xb @ (solve(r + bH @ xb, bH) @ xa)
+
+        # changed from
+        # assert_array_almost_equal(res, np.zeros_like(res), decimal=dec)
+        # in gh-18012 as it's easier to relax a tolerance and allclose is
+        # preferred
+        assert_allclose(res, np.zeros_like(res), atol=atol)
+
+    def test_infeasible(self):
+        # An infeasible example taken from https://arxiv.org/abs/1505.04861v1
+        A = np.triu(np.ones((3, 3)))
+        A[0, 1] = -1
+        B = np.array([[1, 1, 0], [0, 0, 1]]).T
+        Q = np.full_like(A, -2) + np.diag([8, -1, -1.9])
+        R = np.diag([-10, 0.1])
+        assert_raises(LinAlgError, solve_continuous_are, A, B, Q, R)
+
+
+def test_solve_generalized_continuous_are():
+    cases = [
+        # Two random examples differ by s term
+        # in the absence of any literature for demanding examples.
+        (np.array([[2.769230e-01, 8.234578e-01, 9.502220e-01],
+                   [4.617139e-02, 6.948286e-01, 3.444608e-02],
+                   [9.713178e-02, 3.170995e-01, 4.387444e-01]]),
+         np.array([[3.815585e-01, 1.868726e-01],
+                   [7.655168e-01, 4.897644e-01],
+                   [7.951999e-01, 4.455862e-01]]),
+         np.eye(3),
+         np.eye(2),
+         np.array([[6.463130e-01, 2.760251e-01, 1.626117e-01],
+                   [7.093648e-01, 6.797027e-01, 1.189977e-01],
+                   [7.546867e-01, 6.550980e-01, 4.983641e-01]]),
+         np.zeros((3, 2)),
+         None),
+        (np.array([[2.769230e-01, 8.234578e-01, 9.502220e-01],
+                   [4.617139e-02, 6.948286e-01, 3.444608e-02],
+                   [9.713178e-02, 3.170995e-01, 4.387444e-01]]),
+         np.array([[3.815585e-01, 1.868726e-01],
+                   [7.655168e-01, 4.897644e-01],
+                   [7.951999e-01, 4.455862e-01]]),
+         np.eye(3),
+         np.eye(2),
+         np.array([[6.463130e-01, 2.760251e-01, 1.626117e-01],
+                   [7.093648e-01, 6.797027e-01, 1.189977e-01],
+                   [7.546867e-01, 6.550980e-01, 4.983641e-01]]),
+         np.ones((3, 2)),
+         None)
+        ]
+
+    min_decimal = (10, 10)
+
+    def _test_factory(case, dec):
+        """Checks if X = A'XA-(A'XB)(R+B'XB)^-1(B'XA)+Q) is true"""
+        a, b, q, r, e, s, knownfailure = case
+        if knownfailure:
+            pytest.xfail(reason=knownfailure)
+
+        x = solve_continuous_are(a, b, q, r, e, s)
+        res = a.conj().T.dot(x.dot(e)) + e.conj().T.dot(x.dot(a)) + q
+        out_fact = e.conj().T.dot(x).dot(b) + s
+        res -= out_fact.dot(solve(np.atleast_2d(r), out_fact.conj().T))
+        assert_array_almost_equal(res, np.zeros_like(res), decimal=dec)
+
+    for ind, case in enumerate(cases):
+        _test_factory(case, min_decimal[ind])
+
+
+def test_solve_generalized_discrete_are():
+    mat20170120 = _load_data('gendare_20170120_data.npz')
+
+    cases = [
+        # Two random examples differ by s term
+        # in the absence of any literature for demanding examples.
+        (np.array([[2.769230e-01, 8.234578e-01, 9.502220e-01],
+                   [4.617139e-02, 6.948286e-01, 3.444608e-02],
+                   [9.713178e-02, 3.170995e-01, 4.387444e-01]]),
+         np.array([[3.815585e-01, 1.868726e-01],
+                   [7.655168e-01, 4.897644e-01],
+                   [7.951999e-01, 4.455862e-01]]),
+         np.eye(3),
+         np.eye(2),
+         np.array([[6.463130e-01, 2.760251e-01, 1.626117e-01],
+                   [7.093648e-01, 6.797027e-01, 1.189977e-01],
+                   [7.546867e-01, 6.550980e-01, 4.983641e-01]]),
+         np.zeros((3, 2)),
+         None),
+        (np.array([[2.769230e-01, 8.234578e-01, 9.502220e-01],
+                   [4.617139e-02, 6.948286e-01, 3.444608e-02],
+                   [9.713178e-02, 3.170995e-01, 4.387444e-01]]),
+         np.array([[3.815585e-01, 1.868726e-01],
+                   [7.655168e-01, 4.897644e-01],
+                   [7.951999e-01, 4.455862e-01]]),
+         np.eye(3),
+         np.eye(2),
+         np.array([[6.463130e-01, 2.760251e-01, 1.626117e-01],
+                   [7.093648e-01, 6.797027e-01, 1.189977e-01],
+                   [7.546867e-01, 6.550980e-01, 4.983641e-01]]),
+         np.ones((3, 2)),
+         None),
+        # user-reported (under PR-6616) 20-Jan-2017
+        # tests against the case where E is None but S is provided
+        (mat20170120['A'],
+         mat20170120['B'],
+         mat20170120['Q'],
+         mat20170120['R'],
+         None,
+         mat20170120['S'],
+         None),
+        ]
+
+    max_atol = (1.5e-11, 1.5e-11, 3.5e-16)
+
+    def _test_factory(case, atol):
+        """Checks if X = A'XA-(A'XB)(R+B'XB)^-1(B'XA)+Q) is true"""
+        a, b, q, r, e, s, knownfailure = case
+        if knownfailure:
+            pytest.xfail(reason=knownfailure)
+
+        x = solve_discrete_are(a, b, q, r, e, s)
+        if e is None:
+            e = np.eye(a.shape[0])
+        if s is None:
+            s = np.zeros_like(b)
+        res = a.conj().T.dot(x.dot(a)) - e.conj().T.dot(x.dot(e)) + q
+        res -= (a.conj().T.dot(x.dot(b)) + s).dot(
+                    solve(r+b.conj().T.dot(x.dot(b)),
+                          (b.conj().T.dot(x.dot(a)) + s.conj().T)
+                          )
+                )
+        # changed from:
+        # assert_array_almost_equal(res, np.zeros_like(res), decimal=dec)
+        # in gh-17950 because of a Linux 32 bit fail.
+        assert_allclose(res, np.zeros_like(res), atol=atol)
+
+    for ind, case in enumerate(cases):
+        _test_factory(case, max_atol[ind])
+
+
+def test_are_validate_args():
+
+    def test_square_shape():
+        nsq = np.ones((3, 2))
+        sq = np.eye(3)
+        for x in (solve_continuous_are, solve_discrete_are):
+            assert_raises(ValueError, x, nsq, 1, 1, 1)
+            assert_raises(ValueError, x, sq, sq, nsq, 1)
+            assert_raises(ValueError, x, sq, sq, sq, nsq)
+            assert_raises(ValueError, x, sq, sq, sq, sq, nsq)
+
+    def test_compatible_sizes():
+        nsq = np.ones((3, 2))
+        sq = np.eye(4)
+        for x in (solve_continuous_are, solve_discrete_are):
+            assert_raises(ValueError, x, sq, nsq, 1, 1)
+            assert_raises(ValueError, x, sq, sq, sq, sq, sq, nsq)
+            assert_raises(ValueError, x, sq, sq, np.eye(3), sq)
+            assert_raises(ValueError, x, sq, sq, sq, np.eye(3))
+            assert_raises(ValueError, x, sq, sq, sq, sq, np.eye(3))
+
+    def test_symmetry():
+        nsym = np.arange(9).reshape(3, 3)
+        sym = np.eye(3)
+        for x in (solve_continuous_are, solve_discrete_are):
+            assert_raises(ValueError, x, sym, sym, nsym, sym)
+            assert_raises(ValueError, x, sym, sym, sym, nsym)
+
+    def test_singularity():
+        sing = np.full((3, 3), 1e12)
+        sing[2, 2] -= 1
+        sq = np.eye(3)
+        for x in (solve_continuous_are, solve_discrete_are):
+            assert_raises(ValueError, x, sq, sq, sq, sq, sing)
+
+        assert_raises(ValueError, solve_continuous_are, sq, sq, sq, sing)
+
+    def test_finiteness():
+        nm = np.full((2, 2), np.nan)
+        sq = np.eye(2)
+        for x in (solve_continuous_are, solve_discrete_are):
+            assert_raises(ValueError, x, nm, sq, sq, sq)
+            assert_raises(ValueError, x, sq, nm, sq, sq)
+            assert_raises(ValueError, x, sq, sq, nm, sq)
+            assert_raises(ValueError, x, sq, sq, sq, nm)
+            assert_raises(ValueError, x, sq, sq, sq, sq, nm)
+            assert_raises(ValueError, x, sq, sq, sq, sq, sq, nm)
+
+
+class TestSolveSylvester:
+    cases = [
+        # empty cases
+        (np.empty((0, 0)),
+         np.empty((0, 0)),
+         np.empty((0, 0))),
+         (np.empty((0, 0)),
+         np.empty((2, 2)),
+         np.empty((0, 2))),
+         (np.empty((2, 2)),
+         np.empty((0, 0)),
+         np.empty((2, 0))),
+        # a, b, c all real.
+        (np.array([[1, 2], [0, 4]]),
+         np.array([[5, 6], [0, 8]]),
+         np.array([[9, 10], [11, 12]])),
+        # a, b, c all real, 4x4. a and b have non-trivial 2x2 blocks in their
+        # quasi-triangular form.
+        (np.array([[1.0, 0, 0, 0],
+                   [0, 1.0, 2.0, 0.0],
+                   [0, 0, 3.0, -4],
+                   [0, 0, 2, 5]]),
+         np.array([[2.0, 0, 0, 1.0],
+                   [0, 1.0, 0.0, 0.0],
+                   [0, 0, 1.0, -1],
+                   [0, 0, 1, 1]]),
+         np.array([[1.0, 0, 0, 0],
+                   [0, 1.0, 0, 0],
+                   [0, 0, 1.0, 0],
+                   [0, 0, 0, 1.0]])),
+        # a, b, c all complex.
+        (np.array([[1.0+1j, 2.0], [3.0-4.0j, 5.0]]),
+         np.array([[-1.0, 2j], [3.0, 4.0]]),
+         np.array([[2.0-2j, 2.0+2j], [-1.0-1j, 2.0]])),
+        # a and b real; c complex.
+        (np.array([[1.0, 2.0], [3.0, 5.0]]),
+         np.array([[-1.0, 0], [3.0, 4.0]]),
+         np.array([[2.0-2j, 2.0+2j], [-1.0-1j, 2.0]])),
+        # a and c complex; b real.
+        (np.array([[1.0+1j, 2.0], [3.0-4.0j, 5.0]]),
+         np.array([[-1.0, 0], [3.0, 4.0]]),
+         np.array([[2.0-2j, 2.0+2j], [-1.0-1j, 2.0]])),
+        # a complex; b and c real.
+        (np.array([[1.0+1j, 2.0], [3.0-4.0j, 5.0]]),
+         np.array([[-1.0, 0], [3.0, 4.0]]),
+         np.array([[2.0, 2.0], [-1.0, 2.0]])),
+        # not square matrices, real
+        (np.array([[8, 1, 6], [3, 5, 7], [4, 9, 2]]),
+         np.array([[2, 3], [4, 5]]),
+         np.array([[1, 2], [3, 4], [5, 6]])),
+        # not square matrices, complex
+        (np.array([[8, 1j, 6+2j], [3, 5, 7], [4, 9, 2]]),
+         np.array([[2, 3], [4, 5-1j]]),
+         np.array([[1, 2j], [3, 4j], [5j, 6+7j]])),
+    ]
+
+    def check_case(self, a, b, c):
+        x = solve_sylvester(a, b, c)
+        assert_array_almost_equal(np.dot(a, x) + np.dot(x, b), c)
+
+    def test_cases(self):
+        for case in self.cases:
+            self.check_case(case[0], case[1], case[2])
+
+    def test_trivial(self):
+        a = np.array([[1.0, 0.0], [0.0, 1.0]])
+        b = np.array([[1.0]])
+        c = np.array([2.0, 2.0]).reshape(-1, 1)
+        x = solve_sylvester(a, b, c)
+        assert_array_almost_equal(x, np.array([1.0, 1.0]).reshape(-1, 1))
+
+    # Feel free to adjust this to test fewer dtypes or random selections rather than
+    # the Cartesian product. It doesn't take very long to test all combinations,
+    # though, so we'll start there and trim it down as we see fit.
+    @pytest.mark.parametrize("dtype_a", dtypes)
+    @pytest.mark.parametrize("dtype_b", dtypes)
+    @pytest.mark.parametrize("dtype_q", dtypes)
+    @pytest.mark.parametrize("m", [0, 3])
+    @pytest.mark.parametrize("n", [0, 3])
+    def test_size_0(self, m, n, dtype_a, dtype_b, dtype_q):
+        if m == n != 0:
+            pytest.skip('m = n != 0 is not a case that needs to be tested here.')
+
+        rng = np.random.default_rng(598435298262546)
+
+        a = np.zeros((m, m), dtype=dtype_a)
+        b = np.zeros((n, n), dtype=dtype_b)
+        q = np.zeros((m, n), dtype=dtype_q)
+        res = solve_sylvester(a, b, q)
+
+        a = (rng.random((5, 5))*100).astype(dtype_a)
+        b = (rng.random((6, 6))*100).astype(dtype_b)
+        q = (rng.random((5, 6))*100).astype(dtype_q)
+        ref = solve_sylvester(a, b, q)
+
+        assert res.shape == (m, n)
+        assert res.dtype == ref.dtype
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_special_matrices.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_special_matrices.py
new file mode 100644
index 0000000000000000000000000000000000000000..d32e7ed4b4016924c60b3ed6287888a0372e8791
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/linalg/tests/test_special_matrices.py
@@ -0,0 +1,640 @@
+import pytest
+import numpy as np
+from numpy import arange, array, eye, copy, sqrt
+from numpy.testing import (assert_equal, assert_array_equal,
+                           assert_array_almost_equal, assert_allclose)
+from pytest import raises as assert_raises
+
+from scipy.fft import fft
+from scipy.special import comb
+from scipy.linalg import (toeplitz, hankel, circulant, hadamard, leslie, dft,
+                          companion, kron, block_diag,
+                          helmert, hilbert, invhilbert, pascal, invpascal,
+                          fiedler, fiedler_companion, eigvals,
+                          convolution_matrix)
+from numpy.linalg import cond
+
+
+class TestToeplitz:
+
+    def test_basic(self):
+        y = toeplitz([1, 2, 3])
+        assert_array_equal(y, [[1, 2, 3], [2, 1, 2], [3, 2, 1]])
+        y = toeplitz([1, 2, 3], [1, 4, 5])
+        assert_array_equal(y, [[1, 4, 5], [2, 1, 4], [3, 2, 1]])
+
+    def test_complex_01(self):
+        data = (1.0 + arange(3.0)) * (1.0 + 1.0j)
+        x = copy(data)
+        t = toeplitz(x)
+        # Calling toeplitz should not change x.
+        assert_array_equal(x, data)
+        # According to the docstring, x should be the first column of t.
+        col0 = t[:, 0]
+        assert_array_equal(col0, data)
+        assert_array_equal(t[0, 1:], data[1:].conj())
+
+    def test_scalar_00(self):
+        """Scalar arguments still produce a 2D array."""
+        t = toeplitz(10)
+        assert_array_equal(t, [[10]])
+        t = toeplitz(10, 20)
+        assert_array_equal(t, [[10]])
+
+    def test_scalar_01(self):
+        c = array([1, 2, 3])
+        t = toeplitz(c, 1)
+        assert_array_equal(t, [[1], [2], [3]])
+
+    def test_scalar_02(self):
+        c = array([1, 2, 3])
+        t = toeplitz(c, array(1))
+        assert_array_equal(t, [[1], [2], [3]])
+
+    def test_scalar_03(self):
+        c = array([1, 2, 3])
+        t = toeplitz(c, array([1]))
+        assert_array_equal(t, [[1], [2], [3]])
+
+    def test_scalar_04(self):
+        r = array([10, 2, 3])
+        t = toeplitz(1, r)
+        assert_array_equal(t, [[1, 2, 3]])
+
+
+class TestHankel:
+    def test_basic(self):
+        y = hankel([1, 2, 3])
+        assert_array_equal(y, [[1, 2, 3], [2, 3, 0], [3, 0, 0]])
+        y = hankel([1, 2, 3], [3, 4, 5])
+        assert_array_equal(y, [[1, 2, 3], [2, 3, 4], [3, 4, 5]])
+
+
+class TestCirculant:
+    def test_basic(self):
+        y = circulant([1, 2, 3])
+        assert_array_equal(y, [[1, 3, 2], [2, 1, 3], [3, 2, 1]])
+
+
+class TestHadamard:
+
+    def test_basic(self):
+
+        y = hadamard(1)
+        assert_array_equal(y, [[1]])
+
+        y = hadamard(2, dtype=float)
+        assert_array_equal(y, [[1.0, 1.0], [1.0, -1.0]])
+
+        y = hadamard(4)
+        assert_array_equal(y, [[1, 1, 1, 1],
+                               [1, -1, 1, -1],
+                               [1, 1, -1, -1],
+                               [1, -1, -1, 1]])
+
+        assert_raises(ValueError, hadamard, 0)
+        assert_raises(ValueError, hadamard, 5)
+
+
+class TestLeslie:
+
+    def test_bad_shapes(self):
+        assert_raises(ValueError, leslie, [[1, 1], [2, 2]], [3, 4, 5])
+        assert_raises(ValueError, leslie, [1, 2], [1, 2])
+        assert_raises(ValueError, leslie, [1], [])
+
+    def test_basic(self):
+        a = leslie([1, 2, 3], [0.25, 0.5])
+        expected = array([[1.0, 2.0, 3.0],
+                          [0.25, 0.0, 0.0],
+                          [0.0, 0.5, 0.0]])
+        assert_array_equal(a, expected)
+
+
+class TestCompanion:
+
+    def test_bad_shapes(self):
+        assert_raises(ValueError, companion, [0, 4, 5])
+        assert_raises(ValueError, companion, [1])
+        assert_raises(ValueError, companion, [])
+
+    def test_basic(self):
+        c = companion([1, 2, 3])
+        expected = array([
+            [-2.0, -3.0],
+            [1.0, 0.0]])
+        assert_array_equal(c, expected)
+
+        c = companion([2.0, 5.0, -10.0])
+        expected = array([
+            [-2.5, 5.0],
+            [1.0, 0.0]])
+        assert_array_equal(c, expected)
+
+        c = companion([(1.0, 2.0, 3.0),
+                       (4.0, 5.0, 6.0)])
+        expected = array([
+            ([-2.00, -3.00],
+             [+1.00, +0.00]),
+            ([-1.25, -1.50],
+             [+1.00, +0.00])
+        ])
+        assert_array_equal(c, expected)
+
+
+class TestBlockDiag:
+    def test_basic(self):
+        x = block_diag(eye(2), [[1, 2], [3, 4], [5, 6]], [[1, 2, 3]])
+        assert_array_equal(x, [[1, 0, 0, 0, 0, 0, 0],
+                               [0, 1, 0, 0, 0, 0, 0],
+                               [0, 0, 1, 2, 0, 0, 0],
+                               [0, 0, 3, 4, 0, 0, 0],
+                               [0, 0, 5, 6, 0, 0, 0],
+                               [0, 0, 0, 0, 1, 2, 3]])
+
+    def test_dtype(self):
+        x = block_diag([[1.5]])
+        assert_equal(x.dtype, float)
+
+        x = block_diag([[True]])
+        assert_equal(x.dtype, bool)
+
+    def test_mixed_dtypes(self):
+        actual = block_diag([[1]], [[1j]])
+        desired = np.array([[1, 0], [0, 1j]])
+        assert_array_equal(actual, desired)
+
+    def test_scalar_and_1d_args(self):
+        a = block_diag(1)
+        assert_equal(a.shape, (1, 1))
+        assert_array_equal(a, [[1]])
+
+        a = block_diag([2, 3], 4)
+        assert_array_equal(a, [[2, 3, 0], [0, 0, 4]])
+
+    def test_bad_arg(self):
+        assert_raises(ValueError, block_diag, [[[1]]])
+
+    def test_no_args(self):
+        a = block_diag()
+        assert_equal(a.ndim, 2)
+        assert_equal(a.nbytes, 0)
+
+    def test_empty_matrix_arg(self):
+        # regression test for gh-4596: check the shape of the result
+        # for empty matrix inputs. Empty matrices are no longer ignored
+        # (gh-4908) it is viewed as a shape (1, 0) matrix.
+        a = block_diag([[1, 0], [0, 1]],
+                       [],
+                       [[2, 3], [4, 5], [6, 7]])
+        assert_array_equal(a, [[1, 0, 0, 0],
+                               [0, 1, 0, 0],
+                               [0, 0, 0, 0],
+                               [0, 0, 2, 3],
+                               [0, 0, 4, 5],
+                               [0, 0, 6, 7]])
+
+    def test_zerosized_matrix_arg(self):
+        # test for gh-4908: check the shape of the result for
+        # zero-sized matrix inputs, i.e. matrices with shape (0,n) or (n,0).
+        # note that [[]] takes shape (1,0)
+        a = block_diag([[1, 0], [0, 1]],
+                       [[]],
+                       [[2, 3], [4, 5], [6, 7]],
+                       np.zeros([0, 2], dtype='int32'))
+        assert_array_equal(a, [[1, 0, 0, 0, 0, 0],
+                               [0, 1, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0],
+                               [0, 0, 2, 3, 0, 0],
+                               [0, 0, 4, 5, 0, 0],
+                               [0, 0, 6, 7, 0, 0]])
+
+
+class TestKron:
+    @pytest.mark.thread_unsafe
+    def test_dep(self):
+        with pytest.deprecated_call(match="`kron`"):
+            kron(np.array([[1, 2],[3, 4]]),np.array([[1, 1, 1]]))
+
+    @pytest.mark.filterwarnings('ignore::DeprecationWarning')
+    def test_basic(self):
+
+        a = kron(array([[1, 2], [3, 4]]), array([[1, 1, 1]]))
+        assert_array_equal(a, array([[1, 1, 1, 2, 2, 2],
+                                     [3, 3, 3, 4, 4, 4]]))
+
+        m1 = array([[1, 2], [3, 4]])
+        m2 = array([[10], [11]])
+        a = kron(m1, m2)
+        expected = array([[10, 20],
+                          [11, 22],
+                          [30, 40],
+                          [33, 44]])
+        assert_array_equal(a, expected)
+
+    @pytest.mark.filterwarnings('ignore::DeprecationWarning')
+    def test_empty(self):
+        m1 = np.empty((0, 2))
+        m2 = np.empty((1, 3))
+        a = kron(m1, m2)
+        assert_allclose(a, np.empty((0, 6)))
+
+
+class TestHelmert:
+
+    def test_orthogonality(self):
+        for n in range(1, 7):
+            H = helmert(n, full=True)
+            Id = np.eye(n)
+            assert_allclose(H.dot(H.T), Id, atol=1e-12)
+            assert_allclose(H.T.dot(H), Id, atol=1e-12)
+
+    def test_subspace(self):
+        for n in range(2, 7):
+            H_full = helmert(n, full=True)
+            H_partial = helmert(n)
+            for U in H_full[1:, :].T, H_partial.T:
+                C = np.eye(n) - np.full((n, n), 1 / n)
+                assert_allclose(U.dot(U.T), C)
+                assert_allclose(U.T.dot(U), np.eye(n-1), atol=1e-12)
+
+
+class TestHilbert:
+
+    def test_basic(self):
+        h3 = array([[1.0, 1/2., 1/3.],
+                    [1/2., 1/3., 1/4.],
+                    [1/3., 1/4., 1/5.]])
+        assert_array_almost_equal(hilbert(3), h3)
+
+        assert_array_equal(hilbert(1), [[1.0]])
+
+        h0 = hilbert(0)
+        assert_equal(h0.shape, (0, 0))
+
+
+class TestInvHilbert:
+
+    def test_basic(self):
+        invh1 = array([[1]])
+        assert_array_equal(invhilbert(1, exact=True), invh1)
+        assert_array_equal(invhilbert(1), invh1)
+
+        invh2 = array([[4, -6],
+                       [-6, 12]])
+        assert_array_equal(invhilbert(2, exact=True), invh2)
+        assert_array_almost_equal(invhilbert(2), invh2)
+
+        invh3 = array([[9, -36, 30],
+                       [-36, 192, -180],
+                       [30, -180, 180]])
+        assert_array_equal(invhilbert(3, exact=True), invh3)
+        assert_array_almost_equal(invhilbert(3), invh3)
+
+        invh4 = array([[16, -120, 240, -140],
+                       [-120, 1200, -2700, 1680],
+                       [240, -2700, 6480, -4200],
+                       [-140, 1680, -4200, 2800]])
+        assert_array_equal(invhilbert(4, exact=True), invh4)
+        assert_array_almost_equal(invhilbert(4), invh4)
+
+        invh5 = array([[25, -300, 1050, -1400, 630],
+                       [-300, 4800, -18900, 26880, -12600],
+                       [1050, -18900, 79380, -117600, 56700],
+                       [-1400, 26880, -117600, 179200, -88200],
+                       [630, -12600, 56700, -88200, 44100]])
+        assert_array_equal(invhilbert(5, exact=True), invh5)
+        assert_array_almost_equal(invhilbert(5), invh5)
+
+        invh17 = array([
+            [289, -41616, 1976760, -46124400, 629598060, -5540462928,
+             33374693352, -143034400080, 446982500250, -1033026222800,
+             1774926873720, -2258997839280, 2099709530100, -1384423866000,
+             613101997800, -163493866080, 19835652870],
+            [-41616, 7990272, -426980160, 10627061760, -151103534400,
+             1367702848512, -8410422724704, 36616806420480, -115857864064800,
+             270465047424000, -468580694662080, 600545887119360,
+             -561522320049600, 372133135180800, -165537539406000,
+             44316454993920, -5395297580640],
+            [1976760, -426980160, 24337869120, -630981792000, 9228108708000,
+             -85267724461920, 532660105897920, -2348052711713280,
+             7504429831470000, -17664748409880000, 30818191841236800,
+             -39732544853164800, 37341234283298400, -24857330514030000,
+             11100752642520000, -2982128117299200, 364182586693200],
+            [-46124400, 10627061760, -630981792000, 16826181120000,
+             -251209625940000, 2358021022156800, -14914482965141760,
+             66409571644416000, -214015221119700000, 507295338950400000,
+             -890303319857952000, 1153715376477081600, -1089119333262870000,
+             727848632044800000, -326170262829600000, 87894302404608000,
+             -10763618673376800],
+            [629598060, -151103534400, 9228108708000,
+             -251209625940000, 3810012660090000, -36210360321495360,
+             231343968720664800, -1038687206500944000, 3370739732635275000,
+             -8037460526495400000, 14178080368737885600, -18454939322943942000,
+             17489975175339030000, -11728977435138600000, 5272370630081100000,
+             -1424711708039692800, 174908803442373000],
+            [-5540462928, 1367702848512, -85267724461920, 2358021022156800,
+             -36210360321495360, 347619459086355456, -2239409617216035264,
+             10124803292907663360, -33052510749726468000,
+             79217210949138662400, -140362995650505067440,
+             183420385176741672960, -174433352415381259200,
+             117339159519533952000, -52892422160973595200,
+             14328529177999196160, -1763080738699119840],
+            [33374693352, -8410422724704, 532660105897920,
+             -14914482965141760, 231343968720664800, -2239409617216035264,
+             14527452132196331328, -66072377044391477760,
+             216799987176909536400, -521925895055522958000,
+             928414062734059661760, -1217424500995626443520,
+             1161358898976091015200, -783401860847777371200,
+             354015418167362952000, -96120549902411274240,
+             11851820521255194480],
+            [-143034400080, 36616806420480, -2348052711713280,
+             66409571644416000, -1038687206500944000, 10124803292907663360,
+             -66072377044391477760, 302045152202932469760,
+             -995510145200094810000, 2405996923185123840000,
+             -4294704507885446054400, 5649058909023744614400,
+             -5403874060541811254400, 3654352703663101440000,
+             -1655137020003255360000, 450325202737117593600,
+             -55630994283442749600],
+            [446982500250, -115857864064800, 7504429831470000,
+             -214015221119700000, 3370739732635275000, -33052510749726468000,
+             216799987176909536400, -995510145200094810000,
+             3293967392206196062500, -7988661659013106500000,
+             14303908928401362270000, -18866974090684772052000,
+             18093328327706957325000, -12263364009096700500000,
+             5565847995255512250000, -1517208935002984080000,
+             187754605706619279900],
+            [-1033026222800, 270465047424000, -17664748409880000,
+             507295338950400000, -8037460526495400000, 79217210949138662400,
+             -521925895055522958000, 2405996923185123840000,
+             -7988661659013106500000, 19434404971634224000000,
+             -34894474126569249192000, 46141453390504792320000,
+             -44349976506971935800000, 30121928988527376000000,
+             -13697025107665828500000, 3740200989399948902400,
+             -463591619028689580000],
+            [1774926873720, -468580694662080,
+             30818191841236800, -890303319857952000, 14178080368737885600,
+             -140362995650505067440, 928414062734059661760,
+             -4294704507885446054400, 14303908928401362270000,
+             -34894474126569249192000, 62810053427824648545600,
+             -83243376594051600326400, 80177044485212743068000,
+             -54558343880470209780000, 24851882355348879230400,
+             -6797096028813368678400, 843736746632215035600],
+            [-2258997839280, 600545887119360, -39732544853164800,
+             1153715376477081600, -18454939322943942000, 183420385176741672960,
+             -1217424500995626443520, 5649058909023744614400,
+             -18866974090684772052000, 46141453390504792320000,
+             -83243376594051600326400, 110552468520163390156800,
+             -106681852579497947388000, 72720410752415168870400,
+             -33177973900974346080000, 9087761081682520473600,
+             -1129631016152221783200],
+            [2099709530100, -561522320049600, 37341234283298400,
+             -1089119333262870000, 17489975175339030000,
+             -174433352415381259200, 1161358898976091015200,
+             -5403874060541811254400, 18093328327706957325000,
+             -44349976506971935800000, 80177044485212743068000,
+             -106681852579497947388000, 103125790826848015808400,
+             -70409051543137015800000, 32171029219823375700000,
+             -8824053728865840192000, 1098252376814660067000],
+            [-1384423866000, 372133135180800,
+             -24857330514030000, 727848632044800000, -11728977435138600000,
+             117339159519533952000, -783401860847777371200,
+             3654352703663101440000, -12263364009096700500000,
+             30121928988527376000000, -54558343880470209780000,
+             72720410752415168870400, -70409051543137015800000,
+             48142941226076592000000, -22027500987368499000000,
+             6049545098753157120000, -753830033789944188000],
+            [613101997800, -165537539406000,
+             11100752642520000, -326170262829600000, 5272370630081100000,
+             -52892422160973595200, 354015418167362952000,
+             -1655137020003255360000, 5565847995255512250000,
+             -13697025107665828500000, 24851882355348879230400,
+             -33177973900974346080000, 32171029219823375700000,
+             -22027500987368499000000, 10091416708498869000000,
+             -2774765838662800128000, 346146444087219270000],
+            [-163493866080, 44316454993920, -2982128117299200,
+             87894302404608000, -1424711708039692800,
+             14328529177999196160, -96120549902411274240,
+             450325202737117593600, -1517208935002984080000,
+             3740200989399948902400, -6797096028813368678400,
+             9087761081682520473600, -8824053728865840192000,
+             6049545098753157120000, -2774765838662800128000,
+             763806510427609497600, -95382575704033754400],
+            [19835652870, -5395297580640, 364182586693200, -10763618673376800,
+             174908803442373000, -1763080738699119840, 11851820521255194480,
+             -55630994283442749600, 187754605706619279900,
+             -463591619028689580000, 843736746632215035600,
+             -1129631016152221783200, 1098252376814660067000,
+             -753830033789944188000, 346146444087219270000,
+             -95382575704033754400, 11922821963004219300]
+        ])
+        assert_array_equal(invhilbert(17, exact=True), invh17)
+        assert_allclose(invhilbert(17), invh17.astype(float), rtol=1e-12)
+
+    def test_inverse(self):
+        for n in range(1, 10):
+            a = hilbert(n)
+            b = invhilbert(n)
+            # The Hilbert matrix is increasingly badly conditioned,
+            # so take that into account in the test
+            c = cond(a)
+            assert_allclose(a.dot(b), eye(n), atol=1e-15*c, rtol=1e-15*c)
+
+
+class TestPascal:
+
+    cases = [
+        (1, array([[1]]), array([[1]])),
+        (2, array([[1, 1],
+                   [1, 2]]),
+            array([[1, 0],
+                   [1, 1]])),
+        (3, array([[1, 1, 1],
+                   [1, 2, 3],
+                   [1, 3, 6]]),
+            array([[1, 0, 0],
+                   [1, 1, 0],
+                   [1, 2, 1]])),
+        (4, array([[1, 1, 1, 1],
+                   [1, 2, 3, 4],
+                   [1, 3, 6, 10],
+                   [1, 4, 10, 20]]),
+            array([[1, 0, 0, 0],
+                   [1, 1, 0, 0],
+                   [1, 2, 1, 0],
+                   [1, 3, 3, 1]])),
+    ]
+
+    def check_case(self, n, sym, low):
+        assert_array_equal(pascal(n), sym)
+        assert_array_equal(pascal(n, kind='lower'), low)
+        assert_array_equal(pascal(n, kind='upper'), low.T)
+        assert_array_almost_equal(pascal(n, exact=False), sym)
+        assert_array_almost_equal(pascal(n, exact=False, kind='lower'), low)
+        assert_array_almost_equal(pascal(n, exact=False, kind='upper'), low.T)
+
+    def test_cases(self):
+        for n, sym, low in self.cases:
+            self.check_case(n, sym, low)
+
+    def test_big(self):
+        p = pascal(50)
+        assert p[-1, -1] == comb(98, 49, exact=True)
+
+    def test_threshold(self):
+        # Regression test.  An early version of `pascal` returned an
+        # array of type np.uint64 for n=35, but that data type is too small
+        # to hold p[-1, -1].  The second assert_equal below would fail
+        # because p[-1, -1] overflowed.
+        p = pascal(34)
+        assert_equal(2*p.item(-1, -2), p.item(-1, -1), err_msg="n = 34")
+        p = pascal(35)
+        assert_equal(2.*p.item(-1, -2), 1.*p.item(-1, -1), err_msg="n = 35")
+
+
+def test_invpascal():
+
+    def check_invpascal(n, kind, exact):
+        ip = invpascal(n, kind=kind, exact=exact)
+        p = pascal(n, kind=kind, exact=exact)
+        # Matrix-multiply ip and p, and check that we get the identity matrix.
+        # We can't use the simple expression e = ip.dot(p), because when
+        # n < 35 and exact is True, p.dtype is np.uint64 and ip.dtype is
+        # np.int64. The product of those dtypes is np.float64, which loses
+        # precision when n is greater than 18.  Instead we'll cast both to
+        # object arrays, and then multiply.
+        e = ip.astype(object).dot(p.astype(object))
+        assert_array_equal(e, eye(n), err_msg="n=%d  kind=%r exact=%r" %
+                                              (n, kind, exact))
+
+    kinds = ['symmetric', 'lower', 'upper']
+
+    ns = [1, 2, 5, 18]
+    for n in ns:
+        for kind in kinds:
+            for exact in [True, False]:
+                check_invpascal(n, kind, exact)
+
+    ns = [19, 34, 35, 50]
+    for n in ns:
+        for kind in kinds:
+            check_invpascal(n, kind, True)
+
+
+def test_dft():
+    m = dft(2)
+    expected = array([[1.0, 1.0], [1.0, -1.0]])
+    assert_array_almost_equal(m, expected)
+    m = dft(2, scale='n')
+    assert_array_almost_equal(m, expected/2.0)
+    m = dft(2, scale='sqrtn')
+    assert_array_almost_equal(m, expected/sqrt(2.0))
+
+    x = array([0, 1, 2, 3, 4, 5, 0, 1])
+    m = dft(8)
+    mx = m.dot(x)
+    fx = fft(x)
+    assert_array_almost_equal(mx, fx)
+
+
+def test_fiedler():
+    f = fiedler([])
+    assert_equal(f.size, 0)
+    f = fiedler([123.])
+    assert_array_equal(f, np.array([[0.]]))
+    f = fiedler(np.arange(1, 7))
+    des = np.array([[0, 1, 2, 3, 4, 5],
+                    [1, 0, 1, 2, 3, 4],
+                    [2, 1, 0, 1, 2, 3],
+                    [3, 2, 1, 0, 1, 2],
+                    [4, 3, 2, 1, 0, 1],
+                    [5, 4, 3, 2, 1, 0]])
+    assert_array_equal(f, des)
+
+
+def test_fiedler_companion():
+    fc = fiedler_companion([])
+    assert_equal(fc.size, 0)
+    fc = fiedler_companion([1.])
+    assert_equal(fc.size, 0)
+    fc = fiedler_companion([1., 2.])
+    assert_array_equal(fc, np.array([[-2.]]))
+    fc = fiedler_companion([1e-12, 2., 3.])
+    assert_array_almost_equal(fc, companion([1e-12, 2., 3.]))
+    with assert_raises(ValueError):
+        fiedler_companion([0, 1, 2])
+    fc = fiedler_companion([1., -16., 86., -176., 105.])
+    assert_array_almost_equal(eigvals(fc),
+                              np.array([7., 5., 3., 1.]))
+
+
+class TestConvolutionMatrix:
+    """
+    Test convolution_matrix vs. numpy.convolve for various parameters.
+    """
+
+    def create_vector(self, n, cpx):
+        """Make a complex or real test vector of length n."""
+        x = np.linspace(-2.5, 2.2, n)
+        if cpx:
+            x = x + 1j*np.linspace(-1.5, 3.1, n)
+        return x
+
+    def test_bad_n(self):
+        # n must be a positive integer
+        with pytest.raises(ValueError, match='n must be a positive integer'):
+            convolution_matrix([1, 2, 3], 0)
+
+    def test_empty_first_arg(self):
+        # first arg must have at least one value
+        with pytest.raises(ValueError, match=r'len\(a\)'):
+            convolution_matrix([], 4)
+
+    def test_bad_mode(self):
+        # mode must be in ('full', 'valid', 'same')
+        with pytest.raises(ValueError, match='mode.*must be one of'):
+            convolution_matrix((1, 1), 4, mode='invalid argument')
+
+    @pytest.mark.parametrize('cpx', [False, True])
+    @pytest.mark.parametrize('na', [1, 2, 9])
+    @pytest.mark.parametrize('nv', [1, 2, 9])
+    @pytest.mark.parametrize('mode', [None, 'full', 'valid', 'same'])
+    def test_against_numpy_convolve(self, cpx, na, nv, mode):
+        a = self.create_vector(na, cpx)
+        v = self.create_vector(nv, cpx)
+        if mode is None:
+            y1 = np.convolve(v, a)
+            A = convolution_matrix(a, nv)
+        else:
+            y1 = np.convolve(v, a, mode)
+            A = convolution_matrix(a, nv, mode)
+        y2 = A @ v
+        assert_array_almost_equal(y1, y2)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.fail_slow(5)  # `leslie` has an import in the function
+@pytest.mark.parametrize('f, args', [(circulant, ()),
+                                     (companion, ()),
+                                     (convolution_matrix, (5, 'same')),
+                                     (fiedler, ()),
+                                     (fiedler_companion, ()),
+                                     (leslie, (np.arange(9),)),
+                                     (toeplitz, (np.arange(9),)),
+                                     ])
+def test_batch(f, args):
+    rng = np.random.default_rng(283592436523456)
+    batch_shape = (2, 3)
+    m = 10
+    A = rng.random(batch_shape + (m,))
+
+    if f in {toeplitz}:
+        message = "Beginning in SciPy 1.17, multidimensional input will be..."
+        with pytest.warns(FutureWarning, match=message):
+            f(A, *args)
+        return
+
+    res = f(A, *args)
+    ref = np.asarray([f(a, *args) for a in A.reshape(-1, m)])
+    ref = ref.reshape(A.shape[:-1] + ref.shape[-2:])
+    assert_allclose(res, ref)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..2e9d9f6ff99218088fd9e693aaca00ca8a070040
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__init__.py
@@ -0,0 +1,173 @@
+"""
+=========================================================
+Multidimensional image processing (:mod:`scipy.ndimage`)
+=========================================================
+
+.. currentmodule:: scipy.ndimage
+
+This package contains various functions for multidimensional image
+processing.
+
+
+Filters
+=======
+
+.. autosummary::
+   :toctree: generated/
+
+   convolve - Multidimensional convolution
+   convolve1d - 1-D convolution along the given axis
+   correlate - Multidimensional correlation
+   correlate1d - 1-D correlation along the given axis
+   gaussian_filter
+   gaussian_filter1d
+   gaussian_gradient_magnitude
+   gaussian_laplace
+   generic_filter - Multidimensional filter using a given function
+   generic_filter1d - 1-D generic filter along the given axis
+   generic_gradient_magnitude
+   generic_laplace
+   laplace - N-D Laplace filter based on approximate second derivatives
+   maximum_filter
+   maximum_filter1d
+   median_filter - Calculates a multidimensional median filter
+   minimum_filter
+   minimum_filter1d
+   percentile_filter - Calculates a multidimensional percentile filter
+   prewitt
+   rank_filter - Calculates a multidimensional rank filter
+   sobel
+   uniform_filter - Multidimensional uniform filter
+   uniform_filter1d - 1-D uniform filter along the given axis
+
+Fourier filters
+===============
+
+.. autosummary::
+   :toctree: generated/
+
+   fourier_ellipsoid
+   fourier_gaussian
+   fourier_shift
+   fourier_uniform
+
+Interpolation
+=============
+
+.. autosummary::
+   :toctree: generated/
+
+   affine_transform - Apply an affine transformation
+   geometric_transform - Apply an arbitrary geometric transform
+   map_coordinates - Map input array to new coordinates by interpolation
+   rotate - Rotate an array
+   shift - Shift an array
+   spline_filter
+   spline_filter1d
+   zoom - Zoom an array
+
+Measurements
+============
+
+.. autosummary::
+   :toctree: generated/
+
+   center_of_mass - The center of mass of the values of an array at labels
+   extrema - Min's and max's of an array at labels, with their positions
+   find_objects - Find objects in a labeled array
+   histogram - Histogram of the values of an array, optionally at labels
+   label - Label features in an array
+   labeled_comprehension
+   maximum
+   maximum_position
+   mean - Mean of the values of an array at labels
+   median
+   minimum
+   minimum_position
+   standard_deviation - Standard deviation of an N-D image array
+   sum_labels - Sum of the values of the array
+   value_indices - Find indices of each distinct value in given array
+   variance - Variance of the values of an N-D image array
+   watershed_ift
+
+Morphology
+==========
+
+.. autosummary::
+   :toctree: generated/
+
+   binary_closing
+   binary_dilation
+   binary_erosion
+   binary_fill_holes
+   binary_hit_or_miss
+   binary_opening
+   binary_propagation
+   black_tophat
+   distance_transform_bf
+   distance_transform_cdt
+   distance_transform_edt
+   generate_binary_structure
+   grey_closing
+   grey_dilation
+   grey_erosion
+   grey_opening
+   iterate_structure
+   morphological_gradient
+   morphological_laplace
+   white_tophat
+
+"""
+
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# bring in the public functionality from private namespaces
+
+# mypy: ignore-errors
+
+from ._support_alternative_backends import *
+
+# adjust __all__ and do not leak implementation details
+from . import _support_alternative_backends
+__all__ = _support_alternative_backends.__all__
+del _support_alternative_backends, _ndimage_api, _delegators  # noqa: F821
+
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import filters
+from . import fourier
+from . import interpolation
+from . import measurements
+from . import morphology
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0aac569c414c32f3bbe61368357b29dbc4d2ecc0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_delegators.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_delegators.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..38d702fb6357cec5fb390899c6326e0eaa96b626
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_delegators.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bc5e2afb2175c32713f03b1b51cd596d58c3c84e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_filters.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f43b6a9713f5f7a19a79c69fbdf5f58d77c76de5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_fourier.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f945c308dd486ad6ce6b34975b0a5d3b9314b86d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_interpolation.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_measurements.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_measurements.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..54be77bef792645e3cf53c48a9278f3e9c3ab00e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_measurements.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_morphology.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_morphology.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0a82281e34e6e942f8643d23112e2a22421b833b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_morphology.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ndimage_api.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ndimage_api.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b04c0f8b73beb2ac7ac01dea9e55742a9c62ddb3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ndimage_api.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_docstrings.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_docstrings.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..631f544f02d3b6edbc816736384ba07ec9989072
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_docstrings.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_support.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_support.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f985c19820b40dd1f454516580a4b699bfcbdc94
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_ni_support.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_support_alternative_backends.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_support_alternative_backends.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..accae246eab946bec4cf1a65febc18fbe761ae18
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/_support_alternative_backends.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/filters.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/filters.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c47f95a91bbf2f2c2d65d795d23de1ee2eb4a9a4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/filters.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/fourier.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/fourier.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..31e7629f2d3fc302f3e779315b835b1ed5b71d73
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/fourier.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/interpolation.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/interpolation.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..636a9682dc445a49916659f2a0387b46d5731ad1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/interpolation.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/measurements.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/measurements.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..55727d7f03de2a391a56cb865baad6c56536398a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/measurements.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/morphology.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/morphology.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8be2b7a0f5bee7dbd846277644c90e7999c8245e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/__pycache__/morphology.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ctest.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ctest.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..0d05e123ba1f7f45c1f37795e7ba5cd0257018b4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ctest.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_cytest.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_cytest.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..7898248eb4d089b5ffa726ff39de4d0ec4637272
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_cytest.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_delegators.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_delegators.py
new file mode 100644
index 0000000000000000000000000000000000000000..9647ea6456426c9a62178ff277b0f35017a8310b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_delegators.py
@@ -0,0 +1,297 @@
+"""Delegators for alternative backends in scipy.ndimage.
+
+The signature of `func_signature` must match the signature of ndimage.func.
+The job of a `func_signature` is to know which arguments of `ndimage.func`
+are arrays.
+
+* signatures are generated by
+
+--------------
+import inspect
+from scipy import ndimage
+
+names = [x for x in dir(ndimage) if not x.startswith('_')]
+objs = [getattr(ndimage, name) for name in names]
+funcs = [obj for obj in objs if inspect.isroutine(obj)]
+
+for func in funcs:
+    sig = inspect.signature(func)
+    print(f"def {func.__name__}_signature{sig}:\n\tpass\n\n")
+---------------
+
+* which arguments to delegate on: manually trawled the documentation for
+  array-like and array arguments
+
+"""
+import numpy as np
+from scipy._lib._array_api import array_namespace
+from scipy.ndimage._ni_support import _skip_if_dtype, _skip_if_int
+
+
+def affine_transform_signature(
+    input, matrix, offset=0.0, output_shape=None, output=None, *args, **kwds
+):
+    return array_namespace(input, matrix, _skip_if_dtype(output))
+
+
+def binary_closing_signature(
+    input, structure=None, iterations=1, output=None, *args, **kwds
+):
+    return array_namespace(input, structure, _skip_if_dtype(output))
+
+binary_opening_signature = binary_closing_signature
+
+
+def binary_dilation_signature(
+    input, structure=None, iterations=1, mask=None, output=None, *args, **kwds
+):
+    return array_namespace(input, structure, _skip_if_dtype(output), mask)
+
+binary_erosion_signature = binary_dilation_signature
+
+
+def binary_fill_holes_signature(
+    input, structure=None, output=None, origin=0, *args, **kwargs
+):
+    return array_namespace(input, structure, _skip_if_dtype(output))
+
+
+def label_signature(input, structure=None, output=None, origin=0):
+    return array_namespace(input, structure, _skip_if_dtype(output))
+
+
+def binary_hit_or_miss_signature(
+    input, structure1=None, structure2=None, output=None, *args, **kwds
+):
+    return array_namespace(input, structure1, structure2, _skip_if_dtype(output))
+
+
+def binary_propagation_signature(
+    input, structure=None, mask=None, output=None, *args, **kwds
+):
+    return array_namespace(input, structure, mask, _skip_if_dtype(output))
+
+
+def convolve_signature(input, weights, output=None, *args, **kwds):
+    return array_namespace(input, weights, _skip_if_dtype(output))
+
+correlate_signature = convolve_signature
+
+
+def convolve1d_signature(input, weights, axis=-1, output=None, *args, **kwds):
+    return array_namespace(input, weights, _skip_if_dtype(output))
+
+correlate1d_signature = convolve1d_signature
+
+
+def distance_transform_bf_signature(
+    input, metric='euclidean', sampling=None, return_distances=True,
+    return_indices=False, distances=None, indices=None
+):
+    return array_namespace(input, distances, indices)
+
+
+def distance_transform_cdt_signature(
+    input, metric='chessboard', return_distances=True, return_indices=False,
+    distances=None, indices=None
+):
+    return array_namespace(input, distances, indices)
+
+
+def distance_transform_edt_signature(
+    input, sampling=None, return_distances=True, return_indices=False,
+    distances=None, indices=None
+):
+    return array_namespace(input, distances, indices)
+
+
+def find_objects_signature(input, max_label=0):
+    return array_namespace(input)
+
+
+def fourier_ellipsoid_signature(input, size, n=-1, axis=-1, output=None):
+    return array_namespace(input, _skip_if_dtype(output))
+
+fourier_uniform_signature = fourier_ellipsoid_signature
+
+
+def fourier_gaussian_signature(input, sigma, n=-1, axis=-1, output=None):
+    return array_namespace(input, _skip_if_dtype(output))
+
+def fourier_shift_signature(input, shift, n=-1, axis=-1, output=None):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def gaussian_filter_signature(input, sigma, order=0, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def gaussian_filter1d_signature(
+    input, sigma, axis=-1, order=0, output=None, *args, **kwds
+):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def gaussian_gradient_magnitude_signature(input, sigma, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+gaussian_laplace_signature = gaussian_gradient_magnitude_signature
+
+
+def generate_binary_structure_signature(rank, connectivity):
+    # XXX: no input arrays; always return numpy
+    return np
+
+
+def generic_filter_signature(
+    input, function, size=None, footprint=None, output=None, *args, **kwds
+):
+    # XXX: function LowLevelCallable w/backends
+    return array_namespace(input, footprint, _skip_if_dtype(output))
+
+
+def generic_filter1d_signature(
+    input, function, filter_size, axis=-1, output=None, *args, **kwds
+):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def generic_gradient_magnitude_signature(
+    input, derivative, output=None, *args, **kwds
+):
+    # XXX: function LowLevelCallable w/backends
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def generic_laplace_signature(input, derivative2, output=None, *args, **kwds):
+    # XXX: function LowLevelCallable w/backends
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def geometric_transform_signature(
+    input, mapping, output_shape=None, output=None, *args, **kwds
+):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def histogram_signature(input, min, max, bins, labels=None, index=None):
+    return array_namespace(input, labels)
+
+
+def iterate_structure_signature(structure, iterations, origin=None):
+    return array_namespace(structure)
+
+
+def labeled_comprehension_signature(input, labels, *args, **kwds):
+    return array_namespace(input, labels)
+
+
+def laplace_signature(input, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def map_coordinates_signature(input, coordinates, output=None, *args, **kwds):
+    return array_namespace(input, coordinates, _skip_if_dtype(output))
+
+
+def maximum_filter1d_signature(input, size, axis=-1, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+minimum_filter1d_signature = maximum_filter1d_signature
+uniform_filter1d_signature = maximum_filter1d_signature
+
+
+def maximum_signature(input, labels=None, index=None):
+    return array_namespace(input, labels, _skip_if_int(index))
+
+minimum_signature = maximum_signature
+median_signature = maximum_signature
+mean_signature = maximum_signature
+variance_signature = maximum_signature
+standard_deviation_signature = maximum_signature
+sum_labels_signature = maximum_signature
+sum_signature = maximum_signature  # ndimage.sum is sum_labels
+
+maximum_position_signature = maximum_signature
+minimum_position_signature = maximum_signature
+
+extrema_signature = maximum_signature
+center_of_mass_signature = extrema_signature
+
+
+def median_filter_signature(
+    input, size=None, footprint=None, output=None, *args, **kwds
+):
+    return array_namespace(input, footprint, _skip_if_dtype(output))
+
+minimum_filter_signature = median_filter_signature
+maximum_filter_signature = median_filter_signature
+
+
+def morphological_gradient_signature(
+    input, size=None, footprint=None, structure=None, output=None, *args, **kwds
+):
+    return array_namespace(input, footprint, structure, _skip_if_dtype(output))
+
+morphological_laplace_signature = morphological_gradient_signature
+white_tophat_signature = morphological_gradient_signature
+black_tophat_signature = morphological_gradient_signature
+grey_closing_signature = morphological_gradient_signature
+grey_dilation_signature = morphological_gradient_signature
+grey_erosion_signature = morphological_gradient_signature
+grey_opening_signature = morphological_gradient_signature
+
+
+def percentile_filter_signature(
+    input, percentile, size=None, footprint=None, output=None, *args, **kwds
+):
+    return array_namespace(input, footprint, _skip_if_dtype(output))
+
+
+def prewitt_signature(input, axis=-1, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+sobel_signature = prewitt_signature
+
+
+def rank_filter_signature(
+    input, rank, size=None, footprint=None, output=None, *args, **kwds
+):
+    return array_namespace(input, footprint, _skip_if_dtype(output))
+
+
+def rotate_signature(
+    input, angle, axes=(1, 0), reshape=True, output=None , *args, **kwds
+):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def shift_signature(input, shift, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def spline_filter_signature(input, order=3, output=np.float64, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def spline_filter1d_signature(
+    input, order=3, axis=-1, output=np.float64, *args, **kwds
+):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def uniform_filter_signature(input, size=3, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
+
+def value_indices_signature(arr, *args, **kwds):
+    return array_namespace(arr)
+
+
+def watershed_ift_signature(input, markers, structure=None, output=None):
+    return array_namespace(input, markers, structure, _skip_if_dtype(output))
+
+
+def zoom_signature(input, zoom, output=None, *args, **kwds):
+    return array_namespace(input, _skip_if_dtype(output))
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_filters.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_filters.py
new file mode 100644
index 0000000000000000000000000000000000000000..710ea60c03653cc80ac3bd1eefd425b4268a5246
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_filters.py
@@ -0,0 +1,1965 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from collections.abc import Iterable
+import numbers
+import warnings
+import numpy as np
+import operator
+
+from scipy._lib._util import normalize_axis_index
+from . import _ni_support
+from . import _nd_image
+from . import _ni_docstrings
+from . import _rank_filter_1d
+
+__all__ = ['correlate1d', 'convolve1d', 'gaussian_filter1d', 'gaussian_filter',
+           'prewitt', 'sobel', 'generic_laplace', 'laplace',
+           'gaussian_laplace', 'generic_gradient_magnitude',
+           'gaussian_gradient_magnitude', 'correlate', 'convolve',
+           'uniform_filter1d', 'uniform_filter', 'minimum_filter1d',
+           'maximum_filter1d', 'minimum_filter', 'maximum_filter',
+           'rank_filter', 'median_filter', 'percentile_filter',
+           'generic_filter1d', 'generic_filter']
+
+
+def _invalid_origin(origin, lenw):
+    return (origin < -(lenw // 2)) or (origin > (lenw - 1) // 2)
+
+
+def _complex_via_real_components(func, input, weights, output, cval, **kwargs):
+    """Complex convolution via a linear combination of real convolutions."""
+    complex_input = input.dtype.kind == 'c'
+    complex_weights = weights.dtype.kind == 'c'
+    if complex_input and complex_weights:
+        # real component of the output
+        func(input.real, weights.real, output=output.real,
+             cval=np.real(cval), **kwargs)
+        output.real -= func(input.imag, weights.imag, output=None,
+                            cval=np.imag(cval), **kwargs)
+        # imaginary component of the output
+        func(input.real, weights.imag, output=output.imag,
+             cval=np.real(cval), **kwargs)
+        output.imag += func(input.imag, weights.real, output=None,
+                            cval=np.imag(cval), **kwargs)
+    elif complex_input:
+        func(input.real, weights, output=output.real, cval=np.real(cval),
+             **kwargs)
+        func(input.imag, weights, output=output.imag, cval=np.imag(cval),
+             **kwargs)
+    else:
+        if np.iscomplexobj(cval):
+            raise ValueError("Cannot provide a complex-valued cval when the "
+                             "input is real.")
+        func(input, weights.real, output=output.real, cval=cval, **kwargs)
+        func(input, weights.imag, output=output.imag, cval=cval, **kwargs)
+    return output
+
+
+def _expand_origin(ndim_image, axes, origin):
+    num_axes = len(axes)
+    origins = _ni_support._normalize_sequence(origin, num_axes)
+    if num_axes < ndim_image:
+        # set origin = 0 for any axes not being filtered
+        origins_temp = [0,] * ndim_image
+        for o, ax in zip(origins, axes):
+            origins_temp[ax] = o
+        origins = origins_temp
+    return origins
+
+
+def _expand_footprint(ndim_image, axes, footprint,
+                      footprint_name="footprint"):
+    num_axes = len(axes)
+    if num_axes < ndim_image:
+        if footprint.ndim != num_axes:
+            raise RuntimeError(f"{footprint_name}.ndim ({footprint.ndim}) "
+                               f"must match len(axes) ({num_axes})")
+
+        footprint = np.expand_dims(
+            footprint,
+            tuple(ax for ax in range(ndim_image) if ax not in axes)
+        )
+    return footprint
+
+
+def _expand_mode(ndim_image, axes, mode):
+    num_axes = len(axes)
+    if not isinstance(mode, str) and isinstance(mode, Iterable):
+        # set mode = 'constant' for any axes not being filtered
+        modes = _ni_support._normalize_sequence(mode, num_axes)
+        modes_temp = ['constant'] * ndim_image
+        for m, ax in zip(modes, axes):
+            modes_temp[ax] = m
+        mode = modes_temp
+    return mode
+
+
+@_ni_docstrings.docfiller
+def correlate1d(input, weights, axis=-1, output=None, mode="reflect",
+                cval=0.0, origin=0):
+    """Calculate a 1-D correlation along the given axis.
+
+    The lines of the array along the given axis are correlated with the
+    given weights.
+
+    Parameters
+    ----------
+    %(input)s
+    weights : array
+        1-D sequence of numbers.
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+
+    Returns
+    -------
+    result : ndarray
+        Correlation result. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy.ndimage import correlate1d
+    >>> correlate1d([2, 8, 0, 4, 1, 9, 9, 0], weights=[1, 3])
+    array([ 8, 26,  8, 12,  7, 28, 36,  9])
+    """
+    input = np.asarray(input)
+    weights = np.asarray(weights)
+    complex_input = input.dtype.kind == 'c'
+    complex_weights = weights.dtype.kind == 'c'
+    if complex_input or complex_weights:
+        if complex_weights:
+            weights = weights.conj()
+            weights = weights.astype(np.complex128, copy=False)
+        kwargs = dict(axis=axis, mode=mode, origin=origin)
+        output = _ni_support._get_output(output, input, complex_output=True)
+        return _complex_via_real_components(correlate1d, input, weights,
+                                            output, cval, **kwargs)
+
+    output = _ni_support._get_output(output, input)
+    weights = np.asarray(weights, dtype=np.float64)
+    if weights.ndim != 1 or weights.shape[0] < 1:
+        raise RuntimeError('no filter weights given')
+    if not weights.flags.contiguous:
+        weights = weights.copy()
+    axis = normalize_axis_index(axis, input.ndim)
+    if _invalid_origin(origin, len(weights)):
+        raise ValueError('Invalid origin; origin must satisfy '
+                         '-(len(weights) // 2) <= origin <= '
+                         '(len(weights)-1) // 2')
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.correlate1d(input, weights, axis, output, mode, cval,
+                          origin)
+    return output
+
+
+@_ni_docstrings.docfiller
+def convolve1d(input, weights, axis=-1, output=None, mode="reflect",
+               cval=0.0, origin=0):
+    """Calculate a 1-D convolution along the given axis.
+
+    The lines of the array along the given axis are convolved with the
+    given weights.
+
+    Parameters
+    ----------
+    %(input)s
+    weights : ndarray
+        1-D sequence of numbers.
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+
+    Returns
+    -------
+    convolve1d : ndarray
+        Convolved array with same shape as input
+
+    Examples
+    --------
+    >>> from scipy.ndimage import convolve1d
+    >>> convolve1d([2, 8, 0, 4, 1, 9, 9, 0], weights=[1, 3])
+    array([14, 24,  4, 13, 12, 36, 27,  0])
+    """
+    weights = np.asarray(weights)
+    weights = weights[::-1]
+    origin = -origin
+    if not weights.shape[0] & 1:
+        origin -= 1
+    if weights.dtype.kind == 'c':
+        # pre-conjugate here to counteract the conjugation in correlate1d
+        weights = weights.conj()
+    return correlate1d(input, weights, axis, output, mode, cval, origin)
+
+
+def _gaussian_kernel1d(sigma, order, radius):
+    """
+    Computes a 1-D Gaussian convolution kernel.
+    """
+    if order < 0:
+        raise ValueError('order must be non-negative')
+    exponent_range = np.arange(order + 1)
+    sigma2 = sigma * sigma
+    x = np.arange(-radius, radius+1)
+    phi_x = np.exp(-0.5 / sigma2 * x ** 2)
+    phi_x = phi_x / phi_x.sum()
+
+    if order == 0:
+        return phi_x
+    else:
+        # f(x) = q(x) * phi(x) = q(x) * exp(p(x))
+        # f'(x) = (q'(x) + q(x) * p'(x)) * phi(x)
+        # p'(x) = -1 / sigma ** 2
+        # Implement q'(x) + q(x) * p'(x) as a matrix operator and apply to the
+        # coefficients of q(x)
+        q = np.zeros(order + 1)
+        q[0] = 1
+        D = np.diag(exponent_range[1:], 1)  # D @ q(x) = q'(x)
+        P = np.diag(np.ones(order)/-sigma2, -1)  # P @ q(x) = q(x) * p'(x)
+        Q_deriv = D + P
+        for _ in range(order):
+            q = Q_deriv.dot(q)
+        q = (x[:, None] ** exponent_range).dot(q)
+        return q * phi_x
+
+
+@_ni_docstrings.docfiller
+def gaussian_filter1d(input, sigma, axis=-1, order=0, output=None,
+                      mode="reflect", cval=0.0, truncate=4.0, *, radius=None):
+    """1-D Gaussian filter.
+
+    Parameters
+    ----------
+    %(input)s
+    sigma : scalar
+        standard deviation for Gaussian kernel
+    %(axis)s
+    order : int, optional
+        An order of 0 corresponds to convolution with a Gaussian
+        kernel. A positive order corresponds to convolution with
+        that derivative of a Gaussian.
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    truncate : float, optional
+        Truncate the filter at this many standard deviations.
+        Default is 4.0.
+    radius : None or int, optional
+        Radius of the Gaussian kernel. If specified, the size of
+        the kernel will be ``2*radius + 1``, and `truncate` is ignored.
+        Default is None.
+
+    Returns
+    -------
+    gaussian_filter1d : ndarray
+
+    Notes
+    -----
+    The Gaussian kernel will have size ``2*radius + 1`` along each axis. If
+    `radius` is None, a default ``radius = round(truncate * sigma)`` will be
+    used.
+
+    Examples
+    --------
+    >>> from scipy.ndimage import gaussian_filter1d
+    >>> import numpy as np
+    >>> gaussian_filter1d([1.0, 2.0, 3.0, 4.0, 5.0], 1)
+    array([ 1.42704095,  2.06782203,  3.        ,  3.93217797,  4.57295905])
+    >>> gaussian_filter1d([1.0, 2.0, 3.0, 4.0, 5.0], 4)
+    array([ 2.91948343,  2.95023502,  3.        ,  3.04976498,  3.08051657])
+    >>> import matplotlib.pyplot as plt
+    >>> rng = np.random.default_rng()
+    >>> x = rng.standard_normal(101).cumsum()
+    >>> y3 = gaussian_filter1d(x, 3)
+    >>> y6 = gaussian_filter1d(x, 6)
+    >>> plt.plot(x, 'k', label='original data')
+    >>> plt.plot(y3, '--', label='filtered, sigma=3')
+    >>> plt.plot(y6, ':', label='filtered, sigma=6')
+    >>> plt.legend()
+    >>> plt.grid()
+    >>> plt.show()
+
+    """
+    sd = float(sigma)
+    # make the radius of the filter equal to truncate standard deviations
+    lw = int(truncate * sd + 0.5)
+    if radius is not None:
+        lw = radius
+    if not isinstance(lw, numbers.Integral) or lw < 0:
+        raise ValueError('Radius must be a nonnegative integer.')
+    # Since we are calling correlate, not convolve, revert the kernel
+    weights = _gaussian_kernel1d(sigma, order, lw)[::-1]
+    return correlate1d(input, weights, axis, output, mode, cval, 0)
+
+
+@_ni_docstrings.docfiller
+def gaussian_filter(input, sigma, order=0, output=None,
+                    mode="reflect", cval=0.0, truncate=4.0, *, radius=None,
+                    axes=None):
+    """Multidimensional Gaussian filter.
+
+    Parameters
+    ----------
+    %(input)s
+    sigma : scalar or sequence of scalars
+        Standard deviation for Gaussian kernel. The standard
+        deviations of the Gaussian filter are given for each axis as a
+        sequence, or as a single number, in which case it is equal for
+        all axes.
+    order : int or sequence of ints, optional
+        The order of the filter along each axis is given as a sequence
+        of integers, or as a single number. An order of 0 corresponds
+        to convolution with a Gaussian kernel. A positive order
+        corresponds to convolution with that derivative of a Gaussian.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    truncate : float, optional
+        Truncate the filter at this many standard deviations.
+        Default is 4.0.
+    radius : None or int or sequence of ints, optional
+        Radius of the Gaussian kernel. The radius are given for each axis
+        as a sequence, or as a single number, in which case it is equal
+        for all axes. If specified, the size of the kernel along each axis
+        will be ``2*radius + 1``, and `truncate` is ignored.
+        Default is None.
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `sigma`, `order`, `mode` and/or `radius`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    gaussian_filter : ndarray
+        Returned array of same shape as `input`.
+
+    Notes
+    -----
+    The multidimensional filter is implemented as a sequence of
+    1-D convolution filters. The intermediate arrays are
+    stored in the same data type as the output. Therefore, for output
+    types with a limited precision, the results may be imprecise
+    because intermediate results may be stored with insufficient
+    precision.
+
+    The Gaussian kernel will have size ``2*radius + 1`` along each axis. If
+    `radius` is None, the default ``radius = round(truncate * sigma)`` will be
+    used.
+
+    Examples
+    --------
+    >>> from scipy.ndimage import gaussian_filter
+    >>> import numpy as np
+    >>> a = np.arange(50, step=2).reshape((5,5))
+    >>> a
+    array([[ 0,  2,  4,  6,  8],
+           [10, 12, 14, 16, 18],
+           [20, 22, 24, 26, 28],
+           [30, 32, 34, 36, 38],
+           [40, 42, 44, 46, 48]])
+    >>> gaussian_filter(a, sigma=1)
+    array([[ 4,  6,  8,  9, 11],
+           [10, 12, 14, 15, 17],
+           [20, 22, 24, 25, 27],
+           [29, 31, 33, 34, 36],
+           [35, 37, 39, 40, 42]])
+
+    >>> from scipy import datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = gaussian_filter(ascent, sigma=5)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    output = _ni_support._get_output(output, input)
+
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    orders = _ni_support._normalize_sequence(order, num_axes)
+    sigmas = _ni_support._normalize_sequence(sigma, num_axes)
+    modes = _ni_support._normalize_sequence(mode, num_axes)
+    radiuses = _ni_support._normalize_sequence(radius, num_axes)
+    axes = [(axes[ii], sigmas[ii], orders[ii], modes[ii], radiuses[ii])
+            for ii in range(num_axes) if sigmas[ii] > 1e-15]
+    if len(axes) > 0:
+        for axis, sigma, order, mode, radius in axes:
+            gaussian_filter1d(input, sigma, axis, order, output,
+                              mode, cval, truncate, radius=radius)
+            input = output
+    else:
+        output[...] = input[...]
+    return output
+
+
+@_ni_docstrings.docfiller
+def prewitt(input, axis=-1, output=None, mode="reflect", cval=0.0):
+    """Calculate a Prewitt filter.
+
+    Parameters
+    ----------
+    %(input)s
+    %(axis)s
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+
+    Returns
+    -------
+    prewitt : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    See Also
+    --------
+    sobel: Sobel filter
+
+    Notes
+    -----
+    This function computes the one-dimensional Prewitt filter.
+    Horizontal edges are emphasised with the horizontal transform (axis=0),
+    vertical edges with the vertical transform (axis=1), and so on for higher
+    dimensions. These can be combined to give the magnitude.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> import numpy as np
+    >>> ascent = datasets.ascent()
+    >>> prewitt_h = ndimage.prewitt(ascent, axis=0)
+    >>> prewitt_v = ndimage.prewitt(ascent, axis=1)
+    >>> magnitude = np.sqrt(prewitt_h ** 2 + prewitt_v ** 2)
+    >>> magnitude *= 255 / np.max(magnitude) # Normalization
+    >>> fig, axes = plt.subplots(2, 2, figsize = (8, 8))
+    >>> plt.gray()
+    >>> axes[0, 0].imshow(ascent)
+    >>> axes[0, 1].imshow(prewitt_h)
+    >>> axes[1, 0].imshow(prewitt_v)
+    >>> axes[1, 1].imshow(magnitude)
+    >>> titles = ["original", "horizontal", "vertical", "magnitude"]
+    >>> for i, ax in enumerate(axes.ravel()):
+    ...     ax.set_title(titles[i])
+    ...     ax.axis("off")
+    >>> plt.show()
+
+    """
+    input = np.asarray(input)
+    axis = normalize_axis_index(axis, input.ndim)
+    output = _ni_support._get_output(output, input)
+    modes = _ni_support._normalize_sequence(mode, input.ndim)
+    correlate1d(input, [-1, 0, 1], axis, output, modes[axis], cval, 0)
+    axes = [ii for ii in range(input.ndim) if ii != axis]
+    for ii in axes:
+        correlate1d(output, [1, 1, 1], ii, output, modes[ii], cval, 0,)
+    return output
+
+
+@_ni_docstrings.docfiller
+def sobel(input, axis=-1, output=None, mode="reflect", cval=0.0):
+    """Calculate a Sobel filter.
+
+    Parameters
+    ----------
+    %(input)s
+    %(axis)s
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+
+    Returns
+    -------
+    sobel : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    This function computes the axis-specific Sobel gradient.
+    The horizontal edges can be emphasised with the horizontal transform (axis=0),
+    the vertical edges with the vertical transform (axis=1) and so on for higher
+    dimensions. These can be combined to give the magnitude.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> import numpy as np
+    >>> ascent = datasets.ascent().astype('int32')
+    >>> sobel_h = ndimage.sobel(ascent, 0)  # horizontal gradient
+    >>> sobel_v = ndimage.sobel(ascent, 1)  # vertical gradient
+    >>> magnitude = np.sqrt(sobel_h**2 + sobel_v**2)
+    >>> magnitude *= 255.0 / np.max(magnitude)  # normalization
+    >>> fig, axs = plt.subplots(2, 2, figsize=(8, 8))
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> axs[0, 0].imshow(ascent)
+    >>> axs[0, 1].imshow(sobel_h)
+    >>> axs[1, 0].imshow(sobel_v)
+    >>> axs[1, 1].imshow(magnitude)
+    >>> titles = ["original", "horizontal", "vertical", "magnitude"]
+    >>> for i, ax in enumerate(axs.ravel()):
+    ...     ax.set_title(titles[i])
+    ...     ax.axis("off")
+    >>> plt.show()
+
+    """
+    input = np.asarray(input)
+    axis = normalize_axis_index(axis, input.ndim)
+    output = _ni_support._get_output(output, input)
+    modes = _ni_support._normalize_sequence(mode, input.ndim)
+    correlate1d(input, [-1, 0, 1], axis, output, modes[axis], cval, 0)
+    axes = [ii for ii in range(input.ndim) if ii != axis]
+    for ii in axes:
+        correlate1d(output, [1, 2, 1], ii, output, modes[ii], cval, 0)
+    return output
+
+
+@_ni_docstrings.docfiller
+def generic_laplace(input, derivative2, output=None, mode="reflect",
+                    cval=0.0,
+                    extra_arguments=(),
+                    extra_keywords=None,
+                    *, axes=None):
+    """
+    N-D Laplace filter using a provided second derivative function.
+
+    Parameters
+    ----------
+    %(input)s
+    derivative2 : callable
+        Callable with the following signature::
+
+            derivative2(input, axis, output, mode, cval,
+                        *extra_arguments, **extra_keywords)
+
+        See `extra_arguments`, `extra_keywords` below.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    %(extra_keywords)s
+    %(extra_arguments)s
+    axes : tuple of int or None
+        The axes over which to apply the filter. If a `mode` tuple is
+        provided, its length must match the number of axes.
+
+    Returns
+    -------
+    generic_laplace : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    """
+    if extra_keywords is None:
+        extra_keywords = {}
+    input = np.asarray(input)
+    output = _ni_support._get_output(output, input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    if len(axes) > 0:
+        modes = _ni_support._normalize_sequence(mode, len(axes))
+        derivative2(input, axes[0], output, modes[0], cval,
+                    *extra_arguments, **extra_keywords)
+        for ii in range(1, len(axes)):
+            tmp = derivative2(input, axes[ii], output.dtype, modes[ii], cval,
+                              *extra_arguments, **extra_keywords)
+            output += tmp
+    else:
+        output[...] = input[...]
+    return output
+
+
+@_ni_docstrings.docfiller
+def laplace(input, output=None, mode="reflect", cval=0.0, *, axes=None):
+    """N-D Laplace filter based on approximate second derivatives.
+
+    Parameters
+    ----------
+    %(input)s
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    axes : tuple of int or None
+        The axes over which to apply the filter. If a `mode` tuple is
+        provided, its length must match the number of axes.
+
+    Returns
+    -------
+    laplace : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.laplace(ascent)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    def derivative2(input, axis, output, mode, cval):
+        return correlate1d(input, [1, -2, 1], axis, output, mode, cval, 0)
+    return generic_laplace(input, derivative2, output, mode, cval, axes=axes)
+
+
+@_ni_docstrings.docfiller
+def gaussian_laplace(input, sigma, output=None, mode="reflect",
+                     cval=0.0, *, axes=None, **kwargs):
+    """Multidimensional Laplace filter using Gaussian second derivatives.
+
+    Parameters
+    ----------
+    %(input)s
+    sigma : scalar or sequence of scalars
+        The standard deviations of the Gaussian filter are given for
+        each axis as a sequence, or as a single number, in which case
+        it is equal for all axes.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    axes : tuple of int or None
+        The axes over which to apply the filter. If `sigma` or `mode` tuples
+        are provided, their length must match the number of axes.
+    Extra keyword arguments will be passed to gaussian_filter().
+
+    Returns
+    -------
+    gaussian_laplace : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> ascent = datasets.ascent()
+
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+
+    >>> result = ndimage.gaussian_laplace(ascent, sigma=1)
+    >>> ax1.imshow(result)
+
+    >>> result = ndimage.gaussian_laplace(ascent, sigma=3)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+
+    def derivative2(input, axis, output, mode, cval, sigma, **kwargs):
+        order = [0] * input.ndim
+        order[axis] = 2
+        return gaussian_filter(input, sigma, order, output, mode, cval,
+                               **kwargs)
+
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    sigma = _ni_support._normalize_sequence(sigma, num_axes)
+    if num_axes < input.ndim:
+        # set sigma = 0 for any axes not being filtered
+        sigma_temp = [0,] * input.ndim
+        for s, ax in zip(sigma, axes):
+            sigma_temp[ax] = s
+        sigma = sigma_temp
+
+    return generic_laplace(input, derivative2, output, mode, cval,
+                           extra_arguments=(sigma,),
+                           extra_keywords=kwargs,
+                           axes=axes)
+
+
+@_ni_docstrings.docfiller
+def generic_gradient_magnitude(input, derivative, output=None,
+                               mode="reflect", cval=0.0,
+                               extra_arguments=(), extra_keywords=None,
+                               *, axes=None):
+    """Gradient magnitude using a provided gradient function.
+
+    Parameters
+    ----------
+    %(input)s
+    derivative : callable
+        Callable with the following signature::
+
+            derivative(input, axis, output, mode, cval,
+                       *extra_arguments, **extra_keywords)
+
+        See `extra_arguments`, `extra_keywords` below.
+        `derivative` can assume that `input` and `output` are ndarrays.
+        Note that the output from `derivative` is modified inplace;
+        be careful to copy important inputs before returning them.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    %(extra_keywords)s
+    %(extra_arguments)s
+    axes : tuple of int or None
+        The axes over which to apply the filter. If a `mode` tuple is
+        provided, its length must match the number of axes.
+
+    Returns
+    -------
+    generic_gradient_matnitude : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    """
+    if extra_keywords is None:
+        extra_keywords = {}
+    input = np.asarray(input)
+    output = _ni_support._get_output(output, input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    if len(axes) > 0:
+        modes = _ni_support._normalize_sequence(mode, len(axes))
+        derivative(input, axes[0], output, modes[0], cval,
+                   *extra_arguments, **extra_keywords)
+        np.multiply(output, output, output)
+        for ii in range(1, len(axes)):
+            tmp = derivative(input, axes[ii], output.dtype, modes[ii], cval,
+                             *extra_arguments, **extra_keywords)
+            np.multiply(tmp, tmp, tmp)
+            output += tmp
+        # This allows the sqrt to work with a different default casting
+        np.sqrt(output, output, casting='unsafe')
+    else:
+        output[...] = input[...]
+    return output
+
+
+@_ni_docstrings.docfiller
+def gaussian_gradient_magnitude(input, sigma, output=None,
+                                mode="reflect", cval=0.0, *, axes=None,
+                                **kwargs):
+    """Multidimensional gradient magnitude using Gaussian derivatives.
+
+    Parameters
+    ----------
+    %(input)s
+    sigma : scalar or sequence of scalars
+        The standard deviations of the Gaussian filter are given for
+        each axis as a sequence, or as a single number, in which case
+        it is equal for all axes.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    axes : tuple of int or None
+        The axes over which to apply the filter. If `sigma` or `mode` tuples
+        are provided, their length must match the number of axes.
+    Extra keyword arguments will be passed to gaussian_filter().
+
+    Returns
+    -------
+    gaussian_gradient_magnitude : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.gaussian_gradient_magnitude(ascent, sigma=5)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+
+    def derivative(input, axis, output, mode, cval, sigma, **kwargs):
+        order = [0] * input.ndim
+        order[axis] = 1
+        return gaussian_filter(input, sigma, order, output, mode,
+                               cval, **kwargs)
+
+    return generic_gradient_magnitude(input, derivative, output, mode,
+                                      cval, extra_arguments=(sigma,),
+                                      extra_keywords=kwargs, axes=axes)
+
+
+def _correlate_or_convolve(input, weights, output, mode, cval, origin,
+                           convolution, axes):
+    input = np.asarray(input)
+    weights = np.asarray(weights)
+    complex_input = input.dtype.kind == 'c'
+    complex_weights = weights.dtype.kind == 'c'
+    if complex_input or complex_weights:
+        if complex_weights and not convolution:
+            # As for np.correlate, conjugate weights rather than input.
+            weights = weights.conj()
+        kwargs = dict(
+            mode=mode, origin=origin, convolution=convolution, axes=axes
+        )
+        output = _ni_support._get_output(output, input, complex_output=True)
+
+        return _complex_via_real_components(_correlate_or_convolve, input,
+                                            weights, output, cval, **kwargs)
+
+    axes = _ni_support._check_axes(axes, input.ndim)
+    weights = np.asarray(weights, dtype=np.float64)
+
+    # expand weights and origins if num_axes < input.ndim
+    weights = _expand_footprint(input.ndim, axes, weights, "weights")
+    origins = _expand_origin(input.ndim, axes, origin)
+
+    wshape = [ii for ii in weights.shape if ii > 0]
+    if len(wshape) != input.ndim:
+        raise RuntimeError(f"weights.ndim ({len(wshape)}) must match "
+                           f"len(axes) ({len(axes)})")
+    if convolution:
+        weights = weights[tuple([slice(None, None, -1)] * weights.ndim)]
+        for ii in range(len(origins)):
+            origins[ii] = -origins[ii]
+            if not weights.shape[ii] & 1:
+                origins[ii] -= 1
+    for origin, lenw in zip(origins, wshape):
+        if _invalid_origin(origin, lenw):
+            raise ValueError('Invalid origin; origin must satisfy '
+                             '-(weights.shape[k] // 2) <= origin[k] <= '
+                             '(weights.shape[k]-1) // 2')
+
+    if not weights.flags.contiguous:
+        weights = weights.copy()
+    output = _ni_support._get_output(output, input)
+    temp_needed = np.may_share_memory(input, output)
+    if temp_needed:
+        # input and output arrays cannot share memory
+        temp = output
+        output = _ni_support._get_output(output.dtype, input)
+    if not isinstance(mode, str) and isinstance(mode, Iterable):
+        raise RuntimeError("A sequence of modes is not supported")
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.correlate(input, weights, output, mode, cval, origins)
+    if temp_needed:
+        temp[...] = output
+        output = temp
+    return output
+
+
+@_ni_docstrings.docfiller
+def correlate(input, weights, output=None, mode='reflect', cval=0.0,
+              origin=0, *, axes=None):
+    """
+    Multidimensional correlation.
+
+    The array is correlated with the given kernel.
+
+    Parameters
+    ----------
+    %(input)s
+    weights : ndarray
+        array of weights, same number of dimensions as input
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `mode` or `origin` must match the length
+        of `axes`. The ith entry in any of these tuples corresponds to the ith
+        entry in `axes`.
+
+    Returns
+    -------
+    result : ndarray
+        The result of correlation of `input` with `weights`.
+
+    See Also
+    --------
+    convolve : Convolve an image with a kernel.
+
+    Examples
+    --------
+    Correlation is the process of moving a filter mask often referred to
+    as kernel over the image and computing the sum of products at each location.
+
+    >>> from scipy.ndimage import correlate
+    >>> import numpy as np
+    >>> input_img = np.arange(25).reshape(5,5)
+    >>> print(input_img)
+    [[ 0  1  2  3  4]
+    [ 5  6  7  8  9]
+    [10 11 12 13 14]
+    [15 16 17 18 19]
+    [20 21 22 23 24]]
+
+    Define a kernel (weights) for correlation. In this example, it is for sum of
+    center and up, down, left and right next elements.
+
+    >>> weights = [[0, 1, 0],
+    ...            [1, 1, 1],
+    ...            [0, 1, 0]]
+
+    We can calculate a correlation result:
+    For example, element ``[2,2]`` is ``7 + 11 + 12 + 13 + 17 = 60``.
+
+    >>> correlate(input_img, weights)
+    array([[  6,  10,  15,  20,  24],
+        [ 26,  30,  35,  40,  44],
+        [ 51,  55,  60,  65,  69],
+        [ 76,  80,  85,  90,  94],
+        [ 96, 100, 105, 110, 114]])
+
+    """
+    return _correlate_or_convolve(input, weights, output, mode, cval,
+                                  origin, False, axes)
+
+
+@_ni_docstrings.docfiller
+def convolve(input, weights, output=None, mode='reflect', cval=0.0,
+             origin=0, *, axes=None):
+    """
+    Multidimensional convolution.
+
+    The array is convolved with the given kernel.
+
+    Parameters
+    ----------
+    %(input)s
+    weights : array_like
+        Array of weights, same number of dimensions as input
+    %(output)s
+    %(mode_reflect)s
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0
+    origin : int or sequence, optional
+        Controls the placement of the filter on the input array's pixels.
+        A value of 0 (the default) centers the filter over the pixel, with
+        positive values shifting the filter to the right, and negative ones
+        to the left. By passing a sequence of origins with length equal to
+        the number of dimensions of the input array, different shifts can
+        be specified along each axis.
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `mode` or `origin` must match the length
+        of `axes`. The ith entry in any of these tuples corresponds to the ith
+        entry in `axes`.
+
+    Returns
+    -------
+    result : ndarray
+        The result of convolution of `input` with `weights`.
+
+    See Also
+    --------
+    correlate : Correlate an image with a kernel.
+
+    Notes
+    -----
+    Each value in result is :math:`C_i = \\sum_j{I_{i+k-j} W_j}`, where
+    W is the `weights` kernel,
+    j is the N-D spatial index over :math:`W`,
+    I is the `input` and k is the coordinate of the center of
+    W, specified by `origin` in the input parameters.
+
+    Examples
+    --------
+    Perhaps the simplest case to understand is ``mode='constant', cval=0.0``,
+    because in this case borders (i.e., where the `weights` kernel, centered
+    on any one value, extends beyond an edge of `input`) are treated as zeros.
+
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> k = np.array([[1,1,1],[1,1,0],[1,0,0]])
+    >>> from scipy import ndimage
+    >>> ndimage.convolve(a, k, mode='constant', cval=0.0)
+    array([[11, 10,  7,  4],
+           [10,  3, 11, 11],
+           [15, 12, 14,  7],
+           [12,  3,  7,  0]])
+
+    Setting ``cval=1.0`` is equivalent to padding the outer edge of `input`
+    with 1.0's (and then extracting only the original region of the result).
+
+    >>> ndimage.convolve(a, k, mode='constant', cval=1.0)
+    array([[13, 11,  8,  7],
+           [11,  3, 11, 14],
+           [16, 12, 14, 10],
+           [15,  6, 10,  5]])
+
+    With ``mode='reflect'`` (the default), outer values are reflected at the
+    edge of `input` to fill in missing values.
+
+    >>> b = np.array([[2, 0, 0],
+    ...               [1, 0, 0],
+    ...               [0, 0, 0]])
+    >>> k = np.array([[0,1,0], [0,1,0], [0,1,0]])
+    >>> ndimage.convolve(b, k, mode='reflect')
+    array([[5, 0, 0],
+           [3, 0, 0],
+           [1, 0, 0]])
+
+    This includes diagonally at the corners.
+
+    >>> k = np.array([[1,0,0],[0,1,0],[0,0,1]])
+    >>> ndimage.convolve(b, k)
+    array([[4, 2, 0],
+           [3, 2, 0],
+           [1, 1, 0]])
+
+    With ``mode='nearest'``, the single nearest value in to an edge in
+    `input` is repeated as many times as needed to match the overlapping
+    `weights`.
+
+    >>> c = np.array([[2, 0, 1],
+    ...               [1, 0, 0],
+    ...               [0, 0, 0]])
+    >>> k = np.array([[0, 1, 0],
+    ...               [0, 1, 0],
+    ...               [0, 1, 0],
+    ...               [0, 1, 0],
+    ...               [0, 1, 0]])
+    >>> ndimage.convolve(c, k, mode='nearest')
+    array([[7, 0, 3],
+           [5, 0, 2],
+           [3, 0, 1]])
+
+    """
+    return _correlate_or_convolve(input, weights, output, mode, cval,
+                                  origin, True, axes)
+
+
+@_ni_docstrings.docfiller
+def uniform_filter1d(input, size, axis=-1, output=None,
+                     mode="reflect", cval=0.0, origin=0):
+    """Calculate a 1-D uniform filter along the given axis.
+
+    The lines of the array along the given axis are filtered with a
+    uniform filter of given size.
+
+    Parameters
+    ----------
+    %(input)s
+    size : int
+        length of uniform filter
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+
+    Returns
+    -------
+    result : ndarray
+        Filtered array. Has same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy.ndimage import uniform_filter1d
+    >>> uniform_filter1d([2, 8, 0, 4, 1, 9, 9, 0], size=3)
+    array([4, 3, 4, 1, 4, 6, 6, 3])
+    """
+    input = np.asarray(input)
+    axis = normalize_axis_index(axis, input.ndim)
+    if size < 1:
+        raise RuntimeError('incorrect filter size')
+    complex_output = input.dtype.kind == 'c'
+    output = _ni_support._get_output(output, input,
+                                     complex_output=complex_output)
+    if (size // 2 + origin < 0) or (size // 2 + origin >= size):
+        raise ValueError('invalid origin')
+    mode = _ni_support._extend_mode_to_code(mode)
+    if not complex_output:
+        _nd_image.uniform_filter1d(input, size, axis, output, mode, cval,
+                                   origin)
+    else:
+        _nd_image.uniform_filter1d(input.real, size, axis, output.real, mode,
+                                   np.real(cval), origin)
+        _nd_image.uniform_filter1d(input.imag, size, axis, output.imag, mode,
+                                   np.imag(cval), origin)
+    return output
+
+
+@_ni_docstrings.docfiller
+def uniform_filter(input, size=3, output=None, mode="reflect",
+                   cval=0.0, origin=0, *, axes=None):
+    """Multidimensional uniform filter.
+
+    Parameters
+    ----------
+    %(input)s
+    size : int or sequence of ints, optional
+        The sizes of the uniform filter are given for each axis as a
+        sequence, or as a single number, in which case the size is
+        equal for all axes.
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    uniform_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    The multidimensional filter is implemented as a sequence of
+    1-D uniform filters. The intermediate arrays are stored
+    in the same data type as the output. Therefore, for output types
+    with a limited precision, the results may be imprecise because
+    intermediate results may be stored with insufficient precision.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.uniform_filter(ascent, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    output = _ni_support._get_output(output, input,
+                                     complex_output=input.dtype.kind == 'c')
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    sizes = _ni_support._normalize_sequence(size, num_axes)
+    origins = _ni_support._normalize_sequence(origin, num_axes)
+    modes = _ni_support._normalize_sequence(mode, num_axes)
+    axes = [(axes[ii], sizes[ii], origins[ii], modes[ii])
+            for ii in range(num_axes) if sizes[ii] > 1]
+    if len(axes) > 0:
+        for axis, size, origin, mode in axes:
+            uniform_filter1d(input, int(size), axis, output, mode,
+                             cval, origin)
+            input = output
+    else:
+        output[...] = input[...]
+    return output
+
+
+@_ni_docstrings.docfiller
+def minimum_filter1d(input, size, axis=-1, output=None,
+                     mode="reflect", cval=0.0, origin=0):
+    """Calculate a 1-D minimum filter along the given axis.
+
+    The lines of the array along the given axis are filtered with a
+    minimum filter of given size.
+
+    Parameters
+    ----------
+    %(input)s
+    size : int
+        length along which to calculate 1D minimum
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+
+    Returns
+    -------
+    result : ndarray.
+        Filtered image. Has the same shape as `input`.
+
+    Notes
+    -----
+    This function implements the MINLIST algorithm [1]_, as described by
+    Richard Harter [2]_, and has a guaranteed O(n) performance, `n` being
+    the `input` length, regardless of filter size.
+
+    References
+    ----------
+    .. [1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.2777
+    .. [2] http://www.richardhartersworld.com/cri/2001/slidingmin.html
+
+
+    Examples
+    --------
+    >>> from scipy.ndimage import minimum_filter1d
+    >>> minimum_filter1d([2, 8, 0, 4, 1, 9, 9, 0], size=3)
+    array([2, 0, 0, 0, 1, 1, 0, 0])
+    """
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    axis = normalize_axis_index(axis, input.ndim)
+    if size < 1:
+        raise RuntimeError('incorrect filter size')
+    output = _ni_support._get_output(output, input)
+    if (size // 2 + origin < 0) or (size // 2 + origin >= size):
+        raise ValueError('invalid origin')
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.min_or_max_filter1d(input, size, axis, output, mode, cval,
+                                  origin, 1)
+    return output
+
+
+@_ni_docstrings.docfiller
+def maximum_filter1d(input, size, axis=-1, output=None,
+                     mode="reflect", cval=0.0, origin=0):
+    """Calculate a 1-D maximum filter along the given axis.
+
+    The lines of the array along the given axis are filtered with a
+    maximum filter of given size.
+
+    Parameters
+    ----------
+    %(input)s
+    size : int
+        Length along which to calculate the 1-D maximum.
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+
+    Returns
+    -------
+    maximum1d : ndarray, None
+        Maximum-filtered array with same shape as input.
+        None if `output` is not None
+
+    Notes
+    -----
+    This function implements the MAXLIST algorithm [1]_, as described by
+    Richard Harter [2]_, and has a guaranteed O(n) performance, `n` being
+    the `input` length, regardless of filter size.
+
+    References
+    ----------
+    .. [1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.2777
+    .. [2] http://www.richardhartersworld.com/cri/2001/slidingmin.html
+
+    Examples
+    --------
+    >>> from scipy.ndimage import maximum_filter1d
+    >>> maximum_filter1d([2, 8, 0, 4, 1, 9, 9, 0], size=3)
+    array([8, 8, 8, 4, 9, 9, 9, 9])
+    """
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    axis = normalize_axis_index(axis, input.ndim)
+    if size < 1:
+        raise RuntimeError('incorrect filter size')
+    output = _ni_support._get_output(output, input)
+    if (size // 2 + origin < 0) or (size // 2 + origin >= size):
+        raise ValueError('invalid origin')
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.min_or_max_filter1d(input, size, axis, output, mode, cval,
+                                  origin, 0)
+    return output
+
+
+def _min_or_max_filter(input, size, footprint, structure, output, mode,
+                       cval, origin, minimum, axes=None):
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=3)
+    if structure is None:
+        if footprint is None:
+            if size is None:
+                raise RuntimeError("no footprint provided")
+            separable = True
+        else:
+            footprint = np.asarray(footprint, dtype=bool)
+            if not footprint.any():
+                raise ValueError("All-zero footprint is not supported.")
+            if footprint.all():
+                size = footprint.shape
+                footprint = None
+                separable = True
+            else:
+                separable = False
+    else:
+        structure = np.asarray(structure, dtype=np.float64)
+        separable = False
+        if footprint is None:
+            footprint = np.ones(structure.shape, bool)
+        else:
+            footprint = np.asarray(footprint, dtype=bool)
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError("Complex type not supported")
+    output = _ni_support._get_output(output, input)
+    temp_needed = np.may_share_memory(input, output)
+    if temp_needed:
+        # input and output arrays cannot share memory
+        temp = output
+        output = _ni_support._get_output(output.dtype, input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if separable:
+        origins = _ni_support._normalize_sequence(origin, num_axes)
+        sizes = _ni_support._normalize_sequence(size, num_axes)
+        modes = _ni_support._normalize_sequence(mode, num_axes)
+        axes = [(axes[ii], sizes[ii], origins[ii], modes[ii])
+                for ii in range(len(axes)) if sizes[ii] > 1]
+        if minimum:
+            filter_ = minimum_filter1d
+        else:
+            filter_ = maximum_filter1d
+        if len(axes) > 0:
+            for axis, size, origin, mode in axes:
+                filter_(input, int(size), axis, output, mode, cval, origin)
+                input = output
+        else:
+            output[...] = input[...]
+    else:
+        # expand origins and footprint if num_axes < input.ndim
+        footprint = _expand_footprint(input.ndim, axes, footprint)
+        origins = _expand_origin(input.ndim, axes, origin)
+
+        fshape = [ii for ii in footprint.shape if ii > 0]
+        if len(fshape) != input.ndim:
+            raise RuntimeError(f"footprint.ndim ({footprint.ndim}) must match "
+                               f"len(axes) ({len(axes)})")
+        for origin, lenf in zip(origins, fshape):
+            if (lenf // 2 + origin < 0) or (lenf // 2 + origin >= lenf):
+                raise ValueError("invalid origin")
+        if not footprint.flags.contiguous:
+            footprint = footprint.copy()
+        if structure is not None:
+            if len(structure.shape) != num_axes:
+                raise RuntimeError("structure array has incorrect shape")
+            if num_axes != structure.ndim:
+                structure = np.expand_dims(
+                    structure,
+                    tuple(ax for ax in range(structure.ndim) if ax not in axes)
+                )
+            if not structure.flags.contiguous:
+                structure = structure.copy()
+        if not isinstance(mode, str) and isinstance(mode, Iterable):
+            raise RuntimeError(
+                "A sequence of modes is not supported for non-separable "
+                "footprints")
+        mode = _ni_support._extend_mode_to_code(mode)
+        _nd_image.min_or_max_filter(input, footprint, structure, output,
+                                    mode, cval, origins, minimum)
+    if temp_needed:
+        temp[...] = output
+        output = temp
+    return output
+
+
+@_ni_docstrings.docfiller
+def minimum_filter(input, size=None, footprint=None, output=None,
+                   mode="reflect", cval=0.0, origin=0, *, axes=None):
+    """Calculate a multidimensional minimum filter.
+
+    Parameters
+    ----------
+    %(input)s
+    %(size_foot)s
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    minimum_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    A sequence of modes (one per axis) is only supported when the footprint is
+    separable. Otherwise, a single mode string must be provided.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.minimum_filter(ascent, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    return _min_or_max_filter(input, size, footprint, None, output, mode,
+                              cval, origin, 1, axes)
+
+
+@_ni_docstrings.docfiller
+def maximum_filter(input, size=None, footprint=None, output=None,
+                   mode="reflect", cval=0.0, origin=0, *, axes=None):
+    """Calculate a multidimensional maximum filter.
+
+    Parameters
+    ----------
+    %(input)s
+    %(size_foot)s
+    %(output)s
+    %(mode_multiple)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    maximum_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    A sequence of modes (one per axis) is only supported when the footprint is
+    separable. Otherwise, a single mode string must be provided.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.maximum_filter(ascent, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    return _min_or_max_filter(input, size, footprint, None, output, mode,
+                              cval, origin, 0, axes)
+
+
+@_ni_docstrings.docfiller
+def _rank_filter(input, rank, size=None, footprint=None, output=None,
+                 mode="reflect", cval=0.0, origin=0, operation='rank',
+                 axes=None):
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=3)
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if footprint is None:
+        if size is None:
+            raise RuntimeError("no footprint or filter size provided")
+        sizes = _ni_support._normalize_sequence(size, num_axes)
+        footprint = np.ones(sizes, dtype=bool)
+    else:
+        footprint = np.asarray(footprint, dtype=bool)
+    # expand origins, footprint and modes if num_axes < input.ndim
+    footprint = _expand_footprint(input.ndim, axes, footprint)
+    origins = _expand_origin(input.ndim, axes, origin)
+    mode = _expand_mode(input.ndim, axes, mode)
+
+    fshape = [ii for ii in footprint.shape if ii > 0]
+    if len(fshape) != input.ndim:
+        raise RuntimeError(f"footprint.ndim ({footprint.ndim}) must match "
+                           f"len(axes) ({len(axes)})")
+    for origin, lenf in zip(origins, fshape):
+        if (lenf // 2 + origin < 0) or (lenf // 2 + origin >= lenf):
+            raise ValueError('invalid origin')
+    if not footprint.flags.contiguous:
+        footprint = footprint.copy()
+    filter_size = np.where(footprint, 1, 0).sum()
+    if operation == 'median':
+        rank = filter_size // 2
+    elif operation == 'percentile':
+        percentile = rank
+        if percentile < 0.0:
+            percentile += 100.0
+        if percentile < 0 or percentile > 100:
+            raise RuntimeError('invalid percentile')
+        if percentile == 100.0:
+            rank = filter_size - 1
+        else:
+            rank = int(float(filter_size) * percentile / 100.0)
+    if rank < 0:
+        rank += filter_size
+    if rank < 0 or rank >= filter_size:
+        raise RuntimeError('rank not within filter footprint size')
+    if rank == 0:
+        return minimum_filter(input, None, footprint, output, mode, cval,
+                              origins, axes=None)
+    elif rank == filter_size - 1:
+        return maximum_filter(input, None, footprint, output, mode, cval,
+                              origins, axes=None)
+    else:
+        output = _ni_support._get_output(output, input)
+        temp_needed = np.may_share_memory(input, output)
+        if temp_needed:
+            # input and output arrays cannot share memory
+            temp = output
+            output = _ni_support._get_output(output.dtype, input)
+        if not isinstance(mode, str) and isinstance(mode, Iterable):
+            raise RuntimeError(
+                "A sequence of modes is not supported by non-separable rank "
+                "filters")
+        mode = _ni_support._extend_mode_to_code(mode, is_filter=True)
+        if input.ndim == 1:
+            if input.dtype in (np.int64, np.float64, np.float32):
+                x = input
+                x_out = output
+            elif input.dtype == np.float16:
+                x = input.astype('float32')
+                x_out = np.empty(x.shape, dtype='float32')
+            elif np.result_type(input, np.int64) == np.int64:
+                x = input.astype('int64')
+                x_out = np.empty(x.shape, dtype='int64')
+            elif input.dtype.kind in 'biu':
+                # cast any other boolean, integer or unsigned type to int64
+                x = input.astype('int64')
+                x_out = np.empty(x.shape, dtype='int64')
+            else:
+                raise RuntimeError('Unsupported array type')
+            cval = x.dtype.type(cval)
+            _rank_filter_1d.rank_filter(x, rank, footprint.size, x_out, mode, cval,
+                                        origin)
+            if input.dtype not in (np.int64, np.float64, np.float32):
+                np.copyto(output, x_out, casting='unsafe')
+        else:
+            _nd_image.rank_filter(input, rank, footprint, output, mode, cval, origins)
+        if temp_needed:
+            temp[...] = output
+            output = temp
+        return output
+
+
+@_ni_docstrings.docfiller
+def rank_filter(input, rank, size=None, footprint=None, output=None,
+                mode="reflect", cval=0.0, origin=0, *, axes=None):
+    """Calculate a multidimensional rank filter.
+
+    Parameters
+    ----------
+    %(input)s
+    rank : int
+        The rank parameter may be less than zero, i.e., rank = -1
+        indicates the largest element.
+    %(size_foot)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    rank_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.rank_filter(ascent, rank=42, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    rank = operator.index(rank)
+    return _rank_filter(input, rank, size, footprint, output, mode, cval,
+                        origin, 'rank', axes=axes)
+
+
+@_ni_docstrings.docfiller
+def median_filter(input, size=None, footprint=None, output=None,
+                  mode="reflect", cval=0.0, origin=0, *, axes=None):
+    """
+    Calculate a multidimensional median filter.
+
+    Parameters
+    ----------
+    %(input)s
+    %(size_foot)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    median_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    See Also
+    --------
+    scipy.signal.medfilt2d
+
+    Notes
+    -----
+    For 2-dimensional images with ``uint8``, ``float32`` or ``float64`` dtypes
+    the specialised function `scipy.signal.medfilt2d` may be faster. It is
+    however limited to constant mode with ``cval=0``.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.median_filter(ascent, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    return _rank_filter(input, 0, size, footprint, output, mode, cval,
+                        origin, 'median', axes=axes)
+
+
+@_ni_docstrings.docfiller
+def percentile_filter(input, percentile, size=None, footprint=None,
+                      output=None, mode="reflect", cval=0.0, origin=0, *,
+                      axes=None):
+    """Calculate a multidimensional percentile filter.
+
+    Parameters
+    ----------
+    %(input)s
+    percentile : scalar
+        The percentile parameter may be less than zero, i.e.,
+        percentile = -20 equals percentile = 80
+    %(size_foot)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin_multiple)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size`, `origin`, and/or `mode`
+        must match the length of `axes`. The ith entry in any of these tuples
+        corresponds to the ith entry in `axes`.
+
+    Returns
+    -------
+    percentile_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.percentile_filter(ascent, percentile=20, size=20)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result)
+    >>> plt.show()
+    """
+    return _rank_filter(input, percentile, size, footprint, output, mode,
+                        cval, origin, 'percentile', axes=axes)
+
+
+@_ni_docstrings.docfiller
+def generic_filter1d(input, function, filter_size, axis=-1,
+                     output=None, mode="reflect", cval=0.0, origin=0,
+                     extra_arguments=(), extra_keywords=None):
+    """Calculate a 1-D filter along the given axis.
+
+    `generic_filter1d` iterates over the lines of the array, calling the
+    given function at each line. The arguments of the line are the
+    input line, and the output line. The input and output lines are 1-D
+    double arrays. The input line is extended appropriately according
+    to the filter size and origin. The output line must be modified
+    in-place with the result.
+
+    Parameters
+    ----------
+    %(input)s
+    function : {callable, scipy.LowLevelCallable}
+        Function to apply along given axis.
+    filter_size : scalar
+        Length of the filter.
+    %(axis)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin)s
+    %(extra_arguments)s
+    %(extra_keywords)s
+
+    Returns
+    -------
+    generic_filter1d : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    This function also accepts low-level callback functions with one of
+    the following signatures and wrapped in `scipy.LowLevelCallable`:
+
+    .. code:: c
+
+       int function(double *input_line, npy_intp input_length,
+                    double *output_line, npy_intp output_length,
+                    void *user_data)
+       int function(double *input_line, intptr_t input_length,
+                    double *output_line, intptr_t output_length,
+                    void *user_data)
+
+    The calling function iterates over the lines of the input and output
+    arrays, calling the callback function at each line. The current line
+    is extended according to the border conditions set by the calling
+    function, and the result is copied into the array that is passed
+    through ``input_line``. The length of the input line (after extension)
+    is passed through ``input_length``. The callback function should apply
+    the filter and store the result in the array passed through
+    ``output_line``. The length of the output line is passed through
+    ``output_length``. ``user_data`` is the data pointer provided
+    to `scipy.LowLevelCallable` as-is.
+
+    The callback function must return an integer error status that is zero
+    if something went wrong and one otherwise. If an error occurs, you should
+    normally set the python error status with an informative message
+    before returning, otherwise a default error message is set by the
+    calling function.
+
+    In addition, some other low-level function pointer specifications
+    are accepted, but these are for backward compatibility only and should
+    not be used in new code.
+
+    """
+    if extra_keywords is None:
+        extra_keywords = {}
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    output = _ni_support._get_output(output, input)
+    if filter_size < 1:
+        raise RuntimeError('invalid filter size')
+    axis = normalize_axis_index(axis, input.ndim)
+    if (filter_size // 2 + origin < 0) or (filter_size // 2 + origin >=
+                                           filter_size):
+        raise ValueError('invalid origin')
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.generic_filter1d(input, function, filter_size, axis, output,
+                               mode, cval, origin, extra_arguments,
+                               extra_keywords)
+    return output
+
+
+@_ni_docstrings.docfiller
+def generic_filter(input, function, size=None, footprint=None,
+                   output=None, mode="reflect", cval=0.0, origin=0,
+                   extra_arguments=(), extra_keywords=None, *, axes=None):
+    """Calculate a multidimensional filter using the given function.
+
+    At each element the provided function is called. The input values
+    within the filter footprint at that element are passed to the function
+    as a 1-D array of double values.
+
+    Parameters
+    ----------
+    %(input)s
+    function : {callable, scipy.LowLevelCallable}
+        Function to apply at each element.
+    %(size_foot)s
+    %(output)s
+    %(mode_reflect)s
+    %(cval)s
+    %(origin_multiple)s
+    %(extra_arguments)s
+    %(extra_keywords)s
+    axes : tuple of int or None, optional
+        If None, `input` is filtered along all axes. Otherwise,
+        `input` is filtered along the specified axes. When `axes` is
+        specified, any tuples used for `size` or `origin` must match the length
+        of `axes`. The ith entry in any of these tuples corresponds to the ith
+        entry in `axes`.
+
+    Returns
+    -------
+    generic_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    Notes
+    -----
+    This function also accepts low-level callback functions with one of
+    the following signatures and wrapped in `scipy.LowLevelCallable`:
+
+    .. code:: c
+
+       int callback(double *buffer, npy_intp filter_size,
+                    double *return_value, void *user_data)
+       int callback(double *buffer, intptr_t filter_size,
+                    double *return_value, void *user_data)
+
+    The calling function iterates over the elements of the input and
+    output arrays, calling the callback function at each element. The
+    elements within the footprint of the filter at the current element are
+    passed through the ``buffer`` parameter, and the number of elements
+    within the footprint through ``filter_size``. The calculated value is
+    returned in ``return_value``. ``user_data`` is the data pointer provided
+    to `scipy.LowLevelCallable` as-is.
+
+    The callback function must return an integer error status that is zero
+    if something went wrong and one otherwise. If an error occurs, you should
+    normally set the python error status with an informative message
+    before returning, otherwise a default error message is set by the
+    calling function.
+
+    In addition, some other low-level function pointer specifications
+    are accepted, but these are for backward compatibility only and should
+    not be used in new code.
+
+    Examples
+    --------
+    Import the necessary modules and load the example image used for
+    filtering.
+
+    >>> import numpy as np
+    >>> from scipy import datasets
+    >>> from scipy.ndimage import zoom, generic_filter
+    >>> import matplotlib.pyplot as plt
+    >>> ascent = zoom(datasets.ascent(), 0.5)
+
+    Compute a maximum filter with kernel size 5 by passing a simple NumPy
+    aggregation function as argument to `function`.
+
+    >>> maximum_filter_result = generic_filter(ascent, np.amax, [5, 5])
+
+    While a maximum filter could also directly be obtained using
+    `maximum_filter`, `generic_filter` allows generic Python function or
+    `scipy.LowLevelCallable` to be used as a filter. Here, we compute the
+    range between maximum and minimum value as an example for a kernel size
+    of 5.
+
+    >>> def custom_filter(image):
+    ...     return np.amax(image) - np.amin(image)
+    >>> custom_filter_result = generic_filter(ascent, custom_filter, [5, 5])
+
+    Plot the original and filtered images.
+
+    >>> fig, axes = plt.subplots(3, 1, figsize=(3, 9))
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> top, middle, bottom = axes
+    >>> for ax in axes:
+    ...     ax.set_axis_off()  # remove coordinate system
+    >>> top.imshow(ascent)
+    >>> top.set_title("Original image")
+    >>> middle.imshow(maximum_filter_result)
+    >>> middle.set_title("Maximum filter, Kernel: 5x5")
+    >>> bottom.imshow(custom_filter_result)
+    >>> bottom.set_title("Custom filter, Kernel: 5x5")
+    >>> fig.tight_layout()
+
+    """
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=2)
+    if extra_keywords is None:
+        extra_keywords = {}
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if footprint is None:
+        if size is None:
+            raise RuntimeError("no footprint or filter size provided")
+        sizes = _ni_support._normalize_sequence(size, num_axes)
+        footprint = np.ones(sizes, dtype=bool)
+    else:
+        footprint = np.asarray(footprint, dtype=bool)
+
+    # expand origins, footprint if num_axes < input.ndim
+    footprint = _expand_footprint(input.ndim, axes, footprint)
+    origins = _expand_origin(input.ndim, axes, origin)
+
+    fshape = [ii for ii in footprint.shape if ii > 0]
+    if len(fshape) != input.ndim:
+        raise RuntimeError(f"footprint.ndim ({footprint.ndim}) "
+                           f"must match len(axes) ({num_axes})")
+    for origin, lenf in zip(origins, fshape):
+        if (lenf // 2 + origin < 0) or (lenf // 2 + origin >= lenf):
+            raise ValueError('invalid origin')
+    if not footprint.flags.contiguous:
+        footprint = footprint.copy()
+    output = _ni_support._get_output(output, input)
+
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.generic_filter(input, function, footprint, output, mode,
+                             cval, origins, extra_arguments, extra_keywords)
+    return output
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_fourier.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_fourier.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb5ffa6b9287cb740611aefba5f1f322011518cf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_fourier.py
@@ -0,0 +1,306 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import numpy as np
+from scipy._lib._util import normalize_axis_index
+from . import _ni_support
+from . import _nd_image
+
+__all__ = ['fourier_gaussian', 'fourier_uniform', 'fourier_ellipsoid',
+           'fourier_shift']
+
+
+def _get_output_fourier(output, input):
+    if output is None:
+        if input.dtype.type in [np.complex64, np.complex128, np.float32]:
+            output = np.zeros(input.shape, dtype=input.dtype)
+        else:
+            output = np.zeros(input.shape, dtype=np.float64)
+    elif type(output) is type:
+        if output not in [np.complex64, np.complex128,
+                          np.float32, np.float64]:
+            raise RuntimeError("output type not supported")
+        output = np.zeros(input.shape, dtype=output)
+    elif output.shape != input.shape:
+        raise RuntimeError("output shape not correct")
+    return output
+
+
+def _get_output_fourier_complex(output, input):
+    if output is None:
+        if input.dtype.type in [np.complex64, np.complex128]:
+            output = np.zeros(input.shape, dtype=input.dtype)
+        else:
+            output = np.zeros(input.shape, dtype=np.complex128)
+    elif type(output) is type:
+        if output not in [np.complex64, np.complex128]:
+            raise RuntimeError("output type not supported")
+        output = np.zeros(input.shape, dtype=output)
+    elif output.shape != input.shape:
+        raise RuntimeError("output shape not correct")
+    return output
+
+
+def fourier_gaussian(input, sigma, n=-1, axis=-1, output=None):
+    """
+    Multidimensional Gaussian fourier filter.
+
+    The array is multiplied with the fourier transform of a Gaussian
+    kernel.
+
+    Parameters
+    ----------
+    input : array_like
+        The input array.
+    sigma : float or sequence
+        The sigma of the Gaussian kernel. If a float, `sigma` is the same for
+        all axes. If a sequence, `sigma` has to contain one value for each
+        axis.
+    n : int, optional
+        If `n` is negative (default), then the input is assumed to be the
+        result of a complex fft.
+        If `n` is larger than or equal to zero, the input is assumed to be the
+        result of a real fft, and `n` gives the length of the array before
+        transformation along the real transform direction.
+    axis : int, optional
+        The axis of the real transform.
+    output : ndarray, optional
+        If given, the result of filtering the input is placed in this array.
+
+    Returns
+    -------
+    fourier_gaussian : ndarray
+        The filtered input.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import numpy.fft
+    >>> import matplotlib.pyplot as plt
+    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ascent = datasets.ascent()
+    >>> input_ = numpy.fft.fft2(ascent)
+    >>> result = ndimage.fourier_gaussian(input_, sigma=4)
+    >>> result = numpy.fft.ifft2(result)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    output = _get_output_fourier(output, input)
+    axis = normalize_axis_index(axis, input.ndim)
+    sigmas = _ni_support._normalize_sequence(sigma, input.ndim)
+    sigmas = np.asarray(sigmas, dtype=np.float64)
+    if not sigmas.flags.contiguous:
+        sigmas = sigmas.copy()
+
+    _nd_image.fourier_filter(input, sigmas, n, axis, output, 0)
+    return output
+
+
+def fourier_uniform(input, size, n=-1, axis=-1, output=None):
+    """
+    Multidimensional uniform fourier filter.
+
+    The array is multiplied with the Fourier transform of a box of given
+    size.
+
+    Parameters
+    ----------
+    input : array_like
+        The input array.
+    size : float or sequence
+        The size of the box used for filtering.
+        If a float, `size` is the same for all axes. If a sequence, `size` has
+        to contain one value for each axis.
+    n : int, optional
+        If `n` is negative (default), then the input is assumed to be the
+        result of a complex fft.
+        If `n` is larger than or equal to zero, the input is assumed to be the
+        result of a real fft, and `n` gives the length of the array before
+        transformation along the real transform direction.
+    axis : int, optional
+        The axis of the real transform.
+    output : ndarray, optional
+        If given, the result of filtering the input is placed in this array.
+
+    Returns
+    -------
+    fourier_uniform : ndarray
+        The filtered input.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import numpy.fft
+    >>> import matplotlib.pyplot as plt
+    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ascent = datasets.ascent()
+    >>> input_ = numpy.fft.fft2(ascent)
+    >>> result = ndimage.fourier_uniform(input_, size=20)
+    >>> result = numpy.fft.ifft2(result)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    output = _get_output_fourier(output, input)
+    axis = normalize_axis_index(axis, input.ndim)
+    sizes = _ni_support._normalize_sequence(size, input.ndim)
+    sizes = np.asarray(sizes, dtype=np.float64)
+    if not sizes.flags.contiguous:
+        sizes = sizes.copy()
+    _nd_image.fourier_filter(input, sizes, n, axis, output, 1)
+    return output
+
+
+def fourier_ellipsoid(input, size, n=-1, axis=-1, output=None):
+    """
+    Multidimensional ellipsoid Fourier filter.
+
+    The array is multiplied with the fourier transform of an ellipsoid of
+    given sizes.
+
+    Parameters
+    ----------
+    input : array_like
+        The input array.
+    size : float or sequence
+        The size of the box used for filtering.
+        If a float, `size` is the same for all axes. If a sequence, `size` has
+        to contain one value for each axis.
+    n : int, optional
+        If `n` is negative (default), then the input is assumed to be the
+        result of a complex fft.
+        If `n` is larger than or equal to zero, the input is assumed to be the
+        result of a real fft, and `n` gives the length of the array before
+        transformation along the real transform direction.
+    axis : int, optional
+        The axis of the real transform.
+    output : ndarray, optional
+        If given, the result of filtering the input is placed in this array.
+
+    Returns
+    -------
+    fourier_ellipsoid : ndarray
+        The filtered input.
+
+    Notes
+    -----
+    This function is implemented for arrays of rank 1, 2, or 3.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import numpy.fft
+    >>> import matplotlib.pyplot as plt
+    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ascent = datasets.ascent()
+    >>> input_ = numpy.fft.fft2(ascent)
+    >>> result = ndimage.fourier_ellipsoid(input_, size=20)
+    >>> result = numpy.fft.ifft2(result)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    if input.ndim > 3:
+        raise NotImplementedError("Only 1d, 2d and 3d inputs are supported")
+    output = _get_output_fourier(output, input)
+    if output.size == 0:
+        # The C code has a bug that can result in a segfault with arrays
+        # that have size 0 (gh-17270), so check here.
+        return output
+    axis = normalize_axis_index(axis, input.ndim)
+    sizes = _ni_support._normalize_sequence(size, input.ndim)
+    sizes = np.asarray(sizes, dtype=np.float64)
+    if not sizes.flags.contiguous:
+        sizes = sizes.copy()
+    _nd_image.fourier_filter(input, sizes, n, axis, output, 2)
+    return output
+
+
+def fourier_shift(input, shift, n=-1, axis=-1, output=None):
+    """
+    Multidimensional Fourier shift filter.
+
+    The array is multiplied with the Fourier transform of a shift operation.
+
+    Parameters
+    ----------
+    input : array_like
+        The input array.
+    shift : float or sequence
+        The size of the box used for filtering.
+        If a float, `shift` is the same for all axes. If a sequence, `shift`
+        has to contain one value for each axis.
+    n : int, optional
+        If `n` is negative (default), then the input is assumed to be the
+        result of a complex fft.
+        If `n` is larger than or equal to zero, the input is assumed to be the
+        result of a real fft, and `n` gives the length of the array before
+        transformation along the real transform direction.
+    axis : int, optional
+        The axis of the real transform.
+    output : ndarray, optional
+        If given, the result of shifting the input is placed in this array.
+
+    Returns
+    -------
+    fourier_shift : ndarray
+        The shifted input.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> import numpy.fft
+    >>> fig, (ax1, ax2) = plt.subplots(1, 2)
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> ascent = datasets.ascent()
+    >>> input_ = numpy.fft.fft2(ascent)
+    >>> result = ndimage.fourier_shift(input_, shift=200)
+    >>> result = numpy.fft.ifft2(result)
+    >>> ax1.imshow(ascent)
+    >>> ax2.imshow(result.real)  # the imaginary part is an artifact
+    >>> plt.show()
+    """
+    input = np.asarray(input)
+    output = _get_output_fourier_complex(output, input)
+    axis = normalize_axis_index(axis, input.ndim)
+    shifts = _ni_support._normalize_sequence(shift, input.ndim)
+    shifts = np.asarray(shifts, dtype=np.float64)
+    if not shifts.flags.contiguous:
+        shifts = shifts.copy()
+    _nd_image.fourier_shift(input, shifts, n, axis, output)
+    return output
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_interpolation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_interpolation.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e4ea94184871fe87f848532b21e2def29bd406b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_interpolation.py
@@ -0,0 +1,1003 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import itertools
+import warnings
+
+import numpy as np
+from scipy._lib._util import normalize_axis_index
+
+from scipy import special
+from . import _ni_support
+from . import _nd_image
+from ._ni_docstrings import docfiller
+
+
+__all__ = ['spline_filter1d', 'spline_filter', 'geometric_transform',
+           'map_coordinates', 'affine_transform', 'shift', 'zoom', 'rotate']
+
+
+@docfiller
+def spline_filter1d(input, order=3, axis=-1, output=np.float64,
+                    mode='mirror'):
+    """
+    Calculate a 1-D spline filter along the given axis.
+
+    The lines of the array along the given axis are filtered by a
+    spline filter. The order of the spline must be >= 2 and <= 5.
+
+    Parameters
+    ----------
+    %(input)s
+    order : int, optional
+        The order of the spline, default is 3.
+    axis : int, optional
+        The axis along which the spline filter is applied. Default is the last
+        axis.
+    output : ndarray or dtype, optional
+        The array in which to place the output, or the dtype of the returned
+        array. Default is ``numpy.float64``.
+    %(mode_interp_mirror)s
+
+    Returns
+    -------
+    spline_filter1d : ndarray
+        The filtered input.
+
+    See Also
+    --------
+    spline_filter : Multidimensional spline filter.
+
+    Notes
+    -----
+    All of the interpolation functions in `ndimage` do spline interpolation of
+    the input image. If using B-splines of `order > 1`, the input image
+    values have to be converted to B-spline coefficients first, which is
+    done by applying this 1-D filter sequentially along all
+    axes of the input. All functions that require B-spline coefficients
+    will automatically filter their inputs, a behavior controllable with
+    the `prefilter` keyword argument. For functions that accept a `mode`
+    parameter, the result will only be correct if it matches the `mode`
+    used when filtering.
+
+    For complex-valued `input`, this function processes the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    We can filter an image using 1-D spline along the given axis:
+
+    >>> from scipy.ndimage import spline_filter1d
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> orig_img = np.eye(20)  # create an image
+    >>> orig_img[10, :] = 1.0
+    >>> sp_filter_axis_0 = spline_filter1d(orig_img, axis=0)
+    >>> sp_filter_axis_1 = spline_filter1d(orig_img, axis=1)
+    >>> f, ax = plt.subplots(1, 3, sharex=True)
+    >>> for ind, data in enumerate([[orig_img, "original image"],
+    ...             [sp_filter_axis_0, "spline filter (axis=0)"],
+    ...             [sp_filter_axis_1, "spline filter (axis=1)"]]):
+    ...     ax[ind].imshow(data[0], cmap='gray_r')
+    ...     ax[ind].set_title(data[1])
+    >>> plt.tight_layout()
+    >>> plt.show()
+
+    """
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input,
+                                     complex_output=complex_output)
+    if complex_output:
+        spline_filter1d(input.real, order, axis, output.real, mode)
+        spline_filter1d(input.imag, order, axis, output.imag, mode)
+        return output
+    if order in [0, 1]:
+        output[...] = np.array(input)
+    else:
+        mode = _ni_support._extend_mode_to_code(mode)
+        axis = normalize_axis_index(axis, input.ndim)
+        _nd_image.spline_filter1d(input, order, axis, output, mode)
+    return output
+
+@docfiller
+def spline_filter(input, order=3, output=np.float64, mode='mirror'):
+    """
+    Multidimensional spline filter.
+
+    Parameters
+    ----------
+    %(input)s
+    order : int, optional
+        The order of the spline, default is 3.
+    output : ndarray or dtype, optional
+        The array in which to place the output, or the dtype of the returned
+        array. Default is ``numpy.float64``.
+    %(mode_interp_mirror)s
+
+    Returns
+    -------
+    spline_filter : ndarray
+        Filtered array. Has the same shape as `input`.
+
+    See Also
+    --------
+    spline_filter1d : Calculate a 1-D spline filter along the given axis.
+
+    Notes
+    -----
+    The multidimensional filter is implemented as a sequence of
+    1-D spline filters. The intermediate arrays are stored
+    in the same data type as the output. Therefore, for output types
+    with a limited precision, the results may be imprecise because
+    intermediate results may be stored with insufficient precision.
+
+    For complex-valued `input`, this function processes the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    We can filter an image using multidimensional splines:
+
+    >>> from scipy.ndimage import spline_filter
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> orig_img = np.eye(20)  # create an image
+    >>> orig_img[10, :] = 1.0
+    >>> sp_filter = spline_filter(orig_img, order=3)
+    >>> f, ax = plt.subplots(1, 2, sharex=True)
+    >>> for ind, data in enumerate([[orig_img, "original image"],
+    ...                             [sp_filter, "spline filter"]]):
+    ...     ax[ind].imshow(data[0], cmap='gray_r')
+    ...     ax[ind].set_title(data[1])
+    >>> plt.tight_layout()
+    >>> plt.show()
+
+    """
+    if order < 2 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input,
+                                     complex_output=complex_output)
+    if complex_output:
+        spline_filter(input.real, order, output.real, mode)
+        spline_filter(input.imag, order, output.imag, mode)
+        return output
+    if order not in [0, 1] and input.ndim > 0:
+        for axis in range(input.ndim):
+            spline_filter1d(input, order, axis, output=output, mode=mode)
+            input = output
+    else:
+        output[...] = input[...]
+    return output
+
+
+def _prepad_for_spline_filter(input, mode, cval):
+    if mode in ['nearest', 'grid-constant']:
+        npad = 12
+        if mode == 'grid-constant':
+            padded = np.pad(input, npad, mode='constant',
+                               constant_values=cval)
+        elif mode == 'nearest':
+            padded = np.pad(input, npad, mode='edge')
+    else:
+        # other modes have exact boundary conditions implemented so
+        # no prepadding is needed
+        npad = 0
+        padded = input
+    return padded, npad
+
+
+@docfiller
+def geometric_transform(input, mapping, output_shape=None,
+                        output=None, order=3,
+                        mode='constant', cval=0.0, prefilter=True,
+                        extra_arguments=(), extra_keywords=None):
+    """
+    Apply an arbitrary geometric transform.
+
+    The given mapping function is used to find, for each point in the
+    output, the corresponding coordinates in the input. The value of the
+    input at those coordinates is determined by spline interpolation of
+    the requested order.
+
+    Parameters
+    ----------
+    %(input)s
+    mapping : {callable, scipy.LowLevelCallable}
+        A callable object that accepts a tuple of length equal to the output
+        array rank, and returns the corresponding input coordinates as a tuple
+        of length equal to the input array rank.
+    output_shape : tuple of ints, optional
+        Shape tuple.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+    extra_arguments : tuple, optional
+        Extra arguments passed to `mapping`.
+    extra_keywords : dict, optional
+        Extra keywords passed to `mapping`.
+
+    Returns
+    -------
+    output : ndarray
+        The filtered input.
+
+    See Also
+    --------
+    map_coordinates, affine_transform, spline_filter1d
+
+
+    Notes
+    -----
+    This function also accepts low-level callback functions with one
+    the following signatures and wrapped in `scipy.LowLevelCallable`:
+
+    .. code:: c
+
+       int mapping(npy_intp *output_coordinates, double *input_coordinates,
+                   int output_rank, int input_rank, void *user_data)
+       int mapping(intptr_t *output_coordinates, double *input_coordinates,
+                   int output_rank, int input_rank, void *user_data)
+
+    The calling function iterates over the elements of the output array,
+    calling the callback function at each element. The coordinates of the
+    current output element are passed through ``output_coordinates``. The
+    callback function must return the coordinates at which the input must
+    be interpolated in ``input_coordinates``. The rank of the input and
+    output arrays are given by ``input_rank`` and ``output_rank``
+    respectively. ``user_data`` is the data pointer provided
+    to `scipy.LowLevelCallable` as-is.
+
+    The callback function must return an integer error status that is zero
+    if something went wrong and one otherwise. If an error occurs, you should
+    normally set the Python error status with an informative message
+    before returning, otherwise a default error message is set by the
+    calling function.
+
+    In addition, some other low-level function pointer specifications
+    are accepted, but these are for backward compatibility only and should
+    not be used in new code.
+
+    For complex-valued `input`, this function transforms the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.ndimage import geometric_transform
+    >>> a = np.arange(12.).reshape((4, 3))
+    >>> def shift_func(output_coords):
+    ...     return (output_coords[0] - 0.5, output_coords[1] - 0.5)
+    ...
+    >>> geometric_transform(a, shift_func)
+    array([[ 0.   ,  0.   ,  0.   ],
+           [ 0.   ,  1.362,  2.738],
+           [ 0.   ,  4.812,  6.187],
+           [ 0.   ,  8.263,  9.637]])
+
+    >>> b = [1, 2, 3, 4, 5]
+    >>> def shift_func(output_coords):
+    ...     return (output_coords[0] - 3,)
+    ...
+    >>> geometric_transform(b, shift_func, mode='constant')
+    array([0, 0, 0, 1, 2])
+    >>> geometric_transform(b, shift_func, mode='nearest')
+    array([1, 1, 1, 1, 2])
+    >>> geometric_transform(b, shift_func, mode='reflect')
+    array([3, 2, 1, 1, 2])
+    >>> geometric_transform(b, shift_func, mode='wrap')
+    array([2, 3, 4, 1, 2])
+
+    """
+    if extra_keywords is None:
+        extra_keywords = {}
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    if output_shape is None:
+        output_shape = input.shape
+    if input.ndim < 1 or len(output_shape) < 1:
+        raise RuntimeError('input and output rank must be > 0')
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input, shape=output_shape,
+                                     complex_output=complex_output)
+    if complex_output:
+        kwargs = dict(order=order, mode=mode, prefilter=prefilter,
+                      output_shape=output_shape,
+                      extra_arguments=extra_arguments,
+                      extra_keywords=extra_keywords)
+        geometric_transform(input.real, mapping, output=output.real,
+                            cval=np.real(cval), **kwargs)
+        geometric_transform(input.imag, mapping, output=output.imag,
+                            cval=np.imag(cval), **kwargs)
+        return output
+
+    if prefilter and order > 1:
+        padded, npad = _prepad_for_spline_filter(input, mode, cval)
+        filtered = spline_filter(padded, order, output=np.float64,
+                                 mode=mode)
+    else:
+        npad = 0
+        filtered = input
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.geometric_transform(filtered, mapping, None, None, None, output,
+                                  order, mode, cval, npad, extra_arguments,
+                                  extra_keywords)
+    return output
+
+
+@docfiller
+def map_coordinates(input, coordinates, output=None, order=3,
+                    mode='constant', cval=0.0, prefilter=True):
+    """
+    Map the input array to new coordinates by interpolation.
+
+    The array of coordinates is used to find, for each point in the output,
+    the corresponding coordinates in the input. The value of the input at
+    those coordinates is determined by spline interpolation of the
+    requested order.
+
+    The shape of the output is derived from that of the coordinate
+    array by dropping the first axis. The values of the array along
+    the first axis are the coordinates in the input array at which the
+    output value is found.
+
+    Parameters
+    ----------
+    %(input)s
+    coordinates : array_like
+        The coordinates at which `input` is evaluated.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+
+    Returns
+    -------
+    map_coordinates : ndarray
+        The result of transforming the input. The shape of the output is
+        derived from that of `coordinates` by dropping the first axis.
+
+    See Also
+    --------
+    spline_filter, geometric_transform, scipy.interpolate
+
+    Notes
+    -----
+    For complex-valued `input`, this function maps the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.arange(12.).reshape((4, 3))
+    >>> a
+    array([[  0.,   1.,   2.],
+           [  3.,   4.,   5.],
+           [  6.,   7.,   8.],
+           [  9.,  10.,  11.]])
+    >>> ndimage.map_coordinates(a, [[0.5, 2], [0.5, 1]], order=1)
+    array([ 2.,  7.])
+
+    Above, the interpolated value of a[0.5, 0.5] gives output[0], while
+    a[2, 1] is output[1].
+
+    >>> inds = np.array([[0.5, 2], [0.5, 4]])
+    >>> ndimage.map_coordinates(a, inds, order=1, cval=-33.3)
+    array([  2. , -33.3])
+    >>> ndimage.map_coordinates(a, inds, order=1, mode='nearest')
+    array([ 2.,  8.])
+    >>> ndimage.map_coordinates(a, inds, order=1, cval=0, output=bool)
+    array([ True, False], dtype=bool)
+
+    """
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    coordinates = np.asarray(coordinates)
+    if np.iscomplexobj(coordinates):
+        raise TypeError('Complex type not supported')
+    output_shape = coordinates.shape[1:]
+    if input.ndim < 1 or len(output_shape) < 1:
+        raise RuntimeError('input and output rank must be > 0')
+    if coordinates.shape[0] != input.ndim:
+        raise RuntimeError('invalid shape for coordinate array')
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input, shape=output_shape,
+                                     complex_output=complex_output)
+    if complex_output:
+        kwargs = dict(order=order, mode=mode, prefilter=prefilter)
+        map_coordinates(input.real, coordinates, output=output.real,
+                        cval=np.real(cval), **kwargs)
+        map_coordinates(input.imag, coordinates, output=output.imag,
+                        cval=np.imag(cval), **kwargs)
+        return output
+    if prefilter and order > 1:
+        padded, npad = _prepad_for_spline_filter(input, mode, cval)
+        filtered = spline_filter(padded, order, output=np.float64, mode=mode)
+    else:
+        npad = 0
+        filtered = input
+    mode = _ni_support._extend_mode_to_code(mode)
+    _nd_image.geometric_transform(filtered, None, coordinates, None, None,
+                                  output, order, mode, cval, npad, None, None)
+    return output
+
+
+@docfiller
+def affine_transform(input, matrix, offset=0.0, output_shape=None,
+                     output=None, order=3,
+                     mode='constant', cval=0.0, prefilter=True):
+    """
+    Apply an affine transformation.
+
+    Given an output image pixel index vector ``o``, the pixel value
+    is determined from the input image at position
+    ``np.dot(matrix, o) + offset``.
+
+    This does 'pull' (or 'backward') resampling, transforming the output space
+    to the input to locate data. Affine transformations are often described in
+    the 'push' (or 'forward') direction, transforming input to output. If you
+    have a matrix for the 'push' transformation, use its inverse
+    (:func:`numpy.linalg.inv`) in this function.
+
+    Parameters
+    ----------
+    %(input)s
+    matrix : ndarray
+        The inverse coordinate transformation matrix, mapping output
+        coordinates to input coordinates. If ``ndim`` is the number of
+        dimensions of ``input``, the given matrix must have one of the
+        following shapes:
+
+            - ``(ndim, ndim)``: the linear transformation matrix for each
+              output coordinate.
+            - ``(ndim,)``: assume that the 2-D transformation matrix is
+              diagonal, with the diagonal specified by the given value. A more
+              efficient algorithm is then used that exploits the separability
+              of the problem.
+            - ``(ndim + 1, ndim + 1)``: assume that the transformation is
+              specified using homogeneous coordinates [1]_. In this case, any
+              value passed to ``offset`` is ignored.
+            - ``(ndim, ndim + 1)``: as above, but the bottom row of a
+              homogeneous transformation matrix is always ``[0, 0, ..., 1]``,
+              and may be omitted.
+
+    offset : float or sequence, optional
+        The offset into the array where the transform is applied. If a float,
+        `offset` is the same for each axis. If a sequence, `offset` should
+        contain one value for each axis.
+    output_shape : tuple of ints, optional
+        Shape tuple.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+
+    Returns
+    -------
+    affine_transform : ndarray
+        The transformed input.
+
+    Notes
+    -----
+    The given matrix and offset are used to find for each point in the
+    output the corresponding coordinates in the input by an affine
+    transformation. The value of the input at those coordinates is
+    determined by spline interpolation of the requested order. Points
+    outside the boundaries of the input are filled according to the given
+    mode.
+
+    .. versionchanged:: 0.18.0
+        Previously, the exact interpretation of the affine transformation
+        depended on whether the matrix was supplied as a 1-D or a
+        2-D array. If a 1-D array was supplied
+        to the matrix parameter, the output pixel value at index ``o``
+        was determined from the input image at position
+        ``matrix * (o + offset)``.
+
+    For complex-valued `input`, this function transforms the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Homogeneous_coordinates
+    """
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    if output_shape is None:
+        if isinstance(output, np.ndarray):
+            output_shape = output.shape
+        else:
+            output_shape = input.shape
+    if input.ndim < 1 or len(output_shape) < 1:
+        raise RuntimeError('input and output rank must be > 0')
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input, shape=output_shape,
+                                     complex_output=complex_output)
+    if complex_output:
+        kwargs = dict(offset=offset, output_shape=output_shape, order=order,
+                      mode=mode, prefilter=prefilter)
+        affine_transform(input.real, matrix, output=output.real,
+                         cval=np.real(cval), **kwargs)
+        affine_transform(input.imag, matrix, output=output.imag,
+                         cval=np.imag(cval), **kwargs)
+        return output
+    if prefilter and order > 1:
+        padded, npad = _prepad_for_spline_filter(input, mode, cval)
+        filtered = spline_filter(padded, order, output=np.float64, mode=mode)
+    else:
+        npad = 0
+        filtered = input
+    mode = _ni_support._extend_mode_to_code(mode)
+    matrix = np.asarray(matrix, dtype=np.float64)
+    if matrix.ndim not in [1, 2] or matrix.shape[0] < 1:
+        raise RuntimeError('no proper affine matrix provided')
+    if (matrix.ndim == 2 and matrix.shape[1] == input.ndim + 1 and
+            (matrix.shape[0] in [input.ndim, input.ndim + 1])):
+        if matrix.shape[0] == input.ndim + 1:
+            exptd = [0] * input.ndim + [1]
+            if not np.all(matrix[input.ndim] == exptd):
+                msg = (f'Expected homogeneous transformation matrix with '
+                       f'shape {matrix.shape} for image shape {input.shape}, '
+                       f'but bottom row was not equal to {exptd}')
+                raise ValueError(msg)
+        # assume input is homogeneous coordinate transformation matrix
+        offset = matrix[:input.ndim, input.ndim]
+        matrix = matrix[:input.ndim, :input.ndim]
+    if matrix.shape[0] != input.ndim:
+        raise RuntimeError('affine matrix has wrong number of rows')
+    if matrix.ndim == 2 and matrix.shape[1] != output.ndim:
+        raise RuntimeError('affine matrix has wrong number of columns')
+    if not matrix.flags.contiguous:
+        matrix = matrix.copy()
+    offset = _ni_support._normalize_sequence(offset, input.ndim)
+    offset = np.asarray(offset, dtype=np.float64)
+    if offset.ndim != 1 or offset.shape[0] < 1:
+        raise RuntimeError('no proper offset provided')
+    if not offset.flags.contiguous:
+        offset = offset.copy()
+    if matrix.ndim == 1:
+        warnings.warn(
+            "The behavior of affine_transform with a 1-D "
+            "array supplied for the matrix parameter has changed in "
+            "SciPy 0.18.0.",
+            stacklevel=2
+        )
+        _nd_image.zoom_shift(filtered, matrix, offset/matrix, output, order,
+                             mode, cval, npad, False)
+    else:
+        _nd_image.geometric_transform(filtered, None, None, matrix, offset,
+                                      output, order, mode, cval, npad, None,
+                                      None)
+    return output
+
+
+@docfiller
+def shift(input, shift, output=None, order=3, mode='constant', cval=0.0,
+          prefilter=True):
+    """
+    Shift an array.
+
+    The array is shifted using spline interpolation of the requested order.
+    Points outside the boundaries of the input are filled according to the
+    given mode.
+
+    Parameters
+    ----------
+    %(input)s
+    shift : float or sequence
+        The shift along the axes. If a float, `shift` is the same for each
+        axis. If a sequence, `shift` should contain one value for each axis.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+
+    Returns
+    -------
+    shift : ndarray
+        The shifted input.
+
+    See Also
+    --------
+    affine_transform : Affine transformations
+
+    Notes
+    -----
+    For complex-valued `input`, this function shifts the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    Import the necessary modules and an exemplary image.
+
+    >>> from scipy.ndimage import shift
+    >>> import matplotlib.pyplot as plt
+    >>> from scipy import datasets
+    >>> image = datasets.ascent()
+
+    Shift the image vertically by 20 pixels.
+
+    >>> image_shifted_vertically = shift(image, (20, 0))
+
+    Shift the image vertically by -200 pixels and horizontally by 100 pixels.
+
+    >>> image_shifted_both_directions = shift(image, (-200, 100))
+
+    Plot the original and the shifted images.
+
+    >>> fig, axes = plt.subplots(3, 1, figsize=(4, 12))
+    >>> plt.gray()  # show the filtered result in grayscale
+    >>> top, middle, bottom = axes
+    >>> for ax in axes:
+    ...     ax.set_axis_off()  # remove coordinate system
+    >>> top.imshow(image)
+    >>> top.set_title("Original image")
+    >>> middle.imshow(image_shifted_vertically)
+    >>> middle.set_title("Vertically shifted image")
+    >>> bottom.imshow(image_shifted_both_directions)
+    >>> bottom.set_title("Image shifted in both directions")
+    >>> fig.tight_layout()
+    """
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    if input.ndim < 1:
+        raise RuntimeError('input and output rank must be > 0')
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input, complex_output=complex_output)
+    if complex_output:
+        # import under different name to avoid confusion with shift parameter
+        from scipy.ndimage._interpolation import shift as _shift
+
+        kwargs = dict(order=order, mode=mode, prefilter=prefilter)
+        _shift(input.real, shift, output=output.real, cval=np.real(cval), **kwargs)
+        _shift(input.imag, shift, output=output.imag, cval=np.imag(cval), **kwargs)
+        return output
+    if prefilter and order > 1:
+        padded, npad = _prepad_for_spline_filter(input, mode, cval)
+        filtered = spline_filter(padded, order, output=np.float64, mode=mode)
+    else:
+        npad = 0
+        filtered = input
+    mode = _ni_support._extend_mode_to_code(mode)
+    shift = _ni_support._normalize_sequence(shift, input.ndim)
+    shift = [-ii for ii in shift]
+    shift = np.asarray(shift, dtype=np.float64)
+    if not shift.flags.contiguous:
+        shift = shift.copy()
+    _nd_image.zoom_shift(filtered, None, shift, output, order, mode, cval,
+                         npad, False)
+    return output
+
+
+@docfiller
+def zoom(input, zoom, output=None, order=3, mode='constant', cval=0.0,
+         prefilter=True, *, grid_mode=False):
+    """
+    Zoom an array.
+
+    The array is zoomed using spline interpolation of the requested order.
+
+    Parameters
+    ----------
+    %(input)s
+    zoom : float or sequence
+        The zoom factor along the axes. If a float, `zoom` is the same for each
+        axis. If a sequence, `zoom` should contain one value for each axis.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+    grid_mode : bool, optional
+        If False, the distance from the pixel centers is zoomed. Otherwise, the
+        distance including the full pixel extent is used. For example, a 1d
+        signal of length 5 is considered to have length 4 when `grid_mode` is
+        False, but length 5 when `grid_mode` is True. See the following
+        visual illustration:
+
+        .. code-block:: text
+
+                | pixel 1 | pixel 2 | pixel 3 | pixel 4 | pixel 5 |
+                     |<-------------------------------------->|
+                                        vs.
+                |<----------------------------------------------->|
+
+        The starting point of the arrow in the diagram above corresponds to
+        coordinate location 0 in each mode.
+
+    Returns
+    -------
+    zoom : ndarray
+        The zoomed input.
+
+    Notes
+    -----
+    For complex-valued `input`, this function zooms the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+
+    >>> fig = plt.figure()
+    >>> ax1 = fig.add_subplot(121)  # left side
+    >>> ax2 = fig.add_subplot(122)  # right side
+    >>> ascent = datasets.ascent()
+    >>> result = ndimage.zoom(ascent, 3.0)
+    >>> ax1.imshow(ascent, vmin=0, vmax=255)
+    >>> ax2.imshow(result, vmin=0, vmax=255)
+    >>> plt.show()
+
+    >>> print(ascent.shape)
+    (512, 512)
+
+    >>> print(result.shape)
+    (1536, 1536)
+    """
+    if order < 0 or order > 5:
+        raise RuntimeError('spline order not supported')
+    input = np.asarray(input)
+    if input.ndim < 1:
+        raise RuntimeError('input and output rank must be > 0')
+    zoom = _ni_support._normalize_sequence(zoom, input.ndim)
+    output_shape = tuple(
+            [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)])
+    complex_output = np.iscomplexobj(input)
+    output = _ni_support._get_output(output, input, shape=output_shape,
+                                     complex_output=complex_output)
+    if complex_output:
+        # import under different name to avoid confusion with zoom parameter
+        from scipy.ndimage._interpolation import zoom as _zoom
+
+        kwargs = dict(order=order, mode=mode, prefilter=prefilter)
+        _zoom(input.real, zoom, output=output.real, cval=np.real(cval), **kwargs)
+        _zoom(input.imag, zoom, output=output.imag, cval=np.imag(cval), **kwargs)
+        return output
+    if prefilter and order > 1:
+        padded, npad = _prepad_for_spline_filter(input, mode, cval)
+        filtered = spline_filter(padded, order, output=np.float64, mode=mode)
+    else:
+        npad = 0
+        filtered = input
+    if grid_mode:
+        # warn about modes that may have surprising behavior
+        suggest_mode = None
+        if mode == 'constant':
+            suggest_mode = 'grid-constant'
+        elif mode == 'wrap':
+            suggest_mode = 'grid-wrap'
+        if suggest_mode is not None:
+            warnings.warn(
+                (f"It is recommended to use mode = {suggest_mode} instead of {mode} "
+                 f"when grid_mode is True."),
+                stacklevel=2
+            )
+    mode = _ni_support._extend_mode_to_code(mode)
+
+    zoom_div = np.array(output_shape)
+    zoom_nominator = np.array(input.shape)
+    if not grid_mode:
+        zoom_div -= 1
+        zoom_nominator -= 1
+
+    # Zooming to infinite values is unpredictable, so just choose
+    # zoom factor 1 instead
+    zoom = np.divide(zoom_nominator, zoom_div,
+                     out=np.ones_like(input.shape, dtype=np.float64),
+                     where=zoom_div != 0)
+    zoom = np.ascontiguousarray(zoom)
+    _nd_image.zoom_shift(filtered, zoom, None, output, order, mode, cval, npad,
+                         grid_mode)
+    return output
+
+
+@docfiller
+def rotate(input, angle, axes=(1, 0), reshape=True, output=None, order=3,
+           mode='constant', cval=0.0, prefilter=True):
+    """
+    Rotate an array.
+
+    The array is rotated in the plane defined by the two axes given by the
+    `axes` parameter using spline interpolation of the requested order.
+
+    Parameters
+    ----------
+    %(input)s
+    angle : float
+        The rotation angle in degrees.
+    axes : tuple of 2 ints, optional
+        The two axes that define the plane of rotation. Default is the first
+        two axes.
+    reshape : bool, optional
+        If `reshape` is true, the output shape is adapted so that the input
+        array is contained completely in the output. Default is True.
+    %(output)s
+    order : int, optional
+        The order of the spline interpolation, default is 3.
+        The order has to be in the range 0-5.
+    %(mode_interp_constant)s
+    %(cval)s
+    %(prefilter)s
+
+    Returns
+    -------
+    rotate : ndarray
+        The rotated input.
+
+    Notes
+    -----
+    For complex-valued `input`, this function rotates the real and imaginary
+    components independently.
+
+    .. versionadded:: 1.6.0
+        Complex-valued support added.
+
+    Examples
+    --------
+    >>> from scipy import ndimage, datasets
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure(figsize=(10, 3))
+    >>> ax1, ax2, ax3 = fig.subplots(1, 3)
+    >>> img = datasets.ascent()
+    >>> img_45 = ndimage.rotate(img, 45, reshape=False)
+    >>> full_img_45 = ndimage.rotate(img, 45, reshape=True)
+    >>> ax1.imshow(img, cmap='gray')
+    >>> ax1.set_axis_off()
+    >>> ax2.imshow(img_45, cmap='gray')
+    >>> ax2.set_axis_off()
+    >>> ax3.imshow(full_img_45, cmap='gray')
+    >>> ax3.set_axis_off()
+    >>> fig.set_layout_engine('tight')
+    >>> plt.show()
+    >>> print(img.shape)
+    (512, 512)
+    >>> print(img_45.shape)
+    (512, 512)
+    >>> print(full_img_45.shape)
+    (724, 724)
+
+    """
+    input_arr = np.asarray(input)
+    ndim = input_arr.ndim
+
+    if ndim < 2:
+        raise ValueError('input array should be at least 2D')
+
+    axes = list(axes)
+
+    if len(axes) != 2:
+        raise ValueError('axes should contain exactly two values')
+
+    if not all([float(ax).is_integer() for ax in axes]):
+        raise ValueError('axes should contain only integer values')
+
+    if axes[0] < 0:
+        axes[0] += ndim
+    if axes[1] < 0:
+        axes[1] += ndim
+    if axes[0] < 0 or axes[1] < 0 or axes[0] >= ndim or axes[1] >= ndim:
+        raise ValueError('invalid rotation plane specified')
+
+    axes.sort()
+
+    c, s = special.cosdg(angle), special.sindg(angle)
+
+    rot_matrix = np.array([[c, s],
+                           [-s, c]])
+
+    img_shape = np.asarray(input_arr.shape)
+    in_plane_shape = img_shape[axes]
+    if reshape:
+        # Compute transformed input bounds
+        iy, ix = in_plane_shape
+        out_bounds = rot_matrix @ [[0, 0, iy, iy],
+                                   [0, ix, 0, ix]]
+        # Compute the shape of the transformed input plane
+        out_plane_shape = (np.ptp(out_bounds, axis=1) + 0.5).astype(int)
+    else:
+        out_plane_shape = img_shape[axes]
+
+    out_center = rot_matrix @ ((out_plane_shape - 1) / 2)
+    in_center = (in_plane_shape - 1) / 2
+    offset = in_center - out_center
+
+    output_shape = img_shape
+    output_shape[axes] = out_plane_shape
+    output_shape = tuple(output_shape)
+
+    complex_output = np.iscomplexobj(input_arr)
+    output = _ni_support._get_output(output, input_arr, shape=output_shape,
+                                     complex_output=complex_output)
+
+    if ndim <= 2:
+        affine_transform(input_arr, rot_matrix, offset, output_shape, output,
+                         order, mode, cval, prefilter)
+    else:
+        # If ndim > 2, the rotation is applied over all the planes
+        # parallel to axes
+        planes_coord = itertools.product(
+            *[[slice(None)] if ax in axes else range(img_shape[ax])
+              for ax in range(ndim)])
+
+        out_plane_shape = tuple(out_plane_shape)
+
+        for coordinates in planes_coord:
+            ia = input_arr[coordinates]
+            oa = output[coordinates]
+            affine_transform(ia, rot_matrix, offset, out_plane_shape,
+                             oa, order, mode, cval, prefilter)
+
+    return output
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_measurements.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_measurements.py
new file mode 100644
index 0000000000000000000000000000000000000000..67ec12870ccf1dfe52624da05787b197542a0253
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_measurements.py
@@ -0,0 +1,1687 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import numpy as np
+from . import _ni_support
+from . import _ni_label
+from . import _nd_image
+from . import _morphology
+
+__all__ = ['label', 'find_objects', 'labeled_comprehension', 'sum', 'mean',
+           'variance', 'standard_deviation', 'minimum', 'maximum', 'median',
+           'minimum_position', 'maximum_position', 'extrema', 'center_of_mass',
+           'histogram', 'watershed_ift', 'sum_labels', 'value_indices']
+
+
+def label(input, structure=None, output=None):
+    """
+    Label features in an array.
+
+    Parameters
+    ----------
+    input : array_like
+        An array-like object to be labeled. Any non-zero values in `input` are
+        counted as features and zero values are considered the background.
+    structure : array_like, optional
+        A structuring element that defines feature connections.
+        `structure` must be centrosymmetric
+        (see Notes).
+        If no structuring element is provided,
+        one is automatically generated with a squared connectivity equal to
+        one.  That is, for a 2-D `input` array, the default structuring element
+        is::
+
+            [[0,1,0],
+             [1,1,1],
+             [0,1,0]]
+
+    output : (None, data-type, array_like), optional
+        If `output` is a data type, it specifies the type of the resulting
+        labeled feature array.
+        If `output` is an array-like object, then `output` will be updated
+        with the labeled features from this function.  This function can
+        operate in-place, by passing output=input.
+        Note that the output must be able to store the largest label, or this
+        function will raise an Exception.
+
+    Returns
+    -------
+    label : ndarray or int
+        An integer ndarray where each unique feature in `input` has a unique
+        label in the returned array.
+    num_features : int
+        How many objects were found.
+
+        If `output` is None, this function returns a tuple of
+        (`labeled_array`, `num_features`).
+
+        If `output` is a ndarray, then it will be updated with values in
+        `labeled_array` and only `num_features` will be returned by this
+        function.
+
+    See Also
+    --------
+    find_objects : generate a list of slices for the labeled features (or
+                   objects); useful for finding features' position or
+                   dimensions
+
+    Notes
+    -----
+    A centrosymmetric matrix is a matrix that is symmetric about the center.
+    See [1]_ for more information.
+
+    The `structure` matrix must be centrosymmetric to ensure
+    two-way connections.
+    For instance, if the `structure` matrix is not centrosymmetric
+    and is defined as::
+
+        [[0,1,0],
+         [1,1,0],
+         [0,0,0]]
+
+    and the `input` is::
+
+        [[1,2],
+         [0,3]]
+
+    then the structure matrix would indicate the
+    entry 2 in the input is connected to 1,
+    but 1 is not connected to 2.
+
+    References
+    ----------
+    .. [1] James R. Weaver, "Centrosymmetric (cross-symmetric)
+       matrices, their basic properties, eigenvalues, and
+       eigenvectors." The American Mathematical Monthly 92.10
+       (1985): 711-717.
+
+    Examples
+    --------
+    Create an image with some features, then label it using the default
+    (cross-shaped) structuring element:
+
+    >>> from scipy.ndimage import label, generate_binary_structure
+    >>> import numpy as np
+    >>> a = np.array([[0,0,1,1,0,0],
+    ...               [0,0,0,1,0,0],
+    ...               [1,1,0,0,1,0],
+    ...               [0,0,0,1,0,0]])
+    >>> labeled_array, num_features = label(a)
+
+    Each of the 4 features are labeled with a different integer:
+
+    >>> num_features
+    4
+    >>> labeled_array
+    array([[0, 0, 1, 1, 0, 0],
+           [0, 0, 0, 1, 0, 0],
+           [2, 2, 0, 0, 3, 0],
+           [0, 0, 0, 4, 0, 0]], dtype=int32)
+
+    Generate a structuring element that will consider features connected even
+    if they touch diagonally:
+
+    >>> s = generate_binary_structure(2,2)
+
+    or,
+
+    >>> s = [[1,1,1],
+    ...      [1,1,1],
+    ...      [1,1,1]]
+
+    Label the image using the new structuring element:
+
+    >>> labeled_array, num_features = label(a, structure=s)
+
+    Show the 2 labeled features (note that features 1, 3, and 4 from above are
+    now considered a single feature):
+
+    >>> num_features
+    2
+    >>> labeled_array
+    array([[0, 0, 1, 1, 0, 0],
+           [0, 0, 0, 1, 0, 0],
+           [2, 2, 0, 0, 1, 0],
+           [0, 0, 0, 1, 0, 0]], dtype=int32)
+
+    """
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    if structure is None:
+        structure = _morphology.generate_binary_structure(input.ndim, 1)
+    structure = np.asarray(structure, dtype=bool)
+    if structure.ndim != input.ndim:
+        raise RuntimeError('structure and input must have equal rank')
+    for ii in structure.shape:
+        if ii != 3:
+            raise ValueError('structure dimensions must be equal to 3')
+
+    # Use 32 bits if it's large enough for this image.
+    # _ni_label.label() needs two entries for background and
+    # foreground tracking
+    need_64bits = input.size >= (2**31 - 2)
+
+    if isinstance(output, np.ndarray):
+        if output.shape != input.shape:
+            raise ValueError("output shape not correct")
+        caller_provided_output = True
+    else:
+        caller_provided_output = False
+        if output is None:
+            output = np.empty(input.shape, np.intp if need_64bits else np.int32)
+        else:
+            output = np.empty(input.shape, output)
+
+    # handle scalars, 0-D arrays
+    if input.ndim == 0 or input.size == 0:
+        if input.ndim == 0:
+            # scalar
+            maxlabel = 1 if (input != 0) else 0
+            output[...] = maxlabel
+        else:
+            # 0-D
+            maxlabel = 0
+        if caller_provided_output:
+            return maxlabel
+        else:
+            return output, maxlabel
+
+    try:
+        max_label = _ni_label._label(input, structure, output)
+    except _ni_label.NeedMoreBits as e:
+        # Make another attempt with enough bits, then try to cast to the
+        # new type.
+        tmp_output = np.empty(input.shape, np.intp if need_64bits else np.int32)
+        max_label = _ni_label._label(input, structure, tmp_output)
+        output[...] = tmp_output[...]
+        if not np.all(output == tmp_output):
+            # refuse to return bad results
+            raise RuntimeError(
+                "insufficient bit-depth in requested output type"
+            ) from e
+
+    if caller_provided_output:
+        # result was written in-place
+        return max_label
+    else:
+        return output, max_label
+
+
+def find_objects(input, max_label=0):
+    """
+    Find objects in a labeled array.
+
+    Parameters
+    ----------
+    input : ndarray of ints
+        Array containing objects defined by different labels. Labels with
+        value 0 are ignored.
+    max_label : int, optional
+        Maximum label to be searched for in `input`. If max_label is not
+        given, the positions of all objects are returned.
+
+    Returns
+    -------
+    object_slices : list of tuples
+        A list of tuples, with each tuple containing N slices (with N the
+        dimension of the input array). Slices correspond to the minimal
+        parallelepiped that contains the object. If a number is missing,
+        None is returned instead of a slice. The label ``l`` corresponds to
+        the index ``l-1`` in the returned list.
+
+    See Also
+    --------
+    label, center_of_mass
+
+    Notes
+    -----
+    This function is very useful for isolating a volume of interest inside
+    a 3-D array, that cannot be "seen through".
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((6,6), dtype=int)
+    >>> a[2:4, 2:4] = 1
+    >>> a[4, 4] = 1
+    >>> a[:2, :3] = 2
+    >>> a[0, 5] = 3
+    >>> a
+    array([[2, 2, 2, 0, 0, 3],
+           [2, 2, 2, 0, 0, 0],
+           [0, 0, 1, 1, 0, 0],
+           [0, 0, 1, 1, 0, 0],
+           [0, 0, 0, 0, 1, 0],
+           [0, 0, 0, 0, 0, 0]])
+    >>> ndimage.find_objects(a)
+    [(slice(2, 5, None), slice(2, 5, None)),
+     (slice(0, 2, None), slice(0, 3, None)),
+     (slice(0, 1, None), slice(5, 6, None))]
+    >>> ndimage.find_objects(a, max_label=2)
+    [(slice(2, 5, None), slice(2, 5, None)), (slice(0, 2, None), slice(0, 3, None))]
+    >>> ndimage.find_objects(a == 1, max_label=2)
+    [(slice(2, 5, None), slice(2, 5, None)), None]
+
+    >>> loc = ndimage.find_objects(a)[0]
+    >>> a[loc]
+    array([[1, 1, 0],
+           [1, 1, 0],
+           [0, 0, 1]])
+
+    """
+    input = np.asarray(input)
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+
+    if max_label < 1:
+        max_label = input.max()
+
+    return _nd_image.find_objects(input, max_label)
+
+
+def value_indices(arr, *, ignore_value=None):
+    """
+    Find indices of each distinct value in given array.
+
+    Parameters
+    ----------
+    arr : ndarray of ints
+        Array containing integer values.
+    ignore_value : int, optional
+        This value will be ignored in searching the `arr` array. If not
+        given, all values found will be included in output. Default
+        is None.
+
+    Returns
+    -------
+    indices : dictionary
+        A Python dictionary of array indices for each distinct value. The
+        dictionary is keyed by the distinct values, the entries are array
+        index tuples covering all occurrences of the value within the
+        array.
+
+        This dictionary can occupy significant memory, usually several times
+        the size of the input array.
+
+    See Also
+    --------
+    label, maximum, median, minimum_position, extrema, sum, mean, variance,
+    standard_deviation, numpy.where, numpy.unique
+
+    Notes
+    -----
+    For a small array with few distinct values, one might use
+    `numpy.unique()` to find all possible values, and ``(arr == val)`` to
+    locate each value within that array. However, for large arrays,
+    with many distinct values, this can become extremely inefficient,
+    as locating each value would require a new search through the entire
+    array. Using this function, there is essentially one search, with
+    the indices saved for all distinct values.
+
+    This is useful when matching a categorical image (e.g. a segmentation
+    or classification) to an associated image of other data, allowing
+    any per-class statistic(s) to then be calculated. Provides a
+    more flexible alternative to functions like ``scipy.ndimage.mean()``
+    and ``scipy.ndimage.variance()``.
+
+    Some other closely related functionality, with different strengths and
+    weaknesses, can also be found in ``scipy.stats.binned_statistic()`` and
+    the `scikit-image `_ function
+    ``skimage.measure.regionprops()``.
+
+    Note for IDL users: this provides functionality equivalent to IDL's
+    REVERSE_INDICES option (as per the IDL documentation for the
+    `HISTOGRAM `_
+    function).
+
+    .. versionadded:: 1.10.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import ndimage
+    >>> a = np.zeros((6, 6), dtype=int)
+    >>> a[2:4, 2:4] = 1
+    >>> a[4, 4] = 1
+    >>> a[:2, :3] = 2
+    >>> a[0, 5] = 3
+    >>> a
+    array([[2, 2, 2, 0, 0, 3],
+           [2, 2, 2, 0, 0, 0],
+           [0, 0, 1, 1, 0, 0],
+           [0, 0, 1, 1, 0, 0],
+           [0, 0, 0, 0, 1, 0],
+           [0, 0, 0, 0, 0, 0]])
+    >>> val_indices = ndimage.value_indices(a)
+
+    The dictionary `val_indices` will have an entry for each distinct
+    value in the input array.
+
+    >>> val_indices.keys()
+    dict_keys([np.int64(0), np.int64(1), np.int64(2), np.int64(3)])
+
+    The entry for each value is an index tuple, locating the elements
+    with that value.
+
+    >>> ndx1 = val_indices[1]
+    >>> ndx1
+    (array([2, 2, 3, 3, 4]), array([2, 3, 2, 3, 4]))
+
+    This can be used to index into the original array, or any other
+    array with the same shape.
+
+    >>> a[ndx1]
+    array([1, 1, 1, 1, 1])
+
+    If the zeros were to be ignored, then the resulting dictionary
+    would no longer have an entry for zero.
+
+    >>> val_indices = ndimage.value_indices(a, ignore_value=0)
+    >>> val_indices.keys()
+    dict_keys([np.int64(1), np.int64(2), np.int64(3)])
+
+    """
+    # Cope with ignore_value being None, without too much extra complexity
+    # in the C code. If not None, the value is passed in as a numpy array
+    # with the same dtype as arr.
+    arr = np.asarray(arr)
+    ignore_value_arr = np.zeros((1,), dtype=arr.dtype)
+    ignoreIsNone = (ignore_value is None)
+    if not ignoreIsNone:
+        ignore_value_arr[0] = ignore_value_arr.dtype.type(ignore_value)
+
+    val_indices = _nd_image.value_indices(arr, ignoreIsNone, ignore_value_arr)
+    return val_indices
+
+
+def labeled_comprehension(input, labels, index, func, out_dtype, default,
+                          pass_positions=False):
+    """
+    Roughly equivalent to [func(input[labels == i]) for i in index].
+
+    Sequentially applies an arbitrary function (that works on array_like input)
+    to subsets of an N-D image array specified by `labels` and `index`.
+    The option exists to provide the function with positional parameters as the
+    second argument.
+
+    Parameters
+    ----------
+    input : array_like
+        Data from which to select `labels` to process.
+    labels : array_like or None
+        Labels to objects in `input`.
+        If not None, array must be same shape as `input`.
+        If None, `func` is applied to raveled `input`.
+    index : int, sequence of ints or None
+        Subset of `labels` to which to apply `func`.
+        If a scalar, a single value is returned.
+        If None, `func` is applied to all non-zero values of `labels`.
+    func : callable
+        Python function to apply to `labels` from `input`.
+    out_dtype : dtype
+        Dtype to use for `result`.
+    default : int, float or None
+        Default return value when a element of `index` does not exist
+        in `labels`.
+    pass_positions : bool, optional
+        If True, pass linear indices to `func` as a second argument.
+        Default is False.
+
+    Returns
+    -------
+    result : ndarray
+        Result of applying `func` to each of `labels` to `input` in `index`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> from scipy import ndimage
+    >>> lbl, nlbl = ndimage.label(a)
+    >>> lbls = np.arange(1, nlbl+1)
+    >>> ndimage.labeled_comprehension(a, lbl, lbls, np.mean, float, 0)
+    array([ 2.75,  5.5 ,  6.  ])
+
+    Falling back to `default`:
+
+    >>> lbls = np.arange(1, nlbl+2)
+    >>> ndimage.labeled_comprehension(a, lbl, lbls, np.mean, float, -1)
+    array([ 2.75,  5.5 ,  6.  , -1.  ])
+
+    Passing positions:
+
+    >>> def fn(val, pos):
+    ...     print("fn says: %s : %s" % (val, pos))
+    ...     return (val.sum()) if (pos.sum() % 2 == 0) else (-val.sum())
+    ...
+    >>> ndimage.labeled_comprehension(a, lbl, lbls, fn, float, 0, True)
+    fn says: [1 2 5 3] : [0 1 4 5]
+    fn says: [4 7] : [ 7 11]
+    fn says: [9 3] : [12 13]
+    array([ 11.,  11., -12.,   0.])
+
+    """
+
+    as_scalar = np.isscalar(index)
+    input = np.asarray(input)
+
+    if pass_positions:
+        positions = np.arange(input.size).reshape(input.shape)
+
+    if labels is None:
+        if index is not None:
+            raise ValueError("index without defined labels")
+        if not pass_positions:
+            return func(input.ravel())
+        else:
+            return func(input.ravel(), positions.ravel())
+
+    labels = np.asarray(labels)
+
+    try:
+        input, labels = np.broadcast_arrays(input, labels)
+    except ValueError as e:
+        raise ValueError("input and labels must have the same shape "
+                            "(excepting dimensions with width 1)") from e
+
+    if index is None:
+        if not pass_positions:
+            return func(input[labels > 0])
+        else:
+            return func(input[labels > 0], positions[labels > 0])
+
+    index = np.atleast_1d(index)
+    if np.any(index.astype(labels.dtype).astype(index.dtype) != index):
+        raise ValueError(f"Cannot convert index values from <{index.dtype}> to "
+                         f"<{labels.dtype}> (labels' type) without loss of precision")
+
+    index = index.astype(labels.dtype)
+
+    # optimization: find min/max in index,
+    # and select those parts of labels, input, and positions
+    lo = index.min()
+    hi = index.max()
+    mask = (labels >= lo) & (labels <= hi)
+
+    # this also ravels the arrays
+    labels = labels[mask]
+    input = input[mask]
+    if pass_positions:
+        positions = positions[mask]
+
+    # sort everything by labels
+    label_order = labels.argsort()
+    labels = labels[label_order]
+    input = input[label_order]
+    if pass_positions:
+        positions = positions[label_order]
+
+    index_order = index.argsort()
+    sorted_index = index[index_order]
+
+    def do_map(inputs, output):
+        """labels must be sorted"""
+        nidx = sorted_index.size
+
+        # Find boundaries for each stretch of constant labels
+        # This could be faster, but we already paid N log N to sort labels.
+        lo = np.searchsorted(labels, sorted_index, side='left')
+        hi = np.searchsorted(labels, sorted_index, side='right')
+
+        for i, l, h in zip(range(nidx), lo, hi):
+            if l == h:
+                continue
+            output[i] = func(*[inp[l:h] for inp in inputs])
+
+    temp = np.empty(index.shape, out_dtype)
+    temp[:] = default
+    if not pass_positions:
+        do_map([input], temp)
+    else:
+        do_map([input, positions], temp)
+
+    output = np.zeros(index.shape, out_dtype)
+    output[index_order] = temp
+    if as_scalar:
+        output = output[0]
+
+    return output
+
+
+def _safely_castable_to_int(dt):
+    """Test whether the NumPy data type `dt` can be safely cast to an int."""
+    int_size = np.dtype(int).itemsize
+    safe = ((np.issubdtype(dt, np.signedinteger) and dt.itemsize <= int_size) or
+            (np.issubdtype(dt, np.unsignedinteger) and dt.itemsize < int_size))
+    return safe
+
+
+def _stats(input, labels=None, index=None, centered=False):
+    """Count, sum, and optionally compute (sum - centre)^2 of input by label
+
+    Parameters
+    ----------
+    input : array_like, N-D
+        The input data to be analyzed.
+    labels : array_like (N-D), optional
+        The labels of the data in `input`. This array must be broadcast
+        compatible with `input`; typically, it is the same shape as `input`.
+        If `labels` is None, all nonzero values in `input` are treated as
+        the single labeled group.
+    index : label or sequence of labels, optional
+        These are the labels of the groups for which the stats are computed.
+        If `index` is None, the stats are computed for the single group where
+        `labels` is greater than 0.
+    centered : bool, optional
+        If True, the centered sum of squares for each labeled group is
+        also returned. Default is False.
+
+    Returns
+    -------
+    counts : int or ndarray of ints
+        The number of elements in each labeled group.
+    sums : scalar or ndarray of scalars
+        The sums of the values in each labeled group.
+    sums_c : scalar or ndarray of scalars, optional
+        The sums of mean-centered squares of the values in each labeled group.
+        This is only returned if `centered` is True.
+
+    """
+    def single_group(vals):
+        if centered:
+            vals_c = vals - vals.mean()
+            return vals.size, vals.sum(), (vals_c * vals_c.conjugate()).sum()
+        else:
+            return vals.size, vals.sum()
+
+    input = np.asarray(input)
+    if labels is None:
+        return single_group(input)
+
+    # ensure input and labels match sizes
+    input, labels = np.broadcast_arrays(input, labels)
+
+    if index is None:
+        return single_group(input[labels > 0])
+
+    if np.isscalar(index):
+        return single_group(input[labels == index])
+
+    def _sum_centered(labels):
+        # `labels` is expected to be an ndarray with the same shape as `input`.
+        # It must contain the label indices (which are not necessarily the labels
+        # themselves).
+        means = sums / counts
+        centered_input = input - means[labels]
+        # bincount expects 1-D inputs, so we ravel the arguments.
+        bc = np.bincount(labels.ravel(),
+                              weights=(centered_input *
+                                       centered_input.conjugate()).ravel())
+        return bc
+
+    # Remap labels to unique integers if necessary, or if the largest
+    # label is larger than the number of values.
+
+    if (not _safely_castable_to_int(labels.dtype) or
+            labels.min() < 0 or labels.max() > labels.size):
+        # Use np.unique to generate the label indices.  `new_labels` will
+        # be 1-D, but it should be interpreted as the flattened N-D array of
+        # label indices.
+        unique_labels, new_labels = np.unique(labels, return_inverse=True)
+        new_labels = np.reshape(new_labels, (-1,))  # flatten, since it may be >1-D
+        counts = np.bincount(new_labels)
+        sums = np.bincount(new_labels, weights=input.ravel())
+        if centered:
+            # Compute the sum of the mean-centered squares.
+            # We must reshape new_labels to the N-D shape of `input` before
+            # passing it _sum_centered.
+            sums_c = _sum_centered(new_labels.reshape(labels.shape))
+        idxs = np.searchsorted(unique_labels, index)
+        # make all of idxs valid
+        idxs[idxs >= unique_labels.size] = 0
+        found = (unique_labels[idxs] == index)
+    else:
+        # labels are an integer type allowed by bincount, and there aren't too
+        # many, so call bincount directly.
+        counts = np.bincount(labels.ravel())
+        sums = np.bincount(labels.ravel(), weights=input.ravel())
+        if centered:
+            sums_c = _sum_centered(labels)
+        # make sure all index values are valid
+        idxs = np.asanyarray(index, np.int_).copy()
+        found = (idxs >= 0) & (idxs < counts.size)
+        idxs[~found] = 0
+
+    counts = counts[idxs]
+    counts[~found] = 0
+    sums = sums[idxs]
+    sums[~found] = 0
+
+    if not centered:
+        return (counts, sums)
+    else:
+        sums_c = sums_c[idxs]
+        sums_c[~found] = 0
+        return (counts, sums, sums_c)
+
+
+def sum(input, labels=None, index=None):
+    """
+    Calculate the sum of the values of the array.
+
+    Notes
+    -----
+    This is an alias for `ndimage.sum_labels` kept for backwards compatibility
+    reasons, for new code please prefer `sum_labels`.  See the `sum_labels`
+    docstring for more details.
+
+    """
+    return sum_labels(input, labels, index)
+
+
+def sum_labels(input, labels=None, index=None):
+    """
+    Calculate the sum of the values of the array.
+
+    Parameters
+    ----------
+    input : array_like
+        Values of `input` inside the regions defined by `labels`
+        are summed together.
+    labels : array_like of ints, optional
+        Assign labels to the values of the array. Has to have the same shape as
+        `input`.
+    index : array_like, optional
+        A single label number or a sequence of label numbers of
+        the objects to be measured.
+
+    Returns
+    -------
+    sum : ndarray or scalar
+        An array of the sums of values of `input` inside the regions defined
+        by `labels` with the same shape as `index`. If 'index' is None or scalar,
+        a scalar is returned.
+
+    See Also
+    --------
+    mean, median
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> input =  [0,1,2,3]
+    >>> labels = [1,1,2,2]
+    >>> ndimage.sum_labels(input, labels, index=[1,2])
+    [1.0, 5.0]
+    >>> ndimage.sum_labels(input, labels, index=1)
+    1
+    >>> ndimage.sum_labels(input, labels)
+    6
+
+
+    """
+    count, sum = _stats(input, labels, index)
+    return sum
+
+
+def mean(input, labels=None, index=None):
+    """
+    Calculate the mean of the values of an array at labels.
+
+    Parameters
+    ----------
+    input : array_like
+        Array on which to compute the mean of elements over distinct
+        regions.
+    labels : array_like, optional
+        Array of labels of same shape, or broadcastable to the same shape as
+        `input`. All elements sharing the same label form one region over
+        which the mean of the elements is computed.
+    index : int or sequence of ints, optional
+        Labels of the objects over which the mean is to be computed.
+        Default is None, in which case the mean for all values where label is
+        greater than 0 is calculated.
+
+    Returns
+    -------
+    out : list
+        Sequence of same length as `index`, with the mean of the different
+        regions labeled by the labels in `index`.
+
+    See Also
+    --------
+    variance, standard_deviation, minimum, maximum, sum, label
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.arange(25).reshape((5,5))
+    >>> labels = np.zeros_like(a)
+    >>> labels[3:5,3:5] = 1
+    >>> index = np.unique(labels)
+    >>> labels
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0],
+           [0, 0, 0, 1, 1],
+           [0, 0, 0, 1, 1]])
+    >>> index
+    array([0, 1])
+    >>> ndimage.mean(a, labels=labels, index=index)
+    [10.285714285714286, 21.0]
+
+    """
+
+    count, sum = _stats(input, labels, index)
+    return sum / np.asanyarray(count).astype(np.float64)
+
+
+def variance(input, labels=None, index=None):
+    """
+    Calculate the variance of the values of an N-D image array, optionally at
+    specified sub-regions.
+
+    Parameters
+    ----------
+    input : array_like
+        Nd-image data to process.
+    labels : array_like, optional
+        Labels defining sub-regions in `input`.
+        If not None, must be same shape as `input`.
+    index : int or sequence of ints, optional
+        `labels` to include in output.  If None (default), all values where
+        `labels` is non-zero are used.
+
+    Returns
+    -------
+    variance : float or ndarray
+        Values of variance, for each sub-region if `labels` and `index` are
+        specified.
+
+    See Also
+    --------
+    label, standard_deviation, maximum, minimum, extrema
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> from scipy import ndimage
+    >>> ndimage.variance(a)
+    7.609375
+
+    Features to process can be specified using `labels` and `index`:
+
+    >>> lbl, nlbl = ndimage.label(a)
+    >>> ndimage.variance(a, lbl, index=np.arange(1, nlbl+1))
+    array([ 2.1875,  2.25  ,  9.    ])
+
+    If no index is given, all non-zero `labels` are processed:
+
+    >>> ndimage.variance(a, lbl)
+    6.1875
+
+    """
+    count, sum, sum_c_sq = _stats(input, labels, index, centered=True)
+    return sum_c_sq / np.asanyarray(count).astype(float)
+
+
+def standard_deviation(input, labels=None, index=None):
+    """
+    Calculate the standard deviation of the values of an N-D image array,
+    optionally at specified sub-regions.
+
+    Parameters
+    ----------
+    input : array_like
+        N-D image data to process.
+    labels : array_like, optional
+        Labels to identify sub-regions in `input`.
+        If not None, must be same shape as `input`.
+    index : int or sequence of ints, optional
+        `labels` to include in output. If None (default), all values where
+        `labels` is non-zero are used.
+
+    Returns
+    -------
+    standard_deviation : float or ndarray
+        Values of standard deviation, for each sub-region if `labels` and
+        `index` are specified.
+
+    See Also
+    --------
+    label, variance, maximum, minimum, extrema
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> from scipy import ndimage
+    >>> ndimage.standard_deviation(a)
+    2.7585095613392387
+
+    Features to process can be specified using `labels` and `index`:
+
+    >>> lbl, nlbl = ndimage.label(a)
+    >>> ndimage.standard_deviation(a, lbl, index=np.arange(1, nlbl+1))
+    array([ 1.479,  1.5  ,  3.   ])
+
+    If no index is given, non-zero `labels` are processed:
+
+    >>> ndimage.standard_deviation(a, lbl)
+    2.4874685927665499
+
+    """
+    return np.sqrt(variance(input, labels, index))
+
+
+def _select(input, labels=None, index=None, find_min=False, find_max=False,
+            find_min_positions=False, find_max_positions=False,
+            find_median=False):
+    """Returns min, max, or both, plus their positions (if requested), and
+    median."""
+
+    input = np.asanyarray(input)
+
+    find_positions = find_min_positions or find_max_positions
+    positions = None
+    if find_positions:
+        positions = np.arange(input.size).reshape(input.shape)
+
+    def single_group(vals, positions):
+        result = []
+        if find_min:
+            result += [vals.min()]
+        if find_min_positions:
+            result += [positions[vals == vals.min()][0]]
+        if find_max:
+            result += [vals.max()]
+        if find_max_positions:
+            result += [positions[vals == vals.max()][0]]
+        if find_median:
+            result += [np.median(vals)]
+        return result
+
+    if labels is None:
+        return single_group(input, positions)
+
+    # ensure input and labels match sizes
+    input, labels = np.broadcast_arrays(input, labels)
+
+    if index is None:
+        mask = (labels > 0)
+        masked_positions = None
+        if find_positions:
+            masked_positions = positions[mask]
+        return single_group(input[mask], masked_positions)
+
+    if np.isscalar(index):
+        mask = (labels == index)
+        masked_positions = None
+        if find_positions:
+            masked_positions = positions[mask]
+        return single_group(input[mask], masked_positions)
+
+    index = np.asarray(index)
+
+    # remap labels to unique integers if necessary, or if the largest
+    # label is larger than the number of values.
+    if (not _safely_castable_to_int(labels.dtype) or
+            labels.min() < 0 or labels.max() > labels.size):
+        # remap labels, and indexes
+        unique_labels, labels = np.unique(labels, return_inverse=True)
+        idxs = np.searchsorted(unique_labels, index)
+
+        # make all of idxs valid
+        idxs[idxs >= unique_labels.size] = 0
+        found = (unique_labels[idxs] == index)
+    else:
+        # labels are an integer type, and there aren't too many
+        idxs = np.asanyarray(index, np.int_).copy()
+        found = (idxs >= 0) & (idxs <= labels.max())
+
+    idxs[~ found] = labels.max() + 1
+
+    if find_median:
+        order = np.lexsort((input.ravel(), labels.ravel()))
+    else:
+        order = input.ravel().argsort()
+    input = input.ravel()[order]
+    labels = labels.ravel()[order]
+    if find_positions:
+        positions = positions.ravel()[order]
+
+    result = []
+    if find_min:
+        mins = np.zeros(labels.max() + 2, input.dtype)
+        mins[labels[::-1]] = input[::-1]
+        result += [mins[idxs]]
+    if find_min_positions:
+        minpos = np.zeros(labels.max() + 2, int)
+        minpos[labels[::-1]] = positions[::-1]
+        result += [minpos[idxs]]
+    if find_max:
+        maxs = np.zeros(labels.max() + 2, input.dtype)
+        maxs[labels] = input
+        result += [maxs[idxs]]
+    if find_max_positions:
+        maxpos = np.zeros(labels.max() + 2, int)
+        maxpos[labels] = positions
+        result += [maxpos[idxs]]
+    if find_median:
+        locs = np.arange(len(labels))
+        lo = np.zeros(labels.max() + 2, np.int_)
+        lo[labels[::-1]] = locs[::-1]
+        hi = np.zeros(labels.max() + 2, np.int_)
+        hi[labels] = locs
+        lo = lo[idxs]
+        hi = hi[idxs]
+        # lo is an index to the lowest value in input for each label,
+        # hi is an index to the largest value.
+        # move them to be either the same ((hi - lo) % 2 == 0) or next
+        # to each other ((hi - lo) % 2 == 1), then average.
+        step = (hi - lo) // 2
+        lo += step
+        hi -= step
+        if (np.issubdtype(input.dtype, np.integer)
+                or np.issubdtype(input.dtype, np.bool_)):
+            # avoid integer overflow or boolean addition (gh-12836)
+            result += [(input[lo].astype('d') + input[hi].astype('d')) / 2.0]
+        else:
+            result += [(input[lo] + input[hi]) / 2.0]
+
+    return result
+
+
+def minimum(input, labels=None, index=None):
+    """
+    Calculate the minimum of the values of an array over labeled regions.
+
+    Parameters
+    ----------
+    input : array_like
+        Array_like of values. For each region specified by `labels`, the
+        minimal values of `input` over the region is computed.
+    labels : array_like, optional
+        An array_like of integers marking different regions over which the
+        minimum value of `input` is to be computed. `labels` must have the
+        same shape as `input`. If `labels` is not specified, the minimum
+        over the whole array is returned.
+    index : array_like, optional
+        A list of region labels that are taken into account for computing the
+        minima. If index is None, the minimum over all elements where `labels`
+        is non-zero is returned.
+
+    Returns
+    -------
+    minimum : float or list of floats
+        List of minima of `input` over the regions determined by `labels` and
+        whose index is in `index`. If `index` or `labels` are not specified, a
+        float is returned: the minimal value of `input` if `labels` is None,
+        and the minimal value of elements where `labels` is greater than zero
+        if `index` is None.
+
+    See Also
+    --------
+    label, maximum, median, minimum_position, extrema, sum, mean, variance,
+    standard_deviation
+
+    Notes
+    -----
+    The function returns a Python list and not a NumPy array, use
+    `np.array` to convert the list to an array.
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> labels, labels_nb = ndimage.label(a)
+    >>> labels
+    array([[1, 1, 0, 0],
+           [1, 1, 0, 2],
+           [0, 0, 0, 2],
+           [3, 3, 0, 0]], dtype=int32)
+    >>> ndimage.minimum(a, labels=labels, index=np.arange(1, labels_nb + 1))
+    [1, 4, 3]
+    >>> ndimage.minimum(a)
+    0
+    >>> ndimage.minimum(a, labels=labels)
+    1
+
+    """
+    return _select(input, labels, index, find_min=True)[0]
+
+
+def maximum(input, labels=None, index=None):
+    """
+    Calculate the maximum of the values of an array over labeled regions.
+
+    Parameters
+    ----------
+    input : array_like
+        Array_like of values. For each region specified by `labels`, the
+        maximal values of `input` over the region is computed.
+    labels : array_like, optional
+        An array of integers marking different regions over which the
+        maximum value of `input` is to be computed. `labels` must have the
+        same shape as `input`. If `labels` is not specified, the maximum
+        over the whole array is returned.
+    index : array_like, optional
+        A list of region labels that are taken into account for computing the
+        maxima. If index is None, the maximum over all elements where `labels`
+        is non-zero is returned.
+
+    Returns
+    -------
+    output : float or list of floats
+        List of maxima of `input` over the regions determined by `labels` and
+        whose index is in `index`. If `index` or `labels` are not specified, a
+        float is returned: the maximal value of `input` if `labels` is None,
+        and the maximal value of elements where `labels` is greater than zero
+        if `index` is None.
+
+    See Also
+    --------
+    label, minimum, median, maximum_position, extrema, sum, mean, variance,
+    standard_deviation
+
+    Notes
+    -----
+    The function returns a Python list and not a NumPy array, use
+    `np.array` to convert the list to an array.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.arange(16).reshape((4,4))
+    >>> a
+    array([[ 0,  1,  2,  3],
+           [ 4,  5,  6,  7],
+           [ 8,  9, 10, 11],
+           [12, 13, 14, 15]])
+    >>> labels = np.zeros_like(a)
+    >>> labels[:2,:2] = 1
+    >>> labels[2:, 1:3] = 2
+    >>> labels
+    array([[1, 1, 0, 0],
+           [1, 1, 0, 0],
+           [0, 2, 2, 0],
+           [0, 2, 2, 0]])
+    >>> from scipy import ndimage
+    >>> ndimage.maximum(a)
+    15
+    >>> ndimage.maximum(a, labels=labels, index=[1,2])
+    [5, 14]
+    >>> ndimage.maximum(a, labels=labels)
+    14
+
+    >>> b = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> labels, labels_nb = ndimage.label(b)
+    >>> labels
+    array([[1, 1, 0, 0],
+           [1, 1, 0, 2],
+           [0, 0, 0, 2],
+           [3, 3, 0, 0]], dtype=int32)
+    >>> ndimage.maximum(b, labels=labels, index=np.arange(1, labels_nb + 1))
+    [5, 7, 9]
+
+    """
+    return _select(input, labels, index, find_max=True)[0]
+
+
+def median(input, labels=None, index=None):
+    """
+    Calculate the median of the values of an array over labeled regions.
+
+    Parameters
+    ----------
+    input : array_like
+        Array_like of values. For each region specified by `labels`, the
+        median value of `input` over the region is computed.
+    labels : array_like, optional
+        An array_like of integers marking different regions over which the
+        median value of `input` is to be computed. `labels` must have the
+        same shape as `input`. If `labels` is not specified, the median
+        over the whole array is returned.
+    index : array_like, optional
+        A list of region labels that are taken into account for computing the
+        medians. If index is None, the median over all elements where `labels`
+        is non-zero is returned.
+
+    Returns
+    -------
+    median : float or list of floats
+        List of medians of `input` over the regions determined by `labels` and
+        whose index is in `index`. If `index` or `labels` are not specified, a
+        float is returned: the median value of `input` if `labels` is None,
+        and the median value of elements where `labels` is greater than zero
+        if `index` is None.
+
+    See Also
+    --------
+    label, minimum, maximum, extrema, sum, mean, variance, standard_deviation
+
+    Notes
+    -----
+    The function returns a Python list and not a NumPy array, use
+    `np.array` to convert the list to an array.
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 1],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> labels, labels_nb = ndimage.label(a)
+    >>> labels
+    array([[1, 1, 0, 2],
+           [1, 1, 0, 2],
+           [0, 0, 0, 2],
+           [3, 3, 0, 0]], dtype=int32)
+    >>> ndimage.median(a, labels=labels, index=np.arange(1, labels_nb + 1))
+    [2.5, 4.0, 6.0]
+    >>> ndimage.median(a)
+    1.0
+    >>> ndimage.median(a, labels=labels)
+    3.0
+
+    """
+    return _select(input, labels, index, find_median=True)[0]
+
+
+def minimum_position(input, labels=None, index=None):
+    """
+    Find the positions of the minimums of the values of an array at labels.
+
+    Parameters
+    ----------
+    input : array_like
+        Array_like of values.
+    labels : array_like, optional
+        An array of integers marking different regions over which the
+        position of the minimum value of `input` is to be computed.
+        `labels` must have the same shape as `input`. If `labels` is not
+        specified, the location of the first minimum over the whole
+        array is returned.
+
+        The `labels` argument only works when `index` is specified.
+    index : array_like, optional
+        A list of region labels that are taken into account for finding the
+        location of the minima. If `index` is None, the ``first`` minimum
+        over all elements where `labels` is non-zero is returned.
+
+        The `index` argument only works when `labels` is specified.
+
+    Returns
+    -------
+    output : list of tuples of ints
+        Tuple of ints or list of tuples of ints that specify the location
+        of minima of `input` over the regions determined by `labels` and
+        whose index is in `index`.
+
+        If `index` or `labels` are not specified, a tuple of ints is
+        returned specifying the location of the first minimal value of `input`.
+
+    See Also
+    --------
+    label, minimum, median, maximum_position, extrema, sum, mean, variance,
+    standard_deviation
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[10, 20, 30],
+    ...               [40, 80, 100],
+    ...               [1, 100, 200]])
+    >>> b = np.array([[1, 2, 0, 1],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+
+    >>> from scipy import ndimage
+
+    >>> ndimage.minimum_position(a)
+    (2, 0)
+    >>> ndimage.minimum_position(b)
+    (0, 2)
+
+    Features to process can be specified using `labels` and `index`:
+
+    >>> label, pos = ndimage.label(a)
+    >>> ndimage.minimum_position(a, label, index=np.arange(1, pos+1))
+    [(2, 0)]
+
+    >>> label, pos = ndimage.label(b)
+    >>> ndimage.minimum_position(b, label, index=np.arange(1, pos+1))
+    [(0, 0), (0, 3), (3, 1)]
+
+    """
+    dims = np.array(np.asarray(input).shape)
+    # see np.unravel_index to understand this line.
+    dim_prod = np.cumprod([1] + list(dims[:0:-1]))[::-1]
+
+    result = _select(input, labels, index, find_min_positions=True)[0]
+
+    if np.isscalar(result):
+        return tuple((result // dim_prod) % dims)
+
+    return [tuple(v) for v in (result.reshape(-1, 1) // dim_prod) % dims]
+
+
+def maximum_position(input, labels=None, index=None):
+    """
+    Find the positions of the maximums of the values of an array at labels.
+
+    For each region specified by `labels`, the position of the maximum
+    value of `input` within the region is returned.
+
+    Parameters
+    ----------
+    input : array_like
+        Array_like of values.
+    labels : array_like, optional
+        An array of integers marking different regions over which the
+        position of the maximum value of `input` is to be computed.
+        `labels` must have the same shape as `input`. If `labels` is not
+        specified, the location of the first maximum over the whole
+        array is returned.
+
+        The `labels` argument only works when `index` is specified.
+    index : array_like, optional
+        A list of region labels that are taken into account for finding the
+        location of the maxima. If `index` is None, the first maximum
+        over all elements where `labels` is non-zero is returned.
+
+        The `index` argument only works when `labels` is specified.
+
+    Returns
+    -------
+    output : list of tuples of ints
+        List of tuples of ints that specify the location of maxima of
+        `input` over the regions determined by `labels` and whose index
+        is in `index`.
+
+        If `index` or `labels` are not specified, a tuple of ints is
+        returned specifying the location of the ``first`` maximal value
+        of `input`.
+
+    See Also
+    --------
+    label, minimum, median, maximum_position, extrema, sum, mean, variance,
+    standard_deviation
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> ndimage.maximum_position(a)
+    (3, 0)
+
+    Features to process can be specified using `labels` and `index`:
+
+    >>> lbl = np.array([[0, 1, 2, 3],
+    ...                 [0, 1, 2, 3],
+    ...                 [0, 1, 2, 3],
+    ...                 [0, 1, 2, 3]])
+    >>> ndimage.maximum_position(a, lbl, 1)
+    (1, 1)
+
+    If no index is given, non-zero `labels` are processed:
+
+    >>> ndimage.maximum_position(a, lbl)
+    (2, 3)
+
+    If there are no maxima, the position of the first element is returned:
+
+    >>> ndimage.maximum_position(a, lbl, 2)
+    (0, 2)
+
+    """
+    dims = np.array(np.asarray(input).shape)
+    # see np.unravel_index to understand this line.
+    dim_prod = np.cumprod([1] + list(dims[:0:-1]))[::-1]
+
+    result = _select(input, labels, index, find_max_positions=True)[0]
+
+    if np.isscalar(result):
+        return tuple((result // dim_prod) % dims)
+
+    return [tuple(v) for v in (result.reshape(-1, 1) // dim_prod) % dims]
+
+
+def extrema(input, labels=None, index=None):
+    """
+    Calculate the minimums and maximums of the values of an array
+    at labels, along with their positions.
+
+    Parameters
+    ----------
+    input : ndarray
+        N-D image data to process.
+    labels : ndarray, optional
+        Labels of features in input.
+        If not None, must be same shape as `input`.
+    index : int or sequence of ints, optional
+        Labels to include in output.  If None (default), all values where
+        non-zero `labels` are used.
+
+    Returns
+    -------
+    minimums, maximums : int or ndarray
+        Values of minimums and maximums in each feature.
+    min_positions, max_positions : tuple or list of tuples
+        Each tuple gives the N-D coordinates of the corresponding minimum
+        or maximum.
+
+    See Also
+    --------
+    maximum, minimum, maximum_position, minimum_position, center_of_mass
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[1, 2, 0, 0],
+    ...               [5, 3, 0, 4],
+    ...               [0, 0, 0, 7],
+    ...               [9, 3, 0, 0]])
+    >>> from scipy import ndimage
+    >>> ndimage.extrema(a)
+    (0, 9, (0, 2), (3, 0))
+
+    Features to process can be specified using `labels` and `index`:
+
+    >>> lbl, nlbl = ndimage.label(a)
+    >>> ndimage.extrema(a, lbl, index=np.arange(1, nlbl+1))
+    (array([1, 4, 3]),
+     array([5, 7, 9]),
+     [(0, 0), (1, 3), (3, 1)],
+     [(1, 0), (2, 3), (3, 0)])
+
+    If no index is given, non-zero `labels` are processed:
+
+    >>> ndimage.extrema(a, lbl)
+    (1, 9, (0, 0), (3, 0))
+
+    """
+    dims = np.array(np.asarray(input).shape)
+    # see np.unravel_index to understand this line.
+    dim_prod = np.cumprod([1] + list(dims[:0:-1]))[::-1]
+
+    minimums, min_positions, maximums, max_positions = _select(input, labels,
+                                                               index,
+                                                               find_min=True,
+                                                               find_max=True,
+                                                               find_min_positions=True,
+                                                               find_max_positions=True)
+
+    if np.isscalar(minimums):
+        return (minimums, maximums, tuple((min_positions // dim_prod) % dims),
+                tuple((max_positions // dim_prod) % dims))
+
+    min_positions = [
+        tuple(v) for v in (min_positions.reshape(-1, 1) // dim_prod) % dims
+    ]
+    max_positions = [
+        tuple(v) for v in (max_positions.reshape(-1, 1) // dim_prod) % dims
+    ]
+
+    return minimums, maximums, min_positions, max_positions
+
+
+def center_of_mass(input, labels=None, index=None):
+    """
+    Calculate the center of mass of the values of an array at labels.
+
+    Parameters
+    ----------
+    input : ndarray
+        Data from which to calculate center-of-mass. The masses can either
+        be positive or negative.
+    labels : ndarray, optional
+        Labels for objects in `input`, as generated by `ndimage.label`.
+        Only used with `index`. Dimensions must be the same as `input`.
+    index : int or sequence of ints, optional
+        Labels for which to calculate centers-of-mass. If not specified,
+        the combined center of mass of all labels greater than zero
+        will be calculated. Only used with `labels`.
+
+    Returns
+    -------
+    center_of_mass : tuple, or list of tuples
+        Coordinates of centers-of-mass.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array(([0,0,0,0],
+    ...               [0,1,1,0],
+    ...               [0,1,1,0],
+    ...               [0,1,1,0]))
+    >>> from scipy import ndimage
+    >>> ndimage.center_of_mass(a)
+    (2.0, 1.5)
+
+    Calculation of multiple objects in an image
+
+    >>> b = np.array(([0,1,1,0],
+    ...               [0,1,0,0],
+    ...               [0,0,0,0],
+    ...               [0,0,1,1],
+    ...               [0,0,1,1]))
+    >>> lbl = ndimage.label(b)[0]
+    >>> ndimage.center_of_mass(b, lbl, [1,2])
+    [(0.33333333333333331, 1.3333333333333333), (3.5, 2.5)]
+
+    Negative masses are also accepted, which can occur for example when
+    bias is removed from measured data due to random noise.
+
+    >>> c = np.array(([-1,0,0,0],
+    ...               [0,-1,-1,0],
+    ...               [0,1,-1,0],
+    ...               [0,1,1,0]))
+    >>> ndimage.center_of_mass(c)
+    (-4.0, 1.0)
+
+    If there are division by zero issues, the function does not raise an
+    error but rather issues a RuntimeWarning before returning inf and/or NaN.
+
+    >>> d = np.array([-1, 1])
+    >>> ndimage.center_of_mass(d)
+    (inf,)
+    """
+    input = np.asarray(input)
+    normalizer = sum_labels(input, labels, index)
+    grids = np.ogrid[[slice(0, i) for i in input.shape]]
+
+    results = [sum_labels(input * grids[dir].astype(float), labels, index) / normalizer
+               for dir in range(input.ndim)]
+
+    if np.isscalar(results[0]):
+        return tuple(results)
+
+    return [tuple(v) for v in np.array(results).T]
+
+
+def histogram(input, min, max, bins, labels=None, index=None):
+    """
+    Calculate the histogram of the values of an array, optionally at labels.
+
+    Histogram calculates the frequency of values in an array within bins
+    determined by `min`, `max`, and `bins`. The `labels` and `index`
+    keywords can limit the scope of the histogram to specified sub-regions
+    within the array.
+
+    Parameters
+    ----------
+    input : array_like
+        Data for which to calculate histogram.
+    min, max : int
+        Minimum and maximum values of range of histogram bins.
+    bins : int
+        Number of bins.
+    labels : array_like, optional
+        Labels for objects in `input`.
+        If not None, must be same shape as `input`.
+    index : int or sequence of ints, optional
+        Label or labels for which to calculate histogram. If None, all values
+        where label is greater than zero are used
+
+    Returns
+    -------
+    hist : ndarray
+        Histogram counts.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> a = np.array([[ 0.    ,  0.2146,  0.5962,  0.    ],
+    ...               [ 0.    ,  0.7778,  0.    ,  0.    ],
+    ...               [ 0.    ,  0.    ,  0.    ,  0.    ],
+    ...               [ 0.    ,  0.    ,  0.7181,  0.2787],
+    ...               [ 0.    ,  0.    ,  0.6573,  0.3094]])
+    >>> from scipy import ndimage
+    >>> ndimage.histogram(a, 0, 1, 10)
+    array([13,  0,  2,  1,  0,  1,  1,  2,  0,  0])
+
+    With labels and no indices, non-zero elements are counted:
+
+    >>> lbl, nlbl = ndimage.label(a)
+    >>> ndimage.histogram(a, 0, 1, 10, lbl)
+    array([0, 0, 2, 1, 0, 1, 1, 2, 0, 0])
+
+    Indices can be used to count only certain objects:
+
+    >>> ndimage.histogram(a, 0, 1, 10, lbl, 2)
+    array([0, 0, 1, 1, 0, 0, 1, 1, 0, 0])
+
+    """
+    _bins = np.linspace(min, max, bins + 1)
+
+    def _hist(vals):
+        return np.histogram(vals, _bins)[0]
+
+    return labeled_comprehension(input, labels, index, _hist, object, None,
+                                 pass_positions=False)
+
+
+def watershed_ift(input, markers, structure=None, output=None):
+    """
+    Apply watershed from markers using image foresting transform algorithm.
+
+    Parameters
+    ----------
+    input : array_like
+        Input.
+    markers : array_like
+        Markers are points within each watershed that form the beginning
+        of the process. Negative markers are considered background markers
+        which are processed after the other markers.
+    structure : structure element, optional
+        A structuring element defining the connectivity of the object can be
+        provided. If None, an element is generated with a squared
+        connectivity equal to one.
+    output : ndarray, optional
+        An output array can optionally be provided. The same shape as input.
+
+    Returns
+    -------
+    watershed_ift : ndarray
+        Output.  Same shape as `input`.
+
+    References
+    ----------
+    .. [1] A.X. Falcao, J. Stolfi and R. de Alencar Lotufo, "The image
+           foresting transform: theory, algorithms, and applications",
+           Pattern Analysis and Machine Intelligence, vol. 26, pp. 19-29, 2004.
+
+    """
+    input = np.asarray(input)
+    if input.dtype.type not in [np.uint8, np.uint16]:
+        raise TypeError('only 8 and 16 unsigned inputs are supported')
+
+    if structure is None:
+        structure = _morphology.generate_binary_structure(input.ndim, 1)
+    structure = np.asarray(structure, dtype=bool)
+    if structure.ndim != input.ndim:
+        raise RuntimeError('structure and input must have equal rank')
+    for ii in structure.shape:
+        if ii != 3:
+            raise RuntimeError('structure dimensions must be equal to 3')
+
+    if not structure.flags.contiguous:
+        structure = structure.copy()
+    markers = np.asarray(markers)
+    if input.shape != markers.shape:
+        raise RuntimeError('input and markers must have equal shape')
+
+    integral_types = [np.int8,
+                      np.int16,
+                      np.int32,
+                      np.int64,
+                      np.intc,
+                      np.intp]
+
+    if markers.dtype.type not in integral_types:
+        raise RuntimeError('marker should be of integer type')
+
+    if isinstance(output, np.ndarray):
+        if output.dtype.type not in integral_types:
+            raise RuntimeError('output should be of integer type')
+    else:
+        output = markers.dtype
+
+    output = _ni_support._get_output(output, input)
+    _nd_image.watershed_ift(input, markers, structure, output)
+    return output
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_morphology.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_morphology.py
new file mode 100644
index 0000000000000000000000000000000000000000..12972c09a7cd5de0ca059814281fb9d210fbd395
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_morphology.py
@@ -0,0 +1,2629 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import warnings
+import operator
+
+import numpy as np
+from . import _ni_support
+from . import _nd_image
+from . import _filters
+
+__all__ = ['iterate_structure', 'generate_binary_structure', 'binary_erosion',
+           'binary_dilation', 'binary_opening', 'binary_closing',
+           'binary_hit_or_miss', 'binary_propagation', 'binary_fill_holes',
+           'grey_erosion', 'grey_dilation', 'grey_opening', 'grey_closing',
+           'morphological_gradient', 'morphological_laplace', 'white_tophat',
+           'black_tophat', 'distance_transform_bf', 'distance_transform_cdt',
+           'distance_transform_edt']
+
+
+def _center_is_true(structure, origin):
+    structure = np.asarray(structure)
+    coor = tuple([oo + ss // 2 for ss, oo in zip(structure.shape,
+                                                 origin)])
+    return bool(structure[coor])
+
+
+def iterate_structure(structure, iterations, origin=None):
+    """
+    Iterate a structure by dilating it with itself.
+
+    Parameters
+    ----------
+    structure : array_like
+       Structuring element (an array of bools, for example), to be dilated with
+       itself.
+    iterations : int
+       number of dilations performed on the structure with itself
+    origin : optional
+        If origin is None, only the iterated structure is returned. If
+        not, a tuple of the iterated structure and the modified origin is
+        returned.
+
+    Returns
+    -------
+    iterate_structure : ndarray of bools
+        A new structuring element obtained by dilating `structure`
+        (`iterations` - 1) times with itself.
+
+    See Also
+    --------
+    generate_binary_structure
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> struct = ndimage.generate_binary_structure(2, 1)
+    >>> struct.astype(int)
+    array([[0, 1, 0],
+           [1, 1, 1],
+           [0, 1, 0]])
+    >>> ndimage.iterate_structure(struct, 2).astype(int)
+    array([[0, 0, 1, 0, 0],
+           [0, 1, 1, 1, 0],
+           [1, 1, 1, 1, 1],
+           [0, 1, 1, 1, 0],
+           [0, 0, 1, 0, 0]])
+    >>> ndimage.iterate_structure(struct, 3).astype(int)
+    array([[0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [1, 1, 1, 1, 1, 1, 1],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 0, 1, 0, 0, 0]])
+
+    """
+    structure = np.asarray(structure)
+    if iterations < 2:
+        return structure.copy()
+    ni = iterations - 1
+    shape = [ii + ni * (ii - 1) for ii in structure.shape]
+    pos = [ni * (structure.shape[ii] // 2) for ii in range(len(shape))]
+    slc = tuple(slice(pos[ii], pos[ii] + structure.shape[ii], None)
+                for ii in range(len(shape)))
+    out = np.zeros(shape, bool)
+    out[slc] = structure != 0
+    out = binary_dilation(out, structure, iterations=ni)
+    if origin is None:
+        return out
+    else:
+        origin = _ni_support._normalize_sequence(origin, structure.ndim)
+        origin = [iterations * o for o in origin]
+        return out, origin
+
+
+def generate_binary_structure(rank, connectivity):
+    """
+    Generate a binary structure for binary morphological operations.
+
+    Parameters
+    ----------
+    rank : int
+         Number of dimensions of the array to which the structuring element
+         will be applied, as returned by `np.ndim`.
+    connectivity : int
+         `connectivity` determines which elements of the output array belong
+         to the structure, i.e., are considered as neighbors of the central
+         element. Elements up to a squared distance of `connectivity` from
+         the center are considered neighbors. `connectivity` may range from 1
+         (no diagonal elements are neighbors) to `rank` (all elements are
+         neighbors).
+
+    Returns
+    -------
+    output : ndarray of bools
+         Structuring element which may be used for binary morphological
+         operations, with `rank` dimensions and all dimensions equal to 3.
+
+    See Also
+    --------
+    iterate_structure, binary_dilation, binary_erosion
+
+    Notes
+    -----
+    `generate_binary_structure` can only create structuring elements with
+    dimensions equal to 3, i.e., minimal dimensions. For larger structuring
+    elements, that are useful e.g., for eroding large objects, one may either
+    use `iterate_structure`, or create directly custom arrays with
+    numpy functions such as `numpy.ones`.
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> struct = ndimage.generate_binary_structure(2, 1)
+    >>> struct
+    array([[False,  True, False],
+           [ True,  True,  True],
+           [False,  True, False]], dtype=bool)
+    >>> a = np.zeros((5,5))
+    >>> a[2, 2] = 1
+    >>> a
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> b = ndimage.binary_dilation(a, structure=struct).astype(a.dtype)
+    >>> b
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> ndimage.binary_dilation(b, structure=struct).astype(a.dtype)
+    array([[ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 1.,  1.,  1.,  1.,  1.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.]])
+    >>> struct = ndimage.generate_binary_structure(2, 2)
+    >>> struct
+    array([[ True,  True,  True],
+           [ True,  True,  True],
+           [ True,  True,  True]], dtype=bool)
+    >>> struct = ndimage.generate_binary_structure(3, 1)
+    >>> struct # no diagonal elements
+    array([[[False, False, False],
+            [False,  True, False],
+            [False, False, False]],
+           [[False,  True, False],
+            [ True,  True,  True],
+            [False,  True, False]],
+           [[False, False, False],
+            [False,  True, False],
+            [False, False, False]]], dtype=bool)
+
+    """
+    if connectivity < 1:
+        connectivity = 1
+    if rank < 1:
+        return np.array(True, dtype=bool)
+    output = np.fabs(np.indices([3] * rank) - 1)
+    output = np.add.reduce(output, 0)
+    return output <= connectivity
+
+
+def _binary_erosion(input, structure, iterations, mask, output,
+                    border_value, origin, invert, brute_force, axes):
+    try:
+        iterations = operator.index(iterations)
+    except TypeError as e:
+        raise TypeError('iterations parameter should be an integer') from e
+
+    input = np.asarray(input)
+    ndim = input.ndim
+    if np.iscomplexobj(input):
+        raise TypeError('Complex type not supported')
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if structure is None:
+        structure = generate_binary_structure(num_axes, 1)
+    else:
+        structure = np.asarray(structure, dtype=bool)
+    if ndim > num_axes:
+        structure = _filters._expand_footprint(ndim, axes, structure,
+                                               footprint_name="structure")
+
+    if structure.ndim != input.ndim:
+        raise RuntimeError('structure and input must have same dimensionality')
+    if not structure.flags.contiguous:
+        structure = structure.copy()
+    if structure.size < 1:
+        raise RuntimeError('structure must not be empty')
+    if mask is not None:
+        mask = np.asarray(mask)
+        if mask.shape != input.shape:
+            raise RuntimeError('mask and input must have equal sizes')
+    origin = _ni_support._normalize_sequence(origin, num_axes)
+    origin = _filters._expand_origin(ndim, axes, origin)
+    cit = _center_is_true(structure, origin)
+    if isinstance(output, np.ndarray):
+        if np.iscomplexobj(output):
+            raise TypeError('Complex output type not supported')
+    else:
+        output = bool
+    output = _ni_support._get_output(output, input)
+    temp_needed = np.may_share_memory(input, output)
+    if temp_needed:
+        # input and output arrays cannot share memory
+        temp = output
+        output = _ni_support._get_output(output.dtype, input)
+    if iterations == 1:
+        _nd_image.binary_erosion(input, structure, mask, output,
+                                 border_value, origin, invert, cit, 0)
+    elif cit and not brute_force:
+        changed, coordinate_list = _nd_image.binary_erosion(
+            input, structure, mask, output,
+            border_value, origin, invert, cit, 1)
+        structure = structure[tuple([slice(None, None, -1)] *
+                                    structure.ndim)]
+        for ii in range(len(origin)):
+            origin[ii] = -origin[ii]
+            if not structure.shape[ii] & 1:
+                origin[ii] -= 1
+        if mask is not None:
+            mask = np.asarray(mask, dtype=np.int8)
+        if not structure.flags.contiguous:
+            structure = structure.copy()
+        _nd_image.binary_erosion2(output, structure, mask, iterations - 1,
+                                  origin, invert, coordinate_list)
+    else:
+        tmp_in = np.empty_like(input, dtype=bool)
+        tmp_out = output
+        if iterations >= 1 and not iterations & 1:
+            tmp_in, tmp_out = tmp_out, tmp_in
+        changed = _nd_image.binary_erosion(
+            input, structure, mask, tmp_out,
+            border_value, origin, invert, cit, 0)
+        ii = 1
+        while ii < iterations or (iterations < 1 and changed):
+            tmp_in, tmp_out = tmp_out, tmp_in
+            changed = _nd_image.binary_erosion(
+                tmp_in, structure, mask, tmp_out,
+                border_value, origin, invert, cit, 0)
+            ii += 1
+    if temp_needed:
+        temp[...] = output
+        output = temp
+    return output
+
+
+def binary_erosion(input, structure=None, iterations=1, mask=None, output=None,
+                   border_value=0, origin=0, brute_force=False, *, axes=None):
+    """
+    Multidimensional binary erosion with a given structuring element.
+
+    Binary erosion is a mathematical morphology operation used for image
+    processing.
+
+    Parameters
+    ----------
+    input : array_like
+        Binary image to be eroded. Non-zero (True) elements form
+        the subset to be eroded.
+    structure : array_like, optional
+        Structuring element used for the erosion. Non-zero elements are
+        considered True. If no structuring element is provided, an element
+        is generated with a square connectivity equal to one.
+    iterations : int, optional
+        The erosion is repeated `iterations` times (one, by default).
+        If iterations is less than 1, the erosion is repeated until the
+        result does not change anymore.
+    mask : array_like, optional
+        If a mask is given, only those elements with a True value at
+        the corresponding mask element are modified at each iteration.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    border_value : int (cast to 0 or 1), optional
+        Value at the border in the output array.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated (eroded) in
+        the current iteration; if True all pixels are considered as candidates
+        for erosion, regardless of what happened in the previous iteration.
+        False by default.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    binary_erosion : ndarray of bools
+        Erosion of the input by the structuring element.
+
+    See Also
+    --------
+    grey_erosion, binary_dilation, binary_closing, binary_opening,
+    generate_binary_structure
+
+    Notes
+    -----
+    Erosion [1]_ is a mathematical morphology operation [2]_ that uses a
+    structuring element for shrinking the shapes in an image. The binary
+    erosion of an image by a structuring element is the locus of the points
+    where a superimposition of the structuring element centered on the point
+    is entirely contained in the set of non-zero elements of the image.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Erosion_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[1:6, 2:5] = 1
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.binary_erosion(a).astype(a.dtype)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> #Erosion removes objects smaller than the structure
+    >>> ndimage.binary_erosion(a, structure=np.ones((5,5))).astype(a.dtype)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+
+    """
+    return _binary_erosion(input, structure, iterations, mask,
+                           output, border_value, origin, 0, brute_force, axes)
+
+
+def binary_dilation(input, structure=None, iterations=1, mask=None,
+                    output=None, border_value=0, origin=0,
+                    brute_force=False, *, axes=None):
+    """
+    Multidimensional binary dilation with the given structuring element.
+
+    Parameters
+    ----------
+    input : array_like
+        Binary array_like to be dilated. Non-zero (True) elements form
+        the subset to be dilated.
+    structure : array_like, optional
+        Structuring element used for the dilation. Non-zero elements are
+        considered True. If no structuring element is provided an element
+        is generated with a square connectivity equal to one.
+    iterations : int, optional
+        The dilation is repeated `iterations` times (one, by default).
+        If iterations is less than 1, the dilation is repeated until the
+        result does not change anymore. Only an integer of iterations is
+        accepted.
+    mask : array_like, optional
+        If a mask is given, only those elements with a True value at
+        the corresponding mask element are modified at each iteration.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    border_value : int (cast to 0 or 1), optional
+        Value at the border in the output array.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated (dilated)
+        in the current iteration; if True all pixels are considered as
+        candidates for dilation, regardless of what happened in the previous
+        iteration. False by default.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    binary_dilation : ndarray of bools
+        Dilation of the input by the structuring element.
+
+    See Also
+    --------
+    grey_dilation, binary_erosion, binary_closing, binary_opening,
+    generate_binary_structure
+
+    Notes
+    -----
+    Dilation [1]_ is a mathematical morphology operation [2]_ that uses a
+    structuring element for expanding the shapes in an image. The binary
+    dilation of an image by a structuring element is the locus of the points
+    covered by the structuring element, when its center lies within the
+    non-zero points of the image.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Dilation_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((5, 5))
+    >>> a[2, 2] = 1
+    >>> a
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> ndimage.binary_dilation(a)
+    array([[False, False, False, False, False],
+           [False, False,  True, False, False],
+           [False,  True,  True,  True, False],
+           [False, False,  True, False, False],
+           [False, False, False, False, False]], dtype=bool)
+    >>> ndimage.binary_dilation(a).astype(a.dtype)
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> # 3x3 structuring element with connectivity 1, used by default
+    >>> struct1 = ndimage.generate_binary_structure(2, 1)
+    >>> struct1
+    array([[False,  True, False],
+           [ True,  True,  True],
+           [False,  True, False]], dtype=bool)
+    >>> # 3x3 structuring element with connectivity 2
+    >>> struct2 = ndimage.generate_binary_structure(2, 2)
+    >>> struct2
+    array([[ True,  True,  True],
+           [ True,  True,  True],
+           [ True,  True,  True]], dtype=bool)
+    >>> ndimage.binary_dilation(a, structure=struct1).astype(a.dtype)
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> ndimage.binary_dilation(a, structure=struct2).astype(a.dtype)
+    array([[ 0.,  0.,  0.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  0.,  0.,  0.]])
+    >>> ndimage.binary_dilation(a, structure=struct1,\\
+    ... iterations=2).astype(a.dtype)
+    array([[ 0.,  0.,  1.,  0.,  0.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 1.,  1.,  1.,  1.,  1.],
+           [ 0.,  1.,  1.,  1.,  0.],
+           [ 0.,  0.,  1.,  0.,  0.]])
+
+    """
+    input = np.asarray(input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if structure is None:
+        structure = generate_binary_structure(num_axes, 1)
+    origin = _ni_support._normalize_sequence(origin, num_axes)
+    structure = np.asarray(structure)
+    structure = structure[tuple([slice(None, None, -1)] *
+                                structure.ndim)]
+    for ii in range(len(origin)):
+        origin[ii] = -origin[ii]
+        if not structure.shape[ii] & 1:
+            origin[ii] -= 1
+
+    return _binary_erosion(input, structure, iterations, mask,
+                           output, border_value, origin, 1, brute_force, axes)
+
+
+def binary_opening(input, structure=None, iterations=1, output=None,
+                   origin=0, mask=None, border_value=0, brute_force=False, *,
+                   axes=None):
+    """
+    Multidimensional binary opening with the given structuring element.
+
+    The *opening* of an input image by a structuring element is the
+    *dilation* of the *erosion* of the image by the structuring element.
+
+    Parameters
+    ----------
+    input : array_like
+        Binary array_like to be opened. Non-zero (True) elements form
+        the subset to be opened.
+    structure : array_like, optional
+        Structuring element used for the opening. Non-zero elements are
+        considered True. If no structuring element is provided an element
+        is generated with a square connectivity equal to one (i.e., only
+        nearest neighbors are connected to the center, diagonally-connected
+        elements are not considered neighbors).
+    iterations : int, optional
+        The erosion step of the opening, then the dilation step are each
+        repeated `iterations` times (one, by default). If `iterations` is
+        less than 1, each operation is repeated until the result does
+        not change anymore. Only an integer of iterations is accepted.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    mask : array_like, optional
+        If a mask is given, only those elements with a True value at
+        the corresponding mask element are modified at each iteration.
+
+        .. versionadded:: 1.1.0
+    border_value : int (cast to 0 or 1), optional
+        Value at the border in the output array.
+
+        .. versionadded:: 1.1.0
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated in the
+        current iteration; if true all pixels are considered as candidates for
+        update, regardless of what happened in the previous iteration.
+        False by default.
+
+        .. versionadded:: 1.1.0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    binary_opening : ndarray of bools
+        Opening of the input by the structuring element.
+
+    See Also
+    --------
+    grey_opening, binary_closing, binary_erosion, binary_dilation,
+    generate_binary_structure
+
+    Notes
+    -----
+    *Opening* [1]_ is a mathematical morphology operation [2]_ that
+    consists in the succession of an erosion and a dilation of the
+    input with the same structuring element. Opening, therefore, removes
+    objects smaller than the structuring element.
+
+    Together with *closing* (`binary_closing`), opening can be used for
+    noise removal.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Opening_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((5,5), dtype=int)
+    >>> a[1:4, 1:4] = 1; a[4, 4] = 1
+    >>> a
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 1]])
+    >>> # Opening removes small objects
+    >>> ndimage.binary_opening(a, structure=np.ones((3,3))).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+    >>> # Opening can also smooth corners
+    >>> ndimage.binary_opening(a).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0]])
+    >>> # Opening is the dilation of the erosion of the input
+    >>> ndimage.binary_erosion(a).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0]])
+    >>> ndimage.binary_dilation(ndimage.binary_erosion(a)).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if structure is None:
+        structure = generate_binary_structure(num_axes, 1)
+
+    tmp = binary_erosion(input, structure, iterations, mask, None,
+                         border_value, origin, brute_force, axes=axes)
+    return binary_dilation(tmp, structure, iterations, mask, output,
+                           border_value, origin, brute_force, axes=axes)
+
+
+def binary_closing(input, structure=None, iterations=1, output=None,
+                   origin=0, mask=None, border_value=0, brute_force=False, *,
+                   axes=None):
+    """
+    Multidimensional binary closing with the given structuring element.
+
+    The *closing* of an input image by a structuring element is the
+    *erosion* of the *dilation* of the image by the structuring element.
+
+    Parameters
+    ----------
+    input : array_like
+        Binary array_like to be closed. Non-zero (True) elements form
+        the subset to be closed.
+    structure : array_like, optional
+        Structuring element used for the closing. Non-zero elements are
+        considered True. If no structuring element is provided an element
+        is generated with a square connectivity equal to one (i.e., only
+        nearest neighbors are connected to the center, diagonally-connected
+        elements are not considered neighbors).
+    iterations : int, optional
+        The dilation step of the closing, then the erosion step are each
+        repeated `iterations` times (one, by default). If iterations is
+        less than 1, each operations is repeated until the result does
+        not change anymore. Only an integer of iterations is accepted.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    mask : array_like, optional
+        If a mask is given, only those elements with a True value at
+        the corresponding mask element are modified at each iteration.
+
+        .. versionadded:: 1.1.0
+    border_value : int (cast to 0 or 1), optional
+        Value at the border in the output array.
+
+        .. versionadded:: 1.1.0
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated in the
+        current iteration; if true al pixels are considered as candidates for
+        update, regardless of what happened in the previous iteration.
+        False by default.
+
+        .. versionadded:: 1.1.0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    binary_closing : ndarray of bools
+        Closing of the input by the structuring element.
+
+    See Also
+    --------
+    grey_closing, binary_opening, binary_dilation, binary_erosion,
+    generate_binary_structure
+
+    Notes
+    -----
+    *Closing* [1]_ is a mathematical morphology operation [2]_ that
+    consists in the succession of a dilation and an erosion of the
+    input with the same structuring element. Closing therefore fills
+    holes smaller than the structuring element.
+
+    Together with *opening* (`binary_opening`), closing can be used for
+    noise removal.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Closing_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((5,5), dtype=int)
+    >>> a[1:-1, 1:-1] = 1; a[2,2] = 0
+    >>> a
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 0, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+    >>> # Closing removes small holes
+    >>> ndimage.binary_closing(a).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+    >>> # Closing is the erosion of the dilation of the input
+    >>> ndimage.binary_dilation(a).astype(int)
+    array([[0, 1, 1, 1, 0],
+           [1, 1, 1, 1, 1],
+           [1, 1, 1, 1, 1],
+           [1, 1, 1, 1, 1],
+           [0, 1, 1, 1, 0]])
+    >>> ndimage.binary_erosion(ndimage.binary_dilation(a)).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+
+
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[1:6, 2:5] = 1; a[1:3,3] = 0
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 1, 0, 0],
+           [0, 0, 1, 0, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> # In addition to removing holes, closing can also
+    >>> # coarsen boundaries with fine hollows.
+    >>> ndimage.binary_closing(a).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.binary_closing(a, structure=np.ones((2,2))).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if structure is None:
+        structure = generate_binary_structure(num_axes, 1)
+
+    tmp = binary_dilation(input, structure, iterations, mask, None,
+                          border_value, origin, brute_force, axes=axes)
+    return binary_erosion(tmp, structure, iterations, mask, output,
+                          border_value, origin, brute_force, axes=axes)
+
+
+def binary_hit_or_miss(input, structure1=None, structure2=None,
+                       output=None, origin1=0, origin2=None, *, axes=None):
+    """
+    Multidimensional binary hit-or-miss transform.
+
+    The hit-or-miss transform finds the locations of a given pattern
+    inside the input image.
+
+    Parameters
+    ----------
+    input : array_like (cast to booleans)
+        Binary image where a pattern is to be detected.
+    structure1 : array_like (cast to booleans), optional
+        Part of the structuring element to be fitted to the foreground
+        (non-zero elements) of `input`. If no value is provided, a
+        structure of square connectivity 1 is chosen.
+    structure2 : array_like (cast to booleans), optional
+        Second part of the structuring element that has to miss completely
+        the foreground. If no value is provided, the complementary of
+        `structure1` is taken.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    origin1 : int or tuple of ints, optional
+        Placement of the first part of the structuring element `structure1`,
+        by default 0 for a centered structure.
+    origin2 : int or tuple of ints, optional
+        Placement of the second part of the structuring element `structure2`,
+        by default 0 for a centered structure. If a value is provided for
+        `origin1` and not for `origin2`, then `origin2` is set to `origin1`.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If `origin1` or `origin2` tuples are provided, their
+        length must match the number of axes.
+
+    Returns
+    -------
+    binary_hit_or_miss : ndarray
+        Hit-or-miss transform of `input` with the given structuring
+        element (`structure1`, `structure2`).
+
+    See Also
+    --------
+    binary_erosion
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Hit-or-miss_transform
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[1, 1] = 1; a[2:4, 2:4] = 1; a[4:6, 4:6] = 1
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 0, 0, 0],
+           [0, 0, 1, 1, 0, 0, 0],
+           [0, 0, 0, 0, 1, 1, 0],
+           [0, 0, 0, 0, 1, 1, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> structure1 = np.array([[1, 0, 0], [0, 1, 1], [0, 1, 1]])
+    >>> structure1
+    array([[1, 0, 0],
+           [0, 1, 1],
+           [0, 1, 1]])
+    >>> # Find the matches of structure1 in the array a
+    >>> ndimage.binary_hit_or_miss(a, structure1=structure1).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> # Change the origin of the filter
+    >>> # origin1=1 is equivalent to origin1=(1,1) here
+    >>> ndimage.binary_hit_or_miss(a, structure1=structure1,\\
+    ... origin1=1).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 1, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    num_axes = len(axes)
+    if structure1 is None:
+        structure1 = generate_binary_structure(num_axes, 1)
+    else:
+        structure1 = np.asarray(structure1)
+    if structure2 is None:
+        structure2 = np.logical_not(structure1)
+    origin1 = _ni_support._normalize_sequence(origin1, num_axes)
+    if origin2 is None:
+        origin2 = origin1
+    else:
+        origin2 = _ni_support._normalize_sequence(origin2, num_axes)
+
+    tmp1 = _binary_erosion(input, structure1, 1, None, None, 0, origin1,
+                           0, False, axes)
+    inplace = isinstance(output, np.ndarray)
+    result = _binary_erosion(input, structure2, 1, None, output, 0,
+                             origin2, 1, False, axes)
+    if inplace:
+        np.logical_not(output, output)
+        np.logical_and(tmp1, output, output)
+    else:
+        np.logical_not(result, result)
+        return np.logical_and(tmp1, result)
+
+
+def binary_propagation(input, structure=None, mask=None,
+                       output=None, border_value=0, origin=0, *, axes=None):
+    """
+    Multidimensional binary propagation with the given structuring element.
+
+    Parameters
+    ----------
+    input : array_like
+        Binary image to be propagated inside `mask`.
+    structure : array_like, optional
+        Structuring element used in the successive dilations. The output
+        may depend on the structuring element, especially if `mask` has
+        several connex components. If no structuring element is
+        provided, an element is generated with a squared connectivity equal
+        to one.
+    mask : array_like, optional
+        Binary mask defining the region into which `input` is allowed to
+        propagate.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    border_value : int (cast to 0 or 1), optional
+        Value at the border in the output array.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    binary_propagation : ndarray
+        Binary propagation of `input` inside `mask`.
+
+    Notes
+    -----
+    This function is functionally equivalent to calling binary_dilation
+    with the number of iterations less than one: iterative dilation until
+    the result does not change anymore.
+
+    The succession of an erosion and propagation inside the original image
+    can be used instead of an *opening* for deleting small objects while
+    keeping the contours of larger objects untouched.
+
+    References
+    ----------
+    .. [1] http://cmm.ensmp.fr/~serra/cours/pdf/en/ch6en.pdf, slide 15.
+    .. [2] I.T. Young, J.J. Gerbrands, and L.J. van Vliet, "Fundamentals of
+        image processing", 1998
+        ftp://qiftp.tudelft.nl/DIPimage/docs/FIP2.3.pdf
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> input = np.zeros((8, 8), dtype=int)
+    >>> input[2, 2] = 1
+    >>> mask = np.zeros((8, 8), dtype=int)
+    >>> mask[1:4, 1:4] = mask[4, 4]  = mask[6:8, 6:8] = 1
+    >>> input
+    array([[0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0]])
+    >>> mask
+    array([[0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 1, 1],
+           [0, 0, 0, 0, 0, 0, 1, 1]])
+    >>> ndimage.binary_propagation(input, mask=mask).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.binary_propagation(input, mask=mask,\\
+    ... structure=np.ones((3,3))).astype(int)
+    array([[0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0, 0, 0, 0],
+           [0, 0, 0, 0, 1, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0, 0]])
+
+    >>> # Comparison between opening and erosion+propagation
+    >>> a = np.zeros((6,6), dtype=int)
+    >>> a[2:5, 2:5] = 1; a[0, 0] = 1; a[5, 5] = 1
+    >>> a
+    array([[1, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0, 1]])
+    >>> ndimage.binary_opening(a).astype(int)
+    array([[0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0]])
+    >>> b = ndimage.binary_erosion(a)
+    >>> b.astype(int)
+    array([[0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0]])
+    >>> ndimage.binary_propagation(b, mask=a).astype(int)
+    array([[0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0, 0]])
+
+    """
+    return binary_dilation(input, structure, -1, mask, output,
+                           border_value, origin, axes=axes)
+
+
+def binary_fill_holes(input, structure=None, output=None, origin=0, *,
+                      axes=None):
+    """
+    Fill the holes in binary objects.
+
+
+    Parameters
+    ----------
+    input : array_like
+        N-D binary array with holes to be filled
+    structure : array_like, optional
+        Structuring element used in the computation; large-size elements
+        make computations faster but may miss holes separated from the
+        background by thin regions. The default element (with a square
+        connectivity equal to one) yields the intuitive result where all
+        holes in the input have been filled.
+    output : ndarray, optional
+        Array of the same shape as input, into which the output is placed.
+        By default, a new array is created.
+    origin : int, tuple of ints, optional
+        Position of the structuring element.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    out : ndarray
+        Transformation of the initial image `input` where holes have been
+        filled.
+
+    See Also
+    --------
+    binary_dilation, binary_propagation, label
+
+    Notes
+    -----
+    The algorithm used in this function consists in invading the complementary
+    of the shapes in `input` from the outer boundary of the image,
+    using binary dilations. Holes are not connected to the boundary and are
+    therefore not invaded. The result is the complementary subset of the
+    invaded region.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((5, 5), dtype=int)
+    >>> a[1:4, 1:4] = 1
+    >>> a[2,2] = 0
+    >>> a
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 0, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+    >>> ndimage.binary_fill_holes(a).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+    >>> # Too big structuring element
+    >>> ndimage.binary_fill_holes(a, structure=np.ones((5,5))).astype(int)
+    array([[0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 0],
+           [0, 1, 0, 1, 0],
+           [0, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+    mask = np.logical_not(input)
+    tmp = np.zeros(mask.shape, bool)
+    inplace = isinstance(output, np.ndarray)
+    if inplace:
+        binary_dilation(tmp, structure, -1, mask, output, 1, origin, axes=axes)
+        np.logical_not(output, output)
+    else:
+        output = binary_dilation(tmp, structure, -1, mask, None, 1,
+                                 origin, axes=axes)
+        np.logical_not(output, output)
+        return output
+
+
+def grey_erosion(input, size=None, footprint=None, structure=None,
+                 output=None, mode="reflect", cval=0.0, origin=0, *,
+                 axes=None):
+    """
+    Calculate a greyscale erosion, using either a structuring element,
+    or a footprint corresponding to a flat structuring element.
+
+    Grayscale erosion is a mathematical morphology operation. For the
+    simple case of a full and flat structuring element, it can be viewed
+    as a minimum filter over a sliding window.
+
+    Parameters
+    ----------
+    input : array_like
+        Array over which the grayscale erosion is to be computed.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the grayscale
+        erosion. Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the grayscale erosion. Non-zero values give the set of
+        neighbors of the center over which the minimum is chosen.
+    structure : array of ints, optional
+        Structuring element used for the grayscale erosion. `structure`
+        may be a non-flat structuring element. The `structure` array applies a
+        subtractive offset for each pixel in the neighborhood.
+    output : array, optional
+        An array used for storing the output of the erosion may be provided.
+    mode : {'reflect','constant','nearest','mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    output : ndarray
+        Grayscale erosion of `input`.
+
+    See Also
+    --------
+    binary_erosion, grey_dilation, grey_opening, grey_closing
+    generate_binary_structure, minimum_filter
+
+    Notes
+    -----
+    The grayscale erosion of an image input by a structuring element s defined
+    over a domain E is given by:
+
+    (input+s)(x) = min {input(y) - s(x-y), for y in E}
+
+    In particular, for structuring elements defined as
+    s(y) = 0 for y in E, the grayscale erosion computes the minimum of the
+    input image inside a sliding window defined by E.
+
+    Grayscale erosion [1]_ is a *mathematical morphology* operation [2]_.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Erosion_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[1:6, 1:6] = 3
+    >>> a[4,4] = 2; a[2,3] = 1
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 3, 3, 3, 3, 3, 0],
+           [0, 3, 3, 1, 3, 3, 0],
+           [0, 3, 3, 3, 3, 3, 0],
+           [0, 3, 3, 3, 2, 3, 0],
+           [0, 3, 3, 3, 3, 3, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.grey_erosion(a, size=(3,3))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 3, 2, 2, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> footprint = ndimage.generate_binary_structure(2, 1)
+    >>> footprint
+    array([[False,  True, False],
+           [ True,  True,  True],
+           [False,  True, False]], dtype=bool)
+    >>> # Diagonally-connected elements are not considered neighbors
+    >>> ndimage.grey_erosion(a, footprint=footprint)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 3, 1, 2, 0, 0],
+           [0, 0, 3, 2, 2, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+
+    """
+    if size is None and footprint is None and structure is None:
+        raise ValueError("size, footprint, or structure must be specified")
+
+    return _filters._min_or_max_filter(input, size, footprint, structure,
+                                       output, mode, cval, origin, 1,
+                                       axes=axes)
+
+
+def grey_dilation(input, size=None, footprint=None, structure=None,
+                  output=None, mode="reflect", cval=0.0, origin=0, *,
+                  axes=None):
+    """
+    Calculate a greyscale dilation, using either a structuring element,
+    or a footprint corresponding to a flat structuring element.
+
+    Grayscale dilation is a mathematical morphology operation. For the
+    simple case of a full and flat structuring element, it can be viewed
+    as a maximum filter over a sliding window.
+
+    Parameters
+    ----------
+    input : array_like
+        Array over which the grayscale dilation is to be computed.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the grayscale
+        dilation. Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the grayscale dilation. Non-zero values give the set of
+        neighbors of the center over which the maximum is chosen.
+    structure : array of ints, optional
+        Structuring element used for the grayscale dilation. `structure`
+        may be a non-flat structuring element. The `structure` array applies an
+        additive offset for each pixel in the neighborhood.
+    output : array, optional
+        An array used for storing the output of the dilation may be provided.
+    mode : {'reflect','constant','nearest','mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    grey_dilation : ndarray
+        Grayscale dilation of `input`.
+
+    See Also
+    --------
+    binary_dilation, grey_erosion, grey_closing, grey_opening
+    generate_binary_structure, maximum_filter
+
+    Notes
+    -----
+    The grayscale dilation of an image input by a structuring element s defined
+    over a domain E is given by:
+
+    (input+s)(x) = max {input(y) + s(x-y), for y in E}
+
+    In particular, for structuring elements defined as
+    s(y) = 0 for y in E, the grayscale dilation computes the maximum of the
+    input image inside a sliding window defined by E.
+
+    Grayscale dilation [1]_ is a *mathematical morphology* operation [2]_.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Dilation_%28morphology%29
+    .. [2] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[2:5, 2:5] = 1
+    >>> a[4,4] = 2; a[2,3] = 3
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 3, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 2, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.grey_dilation(a, size=(3,3))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 3, 3, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.grey_dilation(a, footprint=np.ones((3,3)))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 3, 3, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> s = ndimage.generate_binary_structure(2,1)
+    >>> s
+    array([[False,  True, False],
+           [ True,  True,  True],
+           [False,  True, False]], dtype=bool)
+    >>> ndimage.grey_dilation(a, footprint=s)
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 3, 1, 0, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 1, 3, 2, 1, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 0, 1, 1, 2, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.grey_dilation(a, size=(3,3), structure=np.ones((3,3)))
+    array([[1, 1, 1, 1, 1, 1, 1],
+           [1, 2, 4, 4, 4, 2, 1],
+           [1, 2, 4, 4, 4, 2, 1],
+           [1, 2, 4, 4, 4, 3, 1],
+           [1, 2, 2, 3, 3, 3, 1],
+           [1, 2, 2, 3, 3, 3, 1],
+           [1, 1, 1, 1, 1, 1, 1]])
+
+    """
+    if size is None and footprint is None and structure is None:
+        raise ValueError("size, footprint, or structure must be specified")
+    if structure is not None:
+        structure = np.asarray(structure)
+        structure = structure[tuple([slice(None, None, -1)] *
+                                    structure.ndim)]
+    if footprint is not None:
+        footprint = np.asarray(footprint)
+        footprint = footprint[tuple([slice(None, None, -1)] *
+                                    footprint.ndim)]
+
+    input = np.asarray(input)
+    axes = _ni_support._check_axes(axes, input.ndim)
+    origin = _ni_support._normalize_sequence(origin, len(axes))
+    for ii in range(len(origin)):
+        origin[ii] = -origin[ii]
+        if footprint is not None:
+            sz = footprint.shape[ii]
+        elif structure is not None:
+            sz = structure.shape[ii]
+        elif np.isscalar(size):
+            sz = size
+        else:
+            sz = size[ii]
+        if not sz & 1:
+            origin[ii] -= 1
+
+    return _filters._min_or_max_filter(input, size, footprint, structure,
+                                       output, mode, cval, origin, 0,
+                                       axes=axes)
+
+
+def grey_opening(input, size=None, footprint=None, structure=None,
+                 output=None, mode="reflect", cval=0.0, origin=0, *,
+                 axes=None):
+    """
+    Multidimensional grayscale opening.
+
+    A grayscale opening consists in the succession of a grayscale erosion,
+    and a grayscale dilation.
+
+    Parameters
+    ----------
+    input : array_like
+        Array over which the grayscale opening is to be computed.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the grayscale
+        opening. Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the grayscale opening.
+    structure : array of ints, optional
+        Structuring element used for the grayscale opening. `structure`
+        may be a non-flat structuring element. The `structure` array applies
+        offsets to the pixels in a neighborhood (the offset is additive during
+        dilation and subtractive during erosion).
+    output : array, optional
+        An array used for storing the output of the opening may be provided.
+    mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    grey_opening : ndarray
+        Result of the grayscale opening of `input` with `structure`.
+
+    See Also
+    --------
+    binary_opening, grey_dilation, grey_erosion, grey_closing
+    generate_binary_structure
+
+    Notes
+    -----
+    The action of a grayscale opening with a flat structuring element amounts
+    to smoothen high local maxima, whereas binary opening erases small objects.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.arange(36).reshape((6,6))
+    >>> a[3, 3] = 50
+    >>> a
+    array([[ 0,  1,  2,  3,  4,  5],
+           [ 6,  7,  8,  9, 10, 11],
+           [12, 13, 14, 15, 16, 17],
+           [18, 19, 20, 50, 22, 23],
+           [24, 25, 26, 27, 28, 29],
+           [30, 31, 32, 33, 34, 35]])
+    >>> ndimage.grey_opening(a, size=(3,3))
+    array([[ 0,  1,  2,  3,  4,  4],
+           [ 6,  7,  8,  9, 10, 10],
+           [12, 13, 14, 15, 16, 16],
+           [18, 19, 20, 22, 22, 22],
+           [24, 25, 26, 27, 28, 28],
+           [24, 25, 26, 27, 28, 28]])
+    >>> # Note that the local maximum a[3,3] has disappeared
+
+    """
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=2)
+    tmp = grey_erosion(input, size, footprint, structure, None, mode,
+                       cval, origin, axes=axes)
+    return grey_dilation(tmp, size, footprint, structure, output, mode,
+                         cval, origin, axes=axes)
+
+
+def grey_closing(input, size=None, footprint=None, structure=None,
+                 output=None, mode="reflect", cval=0.0, origin=0, *,
+                 axes=None):
+    """
+    Multidimensional grayscale closing.
+
+    A grayscale closing consists in the succession of a grayscale dilation,
+    and a grayscale erosion.
+
+    Parameters
+    ----------
+    input : array_like
+        Array over which the grayscale closing is to be computed.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the grayscale
+        closing. Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the grayscale closing.
+    structure : array of ints, optional
+        Structuring element used for the grayscale closing. `structure`
+        may be a non-flat structuring element. The `structure` array applies
+        offsets to the pixels in a neighborhood (the offset is additive during
+        dilation and subtractive during erosion)
+    output : array, optional
+        An array used for storing the output of the closing may be provided.
+    mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    grey_closing : ndarray
+        Result of the grayscale closing of `input` with `structure`.
+
+    See Also
+    --------
+    binary_closing, grey_dilation, grey_erosion, grey_opening,
+    generate_binary_structure
+
+    Notes
+    -----
+    The action of a grayscale closing with a flat structuring element amounts
+    to smoothen deep local minima, whereas binary closing fills small holes.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.arange(36).reshape((6,6))
+    >>> a[3,3] = 0
+    >>> a
+    array([[ 0,  1,  2,  3,  4,  5],
+           [ 6,  7,  8,  9, 10, 11],
+           [12, 13, 14, 15, 16, 17],
+           [18, 19, 20,  0, 22, 23],
+           [24, 25, 26, 27, 28, 29],
+           [30, 31, 32, 33, 34, 35]])
+    >>> ndimage.grey_closing(a, size=(3,3))
+    array([[ 7,  7,  8,  9, 10, 11],
+           [ 7,  7,  8,  9, 10, 11],
+           [13, 13, 14, 15, 16, 17],
+           [19, 19, 20, 20, 22, 23],
+           [25, 25, 26, 27, 28, 29],
+           [31, 31, 32, 33, 34, 35]])
+    >>> # Note that the local minimum a[3,3] has disappeared
+
+    """
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=2)
+    tmp = grey_dilation(input, size, footprint, structure, None, mode,
+                        cval, origin, axes=axes)
+    return grey_erosion(tmp, size, footprint, structure, output, mode,
+                        cval, origin, axes=axes)
+
+
+def morphological_gradient(input, size=None, footprint=None, structure=None,
+                           output=None, mode="reflect", cval=0.0, origin=0, *,
+                           axes=None):
+    """
+    Multidimensional morphological gradient.
+
+    The morphological gradient is calculated as the difference between a
+    dilation and an erosion of the input with a given structuring element.
+
+    Parameters
+    ----------
+    input : array_like
+        Array over which to compute the morphlogical gradient.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the mathematical
+        morphology operations. Optional if `footprint` or `structure` is
+        provided. A larger `size` yields a more blurred gradient.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the morphology operations. Larger footprints
+        give a more blurred morphological gradient.
+    structure : array of ints, optional
+        Structuring element used for the morphology operations. `structure` may
+        be a non-flat structuring element. The `structure` array applies
+        offsets to the pixels in a neighborhood (the offset is additive during
+        dilation and subtractive during erosion)
+    output : array, optional
+        An array used for storing the output of the morphological gradient
+        may be provided.
+    mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    morphological_gradient : ndarray
+        Morphological gradient of `input`.
+
+    See Also
+    --------
+    grey_dilation, grey_erosion, gaussian_gradient_magnitude
+
+    Notes
+    -----
+    For a flat structuring element, the morphological gradient
+    computed at a given point corresponds to the maximal difference
+    between elements of the input among the elements covered by the
+    structuring element centered on the point.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Mathematical_morphology
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[2:5, 2:5] = 1
+    >>> ndimage.morphological_gradient(a, size=(3,3))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 0, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> # The morphological gradient is computed as the difference
+    >>> # between a dilation and an erosion
+    >>> ndimage.grey_dilation(a, size=(3,3)) -\\
+    ...  ndimage.grey_erosion(a, size=(3,3))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 0, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 1, 1, 1, 1, 1, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> a = np.zeros((7,7), dtype=int)
+    >>> a[2:5, 2:5] = 1
+    >>> a[4,4] = 2; a[2,3] = 3
+    >>> a
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 1, 3, 1, 0, 0],
+           [0, 0, 1, 1, 1, 0, 0],
+           [0, 0, 1, 1, 2, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+    >>> ndimage.morphological_gradient(a, size=(3,3))
+    array([[0, 0, 0, 0, 0, 0, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 3, 3, 1, 0],
+           [0, 1, 3, 2, 3, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 1, 1, 2, 2, 2, 0],
+           [0, 0, 0, 0, 0, 0, 0]])
+
+    """
+    tmp = grey_dilation(input, size, footprint, structure, None, mode,
+                        cval, origin, axes=axes)
+    if isinstance(output, np.ndarray):
+        grey_erosion(input, size, footprint, structure, output, mode,
+                     cval, origin, axes=axes)
+        return np.subtract(tmp, output, output)
+    else:
+        return (tmp - grey_erosion(input, size, footprint, structure,
+                                   None, mode, cval, origin, axes=axes))
+
+
+def morphological_laplace(input, size=None, footprint=None, structure=None,
+                          output=None, mode="reflect", cval=0.0, origin=0, *,
+                          axes=None):
+    """
+    Multidimensional morphological laplace.
+
+    Parameters
+    ----------
+    input : array_like
+        Input.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the mathematical
+        morphology operations. Optional if `footprint` or `structure` is
+        provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the morphology operations.
+    structure : array of ints, optional
+        Structuring element used for the morphology operations. `structure` may
+        be a non-flat structuring element. The `structure` array applies
+        offsets to the pixels in a neighborhood (the offset is additive during
+        dilation and subtractive during erosion)
+    output : ndarray, optional
+        An output array can optionally be provided.
+    mode : {'reflect','constant','nearest','mirror', 'wrap'}, optional
+        The mode parameter determines how the array borders are handled.
+        For 'constant' mode, values beyond borders are set to be `cval`.
+        Default is 'reflect'.
+    cval : scalar, optional
+        Value to fill past edges of input if mode is 'constant'.
+        Default is 0.0
+    origin : origin, optional
+        The origin parameter controls the placement of the filter.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    morphological_laplace : ndarray
+        Output
+
+    """
+    tmp1 = grey_dilation(input, size, footprint, structure, None, mode,
+                         cval, origin, axes=axes)
+    if isinstance(output, np.ndarray):
+        grey_erosion(input, size, footprint, structure, output, mode,
+                     cval, origin, axes=axes)
+        np.add(tmp1, output, output)
+        np.subtract(output, input, output)
+        return np.subtract(output, input, output)
+    else:
+        tmp2 = grey_erosion(input, size, footprint, structure, None, mode,
+                            cval, origin, axes=axes)
+        np.add(tmp1, tmp2, tmp2)
+        np.subtract(tmp2, input, tmp2)
+        np.subtract(tmp2, input, tmp2)
+        return tmp2
+
+
+def white_tophat(input, size=None, footprint=None, structure=None,
+                 output=None, mode="reflect", cval=0.0, origin=0, *,
+                 axes=None):
+    """
+    Multidimensional white tophat filter.
+
+    Parameters
+    ----------
+    input : array_like
+        Input.
+    size : tuple of ints
+        Shape of a flat and full structuring element used for the filter.
+        Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of elements of a flat structuring element
+        used for the white tophat filter.
+    structure : array of ints, optional
+        Structuring element used for the filter. `structure` may be a non-flat
+        structuring element. The `structure` array applies offsets to the
+        pixels in a neighborhood (the offset is additive during dilation and
+        subtractive during erosion)
+    output : array, optional
+        An array used for storing the output of the filter may be provided.
+    mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'.
+        Default is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default is 0.
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    output : ndarray
+        Result of the filter of `input` with `structure`.
+
+    See Also
+    --------
+    black_tophat
+
+    Examples
+    --------
+    Subtract gray background from a bright peak.
+
+    >>> from scipy.ndimage import generate_binary_structure, white_tophat
+    >>> import numpy as np
+    >>> square = generate_binary_structure(rank=2, connectivity=3)
+    >>> bright_on_gray = np.array([[2, 3, 3, 3, 2],
+    ...                            [3, 4, 5, 4, 3],
+    ...                            [3, 5, 9, 5, 3],
+    ...                            [3, 4, 5, 4, 3],
+    ...                            [2, 3, 3, 3, 2]])
+    >>> white_tophat(input=bright_on_gray, structure=square)
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0],
+           [0, 1, 5, 1, 0],
+           [0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=2)
+    tmp = grey_erosion(input, size, footprint, structure, None, mode,
+                       cval, origin, axes=axes)
+    tmp = grey_dilation(tmp, size, footprint, structure, output, mode,
+                        cval, origin, axes=axes)
+    if tmp is None:
+        tmp = output
+
+    if input.dtype == np.bool_ and tmp.dtype == np.bool_:
+        np.bitwise_xor(input, tmp, out=tmp)
+    else:
+        np.subtract(input, tmp, out=tmp)
+    return tmp
+
+
+def black_tophat(input, size=None, footprint=None, structure=None, output=None,
+                 mode="reflect", cval=0.0, origin=0, *, axes=None):
+    """
+    Multidimensional black tophat filter.
+
+    Parameters
+    ----------
+    input : array_like
+        Input.
+    size : tuple of ints, optional
+        Shape of a flat and full structuring element used for the filter.
+        Optional if `footprint` or `structure` is provided.
+    footprint : array of ints, optional
+        Positions of non-infinite elements of a flat structuring element
+        used for the black tophat filter.
+    structure : array of ints, optional
+        Structuring element used for the filter. `structure` may be a non-flat
+        structuring element. The `structure` array applies offsets to the
+        pixels in a neighborhood (the offset is additive during dilation and
+        subtractive during erosion)
+    output : array, optional
+        An array used for storing the output of the filter may be provided.
+    mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+        The `mode` parameter determines how the array borders are
+        handled, where `cval` is the value when mode is equal to
+        'constant'. Default is 'reflect'
+    cval : scalar, optional
+        Value to fill past edges of input if `mode` is 'constant'. Default
+        is 0.0.
+    origin : scalar, optional
+        The `origin` parameter controls the placement of the filter.
+        Default 0
+    axes : tuple of int or None
+        The axes over which to apply the filter. If None, `input` is filtered
+        along all axes. If an `origin` tuple is provided, its length must match
+        the number of axes.
+
+    Returns
+    -------
+    black_tophat : ndarray
+        Result of the filter of `input` with `structure`.
+
+    See Also
+    --------
+    white_tophat, grey_opening, grey_closing
+
+    Examples
+    --------
+    Change dark peak to bright peak and subtract background.
+
+    >>> from scipy.ndimage import generate_binary_structure, black_tophat
+    >>> import numpy as np
+    >>> square = generate_binary_structure(rank=2, connectivity=3)
+    >>> dark_on_gray = np.array([[7, 6, 6, 6, 7],
+    ...                          [6, 5, 4, 5, 6],
+    ...                          [6, 4, 0, 4, 6],
+    ...                          [6, 5, 4, 5, 6],
+    ...                          [7, 6, 6, 6, 7]])
+    >>> black_tophat(input=dark_on_gray, structure=square)
+    array([[0, 0, 0, 0, 0],
+           [0, 0, 1, 0, 0],
+           [0, 1, 5, 1, 0],
+           [0, 0, 1, 0, 0],
+           [0, 0, 0, 0, 0]])
+
+    """
+    input = np.asarray(input)
+
+    if (size is not None) and (footprint is not None):
+        warnings.warn("ignoring size because footprint is set",
+                      UserWarning, stacklevel=2)
+    tmp = grey_dilation(input, size, footprint, structure, None, mode,
+                        cval, origin, axes=axes)
+    tmp = grey_erosion(tmp, size, footprint, structure, output, mode,
+                       cval, origin, axes=axes)
+    if tmp is None:
+        tmp = output
+
+    if input.dtype == np.bool_ and tmp.dtype == np.bool_:
+        np.bitwise_xor(tmp, input, out=tmp)
+    else:
+        np.subtract(tmp, input, out=tmp)
+    return tmp
+
+
+def distance_transform_bf(input, metric="euclidean", sampling=None,
+                          return_distances=True, return_indices=False,
+                          distances=None, indices=None):
+    """
+    Distance transform function by a brute force algorithm.
+
+    This function calculates the distance transform of the `input`, by
+    replacing each foreground (non-zero) element, with its
+    shortest distance to the background (any zero-valued element).
+
+    In addition to the distance transform, the feature transform can
+    be calculated. In this case the index of the closest background
+    element to each foreground element is returned in a separate array.
+
+    Parameters
+    ----------
+    input : array_like
+        Input
+    metric : {'euclidean', 'taxicab', 'chessboard'}, optional
+        'cityblock' and 'manhattan' are also valid, and map to 'taxicab'.
+        The default is 'euclidean'.
+    sampling : float, or sequence of float, optional
+        This parameter is only used when `metric` is 'euclidean'.
+        Spacing of elements along each dimension. If a sequence, must be of
+        length equal to the input rank; if a single number, this is used for
+        all axes. If not specified, a grid spacing of unity is implied.
+    return_distances : bool, optional
+        Whether to calculate the distance transform.
+        Default is True.
+    return_indices : bool, optional
+        Whether to calculate the feature transform.
+        Default is False.
+    distances : ndarray, optional
+        An output array to store the calculated distance transform, instead of
+        returning it.
+        `return_distances` must be True.
+        It must be the same shape as `input`, and of type float64 if `metric`
+        is 'euclidean', uint32 otherwise.
+    indices : int32 ndarray, optional
+        An output array to store the calculated feature transform, instead of
+        returning it.
+        `return_indicies` must be True.
+        Its shape must be ``(input.ndim,) + input.shape``.
+
+    Returns
+    -------
+    distances : ndarray, optional
+        The calculated distance transform. Returned only when
+        `return_distances` is True and `distances` is not supplied.
+        It will have the same shape as the input array.
+    indices : int32 ndarray, optional
+        The calculated feature transform. It has an input-shaped array for each
+        dimension of the input. See distance_transform_edt documentation for an
+        example.
+        Returned only when `return_indices` is True and `indices` is not
+        supplied.
+
+    See Also
+    --------
+    distance_transform_cdt : Faster distance transform for taxicab and
+                             chessboard metrics
+    distance_transform_edt : Faster distance transform for euclidean metric
+
+    Notes
+    -----
+    This function employs a slow brute force algorithm. See also the
+    function `distance_transform_cdt` for more efficient taxicab [1]_ and
+    chessboard algorithms [2]_.
+
+    References
+    ----------
+    .. [1] Taxicab distance. Wikipedia, 2023.
+           https://en.wikipedia.org/wiki/Taxicab_geometry
+    .. [2] Chessboard distance. Wikipedia, 2023.
+           https://en.wikipedia.org/wiki/Chebyshev_distance
+
+    Examples
+    --------
+    Import the necessary modules.
+
+    >>> import numpy as np
+    >>> from scipy.ndimage import distance_transform_bf
+    >>> import matplotlib.pyplot as plt
+    >>> from mpl_toolkits.axes_grid1 import ImageGrid
+
+    First, we create a toy binary image.
+
+    >>> def add_circle(center_x, center_y, radius, image, fillvalue=1):
+    ...     # fill circular area with 1
+    ...     xx, yy = np.mgrid[:image.shape[0], :image.shape[1]]
+    ...     circle = (xx - center_x) ** 2 + (yy - center_y) ** 2
+    ...     circle_shape = np.sqrt(circle) < radius
+    ...     image[circle_shape] = fillvalue
+    ...     return image
+    >>> image = np.zeros((100, 100), dtype=np.uint8)
+    >>> image[35:65, 20:80] = 1
+    >>> image = add_circle(28, 65, 10, image)
+    >>> image = add_circle(37, 30, 10, image)
+    >>> image = add_circle(70, 45, 20, image)
+    >>> image = add_circle(45, 80, 10, image)
+
+    Next, we set up the figure.
+
+    >>> fig = plt.figure(figsize=(8, 8))  # set up the figure structure
+    >>> grid = ImageGrid(fig, 111, nrows_ncols=(2, 2), axes_pad=(0.4, 0.3),
+    ...                  label_mode="1", share_all=True,
+    ...                  cbar_location="right", cbar_mode="each",
+    ...                  cbar_size="7%", cbar_pad="2%")
+    >>> for ax in grid:
+    ...     ax.axis('off')  # remove axes from images
+
+    The top left image is the original binary image.
+
+    >>> binary_image = grid[0].imshow(image, cmap='gray')
+    >>> cbar_binary_image = grid.cbar_axes[0].colorbar(binary_image)
+    >>> cbar_binary_image.set_ticks([0, 1])
+    >>> grid[0].set_title("Binary image: foreground in white")
+
+    The distance transform calculates the distance between foreground pixels
+    and the image background according to a distance metric. Available metrics
+    in `distance_transform_bf` are: ``euclidean`` (default), ``taxicab``
+    and ``chessboard``. The top right image contains the distance transform
+    based on the ``euclidean`` metric.
+
+    >>> distance_transform_euclidean = distance_transform_bf(image)
+    >>> euclidean_transform = grid[1].imshow(distance_transform_euclidean,
+    ...                                      cmap='gray')
+    >>> cbar_euclidean = grid.cbar_axes[1].colorbar(euclidean_transform)
+    >>> colorbar_ticks = [0, 10, 20]
+    >>> cbar_euclidean.set_ticks(colorbar_ticks)
+    >>> grid[1].set_title("Euclidean distance")
+
+    The lower left image contains the distance transform using the ``taxicab``
+    metric.
+
+    >>> distance_transform_taxicab = distance_transform_bf(image,
+    ...                                                    metric='taxicab')
+    >>> taxicab_transformation = grid[2].imshow(distance_transform_taxicab,
+    ...                                         cmap='gray')
+    >>> cbar_taxicab = grid.cbar_axes[2].colorbar(taxicab_transformation)
+    >>> cbar_taxicab.set_ticks(colorbar_ticks)
+    >>> grid[2].set_title("Taxicab distance")
+
+    Finally, the lower right image contains the distance transform using the
+    ``chessboard`` metric.
+
+    >>> distance_transform_cb = distance_transform_bf(image,
+    ...                                               metric='chessboard')
+    >>> chessboard_transformation = grid[3].imshow(distance_transform_cb,
+    ...                                            cmap='gray')
+    >>> cbar_taxicab = grid.cbar_axes[3].colorbar(chessboard_transformation)
+    >>> cbar_taxicab.set_ticks(colorbar_ticks)
+    >>> grid[3].set_title("Chessboard distance")
+    >>> plt.show()
+
+    """
+    ft_inplace = isinstance(indices, np.ndarray)
+    dt_inplace = isinstance(distances, np.ndarray)
+    _distance_tranform_arg_check(
+        dt_inplace, ft_inplace, return_distances, return_indices
+    )
+
+    tmp1 = np.asarray(input) != 0
+    struct = generate_binary_structure(tmp1.ndim, tmp1.ndim)
+    tmp2 = binary_dilation(tmp1, struct)
+    tmp2 = np.logical_xor(tmp1, tmp2)
+    tmp1 = tmp1.astype(np.int8) - tmp2.astype(np.int8)
+    metric = metric.lower()
+    if metric == 'euclidean':
+        metric = 1
+    elif metric in ['taxicab', 'cityblock', 'manhattan']:
+        metric = 2
+    elif metric == 'chessboard':
+        metric = 3
+    else:
+        raise RuntimeError('distance metric not supported')
+    if sampling is not None:
+        sampling = _ni_support._normalize_sequence(sampling, tmp1.ndim)
+        sampling = np.asarray(sampling, dtype=np.float64)
+        if not sampling.flags.contiguous:
+            sampling = sampling.copy()
+    if return_indices:
+        ft = np.zeros(tmp1.shape, dtype=np.int32)
+    else:
+        ft = None
+    if return_distances:
+        if distances is None:
+            if metric == 1:
+                dt = np.zeros(tmp1.shape, dtype=np.float64)
+            else:
+                dt = np.zeros(tmp1.shape, dtype=np.uint32)
+        else:
+            if distances.shape != tmp1.shape:
+                raise RuntimeError('distances array has wrong shape')
+            if metric == 1:
+                if distances.dtype.type != np.float64:
+                    raise RuntimeError('distances array must be float64')
+            else:
+                if distances.dtype.type != np.uint32:
+                    raise RuntimeError('distances array must be uint32')
+            dt = distances
+    else:
+        dt = None
+
+    _nd_image.distance_transform_bf(tmp1, metric, sampling, dt, ft)
+    if return_indices:
+        if isinstance(indices, np.ndarray):
+            if indices.dtype.type != np.int32:
+                raise RuntimeError('indices array must be int32')
+            if indices.shape != (tmp1.ndim,) + tmp1.shape:
+                raise RuntimeError('indices array has wrong shape')
+            tmp2 = indices
+        else:
+            tmp2 = np.indices(tmp1.shape, dtype=np.int32)
+        ft = np.ravel(ft)
+        for ii in range(tmp2.shape[0]):
+            rtmp = np.ravel(tmp2[ii, ...])[ft]
+            rtmp.shape = tmp1.shape
+            tmp2[ii, ...] = rtmp
+        ft = tmp2
+
+    # construct and return the result
+    result = []
+    if return_distances and not dt_inplace:
+        result.append(dt)
+    if return_indices and not ft_inplace:
+        result.append(ft)
+
+    if len(result) == 2:
+        return tuple(result)
+    elif len(result) == 1:
+        return result[0]
+    else:
+        return None
+
+
+def distance_transform_cdt(input, metric='chessboard', return_distances=True,
+                           return_indices=False, distances=None, indices=None):
+    """
+    Distance transform for chamfer type of transforms.
+
+    This function calculates the distance transform of the `input`, by
+    replacing each foreground (non-zero) element, with its
+    shortest distance to the background (any zero-valued element).
+
+    In addition to the distance transform, the feature transform can
+    be calculated. In this case the index of the closest background
+    element to each foreground element is returned in a separate array.
+
+    Parameters
+    ----------
+    input : array_like
+        Input. Values of 0 are treated as background.
+    metric : {'chessboard', 'taxicab'} or array_like, optional
+        The `metric` determines the type of chamfering that is done. If the
+        `metric` is equal to 'taxicab' a structure is generated using
+        `generate_binary_structure` with a squared distance equal to 1. If
+        the `metric` is equal to 'chessboard', a `metric` is generated
+        using `generate_binary_structure` with a squared distance equal to
+        the dimensionality of the array. These choices correspond to the
+        common interpretations of the 'taxicab' and the 'chessboard'
+        distance metrics in two dimensions.
+        A custom metric may be provided, in the form of a matrix where
+        each dimension has a length of three.
+        'cityblock' and 'manhattan' are also valid, and map to 'taxicab'.
+        The default is 'chessboard'.
+    return_distances : bool, optional
+        Whether to calculate the distance transform.
+        Default is True.
+    return_indices : bool, optional
+        Whether to calculate the feature transform.
+        Default is False.
+    distances : int32 ndarray, optional
+        An output array to store the calculated distance transform, instead of
+        returning it.
+        `return_distances` must be True.
+        It must be the same shape as `input`.
+    indices : int32 ndarray, optional
+        An output array to store the calculated feature transform, instead of
+        returning it.
+        `return_indicies` must be True.
+        Its shape must be ``(input.ndim,) + input.shape``.
+
+    Returns
+    -------
+    distances : int32 ndarray, optional
+        The calculated distance transform. Returned only when
+        `return_distances` is True, and `distances` is not supplied.
+        It will have the same shape as the input array.
+    indices : int32 ndarray, optional
+        The calculated feature transform. It has an input-shaped array for each
+        dimension of the input. See distance_transform_edt documentation for an
+        example.
+        Returned only when `return_indices` is True, and `indices` is not
+        supplied.
+
+    See Also
+    --------
+    distance_transform_edt : Fast distance transform for euclidean metric
+    distance_transform_bf : Distance transform for different metrics using
+                            a slower brute force algorithm
+
+    Examples
+    --------
+    Import the necessary modules.
+
+    >>> import numpy as np
+    >>> from scipy.ndimage import distance_transform_cdt
+    >>> import matplotlib.pyplot as plt
+    >>> from mpl_toolkits.axes_grid1 import ImageGrid
+
+    First, we create a toy binary image.
+
+    >>> def add_circle(center_x, center_y, radius, image, fillvalue=1):
+    ...     # fill circular area with 1
+    ...     xx, yy = np.mgrid[:image.shape[0], :image.shape[1]]
+    ...     circle = (xx - center_x) ** 2 + (yy - center_y) ** 2
+    ...     circle_shape = np.sqrt(circle) < radius
+    ...     image[circle_shape] = fillvalue
+    ...     return image
+    >>> image = np.zeros((100, 100), dtype=np.uint8)
+    >>> image[35:65, 20:80] = 1
+    >>> image = add_circle(28, 65, 10, image)
+    >>> image = add_circle(37, 30, 10, image)
+    >>> image = add_circle(70, 45, 20, image)
+    >>> image = add_circle(45, 80, 10, image)
+
+    Next, we set up the figure.
+
+    >>> fig = plt.figure(figsize=(5, 15))
+    >>> grid = ImageGrid(fig, 111, nrows_ncols=(3, 1), axes_pad=(0.5, 0.3),
+    ...                  label_mode="1", share_all=True,
+    ...                  cbar_location="right", cbar_mode="each",
+    ...                  cbar_size="7%", cbar_pad="2%")
+    >>> for ax in grid:
+    ...     ax.axis('off')
+    >>> top, middle, bottom = grid
+    >>> colorbar_ticks = [0, 10, 20]
+
+    The top image contains the original binary image.
+
+    >>> binary_image = top.imshow(image, cmap='gray')
+    >>> cbar_binary_image = top.cax.colorbar(binary_image)
+    >>> cbar_binary_image.set_ticks([0, 1])
+    >>> top.set_title("Binary image: foreground in white")
+
+    The middle image contains the distance transform using the ``taxicab``
+    metric.
+
+    >>> distance_taxicab = distance_transform_cdt(image, metric="taxicab")
+    >>> taxicab_transform = middle.imshow(distance_taxicab, cmap='gray')
+    >>> cbar_taxicab = middle.cax.colorbar(taxicab_transform)
+    >>> cbar_taxicab.set_ticks(colorbar_ticks)
+    >>> middle.set_title("Taxicab metric")
+
+    The bottom image contains the distance transform using the ``chessboard``
+    metric.
+
+    >>> distance_chessboard = distance_transform_cdt(image,
+    ...                                              metric="chessboard")
+    >>> chessboard_transform = bottom.imshow(distance_chessboard, cmap='gray')
+    >>> cbar_chessboard = bottom.cax.colorbar(chessboard_transform)
+    >>> cbar_chessboard.set_ticks(colorbar_ticks)
+    >>> bottom.set_title("Chessboard metric")
+    >>> plt.tight_layout()
+    >>> plt.show()
+
+    """
+    ft_inplace = isinstance(indices, np.ndarray)
+    dt_inplace = isinstance(distances, np.ndarray)
+    _distance_tranform_arg_check(
+        dt_inplace, ft_inplace, return_distances, return_indices
+    )
+    input = np.asarray(input)
+    if isinstance(metric, str):
+        if metric in ['taxicab', 'cityblock', 'manhattan']:
+            rank = input.ndim
+            metric = generate_binary_structure(rank, 1)
+        elif metric == 'chessboard':
+            rank = input.ndim
+            metric = generate_binary_structure(rank, rank)
+        else:
+            raise ValueError('invalid metric provided')
+    else:
+        try:
+            metric = np.asarray(metric)
+        except Exception as e:
+            raise ValueError('invalid metric provided') from e
+        for s in metric.shape:
+            if s != 3:
+                raise ValueError('metric sizes must be equal to 3')
+
+    if not metric.flags.contiguous:
+        metric = metric.copy()
+    if dt_inplace:
+        if distances.dtype.type != np.int32:
+            raise ValueError('distances must be of int32 type')
+        if distances.shape != input.shape:
+            raise ValueError('distances has wrong shape')
+        dt = distances
+        dt[...] = np.where(input, -1, 0).astype(np.int32)
+    else:
+        dt = np.where(input, -1, 0).astype(np.int32)
+
+    rank = dt.ndim
+    if return_indices:
+        ft = np.arange(dt.size, dtype=np.int32)
+        ft.shape = dt.shape
+    else:
+        ft = None
+
+    _nd_image.distance_transform_op(metric, dt, ft)
+    dt = dt[tuple([slice(None, None, -1)] * rank)]
+    if return_indices:
+        ft = ft[tuple([slice(None, None, -1)] * rank)]
+    _nd_image.distance_transform_op(metric, dt, ft)
+    dt = dt[tuple([slice(None, None, -1)] * rank)]
+    if return_indices:
+        ft = ft[tuple([slice(None, None, -1)] * rank)]
+        ft = np.ravel(ft)
+        if ft_inplace:
+            if indices.dtype.type != np.int32:
+                raise ValueError('indices array must be int32')
+            if indices.shape != (dt.ndim,) + dt.shape:
+                raise ValueError('indices array has wrong shape')
+            tmp = indices
+        else:
+            tmp = np.indices(dt.shape, dtype=np.int32)
+        for ii in range(tmp.shape[0]):
+            rtmp = np.ravel(tmp[ii, ...])[ft]
+            rtmp.shape = dt.shape
+            tmp[ii, ...] = rtmp
+        ft = tmp
+
+    # construct and return the result
+    result = []
+    if return_distances and not dt_inplace:
+        result.append(dt)
+    if return_indices and not ft_inplace:
+        result.append(ft)
+
+    if len(result) == 2:
+        return tuple(result)
+    elif len(result) == 1:
+        return result[0]
+    else:
+        return None
+
+
+def distance_transform_edt(input, sampling=None, return_distances=True,
+                           return_indices=False, distances=None, indices=None):
+    """
+    Exact Euclidean distance transform.
+
+    This function calculates the distance transform of the `input`, by
+    replacing each foreground (non-zero) element, with its
+    shortest distance to the background (any zero-valued element).
+
+    In addition to the distance transform, the feature transform can
+    be calculated. In this case the index of the closest background
+    element to each foreground element is returned in a separate array.
+
+    Parameters
+    ----------
+    input : array_like
+        Input data to transform. Can be any type but will be converted
+        into binary: 1 wherever input equates to True, 0 elsewhere.
+    sampling : float, or sequence of float, optional
+        Spacing of elements along each dimension. If a sequence, must be of
+        length equal to the input rank; if a single number, this is used for
+        all axes. If not specified, a grid spacing of unity is implied.
+    return_distances : bool, optional
+        Whether to calculate the distance transform.
+        Default is True.
+    return_indices : bool, optional
+        Whether to calculate the feature transform.
+        Default is False.
+    distances : float64 ndarray, optional
+        An output array to store the calculated distance transform, instead of
+        returning it.
+        `return_distances` must be True.
+        It must be the same shape as `input`.
+    indices : int32 ndarray, optional
+        An output array to store the calculated feature transform, instead of
+        returning it.
+        `return_indicies` must be True.
+        Its shape must be ``(input.ndim,) + input.shape``.
+
+    Returns
+    -------
+    distances : float64 ndarray, optional
+        The calculated distance transform. Returned only when
+        `return_distances` is True and `distances` is not supplied.
+        It will have the same shape as the input array.
+    indices : int32 ndarray, optional
+        The calculated feature transform. It has an input-shaped array for each
+        dimension of the input. See example below.
+        Returned only when `return_indices` is True and `indices` is not
+        supplied.
+
+    Notes
+    -----
+    The Euclidean distance transform gives values of the Euclidean
+    distance::
+
+                    n
+      y_i = sqrt(sum (x[i]-b[i])**2)
+                    i
+
+    where b[i] is the background point (value 0) with the smallest
+    Euclidean distance to input points x[i], and n is the
+    number of dimensions.
+
+    Examples
+    --------
+    >>> from scipy import ndimage
+    >>> import numpy as np
+    >>> a = np.array(([0,1,1,1,1],
+    ...               [0,0,1,1,1],
+    ...               [0,1,1,1,1],
+    ...               [0,1,1,1,0],
+    ...               [0,1,1,0,0]))
+    >>> ndimage.distance_transform_edt(a)
+    array([[ 0.    ,  1.    ,  1.4142,  2.2361,  3.    ],
+           [ 0.    ,  0.    ,  1.    ,  2.    ,  2.    ],
+           [ 0.    ,  1.    ,  1.4142,  1.4142,  1.    ],
+           [ 0.    ,  1.    ,  1.4142,  1.    ,  0.    ],
+           [ 0.    ,  1.    ,  1.    ,  0.    ,  0.    ]])
+
+    With a sampling of 2 units along x, 1 along y:
+
+    >>> ndimage.distance_transform_edt(a, sampling=[2,1])
+    array([[ 0.    ,  1.    ,  2.    ,  2.8284,  3.6056],
+           [ 0.    ,  0.    ,  1.    ,  2.    ,  3.    ],
+           [ 0.    ,  1.    ,  2.    ,  2.2361,  2.    ],
+           [ 0.    ,  1.    ,  2.    ,  1.    ,  0.    ],
+           [ 0.    ,  1.    ,  1.    ,  0.    ,  0.    ]])
+
+    Asking for indices as well:
+
+    >>> edt, inds = ndimage.distance_transform_edt(a, return_indices=True)
+    >>> inds
+    array([[[0, 0, 1, 1, 3],
+            [1, 1, 1, 1, 3],
+            [2, 2, 1, 3, 3],
+            [3, 3, 4, 4, 3],
+            [4, 4, 4, 4, 4]],
+           [[0, 0, 1, 1, 4],
+            [0, 1, 1, 1, 4],
+            [0, 0, 1, 4, 4],
+            [0, 0, 3, 3, 4],
+            [0, 0, 3, 3, 4]]], dtype=int32)
+
+    With arrays provided for inplace outputs:
+
+    >>> indices = np.zeros(((np.ndim(a),) + a.shape), dtype=np.int32)
+    >>> ndimage.distance_transform_edt(a, return_indices=True, indices=indices)
+    array([[ 0.    ,  1.    ,  1.4142,  2.2361,  3.    ],
+           [ 0.    ,  0.    ,  1.    ,  2.    ,  2.    ],
+           [ 0.    ,  1.    ,  1.4142,  1.4142,  1.    ],
+           [ 0.    ,  1.    ,  1.4142,  1.    ,  0.    ],
+           [ 0.    ,  1.    ,  1.    ,  0.    ,  0.    ]])
+    >>> indices
+    array([[[0, 0, 1, 1, 3],
+            [1, 1, 1, 1, 3],
+            [2, 2, 1, 3, 3],
+            [3, 3, 4, 4, 3],
+            [4, 4, 4, 4, 4]],
+           [[0, 0, 1, 1, 4],
+            [0, 1, 1, 1, 4],
+            [0, 0, 1, 4, 4],
+            [0, 0, 3, 3, 4],
+            [0, 0, 3, 3, 4]]], dtype=int32)
+
+    """
+    ft_inplace = isinstance(indices, np.ndarray)
+    dt_inplace = isinstance(distances, np.ndarray)
+    _distance_tranform_arg_check(
+        dt_inplace, ft_inplace, return_distances, return_indices
+    )
+
+    # calculate the feature transform
+    input = np.atleast_1d(np.where(input, 1, 0).astype(np.int8))
+    if sampling is not None:
+        sampling = _ni_support._normalize_sequence(sampling, input.ndim)
+        sampling = np.asarray(sampling, dtype=np.float64)
+        if not sampling.flags.contiguous:
+            sampling = sampling.copy()
+
+    if ft_inplace:
+        ft = indices
+        if ft.shape != (input.ndim,) + input.shape:
+            raise RuntimeError('indices array has wrong shape')
+        if ft.dtype.type != np.int32:
+            raise RuntimeError('indices array must be int32')
+    else:
+        ft = np.zeros((input.ndim,) + input.shape, dtype=np.int32)
+
+    _nd_image.euclidean_feature_transform(input, sampling, ft)
+    # if requested, calculate the distance transform
+    if return_distances:
+        dt = ft - np.indices(input.shape, dtype=ft.dtype)
+        dt = dt.astype(np.float64)
+        if sampling is not None:
+            for ii in range(len(sampling)):
+                dt[ii, ...] *= sampling[ii]
+        np.multiply(dt, dt, dt)
+        if dt_inplace:
+            dt = np.add.reduce(dt, axis=0)
+            if distances.shape != dt.shape:
+                raise RuntimeError('distances array has wrong shape')
+            if distances.dtype.type != np.float64:
+                raise RuntimeError('distances array must be float64')
+            np.sqrt(dt, distances)
+        else:
+            dt = np.add.reduce(dt, axis=0)
+            dt = np.sqrt(dt)
+
+    # construct and return the result
+    result = []
+    if return_distances and not dt_inplace:
+        result.append(dt)
+    if return_indices and not ft_inplace:
+        result.append(ft)
+
+    if len(result) == 2:
+        return tuple(result)
+    elif len(result) == 1:
+        return result[0]
+    else:
+        return None
+
+
+def _distance_tranform_arg_check(distances_out, indices_out,
+                                 return_distances, return_indices):
+    """Raise a RuntimeError if the arguments are invalid"""
+    error_msgs = []
+    if (not return_distances) and (not return_indices):
+        error_msgs.append(
+            'at least one of return_distances/return_indices must be True')
+    if distances_out and not return_distances:
+        error_msgs.append(
+            'return_distances must be True if distances is supplied'
+        )
+    if indices_out and not return_indices:
+        error_msgs.append('return_indices must be True if indices is supplied')
+    if error_msgs:
+        raise RuntimeError(', '.join(error_msgs))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ndimage_api.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ndimage_api.py
new file mode 100644
index 0000000000000000000000000000000000000000..1673391726a4070af4814d04be16e29e01d9f29b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ndimage_api.py
@@ -0,0 +1,16 @@
+"""This is the 'bare' ndimage API.
+
+This --- private! --- module only collects implementations of public ndimage API
+for _support_alternative_backends.
+The latter --- also private! --- module adds delegation to CuPy etc and
+re-exports decorated names to __init__.py
+"""
+
+from ._filters import *    # noqa: F403
+from ._fourier import *   # noqa: F403
+from ._interpolation import *   # noqa: F403
+from ._measurements import *   # noqa: F403
+from ._morphology import *   # noqa: F403
+
+# '@' due to pytest bug, scipy/scipy#22236
+__all__ = [s for s in dir() if not s.startswith(('_', '@'))]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_docstrings.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_docstrings.py
new file mode 100644
index 0000000000000000000000000000000000000000..2c0d977500574b73f168296645fb36d10c1320de
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_docstrings.py
@@ -0,0 +1,210 @@
+"""Docstring components common to several ndimage functions."""
+from typing import Final
+
+from scipy._lib import doccer
+
+__all__ = ['docfiller']
+
+
+_input_doc = (
+"""input : array_like
+    The input array.""")
+_axis_doc = (
+"""axis : int, optional
+    The axis of `input` along which to calculate. Default is -1.""")
+_output_doc = (
+"""output : array or dtype, optional
+    The array in which to place the output, or the dtype of the
+    returned array. By default an array of the same dtype as input
+    will be created.""")
+_size_foot_doc = (
+"""size : scalar or tuple, optional
+    See footprint, below. Ignored if footprint is given.
+footprint : array, optional
+    Either `size` or `footprint` must be defined. `size` gives
+    the shape that is taken from the input array, at every element
+    position, to define the input to the filter function.
+    `footprint` is a boolean array that specifies (implicitly) a
+    shape, but also which of the elements within this shape will get
+    passed to the filter function. Thus ``size=(n,m)`` is equivalent
+    to ``footprint=np.ones((n,m))``.  We adjust `size` to the number
+    of dimensions of the input array, so that, if the input array is
+    shape (10,10,10), and `size` is 2, then the actual size used is
+    (2,2,2). When `footprint` is given, `size` is ignored.""")
+_mode_reflect_doc = (
+"""mode : {'reflect', 'constant', 'nearest', 'mirror', 'wrap'}, optional
+    The `mode` parameter determines how the input array is extended
+    beyond its boundaries. Default is 'reflect'. Behavior for each valid
+    value is as follows:
+
+    'reflect' (`d c b a | a b c d | d c b a`)
+        The input is extended by reflecting about the edge of the last
+        pixel. This mode is also sometimes referred to as half-sample
+        symmetric.
+
+    'constant' (`k k k k | a b c d | k k k k`)
+        The input is extended by filling all values beyond the edge with
+        the same constant value, defined by the `cval` parameter.
+
+    'nearest' (`a a a a | a b c d | d d d d`)
+        The input is extended by replicating the last pixel.
+
+    'mirror' (`d c b | a b c d | c b a`)
+        The input is extended by reflecting about the center of the last
+        pixel. This mode is also sometimes referred to as whole-sample
+        symmetric.
+
+    'wrap' (`a b c d | a b c d | a b c d`)
+        The input is extended by wrapping around to the opposite edge.
+
+    For consistency with the interpolation functions, the following mode
+    names can also be used:
+
+    'grid-mirror'
+        This is a synonym for 'reflect'.
+
+    'grid-constant'
+        This is a synonym for 'constant'.
+
+    'grid-wrap'
+        This is a synonym for 'wrap'.""")
+
+_mode_interp_constant_doc = (
+"""mode : {'reflect', 'grid-mirror', 'constant', 'grid-constant', 'nearest', \
+'mirror', 'grid-wrap', 'wrap'}, optional
+    The `mode` parameter determines how the input array is extended
+    beyond its boundaries. Default is 'constant'. Behavior for each valid
+    value is as follows (see additional plots and details on
+    :ref:`boundary modes `):
+
+    'reflect' (`d c b a | a b c d | d c b a`)
+        The input is extended by reflecting about the edge of the last
+        pixel. This mode is also sometimes referred to as half-sample
+        symmetric.
+
+    'grid-mirror'
+        This is a synonym for 'reflect'.
+
+    'constant' (`k k k k | a b c d | k k k k`)
+        The input is extended by filling all values beyond the edge with
+        the same constant value, defined by the `cval` parameter. No
+        interpolation is performed beyond the edges of the input.
+
+    'grid-constant' (`k k k k | a b c d | k k k k`)
+        The input is extended by filling all values beyond the edge with
+        the same constant value, defined by the `cval` parameter. Interpolation
+        occurs for samples outside the input's extent  as well.
+
+    'nearest' (`a a a a | a b c d | d d d d`)
+        The input is extended by replicating the last pixel.
+
+    'mirror' (`d c b | a b c d | c b a`)
+        The input is extended by reflecting about the center of the last
+        pixel. This mode is also sometimes referred to as whole-sample
+        symmetric.
+
+    'grid-wrap' (`a b c d | a b c d | a b c d`)
+        The input is extended by wrapping around to the opposite edge.
+
+    'wrap' (`d b c d | a b c d | b c a b`)
+        The input is extended by wrapping around to the opposite edge, but in a
+        way such that the last point and initial point exactly overlap. In this
+        case it is not well defined which sample will be chosen at the point of
+        overlap.""")
+_mode_interp_mirror_doc = (
+    _mode_interp_constant_doc.replace("Default is 'constant'",
+                                      "Default is 'mirror'")
+)
+assert _mode_interp_mirror_doc != _mode_interp_constant_doc, \
+    'Default not replaced'
+
+_mode_multiple_doc = (
+"""mode : str or sequence, optional
+    The `mode` parameter determines how the input array is extended
+    when the filter overlaps a border. By passing a sequence of modes
+    with length equal to the number of dimensions of the input array,
+    different modes can be specified along each axis. Default value is
+    'reflect'. The valid values and their behavior is as follows:
+
+    'reflect' (`d c b a | a b c d | d c b a`)
+        The input is extended by reflecting about the edge of the last
+        pixel. This mode is also sometimes referred to as half-sample
+        symmetric.
+
+    'constant' (`k k k k | a b c d | k k k k`)
+        The input is extended by filling all values beyond the edge with
+        the same constant value, defined by the `cval` parameter.
+
+    'nearest' (`a a a a | a b c d | d d d d`)
+        The input is extended by replicating the last pixel.
+
+    'mirror' (`d c b | a b c d | c b a`)
+        The input is extended by reflecting about the center of the last
+        pixel. This mode is also sometimes referred to as whole-sample
+        symmetric.
+
+    'wrap' (`a b c d | a b c d | a b c d`)
+        The input is extended by wrapping around to the opposite edge.
+
+    For consistency with the interpolation functions, the following mode
+    names can also be used:
+
+    'grid-constant'
+        This is a synonym for 'constant'.
+
+    'grid-mirror'
+        This is a synonym for 'reflect'.
+
+    'grid-wrap'
+        This is a synonym for 'wrap'.""")
+_cval_doc = (
+"""cval : scalar, optional
+    Value to fill past edges of input if `mode` is 'constant'. Default
+    is 0.0.""")
+_origin_doc = (
+"""origin : int, optional
+    Controls the placement of the filter on the input array's pixels.
+    A value of 0 (the default) centers the filter over the pixel, with
+    positive values shifting the filter to the left, and negative ones
+    to the right.""")
+_origin_multiple_doc = (
+"""origin : int or sequence, optional
+    Controls the placement of the filter on the input array's pixels.
+    A value of 0 (the default) centers the filter over the pixel, with
+    positive values shifting the filter to the left, and negative ones
+    to the right. By passing a sequence of origins with length equal to
+    the number of dimensions of the input array, different shifts can
+    be specified along each axis.""")
+_extra_arguments_doc = (
+"""extra_arguments : sequence, optional
+    Sequence of extra positional arguments to pass to passed function.""")
+_extra_keywords_doc = (
+"""extra_keywords : dict, optional
+    dict of extra keyword arguments to pass to passed function.""")
+_prefilter_doc = (
+"""prefilter : bool, optional
+    Determines if the input array is prefiltered with `spline_filter`
+    before interpolation. The default is True, which will create a
+    temporary `float64` array of filtered values if ``order > 1``. If
+    setting this to False, the output will be slightly blurred if
+    ``order > 1``, unless the input is prefiltered, i.e. it is the result
+    of calling `spline_filter` on the original input.""")
+
+docdict = {
+    'input': _input_doc,
+    'axis': _axis_doc,
+    'output': _output_doc,
+    'size_foot': _size_foot_doc,
+    'mode_interp_constant': _mode_interp_constant_doc,
+    'mode_interp_mirror': _mode_interp_mirror_doc,
+    'mode_reflect': _mode_reflect_doc,
+    'mode_multiple': _mode_multiple_doc,
+    'cval': _cval_doc,
+    'origin': _origin_doc,
+    'origin_multiple': _origin_multiple_doc,
+    'extra_arguments': _extra_arguments_doc,
+    'extra_keywords': _extra_keywords_doc,
+    'prefilter': _prefilter_doc
+    }
+
+docfiller: Final = doccer.filldoc(docdict)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_support.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_support.py
new file mode 100644
index 0000000000000000000000000000000000000000..f8d41d00d9edf8d347c4ffc95598210489fed5e9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_ni_support.py
@@ -0,0 +1,143 @@
+# Copyright (C) 2003-2005 Peter J. Verveer
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from collections.abc import Iterable
+import operator
+import warnings
+import numpy as np
+
+
+def _extend_mode_to_code(mode, is_filter=False):
+    """Convert an extension mode to the corresponding integer code.
+    """
+    if mode == 'nearest':
+        return 0
+    elif mode == 'wrap':
+        return 1
+    elif mode in ['reflect', 'grid-mirror']:
+        return 2
+    elif mode == 'mirror':
+        return 3
+    elif mode == 'constant':
+        return 4
+    elif mode == 'grid-wrap' and is_filter:
+        return 1
+    elif mode == 'grid-wrap':
+        return 5
+    elif mode == 'grid-constant' and is_filter:
+        return 4
+    elif mode == 'grid-constant':
+        return 6
+    else:
+        raise RuntimeError('boundary mode not supported')
+
+
+def _normalize_sequence(input, rank):
+    """If input is a scalar, create a sequence of length equal to the
+    rank by duplicating the input. If input is a sequence,
+    check if its length is equal to the length of array.
+    """
+    is_str = isinstance(input, str)
+    if not is_str and np.iterable(input):
+        normalized = list(input)
+        if len(normalized) != rank:
+            err = "sequence argument must have length equal to input rank"
+            raise RuntimeError(err)
+    else:
+        normalized = [input] * rank
+    return normalized
+
+
+def _get_output(output, input, shape=None, complex_output=False):
+    if shape is None:
+        shape = input.shape
+    if output is None:
+        if not complex_output:
+            output = np.zeros(shape, dtype=input.dtype.name)
+        else:
+            complex_type = np.promote_types(input.dtype, np.complex64)
+            output = np.zeros(shape, dtype=complex_type)
+    elif isinstance(output, (type, np.dtype)):
+        # Classes (like `np.float32`) and dtypes are interpreted as dtype
+        if complex_output and np.dtype(output).kind != 'c':
+            warnings.warn("promoting specified output dtype to complex", stacklevel=3)
+            output = np.promote_types(output, np.complex64)
+        output = np.zeros(shape, dtype=output)
+    elif isinstance(output, str):
+        output = np.dtype(output)
+        if complex_output and output.kind != 'c':
+            raise RuntimeError("output must have complex dtype")
+        elif not issubclass(output.type, np.number):
+            raise RuntimeError("output must have numeric dtype")
+        output = np.zeros(shape, dtype=output)
+    else:
+        # output was supplied as an array
+        output = np.asarray(output)
+        if output.shape != shape:
+            raise RuntimeError("output shape not correct")
+        elif complex_output and output.dtype.kind != 'c':
+            raise RuntimeError("output must have complex dtype")
+    return output
+
+
+def _check_axes(axes, ndim):
+    if axes is None:
+        return tuple(range(ndim))
+    elif np.isscalar(axes):
+        axes = (operator.index(axes),)
+    elif isinstance(axes, Iterable):
+        for ax in axes:
+            axes = tuple(operator.index(ax) for ax in axes)
+            if ax < -ndim or ax > ndim - 1:
+                raise ValueError(f"specified axis: {ax} is out of range")
+        axes = tuple(ax % ndim if ax < 0 else ax for ax in axes)
+    else:
+        message = "axes must be an integer, iterable of integers, or None"
+        raise ValueError(message)
+    if len(tuple(set(axes))) != len(axes):
+        raise ValueError("axes must be unique")
+    return axes
+
+def _skip_if_dtype(arg):
+    """'array or dtype' polymorphism.
+
+    Return None for np.int8, dtype('float32') or 'f' etc
+           arg for np.empty(3) etc
+    """
+    if isinstance(arg, str):
+        return None
+    if type(arg) is type:
+        return None if issubclass(arg, np.generic) else arg
+    else:
+        return None if isinstance(arg, np.dtype) else arg
+
+
+def _skip_if_int(arg):
+    return None if (arg is None or isinstance(arg, int)) else arg
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_rank_filter_1d.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_rank_filter_1d.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..6d998aa648b493336d9871117e687e8f8d5279aa
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_rank_filter_1d.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_support_alternative_backends.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_support_alternative_backends.py
new file mode 100644
index 0000000000000000000000000000000000000000..fbb913b14c76873202fce8eaabe2d08f778abe94
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/_support_alternative_backends.py
@@ -0,0 +1,72 @@
+import functools
+from scipy._lib._array_api import (
+    is_cupy, is_jax, scipy_namespace_for, SCIPY_ARRAY_API
+)
+
+import numpy as np
+from ._ndimage_api import *   # noqa: F403
+from . import _ndimage_api
+from . import _delegators
+__all__ = _ndimage_api.__all__
+
+
+MODULE_NAME = 'ndimage'
+
+
+def delegate_xp(delegator, module_name):
+    def inner(func):
+        @functools.wraps(func)
+        def wrapper(*args, **kwds):
+            xp = delegator(*args, **kwds)
+
+            # try delegating to a cupyx/jax namesake
+            if is_cupy(xp):
+                # https://github.com/cupy/cupy/issues/8336
+                import importlib
+                cupyx_module = importlib.import_module(f"cupyx.scipy.{module_name}")
+                cupyx_func = getattr(cupyx_module, func.__name__)
+                return cupyx_func(*args, **kwds)
+            elif is_jax(xp) and func.__name__ == "map_coordinates":
+                spx = scipy_namespace_for(xp)
+                jax_module = getattr(spx, module_name)
+                jax_func = getattr(jax_module, func.__name__)
+                return jax_func(*args, **kwds)
+            else:
+                # the original function (does all np.asarray internally)
+                # XXX: output arrays
+                result = func(*args, **kwds)
+
+                if isinstance(result, (np.ndarray, np.generic)):
+                    # XXX: np.int32->np.array_0D
+                    return xp.asarray(result)
+                elif isinstance(result, int):
+                    return result
+                elif isinstance(result, dict):
+                    # value_indices: result is {np.int64(1): (array(0), array(1))} etc
+                    return {
+                        k.item(): tuple(xp.asarray(vv) for vv in v)
+                        for k,v in result.items()
+                    }
+                elif result is None:
+                    # inplace operations
+                    return result
+                else:
+                    # lists/tuples
+                    return type(result)(
+                        xp.asarray(x) if isinstance(x, np.ndarray) else x
+                        for x in result
+                    )
+        return wrapper
+    return inner
+
+# ### decorate ###
+for func_name in _ndimage_api.__all__:
+    bare_func = getattr(_ndimage_api, func_name)
+    delegator = getattr(_delegators, func_name + "_signature")
+
+    f = (delegate_xp(delegator, MODULE_NAME)(bare_func)
+         if SCIPY_ARRAY_API
+         else bare_func)
+
+    # add the decorated function to the namespace, to be imported in __init__.py
+    vars()[func_name] = f
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/filters.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/filters.py
new file mode 100644
index 0000000000000000000000000000000000000000..e16d9d279a9585b2454c46ee09cf22143de833a6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/filters.py
@@ -0,0 +1,27 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.ndimage` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'correlate1d', 'convolve1d', 'gaussian_filter1d',
+    'gaussian_filter', 'prewitt', 'sobel', 'generic_laplace',
+    'laplace', 'gaussian_laplace', 'generic_gradient_magnitude',
+    'gaussian_gradient_magnitude', 'correlate', 'convolve',
+    'uniform_filter1d', 'uniform_filter', 'minimum_filter1d',
+    'maximum_filter1d', 'minimum_filter', 'maximum_filter',
+    'rank_filter', 'median_filter', 'percentile_filter',
+    'generic_filter1d', 'generic_filter'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package='ndimage', module='filters',
+                                   private_modules=['_filters'], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/fourier.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/fourier.py
new file mode 100644
index 0000000000000000000000000000000000000000..73c49bd52d9a446ce0fe25d9e15b8de68fbd46fb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/fourier.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.ndimage` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'fourier_gaussian', 'fourier_uniform',
+    'fourier_ellipsoid', 'fourier_shift'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package='ndimage', module='fourier',
+                                   private_modules=['_fourier'], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/interpolation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/interpolation.py
new file mode 100644
index 0000000000000000000000000000000000000000..a2739c60c51037487ae8892c407e2f3d7870d5da
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/interpolation.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.ndimage` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'spline_filter1d', 'spline_filter',
+    'geometric_transform', 'map_coordinates',
+    'affine_transform', 'shift', 'zoom', 'rotate',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package='ndimage', module='interpolation',
+                                   private_modules=['_interpolation'], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/measurements.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/measurements.py
new file mode 100644
index 0000000000000000000000000000000000000000..22f76b01840ffb829205bd1d28a7ad1f9ac5db61
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/measurements.py
@@ -0,0 +1,24 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.ndimage` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'label', 'find_objects', 'labeled_comprehension',
+    'sum', 'mean', 'variance', 'standard_deviation',
+    'minimum', 'maximum', 'median', 'minimum_position',
+    'maximum_position', 'extrema', 'center_of_mass',
+    'histogram', 'watershed_ift', 'sum_labels'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package='ndimage', module='measurements',
+                                   private_modules=['_measurements'], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/morphology.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/morphology.py
new file mode 100644
index 0000000000000000000000000000000000000000..e522e7df3a4b06b7e04ed8c2d0ecaff2a98b951d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/morphology.py
@@ -0,0 +1,27 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.ndimage` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'iterate_structure', 'generate_binary_structure',
+    'binary_erosion', 'binary_dilation', 'binary_opening',
+    'binary_closing', 'binary_hit_or_miss', 'binary_propagation',
+    'binary_fill_holes', 'grey_erosion', 'grey_dilation',
+    'grey_opening', 'grey_closing', 'morphological_gradient',
+    'morphological_laplace', 'white_tophat', 'black_tophat',
+    'distance_transform_bf', 'distance_transform_cdt',
+    'distance_transform_edt'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package='ndimage', module='morphology',
+                                   private_modules=['_morphology'], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8d8fd292b537a84fe48d0c8ae8bee75bab2b3353
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/__init__.py
@@ -0,0 +1,12 @@
+import numpy as np
+
+# list of numarray data types
+integer_types: list[str] = [
+    "int8", "uint8", "int16", "uint16",
+    "int32", "uint32", "int64", "uint64"]
+
+float_types: list[str] = ["float32", "float64"]
+
+complex_types: list[str] = ["complex64", "complex128"]
+
+types: list[str] = integer_types + float_types
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6c3cff3b12cec4ad050b31cc5d5c327f32784447
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_inputs.txt
@@ -0,0 +1,21 @@
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 0 1 1 1
+1 1 0 0 0 1 1
+1 0 1 0 1 0 1
+0 0 0 1 0 0 0
+1 0 1 0 1 0 1
+1 1 0 0 0 1 1
+1 1 1 0 1 1 1
+1 0 1 1 1 0 1
+0 0 0 1 0 0 0
+1 0 0 1 0 0 1
+1 1 1 1 1 1 1
+1 0 0 1 0 0 1
+0 0 0 1 0 0 0
+1 0 1 1 1 0 1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c239b0369c9df3e06df9a2fbf048faec2f84941f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_results.txt
@@ -0,0 +1,294 @@
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+2 2 2 2 2 2 2
+3 3 3 3 3 3 3
+4 4 4 4 4 4 4
+5 5 5 5 5 5 5
+6 6 6 6 6 6 6
+7 7 7 7 7 7 7
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 2 3 4 5 6 7
+8 9 10 11 12 13 14
+15 16 17 18 19 20 21
+22 23 24 25 26 27 28
+29 30 31 32 33 34 35
+36 37 38 39 40 41 42
+43 44 45 46 47 48 49
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 2 3 4 5 6 7
+8 1 2 3 4 5 6
+9 8 1 2 3 4 5
+10 9 8 1 2 3 4
+11 10 9 8 1 2 3
+12 11 10 9 8 1 2
+13 12 11 10 9 8 1
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 2 3 4 5 6 7
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 2 1 2 1 2 1
+2 1 2 1 2 1 2
+1 2 1 2 1 2 1
+2 1 2 1 2 1 2
+1 2 1 2 1 2 1
+2 1 2 1 2 1 2
+1 2 1 2 1 2 1
+1 2 3 4 5 6 7
+2 3 4 5 6 7 8
+3 4 5 6 7 8 9
+4 5 6 7 8 9 10
+5 6 7 8 9 10 11
+6 7 8 9 10 11 12
+7 8 9 10 11 12 13
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 1 1 1 1
+1 1 1 0 2 2 2
+1 1 0 0 0 2 2
+1 0 3 0 2 0 4
+0 0 0 2 0 0 0
+5 0 2 0 6 0 7
+2 2 0 0 0 7 7
+2 2 2 0 7 7 7
+1 1 1 0 2 2 2
+1 1 0 0 0 2 2
+3 0 1 0 4 0 2
+0 0 0 1 0 0 0
+5 0 6 0 1 0 7
+5 5 0 0 0 1 1
+5 5 5 0 1 1 1
+1 1 1 0 2 2 2
+3 3 0 0 0 4 4
+5 0 6 0 7 0 8
+0 0 0 9 0 0 0
+10 0 11 0 12 0 13
+14 14 0 0 0 15 15
+16 16 16 0 17 17 17
+1 1 1 0 2 3 3
+1 1 0 0 0 3 3
+1 0 4 0 3 0 3
+0 0 0 3 0 0 0
+3 0 3 0 5 0 6
+3 3 0 0 0 6 6
+3 3 7 0 6 6 6
+1 2 3 0 4 5 6
+7 8 0 0 0 9 10
+11 0 12 0 13 0 14
+0 0 0 15 0 0 0
+16 0 17 0 18 0 19
+20 21 0 0 0 22 23
+24 25 26 0 27 28 29
+1 1 1 0 2 2 2
+1 1 0 0 0 2 2
+1 0 3 0 2 0 2
+0 0 0 2 0 0 0
+2 0 2 0 4 0 5
+2 2 0 0 0 5 5
+2 2 2 0 5 5 5
+1 1 1 0 2 2 2
+1 1 0 0 0 2 2
+1 0 3 0 4 0 2
+0 0 0 5 0 0 0
+6 0 7 0 8 0 9
+6 6 0 0 0 9 9
+6 6 6 0 9 9 9
+1 2 3 0 4 5 6
+7 1 0 0 0 4 5
+8 0 1 0 9 0 4
+0 0 0 1 0 0 0
+10 0 11 0 1 0 12
+13 10 0 0 0 1 14
+15 13 10 0 16 17 1
+1 2 3 0 4 5 6
+1 2 0 0 0 5 6
+1 0 7 0 8 0 6
+0 0 0 9 0 0 0
+10 0 11 0 12 0 13
+10 14 0 0 0 15 13
+10 14 16 0 17 15 13
+1 1 1 0 1 1 1
+1 1 0 0 0 1 1
+1 0 1 0 1 0 1
+0 0 0 1 0 0 0
+1 0 1 0 1 0 1
+1 1 0 0 0 1 1
+1 1 1 0 1 1 1
+1 1 2 0 3 3 3
+1 1 0 0 0 3 3
+1 0 1 0 4 0 3
+0 0 0 1 0 0 0
+5 0 6 0 1 0 1
+5 5 0 0 0 1 1
+5 5 5 0 7 1 1
+1 2 1 0 1 3 1
+2 1 0 0 0 1 3
+1 0 1 0 1 0 1
+0 0 0 1 0 0 0
+1 0 1 0 1 0 1
+4 1 0 0 0 1 5
+1 4 1 0 1 5 1
+1 2 3 0 4 5 6
+2 3 0 0 0 6 7
+3 0 8 0 6 0 9
+0 0 0 6 0 0 0
+10 0 6 0 11 0 12
+13 6 0 0 0 12 14
+6 15 16 0 12 14 17
+1 1 1 0 2 2 2
+1 1 0 0 0 2 2
+1 0 1 0 3 0 2
+0 0 0 1 0 0 0
+4 0 5 0 1 0 1
+4 4 0 0 0 1 1
+4 4 4 0 1 1 1
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+4 0 0 5 0 0 5
+5 5 5 5 5 5 5
+5 0 0 5 0 0 6
+0 0 0 7 0 0 0
+8 0 7 7 7 0 9
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+4 0 0 4 0 0 5
+4 4 4 4 4 4 4
+6 0 0 4 0 0 4
+0 0 0 7 0 0 0
+8 0 7 7 7 0 9
+1 0 2 2 2 0 3
+0 0 0 4 0 0 0
+5 0 0 6 0 0 7
+8 8 8 8 8 8 8
+9 0 0 10 0 0 11
+0 0 0 12 0 0 0
+13 0 14 14 14 0 15
+1 0 2 3 3 0 4
+0 0 0 3 0 0 0
+5 0 0 3 0 0 6
+5 5 3 3 3 6 6
+5 0 0 3 0 0 6
+0 0 0 3 0 0 0
+7 0 3 3 8 0 9
+1 0 2 3 4 0 5
+0 0 0 6 0 0 0
+7 0 0 8 0 0 9
+10 11 12 13 14 15 16
+17 0 0 18 0 0 19
+0 0 0 20 0 0 0
+21 0 22 23 24 0 25
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+2 0 0 2 0 0 2
+2 2 2 2 2 2 2
+2 0 0 2 0 0 2
+0 0 0 2 0 0 0
+4 0 2 2 2 0 5
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+2 0 0 2 0 0 2
+2 2 2 2 2 2 2
+2 0 0 2 0 0 2
+0 0 0 2 0 0 0
+4 0 2 2 2 0 5
+1 0 2 3 4 0 5
+0 0 0 2 0 0 0
+6 0 0 7 0 0 8
+9 6 10 11 7 12 13
+14 0 0 10 0 0 12
+0 0 0 15 0 0 0
+16 0 17 18 15 0 19
+1 0 2 3 4 0 5
+0 0 0 3 0 0 0
+6 0 0 3 0 0 7
+6 8 9 3 10 11 7
+6 0 0 3 0 0 7
+0 0 0 3 0 0 0
+12 0 13 3 14 0 15
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+2 0 0 2 0 0 2
+2 2 2 2 2 2 2
+2 0 0 2 0 0 2
+0 0 0 2 0 0 0
+4 0 2 2 2 0 5
+1 0 2 2 3 0 4
+0 0 0 2 0 0 0
+5 0 0 2 0 0 6
+5 5 2 2 2 6 6
+5 0 0 2 0 0 6
+0 0 0 2 0 0 0
+7 0 8 2 2 0 9
+1 0 2 3 2 0 4
+0 0 0 2 0 0 0
+5 0 0 6 0 0 7
+8 5 6 9 6 7 10
+5 0 0 6 0 0 7
+0 0 0 11 0 0 0
+12 0 11 13 11 0 14
+1 0 2 3 4 0 5
+0 0 0 4 0 0 0
+6 0 0 7 0 0 8
+9 10 7 11 12 8 13
+10 0 0 12 0 0 14
+0 0 0 15 0 0 0
+16 0 15 17 18 0 19
+1 0 2 2 2 0 3
+0 0 0 2 0 0 0
+2 0 0 2 0 0 2
+2 2 2 2 2 2 2
+2 0 0 2 0 0 2
+0 0 0 2 0 0 0
+4 0 2 2 2 0 5
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt
new file mode 100644
index 0000000000000000000000000000000000000000..35ae8121364d4fb3292c11f2a72333f456fa9c0a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/data/label_strels.txt
@@ -0,0 +1,42 @@
+0 0 1
+1 1 1
+1 0 0
+1 0 0
+1 1 1
+0 0 1
+0 0 0
+1 1 1
+0 0 0
+0 1 1
+0 1 0
+1 1 0
+0 0 0
+0 0 0
+0 0 0
+0 1 1
+1 1 1
+1 1 0
+0 1 0
+1 1 1
+0 1 0
+1 0 0
+0 1 0
+0 0 1
+0 1 0
+0 1 0
+0 1 0
+1 1 1
+1 1 1
+1 1 1
+1 1 0
+0 1 0
+0 1 1
+1 0 1
+0 1 0
+1 0 1
+0 0 1
+0 1 0
+1 0 0
+1 1 0
+1 1 1
+0 1 1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_c_api.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_c_api.py
new file mode 100644
index 0000000000000000000000000000000000000000..61a5a0f70262ef9f21fe8593a64f155bd583cab1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_c_api.py
@@ -0,0 +1,102 @@
+import numpy as np
+from scipy._lib._array_api import xp_assert_close
+
+from scipy import ndimage
+from scipy.ndimage import _ctest
+from scipy.ndimage import _cytest
+from scipy._lib._ccallback import LowLevelCallable
+
+FILTER1D_FUNCTIONS = [
+    lambda filter_size: _ctest.filter1d(filter_size),
+    lambda filter_size: _cytest.filter1d(filter_size, with_signature=False),
+    lambda filter_size: LowLevelCallable(
+                            _cytest.filter1d(filter_size, with_signature=True)
+                        ),
+    lambda filter_size: LowLevelCallable.from_cython(
+                            _cytest, "_filter1d",
+                            _cytest.filter1d_capsule(filter_size),
+                        ),
+]
+
+FILTER2D_FUNCTIONS = [
+    lambda weights: _ctest.filter2d(weights),
+    lambda weights: _cytest.filter2d(weights, with_signature=False),
+    lambda weights: LowLevelCallable(_cytest.filter2d(weights, with_signature=True)),
+    lambda weights: LowLevelCallable.from_cython(_cytest,
+                                                 "_filter2d",
+                                                 _cytest.filter2d_capsule(weights),),
+]
+
+TRANSFORM_FUNCTIONS = [
+    lambda shift: _ctest.transform(shift),
+    lambda shift: _cytest.transform(shift, with_signature=False),
+    lambda shift: LowLevelCallable(_cytest.transform(shift, with_signature=True)),
+    lambda shift: LowLevelCallable.from_cython(_cytest,
+                                               "_transform",
+                                               _cytest.transform_capsule(shift),),
+]
+
+
+def test_generic_filter():
+    def filter2d(footprint_elements, weights):
+        return (weights*footprint_elements).sum()
+
+    def check(j):
+        func = FILTER2D_FUNCTIONS[j]
+
+        im = np.ones((20, 20))
+        im[:10,:10] = 0
+        footprint = np.array([[0, 1, 0], [1, 1, 1], [0, 1, 0]])
+        footprint_size = np.count_nonzero(footprint)
+        weights = np.ones(footprint_size)/footprint_size
+
+        res = ndimage.generic_filter(im, func(weights),
+                                     footprint=footprint)
+        std = ndimage.generic_filter(im, filter2d, footprint=footprint,
+                                     extra_arguments=(weights,))
+        xp_assert_close(res, std, err_msg=f"#{j} failed")
+
+    for j, func in enumerate(FILTER2D_FUNCTIONS):
+        check(j)
+
+
+def test_generic_filter1d():
+    def filter1d(input_line, output_line, filter_size):
+        for i in range(output_line.size):
+            output_line[i] = 0
+            for j in range(filter_size):
+                output_line[i] += input_line[i+j]
+        output_line /= filter_size
+
+    def check(j):
+        func = FILTER1D_FUNCTIONS[j]
+
+        im = np.tile(np.hstack((np.zeros(10), np.ones(10))), (10, 1))
+        filter_size = 3
+
+        res = ndimage.generic_filter1d(im, func(filter_size),
+                                       filter_size)
+        std = ndimage.generic_filter1d(im, filter1d, filter_size,
+                                       extra_arguments=(filter_size,))
+        xp_assert_close(res, std, err_msg=f"#{j} failed")
+
+    for j, func in enumerate(FILTER1D_FUNCTIONS):
+        check(j)
+
+
+def test_geometric_transform():
+    def transform(output_coordinates, shift):
+        return output_coordinates[0] - shift, output_coordinates[1] - shift
+
+    def check(j):
+        func = TRANSFORM_FUNCTIONS[j]
+
+        im = np.arange(12).reshape(4, 3).astype(np.float64)
+        shift = 0.5
+
+        res = ndimage.geometric_transform(im, func(shift))
+        std = ndimage.geometric_transform(im, transform, extra_arguments=(shift,))
+        xp_assert_close(res, std, err_msg=f"#{j} failed")
+
+    for j, func in enumerate(TRANSFORM_FUNCTIONS):
+        check(j)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_datatypes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_datatypes.py
new file mode 100644
index 0000000000000000000000000000000000000000..a82de456bb92c96d5b9a599d4b33c987e134fdc8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_datatypes.py
@@ -0,0 +1,67 @@
+""" Testing data types for ndimage calls
+"""
+import numpy as np
+
+from scipy._lib._array_api import assert_array_almost_equal
+import pytest
+
+from scipy import ndimage
+
+
+def test_map_coordinates_dts():
+    # check that ndimage accepts different data types for interpolation
+    data = np.array([[4, 1, 3, 2],
+                     [7, 6, 8, 5],
+                     [3, 5, 3, 6]])
+    shifted_data = np.array([[0, 0, 0, 0],
+                             [0, 4, 1, 3],
+                             [0, 7, 6, 8]])
+    idx = np.indices(data.shape)
+    dts = (np.uint8, np.uint16, np.uint32, np.uint64,
+           np.int8, np.int16, np.int32, np.int64,
+           np.intp, np.uintp, np.float32, np.float64)
+    for order in range(0, 6):
+        for data_dt in dts:
+            these_data = data.astype(data_dt)
+            for coord_dt in dts:
+                # affine mapping
+                mat = np.eye(2, dtype=coord_dt)
+                off = np.zeros((2,), dtype=coord_dt)
+                out = ndimage.affine_transform(these_data, mat, off)
+                assert_array_almost_equal(these_data, out)
+                # map coordinates
+                coords_m1 = idx.astype(coord_dt) - 1
+                coords_p10 = idx.astype(coord_dt) + 10
+                out = ndimage.map_coordinates(these_data, coords_m1, order=order)
+                assert_array_almost_equal(out, shifted_data)
+                # check constant fill works
+                out = ndimage.map_coordinates(these_data, coords_p10, order=order)
+                assert_array_almost_equal(out, np.zeros((3,4)))
+            # check shift and zoom
+            out = ndimage.shift(these_data, 1)
+            assert_array_almost_equal(out, shifted_data)
+            out = ndimage.zoom(these_data, 1)
+            assert_array_almost_equal(these_data, out)
+
+
+@pytest.mark.xfail(True, reason="Broken on many platforms")
+def test_uint64_max():
+    # Test interpolation respects uint64 max.  Reported to fail at least on
+    # win32 (due to the 32 bit visual C compiler using signed int64 when
+    # converting between uint64 to double) and Debian on s390x.
+    # Interpolation is always done in double precision floating point, so
+    # we use the largest uint64 value for which int(float(big)) still fits
+    # in a uint64.
+    # This test was last enabled on macOS only, and there it started failing
+    # on arm64 as well (see gh-19117).
+    big = 2**64 - 1025
+    arr = np.array([big, big, big], dtype=np.uint64)
+    # Tests geometric transform (map_coordinates, affine_transform)
+    inds = np.indices(arr.shape) - 0.1
+    x = ndimage.map_coordinates(arr, inds)
+    assert x[1] == int(float(big))
+    assert x[2] == int(float(big))
+    # Tests zoom / shift
+    x = ndimage.shift(arr, 0.1)
+    assert x[1] == int(float(big))
+    assert x[2] == int(float(big))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_filters.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_filters.py
new file mode 100644
index 0000000000000000000000000000000000000000..1d5cb39f566827f41037e34a5a63ce874996c36f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_filters.py
@@ -0,0 +1,2920 @@
+''' Some tests for filters '''
+import functools
+import itertools
+import re
+
+import numpy as np
+import pytest
+from numpy.testing import suppress_warnings, assert_allclose, assert_array_equal
+from hypothesis import strategies as st
+from hypothesis import given
+import hypothesis.extra.numpy as npst
+from pytest import raises as assert_raises
+from scipy import ndimage
+from scipy._lib._array_api import (
+    assert_almost_equal,
+    assert_array_almost_equal,
+    xp_assert_close,
+    xp_assert_equal,
+)
+from scipy._lib._array_api import is_cupy, is_numpy, is_torch, array_namespace
+from scipy.conftest import array_api_compatible
+from scipy.ndimage._filters import _gaussian_kernel1d
+
+from . import types, float_types, complex_types
+
+
+skip_xp_backends = pytest.mark.skip_xp_backends
+xfail_xp_backends = pytest.mark.xfail_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              pytest.mark.usefixtures("xfail_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy']),]
+
+
+def sumsq(a, b, xp=None):
+    xp = array_namespace(a, b) if xp is None else xp
+    return xp.sqrt(xp.sum((a - b)**2))
+
+
+def _complex_correlate(xp, array, kernel, real_dtype, convolve=False,
+                       mode="reflect", cval=0, ):
+    """Utility to perform a reference complex-valued convolutions.
+
+    When convolve==False, correlation is performed instead
+    """
+    array = xp.asarray(array)
+    kernel = xp.asarray(kernel)
+    isdtype = array_namespace(array, kernel).isdtype
+    complex_array = isdtype(array.dtype, 'complex floating')
+    complex_kernel = isdtype(kernel.dtype, 'complex floating')
+    if array.ndim == 1:
+        func = ndimage.convolve1d if convolve else ndimage.correlate1d
+    else:
+        func = ndimage.convolve if convolve else ndimage.correlate
+    if not convolve:
+        kernel = xp.conj(kernel)
+    if complex_array and complex_kernel:
+        # use: real(cval) for array.real component
+        #      imag(cval) for array.imag component
+        re_cval = cval.real if isinstance(cval, complex) else xp.real(cval)
+        im_cval = cval.imag if isinstance(cval, complex) else xp.imag(cval)
+
+        output = (
+            func(xp.real(array), xp.real(kernel), output=real_dtype,
+                 mode=mode, cval=re_cval) -
+            func(xp.imag(array), xp.imag(kernel), output=real_dtype,
+                 mode=mode, cval=im_cval) +
+            1j * func(xp.imag(array), xp.real(kernel), output=real_dtype,
+                      mode=mode, cval=im_cval) +
+            1j * func(xp.real(array), xp.imag(kernel), output=real_dtype,
+                      mode=mode, cval=re_cval)
+        )
+    elif complex_array:
+        re_cval = xp.real(cval)
+        re_cval = re_cval.item() if isinstance(re_cval, xp.ndarray) else re_cval
+        im_cval = xp.imag(cval)
+        im_cval = im_cval.item() if isinstance(im_cval, xp.ndarray) else im_cval
+
+        output = (
+            func(xp.real(array), kernel, output=real_dtype, mode=mode,
+                 cval=re_cval) +
+            1j * func(xp.imag(array), kernel, output=real_dtype, mode=mode,
+                      cval=im_cval)
+        )
+    elif complex_kernel:
+        # real array so cval is real too
+        output = (
+            func(array, xp.real(kernel), output=real_dtype, mode=mode, cval=cval) +
+            1j * func(array, xp.imag(kernel), output=real_dtype, mode=mode,
+                      cval=cval)
+        )
+    return output
+
+
+def _cases_axes_tuple_length_mismatch():
+    # Generate combinations of filter function, valid kwargs, and
+    # keyword-value pairs for which the value will become with mismatched
+    # (invalid) size
+    filter_func = ndimage.gaussian_filter
+    kwargs = dict(radius=3, mode='constant', sigma=1.0, order=0)
+    for key, val in kwargs.items():
+        yield filter_func, kwargs, key, val
+
+    filter_funcs = [ndimage.uniform_filter, ndimage.minimum_filter,
+                    ndimage.maximum_filter]
+    kwargs = dict(size=3, mode='constant', origin=0)
+    for filter_func in filter_funcs:
+        for key, val in kwargs.items():
+            yield filter_func, kwargs, key, val
+
+    filter_funcs = [ndimage.correlate, ndimage.convolve]
+    # sequence of mode not supported for correlate or convolve
+    kwargs = dict(origin=0)
+    for filter_func in filter_funcs:
+        for key, val in kwargs.items():
+            yield filter_func, kwargs, key, val
+
+
+class TestNdimageFilters:
+
+    def _validate_complex(self, xp, array, kernel, type2, mode='reflect',
+                          cval=0, check_warnings=True):
+        # utility for validating complex-valued correlations
+        real_dtype = xp.real(xp.asarray([], dtype=type2)).dtype
+        expected = _complex_correlate(
+            xp, array, kernel, real_dtype, convolve=False, mode=mode, cval=cval
+        )
+
+        if array.ndim == 1:
+            correlate = functools.partial(ndimage.correlate1d, axis=-1,
+                                          mode=mode, cval=cval)
+            convolve = functools.partial(ndimage.convolve1d, axis=-1,
+                                         mode=mode, cval=cval)
+        else:
+            correlate = functools.partial(ndimage.correlate, mode=mode,
+                                          cval=cval)
+            convolve = functools.partial(ndimage.convolve, mode=mode,
+                                          cval=cval)
+
+        # test correlate output dtype
+        output = correlate(array, kernel, output=type2)
+        assert_array_almost_equal(expected, output)
+        assert output.dtype.type == type2
+
+        # test correlate with pre-allocated output
+        output = xp.zeros_like(array, dtype=type2)
+        correlate(array, kernel, output=output)
+        assert_array_almost_equal(expected, output)
+
+        # test convolve output dtype
+        output = convolve(array, kernel, output=type2)
+        expected = _complex_correlate(
+            xp, array, kernel, real_dtype, convolve=True, mode=mode, cval=cval,
+        )
+        assert_array_almost_equal(expected, output)
+        assert output.dtype.type == type2
+
+        # convolve with pre-allocated output
+        convolve(array, kernel, output=output)
+        assert_array_almost_equal(expected, output)
+        assert output.dtype.type == type2
+
+        if check_warnings:
+            # warns if the output is not a complex dtype
+            with pytest.warns(UserWarning,
+                              match="promoting specified output dtype to "
+                              "complex"):
+                correlate(array, kernel, output=real_dtype)
+
+            with pytest.warns(UserWarning,
+                              match="promoting specified output dtype to "
+                              "complex"):
+                convolve(array, kernel, output=real_dtype)
+
+        # raises if output array is provided, but is not complex-valued
+        output_real = xp.zeros_like(array, dtype=real_dtype)
+        with assert_raises(RuntimeError):
+            correlate(array, kernel, output=output_real)
+
+        with assert_raises(RuntimeError):
+            convolve(array, kernel, output=output_real)
+
+    def test_correlate01(self, xp):
+        array = xp.asarray([1, 2])
+        weights = xp.asarray([2])
+        expected = xp.asarray([2, 4])
+
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, expected)
+
+    @xfail_xp_backends('cupy', reason="Differs by a factor of two?")
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_correlate01_overlap(self, xp):
+        array = xp.reshape(xp.arange(256), (16, 16))
+        weights = xp.asarray([2])
+        expected = 2 * array
+
+        ndimage.correlate1d(array, weights, output=array)
+        assert_array_almost_equal(array, expected)
+
+    def test_correlate02(self, xp):
+        array = xp.asarray([1, 2, 3])
+        kernel = xp.asarray([1])
+
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(array, output)
+
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(array, output)
+
+        output = ndimage.correlate1d(array, kernel)
+        assert_array_almost_equal(array, output)
+
+        output = ndimage.convolve1d(array, kernel)
+        assert_array_almost_equal(array, output)
+
+    def test_correlate03(self, xp):
+        array = xp.asarray([1])
+        weights = xp.asarray([1, 1])
+        expected = xp.asarray([2])
+
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, expected)
+
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, expected)
+
+    def test_correlate04(self, xp):
+        array = xp.asarray([1, 2])
+        tcor = xp.asarray([2, 3])
+        tcov = xp.asarray([3, 4])
+        weights = xp.asarray([1, 1])
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, tcov)
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, tcov)
+
+    def test_correlate05(self, xp):
+        array = xp.asarray([1, 2, 3])
+        tcor = xp.asarray([2, 3, 5])
+        tcov = xp.asarray([3, 5, 6])
+        kernel = xp.asarray([1, 1])
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(tcor, output)
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(tcov, output)
+        output = ndimage.correlate1d(array, kernel)
+        assert_array_almost_equal(tcor, output)
+        output = ndimage.convolve1d(array, kernel)
+        assert_array_almost_equal(tcov, output)
+
+    def test_correlate06(self, xp):
+        array = xp.asarray([1, 2, 3])
+        tcor = xp.asarray([9, 14, 17])
+        tcov = xp.asarray([7, 10, 15])
+        weights = xp.asarray([1, 2, 3])
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, tcov)
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, tcov)
+
+    def test_correlate07(self, xp):
+        array = xp.asarray([1, 2, 3])
+        expected = xp.asarray([5, 8, 11])
+        weights = xp.asarray([1, 2, 1])
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, expected)
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, expected)
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, expected)
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, expected)
+
+    def test_correlate08(self, xp):
+        array = xp.asarray([1, 2, 3])
+        tcor = xp.asarray([1, 2, 5])
+        tcov = xp.asarray([3, 6, 7])
+        weights = xp.asarray([1, 2, -1])
+        output = ndimage.correlate(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve(array, weights)
+        assert_array_almost_equal(output, tcov)
+        output = ndimage.correlate1d(array, weights)
+        assert_array_almost_equal(output, tcor)
+        output = ndimage.convolve1d(array, weights)
+        assert_array_almost_equal(output, tcov)
+
+    def test_correlate09(self, xp):
+        array = xp.asarray([])
+        kernel = xp.asarray([1, 1])
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(array, output)
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(array, output)
+        output = ndimage.correlate1d(array, kernel)
+        assert_array_almost_equal(array, output)
+        output = ndimage.convolve1d(array, kernel)
+        assert_array_almost_equal(array, output)
+
+    def test_correlate10(self, xp):
+        array = xp.asarray([[]])
+        kernel = xp.asarray([[1, 1]])
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(array, output)
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(array, output)
+
+    def test_correlate11(self, xp):
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]])
+        kernel = xp.asarray([[1, 1],
+                             [1, 1]])
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(xp.asarray([[4, 6, 10], [10, 12, 16]]), output)
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(xp.asarray([[12, 16, 18], [18, 22, 24]]), output)
+
+    def test_correlate12(self, xp):
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]])
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        output = ndimage.correlate(array, kernel)
+        assert_array_almost_equal(xp.asarray([[2, 3, 5], [5, 6, 8]]), output)
+        output = ndimage.convolve(array, kernel)
+        assert_array_almost_equal(xp.asarray([[6, 8, 9], [9, 11, 12]]), output)
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_kernel', types)
+    def test_correlate13(self, dtype_array, dtype_kernel, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_kernel = getattr(xp, dtype_kernel)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_array)
+        output = ndimage.correlate(array, kernel, output=dtype_kernel)
+        assert_array_almost_equal(xp.asarray([[2, 3, 5], [5, 6, 8]]), output)
+        assert output.dtype.type == dtype_kernel
+
+        output = ndimage.convolve(array, kernel,
+                                  output=dtype_kernel)
+        assert_array_almost_equal(xp.asarray([[6, 8, 9], [9, 11, 12]]), output)
+        assert output.dtype.type == dtype_kernel
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate14(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_array)
+        output = xp.zeros(array.shape, dtype=dtype_output)
+        ndimage.correlate(array, kernel, output=output)
+        assert_array_almost_equal(xp.asarray([[2, 3, 5], [5, 6, 8]]), output)
+        assert output.dtype.type == dtype_output
+
+        ndimage.convolve(array, kernel, output=output)
+        assert_array_almost_equal(xp.asarray([[6, 8, 9], [9, 11, 12]]), output)
+        assert output.dtype.type == dtype_output
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    def test_correlate15(self, dtype_array, xp):
+        dtype_array = getattr(xp, dtype_array)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_array)
+        output = ndimage.correlate(array, kernel, output=xp.float32)
+        assert_array_almost_equal(xp.asarray([[2, 3, 5], [5, 6, 8]]), output)
+        assert output.dtype.type == xp.float32
+
+        output = ndimage.convolve(array, kernel, output=xp.float32)
+        assert_array_almost_equal(xp.asarray([[6, 8, 9], [9, 11, 12]]), output)
+        assert output.dtype.type == xp.float32
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    def test_correlate16(self, dtype_array, xp):
+        dtype_array = getattr(xp, dtype_array)
+
+        kernel = xp.asarray([[0.5, 0],
+                             [0, 0.5]])
+        array = xp.asarray([[1, 2, 3], [4, 5, 6]], dtype=dtype_array)
+        output = ndimage.correlate(array, kernel, output=xp.float32)
+        assert_array_almost_equal(xp.asarray([[1, 1.5, 2.5], [2.5, 3, 4]]), output)
+        assert output.dtype.type == xp.float32
+
+        output = ndimage.convolve(array, kernel, output=xp.float32)
+        assert_array_almost_equal(xp.asarray([[3, 4, 4.5], [4.5, 5.5, 6]]), output)
+        assert output.dtype.type == xp.float32
+
+    def test_correlate17(self, xp):
+        array = xp.asarray([1, 2, 3])
+        tcor = xp.asarray([3, 5, 6])
+        tcov = xp.asarray([2, 3, 5])
+        kernel = xp.asarray([1, 1])
+        output = ndimage.correlate(array, kernel, origin=-1)
+        assert_array_almost_equal(tcor, output)
+        output = ndimage.convolve(array, kernel, origin=-1)
+        assert_array_almost_equal(tcov, output)
+        output = ndimage.correlate1d(array, kernel, origin=-1)
+        assert_array_almost_equal(tcor, output)
+        output = ndimage.convolve1d(array, kernel, origin=-1)
+        assert_array_almost_equal(tcov, output)
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    def test_correlate18(self, dtype_array, xp):
+        dtype_array = getattr(xp, dtype_array)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_array)
+        output = ndimage.correlate(array, kernel,
+                                   output=xp.float32,
+                                   mode='nearest', origin=-1)
+        assert_array_almost_equal(xp.asarray([[6, 8, 9], [9, 11, 12]]), output)
+        assert output.dtype.type == xp.float32
+
+        output = ndimage.convolve(array, kernel,
+                                  output=xp.float32,
+                                  mode='nearest', origin=-1)
+        assert_array_almost_equal(xp.asarray([[2, 3, 5], [5, 6, 8]]), output)
+        assert output.dtype.type == xp.float32
+
+    def test_correlate_mode_sequence(self, xp):
+        kernel = xp.ones((2, 2))
+        array = xp.ones((3, 3), dtype=xp.float64)
+        with assert_raises(RuntimeError):
+            ndimage.correlate(array, kernel, mode=['nearest', 'reflect'])
+        with assert_raises(RuntimeError):
+            ndimage.convolve(array, kernel, mode=['nearest', 'reflect'])
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    def test_correlate19(self, dtype_array, xp):
+        dtype_array = getattr(xp, dtype_array)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]])
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_array)
+        output = ndimage.correlate(array, kernel,
+                                   output=xp.float32,
+                                   mode='nearest', origin=[-1, 0])
+        assert_array_almost_equal(xp.asarray([[5, 6, 8], [8, 9, 11]]), output)
+        assert output.dtype.type == xp.float32
+
+        output = ndimage.convolve(array, kernel,
+                                  output=xp.float32,
+                                  mode='nearest', origin=[-1, 0])
+        assert_array_almost_equal(xp.asarray([[3, 5, 6], [6, 8, 9]]), output)
+        assert output.dtype.type == xp.float32
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate20(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        weights = xp.asarray([1, 2, 1])
+        expected = xp.asarray([[5, 10, 15], [7, 14, 21]])
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=dtype_array)
+        output = xp.zeros((2, 3), dtype=dtype_output)
+        ndimage.correlate1d(array, weights, axis=0, output=output)
+        assert_array_almost_equal(output, expected)
+        ndimage.convolve1d(array, weights, axis=0, output=output)
+        assert_array_almost_equal(output, expected)
+
+    def test_correlate21(self, xp):
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]])
+        expected = xp.asarray([[5, 10, 15], [7, 14, 21]])
+        weights = xp.asarray([1, 2, 1])
+        output = ndimage.correlate1d(array, weights, axis=0)
+        assert_array_almost_equal(output, expected)
+        output = ndimage.convolve1d(array, weights, axis=0)
+        assert_array_almost_equal(output, expected)
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate22(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        weights = xp.asarray([1, 2, 1])
+        expected = xp.asarray([[6, 12, 18], [6, 12, 18]])
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=dtype_array)
+        output = xp.zeros((2, 3), dtype=dtype_output)
+        ndimage.correlate1d(array, weights, axis=0,
+                            mode='wrap', output=output)
+        assert_array_almost_equal(output, expected)
+        ndimage.convolve1d(array, weights, axis=0,
+                           mode='wrap', output=output)
+        assert_array_almost_equal(output, expected)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate23(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        weights = xp.asarray([1, 2, 1])
+        expected = xp.asarray([[5, 10, 15], [7, 14, 21]])
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=dtype_array)
+        output = xp.zeros((2, 3), dtype=dtype_output)
+        ndimage.correlate1d(array, weights, axis=0,
+                            mode='nearest', output=output)
+        assert_array_almost_equal(output, expected)
+        ndimage.convolve1d(array, weights, axis=0,
+                           mode='nearest', output=output)
+        assert_array_almost_equal(output, expected)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate24(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        weights = xp.asarray([1, 2, 1])
+        tcor = xp.asarray([[7, 14, 21], [8, 16, 24]])
+        tcov = xp.asarray([[4, 8, 12], [5, 10, 15]])
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=dtype_array)
+        output = xp.zeros((2, 3), dtype=dtype_output)
+        ndimage.correlate1d(array, weights, axis=0,
+                            mode='nearest', output=output, origin=-1)
+        assert_array_almost_equal(output, tcor)
+        ndimage.convolve1d(array, weights, axis=0,
+                           mode='nearest', output=output, origin=-1)
+        assert_array_almost_equal(output, tcov)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_correlate25(self, dtype_array, dtype_output, xp):
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        weights = xp.asarray([1, 2, 1])
+        tcor = xp.asarray([[4, 8, 12], [5, 10, 15]])
+        tcov = xp.asarray([[7, 14, 21], [8, 16, 24]])
+        array = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=dtype_array)
+        output = xp.zeros((2, 3), dtype=dtype_output)
+        ndimage.correlate1d(array, weights, axis=0,
+                            mode='nearest', output=output, origin=1)
+        assert_array_almost_equal(output, tcor)
+        ndimage.convolve1d(array, weights, axis=0,
+                           mode='nearest', output=output, origin=1)
+        assert_array_almost_equal(output, tcov)
+
+    def test_correlate26(self, xp):
+        # test fix for gh-11661 (mirror extension of a length 1 signal)
+        y = ndimage.convolve1d(xp.ones(1), xp.ones(5), mode='mirror')
+        xp_assert_equal(y, xp.asarray([5.]))
+
+        y = ndimage.correlate1d(xp.ones(1), xp.ones(5), mode='mirror')
+        xp_assert_equal(y, xp.asarray([5.]))
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_kernel', complex_types)
+    @pytest.mark.parametrize('dtype_input', types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate_complex_kernel(self, dtype_input, dtype_kernel,
+                                      dtype_output, xp, num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1 + 1j]], dtype=dtype_kernel)
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @xfail_xp_backends(np_only=True,
+                       reason="output=dtype is numpy-specific",
+                       exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype_kernel', complex_types)
+    @pytest.mark.parametrize('dtype_input', types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    @pytest.mark.parametrize('mode', ['grid-constant', 'constant'])
+    def test_correlate_complex_kernel_cval(self, dtype_input, dtype_kernel,
+                                           dtype_output, mode, xp,
+                                           num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        if is_cupy(xp) and mode == 'grid-constant':
+            pytest.xfail('https://github.com/cupy/cupy/issues/8404')
+
+        # test use of non-zero cval with complex inputs
+        # also verifies that mode 'grid-constant' does not segfault
+        kernel = xp.asarray([[1, 0],
+                             [0, 1 + 1j]], dtype=dtype_kernel)
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output, mode=mode,
+                               cval=5.0,
+                               check_warnings=num_parallel_threads == 1)
+
+    @xfail_xp_backends('cupy', reason="cupy/cupy#8405")
+    @pytest.mark.parametrize('dtype_kernel', complex_types)
+    @pytest.mark.parametrize('dtype_input', types)
+    @pytest.mark.thread_unsafe
+    def test_correlate_complex_kernel_invalid_cval(self, dtype_input,
+                                                   dtype_kernel, xp):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+
+        # cannot give complex cval with a real image
+        kernel = xp.asarray([[1, 0],
+                             [0, 1 + 1j]], dtype=dtype_kernel)
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype_input)
+        for func in [ndimage.convolve, ndimage.correlate, ndimage.convolve1d,
+                     ndimage.correlate1d]:
+            with pytest.raises((ValueError, TypeError)):
+                func(array, kernel, mode='constant', cval=5.0 + 1.0j,
+                     output=xp.complex64)
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    @pytest.mark.parametrize('dtype_kernel', complex_types)
+    @pytest.mark.parametrize('dtype_input', types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate1d_complex_kernel(self, dtype_input, dtype_kernel,
+                                        dtype_output, xp, num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([1, 1 + 1j], dtype=dtype_kernel)
+        array = xp.asarray([1, 2, 3, 4, 5, 6], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    @pytest.mark.parametrize('dtype_kernel', complex_types)
+    @pytest.mark.parametrize('dtype_input', types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate1d_complex_kernel_cval(self, dtype_input, dtype_kernel,
+                                             dtype_output, xp,
+                                             num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([1, 1 + 1j], dtype=dtype_kernel)
+        array = xp.asarray([1, 2, 3, 4, 5, 6], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output, mode='constant',
+                               cval=5.0,
+                               check_warnings=num_parallel_threads == 1)
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    @pytest.mark.parametrize('dtype_kernel', types)
+    @pytest.mark.parametrize('dtype_input', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate_complex_input(self, dtype_input, dtype_kernel,
+                                     dtype_output, xp, num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1]], dtype=dtype_kernel)
+        array = xp.asarray([[1, 2j, 3],
+                            [1 + 4j, 5, 6j]], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    @pytest.mark.parametrize('dtype_kernel', types)
+    @pytest.mark.parametrize('dtype_input', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate1d_complex_input(self, dtype_input, dtype_kernel,
+                                       dtype_output, xp, num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([1, 0, 1], dtype=dtype_kernel)
+        array = xp.asarray([1, 2j, 3, 1 + 4j, 5, 6j], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @xfail_xp_backends('cupy', reason="cupy/cupy#8405")
+    @skip_xp_backends(np_only=True,
+                      reason='output=dtype is numpy-specific',
+                      exceptions=['cupy'])
+    @pytest.mark.parametrize('dtype_kernel', types)
+    @pytest.mark.parametrize('dtype_input', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate1d_complex_input_cval(self, dtype_input, dtype_kernel,
+                                            dtype_output, xp,
+                                            num_parallel_threads):
+        dtype_input = getattr(xp, dtype_input)
+        dtype_kernel = getattr(xp, dtype_kernel)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([1, 0, 1], dtype=dtype_kernel)
+        array = xp.asarray([1, 2j, 3, 1 + 4j, 5, 6j], dtype=dtype_input)
+        self._validate_complex(xp, array, kernel, dtype_output, mode='constant',
+                               cval=5 - 3j,
+                               check_warnings=num_parallel_threads == 1)
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    @pytest.mark.parametrize('dtype', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate_complex_input_and_kernel(self, dtype, dtype_output, xp,
+                                                num_parallel_threads):
+        dtype = getattr(xp, dtype)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1 + 1j]], dtype=dtype)
+        array = xp.asarray([[1, 2j, 3],
+                            [1 + 4j, 5, 6j]], dtype=dtype)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @xfail_xp_backends('cupy', reason="cupy/cupy#8405")
+    @skip_xp_backends(np_only=True,
+                      reason="output=dtype is numpy-specific",
+                      exceptions=['cupy'],)
+    @pytest.mark.parametrize('dtype', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate_complex_input_and_kernel_cval(self, dtype,
+                                                     dtype_output, xp,
+                                                     num_parallel_threads):
+        dtype = getattr(xp, dtype)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([[1, 0],
+                             [0, 1 + 1j]], dtype=dtype)
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6]], dtype=dtype)
+        self._validate_complex(xp, array, kernel, dtype_output, mode='constant',
+                               cval=5.0 + 2.0j,
+                               check_warnings=num_parallel_threads == 1)
+
+    @skip_xp_backends(np_only=True, reason="output=dtype is numpy-specific")
+    @pytest.mark.parametrize('dtype', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    @pytest.mark.thread_unsafe
+    def test_correlate1d_complex_input_and_kernel(self, dtype, dtype_output, xp,
+                                                  num_parallel_threads):
+        dtype = getattr(xp, dtype)
+        dtype_output = getattr(xp, dtype_output)
+
+        kernel = xp.asarray([1, 1 + 1j], dtype=dtype)
+        array = xp.asarray([1, 2j, 3, 1 + 4j, 5, 6j], dtype=dtype)
+        self._validate_complex(xp, array, kernel, dtype_output,
+                               check_warnings=num_parallel_threads == 1)
+
+    @pytest.mark.parametrize('dtype', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_correlate1d_complex_input_and_kernel_cval(self, dtype,
+                                                       dtype_output, xp,
+                                                       num_parallel_threads):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        dtype = getattr(xp, dtype)
+        dtype_output = getattr(xp, dtype_output)
+
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8405")
+
+        kernel = xp.asarray([1, 1 + 1j], dtype=dtype)
+        array = xp.asarray([1, 2j, 3, 1 + 4j, 5, 6j], dtype=dtype)
+        self._validate_complex(xp, array, kernel, dtype_output, mode='constant',
+                               cval=5.0 + 2.0j,
+                               check_warnings=num_parallel_threads == 1)
+
+    def test_gauss01(self, xp):
+        input = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=xp.float32)
+        output = ndimage.gaussian_filter(input, 0)
+        assert_array_almost_equal(output, input)
+
+    def test_gauss02(self, xp):
+        input = xp.asarray([[1, 2, 3],
+                            [2, 4, 6]], dtype=xp.float32)
+        output = ndimage.gaussian_filter(input, 1.0)
+        assert input.dtype == output.dtype
+        assert input.shape == output.shape
+
+    def test_gauss03(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8403")
+
+        # single precision data
+        input = xp.arange(100 * 100, dtype=xp.float32)
+        input = xp.reshape(input, (100, 100))
+        output = ndimage.gaussian_filter(input, [1.0, 1.0])
+
+        assert input.dtype == output.dtype
+        assert input.shape == output.shape
+
+        # input.sum() is 49995000.0.  With single precision floats, we can't
+        # expect more than 8 digits of accuracy, so use decimal=0 in this test.
+        o_sum = xp.sum(output, dtype=xp.float64)
+        i_sum = xp.sum(input, dtype=xp.float64)
+        assert_almost_equal(o_sum, i_sum, decimal=0)
+        assert sumsq(input, output) > 1.0
+
+    def test_gauss04(self, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        input = xp.arange(100 * 100, dtype=xp.float32)
+        input = xp.reshape(input, (100, 100))
+        otype = xp.float64
+        output = ndimage.gaussian_filter(input, [1.0, 1.0], output=otype)
+        assert output.dtype.type == xp.float64
+        assert input.shape == output.shape
+        assert sumsq(input, output) > 1.0
+
+    def test_gauss05(self, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        input = xp.arange(100 * 100, dtype=xp.float32)
+        input = xp.reshape(input, (100, 100))
+        otype = xp.float64
+        output = ndimage.gaussian_filter(input, [1.0, 1.0],
+                                         order=1, output=otype)
+        assert output.dtype.type == xp.float64
+        assert input.shape == output.shape
+        assert sumsq(input, output) > 1.0
+
+    def test_gauss06(self, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        input = xp.arange(100 * 100, dtype=xp.float32)
+        input = xp.reshape(input, (100, 100))
+        otype = xp.float64
+        output1 = ndimage.gaussian_filter(input, [1.0, 1.0], output=otype)
+        output2 = ndimage.gaussian_filter(input, 1.0, output=otype)
+        assert_array_almost_equal(output1, output2)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_gauss_memory_overlap(self, xp):
+        input = xp.arange(100 * 100, dtype=xp.float32)
+        input = xp.reshape(input, (100, 100))
+        output1 = ndimage.gaussian_filter(input, 1.0)
+        ndimage.gaussian_filter(input, 1.0, output=input)
+        assert_array_almost_equal(output1, input)
+
+    @pytest.mark.parametrize(('filter_func', 'extra_args', 'size0', 'size'),
+                             [(ndimage.gaussian_filter, (), 0, 1.0),
+                              (ndimage.uniform_filter, (), 1, 3),
+                              (ndimage.minimum_filter, (), 1, 3),
+                              (ndimage.maximum_filter, (), 1, 3),
+                              (ndimage.median_filter, (), 1, 3),
+                              (ndimage.rank_filter, (1,), 1, 3),
+                              (ndimage.percentile_filter, (40,), 1, 3)])
+    @pytest.mark.parametrize(
+        'axes',
+        tuple(itertools.combinations(range(-3, 3), 1))
+        + tuple(itertools.combinations(range(-3, 3), 2))
+        + ((0, 1, 2),))
+    def test_filter_axes(self, filter_func, extra_args, size0, size, axes, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        # Note: `size` is called `sigma` in `gaussian_filter`
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+
+        if len(set(ax % array.ndim for ax in axes)) != len(axes):
+            # parametrized cases with duplicate axes raise an error
+            with pytest.raises(ValueError, match="axes must be unique"):
+                filter_func(array, *extra_args, size, axes=axes)
+            return
+        output = filter_func(array, *extra_args, size, axes=axes)
+
+        # result should be equivalent to sigma=0.0/size=1 on unfiltered axes
+        axes = xp.asarray(axes)
+        all_sizes = tuple(size if ax in (axes % array.ndim) else size0
+                          for ax in range(array.ndim))
+        expected = filter_func(array, *extra_args, all_sizes)
+        xp_assert_close(output, expected)
+
+    @skip_xp_backends("cupy",
+                      reason="these filters do not yet have axes support",
+    )
+    @pytest.mark.parametrize(('filter_func', 'kwargs'),
+                             [(ndimage.laplace, {}),
+                              (ndimage.gaussian_gradient_magnitude,
+                               {"sigma": 1.0}),
+                              (ndimage.gaussian_laplace, {"sigma": 0.5})])
+    def test_derivative_filter_axes(self, xp, filter_func, kwargs):
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+
+        # duplicate axes raises an error
+        with pytest.raises(ValueError, match="axes must be unique"):
+            filter_func(array, axes=(1, 1), **kwargs)
+
+        # compare results to manually looping over the non-filtered axes
+        output = filter_func(array, axes=(1, 2), **kwargs)
+        expected = xp.empty_like(output)
+        expected = []
+        for i in range(array.shape[0]):
+            expected.append(filter_func(array[i, ...], **kwargs))
+        expected = xp.stack(expected, axis=0)
+        xp_assert_close(output, expected)
+
+        output = filter_func(array, axes=(0, -1), **kwargs)
+        expected = []
+        for i in range(array.shape[1]):
+            expected.append(filter_func(array[:, i, :], **kwargs))
+        expected = xp.stack(expected, axis=1)
+        xp_assert_close(output, expected)
+
+        output = filter_func(array, axes=(1), **kwargs)
+        expected = []
+        for i in range(array.shape[0]):
+            exp_inner = []
+            for j in range(array.shape[2]):
+                exp_inner.append(filter_func(array[i, :, j], **kwargs))
+            expected.append(xp.stack(exp_inner, axis=-1))
+        expected = xp.stack(expected, axis=0)
+        xp_assert_close(output, expected)
+
+    @skip_xp_backends("cupy",
+                      reason="generic_filter does not yet have axes support",
+    )
+    @pytest.mark.parametrize(
+        'axes',
+        tuple(itertools.combinations(range(-3, 3), 1))
+        + tuple(itertools.combinations(range(-3, 3), 2))
+        + ((0, 1, 2),))
+    def test_generic_filter_axes(self, xp, axes):
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+        size = 3
+        if len(set(ax % array.ndim for ax in axes)) != len(axes):
+            # parametrized cases with duplicate axes raise an error
+            with pytest.raises(ValueError, match="axes must be unique"):
+                ndimage.generic_filter(array, np.amax, size=size, axes=axes)
+            return
+
+        # choose np.amax as the function so we can compare to maximum_filter
+        output = ndimage.generic_filter(array, np.amax, size=size, axes=axes)
+        expected = ndimage.maximum_filter(array, size=size, axes=axes)
+        xp_assert_close(output, expected)
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8339",
+    )
+    @pytest.mark.parametrize('func', [ndimage.correlate, ndimage.convolve])
+    @pytest.mark.parametrize(
+        'dtype', [np.float32, np.float64, np.complex64, np.complex128]
+    )
+    @pytest.mark.parametrize(
+        'axes', tuple(itertools.combinations(range(-3, 3), 2))
+    )
+    @pytest.mark.parametrize('origin', [(0, 0), (-1, 1)])
+    def test_correlate_convolve_axes(self, xp, func, dtype, axes, origin):
+        array = xp.asarray(np.arange(6 * 8 * 12, dtype=dtype).reshape(6, 8, 12))
+        weights = xp.arange(3 * 5)
+        weights = xp.reshape(weights, (3, 5))
+        axes = tuple(ax % array.ndim for ax in axes)
+        if len(tuple(set(axes))) != len(axes):
+            # parametrized cases with duplicate axes raise an error
+            with pytest.raises(ValueError):
+                func(array, weights=weights, axes=axes, origin=origin)
+            return
+        output = func(array, weights=weights, axes=axes, origin=origin)
+
+        missing_axis = tuple(set(range(3)) - set(axes))[0]
+        # module 'torch' has no attribute 'expand_dims' so use reshape instead
+        #    weights_3d = xp.expand_dims(weights, axis=missing_axis)
+        shape_3d = (
+            weights.shape[:missing_axis] + (1,) + weights.shape[missing_axis:]
+        )
+        weights_3d = xp.reshape(weights, shape_3d)
+        origin_3d = [0, 0, 0]
+        for i, ax in enumerate(axes):
+            origin_3d[ax] = origin[i]
+        expected = func(array, weights=weights_3d, origin=origin_3d)
+        xp_assert_close(output, expected)
+
+    kwargs_gauss = dict(radius=[4, 2, 3], order=[0, 1, 2],
+                        mode=['reflect', 'nearest', 'constant'])
+    kwargs_other = dict(origin=(-1, 0, 1),
+                        mode=['reflect', 'nearest', 'constant'])
+    kwargs_rank = dict(origin=(-1, 0, 1))
+
+    @skip_xp_backends("array_api_strict",
+         reason="fancy indexing is only available in 2024 version",
+    )
+    @pytest.mark.parametrize("filter_func, size0, size, kwargs",
+                             [(ndimage.gaussian_filter, 0, 1.0, kwargs_gauss),
+                              (ndimage.uniform_filter, 1, 3, kwargs_other),
+                              (ndimage.maximum_filter, 1, 3, kwargs_other),
+                              (ndimage.minimum_filter, 1, 3, kwargs_other),
+                              (ndimage.median_filter, 1, 3, kwargs_rank),
+                              (ndimage.rank_filter, 1, 3, kwargs_rank),
+                              (ndimage.percentile_filter, 1, 3, kwargs_rank)])
+    @pytest.mark.parametrize('axes', itertools.combinations(range(-3, 3), 2))
+    def test_filter_axes_kwargs(self, filter_func, size0, size, kwargs, axes, xp):
+
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+
+        kwargs = {key: np.array(val) for key, val in kwargs.items()}
+        axes = np.array(axes)
+        n_axes = axes.size
+
+        if filter_func == ndimage.rank_filter:
+            args = (2,)  # (rank,)
+        elif filter_func == ndimage.percentile_filter:
+            args = (30,)  # (percentile,)
+        else:
+            args = ()
+
+        # form kwargs that specify only the axes in `axes`
+        reduced_kwargs = {key: val[axes] for key, val in kwargs.items()}
+        if len(set(axes % array.ndim)) != len(axes):
+            # parametrized cases with duplicate axes raise an error
+            with pytest.raises(ValueError, match="axes must be unique"):
+                filter_func(array, *args, [size]*n_axes, axes=axes,
+                            **reduced_kwargs)
+            return
+
+        output = filter_func(array, *args, [size]*n_axes, axes=axes,
+                             **reduced_kwargs)
+
+        # result should be equivalent to sigma=0.0/size=1 on unfiltered axes
+        size_3d = np.full(array.ndim, fill_value=size0)
+        size_3d[axes] = size
+        size_3d = [size_3d[i] for i in range(size_3d.shape[0])]
+        if 'origin' in kwargs:
+            # origin should be zero on the axis that has size 0
+            origin = np.asarray([0, 0, 0])
+            origin[axes] = reduced_kwargs['origin']
+            origin = xp.asarray(origin)
+            kwargs['origin'] = origin
+        expected = filter_func(array, *args, size_3d, **kwargs)
+        xp_assert_close(output, expected)
+
+
+    @pytest.mark.parametrize("filter_func, kwargs",
+                             [(ndimage.convolve, {}),
+                              (ndimage.correlate, {}),
+                              (ndimage.minimum_filter, {}),
+                              (ndimage.maximum_filter, {}),
+                              (ndimage.median_filter, {}),
+                              (ndimage.rank_filter, {"rank": 1}),
+                              (ndimage.percentile_filter, {"percentile": 30})])
+    def test_filter_weights_subset_axes_origins(self, filter_func, kwargs, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        axes = (-2, -1)
+        origins = (0, 1)
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+
+        # weights with ndim matching len(axes)
+        footprint = np.ones((3, 5), dtype=bool)
+        footprint[0, 1] = 0  # make non-separable
+        footprint = xp.asarray(footprint)
+
+        if filter_func in (ndimage.convolve, ndimage.correlate):
+            kwargs["weights"] = footprint
+        else:
+            kwargs["footprint"] = footprint
+        kwargs["axes"] = axes
+
+        output = filter_func(array, origin=origins, **kwargs)
+
+        output0 = filter_func(array, origin=0, **kwargs)
+
+        # output has origin shift on last axis relative to output0, so
+        # expect shifted arrays to be equal.
+        if filter_func == ndimage.convolve:
+            # shift is in the opposite direction for convolve because it
+            # flips the weights array and negates the origin values.
+            xp_assert_equal(
+                output[:, :, :-origins[1]], output0[:, :, origins[1]:])
+        else:
+            xp_assert_equal(
+                output[:, :, origins[1]:], output0[:, :, :-origins[1]])
+
+
+    @pytest.mark.parametrize(
+        'filter_func, args',
+        [(ndimage.convolve, (np.ones((3, 3, 3)),)),  # args = (weights,)
+         (ndimage.correlate,(np.ones((3, 3, 3)),)),  # args = (weights,)
+         (ndimage.gaussian_filter, (1.0,)),      # args = (sigma,)
+         (ndimage.uniform_filter, (3,)),         # args = (size,)
+         (ndimage.minimum_filter, (3,)),         # args = (size,)
+         (ndimage.maximum_filter, (3,)),         # args = (size,)
+         (ndimage.median_filter, (3,)),          # args = (size,)
+         (ndimage.rank_filter, (2, 3)),          # args = (rank, size)
+         (ndimage.percentile_filter, (30, 3))])  # args = (percentile, size)
+    @pytest.mark.parametrize(
+        'axes', [(1.5,), (0, 1, 2, 3), (3,), (-4,)]
+    )
+    def test_filter_invalid_axes(self, filter_func, args, axes, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+        args = [
+            xp.asarray(arg) if isinstance(arg, np.ndarray) else arg
+            for arg in args
+        ]
+        if any(isinstance(ax, float) for ax in axes):
+            error_class = TypeError
+            match = "cannot be interpreted as an integer"
+        else:
+            error_class = ValueError
+            match = "out of range"
+        with pytest.raises(error_class, match=match):
+            filter_func(array, *args, axes=axes)
+
+    @pytest.mark.parametrize(
+        'filter_func, kwargs',
+        [(ndimage.convolve, {}),
+         (ndimage.correlate, {}),
+         (ndimage.minimum_filter, {}),
+         (ndimage.maximum_filter, {}),
+         (ndimage.median_filter, {}),
+         (ndimage.rank_filter, dict(rank=3)),
+         (ndimage.percentile_filter, dict(percentile=30))])
+    @pytest.mark.parametrize(
+        'axes', [(0, ), (1, 2), (0, 1, 2)]
+    )
+    @pytest.mark.parametrize('separable_footprint', [False, True])
+    def test_filter_invalid_footprint_ndim(self, filter_func, kwargs, axes,
+                                           separable_footprint, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+        # create a footprint with one too many dimensions
+        footprint = np.ones((3,) * (len(axes) + 1))
+        if not separable_footprint:
+            footprint[(0,) * footprint.ndim] = 0
+        footprint = xp.asarray(footprint)
+        if (filter_func in [ndimage.minimum_filter, ndimage.maximum_filter]
+            and separable_footprint):
+            match = "sequence argument must have length equal to input rank"
+        elif filter_func in [ndimage.convolve, ndimage.correlate]:
+            match = re.escape(f"weights.ndim ({footprint.ndim}) must match "
+                              f"len(axes) ({len(axes)})")
+        else:
+            match = re.escape(f"footprint.ndim ({footprint.ndim}) must match "
+                              f"len(axes) ({len(axes)})")
+        if filter_func in [ndimage.convolve, ndimage.correlate]:
+            kwargs["weights"] = footprint
+        else:
+            kwargs["footprint"] = footprint
+        with pytest.raises(RuntimeError, match=match):
+            filter_func(array, axes=axes, **kwargs)
+
+    @pytest.mark.parametrize('n_mismatch', [1, 3])
+    @pytest.mark.parametrize('filter_func, kwargs, key, val',
+                             _cases_axes_tuple_length_mismatch())
+    def test_filter_tuple_length_mismatch(self, n_mismatch, filter_func,
+                                          kwargs, key, val, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        # Test for the intended RuntimeError when a kwargs has an invalid size
+        array = xp.arange(6 * 8 * 12, dtype=xp.float64)
+        array = xp.reshape(array, (6, 8, 12))
+        axes = (0, 1)
+        kwargs = dict(**kwargs, axes=axes)
+        kwargs[key] = (val,) * n_mismatch
+        if filter_func in [ndimage.convolve, ndimage.correlate]:
+            kwargs["weights"] = xp.ones((5,) * len(axes))
+        err_msg = "sequence argument must have length equal to input rank"
+        with pytest.raises(RuntimeError, match=err_msg):
+            filter_func(array, **kwargs)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_prewitt01(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 0)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 1.0, 1.0]), 1)
+        output = ndimage.prewitt(array, 0)
+        assert_array_almost_equal(t, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_prewitt02(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 0)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 1.0, 1.0]), 1)
+        output = xp.zeros(array.shape, dtype=dtype)
+        ndimage.prewitt(array, 0, output)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_prewitt03(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp) and dtype in [xp.uint32, xp.uint64]:
+            pytest.xfail("uint UB? XXX")
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 1)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 1.0, 1.0]), 0)
+        output = ndimage.prewitt(array, 1)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_prewitt04(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.prewitt(array, -1)
+        output = ndimage.prewitt(array, 1)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_sobel01(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 0)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 2.0, 1.0]), 1)
+        output = ndimage.sobel(array, 0)
+        assert_array_almost_equal(t, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.",)
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_sobel02(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 0)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 2.0, 1.0]), 1)
+        output = xp.zeros(array.shape, dtype=dtype)
+        ndimage.sobel(array, 0, output)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_sobel03(self, dtype, xp):
+        if is_cupy(xp) and dtype in ["uint32", "uint64"]:
+            pytest.xfail("uint UB? XXX")
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.correlate1d(array, xp.asarray([-1.0, 0.0, 1.0]), 1)
+        t = ndimage.correlate1d(t, xp.asarray([1.0, 2.0, 1.0]), 0)
+        output = xp.zeros(array.shape, dtype=dtype)
+        output = ndimage.sobel(array, 1)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_sobel04(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        t = ndimage.sobel(array, -1)
+        output = ndimage.sobel(array, 1)
+        assert_array_almost_equal(t, output)
+
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_laplace01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.correlate1d(array, xp.asarray([1, -2, 1]), 0)
+        tmp2 = ndimage.correlate1d(array, xp.asarray([1, -2, 1]), 1)
+        output = ndimage.laplace(array)
+        assert_array_almost_equal(tmp1 + tmp2, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only",)
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_laplace02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.correlate1d(array, xp.asarray([1, -2, 1]), 0)
+        tmp2 = ndimage.correlate1d(array, xp.asarray([1, -2, 1]), 1)
+        output = xp.zeros(array.shape, dtype=dtype)
+        ndimage.laplace(array, output=output)
+        assert_array_almost_equal(tmp1 + tmp2, output)
+
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_gaussian_laplace01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.gaussian_filter(array, 1.0, [2, 0])
+        tmp2 = ndimage.gaussian_filter(array, 1.0, [0, 2])
+        output = ndimage.gaussian_laplace(array, 1.0)
+        assert_array_almost_equal(tmp1 + tmp2, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only")
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_gaussian_laplace02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.gaussian_filter(array, 1.0, [2, 0])
+        tmp2 = ndimage.gaussian_filter(array, 1.0, [0, 2])
+        output = xp.zeros(array.shape, dtype=dtype)
+        ndimage.gaussian_laplace(array, 1.0, output)
+        assert_array_almost_equal(tmp1 + tmp2, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @pytest.mark.parametrize('dtype', types + complex_types)
+    def test_generic_laplace01(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        def derivative2(input, axis, output, mode, cval, a, b):
+            sigma = np.asarray([a, b / 2.0])
+            order = [0] * input.ndim
+            order[axis] = 2
+            return ndimage.gaussian_filter(input, sigma, order,
+                                           output, mode, cval)
+
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = xp.zeros(array.shape, dtype=dtype)
+        tmp = ndimage.generic_laplace(array, derivative2,
+                                      extra_arguments=(1.0,),
+                                      extra_keywords={'b': 2.0})
+        ndimage.gaussian_laplace(array, 1.0, output)
+        assert_array_almost_equal(tmp, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only")
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_gaussian_gradient_magnitude01(self, dtype, xp):
+        is_int_dtype = dtype == "int32"
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.gaussian_filter(array, 1.0, [1, 0])
+        tmp2 = ndimage.gaussian_filter(array, 1.0, [0, 1])
+        output = ndimage.gaussian_gradient_magnitude(array, 1.0)
+        expected = tmp1 * tmp1 + tmp2 * tmp2
+
+        astype = array_namespace(expected).astype
+        expected_float = astype(expected, xp.float64) if is_int_dtype else expected
+        expected = astype(xp.sqrt(expected_float), dtype)
+        xp_assert_close(output, expected, rtol=1e-6, atol=1e-6)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only")
+    @pytest.mark.parametrize('dtype',
+                             ["int32", "float32", "float64",
+                              "complex64", "complex128"])
+    def test_gaussian_gradient_magnitude02(self, dtype, xp):
+        is_int_dtype = dtype == 'int32'
+        dtype = getattr(xp, dtype)
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype) * 100
+        tmp1 = ndimage.gaussian_filter(array, 1.0, [1, 0])
+        tmp2 = ndimage.gaussian_filter(array, 1.0, [0, 1])
+        output = xp.zeros(array.shape, dtype=dtype)
+        ndimage.gaussian_gradient_magnitude(array, 1.0, output)
+        expected = tmp1 * tmp1 + tmp2 * tmp2
+
+        astype = array_namespace(expected).astype
+        fl_expected = astype(expected, xp.float64) if is_int_dtype else expected
+
+        expected = astype(xp.sqrt(fl_expected), dtype)
+        xp_assert_close(output, expected, rtol=1e-6, atol=1e-6)
+
+    def test_generic_gradient_magnitude01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=xp.float64)
+
+        def derivative(input, axis, output, mode, cval, a, b):
+            sigma = [a, b / 2.0]
+            order = [0] * input.ndim
+            order[axis] = 1
+            return ndimage.gaussian_filter(input, sigma, order, output, mode, cval)
+
+        tmp1 = ndimage.gaussian_gradient_magnitude(array, 1.0)
+        tmp2 = ndimage.generic_gradient_magnitude(
+            array, derivative, extra_arguments=(1.0,),
+            extra_keywords={'b': 2.0})
+        assert_array_almost_equal(tmp1, tmp2)
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8430",
+    )
+    def test_uniform01(self, xp):
+        array = xp.asarray([2, 4, 6])
+        size = 2
+        output = ndimage.uniform_filter1d(array, size, origin=-1)
+        assert_array_almost_equal(xp.asarray([3, 5, 6]), output)
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8430",
+    )
+    def test_uniform01_complex(self, xp):
+        array = xp.asarray([2 + 1j, 4 + 2j, 6 + 3j], dtype=xp.complex128)
+        size = 2
+        output = ndimage.uniform_filter1d(array, size, origin=-1)
+        assert_array_almost_equal(xp.real(output), xp.asarray([3., 5, 6]))
+        assert_array_almost_equal(xp.imag(output), xp.asarray([1.5, 2.5, 3]))
+
+    def test_uniform02(self, xp):
+        array = xp.asarray([1, 2, 3])
+        filter_shape = [0]
+        output = ndimage.uniform_filter(array, filter_shape)
+        assert_array_almost_equal(array, output)
+
+    def test_uniform03(self, xp):
+        array = xp.asarray([1, 2, 3])
+        filter_shape = [1]
+        output = ndimage.uniform_filter(array, filter_shape)
+        assert_array_almost_equal(array, output)
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8430",
+    )
+    def test_uniform04(self, xp):
+        array = xp.asarray([2, 4, 6])
+        filter_shape = [2]
+        output = ndimage.uniform_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([2, 3, 5]), output)
+
+    def test_uniform05(self, xp):
+        array = xp.asarray([])
+        filter_shape = [1]
+        output = ndimage.uniform_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([]), output)
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8430",
+    )
+    @pytest.mark.parametrize('dtype_array', types)
+    @pytest.mark.parametrize('dtype_output', types)
+    def test_uniform06(self, dtype_array, dtype_output, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        filter_shape = [2, 2]
+        array = xp.asarray([[4, 8, 12],
+                            [16, 20, 24]], dtype=dtype_array)
+        output = ndimage.uniform_filter(
+            array, filter_shape, output=dtype_output)
+        assert_array_almost_equal(xp.asarray([[4, 6, 10], [10, 12, 16]]), output)
+        assert output.dtype.type == dtype_output
+
+    @skip_xp_backends("cupy",
+                      reason="https://github.com/cupy/cupy/pull/8430",
+    )
+    @pytest.mark.parametrize('dtype_array', complex_types)
+    @pytest.mark.parametrize('dtype_output', complex_types)
+    def test_uniform06_complex(self, dtype_array, dtype_output, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("output=dtype is numpy-specific")
+
+        dtype_array = getattr(xp, dtype_array)
+        dtype_output = getattr(xp, dtype_output)
+
+        filter_shape = [2, 2]
+        array = xp.asarray([[4, 8 + 5j, 12],
+                            [16, 20, 24]], dtype=dtype_array)
+        output = ndimage.uniform_filter(
+            array, filter_shape, output=dtype_output)
+        assert_array_almost_equal(xp.asarray([[4, 6, 10], [10, 12, 16]]), output.real)
+        assert output.dtype.type == dtype_output
+
+    def test_minimum_filter01(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        filter_shape = xp.asarray([2])
+        output = ndimage.minimum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([1, 1, 2, 3, 4]), output)
+
+    def test_minimum_filter02(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        filter_shape = xp.asarray([3])
+        output = ndimage.minimum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([1, 1, 2, 3, 4]), output)
+
+    def test_minimum_filter03(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        filter_shape = xp.asarray([2])
+        output = ndimage.minimum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([3, 2, 2, 1, 1]), output)
+
+    def test_minimum_filter04(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        filter_shape = xp.asarray([3])
+        output = ndimage.minimum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([2, 2, 1, 1, 1]), output)
+
+    def test_minimum_filter05(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        filter_shape = xp.asarray([2, 3])
+        output = ndimage.minimum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 2, 1, 1, 1],
+                                              [5, 3, 3, 1, 1]]), output)
+
+    @skip_xp_backends("jax.numpy", reason="assignment destination is read-only")
+    def test_minimum_filter05_overlap(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        filter_shape = xp.asarray([2, 3])
+        ndimage.minimum_filter(array, filter_shape, output=array)
+        assert_array_almost_equal(xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 2, 1, 1, 1],
+                                              [5, 3, 3, 1, 1]]), array)
+
+    def test_minimum_filter06(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 1, 1], [1, 1, 1]])
+        output = ndimage.minimum_filter(array, footprint=footprint)
+        assert_array_almost_equal(xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 2, 1, 1, 1],
+                                              [5, 3, 3, 1, 1]]), output)
+        # separable footprint should allow mode sequence
+        output2 = ndimage.minimum_filter(array, footprint=footprint,
+                                         mode=['reflect', 'reflect'])
+        assert_array_almost_equal(output2, output)
+
+    def test_minimum_filter07(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.minimum_filter(array, footprint=footprint)
+        assert_array_almost_equal(xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 3, 1, 3, 1],
+                                              [5, 5, 3, 3, 1]]), output)
+        with assert_raises(RuntimeError):
+            ndimage.minimum_filter(array, footprint=footprint,
+                                   mode=['reflect', 'constant'])
+
+    def test_minimum_filter08(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.minimum_filter(array, footprint=footprint, origin=-1)
+        assert_array_almost_equal(xp.asarray([[3, 1, 3, 1, 1],
+                                              [5, 3, 3, 1, 1],
+                                              [3, 3, 1, 1, 1]]), output)
+
+    def test_minimum_filter09(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.minimum_filter(array, footprint=footprint,
+                                        origin=[-1, 0])
+        assert_array_almost_equal(xp.asarray([[2, 3, 1, 3, 1],
+                                              [5, 5, 3, 3, 1],
+                                              [5, 3, 3, 1, 1]]), output)
+
+    def test_maximum_filter01(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        filter_shape = xp.asarray([2])
+        output = ndimage.maximum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([1, 2, 3, 4, 5]), output)
+
+    def test_maximum_filter02(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        filter_shape = xp.asarray([3])
+        output = ndimage.maximum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([2, 3, 4, 5, 5]), output)
+
+    def test_maximum_filter03(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        filter_shape = xp.asarray([2])
+        output = ndimage.maximum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([3, 3, 5, 5, 4]), output)
+
+    def test_maximum_filter04(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        filter_shape = xp.asarray([3])
+        output = ndimage.maximum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([3, 5, 5, 5, 4]), output)
+
+    def test_maximum_filter05(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        filter_shape = xp.asarray([2, 3])
+        output = ndimage.maximum_filter(array, filter_shape)
+        assert_array_almost_equal(xp.asarray([[3, 5, 5, 5, 4],
+                                              [7, 9, 9, 9, 5],
+                                              [8, 9, 9, 9, 7]]), output)
+
+    def test_maximum_filter06(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 1, 1], [1, 1, 1]])
+        output = ndimage.maximum_filter(array, footprint=footprint)
+        assert_array_almost_equal(xp.asarray([[3, 5, 5, 5, 4],
+                                              [7, 9, 9, 9, 5],
+                                              [8, 9, 9, 9, 7]]), output)
+        # separable footprint should allow mode sequence
+        output2 = ndimage.maximum_filter(array, footprint=footprint,
+                                         mode=['reflect', 'reflect'])
+        assert_array_almost_equal(output2, output)
+
+    def test_maximum_filter07(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.maximum_filter(array, footprint=footprint)
+        assert_array_almost_equal(xp.asarray([[3, 5, 5, 5, 4],
+                                              [7, 7, 9, 9, 5],
+                                              [7, 9, 8, 9, 7]]), output)
+        # non-separable footprint should not allow mode sequence
+        with assert_raises(RuntimeError):
+            ndimage.maximum_filter(array, footprint=footprint,
+                                   mode=['reflect', 'reflect'])
+
+    def test_maximum_filter08(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.maximum_filter(array, footprint=footprint, origin=-1)
+        assert_array_almost_equal(xp.asarray([[7, 9, 9, 5, 5],
+                                              [9, 8, 9, 7, 5],
+                                              [8, 8, 7, 7, 7]]), output)
+
+    def test_maximum_filter09(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.maximum_filter(array, footprint=footprint,
+                                        origin=[-1, 0])
+        assert_array_almost_equal(xp.asarray([[7, 7, 9, 9, 5],
+                                              [7, 9, 8, 9, 7],
+                                              [8, 8, 8, 7, 7]]), output)
+
+    @pytest.mark.parametrize(
+        'axes', tuple(itertools.combinations(range(-3, 3), 2))
+    )
+    @pytest.mark.parametrize(
+        'filter_func, kwargs',
+        [(ndimage.minimum_filter, {}),
+         (ndimage.maximum_filter, {}),
+         (ndimage.median_filter, {}),
+         (ndimage.rank_filter, dict(rank=3)),
+         (ndimage.percentile_filter, dict(percentile=60))]
+    )
+    def test_minmax_nonseparable_axes(self, filter_func, axes, kwargs, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/pull/8339")
+
+        array = xp.arange(6 * 8 * 12, dtype=xp.float32)
+        array = xp.reshape(array, (6, 8, 12))
+        # use 2D triangular footprint because it is non-separable
+        footprint = xp.asarray(np.tri(5))
+        axes = np.asarray(axes)
+
+        if len(set(axes % array.ndim)) != len(axes):
+            # parametrized cases with duplicate axes raise an error
+            with pytest.raises(ValueError):
+                filter_func(array, footprint=footprint, axes=axes, **kwargs)
+            return
+        output = filter_func(array, footprint=footprint, axes=axes, **kwargs)
+
+        missing_axis = tuple(set(range(3)) - set(axes % array.ndim))[0]
+
+        expand_dims = array_namespace(footprint).expand_dims
+        footprint_3d = expand_dims(footprint, axis=missing_axis)
+        expected = filter_func(array, footprint=footprint_3d, **kwargs)
+        xp_assert_close(output, expected)
+
+    def test_rank01(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        output = ndimage.rank_filter(array, 1, size=2)
+        xp_assert_equal(array, output)
+        output = ndimage.percentile_filter(array, 100, size=2)
+        xp_assert_equal(array, output)
+        output = ndimage.median_filter(array, 2)
+        xp_assert_equal(array, output)
+
+    def test_rank02(self, xp):
+        array = xp.asarray([1, 2, 3, 4, 5])
+        output = ndimage.rank_filter(array, 1, size=[3])
+        xp_assert_equal(array, output)
+        output = ndimage.percentile_filter(array, 50, size=3)
+        xp_assert_equal(array, output)
+        output = ndimage.median_filter(array, (3,))
+        xp_assert_equal(array, output)
+
+    def test_rank03(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        output = ndimage.rank_filter(array, 1, size=[2])
+        xp_assert_equal(xp.asarray([3, 3, 5, 5, 4]), output)
+        output = ndimage.percentile_filter(array, 100, size=2)
+        xp_assert_equal(xp.asarray([3, 3, 5, 5, 4]), output)
+
+    def test_rank04(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        expected = xp.asarray([3, 3, 2, 4, 4])
+        output = ndimage.rank_filter(array, 1, size=3)
+        xp_assert_equal(expected, output)
+        output = ndimage.percentile_filter(array, 50, size=3)
+        xp_assert_equal(expected, output)
+        output = ndimage.median_filter(array, size=3)
+        xp_assert_equal(expected, output)
+
+    def test_rank05(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        expected = xp.asarray([3, 3, 2, 4, 4])
+        output = ndimage.rank_filter(array, -2, size=3)
+        xp_assert_equal(expected, output)
+
+    def test_rank06(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]])
+        expected = [[2, 2, 1, 1, 1],
+                    [3, 3, 2, 1, 1],
+                    [5, 5, 3, 3, 1]]
+        expected = xp.asarray(expected)
+        output = ndimage.rank_filter(array, 1, size=[2, 3])
+        xp_assert_equal(expected, output)
+        output = ndimage.percentile_filter(array, 17, size=(2, 3))
+        xp_assert_equal(expected, output)
+
+    @skip_xp_backends("jax.numpy",
+        reason="assignment destination is read-only",
+    )
+    def test_rank06_overlap(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8406")
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]])
+
+        asarray = array_namespace(array).asarray
+        array_copy = asarray(array, copy=True)
+        expected = [[2, 2, 1, 1, 1],
+                    [3, 3, 2, 1, 1],
+                    [5, 5, 3, 3, 1]]
+        expected = xp.asarray(expected)
+        ndimage.rank_filter(array, 1, size=[2, 3], output=array)
+        xp_assert_equal(expected, array)
+
+        ndimage.percentile_filter(array_copy, 17, size=(2, 3),
+                                  output=array_copy)
+        xp_assert_equal(expected, array_copy)
+
+    def test_rank07(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]])
+        expected = [[3, 5, 5, 5, 4],
+                    [5, 5, 7, 5, 4],
+                    [6, 8, 8, 7, 5]]
+        expected = xp.asarray(expected)
+        output = ndimage.rank_filter(array, -2, size=[2, 3])
+        xp_assert_equal(expected, output)
+
+    def test_rank08(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]])
+        expected = [[3, 3, 2, 4, 4],
+                    [5, 5, 5, 4, 4],
+                    [5, 6, 7, 5, 5]]
+        expected = xp.asarray(expected)
+        output = ndimage.percentile_filter(array, 50.0, size=(2, 3))
+        xp_assert_equal(expected, output)
+        output = ndimage.rank_filter(array, 3, size=(2, 3))
+        xp_assert_equal(expected, output)
+        output = ndimage.median_filter(array, size=(2, 3))
+        xp_assert_equal(expected, output)
+
+        # non-separable: does not allow mode sequence
+        with assert_raises(RuntimeError):
+            ndimage.percentile_filter(array, 50.0, size=(2, 3),
+                                      mode=['reflect', 'constant'])
+        with assert_raises(RuntimeError):
+            ndimage.rank_filter(array, 3, size=(2, 3), mode=['reflect']*2)
+        with assert_raises(RuntimeError):
+            ndimage.median_filter(array, size=(2, 3), mode=['reflect']*2)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_rank09(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[3, 3, 2, 4, 4],
+                    [3, 5, 2, 5, 1],
+                    [5, 5, 8, 3, 5]]
+        expected = xp.asarray(expected)
+        footprint = xp.asarray([[1, 0, 1], [0, 1, 0]])
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = ndimage.rank_filter(array, 1, footprint=footprint)
+        assert_array_almost_equal(expected, output)
+        output = ndimage.percentile_filter(array, 35, footprint=footprint)
+        assert_array_almost_equal(expected, output)
+
+    def test_rank10(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        expected = [[2, 2, 1, 1, 1],
+                    [2, 3, 1, 3, 1],
+                    [5, 5, 3, 3, 1]]
+        expected = xp.asarray(expected)
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.rank_filter(array, 0, footprint=footprint)
+        xp_assert_equal(expected, output)
+        output = ndimage.percentile_filter(array, 0.0, footprint=footprint)
+        xp_assert_equal(expected, output)
+
+    def test_rank11(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        expected = [[3, 5, 5, 5, 4],
+                    [7, 7, 9, 9, 5],
+                    [7, 9, 8, 9, 7]]
+        expected = xp.asarray(expected)
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.rank_filter(array, -1, footprint=footprint)
+        xp_assert_equal(expected, output)
+        output = ndimage.percentile_filter(array, 100.0, footprint=footprint)
+        xp_assert_equal(expected, output)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_rank12(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        expected = [[3, 3, 2, 4, 4],
+                    [3, 5, 2, 5, 1],
+                    [5, 5, 8, 3, 5]]
+        expected = xp.asarray(expected, dtype=dtype)
+        footprint = xp.asarray([[1, 0, 1], [0, 1, 0]])
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = ndimage.rank_filter(array, 1, footprint=footprint)
+        assert_array_almost_equal(expected, output)
+        output = ndimage.percentile_filter(array, 50.0,
+                                           footprint=footprint)
+        xp_assert_equal(expected, output)
+        output = ndimage.median_filter(array, footprint=footprint)
+        xp_assert_equal(expected, output)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_rank13(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        expected = [[5, 2, 5, 1, 1],
+                    [5, 8, 3, 5, 5],
+                    [6, 6, 5, 5, 5]]
+        expected = xp.asarray(expected, dtype=dtype)
+        footprint = xp.asarray([[1, 0, 1], [0, 1, 0]])
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = ndimage.rank_filter(array, 1, footprint=footprint,
+                                     origin=-1)
+        xp_assert_equal(expected, output)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_rank14(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        expected = [[3, 5, 2, 5, 1],
+                    [5, 5, 8, 3, 5],
+                    [5, 6, 6, 5, 5]]
+        expected = xp.asarray(expected, dtype=dtype)
+        footprint = xp.asarray([[1, 0, 1], [0, 1, 0]])
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = ndimage.rank_filter(array, 1, footprint=footprint,
+                                     origin=[-1, 0])
+        xp_assert_equal(expected, output)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_rank15(self, dtype, xp):
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, dtype)
+        expected = [[2, 3, 1, 4, 1],
+                    [5, 3, 7, 1, 1],
+                    [5, 5, 3, 3, 3]]
+        expected = xp.asarray(expected, dtype=dtype)
+        footprint = xp.asarray([[1, 0, 1], [0, 1, 0]])
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [5, 8, 3, 7, 1],
+                            [5, 6, 9, 3, 5]], dtype=dtype)
+        output = ndimage.rank_filter(array, 0, footprint=footprint,
+                                     origin=[-1, 0])
+        xp_assert_equal(expected, output)
+
+    def test_rank16(self, xp):
+        # test that lists are accepted and interpreted as numpy arrays
+        array = [3, 2, 5, 1, 4]
+        # expected values are: median(3, 2, 5) = 3, median(2, 5, 1) = 2, etc
+        expected = np.asarray([3, 3, 2, 4, 4])
+        output = ndimage.rank_filter(array, -2, size=3)
+        xp_assert_equal(expected, output)
+
+    def test_rank17(self, xp):
+        array = xp.asarray([3, 2, 5, 1, 4])
+        if not hasattr(array, 'flags'):
+            return
+        array.flags.writeable = False
+        expected = xp.asarray([3, 3, 2, 4, 4])
+        output = ndimage.rank_filter(array, -2, size=3)
+        xp_assert_equal(expected, output)
+
+    def test_rank18(self, xp):
+        # module 'array_api_strict' has no attribute 'float16'
+        tested_dtypes = ['int8', 'int16', 'int32', 'int64', 'float32', 'float64',
+                         'uint8', 'uint16', 'uint32', 'uint64']
+        for dtype_str in tested_dtypes:
+            dtype = getattr(xp, dtype_str)
+            x = xp.asarray([3, 2, 5, 1, 4], dtype=dtype)
+            y = ndimage.rank_filter(x, -2, size=3)
+            assert y.dtype == x.dtype
+
+    def test_rank19(self, xp):
+        # module 'array_api_strict' has no attribute 'float16'
+        tested_dtypes = ['int8', 'int16', 'int32', 'int64', 'float32', 'float64',
+                         'uint8', 'uint16', 'uint32', 'uint64']
+        for dtype_str in tested_dtypes:
+            dtype = getattr(xp, dtype_str)
+            x = xp.asarray([[3, 2, 5, 1, 4], [3, 2, 5, 1, 4]], dtype=dtype)
+            y = ndimage.rank_filter(x, -2, size=3)
+            assert y.dtype == x.dtype
+
+    @skip_xp_backends(np_only=True, reason="off-by-ones on alt backends")
+    @pytest.mark.parametrize('dtype', types)
+    def test_generic_filter1d01(self, dtype, xp):
+        weights = xp.asarray([1.1, 2.2, 3.3])
+
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not support extra_arguments")
+
+        def _filter_func(input, output, fltr, total):
+            fltr = fltr / total
+            for ii in range(input.shape[0] - 2):
+                output[ii] = input[ii] * fltr[0]
+                output[ii] += input[ii + 1] * fltr[1]
+                output[ii] += input[ii + 2] * fltr[2]
+        a = np.arange(12, dtype=dtype).reshape(3, 4)
+        a = xp.asarray(a)
+        dtype = getattr(xp, dtype)
+
+        r1 = ndimage.correlate1d(a, weights / xp.sum(weights), 0, origin=-1)
+        r2 = ndimage.generic_filter1d(
+            a, _filter_func, 3, axis=0, origin=-1,
+            extra_arguments=(weights,),
+            extra_keywords={'total': xp.sum(weights)})
+        assert_array_almost_equal(r1, r2)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_generic_filter01(self, dtype, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not support extra_arguments")
+        if is_torch(xp) and dtype in ("uint16", "uint32", "uint64"):
+            pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype_str = dtype
+        dtype = getattr(xp, dtype_str)
+
+        filter_ = xp.asarray([[1.0, 2.0], [3.0, 4.0]])
+        footprint = xp.asarray([[1.0, 0.0], [0.0, 1.0]])
+        cf = xp.asarray([1., 4.])
+
+        def _filter_func(buffer, weights, total=1.0):
+            weights = np.asarray(cf) / np.asarray(total)
+            return np.sum(buffer * weights)
+
+        a = np.arange(12, dtype=dtype_str).reshape(3, 4)
+        a = xp.asarray(a)
+        r1 = ndimage.correlate(a, filter_ * footprint)
+        if dtype_str in float_types:
+            r1 /= 5
+        else:
+            r1 //= 5
+        r2 = ndimage.generic_filter(
+            a, _filter_func, footprint=footprint, extra_arguments=(cf,),
+            extra_keywords={'total': xp.sum(cf)})
+        assert_array_almost_equal(r1, r2)
+
+        # generic_filter doesn't allow mode sequence
+        with assert_raises(RuntimeError):
+            r2 = ndimage.generic_filter(
+                a, _filter_func, mode=['reflect', 'reflect'],
+                footprint=footprint, extra_arguments=(cf,),
+                extra_keywords={'total': xp.sum(cf)})
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [1, 1, 2]),
+         ('wrap', [3, 1, 2]),
+         ('reflect', [1, 1, 2]),
+         ('mirror', [2, 1, 2]),
+         ('constant', [0, 1, 2])]
+    )
+    def test_extend01(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([1, 0])
+        output = ndimage.correlate1d(array, weights, 0, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [1, 1, 1]),
+         ('wrap', [3, 1, 2]),
+         ('reflect', [3, 3, 2]),
+         ('mirror', [1, 2, 3]),
+         ('constant', [0, 0, 0])]
+    )
+    def test_extend02(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([1, 0, 0, 0, 0, 0, 0, 0])
+        output = ndimage.correlate1d(array, weights, 0, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [2, 3, 3]),
+         ('wrap', [2, 3, 1]),
+         ('reflect', [2, 3, 3]),
+         ('mirror', [2, 3, 2]),
+         ('constant', [2, 3, 0])]
+    )
+    def test_extend03(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([0, 0, 1])
+        output = ndimage.correlate1d(array, weights, 0, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [3, 3, 3]),
+         ('wrap', [2, 3, 1]),
+         ('reflect', [2, 1, 1]),
+         ('mirror', [1, 2, 3]),
+         ('constant', [0, 0, 0])]
+    )
+    def test_extend04(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([0, 0, 0, 0, 0, 0, 0, 0, 1])
+        output = ndimage.correlate1d(array, weights, 0, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [[1, 1, 2], [1, 1, 2], [4, 4, 5]]),
+         ('wrap', [[9, 7, 8], [3, 1, 2], [6, 4, 5]]),
+         ('reflect', [[1, 1, 2], [1, 1, 2], [4, 4, 5]]),
+         ('mirror', [[5, 4, 5], [2, 1, 2], [5, 4, 5]]),
+         ('constant', [[0, 0, 0], [0, 1, 2], [0, 4, 5]])]
+    )
+    def test_extend05(self, mode, expected_value, xp):
+        array = xp.asarray([[1, 2, 3],
+                            [4, 5, 6],
+                            [7, 8, 9]])
+        weights = xp.asarray([[1, 0], [0, 0]])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [[5, 6, 6], [8, 9, 9], [8, 9, 9]]),
+         ('wrap', [[5, 6, 4], [8, 9, 7], [2, 3, 1]]),
+         ('reflect', [[5, 6, 6], [8, 9, 9], [8, 9, 9]]),
+         ('mirror', [[5, 6, 5], [8, 9, 8], [5, 6, 5]]),
+         ('constant', [[5, 6, 0], [8, 9, 0], [0, 0, 0]])]
+    )
+    def test_extend06(self, mode, expected_value, xp):
+        array = xp.asarray([[1, 2, 3],
+                          [4, 5, 6],
+                          [7, 8, 9]])
+        weights = xp.asarray([[0, 0, 0], [0, 0, 0], [0, 0, 1]])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [3, 3, 3]),
+         ('wrap', [2, 3, 1]),
+         ('reflect', [2, 1, 1]),
+         ('mirror', [1, 2, 3]),
+         ('constant', [0, 0, 0])]
+    )
+    def test_extend07(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([0, 0, 0, 0, 0, 0, 0, 0, 1])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [[3], [3], [3]]),
+         ('wrap', [[2], [3], [1]]),
+         ('reflect', [[2], [1], [1]]),
+         ('mirror', [[1], [2], [3]]),
+         ('constant', [[0], [0], [0]])]
+    )
+    def test_extend08(self, mode, expected_value, xp):
+        array = xp.asarray([[1], [2], [3]])
+        weights = xp.asarray([[0], [0], [0], [0], [0], [0], [0], [0], [1]])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [3, 3, 3]),
+         ('wrap', [2, 3, 1]),
+         ('reflect', [2, 1, 1]),
+         ('mirror', [1, 2, 3]),
+         ('constant', [0, 0, 0])]
+    )
+    def test_extend09(self, mode, expected_value, xp):
+        array = xp.asarray([1, 2, 3])
+        weights = xp.asarray([0, 0, 0, 0, 0, 0, 0, 0, 1])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [[3], [3], [3]]),
+         ('wrap', [[2], [3], [1]]),
+         ('reflect', [[2], [1], [1]]),
+         ('mirror', [[1], [2], [3]]),
+         ('constant', [[0], [0], [0]])]
+    )
+    def test_extend10(self, mode, expected_value, xp):
+        array = xp.asarray([[1], [2], [3]])
+        weights = xp.asarray([[0], [0], [0], [0], [0], [0], [0], [0], [1]])
+        output = ndimage.correlate(array, weights, mode=mode, cval=0)
+        expected_value = xp.asarray(expected_value)
+        xp_assert_equal(output, expected_value)
+
+
+def test_ticket_701(xp):
+    if is_cupy(xp):
+        pytest.xfail("CuPy raises a TypeError.")
+
+    # Test generic filter sizes
+    arr = xp.asarray(np.arange(4).reshape(2, 2))
+    def func(x):
+        return np.min(x)  # NB: np.min not xp.min for callables
+    res = ndimage.generic_filter(arr, func, size=(1, 1))
+    # The following raises an error unless ticket 701 is fixed
+    res2 = ndimage.generic_filter(arr, func, size=1)
+    xp_assert_equal(res, res2)
+
+
+def test_gh_5430():
+    # At least one of these raises an error unless gh-5430 is
+    # fixed. In py2k an int is implemented using a C long, so
+    # which one fails depends on your system. In py3k there is only
+    # one arbitrary precision integer type, so both should fail.
+    sigma = np.int32(1)
+    out = ndimage._ni_support._normalize_sequence(sigma, 1)
+    assert out == [sigma]
+    sigma = np.int64(1)
+    out = ndimage._ni_support._normalize_sequence(sigma, 1)
+    assert out == [sigma]
+    # This worked before; make sure it still works
+    sigma = 1
+    out = ndimage._ni_support._normalize_sequence(sigma, 1)
+    assert out == [sigma]
+    # This worked before; make sure it still works
+    sigma = [1, 1]
+    out = ndimage._ni_support._normalize_sequence(sigma, 2)
+    assert out == sigma
+    # Also include the OPs original example to make sure we fixed the issue
+    x = np.random.normal(size=(256, 256))
+    perlin = np.zeros_like(x)
+    for i in 2**np.arange(6):
+        perlin += ndimage.gaussian_filter(x, i, mode="wrap") * i**2
+    # This also fixes gh-4106, show that the OPs example now runs.
+    x = np.int64(21)
+    ndimage._ni_support._normalize_sequence(x, 0)
+
+
+def test_gaussian_kernel1d(xp):
+    if is_cupy(xp):
+        pytest.skip("This test tests a private scipy utility.")
+    radius = 10
+    sigma = 2
+    sigma2 = sigma * sigma
+    x = np.arange(-radius, radius + 1, dtype=np.float64)
+    x = xp.asarray(x)
+    phi_x = xp.exp(-0.5 * x * x / sigma2)
+    phi_x /= xp.sum(phi_x)
+    xp_assert_close(phi_x,
+                    xp.asarray(_gaussian_kernel1d(sigma, 0, radius)))
+    xp_assert_close(-phi_x * x / sigma2,
+                    xp.asarray(_gaussian_kernel1d(sigma, 1, radius)))
+    xp_assert_close(phi_x * (x * x / sigma2 - 1) / sigma2,
+                    xp.asarray(_gaussian_kernel1d(sigma, 2, radius)))
+    xp_assert_close(phi_x * (3 - x * x / sigma2) * x / (sigma2 * sigma2),
+                    xp.asarray(_gaussian_kernel1d(sigma, 3, radius)))
+
+
+def test_orders_gauss(xp):
+    # Check order inputs to Gaussians
+    arr = xp.zeros((1,))
+    xp_assert_equal(ndimage.gaussian_filter(arr, 1, order=0), xp.asarray([0.]))
+    xp_assert_equal(ndimage.gaussian_filter(arr, 1, order=3), xp.asarray([0.]))
+    assert_raises(ValueError, ndimage.gaussian_filter, arr, 1, -1)
+    xp_assert_equal(ndimage.gaussian_filter1d(arr, 1, axis=-1, order=0),
+                    xp.asarray([0.]))
+    xp_assert_equal(ndimage.gaussian_filter1d(arr, 1, axis=-1, order=3),
+                    xp.asarray([0.]))
+    assert_raises(ValueError, ndimage.gaussian_filter1d, arr, 1, -1, -1)
+
+
+def test_valid_origins(xp):
+    """Regression test for #1311."""
+    if is_cupy(xp):
+        pytest.xfail("CuPy raises a TypeError.")
+
+    def func(x):
+        return xp.mean(x)
+    data = xp.asarray([1, 2, 3, 4, 5], dtype=xp.float64)
+    assert_raises(ValueError, ndimage.generic_filter, data, func, size=3,
+                  origin=2)
+    assert_raises(ValueError, ndimage.generic_filter1d, data, func,
+                  filter_size=3, origin=2)
+    assert_raises(ValueError, ndimage.percentile_filter, data, 0.2, size=3,
+                  origin=2)
+
+    for filter in [ndimage.uniform_filter, ndimage.minimum_filter,
+                   ndimage.maximum_filter, ndimage.maximum_filter1d,
+                   ndimage.median_filter, ndimage.minimum_filter1d]:
+        # This should work, since for size == 3, the valid range for origin is
+        # -1 to 1.
+        list(filter(data, 3, origin=-1))
+        list(filter(data, 3, origin=1))
+        # Just check this raises an error instead of silently accepting or
+        # segfaulting.
+        assert_raises(ValueError, filter, data, 3, origin=2)
+
+
+def test_bad_convolve_and_correlate_origins(xp):
+    """Regression test for gh-822."""
+    # Before gh-822 was fixed, these would generate seg. faults or
+    # other crashes on many system.
+    assert_raises(ValueError, ndimage.correlate1d,
+                  [0, 1, 2, 3, 4, 5], [1, 1, 2, 0], origin=2)
+    assert_raises(ValueError, ndimage.correlate,
+                  [0, 1, 2, 3, 4, 5], [0, 1, 2], origin=[2])
+    assert_raises(ValueError, ndimage.correlate,
+                  xp.ones((3, 5)), xp.ones((2, 2)), origin=[0, 1])
+
+    assert_raises(ValueError, ndimage.convolve1d,
+                  xp.arange(10), xp.ones(3), origin=-2)
+    assert_raises(ValueError, ndimage.convolve,
+                  xp.arange(10), xp.ones(3), origin=[-2])
+    assert_raises(ValueError, ndimage.convolve,
+                  xp.ones((3, 5)), xp.ones((2, 2)), origin=[0, -2])
+
+@skip_xp_backends("cupy",
+                  reason="https://github.com/cupy/cupy/pull/8430",
+)
+def test_multiple_modes(xp):
+    # Test that the filters with multiple mode capabilities for different
+    # dimensions give the same result as applying a single mode.
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    mode1 = 'reflect'
+    mode2 = ['reflect', 'reflect']
+
+    xp_assert_equal(ndimage.gaussian_filter(arr, 1, mode=mode1),
+                 ndimage.gaussian_filter(arr, 1, mode=mode2))
+    xp_assert_equal(ndimage.prewitt(arr, mode=mode1),
+                 ndimage.prewitt(arr, mode=mode2))
+    xp_assert_equal(ndimage.sobel(arr, mode=mode1),
+                 ndimage.sobel(arr, mode=mode2))
+    xp_assert_equal(ndimage.laplace(arr, mode=mode1),
+                 ndimage.laplace(arr, mode=mode2))
+    xp_assert_equal(ndimage.gaussian_laplace(arr, 1, mode=mode1),
+                 ndimage.gaussian_laplace(arr, 1, mode=mode2))
+    xp_assert_equal(ndimage.maximum_filter(arr, size=5, mode=mode1),
+                 ndimage.maximum_filter(arr, size=5, mode=mode2))
+    xp_assert_equal(ndimage.minimum_filter(arr, size=5, mode=mode1),
+                 ndimage.minimum_filter(arr, size=5, mode=mode2))
+    xp_assert_equal(ndimage.gaussian_gradient_magnitude(arr, 1, mode=mode1),
+                 ndimage.gaussian_gradient_magnitude(arr, 1, mode=mode2))
+    xp_assert_equal(ndimage.uniform_filter(arr, 5, mode=mode1),
+                 ndimage.uniform_filter(arr, 5, mode=mode2))
+
+
+@skip_xp_backends("cupy", reason="https://github.com/cupy/cupy/pull/8430")
+@skip_xp_backends("jax.numpy", reason="output array is read-only.")
+def test_multiple_modes_sequentially(xp):
+    # Test that the filters with multiple mode capabilities for different
+    # dimensions give the same result as applying the filters with
+    # different modes sequentially
+    arr = xp.asarray([[1., 0., 0.],
+                    [1., 1., 0.],
+                    [0., 0., 0.]])
+
+    modes = ['reflect', 'wrap']
+
+    expected = ndimage.gaussian_filter1d(arr, 1, axis=0, mode=modes[0])
+    expected = ndimage.gaussian_filter1d(expected, 1, axis=1, mode=modes[1])
+    xp_assert_equal(expected,
+                 ndimage.gaussian_filter(arr, 1, mode=modes))
+
+    expected = ndimage.uniform_filter1d(arr, 5, axis=0, mode=modes[0])
+    expected = ndimage.uniform_filter1d(expected, 5, axis=1, mode=modes[1])
+    xp_assert_equal(expected,
+                 ndimage.uniform_filter(arr, 5, mode=modes))
+
+    expected = ndimage.maximum_filter1d(arr, size=5, axis=0, mode=modes[0])
+    expected = ndimage.maximum_filter1d(expected, size=5, axis=1,
+                                        mode=modes[1])
+    xp_assert_equal(expected,
+                 ndimage.maximum_filter(arr, size=5, mode=modes))
+
+    expected = ndimage.minimum_filter1d(arr, size=5, axis=0, mode=modes[0])
+    expected = ndimage.minimum_filter1d(expected, size=5, axis=1,
+                                        mode=modes[1])
+    xp_assert_equal(expected,
+                 ndimage.minimum_filter(arr, size=5, mode=modes))
+
+
+def test_multiple_modes_prewitt(xp):
+    # Test prewitt filter for multiple extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[1., -3., 2.],
+                           [1., -2., 1.],
+                           [1., -1., 0.]])
+
+    modes = ['reflect', 'wrap']
+
+    xp_assert_equal(expected,
+                 ndimage.prewitt(arr, mode=modes))
+
+
+def test_multiple_modes_sobel(xp):
+    # Test sobel filter for multiple extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[1., -4., 3.],
+                           [2., -3., 1.],
+                           [1., -1., 0.]])
+
+    modes = ['reflect', 'wrap']
+
+    xp_assert_equal(expected,
+                 ndimage.sobel(arr, mode=modes))
+
+
+def test_multiple_modes_laplace(xp):
+    # Test laplace filter for multiple extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[-2., 2., 1.],
+                           [-2., -3., 2.],
+                           [1., 1., 0.]])
+
+    modes = ['reflect', 'wrap']
+
+    xp_assert_equal(expected,
+                 ndimage.laplace(arr, mode=modes))
+
+
+def test_multiple_modes_gaussian_laplace(xp):
+    # Test gaussian_laplace filter for multiple extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[-0.28438687, 0.01559809, 0.19773499],
+                           [-0.36630503, -0.20069774, 0.07483620],
+                           [0.15849176, 0.18495566, 0.21934094]])
+
+    modes = ['reflect', 'wrap']
+
+    assert_almost_equal(expected,
+                        ndimage.gaussian_laplace(arr, 1, mode=modes))
+
+
+def test_multiple_modes_gaussian_gradient_magnitude(xp):
+    # Test gaussian_gradient_magnitude filter for multiple
+    # extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[0.04928965, 0.09745625, 0.06405368],
+                           [0.23056905, 0.14025305, 0.04550846],
+                           [0.19894369, 0.14950060, 0.06796850]])
+
+    modes = ['reflect', 'wrap']
+
+    calculated = ndimage.gaussian_gradient_magnitude(arr, 1, mode=modes)
+
+    assert_almost_equal(expected, calculated)
+
+@skip_xp_backends("cupy",
+                  reason="https://github.com/cupy/cupy/pull/8430",
+)
+def test_multiple_modes_uniform(xp):
+    # Test uniform filter for multiple extrapolation modes
+    arr = xp.asarray([[1., 0., 0.],
+                      [1., 1., 0.],
+                      [0., 0., 0.]])
+
+    expected = xp.asarray([[0.32, 0.40, 0.48],
+                           [0.20, 0.28, 0.32],
+                           [0.28, 0.32, 0.40]])
+
+    modes = ['reflect', 'wrap']
+
+    assert_almost_equal(expected,
+                        ndimage.uniform_filter(arr, 5, mode=modes))
+
+
+def _count_nonzero(arr):
+    # XXX: a simplified count_nonzero replacement; replace once
+    # https://github.com/data-apis/array-api/pull/803/ is in
+
+    # this assumes arr.dtype == xp.bool
+    xp = array_namespace(arr)
+    return xp.sum(xp.astype(arr, xp.int8))
+
+
+def test_gaussian_truncate(xp):
+    # Test that Gaussian filters can be truncated at different widths.
+    # These tests only check that the result has the expected number
+    # of nonzero elements.
+    arr = np.zeros((100, 100), dtype=np.float64)
+    arr[50, 50] = 1
+    arr = xp.asarray(arr)
+    num_nonzeros_2 = _count_nonzero(ndimage.gaussian_filter(arr, 5, truncate=2) > 0)
+    assert num_nonzeros_2 == 21**2
+
+    num_nonzeros_5 = _count_nonzero(
+        ndimage.gaussian_filter(arr, 5, truncate=5) > 0
+    )
+    assert num_nonzeros_5 == 51**2
+
+    nnz_kw = {'as_tuple': True} if is_torch(xp) else {}
+
+    # Test truncate when sigma is a sequence.
+    f = ndimage.gaussian_filter(arr, [0.5, 2.5], truncate=3.5)
+    fpos = f > 0
+    n0 = _count_nonzero(xp.any(fpos, axis=0))
+    assert n0 == 19
+    n1 = _count_nonzero(xp.any(fpos, axis=1))
+    assert n1 == 5
+
+    # Test gaussian_filter1d.
+    x = np.zeros(51)
+    x[25] = 1
+    x = xp.asarray(x)
+    f = ndimage.gaussian_filter1d(x, sigma=2, truncate=3.5)
+    n = _count_nonzero(f > 0)
+    assert n == 15
+
+    # Test gaussian_laplace
+    y = ndimage.gaussian_laplace(x, sigma=2, truncate=3.5)
+    nonzero_indices = xp.nonzero(y != 0, **nnz_kw)[0]
+
+    n = xp.max(nonzero_indices) - xp.min(nonzero_indices) + 1
+    assert n == 15
+
+    # Test gaussian_gradient_magnitude
+    y = ndimage.gaussian_gradient_magnitude(x, sigma=2, truncate=3.5)
+    nonzero_indices = xp.nonzero(y != 0, **nnz_kw)[0]
+    n = xp.max(nonzero_indices) - xp.min(nonzero_indices) + 1
+    assert n == 15
+
+
+def test_gaussian_radius(xp):
+    if is_cupy(xp):
+        pytest.xfail("https://github.com/cupy/cupy/issues/8402")
+
+    # Test that Gaussian filters with radius argument produce the same
+    # results as the filters with corresponding truncate argument.
+    # radius = int(truncate * sigma + 0.5)
+    # Test gaussian_filter1d
+    x = np.zeros(7)
+    x[3] = 1
+    x = xp.asarray(x)
+    f1 = ndimage.gaussian_filter1d(x, sigma=2, truncate=1.5)
+    f2 = ndimage.gaussian_filter1d(x, sigma=2, radius=3)
+    xp_assert_equal(f1, f2)
+
+    # Test gaussian_filter when sigma is a number.
+    a = np.zeros((9, 9))
+    a[4, 4] = 1
+    a = xp.asarray(a)
+    f1 = ndimage.gaussian_filter(a, sigma=0.5, truncate=3.5)
+    f2 = ndimage.gaussian_filter(a, sigma=0.5, radius=2)
+    xp_assert_equal(f1, f2)
+
+    # Test gaussian_filter when sigma is a sequence.
+    a = np.zeros((50, 50))
+    a[25, 25] = 1
+    a = xp.asarray(a)
+    f1 = ndimage.gaussian_filter(a, sigma=[0.5, 2.5], truncate=3.5)
+    f2 = ndimage.gaussian_filter(a, sigma=[0.5, 2.5], radius=[2, 9])
+    xp_assert_equal(f1, f2)
+
+
+def test_gaussian_radius_invalid(xp):
+    if is_cupy(xp):
+        pytest.xfail("https://github.com/cupy/cupy/issues/8402")
+
+    # radius must be a nonnegative integer
+    with assert_raises(ValueError):
+        ndimage.gaussian_filter1d(xp.zeros(8), sigma=1, radius=-1)
+    with assert_raises(ValueError):
+        ndimage.gaussian_filter1d(xp.zeros(8), sigma=1, radius=1.1)
+
+
+@skip_xp_backends("jax.numpy", reason="output array is read-only")
+class TestThreading:
+    def check_func_thread(self, n, fun, args, out):
+        from threading import Thread
+        thrds = [Thread(target=fun, args=args, kwargs={'output': out[x, ...]})
+                 for x in range(n)]
+        [t.start() for t in thrds]
+        [t.join() for t in thrds]
+
+    def check_func_serial(self, n, fun, args, out):
+        for i in range(n):
+            fun(*args, output=out[i, ...])
+
+    def test_correlate1d(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("XXX thread exception; cannot repro outside of pytest")
+
+        d = np.random.randn(5000)
+        os = np.empty((4, d.size))
+        ot = np.empty_like(os)
+        d = xp.asarray(d)
+        os = xp.asarray(os)
+        ot = xp.asarray(ot)
+        k = xp.arange(5)
+        self.check_func_serial(4, ndimage.correlate1d, (d, k), os)
+        self.check_func_thread(4, ndimage.correlate1d, (d, k), ot)
+        xp_assert_equal(os, ot)
+
+    def test_correlate(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("XXX thread exception; cannot repro outside of pytest")
+
+        d = xp.asarray(np.random.randn(500, 500))
+        k = xp.asarray(np.random.randn(10, 10))
+        os = xp.empty([4] + list(d.shape))
+        ot = xp.empty_like(os)
+        self.check_func_serial(4, ndimage.correlate, (d, k), os)
+        self.check_func_thread(4, ndimage.correlate, (d, k), ot)
+        xp_assert_equal(os, ot)
+
+    def test_median_filter(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("XXX thread exception; cannot repro outside of pytest")
+
+        d = xp.asarray(np.random.randn(500, 500))
+        os = xp.empty([4] + list(d.shape))
+        ot = xp.empty_like(os)
+        self.check_func_serial(4, ndimage.median_filter, (d, 3), os)
+        self.check_func_thread(4, ndimage.median_filter, (d, 3), ot)
+        xp_assert_equal(os, ot)
+
+    def test_uniform_filter1d(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("XXX thread exception; cannot repro outside of pytest")
+
+        d = np.random.randn(5000)
+        os = np.empty((4, d.size))
+        ot = np.empty_like(os)
+        d = xp.asarray(d)
+        os = xp.asarray(os)
+        ot = xp.asarray(ot)
+        self.check_func_serial(4, ndimage.uniform_filter1d, (d, 5), os)
+        self.check_func_thread(4, ndimage.uniform_filter1d, (d, 5), ot)
+        xp_assert_equal(os, ot)
+
+    def test_minmax_filter(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("XXX thread exception; cannot repro outside of pytest")
+
+        d = xp.asarray(np.random.randn(500, 500))
+        os = xp.empty([4] + list(d.shape))
+        ot = xp.empty_like(os)
+        self.check_func_serial(4, ndimage.maximum_filter, (d, 3), os)
+        self.check_func_thread(4, ndimage.maximum_filter, (d, 3), ot)
+        xp_assert_equal(os, ot)
+        self.check_func_serial(4, ndimage.minimum_filter, (d, 3), os)
+        self.check_func_thread(4, ndimage.minimum_filter, (d, 3), ot)
+        xp_assert_equal(os, ot)
+
+
+def test_minmaximum_filter1d(xp):
+    # Regression gh-3898
+    in_ = xp.arange(10)
+    out = ndimage.minimum_filter1d(in_, 1)
+    xp_assert_equal(in_, out)
+    out = ndimage.maximum_filter1d(in_, 1)
+    xp_assert_equal(in_, out)
+    # Test reflect
+    out = ndimage.minimum_filter1d(in_, 5, mode='reflect')
+    xp_assert_equal(xp.asarray([0, 0, 0, 1, 2, 3, 4, 5, 6, 7]), out)
+    out = ndimage.maximum_filter1d(in_, 5, mode='reflect')
+    xp_assert_equal(xp.asarray([2, 3, 4, 5, 6, 7, 8, 9, 9, 9]), out)
+    # Test constant
+    out = ndimage.minimum_filter1d(in_, 5, mode='constant', cval=-1)
+    xp_assert_equal(xp.asarray([-1, -1, 0, 1, 2, 3, 4, 5, -1, -1]), out)
+    out = ndimage.maximum_filter1d(in_, 5, mode='constant', cval=10)
+    xp_assert_equal(xp.asarray([10, 10, 4, 5, 6, 7, 8, 9, 10, 10]), out)
+    # Test nearest
+    out = ndimage.minimum_filter1d(in_, 5, mode='nearest')
+    xp_assert_equal(xp.asarray([0, 0, 0, 1, 2, 3, 4, 5, 6, 7]), out)
+    out = ndimage.maximum_filter1d(in_, 5, mode='nearest')
+    xp_assert_equal(xp.asarray([2, 3, 4, 5, 6, 7, 8, 9, 9, 9]), out)
+    # Test wrap
+    out = ndimage.minimum_filter1d(in_, 5, mode='wrap')
+    xp_assert_equal(xp.asarray([0, 0, 0, 1, 2, 3, 4, 5, 0, 0]), out)
+    out = ndimage.maximum_filter1d(in_, 5, mode='wrap')
+    xp_assert_equal(xp.asarray([9, 9, 4, 5, 6, 7, 8, 9, 9, 9]), out)
+
+
+def test_uniform_filter1d_roundoff_errors(xp):
+    if is_cupy(xp):
+        pytest.xfail("https://github.com/cupy/cupy/issues/8401")
+    # gh-6930
+    in_ = np.repeat([0, 1, 0], [9, 9, 9])
+    in_ = xp.asarray(in_)
+
+    for filter_size in range(3, 10):
+        out = ndimage.uniform_filter1d(in_, filter_size)
+        xp_assert_equal(xp.sum(out), xp.asarray(10 - filter_size), check_0d=False)
+
+
+def test_footprint_all_zeros(xp):
+    # regression test for gh-6876: footprint of all zeros segfaults
+    arr = xp.asarray(np.random.randint(0, 100, (100, 100)))
+    kernel = xp.asarray(np.zeros((3, 3), dtype=bool))
+    with assert_raises(ValueError):
+        ndimage.maximum_filter(arr, footprint=kernel)
+
+
+def test_gaussian_filter(xp):
+    if is_cupy(xp):
+        pytest.xfail("CuPy does not raise")
+
+    if not hasattr(xp, "float16"):
+        pytest.xfail(f"{xp} does not have float16")
+
+    # Test gaussian filter with xp.float16
+    # gh-8207
+    data = xp.asarray([1], dtype=xp.float16)
+    sigma = 1.0
+    with assert_raises(RuntimeError):
+        ndimage.gaussian_filter(data, sigma)
+
+
+def test_rank_filter_noninteger_rank(xp):
+    if is_cupy(xp):
+        pytest.xfail("CuPy does not raise")
+
+    # regression test for issue 9388: ValueError for
+    # non integer rank when performing rank_filter
+    arr = xp.asarray(np.random.random((10, 20, 30)))
+    footprint = xp.asarray(np.ones((1, 1, 10), dtype=bool))
+    assert_raises(TypeError, ndimage.rank_filter, arr, 0.5,
+                  footprint=footprint)
+
+
+def test_size_footprint_both_set(xp):
+    # test for input validation, expect user warning when
+    # size and footprint is set
+    with suppress_warnings() as sup:
+        sup.filter(UserWarning,
+                   "ignoring size because footprint is set")
+        arr = xp.asarray(np.random.random((10, 20, 30)))
+        footprint = xp.asarray(np.ones((1, 1, 10), dtype=bool))
+        ndimage.rank_filter(
+            arr, 5, size=2, footprint=footprint
+        )
+
+
+@skip_xp_backends(np_only=True, reason='byteorder is numpy-specific')
+def test_byte_order_median(xp):
+    """Regression test for #413: median_filter does not handle bytes orders."""
+    a = xp.arange(9, dtype='1 makes sense too
+     (3,
+      np.array([0.25266576, 0.30958242, 0.27894721, 0.27894721, 0.27894721, 0.30445588,
+                0.31442572, 0.30445588, 0.18015438, 0.14831921, 0.18015438, 0.25754605,
+                0.32910465, 0.25754605, 0.17736568, 0.17736568, 0.09089549, 0.22183391,
+                0.25266576, 0.30958242]),
+     ),
+     (15,
+      np.array([0.27894721, 0.25266576, 0.25266576, 0.25266576, 0.27894721, 0.27894721,
+                0.27894721, 0.27894721, 0.25754605, 0.25754605, 0.22183391, 0.22183391,
+                0.25266576, 0.25266576, 0.22183391, 0.22183391, 0.25266576, 0.25266576,
+                0.25754605, 0.25754605]),
+     ),
+])
+def test_gh_22250(filter_size, exp):
+    rng = np.random.default_rng(42)
+    image = np.zeros((20,))
+    noisy_image = image + 0.4 * rng.random(image.shape)
+    result = ndimage.median_filter(noisy_image, size=filter_size, mode='wrap')
+    assert_allclose(result, exp)
+
+
+def test_gh_22333():
+    x = np.array([272, 58, 67, 163, 463, 608, 87, 108, 1378])
+    expected = [58, 67, 87, 108, 163, 108, 108, 108, 87]
+    actual = ndimage.median_filter(x, size=9, mode='constant')
+    assert_array_equal(actual, expected)
+
+
+@given(x=npst.arrays(dtype=np.float64,
+                     shape=st.integers(min_value=1, max_value=1000)),
+       size=st.integers(min_value=1, max_value=50),
+       mode=st.sampled_from(["constant", "mirror", "wrap", "reflect",
+                             "nearest"]),
+      )
+def test_gh_22586_crash_property(x, size, mode):
+    # property-based test for median_filter resilience to hard crashing
+    ndimage.median_filter(x, size=size, mode=mode)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_fourier.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_fourier.py
new file mode 100644
index 0000000000000000000000000000000000000000..be544eaab9ce00b2e9802cf8f9a4819c4f1d2731
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_fourier.py
@@ -0,0 +1,189 @@
+import math
+import numpy as np
+
+from scipy._lib._array_api import (
+    xp_assert_equal,
+    assert_array_almost_equal,
+    assert_almost_equal,
+    is_cupy,
+)
+
+import pytest
+
+from scipy import ndimage
+
+from scipy.conftest import array_api_compatible
+skip_xp_backends = pytest.mark.skip_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy'],)]
+
+
+@skip_xp_backends('jax.numpy', reason="jax-ml/jax#23827")
+class TestNdimageFourier:
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15), (1, 10)])
+    @pytest.mark.parametrize('dtype, dec', [("float32", 6), ("float64", 14)])
+    def test_fourier_gaussian_real01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.rfft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_gaussian(a, [5.0, 2.5], shape[0], 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.irfft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(a), xp.asarray(1), decimal=dec,
+                            check_0d=False)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])
+    @pytest.mark.parametrize('dtype, dec', [("complex64", 6), ("complex128", 14)])
+    def test_fourier_gaussian_complex01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.fft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_gaussian(a, [5.0, 2.5], -1, 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.ifft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(xp.real(a)), xp.asarray(1.0), decimal=dec,
+                            check_0d=False)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15), (1, 10)])
+    @pytest.mark.parametrize('dtype, dec', [("float32", 6), ("float64", 14)])
+    def test_fourier_uniform_real01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.rfft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_uniform(a, [5.0, 2.5], shape[0], 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.irfft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(a), xp.asarray(1.0), decimal=dec,
+                            check_0d=False)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])
+    @pytest.mark.parametrize('dtype, dec', [("complex64", 6), ("complex128", 14)])
+    def test_fourier_uniform_complex01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.fft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_uniform(a, [5.0, 2.5], -1, 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.ifft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(xp.real(a)), xp.asarray(1.0), decimal=dec,
+                            check_0d=False)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])
+    @pytest.mark.parametrize('dtype, dec', [("float32", 4), ("float64", 11)])
+    def test_fourier_shift_real01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        expected = np.arange(shape[0] * shape[1], dtype=dtype).reshape(shape)
+        expected = xp.asarray(expected)
+
+        a = fft.rfft(expected, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_shift(a, [1, 1], shape[0], 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.irfft(a, n=shape[0], axis=0)
+        assert_array_almost_equal(a[1:, 1:], expected[:-1, :-1], decimal=dec)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])
+    @pytest.mark.parametrize('dtype, dec', [("complex64", 4), ("complex128", 11)])
+    def test_fourier_shift_complex01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        expected = np.arange(shape[0] * shape[1], dtype=dtype).reshape(shape)
+        expected = xp.asarray(expected)
+
+        a = fft.fft(expected, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_shift(a, [1, 1], -1, 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.ifft(a, n=shape[0], axis=0)
+        assert_array_almost_equal(xp.real(a)[1:, 1:], expected[:-1, :-1], decimal=dec)
+        assert_array_almost_equal(xp.imag(a), xp.zeros(shape), decimal=dec)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15), (1, 10)])
+    @pytest.mark.parametrize('dtype, dec', [("float32", 5), ("float64", 14)])
+    def test_fourier_ellipsoid_real01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.rfft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_ellipsoid(a, [5.0, 2.5], shape[0], 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.irfft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(a), xp.asarray(1.0), decimal=dec,
+                            check_0d=False)
+
+    @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])
+    @pytest.mark.parametrize('dtype, dec', [("complex64", 5), ("complex128", 14)])
+    def test_fourier_ellipsoid_complex01(self, shape, dtype, dec, xp):
+        fft = getattr(xp, 'fft')
+
+        a = np.zeros(shape, dtype=dtype)
+        a[0, 0] = 1.0
+        a = xp.asarray(a)
+
+        a = fft.fft(a, n=shape[0], axis=0)
+        a = fft.fft(a, n=shape[1], axis=1)
+        a = ndimage.fourier_ellipsoid(a, [5.0, 2.5], -1, 0)
+        a = fft.ifft(a, n=shape[1], axis=1)
+        a = fft.ifft(a, n=shape[0], axis=0)
+        assert_almost_equal(ndimage.sum(xp.real(a)), xp.asarray(1.0), decimal=dec,
+                            check_0d=False)
+
+    def test_fourier_ellipsoid_unimplemented_ndim(self, xp):
+        # arrays with ndim > 3 raise NotImplementedError
+        x = xp.ones((4, 6, 8, 10), dtype=xp.complex128)
+        with pytest.raises(NotImplementedError):
+            ndimage.fourier_ellipsoid(x, 3)
+
+    def test_fourier_ellipsoid_1d_complex(self, xp):
+        # expected result of 1d ellipsoid is the same as for fourier_uniform
+        for shape in [(32, ), (31, )]:
+            for type_, dec in zip([xp.complex64, xp.complex128], [5, 14]):
+                x = xp.ones(shape, dtype=type_)
+                a = ndimage.fourier_ellipsoid(x, 5, -1, 0)
+                b = ndimage.fourier_uniform(x, 5, -1, 0)
+                assert_array_almost_equal(a, b, decimal=dec)
+
+    @pytest.mark.parametrize('shape', [(0, ), (0, 10), (10, 0)])
+    @pytest.mark.parametrize('dtype', ["float32", "float64",
+                                       "complex64", "complex128"])
+    @pytest.mark.parametrize('test_func',
+                             [ndimage.fourier_ellipsoid,
+                              ndimage.fourier_gaussian,
+                              ndimage.fourier_uniform])
+    def test_fourier_zero_length_dims(self, shape, dtype, test_func, xp):
+        if is_cupy(xp):
+           if (test_func.__name__ == "fourier_ellipsoid" and
+               math.prod(shape) == 0):
+               pytest.xfail(
+                   "CuPy's fourier_ellipsoid does not accept size==0 arrays"
+               )
+        dtype = getattr(xp, dtype)
+        a = xp.ones(shape, dtype=dtype)
+        b = test_func(a, 3)
+        xp_assert_equal(a, b)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_interpolation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_interpolation.py
new file mode 100644
index 0000000000000000000000000000000000000000..51e8441e244f46642a07102e297b4d72513514d0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_interpolation.py
@@ -0,0 +1,1484 @@
+import sys
+
+import numpy as np
+from numpy.testing import suppress_warnings
+from scipy._lib._array_api import (
+    xp_assert_equal, xp_assert_close,
+    assert_array_almost_equal,
+)
+from scipy._lib._array_api import is_cupy, is_jax, _asarray, array_namespace
+
+import pytest
+from pytest import raises as assert_raises
+import scipy.ndimage as ndimage
+
+from . import types
+
+from scipy.conftest import array_api_compatible
+skip_xp_backends = pytest.mark.skip_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy'],)]
+
+
+eps = 1e-12
+
+ndimage_to_numpy_mode = {
+    'mirror': 'reflect',
+    'reflect': 'symmetric',
+    'grid-mirror': 'symmetric',
+    'grid-wrap': 'wrap',
+    'nearest': 'edge',
+    'grid-constant': 'constant',
+}
+
+
+class TestBoundaries:
+
+    @skip_xp_backends("cupy", reason="CuPy does not have geometric_transform")
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [1.5, 2.5, 3.5, 4, 4, 4, 4]),
+         ('wrap', [1.5, 2.5, 3.5, 1.5, 2.5, 3.5, 1.5]),
+         ('grid-wrap', [1.5, 2.5, 3.5, 2.5, 1.5, 2.5, 3.5]),
+         ('mirror', [1.5, 2.5, 3.5, 3.5, 2.5, 1.5, 1.5]),
+         ('reflect', [1.5, 2.5, 3.5, 4, 3.5, 2.5, 1.5]),
+         ('constant', [1.5, 2.5, 3.5, -1, -1, -1, -1]),
+         ('grid-constant', [1.5, 2.5, 3.5, 1.5, -1, -1, -1])]
+    )
+    def test_boundaries(self, mode, expected_value, xp):
+        def shift(x):
+            return (x[0] + 0.5,)
+
+        data = xp.asarray([1, 2, 3, 4.])
+        xp_assert_equal(
+            ndimage.geometric_transform(data, shift, cval=-1, mode=mode,
+                                        output_shape=(7,), order=1),
+            xp.asarray(expected_value))
+
+    @skip_xp_backends("cupy", reason="CuPy does not have geometric_transform")
+    @pytest.mark.parametrize(
+        'mode, expected_value',
+        [('nearest', [1, 1, 2, 3]),
+         ('wrap', [3, 1, 2, 3]),
+         ('grid-wrap', [4, 1, 2, 3]),
+         ('mirror', [2, 1, 2, 3]),
+         ('reflect', [1, 1, 2, 3]),
+         ('constant', [-1, 1, 2, 3]),
+         ('grid-constant', [-1, 1, 2, 3])]
+    )
+    def test_boundaries2(self, mode, expected_value, xp):
+        def shift(x):
+            return (x[0] - 0.9,)
+
+        data = xp.asarray([1, 2, 3, 4])
+        xp_assert_equal(
+            ndimage.geometric_transform(data, shift, cval=-1, mode=mode,
+                                        output_shape=(4,)),
+            xp.asarray(expected_value))
+
+    @pytest.mark.parametrize('mode', ['mirror', 'reflect', 'grid-mirror',
+                                      'grid-wrap', 'grid-constant',
+                                      'nearest'])
+    @pytest.mark.parametrize('order', range(6))
+    def test_boundary_spline_accuracy(self, mode, order, xp):
+        """Tests based on examples from gh-2640"""
+        if (is_jax(xp) and
+            (mode not in ['mirror', 'reflect', 'constant', 'wrap', 'nearest']
+             or order > 1)
+        ):
+            pytest.xfail("Jax does not support grid- modes or order > 1")
+
+        np_data = np.arange(-6, 7, dtype=np.float64)
+        data = xp.asarray(np_data)
+        x = xp.asarray(np.linspace(-8, 15, num=1000))
+        newaxis = array_namespace(x).newaxis
+        y = ndimage.map_coordinates(data, x[newaxis, ...], order=order, mode=mode)
+
+        # compute expected value using explicit padding via np.pad
+        npad = 32
+        pad_mode = ndimage_to_numpy_mode.get(mode)
+        padded = xp.asarray(np.pad(np_data, npad, mode=pad_mode))
+        coords = xp.asarray(npad + x)[newaxis, ...]
+        expected = ndimage.map_coordinates(padded, coords, order=order, mode=mode)
+
+        atol = 1e-5 if mode == 'grid-constant' else 1e-12
+        xp_assert_close(y, expected, rtol=1e-7, atol=atol)
+
+
+@pytest.mark.parametrize('order', range(2, 6))
+@pytest.mark.parametrize('dtype', types)
+class TestSpline:
+
+    def test_spline01(self, dtype, order, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([], dtype=dtype)
+        out = ndimage.spline_filter(data, order=order)
+        assert out == xp.asarray(1, dtype=out.dtype)
+
+    def test_spline02(self, dtype, order, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([1], dtype=dtype)
+        out = ndimage.spline_filter(data, order=order)
+        assert_array_almost_equal(out, xp.asarray([1]))
+
+    @skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+    def test_spline03(self, dtype, order, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([], dtype=dtype)
+        out = ndimage.spline_filter(data, order, output=dtype)
+        assert out == xp.asarray(1, dtype=out.dtype)
+
+    def test_spline04(self, dtype, order, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([4], dtype=dtype)
+        out = ndimage.spline_filter(data, order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1]))
+
+    def test_spline05(self, dtype, order, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([4, 4], dtype=dtype)
+        out = ndimage.spline_filter(data, order=order)
+        expected = xp.asarray([[1, 1, 1, 1],
+                               [1, 1, 1, 1],
+                               [1, 1, 1, 1],
+                               [1, 1, 1, 1]])
+        assert_array_almost_equal(out, expected)
+
+
+@skip_xp_backends("cupy", reason="CuPy does not have geometric_transform")
+@pytest.mark.parametrize('order', range(0, 6))
+class TestGeometricTransform:
+
+    def test_geometric_transform01(self, order, xp):
+        data = xp.asarray([1])
+
+        def mapping(x):
+            return x
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        assert_array_almost_equal(out, xp.asarray([1], dtype=out.dtype))
+
+    def test_geometric_transform02(self, order, xp):
+        data = xp.ones([4])
+
+        def mapping(x):
+            return x
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1], dtype=out.dtype))
+
+    def test_geometric_transform03(self, order, xp):
+        data = xp.ones([4])
+
+        def mapping(x):
+            return (x[0] - 1,)
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 1, 1], dtype=out.dtype))
+
+    def test_geometric_transform04(self, order, xp):
+        data = xp.asarray([4, 1, 3, 2])
+
+        def mapping(x):
+            return (x[0] - 1,)
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 4, 1, 3], dtype=out.dtype))
+
+    @pytest.mark.parametrize('dtype', ["float64", "complex128"])
+    def test_geometric_transform05(self, order, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[1, 1, 1, 1],
+                           [1, 1, 1, 1],
+                           [1, 1, 1, 1]], dtype=dtype)
+        expected = xp.asarray([[0, 1, 1, 1],
+                               [0, 1, 1, 1],
+                               [0, 1, 1, 1]], dtype=dtype)
+
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+            expected -= 1j * expected
+
+        def mapping(x):
+            return (x[0], x[1] - 1)
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        assert_array_almost_equal(out, expected)
+
+    def test_geometric_transform06(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+
+        def mapping(x):
+            return (x[0], x[1] - 1)
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        expected = xp.asarray([[0, 4, 1, 3],
+                               [0, 7, 6, 8],
+                               [0, 3, 5, 3]], dtype=out.dtype)
+        assert_array_almost_equal(out, expected)
+
+    def test_geometric_transform07(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+
+        def mapping(x):
+            return (x[0] - 1, x[1])
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [4, 1, 3, 2],
+                               [7, 6, 8, 5]], dtype=out.dtype)
+        assert_array_almost_equal(out, expected)
+
+    def test_geometric_transform08(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+
+        def mapping(x):
+            return (x[0] - 1, x[1] - 1)
+
+        out = ndimage.geometric_transform(data, mapping, data.shape,
+                                          order=order)
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [0, 4, 1, 3],
+                               [0, 7, 6, 8]], dtype=out.dtype)
+        assert_array_almost_equal(out, expected)
+
+    def test_geometric_transform10(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+
+        def mapping(x):
+            return (x[0] - 1, x[1] - 1)
+
+        if (order > 1):
+            filtered = ndimage.spline_filter(data, order=order)
+        else:
+            filtered = data
+        out = ndimage.geometric_transform(filtered, mapping, data.shape,
+                                          order=order, prefilter=False)
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [0, 4, 1, 3],
+                               [0, 7, 6, 8]], dtype=out.dtype)
+        assert_array_almost_equal(out, expected)
+
+    def test_geometric_transform13(self, order, xp):
+        data = xp.ones([2], dtype=xp.float64)
+
+        def mapping(x):
+            return (x[0] // 2,)
+
+        out = ndimage.geometric_transform(data, mapping, [4], order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1], dtype=out.dtype))
+
+    def test_geometric_transform14(self, order, xp):
+        data = xp.asarray([1, 5, 2, 6, 3, 7, 4, 4])
+
+        def mapping(x):
+            return (2 * x[0],)
+
+        out = ndimage.geometric_transform(data, mapping, [4], order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 2, 3, 4], dtype=out.dtype))
+
+    def test_geometric_transform15(self, order, xp):
+        data = [1, 2, 3, 4]
+
+        def mapping(x):
+            return (x[0] / 2,)
+
+        out = ndimage.geometric_transform(data, mapping, [8], order=order)
+        assert_array_almost_equal(out[::2], [1, 2, 3, 4])
+
+    def test_geometric_transform16(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9.0, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0], x[1] * 2)
+
+        out = ndimage.geometric_transform(data, mapping, (3, 2),
+                                          order=order)
+        assert_array_almost_equal(out, [[1, 3], [5, 7], [9, 11]])
+
+    def test_geometric_transform17(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0] * 2, x[1])
+
+        out = ndimage.geometric_transform(data, mapping, (1, 4),
+                                          order=order)
+        assert_array_almost_equal(out, [[1, 2, 3, 4]])
+
+    def test_geometric_transform18(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0] * 2, x[1] * 2)
+
+        out = ndimage.geometric_transform(data, mapping, (1, 2),
+                                          order=order)
+        assert_array_almost_equal(out, [[1, 3]])
+
+    def test_geometric_transform19(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0], x[1] / 2)
+
+        out = ndimage.geometric_transform(data, mapping, (3, 8),
+                                          order=order)
+        assert_array_almost_equal(out[..., ::2], data)
+
+    def test_geometric_transform20(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0] / 2, x[1])
+
+        out = ndimage.geometric_transform(data, mapping, (6, 4),
+                                          order=order)
+        assert_array_almost_equal(out[::2, ...], data)
+
+    def test_geometric_transform21(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (x[0] / 2, x[1] / 2)
+
+        out = ndimage.geometric_transform(data, mapping, (6, 8),
+                                          order=order)
+        assert_array_almost_equal(out[::2, ::2], data)
+
+    def test_geometric_transform22(self, order, xp):
+        data = xp.asarray([[1, 2, 3, 4],
+                           [5, 6, 7, 8],
+                           [9, 10, 11, 12]], dtype=xp.float64)
+
+        def mapping1(x):
+            return (x[0] / 2, x[1] / 2)
+
+        def mapping2(x):
+            return (x[0] * 2, x[1] * 2)
+
+        out = ndimage.geometric_transform(data, mapping1,
+                                          (6, 8), order=order)
+        out = ndimage.geometric_transform(out, mapping2,
+                                          (3, 4), order=order)
+        assert_array_almost_equal(out, data)
+
+    def test_geometric_transform23(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x):
+            return (1, x[0] * 2)
+
+        out = ndimage.geometric_transform(data, mapping, (2,), order=order)
+        out = out.astype(np.int32)
+        assert_array_almost_equal(out, [5, 7])
+
+    def test_geometric_transform24(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+
+        def mapping(x, a, b):
+            return (a, x[0] * b)
+
+        out = ndimage.geometric_transform(
+            data, mapping, (2,), order=order, extra_arguments=(1,),
+            extra_keywords={'b': 2})
+        assert_array_almost_equal(out, [5, 7])
+
+
+@skip_xp_backends("cupy", reason="CuPy does not have geometric_transform")
+class TestGeometricTransformExtra:
+
+    def test_geometric_transform_grid_constant_order1(self, xp):
+
+        # verify interpolation outside the original bounds
+        x = xp.asarray([[1, 2, 3],
+                        [4, 5, 6]], dtype=xp.float64)
+
+        def mapping(x):
+            return (x[0] - 0.5), (x[1] - 0.5)
+
+        expected_result = xp.asarray([[0.25, 0.75, 1.25],
+                                      [1.25, 3.00, 4.00]])
+        assert_array_almost_equal(
+            ndimage.geometric_transform(x, mapping, mode='grid-constant',
+                                        order=1),
+            expected_result,
+        )
+
+    @pytest.mark.parametrize('mode', ['grid-constant', 'grid-wrap', 'nearest',
+                                      'mirror', 'reflect'])
+    @pytest.mark.parametrize('order', range(6))
+    def test_geometric_transform_vs_padded(self, order, mode, xp):
+
+        def mapping(x):
+            return (x[0] - 0.4), (x[1] + 2.3)
+
+        # Manually pad and then extract center after the transform to get the
+        # expected result.
+        x = np.arange(144, dtype=float).reshape(12, 12)
+        npad = 24
+        pad_mode = ndimage_to_numpy_mode.get(mode)
+        x_padded = np.pad(x, npad, mode=pad_mode)
+
+        x = xp.asarray(x)
+        x_padded = xp.asarray(x_padded)
+
+        center_slice = tuple([slice(npad, -npad)] * x.ndim)
+        expected_result = ndimage.geometric_transform(
+            x_padded, mapping, mode=mode, order=order)[center_slice]
+
+        xp_assert_close(
+            ndimage.geometric_transform(x, mapping, mode=mode,
+                                        order=order),
+            expected_result,
+            rtol=1e-7,
+        )
+
+    @skip_xp_backends(np_only=True, reason='endianness is numpy-specific')
+    def test_geometric_transform_endianness_with_output_parameter(self, xp):
+        # geometric transform given output ndarray or dtype with
+        # non-native endianness. see issue #4127
+        data = np.asarray([1])
+
+        def mapping(x):
+            return x
+
+        for out in [data.dtype, data.dtype.newbyteorder(),
+                    np.empty_like(data),
+                    np.empty_like(data).astype(data.dtype.newbyteorder())]:
+            returned = ndimage.geometric_transform(data, mapping, data.shape,
+                                                   output=out)
+            result = out if returned is None else returned
+            assert_array_almost_equal(result, [1])
+
+    @skip_xp_backends(np_only=True, reason='string `output` is numpy-specific')
+    def test_geometric_transform_with_string_output(self, xp):
+        data = xp.asarray([1])
+
+        def mapping(x):
+            return x
+
+        out = ndimage.geometric_transform(data, mapping, output='f')
+        assert out.dtype is np.dtype('f')
+        assert_array_almost_equal(out, [1])
+
+
+class TestMapCoordinates:
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('dtype', [np.float64, np.complex128])
+    def test_map_coordinates01(self, order, dtype, xp):
+        if is_jax(xp) and order > 1:
+            pytest.xfail("jax map_coordinates requires order <= 1")
+
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [0, 4, 1, 3],
+                               [0, 7, 6, 8]])
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data = data - 1j * data
+            expected = expected - 1j * expected
+
+        idx = np.indices(data.shape)
+        idx -= 1
+        idx = xp.asarray(idx)
+
+        out = ndimage.map_coordinates(data, idx, order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_map_coordinates02(self, order, xp):
+        if is_jax(xp):
+            if order > 1:
+               pytest.xfail("jax map_coordinates requires order <= 1")
+            if order == 1:
+               pytest.xfail("output differs. jax bug?")
+
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        idx = np.indices(data.shape, np.float64)
+        idx -= 0.5
+        idx = xp.asarray(idx)
+
+        out1 = ndimage.shift(data, 0.5, order=order)
+        out2 = ndimage.map_coordinates(data, idx, order=order)
+        assert_array_almost_equal(out1, out2)
+
+    @skip_xp_backends("jax.numpy", reason="`order` is required in jax")
+    def test_map_coordinates03(self, xp):
+        data = _asarray([[4, 1, 3, 2],
+                         [7, 6, 8, 5],
+                         [3, 5, 3, 6]], order='F', xp=xp)
+        idx = np.indices(data.shape) - 1
+        idx = xp.asarray(idx)
+        out = ndimage.map_coordinates(data, idx)
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [0, 4, 1, 3],
+                               [0, 7, 6, 8]])
+        assert_array_almost_equal(out, expected)
+        assert_array_almost_equal(out, ndimage.shift(data, (1, 1)))
+
+        idx = np.indices(data[::2, ...].shape) - 1
+        idx = xp.asarray(idx)
+        out = ndimage.map_coordinates(data[::2, ...], idx)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [0, 4, 1, 3]]))
+        assert_array_almost_equal(out, ndimage.shift(data[::2, ...], (1, 1)))
+
+        idx = np.indices(data[:, ::2].shape) - 1
+        idx = xp.asarray(idx)
+        out = ndimage.map_coordinates(data[:, ::2], idx)
+        assert_array_almost_equal(out, xp.asarray([[0, 0], [0, 4], [0, 7]]))
+        assert_array_almost_equal(out, ndimage.shift(data[:, ::2], (1, 1)))
+
+    @skip_xp_backends(np_only=True)
+    def test_map_coordinates_endianness_with_output_parameter(self, xp):
+        # output parameter given as array or dtype with either endianness
+        # see issue #4127
+        # NB: NumPy-only
+
+        data = np.asarray([[1, 2], [7, 6]])
+        expected = np.asarray([[0, 0], [0, 1]])
+        idx = np.indices(data.shape)
+        idx -= 1
+        for out in [
+            data.dtype,
+            data.dtype.newbyteorder(),
+            np.empty_like(expected),
+            np.empty_like(expected).astype(expected.dtype.newbyteorder())
+        ]:
+            returned = ndimage.map_coordinates(data, idx, output=out)
+            result = out if returned is None else returned
+            assert_array_almost_equal(result, expected)
+
+    @skip_xp_backends(np_only=True, reason='string `output` is numpy-specific')
+    def test_map_coordinates_with_string_output(self, xp):
+        data = xp.asarray([[1]])
+        idx = np.indices(data.shape)
+        idx = xp.asarray(idx)
+        out = ndimage.map_coordinates(data, idx, output='f')
+        assert out.dtype is np.dtype('f')
+        assert_array_almost_equal(out, xp.asarray([[1]]))
+
+    @pytest.mark.skipif('win32' in sys.platform or np.intp(0).itemsize < 8,
+                        reason='do not run on 32 bit or windows '
+                               '(no sparse memory)')
+    def test_map_coordinates_large_data(self, xp):
+        # check crash on large data
+        try:
+            n = 30000
+            # a = xp.reshape(xp.empty(n**2, dtype=xp.float32), (n, n))
+            a = np.empty(n**2, dtype=np.float32).reshape(n, n)
+            # fill the part we might read
+            a[n - 3:, n - 3:] = 0
+            ndimage.map_coordinates(
+                xp.asarray(a), xp.asarray([[n - 1.5], [n - 1.5]]), order=1
+            )
+        except MemoryError as e:
+            raise pytest.skip('Not enough memory available') from e
+
+
+class TestAffineTransform:
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform01(self, order, xp):
+        data = xp.asarray([1])
+        out = ndimage.affine_transform(data, xp.asarray([[1]]), order=order)
+        assert_array_almost_equal(out, xp.asarray([1]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform02(self, order, xp):
+        data = xp.ones([4])
+        out = ndimage.affine_transform(data, xp.asarray([[1]]), order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform03(self, order, xp):
+        data = xp.ones([4])
+        out = ndimage.affine_transform(data, xp.asarray([[1]]), -1, order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 1, 1]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform04(self, order, xp):
+        data = xp.asarray([4, 1, 3, 2])
+        out = ndimage.affine_transform(data, xp.asarray([[1]]), -1, order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 4, 1, 3]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('dtype', ["float64", "complex128"])
+    def test_affine_transform05(self, order, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[1, 1, 1, 1],
+                           [1, 1, 1, 1],
+                           [1, 1, 1, 1]], dtype=dtype)
+        expected = xp.asarray([[0, 1, 1, 1],
+                               [0, 1, 1, 1],
+                               [0, 1, 1, 1]], dtype=dtype)
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+            expected -= 1j * expected
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0], [0, 1]]),
+                                       [0, -1], order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform06(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0], [0, 1]]),
+                                       [0, -1], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 4, 1, 3],
+                                                   [0, 7, 6, 8],
+                                                   [0, 3, 5, 3]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform07(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0], [0, 1]]),
+                                       [-1, 0], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [4, 1, 3, 2],
+                                                   [7, 6, 8, 5]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform08(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0], [0, 1]]),
+                                       [-1, -1], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [0, 4, 1, 3],
+                                                   [0, 7, 6, 8]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform09(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        if (order > 1):
+            filtered = ndimage.spline_filter(data, order=order)
+        else:
+            filtered = data
+        out = ndimage.affine_transform(filtered, xp.asarray([[1, 0], [0, 1]]),
+                                       [-1, -1], order=order,
+                                       prefilter=False)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [0, 4, 1, 3],
+                                                   [0, 7, 6, 8]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform10(self, order, xp):
+        data = xp.ones([2], dtype=xp.float64)
+        out = ndimage.affine_transform(data, xp.asarray([[0.5]]), output_shape=(4,),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 0]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform11(self, order, xp):
+        data = xp.asarray([1, 5, 2, 6, 3, 7, 4, 4])
+        out = ndimage.affine_transform(data, xp.asarray([[2]]), 0, (4,), order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 2, 3, 4]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform12(self, order, xp):
+        data = xp.asarray([1, 2, 3, 4])
+        out = ndimage.affine_transform(data, xp.asarray([[0.5]]), 0, (8,), order=order)
+        assert_array_almost_equal(out[::2], xp.asarray([1, 2, 3, 4]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform13(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9.0, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0], [0, 2]]), 0, (3, 2),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([[1, 3], [5, 7], [9, 11]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform14(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[2, 0], [0, 1]]), 0, (1, 4),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([[1, 2, 3, 4]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform15(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[2, 0], [0, 2]]), 0, (1, 2),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([[1, 3]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform16(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[1, 0.0], [0, 0.5]]), 0,
+                                       (3, 8), order=order)
+        assert_array_almost_equal(out[..., ::2], data)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform17(self, order, xp):
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[0.5, 0], [0, 1]]), 0,
+                                       (6, 4), order=order)
+        assert_array_almost_equal(out[::2, ...], data)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform18(self, order, xp):
+        data = xp.asarray([[1, 2, 3, 4],
+                           [5, 6, 7, 8],
+                           [9, 10, 11, 12]])
+        out = ndimage.affine_transform(data, xp.asarray([[0.5, 0], [0, 0.5]]), 0,
+                                       (6, 8), order=order)
+        assert_array_almost_equal(out[::2, ::2], data)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform19(self, order, xp):
+        data = xp.asarray([[1, 2, 3, 4],
+                           [5, 6, 7, 8],
+                           [9, 10, 11, 12]], dtype=xp.float64)
+        out = ndimage.affine_transform(data, xp.asarray([[0.5, 0], [0, 0.5]]), 0,
+                                       (6, 8), order=order)
+        out = ndimage.affine_transform(out, xp.asarray([[2.0, 0], [0, 2.0]]), 0,
+                                       (3, 4), order=order)
+        assert_array_almost_equal(out, data)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform20(self, order, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8394")
+
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[0], [2]]), 0, (2,),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 3]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform21(self, order, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8394")
+
+        data = [[1, 2, 3, 4],
+                [5, 6, 7, 8],
+                [9, 10, 11, 12]]
+        data = xp.asarray(data)
+        out = ndimage.affine_transform(data, xp.asarray([[2], [0]]), 0, (2,),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 9]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform22(self, order, xp):
+        # shift and offset interaction; see issue #1547
+        data = xp.asarray([4, 1, 3, 2])
+        out = ndimage.affine_transform(data, xp.asarray([[2]]), [-1], (3,),
+                                       order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 2]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform23(self, order, xp):
+        # shift and offset interaction; see issue #1547
+        data = xp.asarray([4, 1, 3, 2])
+        out = ndimage.affine_transform(data, xp.asarray([[0.5]]), [-1], (8,),
+                                       order=order)
+        assert_array_almost_equal(out[::2], xp.asarray([0, 4, 1, 3]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform24(self, order, xp):
+        # consistency between diagonal and non-diagonal case; see issue #1547
+        data = xp.asarray([4, 1, 3, 2])
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       'The behavior of affine_transform with a 1-D array .* '
+                       'has changed')
+            out1 = ndimage.affine_transform(data, xp.asarray([2]), -1, order=order)
+        out2 = ndimage.affine_transform(data, xp.asarray([[2]]), -1, order=order)
+        assert_array_almost_equal(out1, out2)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform25(self, order, xp):
+        # consistency between diagonal and non-diagonal case; see issue #1547
+        data = xp.asarray([4, 1, 3, 2])
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       'The behavior of affine_transform with a 1-D array .* '
+                       'has changed')
+            out1 = ndimage.affine_transform(data, xp.asarray([0.5]), -1, order=order)
+        out2 = ndimage.affine_transform(data, xp.asarray([[0.5]]), -1, order=order)
+        assert_array_almost_equal(out1, out2)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform26(self, order, xp):
+        # test homogeneous coordinates
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        if (order > 1):
+            filtered = ndimage.spline_filter(data, order=order)
+        else:
+            filtered = data
+        tform_original = xp.eye(2)
+        offset_original = -xp.ones((2, 1))
+
+        concat = array_namespace(tform_original, offset_original).concat
+        tform_h1 = concat((tform_original, offset_original), axis=1)  # hstack
+        tform_h2 = concat( (tform_h1, xp.asarray([[0.0, 0, 1]])), axis=0)  # vstack
+
+        offs = [float(x) for x in xp.reshape(offset_original, (-1,))]
+
+        out1 = ndimage.affine_transform(filtered, tform_original,
+                                        offs,
+                                        order=order, prefilter=False)
+        out2 = ndimage.affine_transform(filtered, tform_h1, order=order,
+                                        prefilter=False)
+        out3 = ndimage.affine_transform(filtered, tform_h2, order=order,
+                                        prefilter=False)
+        for out in [out1, out2, out3]:
+            assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                       [0, 4, 1, 3],
+                                                       [0, 7, 6, 8]]))
+
+    def test_affine_transform27(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not raise")
+
+        # test valid homogeneous transformation matrix
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        concat = array_namespace(data).concat
+        tform_h1 = concat( (xp.eye(2), -xp.ones((2, 1))) , axis=1)  # vstack
+        tform_h2 = concat((tform_h1, xp.asarray([[5.0, 2, 1]])), axis=0)  # hstack
+
+        assert_raises(ValueError, ndimage.affine_transform, data, tform_h2)
+
+    @skip_xp_backends(np_only=True, reason='byteorder is numpy-specific')
+    def test_affine_transform_1d_endianness_with_output_parameter(self, xp):
+        # 1d affine transform given output ndarray or dtype with
+        # either endianness. see issue #7388
+        data = xp.ones((2, 2))
+        for out in [xp.empty_like(data),
+                    xp.empty_like(data).astype(data.dtype.newbyteorder()),
+                    data.dtype, data.dtype.newbyteorder()]:
+            with suppress_warnings() as sup:
+                sup.filter(UserWarning,
+                           'The behavior of affine_transform with a 1-D array '
+                           '.* has changed')
+                matrix = xp.asarray([1, 1])
+                returned = ndimage.affine_transform(data, matrix, output=out)
+            result = out if returned is None else returned
+            assert_array_almost_equal(result, xp.asarray([[1, 1], [1, 1]]))
+
+    @skip_xp_backends(np_only=True, reason='byteorder is numpy-specific')
+    def test_affine_transform_multi_d_endianness_with_output_parameter(self, xp):
+        # affine transform given output ndarray or dtype with either endianness
+        # see issue #4127
+        # NB: byteorder is numpy-specific
+        data = np.asarray([1])
+        for out in [data.dtype, data.dtype.newbyteorder(),
+                    np.empty_like(data),
+                    np.empty_like(data).astype(data.dtype.newbyteorder())]:
+            returned = ndimage.affine_transform(data, np.asarray([[1]]), output=out)
+            result = out if returned is None else returned
+            assert_array_almost_equal(result, np.asarray([1]))
+
+    @skip_xp_backends(np_only=True,
+        reason='`out` of a different size is numpy-specific'
+    )
+    def test_affine_transform_output_shape(self, xp):
+        # don't require output_shape when out of a different size is given
+        data = xp.arange(8, dtype=xp.float64)
+        out = xp.ones((16,))
+
+        ndimage.affine_transform(data, xp.asarray([[1]]), output=out)
+        assert_array_almost_equal(out[:8], data)
+
+        # mismatched output shape raises an error
+        with pytest.raises(RuntimeError):
+            ndimage.affine_transform(
+                data, [[1]], output=out, output_shape=(12,))
+
+    @skip_xp_backends(np_only=True, reason='string `output` is numpy-specific')
+    def test_affine_transform_with_string_output(self, xp):
+        data = xp.asarray([1])
+        out = ndimage.affine_transform(data, xp.asarray([[1]]), output='f')
+        assert out.dtype is np.dtype('f')
+        assert_array_almost_equal(out, xp.asarray([1]))
+
+    @pytest.mark.parametrize('shift',
+                             [(1, 0), (0, 1), (-1, 1), (3, -5), (2, 7)])
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform_shift_via_grid_wrap(self, shift, order, xp):
+        # For mode 'grid-wrap', integer shifts should match np.roll
+        x = np.asarray([[0, 1],
+                        [2, 3]])
+        affine = np.zeros((2, 3))
+        affine[:2, :2] = np.eye(2)
+        affine[:, 2] = np.asarray(shift)
+
+        expected = np.roll(x, shift, axis=(0, 1))
+
+        x = xp.asarray(x)
+        affine = xp.asarray(affine)
+        expected = xp.asarray(expected)
+
+        assert_array_almost_equal(
+            ndimage.affine_transform(x, affine, mode='grid-wrap', order=order),
+            expected
+        )
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_affine_transform_shift_reflect(self, order, xp):
+        # shift by x.shape results in reflection
+        x = np.asarray([[0, 1, 2],
+                        [3, 4, 5]])
+        expected = x[::-1, ::-1].copy()   # strides >0 for torch
+        x = xp.asarray(x)
+        expected = xp.asarray(expected)
+
+        affine = np.zeros([2, 3])
+        affine[:2, :2] = np.eye(2)
+        affine[:, 2] = np.asarray(x.shape)
+        affine = xp.asarray(affine)
+
+        assert_array_almost_equal(
+            ndimage.affine_transform(x, affine, mode='reflect', order=order),
+            expected,
+        )
+
+
+class TestShift:
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift01(self, order, xp):
+        data = xp.asarray([1])
+        out = ndimage.shift(data, [1], order=order)
+        assert_array_almost_equal(out, xp.asarray([0]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift02(self, order, xp):
+        data = xp.ones([4])
+        out = ndimage.shift(data, [1], order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 1, 1]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift03(self, order, xp):
+        data = xp.ones([4])
+        out = ndimage.shift(data, -1, order=order)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 0]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift04(self, order, xp):
+        data = xp.asarray([4, 1, 3, 2])
+        out = ndimage.shift(data, 1, order=order)
+        assert_array_almost_equal(out, xp.asarray([0, 4, 1, 3]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('dtype', ["float64", "complex128"])
+    def test_shift05(self, order, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[1, 1, 1, 1],
+                           [1, 1, 1, 1],
+                           [1, 1, 1, 1]], dtype=dtype)
+        expected = xp.asarray([[0, 1, 1, 1],
+                               [0, 1, 1, 1],
+                               [0, 1, 1, 1]], dtype=dtype)
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+            expected -= 1j * expected
+        out = ndimage.shift(data, [0, 1], order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('mode', ['constant', 'grid-constant'])
+    @pytest.mark.parametrize('dtype', ['float64', 'complex128'])
+    def test_shift_with_nonzero_cval(self, order, mode, dtype, xp):
+        data = np.asarray([[1, 1, 1, 1],
+                           [1, 1, 1, 1],
+                           [1, 1, 1, 1]], dtype=dtype)
+
+        expected = np.asarray([[0, 1, 1, 1],
+                               [0, 1, 1, 1],
+                               [0, 1, 1, 1]], dtype=dtype)
+
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+            expected -= 1j * expected
+        cval = 5.0
+        expected[:, 0] = cval  # specific to shift of [0, 1] used below
+
+        data = xp.asarray(data)
+        expected = xp.asarray(expected)
+        out = ndimage.shift(data, [0, 1], order=order, mode=mode, cval=cval)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift06(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.shift(data, [0, 1], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 4, 1, 3],
+                                                   [0, 7, 6, 8],
+                                                   [0, 3, 5, 3]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift07(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.shift(data, [1, 0], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [4, 1, 3, 2],
+                                                   [7, 6, 8, 5]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift08(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        out = ndimage.shift(data, [1, 1], order=order)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [0, 4, 1, 3],
+                                                   [0, 7, 6, 8]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift09(self, order, xp):
+        data = xp.asarray([[4, 1, 3, 2],
+                           [7, 6, 8, 5],
+                           [3, 5, 3, 6]])
+        if (order > 1):
+            filtered = ndimage.spline_filter(data, order=order)
+        else:
+            filtered = data
+        out = ndimage.shift(filtered, [1, 1], order=order, prefilter=False)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0],
+                                                   [0, 4, 1, 3],
+                                                   [0, 7, 6, 8]]))
+
+    @pytest.mark.parametrize('shift',
+                             [(1, 0), (0, 1), (-1, 1), (3, -5), (2, 7)])
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift_grid_wrap(self, shift, order, xp):
+        # For mode 'grid-wrap', integer shifts should match np.roll
+        x = np.asarray([[0, 1],
+                        [2, 3]])
+        expected = np.roll(x, shift, axis=(0,1))
+
+        x = xp.asarray(x)
+        expected = xp.asarray(expected)
+
+        assert_array_almost_equal(
+            ndimage.shift(x, shift, mode='grid-wrap', order=order),
+            expected
+        )
+
+    @pytest.mark.parametrize('shift',
+                             [(1, 0), (0, 1), (-1, 1), (3, -5), (2, 7)])
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift_grid_constant1(self, shift, order, xp):
+        # For integer shifts, 'constant' and 'grid-constant' should be equal
+        x = xp.reshape(xp.arange(20), (5, 4))
+        assert_array_almost_equal(
+            ndimage.shift(x, shift, mode='grid-constant', order=order),
+            ndimage.shift(x, shift, mode='constant', order=order),
+        )
+
+    def test_shift_grid_constant_order1(self, xp):
+        x = xp.asarray([[1, 2, 3],
+                        [4, 5, 6]], dtype=xp.float64)
+        expected_result = xp.asarray([[0.25, 0.75, 1.25],
+                                      [1.25, 3.00, 4.00]])
+        assert_array_almost_equal(
+            ndimage.shift(x, (0.5, 0.5), mode='grid-constant', order=1),
+            expected_result,
+        )
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_shift_reflect(self, order, xp):
+        # shift by x.shape results in reflection
+        x = np.asarray([[0, 1, 2],
+                        [3, 4, 5]])
+        expected = x[::-1, ::-1].copy()   # strides > 0 for torch
+
+        x = xp.asarray(x)
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(
+            ndimage.shift(x, x.shape, mode='reflect', order=order),
+            expected,
+        )
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('prefilter', [False, True])
+    def test_shift_nearest_boundary(self, order, prefilter, xp):
+        # verify that shifting at least order // 2 beyond the end of the array
+        # gives a value equal to the edge value.
+        x = xp.arange(16)
+        kwargs = dict(mode='nearest', order=order, prefilter=prefilter)
+        assert_array_almost_equal(
+            ndimage.shift(x, order // 2 + 1, **kwargs)[0], x[0],
+        )
+        assert_array_almost_equal(
+            ndimage.shift(x, -order // 2 - 1, **kwargs)[-1], x[-1],
+        )
+
+    @pytest.mark.parametrize('mode', ['grid-constant', 'grid-wrap', 'nearest',
+                                      'mirror', 'reflect'])
+    @pytest.mark.parametrize('order', range(6))
+    def test_shift_vs_padded(self, order, mode, xp):
+        x_np = np.arange(144, dtype=float).reshape(12, 12)
+        shift = (0.4, -2.3)
+
+        # manually pad and then extract center to get expected result
+        npad = 32
+        pad_mode = ndimage_to_numpy_mode.get(mode)
+        x_padded = xp.asarray(np.pad(x_np, npad, mode=pad_mode))
+        x = xp.asarray(x_np)
+
+        center_slice = tuple([slice(npad, -npad)] * x.ndim)
+        expected_result = ndimage.shift(
+            x_padded, shift, mode=mode, order=order)[center_slice]
+
+        xp_assert_close(
+            ndimage.shift(x, shift, mode=mode, order=order),
+            expected_result,
+            rtol=1e-7,
+        )
+
+
+class TestZoom:
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_zoom1(self, order, xp):
+        for z in [2, [2, 2]]:
+            arr = xp.reshape(xp.arange(25, dtype=xp.float64), (5, 5))
+            arr = ndimage.zoom(arr, z, order=order)
+            assert arr.shape == (10, 10)
+            assert xp.all(arr[-1, :] != 0)
+            assert xp.all(arr[-1, :] >= (20 - eps))
+            assert xp.all(arr[0, :] <= (5 + eps))
+            assert xp.all(arr >= (0 - eps))
+            assert xp.all(arr <= (24 + eps))
+
+    def test_zoom2(self, xp):
+        arr = xp.reshape(xp.arange(12), (3, 4))
+        out = ndimage.zoom(ndimage.zoom(arr, 2), 0.5)
+        xp_assert_equal(out, arr)
+
+    def test_zoom3(self, xp):
+        arr = xp.asarray([[1, 2]])
+        out1 = ndimage.zoom(arr, (2, 1))
+        out2 = ndimage.zoom(arr, (1, 2))
+
+        assert_array_almost_equal(out1, xp.asarray([[1, 2], [1, 2]]))
+        assert_array_almost_equal(out2, xp.asarray([[1, 1, 2, 2]]))
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('dtype', ["float64", "complex128"])
+    def test_zoom_affine01(self, order, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[1, 2, 3, 4],
+                           [5, 6, 7, 8],
+                           [9, 10, 11, 12]], dtype=dtype)
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning,
+                       'The behavior of affine_transform with a 1-D array .* '
+                       'has changed')
+            out = ndimage.affine_transform(data, xp.asarray([0.5, 0.5]), 0,
+                                           (6, 8), order=order)
+        assert_array_almost_equal(out[::2, ::2], data)
+
+    def test_zoom_infinity(self, xp):
+        # Ticket #1419 regression test
+        dim = 8
+        ndimage.zoom(xp.zeros((dim, dim)), 1. / dim, mode='nearest')
+
+    def test_zoom_zoomfactor_one(self, xp):
+        # Ticket #1122 regression test
+        arr = xp.zeros((1, 5, 5))
+        zoom = (1.0, 2.0, 2.0)
+
+        out = ndimage.zoom(arr, zoom, cval=7)
+        ref = xp.zeros((1, 10, 10))
+        assert_array_almost_equal(out, ref)
+
+    def test_zoom_output_shape_roundoff(self, xp):
+        arr = xp.zeros((3, 11, 25))
+        zoom = (4.0 / 3, 15.0 / 11, 29.0 / 25)
+        out = ndimage.zoom(arr, zoom)
+        assert out.shape == (4, 15, 29)
+
+    @pytest.mark.parametrize('zoom', [(1, 1), (3, 5), (8, 2), (8, 8)])
+    @pytest.mark.parametrize('mode', ['nearest', 'constant', 'wrap', 'reflect',
+                                      'mirror', 'grid-wrap', 'grid-mirror',
+                                      'grid-constant'])
+    def test_zoom_by_int_order0(self, zoom, mode, xp):
+        # order 0 zoom should be the same as replication via np.kron
+        # Note: This is not True for general x shapes when grid_mode is False,
+        #       but works here for all modes because the size ratio happens to
+        #       always be an integer when x.shape = (2, 2).
+        x_np = np.asarray([[0, 1],
+                           [2, 3]], dtype=np.float64)
+        expected = np.kron(x_np, np.ones(zoom))
+
+        x = xp.asarray(x_np)
+        expected = xp.asarray(expected)
+
+        assert_array_almost_equal(
+            ndimage.zoom(x, zoom, order=0, mode=mode),
+            expected
+        )
+
+    @pytest.mark.parametrize('shape', [(2, 3), (4, 4)])
+    @pytest.mark.parametrize('zoom', [(1, 1), (3, 5), (8, 2), (8, 8)])
+    @pytest.mark.parametrize('mode', ['nearest', 'reflect', 'mirror',
+                                      'grid-wrap', 'grid-constant'])
+    def test_zoom_grid_by_int_order0(self, shape, zoom, mode, xp):
+        # When grid_mode is True,  order 0 zoom should be the same as
+        # replication via np.kron. The only exceptions to this are the
+        # non-grid modes 'constant' and 'wrap'.
+        x_np = np.arange(np.prod(shape), dtype=float).reshape(shape)
+
+        x = xp.asarray(x_np)
+        assert_array_almost_equal(
+            ndimage.zoom(x, zoom, order=0, mode=mode, grid_mode=True),
+            xp.asarray(np.kron(x_np, np.ones(zoom)))
+        )
+
+    @pytest.mark.parametrize('mode', ['constant', 'wrap'])
+    @pytest.mark.thread_unsafe
+    def test_zoom_grid_mode_warnings(self, mode, xp):
+        # Warn on use of non-grid modes when grid_mode is True
+        x = xp.reshape(xp.arange(9, dtype=xp.float64), (3, 3))
+        with pytest.warns(UserWarning,
+                          match="It is recommended to use mode"):
+            ndimage.zoom(x, 2, mode=mode, grid_mode=True),
+
+    @skip_xp_backends(np_only=True, reason='inplace output= is numpy-specific')
+    def test_zoom_output_shape(self, xp):
+        """Ticket #643"""
+        x = xp.reshape(xp.arange(12), (3, 4))
+        ndimage.zoom(x, 2, output=xp.zeros((6, 8)))
+
+    def test_zoom_0d_array(self, xp):
+        # Ticket #21670 regression test
+        a = xp.arange(10.)
+        factor = 2
+        actual = ndimage.zoom(a, np.array(factor))
+        expected = ndimage.zoom(a, factor)
+        xp_assert_close(actual, expected)
+
+
+class TestRotate:
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate01(self, order, xp):
+        data = xp.asarray([[0, 0, 0, 0],
+                           [0, 1, 1, 0],
+                           [0, 0, 0, 0]], dtype=xp.float64)
+        out = ndimage.rotate(data, 0, order=order)
+        assert_array_almost_equal(out, data)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate02(self, order, xp):
+        data = xp.asarray([[0, 0, 0, 0],
+                           [0, 1, 0, 0],
+                           [0, 0, 0, 0]], dtype=xp.float64)
+        expected = xp.asarray([[0, 0, 0],
+                               [0, 0, 0],
+                               [0, 1, 0],
+                               [0, 0, 0]], dtype=xp.float64)
+        out = ndimage.rotate(data, 90, order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    @pytest.mark.parametrize('dtype', ["float64", "complex128"])
+    def test_rotate03(self, order, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[0, 0, 0, 0, 0],
+                           [0, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0]], dtype=dtype)
+        expected = xp.asarray([[0, 0, 0],
+                               [0, 0, 0],
+                               [0, 1, 0],
+                               [0, 1, 0],
+                               [0, 0, 0]], dtype=dtype)
+        isdtype = array_namespace(data).isdtype
+        if isdtype(data.dtype, 'complex floating'):
+            data -= 1j * data
+            expected -= 1j * expected
+        out = ndimage.rotate(data, 90, order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate04(self, order, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0],
+                           [0, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0]], dtype=xp.float64)
+        expected = xp.asarray([[0, 0, 0, 0, 0],
+                               [0, 0, 1, 0, 0],
+                               [0, 0, 1, 0, 0]], dtype=xp.float64)
+        out = ndimage.rotate(data, 90, reshape=False, order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate05(self, order, xp):
+        data = np.empty((4, 3, 3))
+        for i in range(3):
+            data[:, :, i] = np.asarray([[0, 0, 0],
+                                        [0, 1, 0],
+                                        [0, 1, 0],
+                                        [0, 0, 0]], dtype=np.float64)
+        data = xp.asarray(data)
+        expected = xp.asarray([[0, 0, 0, 0],
+                               [0, 1, 1, 0],
+                               [0, 0, 0, 0]], dtype=xp.float64)
+        out = ndimage.rotate(data, 90, order=order)
+        for i in range(3):
+            assert_array_almost_equal(out[:, :, i], expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate06(self, order, xp):
+        data = np.empty((3, 4, 3))
+        for i in range(3):
+            data[:, :, i] = np.asarray([[0, 0, 0, 0],
+                                        [0, 1, 1, 0],
+                                        [0, 0, 0, 0]], dtype=np.float64)
+        data = xp.asarray(data)
+        expected = xp.asarray([[0, 0, 0],
+                               [0, 1, 0],
+                               [0, 1, 0],
+                               [0, 0, 0]], dtype=xp.float64)
+        out = ndimage.rotate(data, 90, order=order)
+        for i in range(3):
+            assert_array_almost_equal(out[:, :, i], expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate07(self, order, xp):
+        data = xp.asarray([[[0, 0, 0, 0, 0],
+                            [0, 1, 1, 0, 0],
+                            [0, 0, 0, 0, 0]]] * 2, dtype=xp.float64)
+        permute_dims = array_namespace(data).permute_dims
+        data = permute_dims(data, (2, 1, 0))
+        expected = xp.asarray([[[0, 0, 0],
+                                [0, 1, 0],
+                                [0, 1, 0],
+                                [0, 0, 0],
+                                [0, 0, 0]]] * 2, dtype=xp.float64)
+        expected = permute_dims(expected, (2, 1, 0))
+        out = ndimage.rotate(data, 90, axes=(0, 1), order=order)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('order', range(0, 6))
+    def test_rotate08(self, order, xp):
+        data = xp.asarray([[[0, 0, 0, 0, 0],
+                            [0, 1, 1, 0, 0],
+                            [0, 0, 0, 0, 0]]] * 2, dtype=xp.float64)
+        permute_dims = array_namespace(data).permute_dims
+        data = permute_dims(data, (2, 1, 0))  # == np.transpose
+        expected = xp.asarray([[[0, 0, 1, 0, 0],
+                                [0, 0, 1, 0, 0],
+                                [0, 0, 0, 0, 0]]] * 2, dtype=xp.float64)
+        permute_dims = array_namespace(data).permute_dims
+        expected = permute_dims(expected, (2, 1, 0))
+        out = ndimage.rotate(data, 90, axes=(0, 1), reshape=False, order=order)
+        assert_array_almost_equal(out, expected)
+
+    def test_rotate09(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0],
+                           [0, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0]] * 2, dtype=xp.float64)
+        with assert_raises(ValueError):
+            ndimage.rotate(data, 90, axes=(0, data.ndim))
+
+    def test_rotate10(self, xp):
+        data = xp.reshape(xp.arange(45, dtype=xp.float64), (3, 5, 3))
+
+	# The output of ndimage.rotate before refactoring
+        expected = xp.asarray([[[0.0, 0.0, 0.0],
+                                [0.0, 0.0, 0.0],
+                                [6.54914793, 7.54914793, 8.54914793],
+                                [10.84520162, 11.84520162, 12.84520162],
+                                [0.0, 0.0, 0.0]],
+                               [[6.19286575, 7.19286575, 8.19286575],
+                                [13.4730712, 14.4730712, 15.4730712],
+                                [21.0, 22.0, 23.0],
+                                [28.5269288, 29.5269288, 30.5269288],
+                                [35.80713425, 36.80713425, 37.80713425]],
+                               [[0.0, 0.0, 0.0],
+                                [31.15479838, 32.15479838, 33.15479838],
+                                [35.45085207, 36.45085207, 37.45085207],
+                                [0.0, 0.0, 0.0],
+                                [0.0, 0.0, 0.0]]], dtype=xp.float64)
+
+        out = ndimage.rotate(data, angle=12, reshape=False)
+        #assert_array_almost_equal(out, expected)
+        xp_assert_close(out, expected, rtol=1e-6, atol=2e-6)
+
+    def test_rotate_exact_180(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("https://github.com/cupy/cupy/issues/8400")
+
+        a = np.tile(xp.arange(5), (5, 1))
+        b = ndimage.rotate(ndimage.rotate(a, 180), -180)
+        xp_assert_equal(a, b)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_measurements.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_measurements.py
new file mode 100644
index 0000000000000000000000000000000000000000..c8175ba309dd223a6d0fd46df017ea1fbc797a4e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_measurements.py
@@ -0,0 +1,1609 @@
+import os
+import os.path
+
+import numpy as np
+from numpy.testing import suppress_warnings
+
+from scipy._lib._array_api import (
+    is_jax,
+    is_torch,
+    array_namespace,
+    xp_assert_equal,
+    xp_assert_close,
+    assert_array_almost_equal,
+    assert_almost_equal,
+)
+
+import pytest
+from pytest import raises as assert_raises
+
+import scipy.ndimage as ndimage
+
+from . import types
+
+from scipy.conftest import array_api_compatible
+skip_xp_backends = pytest.mark.skip_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy'],)]
+
+IS_WINDOWS_AND_NP1 = os.name == 'nt' and np.__version__ < '2'
+
+
+@skip_xp_backends(np_only=True, reason='test internal numpy-only helpers')
+class Test_measurements_stats:
+    """ndimage._measurements._stats() is a utility used by other functions.
+
+        Since internal ndimage/_measurements.py code is NumPy-only,
+        so is this this test class.
+    """
+    def test_a(self, xp):
+        x = [0, 1, 2, 6]
+        labels = [0, 0, 1, 1]
+        index = [0, 1]
+        for shp in [(4,), (2, 2)]:
+            x = np.array(x).reshape(shp)
+            labels = np.array(labels).reshape(shp)
+            counts, sums = ndimage._measurements._stats(
+                x, labels=labels, index=index)
+
+            dtype_arg = {'dtype': np.int64} if IS_WINDOWS_AND_NP1 else {}
+            xp_assert_equal(counts, np.asarray([2, 2], **dtype_arg))
+            xp_assert_equal(sums, np.asarray([1.0, 8.0]))
+
+    def test_b(self, xp):
+        # Same data as test_a, but different labels.  The label 9 exceeds the
+        # length of 'labels', so this test will follow a different code path.
+        x = [0, 1, 2, 6]
+        labels = [0, 0, 9, 9]
+        index = [0, 9]
+        for shp in [(4,), (2, 2)]:
+            x = np.array(x).reshape(shp)
+            labels = np.array(labels).reshape(shp)
+            counts, sums = ndimage._measurements._stats(
+                x, labels=labels, index=index)
+
+            dtype_arg = {'dtype': np.int64} if IS_WINDOWS_AND_NP1 else {}
+            xp_assert_equal(counts, np.asarray([2, 2], **dtype_arg))
+            xp_assert_equal(sums, np.asarray([1.0, 8.0]))
+
+    def test_a_centered(self, xp):
+        x = [0, 1, 2, 6]
+        labels = [0, 0, 1, 1]
+        index = [0, 1]
+        for shp in [(4,), (2, 2)]:
+            x = np.array(x).reshape(shp)
+            labels = np.array(labels).reshape(shp)
+            counts, sums, centers = ndimage._measurements._stats(
+                x, labels=labels, index=index, centered=True)
+
+            dtype_arg = {'dtype': np.int64} if IS_WINDOWS_AND_NP1 else {}
+            xp_assert_equal(counts, np.asarray([2, 2], **dtype_arg))
+            xp_assert_equal(sums, np.asarray([1.0, 8.0]))
+            xp_assert_equal(centers, np.asarray([0.5, 8.0]))
+
+    def test_b_centered(self, xp):
+        x = [0, 1, 2, 6]
+        labels = [0, 0, 9, 9]
+        index = [0, 9]
+        for shp in [(4,), (2, 2)]:
+            x = np.array(x).reshape(shp)
+            labels = np.array(labels).reshape(shp)
+            counts, sums, centers = ndimage._measurements._stats(
+                x, labels=labels, index=index, centered=True)
+
+            dtype_arg = {'dtype': np.int64} if IS_WINDOWS_AND_NP1 else {}
+            xp_assert_equal(counts, np.asarray([2, 2], **dtype_arg))
+            xp_assert_equal(sums, np.asarray([1.0, 8.0]))
+            xp_assert_equal(centers, np.asarray([0.5, 8.0]))
+
+    def test_nonint_labels(self, xp):
+        x = [0, 1, 2, 6]
+        labels = [0.0, 0.0, 9.0, 9.0]
+        index = [0.0, 9.0]
+        for shp in [(4,), (2, 2)]:
+            x = np.array(x).reshape(shp)
+            labels = np.array(labels).reshape(shp)
+            counts, sums, centers = ndimage._measurements._stats(
+                x, labels=labels, index=index, centered=True)
+
+            dtype_arg = {'dtype': np.int64} if IS_WINDOWS_AND_NP1 else {}
+            xp_assert_equal(counts, np.asarray([2, 2], **dtype_arg))
+            xp_assert_equal(sums, np.asarray([1.0, 8.0]))
+            xp_assert_equal(centers, np.asarray([0.5, 8.0]))
+
+
+class Test_measurements_select:
+    """ndimage._measurements._select() is a utility used by other functions."""
+
+    def test_basic(self, xp):
+        x = [0, 1, 6, 2]
+        cases = [
+            ([0, 0, 1, 1], [0, 1]),           # "Small" integer labels
+            ([0, 0, 9, 9], [0, 9]),           # A label larger than len(labels)
+            ([0.0, 0.0, 7.0, 7.0], [0.0, 7.0]),   # Non-integer labels
+        ]
+        for labels, index in cases:
+            result = ndimage._measurements._select(
+                x, labels=labels, index=index)
+            assert len(result) == 0
+            result = ndimage._measurements._select(
+                x, labels=labels, index=index, find_max=True)
+            assert len(result) == 1
+            xp_assert_equal(result[0], [1, 6])
+            result = ndimage._measurements._select(
+                x, labels=labels, index=index, find_min=True)
+            assert len(result) == 1
+            xp_assert_equal(result[0], [0, 2])
+            result = ndimage._measurements._select(
+                x, labels=labels, index=index, find_min=True,
+                find_min_positions=True)
+            assert len(result) == 2
+            xp_assert_equal(result[0], [0, 2])
+            xp_assert_equal(result[1], [0, 3])
+            assert result[1].dtype.kind == 'i'
+            result = ndimage._measurements._select(
+                x, labels=labels, index=index, find_max=True,
+                find_max_positions=True)
+            assert len(result) == 2
+            xp_assert_equal(result[0], [1, 6])
+            xp_assert_equal(result[1], [1, 2])
+            assert result[1].dtype.kind == 'i'
+
+
+def test_label01(xp):
+    data = xp.ones([])
+    out, n = ndimage.label(data)
+    assert out == 1
+    assert n == 1
+
+
+def test_label02(xp):
+    data = xp.zeros([])
+    out, n = ndimage.label(data)
+    assert out == 0
+    assert n == 0
+
+
+@pytest.mark.thread_unsafe  # due to Cython fused types, see cython#6506
+def test_label03(xp):
+    data = xp.ones([1])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray([1]))
+    assert n == 1
+
+
+def test_label04(xp):
+    data = xp.zeros([1])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray([0]))
+    assert n == 0
+
+
+def test_label05(xp):
+    data = xp.ones([5])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1, 1]))
+    assert n == 1
+
+
+def test_label06(xp):
+    data = xp.asarray([1, 0, 1, 1, 0, 1])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray([1, 0, 2, 2, 0, 3]))
+    assert n == 3
+
+
+def test_label07(xp):
+    data = xp.asarray([[0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0]])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray(
+                                    [[0, 0, 0, 0, 0, 0],
+                                     [0, 0, 0, 0, 0, 0],
+                                     [0, 0, 0, 0, 0, 0],
+                                     [0, 0, 0, 0, 0, 0],
+                                     [0, 0, 0, 0, 0, 0],
+                                     [0, 0, 0, 0, 0, 0]]))
+    assert n == 0
+
+
+def test_label08(xp):
+    data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                       [0, 0, 1, 1, 0, 0],
+                       [0, 0, 1, 1, 1, 0],
+                       [1, 1, 0, 0, 0, 0],
+                       [1, 1, 0, 0, 0, 0],
+                       [0, 0, 0, 1, 1, 0]])
+    out, n = ndimage.label(data)
+    assert_array_almost_equal(out, xp.asarray([[1, 0, 0, 0, 0, 0],
+                                               [0, 0, 2, 2, 0, 0],
+                                               [0, 0, 2, 2, 2, 0],
+                                               [3, 3, 0, 0, 0, 0],
+                                               [3, 3, 0, 0, 0, 0],
+                                               [0, 0, 0, 4, 4, 0]]))
+    assert n == 4
+
+
+def test_label09(xp):
+    data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                       [0, 0, 1, 1, 0, 0],
+                       [0, 0, 1, 1, 1, 0],
+                       [1, 1, 0, 0, 0, 0],
+                       [1, 1, 0, 0, 0, 0],
+                       [0, 0, 0, 1, 1, 0]])
+    struct = ndimage.generate_binary_structure(2, 2)
+    struct = xp.asarray(struct)
+    out, n = ndimage.label(data, struct)
+    assert_array_almost_equal(out, xp.asarray([[1, 0, 0, 0, 0, 0],
+                                               [0, 0, 2, 2, 0, 0],
+                                               [0, 0, 2, 2, 2, 0],
+                                               [2, 2, 0, 0, 0, 0],
+                                               [2, 2, 0, 0, 0, 0],
+                                               [0, 0, 0, 3, 3, 0]]))
+    assert n == 3
+
+
+def test_label10(xp):
+    data = xp.asarray([[0, 0, 0, 0, 0, 0],
+                       [0, 1, 1, 0, 1, 0],
+                       [0, 1, 1, 1, 1, 0],
+                       [0, 0, 0, 0, 0, 0]])
+    struct = ndimage.generate_binary_structure(2, 2)
+    struct = xp.asarray(struct)
+    out, n = ndimage.label(data, struct)
+    assert_array_almost_equal(out, xp.asarray([[0, 0, 0, 0, 0, 0],
+                                               [0, 1, 1, 0, 1, 0],
+                                               [0, 1, 1, 1, 1, 0],
+                                               [0, 0, 0, 0, 0, 0]]))
+    assert n == 1
+
+
+def test_label11(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0],
+                           [1, 1, 0, 0, 0, 0],
+                           [1, 1, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 0]], dtype=dtype)
+        out, n = ndimage.label(data)
+        expected = [[1, 0, 0, 0, 0, 0],
+                    [0, 0, 2, 2, 0, 0],
+                    [0, 0, 2, 2, 2, 0],
+                    [3, 3, 0, 0, 0, 0],
+                    [3, 3, 0, 0, 0, 0],
+                    [0, 0, 0, 4, 4, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+        assert n == 4
+
+
+@skip_xp_backends(np_only=True, reason='inplace output is numpy-specific')
+def test_label11_inplace(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0],
+                           [1, 1, 0, 0, 0, 0],
+                           [1, 1, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 0]], dtype=dtype)
+        n = ndimage.label(data, output=data)
+        expected = [[1, 0, 0, 0, 0, 0],
+                    [0, 0, 2, 2, 0, 0],
+                    [0, 0, 2, 2, 2, 0],
+                    [3, 3, 0, 0, 0, 0],
+                    [3, 3, 0, 0, 0, 0],
+                    [0, 0, 0, 4, 4, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(data, expected)
+        assert n == 4
+
+
+def test_label12(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        data = xp.asarray([[0, 0, 0, 0, 1, 1],
+                           [0, 0, 0, 0, 0, 1],
+                           [0, 0, 1, 0, 1, 1],
+                           [0, 0, 1, 1, 1, 1],
+                           [0, 0, 0, 1, 1, 0]], dtype=dtype)
+        out, n = ndimage.label(data)
+        expected = [[0, 0, 0, 0, 1, 1],
+                    [0, 0, 0, 0, 0, 1],
+                    [0, 0, 1, 0, 1, 1],
+                    [0, 0, 1, 1, 1, 1],
+                    [0, 0, 0, 1, 1, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+        assert n == 1
+
+
+def test_label13(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        data = xp.asarray([[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1],
+                           [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1],
+                           [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
+                           [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
+                          dtype=dtype)
+        out, n = ndimage.label(data)
+        expected = [[1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1],
+                    [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1],
+                    [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+        assert n == 1
+
+
+@skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+def test_label_output_typed(xp):
+    data = xp.ones([5])
+    for t in types:
+        dtype = getattr(xp, t)
+        output = xp.zeros([5], dtype=dtype)
+        n = ndimage.label(data, output=output)
+        assert_array_almost_equal(output,
+                                  xp.ones(output.shape, dtype=output.dtype))
+        assert n == 1
+
+
+@skip_xp_backends(np_only=True, reason='output=dtype is numpy-specific')
+def test_label_output_dtype(xp):
+    data = xp.ones([5])
+    for t in types:
+        dtype = getattr(xp, t)
+        output, n = ndimage.label(data, output=dtype)
+        assert_array_almost_equal(output,
+                                  xp.ones(output.shape, dtype=output.dtype))
+        assert output.dtype == t
+
+
+def test_label_output_wrong_size(xp):
+    if is_jax(xp):
+        pytest.xfail("JAX does not raise")
+
+    data = xp.ones([5])
+    for t in types:
+        dtype = getattr(xp, t)
+        output = xp.zeros([10], dtype=dtype)
+        # TypeError is from non-numpy arrays as output
+        assert_raises((ValueError, TypeError),
+                      ndimage.label, data, output=output)
+
+
+def test_label_structuring_elements(xp):
+    data = np.loadtxt(os.path.join(os.path.dirname(
+        __file__), "data", "label_inputs.txt"))
+    strels = np.loadtxt(os.path.join(
+        os.path.dirname(__file__), "data", "label_strels.txt"))
+    results = np.loadtxt(os.path.join(
+        os.path.dirname(__file__), "data", "label_results.txt"))
+    data = data.reshape((-1, 7, 7))
+    strels = strels.reshape((-1, 3, 3))
+    results = results.reshape((-1, 7, 7))
+
+    data = xp.asarray(data)
+    strels = xp.asarray(strels)
+    results = xp.asarray(results)
+    r = 0
+    for i in range(data.shape[0]):
+        d = data[i, :, :]
+        for j in range(strels.shape[0]):
+            s = strels[j, :, :]
+            xp_assert_equal(ndimage.label(d, s)[0], results[r, :, :], check_dtype=False)
+            r += 1
+
+@skip_xp_backends("cupy",
+                  reason="`cupyx.scipy.ndimage` does not have `find_objects`"
+)
+def test_ticket_742(xp):
+    def SE(img, thresh=.7, size=4):
+        mask = img > thresh
+        rank = len(mask.shape)
+        struct = ndimage.generate_binary_structure(rank, rank)
+        struct = xp.asarray(struct)
+        la, co = ndimage.label(mask,
+                               struct)
+        _ = ndimage.find_objects(la)
+
+    if np.dtype(np.intp) != np.dtype('i'):
+        shape = (3, 1240, 1240)
+        a = np.random.rand(np.prod(shape)).reshape(shape)
+        a = xp.asarray(a)
+        # shouldn't crash
+        SE(a)
+
+
+def test_gh_issue_3025(xp):
+    """Github issue #3025 - improper merging of labels"""
+    d = np.zeros((60, 320))
+    d[:, :257] = 1
+    d[:, 260:] = 1
+    d[36, 257] = 1
+    d[35, 258] = 1
+    d[35, 259] = 1
+    d = xp.asarray(d)
+    assert ndimage.label(d, xp.ones((3, 3)))[1] == 1
+
+
+@skip_xp_backends("cupy", reason="cupyx.scipy.ndimage does not have find_object")
+class TestFindObjects:
+    def test_label_default_dtype(self, xp):
+        test_array = np.random.rand(10, 10)
+        test_array = xp.asarray(test_array)
+        label, no_features = ndimage.label(test_array > 0.5)
+        assert label.dtype in (xp.int32, xp.int64)
+        # Shouldn't raise an exception
+        ndimage.find_objects(label)
+
+
+    def test_find_objects01(self, xp):
+        data = xp.ones([], dtype=xp.int64)
+        out = ndimage.find_objects(data)
+        assert out == [()]
+
+
+    def test_find_objects02(self, xp):
+        data = xp.zeros([], dtype=xp.int64)
+        out = ndimage.find_objects(data)
+        assert out == []
+
+
+    def test_find_objects03(self, xp):
+        data = xp.ones([1], dtype=xp.int64)
+        out = ndimage.find_objects(data)
+        assert out == [(slice(0, 1, None),)]
+
+
+    def test_find_objects04(self, xp):
+        data = xp.zeros([1], dtype=xp.int64)
+        out = ndimage.find_objects(data)
+        assert out == []
+
+
+    def test_find_objects05(self, xp):
+        data = xp.ones([5], dtype=xp.int64)
+        out = ndimage.find_objects(data)
+        assert out == [(slice(0, 5, None),)]
+
+
+    def test_find_objects06(self, xp):
+        data = xp.asarray([1, 0, 2, 2, 0, 3])
+        out = ndimage.find_objects(data)
+        assert out == [(slice(0, 1, None),),
+                       (slice(2, 4, None),),
+                       (slice(5, 6, None),)]
+
+
+    def test_find_objects07(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0]])
+        out = ndimage.find_objects(data)
+        assert out == []
+
+
+    def test_find_objects08(self, xp):
+        data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                           [0, 0, 2, 2, 0, 0],
+                           [0, 0, 2, 2, 2, 0],
+                           [3, 3, 0, 0, 0, 0],
+                           [3, 3, 0, 0, 0, 0],
+                           [0, 0, 0, 4, 4, 0]])
+        out = ndimage.find_objects(data)
+        assert out == [(slice(0, 1, None), slice(0, 1, None)),
+                           (slice(1, 3, None), slice(2, 5, None)),
+                           (slice(3, 5, None), slice(0, 2, None)),
+                           (slice(5, 6, None), slice(3, 5, None))]
+
+
+    def test_find_objects09(self, xp):
+        data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                           [0, 0, 2, 2, 0, 0],
+                           [0, 0, 2, 2, 2, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 4, 4, 0]])
+        out = ndimage.find_objects(data)
+        assert out == [(slice(0, 1, None), slice(0, 1, None)),
+                           (slice(1, 3, None), slice(2, 5, None)),
+                           None,
+                           (slice(5, 6, None), slice(3, 5, None))]
+
+
+def test_value_indices01(xp):
+    "Test dictionary keys and entries"
+    data = xp.asarray([[1, 0, 0, 0, 0, 0],
+                       [0, 0, 2, 2, 0, 0],
+                       [0, 0, 2, 2, 2, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 0, 0, 0],
+                       [0, 0, 0, 4, 4, 0]])
+    vi = ndimage.value_indices(data, ignore_value=0)
+    true_keys = [1, 2, 4]
+    assert list(vi.keys()) == true_keys
+
+    nnz_kwd = {'as_tuple': True} if is_torch(xp) else {}
+
+    truevi = {}
+    for k in true_keys:
+        truevi[k] = xp.nonzero(data == k, **nnz_kwd)
+
+    vi = ndimage.value_indices(data, ignore_value=0)
+    assert vi.keys() == truevi.keys()
+    for key in vi.keys():
+        assert len(vi[key]) == len(truevi[key])
+        for v, true_v in zip(vi[key], truevi[key]):
+            xp_assert_equal(v, true_v)
+
+
+def test_value_indices02(xp):
+    "Test input checking"
+    data = xp.zeros((5, 4), dtype=xp.float32)
+    msg = "Parameter 'arr' must be an integer array"
+    with assert_raises(ValueError, match=msg):
+        ndimage.value_indices(data)
+
+
+def test_value_indices03(xp):
+    "Test different input array shapes, from 1-D to 4-D"
+    for shape in [(36,), (18, 2), (3, 3, 4), (3, 3, 2, 2)]:
+        a = xp.asarray((12*[1]+12*[2]+12*[3]), dtype=xp.int32)
+        a = xp.reshape(a, shape)
+
+        nnz_kwd = {'as_tuple': True} if is_torch(xp) else {}
+
+        unique_values = array_namespace(a).unique_values
+        trueKeys = unique_values(a)
+        vi = ndimage.value_indices(a)
+        assert list(vi.keys()) == list(trueKeys)
+        for k in [int(x) for x in trueKeys]:
+            trueNdx = xp.nonzero(a == k, **nnz_kwd)
+            assert len(vi[k]) == len(trueNdx)
+            for vik, true_vik in zip(vi[k], trueNdx):
+                xp_assert_equal(vik, true_vik)
+
+
+def test_sum01(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([], dtype=dtype)
+        output = ndimage.sum(input)
+        assert output == 0
+
+
+def test_sum02(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.zeros([0, 4], dtype=dtype)
+        output = ndimage.sum(input)
+        assert output == 0
+
+
+def test_sum03(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.ones([], dtype=dtype)
+        output = ndimage.sum(input)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_sum04(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1, 2], dtype=dtype)
+        output = ndimage.sum(input)
+        assert_almost_equal(output, xp.asarray(3.0), check_0d=False)
+
+
+def test_sum05(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.sum(input)
+        assert_almost_equal(output, xp.asarray(10.0), check_0d=False)
+
+
+def test_sum06(xp):
+    labels = np.asarray([], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([], dtype=dtype)
+        output = ndimage.sum(input, labels=labels)
+        assert output == 0
+
+
+def test_sum07(xp):
+    labels = np.ones([0, 4], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.zeros([0, 4], dtype=dtype)
+        output = ndimage.sum(input, labels=labels)
+        assert output == 0
+
+
+def test_sum08(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1, 2], dtype=dtype)
+        output = ndimage.sum(input, labels=labels)
+        assert output == 1
+
+
+def test_sum09(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.sum(input, labels=labels)
+        assert_almost_equal(output, xp.asarray(4.0), check_0d=False)
+
+
+def test_sum10(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    input = np.asarray([[1, 2], [3, 4]], dtype=bool)
+
+    labels = xp.asarray(labels)
+    input = xp.asarray(input)
+    output = ndimage.sum(input, labels=labels)
+    assert_almost_equal(output, xp.asarray(2.0), check_0d=False)
+
+
+def test_sum11(xp):
+    labels = xp.asarray([1, 2], dtype=xp.int8)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.sum(input, labels=labels,
+                             index=2)
+        assert_almost_equal(output, xp.asarray(6.0), check_0d=False)
+
+
+def test_sum12(xp):
+    labels = xp.asarray([[1, 2], [2, 4]], dtype=xp.int8)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.sum(input, labels=labels, index=xp.asarray([4, 8, 2]))
+        assert_array_almost_equal(output, xp.asarray([4.0, 0.0, 5.0]))
+
+
+def test_sum_labels(xp):
+    labels = xp.asarray([[1, 2], [2, 4]], dtype=xp.int8)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output_sum = ndimage.sum(input, labels=labels, index=xp.asarray([4, 8, 2]))
+        output_labels = ndimage.sum_labels(
+            input, labels=labels, index=xp.asarray([4, 8, 2]))
+
+        assert xp.all(output_sum == output_labels)
+        assert_array_almost_equal(output_labels, xp.asarray([4.0, 0.0, 5.0]))
+
+
+def test_mean01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.mean(input, labels=labels)
+        assert_almost_equal(output, xp.asarray(2.0), check_0d=False)
+
+
+def test_mean02(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    input = np.asarray([[1, 2], [3, 4]], dtype=bool)
+
+    labels = xp.asarray(labels)
+    input = xp.asarray(input)
+    output = ndimage.mean(input, labels=labels)
+    assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_mean03(xp):
+    labels = xp.asarray([1, 2])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.mean(input, labels=labels,
+                              index=2)
+        assert_almost_equal(output, xp.asarray(3.0), check_0d=False)
+
+
+def test_mean04(xp):
+    labels = xp.asarray([[1, 2], [2, 4]], dtype=xp.int8)
+    with np.errstate(all='ignore'):
+        for type in types:
+            dtype = getattr(xp, type)
+            input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+            output = ndimage.mean(input, labels=labels,
+                                  index=xp.asarray([4, 8, 2]))
+            # XXX: output[[0, 2]] does not work in array-api-strict; annoying
+            # assert_array_almost_equal(output[[0, 2]], xp.asarray([4.0, 2.5]))
+            assert output[0] == 4.0
+            assert output[2] == 2.5
+            assert xp.isnan(output[1])
+
+
+def test_minimum01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.minimum(input, labels=labels)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_minimum02(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    input = np.asarray([[2, 2], [2, 4]], dtype=bool)
+
+    labels = xp.asarray(labels)
+    input = xp.asarray(input)
+    output = ndimage.minimum(input, labels=labels)
+    assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_minimum03(xp):
+    labels = xp.asarray([1, 2])
+    for type in types:
+        dtype = getattr(xp, type)
+
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.minimum(input, labels=labels,
+                                 index=2)
+        assert_almost_equal(output, xp.asarray(2.0), check_0d=False)
+
+
+def test_minimum04(xp):
+    labels = xp.asarray([[1, 2], [2, 3]])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.minimum(input, labels=labels,
+                                 index=xp.asarray([2, 3, 8]))
+        assert_array_almost_equal(output, xp.asarray([2.0, 4.0, 0.0]))
+
+
+def test_maximum01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.maximum(input, labels=labels)
+        assert_almost_equal(output, xp.asarray(3.0), check_0d=False)
+
+
+def test_maximum02(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    input = np.asarray([[2, 2], [2, 4]], dtype=bool)
+    labels = xp.asarray(labels)
+    input = xp.asarray(input)
+    output = ndimage.maximum(input, labels=labels)
+    assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_maximum03(xp):
+    labels = xp.asarray([1, 2])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.maximum(input, labels=labels,
+                                 index=2)
+        assert_almost_equal(output, xp.asarray(4.0), check_0d=False)
+
+
+def test_maximum04(xp):
+    labels = xp.asarray([[1, 2], [2, 3]])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.maximum(input, labels=labels,
+                                 index=xp.asarray([2, 3, 8]))
+        assert_array_almost_equal(output, xp.asarray([3.0, 4.0, 0.0]))
+
+
+def test_maximum05(xp):
+    # Regression test for ticket #501 (Trac)
+    x = xp.asarray([-3, -2, -1])
+    assert ndimage.maximum(x) == -1
+
+
+def test_median01(xp):
+    a = xp.asarray([[1, 2, 0, 1],
+                    [5, 3, 0, 4],
+                    [0, 0, 0, 7],
+                    [9, 3, 0, 0]])
+    labels = xp.asarray([[1, 1, 0, 2],
+                         [1, 1, 0, 2],
+                         [0, 0, 0, 2],
+                         [3, 3, 0, 0]])
+    output = ndimage.median(a, labels=labels, index=xp.asarray([1, 2, 3]))
+    assert_array_almost_equal(output, xp.asarray([2.5, 4.0, 6.0]))
+
+
+def test_median02(xp):
+    a = xp.asarray([[1, 2, 0, 1],
+                    [5, 3, 0, 4],
+                    [0, 0, 0, 7],
+                    [9, 3, 0, 0]])
+    output = ndimage.median(a)
+    assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_median03(xp):
+    a = xp.asarray([[1, 2, 0, 1],
+                    [5, 3, 0, 4],
+                    [0, 0, 0, 7],
+                    [9, 3, 0, 0]])
+    labels = xp.asarray([[1, 1, 0, 2],
+                         [1, 1, 0, 2],
+                         [0, 0, 0, 2],
+                         [3, 3, 0, 0]])
+    output = ndimage.median(a, labels=labels)
+    assert_almost_equal(output, xp.asarray(3.0), check_0d=False)
+
+
+def test_median_gh12836_bool(xp):
+    # test boolean addition fix on example from gh-12836
+    a = np.asarray([1, 1], dtype=bool)
+    a = xp.asarray(a)
+    output = ndimage.median(a, labels=xp.ones((2,)), index=xp.asarray([1]))
+    assert_array_almost_equal(output, xp.asarray([1.0]))
+
+
+def test_median_no_int_overflow(xp):
+    # test integer overflow fix on example from gh-12836
+    a = xp.asarray([65, 70], dtype=xp.int8)
+    output = ndimage.median(a, labels=xp.ones((2,)), index=xp.asarray([1]))
+    assert_array_almost_equal(output, xp.asarray([67.5]))
+
+
+def test_variance01(xp):
+    with np.errstate(all='ignore'):
+        for type in types:
+            dtype = getattr(xp, type)
+            input = xp.asarray([], dtype=dtype)
+            with suppress_warnings() as sup:
+                sup.filter(RuntimeWarning, "Mean of empty slice")
+                output = ndimage.variance(input)
+            assert xp.isnan(output)
+
+
+def test_variance02(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1], dtype=dtype)
+        output = ndimage.variance(input)
+        assert_almost_equal(output, xp.asarray(0.0), check_0d=False)
+
+
+def test_variance03(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1, 3], dtype=dtype)
+        output = ndimage.variance(input)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_variance04(xp):
+    input = np.asarray([1, 0], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.variance(input)
+    assert_almost_equal(output, xp.asarray(0.25), check_0d=False)
+
+
+def test_variance05(xp):
+    labels = xp.asarray([2, 2, 3])
+    for type in types:
+        dtype = getattr(xp, type)
+
+        input = xp.asarray([1, 3, 8], dtype=dtype)
+        output = ndimage.variance(input, labels, 2)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_variance06(xp):
+    labels = xp.asarray([2, 2, 3, 3, 4])
+    with np.errstate(all='ignore'):
+        for type in types:
+            dtype = getattr(xp, type)
+            input = xp.asarray([1, 3, 8, 10, 8], dtype=dtype)
+            output = ndimage.variance(input, labels, xp.asarray([2, 3, 4]))
+            assert_array_almost_equal(output, xp.asarray([1.0, 1.0, 0.0]))
+
+
+def test_standard_deviation01(xp):
+    with np.errstate(all='ignore'):
+        for type in types:
+            dtype = getattr(xp, type)
+            input = xp.asarray([], dtype=dtype)
+            with suppress_warnings() as sup:
+                sup.filter(RuntimeWarning, "Mean of empty slice")
+                output = ndimage.standard_deviation(input)
+            assert xp.isnan(output)
+
+
+def test_standard_deviation02(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1], dtype=dtype)
+        output = ndimage.standard_deviation(input)
+        assert_almost_equal(output, xp.asarray(0.0), check_0d=False)
+
+
+def test_standard_deviation03(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1, 3], dtype=dtype)
+        output = ndimage.standard_deviation(input)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_standard_deviation04(xp):
+    input = np.asarray([1, 0], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.standard_deviation(input)
+    assert_almost_equal(output, xp.asarray(0.5), check_0d=False)
+
+
+def test_standard_deviation05(xp):
+    labels = xp.asarray([2, 2, 3])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([1, 3, 8], dtype=dtype)
+        output = ndimage.standard_deviation(input, labels, 2)
+        assert_almost_equal(output, xp.asarray(1.0), check_0d=False)
+
+
+def test_standard_deviation06(xp):
+    labels = xp.asarray([2, 2, 3, 3, 4])
+    with np.errstate(all='ignore'):
+        for type in types:
+            dtype = getattr(xp, type)
+            input = xp.asarray([1, 3, 8, 10, 8], dtype=dtype)
+            output = ndimage.standard_deviation(
+                input, labels, xp.asarray([2, 3, 4])
+            )
+            assert_array_almost_equal(output, xp.asarray([1.0, 1.0, 0.0]))
+
+
+def test_standard_deviation07(xp):
+    labels = xp.asarray([1])
+    with np.errstate(all='ignore'):
+        for type in types:
+            if is_torch(xp) and type == 'uint8':
+                pytest.xfail("value cannot be converted to type uint8 "
+                             "without overflow")
+            dtype = getattr(xp, type)
+            input = xp.asarray([-0.00619519], dtype=dtype)
+            output = ndimage.standard_deviation(input, labels, xp.asarray([1]))
+            assert_array_almost_equal(output, xp.asarray([0]))
+
+
+def test_minimum_position01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.minimum_position(input, labels=labels)
+        assert output == (0, 0)
+
+
+def test_minimum_position02(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 0, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.minimum_position(input)
+        assert output == (1, 2)
+
+
+def test_minimum_position03(xp):
+    input = np.asarray([[5, 4, 2, 5],
+                        [3, 7, 0, 2],
+                        [1, 5, 1, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.minimum_position(input)
+    assert output == (1, 2)
+
+
+def test_minimum_position04(xp):
+    input = np.asarray([[5, 4, 2, 5],
+                        [3, 7, 1, 2],
+                        [1, 5, 1, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.minimum_position(input)
+    assert output == (0, 0)
+
+
+def test_minimum_position05(xp):
+    labels = xp.asarray([1, 2, 0, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 0, 2],
+                            [1, 5, 2, 3]], dtype=dtype)
+        output = ndimage.minimum_position(input, labels)
+        assert output == (2, 0)
+
+
+def test_minimum_position06(xp):
+    labels = xp.asarray([1, 2, 3, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 0, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.minimum_position(input, labels, 2)
+        assert output == (0, 1)
+
+
+def test_minimum_position07(xp):
+    labels = xp.asarray([1, 2, 3, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 0, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.minimum_position(input, labels,
+                                          xp.asarray([2, 3]))
+        assert output[0] == (0, 1)
+        assert output[1] == (1, 2)
+
+
+def test_maximum_position01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output = ndimage.maximum_position(input,
+                                          labels=labels)
+        assert output == (1, 0)
+
+
+def test_maximum_position02(xp):
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.maximum_position(input)
+        assert output == (1, 2)
+
+
+def test_maximum_position03(xp):
+    input = np.asarray([[5, 4, 2, 5],
+                        [3, 7, 8, 2],
+                        [1, 5, 1, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.maximum_position(input)
+    assert output == (0, 0)
+
+
+def test_maximum_position04(xp):
+    labels = xp.asarray([1, 2, 0, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.maximum_position(input, labels)
+        assert output == (1, 1)
+
+
+def test_maximum_position05(xp):
+    labels = xp.asarray([1, 2, 0, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.maximum_position(input, labels, 1)
+        assert output == (0, 0)
+
+
+def test_maximum_position06(xp):
+    labels = xp.asarray([1, 2, 0, 4])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.maximum_position(input, labels,
+                                          xp.asarray([1, 2]))
+        assert output[0] == (0, 0)
+        assert output[1] == (1, 1)
+
+
+def test_maximum_position07(xp):
+    # Test float labels
+    if is_torch(xp):
+        pytest.xfail("output[1] is wrong on pytorch")
+
+    labels = xp.asarray([1.0, 2.5, 0.0, 4.5])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output = ndimage.maximum_position(input, labels,
+                                          xp.asarray([1.0, 4.5]))
+        assert output[0] == (0, 0)
+        assert output[1] == (0, 3)
+
+
+def test_extrema01(xp):
+    labels = np.asarray([1, 0], dtype=bool)
+    labels = xp.asarray(labels)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output1 = ndimage.extrema(input, labels=labels)
+        output2 = ndimage.minimum(input, labels=labels)
+        output3 = ndimage.maximum(input, labels=labels)
+        output4 = ndimage.minimum_position(input,
+                                           labels=labels)
+        output5 = ndimage.maximum_position(input,
+                                           labels=labels)
+        assert output1 == (output2, output3, output4, output5)
+
+
+def test_extrema02(xp):
+    labels = xp.asarray([1, 2])
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output1 = ndimage.extrema(input, labels=labels,
+                                  index=2)
+        output2 = ndimage.minimum(input, labels=labels,
+                                  index=2)
+        output3 = ndimage.maximum(input, labels=labels,
+                                  index=2)
+        output4 = ndimage.minimum_position(input,
+                                           labels=labels, index=2)
+        output5 = ndimage.maximum_position(input,
+                                           labels=labels, index=2)
+        assert output1 == (output2, output3, output4, output5)
+
+
+def test_extrema03(xp):
+    labels = xp.asarray([[1, 2], [2, 3]])
+    for type in types:
+        if is_torch(xp) and type in ("uint16", "uint32", "uint64"):
+             pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 2], [3, 4]], dtype=dtype)
+        output1 = ndimage.extrema(input,
+                                  labels=labels,
+                                  index=xp.asarray([2, 3, 8]))
+        output2 = ndimage.minimum(input,
+                                  labels=labels,
+                                  index=xp.asarray([2, 3, 8]))
+        output3 = ndimage.maximum(input, labels=labels,
+                                  index=xp.asarray([2, 3, 8]))
+        output4 = ndimage.minimum_position(input,
+                                           labels=labels,
+                                           index=xp.asarray([2, 3, 8]))
+        output5 = ndimage.maximum_position(input,
+                                           labels=labels,
+                                           index=xp.asarray([2, 3, 8]))
+        assert_array_almost_equal(output1[0], output2)
+        assert_array_almost_equal(output1[1], output3)
+        assert output1[2] == output4
+        assert output1[3] == output5
+
+
+def test_extrema04(xp):
+    labels = xp.asarray([1, 2, 0, 4])
+    for type in types:
+        if is_torch(xp) and type in ("uint16", "uint32", "uint64"):
+             pytest.xfail("https://github.com/pytorch/pytorch/issues/58734")
+
+        dtype = getattr(xp, type)
+        input = xp.asarray([[5, 4, 2, 5],
+                            [3, 7, 8, 2],
+                            [1, 5, 1, 1]], dtype=dtype)
+        output1 = ndimage.extrema(input, labels, xp.asarray([1, 2]))
+        output2 = ndimage.minimum(input, labels, xp.asarray([1, 2]))
+        output3 = ndimage.maximum(input, labels, xp.asarray([1, 2]))
+        output4 = ndimage.minimum_position(input, labels,
+                                           xp.asarray([1, 2]))
+        output5 = ndimage.maximum_position(input, labels,
+                                           xp.asarray([1, 2]))
+        assert_array_almost_equal(output1[0], output2)
+        assert_array_almost_equal(output1[1], output3)
+        assert output1[2] == output4
+        assert output1[3] == output5
+
+
+def test_center_of_mass01(xp):
+    expected = (0.0, 0.0)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 0], [0, 0]], dtype=dtype)
+        output = ndimage.center_of_mass(input)
+        assert output == expected
+
+
+def test_center_of_mass02(xp):
+    expected = (1, 0)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[0, 0], [1, 0]], dtype=dtype)
+        output = ndimage.center_of_mass(input)
+        assert output == expected
+
+
+def test_center_of_mass03(xp):
+    expected = (0, 1)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[0, 1], [0, 0]], dtype=dtype)
+        output = ndimage.center_of_mass(input)
+        assert output == expected
+
+
+def test_center_of_mass04(xp):
+    expected = (1, 1)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[0, 0], [0, 1]], dtype=dtype)
+        output = ndimage.center_of_mass(input)
+        assert output == expected
+
+
+def test_center_of_mass05(xp):
+    expected = (0.5, 0.5)
+    for type in types:
+        dtype = getattr(xp, type)
+        input = xp.asarray([[1, 1], [1, 1]], dtype=dtype)
+        output = ndimage.center_of_mass(input)
+        assert output == expected
+
+
+def test_center_of_mass06(xp):
+    expected = (0.5, 0.5)
+    input = np.asarray([[1, 2], [3, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.center_of_mass(input)
+    assert output == expected
+
+
+def test_center_of_mass07(xp):
+    labels = xp.asarray([1, 0])
+    expected = (0.5, 0.0)
+    input = np.asarray([[1, 2], [3, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.center_of_mass(input, labels)
+    assert output == expected
+
+
+def test_center_of_mass08(xp):
+    labels = xp.asarray([1, 2])
+    expected = (0.5, 1.0)
+    input = np.asarray([[5, 2], [3, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.center_of_mass(input, labels, 2)
+    assert output == expected
+
+
+def test_center_of_mass09(xp):
+    labels = xp.asarray((1, 2))
+    expected = xp.asarray([(0.5, 0.0), (0.5, 1.0)], dtype=xp.float64)
+    input = np.asarray([[1, 2], [1, 1]], dtype=bool)
+    input = xp.asarray(input)
+    output = ndimage.center_of_mass(input, labels, xp.asarray([1, 2]))
+    xp_assert_equal(xp.asarray(output), xp.asarray(expected))
+
+
+def test_histogram01(xp):
+    expected = xp.ones(10)
+    input = xp.arange(10)
+    output = ndimage.histogram(input, 0, 10, 10)
+    assert_array_almost_equal(output, expected)
+
+
+def test_histogram02(xp):
+    labels = xp.asarray([1, 1, 1, 1, 2, 2, 2, 2])
+    expected = xp.asarray([0, 2, 0, 1, 1])
+    input = xp.asarray([1, 1, 3, 4, 3, 3, 3, 3])
+    output = ndimage.histogram(input, 0, 4, 5, labels, 1)
+    assert_array_almost_equal(output, expected)
+
+
+@skip_xp_backends(np_only=True, reason='object arrays')
+def test_histogram03(xp):
+    labels = xp.asarray([1, 0, 1, 1, 2, 2, 2, 2])
+    expected1 = xp.asarray([0, 1, 0, 1, 1])
+    expected2 = xp.asarray([0, 0, 0, 3, 0])
+    input = xp.asarray([1, 1, 3, 4, 3, 5, 3, 3])
+
+    output = ndimage.histogram(input, 0, 4, 5, labels, (1, 2))
+
+    assert_array_almost_equal(output[0], expected1)
+    assert_array_almost_equal(output[1], expected2)
+
+
+def test_stat_funcs_2d(xp):
+    a = xp.asarray([[5, 6, 0, 0, 0], [8, 9, 0, 0, 0], [0, 0, 0, 3, 5]])
+    lbl = xp.asarray([[1, 1, 0, 0, 0], [1, 1, 0, 0, 0], [0, 0, 0, 2, 2]])
+
+    mean = ndimage.mean(a, labels=lbl, index=xp.asarray([1, 2]))
+    xp_assert_equal(mean, xp.asarray([7.0, 4.0], dtype=xp.float64))
+
+    var = ndimage.variance(a, labels=lbl, index=xp.asarray([1, 2]))
+    xp_assert_equal(var, xp.asarray([2.5, 1.0], dtype=xp.float64))
+
+    std = ndimage.standard_deviation(a, labels=lbl, index=xp.asarray([1, 2]))
+    assert_array_almost_equal(std, xp.sqrt(xp.asarray([2.5, 1.0], dtype=xp.float64)))
+
+    med = ndimage.median(a, labels=lbl, index=xp.asarray([1, 2]))
+    xp_assert_equal(med, xp.asarray([7.0, 4.0], dtype=xp.float64))
+
+    min = ndimage.minimum(a, labels=lbl, index=xp.asarray([1, 2]))
+    xp_assert_equal(min, xp.asarray([5, 3]), check_dtype=False)
+
+    max = ndimage.maximum(a, labels=lbl, index=xp.asarray([1, 2]))
+    xp_assert_equal(max, xp.asarray([9, 5]), check_dtype=False)
+
+
+@skip_xp_backends("cupy", reason="no watershed_ift on CuPy")
+class TestWatershedIft:
+
+    def test_watershed_ift01(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[-1, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 1, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0]], dtype=xp.int8)
+        structure=xp.asarray([[1, 1, 1],
+                              [1, 1, 1],
+                              [1, 1, 1]])
+        out = ndimage.watershed_ift(data, markers, structure=structure)
+        expected = [[-1, -1, -1, -1, -1, -1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    def test_watershed_ift02(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[-1, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 1, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0]], dtype=xp.int8)
+        out = ndimage.watershed_ift(data, markers)
+        expected = [[-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, 1, 1, 1, -1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, -1, 1, 1, 1, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    def test_watershed_ift03(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 2, 0, 3, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, -1]], dtype=xp.int8)
+        out = ndimage.watershed_ift(data, markers)
+        expected = [[-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, 2, -1, 3, -1, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, -1, 2, -1, 3, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    def test_watershed_ift04(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 2, 0, 3, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, -1]],
+                             dtype=xp.int8)
+
+        structure=xp.asarray([[1, 1, 1],
+                              [1, 1, 1],
+                              [1, 1, 1]])
+        out = ndimage.watershed_ift(data, markers, structure=structure)
+        expected = [[-1, -1, -1, -1, -1, -1, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, 2, 2, 3, 3, 3, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    def test_watershed_ift05(self, xp):
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 3, 0, 2, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, -1]],
+                             dtype=xp.int8)
+        structure = xp.asarray([[1, 1, 1],
+                                [1, 1, 1],
+                                [1, 1, 1]])
+        out = ndimage.watershed_ift(data, markers, structure=structure)
+        expected = [[-1, -1, -1, -1, -1, -1, -1],
+                    [-1, 3, 3, 2, 2, 2, -1],
+                    [-1, 3, 3, 2, 2, 2, -1],
+                    [-1, 3, 3, 2, 2, 2, -1],
+                    [-1, 3, 3, 2, 2, 2, -1],
+                    [-1, 3, 3, 2, 2, 2, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    def test_watershed_ift06(self, xp):
+        data = xp.asarray([[0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 0, 0, 0, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=xp.uint8)
+        markers = xp.asarray([[-1, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 1, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0]], dtype=xp.int8)
+        structure=xp.asarray([[1, 1, 1],
+                              [1, 1, 1],
+                              [1, 1, 1]])
+        out = ndimage.watershed_ift(data, markers, structure=structure)
+        expected = [[-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    @skip_xp_backends(np_only=True, reason="inplace ops are numpy-specific")
+    def test_watershed_ift07(self, xp):
+        shape = (7, 6)
+        data = np.zeros(shape, dtype=np.uint8)
+        data = data.transpose()
+        data[...] = np.asarray([[0, 1, 0, 0, 0, 1, 0],
+                                [0, 1, 0, 0, 0, 1, 0],
+                                [0, 1, 0, 0, 0, 1, 0],
+                                [0, 1, 1, 1, 1, 1, 0],
+                                [0, 0, 0, 0, 0, 0, 0],
+                                [0, 0, 0, 0, 0, 0, 0]], dtype=np.uint8)
+        data = xp.asarray(data)
+        markers = xp.asarray([[-1, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 1, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0],
+                              [0, 0, 0, 0, 0, 0, 0]], dtype=xp.int8)
+        out = xp.zeros(shape, dtype=xp.int16)
+        out = out.T
+        structure=xp.asarray([[1, 1, 1],
+                              [1, 1, 1],
+                              [1, 1, 1]])
+        ndimage.watershed_ift(data, markers, structure=structure,
+                              output=out)
+        expected = [[-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, 1, 1, 1, 1, 1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1],
+                    [-1, -1, -1, -1, -1, -1, -1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    @skip_xp_backends("cupy", reason="no watershed_ift on CuPy")
+    def test_watershed_ift08(self, xp):
+        # Test cost larger than uint8. See gh-10069.
+        data = xp.asarray([[256, 0],
+                           [0, 0]], dtype=xp.uint16)
+        markers = xp.asarray([[1, 0],
+                              [0, 0]], dtype=xp.int8)
+        out = ndimage.watershed_ift(data, markers)
+        expected = [[1, 1],
+                    [1, 1]]
+        assert_array_almost_equal(out, xp.asarray(expected))
+
+    @skip_xp_backends("cupy", reason="no watershed_ift on CuPy"	)
+    def test_watershed_ift09(self, xp):
+        # Test large cost. See gh-19575
+        data = xp.asarray([[xp.iinfo(xp.uint16).max, 0],
+                           [0, 0]], dtype=xp.uint16)
+        markers = xp.asarray([[1, 0],
+                              [0, 0]], dtype=xp.int8)
+        out = ndimage.watershed_ift(data, markers)
+        expected = [[1, 1],
+                    [1, 1]]
+        xp_assert_close(out, xp.asarray(expected), check_dtype=False)
+
+
+@skip_xp_backends(np_only=True)
+@pytest.mark.parametrize("dt", [np.intc, np.uintc])
+def test_gh_19423(dt, xp):
+    rng = np.random.default_rng(123)
+    max_val = 8
+    image = rng.integers(low=0, high=max_val, size=(10, 12)).astype(dtype=dt)
+    val_idx = ndimage.value_indices(image)
+    assert len(val_idx.keys()) == max_val
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_morphology.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_morphology.py
new file mode 100644
index 0000000000000000000000000000000000000000..9eff9a2c0f4a05295b7565761292b4ecaac007ac
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_morphology.py
@@ -0,0 +1,2938 @@
+import numpy as np
+from scipy._lib._array_api import (
+    is_cupy, is_numpy, is_torch, array_namespace,
+    xp_assert_close, xp_assert_equal, assert_array_almost_equal
+)
+import pytest
+from pytest import raises as assert_raises
+
+from scipy import ndimage
+
+from . import types
+
+from scipy.conftest import array_api_compatible
+skip_xp_backends = pytest.mark.skip_xp_backends
+xfail_xp_backends = pytest.mark.xfail_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              pytest.mark.usefixtures("xfail_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy'],)]
+
+
+class TestNdimageMorphology:
+
+    @xfail_xp_backends('cupy', reason='CuPy does not have distance_transform_bf.')
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        # brute force (bf) distance transform
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_bf(data, 'euclidean',
+                                                return_indices=True)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 1, 2, 4, 2, 1, 0, 0],
+                    [0, 0, 1, 4, 8, 4, 1, 0, 0],
+                    [0, 0, 1, 2, 4, 2, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out * out, expected)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 2, 1, 2, 2, 2, 2],
+                     [3, 3, 3, 2, 1, 2, 3, 3, 3],
+                     [4, 4, 4, 4, 6, 4, 4, 4, 4],
+                     [5, 5, 6, 6, 7, 6, 6, 5, 5],
+                     [6, 6, 6, 7, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 1, 2, 4, 6, 7, 7, 8],
+                     [0, 1, 1, 1, 6, 7, 7, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    @xfail_xp_backends('cupy', reason='CuPy does not have distance_transform_bf.')
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_bf(data, 'cityblock',
+                                                return_indices=True)
+
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 1, 2, 2, 2, 1, 0, 0],
+                    [0, 0, 1, 2, 3, 2, 1, 0, 0],
+                    [0, 0, 1, 2, 2, 2, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 2, 1, 2, 2, 2, 2],
+                     [3, 3, 3, 3, 1, 3, 3, 3, 3],
+                     [4, 4, 4, 4, 7, 4, 4, 4, 4],
+                     [5, 5, 6, 7, 7, 7, 6, 5, 5],
+                     [6, 6, 6, 7, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 1, 1, 4, 7, 7, 7, 8],
+                     [0, 1, 1, 1, 4, 7, 7, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(expected, ft)
+
+    @xfail_xp_backends('cupy', reason='CuPy does not have distance_transform_bf.')
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_bf(data, 'chessboard',
+                                                return_indices=True)
+
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 1, 1, 2, 1, 1, 0, 0],
+                    [0, 0, 1, 2, 2, 2, 1, 0, 0],
+                    [0, 0, 1, 1, 2, 1, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 2, 1, 2, 2, 2, 2],
+                     [3, 3, 4, 2, 2, 2, 4, 3, 3],
+                     [4, 4, 5, 6, 6, 6, 5, 4, 4],
+                     [5, 5, 6, 6, 7, 6, 6, 5, 5],
+                     [6, 6, 6, 7, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 5, 6, 6, 7, 8],
+                     [0, 1, 1, 2, 6, 6, 7, 7, 8],
+                     [0, 1, 1, 2, 6, 7, 7, 7, 8],
+                     [0, 1, 2, 2, 6, 6, 7, 7, 8],
+                     [0, 1, 2, 4, 5, 6, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace distances= arrays are numpy-specific'
+    )
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf04(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        tdt, tft = ndimage.distance_transform_bf(data, return_indices=1)
+        dts = []
+        fts = []
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ndimage.distance_transform_bf(data, distances=dt)
+        dts.append(dt)
+        ft = ndimage.distance_transform_bf(
+            data, return_distances=False, return_indices=1)
+        fts.append(ft)
+        ft = np.indices(data.shape, dtype=xp.int32)
+        ndimage.distance_transform_bf(
+            data, return_distances=False, return_indices=True, indices=ft)
+        fts.append(ft)
+        dt, ft = ndimage.distance_transform_bf(
+            data, return_indices=1)
+        dts.append(dt)
+        fts.append(ft)
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ft = ndimage.distance_transform_bf(
+            data, distances=dt, return_indices=True)
+        dts.append(dt)
+        fts.append(ft)
+        ft = np.indices(data.shape, dtype=xp.int32)
+        dt = ndimage.distance_transform_bf(
+            data, return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ft = np.indices(data.shape, dtype=xp.int32)
+        ndimage.distance_transform_bf(
+            data, distances=dt, return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+        for dt in dts:
+            assert_array_almost_equal(tdt, dt)
+        for ft in fts:
+            assert_array_almost_equal(tft, ft)
+
+    @xfail_xp_backends('cupy', reason='CuPy does not have distance_transform_bf.')
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf05(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_bf(
+            data, 'euclidean', return_indices=True, sampling=[2, 2])
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 4, 4, 4, 0, 0, 0],
+                    [0, 0, 4, 8, 16, 8, 4, 0, 0],
+                    [0, 0, 4, 16, 32, 16, 4, 0, 0],
+                    [0, 0, 4, 8, 16, 8, 4, 0, 0],
+                    [0, 0, 0, 4, 4, 4, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out * out, expected)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 2, 1, 2, 2, 2, 2],
+                     [3, 3, 3, 2, 1, 2, 3, 3, 3],
+                     [4, 4, 4, 4, 6, 4, 4, 4, 4],
+                     [5, 5, 6, 6, 7, 6, 6, 5, 5],
+                     [6, 6, 6, 7, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 1, 2, 4, 6, 7, 7, 8],
+                     [0, 1, 1, 1, 6, 7, 7, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    @xfail_xp_backends('cupy', reason='CuPy does not have distance_transform_bf.')
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_bf06(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_bf(
+            data, 'euclidean', return_indices=True, sampling=[2, 1])
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 4, 1, 0, 0, 0],
+                    [0, 0, 1, 4, 8, 4, 1, 0, 0],
+                    [0, 0, 1, 4, 9, 4, 1, 0, 0],
+                    [0, 0, 1, 4, 8, 4, 1, 0, 0],
+                    [0, 0, 0, 1, 4, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out * out, expected)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 2, 2, 2, 2, 2, 2],
+                     [3, 3, 3, 3, 2, 3, 3, 3, 3],
+                     [4, 4, 4, 4, 4, 4, 4, 4, 4],
+                     [5, 5, 5, 5, 6, 5, 5, 5, 5],
+                     [6, 6, 6, 6, 7, 6, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 6, 6, 6, 7, 8],
+                     [0, 1, 1, 1, 6, 7, 7, 7, 8],
+                     [0, 1, 1, 1, 7, 7, 7, 7, 8],
+                     [0, 1, 1, 1, 6, 7, 7, 7, 8],
+                     [0, 1, 2, 2, 4, 6, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    def test_distance_transform_bf07(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_bf.")
+
+        # test input validation per discussion on PR #13302
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]])
+        with assert_raises(RuntimeError):
+            ndimage.distance_transform_bf(
+                data, return_distances=False, return_indices=False
+            )
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_cdt01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_cdt.")
+
+        # chamfer type distance (cdt) transform
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_cdt(
+            data, 'cityblock', return_indices=True)
+        bf = ndimage.distance_transform_bf(data, 'cityblock')
+        assert_array_almost_equal(bf, out)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 1, 1, 1, 2, 2, 2],
+                     [3, 3, 2, 1, 1, 1, 2, 3, 3],
+                     [4, 4, 4, 4, 1, 4, 4, 4, 4],
+                     [5, 5, 5, 5, 7, 7, 6, 5, 5],
+                     [6, 6, 6, 6, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 1, 1, 4, 7, 7, 7, 8],
+                     [0, 1, 1, 1, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_cdt02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_cdt.")
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_cdt(data, 'chessboard',
+                                                 return_indices=True)
+        bf = ndimage.distance_transform_bf(data, 'chessboard')
+        assert_array_almost_equal(bf, out)
+
+        expected = [[[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                     [1, 1, 1, 1, 1, 1, 1, 1, 1],
+                     [2, 2, 2, 1, 1, 1, 2, 2, 2],
+                     [3, 3, 2, 2, 1, 2, 2, 3, 3],
+                     [4, 4, 3, 2, 2, 2, 3, 4, 4],
+                     [5, 5, 4, 6, 7, 6, 4, 5, 5],
+                     [6, 6, 6, 6, 7, 7, 6, 6, 6],
+                     [7, 7, 7, 7, 7, 7, 7, 7, 7],
+                     [8, 8, 8, 8, 8, 8, 8, 8, 8]],
+                    [[0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 2, 3, 4, 6, 7, 8],
+                     [0, 1, 1, 2, 2, 6, 6, 7, 8],
+                     [0, 1, 1, 1, 2, 6, 7, 7, 8],
+                     [0, 1, 1, 2, 6, 6, 7, 7, 8],
+                     [0, 1, 2, 2, 5, 6, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8],
+                     [0, 1, 2, 3, 4, 5, 6, 7, 8]]]
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(ft, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace indices= arrays are numpy-specific'
+    )
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_cdt03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        tdt, tft = ndimage.distance_transform_cdt(data, return_indices=True)
+        dts = []
+        fts = []
+        dt = xp.zeros(data.shape, dtype=xp.int32)
+        ndimage.distance_transform_cdt(data, distances=dt)
+        dts.append(dt)
+        ft = ndimage.distance_transform_cdt(
+            data, return_distances=False, return_indices=True)
+        fts.append(ft)
+        ft = xp.asarray(np.indices(data.shape, dtype=np.int32))
+        ndimage.distance_transform_cdt(
+            data, return_distances=False, return_indices=True, indices=ft)
+        fts.append(ft)
+        dt, ft = ndimage.distance_transform_cdt(
+            data, return_indices=True)
+        dts.append(dt)
+        fts.append(ft)
+        dt = xp.zeros(data.shape, dtype=xp.int32)
+        ft = ndimage.distance_transform_cdt(
+            data, distances=dt, return_indices=True)
+        dts.append(dt)
+        fts.append(ft)
+        ft = xp.asarray(np.indices(data.shape, dtype=np.int32))
+        dt = ndimage.distance_transform_cdt(
+            data, return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+        dt = xp.zeros(data.shape, dtype=xp.int32)
+        ft = xp.asarray(np.indices(data.shape, dtype=np.int32))
+        ndimage.distance_transform_cdt(data, distances=dt,
+                                       return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+        for dt in dts:
+            assert_array_almost_equal(tdt, dt)
+        for ft in fts:
+            assert_array_almost_equal(tft, ft)
+
+    @skip_xp_backends(
+        np_only=True, reason='XXX: does not raise unless indices is a numpy array'
+    )
+    def test_distance_transform_cdt04(self, xp):
+        # test input validation per discussion on PR #13302
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]])
+        indices_out = xp.zeros((data.ndim,) + data.shape, dtype=xp.int32)
+        with assert_raises(RuntimeError):
+            ndimage.distance_transform_bf(
+                data,
+                return_distances=True,
+                return_indices=False,
+                indices=indices_out
+            )
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_cdt05(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_cdt.")
+        elif is_torch(xp):
+            pytest.xfail("int overflow")
+
+        # test custom metric type per discussion on issue #17381
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        metric_arg = xp.ones((3, 3))
+        actual = ndimage.distance_transform_cdt(data, metric=metric_arg)
+        assert xp.sum(actual) == -21
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_edt01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_bf")
+
+        # euclidean distance transform (edt)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out, ft = ndimage.distance_transform_edt(data, return_indices=True)
+        bf = ndimage.distance_transform_bf(data, 'euclidean')
+        assert_array_almost_equal(bf, out)
+
+        # np-specific check
+        np_ft = np.asarray(ft)
+        dt = np_ft - np.indices(np_ft.shape[1:], dtype=np_ft.dtype)
+        dt = dt.astype(np.float64)
+        np.multiply(dt, dt, dt)
+        dt = np.add.reduce(dt, axis=0)
+        np.sqrt(dt, dt)
+
+        dt = xp.asarray(dt)
+        assert_array_almost_equal(bf, dt)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace distances= are numpy-specific'
+    )
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_edt02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        tdt, tft = ndimage.distance_transform_edt(data, return_indices=True)
+        dts = []
+        fts = []
+
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ndimage.distance_transform_edt(data, distances=dt)
+        dts.append(dt)
+
+        ft = ndimage.distance_transform_edt(
+            data, return_distances=0, return_indices=True)
+        fts.append(ft)
+
+        ft = np.indices(data.shape, dtype=xp.int32)
+        ft = xp.asarray(ft)
+        ndimage.distance_transform_edt(
+            data, return_distances=False, return_indices=True, indices=ft)
+        fts.append(ft)
+
+        dt, ft = ndimage.distance_transform_edt(
+            data, return_indices=True)
+        dts.append(dt)
+        fts.append(ft)
+
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ft = ndimage.distance_transform_edt(
+            data, distances=dt, return_indices=True)
+        dts.append(dt)
+        fts.append(ft)
+
+        ft = np.indices(data.shape, dtype=xp.int32)
+        ft = xp.asarray(ft)
+        dt = ndimage.distance_transform_edt(
+            data, return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+
+        dt = xp.zeros(data.shape, dtype=xp.float64)
+        ft = np.indices(data.shape, dtype=xp.int32)
+        ft = xp.asarray(ft)
+        ndimage.distance_transform_edt(
+            data, distances=dt, return_indices=True, indices=ft)
+        dts.append(dt)
+        fts.append(ft)
+
+        for dt in dts:
+            assert_array_almost_equal(tdt, dt)
+        for ft in fts:
+            assert_array_almost_equal(tft, ft)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_edt03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_bf")
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        ref = ndimage.distance_transform_bf(data, 'euclidean', sampling=[2, 2])
+        out = ndimage.distance_transform_edt(data, sampling=[2, 2])
+        assert_array_almost_equal(ref, out)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_distance_transform_edt4(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        if is_cupy(xp):
+            pytest.xfail("CuPy does not have distance_transform_bf")
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        ref = ndimage.distance_transform_bf(data, 'euclidean', sampling=[2, 1])
+        out = ndimage.distance_transform_edt(data, sampling=[2, 1])
+        assert_array_almost_equal(ref, out)
+
+    def test_distance_transform_edt5(self, xp):
+        # Ticket #954 regression test
+        out = ndimage.distance_transform_edt(False)
+        assert_array_almost_equal(out, [0.])
+
+    @skip_xp_backends(
+        np_only=True, reason='XXX: does not raise unless indices is a numpy array'
+    )
+    def test_distance_transform_edt6(self, xp):
+        # test input validation per discussion on PR #13302
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0, 0]])
+        distances_out = xp.zeros(data.shape, dtype=xp.float64)
+        with assert_raises(RuntimeError):
+            ndimage.distance_transform_bf(
+                data,
+                return_indices=True,
+                return_distances=False,
+                distances=distances_out
+            )
+
+    def test_generate_structure01(self, xp):
+        struct = ndimage.generate_binary_structure(0, 1)
+        assert struct == 1
+
+    def test_generate_structure02(self, xp):
+        struct = ndimage.generate_binary_structure(1, 1)
+        assert_array_almost_equal(struct, [1, 1, 1])
+
+    def test_generate_structure03(self, xp):
+        struct = ndimage.generate_binary_structure(2, 1)
+        assert_array_almost_equal(struct, [[0, 1, 0],
+                                           [1, 1, 1],
+                                           [0, 1, 0]])
+
+    def test_generate_structure04(self, xp):
+        struct = ndimage.generate_binary_structure(2, 2)
+        assert_array_almost_equal(struct, [[1, 1, 1],
+                                           [1, 1, 1],
+                                           [1, 1, 1]])
+
+    def test_iterate_structure01(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        out = ndimage.iterate_structure(struct, 2)
+        expected = np.asarray([[0, 0, 1, 0, 0],
+                               [0, 1, 1, 1, 0],
+                               [1, 1, 1, 1, 1],
+                               [0, 1, 1, 1, 0],
+                               [0, 0, 1, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out, expected)
+
+    def test_iterate_structure02(self, xp):
+        struct = [[0, 1],
+                  [1, 1],
+                  [0, 1]]
+        struct = xp.asarray(struct)
+        out = ndimage.iterate_structure(struct, 2)
+        expected = np.asarray([[0, 0, 1],
+                               [0, 1, 1],
+                               [1, 1, 1],
+                               [0, 1, 1],
+                               [0, 0, 1]], dtype=bool)
+        expected = xp.asarray(expected)
+
+        assert_array_almost_equal(out, expected)
+
+    def test_iterate_structure03(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        out = ndimage.iterate_structure(struct, 2, 1)
+        expected = [[0, 0, 1, 0, 0],
+                    [0, 1, 1, 1, 0],
+                    [1, 1, 1, 1, 1],
+                    [0, 1, 1, 1, 0],
+                    [0, 0, 1, 0, 0]]
+        expected = np.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        assert_array_almost_equal(out[0], expected)
+        assert out[1] == [2, 2]
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert out == xp.asarray(1, dtype=out.dtype)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert out == xp.asarray(1, dtype=out.dtype)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion04(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion05(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion06(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion07(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([5], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 1, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion08(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([5], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion09(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([0, 0, 0, 0, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion10(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 0, 0, 0, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion11(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_erosion(data, struct, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 0, 1, 0, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion12(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_erosion(data, struct, border_value=1, origin=-1)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 0, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion13(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_erosion(data, struct, border_value=1, origin=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 0, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion14(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 1])
+        out = ndimage.binary_erosion(data, struct, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 0, 0, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion15(self, dtype, xp):
+        data = np.ones([5], dtype=dtype)
+        data[2] = 0
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 1])
+        out = ndimage.binary_erosion(data, struct, border_value=1, origin=-1)
+        assert_array_almost_equal(out, xp.asarray([1, 0, 0, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion16(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 1], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([[1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion17(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 1], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([[0]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion18(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 3], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion19(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 3], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([[1, 1, 1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion20(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3, 3], dtype=dtype)
+        out = ndimage.binary_erosion(data)
+        assert_array_almost_equal(out, xp.asarray([[0, 0, 0],
+                                                   [0, 1, 0],
+                                                   [0, 0, 0]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion21(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3, 3], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([[1, 1, 1],
+                                                   [1, 1, 1],
+                                                   [1, 1, 1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion22(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 0, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_erosion(data, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion23(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = ndimage.generate_binary_structure(2, 2)
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 0, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_erosion(data, struct, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion24(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = xp.asarray([[0, 1],
+                             [1, 1]])
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 1, 1, 1],
+                    [0, 0, 0, 1, 1, 1, 0, 0],
+                    [0, 0, 1, 1, 1, 1, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 1, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 0, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_erosion(data, struct, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion25(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = [[0, 1, 0],
+                  [1, 0, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 0, 1, 1],
+                           [0, 0, 1, 0, 1, 1, 0, 0],
+                           [0, 1, 0, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 0, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_erosion(data, struct, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_erosion26(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = [[0, 1, 0],
+                  [1, 0, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 1],
+                    [0, 0, 0, 0, 1, 0, 0, 1],
+                    [0, 0, 1, 0, 0, 0, 0, 0],
+                    [0, 1, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 1]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 1, 1],
+                           [0, 0, 1, 1, 1, 0, 1, 1],
+                           [0, 0, 1, 0, 1, 1, 0, 0],
+                           [0, 1, 0, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 0, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_erosion(data, struct, border_value=1,
+                                     origin=(-1, -1))
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion27(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, struct, border_value=1,
+                                     iterations=2)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion28(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = np.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=2, output=out)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion29(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, struct,
+                                     border_value=1, iterations=3)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion30(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = np.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=3, output=out)
+        assert_array_almost_equal(out, expected)
+
+        # test with output memory overlap
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=3, output=data)
+        assert_array_almost_equal(data, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion31(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 1, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 0, 0, 0],
+                    [1, 1, 1, 1, 1, 0, 1],
+                    [0, 1, 1, 1, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 1]]
+        expected = np.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=1, output=out, origin=(-1, -1))
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion32(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, struct,
+                                     border_value=1, iterations=2)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion33(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 1, 1],
+                    [0, 0, 0, 0, 0, 0, 1],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        mask = [[1, 1, 1, 1, 1, 0, 0],
+                [1, 1, 1, 1, 1, 1, 0],
+                [1, 1, 1, 1, 1, 1, 1],
+                [1, 1, 1, 1, 1, 1, 1],
+                [1, 1, 1, 1, 1, 1, 1],
+                [1, 1, 1, 1, 1, 1, 1],
+                [1, 1, 1, 1, 1, 1, 1]]
+        mask = xp.asarray(mask)
+        data = np.asarray([[0, 0, 0, 0, 0, 1, 1],
+                           [0, 0, 0, 1, 0, 0, 1],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, struct,
+                                     border_value=1, mask=mask, iterations=-1)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion34(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        mask = [[0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0],
+                [0, 0, 1, 0, 1, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0]]
+        mask = xp.asarray(mask)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_erosion(data, struct,
+                                     border_value=1, mask=mask)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion35(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        mask = [[0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0],
+                [0, 0, 1, 0, 1, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0]]
+        mask = np.asarray(mask, dtype=bool)
+        mask = xp.asarray(mask)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        tmp = [[0, 0, 1, 0, 0, 0, 0],
+               [0, 1, 1, 1, 0, 0, 0],
+               [1, 1, 1, 1, 1, 0, 1],
+               [0, 1, 1, 1, 0, 0, 0],
+               [0, 0, 1, 0, 0, 0, 0],
+               [0, 0, 0, 0, 0, 0, 0],
+               [0, 0, 1, 0, 0, 0, 1]]
+        tmp = np.asarray(tmp, dtype=bool)
+        tmp = xp.asarray(tmp)
+        expected = xp.logical_and(tmp, mask)
+        tmp = xp.logical_and(data, xp.logical_not(mask))
+        expected = xp.logical_or(expected, tmp)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=1, output=out,
+                               origin=(-1, -1), mask=mask)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_erosion36(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 0, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        mask = [[0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0, 0],
+                [0, 0, 1, 0, 1, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0, 0],
+                [0, 0, 1, 1, 1, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0]]
+        mask = np.asarray(mask, dtype=bool)
+        mask = xp.asarray(mask)
+        tmp = [[0, 0, 0, 0, 0, 0, 0, 0],
+               [0, 0, 0, 0, 0, 0, 0, 1],
+               [0, 0, 0, 0, 1, 0, 0, 1],
+               [0, 0, 1, 0, 0, 0, 0, 0],
+               [0, 1, 0, 0, 1, 0, 0, 0],
+               [0, 0, 0, 0, 0, 0, 0, 0],
+               [0, 0, 0, 0, 0, 0, 0, 0],
+               [0, 0, 0, 0, 0, 0, 0, 1]]
+        tmp = np.asarray(tmp, dtype=bool)
+        tmp = xp.asarray(tmp)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                            [0, 1, 0, 0, 0, 0, 0, 0],
+                            [0, 0, 0, 0, 0, 1, 1, 1],
+                            [0, 0, 1, 1, 1, 0, 1, 1],
+                            [0, 0, 1, 0, 1, 1, 0, 0],
+                            [0, 1, 0, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 0, 0, 1, 1, 0],
+                            [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        expected = xp.logical_and(tmp, mask)
+        tmp = xp.logical_and(data, xp.logical_not(mask))
+        expected = xp.logical_or(expected, tmp)
+        out = ndimage.binary_erosion(data, struct, mask=mask,
+                                     border_value=1, origin=(-1, -1))
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion37(self, xp):
+        a = np.asarray([[1, 0, 1],
+                        [0, 1, 0],
+                        [1, 0, 1]], dtype=bool)
+        a = xp.asarray(a)
+        b = xp.zeros_like(a)
+        out = ndimage.binary_erosion(a, structure=a, output=b, iterations=0,
+                                     border_value=True, brute_force=True)
+        assert out is b
+        xp_assert_equal(
+            ndimage.binary_erosion(a, structure=a, iterations=0,
+                                   border_value=True),
+            b)
+
+    def test_binary_erosion38(self, xp):
+        data = np.asarray([[1, 0, 1],
+                           [0, 1, 0],
+                           [1, 0, 1]], dtype=bool)
+        data = xp.asarray(data)
+        iterations = 2.0
+        with assert_raises(TypeError):
+            _ = ndimage.binary_erosion(data, iterations=iterations)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion39(self, xp):
+        iterations = np.int32(3)
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=iterations, output=out)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace out= arguments are numpy-specific'
+    )
+    def test_binary_erosion40(self, xp):
+        iterations = np.int64(3)
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0]]
+        expected = np.asarray(expected, dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [1, 1, 1, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_erosion(data, struct, border_value=1,
+                               iterations=iterations, output=out)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert out == xp.asarray(1, dtype=out.dtype)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.zeros([], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert out == xp.asarray(False)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([1], dtype=out.dtype))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation04(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.zeros([1], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation05(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation06(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.zeros([3], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([0, 0, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation07(self, dtype, xp):
+        data = np.zeros([3], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation08(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data[3] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 1, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation09(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 1, 0, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation10(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, origin=-1)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 1, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation11(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, origin=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 0, 0, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation12(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_dilation(data, struct)
+        assert_array_almost_equal(out, xp.asarray([1, 0, 1, 0, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation13(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_dilation(data, struct, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 0, 1, 0, 1]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation14(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_dilation(data, struct, origin=-1)
+        assert_array_almost_equal(out, xp.asarray([0, 1, 0, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation15(self, dtype, xp):
+        data = np.zeros([5], dtype=dtype)
+        data[1] = 1
+        data = xp.asarray(data)
+        struct = xp.asarray([1, 0, 1])
+        out = ndimage.binary_dilation(data, struct,
+                                      origin=-1, border_value=1)
+        assert_array_almost_equal(out, xp.asarray([1, 1, 0, 1, 0]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation16(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 1], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([[1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation17(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.zeros([1, 1], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([[0]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation18(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([1, 3], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([[1, 1, 1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation19(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        data = xp.ones([3, 3], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([[1, 1, 1],
+                                                   [1, 1, 1],
+                                                   [1, 1, 1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation20(self, dtype, xp):
+        data = np.zeros([3, 3], dtype=dtype)
+        data[1, 1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, xp.asarray([[0, 1, 0],
+                                                   [1, 1, 1],
+                                                   [0, 1, 0]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation21(self, dtype, xp):
+        struct = ndimage.generate_binary_structure(2, 2)
+        struct = xp.asarray(struct)
+        data = np.zeros([3, 3], dtype=dtype)
+        data[1, 1] = 1
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, struct)
+        assert_array_almost_equal(out, xp.asarray([[1, 1, 1],
+                                                   [1, 1, 1],
+                                                   [1, 1, 1]]))
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation22(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[0, 1, 0, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 1, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 1, 0],
+                    [0, 0, 1, 1, 1, 1, 0, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation23(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[1, 1, 1, 1, 1, 1, 1, 1],
+                    [1, 1, 1, 0, 0, 0, 0, 1],
+                    [1, 1, 0, 0, 0, 1, 0, 1],
+                    [1, 0, 0, 1, 1, 1, 1, 1],
+                    [1, 0, 1, 1, 1, 1, 0, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1],
+                    [1, 0, 1, 0, 0, 1, 0, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation24(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[1, 1, 0, 0, 0, 0, 0, 0],
+                    [1, 0, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 1, 1, 1, 1, 0, 0],
+                    [0, 1, 1, 1, 1, 0, 0, 0],
+                    [1, 1, 1, 1, 1, 1, 0, 0],
+                    [0, 1, 0, 0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, origin=(1, 1))
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation25(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[1, 1, 0, 0, 0, 0, 1, 1],
+                    [1, 0, 0, 0, 1, 0, 1, 1],
+                    [0, 0, 1, 1, 1, 1, 1, 1],
+                    [0, 1, 1, 1, 1, 0, 1, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1],
+                    [0, 1, 0, 0, 1, 0, 1, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1],
+                    [1, 1, 1, 1, 1, 1, 1, 1]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, origin=(1, 1), border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation26(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = ndimage.generate_binary_structure(2, 2)
+        expected = [[1, 1, 1, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 1, 1, 1, 0],
+                    [0, 0, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, struct)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation27(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = [[0, 1],
+                  [1, 1]]
+        expected = [[0, 1, 0, 0, 0, 0, 0, 0],
+                    [1, 1, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 1, 1, 1, 0, 0],
+                    [0, 0, 1, 1, 1, 1, 0, 0],
+                    [0, 1, 1, 0, 1, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, struct)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation28(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[1, 1, 1, 1],
+                    [1, 0, 0, 1],
+                    [1, 0, 0, 1],
+                    [1, 1, 1, 1]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0],
+                           [0, 0, 0, 0],
+                           [0, 0, 0, 0],
+                           [0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_dilation29(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1],
+                  [1, 1]]
+        expected = [[0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0],
+                    [0, 0, 1, 1, 0],
+                    [0, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, struct, iterations=2)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(np_only=True, reason='output= arrays are numpy-specific')
+    def test_binary_dilation30(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+        struct = [[0, 1],
+                  [1, 1]]
+        expected = [[0, 0, 0, 0, 0],
+                    [0, 0, 0, 1, 0],
+                    [0, 0, 1, 1, 0],
+                    [0, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_dilation(data, struct, iterations=2, output=out)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_dilation31(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1],
+                  [1, 1]]
+        expected = [[0, 0, 0, 1, 0],
+                    [0, 0, 1, 1, 0],
+                    [0, 1, 1, 1, 0],
+                    [1, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, struct, iterations=3)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(np_only=True, reason='output= arrays are numpy-specific')
+    def test_binary_dilation32(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1],
+                  [1, 1]]
+        expected = [[0, 0, 0, 1, 0],
+                    [0, 0, 1, 1, 0],
+                    [0, 1, 1, 1, 0],
+                    [1, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = np.zeros(data.shape, dtype=bool)
+        out = xp.asarray(out)
+        ndimage.binary_dilation(data, struct, iterations=3, output=out)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_dilation33(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 0, 0, 0],
+                               [0, 1, 1, 0, 1, 1, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+        mask = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 1, 1, 0, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        mask = xp.asarray(mask)
+        data = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+
+        out = ndimage.binary_dilation(data, struct, iterations=-1,
+                                      mask=mask, border_value=0)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(
+        np_only=True, reason='inplace output= arrays are numpy-specific',
+    )
+    def test_binary_dilation34(self, xp):
+        if is_cupy(xp):
+            pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 1, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        mask = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        mask = xp.asarray(mask)
+        data = np.zeros(mask.shape, dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, struct, iterations=-1,
+                                      mask=mask, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_dilation35(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        tmp = [[1, 1, 0, 0, 0, 0, 1, 1],
+               [1, 0, 0, 0, 1, 0, 1, 1],
+               [0, 0, 1, 1, 1, 1, 1, 1],
+               [0, 1, 1, 1, 1, 0, 1, 1],
+               [1, 1, 1, 1, 1, 1, 1, 1],
+               [0, 1, 0, 0, 1, 0, 1, 1],
+               [1, 1, 1, 1, 1, 1, 1, 1],
+               [1, 1, 1, 1, 1, 1, 1, 1]]
+
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]])
+        mask = [[0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 1, 1, 1, 1, 0, 0],
+                [0, 0, 1, 1, 1, 1, 0, 0],
+                [0, 0, 1, 1, 1, 1, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0],
+                [0, 0, 0, 0, 0, 0, 0, 0]]
+        mask = np.asarray(mask, dtype=bool)
+
+        expected = np.logical_and(tmp, mask)
+        tmp = np.logical_and(data, np.logical_not(mask))
+        expected = np.logical_or(expected, tmp)
+
+        mask = xp.asarray(mask)
+        expected = xp.asarray(expected)
+
+        data = xp.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_dilation(data, mask=mask,
+                                      origin=(1, 1), border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_dilation36(self, xp):
+        # gh-21009
+        data = np.zeros([], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_dilation(data, iterations=-1)
+        assert out == xp.asarray(False)
+
+    def test_binary_propagation01(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 0, 0, 0],
+                               [0, 1, 1, 0, 1, 1, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+        mask = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 1, 0],
+                           [0, 0, 0, 0, 1, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 0, 0, 0],
+                           [0, 1, 1, 0, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        mask = xp.asarray(mask)
+        data = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_propagation(data, struct,
+                                         mask=mask, border_value=0)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_propagation02(self, xp):
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        expected = [[0, 1, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        struct = xp.asarray(struct)
+        mask = np.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [0, 1, 1, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        mask = xp.asarray(mask)
+        data = np.zeros(mask.shape, dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_propagation(data, struct,
+                                         mask=mask, border_value=1)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_propagation03(self, xp):
+        # gh-21009
+        data = xp.asarray(np.zeros([], dtype=bool))
+        expected = xp.asarray(np.zeros([], dtype=bool))
+        out = ndimage.binary_propagation(data)
+        assert out == expected
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_opening01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[0, 1, 0, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 1, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 1, 1, 1, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 0, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_opening(data)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_opening02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = ndimage.generate_binary_structure(2, 2)
+        expected = [[1, 1, 1, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 0, 0, 0, 0],
+                    [1, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        struct = xp.asarray(struct)
+        data = xp.asarray([[1, 1, 1, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 0, 1, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_opening(data, struct)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_closing01(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 0, 1, 0, 0],
+                    [0, 0, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 1, 1, 1, 1, 0, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 1, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 1, 0, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 0, 1, 0, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_closing(data)
+        assert_array_almost_equal(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_binary_closing02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = ndimage.generate_binary_structure(2, 2)
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 0, 0, 0, 0, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 1, 1, 1, 1, 1, 1, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        struct = xp.asarray(struct)
+        data = xp.asarray([[1, 1, 1, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 0, 0, 0, 0, 0],
+                           [1, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 0, 1, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_closing(data, struct)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_fill_holes01(self, xp):
+        expected = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 1, 1, 1, 1, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+
+        out = ndimage.binary_fill_holes(data)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_fill_holes02(self, xp):
+        expected = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 0, 1, 1, 0, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 1, 1, 1, 1, 0, 0],
+                               [0, 0, 0, 1, 1, 0, 0, 0],
+                               [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 1, 0, 0, 1, 0, 0],
+                           [0, 0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_fill_holes(data)
+        assert_array_almost_equal(out, expected)
+
+    def test_binary_fill_holes03(self, xp):
+        expected = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                               [0, 0, 1, 0, 0, 0, 0, 0],
+                               [0, 1, 1, 1, 0, 1, 1, 1],
+                               [0, 1, 1, 1, 0, 1, 1, 1],
+                               [0, 1, 1, 1, 0, 1, 1, 1],
+                               [0, 0, 1, 0, 0, 1, 1, 1],
+                               [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+        data = np.asarray([[0, 0, 0, 0, 0, 0, 0, 0],
+                           [0, 0, 1, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 1, 0, 1, 1, 1],
+                           [0, 1, 0, 1, 0, 1, 0, 1],
+                           [0, 1, 0, 1, 0, 1, 0, 1],
+                           [0, 0, 1, 0, 0, 1, 1, 1],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=bool)
+        data = xp.asarray(data)
+        out = ndimage.binary_fill_holes(data)
+        assert_array_almost_equal(out, expected)
+
+    @skip_xp_backends(cpu_only=True)
+    @skip_xp_backends(
+        "cupy", reason="these filters do not yet have axes support in CuPy")
+    @skip_xp_backends(
+        "jax.numpy", reason="these filters are not implemented in JAX.numpy")
+    @pytest.mark.parametrize('border_value',[0, 1])
+    @pytest.mark.parametrize('origin', [(0, 0), (-1, 0)])
+    @pytest.mark.parametrize('expand_axis', [0, 1, 2])
+    @pytest.mark.parametrize('func_name', ["binary_erosion",
+                                           "binary_dilation",
+                                           "binary_opening",
+                                           "binary_closing",
+                                           "binary_hit_or_miss",
+                                           "binary_propagation",
+                                           "binary_fill_holes"])
+    def test_binary_axes(self, xp, func_name, expand_axis, origin, border_value):
+        struct = np.asarray([[0, 1, 0],
+                             [1, 1, 1],
+                             [0, 1, 0]], bool)
+        struct = xp.asarray(struct)
+
+        data = np.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 1, 1, 0, 1, 0],
+                           [0, 1, 0, 1, 1, 0, 1],
+                           [0, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 0, 0, 0],
+                           [0, 0, 0, 1, 0, 0, 0]], bool)
+        data = xp.asarray(data)
+        if func_name == "binary_hit_or_miss":
+            kwargs = dict(origin1=origin, origin2=origin)
+        else:
+            kwargs = dict(origin=origin)
+        border_supported = func_name not in ["binary_hit_or_miss",
+                                             "binary_fill_holes"]
+        if border_supported:
+            kwargs['border_value'] = border_value
+        elif border_value != 0:
+            pytest.skip('border_value !=0 unsupported by this function')
+        func = getattr(ndimage, func_name)
+        expected = func(data, struct, **kwargs)
+
+        # replicate data and expected result along a new axis
+        n_reps = 5
+        expected = xp.stack([expected] * n_reps, axis=expand_axis)
+        data = xp.stack([data] * n_reps, axis=expand_axis)
+
+        # filter all axes except expand_axis
+        axes = [0, 1, 2]
+        axes.remove(expand_axis)
+        if is_numpy(xp) or is_cupy(xp):
+            out = xp.asarray(np.zeros(data.shape, bool))
+            func(data, struct, output=out, axes=axes, **kwargs)
+        else:
+            # inplace output= is unsupported by JAX
+            out = func(data, struct, axes=axes, **kwargs)
+        xp_assert_close(out, expected)
+
+    def test_grey_erosion01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        output = ndimage.grey_erosion(array, footprint=footprint)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 3, 1, 3, 1],
+                                              [5, 5, 3, 3, 1]]))
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    @xfail_xp_backends("cupy", reason="https://github.com/cupy/cupy/issues/8398")
+    def test_grey_erosion01_overlap(self, xp):
+
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        ndimage.grey_erosion(array, footprint=footprint, output=array)
+        assert_array_almost_equal(array,
+                                  xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 3, 1, 3, 1],
+                                              [5, 5, 3, 3, 1]])
+        )
+
+    def test_grey_erosion02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        output = ndimage.grey_erosion(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[2, 2, 1, 1, 1],
+                                              [2, 3, 1, 3, 1],
+                                              [5, 5, 3, 3, 1]])
+        )
+
+    def test_grey_erosion03(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[1, 1, 1], [1, 1, 1]])
+        output = ndimage.grey_erosion(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[1, 1, 0, 0, 0],
+                                              [1, 2, 0, 2, 0],
+                                              [4, 4, 2, 2, 0]])
+        )
+
+    def test_grey_dilation01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[0, 1, 1], [1, 0, 1]])
+        output = ndimage.grey_dilation(array, footprint=footprint)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[7, 7, 9, 9, 5],
+                                              [7, 9, 8, 9, 7],
+                                              [8, 8, 8, 7, 7]]),
+        )
+
+    def test_grey_dilation02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[0, 1, 1], [1, 0, 1]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        output = ndimage.grey_dilation(array, footprint=footprint,
+                                       structure=structure)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[7, 7, 9, 9, 5],
+                                              [7, 9, 8, 9, 7],
+                                              [8, 8, 8, 7, 7]]),
+        )
+
+    def test_grey_dilation03(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[0, 1, 1], [1, 0, 1]])
+        structure = xp.asarray([[1, 1, 1], [1, 1, 1]])
+        output = ndimage.grey_dilation(array, footprint=footprint,
+                                       structure=structure)
+        assert_array_almost_equal(output,
+                                  xp.asarray([[8, 8, 10, 10, 6],
+                                              [8, 10, 9, 10, 8],
+                                              [9, 9, 9, 8, 8]]),
+        )
+
+    def test_grey_opening01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        tmp = ndimage.grey_erosion(array, footprint=footprint)
+        expected = ndimage.grey_dilation(tmp, footprint=footprint)
+        output = ndimage.grey_opening(array, footprint=footprint)
+        assert_array_almost_equal(output, expected)
+
+    def test_grey_opening02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_erosion(array, footprint=footprint,
+                                   structure=structure)
+        expected = ndimage.grey_dilation(tmp, footprint=footprint,
+                                         structure=structure)
+        output = ndimage.grey_opening(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(output, expected)
+
+    def test_grey_closing01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        tmp = ndimage.grey_dilation(array, footprint=footprint)
+        expected = ndimage.grey_erosion(tmp, footprint=footprint)
+        output = ndimage.grey_closing(array, footprint=footprint)
+        assert_array_almost_equal(expected, output)
+
+    def test_grey_closing02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_dilation(array, footprint=footprint,
+                                    structure=structure)
+        expected = ndimage.grey_erosion(tmp, footprint=footprint,
+                                        structure=structure)
+        output = ndimage.grey_closing(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(expected, output)
+
+    @skip_xp_backends(np_only=True, reason='output= arrays are numpy-specific')
+    def test_morphological_gradient01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp1 = ndimage.grey_dilation(array, footprint=footprint,
+                                     structure=structure)
+        tmp2 = ndimage.grey_erosion(array, footprint=footprint,
+                                    structure=structure)
+        expected = tmp1 - tmp2
+        output = xp.zeros(array.shape, dtype=array.dtype)
+        ndimage.morphological_gradient(array, footprint=footprint,
+                                       structure=structure, output=output)
+        assert_array_almost_equal(expected, output)
+
+    def test_morphological_gradient02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp1 = ndimage.grey_dilation(array, footprint=footprint,
+                                     structure=structure)
+        tmp2 = ndimage.grey_erosion(array, footprint=footprint,
+                                    structure=structure)
+        expected = tmp1 - tmp2
+        output = ndimage.morphological_gradient(array, footprint=footprint,
+                                                structure=structure)
+        assert_array_almost_equal(expected, output)
+
+    @skip_xp_backends(np_only=True, reason='output= arrays are numpy-specific')
+    def test_morphological_laplace01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp1 = ndimage.grey_dilation(array, footprint=footprint,
+                                     structure=structure)
+        tmp2 = ndimage.grey_erosion(array, footprint=footprint,
+                                    structure=structure)
+        expected = tmp1 + tmp2 - 2 * array
+        output = xp.zeros(array.shape, dtype=array.dtype)
+        ndimage.morphological_laplace(array, footprint=footprint,
+                                      structure=structure, output=output)
+        assert_array_almost_equal(expected, output)
+
+    def test_morphological_laplace02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp1 = ndimage.grey_dilation(array, footprint=footprint,
+                                     structure=structure)
+        tmp2 = ndimage.grey_erosion(array, footprint=footprint,
+                                    structure=structure)
+        expected = tmp1 + tmp2 - 2 * array
+        output = ndimage.morphological_laplace(array, footprint=footprint,
+                                               structure=structure)
+        assert_array_almost_equal(expected, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_white_tophat01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_opening(array, footprint=footprint,
+                                   structure=structure)
+        expected = array - tmp
+        output = xp.zeros(array.shape, dtype=array.dtype)
+        ndimage.white_tophat(array, footprint=footprint,
+                             structure=structure, output=output)
+        assert_array_almost_equal(expected, output)
+
+    def test_white_tophat02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_opening(array, footprint=footprint,
+                                   structure=structure)
+        expected = array - tmp
+        output = ndimage.white_tophat(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(expected, output)
+
+    @xfail_xp_backends('cupy', reason="cupy#8399")
+    def test_white_tophat03(self, xp):
+
+        array = np.asarray([[1, 0, 0, 0, 0, 0, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 0, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 0, 0, 0, 0, 0, 1]], dtype=bool)
+        array = xp.asarray(array)
+        structure = np.ones((3, 3), dtype=bool)
+        structure = xp.asarray(structure)
+        expected = np.asarray([[0, 1, 1, 0, 0, 0, 0],
+                               [1, 0, 0, 1, 1, 1, 0],
+                               [1, 0, 0, 1, 1, 1, 0],
+                               [0, 1, 1, 0, 0, 0, 1],
+                               [0, 1, 1, 0, 1, 0, 1],
+                               [0, 1, 1, 0, 0, 0, 1],
+                               [0, 0, 0, 1, 1, 1, 1]], dtype=bool)
+        expected = xp.asarray(expected)
+
+        output = ndimage.white_tophat(array, structure=structure)
+        xp_assert_equal(expected, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_white_tophat04(self, xp):
+        array = np.eye(5, dtype=bool)
+        structure = np.ones((3, 3), dtype=bool)
+
+        array = xp.asarray(array)
+        structure = xp.asarray(structure)
+
+        # Check that type mismatch is properly handled
+        output = xp.empty_like(array, dtype=xp.float64)
+        ndimage.white_tophat(array, structure=structure, output=output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_black_tophat01(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_closing(array, footprint=footprint,
+                                   structure=structure)
+        expected = tmp - array
+        output = xp.zeros(array.shape, dtype=array.dtype)
+        ndimage.black_tophat(array, footprint=footprint,
+                             structure=structure, output=output)
+        assert_array_almost_equal(expected, output)
+
+    def test_black_tophat02(self, xp):
+        array = xp.asarray([[3, 2, 5, 1, 4],
+                            [7, 6, 9, 3, 5],
+                            [5, 8, 3, 7, 1]])
+        footprint = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        structure = xp.asarray([[0, 0, 0], [0, 0, 0]])
+        tmp = ndimage.grey_closing(array, footprint=footprint,
+                                   structure=structure)
+        expected = tmp - array
+        output = ndimage.black_tophat(array, footprint=footprint,
+                                      structure=structure)
+        assert_array_almost_equal(expected, output)
+
+    @xfail_xp_backends('cupy', reason="cupy/cupy#8399")
+    def test_black_tophat03(self, xp):
+
+        array = np.asarray([[1, 0, 0, 0, 0, 0, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 1, 1, 1, 0, 1, 0],
+                            [0, 1, 1, 1, 1, 1, 0],
+                            [0, 0, 0, 0, 0, 0, 1]], dtype=bool)
+        array = xp.asarray(array)
+        structure = np.ones((3, 3), dtype=bool)
+        structure = xp.asarray(structure)
+        expected = np.asarray([[0, 1, 1, 1, 1, 1, 1],
+                               [1, 0, 0, 0, 0, 0, 1],
+                               [1, 0, 0, 0, 0, 0, 1],
+                               [1, 0, 0, 0, 0, 0, 1],
+                               [1, 0, 0, 0, 1, 0, 1],
+                               [1, 0, 0, 0, 0, 0, 1],
+                               [1, 1, 1, 1, 1, 1, 0]], dtype=bool)
+        expected = xp.asarray(expected)
+
+        output = ndimage.black_tophat(array, structure=structure)
+        xp_assert_equal(expected, output)
+
+    @skip_xp_backends("jax.numpy", reason="output array is read-only.")
+    def test_black_tophat04(self, xp):
+        array = xp.asarray(np.eye(5, dtype=bool))
+        structure = xp.asarray(np.ones((3, 3), dtype=bool))
+
+        # Check that type mismatch is properly handled
+        output = xp.empty_like(array, dtype=xp.float64)
+        ndimage.black_tophat(array, structure=structure, output=output)
+
+    @skip_xp_backends(cpu_only=True)
+    @skip_xp_backends(
+        "cupy", reason="these filters do not yet have axes support in CuPy")
+    @skip_xp_backends(
+        "jax.numpy", reason="these filters are not implemented in JAX.numpy")
+    @pytest.mark.parametrize('origin', [(0, 0), (-1, 0)])
+    @pytest.mark.parametrize('expand_axis', [0, 1, 2])
+    @pytest.mark.parametrize('mode', ['reflect', 'constant', 'nearest',
+                                      'mirror', 'wrap'])
+    @pytest.mark.parametrize('footprint_mode', ['size', 'footprint',
+                                                'structure'])
+    @pytest.mark.parametrize('func_name', ["grey_erosion",
+                                           "grey_dilation",
+                                           "grey_opening",
+                                           "grey_closing",
+                                           "morphological_laplace",
+                                           "morphological_gradient",
+                                           "white_tophat",
+                                           "black_tophat"])
+    def test_grey_axes(self, xp, func_name, expand_axis, origin, footprint_mode,
+                       mode):
+
+        data = xp.asarray([[0, 0, 0, 1, 0, 0, 0],
+                           [0, 0, 0, 4, 0, 0, 0],
+                           [0, 0, 2, 1, 0, 2, 0],
+                           [0, 3, 0, 6, 5, 0, 1],
+                           [0, 4, 5, 3, 3, 4, 0],
+                           [0, 0, 9, 3, 0, 0, 0],
+                           [0, 0, 0, 2, 0, 0, 0]])
+        kwargs = dict(origin=origin, mode=mode)
+        if footprint_mode == 'size':
+            kwargs['size'] = (2, 3)
+        else:
+            kwargs['footprint'] = xp.asarray([[1, 0, 1], [1, 1, 0]])
+        if footprint_mode == 'structure':
+            kwargs['structure'] = xp.ones_like(kwargs['footprint'])
+        func = getattr(ndimage, func_name)
+        expected = func(data, **kwargs)
+
+        # replicate data and expected result along a new axis
+        n_reps = 5
+        expected = xp.stack([expected] * n_reps, axis=expand_axis)
+        data = xp.stack([data] * n_reps, axis=expand_axis)
+
+        # filter all axes except expand_axis
+        axes = [0, 1, 2]
+        axes.remove(expand_axis)
+
+        if is_numpy(xp) or is_cupy(xp):
+            out = xp.zeros(expected.shape, dtype=expected.dtype)
+            func(data, output=out, axes=axes, **kwargs)
+        else:
+            # inplace output= is unsupported by JAX
+            out = func(data, axes=axes, **kwargs)
+        xp_assert_close(out, expected)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_hit_or_miss01(self, dtype, xp):
+        if not (is_numpy(xp) or is_cupy(xp)):
+            pytest.xfail("inplace output= is numpy-specific")
+
+        dtype = getattr(xp, dtype)
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        struct = xp.asarray(struct)
+        expected = [[0, 0, 0, 0, 0],
+                    [0, 1, 0, 0, 0],
+                    [0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0]]
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 1, 0, 0, 0],
+                           [1, 1, 1, 0, 0],
+                           [0, 1, 0, 1, 1],
+                           [0, 0, 1, 1, 1],
+                           [0, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 1],
+                           [0, 1, 1, 1, 1],
+                           [0, 0, 0, 0, 0]], dtype=dtype)
+        out = xp.asarray(np.zeros(data.shape, dtype=bool))
+        ndimage.binary_hit_or_miss(data, struct, output=out)
+        assert_array_almost_equal(expected, out)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_hit_or_miss02(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct = [[0, 1, 0],
+                  [1, 1, 1],
+                  [0, 1, 0]]
+        expected = [[0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 1, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        struct = xp.asarray(struct)
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 1, 0, 0, 1, 1, 1, 0],
+                           [1, 1, 1, 0, 0, 1, 0, 0],
+                           [0, 1, 0, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_hit_or_miss(data, struct)
+        assert_array_almost_equal(expected, out)
+
+    @pytest.mark.parametrize('dtype', types)
+    def test_hit_or_miss03(self, dtype, xp):
+        dtype = getattr(xp, dtype)
+        struct1 = [[0, 0, 0],
+                   [1, 1, 1],
+                   [0, 0, 0]]
+        struct2 = [[1, 1, 1],
+                   [0, 0, 0],
+                   [1, 1, 1]]
+        expected = [[0, 0, 0, 0, 0, 1, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0],
+                    [0, 0, 1, 0, 0, 0, 0, 0],
+                    [0, 0, 0, 0, 0, 0, 0, 0]]
+        struct1 = xp.asarray(struct1)
+        struct2 = xp.asarray(struct2)
+        expected = xp.asarray(expected)
+        data = xp.asarray([[0, 1, 0, 0, 1, 1, 1, 0],
+                           [1, 1, 1, 0, 0, 0, 0, 0],
+                           [0, 1, 0, 1, 1, 1, 1, 0],
+                           [0, 0, 1, 1, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 0, 1, 1, 0],
+                           [0, 0, 0, 0, 1, 1, 1, 0],
+                           [0, 1, 1, 1, 1, 1, 1, 0],
+                           [0, 0, 0, 0, 0, 0, 0, 0]], dtype=dtype)
+        out = ndimage.binary_hit_or_miss(data, struct1, struct2)
+        assert_array_almost_equal(expected, out)
+
+
+class TestDilateFix:
+
+    # pytest's setup_method seems to clash with the autouse `xp` fixture
+    # so call _setup manually from all methods
+    def _setup(self, xp):
+        # dilation related setup
+        self.array = xp.asarray([[0, 0, 0, 0, 0],
+                                 [0, 0, 0, 0, 0],
+                                 [0, 0, 0, 1, 0],
+                                 [0, 0, 1, 1, 0],
+                                 [0, 0, 0, 0, 0]], dtype=xp.uint8)
+
+        self.sq3x3 = xp.ones((3, 3))
+        dilated3x3 = ndimage.binary_dilation(self.array, structure=self.sq3x3)
+
+        if is_numpy(xp):
+            self.dilated3x3 = dilated3x3.view(xp.uint8)
+        else:
+            astype = array_namespace(dilated3x3).astype
+            self.dilated3x3 = astype(dilated3x3, xp.uint8)
+
+
+    def test_dilation_square_structure(self, xp):
+        self._setup(xp)
+        result = ndimage.grey_dilation(self.array, structure=self.sq3x3)
+        # +1 accounts for difference between grey and binary dilation
+        assert_array_almost_equal(result, self.dilated3x3 + 1)
+
+    def test_dilation_scalar_size(self, xp):
+        self._setup(xp)
+        result = ndimage.grey_dilation(self.array, size=3)
+        assert_array_almost_equal(result, self.dilated3x3)
+
+
+class TestBinaryOpeningClosing:
+
+    def _setup(self, xp):
+        a = np.zeros((5, 5), dtype=bool)
+        a[1:4, 1:4] = True
+        a[4, 4] = True
+        self.array = xp.asarray(a)
+        self.sq3x3 = xp.ones((3, 3))
+        self.opened_old = ndimage.binary_opening(self.array, self.sq3x3,
+                                                 1, None, 0)
+        self.closed_old = ndimage.binary_closing(self.array, self.sq3x3,
+                                                 1, None, 0)
+
+    def test_opening_new_arguments(self, xp):
+        self._setup(xp)
+        opened_new = ndimage.binary_opening(self.array, self.sq3x3, 1, None,
+                                            0, None, 0, False)
+        xp_assert_equal(opened_new, self.opened_old)
+
+    def test_closing_new_arguments(self, xp):
+        self._setup(xp)
+        closed_new = ndimage.binary_closing(self.array, self.sq3x3, 1, None,
+                                            0, None, 0, False)
+        xp_assert_equal(closed_new, self.closed_old)
+
+
+def test_binary_erosion_noninteger_iterations(xp):
+    # regression test for gh-9905, gh-9909: ValueError for
+    # non integer iterations
+    data = xp.ones([1])
+    assert_raises(TypeError, ndimage.binary_erosion, data, iterations=0.5)
+    assert_raises(TypeError, ndimage.binary_erosion, data, iterations=1.5)
+
+
+def test_binary_dilation_noninteger_iterations(xp):
+    # regression test for gh-9905, gh-9909: ValueError for
+    # non integer iterations
+    data = xp.ones([1])
+    assert_raises(TypeError, ndimage.binary_dilation, data, iterations=0.5)
+    assert_raises(TypeError, ndimage.binary_dilation, data, iterations=1.5)
+
+
+def test_binary_opening_noninteger_iterations(xp):
+    # regression test for gh-9905, gh-9909: ValueError for
+    # non integer iterations
+    data = xp.ones([1])
+    assert_raises(TypeError, ndimage.binary_opening, data, iterations=0.5)
+    assert_raises(TypeError, ndimage.binary_opening, data, iterations=1.5)
+
+
+def test_binary_closing_noninteger_iterations(xp):
+    # regression test for gh-9905, gh-9909: ValueError for
+    # non integer iterations
+    data = xp.ones([1])
+    assert_raises(TypeError, ndimage.binary_closing, data, iterations=0.5)
+    assert_raises(TypeError, ndimage.binary_closing, data, iterations=1.5)
+
+
+def test_binary_closing_noninteger_brute_force_passes_when_true(xp):
+    # regression test for gh-9905, gh-9909: ValueError for
+    # non integer iterations
+    if is_cupy(xp):
+        pytest.xfail("CuPy: NotImplementedError: only brute_force iteration")
+
+    data = xp.ones([1])
+
+    xp_assert_equal(ndimage.binary_erosion(data, iterations=2, brute_force=1.5),
+                    ndimage.binary_erosion(data, iterations=2, brute_force=bool(1.5))
+    )
+    xp_assert_equal(ndimage.binary_erosion(data, iterations=2, brute_force=0.0),
+                    ndimage.binary_erosion(data, iterations=2, brute_force=bool(0.0))
+    )
+
+
+@pytest.mark.parametrize(
+    'function',
+    ['binary_erosion', 'binary_dilation', 'binary_opening', 'binary_closing'],
+)
+@pytest.mark.parametrize('iterations', [1, 5])
+@pytest.mark.parametrize('brute_force', [False, True])
+def test_binary_input_as_output(function, iterations, brute_force, xp):
+    rstate = np.random.RandomState(123)
+    data = rstate.randint(low=0, high=2, size=100).astype(bool)
+    ndi_func = getattr(ndimage, function)
+
+    # input data is not modified
+    data_orig = data.copy()
+    expected = ndi_func(data, brute_force=brute_force, iterations=iterations)
+    xp_assert_equal(data, data_orig)
+
+    # data should now contain the expected result
+    ndi_func(data, brute_force=brute_force, iterations=iterations, output=data)
+    xp_assert_equal(expected, data)
+
+
+def test_binary_hit_or_miss_input_as_output(xp):
+    if not (is_numpy(xp) or is_cupy(xp)):
+        pytest.xfail("inplace output= is numpy-specific")
+
+    rstate = np.random.RandomState(123)
+    data = rstate.randint(low=0, high=2, size=100).astype(bool)
+
+    # input data is not modified
+    data_orig = data.copy()
+    expected = ndimage.binary_hit_or_miss(data)
+    xp_assert_equal(data, data_orig)
+
+    # data should now contain the expected result
+    ndimage.binary_hit_or_miss(data, output=data)
+    xp_assert_equal(expected, data)
+
+
+def test_distance_transform_cdt_invalid_metric(xp):
+    if is_cupy(xp):
+        pytest.xfail("CuPy does not have distance_transform_cdt")
+
+    msg = 'invalid metric provided'
+    with pytest.raises(ValueError, match=msg):
+        ndimage.distance_transform_cdt(xp.ones((5, 5)),
+                                       metric="garbage")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_ni_support.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_ni_support.py
new file mode 100644
index 0000000000000000000000000000000000000000..426d1cf0eccd1ac0f10a90412f008f4b3463c333
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_ni_support.py
@@ -0,0 +1,78 @@
+import pytest
+
+import numpy as np
+from .._ni_support import _get_output
+
+
+@pytest.mark.parametrize(
+    'dtype',
+    [
+        # String specifiers
+        'f4', 'float32', 'complex64', 'complex128',
+        # Type and dtype specifiers
+        np.float32, float, np.dtype('f4'),
+        # Derive from input
+        None,
+    ],
+)
+def test_get_output_basic(dtype):
+    shape = (2, 3)
+
+    input_ = np.zeros(shape, dtype='float32')
+
+    # For None, derive dtype from input
+    expected_dtype = 'float32' if dtype is None else dtype
+
+    # Output is dtype-specifier, retrieve shape from input
+    result = _get_output(dtype, input_)
+    assert result.shape == shape
+    assert result.dtype == np.dtype(expected_dtype)
+
+    # Output is dtype specifier, with explicit shape, overriding input
+    result = _get_output(dtype, input_, shape=(3, 2))
+    assert result.shape == (3, 2)
+    assert result.dtype == np.dtype(expected_dtype)
+
+    # Output is pre-allocated array, return directly
+    output = np.zeros(shape, dtype=dtype)
+    result = _get_output(output, input_)
+    assert result is output
+
+
+@pytest.mark.thread_unsafe
+def test_get_output_complex():
+    shape = (2, 3)
+
+    input_ = np.zeros(shape)
+
+    # None, promote input type to complex
+    result = _get_output(None, input_, complex_output=True)
+    assert result.shape == shape
+    assert result.dtype == np.dtype('complex128')
+
+    # Explicit type, promote type to complex
+    with pytest.warns(UserWarning, match='promoting specified output dtype to complex'):
+        result = _get_output(float, input_, complex_output=True)
+    assert result.shape == shape
+    assert result.dtype == np.dtype('complex128')
+
+    # String specifier, simply verify complex output
+    result = _get_output('complex64', input_, complex_output=True)
+    assert result.shape == shape
+    assert result.dtype == np.dtype('complex64')
+
+
+def test_get_output_error_cases():
+    input_ = np.zeros((2, 3), 'float32')
+
+    # Two separate paths can raise the same error
+    with pytest.raises(RuntimeError, match='output must have complex dtype'):
+        _get_output('float32', input_, complex_output=True)
+    with pytest.raises(RuntimeError, match='output must have complex dtype'):
+        _get_output(np.zeros((2, 3)), input_, complex_output=True)
+
+    with pytest.raises(RuntimeError, match='output must have numeric dtype'):
+        _get_output('void', input_)
+
+    with pytest.raises(RuntimeError, match='shape not correct'):
+        _get_output(np.zeros((3, 2)), input_)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_splines.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_splines.py
new file mode 100644
index 0000000000000000000000000000000000000000..2561ba5acef20ac340e06164bae96f187486c06a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/ndimage/tests/test_splines.py
@@ -0,0 +1,72 @@
+"""Tests for spline filtering."""
+import pytest
+
+import numpy as np
+from scipy._lib._array_api import assert_almost_equal
+
+from scipy import ndimage
+
+from scipy.conftest import array_api_compatible
+skip_xp_backends = pytest.mark.skip_xp_backends
+pytestmark = [array_api_compatible, pytest.mark.usefixtures("skip_xp_backends"),
+              skip_xp_backends(cpu_only=True, exceptions=['cupy', 'jax.numpy'],)]
+
+
+def get_spline_knot_values(order):
+    """Knot values to the right of a B-spline's center."""
+    knot_values = {0: [1],
+                   1: [1],
+                   2: [6, 1],
+                   3: [4, 1],
+                   4: [230, 76, 1],
+                   5: [66, 26, 1]}
+
+    return knot_values[order]
+
+
+def make_spline_knot_matrix(xp, n, order, mode='mirror'):
+    """Matrix to invert to find the spline coefficients."""
+    knot_values = get_spline_knot_values(order)
+
+    # NB: do computations with numpy, convert to xp as the last step only
+
+    matrix = np.zeros((n, n))
+    for diag, knot_value in enumerate(knot_values):
+        indices = np.arange(diag, n)
+        if diag == 0:
+            matrix[indices, indices] = knot_value
+        else:
+            matrix[indices, indices - diag] = knot_value
+            matrix[indices - diag, indices] = knot_value
+
+    knot_values_sum = knot_values[0] + 2 * sum(knot_values[1:])
+
+    if mode == 'mirror':
+        start, step = 1, 1
+    elif mode == 'reflect':
+        start, step = 0, 1
+    elif mode == 'grid-wrap':
+        start, step = -1, -1
+    else:
+        raise ValueError(f'unsupported mode {mode}')
+
+    for row in range(len(knot_values) - 1):
+        for idx, knot_value in enumerate(knot_values[row + 1:]):
+            matrix[row, start + step*idx] += knot_value
+            matrix[-row - 1, -start - 1 - step*idx] += knot_value
+
+    return xp.asarray(matrix / knot_values_sum)
+
+
+@pytest.mark.parametrize('order', [0, 1, 2, 3, 4, 5])
+@pytest.mark.parametrize('mode', ['mirror', 'grid-wrap', 'reflect'])
+def test_spline_filter_vs_matrix_solution(order, mode, xp):
+    n = 100
+    eye = xp.eye(n, dtype=xp.float64)
+    spline_filter_axis_0 = ndimage.spline_filter1d(eye, axis=0, order=order,
+                                                   mode=mode)
+    spline_filter_axis_1 = ndimage.spline_filter1d(eye, axis=1, order=order,
+                                                   mode=mode)
+    matrix = make_spline_knot_matrix(xp, n, order, mode=mode)
+    assert_almost_equal(eye, spline_filter_axis_0 @ matrix)
+    assert_almost_equal(eye, spline_filter_axis_1 @ matrix.T)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..a44a8c133b674aea416efeb4da469241b50a547f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/__init__.py
@@ -0,0 +1,131 @@
+"""
+=================================================
+Orthogonal distance regression (:mod:`scipy.odr`)
+=================================================
+
+.. currentmodule:: scipy.odr
+
+Package Content
+===============
+
+.. autosummary::
+   :toctree: generated/
+
+   Data          -- The data to fit.
+   RealData      -- Data with weights as actual std. dev.s and/or covariances.
+   Model         -- Stores information about the function to be fit.
+   ODR           -- Gathers all info & manages the main fitting routine.
+   Output        -- Result from the fit.
+   odr           -- Low-level function for ODR.
+
+   OdrWarning    -- Warning about potential problems when running ODR.
+   OdrError      -- Error exception.
+   OdrStop       -- Stop exception.
+
+   polynomial    -- Factory function for a general polynomial model.
+   exponential   -- Exponential model
+   multilinear   -- Arbitrary-dimensional linear model
+   unilinear     -- Univariate linear model
+   quadratic     -- Quadratic model
+
+Usage information
+=================
+
+Introduction
+------------
+
+Why Orthogonal Distance Regression (ODR)? Sometimes one has
+measurement errors in the explanatory (a.k.a., "independent")
+variable(s), not just the response (a.k.a., "dependent") variable(s).
+Ordinary Least Squares (OLS) fitting procedures treat the data for
+explanatory variables as fixed, i.e., not subject to error of any kind.
+Furthermore, OLS procedures require that the response variables be an
+explicit function of the explanatory variables; sometimes making the
+equation explicit is impractical and/or introduces errors.  ODR can
+handle both of these cases with ease, and can even reduce to the OLS
+case if that is sufficient for the problem.
+
+ODRPACK is a FORTRAN-77 library for performing ODR with possibly
+non-linear fitting functions. It uses a modified trust-region
+Levenberg-Marquardt-type algorithm [1]_ to estimate the function
+parameters.  The fitting functions are provided by Python functions
+operating on NumPy arrays. The required derivatives may be provided
+by Python functions as well, or may be estimated numerically. ODRPACK
+can do explicit or implicit ODR fits, or it can do OLS. Input and
+output variables may be multidimensional. Weights can be provided to
+account for different variances of the observations, and even
+covariances between dimensions of the variables.
+
+The `scipy.odr` package offers an object-oriented interface to
+ODRPACK, in addition to the low-level `odr` function.
+
+Additional background information about ODRPACK can be found in the
+`ODRPACK User's Guide
+`_, reading
+which is recommended.
+
+Basic usage
+-----------
+
+1. Define the function you want to fit against.::
+
+       def f(B, x):
+           '''Linear function y = m*x + b'''
+           # B is a vector of the parameters.
+           # x is an array of the current x values.
+           # x is in the same format as the x passed to Data or RealData.
+           #
+           # Return an array in the same format as y passed to Data or RealData.
+           return B[0]*x + B[1]
+
+2. Create a Model.::
+
+       linear = Model(f)
+
+3. Create a Data or RealData instance.::
+
+       mydata = Data(x, y, wd=1./power(sx,2), we=1./power(sy,2))
+
+   or, when the actual covariances are known::
+
+       mydata = RealData(x, y, sx=sx, sy=sy)
+
+4. Instantiate ODR with your data, model and initial parameter estimate.::
+
+       myodr = ODR(mydata, linear, beta0=[1., 2.])
+
+5. Run the fit.::
+
+       myoutput = myodr.run()
+
+6. Examine output.::
+
+       myoutput.pprint()
+
+
+References
+----------
+.. [1] P. T. Boggs and J. E. Rogers, "Orthogonal Distance Regression,"
+   in "Statistical analysis of measurement error models and
+   applications: proceedings of the AMS-IMS-SIAM joint summer research
+   conference held June 10-16, 1989," Contemporary Mathematics,
+   vol. 112, pg. 186, 1990.
+
+"""
+# version: 0.7
+# author: Robert Kern 
+# date: 2006-09-21
+
+from ._odrpack import *
+from ._models import *
+from . import _add_newdocs
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import models, odrpack
+
+__all__ = [s for s in dir()
+           if not (s.startswith('_') or s in ('odr_stop', 'odr_error'))]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_add_newdocs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_add_newdocs.py
new file mode 100644
index 0000000000000000000000000000000000000000..e09fb6cc8c5f1523dfbeaef466a5b76bd22c01bb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_add_newdocs.py
@@ -0,0 +1,34 @@
+from numpy.lib import add_newdoc
+
+add_newdoc('scipy.odr', 'odr',
+    """
+    odr(fcn, beta0, y, x, we=None, wd=None, fjacb=None, fjacd=None, extra_args=None,
+        ifixx=None, ifixb=None, job=0, iprint=0, errfile=None, rptfile=None, ndigit=0,
+        taufac=0.0, sstol=-1.0, partol=-1.0, maxit=-1, stpb=None, stpd=None, sclb=None,
+        scld=None, work=None, iwork=None, full_output=0)
+
+    Low-level function for ODR.
+
+    See Also
+    --------
+    ODR : The ODR class gathers all information and coordinates the running of the
+          main fitting routine.
+    Model : The Model class stores information about the function you wish to fit.
+    Data : The data to fit.
+    RealData : Data with weights as actual std. dev.s and/or covariances.
+
+    Notes
+    -----
+    This is a function performing the same operation as the `ODR`,
+    `Model`, and `Data` classes together. The parameters of this
+    function are explained in the class documentation.
+
+    """)
+
+add_newdoc('scipy.odr.__odrpack', '_set_exceptions',
+    """
+    _set_exceptions(odr_error, odr_stop)
+
+    Internal function: set exception classes.
+
+    """)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_models.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_models.py
new file mode 100644
index 0000000000000000000000000000000000000000..e0a8d2275dcc4698a9ea61be5871d62069be2599
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_models.py
@@ -0,0 +1,315 @@
+""" Collection of Model instances for use with the odrpack fitting package.
+"""
+import numpy as np
+from scipy.odr._odrpack import Model
+
+__all__ = ['Model', 'exponential', 'multilinear', 'unilinear', 'quadratic',
+           'polynomial']
+
+
+def _lin_fcn(B, x):
+    a, b = B[0], B[1:]
+    b.shape = (b.shape[0], 1)
+
+    return a + (x*b).sum(axis=0)
+
+
+def _lin_fjb(B, x):
+    a = np.ones(x.shape[-1], float)
+    res = np.concatenate((a, x.ravel()))
+    res.shape = (B.shape[-1], x.shape[-1])
+    return res
+
+
+def _lin_fjd(B, x):
+    b = B[1:]
+    b = np.repeat(b, (x.shape[-1],)*b.shape[-1], axis=0)
+    b.shape = x.shape
+    return b
+
+
+def _lin_est(data):
+    # Eh. The answer is analytical, so just return all ones.
+    # Don't return zeros since that will interfere with
+    # ODRPACK's auto-scaling procedures.
+
+    if len(data.x.shape) == 2:
+        m = data.x.shape[0]
+    else:
+        m = 1
+
+    return np.ones((m + 1,), float)
+
+
+def _poly_fcn(B, x, powers):
+    a, b = B[0], B[1:]
+    b.shape = (b.shape[0], 1)
+
+    return a + np.sum(b * np.power(x, powers), axis=0)
+
+
+def _poly_fjacb(B, x, powers):
+    res = np.concatenate((np.ones(x.shape[-1], float),
+                          np.power(x, powers).flat))
+    res.shape = (B.shape[-1], x.shape[-1])
+    return res
+
+
+def _poly_fjacd(B, x, powers):
+    b = B[1:]
+    b.shape = (b.shape[0], 1)
+
+    b = b * powers
+
+    return np.sum(b * np.power(x, powers-1), axis=0)
+
+
+def _exp_fcn(B, x):
+    return B[0] + np.exp(B[1] * x)
+
+
+def _exp_fjd(B, x):
+    return B[1] * np.exp(B[1] * x)
+
+
+def _exp_fjb(B, x):
+    res = np.concatenate((np.ones(x.shape[-1], float), x * np.exp(B[1] * x)))
+    res.shape = (2, x.shape[-1])
+    return res
+
+
+def _exp_est(data):
+    # Eh.
+    return np.array([1., 1.])
+
+
+class _MultilinearModel(Model):
+    r"""
+    Arbitrary-dimensional linear model
+
+    This model is defined by :math:`y=\beta_0 + \sum_{i=1}^m \beta_i x_i`
+
+    Examples
+    --------
+    We can calculate orthogonal distance regression with an arbitrary
+    dimensional linear model:
+
+    >>> from scipy import odr
+    >>> import numpy as np
+    >>> x = np.linspace(0.0, 5.0)
+    >>> y = 10.0 + 5.0 * x
+    >>> data = odr.Data(x, y)
+    >>> odr_obj = odr.ODR(data, odr.multilinear)
+    >>> output = odr_obj.run()
+    >>> print(output.beta)
+    [10.  5.]
+
+    """
+
+    def __init__(self):
+        super().__init__(
+            _lin_fcn, fjacb=_lin_fjb, fjacd=_lin_fjd, estimate=_lin_est,
+            meta={'name': 'Arbitrary-dimensional Linear',
+                  'equ': 'y = B_0 + Sum[i=1..m, B_i * x_i]',
+                  'TeXequ': r'$y=\beta_0 + \sum_{i=1}^m \beta_i x_i$'})
+
+
+multilinear = _MultilinearModel()
+
+
+def polynomial(order):
+    """
+    Factory function for a general polynomial model.
+
+    Parameters
+    ----------
+    order : int or sequence
+        If an integer, it becomes the order of the polynomial to fit. If
+        a sequence of numbers, then these are the explicit powers in the
+        polynomial.
+        A constant term (power 0) is always included, so don't include 0.
+        Thus, polynomial(n) is equivalent to polynomial(range(1, n+1)).
+
+    Returns
+    -------
+    polynomial : Model instance
+        Model instance.
+
+    Examples
+    --------
+    We can fit an input data using orthogonal distance regression (ODR) with
+    a polynomial model:
+
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> from scipy import odr
+    >>> x = np.linspace(0.0, 5.0)
+    >>> y = np.sin(x)
+    >>> poly_model = odr.polynomial(3)  # using third order polynomial model
+    >>> data = odr.Data(x, y)
+    >>> odr_obj = odr.ODR(data, poly_model)
+    >>> output = odr_obj.run()  # running ODR fitting
+    >>> poly = np.poly1d(output.beta[::-1])
+    >>> poly_y = poly(x)
+    >>> plt.plot(x, y, label="input data")
+    >>> plt.plot(x, poly_y, label="polynomial ODR")
+    >>> plt.legend()
+    >>> plt.show()
+
+    """
+
+    powers = np.asarray(order)
+    if powers.shape == ():
+        # Scalar.
+        powers = np.arange(1, powers + 1)
+
+    powers.shape = (len(powers), 1)
+    len_beta = len(powers) + 1
+
+    def _poly_est(data, len_beta=len_beta):
+        # Eh. Ignore data and return all ones.
+        return np.ones((len_beta,), float)
+
+    return Model(_poly_fcn, fjacd=_poly_fjacd, fjacb=_poly_fjacb,
+                 estimate=_poly_est, extra_args=(powers,),
+                 meta={'name': 'Sorta-general Polynomial',
+                 'equ': 'y = B_0 + Sum[i=1..%s, B_i * (x**i)]' % (len_beta-1),
+                 'TeXequ': r'$y=\beta_0 + \sum_{i=1}^{%s} \beta_i x^i$' %
+                        (len_beta-1)})
+
+
+class _ExponentialModel(Model):
+    r"""
+    Exponential model
+
+    This model is defined by :math:`y=\beta_0 + e^{\beta_1 x}`
+
+    Examples
+    --------
+    We can calculate orthogonal distance regression with an exponential model:
+
+    >>> from scipy import odr
+    >>> import numpy as np
+    >>> x = np.linspace(0.0, 5.0)
+    >>> y = -10.0 + np.exp(0.5*x)
+    >>> data = odr.Data(x, y)
+    >>> odr_obj = odr.ODR(data, odr.exponential)
+    >>> output = odr_obj.run()
+    >>> print(output.beta)
+    [-10.    0.5]
+
+    """
+
+    def __init__(self):
+        super().__init__(_exp_fcn, fjacd=_exp_fjd, fjacb=_exp_fjb,
+                         estimate=_exp_est,
+                         meta={'name': 'Exponential',
+                               'equ': 'y= B_0 + exp(B_1 * x)',
+                               'TeXequ': r'$y=\beta_0 + e^{\beta_1 x}$'})
+
+
+exponential = _ExponentialModel()
+
+
+def _unilin(B, x):
+    return x*B[0] + B[1]
+
+
+def _unilin_fjd(B, x):
+    return np.ones(x.shape, float) * B[0]
+
+
+def _unilin_fjb(B, x):
+    _ret = np.concatenate((x, np.ones(x.shape, float)))
+    _ret.shape = (2,) + x.shape
+
+    return _ret
+
+
+def _unilin_est(data):
+    return (1., 1.)
+
+
+def _quadratic(B, x):
+    return x*(x*B[0] + B[1]) + B[2]
+
+
+def _quad_fjd(B, x):
+    return 2*x*B[0] + B[1]
+
+
+def _quad_fjb(B, x):
+    _ret = np.concatenate((x*x, x, np.ones(x.shape, float)))
+    _ret.shape = (3,) + x.shape
+
+    return _ret
+
+
+def _quad_est(data):
+    return (1.,1.,1.)
+
+
+class _UnilinearModel(Model):
+    r"""
+    Univariate linear model
+
+    This model is defined by :math:`y = \beta_0 x + \beta_1`
+
+    Examples
+    --------
+    We can calculate orthogonal distance regression with an unilinear model:
+
+    >>> from scipy import odr
+    >>> import numpy as np
+    >>> x = np.linspace(0.0, 5.0)
+    >>> y = 1.0 * x + 2.0
+    >>> data = odr.Data(x, y)
+    >>> odr_obj = odr.ODR(data, odr.unilinear)
+    >>> output = odr_obj.run()
+    >>> print(output.beta)
+    [1. 2.]
+
+    """
+
+    def __init__(self):
+        super().__init__(_unilin, fjacd=_unilin_fjd, fjacb=_unilin_fjb,
+                         estimate=_unilin_est,
+                         meta={'name': 'Univariate Linear',
+                               'equ': 'y = B_0 * x + B_1',
+                               'TeXequ': '$y = \\beta_0 x + \\beta_1$'})
+
+
+unilinear = _UnilinearModel()
+
+
+class _QuadraticModel(Model):
+    r"""
+    Quadratic model
+
+    This model is defined by :math:`y = \beta_0 x^2 + \beta_1 x + \beta_2`
+
+    Examples
+    --------
+    We can calculate orthogonal distance regression with a quadratic model:
+
+    >>> from scipy import odr
+    >>> import numpy as np
+    >>> x = np.linspace(0.0, 5.0)
+    >>> y = 1.0 * x ** 2 + 2.0 * x + 3.0
+    >>> data = odr.Data(x, y)
+    >>> odr_obj = odr.ODR(data, odr.quadratic)
+    >>> output = odr_obj.run()
+    >>> print(output.beta)
+    [1. 2. 3.]
+
+    """
+
+    def __init__(self):
+        super().__init__(
+            _quadratic, fjacd=_quad_fjd, fjacb=_quad_fjb, estimate=_quad_est,
+            meta={'name': 'Quadratic',
+                  'equ': 'y = B_0*x**2 + B_1*x + B_2',
+                  'TeXequ': '$y = \\beta_0 x^2 + \\beta_1 x + \\beta_2'})
+
+
+quadratic = _QuadraticModel()
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_odrpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_odrpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..30d46aa3f4465f31b32e5f13f0b01b940981d489
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/_odrpack.py
@@ -0,0 +1,1154 @@
+"""
+Python wrappers for Orthogonal Distance Regression (ODRPACK).
+
+Notes
+=====
+
+* Array formats -- FORTRAN stores its arrays in memory column first, i.e., an
+  array element A(i, j, k) will be next to A(i+1, j, k). In C and, consequently,
+  NumPy, arrays are stored row first: A[i, j, k] is next to A[i, j, k+1]. For
+  efficiency and convenience, the input and output arrays of the fitting
+  function (and its Jacobians) are passed to FORTRAN without transposition.
+  Therefore, where the ODRPACK documentation says that the X array is of shape
+  (N, M), it will be passed to the Python function as an array of shape (M, N).
+  If M==1, the 1-D case, then nothing matters; if M>1, then your
+  Python functions will be dealing with arrays that are indexed in reverse of
+  the ODRPACK documentation. No real issue, but watch out for your indexing of
+  the Jacobians: the i,jth elements (@f_i/@x_j) evaluated at the nth
+  observation will be returned as jacd[j, i, n]. Except for the Jacobians, it
+  really is easier to deal with x[0] and x[1] than x[:,0] and x[:,1]. Of course,
+  you can always use the transpose() function from SciPy explicitly.
+
+* Examples -- See the accompanying file test/test.py for examples of how to set
+  up fits of your own. Some are taken from the User's Guide; some are from
+  other sources.
+
+* Models -- Some common models are instantiated in the accompanying module
+  models.py . Contributions are welcome.
+
+Credits
+=======
+
+* Thanks to Arnold Moene and Gerard Vermeulen for fixing some killer bugs.
+
+Robert Kern
+robert.kern@gmail.com
+
+"""
+import os
+from threading import Lock
+
+import numpy as np
+from warnings import warn
+from scipy.odr import __odrpack
+
+__all__ = ['odr', 'OdrWarning', 'OdrError', 'OdrStop',
+           'Data', 'RealData', 'Model', 'Output', 'ODR',
+           'odr_error', 'odr_stop']
+
+odr = __odrpack.odr
+ODR_LOCK = Lock()
+
+
+class OdrWarning(UserWarning):
+    """
+    Warning indicating that the data passed into
+    ODR will cause problems when passed into 'odr'
+    that the user should be aware of.
+    """
+    pass
+
+
+class OdrError(Exception):
+    """
+    Exception indicating an error in fitting.
+
+    This is raised by `~scipy.odr.odr` if an error occurs during fitting.
+    """
+    pass
+
+
+class OdrStop(Exception):
+    """
+    Exception stopping fitting.
+
+    You can raise this exception in your objective function to tell
+    `~scipy.odr.odr` to stop fitting.
+    """
+    pass
+
+
+# Backwards compatibility
+odr_error = OdrError
+odr_stop = OdrStop
+
+__odrpack._set_exceptions(OdrError, OdrStop)
+
+
+def _conv(obj, dtype=None):
+    """ Convert an object to the preferred form for input to the odr routine.
+    """
+
+    if obj is None:
+        return obj
+    else:
+        if dtype is None:
+            obj = np.asarray(obj)
+        else:
+            obj = np.asarray(obj, dtype)
+        if obj.shape == ():
+            # Scalar.
+            return obj.dtype.type(obj)
+        else:
+            return obj
+
+
+def _report_error(info):
+    """ Interprets the return code of the odr routine.
+
+    Parameters
+    ----------
+    info : int
+        The return code of the odr routine.
+
+    Returns
+    -------
+    problems : list(str)
+        A list of messages about why the odr() routine stopped.
+    """
+
+    stopreason = ('Blank',
+                  'Sum of squares convergence',
+                  'Parameter convergence',
+                  'Both sum of squares and parameter convergence',
+                  'Iteration limit reached')[info % 5]
+
+    if info >= 5:
+        # questionable results or fatal error
+
+        I = (info//10000 % 10,
+             info//1000 % 10,
+             info//100 % 10,
+             info//10 % 10,
+             info % 10)
+        problems = []
+
+        if I[0] == 0:
+            if I[1] != 0:
+                problems.append('Derivatives possibly not correct')
+            if I[2] != 0:
+                problems.append('Error occurred in callback')
+            if I[3] != 0:
+                problems.append('Problem is not full rank at solution')
+            problems.append(stopreason)
+        elif I[0] == 1:
+            if I[1] != 0:
+                problems.append('N < 1')
+            if I[2] != 0:
+                problems.append('M < 1')
+            if I[3] != 0:
+                problems.append('NP < 1 or NP > N')
+            if I[4] != 0:
+                problems.append('NQ < 1')
+        elif I[0] == 2:
+            if I[1] != 0:
+                problems.append('LDY and/or LDX incorrect')
+            if I[2] != 0:
+                problems.append('LDWE, LD2WE, LDWD, and/or LD2WD incorrect')
+            if I[3] != 0:
+                problems.append('LDIFX, LDSTPD, and/or LDSCLD incorrect')
+            if I[4] != 0:
+                problems.append('LWORK and/or LIWORK too small')
+        elif I[0] == 3:
+            if I[1] != 0:
+                problems.append('STPB and/or STPD incorrect')
+            if I[2] != 0:
+                problems.append('SCLB and/or SCLD incorrect')
+            if I[3] != 0:
+                problems.append('WE incorrect')
+            if I[4] != 0:
+                problems.append('WD incorrect')
+        elif I[0] == 4:
+            problems.append('Error in derivatives')
+        elif I[0] == 5:
+            problems.append('Error occurred in callback')
+        elif I[0] == 6:
+            problems.append('Numerical error detected')
+
+        return problems
+
+    else:
+        return [stopreason]
+
+
+class Data:
+    """
+    The data to fit.
+
+    Parameters
+    ----------
+    x : array_like
+        Observed data for the independent variable of the regression
+    y : array_like, optional
+        If array-like, observed data for the dependent variable of the
+        regression. A scalar input implies that the model to be used on
+        the data is implicit.
+    we : array_like, optional
+        If `we` is a scalar, then that value is used for all data points (and
+        all dimensions of the response variable).
+        If `we` is a rank-1 array of length q (the dimensionality of the
+        response variable), then this vector is the diagonal of the covariant
+        weighting matrix for all data points.
+        If `we` is a rank-1 array of length n (the number of data points), then
+        the i'th element is the weight for the i'th response variable
+        observation (single-dimensional only).
+        If `we` is a rank-2 array of shape (q, q), then this is the full
+        covariant weighting matrix broadcast to each observation.
+        If `we` is a rank-2 array of shape (q, n), then `we[:,i]` is the
+        diagonal of the covariant weighting matrix for the i'th observation.
+        If `we` is a rank-3 array of shape (q, q, n), then `we[:,:,i]` is the
+        full specification of the covariant weighting matrix for each
+        observation.
+        If the fit is implicit, then only a positive scalar value is used.
+    wd : array_like, optional
+        If `wd` is a scalar, then that value is used for all data points
+        (and all dimensions of the input variable). If `wd` = 0, then the
+        covariant weighting matrix for each observation is set to the identity
+        matrix (so each dimension of each observation has the same weight).
+        If `wd` is a rank-1 array of length m (the dimensionality of the input
+        variable), then this vector is the diagonal of the covariant weighting
+        matrix for all data points.
+        If `wd` is a rank-1 array of length n (the number of data points), then
+        the i'th element is the weight for the ith input variable observation
+        (single-dimensional only).
+        If `wd` is a rank-2 array of shape (m, m), then this is the full
+        covariant weighting matrix broadcast to each observation.
+        If `wd` is a rank-2 array of shape (m, n), then `wd[:,i]` is the
+        diagonal of the covariant weighting matrix for the ith observation.
+        If `wd` is a rank-3 array of shape (m, m, n), then `wd[:,:,i]` is the
+        full specification of the covariant weighting matrix for each
+        observation.
+    fix : array_like of ints, optional
+        The `fix` argument is the same as ifixx in the class ODR. It is an
+        array of integers with the same shape as data.x that determines which
+        input observations are treated as fixed. One can use a sequence of
+        length m (the dimensionality of the input observations) to fix some
+        dimensions for all observations. A value of 0 fixes the observation,
+        a value > 0 makes it free.
+    meta : dict, optional
+        Free-form dictionary for metadata.
+
+    Notes
+    -----
+    Each argument is attached to the member of the instance of the same name.
+    The structures of `x` and `y` are described in the Model class docstring.
+    If `y` is an integer, then the Data instance can only be used to fit with
+    implicit models where the dimensionality of the response is equal to the
+    specified value of `y`.
+
+    The `we` argument weights the effect a deviation in the response variable
+    has on the fit. The `wd` argument weights the effect a deviation in the
+    input variable has on the fit. To handle multidimensional inputs and
+    responses easily, the structure of these arguments has the n'th
+    dimensional axis first. These arguments heavily use the structured
+    arguments feature of ODRPACK to conveniently and flexibly support all
+    options. See the ODRPACK User's Guide for a full explanation of how these
+    weights are used in the algorithm. Basically, a higher value of the weight
+    for a particular data point makes a deviation at that point more
+    detrimental to the fit.
+
+    """
+
+    def __init__(self, x, y=None, we=None, wd=None, fix=None, meta=None):
+        self.x = _conv(x)
+
+        if not isinstance(self.x, np.ndarray):
+            raise ValueError("Expected an 'ndarray' of data for 'x', "
+                             f"but instead got data of type '{type(self.x).__name__}'")
+
+        self.y = _conv(y)
+        self.we = _conv(we)
+        self.wd = _conv(wd)
+        self.fix = _conv(fix)
+        self.meta = {} if meta is None else meta
+
+    def set_meta(self, **kwds):
+        """ Update the metadata dictionary with the keywords and data provided
+        by keywords.
+
+        Examples
+        --------
+        ::
+
+            data.set_meta(lab="Ph 7; Lab 26", title="Ag110 + Ag108 Decay")
+        """
+
+        self.meta.update(kwds)
+
+    def __getattr__(self, attr):
+        """ Dispatch attribute access to the metadata dictionary.
+        """
+        if attr != "meta" and attr in self.meta:
+            return self.meta[attr]
+        else:
+            raise AttributeError(f"'{attr}' not in metadata")
+
+
+class RealData(Data):
+    """
+    The data, with weightings as actual standard deviations and/or
+    covariances.
+
+    Parameters
+    ----------
+    x : array_like
+        Observed data for the independent variable of the regression
+    y : array_like, optional
+        If array-like, observed data for the dependent variable of the
+        regression. A scalar input implies that the model to be used on
+        the data is implicit.
+    sx : array_like, optional
+        Standard deviations of `x`.
+        `sx` are standard deviations of `x` and are converted to weights by
+        dividing 1.0 by their squares.
+    sy : array_like, optional
+        Standard deviations of `y`.
+        `sy` are standard deviations of `y` and are converted to weights by
+        dividing 1.0 by their squares.
+    covx : array_like, optional
+        Covariance of `x`
+        `covx` is an array of covariance matrices of `x` and are converted to
+        weights by performing a matrix inversion on each observation's
+        covariance matrix.
+    covy : array_like, optional
+        Covariance of `y`
+        `covy` is an array of covariance matrices and are converted to
+        weights by performing a matrix inversion on each observation's
+        covariance matrix.
+    fix : array_like, optional
+        The argument and member fix is the same as Data.fix and ODR.ifixx:
+        It is an array of integers with the same shape as `x` that
+        determines which input observations are treated as fixed. One can
+        use a sequence of length m (the dimensionality of the input
+        observations) to fix some dimensions for all observations. A value
+        of 0 fixes the observation, a value > 0 makes it free.
+    meta : dict, optional
+        Free-form dictionary for metadata.
+
+    Notes
+    -----
+    The weights `wd` and `we` are computed from provided values as follows:
+
+    `sx` and `sy` are converted to weights by dividing 1.0 by their squares.
+    For example, ``wd = 1./np.power(`sx`, 2)``.
+
+    `covx` and `covy` are arrays of covariance matrices and are converted to
+    weights by performing a matrix inversion on each observation's covariance
+    matrix. For example, ``we[i] = np.linalg.inv(covy[i])``.
+
+    These arguments follow the same structured argument conventions as wd and
+    we only restricted by their natures: `sx` and `sy` can't be rank-3, but
+    `covx` and `covy` can be.
+
+    Only set *either* `sx` or `covx` (not both). Setting both will raise an
+    exception. Same with `sy` and `covy`.
+
+    """
+
+    def __init__(self, x, y=None, sx=None, sy=None, covx=None, covy=None,
+                 fix=None, meta=None):
+        if (sx is not None) and (covx is not None):
+            raise ValueError("cannot set both sx and covx")
+        if (sy is not None) and (covy is not None):
+            raise ValueError("cannot set both sy and covy")
+
+        # Set flags for __getattr__
+        self._ga_flags = {}
+        if sx is not None:
+            self._ga_flags['wd'] = 'sx'
+        else:
+            self._ga_flags['wd'] = 'covx'
+        if sy is not None:
+            self._ga_flags['we'] = 'sy'
+        else:
+            self._ga_flags['we'] = 'covy'
+
+        self.x = _conv(x)
+
+        if not isinstance(self.x, np.ndarray):
+            raise ValueError("Expected an 'ndarray' of data for 'x', "
+                              f"but instead got data of type '{type(self.x).__name__}'")
+
+        self.y = _conv(y)
+        self.sx = _conv(sx)
+        self.sy = _conv(sy)
+        self.covx = _conv(covx)
+        self.covy = _conv(covy)
+        self.fix = _conv(fix)
+        self.meta = {} if meta is None else meta
+
+    def _sd2wt(self, sd):
+        """ Convert standard deviation to weights.
+        """
+
+        return 1./np.power(sd, 2)
+
+    def _cov2wt(self, cov):
+        """ Convert covariance matrix(-ices) to weights.
+        """
+
+        from scipy.linalg import inv
+
+        if len(cov.shape) == 2:
+            return inv(cov)
+        else:
+            weights = np.zeros(cov.shape, float)
+
+            for i in range(cov.shape[-1]):  # n
+                weights[:,:,i] = inv(cov[:,:,i])
+
+            return weights
+
+    def __getattr__(self, attr):
+
+        if attr not in ('wd', 'we'):
+            if attr != "meta" and attr in self.meta:
+                return self.meta[attr]
+            else:
+                raise AttributeError(f"'{attr}' not in metadata")
+        else:
+            lookup_tbl = {('wd', 'sx'): (self._sd2wt, self.sx),
+                      ('wd', 'covx'): (self._cov2wt, self.covx),
+                      ('we', 'sy'): (self._sd2wt, self.sy),
+                      ('we', 'covy'): (self._cov2wt, self.covy)}
+
+            func, arg = lookup_tbl[(attr, self._ga_flags[attr])]
+
+            if arg is not None:
+                return func(*(arg,))
+            else:
+                return None
+
+
+class Model:
+    """
+    The Model class stores information about the function you wish to fit.
+
+    It stores the function itself, at the least, and optionally stores
+    functions which compute the Jacobians used during fitting. Also, one
+    can provide a function that will provide reasonable starting values
+    for the fit parameters possibly given the set of data.
+
+    Parameters
+    ----------
+    fcn : function
+          fcn(beta, x) --> y
+    fjacb : function
+          Jacobian of fcn wrt the fit parameters beta.
+
+          fjacb(beta, x) --> @f_i(x,B)/@B_j
+    fjacd : function
+          Jacobian of fcn wrt the (possibly multidimensional) input
+          variable.
+
+          fjacd(beta, x) --> @f_i(x,B)/@x_j
+    extra_args : tuple, optional
+          If specified, `extra_args` should be a tuple of extra
+          arguments to pass to `fcn`, `fjacb`, and `fjacd`. Each will be called
+          by `apply(fcn, (beta, x) + extra_args)`
+    estimate : array_like of rank-1
+          Provides estimates of the fit parameters from the data
+
+          estimate(data) --> estbeta
+    implicit : boolean
+          If TRUE, specifies that the model
+          is implicit; i.e `fcn(beta, x)` ~= 0 and there is no y data to fit
+          against
+    meta : dict, optional
+          freeform dictionary of metadata for the model
+
+    Notes
+    -----
+    Note that the `fcn`, `fjacb`, and `fjacd` operate on NumPy arrays and
+    return a NumPy array. The `estimate` object takes an instance of the
+    Data class.
+
+    Here are the rules for the shapes of the argument and return
+    arrays of the callback functions:
+
+    `x`
+        if the input data is single-dimensional, then `x` is rank-1
+        array; i.e., ``x = array([1, 2, 3, ...]); x.shape = (n,)``
+        If the input data is multi-dimensional, then `x` is a rank-2 array;
+        i.e., ``x = array([[1, 2, ...], [2, 4, ...]]); x.shape = (m, n)``.
+        In all cases, it has the same shape as the input data array passed to
+        `~scipy.odr.odr`. `m` is the dimensionality of the input data,
+        `n` is the number of observations.
+    `y`
+        if the response variable is single-dimensional, then `y` is a
+        rank-1 array, i.e., ``y = array([2, 4, ...]); y.shape = (n,)``.
+        If the response variable is multi-dimensional, then `y` is a rank-2
+        array, i.e., ``y = array([[2, 4, ...], [3, 6, ...]]); y.shape =
+        (q, n)`` where `q` is the dimensionality of the response variable.
+    `beta`
+        rank-1 array of length `p` where `p` is the number of parameters;
+        i.e. ``beta = array([B_1, B_2, ..., B_p])``
+    `fjacb`
+        if the response variable is multi-dimensional, then the
+        return array's shape is ``(q, p, n)`` such that ``fjacb(x,beta)[l,k,i] =
+        d f_l(X,B)/d B_k`` evaluated at the ith data point.  If ``q == 1``, then
+        the return array is only rank-2 and with shape ``(p, n)``.
+    `fjacd`
+        as with fjacb, only the return array's shape is ``(q, m, n)``
+        such that ``fjacd(x,beta)[l,j,i] = d f_l(X,B)/d X_j`` at the ith data
+        point.  If ``q == 1``, then the return array's shape is ``(m, n)``. If
+        ``m == 1``, the shape is (q, n). If `m == q == 1`, the shape is ``(n,)``.
+
+    """
+
+    def __init__(self, fcn, fjacb=None, fjacd=None,
+                 extra_args=None, estimate=None, implicit=0, meta=None):
+
+        self.fcn = fcn
+        self.fjacb = fjacb
+        self.fjacd = fjacd
+
+        if extra_args is not None:
+            extra_args = tuple(extra_args)
+
+        self.extra_args = extra_args
+        self.estimate = estimate
+        self.implicit = implicit
+        self.meta = meta if meta is not None else {}
+
+    def set_meta(self, **kwds):
+        """ Update the metadata dictionary with the keywords and data provided
+        here.
+
+        Examples
+        --------
+        set_meta(name="Exponential", equation="y = a exp(b x) + c")
+        """
+
+        self.meta.update(kwds)
+
+    def __getattr__(self, attr):
+        """ Dispatch attribute access to the metadata.
+        """
+
+        if attr != "meta" and attr in self.meta:
+            return self.meta[attr]
+        else:
+            raise AttributeError(f"'{attr}' not in metadata")
+
+
+class Output:
+    """
+    The Output class stores the output of an ODR run.
+
+    Attributes
+    ----------
+    beta : ndarray
+        Estimated parameter values, of shape (q,).
+    sd_beta : ndarray
+        Standard deviations of the estimated parameters, of shape (p,).
+    cov_beta : ndarray
+        Covariance matrix of the estimated parameters, of shape (p,p).
+        Note that this `cov_beta` is not scaled by the residual variance
+        `res_var`, whereas `sd_beta` is. This means
+        ``np.sqrt(np.diag(output.cov_beta * output.res_var))`` is the same
+        result as `output.sd_beta`.
+    delta : ndarray, optional
+        Array of estimated errors in input variables, of same shape as `x`.
+    eps : ndarray, optional
+        Array of estimated errors in response variables, of same shape as `y`.
+    xplus : ndarray, optional
+        Array of ``x + delta``.
+    y : ndarray, optional
+        Array ``y = fcn(x + delta)``.
+    res_var : float, optional
+        Residual variance.
+    sum_square : float, optional
+        Sum of squares error.
+    sum_square_delta : float, optional
+        Sum of squares of delta error.
+    sum_square_eps : float, optional
+        Sum of squares of eps error.
+    inv_condnum : float, optional
+        Inverse condition number (cf. ODRPACK UG p. 77).
+    rel_error : float, optional
+        Relative error in function values computed within fcn.
+    work : ndarray, optional
+        Final work array.
+    work_ind : dict, optional
+        Indices into work for drawing out values (cf. ODRPACK UG p. 83).
+    info : int, optional
+        Reason for returning, as output by ODRPACK (cf. ODRPACK UG p. 38).
+    stopreason : list of str, optional
+        `info` interpreted into English.
+
+    Notes
+    -----
+    Takes one argument for initialization, the return value from the
+    function `~scipy.odr.odr`. The attributes listed as "optional" above are
+    only present if `~scipy.odr.odr` was run with ``full_output=1``.
+
+    """
+
+    def __init__(self, output):
+        self.beta = output[0]
+        self.sd_beta = output[1]
+        self.cov_beta = output[2]
+
+        if len(output) == 4:
+            # full output
+            self.__dict__.update(output[3])
+            self.stopreason = _report_error(self.info)
+
+    def pprint(self):
+        """ Pretty-print important results.
+        """
+
+        print('Beta:', self.beta)
+        print('Beta Std Error:', self.sd_beta)
+        print('Beta Covariance:', self.cov_beta)
+        if hasattr(self, 'info'):
+            print('Residual Variance:',self.res_var)
+            print('Inverse Condition #:', self.inv_condnum)
+            print('Reason(s) for Halting:')
+            for r in self.stopreason:
+                print(f'  {r}')
+
+
+class ODR:
+    """
+    The ODR class gathers all information and coordinates the running of the
+    main fitting routine.
+
+    Members of instances of the ODR class have the same names as the arguments
+    to the initialization routine.
+
+    Parameters
+    ----------
+    data : Data class instance
+        instance of the Data class
+    model : Model class instance
+        instance of the Model class
+
+    Other Parameters
+    ----------------
+    beta0 : array_like of rank-1
+        a rank-1 sequence of initial parameter values. Optional if
+        model provides an "estimate" function to estimate these values.
+    delta0 : array_like of floats of rank-1, optional
+        a (double-precision) float array to hold the initial values of
+        the errors in the input variables. Must be same shape as data.x
+    ifixb : array_like of ints of rank-1, optional
+        sequence of integers with the same length as beta0 that determines
+        which parameters are held fixed. A value of 0 fixes the parameter,
+        a value > 0 makes the parameter free.
+    ifixx : array_like of ints with same shape as data.x, optional
+        an array of integers with the same shape as data.x that determines
+        which input observations are treated as fixed. One can use a sequence
+        of length m (the dimensionality of the input observations) to fix some
+        dimensions for all observations. A value of 0 fixes the observation,
+        a value > 0 makes it free.
+    job : int, optional
+        an integer telling ODRPACK what tasks to perform. See p. 31 of the
+        ODRPACK User's Guide if you absolutely must set the value here. Use the
+        method set_job post-initialization for a more readable interface.
+    iprint : int, optional
+        an integer telling ODRPACK what to print. See pp. 33-34 of the
+        ODRPACK User's Guide if you absolutely must set the value here. Use the
+        method set_iprint post-initialization for a more readable interface.
+    errfile : str, optional
+        string with the filename to print ODRPACK errors to. If the file already
+        exists, an error will be thrown. The `overwrite` argument can be used to
+        prevent this. *Do Not Open This File Yourself!*
+    rptfile : str, optional
+        string with the filename to print ODRPACK summaries to. If the file
+        already exists, an error will be thrown. The `overwrite` argument can be
+        used to prevent this. *Do Not Open This File Yourself!*
+    ndigit : int, optional
+        integer specifying the number of reliable digits in the computation
+        of the function.
+    taufac : float, optional
+        float specifying the initial trust region. The default value is 1.
+        The initial trust region is equal to taufac times the length of the
+        first computed Gauss-Newton step. taufac must be less than 1.
+    sstol : float, optional
+        float specifying the tolerance for convergence based on the relative
+        change in the sum-of-squares. The default value is eps**(1/2) where eps
+        is the smallest value such that 1 + eps > 1 for double precision
+        computation on the machine. sstol must be less than 1.
+    partol : float, optional
+        float specifying the tolerance for convergence based on the relative
+        change in the estimated parameters. The default value is eps**(2/3) for
+        explicit models and ``eps**(1/3)`` for implicit models. partol must be less
+        than 1.
+    maxit : int, optional
+        integer specifying the maximum number of iterations to perform. For
+        first runs, maxit is the total number of iterations performed and
+        defaults to 50. For restarts, maxit is the number of additional
+        iterations to perform and defaults to 10.
+    stpb : array_like, optional
+        sequence (``len(stpb) == len(beta0)``) of relative step sizes to compute
+        finite difference derivatives wrt the parameters.
+    stpd : optional
+        array (``stpd.shape == data.x.shape`` or ``stpd.shape == (m,)``) of relative
+        step sizes to compute finite difference derivatives wrt the input
+        variable errors. If stpd is a rank-1 array with length m (the
+        dimensionality of the input variable), then the values are broadcast to
+        all observations.
+    sclb : array_like, optional
+        sequence (``len(stpb) == len(beta0)``) of scaling factors for the
+        parameters. The purpose of these scaling factors are to scale all of
+        the parameters to around unity. Normally appropriate scaling factors
+        are computed if this argument is not specified. Specify them yourself
+        if the automatic procedure goes awry.
+    scld : array_like, optional
+        array (scld.shape == data.x.shape or scld.shape == (m,)) of scaling
+        factors for the *errors* in the input variables. Again, these factors
+        are automatically computed if you do not provide them. If scld.shape ==
+        (m,), then the scaling factors are broadcast to all observations.
+    work : ndarray, optional
+        array to hold the double-valued working data for ODRPACK. When
+        restarting, takes the value of self.output.work.
+    iwork : ndarray, optional
+        array to hold the integer-valued working data for ODRPACK. When
+        restarting, takes the value of self.output.iwork.
+    overwrite : bool, optional
+        If it is True, output files defined by `errfile` and `rptfile` are
+        overwritten. The default is False.
+
+    Attributes
+    ----------
+    data : Data
+        The data for this fit
+    model : Model
+        The model used in fit
+    output : Output
+        An instance if the Output class containing all of the returned
+        data from an invocation of ODR.run() or ODR.restart()
+
+    """
+
+    def __init__(self, data, model, beta0=None, delta0=None, ifixb=None,
+        ifixx=None, job=None, iprint=None, errfile=None, rptfile=None,
+        ndigit=None, taufac=None, sstol=None, partol=None, maxit=None,
+        stpb=None, stpd=None, sclb=None, scld=None, work=None, iwork=None,
+        overwrite=False):
+
+        self.data = data
+        self.model = model
+
+        if beta0 is None:
+            if self.model.estimate is not None:
+                self.beta0 = _conv(self.model.estimate(self.data))
+            else:
+                raise ValueError(
+                  "must specify beta0 or provide an estimator with the model"
+                )
+        else:
+            self.beta0 = _conv(beta0)
+
+        if ifixx is None and data.fix is not None:
+            ifixx = data.fix
+
+        if overwrite:
+            # remove output files for overwriting.
+            if rptfile is not None and os.path.exists(rptfile):
+                os.remove(rptfile)
+            if errfile is not None and os.path.exists(errfile):
+                os.remove(errfile)
+
+        self.delta0 = _conv(delta0)
+        # These really are 32-bit integers in FORTRAN (gfortran), even on 64-bit
+        # platforms.
+        # XXX: some other FORTRAN compilers may not agree.
+        self.ifixx = _conv(ifixx, dtype=np.int32)
+        self.ifixb = _conv(ifixb, dtype=np.int32)
+        self.job = job
+        self.iprint = iprint
+        self.errfile = errfile
+        self.rptfile = rptfile
+        self.ndigit = ndigit
+        self.taufac = taufac
+        self.sstol = sstol
+        self.partol = partol
+        self.maxit = maxit
+        self.stpb = _conv(stpb)
+        self.stpd = _conv(stpd)
+        self.sclb = _conv(sclb)
+        self.scld = _conv(scld)
+        self.work = _conv(work)
+        self.iwork = _conv(iwork)
+
+        self.output = None
+
+        self._check()
+
+    def _check(self):
+        """ Check the inputs for consistency, but don't bother checking things
+        that the builtin function odr will check.
+        """
+
+        x_s = list(self.data.x.shape)
+
+        if isinstance(self.data.y, np.ndarray):
+            y_s = list(self.data.y.shape)
+            if self.model.implicit:
+                raise OdrError("an implicit model cannot use response data")
+        else:
+            # implicit model with q == self.data.y
+            y_s = [self.data.y, x_s[-1]]
+            if not self.model.implicit:
+                raise OdrError("an explicit model needs response data")
+            self.set_job(fit_type=1)
+
+        if x_s[-1] != y_s[-1]:
+            raise OdrError("number of observations do not match")
+
+        n = x_s[-1]
+
+        if len(x_s) == 2:
+            m = x_s[0]
+        else:
+            m = 1
+        if len(y_s) == 2:
+            q = y_s[0]
+        else:
+            q = 1
+
+        p = len(self.beta0)
+
+        # permissible output array shapes
+
+        fcn_perms = [(q, n)]
+        fjacd_perms = [(q, m, n)]
+        fjacb_perms = [(q, p, n)]
+
+        if q == 1:
+            fcn_perms.append((n,))
+            fjacd_perms.append((m, n))
+            fjacb_perms.append((p, n))
+        if m == 1:
+            fjacd_perms.append((q, n))
+        if p == 1:
+            fjacb_perms.append((q, n))
+        if m == q == 1:
+            fjacd_perms.append((n,))
+        if p == q == 1:
+            fjacb_perms.append((n,))
+
+        # try evaluating the supplied functions to make sure they provide
+        # sensible outputs
+
+        arglist = (self.beta0, self.data.x)
+        if self.model.extra_args is not None:
+            arglist = arglist + self.model.extra_args
+        res = self.model.fcn(*arglist)
+
+        if res.shape not in fcn_perms:
+            print(res.shape)
+            print(fcn_perms)
+            raise OdrError(f"fcn does not output {y_s}-shaped array")
+
+        if self.model.fjacd is not None:
+            res = self.model.fjacd(*arglist)
+            if res.shape not in fjacd_perms:
+                raise OdrError(
+                    f"fjacd does not output {repr((q, m, n))}-shaped array")
+        if self.model.fjacb is not None:
+            res = self.model.fjacb(*arglist)
+            if res.shape not in fjacb_perms:
+                raise OdrError(
+                    f"fjacb does not output {repr((q, p, n))}-shaped array")
+
+        # check shape of delta0
+
+        if self.delta0 is not None and self.delta0.shape != self.data.x.shape:
+            raise OdrError(
+                f"delta0 is not a {repr(self.data.x.shape)}-shaped array")
+
+        if self.data.x.size == 0:
+            warn("Empty data detected for ODR instance. "
+                 "Do not expect any fitting to occur",
+                 OdrWarning, stacklevel=3)
+
+    def _gen_work(self):
+        """ Generate a suitable work array if one does not already exist.
+        """
+
+        n = self.data.x.shape[-1]
+        p = self.beta0.shape[0]
+
+        if len(self.data.x.shape) == 2:
+            m = self.data.x.shape[0]
+        else:
+            m = 1
+
+        if self.model.implicit:
+            q = self.data.y
+        elif len(self.data.y.shape) == 2:
+            q = self.data.y.shape[0]
+        else:
+            q = 1
+
+        if self.data.we is None:
+            ldwe = ld2we = 1
+        elif len(self.data.we.shape) == 3:
+            ld2we, ldwe = self.data.we.shape[1:]
+        else:
+            we = self.data.we
+            ldwe = 1
+            ld2we = 1
+            if we.ndim == 1 and q == 1:
+                ldwe = n
+            elif we.ndim == 2:
+                if we.shape == (q, q):
+                    ld2we = q
+                elif we.shape == (q, n):
+                    ldwe = n
+
+        if self.job % 10 < 2:
+            # ODR not OLS
+            lwork = (18 + 11*p + p*p + m + m*m + 4*n*q + 6*n*m + 2*n*q*p +
+                     2*n*q*m + q*q + 5*q + q*(p+m) + ldwe*ld2we*q)
+        else:
+            # OLS not ODR
+            lwork = (18 + 11*p + p*p + m + m*m + 4*n*q + 2*n*m + 2*n*q*p +
+                     5*q + q*(p+m) + ldwe*ld2we*q)
+
+        if isinstance(self.work, np.ndarray) and self.work.shape == (lwork,)\
+                and self.work.dtype.str.endswith('f8'):
+            # the existing array is fine
+            return
+        else:
+            self.work = np.zeros((lwork,), float)
+
+    def set_job(self, fit_type=None, deriv=None, var_calc=None,
+        del_init=None, restart=None):
+        """
+        Sets the "job" parameter is a hopefully comprehensible way.
+
+        If an argument is not specified, then the value is left as is. The
+        default value from class initialization is for all of these options set
+        to 0.
+
+        Parameters
+        ----------
+        fit_type : {0, 1, 2} int
+            0 -> explicit ODR
+
+            1 -> implicit ODR
+
+            2 -> ordinary least-squares
+        deriv : {0, 1, 2, 3} int
+            0 -> forward finite differences
+
+            1 -> central finite differences
+
+            2 -> user-supplied derivatives (Jacobians) with results
+              checked by ODRPACK
+
+            3 -> user-supplied derivatives, no checking
+        var_calc : {0, 1, 2} int
+            0 -> calculate asymptotic covariance matrix and fit
+                 parameter uncertainties (V_B, s_B) using derivatives
+                 recomputed at the final solution
+
+            1 -> calculate V_B and s_B using derivatives from last iteration
+
+            2 -> do not calculate V_B and s_B
+        del_init : {0, 1} int
+            0 -> initial input variable offsets set to 0
+
+            1 -> initial offsets provided by user in variable "work"
+        restart : {0, 1} int
+            0 -> fit is not a restart
+
+            1 -> fit is a restart
+
+        Notes
+        -----
+        The permissible values are different from those given on pg. 31 of the
+        ODRPACK User's Guide only in that one cannot specify numbers greater than
+        the last value for each variable.
+
+        If one does not supply functions to compute the Jacobians, the fitting
+        procedure will change deriv to 0, finite differences, as a default. To
+        initialize the input variable offsets by yourself, set del_init to 1 and
+        put the offsets into the "work" variable correctly.
+
+        """
+
+        if self.job is None:
+            job_l = [0, 0, 0, 0, 0]
+        else:
+            job_l = [self.job // 10000 % 10,
+                     self.job // 1000 % 10,
+                     self.job // 100 % 10,
+                     self.job // 10 % 10,
+                     self.job % 10]
+
+        if fit_type in (0, 1, 2):
+            job_l[4] = fit_type
+        if deriv in (0, 1, 2, 3):
+            job_l[3] = deriv
+        if var_calc in (0, 1, 2):
+            job_l[2] = var_calc
+        if del_init in (0, 1):
+            job_l[1] = del_init
+        if restart in (0, 1):
+            job_l[0] = restart
+
+        self.job = (job_l[0]*10000 + job_l[1]*1000 +
+                    job_l[2]*100 + job_l[3]*10 + job_l[4])
+
+    def set_iprint(self, init=None, so_init=None,
+        iter=None, so_iter=None, iter_step=None, final=None, so_final=None):
+        """ Set the iprint parameter for the printing of computation reports.
+
+        If any of the arguments are specified here, then they are set in the
+        iprint member. If iprint is not set manually or with this method, then
+        ODRPACK defaults to no printing. If no filename is specified with the
+        member rptfile, then ODRPACK prints to stdout. One can tell ODRPACK to
+        print to stdout in addition to the specified filename by setting the
+        so_* arguments to this function, but one cannot specify to print to
+        stdout but not a file since one can do that by not specifying a rptfile
+        filename.
+
+        There are three reports: initialization, iteration, and final reports.
+        They are represented by the arguments init, iter, and final
+        respectively.  The permissible values are 0, 1, and 2 representing "no
+        report", "short report", and "long report" respectively.
+
+        The argument iter_step (0 <= iter_step <= 9) specifies how often to make
+        the iteration report; the report will be made for every iter_step'th
+        iteration starting with iteration one. If iter_step == 0, then no
+        iteration report is made, regardless of the other arguments.
+
+        If the rptfile is None, then any so_* arguments supplied will raise an
+        exception.
+        """
+        if self.iprint is None:
+            self.iprint = 0
+
+        ip = [self.iprint // 1000 % 10,
+              self.iprint // 100 % 10,
+              self.iprint // 10 % 10,
+              self.iprint % 10]
+
+        # make a list to convert iprint digits to/from argument inputs
+        #                   rptfile, stdout
+        ip2arg = [[0, 0],  # none,  none
+                  [1, 0],  # short, none
+                  [2, 0],  # long,  none
+                  [1, 1],  # short, short
+                  [2, 1],  # long,  short
+                  [1, 2],  # short, long
+                  [2, 2]]  # long,  long
+
+        if (self.rptfile is None and
+            (so_init is not None or
+             so_iter is not None or
+             so_final is not None)):
+            raise OdrError(
+                "no rptfile specified, cannot output to stdout twice")
+
+        iprint_l = ip2arg[ip[0]] + ip2arg[ip[1]] + ip2arg[ip[3]]
+
+        if init is not None:
+            iprint_l[0] = init
+        if so_init is not None:
+            iprint_l[1] = so_init
+        if iter is not None:
+            iprint_l[2] = iter
+        if so_iter is not None:
+            iprint_l[3] = so_iter
+        if final is not None:
+            iprint_l[4] = final
+        if so_final is not None:
+            iprint_l[5] = so_final
+
+        if iter_step in range(10):
+            # 0..9
+            ip[2] = iter_step
+
+        ip[0] = ip2arg.index(iprint_l[0:2])
+        ip[1] = ip2arg.index(iprint_l[2:4])
+        ip[3] = ip2arg.index(iprint_l[4:6])
+
+        self.iprint = ip[0]*1000 + ip[1]*100 + ip[2]*10 + ip[3]
+
+    def run(self):
+        """ Run the fitting routine with all of the information given and with ``full_output=1``.
+
+        Returns
+        -------
+        output : Output instance
+            This object is also assigned to the attribute .output .
+        """  # noqa: E501
+
+        args = (self.model.fcn, self.beta0, self.data.y, self.data.x)
+        kwds = {'full_output': 1}
+        kwd_l = ['ifixx', 'ifixb', 'job', 'iprint', 'errfile', 'rptfile',
+                 'ndigit', 'taufac', 'sstol', 'partol', 'maxit', 'stpb',
+                 'stpd', 'sclb', 'scld', 'work', 'iwork']
+
+        if self.delta0 is not None and (self.job // 10000) % 10 == 0:
+            # delta0 provided and fit is not a restart
+            self._gen_work()
+
+            d0 = np.ravel(self.delta0)
+
+            self.work[:len(d0)] = d0
+
+        # set the kwds from other objects explicitly
+        if self.model.fjacb is not None:
+            kwds['fjacb'] = self.model.fjacb
+        if self.model.fjacd is not None:
+            kwds['fjacd'] = self.model.fjacd
+        if self.data.we is not None:
+            kwds['we'] = self.data.we
+        if self.data.wd is not None:
+            kwds['wd'] = self.data.wd
+        if self.model.extra_args is not None:
+            kwds['extra_args'] = self.model.extra_args
+
+        # implicitly set kwds from self's members
+        for attr in kwd_l:
+            obj = getattr(self, attr)
+            if obj is not None:
+                kwds[attr] = obj
+
+        with ODR_LOCK:
+            self.output = Output(odr(*args, **kwds))
+
+        return self.output
+
+    def restart(self, iter=None):
+        """ Restarts the run with iter more iterations.
+
+        Parameters
+        ----------
+        iter : int, optional
+            ODRPACK's default for the number of new iterations is 10.
+
+        Returns
+        -------
+        output : Output instance
+            This object is also assigned to the attribute .output .
+        """
+
+        if self.output is None:
+            raise OdrError("cannot restart: run() has not been called before")
+
+        self.set_job(restart=1)
+        self.work = self.output.work
+        self.iwork = self.output.iwork
+
+        self.maxit = iter
+
+        return self.run()
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/models.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/models.py
new file mode 100644
index 0000000000000000000000000000000000000000..0289b59747bb68a4954e58732ac69d7df144f5f6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/models.py
@@ -0,0 +1,20 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.odr` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'Model', 'exponential', 'multilinear', 'unilinear',
+    'quadratic', 'polynomial'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="odr", module="models",
+                                   private_modules=["_models"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/odrpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/odrpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..192fb3342b7957703996957c882d44656706e41b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/odrpack.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.odr` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__ = [  # noqa: F822
+    'odr', 'OdrWarning', 'OdrError', 'OdrStop',
+    'Data', 'RealData', 'Model', 'Output', 'ODR',
+    'odr_error', 'odr_stop'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="odr", module="odrpack",
+                                   private_modules=["_odrpack"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/tests/test_odr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/tests/test_odr.py
new file mode 100644
index 0000000000000000000000000000000000000000..971cce6c55a84e08a182e3b25bf9a7e362937e01
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/odr/tests/test_odr.py
@@ -0,0 +1,607 @@
+import pickle
+import tempfile
+import shutil
+import os
+
+import numpy as np
+from numpy import pi
+from numpy.testing import (assert_array_almost_equal,
+                           assert_equal, assert_warns,
+                           assert_allclose)
+import pytest
+from pytest import raises as assert_raises
+
+from scipy.odr import (Data, Model, ODR, RealData, OdrStop, OdrWarning,
+                       multilinear, exponential, unilinear, quadratic,
+                       polynomial)
+
+
+class TestODR:
+
+    # Bad Data for 'x'
+
+    def test_bad_data(self):
+        assert_raises(ValueError, Data, 2, 1)
+        assert_raises(ValueError, RealData, 2, 1)
+
+    # Empty Data for 'x'
+    def empty_data_func(self, B, x):
+        return B[0]*x + B[1]
+
+    @pytest.mark.thread_unsafe
+    def test_empty_data(self):
+        beta0 = [0.02, 0.0]
+        linear = Model(self.empty_data_func)
+
+        empty_dat = Data([], [])
+        assert_warns(OdrWarning, ODR,
+                     empty_dat, linear, beta0=beta0)
+
+        empty_dat = RealData([], [])
+        assert_warns(OdrWarning, ODR,
+                     empty_dat, linear, beta0=beta0)
+
+    # Explicit Example
+
+    def explicit_fcn(self, B, x):
+        ret = B[0] + B[1] * np.power(np.exp(B[2]*x) - 1.0, 2)
+        return ret
+
+    def explicit_fjd(self, B, x):
+        eBx = np.exp(B[2]*x)
+        ret = B[1] * 2.0 * (eBx-1.0) * B[2] * eBx
+        return ret
+
+    def explicit_fjb(self, B, x):
+        eBx = np.exp(B[2]*x)
+        res = np.vstack([np.ones(x.shape[-1]),
+                         np.power(eBx-1.0, 2),
+                         B[1]*2.0*(eBx-1.0)*eBx*x])
+        return res
+
+    def test_explicit(self):
+        explicit_mod = Model(
+            self.explicit_fcn,
+            fjacb=self.explicit_fjb,
+            fjacd=self.explicit_fjd,
+            meta=dict(name='Sample Explicit Model',
+                      ref='ODRPACK UG, pg. 39'),
+        )
+        explicit_dat = Data([0.,0.,5.,7.,7.5,10.,16.,26.,30.,34.,34.5,100.],
+                        [1265.,1263.6,1258.,1254.,1253.,1249.8,1237.,1218.,1220.6,
+                         1213.8,1215.5,1212.])
+        explicit_odr = ODR(explicit_dat, explicit_mod, beta0=[1500.0, -50.0, -0.1],
+                       ifixx=[0,0,1,1,1,1,1,1,1,1,1,0])
+        explicit_odr.set_job(deriv=2)
+        explicit_odr.set_iprint(init=0, iter=0, final=0)
+
+        out = explicit_odr.run()
+        assert_array_almost_equal(
+            out.beta,
+            np.array([1.2646548050648876e+03, -5.4018409956678255e+01,
+                -8.7849712165253724e-02]),
+        )
+        assert_array_almost_equal(
+            out.sd_beta,
+            np.array([1.0349270280543437, 1.583997785262061, 0.0063321988657267]),
+        )
+        assert_array_almost_equal(
+            out.cov_beta,
+            np.array([[4.4949592379003039e-01, -3.7421976890364739e-01,
+                 -8.0978217468468912e-04],
+               [-3.7421976890364739e-01, 1.0529686462751804e+00,
+                 -1.9453521827942002e-03],
+               [-8.0978217468468912e-04, -1.9453521827942002e-03,
+                  1.6827336938454476e-05]]),
+        )
+
+    # Implicit Example
+
+    def implicit_fcn(self, B, x):
+        return (B[2]*np.power(x[0]-B[0], 2) +
+                2.0*B[3]*(x[0]-B[0])*(x[1]-B[1]) +
+                B[4]*np.power(x[1]-B[1], 2) - 1.0)
+
+    def test_implicit(self):
+        implicit_mod = Model(
+            self.implicit_fcn,
+            implicit=1,
+            meta=dict(name='Sample Implicit Model',
+                      ref='ODRPACK UG, pg. 49'),
+        )
+        implicit_dat = Data([
+            [0.5,1.2,1.6,1.86,2.12,2.36,2.44,2.36,2.06,1.74,1.34,0.9,-0.28,
+             -0.78,-1.36,-1.9,-2.5,-2.88,-3.18,-3.44],
+            [-0.12,-0.6,-1.,-1.4,-2.54,-3.36,-4.,-4.75,-5.25,-5.64,-5.97,-6.32,
+             -6.44,-6.44,-6.41,-6.25,-5.88,-5.5,-5.24,-4.86]],
+            1,
+        )
+        implicit_odr = ODR(implicit_dat, implicit_mod,
+            beta0=[-1.0, -3.0, 0.09, 0.02, 0.08])
+
+        out = implicit_odr.run()
+        assert_array_almost_equal(
+            out.beta,
+            np.array([-0.9993809167281279, -2.9310484652026476, 0.0875730502693354,
+                0.0162299708984738, 0.0797537982976416]),
+        )
+        assert_array_almost_equal(
+            out.sd_beta,
+            np.array([0.1113840353364371, 0.1097673310686467, 0.0041060738314314,
+                0.0027500347539902, 0.0034962501532468]),
+        )
+        assert_allclose(
+            out.cov_beta,
+            np.array([[2.1089274602333052e+00, -1.9437686411979040e+00,
+                  7.0263550868344446e-02, -4.7175267373474862e-02,
+                  5.2515575927380355e-02],
+               [-1.9437686411979040e+00, 2.0481509222414456e+00,
+                 -6.1600515853057307e-02, 4.6268827806232933e-02,
+                 -5.8822307501391467e-02],
+               [7.0263550868344446e-02, -6.1600515853057307e-02,
+                  2.8659542561579308e-03, -1.4628662260014491e-03,
+                  1.4528860663055824e-03],
+               [-4.7175267373474862e-02, 4.6268827806232933e-02,
+                 -1.4628662260014491e-03, 1.2855592885514335e-03,
+                 -1.2692942951415293e-03],
+               [5.2515575927380355e-02, -5.8822307501391467e-02,
+                  1.4528860663055824e-03, -1.2692942951415293e-03,
+                  2.0778813389755596e-03]]),
+            rtol=1e-6, atol=2e-6,
+        )
+
+    # Multi-variable Example
+
+    def multi_fcn(self, B, x):
+        if (x < 0.0).any():
+            raise OdrStop
+        theta = pi*B[3]/2.
+        ctheta = np.cos(theta)
+        stheta = np.sin(theta)
+        omega = np.power(2.*pi*x*np.exp(-B[2]), B[3])
+        phi = np.arctan2((omega*stheta), (1.0 + omega*ctheta))
+        r = (B[0] - B[1]) * np.power(np.sqrt(np.power(1.0 + omega*ctheta, 2) +
+             np.power(omega*stheta, 2)), -B[4])
+        ret = np.vstack([B[1] + r*np.cos(B[4]*phi),
+                         r*np.sin(B[4]*phi)])
+        return ret
+
+    def test_multi(self):
+        multi_mod = Model(
+            self.multi_fcn,
+            meta=dict(name='Sample Multi-Response Model',
+                      ref='ODRPACK UG, pg. 56'),
+        )
+
+        multi_x = np.array([30.0, 50.0, 70.0, 100.0, 150.0, 200.0, 300.0, 500.0,
+            700.0, 1000.0, 1500.0, 2000.0, 3000.0, 5000.0, 7000.0, 10000.0,
+            15000.0, 20000.0, 30000.0, 50000.0, 70000.0, 100000.0, 150000.0])
+        multi_y = np.array([
+            [4.22, 4.167, 4.132, 4.038, 4.019, 3.956, 3.884, 3.784, 3.713,
+             3.633, 3.54, 3.433, 3.358, 3.258, 3.193, 3.128, 3.059, 2.984,
+             2.934, 2.876, 2.838, 2.798, 2.759],
+            [0.136, 0.167, 0.188, 0.212, 0.236, 0.257, 0.276, 0.297, 0.309,
+             0.311, 0.314, 0.311, 0.305, 0.289, 0.277, 0.255, 0.24, 0.218,
+             0.202, 0.182, 0.168, 0.153, 0.139],
+        ])
+        n = len(multi_x)
+        multi_we = np.zeros((2, 2, n), dtype=float)
+        multi_ifixx = np.ones(n, dtype=int)
+        multi_delta = np.zeros(n, dtype=float)
+
+        multi_we[0,0,:] = 559.6
+        multi_we[1,0,:] = multi_we[0,1,:] = -1634.0
+        multi_we[1,1,:] = 8397.0
+
+        for i in range(n):
+            if multi_x[i] < 100.0:
+                multi_ifixx[i] = 0
+            elif multi_x[i] <= 150.0:
+                pass  # defaults are fine
+            elif multi_x[i] <= 1000.0:
+                multi_delta[i] = 25.0
+            elif multi_x[i] <= 10000.0:
+                multi_delta[i] = 560.0
+            elif multi_x[i] <= 100000.0:
+                multi_delta[i] = 9500.0
+            else:
+                multi_delta[i] = 144000.0
+            if multi_x[i] == 100.0 or multi_x[i] == 150.0:
+                multi_we[:,:,i] = 0.0
+
+        multi_dat = Data(multi_x, multi_y, wd=1e-4/np.power(multi_x, 2),
+            we=multi_we)
+        multi_odr = ODR(multi_dat, multi_mod, beta0=[4.,2.,7.,.4,.5],
+            delta0=multi_delta, ifixx=multi_ifixx)
+        multi_odr.set_job(deriv=1, del_init=1)
+
+        out = multi_odr.run()
+        assert_array_almost_equal(
+            out.beta,
+            np.array([4.3799880305938963, 2.4333057577497703, 8.0028845899503978,
+                0.5101147161764654, 0.5173902330489161]),
+        )
+        assert_array_almost_equal(
+            out.sd_beta,
+            np.array([0.0130625231081944, 0.0130499785273277, 0.1167085962217757,
+                0.0132642749596149, 0.0288529201353984]),
+        )
+        assert_array_almost_equal(
+            out.cov_beta,
+            np.array([[0.0064918418231375, 0.0036159705923791, 0.0438637051470406,
+                -0.0058700836512467, 0.011281212888768],
+               [0.0036159705923791, 0.0064793789429006, 0.0517610978353126,
+                -0.0051181304940204, 0.0130726943624117],
+               [0.0438637051470406, 0.0517610978353126, 0.5182263323095322,
+                -0.0563083340093696, 0.1269490939468611],
+               [-0.0058700836512467, -0.0051181304940204, -0.0563083340093696,
+                 0.0066939246261263, -0.0140184391377962],
+               [0.011281212888768, 0.0130726943624117, 0.1269490939468611,
+                -0.0140184391377962, 0.0316733013820852]]),
+        )
+
+    # Pearson's Data
+    # K. Pearson, Philosophical Magazine, 2, 559 (1901)
+
+    def pearson_fcn(self, B, x):
+        return B[0] + B[1]*x
+
+    def test_pearson(self):
+        p_x = np.array([0.,.9,1.8,2.6,3.3,4.4,5.2,6.1,6.5,7.4])
+        p_y = np.array([5.9,5.4,4.4,4.6,3.5,3.7,2.8,2.8,2.4,1.5])
+        p_sx = np.array([.03,.03,.04,.035,.07,.11,.13,.22,.74,1.])
+        p_sy = np.array([1.,.74,.5,.35,.22,.22,.12,.12,.1,.04])
+
+        p_dat = RealData(p_x, p_y, sx=p_sx, sy=p_sy)
+
+        # Reverse the data to test invariance of results
+        pr_dat = RealData(p_y, p_x, sx=p_sy, sy=p_sx)
+
+        p_mod = Model(self.pearson_fcn, meta=dict(name='Uni-linear Fit'))
+
+        p_odr = ODR(p_dat, p_mod, beta0=[1.,1.])
+        pr_odr = ODR(pr_dat, p_mod, beta0=[1.,1.])
+
+        out = p_odr.run()
+        assert_array_almost_equal(
+            out.beta,
+            np.array([5.4767400299231674, -0.4796082367610305]),
+        )
+        assert_array_almost_equal(
+            out.sd_beta,
+            np.array([0.3590121690702467, 0.0706291186037444]),
+        )
+        assert_array_almost_equal(
+            out.cov_beta,
+            np.array([[0.0854275622946333, -0.0161807025443155],
+               [-0.0161807025443155, 0.003306337993922]]),
+        )
+
+        rout = pr_odr.run()
+        assert_array_almost_equal(
+            rout.beta,
+            np.array([11.4192022410781231, -2.0850374506165474]),
+        )
+        assert_array_almost_equal(
+            rout.sd_beta,
+            np.array([0.9820231665657161, 0.3070515616198911]),
+        )
+        assert_array_almost_equal(
+            rout.cov_beta,
+            np.array([[0.6391799462548782, -0.1955657291119177],
+               [-0.1955657291119177, 0.0624888159223392]]),
+        )
+
+    # Lorentz Peak
+    # The data is taken from one of the undergraduate physics labs I performed.
+
+    def lorentz(self, beta, x):
+        return (beta[0]*beta[1]*beta[2] / np.sqrt(np.power(x*x -
+            beta[2]*beta[2], 2.0) + np.power(beta[1]*x, 2.0)))
+
+    def test_lorentz(self):
+        l_sy = np.array([.29]*18)
+        l_sx = np.array([.000972971,.000948268,.000707632,.000706679,
+            .000706074, .000703918,.000698955,.000456856,
+            .000455207,.000662717,.000654619,.000652694,
+            .000000859202,.00106589,.00106378,.00125483, .00140818,.00241839])
+
+        l_dat = RealData(
+            [3.9094, 3.85945, 3.84976, 3.84716, 3.84551, 3.83964, 3.82608,
+             3.78847, 3.78163, 3.72558, 3.70274, 3.6973, 3.67373, 3.65982,
+             3.6562, 3.62498, 3.55525, 3.41886],
+            [652, 910.5, 984, 1000, 1007.5, 1053, 1160.5, 1409.5, 1430, 1122,
+             957.5, 920, 777.5, 709.5, 698, 578.5, 418.5, 275.5],
+            sx=l_sx,
+            sy=l_sy,
+        )
+        l_mod = Model(self.lorentz, meta=dict(name='Lorentz Peak'))
+        l_odr = ODR(l_dat, l_mod, beta0=(1000., .1, 3.8))
+
+        out = l_odr.run()
+        assert_array_almost_equal(
+            out.beta,
+            np.array([1.4306780846149925e+03, 1.3390509034538309e-01,
+                 3.7798193600109009e+00]),
+        )
+        assert_array_almost_equal(
+            out.sd_beta,
+            np.array([7.3621186811330963e-01, 3.5068899941471650e-04,
+                 2.4451209281408992e-04]),
+        )
+        assert_array_almost_equal(
+            out.cov_beta,
+            np.array([[2.4714409064597873e-01, -6.9067261911110836e-05,
+                 -3.1236953270424990e-05],
+               [-6.9067261911110836e-05, 5.6077531517333009e-08,
+                  3.6133261832722601e-08],
+               [-3.1236953270424990e-05, 3.6133261832722601e-08,
+                  2.7261220025171730e-08]]),
+        )
+
+    def test_ticket_1253(self):
+        def linear(c, x):
+            return c[0]*x+c[1]
+
+        c = [2.0, 3.0]
+        x = np.linspace(0, 10)
+        y = linear(c, x)
+
+        model = Model(linear)
+        data = Data(x, y, wd=1.0, we=1.0)
+        job = ODR(data, model, beta0=[1.0, 1.0])
+        result = job.run()
+        assert_equal(result.info, 2)
+
+    # Verify fix for gh-9140
+
+    def test_ifixx(self):
+        x1 = [-2.01, -0.99, -0.001, 1.02, 1.98]
+        x2 = [3.98, 1.01, 0.001, 0.998, 4.01]
+        fix = np.vstack((np.zeros_like(x1, dtype=int), np.ones_like(x2, dtype=int)))
+        data = Data(np.vstack((x1, x2)), y=1, fix=fix)
+        model = Model(lambda beta, x: x[1, :] - beta[0] * x[0, :]**2., implicit=True)
+
+        odr1 = ODR(data, model, beta0=np.array([1.]))
+        sol1 = odr1.run()
+        odr2 = ODR(data, model, beta0=np.array([1.]), ifixx=fix)
+        sol2 = odr2.run()
+        assert_equal(sol1.beta, sol2.beta)
+
+    # verify bugfix for #11800 in #11802
+    def test_ticket_11800(self):
+        # parameters
+        beta_true = np.array([1.0, 2.3, 1.1, -1.0, 1.3, 0.5])
+        nr_measurements = 10
+
+        std_dev_x = 0.01
+        x_error = np.array([[0.00063445, 0.00515731, 0.00162719, 0.01022866,
+            -0.01624845, 0.00482652, 0.00275988, -0.00714734, -0.00929201, -0.00687301],
+            [-0.00831623, -0.00821211, -0.00203459, 0.00938266, -0.00701829,
+            0.0032169, 0.00259194, -0.00581017, -0.0030283, 0.01014164]])
+
+        std_dev_y = 0.05
+        y_error = np.array([[0.05275304, 0.04519563, -0.07524086, 0.03575642,
+            0.04745194, 0.03806645, 0.07061601, -0.00753604, -0.02592543, -0.02394929],
+            [0.03632366, 0.06642266, 0.08373122, 0.03988822, -0.0092536,
+            -0.03750469, -0.03198903, 0.01642066, 0.01293648, -0.05627085]])
+
+        beta_solution = np.array([
+            2.62920235756665876536e+00, -1.26608484996299608838e+02,
+            1.29703572775403074502e+02, -1.88560985401185465804e+00,
+            7.83834160771274923718e+01, -7.64124076838087091801e+01])
+
+        # model's function and Jacobians
+        def func(beta, x):
+            y0 = beta[0] + beta[1] * x[0, :] + beta[2] * x[1, :]
+            y1 = beta[3] + beta[4] * x[0, :] + beta[5] * x[1, :]
+
+            return np.vstack((y0, y1))
+
+        def df_dbeta_odr(beta, x):
+            nr_meas = np.shape(x)[1]
+            zeros = np.zeros(nr_meas)
+            ones = np.ones(nr_meas)
+
+            dy0 = np.array([ones, x[0, :], x[1, :], zeros, zeros, zeros])
+            dy1 = np.array([zeros, zeros, zeros, ones, x[0, :], x[1, :]])
+
+            return np.stack((dy0, dy1))
+
+        def df_dx_odr(beta, x):
+            nr_meas = np.shape(x)[1]
+            ones = np.ones(nr_meas)
+
+            dy0 = np.array([beta[1] * ones, beta[2] * ones])
+            dy1 = np.array([beta[4] * ones, beta[5] * ones])
+            return np.stack((dy0, dy1))
+
+        # do measurements with errors in independent and dependent variables
+        x0_true = np.linspace(1, 10, nr_measurements)
+        x1_true = np.linspace(1, 10, nr_measurements)
+        x_true = np.array([x0_true, x1_true])
+
+        y_true = func(beta_true, x_true)
+
+        x_meas = x_true + x_error
+        y_meas = y_true + y_error
+
+        # estimate model's parameters
+        model_f = Model(func, fjacb=df_dbeta_odr, fjacd=df_dx_odr)
+
+        data = RealData(x_meas, y_meas, sx=std_dev_x, sy=std_dev_y)
+
+        odr_obj = ODR(data, model_f, beta0=0.9 * beta_true, maxit=100)
+        #odr_obj.set_iprint(init=2, iter=0, iter_step=1, final=1)
+        odr_obj.set_job(deriv=3)
+
+        odr_out = odr_obj.run()
+
+        # check results
+        assert_equal(odr_out.info, 1)
+        assert_array_almost_equal(odr_out.beta, beta_solution)
+
+    def test_multilinear_model(self):
+        x = np.linspace(0.0, 5.0)
+        y = 10.0 + 5.0 * x
+        data = Data(x, y)
+        odr_obj = ODR(data, multilinear)
+        output = odr_obj.run()
+        assert_array_almost_equal(output.beta, [10.0, 5.0])
+
+    def test_exponential_model(self):
+        x = np.linspace(0.0, 5.0)
+        y = -10.0 + np.exp(0.5*x)
+        data = Data(x, y)
+        odr_obj = ODR(data, exponential)
+        output = odr_obj.run()
+        assert_array_almost_equal(output.beta, [-10.0, 0.5])
+
+    def test_polynomial_model(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 + 2.0 * x + 3.0 * x ** 2 + 4.0 * x ** 3
+        poly_model = polynomial(3)
+        data = Data(x, y)
+        odr_obj = ODR(data, poly_model)
+        output = odr_obj.run()
+        assert_array_almost_equal(output.beta, [1.0, 2.0, 3.0, 4.0])
+
+    def test_unilinear_model(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x + 2.0
+        data = Data(x, y)
+        odr_obj = ODR(data, unilinear)
+        output = odr_obj.run()
+        assert_array_almost_equal(output.beta, [1.0, 2.0])
+
+    def test_quadratic_model(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x ** 2 + 2.0 * x + 3.0
+        data = Data(x, y)
+        odr_obj = ODR(data, quadratic)
+        output = odr_obj.run()
+        assert_array_almost_equal(output.beta, [1.0, 2.0, 3.0])
+
+    def test_work_ind(self):
+
+        def func(par, x):
+            b0, b1 = par
+            return b0 + b1 * x
+
+        # generate some data
+        n_data = 4
+        x = np.arange(n_data)
+        y = np.where(x % 2, x + 0.1, x - 0.1)
+        x_err = np.full(n_data, 0.1)
+        y_err = np.full(n_data, 0.1)
+
+        # do the fitting
+        linear_model = Model(func)
+        real_data = RealData(x, y, sx=x_err, sy=y_err)
+        odr_obj = ODR(real_data, linear_model, beta0=[0.4, 0.4])
+        odr_obj.set_job(fit_type=0)
+        out = odr_obj.run()
+
+        sd_ind = out.work_ind['sd']
+        assert_array_almost_equal(out.sd_beta,
+                                  out.work[sd_ind:sd_ind + len(out.sd_beta)])
+
+    @pytest.mark.skipif(True, reason="Fortran I/O prone to crashing so better "
+                                     "not to run this test, see gh-13127")
+    def test_output_file_overwrite(self):
+        """
+        Verify fix for gh-1892
+        """
+        def func(b, x):
+            return b[0] + b[1] * x
+
+        p = Model(func)
+        data = Data(np.arange(10), 12 * np.arange(10))
+        tmp_dir = tempfile.mkdtemp()
+        error_file_path = os.path.join(tmp_dir, "error.dat")
+        report_file_path = os.path.join(tmp_dir, "report.dat")
+        try:
+            ODR(data, p, beta0=[0.1, 13], errfile=error_file_path,
+                rptfile=report_file_path).run()
+            ODR(data, p, beta0=[0.1, 13], errfile=error_file_path,
+                rptfile=report_file_path, overwrite=True).run()
+        finally:
+            # remove output files for clean up
+            shutil.rmtree(tmp_dir)
+
+    def test_odr_model_default_meta(self):
+        def func(b, x):
+            return b[0] + b[1] * x
+
+        p = Model(func)
+        p.set_meta(name='Sample Model Meta', ref='ODRPACK')
+        assert_equal(p.meta, {'name': 'Sample Model Meta', 'ref': 'ODRPACK'})
+
+    def test_work_array_del_init(self):
+        """
+        Verify fix for gh-18739 where del_init=1 fails.
+        """
+        def func(b, x):
+            return b[0] + b[1] * x
+
+        # generate some data
+        n_data = 4
+        x = np.arange(n_data)
+        y = np.where(x % 2, x + 0.1, x - 0.1)
+        x_err = np.full(n_data, 0.1)
+        y_err = np.full(n_data, 0.1)
+
+        linear_model = Model(func)
+        # Try various shapes of the `we` array from various `sy` and `covy`
+        rd0 = RealData(x, y, sx=x_err, sy=y_err)
+        rd1 = RealData(x, y, sx=x_err, sy=0.1)
+        rd2 = RealData(x, y, sx=x_err, sy=[0.1])
+        rd3 = RealData(x, y, sx=x_err, sy=np.full((1, n_data), 0.1))
+        rd4 = RealData(x, y, sx=x_err, covy=[[0.01]])
+        rd5 = RealData(x, y, sx=x_err, covy=np.full((1, 1, n_data), 0.01))
+        for rd in [rd0, rd1, rd2, rd3, rd4, rd5]:
+            odr_obj = ODR(rd, linear_model, beta0=[0.4, 0.4],
+                          delta0=np.full(n_data, -0.1))
+            odr_obj.set_job(fit_type=0, del_init=1)
+            # Just make sure that it runs without raising an exception.
+            odr_obj.run()
+
+    def test_pickling_data(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x + 2.0
+        data = Data(x, y)
+
+        obj_pickle = pickle.dumps(data)
+        del data
+        pickle.loads(obj_pickle)
+
+    def test_pickling_real_data(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x + 2.0
+        data = RealData(x, y)
+
+        obj_pickle = pickle.dumps(data)
+        del data
+        pickle.loads(obj_pickle)
+
+    def test_pickling_model(self):
+        obj_pickle = pickle.dumps(unilinear)
+        pickle.loads(obj_pickle)
+
+    def test_pickling_odr(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x + 2.0
+        odr_obj = ODR(Data(x, y), unilinear)
+
+        obj_pickle = pickle.dumps(odr_obj)
+        del odr_obj
+        pickle.loads(obj_pickle)
+
+    def test_pickling_output(self):
+        x = np.linspace(0.0, 5.0)
+        y = 1.0 * x + 2.0
+        output = ODR(Data(x, y), unilinear).run
+
+        obj_pickle = pickle.dumps(output)
+        del output
+        pickle.loads(obj_pickle)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..2402eeb020d34ad8b82e287e32545423911ff66c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.pxd
@@ -0,0 +1 @@
+from .optimize cimport cython_optimize
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..fce4cecd22b165f9975160fe7c1ed718ed358853
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__init__.py
@@ -0,0 +1,460 @@
+"""
+=====================================================
+Optimization and root finding (:mod:`scipy.optimize`)
+=====================================================
+
+.. currentmodule:: scipy.optimize
+
+.. toctree::
+   :hidden:
+
+   optimize.cython_optimize
+
+SciPy ``optimize`` provides functions for minimizing (or maximizing)
+objective functions, possibly subject to constraints. It includes
+solvers for nonlinear problems (with support for both local and global
+optimization algorithms), linear programming, constrained
+and nonlinear least-squares, root finding, and curve fitting.
+
+Common functions and objects, shared across different solvers, are:
+
+.. autosummary::
+   :toctree: generated/
+
+   show_options - Show specific options optimization solvers.
+   OptimizeResult - The optimization result returned by some optimizers.
+   OptimizeWarning - The optimization encountered problems.
+
+
+Optimization
+============
+
+Scalar functions optimization
+-----------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   minimize_scalar - Interface for minimizers of univariate functions
+
+The `minimize_scalar` function supports the following methods:
+
+.. toctree::
+
+   optimize.minimize_scalar-brent
+   optimize.minimize_scalar-bounded
+   optimize.minimize_scalar-golden
+
+Local (multivariate) optimization
+---------------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   minimize - Interface for minimizers of multivariate functions.
+
+The `minimize` function supports the following methods:
+
+.. toctree::
+
+   optimize.minimize-neldermead
+   optimize.minimize-powell
+   optimize.minimize-cg
+   optimize.minimize-bfgs
+   optimize.minimize-newtoncg
+   optimize.minimize-lbfgsb
+   optimize.minimize-tnc
+   optimize.minimize-cobyla
+   optimize.minimize-cobyqa
+   optimize.minimize-slsqp
+   optimize.minimize-trustconstr
+   optimize.minimize-dogleg
+   optimize.minimize-trustncg
+   optimize.minimize-trustkrylov
+   optimize.minimize-trustexact
+
+Constraints are passed to `minimize` function as a single object or
+as a list of objects from the following classes:
+
+.. autosummary::
+   :toctree: generated/
+
+   NonlinearConstraint - Class defining general nonlinear constraints.
+   LinearConstraint - Class defining general linear constraints.
+
+Simple bound constraints are handled separately and there is a special class
+for them:
+
+.. autosummary::
+   :toctree: generated/
+
+   Bounds - Bound constraints.
+
+Quasi-Newton strategies implementing `HessianUpdateStrategy`
+interface can be used to approximate the Hessian in `minimize`
+function (available only for the 'trust-constr' method). Available
+quasi-Newton methods implementing this interface are:
+
+.. autosummary::
+   :toctree: generated/
+
+   BFGS - Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian update strategy.
+   SR1 - Symmetric-rank-1 Hessian update strategy.
+
+.. _global_optimization:
+
+Global optimization
+-------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   basinhopping - Basinhopping stochastic optimizer.
+   brute - Brute force searching optimizer.
+   differential_evolution - Stochastic optimizer using differential evolution.
+
+   shgo - Simplicial homology global optimizer.
+   dual_annealing - Dual annealing stochastic optimizer.
+   direct - DIRECT (Dividing Rectangles) optimizer.
+
+Least-squares and curve fitting
+===============================
+
+Nonlinear least-squares
+-----------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   least_squares - Solve a nonlinear least-squares problem with bounds on the variables.
+
+Linear least-squares
+--------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   nnls - Linear least-squares problem with non-negativity constraint.
+   lsq_linear - Linear least-squares problem with bound constraints.
+   isotonic_regression - Least squares problem of isotonic regression via PAVA.
+
+Curve fitting
+-------------
+
+.. autosummary::
+   :toctree: generated/
+
+   curve_fit -- Fit curve to a set of points.
+
+Root finding
+============
+
+Scalar functions
+----------------
+.. autosummary::
+   :toctree: generated/
+
+   root_scalar - Unified interface for nonlinear solvers of scalar functions.
+   brentq - quadratic interpolation Brent method.
+   brenth - Brent method, modified by Harris with hyperbolic extrapolation.
+   ridder - Ridder's method.
+   bisect - Bisection method.
+   newton - Newton's method (also Secant and Halley's methods).
+   toms748 - Alefeld, Potra & Shi Algorithm 748.
+   RootResults - The root finding result returned by some root finders.
+
+The `root_scalar` function supports the following methods:
+
+.. toctree::
+
+   optimize.root_scalar-brentq
+   optimize.root_scalar-brenth
+   optimize.root_scalar-bisect
+   optimize.root_scalar-ridder
+   optimize.root_scalar-newton
+   optimize.root_scalar-toms748
+   optimize.root_scalar-secant
+   optimize.root_scalar-halley
+
+
+
+The table below lists situations and appropriate methods, along with
+*asymptotic* convergence rates per iteration (and per function evaluation)
+for successful convergence to a simple root(*).
+Bisection is the slowest of them all, adding one bit of accuracy for each
+function evaluation, but is guaranteed to converge.
+The other bracketing methods all (eventually) increase the number of accurate
+bits by about 50% for every function evaluation.
+The derivative-based methods, all built on `newton`, can converge quite quickly
+if the initial value is close to the root.  They can also be applied to
+functions defined on (a subset of) the complex plane.
+
++-------------+----------+----------+-----------+-------------+-------------+----------------+
+| Domain of f | Bracket? |    Derivatives?      | Solvers     |        Convergence           |
++             +          +----------+-----------+             +-------------+----------------+
+|             |          | `fprime` | `fprime2` |             | Guaranteed? |  Rate(s)(*)    |
++=============+==========+==========+===========+=============+=============+================+
+| `R`         | Yes      | N/A      | N/A       | - bisection | - Yes       | - 1 "Linear"   |
+|             |          |          |           | - brentq    | - Yes       | - >=1, <= 1.62 |
+|             |          |          |           | - brenth    | - Yes       | - >=1, <= 1.62 |
+|             |          |          |           | - ridder    | - Yes       | - 2.0 (1.41)   |
+|             |          |          |           | - toms748   | - Yes       | - 2.7 (1.65)   |
++-------------+----------+----------+-----------+-------------+-------------+----------------+
+| `R` or `C`  | No       | No       | No        | secant      | No          | 1.62 (1.62)    |
++-------------+----------+----------+-----------+-------------+-------------+----------------+
+| `R` or `C`  | No       | Yes      | No        | newton      | No          | 2.00 (1.41)    |
++-------------+----------+----------+-----------+-------------+-------------+----------------+
+| `R` or `C`  | No       | Yes      | Yes       | halley      | No          | 3.00 (1.44)    |
++-------------+----------+----------+-----------+-------------+-------------+----------------+
+
+.. seealso::
+
+   `scipy.optimize.cython_optimize` -- Typed Cython versions of root finding functions
+
+Fixed point finding:
+
+.. autosummary::
+   :toctree: generated/
+
+   fixed_point - Single-variable fixed-point solver.
+
+Multidimensional
+----------------
+
+.. autosummary::
+   :toctree: generated/
+
+   root - Unified interface for nonlinear solvers of multivariate functions.
+
+The `root` function supports the following methods:
+
+.. toctree::
+
+   optimize.root-hybr
+   optimize.root-lm
+   optimize.root-broyden1
+   optimize.root-broyden2
+   optimize.root-anderson
+   optimize.root-linearmixing
+   optimize.root-diagbroyden
+   optimize.root-excitingmixing
+   optimize.root-krylov
+   optimize.root-dfsane
+   
+Elementwise Minimization and Root Finding
+=========================================
+
+.. toctree::
+   :maxdepth: 3
+
+   optimize.elementwise
+
+Linear programming / MILP
+=========================
+
+.. autosummary::
+   :toctree: generated/
+
+   milp -- Mixed integer linear programming.
+   linprog -- Unified interface for minimizers of linear programming problems.
+
+The `linprog` function supports the following methods:
+
+.. toctree::
+
+   optimize.linprog-simplex
+   optimize.linprog-interior-point
+   optimize.linprog-revised_simplex
+   optimize.linprog-highs-ipm
+   optimize.linprog-highs-ds
+   optimize.linprog-highs
+
+The simplex, interior-point, and revised simplex methods support callback
+functions, such as:
+
+.. autosummary::
+   :toctree: generated/
+
+   linprog_verbose_callback -- Sample callback function for linprog (simplex).
+
+Assignment problems
+===================
+
+.. autosummary::
+   :toctree: generated/
+
+   linear_sum_assignment -- Solves the linear-sum assignment problem.
+   quadratic_assignment -- Solves the quadratic assignment problem.
+
+The `quadratic_assignment` function supports the following methods:
+
+.. toctree::
+
+   optimize.qap-faq
+   optimize.qap-2opt
+
+Utilities
+=========
+
+Finite-difference approximation
+-------------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   approx_fprime - Approximate the gradient of a scalar function.
+   check_grad - Check the supplied derivative using finite differences.
+
+
+Line search
+-----------
+
+.. autosummary::
+   :toctree: generated/
+
+   bracket - Bracket a minimum, given two starting points.
+   line_search - Return a step that satisfies the strong Wolfe conditions.
+
+Hessian approximation
+---------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   LbfgsInvHessProduct - Linear operator for L-BFGS approximate inverse Hessian.
+   HessianUpdateStrategy - Interface for implementing Hessian update strategies
+
+Benchmark problems
+------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   rosen - The Rosenbrock function.
+   rosen_der - The derivative of the Rosenbrock function.
+   rosen_hess - The Hessian matrix of the Rosenbrock function.
+   rosen_hess_prod - Product of the Rosenbrock Hessian with a vector.
+
+Legacy functions
+================
+
+The functions below are not recommended for use in new scripts;
+all of these methods are accessible via a newer, more consistent
+interfaces, provided by the interfaces above.
+
+Optimization
+------------
+
+General-purpose multivariate methods:
+
+.. autosummary::
+   :toctree: generated/
+
+   fmin - Nelder-Mead Simplex algorithm.
+   fmin_powell - Powell's (modified) conjugate direction method.
+   fmin_cg - Non-linear (Polak-Ribiere) conjugate gradient algorithm.
+   fmin_bfgs - Quasi-Newton method (Broydon-Fletcher-Goldfarb-Shanno).
+   fmin_ncg - Line-search Newton Conjugate Gradient.
+
+Constrained multivariate methods:
+
+.. autosummary::
+   :toctree: generated/
+
+   fmin_l_bfgs_b - Zhu, Byrd, and Nocedal's constrained optimizer.
+   fmin_tnc - Truncated Newton code.
+   fmin_cobyla - Constrained optimization by linear approximation.
+   fmin_slsqp - Minimization using sequential least-squares programming.
+
+Univariate (scalar) minimization methods:
+
+.. autosummary::
+   :toctree: generated/
+
+   fminbound - Bounded minimization of a scalar function.
+   brent - 1-D function minimization using Brent method.
+   golden - 1-D function minimization using Golden Section method.
+
+Least-squares
+-------------
+
+.. autosummary::
+   :toctree: generated/
+
+   leastsq - Minimize the sum of squares of M equations in N unknowns.
+
+Root finding
+------------
+
+General nonlinear solvers:
+
+.. autosummary::
+   :toctree: generated/
+
+   fsolve - Non-linear multivariable equation solver.
+   broyden1 - Broyden's first method.
+   broyden2 - Broyden's second method.
+   NoConvergence -  Exception raised when nonlinear solver does not converge.
+
+Large-scale nonlinear solvers:
+
+.. autosummary::
+   :toctree: generated/
+
+   newton_krylov
+   anderson
+
+   BroydenFirst
+   InverseJacobian
+   KrylovJacobian
+
+Simple iteration solvers:
+
+.. autosummary::
+   :toctree: generated/
+
+   excitingmixing
+   linearmixing
+   diagbroyden
+
+"""  # noqa: E501
+
+from ._optimize import *
+from ._minimize import *
+from ._root import *
+from ._root_scalar import *
+from ._minpack_py import *
+from ._zeros_py import *
+from ._lbfgsb_py import fmin_l_bfgs_b, LbfgsInvHessProduct
+from ._tnc import fmin_tnc
+from ._cobyla_py import fmin_cobyla
+from ._nonlin import *
+from ._slsqp_py import fmin_slsqp
+from ._nnls import nnls
+from ._basinhopping import basinhopping
+from ._linprog import linprog, linprog_verbose_callback
+from ._lsap import linear_sum_assignment
+from ._differentialevolution import differential_evolution
+from ._lsq import least_squares, lsq_linear
+from ._isotonic import isotonic_regression
+from ._constraints import (NonlinearConstraint,
+                           LinearConstraint,
+                           Bounds)
+from ._hessian_update_strategy import HessianUpdateStrategy, BFGS, SR1
+from ._shgo import shgo
+from ._dual_annealing import dual_annealing
+from ._qap import quadratic_assignment
+from ._direct_py import direct
+from ._milp import milp
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import (
+    cobyla, lbfgsb, linesearch, minpack, minpack2, moduleTNC, nonlin, optimize,
+    slsqp, tnc, zeros
+)
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ee8af9cf2ed5cfc2772245da63050b4af653fa33
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_basinhopping.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_basinhopping.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..188105a283b8daeab6927695cbfeb1d99d9d0c33
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_basinhopping.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_bracket.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_bracket.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b609f74a635929556ba5de74523e80459ef6cbf4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_bracket.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_chandrupatla.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_chandrupatla.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9131f1486342be466d93d361758e93aac28cc4bf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_chandrupatla.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyla_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyla_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..10fa9c50ee76cebed6038e74fff798539781d288
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyla_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyqa_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyqa_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..540807acd803ec57f61f67392bbb178131769b14
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_cobyqa_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_constraints.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_constraints.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d935ff95f70d8bb0165f89425994f10b3199c209
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_constraints.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dcsrch.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dcsrch.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f944a73d7533c808d8fabd0f246d049f3be10ce8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dcsrch.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentiable_functions.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentiable_functions.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6f4e1abdb6a47be4d15f077d66d63f545070beff
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentiable_functions.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentialevolution.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentialevolution.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8350eca74ed05f265a66e45a6e049a3b794cc66c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_differentialevolution.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_direct_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_direct_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0dd218e44dff0a266496d22a1ea528fe30145910
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_direct_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dual_annealing.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dual_annealing.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cb4630af20121a2d9a82f71a76fbe04c55f7f9e4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_dual_annealing.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_hessian_update_strategy.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_hessian_update_strategy.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..72943edb20ab166cecd8155942c64ffbf61812df
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_hessian_update_strategy.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_isotonic.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_isotonic.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..997efa8e7ee2cb76203d9e2700993a49f7b92eed
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_isotonic.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_lbfgsb_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_lbfgsb_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..759144ba1abb9f119e64e3f6d4514ba0388da46f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_lbfgsb_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linesearch.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linesearch.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e1f70918cc9cc3b49b59a89238bba5e10d02333c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linesearch.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..573946dd9cce9f3888a0e1ec19dfd3eff8909438
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_doc.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_doc.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2242f33d1d61bf02051ce84c0d3098c7981f1114
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_doc.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_highs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_highs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bfd40b3364f43f0cab9aeee21d93855c6bfea12a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_highs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_ip.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_ip.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3d70153b7e51255644b480de454deb17ceaf168e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_ip.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_rs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_rs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..450f26726e4944be382ab554f4a7080a70c4453f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_rs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_simplex.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_simplex.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2bedde47147f45478811d44554768fdd1ff67597
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_simplex.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_util.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_util.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b20a9128d7bba358a9cccec362178223e0d9a16e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_linprog_util.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_milp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_milp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8df4ccf692fe957126d7c195f477fc3f32c37409
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_milp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minimize.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minimize.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ed28d3a227f49fb0fbcbc63bb18093e7ae10c88f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minimize.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minpack_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minpack_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aa0cef4d872cb40e12e69922e33ddb5d8ac24624
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_minpack_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nnls.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nnls.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1db6ba3c8b2c41ddd7f82721944f71d125590a1b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nnls.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nonlin.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nonlin.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d204ef112e3a7afd7ff6a2bcd495222ae5eefde0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_nonlin.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_numdiff.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_numdiff.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..97d9c0675103fc56b89e3b59f626891cf6a058eb
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_numdiff.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_qap.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_qap.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..851333657971257f56f7972ad50ed163fb1b7573
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_qap.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_remove_redundancy.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_remove_redundancy.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f22aec0b0bc434c299e5f78b47374ec89aec4359
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_remove_redundancy.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..06fd21778c91865a0016b24a5c3e0dfccd17c9e0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root_scalar.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root_scalar.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..da5e9068d4aacf58b81449134abe9326dbc02fdc
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_root_scalar.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_shgo.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_shgo.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d9e4ce56f37c83391ce57557abf02679127043de
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_shgo.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_slsqp_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_slsqp_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a4fec310aa6d4671e3815410ba10ade32ee8644e
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_slsqp_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_spectral.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_spectral.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c8cd8b9f6dfe2fbafab3978f676f8aed5b3d3455
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_spectral.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_tnc.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_tnc.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6cc5f8013237cbfdc069a9274661c5d6a6a10152
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_tnc.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0a65968680a7edc102d841e3276fa699f74ea665
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_dogleg.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_dogleg.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fd7830090f7394f1056c40362f1b4046150c3f24
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_dogleg.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_exact.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_exact.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c7e0506334f1a6ca88d00b647c992e9ebf41b234
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_exact.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_krylov.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_krylov.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..12d911744d782c51d50b27eba2c2f60e2ec39c63
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_krylov.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_ncg.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_ncg.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7ead82008422ba25c3343540db1551083c018ef3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_trustregion_ncg.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_zeros_py.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_zeros_py.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7c7daa83b0013cbe9a3361f670de2149143a920c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/_zeros_py.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/cobyla.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/cobyla.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fc57bec0468af1c62b23f739f2ae55ca4fbd1a66
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/cobyla.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/lbfgsb.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/lbfgsb.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cbcf51ad88387383da52ff34038d557e2d49babf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/lbfgsb.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/linesearch.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/linesearch.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ab50371f46ed619bf54f09791491e403c7d3d358
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/linesearch.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fb6f8bd7810e78efad71e4907e087d2eecb06d16
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack2.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack2.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..049972c46cb46e384e7076cbf1b00a73465050cd
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/minpack2.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/moduleTNC.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/moduleTNC.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f8f5097d3f8aba4d78c6d1162c75c3f4f2df30be
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/moduleTNC.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/nonlin.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/nonlin.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..146ca9fca8b7a1c77257fdb53067ccfbdfb2ddce
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/nonlin.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/optimize.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/optimize.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4f07d62b63fa8c2d6cdec2467e9ed31ae85c9b84
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/optimize.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/slsqp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/slsqp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7d4d83b4ec6a2962a637ac1ea3844e4450be13c9
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/slsqp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/tnc.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/tnc.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a149cefcac61369a63d0c16f4b541197dc6e3e2a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/tnc.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/zeros.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/zeros.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..93b530b99cf16f1e1a81d59e06627705f8193935
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/__pycache__/zeros.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_basinhopping.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_basinhopping.py
new file mode 100644
index 0000000000000000000000000000000000000000..90498155887fc45ba0748c0d798bda17caef39f0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_basinhopping.py
@@ -0,0 +1,735 @@
+"""
+basinhopping: The basinhopping global optimization algorithm
+"""
+import numpy as np
+import math
+import inspect
+import scipy.optimize
+from scipy._lib._util import check_random_state, _transition_to_rng
+
+__all__ = ['basinhopping']
+
+
+_params = (inspect.Parameter('res_new', kind=inspect.Parameter.KEYWORD_ONLY),
+           inspect.Parameter('res_old', kind=inspect.Parameter.KEYWORD_ONLY))
+_new_accept_test_signature = inspect.Signature(parameters=_params)
+
+
+class Storage:
+    """
+    Class used to store the lowest energy structure
+    """
+    def __init__(self, minres):
+        self._add(minres)
+
+    def _add(self, minres):
+        self.minres = minres
+        self.minres.x = np.copy(minres.x)
+
+    def update(self, minres):
+        if minres.success and (minres.fun < self.minres.fun
+                               or not self.minres.success):
+            self._add(minres)
+            return True
+        else:
+            return False
+
+    def get_lowest(self):
+        return self.minres
+
+
+class BasinHoppingRunner:
+    """This class implements the core of the basinhopping algorithm.
+
+    x0 : ndarray
+        The starting coordinates.
+    minimizer : callable
+        The local minimizer, with signature ``result = minimizer(x)``.
+        The return value is an `optimize.OptimizeResult` object.
+    step_taking : callable
+        This function displaces the coordinates randomly. Signature should
+        be ``x_new = step_taking(x)``. Note that `x` may be modified in-place.
+    accept_tests : list of callables
+        Each test is passed the kwargs `f_new`, `x_new`, `f_old` and
+        `x_old`. These tests will be used to judge whether or not to accept
+        the step. The acceptable return values are True, False, or ``"force
+        accept"``. If any of the tests return False then the step is rejected.
+        If ``"force accept"``, then this will override any other tests in
+        order to accept the step. This can be used, for example, to forcefully
+        escape from a local minimum that ``basinhopping`` is trapped in.
+    disp : bool, optional
+        Display status messages.
+
+    """
+    def __init__(self, x0, minimizer, step_taking, accept_tests, disp=False):
+        self.x = np.copy(x0)
+        self.minimizer = minimizer
+        self.step_taking = step_taking
+        self.accept_tests = accept_tests
+        self.disp = disp
+
+        self.nstep = 0
+
+        # initialize return object
+        self.res = scipy.optimize.OptimizeResult()
+        self.res.minimization_failures = 0
+
+        # do initial minimization
+        minres = minimizer(self.x)
+        if not minres.success:
+            self.res.minimization_failures += 1
+            if self.disp:
+                print("warning: basinhopping: local minimization failure")
+        self.x = np.copy(minres.x)
+        self.energy = minres.fun
+        self.incumbent_minres = minres  # best minimize result found so far
+        if self.disp:
+            print("basinhopping step %d: f %g" % (self.nstep, self.energy))
+
+        # initialize storage class
+        self.storage = Storage(minres)
+
+        if hasattr(minres, "nfev"):
+            self.res.nfev = minres.nfev
+        if hasattr(minres, "njev"):
+            self.res.njev = minres.njev
+        if hasattr(minres, "nhev"):
+            self.res.nhev = minres.nhev
+
+    def _monte_carlo_step(self):
+        """Do one Monte Carlo iteration
+
+        Randomly displace the coordinates, minimize, and decide whether
+        or not to accept the new coordinates.
+        """
+        # Take a random step.  Make a copy of x because the step_taking
+        # algorithm might change x in place
+        x_after_step = np.copy(self.x)
+        x_after_step = self.step_taking(x_after_step)
+
+        # do a local minimization
+        minres = self.minimizer(x_after_step)
+        x_after_quench = minres.x
+        energy_after_quench = minres.fun
+        if not minres.success:
+            self.res.minimization_failures += 1
+            if self.disp:
+                print("warning: basinhopping: local minimization failure")
+        if hasattr(minres, "nfev"):
+            self.res.nfev += minres.nfev
+        if hasattr(minres, "njev"):
+            self.res.njev += minres.njev
+        if hasattr(minres, "nhev"):
+            self.res.nhev += minres.nhev
+
+        # accept the move based on self.accept_tests. If any test is False,
+        # then reject the step.  If any test returns the special string
+        # 'force accept', then accept the step regardless. This can be used
+        # to forcefully escape from a local minimum if normal basin hopping
+        # steps are not sufficient.
+        accept = True
+        for test in self.accept_tests:
+            if inspect.signature(test) == _new_accept_test_signature:
+                testres = test(res_new=minres, res_old=self.incumbent_minres)
+            else:
+                testres = test(f_new=energy_after_quench, x_new=x_after_quench,
+                               f_old=self.energy, x_old=self.x)
+
+            if testres == 'force accept':
+                accept = True
+                break
+            elif testres is None:
+                raise ValueError("accept_tests must return True, False, or "
+                                 "'force accept'")
+            elif not testres:
+                accept = False
+
+        # Report the result of the acceptance test to the take step class.
+        # This is for adaptive step taking
+        if hasattr(self.step_taking, "report"):
+            self.step_taking.report(accept, f_new=energy_after_quench,
+                                    x_new=x_after_quench, f_old=self.energy,
+                                    x_old=self.x)
+
+        return accept, minres
+
+    def one_cycle(self):
+        """Do one cycle of the basinhopping algorithm
+        """
+        self.nstep += 1
+        new_global_min = False
+
+        accept, minres = self._monte_carlo_step()
+
+        if accept:
+            self.energy = minres.fun
+            self.x = np.copy(minres.x)
+            self.incumbent_minres = minres  # best minimize result found so far
+            new_global_min = self.storage.update(minres)
+
+        # print some information
+        if self.disp:
+            self.print_report(minres.fun, accept)
+            if new_global_min:
+                print("found new global minimum on step %d with function"
+                      " value %g" % (self.nstep, self.energy))
+
+        # save some variables as BasinHoppingRunner attributes
+        self.xtrial = minres.x
+        self.energy_trial = minres.fun
+        self.accept = accept
+
+        return new_global_min
+
+    def print_report(self, energy_trial, accept):
+        """print a status update"""
+        minres = self.storage.get_lowest()
+        print("basinhopping step %d: f %g trial_f %g accepted %d "
+              " lowest_f %g" % (self.nstep, self.energy, energy_trial,
+                                accept, minres.fun))
+
+
+class AdaptiveStepsize:
+    """
+    Class to implement adaptive stepsize.
+
+    This class wraps the step taking class and modifies the stepsize to
+    ensure the true acceptance rate is as close as possible to the target.
+
+    Parameters
+    ----------
+    takestep : callable
+        The step taking routine.  Must contain modifiable attribute
+        takestep.stepsize
+    accept_rate : float, optional
+        The target step acceptance rate
+    interval : int, optional
+        Interval for how often to update the stepsize
+    factor : float, optional
+        The step size is multiplied or divided by this factor upon each
+        update.
+    verbose : bool, optional
+        Print information about each update
+
+    """
+    def __init__(self, takestep, accept_rate=0.5, interval=50, factor=0.9,
+                 verbose=True):
+        self.takestep = takestep
+        self.target_accept_rate = accept_rate
+        self.interval = interval
+        self.factor = factor
+        self.verbose = verbose
+
+        self.nstep = 0
+        self.nstep_tot = 0
+        self.naccept = 0
+
+    def __call__(self, x):
+        return self.take_step(x)
+
+    def _adjust_step_size(self):
+        old_stepsize = self.takestep.stepsize
+        accept_rate = float(self.naccept) / self.nstep
+        if accept_rate > self.target_accept_rate:
+            # We're accepting too many steps. This generally means we're
+            # trapped in a basin. Take bigger steps.
+            self.takestep.stepsize /= self.factor
+        else:
+            # We're not accepting enough steps. Take smaller steps.
+            self.takestep.stepsize *= self.factor
+        if self.verbose:
+            print(f"adaptive stepsize: acceptance rate {accept_rate:f} target "
+                  f"{self.target_accept_rate:f} new stepsize "
+                  f"{self.takestep.stepsize:g} old stepsize {old_stepsize:g}")
+
+    def take_step(self, x):
+        self.nstep += 1
+        self.nstep_tot += 1
+        if self.nstep % self.interval == 0:
+            self._adjust_step_size()
+        return self.takestep(x)
+
+    def report(self, accept, **kwargs):
+        "called by basinhopping to report the result of the step"
+        if accept:
+            self.naccept += 1
+
+
+class RandomDisplacement:
+    """Add a random displacement of maximum size `stepsize` to each coordinate.
+
+    Calling this updates `x` in-place.
+
+    Parameters
+    ----------
+    stepsize : float, optional
+        Maximum stepsize in any dimension
+    rng : {None, int, `numpy.random.Generator`}, optional
+        Random number generator
+    """
+
+    def __init__(self, stepsize=0.5, rng=None):
+        self.stepsize = stepsize
+        self.rng = check_random_state(rng)
+
+    def __call__(self, x):
+        x += self.rng.uniform(-self.stepsize, self.stepsize,
+                              np.shape(x))
+        return x
+
+
+class MinimizerWrapper:
+    """
+    wrap a minimizer function as a minimizer class
+    """
+    def __init__(self, minimizer, func=None, **kwargs):
+        self.minimizer = minimizer
+        self.func = func
+        self.kwargs = kwargs
+
+    def __call__(self, x0):
+        if self.func is None:
+            return self.minimizer(x0, **self.kwargs)
+        else:
+            return self.minimizer(self.func, x0, **self.kwargs)
+
+
+class Metropolis:
+    """Metropolis acceptance criterion.
+
+    Parameters
+    ----------
+    T : float
+        The "temperature" parameter for the accept or reject criterion.
+    rng : {None, int, `numpy.random.Generator`}, optional
+        Random number generator used for acceptance test.
+
+    """
+
+    def __init__(self, T, rng=None):
+        # Avoid ZeroDivisionError since "MBH can be regarded as a special case
+        # of the BH framework with the Metropolis criterion, where temperature
+        # T = 0." (Reject all steps that increase energy.)
+        self.beta = 1.0 / T if T != 0 else float('inf')
+        self.rng = check_random_state(rng)
+
+    def accept_reject(self, res_new, res_old):
+        """
+        Assuming the local search underlying res_new was successful:
+        If new energy is lower than old, it will always be accepted.
+        If new is higher than old, there is a chance it will be accepted,
+        less likely for larger differences.
+        """
+        with np.errstate(invalid='ignore'):
+            # The energy values being fed to Metropolis are 1-length arrays, and if
+            # they are equal, their difference is 0, which gets multiplied by beta,
+            # which is inf, and array([0]) * float('inf') causes
+            #
+            # RuntimeWarning: invalid value encountered in multiply
+            #
+            # Ignore this warning so when the algorithm is on a flat plane, it always
+            # accepts the step, to try to move off the plane.
+            prod = -(res_new.fun - res_old.fun) * self.beta
+            w = math.exp(min(0, prod))
+
+        rand = self.rng.uniform()
+        return w >= rand and (res_new.success or not res_old.success)
+
+    def __call__(self, *, res_new, res_old):
+        """
+        f_new and f_old are mandatory in kwargs
+        """
+        return bool(self.accept_reject(res_new, res_old))
+
+
+@_transition_to_rng("seed", position_num=12, replace_doc=True)
+def basinhopping(func, x0, niter=100, T=1.0, stepsize=0.5,
+                 minimizer_kwargs=None, take_step=None, accept_test=None,
+                 callback=None, interval=50, disp=False, niter_success=None,
+                 rng=None, *, target_accept_rate=0.5, stepwise_factor=0.9):
+    """Find the global minimum of a function using the basin-hopping algorithm.
+
+    Basin-hopping is a two-phase method that combines a global stepping
+    algorithm with local minimization at each step. Designed to mimic
+    the natural process of energy minimization of clusters of atoms, it works
+    well for similar problems with "funnel-like, but rugged" energy landscapes
+    [5]_.
+
+    As the step-taking, step acceptance, and minimization methods are all
+    customizable, this function can also be used to implement other two-phase
+    methods.
+
+    Parameters
+    ----------
+    func : callable ``f(x, *args)``
+        Function to be optimized.  ``args`` can be passed as an optional item
+        in the dict `minimizer_kwargs`
+    x0 : array_like
+        Initial guess.
+    niter : integer, optional
+        The number of basin-hopping iterations. There will be a total of
+        ``niter + 1`` runs of the local minimizer.
+    T : float, optional
+        The "temperature" parameter for the acceptance or rejection criterion.
+        Higher "temperatures" mean that larger jumps in function value will be
+        accepted.  For best results `T` should be comparable to the
+        separation (in function value) between local minima.
+    stepsize : float, optional
+        Maximum step size for use in the random displacement.
+    minimizer_kwargs : dict, optional
+        Extra keyword arguments to be passed to the local minimizer
+        `scipy.optimize.minimize` Some important options could be:
+
+        method : str
+            The minimization method (e.g. ``"L-BFGS-B"``)
+        args : tuple
+            Extra arguments passed to the objective function (`func`) and
+            its derivatives (Jacobian, Hessian).
+
+    take_step : callable ``take_step(x)``, optional
+        Replace the default step-taking routine with this routine. The default
+        step-taking routine is a random displacement of the coordinates, but
+        other step-taking algorithms may be better for some systems.
+        `take_step` can optionally have the attribute ``take_step.stepsize``.
+        If this attribute exists, then `basinhopping` will adjust
+        ``take_step.stepsize`` in order to try to optimize the global minimum
+        search.
+    accept_test : callable, ``accept_test(f_new=f_new, x_new=x_new, f_old=fold, x_old=x_old)``, optional
+        Define a test which will be used to judge whether to accept the
+        step. This will be used in addition to the Metropolis test based on
+        "temperature" `T`. The acceptable return values are True,
+        False, or ``"force accept"``. If any of the tests return False
+        then the step is rejected. If the latter, then this will override any
+        other tests in order to accept the step. This can be used, for example,
+        to forcefully escape from a local minimum that `basinhopping` is
+        trapped in.
+    callback : callable, ``callback(x, f, accept)``, optional
+        A callback function which will be called for all minima found. ``x``
+        and ``f`` are the coordinates and function value of the trial minimum,
+        and ``accept`` is whether that minimum was accepted. This can
+        be used, for example, to save the lowest N minima found. Also,
+        `callback` can be used to specify a user defined stop criterion by
+        optionally returning True to stop the `basinhopping` routine.
+    interval : integer, optional
+        interval for how often to update the `stepsize`
+    disp : bool, optional
+        Set to True to print status messages
+    niter_success : integer, optional
+        Stop the run if the global minimum candidate remains the same for this
+        number of iterations.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+        The random numbers generated only affect the default Metropolis
+        `accept_test` and the default `take_step`. If you supply your own
+        `take_step` and `accept_test`, and these functions use random
+        number generation, then those functions are responsible for the state
+        of their random number generator.
+    target_accept_rate : float, optional
+        The target acceptance rate that is used to adjust the `stepsize`.
+        If the current acceptance rate is greater than the target,
+        then the `stepsize` is increased. Otherwise, it is decreased.
+        Range is (0, 1). Default is 0.5.
+
+        .. versionadded:: 1.8.0
+
+    stepwise_factor : float, optional
+        The `stepsize` is multiplied or divided by this stepwise factor upon
+        each update. Range is (0, 1). Default is 0.9.
+
+        .. versionadded:: 1.8.0
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a `OptimizeResult` object.
+        Important attributes are: ``x`` the solution array, ``fun`` the value
+        of the function at the solution, and ``message`` which describes the
+        cause of the termination. The ``OptimizeResult`` object returned by the
+        selected minimizer at the lowest minimum is also contained within this
+        object and can be accessed through the ``lowest_optimization_result``
+        attribute.  See `OptimizeResult` for a description of other attributes.
+
+    See Also
+    --------
+    minimize :
+        The local minimization function called once for each basinhopping step.
+        `minimizer_kwargs` is passed to this routine.
+
+    Notes
+    -----
+    Basin-hopping is a stochastic algorithm which attempts to find the global
+    minimum of a smooth scalar function of one or more variables [1]_ [2]_ [3]_
+    [4]_. The algorithm in its current form was described by David Wales and
+    Jonathan Doye [2]_ http://www-wales.ch.cam.ac.uk/.
+
+    The algorithm is iterative with each cycle composed of the following
+    features
+
+    1) random perturbation of the coordinates
+
+    2) local minimization
+
+    3) accept or reject the new coordinates based on the minimized function
+       value
+
+    The acceptance test used here is the Metropolis criterion of standard Monte
+    Carlo algorithms, although there are many other possibilities [3]_.
+
+    This global minimization method has been shown to be extremely efficient
+    for a wide variety of problems in physics and chemistry. It is
+    particularly useful when the function has many minima separated by large
+    barriers. See the `Cambridge Cluster Database
+    `_ for databases of molecular
+    systems that have been optimized primarily using basin-hopping. This
+    database includes minimization problems exceeding 300 degrees of freedom.
+
+    See the free software program `GMIN `_
+    for a Fortran implementation of basin-hopping. This implementation has many
+    variations of the procedure described above, including more
+    advanced step taking algorithms and alternate acceptance criterion.
+
+    For stochastic global optimization there is no way to determine if the true
+    global minimum has actually been found. Instead, as a consistency check,
+    the algorithm can be run from a number of different random starting points
+    to ensure the lowest minimum found in each example has converged to the
+    global minimum. For this reason, `basinhopping` will by default simply
+    run for the number of iterations `niter` and return the lowest minimum
+    found. It is left to the user to ensure that this is in fact the global
+    minimum.
+
+    Choosing `stepsize`:  This is a crucial parameter in `basinhopping` and
+    depends on the problem being solved. The step is chosen uniformly in the
+    region from x0-stepsize to x0+stepsize, in each dimension. Ideally, it
+    should be comparable to the typical separation (in argument values) between
+    local minima of the function being optimized. `basinhopping` will, by
+    default, adjust `stepsize` to find an optimal value, but this may take
+    many iterations. You will get quicker results if you set a sensible
+    initial value for ``stepsize``.
+
+    Choosing `T`: The parameter `T` is the "temperature" used in the
+    Metropolis criterion. Basinhopping steps are always accepted if
+    ``func(xnew) < func(xold)``. Otherwise, they are accepted with
+    probability::
+
+        exp( -(func(xnew) - func(xold)) / T )
+
+    So, for best results, `T` should to be comparable to the typical
+    difference (in function values) between local minima. (The height of
+    "walls" between local minima is irrelevant.)
+
+    If `T` is 0, the algorithm becomes Monotonic Basin-Hopping, in which all
+    steps that increase energy are rejected.
+
+    .. versionadded:: 0.12.0
+
+    References
+    ----------
+    .. [1] Wales, David J. 2003, Energy Landscapes, Cambridge University Press,
+        Cambridge, UK.
+    .. [2] Wales, D J, and Doye J P K, Global Optimization by Basin-Hopping and
+        the Lowest Energy Structures of Lennard-Jones Clusters Containing up to
+        110 Atoms.  Journal of Physical Chemistry A, 1997, 101, 5111.
+    .. [3] Li, Z. and Scheraga, H. A., Monte Carlo-minimization approach to the
+        multiple-minima problem in protein folding, Proc. Natl. Acad. Sci. USA,
+        1987, 84, 6611.
+    .. [4] Wales, D. J. and Scheraga, H. A., Global optimization of clusters,
+        crystals, and biomolecules, Science, 1999, 285, 1368.
+    .. [5] Olson, B., Hashmi, I., Molloy, K., and Shehu1, A., Basin Hopping as
+        a General and Versatile Optimization Framework for the Characterization
+        of Biological Macromolecules, Advances in Artificial Intelligence,
+        Volume 2012 (2012), Article ID 674832, :doi:`10.1155/2012/674832`
+
+    Examples
+    --------
+    The following example is a 1-D minimization problem, with many
+    local minima superimposed on a parabola.
+
+    >>> import numpy as np
+    >>> from scipy.optimize import basinhopping
+    >>> func = lambda x: np.cos(14.5 * x - 0.3) + (x + 0.2) * x
+    >>> x0 = [1.]
+
+    Basinhopping, internally, uses a local minimization algorithm. We will use
+    the parameter `minimizer_kwargs` to tell basinhopping which algorithm to
+    use and how to set up that minimizer. This parameter will be passed to
+    `scipy.optimize.minimize`.
+
+    >>> minimizer_kwargs = {"method": "BFGS"}
+    >>> ret = basinhopping(func, x0, minimizer_kwargs=minimizer_kwargs,
+    ...                    niter=200)
+    >>> # the global minimum is:
+    >>> ret.x, ret.fun
+    -0.1951, -1.0009
+
+    Next consider a 2-D minimization problem. Also, this time, we
+    will use gradient information to significantly speed up the search.
+
+    >>> def func2d(x):
+    ...     f = np.cos(14.5 * x[0] - 0.3) + (x[1] + 0.2) * x[1] + (x[0] +
+    ...                                                            0.2) * x[0]
+    ...     df = np.zeros(2)
+    ...     df[0] = -14.5 * np.sin(14.5 * x[0] - 0.3) + 2. * x[0] + 0.2
+    ...     df[1] = 2. * x[1] + 0.2
+    ...     return f, df
+
+    We'll also use a different local minimization algorithm. Also, we must tell
+    the minimizer that our function returns both energy and gradient (Jacobian).
+
+    >>> minimizer_kwargs = {"method":"L-BFGS-B", "jac":True}
+    >>> x0 = [1.0, 1.0]
+    >>> ret = basinhopping(func2d, x0, minimizer_kwargs=minimizer_kwargs,
+    ...                    niter=200)
+    >>> print("global minimum: x = [%.4f, %.4f], f(x) = %.4f" % (ret.x[0],
+    ...                                                           ret.x[1],
+    ...                                                           ret.fun))
+    global minimum: x = [-0.1951, -0.1000], f(x) = -1.0109
+
+    Here is an example using a custom step-taking routine. Imagine you want
+    the first coordinate to take larger steps than the rest of the coordinates.
+    This can be implemented like so:
+
+    >>> class MyTakeStep:
+    ...    def __init__(self, stepsize=0.5):
+    ...        self.stepsize = stepsize
+    ...        self.rng = np.random.default_rng()
+    ...    def __call__(self, x):
+    ...        s = self.stepsize
+    ...        x[0] += self.rng.uniform(-2.*s, 2.*s)
+    ...        x[1:] += self.rng.uniform(-s, s, x[1:].shape)
+    ...        return x
+
+    Since ``MyTakeStep.stepsize`` exists basinhopping will adjust the magnitude
+    of `stepsize` to optimize the search. We'll use the same 2-D function as
+    before
+
+    >>> mytakestep = MyTakeStep()
+    >>> ret = basinhopping(func2d, x0, minimizer_kwargs=minimizer_kwargs,
+    ...                    niter=200, take_step=mytakestep)
+    >>> print("global minimum: x = [%.4f, %.4f], f(x) = %.4f" % (ret.x[0],
+    ...                                                           ret.x[1],
+    ...                                                           ret.fun))
+    global minimum: x = [-0.1951, -0.1000], f(x) = -1.0109
+
+    Now, let's do an example using a custom callback function which prints the
+    value of every minimum found
+
+    >>> def print_fun(x, f, accepted):
+    ...         print("at minimum %.4f accepted %d" % (f, int(accepted)))
+
+    We'll run it for only 10 basinhopping steps this time.
+
+    >>> rng = np.random.default_rng()
+    >>> ret = basinhopping(func2d, x0, minimizer_kwargs=minimizer_kwargs,
+    ...                    niter=10, callback=print_fun, rng=rng)
+    at minimum 0.4159 accepted 1
+    at minimum -0.4317 accepted 1
+    at minimum -1.0109 accepted 1
+    at minimum -0.9073 accepted 1
+    at minimum -0.4317 accepted 0
+    at minimum -0.1021 accepted 1
+    at minimum -0.7425 accepted 1
+    at minimum -0.9073 accepted 1
+    at minimum -0.4317 accepted 0
+    at minimum -0.7425 accepted 1
+    at minimum -0.9073 accepted 1
+
+    The minimum at -1.0109 is actually the global minimum, found already on the
+    8th iteration.
+
+    """ # numpy/numpydoc#87  # noqa: E501
+    if target_accept_rate <= 0. or target_accept_rate >= 1.:
+        raise ValueError('target_accept_rate has to be in range (0, 1)')
+    if stepwise_factor <= 0. or stepwise_factor >= 1.:
+        raise ValueError('stepwise_factor has to be in range (0, 1)')
+
+    x0 = np.array(x0)
+
+    # set up the np.random generator
+    rng = check_random_state(rng)
+
+    # set up minimizer
+    if minimizer_kwargs is None:
+        minimizer_kwargs = dict()
+    wrapped_minimizer = MinimizerWrapper(scipy.optimize.minimize, func,
+                                         **minimizer_kwargs)
+
+    # set up step-taking algorithm
+    if take_step is not None:
+        if not callable(take_step):
+            raise TypeError("take_step must be callable")
+        # if take_step.stepsize exists then use AdaptiveStepsize to control
+        # take_step.stepsize
+        if hasattr(take_step, "stepsize"):
+            take_step_wrapped = AdaptiveStepsize(
+                take_step, interval=interval,
+                accept_rate=target_accept_rate,
+                factor=stepwise_factor,
+                verbose=disp)
+        else:
+            take_step_wrapped = take_step
+    else:
+        # use default
+        displace = RandomDisplacement(stepsize=stepsize, rng=rng)
+        take_step_wrapped = AdaptiveStepsize(displace, interval=interval,
+                                             accept_rate=target_accept_rate,
+                                             factor=stepwise_factor,
+                                             verbose=disp)
+
+    # set up accept tests
+    accept_tests = []
+    if accept_test is not None:
+        if not callable(accept_test):
+            raise TypeError("accept_test must be callable")
+        accept_tests = [accept_test]
+
+    # use default
+    metropolis = Metropolis(T, rng=rng)
+    accept_tests.append(metropolis)
+
+    if niter_success is None:
+        niter_success = niter + 2
+
+    bh = BasinHoppingRunner(x0, wrapped_minimizer, take_step_wrapped,
+                            accept_tests, disp=disp)
+
+    # The wrapped minimizer is called once during construction of
+    # BasinHoppingRunner, so run the callback
+    if callable(callback):
+        callback(bh.storage.minres.x, bh.storage.minres.fun, True)
+
+    # start main iteration loop
+    count, i = 0, 0
+    message = ["requested number of basinhopping iterations completed"
+               " successfully"]
+    for i in range(niter):
+        new_global_min = bh.one_cycle()
+
+        if callable(callback):
+            # should we pass a copy of x?
+            val = callback(bh.xtrial, bh.energy_trial, bh.accept)
+            if val is not None:
+                if val:
+                    message = ["callback function requested stop early by"
+                               "returning True"]
+                    break
+
+        count += 1
+        if new_global_min:
+            count = 0
+        elif count > niter_success:
+            message = ["success condition satisfied"]
+            break
+
+    # prepare return object
+    res = bh.res
+    res.lowest_optimization_result = bh.storage.get_lowest()
+    res.x = np.copy(res.lowest_optimization_result.x)
+    res.fun = res.lowest_optimization_result.fun
+    res.message = message
+    res.nit = i + 1
+    res.success = res.lowest_optimization_result.success
+    return res
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_bracket.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_bracket.py
new file mode 100644
index 0000000000000000000000000000000000000000..263243c612d08ebdc9939cc892771b49ac766d0c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_bracket.py
@@ -0,0 +1,713 @@
+import numpy as np
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._util import _RichResult
+from scipy._lib._array_api import array_namespace, xp_ravel, xp_default_dtype
+
+_ELIMITS = -1  # used in _bracket_root
+_ESTOPONESIDE = 2  # used in _bracket_root
+
+def _bracket_root_iv(func, xl0, xr0, xmin, xmax, factor, args, maxiter):
+
+    if not callable(func):
+        raise ValueError('`func` must be callable.')
+
+    if not np.iterable(args):
+        args = (args,)
+
+    xp = array_namespace(xl0)
+    xl0 = xp.asarray(xl0)[()]
+    if (not xp.isdtype(xl0.dtype, "numeric")
+        or xp.isdtype(xl0.dtype, "complex floating")):
+        raise ValueError('`xl0` must be numeric and real.')
+    if not xp.isdtype(xl0.dtype, "real floating"):
+        xl0 = xp.asarray(xl0, dtype=xp_default_dtype(xp))
+
+    # If xr0 is not supplied, fill with a dummy value for the sake of
+    # broadcasting. We need to wait until xmax has been validated to
+    # compute the default value.
+    xr0_not_supplied = False
+    if xr0 is None:
+        xr0 = xp.nan
+        xr0_not_supplied = True
+
+    xmin = -xp.inf if xmin is None else xmin
+    xmax = xp.inf if xmax is None else xmax
+    factor = 2. if factor is None else factor
+    xl0, xr0, xmin, xmax, factor = xp.broadcast_arrays(
+        xl0, xp.asarray(xr0), xp.asarray(xmin), xp.asarray(xmax), xp.asarray(factor))
+
+    if (not xp.isdtype(xr0.dtype, "numeric")
+        or xp.isdtype(xr0.dtype, "complex floating")):
+        raise ValueError('`xr0` must be numeric and real.')
+
+    if (not xp.isdtype(xmin.dtype, "numeric")
+        or xp.isdtype(xmin.dtype, "complex floating")):
+        raise ValueError('`xmin` must be numeric and real.')
+
+    if (not xp.isdtype(xmax.dtype, "numeric")
+        or xp.isdtype(xmax.dtype, "complex floating")):
+        raise ValueError('`xmax` must be numeric and real.')
+
+    if (not xp.isdtype(factor.dtype, "numeric")
+        or xp.isdtype(factor.dtype, "complex floating")):
+        raise ValueError('`factor` must be numeric and real.')
+    if not xp.all(factor > 1):
+        raise ValueError('All elements of `factor` must be greater than 1.')
+
+    # Calculate the default value of xr0 if a value has not been supplied.
+    # Be careful to ensure xr0 is not larger than xmax.
+    if xr0_not_supplied:
+        xr0 = xl0 + xp.minimum((xmax - xl0)/ 8, xp.asarray(1.0))
+        xr0 = xp.astype(xr0, xl0.dtype, copy=False)
+
+    maxiter = xp.asarray(maxiter)
+    message = '`maxiter` must be a non-negative integer.'
+    if (not xp.isdtype(maxiter.dtype, "numeric") or maxiter.shape != tuple()
+            or xp.isdtype(maxiter.dtype, "complex floating")):
+        raise ValueError(message)
+    maxiter_int = int(maxiter[()])
+    if not maxiter == maxiter_int or maxiter < 0:
+        raise ValueError(message)
+
+    return func, xl0, xr0, xmin, xmax, factor, args, maxiter, xp
+
+
+def _bracket_root(func, xl0, xr0=None, *, xmin=None, xmax=None, factor=None,
+                  args=(), maxiter=1000):
+    """Bracket the root of a monotonic scalar function of one variable
+
+    This function works elementwise when `xl0`, `xr0`, `xmin`, `xmax`, `factor`, and
+    the elements of `args` are broadcastable arrays.
+
+    Parameters
+    ----------
+    func : callable
+        The function for which the root is to be bracketed.
+        The signature must be::
+
+            func(x: ndarray, *args) -> ndarray
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with `x`. ``func`` must be an elementwise function: each element
+        ``func(x)[i]`` must equal ``func(x[i])`` for all indices ``i``.
+    xl0, xr0: float array_like
+        Starting guess of bracket, which need not contain a root. If `xr0` is
+        not provided, ``xr0 = xl0 + 1``. Must be broadcastable with one another.
+    xmin, xmax : float array_like, optional
+        Minimum and maximum allowable endpoints of the bracket, inclusive. Must
+        be broadcastable with `xl0` and `xr0`.
+    factor : float array_like, default: 2
+        The factor used to grow the bracket. See notes for details.
+    args : tuple, optional
+        Additional positional arguments to be passed to `func`.  Must be arrays
+        broadcastable with `xl0`, `xr0`, `xmin`, and `xmax`. If the callable to be
+        bracketed requires arguments that are not broadcastable with these
+        arrays, wrap that callable with `func` such that `func` accepts
+        only `x` and broadcastable arrays.
+    maxiter : int, optional
+        The maximum number of iterations of the algorithm to perform.
+
+    Returns
+    -------
+    res : _RichResult
+        An instance of `scipy._lib._util._RichResult` with the following
+        attributes. The descriptions are written as though the values will be
+        scalars; however, if `func` returns an array, the outputs will be
+        arrays of the same shape.
+
+        xl, xr : float
+            The lower and upper ends of the bracket, if the algorithm
+            terminated successfully.
+        fl, fr : float
+            The function value at the lower and upper ends of the bracket.
+        nfev : int
+            The number of function evaluations required to find the bracket.
+            This is distinct from the number of times `func` is *called*
+            because the function may evaluated at multiple points in a single
+            call.
+        nit : int
+            The number of iterations of the algorithm that were performed.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm produced a valid bracket.
+            - ``-1`` : The bracket expanded to the allowable limits without finding a bracket.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : Iteration was terminated by `callback`.
+            - ``-5``: The initial bracket does not satisfy `xmin <= xl0 < xr0 < xmax`.
+            - ``1`` : The algorithm is proceeding normally (in `callback` only).
+            - ``2`` : A bracket was found in the opposite search direction (in `callback` only).
+
+        success : bool
+            ``True`` when the algorithm terminated successfully (status ``0``).
+
+    Notes
+    -----
+    This function generalizes an algorithm found in pieces throughout
+    `scipy.stats`. The strategy is to iteratively grow the bracket ``(l, r)``
+     until ``func(l) < 0 < func(r)``. The bracket grows to the left as follows.
+
+    - If `xmin` is not provided, the distance between `xl0` and `l` is iteratively
+      increased by `factor`.
+    - If `xmin` is provided, the distance between `xmin` and `l` is iteratively
+      decreased by `factor`. Note that this also *increases* the bracket size.
+
+    Growth of the bracket to the right is analogous.
+
+    Growth of the bracket in one direction stops when the endpoint is no longer
+    finite, the function value at the endpoint is no longer finite, or the
+    endpoint reaches its limiting value (`xmin` or `xmax`). Iteration terminates
+    when the bracket stops growing in both directions, the bracket surrounds
+    the root, or a root is found (accidentally).
+
+    If two brackets are found - that is, a bracket is found on both sides in
+    the same iteration, the smaller of the two is returned.
+    If roots of the function are found, both `l` and `r` are set to the
+    leftmost root.
+
+    """  # noqa: E501
+    # Todo:
+    # - find bracket with sign change in specified direction
+    # - Add tolerance
+    # - allow factor < 1?
+
+    callback = None  # works; I just don't want to test it
+    temp = _bracket_root_iv(func, xl0, xr0, xmin, xmax, factor, args, maxiter)
+    func, xl0, xr0, xmin, xmax, factor, args, maxiter, xp = temp
+
+    xs = (xl0, xr0)
+    temp = eim._initialize(func, xs, args)
+    func, xs, fs, args, shape, dtype, xp = temp  # line split for PEP8
+    xl0, xr0 = xs
+    xmin = xp_ravel(xp.astype(xp.broadcast_to(xmin, shape), dtype, copy=False), xp=xp)
+    xmax = xp_ravel(xp.astype(xp.broadcast_to(xmax, shape), dtype, copy=False), xp=xp)
+    invalid_bracket = ~((xmin <= xl0) & (xl0 < xr0) & (xr0 <= xmax))
+
+    # The approach is to treat the left and right searches as though they were
+    # (almost) totally independent one-sided bracket searches. (The interaction
+    # is considered when checking for termination and preparing the result
+    # object.)
+    # `x` is the "moving" end of the bracket
+    x = xp.concat(xs)
+    f = xp.concat(fs)
+    invalid_bracket = xp.concat((invalid_bracket, invalid_bracket))
+    n = x.shape[0] // 2
+
+    # `x_last` is the previous location of the moving end of the bracket. If
+    # the signs of `f` and `f_last` are different, `x` and `x_last` form a
+    # bracket.
+    x_last = xp.concat((x[n:], x[:n]))
+    f_last = xp.concat((f[n:], f[:n]))
+    # `x0` is the "fixed" end of the bracket.
+    x0 = x_last
+    # We don't need to retain the corresponding function value, since the
+    # fixed end of the bracket is only needed to compute the new value of the
+    # moving end; it is never returned.
+    limit = xp.concat((xmin, xmax))
+
+    factor = xp_ravel(xp.broadcast_to(factor, shape), xp=xp)
+    factor = xp.astype(factor, dtype, copy=False)
+    factor = xp.concat((factor, factor))
+
+    active = xp.arange(2*n)
+    args = [xp.concat((arg, arg)) for arg in args]
+
+    # This is needed due to inner workings of `eim._loop`.
+    # We're abusing it a tiny bit.
+    shape = shape + (2,)
+
+    # `d` is for "distance".
+    # For searches without a limit, the distance between the fixed end of the
+    # bracket `x0` and the moving end `x` will grow by `factor` each iteration.
+    # For searches with a limit, the distance between the `limit` and moving
+    # end of the bracket `x` will shrink by `factor` each iteration.
+    i = xp.isinf(limit)
+    ni = ~i
+    d = xp.zeros_like(x)
+    d[i] = x[i] - x0[i]
+    d[ni] = limit[ni] - x[ni]
+
+    status = xp.full_like(x, eim._EINPROGRESS, dtype=xp.int32)  # in progress
+    status[invalid_bracket] = eim._EINPUTERR
+    nit, nfev = 0, 1  # one function evaluation per side performed above
+
+    work = _RichResult(x=x, x0=x0, f=f, limit=limit, factor=factor,
+                       active=active, d=d, x_last=x_last, f_last=f_last,
+                       nit=nit, nfev=nfev, status=status, args=args,
+                       xl=xp.nan, xr=xp.nan, fl=xp.nan, fr=xp.nan, n=n)
+    res_work_pairs = [('status', 'status'), ('xl', 'xl'), ('xr', 'xr'),
+                      ('nit', 'nit'), ('nfev', 'nfev'), ('fl', 'fl'),
+                      ('fr', 'fr'), ('x', 'x'), ('f', 'f'),
+                      ('x_last', 'x_last'), ('f_last', 'f_last')]
+
+    def pre_func_eval(work):
+        # Initialize moving end of bracket
+        x = xp.zeros_like(work.x)
+
+        # Unlimited brackets grow by `factor` by increasing distance from fixed
+        # end to moving end.
+        i = xp.isinf(work.limit)  # indices of unlimited brackets
+        work.d[i] *= work.factor[i]
+        x[i] = work.x0[i] + work.d[i]
+
+        # Limited brackets grow by decreasing the distance from the limit to
+        # the moving end.
+        ni = ~i  # indices of limited brackets
+        work.d[ni] /= work.factor[ni]
+        x[ni] = work.limit[ni] - work.d[ni]
+
+        return x
+
+    def post_func_eval(x, f, work):
+        # Keep track of the previous location of the moving end so that we can
+        # return a narrower bracket. (The alternative is to remember the
+        # original fixed end, but then the bracket would be wider than needed.)
+        work.x_last = work.x
+        work.f_last = work.f
+        work.x = x
+        work.f = f
+
+    def check_termination(work):
+        # Condition 0: initial bracket is invalid
+        stop = (work.status == eim._EINPUTERR)
+
+        # Condition 1: a valid bracket (or the root itself) has been found
+        sf = xp.sign(work.f)
+        sf_last = xp.sign(work.f_last)
+        i = ((sf_last == -sf) | (sf_last == 0) | (sf == 0)) & ~stop
+        work.status[i] = eim._ECONVERGED
+        stop[i] = True
+
+        # Condition 2: the other side's search found a valid bracket.
+        # (If we just found a bracket with the rightward search, we can stop
+        #  the leftward search, and vice-versa.)
+        # To do this, we need to set the status of the other side's search;
+        # this is tricky because `work.status` contains only the *active*
+        # elements, so we don't immediately know the index of the element we
+        # need to set - or even if it's still there. (That search may have
+        # terminated already, e.g. by reaching its `limit`.)
+        # To facilitate this, `work.active` contains a unit integer index of
+        # each search. Index `k` (`k < n)` and `k + n` correspond with a
+        # leftward and rightward search, respectively. Elements are removed
+        # from `work.active` just as they are removed from `work.status`, so
+        # we use `work.active` to help find the right location in
+        # `work.status`.
+        # Get the integer indices of the elements that can also stop
+        also_stop = (work.active[i] + work.n) % (2*work.n)
+        # Check whether they are still active. We want to find the indices
+        # in work.active where the associated values in work.active are
+        # contained in also_stop. xp.searchsorted let's us take advantage
+        # of work.active being sorted, but requires some hackery because
+        # searchsorted solves the separate but related problem of finding
+        # the indices where the values in also_stop should be added to
+        # maintain sorted order.
+        j = xp.searchsorted(work.active, also_stop)
+        # If the location exceeds the length of the `work.active`, they are
+        # not there. This happens when a value in also_stop is larger than
+        # the greatest value in work.active. This case needs special handling
+        # because we cannot simply check that also_stop == work.active[j].
+        mask = j < work.active.shape[0]
+        # Note that we also have to use the mask to filter also_stop to ensure
+        # that also_stop and j will still have the same shape.
+        j, also_stop = j[mask], also_stop[mask]
+        j = j[also_stop == work.active[j]]
+        # Now convert these to boolean indices to use with `work.status`.
+        i = xp.zeros_like(stop)
+        i[j] = True  # boolean indices of elements that can also stop
+        i = i & ~stop
+        work.status[i] = _ESTOPONESIDE
+        stop[i] = True
+
+        # Condition 3: moving end of bracket reaches limit
+        i = (work.x == work.limit) & ~stop
+        work.status[i] = _ELIMITS
+        stop[i] = True
+
+        # Condition 4: non-finite value encountered
+        i = ~(xp.isfinite(work.x) & xp.isfinite(work.f)) & ~stop
+        work.status[i] = eim._EVALUEERR
+        stop[i] = True
+
+        return stop
+
+    def post_termination_check(work):
+        pass
+
+    def customize_result(res, shape):
+        n = res['x'].shape[0] // 2
+
+        # To avoid ambiguity, below we refer to `xl0`, the initial left endpoint
+        # as `a` and `xr0`, the initial right endpoint, as `b`.
+        # Because we treat the two one-sided searches as though they were
+        # independent, what we keep track of in `work` and what we want to
+        # return in `res` look quite different. Combine the results from the
+        # two one-sided searches before reporting the results to the user.
+        # - "a" refers to the leftward search (the moving end started at `a`)
+        # - "b" refers to the rightward search (the moving end started at `b`)
+        # - "l" refers to the left end of the bracket (closer to -oo)
+        # - "r" refers to the right end of the bracket (closer to +oo)
+        xal = res['x'][:n]
+        xar = res['x_last'][:n]
+        xbl = res['x_last'][n:]
+        xbr = res['x'][n:]
+
+        fal = res['f'][:n]
+        far = res['f_last'][:n]
+        fbl = res['f_last'][n:]
+        fbr = res['f'][n:]
+
+        # Initialize the brackets and corresponding function values to return
+        # to the user. Brackets may not be valid (e.g. there is no root,
+        # there weren't enough iterations, NaN encountered), but we still need
+        # to return something. One option would be all NaNs, but what I've
+        # chosen here is the left- and right-most points at which the function
+        # has been evaluated. This gives the user some information about what
+        # interval of the real line has been searched and shows that there is
+        # no sign change between the two ends.
+        xl = xp.asarray(xal, copy=True)
+        fl = xp.asarray(fal, copy=True)
+        xr = xp.asarray(xbr, copy=True)
+        fr = xp.asarray(fbr, copy=True)
+
+        # `status` indicates whether the bracket is valid or not. If so,
+        # we want to adjust the bracket we return to be the narrowest possible
+        # given the points at which we evaluated the function.
+        # For example if bracket "a" is valid and smaller than bracket "b" OR
+        # if bracket "a" is valid and bracket "b" is not valid, we want to
+        # return bracket "a" (and vice versa).
+        sa = res['status'][:n]
+        sb = res['status'][n:]
+
+        da = xar - xal
+        db = xbr - xbl
+
+        i1 = ((da <= db) & (sa == 0)) | ((sa == 0) & (sb != 0))
+        i2 = ((db <= da) & (sb == 0)) | ((sb == 0) & (sa != 0))
+
+        xr[i1] = xar[i1]
+        fr[i1] = far[i1]
+        xl[i2] = xbl[i2]
+        fl[i2] = fbl[i2]
+
+        # Finish assembling the result object
+        res['xl'] = xl
+        res['xr'] = xr
+        res['fl'] = fl
+        res['fr'] = fr
+
+        res['nit'] = xp.maximum(res['nit'][:n], res['nit'][n:])
+        res['nfev'] = res['nfev'][:n] + res['nfev'][n:]
+        # If the status on one side is zero, the status is zero. In any case,
+        # report the status from one side only.
+        res['status'] = xp.where(sa == 0, sa, sb)
+        res['success'] = (res['status'] == 0)
+
+        del res['x']
+        del res['f']
+        del res['x_last']
+        del res['f_last']
+
+        return shape[:-1]
+
+    return eim._loop(work, callback, shape, maxiter, func, args, dtype,
+                     pre_func_eval, post_func_eval, check_termination,
+                     post_termination_check, customize_result, res_work_pairs,
+                     xp)
+
+
+def _bracket_minimum_iv(func, xm0, xl0, xr0, xmin, xmax, factor, args, maxiter):
+
+    if not callable(func):
+        raise ValueError('`func` must be callable.')
+
+    if not np.iterable(args):
+        args = (args,)
+
+    xp = array_namespace(xm0)
+    xm0 = xp.asarray(xm0)[()]
+    if (not xp.isdtype(xm0.dtype, "numeric")
+        or xp.isdtype(xm0.dtype, "complex floating")):
+        raise ValueError('`xm0` must be numeric and real.')
+    if not xp.isdtype(xm0.dtype, "real floating"):
+        xm0 = xp.asarray(xm0, dtype=xp_default_dtype(xp))
+
+    xmin = -xp.inf if xmin is None else xmin
+    xmax = xp.inf if xmax is None else xmax
+
+    # If xl0 (xr0) is not supplied, fill with a dummy value for the sake
+    # of broadcasting. We need to wait until xmin (xmax) has been validated
+    # to compute the default values.
+    xl0_not_supplied = False
+    if xl0 is None:
+        xl0 = xp.nan
+        xl0_not_supplied = True
+
+    xr0_not_supplied = False
+    if xr0 is None:
+        xr0 = xp.nan
+        xr0_not_supplied = True
+
+    factor = 2.0 if factor is None else factor
+    xl0, xm0, xr0, xmin, xmax, factor = xp.broadcast_arrays(
+        xp.asarray(xl0), xm0, xp.asarray(xr0), xp.asarray(xmin),
+        xp.asarray(xmax), xp.asarray(factor)
+    )
+
+    if (not xp.isdtype(xl0.dtype, "numeric")
+        or xp.isdtype(xl0.dtype, "complex floating")):
+        raise ValueError('`xl0` must be numeric and real.')
+
+    if (not xp.isdtype(xr0.dtype, "numeric")
+        or xp.isdtype(xr0.dtype, "complex floating")):
+        raise ValueError('`xr0` must be numeric and real.')
+
+    if (not xp.isdtype(xmin.dtype, "numeric")
+        or xp.isdtype(xmin.dtype, "complex floating")):
+        raise ValueError('`xmin` must be numeric and real.')
+
+    if (not xp.isdtype(xmax.dtype, "numeric")
+        or xp.isdtype(xmax.dtype, "complex floating")):
+        raise ValueError('`xmax` must be numeric and real.')
+
+    if (not xp.isdtype(factor.dtype, "numeric")
+        or xp.isdtype(factor.dtype, "complex floating")):
+        raise ValueError('`factor` must be numeric and real.')
+    if not xp.all(factor > 1):
+        raise ValueError('All elements of `factor` must be greater than 1.')
+
+    # Calculate default values of xl0 and/or xr0 if they have not been supplied
+    # by the user. We need to be careful to ensure xl0 and xr0 are not outside
+    # of (xmin, xmax).
+    if xl0_not_supplied:
+        xl0 = xm0 - xp.minimum((xm0 - xmin)/16, xp.asarray(0.5))
+        xl0 = xp.astype(xl0, xm0.dtype, copy=False)
+    if xr0_not_supplied:
+        xr0 = xm0 + xp.minimum((xmax - xm0)/16, xp.asarray(0.5))
+        xr0 = xp.astype(xr0, xm0.dtype, copy=False)
+
+    maxiter = xp.asarray(maxiter)
+    message = '`maxiter` must be a non-negative integer.'
+    if (not xp.isdtype(maxiter.dtype, "numeric") or maxiter.shape != tuple()
+            or xp.isdtype(maxiter.dtype, "complex floating")):
+        raise ValueError(message)
+    maxiter_int = int(maxiter[()])
+    if not maxiter == maxiter_int or maxiter < 0:
+        raise ValueError(message)
+
+    return func, xm0, xl0, xr0, xmin, xmax, factor, args, maxiter, xp
+
+
+def _bracket_minimum(func, xm0, *, xl0=None, xr0=None, xmin=None, xmax=None,
+                     factor=None, args=(), maxiter=1000):
+    """Bracket the minimum of a unimodal scalar function of one variable
+
+    This function works elementwise when `xm0`, `xl0`, `xr0`, `xmin`, `xmax`,
+    and the elements of `args` are broadcastable arrays.
+
+    Parameters
+    ----------
+    func : callable
+        The function for which the minimum is to be bracketed.
+        The signature must be::
+
+            func(x: ndarray, *args) -> ndarray
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``. `func` must be an elementwise function: each element
+        ``func(x)[i]`` must equal ``func(x[i])`` for all indices `i`.
+    xm0: float array_like
+        Starting guess for middle point of bracket.
+    xl0, xr0: float array_like, optional
+        Starting guesses for left and right endpoints of the bracket. Must be
+        broadcastable with one another and with `xm0`.
+    xmin, xmax : float array_like, optional
+        Minimum and maximum allowable endpoints of the bracket, inclusive. Must
+        be broadcastable with `xl0`, `xm0`, and `xr0`.
+    factor : float array_like, optional
+        Controls expansion of bracket endpoint in downhill direction. Works
+        differently in the cases where a limit is set in the downhill direction
+        with `xmax` or `xmin`. See Notes.
+    args : tuple, optional
+        Additional positional arguments to be passed to `func`.  Must be arrays
+        broadcastable with `xl0`, `xm0`, `xr0`, `xmin`, and `xmax`. If the
+        callable to be bracketed requires arguments that are not broadcastable
+        with these arrays, wrap that callable with `func` such that `func`
+        accepts only ``x`` and broadcastable arrays.
+    maxiter : int, optional
+        The maximum number of iterations of the algorithm to perform. The number
+        of function evaluations is three greater than the number of iterations.
+
+    Returns
+    -------
+    res : _RichResult
+        An instance of `scipy._lib._util._RichResult` with the following
+        attributes. The descriptions are written as though the values will be
+        scalars; however, if `func` returns an array, the outputs will be
+        arrays of the same shape.
+
+        xl, xm, xr : float
+            The left, middle, and right points of the bracket, if the algorithm
+            terminated successfully.
+        fl, fm, fr : float
+            The function value at the left, middle, and right points of the bracket.
+        nfev : int
+            The number of function evaluations required to find the bracket.
+        nit : int
+            The number of iterations of the algorithm that were performed.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm produced a valid bracket.
+            - ``-1`` : The bracket expanded to the allowable limits. Assuming
+                       unimodality, this implies the endpoint at the limit is a
+                       minimizer.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : ``None`` shall pass.
+            - ``-5`` : The initial bracket does not satisfy
+                       `xmin <= xl0 < xm0 < xr0 <= xmax`.
+
+        success : bool
+            ``True`` when the algorithm terminated successfully (status ``0``).
+
+    Notes
+    -----
+    Similar to `scipy.optimize.bracket`, this function seeks to find real
+    points ``xl < xm < xr`` such that ``f(xl) >= f(xm)`` and ``f(xr) >= f(xm)``,
+    where at least one of the inequalities is strict. Unlike `scipy.optimize.bracket`,
+    this function can operate in a vectorized manner on array input, so long as
+    the input arrays are broadcastable with each other. Also unlike
+    `scipy.optimize.bracket`, users may specify minimum and maximum endpoints
+    for the desired bracket.
+
+    Given an initial trio of points ``xl = xl0``, ``xm = xm0``, ``xr = xr0``,
+    the algorithm checks if these points already give a valid bracket. If not,
+    a new endpoint, ``w`` is chosen in the "downhill" direction, ``xm`` becomes the new
+    opposite endpoint, and either `xl` or `xr` becomes the new middle point,
+    depending on which direction is downhill. The algorithm repeats from here.
+
+    The new endpoint `w` is chosen differently depending on whether or not a
+    boundary `xmin` or `xmax` has been set in the downhill direction. Without
+    loss of generality, suppose the downhill direction is to the right, so that
+    ``f(xl) > f(xm) > f(xr)``. If there is no boundary to the right, then `w`
+    is chosen to be ``xr + factor * (xr - xm)`` where `factor` is controlled by
+    the user (defaults to 2.0) so that step sizes increase in geometric proportion.
+    If there is a boundary, `xmax` in this case, then `w` is chosen to be
+    ``xmax - (xmax - xr)/factor``, with steps slowing to a stop at
+    `xmax`. This cautious approach ensures that a minimum near but distinct from
+    the boundary isn't missed while also detecting whether or not the `xmax` is
+    a minimizer when `xmax` is reached after a finite number of steps.
+    """  # noqa: E501
+    callback = None  # works; I just don't want to test it
+
+    temp = _bracket_minimum_iv(func, xm0, xl0, xr0, xmin, xmax, factor, args, maxiter)
+    func, xm0, xl0, xr0, xmin, xmax, factor, args, maxiter, xp = temp
+
+    xs = (xl0, xm0, xr0)
+    temp = eim._initialize(func, xs, args)
+    func, xs, fs, args, shape, dtype, xp = temp
+
+    xl0, xm0, xr0 = xs
+    fl0, fm0, fr0 = fs
+    xmin = xp.astype(xp.broadcast_to(xmin, shape), dtype, copy=False)
+    xmin = xp_ravel(xmin, xp=xp)
+    xmax = xp.astype(xp.broadcast_to(xmax, shape), dtype, copy=False)
+    xmax = xp_ravel(xmax, xp=xp)
+    invalid_bracket = ~((xmin <= xl0) & (xl0 < xm0) & (xm0 < xr0) & (xr0 <= xmax))
+    # We will modify factor later on so make a copy. np.broadcast_to returns
+    # a read-only view.
+    factor = xp.astype(xp.broadcast_to(factor, shape), dtype, copy=True)
+    factor = xp_ravel(factor)
+
+    # To simplify the logic, swap xl and xr if f(xl) < f(xr). We should always be
+    # marching downhill in the direction from xl to xr.
+    comp = fl0 < fr0
+    xl0[comp], xr0[comp] = xr0[comp], xl0[comp]
+    fl0[comp], fr0[comp] = fr0[comp], fl0[comp]
+    # We only need the boundary in the direction we're traveling.
+    limit = xp.where(comp, xmin, xmax)
+
+    unlimited = xp.isinf(limit)
+    limited = ~unlimited
+    step = xp.empty_like(xl0)
+
+    step[unlimited] = (xr0[unlimited] - xm0[unlimited])
+    step[limited] = (limit[limited] - xr0[limited])
+
+    # Step size is divided by factor for case where there is a limit.
+    factor[limited] = 1 / factor[limited]
+
+    status = xp.full_like(xl0, eim._EINPROGRESS, dtype=xp.int32)
+    status[invalid_bracket] = eim._EINPUTERR
+    nit, nfev = 0, 3
+
+    work = _RichResult(xl=xl0, xm=xm0, xr=xr0, xr0=xr0, fl=fl0, fm=fm0, fr=fr0,
+                       step=step, limit=limit, limited=limited, factor=factor, nit=nit,
+                       nfev=nfev, status=status, args=args)
+
+    res_work_pairs = [('status', 'status'), ('xl', 'xl'), ('xm', 'xm'), ('xr', 'xr'),
+                      ('nit', 'nit'), ('nfev', 'nfev'), ('fl', 'fl'), ('fm', 'fm'),
+                      ('fr', 'fr')]
+
+    def pre_func_eval(work):
+        work.step *= work.factor
+        x = xp.empty_like(work.xr)
+        x[~work.limited] = work.xr0[~work.limited] + work.step[~work.limited]
+        x[work.limited] = work.limit[work.limited] - work.step[work.limited]
+        # Since the new bracket endpoint is calculated from an offset with the
+        # limit, it may be the case that the new endpoint equals the old endpoint,
+        # when the old endpoint is sufficiently close to the limit. We use the
+        # limit itself as the new endpoint in these cases.
+        x[work.limited] = xp.where(
+            x[work.limited] == work.xr[work.limited],
+            work.limit[work.limited],
+            x[work.limited],
+        )
+        return x
+
+    def post_func_eval(x, f, work):
+        work.xl, work.xm, work.xr = work.xm, work.xr, x
+        work.fl, work.fm, work.fr = work.fm, work.fr, f
+
+    def check_termination(work):
+        # Condition 0: Initial bracket is invalid.
+        stop = (work.status == eim._EINPUTERR)
+
+        # Condition 1: A valid bracket has been found.
+        i = (
+            (work.fl >= work.fm) & (work.fr > work.fm)
+            | (work.fl > work.fm) & (work.fr >= work.fm)
+        ) & ~stop
+        work.status[i] = eim._ECONVERGED
+        stop[i] = True
+
+        # Condition 2: Moving end of bracket reaches limit.
+        i = (work.xr == work.limit) & ~stop
+        work.status[i] = _ELIMITS
+        stop[i] = True
+
+        # Condition 3: non-finite value encountered
+        i = ~(xp.isfinite(work.xr) & xp.isfinite(work.fr)) & ~stop
+        work.status[i] = eim._EVALUEERR
+        stop[i] = True
+
+        return stop
+
+    def post_termination_check(work):
+        pass
+
+    def customize_result(res, shape):
+        # Reorder entries of xl and xr if they were swapped due to f(xl0) < f(xr0).
+        comp = res['xl'] > res['xr']
+        res['xl'][comp], res['xr'][comp] = res['xr'][comp], res['xl'][comp]
+        res['fl'][comp], res['fr'][comp] = res['fr'][comp], res['fl'][comp]
+        return shape
+
+    return eim._loop(work, callback, shape,
+                     maxiter, func, args, dtype,
+                     pre_func_eval, post_func_eval,
+                     check_termination, post_termination_check,
+                     customize_result, res_work_pairs, xp)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_chandrupatla.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_chandrupatla.py
new file mode 100644
index 0000000000000000000000000000000000000000..5a4b70098919b9fba626bfecd5c1bcc559ab7702
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_chandrupatla.py
@@ -0,0 +1,552 @@
+import math
+import numpy as np
+import scipy._lib._elementwise_iterative_method as eim
+from scipy._lib._util import _RichResult
+from scipy._lib._array_api import xp_sign, xp_copy, xp_take_along_axis
+
+# TODO:
+# - (maybe?) don't use fancy indexing assignment
+# - figure out how to replace the new `try`/`except`s
+
+
+def _chandrupatla(func, a, b, *, args=(), xatol=None, xrtol=None,
+                  fatol=None, frtol=0, maxiter=None, callback=None):
+    """Find the root of an elementwise function using Chandrupatla's algorithm.
+
+    For each element of the output of `func`, `chandrupatla` seeks the scalar
+    root that makes the element 0. This function allows for `a`, `b`, and the
+    output of `func` to be of any broadcastable shapes.
+
+    Parameters
+    ----------
+    func : callable
+        The function whose root is desired. The signature must be::
+
+            func(x: ndarray, *args) -> ndarray
+
+         where each element of ``x`` is a finite real and ``args`` is a tuple,
+         which may contain an arbitrary number of components of any type(s).
+         ``func`` must be an elementwise function: each element ``func(x)[i]``
+         must equal ``func(x[i])`` for all indices ``i``. `_chandrupatla`
+         seeks an array ``x`` such that ``func(x)`` is an array of zeros.
+    a, b : array_like
+        The lower and upper bounds of the root of the function. Must be
+        broadcastable with one another.
+    args : tuple, optional
+        Additional positional arguments to be passed to `func`.
+    xatol, xrtol, fatol, frtol : float, optional
+        Absolute and relative tolerances on the root and function value.
+        See Notes for details.
+    maxiter : int, optional
+        The maximum number of iterations of the algorithm to perform.
+        The default is the maximum possible number of bisections within
+        the (normal) floating point numbers of the relevant dtype.
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `_chandrupatla` (but containing the current
+        iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `_chandrupatla` will return a result.
+
+    Returns
+    -------
+    res : _RichResult
+        An instance of `scipy._lib._util._RichResult` with the following
+        attributes. The descriptions are written as though the values will be
+        scalars; however, if `func` returns an array, the outputs will be
+        arrays of the same shape.
+
+        x : float
+            The root of the function, if the algorithm terminated successfully.
+        nfev : int
+            The number of times the function was called to find the root.
+        nit : int
+            The number of iterations of Chandrupatla's algorithm performed.
+        status : int
+            An integer representing the exit status of the algorithm.
+            ``0`` : The algorithm converged to the specified tolerances.
+            ``-1`` : The algorithm encountered an invalid bracket.
+            ``-2`` : The maximum number of iterations was reached.
+            ``-3`` : A non-finite value was encountered.
+            ``-4`` : Iteration was terminated by `callback`.
+            ``1`` : The algorithm is proceeding normally (in `callback` only).
+        success : bool
+            ``True`` when the algorithm terminated successfully (status ``0``).
+        fun : float
+            The value of `func` evaluated at `x`.
+        xl, xr : float
+            The lower and upper ends of the bracket.
+        fl, fr : float
+            The function value at the lower and upper ends of the bracket.
+
+    Notes
+    -----
+    Implemented based on Chandrupatla's original paper [1]_.
+
+    If ``xl`` and ``xr`` are the left and right ends of the bracket,
+    ``xmin = xl if abs(func(xl)) <= abs(func(xr)) else xr``,
+    and ``fmin0 = min(func(a), func(b))``, then the algorithm is considered to
+    have converged when ``abs(xr - xl) < xatol + abs(xmin) * xrtol`` or
+    ``fun(xmin) <= fatol + abs(fmin0) * frtol``. This is equivalent to the
+    termination condition described in [1]_ with ``xrtol = 4e-10``,
+    ``xatol = 1e-5``, and ``fatol = frtol = 0``. The default values are
+    ``xatol = 4*tiny``, ``xrtol = 4*eps``, ``frtol = 0``, and ``fatol = tiny``,
+    where ``eps`` and ``tiny`` are the precision and smallest normal number
+    of the result ``dtype`` of function inputs and outputs.
+
+    References
+    ----------
+
+    .. [1] Chandrupatla, Tirupathi R.
+        "A new hybrid quadratic/bisection algorithm for finding the zero of a
+        nonlinear function without using derivatives".
+        Advances in Engineering Software, 28(3), 145-149.
+        https://doi.org/10.1016/s0965-9978(96)00051-8
+
+    See Also
+    --------
+    brentq, brenth, ridder, bisect, newton
+
+    Examples
+    --------
+    >>> from scipy import optimize
+    >>> def f(x, c):
+    ...     return x**3 - 2*x - c
+    >>> c = 5
+    >>> res = optimize._chandrupatla._chandrupatla(f, 0, 3, args=(c,))
+    >>> res.x
+    2.0945514818937463
+
+    >>> c = [3, 4, 5]
+    >>> res = optimize._chandrupatla._chandrupatla(f, 0, 3, args=(c,))
+    >>> res.x
+    array([1.8932892 , 2.        , 2.09455148])
+
+    """
+    res = _chandrupatla_iv(func, args, xatol, xrtol,
+                           fatol, frtol, maxiter, callback)
+    func, args, xatol, xrtol, fatol, frtol, maxiter, callback = res
+
+    # Initialization
+    temp = eim._initialize(func, (a, b), args)
+    func, xs, fs, args, shape, dtype, xp = temp
+    x1, x2 = xs
+    f1, f2 = fs
+    status = xp.full_like(x1, xp.asarray(eim._EINPROGRESS),
+                          dtype=xp.int32)  # in progress
+    nit, nfev = 0, 2  # two function evaluations performed above
+    finfo = xp.finfo(dtype)
+    xatol = 4*finfo.smallest_normal if xatol is None else xatol
+    xrtol = 4*finfo.eps if xrtol is None else xrtol
+    fatol = finfo.smallest_normal if fatol is None else fatol
+    frtol = frtol * xp.minimum(xp.abs(f1), xp.abs(f2))
+    maxiter = (math.log2(finfo.max) - math.log2(finfo.smallest_normal)
+               if maxiter is None else maxiter)
+    work = _RichResult(x1=x1, f1=f1, x2=x2, f2=f2, x3=None, f3=None, t=0.5,
+                       xatol=xatol, xrtol=xrtol, fatol=fatol, frtol=frtol,
+                       nit=nit, nfev=nfev, status=status)
+    res_work_pairs = [('status', 'status'), ('x', 'xmin'), ('fun', 'fmin'),
+                      ('nit', 'nit'), ('nfev', 'nfev'), ('xl', 'x1'),
+                      ('fl', 'f1'), ('xr', 'x2'), ('fr', 'f2')]
+
+    def pre_func_eval(work):
+        # [1] Figure 1 (first box)
+        x = work.x1 + work.t * (work.x2 - work.x1)
+        return x
+
+    def post_func_eval(x, f, work):
+        # [1] Figure 1 (first diamond and boxes)
+        # Note: y/n are reversed in figure; compare to BASIC in appendix
+        work.x3, work.f3 = (xp.asarray(work.x2, copy=True),
+                            xp.asarray(work.f2, copy=True))
+        j = xp.sign(f) == xp.sign(work.f1)
+        nj = ~j
+        work.x3[j], work.f3[j] = work.x1[j], work.f1[j]
+        work.x2[nj], work.f2[nj] = work.x1[nj], work.f1[nj]
+        work.x1, work.f1 = x, f
+
+    def check_termination(work):
+        # [1] Figure 1 (second diamond)
+        # Check for all terminal conditions and record statuses.
+
+        # See [1] Section 4 (first two sentences)
+        i = xp.abs(work.f1) < xp.abs(work.f2)
+        work.xmin = xp.where(i, work.x1, work.x2)
+        work.fmin = xp.where(i, work.f1, work.f2)
+        stop = xp.zeros_like(work.x1, dtype=xp.bool)  # termination condition met
+
+        # If function value tolerance is met, report successful convergence,
+        # regardless of other conditions. Note that `frtol` has been redefined
+        # as `frtol = frtol * minimum(f1, f2)`, where `f1` and `f2` are the
+        # function evaluated at the original ends of the bracket.
+        i = xp.abs(work.fmin) <= work.fatol + work.frtol
+        work.status[i] = eim._ECONVERGED
+        stop[i] = True
+
+        # If the bracket is no longer valid, report failure (unless a function
+        # tolerance is met, as detected above).
+        i = (xp_sign(work.f1) == xp_sign(work.f2)) & ~stop
+        NaN = xp.asarray(xp.nan, dtype=work.xmin.dtype)
+        work.xmin[i], work.fmin[i], work.status[i] = NaN, NaN, eim._ESIGNERR
+        stop[i] = True
+
+        # If the abscissae are non-finite or either function value is NaN,
+        # report failure.
+        x_nonfinite = ~(xp.isfinite(work.x1) & xp.isfinite(work.x2))
+        f_nan = xp.isnan(work.f1) & xp.isnan(work.f2)
+        i = (x_nonfinite | f_nan) & ~stop
+        work.xmin[i], work.fmin[i], work.status[i] = NaN, NaN, eim._EVALUEERR
+        stop[i] = True
+
+        # This is the convergence criterion used in bisect. Chandrupatla's
+        # criterion is equivalent to this except with a factor of 4 on `xrtol`.
+        work.dx = xp.abs(work.x2 - work.x1)
+        work.tol = xp.abs(work.xmin) * work.xrtol + work.xatol
+        i = work.dx < work.tol
+        work.status[i] = eim._ECONVERGED
+        stop[i] = True
+
+        return stop
+
+    def post_termination_check(work):
+        # [1] Figure 1 (third diamond and boxes / Equation 1)
+        xi1 = (work.x1 - work.x2) / (work.x3 - work.x2)
+        with np.errstate(divide='ignore', invalid='ignore'):
+            phi1 = (work.f1 - work.f2) / (work.f3 - work.f2)
+        alpha = (work.x3 - work.x1) / (work.x2 - work.x1)
+        j = ((1 - xp.sqrt(1 - xi1)) < phi1) & (phi1 < xp.sqrt(xi1))
+
+        f1j, f2j, f3j, alphaj = work.f1[j], work.f2[j], work.f3[j], alpha[j]
+        t = xp.full_like(alpha, xp.asarray(0.5))
+        t[j] = (f1j / (f1j - f2j) * f3j / (f3j - f2j)
+                - alphaj * f1j / (f3j - f1j) * f2j / (f2j - f3j))
+
+        # [1] Figure 1 (last box; see also BASIC in appendix with comment
+        # "Adjust T Away from the Interval Boundary")
+        tl = 0.5 * work.tol / work.dx
+        work.t = xp.clip(t, tl, 1 - tl)
+
+    def customize_result(res, shape):
+        xl, xr, fl, fr = res['xl'], res['xr'], res['fl'], res['fr']
+        i = res['xl'] < res['xr']
+        res['xl'] = xp.where(i, xl, xr)
+        res['xr'] = xp.where(i, xr, xl)
+        res['fl'] = xp.where(i, fl, fr)
+        res['fr'] = xp.where(i, fr, fl)
+        return shape
+
+    return eim._loop(work, callback, shape, maxiter, func, args, dtype,
+                     pre_func_eval, post_func_eval, check_termination,
+                     post_termination_check, customize_result, res_work_pairs,
+                     xp=xp)
+
+
+def _chandrupatla_iv(func, args, xatol, xrtol,
+                     fatol, frtol, maxiter, callback):
+    # Input validation for `_chandrupatla`
+
+    if not callable(func):
+        raise ValueError('`func` must be callable.')
+
+    if not np.iterable(args):
+        args = (args,)
+
+    # tolerances are floats, not arrays; OK to use NumPy
+    tols = np.asarray([xatol if xatol is not None else 1,
+                       xrtol if xrtol is not None else 1,
+                       fatol if fatol is not None else 1,
+                       frtol if frtol is not None else 1])
+    if (not np.issubdtype(tols.dtype, np.number) or np.any(tols < 0)
+            or np.any(np.isnan(tols)) or tols.shape != (4,)):
+        raise ValueError('Tolerances must be non-negative scalars.')
+
+    if maxiter is not None:
+        maxiter_int = int(maxiter)
+        if maxiter != maxiter_int or maxiter < 0:
+            raise ValueError('`maxiter` must be a non-negative integer.')
+
+    if callback is not None and not callable(callback):
+        raise ValueError('`callback` must be callable.')
+
+    return func, args, xatol, xrtol, fatol, frtol, maxiter, callback
+
+
+def _chandrupatla_minimize(func, x1, x2, x3, *, args=(), xatol=None,
+                           xrtol=None, fatol=None, frtol=None, maxiter=100,
+                           callback=None):
+    """Find the minimizer of an elementwise function.
+
+    For each element of the output of `func`, `_chandrupatla_minimize` seeks
+    the scalar minimizer that minimizes the element. This function allows for
+    `x1`, `x2`, `x3`, and the elements of `args` to be arrays of any
+    broadcastable shapes.
+
+    Parameters
+    ----------
+    func : callable
+        The function whose minimizer is desired. The signature must be::
+
+            func(x: ndarray, *args) -> ndarray
+
+         where each element of ``x`` is a finite real and ``args`` is a tuple,
+         which may contain an arbitrary number of arrays that are broadcastable
+         with `x`. ``func`` must be an elementwise function: each element
+         ``func(x)[i]`` must equal ``func(x[i])`` for all indices ``i``.
+         `_chandrupatla` seeks an array ``x`` such that ``func(x)`` is an array
+         of minima.
+    x1, x2, x3 : array_like
+        The abscissae of a standard scalar minimization bracket. A bracket is
+        valid if ``x1 < x2 < x3`` and ``func(x1) > func(x2) <= func(x3)``.
+        Must be broadcastable with one another and `args`.
+    args : tuple, optional
+        Additional positional arguments to be passed to `func`.  Must be arrays
+        broadcastable with `x1`, `x2`, and `x3`. If the callable to be
+        differentiated requires arguments that are not broadcastable with `x`,
+        wrap that callable with `func` such that `func` accepts only `x` and
+        broadcastable arrays.
+    xatol, xrtol, fatol, frtol : float, optional
+        Absolute and relative tolerances on the minimizer and function value.
+        See Notes for details.
+    maxiter : int, optional
+        The maximum number of iterations of the algorithm to perform.
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `_chandrupatla_minimize` (but containing
+        the current iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `_chandrupatla_minimize` will return a result.
+
+    Returns
+    -------
+    res : _RichResult
+        An instance of `scipy._lib._util._RichResult` with the following
+        attributes. (The descriptions are written as though the values will be
+        scalars; however, if `func` returns an array, the outputs will be
+        arrays of the same shape.)
+
+        success : bool
+            ``True`` when the algorithm terminated successfully (status ``0``).
+        status : int
+            An integer representing the exit status of the algorithm.
+            ``0`` : The algorithm converged to the specified tolerances.
+            ``-1`` : The algorithm encountered an invalid bracket.
+            ``-2`` : The maximum number of iterations was reached.
+            ``-3`` : A non-finite value was encountered.
+            ``-4`` : Iteration was terminated by `callback`.
+            ``1`` : The algorithm is proceeding normally (in `callback` only).
+        x : float
+            The minimizer of the function, if the algorithm terminated
+            successfully.
+        fun : float
+            The value of `func` evaluated at `x`.
+        nfev : int
+            The number of points at which `func` was evaluated.
+        nit : int
+            The number of iterations of the algorithm that were performed.
+        xl, xm, xr : float
+            The final three-point bracket.
+        fl, fm, fr : float
+            The function value at the bracket points.
+
+    Notes
+    -----
+    Implemented based on Chandrupatla's original paper [1]_.
+
+    If ``x1 < x2 < x3`` are the points of the bracket and ``f1 > f2 <= f3``
+    are the values of ``func`` at those points, then the algorithm is
+    considered to have converged when ``x3 - x1 <= abs(x2)*xrtol + xatol``
+    or ``(f1 - 2*f2 + f3)/2 <= abs(f2)*frtol + fatol``. Note that first of
+    these differs from the termination conditions described in [1]_. The
+    default values of `xrtol` is the square root of the precision of the
+    appropriate dtype, and ``xatol = fatol = frtol`` is the smallest normal
+    number of the appropriate dtype.
+
+    References
+    ----------
+    .. [1] Chandrupatla, Tirupathi R. (1998).
+        "An efficient quadratic fit-sectioning algorithm for minimization
+        without derivatives".
+        Computer Methods in Applied Mechanics and Engineering, 152 (1-2),
+        211-217. https://doi.org/10.1016/S0045-7825(97)00190-4
+
+    See Also
+    --------
+    golden, brent, bounded
+
+    Examples
+    --------
+    >>> from scipy.optimize._chandrupatla import _chandrupatla_minimize
+    >>> def f(x, args=1):
+    ...     return (x - args)**2
+    >>> res = _chandrupatla_minimize(f, -5, 0, 5)
+    >>> res.x
+    1.0
+    >>> c = [1, 1.5, 2]
+    >>> res = _chandrupatla_minimize(f, -5, 0, 5, args=(c,))
+    >>> res.x
+    array([1. , 1.5, 2. ])
+    """
+    res = _chandrupatla_iv(func, args, xatol, xrtol,
+                           fatol, frtol, maxiter, callback)
+    func, args, xatol, xrtol, fatol, frtol, maxiter, callback = res
+
+    # Initialization
+    xs = (x1, x2, x3)
+    temp = eim._initialize(func, xs, args)
+    func, xs, fs, args, shape, dtype, xp = temp  # line split for PEP8
+    x1, x2, x3 = xs
+    f1, f2, f3 = fs
+    phi = xp.asarray(0.5 + 0.5*5**0.5, dtype=dtype)[()]  # golden ratio
+    status = xp.full_like(x1, xp.asarray(eim._EINPROGRESS),
+                          dtype=xp.int32)  # in progress
+    nit, nfev = 0, 3  # three function evaluations performed above
+    fatol = xp.finfo(dtype).smallest_normal if fatol is None else fatol
+    frtol = xp.finfo(dtype).smallest_normal if frtol is None else frtol
+    xatol = xp.finfo(dtype).smallest_normal if xatol is None else xatol
+    xrtol = math.sqrt(xp.finfo(dtype).eps) if xrtol is None else xrtol
+
+    # Ensure that x1 < x2 < x3 initially.
+    xs, fs = xp.stack((x1, x2, x3)), xp.stack((f1, f2, f3))
+    i = xp.argsort(xs, axis=0)
+    x1, x2, x3 = xp_take_along_axis(xs, i, axis=0)  # data-apis/array-api#808
+    f1, f2, f3 = xp_take_along_axis(fs, i, axis=0)  # data-apis/array-api#808
+    q0 = xp_copy(x3)  # "At the start, q0 is set at x3..." ([1] after (7))
+
+    work = _RichResult(x1=x1, f1=f1, x2=x2, f2=f2, x3=x3, f3=f3, phi=phi,
+                       xatol=xatol, xrtol=xrtol, fatol=fatol, frtol=frtol,
+                       nit=nit, nfev=nfev, status=status, q0=q0, args=args)
+    res_work_pairs = [('status', 'status'),
+                      ('x', 'x2'), ('fun', 'f2'),
+                      ('nit', 'nit'), ('nfev', 'nfev'),
+                      ('xl', 'x1'), ('xm', 'x2'), ('xr', 'x3'),
+                      ('fl', 'f1'), ('fm', 'f2'), ('fr', 'f3')]
+
+    def pre_func_eval(work):
+        # `_check_termination` is called first -> `x3 - x2 > x2 - x1`
+        # But let's calculate a few terms that we'll reuse
+        x21 = work.x2 - work.x1
+        x32 = work.x3 - work.x2
+
+        # [1] Section 3. "The quadratic minimum point Q1 is calculated using
+        # the relations developed in the previous section." [1] Section 2 (5/6)
+        A = x21 * (work.f3 - work.f2)
+        B = x32 * (work.f1 - work.f2)
+        C = A / (A + B)
+        # q1 = C * (work.x1 + work.x2) / 2 + (1 - C) * (work.x2 + work.x3) / 2
+        q1 = 0.5 * (C*(work.x1 - work.x3) + work.x2 + work.x3)  # much faster
+        # this is an array, so multiplying by 0.5 does not change dtype
+
+        # "If Q1 and Q0 are sufficiently close... Q1 is accepted if it is
+        # sufficiently away from the inside point x2"
+        i = xp.abs(q1 - work.q0) < 0.5 * xp.abs(x21)  # [1] (7)
+        xi = q1[i]
+        # Later, after (9), "If the point Q1 is in a +/- xtol neighborhood of
+        # x2, the new point is chosen in the larger interval at a distance
+        # tol away from x2."
+        # See also QBASIC code after "Accept Ql adjust if close to X2".
+        j = xp.abs(q1[i] - work.x2[i]) <= work.xtol[i]
+        xi[j] = work.x2[i][j] + xp_sign(x32[i][j]) * work.xtol[i][j]
+
+        # "If condition (7) is not satisfied, golden sectioning of the larger
+        # interval is carried out to introduce the new point."
+        # (For simplicity, we go ahead and calculate it for all points, but we
+        # change the elements for which the condition was satisfied.)
+        x = work.x2 + (2 - work.phi) * x32
+        x[i] = xi
+
+        # "We define Q0 as the value of Q1 at the previous iteration."
+        work.q0 = q1
+        return x
+
+    def post_func_eval(x, f, work):
+        # Standard logic for updating a three-point bracket based on a new
+        # point. In QBASIC code, see "IF SGN(X-X2) = SGN(X3-X2) THEN...".
+        # There is an awful lot of data copying going on here; this would
+        # probably benefit from code optimization or implementation in Pythran.
+        i = xp_sign(x - work.x2) == xp_sign(work.x3 - work.x2)
+        xi, x1i, x2i, x3i = x[i], work.x1[i], work.x2[i], work.x3[i],
+        fi, f1i, f2i, f3i = f[i], work.f1[i], work.f2[i], work.f3[i]
+        j = fi > f2i
+        x3i[j], f3i[j] = xi[j], fi[j]
+        j = ~j
+        x1i[j], f1i[j], x2i[j], f2i[j] = x2i[j], f2i[j], xi[j], fi[j]
+
+        ni = ~i
+        xni, x1ni, x2ni, x3ni = x[ni], work.x1[ni], work.x2[ni], work.x3[ni],
+        fni, f1ni, f2ni, f3ni = f[ni], work.f1[ni], work.f2[ni], work.f3[ni]
+        j = fni > f2ni
+        x1ni[j], f1ni[j] = xni[j], fni[j]
+        j = ~j
+        x3ni[j], f3ni[j], x2ni[j], f2ni[j] = x2ni[j], f2ni[j], xni[j], fni[j]
+
+        work.x1[i], work.x2[i], work.x3[i] = x1i, x2i, x3i
+        work.f1[i], work.f2[i], work.f3[i] = f1i, f2i, f3i
+        work.x1[ni], work.x2[ni], work.x3[ni] = x1ni, x2ni, x3ni,
+        work.f1[ni], work.f2[ni], work.f3[ni] = f1ni, f2ni, f3ni
+
+    def check_termination(work):
+        # Check for all terminal conditions and record statuses.
+        stop = xp.zeros_like(work.x1, dtype=bool)  # termination condition met
+
+        # Bracket is invalid; stop and don't return minimizer/minimum
+        i = ((work.f2 > work.f1) | (work.f2 > work.f3))
+        work.x2[i], work.f2[i] = xp.nan, xp.nan
+        stop[i], work.status[i] = True, eim._ESIGNERR
+
+        # Non-finite values; stop and don't return minimizer/minimum
+        finite = xp.isfinite(work.x1+work.x2+work.x3+work.f1+work.f2+work.f3)
+        i = ~(finite | stop)
+        work.x2[i], work.f2[i] = xp.nan, xp.nan
+        stop[i], work.status[i] = True, eim._EVALUEERR
+
+        # [1] Section 3 "Points 1 and 3 are interchanged if necessary to make
+        # the (x2, x3) the larger interval."
+        # Note: I had used np.choose; this is much faster. This would be a good
+        # place to save e.g. `work.x3 - work.x2` for reuse, but I tried and
+        # didn't notice a speed boost, so let's keep it simple.
+        i = xp.abs(work.x3 - work.x2) < xp.abs(work.x2 - work.x1)
+        temp = work.x1[i]
+        work.x1[i] = work.x3[i]
+        work.x3[i] = temp
+        temp = work.f1[i]
+        work.f1[i] = work.f3[i]
+        work.f3[i] = temp
+
+        # [1] Section 3 (bottom of page 212)
+        # "We set a tolerance value xtol..."
+        work.xtol = xp.abs(work.x2) * work.xrtol + work.xatol  # [1] (8)
+        # "The convergence based on interval is achieved when..."
+        # Note: Equality allowed in case of `xtol=0`
+        i = xp.abs(work.x3 - work.x2) <= 2 * work.xtol  # [1] (9)
+
+        # "We define ftol using..."
+        ftol = xp.abs(work.f2) * work.frtol + work.fatol  # [1] (10)
+        # "The convergence based on function values is achieved when..."
+        # Note 1: modify in place to incorporate tolerance on function value.
+        # Note 2: factor of 2 is not in the text; see QBASIC start of DO loop
+        i |= (work.f1 - 2 * work.f2 + work.f3) <= 2*ftol  # [1] (11)
+        i &= ~stop
+        stop[i], work.status[i] = True, eim._ECONVERGED
+
+        return stop
+
+    def post_termination_check(work):
+        pass
+
+    def customize_result(res, shape):
+        xl, xr, fl, fr = res['xl'], res['xr'], res['fl'], res['fr']
+        i = res['xl'] >= res['xr']
+        res['xl'] = xp.where(i, xr, xl)
+        res['xr'] = xp.where(i, xl, xr)
+        res['fl'] = xp.where(i, fr, fl)
+        res['fr'] = xp.where(i, fl, fr)
+        return shape
+
+    return eim._loop(work, callback, shape, maxiter, func, args, dtype,
+                     pre_func_eval, post_func_eval, check_termination,
+                     post_termination_check, customize_result, res_work_pairs,
+                     xp=xp)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyla_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyla_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..7e99acf373df59524f66e19f625f50b8d5d3cc76
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyla_py.py
@@ -0,0 +1,316 @@
+"""
+Interface to Constrained Optimization By Linear Approximation
+
+Functions
+---------
+.. autosummary::
+   :toctree: generated/
+
+    fmin_cobyla
+
+"""
+
+import functools
+from threading import RLock
+
+import numpy as np
+from scipy.optimize import _cobyla as cobyla
+from ._optimize import (OptimizeResult, _check_unknown_options,
+    _prepare_scalar_function)
+try:
+    from itertools import izip
+except ImportError:
+    izip = zip
+
+__all__ = ['fmin_cobyla']
+
+# Workaround as _cobyla.minimize is not threadsafe
+# due to an unknown f2py bug and can segfault,
+# see gh-9658.
+_module_lock = RLock()
+def synchronized(func):
+    @functools.wraps(func)
+    def wrapper(*args, **kwargs):
+        with _module_lock:
+            return func(*args, **kwargs)
+    return wrapper
+
+@synchronized
+def fmin_cobyla(func, x0, cons, args=(), consargs=None, rhobeg=1.0,
+                rhoend=1e-4, maxfun=1000, disp=None, catol=2e-4,
+                *, callback=None):
+    """
+    Minimize a function using the Constrained Optimization By Linear
+    Approximation (COBYLA) method. This method wraps a FORTRAN
+    implementation of the algorithm.
+
+    Parameters
+    ----------
+    func : callable
+        Function to minimize. In the form func(x, \\*args).
+    x0 : ndarray
+        Initial guess.
+    cons : sequence
+        Constraint functions; must all be ``>=0`` (a single function
+        if only 1 constraint). Each function takes the parameters `x`
+        as its first argument, and it can return either a single number or
+        an array or list of numbers.
+    args : tuple, optional
+        Extra arguments to pass to function.
+    consargs : tuple, optional
+        Extra arguments to pass to constraint functions (default of None means
+        use same extra arguments as those passed to func).
+        Use ``()`` for no extra arguments.
+    rhobeg : float, optional
+        Reasonable initial changes to the variables.
+    rhoend : float, optional
+        Final accuracy in the optimization (not precisely guaranteed). This
+        is a lower bound on the size of the trust region.
+    disp : {0, 1, 2, 3}, optional
+        Controls the frequency of output; 0 implies no output.
+    maxfun : int, optional
+        Maximum number of function evaluations.
+    catol : float, optional
+        Absolute tolerance for constraint violations.
+    callback : callable, optional
+        Called after each iteration, as ``callback(x)``, where ``x`` is the
+        current parameter vector.
+
+    Returns
+    -------
+    x : ndarray
+        The argument that minimises `f`.
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'COBYLA' `method` in particular.
+
+    Notes
+    -----
+    This algorithm is based on linear approximations to the objective
+    function and each constraint. We briefly describe the algorithm.
+
+    Suppose the function is being minimized over k variables. At the
+    jth iteration the algorithm has k+1 points v_1, ..., v_(k+1),
+    an approximate solution x_j, and a radius RHO_j.
+    (i.e., linear plus a constant) approximations to the objective
+    function and constraint functions such that their function values
+    agree with the linear approximation on the k+1 points v_1,.., v_(k+1).
+    This gives a linear program to solve (where the linear approximations
+    of the constraint functions are constrained to be non-negative).
+
+    However, the linear approximations are likely only good
+    approximations near the current simplex, so the linear program is
+    given the further requirement that the solution, which
+    will become x_(j+1), must be within RHO_j from x_j. RHO_j only
+    decreases, never increases. The initial RHO_j is rhobeg and the
+    final RHO_j is rhoend. In this way COBYLA's iterations behave
+    like a trust region algorithm.
+
+    Additionally, the linear program may be inconsistent, or the
+    approximation may give poor improvement. For details about
+    how these issues are resolved, as well as how the points v_i are
+    updated, refer to the source code or the references below.
+
+
+    References
+    ----------
+    Powell M.J.D. (1994), "A direct search optimization method that models
+    the objective and constraint functions by linear interpolation.", in
+    Advances in Optimization and Numerical Analysis, eds. S. Gomez and
+    J-P Hennart, Kluwer Academic (Dordrecht), pp. 51-67
+
+    Powell M.J.D. (1998), "Direct search algorithms for optimization
+    calculations", Acta Numerica 7, 287-336
+
+    Powell M.J.D. (2007), "A view of algorithms for optimization without
+    derivatives", Cambridge University Technical Report DAMTP 2007/NA03
+
+
+    Examples
+    --------
+    Minimize the objective function f(x,y) = x*y subject
+    to the constraints x**2 + y**2 < 1 and y > 0::
+
+        >>> def objective(x):
+        ...     return x[0]*x[1]
+        ...
+        >>> def constr1(x):
+        ...     return 1 - (x[0]**2 + x[1]**2)
+        ...
+        >>> def constr2(x):
+        ...     return x[1]
+        ...
+        >>> from scipy.optimize import fmin_cobyla
+        >>> fmin_cobyla(objective, [0.0, 0.1], [constr1, constr2], rhoend=1e-7)
+        array([-0.70710685,  0.70710671])
+
+    The exact solution is (-sqrt(2)/2, sqrt(2)/2).
+
+
+
+    """
+    err = "cons must be a sequence of callable functions or a single"\
+          " callable function."
+    try:
+        len(cons)
+    except TypeError as e:
+        if callable(cons):
+            cons = [cons]
+        else:
+            raise TypeError(err) from e
+    else:
+        for thisfunc in cons:
+            if not callable(thisfunc):
+                raise TypeError(err)
+
+    if consargs is None:
+        consargs = args
+
+    # build constraints
+    con = tuple({'type': 'ineq', 'fun': c, 'args': consargs} for c in cons)
+
+    # options
+    opts = {'rhobeg': rhobeg,
+            'tol': rhoend,
+            'disp': disp,
+            'maxiter': maxfun,
+            'catol': catol,
+            'callback': callback}
+
+    sol = _minimize_cobyla(func, x0, args, constraints=con,
+                           **opts)
+    if disp and not sol['success']:
+        print(f"COBYLA failed to find a solution: {sol.message}")
+    return sol['x']
+
+
+@synchronized
+def _minimize_cobyla(fun, x0, args=(), constraints=(),
+                     rhobeg=1.0, tol=1e-4, maxiter=1000,
+                     disp=False, catol=2e-4, callback=None, bounds=None,
+                     **unknown_options):
+    """
+    Minimize a scalar function of one or more variables using the
+    Constrained Optimization BY Linear Approximation (COBYLA) algorithm.
+
+    Options
+    -------
+    rhobeg : float
+        Reasonable initial changes to the variables.
+    tol : float
+        Final accuracy in the optimization (not precisely guaranteed).
+        This is a lower bound on the size of the trust region.
+    disp : bool
+        Set to True to print convergence messages. If False,
+        `verbosity` is ignored as set to 0.
+    maxiter : int
+        Maximum number of function evaluations.
+    catol : float
+        Tolerance (absolute) for constraint violations
+
+    """
+    _check_unknown_options(unknown_options)
+    maxfun = maxiter
+    rhoend = tol
+    iprint = int(bool(disp))
+
+    # check constraints
+    if isinstance(constraints, dict):
+        constraints = (constraints, )
+
+    if bounds:
+        i_lb = np.isfinite(bounds.lb)
+        if np.any(i_lb):
+            def lb_constraint(x, *args, **kwargs):
+                return x[i_lb] - bounds.lb[i_lb]
+
+            constraints.append({'type': 'ineq', 'fun': lb_constraint})
+
+        i_ub = np.isfinite(bounds.ub)
+        if np.any(i_ub):
+            def ub_constraint(x):
+                return bounds.ub[i_ub] - x[i_ub]
+
+            constraints.append({'type': 'ineq', 'fun': ub_constraint})
+
+    for ic, con in enumerate(constraints):
+        # check type
+        try:
+            ctype = con['type'].lower()
+        except KeyError as e:
+            raise KeyError('Constraint %d has no type defined.' % ic) from e
+        except TypeError as e:
+            raise TypeError('Constraints must be defined using a '
+                            'dictionary.') from e
+        except AttributeError as e:
+            raise TypeError("Constraint's type must be a string.") from e
+        else:
+            if ctype != 'ineq':
+                raise ValueError(f"Constraints of type '{con['type']}' not handled by "
+                                 "COBYLA.")
+
+        # check function
+        if 'fun' not in con:
+            raise KeyError('Constraint %d has no function defined.' % ic)
+
+        # check extra arguments
+        if 'args' not in con:
+            con['args'] = ()
+
+    # m is the total number of constraint values
+    # it takes into account that some constraints may be vector-valued
+    cons_lengths = []
+    for c in constraints:
+        f = c['fun'](x0, *c['args'])
+        try:
+            cons_length = len(f)
+        except TypeError:
+            cons_length = 1
+        cons_lengths.append(cons_length)
+    m = sum(cons_lengths)
+
+    # create the ScalarFunction, cobyla doesn't require derivative function
+    def _jac(x, *args):
+        return None
+
+    sf = _prepare_scalar_function(fun, x0, args=args, jac=_jac)
+
+    def calcfc(x, con):
+        f = sf.fun(x)
+        i = 0
+        for size, c in izip(cons_lengths, constraints):
+            con[i: i + size] = c['fun'](x, *c['args'])
+            i += size
+        return f
+
+    def wrapped_callback(x):
+        if callback is not None:
+            callback(np.copy(x))
+
+    info = np.zeros(4, np.float64)
+    xopt, info = cobyla.minimize(calcfc, m=m, x=np.copy(x0), rhobeg=rhobeg,
+                                  rhoend=rhoend, iprint=iprint, maxfun=maxfun,
+                                  dinfo=info, callback=wrapped_callback)
+
+    if info[3] > catol:
+        # Check constraint violation
+        info[0] = 4
+
+    return OptimizeResult(x=xopt,
+                          status=int(info[0]),
+                          success=info[0] == 1,
+                          message={1: 'Optimization terminated successfully.',
+                                   2: 'Maximum number of function evaluations '
+                                      'has been exceeded.',
+                                   3: 'Rounding errors are becoming damaging '
+                                      'in COBYLA subroutine.',
+                                   4: 'Did not converge to a solution '
+                                      'satisfying the constraints. See '
+                                      '`maxcv` for magnitude of violation.',
+                                   5: 'NaN result encountered.'
+                                   }.get(info[0], 'Unknown exit status.'),
+                          nfev=int(info[1]),
+                          fun=info[2],
+                          maxcv=info[3])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyqa_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyqa_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..38ae0477ca38e28dda80e0bf2dd1f0905eacff6e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_cobyqa_py.py
@@ -0,0 +1,72 @@
+import numpy as np
+from threading import Lock
+
+from ._optimize import _check_unknown_options
+
+
+COBYQA_LOCK = Lock()
+
+
+def _minimize_cobyqa(fun, x0, args=(), bounds=None, constraints=(),
+                     callback=None, disp=False, maxfev=None, maxiter=None,
+                     f_target=-np.inf, feasibility_tol=1e-8,
+                     initial_tr_radius=1.0, final_tr_radius=1e-6, scale=False,
+                     **unknown_options):
+    """
+    Minimize a scalar function of one or more variables using the
+    Constrained Optimization BY Quadratic Approximations (COBYQA) algorithm [1]_.
+
+    .. versionadded:: 1.14.0
+
+    Options
+    -------
+    disp : bool
+        Set to True to print information about the optimization procedure.
+        Default is ``False``.
+    maxfev : int
+        Maximum number of function evaluations. Default is ``500 * n``, where
+        ``n`` is the number of variables.
+    maxiter : int
+        Maximum number of iterations. Default is ``1000 * n``, where ``n`` is
+        the number of variables.
+    f_target : float
+        Target value for the objective function. The optimization procedure is
+        terminated when the objective function value of a feasible point (see
+        `feasibility_tol` below) is less than or equal to this target. Default
+        is ``-numpy.inf``.
+    feasibility_tol : float
+        Absolute tolerance for the constraint violation. Default is ``1e-8``.
+    initial_tr_radius : float
+        Initial trust-region radius. Typically, this value should be in the
+        order of one tenth of the greatest expected change to the variables.
+        Default is ``1.0``.
+    final_tr_radius : float
+        Final trust-region radius. It should indicate the accuracy required in
+        the final values of the variables. If provided, this option overrides
+        the value of `tol` in the `minimize` function. Default is ``1e-6``.
+    scale : bool
+        Set to True to scale the variables according to the bounds. If True and
+        if all the lower and upper bounds are finite, the variables are scaled
+        to be within the range :math:`[-1, 1]`. If any of the lower or upper
+        bounds is infinite, the variables are not scaled. Default is ``False``.
+
+    References
+    ----------
+    .. [1] COBYQA
+           https://www.cobyqa.com/stable/
+    """
+    from .._lib.cobyqa import minimize  # import here to avoid circular imports
+
+    _check_unknown_options(unknown_options)
+    options = {
+        'disp': bool(disp),
+        'maxfev': int(maxfev) if maxfev is not None else 500 * len(x0),
+        'maxiter': int(maxiter) if maxiter is not None else 1000 * len(x0),
+        'target': float(f_target),
+        'feasibility_tol': float(feasibility_tol),
+        'radius_init': float(initial_tr_radius),
+        'radius_final': float(final_tr_radius),
+        'scale': bool(scale),
+    }
+    with COBYQA_LOCK:
+        return minimize(fun, x0, args, bounds, constraints, callback, options)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_constraints.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_constraints.py
new file mode 100644
index 0000000000000000000000000000000000000000..1bae893e231eb9bd89308e441b8abf841f4605bb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_constraints.py
@@ -0,0 +1,594 @@
+"""Constraints definition for minimize."""
+import numpy as np
+from ._hessian_update_strategy import BFGS
+from ._differentiable_functions import (
+    VectorFunction, LinearVectorFunction, IdentityVectorFunction)
+from ._optimize import OptimizeWarning
+from warnings import warn, catch_warnings, simplefilter, filterwarnings
+from scipy.sparse import issparse
+
+
+def _arr_to_scalar(x):
+    # If x is a numpy array, return x.item().  This will
+    # fail if the array has more than one element.
+    return x.item() if isinstance(x, np.ndarray) else x
+
+
+class NonlinearConstraint:
+    """Nonlinear constraint on the variables.
+
+    The constraint has the general inequality form::
+
+        lb <= fun(x) <= ub
+
+    Here the vector of independent variables x is passed as ndarray of shape
+    (n,) and ``fun`` returns a vector with m components.
+
+    It is possible to use equal bounds to represent an equality constraint or
+    infinite bounds to represent a one-sided constraint.
+
+    Parameters
+    ----------
+    fun : callable
+        The function defining the constraint.
+        The signature is ``fun(x) -> array_like, shape (m,)``.
+    lb, ub : array_like
+        Lower and upper bounds on the constraint. Each array must have the
+        shape (m,) or be a scalar, in the latter case a bound will be the same
+        for all components of the constraint. Use ``np.inf`` with an
+        appropriate sign to specify a one-sided constraint.
+        Set components of `lb` and `ub` equal to represent an equality
+        constraint. Note that you can mix constraints of different types:
+        interval, one-sided or equality, by setting different components of
+        `lb` and `ub` as  necessary.
+    jac : {callable,  '2-point', '3-point', 'cs'}, optional
+        Method of computing the Jacobian matrix (an m-by-n matrix,
+        where element (i, j) is the partial derivative of f[i] with
+        respect to x[j]).  The keywords {'2-point', '3-point',
+        'cs'} select a finite difference scheme for the numerical estimation.
+        A callable must have the following signature::
+
+            jac(x) -> {ndarray, sparse matrix}, shape (m, n)
+
+        Default is '2-point'.
+    hess : {callable, '2-point', '3-point', 'cs', HessianUpdateStrategy, None}, optional
+        Method for computing the Hessian matrix. The keywords
+        {'2-point', '3-point', 'cs'} select a finite difference scheme for
+        numerical  estimation.  Alternatively, objects implementing
+        `HessianUpdateStrategy` interface can be used to approximate the
+        Hessian. Currently available implementations are:
+
+        - `BFGS` (default option)
+        - `SR1`
+
+        A callable must return the Hessian matrix of ``dot(fun, v)`` and
+        must have the following signature:
+        ``hess(x, v) -> {LinearOperator, sparse matrix, array_like}, shape (n, n)``.
+        Here ``v`` is ndarray with shape (m,) containing Lagrange multipliers.
+    keep_feasible : array_like of bool, optional
+        Whether to keep the constraint components feasible throughout
+        iterations. A single value set this property for all components.
+        Default is False. Has no effect for equality constraints.
+    finite_diff_rel_step: None or array_like, optional
+        Relative step size for the finite difference approximation. Default is
+        None, which will select a reasonable value automatically depending
+        on a finite difference scheme.
+    finite_diff_jac_sparsity: {None, array_like, sparse matrix}, optional
+        Defines the sparsity structure of the Jacobian matrix for finite
+        difference estimation, its shape must be (m, n). If the Jacobian has
+        only few non-zero elements in *each* row, providing the sparsity
+        structure will greatly speed up the computations. A zero entry means
+        that a corresponding element in the Jacobian is identically zero.
+        If provided, forces the use of 'lsmr' trust-region solver.
+        If None (default) then dense differencing will be used.
+
+    Notes
+    -----
+    Finite difference schemes {'2-point', '3-point', 'cs'} may be used for
+    approximating either the Jacobian or the Hessian. We, however, do not allow
+    its use for approximating both simultaneously. Hence whenever the Jacobian
+    is estimated via finite-differences, we require the Hessian to be estimated
+    using one of the quasi-Newton strategies.
+
+    The scheme 'cs' is potentially the most accurate, but requires the function
+    to correctly handles complex inputs and be analytically continuable to the
+    complex plane. The scheme '3-point' is more accurate than '2-point' but
+    requires twice as many operations.
+
+    Examples
+    --------
+    Constrain ``x[0] < sin(x[1]) + 1.9``
+
+    >>> from scipy.optimize import NonlinearConstraint
+    >>> import numpy as np
+    >>> con = lambda x: x[0] - np.sin(x[1])
+    >>> nlc = NonlinearConstraint(con, -np.inf, 1.9)
+
+    """
+    def __init__(self, fun, lb, ub, jac='2-point', hess=None,
+                 keep_feasible=False, finite_diff_rel_step=None,
+                 finite_diff_jac_sparsity=None):
+        if hess is None:
+            hess = BFGS()
+        self.fun = fun
+        self.lb = lb
+        self.ub = ub
+        self.finite_diff_rel_step = finite_diff_rel_step
+        self.finite_diff_jac_sparsity = finite_diff_jac_sparsity
+        self.jac = jac
+        self.hess = hess
+        self.keep_feasible = keep_feasible
+
+
+class LinearConstraint:
+    """Linear constraint on the variables.
+
+    The constraint has the general inequality form::
+
+        lb <= A.dot(x) <= ub
+
+    Here the vector of independent variables x is passed as ndarray of shape
+    (n,) and the matrix A has shape (m, n).
+
+    It is possible to use equal bounds to represent an equality constraint or
+    infinite bounds to represent a one-sided constraint.
+
+    Parameters
+    ----------
+    A : {array_like, sparse matrix}, shape (m, n)
+        Matrix defining the constraint.
+    lb, ub : dense array_like, optional
+        Lower and upper limits on the constraint. Each array must have the
+        shape (m,) or be a scalar, in the latter case a bound will be the same
+        for all components of the constraint. Use ``np.inf`` with an
+        appropriate sign to specify a one-sided constraint.
+        Set components of `lb` and `ub` equal to represent an equality
+        constraint. Note that you can mix constraints of different types:
+        interval, one-sided or equality, by setting different components of
+        `lb` and `ub` as  necessary. Defaults to ``lb = -np.inf``
+        and ``ub = np.inf`` (no limits).
+    keep_feasible : dense array_like of bool, optional
+        Whether to keep the constraint components feasible throughout
+        iterations. A single value set this property for all components.
+        Default is False. Has no effect for equality constraints.
+    """
+    def _input_validation(self):
+        if self.A.ndim != 2:
+            message = "`A` must have exactly two dimensions."
+            raise ValueError(message)
+
+        try:
+            shape = self.A.shape[0:1]
+            self.lb = np.broadcast_to(self.lb, shape)
+            self.ub = np.broadcast_to(self.ub, shape)
+            self.keep_feasible = np.broadcast_to(self.keep_feasible, shape)
+        except ValueError:
+            message = ("`lb`, `ub`, and `keep_feasible` must be broadcastable "
+                       "to shape `A.shape[0:1]`")
+            raise ValueError(message)
+
+    def __init__(self, A, lb=-np.inf, ub=np.inf, keep_feasible=False):
+        if not issparse(A):
+            # In some cases, if the constraint is not valid, this emits a
+            # VisibleDeprecationWarning about ragged nested sequences
+            # before eventually causing an error. `scipy.optimize.milp` would
+            # prefer that this just error out immediately so it can handle it
+            # rather than concerning the user.
+            with catch_warnings():
+                simplefilter("error")
+                self.A = np.atleast_2d(A).astype(np.float64)
+        else:
+            self.A = A
+        if issparse(lb) or issparse(ub):
+            raise ValueError("Constraint limits must be dense arrays.")
+        self.lb = np.atleast_1d(lb).astype(np.float64)
+        self.ub = np.atleast_1d(ub).astype(np.float64)
+
+        if issparse(keep_feasible):
+            raise ValueError("`keep_feasible` must be a dense array.")
+        self.keep_feasible = np.atleast_1d(keep_feasible).astype(bool)
+        self._input_validation()
+
+    def residual(self, x):
+        """
+        Calculate the residual between the constraint function and the limits
+
+        For a linear constraint of the form::
+
+            lb <= A@x <= ub
+
+        the lower and upper residuals between ``A@x`` and the limits are values
+        ``sl`` and ``sb`` such that::
+
+            lb + sl == A@x == ub - sb
+
+        When all elements of ``sl`` and ``sb`` are positive, all elements of
+        the constraint are satisfied; a negative element in ``sl`` or ``sb``
+        indicates that the corresponding element of the constraint is not
+        satisfied.
+
+        Parameters
+        ----------
+        x: array_like
+            Vector of independent variables
+
+        Returns
+        -------
+        sl, sb : array-like
+            The lower and upper residuals
+        """
+        return self.A@x - self.lb, self.ub - self.A@x
+
+
+class Bounds:
+    """Bounds constraint on the variables.
+
+    The constraint has the general inequality form::
+
+        lb <= x <= ub
+
+    It is possible to use equal bounds to represent an equality constraint or
+    infinite bounds to represent a one-sided constraint.
+
+    Parameters
+    ----------
+    lb, ub : dense array_like, optional
+        Lower and upper bounds on independent variables. `lb`, `ub`, and
+        `keep_feasible` must be the same shape or broadcastable.
+        Set components of `lb` and `ub` equal
+        to fix a variable. Use ``np.inf`` with an appropriate sign to disable
+        bounds on all or some variables. Note that you can mix constraints of
+        different types: interval, one-sided or equality, by setting different
+        components of `lb` and `ub` as necessary. Defaults to ``lb = -np.inf``
+        and ``ub = np.inf`` (no bounds).
+    keep_feasible : dense array_like of bool, optional
+        Whether to keep the constraint components feasible throughout
+        iterations. Must be broadcastable with `lb` and `ub`.
+        Default is False. Has no effect for equality constraints.
+    """
+    def _input_validation(self):
+        try:
+            res = np.broadcast_arrays(self.lb, self.ub, self.keep_feasible)
+            self.lb, self.ub, self.keep_feasible = res
+        except ValueError:
+            message = "`lb`, `ub`, and `keep_feasible` must be broadcastable."
+            raise ValueError(message)
+
+    def __init__(self, lb=-np.inf, ub=np.inf, keep_feasible=False):
+        if issparse(lb) or issparse(ub):
+            raise ValueError("Lower and upper bounds must be dense arrays.")
+        self.lb = np.atleast_1d(lb)
+        self.ub = np.atleast_1d(ub)
+
+        if issparse(keep_feasible):
+            raise ValueError("`keep_feasible` must be a dense array.")
+        self.keep_feasible = np.atleast_1d(keep_feasible).astype(bool)
+        self._input_validation()
+
+    def __repr__(self):
+        start = f"{type(self).__name__}({self.lb!r}, {self.ub!r}"
+        if np.any(self.keep_feasible):
+            end = f", keep_feasible={self.keep_feasible!r})"
+        else:
+            end = ")"
+        return start + end
+
+    def residual(self, x):
+        """Calculate the residual (slack) between the input and the bounds
+
+        For a bound constraint of the form::
+
+            lb <= x <= ub
+
+        the lower and upper residuals between `x` and the bounds are values
+        ``sl`` and ``sb`` such that::
+
+            lb + sl == x == ub - sb
+
+        When all elements of ``sl`` and ``sb`` are positive, all elements of
+        ``x`` lie within the bounds; a negative element in ``sl`` or ``sb``
+        indicates that the corresponding element of ``x`` is out of bounds.
+
+        Parameters
+        ----------
+        x: array_like
+            Vector of independent variables
+
+        Returns
+        -------
+        sl, sb : array-like
+            The lower and upper residuals
+        """
+        return x - self.lb, self.ub - x
+
+
+class PreparedConstraint:
+    """Constraint prepared from a user defined constraint.
+
+    On creation it will check whether a constraint definition is valid and
+    the initial point is feasible. If created successfully, it will contain
+    the attributes listed below.
+
+    Parameters
+    ----------
+    constraint : {NonlinearConstraint, LinearConstraint`, Bounds}
+        Constraint to check and prepare.
+    x0 : array_like
+        Initial vector of independent variables.
+    sparse_jacobian : bool or None, optional
+        If bool, then the Jacobian of the constraint will be converted
+        to the corresponded format if necessary. If None (default), such
+        conversion is not made.
+    finite_diff_bounds : 2-tuple, optional
+        Lower and upper bounds on the independent variables for the finite
+        difference approximation, if applicable. Defaults to no bounds.
+
+    Attributes
+    ----------
+    fun : {VectorFunction, LinearVectorFunction, IdentityVectorFunction}
+        Function defining the constraint wrapped by one of the convenience
+        classes.
+    bounds : 2-tuple
+        Contains lower and upper bounds for the constraints --- lb and ub.
+        These are converted to ndarray and have a size equal to the number of
+        the constraints.
+    keep_feasible : ndarray
+         Array indicating which components must be kept feasible with a size
+         equal to the number of the constraints.
+    """
+    def __init__(self, constraint, x0, sparse_jacobian=None,
+                 finite_diff_bounds=(-np.inf, np.inf)):
+        if isinstance(constraint, NonlinearConstraint):
+            fun = VectorFunction(constraint.fun, x0,
+                                 constraint.jac, constraint.hess,
+                                 constraint.finite_diff_rel_step,
+                                 constraint.finite_diff_jac_sparsity,
+                                 finite_diff_bounds, sparse_jacobian)
+        elif isinstance(constraint, LinearConstraint):
+            fun = LinearVectorFunction(constraint.A, x0, sparse_jacobian)
+        elif isinstance(constraint, Bounds):
+            fun = IdentityVectorFunction(x0, sparse_jacobian)
+        else:
+            raise ValueError("`constraint` of an unknown type is passed.")
+
+        m = fun.m
+
+        lb = np.asarray(constraint.lb, dtype=float)
+        ub = np.asarray(constraint.ub, dtype=float)
+        keep_feasible = np.asarray(constraint.keep_feasible, dtype=bool)
+
+        lb = np.broadcast_to(lb, m)
+        ub = np.broadcast_to(ub, m)
+        keep_feasible = np.broadcast_to(keep_feasible, m)
+
+        if keep_feasible.shape != (m,):
+            raise ValueError("`keep_feasible` has a wrong shape.")
+
+        mask = keep_feasible & (lb != ub)
+        f0 = fun.f
+        if np.any(f0[mask] < lb[mask]) or np.any(f0[mask] > ub[mask]):
+            raise ValueError("`x0` is infeasible with respect to some "
+                             "inequality constraint with `keep_feasible` "
+                             "set to True.")
+
+        self.fun = fun
+        self.bounds = (lb, ub)
+        self.keep_feasible = keep_feasible
+
+    def violation(self, x):
+        """How much the constraint is exceeded by.
+
+        Parameters
+        ----------
+        x : array-like
+            Vector of independent variables
+
+        Returns
+        -------
+        excess : array-like
+            How much the constraint is exceeded by, for each of the
+            constraints specified by `PreparedConstraint.fun`.
+        """
+        with catch_warnings():
+            # Ignore the following warning, it's not important when
+            # figuring out total violation
+            # UserWarning: delta_grad == 0.0. Check if the approximated
+            # function is linear
+            filterwarnings("ignore", "delta_grad", UserWarning)
+            ev = self.fun.fun(np.asarray(x))
+
+        excess_lb = np.maximum(self.bounds[0] - ev, 0)
+        excess_ub = np.maximum(ev - self.bounds[1], 0)
+
+        return excess_lb + excess_ub
+
+
+def new_bounds_to_old(lb, ub, n):
+    """Convert the new bounds representation to the old one.
+
+    The new representation is a tuple (lb, ub) and the old one is a list
+    containing n tuples, ith containing lower and upper bound on a ith
+    variable.
+    If any of the entries in lb/ub are -np.inf/np.inf they are replaced by
+    None.
+    """
+    lb = np.broadcast_to(lb, n)
+    ub = np.broadcast_to(ub, n)
+
+    lb = [float(x) if x > -np.inf else None for x in lb]
+    ub = [float(x) if x < np.inf else None for x in ub]
+
+    return list(zip(lb, ub))
+
+
+def old_bound_to_new(bounds):
+    """Convert the old bounds representation to the new one.
+
+    The new representation is a tuple (lb, ub) and the old one is a list
+    containing n tuples, ith containing lower and upper bound on a ith
+    variable.
+    If any of the entries in lb/ub are None they are replaced by
+    -np.inf/np.inf.
+    """
+    lb, ub = zip(*bounds)
+
+    # Convert occurrences of None to -inf or inf, and replace occurrences of
+    # any numpy array x with x.item(). Then wrap the results in numpy arrays.
+    lb = np.array([float(_arr_to_scalar(x)) if x is not None else -np.inf
+                   for x in lb])
+    ub = np.array([float(_arr_to_scalar(x)) if x is not None else np.inf
+                   for x in ub])
+
+    return lb, ub
+
+
+def strict_bounds(lb, ub, keep_feasible, n_vars):
+    """Remove bounds which are not asked to be kept feasible."""
+    strict_lb = np.resize(lb, n_vars).astype(float)
+    strict_ub = np.resize(ub, n_vars).astype(float)
+    keep_feasible = np.resize(keep_feasible, n_vars)
+    strict_lb[~keep_feasible] = -np.inf
+    strict_ub[~keep_feasible] = np.inf
+    return strict_lb, strict_ub
+
+
+def new_constraint_to_old(con, x0):
+    """
+    Converts new-style constraint objects to old-style constraint dictionaries.
+    """
+    if isinstance(con, NonlinearConstraint):
+        if (con.finite_diff_jac_sparsity is not None or
+                con.finite_diff_rel_step is not None or
+                not isinstance(con.hess, BFGS) or  # misses user specified BFGS
+                con.keep_feasible):
+            warn("Constraint options `finite_diff_jac_sparsity`, "
+                 "`finite_diff_rel_step`, `keep_feasible`, and `hess`"
+                 "are ignored by this method.",
+                 OptimizeWarning, stacklevel=3)
+
+        fun = con.fun
+        if callable(con.jac):
+            jac = con.jac
+        else:
+            jac = None
+
+    else:  # LinearConstraint
+        if np.any(con.keep_feasible):
+            warn("Constraint option `keep_feasible` is ignored by this method.",
+                 OptimizeWarning, stacklevel=3)
+
+        A = con.A
+        if issparse(A):
+            A = A.toarray()
+        def fun(x):
+            return np.dot(A, x)
+        def jac(x):
+            return A
+
+    # FIXME: when bugs in VectorFunction/LinearVectorFunction are worked out,
+    # use pcon.fun.fun and pcon.fun.jac. Until then, get fun/jac above.
+    pcon = PreparedConstraint(con, x0)
+    lb, ub = pcon.bounds
+
+    i_eq = lb == ub
+    i_bound_below = np.logical_xor(lb != -np.inf, i_eq)
+    i_bound_above = np.logical_xor(ub != np.inf, i_eq)
+    i_unbounded = np.logical_and(lb == -np.inf, ub == np.inf)
+
+    if np.any(i_unbounded):
+        warn("At least one constraint is unbounded above and below. Such "
+             "constraints are ignored.",
+             OptimizeWarning, stacklevel=3)
+
+    ceq = []
+    if np.any(i_eq):
+        def f_eq(x):
+            y = np.array(fun(x)).flatten()
+            return y[i_eq] - lb[i_eq]
+        ceq = [{"type": "eq", "fun": f_eq}]
+
+        if jac is not None:
+            def j_eq(x):
+                dy = jac(x)
+                if issparse(dy):
+                    dy = dy.toarray()
+                dy = np.atleast_2d(dy)
+                return dy[i_eq, :]
+            ceq[0]["jac"] = j_eq
+
+    cineq = []
+    n_bound_below = np.sum(i_bound_below)
+    n_bound_above = np.sum(i_bound_above)
+    if n_bound_below + n_bound_above:
+        def f_ineq(x):
+            y = np.zeros(n_bound_below + n_bound_above)
+            y_all = np.array(fun(x)).flatten()
+            y[:n_bound_below] = y_all[i_bound_below] - lb[i_bound_below]
+            y[n_bound_below:] = -(y_all[i_bound_above] - ub[i_bound_above])
+            return y
+        cineq = [{"type": "ineq", "fun": f_ineq}]
+
+        if jac is not None:
+            def j_ineq(x):
+                dy = np.zeros((n_bound_below + n_bound_above, len(x0)))
+                dy_all = jac(x)
+                if issparse(dy_all):
+                    dy_all = dy_all.toarray()
+                dy_all = np.atleast_2d(dy_all)
+                dy[:n_bound_below, :] = dy_all[i_bound_below]
+                dy[n_bound_below:, :] = -dy_all[i_bound_above]
+                return dy
+            cineq[0]["jac"] = j_ineq
+
+    old_constraints = ceq + cineq
+
+    if len(old_constraints) > 1:
+        warn("Equality and inequality constraints are specified in the same "
+             "element of the constraint list. For efficient use with this "
+             "method, equality and inequality constraints should be specified "
+             "in separate elements of the constraint list. ",
+             OptimizeWarning, stacklevel=3)
+    return old_constraints
+
+
+def old_constraint_to_new(ic, con):
+    """
+    Converts old-style constraint dictionaries to new-style constraint objects.
+    """
+    # check type
+    try:
+        ctype = con['type'].lower()
+    except KeyError as e:
+        raise KeyError('Constraint %d has no type defined.' % ic) from e
+    except TypeError as e:
+        raise TypeError(
+            'Constraints must be a sequence of dictionaries.'
+        ) from e
+    except AttributeError as e:
+        raise TypeError("Constraint's type must be a string.") from e
+    else:
+        if ctype not in ['eq', 'ineq']:
+            raise ValueError(f"Unknown constraint type '{con['type']}'.")
+    if 'fun' not in con:
+        raise ValueError('Constraint %d has no function defined.' % ic)
+
+    lb = 0
+    if ctype == 'eq':
+        ub = 0
+    else:
+        ub = np.inf
+
+    jac = '2-point'
+    if 'args' in con:
+        args = con['args']
+        def fun(x):
+            return con["fun"](x, *args)
+        if 'jac' in con:
+            def jac(x):
+                return con["jac"](x, *args)
+    else:
+        fun = con['fun']
+        if 'jac' in con:
+            jac = con['jac']
+
+    return NonlinearConstraint(fun, lb, ub, jac)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dcsrch.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dcsrch.py
new file mode 100644
index 0000000000000000000000000000000000000000..f8b4df4763ba4f699869431a0b6528383c2f0328
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dcsrch.py
@@ -0,0 +1,728 @@
+import numpy as np
+
+"""
+# 2023 - ported from minpack2.dcsrch, dcstep (Fortran) to Python
+c     MINPACK-1 Project. June 1983.
+c     Argonne National Laboratory.
+c     Jorge J. More' and David J. Thuente.
+c
+c     MINPACK-2 Project. November 1993.
+c     Argonne National Laboratory and University of Minnesota.
+c     Brett M. Averick, Richard G. Carter, and Jorge J. More'.
+"""
+
+# NOTE this file was linted by black on first commit, and can be kept that way.
+
+
+class DCSRCH:
+    """
+    Parameters
+    ----------
+    phi : callable phi(alpha)
+        Function at point `alpha`
+    derphi : callable phi'(alpha)
+        Objective function derivative. Returns a scalar.
+    ftol : float
+        A nonnegative tolerance for the sufficient decrease condition.
+    gtol : float
+        A nonnegative tolerance for the curvature condition.
+    xtol : float
+        A nonnegative relative tolerance for an acceptable step. The
+        subroutine exits with a warning if the relative difference between
+        sty and stx is less than xtol.
+    stpmin : float
+        A nonnegative lower bound for the step.
+    stpmax :
+        A nonnegative upper bound for the step.
+
+    Notes
+    -----
+
+    This subroutine finds a step that satisfies a sufficient
+    decrease condition and a curvature condition.
+
+    Each call of the subroutine updates an interval with
+    endpoints stx and sty. The interval is initially chosen
+    so that it contains a minimizer of the modified function
+
+           psi(stp) = f(stp) - f(0) - ftol*stp*f'(0).
+
+    If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the
+    interval is chosen so that it contains a minimizer of f.
+
+    The algorithm is designed to find a step that satisfies
+    the sufficient decrease condition
+
+           f(stp) <= f(0) + ftol*stp*f'(0),
+
+    and the curvature condition
+
+           abs(f'(stp)) <= gtol*abs(f'(0)).
+
+    If ftol is less than gtol and if, for example, the function
+    is bounded below, then there is always a step which satisfies
+    both conditions.
+
+    If no step can be found that satisfies both conditions, then
+    the algorithm stops with a warning. In this case stp only
+    satisfies the sufficient decrease condition.
+
+    A typical invocation of dcsrch has the following outline:
+
+    Evaluate the function at stp = 0.0d0; store in f.
+    Evaluate the gradient at stp = 0.0d0; store in g.
+    Choose a starting step stp.
+
+    task = 'START'
+    10 continue
+        call dcsrch(stp,f,g,ftol,gtol,xtol,task,stpmin,stpmax,
+                   isave,dsave)
+        if (task .eq. 'FG') then
+           Evaluate the function and the gradient at stp
+           go to 10
+           end if
+
+    NOTE: The user must not alter work arrays between calls.
+
+    The subroutine statement is
+
+        subroutine dcsrch(f,g,stp,ftol,gtol,xtol,stpmin,stpmax,
+                         task,isave,dsave)
+        where
+
+    stp is a double precision variable.
+        On entry stp is the current estimate of a satisfactory
+            step. On initial entry, a positive initial estimate
+            must be provided.
+        On exit stp is the current estimate of a satisfactory step
+            if task = 'FG'. If task = 'CONV' then stp satisfies
+            the sufficient decrease and curvature condition.
+
+    f is a double precision variable.
+        On initial entry f is the value of the function at 0.
+        On subsequent entries f is the value of the
+            function at stp.
+        On exit f is the value of the function at stp.
+
+    g is a double precision variable.
+        On initial entry g is the derivative of the function at 0.
+        On subsequent entries g is the derivative of the
+           function at stp.
+        On exit g is the derivative of the function at stp.
+
+    ftol is a double precision variable.
+        On entry ftol specifies a nonnegative tolerance for the
+           sufficient decrease condition.
+        On exit ftol is unchanged.
+
+    gtol is a double precision variable.
+        On entry gtol specifies a nonnegative tolerance for the
+           curvature condition.
+        On exit gtol is unchanged.
+
+    xtol is a double precision variable.
+        On entry xtol specifies a nonnegative relative tolerance
+          for an acceptable step. The subroutine exits with a
+          warning if the relative difference between sty and stx
+          is less than xtol.
+
+        On exit xtol is unchanged.
+
+    task is a character variable of length at least 60.
+        On initial entry task must be set to 'START'.
+        On exit task indicates the required action:
+
+           If task(1:2) = 'FG' then evaluate the function and
+           derivative at stp and call dcsrch again.
+
+           If task(1:4) = 'CONV' then the search is successful.
+
+           If task(1:4) = 'WARN' then the subroutine is not able
+           to satisfy the convergence conditions. The exit value of
+           stp contains the best point found during the search.
+
+          If task(1:5) = 'ERROR' then there is an error in the
+          input arguments.
+
+        On exit with convergence, a warning or an error, the
+           variable task contains additional information.
+
+    stpmin is a double precision variable.
+        On entry stpmin is a nonnegative lower bound for the step.
+        On exit stpmin is unchanged.
+
+    stpmax is a double precision variable.
+        On entry stpmax is a nonnegative upper bound for the step.
+        On exit stpmax is unchanged.
+
+    isave is an integer work array of dimension 2.
+
+    dsave is a double precision work array of dimension 13.
+
+    Subprograms called
+
+      MINPACK-2 ... dcstep
+    MINPACK-1 Project. June 1983.
+    Argonne National Laboratory.
+    Jorge J. More' and David J. Thuente.
+
+    MINPACK-2 Project. November 1993.
+    Argonne National Laboratory and University of Minnesota.
+    Brett M. Averick, Richard G. Carter, and Jorge J. More'.
+    """
+
+    def __init__(self, phi, derphi, ftol, gtol, xtol, stpmin, stpmax):
+        self.stage = None
+        self.ginit = None
+        self.gtest = None
+        self.gx = None
+        self.gy = None
+        self.finit = None
+        self.fx = None
+        self.fy = None
+        self.stx = None
+        self.sty = None
+        self.stmin = None
+        self.stmax = None
+        self.width = None
+        self.width1 = None
+
+        # leave all assessment of tolerances/limits to the first call of
+        # this object
+        self.ftol = ftol
+        self.gtol = gtol
+        self.xtol = xtol
+        self.stpmin = stpmin
+        self.stpmax = stpmax
+
+        self.phi = phi
+        self.derphi = derphi
+
+    def __call__(self, alpha1, phi0=None, derphi0=None, maxiter=100):
+        """
+        Parameters
+        ----------
+        alpha1 : float
+            alpha1 is the current estimate of a satisfactory
+            step. A positive initial estimate must be provided.
+        phi0 : float
+            the value of `phi` at 0 (if known).
+        derphi0 : float
+            the derivative of `derphi` at 0 (if known).
+        maxiter : int
+
+        Returns
+        -------
+        alpha : float
+            Step size, or None if no suitable step was found.
+        phi : float
+            Value of `phi` at the new point `alpha`.
+        phi0 : float
+            Value of `phi` at `alpha=0`.
+        task : bytes
+            On exit task indicates status information.
+
+           If task[:4] == b'CONV' then the search is successful.
+
+           If task[:4] == b'WARN' then the subroutine is not able
+           to satisfy the convergence conditions. The exit value of
+           stp contains the best point found during the search.
+
+           If task[:5] == b'ERROR' then there is an error in the
+           input arguments.
+        """
+        if phi0 is None:
+            phi0 = self.phi(0.0)
+        if derphi0 is None:
+            derphi0 = self.derphi(0.0)
+
+        phi1 = phi0
+        derphi1 = derphi0
+
+        task = b"START"
+        for i in range(maxiter):
+            stp, phi1, derphi1, task = self._iterate(
+                alpha1, phi1, derphi1, task
+            )
+
+            if not np.isfinite(stp):
+                task = b"WARN"
+                stp = None
+                break
+
+            if task[:2] == b"FG":
+                alpha1 = stp
+                phi1 = self.phi(stp)
+                derphi1 = self.derphi(stp)
+            else:
+                break
+        else:
+            # maxiter reached, the line search did not converge
+            stp = None
+            task = b"WARNING: dcsrch did not converge within max iterations"
+
+        if task[:5] == b"ERROR" or task[:4] == b"WARN":
+            stp = None  # failed
+
+        return stp, phi1, phi0, task
+
+    def _iterate(self, stp, f, g, task):
+        """
+        Parameters
+        ----------
+        stp : float
+            The current estimate of a satisfactory step. On initial entry, a
+            positive initial estimate must be provided.
+        f : float
+            On first call f is the value of the function at 0. On subsequent
+            entries f should be the value of the function at stp.
+        g : float
+            On initial entry g is the derivative of the function at 0. On
+            subsequent entries g is the derivative of the function at stp.
+        task : bytes
+            On initial entry task must be set to 'START'.
+
+        On exit with convergence, a warning or an error, the
+           variable task contains additional information.
+
+
+        Returns
+        -------
+        stp, f, g, task: tuple
+
+            stp : float
+                the current estimate of a satisfactory step if task = 'FG'. If
+                task = 'CONV' then stp satisfies the sufficient decrease and
+                curvature condition.
+            f : float
+                the value of the function at stp.
+            g : float
+                the derivative of the function at stp.
+            task : bytes
+                On exit task indicates the required action:
+
+               If task(1:2) == b'FG' then evaluate the function and
+               derivative at stp and call dcsrch again.
+
+               If task(1:4) == b'CONV' then the search is successful.
+
+               If task(1:4) == b'WARN' then the subroutine is not able
+               to satisfy the convergence conditions. The exit value of
+               stp contains the best point found during the search.
+
+              If task(1:5) == b'ERROR' then there is an error in the
+              input arguments.
+        """
+        p5 = 0.5
+        p66 = 0.66
+        xtrapl = 1.1
+        xtrapu = 4.0
+
+        if task[:5] == b"START":
+            if stp < self.stpmin:
+                task = b"ERROR: STP .LT. STPMIN"
+            if stp > self.stpmax:
+                task = b"ERROR: STP .GT. STPMAX"
+            if g >= 0:
+                task = b"ERROR: INITIAL G .GE. ZERO"
+            if self.ftol < 0:
+                task = b"ERROR: FTOL .LT. ZERO"
+            if self.gtol < 0:
+                task = b"ERROR: GTOL .LT. ZERO"
+            if self.xtol < 0:
+                task = b"ERROR: XTOL .LT. ZERO"
+            if self.stpmin < 0:
+                task = b"ERROR: STPMIN .LT. ZERO"
+            if self.stpmax < self.stpmin:
+                task = b"ERROR: STPMAX .LT. STPMIN"
+
+            if task[:5] == b"ERROR":
+                return stp, f, g, task
+
+            # Initialize local variables.
+
+            self.brackt = False
+            self.stage = 1
+            self.finit = f
+            self.ginit = g
+            self.gtest = self.ftol * self.ginit
+            self.width = self.stpmax - self.stpmin
+            self.width1 = self.width / p5
+
+            # The variables stx, fx, gx contain the values of the step,
+            # function, and derivative at the best step.
+            # The variables sty, fy, gy contain the value of the step,
+            # function, and derivative at sty.
+            # The variables stp, f, g contain the values of the step,
+            # function, and derivative at stp.
+
+            self.stx = 0.0
+            self.fx = self.finit
+            self.gx = self.ginit
+            self.sty = 0.0
+            self.fy = self.finit
+            self.gy = self.ginit
+            self.stmin = 0
+            self.stmax = stp + xtrapu * stp
+            task = b"FG"
+            return stp, f, g, task
+
+        # in the original Fortran this was a location to restore variables
+        # we don't need to do that because they're attributes.
+
+        # If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the
+        # algorithm enters the second stage.
+        ftest = self.finit + stp * self.gtest
+
+        if self.stage == 1 and f <= ftest and g >= 0:
+            self.stage = 2
+
+        # test for warnings
+        if self.brackt and (stp <= self.stmin or stp >= self.stmax):
+            task = b"WARNING: ROUNDING ERRORS PREVENT PROGRESS"
+        if self.brackt and self.stmax - self.stmin <= self.xtol * self.stmax:
+            task = b"WARNING: XTOL TEST SATISFIED"
+        if stp == self.stpmax and f <= ftest and g <= self.gtest:
+            task = b"WARNING: STP = STPMAX"
+        if stp == self.stpmin and (f > ftest or g >= self.gtest):
+            task = b"WARNING: STP = STPMIN"
+
+        # test for convergence
+        if f <= ftest and abs(g) <= self.gtol * -self.ginit:
+            task = b"CONVERGENCE"
+
+        # test for termination
+        if task[:4] == b"WARN" or task[:4] == b"CONV":
+            return stp, f, g, task
+
+        # A modified function is used to predict the step during the
+        # first stage if a lower function value has been obtained but
+        # the decrease is not sufficient.
+        if self.stage == 1 and f <= self.fx and f > ftest:
+            # Define the modified function and derivative values.
+            fm = f - stp * self.gtest
+            fxm = self.fx - self.stx * self.gtest
+            fym = self.fy - self.sty * self.gtest
+            gm = g - self.gtest
+            gxm = self.gx - self.gtest
+            gym = self.gy - self.gtest
+
+            # Call dcstep to update stx, sty, and to compute the new step.
+            # dcstep can have several operations which can produce NaN
+            # e.g. inf/inf. Filter these out.
+            with np.errstate(invalid="ignore", over="ignore"):
+                tup = dcstep(
+                    self.stx,
+                    fxm,
+                    gxm,
+                    self.sty,
+                    fym,
+                    gym,
+                    stp,
+                    fm,
+                    gm,
+                    self.brackt,
+                    self.stmin,
+                    self.stmax,
+                )
+                self.stx, fxm, gxm, self.sty, fym, gym, stp, self.brackt = tup
+
+            # Reset the function and derivative values for f
+            self.fx = fxm + self.stx * self.gtest
+            self.fy = fym + self.sty * self.gtest
+            self.gx = gxm + self.gtest
+            self.gy = gym + self.gtest
+
+        else:
+            # Call dcstep to update stx, sty, and to compute the new step.
+            # dcstep can have several operations which can produce NaN
+            # e.g. inf/inf. Filter these out.
+
+            with np.errstate(invalid="ignore", over="ignore"):
+                tup = dcstep(
+                    self.stx,
+                    self.fx,
+                    self.gx,
+                    self.sty,
+                    self.fy,
+                    self.gy,
+                    stp,
+                    f,
+                    g,
+                    self.brackt,
+                    self.stmin,
+                    self.stmax,
+                )
+            (
+                self.stx,
+                self.fx,
+                self.gx,
+                self.sty,
+                self.fy,
+                self.gy,
+                stp,
+                self.brackt,
+            ) = tup
+
+        # Decide if a bisection step is needed
+        if self.brackt:
+            if abs(self.sty - self.stx) >= p66 * self.width1:
+                stp = self.stx + p5 * (self.sty - self.stx)
+            self.width1 = self.width
+            self.width = abs(self.sty - self.stx)
+
+        # Set the minimum and maximum steps allowed for stp.
+        if self.brackt:
+            self.stmin = min(self.stx, self.sty)
+            self.stmax = max(self.stx, self.sty)
+        else:
+            self.stmin = stp + xtrapl * (stp - self.stx)
+            self.stmax = stp + xtrapu * (stp - self.stx)
+
+        # Force the step to be within the bounds stpmax and stpmin.
+        stp = np.clip(stp, self.stpmin, self.stpmax)
+
+        # If further progress is not possible, let stp be the best
+        # point obtained during the search.
+        if (
+            self.brackt
+            and (stp <= self.stmin or stp >= self.stmax)
+            or (
+                self.brackt
+                and self.stmax - self.stmin <= self.xtol * self.stmax
+            )
+        ):
+            stp = self.stx
+
+        # Obtain another function and derivative
+        task = b"FG"
+        return stp, f, g, task
+
+
+def dcstep(stx, fx, dx, sty, fy, dy, stp, fp, dp, brackt, stpmin, stpmax):
+    """
+    Subroutine dcstep
+
+    This subroutine computes a safeguarded step for a search
+    procedure and updates an interval that contains a step that
+    satisfies a sufficient decrease and a curvature condition.
+
+    The parameter stx contains the step with the least function
+    value. If brackt is set to .true. then a minimizer has
+    been bracketed in an interval with endpoints stx and sty.
+    The parameter stp contains the current step.
+    The subroutine assumes that if brackt is set to .true. then
+
+        min(stx,sty) < stp < max(stx,sty),
+
+    and that the derivative at stx is negative in the direction
+    of the step.
+
+    The subroutine statement is
+
+      subroutine dcstep(stx,fx,dx,sty,fy,dy,stp,fp,dp,brackt,
+                        stpmin,stpmax)
+
+    where
+
+    stx is a double precision variable.
+        On entry stx is the best step obtained so far and is an
+          endpoint of the interval that contains the minimizer.
+        On exit stx is the updated best step.
+
+    fx is a double precision variable.
+        On entry fx is the function at stx.
+        On exit fx is the function at stx.
+
+    dx is a double precision variable.
+        On entry dx is the derivative of the function at
+          stx. The derivative must be negative in the direction of
+          the step, that is, dx and stp - stx must have opposite
+          signs.
+        On exit dx is the derivative of the function at stx.
+
+    sty is a double precision variable.
+        On entry sty is the second endpoint of the interval that
+          contains the minimizer.
+        On exit sty is the updated endpoint of the interval that
+          contains the minimizer.
+
+    fy is a double precision variable.
+        On entry fy is the function at sty.
+        On exit fy is the function at sty.
+
+    dy is a double precision variable.
+        On entry dy is the derivative of the function at sty.
+        On exit dy is the derivative of the function at the exit sty.
+
+    stp is a double precision variable.
+        On entry stp is the current step. If brackt is set to .true.
+          then on input stp must be between stx and sty.
+        On exit stp is a new trial step.
+
+    fp is a double precision variable.
+        On entry fp is the function at stp
+        On exit fp is unchanged.
+
+    dp is a double precision variable.
+        On entry dp is the derivative of the function at stp.
+        On exit dp is unchanged.
+
+    brackt is an logical variable.
+        On entry brackt specifies if a minimizer has been bracketed.
+            Initially brackt must be set to .false.
+        On exit brackt specifies if a minimizer has been bracketed.
+            When a minimizer is bracketed brackt is set to .true.
+
+    stpmin is a double precision variable.
+        On entry stpmin is a lower bound for the step.
+        On exit stpmin is unchanged.
+
+    stpmax is a double precision variable.
+        On entry stpmax is an upper bound for the step.
+        On exit stpmax is unchanged.
+
+    MINPACK-1 Project. June 1983
+    Argonne National Laboratory.
+    Jorge J. More' and David J. Thuente.
+
+    MINPACK-2 Project. November 1993.
+    Argonne National Laboratory and University of Minnesota.
+    Brett M. Averick and Jorge J. More'.
+
+    """
+    sgn_dp = np.sign(dp)
+    sgn_dx = np.sign(dx)
+
+    # sgnd = dp * (dx / abs(dx))
+    sgnd = sgn_dp * sgn_dx
+
+    # First case: A higher function value. The minimum is bracketed.
+    # If the cubic step is closer to stx than the quadratic step, the
+    # cubic step is taken, otherwise the average of the cubic and
+    # quadratic steps is taken.
+    if fp > fx:
+        theta = 3.0 * (fx - fp) / (stp - stx) + dx + dp
+        s = max(abs(theta), abs(dx), abs(dp))
+        gamma = s * np.sqrt((theta / s) ** 2 - (dx / s) * (dp / s))
+        if stp < stx:
+            gamma *= -1
+        p = (gamma - dx) + theta
+        q = ((gamma - dx) + gamma) + dp
+        r = p / q
+        stpc = stx + r * (stp - stx)
+        stpq = stx + ((dx / ((fx - fp) / (stp - stx) + dx)) / 2.0) * (stp - stx)
+        if abs(stpc - stx) <= abs(stpq - stx):
+            stpf = stpc
+        else:
+            stpf = stpc + (stpq - stpc) / 2.0
+        brackt = True
+    elif sgnd < 0.0:
+        # Second case: A lower function value and derivatives of opposite
+        # sign. The minimum is bracketed. If the cubic step is farther from
+        # stp than the secant step, the cubic step is taken, otherwise the
+        # secant step is taken.
+        theta = 3 * (fx - fp) / (stp - stx) + dx + dp
+        s = max(abs(theta), abs(dx), abs(dp))
+        gamma = s * np.sqrt((theta / s) ** 2 - (dx / s) * (dp / s))
+        if stp > stx:
+            gamma *= -1
+        p = (gamma - dp) + theta
+        q = ((gamma - dp) + gamma) + dx
+        r = p / q
+        stpc = stp + r * (stx - stp)
+        stpq = stp + (dp / (dp - dx)) * (stx - stp)
+        if abs(stpc - stp) > abs(stpq - stp):
+            stpf = stpc
+        else:
+            stpf = stpq
+        brackt = True
+    elif abs(dp) < abs(dx):
+        # Third case: A lower function value, derivatives of the same sign,
+        # and the magnitude of the derivative decreases.
+
+        # The cubic step is computed only if the cubic tends to infinity
+        # in the direction of the step or if the minimum of the cubic
+        # is beyond stp. Otherwise the cubic step is defined to be the
+        # secant step.
+        theta = 3 * (fx - fp) / (stp - stx) + dx + dp
+        s = max(abs(theta), abs(dx), abs(dp))
+
+        # The case gamma = 0 only arises if the cubic does not tend
+        # to infinity in the direction of the step.
+        gamma = s * np.sqrt(max(0, (theta / s) ** 2 - (dx / s) * (dp / s)))
+        if stp > stx:
+            gamma = -gamma
+        p = (gamma - dp) + theta
+        q = (gamma + (dx - dp)) + gamma
+        r = p / q
+        if r < 0 and gamma != 0:
+            stpc = stp + r * (stx - stp)
+        elif stp > stx:
+            stpc = stpmax
+        else:
+            stpc = stpmin
+        stpq = stp + (dp / (dp - dx)) * (stx - stp)
+
+        if brackt:
+            # A minimizer has been bracketed. If the cubic step is
+            # closer to stp than the secant step, the cubic step is
+            # taken, otherwise the secant step is taken.
+            if abs(stpc - stp) < abs(stpq - stp):
+                stpf = stpc
+            else:
+                stpf = stpq
+
+            if stp > stx:
+                stpf = min(stp + 0.66 * (sty - stp), stpf)
+            else:
+                stpf = max(stp + 0.66 * (sty - stp), stpf)
+        else:
+            # A minimizer has not been bracketed. If the cubic step is
+            # farther from stp than the secant step, the cubic step is
+            # taken, otherwise the secant step is taken.
+            if abs(stpc - stp) > abs(stpq - stp):
+                stpf = stpc
+            else:
+                stpf = stpq
+            stpf = np.clip(stpf, stpmin, stpmax)
+
+    else:
+        # Fourth case: A lower function value, derivatives of the same sign,
+        # and the magnitude of the derivative does not decrease. If the
+        # minimum is not bracketed, the step is either stpmin or stpmax,
+        # otherwise the cubic step is taken.
+        if brackt:
+            theta = 3.0 * (fp - fy) / (sty - stp) + dy + dp
+            s = max(abs(theta), abs(dy), abs(dp))
+            gamma = s * np.sqrt((theta / s) ** 2 - (dy / s) * (dp / s))
+            if stp > sty:
+                gamma = -gamma
+            p = (gamma - dp) + theta
+            q = ((gamma - dp) + gamma) + dy
+            r = p / q
+            stpc = stp + r * (sty - stp)
+            stpf = stpc
+        elif stp > stx:
+            stpf = stpmax
+        else:
+            stpf = stpmin
+
+    # Update the interval which contains a minimizer.
+    if fp > fx:
+        sty = stp
+        fy = fp
+        dy = dp
+    else:
+        if sgnd < 0:
+            sty = stx
+            fy = fx
+            dy = dx
+        stx = stp
+        fx = fp
+        dx = dp
+
+    # Compute the new step.
+    stp = stpf
+
+    return stx, fx, dx, sty, fy, dy, stp, brackt
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py
new file mode 100644
index 0000000000000000000000000000000000000000..afbb2152c21a7837e77a6a77b3d8f1f6b0114270
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py
@@ -0,0 +1,694 @@
+import numpy as np
+import scipy.sparse as sps
+from ._numdiff import approx_derivative, group_columns
+from ._hessian_update_strategy import HessianUpdateStrategy
+from scipy.sparse.linalg import LinearOperator
+from scipy._lib._array_api import array_namespace
+from scipy._lib import array_api_extra as xpx
+
+
+FD_METHODS = ('2-point', '3-point', 'cs')
+
+
+def _wrapper_fun(fun, args=()):
+    ncalls = [0]
+
+    def wrapped(x):
+        ncalls[0] += 1
+        # Send a copy because the user may overwrite it.
+        # Overwriting results in undefined behaviour because
+        # fun(self.x) will change self.x, with the two no longer linked.
+        fx = fun(np.copy(x), *args)
+        # Make sure the function returns a true scalar
+        if not np.isscalar(fx):
+            try:
+                fx = np.asarray(fx).item()
+            except (TypeError, ValueError) as e:
+                raise ValueError(
+                    "The user-provided objective function "
+                    "must return a scalar value."
+                ) from e
+        return fx
+    return wrapped, ncalls
+
+
+def _wrapper_grad(grad, fun=None, args=(), finite_diff_options=None):
+    ncalls = [0]
+
+    if callable(grad):
+        def wrapped(x, **kwds):
+            # kwds present to give function same signature as numdiff variant
+            ncalls[0] += 1
+            return np.atleast_1d(grad(np.copy(x), *args))
+        return wrapped, ncalls
+
+    elif grad in FD_METHODS:
+        def wrapped1(x, f0=None):
+            ncalls[0] += 1
+            return approx_derivative(
+                fun, x, f0=f0, **finite_diff_options
+            )
+
+        return wrapped1, ncalls
+
+
+def _wrapper_hess(hess, grad=None, x0=None, args=(), finite_diff_options=None):
+    if callable(hess):
+        H = hess(np.copy(x0), *args)
+        ncalls = [1]
+
+        if sps.issparse(H):
+            def wrapped(x, **kwds):
+                ncalls[0] += 1
+                return sps.csr_matrix(hess(np.copy(x), *args))
+
+            H = sps.csr_matrix(H)
+
+        elif isinstance(H, LinearOperator):
+            def wrapped(x, **kwds):
+                ncalls[0] += 1
+                return hess(np.copy(x), *args)
+
+        else:  # dense
+            def wrapped(x, **kwds):
+                ncalls[0] += 1
+                return np.atleast_2d(np.asarray(hess(np.copy(x), *args)))
+
+            H = np.atleast_2d(np.asarray(H))
+
+        return wrapped, ncalls, H
+    elif hess in FD_METHODS:
+        ncalls = [0]
+
+        def wrapped1(x, f0=None):
+            return approx_derivative(
+                grad, x, f0=f0, **finite_diff_options
+            )
+
+        return wrapped1, ncalls, None
+
+
+class ScalarFunction:
+    """Scalar function and its derivatives.
+
+    This class defines a scalar function F: R^n->R and methods for
+    computing or approximating its first and second derivatives.
+
+    Parameters
+    ----------
+    fun : callable
+        evaluates the scalar function. Must be of the form ``fun(x, *args)``,
+        where ``x`` is the argument in the form of a 1-D array and ``args`` is
+        a tuple of any additional fixed parameters needed to completely specify
+        the function. Should return a scalar.
+    x0 : array-like
+        Provides an initial set of variables for evaluating fun. Array of real
+        elements of size (n,), where 'n' is the number of independent
+        variables.
+    args : tuple, optional
+        Any additional fixed parameters needed to completely specify the scalar
+        function.
+    grad : {callable, '2-point', '3-point', 'cs'}
+        Method for computing the gradient vector.
+        If it is a callable, it should be a function that returns the gradient
+        vector:
+
+            ``grad(x, *args) -> array_like, shape (n,)``
+
+        where ``x`` is an array with shape (n,) and ``args`` is a tuple with
+        the fixed parameters.
+        Alternatively, the keywords  {'2-point', '3-point', 'cs'} can be used
+        to select a finite difference scheme for numerical estimation of the
+        gradient with a relative step size. These finite difference schemes
+        obey any specified `bounds`.
+    hess : {callable, '2-point', '3-point', 'cs', HessianUpdateStrategy}
+        Method for computing the Hessian matrix. If it is callable, it should
+        return the  Hessian matrix:
+
+            ``hess(x, *args) -> {LinearOperator, spmatrix, array}, (n, n)``
+
+        where x is a (n,) ndarray and `args` is a tuple with the fixed
+        parameters. Alternatively, the keywords {'2-point', '3-point', 'cs'}
+        select a finite difference scheme for numerical estimation. Or, objects
+        implementing `HessianUpdateStrategy` interface can be used to
+        approximate the Hessian.
+        Whenever the gradient is estimated via finite-differences, the Hessian
+        cannot be estimated with options {'2-point', '3-point', 'cs'} and needs
+        to be estimated using one of the quasi-Newton strategies.
+    finite_diff_rel_step : None or array_like
+        Relative step size to use. The absolute step size is computed as
+        ``h = finite_diff_rel_step * sign(x0) * max(1, abs(x0))``, possibly
+        adjusted to fit into the bounds. For ``method='3-point'`` the sign
+        of `h` is ignored. If None then finite_diff_rel_step is selected
+        automatically,
+    finite_diff_bounds : tuple of array_like
+        Lower and upper bounds on independent variables. Defaults to no bounds,
+        (-np.inf, np.inf). Each bound must match the size of `x0` or be a
+        scalar, in the latter case the bound will be the same for all
+        variables. Use it to limit the range of function evaluation.
+    epsilon : None or array_like, optional
+        Absolute step size to use, possibly adjusted to fit into the bounds.
+        For ``method='3-point'`` the sign of `epsilon` is ignored. By default
+        relative steps are used, only if ``epsilon is not None`` are absolute
+        steps used.
+
+    Notes
+    -----
+    This class implements a memoization logic. There are methods `fun`,
+    `grad`, hess` and corresponding attributes `f`, `g` and `H`. The following
+    things should be considered:
+
+        1. Use only public methods `fun`, `grad` and `hess`.
+        2. After one of the methods is called, the corresponding attribute
+           will be set. However, a subsequent call with a different argument
+           of *any* of the methods may overwrite the attribute.
+    """
+    def __init__(self, fun, x0, args, grad, hess, finite_diff_rel_step,
+                 finite_diff_bounds, epsilon=None):
+        if not callable(grad) and grad not in FD_METHODS:
+            raise ValueError(
+                f"`grad` must be either callable or one of {FD_METHODS}."
+            )
+
+        if not (callable(hess) or hess in FD_METHODS
+                or isinstance(hess, HessianUpdateStrategy)):
+            raise ValueError(
+                f"`hess` must be either callable, HessianUpdateStrategy"
+                f" or one of {FD_METHODS}."
+            )
+
+        if grad in FD_METHODS and hess in FD_METHODS:
+            raise ValueError("Whenever the gradient is estimated via "
+                             "finite-differences, we require the Hessian "
+                             "to be estimated using one of the "
+                             "quasi-Newton strategies.")
+
+        self.xp = xp = array_namespace(x0)
+        _x = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+        _dtype = xp.float64
+        if xp.isdtype(_x.dtype, "real floating"):
+            _dtype = _x.dtype
+
+        # original arguments
+        self._wrapped_fun, self._nfev = _wrapper_fun(fun, args=args)
+        self._orig_fun = fun
+        self._orig_grad = grad
+        self._orig_hess = hess
+        self._args = args
+
+        # promotes to floating
+        self.x = xp.astype(_x, _dtype)
+        self.x_dtype = _dtype
+        self.n = self.x.size
+        self.f_updated = False
+        self.g_updated = False
+        self.H_updated = False
+
+        self._lowest_x = None
+        self._lowest_f = np.inf
+
+        finite_diff_options = {}
+        if grad in FD_METHODS:
+            finite_diff_options["method"] = grad
+            finite_diff_options["rel_step"] = finite_diff_rel_step
+            finite_diff_options["abs_step"] = epsilon
+            finite_diff_options["bounds"] = finite_diff_bounds
+        if hess in FD_METHODS:
+            finite_diff_options["method"] = hess
+            finite_diff_options["rel_step"] = finite_diff_rel_step
+            finite_diff_options["abs_step"] = epsilon
+            finite_diff_options["as_linear_operator"] = True
+
+        # Initial function evaluation
+        self._update_fun()
+
+        # Initial gradient evaluation
+        self._wrapped_grad, self._ngev = _wrapper_grad(
+            grad,
+            fun=self._wrapped_fun,
+            args=args,
+            finite_diff_options=finite_diff_options
+        )
+        self._update_grad()
+
+        # Hessian evaluation
+        if callable(hess):
+            self._wrapped_hess, self._nhev, self.H = _wrapper_hess(
+                hess, x0=x0, args=args
+            )
+            self.H_updated = True
+        elif hess in FD_METHODS:
+            self._wrapped_hess, self._nhev, self.H = _wrapper_hess(
+                hess,
+                grad=self._wrapped_grad,
+                x0=x0,
+                finite_diff_options=finite_diff_options
+            )
+            self._update_grad()
+            self.H = self._wrapped_hess(self.x, f0=self.g)
+            self.H_updated = True
+        elif isinstance(hess, HessianUpdateStrategy):
+            self.H = hess
+            self.H.initialize(self.n, 'hess')
+            self.H_updated = True
+            self.x_prev = None
+            self.g_prev = None
+            self._nhev = [0]
+
+    @property
+    def nfev(self):
+        return self._nfev[0]
+
+    @property
+    def ngev(self):
+        return self._ngev[0]
+
+    @property
+    def nhev(self):
+        return self._nhev[0]
+
+    def _update_x(self, x):
+        if isinstance(self._orig_hess, HessianUpdateStrategy):
+            self._update_grad()
+            self.x_prev = self.x
+            self.g_prev = self.g
+            # ensure that self.x is a copy of x. Don't store a reference
+            # otherwise the memoization doesn't work properly.
+
+            _x = xpx.atleast_nd(self.xp.asarray(x), ndim=1, xp=self.xp)
+            self.x = self.xp.astype(_x, self.x_dtype)
+            self.f_updated = False
+            self.g_updated = False
+            self.H_updated = False
+            self._update_hess()
+        else:
+            # ensure that self.x is a copy of x. Don't store a reference
+            # otherwise the memoization doesn't work properly.
+            _x = xpx.atleast_nd(self.xp.asarray(x), ndim=1, xp=self.xp)
+            self.x = self.xp.astype(_x, self.x_dtype)
+            self.f_updated = False
+            self.g_updated = False
+            self.H_updated = False
+
+    def _update_fun(self):
+        if not self.f_updated:
+            fx = self._wrapped_fun(self.x)
+            if fx < self._lowest_f:
+                self._lowest_x = self.x
+                self._lowest_f = fx
+
+            self.f = fx
+            self.f_updated = True
+
+    def _update_grad(self):
+        if not self.g_updated:
+            if self._orig_grad in FD_METHODS:
+                self._update_fun()
+            self.g = self._wrapped_grad(self.x, f0=self.f)
+            self.g_updated = True
+
+    def _update_hess(self):
+        if not self.H_updated:
+            if self._orig_hess in FD_METHODS:
+                self._update_grad()
+                self.H = self._wrapped_hess(self.x, f0=self.g)
+            elif isinstance(self._orig_hess, HessianUpdateStrategy):
+                self._update_grad()
+                self.H.update(self.x - self.x_prev, self.g - self.g_prev)
+            else:       # should be callable(hess)
+                self.H = self._wrapped_hess(self.x)
+
+            self.H_updated = True
+
+    def fun(self, x):
+        if not np.array_equal(x, self.x):
+            self._update_x(x)
+        self._update_fun()
+        return self.f
+
+    def grad(self, x):
+        if not np.array_equal(x, self.x):
+            self._update_x(x)
+        self._update_grad()
+        return self.g
+
+    def hess(self, x):
+        if not np.array_equal(x, self.x):
+            self._update_x(x)
+        self._update_hess()
+        return self.H
+
+    def fun_and_grad(self, x):
+        if not np.array_equal(x, self.x):
+            self._update_x(x)
+        self._update_fun()
+        self._update_grad()
+        return self.f, self.g
+
+
+class VectorFunction:
+    """Vector function and its derivatives.
+
+    This class defines a vector function F: R^n->R^m and methods for
+    computing or approximating its first and second derivatives.
+
+    Notes
+    -----
+    This class implements a memoization logic. There are methods `fun`,
+    `jac`, hess` and corresponding attributes `f`, `J` and `H`. The following
+    things should be considered:
+
+        1. Use only public methods `fun`, `jac` and `hess`.
+        2. After one of the methods is called, the corresponding attribute
+           will be set. However, a subsequent call with a different argument
+           of *any* of the methods may overwrite the attribute.
+    """
+    def __init__(self, fun, x0, jac, hess,
+                 finite_diff_rel_step, finite_diff_jac_sparsity,
+                 finite_diff_bounds, sparse_jacobian):
+        if not callable(jac) and jac not in FD_METHODS:
+            raise ValueError(f"`jac` must be either callable or one of {FD_METHODS}.")
+
+        if not (callable(hess) or hess in FD_METHODS
+                or isinstance(hess, HessianUpdateStrategy)):
+            raise ValueError("`hess` must be either callable,"
+                             f"HessianUpdateStrategy or one of {FD_METHODS}.")
+
+        if jac in FD_METHODS and hess in FD_METHODS:
+            raise ValueError("Whenever the Jacobian is estimated via "
+                             "finite-differences, we require the Hessian to "
+                             "be estimated using one of the quasi-Newton "
+                             "strategies.")
+
+        self.xp = xp = array_namespace(x0)
+        _x = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+        _dtype = xp.float64
+        if xp.isdtype(_x.dtype, "real floating"):
+            _dtype = _x.dtype
+
+        # promotes to floating
+        self.x = xp.astype(_x, _dtype)
+        self.x_dtype = _dtype
+
+        self.n = self.x.size
+        self.nfev = 0
+        self.njev = 0
+        self.nhev = 0
+        self.f_updated = False
+        self.J_updated = False
+        self.H_updated = False
+
+        finite_diff_options = {}
+        if jac in FD_METHODS:
+            finite_diff_options["method"] = jac
+            finite_diff_options["rel_step"] = finite_diff_rel_step
+            if finite_diff_jac_sparsity is not None:
+                sparsity_groups = group_columns(finite_diff_jac_sparsity)
+                finite_diff_options["sparsity"] = (finite_diff_jac_sparsity,
+                                                   sparsity_groups)
+            finite_diff_options["bounds"] = finite_diff_bounds
+            self.x_diff = np.copy(self.x)
+        if hess in FD_METHODS:
+            finite_diff_options["method"] = hess
+            finite_diff_options["rel_step"] = finite_diff_rel_step
+            finite_diff_options["as_linear_operator"] = True
+            self.x_diff = np.copy(self.x)
+        if jac in FD_METHODS and hess in FD_METHODS:
+            raise ValueError("Whenever the Jacobian is estimated via "
+                             "finite-differences, we require the Hessian to "
+                             "be estimated using one of the quasi-Newton "
+                             "strategies.")
+
+        # Function evaluation
+        def fun_wrapped(x):
+            self.nfev += 1
+            return np.atleast_1d(fun(x))
+
+        def update_fun():
+            self.f = fun_wrapped(self.x)
+
+        self._update_fun_impl = update_fun
+        update_fun()
+
+        self.v = np.zeros_like(self.f)
+        self.m = self.v.size
+
+        # Jacobian Evaluation
+        if callable(jac):
+            self.J = jac(self.x)
+            self.J_updated = True
+            self.njev += 1
+
+            if (sparse_jacobian or
+                    sparse_jacobian is None and sps.issparse(self.J)):
+                def jac_wrapped(x):
+                    self.njev += 1
+                    return sps.csr_matrix(jac(x))
+                self.J = sps.csr_matrix(self.J)
+                self.sparse_jacobian = True
+
+            elif sps.issparse(self.J):
+                def jac_wrapped(x):
+                    self.njev += 1
+                    return jac(x).toarray()
+                self.J = self.J.toarray()
+                self.sparse_jacobian = False
+
+            else:
+                def jac_wrapped(x):
+                    self.njev += 1
+                    return np.atleast_2d(jac(x))
+                self.J = np.atleast_2d(self.J)
+                self.sparse_jacobian = False
+
+            def update_jac():
+                self.J = jac_wrapped(self.x)
+
+        elif jac in FD_METHODS:
+            self.J = approx_derivative(fun_wrapped, self.x, f0=self.f,
+                                       **finite_diff_options)
+            self.J_updated = True
+
+            if (sparse_jacobian or
+                    sparse_jacobian is None and sps.issparse(self.J)):
+                def update_jac():
+                    self._update_fun()
+                    self.J = sps.csr_matrix(
+                        approx_derivative(fun_wrapped, self.x, f0=self.f,
+                                          **finite_diff_options))
+                self.J = sps.csr_matrix(self.J)
+                self.sparse_jacobian = True
+
+            elif sps.issparse(self.J):
+                def update_jac():
+                    self._update_fun()
+                    self.J = approx_derivative(fun_wrapped, self.x, f0=self.f,
+                                               **finite_diff_options).toarray()
+                self.J = self.J.toarray()
+                self.sparse_jacobian = False
+
+            else:
+                def update_jac():
+                    self._update_fun()
+                    self.J = np.atleast_2d(
+                        approx_derivative(fun_wrapped, self.x, f0=self.f,
+                                          **finite_diff_options))
+                self.J = np.atleast_2d(self.J)
+                self.sparse_jacobian = False
+
+        self._update_jac_impl = update_jac
+
+        # Define Hessian
+        if callable(hess):
+            self.H = hess(self.x, self.v)
+            self.H_updated = True
+            self.nhev += 1
+
+            if sps.issparse(self.H):
+                def hess_wrapped(x, v):
+                    self.nhev += 1
+                    return sps.csr_matrix(hess(x, v))
+                self.H = sps.csr_matrix(self.H)
+
+            elif isinstance(self.H, LinearOperator):
+                def hess_wrapped(x, v):
+                    self.nhev += 1
+                    return hess(x, v)
+
+            else:
+                def hess_wrapped(x, v):
+                    self.nhev += 1
+                    return np.atleast_2d(np.asarray(hess(x, v)))
+                self.H = np.atleast_2d(np.asarray(self.H))
+
+            def update_hess():
+                self.H = hess_wrapped(self.x, self.v)
+        elif hess in FD_METHODS:
+            def jac_dot_v(x, v):
+                return jac_wrapped(x).T.dot(v)
+
+            def update_hess():
+                self._update_jac()
+                self.H = approx_derivative(jac_dot_v, self.x,
+                                           f0=self.J.T.dot(self.v),
+                                           args=(self.v,),
+                                           **finite_diff_options)
+            update_hess()
+            self.H_updated = True
+        elif isinstance(hess, HessianUpdateStrategy):
+            self.H = hess
+            self.H.initialize(self.n, 'hess')
+            self.H_updated = True
+            self.x_prev = None
+            self.J_prev = None
+
+            def update_hess():
+                self._update_jac()
+                # When v is updated before x was updated, then x_prev and
+                # J_prev are None and we need this check.
+                if self.x_prev is not None and self.J_prev is not None:
+                    delta_x = self.x - self.x_prev
+                    delta_g = self.J.T.dot(self.v) - self.J_prev.T.dot(self.v)
+                    self.H.update(delta_x, delta_g)
+
+        self._update_hess_impl = update_hess
+
+        if isinstance(hess, HessianUpdateStrategy):
+            def update_x(x):
+                self._update_jac()
+                self.x_prev = self.x
+                self.J_prev = self.J
+                _x = xpx.atleast_nd(self.xp.asarray(x), ndim=1, xp=self.xp)
+                self.x = self.xp.astype(_x, self.x_dtype)
+                self.f_updated = False
+                self.J_updated = False
+                self.H_updated = False
+                self._update_hess()
+        else:
+            def update_x(x):
+                _x = xpx.atleast_nd(self.xp.asarray(x), ndim=1, xp=self.xp)
+                self.x = self.xp.astype(_x, self.x_dtype)
+                self.f_updated = False
+                self.J_updated = False
+                self.H_updated = False
+
+        self._update_x_impl = update_x
+
+    def _update_v(self, v):
+        if not np.array_equal(v, self.v):
+            self.v = v
+            self.H_updated = False
+
+    def _update_x(self, x):
+        if not np.array_equal(x, self.x):
+            self._update_x_impl(x)
+
+    def _update_fun(self):
+        if not self.f_updated:
+            self._update_fun_impl()
+            self.f_updated = True
+
+    def _update_jac(self):
+        if not self.J_updated:
+            self._update_jac_impl()
+            self.J_updated = True
+
+    def _update_hess(self):
+        if not self.H_updated:
+            self._update_hess_impl()
+            self.H_updated = True
+
+    def fun(self, x):
+        self._update_x(x)
+        self._update_fun()
+        return self.f
+
+    def jac(self, x):
+        self._update_x(x)
+        self._update_jac()
+        return self.J
+
+    def hess(self, x, v):
+        # v should be updated before x.
+        self._update_v(v)
+        self._update_x(x)
+        self._update_hess()
+        return self.H
+
+
+class LinearVectorFunction:
+    """Linear vector function and its derivatives.
+
+    Defines a linear function F = A x, where x is N-D vector and
+    A is m-by-n matrix. The Jacobian is constant and equals to A. The Hessian
+    is identically zero and it is returned as a csr matrix.
+    """
+    def __init__(self, A, x0, sparse_jacobian):
+        if sparse_jacobian or sparse_jacobian is None and sps.issparse(A):
+            self.J = sps.csr_matrix(A)
+            self.sparse_jacobian = True
+        elif sps.issparse(A):
+            self.J = A.toarray()
+            self.sparse_jacobian = False
+        else:
+            # np.asarray makes sure A is ndarray and not matrix
+            self.J = np.atleast_2d(np.asarray(A))
+            self.sparse_jacobian = False
+
+        self.m, self.n = self.J.shape
+
+        self.xp = xp = array_namespace(x0)
+        _x = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+        _dtype = xp.float64
+        if xp.isdtype(_x.dtype, "real floating"):
+            _dtype = _x.dtype
+
+        # promotes to floating
+        self.x = xp.astype(_x, _dtype)
+        self.x_dtype = _dtype
+
+        self.f = self.J.dot(self.x)
+        self.f_updated = True
+
+        self.v = np.zeros(self.m, dtype=float)
+        self.H = sps.csr_matrix((self.n, self.n))
+
+    def _update_x(self, x):
+        if not np.array_equal(x, self.x):
+            _x = xpx.atleast_nd(self.xp.asarray(x), ndim=1, xp=self.xp)
+            self.x = self.xp.astype(_x, self.x_dtype)
+            self.f_updated = False
+
+    def fun(self, x):
+        self._update_x(x)
+        if not self.f_updated:
+            self.f = self.J.dot(x)
+            self.f_updated = True
+        return self.f
+
+    def jac(self, x):
+        self._update_x(x)
+        return self.J
+
+    def hess(self, x, v):
+        self._update_x(x)
+        self.v = v
+        return self.H
+
+
+class IdentityVectorFunction(LinearVectorFunction):
+    """Identity vector function and its derivatives.
+
+    The Jacobian is the identity matrix, returned as a dense array when
+    `sparse_jacobian=False` and as a csr matrix otherwise. The Hessian is
+    identically zero and it is returned as a csr matrix.
+    """
+    def __init__(self, x0, sparse_jacobian):
+        n = len(x0)
+        if sparse_jacobian or sparse_jacobian is None:
+            A = sps.eye(n, format='csr')
+            sparse_jacobian = True
+        else:
+            A = np.eye(n)
+            sparse_jacobian = False
+        super().__init__(A, x0, sparse_jacobian)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentialevolution.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentialevolution.py
new file mode 100644
index 0000000000000000000000000000000000000000..70097b7aea61d3eec9f9dabadd4820e7576b44ce
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_differentialevolution.py
@@ -0,0 +1,1969 @@
+"""
+differential_evolution: The differential evolution global optimization algorithm
+Added by Andrew Nelson 2014
+"""
+import warnings
+
+import numpy as np
+from scipy.optimize import OptimizeResult, minimize
+from scipy.optimize._optimize import _status_message, _wrap_callback
+from scipy._lib._util import (check_random_state, MapWrapper, _FunctionWrapper,
+                              rng_integers, _transition_to_rng)
+
+from scipy.optimize._constraints import (Bounds, new_bounds_to_old,
+                                         NonlinearConstraint, LinearConstraint)
+from scipy.sparse import issparse
+
+__all__ = ['differential_evolution']
+
+
+_MACHEPS = np.finfo(np.float64).eps
+
+
+@_transition_to_rng("seed", position_num=9)
+def differential_evolution(func, bounds, args=(), strategy='best1bin',
+                           maxiter=1000, popsize=15, tol=0.01,
+                           mutation=(0.5, 1), recombination=0.7, rng=None,
+                           callback=None, disp=False, polish=True,
+                           init='latinhypercube', atol=0, updating='immediate',
+                           workers=1, constraints=(), x0=None, *,
+                           integrality=None, vectorized=False):
+    r"""Finds the global minimum of a multivariate function.
+
+    The differential evolution method [1]_ is stochastic in nature. It does
+    not use gradient methods to find the minimum, and can search large areas
+    of candidate space, but often requires larger numbers of function
+    evaluations than conventional gradient-based techniques.
+
+    The algorithm is due to Storn and Price [2]_.
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized. Must be in the form
+        ``f(x, *args)``, where ``x`` is the argument in the form of a 1-D array
+        and ``args`` is a tuple of any additional fixed parameters needed to
+        completely specify the function. The number of parameters, N, is equal
+        to ``len(x)``.
+    bounds : sequence or `Bounds`
+        Bounds for variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. ``(min, max)`` pairs for each element in ``x``, defining the
+           finite lower and upper bounds for the optimizing argument of
+           `func`.
+
+        The total number of bounds is used to determine the number of
+        parameters, N. If there are parameters whose bounds are equal the total
+        number of free parameters is ``N - N_equal``.
+
+    args : tuple, optional
+        Any additional fixed parameters needed to
+        completely specify the objective function.
+    strategy : {str, callable}, optional
+        The differential evolution strategy to use. Should be one of:
+
+        - 'best1bin'
+        - 'best1exp'
+        - 'rand1bin'
+        - 'rand1exp'
+        - 'rand2bin'
+        - 'rand2exp'
+        - 'randtobest1bin'
+        - 'randtobest1exp'
+        - 'currenttobest1bin'
+        - 'currenttobest1exp'
+        - 'best2exp'
+        - 'best2bin'
+
+        The default is 'best1bin'. Strategies that may be implemented are
+        outlined in 'Notes'.
+        Alternatively the differential evolution strategy can be customized by
+        providing a callable that constructs a trial vector. The callable must
+        have the form ``strategy(candidate: int, population: np.ndarray, rng=None)``,
+        where ``candidate`` is an integer specifying which entry of the
+        population is being evolved, ``population`` is an array of shape
+        ``(S, N)`` containing all the population members (where S is the
+        total population size), and ``rng`` is the random number generator
+        being used within the solver.
+        ``candidate`` will be in the range ``[0, S)``.
+        ``strategy`` must return a trial vector with shape ``(N,)``. The
+        fitness of this trial vector is compared against the fitness of
+        ``population[candidate]``.
+
+        .. versionchanged:: 1.12.0
+            Customization of evolution strategy via a callable.
+
+    maxiter : int, optional
+        The maximum number of generations over which the entire population is
+        evolved. The maximum number of function evaluations (with no polishing)
+        is: ``(maxiter + 1) * popsize * (N - N_equal)``
+    popsize : int, optional
+        A multiplier for setting the total population size. The population has
+        ``popsize * (N - N_equal)`` individuals. This keyword is overridden if
+        an initial population is supplied via the `init` keyword. When using
+        ``init='sobol'`` the population size is calculated as the next power
+        of 2 after ``popsize * (N - N_equal)``.
+    tol : float, optional
+        Relative tolerance for convergence, the solving stops when
+        ``np.std(population_energies) <= atol + tol * np.abs(np.mean(population_energies))``,
+        where and `atol` and `tol` are the absolute and relative tolerance
+        respectively.
+    mutation : float or tuple(float, float), optional
+        The mutation constant. In the literature this is also known as
+        differential weight, being denoted by :math:`F`.
+        If specified as a float it should be in the range [0, 2).
+        If specified as a tuple ``(min, max)`` dithering is employed. Dithering
+        randomly changes the mutation constant on a generation by generation
+        basis. The mutation constant for that generation is taken from
+        ``U[min, max)``. Dithering can help speed convergence significantly.
+        Increasing the mutation constant increases the search radius, but will
+        slow down convergence.
+    recombination : float, optional
+        The recombination constant, should be in the range [0, 1]. In the
+        literature this is also known as the crossover probability, being
+        denoted by CR. Increasing this value allows a larger number of mutants
+        to progress into the next generation, but at the risk of population
+        stability.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    disp : bool, optional
+        Prints the evaluated `func` at every iteration.
+    callback : callable, optional
+        A callable called after each iteration. Has the signature::
+
+            callback(intermediate_result: OptimizeResult)
+
+        where ``intermediate_result`` is a keyword parameter containing an
+        `OptimizeResult` with attributes ``x`` and ``fun``, the best solution
+        found so far and the objective function. Note that the name
+        of the parameter must be ``intermediate_result`` for the callback
+        to be passed an `OptimizeResult`.
+
+        The callback also supports a signature like::
+
+            callback(x, convergence: float=val)
+
+        ``val`` represents the fractional value of the population convergence.
+        When ``val`` is greater than ``1.0``, the function halts.
+
+        Introspection is used to determine which of the signatures is invoked.
+
+        Global minimization will halt if the callback raises ``StopIteration``
+        or returns ``True``; any polishing is still carried out.
+
+        .. versionchanged:: 1.12.0
+            callback accepts the ``intermediate_result`` keyword.
+
+    polish : bool, optional
+        If True (default), then `scipy.optimize.minimize` with the `L-BFGS-B`
+        method is used to polish the best population member at the end, which
+        can improve the minimization slightly. If a constrained problem is
+        being studied then the `trust-constr` method is used instead. For large
+        problems with many constraints, polishing can take a long time due to
+        the Jacobian computations.
+
+        .. versionchanged:: 1.15.0
+            If `workers` is specified then the map-like callable that wraps
+            `func` is supplied to `minimize` instead of it using `func`
+            directly. This allows the caller to control how and where the
+            invocations actually run.
+
+    init : str or array-like, optional
+        Specify which type of population initialization is performed. Should be
+        one of:
+
+        - 'latinhypercube'
+        - 'sobol'
+        - 'halton'
+        - 'random'
+        - array specifying the initial population. The array should have
+          shape ``(S, N)``, where S is the total population size and N is
+          the number of parameters.
+
+        `init` is clipped to `bounds` before use.
+
+        The default is 'latinhypercube'. Latin Hypercube sampling tries to
+        maximize coverage of the available parameter space.
+
+        'sobol' and 'halton' are superior alternatives and maximize even more
+        the parameter space. 'sobol' will enforce an initial population
+        size which is calculated as the next power of 2 after
+        ``popsize * (N - N_equal)``. 'halton' has no requirements but is a bit
+        less efficient. See `scipy.stats.qmc` for more details.
+
+        'random' initializes the population randomly - this has the drawback
+        that clustering can occur, preventing the whole of parameter space
+        being covered. Use of an array to specify a population could be used,
+        for example, to create a tight bunch of initial guesses in an location
+        where the solution is known to exist, thereby reducing time for
+        convergence.
+    atol : float, optional
+        Absolute tolerance for convergence, the solving stops when
+        ``np.std(pop) <= atol + tol * np.abs(np.mean(population_energies))``,
+        where and `atol` and `tol` are the absolute and relative tolerance
+        respectively.
+    updating : {'immediate', 'deferred'}, optional
+        If ``'immediate'``, the best solution vector is continuously updated
+        within a single generation [4]_. This can lead to faster convergence as
+        trial vectors can take advantage of continuous improvements in the best
+        solution.
+        With ``'deferred'``, the best solution vector is updated once per
+        generation. Only ``'deferred'`` is compatible with parallelization or
+        vectorization, and the `workers` and `vectorized` keywords can
+        over-ride this option.
+
+        .. versionadded:: 1.2.0
+
+    workers : int or map-like callable, optional
+        If `workers` is an int the population is subdivided into `workers`
+        sections and evaluated in parallel
+        (uses `multiprocessing.Pool `).
+        Supply -1 to use all available CPU cores.
+        Alternatively supply a map-like callable, such as
+        `multiprocessing.Pool.map` for evaluating the population in parallel.
+        This evaluation is carried out as ``workers(func, iterable)``.
+        This option will override the `updating` keyword to
+        ``updating='deferred'`` if ``workers != 1``.
+        This option overrides the `vectorized` keyword if ``workers != 1``.
+        Requires that `func` be pickleable.
+
+        .. versionadded:: 1.2.0
+
+    constraints : {NonLinearConstraint, LinearConstraint, Bounds}
+        Constraints on the solver, over and above those applied by the `bounds`
+        kwd. Uses the approach by Lampinen [5]_.
+
+        .. versionadded:: 1.4.0
+
+    x0 : None or array-like, optional
+        Provides an initial guess to the minimization. Once the population has
+        been initialized this vector replaces the first (best) member. This
+        replacement is done even if `init` is given an initial population.
+        ``x0.shape == (N,)``.
+
+        .. versionadded:: 1.7.0
+
+    integrality : 1-D array, optional
+        For each decision variable, a boolean value indicating whether the
+        decision variable is constrained to integer values. The array is
+        broadcast to ``(N,)``.
+        If any decision variables are constrained to be integral, they will not
+        be changed during polishing.
+        Only integer values lying between the lower and upper bounds are used.
+        If there are no integer values lying between the bounds then a
+        `ValueError` is raised.
+
+        .. versionadded:: 1.9.0
+
+    vectorized : bool, optional
+        If ``vectorized is True``, `func` is sent an `x` array with
+        ``x.shape == (N, S)``, and is expected to return an array of shape
+        ``(S,)``, where `S` is the number of solution vectors to be calculated.
+        If constraints are applied, each of the functions used to construct
+        a `Constraint` object should accept an `x` array with
+        ``x.shape == (N, S)``, and return an array of shape ``(M, S)``, where
+        `M` is the number of constraint components.
+        This option is an alternative to the parallelization offered by
+        `workers`, and may help in optimization speed by reducing interpreter
+        overhead from multiple function calls. This keyword is ignored if
+        ``workers != 1``.
+        This option will override the `updating` keyword to
+        ``updating='deferred'``.
+        See the notes section for further discussion on when to use
+        ``'vectorized'``, and when to use ``'workers'``.
+
+        .. versionadded:: 1.9.0
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a `OptimizeResult` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the optimizer exited successfully,
+        ``message`` which describes the cause of the termination,
+        ``population`` the solution vectors present in the population, and
+        ``population_energies`` the value of the objective function for each
+        entry in ``population``.
+        See `OptimizeResult` for a description of other attributes. If `polish`
+        was employed, and a lower minimum was obtained by the polishing, then
+        OptimizeResult also contains the ``jac`` attribute.
+        If the eventual solution does not satisfy the applied constraints
+        ``success`` will be `False`.
+
+    Notes
+    -----
+    Differential evolution is a stochastic population based method that is
+    useful for global optimization problems. At each pass through the
+    population the algorithm mutates each candidate solution by mixing with
+    other candidate solutions to create a trial candidate. There are several
+    strategies [3]_ for creating trial candidates, which suit some problems
+    more than others. The 'best1bin' strategy is a good starting point for
+    many systems. In this strategy two members of the population are randomly
+    chosen. Their difference is used to mutate the best member (the 'best' in
+    'best1bin'), :math:`x_0`, so far:
+
+    .. math::
+
+        b' = x_0 + F \cdot (x_{r_0} - x_{r_1})
+
+    where :math:`F` is the `mutation` parameter.
+    A trial vector is then constructed. Starting with a randomly chosen ith
+    parameter the trial is sequentially filled (in modulo) with parameters
+    from ``b'`` or the original candidate. The choice of whether to use ``b'``
+    or the original candidate is made with a binomial distribution (the 'bin'
+    in 'best1bin') - a random number in [0, 1) is generated. If this number is
+    less than the `recombination` constant then the parameter is loaded from
+    ``b'``, otherwise it is loaded from the original candidate. The final
+    parameter is always loaded from ``b'``. Once the trial candidate is built
+    its fitness is assessed. If the trial is better than the original candidate
+    then it takes its place. If it is also better than the best overall
+    candidate it also replaces that.
+
+    The other strategies available are outlined in Qiang and
+    Mitchell (2014) [3]_.
+
+
+    - ``rand1`` : :math:`b' = x_{r_0} + F \cdot (x_{r_1} - x_{r_2})`
+    - ``rand2`` : :math:`b' = x_{r_0} + F \cdot (x_{r_1} + x_{r_2} - x_{r_3} - x_{r_4})`
+    - ``best1`` : :math:`b' = x_0 + F \cdot (x_{r_0} - x_{r_1})`
+    - ``best2`` : :math:`b' = x_0 + F \cdot (x_{r_0} + x_{r_1} - x_{r_2} - x_{r_3})`
+    - ``currenttobest1`` : :math:`b' = x_i + F \cdot (x_0 - x_i + x_{r_0} - x_{r_1})`
+    - ``randtobest1`` : :math:`b' = x_{r_0} + F \cdot (x_0 - x_{r_0} + x_{r_1} - x_{r_2})`
+
+    where the integers :math:`r_0, r_1, r_2, r_3, r_4` are chosen randomly
+    from the interval [0, NP) with `NP` being the total population size and
+    the original candidate having index `i`. The user can fully customize the
+    generation of the trial candidates by supplying a callable to ``strategy``.
+
+    To improve your chances of finding a global minimum use higher `popsize`
+    values, with higher `mutation` and (dithering), but lower `recombination`
+    values. This has the effect of widening the search radius, but slowing
+    convergence.
+
+    By default the best solution vector is updated continuously within a single
+    iteration (``updating='immediate'``). This is a modification [4]_ of the
+    original differential evolution algorithm which can lead to faster
+    convergence as trial vectors can immediately benefit from improved
+    solutions. To use the original Storn and Price behaviour, updating the best
+    solution once per iteration, set ``updating='deferred'``.
+    The ``'deferred'`` approach is compatible with both parallelization and
+    vectorization (``'workers'`` and ``'vectorized'`` keywords). These may
+    improve minimization speed by using computer resources more efficiently.
+    The ``'workers'`` distribute calculations over multiple processors. By
+    default the Python `multiprocessing` module is used, but other approaches
+    are also possible, such as the Message Passing Interface (MPI) used on
+    clusters [6]_ [7]_. The overhead from these approaches (creating new
+    Processes, etc) may be significant, meaning that computational speed
+    doesn't necessarily scale with the number of processors used.
+    Parallelization is best suited to computationally expensive objective
+    functions. If the objective function is less expensive, then
+    ``'vectorized'`` may aid by only calling the objective function once per
+    iteration, rather than multiple times for all the population members; the
+    interpreter overhead is reduced.
+
+    .. versionadded:: 0.15.0
+
+    References
+    ----------
+    .. [1] Differential evolution, Wikipedia,
+           http://en.wikipedia.org/wiki/Differential_evolution
+    .. [2] Storn, R and Price, K, Differential Evolution - a Simple and
+           Efficient Heuristic for Global Optimization over Continuous Spaces,
+           Journal of Global Optimization, 1997, 11, 341 - 359.
+    .. [3] Qiang, J., Mitchell, C., A Unified Differential Evolution Algorithm
+            for Global Optimization, 2014, https://www.osti.gov/servlets/purl/1163659
+    .. [4] Wormington, M., Panaccione, C., Matney, K. M., Bowen, D. K., -
+           Characterization of structures from X-ray scattering data using
+           genetic algorithms, Phil. Trans. R. Soc. Lond. A, 1999, 357,
+           2827-2848
+    .. [5] Lampinen, J., A constraint handling approach for the differential
+           evolution algorithm. Proceedings of the 2002 Congress on
+           Evolutionary Computation. CEC'02 (Cat. No. 02TH8600). Vol. 2. IEEE,
+           2002.
+    .. [6] https://mpi4py.readthedocs.io/en/stable/
+    .. [7] https://schwimmbad.readthedocs.io/en/latest/
+ 
+
+    Examples
+    --------
+    Let us consider the problem of minimizing the Rosenbrock function. This
+    function is implemented in `rosen` in `scipy.optimize`.
+
+    >>> import numpy as np
+    >>> from scipy.optimize import rosen, differential_evolution
+    >>> bounds = [(0,2), (0, 2), (0, 2), (0, 2), (0, 2)]
+    >>> result = differential_evolution(rosen, bounds)
+    >>> result.x, result.fun
+    (array([1., 1., 1., 1., 1.]), 1.9216496320061384e-19)
+
+    Now repeat, but with parallelization.
+
+    >>> result = differential_evolution(rosen, bounds, updating='deferred',
+    ...                                 workers=2)
+    >>> result.x, result.fun
+    (array([1., 1., 1., 1., 1.]), 1.9216496320061384e-19)
+
+    Let's do a constrained minimization.
+
+    >>> from scipy.optimize import LinearConstraint, Bounds
+
+    We add the constraint that the sum of ``x[0]`` and ``x[1]`` must be less
+    than or equal to 1.9.  This is a linear constraint, which may be written
+    ``A @ x <= 1.9``, where ``A = array([[1, 1]])``.  This can be encoded as
+    a `LinearConstraint` instance:
+
+    >>> lc = LinearConstraint([[1, 1]], -np.inf, 1.9)
+
+    Specify limits using a `Bounds` object.
+
+    >>> bounds = Bounds([0., 0.], [2., 2.])
+    >>> result = differential_evolution(rosen, bounds, constraints=lc,
+    ...                                 rng=1)
+    >>> result.x, result.fun
+    (array([0.96632622, 0.93367155]), 0.0011352416852625719)
+
+    Next find the minimum of the Ackley function
+    (https://en.wikipedia.org/wiki/Test_functions_for_optimization).
+
+    >>> def ackley(x):
+    ...     arg1 = -0.2 * np.sqrt(0.5 * (x[0] ** 2 + x[1] ** 2))
+    ...     arg2 = 0.5 * (np.cos(2. * np.pi * x[0]) + np.cos(2. * np.pi * x[1]))
+    ...     return -20. * np.exp(arg1) - np.exp(arg2) + 20. + np.e
+    >>> bounds = [(-5, 5), (-5, 5)]
+    >>> result = differential_evolution(ackley, bounds, rng=1)
+    >>> result.x, result.fun
+    (array([0., 0.]), 4.440892098500626e-16)
+
+    The Ackley function is written in a vectorized manner, so the
+    ``'vectorized'`` keyword can be employed. Note the reduced number of
+    function evaluations.
+
+    >>> result = differential_evolution(
+    ...     ackley, bounds, vectorized=True, updating='deferred', rng=1
+    ... )
+    >>> result.x, result.fun
+    (array([0., 0.]), 4.440892098500626e-16)
+
+    The following custom strategy function mimics 'best1bin':
+
+    >>> def custom_strategy_fn(candidate, population, rng=None):
+    ...     parameter_count = population.shape(-1)
+    ...     mutation, recombination = 0.7, 0.9
+    ...     trial = np.copy(population[candidate])
+    ...     fill_point = rng.choice(parameter_count)
+    ...
+    ...     pool = np.arange(len(population))
+    ...     rng.shuffle(pool)
+    ...
+    ...     # two unique random numbers that aren't the same, and
+    ...     # aren't equal to candidate.
+    ...     idxs = []
+    ...     while len(idxs) < 2 and len(pool) > 0:
+    ...         idx = pool[0]
+    ...         pool = pool[1:]
+    ...         if idx != candidate:
+    ...             idxs.append(idx)
+    ...
+    ...     r0, r1 = idxs[:2]
+    ...
+    ...     bprime = (population[0] + mutation *
+    ...               (population[r0] - population[r1]))
+    ...
+    ...     crossovers = rng.uniform(size=parameter_count)
+    ...     crossovers = crossovers < recombination
+    ...     crossovers[fill_point] = True
+    ...     trial = np.where(crossovers, bprime, trial)
+    ...     return trial
+
+    """# noqa: E501
+
+    # using a context manager means that any created Pool objects are
+    # cleared up.
+    with DifferentialEvolutionSolver(func, bounds, args=args,
+                                     strategy=strategy,
+                                     maxiter=maxiter,
+                                     popsize=popsize, tol=tol,
+                                     mutation=mutation,
+                                     recombination=recombination,
+                                     rng=rng, polish=polish,
+                                     callback=callback,
+                                     disp=disp, init=init, atol=atol,
+                                     updating=updating,
+                                     workers=workers,
+                                     constraints=constraints,
+                                     x0=x0,
+                                     integrality=integrality,
+                                     vectorized=vectorized) as solver:
+        ret = solver.solve()
+
+    return ret
+
+
+class DifferentialEvolutionSolver:
+
+    """This class implements the differential evolution solver
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized. Must be in the form
+        ``f(x, *args)``, where ``x`` is the argument in the form of a 1-D array
+        and ``args`` is a tuple of any additional fixed parameters needed to
+        completely specify the function. The number of parameters, N, is equal
+        to ``len(x)``.
+    bounds : sequence or `Bounds`
+        Bounds for variables. There are two ways to specify the bounds:
+
+            1. Instance of `Bounds` class.
+            2. ``(min, max)`` pairs for each element in ``x``, defining the
+               finite lower and upper bounds for the optimizing argument of
+               `func`.
+
+        The total number of bounds is used to determine the number of
+        parameters, N. If there are parameters whose bounds are equal the total
+        number of free parameters is ``N - N_equal``.
+    args : tuple, optional
+        Any additional fixed parameters needed to
+        completely specify the objective function.
+    strategy : {str, callable}, optional
+        The differential evolution strategy to use. Should be one of:
+
+            - 'best1bin'
+            - 'best1exp'
+            - 'rand1bin'
+            - 'rand1exp'
+            - 'rand2bin'
+            - 'rand2exp'
+            - 'randtobest1bin'
+            - 'randtobest1exp'
+            - 'currenttobest1bin'
+            - 'currenttobest1exp'
+            - 'best2exp'
+            - 'best2bin'
+
+        The default is 'best1bin'. Strategies that may be
+        implemented are outlined in 'Notes'.
+
+        Alternatively the differential evolution strategy can be customized
+        by providing a callable that constructs a trial vector. The callable
+        must have the form
+        ``strategy(candidate: int, population: np.ndarray, rng=None)``,
+        where ``candidate`` is an integer specifying which entry of the
+        population is being evolved, ``population`` is an array of shape
+        ``(S, N)`` containing all the population members (where S is the
+        total population size), and ``rng`` is the random number generator
+        being used within the solver.
+        ``candidate`` will be in the range ``[0, S)``.
+        ``strategy`` must return a trial vector with shape ``(N,)``. The
+        fitness of this trial vector is compared against the fitness of
+        ``population[candidate]``.
+    maxiter : int, optional
+        The maximum number of generations over which the entire population is
+        evolved. The maximum number of function evaluations (with no polishing)
+        is: ``(maxiter + 1) * popsize * (N - N_equal)``
+    popsize : int, optional
+        A multiplier for setting the total population size. The population has
+        ``popsize * (N - N_equal)`` individuals. This keyword is overridden if
+        an initial population is supplied via the `init` keyword. When using
+        ``init='sobol'`` the population size is calculated as the next power
+        of 2 after ``popsize * (N - N_equal)``.
+    tol : float, optional
+        Relative tolerance for convergence, the solving stops when
+        ``np.std(population_energies) <= atol + tol * np.abs(np.mean(population_energies))``,
+        where and `atol` and `tol` are the absolute and relative tolerance
+        respectively.
+    mutation : float or tuple(float, float), optional
+        The mutation constant. In the literature this is also known as
+        differential weight, being denoted by F.
+        If specified as a float it should be in the range [0, 2].
+        If specified as a tuple ``(min, max)`` dithering is employed. Dithering
+        randomly changes the mutation constant on a generation by generation
+        basis. The mutation constant for that generation is taken from
+        U[min, max). Dithering can help speed convergence significantly.
+        Increasing the mutation constant increases the search radius, but will
+        slow down convergence.
+    recombination : float, optional
+        The recombination constant, should be in the range [0, 1]. In the
+        literature this is also known as the crossover probability, being
+        denoted by CR. Increasing this value allows a larger number of mutants
+        to progress into the next generation, but at the risk of population
+        stability.
+
+    rng : {None, int, `numpy.random.Generator`}, optional
+        
+        ..versionchanged:: 1.15.0
+            As part of the `SPEC-007 `_
+            transition from use of `numpy.random.RandomState` to
+            `numpy.random.Generator` this keyword was changed from `seed` to `rng`.
+            For an interim period both keywords will continue to work (only specify
+            one of them). After the interim period using the `seed` keyword will emit
+            warnings. The behavior of the `seed` and `rng` keywords is outlined below.
+
+        If `rng` is passed by keyword, types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a `Generator`.
+        If `rng` is already a `Generator` instance, then the provided instance is
+        used.
+        
+        If this argument is passed by position or `seed` is passed by keyword, the
+        behavior is:
+        
+        - If `seed` is None (or `np.random`), the `numpy.random.RandomState`
+          singleton is used.
+        - If `seed` is an int, a new `RandomState` instance is used,
+          seeded with `seed`.
+        - If `seed` is already a `Generator` or `RandomState` instance then
+          that instance is used.
+        
+        Specify `seed`/`rng` for repeatable minimizations.
+    disp : bool, optional
+        Prints the evaluated `func` at every iteration.
+    callback : callable, optional
+        A callable called after each iteration. Has the signature:
+
+            ``callback(intermediate_result: OptimizeResult)``
+
+        where ``intermediate_result`` is a keyword parameter containing an
+        `OptimizeResult` with attributes ``x`` and ``fun``, the best solution
+        found so far and the objective function. Note that the name
+        of the parameter must be ``intermediate_result`` for the callback
+        to be passed an `OptimizeResult`.
+
+        The callback also supports a signature like:
+
+            ``callback(x, convergence: float=val)``
+
+        ``val`` represents the fractional value of the population convergence.
+         When ``val`` is greater than ``1.0``, the function halts.
+
+        Introspection is used to determine which of the signatures is invoked.
+
+        Global minimization will halt if the callback raises ``StopIteration``
+        or returns ``True``; any polishing is still carried out.
+
+        .. versionchanged:: 1.12.0
+            callback accepts the ``intermediate_result`` keyword.
+
+    polish : bool, optional
+        If True (default), then `scipy.optimize.minimize` with the `L-BFGS-B`
+        method is used to polish the best population member at the end, which
+        can improve the minimization slightly. If a constrained problem is
+        being studied then the `trust-constr` method is used instead. For large
+        problems with many constraints, polishing can take a long time due to
+        the Jacobian computations.
+    maxfun : int, optional
+        Set the maximum number of function evaluations. However, it probably
+        makes more sense to set `maxiter` instead.
+    init : str or array-like, optional
+        Specify which type of population initialization is performed. Should be
+        one of:
+
+            - 'latinhypercube'
+            - 'sobol'
+            - 'halton'
+            - 'random'
+            - array specifying the initial population. The array should have
+              shape ``(S, N)``, where S is the total population size and
+              N is the number of parameters.
+              `init` is clipped to `bounds` before use.
+
+        The default is 'latinhypercube'. Latin Hypercube sampling tries to
+        maximize coverage of the available parameter space.
+
+        'sobol' and 'halton' are superior alternatives and maximize even more
+        the parameter space. 'sobol' will enforce an initial population
+        size which is calculated as the next power of 2 after
+        ``popsize * (N - N_equal)``. 'halton' has no requirements but is a bit
+        less efficient. See `scipy.stats.qmc` for more details.
+
+        'random' initializes the population randomly - this has the drawback
+        that clustering can occur, preventing the whole of parameter space
+        being covered. Use of an array to specify a population could be used,
+        for example, to create a tight bunch of initial guesses in an location
+        where the solution is known to exist, thereby reducing time for
+        convergence.
+    atol : float, optional
+        Absolute tolerance for convergence, the solving stops when
+        ``np.std(pop) <= atol + tol * np.abs(np.mean(population_energies))``,
+        where and `atol` and `tol` are the absolute and relative tolerance
+        respectively.
+    updating : {'immediate', 'deferred'}, optional
+        If ``'immediate'``, the best solution vector is continuously updated
+        within a single generation [4]_. This can lead to faster convergence as
+        trial vectors can take advantage of continuous improvements in the best
+        solution.
+        With ``'deferred'``, the best solution vector is updated once per
+        generation. Only ``'deferred'`` is compatible with parallelization or
+        vectorization, and the `workers` and `vectorized` keywords can
+        over-ride this option.
+    workers : int or map-like callable, optional
+        If `workers` is an int the population is subdivided into `workers`
+        sections and evaluated in parallel
+        (uses `multiprocessing.Pool `).
+        Supply `-1` to use all cores available to the Process.
+        Alternatively supply a map-like callable, such as
+        `multiprocessing.Pool.map` for evaluating the population in parallel.
+        This evaluation is carried out as ``workers(func, iterable)``.
+        This option will override the `updating` keyword to
+        `updating='deferred'` if `workers != 1`.
+        Requires that `func` be pickleable.
+    constraints : {NonLinearConstraint, LinearConstraint, Bounds}
+        Constraints on the solver, over and above those applied by the `bounds`
+        kwd. Uses the approach by Lampinen.
+    x0 : None or array-like, optional
+        Provides an initial guess to the minimization. Once the population has
+        been initialized this vector replaces the first (best) member. This
+        replacement is done even if `init` is given an initial population.
+        ``x0.shape == (N,)``.
+    integrality : 1-D array, optional
+        For each decision variable, a boolean value indicating whether the
+        decision variable is constrained to integer values. The array is
+        broadcast to ``(N,)``.
+        If any decision variables are constrained to be integral, they will not
+        be changed during polishing.
+        Only integer values lying between the lower and upper bounds are used.
+        If there are no integer values lying between the bounds then a
+        `ValueError` is raised.
+    vectorized : bool, optional
+        If ``vectorized is True``, `func` is sent an `x` array with
+        ``x.shape == (N, S)``, and is expected to return an array of shape
+        ``(S,)``, where `S` is the number of solution vectors to be calculated.
+        If constraints are applied, each of the functions used to construct
+        a `Constraint` object should accept an `x` array with
+        ``x.shape == (N, S)``, and return an array of shape ``(M, S)``, where
+        `M` is the number of constraint components.
+        This option is an alternative to the parallelization offered by
+        `workers`, and may help in optimization speed. This keyword is
+        ignored if ``workers != 1``.
+        This option will override the `updating` keyword to
+        ``updating='deferred'``.
+    """ # noqa: E501
+
+    # Dispatch of mutation strategy method (binomial or exponential).
+    _binomial = {'best1bin': '_best1',
+                 'randtobest1bin': '_randtobest1',
+                 'currenttobest1bin': '_currenttobest1',
+                 'best2bin': '_best2',
+                 'rand2bin': '_rand2',
+                 'rand1bin': '_rand1'}
+    _exponential = {'best1exp': '_best1',
+                    'rand1exp': '_rand1',
+                    'randtobest1exp': '_randtobest1',
+                    'currenttobest1exp': '_currenttobest1',
+                    'best2exp': '_best2',
+                    'rand2exp': '_rand2'}
+
+    __init_error_msg = ("The population initialization method must be one of "
+                        "'latinhypercube' or 'random', or an array of shape "
+                        "(S, N) where N is the number of parameters and S>5")
+
+    def __init__(self, func, bounds, args=(),
+                 strategy='best1bin', maxiter=1000, popsize=15,
+                 tol=0.01, mutation=(0.5, 1), recombination=0.7, rng=None,
+                 maxfun=np.inf, callback=None, disp=False, polish=True,
+                 init='latinhypercube', atol=0, updating='immediate',
+                 workers=1, constraints=(), x0=None, *, integrality=None,
+                 vectorized=False):
+
+        if callable(strategy):
+            # a callable strategy is going to be stored in self.strategy anyway
+            pass
+        elif strategy in self._binomial:
+            self.mutation_func = getattr(self, self._binomial[strategy])
+        elif strategy in self._exponential:
+            self.mutation_func = getattr(self, self._exponential[strategy])
+        else:
+            raise ValueError("Please select a valid mutation strategy")
+        self.strategy = strategy
+
+        self.callback = _wrap_callback(callback, "differential_evolution")
+        self.polish = polish
+
+        # set the updating / parallelisation options
+        if updating in ['immediate', 'deferred']:
+            self._updating = updating
+
+        self.vectorized = vectorized
+
+        # want to use parallelisation, but updating is immediate
+        if workers != 1 and updating == 'immediate':
+            warnings.warn("differential_evolution: the 'workers' keyword has"
+                          " overridden updating='immediate' to"
+                          " updating='deferred'", UserWarning, stacklevel=2)
+            self._updating = 'deferred'
+
+        if vectorized and workers != 1:
+            warnings.warn("differential_evolution: the 'workers' keyword"
+                          " overrides the 'vectorized' keyword", stacklevel=2)
+            self.vectorized = vectorized = False
+
+        if vectorized and updating == 'immediate':
+            warnings.warn("differential_evolution: the 'vectorized' keyword"
+                          " has overridden updating='immediate' to updating"
+                          "='deferred'", UserWarning, stacklevel=2)
+            self._updating = 'deferred'
+
+        # an object with a map method.
+        if vectorized:
+            def maplike_for_vectorized_func(func, x):
+                # send an array (N, S) to the user func,
+                # expect to receive (S,). Transposition is required because
+                # internally the population is held as (S, N)
+                return np.atleast_1d(func(x.T))
+            workers = maplike_for_vectorized_func
+
+        self._mapwrapper = MapWrapper(workers)
+
+        # relative and absolute tolerances for convergence
+        self.tol, self.atol = tol, atol
+
+        # Mutation constant should be in [0, 2). If specified as a sequence
+        # then dithering is performed.
+        self.scale = mutation
+        if (not np.all(np.isfinite(mutation)) or
+                np.any(np.array(mutation) >= 2) or
+                np.any(np.array(mutation) < 0)):
+            raise ValueError('The mutation constant must be a float in '
+                             'U[0, 2), or specified as a tuple(min, max)'
+                             ' where min < max and min, max are in U[0, 2).')
+
+        self.dither = None
+        if hasattr(mutation, '__iter__') and len(mutation) > 1:
+            self.dither = [mutation[0], mutation[1]]
+            self.dither.sort()
+
+        self.cross_over_probability = recombination
+
+        # we create a wrapped function to allow the use of map (and Pool.map
+        # in the future)
+        self.func = _FunctionWrapper(func, args)
+        self.args = args
+
+        # convert tuple of lower and upper bounds to limits
+        # [(low_0, high_0), ..., (low_n, high_n]
+        #     -> [[low_0, ..., low_n], [high_0, ..., high_n]]
+        if isinstance(bounds, Bounds):
+            self.limits = np.array(new_bounds_to_old(bounds.lb,
+                                                     bounds.ub,
+                                                     len(bounds.lb)),
+                                   dtype=float).T
+        else:
+            self.limits = np.array(bounds, dtype='float').T
+
+        if (np.size(self.limits, 0) != 2 or not
+                np.all(np.isfinite(self.limits))):
+            raise ValueError('bounds should be a sequence containing finite '
+                             'real valued (min, max) pairs for each value'
+                             ' in x')
+
+        if maxiter is None:  # the default used to be None
+            maxiter = 1000
+        self.maxiter = maxiter
+        if maxfun is None:  # the default used to be None
+            maxfun = np.inf
+        self.maxfun = maxfun
+
+        # population is scaled to between [0, 1].
+        # We have to scale between parameter <-> population
+        # save these arguments for _scale_parameter and
+        # _unscale_parameter. This is an optimization
+        self.__scale_arg1 = 0.5 * (self.limits[0] + self.limits[1])
+        self.__scale_arg2 = np.fabs(self.limits[0] - self.limits[1])
+        with np.errstate(divide='ignore'):
+            # if lb == ub then the following line will be 1/0, which is why
+            # we ignore the divide by zero warning. The result from 1/0 is
+            # inf, so replace those values by 0.
+            self.__recip_scale_arg2 = 1 / self.__scale_arg2
+            self.__recip_scale_arg2[~np.isfinite(self.__recip_scale_arg2)] = 0
+
+        self.parameter_count = np.size(self.limits, 1)
+
+        self.random_number_generator = check_random_state(rng)
+
+        # Which parameters are going to be integers?
+        if np.any(integrality):
+            # # user has provided a truth value for integer constraints
+            integrality = np.broadcast_to(
+                integrality,
+                self.parameter_count
+            )
+            integrality = np.asarray(integrality, bool)
+            # For integrality parameters change the limits to only allow
+            # integer values lying between the limits.
+            lb, ub = np.copy(self.limits)
+
+            lb = np.ceil(lb)
+            ub = np.floor(ub)
+            if not (lb[integrality] <= ub[integrality]).all():
+                # there's a parameter that doesn't have an integer value
+                # lying between the limits
+                raise ValueError("One of the integrality constraints does not"
+                                 " have any possible integer values between"
+                                 " the lower/upper bounds.")
+            nlb = np.nextafter(lb[integrality] - 0.5, np.inf)
+            nub = np.nextafter(ub[integrality] + 0.5, -np.inf)
+
+            self.integrality = integrality
+            self.limits[0, self.integrality] = nlb
+            self.limits[1, self.integrality] = nub
+        else:
+            self.integrality = False
+
+        # check for equal bounds
+        eb = self.limits[0] == self.limits[1]
+        eb_count = np.count_nonzero(eb)
+
+        # default population initialization is a latin hypercube design, but
+        # there are other population initializations possible.
+        # the minimum is 5 because 'best2bin' requires a population that's at
+        # least 5 long
+        # 202301 - reduced population size to account for parameters with
+        # equal bounds. If there are no varying parameters set N to at least 1
+        self.num_population_members = max(
+            5,
+            popsize * max(1, self.parameter_count - eb_count)
+        )
+        self.population_shape = (self.num_population_members,
+                                 self.parameter_count)
+
+        self._nfev = 0
+        # check first str otherwise will fail to compare str with array
+        if isinstance(init, str):
+            if init == 'latinhypercube':
+                self.init_population_lhs()
+            elif init == 'sobol':
+                # must be Ns = 2**m for Sobol'
+                n_s = int(2 ** np.ceil(np.log2(self.num_population_members)))
+                self.num_population_members = n_s
+                self.population_shape = (self.num_population_members,
+                                         self.parameter_count)
+                self.init_population_qmc(qmc_engine='sobol')
+            elif init == 'halton':
+                self.init_population_qmc(qmc_engine='halton')
+            elif init == 'random':
+                self.init_population_random()
+            else:
+                raise ValueError(self.__init_error_msg)
+        else:
+            self.init_population_array(init)
+
+        if x0 is not None:
+            # scale to within unit interval and
+            # ensure parameters are within bounds.
+            x0_scaled = self._unscale_parameters(np.asarray(x0))
+            if ((x0_scaled > 1.0) | (x0_scaled < 0.0)).any():
+                raise ValueError(
+                    "Some entries in x0 lay outside the specified bounds"
+                )
+            self.population[0] = x0_scaled
+
+        # infrastructure for constraints
+        self.constraints = constraints
+        self._wrapped_constraints = []
+
+        if hasattr(constraints, '__len__'):
+            # sequence of constraints, this will also deal with default
+            # keyword parameter
+            for c in constraints:
+                self._wrapped_constraints.append(
+                    _ConstraintWrapper(c, self.x)
+                )
+        else:
+            self._wrapped_constraints = [
+                _ConstraintWrapper(constraints, self.x)
+            ]
+        self.total_constraints = np.sum(
+            [c.num_constr for c in self._wrapped_constraints]
+        )
+        self.constraint_violation = np.zeros((self.num_population_members, 1))
+        self.feasible = np.ones(self.num_population_members, bool)
+
+        # an array to shuffle when selecting candidates. Create it here
+        # rather than repeatedly creating it in _select_samples.
+        self._random_population_index = np.arange(self.num_population_members)
+        self.disp = disp
+
+    def init_population_lhs(self):
+        """
+        Initializes the population with Latin Hypercube Sampling.
+        Latin Hypercube Sampling ensures that each parameter is uniformly
+        sampled over its range.
+        """
+        rng = self.random_number_generator
+
+        # Each parameter range needs to be sampled uniformly. The scaled
+        # parameter range ([0, 1)) needs to be split into
+        # `self.num_population_members` segments, each of which has the following
+        # size:
+        segsize = 1.0 / self.num_population_members
+
+        # Within each segment we sample from a uniform random distribution.
+        # We need to do this sampling for each parameter.
+        samples = (segsize * rng.uniform(size=self.population_shape)
+
+        # Offset each segment to cover the entire parameter range [0, 1)
+                   + np.linspace(0., 1., self.num_population_members,
+                                 endpoint=False)[:, np.newaxis])
+
+        # Create an array for population of candidate solutions.
+        self.population = np.zeros_like(samples)
+
+        # Initialize population of candidate solutions by permutation of the
+        # random samples.
+        for j in range(self.parameter_count):
+            order = rng.permutation(range(self.num_population_members))
+            self.population[:, j] = samples[order, j]
+
+        # reset population energies
+        self.population_energies = np.full(self.num_population_members,
+                                           np.inf)
+
+        # reset number of function evaluations counter
+        self._nfev = 0
+
+    def init_population_qmc(self, qmc_engine):
+        """Initializes the population with a QMC method.
+
+        QMC methods ensures that each parameter is uniformly
+        sampled over its range.
+
+        Parameters
+        ----------
+        qmc_engine : str
+            The QMC method to use for initialization. Can be one of
+            ``latinhypercube``, ``sobol`` or ``halton``.
+
+        """
+        from scipy.stats import qmc
+
+        rng = self.random_number_generator
+
+        # Create an array for population of candidate solutions.
+        if qmc_engine == 'latinhypercube':
+            sampler = qmc.LatinHypercube(d=self.parameter_count, seed=rng)
+        elif qmc_engine == 'sobol':
+            sampler = qmc.Sobol(d=self.parameter_count, seed=rng)
+        elif qmc_engine == 'halton':
+            sampler = qmc.Halton(d=self.parameter_count, seed=rng)
+        else:
+            raise ValueError(self.__init_error_msg)
+
+        self.population = sampler.random(n=self.num_population_members)
+
+        # reset population energies
+        self.population_energies = np.full(self.num_population_members,
+                                           np.inf)
+
+        # reset number of function evaluations counter
+        self._nfev = 0
+
+    def init_population_random(self):
+        """
+        Initializes the population at random. This type of initialization
+        can possess clustering, Latin Hypercube sampling is generally better.
+        """
+        rng = self.random_number_generator
+        self.population = rng.uniform(size=self.population_shape)
+
+        # reset population energies
+        self.population_energies = np.full(self.num_population_members,
+                                           np.inf)
+
+        # reset number of function evaluations counter
+        self._nfev = 0
+
+    def init_population_array(self, init):
+        """
+        Initializes the population with a user specified population.
+
+        Parameters
+        ----------
+        init : np.ndarray
+            Array specifying subset of the initial population. The array should
+            have shape (S, N), where N is the number of parameters.
+            The population is clipped to the lower and upper bounds.
+        """
+        # make sure you're using a float array
+        popn = np.asarray(init, dtype=np.float64)
+
+        if (np.size(popn, 0) < 5 or
+                popn.shape[1] != self.parameter_count or
+                len(popn.shape) != 2):
+            raise ValueError("The population supplied needs to have shape"
+                             " (S, len(x)), where S > 4.")
+
+        # scale values and clip to bounds, assigning to population
+        self.population = np.clip(self._unscale_parameters(popn), 0, 1)
+
+        self.num_population_members = np.size(self.population, 0)
+
+        self.population_shape = (self.num_population_members,
+                                 self.parameter_count)
+
+        # reset population energies
+        self.population_energies = np.full(self.num_population_members,
+                                           np.inf)
+
+        # reset number of function evaluations counter
+        self._nfev = 0
+
+    @property
+    def x(self):
+        """
+        The best solution from the solver
+        """
+        return self._scale_parameters(self.population[0])
+
+    @property
+    def convergence(self):
+        """
+        The standard deviation of the population energies divided by their
+        mean.
+        """
+        if np.any(np.isinf(self.population_energies)):
+            return np.inf
+        return (np.std(self.population_energies) /
+                (np.abs(np.mean(self.population_energies)) + _MACHEPS))
+
+    def converged(self):
+        """
+        Return True if the solver has converged.
+        """
+        if np.any(np.isinf(self.population_energies)):
+            return False
+
+        return (np.std(self.population_energies) <=
+                self.atol +
+                self.tol * np.abs(np.mean(self.population_energies)))
+
+    def solve(self):
+        """
+        Runs the DifferentialEvolutionSolver.
+
+        Returns
+        -------
+        res : OptimizeResult
+            The optimization result represented as a `OptimizeResult` object.
+            Important attributes are: ``x`` the solution array, ``success`` a
+            Boolean flag indicating if the optimizer exited successfully,
+            ``message`` which describes the cause of the termination,
+            ``population`` the solution vectors present in the population, and
+            ``population_energies`` the value of the objective function for
+            each entry in ``population``.
+            See `OptimizeResult` for a description of other attributes. If
+            `polish` was employed, and a lower minimum was obtained by the
+            polishing, then OptimizeResult also contains the ``jac`` attribute.
+            If the eventual solution does not satisfy the applied constraints
+            ``success`` will be `False`.
+        """
+        nit, warning_flag = 0, False
+        status_message = _status_message['success']
+
+        # The population may have just been initialized (all entries are
+        # np.inf). If it has you have to calculate the initial energies.
+        # Although this is also done in the evolve generator it's possible
+        # that someone can set maxiter=0, at which point we still want the
+        # initial energies to be calculated (the following loop isn't run).
+        if np.all(np.isinf(self.population_energies)):
+            self.feasible, self.constraint_violation = (
+                self._calculate_population_feasibilities(self.population))
+
+            # only work out population energies for feasible solutions
+            self.population_energies[self.feasible] = (
+                self._calculate_population_energies(
+                    self.population[self.feasible]))
+
+            self._promote_lowest_energy()
+
+        # do the optimization.
+        for nit in range(1, self.maxiter + 1):
+            # evolve the population by a generation
+            try:
+                next(self)
+            except StopIteration:
+                warning_flag = True
+                if self._nfev > self.maxfun:
+                    status_message = _status_message['maxfev']
+                elif self._nfev == self.maxfun:
+                    status_message = ('Maximum number of function evaluations'
+                                      ' has been reached.')
+                break
+
+            if self.disp:
+                print(f"differential_evolution step {nit}: f(x)="
+                      f" {self.population_energies[0]}"
+                      )
+
+            if self.callback:
+                c = self.tol / (self.convergence + _MACHEPS)
+                res = self._result(nit=nit, message="in progress")
+                res.convergence = c
+                try:
+                    warning_flag = bool(self.callback(res))
+                except StopIteration:
+                    warning_flag = True
+
+                if warning_flag:
+                    status_message = 'callback function requested stop early'
+
+            # should the solver terminate?
+            if warning_flag or self.converged():
+                break
+
+        else:
+            status_message = _status_message['maxiter']
+            warning_flag = True
+
+        DE_result = self._result(
+            nit=nit, message=status_message, warning_flag=warning_flag
+        )
+
+        if self.polish and not np.all(self.integrality):
+            # can't polish if all the parameters are integers
+            if np.any(self.integrality):
+                # set the lower/upper bounds equal so that any integrality
+                # constraints work.
+                limits, integrality = self.limits, self.integrality
+                limits[0, integrality] = DE_result.x[integrality]
+                limits[1, integrality] = DE_result.x[integrality]
+
+            polish_method = 'L-BFGS-B'
+
+            if self._wrapped_constraints:
+                polish_method = 'trust-constr'
+
+                constr_violation = self._constraint_violation_fn(DE_result.x)
+                if np.any(constr_violation > 0.):
+                    warnings.warn("differential evolution didn't find a "
+                                  "solution satisfying the constraints, "
+                                  "attempting to polish from the least "
+                                  "infeasible solution",
+                                  UserWarning, stacklevel=2)
+            if self.disp:
+                print(f"Polishing solution with '{polish_method}'")
+            result = minimize(lambda x:
+                                list(self._mapwrapper(self.func, np.atleast_2d(x)))[0],
+                              np.copy(DE_result.x),
+                              method=polish_method,
+                              bounds=self.limits.T,
+                              constraints=self.constraints)
+
+            self._nfev += result.nfev
+            DE_result.nfev = self._nfev
+
+            # Polishing solution is only accepted if there is an improvement in
+            # cost function, the polishing was successful and the solution lies
+            # within the bounds.
+            if (result.fun < DE_result.fun and
+                    result.success and
+                    np.all(result.x <= self.limits[1]) and
+                    np.all(self.limits[0] <= result.x)):
+                DE_result.fun = result.fun
+                DE_result.x = result.x
+                DE_result.jac = result.jac
+                # to keep internal state consistent
+                self.population_energies[0] = result.fun
+                self.population[0] = self._unscale_parameters(result.x)
+
+        if self._wrapped_constraints:
+            DE_result.constr = [c.violation(DE_result.x) for
+                                c in self._wrapped_constraints]
+            DE_result.constr_violation = np.max(
+                np.concatenate(DE_result.constr))
+            DE_result.maxcv = DE_result.constr_violation
+            if DE_result.maxcv > 0:
+                # if the result is infeasible then success must be False
+                DE_result.success = False
+                DE_result.message = ("The solution does not satisfy the "
+                                     f"constraints, MAXCV = {DE_result.maxcv}")
+
+        return DE_result
+
+    def _result(self, **kwds):
+        # form an intermediate OptimizeResult
+        nit = kwds.get('nit', None)
+        message = kwds.get('message', None)
+        warning_flag = kwds.get('warning_flag', False)
+        result = OptimizeResult(
+            x=self.x,
+            fun=self.population_energies[0],
+            nfev=self._nfev,
+            nit=nit,
+            message=message,
+            success=(warning_flag is not True),
+            population=self._scale_parameters(self.population),
+            population_energies=self.population_energies
+        )
+        if self._wrapped_constraints:
+            result.constr = [c.violation(result.x)
+                             for c in self._wrapped_constraints]
+            result.constr_violation = np.max(np.concatenate(result.constr))
+            result.maxcv = result.constr_violation
+            if result.maxcv > 0:
+                result.success = False
+
+        return result
+
+    def _calculate_population_energies(self, population):
+        """
+        Calculate the energies of a population.
+
+        Parameters
+        ----------
+        population : ndarray
+            An array of parameter vectors normalised to [0, 1] using lower
+            and upper limits. Has shape ``(np.size(population, 0), N)``.
+
+        Returns
+        -------
+        energies : ndarray
+            An array of energies corresponding to each population member. If
+            maxfun will be exceeded during this call, then the number of
+            function evaluations will be reduced and energies will be
+            right-padded with np.inf. Has shape ``(np.size(population, 0),)``
+        """
+        num_members = np.size(population, 0)
+        # S is the number of function evals left to stay under the
+        # maxfun budget
+        S = min(num_members, self.maxfun - self._nfev)
+
+        energies = np.full(num_members, np.inf)
+
+        parameters_pop = self._scale_parameters(population)
+        try:
+            calc_energies = list(
+                self._mapwrapper(self.func, parameters_pop[0:S])
+            )
+            calc_energies = np.squeeze(calc_energies)
+        except (TypeError, ValueError) as e:
+            # wrong number of arguments for _mapwrapper
+            # or wrong length returned from the mapper
+            raise RuntimeError(
+                "The map-like callable must be of the form f(func, iterable), "
+                "returning a sequence of numbers the same length as 'iterable'"
+            ) from e
+
+        if calc_energies.size != S:
+            if self.vectorized:
+                raise RuntimeError("The vectorized function must return an"
+                                   " array of shape (S,) when given an array"
+                                   " of shape (len(x), S)")
+            raise RuntimeError("func(x, *args) must return a scalar value")
+
+        energies[0:S] = calc_energies
+
+        if self.vectorized:
+            self._nfev += 1
+        else:
+            self._nfev += S
+
+        return energies
+
+    def _promote_lowest_energy(self):
+        # swaps 'best solution' into first population entry
+
+        idx = np.arange(self.num_population_members)
+        feasible_solutions = idx[self.feasible]
+        if feasible_solutions.size:
+            # find the best feasible solution
+            idx_t = np.argmin(self.population_energies[feasible_solutions])
+            l = feasible_solutions[idx_t]
+        else:
+            # no solution was feasible, use 'best' infeasible solution, which
+            # will violate constraints the least
+            l = np.argmin(np.sum(self.constraint_violation, axis=1))
+
+        self.population_energies[[0, l]] = self.population_energies[[l, 0]]
+        self.population[[0, l], :] = self.population[[l, 0], :]
+        self.feasible[[0, l]] = self.feasible[[l, 0]]
+        self.constraint_violation[[0, l], :] = (
+        self.constraint_violation[[l, 0], :])
+
+    def _constraint_violation_fn(self, x):
+        """
+        Calculates total constraint violation for all the constraints, for a
+        set of solutions.
+
+        Parameters
+        ----------
+        x : ndarray
+            Solution vector(s). Has shape (S, N), or (N,), where S is the
+            number of solutions to investigate and N is the number of
+            parameters.
+
+        Returns
+        -------
+        cv : ndarray
+            Total violation of constraints. Has shape ``(S, M)``, where M is
+            the total number of constraint components (which is not necessarily
+            equal to len(self._wrapped_constraints)).
+        """
+        # how many solution vectors you're calculating constraint violations
+        # for
+        S = np.size(x) // self.parameter_count
+        _out = np.zeros((S, self.total_constraints))
+        offset = 0
+        for con in self._wrapped_constraints:
+            # the input/output of the (vectorized) constraint function is
+            # {(N, S), (N,)} --> (M, S)
+            # The input to _constraint_violation_fn is (S, N) or (N,), so
+            # transpose to pass it to the constraint. The output is transposed
+            # from (M, S) to (S, M) for further use.
+            c = con.violation(x.T).T
+
+            # The shape of c should be (M,), (1, M), or (S, M). Check for
+            # those shapes, as an incorrect shape indicates that the
+            # user constraint function didn't return the right thing, and
+            # the reshape operation will fail. Intercept the wrong shape
+            # to give a reasonable error message. I'm not sure what failure
+            # modes an inventive user will come up with.
+            if c.shape[-1] != con.num_constr or (S > 1 and c.shape[0] != S):
+                raise RuntimeError("An array returned from a Constraint has"
+                                   " the wrong shape. If `vectorized is False`"
+                                   " the Constraint should return an array of"
+                                   " shape (M,). If `vectorized is True` then"
+                                   " the Constraint must return an array of"
+                                   " shape (M, S), where S is the number of"
+                                   " solution vectors and M is the number of"
+                                   " constraint components in a given"
+                                   " Constraint object.")
+
+            # the violation function may return a 1D array, but is it a
+            # sequence of constraints for one solution (S=1, M>=1), or the
+            # value of a single constraint for a sequence of solutions
+            # (S>=1, M=1)
+            c = np.reshape(c, (S, con.num_constr))
+            _out[:, offset:offset + con.num_constr] = c
+            offset += con.num_constr
+
+        return _out
+
+    def _calculate_population_feasibilities(self, population):
+        """
+        Calculate the feasibilities of a population.
+
+        Parameters
+        ----------
+        population : ndarray
+            An array of parameter vectors normalised to [0, 1] using lower
+            and upper limits. Has shape ``(np.size(population, 0), N)``.
+
+        Returns
+        -------
+        feasible, constraint_violation : ndarray, ndarray
+            Boolean array of feasibility for each population member, and an
+            array of the constraint violation for each population member.
+            constraint_violation has shape ``(np.size(population, 0), M)``,
+            where M is the number of constraints.
+        """
+        num_members = np.size(population, 0)
+        if not self._wrapped_constraints:
+            # shortcut for no constraints
+            return np.ones(num_members, bool), np.zeros((num_members, 1))
+
+        # (S, N)
+        parameters_pop = self._scale_parameters(population)
+
+        if self.vectorized:
+            # (S, M)
+            constraint_violation = np.array(
+                self._constraint_violation_fn(parameters_pop)
+            )
+        else:
+            # (S, 1, M)
+            constraint_violation = np.array([self._constraint_violation_fn(x)
+                                             for x in parameters_pop])
+            # if you use the list comprehension in the line above it will
+            # create an array of shape (S, 1, M), because each iteration
+            # generates an array of (1, M). In comparison the vectorized
+            # version returns (S, M). It's therefore necessary to remove axis 1
+            constraint_violation = constraint_violation[:, 0]
+
+        feasible = ~(np.sum(constraint_violation, axis=1) > 0)
+
+        return feasible, constraint_violation
+
+    def __iter__(self):
+        return self
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, *args):
+        return self._mapwrapper.__exit__(*args)
+
+    def _accept_trial(self, energy_trial, feasible_trial, cv_trial,
+                      energy_orig, feasible_orig, cv_orig):
+        """
+        Trial is accepted if:
+        * it satisfies all constraints and provides a lower or equal objective
+          function value, while both the compared solutions are feasible
+        - or -
+        * it is feasible while the original solution is infeasible,
+        - or -
+        * it is infeasible, but provides a lower or equal constraint violation
+          for all constraint functions.
+
+        This test corresponds to section III of Lampinen [1]_.
+
+        Parameters
+        ----------
+        energy_trial : float
+            Energy of the trial solution
+        feasible_trial : float
+            Feasibility of trial solution
+        cv_trial : array-like
+            Excess constraint violation for the trial solution
+        energy_orig : float
+            Energy of the original solution
+        feasible_orig : float
+            Feasibility of original solution
+        cv_orig : array-like
+            Excess constraint violation for the original solution
+
+        Returns
+        -------
+        accepted : bool
+
+        """
+        if feasible_orig and feasible_trial:
+            return energy_trial <= energy_orig
+        elif feasible_trial and not feasible_orig:
+            return True
+        elif not feasible_trial and (cv_trial <= cv_orig).all():
+            # cv_trial < cv_orig would imply that both trial and orig are not
+            # feasible
+            return True
+
+        return False
+
+    def __next__(self):
+        """
+        Evolve the population by a single generation
+
+        Returns
+        -------
+        x : ndarray
+            The best solution from the solver.
+        fun : float
+            Value of objective function obtained from the best solution.
+        """
+        # the population may have just been initialized (all entries are
+        # np.inf). If it has you have to calculate the initial energies
+        if np.all(np.isinf(self.population_energies)):
+            self.feasible, self.constraint_violation = (
+                self._calculate_population_feasibilities(self.population))
+
+            # only need to work out population energies for those that are
+            # feasible
+            self.population_energies[self.feasible] = (
+                self._calculate_population_energies(
+                    self.population[self.feasible]))
+
+            self._promote_lowest_energy()
+
+        if self.dither is not None:
+            self.scale = self.random_number_generator.uniform(self.dither[0],
+                                                              self.dither[1])
+
+        if self._updating == 'immediate':
+            # update best solution immediately
+            for candidate in range(self.num_population_members):
+                if self._nfev > self.maxfun:
+                    raise StopIteration
+
+                # create a trial solution
+                trial = self._mutate(candidate)
+
+                # ensuring that it's in the range [0, 1)
+                self._ensure_constraint(trial)
+
+                # scale from [0, 1) to the actual parameter value
+                parameters = self._scale_parameters(trial)
+
+                # determine the energy of the objective function
+                if self._wrapped_constraints:
+                    cv = self._constraint_violation_fn(parameters)
+                    feasible = False
+                    energy = np.inf
+                    if not np.sum(cv) > 0:
+                        # solution is feasible
+                        feasible = True
+                        energy = self.func(parameters)
+                        self._nfev += 1
+                else:
+                    feasible = True
+                    cv = np.atleast_2d([0.])
+                    energy = self.func(parameters)
+                    self._nfev += 1
+
+                # compare trial and population member
+                if self._accept_trial(energy, feasible, cv,
+                                      self.population_energies[candidate],
+                                      self.feasible[candidate],
+                                      self.constraint_violation[candidate]):
+                    self.population[candidate] = trial
+                    self.population_energies[candidate] = np.squeeze(energy)
+                    self.feasible[candidate] = feasible
+                    self.constraint_violation[candidate] = cv
+
+                    # if the trial candidate is also better than the best
+                    # solution then promote it.
+                    if self._accept_trial(energy, feasible, cv,
+                                          self.population_energies[0],
+                                          self.feasible[0],
+                                          self.constraint_violation[0]):
+                        self._promote_lowest_energy()
+
+        elif self._updating == 'deferred':
+            # update best solution once per generation
+            if self._nfev >= self.maxfun:
+                raise StopIteration
+
+            # 'deferred' approach, vectorised form.
+            # create trial solutions
+            trial_pop = self._mutate_many(
+                np.arange(self.num_population_members)
+            )
+
+            # enforce bounds
+            self._ensure_constraint(trial_pop)
+
+            # determine the energies of the objective function, but only for
+            # feasible trials
+            feasible, cv = self._calculate_population_feasibilities(trial_pop)
+            trial_energies = np.full(self.num_population_members, np.inf)
+
+            # only calculate for feasible entries
+            trial_energies[feasible] = self._calculate_population_energies(
+                trial_pop[feasible])
+
+            # which solutions are 'improved'?
+            loc = [self._accept_trial(*val) for val in
+                   zip(trial_energies, feasible, cv, self.population_energies,
+                       self.feasible, self.constraint_violation)]
+            loc = np.array(loc)
+            self.population = np.where(loc[:, np.newaxis],
+                                       trial_pop,
+                                       self.population)
+            self.population_energies = np.where(loc,
+                                                trial_energies,
+                                                self.population_energies)
+            self.feasible = np.where(loc,
+                                     feasible,
+                                     self.feasible)
+            self.constraint_violation = np.where(loc[:, np.newaxis],
+                                                 cv,
+                                                 self.constraint_violation)
+
+            # make sure the best solution is updated if updating='deferred'.
+            # put the lowest energy into the best solution position.
+            self._promote_lowest_energy()
+
+        return self.x, self.population_energies[0]
+
+    def _scale_parameters(self, trial):
+        """Scale from a number between 0 and 1 to parameters."""
+        # trial either has shape (N, ) or (L, N), where L is the number of
+        # solutions being scaled
+        scaled = self.__scale_arg1 + (trial - 0.5) * self.__scale_arg2
+        if np.count_nonzero(self.integrality):
+            i = np.broadcast_to(self.integrality, scaled.shape)
+            scaled[i] = np.round(scaled[i])
+        return scaled
+
+    def _unscale_parameters(self, parameters):
+        """Scale from parameters to a number between 0 and 1."""
+        return (parameters - self.__scale_arg1) * self.__recip_scale_arg2 + 0.5
+
+    def _ensure_constraint(self, trial):
+        """Make sure the parameters lie between the limits."""
+        mask = np.bitwise_or(trial > 1, trial < 0)
+        if oob := np.count_nonzero(mask):
+            trial[mask] = self.random_number_generator.uniform(size=oob)
+
+    def _mutate_custom(self, candidate):
+        rng = self.random_number_generator
+        msg = (
+            "strategy must have signature"
+            " f(candidate: int, population: np.ndarray, rng=None) returning an"
+            " array of shape (N,)"
+        )
+        _population = self._scale_parameters(self.population)
+        if not len(np.shape(candidate)):
+            # single entry in population
+            trial = self.strategy(candidate, _population, rng=rng)
+            if trial.shape != (self.parameter_count,):
+                raise RuntimeError(msg)
+        else:
+            S = candidate.shape[0]
+            trial = np.array(
+                [self.strategy(c, _population, rng=rng) for c in candidate],
+                dtype=float
+            )
+            if trial.shape != (S, self.parameter_count):
+                raise RuntimeError(msg)
+        return self._unscale_parameters(trial)
+
+    def _mutate_many(self, candidates):
+        """Create trial vectors based on a mutation strategy."""
+        rng = self.random_number_generator
+
+        S = len(candidates)
+        if callable(self.strategy):
+            return self._mutate_custom(candidates)
+
+        trial = np.copy(self.population[candidates])
+        samples = np.array([self._select_samples(c, 5) for c in candidates])
+
+        if self.strategy in ['currenttobest1exp', 'currenttobest1bin']:
+            bprime = self.mutation_func(candidates, samples)
+        else:
+            bprime = self.mutation_func(samples)
+
+        fill_point = rng_integers(rng, self.parameter_count, size=S)
+        crossovers = rng.uniform(size=(S, self.parameter_count))
+        crossovers = crossovers < self.cross_over_probability
+        if self.strategy in self._binomial:
+            # the last one is always from the bprime vector for binomial
+            # If you fill in modulo with a loop you have to set the last one to
+            # true. If you don't use a loop then you can have any random entry
+            # be True.
+            i = np.arange(S)
+            crossovers[i, fill_point[i]] = True
+            trial = np.where(crossovers, bprime, trial)
+            return trial
+
+        elif self.strategy in self._exponential:
+            crossovers[..., 0] = True
+            for j in range(S):
+                i = 0
+                init_fill = fill_point[j]
+                while (i < self.parameter_count and crossovers[j, i]):
+                    trial[j, init_fill] = bprime[j, init_fill]
+                    init_fill = (init_fill + 1) % self.parameter_count
+                    i += 1
+
+            return trial
+
+    def _mutate(self, candidate):
+        """Create a trial vector based on a mutation strategy."""
+        rng = self.random_number_generator
+
+        if callable(self.strategy):
+            return self._mutate_custom(candidate)
+
+        fill_point = rng_integers(rng, self.parameter_count)
+        samples = self._select_samples(candidate, 5)
+
+        trial = np.copy(self.population[candidate])
+
+        if self.strategy in ['currenttobest1exp', 'currenttobest1bin']:
+            bprime = self.mutation_func(candidate, samples)
+        else:
+            bprime = self.mutation_func(samples)
+
+        crossovers = rng.uniform(size=self.parameter_count)
+        crossovers = crossovers < self.cross_over_probability
+        if self.strategy in self._binomial:
+            # the last one is always from the bprime vector for binomial
+            # If you fill in modulo with a loop you have to set the last one to
+            # true. If you don't use a loop then you can have any random entry
+            # be True.
+            crossovers[fill_point] = True
+            trial = np.where(crossovers, bprime, trial)
+            return trial
+
+        elif self.strategy in self._exponential:
+            i = 0
+            crossovers[0] = True
+            while i < self.parameter_count and crossovers[i]:
+                trial[fill_point] = bprime[fill_point]
+                fill_point = (fill_point + 1) % self.parameter_count
+                i += 1
+
+            return trial
+
+    def _best1(self, samples):
+        """best1bin, best1exp"""
+        # samples.shape == (S, 5)
+        # or
+        # samples.shape(5,)
+        r0, r1 = samples[..., :2].T
+        return (self.population[0] + self.scale *
+                (self.population[r0] - self.population[r1]))
+
+    def _rand1(self, samples):
+        """rand1bin, rand1exp"""
+        r0, r1, r2 = samples[..., :3].T
+        return (self.population[r0] + self.scale *
+                (self.population[r1] - self.population[r2]))
+
+    def _randtobest1(self, samples):
+        """randtobest1bin, randtobest1exp"""
+        r0, r1, r2 = samples[..., :3].T
+        bprime = np.copy(self.population[r0])
+        bprime += self.scale * (self.population[0] - bprime)
+        bprime += self.scale * (self.population[r1] -
+                                self.population[r2])
+        return bprime
+
+    def _currenttobest1(self, candidate, samples):
+        """currenttobest1bin, currenttobest1exp"""
+        r0, r1 = samples[..., :2].T
+        bprime = (self.population[candidate] + self.scale *
+                  (self.population[0] - self.population[candidate] +
+                   self.population[r0] - self.population[r1]))
+        return bprime
+
+    def _best2(self, samples):
+        """best2bin, best2exp"""
+        r0, r1, r2, r3 = samples[..., :4].T
+        bprime = (self.population[0] + self.scale *
+                  (self.population[r0] + self.population[r1] -
+                   self.population[r2] - self.population[r3]))
+
+        return bprime
+
+    def _rand2(self, samples):
+        """rand2bin, rand2exp"""
+        r0, r1, r2, r3, r4 = samples[..., :5].T
+        bprime = (self.population[r0] + self.scale *
+                  (self.population[r1] + self.population[r2] -
+                   self.population[r3] - self.population[r4]))
+
+        return bprime
+
+    def _select_samples(self, candidate, number_samples):
+        """
+        obtain random integers from range(self.num_population_members),
+        without replacement. You can't have the original candidate either.
+        """
+        self.random_number_generator.shuffle(self._random_population_index)
+        idxs = self._random_population_index[:number_samples + 1]
+        return idxs[idxs != candidate][:number_samples]
+
+
+class _ConstraintWrapper:
+    """Object to wrap/evaluate user defined constraints.
+
+    Very similar in practice to `PreparedConstraint`, except that no evaluation
+    of jac/hess is performed (explicit or implicit).
+
+    If created successfully, it will contain the attributes listed below.
+
+    Parameters
+    ----------
+    constraint : {`NonlinearConstraint`, `LinearConstraint`, `Bounds`}
+        Constraint to check and prepare.
+    x0 : array_like
+        Initial vector of independent variables, shape (N,)
+
+    Attributes
+    ----------
+    fun : callable
+        Function defining the constraint wrapped by one of the convenience
+        classes.
+    bounds : 2-tuple
+        Contains lower and upper bounds for the constraints --- lb and ub.
+        These are converted to ndarray and have a size equal to the number of
+        the constraints.
+
+    Notes
+    -----
+    _ConstraintWrapper.fun and _ConstraintWrapper.violation can get sent
+    arrays of shape (N, S) or (N,), where S is the number of vectors of shape
+    (N,) to consider constraints for.
+    """
+    def __init__(self, constraint, x0):
+        self.constraint = constraint
+
+        if isinstance(constraint, NonlinearConstraint):
+            def fun(x):
+                x = np.asarray(x)
+                return np.atleast_1d(constraint.fun(x))
+        elif isinstance(constraint, LinearConstraint):
+            def fun(x):
+                if issparse(constraint.A):
+                    A = constraint.A
+                else:
+                    A = np.atleast_2d(constraint.A)
+
+                res = A.dot(x)
+                # x either has shape (N, S) or (N)
+                # (M, N) x (N, S) --> (M, S)
+                # (M, N) x (N,)   --> (M,)
+                # However, if (M, N) is a matrix then:
+                # (M, N) * (N,)   --> (M, 1), we need this to be (M,)
+                if x.ndim == 1 and res.ndim == 2:
+                    # deal with case that constraint.A is an np.matrix
+                    # see gh20041
+                    res = np.asarray(res)[:, 0]
+
+                return res
+        elif isinstance(constraint, Bounds):
+            def fun(x):
+                return np.asarray(x)
+        else:
+            raise ValueError("`constraint` of an unknown type is passed.")
+
+        self.fun = fun
+
+        lb = np.asarray(constraint.lb, dtype=float)
+        ub = np.asarray(constraint.ub, dtype=float)
+
+        x0 = np.asarray(x0)
+
+        # find out the number of constraints
+        f0 = fun(x0)
+        self.num_constr = m = f0.size
+        self.parameter_count = x0.size
+
+        if lb.ndim == 0:
+            lb = np.resize(lb, m)
+        if ub.ndim == 0:
+            ub = np.resize(ub, m)
+
+        self.bounds = (lb, ub)
+
+    def __call__(self, x):
+        return np.atleast_1d(self.fun(x))
+
+    def violation(self, x):
+        """How much the constraint is exceeded by.
+
+        Parameters
+        ----------
+        x : array-like
+            Vector of independent variables, (N, S), where N is number of
+            parameters and S is the number of solutions to be investigated.
+
+        Returns
+        -------
+        excess : array-like
+            How much the constraint is exceeded by, for each of the
+            constraints specified by `_ConstraintWrapper.fun`.
+            Has shape (M, S) where M is the number of constraint components.
+        """
+        # expect ev to have shape (num_constr, S) or (num_constr,)
+        ev = self.fun(np.asarray(x))
+
+        try:
+            excess_lb = np.maximum(self.bounds[0] - ev.T, 0)
+            excess_ub = np.maximum(ev.T - self.bounds[1], 0)
+        except ValueError as e:
+            raise RuntimeError("An array returned from a Constraint has"
+                               " the wrong shape. If `vectorized is False`"
+                               " the Constraint should return an array of"
+                               " shape (M,). If `vectorized is True` then"
+                               " the Constraint must return an array of"
+                               " shape (M, S), where S is the number of"
+                               " solution vectors and M is the number of"
+                               " constraint components in a given"
+                               " Constraint object.") from e
+
+        v = (excess_lb + excess_ub).T
+        return v
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..fe89bac4a6f6b828def53da54b5eac17d45a4019
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c01c38747dbef4b9c71e9b593316f466f484bca
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_direct_py.py
@@ -0,0 +1,280 @@
+from typing import (  # noqa: UP035
+    Any, Callable, Iterable
+)
+
+import numpy as np
+from scipy.optimize import OptimizeResult
+from ._constraints import old_bound_to_new, Bounds
+from ._direct import direct as _direct  # type: ignore
+
+__all__ = ['direct']
+
+ERROR_MESSAGES = (
+    "Number of function evaluations done is larger than maxfun={}",
+    "Number of iterations is larger than maxiter={}",
+    "u[i] < l[i] for some i",
+    "maxfun is too large",
+    "Initialization failed",
+    "There was an error in the creation of the sample points",
+    "An error occurred while the function was sampled",
+    "Maximum number of levels has been reached.",
+    "Forced stop",
+    "Invalid arguments",
+    "Out of memory",
+)
+
+SUCCESS_MESSAGES = (
+    ("The best function value found is within a relative error={} "
+     "of the (known) global optimum f_min"),
+    ("The volume of the hyperrectangle containing the lowest function value "
+     "found is below vol_tol={}"),
+    ("The side length measure of the hyperrectangle containing the lowest "
+     "function value found is below len_tol={}"),
+)
+
+
+def direct(
+    func: Callable[
+        [np.ndarray[tuple[int], np.dtype[np.float64]]],
+        float | np.floating[Any] | np.integer[Any] | np.bool_,
+    ],
+    bounds: Iterable | Bounds,
+    *,
+    args: tuple = (),
+    eps: float = 1e-4,
+    maxfun: int | None = None,
+    maxiter: int = 1000,
+    locally_biased: bool = True,
+    f_min: float = -np.inf,
+    f_min_rtol: float = 1e-4,
+    vol_tol: float = 1e-16,
+    len_tol: float = 1e-6,
+    callback: Callable[
+        [np.ndarray[tuple[int], np.dtype[np.float64]]],
+        object,
+    ] | None = None,
+) -> OptimizeResult:
+    """
+    Finds the global minimum of a function using the
+    DIRECT algorithm.
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized.
+        ``func(x, *args) -> float``
+        where ``x`` is an 1-D array with shape (n,) and ``args`` is a tuple of
+        the fixed parameters needed to completely specify the function.
+    bounds : sequence or `Bounds`
+        Bounds for variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. ``(min, max)`` pairs for each element in ``x``.
+
+    args : tuple, optional
+        Any additional fixed parameters needed to
+        completely specify the objective function.
+    eps : float, optional
+        Minimal required difference of the objective function values
+        between the current best hyperrectangle and the next potentially
+        optimal hyperrectangle to be divided. In consequence, `eps` serves as a
+        tradeoff between local and global search: the smaller, the more local
+        the search becomes. Default is 1e-4.
+    maxfun : int or None, optional
+        Approximate upper bound on objective function evaluations.
+        If `None`, will be automatically set to ``1000 * N`` where ``N``
+        represents the number of dimensions. Will be capped if necessary to
+        limit DIRECT's RAM usage to app. 1GiB. This will only occur for very
+        high dimensional problems and excessive `max_fun`. Default is `None`.
+    maxiter : int, optional
+        Maximum number of iterations. Default is 1000.
+    locally_biased : bool, optional
+        If `True` (default), use the locally biased variant of the
+        algorithm known as DIRECT_L. If `False`, use the original unbiased
+        DIRECT algorithm. For hard problems with many local minima,
+        `False` is recommended.
+    f_min : float, optional
+        Function value of the global optimum. Set this value only if the
+        global optimum is known. Default is ``-np.inf``, so that this
+        termination criterion is deactivated.
+    f_min_rtol : float, optional
+        Terminate the optimization once the relative error between the
+        current best minimum `f` and the supplied global minimum `f_min`
+        is smaller than `f_min_rtol`. This parameter is only used if
+        `f_min` is also set. Must lie between 0 and 1. Default is 1e-4.
+    vol_tol : float, optional
+        Terminate the optimization once the volume of the hyperrectangle
+        containing the lowest function value is smaller than `vol_tol`
+        of the complete search space. Must lie between 0 and 1.
+        Default is 1e-16.
+    len_tol : float, optional
+        If ``locally_biased=True``, terminate the optimization once half of
+        the normalized maximal side length of the hyperrectangle containing
+        the lowest function value is smaller than `len_tol`.
+        If ``locally_biased=False``, terminate the optimization once half of
+        the normalized diagonal of the hyperrectangle containing the lowest
+        function value is smaller than `len_tol`. Must lie between 0 and 1.
+        Default is 1e-6.
+    callback : callable, optional
+        A callback function with signature ``callback(xk)`` where ``xk``
+        represents the best function value found so far.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a ``OptimizeResult`` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the optimizer exited successfully and
+        ``message`` which describes the cause of the termination. See
+        `OptimizeResult` for a description of other attributes.
+
+    Notes
+    -----
+    DIviding RECTangles (DIRECT) is a deterministic global
+    optimization algorithm capable of minimizing a black box function with
+    its variables subject to lower and upper bound constraints by sampling
+    potential solutions in the search space [1]_. The algorithm starts by
+    normalising the search space to an n-dimensional unit hypercube.
+    It samples the function at the center of this hypercube and at 2n
+    (n is the number of variables) more points, 2 in each coordinate
+    direction. Using these function values, DIRECT then divides the
+    domain into hyperrectangles, each having exactly one of the sampling
+    points as its center. In each iteration, DIRECT chooses, using the `eps`
+    parameter which defaults to 1e-4, some of the existing hyperrectangles
+    to be further divided. This division process continues until either the
+    maximum number of iterations or maximum function evaluations allowed
+    are exceeded, or the hyperrectangle containing the minimal value found
+    so far becomes small enough. If `f_min` is specified, the optimization
+    will stop once this function value is reached within a relative tolerance.
+    The locally biased variant of DIRECT (originally called DIRECT_L) [2]_ is
+    used by default. It makes the search more locally biased and more
+    efficient for cases with only a few local minima.
+
+    A note about termination criteria: `vol_tol` refers to the volume of the
+    hyperrectangle containing the lowest function value found so far. This
+    volume decreases exponentially with increasing dimensionality of the
+    problem. Therefore `vol_tol` should be decreased to avoid premature
+    termination of the algorithm for higher dimensions. This does not hold
+    for `len_tol`: it refers either to half of the maximal side length
+    (for ``locally_biased=True``) or half of the diagonal of the
+    hyperrectangle (for ``locally_biased=False``).
+
+    This code is based on the DIRECT 2.0.4 Fortran code by Gablonsky et al. at
+    https://ctk.math.ncsu.edu/SOFTWARE/DIRECTv204.tar.gz .
+    This original version was initially converted via f2c and then cleaned up
+    and reorganized by Steven G. Johnson, August 2007, for the NLopt project.
+    The `direct` function wraps the C implementation.
+
+    .. versionadded:: 1.9.0
+
+    References
+    ----------
+    .. [1] Jones, D.R., Perttunen, C.D. & Stuckman, B.E. Lipschitzian
+        optimization without the Lipschitz constant. J Optim Theory Appl
+        79, 157-181 (1993).
+    .. [2] Gablonsky, J., Kelley, C. A Locally-Biased form of the DIRECT
+        Algorithm. Journal of Global Optimization 21, 27-37 (2001).
+
+    Examples
+    --------
+    The following example is a 2-D problem with four local minima: minimizing
+    the Styblinski-Tang function
+    (https://en.wikipedia.org/wiki/Test_functions_for_optimization).
+
+    >>> from scipy.optimize import direct, Bounds
+    >>> def styblinski_tang(pos):
+    ...     x, y = pos
+    ...     return 0.5 * (x**4 - 16*x**2 + 5*x + y**4 - 16*y**2 + 5*y)
+    >>> bounds = Bounds([-4., -4.], [4., 4.])
+    >>> result = direct(styblinski_tang, bounds)
+    >>> result.x, result.fun, result.nfev
+    array([-2.90321597, -2.90321597]), -78.3323279095383, 2011
+
+    The correct global minimum was found but with a huge number of function
+    evaluations (2011). Loosening the termination tolerances `vol_tol` and
+    `len_tol` can be used to stop DIRECT earlier.
+
+    >>> result = direct(styblinski_tang, bounds, len_tol=1e-3)
+    >>> result.x, result.fun, result.nfev
+    array([-2.9044353, -2.9044353]), -78.33230330754142, 207
+
+    """
+    # convert bounds to new Bounds class if necessary
+    if not isinstance(bounds, Bounds):
+        if isinstance(bounds, list) or isinstance(bounds, tuple):
+            lb, ub = old_bound_to_new(bounds)
+            bounds = Bounds(lb, ub)
+        else:
+            message = ("bounds must be a sequence or "
+                       "instance of Bounds class")
+            raise ValueError(message)
+
+    lb = np.ascontiguousarray(bounds.lb, dtype=np.float64)
+    ub = np.ascontiguousarray(bounds.ub, dtype=np.float64)
+
+    # validate bounds
+    # check that lower bounds are smaller than upper bounds
+    if not np.all(lb < ub):
+        raise ValueError('Bounds are not consistent min < max')
+    # check for infs
+    if (np.any(np.isinf(lb)) or np.any(np.isinf(ub))):
+        raise ValueError("Bounds must not be inf.")
+
+    # validate tolerances
+    if (vol_tol < 0 or vol_tol > 1):
+        raise ValueError("vol_tol must be between 0 and 1.")
+    if (len_tol < 0 or len_tol > 1):
+        raise ValueError("len_tol must be between 0 and 1.")
+    if (f_min_rtol < 0 or f_min_rtol > 1):
+        raise ValueError("f_min_rtol must be between 0 and 1.")
+
+    # validate maxfun and maxiter
+    if maxfun is None:
+        maxfun = 1000 * lb.shape[0]
+    if not isinstance(maxfun, int):
+        raise ValueError("maxfun must be of type int.")
+    if maxfun < 0:
+        raise ValueError("maxfun must be > 0.")
+    if not isinstance(maxiter, int):
+        raise ValueError("maxiter must be of type int.")
+    if maxiter < 0:
+        raise ValueError("maxiter must be > 0.")
+
+    # validate boolean parameters
+    if not isinstance(locally_biased, bool):
+        raise ValueError("locally_biased must be True or False.")
+
+    def _func_wrap(x, args=None):
+        x = np.asarray(x)
+        if args is None:
+            f = func(x)
+        else:
+            f = func(x, *args)
+        # always return a float
+        return np.asarray(f).item()
+
+    # TODO: fix disp argument
+    x, fun, ret_code, nfev, nit = _direct(
+        _func_wrap,
+        np.asarray(lb), np.asarray(ub),
+        args,
+        False, eps, maxfun, maxiter,
+        locally_biased,
+        f_min, f_min_rtol,
+        vol_tol, len_tol, callback
+    )
+
+    format_val = (maxfun, maxiter, f_min_rtol, vol_tol, len_tol)
+    if ret_code > 2:
+        message = SUCCESS_MESSAGES[ret_code - 3].format(
+                    format_val[ret_code - 1])
+    elif 0 < ret_code <= 2:
+        message = ERROR_MESSAGES[ret_code - 1].format(format_val[ret_code - 1])
+    elif 0 > ret_code > -100:
+        message = ERROR_MESSAGES[abs(ret_code) + 1]
+    else:
+        message = ERROR_MESSAGES[ret_code + 99]
+
+    return OptimizeResult(x=np.asarray(x), fun=fun, status=ret_code,
+                          success=ret_code > 2, message=message,
+                          nfev=nfev, nit=nit)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dual_annealing.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dual_annealing.py
new file mode 100644
index 0000000000000000000000000000000000000000..eb480a902c593ffee1d242d79018c9175bcc6d3a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_dual_annealing.py
@@ -0,0 +1,732 @@
+# Dual Annealing implementation.
+# Copyright (c) 2018 Sylvain Gubian ,
+# Yang Xiang 
+# Author: Sylvain Gubian, Yang Xiang, PMP S.A.
+
+"""
+A Dual Annealing global optimization algorithm
+"""
+
+import numpy as np
+from scipy.optimize import OptimizeResult
+from scipy.optimize import minimize, Bounds
+from scipy.special import gammaln
+from scipy._lib._util import check_random_state, _transition_to_rng
+from scipy.optimize._constraints import new_bounds_to_old
+
+__all__ = ['dual_annealing']
+
+
+class VisitingDistribution:
+    """
+    Class used to generate new coordinates based on the distorted
+    Cauchy-Lorentz distribution. Depending on the steps within the strategy
+    chain, the class implements the strategy for generating new location
+    changes.
+
+    Parameters
+    ----------
+    lb : array_like
+        A 1-D NumPy ndarray containing lower bounds of the generated
+        components. Neither NaN or inf are allowed.
+    ub : array_like
+        A 1-D NumPy ndarray containing upper bounds for the generated
+        components. Neither NaN or inf are allowed.
+    visiting_param : float
+        Parameter for visiting distribution. Default value is 2.62.
+        Higher values give the visiting distribution a heavier tail, this
+        makes the algorithm jump to a more distant region.
+        The value range is (1, 3]. Its value is fixed for the life of the
+        object.
+    rng_gen : {`~numpy.random.Generator`}
+        A `~numpy.random.Generator` object for generating new locations.
+        (can be a `~numpy.random.RandomState` object until SPEC007 transition
+         is fully complete).
+
+    """
+    TAIL_LIMIT = 1.e8
+    MIN_VISIT_BOUND = 1.e-10
+
+    def __init__(self, lb, ub, visiting_param, rng_gen):
+        # if you wish to make _visiting_param adjustable during the life of
+        # the object then _factor2, _factor3, _factor5, _d1, _factor6 will
+        # have to be dynamically calculated in `visit_fn`. They're factored
+        # out here so they don't need to be recalculated all the time.
+        self._visiting_param = visiting_param
+        self.rng_gen = rng_gen
+        self.lower = lb
+        self.upper = ub
+        self.bound_range = ub - lb
+
+        # these are invariant numbers unless visiting_param changes
+        self._factor2 = np.exp((4.0 - self._visiting_param) * np.log(
+            self._visiting_param - 1.0))
+        self._factor3 = np.exp((2.0 - self._visiting_param) * np.log(2.0)
+                               / (self._visiting_param - 1.0))
+        self._factor4_p = np.sqrt(np.pi) * self._factor2 / (self._factor3 * (
+            3.0 - self._visiting_param))
+
+        self._factor5 = 1.0 / (self._visiting_param - 1.0) - 0.5
+        self._d1 = 2.0 - self._factor5
+        self._factor6 = np.pi * (1.0 - self._factor5) / np.sin(
+            np.pi * (1.0 - self._factor5)) / np.exp(gammaln(self._d1))
+
+    def visiting(self, x, step, temperature):
+        """ Based on the step in the strategy chain, new coordinates are
+        generated by changing all components is the same time or only
+        one of them, the new values are computed with visit_fn method
+        """
+        dim = x.size
+        if step < dim:
+            # Changing all coordinates with a new visiting value
+            visits = self.visit_fn(temperature, dim)
+            upper_sample, lower_sample = self.rng_gen.uniform(size=2)
+            visits[visits > self.TAIL_LIMIT] = self.TAIL_LIMIT * upper_sample
+            visits[visits < -self.TAIL_LIMIT] = -self.TAIL_LIMIT * lower_sample
+            x_visit = visits + x
+            a = x_visit - self.lower
+            b = np.fmod(a, self.bound_range) + self.bound_range
+            x_visit = np.fmod(b, self.bound_range) + self.lower
+            x_visit[np.fabs(
+                x_visit - self.lower) < self.MIN_VISIT_BOUND] += 1.e-10
+        else:
+            # Changing only one coordinate at a time based on strategy
+            # chain step
+            x_visit = np.copy(x)
+            visit = self.visit_fn(temperature, 1)[0]
+            if visit > self.TAIL_LIMIT:
+                visit = self.TAIL_LIMIT * self.rng_gen.uniform()
+            elif visit < -self.TAIL_LIMIT:
+                visit = -self.TAIL_LIMIT * self.rng_gen.uniform()
+            index = step - dim
+            x_visit[index] = visit + x[index]
+            a = x_visit[index] - self.lower[index]
+            b = np.fmod(a, self.bound_range[index]) + self.bound_range[index]
+            x_visit[index] = np.fmod(b, self.bound_range[
+                index]) + self.lower[index]
+            if np.fabs(x_visit[index] - self.lower[
+                    index]) < self.MIN_VISIT_BOUND:
+                x_visit[index] += self.MIN_VISIT_BOUND
+        return x_visit
+
+    def visit_fn(self, temperature, dim):
+        """ Formula Visita from p. 405 of reference [2] """
+        x, y = self.rng_gen.normal(size=(dim, 2)).T
+
+        factor1 = np.exp(np.log(temperature) / (self._visiting_param - 1.0))
+        factor4 = self._factor4_p * factor1
+
+        # sigmax
+        x *= np.exp(-(self._visiting_param - 1.0) * np.log(
+            self._factor6 / factor4) / (3.0 - self._visiting_param))
+
+        den = np.exp((self._visiting_param - 1.0) * np.log(np.fabs(y)) /
+                     (3.0 - self._visiting_param))
+
+        return x / den
+
+
+class EnergyState:
+    """
+    Class used to record the energy state. At any time, it knows what is the
+    currently used coordinates and the most recent best location.
+
+    Parameters
+    ----------
+    lower : array_like
+        A 1-D NumPy ndarray containing lower bounds for generating an initial
+        random components in the `reset` method.
+    upper : array_like
+        A 1-D NumPy ndarray containing upper bounds for generating an initial
+        random components in the `reset` method
+        components. Neither NaN or inf are allowed.
+    callback : callable, ``callback(x, f, context)``, optional
+        A callback function which will be called for all minima found.
+        ``x`` and ``f`` are the coordinates and function value of the
+        latest minimum found, and `context` has value in [0, 1, 2]
+    """
+    # Maximum number of trials for generating a valid starting point
+    MAX_REINIT_COUNT = 1000
+
+    def __init__(self, lower, upper, callback=None):
+        self.ebest = None
+        self.current_energy = None
+        self.current_location = None
+        self.xbest = None
+        self.lower = lower
+        self.upper = upper
+        self.callback = callback
+
+    def reset(self, func_wrapper, rng_gen, x0=None):
+        """
+        Initialize current location is the search domain. If `x0` is not
+        provided, a random location within the bounds is generated.
+        """
+        if x0 is None:
+            self.current_location = rng_gen.uniform(self.lower, self.upper,
+                                                    size=len(self.lower))
+        else:
+            self.current_location = np.copy(x0)
+        init_error = True
+        reinit_counter = 0
+        while init_error:
+            self.current_energy = func_wrapper.fun(self.current_location)
+            if self.current_energy is None:
+                raise ValueError('Objective function is returning None')
+            if not np.isfinite(self.current_energy):
+                if reinit_counter >= EnergyState.MAX_REINIT_COUNT:
+                    init_error = False
+                    message = (
+                        'Stopping algorithm because function '
+                        'create NaN or (+/-) infinity values even with '
+                        'trying new random parameters'
+                    )
+                    raise ValueError(message)
+                self.current_location = rng_gen.uniform(self.lower,
+                                                        self.upper,
+                                                        size=self.lower.size)
+                reinit_counter += 1
+            else:
+                init_error = False
+            # If first time reset, initialize ebest and xbest
+            if self.ebest is None and self.xbest is None:
+                self.ebest = self.current_energy
+                self.xbest = np.copy(self.current_location)
+            # Otherwise, we keep them in case of reannealing reset
+
+    def update_best(self, e, x, context):
+        self.ebest = e
+        self.xbest = np.copy(x)
+        if self.callback is not None:
+            val = self.callback(x, e, context)
+            if val is not None:
+                if val:
+                    return ('Callback function requested to stop early by '
+                           'returning True')
+
+    def update_current(self, e, x):
+        self.current_energy = e
+        self.current_location = np.copy(x)
+
+
+class StrategyChain:
+    """
+    Class that implements within a Markov chain the strategy for location
+    acceptance and local search decision making.
+
+    Parameters
+    ----------
+    acceptance_param : float
+        Parameter for acceptance distribution. It is used to control the
+        probability of acceptance. The lower the acceptance parameter, the
+        smaller the probability of acceptance. Default value is -5.0 with
+        a range (-1e4, -5].
+    visit_dist : VisitingDistribution
+        Instance of `VisitingDistribution` class.
+    func_wrapper : ObjectiveFunWrapper
+        Instance of `ObjectiveFunWrapper` class.
+    minimizer_wrapper: LocalSearchWrapper
+        Instance of `LocalSearchWrapper` class.
+    rand_gen : {None, int, `numpy.random.Generator`,
+                `numpy.random.RandomState`}, optional
+
+        If `seed` is None (or `np.random`), the `numpy.random.RandomState`
+        singleton is used.
+        If `seed` is an int, a new ``RandomState`` instance is used,
+        seeded with `seed`.
+        If `seed` is already a ``Generator`` or ``RandomState`` instance then
+        that instance is used.
+    energy_state: EnergyState
+        Instance of `EnergyState` class.
+
+    """
+
+    def __init__(self, acceptance_param, visit_dist, func_wrapper,
+                 minimizer_wrapper, rand_gen, energy_state):
+        # Local strategy chain minimum energy and location
+        self.emin = energy_state.current_energy
+        self.xmin = np.array(energy_state.current_location)
+        # Global optimizer state
+        self.energy_state = energy_state
+        # Acceptance parameter
+        self.acceptance_param = acceptance_param
+        # Visiting distribution instance
+        self.visit_dist = visit_dist
+        # Wrapper to objective function
+        self.func_wrapper = func_wrapper
+        # Wrapper to the local minimizer
+        self.minimizer_wrapper = minimizer_wrapper
+        self.not_improved_idx = 0
+        self.not_improved_max_idx = 1000
+        self._rand_gen = rand_gen
+        self.temperature_step = 0
+        self.K = 100 * len(energy_state.current_location)
+
+    def accept_reject(self, j, e, x_visit):
+        r = self._rand_gen.uniform()
+        pqv_temp = 1.0 - ((1.0 - self.acceptance_param) *
+            (e - self.energy_state.current_energy) / self.temperature_step)
+        if pqv_temp <= 0.:
+            pqv = 0.
+        else:
+            pqv = np.exp(np.log(pqv_temp) / (
+                1. - self.acceptance_param))
+
+        if r <= pqv:
+            # We accept the new location and update state
+            self.energy_state.update_current(e, x_visit)
+            self.xmin = np.copy(self.energy_state.current_location)
+
+        # No improvement for a long time
+        if self.not_improved_idx >= self.not_improved_max_idx:
+            if j == 0 or self.energy_state.current_energy < self.emin:
+                self.emin = self.energy_state.current_energy
+                self.xmin = np.copy(self.energy_state.current_location)
+
+    def run(self, step, temperature):
+        self.temperature_step = temperature / float(step + 1)
+        self.not_improved_idx += 1
+        for j in range(self.energy_state.current_location.size * 2):
+            if j == 0:
+                if step == 0:
+                    self.energy_state_improved = True
+                else:
+                    self.energy_state_improved = False
+            x_visit = self.visit_dist.visiting(
+                self.energy_state.current_location, j, temperature)
+            # Calling the objective function
+            e = self.func_wrapper.fun(x_visit)
+            if e < self.energy_state.current_energy:
+                # We have got a better energy value
+                self.energy_state.update_current(e, x_visit)
+                if e < self.energy_state.ebest:
+                    val = self.energy_state.update_best(e, x_visit, 0)
+                    if val is not None:
+                        if val:
+                            return val
+                    self.energy_state_improved = True
+                    self.not_improved_idx = 0
+            else:
+                # We have not improved but do we accept the new location?
+                self.accept_reject(j, e, x_visit)
+            if self.func_wrapper.nfev >= self.func_wrapper.maxfun:
+                return ('Maximum number of function call reached '
+                        'during annealing')
+        # End of StrategyChain loop
+
+    def local_search(self):
+        # Decision making for performing a local search
+        # based on strategy chain results
+        # If energy has been improved or no improvement since too long,
+        # performing a local search with the best strategy chain location
+        if self.energy_state_improved:
+            # Global energy has improved, let's see if LS improves further
+            e, x = self.minimizer_wrapper.local_search(self.energy_state.xbest,
+                                                       self.energy_state.ebest)
+            if e < self.energy_state.ebest:
+                self.not_improved_idx = 0
+                val = self.energy_state.update_best(e, x, 1)
+                if val is not None:
+                    if val:
+                        return val
+                self.energy_state.update_current(e, x)
+            if self.func_wrapper.nfev >= self.func_wrapper.maxfun:
+                return ('Maximum number of function call reached '
+                        'during local search')
+        # Check probability of a need to perform a LS even if no improvement
+        do_ls = False
+        if self.K < 90 * len(self.energy_state.current_location):
+            pls = np.exp(self.K * (
+                self.energy_state.ebest - self.energy_state.current_energy) /
+                self.temperature_step)
+            if pls >= self._rand_gen.uniform():
+                do_ls = True
+        # Global energy not improved, let's see what LS gives
+        # on the best strategy chain location
+        if self.not_improved_idx >= self.not_improved_max_idx:
+            do_ls = True
+        if do_ls:
+            e, x = self.minimizer_wrapper.local_search(self.xmin, self.emin)
+            self.xmin = np.copy(x)
+            self.emin = e
+            self.not_improved_idx = 0
+            self.not_improved_max_idx = self.energy_state.current_location.size
+            if e < self.energy_state.ebest:
+                val = self.energy_state.update_best(
+                    self.emin, self.xmin, 2)
+                if val is not None:
+                    if val:
+                        return val
+                self.energy_state.update_current(e, x)
+            if self.func_wrapper.nfev >= self.func_wrapper.maxfun:
+                return ('Maximum number of function call reached '
+                        'during dual annealing')
+
+
+class ObjectiveFunWrapper:
+
+    def __init__(self, func, maxfun=1e7, *args):
+        self.func = func
+        self.args = args
+        # Number of objective function evaluations
+        self.nfev = 0
+        # Number of gradient function evaluation if used
+        self.ngev = 0
+        # Number of hessian of the objective function if used
+        self.nhev = 0
+        self.maxfun = maxfun
+
+    def fun(self, x):
+        self.nfev += 1
+        return self.func(x, *self.args)
+
+
+class LocalSearchWrapper:
+    """
+    Class used to wrap around the minimizer used for local search
+    Default local minimizer is SciPy minimizer L-BFGS-B
+    """
+
+    LS_MAXITER_RATIO = 6
+    LS_MAXITER_MIN = 100
+    LS_MAXITER_MAX = 1000
+
+    def __init__(self, search_bounds, func_wrapper, *args, **kwargs):
+        self.func_wrapper = func_wrapper
+        self.kwargs = kwargs
+        self.jac = self.kwargs.get('jac', None)
+        self.hess = self.kwargs.get('hess', None)
+        self.hessp = self.kwargs.get('hessp', None)
+        self.kwargs.pop("args", None)
+        self.minimizer = minimize
+        bounds_list = list(zip(*search_bounds))
+        self.lower = np.array(bounds_list[0])
+        self.upper = np.array(bounds_list[1])
+
+        # If no minimizer specified, use SciPy minimize with 'L-BFGS-B' method
+        if not self.kwargs:
+            n = len(self.lower)
+            ls_max_iter = min(max(n * self.LS_MAXITER_RATIO,
+                                  self.LS_MAXITER_MIN),
+                              self.LS_MAXITER_MAX)
+            self.kwargs['method'] = 'L-BFGS-B'
+            self.kwargs['options'] = {
+                'maxiter': ls_max_iter,
+            }
+            self.kwargs['bounds'] = list(zip(self.lower, self.upper))
+        else:
+            if callable(self.jac):
+                def wrapped_jac(x):
+                    return self.jac(x, *args)
+                self.kwargs['jac'] = wrapped_jac
+            if callable(self.hess):
+                def wrapped_hess(x):
+                    return self.hess(x, *args)
+                self.kwargs['hess'] = wrapped_hess
+            if callable(self.hessp):
+                def wrapped_hessp(x, p):
+                    return self.hessp(x, p, *args)
+                self.kwargs['hessp'] = wrapped_hessp
+
+    def local_search(self, x, e):
+        # Run local search from the given x location where energy value is e
+        x_tmp = np.copy(x)
+        mres = self.minimizer(self.func_wrapper.fun, x, **self.kwargs)
+        if 'njev' in mres:
+            self.func_wrapper.ngev += mres.njev
+        if 'nhev' in mres:
+            self.func_wrapper.nhev += mres.nhev
+        # Check if is valid value
+        is_finite = np.all(np.isfinite(mres.x)) and np.isfinite(mres.fun)
+        in_bounds = np.all(mres.x >= self.lower) and np.all(
+            mres.x <= self.upper)
+        is_valid = is_finite and in_bounds
+
+        # Use the new point only if it is valid and return a better results
+        if is_valid and mres.fun < e:
+            return mres.fun, mres.x
+        else:
+            return e, x_tmp
+
+
+@_transition_to_rng("seed", position_num=10)
+def dual_annealing(func, bounds, args=(), maxiter=1000,
+                   minimizer_kwargs=None, initial_temp=5230.,
+                   restart_temp_ratio=2.e-5, visit=2.62, accept=-5.0,
+                   maxfun=1e7, rng=None, no_local_search=False,
+                   callback=None, x0=None):
+    """
+    Find the global minimum of a function using Dual Annealing.
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized. Must be in the form
+        ``f(x, *args)``, where ``x`` is the argument in the form of a 1-D array
+        and ``args`` is a  tuple of any additional fixed parameters needed to
+        completely specify the function.
+    bounds : sequence or `Bounds`
+        Bounds for variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. Sequence of ``(min, max)`` pairs for each element in `x`.
+
+    args : tuple, optional
+        Any additional fixed parameters needed to completely specify the
+        objective function.
+    maxiter : int, optional
+        The maximum number of global search iterations. Default value is 1000.
+    minimizer_kwargs : dict, optional
+        Keyword arguments to be passed to the local minimizer
+        (`minimize`). An important option could be ``method`` for the minimizer
+        method to use.
+        If no keyword arguments are provided, the local minimizer defaults to
+        'L-BFGS-B' and uses the already supplied bounds. If `minimizer_kwargs`
+        is specified, then the dict must contain all parameters required to
+        control the local minimization. `args` is ignored in this dict, as it is
+        passed automatically. `bounds` is not automatically passed on to the
+        local minimizer as the method may not support them.
+    initial_temp : float, optional
+        The initial temperature, use higher values to facilitates a wider
+        search of the energy landscape, allowing dual_annealing to escape
+        local minima that it is trapped in. Default value is 5230. Range is
+        (0.01, 5.e4].
+    restart_temp_ratio : float, optional
+        During the annealing process, temperature is decreasing, when it
+        reaches ``initial_temp * restart_temp_ratio``, the reannealing process
+        is triggered. Default value of the ratio is 2e-5. Range is (0, 1).
+    visit : float, optional
+        Parameter for visiting distribution. Default value is 2.62. Higher
+        values give the visiting distribution a heavier tail, this makes
+        the algorithm jump to a more distant region. The value range is (1, 3].
+    accept : float, optional
+        Parameter for acceptance distribution. It is used to control the
+        probability of acceptance. The lower the acceptance parameter, the
+        smaller the probability of acceptance. Default value is -5.0 with
+        a range (-1e4, -5].
+    maxfun : int, optional
+        Soft limit for the number of objective function calls. If the
+        algorithm is in the middle of a local search, this number will be
+        exceeded, the algorithm will stop just after the local search is
+        done. Default value is 1e7.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a `Generator`.
+
+        Specify `rng` for repeatable minimizations. The random numbers
+        generated only affect the visiting distribution function
+        and new coordinates generation.
+    no_local_search : bool, optional
+        If `no_local_search` is set to True, a traditional Generalized
+        Simulated Annealing will be performed with no local search
+        strategy applied.
+    callback : callable, optional
+        A callback function with signature ``callback(x, f, context)``,
+        which will be called for all minima found.
+        ``x`` and ``f`` are the coordinates and function value of the
+        latest minimum found, and ``context`` has one of the following
+        values:
+
+        - ``0``: minimum detected in the annealing process.
+        - ``1``: detection occurred in the local search process.
+        - ``2``: detection done in the dual annealing process.
+
+        If the callback implementation returns True, the algorithm will stop.
+    x0 : ndarray, shape(n,), optional
+        Coordinates of a single N-D starting point.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a `OptimizeResult` object.
+        Important attributes are: ``x`` the solution array, ``fun`` the value
+        of the function at the solution, and ``message`` which describes the
+        cause of the termination.
+        See `OptimizeResult` for a description of other attributes.
+
+    Notes
+    -----
+    This function implements the Dual Annealing optimization. This stochastic
+    approach derived from [3]_ combines the generalization of CSA (Classical
+    Simulated Annealing) and FSA (Fast Simulated Annealing) [1]_ [2]_ coupled
+    to a strategy for applying a local search on accepted locations [4]_.
+    An alternative implementation of this same algorithm is described in [5]_
+    and benchmarks are presented in [6]_. This approach introduces an advanced
+    method to refine the solution found by the generalized annealing
+    process. This algorithm uses a distorted Cauchy-Lorentz visiting
+    distribution, with its shape controlled by the parameter :math:`q_{v}`
+
+    .. math::
+
+        g_{q_{v}}(\\Delta x(t)) \\propto \\frac{ \\
+        \\left[T_{q_{v}}(t) \\right]^{-\\frac{D}{3-q_{v}}}}{ \\
+        \\left[{1+(q_{v}-1)\\frac{(\\Delta x(t))^{2}} { \\
+        \\left[T_{q_{v}}(t)\\right]^{\\frac{2}{3-q_{v}}}}}\\right]^{ \\
+        \\frac{1}{q_{v}-1}+\\frac{D-1}{2}}}
+
+    Where :math:`t` is the artificial time. This visiting distribution is used
+    to generate a trial jump distance :math:`\\Delta x(t)` of variable
+    :math:`x(t)` under artificial temperature :math:`T_{q_{v}}(t)`.
+
+    From the starting point, after calling the visiting distribution
+    function, the acceptance probability is computed as follows:
+
+    .. math::
+
+        p_{q_{a}} = \\min{\\{1,\\left[1-(1-q_{a}) \\beta \\Delta E \\right]^{ \\
+        \\frac{1}{1-q_{a}}}\\}}
+
+    Where :math:`q_{a}` is a acceptance parameter. For :math:`q_{a}<1`, zero
+    acceptance probability is assigned to the cases where
+
+    .. math::
+
+        [1-(1-q_{a}) \\beta \\Delta E] < 0
+
+    The artificial temperature :math:`T_{q_{v}}(t)` is decreased according to
+
+    .. math::
+
+        T_{q_{v}}(t) = T_{q_{v}}(1) \\frac{2^{q_{v}-1}-1}{\\left( \\
+        1 + t\\right)^{q_{v}-1}-1}
+
+    Where :math:`q_{v}` is the visiting parameter.
+
+    .. versionadded:: 1.2.0
+
+    References
+    ----------
+    .. [1] Tsallis C. Possible generalization of Boltzmann-Gibbs
+        statistics. Journal of Statistical Physics, 52, 479-487 (1998).
+    .. [2] Tsallis C, Stariolo DA. Generalized Simulated Annealing.
+        Physica A, 233, 395-406 (1996).
+    .. [3] Xiang Y, Sun DY, Fan W, Gong XG. Generalized Simulated
+        Annealing Algorithm and Its Application to the Thomson Model.
+        Physics Letters A, 233, 216-220 (1997).
+    .. [4] Xiang Y, Gong XG. Efficiency of Generalized Simulated
+        Annealing. Physical Review E, 62, 4473 (2000).
+    .. [5] Xiang Y, Gubian S, Suomela B, Hoeng J. Generalized
+        Simulated Annealing for Efficient Global Optimization: the GenSA
+        Package for R. The R Journal, Volume 5/1 (2013).
+    .. [6] Mullen, K. Continuous Global Optimization in R. Journal of
+        Statistical Software, 60(6), 1 - 45, (2014).
+        :doi:`10.18637/jss.v060.i06`
+
+    Examples
+    --------
+    The following example is a 10-D problem, with many local minima.
+    The function involved is called Rastrigin
+    (https://en.wikipedia.org/wiki/Rastrigin_function)
+
+    >>> import numpy as np
+    >>> from scipy.optimize import dual_annealing
+    >>> func = lambda x: np.sum(x*x - 10*np.cos(2*np.pi*x)) + 10*np.size(x)
+    >>> lw = [-5.12] * 10
+    >>> up = [5.12] * 10
+    >>> ret = dual_annealing(func, bounds=list(zip(lw, up)))
+    >>> ret.x
+    array([-4.26437714e-09, -3.91699361e-09, -1.86149218e-09, -3.97165720e-09,
+           -6.29151648e-09, -6.53145322e-09, -3.93616815e-09, -6.55623025e-09,
+           -6.05775280e-09, -5.00668935e-09]) # random
+    >>> ret.fun
+    0.000000
+
+    """
+
+    if isinstance(bounds, Bounds):
+        bounds = new_bounds_to_old(bounds.lb, bounds.ub, len(bounds.lb))
+
+    if x0 is not None and not len(x0) == len(bounds):
+        raise ValueError('Bounds size does not match x0')
+
+    lu = list(zip(*bounds))
+    lower = np.array(lu[0])
+    upper = np.array(lu[1])
+    # Check that restart temperature ratio is correct
+    if restart_temp_ratio <= 0. or restart_temp_ratio >= 1.:
+        raise ValueError('Restart temperature ratio has to be in range (0, 1)')
+    # Checking bounds are valid
+    if (np.any(np.isinf(lower)) or np.any(np.isinf(upper)) or np.any(
+            np.isnan(lower)) or np.any(np.isnan(upper))):
+        raise ValueError('Some bounds values are inf values or nan values')
+    # Checking that bounds are consistent
+    if not np.all(lower < upper):
+        raise ValueError('Bounds are not consistent min < max')
+    # Checking that bounds are the same length
+    if not len(lower) == len(upper):
+        raise ValueError('Bounds do not have the same dimensions')
+
+    # Wrapper for the objective function
+    func_wrapper = ObjectiveFunWrapper(func, maxfun, *args)
+
+    # minimizer_kwargs has to be a dict, not None
+    minimizer_kwargs = minimizer_kwargs or {}
+
+    minimizer_wrapper = LocalSearchWrapper(
+        bounds, func_wrapper, *args, **minimizer_kwargs)
+
+    # Initialization of random Generator for reproducible runs if rng provided
+    rng_gen = check_random_state(rng)
+    # Initialization of the energy state
+    energy_state = EnergyState(lower, upper, callback)
+    energy_state.reset(func_wrapper, rng_gen, x0)
+    # Minimum value of annealing temperature reached to perform
+    # re-annealing
+    temperature_restart = initial_temp * restart_temp_ratio
+    # VisitingDistribution instance
+    visit_dist = VisitingDistribution(lower, upper, visit, rng_gen)
+    # Strategy chain instance
+    strategy_chain = StrategyChain(accept, visit_dist, func_wrapper,
+                                   minimizer_wrapper, rng_gen, energy_state)
+    need_to_stop = False
+    iteration = 0
+    message = []
+    # OptimizeResult object to be returned
+    optimize_res = OptimizeResult()
+    optimize_res.success = True
+    optimize_res.status = 0
+
+    t1 = np.exp((visit - 1) * np.log(2.0)) - 1.0
+    # Run the search loop
+    while not need_to_stop:
+        for i in range(maxiter):
+            # Compute temperature for this step
+            s = float(i) + 2.0
+            t2 = np.exp((visit - 1) * np.log(s)) - 1.0
+            temperature = initial_temp * t1 / t2
+            if iteration >= maxiter:
+                message.append("Maximum number of iteration reached")
+                need_to_stop = True
+                break
+            # Need a re-annealing process?
+            if temperature < temperature_restart:
+                energy_state.reset(func_wrapper, rng_gen)
+                break
+            # starting strategy chain
+            val = strategy_chain.run(i, temperature)
+            if val is not None:
+                message.append(val)
+                need_to_stop = True
+                optimize_res.success = False
+                break
+            # Possible local search at the end of the strategy chain
+            if not no_local_search:
+                val = strategy_chain.local_search()
+                if val is not None:
+                    message.append(val)
+                    need_to_stop = True
+                    optimize_res.success = False
+                    break
+            iteration += 1
+
+    # Setting the OptimizeResult values
+    optimize_res.x = energy_state.xbest
+    optimize_res.fun = energy_state.ebest
+    optimize_res.nit = iteration
+    optimize_res.nfev = func_wrapper.nfev
+    optimize_res.njev = func_wrapper.ngev
+    optimize_res.nhev = func_wrapper.nhev
+    optimize_res.message = message
+    return optimize_res
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_elementwise.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_elementwise.py
new file mode 100644
index 0000000000000000000000000000000000000000..883c644dbcbbb954ea3e3c184bd610b28f05cca8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_elementwise.py
@@ -0,0 +1,801 @@
+from scipy.optimize._bracket import _bracket_root, _bracket_minimum
+from scipy.optimize._chandrupatla import _chandrupatla, _chandrupatla_minimize
+from scipy._lib._util import _RichResult
+
+
+def find_root(f, init, /, *, args=(), tolerances=None, maxiter=None, callback=None):
+    """Find the root of a monotonic, real-valued function of a real variable.
+
+    For each element of the output of `f`, `find_root` seeks the scalar
+    root that makes the element 0. This function currently uses Chandrupatla's
+    bracketing algorithm [1]_ and therefore requires argument `init` to
+    provide a bracket around the root: the function values at the two endpoints
+    must have opposite signs.
+
+    Provided a valid bracket, `find_root` is guaranteed to converge to a solution
+    that satisfies the provided `tolerances` if the function is continuous within
+    the bracket.
+
+    This function works elementwise when `init` and `args` contain (broadcastable)
+    arrays.
+
+    Parameters
+    ----------
+    f : callable
+        The function whose root is desired. The signature must be::
+
+            f(x: array, *args) -> array
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``.
+
+        `f` must be an elementwise function: each element ``f(x)[i]``
+        must equal ``f(x[i])`` for all indices ``i``. It must not mutate the
+        array ``x`` or the arrays in ``args``.
+
+        `find_root` seeks an array ``x`` such that ``f(x)`` is an array of zeros.
+    init : 2-tuple of float array_like
+        The lower and upper endpoints of a bracket surrounding the desired root.
+        A bracket is valid if arrays ``xl, xr = init`` satisfy ``xl < xr`` and
+        ``sign(f(xl)) == -sign(f(xr))`` elementwise. Arrays be broadcastable with
+        one another and `args`.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`. Arrays
+        must be broadcastable with one another and the arrays of `init`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    tolerances : dictionary of floats, optional
+        Absolute and relative tolerances on the root and function value.
+        Valid keys of the dictionary are:
+
+        - ``xatol`` - absolute tolerance on the root
+        - ``xrtol`` - relative tolerance on the root
+        - ``fatol`` - absolute tolerance on the function value
+        - ``frtol`` - relative tolerance on the function value
+
+        See Notes for default values and explicit termination conditions.
+    maxiter : int, optional
+        The maximum number of iterations of the algorithm to perform.
+        The default is the maximum possible number of bisections within
+        the (normal) floating point numbers of the relevant dtype.
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `find_root` (but containing the current
+        iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `find_root` will return a result. `callback` must not mutate
+        `res` or its attributes.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : The initial bracket was invalid.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : Iteration was terminated by `callback`.
+            - ``1`` : The algorithm is proceeding normally (in `callback` only).
+
+        x : float array
+            The root of the function, if the algorithm terminated successfully.
+        f_x : float array
+            The value of `f` evaluated at `x`.
+        nfev : int array
+            The number of abscissae at which `f` was evaluated to find the root.
+            This is distinct from the number of times `f` is *called* because the
+            the function may evaluated at multiple points in a single call.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+        bracket : tuple of float arrays
+            The lower and upper endpoints of the final bracket.
+        f_bracket : tuple of float arrays
+            The value of `f` evaluated at the lower and upper endpoints of the
+            bracket.
+
+    Notes
+    -----
+    Implemented based on Chandrupatla's original paper [1]_.
+
+    Let:
+
+    -  ``a, b = init`` be the left and right endpoints of the initial bracket,
+    - ``xl`` and ``xr`` be the left and right endpoints of the final bracket,
+    - ``xmin = xl if abs(f(xl)) <= abs(f(xr)) else xr`` be the final bracket
+      endpoint with the smaller function value, and
+    - ``fmin0 = min(f(a), f(b))`` be the minimum of the two values of the
+      function evaluated at the initial bracket endpoints.
+
+    Then the algorithm is considered to have converged when
+
+    - ``abs(xr - xl) < xatol + abs(xmin) * xrtol`` or
+    - ``fun(xmin) <= fatol + abs(fmin0) * frtol``.
+
+    This is equivalent to the termination condition described in [1]_ with
+    ``xrtol = 4e-10``, ``xatol = 1e-5``, and ``fatol = frtol = 0``.
+    However, the default values of the `tolerances` dictionary are
+    ``xatol = 4*tiny``, ``xrtol = 4*eps``, ``frtol = 0``, and ``fatol = tiny``,
+    where ``eps`` and ``tiny`` are the precision and smallest normal number
+    of the result ``dtype`` of function inputs and outputs.
+
+    References
+    ----------
+
+    .. [1] Chandrupatla, Tirupathi R.
+        "A new hybrid quadratic/bisection algorithm for finding the zero of a
+        nonlinear function without using derivatives".
+        Advances in Engineering Software, 28(3), 145-149.
+        https://doi.org/10.1016/s0965-9978(96)00051-8
+
+    See Also
+    --------
+    bracket_root
+
+    Examples
+    --------
+    Suppose we wish to find the root of the following function.
+
+    >>> def f(x, c=5):
+    ...     return x**3 - 2*x - c
+
+    First, we must find a valid bracket. The function is not monotonic,
+    but `bracket_root` may be able to provide a bracket.
+
+    >>> from scipy.optimize import elementwise
+    >>> res_bracket = elementwise.bracket_root(f, 0)
+    >>> res_bracket.success
+    True
+    >>> res_bracket.bracket
+    (2.0, 4.0)
+
+    Indeed, the values of the function at the bracket endpoints have
+    opposite signs.
+
+    >>> res_bracket.f_bracket
+    (-1.0, 51.0)
+
+    Once we have a valid bracket, `find_root` can be used to provide
+    a precise root.
+
+    >>> res_root = elementwise.find_root(f, res_bracket.bracket)
+    >>> res_root.x
+    2.0945514815423265
+
+    The final bracket is only a few ULPs wide, so the error between
+    this value and the true root cannot be much smaller within values
+    that are representable in double precision arithmetic.
+
+    >>> import numpy as np
+    >>> xl, xr = res_root.bracket
+    >>> (xr - xl) / np.spacing(xl)
+    2.0
+    >>> res_root.f_bracket
+    (-8.881784197001252e-16, 9.769962616701378e-15)
+
+    `bracket_root` and `find_root` accept arrays for most arguments.
+    For instance, to find the root for a few values of the parameter ``c``
+    at once:
+
+    >>> c = np.asarray([3, 4, 5])
+    >>> res_bracket = elementwise.bracket_root(f, 0, args=(c,))
+    >>> res_bracket.bracket
+    (array([1., 1., 2.]), array([2., 2., 4.]))
+    >>> res_root = elementwise.find_root(f, res_bracket.bracket, args=(c,))
+    >>> res_root.x
+    array([1.8932892 , 2.        , 2.09455148])
+
+    """
+
+    def reformat_result(res_in):
+        res_out = _RichResult()
+        res_out.status = res_in.status
+        res_out.success = res_in.success
+        res_out.x = res_in.x
+        res_out.f_x = res_in.fun
+        res_out.nfev = res_in.nfev
+        res_out.nit = res_in.nit
+        res_out.bracket = (res_in.xl, res_in.xr)
+        res_out.f_bracket = (res_in.fl, res_in.fr)
+        res_out._order_keys = ['success', 'status', 'x', 'f_x',
+                               'nfev', 'nit', 'bracket', 'f_bracket']
+        return res_out
+
+    xl, xr = init
+    default_tolerances = dict(xatol=None, xrtol=None, fatol=None, frtol=0)
+    tolerances = {} if tolerances is None else tolerances
+    default_tolerances.update(tolerances)
+    tolerances = default_tolerances
+
+    if callable(callback):
+        def _callback(res):
+            return callback(reformat_result(res))
+    else:
+        _callback = callback
+
+    res = _chandrupatla(f, xl, xr, args=args, **tolerances,
+                        maxiter=maxiter, callback=_callback)
+    return reformat_result(res)
+
+
+def find_minimum(f, init, /, *, args=(), tolerances=None, maxiter=100, callback=None):
+    """Find the minimum of an unimodal, real-valued function of a real variable.
+
+    For each element of the output of `f`, `find_minimum` seeks the scalar minimizer
+    that minimizes the element. This function currently uses Chandrupatla's
+    bracketing minimization algorithm [1]_ and therefore requires argument `init`
+    to provide a three-point minimization bracket: ``x1 < x2 < x3`` such that
+    ``func(x1) >= func(x2) <= func(x3)``, where one of the inequalities is strict.
+
+    Provided a valid bracket, `find_minimum` is guaranteed to converge to a local
+    minimum that satisfies the provided `tolerances` if the function is continuous
+    within the bracket.
+
+    This function works elementwise when `init` and `args` contain (broadcastable)
+    arrays.
+
+    Parameters
+    ----------
+    f : callable
+        The function whose minimizer is desired. The signature must be::
+
+            f(x: array, *args) -> array
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``.
+
+        `f` must be an elementwise function: each element ``f(x)[i]``
+        must equal ``f(x[i])`` for all indices ``i``. It must not mutate the
+        array ``x`` or the arrays in ``args``.
+
+        `find_minimum` seeks an array ``x`` such that ``f(x)`` is an array of
+        local minima.
+    init : 3-tuple of float array_like
+        The abscissae of a standard scalar minimization bracket. A bracket is
+        valid if arrays ``x1, x2, x3 = init`` satisfy ``x1 < x2 < x3`` and
+        ``func(x1) >= func(x2) <= func(x3)``, where one of the inequalities
+        is strict. Arrays must be broadcastable with one another and the arrays
+        of `args`.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`. Arrays
+        must be broadcastable with one another and the arrays of `init`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    tolerances : dictionary of floats, optional
+        Absolute and relative tolerances on the root and function value.
+        Valid keys of the dictionary are:
+
+        - ``xatol`` - absolute tolerance on the root
+        - ``xrtol`` - relative tolerance on the root
+        - ``fatol`` - absolute tolerance on the function value
+        - ``frtol`` - relative tolerance on the function value
+
+        See Notes for default values and explicit termination conditions.
+    maxiter : int, default: 100
+        The maximum number of iterations of the algorithm to perform.
+    callback : callable, optional
+        An optional user-supplied function to be called before the first
+        iteration and after each iteration.
+        Called as ``callback(res)``, where ``res`` is a ``_RichResult``
+        similar to that returned by `find_minimum` (but containing the current
+        iterate's values of all variables). If `callback` raises a
+        ``StopIteration``, the algorithm will terminate immediately and
+        `find_root` will return a result. `callback` must not mutate
+        `res` or its attributes.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm converged to the specified tolerances.
+            - ``-1`` : The algorithm encountered an invalid bracket.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : Iteration was terminated by `callback`.
+            - ``1`` : The algorithm is proceeding normally (in `callback` only).
+
+        x : float array
+            The minimizer of the function, if the algorithm terminated successfully.
+        f_x : float array
+            The value of `f` evaluated at `x`.
+        nfev : int array
+            The number of abscissae at which `f` was evaluated to find the root.
+            This is distinct from the number of times `f` is *called* because the
+            the function may evaluated at multiple points in a single call.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+        bracket : tuple of float arrays
+            The final three-point bracket.
+        f_bracket : tuple of float arrays
+            The value of `f` evaluated at the bracket points.
+
+    Notes
+    -----
+    Implemented based on Chandrupatla's original paper [1]_.
+
+    If ``xl < xm < xr`` are the points of the bracket and ``fl >= fm <= fr``
+    (where one of the inequalities is strict) are the values of `f` evaluated
+    at those points, then the algorithm is considered to have converged when:
+
+    - ``xr - xl <= abs(xm)*xrtol + xatol`` or
+    - ``(fl - 2*fm + fr)/2 <= abs(fm)*frtol + fatol``.
+
+    Note that first of these differs from the termination conditions described
+    in [1]_.
+
+    The default value of `xrtol` is the square root of the precision of the
+    appropriate dtype, and ``xatol = fatol = frtol`` is the smallest normal
+    number of the appropriate dtype.
+
+    References
+    ----------
+
+    .. [1] Chandrupatla, Tirupathi R. (1998).
+        "An efficient quadratic fit-sectioning algorithm for minimization
+        without derivatives".
+        Computer Methods in Applied Mechanics and Engineering, 152 (1-2),
+        211-217. https://doi.org/10.1016/S0045-7825(97)00190-4
+
+    See Also
+    --------
+    bracket_minimum
+
+    Examples
+    --------
+    Suppose we wish to minimize the following function.
+
+    >>> def f(x, c=1):
+    ...     return (x - c)**2 + 2
+
+    First, we must find a valid bracket. The function is unimodal,
+    so `bracket_minium` will easily find a bracket.
+
+    >>> from scipy.optimize import elementwise
+    >>> res_bracket = elementwise.bracket_minimum(f, 0)
+    >>> res_bracket.success
+    True
+    >>> res_bracket.bracket
+    (0.0, 0.5, 1.5)
+
+    Indeed, the bracket points are ordered and the function value
+    at the middle bracket point is less than at the surrounding
+    points.
+
+    >>> xl, xm, xr = res_bracket.bracket
+    >>> fl, fm, fr = res_bracket.f_bracket
+    >>> (xl < xm < xr) and (fl > fm <= fr)
+    True
+
+    Once we have a valid bracket, `find_minimum` can be used to provide
+    an estimate of the minimizer.
+
+    >>> res_minimum = elementwise.find_minimum(f, res_bracket.bracket)
+    >>> res_minimum.x
+    1.0000000149011612
+
+    The function value changes by only a few ULPs within the bracket, so
+    the minimizer cannot be determined much more precisely by evaluating
+    the function alone (i.e. we would need its derivative to do better).
+
+    >>> import numpy as np
+    >>> fl, fm, fr = res_minimum.f_bracket
+    >>> (fl - fm) / np.spacing(fm), (fr - fm) / np.spacing(fm)
+    (0.0, 2.0)
+
+    Therefore, a precise minimum of the function is given by:
+
+    >>> res_minimum.f_x
+    2.0
+
+    `bracket_minimum` and `find_minimum` accept arrays for most arguments.
+    For instance, to find the minimizers and minima for a few values of the
+    parameter ``c`` at once:
+
+    >>> c = np.asarray([1, 1.5, 2])
+    >>> res_bracket = elementwise.bracket_minimum(f, 0, args=(c,))
+    >>> res_bracket.bracket
+    (array([0. , 0.5, 0.5]), array([0.5, 1.5, 1.5]), array([1.5, 2.5, 2.5]))
+    >>> res_minimum = elementwise.find_minimum(f, res_bracket.bracket, args=(c,))
+    >>> res_minimum.x
+    array([1.00000001, 1.5       , 2.        ])
+    >>> res_minimum.f_x
+    array([2., 2., 2.])
+
+    """
+
+    def reformat_result(res_in):
+        res_out = _RichResult()
+        res_out.status = res_in.status
+        res_out.success = res_in.success
+        res_out.x = res_in.x
+        res_out.f_x = res_in.fun
+        res_out.nfev = res_in.nfev
+        res_out.nit = res_in.nit
+        res_out.bracket = (res_in.xl, res_in.xm, res_in.xr)
+        res_out.f_bracket = (res_in.fl, res_in.fm, res_in.fr)
+        res_out._order_keys = ['success', 'status', 'x', 'f_x',
+                               'nfev', 'nit', 'bracket', 'f_bracket']
+        return res_out
+
+    xl, xm, xr = init
+    default_tolerances = dict(xatol=None, xrtol=None, fatol=None, frtol=None)
+    tolerances = {} if tolerances is None else tolerances
+    default_tolerances.update(tolerances)
+    tolerances = default_tolerances
+
+    if callable(callback):
+        def _callback(res):
+            return callback(reformat_result(res))
+    else:
+        _callback = callback
+
+    res = _chandrupatla_minimize(f, xl, xm, xr, args=args, **tolerances,
+                                 maxiter=maxiter, callback=_callback)
+    return reformat_result(res)
+
+
+def bracket_root(f, xl0, xr0=None, *, xmin=None, xmax=None, factor=None, args=(),
+                 maxiter=1000):
+    """Bracket the root of a monotonic, real-valued function of a real variable.
+
+    For each element of the output of `f`, `bracket_root` seeks the scalar
+    bracket endpoints ``xl`` and ``xr`` such that ``sign(f(xl)) == -sign(f(xr))``
+    elementwise.
+
+    The function is guaranteed to find a valid bracket if the function is monotonic,
+    but it may find a bracket under other conditions.
+
+    This function works elementwise when `xl0`, `xr0`, `xmin`, `xmax`, `factor`, and
+    the elements of `args` are (mutually broadcastable) arrays.
+
+    Parameters
+    ----------
+    f : callable
+        The function for which the root is to be bracketed. The signature must be::
+
+            f(x: array, *args) -> array
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``.
+
+        `f` must be an elementwise function: each element ``f(x)[i]``
+        must equal ``f(x[i])`` for all indices ``i``. It must not mutate the
+        array ``x`` or the arrays in ``args``.
+    xl0, xr0: float array_like
+        Starting guess of bracket, which need not contain a root. If `xr0` is
+        not provided, ``xr0 = xl0 + 1``. Must be broadcastable with all other
+        array inputs.
+    xmin, xmax : float array_like, optional
+        Minimum and maximum allowable endpoints of the bracket, inclusive. Must
+        be broadcastable with all other array inputs.
+    factor : float array_like, default: 2
+        The factor used to grow the bracket. See Notes.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    maxiter : int, default: 1000
+        The maximum number of iterations of the algorithm to perform.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm produced a valid bracket.
+            - ``-1`` : The bracket expanded to the allowable limits without success.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : Iteration was terminated by `callback`.
+            - ``-5``: The initial bracket does not satisfy`xmin <= xl0 < xr0 < xmax`.
+            
+        bracket : 2-tuple of float arrays
+            The lower and upper endpoints of the bracket, if the algorithm
+            terminated successfully.
+        f_bracket : 2-tuple of float arrays
+            The values of `f` evaluated at the endpoints of ``res.bracket``,
+            respectively.
+        nfev : int array
+            The number of abscissae at which `f` was evaluated to find the root.
+            This is distinct from the number of times `f` is *called* because the
+            the function may evaluated at multiple points in a single call.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+
+    Notes
+    -----
+    This function generalizes an algorithm found in pieces throughout the
+    `scipy.stats` codebase. The strategy is to iteratively grow the bracket `(l, r)`
+    until ``f(l) < 0 < f(r)`` or ``f(r) < 0 < f(l)``. The bracket grows to the left
+    as follows.
+
+    - If `xmin` is not provided, the distance between `xl0` and `l` is iteratively
+      increased by `factor`.
+    - If `xmin` is provided, the distance between `xmin` and `l` is iteratively
+      decreased by `factor`. Note that this also *increases* the bracket size.
+
+    Growth of the bracket to the right is analogous.
+
+    Growth of the bracket in one direction stops when the endpoint is no longer
+    finite, the function value at the endpoint is no longer finite, or the
+    endpoint reaches its limiting value (`xmin` or `xmax`). Iteration terminates
+    when the bracket stops growing in both directions, the bracket surrounds
+    the root, or a root is found (by chance).
+
+    If two brackets are found - that is, a bracket is found on both sides in
+    the same iteration, the smaller of the two is returned.
+    
+    If roots of the function are found, both `xl` and `xr` are set to the
+    leftmost root.
+    
+    See Also
+    --------
+    find_root
+
+    Examples
+    --------
+    Suppose we wish to find the root of the following function.
+
+    >>> def f(x, c=5):
+    ...     return x**3 - 2*x - c
+
+    First, we must find a valid bracket. The function is not monotonic,
+    but `bracket_root` may be able to provide a bracket.
+
+    >>> from scipy.optimize import elementwise
+    >>> res_bracket = elementwise.bracket_root(f, 0)
+    >>> res_bracket.success
+    True
+    >>> res_bracket.bracket
+    (2.0, 4.0)
+
+    Indeed, the values of the function at the bracket endpoints have
+    opposite signs.
+
+    >>> res_bracket.f_bracket
+    (-1.0, 51.0)
+
+    Once we have a valid bracket, `find_root` can be used to provide
+    a precise root.
+
+    >>> res_root = elementwise.find_root(f, res_bracket.bracket)
+    >>> res_root.x
+    2.0945514815423265
+
+    `bracket_root` and `find_root` accept arrays for most arguments.
+    For instance, to find the root for a few values of the parameter ``c``
+    at once:
+
+    >>> import numpy as np
+    >>> c = np.asarray([3, 4, 5])
+    >>> res_bracket = elementwise.bracket_root(f, 0, args=(c,))
+    >>> res_bracket.bracket
+    (array([1., 1., 2.]), array([2., 2., 4.]))
+    >>> res_root = elementwise.find_root(f, res_bracket.bracket, args=(c,))
+    >>> res_root.x
+    array([1.8932892 , 2.        , 2.09455148])
+
+    """  # noqa: E501
+
+    res = _bracket_root(f, xl0, xr0=xr0, xmin=xmin, xmax=xmax, factor=factor,
+                        args=args, maxiter=maxiter)
+    res.bracket = res.xl, res.xr
+    res.f_bracket = res.fl, res.fr
+    del res.xl
+    del res.xr
+    del res.fl
+    del res.fr
+    return res
+
+
+def bracket_minimum(f, xm0, *, xl0=None, xr0=None, xmin=None, xmax=None,
+                     factor=None, args=(), maxiter=1000):
+    """Bracket the minimum of a unimodal, real-valued function of a real variable.
+
+    For each element of the output of `f`, `bracket_minimum` seeks the scalar
+    bracket points ``xl < xm < xr`` such that ``fl >= fm <= fr`` where one of the
+    inequalities is strict.
+
+    The function is guaranteed to find a valid bracket if the function is
+    strongly unimodal, but it may find a bracket under other conditions.
+
+    This function works elementwise when `xm0`, `xl0`, `xr0`, `xmin`, `xmax`, `factor`,
+    and the elements of `args` are (mutually broadcastable) arrays.
+
+    Parameters
+    ----------
+    f : callable
+        The function for which the root is to be bracketed. The signature must be::
+
+            f(x: array, *args) -> array
+
+        where each element of ``x`` is a finite real and ``args`` is a tuple,
+        which may contain an arbitrary number of arrays that are broadcastable
+        with ``x``.
+
+        `f` must be an elementwise function: each element ``f(x)[i]``
+        must equal ``f(x[i])`` for all indices ``i``. It must not mutate the
+        array ``x`` or the arrays in ``args``.
+    xm0: float array_like
+        Starting guess for middle point of bracket.
+    xl0, xr0: float array_like, optional
+        Starting guesses for left and right endpoints of the bracket. Must
+        be broadcastable with all other array inputs.
+    xmin, xmax : float array_like, optional
+        Minimum and maximum allowable endpoints of the bracket, inclusive. Must
+        be broadcastable with all other array inputs.
+    factor : float array_like, default: 2
+        The factor used to grow the bracket. See Notes.
+    args : tuple of array_like, optional
+        Additional positional array arguments to be passed to `f`.
+        If the callable for which the root is desired requires arguments that are
+        not broadcastable with `x`, wrap that callable with `f` such that `f`
+        accepts only `x` and broadcastable ``*args``.
+    maxiter : int, default: 1000
+        The maximum number of iterations of the algorithm to perform.
+
+    Returns
+    -------
+    res : _RichResult
+        An object similar to an instance of `scipy.optimize.OptimizeResult` with the
+        following attributes. The descriptions are written as though the values will
+        be scalars; however, if `f` returns an array, the outputs will be
+        arrays of the same shape.
+
+        success : bool array
+            ``True`` where the algorithm terminated successfully (status ``0``);
+            ``False`` otherwise.
+        status : int array
+            An integer representing the exit status of the algorithm.
+
+            - ``0`` : The algorithm produced a valid bracket.
+            - ``-1`` : The bracket expanded to the allowable limits. Assuming
+              unimodality, this implies the endpoint at the limit is a minimizer.
+            - ``-2`` : The maximum number of iterations was reached.
+            - ``-3`` : A non-finite value was encountered.
+            - ``-4`` : ``None`` shall pass.
+            - ``-5`` : The initial bracket does not satisfy
+              `xmin <= xl0 < xm0 < xr0 <= xmax`.
+
+        bracket : 3-tuple of float arrays
+            The left, middle, and right points of the bracket, if the algorithm
+            terminated successfully.
+        f_bracket : 3-tuple of float arrays
+            The function value at the left, middle, and right points of the bracket.
+        nfev : int array
+            The number of abscissae at which `f` was evaluated to find the root.
+            This is distinct from the number of times `f` is *called* because the
+            the function may evaluated at multiple points in a single call.
+        nit : int array
+            The number of iterations of the algorithm that were performed.
+
+    Notes
+    -----
+    Similar to `scipy.optimize.bracket`, this function seeks to find real
+    points ``xl < xm < xr`` such that ``f(xl) >= f(xm)`` and ``f(xr) >= f(xm)``,
+    where at least one of the inequalities is strict. Unlike `scipy.optimize.bracket`,
+    this function can operate in a vectorized manner on array input, so long as
+    the input arrays are broadcastable with each other. Also unlike
+    `scipy.optimize.bracket`, users may specify minimum and maximum endpoints
+    for the desired bracket.
+
+    Given an initial trio of points ``xl = xl0``, ``xm = xm0``, ``xr = xr0``,
+    the algorithm checks if these points already give a valid bracket. If not,
+    a new endpoint, ``w`` is chosen in the "downhill" direction, ``xm`` becomes the new
+    opposite endpoint, and either `xl` or `xr` becomes the new middle point,
+    depending on which direction is downhill. The algorithm repeats from here.
+
+    The new endpoint `w` is chosen differently depending on whether or not a
+    boundary `xmin` or `xmax` has been set in the downhill direction. Without
+    loss of generality, suppose the downhill direction is to the right, so that
+    ``f(xl) > f(xm) > f(xr)``. If there is no boundary to the right, then `w`
+    is chosen to be ``xr + factor * (xr - xm)`` where `factor` is controlled by
+    the user (defaults to 2.0) so that step sizes increase in geometric proportion.
+    If there is a boundary, `xmax` in this case, then `w` is chosen to be
+    ``xmax - (xmax - xr)/factor``, with steps slowing to a stop at
+    `xmax`. This cautious approach ensures that a minimum near but distinct from
+    the boundary isn't missed while also detecting whether or not the `xmax` is
+    a minimizer when `xmax` is reached after a finite number of steps.
+
+    See Also
+    --------
+    scipy.optimize.bracket
+    scipy.optimize.elementwise.find_minimum
+
+    Examples
+    --------
+    Suppose we wish to minimize the following function.
+
+    >>> def f(x, c=1):
+    ...     return (x - c)**2 + 2
+
+    First, we must find a valid bracket. The function is unimodal,
+    so `bracket_minium` will easily find a bracket.
+
+    >>> from scipy.optimize import elementwise
+    >>> res_bracket = elementwise.bracket_minimum(f, 0)
+    >>> res_bracket.success
+    True
+    >>> res_bracket.bracket
+    (0.0, 0.5, 1.5)
+
+    Indeed, the bracket points are ordered and the function value
+    at the middle bracket point is less than at the surrounding
+    points.
+
+    >>> xl, xm, xr = res_bracket.bracket
+    >>> fl, fm, fr = res_bracket.f_bracket
+    >>> (xl < xm < xr) and (fl > fm <= fr)
+    True
+
+    Once we have a valid bracket, `find_minimum` can be used to provide
+    an estimate of the minimizer.
+
+    >>> res_minimum = elementwise.find_minimum(f, res_bracket.bracket)
+    >>> res_minimum.x
+    1.0000000149011612
+
+    `bracket_minimum` and `find_minimum` accept arrays for most arguments.
+    For instance, to find the minimizers and minima for a few values of the
+    parameter ``c`` at once:
+
+    >>> import numpy as np
+    >>> c = np.asarray([1, 1.5, 2])
+    >>> res_bracket = elementwise.bracket_minimum(f, 0, args=(c,))
+    >>> res_bracket.bracket
+    (array([0. , 0.5, 0.5]), array([0.5, 1.5, 1.5]), array([1.5, 2.5, 2.5]))
+    >>> res_minimum = elementwise.find_minimum(f, res_bracket.bracket, args=(c,))
+    >>> res_minimum.x
+    array([1.00000001, 1.5       , 2.        ])
+    >>> res_minimum.f_x
+    array([2., 2., 2.])
+
+    """  # noqa: E501
+
+    res = _bracket_minimum(f, xm0, xl0=xl0, xr0=xr0, xmin=xmin, xmax=xmax,
+                           factor=factor, args=args, maxiter=maxiter)
+    res.bracket = res.xl, res.xm, res.xr
+    res.f_bracket = res.fl, res.fm, res.fr
+    del res.xl
+    del res.xm
+    del res.xr
+    del res.fl
+    del res.fm
+    del res.fr
+    return res
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_group_columns.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_group_columns.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..426fa2565038a67cd669485576802658a2f48d8f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_group_columns.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_hessian_update_strategy.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_hessian_update_strategy.py
new file mode 100644
index 0000000000000000000000000000000000000000..15989969349025fd42fba9836b4f5d882c3f6791
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_hessian_update_strategy.py
@@ -0,0 +1,479 @@
+"""Hessian update strategies for quasi-Newton optimization methods."""
+import numpy as np
+from numpy.linalg import norm
+from scipy.linalg import get_blas_funcs, issymmetric
+from warnings import warn
+
+
+__all__ = ['HessianUpdateStrategy', 'BFGS', 'SR1']
+
+
+class HessianUpdateStrategy:
+    """Interface for implementing Hessian update strategies.
+
+    Many optimization methods make use of Hessian (or inverse Hessian)
+    approximations, such as the quasi-Newton methods BFGS, SR1, L-BFGS.
+    Some of these  approximations, however, do not actually need to store
+    the entire matrix or can compute the internal matrix product with a
+    given vector in a very efficiently manner. This class serves as an
+    abstract interface between the optimization algorithm and the
+    quasi-Newton update strategies, giving freedom of implementation
+    to store and update the internal matrix as efficiently as possible.
+    Different choices of initialization and update procedure will result
+    in different quasi-Newton strategies.
+
+    Four methods should be implemented in derived classes: ``initialize``,
+    ``update``, ``dot`` and ``get_matrix``. The matrix multiplication
+    operator ``@`` is also defined to call the ``dot`` method.
+
+    Notes
+    -----
+    Any instance of a class that implements this interface,
+    can be accepted by the method ``minimize`` and used by
+    the compatible solvers to approximate the Hessian (or
+    inverse Hessian) used by the optimization algorithms.
+    """
+
+    def initialize(self, n, approx_type):
+        """Initialize internal matrix.
+
+        Allocate internal memory for storing and updating
+        the Hessian or its inverse.
+
+        Parameters
+        ----------
+        n : int
+            Problem dimension.
+        approx_type : {'hess', 'inv_hess'}
+            Selects either the Hessian or the inverse Hessian.
+            When set to 'hess' the Hessian will be stored and updated.
+            When set to 'inv_hess' its inverse will be used instead.
+        """
+        raise NotImplementedError("The method ``initialize(n, approx_type)``"
+                                  " is not implemented.")
+
+    def update(self, delta_x, delta_grad):
+        """Update internal matrix.
+
+        Update Hessian matrix or its inverse (depending on how 'approx_type'
+        is defined) using information about the last evaluated points.
+
+        Parameters
+        ----------
+        delta_x : ndarray
+            The difference between two points the gradient
+            function have been evaluated at: ``delta_x = x2 - x1``.
+        delta_grad : ndarray
+            The difference between the gradients:
+            ``delta_grad = grad(x2) - grad(x1)``.
+        """
+        raise NotImplementedError("The method ``update(delta_x, delta_grad)``"
+                                  " is not implemented.")
+
+    def dot(self, p):
+        """Compute the product of the internal matrix with the given vector.
+
+        Parameters
+        ----------
+        p : array_like
+            1-D array representing a vector.
+
+        Returns
+        -------
+        Hp : array
+            1-D represents the result of multiplying the approximation matrix
+            by vector p.
+        """
+        raise NotImplementedError("The method ``dot(p)``"
+                                  " is not implemented.")
+
+    def get_matrix(self):
+        """Return current internal matrix.
+
+        Returns
+        -------
+        H : ndarray, shape (n, n)
+            Dense matrix containing either the Hessian
+            or its inverse (depending on how 'approx_type'
+            is defined).
+        """
+        raise NotImplementedError("The method ``get_matrix(p)``"
+                                  " is not implemented.")
+
+    def __matmul__(self, p):
+        return self.dot(p)
+
+
+class FullHessianUpdateStrategy(HessianUpdateStrategy):
+    """Hessian update strategy with full dimensional internal representation.
+    """
+    _syr = get_blas_funcs('syr', dtype='d')  # Symmetric rank 1 update
+    _syr2 = get_blas_funcs('syr2', dtype='d')  # Symmetric rank 2 update
+    # Symmetric matrix-vector product
+    _symv = get_blas_funcs('symv', dtype='d')
+
+    def __init__(self, init_scale='auto'):
+        self.init_scale = init_scale
+        # Until initialize is called we can't really use the class,
+        # so it makes sense to set everything to None.
+        self.first_iteration = None
+        self.approx_type = None
+        self.B = None
+        self.H = None
+
+    def initialize(self, n, approx_type):
+        """Initialize internal matrix.
+
+        Allocate internal memory for storing and updating
+        the Hessian or its inverse.
+
+        Parameters
+        ----------
+        n : int
+            Problem dimension.
+        approx_type : {'hess', 'inv_hess'}
+            Selects either the Hessian or the inverse Hessian.
+            When set to 'hess' the Hessian will be stored and updated.
+            When set to 'inv_hess' its inverse will be used instead.
+        """
+        self.first_iteration = True
+        self.n = n
+        self.approx_type = approx_type
+        if approx_type not in ('hess', 'inv_hess'):
+            raise ValueError("`approx_type` must be 'hess' or 'inv_hess'.")
+        # Create matrix
+        if self.approx_type == 'hess':
+            self.B = np.eye(n, dtype=float)
+        else:
+            self.H = np.eye(n, dtype=float)
+
+    def _auto_scale(self, delta_x, delta_grad):
+        # Heuristic to scale matrix at first iteration.
+        # Described in Nocedal and Wright "Numerical Optimization"
+        # p.143 formula (6.20).
+        s_norm2 = np.dot(delta_x, delta_x)
+        y_norm2 = np.dot(delta_grad, delta_grad)
+        ys = np.abs(np.dot(delta_grad, delta_x))
+        if ys == 0.0 or y_norm2 == 0 or s_norm2 == 0:
+            return 1
+        if self.approx_type == 'hess':
+            return y_norm2 / ys
+        else:
+            return ys / y_norm2
+
+    def _update_implementation(self, delta_x, delta_grad):
+        raise NotImplementedError("The method ``_update_implementation``"
+                                  " is not implemented.")
+
+    def update(self, delta_x, delta_grad):
+        """Update internal matrix.
+
+        Update Hessian matrix or its inverse (depending on how 'approx_type'
+        is defined) using information about the last evaluated points.
+
+        Parameters
+        ----------
+        delta_x : ndarray
+            The difference between two points the gradient
+            function have been evaluated at: ``delta_x = x2 - x1``.
+        delta_grad : ndarray
+            The difference between the gradients:
+            ``delta_grad = grad(x2) - grad(x1)``.
+        """
+        if np.all(delta_x == 0.0):
+            return
+        if np.all(delta_grad == 0.0):
+            warn('delta_grad == 0.0. Check if the approximated '
+                 'function is linear. If the function is linear '
+                 'better results can be obtained by defining the '
+                 'Hessian as zero instead of using quasi-Newton '
+                 'approximations.',
+                 UserWarning, stacklevel=2)
+            return
+        if self.first_iteration:
+            # Get user specific scale
+            if isinstance(self.init_scale, str) and self.init_scale == "auto":
+                scale = self._auto_scale(delta_x, delta_grad)
+            else:
+                scale = self.init_scale
+
+            # Check for complex: numpy will silently cast a complex array to
+            # a real one but not so for scalar as it raises a TypeError.
+            # Checking here brings a consistent behavior.
+            replace = False
+            if np.size(scale) == 1:
+                # to account for the legacy behavior having the exact same cast
+                scale = float(scale)
+            elif np.iscomplexobj(scale):
+                raise TypeError("init_scale contains complex elements, "
+                                "must be real.")
+            else:  # test explicitly for allowed shapes and values
+                replace = True
+                if self.approx_type == 'hess':
+                    shape = np.shape(self.B)
+                    dtype = self.B.dtype
+                else:
+                    shape = np.shape(self.H)
+                    dtype = self.H.dtype
+                # copy, will replace the original
+                scale = np.array(scale, dtype=dtype, copy=True)
+
+                # it has to match the shape of the matrix for the multiplication,
+                # no implicit broadcasting is allowed
+                if shape != (init_shape := np.shape(scale)):
+                    raise ValueError("If init_scale is an array, it must have the "
+                                     f"dimensions of the hess/inv_hess: {shape}."
+                                     f" Got {init_shape}.")
+                if not issymmetric(scale):
+                    raise ValueError("If init_scale is an array, it must be"
+                                     " symmetric (passing scipy.linalg.issymmetric)"
+                                     " to be an approximation of a hess/inv_hess.")
+
+            # Scale initial matrix with ``scale * np.eye(n)`` or replace
+            # This is not ideal, we could assign the scale directly in
+            # initialize, but we would need to
+            if self.approx_type == 'hess':
+                if replace:
+                    self.B = scale
+                else:
+                    self.B *= scale
+            else:
+                if replace:
+                    self.H = scale
+                else:
+                    self.H *= scale
+            self.first_iteration = False
+        self._update_implementation(delta_x, delta_grad)
+
+    def dot(self, p):
+        """Compute the product of the internal matrix with the given vector.
+
+        Parameters
+        ----------
+        p : array_like
+            1-D array representing a vector.
+
+        Returns
+        -------
+        Hp : array
+            1-D represents the result of multiplying the approximation matrix
+            by vector p.
+        """
+        if self.approx_type == 'hess':
+            return self._symv(1, self.B, p)
+        else:
+            return self._symv(1, self.H, p)
+
+    def get_matrix(self):
+        """Return the current internal matrix.
+
+        Returns
+        -------
+        M : ndarray, shape (n, n)
+            Dense matrix containing either the Hessian or its inverse
+            (depending on how `approx_type` was defined).
+        """
+        if self.approx_type == 'hess':
+            M = np.copy(self.B)
+        else:
+            M = np.copy(self.H)
+        li = np.tril_indices_from(M, k=-1)
+        M[li] = M.T[li]
+        return M
+
+
+class BFGS(FullHessianUpdateStrategy):
+    """Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian update strategy.
+
+    Parameters
+    ----------
+    exception_strategy : {'skip_update', 'damp_update'}, optional
+        Define how to proceed when the curvature condition is violated.
+        Set it to 'skip_update' to just skip the update. Or, alternatively,
+        set it to 'damp_update' to interpolate between the actual BFGS
+        result and the unmodified matrix. Both exceptions strategies
+        are explained  in [1]_, p.536-537.
+    min_curvature : float
+        This number, scaled by a normalization factor, defines the
+        minimum curvature ``dot(delta_grad, delta_x)`` allowed to go
+        unaffected by the exception strategy. By default is equal to
+        1e-8 when ``exception_strategy = 'skip_update'`` and equal
+        to 0.2 when ``exception_strategy = 'damp_update'``.
+    init_scale : {float, np.array, 'auto'}
+        This parameter can be used to initialize the Hessian or its
+        inverse. When a float is given, the relevant array is initialized
+        to ``np.eye(n) * init_scale``, where ``n`` is the problem dimension.
+        Alternatively, if a precisely ``(n, n)`` shaped, symmetric array is given,
+        this array will be used. Otherwise an error is generated.
+        Set it to 'auto' in order to use an automatic heuristic for choosing
+        the initial scale. The heuristic is described in [1]_, p.143.
+        The default is 'auto'.
+
+    Notes
+    -----
+    The update is based on the description in [1]_, p.140.
+
+    References
+    ----------
+    .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+           Second Edition (2006).
+    """
+
+    def __init__(self, exception_strategy='skip_update', min_curvature=None,
+                 init_scale='auto'):
+        if exception_strategy == 'skip_update':
+            if min_curvature is not None:
+                self.min_curvature = min_curvature
+            else:
+                self.min_curvature = 1e-8
+        elif exception_strategy == 'damp_update':
+            if min_curvature is not None:
+                self.min_curvature = min_curvature
+            else:
+                self.min_curvature = 0.2
+        else:
+            raise ValueError("`exception_strategy` must be 'skip_update' "
+                             "or 'damp_update'.")
+
+        super().__init__(init_scale)
+        self.exception_strategy = exception_strategy
+
+    def _update_inverse_hessian(self, ys, Hy, yHy, s):
+        """Update the inverse Hessian matrix.
+
+        BFGS update using the formula:
+
+            ``H <- H + ((H*y).T*y + s.T*y)/(s.T*y)^2 * (s*s.T)
+                     - 1/(s.T*y) * ((H*y)*s.T + s*(H*y).T)``
+
+        where ``s = delta_x`` and ``y = delta_grad``. This formula is
+        equivalent to (6.17) in [1]_ written in a more efficient way
+        for implementation.
+
+        References
+        ----------
+        .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+               Second Edition (2006).
+        """
+        self.H = self._syr2(-1.0 / ys, s, Hy, a=self.H)
+        self.H = self._syr((ys + yHy) / ys ** 2, s, a=self.H)
+
+    def _update_hessian(self, ys, Bs, sBs, y):
+        """Update the Hessian matrix.
+
+        BFGS update using the formula:
+
+            ``B <- B - (B*s)*(B*s).T/s.T*(B*s) + y*y^T/s.T*y``
+
+        where ``s`` is short for ``delta_x`` and ``y`` is short
+        for ``delta_grad``. Formula (6.19) in [1]_.
+
+        References
+        ----------
+        .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+               Second Edition (2006).
+        """
+        self.B = self._syr(1.0 / ys, y, a=self.B)
+        self.B = self._syr(-1.0 / sBs, Bs, a=self.B)
+
+    def _update_implementation(self, delta_x, delta_grad):
+        # Auxiliary variables w and z
+        if self.approx_type == 'hess':
+            w = delta_x
+            z = delta_grad
+        else:
+            w = delta_grad
+            z = delta_x
+        # Do some common operations
+        wz = np.dot(w, z)
+        Mw = self @ w
+        wMw = Mw.dot(w)
+        # Guarantee that wMw > 0 by reinitializing matrix.
+        # While this is always true in exact arithmetic,
+        # indefinite matrix may appear due to roundoff errors.
+        if wMw <= 0.0:
+            scale = self._auto_scale(delta_x, delta_grad)
+            # Reinitialize matrix
+            if self.approx_type == 'hess':
+                self.B = scale * np.eye(self.n, dtype=float)
+            else:
+                self.H = scale * np.eye(self.n, dtype=float)
+            # Do common operations for new matrix
+            Mw = self @ w
+            wMw = Mw.dot(w)
+        # Check if curvature condition is violated
+        if wz <= self.min_curvature * wMw:
+            # If the option 'skip_update' is set
+            # we just skip the update when the condition
+            # is violated.
+            if self.exception_strategy == 'skip_update':
+                return
+            # If the option 'damp_update' is set we
+            # interpolate between the actual BFGS
+            # result and the unmodified matrix.
+            elif self.exception_strategy == 'damp_update':
+                update_factor = (1-self.min_curvature) / (1 - wz/wMw)
+                z = update_factor*z + (1-update_factor)*Mw
+                wz = np.dot(w, z)
+        # Update matrix
+        if self.approx_type == 'hess':
+            self._update_hessian(wz, Mw, wMw, z)
+        else:
+            self._update_inverse_hessian(wz, Mw, wMw, z)
+
+
+class SR1(FullHessianUpdateStrategy):
+    """Symmetric-rank-1 Hessian update strategy.
+
+    Parameters
+    ----------
+    min_denominator : float
+        This number, scaled by a normalization factor,
+        defines the minimum denominator magnitude allowed
+        in the update. When the condition is violated we skip
+        the update. By default uses ``1e-8``.
+    init_scale : {float, np.array, 'auto'}, optional
+        This parameter can be used to initialize the Hessian or its
+        inverse. When a float is given, the relevant array is initialized
+        to ``np.eye(n) * init_scale``, where ``n`` is the problem dimension.
+        Alternatively, if a precisely ``(n, n)`` shaped, symmetric array is given,
+        this array will be used. Otherwise an error is generated.
+        Set it to 'auto' in order to use an automatic heuristic for choosing
+        the initial scale. The heuristic is described in [1]_, p.143.
+        The default is 'auto'.
+
+    Notes
+    -----
+    The update is based on the description in [1]_, p.144-146.
+
+    References
+    ----------
+    .. [1] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+           Second Edition (2006).
+    """
+
+    def __init__(self, min_denominator=1e-8, init_scale='auto'):
+        self.min_denominator = min_denominator
+        super().__init__(init_scale)
+
+    def _update_implementation(self, delta_x, delta_grad):
+        # Auxiliary variables w and z
+        if self.approx_type == 'hess':
+            w = delta_x
+            z = delta_grad
+        else:
+            w = delta_grad
+            z = delta_x
+        # Do some common operations
+        Mw = self @ w
+        z_minus_Mw = z - Mw
+        denominator = np.dot(w, z_minus_Mw)
+        # If the denominator is too small
+        # we just skip the update.
+        if np.abs(denominator) <= self.min_denominator*norm(w)*norm(z_minus_Mw):
+            return
+        # Update matrix
+        if self.approx_type == 'hess':
+            self.B = self._syr(1/denominator, z_minus_Mw, a=self.B)
+        else:
+            self.H = self._syr(1/denominator, z_minus_Mw, a=self.H)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e87a6260ce99f6753d8fd2ccecdbf8c1ddc8ce93
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/_highs_wrapper.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/_highs_wrapper.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4ed24e45fcfeefa8687235da1d69cbe85f678efe
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/__pycache__/_highs_wrapper.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/_highs_wrapper.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/_highs_wrapper.py
new file mode 100644
index 0000000000000000000000000000000000000000..c88f0fb14c627b10584995fbde17f3a0e445b0cf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_highspy/_highs_wrapper.py
@@ -0,0 +1,338 @@
+from warnings import warn
+
+import numpy as np
+import scipy.optimize._highspy._core as _h # type: ignore[import-not-found]
+from scipy.optimize._highspy import _highs_options as hopt  # type: ignore[attr-defined]
+from scipy.optimize import OptimizeWarning
+
+
+def _highs_wrapper(c, indptr, indices, data, lhs, rhs, lb, ub, integrality, options):
+    '''Solve linear programs using HiGHS [1]_.
+
+    Assume problems of the form:
+
+        MIN c.T @ x
+        s.t. lhs <= A @ x <= rhs
+             lb <= x <= ub
+
+    Parameters
+    ----------
+    c : 1-D array, (n,)
+        Array of objective value coefficients.
+    astart : 1-D array
+        CSC format index array.
+    aindex : 1-D array
+        CSC format index array.
+    avalue : 1-D array
+        Data array of the matrix.
+    lhs : 1-D array (or None), (m,)
+        Array of left hand side values of the inequality constraints.
+        If ``lhs=None``, then an array of ``-inf`` is assumed.
+    rhs : 1-D array, (m,)
+        Array of right hand side values of the inequality constraints.
+    lb : 1-D array (or None), (n,)
+        Lower bounds on solution variables x.  If ``lb=None``, then an
+        array of all `0` is assumed.
+    ub : 1-D array (or None), (n,)
+        Upper bounds on solution variables x.  If ``ub=None``, then an
+        array of ``inf`` is assumed.
+    options : dict
+        A dictionary of solver options
+
+    Returns
+    -------
+    res : dict
+
+        If model_status is one of kOptimal,
+        kObjectiveBound, kTimeLimit,
+        kIterationLimit:
+
+            - ``status`` : HighsModelStatus
+                Model status code.
+
+            - ``message`` : str
+                Message corresponding to model status code.
+
+            - ``x`` : list
+                Solution variables.
+
+            - ``slack`` : list
+                Slack variables.
+
+            - ``lambda`` : list
+                Lagrange multipliers associated with the constraints
+                Ax = b.
+
+            - ``s`` : list
+                Lagrange multipliers associated with the constraints
+                x >= 0.
+
+            - ``fun``
+                Final objective value.
+
+            - ``simplex_nit`` : int
+                Number of iterations accomplished by the simplex
+                solver.
+
+            - ``ipm_nit`` : int
+                Number of iterations accomplished by the interior-
+                point solver.
+
+        If model_status is not one of the above:
+
+            - ``status`` : HighsModelStatus
+                Model status code.
+
+            - ``message`` : str
+                Message corresponding to model status code.
+
+    Notes
+    -----
+    If ``options['write_solution_to_file']`` is ``True`` but
+    ``options['solution_file']`` is unset or ``''``, then the solution
+    will be printed to ``stdout``.
+
+    If any iteration limit is reached, no solution will be
+    available.
+
+    ``OptimizeWarning`` will be raised if any option value set by
+    the user is found to be incorrect.
+
+    References
+    ----------
+    .. [1] https://highs.dev/
+    .. [2] https://www.maths.ed.ac.uk/hall/HiGHS/HighsOptions.html
+    '''
+    numcol = c.size
+    numrow = rhs.size
+    isMip = integrality is not None and np.sum(integrality) > 0
+
+    # default "null" return values
+    res = {
+        "x": None,
+        "fun": None,
+    }
+
+    # Fill up a HighsLp object
+    lp = _h.HighsLp()
+    lp.num_col_ = numcol
+    lp.num_row_ = numrow
+    lp.a_matrix_.num_col_ = numcol
+    lp.a_matrix_.num_row_ = numrow
+    lp.a_matrix_.format_ = _h.MatrixFormat.kColwise
+    lp.col_cost_ = c
+    lp.col_lower_ = lb
+    lp.col_upper_ = ub
+    lp.row_lower_ = lhs
+    lp.row_upper_ = rhs
+    lp.a_matrix_.start_ = indptr
+    lp.a_matrix_.index_ = indices
+    lp.a_matrix_.value_ = data
+    if integrality.size > 0:
+        lp.integrality_ = [_h.HighsVarType(i) for i in integrality]
+
+    # Make a Highs object and pass it everything
+    highs = _h._Highs()
+    highs_options = _h.HighsOptions()
+    hoptmanager = hopt.HighsOptionsManager()
+    for key, val in options.items():
+        # handle filtering of unsupported and default options
+        if val is None or key in ("sense",):
+            continue
+
+        # ask for the option type
+        opt_type = hoptmanager.get_option_type(key)
+        if -1 == opt_type:
+            warn(
+                f"Unrecognized options detected: {dict({key: val})}",
+                OptimizeWarning,
+                stacklevel=2,
+            )
+            continue
+        else:
+            if key in ("presolve", "parallel"):
+                # handle fake bools (require bool -> str conversions)
+                if isinstance(val, bool):
+                    val = "on" if val else "off"
+                else:
+                    warn(
+                        f'Option f"{key}" is "{val}", but only True or False is '
+                        f"allowed. Using default.",
+                        OptimizeWarning,
+                        stacklevel=2,
+                    )
+                    continue
+            opt_type = _h.HighsOptionType(opt_type)
+            status, msg = check_option(highs, key, val)
+            if opt_type == _h.HighsOptionType.kBool:
+                if not isinstance(val, bool):
+                    warn(
+                        f'Option f"{key}" is "{val}", but only True or False is '
+                        f"allowed. Using default.",
+                        OptimizeWarning,
+                        stacklevel=2,
+                    )
+                    continue
+
+            # warn or set option
+            if status != 0:
+                warn(msg, OptimizeWarning, stacklevel=2)
+            else:
+                setattr(highs_options, key, val)
+
+    opt_status = highs.passOptions(highs_options)
+    if opt_status == _h.HighsStatus.kError:
+        res.update(
+            {
+                "status": highs.getModelStatus(),
+                "message": highs.modelStatusToString(highs.getModelStatus()),
+            }
+        )
+        return res
+
+    init_status = highs.passModel(lp)
+    if init_status == _h.HighsStatus.kError:
+        # if model fails to load, highs.getModelStatus() will be NOT_SET
+        err_model_status = _h.HighsModelStatus.kModelError
+        res.update(
+            {
+                "status": err_model_status,
+                "message": highs.modelStatusToString(err_model_status),
+            }
+        )
+        return res
+
+    # Solve the LP
+    run_status = highs.run()
+    if run_status == _h.HighsStatus.kError:
+        res.update(
+            {
+                "status": highs.getModelStatus(),
+                "message": highs.modelStatusToString(highs.getModelStatus()),
+            }
+        )
+        return res
+
+    # Extract what we need from the solution
+    model_status = highs.getModelStatus()
+
+    # it should always be safe to get the info object
+    info = highs.getInfo()
+
+    # Failure modes:
+    #     LP: if we have anything other than an Optimal status, it
+    #         is unsafe (and unhelpful) to read any results
+    #    MIP: has a non-Optimal status or has timed out/reached max iterations
+    #             1) If not Optimal/TimedOut/MaxIter status, there is no solution
+    #             2) If TimedOut/MaxIter status, there may be a feasible solution.
+    #                if the objective function value is not Infinity, then the
+    #                current solution is feasible and can be returned.  Else, there
+    #                is no solution.
+    mipFailCondition = model_status not in (
+        _h.HighsModelStatus.kOptimal,
+        _h.HighsModelStatus.kTimeLimit,
+        _h.HighsModelStatus.kIterationLimit,
+        _h.HighsModelStatus.kSolutionLimit,
+    ) or (
+        model_status
+        in {
+            _h.HighsModelStatus.kTimeLimit,
+            _h.HighsModelStatus.kIterationLimit,
+            _h.HighsModelStatus.kSolutionLimit,
+        }
+        and (info.objective_function_value == _h.kHighsInf)
+    )
+    lpFailCondition = model_status != _h.HighsModelStatus.kOptimal
+    if (isMip and mipFailCondition) or (not isMip and lpFailCondition):
+        res.update(
+            {
+                "status": model_status,
+                "message": "model_status is "
+                f"{highs.modelStatusToString(model_status)}; "
+                "primal_status is "
+                f"{highs.solutionStatusToString(info.primal_solution_status)}",
+                "simplex_nit": info.simplex_iteration_count,
+                "ipm_nit": info.ipm_iteration_count,
+                "crossover_nit": info.crossover_iteration_count,
+            }
+        )
+        return res
+
+    # Should be safe to read the solution:
+    solution = highs.getSolution()
+    basis = highs.getBasis()
+
+    # Lagrangians for bounds based on column statuses
+    marg_bnds = np.zeros((2, numcol))
+    basis_col_status = basis.col_status
+    solution_col_dual = solution.col_dual
+    for ii in range(numcol):
+        if basis_col_status[ii] == _h.HighsBasisStatus.kLower:
+            marg_bnds[0, ii] = solution_col_dual[ii]
+        elif basis_col_status[ii] == _h.HighsBasisStatus.kUpper:
+            marg_bnds[1, ii] = solution_col_dual[ii]
+
+    res.update(
+        {
+            "status": model_status,
+            "message": highs.modelStatusToString(model_status),
+            # Primal solution
+            "x": np.array(solution.col_value),
+            # Ax + s = b => Ax = b - s
+            # Note: this is for all constraints (A_ub and A_eq)
+            "slack": rhs - solution.row_value,
+            # lambda are the lagrange multipliers associated with Ax=b
+            "lambda": np.array(solution.row_dual),
+            "marg_bnds": marg_bnds,
+            "fun": info.objective_function_value,
+            "simplex_nit": info.simplex_iteration_count,
+            "ipm_nit": info.ipm_iteration_count,
+            "crossover_nit": info.crossover_iteration_count,
+        }
+    )
+
+    if isMip:
+        res.update(
+            {
+                "mip_node_count": info.mip_node_count,
+                "mip_dual_bound": info.mip_dual_bound,
+                "mip_gap": info.mip_gap,
+            }
+        )
+
+    return res
+
+
+def check_option(highs_inst, option, value):
+    status, option_type = highs_inst.getOptionType(option)
+    hoptmanager = hopt.HighsOptionsManager()
+
+    if status != _h.HighsStatus.kOk:
+        return -1, "Invalid option name."
+
+    valid_types = {
+        _h.HighsOptionType.kBool: bool,
+        _h.HighsOptionType.kInt: int,
+        _h.HighsOptionType.kDouble: float,
+        _h.HighsOptionType.kString: str,
+    }
+
+    expected_type = valid_types.get(option_type, None)
+
+    if expected_type is str:
+        if not hoptmanager.check_string_option(option, value):
+            return -1, "Invalid option value."
+    if expected_type is float:
+        if not hoptmanager.check_double_option(option, value):
+            return -1, "Invalid option value."
+    if expected_type is int:
+        if not hoptmanager.check_int_option(option, value):
+            return -1, "Invalid option value."
+
+    if expected_type is None:
+        return 3, "Unknown option type."
+
+    status, current_value = highs_inst.getOptionValue(option)
+    if status != _h.HighsStatus.kOk:
+        return 4, "Failed to validate option value."
+    return 0, "Check option succeeded."
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_isotonic.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_isotonic.py
new file mode 100644
index 0000000000000000000000000000000000000000..825576535402a9acf8bbff009a5f76282cb4f500
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_isotonic.py
@@ -0,0 +1,157 @@
+from typing import TYPE_CHECKING
+
+import numpy as np
+
+from ._optimize import OptimizeResult
+from ._pava_pybind import pava
+
+if TYPE_CHECKING:
+    import numpy.typing as npt
+
+
+__all__ = ["isotonic_regression"]
+
+
+def isotonic_regression(
+    y: "npt.ArrayLike",
+    *,
+    weights: "npt.ArrayLike | None" = None,
+    increasing: bool = True,
+) -> OptimizeResult:
+    r"""Nonparametric isotonic regression.
+
+    A (not strictly) monotonically increasing array `x` with the same length
+    as `y` is calculated by the pool adjacent violators algorithm (PAVA), see
+    [1]_. See the Notes section for more details.
+
+    Parameters
+    ----------
+    y : (N,) array_like
+        Response variable.
+    weights : (N,) array_like or None
+        Case weights.
+    increasing : bool
+        If True, fit monotonic increasing, i.e. isotonic, regression.
+        If False, fit a monotonic decreasing, i.e. antitonic, regression.
+        Default is True.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a ``OptimizeResult`` object.
+        Important attributes are:
+
+        - ``x``: The isotonic regression solution, i.e. an increasing (or
+          decreasing) array of the same length than y, with elements in the
+          range from min(y) to max(y).
+        - ``weights`` : Array with the sum of case weights for each block
+          (or pool) B.
+        - ``blocks``: Array of length B+1 with the indices of the start
+          positions of each block (or pool) B. The j-th block is given by
+          ``x[blocks[j]:blocks[j+1]]`` for which all values are the same.
+
+    Notes
+    -----
+    Given data :math:`y` and case weights :math:`w`, the isotonic regression
+    solves the following optimization problem:
+
+    .. math::
+
+        \operatorname{argmin}_{x_i} \sum_i w_i (y_i - x_i)^2 \quad
+        \text{subject to } x_i \leq x_j \text{ whenever } i \leq j \,.
+
+    For every input value :math:`y_i`, it generates a value :math:`x_i` such
+    that :math:`x` is increasing (but not strictly), i.e.
+    :math:`x_i \leq x_{i+1}`. This is accomplished by the PAVA.
+    The solution consists of pools or blocks, i.e. neighboring elements of
+    :math:`x`, e.g. :math:`x_i` and :math:`x_{i+1}`, that all have the same
+    value.
+
+    Most interestingly, the solution stays the same if the squared loss is
+    replaced by the wide class of Bregman functions which are the unique
+    class of strictly consistent scoring functions for the mean, see [2]_
+    and references therein.
+
+    The implemented version of PAVA according to [1]_ has a computational
+    complexity of O(N) with input size N.
+
+    References
+    ----------
+    .. [1] Busing, F. M. T. A. (2022).
+           Monotone Regression: A Simple and Fast O(n) PAVA Implementation.
+           Journal of Statistical Software, Code Snippets, 102(1), 1-25.
+           :doi:`10.18637/jss.v102.c01`
+    .. [2] Jordan, A.I., Mühlemann, A. & Ziegel, J.F.
+           Characterizing the optimal solutions to the isotonic regression
+           problem for identifiable functionals.
+           Ann Inst Stat Math 74, 489-514 (2022).
+           :doi:`10.1007/s10463-021-00808-0`
+
+    Examples
+    --------
+    This example demonstrates that ``isotonic_regression`` really solves a
+    constrained optimization problem.
+
+    >>> import numpy as np
+    >>> from scipy.optimize import isotonic_regression, minimize
+    >>> y = [1.5, 1.0, 4.0, 6.0, 5.7, 5.0, 7.8, 9.0, 7.5, 9.5, 9.0]
+    >>> def objective(yhat, y):
+    ...     return np.sum((yhat - y)**2)
+    >>> def constraint(yhat, y):
+    ...     # This is for a monotonically increasing regression.
+    ...     return np.diff(yhat)
+    >>> result = minimize(objective, x0=y, args=(y,),
+    ...                   constraints=[{'type': 'ineq',
+    ...                                 'fun': lambda x: constraint(x, y)}])
+    >>> result.x
+    array([1.25      , 1.25      , 4.        , 5.56666667, 5.56666667,
+           5.56666667, 7.8       , 8.25      , 8.25      , 9.25      ,
+           9.25      ])
+    >>> result = isotonic_regression(y)
+    >>> result.x
+    array([1.25      , 1.25      , 4.        , 5.56666667, 5.56666667,
+           5.56666667, 7.8       , 8.25      , 8.25      , 9.25      ,
+           9.25      ])
+
+    The big advantage of ``isotonic_regression`` compared to calling
+    ``minimize`` is that it is more user friendly, i.e. one does not need to
+    define objective and constraint functions, and that it is orders of
+    magnitudes faster. On commodity hardware (in 2023), for normal distributed
+    input y of length 1000, the minimizer takes about 4 seconds, while
+    ``isotonic_regression`` takes about 200 microseconds.
+    """
+    yarr = np.atleast_1d(y)  # Check yarr.ndim == 1 is implicit (pybind11) in pava.
+    order = slice(None) if increasing else slice(None, None, -1)
+    x = np.array(yarr[order], order="C", dtype=np.float64, copy=True)
+    if weights is None:
+        wx = np.ones_like(yarr, dtype=np.float64)
+    else:
+        warr = np.atleast_1d(weights)
+
+        if not (yarr.ndim == warr.ndim == 1 and yarr.shape[0] == warr.shape[0]):
+            raise ValueError(
+                "Input arrays y and w must have one dimension of equal length."
+            )
+        if np.any(warr <= 0):
+            raise ValueError("Weights w must be strictly positive.")
+
+        wx = np.array(warr[order], order="C", dtype=np.float64, copy=True)
+    n = x.shape[0]
+    r = np.full(shape=n + 1, fill_value=-1, dtype=np.intp)
+    x, wx, r, b = pava(x, wx, r)
+    # Now that we know the number of blocks b, we only keep the relevant part
+    # of r and wx.
+    # As information: Due to the pava implementation, after the last block
+    # index, there might be smaller numbers appended to r, e.g.
+    # r = [0, 10, 8, 7] which in the end should be r = [0, 10].
+    r = r[:b + 1]  # type: ignore[assignment]
+    wx = wx[:b]
+    if not increasing:
+        x = x[::-1]
+        wx = wx[::-1]
+        r = r[-1] - r[::-1]
+    return OptimizeResult(
+        x=x,
+        weights=wx,
+        blocks=r,
+    )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lbfgsb_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lbfgsb_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..d0e206feaa9333229c3842850eee1f673c8ef02b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lbfgsb_py.py
@@ -0,0 +1,578 @@
+"""
+Functions
+---------
+.. autosummary::
+   :toctree: generated/
+
+    fmin_l_bfgs_b
+
+"""
+
+## License for the Python wrapper
+## ==============================
+
+## Copyright (c) 2004 David M. Cooke 
+
+## Permission is hereby granted, free of charge, to any person obtaining a
+## copy of this software and associated documentation files (the "Software"),
+## to deal in the Software without restriction, including without limitation
+## the rights to use, copy, modify, merge, publish, distribute, sublicense,
+## and/or sell copies of the Software, and to permit persons to whom the
+## Software is furnished to do so, subject to the following conditions:
+
+## The above copyright notice and this permission notice shall be included in
+## all copies or substantial portions of the Software.
+
+## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+## DEALINGS IN THE SOFTWARE.
+
+## Modifications by Travis Oliphant and Enthought, Inc. for inclusion in SciPy
+
+import numpy as np
+from numpy import array, asarray, float64, zeros
+from . import _lbfgsb
+from ._optimize import (MemoizeJac, OptimizeResult, _call_callback_maybe_halt,
+                        _wrap_callback, _check_unknown_options,
+                        _prepare_scalar_function)
+from ._constraints import old_bound_to_new
+
+from scipy.sparse.linalg import LinearOperator
+
+__all__ = ['fmin_l_bfgs_b', 'LbfgsInvHessProduct']
+
+
+status_messages = {
+    0 : "START",
+    1 : "NEW_X",
+    2 : "RESTART",
+    3 : "FG",
+    4 : "CONVERGENCE",
+    5 : "STOP",
+    6 : "WARNING",
+    7 : "ERROR",
+    8 : "ABNORMAL"
+}
+
+
+task_messages = {
+    0 : "",
+    301 : "",
+    302 : "",
+    401 : "NORM OF PROJECTED GRADIENT <= PGTOL",
+    402 : "RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
+    501 : "CPU EXCEEDING THE TIME LIMIT",
+    502 : "TOTAL NO. OF F,G EVALUATIONS EXCEEDS LIMIT",
+    503 : "PROJECTED GRADIENT IS SUFFICIENTLY SMALL",
+    504 : "TOTAL NO. OF ITERATIONS REACHED LIMIT",
+    505 : "CALLBACK REQUESTED HALT",
+    601 : "ROUNDING ERRORS PREVENT PROGRESS",
+    602 : "STP = STPMAX",
+    603 : "STP = STPMIN",
+    604 : "XTOL TEST SATISFIED",
+    701 : "NO FEASIBLE SOLUTION",
+    702 : "FACTR < 0",
+    703 : "FTOL < 0",
+    704 : "GTOL < 0",
+    705 : "XTOL < 0",
+    706 : "STP < STPMIN",
+    707 : "STP > STPMAX",
+    708 : "STPMIN < 0",
+    709 : "STPMAX < STPMIN",
+    710 : "INITIAL G >= 0",
+    711 : "M <= 0",
+    712 : "N <= 0",
+    713 : "INVALID NBD",
+}
+
+def fmin_l_bfgs_b(func, x0, fprime=None, args=(),
+                  approx_grad=0,
+                  bounds=None, m=10, factr=1e7, pgtol=1e-5,
+                  epsilon=1e-8,
+                  iprint=-1, maxfun=15000, maxiter=15000, disp=None,
+                  callback=None, maxls=20):
+    """
+    Minimize a function func using the L-BFGS-B algorithm.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Function to minimize.
+    x0 : ndarray
+        Initial guess.
+    fprime : callable fprime(x,*args), optional
+        The gradient of `func`. If None, then `func` returns the function
+        value and the gradient (``f, g = func(x, *args)``), unless
+        `approx_grad` is True in which case `func` returns only ``f``.
+    args : sequence, optional
+        Arguments to pass to `func` and `fprime`.
+    approx_grad : bool, optional
+        Whether to approximate the gradient numerically (in which case
+        `func` returns only the function value).
+    bounds : list, optional
+        ``(min, max)`` pairs for each element in ``x``, defining
+        the bounds on that parameter. Use None or +-inf for one of ``min`` or
+        ``max`` when there is no bound in that direction.
+    m : int, optional
+        The maximum number of variable metric corrections
+        used to define the limited memory matrix. (The limited memory BFGS
+        method does not store the full hessian but uses this many terms in an
+        approximation to it.)
+    factr : float, optional
+        The iteration stops when
+        ``(f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr * eps``,
+        where ``eps`` is the machine precision, which is automatically
+        generated by the code. Typical values for `factr` are: 1e12 for
+        low accuracy; 1e7 for moderate accuracy; 10.0 for extremely
+        high accuracy. See Notes for relationship to `ftol`, which is exposed
+        (instead of `factr`) by the `scipy.optimize.minimize` interface to
+        L-BFGS-B.
+    pgtol : float, optional
+        The iteration will stop when
+        ``max{|proj g_i | i = 1, ..., n} <= pgtol``
+        where ``proj g_i`` is the i-th component of the projected gradient.
+    epsilon : float, optional
+        Step size used when `approx_grad` is True, for numerically
+        calculating the gradient
+    iprint : int, optional
+        Deprecated option that previously controlled the text printed on the
+        screen during the problem solution. Now the code does not emit any
+        output and this keyword has no function.
+
+        .. deprecated:: 1.15.0
+            This keyword is deprecated and will be removed from SciPy 1.17.0.
+
+    disp : int, optional
+        Deprecated option that previously controlled the text printed on the
+        screen during the problem solution. Now the code does not emit any
+        output and this keyword has no function.
+
+        .. deprecated:: 1.15.0
+            This keyword is deprecated and will be removed from SciPy 1.17.0.
+
+    maxfun : int, optional
+        Maximum number of function evaluations. Note that this function
+        may violate the limit because of evaluating gradients by numerical
+        differentiation.
+    maxiter : int, optional
+        Maximum number of iterations.
+    callback : callable, optional
+        Called after each iteration, as ``callback(xk)``, where ``xk`` is the
+        current parameter vector.
+    maxls : int, optional
+        Maximum number of line search steps (per iteration). Default is 20.
+
+    Returns
+    -------
+    x : array_like
+        Estimated position of the minimum.
+    f : float
+        Value of `func` at the minimum.
+    d : dict
+        Information dictionary.
+
+        * d['warnflag'] is
+
+          - 0 if converged,
+          - 1 if too many function evaluations or too many iterations,
+          - 2 if stopped for another reason, given in d['task']
+
+        * d['grad'] is the gradient at the minimum (should be 0 ish)
+        * d['funcalls'] is the number of function calls made.
+        * d['nit'] is the number of iterations.
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'L-BFGS-B' `method` in particular. Note that the
+        `ftol` option is made available via that interface, while `factr` is
+        provided via this interface, where `factr` is the factor multiplying
+        the default machine floating-point precision to arrive at `ftol`:
+        ``ftol = factr * numpy.finfo(float).eps``.
+
+    Notes
+    -----
+    SciPy uses a C-translated and modified version of the Fortran code,
+    L-BFGS-B v3.0 (released April 25, 2011, BSD-3 licensed). Original Fortran
+    version was written by Ciyou Zhu, Richard Byrd, Jorge Nocedal and,
+    Jose Luis Morales.
+
+    References
+    ----------
+    * R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound
+      Constrained Optimization, (1995), SIAM Journal on Scientific and
+      Statistical Computing, 16, 5, pp. 1190-1208.
+    * C. Zhu, R. H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B,
+      FORTRAN routines for large scale bound constrained optimization (1997),
+      ACM Transactions on Mathematical Software, 23, 4, pp. 550 - 560.
+    * J.L. Morales and J. Nocedal. L-BFGS-B: Remark on Algorithm 778: L-BFGS-B,
+      FORTRAN routines for large scale bound constrained optimization (2011),
+      ACM Transactions on Mathematical Software, 38, 1.
+
+    Examples
+    --------
+    Solve a linear regression problem via `fmin_l_bfgs_b`. To do this, first we
+    define an objective function ``f(m, b) = (y - y_model)**2``, where `y`
+    describes the observations and `y_model` the prediction of the linear model
+    as ``y_model = m*x + b``. The bounds for the parameters, ``m`` and ``b``,
+    are arbitrarily chosen as ``(0,5)`` and ``(5,10)`` for this example.
+
+    >>> import numpy as np
+    >>> from scipy.optimize import fmin_l_bfgs_b
+    >>> X = np.arange(0, 10, 1)
+    >>> M = 2
+    >>> B = 3
+    >>> Y = M * X + B
+    >>> def func(parameters, *args):
+    ...     x = args[0]
+    ...     y = args[1]
+    ...     m, b = parameters
+    ...     y_model = m*x + b
+    ...     error = sum(np.power((y - y_model), 2))
+    ...     return error
+
+    >>> initial_values = np.array([0.0, 1.0])
+
+    >>> x_opt, f_opt, info = fmin_l_bfgs_b(func, x0=initial_values, args=(X, Y),
+    ...                                    approx_grad=True)
+    >>> x_opt, f_opt
+    array([1.99999999, 3.00000006]), 1.7746231151323805e-14  # may vary
+
+    The optimized parameters in ``x_opt`` agree with the ground truth parameters
+    ``m`` and ``b``. Next, let us perform a bound constrained optimization using
+    the `bounds` parameter.
+
+    >>> bounds = [(0, 5), (5, 10)]
+    >>> x_opt, f_op, info = fmin_l_bfgs_b(func, x0=initial_values, args=(X, Y),
+    ...                                   approx_grad=True, bounds=bounds)
+    >>> x_opt, f_opt
+    array([1.65990508, 5.31649385]), 15.721334516453945  # may vary
+    """
+    # handle fprime/approx_grad
+    if approx_grad:
+        fun = func
+        jac = None
+    elif fprime is None:
+        fun = MemoizeJac(func)
+        jac = fun.derivative
+    else:
+        fun = func
+        jac = fprime
+
+    # build options
+    callback = _wrap_callback(callback)
+    opts = {'maxcor': m,
+            'ftol': factr * np.finfo(float).eps,
+            'gtol': pgtol,
+            'eps': epsilon,
+            'maxfun': maxfun,
+            'maxiter': maxiter,
+            'callback': callback,
+            'maxls': maxls}
+
+    res = _minimize_lbfgsb(fun, x0, args=args, jac=jac, bounds=bounds,
+                           **opts)
+    d = {'grad': res['jac'],
+         'task': res['message'],
+         'funcalls': res['nfev'],
+         'nit': res['nit'],
+         'warnflag': res['status']}
+    f = res['fun']
+    x = res['x']
+
+    return x, f, d
+
+
+def _minimize_lbfgsb(fun, x0, args=(), jac=None, bounds=None,
+                     disp=None, maxcor=10, ftol=2.2204460492503131e-09,
+                     gtol=1e-5, eps=1e-8, maxfun=15000, maxiter=15000,
+                     iprint=-1, callback=None, maxls=20,
+                     finite_diff_rel_step=None, **unknown_options):
+    """
+    Minimize a scalar function of one or more variables using the L-BFGS-B
+    algorithm.
+
+    Options
+    -------
+    disp : None or int
+        Deprecated option that previously controlled the text printed on the
+        screen during the problem solution. Now the code does not emit any
+        output and this keyword has no function.
+
+        .. deprecated:: 1.15.0
+            This keyword is deprecated and will be removed from SciPy 1.17.0.
+
+    maxcor : int
+        The maximum number of variable metric corrections used to
+        define the limited memory matrix. (The limited memory BFGS
+        method does not store the full hessian but uses this many terms
+        in an approximation to it.)
+    ftol : float
+        The iteration stops when ``(f^k -
+        f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= ftol``.
+    gtol : float
+        The iteration will stop when ``max{|proj g_i | i = 1, ..., n}
+        <= gtol`` where ``proj g_i`` is the i-th component of the
+        projected gradient.
+    eps : float or ndarray
+        If `jac is None` the absolute step size used for numerical
+        approximation of the jacobian via forward differences.
+    maxfun : int
+        Maximum number of function evaluations. Note that this function
+        may violate the limit because of evaluating gradients by numerical
+        differentiation.
+    maxiter : int
+        Maximum number of iterations.
+    iprint : int, optional
+        Deprecated option that previously controlled the text printed on the
+        screen during the problem solution. Now the code does not emit any
+        output and this keyword has no function.
+
+        .. deprecated:: 1.15.0
+            This keyword is deprecated and will be removed from SciPy 1.17.0.
+
+    maxls : int, optional
+        Maximum number of line search steps (per iteration). Default is 20.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of the jacobian. The absolute step
+        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
+        possibly adjusted to fit into the bounds. For ``method='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+
+    Notes
+    -----
+    The option `ftol` is exposed via the `scipy.optimize.minimize` interface,
+    but calling `scipy.optimize.fmin_l_bfgs_b` directly exposes `factr`. The
+    relationship between the two is ``ftol = factr * numpy.finfo(float).eps``.
+    I.e., `factr` multiplies the default machine floating-point precision to
+    arrive at `ftol`.
+
+    """
+    _check_unknown_options(unknown_options)
+    m = maxcor
+    pgtol = gtol
+    factr = ftol / np.finfo(float).eps
+
+    x0 = asarray(x0).ravel()
+    n, = x0.shape
+
+    # historically old-style bounds were/are expected by lbfgsb.
+    # That's still the case but we'll deal with new-style from here on,
+    # it's easier
+    if bounds is None:
+        pass
+    elif len(bounds) != n:
+        raise ValueError('length of x0 != length of bounds')
+    else:
+        bounds = np.array(old_bound_to_new(bounds))
+
+        # check bounds
+        if (bounds[0] > bounds[1]).any():
+            raise ValueError(
+                "LBFGSB - one of the lower bounds is greater than an upper bound."
+            )
+
+        # initial vector must lie within the bounds. Otherwise ScalarFunction and
+        # approx_derivative will cause problems
+        x0 = np.clip(x0, bounds[0], bounds[1])
+
+    # _prepare_scalar_function can use bounds=None to represent no bounds
+    sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
+                                  bounds=bounds,
+                                  finite_diff_rel_step=finite_diff_rel_step)
+
+    func_and_grad = sf.fun_and_grad
+
+    nbd = zeros(n, np.int32)
+    low_bnd = zeros(n, float64)
+    upper_bnd = zeros(n, float64)
+    bounds_map = {(-np.inf, np.inf): 0,
+                  (1, np.inf): 1,
+                  (1, 1): 2,
+                  (-np.inf, 1): 3}
+
+    if bounds is not None:
+        for i in range(0, n):
+            L, U = bounds[0, i], bounds[1, i]
+            if not np.isinf(L):
+                low_bnd[i] = L
+                L = 1
+            if not np.isinf(U):
+                upper_bnd[i] = U
+                U = 1
+            nbd[i] = bounds_map[L, U]
+
+    if not maxls > 0:
+        raise ValueError('maxls must be positive.')
+
+    x = array(x0, dtype=np.float64)
+    f = array(0.0, dtype=np.int32)
+    g = zeros((n,), dtype=np.int32)
+    wa = zeros(2*m*n + 5*n + 11*m*m + 8*m, float64)
+    iwa = zeros(3*n, dtype=np.int32)
+    task = zeros(2, dtype=np.int32)
+    ln_task = zeros(2, dtype=np.int32)
+    lsave = zeros(4, dtype=np.int32)
+    isave = zeros(44, dtype=np.int32)
+    dsave = zeros(29, dtype=float64)
+
+    n_iterations = 0
+
+    while True:
+        # g may become float32 if a user provides a function that calculates
+        # the Jacobian in float32 (see gh-18730). The underlying code expects
+        # float64, so upcast it
+        g = g.astype(np.float64)
+        # x, f, g, wa, iwa, task, csave, lsave, isave, dsave = \
+        _lbfgsb.setulb(m, x, low_bnd, upper_bnd, nbd, f, g, factr, pgtol, wa,
+                       iwa, task, lsave, isave, dsave, maxls, ln_task)
+
+        if task[0] == 3:
+            # The minimization routine wants f and g at the current x.
+            # Note that interruptions due to maxfun are postponed
+            # until the completion of the current minimization iteration.
+            # Overwrite f and g:
+            f, g = func_and_grad(x)
+        elif task[0] == 1:
+            # new iteration
+            n_iterations += 1
+
+            intermediate_result = OptimizeResult(x=x, fun=f)
+            if _call_callback_maybe_halt(callback, intermediate_result):
+                task[0] = 5
+                task[1] = 505
+            if n_iterations >= maxiter:
+                task[0] = 5
+                task[1] = 504
+            elif sf.nfev > maxfun:
+                task[0] = 5
+                task[1] = 502
+        else:
+            break
+
+    if task[0] == 4:
+        warnflag = 0
+    elif sf.nfev > maxfun or n_iterations >= maxiter:
+        warnflag = 1
+    else:
+        warnflag = 2
+
+    # These two portions of the workspace are described in the mainlb
+    # function docstring in "__lbfgsb.c", ws and wy arguments.
+    s = wa[0: m*n].reshape(m, n)
+    y = wa[m*n: 2*m*n].reshape(m, n)
+
+    # isave(31) = the total number of BFGS updates prior the current iteration.
+    n_bfgs_updates = isave[30]
+
+    n_corrs = min(n_bfgs_updates, maxcor)
+    hess_inv = LbfgsInvHessProduct(s[:n_corrs], y[:n_corrs])
+
+    msg = status_messages[task[0]] + ": " + task_messages[task[1]]
+
+    return OptimizeResult(fun=f, jac=g, nfev=sf.nfev,
+                          njev=sf.ngev,
+                          nit=n_iterations, status=warnflag, message=msg,
+                          x=x, success=(warnflag == 0), hess_inv=hess_inv)
+
+
+class LbfgsInvHessProduct(LinearOperator):
+    """Linear operator for the L-BFGS approximate inverse Hessian.
+
+    This operator computes the product of a vector with the approximate inverse
+    of the Hessian of the objective function, using the L-BFGS limited
+    memory approximation to the inverse Hessian, accumulated during the
+    optimization.
+
+    Objects of this class implement the ``scipy.sparse.linalg.LinearOperator``
+    interface.
+
+    Parameters
+    ----------
+    sk : array_like, shape=(n_corr, n)
+        Array of `n_corr` most recent updates to the solution vector.
+        (See [1]).
+    yk : array_like, shape=(n_corr, n)
+        Array of `n_corr` most recent updates to the gradient. (See [1]).
+
+    References
+    ----------
+    .. [1] Nocedal, Jorge. "Updating quasi-Newton matrices with limited
+       storage." Mathematics of computation 35.151 (1980): 773-782.
+
+    """
+
+    def __init__(self, sk, yk):
+        """Construct the operator."""
+        if sk.shape != yk.shape or sk.ndim != 2:
+            raise ValueError('sk and yk must have matching shape, (n_corrs, n)')
+        n_corrs, n = sk.shape
+
+        super().__init__(dtype=np.float64, shape=(n, n))
+
+        self.sk = sk
+        self.yk = yk
+        self.n_corrs = n_corrs
+        self.rho = 1 / np.einsum('ij,ij->i', sk, yk)
+
+    def _matvec(self, x):
+        """Efficient matrix-vector multiply with the BFGS matrices.
+
+        This calculation is described in Section (4) of [1].
+
+        Parameters
+        ----------
+        x : ndarray
+            An array with shape (n,) or (n,1).
+
+        Returns
+        -------
+        y : ndarray
+            The matrix-vector product
+
+        """
+        s, y, n_corrs, rho = self.sk, self.yk, self.n_corrs, self.rho
+        q = np.array(x, dtype=self.dtype, copy=True)
+        if q.ndim == 2 and q.shape[1] == 1:
+            q = q.reshape(-1)
+
+        alpha = np.empty(n_corrs)
+
+        for i in range(n_corrs-1, -1, -1):
+            alpha[i] = rho[i] * np.dot(s[i], q)
+            q = q - alpha[i]*y[i]
+
+        r = q
+        for i in range(n_corrs):
+            beta = rho[i] * np.dot(y[i], r)
+            r = r + s[i] * (alpha[i] - beta)
+
+        return r
+
+    def todense(self):
+        """Return a dense array representation of this operator.
+
+        Returns
+        -------
+        arr : ndarray, shape=(n, n)
+            An array with the same shape and containing
+            the same data represented by this `LinearOperator`.
+
+        """
+        s, y, n_corrs, rho = self.sk, self.yk, self.n_corrs, self.rho
+        I_arr = np.eye(*self.shape, dtype=self.dtype)
+        Hk = I_arr
+
+        for i in range(n_corrs):
+            A1 = I_arr - s[i][:, np.newaxis] * y[i][np.newaxis, :] * rho[i]
+            A2 = I_arr - y[i][:, np.newaxis] * s[i][np.newaxis, :] * rho[i]
+
+            Hk = np.dot(A1, np.dot(Hk, A2)) + (rho[i] * s[i][:, np.newaxis] *
+                                                        s[i][np.newaxis, :])
+        return Hk
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linesearch.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linesearch.py
new file mode 100644
index 0000000000000000000000000000000000000000..31442e02d323e0f6d163505bf77dd30855ce1218
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linesearch.py
@@ -0,0 +1,896 @@
+"""
+Functions
+---------
+.. autosummary::
+   :toctree: generated/
+
+    line_search_armijo
+    line_search_wolfe1
+    line_search_wolfe2
+    scalar_search_wolfe1
+    scalar_search_wolfe2
+
+"""
+from warnings import warn
+
+from ._dcsrch import DCSRCH
+import numpy as np
+
+__all__ = ['LineSearchWarning', 'line_search_wolfe1', 'line_search_wolfe2',
+           'scalar_search_wolfe1', 'scalar_search_wolfe2',
+           'line_search_armijo']
+
+class LineSearchWarning(RuntimeWarning):
+    pass
+
+
+def _check_c1_c2(c1, c2):
+    if not (0 < c1 < c2 < 1):
+        raise ValueError("'c1' and 'c2' do not satisfy"
+                         "'0 < c1 < c2 < 1'.")
+
+
+#------------------------------------------------------------------------------
+# Minpack's Wolfe line and scalar searches
+#------------------------------------------------------------------------------
+
+def line_search_wolfe1(f, fprime, xk, pk, gfk=None,
+                       old_fval=None, old_old_fval=None,
+                       args=(), c1=1e-4, c2=0.9, amax=50, amin=1e-8,
+                       xtol=1e-14):
+    """
+    As `scalar_search_wolfe1` but do a line search to direction `pk`
+
+    Parameters
+    ----------
+    f : callable
+        Function `f(x)`
+    fprime : callable
+        Gradient of `f`
+    xk : array_like
+        Current point
+    pk : array_like
+        Search direction
+    gfk : array_like, optional
+        Gradient of `f` at point `xk`
+    old_fval : float, optional
+        Value of `f` at point `xk`
+    old_old_fval : float, optional
+        Value of `f` at point preceding `xk`
+
+    The rest of the parameters are the same as for `scalar_search_wolfe1`.
+
+    Returns
+    -------
+    stp, f_count, g_count, fval, old_fval
+        As in `line_search_wolfe1`
+    gval : array
+        Gradient of `f` at the final point
+
+    Notes
+    -----
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+
+    """
+    if gfk is None:
+        gfk = fprime(xk, *args)
+
+    gval = [gfk]
+    gc = [0]
+    fc = [0]
+
+    def phi(s):
+        fc[0] += 1
+        return f(xk + s*pk, *args)
+
+    def derphi(s):
+        gval[0] = fprime(xk + s*pk, *args)
+        gc[0] += 1
+        return np.dot(gval[0], pk)
+
+    derphi0 = np.dot(gfk, pk)
+
+    stp, fval, old_fval = scalar_search_wolfe1(
+            phi, derphi, old_fval, old_old_fval, derphi0,
+            c1=c1, c2=c2, amax=amax, amin=amin, xtol=xtol)
+
+    return stp, fc[0], gc[0], fval, old_fval, gval[0]
+
+
+def scalar_search_wolfe1(phi, derphi, phi0=None, old_phi0=None, derphi0=None,
+                         c1=1e-4, c2=0.9,
+                         amax=50, amin=1e-8, xtol=1e-14):
+    """
+    Scalar function search for alpha that satisfies strong Wolfe conditions
+
+    alpha > 0 is assumed to be a descent direction.
+
+    Parameters
+    ----------
+    phi : callable phi(alpha)
+        Function at point `alpha`
+    derphi : callable phi'(alpha)
+        Objective function derivative. Returns a scalar.
+    phi0 : float, optional
+        Value of phi at 0
+    old_phi0 : float, optional
+        Value of phi at previous point
+    derphi0 : float, optional
+        Value derphi at 0
+    c1 : float, optional
+        Parameter for Armijo condition rule.
+    c2 : float, optional
+        Parameter for curvature condition rule.
+    amax, amin : float, optional
+        Maximum and minimum step size
+    xtol : float, optional
+        Relative tolerance for an acceptable step.
+
+    Returns
+    -------
+    alpha : float
+        Step size, or None if no suitable step was found
+    phi : float
+        Value of `phi` at the new point `alpha`
+    phi0 : float
+        Value of `phi` at `alpha=0`
+
+    Notes
+    -----
+    Uses routine DCSRCH from MINPACK.
+    
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1`` as described in [1]_.
+
+    References
+    ----------
+    
+    .. [1] Nocedal, J., & Wright, S. J. (2006). Numerical optimization.
+       In Springer Series in Operations Research and Financial Engineering.
+       (Springer Series in Operations Research and Financial Engineering).
+       Springer Nature.
+
+    """
+    _check_c1_c2(c1, c2)
+
+    if phi0 is None:
+        phi0 = phi(0.)
+    if derphi0 is None:
+        derphi0 = derphi(0.)
+
+    if old_phi0 is not None and derphi0 != 0:
+        alpha1 = min(1.0, 1.01*2*(phi0 - old_phi0)/derphi0)
+        if alpha1 < 0:
+            alpha1 = 1.0
+    else:
+        alpha1 = 1.0
+
+    maxiter = 100
+
+    dcsrch = DCSRCH(phi, derphi, c1, c2, xtol, amin, amax)
+    stp, phi1, phi0, task = dcsrch(
+        alpha1, phi0=phi0, derphi0=derphi0, maxiter=maxiter
+    )
+
+    return stp, phi1, phi0
+
+
+line_search = line_search_wolfe1
+
+
+#------------------------------------------------------------------------------
+# Pure-Python Wolfe line and scalar searches
+#------------------------------------------------------------------------------
+
+# Note: `line_search_wolfe2` is the public `scipy.optimize.line_search`
+
+def line_search_wolfe2(f, myfprime, xk, pk, gfk=None, old_fval=None,
+                       old_old_fval=None, args=(), c1=1e-4, c2=0.9, amax=None,
+                       extra_condition=None, maxiter=10):
+    """Find alpha that satisfies strong Wolfe conditions.
+
+    Parameters
+    ----------
+    f : callable f(x,*args)
+        Objective function.
+    myfprime : callable f'(x,*args)
+        Objective function gradient.
+    xk : ndarray
+        Starting point.
+    pk : ndarray
+        Search direction. The search direction must be a descent direction
+        for the algorithm to converge.
+    gfk : ndarray, optional
+        Gradient value for x=xk (xk being the current parameter
+        estimate). Will be recomputed if omitted.
+    old_fval : float, optional
+        Function value for x=xk. Will be recomputed if omitted.
+    old_old_fval : float, optional
+        Function value for the point preceding x=xk.
+    args : tuple, optional
+        Additional arguments passed to objective function.
+    c1 : float, optional
+        Parameter for Armijo condition rule.
+    c2 : float, optional
+        Parameter for curvature condition rule.
+    amax : float, optional
+        Maximum step size
+    extra_condition : callable, optional
+        A callable of the form ``extra_condition(alpha, x, f, g)``
+        returning a boolean. Arguments are the proposed step ``alpha``
+        and the corresponding ``x``, ``f`` and ``g`` values. The line search
+        accepts the value of ``alpha`` only if this
+        callable returns ``True``. If the callable returns ``False``
+        for the step length, the algorithm will continue with
+        new iterates. The callable is only called for iterates
+        satisfying the strong Wolfe conditions.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+
+    Returns
+    -------
+    alpha : float or None
+        Alpha for which ``x_new = x0 + alpha * pk``,
+        or None if the line search algorithm did not converge.
+    fc : int
+        Number of function evaluations made.
+    gc : int
+        Number of gradient evaluations made.
+    new_fval : float or None
+        New function value ``f(x_new)=f(x0+alpha*pk)``,
+        or None if the line search algorithm did not converge.
+    old_fval : float
+        Old function value ``f(x0)``.
+    new_slope : float or None
+        The local slope along the search direction at the
+        new value ````,
+        or None if the line search algorithm did not converge.
+
+
+    Notes
+    -----
+    Uses the line search algorithm to enforce strong Wolfe
+    conditions. See Wright and Nocedal, 'Numerical Optimization',
+    1999, pp. 59-61.
+
+    The search direction `pk` must be a descent direction (e.g.
+    ``-myfprime(xk)``) to find a step length that satisfies the strong Wolfe
+    conditions. If the search direction is not a descent direction (e.g.
+    ``myfprime(xk)``), then `alpha`, `new_fval`, and `new_slope` will be None.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import line_search
+
+    A objective function and its gradient are defined.
+
+    >>> def obj_func(x):
+    ...     return (x[0])**2+(x[1])**2
+    >>> def obj_grad(x):
+    ...     return [2*x[0], 2*x[1]]
+
+    We can find alpha that satisfies strong Wolfe conditions.
+
+    >>> start_point = np.array([1.8, 1.7])
+    >>> search_gradient = np.array([-1.0, -1.0])
+    >>> line_search(obj_func, obj_grad, start_point, search_gradient)
+    (1.0, 2, 1, 1.1300000000000001, 6.13, [1.6, 1.4])
+
+    """
+    fc = [0]
+    gc = [0]
+    gval = [None]
+    gval_alpha = [None]
+
+    def phi(alpha):
+        fc[0] += 1
+        return f(xk + alpha * pk, *args)
+
+    fprime = myfprime
+
+    def derphi(alpha):
+        gc[0] += 1
+        gval[0] = fprime(xk + alpha * pk, *args)  # store for later use
+        gval_alpha[0] = alpha
+        return np.dot(gval[0], pk)
+
+    if gfk is None:
+        gfk = fprime(xk, *args)
+    derphi0 = np.dot(gfk, pk)
+
+    if extra_condition is not None:
+        # Add the current gradient as argument, to avoid needless
+        # re-evaluation
+        def extra_condition2(alpha, phi):
+            if gval_alpha[0] != alpha:
+                derphi(alpha)
+            x = xk + alpha * pk
+            return extra_condition(alpha, x, phi, gval[0])
+    else:
+        extra_condition2 = None
+
+    alpha_star, phi_star, old_fval, derphi_star = scalar_search_wolfe2(
+            phi, derphi, old_fval, old_old_fval, derphi0, c1, c2, amax,
+            extra_condition2, maxiter=maxiter)
+
+    if derphi_star is None:
+        warn('The line search algorithm did not converge',
+             LineSearchWarning, stacklevel=2)
+    else:
+        # derphi_star is a number (derphi) -- so use the most recently
+        # calculated gradient used in computing it derphi = gfk*pk
+        # this is the gradient at the next step no need to compute it
+        # again in the outer loop.
+        derphi_star = gval[0]
+
+    return alpha_star, fc[0], gc[0], phi_star, old_fval, derphi_star
+
+
+def scalar_search_wolfe2(phi, derphi, phi0=None,
+                         old_phi0=None, derphi0=None,
+                         c1=1e-4, c2=0.9, amax=None,
+                         extra_condition=None, maxiter=10):
+    """Find alpha that satisfies strong Wolfe conditions.
+
+    alpha > 0 is assumed to be a descent direction.
+
+    Parameters
+    ----------
+    phi : callable phi(alpha)
+        Objective scalar function.
+    derphi : callable phi'(alpha)
+        Objective function derivative. Returns a scalar.
+    phi0 : float, optional
+        Value of phi at 0.
+    old_phi0 : float, optional
+        Value of phi at previous point.
+    derphi0 : float, optional
+        Value of derphi at 0
+    c1 : float, optional
+        Parameter for Armijo condition rule.
+    c2 : float, optional
+        Parameter for curvature condition rule.
+    amax : float, optional
+        Maximum step size.
+    extra_condition : callable, optional
+        A callable of the form ``extra_condition(alpha, phi_value)``
+        returning a boolean. The line search accepts the value
+        of ``alpha`` only if this callable returns ``True``.
+        If the callable returns ``False`` for the step length,
+        the algorithm will continue with new iterates.
+        The callable is only called for iterates satisfying
+        the strong Wolfe conditions.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+
+    Returns
+    -------
+    alpha_star : float or None
+        Best alpha, or None if the line search algorithm did not converge.
+    phi_star : float
+        phi at alpha_star.
+    phi0 : float
+        phi at 0.
+    derphi_star : float or None
+        derphi at alpha_star, or None if the line search algorithm
+        did not converge.
+
+    Notes
+    -----
+    Uses the line search algorithm to enforce strong Wolfe
+    conditions. See Wright and Nocedal, 'Numerical Optimization',
+    1999, pp. 59-61.
+
+    """
+    _check_c1_c2(c1, c2)
+
+    if phi0 is None:
+        phi0 = phi(0.)
+
+    if derphi0 is None:
+        derphi0 = derphi(0.)
+
+    alpha0 = 0
+    if old_phi0 is not None and derphi0 != 0:
+        alpha1 = min(1.0, 1.01*2*(phi0 - old_phi0)/derphi0)
+    else:
+        alpha1 = 1.0
+
+    if alpha1 < 0:
+        alpha1 = 1.0
+
+    if amax is not None:
+        alpha1 = min(alpha1, amax)
+
+    phi_a1 = phi(alpha1)
+    #derphi_a1 = derphi(alpha1) evaluated below
+
+    phi_a0 = phi0
+    derphi_a0 = derphi0
+
+    if extra_condition is None:
+        def extra_condition(alpha, phi):
+            return True
+
+    for i in range(maxiter):
+        if alpha1 == 0 or (amax is not None and alpha0 > amax):
+            # alpha1 == 0: This shouldn't happen. Perhaps the increment has
+            # slipped below machine precision?
+            alpha_star = None
+            phi_star = phi0
+            phi0 = old_phi0
+            derphi_star = None
+
+            if alpha1 == 0:
+                msg = 'Rounding errors prevent the line search from converging'
+            else:
+                msg = "The line search algorithm could not find a solution " + \
+                      f"less than or equal to amax: {amax}"
+
+            warn(msg, LineSearchWarning, stacklevel=2)
+            break
+
+        not_first_iteration = i > 0
+        if (phi_a1 > phi0 + c1 * alpha1 * derphi0) or \
+           ((phi_a1 >= phi_a0) and not_first_iteration):
+            alpha_star, phi_star, derphi_star = \
+                        _zoom(alpha0, alpha1, phi_a0,
+                              phi_a1, derphi_a0, phi, derphi,
+                              phi0, derphi0, c1, c2, extra_condition)
+            break
+
+        derphi_a1 = derphi(alpha1)
+        if (abs(derphi_a1) <= -c2*derphi0):
+            if extra_condition(alpha1, phi_a1):
+                alpha_star = alpha1
+                phi_star = phi_a1
+                derphi_star = derphi_a1
+                break
+
+        if (derphi_a1 >= 0):
+            alpha_star, phi_star, derphi_star = \
+                        _zoom(alpha1, alpha0, phi_a1,
+                              phi_a0, derphi_a1, phi, derphi,
+                              phi0, derphi0, c1, c2, extra_condition)
+            break
+
+        alpha2 = 2 * alpha1  # increase by factor of two on each iteration
+        if amax is not None:
+            alpha2 = min(alpha2, amax)
+        alpha0 = alpha1
+        alpha1 = alpha2
+        phi_a0 = phi_a1
+        phi_a1 = phi(alpha1)
+        derphi_a0 = derphi_a1
+
+    else:
+        # stopping test maxiter reached
+        alpha_star = alpha1
+        phi_star = phi_a1
+        derphi_star = None
+        warn('The line search algorithm did not converge',
+             LineSearchWarning, stacklevel=2)
+
+    return alpha_star, phi_star, phi0, derphi_star
+
+
+def _cubicmin(a, fa, fpa, b, fb, c, fc):
+    """
+    Finds the minimizer for a cubic polynomial that goes through the
+    points (a,fa), (b,fb), and (c,fc) with derivative at a of fpa.
+
+    If no minimizer can be found, return None.
+
+    """
+    # f(x) = A *(x-a)^3 + B*(x-a)^2 + C*(x-a) + D
+
+    with np.errstate(divide='raise', over='raise', invalid='raise'):
+        try:
+            C = fpa
+            db = b - a
+            dc = c - a
+            denom = (db * dc) ** 2 * (db - dc)
+            d1 = np.empty((2, 2))
+            d1[0, 0] = dc ** 2
+            d1[0, 1] = -db ** 2
+            d1[1, 0] = -dc ** 3
+            d1[1, 1] = db ** 3
+            [A, B] = np.dot(d1, np.asarray([fb - fa - C * db,
+                                            fc - fa - C * dc]).flatten())
+            A /= denom
+            B /= denom
+            radical = B * B - 3 * A * C
+            xmin = a + (-B + np.sqrt(radical)) / (3 * A)
+        except ArithmeticError:
+            return None
+    if not np.isfinite(xmin):
+        return None
+    return xmin
+
+
+def _quadmin(a, fa, fpa, b, fb):
+    """
+    Finds the minimizer for a quadratic polynomial that goes through
+    the points (a,fa), (b,fb) with derivative at a of fpa.
+
+    """
+    # f(x) = B*(x-a)^2 + C*(x-a) + D
+    with np.errstate(divide='raise', over='raise', invalid='raise'):
+        try:
+            D = fa
+            C = fpa
+            db = b - a * 1.0
+            B = (fb - D - C * db) / (db * db)
+            xmin = a - C / (2.0 * B)
+        except ArithmeticError:
+            return None
+    if not np.isfinite(xmin):
+        return None
+    return xmin
+
+
+def _zoom(a_lo, a_hi, phi_lo, phi_hi, derphi_lo,
+          phi, derphi, phi0, derphi0, c1, c2, extra_condition):
+    """Zoom stage of approximate linesearch satisfying strong Wolfe conditions.
+
+    Part of the optimization algorithm in `scalar_search_wolfe2`.
+
+    Notes
+    -----
+    Implements Algorithm 3.6 (zoom) in Wright and Nocedal,
+    'Numerical Optimization', 1999, pp. 61.
+
+    """
+
+    maxiter = 10
+    i = 0
+    delta1 = 0.2  # cubic interpolant check
+    delta2 = 0.1  # quadratic interpolant check
+    phi_rec = phi0
+    a_rec = 0
+    while True:
+        # interpolate to find a trial step length between a_lo and
+        # a_hi Need to choose interpolation here. Use cubic
+        # interpolation and then if the result is within delta *
+        # dalpha or outside of the interval bounded by a_lo or a_hi
+        # then use quadratic interpolation, if the result is still too
+        # close, then use bisection
+
+        dalpha = a_hi - a_lo
+        if dalpha < 0:
+            a, b = a_hi, a_lo
+        else:
+            a, b = a_lo, a_hi
+
+        # minimizer of cubic interpolant
+        # (uses phi_lo, derphi_lo, phi_hi, and the most recent value of phi)
+        #
+        # if the result is too close to the end points (or out of the
+        # interval), then use quadratic interpolation with phi_lo,
+        # derphi_lo and phi_hi if the result is still too close to the
+        # end points (or out of the interval) then use bisection
+
+        if (i > 0):
+            cchk = delta1 * dalpha
+            a_j = _cubicmin(a_lo, phi_lo, derphi_lo, a_hi, phi_hi,
+                            a_rec, phi_rec)
+        if (i == 0) or (a_j is None) or (a_j > b - cchk) or (a_j < a + cchk):
+            qchk = delta2 * dalpha
+            a_j = _quadmin(a_lo, phi_lo, derphi_lo, a_hi, phi_hi)
+            if (a_j is None) or (a_j > b-qchk) or (a_j < a+qchk):
+                a_j = a_lo + 0.5*dalpha
+
+        # Check new value of a_j
+
+        phi_aj = phi(a_j)
+        if (phi_aj > phi0 + c1*a_j*derphi0) or (phi_aj >= phi_lo):
+            phi_rec = phi_hi
+            a_rec = a_hi
+            a_hi = a_j
+            phi_hi = phi_aj
+        else:
+            derphi_aj = derphi(a_j)
+            if abs(derphi_aj) <= -c2*derphi0 and extra_condition(a_j, phi_aj):
+                a_star = a_j
+                val_star = phi_aj
+                valprime_star = derphi_aj
+                break
+            if derphi_aj*(a_hi - a_lo) >= 0:
+                phi_rec = phi_hi
+                a_rec = a_hi
+                a_hi = a_lo
+                phi_hi = phi_lo
+            else:
+                phi_rec = phi_lo
+                a_rec = a_lo
+            a_lo = a_j
+            phi_lo = phi_aj
+            derphi_lo = derphi_aj
+        i += 1
+        if (i > maxiter):
+            # Failed to find a conforming step size
+            a_star = None
+            val_star = None
+            valprime_star = None
+            break
+    return a_star, val_star, valprime_star
+
+
+#------------------------------------------------------------------------------
+# Armijo line and scalar searches
+#------------------------------------------------------------------------------
+
+def line_search_armijo(f, xk, pk, gfk, old_fval, args=(), c1=1e-4, alpha0=1):
+    """Minimize over alpha, the function ``f(xk+alpha pk)``.
+
+    Parameters
+    ----------
+    f : callable
+        Function to be minimized.
+    xk : array_like
+        Current point.
+    pk : array_like
+        Search direction.
+    gfk : array_like
+        Gradient of `f` at point `xk`.
+    old_fval : float
+        Value of `f` at point `xk`.
+    args : tuple, optional
+        Optional arguments.
+    c1 : float, optional
+        Value to control stopping criterion.
+    alpha0 : scalar, optional
+        Value of `alpha` at start of the optimization.
+
+    Returns
+    -------
+    alpha
+    f_count
+    f_val_at_alpha
+
+    Notes
+    -----
+    Uses the interpolation algorithm (Armijo backtracking) as suggested by
+    Wright and Nocedal in 'Numerical Optimization', 1999, pp. 56-57
+
+    """
+    xk = np.atleast_1d(xk)
+    fc = [0]
+
+    def phi(alpha1):
+        fc[0] += 1
+        return f(xk + alpha1*pk, *args)
+
+    if old_fval is None:
+        phi0 = phi(0.)
+    else:
+        phi0 = old_fval  # compute f(xk) -- done in past loop
+
+    derphi0 = np.dot(gfk, pk)
+    alpha, phi1 = scalar_search_armijo(phi, phi0, derphi0, c1=c1,
+                                       alpha0=alpha0)
+    return alpha, fc[0], phi1
+
+
+def line_search_BFGS(f, xk, pk, gfk, old_fval, args=(), c1=1e-4, alpha0=1):
+    """
+    Compatibility wrapper for `line_search_armijo`
+    """
+    r = line_search_armijo(f, xk, pk, gfk, old_fval, args=args, c1=c1,
+                           alpha0=alpha0)
+    return r[0], r[1], 0, r[2]
+
+
+def scalar_search_armijo(phi, phi0, derphi0, c1=1e-4, alpha0=1, amin=0):
+    """Minimize over alpha, the function ``phi(alpha)``.
+
+    Uses the interpolation algorithm (Armijo backtracking) as suggested by
+    Wright and Nocedal in 'Numerical Optimization', 1999, pp. 56-57
+
+    alpha > 0 is assumed to be a descent direction.
+
+    Returns
+    -------
+    alpha
+    phi1
+
+    """
+    phi_a0 = phi(alpha0)
+    if phi_a0 <= phi0 + c1*alpha0*derphi0:
+        return alpha0, phi_a0
+
+    # Otherwise, compute the minimizer of a quadratic interpolant:
+
+    alpha1 = -(derphi0) * alpha0**2 / 2.0 / (phi_a0 - phi0 - derphi0 * alpha0)
+    phi_a1 = phi(alpha1)
+
+    if (phi_a1 <= phi0 + c1*alpha1*derphi0):
+        return alpha1, phi_a1
+
+    # Otherwise, loop with cubic interpolation until we find an alpha which
+    # satisfies the first Wolfe condition (since we are backtracking, we will
+    # assume that the value of alpha is not too small and satisfies the second
+    # condition.
+
+    while alpha1 > amin:       # we are assuming alpha>0 is a descent direction
+        factor = alpha0**2 * alpha1**2 * (alpha1-alpha0)
+        a = alpha0**2 * (phi_a1 - phi0 - derphi0*alpha1) - \
+            alpha1**2 * (phi_a0 - phi0 - derphi0*alpha0)
+        a = a / factor
+        b = -alpha0**3 * (phi_a1 - phi0 - derphi0*alpha1) + \
+            alpha1**3 * (phi_a0 - phi0 - derphi0*alpha0)
+        b = b / factor
+
+        alpha2 = (-b + np.sqrt(abs(b**2 - 3 * a * derphi0))) / (3.0*a)
+        phi_a2 = phi(alpha2)
+
+        if (phi_a2 <= phi0 + c1*alpha2*derphi0):
+            return alpha2, phi_a2
+
+        if (alpha1 - alpha2) > alpha1 / 2.0 or (1 - alpha2/alpha1) < 0.96:
+            alpha2 = alpha1 / 2.0
+
+        alpha0 = alpha1
+        alpha1 = alpha2
+        phi_a0 = phi_a1
+        phi_a1 = phi_a2
+
+    # Failed to find a suitable step length
+    return None, phi_a1
+
+
+#------------------------------------------------------------------------------
+# Non-monotone line search for DF-SANE
+#------------------------------------------------------------------------------
+
+def _nonmonotone_line_search_cruz(f, x_k, d, prev_fs, eta,
+                                  gamma=1e-4, tau_min=0.1, tau_max=0.5):
+    """
+    Nonmonotone backtracking line search as described in [1]_
+
+    Parameters
+    ----------
+    f : callable
+        Function returning a tuple ``(f, F)`` where ``f`` is the value
+        of a merit function and ``F`` the residual.
+    x_k : ndarray
+        Initial position.
+    d : ndarray
+        Search direction.
+    prev_fs : float
+        List of previous merit function values. Should have ``len(prev_fs) <= M``
+        where ``M`` is the nonmonotonicity window parameter.
+    eta : float
+        Allowed merit function increase, see [1]_
+    gamma, tau_min, tau_max : float, optional
+        Search parameters, see [1]_
+
+    Returns
+    -------
+    alpha : float
+        Step length
+    xp : ndarray
+        Next position
+    fp : float
+        Merit function value at next position
+    Fp : ndarray
+        Residual at next position
+
+    References
+    ----------
+    [1] "Spectral residual method without gradient information for solving
+        large-scale nonlinear systems of equations." W. La Cruz,
+        J.M. Martinez, M. Raydan. Math. Comp. **75**, 1429 (2006).
+
+    """
+    f_k = prev_fs[-1]
+    f_bar = max(prev_fs)
+
+    alpha_p = 1
+    alpha_m = 1
+    alpha = 1
+
+    while True:
+        xp = x_k + alpha_p * d
+        fp, Fp = f(xp)
+
+        if fp <= f_bar + eta - gamma * alpha_p**2 * f_k:
+            alpha = alpha_p
+            break
+
+        alpha_tp = alpha_p**2 * f_k / (fp + (2*alpha_p - 1)*f_k)
+
+        xp = x_k - alpha_m * d
+        fp, Fp = f(xp)
+
+        if fp <= f_bar + eta - gamma * alpha_m**2 * f_k:
+            alpha = -alpha_m
+            break
+
+        alpha_tm = alpha_m**2 * f_k / (fp + (2*alpha_m - 1)*f_k)
+
+        alpha_p = np.clip(alpha_tp, tau_min * alpha_p, tau_max * alpha_p)
+        alpha_m = np.clip(alpha_tm, tau_min * alpha_m, tau_max * alpha_m)
+
+    return alpha, xp, fp, Fp
+
+
+def _nonmonotone_line_search_cheng(f, x_k, d, f_k, C, Q, eta,
+                                   gamma=1e-4, tau_min=0.1, tau_max=0.5,
+                                   nu=0.85):
+    """
+    Nonmonotone line search from [1]
+
+    Parameters
+    ----------
+    f : callable
+        Function returning a tuple ``(f, F)`` where ``f`` is the value
+        of a merit function and ``F`` the residual.
+    x_k : ndarray
+        Initial position.
+    d : ndarray
+        Search direction.
+    f_k : float
+        Initial merit function value.
+    C, Q : float
+        Control parameters. On the first iteration, give values
+        Q=1.0, C=f_k
+    eta : float
+        Allowed merit function increase, see [1]_
+    nu, gamma, tau_min, tau_max : float, optional
+        Search parameters, see [1]_
+
+    Returns
+    -------
+    alpha : float
+        Step length
+    xp : ndarray
+        Next position
+    fp : float
+        Merit function value at next position
+    Fp : ndarray
+        Residual at next position
+    C : float
+        New value for the control parameter C
+    Q : float
+        New value for the control parameter Q
+
+    References
+    ----------
+    .. [1] W. Cheng & D.-H. Li, ''A derivative-free nonmonotone line
+           search and its application to the spectral residual
+           method'', IMA J. Numer. Anal. 29, 814 (2009).
+
+    """
+    alpha_p = 1
+    alpha_m = 1
+    alpha = 1
+
+    while True:
+        xp = x_k + alpha_p * d
+        fp, Fp = f(xp)
+
+        if fp <= C + eta - gamma * alpha_p**2 * f_k:
+            alpha = alpha_p
+            break
+
+        alpha_tp = alpha_p**2 * f_k / (fp + (2*alpha_p - 1)*f_k)
+
+        xp = x_k - alpha_m * d
+        fp, Fp = f(xp)
+
+        if fp <= C + eta - gamma * alpha_m**2 * f_k:
+            alpha = -alpha_m
+            break
+
+        alpha_tm = alpha_m**2 * f_k / (fp + (2*alpha_m - 1)*f_k)
+
+        alpha_p = np.clip(alpha_tp, tau_min * alpha_p, tau_max * alpha_p)
+        alpha_m = np.clip(alpha_tm, tau_min * alpha_m, tau_max * alpha_m)
+
+    # Update C and Q
+    Q_next = nu * Q + 1
+    C = (nu * Q * (C + eta) + fp) / Q_next
+    Q = Q_next
+
+    return alpha, xp, fp, Fp, C, Q
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog.py
new file mode 100644
index 0000000000000000000000000000000000000000..054ba471dcbd4622ab9c2fb9dda313bb124c0451
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog.py
@@ -0,0 +1,733 @@
+"""
+A top-level linear programming interface.
+
+.. versionadded:: 0.15.0
+
+Functions
+---------
+.. autosummary::
+   :toctree: generated/
+
+    linprog
+    linprog_verbose_callback
+    linprog_terse_callback
+
+"""
+
+import numpy as np
+
+from ._optimize import OptimizeResult, OptimizeWarning
+from warnings import warn
+from ._linprog_highs import _linprog_highs
+from ._linprog_ip import _linprog_ip
+from ._linprog_simplex import _linprog_simplex
+from ._linprog_rs import _linprog_rs
+from ._linprog_doc import (_linprog_highs_doc, _linprog_ip_doc,  # noqa: F401
+                           _linprog_rs_doc, _linprog_simplex_doc,
+                           _linprog_highs_ipm_doc, _linprog_highs_ds_doc)
+from ._linprog_util import (
+    _parse_linprog, _presolve, _get_Abc, _LPProblem, _autoscale,
+    _postsolve, _check_result, _display_summary)
+from copy import deepcopy
+
+__all__ = ['linprog', 'linprog_verbose_callback', 'linprog_terse_callback']
+
+__docformat__ = "restructuredtext en"
+
+LINPROG_METHODS = [
+    'simplex', 'revised simplex', 'interior-point', 'highs', 'highs-ds', 'highs-ipm'
+]
+
+
+def linprog_verbose_callback(res):
+    """
+    A sample callback function demonstrating the linprog callback interface.
+    This callback produces detailed output to sys.stdout before each iteration
+    and after the final iteration of the simplex algorithm.
+
+    Parameters
+    ----------
+    res : A `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+        x : 1-D array
+            The independent variable vector which optimizes the linear
+            programming problem.
+        fun : float
+            Value of the objective function.
+        success : bool
+            True if the algorithm succeeded in finding an optimal solution.
+        slack : 1-D array
+            The values of the slack variables. Each slack variable corresponds
+            to an inequality constraint. If the slack is zero, then the
+            corresponding constraint is active.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints, that is,
+            ``b - A_eq @ x``
+        phase : int
+            The phase of the optimization being executed. In phase 1 a basic
+            feasible solution is sought and the T has an additional row
+            representing an alternate objective function.
+        status : int
+            An integer representing the exit status of the optimization:
+
+            ``0`` : Optimization terminated successfully
+
+            ``1`` : Iteration limit reached
+
+            ``2`` : Problem appears to be infeasible
+
+            ``3`` : Problem appears to be unbounded
+
+            ``4`` : Serious numerical difficulties encountered
+
+        nit : int
+            The number of iterations performed.
+        message : str
+            A string descriptor of the exit status of the optimization.
+    """
+    x = res['x']
+    fun = res['fun']
+    phase = res['phase']
+    status = res['status']
+    nit = res['nit']
+    message = res['message']
+    complete = res['complete']
+
+    saved_printoptions = np.get_printoptions()
+    np.set_printoptions(linewidth=500,
+                        formatter={'float': lambda x: f"{x: 12.4f}"})
+    if status:
+        print('--------- Simplex Early Exit -------\n')
+        print(f'The simplex method exited early with status {status:d}')
+        print(message)
+    elif complete:
+        print('--------- Simplex Complete --------\n')
+        print(f'Iterations required: {nit}')
+    else:
+        print(f'--------- Iteration {nit:d}  ---------\n')
+
+    if nit > 0:
+        if phase == 1:
+            print('Current Pseudo-Objective Value:')
+        else:
+            print('Current Objective Value:')
+        print('f = ', fun)
+        print()
+        print('Current Solution Vector:')
+        print('x = ', x)
+        print()
+
+    np.set_printoptions(**saved_printoptions)
+
+
+def linprog_terse_callback(res):
+    """
+    A sample callback function demonstrating the linprog callback interface.
+    This callback produces brief output to sys.stdout before each iteration
+    and after the final iteration of the simplex algorithm.
+
+    Parameters
+    ----------
+    res : A `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+        x : 1-D array
+            The independent variable vector which optimizes the linear
+            programming problem.
+        fun : float
+            Value of the objective function.
+        success : bool
+            True if the algorithm succeeded in finding an optimal solution.
+        slack : 1-D array
+            The values of the slack variables. Each slack variable corresponds
+            to an inequality constraint. If the slack is zero, then the
+            corresponding constraint is active.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints, that is,
+            ``b - A_eq @ x``.
+        phase : int
+            The phase of the optimization being executed. In phase 1 a basic
+            feasible solution is sought and the T has an additional row
+            representing an alternate objective function.
+        status : int
+            An integer representing the exit status of the optimization:
+
+            ``0`` : Optimization terminated successfully
+
+            ``1`` : Iteration limit reached
+
+            ``2`` : Problem appears to be infeasible
+
+            ``3`` : Problem appears to be unbounded
+
+            ``4`` : Serious numerical difficulties encountered
+
+        nit : int
+            The number of iterations performed.
+        message : str
+            A string descriptor of the exit status of the optimization.
+    """
+    nit = res['nit']
+    x = res['x']
+
+    if nit == 0:
+        print("Iter:   X:")
+    print(f"{nit: <5d}   ", end="")
+    print(x)
+
+
+def linprog(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+            bounds=(0, None), method='highs', callback=None,
+            options=None, x0=None, integrality=None):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    - minimize ::
+
+        c @ x
+
+    - such that ::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None``. Other bounds can be
+    specified with ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable.
+        If a single tuple ``(min, max)`` is provided, then ``min`` and ``max``
+        will serve as bounds for all decision variables.
+        Use ``None`` to indicate that there is no bound. For instance, the
+        default bound ``(0, None)`` means that all decision variables are
+        non-negative, and the pair ``(None, None)`` means no bounds at all,
+        i.e. all variables are allowed to be any real.
+    method : str, optional
+        The algorithm used to solve the standard form problem.
+        The following are supported.
+
+        - :ref:`'highs' ` (default)
+        - :ref:`'highs-ds' `
+        - :ref:`'highs-ipm' `
+        - :ref:`'interior-point' ` (legacy)
+        - :ref:`'revised simplex' ` (legacy)
+        - :ref:`'simplex' ` (legacy)
+
+        The legacy methods are deprecated and will be removed in SciPy 1.11.0.
+    callback : callable, optional
+        If a callback function is provided, it will be called at least once per
+        iteration of the algorithm. The callback function must accept a single
+        `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+        x : 1-D array
+            The current solution vector.
+        fun : float
+            The current value of the objective function ``c @ x``.
+        success : bool
+            ``True`` when the algorithm has completed successfully.
+        slack : 1-D array
+            The (nominally positive) values of the slack,
+            ``b_ub - A_ub @ x``.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        phase : int
+            The phase of the algorithm being executed.
+        status : int
+            An integer representing the status of the algorithm.
+
+            ``0`` : Optimization proceeding nominally.
+
+            ``1`` : Iteration limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : Numerical difficulties encountered.
+
+        nit : int
+            The current iteration number.
+        message : str
+            A string descriptor of the algorithm status.
+
+        Callback functions are not currently supported by the HiGHS methods.
+
+    options : dict, optional
+        A dictionary of solver options. All methods accept the following
+        options:
+
+        maxiter : int
+            Maximum number of iterations to perform.
+            Default: see method-specific documentation.
+        disp : bool
+            Set to ``True`` to print convergence messages.
+            Default: ``False``.
+        presolve : bool
+            Set to ``False`` to disable automatic presolve.
+            Default: ``True``.
+
+        All methods except the HiGHS solvers also accept:
+
+        tol : float
+            A tolerance which determines when a residual is "close enough" to
+            zero to be considered exactly zero.
+        autoscale : bool
+            Set to ``True`` to automatically perform equilibration.
+            Consider using this option if the numerical values in the
+            constraints are separated by several orders of magnitude.
+            Default: ``False``.
+        rr : bool
+            Set to ``False`` to disable automatic redundancy removal.
+            Default: ``True``.
+        rr_method : string
+            Method used to identify and remove redundant rows from the
+            equality constraint matrix after presolve. For problems with
+            dense input, the available methods for redundancy removal are:
+
+            ``SVD``:
+                Repeatedly performs singular value decomposition on
+                the matrix, detecting redundant rows based on nonzeros
+                in the left singular vectors that correspond with
+                zero singular values. May be fast when the matrix is
+                nearly full rank.
+            ``pivot``:
+                Uses the algorithm presented in [5]_ to identify
+                redundant rows.
+            ``ID``:
+                Uses a randomized interpolative decomposition.
+                Identifies columns of the matrix transpose not used in
+                a full-rank interpolative decomposition of the matrix.
+            ``None``:
+                Uses ``svd`` if the matrix is nearly full rank, that is,
+                the difference between the matrix rank and the number
+                of rows is less than five. If not, uses ``pivot``. The
+                behavior of this default is subject to change without
+                prior notice.
+
+            Default: None.
+            For problems with sparse input, this option is ignored, and the
+            pivot-based algorithm presented in [5]_ is used.
+
+        For method-specific options, see
+        :func:`show_options('linprog') `.
+
+    x0 : 1-D array, optional
+        Guess values of the decision variables, which will be refined by
+        the optimization algorithm. This argument is currently used only by the
+        :ref:`'revised simplex' ` method,
+        and can only be used if `x0` represents a basic feasible solution.
+
+    integrality : 1-D array or int, optional
+        Indicates the type of integrality constraint on each decision variable.
+
+        ``0`` : Continuous variable; no integrality constraint.
+
+        ``1`` : Integer variable; decision variable must be an integer
+        within `bounds`.
+
+        ``2`` : Semi-continuous variable; decision variable must be within
+        `bounds` or take value ``0``.
+
+        ``3`` : Semi-integer variable; decision variable must be an integer
+        within `bounds` or take value ``0``.
+
+        By default, all variables are continuous.
+
+        For mixed integrality constraints, supply an array of shape ``c.shape``.
+        To infer a constraint on each decision variable from shorter inputs,
+        the argument will be broadcast to ``c.shape`` using `numpy.broadcast_to`.
+
+        This argument is currently used only by the
+        :ref:`'highs' ` method and is ignored otherwise.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields
+        below. Note that the return types of the fields may depend on whether
+        the optimization was successful, therefore it is recommended to check
+        `OptimizeResult.status` before relying on the other fields:
+
+        x : 1-D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1-D array
+            The (nominally positive) values of the slack variables,
+            ``b_ub - A_ub @ x``.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : Numerical difficulties encountered.
+
+        nit : int
+            The total number of iterations performed in all phases.
+        message : str
+            A string descriptor of the exit status of the algorithm.
+
+    See Also
+    --------
+    show_options : Additional options accepted by the solvers.
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter.
+
+    :ref:`'highs-ds' `, and
+    :ref:`'highs-ipm' ` are interfaces to the
+    HiGHS simplex and interior-point method solvers [13]_, respectively.
+    :ref:`'highs' ` (default) chooses between
+    the two automatically. These are the fastest linear
+    programming solvers in SciPy, especially for large, sparse problems;
+    which of these two is faster is problem-dependent.
+    The other solvers are legacy methods and will be removed when `callback` is
+    supported by the HiGHS methods.
+
+    Method :ref:`'highs-ds' `, is a wrapper of the C++ high
+    performance dual revised simplex implementation (HSOL) [13]_, [14]_.
+    Method :ref:`'highs-ipm' ` is a wrapper of a C++
+    implementation of an **i**\ nterior-\ **p**\ oint **m**\ ethod [13]_; it
+    features a crossover routine, so it is as accurate as a simplex solver.
+    Method :ref:`'highs' ` chooses between the two
+    automatically.
+    For new code involving `linprog`, we recommend explicitly choosing one of
+    these three method values.
+
+    .. versionadded:: 1.6.0
+
+    Method :ref:`'interior-point' `
+    uses the primal-dual path following algorithm
+    as outlined in [4]_. This algorithm supports sparse constraint matrices and
+    is typically faster than the simplex methods, especially for large, sparse
+    problems. Note, however, that the solution returned may be slightly less
+    accurate than those of the simplex methods and will not, in general,
+    correspond with a vertex of the polytope defined by the constraints.
+
+    .. versionadded:: 1.0.0
+
+    Method :ref:`'revised simplex' `
+    uses the revised simplex method as described in
+    [9]_, except that a factorization [11]_ of the basis matrix, rather than
+    its inverse, is efficiently maintained and used to solve the linear systems
+    at each iteration of the algorithm.
+
+    .. versionadded:: 1.3.0
+
+    Method :ref:`'simplex' ` uses a traditional,
+    full-tableau implementation of
+    Dantzig's simplex algorithm [1]_, [2]_ (*not* the
+    Nelder-Mead simplex). This algorithm is included for backwards
+    compatibility and educational purposes.
+
+    .. versionadded:: 0.15.0
+
+    Before applying :ref:`'interior-point' `,
+    :ref:`'revised simplex' `, or
+    :ref:`'simplex' `,
+    a presolve procedure based on [8]_ attempts
+    to identify trivial infeasibilities, trivial unboundedness, and potential
+    problem simplifications. Specifically, it checks for:
+
+    - rows of zeros in ``A_eq`` or ``A_ub``, representing trivial constraints;
+    - columns of zeros in ``A_eq`` `and` ``A_ub``, representing unconstrained
+      variables;
+    - column singletons in ``A_eq``, representing fixed variables; and
+    - column singletons in ``A_ub``, representing simple bounds.
+
+    If presolve reveals that the problem is unbounded (e.g. an unconstrained
+    and unbounded variable has negative cost) or infeasible (e.g., a row of
+    zeros in ``A_eq`` corresponds with a nonzero in ``b_eq``), the solver
+    terminates with the appropriate status code. Note that presolve terminates
+    as soon as any sign of unboundedness is detected; consequently, a problem
+    may be reported as unbounded when in reality the problem is infeasible
+    (but infeasibility has not been detected yet). Therefore, if it is
+    important to know whether the problem is actually infeasible, solve the
+    problem again with option ``presolve=False``.
+
+    If neither infeasibility nor unboundedness are detected in a single pass
+    of the presolve, bounds are tightened where possible and fixed
+    variables are removed from the problem. Then, linearly dependent rows
+    of the ``A_eq`` matrix are removed, (unless they represent an
+    infeasibility) to avoid numerical difficulties in the primary solve
+    routine. Note that rows that are nearly linearly dependent (within a
+    prescribed tolerance) may also be removed, which can change the optimal
+    solution in rare cases. If this is a concern, eliminate redundancy from
+    your problem formulation and run with option ``rr=False`` or
+    ``presolve=False``.
+
+    Several potential improvements can be made here: additional presolve
+    checks outlined in [8]_ should be implemented, the presolve routine should
+    be run multiple times (until no further simplifications can be made), and
+    more of the efficiency improvements from [5]_ should be implemented in the
+    redundancy removal routines.
+
+    After presolve, the problem is transformed to standard form by converting
+    the (tightened) simple bounds to upper bound constraints, introducing
+    non-negative slack variables for inequality constraints, and expressing
+    unbounded variables as the difference between two non-negative variables.
+    Optionally, the problem is automatically scaled via equilibration [12]_.
+    The selected algorithm solves the standard form problem, and a
+    postprocessing routine converts the result to a solution to the original
+    problem.
+
+    References
+    ----------
+    .. [1] Dantzig, George B., Linear programming and extensions. Rand
+           Corporation Research Study Princeton Univ. Press, Princeton, NJ,
+           1963
+    .. [2] Hillier, S.H. and Lieberman, G.J. (1995), "Introduction to
+           Mathematical Programming", McGraw-Hill, Chapter 4.
+    .. [3] Bland, Robert G. New finite pivoting rules for the simplex method.
+           Mathematics of Operations Research (2), 1977: pp. 103-107.
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+    .. [5] Andersen, Erling D. "Finding all linearly dependent rows in
+           large-scale linear programming." Optimization Methods and Software
+           6.3 (1995): 219-227.
+    .. [6] Freund, Robert M. "Primal-Dual Interior-Point Methods for Linear
+           Programming based on Newton's Method." Unpublished Course Notes,
+           March 2004. Available 2/25/2017 at
+           https://ocw.mit.edu/courses/sloan-school-of-management/15-084j-nonlinear-programming-spring-2004/lecture-notes/lec14_int_pt_mthd.pdf
+    .. [7] Fourer, Robert. "Solving Linear Programs by Interior-Point Methods."
+           Unpublished Course Notes, August 26, 2005. Available 2/25/2017 at
+           http://www.4er.org/CourseNotes/Book%20B/B-III.pdf
+    .. [8] Andersen, Erling D., and Knud D. Andersen. "Presolving in linear
+           programming." Mathematical Programming 71.2 (1995): 221-245.
+    .. [9] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+    .. [10] Andersen, Erling D., et al. Implementation of interior point
+            methods for large scale linear programming. HEC/Universite de
+            Geneve, 1996.
+    .. [11] Bartels, Richard H. "A stabilization of the simplex method."
+            Journal in  Numerische Mathematik 16.5 (1971): 414-434.
+    .. [12] Tomlin, J. A. "On scaling linear programming problems."
+            Mathematical Programming Study 4 (1975): 146-166.
+    .. [13] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J.
+            "HiGHS - high performance software for linear optimization."
+            https://highs.dev/
+    .. [14] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised
+            simplex method." Mathematical Programming Computation, 10 (1),
+            119-142, 2018. DOI: 10.1007/s12532-017-0130-5
+
+    Examples
+    --------
+    Consider the following problem:
+
+    .. math::
+
+        \min_{x_0, x_1} \ -x_0 + 4x_1 & \\
+        \mbox{such that} \ -3x_0 + x_1 & \leq 6,\\
+        -x_0 - 2x_1 & \geq -4,\\
+        x_1 & \geq -3.
+
+    The problem is not presented in the form accepted by `linprog`. This is
+    easily remedied by converting the "greater than" inequality
+    constraint to a "less than" inequality constraint by
+    multiplying both sides by a factor of :math:`-1`. Note also that the last
+    constraint is really the simple bound :math:`-3 \leq x_1 \leq \infty`.
+    Finally, since there are no bounds on :math:`x_0`, we must explicitly
+    specify the bounds :math:`-\infty \leq x_0 \leq \infty`, as the
+    default is for variables to be non-negative. After collecting coeffecients
+    into arrays and tuples, the input for this problem is:
+
+    >>> from scipy.optimize import linprog
+    >>> c = [-1, 4]
+    >>> A = [[-3, 1], [1, 2]]
+    >>> b = [6, 4]
+    >>> x0_bounds = (None, None)
+    >>> x1_bounds = (-3, None)
+    >>> res = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds])
+    >>> res.fun
+    -22.0
+    >>> res.x
+    array([10., -3.])
+    >>> res.message
+    'Optimization terminated successfully. (HiGHS Status 7: Optimal)'
+
+    The marginals (AKA dual values / shadow prices / Lagrange multipliers)
+    and residuals (slacks) are also available.
+
+    >>> res.ineqlin
+      residual: [ 3.900e+01  0.000e+00]
+     marginals: [-0.000e+00 -1.000e+00]
+
+    For example, because the marginal associated with the second inequality
+    constraint is -1, we expect the optimal value of the objective function
+    to decrease by ``eps`` if we add a small amount ``eps`` to the right hand
+    side of the second inequality constraint:
+
+    >>> eps = 0.05
+    >>> b[1] += eps
+    >>> linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds]).fun
+    -22.05
+
+    Also, because the residual on the first inequality constraint is 39, we
+    can decrease the right hand side of the first constraint by 39 without
+    affecting the optimal solution.
+
+    >>> b = [6, 4]  # reset to original values
+    >>> b[0] -= 39
+    >>> linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds]).fun
+    -22.0
+
+    """
+
+    meth = method.lower()
+    methods = {"highs", "highs-ds", "highs-ipm",
+               "simplex", "revised simplex", "interior-point"}
+
+    if meth not in methods:
+        raise ValueError(f"Unknown solver '{method}'")
+
+    if x0 is not None and meth != "revised simplex":
+        warning_message = "x0 is used only when method is 'revised simplex'. "
+        warn(warning_message, OptimizeWarning, stacklevel=2)
+
+    if np.any(integrality) and not meth == "highs":
+        integrality = None
+        warning_message = ("Only `method='highs'` supports integer "
+                           "constraints. Ignoring `integrality`.")
+        warn(warning_message, OptimizeWarning, stacklevel=2)
+    elif np.any(integrality):
+        integrality = np.broadcast_to(integrality, np.shape(c))
+    else:
+        integrality = None
+
+    lp = _LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0, integrality)
+    lp, solver_options = _parse_linprog(lp, options, meth)
+    tol = solver_options.get('tol', 1e-9)
+
+    # Give unmodified problem to HiGHS
+    if meth.startswith('highs'):
+        if callback is not None:
+            raise NotImplementedError("HiGHS solvers do not support the "
+                                      "callback interface.")
+        highs_solvers = {'highs-ipm': 'ipm', 'highs-ds': 'simplex',
+                         'highs': None}
+
+        sol = _linprog_highs(lp, solver=highs_solvers[meth],
+                             **solver_options)
+        sol['status'], sol['message'] = (
+            _check_result(sol['x'], sol['fun'], sol['status'], sol['slack'],
+                          sol['con'], lp.bounds, tol, sol['message'],
+                          integrality))
+        sol['success'] = sol['status'] == 0
+        return OptimizeResult(sol)
+
+    warn(f"`method='{meth}'` is deprecated and will be removed in SciPy "
+         "1.11.0. Please use one of the HiGHS solvers (e.g. "
+         "`method='highs'`) in new code.", DeprecationWarning, stacklevel=2)
+
+    iteration = 0
+    complete = False  # will become True if solved in presolve
+    undo = []
+
+    # Keep the original arrays to calculate slack/residuals for original
+    # problem.
+    lp_o = deepcopy(lp)
+
+    # Solve trivial problem, eliminate variables, tighten bounds, etc.
+    rr_method = solver_options.pop('rr_method', None)  # need to pop these;
+    rr = solver_options.pop('rr', True)  # they're not passed to methods
+    c0 = 0  # we might get a constant term in the objective
+    if solver_options.pop('presolve', True):
+        (lp, c0, x, undo, complete, status, message) = _presolve(lp, rr,
+                                                                 rr_method,
+                                                                 tol)
+
+    C, b_scale = 1, 1  # for trivial unscaling if autoscale is not used
+    postsolve_args = (lp_o._replace(bounds=lp.bounds), undo, C, b_scale)
+
+    if not complete:
+        A, b, c, c0, x0 = _get_Abc(lp, c0)
+        if solver_options.pop('autoscale', False):
+            A, b, c, x0, C, b_scale = _autoscale(A, b, c, x0)
+            postsolve_args = postsolve_args[:-2] + (C, b_scale)
+
+        if meth == 'simplex':
+            x, status, message, iteration = _linprog_simplex(
+                c, c0=c0, A=A, b=b, callback=callback,
+                postsolve_args=postsolve_args, **solver_options)
+        elif meth == 'interior-point':
+            x, status, message, iteration = _linprog_ip(
+                c, c0=c0, A=A, b=b, callback=callback,
+                postsolve_args=postsolve_args, **solver_options)
+        elif meth == 'revised simplex':
+            x, status, message, iteration = _linprog_rs(
+                c, c0=c0, A=A, b=b, x0=x0, callback=callback,
+                postsolve_args=postsolve_args, **solver_options)
+
+    # Eliminate artificial variables, re-introduce presolved variables, etc.
+    disp = solver_options.get('disp', False)
+
+    x, fun, slack, con = _postsolve(x, postsolve_args, complete)
+
+    status, message = _check_result(x, fun, status, slack, con, lp_o.bounds,
+                                    tol, message, integrality)
+
+    if disp:
+        _display_summary(message, status, fun, iteration)
+
+    sol = {
+        'x': x,
+        'fun': fun,
+        'slack': slack,
+        'con': con,
+        'status': status,
+        'message': message,
+        'nit': iteration,
+        'success': status == 0}
+
+    return OptimizeResult(sol)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_doc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_doc.py
new file mode 100644
index 0000000000000000000000000000000000000000..ba016aec6dafe74e48076875202704a3b85b822a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_doc.py
@@ -0,0 +1,1434 @@
+"""
+Created on Sat Aug 22 19:49:17 2020
+
+@author: matth
+"""
+
+
+def _linprog_highs_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                       bounds=None, method='highs', callback=None,
+                       maxiter=None, disp=False, presolve=True,
+                       time_limit=None,
+                       dual_feasibility_tolerance=None,
+                       primal_feasibility_tolerance=None,
+                       ipm_optimality_tolerance=None,
+                       simplex_dual_edge_weight_strategy=None,
+                       mip_rel_gap=None,
+                       **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using one of the HiGHS solvers.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+
+        This is the method-specific documentation for 'highs', which chooses
+        automatically between
+        :ref:`'highs-ds' ` and
+        :ref:`'highs-ipm' `.
+        :ref:`'interior-point' ` (default),
+        :ref:`'revised simplex' `, and
+        :ref:`'simplex' ` (legacy)
+        are also available.
+    integrality : 1-D array or int, optional
+        Indicates the type of integrality constraint on each decision variable.
+
+        ``0`` : Continuous variable; no integrality constraint.
+
+        ``1`` : Integer variable; decision variable must be an integer
+        within `bounds`.
+
+        ``2`` : Semi-continuous variable; decision variable must be within
+        `bounds` or take value ``0``.
+
+        ``3`` : Semi-integer variable; decision variable must be an integer
+        within `bounds` or take value ``0``.
+
+        By default, all variables are continuous.
+
+        For mixed integrality constraints, supply an array of shape `c.shape`.
+        To infer a constraint on each decision variable from shorter inputs,
+        the argument will be broadcast to `c.shape` using `np.broadcast_to`.
+
+        This argument is currently used only by the ``'highs'`` method and
+        ignored otherwise.
+
+    Options
+    -------
+    maxiter : int
+        The maximum number of iterations to perform in either phase.
+        For :ref:`'highs-ipm' `, this does not
+        include the number of crossover iterations. Default is the largest
+        possible value for an ``int`` on the platform.
+    disp : bool (default: ``False``)
+        Set to ``True`` if indicators of optimization status are to be
+        printed to the console during optimization.
+    presolve : bool (default: ``True``)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    time_limit : float
+        The maximum time in seconds allotted to solve the problem;
+        default is the largest possible value for a ``double`` on the
+        platform.
+    dual_feasibility_tolerance : double (default: 1e-07)
+        Dual feasibility tolerance for
+        :ref:`'highs-ds' `.
+        The minimum of this and ``primal_feasibility_tolerance``
+        is used for the feasibility tolerance of
+        :ref:`'highs-ipm' `.
+    primal_feasibility_tolerance : double (default: 1e-07)
+        Primal feasibility tolerance for
+        :ref:`'highs-ds' `.
+        The minimum of this and ``dual_feasibility_tolerance``
+        is used for the feasibility tolerance of
+        :ref:`'highs-ipm' `.
+    ipm_optimality_tolerance : double (default: ``1e-08``)
+        Optimality tolerance for
+        :ref:`'highs-ipm' `.
+        Minimum allowable value is 1e-12.
+    simplex_dual_edge_weight_strategy : str (default: None)
+        Strategy for simplex dual edge weights. The default, ``None``,
+        automatically selects one of the following.
+
+        ``'dantzig'`` uses Dantzig's original strategy of choosing the most
+        negative reduced cost.
+
+        ``'devex'`` uses the strategy described in [15]_.
+
+        ``steepest`` uses the exact steepest edge strategy as described in
+        [16]_.
+
+        ``'steepest-devex'`` begins with the exact steepest edge strategy
+        until the computation is too costly or inexact and then switches to
+        the devex method.
+
+        Currently, ``None`` always selects ``'steepest-devex'``, but this
+        may change as new options become available.
+    mip_rel_gap : double (default: None)
+        Termination criterion for MIP solver: solver will terminate when the
+        gap between the primal objective value and the dual objective bound,
+        scaled by the primal objective value, is <= mip_rel_gap.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        ``unknown_options`` is non-empty, a warning is issued listing
+        all unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1D array
+            The (nominally positive) values of the slack,
+            ``b_ub - A_ub @ x``.
+        con : 1D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration or time limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : The HiGHS solver ran into a problem.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed.
+            For the HiGHS simplex method, this includes iterations in all
+            phases. For the HiGHS interior-point method, this does not include
+            crossover iterations.
+        crossover_nit : int
+            The number of primal/dual pushes performed during the
+            crossover routine for the HiGHS interior-point method.
+            This is ``0`` for the HiGHS simplex method.
+        ineqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            inequality constraints, `b_ub`. A dictionary consisting of the
+            fields:
+
+            residual : np.ndnarray
+                The (nominally positive) values of the slack variables,
+                ``b_ub - A_ub @ x``.  This quantity is also commonly
+                referred to as "slack".
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                inequality constraints, `b_ub`.
+
+        eqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            equality constraints, `b_eq`.  A dictionary consisting of the
+            fields:
+
+            residual : np.ndarray
+                The (nominally zero) residuals of the equality constraints,
+                ``b_eq - A_eq @ x``.
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                equality constraints, `b_eq`.
+
+        lower, upper : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            lower and upper bounds on decision variables, `bounds`.
+
+            residual : np.ndarray
+                The (nominally positive) values of the quantity
+                ``x - lb`` (lower) or ``ub - x`` (upper).
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the lower and upper
+                `bounds`.
+
+    Notes
+    -----
+
+    Method :ref:`'highs-ds' ` is a wrapper
+    of the C++ high performance dual revised simplex implementation (HSOL)
+    [13]_, [14]_. Method :ref:`'highs-ipm' `
+    is a wrapper of a C++ implementation of an **i**\ nterior-\ **p**\ oint
+    **m**\ ethod [13]_; it features a crossover routine, so it is as accurate
+    as a simplex solver. Method :ref:`'highs' ` chooses
+    between the two automatically. For new code involving `linprog`, we
+    recommend explicitly choosing one of these three method values instead of
+    :ref:`'interior-point' ` (default),
+    :ref:`'revised simplex' `, and
+    :ref:`'simplex' ` (legacy).
+
+    The result fields `ineqlin`, `eqlin`, `lower`, and `upper` all contain
+    `marginals`, or partial derivatives of the objective function with respect
+    to the right-hand side of each constraint. These partial derivatives are
+    also referred to as "Lagrange multipliers", "dual values", and
+    "shadow prices". The sign convention of `marginals` is opposite that
+    of Lagrange multipliers produced by many nonlinear solvers.
+
+    References
+    ----------
+    .. [13] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J.
+           "HiGHS - high performance software for linear optimization."
+           https://highs.dev/
+    .. [14] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised
+           simplex method." Mathematical Programming Computation, 10 (1),
+           119-142, 2018. DOI: 10.1007/s12532-017-0130-5
+    .. [15] Harris, Paula MJ. "Pivot selection methods of the Devex LP code."
+            Mathematical programming 5.1 (1973): 1-28.
+    .. [16] Goldfarb, Donald, and John Ker Reid. "A practicable steepest-edge
+            simplex algorithm." Mathematical Programming 12.1 (1977): 361-371.
+    """
+    pass
+
+
+def _linprog_highs_ds_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                          bounds=None, method='highs-ds', callback=None,
+                          maxiter=None, disp=False, presolve=True,
+                          time_limit=None,
+                          dual_feasibility_tolerance=None,
+                          primal_feasibility_tolerance=None,
+                          simplex_dual_edge_weight_strategy=None,
+                          **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using the HiGHS dual simplex solver.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+
+        This is the method-specific documentation for 'highs-ds'.
+        :ref:`'highs' `,
+        :ref:`'highs-ipm' `,
+        :ref:`'interior-point' ` (default),
+        :ref:`'revised simplex' `, and
+        :ref:`'simplex' ` (legacy)
+        are also available.
+
+    Options
+    -------
+    maxiter : int
+        The maximum number of iterations to perform in either phase.
+        Default is the largest possible value for an ``int`` on the platform.
+    disp : bool (default: ``False``)
+        Set to ``True`` if indicators of optimization status are to be
+        printed to the console during optimization.
+    presolve : bool (default: ``True``)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    time_limit : float
+        The maximum time in seconds allotted to solve the problem;
+        default is the largest possible value for a ``double`` on the
+        platform.
+    dual_feasibility_tolerance : double (default: 1e-07)
+        Dual feasibility tolerance for
+        :ref:`'highs-ds' `.
+    primal_feasibility_tolerance : double (default: 1e-07)
+        Primal feasibility tolerance for
+        :ref:`'highs-ds' `.
+    simplex_dual_edge_weight_strategy : str (default: None)
+        Strategy for simplex dual edge weights. The default, ``None``,
+        automatically selects one of the following.
+
+        ``'dantzig'`` uses Dantzig's original strategy of choosing the most
+        negative reduced cost.
+
+        ``'devex'`` uses the strategy described in [15]_.
+
+        ``steepest`` uses the exact steepest edge strategy as described in
+        [16]_.
+
+        ``'steepest-devex'`` begins with the exact steepest edge strategy
+        until the computation is too costly or inexact and then switches to
+        the devex method.
+
+        Currently, ``None`` always selects ``'steepest-devex'``, but this
+        may change as new options become available.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        ``unknown_options`` is non-empty, a warning is issued listing
+        all unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1D array
+            The (nominally positive) values of the slack,
+            ``b_ub - A_ub @ x``.
+        con : 1D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration or time limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : The HiGHS solver ran into a problem.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed. This includes iterations
+            in all phases.
+        crossover_nit : int
+            This is always ``0`` for the HiGHS simplex method.
+            For the HiGHS interior-point method, this is the number of
+            primal/dual pushes performed during the crossover routine.
+        ineqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            inequality constraints, `b_ub`. A dictionary consisting of the
+            fields:
+
+            residual : np.ndnarray
+                The (nominally positive) values of the slack variables,
+                ``b_ub - A_ub @ x``.  This quantity is also commonly
+                referred to as "slack".
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                inequality constraints, `b_ub`.
+
+        eqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            equality constraints, `b_eq`.  A dictionary consisting of the
+            fields:
+
+            residual : np.ndarray
+                The (nominally zero) residuals of the equality constraints,
+                ``b_eq - A_eq @ x``.
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                equality constraints, `b_eq`.
+
+        lower, upper : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            lower and upper bounds on decision variables, `bounds`.
+
+            residual : np.ndarray
+                The (nominally positive) values of the quantity
+                ``x - lb`` (lower) or ``ub - x`` (upper).
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the lower and upper
+                `bounds`.
+
+    Notes
+    -----
+
+    Method :ref:`'highs-ds' ` is a wrapper
+    of the C++ high performance dual revised simplex implementation (HSOL)
+    [13]_, [14]_. Method :ref:`'highs-ipm' `
+    is a wrapper of a C++ implementation of an **i**\ nterior-\ **p**\ oint
+    **m**\ ethod [13]_; it features a crossover routine, so it is as accurate
+    as a simplex solver. Method :ref:`'highs' ` chooses
+    between the two automatically. For new code involving `linprog`, we
+    recommend explicitly choosing one of these three method values instead of
+    :ref:`'interior-point' ` (default),
+    :ref:`'revised simplex' `, and
+    :ref:`'simplex' ` (legacy).
+
+    The result fields `ineqlin`, `eqlin`, `lower`, and `upper` all contain
+    `marginals`, or partial derivatives of the objective function with respect
+    to the right-hand side of each constraint. These partial derivatives are
+    also referred to as "Lagrange multipliers", "dual values", and
+    "shadow prices". The sign convention of `marginals` is opposite that
+    of Lagrange multipliers produced by many nonlinear solvers.
+
+    References
+    ----------
+    .. [13] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J.
+           "HiGHS - high performance software for linear optimization."
+           https://highs.dev/
+    .. [14] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised
+           simplex method." Mathematical Programming Computation, 10 (1),
+           119-142, 2018. DOI: 10.1007/s12532-017-0130-5
+    .. [15] Harris, Paula MJ. "Pivot selection methods of the Devex LP code."
+            Mathematical programming 5.1 (1973): 1-28.
+    .. [16] Goldfarb, Donald, and John Ker Reid. "A practicable steepest-edge
+            simplex algorithm." Mathematical Programming 12.1 (1977): 361-371.
+    """
+    pass
+
+
+def _linprog_highs_ipm_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                           bounds=None, method='highs-ipm', callback=None,
+                           maxiter=None, disp=False, presolve=True,
+                           time_limit=None,
+                           dual_feasibility_tolerance=None,
+                           primal_feasibility_tolerance=None,
+                           ipm_optimality_tolerance=None,
+                           **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using the HiGHS interior point solver.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+
+        This is the method-specific documentation for 'highs-ipm'.
+        :ref:`'highs-ipm' `,
+        :ref:`'highs-ds' `,
+        :ref:`'interior-point' ` (default),
+        :ref:`'revised simplex' `, and
+        :ref:`'simplex' ` (legacy)
+        are also available.
+
+    Options
+    -------
+    maxiter : int
+        The maximum number of iterations to perform in either phase.
+        For :ref:`'highs-ipm' `, this does not
+        include the number of crossover iterations. Default is the largest
+        possible value for an ``int`` on the platform.
+    disp : bool (default: ``False``)
+        Set to ``True`` if indicators of optimization status are to be
+        printed to the console during optimization.
+    presolve : bool (default: ``True``)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    time_limit : float
+        The maximum time in seconds allotted to solve the problem;
+        default is the largest possible value for a ``double`` on the
+        platform.
+    dual_feasibility_tolerance : double (default: 1e-07)
+        The minimum of this and ``primal_feasibility_tolerance``
+        is used for the feasibility tolerance of
+        :ref:`'highs-ipm' `.
+    primal_feasibility_tolerance : double (default: 1e-07)
+        The minimum of this and ``dual_feasibility_tolerance``
+        is used for the feasibility tolerance of
+        :ref:`'highs-ipm' `.
+    ipm_optimality_tolerance : double (default: ``1e-08``)
+        Optimality tolerance for
+        :ref:`'highs-ipm' `.
+        Minimum allowable value is 1e-12.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        ``unknown_options`` is non-empty, a warning is issued listing
+        all unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1D array
+            The (nominally positive) values of the slack,
+            ``b_ub - A_ub @ x``.
+        con : 1D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration or time limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : The HiGHS solver ran into a problem.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed.
+            For the HiGHS interior-point method, this does not include
+            crossover iterations.
+        crossover_nit : int
+            The number of primal/dual pushes performed during the
+            crossover routine for the HiGHS interior-point method.
+        ineqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            inequality constraints, `b_ub`. A dictionary consisting of the
+            fields:
+
+            residual : np.ndnarray
+                The (nominally positive) values of the slack variables,
+                ``b_ub - A_ub @ x``.  This quantity is also commonly
+                referred to as "slack".
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                inequality constraints, `b_ub`.
+
+        eqlin : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            equality constraints, `b_eq`.  A dictionary consisting of the
+            fields:
+
+            residual : np.ndarray
+                The (nominally zero) residuals of the equality constraints,
+                ``b_eq - A_eq @ x``.
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the right-hand side of the
+                equality constraints, `b_eq`.
+
+        lower, upper : OptimizeResult
+            Solution and sensitivity information corresponding to the
+            lower and upper bounds on decision variables, `bounds`.
+
+            residual : np.ndarray
+                The (nominally positive) values of the quantity
+                ``x - lb`` (lower) or ``ub - x`` (upper).
+
+            marginals : np.ndarray
+                The sensitivity (partial derivative) of the objective
+                function with respect to the lower and upper
+                `bounds`.
+
+    Notes
+    -----
+
+    Method :ref:`'highs-ipm' `
+    is a wrapper of a C++ implementation of an **i**\ nterior-\ **p**\ oint
+    **m**\ ethod [13]_; it features a crossover routine, so it is as accurate
+    as a simplex solver.
+    Method :ref:`'highs-ds' ` is a wrapper
+    of the C++ high performance dual revised simplex implementation (HSOL)
+    [13]_, [14]_. Method :ref:`'highs' ` chooses
+    between the two automatically. For new code involving `linprog`, we
+    recommend explicitly choosing one of these three method values instead of
+    :ref:`'interior-point' ` (default),
+    :ref:`'revised simplex' `, and
+    :ref:`'simplex' ` (legacy).
+
+    The result fields `ineqlin`, `eqlin`, `lower`, and `upper` all contain
+    `marginals`, or partial derivatives of the objective function with respect
+    to the right-hand side of each constraint. These partial derivatives are
+    also referred to as "Lagrange multipliers", "dual values", and
+    "shadow prices". The sign convention of `marginals` is opposite that
+    of Lagrange multipliers produced by many nonlinear solvers.
+
+    References
+    ----------
+    .. [13] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J.
+           "HiGHS - high performance software for linear optimization."
+           https://highs.dev/
+    .. [14] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised
+           simplex method." Mathematical Programming Computation, 10 (1),
+           119-142, 2018. DOI: 10.1007/s12532-017-0130-5
+    """
+    pass
+
+
+def _linprog_ip_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                    bounds=None, method='interior-point', callback=None,
+                    maxiter=1000, disp=False, presolve=True,
+                    tol=1e-8, autoscale=False, rr=True,
+                    alpha0=.99995, beta=0.1, sparse=False,
+                    lstsq=False, sym_pos=True, cholesky=True, pc=True,
+                    ip=False, permc_spec='MMD_AT_PLUS_A', **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using the interior-point method of
+    [4]_.
+
+    .. deprecated:: 1.9.0
+        `method='interior-point'` will be removed in SciPy 1.11.0.
+        It is replaced by `method='highs'` because the latter is
+        faster and more robust.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+        This is the method-specific documentation for 'interior-point'.
+        :ref:`'highs' `,
+        :ref:`'highs-ds' `,
+        :ref:`'highs-ipm' `,
+        :ref:`'revised simplex' `, and
+        :ref:`'simplex' ` (legacy)
+        are also available.
+    callback : callable, optional
+        Callback function to be executed once per iteration.
+
+    Options
+    -------
+    maxiter : int (default: 1000)
+        The maximum number of iterations of the algorithm.
+    disp : bool (default: False)
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    presolve : bool (default: True)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    tol : float (default: 1e-8)
+        Termination tolerance to be used for all termination criteria;
+        see [4]_ Section 4.5.
+    autoscale : bool (default: False)
+        Set to ``True`` to automatically perform equilibration.
+        Consider using this option if the numerical values in the
+        constraints are separated by several orders of magnitude.
+    rr : bool (default: True)
+        Set to ``False`` to disable automatic redundancy removal.
+    alpha0 : float (default: 0.99995)
+        The maximal step size for Mehrota's predictor-corrector search
+        direction; see :math:`\beta_{3}` of [4]_ Table 8.1.
+    beta : float (default: 0.1)
+        The desired reduction of the path parameter :math:`\mu` (see [6]_)
+        when Mehrota's predictor-corrector is not in use (uncommon).
+    sparse : bool (default: False)
+        Set to ``True`` if the problem is to be treated as sparse after
+        presolve. If either ``A_eq`` or ``A_ub`` is a sparse matrix,
+        this option will automatically be set ``True``, and the problem
+        will be treated as sparse even during presolve. If your constraint
+        matrices contain mostly zeros and the problem is not very small (less
+        than about 100 constraints or variables), consider setting ``True``
+        or providing ``A_eq`` and ``A_ub`` as sparse matrices.
+    lstsq : bool (default: ``False``)
+        Set to ``True`` if the problem is expected to be very poorly
+        conditioned. This should always be left ``False`` unless severe
+        numerical difficulties are encountered. Leave this at the default
+        unless you receive a warning message suggesting otherwise.
+    sym_pos : bool (default: True)
+        Leave ``True`` if the problem is expected to yield a well conditioned
+        symmetric positive definite normal equation matrix
+        (almost always). Leave this at the default unless you receive
+        a warning message suggesting otherwise.
+    cholesky : bool (default: True)
+        Set to ``True`` if the normal equations are to be solved by explicit
+        Cholesky decomposition followed by explicit forward/backward
+        substitution. This is typically faster for problems
+        that are numerically well-behaved.
+    pc : bool (default: True)
+        Leave ``True`` if the predictor-corrector method of Mehrota is to be
+        used. This is almost always (if not always) beneficial.
+    ip : bool (default: False)
+        Set to ``True`` if the improved initial point suggestion due to [4]_
+        Section 4.3 is desired. Whether this is beneficial or not
+        depends on the problem.
+    permc_spec : str (default: 'MMD_AT_PLUS_A')
+        (Has effect only with ``sparse = True``, ``lstsq = False``, ``sym_pos =
+        True``, and no SuiteSparse.)
+        A matrix is factorized in each iteration of the algorithm.
+        This option specifies how to permute the columns of the matrix for
+        sparsity preservation. Acceptable values are:
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering.
+
+        This option can impact the convergence of the
+        interior point algorithm; test different values to determine which
+        performs best for your problem. For more information, refer to
+        ``scipy.sparse.linalg.splu``.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1-D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1-D array
+            The (nominally positive) values of the slack variables,
+            ``b_ub - A_ub @ x``.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : Numerical difficulties encountered.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed in all phases.
+
+
+    Notes
+    -----
+    This method implements the algorithm outlined in [4]_ with ideas from [8]_
+    and a structure inspired by the simpler methods of [6]_.
+
+    The primal-dual path following method begins with initial 'guesses' of
+    the primal and dual variables of the standard form problem and iteratively
+    attempts to solve the (nonlinear) Karush-Kuhn-Tucker conditions for the
+    problem with a gradually reduced logarithmic barrier term added to the
+    objective. This particular implementation uses a homogeneous self-dual
+    formulation, which provides certificates of infeasibility or unboundedness
+    where applicable.
+
+    The default initial point for the primal and dual variables is that
+    defined in [4]_ Section 4.4 Equation 8.22. Optionally (by setting initial
+    point option ``ip=True``), an alternate (potentially improved) starting
+    point can be calculated according to the additional recommendations of
+    [4]_ Section 4.4.
+
+    A search direction is calculated using the predictor-corrector method
+    (single correction) proposed by Mehrota and detailed in [4]_ Section 4.1.
+    (A potential improvement would be to implement the method of multiple
+    corrections described in [4]_ Section 4.2.) In practice, this is
+    accomplished by solving the normal equations, [4]_ Section 5.1 Equations
+    8.31 and 8.32, derived from the Newton equations [4]_ Section 5 Equations
+    8.25 (compare to [4]_ Section 4 Equations 8.6-8.8). The advantage of
+    solving the normal equations rather than 8.25 directly is that the
+    matrices involved are symmetric positive definite, so Cholesky
+    decomposition can be used rather than the more expensive LU factorization.
+
+    With default options, the solver used to perform the factorization depends
+    on third-party software availability and the conditioning of the problem.
+
+    For dense problems, solvers are tried in the following order:
+
+    1. ``scipy.linalg.cho_factor``
+
+    2. ``scipy.linalg.solve`` with option ``sym_pos=True``
+
+    3. ``scipy.linalg.solve`` with option ``sym_pos=False``
+
+    4. ``scipy.linalg.lstsq``
+
+    For sparse problems:
+
+    1. ``sksparse.cholmod.cholesky`` (if scikit-sparse and SuiteSparse are
+       installed)
+
+    2. ``scipy.sparse.linalg.factorized`` (if scikit-umfpack and SuiteSparse
+       are installed)
+
+    3. ``scipy.sparse.linalg.splu`` (which uses SuperLU distributed with SciPy)
+
+    4. ``scipy.sparse.linalg.lsqr``
+
+    If the solver fails for any reason, successively more robust (but slower)
+    solvers are attempted in the order indicated. Attempting, failing, and
+    re-starting factorization can be time consuming, so if the problem is
+    numerically challenging, options can be set to  bypass solvers that are
+    failing. Setting ``cholesky=False`` skips to solver 2,
+    ``sym_pos=False`` skips to solver 3, and ``lstsq=True`` skips
+    to solver 4 for both sparse and dense problems.
+
+    Potential improvements for combating issues associated with dense
+    columns in otherwise sparse problems are outlined in [4]_ Section 5.3 and
+    [10]_ Section 4.1-4.2; the latter also discusses the alleviation of
+    accuracy issues associated with the substitution approach to free
+    variables.
+
+    After calculating the search direction, the maximum possible step size
+    that does not activate the non-negativity constraints is calculated, and
+    the smaller of this step size and unity is applied (as in [4]_ Section
+    4.1.) [4]_ Section 4.3 suggests improvements for choosing the step size.
+
+    The new point is tested according to the termination conditions of [4]_
+    Section 4.5. The same tolerance, which can be set using the ``tol`` option,
+    is used for all checks. (A potential improvement would be to expose
+    the different tolerances to be set independently.) If optimality,
+    unboundedness, or infeasibility is detected, the solve procedure
+    terminates; otherwise it repeats.
+
+    Whereas the top level ``linprog`` module expects a problem of form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+         lb <= x <= ub
+
+    where ``lb = 0`` and ``ub = None`` unless set in ``bounds``. The problem
+    is automatically converted to the form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    for solution. That is, the original problem contains equality, upper-bound
+    and variable constraints whereas the method specific solver requires
+    equality constraints and variable non-negativity. ``linprog`` converts the
+    original problem to standard form by converting the simple bounds to upper
+    bound constraints, introducing non-negative slack variables for inequality
+    constraints, and expressing unbounded variables as the difference between
+    two non-negative variables. The problem is converted back to the original
+    form before results are reported.
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+    .. [6] Freund, Robert M. "Primal-Dual Interior-Point Methods for Linear
+           Programming based on Newton's Method." Unpublished Course Notes,
+           March 2004. Available 2/25/2017 at
+           https://ocw.mit.edu/courses/sloan-school-of-management/15-084j-nonlinear-programming-spring-2004/lecture-notes/lec14_int_pt_mthd.pdf
+    .. [8] Andersen, Erling D., and Knud D. Andersen. "Presolving in linear
+           programming." Mathematical Programming 71.2 (1995): 221-245.
+    .. [9] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+    .. [10] Andersen, Erling D., et al. Implementation of interior point
+            methods for large scale linear programming. HEC/Universite de
+            Geneve, 1996.
+    """
+    pass
+
+
+def _linprog_rs_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                    bounds=None, method='interior-point', callback=None,
+                    x0=None, maxiter=5000, disp=False, presolve=True,
+                    tol=1e-12, autoscale=False, rr=True, maxupdate=10,
+                    mast=False, pivot="mrc", **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using the revised simplex method.
+
+    .. deprecated:: 1.9.0
+        `method='revised simplex'` will be removed in SciPy 1.11.0.
+        It is replaced by `method='highs'` because the latter is
+        faster and more robust.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+        This is the method-specific documentation for 'revised simplex'.
+        :ref:`'highs' `,
+        :ref:`'highs-ds' `,
+        :ref:`'highs-ipm' `,
+        :ref:`'interior-point' ` (default),
+        and :ref:`'simplex' ` (legacy)
+        are also available.
+    callback : callable, optional
+        Callback function to be executed once per iteration.
+    x0 : 1-D array, optional
+        Guess values of the decision variables, which will be refined by
+        the optimization algorithm. This argument is currently used only by the
+        'revised simplex' method, and can only be used if `x0` represents a
+        basic feasible solution.
+
+    Options
+    -------
+    maxiter : int (default: 5000)
+       The maximum number of iterations to perform in either phase.
+    disp : bool (default: False)
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    presolve : bool (default: True)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    tol : float (default: 1e-12)
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+    autoscale : bool (default: False)
+        Set to ``True`` to automatically perform equilibration.
+        Consider using this option if the numerical values in the
+        constraints are separated by several orders of magnitude.
+    rr : bool (default: True)
+        Set to ``False`` to disable automatic redundancy removal.
+    maxupdate : int (default: 10)
+        The maximum number of updates performed on the LU factorization.
+        After this many updates is reached, the basis matrix is factorized
+        from scratch.
+    mast : bool (default: False)
+        Minimize Amortized Solve Time. If enabled, the average time to solve
+        a linear system using the basis factorization is measured. Typically,
+        the average solve time will decrease with each successive solve after
+        initial factorization, as factorization takes much more time than the
+        solve operation (and updates). Eventually, however, the updated
+        factorization becomes sufficiently complex that the average solve time
+        begins to increase. When this is detected, the basis is refactorized
+        from scratch. Enable this option to maximize speed at the risk of
+        nondeterministic behavior. Ignored if ``maxupdate`` is 0.
+    pivot : "mrc" or "bland" (default: "mrc")
+        Pivot rule: Minimum Reduced Cost ("mrc") or Bland's rule ("bland").
+        Choose Bland's rule if iteration limit is reached and cycling is
+        suspected.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1-D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1-D array
+            The (nominally positive) values of the slack variables,
+            ``b_ub - A_ub @ x``.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : Numerical difficulties encountered.
+
+            ``5`` : Problem has no constraints; turn presolve on.
+
+            ``6`` : Invalid guess provided.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed in all phases.
+
+
+    Notes
+    -----
+    Method *revised simplex* uses the revised simplex method as described in
+    [9]_, except that a factorization [11]_ of the basis matrix, rather than
+    its inverse, is efficiently maintained and used to solve the linear systems
+    at each iteration of the algorithm.
+
+    References
+    ----------
+    .. [9] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+    .. [11] Bartels, Richard H. "A stabilization of the simplex method."
+            Journal in  Numerische Mathematik 16.5 (1971): 414-434.
+    """
+    pass
+
+
+def _linprog_simplex_doc(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None,
+                         bounds=None, method='interior-point', callback=None,
+                         maxiter=5000, disp=False, presolve=True,
+                         tol=1e-12, autoscale=False, rr=True, bland=False,
+                         **unknown_options):
+    r"""
+    Linear programming: minimize a linear objective function subject to linear
+    equality and inequality constraints using the tableau-based simplex method.
+
+    .. deprecated:: 1.9.0
+        `method='simplex'` will be removed in SciPy 1.11.0.
+        It is replaced by `method='highs'` because the latter is
+        faster and more robust.
+
+    Linear programming solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & A_{ub} x \leq b_{ub},\\
+        & A_{eq} x = b_{eq},\\
+        & l \leq x \leq u ,
+
+    where :math:`x` is a vector of decision variables; :math:`c`,
+    :math:`b_{ub}`, :math:`b_{eq}`, :math:`l`, and :math:`u` are vectors; and
+    :math:`A_{ub}` and :math:`A_{eq}` are matrices.
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+        lb <= x <= ub
+
+    Note that by default ``lb = 0`` and ``ub = None`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1-D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2-D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1-D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2-D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1-D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : sequence, optional
+        A sequence of ``(min, max)`` pairs for each element in ``x``, defining
+        the minimum and maximum values of that decision variable. Use ``None``
+        to indicate that there is no bound. By default, bounds are
+        ``(0, None)`` (all decision variables are non-negative).
+        If a single tuple ``(min, max)`` is provided, then ``min`` and
+        ``max`` will serve as bounds for all decision variables.
+    method : str
+        This is the method-specific documentation for 'simplex'.
+        :ref:`'highs' `,
+        :ref:`'highs-ds' `,
+        :ref:`'highs-ipm' `,
+        :ref:`'interior-point' ` (default),
+        and :ref:`'revised simplex' `
+        are also available.
+    callback : callable, optional
+        Callback function to be executed once per iteration.
+
+    Options
+    -------
+    maxiter : int (default: 5000)
+       The maximum number of iterations to perform in either phase.
+    disp : bool (default: False)
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    presolve : bool (default: True)
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if
+        presolve is to be disabled.
+    tol : float (default: 1e-12)
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+    autoscale : bool (default: False)
+        Set to ``True`` to automatically perform equilibration.
+        Consider using this option if the numerical values in the
+        constraints are separated by several orders of magnitude.
+    rr : bool (default: True)
+        Set to ``False`` to disable automatic redundancy removal.
+    bland : bool
+        If True, use Bland's anti-cycling rule [3]_ to choose pivots to
+        prevent cycling. If False, choose pivots which should lead to a
+        converged solution more quickly. The latter method is subject to
+        cycling (non-convergence) in rare instances.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        A :class:`scipy.optimize.OptimizeResult` consisting of the fields:
+
+        x : 1-D array
+            The values of the decision variables that minimizes the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        slack : 1-D array
+            The (nominally positive) values of the slack variables,
+            ``b_ub - A_ub @ x``.
+        con : 1-D array
+            The (nominally zero) residuals of the equality constraints,
+            ``b_eq - A_eq @ x``.
+        success : bool
+            ``True`` when the algorithm succeeds in finding an optimal
+            solution.
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimization terminated successfully.
+
+            ``1`` : Iteration limit reached.
+
+            ``2`` : Problem appears to be infeasible.
+
+            ``3`` : Problem appears to be unbounded.
+
+            ``4`` : Numerical difficulties encountered.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+        nit : int
+            The total number of iterations performed in all phases.
+
+    References
+    ----------
+    .. [1] Dantzig, George B., Linear programming and extensions. Rand
+           Corporation Research Study Princeton Univ. Press, Princeton, NJ,
+           1963
+    .. [2] Hillier, S.H. and Lieberman, G.J. (1995), "Introduction to
+           Mathematical Programming", McGraw-Hill, Chapter 4.
+    .. [3] Bland, Robert G. New finite pivoting rules for the simplex method.
+           Mathematics of Operations Research (2), 1977: pp. 103-107.
+    """
+    pass
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_highs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_highs.py
new file mode 100644
index 0000000000000000000000000000000000000000..9455cf460f96b7768c28acfbba76ad9ad08eed3f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_highs.py
@@ -0,0 +1,422 @@
+"""HiGHS Linear Optimization Methods
+
+Interface to HiGHS linear optimization software.
+https://highs.dev/
+
+.. versionadded:: 1.5.0
+
+References
+----------
+.. [1] Q. Huangfu and J.A.J. Hall. "Parallelizing the dual revised simplex
+           method." Mathematical Programming Computation, 10 (1), 119-142,
+           2018. DOI: 10.1007/s12532-017-0130-5
+
+"""
+
+import inspect
+import numpy as np
+from ._optimize import OptimizeWarning, OptimizeResult
+from warnings import warn
+from ._highspy._highs_wrapper import _highs_wrapper
+from ._highspy._core import(
+    kHighsInf,
+    HighsDebugLevel,
+    ObjSense,
+    HighsModelStatus,
+    simplex_constants as s_c,  # [1]
+)
+from scipy.sparse import csc_matrix, vstack, issparse
+
+# [1]: Directly importing from "._highspy._core.simplex_constants"
+# causes problems when reloading.
+# See https://github.com/scipy/scipy/pull/22869 for details.
+
+def _highs_to_scipy_status_message(highs_status, highs_message):
+    """Converts HiGHS status number/message to SciPy status number/message"""
+
+    scipy_statuses_messages = {
+        None: (4, "HiGHS did not provide a status code. "),
+        HighsModelStatus.kNotset: (4, ""),
+        HighsModelStatus.kLoadError: (4, ""),
+        HighsModelStatus.kModelError: (2, ""),
+        HighsModelStatus.kPresolveError: (4, ""),
+        HighsModelStatus.kSolveError: (4, ""),
+        HighsModelStatus.kPostsolveError: (4, ""),
+        HighsModelStatus.kModelEmpty: (4, ""),
+        HighsModelStatus.kObjectiveBound: (4, ""),
+        HighsModelStatus.kObjectiveTarget: (4, ""),
+        HighsModelStatus.kOptimal: (0, "Optimization terminated successfully. "),
+        HighsModelStatus.kTimeLimit: (1, "Time limit reached. "),
+        HighsModelStatus.kIterationLimit: (1, "Iteration limit reached. "),
+        HighsModelStatus.kInfeasible: (2, "The problem is infeasible. "),
+        HighsModelStatus.kUnbounded: (3, "The problem is unbounded. "),
+        HighsModelStatus.kUnboundedOrInfeasible: (4, "The problem is unbounded "
+                                                  "or infeasible. ")}
+    unrecognized = (4, "The HiGHS status code was not recognized. ")
+    scipy_status, scipy_message = (
+        scipy_statuses_messages.get(highs_status, unrecognized))
+    hstat = int(highs_status) if highs_status is not None else None
+    scipy_message = (f"{scipy_message}"
+                     f"(HiGHS Status {hstat}: {highs_message})")
+    return scipy_status, scipy_message
+
+
+def _replace_inf(x):
+    # Replace `np.inf` with kHighsInf
+    infs = np.isinf(x)
+    with np.errstate(invalid="ignore"):
+        x[infs] = np.sign(x[infs])*kHighsInf
+    return x
+
+
+def _convert_to_highs_enum(option, option_str, choices):
+    # If option is in the choices we can look it up, if not use
+    # the default value taken from function signature and warn:
+    try:
+        return choices[option.lower()]
+    except AttributeError:
+        return choices[option]
+    except KeyError:
+        sig = inspect.signature(_linprog_highs)
+        default_str = sig.parameters[option_str].default
+        warn(f"Option {option_str} is {option}, but only values in "
+             f"{set(choices.keys())} are allowed. Using default: "
+             f"{default_str}.",
+             OptimizeWarning, stacklevel=3)
+        return choices[default_str]
+
+
+def _linprog_highs(lp, solver, time_limit=None, presolve=True,
+                   disp=False, maxiter=None,
+                   dual_feasibility_tolerance=None,
+                   primal_feasibility_tolerance=None,
+                   ipm_optimality_tolerance=None,
+                   simplex_dual_edge_weight_strategy=None,
+                   mip_rel_gap=None,
+                   mip_max_nodes=None,
+                   **unknown_options):
+    r"""
+    Solve the following linear programming problem using one of the HiGHS
+    solvers:
+
+    User-facing documentation is in _linprog_doc.py.
+
+    Parameters
+    ----------
+    lp :  _LPProblem
+        A ``scipy.optimize._linprog_util._LPProblem`` ``namedtuple``.
+    solver : "ipm" or "simplex" or None
+        Which HiGHS solver to use.  If ``None``, "simplex" will be used.
+
+    Options
+    -------
+    maxiter : int
+        The maximum number of iterations to perform in either phase. For
+        ``solver='ipm'``, this does not include the number of crossover
+        iterations.  Default is the largest possible value for an ``int``
+        on the platform.
+    disp : bool
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration; default ``False``.
+    time_limit : float
+        The maximum time in seconds allotted to solve the problem; default is
+        the largest possible value for a ``double`` on the platform.
+    presolve : bool
+        Presolve attempts to identify trivial infeasibilities,
+        identify trivial unboundedness, and simplify the problem before
+        sending it to the main solver. It is generally recommended
+        to keep the default setting ``True``; set to ``False`` if presolve is
+        to be disabled.
+    dual_feasibility_tolerance : double
+        Dual feasibility tolerance.  Default is 1e-07.
+        The minimum of this and ``primal_feasibility_tolerance``
+        is used for the feasibility tolerance when ``solver='ipm'``.
+    primal_feasibility_tolerance : double
+        Primal feasibility tolerance.  Default is 1e-07.
+        The minimum of this and ``dual_feasibility_tolerance``
+        is used for the feasibility tolerance when ``solver='ipm'``.
+    ipm_optimality_tolerance : double
+        Optimality tolerance for ``solver='ipm'``.  Default is 1e-08.
+        Minimum possible value is 1e-12 and must be smaller than the largest
+        possible value for a ``double`` on the platform.
+    simplex_dual_edge_weight_strategy : str (default: None)
+        Strategy for simplex dual edge weights. The default, ``None``,
+        automatically selects one of the following.
+
+        ``'dantzig'`` uses Dantzig's original strategy of choosing the most
+        negative reduced cost.
+
+        ``'devex'`` uses the strategy described in [15]_.
+
+        ``steepest`` uses the exact steepest edge strategy as described in
+        [16]_.
+
+        ``'steepest-devex'`` begins with the exact steepest edge strategy
+        until the computation is too costly or inexact and then switches to
+        the devex method.
+
+        Currently, using ``None`` always selects ``'steepest-devex'``, but this
+        may change as new options become available.
+
+    mip_max_nodes : int
+        The maximum number of nodes allotted to solve the problem; default is
+        the largest possible value for a ``HighsInt`` on the platform.
+        Ignored if not using the MIP solver.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        ``unknown_options`` is non-empty, a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    sol : dict
+        A dictionary consisting of the fields:
+
+            x : 1D array
+                The values of the decision variables that minimizes the
+                objective function while satisfying the constraints.
+            fun : float
+                The optimal value of the objective function ``c @ x``.
+            slack : 1D array
+                The (nominally positive) values of the slack,
+                ``b_ub - A_ub @ x``.
+            con : 1D array
+                The (nominally zero) residuals of the equality constraints,
+                ``b_eq - A_eq @ x``.
+            success : bool
+                ``True`` when the algorithm succeeds in finding an optimal
+                solution.
+            status : int
+                An integer representing the exit status of the algorithm.
+
+                ``0`` : Optimization terminated successfully.
+
+                ``1`` : Iteration or time limit reached.
+
+                ``2`` : Problem appears to be infeasible.
+
+                ``3`` : Problem appears to be unbounded.
+
+                ``4`` : The HiGHS solver ran into a problem.
+
+            message : str
+                A string descriptor of the exit status of the algorithm.
+            nit : int
+                The total number of iterations performed.
+                For ``solver='simplex'``, this includes iterations in all
+                phases. For ``solver='ipm'``, this does not include
+                crossover iterations.
+            crossover_nit : int
+                The number of primal/dual pushes performed during the
+                crossover routine for ``solver='ipm'``.  This is ``0``
+                for ``solver='simplex'``.
+            ineqlin : OptimizeResult
+                Solution and sensitivity information corresponding to the
+                inequality constraints, `b_ub`. A dictionary consisting of the
+                fields:
+
+                residual : np.ndnarray
+                    The (nominally positive) values of the slack variables,
+                    ``b_ub - A_ub @ x``.  This quantity is also commonly
+                    referred to as "slack".
+
+                marginals : np.ndarray
+                    The sensitivity (partial derivative) of the objective
+                    function with respect to the right-hand side of the
+                    inequality constraints, `b_ub`.
+
+            eqlin : OptimizeResult
+                Solution and sensitivity information corresponding to the
+                equality constraints, `b_eq`.  A dictionary consisting of the
+                fields:
+
+                residual : np.ndarray
+                    The (nominally zero) residuals of the equality constraints,
+                    ``b_eq - A_eq @ x``.
+
+                marginals : np.ndarray
+                    The sensitivity (partial derivative) of the objective
+                    function with respect to the right-hand side of the
+                    equality constraints, `b_eq`.
+
+            lower, upper : OptimizeResult
+                Solution and sensitivity information corresponding to the
+                lower and upper bounds on decision variables, `bounds`.
+
+                residual : np.ndarray
+                    The (nominally positive) values of the quantity
+                    ``x - lb`` (lower) or ``ub - x`` (upper).
+
+                marginals : np.ndarray
+                    The sensitivity (partial derivative) of the objective
+                    function with respect to the lower and upper
+                    `bounds`.
+
+            mip_node_count : int
+                The number of subproblems or "nodes" solved by the MILP
+                solver. Only present when `integrality` is not `None`.
+
+            mip_dual_bound : float
+                The MILP solver's final estimate of the lower bound on the
+                optimal solution. Only present when `integrality` is not
+                `None`.
+
+            mip_gap : float
+                The difference between the final objective function value
+                and the final dual bound, scaled by the final objective
+                function value. Only present when `integrality` is not
+                `None`.
+
+    Notes
+    -----
+    The result fields `ineqlin`, `eqlin`, `lower`, and `upper` all contain
+    `marginals`, or partial derivatives of the objective function with respect
+    to the right-hand side of each constraint. These partial derivatives are
+    also referred to as "Lagrange multipliers", "dual values", and
+    "shadow prices". The sign convention of `marginals` is opposite that
+    of Lagrange multipliers produced by many nonlinear solvers.
+
+    References
+    ----------
+    .. [15] Harris, Paula MJ. "Pivot selection methods of the Devex LP code."
+            Mathematical programming 5.1 (1973): 1-28.
+    .. [16] Goldfarb, Donald, and John Ker Reid. "A practicable steepest-edge
+            simplex algorithm." Mathematical Programming 12.1 (1977): 361-371.
+    """
+    if unknown_options:
+        message = (f"Unrecognized options detected: {unknown_options}. "
+                   "These will be passed to HiGHS verbatim.")
+        warn(message, OptimizeWarning, stacklevel=3)
+
+    # Map options to HiGHS enum values
+    simplex_dual_edge_weight_strategy_enum = _convert_to_highs_enum(
+        simplex_dual_edge_weight_strategy,
+        'simplex_dual_edge_weight_strategy',
+        choices={'dantzig': \
+                 s_c.SimplexEdgeWeightStrategy.kSimplexEdgeWeightStrategyDantzig,
+                 'devex': \
+                 s_c.SimplexEdgeWeightStrategy.kSimplexEdgeWeightStrategyDevex,
+                 'steepest-devex': \
+                 s_c.SimplexEdgeWeightStrategy.kSimplexEdgeWeightStrategyChoose,
+                 'steepest': \
+                 s_c.SimplexEdgeWeightStrategy.kSimplexEdgeWeightStrategySteepestEdge,
+                 None: None})
+
+    c, A_ub, b_ub, A_eq, b_eq, bounds, x0, integrality = lp
+
+    lb, ub = bounds.T.copy()  # separate bounds, copy->C-cntgs
+    # highs_wrapper solves LHS <= A*x <= RHS, not equality constraints
+    with np.errstate(invalid="ignore"):
+        lhs_ub = -np.ones_like(b_ub)*np.inf  # LHS of UB constraints is -inf
+    rhs_ub = b_ub  # RHS of UB constraints is b_ub
+    lhs_eq = b_eq  # Equality constraint is inequality
+    rhs_eq = b_eq  # constraint with LHS=RHS
+    lhs = np.concatenate((lhs_ub, lhs_eq))
+    rhs = np.concatenate((rhs_ub, rhs_eq))
+
+    if issparse(A_ub) or issparse(A_eq):
+        A = vstack((A_ub, A_eq))
+    else:
+        A = np.vstack((A_ub, A_eq))
+    A = csc_matrix(A)
+
+    options = {
+        'presolve': presolve,
+        'sense': ObjSense.kMinimize,
+        'solver': solver,
+        'time_limit': time_limit,
+        'highs_debug_level': HighsDebugLevel.kHighsDebugLevelNone,
+        'dual_feasibility_tolerance': dual_feasibility_tolerance,
+        'ipm_optimality_tolerance': ipm_optimality_tolerance,
+        'log_to_console': disp,
+        'mip_max_nodes': mip_max_nodes,
+        'output_flag': disp,
+        'primal_feasibility_tolerance': primal_feasibility_tolerance,
+        'simplex_dual_edge_weight_strategy':
+            simplex_dual_edge_weight_strategy_enum,
+        'simplex_strategy': s_c.SimplexStrategy.kSimplexStrategyDual,
+        'ipm_iteration_limit': maxiter,
+        'simplex_iteration_limit': maxiter,
+        'mip_rel_gap': mip_rel_gap,
+    }
+    options.update(unknown_options)
+
+    # np.inf doesn't work; use very large constant
+    rhs = _replace_inf(rhs)
+    lhs = _replace_inf(lhs)
+    lb = _replace_inf(lb)
+    ub = _replace_inf(ub)
+
+    if integrality is None or np.sum(integrality) == 0:
+        integrality = np.empty(0)
+    else:
+        integrality = np.array(integrality)
+
+    res = _highs_wrapper(c, A.indptr, A.indices, A.data, lhs, rhs,
+                         lb, ub, integrality.astype(np.uint8), options)
+
+    # HiGHS represents constraints as lhs/rhs, so
+    # Ax + s = b => Ax = b - s
+    # and we need to split up s by A_ub and A_eq
+    if 'slack' in res:
+        slack = res['slack']
+        con = np.array(slack[len(b_ub):])
+        slack = np.array(slack[:len(b_ub)])
+    else:
+        slack, con = None, None
+
+    # lagrange multipliers for equalities/inequalities and upper/lower bounds
+    if 'lambda' in res:
+        lamda = res['lambda']
+        marg_ineqlin = np.array(lamda[:len(b_ub)])
+        marg_eqlin = np.array(lamda[len(b_ub):])
+        marg_upper = np.array(res['marg_bnds'][1, :])
+        marg_lower = np.array(res['marg_bnds'][0, :])
+    else:
+        marg_ineqlin, marg_eqlin = None, None
+        marg_upper, marg_lower = None, None
+
+    # this needs to be updated if we start choosing the solver intelligently
+
+    # Convert to scipy-style status and message
+    highs_status = res.get('status', None)
+    highs_message = res.get('message', None)
+    status, message = _highs_to_scipy_status_message(highs_status,
+                                                     highs_message)
+
+    x = res['x'] # is None if not set
+    sol = {'x': x,
+           'slack': slack,
+           'con': con,
+           'ineqlin': OptimizeResult({
+               'residual': slack,
+               'marginals': marg_ineqlin,
+           }),
+           'eqlin': OptimizeResult({
+               'residual': con,
+               'marginals': marg_eqlin,
+           }),
+           'lower': OptimizeResult({
+               'residual': None if x is None else x - lb,
+               'marginals': marg_lower,
+           }),
+           'upper': OptimizeResult({
+               'residual': None if x is None else ub - x,
+               'marginals': marg_upper
+            }),
+           'fun': res.get('fun'),
+           'status': status,
+           'success': res['status'] == HighsModelStatus.kOptimal,
+           'message': message,
+           'nit': res.get('simplex_nit', 0) or res.get('ipm_nit', 0),
+           'crossover_nit': res.get('crossover_nit'),
+           }
+
+    if np.any(x) and integrality is not None:
+        sol.update({
+            'mip_node_count': res.get('mip_node_count', 0),
+            'mip_dual_bound': res.get('mip_dual_bound', 0.0),
+            'mip_gap': res.get('mip_gap', 0.0),
+        })
+
+    return sol
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_ip.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_ip.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e6bf717b4d7becd46d0046cedf5f807004898e4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_ip.py
@@ -0,0 +1,1126 @@
+"""Interior-point method for linear programming
+
+The *interior-point* method uses the primal-dual path following algorithm
+outlined in [1]_. This algorithm supports sparse constraint matrices and
+is typically faster than the simplex methods, especially for large, sparse
+problems. Note, however, that the solution returned may be slightly less
+accurate than those of the simplex methods and will not, in general,
+correspond with a vertex of the polytope defined by the constraints.
+
+    .. versionadded:: 1.0.0
+
+References
+----------
+.. [1] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+       optimizer for linear programming: an implementation of the
+       homogeneous algorithm." High performance optimization. Springer US,
+       2000. 197-232.
+"""
+# Author: Matt Haberland
+
+import numpy as np
+import scipy as sp
+import scipy.sparse as sps
+from warnings import warn
+from scipy.linalg import LinAlgError
+from ._optimize import OptimizeWarning, OptimizeResult, _check_unknown_options
+from ._linprog_util import _postsolve
+has_umfpack = True
+has_cholmod = True
+try:
+    import sksparse  # noqa: F401
+    from sksparse.cholmod import cholesky as cholmod  # noqa: F401
+    from sksparse.cholmod import analyze as cholmod_analyze
+except ImportError:
+    has_cholmod = False
+try:
+    import scikits.umfpack  # test whether to use factorized  # noqa: F401
+except ImportError:
+    has_umfpack = False
+
+
+def _get_solver(M, sparse=False, lstsq=False, sym_pos=True,
+                cholesky=True, permc_spec='MMD_AT_PLUS_A'):
+    """
+    Given solver options, return a handle to the appropriate linear system
+    solver.
+
+    Parameters
+    ----------
+    M : 2-D array
+        As defined in [4] Equation 8.31
+    sparse : bool (default = False)
+        True if the system to be solved is sparse. This is typically set
+        True when the original ``A_ub`` and ``A_eq`` arrays are sparse.
+    lstsq : bool (default = False)
+        True if the system is ill-conditioned and/or (nearly) singular and
+        thus a more robust least-squares solver is desired. This is sometimes
+        needed as the solution is approached.
+    sym_pos : bool (default = True)
+        True if the system matrix is symmetric positive definite
+        Sometimes this needs to be set false as the solution is approached,
+        even when the system should be symmetric positive definite, due to
+        numerical difficulties.
+    cholesky : bool (default = True)
+        True if the system is to be solved by Cholesky, rather than LU,
+        decomposition. This is typically faster unless the problem is very
+        small or prone to numerical difficulties.
+    permc_spec : str (default = 'MMD_AT_PLUS_A')
+        Sparsity preservation strategy used by SuperLU. Acceptable values are:
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering.
+
+        See SuperLU documentation.
+
+    Returns
+    -------
+    solve : function
+        Handle to the appropriate solver function
+
+    """
+    try:
+        if sparse:
+            if lstsq:
+                def solve(r, sym_pos=False):
+                    return sps.linalg.lsqr(M, r)[0]
+            elif cholesky:
+                try:
+                    # Will raise an exception in the first call,
+                    # or when the matrix changes due to a new problem
+                    _get_solver.cholmod_factor.cholesky_inplace(M)
+                except Exception:
+                    _get_solver.cholmod_factor = cholmod_analyze(M)
+                    _get_solver.cholmod_factor.cholesky_inplace(M)
+                solve = _get_solver.cholmod_factor
+            else:
+                if has_umfpack and sym_pos:
+                    solve = sps.linalg.factorized(M)
+                else:  # factorized doesn't pass permc_spec
+                    solve = sps.linalg.splu(M, permc_spec=permc_spec).solve
+
+        else:
+            if lstsq:  # sometimes necessary as solution is approached
+                def solve(r):
+                    return sp.linalg.lstsq(M, r)[0]
+            elif cholesky:
+                L = sp.linalg.cho_factor(M)
+
+                def solve(r):
+                    return sp.linalg.cho_solve(L, r)
+            else:
+                # this seems to cache the matrix factorization, so solving
+                # with multiple right hand sides is much faster
+                def solve(r, sym_pos=sym_pos):
+                    if sym_pos:
+                        return sp.linalg.solve(M, r, assume_a="pos")
+                    else:
+                        return sp.linalg.solve(M, r)
+    # There are many things that can go wrong here, and it's hard to say
+    # what all of them are. It doesn't really matter: if the matrix can't be
+    # factorized, return None. get_solver will be called again with different
+    # inputs, and a new routine will try to factorize the matrix.
+    except KeyboardInterrupt:
+        raise
+    except Exception:
+        return None
+    return solve
+
+
+def _get_delta(A, b, c, x, y, z, tau, kappa, gamma, eta, sparse=False,
+               lstsq=False, sym_pos=True, cholesky=True, pc=True, ip=False,
+               permc_spec='MMD_AT_PLUS_A'):
+    """
+    Given standard form problem defined by ``A``, ``b``, and ``c``;
+    current variable estimates ``x``, ``y``, ``z``, ``tau``, and ``kappa``;
+    algorithmic parameters ``gamma and ``eta;
+    and options ``sparse``, ``lstsq``, ``sym_pos``, ``cholesky``, ``pc``
+    (predictor-corrector), and ``ip`` (initial point improvement),
+    get the search direction for increments to the variable estimates.
+
+    Parameters
+    ----------
+    As defined in [4], except:
+    sparse : bool
+        True if the system to be solved is sparse. This is typically set
+        True when the original ``A_ub`` and ``A_eq`` arrays are sparse.
+    lstsq : bool
+        True if the system is ill-conditioned and/or (nearly) singular and
+        thus a more robust least-squares solver is desired. This is sometimes
+        needed as the solution is approached.
+    sym_pos : bool
+        True if the system matrix is symmetric positive definite
+        Sometimes this needs to be set false as the solution is approached,
+        even when the system should be symmetric positive definite, due to
+        numerical difficulties.
+    cholesky : bool
+        True if the system is to be solved by Cholesky, rather than LU,
+        decomposition. This is typically faster unless the problem is very
+        small or prone to numerical difficulties.
+    pc : bool
+        True if the predictor-corrector method of Mehrota is to be used. This
+        is almost always (if not always) beneficial. Even though it requires
+        the solution of an additional linear system, the factorization
+        is typically (implicitly) reused so solution is efficient, and the
+        number of algorithm iterations is typically reduced.
+    ip : bool
+        True if the improved initial point suggestion due to [4] section 4.3
+        is desired. It's unclear whether this is beneficial.
+    permc_spec : str (default = 'MMD_AT_PLUS_A')
+        (Has effect only with ``sparse = True``, ``lstsq = False``, ``sym_pos =
+        True``.) A matrix is factorized in each iteration of the algorithm.
+        This option specifies how to permute the columns of the matrix for
+        sparsity preservation. Acceptable values are:
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering.
+
+        This option can impact the convergence of the
+        interior point algorithm; test different values to determine which
+        performs best for your problem. For more information, refer to
+        ``scipy.sparse.linalg.splu``.
+
+    Returns
+    -------
+    Search directions as defined in [4]
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    if A.shape[0] == 0:
+        # If there are no constraints, some solvers fail (understandably)
+        # rather than returning empty solution. This gets the job done.
+        sparse, lstsq, sym_pos, cholesky = False, False, True, False
+    n_x = len(x)
+
+    # [4] Equation 8.8
+    r_P = b * tau - A.dot(x)
+    r_D = c * tau - A.T.dot(y) - z
+    r_G = c.dot(x) - b.transpose().dot(y) + kappa
+    mu = (x.dot(z) + tau * kappa) / (n_x + 1)
+
+    #  Assemble M from [4] Equation 8.31
+    Dinv = x / z
+
+    if sparse:
+        M = A.dot(sps.diags(Dinv, 0, format="csc").dot(A.T))
+    else:
+        M = A.dot(Dinv.reshape(-1, 1) * A.T)
+    solve = _get_solver(M, sparse, lstsq, sym_pos, cholesky, permc_spec)
+
+    # pc: "predictor-corrector" [4] Section 4.1
+    # In development this option could be turned off
+    # but it always seems to improve performance substantially
+    n_corrections = 1 if pc else 0
+
+    i = 0
+    alpha, d_x, d_z, d_tau, d_kappa = 0, 0, 0, 0, 0
+    while i <= n_corrections:
+        # Reference [4] Eq. 8.6
+        rhatp = eta(gamma) * r_P
+        rhatd = eta(gamma) * r_D
+        rhatg = eta(gamma) * r_G
+
+        # Reference [4] Eq. 8.7
+        rhatxs = gamma * mu - x * z
+        rhattk = gamma * mu - tau * kappa
+
+        if i == 1:
+            if ip:  # if the correction is to get "initial point"
+                # Reference [4] Eq. 8.23
+                rhatxs = ((1 - alpha) * gamma * mu -
+                          x * z - alpha**2 * d_x * d_z)
+                rhattk = ((1 - alpha) * gamma * mu -
+                    tau * kappa -
+                    alpha**2 * d_tau * d_kappa)
+            else:  # if the correction is for "predictor-corrector"
+                # Reference [4] Eq. 8.13
+                rhatxs -= d_x * d_z
+                rhattk -= d_tau * d_kappa
+
+        # sometimes numerical difficulties arise as the solution is approached
+        # this loop tries to solve the equations using a sequence of functions
+        # for solve. For dense systems, the order is:
+        # 1. scipy.linalg.cho_factor/scipy.linalg.cho_solve,
+        # 2. scipy.linalg.solve w/ sym_pos = True,
+        # 3. scipy.linalg.solve w/ sym_pos = False, and if all else fails
+        # 4. scipy.linalg.lstsq
+        # For sparse systems, the order is:
+        # 1. sksparse.cholmod.cholesky (if available)
+        # 2. scipy.sparse.linalg.factorized (if umfpack available)
+        # 3. scipy.sparse.linalg.splu
+        # 4. scipy.sparse.linalg.lsqr
+        solved = False
+        while not solved:
+            try:
+                # [4] Equation 8.28
+                p, q = _sym_solve(Dinv, A, c, b, solve)
+                # [4] Equation 8.29
+                u, v = _sym_solve(Dinv, A, rhatd -
+                                  (1 / x) * rhatxs, rhatp, solve)
+                if np.any(np.isnan(p)) or np.any(np.isnan(q)):
+                    raise LinAlgError
+                solved = True
+            except (LinAlgError, ValueError, TypeError) as e:
+                # Usually this doesn't happen. If it does, it happens when
+                # there are redundant constraints or when approaching the
+                # solution. If so, change solver.
+                if cholesky:
+                    cholesky = False
+                    warn(
+                        "Solving system with option 'cholesky':True "
+                        "failed. It is normal for this to happen "
+                        "occasionally, especially as the solution is "
+                        "approached. However, if you see this frequently, "
+                        "consider setting option 'cholesky' to False.",
+                        OptimizeWarning, stacklevel=5)
+                elif sym_pos:
+                    sym_pos = False
+                    warn(
+                        "Solving system with option 'sym_pos':True "
+                        "failed. It is normal for this to happen "
+                        "occasionally, especially as the solution is "
+                        "approached. However, if you see this frequently, "
+                        "consider setting option 'sym_pos' to False.",
+                        OptimizeWarning, stacklevel=5)
+                elif not lstsq:
+                    lstsq = True
+                    warn(
+                        "Solving system with option 'sym_pos':False "
+                        "failed. This may happen occasionally, "
+                        "especially as the solution is "
+                        "approached. However, if you see this frequently, "
+                        "your problem may be numerically challenging. "
+                        "If you cannot improve the formulation, consider "
+                        "setting 'lstsq' to True. Consider also setting "
+                        "`presolve` to True, if it is not already.",
+                        OptimizeWarning, stacklevel=5)
+                else:
+                    raise e
+                solve = _get_solver(M, sparse, lstsq, sym_pos,
+                                    cholesky, permc_spec)
+        # [4] Results after 8.29
+        d_tau = ((rhatg + 1 / tau * rhattk - (-c.dot(u) + b.dot(v))) /
+                 (1 / tau * kappa + (-c.dot(p) + b.dot(q))))
+        d_x = u + p * d_tau
+        d_y = v + q * d_tau
+
+        # [4] Relations between  after 8.25 and 8.26
+        d_z = (1 / x) * (rhatxs - z * d_x)
+        d_kappa = 1 / tau * (rhattk - kappa * d_tau)
+
+        # [4] 8.12 and "Let alpha be the maximal possible step..." before 8.23
+        alpha = _get_step(x, d_x, z, d_z, tau, d_tau, kappa, d_kappa, 1)
+        if ip:  # initial point - see [4] 4.4
+            gamma = 10
+        else:  # predictor-corrector, [4] definition after 8.12
+            beta1 = 0.1  # [4] pg. 220 (Table 8.1)
+            gamma = (1 - alpha)**2 * min(beta1, (1 - alpha))
+        i += 1
+
+    return d_x, d_y, d_z, d_tau, d_kappa
+
+
+def _sym_solve(Dinv, A, r1, r2, solve):
+    """
+    An implementation of [4] equation 8.31 and 8.32
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    # [4] 8.31
+    r = r2 + A.dot(Dinv * r1)
+    v = solve(r)
+    # [4] 8.32
+    u = Dinv * (A.T.dot(v) - r1)
+    return u, v
+
+
+def _get_step(x, d_x, z, d_z, tau, d_tau, kappa, d_kappa, alpha0):
+    """
+    An implementation of [4] equation 8.21
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    # [4] 4.3 Equation 8.21, ignoring 8.20 requirement
+    # same step is taken in primal and dual spaces
+    # alpha0 is basically beta3 from [4] Table 8.1, but instead of beta3
+    # the value 1 is used in Mehrota corrector and initial point correction
+    i_x = d_x < 0
+    i_z = d_z < 0
+    alpha_x = alpha0 * np.min(x[i_x] / -d_x[i_x]) if np.any(i_x) else 1
+    alpha_tau = alpha0 * tau / -d_tau if d_tau < 0 else 1
+    alpha_z = alpha0 * np.min(z[i_z] / -d_z[i_z]) if np.any(i_z) else 1
+    alpha_kappa = alpha0 * kappa / -d_kappa if d_kappa < 0 else 1
+    alpha = np.min([1, alpha_x, alpha_tau, alpha_z, alpha_kappa])
+    return alpha
+
+
+def _get_message(status):
+    """
+    Given problem status code, return a more detailed message.
+
+    Parameters
+    ----------
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    Returns
+    -------
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    """
+    messages = (
+        ["Optimization terminated successfully.",
+         "The iteration limit was reached before the algorithm converged.",
+         "The algorithm terminated successfully and determined that the "
+         "problem is infeasible.",
+         "The algorithm terminated successfully and determined that the "
+         "problem is unbounded.",
+         "Numerical difficulties were encountered before the problem "
+         "converged. Please check your problem formulation for errors, "
+         "independence of linear equality constraints, and reasonable "
+         "scaling and matrix condition numbers. If you continue to "
+         "encounter this error, please submit a bug report."
+         ])
+    return messages[status]
+
+
+def _do_step(x, y, z, tau, kappa, d_x, d_y, d_z, d_tau, d_kappa, alpha):
+    """
+    An implementation of [4] Equation 8.9
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    x = x + alpha * d_x
+    tau = tau + alpha * d_tau
+    z = z + alpha * d_z
+    kappa = kappa + alpha * d_kappa
+    y = y + alpha * d_y
+    return x, y, z, tau, kappa
+
+
+def _get_blind_start(shape):
+    """
+    Return the starting point from [4] 4.4
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    m, n = shape
+    x0 = np.ones(n)
+    y0 = np.zeros(m)
+    z0 = np.ones(n)
+    tau0 = 1
+    kappa0 = 1
+    return x0, y0, z0, tau0, kappa0
+
+
+def _indicators(A, b, c, c0, x, y, z, tau, kappa):
+    """
+    Implementation of several equations from [4] used as indicators of
+    the status of optimization.
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+
+    # residuals for termination are relative to initial values
+    x0, y0, z0, tau0, kappa0 = _get_blind_start(A.shape)
+
+    # See [4], Section 4 - The Homogeneous Algorithm, Equation 8.8
+    def r_p(x, tau):
+        return b * tau - A.dot(x)
+
+    def r_d(y, z, tau):
+        return c * tau - A.T.dot(y) - z
+
+    def r_g(x, y, kappa):
+        return kappa + c.dot(x) - b.dot(y)
+
+    # np.dot unpacks if they are arrays of size one
+    def mu(x, tau, z, kappa):
+        return (x.dot(z) + np.dot(tau, kappa)) / (len(x) + 1)
+
+    obj = c.dot(x / tau) + c0
+
+    def norm(a):
+        return np.linalg.norm(a)
+
+    # See [4], Section 4.5 - The Stopping Criteria
+    r_p0 = r_p(x0, tau0)
+    r_d0 = r_d(y0, z0, tau0)
+    r_g0 = r_g(x0, y0, kappa0)
+    mu_0 = mu(x0, tau0, z0, kappa0)
+    rho_A = norm(c.T.dot(x) - b.T.dot(y)) / (tau + norm(b.T.dot(y)))
+    rho_p = norm(r_p(x, tau)) / max(1, norm(r_p0))
+    rho_d = norm(r_d(y, z, tau)) / max(1, norm(r_d0))
+    rho_g = norm(r_g(x, y, kappa)) / max(1, norm(r_g0))
+    rho_mu = mu(x, tau, z, kappa) / mu_0
+    return rho_p, rho_d, rho_A, rho_g, rho_mu, obj
+
+
+def _display_iter(rho_p, rho_d, rho_g, alpha, rho_mu, obj, header=False):
+    """
+    Print indicators of optimization status to the console.
+
+    Parameters
+    ----------
+    rho_p : float
+        The (normalized) primal feasibility, see [4] 4.5
+    rho_d : float
+        The (normalized) dual feasibility, see [4] 4.5
+    rho_g : float
+        The (normalized) duality gap, see [4] 4.5
+    alpha : float
+        The step size, see [4] 4.3
+    rho_mu : float
+        The (normalized) path parameter, see [4] 4.5
+    obj : float
+        The objective function value of the current iterate
+    header : bool
+        True if a header is to be printed
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+
+    """
+    if header:
+        print("Primal Feasibility ",
+              "Dual Feasibility   ",
+              "Duality Gap        ",
+              "Step            ",
+              "Path Parameter     ",
+              "Objective          ")
+
+    # no clue why this works
+    fmt = '{0:<20.13}{1:<20.13}{2:<20.13}{3:<17.13}{4:<20.13}{5:<20.13}'
+    print(fmt.format(
+        float(rho_p),
+        float(rho_d),
+        float(rho_g),
+        alpha if isinstance(alpha, str) else float(alpha),
+        float(rho_mu),
+        float(obj)))
+
+
+def _ip_hsd(A, b, c, c0, alpha0, beta, maxiter, disp, tol, sparse, lstsq,
+            sym_pos, cholesky, pc, ip, permc_spec, callback, postsolve_args):
+    r"""
+    Solve a linear programming problem in standard form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    using the interior point method of [4].
+
+    Parameters
+    ----------
+    A : 2-D array
+        2-D array such that ``A @ x``, gives the values of the equality
+        constraints at ``x``.
+    b : 1-D array
+        1-D array of values representing the RHS of each equality constraint
+        (row) in ``A`` (for standard form problem).
+    c : 1-D array
+        Coefficients of the linear objective function to be minimized (for
+        standard form problem).
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables. (Purely for display.)
+    alpha0 : float
+        The maximal step size for Mehrota's predictor-corrector search
+        direction; see :math:`\beta_3`of [4] Table 8.1
+    beta : float
+        The desired reduction of the path parameter :math:`\mu` (see  [6]_)
+    maxiter : int
+        The maximum number of iterations of the algorithm.
+    disp : bool
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    tol : float
+        Termination tolerance; see [4]_ Section 4.5.
+    sparse : bool
+        Set to ``True`` if the problem is to be treated as sparse. However,
+        the inputs ``A_eq`` and ``A_ub`` should nonetheless be provided as
+        (dense) arrays rather than sparse matrices.
+    lstsq : bool
+        Set to ``True`` if the problem is expected to be very poorly
+        conditioned. This should always be left as ``False`` unless severe
+        numerical difficulties are frequently encountered, and a better option
+        would be to improve the formulation of the problem.
+    sym_pos : bool
+        Leave ``True`` if the problem is expected to yield a well conditioned
+        symmetric positive definite normal equation matrix (almost always).
+    cholesky : bool
+        Set to ``True`` if the normal equations are to be solved by explicit
+        Cholesky decomposition followed by explicit forward/backward
+        substitution. This is typically faster for moderate, dense problems
+        that are numerically well-behaved.
+    pc : bool
+        Leave ``True`` if the predictor-corrector method of Mehrota is to be
+        used. This is almost always (if not always) beneficial.
+    ip : bool
+        Set to ``True`` if the improved initial point suggestion due to [4]_
+        Section 4.3 is desired. It's unclear whether this is beneficial.
+    permc_spec : str (default = 'MMD_AT_PLUS_A')
+        (Has effect only with ``sparse = True``, ``lstsq = False``, ``sym_pos =
+        True``.) A matrix is factorized in each iteration of the algorithm.
+        This option specifies how to permute the columns of the matrix for
+        sparsity preservation. Acceptable values are:
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering.
+
+        This option can impact the convergence of the
+        interior point algorithm; test different values to determine which
+        performs best for your problem. For more information, refer to
+        ``scipy.sparse.linalg.splu``.
+    callback : callable, optional
+        If a callback function is provided, it will be called within each
+        iteration of the algorithm. The callback function must accept a single
+        `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+            x : 1-D array
+                Current solution vector
+            fun : float
+                Current value of the objective function
+            success : bool
+                True only when an algorithm has completed successfully,
+                so this is always False as the callback function is called
+                only while the algorithm is still iterating.
+            slack : 1-D array
+                The values of the slack variables. Each slack variable
+                corresponds to an inequality constraint. If the slack is zero,
+                the corresponding constraint is active.
+            con : 1-D array
+                The (nominally zero) residuals of the equality constraints,
+                that is, ``b - A_eq @ x``
+            phase : int
+                The phase of the algorithm being executed. This is always
+                1 for the interior-point method because it has only one phase.
+            status : int
+                For revised simplex, this is always 0 because if a different
+                status is detected, the algorithm terminates.
+            nit : int
+                The number of iterations performed.
+            message : str
+                A string descriptor of the exit status of the optimization.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem.
+
+    Returns
+    -------
+    x_hat : float
+        Solution vector (for standard form problem).
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+    iteration : int
+        The number of iterations taken to solve the problem
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+    .. [6] Freund, Robert M. "Primal-Dual Interior-Point Methods for Linear
+           Programming based on Newton's Method." Unpublished Course Notes,
+           March 2004. Available 2/25/2017 at:
+           https://ocw.mit.edu/courses/sloan-school-of-management/15-084j-nonlinear-programming-spring-2004/lecture-notes/lec14_int_pt_mthd.pdf
+
+    """
+
+    iteration = 0
+
+    # default initial point
+    x, y, z, tau, kappa = _get_blind_start(A.shape)
+
+    # first iteration is special improvement of initial point
+    ip = ip if pc else False
+
+    # [4] 4.5
+    rho_p, rho_d, rho_A, rho_g, rho_mu, obj = _indicators(
+        A, b, c, c0, x, y, z, tau, kappa)
+    go = rho_p > tol or rho_d > tol or rho_A > tol  # we might get lucky : )
+
+    if disp:
+        _display_iter(rho_p, rho_d, rho_g, "-", rho_mu, obj, header=True)
+    if callback is not None:
+        x_o, fun, slack, con = _postsolve(x/tau, postsolve_args)
+        res = OptimizeResult({'x': x_o, 'fun': fun, 'slack': slack,
+                              'con': con, 'nit': iteration, 'phase': 1,
+                              'complete': False, 'status': 0,
+                              'message': "", 'success': False})
+        callback(res)
+
+    status = 0
+    message = "Optimization terminated successfully."
+
+    if sparse:
+        A = sps.csc_matrix(A)
+
+    while go:
+
+        iteration += 1
+
+        if ip:  # initial point
+            # [4] Section 4.4
+            gamma = 1
+
+            def eta(g):
+                return 1
+        else:
+            # gamma = 0 in predictor step according to [4] 4.1
+            # if predictor/corrector is off, use mean of complementarity [6]
+            # 5.1 / [4] Below Figure 10-4
+            gamma = 0 if pc else beta * np.mean(z * x)
+            # [4] Section 4.1
+
+            def eta(g=gamma):
+                return 1 - g
+
+        try:
+            # Solve [4] 8.6 and 8.7/8.13/8.23
+            d_x, d_y, d_z, d_tau, d_kappa = _get_delta(
+                A, b, c, x, y, z, tau, kappa, gamma, eta,
+                sparse, lstsq, sym_pos, cholesky, pc, ip, permc_spec)
+
+            if ip:  # initial point
+                # [4] 4.4
+                # Formula after 8.23 takes a full step regardless if this will
+                # take it negative
+                alpha = 1.0
+                x, y, z, tau, kappa = _do_step(
+                    x, y, z, tau, kappa, d_x, d_y,
+                    d_z, d_tau, d_kappa, alpha)
+                x[x < 1] = 1
+                z[z < 1] = 1
+                tau = max(1, tau)
+                kappa = max(1, kappa)
+                ip = False  # done with initial point
+            else:
+                # [4] Section 4.3
+                alpha = _get_step(x, d_x, z, d_z, tau,
+                                  d_tau, kappa, d_kappa, alpha0)
+                # [4] Equation 8.9
+                x, y, z, tau, kappa = _do_step(
+                    x, y, z, tau, kappa, d_x, d_y, d_z, d_tau, d_kappa, alpha)
+
+        except (LinAlgError, FloatingPointError,
+                ValueError, ZeroDivisionError):
+            # this can happen when sparse solver is used and presolve
+            # is turned off. Also observed ValueError in AppVeyor Python 3.6
+            # Win32 build (PR #8676). I've never seen it otherwise.
+            status = 4
+            message = _get_message(status)
+            break
+
+        # [4] 4.5
+        rho_p, rho_d, rho_A, rho_g, rho_mu, obj = _indicators(
+            A, b, c, c0, x, y, z, tau, kappa)
+        go = rho_p > tol or rho_d > tol or rho_A > tol
+
+        if disp:
+            _display_iter(rho_p, rho_d, rho_g, alpha, rho_mu, obj)
+        if callback is not None:
+            x_o, fun, slack, con = _postsolve(x/tau, postsolve_args)
+            res = OptimizeResult({'x': x_o, 'fun': fun, 'slack': slack,
+                                  'con': con, 'nit': iteration, 'phase': 1,
+                                  'complete': False, 'status': 0,
+                                  'message': "", 'success': False})
+            callback(res)
+
+        # [4] 4.5
+        inf1 = (rho_p < tol and rho_d < tol and rho_g < tol and tau < tol *
+                max(1, kappa))
+        inf2 = rho_mu < tol and tau < tol * min(1, kappa)
+        if inf1 or inf2:
+            # [4] Lemma 8.4 / Theorem 8.3
+            if b.transpose().dot(y) > tol:
+                status = 2
+            else:  # elif c.T.dot(x) < tol: ? Probably not necessary.
+                status = 3
+            message = _get_message(status)
+            break
+        elif iteration >= maxiter:
+            status = 1
+            message = _get_message(status)
+            break
+
+    x_hat = x / tau
+    # [4] Statement after Theorem 8.2
+    return x_hat, status, message, iteration
+
+
+def _linprog_ip(c, c0, A, b, callback, postsolve_args, maxiter=1000, tol=1e-8,
+                disp=False, alpha0=.99995, beta=0.1, sparse=False, lstsq=False,
+                sym_pos=True, cholesky=None, pc=True, ip=False,
+                permc_spec='MMD_AT_PLUS_A', **unknown_options):
+    r"""
+    Minimize a linear objective function subject to linear
+    equality and non-negativity constraints using the interior point method
+    of [4]_. Linear programming is intended to solve problems
+    of the following form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    User-facing documentation is in _linprog_doc.py.
+
+    Parameters
+    ----------
+    c : 1-D array
+        Coefficients of the linear objective function to be minimized.
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables. (Purely for display.)
+    A : 2-D array
+        2-D array such that ``A @ x``, gives the values of the equality
+        constraints at ``x``.
+    b : 1-D array
+        1-D array of values representing the right hand side of each equality
+        constraint (row) in ``A``.
+    callback : callable, optional
+        Callback function to be executed once per iteration.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem.
+
+    Options
+    -------
+    maxiter : int (default = 1000)
+        The maximum number of iterations of the algorithm.
+    tol : float (default = 1e-8)
+        Termination tolerance to be used for all termination criteria;
+        see [4]_ Section 4.5.
+    disp : bool (default = False)
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    alpha0 : float (default = 0.99995)
+        The maximal step size for Mehrota's predictor-corrector search
+        direction; see :math:`\beta_{3}` of [4]_ Table 8.1.
+    beta : float (default = 0.1)
+        The desired reduction of the path parameter :math:`\mu` (see [6]_)
+        when Mehrota's predictor-corrector is not in use (uncommon).
+    sparse : bool (default = False)
+        Set to ``True`` if the problem is to be treated as sparse after
+        presolve. If either ``A_eq`` or ``A_ub`` is a sparse matrix,
+        this option will automatically be set ``True``, and the problem
+        will be treated as sparse even during presolve. If your constraint
+        matrices contain mostly zeros and the problem is not very small (less
+        than about 100 constraints or variables), consider setting ``True``
+        or providing ``A_eq`` and ``A_ub`` as sparse matrices.
+    lstsq : bool (default = False)
+        Set to ``True`` if the problem is expected to be very poorly
+        conditioned. This should always be left ``False`` unless severe
+        numerical difficulties are encountered. Leave this at the default
+        unless you receive a warning message suggesting otherwise.
+    sym_pos : bool (default = True)
+        Leave ``True`` if the problem is expected to yield a well conditioned
+        symmetric positive definite normal equation matrix
+        (almost always). Leave this at the default unless you receive
+        a warning message suggesting otherwise.
+    cholesky : bool (default = True)
+        Set to ``True`` if the normal equations are to be solved by explicit
+        Cholesky decomposition followed by explicit forward/backward
+        substitution. This is typically faster for problems
+        that are numerically well-behaved.
+    pc : bool (default = True)
+        Leave ``True`` if the predictor-corrector method of Mehrota is to be
+        used. This is almost always (if not always) beneficial.
+    ip : bool (default = False)
+        Set to ``True`` if the improved initial point suggestion due to [4]_
+        Section 4.3 is desired. Whether this is beneficial or not
+        depends on the problem.
+    permc_spec : str (default = 'MMD_AT_PLUS_A')
+        (Has effect only with ``sparse = True``, ``lstsq = False``, ``sym_pos =
+        True``, and no SuiteSparse.)
+        A matrix is factorized in each iteration of the algorithm.
+        This option specifies how to permute the columns of the matrix for
+        sparsity preservation. Acceptable values are:
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering.
+
+        This option can impact the convergence of the
+        interior point algorithm; test different values to determine which
+        performs best for your problem. For more information, refer to
+        ``scipy.sparse.linalg.splu``.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    x : 1-D array
+        Solution vector.
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+    iteration : int
+        The number of iterations taken to solve the problem.
+
+    Notes
+    -----
+    This method implements the algorithm outlined in [4]_ with ideas from [8]_
+    and a structure inspired by the simpler methods of [6]_.
+
+    The primal-dual path following method begins with initial 'guesses' of
+    the primal and dual variables of the standard form problem and iteratively
+    attempts to solve the (nonlinear) Karush-Kuhn-Tucker conditions for the
+    problem with a gradually reduced logarithmic barrier term added to the
+    objective. This particular implementation uses a homogeneous self-dual
+    formulation, which provides certificates of infeasibility or unboundedness
+    where applicable.
+
+    The default initial point for the primal and dual variables is that
+    defined in [4]_ Section 4.4 Equation 8.22. Optionally (by setting initial
+    point option ``ip=True``), an alternate (potentially improved) starting
+    point can be calculated according to the additional recommendations of
+    [4]_ Section 4.4.
+
+    A search direction is calculated using the predictor-corrector method
+    (single correction) proposed by Mehrota and detailed in [4]_ Section 4.1.
+    (A potential improvement would be to implement the method of multiple
+    corrections described in [4]_ Section 4.2.) In practice, this is
+    accomplished by solving the normal equations, [4]_ Section 5.1 Equations
+    8.31 and 8.32, derived from the Newton equations [4]_ Section 5 Equations
+    8.25 (compare to [4]_ Section 4 Equations 8.6-8.8). The advantage of
+    solving the normal equations rather than 8.25 directly is that the
+    matrices involved are symmetric positive definite, so Cholesky
+    decomposition can be used rather than the more expensive LU factorization.
+
+    With default options, the solver used to perform the factorization depends
+    on third-party software availability and the conditioning of the problem.
+
+    For dense problems, solvers are tried in the following order:
+
+    1. ``scipy.linalg.cho_factor``
+
+    2. ``scipy.linalg.solve`` with option ``sym_pos=True``
+
+    3. ``scipy.linalg.solve`` with option ``sym_pos=False``
+
+    4. ``scipy.linalg.lstsq``
+
+    For sparse problems:
+
+    1. ``sksparse.cholmod.cholesky`` (if scikit-sparse and SuiteSparse are installed)
+
+    2. ``scipy.sparse.linalg.factorized``
+        (if scikit-umfpack and SuiteSparse are installed)
+
+    3. ``scipy.sparse.linalg.splu`` (which uses SuperLU distributed with SciPy)
+
+    4. ``scipy.sparse.linalg.lsqr``
+
+    If the solver fails for any reason, successively more robust (but slower)
+    solvers are attempted in the order indicated. Attempting, failing, and
+    re-starting factorization can be time consuming, so if the problem is
+    numerically challenging, options can be set to  bypass solvers that are
+    failing. Setting ``cholesky=False`` skips to solver 2,
+    ``sym_pos=False`` skips to solver 3, and ``lstsq=True`` skips
+    to solver 4 for both sparse and dense problems.
+
+    Potential improvements for combating issues associated with dense
+    columns in otherwise sparse problems are outlined in [4]_ Section 5.3 and
+    [10]_ Section 4.1-4.2; the latter also discusses the alleviation of
+    accuracy issues associated with the substitution approach to free
+    variables.
+
+    After calculating the search direction, the maximum possible step size
+    that does not activate the non-negativity constraints is calculated, and
+    the smaller of this step size and unity is applied (as in [4]_ Section
+    4.1.) [4]_ Section 4.3 suggests improvements for choosing the step size.
+
+    The new point is tested according to the termination conditions of [4]_
+    Section 4.5. The same tolerance, which can be set using the ``tol`` option,
+    is used for all checks. (A potential improvement would be to expose
+    the different tolerances to be set independently.) If optimality,
+    unboundedness, or infeasibility is detected, the solve procedure
+    terminates; otherwise it repeats.
+
+    The expected problem formulation differs between the top level ``linprog``
+    module and the method specific solvers. The method specific solvers expect a
+    problem in standard form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    Whereas the top level ``linprog`` module expects a problem of form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+         lb <= x <= ub
+
+    where ``lb = 0`` and ``ub = None`` unless set in ``bounds``.
+
+    The original problem contains equality, upper-bound and variable constraints
+    whereas the method specific solver requires equality constraints and
+    variable non-negativity.
+
+    ``linprog`` module converts the original problem to standard form by
+    converting the simple bounds to upper bound constraints, introducing
+    non-negative slack variables for inequality constraints, and expressing
+    unbounded variables as the difference between two non-negative variables.
+
+
+    References
+    ----------
+    .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
+           optimizer for linear programming: an implementation of the
+           homogeneous algorithm." High performance optimization. Springer US,
+           2000. 197-232.
+    .. [6] Freund, Robert M. "Primal-Dual Interior-Point Methods for Linear
+           Programming based on Newton's Method." Unpublished Course Notes,
+           March 2004. Available 2/25/2017 at
+           https://ocw.mit.edu/courses/sloan-school-of-management/15-084j-nonlinear-programming-spring-2004/lecture-notes/lec14_int_pt_mthd.pdf
+    .. [8] Andersen, Erling D., and Knud D. Andersen. "Presolving in linear
+           programming." Mathematical Programming 71.2 (1995): 221-245.
+    .. [9] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+    .. [10] Andersen, Erling D., et al. Implementation of interior point methods
+            for large scale linear programming. HEC/Universite de Geneve, 1996.
+
+    """
+
+    _check_unknown_options(unknown_options)
+
+    # These should be warnings, not errors
+    if (cholesky or cholesky is None) and sparse and not has_cholmod:
+        if cholesky:
+            warn("Sparse cholesky is only available with scikit-sparse. "
+                 "Setting `cholesky = False`",
+                 OptimizeWarning, stacklevel=3)
+        cholesky = False
+
+    if sparse and lstsq:
+        warn("Option combination 'sparse':True and 'lstsq':True "
+             "is not recommended.",
+             OptimizeWarning, stacklevel=3)
+
+    if lstsq and cholesky:
+        warn("Invalid option combination 'lstsq':True "
+             "and 'cholesky':True; option 'cholesky' has no effect when "
+             "'lstsq' is set True.",
+             OptimizeWarning, stacklevel=3)
+
+    valid_permc_spec = ('NATURAL', 'MMD_ATA', 'MMD_AT_PLUS_A', 'COLAMD')
+    if permc_spec.upper() not in valid_permc_spec:
+        warn("Invalid permc_spec option: '" + str(permc_spec) + "'. "
+             "Acceptable values are 'NATURAL', 'MMD_ATA', 'MMD_AT_PLUS_A', "
+             "and 'COLAMD'. Reverting to default.",
+             OptimizeWarning, stacklevel=3)
+        permc_spec = 'MMD_AT_PLUS_A'
+
+    # This can be an error
+    if not sym_pos and cholesky:
+        raise ValueError(
+            "Invalid option combination 'sym_pos':False "
+            "and 'cholesky':True: Cholesky decomposition is only possible "
+            "for symmetric positive definite matrices.")
+
+    cholesky = cholesky or (cholesky is None and sym_pos and not lstsq)
+
+    x, status, message, iteration = _ip_hsd(A, b, c, c0, alpha0, beta,
+                                            maxiter, disp, tol, sparse,
+                                            lstsq, sym_pos, cholesky,
+                                            pc, ip, permc_spec, callback,
+                                            postsolve_args)
+
+    return x, status, message, iteration
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_rs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_rs.py
new file mode 100644
index 0000000000000000000000000000000000000000..43fed5805c4e40f0c38de91f053e3926cf1478e4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_rs.py
@@ -0,0 +1,572 @@
+"""Revised simplex method for linear programming
+
+The *revised simplex* method uses the method described in [1]_, except
+that a factorization [2]_ of the basis matrix, rather than its inverse,
+is efficiently maintained and used to solve the linear systems at each
+iteration of the algorithm.
+
+.. versionadded:: 1.3.0
+
+References
+----------
+.. [1] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+.. [2] Bartels, Richard H. "A stabilization of the simplex method."
+            Journal in  Numerische Mathematik 16.5 (1971): 414-434.
+
+"""
+# Author: Matt Haberland
+
+import numpy as np
+from numpy.linalg import LinAlgError
+
+from scipy.linalg import solve
+from ._optimize import _check_unknown_options
+from ._bglu_dense import LU
+from ._bglu_dense import BGLU as BGLU
+from ._linprog_util import _postsolve
+from ._optimize import OptimizeResult
+
+
+def _phase_one(A, b, x0, callback, postsolve_args, maxiter, tol, disp,
+               maxupdate, mast, pivot):
+    """
+    The purpose of phase one is to find an initial basic feasible solution
+    (BFS) to the original problem.
+
+    Generates an auxiliary problem with a trivial BFS and an objective that
+    minimizes infeasibility of the original problem. Solves the auxiliary
+    problem using the main simplex routine (phase two). This either yields
+    a BFS to the original problem or determines that the original problem is
+    infeasible. If feasible, phase one detects redundant rows in the original
+    constraint matrix and removes them, then chooses additional indices as
+    necessary to complete a basis/BFS for the original problem.
+    """
+
+    m, n = A.shape
+    status = 0
+
+    # generate auxiliary problem to get initial BFS
+    A, b, c, basis, x, status = _generate_auxiliary_problem(A, b, x0, tol)
+
+    if status == 6:
+        residual = c.dot(x)
+        iter_k = 0
+        return x, basis, A, b, residual, status, iter_k
+
+    # solve auxiliary problem
+    phase_one_n = n
+    iter_k = 0
+    x, basis, status, iter_k = _phase_two(c, A, x, basis, callback,
+                                          postsolve_args,
+                                          maxiter, tol, disp,
+                                          maxupdate, mast, pivot,
+                                          iter_k, phase_one_n)
+
+    # check for infeasibility
+    residual = c.dot(x)
+    if status == 0 and residual > tol:
+        status = 2
+
+    # drive artificial variables out of basis
+    # TODO: test redundant row removal better
+    # TODO: make solve more efficient with BGLU? This could take a while.
+    keep_rows = np.ones(m, dtype=bool)
+    for basis_column in basis[basis >= n]:
+        B = A[:, basis]
+        try:
+            basis_finder = np.abs(solve(B, A))  # inefficient
+            pertinent_row = np.argmax(basis_finder[:, basis_column])
+            eligible_columns = np.ones(n, dtype=bool)
+            eligible_columns[basis[basis < n]] = 0
+            eligible_column_indices = np.where(eligible_columns)[0]
+            index = np.argmax(basis_finder[:, :n]
+                              [pertinent_row, eligible_columns])
+            new_basis_column = eligible_column_indices[index]
+            if basis_finder[pertinent_row, new_basis_column] < tol:
+                keep_rows[pertinent_row] = False
+            else:
+                basis[basis == basis_column] = new_basis_column
+        except LinAlgError:
+            status = 4
+
+    # form solution to original problem
+    A = A[keep_rows, :n]
+    basis = basis[keep_rows]
+    x = x[:n]
+    m = A.shape[0]
+    return x, basis, A, b, residual, status, iter_k
+
+
+def _get_more_basis_columns(A, basis):
+    """
+    Called when the auxiliary problem terminates with artificial columns in
+    the basis, which must be removed and replaced with non-artificial
+    columns. Finds additional columns that do not make the matrix singular.
+    """
+    m, n = A.shape
+
+    # options for inclusion are those that aren't already in the basis
+    a = np.arange(m+n)
+    bl = np.zeros(len(a), dtype=bool)
+    bl[basis] = 1
+    options = a[~bl]
+    options = options[options < n]  # and they have to be non-artificial
+
+    # form basis matrix
+    B = np.zeros((m, m))
+    B[:, 0:len(basis)] = A[:, basis]
+
+    if (basis.size > 0 and
+            np.linalg.matrix_rank(B[:, :len(basis)]) < len(basis)):
+        raise Exception("Basis has dependent columns")
+
+    rank = 0  # just enter the loop
+    for i in range(n):  # somewhat arbitrary, but we need another way out
+        # permute the options, and take as many as needed
+        new_basis = np.random.permutation(options)[:m-len(basis)]
+        B[:, len(basis):] = A[:, new_basis]  # update the basis matrix
+        rank = np.linalg.matrix_rank(B)      # check the rank
+        if rank == m:
+            break
+
+    return np.concatenate((basis, new_basis))
+
+
+def _generate_auxiliary_problem(A, b, x0, tol):
+    """
+    Modifies original problem to create an auxiliary problem with a trivial
+    initial basic feasible solution and an objective that minimizes
+    infeasibility in the original problem.
+
+    Conceptually, this is done by stacking an identity matrix on the right of
+    the original constraint matrix, adding artificial variables to correspond
+    with each of these new columns, and generating a cost vector that is all
+    zeros except for ones corresponding with each of the new variables.
+
+    A initial basic feasible solution is trivial: all variables are zero
+    except for the artificial variables, which are set equal to the
+    corresponding element of the right hand side `b`.
+
+    Running the simplex method on this auxiliary problem drives all of the
+    artificial variables - and thus the cost - to zero if the original problem
+    is feasible. The original problem is declared infeasible otherwise.
+
+    Much of the complexity below is to improve efficiency by using singleton
+    columns in the original problem where possible, thus generating artificial
+    variables only as necessary, and using an initial 'guess' basic feasible
+    solution.
+    """
+    status = 0
+    m, n = A.shape
+
+    if x0 is not None:
+        x = x0
+    else:
+        x = np.zeros(n)
+
+    r = b - A@x  # residual; this must be all zeros for feasibility
+
+    A[r < 0] = -A[r < 0]  # express problem with RHS positive for trivial BFS
+    b[r < 0] = -b[r < 0]  # to the auxiliary problem
+    r[r < 0] *= -1
+
+    # Rows which we will need to find a trivial way to zero.
+    # This should just be the rows where there is a nonzero residual.
+    # But then we would not necessarily have a column singleton in every row.
+    # This makes it difficult to find an initial basis.
+    if x0 is None:
+        nonzero_constraints = np.arange(m)
+    else:
+        nonzero_constraints = np.where(r > tol)[0]
+
+    # these are (at least some of) the initial basis columns
+    basis = np.where(np.abs(x) > tol)[0]
+
+    if len(nonzero_constraints) == 0 and len(basis) <= m:  # already a BFS
+        c = np.zeros(n)
+        basis = _get_more_basis_columns(A, basis)
+        return A, b, c, basis, x, status
+    elif (len(nonzero_constraints) > m - len(basis) or
+          np.any(x < 0)):  # can't get trivial BFS
+        c = np.zeros(n)
+        status = 6
+        return A, b, c, basis, x, status
+
+    # chooses existing columns appropriate for inclusion in initial basis
+    cols, rows = _select_singleton_columns(A, r)
+
+    # find the rows we need to zero that we _can_ zero with column singletons
+    i_tofix = np.isin(rows, nonzero_constraints)
+    # these columns can't already be in the basis, though
+    # we are going to add them to the basis and change the corresponding x val
+    i_notinbasis = np.logical_not(np.isin(cols, basis))
+    i_fix_without_aux = np.logical_and(i_tofix, i_notinbasis)
+    rows = rows[i_fix_without_aux]
+    cols = cols[i_fix_without_aux]
+
+    # indices of the rows we can only zero with auxiliary variable
+    # these rows will get a one in each auxiliary column
+    arows = nonzero_constraints[np.logical_not(
+                                np.isin(nonzero_constraints, rows))]
+    n_aux = len(arows)
+    acols = n + np.arange(n_aux)          # indices of auxiliary columns
+
+    basis_ng = np.concatenate((cols, acols))   # basis columns not from guess
+    basis_ng_rows = np.concatenate((rows, arows))  # rows we need to zero
+
+    # add auxiliary singleton columns
+    A = np.hstack((A, np.zeros((m, n_aux))))
+    A[arows, acols] = 1
+
+    # generate initial BFS
+    x = np.concatenate((x, np.zeros(n_aux)))
+    x[basis_ng] = r[basis_ng_rows]/A[basis_ng_rows, basis_ng]
+
+    # generate costs to minimize infeasibility
+    c = np.zeros(n_aux + n)
+    c[acols] = 1
+
+    # basis columns correspond with nonzeros in guess, those with column
+    # singletons we used to zero remaining constraints, and any additional
+    # columns to get a full set (m columns)
+    basis = np.concatenate((basis, basis_ng))
+    basis = _get_more_basis_columns(A, basis)  # add columns as needed
+
+    return A, b, c, basis, x, status
+
+
+def _select_singleton_columns(A, b):
+    """
+    Finds singleton columns for which the singleton entry is of the same sign
+    as the right-hand side; these columns are eligible for inclusion in an
+    initial basis. Determines the rows in which the singleton entries are
+    located. For each of these rows, returns the indices of the one singleton
+    column and its corresponding row.
+    """
+    # find indices of all singleton columns and corresponding row indices
+    column_indices = np.nonzero(np.sum(np.abs(A) != 0, axis=0) == 1)[0]
+    columns = A[:, column_indices]          # array of singleton columns
+    row_indices = np.zeros(len(column_indices), dtype=int)
+    nonzero_rows, nonzero_columns = np.nonzero(columns)
+    row_indices[nonzero_columns] = nonzero_rows   # corresponding row indices
+
+    # keep only singletons with entries that have same sign as RHS
+    # this is necessary because all elements of BFS must be non-negative
+    same_sign = A[row_indices, column_indices]*b[row_indices] >= 0
+    column_indices = column_indices[same_sign][::-1]
+    row_indices = row_indices[same_sign][::-1]
+    # Reversing the order so that steps below select rightmost columns
+    # for initial basis, which will tend to be slack variables. (If the
+    # guess corresponds with a basic feasible solution but a constraint
+    # is not satisfied with the corresponding slack variable zero, the slack
+    # variable must be basic.)
+
+    # for each row, keep rightmost singleton column with an entry in that row
+    unique_row_indices, first_columns = np.unique(row_indices,
+                                                  return_index=True)
+    return column_indices[first_columns], unique_row_indices
+
+
+def _find_nonzero_rows(A, tol):
+    """
+    Returns logical array indicating the locations of rows with at least
+    one nonzero element.
+    """
+    return np.any(np.abs(A) > tol, axis=1)
+
+
+def _select_enter_pivot(c_hat, bl, a, rule="bland", tol=1e-12):
+    """
+    Selects a pivot to enter the basis. Currently Bland's rule - the smallest
+    index that has a negative reduced cost - is the default.
+    """
+    if rule.lower() == "mrc":  # index with minimum reduced cost
+        return a[~bl][np.argmin(c_hat)]
+    else:  # smallest index w/ negative reduced cost
+        return a[~bl][c_hat < -tol][0]
+
+
+def _display_iter(phase, iteration, slack, con, fun):
+    """
+    Print indicators of optimization status to the console.
+    """
+    header = True if not iteration % 20 else False
+
+    if header:
+        print("Phase",
+              "Iteration",
+              "Minimum Slack      ",
+              "Constraint Residual",
+              "Objective          ")
+
+    # := -tol):  # all reduced costs positive -> terminate
+            break
+
+        j = _select_enter_pivot(c_hat, bl, a, rule=pivot, tol=tol)
+        u = B.solve(A[:, j])        # similar to u = solve(B, A[:, j])
+
+        i = u > tol                 # if none of the u are positive, unbounded
+        if not np.any(i):
+            status = 3
+            break
+
+        th = xb[i]/u[i]
+        l = np.argmin(th)           # implicitly selects smallest subscript
+        th_star = th[l]             # step size
+
+        x[b] = x[b] - th_star*u     # take step
+        x[j] = th_star
+        B.update(ab[i][l], j)       # modify basis
+        b = B.b                     # similar to b[ab[i][l]] =
+
+    else:
+        # If the end of the for loop is reached (without a break statement),
+        # then another step has been taken, so the iteration counter should
+        # increment, info should be displayed, and callback should be called.
+        iteration += 1
+        status = 1
+        if disp or callback is not None:
+            _display_and_callback(phase_one_n, x, postsolve_args, status,
+                                  iteration, disp, callback)
+
+    return x, b, status, iteration
+
+
+def _linprog_rs(c, c0, A, b, x0, callback, postsolve_args,
+                maxiter=5000, tol=1e-12, disp=False,
+                maxupdate=10, mast=False, pivot="mrc",
+                **unknown_options):
+    """
+    Solve the following linear programming problem via a two-phase
+    revised simplex algorithm.::
+
+        minimize:     c @ x
+
+        subject to:  A @ x == b
+                     0 <= x < oo
+
+    User-facing documentation is in _linprog_doc.py.
+
+    Parameters
+    ----------
+    c : 1-D array
+        Coefficients of the linear objective function to be minimized.
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables. (Currently unused.)
+    A : 2-D array
+        2-D array which, when matrix-multiplied by ``x``, gives the values of
+        the equality constraints at ``x``.
+    b : 1-D array
+        1-D array of values representing the RHS of each equality constraint
+        (row) in ``A_eq``.
+    x0 : 1-D array, optional
+        Starting values of the independent variables, which will be refined by
+        the optimization algorithm. For the revised simplex method, these must
+        correspond with a basic feasible solution.
+    callback : callable, optional
+        If a callback function is provided, it will be called within each
+        iteration of the algorithm. The callback function must accept a single
+        `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+            x : 1-D array
+                Current solution vector.
+            fun : float
+                Current value of the objective function ``c @ x``.
+            success : bool
+                True only when an algorithm has completed successfully,
+                so this is always False as the callback function is called
+                only while the algorithm is still iterating.
+            slack : 1-D array
+                The values of the slack variables. Each slack variable
+                corresponds to an inequality constraint. If the slack is zero,
+                the corresponding constraint is active.
+            con : 1-D array
+                The (nominally zero) residuals of the equality constraints,
+                that is, ``b - A_eq @ x``.
+            phase : int
+                The phase of the algorithm being executed.
+            status : int
+                For revised simplex, this is always 0 because if a different
+                status is detected, the algorithm terminates.
+            nit : int
+                The number of iterations performed.
+            message : str
+                A string descriptor of the exit status of the optimization.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem.
+
+    Options
+    -------
+    maxiter : int
+       The maximum number of iterations to perform in either phase.
+    tol : float
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+    disp : bool
+        Set to ``True`` if indicators of optimization status are to be printed
+        to the console each iteration.
+    maxupdate : int
+        The maximum number of updates performed on the LU factorization.
+        After this many updates is reached, the basis matrix is factorized
+        from scratch.
+    mast : bool
+        Minimize Amortized Solve Time. If enabled, the average time to solve
+        a linear system using the basis factorization is measured. Typically,
+        the average solve time will decrease with each successive solve after
+        initial factorization, as factorization takes much more time than the
+        solve operation (and updates). Eventually, however, the updated
+        factorization becomes sufficiently complex that the average solve time
+        begins to increase. When this is detected, the basis is refactorized
+        from scratch. Enable this option to maximize speed at the risk of
+        nondeterministic behavior. Ignored if ``maxupdate`` is 0.
+    pivot : "mrc" or "bland"
+        Pivot rule: Minimum Reduced Cost (default) or Bland's rule. Choose
+        Bland's rule if iteration limit is reached and cycling is suspected.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    x : 1-D array
+        Solution vector.
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Numerical difficulties encountered
+         5 : No constraints; turn presolve on
+         6 : Guess x0 cannot be converted to a basic feasible solution
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+    iteration : int
+        The number of iterations taken to solve the problem.
+    """
+
+    _check_unknown_options(unknown_options)
+
+    messages = ["Optimization terminated successfully.",
+                "Iteration limit reached.",
+                "The problem appears infeasible, as the phase one auxiliary "
+                "problem terminated successfully with a residual of {0:.1e}, "
+                "greater than the tolerance {1} required for the solution to "
+                "be considered feasible. Consider increasing the tolerance to "
+                "be greater than {0:.1e}. If this tolerance is unacceptably "
+                "large, the problem is likely infeasible.",
+                "The problem is unbounded, as the simplex algorithm found "
+                "a basic feasible solution from which there is a direction "
+                "with negative reduced cost in which all decision variables "
+                "increase.",
+                "Numerical difficulties encountered; consider trying "
+                "method='interior-point'.",
+                "Problems with no constraints are trivially solved; please "
+                "turn presolve on.",
+                "The guess x0 cannot be converted to a basic feasible "
+                "solution. "
+                ]
+
+    if A.size == 0:  # address test_unbounded_below_no_presolve_corrected
+        return np.zeros(c.shape), 5, messages[5], 0
+
+    x, basis, A, b, residual, status, iteration = (
+        _phase_one(A, b, x0, callback, postsolve_args,
+                   maxiter, tol, disp, maxupdate, mast, pivot))
+
+    if status == 0:
+        x, basis, status, iteration = _phase_two(c, A, x, basis, callback,
+                                                 postsolve_args,
+                                                 maxiter, tol, disp,
+                                                 maxupdate, mast, pivot,
+                                                 iteration)
+
+    return x, status, messages[status].format(residual, tol), iteration
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_simplex.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_simplex.py
new file mode 100644
index 0000000000000000000000000000000000000000..c47806c9a595f756b9f86d268c5c146ea86c77c6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_simplex.py
@@ -0,0 +1,663 @@
+"""Simplex method for  linear programming
+
+The *simplex* method uses a traditional, full-tableau implementation of
+Dantzig's simplex algorithm [1]_, [2]_ (*not* the Nelder-Mead simplex).
+This algorithm is included for backwards compatibility and educational
+purposes.
+
+    .. versionadded:: 0.15.0
+
+Warnings
+--------
+
+The simplex method may encounter numerical difficulties when pivot
+values are close to the specified tolerance. If encountered try
+remove any redundant constraints, change the pivot strategy to Bland's
+rule or increase the tolerance value.
+
+Alternatively, more robust methods maybe be used. See
+:ref:`'interior-point' ` and
+:ref:`'revised simplex' `.
+
+References
+----------
+.. [1] Dantzig, George B., Linear programming and extensions. Rand
+       Corporation Research Study Princeton Univ. Press, Princeton, NJ,
+       1963
+.. [2] Hillier, S.H. and Lieberman, G.J. (1995), "Introduction to
+       Mathematical Programming", McGraw-Hill, Chapter 4.
+"""
+
+import numpy as np
+from warnings import warn
+from ._optimize import OptimizeResult, OptimizeWarning, _check_unknown_options
+from ._linprog_util import _postsolve
+
+
+def _pivot_col(T, tol=1e-9, bland=False):
+    """
+    Given a linear programming simplex tableau, determine the column
+    of the variable to enter the basis.
+
+    Parameters
+    ----------
+    T : 2-D array
+        A 2-D array representing the simplex tableau, T, corresponding to the
+        linear programming problem. It should have the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],    0]]
+
+        for a Phase 2 problem, or the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],   0],
+         [c'[0],  c'[1], ...,  c'[n_total],  0]]
+
+         for a Phase 1 problem (a problem in which a basic feasible solution is
+         sought prior to maximizing the actual objective. ``T`` is modified in
+         place by ``_solve_simplex``.
+    tol : float
+        Elements in the objective row larger than -tol will not be considered
+        for pivoting. Nominally this value is zero, but numerical issues
+        cause a tolerance about zero to be necessary.
+    bland : bool
+        If True, use Bland's rule for selection of the column (select the
+        first column with a negative coefficient in the objective row,
+        regardless of magnitude).
+
+    Returns
+    -------
+    status: bool
+        True if a suitable pivot column was found, otherwise False.
+        A return of False indicates that the linear programming simplex
+        algorithm is complete.
+    col: int
+        The index of the column of the pivot element.
+        If status is False, col will be returned as nan.
+    """
+    ma = np.ma.masked_where(T[-1, :-1] >= -tol, T[-1, :-1], copy=False)
+    if ma.count() == 0:
+        return False, np.nan
+    if bland:
+        # ma.mask is sometimes 0d
+        return True, np.nonzero(np.logical_not(np.atleast_1d(ma.mask)))[0][0]
+    return True, np.ma.nonzero(ma == ma.min())[0][0]
+
+
+def _pivot_row(T, basis, pivcol, phase, tol=1e-9, bland=False):
+    """
+    Given a linear programming simplex tableau, determine the row for the
+    pivot operation.
+
+    Parameters
+    ----------
+    T : 2-D array
+        A 2-D array representing the simplex tableau, T, corresponding to the
+        linear programming problem. It should have the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],    0]]
+
+        for a Phase 2 problem, or the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],   0],
+         [c'[0],  c'[1], ...,  c'[n_total],  0]]
+
+         for a Phase 1 problem (a Problem in which a basic feasible solution is
+         sought prior to maximizing the actual objective. ``T`` is modified in
+         place by ``_solve_simplex``.
+    basis : array
+        A list of the current basic variables.
+    pivcol : int
+        The index of the pivot column.
+    phase : int
+        The phase of the simplex algorithm (1 or 2).
+    tol : float
+        Elements in the pivot column smaller than tol will not be considered
+        for pivoting. Nominally this value is zero, but numerical issues
+        cause a tolerance about zero to be necessary.
+    bland : bool
+        If True, use Bland's rule for selection of the row (if more than one
+        row can be used, choose the one with the lowest variable index).
+
+    Returns
+    -------
+    status: bool
+        True if a suitable pivot row was found, otherwise False. A return
+        of False indicates that the linear programming problem is unbounded.
+    row: int
+        The index of the row of the pivot element. If status is False, row
+        will be returned as nan.
+    """
+    if phase == 1:
+        k = 2
+    else:
+        k = 1
+    ma = np.ma.masked_where(T[:-k, pivcol] <= tol, T[:-k, pivcol], copy=False)
+    if ma.count() == 0:
+        return False, np.nan
+    mb = np.ma.masked_where(T[:-k, pivcol] <= tol, T[:-k, -1], copy=False)
+    q = mb / ma
+    min_rows = np.ma.nonzero(q == q.min())[0]
+    if bland:
+        return True, min_rows[np.argmin(np.take(basis, min_rows))]
+    return True, min_rows[0]
+
+
+def _apply_pivot(T, basis, pivrow, pivcol, tol=1e-9):
+    """
+    Pivot the simplex tableau inplace on the element given by (pivrow, pivol).
+    The entering variable corresponds to the column given by pivcol forcing
+    the variable basis[pivrow] to leave the basis.
+
+    Parameters
+    ----------
+    T : 2-D array
+        A 2-D array representing the simplex tableau, T, corresponding to the
+        linear programming problem. It should have the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],    0]]
+
+        for a Phase 2 problem, or the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],   0],
+         [c'[0],  c'[1], ...,  c'[n_total],  0]]
+
+         for a Phase 1 problem (a problem in which a basic feasible solution is
+         sought prior to maximizing the actual objective. ``T`` is modified in
+         place by ``_solve_simplex``.
+    basis : 1-D array
+        An array of the indices of the basic variables, such that basis[i]
+        contains the column corresponding to the basic variable for row i.
+        Basis is modified in place by _apply_pivot.
+    pivrow : int
+        Row index of the pivot.
+    pivcol : int
+        Column index of the pivot.
+    """
+    basis[pivrow] = pivcol
+    pivval = T[pivrow, pivcol]
+    T[pivrow] = T[pivrow] / pivval
+    for irow in range(T.shape[0]):
+        if irow != pivrow:
+            T[irow] = T[irow] - T[pivrow] * T[irow, pivcol]
+
+    # The selected pivot should never lead to a pivot value less than the tol.
+    if np.isclose(pivval, tol, atol=0, rtol=1e4):
+        message = (
+            f"The pivot operation produces a pivot value of:{pivval: .1e}, "
+            "which is only slightly greater than the specified "
+            f"tolerance{tol: .1e}. This may lead to issues regarding the "
+            "numerical stability of the simplex method. "
+            "Removing redundant constraints, changing the pivot strategy "
+            "via Bland's rule or increasing the tolerance may "
+            "help reduce the issue.")
+        warn(message, OptimizeWarning, stacklevel=5)
+
+
+def _solve_simplex(T, n, basis, callback, postsolve_args,
+                   maxiter=1000, tol=1e-9, phase=2, bland=False, nit0=0,
+                   ):
+    """
+    Solve a linear programming problem in "standard form" using the Simplex
+    Method. Linear Programming is intended to solve the following problem form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    Parameters
+    ----------
+    T : 2-D array
+        A 2-D array representing the simplex tableau, T, corresponding to the
+        linear programming problem. It should have the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],    0]]
+
+        for a Phase 2 problem, or the form:
+
+        [[A[0, 0], A[0, 1], ..., A[0, n_total], b[0]],
+         [A[1, 0], A[1, 1], ..., A[1, n_total], b[1]],
+         .
+         .
+         .
+         [A[m, 0], A[m, 1], ..., A[m, n_total], b[m]],
+         [c[0],   c[1], ...,   c[n_total],   0],
+         [c'[0],  c'[1], ...,  c'[n_total],  0]]
+
+         for a Phase 1 problem (a problem in which a basic feasible solution is
+         sought prior to maximizing the actual objective. ``T`` is modified in
+         place by ``_solve_simplex``.
+    n : int
+        The number of true variables in the problem.
+    basis : 1-D array
+        An array of the indices of the basic variables, such that basis[i]
+        contains the column corresponding to the basic variable for row i.
+        Basis is modified in place by _solve_simplex
+    callback : callable, optional
+        If a callback function is provided, it will be called within each
+        iteration of the algorithm. The callback must accept a
+        `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+            x : 1-D array
+                Current solution vector
+            fun : float
+                Current value of the objective function
+            success : bool
+                True only when a phase has completed successfully. This
+                will be False for most iterations.
+            slack : 1-D array
+                The values of the slack variables. Each slack variable
+                corresponds to an inequality constraint. If the slack is zero,
+                the corresponding constraint is active.
+            con : 1-D array
+                The (nominally zero) residuals of the equality constraints,
+                that is, ``b - A_eq @ x``
+            phase : int
+                The phase of the optimization being executed. In phase 1 a basic
+                feasible solution is sought and the T has an additional row
+                representing an alternate objective function.
+            status : int
+                An integer representing the exit status of the optimization::
+
+                     0 : Optimization terminated successfully
+                     1 : Iteration limit reached
+                     2 : Problem appears to be infeasible
+                     3 : Problem appears to be unbounded
+                     4 : Serious numerical difficulties encountered
+
+            nit : int
+                The number of iterations performed.
+            message : str
+                A string descriptor of the exit status of the optimization.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem.
+    maxiter : int
+        The maximum number of iterations to perform before aborting the
+        optimization.
+    tol : float
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+    phase : int
+        The phase of the optimization being executed. In phase 1 a basic
+        feasible solution is sought and the T has an additional row
+        representing an alternate objective function.
+    bland : bool
+        If True, choose pivots using Bland's rule [3]_. In problems which
+        fail to converge due to cycling, using Bland's rule can provide
+        convergence at the expense of a less optimal path about the simplex.
+    nit0 : int
+        The initial iteration number used to keep an accurate iteration total
+        in a two-phase problem.
+
+    Returns
+    -------
+    nit : int
+        The number of iterations. Used to keep an accurate iteration total
+        in the two-phase problem.
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    """
+    nit = nit0
+    status = 0
+    message = ''
+    complete = False
+
+    if phase == 1:
+        m = T.shape[1]-2
+    elif phase == 2:
+        m = T.shape[1]-1
+    else:
+        raise ValueError("Argument 'phase' to _solve_simplex must be 1 or 2")
+
+    if phase == 2:
+        # Check if any artificial variables are still in the basis.
+        # If yes, check if any coefficients from this row and a column
+        # corresponding to one of the non-artificial variable is non-zero.
+        # If found, pivot at this term. If not, start phase 2.
+        # Do this for all artificial variables in the basis.
+        # Ref: "An Introduction to Linear Programming and Game Theory"
+        # by Paul R. Thie, Gerard E. Keough, 3rd Ed,
+        # Chapter 3.7 Redundant Systems (pag 102)
+        for pivrow in [row for row in range(basis.size)
+                       if basis[row] > T.shape[1] - 2]:
+            non_zero_row = [col for col in range(T.shape[1] - 1)
+                            if abs(T[pivrow, col]) > tol]
+            if len(non_zero_row) > 0:
+                pivcol = non_zero_row[0]
+                _apply_pivot(T, basis, pivrow, pivcol, tol)
+                nit += 1
+
+    if len(basis[:m]) == 0:
+        solution = np.empty(T.shape[1] - 1, dtype=np.float64)
+    else:
+        solution = np.empty(max(T.shape[1] - 1, max(basis[:m]) + 1),
+                            dtype=np.float64)
+
+    while not complete:
+        # Find the pivot column
+        pivcol_found, pivcol = _pivot_col(T, tol, bland)
+        if not pivcol_found:
+            pivcol = np.nan
+            pivrow = np.nan
+            status = 0
+            complete = True
+        else:
+            # Find the pivot row
+            pivrow_found, pivrow = _pivot_row(T, basis, pivcol, phase, tol, bland)
+            if not pivrow_found:
+                status = 3
+                complete = True
+
+        if callback is not None:
+            solution[:] = 0
+            solution[basis[:n]] = T[:n, -1]
+            x = solution[:m]
+            x, fun, slack, con = _postsolve(
+                x, postsolve_args
+            )
+            res = OptimizeResult({
+                'x': x,
+                'fun': fun,
+                'slack': slack,
+                'con': con,
+                'status': status,
+                'message': message,
+                'nit': nit,
+                'success': status == 0 and complete,
+                'phase': phase,
+                'complete': complete,
+                })
+            callback(res)
+
+        if not complete:
+            if nit >= maxiter:
+                # Iteration limit exceeded
+                status = 1
+                complete = True
+            else:
+                _apply_pivot(T, basis, pivrow, pivcol, tol)
+                nit += 1
+    return nit, status
+
+
+def _linprog_simplex(c, c0, A, b, callback, postsolve_args,
+                     maxiter=1000, tol=1e-9, disp=False, bland=False,
+                     **unknown_options):
+    """
+    Minimize a linear objective function subject to linear equality and
+    non-negativity constraints using the two phase simplex method.
+    Linear programming is intended to solve problems of the following form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    User-facing documentation is in _linprog_doc.py.
+
+    Parameters
+    ----------
+    c : 1-D array
+        Coefficients of the linear objective function to be minimized.
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables. (Purely for display.)
+    A : 2-D array
+        2-D array such that ``A @ x``, gives the values of the equality
+        constraints at ``x``.
+    b : 1-D array
+        1-D array of values representing the right hand side of each equality
+        constraint (row) in ``A``.
+    callback : callable, optional
+        If a callback function is provided, it will be called within each
+        iteration of the algorithm. The callback function must accept a single
+        `scipy.optimize.OptimizeResult` consisting of the following fields:
+
+            x : 1-D array
+                Current solution vector
+            fun : float
+                Current value of the objective function
+            success : bool
+                True when an algorithm has completed successfully.
+            slack : 1-D array
+                The values of the slack variables. Each slack variable
+                corresponds to an inequality constraint. If the slack is zero,
+                the corresponding constraint is active.
+            con : 1-D array
+                The (nominally zero) residuals of the equality constraints,
+                that is, ``b - A_eq @ x``
+            phase : int
+                The phase of the algorithm being executed.
+            status : int
+                An integer representing the status of the optimization::
+
+                     0 : Algorithm proceeding nominally
+                     1 : Iteration limit reached
+                     2 : Problem appears to be infeasible
+                     3 : Problem appears to be unbounded
+                     4 : Serious numerical difficulties encountered
+            nit : int
+                The number of iterations performed.
+            message : str
+                A string descriptor of the exit status of the optimization.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem.
+
+    Options
+    -------
+    maxiter : int
+       The maximum number of iterations to perform.
+    disp : bool
+        If True, print exit status message to sys.stdout
+    tol : float
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+    bland : bool
+        If True, use Bland's anti-cycling rule [3]_ to choose pivots to
+        prevent cycling. If False, choose pivots which should lead to a
+        converged solution more quickly. The latter method is subject to
+        cycling (non-convergence) in rare instances.
+    unknown_options : dict
+        Optional arguments not used by this particular solver. If
+        `unknown_options` is non-empty a warning is issued listing all
+        unused options.
+
+    Returns
+    -------
+    x : 1-D array
+        Solution vector.
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+    iteration : int
+        The number of iterations taken to solve the problem.
+
+    References
+    ----------
+    .. [1] Dantzig, George B., Linear programming and extensions. Rand
+           Corporation Research Study Princeton Univ. Press, Princeton, NJ,
+           1963
+    .. [2] Hillier, S.H. and Lieberman, G.J. (1995), "Introduction to
+           Mathematical Programming", McGraw-Hill, Chapter 4.
+    .. [3] Bland, Robert G. New finite pivoting rules for the simplex method.
+           Mathematics of Operations Research (2), 1977: pp. 103-107.
+
+
+    Notes
+    -----
+    The expected problem formulation differs between the top level ``linprog``
+    module and the method specific solvers. The method specific solvers expect a
+    problem in standard form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    Whereas the top level ``linprog`` module expects a problem of form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+         lb <= x <= ub
+
+    where ``lb = 0`` and ``ub = None`` unless set in ``bounds``.
+
+    The original problem contains equality, upper-bound and variable constraints
+    whereas the method specific solver requires equality constraints and
+    variable non-negativity.
+
+    ``linprog`` module converts the original problem to standard form by
+    converting the simple bounds to upper bound constraints, introducing
+    non-negative slack variables for inequality constraints, and expressing
+    unbounded variables as the difference between two non-negative variables.
+    """
+    _check_unknown_options(unknown_options)
+
+    status = 0
+    messages = {0: "Optimization terminated successfully.",
+                1: "Iteration limit reached.",
+                2: "Optimization failed. Unable to find a feasible"
+                   " starting point.",
+                3: "Optimization failed. The problem appears to be unbounded.",
+                4: "Optimization failed. Singular matrix encountered."}
+
+    n, m = A.shape
+
+    # All constraints must have b >= 0.
+    is_negative_constraint = np.less(b, 0)
+    A[is_negative_constraint] *= -1
+    b[is_negative_constraint] *= -1
+
+    # As all constraints are equality constraints the artificial variables
+    # will also be basic variables.
+    av = np.arange(n) + m
+    basis = av.copy()
+
+    # Format the phase one tableau by adding artificial variables and stacking
+    # the constraints, the objective row and pseudo-objective row.
+    row_constraints = np.hstack((A, np.eye(n), b[:, np.newaxis]))
+    row_objective = np.hstack((c, np.zeros(n), c0))
+    row_pseudo_objective = -row_constraints.sum(axis=0)
+    row_pseudo_objective[av] = 0
+    T = np.vstack((row_constraints, row_objective, row_pseudo_objective))
+
+    nit1, status = _solve_simplex(T, n, basis, callback=callback,
+                                  postsolve_args=postsolve_args,
+                                  maxiter=maxiter, tol=tol, phase=1,
+                                  bland=bland
+                                  )
+    # if pseudo objective is zero, remove the last row from the tableau and
+    # proceed to phase 2
+    nit2 = nit1
+    if abs(T[-1, -1]) < tol:
+        # Remove the pseudo-objective row from the tableau
+        T = T[:-1, :]
+        # Remove the artificial variable columns from the tableau
+        T = np.delete(T, av, 1)
+    else:
+        # Failure to find a feasible starting point
+        status = 2
+        messages[status] = (
+            "Phase 1 of the simplex method failed to find a feasible "
+            "solution. The pseudo-objective function evaluates to "
+            f"{abs(T[-1, -1]):.1e} "
+            f"which exceeds the required tolerance of {tol} for a solution to be "
+            "considered 'close enough' to zero to be a basic solution. "
+            "Consider increasing the tolerance to be greater than "
+            f"{abs(T[-1, -1]):.1e}. "
+            "If this tolerance is unacceptably large the problem may be "
+            "infeasible."
+        )
+
+    if status == 0:
+        # Phase 2
+        nit2, status = _solve_simplex(T, n, basis, callback=callback,
+                                      postsolve_args=postsolve_args,
+                                      maxiter=maxiter, tol=tol, phase=2,
+                                      bland=bland, nit0=nit1
+                                      )
+
+    solution = np.zeros(n + m)
+    solution[basis[:n]] = T[:n, -1]
+    x = solution[:m]
+
+    return x, status, messages[status], int(nit2)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_util.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_util.py
new file mode 100644
index 0000000000000000000000000000000000000000..405ff0feee7116712a6b0897e2f956a6e8a1760f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_linprog_util.py
@@ -0,0 +1,1523 @@
+"""
+Method agnostic utility functions for linear programming
+"""
+
+import numpy as np
+import scipy.sparse as sps
+from warnings import warn
+from ._optimize import OptimizeWarning
+from scipy.optimize._remove_redundancy import (
+    _remove_redundancy_svd, _remove_redundancy_pivot_sparse,
+    _remove_redundancy_pivot_dense, _remove_redundancy_id
+    )
+from collections import namedtuple
+
+_LPProblem = namedtuple('_LPProblem',
+                        'c A_ub b_ub A_eq b_eq bounds x0 integrality')
+_LPProblem.__new__.__defaults__ = (None,) * 7  # make c the only required arg
+_LPProblem.__doc__ = \
+    """ Represents a linear-programming problem.
+
+    Attributes
+    ----------
+    c : 1D array
+        The coefficients of the linear objective function to be minimized.
+    A_ub : 2D array, optional
+        The inequality constraint matrix. Each row of ``A_ub`` specifies the
+        coefficients of a linear inequality constraint on ``x``.
+    b_ub : 1D array, optional
+        The inequality constraint vector. Each element represents an
+        upper bound on the corresponding value of ``A_ub @ x``.
+    A_eq : 2D array, optional
+        The equality constraint matrix. Each row of ``A_eq`` specifies the
+        coefficients of a linear equality constraint on ``x``.
+    b_eq : 1D array, optional
+        The equality constraint vector. Each element of ``A_eq @ x`` must equal
+        the corresponding element of ``b_eq``.
+    bounds : various valid formats, optional
+        The bounds of ``x``, as ``min`` and ``max`` pairs.
+        If bounds are specified for all N variables separately, valid formats
+        are:
+        * a 2D array (N x 2);
+        * a sequence of N sequences, each with 2 values.
+        If all variables have the same bounds, the bounds can be specified as
+        a 1-D or 2-D array or sequence with 2 scalar values.
+        If all variables have a lower bound of 0 and no upper bound, the bounds
+        parameter can be omitted (or given as None).
+        Absent lower and/or upper bounds can be specified as -numpy.inf (no
+        lower bound), numpy.inf (no upper bound) or None (both).
+    x0 : 1D array, optional
+        Guess values of the decision variables, which will be refined by
+        the optimization algorithm. This argument is currently used only by the
+        'revised simplex' method, and can only be used if `x0` represents a
+        basic feasible solution.
+    integrality : 1-D array or int, optional
+        Indicates the type of integrality constraint on each decision variable.
+
+        ``0`` : Continuous variable; no integrality constraint.
+
+        ``1`` : Integer variable; decision variable must be an integer
+        within `bounds`.
+
+        ``2`` : Semi-continuous variable; decision variable must be within
+        `bounds` or take value ``0``.
+
+        ``3`` : Semi-integer variable; decision variable must be an integer
+        within `bounds` or take value ``0``.
+
+        By default, all variables are continuous.
+
+        For mixed integrality constraints, supply an array of shape `c.shape`.
+        To infer a constraint on each decision variable from shorter inputs,
+        the argument will be broadcast to `c.shape` using `np.broadcast_to`.
+
+        This argument is currently used only by the ``'highs'`` method and
+        ignored otherwise.
+
+    Notes
+    -----
+    This namedtuple supports 2 ways of initialization:
+    >>> lp1 = _LPProblem(c=[-1, 4], A_ub=[[-3, 1], [1, 2]], b_ub=[6, 4])
+    >>> lp2 = _LPProblem([-1, 4], [[-3, 1], [1, 2]], [6, 4])
+
+    Note that only ``c`` is a required argument here, whereas all other arguments
+    ``A_ub``, ``b_ub``, ``A_eq``, ``b_eq``, ``bounds``, ``x0`` are optional with
+    default values of None.
+    For example, ``A_eq`` and ``b_eq`` can be set without ``A_ub`` or ``b_ub``:
+    >>> lp3 = _LPProblem(c=[-1, 4], A_eq=[[2, 1]], b_eq=[10])
+    """
+
+
+def _check_sparse_inputs(options, meth, A_ub, A_eq):
+    """
+    Check the provided ``A_ub`` and ``A_eq`` matrices conform to the specified
+    optional sparsity variables.
+
+    Parameters
+    ----------
+    A_ub : 2-D array, optional
+        2-D array such that ``A_ub @ x`` gives the values of the upper-bound
+        inequality constraints at ``x``.
+    A_eq : 2-D array, optional
+        2-D array such that ``A_eq @ x`` gives the values of the equality
+        constraints at ``x``.
+    options : dict
+        A dictionary of solver options. All methods accept the following
+        generic options:
+
+            maxiter : int
+                Maximum number of iterations to perform.
+            disp : bool
+                Set to True to print convergence messages.
+
+        For method-specific options, see :func:`show_options('linprog')`.
+    method : str, optional
+        The algorithm used to solve the standard form problem.
+
+    Returns
+    -------
+    A_ub : 2-D array, optional
+        2-D array such that ``A_ub @ x`` gives the values of the upper-bound
+        inequality constraints at ``x``.
+    A_eq : 2-D array, optional
+        2-D array such that ``A_eq @ x`` gives the values of the equality
+        constraints at ``x``.
+    options : dict
+        A dictionary of solver options. All methods accept the following
+        generic options:
+
+            maxiter : int
+                Maximum number of iterations to perform.
+            disp : bool
+                Set to True to print convergence messages.
+
+        For method-specific options, see :func:`show_options('linprog')`.
+    """
+    # This is an undocumented option for unit testing sparse presolve
+    _sparse_presolve = options.pop('_sparse_presolve', False)
+    if _sparse_presolve and A_eq is not None:
+        A_eq = sps.coo_matrix(A_eq)
+    if _sparse_presolve and A_ub is not None:
+        A_ub = sps.coo_matrix(A_ub)
+
+    sparse_constraint = sps.issparse(A_eq) or sps.issparse(A_ub)
+
+    preferred_methods = {"highs", "highs-ds", "highs-ipm"}
+    dense_methods = {"simplex", "revised simplex"}
+    if meth in dense_methods and sparse_constraint:
+        raise ValueError(f"Method '{meth}' does not support sparse "
+                         "constraint matrices. Please consider using one of "
+                         f"{preferred_methods}.")
+
+    sparse = options.get('sparse', False)
+    if not sparse and sparse_constraint and meth == 'interior-point':
+        options['sparse'] = True
+        warn("Sparse constraint matrix detected; setting 'sparse':True.",
+             OptimizeWarning, stacklevel=4)
+    return options, A_ub, A_eq
+
+
+def _format_A_constraints(A, n_x, sparse_lhs=False):
+    """Format the left hand side of the constraints to a 2-D array
+
+    Parameters
+    ----------
+    A : 2-D array
+        2-D array such that ``A @ x`` gives the values of the upper-bound
+        (in)equality constraints at ``x``.
+    n_x : int
+        The number of variables in the linear programming problem.
+    sparse_lhs : bool
+        Whether either of `A_ub` or `A_eq` are sparse. If true return a
+        coo_matrix instead of a numpy array.
+
+    Returns
+    -------
+    np.ndarray or sparse.coo_matrix
+        2-D array such that ``A @ x`` gives the values of the upper-bound
+        (in)equality constraints at ``x``.
+
+    """
+    if sparse_lhs:
+        return sps.coo_matrix(
+            (0, n_x) if A is None else A, dtype=float, copy=True
+        )
+    elif A is None:
+        return np.zeros((0, n_x), dtype=float)
+    else:
+        return np.array(A, dtype=float, copy=True)
+
+
+def _format_b_constraints(b):
+    """Format the upper bounds of the constraints to a 1-D array
+
+    Parameters
+    ----------
+    b : 1-D array
+        1-D array of values representing the upper-bound of each (in)equality
+        constraint (row) in ``A``.
+
+    Returns
+    -------
+    1-D np.array
+        1-D array of values representing the upper-bound of each (in)equality
+        constraint (row) in ``A``.
+
+    """
+    if b is None:
+        return np.array([], dtype=float)
+    b = np.array(b, dtype=float, copy=True).squeeze()
+    return b if b.size != 1 else b.reshape(-1)
+
+
+def _clean_inputs(lp):
+    """
+    Given user inputs for a linear programming problem, return the
+    objective vector, upper bound constraints, equality constraints,
+    and simple bounds in a preferred format.
+
+    Parameters
+    ----------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : various valid formats, optional
+            The bounds of ``x``, as ``min`` and ``max`` pairs.
+            If bounds are specified for all N variables separately, valid formats are:
+            * a 2D array (2 x N or N x 2);
+            * a sequence of N sequences, each with 2 values.
+            If all variables have the same bounds, a single pair of values can
+            be specified. Valid formats are:
+            * a sequence with 2 scalar values;
+            * a sequence with a single element containing 2 scalar values.
+            If all variables have a lower bound of 0 and no upper bound, the bounds
+            parameter can be omitted (or given as None).
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    Returns
+    -------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, as ``min`` and ``max`` pairs, one for each of the N
+            elements of ``x``. The N x 2 array contains lower bounds in the first
+            column and upper bounds in the 2nd. Unbounded variables have lower
+            bound -np.inf and/or upper bound np.inf.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    """
+    c, A_ub, b_ub, A_eq, b_eq, bounds, x0, integrality = lp
+
+    if c is None:
+        raise TypeError
+
+    try:
+        c = np.array(c, dtype=np.float64, copy=True).squeeze()
+    except ValueError as e:
+        raise TypeError(
+            "Invalid input for linprog: c must be a 1-D array of numerical "
+            "coefficients") from e
+    else:
+        # If c is a single value, convert it to a 1-D array.
+        if c.size == 1:
+            c = c.reshape(-1)
+
+        n_x = len(c)
+        if n_x == 0 or len(c.shape) != 1:
+            raise ValueError(
+                "Invalid input for linprog: c must be a 1-D array and must "
+                "not have more than one non-singleton dimension")
+        if not np.isfinite(c).all():
+            raise ValueError(
+                "Invalid input for linprog: c must not contain values "
+                "inf, nan, or None")
+
+    sparse_lhs = sps.issparse(A_eq) or sps.issparse(A_ub)
+    try:
+        A_ub = _format_A_constraints(A_ub, n_x, sparse_lhs=sparse_lhs)
+    except ValueError as e:
+        raise TypeError(
+            "Invalid input for linprog: A_ub must be a 2-D array "
+            "of numerical values") from e
+    else:
+        n_ub = A_ub.shape[0]
+        if len(A_ub.shape) != 2 or A_ub.shape[1] != n_x:
+            raise ValueError(
+                "Invalid input for linprog: A_ub must have exactly two "
+                "dimensions, and the number of columns in A_ub must be "
+                "equal to the size of c")
+        if (sps.issparse(A_ub) and not np.isfinite(A_ub.data).all()
+                or not sps.issparse(A_ub) and not np.isfinite(A_ub).all()):
+            raise ValueError(
+                "Invalid input for linprog: A_ub must not contain values "
+                "inf, nan, or None")
+
+    try:
+        b_ub = _format_b_constraints(b_ub)
+    except ValueError as e:
+        raise TypeError(
+            "Invalid input for linprog: b_ub must be a 1-D array of "
+            "numerical values, each representing the upper bound of an "
+            "inequality constraint (row) in A_ub") from e
+    else:
+        if b_ub.shape != (n_ub,):
+            raise ValueError(
+                "Invalid input for linprog: b_ub must be a 1-D array; b_ub "
+                "must not have more than one non-singleton dimension and "
+                "the number of rows in A_ub must equal the number of values "
+                "in b_ub")
+        if not np.isfinite(b_ub).all():
+            raise ValueError(
+                "Invalid input for linprog: b_ub must not contain values "
+                "inf, nan, or None")
+
+    try:
+        A_eq = _format_A_constraints(A_eq, n_x, sparse_lhs=sparse_lhs)
+    except ValueError as e:
+        raise TypeError(
+            "Invalid input for linprog: A_eq must be a 2-D array "
+            "of numerical values") from e
+    else:
+        n_eq = A_eq.shape[0]
+        if len(A_eq.shape) != 2 or A_eq.shape[1] != n_x:
+            raise ValueError(
+                "Invalid input for linprog: A_eq must have exactly two "
+                "dimensions, and the number of columns in A_eq must be "
+                "equal to the size of c")
+
+        if (sps.issparse(A_eq) and not np.isfinite(A_eq.data).all()
+                or not sps.issparse(A_eq) and not np.isfinite(A_eq).all()):
+            raise ValueError(
+                "Invalid input for linprog: A_eq must not contain values "
+                "inf, nan, or None")
+
+    try:
+        b_eq = _format_b_constraints(b_eq)
+    except ValueError as e:
+        raise TypeError(
+            "Invalid input for linprog: b_eq must be a dense, 1-D array of "
+            "numerical values, each representing the right hand side of an "
+            "equality constraint (row) in A_eq") from e
+    else:
+        if b_eq.shape != (n_eq,):
+            raise ValueError(
+                "Invalid input for linprog: b_eq must be a 1-D array; b_eq "
+                "must not have more than one non-singleton dimension and "
+                "the number of rows in A_eq must equal the number of values "
+                "in b_eq")
+        if not np.isfinite(b_eq).all():
+            raise ValueError(
+                "Invalid input for linprog: b_eq must not contain values "
+                "inf, nan, or None")
+
+    # x0 gives a (optional) starting solution to the solver. If x0 is None,
+    # skip the checks. Initial solution will be generated automatically.
+    if x0 is not None:
+        try:
+            x0 = np.array(x0, dtype=float, copy=True).squeeze()
+        except ValueError as e:
+            raise TypeError(
+                "Invalid input for linprog: x0 must be a 1-D array of "
+                "numerical coefficients") from e
+        if x0.ndim == 0:
+            x0 = x0.reshape(-1)
+        if len(x0) == 0 or x0.ndim != 1:
+            raise ValueError(
+                "Invalid input for linprog: x0 should be a 1-D array; it "
+                "must not have more than one non-singleton dimension")
+        if not x0.size == c.size:
+            raise ValueError(
+                "Invalid input for linprog: x0 and c should contain the "
+                "same number of elements")
+        if not np.isfinite(x0).all():
+            raise ValueError(
+                "Invalid input for linprog: x0 must not contain values "
+                "inf, nan, or None")
+
+    # Bounds can be one of these formats:
+    # (1) a 2-D array or sequence, with shape N x 2
+    # (2) a 1-D or 2-D sequence or array with 2 scalars
+    # (3) None (or an empty sequence or array)
+    # Unspecified bounds can be represented by None or (-)np.inf.
+    # All formats are converted into a N x 2 np.array with (-)np.inf where
+    # bounds are unspecified.
+
+    # Prepare clean bounds array
+    bounds_clean = np.zeros((n_x, 2), dtype=float)
+
+    # Convert to a numpy array.
+    # np.array(..,dtype=float) raises an error if dimensions are inconsistent
+    # or if there are invalid data types in bounds. Just add a linprog prefix
+    # to the error and re-raise.
+    # Creating at least a 2-D array simplifies the cases to distinguish below.
+    if bounds is None or np.array_equal(bounds, []) or np.array_equal(bounds, [[]]):
+        bounds = (0, np.inf)
+    try:
+        bounds_conv = np.atleast_2d(np.array(bounds, dtype=float))
+    except ValueError as e:
+        raise ValueError(
+            "Invalid input for linprog: unable to interpret bounds, "
+            "check values and dimensions: " + e.args[0]) from e
+    except TypeError as e:
+        raise TypeError(
+            "Invalid input for linprog: unable to interpret bounds, "
+            "check values and dimensions: " + e.args[0]) from e
+
+    # Check bounds options
+    bsh = bounds_conv.shape
+    if len(bsh) > 2:
+        # Do not try to handle multidimensional bounds input
+        raise ValueError(
+            "Invalid input for linprog: provide a 2-D array for bounds, "
+            f"not a {len(bsh):d}-D array.")
+    elif np.all(bsh == (n_x, 2)):
+        # Regular N x 2 array
+        bounds_clean = bounds_conv
+    elif (np.all(bsh == (2, 1)) or np.all(bsh == (1, 2))):
+        # 2 values: interpret as overall lower and upper bound
+        bounds_flat = bounds_conv.flatten()
+        bounds_clean[:, 0] = bounds_flat[0]
+        bounds_clean[:, 1] = bounds_flat[1]
+    elif np.all(bsh == (2, n_x)):
+        # Reject a 2 x N array
+        raise ValueError(
+            f"Invalid input for linprog: provide a {n_x:d} x 2 array for bounds, "
+            f"not a 2 x {n_x:d} array.")
+    else:
+        raise ValueError(
+            "Invalid input for linprog: unable to interpret bounds with this "
+            f"dimension tuple: {bsh}.")
+
+    # The process above creates nan-s where the input specified None
+    # Convert the nan-s in the 1st column to -np.inf and in the 2nd column
+    # to np.inf
+    i_none = np.isnan(bounds_clean[:, 0])
+    bounds_clean[i_none, 0] = -np.inf
+    i_none = np.isnan(bounds_clean[:, 1])
+    bounds_clean[i_none, 1] = np.inf
+
+    return _LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds_clean, x0, integrality)
+
+
+def _presolve(lp, rr, rr_method, tol=1e-9):
+    """
+    Given inputs for a linear programming problem in preferred format,
+    presolve the problem: identify trivial infeasibilities, redundancies,
+    and unboundedness, tighten bounds where possible, and eliminate fixed
+    variables.
+
+    Parameters
+    ----------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, as ``min`` and ``max`` pairs, one for each of the N
+            elements of ``x``. The N x 2 array contains lower bounds in the first
+            column and upper bounds in the 2nd. Unbounded variables have lower
+            bound -np.inf and/or upper bound np.inf.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    rr : bool
+        If ``True`` attempts to eliminate any redundant rows in ``A_eq``.
+        Set False if ``A_eq`` is known to be of full row rank, or if you are
+        looking for a potential speedup (at the expense of reliability).
+    rr_method : string
+        Method used to identify and remove redundant rows from the
+        equality constraint matrix after presolve.
+    tol : float
+        The tolerance which determines when a solution is "close enough" to
+        zero in Phase 1 to be considered a basic feasible solution or close
+        enough to positive to serve as an optimal solution.
+
+    Returns
+    -------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, as ``min`` and ``max`` pairs, possibly tightened.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    c0 : 1D array
+        Constant term in objective function due to fixed (and eliminated)
+        variables.
+    x : 1D array
+        Solution vector (when the solution is trivial and can be determined
+        in presolve)
+    revstack: list of functions
+        the functions in the list reverse the operations of _presolve()
+        the function signature is x_org = f(x_mod), where x_mod is the result
+        of a presolve step and x_org the value at the start of the step
+        (currently, the revstack contains only one function)
+    complete: bool
+        Whether the solution is complete (solved or determined to be infeasible
+        or unbounded in presolve)
+    status : int
+        An integer representing the exit status of the optimization::
+
+         0 : Optimization terminated successfully
+         1 : Iteration limit reached
+         2 : Problem appears to be infeasible
+         3 : Problem appears to be unbounded
+         4 : Serious numerical difficulties encountered
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    References
+    ----------
+    .. [5] Andersen, Erling D. "Finding all linearly dependent rows in
+           large-scale linear programming." Optimization Methods and Software
+           6.3 (1995): 219-227.
+    .. [8] Andersen, Erling D., and Knud D. Andersen. "Presolving in linear
+           programming." Mathematical Programming 71.2 (1995): 221-245.
+
+    """
+    # ideas from Reference [5] by Andersen and Andersen
+    # however, unlike the reference, this is performed before converting
+    # problem to standard form
+    # There are a few advantages:
+    #  * artificial variables have not been added, so matrices are smaller
+    #  * bounds have not been converted to constraints yet. (It is better to
+    #    do that after presolve because presolve may adjust the simple bounds.)
+    # There are many improvements that can be made, namely:
+    #  * implement remaining checks from [5]
+    #  * loop presolve until no additional changes are made
+    #  * implement additional efficiency improvements in redundancy removal [2]
+
+    c, A_ub, b_ub, A_eq, b_eq, bounds, x0, _ = lp
+
+    revstack = []               # record of variables eliminated from problem
+    # constant term in cost function may be added if variables are eliminated
+    c0 = 0
+    complete = False        # complete is True if detected infeasible/unbounded
+    x = np.zeros(c.shape)   # this is solution vector if completed in presolve
+
+    status = 0              # all OK unless determined otherwise
+    message = ""
+
+    # Lower and upper bounds. Copy to prevent feedback.
+    lb = bounds[:, 0].copy()
+    ub = bounds[:, 1].copy()
+
+    m_eq, n = A_eq.shape
+    m_ub, n = A_ub.shape
+
+    if (rr_method is not None
+            and rr_method.lower() not in {"svd", "pivot", "id"}):
+        message = ("'" + str(rr_method) + "' is not a valid option "
+                   "for redundancy removal. Valid options are 'SVD', "
+                   "'pivot', and 'ID'.")
+        raise ValueError(message)
+
+    if sps.issparse(A_eq):
+        A_eq = A_eq.tocsr()
+        A_ub = A_ub.tocsr()
+
+        def where(A):
+            return A.nonzero()
+
+        vstack = sps.vstack
+    else:
+        where = np.where
+        vstack = np.vstack
+
+    # upper bounds > lower bounds
+    if np.any(ub < lb) or np.any(lb == np.inf) or np.any(ub == -np.inf):
+        status = 2
+        message = ("The problem is (trivially) infeasible since one "
+                   "or more upper bounds are smaller than the corresponding "
+                   "lower bounds, a lower bound is np.inf or an upper bound "
+                   "is -np.inf.")
+        complete = True
+        return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                c0, x, revstack, complete, status, message)
+
+    # zero row in equality constraints
+    zero_row = np.array(np.sum(A_eq != 0, axis=1) == 0).flatten()
+    if np.any(zero_row):
+        if np.any(
+            np.logical_and(
+                zero_row,
+                np.abs(b_eq) > tol)):  # test_zero_row_1
+            # infeasible if RHS is not zero
+            status = 2
+            message = ("The problem is (trivially) infeasible due to a row "
+                       "of zeros in the equality constraint matrix with a "
+                       "nonzero corresponding constraint value.")
+            complete = True
+            return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                    c0, x, revstack, complete, status, message)
+        else:  # test_zero_row_2
+            # if RHS is zero, we can eliminate this equation entirely
+            A_eq = A_eq[np.logical_not(zero_row), :]
+            b_eq = b_eq[np.logical_not(zero_row)]
+
+    # zero row in inequality constraints
+    zero_row = np.array(np.sum(A_ub != 0, axis=1) == 0).flatten()
+    if np.any(zero_row):
+        if np.any(np.logical_and(zero_row, b_ub < -tol)):  # test_zero_row_1
+            # infeasible if RHS is less than zero (because LHS is zero)
+            status = 2
+            message = ("The problem is (trivially) infeasible due to a row "
+                       "of zeros in the equality constraint matrix with a "
+                       "nonzero corresponding  constraint value.")
+            complete = True
+            return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                    c0, x, revstack, complete, status, message)
+        else:  # test_zero_row_2
+            # if LHS is >= 0, we can eliminate this constraint entirely
+            A_ub = A_ub[np.logical_not(zero_row), :]
+            b_ub = b_ub[np.logical_not(zero_row)]
+
+    # zero column in (both) constraints
+    # this indicates that a variable isn't constrained and can be removed
+    A = vstack((A_eq, A_ub))
+    if A.shape[0] > 0:
+        zero_col = np.array(np.sum(A != 0, axis=0) == 0).flatten()
+        # variable will be at upper or lower bound, depending on objective
+        x[np.logical_and(zero_col, c < 0)] = ub[
+            np.logical_and(zero_col, c < 0)]
+        x[np.logical_and(zero_col, c > 0)] = lb[
+            np.logical_and(zero_col, c > 0)]
+        if np.any(np.isinf(x)):  # if an unconstrained variable has no bound
+            status = 3
+            message = ("If feasible, the problem is (trivially) unbounded "
+                       "due  to a zero column in the constraint matrices. If "
+                       "you wish to check whether the problem is infeasible, "
+                       "turn presolve off.")
+            complete = True
+            return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                    c0, x, revstack, complete, status, message)
+        # variables will equal upper/lower bounds will be removed later
+        lb[np.logical_and(zero_col, c < 0)] = ub[
+            np.logical_and(zero_col, c < 0)]
+        ub[np.logical_and(zero_col, c > 0)] = lb[
+            np.logical_and(zero_col, c > 0)]
+
+    # row singleton in equality constraints
+    # this fixes a variable and removes the constraint
+    singleton_row = np.array(np.sum(A_eq != 0, axis=1) == 1).flatten()
+    rows = where(singleton_row)[0]
+    cols = where(A_eq[rows, :])[1]
+    if len(rows) > 0:
+        for row, col in zip(rows, cols):
+            val = b_eq[row] / A_eq[row, col]
+            if not lb[col] - tol <= val <= ub[col] + tol:
+                # infeasible if fixed value is not within bounds
+                status = 2
+                message = ("The problem is (trivially) infeasible because a "
+                           "singleton row in the equality constraints is "
+                           "inconsistent with the bounds.")
+                complete = True
+                return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                        c0, x, revstack, complete, status, message)
+            else:
+                # sets upper and lower bounds at that fixed value - variable
+                # will be removed later
+                lb[col] = val
+                ub[col] = val
+        A_eq = A_eq[np.logical_not(singleton_row), :]
+        b_eq = b_eq[np.logical_not(singleton_row)]
+
+    # row singleton in inequality constraints
+    # this indicates a simple bound and the constraint can be removed
+    # simple bounds may be adjusted here
+    # After all of the simple bound information is combined here, get_Abc will
+    # turn the simple bounds into constraints
+    singleton_row = np.array(np.sum(A_ub != 0, axis=1) == 1).flatten()
+    cols = where(A_ub[singleton_row, :])[1]
+    rows = where(singleton_row)[0]
+    if len(rows) > 0:
+        for row, col in zip(rows, cols):
+            val = b_ub[row] / A_ub[row, col]
+            if A_ub[row, col] > 0:  # upper bound
+                if val < lb[col] - tol:  # infeasible
+                    complete = True
+                elif val < ub[col]:  # new upper bound
+                    ub[col] = val
+            else:  # lower bound
+                if val > ub[col] + tol:  # infeasible
+                    complete = True
+                elif val > lb[col]:  # new lower bound
+                    lb[col] = val
+            if complete:
+                status = 2
+                message = ("The problem is (trivially) infeasible because a "
+                           "singleton row in the upper bound constraints is "
+                           "inconsistent with the bounds.")
+                return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                        c0, x, revstack, complete, status, message)
+        A_ub = A_ub[np.logical_not(singleton_row), :]
+        b_ub = b_ub[np.logical_not(singleton_row)]
+
+    # identical bounds indicate that variable can be removed
+    i_f = np.abs(lb - ub) < tol   # indices of "fixed" variables
+    i_nf = np.logical_not(i_f)  # indices of "not fixed" variables
+
+    # test_bounds_equal_but_infeasible
+    if np.all(i_f):  # if bounds define solution, check for consistency
+        residual = b_eq - A_eq.dot(lb)
+        slack = b_ub - A_ub.dot(lb)
+        if ((A_ub.size > 0 and np.any(slack < 0)) or
+                (A_eq.size > 0 and not np.allclose(residual, 0))):
+            status = 2
+            message = ("The problem is (trivially) infeasible because the "
+                       "bounds fix all variables to values inconsistent with "
+                       "the constraints")
+            complete = True
+            return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                    c0, x, revstack, complete, status, message)
+
+    ub_mod = ub
+    lb_mod = lb
+    if np.any(i_f):
+        c0 += c[i_f].dot(lb[i_f])
+        b_eq = b_eq - A_eq[:, i_f].dot(lb[i_f])
+        b_ub = b_ub - A_ub[:, i_f].dot(lb[i_f])
+        c = c[i_nf]
+        x_undo = lb[i_f]  # not x[i_f], x is just zeroes
+        x = x[i_nf]
+        # user guess x0 stays separate from presolve solution x
+        if x0 is not None:
+            x0 = x0[i_nf]
+        A_eq = A_eq[:, i_nf]
+        A_ub = A_ub[:, i_nf]
+        # modify bounds
+        lb_mod = lb[i_nf]
+        ub_mod = ub[i_nf]
+
+        def rev(x_mod):
+            # Function to restore x: insert x_undo into x_mod.
+            # When elements have been removed at positions k1, k2, k3, ...
+            # then these must be replaced at (after) positions k1-1, k2-2,
+            # k3-3, ... in the modified array to recreate the original
+            i = np.flatnonzero(i_f)
+            # Number of variables to restore
+            N = len(i)
+            index_offset = np.arange(N)
+            # Create insert indices
+            insert_indices = i - index_offset
+            x_rev = np.insert(x_mod.astype(float), insert_indices, x_undo)
+            return x_rev
+
+        # Use revstack as a list of functions, currently just this one.
+        revstack.append(rev)
+
+    # no constraints indicates that problem is trivial
+    if A_eq.size == 0 and A_ub.size == 0:
+        b_eq = np.array([])
+        b_ub = np.array([])
+        # test_empty_constraint_1
+        if c.size == 0:
+            status = 0
+            message = ("The solution was determined in presolve as there are "
+                       "no non-trivial constraints.")
+        elif (np.any(np.logical_and(c < 0, ub_mod == np.inf)) or
+              np.any(np.logical_and(c > 0, lb_mod == -np.inf))):
+            # test_no_constraints()
+            # test_unbounded_no_nontrivial_constraints_1
+            # test_unbounded_no_nontrivial_constraints_2
+            status = 3
+            message = ("The problem is (trivially) unbounded "
+                       "because there are no non-trivial constraints and "
+                       "a) at least one decision variable is unbounded "
+                       "above and its corresponding cost is negative, or "
+                       "b) at least one decision variable is unbounded below "
+                       "and its corresponding cost is positive. ")
+        else:  # test_empty_constraint_2
+            status = 0
+            message = ("The solution was determined in presolve as there are "
+                       "no non-trivial constraints.")
+        complete = True
+        x[c < 0] = ub_mod[c < 0]
+        x[c > 0] = lb_mod[c > 0]
+        # where c is zero, set x to a finite bound or zero
+        x_zero_c = ub_mod[c == 0]
+        x_zero_c[np.isinf(x_zero_c)] = ub_mod[c == 0][np.isinf(x_zero_c)]
+        x_zero_c[np.isinf(x_zero_c)] = 0
+        x[c == 0] = x_zero_c
+        # if this is not the last step of presolve, should convert bounds back
+        # to array and return here
+
+    # Convert modified lb and ub back into N x 2 bounds
+    bounds = np.hstack((lb_mod[:, np.newaxis], ub_mod[:, np.newaxis]))
+
+    # remove redundant (linearly dependent) rows from equality constraints
+    n_rows_A = A_eq.shape[0]
+    redundancy_warning = ("A_eq does not appear to be of full row rank. To "
+                          "improve performance, check the problem formulation "
+                          "for redundant equality constraints.")
+    if (sps.issparse(A_eq)):
+        if rr and A_eq.size > 0:  # TODO: Fast sparse rank check?
+            rr_res = _remove_redundancy_pivot_sparse(A_eq, b_eq)
+            A_eq, b_eq, status, message = rr_res
+            if A_eq.shape[0] < n_rows_A:
+                warn(redundancy_warning, OptimizeWarning, stacklevel=1)
+            if status != 0:
+                complete = True
+        return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+                c0, x, revstack, complete, status, message)
+
+    # This is a wild guess for which redundancy removal algorithm will be
+    # faster. More testing would be good.
+    small_nullspace = 5
+    if rr and A_eq.size > 0:
+        try:  # TODO: use results of first SVD in _remove_redundancy_svd
+            rank = np.linalg.matrix_rank(A_eq)
+        # oh well, we'll have to go with _remove_redundancy_pivot_dense
+        except Exception:
+            rank = 0
+    if rr and A_eq.size > 0 and rank < A_eq.shape[0]:
+        warn(redundancy_warning, OptimizeWarning, stacklevel=3)
+        dim_row_nullspace = A_eq.shape[0]-rank
+        if rr_method is None:
+            if dim_row_nullspace <= small_nullspace:
+                rr_res = _remove_redundancy_svd(A_eq, b_eq)
+                A_eq, b_eq, status, message = rr_res
+            if dim_row_nullspace > small_nullspace or status == 4:
+                rr_res = _remove_redundancy_pivot_dense(A_eq, b_eq)
+                A_eq, b_eq, status, message = rr_res
+
+        else:
+            rr_method = rr_method.lower()
+            if rr_method == "svd":
+                rr_res = _remove_redundancy_svd(A_eq, b_eq)
+                A_eq, b_eq, status, message = rr_res
+            elif rr_method == "pivot":
+                rr_res = _remove_redundancy_pivot_dense(A_eq, b_eq)
+                A_eq, b_eq, status, message = rr_res
+            elif rr_method == "id":
+                rr_res = _remove_redundancy_id(A_eq, b_eq, rank)
+                A_eq, b_eq, status, message = rr_res
+            else:  # shouldn't get here; option validity checked above
+                pass
+        if A_eq.shape[0] < rank:
+            message = ("Due to numerical issues, redundant equality "
+                       "constraints could not be removed automatically. "
+                       "Try providing your constraint matrices as sparse "
+                       "matrices to activate sparse presolve, try turning "
+                       "off redundancy removal, or try turning off presolve "
+                       "altogether.")
+            status = 4
+        if status != 0:
+            complete = True
+    return (_LPProblem(c, A_ub, b_ub, A_eq, b_eq, bounds, x0),
+            c0, x, revstack, complete, status, message)
+
+
+def _parse_linprog(lp, options, meth):
+    """
+    Parse the provided linear programming problem
+
+    ``_parse_linprog`` employs two main steps ``_check_sparse_inputs`` and
+    ``_clean_inputs``. ``_check_sparse_inputs`` checks for sparsity in the
+    provided constraints (``A_ub`` and ``A_eq) and if these match the provided
+    sparsity optional values.
+
+    ``_clean inputs`` checks of the provided inputs. If no violations are
+    identified the objective vector, upper bound constraints, equality
+    constraints, and simple bounds are returned in the expected format.
+
+    Parameters
+    ----------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : various valid formats, optional
+            The bounds of ``x``, as ``min`` and ``max`` pairs.
+            If bounds are specified for all N variables separately, valid formats are:
+            * a 2D array (2 x N or N x 2);
+            * a sequence of N sequences, each with 2 values.
+            If all variables have the same bounds, a single pair of values can
+            be specified. Valid formats are:
+            * a sequence with 2 scalar values;
+            * a sequence with a single element containing 2 scalar values.
+            If all variables have a lower bound of 0 and no upper bound, the bounds
+            parameter can be omitted (or given as None).
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    options : dict
+        A dictionary of solver options. All methods accept the following
+        generic options:
+
+            maxiter : int
+                Maximum number of iterations to perform.
+            disp : bool
+                Set to True to print convergence messages.
+
+        For method-specific options, see :func:`show_options('linprog')`.
+
+    Returns
+    -------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, as ``min`` and ``max`` pairs, one for each of the N
+            elements of ``x``. The N x 2 array contains lower bounds in the first
+            column and upper bounds in the 2nd. Unbounded variables have lower
+            bound -np.inf and/or upper bound np.inf.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    options : dict, optional
+        A dictionary of solver options. All methods accept the following
+        generic options:
+
+            maxiter : int
+                Maximum number of iterations to perform.
+            disp : bool
+                Set to True to print convergence messages.
+
+        For method-specific options, see :func:`show_options('linprog')`.
+
+    """
+    if options is None:
+        options = {}
+
+    solver_options = {k: v for k, v in options.items()}
+    solver_options, A_ub, A_eq = _check_sparse_inputs(solver_options, meth,
+                                                      lp.A_ub, lp.A_eq)
+    # Convert lists to numpy arrays, etc...
+    lp = _clean_inputs(lp._replace(A_ub=A_ub, A_eq=A_eq))
+    return lp, solver_options
+
+
+def _get_Abc(lp, c0):
+    """
+    Given a linear programming problem of the form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A_ub @ x <= b_ub
+        A_eq @ x == b_eq
+         lb <= x <= ub
+
+    where ``lb = 0`` and ``ub = None`` unless set in ``bounds``.
+
+    Return the problem in standard form:
+
+    Minimize::
+
+        c @ x
+
+    Subject to::
+
+        A @ x == b
+            x >= 0
+
+    by adding slack variables and making variable substitutions as necessary.
+
+    Parameters
+    ----------
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, lower bounds in the 1st column, upper
+            bounds in the 2nd column. The bounds are possibly tightened
+            by the presolve procedure.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables.
+
+    Returns
+    -------
+    A : 2-D array
+        2-D array such that ``A`` @ ``x``, gives the values of the equality
+        constraints at ``x``.
+    b : 1-D array
+        1-D array of values representing the RHS of each equality constraint
+        (row) in A (for standard form problem).
+    c : 1-D array
+        Coefficients of the linear objective function to be minimized (for
+        standard form problem).
+    c0 : float
+        Constant term in objective function due to fixed (and eliminated)
+        variables.
+    x0 : 1-D array
+        Starting values of the independent variables, which will be refined by
+        the optimization algorithm
+
+    References
+    ----------
+    .. [9] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear
+           programming." Athena Scientific 1 (1997): 997.
+
+    """
+    c, A_ub, b_ub, A_eq, b_eq, bounds, x0, integrality = lp
+
+    if sps.issparse(A_eq):
+        sparse = True
+        A_eq = sps.csr_matrix(A_eq)
+        A_ub = sps.csr_matrix(A_ub)
+
+        def hstack(blocks):
+            return sps.hstack(blocks, format="csr")
+
+        def vstack(blocks):
+            return sps.vstack(blocks, format="csr")
+
+        zeros = sps.csr_matrix
+        eye = sps.eye
+    else:
+        sparse = False
+        hstack = np.hstack
+        vstack = np.vstack
+        zeros = np.zeros
+        eye = np.eye
+
+    # Variables lbs and ubs (see below) may be changed, which feeds back into
+    # bounds, so copy.
+    bounds = np.array(bounds, copy=True)
+
+    # modify problem such that all variables have only non-negativity bounds
+    lbs = bounds[:, 0]
+    ubs = bounds[:, 1]
+    m_ub, n_ub = A_ub.shape
+
+    lb_none = np.equal(lbs, -np.inf)
+    ub_none = np.equal(ubs, np.inf)
+    lb_some = np.logical_not(lb_none)
+    ub_some = np.logical_not(ub_none)
+
+    # unbounded below: substitute xi = -xi' (unbounded above)
+    # if -inf <= xi <= ub, then -ub <= -xi <= inf, so swap and invert bounds
+    l_nolb_someub = np.logical_and(lb_none, ub_some)
+    i_nolb = np.nonzero(l_nolb_someub)[0]
+    lbs[l_nolb_someub], ubs[l_nolb_someub] = (
+        -ubs[l_nolb_someub], -lbs[l_nolb_someub])
+    lb_none = np.equal(lbs, -np.inf)
+    ub_none = np.equal(ubs, np.inf)
+    lb_some = np.logical_not(lb_none)
+    ub_some = np.logical_not(ub_none)
+    c[i_nolb] *= -1
+    if x0 is not None:
+        x0[i_nolb] *= -1
+    if len(i_nolb) > 0:
+        if A_ub.shape[0] > 0:  # sometimes needed for sparse arrays... weird
+            A_ub[:, i_nolb] *= -1
+        if A_eq.shape[0] > 0:
+            A_eq[:, i_nolb] *= -1
+
+    # upper bound: add inequality constraint
+    i_newub, = ub_some.nonzero()
+    ub_newub = ubs[ub_some]
+    n_bounds = len(i_newub)
+    if n_bounds > 0:
+        shape = (n_bounds, A_ub.shape[1])
+        if sparse:
+            idxs = (np.arange(n_bounds), i_newub)
+            A_ub = vstack((A_ub, sps.csr_matrix((np.ones(n_bounds), idxs),
+                                                shape=shape)))
+        else:
+            A_ub = vstack((A_ub, np.zeros(shape)))
+            A_ub[np.arange(m_ub, A_ub.shape[0]), i_newub] = 1
+        b_ub = np.concatenate((b_ub, np.zeros(n_bounds)))
+        b_ub[m_ub:] = ub_newub
+
+    A1 = vstack((A_ub, A_eq))
+    b = np.concatenate((b_ub, b_eq))
+    c = np.concatenate((c, np.zeros((A_ub.shape[0],))))
+    if x0 is not None:
+        x0 = np.concatenate((x0, np.zeros((A_ub.shape[0],))))
+    # unbounded: substitute xi = xi+ + xi-
+    l_free = np.logical_and(lb_none, ub_none)
+    i_free = np.nonzero(l_free)[0]
+    n_free = len(i_free)
+    c = np.concatenate((c, np.zeros(n_free)))
+    if x0 is not None:
+        x0 = np.concatenate((x0, np.zeros(n_free)))
+    A1 = hstack((A1[:, :n_ub], -A1[:, i_free]))
+    c[n_ub:n_ub+n_free] = -c[i_free]
+    if x0 is not None:
+        i_free_neg = x0[i_free] < 0
+        x0[np.arange(n_ub, A1.shape[1])[i_free_neg]] = -x0[i_free[i_free_neg]]
+        x0[i_free[i_free_neg]] = 0
+
+    # add slack variables
+    A2 = vstack([eye(A_ub.shape[0]), zeros((A_eq.shape[0], A_ub.shape[0]))])
+
+    A = hstack([A1, A2])
+
+    # lower bound: substitute xi = xi' + lb
+    # now there is a constant term in objective
+    i_shift = np.nonzero(lb_some)[0]
+    lb_shift = lbs[lb_some].astype(float)
+    c0 += np.sum(lb_shift * c[i_shift])
+    if sparse:
+        b = b.reshape(-1, 1)
+        A = A.tocsc()
+        b -= (A[:, i_shift] @ sps.diags(lb_shift)).sum(axis=1)
+        b = b.ravel()
+    else:
+        b -= (A[:, i_shift] * lb_shift).sum(axis=1)
+    if x0 is not None:
+        x0[i_shift] -= lb_shift
+
+    return A, b, c, c0, x0
+
+
+def _round_to_power_of_two(x):
+    """
+    Round elements of the array to the nearest power of two.
+    """
+    return 2**np.around(np.log2(x))
+
+
+def _autoscale(A, b, c, x0):
+    """
+    Scales the problem according to equilibration from [12].
+    Also normalizes the right hand side vector by its maximum element.
+    """
+    m, n = A.shape
+
+    C = 1
+    R = 1
+
+    if A.size > 0:
+
+        R = np.max(np.abs(A), axis=1)
+        if sps.issparse(A):
+            R = R.toarray().flatten()
+        R[R == 0] = 1
+        R = 1/_round_to_power_of_two(R)
+        A = sps.diags(R)@A if sps.issparse(A) else A*R.reshape(m, 1)
+        b = b*R
+
+        C = np.max(np.abs(A), axis=0)
+        if sps.issparse(A):
+            C = C.toarray().flatten()
+        C[C == 0] = 1
+        C = 1/_round_to_power_of_two(C)
+        A = A@sps.diags(C) if sps.issparse(A) else A*C
+        c = c*C
+
+    b_scale = np.max(np.abs(b)) if b.size > 0 else 1
+    if b_scale == 0:
+        b_scale = 1.
+    b = b/b_scale
+
+    if x0 is not None:
+        x0 = x0/b_scale*(1/C)
+    return A, b, c, x0, C, b_scale
+
+
+def _unscale(x, C, b_scale):
+    """
+    Converts solution to _autoscale problem -> solution to original problem.
+    """
+
+    try:
+        n = len(C)
+        # fails if sparse or scalar; that's OK.
+        # this is only needed for original simplex (never sparse)
+    except TypeError:
+        n = len(x)
+
+    return x[:n]*b_scale*C
+
+
+def _display_summary(message, status, fun, iteration):
+    """
+    Print the termination summary of the linear program
+
+    Parameters
+    ----------
+    message : str
+            A string descriptor of the exit status of the optimization.
+    status : int
+        An integer representing the exit status of the optimization::
+
+                0 : Optimization terminated successfully
+                1 : Iteration limit reached
+                2 : Problem appears to be infeasible
+                3 : Problem appears to be unbounded
+                4 : Serious numerical difficulties encountered
+
+    fun : float
+        Value of the objective function.
+    iteration : iteration
+        The number of iterations performed.
+    """
+    print(message)
+    if status in (0, 1):
+        print(f"         Current function value: {fun: <12.6f}")
+    print(f"         Iterations: {iteration:d}")
+
+
+def _postsolve(x, postsolve_args, complete=False):
+    """
+    Given solution x to presolved, standard form linear program x, add
+    fixed variables back into the problem and undo the variable substitutions
+    to get solution to original linear program. Also, calculate the objective
+    function value, slack in original upper bound constraints, and residuals
+    in original equality constraints.
+
+    Parameters
+    ----------
+    x : 1-D array
+        Solution vector to the standard-form problem.
+    postsolve_args : tuple
+        Data needed by _postsolve to convert the solution to the standard-form
+        problem into the solution to the original problem, including:
+
+    lp : A `scipy.optimize._linprog_util._LPProblem` consisting of the following fields:
+
+        c : 1D array
+            The coefficients of the linear objective function to be minimized.
+        A_ub : 2D array, optional
+            The inequality constraint matrix. Each row of ``A_ub`` specifies the
+            coefficients of a linear inequality constraint on ``x``.
+        b_ub : 1D array, optional
+            The inequality constraint vector. Each element represents an
+            upper bound on the corresponding value of ``A_ub @ x``.
+        A_eq : 2D array, optional
+            The equality constraint matrix. Each row of ``A_eq`` specifies the
+            coefficients of a linear equality constraint on ``x``.
+        b_eq : 1D array, optional
+            The equality constraint vector. Each element of ``A_eq @ x`` must equal
+            the corresponding element of ``b_eq``.
+        bounds : 2D array
+            The bounds of ``x``, lower bounds in the 1st column, upper
+            bounds in the 2nd column. The bounds are possibly tightened
+            by the presolve procedure.
+        x0 : 1D array, optional
+            Guess values of the decision variables, which will be refined by
+            the optimization algorithm. This argument is currently used only by the
+            'revised simplex' method, and can only be used if `x0` represents a
+            basic feasible solution.
+
+    revstack: list of functions
+        the functions in the list reverse the operations of _presolve()
+        the function signature is x_org = f(x_mod), where x_mod is the result
+        of a presolve step and x_org the value at the start of the step
+    complete : bool
+        Whether the solution is was determined in presolve (``True`` if so)
+
+    Returns
+    -------
+    x : 1-D array
+        Solution vector to original linear programming problem
+    fun: float
+        optimal objective value for original problem
+    slack : 1-D array
+        The (non-negative) slack in the upper bound constraints, that is,
+        ``b_ub - A_ub @ x``
+    con : 1-D array
+        The (nominally zero) residuals of the equality constraints, that is,
+        ``b - A_eq @ x``
+    """
+    # note that all the inputs are the ORIGINAL, unmodified versions
+    # no rows, columns have been removed
+
+    c, A_ub, b_ub, A_eq, b_eq, bounds, x0, integrality = postsolve_args[0]
+    revstack, C, b_scale = postsolve_args[1:]
+
+    x = _unscale(x, C, b_scale)
+
+    # Undo variable substitutions of _get_Abc()
+    # if "complete", problem was solved in presolve; don't do anything here
+    n_x = bounds.shape[0]
+    if not complete and bounds is not None:  # bounds are never none, probably
+        n_unbounded = 0
+        for i, bi in enumerate(bounds):
+            lbi = bi[0]
+            ubi = bi[1]
+            if lbi == -np.inf and ubi == np.inf:
+                n_unbounded += 1
+                x[i] = x[i] - x[n_x + n_unbounded - 1]
+            else:
+                if lbi == -np.inf:
+                    x[i] = ubi - x[i]
+                else:
+                    x[i] += lbi
+    # all the rest of the variables were artificial
+    x = x[:n_x]
+
+    # If there were variables removed from the problem, add them back into the
+    # solution vector
+    # Apply the functions in revstack (reverse direction)
+    for rev in reversed(revstack):
+        x = rev(x)
+
+    fun = x.dot(c)
+    with np.errstate(invalid="ignore"):
+        slack = b_ub - A_ub.dot(x)  # report slack for ORIGINAL UB constraints
+        # report residuals of ORIGINAL EQ constraints
+        con = b_eq - A_eq.dot(x)
+
+    return x, fun, slack, con
+
+
+def _check_result(x, fun, status, slack, con, bounds, tol, message,
+                  integrality):
+    """
+    Check the validity of the provided solution.
+
+    A valid (optimal) solution satisfies all bounds, all slack variables are
+    negative and all equality constraint residuals are strictly non-zero.
+    Further, the lower-bounds, upper-bounds, slack and residuals contain
+    no nan values.
+
+    Parameters
+    ----------
+    x : 1-D array
+        Solution vector to original linear programming problem
+    fun: float
+        optimal objective value for original problem
+    status : int
+        An integer representing the exit status of the optimization::
+
+             0 : Optimization terminated successfully
+             1 : Iteration limit reached
+             2 : Problem appears to be infeasible
+             3 : Problem appears to be unbounded
+             4 : Serious numerical difficulties encountered
+
+    slack : 1-D array
+        The (non-negative) slack in the upper bound constraints, that is,
+        ``b_ub - A_ub @ x``
+    con : 1-D array
+        The (nominally zero) residuals of the equality constraints, that is,
+        ``b - A_eq @ x``
+    bounds : 2D array
+        The bounds on the original variables ``x``
+    message : str
+        A string descriptor of the exit status of the optimization.
+    tol : float
+        Termination tolerance; see [1]_ Section 4.5.
+
+    Returns
+    -------
+    status : int
+        An integer representing the exit status of the optimization::
+
+             0 : Optimization terminated successfully
+             1 : Iteration limit reached
+             2 : Problem appears to be infeasible
+             3 : Problem appears to be unbounded
+             4 : Serious numerical difficulties encountered
+
+    message : str
+        A string descriptor of the exit status of the optimization.
+    """
+    # Somewhat arbitrary
+    tol = np.sqrt(tol) * 10
+
+    if x is None:
+        # HiGHS does not provide x if infeasible/unbounded
+        if status == 0:  # Observed with HiGHS Simplex Primal
+            status = 4
+            message = ("The solver did not provide a solution nor did it "
+                       "report a failure. Please submit a bug report.")
+        return status, message
+
+    contains_nans = (
+        np.isnan(x).any()
+        or np.isnan(fun)
+        or np.isnan(slack).any()
+        or np.isnan(con).any()
+    )
+
+    if contains_nans:
+        is_feasible = False
+    else:
+        if integrality is None:
+            integrality = 0
+        valid_bounds = (x >= bounds[:, 0] - tol) & (x <= bounds[:, 1] + tol)
+        # When integrality is 2 or 3, x must be within bounds OR take value 0
+        valid_bounds |= (integrality > 1) & np.isclose(x, 0, atol=tol)
+        invalid_bounds = not np.all(valid_bounds)
+
+        invalid_slack = status != 3 and (slack < -tol).any()
+        invalid_con = status != 3 and (np.abs(con) > tol).any()
+        is_feasible = not (invalid_bounds or invalid_slack or invalid_con)
+
+    if status == 0 and not is_feasible:
+        status = 4
+        message = ("The solution does not satisfy the constraints within the "
+                   "required tolerance of " + f"{tol:.2E}" + ", yet "
+                   "no errors were raised and there is no certificate of "
+                   "infeasibility or unboundedness. Check whether "
+                   "the slack and constraint residuals are acceptable; "
+                   "if not, consider enabling presolve, adjusting the "
+                   "tolerance option(s), and/or using a different method. "
+                   "Please consider submitting a bug report.")
+    elif status == 2 and is_feasible:
+        # Occurs if the simplex method exits after phase one with a very
+        # nearly basic feasible solution. Postsolving can make the solution
+        # basic, however, this solution is NOT optimal
+        status = 4
+        message = ("The solution is feasible, but the solver did not report "
+                   "that the solution was optimal. Please try a different "
+                   "method.")
+
+    return status, message
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsap.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsap.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..b2ea39a10549d1346bada989f573981804d22006
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsap.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..f60adcc891304e34ac9d85d108b6a232b4bf0c93
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__init__.py
@@ -0,0 +1,5 @@
+"""This module contains least-squares algorithms."""
+from .least_squares import least_squares
+from .lsq_linear import lsq_linear
+
+__all__ = ['least_squares', 'lsq_linear']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..007d69ce2340e2db7c0cf540194a032ea13d0e4c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/bvls.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/bvls.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6e69afd2c0e9026b8ae9ed1692cca83b516d5194
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/bvls.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/common.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/common.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6f78210f015e020f3f6ee3f42eb123c6f298b932
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/common.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/dogbox.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/dogbox.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ef2e35a8864d55a223cc657b0c5268a0310a79be
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/dogbox.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/least_squares.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/least_squares.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f8ab83c045f4f51d499f1451bb2a95407fe78084
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/least_squares.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/lsq_linear.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/lsq_linear.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..984a26f469c83aee3a79484edd11b6d806913abf
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/lsq_linear.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f01fc301dbf920fb16ed1f4de8285b49cc9ef63b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf_linear.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf_linear.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..63346d4a710ca03898b8e04ad4b723e3f44ae318
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/__pycache__/trf_linear.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/bvls.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/bvls.py
new file mode 100644
index 0000000000000000000000000000000000000000..8f34ead4a1fc4edbb3c2ab50a204aa9a3cc21cff
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/bvls.py
@@ -0,0 +1,183 @@
+"""Bounded-variable least-squares algorithm."""
+import numpy as np
+from numpy.linalg import norm, lstsq
+from scipy.optimize import OptimizeResult
+
+from .common import print_header_linear, print_iteration_linear
+
+
+def compute_kkt_optimality(g, on_bound):
+    """Compute the maximum violation of KKT conditions."""
+    g_kkt = g * on_bound
+    free_set = on_bound == 0
+    g_kkt[free_set] = np.abs(g[free_set])
+    return np.max(g_kkt)
+
+
+def bvls(A, b, x_lsq, lb, ub, tol, max_iter, verbose, rcond=None):
+    m, n = A.shape
+
+    x = x_lsq.copy()
+    on_bound = np.zeros(n)
+
+    mask = x <= lb
+    x[mask] = lb[mask]
+    on_bound[mask] = -1
+
+    mask = x >= ub
+    x[mask] = ub[mask]
+    on_bound[mask] = 1
+
+    free_set = on_bound == 0
+    active_set = ~free_set
+    free_set, = np.nonzero(free_set)
+
+    r = A.dot(x) - b
+    cost = 0.5 * np.dot(r, r)
+    initial_cost = cost
+    g = A.T.dot(r)
+
+    cost_change = None
+    step_norm = None
+    iteration = 0
+
+    if verbose == 2:
+        print_header_linear()
+
+    # This is the initialization loop. The requirement is that the
+    # least-squares solution on free variables is feasible before BVLS starts.
+    # One possible initialization is to set all variables to lower or upper
+    # bounds, but many iterations may be required from this state later on.
+    # The implemented ad-hoc procedure which intuitively should give a better
+    # initial state: find the least-squares solution on current free variables,
+    # if its feasible then stop, otherwise, set violating variables to
+    # corresponding bounds and continue on the reduced set of free variables.
+
+    while free_set.size > 0:
+        if verbose == 2:
+            optimality = compute_kkt_optimality(g, on_bound)
+            print_iteration_linear(iteration, cost, cost_change, step_norm,
+                                   optimality)
+
+        iteration += 1
+        x_free_old = x[free_set].copy()
+
+        A_free = A[:, free_set]
+        b_free = b - A.dot(x * active_set)
+        z = lstsq(A_free, b_free, rcond=rcond)[0]
+
+        lbv = z < lb[free_set]
+        ubv = z > ub[free_set]
+        v = lbv | ubv
+
+        if np.any(lbv):
+            ind = free_set[lbv]
+            x[ind] = lb[ind]
+            active_set[ind] = True
+            on_bound[ind] = -1
+
+        if np.any(ubv):
+            ind = free_set[ubv]
+            x[ind] = ub[ind]
+            active_set[ind] = True
+            on_bound[ind] = 1
+
+        ind = free_set[~v]
+        x[ind] = z[~v]
+
+        r = A.dot(x) - b
+        cost_new = 0.5 * np.dot(r, r)
+        cost_change = cost - cost_new
+        cost = cost_new
+        g = A.T.dot(r)
+        step_norm = norm(x[free_set] - x_free_old)
+
+        if np.any(v):
+            free_set = free_set[~v]
+        else:
+            break
+
+    if max_iter is None:
+        max_iter = n
+    max_iter += iteration
+
+    termination_status = None
+
+    # Main BVLS loop.
+
+    optimality = compute_kkt_optimality(g, on_bound)
+    for iteration in range(iteration, max_iter):  # BVLS Loop A
+        if verbose == 2:
+            print_iteration_linear(iteration, cost, cost_change,
+                                   step_norm, optimality)
+
+        if optimality < tol:
+            termination_status = 1
+
+        if termination_status is not None:
+            break
+
+        move_to_free = np.argmax(g * on_bound)
+        on_bound[move_to_free] = 0
+        
+        while True:   # BVLS Loop B
+
+            free_set = on_bound == 0
+            active_set = ~free_set
+            free_set, = np.nonzero(free_set)
+    
+            x_free = x[free_set]
+            x_free_old = x_free.copy()
+            lb_free = lb[free_set]
+            ub_free = ub[free_set]
+
+            A_free = A[:, free_set]
+            b_free = b - A.dot(x * active_set)
+            z = lstsq(A_free, b_free, rcond=rcond)[0]
+
+            lbv, = np.nonzero(z < lb_free)
+            ubv, = np.nonzero(z > ub_free)
+            v = np.hstack((lbv, ubv))
+
+            if v.size > 0:
+                alphas = np.hstack((
+                    lb_free[lbv] - x_free[lbv],
+                    ub_free[ubv] - x_free[ubv])) / (z[v] - x_free[v])
+
+                i = np.argmin(alphas)
+                i_free = v[i]
+                alpha = alphas[i]
+
+                x_free *= 1 - alpha
+                x_free += alpha * z
+                x[free_set] = x_free
+
+                if i < lbv.size:
+                    on_bound[free_set[i_free]] = -1
+                else:
+                    on_bound[free_set[i_free]] = 1
+            else:
+                x_free = z
+                x[free_set] = x_free
+                break
+
+        step_norm = norm(x_free - x_free_old)
+
+        r = A.dot(x) - b
+        cost_new = 0.5 * np.dot(r, r)
+        cost_change = cost - cost_new
+
+        if cost_change < tol * cost:
+            termination_status = 2
+        cost = cost_new
+
+        g = A.T.dot(r)
+        optimality = compute_kkt_optimality(g, on_bound)
+
+    if termination_status is None:
+        termination_status = 0
+
+    return OptimizeResult(
+        x=x, fun=r, cost=cost, optimality=optimality, active_mask=on_bound,
+        nit=iteration + 1, status=termination_status,
+        initial_cost=initial_cost)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/common.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/common.py
new file mode 100644
index 0000000000000000000000000000000000000000..0f8117f23ec1111d5205537c59931b165e2bfdaf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/common.py
@@ -0,0 +1,731 @@
+"""Functions used by least-squares algorithms."""
+from math import copysign
+
+import numpy as np
+from numpy.linalg import norm
+
+from scipy.linalg import cho_factor, cho_solve, LinAlgError
+from scipy.sparse import issparse
+from scipy.sparse.linalg import LinearOperator, aslinearoperator
+
+
+EPS = np.finfo(float).eps
+
+
+# Functions related to a trust-region problem.
+
+
+def intersect_trust_region(x, s, Delta):
+    """Find the intersection of a line with the boundary of a trust region.
+
+    This function solves the quadratic equation with respect to t
+    ||(x + s*t)||**2 = Delta**2.
+
+    Returns
+    -------
+    t_neg, t_pos : tuple of float
+        Negative and positive roots.
+
+    Raises
+    ------
+    ValueError
+        If `s` is zero or `x` is not within the trust region.
+    """
+    a = np.dot(s, s)
+    if a == 0:
+        raise ValueError("`s` is zero.")
+
+    b = np.dot(x, s)
+
+    c = np.dot(x, x) - Delta**2
+    if c > 0:
+        raise ValueError("`x` is not within the trust region.")
+
+    d = np.sqrt(b*b - a*c)  # Root from one fourth of the discriminant.
+
+    # Computations below avoid loss of significance, see "Numerical Recipes".
+    q = -(b + copysign(d, b))
+    t1 = q / a
+    t2 = c / q
+
+    if t1 < t2:
+        return t1, t2
+    else:
+        return t2, t1
+
+
+def solve_lsq_trust_region(n, m, uf, s, V, Delta, initial_alpha=None,
+                           rtol=0.01, max_iter=10):
+    """Solve a trust-region problem arising in least-squares minimization.
+
+    This function implements a method described by J. J. More [1]_ and used
+    in MINPACK, but it relies on a single SVD of Jacobian instead of series
+    of Cholesky decompositions. Before running this function, compute:
+    ``U, s, VT = svd(J, full_matrices=False)``.
+
+    Parameters
+    ----------
+    n : int
+        Number of variables.
+    m : int
+        Number of residuals.
+    uf : ndarray
+        Computed as U.T.dot(f).
+    s : ndarray
+        Singular values of J.
+    V : ndarray
+        Transpose of VT.
+    Delta : float
+        Radius of a trust region.
+    initial_alpha : float, optional
+        Initial guess for alpha, which might be available from a previous
+        iteration. If None, determined automatically.
+    rtol : float, optional
+        Stopping tolerance for the root-finding procedure. Namely, the
+        solution ``p`` will satisfy ``abs(norm(p) - Delta) < rtol * Delta``.
+    max_iter : int, optional
+        Maximum allowed number of iterations for the root-finding procedure.
+
+    Returns
+    -------
+    p : ndarray, shape (n,)
+        Found solution of a trust-region problem.
+    alpha : float
+        Positive value such that (J.T*J + alpha*I)*p = -J.T*f.
+        Sometimes called Levenberg-Marquardt parameter.
+    n_iter : int
+        Number of iterations made by root-finding procedure. Zero means
+        that Gauss-Newton step was selected as the solution.
+
+    References
+    ----------
+    .. [1] More, J. J., "The Levenberg-Marquardt Algorithm: Implementation
+           and Theory," Numerical Analysis, ed. G. A. Watson, Lecture Notes
+           in Mathematics 630, Springer Verlag, pp. 105-116, 1977.
+    """
+    def phi_and_derivative(alpha, suf, s, Delta):
+        """Function of which to find zero.
+
+        It is defined as "norm of regularized (by alpha) least-squares
+        solution minus `Delta`". Refer to [1]_.
+        """
+        denom = s**2 + alpha
+        p_norm = norm(suf / denom)
+        phi = p_norm - Delta
+        phi_prime = -np.sum(suf ** 2 / denom**3) / p_norm
+        return phi, phi_prime
+
+    suf = s * uf
+
+    # Check if J has full rank and try Gauss-Newton step.
+    if m >= n:
+        threshold = EPS * m * s[0]
+        full_rank = s[-1] > threshold
+    else:
+        full_rank = False
+
+    if full_rank:
+        p = -V.dot(uf / s)
+        if norm(p) <= Delta:
+            return p, 0.0, 0
+
+    alpha_upper = norm(suf) / Delta
+
+    if full_rank:
+        phi, phi_prime = phi_and_derivative(0.0, suf, s, Delta)
+        alpha_lower = -phi / phi_prime
+    else:
+        alpha_lower = 0.0
+
+    if initial_alpha is None or not full_rank and initial_alpha == 0:
+        alpha = max(0.001 * alpha_upper, (alpha_lower * alpha_upper)**0.5)
+    else:
+        alpha = initial_alpha
+
+    for it in range(max_iter):
+        if alpha < alpha_lower or alpha > alpha_upper:
+            alpha = max(0.001 * alpha_upper, (alpha_lower * alpha_upper)**0.5)
+
+        phi, phi_prime = phi_and_derivative(alpha, suf, s, Delta)
+
+        if phi < 0:
+            alpha_upper = alpha
+
+        ratio = phi / phi_prime
+        alpha_lower = max(alpha_lower, alpha - ratio)
+        alpha -= (phi + Delta) * ratio / Delta
+
+        if np.abs(phi) < rtol * Delta:
+            break
+
+    p = -V.dot(suf / (s**2 + alpha))
+
+    # Make the norm of p equal to Delta, p is changed only slightly during
+    # this. It is done to prevent p lie outside the trust region (which can
+    # cause problems later).
+    p *= Delta / norm(p)
+
+    return p, alpha, it + 1
+
+
+def solve_trust_region_2d(B, g, Delta):
+    """Solve a general trust-region problem in 2 dimensions.
+
+    The problem is reformulated as a 4th order algebraic equation,
+    the solution of which is found by numpy.roots.
+
+    Parameters
+    ----------
+    B : ndarray, shape (2, 2)
+        Symmetric matrix, defines a quadratic term of the function.
+    g : ndarray, shape (2,)
+        Defines a linear term of the function.
+    Delta : float
+        Radius of a trust region.
+
+    Returns
+    -------
+    p : ndarray, shape (2,)
+        Found solution.
+    newton_step : bool
+        Whether the returned solution is the Newton step which lies within
+        the trust region.
+    """
+    try:
+        R, lower = cho_factor(B)
+        p = -cho_solve((R, lower), g)
+        if np.dot(p, p) <= Delta**2:
+            return p, True
+    except LinAlgError:
+        pass
+
+    a = B[0, 0] * Delta**2
+    b = B[0, 1] * Delta**2
+    c = B[1, 1] * Delta**2
+
+    d = g[0] * Delta
+    f = g[1] * Delta
+
+    coeffs = np.array(
+        [-b + d, 2 * (a - c + f), 6 * b, 2 * (-a + c + f), -b - d])
+    t = np.roots(coeffs)  # Can handle leading zeros.
+    t = np.real(t[np.isreal(t)])
+
+    p = Delta * np.vstack((2 * t / (1 + t**2), (1 - t**2) / (1 + t**2)))
+    value = 0.5 * np.sum(p * B.dot(p), axis=0) + np.dot(g, p)
+    i = np.argmin(value)
+    p = p[:, i]
+
+    return p, False
+
+
+def update_tr_radius(Delta, actual_reduction, predicted_reduction,
+                     step_norm, bound_hit):
+    """Update the radius of a trust region based on the cost reduction.
+
+    Returns
+    -------
+    Delta : float
+        New radius.
+    ratio : float
+        Ratio between actual and predicted reductions.
+    """
+    if predicted_reduction > 0:
+        ratio = actual_reduction / predicted_reduction
+    elif predicted_reduction == actual_reduction == 0:
+        ratio = 1
+    else:
+        ratio = 0
+
+    if ratio < 0.25:
+        Delta = 0.25 * step_norm
+    elif ratio > 0.75 and bound_hit:
+        Delta *= 2.0
+
+    return Delta, ratio
+
+
+# Construction and minimization of quadratic functions.
+
+
+def build_quadratic_1d(J, g, s, diag=None, s0=None):
+    """Parameterize a multivariate quadratic function along a line.
+
+    The resulting univariate quadratic function is given as follows::
+
+        f(t) = 0.5 * (s0 + s*t).T * (J.T*J + diag) * (s0 + s*t) +
+               g.T * (s0 + s*t)
+
+    Parameters
+    ----------
+    J : ndarray, sparse matrix or LinearOperator shape (m, n)
+        Jacobian matrix, affects the quadratic term.
+    g : ndarray, shape (n,)
+        Gradient, defines the linear term.
+    s : ndarray, shape (n,)
+        Direction vector of a line.
+    diag : None or ndarray with shape (n,), optional
+        Addition diagonal part, affects the quadratic term.
+        If None, assumed to be 0.
+    s0 : None or ndarray with shape (n,), optional
+        Initial point. If None, assumed to be 0.
+
+    Returns
+    -------
+    a : float
+        Coefficient for t**2.
+    b : float
+        Coefficient for t.
+    c : float
+        Free term. Returned only if `s0` is provided.
+    """
+    v = J.dot(s)
+    a = np.dot(v, v)
+    if diag is not None:
+        a += np.dot(s * diag, s)
+    a *= 0.5
+
+    b = np.dot(g, s)
+
+    if s0 is not None:
+        u = J.dot(s0)
+        b += np.dot(u, v)
+        c = 0.5 * np.dot(u, u) + np.dot(g, s0)
+        if diag is not None:
+            b += np.dot(s0 * diag, s)
+            c += 0.5 * np.dot(s0 * diag, s0)
+        return a, b, c
+    else:
+        return a, b
+
+
+def minimize_quadratic_1d(a, b, lb, ub, c=0):
+    """Minimize a 1-D quadratic function subject to bounds.
+
+    The free term `c` is 0 by default. Bounds must be finite.
+
+    Returns
+    -------
+    t : float
+        Minimum point.
+    y : float
+        Minimum value.
+    """
+    t = [lb, ub]
+    if a != 0:
+        extremum = -0.5 * b / a
+        if lb < extremum < ub:
+            t.append(extremum)
+    t = np.asarray(t)
+    y = t * (a * t + b) + c
+    min_index = np.argmin(y)
+    return t[min_index], y[min_index]
+
+
+def evaluate_quadratic(J, g, s, diag=None):
+    """Compute values of a quadratic function arising in least squares.
+
+    The function is 0.5 * s.T * (J.T * J + diag) * s + g.T * s.
+
+    Parameters
+    ----------
+    J : ndarray, sparse matrix or LinearOperator, shape (m, n)
+        Jacobian matrix, affects the quadratic term.
+    g : ndarray, shape (n,)
+        Gradient, defines the linear term.
+    s : ndarray, shape (k, n) or (n,)
+        Array containing steps as rows.
+    diag : ndarray, shape (n,), optional
+        Addition diagonal part, affects the quadratic term.
+        If None, assumed to be 0.
+
+    Returns
+    -------
+    values : ndarray with shape (k,) or float
+        Values of the function. If `s` was 2-D, then ndarray is
+        returned, otherwise, float is returned.
+    """
+    if s.ndim == 1:
+        Js = J.dot(s)
+        q = np.dot(Js, Js)
+        if diag is not None:
+            q += np.dot(s * diag, s)
+    else:
+        Js = J.dot(s.T)
+        q = np.sum(Js**2, axis=0)
+        if diag is not None:
+            q += np.sum(diag * s**2, axis=1)
+
+    l = np.dot(s, g)
+
+    return 0.5 * q + l
+
+
+# Utility functions to work with bound constraints.
+
+
+def in_bounds(x, lb, ub):
+    """Check if a point lies within bounds."""
+    return np.all((x >= lb) & (x <= ub))
+
+
+def step_size_to_bound(x, s, lb, ub):
+    """Compute a min_step size required to reach a bound.
+
+    The function computes a positive scalar t, such that x + s * t is on
+    the bound.
+
+    Returns
+    -------
+    step : float
+        Computed step. Non-negative value.
+    hits : ndarray of int with shape of x
+        Each element indicates whether a corresponding variable reaches the
+        bound:
+
+             *  0 - the bound was not hit.
+             * -1 - the lower bound was hit.
+             *  1 - the upper bound was hit.
+    """
+    non_zero = np.nonzero(s)
+    s_non_zero = s[non_zero]
+    steps = np.empty_like(x)
+    steps.fill(np.inf)
+    with np.errstate(over='ignore'):
+        steps[non_zero] = np.maximum((lb - x)[non_zero] / s_non_zero,
+                                     (ub - x)[non_zero] / s_non_zero)
+    min_step = np.min(steps)
+    return min_step, np.equal(steps, min_step) * np.sign(s).astype(int)
+
+
+def find_active_constraints(x, lb, ub, rtol=1e-10):
+    """Determine which constraints are active in a given point.
+
+    The threshold is computed using `rtol` and the absolute value of the
+    closest bound.
+
+    Returns
+    -------
+    active : ndarray of int with shape of x
+        Each component shows whether the corresponding constraint is active:
+
+             *  0 - a constraint is not active.
+             * -1 - a lower bound is active.
+             *  1 - a upper bound is active.
+    """
+    active = np.zeros_like(x, dtype=int)
+
+    if rtol == 0:
+        active[x <= lb] = -1
+        active[x >= ub] = 1
+        return active
+
+    lower_dist = x - lb
+    upper_dist = ub - x
+
+    lower_threshold = rtol * np.maximum(1, np.abs(lb))
+    upper_threshold = rtol * np.maximum(1, np.abs(ub))
+
+    lower_active = (np.isfinite(lb) &
+                    (lower_dist <= np.minimum(upper_dist, lower_threshold)))
+    active[lower_active] = -1
+
+    upper_active = (np.isfinite(ub) &
+                    (upper_dist <= np.minimum(lower_dist, upper_threshold)))
+    active[upper_active] = 1
+
+    return active
+
+
+def make_strictly_feasible(x, lb, ub, rstep=1e-10):
+    """Shift a point to the interior of a feasible region.
+
+    Each element of the returned vector is at least at a relative distance
+    `rstep` from the closest bound. If ``rstep=0`` then `np.nextafter` is used.
+    """
+    x_new = x.copy()
+
+    active = find_active_constraints(x, lb, ub, rstep)
+    lower_mask = np.equal(active, -1)
+    upper_mask = np.equal(active, 1)
+
+    if rstep == 0:
+        x_new[lower_mask] = np.nextafter(lb[lower_mask], ub[lower_mask])
+        x_new[upper_mask] = np.nextafter(ub[upper_mask], lb[upper_mask])
+    else:
+        x_new[lower_mask] = (lb[lower_mask] +
+                             rstep * np.maximum(1, np.abs(lb[lower_mask])))
+        x_new[upper_mask] = (ub[upper_mask] -
+                             rstep * np.maximum(1, np.abs(ub[upper_mask])))
+
+    tight_bounds = (x_new < lb) | (x_new > ub)
+    x_new[tight_bounds] = 0.5 * (lb[tight_bounds] + ub[tight_bounds])
+
+    return x_new
+
+
+def CL_scaling_vector(x, g, lb, ub):
+    """Compute Coleman-Li scaling vector and its derivatives.
+
+    Components of a vector v are defined as follows::
+
+               | ub[i] - x[i], if g[i] < 0 and ub[i] < np.inf
+        v[i] = | x[i] - lb[i], if g[i] > 0 and lb[i] > -np.inf
+               | 1,           otherwise
+
+    According to this definition v[i] >= 0 for all i. It differs from the
+    definition in paper [1]_ (eq. (2.2)), where the absolute value of v is
+    used. Both definitions are equivalent down the line.
+    Derivatives of v with respect to x take value 1, -1 or 0 depending on a
+    case.
+
+    Returns
+    -------
+    v : ndarray with shape of x
+        Scaling vector.
+    dv : ndarray with shape of x
+        Derivatives of v[i] with respect to x[i], diagonal elements of v's
+        Jacobian.
+
+    References
+    ----------
+    .. [1] M.A. Branch, T.F. Coleman, and Y. Li, "A Subspace, Interior,
+           and Conjugate Gradient Method for Large-Scale Bound-Constrained
+           Minimization Problems," SIAM Journal on Scientific Computing,
+           Vol. 21, Number 1, pp 1-23, 1999.
+    """
+    v = np.ones_like(x)
+    dv = np.zeros_like(x)
+
+    mask = (g < 0) & np.isfinite(ub)
+    v[mask] = ub[mask] - x[mask]
+    dv[mask] = -1
+
+    mask = (g > 0) & np.isfinite(lb)
+    v[mask] = x[mask] - lb[mask]
+    dv[mask] = 1
+
+    return v, dv
+
+
+def reflective_transformation(y, lb, ub):
+    """Compute reflective transformation and its gradient."""
+    if in_bounds(y, lb, ub):
+        return y, np.ones_like(y)
+
+    lb_finite = np.isfinite(lb)
+    ub_finite = np.isfinite(ub)
+
+    x = y.copy()
+    g_negative = np.zeros_like(y, dtype=bool)
+
+    mask = lb_finite & ~ub_finite
+    x[mask] = np.maximum(y[mask], 2 * lb[mask] - y[mask])
+    g_negative[mask] = y[mask] < lb[mask]
+
+    mask = ~lb_finite & ub_finite
+    x[mask] = np.minimum(y[mask], 2 * ub[mask] - y[mask])
+    g_negative[mask] = y[mask] > ub[mask]
+
+    mask = lb_finite & ub_finite
+    d = ub - lb
+    t = np.remainder(y[mask] - lb[mask], 2 * d[mask])
+    x[mask] = lb[mask] + np.minimum(t, 2 * d[mask] - t)
+    g_negative[mask] = t > d[mask]
+
+    g = np.ones_like(y)
+    g[g_negative] = -1
+
+    return x, g
+
+
+# Functions to display algorithm's progress.
+
+
+def print_header_nonlinear():
+    print("{:^15}{:^15}{:^15}{:^15}{:^15}{:^15}"
+          .format("Iteration", "Total nfev", "Cost", "Cost reduction",
+                  "Step norm", "Optimality"))
+
+
+def print_iteration_nonlinear(iteration, nfev, cost, cost_reduction,
+                              step_norm, optimality):
+    if cost_reduction is None:
+        cost_reduction = " " * 15
+    else:
+        cost_reduction = f"{cost_reduction:^15.2e}"
+
+    if step_norm is None:
+        step_norm = " " * 15
+    else:
+        step_norm = f"{step_norm:^15.2e}"
+
+    print(f"{iteration:^15}{nfev:^15}{cost:^15.4e}{cost_reduction}{step_norm}{optimality:^15.2e}")
+
+
+def print_header_linear():
+    print("{:^15}{:^15}{:^15}{:^15}{:^15}"
+          .format("Iteration", "Cost", "Cost reduction", "Step norm",
+                  "Optimality"))
+
+
+def print_iteration_linear(iteration, cost, cost_reduction, step_norm,
+                           optimality):
+    if cost_reduction is None:
+        cost_reduction = " " * 15
+    else:
+        cost_reduction = f"{cost_reduction:^15.2e}"
+
+    if step_norm is None:
+        step_norm = " " * 15
+    else:
+        step_norm = f"{step_norm:^15.2e}"
+
+    print(f"{iteration:^15}{cost:^15.4e}{cost_reduction}{step_norm}{optimality:^15.2e}")
+
+
+# Simple helper functions.
+
+
+def compute_grad(J, f):
+    """Compute gradient of the least-squares cost function."""
+    if isinstance(J, LinearOperator):
+        return J.rmatvec(f)
+    else:
+        return J.T.dot(f)
+
+
+def compute_jac_scale(J, scale_inv_old=None):
+    """Compute variables scale based on the Jacobian matrix."""
+    if issparse(J):
+        scale_inv = np.asarray(J.power(2).sum(axis=0)).ravel()**0.5
+    else:
+        scale_inv = np.sum(J**2, axis=0)**0.5
+
+    if scale_inv_old is None:
+        scale_inv[scale_inv == 0] = 1
+    else:
+        scale_inv = np.maximum(scale_inv, scale_inv_old)
+
+    return 1 / scale_inv, scale_inv
+
+
+def left_multiplied_operator(J, d):
+    """Return diag(d) J as LinearOperator."""
+    J = aslinearoperator(J)
+
+    def matvec(x):
+        return d * J.matvec(x)
+
+    def matmat(X):
+        return d[:, np.newaxis] * J.matmat(X)
+
+    def rmatvec(x):
+        return J.rmatvec(x.ravel() * d)
+
+    return LinearOperator(J.shape, matvec=matvec, matmat=matmat,
+                          rmatvec=rmatvec)
+
+
+def right_multiplied_operator(J, d):
+    """Return J diag(d) as LinearOperator."""
+    J = aslinearoperator(J)
+
+    def matvec(x):
+        return J.matvec(np.ravel(x) * d)
+
+    def matmat(X):
+        return J.matmat(X * d[:, np.newaxis])
+
+    def rmatvec(x):
+        return d * J.rmatvec(x)
+
+    return LinearOperator(J.shape, matvec=matvec, matmat=matmat,
+                          rmatvec=rmatvec)
+
+
+def regularized_lsq_operator(J, diag):
+    """Return a matrix arising in regularized least squares as LinearOperator.
+
+    The matrix is
+        [ J ]
+        [ D ]
+    where D is diagonal matrix with elements from `diag`.
+    """
+    J = aslinearoperator(J)
+    m, n = J.shape
+
+    def matvec(x):
+        return np.hstack((J.matvec(x), diag * x))
+
+    def rmatvec(x):
+        x1 = x[:m]
+        x2 = x[m:]
+        return J.rmatvec(x1) + diag * x2
+
+    return LinearOperator((m + n, n), matvec=matvec, rmatvec=rmatvec)
+
+
+def right_multiply(J, d, copy=True):
+    """Compute J diag(d).
+
+    If `copy` is False, `J` is modified in place (unless being LinearOperator).
+    """
+    if copy and not isinstance(J, LinearOperator):
+        J = J.copy()
+
+    if issparse(J):
+        J.data *= d.take(J.indices, mode='clip')  # scikit-learn recipe.
+    elif isinstance(J, LinearOperator):
+        J = right_multiplied_operator(J, d)
+    else:
+        J *= d
+
+    return J
+
+
+def left_multiply(J, d, copy=True):
+    """Compute diag(d) J.
+
+    If `copy` is False, `J` is modified in place (unless being LinearOperator).
+    """
+    if copy and not isinstance(J, LinearOperator):
+        J = J.copy()
+
+    if issparse(J):
+        J.data *= np.repeat(d, np.diff(J.indptr))  # scikit-learn recipe.
+    elif isinstance(J, LinearOperator):
+        J = left_multiplied_operator(J, d)
+    else:
+        J *= d[:, np.newaxis]
+
+    return J
+
+
+def check_termination(dF, F, dx_norm, x_norm, ratio, ftol, xtol):
+    """Check termination condition for nonlinear least squares."""
+    ftol_satisfied = dF < ftol * F and ratio > 0.25
+    xtol_satisfied = dx_norm < xtol * (xtol + x_norm)
+
+    if ftol_satisfied and xtol_satisfied:
+        return 4
+    elif ftol_satisfied:
+        return 2
+    elif xtol_satisfied:
+        return 3
+    else:
+        return None
+
+
+def scale_for_robust_loss_function(J, f, rho):
+    """Scale Jacobian and residuals for a robust loss function.
+
+    Arrays are modified in place.
+    """
+    J_scale = rho[1] + 2 * rho[2] * f**2
+    J_scale[J_scale < EPS] = EPS
+    J_scale **= 0.5
+
+    f *= rho[1] / J_scale
+
+    return left_multiply(J, J_scale, copy=False), f
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/dogbox.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/dogbox.py
new file mode 100644
index 0000000000000000000000000000000000000000..6bb5abbe79028afed7b110603a0d5dfd6affae7f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/dogbox.py
@@ -0,0 +1,331 @@
+"""
+Dogleg algorithm with rectangular trust regions for least-squares minimization.
+
+The description of the algorithm can be found in [Voglis]_. The algorithm does
+trust-region iterations, but the shape of trust regions is rectangular as
+opposed to conventional elliptical. The intersection of a trust region and
+an initial feasible region is again some rectangle. Thus, on each iteration a
+bound-constrained quadratic optimization problem is solved.
+
+A quadratic problem is solved by well-known dogleg approach, where the
+function is minimized along piecewise-linear "dogleg" path [NumOpt]_,
+Chapter 4. If Jacobian is not rank-deficient then the function is decreasing
+along this path, and optimization amounts to simply following along this
+path as long as a point stays within the bounds. A constrained Cauchy step
+(along the anti-gradient) is considered for safety in rank deficient cases,
+in this situations the convergence might be slow.
+
+If during iterations some variable hit the initial bound and the component
+of anti-gradient points outside the feasible region, then a next dogleg step
+won't make any progress. At this state such variables satisfy first-order
+optimality conditions and they are excluded before computing a next dogleg
+step.
+
+Gauss-Newton step can be computed exactly by `numpy.linalg.lstsq` (for dense
+Jacobian matrices) or by iterative procedure `scipy.sparse.linalg.lsmr` (for
+dense and sparse matrices, or Jacobian being LinearOperator). The second
+option allows to solve very large problems (up to couple of millions of
+residuals on a regular PC), provided the Jacobian matrix is sufficiently
+sparse. But note that dogbox is not very good for solving problems with
+large number of constraints, because of variables exclusion-inclusion on each
+iteration (a required number of function evaluations might be high or accuracy
+of a solution will be poor), thus its large-scale usage is probably limited
+to unconstrained problems.
+
+References
+----------
+.. [Voglis] C. Voglis and I. E. Lagaris, "A Rectangular Trust Region Dogleg
+            Approach for Unconstrained and Bound Constrained Nonlinear
+            Optimization", WSEAS International Conference on Applied
+            Mathematics, Corfu, Greece, 2004.
+.. [NumOpt] J. Nocedal and S. J. Wright, "Numerical optimization, 2nd edition".
+"""
+import numpy as np
+from numpy.linalg import lstsq, norm
+
+from scipy.sparse.linalg import LinearOperator, aslinearoperator, lsmr
+from scipy.optimize import OptimizeResult
+
+from .common import (
+    step_size_to_bound, in_bounds, update_tr_radius, evaluate_quadratic,
+    build_quadratic_1d, minimize_quadratic_1d, compute_grad,
+    compute_jac_scale, check_termination, scale_for_robust_loss_function,
+    print_header_nonlinear, print_iteration_nonlinear)
+
+
+def lsmr_operator(Jop, d, active_set):
+    """Compute LinearOperator to use in LSMR by dogbox algorithm.
+
+    `active_set` mask is used to excluded active variables from computations
+    of matrix-vector products.
+    """
+    m, n = Jop.shape
+
+    def matvec(x):
+        x_free = x.ravel().copy()
+        x_free[active_set] = 0
+        return Jop.matvec(x * d)
+
+    def rmatvec(x):
+        r = d * Jop.rmatvec(x)
+        r[active_set] = 0
+        return r
+
+    return LinearOperator((m, n), matvec=matvec, rmatvec=rmatvec, dtype=float)
+
+
+def find_intersection(x, tr_bounds, lb, ub):
+    """Find intersection of trust-region bounds and initial bounds.
+
+    Returns
+    -------
+    lb_total, ub_total : ndarray with shape of x
+        Lower and upper bounds of the intersection region.
+    orig_l, orig_u : ndarray of bool with shape of x
+        True means that an original bound is taken as a corresponding bound
+        in the intersection region.
+    tr_l, tr_u : ndarray of bool with shape of x
+        True means that a trust-region bound is taken as a corresponding bound
+        in the intersection region.
+    """
+    lb_centered = lb - x
+    ub_centered = ub - x
+
+    lb_total = np.maximum(lb_centered, -tr_bounds)
+    ub_total = np.minimum(ub_centered, tr_bounds)
+
+    orig_l = np.equal(lb_total, lb_centered)
+    orig_u = np.equal(ub_total, ub_centered)
+
+    tr_l = np.equal(lb_total, -tr_bounds)
+    tr_u = np.equal(ub_total, tr_bounds)
+
+    return lb_total, ub_total, orig_l, orig_u, tr_l, tr_u
+
+
+def dogleg_step(x, newton_step, g, a, b, tr_bounds, lb, ub):
+    """Find dogleg step in a rectangular region.
+
+    Returns
+    -------
+    step : ndarray, shape (n,)
+        Computed dogleg step.
+    bound_hits : ndarray of int, shape (n,)
+        Each component shows whether a corresponding variable hits the
+        initial bound after the step is taken:
+            *  0 - a variable doesn't hit the bound.
+            * -1 - lower bound is hit.
+            *  1 - upper bound is hit.
+    tr_hit : bool
+        Whether the step hit the boundary of the trust-region.
+    """
+    lb_total, ub_total, orig_l, orig_u, tr_l, tr_u = find_intersection(
+        x, tr_bounds, lb, ub
+    )
+    bound_hits = np.zeros_like(x, dtype=int)
+
+    if in_bounds(newton_step, lb_total, ub_total):
+        return newton_step, bound_hits, False
+
+    to_bounds, _ = step_size_to_bound(np.zeros_like(x), -g, lb_total, ub_total)
+
+    # The classical dogleg algorithm would check if Cauchy step fits into
+    # the bounds, and just return it constrained version if not. But in a
+    # rectangular trust region it makes sense to try to improve constrained
+    # Cauchy step too. Thus, we don't distinguish these two cases.
+
+    cauchy_step = -minimize_quadratic_1d(a, b, 0, to_bounds)[0] * g
+
+    step_diff = newton_step - cauchy_step
+    step_size, hits = step_size_to_bound(cauchy_step, step_diff,
+                                         lb_total, ub_total)
+    bound_hits[(hits < 0) & orig_l] = -1
+    bound_hits[(hits > 0) & orig_u] = 1
+    tr_hit = np.any((hits < 0) & tr_l | (hits > 0) & tr_u)
+
+    return cauchy_step + step_size * step_diff, bound_hits, tr_hit
+
+
+def dogbox(fun, jac, x0, f0, J0, lb, ub, ftol, xtol, gtol, max_nfev, x_scale,
+           loss_function, tr_solver, tr_options, verbose):
+    f = f0
+    f_true = f.copy()
+    nfev = 1
+
+    J = J0
+    njev = 1
+
+    if loss_function is not None:
+        rho = loss_function(f)
+        cost = 0.5 * np.sum(rho[0])
+        J, f = scale_for_robust_loss_function(J, f, rho)
+    else:
+        cost = 0.5 * np.dot(f, f)
+
+    g = compute_grad(J, f)
+
+    jac_scale = isinstance(x_scale, str) and x_scale == 'jac'
+    if jac_scale:
+        scale, scale_inv = compute_jac_scale(J)
+    else:
+        scale, scale_inv = x_scale, 1 / x_scale
+
+    Delta = norm(x0 * scale_inv, ord=np.inf)
+    if Delta == 0:
+        Delta = 1.0
+
+    on_bound = np.zeros_like(x0, dtype=int)
+    on_bound[np.equal(x0, lb)] = -1
+    on_bound[np.equal(x0, ub)] = 1
+
+    x = x0
+    step = np.empty_like(x0)
+
+    if max_nfev is None:
+        max_nfev = x0.size * 100
+
+    termination_status = None
+    iteration = 0
+    step_norm = None
+    actual_reduction = None
+
+    if verbose == 2:
+        print_header_nonlinear()
+
+    while True:
+        active_set = on_bound * g < 0
+        free_set = ~active_set
+
+        g_free = g[free_set]
+        g_full = g.copy()
+        g[active_set] = 0
+
+        g_norm = norm(g, ord=np.inf)
+        if g_norm < gtol:
+            termination_status = 1
+
+        if verbose == 2:
+            print_iteration_nonlinear(iteration, nfev, cost, actual_reduction,
+                                      step_norm, g_norm)
+
+        if termination_status is not None or nfev == max_nfev:
+            break
+
+        x_free = x[free_set]
+        lb_free = lb[free_set]
+        ub_free = ub[free_set]
+        scale_free = scale[free_set]
+
+        # Compute (Gauss-)Newton and build quadratic model for Cauchy step.
+        if tr_solver == 'exact':
+            J_free = J[:, free_set]
+            newton_step = lstsq(J_free, -f, rcond=-1)[0]
+
+            # Coefficients for the quadratic model along the anti-gradient.
+            a, b = build_quadratic_1d(J_free, g_free, -g_free)
+        elif tr_solver == 'lsmr':
+            Jop = aslinearoperator(J)
+
+            # We compute lsmr step in scaled variables and then
+            # transform back to normal variables, if lsmr would give exact lsq
+            # solution, this would be equivalent to not doing any
+            # transformations, but from experience it's better this way.
+
+            # We pass active_set to make computations as if we selected
+            # the free subset of J columns, but without actually doing any
+            # slicing, which is expensive for sparse matrices and impossible
+            # for LinearOperator.
+
+            lsmr_op = lsmr_operator(Jop, scale, active_set)
+            newton_step = -lsmr(lsmr_op, f, **tr_options)[0][free_set]
+            newton_step *= scale_free
+
+            # Components of g for active variables were zeroed, so this call
+            # is correct and equivalent to using J_free and g_free.
+            a, b = build_quadratic_1d(Jop, g, -g)
+
+        actual_reduction = -1.0
+        while actual_reduction <= 0 and nfev < max_nfev:
+            tr_bounds = Delta * scale_free
+
+            step_free, on_bound_free, tr_hit = dogleg_step(
+                x_free, newton_step, g_free, a, b, tr_bounds, lb_free, ub_free)
+
+            step.fill(0.0)
+            step[free_set] = step_free
+
+            if tr_solver == 'exact':
+                predicted_reduction = -evaluate_quadratic(J_free, g_free,
+                                                          step_free)
+            elif tr_solver == 'lsmr':
+                predicted_reduction = -evaluate_quadratic(Jop, g, step)
+
+            # gh11403 ensure that solution is fully within bounds.
+            x_new = np.clip(x + step, lb, ub)
+
+            f_new = fun(x_new)
+            nfev += 1
+
+            step_h_norm = norm(step * scale_inv, ord=np.inf)
+
+            if not np.all(np.isfinite(f_new)):
+                Delta = 0.25 * step_h_norm
+                continue
+
+            # Usual trust-region step quality estimation.
+            if loss_function is not None:
+                cost_new = loss_function(f_new, cost_only=True)
+            else:
+                cost_new = 0.5 * np.dot(f_new, f_new)
+            actual_reduction = cost - cost_new
+
+            Delta, ratio = update_tr_radius(
+                Delta, actual_reduction, predicted_reduction,
+                step_h_norm, tr_hit
+            )
+
+            step_norm = norm(step)
+            termination_status = check_termination(
+                actual_reduction, cost, step_norm, norm(x), ratio, ftol, xtol)
+
+            if termination_status is not None:
+                break
+
+        if actual_reduction > 0:
+            on_bound[free_set] = on_bound_free
+
+            x = x_new
+            # Set variables exactly at the boundary.
+            mask = on_bound == -1
+            x[mask] = lb[mask]
+            mask = on_bound == 1
+            x[mask] = ub[mask]
+
+            f = f_new
+            f_true = f.copy()
+
+            cost = cost_new
+
+            J = jac(x, f)
+            njev += 1
+
+            if loss_function is not None:
+                rho = loss_function(f)
+                J, f = scale_for_robust_loss_function(J, f, rho)
+
+            g = compute_grad(J, f)
+
+            if jac_scale:
+                scale, scale_inv = compute_jac_scale(J, scale_inv)
+        else:
+            step_norm = 0
+            actual_reduction = 0
+
+        iteration += 1
+
+    if termination_status is None:
+        termination_status = 0
+
+    return OptimizeResult(
+        x=x, cost=cost, fun=f_true, jac=J, grad=g_full, optimality=g_norm,
+        active_mask=on_bound, nfev=nfev, njev=njev, status=termination_status)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py
new file mode 100644
index 0000000000000000000000000000000000000000..1595e40d16a01b8355510c4721ca0fb6b5b23b4a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/least_squares.py
@@ -0,0 +1,972 @@
+"""Generic interface for least-squares minimization."""
+from warnings import warn
+
+import numpy as np
+from numpy.linalg import norm
+
+from scipy.sparse import issparse
+from scipy.sparse.linalg import LinearOperator
+from scipy.optimize import _minpack, OptimizeResult
+from scipy.optimize._numdiff import approx_derivative, group_columns
+from scipy.optimize._minimize import Bounds
+
+from .trf import trf
+from .dogbox import dogbox
+from .common import EPS, in_bounds, make_strictly_feasible
+
+
+TERMINATION_MESSAGES = {
+    -1: "Improper input parameters status returned from `leastsq`",
+    0: "The maximum number of function evaluations is exceeded.",
+    1: "`gtol` termination condition is satisfied.",
+    2: "`ftol` termination condition is satisfied.",
+    3: "`xtol` termination condition is satisfied.",
+    4: "Both `ftol` and `xtol` termination conditions are satisfied."
+}
+
+
+FROM_MINPACK_TO_COMMON = {
+    0: -1,  # Improper input parameters from MINPACK.
+    1: 2,
+    2: 3,
+    3: 4,
+    4: 1,
+    5: 0
+    # There are 6, 7, 8 for too small tolerance parameters,
+    # but we guard against it by checking ftol, xtol, gtol beforehand.
+}
+
+
+def call_minpack(fun, x0, jac, ftol, xtol, gtol, max_nfev, x_scale, diff_step):
+    n = x0.size
+
+    if diff_step is None:
+        epsfcn = EPS
+    else:
+        epsfcn = diff_step**2
+
+    # Compute MINPACK's `diag`, which is inverse of our `x_scale` and
+    # ``x_scale='jac'`` corresponds to ``diag=None``.
+    if isinstance(x_scale, str) and x_scale == 'jac':
+        diag = None
+    else:
+        diag = 1 / x_scale
+
+    full_output = True
+    col_deriv = False
+    factor = 100.0
+
+    if jac is None:
+        if max_nfev is None:
+            # n squared to account for Jacobian evaluations.
+            max_nfev = 100 * n * (n + 1)
+        x, info, status = _minpack._lmdif(
+            fun, x0, (), full_output, ftol, xtol, gtol,
+            max_nfev, epsfcn, factor, diag)
+    else:
+        if max_nfev is None:
+            max_nfev = 100 * n
+        x, info, status = _minpack._lmder(
+            fun, jac, x0, (), full_output, col_deriv,
+            ftol, xtol, gtol, max_nfev, factor, diag)
+
+    f = info['fvec']
+
+    if callable(jac):
+        J = jac(x)
+    else:
+        J = np.atleast_2d(approx_derivative(fun, x))
+
+    cost = 0.5 * np.dot(f, f)
+    g = J.T.dot(f)
+    g_norm = norm(g, ord=np.inf)
+
+    nfev = info['nfev']
+    njev = info.get('njev', None)
+
+    status = FROM_MINPACK_TO_COMMON[status]
+    active_mask = np.zeros_like(x0, dtype=int)
+
+    return OptimizeResult(
+        x=x, cost=cost, fun=f, jac=J, grad=g, optimality=g_norm,
+        active_mask=active_mask, nfev=nfev, njev=njev, status=status)
+
+
+def prepare_bounds(bounds, n):
+    lb, ub = (np.asarray(b, dtype=float) for b in bounds)
+    if lb.ndim == 0:
+        lb = np.resize(lb, n)
+
+    if ub.ndim == 0:
+        ub = np.resize(ub, n)
+
+    return lb, ub
+
+
+def check_tolerance(ftol, xtol, gtol, method):
+    def check(tol, name):
+        if tol is None:
+            tol = 0
+        elif tol < EPS:
+            warn(f"Setting `{name}` below the machine epsilon ({EPS:.2e}) effectively "
+                 f"disables the corresponding termination condition.",
+                 stacklevel=3)
+        return tol
+
+    ftol = check(ftol, "ftol")
+    xtol = check(xtol, "xtol")
+    gtol = check(gtol, "gtol")
+
+    if method == "lm" and (ftol < EPS or xtol < EPS or gtol < EPS):
+        raise ValueError("All tolerances must be higher than machine epsilon "
+                         f"({EPS:.2e}) for method 'lm'.")
+    elif ftol < EPS and xtol < EPS and gtol < EPS:
+        raise ValueError("At least one of the tolerances must be higher than "
+                         f"machine epsilon ({EPS:.2e}).")
+
+    return ftol, xtol, gtol
+
+
+def check_x_scale(x_scale, x0):
+    if isinstance(x_scale, str) and x_scale == 'jac':
+        return x_scale
+
+    try:
+        x_scale = np.asarray(x_scale, dtype=float)
+        valid = np.all(np.isfinite(x_scale)) and np.all(x_scale > 0)
+    except (ValueError, TypeError):
+        valid = False
+
+    if not valid:
+        raise ValueError("`x_scale` must be 'jac' or array_like with "
+                         "positive numbers.")
+
+    if x_scale.ndim == 0:
+        x_scale = np.resize(x_scale, x0.shape)
+
+    if x_scale.shape != x0.shape:
+        raise ValueError("Inconsistent shapes between `x_scale` and `x0`.")
+
+    return x_scale
+
+
+def check_jac_sparsity(jac_sparsity, m, n):
+    if jac_sparsity is None:
+        return None
+
+    if not issparse(jac_sparsity):
+        jac_sparsity = np.atleast_2d(jac_sparsity)
+
+    if jac_sparsity.shape != (m, n):
+        raise ValueError("`jac_sparsity` has wrong shape.")
+
+    return jac_sparsity, group_columns(jac_sparsity)
+
+
+# Loss functions.
+
+
+def huber(z, rho, cost_only):
+    mask = z <= 1
+    rho[0, mask] = z[mask]
+    rho[0, ~mask] = 2 * z[~mask]**0.5 - 1
+    if cost_only:
+        return
+    rho[1, mask] = 1
+    rho[1, ~mask] = z[~mask]**-0.5
+    rho[2, mask] = 0
+    rho[2, ~mask] = -0.5 * z[~mask]**-1.5
+
+
+def soft_l1(z, rho, cost_only):
+    t = 1 + z
+    rho[0] = 2 * (t**0.5 - 1)
+    if cost_only:
+        return
+    rho[1] = t**-0.5
+    rho[2] = -0.5 * t**-1.5
+
+
+def cauchy(z, rho, cost_only):
+    rho[0] = np.log1p(z)
+    if cost_only:
+        return
+    t = 1 + z
+    rho[1] = 1 / t
+    rho[2] = -1 / t**2
+
+
+def arctan(z, rho, cost_only):
+    rho[0] = np.arctan(z)
+    if cost_only:
+        return
+    t = 1 + z**2
+    rho[1] = 1 / t
+    rho[2] = -2 * z / t**2
+
+
+IMPLEMENTED_LOSSES = dict(linear=None, huber=huber, soft_l1=soft_l1,
+                          cauchy=cauchy, arctan=arctan)
+
+
+def construct_loss_function(m, loss, f_scale):
+    if loss == 'linear':
+        return None
+
+    if not callable(loss):
+        loss = IMPLEMENTED_LOSSES[loss]
+        rho = np.empty((3, m))
+
+        def loss_function(f, cost_only=False):
+            z = (f / f_scale) ** 2
+            loss(z, rho, cost_only=cost_only)
+            if cost_only:
+                return 0.5 * f_scale ** 2 * np.sum(rho[0])
+            rho[0] *= f_scale ** 2
+            rho[2] /= f_scale ** 2
+            return rho
+    else:
+        def loss_function(f, cost_only=False):
+            z = (f / f_scale) ** 2
+            rho = loss(z)
+            if cost_only:
+                return 0.5 * f_scale ** 2 * np.sum(rho[0])
+            rho[0] *= f_scale ** 2
+            rho[2] /= f_scale ** 2
+            return rho
+
+    return loss_function
+
+
+def least_squares(
+        fun, x0, jac='2-point', bounds=(-np.inf, np.inf), method='trf',
+        ftol=1e-8, xtol=1e-8, gtol=1e-8, x_scale=1.0, loss='linear',
+        f_scale=1.0, diff_step=None, tr_solver=None, tr_options=None,
+        jac_sparsity=None, max_nfev=None, verbose=0, args=(), kwargs=None):
+    """Solve a nonlinear least-squares problem with bounds on the variables.
+
+    Given the residuals f(x) (an m-D real function of n real
+    variables) and the loss function rho(s) (a scalar function), `least_squares`
+    finds a local minimum of the cost function F(x)::
+
+        minimize F(x) = 0.5 * sum(rho(f_i(x)**2), i = 0, ..., m - 1)
+        subject to lb <= x <= ub
+
+    The purpose of the loss function rho(s) is to reduce the influence of
+    outliers on the solution.
+
+    Parameters
+    ----------
+    fun : callable
+        Function which computes the vector of residuals, with the signature
+        ``fun(x, *args, **kwargs)``, i.e., the minimization proceeds with
+        respect to its first argument. The argument ``x`` passed to this
+        function is an ndarray of shape (n,) (never a scalar, even for n=1).
+        It must allocate and return a 1-D array_like of shape (m,) or a scalar.
+        If the argument ``x`` is complex or the function ``fun`` returns
+        complex residuals, it must be wrapped in a real function of real
+        arguments, as shown at the end of the Examples section.
+    x0 : array_like with shape (n,) or float
+        Initial guess on independent variables. If float, it will be treated
+        as a 1-D array with one element. When `method` is 'trf', the initial
+        guess might be slightly adjusted to lie sufficiently within the given
+        `bounds`.
+    jac : {'2-point', '3-point', 'cs', callable}, optional
+        Method of computing the Jacobian matrix (an m-by-n matrix, where
+        element (i, j) is the partial derivative of f[i] with respect to
+        x[j]). The keywords select a finite difference scheme for numerical
+        estimation. The scheme '3-point' is more accurate, but requires
+        twice as many operations as '2-point' (default). The scheme 'cs'
+        uses complex steps, and while potentially the most accurate, it is
+        applicable only when `fun` correctly handles complex inputs and
+        can be analytically continued to the complex plane. Method 'lm'
+        always uses the '2-point' scheme. If callable, it is used as
+        ``jac(x, *args, **kwargs)`` and should return a good approximation
+        (or the exact value) for the Jacobian as an array_like (np.atleast_2d
+        is applied), a sparse matrix (csr_matrix preferred for performance) or
+        a `scipy.sparse.linalg.LinearOperator`.
+    bounds : 2-tuple of array_like or `Bounds`, optional
+        There are two ways to specify bounds:
+
+        1. Instance of `Bounds` class
+        2. Lower and upper bounds on independent variables. Defaults to no
+           bounds. Each array must match the size of `x0` or be a scalar,
+           in the latter case a bound will be the same for all variables.
+           Use ``np.inf`` with an appropriate sign to disable bounds on all
+           or some variables.
+
+    method : {'trf', 'dogbox', 'lm'}, optional
+        Algorithm to perform minimization.
+
+        * 'trf' : Trust Region Reflective algorithm, particularly suitable
+          for large sparse problems with bounds. Generally robust method.
+        * 'dogbox' : dogleg algorithm with rectangular trust regions,
+          typical use case is small problems with bounds. Not recommended
+          for problems with rank-deficient Jacobian.
+        * 'lm' : Levenberg-Marquardt algorithm as implemented in MINPACK.
+          Doesn't handle bounds and sparse Jacobians. Usually the most
+          efficient method for small unconstrained problems.
+
+        Default is 'trf'. See Notes for more information.
+    ftol : float or None, optional
+        Tolerance for termination by the change of the cost function. Default
+        is 1e-8. The optimization process is stopped when ``dF < ftol * F``,
+        and there was an adequate agreement between a local quadratic model and
+        the true model in the last step.
+
+        If None and 'method' is not 'lm', the termination by this condition is
+        disabled. If 'method' is 'lm', this tolerance must be higher than
+        machine epsilon.
+    xtol : float or None, optional
+        Tolerance for termination by the change of the independent variables.
+        Default is 1e-8. The exact condition depends on the `method` used:
+
+        * For 'trf' and 'dogbox' : ``norm(dx) < xtol * (xtol + norm(x))``.
+        * For 'lm' : ``Delta < xtol * norm(xs)``, where ``Delta`` is
+          a trust-region radius and ``xs`` is the value of ``x``
+          scaled according to `x_scale` parameter (see below).
+
+        If None and 'method' is not 'lm', the termination by this condition is
+        disabled. If 'method' is 'lm', this tolerance must be higher than
+        machine epsilon.
+    gtol : float or None, optional
+        Tolerance for termination by the norm of the gradient. Default is 1e-8.
+        The exact condition depends on a `method` used:
+
+        * For 'trf' : ``norm(g_scaled, ord=np.inf) < gtol``, where
+          ``g_scaled`` is the value of the gradient scaled to account for
+          the presence of the bounds [STIR]_.
+        * For 'dogbox' : ``norm(g_free, ord=np.inf) < gtol``, where
+          ``g_free`` is the gradient with respect to the variables which
+          are not in the optimal state on the boundary.
+        * For 'lm' : the maximum absolute value of the cosine of angles
+          between columns of the Jacobian and the residual vector is less
+          than `gtol`, or the residual vector is zero.
+
+        If None and 'method' is not 'lm', the termination by this condition is
+        disabled. If 'method' is 'lm', this tolerance must be higher than
+        machine epsilon.
+    x_scale : array_like or 'jac', optional
+        Characteristic scale of each variable. Setting `x_scale` is equivalent
+        to reformulating the problem in scaled variables ``xs = x / x_scale``.
+        An alternative view is that the size of a trust region along jth
+        dimension is proportional to ``x_scale[j]``. Improved convergence may
+        be achieved by setting `x_scale` such that a step of a given size
+        along any of the scaled variables has a similar effect on the cost
+        function. If set to 'jac', the scale is iteratively updated using the
+        inverse norms of the columns of the Jacobian matrix (as described in
+        [JJMore]_).
+    loss : str or callable, optional
+        Determines the loss function. The following keyword values are allowed:
+
+        * 'linear' (default) : ``rho(z) = z``. Gives a standard
+          least-squares problem.
+        * 'soft_l1' : ``rho(z) = 2 * ((1 + z)**0.5 - 1)``. The smooth
+          approximation of l1 (absolute value) loss. Usually a good
+          choice for robust least squares.
+        * 'huber' : ``rho(z) = z if z <= 1 else 2*z**0.5 - 1``. Works
+          similarly to 'soft_l1'.
+        * 'cauchy' : ``rho(z) = ln(1 + z)``. Severely weakens outliers
+          influence, but may cause difficulties in optimization process.
+        * 'arctan' : ``rho(z) = arctan(z)``. Limits a maximum loss on
+          a single residual, has properties similar to 'cauchy'.
+
+        If callable, it must take a 1-D ndarray ``z=f**2`` and return an
+        array_like with shape (3, m) where row 0 contains function values,
+        row 1 contains first derivatives and row 2 contains second
+        derivatives. Method 'lm' supports only 'linear' loss.
+    f_scale : float, optional
+        Value of soft margin between inlier and outlier residuals, default
+        is 1.0. The loss function is evaluated as follows
+        ``rho_(f**2) = C**2 * rho(f**2 / C**2)``, where ``C`` is `f_scale`,
+        and ``rho`` is determined by `loss` parameter. This parameter has
+        no effect with ``loss='linear'``, but for other `loss` values it is
+        of crucial importance.
+    max_nfev : None or int, optional
+        Maximum number of function evaluations before the termination.
+        If None (default), the value is chosen automatically:
+
+        * For 'trf' and 'dogbox' : 100 * n.
+        * For 'lm' :  100 * n if `jac` is callable and 100 * n * (n + 1)
+          otherwise (because 'lm' counts function calls in Jacobian
+          estimation).
+
+    diff_step : None or array_like, optional
+        Determines the relative step size for the finite difference
+        approximation of the Jacobian. The actual step is computed as
+        ``x * diff_step``. If None (default), then `diff_step` is taken to be
+        a conventional "optimal" power of machine epsilon for the finite
+        difference scheme used [NR]_.
+    tr_solver : {None, 'exact', 'lsmr'}, optional
+        Method for solving trust-region subproblems, relevant only for 'trf'
+        and 'dogbox' methods.
+
+        * 'exact' is suitable for not very large problems with dense
+          Jacobian matrices. The computational complexity per iteration is
+          comparable to a singular value decomposition of the Jacobian
+          matrix.
+        * 'lsmr' is suitable for problems with sparse and large Jacobian
+          matrices. It uses the iterative procedure
+          `scipy.sparse.linalg.lsmr` for finding a solution of a linear
+          least-squares problem and only requires matrix-vector product
+          evaluations.
+
+        If None (default), the solver is chosen based on the type of Jacobian
+        returned on the first iteration.
+    tr_options : dict, optional
+        Keyword options passed to trust-region solver.
+
+        * ``tr_solver='exact'``: `tr_options` are ignored.
+        * ``tr_solver='lsmr'``: options for `scipy.sparse.linalg.lsmr`.
+          Additionally,  ``method='trf'`` supports  'regularize' option
+          (bool, default is True), which adds a regularization term to the
+          normal equation, which improves convergence if the Jacobian is
+          rank-deficient [Byrd]_ (eq. 3.4).
+
+    jac_sparsity : {None, array_like, sparse matrix}, optional
+        Defines the sparsity structure of the Jacobian matrix for finite
+        difference estimation, its shape must be (m, n). If the Jacobian has
+        only few non-zero elements in *each* row, providing the sparsity
+        structure will greatly speed up the computations [Curtis]_. A zero
+        entry means that a corresponding element in the Jacobian is identically
+        zero. If provided, forces the use of 'lsmr' trust-region solver.
+        If None (default), then dense differencing will be used. Has no effect
+        for 'lm' method.
+    verbose : {0, 1, 2}, optional
+        Level of algorithm's verbosity:
+
+        * 0 (default) : work silently.
+        * 1 : display a termination report.
+        * 2 : display progress during iterations (not supported by 'lm'
+          method).
+
+    args, kwargs : tuple and dict, optional
+        Additional arguments passed to `fun` and `jac`. Both empty by default.
+        The calling signature is ``fun(x, *args, **kwargs)`` and the same for
+        `jac`.
+
+    Returns
+    -------
+    result : OptimizeResult
+        `OptimizeResult` with the following fields defined:
+
+        x : ndarray, shape (n,)
+            Solution found.
+        cost : float
+            Value of the cost function at the solution.
+        fun : ndarray, shape (m,)
+            Vector of residuals at the solution.
+        jac : ndarray, sparse matrix or LinearOperator, shape (m, n)
+            Modified Jacobian matrix at the solution, in the sense that J^T J
+            is a Gauss-Newton approximation of the Hessian of the cost function.
+            The type is the same as the one used by the algorithm.
+        grad : ndarray, shape (m,)
+            Gradient of the cost function at the solution.
+        optimality : float
+            First-order optimality measure. In unconstrained problems, it is
+            always the uniform norm of the gradient. In constrained problems,
+            it is the quantity which was compared with `gtol` during iterations.
+        active_mask : ndarray of int, shape (n,)
+            Each component shows whether a corresponding constraint is active
+            (that is, whether a variable is at the bound):
+
+            *  0 : a constraint is not active.
+            * -1 : a lower bound is active.
+            *  1 : an upper bound is active.
+
+            Might be somewhat arbitrary for 'trf' method as it generates a
+            sequence of strictly feasible iterates and `active_mask` is
+            determined within a tolerance threshold.
+        nfev : int
+            Number of function evaluations done. Methods 'trf' and 'dogbox' do
+            not count function calls for numerical Jacobian approximation, as
+            opposed to 'lm' method.
+        njev : int or None
+            Number of Jacobian evaluations done. If numerical Jacobian
+            approximation is used in 'lm' method, it is set to None.
+        status : int
+            The reason for algorithm termination:
+
+            * -1 : improper input parameters status returned from MINPACK.
+            *  0 : the maximum number of function evaluations is exceeded.
+            *  1 : `gtol` termination condition is satisfied.
+            *  2 : `ftol` termination condition is satisfied.
+            *  3 : `xtol` termination condition is satisfied.
+            *  4 : Both `ftol` and `xtol` termination conditions are satisfied.
+
+        message : str
+            Verbal description of the termination reason.
+        success : bool
+            True if one of the convergence criteria is satisfied (`status` > 0).
+
+    See Also
+    --------
+    leastsq : A legacy wrapper for the MINPACK implementation of the
+              Levenberg-Marquadt algorithm.
+    curve_fit : Least-squares minimization applied to a curve-fitting problem.
+
+    Notes
+    -----
+    Method 'lm' (Levenberg-Marquardt) calls a wrapper over least-squares
+    algorithms implemented in MINPACK (lmder, lmdif). It runs the
+    Levenberg-Marquardt algorithm formulated as a trust-region type algorithm.
+    The implementation is based on paper [JJMore]_, it is very robust and
+    efficient with a lot of smart tricks. It should be your first choice
+    for unconstrained problems. Note that it doesn't support bounds. Also,
+    it doesn't work when m < n.
+
+    Method 'trf' (Trust Region Reflective) is motivated by the process of
+    solving a system of equations, which constitute the first-order optimality
+    condition for a bound-constrained minimization problem as formulated in
+    [STIR]_. The algorithm iteratively solves trust-region subproblems
+    augmented by a special diagonal quadratic term and with trust-region shape
+    determined by the distance from the bounds and the direction of the
+    gradient. This enhancements help to avoid making steps directly into bounds
+    and efficiently explore the whole space of variables. To further improve
+    convergence, the algorithm considers search directions reflected from the
+    bounds. To obey theoretical requirements, the algorithm keeps iterates
+    strictly feasible. With dense Jacobians trust-region subproblems are
+    solved by an exact method very similar to the one described in [JJMore]_
+    (and implemented in MINPACK). The difference from the MINPACK
+    implementation is that a singular value decomposition of a Jacobian
+    matrix is done once per iteration, instead of a QR decomposition and series
+    of Givens rotation eliminations. For large sparse Jacobians a 2-D subspace
+    approach of solving trust-region subproblems is used [STIR]_, [Byrd]_.
+    The subspace is spanned by a scaled gradient and an approximate
+    Gauss-Newton solution delivered by `scipy.sparse.linalg.lsmr`. When no
+    constraints are imposed the algorithm is very similar to MINPACK and has
+    generally comparable performance. The algorithm works quite robust in
+    unbounded and bounded problems, thus it is chosen as a default algorithm.
+
+    Method 'dogbox' operates in a trust-region framework, but considers
+    rectangular trust regions as opposed to conventional ellipsoids [Voglis]_.
+    The intersection of a current trust region and initial bounds is again
+    rectangular, so on each iteration a quadratic minimization problem subject
+    to bound constraints is solved approximately by Powell's dogleg method
+    [NumOpt]_. The required Gauss-Newton step can be computed exactly for
+    dense Jacobians or approximately by `scipy.sparse.linalg.lsmr` for large
+    sparse Jacobians. The algorithm is likely to exhibit slow convergence when
+    the rank of Jacobian is less than the number of variables. The algorithm
+    often outperforms 'trf' in bounded problems with a small number of
+    variables.
+
+    Robust loss functions are implemented as described in [BA]_. The idea
+    is to modify a residual vector and a Jacobian matrix on each iteration
+    such that computed gradient and Gauss-Newton Hessian approximation match
+    the true gradient and Hessian approximation of the cost function. Then
+    the algorithm proceeds in a normal way, i.e., robust loss functions are
+    implemented as a simple wrapper over standard least-squares algorithms.
+
+    .. versionadded:: 0.17.0
+
+    References
+    ----------
+    .. [STIR] M. A. Branch, T. F. Coleman, and Y. Li, "A Subspace, Interior,
+              and Conjugate Gradient Method for Large-Scale Bound-Constrained
+              Minimization Problems," SIAM Journal on Scientific Computing,
+              Vol. 21, Number 1, pp 1-23, 1999.
+    .. [NR] William H. Press et. al., "Numerical Recipes. The Art of Scientific
+            Computing. 3rd edition", Sec. 5.7.
+    .. [Byrd] R. H. Byrd, R. B. Schnabel and G. A. Shultz, "Approximate
+              solution of the trust region problem by minimization over
+              two-dimensional subspaces", Math. Programming, 40, pp. 247-263,
+              1988.
+    .. [Curtis] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+                sparse Jacobian matrices", Journal of the Institute of
+                Mathematics and its Applications, 13, pp. 117-120, 1974.
+    .. [JJMore] J. J. More, "The Levenberg-Marquardt Algorithm: Implementation
+                and Theory," Numerical Analysis, ed. G. A. Watson, Lecture
+                Notes in Mathematics 630, Springer Verlag, pp. 105-116, 1977.
+    .. [Voglis] C. Voglis and I. E. Lagaris, "A Rectangular Trust Region
+                Dogleg Approach for Unconstrained and Bound Constrained
+                Nonlinear Optimization", WSEAS International Conference on
+                Applied Mathematics, Corfu, Greece, 2004.
+    .. [NumOpt] J. Nocedal and S. J. Wright, "Numerical optimization,
+                2nd edition", Chapter 4.
+    .. [BA] B. Triggs et. al., "Bundle Adjustment - A Modern Synthesis",
+            Proceedings of the International Workshop on Vision Algorithms:
+            Theory and Practice, pp. 298-372, 1999.
+
+    Examples
+    --------
+    In this example we find a minimum of the Rosenbrock function without bounds
+    on independent variables.
+
+    >>> import numpy as np
+    >>> def fun_rosenbrock(x):
+    ...     return np.array([10 * (x[1] - x[0]**2), (1 - x[0])])
+
+    Notice that we only provide the vector of the residuals. The algorithm
+    constructs the cost function as a sum of squares of the residuals, which
+    gives the Rosenbrock function. The exact minimum is at ``x = [1.0, 1.0]``.
+
+    >>> from scipy.optimize import least_squares
+    >>> x0_rosenbrock = np.array([2, 2])
+    >>> res_1 = least_squares(fun_rosenbrock, x0_rosenbrock)
+    >>> res_1.x
+    array([ 1.,  1.])
+    >>> res_1.cost
+    9.8669242910846867e-30
+    >>> res_1.optimality
+    8.8928864934219529e-14
+
+    We now constrain the variables, in such a way that the previous solution
+    becomes infeasible. Specifically, we require that ``x[1] >= 1.5``, and
+    ``x[0]`` left unconstrained. To this end, we specify the `bounds` parameter
+    to `least_squares` in the form ``bounds=([-np.inf, 1.5], np.inf)``.
+
+    We also provide the analytic Jacobian:
+
+    >>> def jac_rosenbrock(x):
+    ...     return np.array([
+    ...         [-20 * x[0], 10],
+    ...         [-1, 0]])
+
+    Putting this all together, we see that the new solution lies on the bound:
+
+    >>> res_2 = least_squares(fun_rosenbrock, x0_rosenbrock, jac_rosenbrock,
+    ...                       bounds=([-np.inf, 1.5], np.inf))
+    >>> res_2.x
+    array([ 1.22437075,  1.5       ])
+    >>> res_2.cost
+    0.025213093946805685
+    >>> res_2.optimality
+    1.5885401433157753e-07
+
+    Now we solve a system of equations (i.e., the cost function should be zero
+    at a minimum) for a Broyden tridiagonal vector-valued function of 100000
+    variables:
+
+    >>> def fun_broyden(x):
+    ...     f = (3 - x) * x + 1
+    ...     f[1:] -= x[:-1]
+    ...     f[:-1] -= 2 * x[1:]
+    ...     return f
+
+    The corresponding Jacobian matrix is sparse. We tell the algorithm to
+    estimate it by finite differences and provide the sparsity structure of
+    Jacobian to significantly speed up this process.
+
+    >>> from scipy.sparse import lil_matrix
+    >>> def sparsity_broyden(n):
+    ...     sparsity = lil_matrix((n, n), dtype=int)
+    ...     i = np.arange(n)
+    ...     sparsity[i, i] = 1
+    ...     i = np.arange(1, n)
+    ...     sparsity[i, i - 1] = 1
+    ...     i = np.arange(n - 1)
+    ...     sparsity[i, i + 1] = 1
+    ...     return sparsity
+    ...
+    >>> n = 100000
+    >>> x0_broyden = -np.ones(n)
+    ...
+    >>> res_3 = least_squares(fun_broyden, x0_broyden,
+    ...                       jac_sparsity=sparsity_broyden(n))
+    >>> res_3.cost
+    4.5687069299604613e-23
+    >>> res_3.optimality
+    1.1650454296851518e-11
+
+    Let's also solve a curve fitting problem using robust loss function to
+    take care of outliers in the data. Define the model function as
+    ``y = a + b * exp(c * t)``, where t is a predictor variable, y is an
+    observation and a, b, c are parameters to estimate.
+
+    First, define the function which generates the data with noise and
+    outliers, define the model parameters, and generate data:
+
+    >>> from numpy.random import default_rng
+    >>> rng = default_rng()
+    >>> def gen_data(t, a, b, c, noise=0., n_outliers=0, seed=None):
+    ...     rng = default_rng(seed)
+    ...
+    ...     y = a + b * np.exp(t * c)
+    ...
+    ...     error = noise * rng.standard_normal(t.size)
+    ...     outliers = rng.integers(0, t.size, n_outliers)
+    ...     error[outliers] *= 10
+    ...
+    ...     return y + error
+    ...
+    >>> a = 0.5
+    >>> b = 2.0
+    >>> c = -1
+    >>> t_min = 0
+    >>> t_max = 10
+    >>> n_points = 15
+    ...
+    >>> t_train = np.linspace(t_min, t_max, n_points)
+    >>> y_train = gen_data(t_train, a, b, c, noise=0.1, n_outliers=3)
+
+    Define function for computing residuals and initial estimate of
+    parameters.
+
+    >>> def fun(x, t, y):
+    ...     return x[0] + x[1] * np.exp(x[2] * t) - y
+    ...
+    >>> x0 = np.array([1.0, 1.0, 0.0])
+
+    Compute a standard least-squares solution:
+
+    >>> res_lsq = least_squares(fun, x0, args=(t_train, y_train))
+
+    Now compute two solutions with two different robust loss functions. The
+    parameter `f_scale` is set to 0.1, meaning that inlier residuals should
+    not significantly exceed 0.1 (the noise level used).
+
+    >>> res_soft_l1 = least_squares(fun, x0, loss='soft_l1', f_scale=0.1,
+    ...                             args=(t_train, y_train))
+    >>> res_log = least_squares(fun, x0, loss='cauchy', f_scale=0.1,
+    ...                         args=(t_train, y_train))
+
+    And, finally, plot all the curves. We see that by selecting an appropriate
+    `loss`  we can get estimates close to optimal even in the presence of
+    strong outliers. But keep in mind that generally it is recommended to try
+    'soft_l1' or 'huber' losses first (if at all necessary) as the other two
+    options may cause difficulties in optimization process.
+
+    >>> t_test = np.linspace(t_min, t_max, n_points * 10)
+    >>> y_true = gen_data(t_test, a, b, c)
+    >>> y_lsq = gen_data(t_test, *res_lsq.x)
+    >>> y_soft_l1 = gen_data(t_test, *res_soft_l1.x)
+    >>> y_log = gen_data(t_test, *res_log.x)
+    ...
+    >>> import matplotlib.pyplot as plt
+    >>> plt.plot(t_train, y_train, 'o')
+    >>> plt.plot(t_test, y_true, 'k', linewidth=2, label='true')
+    >>> plt.plot(t_test, y_lsq, label='linear loss')
+    >>> plt.plot(t_test, y_soft_l1, label='soft_l1 loss')
+    >>> plt.plot(t_test, y_log, label='cauchy loss')
+    >>> plt.xlabel("t")
+    >>> plt.ylabel("y")
+    >>> plt.legend()
+    >>> plt.show()
+
+    In the next example, we show how complex-valued residual functions of
+    complex variables can be optimized with ``least_squares()``. Consider the
+    following function:
+
+    >>> def f(z):
+    ...     return z - (0.5 + 0.5j)
+
+    We wrap it into a function of real variables that returns real residuals
+    by simply handling the real and imaginary parts as independent variables:
+
+    >>> def f_wrap(x):
+    ...     fx = f(x[0] + 1j*x[1])
+    ...     return np.array([fx.real, fx.imag])
+
+    Thus, instead of the original m-D complex function of n complex
+    variables we optimize a 2m-D real function of 2n real variables:
+
+    >>> from scipy.optimize import least_squares
+    >>> res_wrapped = least_squares(f_wrap, (0.1, 0.1), bounds=([0, 0], [1, 1]))
+    >>> z = res_wrapped.x[0] + res_wrapped.x[1]*1j
+    >>> z
+    (0.49999999999925893+0.49999999999925893j)
+
+    """
+    if method not in ['trf', 'dogbox', 'lm']:
+        raise ValueError("`method` must be 'trf', 'dogbox' or 'lm'.")
+
+    if jac not in ['2-point', '3-point', 'cs'] and not callable(jac):
+        raise ValueError("`jac` must be '2-point', '3-point', 'cs' or "
+                         "callable.")
+
+    if tr_solver not in [None, 'exact', 'lsmr']:
+        raise ValueError("`tr_solver` must be None, 'exact' or 'lsmr'.")
+
+    if loss not in IMPLEMENTED_LOSSES and not callable(loss):
+        raise ValueError(f"`loss` must be one of {IMPLEMENTED_LOSSES.keys()}"
+                         " or a callable.")
+
+    if method == 'lm' and loss != 'linear':
+        raise ValueError("method='lm' supports only 'linear' loss function.")
+
+    if verbose not in [0, 1, 2]:
+        raise ValueError("`verbose` must be in [0, 1, 2].")
+
+    if max_nfev is not None and max_nfev <= 0:
+        raise ValueError("`max_nfev` must be None or positive integer.")
+
+    if np.iscomplexobj(x0):
+        raise ValueError("`x0` must be real.")
+
+    x0 = np.atleast_1d(x0).astype(float)
+
+    if x0.ndim > 1:
+        raise ValueError("`x0` must have at most 1 dimension.")
+
+    if isinstance(bounds, Bounds):
+        lb, ub = bounds.lb, bounds.ub
+        bounds = (lb, ub)
+    else:
+        if len(bounds) == 2:
+            lb, ub = prepare_bounds(bounds, x0.shape[0])
+        else:
+            raise ValueError("`bounds` must contain 2 elements.")
+
+    if method == 'lm' and not np.all((lb == -np.inf) & (ub == np.inf)):
+        raise ValueError("Method 'lm' doesn't support bounds.")
+
+    if lb.shape != x0.shape or ub.shape != x0.shape:
+        raise ValueError("Inconsistent shapes between bounds and `x0`.")
+
+    if np.any(lb >= ub):
+        raise ValueError("Each lower bound must be strictly less than each "
+                         "upper bound.")
+
+    if not in_bounds(x0, lb, ub):
+        raise ValueError("Initial guess is outside of provided bounds")
+
+    x_scale = check_x_scale(x_scale, x0)
+
+    ftol, xtol, gtol = check_tolerance(ftol, xtol, gtol, method)
+
+    if method == 'trf':
+        x0 = make_strictly_feasible(x0, lb, ub)
+
+    if kwargs is None:
+        kwargs = {}
+    if tr_options is None:
+        tr_options = {}
+
+    def fun_wrapped(x):
+        return np.atleast_1d(fun(x, *args, **kwargs))
+
+    f0 = fun_wrapped(x0)
+
+    if f0.ndim != 1:
+        raise ValueError("`fun` must return at most 1-d array_like. "
+                         f"f0.shape: {f0.shape}")
+
+    if not np.all(np.isfinite(f0)):
+        raise ValueError("Residuals are not finite in the initial point.")
+
+    n = x0.size
+    m = f0.size
+
+    if method == 'lm' and m < n:
+        raise ValueError("Method 'lm' doesn't work when the number of "
+                         "residuals is less than the number of variables.")
+
+    loss_function = construct_loss_function(m, loss, f_scale)
+    if callable(loss):
+        rho = loss_function(f0)
+        if rho.shape != (3, m):
+            raise ValueError("The return value of `loss` callable has wrong "
+                             "shape.")
+        initial_cost = 0.5 * np.sum(rho[0])
+    elif loss_function is not None:
+        initial_cost = loss_function(f0, cost_only=True)
+    else:
+        initial_cost = 0.5 * np.dot(f0, f0)
+
+    if callable(jac):
+        J0 = jac(x0, *args, **kwargs)
+
+        if issparse(J0):
+            J0 = J0.tocsr()
+
+            def jac_wrapped(x, _=None):
+                return jac(x, *args, **kwargs).tocsr()
+
+        elif isinstance(J0, LinearOperator):
+            def jac_wrapped(x, _=None):
+                return jac(x, *args, **kwargs)
+
+        else:
+            J0 = np.atleast_2d(J0)
+
+            def jac_wrapped(x, _=None):
+                return np.atleast_2d(jac(x, *args, **kwargs))
+
+    else:  # Estimate Jacobian by finite differences.
+        if method == 'lm':
+            if jac_sparsity is not None:
+                raise ValueError("method='lm' does not support "
+                                 "`jac_sparsity`.")
+
+            if jac != '2-point':
+                warn(f"jac='{jac}' works equivalently to '2-point' for method='lm'.",
+                     stacklevel=2)
+
+            J0 = jac_wrapped = None
+        else:
+            if jac_sparsity is not None and tr_solver == 'exact':
+                raise ValueError("tr_solver='exact' is incompatible "
+                                 "with `jac_sparsity`.")
+
+            jac_sparsity = check_jac_sparsity(jac_sparsity, m, n)
+
+            def jac_wrapped(x, f):
+                J = approx_derivative(fun, x, rel_step=diff_step, method=jac,
+                                      f0=f, bounds=bounds, args=args,
+                                      kwargs=kwargs, sparsity=jac_sparsity)
+                if J.ndim != 2:  # J is guaranteed not sparse.
+                    J = np.atleast_2d(J)
+
+                return J
+
+            J0 = jac_wrapped(x0, f0)
+
+    if J0 is not None:
+        if J0.shape != (m, n):
+            raise ValueError(
+                f"The return value of `jac` has wrong shape: expected {(m, n)}, "
+                f"actual {J0.shape}."
+            )
+
+        if not isinstance(J0, np.ndarray):
+            if method == 'lm':
+                raise ValueError("method='lm' works only with dense "
+                                 "Jacobian matrices.")
+
+            if tr_solver == 'exact':
+                raise ValueError(
+                    "tr_solver='exact' works only with dense "
+                    "Jacobian matrices.")
+
+        jac_scale = isinstance(x_scale, str) and x_scale == 'jac'
+        if isinstance(J0, LinearOperator) and jac_scale:
+            raise ValueError("x_scale='jac' can't be used when `jac` "
+                             "returns LinearOperator.")
+
+        if tr_solver is None:
+            if isinstance(J0, np.ndarray):
+                tr_solver = 'exact'
+            else:
+                tr_solver = 'lsmr'
+
+    if method == 'lm':
+        result = call_minpack(fun_wrapped, x0, jac_wrapped, ftol, xtol, gtol,
+                              max_nfev, x_scale, diff_step)
+
+    elif method == 'trf':
+        result = trf(fun_wrapped, jac_wrapped, x0, f0, J0, lb, ub, ftol, xtol,
+                     gtol, max_nfev, x_scale, loss_function, tr_solver,
+                     tr_options.copy(), verbose)
+
+    elif method == 'dogbox':
+        if tr_solver == 'lsmr' and 'regularize' in tr_options:
+            warn("The keyword 'regularize' in `tr_options` is not relevant "
+                 "for 'dogbox' method.",
+                 stacklevel=2)
+            tr_options = tr_options.copy()
+            del tr_options['regularize']
+
+        result = dogbox(fun_wrapped, jac_wrapped, x0, f0, J0, lb, ub, ftol,
+                        xtol, gtol, max_nfev, x_scale, loss_function,
+                        tr_solver, tr_options, verbose)
+
+    result.message = TERMINATION_MESSAGES[result.status]
+    result.success = result.status > 0
+
+    if verbose >= 1:
+        print(result.message)
+        print(f"Function evaluations {result.nfev}, initial cost {initial_cost:.4e}, "
+              f"final cost {result.cost:.4e}, "
+              f"first-order optimality {result.optimality:.2e}.")
+
+    return result
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/lsq_linear.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/lsq_linear.py
new file mode 100644
index 0000000000000000000000000000000000000000..b077c45e40874fc63490748f75f8463bc2adb08d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/lsq_linear.py
@@ -0,0 +1,361 @@
+"""Linear least squares with bound constraints on independent variables."""
+import numpy as np
+from numpy.linalg import norm
+from scipy.sparse import issparse, csr_matrix
+from scipy.sparse.linalg import LinearOperator, lsmr
+from scipy.optimize import OptimizeResult
+from scipy.optimize._minimize import Bounds
+
+from .common import in_bounds, compute_grad
+from .trf_linear import trf_linear
+from .bvls import bvls
+
+
+def prepare_bounds(bounds, n):
+    if len(bounds) != 2:
+        raise ValueError("`bounds` must contain 2 elements.")
+    lb, ub = (np.asarray(b, dtype=float) for b in bounds)
+
+    if lb.ndim == 0:
+        lb = np.resize(lb, n)
+
+    if ub.ndim == 0:
+        ub = np.resize(ub, n)
+
+    return lb, ub
+
+
+TERMINATION_MESSAGES = {
+    -1: "The algorithm was not able to make progress on the last iteration.",
+    0: "The maximum number of iterations is exceeded.",
+    1: "The first-order optimality measure is less than `tol`.",
+    2: "The relative change of the cost function is less than `tol`.",
+    3: "The unconstrained solution is optimal."
+}
+
+
+def lsq_linear(A, b, bounds=(-np.inf, np.inf), method='trf', tol=1e-10,
+               lsq_solver=None, lsmr_tol=None, max_iter=None,
+               verbose=0, *, lsmr_maxiter=None,):
+    r"""Solve a linear least-squares problem with bounds on the variables.
+
+    Given a m-by-n design matrix A and a target vector b with m elements,
+    `lsq_linear` solves the following optimization problem::
+
+        minimize 0.5 * ||A x - b||**2
+        subject to lb <= x <= ub
+
+    This optimization problem is convex, hence a found minimum (if iterations
+    have converged) is guaranteed to be global.
+
+    Parameters
+    ----------
+    A : array_like, sparse matrix of LinearOperator, shape (m, n)
+        Design matrix. Can be `scipy.sparse.linalg.LinearOperator`.
+    b : array_like, shape (m,)
+        Target vector.
+    bounds : 2-tuple of array_like or `Bounds`, optional
+        Lower and upper bounds on parameters. Defaults to no bounds.
+        There are two ways to specify the bounds:
+
+        - Instance of `Bounds` class.
+        - 2-tuple of array_like: Each element of the tuple must be either
+          an array with the length equal to the number of parameters, or a
+          scalar (in which case the bound is taken to be the same for all
+          parameters). Use ``np.inf`` with an appropriate sign to disable
+          bounds on all or some parameters.
+
+    method : 'trf' or 'bvls', optional
+        Method to perform minimization.
+
+        * 'trf' : Trust Region Reflective algorithm adapted for a linear
+          least-squares problem. This is an interior-point-like method
+          and the required number of iterations is weakly correlated with
+          the number of variables.
+        * 'bvls' : Bounded-variable least-squares algorithm. This is
+          an active set method, which requires the number of iterations
+          comparable to the number of variables. Can't be used when `A` is
+          sparse or LinearOperator.
+
+        Default is 'trf'.
+    tol : float, optional
+        Tolerance parameter. The algorithm terminates if a relative change
+        of the cost function is less than `tol` on the last iteration.
+        Additionally, the first-order optimality measure is considered:
+
+        * ``method='trf'`` terminates if the uniform norm of the gradient,
+          scaled to account for the presence of the bounds, is less than
+          `tol`.
+        * ``method='bvls'`` terminates if Karush-Kuhn-Tucker conditions
+          are satisfied within `tol` tolerance.
+
+    lsq_solver : {None, 'exact', 'lsmr'}, optional
+        Method of solving unbounded least-squares problems throughout
+        iterations:
+
+        * 'exact' : Use dense QR or SVD decomposition approach. Can't be
+          used when `A` is sparse or LinearOperator.
+        * 'lsmr' : Use `scipy.sparse.linalg.lsmr` iterative procedure
+          which requires only matrix-vector product evaluations. Can't
+          be used with ``method='bvls'``.
+
+        If None (default), the solver is chosen based on type of `A`.
+    lsmr_tol : None, float or 'auto', optional
+        Tolerance parameters 'atol' and 'btol' for `scipy.sparse.linalg.lsmr`
+        If None (default), it is set to ``1e-2 * tol``. If 'auto', the
+        tolerance will be adjusted based on the optimality of the current
+        iterate, which can speed up the optimization process, but is not always
+        reliable.
+    max_iter : None or int, optional
+        Maximum number of iterations before termination. If None (default), it
+        is set to 100 for ``method='trf'`` or to the number of variables for
+        ``method='bvls'`` (not counting iterations for 'bvls' initialization).
+    verbose : {0, 1, 2}, optional
+        Level of algorithm's verbosity:
+
+        * 0 : work silently (default).
+        * 1 : display a termination report.
+        * 2 : display progress during iterations.
+
+    lsmr_maxiter : None or int, optional
+        Maximum number of iterations for the lsmr least squares solver,
+        if it is used (by setting ``lsq_solver='lsmr'``). If None (default), it
+        uses lsmr's default of ``min(m, n)`` where ``m`` and ``n`` are the
+        number of rows and columns of `A`, respectively. Has no effect if
+        ``lsq_solver='exact'``.
+
+    Returns
+    -------
+    OptimizeResult with the following fields defined:
+    x : ndarray, shape (n,)
+        Solution found.
+    cost : float
+        Value of the cost function at the solution.
+    fun : ndarray, shape (m,)
+        Vector of residuals at the solution.
+    optimality : float
+        First-order optimality measure. The exact meaning depends on `method`,
+        refer to the description of `tol` parameter.
+    active_mask : ndarray of int, shape (n,)
+        Each component shows whether a corresponding constraint is active
+        (that is, whether a variable is at the bound):
+
+        *  0 : a constraint is not active.
+        * -1 : a lower bound is active.
+        *  1 : an upper bound is active.
+
+        Might be somewhat arbitrary for the `trf` method as it generates a
+        sequence of strictly feasible iterates and active_mask is determined
+        within a tolerance threshold.
+    unbounded_sol : tuple
+        Unbounded least squares solution tuple returned by the least squares
+        solver (set with `lsq_solver` option). If `lsq_solver` is not set or is
+        set to ``'exact'``, the tuple contains an ndarray of shape (n,) with
+        the unbounded solution, an ndarray with the sum of squared residuals,
+        an int with the rank of `A`, and an ndarray with the singular values
+        of `A` (see NumPy's ``linalg.lstsq`` for more information). If
+        `lsq_solver` is set to ``'lsmr'``, the tuple contains an ndarray of
+        shape (n,) with the unbounded solution, an int with the exit code,
+        an int with the number of iterations, and five floats with
+        various norms and the condition number of `A` (see SciPy's
+        ``sparse.linalg.lsmr`` for more information). This output can be
+        useful for determining the convergence of the least squares solver,
+        particularly the iterative ``'lsmr'`` solver. The unbounded least
+        squares problem is to minimize ``0.5 * ||A x - b||**2``.
+    nit : int
+        Number of iterations. Zero if the unconstrained solution is optimal.
+    status : int
+        Reason for algorithm termination:
+
+        * -1 : the algorithm was not able to make progress on the last
+          iteration.
+        *  0 : the maximum number of iterations is exceeded.
+        *  1 : the first-order optimality measure is less than `tol`.
+        *  2 : the relative change of the cost function is less than `tol`.
+        *  3 : the unconstrained solution is optimal.
+
+    message : str
+        Verbal description of the termination reason.
+    success : bool
+        True if one of the convergence criteria is satisfied (`status` > 0).
+
+    See Also
+    --------
+    nnls : Linear least squares with non-negativity constraint.
+    least_squares : Nonlinear least squares with bounds on the variables.
+
+    Notes
+    -----
+    The algorithm first computes the unconstrained least-squares solution by
+    `numpy.linalg.lstsq` or `scipy.sparse.linalg.lsmr` depending on
+    `lsq_solver`. This solution is returned as optimal if it lies within the
+    bounds.
+
+    Method 'trf' runs the adaptation of the algorithm described in [STIR]_ for
+    a linear least-squares problem. The iterations are essentially the same as
+    in the nonlinear least-squares algorithm, but as the quadratic function
+    model is always accurate, we don't need to track or modify the radius of
+    a trust region. The line search (backtracking) is used as a safety net
+    when a selected step does not decrease the cost function. Read more
+    detailed description of the algorithm in `scipy.optimize.least_squares`.
+
+    Method 'bvls' runs a Python implementation of the algorithm described in
+    [BVLS]_. The algorithm maintains active and free sets of variables, on
+    each iteration chooses a new variable to move from the active set to the
+    free set and then solves the unconstrained least-squares problem on free
+    variables. This algorithm is guaranteed to give an accurate solution
+    eventually, but may require up to n iterations for a problem with n
+    variables. Additionally, an ad-hoc initialization procedure is
+    implemented, that determines which variables to set free or active
+    initially. It takes some number of iterations before actual BVLS starts,
+    but can significantly reduce the number of further iterations.
+
+    References
+    ----------
+    .. [STIR] M. A. Branch, T. F. Coleman, and Y. Li, "A Subspace, Interior,
+              and Conjugate Gradient Method for Large-Scale Bound-Constrained
+              Minimization Problems," SIAM Journal on Scientific Computing,
+              Vol. 21, Number 1, pp 1-23, 1999.
+    .. [BVLS] P. B. Start and R. L. Parker, "Bounded-Variable Least-Squares:
+              an Algorithm and Applications", Computational Statistics, 10,
+              129-141, 1995.
+
+    Examples
+    --------
+    In this example, a problem with a large sparse matrix and bounds on the
+    variables is solved.
+
+    >>> import numpy as np
+    >>> from scipy.sparse import rand
+    >>> from scipy.optimize import lsq_linear
+    >>> rng = np.random.default_rng()
+    ...
+    >>> m = 2000
+    >>> n = 1000
+    ...
+    >>> A = rand(m, n, density=1e-4, random_state=rng)
+    >>> b = rng.standard_normal(m)
+    ...
+    >>> lb = rng.standard_normal(n)
+    >>> ub = lb + 1
+    ...
+    >>> res = lsq_linear(A, b, bounds=(lb, ub), lsmr_tol='auto', verbose=1)
+    The relative change of the cost function is less than `tol`.
+    Number of iterations 10, initial cost 1.0070e+03, final cost 9.6602e+02,
+    first-order optimality 2.21e-09.        # may vary
+    """
+    if method not in ['trf', 'bvls']:
+        raise ValueError("`method` must be 'trf' or 'bvls'")
+
+    if lsq_solver not in [None, 'exact', 'lsmr']:
+        raise ValueError("`solver` must be None, 'exact' or 'lsmr'.")
+
+    if verbose not in [0, 1, 2]:
+        raise ValueError("`verbose` must be in [0, 1, 2].")
+
+    if issparse(A):
+        A = csr_matrix(A)
+    elif not isinstance(A, LinearOperator):
+        A = np.atleast_2d(np.asarray(A))
+
+    if method == 'bvls':
+        if lsq_solver == 'lsmr':
+            raise ValueError("method='bvls' can't be used with "
+                             "lsq_solver='lsmr'")
+
+        if not isinstance(A, np.ndarray):
+            raise ValueError("method='bvls' can't be used with `A` being "
+                             "sparse or LinearOperator.")
+
+    if lsq_solver is None:
+        if isinstance(A, np.ndarray):
+            lsq_solver = 'exact'
+        else:
+            lsq_solver = 'lsmr'
+    elif lsq_solver == 'exact' and not isinstance(A, np.ndarray):
+        raise ValueError("`exact` solver can't be used when `A` is "
+                         "sparse or LinearOperator.")
+
+    if len(A.shape) != 2:  # No ndim for LinearOperator.
+        raise ValueError("`A` must have at most 2 dimensions.")
+
+    if max_iter is not None and max_iter <= 0:
+        raise ValueError("`max_iter` must be None or positive integer.")
+
+    m, n = A.shape
+
+    b = np.atleast_1d(b)
+    if b.ndim != 1:
+        raise ValueError("`b` must have at most 1 dimension.")
+
+    if b.size != m:
+        raise ValueError("Inconsistent shapes between `A` and `b`.")
+
+    if isinstance(bounds, Bounds):
+        lb = bounds.lb
+        ub = bounds.ub
+    else:
+        lb, ub = prepare_bounds(bounds, n)
+
+    if lb.shape != (n,) and ub.shape != (n,):
+        raise ValueError("Bounds have wrong shape.")
+
+    if np.any(lb >= ub):
+        raise ValueError("Each lower bound must be strictly less than each "
+                         "upper bound.")
+
+    if lsmr_maxiter is not None and lsmr_maxiter < 1:
+        raise ValueError("`lsmr_maxiter` must be None or positive integer.")
+
+    if not ((isinstance(lsmr_tol, float) and lsmr_tol > 0) or
+            lsmr_tol in ('auto', None)):
+        raise ValueError("`lsmr_tol` must be None, 'auto', or positive float.")
+
+    if lsq_solver == 'exact':
+        unbd_lsq = np.linalg.lstsq(A, b, rcond=-1)
+    elif lsq_solver == 'lsmr':
+        first_lsmr_tol = lsmr_tol  # tol of first call to lsmr
+        if lsmr_tol is None or lsmr_tol == 'auto':
+            first_lsmr_tol = 1e-2 * tol  # default if lsmr_tol not defined
+        unbd_lsq = lsmr(A, b, maxiter=lsmr_maxiter,
+                        atol=first_lsmr_tol, btol=first_lsmr_tol)
+    x_lsq = unbd_lsq[0]  # extract the solution from the least squares solver
+
+    if in_bounds(x_lsq, lb, ub):
+        r = A @ x_lsq - b
+        cost = 0.5 * np.dot(r, r)
+        termination_status = 3
+        termination_message = TERMINATION_MESSAGES[termination_status]
+        g = compute_grad(A, r)
+        g_norm = norm(g, ord=np.inf)
+
+        if verbose > 0:
+            print(termination_message)
+            print(f"Final cost {cost:.4e}, first-order optimality {g_norm:.2e}")
+
+        return OptimizeResult(
+            x=x_lsq, fun=r, cost=cost, optimality=g_norm,
+            active_mask=np.zeros(n), unbounded_sol=unbd_lsq,
+            nit=0, status=termination_status,
+            message=termination_message, success=True)
+
+    if method == 'trf':
+        res = trf_linear(A, b, x_lsq, lb, ub, tol, lsq_solver, lsmr_tol,
+                         max_iter, verbose, lsmr_maxiter=lsmr_maxiter)
+    elif method == 'bvls':
+        res = bvls(A, b, x_lsq, lb, ub, tol, max_iter, verbose)
+
+    res.unbounded_sol = unbd_lsq
+    res.message = TERMINATION_MESSAGES[res.status]
+    res.success = res.status > 0
+
+    if verbose > 0:
+        print(res.message)
+        print(
+            f"Number of iterations {res.nit}, initial cost {res.initial_cost:.4e}, "
+            f"final cost {res.cost:.4e}, first-order optimality {res.optimality:.2e}."
+        )
+
+    del res.initial_cost
+
+    return res
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf.py
new file mode 100644
index 0000000000000000000000000000000000000000..9154bdba5b2cc41883811ba1820dfc251e515d6c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf.py
@@ -0,0 +1,560 @@
+"""Trust Region Reflective algorithm for least-squares optimization.
+
+The algorithm is based on ideas from paper [STIR]_. The main idea is to
+account for the presence of the bounds by appropriate scaling of the variables (or,
+equivalently, changing a trust-region shape). Let's introduce a vector v:
+
+           | ub[i] - x[i], if g[i] < 0 and ub[i] < np.inf
+    v[i] = | x[i] - lb[i], if g[i] > 0 and lb[i] > -np.inf
+           | 1,           otherwise
+
+where g is the gradient of a cost function and lb, ub are the bounds. Its
+components are distances to the bounds at which the anti-gradient points (if
+this distance is finite). Define a scaling matrix D = diag(v**0.5).
+First-order optimality conditions can be stated as
+
+    D^2 g(x) = 0.
+
+Meaning that components of the gradient should be zero for strictly interior
+variables, and components must point inside the feasible region for variables
+on the bound.
+
+Now consider this system of equations as a new optimization problem. If the
+point x is strictly interior (not on the bound), then the left-hand side is
+differentiable and the Newton step for it satisfies
+
+    (D^2 H + diag(g) Jv) p = -D^2 g
+
+where H is the Hessian matrix (or its J^T J approximation in least squares),
+Jv is the Jacobian matrix of v with components -1, 1 or 0, such that all
+elements of matrix C = diag(g) Jv are non-negative. Introduce the change
+of the variables x = D x_h (_h would be "hat" in LaTeX). In the new variables,
+we have a Newton step satisfying
+
+    B_h p_h = -g_h,
+
+where B_h = D H D + C, g_h = D g. In least squares B_h = J_h^T J_h, where
+J_h = J D. Note that J_h and g_h are proper Jacobian and gradient with respect
+to "hat" variables. To guarantee global convergence we formulate a
+trust-region problem based on the Newton step in the new variables:
+
+    0.5 * p_h^T B_h p + g_h^T p_h -> min, ||p_h|| <= Delta
+
+In the original space B = H + D^{-1} C D^{-1}, and the equivalent trust-region
+problem is
+
+    0.5 * p^T B p + g^T p -> min, ||D^{-1} p|| <= Delta
+
+Here, the meaning of the matrix D becomes more clear: it alters the shape
+of a trust-region, such that large steps towards the bounds are not allowed.
+In the implementation, the trust-region problem is solved in "hat" space,
+but handling of the bounds is done in the original space (see below and read
+the code).
+
+The introduction of the matrix D doesn't allow to ignore bounds, the algorithm
+must keep iterates strictly feasible (to satisfy aforementioned
+differentiability), the parameter theta controls step back from the boundary
+(see the code for details).
+
+The algorithm does another important trick. If the trust-region solution
+doesn't fit into the bounds, then a reflected (from a firstly encountered
+bound) search direction is considered. For motivation and analysis refer to
+[STIR]_ paper (and other papers of the authors). In practice, it doesn't need
+a lot of justifications, the algorithm simply chooses the best step among
+three: a constrained trust-region step, a reflected step and a constrained
+Cauchy step (a minimizer along -g_h in "hat" space, or -D^2 g in the original
+space).
+
+Another feature is that a trust-region radius control strategy is modified to
+account for appearance of the diagonal C matrix (called diag_h in the code).
+
+Note that all described peculiarities are completely gone as we consider
+problems without bounds (the algorithm becomes a standard trust-region type
+algorithm very similar to ones implemented in MINPACK).
+
+The implementation supports two methods of solving the trust-region problem.
+The first, called 'exact', applies SVD on Jacobian and then solves the problem
+very accurately using the algorithm described in [JJMore]_. It is not
+applicable to large problem. The second, called 'lsmr', uses the 2-D subspace
+approach (sometimes called "indefinite dogleg"), where the problem is solved
+in a subspace spanned by the gradient and the approximate Gauss-Newton step
+found by ``scipy.sparse.linalg.lsmr``. A 2-D trust-region problem is
+reformulated as a 4th order algebraic equation and solved very accurately by
+``numpy.roots``. The subspace approach allows to solve very large problems
+(up to couple of millions of residuals on a regular PC), provided the Jacobian
+matrix is sufficiently sparse.
+
+References
+----------
+.. [STIR] Branch, M.A., T.F. Coleman, and Y. Li, "A Subspace, Interior,
+      and Conjugate Gradient Method for Large-Scale Bound-Constrained
+      Minimization Problems," SIAM Journal on Scientific Computing,
+      Vol. 21, Number 1, pp 1-23, 1999.
+.. [JJMore] More, J. J., "The Levenberg-Marquardt Algorithm: Implementation
+    and Theory," Numerical Analysis, ed. G. A. Watson, Lecture
+"""
+import numpy as np
+from numpy.linalg import norm
+from scipy.linalg import svd, qr
+from scipy.sparse.linalg import lsmr
+from scipy.optimize import OptimizeResult
+
+from .common import (
+    step_size_to_bound, find_active_constraints, in_bounds,
+    make_strictly_feasible, intersect_trust_region, solve_lsq_trust_region,
+    solve_trust_region_2d, minimize_quadratic_1d, build_quadratic_1d,
+    evaluate_quadratic, right_multiplied_operator, regularized_lsq_operator,
+    CL_scaling_vector, compute_grad, compute_jac_scale, check_termination,
+    update_tr_radius, scale_for_robust_loss_function, print_header_nonlinear,
+    print_iteration_nonlinear)
+
+
+def trf(fun, jac, x0, f0, J0, lb, ub, ftol, xtol, gtol, max_nfev, x_scale,
+        loss_function, tr_solver, tr_options, verbose):
+    # For efficiency, it makes sense to run the simplified version of the
+    # algorithm when no bounds are imposed. We decided to write the two
+    # separate functions. It violates the DRY principle, but the individual
+    # functions are kept the most readable.
+    if np.all(lb == -np.inf) and np.all(ub == np.inf):
+        return trf_no_bounds(
+            fun, jac, x0, f0, J0, ftol, xtol, gtol, max_nfev, x_scale,
+            loss_function, tr_solver, tr_options, verbose)
+    else:
+        return trf_bounds(
+            fun, jac, x0, f0, J0, lb, ub, ftol, xtol, gtol, max_nfev, x_scale,
+            loss_function, tr_solver, tr_options, verbose)
+
+
+def select_step(x, J_h, diag_h, g_h, p, p_h, d, Delta, lb, ub, theta):
+    """Select the best step according to Trust Region Reflective algorithm."""
+    if in_bounds(x + p, lb, ub):
+        p_value = evaluate_quadratic(J_h, g_h, p_h, diag=diag_h)
+        return p, p_h, -p_value
+
+    p_stride, hits = step_size_to_bound(x, p, lb, ub)
+
+    # Compute the reflected direction.
+    r_h = np.copy(p_h)
+    r_h[hits.astype(bool)] *= -1
+    r = d * r_h
+
+    # Restrict trust-region step, such that it hits the bound.
+    p *= p_stride
+    p_h *= p_stride
+    x_on_bound = x + p
+
+    # Reflected direction will cross first either feasible region or trust
+    # region boundary.
+    _, to_tr = intersect_trust_region(p_h, r_h, Delta)
+    to_bound, _ = step_size_to_bound(x_on_bound, r, lb, ub)
+
+    # Find lower and upper bounds on a step size along the reflected
+    # direction, considering the strict feasibility requirement. There is no
+    # single correct way to do that, the chosen approach seems to work best
+    # on test problems.
+    r_stride = min(to_bound, to_tr)
+    if r_stride > 0:
+        r_stride_l = (1 - theta) * p_stride / r_stride
+        if r_stride == to_bound:
+            r_stride_u = theta * to_bound
+        else:
+            r_stride_u = to_tr
+    else:
+        r_stride_l = 0
+        r_stride_u = -1
+
+    # Check if reflection step is available.
+    if r_stride_l <= r_stride_u:
+        a, b, c = build_quadratic_1d(J_h, g_h, r_h, s0=p_h, diag=diag_h)
+        r_stride, r_value = minimize_quadratic_1d(
+            a, b, r_stride_l, r_stride_u, c=c)
+        r_h *= r_stride
+        r_h += p_h
+        r = r_h * d
+    else:
+        r_value = np.inf
+
+    # Now correct p_h to make it strictly interior.
+    p *= theta
+    p_h *= theta
+    p_value = evaluate_quadratic(J_h, g_h, p_h, diag=diag_h)
+
+    ag_h = -g_h
+    ag = d * ag_h
+
+    to_tr = Delta / norm(ag_h)
+    to_bound, _ = step_size_to_bound(x, ag, lb, ub)
+    if to_bound < to_tr:
+        ag_stride = theta * to_bound
+    else:
+        ag_stride = to_tr
+
+    a, b = build_quadratic_1d(J_h, g_h, ag_h, diag=diag_h)
+    ag_stride, ag_value = minimize_quadratic_1d(a, b, 0, ag_stride)
+    ag_h *= ag_stride
+    ag *= ag_stride
+
+    if p_value < r_value and p_value < ag_value:
+        return p, p_h, -p_value
+    elif r_value < p_value and r_value < ag_value:
+        return r, r_h, -r_value
+    else:
+        return ag, ag_h, -ag_value
+
+
+def trf_bounds(fun, jac, x0, f0, J0, lb, ub, ftol, xtol, gtol, max_nfev,
+               x_scale, loss_function, tr_solver, tr_options, verbose):
+    x = x0.copy()
+
+    f = f0
+    f_true = f.copy()
+    nfev = 1
+
+    J = J0
+    njev = 1
+    m, n = J.shape
+
+    if loss_function is not None:
+        rho = loss_function(f)
+        cost = 0.5 * np.sum(rho[0])
+        J, f = scale_for_robust_loss_function(J, f, rho)
+    else:
+        cost = 0.5 * np.dot(f, f)
+
+    g = compute_grad(J, f)
+
+    jac_scale = isinstance(x_scale, str) and x_scale == 'jac'
+    if jac_scale:
+        scale, scale_inv = compute_jac_scale(J)
+    else:
+        scale, scale_inv = x_scale, 1 / x_scale
+
+    v, dv = CL_scaling_vector(x, g, lb, ub)
+    v[dv != 0] *= scale_inv[dv != 0]
+    Delta = norm(x0 * scale_inv / v**0.5)
+    if Delta == 0:
+        Delta = 1.0
+
+    g_norm = norm(g * v, ord=np.inf)
+
+    f_augmented = np.zeros(m + n)
+    if tr_solver == 'exact':
+        J_augmented = np.empty((m + n, n))
+    elif tr_solver == 'lsmr':
+        reg_term = 0.0
+        regularize = tr_options.pop('regularize', True)
+
+    if max_nfev is None:
+        max_nfev = x0.size * 100
+
+    alpha = 0.0  # "Levenberg-Marquardt" parameter
+
+    termination_status = None
+    iteration = 0
+    step_norm = None
+    actual_reduction = None
+
+    if verbose == 2:
+        print_header_nonlinear()
+
+    while True:
+        v, dv = CL_scaling_vector(x, g, lb, ub)
+
+        g_norm = norm(g * v, ord=np.inf)
+        if g_norm < gtol:
+            termination_status = 1
+
+        if verbose == 2:
+            print_iteration_nonlinear(iteration, nfev, cost, actual_reduction,
+                                      step_norm, g_norm)
+
+        if termination_status is not None or nfev == max_nfev:
+            break
+
+        # Now compute variables in "hat" space. Here, we also account for
+        # scaling introduced by `x_scale` parameter. This part is a bit tricky,
+        # you have to write down the formulas and see how the trust-region
+        # problem is formulated when the two types of scaling are applied.
+        # The idea is that first we apply `x_scale` and then apply Coleman-Li
+        # approach in the new variables.
+
+        # v is recomputed in the variables after applying `x_scale`, note that
+        # components which were identically 1 not affected.
+        v[dv != 0] *= scale_inv[dv != 0]
+
+        # Here, we apply two types of scaling.
+        d = v**0.5 * scale
+
+        # C = diag(g * scale) Jv
+        diag_h = g * dv * scale
+
+        # After all this has been done, we continue normally.
+
+        # "hat" gradient.
+        g_h = d * g
+
+        f_augmented[:m] = f
+        if tr_solver == 'exact':
+            J_augmented[:m] = J * d
+            J_h = J_augmented[:m]  # Memory view.
+            J_augmented[m:] = np.diag(diag_h**0.5)
+            U, s, V = svd(J_augmented, full_matrices=False)
+            V = V.T
+            uf = U.T.dot(f_augmented)
+        elif tr_solver == 'lsmr':
+            J_h = right_multiplied_operator(J, d)
+
+            if regularize:
+                a, b = build_quadratic_1d(J_h, g_h, -g_h, diag=diag_h)
+                to_tr = Delta / norm(g_h)
+                ag_value = minimize_quadratic_1d(a, b, 0, to_tr)[1]
+                reg_term = -ag_value / Delta**2
+
+            lsmr_op = regularized_lsq_operator(J_h, (diag_h + reg_term)**0.5)
+            gn_h = lsmr(lsmr_op, f_augmented, **tr_options)[0]
+            S = np.vstack((g_h, gn_h)).T
+            S, _ = qr(S, mode='economic')
+            JS = J_h.dot(S)  # LinearOperator does dot too.
+            B_S = np.dot(JS.T, JS) + np.dot(S.T * diag_h, S)
+            g_S = S.T.dot(g_h)
+
+        # theta controls step back step ratio from the bounds.
+        theta = max(0.995, 1 - g_norm)
+
+        actual_reduction = -1
+        while actual_reduction <= 0 and nfev < max_nfev:
+            if tr_solver == 'exact':
+                p_h, alpha, n_iter = solve_lsq_trust_region(
+                    n, m, uf, s, V, Delta, initial_alpha=alpha)
+            elif tr_solver == 'lsmr':
+                p_S, _ = solve_trust_region_2d(B_S, g_S, Delta)
+                p_h = S.dot(p_S)
+
+            p = d * p_h  # Trust-region solution in the original space.
+            step, step_h, predicted_reduction = select_step(
+                x, J_h, diag_h, g_h, p, p_h, d, Delta, lb, ub, theta)
+
+            x_new = make_strictly_feasible(x + step, lb, ub, rstep=0)
+            f_new = fun(x_new)
+            nfev += 1
+
+            step_h_norm = norm(step_h)
+
+            if not np.all(np.isfinite(f_new)):
+                Delta = 0.25 * step_h_norm
+                continue
+
+            # Usual trust-region step quality estimation.
+            if loss_function is not None:
+                cost_new = loss_function(f_new, cost_only=True)
+            else:
+                cost_new = 0.5 * np.dot(f_new, f_new)
+            actual_reduction = cost - cost_new
+            Delta_new, ratio = update_tr_radius(
+                Delta, actual_reduction, predicted_reduction,
+                step_h_norm, step_h_norm > 0.95 * Delta)
+
+            step_norm = norm(step)
+            termination_status = check_termination(
+                actual_reduction, cost, step_norm, norm(x), ratio, ftol, xtol)
+            if termination_status is not None:
+                break
+
+            alpha *= Delta / Delta_new
+            Delta = Delta_new
+
+        if actual_reduction > 0:
+            x = x_new
+
+            f = f_new
+            f_true = f.copy()
+
+            cost = cost_new
+
+            J = jac(x, f)
+            njev += 1
+
+            if loss_function is not None:
+                rho = loss_function(f)
+                J, f = scale_for_robust_loss_function(J, f, rho)
+
+            g = compute_grad(J, f)
+
+            if jac_scale:
+                scale, scale_inv = compute_jac_scale(J, scale_inv)
+        else:
+            step_norm = 0
+            actual_reduction = 0
+
+        iteration += 1
+
+    if termination_status is None:
+        termination_status = 0
+
+    active_mask = find_active_constraints(x, lb, ub, rtol=xtol)
+    return OptimizeResult(
+        x=x, cost=cost, fun=f_true, jac=J, grad=g, optimality=g_norm,
+        active_mask=active_mask, nfev=nfev, njev=njev,
+        status=termination_status)
+
+
+def trf_no_bounds(fun, jac, x0, f0, J0, ftol, xtol, gtol, max_nfev,
+                  x_scale, loss_function, tr_solver, tr_options, verbose):
+    x = x0.copy()
+
+    f = f0
+    f_true = f.copy()
+    nfev = 1
+
+    J = J0
+    njev = 1
+    m, n = J.shape
+
+    if loss_function is not None:
+        rho = loss_function(f)
+        cost = 0.5 * np.sum(rho[0])
+        J, f = scale_for_robust_loss_function(J, f, rho)
+    else:
+        cost = 0.5 * np.dot(f, f)
+
+    g = compute_grad(J, f)
+
+    jac_scale = isinstance(x_scale, str) and x_scale == 'jac'
+    if jac_scale:
+        scale, scale_inv = compute_jac_scale(J)
+    else:
+        scale, scale_inv = x_scale, 1 / x_scale
+
+    Delta = norm(x0 * scale_inv)
+    if Delta == 0:
+        Delta = 1.0
+
+    if tr_solver == 'lsmr':
+        reg_term = 0
+        damp = tr_options.pop('damp', 0.0)
+        regularize = tr_options.pop('regularize', True)
+
+    if max_nfev is None:
+        max_nfev = x0.size * 100
+
+    alpha = 0.0  # "Levenberg-Marquardt" parameter
+
+    termination_status = None
+    iteration = 0
+    step_norm = None
+    actual_reduction = None
+
+    if verbose == 2:
+        print_header_nonlinear()
+
+    while True:
+        g_norm = norm(g, ord=np.inf)
+        if g_norm < gtol:
+            termination_status = 1
+
+        if verbose == 2:
+            print_iteration_nonlinear(iteration, nfev, cost, actual_reduction,
+                                      step_norm, g_norm)
+
+        if termination_status is not None or nfev == max_nfev:
+            break
+
+        d = scale
+        g_h = d * g
+
+        if tr_solver == 'exact':
+            J_h = J * d
+            U, s, V = svd(J_h, full_matrices=False)
+            V = V.T
+            uf = U.T.dot(f)
+        elif tr_solver == 'lsmr':
+            J_h = right_multiplied_operator(J, d)
+
+            if regularize:
+                a, b = build_quadratic_1d(J_h, g_h, -g_h)
+                to_tr = Delta / norm(g_h)
+                ag_value = minimize_quadratic_1d(a, b, 0, to_tr)[1]
+                reg_term = -ag_value / Delta**2
+
+            damp_full = (damp**2 + reg_term)**0.5
+            gn_h = lsmr(J_h, f, damp=damp_full, **tr_options)[0]
+            S = np.vstack((g_h, gn_h)).T
+            S, _ = qr(S, mode='economic')
+            JS = J_h.dot(S)
+            B_S = np.dot(JS.T, JS)
+            g_S = S.T.dot(g_h)
+
+        actual_reduction = -1
+        while actual_reduction <= 0 and nfev < max_nfev:
+            if tr_solver == 'exact':
+                step_h, alpha, n_iter = solve_lsq_trust_region(
+                    n, m, uf, s, V, Delta, initial_alpha=alpha)
+            elif tr_solver == 'lsmr':
+                p_S, _ = solve_trust_region_2d(B_S, g_S, Delta)
+                step_h = S.dot(p_S)
+
+            predicted_reduction = -evaluate_quadratic(J_h, g_h, step_h)
+            step = d * step_h
+            x_new = x + step
+            f_new = fun(x_new)
+            nfev += 1
+
+            step_h_norm = norm(step_h)
+
+            if not np.all(np.isfinite(f_new)):
+                Delta = 0.25 * step_h_norm
+                continue
+
+            # Usual trust-region step quality estimation.
+            if loss_function is not None:
+                cost_new = loss_function(f_new, cost_only=True)
+            else:
+                cost_new = 0.5 * np.dot(f_new, f_new)
+            actual_reduction = cost - cost_new
+
+            Delta_new, ratio = update_tr_radius(
+                Delta, actual_reduction, predicted_reduction,
+                step_h_norm, step_h_norm > 0.95 * Delta)
+
+            step_norm = norm(step)
+            termination_status = check_termination(
+                actual_reduction, cost, step_norm, norm(x), ratio, ftol, xtol)
+            if termination_status is not None:
+                break
+
+            alpha *= Delta / Delta_new
+            Delta = Delta_new
+
+        if actual_reduction > 0:
+            x = x_new
+
+            f = f_new
+            f_true = f.copy()
+
+            cost = cost_new
+
+            J = jac(x, f)
+            njev += 1
+
+            if loss_function is not None:
+                rho = loss_function(f)
+                J, f = scale_for_robust_loss_function(J, f, rho)
+
+            g = compute_grad(J, f)
+
+            if jac_scale:
+                scale, scale_inv = compute_jac_scale(J, scale_inv)
+        else:
+            step_norm = 0
+            actual_reduction = 0
+
+        iteration += 1
+
+    if termination_status is None:
+        termination_status = 0
+
+    active_mask = np.zeros_like(x)
+    return OptimizeResult(
+        x=x, cost=cost, fun=f_true, jac=J, grad=g, optimality=g_norm,
+        active_mask=active_mask, nfev=nfev, njev=njev,
+        status=termination_status)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf_linear.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf_linear.py
new file mode 100644
index 0000000000000000000000000000000000000000..dd752763179bcf97945c7f34ce6a9e49e85c819e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_lsq/trf_linear.py
@@ -0,0 +1,249 @@
+"""The adaptation of Trust Region Reflective algorithm for a linear
+least-squares problem."""
+import numpy as np
+from numpy.linalg import norm
+from scipy.linalg import qr, solve_triangular
+from scipy.sparse.linalg import lsmr
+from scipy.optimize import OptimizeResult
+
+from .givens_elimination import givens_elimination
+from .common import (
+    EPS, step_size_to_bound, find_active_constraints, in_bounds,
+    make_strictly_feasible, build_quadratic_1d, evaluate_quadratic,
+    minimize_quadratic_1d, CL_scaling_vector, reflective_transformation,
+    print_header_linear, print_iteration_linear, compute_grad,
+    regularized_lsq_operator, right_multiplied_operator)
+
+
+def regularized_lsq_with_qr(m, n, R, QTb, perm, diag, copy_R=True):
+    """Solve regularized least squares using information from QR-decomposition.
+
+    The initial problem is to solve the following system in a least-squares
+    sense::
+
+        A x = b
+        D x = 0
+
+    where D is diagonal matrix. The method is based on QR decomposition
+    of the form A P = Q R, where P is a column permutation matrix, Q is an
+    orthogonal matrix and R is an upper triangular matrix.
+
+    Parameters
+    ----------
+    m, n : int
+        Initial shape of A.
+    R : ndarray, shape (n, n)
+        Upper triangular matrix from QR decomposition of A.
+    QTb : ndarray, shape (n,)
+        First n components of Q^T b.
+    perm : ndarray, shape (n,)
+        Array defining column permutation of A, such that ith column of
+        P is perm[i]-th column of identity matrix.
+    diag : ndarray, shape (n,)
+        Array containing diagonal elements of D.
+
+    Returns
+    -------
+    x : ndarray, shape (n,)
+        Found least-squares solution.
+    """
+    if copy_R:
+        R = R.copy()
+    v = QTb.copy()
+
+    givens_elimination(R, v, diag[perm])
+
+    abs_diag_R = np.abs(np.diag(R))
+    threshold = EPS * max(m, n) * np.max(abs_diag_R)
+    nns, = np.nonzero(abs_diag_R > threshold)
+
+    R = R[np.ix_(nns, nns)]
+    v = v[nns]
+
+    x = np.zeros(n)
+    x[perm[nns]] = solve_triangular(R, v)
+
+    return x
+
+
+def backtracking(A, g, x, p, theta, p_dot_g, lb, ub):
+    """Find an appropriate step size using backtracking line search."""
+    alpha = 1
+    while True:
+        x_new, _ = reflective_transformation(x + alpha * p, lb, ub)
+        step = x_new - x
+        cost_change = -evaluate_quadratic(A, g, step)
+        if cost_change > -0.1 * alpha * p_dot_g:
+            break
+        alpha *= 0.5
+
+    active = find_active_constraints(x_new, lb, ub)
+    if np.any(active != 0):
+        x_new, _ = reflective_transformation(x + theta * alpha * p, lb, ub)
+        x_new = make_strictly_feasible(x_new, lb, ub, rstep=0)
+        step = x_new - x
+        cost_change = -evaluate_quadratic(A, g, step)
+
+    return x, step, cost_change
+
+
+def select_step(x, A_h, g_h, c_h, p, p_h, d, lb, ub, theta):
+    """Select the best step according to Trust Region Reflective algorithm."""
+    if in_bounds(x + p, lb, ub):
+        return p
+
+    p_stride, hits = step_size_to_bound(x, p, lb, ub)
+    r_h = np.copy(p_h)
+    r_h[hits.astype(bool)] *= -1
+    r = d * r_h
+
+    # Restrict step, such that it hits the bound.
+    p *= p_stride
+    p_h *= p_stride
+    x_on_bound = x + p
+
+    # Find the step size along reflected direction.
+    r_stride_u, _ = step_size_to_bound(x_on_bound, r, lb, ub)
+
+    # Stay interior.
+    r_stride_l = (1 - theta) * r_stride_u
+    r_stride_u *= theta
+
+    if r_stride_u > 0:
+        a, b, c = build_quadratic_1d(A_h, g_h, r_h, s0=p_h, diag=c_h)
+        r_stride, r_value = minimize_quadratic_1d(
+            a, b, r_stride_l, r_stride_u, c=c)
+        r_h = p_h + r_h * r_stride
+        r = d * r_h
+    else:
+        r_value = np.inf
+
+    # Now correct p_h to make it strictly interior.
+    p_h *= theta
+    p *= theta
+    p_value = evaluate_quadratic(A_h, g_h, p_h, diag=c_h)
+
+    ag_h = -g_h
+    ag = d * ag_h
+    ag_stride_u, _ = step_size_to_bound(x, ag, lb, ub)
+    ag_stride_u *= theta
+    a, b = build_quadratic_1d(A_h, g_h, ag_h, diag=c_h)
+    ag_stride, ag_value = minimize_quadratic_1d(a, b, 0, ag_stride_u)
+    ag *= ag_stride
+
+    if p_value < r_value and p_value < ag_value:
+        return p
+    elif r_value < p_value and r_value < ag_value:
+        return r
+    else:
+        return ag
+
+
+def trf_linear(A, b, x_lsq, lb, ub, tol, lsq_solver, lsmr_tol,
+               max_iter, verbose, *, lsmr_maxiter=None):
+    m, n = A.shape
+    x, _ = reflective_transformation(x_lsq, lb, ub)
+    x = make_strictly_feasible(x, lb, ub, rstep=0.1)
+
+    if lsq_solver == 'exact':
+        QT, R, perm = qr(A, mode='economic', pivoting=True)
+        QT = QT.T
+
+        if m < n:
+            R = np.vstack((R, np.zeros((n - m, n))))
+
+        QTr = np.zeros(n)
+        k = min(m, n)
+    elif lsq_solver == 'lsmr':
+        r_aug = np.zeros(m + n)
+        auto_lsmr_tol = False
+        if lsmr_tol is None:
+            lsmr_tol = 1e-2 * tol
+        elif lsmr_tol == 'auto':
+            auto_lsmr_tol = True
+
+    r = A.dot(x) - b
+    g = compute_grad(A, r)
+    cost = 0.5 * np.dot(r, r)
+    initial_cost = cost
+
+    termination_status = None
+    step_norm = None
+    cost_change = None
+
+    if max_iter is None:
+        max_iter = 100
+
+    if verbose == 2:
+        print_header_linear()
+
+    for iteration in range(max_iter):
+        v, dv = CL_scaling_vector(x, g, lb, ub)
+        g_scaled = g * v
+        g_norm = norm(g_scaled, ord=np.inf)
+        if g_norm < tol:
+            termination_status = 1
+
+        if verbose == 2:
+            print_iteration_linear(iteration, cost, cost_change,
+                                   step_norm, g_norm)
+
+        if termination_status is not None:
+            break
+
+        diag_h = g * dv
+        diag_root_h = diag_h ** 0.5
+        d = v ** 0.5
+        g_h = d * g
+
+        A_h = right_multiplied_operator(A, d)
+        if lsq_solver == 'exact':
+            QTr[:k] = QT.dot(r)
+            p_h = -regularized_lsq_with_qr(m, n, R * d[perm], QTr, perm,
+                                           diag_root_h, copy_R=False)
+        elif lsq_solver == 'lsmr':
+            lsmr_op = regularized_lsq_operator(A_h, diag_root_h)
+            r_aug[:m] = r
+            if auto_lsmr_tol:
+                eta = 1e-2 * min(0.5, g_norm)
+                lsmr_tol = max(EPS, min(0.1, eta * g_norm))
+            p_h = -lsmr(lsmr_op, r_aug, maxiter=lsmr_maxiter,
+                        atol=lsmr_tol, btol=lsmr_tol)[0]
+
+        p = d * p_h
+
+        p_dot_g = np.dot(p, g)
+        if p_dot_g > 0:
+            termination_status = -1
+
+        theta = 1 - min(0.005, g_norm)
+        step = select_step(x, A_h, g_h, diag_h, p, p_h, d, lb, ub, theta)
+        cost_change = -evaluate_quadratic(A, g, step)
+
+        # Perhaps almost never executed, the idea is that `p` is descent
+        # direction thus we must find acceptable cost decrease using simple
+        # "backtracking", otherwise the algorithm's logic would break.
+        if cost_change < 0:
+            x, step, cost_change = backtracking(
+                A, g, x, p, theta, p_dot_g, lb, ub)
+        else:
+            x = make_strictly_feasible(x + step, lb, ub, rstep=0)
+
+        step_norm = norm(step)
+        r = A.dot(x) - b
+        g = compute_grad(A, r)
+
+        if cost_change < tol * cost:
+            termination_status = 2
+
+        cost = 0.5 * np.dot(r, r)
+
+    if termination_status is None:
+        termination_status = 0
+
+    active_mask = find_active_constraints(x, lb, ub, rtol=tol)
+
+    return OptimizeResult(
+        x=x, fun=r, cost=cost, optimality=g_norm, active_mask=active_mask,
+        nit=iteration + 1, status=termination_status,
+        initial_cost=initial_cost)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_milp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_milp.py
new file mode 100644
index 0000000000000000000000000000000000000000..b97a00d15406700cfedbe50e1b3714d36a60f8fb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_milp.py
@@ -0,0 +1,392 @@
+import warnings
+import numpy as np
+from scipy.sparse import csc_array, vstack, issparse
+from scipy._lib._util import VisibleDeprecationWarning
+from ._highspy._highs_wrapper import _highs_wrapper  # type: ignore[import-not-found,import-untyped]
+from ._constraints import LinearConstraint, Bounds
+from ._optimize import OptimizeResult
+from ._linprog_highs import _highs_to_scipy_status_message
+
+
+def _constraints_to_components(constraints):
+    """
+    Convert sequence of constraints to a single set of components A, b_l, b_u.
+
+    `constraints` could be
+
+    1. A LinearConstraint
+    2. A tuple representing a LinearConstraint
+    3. An invalid object
+    4. A sequence of composed entirely of objects of type 1/2
+    5. A sequence containing at least one object of type 3
+
+    We want to accept 1, 2, and 4 and reject 3 and 5.
+    """
+    message = ("`constraints` (or each element within `constraints`) must be "
+               "convertible into an instance of "
+               "`scipy.optimize.LinearConstraint`.")
+    As = []
+    b_ls = []
+    b_us = []
+
+    # Accept case 1 by standardizing as case 4
+    if isinstance(constraints, LinearConstraint):
+        constraints = [constraints]
+    else:
+        # Reject case 3
+        try:
+            iter(constraints)
+        except TypeError as exc:
+            raise ValueError(message) from exc
+
+        # Accept case 2 by standardizing as case 4
+        if len(constraints) == 3:
+            # argument could be a single tuple representing a LinearConstraint
+            try:
+                constraints = [LinearConstraint(*constraints)]
+            except (TypeError, ValueError, VisibleDeprecationWarning):
+                # argument was not a tuple representing a LinearConstraint
+                pass
+
+    # Address cases 4/5
+    for constraint in constraints:
+        # if it's not a LinearConstraint or something that represents a
+        # LinearConstraint at this point, it's invalid
+        if not isinstance(constraint, LinearConstraint):
+            try:
+                constraint = LinearConstraint(*constraint)
+            except TypeError as exc:
+                raise ValueError(message) from exc
+        As.append(csc_array(constraint.A))
+        b_ls.append(np.atleast_1d(constraint.lb).astype(np.float64))
+        b_us.append(np.atleast_1d(constraint.ub).astype(np.float64))
+
+    if len(As) > 1:
+        A = vstack(As, format="csc")
+        b_l = np.concatenate(b_ls)
+        b_u = np.concatenate(b_us)
+    else:  # avoid unnecessary copying
+        A = As[0]
+        b_l = b_ls[0]
+        b_u = b_us[0]
+
+    return A, b_l, b_u
+
+
+def _milp_iv(c, integrality, bounds, constraints, options):
+    # objective IV
+    if issparse(c):
+        raise ValueError("`c` must be a dense array.")
+    c = np.atleast_1d(c).astype(np.float64)
+    if c.ndim != 1 or c.size == 0 or not np.all(np.isfinite(c)):
+        message = ("`c` must be a one-dimensional array of finite numbers "
+                   "with at least one element.")
+        raise ValueError(message)
+
+    # integrality IV
+    if issparse(integrality):
+        raise ValueError("`integrality` must be a dense array.")
+    message = ("`integrality` must contain integers 0-3 and be broadcastable "
+               "to `c.shape`.")
+    if integrality is None:
+        integrality = 0
+    try:
+        integrality = np.broadcast_to(integrality, c.shape).astype(np.uint8)
+    except ValueError:
+        raise ValueError(message)
+    if integrality.min() < 0 or integrality.max() > 3:
+        raise ValueError(message)
+
+    # bounds IV
+    if bounds is None:
+        bounds = Bounds(0, np.inf)
+    elif not isinstance(bounds, Bounds):
+        message = ("`bounds` must be convertible into an instance of "
+                   "`scipy.optimize.Bounds`.")
+        try:
+            bounds = Bounds(*bounds)
+        except TypeError as exc:
+            raise ValueError(message) from exc
+
+    try:
+        lb = np.broadcast_to(bounds.lb, c.shape).astype(np.float64)
+        ub = np.broadcast_to(bounds.ub, c.shape).astype(np.float64)
+    except (ValueError, TypeError) as exc:
+        message = ("`bounds.lb` and `bounds.ub` must contain reals and "
+                   "be broadcastable to `c.shape`.")
+        raise ValueError(message) from exc
+
+    # constraints IV
+    if not constraints:
+        constraints = [LinearConstraint(np.empty((0, c.size)),
+                                        np.empty((0,)), np.empty((0,)))]
+    try:
+        A, b_l, b_u = _constraints_to_components(constraints)
+    except ValueError as exc:
+        message = ("`constraints` (or each element within `constraints`) must "
+                   "be convertible into an instance of "
+                   "`scipy.optimize.LinearConstraint`.")
+        raise ValueError(message) from exc
+
+    if A.shape != (b_l.size, c.size):
+        message = "The shape of `A` must be (len(b_l), len(c))."
+        raise ValueError(message)
+    indptr, indices, data = A.indptr, A.indices, A.data.astype(np.float64)
+
+    # options IV
+    options = options or {}
+    supported_options = {'disp', 'presolve', 'time_limit', 'node_limit',
+                         'mip_rel_gap'}
+    unsupported_options = set(options).difference(supported_options)
+    if unsupported_options:
+        message = (f"Unrecognized options detected: {unsupported_options}. "
+                   "These will be passed to HiGHS verbatim.")
+        warnings.warn(message, RuntimeWarning, stacklevel=3)
+    options_iv = {'log_to_console': options.pop("disp", False),
+                  'mip_max_nodes': options.pop("node_limit", None)}
+    options_iv.update(options)
+
+    return c, integrality, lb, ub, indptr, indices, data, b_l, b_u, options_iv
+
+
+def milp(c, *, integrality=None, bounds=None, constraints=None, options=None):
+    r"""
+    Mixed-integer linear programming
+
+    Solves problems of the following form:
+
+    .. math::
+
+        \min_x \ & c^T x \\
+        \mbox{such that} \ & b_l \leq A x \leq b_u,\\
+        & l \leq x \leq u, \\
+        & x_i \in \mathbb{Z}, i \in X_i
+
+    where :math:`x` is a vector of decision variables;
+    :math:`c`, :math:`b_l`, :math:`b_u`, :math:`l`, and :math:`u` are vectors;
+    :math:`A` is a matrix, and :math:`X_i` is the set of indices of
+    decision variables that must be integral. (In this context, a
+    variable that can assume only integer values is said to be "integral";
+    it has an "integrality" constraint.)
+
+    Alternatively, that's:
+
+    minimize::
+
+        c @ x
+
+    such that::
+
+        b_l <= A @ x <= b_u
+        l <= x <= u
+        Specified elements of x must be integers
+
+    By default, ``l = 0`` and ``u = np.inf`` unless specified with
+    ``bounds``.
+
+    Parameters
+    ----------
+    c : 1D dense array_like
+        The coefficients of the linear objective function to be minimized.
+        `c` is converted to a double precision array before the problem is
+        solved.
+    integrality : 1D dense array_like, optional
+        Indicates the type of integrality constraint on each decision variable.
+
+        ``0`` : Continuous variable; no integrality constraint.
+
+        ``1`` : Integer variable; decision variable must be an integer
+        within `bounds`.
+
+        ``2`` : Semi-continuous variable; decision variable must be within
+        `bounds` or take value ``0``.
+
+        ``3`` : Semi-integer variable; decision variable must be an integer
+        within `bounds` or take value ``0``.
+
+        By default, all variables are continuous. `integrality` is converted
+        to an array of integers before the problem is solved.
+
+    bounds : scipy.optimize.Bounds, optional
+        Bounds on the decision variables. Lower and upper bounds are converted
+        to double precision arrays before the problem is solved. The
+        ``keep_feasible`` parameter of the `Bounds` object is ignored. If
+        not specified, all decision variables are constrained to be
+        non-negative.
+    constraints : sequence of scipy.optimize.LinearConstraint, optional
+        Linear constraints of the optimization problem. Arguments may be
+        one of the following:
+
+        1. A single `LinearConstraint` object
+        2. A single tuple that can be converted to a `LinearConstraint` object
+           as ``LinearConstraint(*constraints)``
+        3. A sequence composed entirely of objects of type 1. and 2.
+
+        Before the problem is solved, all values are converted to double
+        precision, and the matrices of constraint coefficients are converted to
+        instances of `scipy.sparse.csc_array`. The ``keep_feasible`` parameter
+        of `LinearConstraint` objects is ignored.
+    options : dict, optional
+        A dictionary of solver options. The following keys are recognized.
+
+        disp : bool (default: ``False``)
+            Set to ``True`` if indicators of optimization status are to be
+            printed to the console during optimization.
+        node_limit : int, optional
+            The maximum number of nodes (linear program relaxations) to solve
+            before stopping. Default is no maximum number of nodes.
+        presolve : bool (default: ``True``)
+            Presolve attempts to identify trivial infeasibilities,
+            identify trivial unboundedness, and simplify the problem before
+            sending it to the main solver.
+        time_limit : float, optional
+            The maximum number of seconds allotted to solve the problem.
+            Default is no time limit.
+        mip_rel_gap : float, optional
+            Termination criterion for MIP solver: solver will terminate when
+            the gap between the primal objective value and the dual objective
+            bound, scaled by the primal objective value, is <= mip_rel_gap.
+
+    Returns
+    -------
+    res : OptimizeResult
+        An instance of :class:`scipy.optimize.OptimizeResult`. The object
+        is guaranteed to have the following attributes.
+
+        status : int
+            An integer representing the exit status of the algorithm.
+
+            ``0`` : Optimal solution found.
+
+            ``1`` : Iteration or time limit reached.
+
+            ``2`` : Problem is infeasible.
+
+            ``3`` : Problem is unbounded.
+
+            ``4`` : Other; see message for details.
+
+        success : bool
+            ``True`` when an optimal solution is found and ``False`` otherwise.
+
+        message : str
+            A string descriptor of the exit status of the algorithm.
+
+        The following attributes will also be present, but the values may be
+        ``None``, depending on the solution status.
+
+        x : ndarray
+            The values of the decision variables that minimize the
+            objective function while satisfying the constraints.
+        fun : float
+            The optimal value of the objective function ``c @ x``.
+        mip_node_count : int
+            The number of subproblems or "nodes" solved by the MILP solver.
+        mip_dual_bound : float
+            The MILP solver's final estimate of the lower bound on the optimal
+            solution.
+        mip_gap : float
+            The difference between the primal objective value and the dual
+            objective bound, scaled by the primal objective value.
+
+    Notes
+    -----
+    `milp` is a wrapper of the HiGHS linear optimization software [1]_. The
+    algorithm is deterministic, and it typically finds the global optimum of
+    moderately challenging mixed-integer linear programs (when it exists).
+
+    References
+    ----------
+    .. [1] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J.
+           "HiGHS - high performance software for linear optimization."
+           https://highs.dev/
+    .. [2] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised
+           simplex method." Mathematical Programming Computation, 10 (1),
+           119-142, 2018. DOI: 10.1007/s12532-017-0130-5
+
+    Examples
+    --------
+    Consider the problem at
+    https://en.wikipedia.org/wiki/Integer_programming#Example, which is
+    expressed as a maximization problem of two variables. Since `milp` requires
+    that the problem be expressed as a minimization problem, the objective
+    function coefficients on the decision variables are:
+
+    >>> import numpy as np
+    >>> c = -np.array([0, 1])
+
+    Note the negative sign: we maximize the original objective function
+    by minimizing the negative of the objective function.
+
+    We collect the coefficients of the constraints into arrays like:
+
+    >>> A = np.array([[-1, 1], [3, 2], [2, 3]])
+    >>> b_u = np.array([1, 12, 12])
+    >>> b_l = np.full_like(b_u, -np.inf, dtype=float)
+
+    Because there is no lower limit on these constraints, we have defined a
+    variable ``b_l`` full of values representing negative infinity. This may
+    be unfamiliar to users of `scipy.optimize.linprog`, which only accepts
+    "less than" (or "upper bound") inequality constraints of the form
+    ``A_ub @ x <= b_u``. By accepting both ``b_l`` and ``b_u`` of constraints
+    ``b_l <= A_ub @ x <= b_u``, `milp` makes it easy to specify "greater than"
+    inequality constraints, "less than" inequality constraints, and equality
+    constraints concisely.
+
+    These arrays are collected into a single `LinearConstraint` object like:
+
+    >>> from scipy.optimize import LinearConstraint
+    >>> constraints = LinearConstraint(A, b_l, b_u)
+
+    The non-negativity bounds on the decision variables are enforced by
+    default, so we do not need to provide an argument for `bounds`.
+
+    Finally, the problem states that both decision variables must be integers:
+
+    >>> integrality = np.ones_like(c)
+
+    We solve the problem like:
+
+    >>> from scipy.optimize import milp
+    >>> res = milp(c=c, constraints=constraints, integrality=integrality)
+    >>> res.x
+    [2.0, 2.0]
+
+    Note that had we solved the relaxed problem (without integrality
+    constraints):
+
+    >>> res = milp(c=c, constraints=constraints)  # OR:
+    >>> # from scipy.optimize import linprog; res = linprog(c, A, b_u)
+    >>> res.x
+    [1.8, 2.8]
+
+    we would not have obtained the correct solution by rounding to the nearest
+    integers.
+
+    Other examples are given :ref:`in the tutorial `.
+
+    """
+    args_iv = _milp_iv(c, integrality, bounds, constraints, options)
+    c, integrality, lb, ub, indptr, indices, data, b_l, b_u, options = args_iv
+
+    highs_res = _highs_wrapper(c, indptr, indices, data, b_l, b_u,
+                               lb, ub, integrality, options)
+
+    res = {}
+
+    # Convert to scipy-style status and message
+    highs_status = highs_res.get('status', None)
+    highs_message = highs_res.get('message', None)
+    status, message = _highs_to_scipy_status_message(highs_status,
+                                                     highs_message)
+    res['status'] = status
+    res['message'] = message
+    res['success'] = (status == 0)
+    x = highs_res.get('x', None)
+    res['x'] = np.array(x) if x is not None else None
+    res['fun'] = highs_res.get('fun', None)
+    res['mip_node_count'] = highs_res.get('mip_node_count', None)
+    res['mip_dual_bound'] = highs_res.get('mip_dual_bound', None)
+    res['mip_gap'] = highs_res.get('mip_gap', None)
+
+    return OptimizeResult(res)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..0b47c57cb3a12c6f4a7adb5506089c569336b4c4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minimize.py
@@ -0,0 +1,1131 @@
+"""
+Unified interfaces to minimization algorithms.
+
+Functions
+---------
+- minimize : minimization of a function of several variables.
+- minimize_scalar : minimization of a function of one variable.
+"""
+
+__all__ = ['minimize', 'minimize_scalar']
+
+
+from warnings import warn
+
+import numpy as np
+
+# unconstrained minimization
+from ._optimize import (_minimize_neldermead, _minimize_powell, _minimize_cg,
+                        _minimize_bfgs, _minimize_newtoncg,
+                        _minimize_scalar_brent, _minimize_scalar_bounded,
+                        _minimize_scalar_golden, MemoizeJac, OptimizeResult,
+                        _wrap_callback, _recover_from_bracket_error)
+from ._trustregion_dogleg import _minimize_dogleg
+from ._trustregion_ncg import _minimize_trust_ncg
+from ._trustregion_krylov import _minimize_trust_krylov
+from ._trustregion_exact import _minimize_trustregion_exact
+from ._trustregion_constr import _minimize_trustregion_constr
+
+# constrained minimization
+from ._lbfgsb_py import _minimize_lbfgsb
+from ._tnc import _minimize_tnc
+from ._cobyla_py import _minimize_cobyla
+from ._cobyqa_py import _minimize_cobyqa
+from ._slsqp_py import _minimize_slsqp
+from ._constraints import (old_bound_to_new, new_bounds_to_old,
+                           old_constraint_to_new, new_constraint_to_old,
+                           NonlinearConstraint, LinearConstraint, Bounds,
+                           PreparedConstraint)
+from ._differentiable_functions import FD_METHODS
+
+MINIMIZE_METHODS = ['nelder-mead', 'powell', 'cg', 'bfgs', 'newton-cg',
+                    'l-bfgs-b', 'tnc', 'cobyla', 'cobyqa', 'slsqp',
+                    'trust-constr', 'dogleg', 'trust-ncg', 'trust-exact',
+                    'trust-krylov']
+
+# These methods support the new callback interface (passed an OptimizeResult)
+MINIMIZE_METHODS_NEW_CB = ['nelder-mead', 'powell', 'cg', 'bfgs', 'newton-cg',
+                           'l-bfgs-b', 'trust-constr', 'dogleg', 'trust-ncg',
+                           'trust-exact', 'trust-krylov', 'cobyqa']
+
+MINIMIZE_SCALAR_METHODS = ['brent', 'bounded', 'golden']
+
+def minimize(fun, x0, args=(), method=None, jac=None, hess=None,
+             hessp=None, bounds=None, constraints=(), tol=None,
+             callback=None, options=None):
+    """Minimization of scalar function of one or more variables.
+
+    Parameters
+    ----------
+    fun : callable
+        The objective function to be minimized::
+
+            fun(x, *args) -> float
+
+        where ``x`` is a 1-D array with shape (n,) and ``args``
+        is a tuple of the fixed parameters needed to completely
+        specify the function.
+
+        Suppose the callable has signature ``f0(x, *my_args, **my_kwargs)``, where
+        ``my_args`` and ``my_kwargs`` are required positional and keyword arguments.
+        Rather than passing ``f0`` as the callable, wrap it to accept
+        only ``x``; e.g., pass ``fun=lambda x: f0(x, *my_args, **my_kwargs)`` as the
+        callable, where ``my_args`` (tuple) and ``my_kwargs`` (dict) have been
+        gathered before invoking this function.
+    x0 : ndarray, shape (n,)
+        Initial guess. Array of real elements of size (n,),
+        where ``n`` is the number of independent variables.
+    args : tuple, optional
+        Extra arguments passed to the objective function and its
+        derivatives (`fun`, `jac` and `hess` functions).
+    method : str or callable, optional
+        Type of solver.  Should be one of
+
+        - 'Nelder-Mead' :ref:`(see here) `
+        - 'Powell'      :ref:`(see here) `
+        - 'CG'          :ref:`(see here) `
+        - 'BFGS'        :ref:`(see here) `
+        - 'Newton-CG'   :ref:`(see here) `
+        - 'L-BFGS-B'    :ref:`(see here) `
+        - 'TNC'         :ref:`(see here) `
+        - 'COBYLA'      :ref:`(see here) `
+        - 'COBYQA'      :ref:`(see here) `
+        - 'SLSQP'       :ref:`(see here) `
+        - 'trust-constr':ref:`(see here) `
+        - 'dogleg'      :ref:`(see here) `
+        - 'trust-ncg'   :ref:`(see here) `
+        - 'trust-exact' :ref:`(see here) `
+        - 'trust-krylov' :ref:`(see here) `
+        - custom - a callable object, see below for description.
+
+        If not given, chosen to be one of ``BFGS``, ``L-BFGS-B``, ``SLSQP``,
+        depending on whether or not the problem has constraints or bounds.
+    jac : {callable,  '2-point', '3-point', 'cs', bool}, optional
+        Method for computing the gradient vector. Only for CG, BFGS,
+        Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg, trust-krylov,
+        trust-exact and trust-constr.
+        If it is a callable, it should be a function that returns the gradient
+        vector::
+
+            jac(x, *args) -> array_like, shape (n,)
+
+        where ``x`` is an array with shape (n,) and ``args`` is a tuple with
+        the fixed parameters. If `jac` is a Boolean and is True, `fun` is
+        assumed to return a tuple ``(f, g)`` containing the objective
+        function and the gradient.
+        Methods 'Newton-CG', 'trust-ncg', 'dogleg', 'trust-exact', and
+        'trust-krylov' require that either a callable be supplied, or that
+        `fun` return the objective and gradient.
+        If None or False, the gradient will be estimated using 2-point finite
+        difference estimation with an absolute step size.
+        Alternatively, the keywords  {'2-point', '3-point', 'cs'} can be used
+        to select a finite difference scheme for numerical estimation of the
+        gradient with a relative step size. These finite difference schemes
+        obey any specified `bounds`.
+    hess : {callable, '2-point', '3-point', 'cs', HessianUpdateStrategy}, optional
+        Method for computing the Hessian matrix. Only for Newton-CG, dogleg,
+        trust-ncg, trust-krylov, trust-exact and trust-constr.
+        If it is callable, it should return the Hessian matrix::
+
+            hess(x, *args) -> {LinearOperator, spmatrix, array}, (n, n)
+
+        where ``x`` is a (n,) ndarray and ``args`` is a tuple with the fixed
+        parameters.
+        The keywords {'2-point', '3-point', 'cs'} can also be used to select
+        a finite difference scheme for numerical estimation of the hessian.
+        Alternatively, objects implementing the `HessianUpdateStrategy`
+        interface can be used to approximate the Hessian. Available
+        quasi-Newton methods implementing this interface are:
+
+        - `BFGS`
+        - `SR1`
+
+        Not all of the options are available for each of the methods; for
+        availability refer to the notes.
+    hessp : callable, optional
+        Hessian of objective function times an arbitrary vector p. Only for
+        Newton-CG, trust-ncg, trust-krylov, trust-constr.
+        Only one of `hessp` or `hess` needs to be given. If `hess` is
+        provided, then `hessp` will be ignored. `hessp` must compute the
+        Hessian times an arbitrary vector::
+
+            hessp(x, p, *args) ->  ndarray shape (n,)
+
+        where ``x`` is a (n,) ndarray, ``p`` is an arbitrary vector with
+        dimension (n,) and ``args`` is a tuple with the fixed
+        parameters.
+    bounds : sequence or `Bounds`, optional
+        Bounds on variables for Nelder-Mead, L-BFGS-B, TNC, SLSQP, Powell,
+        trust-constr, COBYLA, and COBYQA methods. There are two ways to specify
+        the bounds:
+
+        1. Instance of `Bounds` class.
+        2. Sequence of ``(min, max)`` pairs for each element in `x`. None
+           is used to specify no bound.
+
+    constraints : {Constraint, dict} or List of {Constraint, dict}, optional
+        Constraints definition. Only for COBYLA, COBYQA, SLSQP and trust-constr.
+
+        Constraints for 'trust-constr' and 'cobyqa' are defined as a single object
+        or a list of objects specifying constraints to the optimization problem.
+        Available constraints are:
+
+        - `LinearConstraint`
+        - `NonlinearConstraint`
+
+        Constraints for COBYLA, SLSQP are defined as a list of dictionaries.
+        Each dictionary with fields:
+
+        type : str
+            Constraint type: 'eq' for equality, 'ineq' for inequality.
+        fun : callable
+            The function defining the constraint.
+        jac : callable, optional
+            The Jacobian of `fun` (only for SLSQP).
+        args : sequence, optional
+            Extra arguments to be passed to the function and Jacobian.
+
+        Equality constraint means that the constraint function result is to
+        be zero whereas inequality means that it is to be non-negative.
+        Note that COBYLA only supports inequality constraints.
+
+    tol : float, optional
+        Tolerance for termination. When `tol` is specified, the selected
+        minimization algorithm sets some relevant solver-specific tolerance(s)
+        equal to `tol`. For detailed control, use solver-specific
+        options.
+    options : dict, optional
+        A dictionary of solver options. All methods except `TNC` accept the
+        following generic options:
+
+        maxiter : int
+            Maximum number of iterations to perform. Depending on the
+            method each iteration may use several function evaluations.
+
+            For `TNC` use `maxfun` instead of `maxiter`.
+        disp : bool
+            Set to True to print convergence messages.
+
+        For method-specific options, see :func:`show_options()`.
+    callback : callable, optional
+        A callable called after each iteration.
+
+        All methods except TNC, SLSQP, and COBYLA support a callable with
+        the signature::
+
+            callback(intermediate_result: OptimizeResult)
+
+        where ``intermediate_result`` is a keyword parameter containing an
+        `OptimizeResult` with attributes ``x`` and ``fun``, the present values
+        of the parameter vector and objective function. Note that the name
+        of the parameter must be ``intermediate_result`` for the callback
+        to be passed an `OptimizeResult`. These methods will also terminate if
+        the callback raises ``StopIteration``.
+
+        All methods except trust-constr (also) support a signature like::
+
+            callback(xk)
+
+        where ``xk`` is the current parameter vector.
+
+        Introspection is used to determine which of the signatures above to
+        invoke.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a ``OptimizeResult`` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the optimizer exited successfully and
+        ``message`` which describes the cause of the termination. See
+        `OptimizeResult` for a description of other attributes.
+
+    See also
+    --------
+    minimize_scalar : Interface to minimization algorithms for scalar
+        univariate functions
+    show_options : Additional options accepted by the solvers
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter. The default method is *BFGS*.
+
+    **Unconstrained minimization**
+
+    Method :ref:`CG ` uses a nonlinear conjugate
+    gradient algorithm by Polak and Ribiere, a variant of the
+    Fletcher-Reeves method described in [5]_ pp.120-122. Only the
+    first derivatives are used.
+
+    Method :ref:`BFGS ` uses the quasi-Newton
+    method of Broyden, Fletcher, Goldfarb, and Shanno (BFGS) [5]_
+    pp. 136. It uses the first derivatives only. BFGS has proven good
+    performance even for non-smooth optimizations. This method also
+    returns an approximation of the Hessian inverse, stored as
+    `hess_inv` in the OptimizeResult object.
+
+    Method :ref:`Newton-CG ` uses a
+    Newton-CG algorithm [5]_ pp. 168 (also known as the truncated
+    Newton method). It uses a CG method to the compute the search
+    direction. See also *TNC* method for a box-constrained
+    minimization with a similar algorithm. Suitable for large-scale
+    problems.
+
+    Method :ref:`dogleg ` uses the dog-leg
+    trust-region algorithm [5]_ for unconstrained minimization. This
+    algorithm requires the gradient and Hessian; furthermore the
+    Hessian is required to be positive definite.
+
+    Method :ref:`trust-ncg ` uses the
+    Newton conjugate gradient trust-region algorithm [5]_ for
+    unconstrained minimization. This algorithm requires the gradient
+    and either the Hessian or a function that computes the product of
+    the Hessian with a given vector. Suitable for large-scale problems.
+
+    Method :ref:`trust-krylov ` uses
+    the Newton GLTR trust-region algorithm [14]_, [15]_ for unconstrained
+    minimization. This algorithm requires the gradient
+    and either the Hessian or a function that computes the product of
+    the Hessian with a given vector. Suitable for large-scale problems.
+    On indefinite problems it requires usually less iterations than the
+    `trust-ncg` method and is recommended for medium and large-scale problems.
+
+    Method :ref:`trust-exact `
+    is a trust-region method for unconstrained minimization in which
+    quadratic subproblems are solved almost exactly [13]_. This
+    algorithm requires the gradient and the Hessian (which is
+    *not* required to be positive definite). It is, in many
+    situations, the Newton method to converge in fewer iterations
+    and the most recommended for small and medium-size problems.
+
+    **Bound-Constrained minimization**
+
+    Method :ref:`Nelder-Mead ` uses the
+    Simplex algorithm [1]_, [2]_. This algorithm is robust in many
+    applications. However, if numerical computation of derivative can be
+    trusted, other algorithms using the first and/or second derivatives
+    information might be preferred for their better performance in
+    general.
+
+    Method :ref:`L-BFGS-B ` uses the L-BFGS-B
+    algorithm [6]_, [7]_ for bound constrained minimization.
+
+    Method :ref:`Powell ` is a modification
+    of Powell's method [3]_, [4]_ which is a conjugate direction
+    method. It performs sequential one-dimensional minimizations along
+    each vector of the directions set (`direc` field in `options` and
+    `info`), which is updated at each iteration of the main
+    minimization loop. The function need not be differentiable, and no
+    derivatives are taken. If bounds are not provided, then an
+    unbounded line search will be used. If bounds are provided and
+    the initial guess is within the bounds, then every function
+    evaluation throughout the minimization procedure will be within
+    the bounds. If bounds are provided, the initial guess is outside
+    the bounds, and `direc` is full rank (default has full rank), then
+    some function evaluations during the first iteration may be
+    outside the bounds, but every function evaluation after the first
+    iteration will be within the bounds. If `direc` is not full rank,
+    then some parameters may not be optimized and the solution is not
+    guaranteed to be within the bounds.
+
+    Method :ref:`TNC ` uses a truncated Newton
+    algorithm [5]_, [8]_ to minimize a function with variables subject
+    to bounds. This algorithm uses gradient information; it is also
+    called Newton Conjugate-Gradient. It differs from the *Newton-CG*
+    method described above as it wraps a C implementation and allows
+    each variable to be given upper and lower bounds.
+
+    **Constrained Minimization**
+
+    Method :ref:`COBYLA ` uses the
+    Constrained Optimization BY Linear Approximation (COBYLA) method
+    [9]_, [10]_, [11]_. The algorithm is based on linear
+    approximations to the objective function and each constraint. The
+    method wraps a FORTRAN implementation of the algorithm. The
+    constraints functions 'fun' may return either a single number
+    or an array or list of numbers.
+
+    Method :ref:`COBYQA ` uses the Constrained
+    Optimization BY Quadratic Approximations (COBYQA) method [18]_. The
+    algorithm is a derivative-free trust-region SQP method based on quadratic
+    approximations to the objective function and each nonlinear constraint. The
+    bounds are treated as unrelaxable constraints, in the sense that the
+    algorithm always respects them throughout the optimization process.
+
+    Method :ref:`SLSQP ` uses Sequential
+    Least SQuares Programming to minimize a function of several
+    variables with any combination of bounds, equality and inequality
+    constraints. The method wraps the SLSQP Optimization subroutine
+    originally implemented by Dieter Kraft [12]_. Note that the
+    wrapper handles infinite values in bounds by converting them into
+    large floating values.
+
+    Method :ref:`trust-constr ` is a
+    trust-region algorithm for constrained optimization. It switches
+    between two implementations depending on the problem definition.
+    It is the most versatile constrained minimization algorithm
+    implemented in SciPy and the most appropriate for large-scale problems.
+    For equality constrained problems it is an implementation of Byrd-Omojokun
+    Trust-Region SQP method described in [17]_ and in [5]_, p. 549. When
+    inequality constraints are imposed as well, it switches to the trust-region
+    interior point method described in [16]_. This interior point algorithm,
+    in turn, solves inequality constraints by introducing slack variables
+    and solving a sequence of equality-constrained barrier problems
+    for progressively smaller values of the barrier parameter.
+    The previously described equality constrained SQP method is
+    used to solve the subproblems with increasing levels of accuracy
+    as the iterate gets closer to a solution.
+
+    **Finite-Difference Options**
+
+    For Method :ref:`trust-constr `
+    the gradient and the Hessian may be approximated using
+    three finite-difference schemes: {'2-point', '3-point', 'cs'}.
+    The scheme 'cs' is, potentially, the most accurate but it
+    requires the function to correctly handle complex inputs and to
+    be differentiable in the complex plane. The scheme '3-point' is more
+    accurate than '2-point' but requires twice as many operations. If the
+    gradient is estimated via finite-differences the Hessian must be
+    estimated using one of the quasi-Newton strategies.
+
+    **Method specific options for the** `hess` **keyword**
+
+    +--------------+------+----------+-------------------------+-----+
+    | method/Hess  | None | callable | '2-point/'3-point'/'cs' | HUS |
+    +==============+======+==========+=========================+=====+
+    | Newton-CG    | x    | (n, n)   | x                       | x   |
+    |              |      | LO       |                         |     |
+    +--------------+------+----------+-------------------------+-----+
+    | dogleg       |      | (n, n)   |                         |     |
+    +--------------+------+----------+-------------------------+-----+
+    | trust-ncg    |      | (n, n)   | x                       | x   |
+    +--------------+------+----------+-------------------------+-----+
+    | trust-krylov |      | (n, n)   | x                       | x   |
+    +--------------+------+----------+-------------------------+-----+
+    | trust-exact  |      | (n, n)   |                         |     |
+    +--------------+------+----------+-------------------------+-----+
+    | trust-constr | x    | (n, n)   |  x                      | x   |
+    |              |      | LO       |                         |     |
+    |              |      | sp       |                         |     |
+    +--------------+------+----------+-------------------------+-----+
+
+    where LO=LinearOperator, sp=Sparse matrix, HUS=HessianUpdateStrategy
+
+    **Custom minimizers**
+
+    It may be useful to pass a custom minimization method, for example
+    when using a frontend to this method such as `scipy.optimize.basinhopping`
+    or a different library.  You can simply pass a callable as the ``method``
+    parameter.
+
+    The callable is called as ``method(fun, x0, args, **kwargs, **options)``
+    where ``kwargs`` corresponds to any other parameters passed to `minimize`
+    (such as `callback`, `hess`, etc.), except the `options` dict, which has
+    its contents also passed as `method` parameters pair by pair.  Also, if
+    `jac` has been passed as a bool type, `jac` and `fun` are mangled so that
+    `fun` returns just the function values and `jac` is converted to a function
+    returning the Jacobian.  The method shall return an `OptimizeResult`
+    object.
+
+    The provided `method` callable must be able to accept (and possibly ignore)
+    arbitrary parameters; the set of parameters accepted by `minimize` may
+    expand in future versions and then these parameters will be passed to
+    the method.  You can find an example in the scipy.optimize tutorial.
+
+    References
+    ----------
+    .. [1] Nelder, J A, and R Mead. 1965. A Simplex Method for Function
+        Minimization. The Computer Journal 7: 308-13.
+    .. [2] Wright M H. 1996. Direct search methods: Once scorned, now
+        respectable, in Numerical Analysis 1995: Proceedings of the 1995
+        Dundee Biennial Conference in Numerical Analysis (Eds. D F
+        Griffiths and G A Watson). Addison Wesley Longman, Harlow, UK.
+        191-208.
+    .. [3] Powell, M J D. 1964. An efficient method for finding the minimum of
+       a function of several variables without calculating derivatives. The
+       Computer Journal 7: 155-162.
+    .. [4] Press W, S A Teukolsky, W T Vetterling and B P Flannery.
+       Numerical Recipes (any edition), Cambridge University Press.
+    .. [5] Nocedal, J, and S J Wright. 2006. Numerical Optimization.
+       Springer New York.
+    .. [6] Byrd, R H and P Lu and J. Nocedal. 1995. A Limited Memory
+       Algorithm for Bound Constrained Optimization. SIAM Journal on
+       Scientific and Statistical Computing 16 (5): 1190-1208.
+    .. [7] Zhu, C and R H Byrd and J Nocedal. 1997. L-BFGS-B: Algorithm
+       778: L-BFGS-B, FORTRAN routines for large scale bound constrained
+       optimization. ACM Transactions on Mathematical Software 23 (4):
+       550-560.
+    .. [8] Nash, S G. Newton-Type Minimization Via the Lanczos Method.
+       1984. SIAM Journal of Numerical Analysis 21: 770-778.
+    .. [9] Powell, M J D. A direct search optimization method that models
+       the objective and constraint functions by linear interpolation.
+       1994. Advances in Optimization and Numerical Analysis, eds. S. Gomez
+       and J-P Hennart, Kluwer Academic (Dordrecht), 51-67.
+    .. [10] Powell M J D. Direct search algorithms for optimization
+       calculations. 1998. Acta Numerica 7: 287-336.
+    .. [11] Powell M J D. A view of algorithms for optimization without
+       derivatives. 2007.Cambridge University Technical Report DAMTP
+       2007/NA03
+    .. [12] Kraft, D. A software package for sequential quadratic
+       programming. 1988. Tech. Rep. DFVLR-FB 88-28, DLR German Aerospace
+       Center -- Institute for Flight Mechanics, Koln, Germany.
+    .. [13] Conn, A. R., Gould, N. I., and Toint, P. L.
+       Trust region methods. 2000. Siam. pp. 169-200.
+    .. [14] F. Lenders, C. Kirches, A. Potschka: "trlib: A vector-free
+       implementation of the GLTR method for iterative solution of
+       the trust region problem", :arxiv:`1611.04718`
+    .. [15] N. Gould, S. Lucidi, M. Roma, P. Toint: "Solving the
+       Trust-Region Subproblem using the Lanczos Method",
+       SIAM J. Optim., 9(2), 504--525, (1999).
+    .. [16] Byrd, Richard H., Mary E. Hribar, and Jorge Nocedal. 1999.
+        An interior point algorithm for large-scale nonlinear  programming.
+        SIAM Journal on Optimization 9.4: 877-900.
+    .. [17] Lalee, Marucha, Jorge Nocedal, and Todd Plantenga. 1998. On the
+        implementation of an algorithm for large-scale equality constrained
+        optimization. SIAM Journal on Optimization 8.3: 682-706.
+    .. [18] Ragonneau, T. M. *Model-Based Derivative-Free Optimization Methods
+        and Software*. PhD thesis, Department of Applied Mathematics, The Hong
+        Kong Polytechnic University, Hong Kong, China, 2022. URL:
+        https://theses.lib.polyu.edu.hk/handle/200/12294.
+
+    Examples
+    --------
+    Let us consider the problem of minimizing the Rosenbrock function. This
+    function (and its respective derivatives) is implemented in `rosen`
+    (resp. `rosen_der`, `rosen_hess`) in the `scipy.optimize`.
+
+    >>> from scipy.optimize import minimize, rosen, rosen_der
+
+    A simple application of the *Nelder-Mead* method is:
+
+    >>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
+    >>> res = minimize(rosen, x0, method='Nelder-Mead', tol=1e-6)
+    >>> res.x
+    array([ 1.,  1.,  1.,  1.,  1.])
+
+    Now using the *BFGS* algorithm, using the first derivative and a few
+    options:
+
+    >>> res = minimize(rosen, x0, method='BFGS', jac=rosen_der,
+    ...                options={'gtol': 1e-6, 'disp': True})
+    Optimization terminated successfully.
+             Current function value: 0.000000
+             Iterations: 26
+             Function evaluations: 31
+             Gradient evaluations: 31
+    >>> res.x
+    array([ 1.,  1.,  1.,  1.,  1.])
+    >>> print(res.message)
+    Optimization terminated successfully.
+    >>> res.hess_inv
+    array([
+        [ 0.00749589,  0.01255155,  0.02396251,  0.04750988,  0.09495377],  # may vary
+        [ 0.01255155,  0.02510441,  0.04794055,  0.09502834,  0.18996269],
+        [ 0.02396251,  0.04794055,  0.09631614,  0.19092151,  0.38165151],
+        [ 0.04750988,  0.09502834,  0.19092151,  0.38341252,  0.7664427 ],
+        [ 0.09495377,  0.18996269,  0.38165151,  0.7664427,   1.53713523]
+    ])
+
+
+    Next, consider a minimization problem with several constraints (namely
+    Example 16.4 from [5]_). The objective function is:
+
+    >>> fun = lambda x: (x[0] - 1)**2 + (x[1] - 2.5)**2
+
+    There are three constraints defined as:
+
+    >>> cons = ({'type': 'ineq', 'fun': lambda x:  x[0] - 2 * x[1] + 2},
+    ...         {'type': 'ineq', 'fun': lambda x: -x[0] - 2 * x[1] + 6},
+    ...         {'type': 'ineq', 'fun': lambda x: -x[0] + 2 * x[1] + 2})
+
+    And variables must be positive, hence the following bounds:
+
+    >>> bnds = ((0, None), (0, None))
+
+    The optimization problem is solved using the SLSQP method as:
+
+    >>> res = minimize(fun, (2, 0), method='SLSQP', bounds=bnds,
+    ...                constraints=cons)
+
+    It should converge to the theoretical solution (1.4 ,1.7).
+
+    """
+    x0 = np.atleast_1d(np.asarray(x0))
+
+    if x0.ndim != 1:
+        raise ValueError("'x0' must only have one dimension.")
+
+    if x0.dtype.kind in np.typecodes["AllInteger"]:
+        x0 = np.asarray(x0, dtype=float)
+
+    if not isinstance(args, tuple):
+        args = (args,)
+
+    if method is None:
+        # Select automatically
+        if constraints:
+            method = 'SLSQP'
+        elif bounds is not None:
+            method = 'L-BFGS-B'
+        else:
+            method = 'BFGS'
+
+    if callable(method):
+        meth = "_custom"
+    else:
+        meth = method.lower()
+
+    if options is None:
+        options = {}
+    # check if optional parameters are supported by the selected method
+    # - jac
+    if meth in ('nelder-mead', 'powell', 'cobyla', 'cobyqa') and bool(jac):
+        warn(f'Method {method} does not use gradient information (jac).',
+             RuntimeWarning, stacklevel=2)
+    # - hess
+    if meth not in ('newton-cg', 'dogleg', 'trust-ncg', 'trust-constr',
+                    'trust-krylov', 'trust-exact', '_custom') and hess is not None:
+        warn(f'Method {method} does not use Hessian information (hess).',
+             RuntimeWarning, stacklevel=2)
+    # - hessp
+    if meth not in ('newton-cg', 'trust-ncg', 'trust-constr',
+                    'trust-krylov', '_custom') \
+       and hessp is not None:
+        warn(f'Method {method} does not use Hessian-vector product'
+             ' information (hessp).',
+             RuntimeWarning, stacklevel=2)
+    # - constraints or bounds
+    if (meth not in ('cobyla', 'cobyqa', 'slsqp', 'trust-constr', '_custom') and
+            np.any(constraints)):
+        warn(f'Method {method} cannot handle constraints.',
+             RuntimeWarning, stacklevel=2)
+    if meth not in (
+            'nelder-mead', 'powell', 'l-bfgs-b', 'cobyla', 'cobyqa', 'slsqp',
+            'tnc', 'trust-constr', '_custom') and bounds is not None:
+        warn(f'Method {method} cannot handle bounds.',
+             RuntimeWarning, stacklevel=2)
+    # - return_all
+    if (meth in ('l-bfgs-b', 'tnc', 'cobyla', 'cobyqa', 'slsqp') and
+            options.get('return_all', False)):
+        warn(f'Method {method} does not support the return_all option.',
+             RuntimeWarning, stacklevel=2)
+
+    # check gradient vector
+    if callable(jac):
+        pass
+    elif jac is True:
+        # fun returns func and grad
+        fun = MemoizeJac(fun)
+        jac = fun.derivative
+    elif (jac in FD_METHODS and
+          meth in ['trust-constr', 'bfgs', 'cg', 'l-bfgs-b', 'tnc', 'slsqp']):
+        # finite differences with relative step
+        pass
+    elif meth in ['trust-constr']:
+        # default jac calculation for this method
+        jac = '2-point'
+    elif jac is None or bool(jac) is False:
+        # this will cause e.g. LBFGS to use forward difference, absolute step
+        jac = None
+    else:
+        # default if jac option is not understood
+        jac = None
+
+    # set default tolerances
+    if tol is not None:
+        options = dict(options)
+        if meth == 'nelder-mead':
+            options.setdefault('xatol', tol)
+            options.setdefault('fatol', tol)
+        if meth in ('newton-cg', 'powell', 'tnc'):
+            options.setdefault('xtol', tol)
+        if meth in ('powell', 'l-bfgs-b', 'tnc', 'slsqp'):
+            options.setdefault('ftol', tol)
+        if meth in ('bfgs', 'cg', 'l-bfgs-b', 'tnc', 'dogleg',
+                    'trust-ncg', 'trust-exact', 'trust-krylov'):
+            options.setdefault('gtol', tol)
+        if meth in ('cobyla', '_custom'):
+            options.setdefault('tol', tol)
+        if meth == 'cobyqa':
+            options.setdefault('final_tr_radius', tol)
+        if meth == 'trust-constr':
+            options.setdefault('xtol', tol)
+            options.setdefault('gtol', tol)
+            options.setdefault('barrier_tol', tol)
+
+    if meth == '_custom':
+        # custom method called before bounds and constraints are 'standardised'
+        # custom method should be able to accept whatever bounds/constraints
+        # are provided to it.
+        return method(fun, x0, args=args, jac=jac, hess=hess, hessp=hessp,
+                      bounds=bounds, constraints=constraints,
+                      callback=callback, **options)
+
+    constraints = standardize_constraints(constraints, x0, meth)
+
+    remove_vars = False
+    if bounds is not None:
+        # convert to new-style bounds so we only have to consider one case
+        bounds = standardize_bounds(bounds, x0, 'new')
+        bounds = _validate_bounds(bounds, x0, meth)
+
+        if meth in {"tnc", "slsqp", "l-bfgs-b"}:
+            # These methods can't take the finite-difference derivatives they
+            # need when a variable is fixed by the bounds. To avoid this issue,
+            # remove fixed variables from the problem.
+            # NOTE: if this list is expanded, then be sure to update the
+            # accompanying tests and test_optimize.eb_data. Consider also if
+            # default OptimizeResult will need updating.
+
+            # determine whether any variables are fixed
+            i_fixed = (bounds.lb == bounds.ub)
+
+            if np.all(i_fixed):
+                # all the parameters are fixed, a minimizer is not able to do
+                # anything
+                return _optimize_result_for_equal_bounds(
+                    fun, bounds, meth, args=args, constraints=constraints
+                )
+
+            # determine whether finite differences are needed for any grad/jac
+            fd_needed = (not callable(jac))
+            for con in constraints:
+                if not callable(con.get('jac', None)):
+                    fd_needed = True
+
+            # If finite differences are ever used, remove all fixed variables
+            # Always remove fixed variables for TNC; see gh-14565
+            remove_vars = i_fixed.any() and (fd_needed or meth == "tnc")
+            if remove_vars:
+                x_fixed = (bounds.lb)[i_fixed]
+                x0 = x0[~i_fixed]
+                bounds = _remove_from_bounds(bounds, i_fixed)
+                fun = _remove_from_func(fun, i_fixed, x_fixed)
+                if callable(callback):
+                    callback = _remove_from_func(callback, i_fixed, x_fixed)
+                if callable(jac):
+                    jac = _remove_from_func(jac, i_fixed, x_fixed, remove=1)
+
+                # make a copy of the constraints so the user's version doesn't
+                # get changed. (Shallow copy is ok)
+                constraints = [con.copy() for con in constraints]
+                for con in constraints:  # yes, guaranteed to be a list
+                    con['fun'] = _remove_from_func(con['fun'], i_fixed,
+                                                   x_fixed, min_dim=1,
+                                                   remove=0)
+                    if callable(con.get('jac', None)):
+                        con['jac'] = _remove_from_func(con['jac'], i_fixed,
+                                                       x_fixed, min_dim=2,
+                                                       remove=1)
+        bounds = standardize_bounds(bounds, x0, meth)
+
+    callback = _wrap_callback(callback, meth)
+
+    if meth == 'nelder-mead':
+        res = _minimize_neldermead(fun, x0, args, callback, bounds=bounds,
+                                   **options)
+    elif meth == 'powell':
+        res = _minimize_powell(fun, x0, args, callback, bounds, **options)
+    elif meth == 'cg':
+        res = _minimize_cg(fun, x0, args, jac, callback, **options)
+    elif meth == 'bfgs':
+        res = _minimize_bfgs(fun, x0, args, jac, callback, **options)
+    elif meth == 'newton-cg':
+        res = _minimize_newtoncg(fun, x0, args, jac, hess, hessp, callback,
+                                 **options)
+    elif meth == 'l-bfgs-b':
+        res = _minimize_lbfgsb(fun, x0, args, jac, bounds,
+                               callback=callback, **options)
+    elif meth == 'tnc':
+        res = _minimize_tnc(fun, x0, args, jac, bounds, callback=callback,
+                            **options)
+    elif meth == 'cobyla':
+        res = _minimize_cobyla(fun, x0, args, constraints, callback=callback,
+                               bounds=bounds, **options)
+    elif meth == 'cobyqa':
+        res = _minimize_cobyqa(fun, x0, args, bounds, constraints, callback,
+                               **options)
+    elif meth == 'slsqp':
+        res = _minimize_slsqp(fun, x0, args, jac, bounds,
+                              constraints, callback=callback, **options)
+    elif meth == 'trust-constr':
+        res = _minimize_trustregion_constr(fun, x0, args, jac, hess, hessp,
+                                           bounds, constraints,
+                                           callback=callback, **options)
+    elif meth == 'dogleg':
+        res = _minimize_dogleg(fun, x0, args, jac, hess,
+                               callback=callback, **options)
+    elif meth == 'trust-ncg':
+        res = _minimize_trust_ncg(fun, x0, args, jac, hess, hessp,
+                                  callback=callback, **options)
+    elif meth == 'trust-krylov':
+        res = _minimize_trust_krylov(fun, x0, args, jac, hess, hessp,
+                                     callback=callback, **options)
+    elif meth == 'trust-exact':
+        res = _minimize_trustregion_exact(fun, x0, args, jac, hess,
+                                          callback=callback, **options)
+    else:
+        raise ValueError(f'Unknown solver {method}')
+
+    if remove_vars:
+        res.x = _add_to_array(res.x, i_fixed, x_fixed)
+        res.jac = _add_to_array(res.jac, i_fixed, np.nan)
+        if "hess_inv" in res:
+            res.hess_inv = None  # unknown
+
+    if getattr(callback, 'stop_iteration', False):
+        res.success = False
+        res.status = 99
+        res.message = "`callback` raised `StopIteration`."
+
+    return res
+
+
+def minimize_scalar(fun, bracket=None, bounds=None, args=(),
+                    method=None, tol=None, options=None):
+    """Local minimization of scalar function of one variable.
+
+    Parameters
+    ----------
+    fun : callable
+        Objective function.
+        Scalar function, must return a scalar.
+
+        Suppose the callable has signature ``f0(x, *my_args, **my_kwargs)``, where
+        ``my_args`` and ``my_kwargs`` are required positional and keyword arguments.
+        Rather than passing ``f0`` as the callable, wrap it to accept
+        only ``x``; e.g., pass ``fun=lambda x: f0(x, *my_args, **my_kwargs)`` as the
+        callable, where ``my_args`` (tuple) and ``my_kwargs`` (dict) have been
+        gathered before invoking this function.
+
+    bracket : sequence, optional
+        For methods 'brent' and 'golden', `bracket` defines the bracketing
+        interval and is required.
+        Either a triple ``(xa, xb, xc)`` satisfying ``xa < xb < xc`` and
+        ``func(xb) < func(xa) and  func(xb) < func(xc)``, or a pair
+        ``(xa, xb)`` to be used as initial points for a downhill bracket search
+        (see `scipy.optimize.bracket`).
+        The minimizer ``res.x`` will not necessarily satisfy
+        ``xa <= res.x <= xb``.
+    bounds : sequence, optional
+        For method 'bounded', `bounds` is mandatory and must have two finite
+        items corresponding to the optimization bounds.
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    method : str or callable, optional
+        Type of solver.  Should be one of:
+
+        - :ref:`Brent `
+        - :ref:`Bounded `
+        - :ref:`Golden `
+        - custom - a callable object (added in version 0.14.0), see below
+
+        Default is "Bounded" if bounds are provided and "Brent" otherwise.
+        See the 'Notes' section for details of each solver.
+
+    tol : float, optional
+        Tolerance for termination. For detailed control, use solver-specific
+        options.
+    options : dict, optional
+        A dictionary of solver options.
+
+        maxiter : int
+            Maximum number of iterations to perform.
+        disp : bool
+            Set to True to print convergence messages.
+
+        See :func:`show_options()` for solver-specific options.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a ``OptimizeResult`` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the optimizer exited successfully and
+        ``message`` which describes the cause of the termination. See
+        `OptimizeResult` for a description of other attributes.
+
+    See also
+    --------
+    minimize : Interface to minimization algorithms for scalar multivariate
+        functions
+    show_options : Additional options accepted by the solvers
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter. The default method is the ``"Bounded"`` Brent method if
+    `bounds` are passed and unbounded ``"Brent"`` otherwise.
+
+    Method :ref:`Brent ` uses Brent's
+    algorithm [1]_ to find a local minimum.  The algorithm uses inverse
+    parabolic interpolation when possible to speed up convergence of
+    the golden section method.
+
+    Method :ref:`Golden ` uses the
+    golden section search technique [1]_. It uses analog of the bisection
+    method to decrease the bracketed interval. It is usually
+    preferable to use the *Brent* method.
+
+    Method :ref:`Bounded ` can
+    perform bounded minimization [2]_ [3]_. It uses the Brent method to find a
+    local minimum in the interval x1 < xopt < x2.
+
+    Note that the Brent and Golden methods do not guarantee success unless a
+    valid ``bracket`` triple is provided. If a three-point bracket cannot be
+    found, consider `scipy.optimize.minimize`. Also, all methods are intended
+    only for local minimization. When the function of interest has more than
+    one local minimum, consider :ref:`global_optimization`.
+
+    **Custom minimizers**
+
+    It may be useful to pass a custom minimization method, for example
+    when using some library frontend to minimize_scalar. You can simply
+    pass a callable as the ``method`` parameter.
+
+    The callable is called as ``method(fun, args, **kwargs, **options)``
+    where ``kwargs`` corresponds to any other parameters passed to `minimize`
+    (such as `bracket`, `tol`, etc.), except the `options` dict, which has
+    its contents also passed as `method` parameters pair by pair.  The method
+    shall return an `OptimizeResult` object.
+
+    The provided `method` callable must be able to accept (and possibly ignore)
+    arbitrary parameters; the set of parameters accepted by `minimize` may
+    expand in future versions and then these parameters will be passed to
+    the method. You can find an example in the scipy.optimize tutorial.
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1] Press, W., S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery.
+           Numerical Recipes in C. Cambridge University Press.
+    .. [2] Forsythe, G.E., M. A. Malcolm, and C. B. Moler. "Computer Methods
+           for Mathematical Computations." Prentice-Hall Series in Automatic
+           Computation 259 (1977).
+    .. [3] Brent, Richard P. Algorithms for Minimization Without Derivatives.
+           Courier Corporation, 2013.
+
+    Examples
+    --------
+    Consider the problem of minimizing the following function.
+
+    >>> def f(x):
+    ...     return (x - 2) * x * (x + 2)**2
+
+    Using the *Brent* method, we find the local minimum as:
+
+    >>> from scipy.optimize import minimize_scalar
+    >>> res = minimize_scalar(f)
+    >>> res.fun
+    -9.9149495908
+
+    The minimizer is:
+
+    >>> res.x
+    1.28077640403
+
+    Using the *Bounded* method, we find a local minimum with specified
+    bounds as:
+
+    >>> res = minimize_scalar(f, bounds=(-3, -1), method='bounded')
+    >>> res.fun  # minimum
+    3.28365179850e-13
+    >>> res.x  # minimizer
+    -2.0000002026
+
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+
+    if callable(method):
+        meth = "_custom"
+    elif method is None:
+        meth = 'brent' if bounds is None else 'bounded'
+    else:
+        meth = method.lower()
+    if options is None:
+        options = {}
+
+    if bounds is not None and meth in {'brent', 'golden'}:
+        message = f"Use of `bounds` is incompatible with 'method={method}'."
+        raise ValueError(message)
+
+    if tol is not None:
+        options = dict(options)
+        if meth == 'bounded' and 'xatol' not in options:
+            warn("Method 'bounded' does not support relative tolerance in x; "
+                 "defaulting to absolute tolerance.",
+                 RuntimeWarning, stacklevel=2)
+            options['xatol'] = tol
+        elif meth == '_custom':
+            options.setdefault('tol', tol)
+        else:
+            options.setdefault('xtol', tol)
+
+    # replace boolean "disp" option, if specified, by an integer value.
+    disp = options.get('disp')
+    if isinstance(disp, bool):
+        options['disp'] = 2 * int(disp)
+
+    if meth == '_custom':
+        res = method(fun, args=args, bracket=bracket, bounds=bounds, **options)
+    elif meth == 'brent':
+        res = _recover_from_bracket_error(_minimize_scalar_brent,
+                                          fun, bracket, args, **options)
+    elif meth == 'bounded':
+        if bounds is None:
+            raise ValueError('The `bounds` parameter is mandatory for '
+                             'method `bounded`.')
+        res = _minimize_scalar_bounded(fun, bounds, args, **options)
+    elif meth == 'golden':
+        res = _recover_from_bracket_error(_minimize_scalar_golden,
+                                          fun, bracket, args, **options)
+    else:
+        raise ValueError(f'Unknown solver {method}')
+
+    # gh-16196 reported inconsistencies in the output shape of `res.x`. While
+    # fixing this, future-proof it for when the function is vectorized:
+    # the shape of `res.x` should match that of `res.fun`.
+    res.fun = np.asarray(res.fun)[()]
+    res.x = np.reshape(res.x, res.fun.shape)[()]
+    return res
+
+
+def _remove_from_bounds(bounds, i_fixed):
+    """Removes fixed variables from a `Bounds` instance"""
+    lb = bounds.lb[~i_fixed]
+    ub = bounds.ub[~i_fixed]
+    return Bounds(lb, ub)  # don't mutate original Bounds object
+
+
+def _remove_from_func(fun_in, i_fixed, x_fixed, min_dim=None, remove=0):
+    """Wraps a function such that fixed variables need not be passed in"""
+    def fun_out(x_in, *args, **kwargs):
+        x_out = np.zeros_like(i_fixed, dtype=x_in.dtype)
+        x_out[i_fixed] = x_fixed
+        x_out[~i_fixed] = x_in
+        y_out = fun_in(x_out, *args, **kwargs)
+        y_out = np.array(y_out)
+
+        if min_dim == 1:
+            y_out = np.atleast_1d(y_out)
+        elif min_dim == 2:
+            y_out = np.atleast_2d(y_out)
+
+        if remove == 1:
+            y_out = y_out[..., ~i_fixed]
+        elif remove == 2:
+            y_out = y_out[~i_fixed, ~i_fixed]
+
+        return y_out
+    return fun_out
+
+
+def _add_to_array(x_in, i_fixed, x_fixed):
+    """Adds fixed variables back to an array"""
+    i_free = ~i_fixed
+    if x_in.ndim == 2:
+        i_free = i_free[:, None] @ i_free[None, :]
+    x_out = np.zeros_like(i_free, dtype=x_in.dtype)
+    x_out[~i_free] = x_fixed
+    x_out[i_free] = x_in.ravel()
+    return x_out
+
+
+def _validate_bounds(bounds, x0, meth):
+    """Check that bounds are valid."""
+
+    msg = "An upper bound is less than the corresponding lower bound."
+    if np.any(bounds.ub < bounds.lb):
+        raise ValueError(msg)
+
+    msg = "The number of bounds is not compatible with the length of `x0`."
+    try:
+        bounds.lb = np.broadcast_to(bounds.lb, x0.shape)
+        bounds.ub = np.broadcast_to(bounds.ub, x0.shape)
+    except Exception as e:
+        raise ValueError(msg) from e
+
+    return bounds
+
+def standardize_bounds(bounds, x0, meth):
+    """Converts bounds to the form required by the solver."""
+    if meth in {'trust-constr', 'powell', 'nelder-mead', 'cobyla', 'cobyqa',
+                'new'}:
+        if not isinstance(bounds, Bounds):
+            lb, ub = old_bound_to_new(bounds)
+            bounds = Bounds(lb, ub)
+    elif meth in ('l-bfgs-b', 'tnc', 'slsqp', 'old'):
+        if isinstance(bounds, Bounds):
+            bounds = new_bounds_to_old(bounds.lb, bounds.ub, x0.shape[0])
+    return bounds
+
+
+def standardize_constraints(constraints, x0, meth):
+    """Converts constraints to the form required by the solver."""
+    all_constraint_types = (NonlinearConstraint, LinearConstraint, dict)
+    new_constraint_types = all_constraint_types[:-1]
+    if constraints is None:
+        constraints = []
+    elif isinstance(constraints, all_constraint_types):
+        constraints = [constraints]
+    else:
+        constraints = list(constraints)  # ensure it's a mutable sequence
+
+    if meth in ['trust-constr', 'cobyqa', 'new']:
+        for i, con in enumerate(constraints):
+            if not isinstance(con, new_constraint_types):
+                constraints[i] = old_constraint_to_new(i, con)
+    else:
+        # iterate over copy, changing original
+        for i, con in enumerate(list(constraints)):
+            if isinstance(con, new_constraint_types):
+                old_constraints = new_constraint_to_old(con, x0)
+                constraints[i] = old_constraints[0]
+                constraints.extend(old_constraints[1:])  # appends 1 if present
+
+    return constraints
+
+
+def _optimize_result_for_equal_bounds(
+        fun, bounds, method, args=(), constraints=()
+):
+    """
+    Provides a default OptimizeResult for when a bounded minimization method
+    has (lb == ub).all().
+
+    Parameters
+    ----------
+    fun: callable
+    bounds: Bounds
+    method: str
+    constraints: Constraint
+    """
+    success = True
+    message = 'All independent variables were fixed by bounds.'
+
+    # bounds is new-style
+    x0 = bounds.lb
+
+    if constraints:
+        message = ("All independent variables were fixed by bounds at values"
+                   " that satisfy the constraints.")
+        constraints = standardize_constraints(constraints, x0, 'new')
+
+    maxcv = 0
+    for c in constraints:
+        pc = PreparedConstraint(c, x0)
+        violation = pc.violation(x0)
+        if np.sum(violation):
+            maxcv = max(maxcv, np.max(violation))
+            success = False
+            message = (f"All independent variables were fixed by bounds, but "
+                       f"the independent variables do not satisfy the "
+                       f"constraints exactly. (Maximum violation: {maxcv}).")
+
+    return OptimizeResult(
+        x=x0, fun=fun(x0, *args), success=success, message=message, nfev=1,
+        njev=0, nhev=0,
+    )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..710d8c41decf596e7481bfb8d88d30f008d6f967
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..8cfce8aae21b7533fb1cb7385d0d5f48740e743b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_minpack_py.py
@@ -0,0 +1,1171 @@
+import warnings
+from . import _minpack
+
+import numpy as np
+from numpy import (atleast_1d, triu, shape, transpose, zeros, prod, greater,
+                   asarray, inf,
+                   finfo, inexact, issubdtype, dtype)
+from scipy import linalg
+from scipy.linalg import svd, cholesky, solve_triangular, LinAlgError
+from scipy._lib._util import _asarray_validated, _lazywhere, _contains_nan
+from scipy._lib._util import getfullargspec_no_self as _getfullargspec
+from ._optimize import OptimizeResult, _check_unknown_options, OptimizeWarning
+from ._lsq import least_squares
+# from ._lsq.common import make_strictly_feasible
+from ._lsq.least_squares import prepare_bounds
+from scipy.optimize._minimize import Bounds
+
+__all__ = ['fsolve', 'leastsq', 'fixed_point', 'curve_fit']
+
+
+def _check_func(checker, argname, thefunc, x0, args, numinputs,
+                output_shape=None):
+    res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
+    if (output_shape is not None) and (shape(res) != output_shape):
+        if (output_shape[0] != 1):
+            if len(output_shape) > 1:
+                if output_shape[1] == 1:
+                    return shape(res)
+            msg = f"{checker}: there is a mismatch between the input and output " \
+                  f"shape of the '{argname}' argument"
+            func_name = getattr(thefunc, '__name__', None)
+            if func_name:
+                msg += f" '{func_name}'."
+            else:
+                msg += "."
+            msg += f'Shape should be {output_shape} but it is {shape(res)}.'
+            raise TypeError(msg)
+    if issubdtype(res.dtype, inexact):
+        dt = res.dtype
+    else:
+        dt = dtype(float)
+    return shape(res), dt
+
+
+def fsolve(func, x0, args=(), fprime=None, full_output=0,
+           col_deriv=0, xtol=1.49012e-8, maxfev=0, band=None,
+           epsfcn=None, factor=100, diag=None):
+    """
+    Find the roots of a function.
+
+    Return the roots of the (non-linear) equations defined by
+    ``func(x) = 0`` given a starting estimate.
+
+    Parameters
+    ----------
+    func : callable ``f(x, *args)``
+        A function that takes at least one (possibly vector) argument,
+        and returns a value of the same length.
+    x0 : ndarray
+        The starting estimate for the roots of ``func(x) = 0``.
+    args : tuple, optional
+        Any extra arguments to `func`.
+    fprime : callable ``f(x, *args)``, optional
+        A function to compute the Jacobian of `func` with derivatives
+        across the rows. By default, the Jacobian will be estimated.
+    full_output : bool, optional
+        If True, return optional outputs.
+    col_deriv : bool, optional
+        Specify whether the Jacobian function computes derivatives down
+        the columns (faster, because there is no transpose operation).
+    xtol : float, optional
+        The calculation will terminate if the relative error between two
+        consecutive iterates is at most `xtol`.
+    maxfev : int, optional
+        The maximum number of calls to the function. If zero, then
+        ``100*(N+1)`` is the maximum where N is the number of elements
+        in `x0`.
+    band : tuple, optional
+        If set to a two-sequence containing the number of sub- and
+        super-diagonals within the band of the Jacobi matrix, the
+        Jacobi matrix is considered banded (only for ``fprime=None``).
+    epsfcn : float, optional
+        A suitable step length for the forward-difference
+        approximation of the Jacobian (for ``fprime=None``). If
+        `epsfcn` is less than the machine precision, it is assumed
+        that the relative errors in the functions are of the order of
+        the machine precision.
+    factor : float, optional
+        A parameter determining the initial step bound
+        (``factor * || diag * x||``). Should be in the interval
+        ``(0.1, 100)``.
+    diag : sequence, optional
+        N positive entries that serve as a scale factors for the
+        variables.
+
+    Returns
+    -------
+    x : ndarray
+        The solution (or the result of the last iteration for
+        an unsuccessful call).
+    infodict : dict
+        A dictionary of optional outputs with the keys:
+
+        ``nfev``
+            number of function calls
+        ``njev``
+            number of Jacobian calls
+        ``fvec``
+            function evaluated at the output
+        ``fjac``
+            the orthogonal matrix, q, produced by the QR
+            factorization of the final approximate Jacobian
+            matrix, stored column wise
+        ``r``
+            upper triangular matrix produced by QR factorization
+            of the same matrix
+        ``qtf``
+            the vector ``(transpose(q) * fvec)``
+
+    ier : int
+        An integer flag.  Set to 1 if a solution was found, otherwise refer
+        to `mesg` for more information.
+    mesg : str
+        If no solution is found, `mesg` details the cause of failure.
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See the ``method='hybr'`` in particular.
+
+    Notes
+    -----
+    ``fsolve`` is a wrapper around MINPACK's hybrd and hybrj algorithms.
+
+    Examples
+    --------
+    Find a solution to the system of equations:
+    ``x0*cos(x1) = 4,  x1*x0 - x1 = 5``.
+
+    >>> import numpy as np
+    >>> from scipy.optimize import fsolve
+    >>> def func(x):
+    ...     return [x[0] * np.cos(x[1]) - 4,
+    ...             x[1] * x[0] - x[1] - 5]
+    >>> root = fsolve(func, [1, 1])
+    >>> root
+    array([6.50409711, 0.90841421])
+    >>> np.isclose(func(root), [0.0, 0.0])  # func(root) should be almost 0.0.
+    array([ True,  True])
+
+    """
+    def _wrapped_func(*fargs):
+        """
+        Wrapped `func` to track the number of times
+        the function has been called.
+        """
+        _wrapped_func.nfev += 1
+        return func(*fargs)
+
+    _wrapped_func.nfev = 0
+
+    options = {'col_deriv': col_deriv,
+               'xtol': xtol,
+               'maxfev': maxfev,
+               'band': band,
+               'eps': epsfcn,
+               'factor': factor,
+               'diag': diag}
+
+    res = _root_hybr(_wrapped_func, x0, args, jac=fprime, **options)
+    res.nfev = _wrapped_func.nfev
+
+    if full_output:
+        x = res['x']
+        info = {k: res.get(k)
+                    for k in ('nfev', 'njev', 'fjac', 'r', 'qtf') if k in res}
+        info['fvec'] = res['fun']
+        return x, info, res['status'], res['message']
+    else:
+        status = res['status']
+        msg = res['message']
+        if status == 0:
+            raise TypeError(msg)
+        elif status == 1:
+            pass
+        elif status in [2, 3, 4, 5]:
+            warnings.warn(msg, RuntimeWarning, stacklevel=2)
+        else:
+            raise TypeError(msg)
+        return res['x']
+
+
+def _root_hybr(func, x0, args=(), jac=None,
+               col_deriv=0, xtol=1.49012e-08, maxfev=0, band=None, eps=None,
+               factor=100, diag=None, **unknown_options):
+    """
+    Find the roots of a multivariate function using MINPACK's hybrd and
+    hybrj routines (modified Powell method).
+
+    Options
+    -------
+    col_deriv : bool
+        Specify whether the Jacobian function computes derivatives down
+        the columns (faster, because there is no transpose operation).
+    xtol : float
+        The calculation will terminate if the relative error between two
+        consecutive iterates is at most `xtol`.
+    maxfev : int
+        The maximum number of calls to the function. If zero, then
+        ``100*(N+1)`` is the maximum where N is the number of elements
+        in `x0`.
+    band : tuple
+        If set to a two-sequence containing the number of sub- and
+        super-diagonals within the band of the Jacobi matrix, the
+        Jacobi matrix is considered banded (only for ``jac=None``).
+    eps : float
+        A suitable step length for the forward-difference
+        approximation of the Jacobian (for ``jac=None``). If
+        `eps` is less than the machine precision, it is assumed
+        that the relative errors in the functions are of the order of
+        the machine precision.
+    factor : float
+        A parameter determining the initial step bound
+        (``factor * || diag * x||``). Should be in the interval
+        ``(0.1, 100)``.
+    diag : sequence
+        N positive entries that serve as a scale factors for the
+        variables.
+
+    """
+    _check_unknown_options(unknown_options)
+    epsfcn = eps
+
+    x0 = asarray(x0).flatten()
+    n = len(x0)
+    if not isinstance(args, tuple):
+        args = (args,)
+    shape, dtype = _check_func('fsolve', 'func', func, x0, args, n, (n,))
+    if epsfcn is None:
+        epsfcn = finfo(dtype).eps
+    Dfun = jac
+    if Dfun is None:
+        if band is None:
+            ml, mu = -10, -10
+        else:
+            ml, mu = band[:2]
+        if maxfev == 0:
+            maxfev = 200 * (n + 1)
+        retval = _minpack._hybrd(func, x0, args, 1, xtol, maxfev,
+                                 ml, mu, epsfcn, factor, diag)
+    else:
+        _check_func('fsolve', 'fprime', Dfun, x0, args, n, (n, n))
+        if (maxfev == 0):
+            maxfev = 100 * (n + 1)
+        retval = _minpack._hybrj(func, Dfun, x0, args, 1,
+                                 col_deriv, xtol, maxfev, factor, diag)
+
+    x, status = retval[0], retval[-1]
+
+    errors = {0: "Improper input parameters were entered.",
+              1: "The solution converged.",
+              2: "The number of calls to function has "
+                  "reached maxfev = %d." % maxfev,
+              3: f"xtol={xtol:f} is too small, no further improvement "
+                  "in the approximate\n solution is possible.",
+              4: "The iteration is not making good progress, as measured "
+                  "by the \n improvement from the last five "
+                  "Jacobian evaluations.",
+              5: "The iteration is not making good progress, "
+                  "as measured by the \n improvement from the last "
+                  "ten iterations.",
+              'unknown': "An error occurred."}
+
+    info = retval[1]
+    info['fun'] = info.pop('fvec')
+    sol = OptimizeResult(x=x, success=(status == 1), status=status,
+                         method="hybr")
+    sol.update(info)
+    try:
+        sol['message'] = errors[status]
+    except KeyError:
+        sol['message'] = errors['unknown']
+
+    return sol
+
+
+LEASTSQ_SUCCESS = [1, 2, 3, 4]
+LEASTSQ_FAILURE = [5, 6, 7, 8]
+
+
+def leastsq(func, x0, args=(), Dfun=None, full_output=False,
+            col_deriv=False, ftol=1.49012e-8, xtol=1.49012e-8,
+            gtol=0.0, maxfev=0, epsfcn=None, factor=100, diag=None):
+    """
+    Minimize the sum of squares of a set of equations.
+
+    ::
+
+        x = arg min(sum(func(y)**2,axis=0))
+                 y
+
+    Parameters
+    ----------
+    func : callable
+        Should take at least one (possibly length ``N`` vector) argument and
+        returns ``M`` floating point numbers. It must not return NaNs or
+        fitting might fail. ``M`` must be greater than or equal to ``N``.
+    x0 : ndarray
+        The starting estimate for the minimization.
+    args : tuple, optional
+        Any extra arguments to func are placed in this tuple.
+    Dfun : callable, optional
+        A function or method to compute the Jacobian of func with derivatives
+        across the rows. If this is None, the Jacobian will be estimated.
+    full_output : bool, optional
+        If ``True``, return all optional outputs (not just `x` and `ier`).
+    col_deriv : bool, optional
+        If ``True``, specify that the Jacobian function computes derivatives
+        down the columns (faster, because there is no transpose operation).
+    ftol : float, optional
+        Relative error desired in the sum of squares.
+    xtol : float, optional
+        Relative error desired in the approximate solution.
+    gtol : float, optional
+        Orthogonality desired between the function vector and the columns of
+        the Jacobian.
+    maxfev : int, optional
+        The maximum number of calls to the function. If `Dfun` is provided,
+        then the default `maxfev` is 100*(N+1) where N is the number of elements
+        in x0, otherwise the default `maxfev` is 200*(N+1).
+    epsfcn : float, optional
+        A variable used in determining a suitable step length for the forward-
+        difference approximation of the Jacobian (for Dfun=None).
+        Normally the actual step length will be sqrt(epsfcn)*x
+        If epsfcn is less than the machine precision, it is assumed that the
+        relative errors are of the order of the machine precision.
+    factor : float, optional
+        A parameter determining the initial step bound
+        (``factor * || diag * x||``). Should be in interval ``(0.1, 100)``.
+    diag : sequence, optional
+        N positive entries that serve as a scale factors for the variables.
+
+    Returns
+    -------
+    x : ndarray
+        The solution (or the result of the last iteration for an unsuccessful
+        call).
+    cov_x : ndarray
+        The inverse of the Hessian. `fjac` and `ipvt` are used to construct an
+        estimate of the Hessian. A value of None indicates a singular matrix,
+        which means the curvature in parameters `x` is numerically flat. To
+        obtain the covariance matrix of the parameters `x`, `cov_x` must be
+        multiplied by the variance of the residuals -- see curve_fit. Only
+        returned if `full_output` is ``True``.
+    infodict : dict
+        a dictionary of optional outputs with the keys:
+
+        ``nfev``
+            The number of function calls
+        ``fvec``
+            The function evaluated at the output
+        ``fjac``
+            A permutation of the R matrix of a QR
+            factorization of the final approximate
+            Jacobian matrix, stored column wise.
+            Together with ipvt, the covariance of the
+            estimate can be approximated.
+        ``ipvt``
+            An integer array of length N which defines
+            a permutation matrix, p, such that
+            fjac*p = q*r, where r is upper triangular
+            with diagonal elements of nonincreasing
+            magnitude. Column j of p is column ipvt(j)
+            of the identity matrix.
+        ``qtf``
+            The vector (transpose(q) * fvec).
+
+        Only returned if `full_output` is ``True``.
+    mesg : str
+        A string message giving information about the cause of failure.
+        Only returned if `full_output` is ``True``.
+    ier : int
+        An integer flag. If it is equal to 1, 2, 3 or 4, the solution was
+        found. Otherwise, the solution was not found. In either case, the
+        optional output variable 'mesg' gives more information.
+
+    See Also
+    --------
+    least_squares : Newer interface to solve nonlinear least-squares problems
+        with bounds on the variables. See ``method='lm'`` in particular.
+
+    Notes
+    -----
+    "leastsq" is a wrapper around MINPACK's lmdif and lmder algorithms.
+
+    cov_x is a Jacobian approximation to the Hessian of the least squares
+    objective function.
+    This approximation assumes that the objective function is based on the
+    difference between some observed target data (ydata) and a (non-linear)
+    function of the parameters `f(xdata, params)` ::
+
+           func(params) = ydata - f(xdata, params)
+
+    so that the objective function is ::
+
+           min   sum((ydata - f(xdata, params))**2, axis=0)
+         params
+
+    The solution, `x`, is always a 1-D array, regardless of the shape of `x0`,
+    or whether `x0` is a scalar.
+
+    Examples
+    --------
+    >>> from scipy.optimize import leastsq
+    >>> def func(x):
+    ...     return 2*(x-3)**2+1
+    >>> leastsq(func, 0)
+    (array([2.99999999]), 1)
+
+    """
+    x0 = asarray(x0).flatten()
+    n = len(x0)
+    if not isinstance(args, tuple):
+        args = (args,)
+    shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)
+    m = shape[0]
+
+    if n > m:
+        raise TypeError(f"Improper input: func input vector length N={n} must"
+                        f" not exceed func output vector length M={m}")
+
+    if epsfcn is None:
+        epsfcn = finfo(dtype).eps
+
+    if Dfun is None:
+        if maxfev == 0:
+            maxfev = 200*(n + 1)
+        retval = _minpack._lmdif(func, x0, args, full_output, ftol, xtol,
+                                 gtol, maxfev, epsfcn, factor, diag)
+    else:
+        if col_deriv:
+            _check_func('leastsq', 'Dfun', Dfun, x0, args, n, (n, m))
+        else:
+            _check_func('leastsq', 'Dfun', Dfun, x0, args, n, (m, n))
+        if maxfev == 0:
+            maxfev = 100 * (n + 1)
+        retval = _minpack._lmder(func, Dfun, x0, args, full_output,
+                                 col_deriv, ftol, xtol, gtol, maxfev,
+                                 factor, diag)
+
+    errors = {0: ["Improper input parameters.", TypeError],
+              1: ["Both actual and predicted relative reductions "
+                  f"in the sum of squares\n  are at most {ftol:f}", None],
+              2: ["The relative error between two consecutive "
+                  f"iterates is at most {xtol:f}", None],
+              3: ["Both actual and predicted relative reductions in "
+                  f"the sum of squares\n  are at most {ftol:f} and the "
+                  "relative error between two consecutive "
+                  f"iterates is at \n  most {xtol:f}", None],
+              4: ["The cosine of the angle between func(x) and any "
+                  f"column of the\n  Jacobian is at most {gtol:f} in "
+                  "absolute value", None],
+              5: ["Number of calls to function has reached "
+                  "maxfev = %d." % maxfev, ValueError],
+              6: [f"ftol={ftol:f} is too small, no further reduction "
+                  "in the sum of squares\n  is possible.",
+                  ValueError],
+              7: [f"xtol={xtol:f} is too small, no further improvement in "
+                  "the approximate\n  solution is possible.",
+                  ValueError],
+              8: [f"gtol={gtol:f} is too small, func(x) is orthogonal to the "
+                  "columns of\n  the Jacobian to machine precision.", ValueError]}
+
+    # The FORTRAN return value (possible return values are >= 0 and <= 8)
+    info = retval[-1]
+
+    if full_output:
+        cov_x = None
+        if info in LEASTSQ_SUCCESS:
+            # This was
+            # perm = take(eye(n), retval[1]['ipvt'] - 1, 0)
+            # r = triu(transpose(retval[1]['fjac'])[:n, :])
+            # R = dot(r, perm)
+            # cov_x = inv(dot(transpose(R), R))
+            # but the explicit dot product was not necessary and sometimes
+            # the result was not symmetric positive definite. See gh-4555.
+            perm = retval[1]['ipvt']
+            n = len(perm)
+            r = triu(transpose(retval[1]['fjac'])[:n, :])
+            inv_triu = linalg.get_lapack_funcs('trtri', (r,))
+            try:
+                # inverse of permuted matrix is a permutation of matrix inverse
+                invR, trtri_info = inv_triu(r)  # default: upper, non-unit diag
+                if trtri_info != 0:  # explicit comparison for readability
+                    raise LinAlgError(f'trtri returned info {trtri_info}')
+                invR[perm] = invR.copy()
+                cov_x = invR @ invR.T
+            except (LinAlgError, ValueError):
+                pass
+        return (retval[0], cov_x) + retval[1:-1] + (errors[info][0], info)
+    else:
+        if info in LEASTSQ_FAILURE:
+            warnings.warn(errors[info][0], RuntimeWarning, stacklevel=2)
+        elif info == 0:
+            raise errors[info][1](errors[info][0])
+        return retval[0], info
+
+
+def _lightweight_memoizer(f):
+    # very shallow memoization to address gh-13670: only remember the first set
+    # of parameters and corresponding function value, and only attempt to use
+    # them twice (the number of times the function is evaluated at x0).
+    def _memoized_func(params):
+        if _memoized_func.skip_lookup:
+            return f(params)
+
+        if np.all(_memoized_func.last_params == params):
+            return _memoized_func.last_val
+        elif _memoized_func.last_params is not None:
+            _memoized_func.skip_lookup = True
+
+        val = f(params)
+
+        if _memoized_func.last_params is None:
+            _memoized_func.last_params = np.copy(params)
+            _memoized_func.last_val = val
+
+        return val
+
+    _memoized_func.last_params = None
+    _memoized_func.last_val = None
+    _memoized_func.skip_lookup = False
+    return _memoized_func
+
+
+def _wrap_func(func, xdata, ydata, transform):
+    if transform is None:
+        def func_wrapped(params):
+            return func(xdata, *params) - ydata
+    elif transform.size == 1 or transform.ndim == 1:
+        def func_wrapped(params):
+            return transform * (func(xdata, *params) - ydata)
+    else:
+        # Chisq = (y - yd)^T C^{-1} (y-yd)
+        # transform = L such that C = L L^T
+        # C^{-1} = L^{-T} L^{-1}
+        # Chisq = (y - yd)^T L^{-T} L^{-1} (y-yd)
+        # Define (y-yd)' = L^{-1} (y-yd)
+        # by solving
+        # L (y-yd)' = (y-yd)
+        # and minimize (y-yd)'^T (y-yd)'
+        def func_wrapped(params):
+            return solve_triangular(transform, func(xdata, *params) - ydata, lower=True)
+    return func_wrapped
+
+
+def _wrap_jac(jac, xdata, transform):
+    if transform is None:
+        def jac_wrapped(params):
+            return jac(xdata, *params)
+    elif transform.ndim == 1:
+        def jac_wrapped(params):
+            return transform[:, np.newaxis] * np.asarray(jac(xdata, *params))
+    else:
+        def jac_wrapped(params):
+            return solve_triangular(transform,
+                                    np.asarray(jac(xdata, *params)),
+                                    lower=True)
+    return jac_wrapped
+
+
+def _initialize_feasible(lb, ub):
+    p0 = np.ones_like(lb)
+    lb_finite = np.isfinite(lb)
+    ub_finite = np.isfinite(ub)
+
+    mask = lb_finite & ub_finite
+    p0[mask] = 0.5 * (lb[mask] + ub[mask])
+
+    mask = lb_finite & ~ub_finite
+    p0[mask] = lb[mask] + 1
+
+    mask = ~lb_finite & ub_finite
+    p0[mask] = ub[mask] - 1
+
+    return p0
+
+
+def curve_fit(f, xdata, ydata, p0=None, sigma=None, absolute_sigma=False,
+              check_finite=None, bounds=(-np.inf, np.inf), method=None,
+              jac=None, *, full_output=False, nan_policy=None,
+              **kwargs):
+    """
+    Use non-linear least squares to fit a function, f, to data.
+
+    Assumes ``ydata = f(xdata, *params) + eps``.
+
+    Parameters
+    ----------
+    f : callable
+        The model function, f(x, ...). It must take the independent
+        variable as the first argument and the parameters to fit as
+        separate remaining arguments.
+    xdata : array_like
+        The independent variable where the data is measured.
+        Should usually be an M-length sequence or an (k,M)-shaped array for
+        functions with k predictors, and each element should be float
+        convertible if it is an array like object.
+    ydata : array_like
+        The dependent data, a length M array - nominally ``f(xdata, ...)``.
+    p0 : array_like, optional
+        Initial guess for the parameters (length N). If None, then the
+        initial values will all be 1 (if the number of parameters for the
+        function can be determined using introspection, otherwise a
+        ValueError is raised).
+    sigma : None or scalar or M-length sequence or MxM array, optional
+        Determines the uncertainty in `ydata`. If we define residuals as
+        ``r = ydata - f(xdata, *popt)``, then the interpretation of `sigma`
+        depends on its number of dimensions:
+
+        - A scalar or 1-D `sigma` should contain values of standard deviations of
+          errors in `ydata`. In this case, the optimized function is
+          ``chisq = sum((r / sigma) ** 2)``.
+
+        - A 2-D `sigma` should contain the covariance matrix of
+          errors in `ydata`. In this case, the optimized function is
+          ``chisq = r.T @ inv(sigma) @ r``.
+
+          .. versionadded:: 0.19
+
+        None (default) is equivalent of 1-D `sigma` filled with ones.
+    absolute_sigma : bool, optional
+        If True, `sigma` is used in an absolute sense and the estimated parameter
+        covariance `pcov` reflects these absolute values.
+
+        If False (default), only the relative magnitudes of the `sigma` values matter.
+        The returned parameter covariance matrix `pcov` is based on scaling
+        `sigma` by a constant factor. This constant is set by demanding that the
+        reduced `chisq` for the optimal parameters `popt` when using the
+        *scaled* `sigma` equals unity. In other words, `sigma` is scaled to
+        match the sample variance of the residuals after the fit. Default is False.
+        Mathematically,
+        ``pcov(absolute_sigma=False) = pcov(absolute_sigma=True) * chisq(popt)/(M-N)``
+    check_finite : bool, optional
+        If True, check that the input arrays do not contain nans of infs,
+        and raise a ValueError if they do. Setting this parameter to
+        False may silently produce nonsensical results if the input arrays
+        do contain nans. Default is True if `nan_policy` is not specified
+        explicitly and False otherwise.
+    bounds : 2-tuple of array_like or `Bounds`, optional
+        Lower and upper bounds on parameters. Defaults to no bounds.
+        There are two ways to specify the bounds:
+
+        - Instance of `Bounds` class.
+
+        - 2-tuple of array_like: Each element of the tuple must be either
+          an array with the length equal to the number of parameters, or a
+          scalar (in which case the bound is taken to be the same for all
+          parameters). Use ``np.inf`` with an appropriate sign to disable
+          bounds on all or some parameters.
+
+    method : {'lm', 'trf', 'dogbox'}, optional
+        Method to use for optimization. See `least_squares` for more details.
+        Default is 'lm' for unconstrained problems and 'trf' if `bounds` are
+        provided. The method 'lm' won't work when the number of observations
+        is less than the number of variables, use 'trf' or 'dogbox' in this
+        case.
+
+        .. versionadded:: 0.17
+    jac : callable, string or None, optional
+        Function with signature ``jac(x, ...)`` which computes the Jacobian
+        matrix of the model function with respect to parameters as a dense
+        array_like structure. It will be scaled according to provided `sigma`.
+        If None (default), the Jacobian will be estimated numerically.
+        String keywords for 'trf' and 'dogbox' methods can be used to select
+        a finite difference scheme, see `least_squares`.
+
+        .. versionadded:: 0.18
+    full_output : boolean, optional
+        If True, this function returns additional information: `infodict`,
+        `mesg`, and `ier`.
+
+        .. versionadded:: 1.9
+    nan_policy : {'raise', 'omit', None}, optional
+        Defines how to handle when input contains nan.
+        The following options are available (default is None):
+
+        * 'raise': throws an error
+        * 'omit': performs the calculations ignoring nan values
+        * None: no special handling of NaNs is performed
+          (except what is done by check_finite); the behavior when NaNs
+          are present is implementation-dependent and may change.
+
+        Note that if this value is specified explicitly (not None),
+        `check_finite` will be set as False.
+
+        .. versionadded:: 1.11
+    **kwargs
+        Keyword arguments passed to `leastsq` for ``method='lm'`` or
+        `least_squares` otherwise.
+
+    Returns
+    -------
+    popt : array
+        Optimal values for the parameters so that the sum of the squared
+        residuals of ``f(xdata, *popt) - ydata`` is minimized.
+    pcov : 2-D array
+        The estimated approximate covariance of popt. The diagonals provide
+        the variance of the parameter estimate. To compute one standard
+        deviation errors on the parameters, use
+        ``perr = np.sqrt(np.diag(pcov))``. Note that the relationship between
+        `cov` and parameter error estimates is derived based on a linear
+        approximation to the model function around the optimum [1]_.
+        When this approximation becomes inaccurate, `cov` may not provide an
+        accurate measure of uncertainty.
+
+        How the `sigma` parameter affects the estimated covariance
+        depends on `absolute_sigma` argument, as described above.
+
+        If the Jacobian matrix at the solution doesn't have a full rank, then
+        'lm' method returns a matrix filled with ``np.inf``, on the other hand
+        'trf'  and 'dogbox' methods use Moore-Penrose pseudoinverse to compute
+        the covariance matrix. Covariance matrices with large condition numbers
+        (e.g. computed with `numpy.linalg.cond`) may indicate that results are
+        unreliable.
+    infodict : dict (returned only if `full_output` is True)
+        a dictionary of optional outputs with the keys:
+
+        ``nfev``
+            The number of function calls. Methods 'trf' and 'dogbox' do not
+            count function calls for numerical Jacobian approximation,
+            as opposed to 'lm' method.
+        ``fvec``
+            The residual values evaluated at the solution, for a 1-D `sigma`
+            this is ``(f(x, *popt) - ydata)/sigma``.
+        ``fjac``
+            A permutation of the R matrix of a QR
+            factorization of the final approximate
+            Jacobian matrix, stored column wise.
+            Together with ipvt, the covariance of the
+            estimate can be approximated.
+            Method 'lm' only provides this information.
+        ``ipvt``
+            An integer array of length N which defines
+            a permutation matrix, p, such that
+            fjac*p = q*r, where r is upper triangular
+            with diagonal elements of nonincreasing
+            magnitude. Column j of p is column ipvt(j)
+            of the identity matrix.
+            Method 'lm' only provides this information.
+        ``qtf``
+            The vector (transpose(q) * fvec).
+            Method 'lm' only provides this information.
+
+        .. versionadded:: 1.9
+    mesg : str (returned only if `full_output` is True)
+        A string message giving information about the solution.
+
+        .. versionadded:: 1.9
+    ier : int (returned only if `full_output` is True)
+        An integer flag. If it is equal to 1, 2, 3 or 4, the solution was
+        found. Otherwise, the solution was not found. In either case, the
+        optional output variable `mesg` gives more information.
+
+        .. versionadded:: 1.9
+
+    Raises
+    ------
+    ValueError
+        if either `ydata` or `xdata` contain NaNs, or if incompatible options
+        are used.
+
+    RuntimeError
+        if the least-squares minimization fails.
+
+    OptimizeWarning
+        if covariance of the parameters can not be estimated.
+
+    See Also
+    --------
+    least_squares : Minimize the sum of squares of nonlinear functions.
+    scipy.stats.linregress : Calculate a linear least squares regression for
+                             two sets of measurements.
+
+    Notes
+    -----
+    Users should ensure that inputs `xdata`, `ydata`, and the output of `f`
+    are ``float64``, or else the optimization may return incorrect results.
+
+    With ``method='lm'``, the algorithm uses the Levenberg-Marquardt algorithm
+    through `leastsq`. Note that this algorithm can only deal with
+    unconstrained problems.
+
+    Box constraints can be handled by methods 'trf' and 'dogbox'. Refer to
+    the docstring of `least_squares` for more information.
+
+    Parameters to be fitted must have similar scale. Differences of multiple
+    orders of magnitude can lead to incorrect results. For the 'trf' and
+    'dogbox' methods, the `x_scale` keyword argument can be used to scale
+    the parameters.
+
+    References
+    ----------
+    .. [1] K. Vugrin et al. Confidence region estimation techniques for nonlinear
+           regression in groundwater flow: Three case studies. Water Resources
+           Research, Vol. 43, W03423, :doi:`10.1029/2005WR004804`
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> from scipy.optimize import curve_fit
+
+    >>> def func(x, a, b, c):
+    ...     return a * np.exp(-b * x) + c
+
+    Define the data to be fit with some noise:
+
+    >>> xdata = np.linspace(0, 4, 50)
+    >>> y = func(xdata, 2.5, 1.3, 0.5)
+    >>> rng = np.random.default_rng()
+    >>> y_noise = 0.2 * rng.normal(size=xdata.size)
+    >>> ydata = y + y_noise
+    >>> plt.plot(xdata, ydata, 'b-', label='data')
+
+    Fit for the parameters a, b, c of the function `func`:
+
+    >>> popt, pcov = curve_fit(func, xdata, ydata)
+    >>> popt
+    array([2.56274217, 1.37268521, 0.47427475])
+    >>> plt.plot(xdata, func(xdata, *popt), 'r-',
+    ...          label='fit: a=%5.3f, b=%5.3f, c=%5.3f' % tuple(popt))
+
+    Constrain the optimization to the region of ``0 <= a <= 3``,
+    ``0 <= b <= 1`` and ``0 <= c <= 0.5``:
+
+    >>> popt, pcov = curve_fit(func, xdata, ydata, bounds=(0, [3., 1., 0.5]))
+    >>> popt
+    array([2.43736712, 1.        , 0.34463856])
+    >>> plt.plot(xdata, func(xdata, *popt), 'g--',
+    ...          label='fit: a=%5.3f, b=%5.3f, c=%5.3f' % tuple(popt))
+
+    >>> plt.xlabel('x')
+    >>> plt.ylabel('y')
+    >>> plt.legend()
+    >>> plt.show()
+
+    For reliable results, the model `func` should not be overparametrized;
+    redundant parameters can cause unreliable covariance matrices and, in some
+    cases, poorer quality fits. As a quick check of whether the model may be
+    overparameterized, calculate the condition number of the covariance matrix:
+
+    >>> np.linalg.cond(pcov)
+    34.571092161547405  # may vary
+
+    The value is small, so it does not raise much concern. If, however, we were
+    to add a fourth parameter ``d`` to `func` with the same effect as ``a``:
+
+    >>> def func2(x, a, b, c, d):
+    ...     return a * d * np.exp(-b * x) + c  # a and d are redundant
+    >>> popt, pcov = curve_fit(func2, xdata, ydata)
+    >>> np.linalg.cond(pcov)
+    1.13250718925596e+32  # may vary
+
+    Such a large value is cause for concern. The diagonal elements of the
+    covariance matrix, which is related to uncertainty of the fit, gives more
+    information:
+
+    >>> np.diag(pcov)
+    array([1.48814742e+29, 3.78596560e-02, 5.39253738e-03, 2.76417220e+28])  # may vary
+
+    Note that the first and last terms are much larger than the other elements,
+    suggesting that the optimal values of these parameters are ambiguous and
+    that only one of these parameters is needed in the model.
+
+    If the optimal parameters of `f` differ by multiple orders of magnitude, the
+    resulting fit can be inaccurate. Sometimes, `curve_fit` can fail to find any
+    results:
+
+    >>> ydata = func(xdata, 500000, 0.01, 15)
+    >>> try:
+    ...     popt, pcov = curve_fit(func, xdata, ydata, method = 'trf')
+    ... except RuntimeError as e:
+    ...     print(e)
+    Optimal parameters not found: The maximum number of function evaluations is
+    exceeded.
+
+    If parameter scale is roughly known beforehand, it can be defined in
+    `x_scale` argument:
+
+    >>> popt, pcov = curve_fit(func, xdata, ydata, method = 'trf',
+    ...                        x_scale = [1000, 1, 1])
+    >>> popt
+    array([5.00000000e+05, 1.00000000e-02, 1.49999999e+01])
+    """
+    if p0 is None:
+        # determine number of parameters by inspecting the function
+        sig = _getfullargspec(f)
+        args = sig.args
+        if len(args) < 2:
+            raise ValueError("Unable to determine number of fit parameters.")
+        n = len(args) - 1
+    else:
+        p0 = np.atleast_1d(p0)
+        n = p0.size
+
+    if isinstance(bounds, Bounds):
+        lb, ub = bounds.lb, bounds.ub
+    else:
+        lb, ub = prepare_bounds(bounds, n)
+    if p0 is None:
+        p0 = _initialize_feasible(lb, ub)
+
+    bounded_problem = np.any((lb > -np.inf) | (ub < np.inf))
+    if method is None:
+        if bounded_problem:
+            method = 'trf'
+        else:
+            method = 'lm'
+
+    if method == 'lm' and bounded_problem:
+        raise ValueError("Method 'lm' only works for unconstrained problems. "
+                         "Use 'trf' or 'dogbox' instead.")
+
+    if check_finite is None:
+        check_finite = True if nan_policy is None else False
+
+    # optimization may produce garbage for float32 inputs, cast them to float64
+    if check_finite:
+        ydata = np.asarray_chkfinite(ydata, float)
+    else:
+        ydata = np.asarray(ydata, float)
+
+    if isinstance(xdata, (list, tuple, np.ndarray)):
+        # `xdata` is passed straight to the user-defined `f`, so allow
+        # non-array_like `xdata`.
+        if check_finite:
+            xdata = np.asarray_chkfinite(xdata, float)
+        else:
+            xdata = np.asarray(xdata, float)
+
+    if ydata.size == 0:
+        raise ValueError("`ydata` must not be empty!")
+
+    # nan handling is needed only if check_finite is False because if True,
+    # the x-y data are already checked, and they don't contain nans.
+    if not check_finite and nan_policy is not None:
+        if nan_policy == "propagate":
+            raise ValueError("`nan_policy='propagate'` is not supported "
+                             "by this function.")
+
+        policies = [None, 'raise', 'omit']
+        x_contains_nan, nan_policy = _contains_nan(xdata, nan_policy,
+                                                   policies=policies)
+        y_contains_nan, nan_policy = _contains_nan(ydata, nan_policy,
+                                                   policies=policies)
+
+        if (x_contains_nan or y_contains_nan) and nan_policy == 'omit':
+            # ignore NaNs for N dimensional arrays
+            has_nan = np.isnan(xdata)
+            has_nan = has_nan.any(axis=tuple(range(has_nan.ndim-1)))
+            has_nan |= np.isnan(ydata)
+
+            xdata = xdata[..., ~has_nan]
+            ydata = ydata[~has_nan]
+
+            # Also omit the corresponding entries from sigma
+            if sigma is not None:
+                sigma = np.asarray(sigma)
+                if sigma.ndim == 1:
+                    sigma = sigma[~has_nan]
+                elif sigma.ndim == 2:
+                    sigma = sigma[~has_nan, :]
+                    sigma = sigma[:, ~has_nan]
+
+    # Determine type of sigma
+    if sigma is not None:
+        sigma = np.asarray(sigma)
+
+        # if 1-D or a scalar, sigma are errors, define transform = 1/sigma
+        if sigma.size == 1 or sigma.shape == (ydata.size,):
+            transform = 1.0 / sigma
+        # if 2-D, sigma is the covariance matrix,
+        # define transform = L such that L L^T = C
+        elif sigma.shape == (ydata.size, ydata.size):
+            try:
+                # scipy.linalg.cholesky requires lower=True to return L L^T = A
+                transform = cholesky(sigma, lower=True)
+            except LinAlgError as e:
+                raise ValueError("`sigma` must be positive definite.") from e
+        else:
+            raise ValueError("`sigma` has incorrect shape.")
+    else:
+        transform = None
+
+    func = _lightweight_memoizer(_wrap_func(f, xdata, ydata, transform))
+
+    if callable(jac):
+        jac = _lightweight_memoizer(_wrap_jac(jac, xdata, transform))
+    elif jac is None and method != 'lm':
+        jac = '2-point'
+
+    if 'args' in kwargs:
+        # The specification for the model function `f` does not support
+        # additional arguments. Refer to the `curve_fit` docstring for
+        # acceptable call signatures of `f`.
+        raise ValueError("'args' is not a supported keyword argument.")
+
+    if method == 'lm':
+        # if ydata.size == 1, this might be used for broadcast.
+        if ydata.size != 1 and n > ydata.size:
+            raise TypeError(f"The number of func parameters={n} must not"
+                            f" exceed the number of data points={ydata.size}")
+        res = leastsq(func, p0, Dfun=jac, full_output=1, **kwargs)
+        popt, pcov, infodict, errmsg, ier = res
+        ysize = len(infodict['fvec'])
+        cost = np.sum(infodict['fvec'] ** 2)
+        if ier not in [1, 2, 3, 4]:
+            raise RuntimeError("Optimal parameters not found: " + errmsg)
+    else:
+        # Rename maxfev (leastsq) to max_nfev (least_squares), if specified.
+        if 'max_nfev' not in kwargs:
+            kwargs['max_nfev'] = kwargs.pop('maxfev', None)
+
+        res = least_squares(func, p0, jac=jac, bounds=bounds, method=method,
+                            **kwargs)
+
+        if not res.success:
+            raise RuntimeError("Optimal parameters not found: " + res.message)
+
+        infodict = dict(nfev=res.nfev, fvec=res.fun)
+        ier = res.status
+        errmsg = res.message
+
+        ysize = len(res.fun)
+        cost = 2 * res.cost  # res.cost is half sum of squares!
+        popt = res.x
+
+        # Do Moore-Penrose inverse discarding zero singular values.
+        _, s, VT = svd(res.jac, full_matrices=False)
+        threshold = np.finfo(float).eps * max(res.jac.shape) * s[0]
+        s = s[s > threshold]
+        VT = VT[:s.size]
+        pcov = np.dot(VT.T / s**2, VT)
+
+    warn_cov = False
+    if pcov is None or np.isnan(pcov).any():
+        # indeterminate covariance
+        pcov = zeros((len(popt), len(popt)), dtype=float)
+        pcov.fill(inf)
+        warn_cov = True
+    elif not absolute_sigma:
+        if ysize > p0.size:
+            s_sq = cost / (ysize - p0.size)
+            pcov = pcov * s_sq
+        else:
+            pcov.fill(inf)
+            warn_cov = True
+
+    if warn_cov:
+        warnings.warn('Covariance of the parameters could not be estimated',
+                      category=OptimizeWarning, stacklevel=2)
+
+    if full_output:
+        return popt, pcov, infodict, errmsg, ier
+    else:
+        return popt, pcov
+
+
+def check_gradient(fcn, Dfcn, x0, args=(), col_deriv=0):
+    """Perform a simple check on the gradient for correctness.
+
+    """
+
+    x = atleast_1d(x0)
+    n = len(x)
+    x = x.reshape((n,))
+    fvec = atleast_1d(fcn(x, *args))
+    m = len(fvec)
+    fvec = fvec.reshape((m,))
+    ldfjac = m
+    fjac = atleast_1d(Dfcn(x, *args))
+    fjac = fjac.reshape((m, n))
+    if col_deriv == 0:
+        fjac = transpose(fjac)
+
+    xp = zeros((n,), float)
+    err = zeros((m,), float)
+    fvecp = None
+    _minpack._chkder(m, n, x, fvec, fjac, ldfjac, xp, fvecp, 1, err)
+
+    fvecp = atleast_1d(fcn(xp, *args))
+    fvecp = fvecp.reshape((m,))
+    _minpack._chkder(m, n, x, fvec, fjac, ldfjac, xp, fvecp, 2, err)
+
+    good = (prod(greater(err, 0.5), axis=0))
+
+    return (good, err)
+
+
+def _del2(p0, p1, d):
+    return p0 - np.square(p1 - p0) / d
+
+
+def _relerr(actual, desired):
+    return (actual - desired) / desired
+
+
+def _fixed_point_helper(func, x0, args, xtol, maxiter, use_accel):
+    p0 = x0
+    for i in range(maxiter):
+        p1 = func(p0, *args)
+        if use_accel:
+            p2 = func(p1, *args)
+            d = p2 - 2.0 * p1 + p0
+            p = _lazywhere(d != 0, (p0, p1, d), f=_del2, fillvalue=p2)
+        else:
+            p = p1
+        relerr = _lazywhere(p0 != 0, (p, p0), f=_relerr, fillvalue=p)
+        if np.all(np.abs(relerr) < xtol):
+            return p
+        p0 = p
+    msg = "Failed to converge after %d iterations, value is %s" % (maxiter, p)
+    raise RuntimeError(msg)
+
+
+def fixed_point(func, x0, args=(), xtol=1e-8, maxiter=500, method='del2'):
+    """
+    Find a fixed point of the function.
+
+    Given a function of one or more variables and a starting point, find a
+    fixed point of the function: i.e., where ``func(x0) == x0``.
+
+    Parameters
+    ----------
+    func : function
+        Function to evaluate.
+    x0 : array_like
+        Fixed point of function.
+    args : tuple, optional
+        Extra arguments to `func`.
+    xtol : float, optional
+        Convergence tolerance, defaults to 1e-08.
+    maxiter : int, optional
+        Maximum number of iterations, defaults to 500.
+    method : {"del2", "iteration"}, optional
+        Method of finding the fixed-point, defaults to "del2",
+        which uses Steffensen's Method with Aitken's ``Del^2``
+        convergence acceleration [1]_. The "iteration" method simply iterates
+        the function until convergence is detected, without attempting to
+        accelerate the convergence.
+
+    References
+    ----------
+    .. [1] Burden, Faires, "Numerical Analysis", 5th edition, pg. 80
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import optimize
+    >>> def func(x, c1, c2):
+    ...    return np.sqrt(c1/(x+c2))
+    >>> c1 = np.array([10,12.])
+    >>> c2 = np.array([3, 5.])
+    >>> optimize.fixed_point(func, [1.2, 1.3], args=(c1,c2))
+    array([ 1.4920333 ,  1.37228132])
+
+    """
+    use_accel = {'del2': True, 'iteration': False}[method]
+    x0 = _asarray_validated(x0, as_inexact=True)
+    return _fixed_point_helper(func, x0, args, xtol, maxiter, use_accel)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nnls.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nnls.py
new file mode 100644
index 0000000000000000000000000000000000000000..be904c90d715583faaf7751ce62b9c992e07e208
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nnls.py
@@ -0,0 +1,97 @@
+import numpy as np
+from ._cython_nnls import _nnls
+
+
+__all__ = ['nnls']
+
+
+def nnls(A, b, maxiter=None, *, atol=None):
+    """
+    Solve ``argmin_x || Ax - b ||_2`` for ``x>=0``.
+
+    This problem, often called as NonNegative Least Squares, is a convex
+    optimization problem with convex constraints. It typically arises when
+    the ``x`` models quantities for which only nonnegative values are
+    attainable; weight of ingredients, component costs and so on.
+
+    Parameters
+    ----------
+    A : (m, n) ndarray
+        Coefficient array
+    b : (m,) ndarray, float
+        Right-hand side vector.
+    maxiter: int, optional
+        Maximum number of iterations, optional. Default value is ``3 * n``.
+    atol: float
+        Tolerance value used in the algorithm to assess closeness to zero in
+        the projected residual ``(A.T @ (A x - b)`` entries. Increasing this
+        value relaxes the solution constraints. A typical relaxation value can
+        be selected as ``max(m, n) * np.linalg.norm(a, 1) * np.spacing(1.)``.
+        This value is not set as default since the norm operation becomes
+        expensive for large problems hence can be used only when necessary.
+
+    Returns
+    -------
+    x : ndarray
+        Solution vector.
+    rnorm : float
+        The 2-norm of the residual, ``|| Ax-b ||_2``.
+
+    See Also
+    --------
+    lsq_linear : Linear least squares with bounds on the variables
+
+    Notes
+    -----
+    The code is based on [2]_ which is an improved version of the classical
+    algorithm of [1]_. It utilizes an active set method and solves the KKT
+    (Karush-Kuhn-Tucker) conditions for the non-negative least squares problem.
+
+    References
+    ----------
+    .. [1] : Lawson C., Hanson R.J., "Solving Least Squares Problems", SIAM,
+       1995, :doi:`10.1137/1.9781611971217`
+    .. [2] : Bro, Rasmus and de Jong, Sijmen, "A Fast Non-Negativity-
+       Constrained Least Squares Algorithm", Journal Of Chemometrics, 1997,
+       :doi:`10.1002/(SICI)1099-128X(199709/10)11:5<393::AID-CEM483>3.0.CO;2-L`
+
+     Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import nnls
+    ...
+    >>> A = np.array([[1, 0], [1, 0], [0, 1]])
+    >>> b = np.array([2, 1, 1])
+    >>> nnls(A, b)
+    (array([1.5, 1. ]), 0.7071067811865475)
+
+    >>> b = np.array([-1, -1, -1])
+    >>> nnls(A, b)
+    (array([0., 0.]), 1.7320508075688772)
+
+    """
+
+    A = np.asarray_chkfinite(A, dtype=np.float64, order='C')
+    b = np.asarray_chkfinite(b, dtype=np.float64)
+
+    if len(A.shape) != 2:
+        raise ValueError("Expected a two-dimensional array (matrix)" +
+                         f", but the shape of A is {A.shape}")
+    if len(b.shape) != 1:
+        raise ValueError("Expected a one-dimensional array (vector)" +
+                         f", but the shape of b is {b.shape}")
+
+    m, n = A.shape
+
+    if m != b.shape[0]:
+        raise ValueError(
+                "Incompatible dimensions. The first dimension of " +
+                f"A is {m}, while the shape of b is {(b.shape[0], )}")
+
+    if not maxiter:
+        maxiter = 3*n
+    x, rnorm, info = _nnls(A, b, maxiter)
+    if info == -1:
+        raise RuntimeError("Maximum number of iterations reached.")
+
+    return x, rnorm
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nonlin.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nonlin.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6e07683500bb01c195b1cdfa8a13157353b5370
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_nonlin.py
@@ -0,0 +1,1603 @@
+# Copyright (C) 2009, Pauli Virtanen 
+# Distributed under the same license as SciPy.
+
+import inspect
+import sys
+import warnings
+
+import numpy as np
+from numpy import asarray, dot, vdot
+
+from scipy.linalg import norm, solve, inv, qr, svd, LinAlgError
+import scipy.sparse.linalg
+import scipy.sparse
+from scipy.linalg import get_blas_funcs
+from scipy._lib._util import copy_if_needed
+from scipy._lib._util import getfullargspec_no_self as _getfullargspec
+from ._linesearch import scalar_search_wolfe1, scalar_search_armijo
+
+
+__all__ = [
+    'broyden1', 'broyden2', 'anderson', 'linearmixing',
+    'diagbroyden', 'excitingmixing', 'newton_krylov',
+    'BroydenFirst', 'KrylovJacobian', 'InverseJacobian', 'NoConvergence']
+
+#------------------------------------------------------------------------------
+# Utility functions
+#------------------------------------------------------------------------------
+
+
+class NoConvergence(Exception):
+    """Exception raised when nonlinear solver fails to converge within the specified
+    `maxiter`."""
+    pass
+
+
+def maxnorm(x):
+    return np.absolute(x).max()
+
+
+def _as_inexact(x):
+    """Return `x` as an array, of either floats or complex floats"""
+    x = asarray(x)
+    if not np.issubdtype(x.dtype, np.inexact):
+        return asarray(x, dtype=np.float64)
+    return x
+
+
+def _array_like(x, x0):
+    """Return ndarray `x` as same array subclass and shape as `x0`"""
+    x = np.reshape(x, np.shape(x0))
+    wrap = getattr(x0, '__array_wrap__', x.__array_wrap__)
+    return wrap(x)
+
+
+def _safe_norm(v):
+    if not np.isfinite(v).all():
+        return np.array(np.inf)
+    return norm(v)
+
+#------------------------------------------------------------------------------
+# Generic nonlinear solver machinery
+#------------------------------------------------------------------------------
+
+
+_doc_parts = dict(
+    params_basic="""
+    F : function(x) -> f
+        Function whose root to find; should take and return an array-like
+        object.
+    xin : array_like
+        Initial guess for the solution
+    """.strip(),
+    params_extra="""
+    iter : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    verbose : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make. If more are needed to
+        meet convergence, `NoConvergence` is raised.
+    f_tol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    f_rtol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    x_tol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    x_rtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in the
+        direction given by the Jacobian approximation. Defaults to 'armijo'.
+    callback : function, optional
+        Optional callback function. It is called on every iteration as
+        ``callback(x, f)`` where `x` is the current solution and `f`
+        the corresponding residual.
+
+    Returns
+    -------
+    sol : ndarray
+        An array (of similar array type as `x0`) containing the final solution.
+
+    Raises
+    ------
+    NoConvergence
+        When a solution was not found.
+
+    """.strip()
+)
+
+
+def _set_doc(obj):
+    if obj.__doc__:
+        obj.__doc__ = obj.__doc__ % _doc_parts
+
+
+def nonlin_solve(F, x0, jacobian='krylov', iter=None, verbose=False,
+                 maxiter=None, f_tol=None, f_rtol=None, x_tol=None, x_rtol=None,
+                 tol_norm=None, line_search='armijo', callback=None,
+                 full_output=False, raise_exception=True):
+    """
+    Find a root of a function, in a way suitable for large-scale problems.
+
+    Parameters
+    ----------
+    %(params_basic)s
+    jacobian : Jacobian
+        A Jacobian approximation: `Jacobian` object or something that
+        `asjacobian` can transform to one. Alternatively, a string specifying
+        which of the builtin Jacobian approximations to use:
+
+            krylov, broyden1, broyden2, anderson
+            diagbroyden, linearmixing, excitingmixing
+
+    %(params_extra)s
+    full_output : bool
+        If true, returns a dictionary `info` containing convergence
+        information.
+    raise_exception : bool
+        If True, a `NoConvergence` exception is raise if no solution is found.
+
+    See Also
+    --------
+    asjacobian, Jacobian
+
+    Notes
+    -----
+    This algorithm implements the inexact Newton method, with
+    backtracking or full line searches. Several Jacobian
+    approximations are available, including Krylov and Quasi-Newton
+    methods.
+
+    References
+    ----------
+    .. [KIM] C. T. Kelley, \"Iterative Methods for Linear and Nonlinear
+       Equations\". Society for Industrial and Applied Mathematics. (1995)
+       https://archive.siam.org/books/kelley/fr16/
+
+    """
+    # Can't use default parameters because it's being explicitly passed as None
+    # from the calling function, so we need to set it here.
+    tol_norm = maxnorm if tol_norm is None else tol_norm
+    condition = TerminationCondition(f_tol=f_tol, f_rtol=f_rtol,
+                                     x_tol=x_tol, x_rtol=x_rtol,
+                                     iter=iter, norm=tol_norm)
+
+    x0 = _as_inexact(x0)
+    def func(z):
+        return _as_inexact(F(_array_like(z, x0))).flatten()
+    x = x0.flatten()
+
+    dx = np.full_like(x, np.inf)
+    Fx = func(x)
+    Fx_norm = norm(Fx)
+
+    jacobian = asjacobian(jacobian)
+    jacobian.setup(x.copy(), Fx, func)
+
+    if maxiter is None:
+        if iter is not None:
+            maxiter = iter + 1
+        else:
+            maxiter = 100*(x.size+1)
+
+    if line_search is True:
+        line_search = 'armijo'
+    elif line_search is False:
+        line_search = None
+
+    if line_search not in (None, 'armijo', 'wolfe'):
+        raise ValueError("Invalid line search")
+
+    # Solver tolerance selection
+    gamma = 0.9
+    eta_max = 0.9999
+    eta_treshold = 0.1
+    eta = 1e-3
+
+    for n in range(maxiter):
+        status = condition.check(Fx, x, dx)
+        if status:
+            break
+
+        # The tolerance, as computed for scipy.sparse.linalg.* routines
+        tol = min(eta, eta*Fx_norm)
+        dx = -jacobian.solve(Fx, tol=tol)
+
+        if norm(dx) == 0:
+            raise ValueError("Jacobian inversion yielded zero vector. "
+                             "This indicates a bug in the Jacobian "
+                             "approximation.")
+
+        # Line search, or Newton step
+        if line_search:
+            s, x, Fx, Fx_norm_new = _nonlin_line_search(func, x, Fx, dx,
+                                                        line_search)
+        else:
+            s = 1.0
+            x = x + dx
+            Fx = func(x)
+            Fx_norm_new = norm(Fx)
+
+        jacobian.update(x.copy(), Fx)
+
+        if callback:
+            callback(x, Fx)
+
+        # Adjust forcing parameters for inexact methods
+        eta_A = gamma * Fx_norm_new**2 / Fx_norm**2
+        if gamma * eta**2 < eta_treshold:
+            eta = min(eta_max, eta_A)
+        else:
+            eta = min(eta_max, max(eta_A, gamma*eta**2))
+
+        Fx_norm = Fx_norm_new
+
+        # Print status
+        if verbose:
+            sys.stdout.write("%d:  |F(x)| = %g; step %g\n" % (
+                n, tol_norm(Fx), s))
+            sys.stdout.flush()
+    else:
+        if raise_exception:
+            raise NoConvergence(_array_like(x, x0))
+        else:
+            status = 2
+
+    if full_output:
+        info = {'nit': condition.iteration,
+                'fun': Fx,
+                'status': status,
+                'success': status == 1,
+                'message': {1: 'A solution was found at the specified '
+                               'tolerance.',
+                            2: 'The maximum number of iterations allowed '
+                               'has been reached.'
+                            }[status]
+                }
+        return _array_like(x, x0), info
+    else:
+        return _array_like(x, x0)
+
+
+_set_doc(nonlin_solve)
+
+
+def _nonlin_line_search(func, x, Fx, dx, search_type='armijo', rdiff=1e-8,
+                        smin=1e-2):
+    tmp_s = [0]
+    tmp_Fx = [Fx]
+    tmp_phi = [norm(Fx)**2]
+    s_norm = norm(x) / norm(dx)
+
+    def phi(s, store=True):
+        if s == tmp_s[0]:
+            return tmp_phi[0]
+        xt = x + s*dx
+        v = func(xt)
+        p = _safe_norm(v)**2
+        if store:
+            tmp_s[0] = s
+            tmp_phi[0] = p
+            tmp_Fx[0] = v
+        return p
+
+    def derphi(s):
+        ds = (abs(s) + s_norm + 1) * rdiff
+        return (phi(s+ds, store=False) - phi(s)) / ds
+
+    if search_type == 'wolfe':
+        s, phi1, phi0 = scalar_search_wolfe1(phi, derphi, tmp_phi[0],
+                                             xtol=1e-2, amin=smin)
+    elif search_type == 'armijo':
+        s, phi1 = scalar_search_armijo(phi, tmp_phi[0], -tmp_phi[0],
+                                       amin=smin)
+
+    if s is None:
+        # XXX: No suitable step length found. Take the full Newton step,
+        #      and hope for the best.
+        s = 1.0
+
+    x = x + s*dx
+    if s == tmp_s[0]:
+        Fx = tmp_Fx[0]
+    else:
+        Fx = func(x)
+    Fx_norm = norm(Fx)
+
+    return s, x, Fx, Fx_norm
+
+
+class TerminationCondition:
+    """
+    Termination condition for an iteration. It is terminated if
+
+    - |F| < f_rtol*|F_0|, AND
+    - |F| < f_tol
+
+    AND
+
+    - |dx| < x_rtol*|x|, AND
+    - |dx| < x_tol
+
+    """
+    def __init__(self, f_tol=None, f_rtol=None, x_tol=None, x_rtol=None,
+                 iter=None, norm=maxnorm):
+
+        if f_tol is None:
+            f_tol = np.finfo(np.float64).eps ** (1./3)
+        if f_rtol is None:
+            f_rtol = np.inf
+        if x_tol is None:
+            x_tol = np.inf
+        if x_rtol is None:
+            x_rtol = np.inf
+
+        self.x_tol = x_tol
+        self.x_rtol = x_rtol
+        self.f_tol = f_tol
+        self.f_rtol = f_rtol
+
+        self.norm = norm
+
+        self.iter = iter
+
+        self.f0_norm = None
+        self.iteration = 0
+
+    def check(self, f, x, dx):
+        self.iteration += 1
+        f_norm = self.norm(f)
+        x_norm = self.norm(x)
+        dx_norm = self.norm(dx)
+
+        if self.f0_norm is None:
+            self.f0_norm = f_norm
+
+        if f_norm == 0:
+            return 1
+
+        if self.iter is not None:
+            # backwards compatibility with SciPy 0.6.0
+            return 2 * (self.iteration > self.iter)
+
+        # NB: condition must succeed for rtol=inf even if norm == 0
+        return int((f_norm <= self.f_tol
+                    and f_norm/self.f_rtol <= self.f0_norm)
+                   and (dx_norm <= self.x_tol
+                        and dx_norm/self.x_rtol <= x_norm))
+
+
+#------------------------------------------------------------------------------
+# Generic Jacobian approximation
+#------------------------------------------------------------------------------
+
+class Jacobian:
+    """
+    Common interface for Jacobians or Jacobian approximations.
+
+    The optional methods come useful when implementing trust region
+    etc., algorithms that often require evaluating transposes of the
+    Jacobian.
+
+    Methods
+    -------
+    solve
+        Returns J^-1 * v
+    update
+        Updates Jacobian to point `x` (where the function has residual `Fx`)
+
+    matvec : optional
+        Returns J * v
+    rmatvec : optional
+        Returns A^H * v
+    rsolve : optional
+        Returns A^-H * v
+    matmat : optional
+        Returns A * V, where V is a dense matrix with dimensions (N,K).
+    todense : optional
+        Form the dense Jacobian matrix. Necessary for dense trust region
+        algorithms, and useful for testing.
+
+    Attributes
+    ----------
+    shape
+        Matrix dimensions (M, N)
+    dtype
+        Data type of the matrix.
+    func : callable, optional
+        Function the Jacobian corresponds to
+
+    """
+
+    def __init__(self, **kw):
+        names = ["solve", "update", "matvec", "rmatvec", "rsolve",
+                 "matmat", "todense", "shape", "dtype"]
+        for name, value in kw.items():
+            if name not in names:
+                raise ValueError(f"Unknown keyword argument {name}")
+            if value is not None:
+                setattr(self, name, kw[name])
+
+
+        if hasattr(self, "todense"):
+            def __array__(self, dtype=None, copy=None):
+                if dtype is not None:
+                    raise ValueError(f"`dtype` must be None, was {dtype}")
+                return self.todense()
+
+    def aspreconditioner(self):
+        return InverseJacobian(self)
+
+    def solve(self, v, tol=0):
+        raise NotImplementedError
+
+    def update(self, x, F):
+        pass
+
+    def setup(self, x, F, func):
+        self.func = func
+        self.shape = (F.size, x.size)
+        self.dtype = F.dtype
+        if self.__class__.setup is Jacobian.setup:
+            # Call on the first point unless overridden
+            self.update(x, F)
+
+
+class InverseJacobian:
+    """
+    A simple wrapper that inverts the Jacobian using the `solve` method.
+
+    .. legacy:: class
+
+        See the newer, more consistent interfaces in :mod:`scipy.optimize`.
+
+    Parameters
+    ----------
+    jacobian : Jacobian
+        The Jacobian to invert.
+    
+    Attributes
+    ----------
+    shape
+        Matrix dimensions (M, N)
+    dtype
+        Data type of the matrix.
+
+    """
+    def __init__(self, jacobian):
+        self.jacobian = jacobian
+        self.matvec = jacobian.solve
+        self.update = jacobian.update
+        if hasattr(jacobian, 'setup'):
+            self.setup = jacobian.setup
+        if hasattr(jacobian, 'rsolve'):
+            self.rmatvec = jacobian.rsolve
+
+    @property
+    def shape(self):
+        return self.jacobian.shape
+
+    @property
+    def dtype(self):
+        return self.jacobian.dtype
+
+
+def asjacobian(J):
+    """
+    Convert given object to one suitable for use as a Jacobian.
+    """
+    spsolve = scipy.sparse.linalg.spsolve
+    if isinstance(J, Jacobian):
+        return J
+    elif inspect.isclass(J) and issubclass(J, Jacobian):
+        return J()
+    elif isinstance(J, np.ndarray):
+        if J.ndim > 2:
+            raise ValueError('array must have rank <= 2')
+        J = np.atleast_2d(np.asarray(J))
+        if J.shape[0] != J.shape[1]:
+            raise ValueError('array must be square')
+
+        return Jacobian(matvec=lambda v: dot(J, v),
+                        rmatvec=lambda v: dot(J.conj().T, v),
+                        solve=lambda v, tol=0: solve(J, v),
+                        rsolve=lambda v, tol=0: solve(J.conj().T, v),
+                        dtype=J.dtype, shape=J.shape)
+    elif scipy.sparse.issparse(J):
+        if J.shape[0] != J.shape[1]:
+            raise ValueError('matrix must be square')
+        return Jacobian(matvec=lambda v: J @ v,
+                        rmatvec=lambda v: J.conj().T @ v,
+                        solve=lambda v, tol=0: spsolve(J, v),
+                        rsolve=lambda v, tol=0: spsolve(J.conj().T, v),
+                        dtype=J.dtype, shape=J.shape)
+    elif hasattr(J, 'shape') and hasattr(J, 'dtype') and hasattr(J, 'solve'):
+        return Jacobian(matvec=getattr(J, 'matvec'),
+                        rmatvec=getattr(J, 'rmatvec'),
+                        solve=J.solve,
+                        rsolve=getattr(J, 'rsolve'),
+                        update=getattr(J, 'update'),
+                        setup=getattr(J, 'setup'),
+                        dtype=J.dtype,
+                        shape=J.shape)
+    elif callable(J):
+        # Assume it's a function J(x) that returns the Jacobian
+        class Jac(Jacobian):
+            def update(self, x, F):
+                self.x = x
+
+            def solve(self, v, tol=0):
+                m = J(self.x)
+                if isinstance(m, np.ndarray):
+                    return solve(m, v)
+                elif scipy.sparse.issparse(m):
+                    return spsolve(m, v)
+                else:
+                    raise ValueError("Unknown matrix type")
+
+            def matvec(self, v):
+                m = J(self.x)
+                if isinstance(m, np.ndarray):
+                    return dot(m, v)
+                elif scipy.sparse.issparse(m):
+                    return m @ v
+                else:
+                    raise ValueError("Unknown matrix type")
+
+            def rsolve(self, v, tol=0):
+                m = J(self.x)
+                if isinstance(m, np.ndarray):
+                    return solve(m.conj().T, v)
+                elif scipy.sparse.issparse(m):
+                    return spsolve(m.conj().T, v)
+                else:
+                    raise ValueError("Unknown matrix type")
+
+            def rmatvec(self, v):
+                m = J(self.x)
+                if isinstance(m, np.ndarray):
+                    return dot(m.conj().T, v)
+                elif scipy.sparse.issparse(m):
+                    return m.conj().T @ v
+                else:
+                    raise ValueError("Unknown matrix type")
+        return Jac()
+    elif isinstance(J, str):
+        return dict(broyden1=BroydenFirst,
+                    broyden2=BroydenSecond,
+                    anderson=Anderson,
+                    diagbroyden=DiagBroyden,
+                    linearmixing=LinearMixing,
+                    excitingmixing=ExcitingMixing,
+                    krylov=KrylovJacobian)[J]()
+    else:
+        raise TypeError('Cannot convert object to a Jacobian')
+
+
+#------------------------------------------------------------------------------
+# Broyden
+#------------------------------------------------------------------------------
+
+class GenericBroyden(Jacobian):
+    def setup(self, x0, f0, func):
+        Jacobian.setup(self, x0, f0, func)
+        self.last_f = f0
+        self.last_x = x0
+
+        if hasattr(self, 'alpha') and self.alpha is None:
+            # Autoscale the initial Jacobian parameter
+            # unless we have already guessed the solution.
+            normf0 = norm(f0)
+            if normf0:
+                self.alpha = 0.5*max(norm(x0), 1) / normf0
+            else:
+                self.alpha = 1.0
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        raise NotImplementedError
+
+    def update(self, x, f):
+        df = f - self.last_f
+        dx = x - self.last_x
+        self._update(x, f, dx, df, norm(dx), norm(df))
+        self.last_f = f
+        self.last_x = x
+
+
+class LowRankMatrix:
+    r"""
+    A matrix represented as
+
+    .. math:: \alpha I + \sum_{n=0}^{n=M} c_n d_n^\dagger
+
+    However, if the rank of the matrix reaches the dimension of the vectors,
+    full matrix representation will be used thereon.
+
+    """
+
+    def __init__(self, alpha, n, dtype):
+        self.alpha = alpha
+        self.cs = []
+        self.ds = []
+        self.n = n
+        self.dtype = dtype
+        self.collapsed = None
+
+    @staticmethod
+    def _matvec(v, alpha, cs, ds):
+        axpy, scal, dotc = get_blas_funcs(['axpy', 'scal', 'dotc'],
+                                          cs[:1] + [v])
+        w = alpha * v
+        for c, d in zip(cs, ds):
+            a = dotc(d, v)
+            w = axpy(c, w, w.size, a)
+        return w
+
+    @staticmethod
+    def _solve(v, alpha, cs, ds):
+        """Evaluate w = M^-1 v"""
+        if len(cs) == 0:
+            return v/alpha
+
+        # (B + C D^H)^-1 = B^-1 - B^-1 C (I + D^H B^-1 C)^-1 D^H B^-1
+
+        axpy, dotc = get_blas_funcs(['axpy', 'dotc'], cs[:1] + [v])
+
+        c0 = cs[0]
+        A = alpha * np.identity(len(cs), dtype=c0.dtype)
+        for i, d in enumerate(ds):
+            for j, c in enumerate(cs):
+                A[i,j] += dotc(d, c)
+
+        q = np.zeros(len(cs), dtype=c0.dtype)
+        for j, d in enumerate(ds):
+            q[j] = dotc(d, v)
+        q /= alpha
+        q = solve(A, q)
+
+        w = v/alpha
+        for c, qc in zip(cs, q):
+            w = axpy(c, w, w.size, -qc)
+
+        return w
+
+    def matvec(self, v):
+        """Evaluate w = M v"""
+        if self.collapsed is not None:
+            return np.dot(self.collapsed, v)
+        return LowRankMatrix._matvec(v, self.alpha, self.cs, self.ds)
+
+    def rmatvec(self, v):
+        """Evaluate w = M^H v"""
+        if self.collapsed is not None:
+            return np.dot(self.collapsed.T.conj(), v)
+        return LowRankMatrix._matvec(v, np.conj(self.alpha), self.ds, self.cs)
+
+    def solve(self, v, tol=0):
+        """Evaluate w = M^-1 v"""
+        if self.collapsed is not None:
+            return solve(self.collapsed, v)
+        return LowRankMatrix._solve(v, self.alpha, self.cs, self.ds)
+
+    def rsolve(self, v, tol=0):
+        """Evaluate w = M^-H v"""
+        if self.collapsed is not None:
+            return solve(self.collapsed.T.conj(), v)
+        return LowRankMatrix._solve(v, np.conj(self.alpha), self.ds, self.cs)
+
+    def append(self, c, d):
+        if self.collapsed is not None:
+            self.collapsed += c[:,None] * d[None,:].conj()
+            return
+
+        self.cs.append(c)
+        self.ds.append(d)
+
+        if len(self.cs) > c.size:
+            self.collapse()
+
+    def __array__(self, dtype=None, copy=None):
+        if dtype is not None:
+            warnings.warn("LowRankMatrix is scipy-internal code, `dtype` "
+                          f"should only be None but was {dtype} (not handled)",
+                          stacklevel=3)
+        if copy is not None:
+            warnings.warn("LowRankMatrix is scipy-internal code, `copy` "
+                          f"should only be None but was {copy} (not handled)",
+                          stacklevel=3)
+        if self.collapsed is not None:
+            return self.collapsed
+
+        Gm = self.alpha*np.identity(self.n, dtype=self.dtype)
+        for c, d in zip(self.cs, self.ds):
+            Gm += c[:,None]*d[None,:].conj()
+        return Gm
+
+    def collapse(self):
+        """Collapse the low-rank matrix to a full-rank one."""
+        self.collapsed = np.array(self, copy=copy_if_needed)
+        self.cs = None
+        self.ds = None
+        self.alpha = None
+
+    def restart_reduce(self, rank):
+        """
+        Reduce the rank of the matrix by dropping all vectors.
+        """
+        if self.collapsed is not None:
+            return
+        assert rank > 0
+        if len(self.cs) > rank:
+            del self.cs[:]
+            del self.ds[:]
+
+    def simple_reduce(self, rank):
+        """
+        Reduce the rank of the matrix by dropping oldest vectors.
+        """
+        if self.collapsed is not None:
+            return
+        assert rank > 0
+        while len(self.cs) > rank:
+            del self.cs[0]
+            del self.ds[0]
+
+    def svd_reduce(self, max_rank, to_retain=None):
+        """
+        Reduce the rank of the matrix by retaining some SVD components.
+
+        This corresponds to the \"Broyden Rank Reduction Inverse\"
+        algorithm described in [1]_.
+
+        Note that the SVD decomposition can be done by solving only a
+        problem whose size is the effective rank of this matrix, which
+        is viable even for large problems.
+
+        Parameters
+        ----------
+        max_rank : int
+            Maximum rank of this matrix after reduction.
+        to_retain : int, optional
+            Number of SVD components to retain when reduction is done
+            (ie. rank > max_rank). Default is ``max_rank - 2``.
+
+        References
+        ----------
+        .. [1] B.A. van der Rotten, PhD thesis,
+           \"A limited memory Broyden method to solve high-dimensional
+           systems of nonlinear equations\". Mathematisch Instituut,
+           Universiteit Leiden, The Netherlands (2003).
+
+           https://web.archive.org/web/20161022015821/http://www.math.leidenuniv.nl/scripties/Rotten.pdf
+
+        """
+        if self.collapsed is not None:
+            return
+
+        p = max_rank
+        if to_retain is not None:
+            q = to_retain
+        else:
+            q = p - 2
+
+        if self.cs:
+            p = min(p, len(self.cs[0]))
+        q = max(0, min(q, p-1))
+
+        m = len(self.cs)
+        if m < p:
+            # nothing to do
+            return
+
+        C = np.array(self.cs).T
+        D = np.array(self.ds).T
+
+        D, R = qr(D, mode='economic')
+        C = dot(C, R.T.conj())
+
+        U, S, WH = svd(C, full_matrices=False)
+
+        C = dot(C, inv(WH))
+        D = dot(D, WH.T.conj())
+
+        for k in range(q):
+            self.cs[k] = C[:,k].copy()
+            self.ds[k] = D[:,k].copy()
+
+        del self.cs[q:]
+        del self.ds[q:]
+
+
+_doc_parts['broyden_params'] = """
+    alpha : float, optional
+        Initial guess for the Jacobian is ``(-1/alpha)``.
+    reduction_method : str or tuple, optional
+        Method used in ensuring that the rank of the Broyden matrix
+        stays low. Can either be a string giving the name of the method,
+        or a tuple of the form ``(method, param1, param2, ...)``
+        that gives the name of the method and values for additional parameters.
+
+        Methods available:
+
+        - ``restart``: drop all matrix columns. Has no extra parameters.
+        - ``simple``: drop oldest matrix column. Has no extra parameters.
+        - ``svd``: keep only the most significant SVD components.
+          Takes an extra parameter, ``to_retain``, which determines the
+          number of SVD components to retain when rank reduction is done.
+          Default is ``max_rank - 2``.
+
+    max_rank : int, optional
+        Maximum rank for the Broyden matrix.
+        Default is infinity (i.e., no rank reduction).
+    """.strip()
+
+
+class BroydenFirst(GenericBroyden):
+    """
+    Find a root of a function, using Broyden's first Jacobian approximation.
+
+    This method is also known as "Broyden's good method".
+
+    Parameters
+    ----------
+    %(params_basic)s
+    %(broyden_params)s
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='broyden1'`` in particular.
+
+    Notes
+    -----
+    This algorithm implements the inverse Jacobian Quasi-Newton update
+
+    .. math:: H_+ = H + (dx - H df) dx^\\dagger H / ( dx^\\dagger H df)
+
+    which corresponds to Broyden's first Jacobian update
+
+    .. math:: J_+ = J + (df - J dx) dx^\\dagger / dx^\\dagger dx
+
+
+    References
+    ----------
+    .. [1] B.A. van der Rotten, PhD thesis,
+       "A limited memory Broyden method to solve high-dimensional
+       systems of nonlinear equations". Mathematisch Instituut,
+       Universiteit Leiden, The Netherlands (2003).
+       https://math.leidenuniv.nl/scripties/Rotten.pdf
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations
+
+    >>> def fun(x):
+    ...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
+    ...             0.5 * (x[1] - x[0])**3 + x[1]]
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.broyden1(fun, [0, 0])
+    >>> sol
+    array([0.84116396, 0.15883641])
+
+    """
+
+    def __init__(self, alpha=None, reduction_method='restart', max_rank=None):
+        GenericBroyden.__init__(self)
+        self.alpha = alpha
+        self.Gm = None
+
+        if max_rank is None:
+            max_rank = np.inf
+        self.max_rank = max_rank
+
+        if isinstance(reduction_method, str):
+            reduce_params = ()
+        else:
+            reduce_params = reduction_method[1:]
+            reduction_method = reduction_method[0]
+        reduce_params = (max_rank - 1,) + reduce_params
+
+        if reduction_method == 'svd':
+            self._reduce = lambda: self.Gm.svd_reduce(*reduce_params)
+        elif reduction_method == 'simple':
+            self._reduce = lambda: self.Gm.simple_reduce(*reduce_params)
+        elif reduction_method == 'restart':
+            self._reduce = lambda: self.Gm.restart_reduce(*reduce_params)
+        else:
+            raise ValueError(f"Unknown rank reduction method '{reduction_method}'")
+
+    def setup(self, x, F, func):
+        GenericBroyden.setup(self, x, F, func)
+        self.Gm = LowRankMatrix(-self.alpha, self.shape[0], self.dtype)
+
+    def todense(self):
+        return inv(self.Gm)
+
+    def solve(self, f, tol=0):
+        r = self.Gm.matvec(f)
+        if not np.isfinite(r).all():
+            # singular; reset the Jacobian approximation
+            self.setup(self.last_x, self.last_f, self.func)
+            return self.Gm.matvec(f)
+        return r
+
+    def matvec(self, f):
+        return self.Gm.solve(f)
+
+    def rsolve(self, f, tol=0):
+        return self.Gm.rmatvec(f)
+
+    def rmatvec(self, f):
+        return self.Gm.rsolve(f)
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        self._reduce()  # reduce first to preserve secant condition
+
+        v = self.Gm.rmatvec(dx)
+        c = dx - self.Gm.matvec(df)
+        d = v / vdot(df, v)
+
+        self.Gm.append(c, d)
+
+
+class BroydenSecond(BroydenFirst):
+    """
+    Find a root of a function, using Broyden\'s second Jacobian approximation.
+
+    This method is also known as \"Broyden's bad method\".
+
+    Parameters
+    ----------
+    %(params_basic)s
+    %(broyden_params)s
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='broyden2'`` in particular.
+
+    Notes
+    -----
+    This algorithm implements the inverse Jacobian Quasi-Newton update
+
+    .. math:: H_+ = H + (dx - H df) df^\\dagger / ( df^\\dagger df)
+
+    corresponding to Broyden's second method.
+
+    References
+    ----------
+    .. [1] B.A. van der Rotten, PhD thesis,
+       \"A limited memory Broyden method to solve high-dimensional
+       systems of nonlinear equations\". Mathematisch Instituut,
+       Universiteit Leiden, The Netherlands (2003).
+
+       https://web.archive.org/web/20161022015821/http://www.math.leidenuniv.nl/scripties/Rotten.pdf
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations
+
+    >>> def fun(x):
+    ...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
+    ...             0.5 * (x[1] - x[0])**3 + x[1]]
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.broyden2(fun, [0, 0])
+    >>> sol
+    array([0.84116365, 0.15883529])
+
+    """
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        self._reduce()  # reduce first to preserve secant condition
+
+        v = df
+        c = dx - self.Gm.matvec(df)
+        d = v / df_norm**2
+        self.Gm.append(c, d)
+
+
+#------------------------------------------------------------------------------
+# Broyden-like (restricted memory)
+#------------------------------------------------------------------------------
+
+class Anderson(GenericBroyden):
+    """
+    Find a root of a function, using (extended) Anderson mixing.
+
+    The Jacobian is formed by for a 'best' solution in the space
+    spanned by last `M` vectors. As a result, only a MxM matrix
+    inversions and MxN multiplications are required. [Ey]_
+
+    Parameters
+    ----------
+    %(params_basic)s
+    alpha : float, optional
+        Initial guess for the Jacobian is (-1/alpha).
+    M : float, optional
+        Number of previous vectors to retain. Defaults to 5.
+    w0 : float, optional
+        Regularization parameter for numerical stability.
+        Compared to unity, good values of the order of 0.01.
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='anderson'`` in particular.
+
+    References
+    ----------
+    .. [Ey] V. Eyert, J. Comp. Phys., 124, 271 (1996).
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations
+
+    >>> def fun(x):
+    ...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
+    ...             0.5 * (x[1] - x[0])**3 + x[1]]
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.anderson(fun, [0, 0])
+    >>> sol
+    array([0.84116588, 0.15883789])
+
+    """
+
+    # Note:
+    #
+    # Anderson method maintains a rank M approximation of the inverse Jacobian,
+    #
+    #     J^-1 v ~ -v*alpha + (dX + alpha dF) A^-1 dF^H v
+    #     A      = W + dF^H dF
+    #     W      = w0^2 diag(dF^H dF)
+    #
+    # so that for w0 = 0 the secant condition applies for last M iterates, i.e.,
+    #
+    #     J^-1 df_j = dx_j
+    #
+    # for all j = 0 ... M-1.
+    #
+    # Moreover, (from Sherman-Morrison-Woodbury formula)
+    #
+    #    J v ~ [ b I - b^2 C (I + b dF^H A^-1 C)^-1 dF^H ] v
+    #    C   = (dX + alpha dF) A^-1
+    #    b   = -1/alpha
+    #
+    # and after simplification
+    #
+    #    J v ~ -v/alpha + (dX/alpha + dF) (dF^H dX - alpha W)^-1 dF^H v
+    #
+
+    def __init__(self, alpha=None, w0=0.01, M=5):
+        GenericBroyden.__init__(self)
+        self.alpha = alpha
+        self.M = M
+        self.dx = []
+        self.df = []
+        self.gamma = None
+        self.w0 = w0
+
+    def solve(self, f, tol=0):
+        dx = -self.alpha*f
+
+        n = len(self.dx)
+        if n == 0:
+            return dx
+
+        df_f = np.empty(n, dtype=f.dtype)
+        for k in range(n):
+            df_f[k] = vdot(self.df[k], f)
+
+        try:
+            gamma = solve(self.a, df_f)
+        except LinAlgError:
+            # singular; reset the Jacobian approximation
+            del self.dx[:]
+            del self.df[:]
+            return dx
+
+        for m in range(n):
+            dx += gamma[m]*(self.dx[m] + self.alpha*self.df[m])
+        return dx
+
+    def matvec(self, f):
+        dx = -f/self.alpha
+
+        n = len(self.dx)
+        if n == 0:
+            return dx
+
+        df_f = np.empty(n, dtype=f.dtype)
+        for k in range(n):
+            df_f[k] = vdot(self.df[k], f)
+
+        b = np.empty((n, n), dtype=f.dtype)
+        for i in range(n):
+            for j in range(n):
+                b[i,j] = vdot(self.df[i], self.dx[j])
+                if i == j and self.w0 != 0:
+                    b[i,j] -= vdot(self.df[i], self.df[i])*self.w0**2*self.alpha
+        gamma = solve(b, df_f)
+
+        for m in range(n):
+            dx += gamma[m]*(self.df[m] + self.dx[m]/self.alpha)
+        return dx
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        if self.M == 0:
+            return
+
+        self.dx.append(dx)
+        self.df.append(df)
+
+        while len(self.dx) > self.M:
+            self.dx.pop(0)
+            self.df.pop(0)
+
+        n = len(self.dx)
+        a = np.zeros((n, n), dtype=f.dtype)
+
+        for i in range(n):
+            for j in range(i, n):
+                if i == j:
+                    wd = self.w0**2
+                else:
+                    wd = 0
+                a[i,j] = (1+wd)*vdot(self.df[i], self.df[j])
+
+        a += np.triu(a, 1).T.conj()
+        self.a = a
+
+#------------------------------------------------------------------------------
+# Simple iterations
+#------------------------------------------------------------------------------
+
+
+class DiagBroyden(GenericBroyden):
+    """
+    Find a root of a function, using diagonal Broyden Jacobian approximation.
+
+    The Jacobian approximation is derived from previous iterations, by
+    retaining only the diagonal of Broyden matrices.
+
+    .. warning::
+
+       This algorithm may be useful for specific problems, but whether
+       it will work may depend strongly on the problem.
+
+    Parameters
+    ----------
+    %(params_basic)s
+    alpha : float, optional
+        Initial guess for the Jacobian is (-1/alpha).
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='diagbroyden'`` in particular.
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations
+
+    >>> def fun(x):
+    ...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
+    ...             0.5 * (x[1] - x[0])**3 + x[1]]
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.diagbroyden(fun, [0, 0])
+    >>> sol
+    array([0.84116403, 0.15883384])
+
+    """
+
+    def __init__(self, alpha=None):
+        GenericBroyden.__init__(self)
+        self.alpha = alpha
+
+    def setup(self, x, F, func):
+        GenericBroyden.setup(self, x, F, func)
+        self.d = np.full((self.shape[0],), 1 / self.alpha, dtype=self.dtype)
+
+    def solve(self, f, tol=0):
+        return -f / self.d
+
+    def matvec(self, f):
+        return -f * self.d
+
+    def rsolve(self, f, tol=0):
+        return -f / self.d.conj()
+
+    def rmatvec(self, f):
+        return -f * self.d.conj()
+
+    def todense(self):
+        return np.diag(-self.d)
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        self.d -= (df + self.d*dx)*dx/dx_norm**2
+
+
+class LinearMixing(GenericBroyden):
+    """
+    Find a root of a function, using a scalar Jacobian approximation.
+
+    .. warning::
+
+       This algorithm may be useful for specific problems, but whether
+       it will work may depend strongly on the problem.
+
+    Parameters
+    ----------
+    %(params_basic)s
+    alpha : float, optional
+        The Jacobian approximation is (-1/alpha).
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='linearmixing'`` in particular.
+
+    """
+
+    def __init__(self, alpha=None):
+        GenericBroyden.__init__(self)
+        self.alpha = alpha
+
+    def solve(self, f, tol=0):
+        return -f*self.alpha
+
+    def matvec(self, f):
+        return -f/self.alpha
+
+    def rsolve(self, f, tol=0):
+        return -f*np.conj(self.alpha)
+
+    def rmatvec(self, f):
+        return -f/np.conj(self.alpha)
+
+    def todense(self):
+        return np.diag(np.full(self.shape[0], -1/self.alpha))
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        pass
+
+
+class ExcitingMixing(GenericBroyden):
+    """
+    Find a root of a function, using a tuned diagonal Jacobian approximation.
+
+    The Jacobian matrix is diagonal and is tuned on each iteration.
+
+    .. warning::
+
+       This algorithm may be useful for specific problems, but whether
+       it will work may depend strongly on the problem.
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='excitingmixing'`` in particular.
+
+    Parameters
+    ----------
+    %(params_basic)s
+    alpha : float, optional
+        Initial Jacobian approximation is (-1/alpha).
+    alphamax : float, optional
+        The entries of the diagonal Jacobian are kept in the range
+        ``[alpha, alphamax]``.
+    %(params_extra)s
+    """
+
+    def __init__(self, alpha=None, alphamax=1.0):
+        GenericBroyden.__init__(self)
+        self.alpha = alpha
+        self.alphamax = alphamax
+        self.beta = None
+
+    def setup(self, x, F, func):
+        GenericBroyden.setup(self, x, F, func)
+        self.beta = np.full((self.shape[0],), self.alpha, dtype=self.dtype)
+
+    def solve(self, f, tol=0):
+        return -f*self.beta
+
+    def matvec(self, f):
+        return -f/self.beta
+
+    def rsolve(self, f, tol=0):
+        return -f*self.beta.conj()
+
+    def rmatvec(self, f):
+        return -f/self.beta.conj()
+
+    def todense(self):
+        return np.diag(-1/self.beta)
+
+    def _update(self, x, f, dx, df, dx_norm, df_norm):
+        incr = f*self.last_f > 0
+        self.beta[incr] += self.alpha
+        self.beta[~incr] = self.alpha
+        np.clip(self.beta, 0, self.alphamax, out=self.beta)
+
+
+#------------------------------------------------------------------------------
+# Iterative/Krylov approximated Jacobians
+#------------------------------------------------------------------------------
+
+class KrylovJacobian(Jacobian):
+    """
+    Find a root of a function, using Krylov approximation for inverse Jacobian.
+
+    This method is suitable for solving large-scale problems.
+
+    Parameters
+    ----------
+    %(params_basic)s
+    rdiff : float, optional
+        Relative step size to use in numerical differentiation.
+    method : str or callable, optional
+        Krylov method to use to approximate the Jacobian.  Can be a string,
+        or a function implementing the same interface as the iterative
+        solvers in `scipy.sparse.linalg`. If a string, needs to be one of:
+        ``'lgmres'``, ``'gmres'``, ``'bicgstab'``, ``'cgs'``, ``'minres'``,
+        ``'tfqmr'``.
+
+        The default is `scipy.sparse.linalg.lgmres`.
+    inner_maxiter : int, optional
+        Parameter to pass to the "inner" Krylov solver: maximum number of
+        iterations. Iteration will stop after maxiter steps even if the
+        specified tolerance has not been achieved.
+    inner_M : LinearOperator or InverseJacobian
+        Preconditioner for the inner Krylov iteration.
+        Note that you can use also inverse Jacobians as (adaptive)
+        preconditioners. For example,
+
+        >>> from scipy.optimize import BroydenFirst, KrylovJacobian
+        >>> from scipy.optimize import InverseJacobian
+        >>> jac = BroydenFirst()
+        >>> kjac = KrylovJacobian(inner_M=InverseJacobian(jac))
+
+        If the preconditioner has a method named 'update', it will be called
+        as ``update(x, f)`` after each nonlinear step, with ``x`` giving
+        the current point, and ``f`` the current function value.
+    outer_k : int, optional
+        Size of the subspace kept across LGMRES nonlinear iterations.
+        See `scipy.sparse.linalg.lgmres` for details.
+    inner_kwargs : kwargs
+        Keyword parameters for the "inner" Krylov solver
+        (defined with `method`). Parameter names must start with
+        the `inner_` prefix which will be stripped before passing on
+        the inner method. See, e.g., `scipy.sparse.linalg.gmres` for details.
+    %(params_extra)s
+
+    See Also
+    --------
+    root : Interface to root finding algorithms for multivariate
+           functions. See ``method='krylov'`` in particular.
+    scipy.sparse.linalg.gmres
+    scipy.sparse.linalg.lgmres
+
+    Notes
+    -----
+    This function implements a Newton-Krylov solver. The basic idea is
+    to compute the inverse of the Jacobian with an iterative Krylov
+    method. These methods require only evaluating the Jacobian-vector
+    products, which are conveniently approximated by a finite difference:
+
+    .. math:: J v \\approx (f(x + \\omega*v/|v|) - f(x)) / \\omega
+
+    Due to the use of iterative matrix inverses, these methods can
+    deal with large nonlinear problems.
+
+    SciPy's `scipy.sparse.linalg` module offers a selection of Krylov
+    solvers to choose from. The default here is `lgmres`, which is a
+    variant of restarted GMRES iteration that reuses some of the
+    information obtained in the previous Newton steps to invert
+    Jacobians in subsequent steps.
+
+    For a review on Newton-Krylov methods, see for example [1]_,
+    and for the LGMRES sparse inverse method, see [2]_.
+
+    References
+    ----------
+    .. [1] C. T. Kelley, Solving Nonlinear Equations with Newton's Method,
+           SIAM, pp.57-83, 2003.
+           :doi:`10.1137/1.9780898718898.ch3`
+    .. [2] D.A. Knoll and D.E. Keyes, J. Comp. Phys. 193, 357 (2004).
+           :doi:`10.1016/j.jcp.2003.08.010`
+    .. [3] A.H. Baker and E.R. Jessup and T. Manteuffel,
+           SIAM J. Matrix Anal. Appl. 26, 962 (2005).
+           :doi:`10.1137/S0895479803422014`
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations
+
+    >>> def fun(x):
+    ...     return [x[0] + 0.5 * x[1] - 1.0,
+    ...             0.5 * (x[1] - x[0]) ** 2]
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.newton_krylov(fun, [0, 0])
+    >>> sol
+    array([0.66731771, 0.66536458])
+
+    """
+
+    def __init__(self, rdiff=None, method='lgmres', inner_maxiter=20,
+                 inner_M=None, outer_k=10, **kw):
+        self.preconditioner = inner_M
+        self.rdiff = rdiff
+        # Note that this retrieves one of the named functions, or otherwise
+        # uses `method` as is (i.e., for a user-provided callable).
+        self.method = dict(
+            bicgstab=scipy.sparse.linalg.bicgstab,
+            gmres=scipy.sparse.linalg.gmres,
+            lgmres=scipy.sparse.linalg.lgmres,
+            cgs=scipy.sparse.linalg.cgs,
+            minres=scipy.sparse.linalg.minres,
+            tfqmr=scipy.sparse.linalg.tfqmr,
+            ).get(method, method)
+
+        self.method_kw = dict(maxiter=inner_maxiter, M=self.preconditioner)
+
+        if self.method is scipy.sparse.linalg.gmres:
+            # Replace GMRES's outer iteration with Newton steps
+            self.method_kw['restart'] = inner_maxiter
+            self.method_kw['maxiter'] = 1
+            self.method_kw.setdefault('atol', 0)
+        elif self.method in (scipy.sparse.linalg.gcrotmk,
+                             scipy.sparse.linalg.bicgstab,
+                             scipy.sparse.linalg.cgs):
+            self.method_kw.setdefault('atol', 0)
+        elif self.method is scipy.sparse.linalg.lgmres:
+            self.method_kw['outer_k'] = outer_k
+            # Replace LGMRES's outer iteration with Newton steps
+            self.method_kw['maxiter'] = 1
+            # Carry LGMRES's `outer_v` vectors across nonlinear iterations
+            self.method_kw.setdefault('outer_v', [])
+            self.method_kw.setdefault('prepend_outer_v', True)
+            # But don't carry the corresponding Jacobian*v products, in case
+            # the Jacobian changes a lot in the nonlinear step
+            #
+            # XXX: some trust-region inspired ideas might be more efficient...
+            #      See e.g., Brown & Saad. But needs to be implemented separately
+            #      since it's not an inexact Newton method.
+            self.method_kw.setdefault('store_outer_Av', False)
+            self.method_kw.setdefault('atol', 0)
+
+        for key, value in kw.items():
+            if not key.startswith('inner_'):
+                raise ValueError(f"Unknown parameter {key}")
+            self.method_kw[key[6:]] = value
+
+    def _update_diff_step(self):
+        mx = abs(self.x0).max()
+        mf = abs(self.f0).max()
+        self.omega = self.rdiff * max(1, mx) / max(1, mf)
+
+    def matvec(self, v):
+        nv = norm(v)
+        if nv == 0:
+            return 0*v
+        sc = self.omega / nv
+        r = (self.func(self.x0 + sc*v) - self.f0) / sc
+        if not np.all(np.isfinite(r)) and np.all(np.isfinite(v)):
+            raise ValueError('Function returned non-finite results')
+        return r
+
+    def solve(self, rhs, tol=0):
+        if 'rtol' in self.method_kw:
+            sol, info = self.method(self.op, rhs, **self.method_kw)
+        else:
+            sol, info = self.method(self.op, rhs, rtol=tol, **self.method_kw)
+        return sol
+
+    def update(self, x, f):
+        self.x0 = x
+        self.f0 = f
+        self._update_diff_step()
+
+        # Update also the preconditioner, if possible
+        if self.preconditioner is not None:
+            if hasattr(self.preconditioner, 'update'):
+                self.preconditioner.update(x, f)
+
+    def setup(self, x, f, func):
+        Jacobian.setup(self, x, f, func)
+        self.x0 = x
+        self.f0 = f
+        self.op = scipy.sparse.linalg.aslinearoperator(self)
+
+        if self.rdiff is None:
+            self.rdiff = np.finfo(x.dtype).eps ** (1./2)
+
+        self._update_diff_step()
+
+        # Setup also the preconditioner, if possible
+        if self.preconditioner is not None:
+            if hasattr(self.preconditioner, 'setup'):
+                self.preconditioner.setup(x, f, func)
+
+
+#------------------------------------------------------------------------------
+# Wrapper functions
+#------------------------------------------------------------------------------
+
+def _nonlin_wrapper(name, jac):
+    """
+    Construct a solver wrapper with given name and Jacobian approx.
+
+    It inspects the keyword arguments of ``jac.__init__``, and allows to
+    use the same arguments in the wrapper function, in addition to the
+    keyword arguments of `nonlin_solve`
+
+    """
+    signature = _getfullargspec(jac.__init__)
+    args, varargs, varkw, defaults, kwonlyargs, kwdefaults, _ = signature
+    kwargs = list(zip(args[-len(defaults):], defaults))
+    kw_str = ", ".join([f"{k}={v!r}" for k, v in kwargs])
+    if kw_str:
+        kw_str = ", " + kw_str
+    kwkw_str = ", ".join([f"{k}={k}" for k, v in kwargs])
+    if kwkw_str:
+        kwkw_str = kwkw_str + ", "
+    if kwonlyargs:
+        raise ValueError(f'Unexpected signature {signature}')
+
+    # Construct the wrapper function so that its keyword arguments
+    # are visible in pydoc.help etc.
+    wrapper = """
+def %(name)s(F, xin, iter=None %(kw)s, verbose=False, maxiter=None,
+             f_tol=None, f_rtol=None, x_tol=None, x_rtol=None,
+             tol_norm=None, line_search='armijo', callback=None, **kw):
+    jac = %(jac)s(%(kwkw)s **kw)
+    return nonlin_solve(F, xin, jac, iter, verbose, maxiter,
+                        f_tol, f_rtol, x_tol, x_rtol, tol_norm, line_search,
+                        callback)
+"""
+
+    wrapper = wrapper % dict(name=name, kw=kw_str, jac=jac.__name__,
+                             kwkw=kwkw_str)
+    ns = {}
+    ns.update(globals())
+    exec(wrapper, ns)
+    func = ns[name]
+    func.__doc__ = jac.__doc__
+    _set_doc(func)
+    return func
+
+
+broyden1 = _nonlin_wrapper('broyden1', BroydenFirst)
+broyden2 = _nonlin_wrapper('broyden2', BroydenSecond)
+anderson = _nonlin_wrapper('anderson', Anderson)
+linearmixing = _nonlin_wrapper('linearmixing', LinearMixing)
+diagbroyden = _nonlin_wrapper('diagbroyden', DiagBroyden)
+excitingmixing = _nonlin_wrapper('excitingmixing', ExcitingMixing)
+newton_krylov = _nonlin_wrapper('newton_krylov', KrylovJacobian)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_numdiff.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_numdiff.py
new file mode 100644
index 0000000000000000000000000000000000000000..6f847a8ebdaec7df7428ca1267a024fb9212d824
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_numdiff.py
@@ -0,0 +1,785 @@
+"""Routines for numerical differentiation."""
+import functools
+import numpy as np
+from numpy.linalg import norm
+
+from scipy.sparse.linalg import LinearOperator
+from ..sparse import issparse, csc_matrix, csr_matrix, coo_matrix, find
+from ._group_columns import group_dense, group_sparse
+from scipy._lib._array_api import array_namespace
+from scipy._lib import array_api_extra as xpx
+
+
+def _adjust_scheme_to_bounds(x0, h, num_steps, scheme, lb, ub):
+    """Adjust final difference scheme to the presence of bounds.
+
+    Parameters
+    ----------
+    x0 : ndarray, shape (n,)
+        Point at which we wish to estimate derivative.
+    h : ndarray, shape (n,)
+        Desired absolute finite difference steps.
+    num_steps : int
+        Number of `h` steps in one direction required to implement finite
+        difference scheme. For example, 2 means that we need to evaluate
+        f(x0 + 2 * h) or f(x0 - 2 * h)
+    scheme : {'1-sided', '2-sided'}
+        Whether steps in one or both directions are required. In other
+        words '1-sided' applies to forward and backward schemes, '2-sided'
+        applies to center schemes.
+    lb : ndarray, shape (n,)
+        Lower bounds on independent variables.
+    ub : ndarray, shape (n,)
+        Upper bounds on independent variables.
+
+    Returns
+    -------
+    h_adjusted : ndarray, shape (n,)
+        Adjusted absolute step sizes. Step size decreases only if a sign flip
+        or switching to one-sided scheme doesn't allow to take a full step.
+    use_one_sided : ndarray of bool, shape (n,)
+        Whether to switch to one-sided scheme. Informative only for
+        ``scheme='2-sided'``.
+    """
+    if scheme == '1-sided':
+        use_one_sided = np.ones_like(h, dtype=bool)
+    elif scheme == '2-sided':
+        h = np.abs(h)
+        use_one_sided = np.zeros_like(h, dtype=bool)
+    else:
+        raise ValueError("`scheme` must be '1-sided' or '2-sided'.")
+
+    if np.all((lb == -np.inf) & (ub == np.inf)):
+        return h, use_one_sided
+
+    h_total = h * num_steps
+    h_adjusted = h.copy()
+
+    lower_dist = x0 - lb
+    upper_dist = ub - x0
+
+    if scheme == '1-sided':
+        x = x0 + h_total
+        violated = (x < lb) | (x > ub)
+        fitting = np.abs(h_total) <= np.maximum(lower_dist, upper_dist)
+        h_adjusted[violated & fitting] *= -1
+
+        forward = (upper_dist >= lower_dist) & ~fitting
+        h_adjusted[forward] = upper_dist[forward] / num_steps
+        backward = (upper_dist < lower_dist) & ~fitting
+        h_adjusted[backward] = -lower_dist[backward] / num_steps
+    elif scheme == '2-sided':
+        central = (lower_dist >= h_total) & (upper_dist >= h_total)
+
+        forward = (upper_dist >= lower_dist) & ~central
+        h_adjusted[forward] = np.minimum(
+            h[forward], 0.5 * upper_dist[forward] / num_steps)
+        use_one_sided[forward] = True
+
+        backward = (upper_dist < lower_dist) & ~central
+        h_adjusted[backward] = -np.minimum(
+            h[backward], 0.5 * lower_dist[backward] / num_steps)
+        use_one_sided[backward] = True
+
+        min_dist = np.minimum(upper_dist, lower_dist) / num_steps
+        adjusted_central = (~central & (np.abs(h_adjusted) <= min_dist))
+        h_adjusted[adjusted_central] = min_dist[adjusted_central]
+        use_one_sided[adjusted_central] = False
+
+    return h_adjusted, use_one_sided
+
+
+@functools.lru_cache
+def _eps_for_method(x0_dtype, f0_dtype, method):
+    """
+    Calculates relative EPS step to use for a given data type
+    and numdiff step method.
+
+    Progressively smaller steps are used for larger floating point types.
+
+    Parameters
+    ----------
+    f0_dtype: np.dtype
+        dtype of function evaluation
+
+    x0_dtype: np.dtype
+        dtype of parameter vector
+
+    method: {'2-point', '3-point', 'cs'}
+
+    Returns
+    -------
+    EPS: float
+        relative step size. May be np.float16, np.float32, np.float64
+
+    Notes
+    -----
+    The default relative step will be np.float64. However, if x0 or f0 are
+    smaller floating point types (np.float16, np.float32), then the smallest
+    floating point type is chosen.
+    """
+    # the default EPS value
+    EPS = np.finfo(np.float64).eps
+
+    x0_is_fp = False
+    if np.issubdtype(x0_dtype, np.inexact):
+        # if you're a floating point type then over-ride the default EPS
+        EPS = np.finfo(x0_dtype).eps
+        x0_itemsize = np.dtype(x0_dtype).itemsize
+        x0_is_fp = True
+
+    if np.issubdtype(f0_dtype, np.inexact):
+        f0_itemsize = np.dtype(f0_dtype).itemsize
+        # choose the smallest itemsize between x0 and f0
+        if x0_is_fp and f0_itemsize < x0_itemsize:
+            EPS = np.finfo(f0_dtype).eps
+
+    if method in ["2-point", "cs"]:
+        return EPS**0.5
+    elif method in ["3-point"]:
+        return EPS**(1/3)
+    else:
+        raise RuntimeError("Unknown step method, should be one of "
+                           "{'2-point', '3-point', 'cs'}")
+
+
+def _compute_absolute_step(rel_step, x0, f0, method):
+    """
+    Computes an absolute step from a relative step for finite difference
+    calculation.
+
+    Parameters
+    ----------
+    rel_step: None or array-like
+        Relative step for the finite difference calculation
+    x0 : np.ndarray
+        Parameter vector
+    f0 : np.ndarray or scalar
+    method : {'2-point', '3-point', 'cs'}
+
+    Returns
+    -------
+    h : float
+        The absolute step size
+
+    Notes
+    -----
+    `h` will always be np.float64. However, if `x0` or `f0` are
+    smaller floating point dtypes (e.g. np.float32), then the absolute
+    step size will be calculated from the smallest floating point size.
+    """
+    # this is used instead of np.sign(x0) because we need
+    # sign_x0 to be 1 when x0 == 0.
+    sign_x0 = (x0 >= 0).astype(float) * 2 - 1
+
+    rstep = _eps_for_method(x0.dtype, f0.dtype, method)
+
+    if rel_step is None:
+        abs_step = rstep * sign_x0 * np.maximum(1.0, np.abs(x0))
+    else:
+        # User has requested specific relative steps.
+        # Don't multiply by max(1, abs(x0) because if x0 < 1 then their
+        # requested step is not used.
+        abs_step = rel_step * sign_x0 * np.abs(x0)
+
+        # however we don't want an abs_step of 0, which can happen if
+        # rel_step is 0, or x0 is 0. Instead, substitute a realistic step
+        dx = ((x0 + abs_step) - x0)
+        abs_step = np.where(dx == 0,
+                            rstep * sign_x0 * np.maximum(1.0, np.abs(x0)),
+                            abs_step)
+
+    return abs_step
+
+
+def _prepare_bounds(bounds, x0):
+    """
+    Prepares new-style bounds from a two-tuple specifying the lower and upper
+    limits for values in x0. If a value is not bound then the lower/upper bound
+    will be expected to be -np.inf/np.inf.
+
+    Examples
+    --------
+    >>> _prepare_bounds([(0, 1, 2), (1, 2, np.inf)], [0.5, 1.5, 2.5])
+    (array([0., 1., 2.]), array([ 1.,  2., inf]))
+    """
+    lb, ub = (np.asarray(b, dtype=float) for b in bounds)
+    if lb.ndim == 0:
+        lb = np.resize(lb, x0.shape)
+
+    if ub.ndim == 0:
+        ub = np.resize(ub, x0.shape)
+
+    return lb, ub
+
+
+def group_columns(A, order=0):
+    """Group columns of a 2-D matrix for sparse finite differencing [1]_.
+
+    Two columns are in the same group if in each row at least one of them
+    has zero. A greedy sequential algorithm is used to construct groups.
+
+    Parameters
+    ----------
+    A : array_like or sparse matrix, shape (m, n)
+        Matrix of which to group columns.
+    order : int, iterable of int with shape (n,) or None
+        Permutation array which defines the order of columns enumeration.
+        If int or None, a random permutation is used with `order` used as
+        a random seed. Default is 0, that is use a random permutation but
+        guarantee repeatability.
+
+    Returns
+    -------
+    groups : ndarray of int, shape (n,)
+        Contains values from 0 to n_groups-1, where n_groups is the number
+        of found groups. Each value ``groups[i]`` is an index of a group to
+        which ith column assigned. The procedure was helpful only if
+        n_groups is significantly less than n.
+
+    References
+    ----------
+    .. [1] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+           sparse Jacobian matrices", Journal of the Institute of Mathematics
+           and its Applications, 13 (1974), pp. 117-120.
+    """
+    if issparse(A):
+        A = csc_matrix(A)
+    else:
+        A = np.atleast_2d(A)
+        A = (A != 0).astype(np.int32)
+
+    if A.ndim != 2:
+        raise ValueError("`A` must be 2-dimensional.")
+
+    m, n = A.shape
+
+    if order is None or np.isscalar(order):
+        rng = np.random.RandomState(order)
+        order = rng.permutation(n)
+    else:
+        order = np.asarray(order)
+        if order.shape != (n,):
+            raise ValueError("`order` has incorrect shape.")
+
+    A = A[:, order]
+
+    if issparse(A):
+        groups = group_sparse(m, n, A.indices, A.indptr)
+    else:
+        groups = group_dense(m, n, A)
+
+    groups[order] = groups.copy()
+
+    return groups
+
+
+def approx_derivative(fun, x0, method='3-point', rel_step=None, abs_step=None,
+                      f0=None, bounds=(-np.inf, np.inf), sparsity=None,
+                      as_linear_operator=False, args=(), kwargs=None):
+    """Compute finite difference approximation of the derivatives of a
+    vector-valued function.
+
+    If a function maps from R^n to R^m, its derivatives form m-by-n matrix
+    called the Jacobian, where an element (i, j) is a partial derivative of
+    f[i] with respect to x[j].
+
+    Parameters
+    ----------
+    fun : callable
+        Function of which to estimate the derivatives. The argument x
+        passed to this function is ndarray of shape (n,) (never a scalar
+        even if n=1). It must return 1-D array_like of shape (m,) or a scalar.
+    x0 : array_like of shape (n,) or float
+        Point at which to estimate the derivatives. Float will be converted
+        to a 1-D array.
+    method : {'3-point', '2-point', 'cs'}, optional
+        Finite difference method to use:
+            - '2-point' - use the first order accuracy forward or backward
+                          difference.
+            - '3-point' - use central difference in interior points and the
+                          second order accuracy forward or backward difference
+                          near the boundary.
+            - 'cs' - use a complex-step finite difference scheme. This assumes
+                     that the user function is real-valued and can be
+                     analytically continued to the complex plane. Otherwise,
+                     produces bogus results.
+    rel_step : None or array_like, optional
+        Relative step size to use. If None (default) the absolute step size is
+        computed as ``h = rel_step * sign(x0) * max(1, abs(x0))``, with
+        `rel_step` being selected automatically, see Notes. Otherwise
+        ``h = rel_step * sign(x0) * abs(x0)``. For ``method='3-point'`` the
+        sign of `h` is ignored. The calculated step size is possibly adjusted
+        to fit into the bounds.
+    abs_step : array_like, optional
+        Absolute step size to use, possibly adjusted to fit into the bounds.
+        For ``method='3-point'`` the sign of `abs_step` is ignored. By default
+        relative steps are used, only if ``abs_step is not None`` are absolute
+        steps used.
+    f0 : None or array_like, optional
+        If not None it is assumed to be equal to ``fun(x0)``, in this case
+        the ``fun(x0)`` is not called. Default is None.
+    bounds : tuple of array_like, optional
+        Lower and upper bounds on independent variables. Defaults to no bounds.
+        Each bound must match the size of `x0` or be a scalar, in the latter
+        case the bound will be the same for all variables. Use it to limit the
+        range of function evaluation. Bounds checking is not implemented
+        when `as_linear_operator` is True.
+    sparsity : {None, array_like, sparse matrix, 2-tuple}, optional
+        Defines a sparsity structure of the Jacobian matrix. If the Jacobian
+        matrix is known to have only few non-zero elements in each row, then
+        it's possible to estimate its several columns by a single function
+        evaluation [3]_. To perform such economic computations two ingredients
+        are required:
+
+        * structure : array_like or sparse matrix of shape (m, n). A zero
+          element means that a corresponding element of the Jacobian
+          identically equals to zero.
+        * groups : array_like of shape (n,). A column grouping for a given
+          sparsity structure, use `group_columns` to obtain it.
+
+        A single array or a sparse matrix is interpreted as a sparsity
+        structure, and groups are computed inside the function. A tuple is
+        interpreted as (structure, groups). If None (default), a standard
+        dense differencing will be used.
+
+        Note, that sparse differencing makes sense only for large Jacobian
+        matrices where each row contains few non-zero elements.
+    as_linear_operator : bool, optional
+        When True the function returns an `scipy.sparse.linalg.LinearOperator`.
+        Otherwise it returns a dense array or a sparse matrix depending on
+        `sparsity`. The linear operator provides an efficient way of computing
+        ``J.dot(p)`` for any vector ``p`` of shape (n,), but does not allow
+        direct access to individual elements of the matrix. By default
+        `as_linear_operator` is False.
+    args, kwargs : tuple and dict, optional
+        Additional arguments passed to `fun`. Both empty by default.
+        The calling signature is ``fun(x, *args, **kwargs)``.
+
+    Returns
+    -------
+    J : {ndarray, sparse matrix, LinearOperator}
+        Finite difference approximation of the Jacobian matrix.
+        If `as_linear_operator` is True returns a LinearOperator
+        with shape (m, n). Otherwise it returns a dense array or sparse
+        matrix depending on how `sparsity` is defined. If `sparsity`
+        is None then a ndarray with shape (m, n) is returned. If
+        `sparsity` is not None returns a csr_matrix with shape (m, n).
+        For sparse matrices and linear operators it is always returned as
+        a 2-D structure, for ndarrays, if m=1 it is returned
+        as a 1-D gradient array with shape (n,).
+
+    See Also
+    --------
+    check_derivative : Check correctness of a function computing derivatives.
+
+    Notes
+    -----
+    If `rel_step` is not provided, it assigned as ``EPS**(1/s)``, where EPS is
+    determined from the smallest floating point dtype of `x0` or `fun(x0)`,
+    ``np.finfo(x0.dtype).eps``, s=2 for '2-point' method and
+    s=3 for '3-point' method. Such relative step approximately minimizes a sum
+    of truncation and round-off errors, see [1]_. Relative steps are used by
+    default. However, absolute steps are used when ``abs_step is not None``.
+    If any of the absolute or relative steps produces an indistinguishable
+    difference from the original `x0`, ``(x0 + dx) - x0 == 0``, then a
+    automatic step size is substituted for that particular entry.
+
+    A finite difference scheme for '3-point' method is selected automatically.
+    The well-known central difference scheme is used for points sufficiently
+    far from the boundary, and 3-point forward or backward scheme is used for
+    points near the boundary. Both schemes have the second-order accuracy in
+    terms of Taylor expansion. Refer to [2]_ for the formulas of 3-point
+    forward and backward difference schemes.
+
+    For dense differencing when m=1 Jacobian is returned with a shape (n,),
+    on the other hand when n=1 Jacobian is returned with a shape (m, 1).
+    Our motivation is the following: a) It handles a case of gradient
+    computation (m=1) in a conventional way. b) It clearly separates these two
+    different cases. b) In all cases np.atleast_2d can be called to get 2-D
+    Jacobian with correct dimensions.
+
+    References
+    ----------
+    .. [1] W. H. Press et. al. "Numerical Recipes. The Art of Scientific
+           Computing. 3rd edition", sec. 5.7.
+
+    .. [2] A. Curtis, M. J. D. Powell, and J. Reid, "On the estimation of
+           sparse Jacobian matrices", Journal of the Institute of Mathematics
+           and its Applications, 13 (1974), pp. 117-120.
+
+    .. [3] B. Fornberg, "Generation of Finite Difference Formulas on
+           Arbitrarily Spaced Grids", Mathematics of Computation 51, 1988.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize._numdiff import approx_derivative
+    >>>
+    >>> def f(x, c1, c2):
+    ...     return np.array([x[0] * np.sin(c1 * x[1]),
+    ...                      x[0] * np.cos(c2 * x[1])])
+    ...
+    >>> x0 = np.array([1.0, 0.5 * np.pi])
+    >>> approx_derivative(f, x0, args=(1, 2))
+    array([[ 1.,  0.],
+           [-1.,  0.]])
+
+    Bounds can be used to limit the region of function evaluation.
+    In the example below we compute left and right derivative at point 1.0.
+
+    >>> def g(x):
+    ...     return x**2 if x >= 1 else x
+    ...
+    >>> x0 = 1.0
+    >>> approx_derivative(g, x0, bounds=(-np.inf, 1.0))
+    array([ 1.])
+    >>> approx_derivative(g, x0, bounds=(1.0, np.inf))
+    array([ 2.])
+    """
+    if method not in ['2-point', '3-point', 'cs']:
+        raise ValueError(f"Unknown method '{method}'. ")
+
+    xp = array_namespace(x0)
+    _x = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+    _dtype = xp.float64
+    if xp.isdtype(_x.dtype, "real floating"):
+        _dtype = _x.dtype
+
+    # promotes to floating
+    x0 = xp.astype(_x, _dtype)
+
+    if x0.ndim > 1:
+        raise ValueError("`x0` must have at most 1 dimension.")
+
+    lb, ub = _prepare_bounds(bounds, x0)
+
+    if lb.shape != x0.shape or ub.shape != x0.shape:
+        raise ValueError("Inconsistent shapes between bounds and `x0`.")
+
+    if as_linear_operator and not (np.all(np.isinf(lb))
+                                   and np.all(np.isinf(ub))):
+        raise ValueError("Bounds not supported when "
+                         "`as_linear_operator` is True.")
+
+    if kwargs is None:
+        kwargs = {}
+
+    def fun_wrapped(x):
+        # send user function same fp type as x0. (but only if cs is not being
+        # used
+        if xp.isdtype(x.dtype, "real floating"):
+            x = xp.astype(x, x0.dtype)
+
+        f = np.atleast_1d(fun(x, *args, **kwargs))
+        if f.ndim > 1:
+            raise RuntimeError("`fun` return value has "
+                               "more than 1 dimension.")
+        return f
+
+    if f0 is None:
+        f0 = fun_wrapped(x0)
+    else:
+        f0 = np.atleast_1d(f0)
+        if f0.ndim > 1:
+            raise ValueError("`f0` passed has more than 1 dimension.")
+
+    if np.any((x0 < lb) | (x0 > ub)):
+        raise ValueError("`x0` violates bound constraints.")
+
+    if as_linear_operator:
+        if rel_step is None:
+            rel_step = _eps_for_method(x0.dtype, f0.dtype, method)
+
+        return _linear_operator_difference(fun_wrapped, x0,
+                                           f0, rel_step, method)
+    else:
+        # by default we use rel_step
+        if abs_step is None:
+            h = _compute_absolute_step(rel_step, x0, f0, method)
+        else:
+            # user specifies an absolute step
+            sign_x0 = (x0 >= 0).astype(float) * 2 - 1
+            h = abs_step
+
+            # cannot have a zero step. This might happen if x0 is very large
+            # or small. In which case fall back to relative step.
+            dx = ((x0 + h) - x0)
+            h = np.where(dx == 0,
+                         _eps_for_method(x0.dtype, f0.dtype, method) *
+                         sign_x0 * np.maximum(1.0, np.abs(x0)),
+                         h)
+
+        if method == '2-point':
+            h, use_one_sided = _adjust_scheme_to_bounds(
+                x0, h, 1, '1-sided', lb, ub)
+        elif method == '3-point':
+            h, use_one_sided = _adjust_scheme_to_bounds(
+                x0, h, 1, '2-sided', lb, ub)
+        elif method == 'cs':
+            use_one_sided = False
+
+        if sparsity is None:
+            return _dense_difference(fun_wrapped, x0, f0, h,
+                                     use_one_sided, method)
+        else:
+            if not issparse(sparsity) and len(sparsity) == 2:
+                structure, groups = sparsity
+            else:
+                structure = sparsity
+                groups = group_columns(sparsity)
+
+            if issparse(structure):
+                structure = csc_matrix(structure)
+            else:
+                structure = np.atleast_2d(structure)
+
+            groups = np.atleast_1d(groups)
+            return _sparse_difference(fun_wrapped, x0, f0, h,
+                                      use_one_sided, structure,
+                                      groups, method)
+
+
+def _linear_operator_difference(fun, x0, f0, h, method):
+    m = f0.size
+    n = x0.size
+
+    if method == '2-point':
+        def matvec(p):
+            if np.array_equal(p, np.zeros_like(p)):
+                return np.zeros(m)
+            dx = h / norm(p)
+            x = x0 + dx*p
+            df = fun(x) - f0
+            return df / dx
+
+    elif method == '3-point':
+        def matvec(p):
+            if np.array_equal(p, np.zeros_like(p)):
+                return np.zeros(m)
+            dx = 2*h / norm(p)
+            x1 = x0 - (dx/2)*p
+            x2 = x0 + (dx/2)*p
+            f1 = fun(x1)
+            f2 = fun(x2)
+            df = f2 - f1
+            return df / dx
+
+    elif method == 'cs':
+        def matvec(p):
+            if np.array_equal(p, np.zeros_like(p)):
+                return np.zeros(m)
+            dx = h / norm(p)
+            x = x0 + dx*p*1.j
+            f1 = fun(x)
+            df = f1.imag
+            return df / dx
+
+    else:
+        raise RuntimeError("Never be here.")
+
+    return LinearOperator((m, n), matvec)
+
+
+def _dense_difference(fun, x0, f0, h, use_one_sided, method):
+    m = f0.size
+    n = x0.size
+    J_transposed = np.empty((n, m))
+    x1 = x0.copy()
+    x2 = x0.copy()
+    xc = x0.astype(complex, copy=True)
+
+    for i in range(h.size):
+        if method == '2-point':
+            x1[i] += h[i]
+            dx = x1[i] - x0[i]  # Recompute dx as exactly representable number.
+            df = fun(x1) - f0
+        elif method == '3-point' and use_one_sided[i]:
+            x1[i] += h[i]
+            x2[i] += 2 * h[i]
+            dx = x2[i] - x0[i]
+            f1 = fun(x1)
+            f2 = fun(x2)
+            df = -3.0 * f0 + 4 * f1 - f2
+        elif method == '3-point' and not use_one_sided[i]:
+            x1[i] -= h[i]
+            x2[i] += h[i]
+            dx = x2[i] - x1[i]
+            f1 = fun(x1)
+            f2 = fun(x2)
+            df = f2 - f1
+        elif method == 'cs':
+            xc[i] += h[i] * 1.j
+            f1 = fun(xc)
+            df = f1.imag
+            dx = h[i]
+        else:
+            raise RuntimeError("Never be here.")
+
+        J_transposed[i] = df / dx
+        x1[i] = x2[i] = xc[i] = x0[i]
+
+    if m == 1:
+        J_transposed = np.ravel(J_transposed)
+
+    return J_transposed.T
+
+
+def _sparse_difference(fun, x0, f0, h, use_one_sided,
+                       structure, groups, method):
+    m = f0.size
+    n = x0.size
+    row_indices = []
+    col_indices = []
+    fractions = []
+
+    n_groups = np.max(groups) + 1
+    for group in range(n_groups):
+        # Perturb variables which are in the same group simultaneously.
+        e = np.equal(group, groups)
+        h_vec = h * e
+        if method == '2-point':
+            x = x0 + h_vec
+            dx = x - x0
+            df = fun(x) - f0
+            # The result is  written to columns which correspond to perturbed
+            # variables.
+            cols, = np.nonzero(e)
+            # Find all non-zero elements in selected columns of Jacobian.
+            i, j, _ = find(structure[:, cols])
+            # Restore column indices in the full array.
+            j = cols[j]
+        elif method == '3-point':
+            # Here we do conceptually the same but separate one-sided
+            # and two-sided schemes.
+            x1 = x0.copy()
+            x2 = x0.copy()
+
+            mask_1 = use_one_sided & e
+            x1[mask_1] += h_vec[mask_1]
+            x2[mask_1] += 2 * h_vec[mask_1]
+
+            mask_2 = ~use_one_sided & e
+            x1[mask_2] -= h_vec[mask_2]
+            x2[mask_2] += h_vec[mask_2]
+
+            dx = np.zeros(n)
+            dx[mask_1] = x2[mask_1] - x0[mask_1]
+            dx[mask_2] = x2[mask_2] - x1[mask_2]
+
+            f1 = fun(x1)
+            f2 = fun(x2)
+
+            cols, = np.nonzero(e)
+            i, j, _ = find(structure[:, cols])
+            j = cols[j]
+
+            mask = use_one_sided[j]
+            df = np.empty(m)
+
+            rows = i[mask]
+            df[rows] = -3 * f0[rows] + 4 * f1[rows] - f2[rows]
+
+            rows = i[~mask]
+            df[rows] = f2[rows] - f1[rows]
+        elif method == 'cs':
+            f1 = fun(x0 + h_vec*1.j)
+            df = f1.imag
+            dx = h_vec
+            cols, = np.nonzero(e)
+            i, j, _ = find(structure[:, cols])
+            j = cols[j]
+        else:
+            raise ValueError("Never be here.")
+
+        # All that's left is to compute the fraction. We store i, j and
+        # fractions as separate arrays and later construct coo_matrix.
+        row_indices.append(i)
+        col_indices.append(j)
+        fractions.append(df[i] / dx[j])
+
+    row_indices = np.hstack(row_indices)
+    col_indices = np.hstack(col_indices)
+    fractions = np.hstack(fractions)
+    J = coo_matrix((fractions, (row_indices, col_indices)), shape=(m, n))
+    return csr_matrix(J)
+
+
+def check_derivative(fun, jac, x0, bounds=(-np.inf, np.inf), args=(),
+                     kwargs=None):
+    """Check correctness of a function computing derivatives (Jacobian or
+    gradient) by comparison with a finite difference approximation.
+
+    Parameters
+    ----------
+    fun : callable
+        Function of which to estimate the derivatives. The argument x
+        passed to this function is ndarray of shape (n,) (never a scalar
+        even if n=1). It must return 1-D array_like of shape (m,) or a scalar.
+    jac : callable
+        Function which computes Jacobian matrix of `fun`. It must work with
+        argument x the same way as `fun`. The return value must be array_like
+        or sparse matrix with an appropriate shape.
+    x0 : array_like of shape (n,) or float
+        Point at which to estimate the derivatives. Float will be converted
+        to 1-D array.
+    bounds : 2-tuple of array_like, optional
+        Lower and upper bounds on independent variables. Defaults to no bounds.
+        Each bound must match the size of `x0` or be a scalar, in the latter
+        case the bound will be the same for all variables. Use it to limit the
+        range of function evaluation.
+    args, kwargs : tuple and dict, optional
+        Additional arguments passed to `fun` and `jac`. Both empty by default.
+        The calling signature is ``fun(x, *args, **kwargs)`` and the same
+        for `jac`.
+
+    Returns
+    -------
+    accuracy : float
+        The maximum among all relative errors for elements with absolute values
+        higher than 1 and absolute errors for elements with absolute values
+        less or equal than 1. If `accuracy` is on the order of 1e-6 or lower,
+        then it is likely that your `jac` implementation is correct.
+
+    See Also
+    --------
+    approx_derivative : Compute finite difference approximation of derivative.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize._numdiff import check_derivative
+    >>>
+    >>>
+    >>> def f(x, c1, c2):
+    ...     return np.array([x[0] * np.sin(c1 * x[1]),
+    ...                      x[0] * np.cos(c2 * x[1])])
+    ...
+    >>> def jac(x, c1, c2):
+    ...     return np.array([
+    ...         [np.sin(c1 * x[1]),  c1 * x[0] * np.cos(c1 * x[1])],
+    ...         [np.cos(c2 * x[1]), -c2 * x[0] * np.sin(c2 * x[1])]
+    ...     ])
+    ...
+    >>>
+    >>> x0 = np.array([1.0, 0.5 * np.pi])
+    >>> check_derivative(f, jac, x0, args=(1, 2))
+    2.4492935982947064e-16
+    """
+    if kwargs is None:
+        kwargs = {}
+    J_to_test = jac(x0, *args, **kwargs)
+    if issparse(J_to_test):
+        J_diff = approx_derivative(fun, x0, bounds=bounds, sparsity=J_to_test,
+                                   args=args, kwargs=kwargs)
+        J_to_test = csr_matrix(J_to_test)
+        abs_err = J_to_test - J_diff
+        i, j, abs_err_data = find(abs_err)
+        J_diff_data = np.asarray(J_diff[i, j]).ravel()
+        return np.max(np.abs(abs_err_data) /
+                      np.maximum(1, np.abs(J_diff_data)))
+    else:
+        J_diff = approx_derivative(fun, x0, bounds=bounds,
+                                   args=args, kwargs=kwargs)
+        abs_err = np.abs(J_to_test - J_diff)
+        return np.max(abs_err / np.maximum(1, np.abs(J_diff)))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_optimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_optimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c0214daad371c51c5b860e4773e2bb01faf123d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_optimize.py
@@ -0,0 +1,4131 @@
+#__docformat__ = "restructuredtext en"
+# ******NOTICE***************
+# optimize.py module by Travis E. Oliphant
+#
+# You may copy and use this module as you see fit with no
+# guarantee implied provided you keep this notice in all copies.
+# *****END NOTICE************
+
+# A collection of optimization algorithms. Version 0.5
+# CHANGES
+#  Added fminbound (July 2001)
+#  Added brute (Aug. 2002)
+#  Finished line search satisfying strong Wolfe conditions (Mar. 2004)
+#  Updated strong Wolfe conditions line search to use
+#  cubic-interpolation (Mar. 2004)
+
+
+# Minimization routines
+
+__all__ = ['fmin', 'fmin_powell', 'fmin_bfgs', 'fmin_ncg', 'fmin_cg',
+           'fminbound', 'brent', 'golden', 'bracket', 'rosen', 'rosen_der',
+           'rosen_hess', 'rosen_hess_prod', 'brute', 'approx_fprime',
+           'line_search', 'check_grad', 'OptimizeResult', 'show_options',
+           'OptimizeWarning']
+
+__docformat__ = "restructuredtext en"
+
+import math
+import warnings
+import sys
+import inspect
+from numpy import eye, argmin, zeros, shape, asarray, sqrt
+import numpy as np
+from scipy.linalg import cholesky, issymmetric, LinAlgError
+from scipy.sparse.linalg import LinearOperator
+from ._linesearch import (line_search_wolfe1, line_search_wolfe2,
+                          line_search_wolfe2 as line_search,
+                          LineSearchWarning)
+from ._numdiff import approx_derivative
+from scipy._lib._util import getfullargspec_no_self as _getfullargspec
+from scipy._lib._util import (MapWrapper, check_random_state, _RichResult,
+                              _call_callback_maybe_halt, _transition_to_rng)
+from scipy.optimize._differentiable_functions import ScalarFunction, FD_METHODS
+from scipy._lib._array_api import array_namespace
+from scipy._lib import array_api_extra as xpx
+
+
+# standard status messages of optimizers
+_status_message = {'success': 'Optimization terminated successfully.',
+                   'maxfev': 'Maximum number of function evaluations has '
+                              'been exceeded.',
+                   'maxiter': 'Maximum number of iterations has been '
+                              'exceeded.',
+                   'pr_loss': 'Desired error not necessarily achieved due '
+                              'to precision loss.',
+                   'nan': 'NaN result encountered.',
+                   'out_of_bounds': 'The result is outside of the provided '
+                                    'bounds.'}
+
+
+class MemoizeJac:
+    """Decorator that caches the return values of a function returning ``(fun, grad)``
+    each time it is called."""
+
+    def __init__(self, fun):
+        self.fun = fun
+        self.jac = None
+        self._value = None
+        self.x = None
+
+    def _compute_if_needed(self, x, *args):
+        if not np.all(x == self.x) or self._value is None or self.jac is None:
+            self.x = np.asarray(x).copy()
+            fg = self.fun(x, *args)
+            self.jac = fg[1]
+            self._value = fg[0]
+
+    def __call__(self, x, *args):
+        """ returns the function value """
+        self._compute_if_needed(x, *args)
+        return self._value
+
+    def derivative(self, x, *args):
+        self._compute_if_needed(x, *args)
+        return self.jac
+
+
+def _wrap_callback(callback, method=None):
+    """Wrap a user-provided callback so that attributes can be attached."""
+    if callback is None or method in {'tnc', 'slsqp', 'cobyla', 'cobyqa'}:
+        return callback  # don't wrap
+
+    sig = inspect.signature(callback)
+
+    if set(sig.parameters) == {'intermediate_result'}:
+        def wrapped_callback(res):
+            return callback(intermediate_result=res)
+    elif method == 'trust-constr':
+        def wrapped_callback(res):
+            return callback(np.copy(res.x), res)
+    elif method == 'differential_evolution':
+        def wrapped_callback(res):
+            return callback(np.copy(res.x), res.convergence)
+    else:
+        def wrapped_callback(res):
+            return callback(np.copy(res.x))
+
+    wrapped_callback.stop_iteration = False
+    return wrapped_callback
+
+
+class OptimizeResult(_RichResult):
+    """
+    Represents the optimization result.
+
+    Attributes
+    ----------
+    x : ndarray
+        The solution of the optimization.
+    success : bool
+        Whether or not the optimizer exited successfully.
+    status : int
+        Termination status of the optimizer. Its value depends on the
+        underlying solver. Refer to `message` for details.
+    message : str
+        Description of the cause of the termination.
+    fun : float
+        Value of objective function at `x`.
+    jac, hess : ndarray
+        Values of objective function's Jacobian and its Hessian at `x` (if
+        available). The Hessian may be an approximation, see the documentation
+        of the function in question.
+    hess_inv : object
+        Inverse of the objective function's Hessian; may be an approximation.
+        Not available for all solvers. The type of this attribute may be
+        either np.ndarray or scipy.sparse.linalg.LinearOperator.
+    nfev, njev, nhev : int
+        Number of evaluations of the objective functions and of its
+        Jacobian and Hessian.
+    nit : int
+        Number of iterations performed by the optimizer.
+    maxcv : float
+        The maximum constraint violation.
+
+    Notes
+    -----
+    Depending on the specific solver being used, `OptimizeResult` may
+    not have all attributes listed here, and they may have additional
+    attributes not listed here. Since this class is essentially a
+    subclass of dict with attribute accessors, one can see which
+    attributes are available using the `OptimizeResult.keys` method.
+
+    """
+    pass
+
+
+class OptimizeWarning(UserWarning):
+    pass
+
+def _check_positive_definite(Hk):
+    def is_pos_def(A):
+        if issymmetric(A):
+            try:
+                cholesky(A)
+                return True
+            except LinAlgError:
+                return False
+        else:
+            return False
+    if Hk is not None:
+        if not is_pos_def(Hk):
+            raise ValueError("'hess_inv0' matrix isn't positive definite.")
+
+
+def _check_unknown_options(unknown_options):
+    if unknown_options:
+        msg = ", ".join(map(str, unknown_options.keys()))
+        # Stack level 4: this is called from _minimize_*, which is
+        # called from another function in SciPy. Level 4 is the first
+        # level in user code.
+        warnings.warn(f"Unknown solver options: {msg}", OptimizeWarning, stacklevel=4)
+
+
+def is_finite_scalar(x):
+    """Test whether `x` is either a finite scalar or a finite array scalar.
+
+    """
+    return np.size(x) == 1 and np.isfinite(x)
+
+
+_epsilon = sqrt(np.finfo(float).eps)
+
+
+def vecnorm(x, ord=2):
+    if ord == np.inf:
+        return np.amax(np.abs(x))
+    elif ord == -np.inf:
+        return np.amin(np.abs(x))
+    else:
+        return np.sum(np.abs(x)**ord, axis=0)**(1.0 / ord)
+
+
+def _prepare_scalar_function(fun, x0, jac=None, args=(), bounds=None,
+                             epsilon=None, finite_diff_rel_step=None,
+                             hess=None):
+    """
+    Creates a ScalarFunction object for use with scalar minimizers
+    (BFGS/LBFGSB/SLSQP/TNC/CG/etc).
+
+    Parameters
+    ----------
+    fun : callable
+        The objective function to be minimized.
+
+            ``fun(x, *args) -> float``
+
+        where ``x`` is an 1-D array with shape (n,) and ``args``
+        is a tuple of the fixed parameters needed to completely
+        specify the function.
+    x0 : ndarray, shape (n,)
+        Initial guess. Array of real elements of size (n,),
+        where 'n' is the number of independent variables.
+    jac : {callable,  '2-point', '3-point', 'cs', None}, optional
+        Method for computing the gradient vector. If it is a callable, it
+        should be a function that returns the gradient vector:
+
+            ``jac(x, *args) -> array_like, shape (n,)``
+
+        If one of `{'2-point', '3-point', 'cs'}` is selected then the gradient
+        is calculated with a relative step for finite differences. If `None`,
+        then two-point finite differences with an absolute step is used.
+    args : tuple, optional
+        Extra arguments passed to the objective function and its
+        derivatives (`fun`, `jac` functions).
+    bounds : sequence, optional
+        Bounds on variables. 'new-style' bounds are required.
+    eps : float or ndarray
+        If ``jac is None`` the absolute step size used for numerical
+        approximation of the jacobian via forward differences.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of the jacobian. The absolute step
+        size is computed as ``h = rel_step * sign(x0) * max(1, abs(x0))``,
+        possibly adjusted to fit into the bounds. For ``jac='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+    hess : {callable,  '2-point', '3-point', 'cs', None}
+        Computes the Hessian matrix. If it is callable, it should return the
+        Hessian matrix:
+
+            ``hess(x, *args) -> {LinearOperator, spmatrix, array}, (n, n)``
+
+        Alternatively, the keywords {'2-point', '3-point', 'cs'} select a
+        finite difference scheme for numerical estimation.
+        Whenever the gradient is estimated via finite-differences, the Hessian
+        cannot be estimated with options {'2-point', '3-point', 'cs'} and needs
+        to be estimated using one of the quasi-Newton strategies.
+
+    Returns
+    -------
+    sf : ScalarFunction
+    """
+    if callable(jac):
+        grad = jac
+    elif jac in FD_METHODS:
+        # epsilon is set to None so that ScalarFunction is made to use
+        # rel_step
+        epsilon = None
+        grad = jac
+    else:
+        # default (jac is None) is to do 2-point finite differences with
+        # absolute step size. ScalarFunction has to be provided an
+        # epsilon value that is not None to use absolute steps. This is
+        # normally the case from most _minimize* methods.
+        grad = '2-point'
+        epsilon = epsilon
+
+    if hess is None:
+        # ScalarFunction requires something for hess, so we give a dummy
+        # implementation here if nothing is provided, return a value of None
+        # so that downstream minimisers halt. The results of `fun.hess`
+        # should not be used.
+        def hess(x, *args):
+            return None
+
+    if bounds is None:
+        bounds = (-np.inf, np.inf)
+
+    # ScalarFunction caches. Reuse of fun(x) during grad
+    # calculation reduces overall function evaluations.
+    sf = ScalarFunction(fun, x0, args, grad, hess,
+                        finite_diff_rel_step, bounds, epsilon=epsilon)
+
+    return sf
+
+
+def _clip_x_for_func(func, bounds):
+    # ensures that x values sent to func are clipped to bounds
+
+    # this is used as a mitigation for gh11403, slsqp/tnc sometimes
+    # suggest a move that is outside the limits by 1 or 2 ULP. This
+    # unclean fix makes sure x is strictly within bounds.
+    def eval(x):
+        x = _check_clip_x(x, bounds)
+        return func(x)
+
+    return eval
+
+
+def _check_clip_x(x, bounds):
+    if (x < bounds[0]).any() or (x > bounds[1]).any():
+        warnings.warn("Values in x were outside bounds during a "
+                      "minimize step, clipping to bounds",
+                      RuntimeWarning, stacklevel=3)
+        x = np.clip(x, bounds[0], bounds[1])
+        return x
+
+    return x
+
+
+def rosen(x):
+    """
+    The Rosenbrock function.
+
+    The function computed is::
+
+        sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)
+
+    Parameters
+    ----------
+    x : array_like
+        1-D array of points at which the Rosenbrock function is to be computed.
+
+    Returns
+    -------
+    f : float
+        The value of the Rosenbrock function.
+
+    See Also
+    --------
+    rosen_der, rosen_hess, rosen_hess_prod
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import rosen
+    >>> X = 0.1 * np.arange(10)
+    >>> rosen(X)
+    76.56
+
+    For higher-dimensional input ``rosen`` broadcasts.
+    In the following example, we use this to plot a 2D landscape.
+    Note that ``rosen_hess`` does not broadcast in this manner.
+
+    >>> import matplotlib.pyplot as plt
+    >>> from mpl_toolkits.mplot3d import Axes3D
+    >>> x = np.linspace(-1, 1, 50)
+    >>> X, Y = np.meshgrid(x, x)
+    >>> ax = plt.subplot(111, projection='3d')
+    >>> ax.plot_surface(X, Y, rosen([X, Y]))
+    >>> plt.show()
+    """
+    xp = array_namespace(x)
+    x = xp.asarray(x)
+    if xp.isdtype(x.dtype, 'integral'):
+        x = xp.astype(x, xp.asarray(1.).dtype)
+    r = xp.sum(100.0 * (x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0,
+               axis=0, dtype=x.dtype)
+    return r
+
+
+def rosen_der(x):
+    """
+    The derivative (i.e. gradient) of the Rosenbrock function.
+
+    Parameters
+    ----------
+    x : array_like
+        1-D array of points at which the derivative is to be computed.
+
+    Returns
+    -------
+    rosen_der : (N,) ndarray
+        The gradient of the Rosenbrock function at `x`.
+
+    See Also
+    --------
+    rosen, rosen_hess, rosen_hess_prod
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import rosen_der
+    >>> X = 0.1 * np.arange(9)
+    >>> rosen_der(X)
+    array([ -2. ,  10.6,  15.6,  13.4,   6.4,  -3. , -12.4, -19.4,  62. ])
+
+    """
+    xp = array_namespace(x)
+    x = xp.asarray(x)
+    if xp.isdtype(x.dtype, 'integral'):
+        x = xp.astype(x, xp.asarray(1.).dtype)
+    xm = x[1:-1]
+    xm_m1 = x[:-2]
+    xm_p1 = x[2:]
+    der = xp.zeros_like(x)
+    der[1:-1] = (200 * (xm - xm_m1**2) -
+                 400 * (xm_p1 - xm**2) * xm - 2 * (1 - xm))
+    der[0] = -400 * x[0] * (x[1] - x[0]**2) - 2 * (1 - x[0])
+    der[-1] = 200 * (x[-1] - x[-2]**2)
+    return der
+
+
+def rosen_hess(x):
+    """
+    The Hessian matrix of the Rosenbrock function.
+
+    Parameters
+    ----------
+    x : array_like
+        1-D array of points at which the Hessian matrix is to be computed.
+
+    Returns
+    -------
+    rosen_hess : ndarray
+        The Hessian matrix of the Rosenbrock function at `x`.
+
+    See Also
+    --------
+    rosen, rosen_der, rosen_hess_prod
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import rosen_hess
+    >>> X = 0.1 * np.arange(4)
+    >>> rosen_hess(X)
+    array([[-38.,   0.,   0.,   0.],
+           [  0., 134., -40.,   0.],
+           [  0., -40., 130., -80.],
+           [  0.,   0., -80., 200.]])
+
+    """
+    xp = array_namespace(x)
+    x = xpx.atleast_nd(x, ndim=1, xp=xp)
+    if xp.isdtype(x.dtype, 'integral'):
+        x = xp.astype(x, xp.asarray(1.).dtype)
+    H = (xpx.create_diagonal(-400 * x[:-1], offset=1, xp=xp) 
+         - xpx.create_diagonal(400 * x[:-1], offset=-1, xp=xp))
+    diagonal = xp.zeros(x.shape[0], dtype=x.dtype)
+    diagonal[0] = 1200 * x[0]**2 - 400 * x[1] + 2
+    diagonal[-1] = 200
+    diagonal[1:-1] = 202 + 1200 * x[1:-1]**2 - 400 * x[2:]
+    return H + xpx.create_diagonal(diagonal, xp=xp)
+
+
+def rosen_hess_prod(x, p):
+    """
+    Product of the Hessian matrix of the Rosenbrock function with a vector.
+
+    Parameters
+    ----------
+    x : array_like
+        1-D array of points at which the Hessian matrix is to be computed.
+    p : array_like
+        1-D array, the vector to be multiplied by the Hessian matrix.
+
+    Returns
+    -------
+    rosen_hess_prod : ndarray
+        The Hessian matrix of the Rosenbrock function at `x` multiplied
+        by the vector `p`.
+
+    See Also
+    --------
+    rosen, rosen_der, rosen_hess
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import rosen_hess_prod
+    >>> X = 0.1 * np.arange(9)
+    >>> p = 0.5 * np.arange(9)
+    >>> rosen_hess_prod(X, p)
+    array([  -0.,   27.,  -10.,  -95., -192., -265., -278., -195., -180.])
+
+    """
+    xp = array_namespace(x, p)
+    x = xpx.atleast_nd(x, ndim=1, xp=xp)
+    if xp.isdtype(x.dtype, 'integral'):
+        x = xp.astype(x, xp.asarray(1.).dtype)
+    p = xp.asarray(p, dtype=x.dtype)
+    Hp = xp.zeros(x.shape[0], dtype=x.dtype)
+    Hp[0] = (1200 * x[0]**2 - 400 * x[1] + 2) * p[0] - 400 * x[0] * p[1]
+    Hp[1:-1] = (-400 * x[:-2] * p[:-2] +
+                (202 + 1200 * x[1:-1]**2 - 400 * x[2:]) * p[1:-1] -
+                400 * x[1:-1] * p[2:])
+    Hp[-1] = -400 * x[-2] * p[-2] + 200*p[-1]
+    return Hp
+
+
+def _wrap_scalar_function(function, args):
+    # wraps a minimizer function to count number of evaluations
+    # and to easily provide an args kwd.
+    ncalls = [0]
+    if function is None:
+        return ncalls, None
+
+    def function_wrapper(x, *wrapper_args):
+        ncalls[0] += 1
+        # A copy of x is sent to the user function (gh13740)
+        fx = function(np.copy(x), *(wrapper_args + args))
+        # Ideally, we'd like to a have a true scalar returned from f(x). For
+        # backwards-compatibility, also allow np.array([1.3]), np.array([[1.3]]) etc.
+        if not np.isscalar(fx):
+            try:
+                fx = np.asarray(fx).item()
+            except (TypeError, ValueError) as e:
+                raise ValueError("The user-provided objective function "
+                                 "must return a scalar value.") from e
+        return fx
+
+    return ncalls, function_wrapper
+
+
+class _MaxFuncCallError(RuntimeError):
+    pass
+
+
+def _wrap_scalar_function_maxfun_validation(function, args, maxfun):
+    # wraps a minimizer function to count number of evaluations
+    # and to easily provide an args kwd.
+    ncalls = [0]
+    if function is None:
+        return ncalls, None
+
+    def function_wrapper(x, *wrapper_args):
+        if ncalls[0] >= maxfun:
+            raise _MaxFuncCallError("Too many function calls")
+        ncalls[0] += 1
+        # A copy of x is sent to the user function (gh13740)
+        fx = function(np.copy(x), *(wrapper_args + args))
+        # Ideally, we'd like to a have a true scalar returned from f(x). For
+        # backwards-compatibility, also allow np.array([1.3]),
+        # np.array([[1.3]]) etc.
+        if not np.isscalar(fx):
+            try:
+                fx = np.asarray(fx).item()
+            except (TypeError, ValueError) as e:
+                raise ValueError("The user-provided objective function "
+                                 "must return a scalar value.") from e
+        return fx
+
+    return ncalls, function_wrapper
+
+
+def fmin(func, x0, args=(), xtol=1e-4, ftol=1e-4, maxiter=None, maxfun=None,
+         full_output=0, disp=1, retall=0, callback=None, initial_simplex=None):
+    """
+    Minimize a function using the downhill simplex algorithm.
+
+    This algorithm only uses function values, not derivatives or second
+    derivatives.
+
+    Parameters
+    ----------
+    func : callable func(x,*args)
+        The objective function to be minimized.
+    x0 : ndarray
+        Initial guess.
+    args : tuple, optional
+        Extra arguments passed to func, i.e., ``f(x,*args)``.
+    xtol : float, optional
+        Absolute error in xopt between iterations that is acceptable for
+        convergence.
+    ftol : number, optional
+        Absolute error in func(xopt) between iterations that is acceptable for
+        convergence.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+    maxfun : number, optional
+        Maximum number of function evaluations to make.
+    full_output : bool, optional
+        Set to True if fopt and warnflag outputs are desired.
+    disp : bool, optional
+        Set to True to print convergence messages.
+    retall : bool, optional
+        Set to True to return list of solutions at each iteration.
+    callback : callable, optional
+        Called after each iteration, as callback(xk), where xk is the
+        current parameter vector.
+    initial_simplex : array_like of shape (N + 1, N), optional
+        Initial simplex. If given, overrides `x0`.
+        ``initial_simplex[j,:]`` should contain the coordinates of
+        the jth vertex of the ``N+1`` vertices in the simplex, where
+        ``N`` is the dimension.
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameter that minimizes function.
+    fopt : float
+        Value of function at minimum: ``fopt = func(xopt)``.
+    iter : int
+        Number of iterations performed.
+    funcalls : int
+        Number of function calls made.
+    warnflag : int
+        1 : Maximum number of function evaluations made.
+        2 : Maximum number of iterations reached.
+    allvecs : list
+        Solution at each iteration.
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'Nelder-Mead' `method` in particular.
+
+    Notes
+    -----
+    Uses a Nelder-Mead simplex algorithm to find the minimum of function of
+    one or more variables.
+
+    This algorithm has a long history of successful use in applications.
+    But it will usually be slower than an algorithm that uses first or
+    second derivative information. In practice, it can have poor
+    performance in high-dimensional problems and is not robust to
+    minimizing complicated functions. Additionally, there currently is no
+    complete theory describing when the algorithm will successfully
+    converge to the minimum, or how fast it will if it does. Both the ftol and
+    xtol criteria must be met for convergence.
+
+    Examples
+    --------
+    >>> def f(x):
+    ...     return x**2
+
+    >>> from scipy import optimize
+
+    >>> minimum = optimize.fmin(f, 1)
+    Optimization terminated successfully.
+             Current function value: 0.000000
+             Iterations: 17
+             Function evaluations: 34
+    >>> minimum[0]
+    -8.8817841970012523e-16
+
+    References
+    ----------
+    .. [1] Nelder, J.A. and Mead, R. (1965), "A simplex method for function
+           minimization", The Computer Journal, 7, pp. 308-313
+
+    .. [2] Wright, M.H. (1996), "Direct Search Methods: Once Scorned, Now
+           Respectable", in Numerical Analysis 1995, Proceedings of the
+           1995 Dundee Biennial Conference in Numerical Analysis, D.F.
+           Griffiths and G.A. Watson (Eds.), Addison Wesley Longman,
+           Harlow, UK, pp. 191-208.
+
+    """
+    opts = {'xatol': xtol,
+            'fatol': ftol,
+            'maxiter': maxiter,
+            'maxfev': maxfun,
+            'disp': disp,
+            'return_all': retall,
+            'initial_simplex': initial_simplex}
+
+    callback = _wrap_callback(callback)
+    res = _minimize_neldermead(func, x0, args, callback=callback, **opts)
+    if full_output:
+        retlist = res['x'], res['fun'], res['nit'], res['nfev'], res['status']
+        if retall:
+            retlist += (res['allvecs'], )
+        return retlist
+    else:
+        if retall:
+            return res['x'], res['allvecs']
+        else:
+            return res['x']
+
+
+def _minimize_neldermead(func, x0, args=(), callback=None,
+                         maxiter=None, maxfev=None, disp=False,
+                         return_all=False, initial_simplex=None,
+                         xatol=1e-4, fatol=1e-4, adaptive=False, bounds=None,
+                         **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using the
+    Nelder-Mead algorithm.
+
+    Options
+    -------
+    disp : bool
+        Set to True to print convergence messages.
+    maxiter, maxfev : int
+        Maximum allowed number of iterations and function evaluations.
+        Will default to ``N*200``, where ``N`` is the number of
+        variables, if neither `maxiter` or `maxfev` is set. If both
+        `maxiter` and `maxfev` are set, minimization will stop at the
+        first reached.
+    return_all : bool, optional
+        Set to True to return a list of the best solution at each of the
+        iterations.
+    initial_simplex : array_like of shape (N + 1, N)
+        Initial simplex. If given, overrides `x0`.
+        ``initial_simplex[j,:]`` should contain the coordinates of
+        the jth vertex of the ``N+1`` vertices in the simplex, where
+        ``N`` is the dimension.
+    xatol : float, optional
+        Absolute error in xopt between iterations that is acceptable for
+        convergence.
+    fatol : number, optional
+        Absolute error in func(xopt) between iterations that is acceptable for
+        convergence.
+    adaptive : bool, optional
+        Adapt algorithm parameters to dimensionality of problem. Useful for
+        high-dimensional minimization [1]_.
+    bounds : sequence or `Bounds`, optional
+        Bounds on variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. Sequence of ``(min, max)`` pairs for each element in `x`. None
+           is used to specify no bound.
+
+        Note that this just clips all vertices in simplex based on
+        the bounds.
+
+    References
+    ----------
+    .. [1] Gao, F. and Han, L.
+       Implementing the Nelder-Mead simplex algorithm with adaptive
+       parameters. 2012. Computational Optimization and Applications.
+       51:1, pp. 259-277
+
+    """
+    _check_unknown_options(unknown_options)
+    maxfun = maxfev
+    retall = return_all
+
+    x0 = np.atleast_1d(x0).flatten()
+    dtype = x0.dtype if np.issubdtype(x0.dtype, np.inexact) else np.float64
+    x0 = np.asarray(x0, dtype=dtype)
+
+    if adaptive:
+        dim = float(len(x0))
+        rho = 1
+        chi = 1 + 2/dim
+        psi = 0.75 - 1/(2*dim)
+        sigma = 1 - 1/dim
+    else:
+        rho = 1
+        chi = 2
+        psi = 0.5
+        sigma = 0.5
+
+    nonzdelt = 0.05
+    zdelt = 0.00025
+
+    if bounds is not None:
+        lower_bound, upper_bound = bounds.lb, bounds.ub
+        # check bounds
+        if (lower_bound > upper_bound).any():
+            raise ValueError("Nelder Mead - one of the lower bounds "
+                             "is greater than an upper bound.")
+        if np.any(lower_bound > x0) or np.any(x0 > upper_bound):
+            warnings.warn("Initial guess is not within the specified bounds",
+                          OptimizeWarning, stacklevel=3)
+
+    if bounds is not None:
+        x0 = np.clip(x0, lower_bound, upper_bound)
+
+    if initial_simplex is None:
+        N = len(x0)
+
+        sim = np.empty((N + 1, N), dtype=x0.dtype)
+        sim[0] = x0
+        for k in range(N):
+            y = np.array(x0, copy=True)
+            if y[k] != 0:
+                y[k] = (1 + nonzdelt)*y[k]
+            else:
+                y[k] = zdelt
+            sim[k + 1] = y
+    else:
+        sim = np.atleast_2d(initial_simplex).copy()
+        dtype = sim.dtype if np.issubdtype(sim.dtype, np.inexact) else np.float64
+        sim = np.asarray(sim, dtype=dtype)
+        if sim.ndim != 2 or sim.shape[0] != sim.shape[1] + 1:
+            raise ValueError("`initial_simplex` should be an array of shape (N+1,N)")
+        if len(x0) != sim.shape[1]:
+            raise ValueError("Size of `initial_simplex` is not consistent with `x0`")
+        N = sim.shape[1]
+
+    if retall:
+        allvecs = [sim[0]]
+
+    # If neither are set, then set both to default
+    if maxiter is None and maxfun is None:
+        maxiter = N * 200
+        maxfun = N * 200
+    elif maxiter is None:
+        # Convert remaining Nones, to np.inf, unless the other is np.inf, in
+        # which case use the default to avoid unbounded iteration
+        if maxfun == np.inf:
+            maxiter = N * 200
+        else:
+            maxiter = np.inf
+    elif maxfun is None:
+        if maxiter == np.inf:
+            maxfun = N * 200
+        else:
+            maxfun = np.inf
+
+    if bounds is not None:
+        # The default simplex construction may make all entries (for a given
+        # parameter) greater than an upper bound if x0 is very close to the
+        # upper bound. If one simply clips the simplex to the bounds this could
+        # make the simplex entries degenerate. If that occurs reflect into the
+        # interior.
+        msk = sim > upper_bound
+        # reflect into the interior
+        sim = np.where(msk, 2*upper_bound - sim, sim)
+        # but make sure the reflection is no less than the lower_bound
+        sim = np.clip(sim, lower_bound, upper_bound)
+
+    one2np1 = list(range(1, N + 1))
+    fsim = np.full((N + 1,), np.inf, dtype=float)
+
+    fcalls, func = _wrap_scalar_function_maxfun_validation(func, args, maxfun)
+
+    try:
+        for k in range(N + 1):
+            fsim[k] = func(sim[k])
+    except _MaxFuncCallError:
+        pass
+    finally:
+        ind = np.argsort(fsim)
+        sim = np.take(sim, ind, 0)
+        fsim = np.take(fsim, ind, 0)
+
+    ind = np.argsort(fsim)
+    fsim = np.take(fsim, ind, 0)
+    # sort so sim[0,:] has the lowest function value
+    sim = np.take(sim, ind, 0)
+
+    iterations = 1
+
+    while (fcalls[0] < maxfun and iterations < maxiter):
+        try:
+            if (np.max(np.ravel(np.abs(sim[1:] - sim[0]))) <= xatol and
+                    np.max(np.abs(fsim[0] - fsim[1:])) <= fatol):
+                break
+
+            xbar = np.add.reduce(sim[:-1], 0) / N
+            xr = (1 + rho) * xbar - rho * sim[-1]
+            if bounds is not None:
+                xr = np.clip(xr, lower_bound, upper_bound)
+            fxr = func(xr)
+            doshrink = 0
+
+            if fxr < fsim[0]:
+                xe = (1 + rho * chi) * xbar - rho * chi * sim[-1]
+                if bounds is not None:
+                    xe = np.clip(xe, lower_bound, upper_bound)
+                fxe = func(xe)
+
+                if fxe < fxr:
+                    sim[-1] = xe
+                    fsim[-1] = fxe
+                else:
+                    sim[-1] = xr
+                    fsim[-1] = fxr
+            else:  # fsim[0] <= fxr
+                if fxr < fsim[-2]:
+                    sim[-1] = xr
+                    fsim[-1] = fxr
+                else:  # fxr >= fsim[-2]
+                    # Perform contraction
+                    if fxr < fsim[-1]:
+                        xc = (1 + psi * rho) * xbar - psi * rho * sim[-1]
+                        if bounds is not None:
+                            xc = np.clip(xc, lower_bound, upper_bound)
+                        fxc = func(xc)
+
+                        if fxc <= fxr:
+                            sim[-1] = xc
+                            fsim[-1] = fxc
+                        else:
+                            doshrink = 1
+                    else:
+                        # Perform an inside contraction
+                        xcc = (1 - psi) * xbar + psi * sim[-1]
+                        if bounds is not None:
+                            xcc = np.clip(xcc, lower_bound, upper_bound)
+                        fxcc = func(xcc)
+
+                        if fxcc < fsim[-1]:
+                            sim[-1] = xcc
+                            fsim[-1] = fxcc
+                        else:
+                            doshrink = 1
+
+                    if doshrink:
+                        for j in one2np1:
+                            sim[j] = sim[0] + sigma * (sim[j] - sim[0])
+                            if bounds is not None:
+                                sim[j] = np.clip(
+                                    sim[j], lower_bound, upper_bound)
+                            fsim[j] = func(sim[j])
+            iterations += 1
+        except _MaxFuncCallError:
+            pass
+        finally:
+            ind = np.argsort(fsim)
+            sim = np.take(sim, ind, 0)
+            fsim = np.take(fsim, ind, 0)
+            if retall:
+                allvecs.append(sim[0])
+            intermediate_result = OptimizeResult(x=sim[0], fun=fsim[0])
+            if _call_callback_maybe_halt(callback, intermediate_result):
+                break
+
+    x = sim[0]
+    fval = np.min(fsim)
+    warnflag = 0
+
+    if fcalls[0] >= maxfun:
+        warnflag = 1
+        msg = _status_message['maxfev']
+        if disp:
+            warnings.warn(msg, RuntimeWarning, stacklevel=3)
+    elif iterations >= maxiter:
+        warnflag = 2
+        msg = _status_message['maxiter']
+        if disp:
+            warnings.warn(msg, RuntimeWarning, stacklevel=3)
+    else:
+        msg = _status_message['success']
+        if disp:
+            print(msg)
+            print(f"         Current function value: {fval:f}")
+            print("         Iterations: %d" % iterations)
+            print("         Function evaluations: %d" % fcalls[0])
+
+    result = OptimizeResult(fun=fval, nit=iterations, nfev=fcalls[0],
+                            status=warnflag, success=(warnflag == 0),
+                            message=msg, x=x, final_simplex=(sim, fsim))
+    if retall:
+        result['allvecs'] = allvecs
+    return result
+
+
+def approx_fprime(xk, f, epsilon=_epsilon, *args):
+    """Finite difference approximation of the derivatives of a
+    scalar or vector-valued function.
+
+    If a function maps from :math:`R^n` to :math:`R^m`, its derivatives form
+    an m-by-n matrix
+    called the Jacobian, where an element :math:`(i, j)` is a partial
+    derivative of f[i] with respect to ``xk[j]``.
+
+    Parameters
+    ----------
+    xk : array_like
+        The coordinate vector at which to determine the gradient of `f`.
+    f : callable
+        Function of which to estimate the derivatives of. Has the signature
+        ``f(xk, *args)`` where `xk` is the argument in the form of a 1-D array
+        and `args` is a tuple of any additional fixed parameters needed to
+        completely specify the function. The argument `xk` passed to this
+        function is an ndarray of shape (n,) (never a scalar even if n=1).
+        It must return a 1-D array_like of shape (m,) or a scalar.
+
+        Suppose the callable has signature ``f0(x, *my_args, **my_kwargs)``, where
+        ``my_args`` and ``my_kwargs`` are required positional and keyword arguments.
+        Rather than passing ``f0`` as the callable, wrap it to accept
+        only ``x``; e.g., pass ``fun=lambda x: f0(x, *my_args, **my_kwargs)`` as the
+        callable, where ``my_args`` (tuple) and ``my_kwargs`` (dict) have been
+        gathered before invoking this function.
+
+        .. versionchanged:: 1.9.0
+            `f` is now able to return a 1-D array-like, with the :math:`(m, n)`
+            Jacobian being estimated.
+
+    epsilon : {float, array_like}, optional
+        Increment to `xk` to use for determining the function gradient.
+        If a scalar, uses the same finite difference delta for all partial
+        derivatives. If an array, should contain one value per element of
+        `xk`. Defaults to ``sqrt(np.finfo(float).eps)``, which is approximately
+        1.49e-08.
+    \\*args : args, optional
+        Any other arguments that are to be passed to `f`.
+
+    Returns
+    -------
+    jac : ndarray
+        The partial derivatives of `f` to `xk`.
+
+    See Also
+    --------
+    check_grad : Check correctness of gradient function against approx_fprime.
+
+    Notes
+    -----
+    The function gradient is determined by the forward finite difference
+    formula::
+
+                 f(xk[i] + epsilon[i]) - f(xk[i])
+        f'[i] = ---------------------------------
+                            epsilon[i]
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import optimize
+    >>> def func(x, c0, c1):
+    ...     "Coordinate vector `x` should be an array of size two."
+    ...     return c0 * x[0]**2 + c1*x[1]**2
+
+    >>> x = np.ones(2)
+    >>> c0, c1 = (1, 200)
+    >>> eps = np.sqrt(np.finfo(float).eps)
+    >>> optimize.approx_fprime(x, func, [eps, np.sqrt(200) * eps], c0, c1)
+    array([   2.        ,  400.00004208])
+
+    """
+    xk = np.asarray(xk, float)
+    f0 = f(xk, *args)
+
+    return approx_derivative(f, xk, method='2-point', abs_step=epsilon,
+                             args=args, f0=f0)
+
+
+@_transition_to_rng("seed", position_num=6)
+def check_grad(func, grad, x0, *args, epsilon=_epsilon,
+                direction='all', rng=None):
+    r"""Check the correctness of a gradient function by comparing it against a
+    (forward) finite-difference approximation of the gradient.
+
+    Parameters
+    ----------
+    func : callable ``func(x0, *args)``
+        Function whose derivative is to be checked.
+    grad : callable ``grad(x0, *args)``
+        Jacobian of `func`.
+    x0 : ndarray
+        Points to check `grad` against forward difference approximation of grad
+        using `func`.
+    args : \\*args, optional
+        Extra arguments passed to `func` and `grad`.
+    epsilon : float, optional
+        Step size used for the finite difference approximation. It defaults to
+        ``sqrt(np.finfo(float).eps)``, which is approximately 1.49e-08.
+    direction : str, optional
+        If set to ``'random'``, then gradients along a random vector
+        are used to check `grad` against forward difference approximation
+        using `func`. By default it is ``'all'``, in which case, all
+        the one hot direction vectors are considered to check `grad`.
+        If `func` is a vector valued function then only ``'all'`` can be used.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+        The random numbers generated affect the random vector along which gradients
+        are computed to check ``grad``. Note that `rng` is only used when `direction`
+        argument is set to `'random'`.
+
+    Returns
+    -------
+    err : float
+        The square root of the sum of squares (i.e., the 2-norm) of the
+        difference between ``grad(x0, *args)`` and the finite difference
+        approximation of `grad` using func at the points `x0`.
+
+    See Also
+    --------
+    approx_fprime
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> def func(x):
+    ...     return x[0]**2 - 0.5 * x[1]**3
+    >>> def grad(x):
+    ...     return [2 * x[0], -1.5 * x[1]**2]
+    >>> from scipy.optimize import check_grad
+    >>> check_grad(func, grad, [1.5, -1.5])
+    2.9802322387695312e-08  # may vary
+    >>> rng = np.random.default_rng()
+    >>> check_grad(func, grad, [1.5, -1.5],
+    ...             direction='random', seed=rng)
+    2.9802322387695312e-08
+
+    """
+    step = epsilon
+    x0 = np.asarray(x0)
+
+    def g(w, func, x0, v, *args):
+        return func(x0 + w*v, *args)
+
+    if direction == 'random':
+        _grad = np.asanyarray(grad(x0, *args))
+        if _grad.ndim > 1:
+            raise ValueError("'random' can only be used with scalar valued"
+                             " func")
+        rng_gen = check_random_state(rng)
+        v = rng_gen.standard_normal(size=(x0.shape))
+        _args = (func, x0, v) + args
+        _func = g
+        vars = np.zeros((1,))
+        analytical_grad = np.dot(_grad, v)
+    elif direction == 'all':
+        _args = args
+        _func = func
+        vars = x0
+        analytical_grad = grad(x0, *args)
+    else:
+        raise ValueError(f"{direction} is not a valid string for "
+                         "``direction`` argument")
+
+    return np.sqrt(np.sum(np.abs(
+        (analytical_grad - approx_fprime(vars, _func, step, *_args))**2
+    )))
+
+
+def approx_fhess_p(x0, p, fprime, epsilon, *args):
+    # calculate fprime(x0) first, as this may be cached by ScalarFunction
+    f1 = fprime(*((x0,) + args))
+    f2 = fprime(*((x0 + epsilon*p,) + args))
+    return (f2 - f1) / epsilon
+
+
+class _LineSearchError(RuntimeError):
+    pass
+
+
+def _line_search_wolfe12(f, fprime, xk, pk, gfk, old_fval, old_old_fval,
+                         **kwargs):
+    """
+    Same as line_search_wolfe1, but fall back to line_search_wolfe2 if
+    suitable step length is not found, and raise an exception if a
+    suitable step length is not found.
+
+    Raises
+    ------
+    _LineSearchError
+        If no suitable step size is found
+
+    """
+
+    extra_condition = kwargs.pop('extra_condition', None)
+
+    ret = line_search_wolfe1(f, fprime, xk, pk, gfk,
+                             old_fval, old_old_fval,
+                             **kwargs)
+
+    if ret[0] is not None and extra_condition is not None:
+        xp1 = xk + ret[0] * pk
+        if not extra_condition(ret[0], xp1, ret[3], ret[5]):
+            # Reject step if extra_condition fails
+            ret = (None,)
+
+    if ret[0] is None:
+        # line search failed: try different one.
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore', LineSearchWarning)
+            kwargs2 = {}
+            for key in ('c1', 'c2', 'amax'):
+                if key in kwargs:
+                    kwargs2[key] = kwargs[key]
+            ret = line_search_wolfe2(f, fprime, xk, pk, gfk,
+                                     old_fval, old_old_fval,
+                                     extra_condition=extra_condition,
+                                     **kwargs2)
+
+    if ret[0] is None:
+        raise _LineSearchError()
+
+    return ret
+
+
+def fmin_bfgs(f, x0, fprime=None, args=(), gtol=1e-5, norm=np.inf,
+              epsilon=_epsilon, maxiter=None, full_output=0, disp=1,
+              retall=0, callback=None, xrtol=0, c1=1e-4, c2=0.9,
+              hess_inv0=None):
+    """
+    Minimize a function using the BFGS algorithm.
+
+    Parameters
+    ----------
+    f : callable ``f(x,*args)``
+        Objective function to be minimized.
+    x0 : ndarray
+        Initial guess, shape (n,)
+    fprime : callable ``f'(x,*args)``, optional
+        Gradient of f.
+    args : tuple, optional
+        Extra arguments passed to f and fprime.
+    gtol : float, optional
+        Terminate successfully if gradient norm is less than `gtol`
+    norm : float, optional
+        Order of norm (Inf is max, -Inf is min)
+    epsilon : int or ndarray, optional
+        If `fprime` is approximated, use this value for the step size.
+    callback : callable, optional
+        An optional user-supplied function to call after each
+        iteration. Called as ``callback(xk)``, where ``xk`` is the
+        current parameter vector.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+    full_output : bool, optional
+        If True, return ``fopt``, ``func_calls``, ``grad_calls``, and
+        ``warnflag`` in addition to ``xopt``.
+    disp : bool, optional
+        Print convergence message if True.
+    retall : bool, optional
+        Return a list of results at each iteration if True.
+    xrtol : float, default: 0
+        Relative tolerance for `x`. Terminate successfully if step
+        size is less than ``xk * xrtol`` where ``xk`` is the current
+        parameter vector.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.9
+        Parameter for curvature condition rule.
+    hess_inv0 : None or ndarray, optional``
+        Initial inverse hessian estimate, shape (n, n). If None (default) then
+        the identity matrix is used.
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameters which minimize f, i.e., ``f(xopt) == fopt``.
+    fopt : float
+        Minimum value.
+    gopt : ndarray
+        Value of gradient at minimum, f'(xopt), which should be near 0.
+    Bopt : ndarray
+        Value of 1/f''(xopt), i.e., the inverse Hessian matrix.
+    func_calls : int
+        Number of function_calls made.
+    grad_calls : int
+        Number of gradient calls made.
+    warnflag : integer
+        1 : Maximum number of iterations exceeded.
+        2 : Gradient and/or function calls not changing.
+        3 : NaN result encountered.
+    allvecs : list
+        The value of `xopt` at each iteration. Only returned if `retall` is
+        True.
+
+    Notes
+    -----
+    Optimize the function, `f`, whose gradient is given by `fprime`
+    using the quasi-Newton method of Broyden, Fletcher, Goldfarb,
+    and Shanno (BFGS).
+
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+
+    See Also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See ``method='BFGS'`` in particular.
+
+    References
+    ----------
+    Wright, and Nocedal 'Numerical Optimization', 1999, p. 198.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import fmin_bfgs
+    >>> def quadratic_cost(x, Q):
+    ...     return x @ Q @ x
+    ...
+    >>> x0 = np.array([-3, -4])
+    >>> cost_weight =  np.diag([1., 10.])
+    >>> # Note that a trailing comma is necessary for a tuple with single element
+    >>> fmin_bfgs(quadratic_cost, x0, args=(cost_weight,))
+    Optimization terminated successfully.
+            Current function value: 0.000000
+            Iterations: 7                   # may vary
+            Function evaluations: 24        # may vary
+            Gradient evaluations: 8         # may vary
+    array([ 2.85169950e-06, -4.61820139e-07])
+
+    >>> def quadratic_cost_grad(x, Q):
+    ...     return 2 * Q @ x
+    ...
+    >>> fmin_bfgs(quadratic_cost, x0, quadratic_cost_grad, args=(cost_weight,))
+    Optimization terminated successfully.
+            Current function value: 0.000000
+            Iterations: 7
+            Function evaluations: 8
+            Gradient evaluations: 8
+    array([ 2.85916637e-06, -4.54371951e-07])
+
+    """
+    opts = {'gtol': gtol,
+            'norm': norm,
+            'eps': epsilon,
+            'disp': disp,
+            'maxiter': maxiter,
+            'return_all': retall,
+            'xrtol': xrtol,
+            'c1': c1,
+            'c2': c2,
+            'hess_inv0': hess_inv0}
+
+    callback = _wrap_callback(callback)
+    res = _minimize_bfgs(f, x0, args, fprime, callback=callback, **opts)
+
+    if full_output:
+        retlist = (res['x'], res['fun'], res['jac'], res['hess_inv'],
+                   res['nfev'], res['njev'], res['status'])
+        if retall:
+            retlist += (res['allvecs'], )
+        return retlist
+    else:
+        if retall:
+            return res['x'], res['allvecs']
+        else:
+            return res['x']
+
+
+def _minimize_bfgs(fun, x0, args=(), jac=None, callback=None,
+                   gtol=1e-5, norm=np.inf, eps=_epsilon, maxiter=None,
+                   disp=False, return_all=False, finite_diff_rel_step=None,
+                   xrtol=0, c1=1e-4, c2=0.9,
+                   hess_inv0=None, **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using the
+    BFGS algorithm.
+
+    Options
+    -------
+    disp : bool
+        Set to True to print convergence messages.
+    maxiter : int
+        Maximum number of iterations to perform.
+    gtol : float
+        Terminate successfully if gradient norm is less than `gtol`.
+    norm : float
+        Order of norm (Inf is max, -Inf is min).
+    eps : float or ndarray
+        If `jac is None` the absolute step size used for numerical
+        approximation of the jacobian via forward differences.
+    return_all : bool, optional
+        Set to True to return a list of the best solution at each of the
+        iterations.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of the jacobian. The absolute step
+        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
+        possibly adjusted to fit into the bounds. For ``jac='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+    xrtol : float, default: 0
+        Relative tolerance for `x`. Terminate successfully if step size is
+        less than ``xk * xrtol`` where ``xk`` is the current parameter vector.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.9
+        Parameter for curvature condition rule.
+    hess_inv0 : None or ndarray, optional
+        Initial inverse hessian estimate, shape (n, n). If None (default) then
+        the identity matrix is used.
+
+    Notes
+    -----
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+
+    If minimization doesn't complete successfully, with an error message of
+    ``Desired error not necessarily achieved due to precision loss``, then
+    consider setting `gtol` to a higher value. This precision loss typically
+    occurs when the (finite difference) numerical differentiation cannot provide
+    sufficient precision to satisfy the `gtol` termination criterion.
+    This can happen when working in single precision and a callable jac is not
+    provided. For single precision problems a `gtol` of 1e-3 seems to work.
+    """
+    _check_unknown_options(unknown_options)
+    _check_positive_definite(hess_inv0)
+    retall = return_all
+
+    x0 = asarray(x0).flatten()
+    if x0.ndim == 0:
+        x0.shape = (1,)
+    if maxiter is None:
+        maxiter = len(x0) * 200
+
+    sf = _prepare_scalar_function(fun, x0, jac, args=args, epsilon=eps,
+                                  finite_diff_rel_step=finite_diff_rel_step)
+
+    f = sf.fun
+    myfprime = sf.grad
+
+    old_fval = f(x0)
+    gfk = myfprime(x0)
+
+    k = 0
+    N = len(x0)
+    I = np.eye(N, dtype=int)
+    Hk = I if hess_inv0 is None else hess_inv0
+
+    # Sets the initial step guess to dx ~ 1
+    old_old_fval = old_fval + np.linalg.norm(gfk) / 2
+
+    xk = x0
+    if retall:
+        allvecs = [x0]
+    warnflag = 0
+    gnorm = vecnorm(gfk, ord=norm)
+    while (gnorm > gtol) and (k < maxiter):
+        pk = -np.dot(Hk, gfk)
+        try:
+            alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \
+                     _line_search_wolfe12(f, myfprime, xk, pk, gfk,
+                                          old_fval, old_old_fval, amin=1e-100,
+                                          amax=1e100, c1=c1, c2=c2)
+        except _LineSearchError:
+            # Line search failed to find a better solution.
+            warnflag = 2
+            break
+
+        sk = alpha_k * pk
+        xkp1 = xk + sk
+
+        if retall:
+            allvecs.append(xkp1)
+        xk = xkp1
+        if gfkp1 is None:
+            gfkp1 = myfprime(xkp1)
+
+        yk = gfkp1 - gfk
+        gfk = gfkp1
+        k += 1
+        intermediate_result = OptimizeResult(x=xk, fun=old_fval)
+        if _call_callback_maybe_halt(callback, intermediate_result):
+            break
+        gnorm = vecnorm(gfk, ord=norm)
+        if (gnorm <= gtol):
+            break
+
+        #  See Chapter 5 in  P.E. Frandsen, K. Jonasson, H.B. Nielsen,
+        #  O. Tingleff: "Unconstrained Optimization", IMM, DTU.  1999.
+        #  These notes are available here:
+        #  http://www2.imm.dtu.dk/documents/ftp/publlec.html
+        if (alpha_k*vecnorm(pk) <= xrtol*(xrtol + vecnorm(xk))):
+            break
+
+        if not np.isfinite(old_fval):
+            # We correctly found +-Inf as optimal value, or something went
+            # wrong.
+            warnflag = 2
+            break
+
+        rhok_inv = np.dot(yk, sk)
+        # this was handled in numeric, let it remains for more safety
+        # Cryptic comment above is preserved for posterity. Future reader:
+        # consider change to condition below proposed in gh-1261/gh-17345.
+        if rhok_inv == 0.:
+            rhok = 1000.0
+            if disp:
+                msg = "Divide-by-zero encountered: rhok assumed large"
+                _print_success_message_or_warn(True, msg)
+        else:
+            rhok = 1. / rhok_inv
+
+        A1 = I - sk[:, np.newaxis] * yk[np.newaxis, :] * rhok
+        A2 = I - yk[:, np.newaxis] * sk[np.newaxis, :] * rhok
+        Hk = np.dot(A1, np.dot(Hk, A2)) + (rhok * sk[:, np.newaxis] *
+                                                 sk[np.newaxis, :])
+
+    fval = old_fval
+
+    if warnflag == 2:
+        msg = _status_message['pr_loss']
+    elif k >= maxiter:
+        warnflag = 1
+        msg = _status_message['maxiter']
+    elif np.isnan(gnorm) or np.isnan(fval) or np.isnan(xk).any():
+        warnflag = 3
+        msg = _status_message['nan']
+    else:
+        msg = _status_message['success']
+
+    if disp:
+        _print_success_message_or_warn(warnflag, msg)
+        print(f"         Current function value: {fval:f}")
+        print("         Iterations: %d" % k)
+        print("         Function evaluations: %d" % sf.nfev)
+        print("         Gradient evaluations: %d" % sf.ngev)
+
+    result = OptimizeResult(fun=fval, jac=gfk, hess_inv=Hk, nfev=sf.nfev,
+                            njev=sf.ngev, status=warnflag,
+                            success=(warnflag == 0), message=msg, x=xk,
+                            nit=k)
+    if retall:
+        result['allvecs'] = allvecs
+    return result
+
+
+def _print_success_message_or_warn(warnflag, message, warntype=None):
+    if not warnflag:
+        print(message)
+    else:
+        warnings.warn(message, warntype or OptimizeWarning, stacklevel=3)
+
+
+def fmin_cg(f, x0, fprime=None, args=(), gtol=1e-5, norm=np.inf,
+            epsilon=_epsilon, maxiter=None, full_output=0, disp=1, retall=0,
+            callback=None, c1=1e-4, c2=0.4):
+    """
+    Minimize a function using a nonlinear conjugate gradient algorithm.
+
+    Parameters
+    ----------
+    f : callable, ``f(x, *args)``
+        Objective function to be minimized. Here `x` must be a 1-D array of
+        the variables that are to be changed in the search for a minimum, and
+        `args` are the other (fixed) parameters of `f`.
+    x0 : ndarray
+        A user-supplied initial estimate of `xopt`, the optimal value of `x`.
+        It must be a 1-D array of values.
+    fprime : callable, ``fprime(x, *args)``, optional
+        A function that returns the gradient of `f` at `x`. Here `x` and `args`
+        are as described above for `f`. The returned value must be a 1-D array.
+        Defaults to None, in which case the gradient is approximated
+        numerically (see `epsilon`, below).
+    args : tuple, optional
+        Parameter values passed to `f` and `fprime`. Must be supplied whenever
+        additional fixed parameters are needed to completely specify the
+        functions `f` and `fprime`.
+    gtol : float, optional
+        Stop when the norm of the gradient is less than `gtol`.
+    norm : float, optional
+        Order to use for the norm of the gradient
+        (``-np.inf`` is min, ``np.inf`` is max).
+    epsilon : float or ndarray, optional
+        Step size(s) to use when `fprime` is approximated numerically. Can be a
+        scalar or a 1-D array. Defaults to ``sqrt(eps)``, with eps the
+        floating point machine precision.  Usually ``sqrt(eps)`` is about
+        1.5e-8.
+    maxiter : int, optional
+        Maximum number of iterations to perform. Default is ``200 * len(x0)``.
+    full_output : bool, optional
+        If True, return `fopt`, `func_calls`, `grad_calls`, and `warnflag` in
+        addition to `xopt`.  See the Returns section below for additional
+        information on optional return values.
+    disp : bool, optional
+        If True, return a convergence message, followed by `xopt`.
+    retall : bool, optional
+        If True, add to the returned values the results of each iteration.
+    callback : callable, optional
+        An optional user-supplied function, called after each iteration.
+        Called as ``callback(xk)``, where ``xk`` is the current value of `x0`.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.4
+        Parameter for curvature condition rule.
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameters which minimize f, i.e., ``f(xopt) == fopt``.
+    fopt : float, optional
+        Minimum value found, f(xopt). Only returned if `full_output` is True.
+    func_calls : int, optional
+        The number of function_calls made. Only returned if `full_output`
+        is True.
+    grad_calls : int, optional
+        The number of gradient calls made. Only returned if `full_output` is
+        True.
+    warnflag : int, optional
+        Integer value with warning status, only returned if `full_output` is
+        True.
+
+        0 : Success.
+
+        1 : The maximum number of iterations was exceeded.
+
+        2 : Gradient and/or function calls were not changing. May indicate
+            that precision was lost, i.e., the routine did not converge.
+
+        3 : NaN result encountered.
+
+    allvecs : list of ndarray, optional
+        List of arrays, containing the results at each iteration.
+        Only returned if `retall` is True.
+
+    See Also
+    --------
+    minimize : common interface to all `scipy.optimize` algorithms for
+               unconstrained and constrained minimization of multivariate
+               functions. It provides an alternative way to call
+               ``fmin_cg``, by specifying ``method='CG'``.
+
+    Notes
+    -----
+    This conjugate gradient algorithm is based on that of Polak and Ribiere
+    [1]_.
+
+    Conjugate gradient methods tend to work better when:
+
+    1. `f` has a unique global minimizing point, and no local minima or
+       other stationary points,
+    2. `f` is, at least locally, reasonably well approximated by a
+       quadratic function of the variables,
+    3. `f` is continuous and has a continuous gradient,
+    4. `fprime` is not too large, e.g., has a norm less than 1000,
+    5. The initial guess, `x0`, is reasonably close to `f` 's global
+       minimizing point, `xopt`.
+
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+
+    References
+    ----------
+    .. [1] Wright & Nocedal, "Numerical Optimization", 1999, pp. 120-122.
+
+    Examples
+    --------
+    Example 1: seek the minimum value of the expression
+    ``a*u**2 + b*u*v + c*v**2 + d*u + e*v + f`` for given values
+    of the parameters and an initial guess ``(u, v) = (0, 0)``.
+
+    >>> import numpy as np
+    >>> args = (2, 3, 7, 8, 9, 10)  # parameter values
+    >>> def f(x, *args):
+    ...     u, v = x
+    ...     a, b, c, d, e, f = args
+    ...     return a*u**2 + b*u*v + c*v**2 + d*u + e*v + f
+    >>> def gradf(x, *args):
+    ...     u, v = x
+    ...     a, b, c, d, e, f = args
+    ...     gu = 2*a*u + b*v + d     # u-component of the gradient
+    ...     gv = b*u + 2*c*v + e     # v-component of the gradient
+    ...     return np.asarray((gu, gv))
+    >>> x0 = np.asarray((0, 0))  # Initial guess.
+    >>> from scipy import optimize
+    >>> res1 = optimize.fmin_cg(f, x0, fprime=gradf, args=args)
+    Optimization terminated successfully.
+             Current function value: 1.617021
+             Iterations: 4
+             Function evaluations: 8
+             Gradient evaluations: 8
+    >>> res1
+    array([-1.80851064, -0.25531915])
+
+    Example 2: solve the same problem using the `minimize` function.
+    (This `myopts` dictionary shows all of the available options,
+    although in practice only non-default values would be needed.
+    The returned value will be a dictionary.)
+
+    >>> opts = {'maxiter' : None,    # default value.
+    ...         'disp' : True,    # non-default value.
+    ...         'gtol' : 1e-5,    # default value.
+    ...         'norm' : np.inf,  # default value.
+    ...         'eps' : 1.4901161193847656e-08}  # default value.
+    >>> res2 = optimize.minimize(f, x0, jac=gradf, args=args,
+    ...                          method='CG', options=opts)
+    Optimization terminated successfully.
+            Current function value: 1.617021
+            Iterations: 4
+            Function evaluations: 8
+            Gradient evaluations: 8
+    >>> res2.x  # minimum found
+    array([-1.80851064, -0.25531915])
+
+    """
+    opts = {'gtol': gtol,
+            'norm': norm,
+            'eps': epsilon,
+            'disp': disp,
+            'maxiter': maxiter,
+            'return_all': retall}
+
+    callback = _wrap_callback(callback)
+    res = _minimize_cg(f, x0, args, fprime, callback=callback, c1=c1, c2=c2,
+                       **opts)
+
+    if full_output:
+        retlist = res['x'], res['fun'], res['nfev'], res['njev'], res['status']
+        if retall:
+            retlist += (res['allvecs'], )
+        return retlist
+    else:
+        if retall:
+            return res['x'], res['allvecs']
+        else:
+            return res['x']
+
+
+def _minimize_cg(fun, x0, args=(), jac=None, callback=None,
+                 gtol=1e-5, norm=np.inf, eps=_epsilon, maxiter=None,
+                 disp=False, return_all=False, finite_diff_rel_step=None,
+                 c1=1e-4, c2=0.4, **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using the
+    conjugate gradient algorithm.
+
+    Options
+    -------
+    disp : bool
+        Set to True to print convergence messages.
+    maxiter : int
+        Maximum number of iterations to perform.
+    gtol : float
+        Gradient norm must be less than `gtol` before successful
+        termination.
+    norm : float
+        Order of norm (Inf is max, -Inf is min).
+    eps : float or ndarray
+        If `jac is None` the absolute step size used for numerical
+        approximation of the jacobian via forward differences.
+    return_all : bool, optional
+        Set to True to return a list of the best solution at each of the
+        iterations.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of the jacobian. The absolute step
+        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
+        possibly adjusted to fit into the bounds. For ``jac='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.4
+        Parameter for curvature condition rule.
+
+    Notes
+    -----
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+    """
+    _check_unknown_options(unknown_options)
+
+    retall = return_all
+
+    x0 = asarray(x0).flatten()
+    if maxiter is None:
+        maxiter = len(x0) * 200
+
+    sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
+                                  finite_diff_rel_step=finite_diff_rel_step)
+
+    f = sf.fun
+    myfprime = sf.grad
+
+    old_fval = f(x0)
+    gfk = myfprime(x0)
+
+    k = 0
+    xk = x0
+    # Sets the initial step guess to dx ~ 1
+    old_old_fval = old_fval + np.linalg.norm(gfk) / 2
+
+    if retall:
+        allvecs = [xk]
+    warnflag = 0
+    pk = -gfk
+    gnorm = vecnorm(gfk, ord=norm)
+
+    sigma_3 = 0.01
+
+    while (gnorm > gtol) and (k < maxiter):
+        deltak = np.dot(gfk, gfk)
+
+        cached_step = [None]
+
+        def polak_ribiere_powell_step(alpha, gfkp1=None):
+            xkp1 = xk + alpha * pk
+            if gfkp1 is None:
+                gfkp1 = myfprime(xkp1)
+            yk = gfkp1 - gfk
+            beta_k = max(0, np.dot(yk, gfkp1) / deltak)
+            pkp1 = -gfkp1 + beta_k * pk
+            gnorm = vecnorm(gfkp1, ord=norm)
+            return (alpha, xkp1, pkp1, gfkp1, gnorm)
+
+        def descent_condition(alpha, xkp1, fp1, gfkp1):
+            # Polak-Ribiere+ needs an explicit check of a sufficient
+            # descent condition, which is not guaranteed by strong Wolfe.
+            #
+            # See Gilbert & Nocedal, "Global convergence properties of
+            # conjugate gradient methods for optimization",
+            # SIAM J. Optimization 2, 21 (1992).
+            cached_step[:] = polak_ribiere_powell_step(alpha, gfkp1)
+            alpha, xk, pk, gfk, gnorm = cached_step
+
+            # Accept step if it leads to convergence.
+            if gnorm <= gtol:
+                return True
+
+            # Accept step if sufficient descent condition applies.
+            return np.dot(pk, gfk) <= -sigma_3 * np.dot(gfk, gfk)
+
+        try:
+            alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \
+                     _line_search_wolfe12(f, myfprime, xk, pk, gfk, old_fval,
+                                          old_old_fval, c1=c1, c2=c2, amin=1e-100,
+                                          amax=1e100, extra_condition=descent_condition)
+        except _LineSearchError:
+            # Line search failed to find a better solution.
+            warnflag = 2
+            break
+
+        # Reuse already computed results if possible
+        if alpha_k == cached_step[0]:
+            alpha_k, xk, pk, gfk, gnorm = cached_step
+        else:
+            alpha_k, xk, pk, gfk, gnorm = polak_ribiere_powell_step(alpha_k, gfkp1)
+
+        if retall:
+            allvecs.append(xk)
+        k += 1
+        intermediate_result = OptimizeResult(x=xk, fun=old_fval)
+        if _call_callback_maybe_halt(callback, intermediate_result):
+            break
+
+    fval = old_fval
+    if warnflag == 2:
+        msg = _status_message['pr_loss']
+    elif k >= maxiter:
+        warnflag = 1
+        msg = _status_message['maxiter']
+    elif np.isnan(gnorm) or np.isnan(fval) or np.isnan(xk).any():
+        warnflag = 3
+        msg = _status_message['nan']
+    else:
+        msg = _status_message['success']
+
+    if disp:
+        _print_success_message_or_warn(warnflag, msg)
+        print(f"         Current function value: {fval:f}")
+        print("         Iterations: %d" % k)
+        print("         Function evaluations: %d" % sf.nfev)
+        print("         Gradient evaluations: %d" % sf.ngev)
+
+    result = OptimizeResult(fun=fval, jac=gfk, nfev=sf.nfev,
+                            njev=sf.ngev, status=warnflag,
+                            success=(warnflag == 0), message=msg, x=xk,
+                            nit=k)
+    if retall:
+        result['allvecs'] = allvecs
+    return result
+
+
+def fmin_ncg(f, x0, fprime, fhess_p=None, fhess=None, args=(), avextol=1e-5,
+             epsilon=_epsilon, maxiter=None, full_output=0, disp=1, retall=0,
+             callback=None, c1=1e-4, c2=0.9):
+    """
+    Unconstrained minimization of a function using the Newton-CG method.
+
+    Parameters
+    ----------
+    f : callable ``f(x, *args)``
+        Objective function to be minimized.
+    x0 : ndarray
+        Initial guess.
+    fprime : callable ``f'(x, *args)``
+        Gradient of f.
+    fhess_p : callable ``fhess_p(x, p, *args)``, optional
+        Function which computes the Hessian of f times an
+        arbitrary vector, p.
+    fhess : callable ``fhess(x, *args)``, optional
+        Function to compute the Hessian matrix of f.
+    args : tuple, optional
+        Extra arguments passed to f, fprime, fhess_p, and fhess
+        (the same set of extra arguments is supplied to all of
+        these functions).
+    epsilon : float or ndarray, optional
+        If fhess is approximated, use this value for the step size.
+    callback : callable, optional
+        An optional user-supplied function which is called after
+        each iteration. Called as callback(xk), where xk is the
+        current parameter vector.
+    avextol : float, optional
+        Convergence is assumed when the average relative error in
+        the minimizer falls below this amount.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+    full_output : bool, optional
+        If True, return the optional outputs.
+    disp : bool, optional
+        If True, print convergence message.
+    retall : bool, optional
+        If True, return a list of results at each iteration.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.9
+        Parameter for curvature condition rule
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameters which minimize f, i.e., ``f(xopt) == fopt``.
+    fopt : float
+        Value of the function at xopt, i.e., ``fopt = f(xopt)``.
+    fcalls : int
+        Number of function calls made.
+    gcalls : int
+        Number of gradient calls made.
+    hcalls : int
+        Number of Hessian calls made.
+    warnflag : int
+        Warnings generated by the algorithm.
+        1 : Maximum number of iterations exceeded.
+        2 : Line search failure (precision loss).
+        3 : NaN result encountered.
+    allvecs : list
+        The result at each iteration, if retall is True (see below).
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'Newton-CG' `method` in particular.
+
+    Notes
+    -----
+    Only one of `fhess_p` or `fhess` need to be given.  If `fhess`
+    is provided, then `fhess_p` will be ignored. If neither `fhess`
+    nor `fhess_p` is provided, then the hessian product will be
+    approximated using finite differences on `fprime`. `fhess_p`
+    must compute the hessian times an arbitrary vector. If it is not
+    given, finite-differences on `fprime` are used to compute
+    it.
+
+    Newton-CG methods are also called truncated Newton methods. This
+    function differs from scipy.optimize.fmin_tnc because
+
+    1. scipy.optimize.fmin_ncg is written purely in Python using NumPy
+        and scipy while scipy.optimize.fmin_tnc calls a C function.
+    2. scipy.optimize.fmin_ncg is only for unconstrained minimization
+        while scipy.optimize.fmin_tnc is for unconstrained minimization
+        or box constrained minimization. (Box constraints give
+        lower and upper bounds for each variable separately.)
+
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+
+    References
+    ----------
+    Wright & Nocedal, 'Numerical Optimization', 1999, p. 140.
+
+    """
+    opts = {'xtol': avextol,
+            'eps': epsilon,
+            'maxiter': maxiter,
+            'disp': disp,
+            'return_all': retall}
+
+    callback = _wrap_callback(callback)
+    res = _minimize_newtoncg(f, x0, args, fprime, fhess, fhess_p,
+                             callback=callback, c1=c1, c2=c2, **opts)
+
+    if full_output:
+        retlist = (res['x'], res['fun'], res['nfev'], res['njev'],
+                   res['nhev'], res['status'])
+        if retall:
+            retlist += (res['allvecs'], )
+        return retlist
+    else:
+        if retall:
+            return res['x'], res['allvecs']
+        else:
+            return res['x']
+
+
+def _minimize_newtoncg(fun, x0, args=(), jac=None, hess=None, hessp=None,
+                       callback=None, xtol=1e-5, eps=_epsilon, maxiter=None,
+                       disp=False, return_all=False, c1=1e-4, c2=0.9,
+                       **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using the
+    Newton-CG algorithm.
+
+    Note that the `jac` parameter (Jacobian) is required.
+
+    Options
+    -------
+    disp : bool
+        Set to True to print convergence messages.
+    xtol : float
+        Average relative error in solution `xopt` acceptable for
+        convergence.
+    maxiter : int
+        Maximum number of iterations to perform.
+    eps : float or ndarray
+        If `hessp` is approximated, use this value for the step size.
+    return_all : bool, optional
+        Set to True to return a list of the best solution at each of the
+        iterations.
+    c1 : float, default: 1e-4
+        Parameter for Armijo condition rule.
+    c2 : float, default: 0.9
+        Parameter for curvature condition rule.
+
+    Notes
+    -----
+    Parameters `c1` and `c2` must satisfy ``0 < c1 < c2 < 1``.
+    """
+    _check_unknown_options(unknown_options)
+    if jac is None:
+        raise ValueError('Jacobian is required for Newton-CG method')
+    fhess_p = hessp
+    fhess = hess
+    avextol = xtol
+    epsilon = eps
+    retall = return_all
+
+    x0 = asarray(x0).flatten()
+    # TODO: add hessp (callable or FD) to ScalarFunction?
+    sf = _prepare_scalar_function(
+        fun, x0, jac, args=args, epsilon=eps, hess=hess
+    )
+    f = sf.fun
+    fprime = sf.grad
+    _h = sf.hess(x0)
+
+    # Logic for hess/hessp
+    # - If a callable(hess) is provided, then use that
+    # - If hess is a FD_METHOD, or the output from hess(x) is a LinearOperator
+    #   then create a hessp function using those.
+    # - If hess is None but you have callable(hessp) then use the hessp.
+    # - If hess and hessp are None then approximate hessp using the grad/jac.
+
+    if (hess in FD_METHODS or isinstance(_h, LinearOperator)):
+        fhess = None
+
+        def _hessp(x, p, *args):
+            return sf.hess(x).dot(p)
+
+        fhess_p = _hessp
+
+    def terminate(warnflag, msg):
+        if disp:
+            _print_success_message_or_warn(warnflag, msg)
+            print(f"         Current function value: {old_fval:f}")
+            print("         Iterations: %d" % k)
+            print("         Function evaluations: %d" % sf.nfev)
+            print("         Gradient evaluations: %d" % sf.ngev)
+            print("         Hessian evaluations: %d" % hcalls)
+        fval = old_fval
+        result = OptimizeResult(fun=fval, jac=gfk, nfev=sf.nfev,
+                                njev=sf.ngev, nhev=hcalls, status=warnflag,
+                                success=(warnflag == 0), message=msg, x=xk,
+                                nit=k)
+        if retall:
+            result['allvecs'] = allvecs
+        return result
+
+    hcalls = 0
+    if maxiter is None:
+        maxiter = len(x0)*200
+    cg_maxiter = 20*len(x0)
+
+    xtol = len(x0) * avextol
+    # Make sure we enter the while loop.
+    update_l1norm = np.finfo(float).max
+    xk = np.copy(x0)
+    if retall:
+        allvecs = [xk]
+    k = 0
+    gfk = None
+    old_fval = f(x0)
+    old_old_fval = None
+    float64eps = np.finfo(np.float64).eps
+    while update_l1norm > xtol:
+        if k >= maxiter:
+            msg = "Warning: " + _status_message['maxiter']
+            return terminate(1, msg)
+        # Compute a search direction pk by applying the CG method to
+        #  del2 f(xk) p = - grad f(xk) starting from 0.
+        b = -fprime(xk)
+        maggrad = np.linalg.norm(b, ord=1)
+        eta = min(0.5, math.sqrt(maggrad))
+        termcond = eta * maggrad
+        xsupi = zeros(len(x0), dtype=x0.dtype)
+        ri = -b
+        psupi = -ri
+        i = 0
+        dri0 = np.dot(ri, ri)
+
+        if fhess is not None:             # you want to compute hessian once.
+            A = sf.hess(xk)
+            hcalls += 1
+
+        for k2 in range(cg_maxiter):
+            if np.add.reduce(np.abs(ri)) <= termcond:
+                break
+            if fhess is None:
+                if fhess_p is None:
+                    Ap = approx_fhess_p(xk, psupi, fprime, epsilon)
+                else:
+                    Ap = fhess_p(xk, psupi, *args)
+                    hcalls += 1
+            else:
+                # hess was supplied as a callable or hessian update strategy, so
+                # A is a dense numpy array or sparse matrix
+                Ap = A.dot(psupi)
+            # check curvature
+            Ap = asarray(Ap).squeeze()  # get rid of matrices...
+            curv = np.dot(psupi, Ap)
+            if 0 <= curv <= 3 * float64eps:
+                break
+            elif curv < 0:
+                if (i > 0):
+                    break
+                else:
+                    # fall back to steepest descent direction
+                    xsupi = dri0 / (-curv) * b
+                    break
+            alphai = dri0 / curv
+            xsupi += alphai * psupi
+            ri += alphai * Ap
+            dri1 = np.dot(ri, ri)
+            betai = dri1 / dri0
+            psupi = -ri + betai * psupi
+            i += 1
+            dri0 = dri1          # update np.dot(ri,ri) for next time.
+        else:
+            # curvature keeps increasing, bail out
+            msg = ("Warning: CG iterations didn't converge. The Hessian is not "
+                   "positive definite.")
+            return terminate(3, msg)
+
+        pk = xsupi  # search direction is solution to system.
+        gfk = -b    # gradient at xk
+
+        try:
+            alphak, fc, gc, old_fval, old_old_fval, gfkp1 = \
+                     _line_search_wolfe12(f, fprime, xk, pk, gfk,
+                                          old_fval, old_old_fval, c1=c1, c2=c2)
+        except _LineSearchError:
+            # Line search failed to find a better solution.
+            msg = "Warning: " + _status_message['pr_loss']
+            return terminate(2, msg)
+
+        update = alphak * pk
+        xk += update        # upcast if necessary
+        if retall:
+            allvecs.append(xk)
+        k += 1
+        intermediate_result = OptimizeResult(x=xk, fun=old_fval)
+        if _call_callback_maybe_halt(callback, intermediate_result):
+            return terminate(5, "")
+        update_l1norm = np.linalg.norm(update, ord=1)
+
+    else:
+        if np.isnan(old_fval) or np.isnan(update_l1norm):
+            return terminate(3, _status_message['nan'])
+
+        msg = _status_message['success']
+        return terminate(0, msg)
+
+
+def fminbound(func, x1, x2, args=(), xtol=1e-5, maxfun=500,
+              full_output=0, disp=1):
+    """Bounded minimization for scalar functions.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Objective function to be minimized (must accept and return scalars).
+    x1, x2 : float or array scalar
+        Finite optimization bounds.
+    args : tuple, optional
+        Extra arguments passed to function.
+    xtol : float, optional
+        The convergence tolerance.
+    maxfun : int, optional
+        Maximum number of function evaluations allowed.
+    full_output : bool, optional
+        If True, return optional outputs.
+    disp: int, optional
+        If non-zero, print messages.
+
+        ``0`` : no message printing.
+
+        ``1`` : non-convergence notification messages only.
+
+        ``2`` : print a message on convergence too.
+
+        ``3`` : print iteration results.
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameters (over given interval) which minimize the
+        objective function.
+    fval : number
+        (Optional output) The function value evaluated at the minimizer.
+    ierr : int
+        (Optional output) An error flag (0 if converged, 1 if maximum number of
+        function calls reached).
+    numfunc : int
+        (Optional output) The number of function calls made.
+
+    See also
+    --------
+    minimize_scalar: Interface to minimization algorithms for scalar
+        univariate functions. See the 'Bounded' `method` in particular.
+
+    Notes
+    -----
+    Finds a local minimizer of the scalar function `func` in the
+    interval x1 < xopt < x2 using Brent's method. (See `brent`
+    for auto-bracketing.)
+
+    References
+    ----------
+    .. [1] Forsythe, G.E., M. A. Malcolm, and C. B. Moler. "Computer Methods
+           for Mathematical Computations." Prentice-Hall Series in Automatic
+           Computation 259 (1977).
+    .. [2] Brent, Richard P. Algorithms for Minimization Without Derivatives.
+           Courier Corporation, 2013.
+
+    Examples
+    --------
+    `fminbound` finds the minimizer of the function in the given range.
+    The following examples illustrate this.
+
+    >>> from scipy import optimize
+    >>> def f(x):
+    ...     return (x-1)**2
+    >>> minimizer = optimize.fminbound(f, -4, 4)
+    >>> minimizer
+    1.0
+    >>> minimum = f(minimizer)
+    >>> minimum
+    0.0
+    >>> res = optimize.fminbound(f, 3, 4, full_output=True)
+    >>> minimizer, fval, ierr, numfunc = res
+    >>> minimizer
+    3.000005960860986
+    >>> minimum = f(minimizer)
+    >>> minimum, fval
+    (4.000023843479476, 4.000023843479476)
+    """
+    options = {'xatol': xtol,
+               'maxiter': maxfun,
+               'disp': disp}
+
+    res = _minimize_scalar_bounded(func, (x1, x2), args, **options)
+    if full_output:
+        return res['x'], res['fun'], res['status'], res['nfev']
+    else:
+        return res['x']
+
+
+def _minimize_scalar_bounded(func, bounds, args=(),
+                             xatol=1e-5, maxiter=500, disp=0,
+                             **unknown_options):
+    """
+    Options
+    -------
+    maxiter : int
+        Maximum number of iterations to perform.
+    disp: int, optional
+        If non-zero, print messages.
+
+        ``0`` : no message printing.
+
+        ``1`` : non-convergence notification messages only.
+
+        ``2`` : print a message on convergence too.
+
+        ``3`` : print iteration results.
+
+    xatol : float
+        Absolute error in solution `xopt` acceptable for convergence.
+
+    """
+    _check_unknown_options(unknown_options)
+    maxfun = maxiter
+    # Test bounds are of correct form
+    if len(bounds) != 2:
+        raise ValueError('bounds must have two elements.')
+    x1, x2 = bounds
+
+    if not (is_finite_scalar(x1) and is_finite_scalar(x2)):
+        raise ValueError("Optimization bounds must be finite scalars.")
+
+    if x1 > x2:
+        raise ValueError("The lower bound exceeds the upper bound.")
+
+    flag = 0
+    header = ' Func-count     x          f(x)          Procedure'
+    step = '       initial'
+
+    sqrt_eps = sqrt(2.2e-16)
+    golden_mean = 0.5 * (3.0 - sqrt(5.0))
+    a, b = x1, x2
+    fulc = a + golden_mean * (b - a)
+    nfc, xf = fulc, fulc
+    rat = e = 0.0
+    x = xf
+    fx = func(x, *args)
+    num = 1
+    fmin_data = (1, xf, fx)
+    fu = np.inf
+
+    ffulc = fnfc = fx
+    xm = 0.5 * (a + b)
+    tol1 = sqrt_eps * np.abs(xf) + xatol / 3.0
+    tol2 = 2.0 * tol1
+
+    if disp > 2:
+        print(" ")
+        print(header)
+        print("%5.0f   %12.6g %12.6g %s" % (fmin_data + (step,)))
+
+    while (np.abs(xf - xm) > (tol2 - 0.5 * (b - a))):
+        golden = 1
+        # Check for parabolic fit
+        if np.abs(e) > tol1:
+            golden = 0
+            r = (xf - nfc) * (fx - ffulc)
+            q = (xf - fulc) * (fx - fnfc)
+            p = (xf - fulc) * q - (xf - nfc) * r
+            q = 2.0 * (q - r)
+            if q > 0.0:
+                p = -p
+            q = np.abs(q)
+            r = e
+            e = rat
+
+            # Check for acceptability of parabola
+            if ((np.abs(p) < np.abs(0.5*q*r)) and (p > q*(a - xf)) and
+                    (p < q * (b - xf))):
+                rat = (p + 0.0) / q
+                x = xf + rat
+                step = '       parabolic'
+
+                if ((x - a) < tol2) or ((b - x) < tol2):
+                    si = np.sign(xm - xf) + ((xm - xf) == 0)
+                    rat = tol1 * si
+            else:      # do a golden-section step
+                golden = 1
+
+        if golden:  # do a golden-section step
+            if xf >= xm:
+                e = a - xf
+            else:
+                e = b - xf
+            rat = golden_mean*e
+            step = '       golden'
+
+        si = np.sign(rat) + (rat == 0)
+        x = xf + si * np.maximum(np.abs(rat), tol1)
+        fu = func(x, *args)
+        num += 1
+        fmin_data = (num, x, fu)
+        if disp > 2:
+            print("%5.0f   %12.6g %12.6g %s" % (fmin_data + (step,)))
+
+        if fu <= fx:
+            if x >= xf:
+                a = xf
+            else:
+                b = xf
+            fulc, ffulc = nfc, fnfc
+            nfc, fnfc = xf, fx
+            xf, fx = x, fu
+        else:
+            if x < xf:
+                a = x
+            else:
+                b = x
+            if (fu <= fnfc) or (nfc == xf):
+                fulc, ffulc = nfc, fnfc
+                nfc, fnfc = x, fu
+            elif (fu <= ffulc) or (fulc == xf) or (fulc == nfc):
+                fulc, ffulc = x, fu
+
+        xm = 0.5 * (a + b)
+        tol1 = sqrt_eps * np.abs(xf) + xatol / 3.0
+        tol2 = 2.0 * tol1
+
+        if num >= maxfun:
+            flag = 1
+            break
+
+    if np.isnan(xf) or np.isnan(fx) or np.isnan(fu):
+        flag = 2
+
+    fval = fx
+    if disp > 0:
+        _endprint(x, flag, fval, maxfun, xatol, disp)
+
+    result = OptimizeResult(fun=fval, status=flag, success=(flag == 0),
+                            message={0: 'Solution found.',
+                                     1: 'Maximum number of function calls '
+                                        'reached.',
+                                     2: _status_message['nan']}.get(flag, ''),
+                            x=xf, nfev=num, nit=num)
+
+    return result
+
+
+class Brent:
+    #need to rethink design of __init__
+    def __init__(self, func, args=(), tol=1.48e-8, maxiter=500,
+                 full_output=0, disp=0):
+        self.func = func
+        self.args = args
+        self.tol = tol
+        self.maxiter = maxiter
+        self._mintol = 1.0e-11
+        self._cg = 0.3819660
+        self.xmin = None
+        self.fval = None
+        self.iter = 0
+        self.funcalls = 0
+        self.disp = disp
+
+    # need to rethink design of set_bracket (new options, etc.)
+    def set_bracket(self, brack=None):
+        self.brack = brack
+
+    def get_bracket_info(self):
+        #set up
+        func = self.func
+        args = self.args
+        brack = self.brack
+        ### BEGIN core bracket_info code ###
+        ### carefully DOCUMENT any CHANGES in core ##
+        if brack is None:
+            xa, xb, xc, fa, fb, fc, funcalls = bracket(func, args=args)
+        elif len(brack) == 2:
+            xa, xb, xc, fa, fb, fc, funcalls = bracket(func, xa=brack[0],
+                                                       xb=brack[1], args=args)
+        elif len(brack) == 3:
+            xa, xb, xc = brack
+            if (xa > xc):  # swap so xa < xc can be assumed
+                xc, xa = xa, xc
+            if not ((xa < xb) and (xb < xc)):
+                raise ValueError(
+                    "Bracketing values (xa, xb, xc) do not"
+                    " fulfill this requirement: (xa < xb) and (xb < xc)"
+                )
+            fa = func(*((xa,) + args))
+            fb = func(*((xb,) + args))
+            fc = func(*((xc,) + args))
+            if not ((fb < fa) and (fb < fc)):
+                raise ValueError(
+                    "Bracketing values (xa, xb, xc) do not fulfill"
+                    " this requirement: (f(xb) < f(xa)) and (f(xb) < f(xc))"
+                )
+
+            funcalls = 3
+        else:
+            raise ValueError("Bracketing interval must be "
+                             "length 2 or 3 sequence.")
+        ### END core bracket_info code ###
+
+        return xa, xb, xc, fa, fb, fc, funcalls
+
+    def optimize(self):
+        # set up for optimization
+        func = self.func
+        xa, xb, xc, fa, fb, fc, funcalls = self.get_bracket_info()
+        _mintol = self._mintol
+        _cg = self._cg
+        #################################
+        #BEGIN CORE ALGORITHM
+        #################################
+        x = w = v = xb
+        fw = fv = fx = fb
+        if (xa < xc):
+            a = xa
+            b = xc
+        else:
+            a = xc
+            b = xa
+        deltax = 0.0
+        iter = 0
+
+        if self.disp > 2:
+            print(" ")
+            print(f"{'Func-count':^12} {'x':^12} {'f(x)': ^12}")
+            print(f"{funcalls:^12g} {x:^12.6g} {fx:^12.6g}")
+
+        while (iter < self.maxiter):
+            tol1 = self.tol * np.abs(x) + _mintol
+            tol2 = 2.0 * tol1
+            xmid = 0.5 * (a + b)
+            # check for convergence
+            if np.abs(x - xmid) < (tol2 - 0.5 * (b - a)):
+                break
+            # XXX In the first iteration, rat is only bound in the true case
+            # of this conditional. This used to cause an UnboundLocalError
+            # (gh-4140). It should be set before the if (but to what?).
+            if (np.abs(deltax) <= tol1):
+                if (x >= xmid):
+                    deltax = a - x       # do a golden section step
+                else:
+                    deltax = b - x
+                rat = _cg * deltax
+            else:                              # do a parabolic step
+                tmp1 = (x - w) * (fx - fv)
+                tmp2 = (x - v) * (fx - fw)
+                p = (x - v) * tmp2 - (x - w) * tmp1
+                tmp2 = 2.0 * (tmp2 - tmp1)
+                if (tmp2 > 0.0):
+                    p = -p
+                tmp2 = np.abs(tmp2)
+                dx_temp = deltax
+                deltax = rat
+                # check parabolic fit
+                if ((p > tmp2 * (a - x)) and (p < tmp2 * (b - x)) and
+                        (np.abs(p) < np.abs(0.5 * tmp2 * dx_temp))):
+                    rat = p * 1.0 / tmp2        # if parabolic step is useful.
+                    u = x + rat
+                    if ((u - a) < tol2 or (b - u) < tol2):
+                        if xmid - x >= 0:
+                            rat = tol1
+                        else:
+                            rat = -tol1
+                else:
+                    if (x >= xmid):
+                        deltax = a - x  # if it's not do a golden section step
+                    else:
+                        deltax = b - x
+                    rat = _cg * deltax
+
+            if (np.abs(rat) < tol1):            # update by at least tol1
+                if rat >= 0:
+                    u = x + tol1
+                else:
+                    u = x - tol1
+            else:
+                u = x + rat
+            fu = func(*((u,) + self.args))      # calculate new output value
+            funcalls += 1
+
+            if (fu > fx):                 # if it's bigger than current
+                if (u < x):
+                    a = u
+                else:
+                    b = u
+                if (fu <= fw) or (w == x):
+                    v = w
+                    w = u
+                    fv = fw
+                    fw = fu
+                elif (fu <= fv) or (v == x) or (v == w):
+                    v = u
+                    fv = fu
+            else:
+                if (u >= x):
+                    a = x
+                else:
+                    b = x
+                v = w
+                w = x
+                x = u
+                fv = fw
+                fw = fx
+                fx = fu
+
+            if self.disp > 2:
+                print(f"{funcalls:^12g} {x:^12.6g} {fx:^12.6g}")
+
+            iter += 1
+        #################################
+        #END CORE ALGORITHM
+        #################################
+
+        self.xmin = x
+        self.fval = fx
+        self.iter = iter
+        self.funcalls = funcalls
+
+    def get_result(self, full_output=False):
+        if full_output:
+            return self.xmin, self.fval, self.iter, self.funcalls
+        else:
+            return self.xmin
+
+
+def brent(func, args=(), brack=None, tol=1.48e-8, full_output=0, maxiter=500):
+    """
+    Given a function of one variable and a possible bracket, return
+    a local minimizer of the function isolated to a fractional precision
+    of tol.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Objective function.
+    args : tuple, optional
+        Additional arguments (if present).
+    brack : tuple, optional
+        Either a triple ``(xa, xb, xc)`` satisfying ``xa < xb < xc`` and
+        ``func(xb) < func(xa) and  func(xb) < func(xc)``, or a pair
+        ``(xa, xb)`` to be used as initial points for a downhill bracket search
+        (see `scipy.optimize.bracket`).
+        The minimizer ``x`` will not necessarily satisfy ``xa <= x <= xb``.
+    tol : float, optional
+        Relative error in solution `xopt` acceptable for convergence.
+    full_output : bool, optional
+        If True, return all output args (xmin, fval, iter,
+        funcalls).
+    maxiter : int, optional
+        Maximum number of iterations in solution.
+
+    Returns
+    -------
+    xmin : ndarray
+        Optimum point.
+    fval : float
+        (Optional output) Optimum function value.
+    iter : int
+        (Optional output) Number of iterations.
+    funcalls : int
+        (Optional output) Number of objective function evaluations made.
+
+    See also
+    --------
+    minimize_scalar: Interface to minimization algorithms for scalar
+        univariate functions. See the 'Brent' `method` in particular.
+
+    Notes
+    -----
+    Uses inverse parabolic interpolation when possible to speed up
+    convergence of golden section method.
+
+    Does not ensure that the minimum lies in the range specified by
+    `brack`. See `scipy.optimize.fminbound`.
+
+    Examples
+    --------
+    We illustrate the behaviour of the function when `brack` is of
+    size 2 and 3 respectively. In the case where `brack` is of the
+    form ``(xa, xb)``, we can see for the given values, the output does
+    not necessarily lie in the range ``(xa, xb)``.
+
+    >>> def f(x):
+    ...     return (x-1)**2
+
+    >>> from scipy import optimize
+
+    >>> minimizer = optimize.brent(f, brack=(1, 2))
+    >>> minimizer
+    1
+    >>> res = optimize.brent(f, brack=(-1, 0.5, 2), full_output=True)
+    >>> xmin, fval, iter, funcalls = res
+    >>> f(xmin), fval
+    (0.0, 0.0)
+
+    """
+    options = {'xtol': tol,
+               'maxiter': maxiter}
+    res = _minimize_scalar_brent(func, brack, args, **options)
+    if full_output:
+        return res['x'], res['fun'], res['nit'], res['nfev']
+    else:
+        return res['x']
+
+
+def _minimize_scalar_brent(func, brack=None, args=(), xtol=1.48e-8,
+                           maxiter=500, disp=0,
+                           **unknown_options):
+    """
+    Options
+    -------
+    maxiter : int
+        Maximum number of iterations to perform.
+    xtol : float
+        Relative error in solution `xopt` acceptable for convergence.
+    disp : int, optional
+        If non-zero, print messages.
+
+        ``0`` : no message printing.
+
+        ``1`` : non-convergence notification messages only.
+
+        ``2`` : print a message on convergence too.
+
+        ``3`` : print iteration results.
+
+    Notes
+    -----
+    Uses inverse parabolic interpolation when possible to speed up
+    convergence of golden section method.
+
+    """
+    _check_unknown_options(unknown_options)
+    tol = xtol
+    if tol < 0:
+        raise ValueError(f'tolerance should be >= 0, got {tol!r}')
+
+    brent = Brent(func=func, args=args, tol=tol,
+                  full_output=True, maxiter=maxiter, disp=disp)
+    brent.set_bracket(brack)
+    brent.optimize()
+    x, fval, nit, nfev = brent.get_result(full_output=True)
+
+    success = nit < maxiter and not (np.isnan(x) or np.isnan(fval))
+
+    if success:
+        message = ("\nOptimization terminated successfully;\n"
+                   "The returned value satisfies the termination criteria\n"
+                   f"(using xtol = {xtol} )")
+    else:
+        if nit >= maxiter:
+            message = "\nMaximum number of iterations exceeded"
+        if np.isnan(x) or np.isnan(fval):
+            message = f"{_status_message['nan']}"
+
+    if disp:
+        _print_success_message_or_warn(not success, message)
+
+    return OptimizeResult(fun=fval, x=x, nit=nit, nfev=nfev,
+                          success=success, message=message)
+
+
+def golden(func, args=(), brack=None, tol=_epsilon,
+           full_output=0, maxiter=5000):
+    """
+    Return the minimizer of a function of one variable using the golden section
+    method.
+
+    Given a function of one variable and a possible bracketing interval,
+    return a minimizer of the function isolated to a fractional precision of
+    tol.
+
+    Parameters
+    ----------
+    func : callable func(x,*args)
+        Objective function to minimize.
+    args : tuple, optional
+        Additional arguments (if present), passed to func.
+    brack : tuple, optional
+        Either a triple ``(xa, xb, xc)`` where ``xa < xb < xc`` and
+        ``func(xb) < func(xa) and  func(xb) < func(xc)``, or a pair (xa, xb)
+        to be used as initial points for a downhill bracket search (see
+        `scipy.optimize.bracket`).
+        The minimizer ``x`` will not necessarily satisfy ``xa <= x <= xb``.
+    tol : float, optional
+        x tolerance stop criterion
+    full_output : bool, optional
+        If True, return optional outputs.
+    maxiter : int
+        Maximum number of iterations to perform.
+
+    Returns
+    -------
+    xmin : ndarray
+        Optimum point.
+    fval : float
+        (Optional output) Optimum function value.
+    funcalls : int
+        (Optional output) Number of objective function evaluations made.
+
+    See also
+    --------
+    minimize_scalar: Interface to minimization algorithms for scalar
+        univariate functions. See the 'Golden' `method` in particular.
+
+    Notes
+    -----
+    Uses analog of bisection method to decrease the bracketed
+    interval.
+
+    Examples
+    --------
+    We illustrate the behaviour of the function when `brack` is of
+    size 2 and 3, respectively. In the case where `brack` is of the
+    form (xa,xb), we can see for the given values, the output need
+    not necessarily lie in the range ``(xa, xb)``.
+
+    >>> def f(x):
+    ...     return (x-1)**2
+
+    >>> from scipy import optimize
+
+    >>> minimizer = optimize.golden(f, brack=(1, 2))
+    >>> minimizer
+    1
+    >>> res = optimize.golden(f, brack=(-1, 0.5, 2), full_output=True)
+    >>> xmin, fval, funcalls = res
+    >>> f(xmin), fval
+    (9.925165290385052e-18, 9.925165290385052e-18)
+
+    """
+    options = {'xtol': tol, 'maxiter': maxiter}
+    res = _minimize_scalar_golden(func, brack, args, **options)
+    if full_output:
+        return res['x'], res['fun'], res['nfev']
+    else:
+        return res['x']
+
+
+def _minimize_scalar_golden(func, brack=None, args=(),
+                            xtol=_epsilon, maxiter=5000, disp=0,
+                            **unknown_options):
+    """
+    Options
+    -------
+    xtol : float
+        Relative error in solution `xopt` acceptable for convergence.
+    maxiter : int
+        Maximum number of iterations to perform.
+    disp: int, optional
+        If non-zero, print messages.
+
+        ``0`` : no message printing.
+
+        ``1`` : non-convergence notification messages only.
+
+        ``2`` : print a message on convergence too.
+
+        ``3`` : print iteration results.
+    """
+    _check_unknown_options(unknown_options)
+    tol = xtol
+    if brack is None:
+        xa, xb, xc, fa, fb, fc, funcalls = bracket(func, args=args)
+    elif len(brack) == 2:
+        xa, xb, xc, fa, fb, fc, funcalls = bracket(func, xa=brack[0],
+                                                   xb=brack[1], args=args)
+    elif len(brack) == 3:
+        xa, xb, xc = brack
+        if (xa > xc):  # swap so xa < xc can be assumed
+            xc, xa = xa, xc
+        if not ((xa < xb) and (xb < xc)):
+            raise ValueError(
+                "Bracketing values (xa, xb, xc) do not"
+                " fulfill this requirement: (xa < xb) and (xb < xc)"
+            )
+        fa = func(*((xa,) + args))
+        fb = func(*((xb,) + args))
+        fc = func(*((xc,) + args))
+        if not ((fb < fa) and (fb < fc)):
+            raise ValueError(
+                "Bracketing values (xa, xb, xc) do not fulfill"
+                " this requirement: (f(xb) < f(xa)) and (f(xb) < f(xc))"
+            )
+        funcalls = 3
+    else:
+        raise ValueError("Bracketing interval must be length 2 or 3 sequence.")
+
+    _gR = 0.61803399  # golden ratio conjugate: 2.0/(1.0+sqrt(5.0))
+    _gC = 1.0 - _gR
+    x3 = xc
+    x0 = xa
+    if (np.abs(xc - xb) > np.abs(xb - xa)):
+        x1 = xb
+        x2 = xb + _gC * (xc - xb)
+    else:
+        x2 = xb
+        x1 = xb - _gC * (xb - xa)
+    f1 = func(*((x1,) + args))
+    f2 = func(*((x2,) + args))
+    funcalls += 2
+    nit = 0
+
+    if disp > 2:
+        print(" ")
+        print(f"{'Func-count':^12} {'x':^12} {'f(x)': ^12}")
+
+    for i in range(maxiter):
+        if np.abs(x3 - x0) <= tol * (np.abs(x1) + np.abs(x2)):
+            break
+        if (f2 < f1):
+            x0 = x1
+            x1 = x2
+            x2 = _gR * x1 + _gC * x3
+            f1 = f2
+            f2 = func(*((x2,) + args))
+        else:
+            x3 = x2
+            x2 = x1
+            x1 = _gR * x2 + _gC * x0
+            f2 = f1
+            f1 = func(*((x1,) + args))
+        funcalls += 1
+        if disp > 2:
+            if (f1 < f2):
+                xmin, fval = x1, f1
+            else:
+                xmin, fval = x2, f2
+            print(f"{funcalls:^12g} {xmin:^12.6g} {fval:^12.6g}")
+
+        nit += 1
+    # end of iteration loop
+
+    if (f1 < f2):
+        xmin = x1
+        fval = f1
+    else:
+        xmin = x2
+        fval = f2
+
+    success = nit < maxiter and not (np.isnan(fval) or np.isnan(xmin))
+
+    if success:
+        message = ("\nOptimization terminated successfully;\n"
+                   "The returned value satisfies the termination criteria\n"
+                   f"(using xtol = {xtol} )")
+    else:
+        if nit >= maxiter:
+            message = "\nMaximum number of iterations exceeded"
+        if np.isnan(xmin) or np.isnan(fval):
+            message = f"{_status_message['nan']}"
+
+    if disp:
+        _print_success_message_or_warn(not success, message)
+
+    return OptimizeResult(fun=fval, nfev=funcalls, x=xmin, nit=nit,
+                          success=success, message=message)
+
+
+def bracket(func, xa=0.0, xb=1.0, args=(), grow_limit=110.0, maxiter=1000):
+    """
+    Bracket the minimum of a function.
+
+    Given a function and distinct initial points, search in the
+    downhill direction (as defined by the initial points) and return
+    three points that bracket the minimum of the function.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Objective function to minimize.
+    xa, xb : float, optional
+        Initial points. Defaults `xa` to 0.0, and `xb` to 1.0.
+        A local minimum need not be contained within this interval.
+    args : tuple, optional
+        Additional arguments (if present), passed to `func`.
+    grow_limit : float, optional
+        Maximum grow limit.  Defaults to 110.0
+    maxiter : int, optional
+        Maximum number of iterations to perform. Defaults to 1000.
+
+    Returns
+    -------
+    xa, xb, xc : float
+        Final points of the bracket.
+    fa, fb, fc : float
+        Objective function values at the bracket points.
+    funcalls : int
+        Number of function evaluations made.
+
+    Raises
+    ------
+    BracketError
+        If no valid bracket is found before the algorithm terminates.
+        See notes for conditions of a valid bracket.
+
+    Notes
+    -----
+    The algorithm attempts to find three strictly ordered points (i.e.
+    :math:`x_a < x_b < x_c` or :math:`x_c < x_b < x_a`) satisfying
+    :math:`f(x_b) ≤ f(x_a)` and :math:`f(x_b) ≤ f(x_c)`, where one of the
+    inequalities must be satisfied strictly and all :math:`x_i` must be
+    finite.
+
+    Examples
+    --------
+    This function can find a downward convex region of a function:
+
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> from scipy.optimize import bracket
+    >>> def f(x):
+    ...     return 10*x**2 + 3*x + 5
+    >>> x = np.linspace(-2, 2)
+    >>> y = f(x)
+    >>> init_xa, init_xb = 0.1, 1
+    >>> xa, xb, xc, fa, fb, fc, funcalls = bracket(f, xa=init_xa, xb=init_xb)
+    >>> plt.axvline(x=init_xa, color="k", linestyle="--")
+    >>> plt.axvline(x=init_xb, color="k", linestyle="--")
+    >>> plt.plot(x, y, "-k")
+    >>> plt.plot(xa, fa, "bx")
+    >>> plt.plot(xb, fb, "rx")
+    >>> plt.plot(xc, fc, "bx")
+    >>> plt.show()
+
+    Note that both initial points were to the right of the minimum, and the
+    third point was found in the "downhill" direction: the direction
+    in which the function appeared to be decreasing (to the left).
+    The final points are strictly ordered, and the function value
+    at the middle point is less than the function values at the endpoints;
+    it follows that a minimum must lie within the bracket.
+
+    """
+    _gold = 1.618034  # golden ratio: (1.0+sqrt(5.0))/2.0
+    _verysmall_num = 1e-21
+    # convert to numpy floats if not already
+    xa, xb = np.asarray([xa, xb])
+    fa = func(*(xa,) + args)
+    fb = func(*(xb,) + args)
+    if (fa < fb):                      # Switch so fa > fb
+        xa, xb = xb, xa
+        fa, fb = fb, fa
+    xc = xb + _gold * (xb - xa)
+    fc = func(*((xc,) + args))
+    funcalls = 3
+    iter = 0
+    while (fc < fb):
+        tmp1 = (xb - xa) * (fb - fc)
+        tmp2 = (xb - xc) * (fb - fa)
+        val = tmp2 - tmp1
+        if np.abs(val) < _verysmall_num:
+            denom = 2.0 * _verysmall_num
+        else:
+            denom = 2.0 * val
+        w = xb - ((xb - xc) * tmp2 - (xb - xa) * tmp1) / denom
+        wlim = xb + grow_limit * (xc - xb)
+        msg = ("No valid bracket was found before the iteration limit was "
+               "reached. Consider trying different initial points or "
+               "increasing `maxiter`.")
+        if iter > maxiter:
+            raise RuntimeError(msg)
+        iter += 1
+        if (w - xc) * (xb - w) > 0.0:
+            fw = func(*((w,) + args))
+            funcalls += 1
+            if (fw < fc):
+                xa = xb
+                xb = w
+                fa = fb
+                fb = fw
+                break
+            elif (fw > fb):
+                xc = w
+                fc = fw
+                break
+            w = xc + _gold * (xc - xb)
+            fw = func(*((w,) + args))
+            funcalls += 1
+        elif (w - wlim)*(wlim - xc) >= 0.0:
+            w = wlim
+            fw = func(*((w,) + args))
+            funcalls += 1
+        elif (w - wlim)*(xc - w) > 0.0:
+            fw = func(*((w,) + args))
+            funcalls += 1
+            if (fw < fc):
+                xb = xc
+                xc = w
+                w = xc + _gold * (xc - xb)
+                fb = fc
+                fc = fw
+                fw = func(*((w,) + args))
+                funcalls += 1
+        else:
+            w = xc + _gold * (xc - xb)
+            fw = func(*((w,) + args))
+            funcalls += 1
+        xa = xb
+        xb = xc
+        xc = w
+        fa = fb
+        fb = fc
+        fc = fw
+
+    # three conditions for a valid bracket
+    cond1 = (fb < fc and fb <= fa) or (fb < fa and fb <= fc)
+    cond2 = (xa < xb < xc or xc < xb < xa)
+    cond3 = np.isfinite(xa) and np.isfinite(xb) and np.isfinite(xc)
+    msg = ("The algorithm terminated without finding a valid bracket. "
+           "Consider trying different initial points.")
+    if not (cond1 and cond2 and cond3):
+        e = BracketError(msg)
+        e.data = (xa, xb, xc, fa, fb, fc, funcalls)
+        raise e
+
+    return xa, xb, xc, fa, fb, fc, funcalls
+
+
+class BracketError(RuntimeError):
+    pass
+
+
+def _recover_from_bracket_error(solver, fun, bracket, args, **options):
+    # `bracket` was originally written without checking whether the resulting
+    # bracket is valid. `brent` and `golden` built on top of it without
+    # checking the returned bracket for validity, and their output can be
+    # incorrect without warning/error if the original bracket is invalid.
+    # gh-14858 noticed the problem, and the following is the desired
+    # behavior:
+    # - `scipy.optimize.bracket`, `scipy.optimize.brent`, and
+    #   `scipy.optimize.golden` should raise an error if the bracket is
+    #   invalid, as opposed to silently returning garbage
+    # - `scipy.optimize.minimize_scalar` should return with `success=False`
+    #   and other information
+    # The changes that would be required to achieve this the traditional
+    # way (`return`ing all the required information from bracket all the way
+    # up to `minimizer_scalar`) are extensive and invasive. (See a6aa40d.)
+    # We can achieve the same thing by raising the error in `bracket`, but
+    # storing the information needed by `minimize_scalar` in the error object,
+    # and intercepting it here.
+    try:
+        res = solver(fun, bracket, args, **options)
+    except BracketError as e:
+        msg = str(e)
+        xa, xb, xc, fa, fb, fc, funcalls = e.data
+        xs, fs = [xa, xb, xc], [fa, fb, fc]
+        if np.any(np.isnan([xs, fs])):
+            x, fun = np.nan, np.nan
+        else:
+            imin = np.argmin(fs)
+            x, fun = xs[imin], fs[imin]
+        return OptimizeResult(fun=fun, nfev=funcalls, x=x,
+                              nit=0, success=False, message=msg)
+    return res
+
+
+def _line_for_search(x0, alpha, lower_bound, upper_bound):
+    """
+    Given a parameter vector ``x0`` with length ``n`` and a direction
+    vector ``alpha`` with length ``n``, and lower and upper bounds on
+    each of the ``n`` parameters, what are the bounds on a scalar
+    ``l`` such that ``lower_bound <= x0 + alpha * l <= upper_bound``.
+
+
+    Parameters
+    ----------
+    x0 : np.array.
+        The vector representing the current location.
+        Note ``np.shape(x0) == (n,)``.
+    alpha : np.array.
+        The vector representing the direction.
+        Note ``np.shape(alpha) == (n,)``.
+    lower_bound : np.array.
+        The lower bounds for each parameter in ``x0``. If the ``i``th
+        parameter in ``x0`` is unbounded below, then ``lower_bound[i]``
+        should be ``-np.inf``.
+        Note ``np.shape(lower_bound) == (n,)``.
+    upper_bound : np.array.
+        The upper bounds for each parameter in ``x0``. If the ``i``th
+        parameter in ``x0`` is unbounded above, then ``upper_bound[i]``
+        should be ``np.inf``.
+        Note ``np.shape(upper_bound) == (n,)``.
+
+    Returns
+    -------
+    res : tuple ``(lmin, lmax)``
+        The bounds for ``l`` such that
+            ``lower_bound[i] <= x0[i] + alpha[i] * l <= upper_bound[i]``
+        for all ``i``.
+
+    """
+    # get nonzero indices of alpha so we don't get any zero division errors.
+    # alpha will not be all zero, since it is called from _linesearch_powell
+    # where we have a check for this.
+    nonzero, = alpha.nonzero()
+    lower_bound, upper_bound = lower_bound[nonzero], upper_bound[nonzero]
+    x0, alpha = x0[nonzero], alpha[nonzero]
+    low = (lower_bound - x0) / alpha
+    high = (upper_bound - x0) / alpha
+
+    # positive and negative indices
+    pos = alpha > 0
+
+    lmin_pos = np.where(pos, low, 0)
+    lmin_neg = np.where(pos, 0, high)
+    lmax_pos = np.where(pos, high, 0)
+    lmax_neg = np.where(pos, 0, low)
+
+    lmin = np.max(lmin_pos + lmin_neg)
+    lmax = np.min(lmax_pos + lmax_neg)
+
+    # if x0 is outside the bounds, then it is possible that there is
+    # no way to get back in the bounds for the parameters being updated
+    # with the current direction alpha.
+    # when this happens, lmax < lmin.
+    # If this is the case, then we can just return (0, 0)
+    return (lmin, lmax) if lmax >= lmin else (0, 0)
+
+
+def _linesearch_powell(func, p, xi, tol=1e-3,
+                       lower_bound=None, upper_bound=None, fval=None):
+    """Line-search algorithm using fminbound.
+
+    Find the minimum of the function ``func(x0 + alpha*direc)``.
+
+    lower_bound : np.array.
+        The lower bounds for each parameter in ``x0``. If the ``i``th
+        parameter in ``x0`` is unbounded below, then ``lower_bound[i]``
+        should be ``-np.inf``.
+        Note ``np.shape(lower_bound) == (n,)``.
+    upper_bound : np.array.
+        The upper bounds for each parameter in ``x0``. If the ``i``th
+        parameter in ``x0`` is unbounded above, then ``upper_bound[i]``
+        should be ``np.inf``.
+        Note ``np.shape(upper_bound) == (n,)``.
+    fval : number.
+        ``fval`` is equal to ``func(p)``, the idea is just to avoid
+        recomputing it so we can limit the ``fevals``.
+
+    """
+    def myfunc(alpha):
+        return func(p + alpha*xi)
+
+    # if xi is zero, then don't optimize
+    if not np.any(xi):
+        return ((fval, p, xi) if fval is not None else (func(p), p, xi))
+    elif lower_bound is None and upper_bound is None:
+        # non-bounded minimization
+        res = _recover_from_bracket_error(_minimize_scalar_brent,
+                                          myfunc, None, tuple(), xtol=tol)
+        alpha_min, fret = res.x, res.fun
+        xi = alpha_min * xi
+        return fret, p + xi, xi
+    else:
+        bound = _line_for_search(p, xi, lower_bound, upper_bound)
+        if np.isneginf(bound[0]) and np.isposinf(bound[1]):
+            # equivalent to unbounded
+            return _linesearch_powell(func, p, xi, fval=fval, tol=tol)
+        elif not np.isneginf(bound[0]) and not np.isposinf(bound[1]):
+            # we can use a bounded scalar minimization
+            res = _minimize_scalar_bounded(myfunc, bound, xatol=tol / 100)
+            xi = res.x * xi
+            return res.fun, p + xi, xi
+        else:
+            # only bounded on one side. use the tangent function to convert
+            # the infinity bound to a finite bound. The new bounded region
+            # is a subregion of the region bounded by -np.pi/2 and np.pi/2.
+            bound = np.arctan(bound[0]), np.arctan(bound[1])
+            res = _minimize_scalar_bounded(
+                lambda x: myfunc(np.tan(x)),
+                bound,
+                xatol=tol / 100)
+            xi = np.tan(res.x) * xi
+            return res.fun, p + xi, xi
+
+
+def fmin_powell(func, x0, args=(), xtol=1e-4, ftol=1e-4, maxiter=None,
+                maxfun=None, full_output=0, disp=1, retall=0, callback=None,
+                direc=None):
+    """
+    Minimize a function using modified Powell's method.
+
+    This method only uses function values, not derivatives.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Objective function to be minimized.
+    x0 : ndarray
+        Initial guess.
+    args : tuple, optional
+        Extra arguments passed to func.
+    xtol : float, optional
+        Line-search error tolerance.
+    ftol : float, optional
+        Relative error in ``func(xopt)`` acceptable for convergence.
+    maxiter : int, optional
+        Maximum number of iterations to perform.
+    maxfun : int, optional
+        Maximum number of function evaluations to make.
+    full_output : bool, optional
+        If True, ``fopt``, ``xi``, ``direc``, ``iter``, ``funcalls``, and
+        ``warnflag`` are returned.
+    disp : bool, optional
+        If True, print convergence messages.
+    retall : bool, optional
+        If True, return a list of the solution at each iteration.
+    callback : callable, optional
+        An optional user-supplied function, called after each
+        iteration.  Called as ``callback(xk)``, where ``xk`` is the
+        current parameter vector.
+    direc : ndarray, optional
+        Initial fitting step and parameter order set as an (N, N) array, where N
+        is the number of fitting parameters in `x0`. Defaults to step size 1.0
+        fitting all parameters simultaneously (``np.eye((N, N))``). To
+        prevent initial consideration of values in a step or to change initial
+        step size, set to 0 or desired step size in the Jth position in the Mth
+        block, where J is the position in `x0` and M is the desired evaluation
+        step, with steps being evaluated in index order. Step size and ordering
+        will change freely as minimization proceeds.
+
+    Returns
+    -------
+    xopt : ndarray
+        Parameter which minimizes `func`.
+    fopt : number
+        Value of function at minimum: ``fopt = func(xopt)``.
+    direc : ndarray
+        Current direction set.
+    iter : int
+        Number of iterations.
+    funcalls : int
+        Number of function calls made.
+    warnflag : int
+        Integer warning flag:
+            1 : Maximum number of function evaluations.
+            2 : Maximum number of iterations.
+            3 : NaN result encountered.
+            4 : The result is out of the provided bounds.
+    allvecs : list
+        List of solutions at each iteration.
+
+    See also
+    --------
+    minimize: Interface to unconstrained minimization algorithms for
+        multivariate functions. See the 'Powell' method in particular.
+
+    Notes
+    -----
+    Uses a modification of Powell's method to find the minimum of
+    a function of N variables. Powell's method is a conjugate
+    direction method.
+
+    The algorithm has two loops. The outer loop merely iterates over the inner
+    loop. The inner loop minimizes over each current direction in the direction
+    set. At the end of the inner loop, if certain conditions are met, the
+    direction that gave the largest decrease is dropped and replaced with the
+    difference between the current estimated x and the estimated x from the
+    beginning of the inner-loop.
+
+    The technical conditions for replacing the direction of greatest
+    increase amount to checking that
+
+    1. No further gain can be made along the direction of greatest increase
+       from that iteration.
+    2. The direction of greatest increase accounted for a large sufficient
+       fraction of the decrease in the function value from that iteration of
+       the inner loop.
+
+    References
+    ----------
+    Powell M.J.D. (1964) An efficient method for finding the minimum of a
+    function of several variables without calculating derivatives,
+    Computer Journal, 7 (2):155-162.
+
+    Press W., Teukolsky S.A., Vetterling W.T., and Flannery B.P.:
+    Numerical Recipes (any edition), Cambridge University Press
+
+    Examples
+    --------
+    >>> def f(x):
+    ...     return x**2
+
+    >>> from scipy import optimize
+
+    >>> minimum = optimize.fmin_powell(f, -1)
+    Optimization terminated successfully.
+             Current function value: 0.000000
+             Iterations: 2
+             Function evaluations: 16
+    >>> minimum
+    array(0.0)
+
+    """
+    opts = {'xtol': xtol,
+            'ftol': ftol,
+            'maxiter': maxiter,
+            'maxfev': maxfun,
+            'disp': disp,
+            'direc': direc,
+            'return_all': retall}
+
+    callback = _wrap_callback(callback)
+    res = _minimize_powell(func, x0, args, callback=callback, **opts)
+
+    if full_output:
+        retlist = (res['x'], res['fun'], res['direc'], res['nit'],
+                   res['nfev'], res['status'])
+        if retall:
+            retlist += (res['allvecs'], )
+        return retlist
+    else:
+        if retall:
+            return res['x'], res['allvecs']
+        else:
+            return res['x']
+
+
+def _minimize_powell(func, x0, args=(), callback=None, bounds=None,
+                     xtol=1e-4, ftol=1e-4, maxiter=None, maxfev=None,
+                     disp=False, direc=None, return_all=False,
+                     **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using the
+    modified Powell algorithm.
+
+    Parameters
+    ----------
+    fun : callable
+        The objective function to be minimized::
+
+            fun(x, *args) -> float
+
+        where ``x`` is a 1-D array with shape (n,) and ``args``
+        is a tuple of the fixed parameters needed to completely
+        specify the function.
+    x0 : ndarray, shape (n,)
+        Initial guess. Array of real elements of size (n,),
+        where ``n`` is the number of independent variables.
+    args : tuple, optional
+        Extra arguments passed to the objective function and its
+        derivatives (`fun`, `jac` and `hess` functions).
+    method : str or callable, optional
+        The present documentation is specific to ``method='powell'``, but other
+        options are available. See documentation for `scipy.optimize.minimize`.
+    bounds : sequence or `Bounds`, optional
+        Bounds on decision variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. Sequence of ``(min, max)`` pairs for each element in `x`. None
+           is used to specify no bound.
+
+        If bounds are not provided, then an unbounded line search will be used.
+        If bounds are provided and the initial guess is within the bounds, then
+        every function evaluation throughout the minimization procedure will be
+        within the bounds. If bounds are provided, the initial guess is outside
+        the bounds, and `direc` is full rank (or left to default), then some
+        function evaluations during the first iteration may be outside the
+        bounds, but every function evaluation after the first iteration will be
+        within the bounds. If `direc` is not full rank, then some parameters
+        may not be optimized and the solution is not guaranteed to be within
+        the bounds.
+
+    options : dict, optional
+        A dictionary of solver options. All methods accept the following
+        generic options:
+
+        maxiter : int
+            Maximum number of iterations to perform. Depending on the
+            method each iteration may use several function evaluations.
+        disp : bool
+            Set to True to print convergence messages.
+
+        See method-specific options for ``method='powell'`` below.
+    callback : callable, optional
+        Called after each iteration. The signature is::
+
+            callback(xk)
+
+        where ``xk`` is the current parameter vector.
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a ``OptimizeResult`` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the optimizer exited successfully and
+        ``message`` which describes the cause of the termination. See
+        `OptimizeResult` for a description of other attributes.
+
+    Options
+    -------
+    disp : bool
+        Set to True to print convergence messages.
+    xtol : float
+        Relative error in solution `xopt` acceptable for convergence.
+    ftol : float
+        Relative error in ``fun(xopt)`` acceptable for convergence.
+    maxiter, maxfev : int
+        Maximum allowed number of iterations and function evaluations.
+        Will default to ``N*1000``, where ``N`` is the number of
+        variables, if neither `maxiter` or `maxfev` is set. If both
+        `maxiter` and `maxfev` are set, minimization will stop at the
+        first reached.
+    direc : ndarray
+        Initial set of direction vectors for the Powell method.
+    return_all : bool, optional
+        Set to True to return a list of the best solution at each of the
+        iterations.
+    """
+    _check_unknown_options(unknown_options)
+    maxfun = maxfev
+    retall = return_all
+
+    x = asarray(x0).flatten()
+    if retall:
+        allvecs = [x]
+    N = len(x)
+    # If neither are set, then set both to default
+    if maxiter is None and maxfun is None:
+        maxiter = N * 1000
+        maxfun = N * 1000
+    elif maxiter is None:
+        # Convert remaining Nones, to np.inf, unless the other is np.inf, in
+        # which case use the default to avoid unbounded iteration
+        if maxfun == np.inf:
+            maxiter = N * 1000
+        else:
+            maxiter = np.inf
+    elif maxfun is None:
+        if maxiter == np.inf:
+            maxfun = N * 1000
+        else:
+            maxfun = np.inf
+
+    # we need to use a mutable object here that we can update in the
+    # wrapper function
+    fcalls, func = _wrap_scalar_function_maxfun_validation(func, args, maxfun)
+
+    if direc is None:
+        direc = eye(N, dtype=float)
+    else:
+        direc = asarray(direc, dtype=float)
+        if np.linalg.matrix_rank(direc) != direc.shape[0]:
+            warnings.warn("direc input is not full rank, some parameters may "
+                          "not be optimized",
+                          OptimizeWarning, stacklevel=3)
+
+    if bounds is None:
+        # don't make these arrays of all +/- inf. because
+        # _linesearch_powell will do an unnecessary check of all the elements.
+        # just keep them None, _linesearch_powell will not have to check
+        # all the elements.
+        lower_bound, upper_bound = None, None
+    else:
+        # bounds is standardized in _minimize.py.
+        lower_bound, upper_bound = bounds.lb, bounds.ub
+        if np.any(lower_bound > x0) or np.any(x0 > upper_bound):
+            warnings.warn("Initial guess is not within the specified bounds",
+                          OptimizeWarning, stacklevel=3)
+
+    fval = func(x)
+    x1 = x.copy()
+    iter = 0
+    while True:
+        try:
+            fx = fval
+            bigind = 0
+            delta = 0.0
+            for i in range(N):
+                direc1 = direc[i]
+                fx2 = fval
+                fval, x, direc1 = _linesearch_powell(func, x, direc1,
+                                                     tol=xtol * 100,
+                                                     lower_bound=lower_bound,
+                                                     upper_bound=upper_bound,
+                                                     fval=fval)
+                if (fx2 - fval) > delta:
+                    delta = fx2 - fval
+                    bigind = i
+            iter += 1
+            if retall:
+                allvecs.append(x)
+            intermediate_result = OptimizeResult(x=x, fun=fval)
+            if _call_callback_maybe_halt(callback, intermediate_result):
+                break
+            bnd = ftol * (np.abs(fx) + np.abs(fval)) + 1e-20
+            if 2.0 * (fx - fval) <= bnd:
+                break
+            if fcalls[0] >= maxfun:
+                break
+            if iter >= maxiter:
+                break
+            if np.isnan(fx) and np.isnan(fval):
+                # Ended up in a nan-region: bail out
+                break
+
+            # Construct the extrapolated point
+            direc1 = x - x1
+            x1 = x.copy()
+            # make sure that we don't go outside the bounds when extrapolating
+            if lower_bound is None and upper_bound is None:
+                lmax = 1
+            else:
+                _, lmax = _line_for_search(x, direc1, lower_bound, upper_bound)
+            x2 = x + min(lmax, 1) * direc1
+            fx2 = func(x2)
+
+            if (fx > fx2):
+                t = 2.0*(fx + fx2 - 2.0*fval)
+                temp = (fx - fval - delta)
+                t *= temp*temp
+                temp = fx - fx2
+                t -= delta*temp*temp
+                if t < 0.0:
+                    fval, x, direc1 = _linesearch_powell(
+                        func, x, direc1,
+                        tol=xtol * 100,
+                        lower_bound=lower_bound,
+                        upper_bound=upper_bound,
+                        fval=fval
+                    )
+                    if np.any(direc1):
+                        direc[bigind] = direc[-1]
+                        direc[-1] = direc1
+        except _MaxFuncCallError:
+            break
+
+    warnflag = 0
+    msg = _status_message['success']
+    # out of bounds is more urgent than exceeding function evals or iters,
+    # but I don't want to cause inconsistencies by changing the
+    # established warning flags for maxfev and maxiter, so the out of bounds
+    # warning flag becomes 3, but is checked for first.
+    if bounds and (np.any(lower_bound > x) or np.any(x > upper_bound)):
+        warnflag = 4
+        msg = _status_message['out_of_bounds']
+    elif fcalls[0] >= maxfun:
+        warnflag = 1
+        msg = _status_message['maxfev']
+    elif iter >= maxiter:
+        warnflag = 2
+        msg = _status_message['maxiter']
+    elif np.isnan(fval) or np.isnan(x).any():
+        warnflag = 3
+        msg = _status_message['nan']
+
+    if disp:
+        _print_success_message_or_warn(warnflag, msg, RuntimeWarning)
+        print(f"         Current function value: {fval:f}")
+        print("         Iterations: %d" % iter)
+        print("         Function evaluations: %d" % fcalls[0])
+    result = OptimizeResult(fun=fval, direc=direc, nit=iter, nfev=fcalls[0],
+                            status=warnflag, success=(warnflag == 0),
+                            message=msg, x=x)
+    if retall:
+        result['allvecs'] = allvecs
+    return result
+
+
+def _endprint(x, flag, fval, maxfun, xtol, disp):
+    if flag == 0:
+        if disp > 1:
+            print("\nOptimization terminated successfully;\n"
+                  "The returned value satisfies the termination criteria\n"
+                  "(using xtol = ", xtol, ")")
+        return
+
+    if flag == 1:
+        msg = ("\nMaximum number of function evaluations exceeded --- "
+               "increase maxfun argument.\n")
+    elif flag == 2:
+        msg = f"\n{_status_message['nan']}"
+
+    _print_success_message_or_warn(flag, msg)
+    return
+
+
+def brute(func, ranges, args=(), Ns=20, full_output=0, finish=fmin,
+          disp=False, workers=1):
+    """Minimize a function over a given range by brute force.
+
+    Uses the "brute force" method, i.e., computes the function's value
+    at each point of a multidimensional grid of points, to find the global
+    minimum of the function.
+
+    The function is evaluated everywhere in the range with the datatype of the
+    first call to the function, as enforced by the ``vectorize`` NumPy
+    function. The value and type of the function evaluation returned when
+    ``full_output=True`` are affected in addition by the ``finish`` argument
+    (see Notes).
+
+    The brute force approach is inefficient because the number of grid points
+    increases exponentially - the number of grid points to evaluate is
+    ``Ns ** len(x)``. Consequently, even with coarse grid spacing, even
+    moderately sized problems can take a long time to run, and/or run into
+    memory limitations.
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized. Must be in the
+        form ``f(x, *args)``, where ``x`` is the argument in
+        the form of a 1-D array and ``args`` is a tuple of any
+        additional fixed parameters needed to completely specify
+        the function.
+    ranges : tuple
+        Each component of the `ranges` tuple must be either a
+        "slice object" or a range tuple of the form ``(low, high)``.
+        The program uses these to create the grid of points on which
+        the objective function will be computed. See `Note 2` for
+        more detail.
+    args : tuple, optional
+        Any additional fixed parameters needed to completely specify
+        the function.
+    Ns : int, optional
+        Number of grid points along the axes, if not otherwise
+        specified. See `Note2`.
+    full_output : bool, optional
+        If True, return the evaluation grid and the objective function's
+        values on it.
+    finish : callable, optional
+        An optimization function that is called with the result of brute force
+        minimization as initial guess. `finish` should take `func` and
+        the initial guess as positional arguments, and take `args` as
+        keyword arguments. It may additionally take `full_output`
+        and/or `disp` as keyword arguments. Use None if no "polishing"
+        function is to be used. See Notes for more details.
+    disp : bool, optional
+        Set to True to print convergence messages from the `finish` callable.
+    workers : int or map-like callable, optional
+        If `workers` is an int the grid is subdivided into `workers`
+        sections and evaluated in parallel (uses
+        `multiprocessing.Pool `).
+        Supply `-1` to use all cores available to the Process.
+        Alternatively supply a map-like callable, such as
+        `multiprocessing.Pool.map` for evaluating the grid in parallel.
+        This evaluation is carried out as ``workers(func, iterable)``.
+        Requires that `func` be pickleable.
+
+        .. versionadded:: 1.3.0
+
+    Returns
+    -------
+    x0 : ndarray
+        A 1-D array containing the coordinates of a point at which the
+        objective function had its minimum value. (See `Note 1` for
+        which point is returned.)
+    fval : float
+        Function value at the point `x0`. (Returned when `full_output` is
+        True.)
+    grid : tuple
+        Representation of the evaluation grid. It has the same
+        length as `x0`. (Returned when `full_output` is True.)
+    Jout : ndarray
+        Function values at each point of the evaluation
+        grid, i.e., ``Jout = func(*grid)``. (Returned
+        when `full_output` is True.)
+
+    See Also
+    --------
+    basinhopping, differential_evolution
+
+    Notes
+    -----
+    *Note 1*: The program finds the gridpoint at which the lowest value
+    of the objective function occurs. If `finish` is None, that is the
+    point returned. When the global minimum occurs within (or not very far
+    outside) the grid's boundaries, and the grid is fine enough, that
+    point will be in the neighborhood of the global minimum.
+
+    However, users often employ some other optimization program to
+    "polish" the gridpoint values, i.e., to seek a more precise
+    (local) minimum near `brute's` best gridpoint.
+    The `brute` function's `finish` option provides a convenient way to do
+    that. Any polishing program used must take `brute's` output as its
+    initial guess as a positional argument, and take `brute's` input values
+    for `args` as keyword arguments, otherwise an error will be raised.
+    It may additionally take `full_output` and/or `disp` as keyword arguments.
+
+    `brute` assumes that the `finish` function returns either an
+    `OptimizeResult` object or a tuple in the form:
+    ``(xmin, Jmin, ... , statuscode)``, where ``xmin`` is the minimizing
+    value of the argument, ``Jmin`` is the minimum value of the objective
+    function, "..." may be some other returned values (which are not used
+    by `brute`), and ``statuscode`` is the status code of the `finish` program.
+
+    Note that when `finish` is not None, the values returned are those
+    of the `finish` program, *not* the gridpoint ones. Consequently,
+    while `brute` confines its search to the input grid points,
+    the `finish` program's results usually will not coincide with any
+    gridpoint, and may fall outside the grid's boundary. Thus, if a
+    minimum only needs to be found over the provided grid points, make
+    sure to pass in ``finish=None``.
+
+    *Note 2*: The grid of points is a `numpy.mgrid` object.
+    For `brute` the `ranges` and `Ns` inputs have the following effect.
+    Each component of the `ranges` tuple can be either a slice object or a
+    two-tuple giving a range of values, such as (0, 5). If the component is a
+    slice object, `brute` uses it directly. If the component is a two-tuple
+    range, `brute` internally converts it to a slice object that interpolates
+    `Ns` points from its low-value to its high-value, inclusive.
+
+    Examples
+    --------
+    We illustrate the use of `brute` to seek the global minimum of a function
+    of two variables that is given as the sum of a positive-definite
+    quadratic and two deep "Gaussian-shaped" craters. Specifically, define
+    the objective function `f` as the sum of three other functions,
+    ``f = f1 + f2 + f3``. We suppose each of these has a signature
+    ``(z, *params)``, where ``z = (x, y)``,  and ``params`` and the functions
+    are as defined below.
+
+    >>> import numpy as np
+    >>> params = (2, 3, 7, 8, 9, 10, 44, -1, 2, 26, 1, -2, 0.5)
+    >>> def f1(z, *params):
+    ...     x, y = z
+    ...     a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    ...     return (a * x**2 + b * x * y + c * y**2 + d*x + e*y + f)
+
+    >>> def f2(z, *params):
+    ...     x, y = z
+    ...     a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    ...     return (-g*np.exp(-((x-h)**2 + (y-i)**2) / scale))
+
+    >>> def f3(z, *params):
+    ...     x, y = z
+    ...     a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    ...     return (-j*np.exp(-((x-k)**2 + (y-l)**2) / scale))
+
+    >>> def f(z, *params):
+    ...     return f1(z, *params) + f2(z, *params) + f3(z, *params)
+
+    Thus, the objective function may have local minima near the minimum
+    of each of the three functions of which it is composed. To
+    use `fmin` to polish its gridpoint result, we may then continue as
+    follows:
+
+    >>> rranges = (slice(-4, 4, 0.25), slice(-4, 4, 0.25))
+    >>> from scipy import optimize
+    >>> resbrute = optimize.brute(f, rranges, args=params, full_output=True,
+    ...                           finish=optimize.fmin)
+    >>> resbrute[0]  # global minimum
+    array([-1.05665192,  1.80834843])
+    >>> resbrute[1]  # function value at global minimum
+    -3.4085818767
+
+    Note that if `finish` had been set to None, we would have gotten the
+    gridpoint [-1.0 1.75] where the rounded function value is -2.892.
+
+    """
+    N = len(ranges)
+    if N > 40:
+        raise ValueError("Brute Force not possible with more "
+                         "than 40 variables.")
+    lrange = list(ranges)
+    for k in range(N):
+        if not isinstance(lrange[k], slice):
+            if len(lrange[k]) < 3:
+                lrange[k] = tuple(lrange[k]) + (complex(Ns),)
+            lrange[k] = slice(*lrange[k])
+    if (N == 1):
+        lrange = lrange[0]
+
+    grid = np.mgrid[lrange]
+
+    # obtain an array of parameters that is iterable by a map-like callable
+    inpt_shape = grid.shape
+    if (N > 1):
+        grid = np.reshape(grid, (inpt_shape[0], np.prod(inpt_shape[1:]))).T
+
+    if not np.iterable(args):
+        args = (args,)
+
+    wrapped_func = _Brute_Wrapper(func, args)
+
+    # iterate over input arrays, possibly in parallel
+    with MapWrapper(pool=workers) as mapper:
+        Jout = np.array(list(mapper(wrapped_func, grid)))
+        if (N == 1):
+            grid = (grid,)
+            Jout = np.squeeze(Jout)
+        elif (N > 1):
+            Jout = np.reshape(Jout, inpt_shape[1:])
+            grid = np.reshape(grid.T, inpt_shape)
+
+    Nshape = shape(Jout)
+
+    indx = argmin(Jout.ravel(), axis=-1)
+    Nindx = np.empty(N, int)
+    xmin = np.empty(N, float)
+    for k in range(N - 1, -1, -1):
+        thisN = Nshape[k]
+        Nindx[k] = indx % Nshape[k]
+        indx = indx // thisN
+    for k in range(N):
+        xmin[k] = grid[k][tuple(Nindx)]
+
+    Jmin = Jout[tuple(Nindx)]
+    if (N == 1):
+        grid = grid[0]
+        xmin = xmin[0]
+
+    if callable(finish):
+        # set up kwargs for `finish` function
+        finish_args = _getfullargspec(finish).args
+        finish_kwargs = dict()
+        if 'full_output' in finish_args:
+            finish_kwargs['full_output'] = 1
+        if 'disp' in finish_args:
+            finish_kwargs['disp'] = disp
+        elif 'options' in finish_args:
+            # pass 'disp' as `options`
+            # (e.g., if `finish` is `minimize`)
+            finish_kwargs['options'] = {'disp': disp}
+
+        # run minimizer
+        res = finish(func, xmin, args=args, **finish_kwargs)
+
+        if isinstance(res, OptimizeResult):
+            xmin = res.x
+            Jmin = res.fun
+            success = res.success
+        else:
+            xmin = res[0]
+            Jmin = res[1]
+            success = res[-1] == 0
+        if not success:
+            if disp:
+                warnings.warn("Either final optimization did not succeed or `finish` "
+                              "does not return `statuscode` as its last argument.",
+                              RuntimeWarning, stacklevel=2)
+
+    if full_output:
+        return xmin, Jmin, grid, Jout
+    else:
+        return xmin
+
+
+class _Brute_Wrapper:
+    """
+    Object to wrap user cost function for optimize.brute, allowing picklability
+    """
+
+    def __init__(self, f, args):
+        self.f = f
+        self.args = [] if args is None else args
+
+    def __call__(self, x):
+        # flatten needed for one dimensional case.
+        return self.f(np.asarray(x).flatten(), *self.args)
+
+
+def show_options(solver=None, method=None, disp=True):
+    """
+    Show documentation for additional options of optimization solvers.
+
+    These are method-specific options that can be supplied through the
+    ``options`` dict.
+
+    Parameters
+    ----------
+    solver : str
+        Type of optimization solver. One of 'minimize', 'minimize_scalar',
+        'root', 'root_scalar', 'linprog', or 'quadratic_assignment'.
+    method : str, optional
+        If not given, shows all methods of the specified solver. Otherwise,
+        show only the options for the specified method. Valid values
+        corresponds to methods' names of respective solver (e.g., 'BFGS' for
+        'minimize').
+    disp : bool, optional
+        Whether to print the result rather than returning it.
+
+    Returns
+    -------
+    text
+        Either None (for disp=True) or the text string (disp=False)
+
+    Notes
+    -----
+    The solver-specific methods are:
+
+    `scipy.optimize.minimize`
+
+    - :ref:`Nelder-Mead `
+    - :ref:`Powell      `
+    - :ref:`CG          `
+    - :ref:`BFGS        `
+    - :ref:`Newton-CG   `
+    - :ref:`L-BFGS-B    `
+    - :ref:`TNC         `
+    - :ref:`COBYLA      `
+    - :ref:`COBYQA      `
+    - :ref:`SLSQP       `
+    - :ref:`dogleg      `
+    - :ref:`trust-ncg   `
+
+    `scipy.optimize.root`
+
+    - :ref:`hybr              `
+    - :ref:`lm                `
+    - :ref:`broyden1          `
+    - :ref:`broyden2          `
+    - :ref:`anderson          `
+    - :ref:`linearmixing      `
+    - :ref:`diagbroyden       `
+    - :ref:`excitingmixing    `
+    - :ref:`krylov            `
+    - :ref:`df-sane           `
+
+    `scipy.optimize.minimize_scalar`
+
+    - :ref:`brent       `
+    - :ref:`golden      `
+    - :ref:`bounded     `
+
+    `scipy.optimize.root_scalar`
+
+    - :ref:`bisect  `
+    - :ref:`brentq  `
+    - :ref:`brenth  `
+    - :ref:`ridder  `
+    - :ref:`toms748 `
+    - :ref:`newton  `
+    - :ref:`secant  `
+    - :ref:`halley  `
+
+    `scipy.optimize.linprog`
+
+    - :ref:`simplex           `
+    - :ref:`interior-point    `
+    - :ref:`revised simplex   `
+    - :ref:`highs             `
+    - :ref:`highs-ds          `
+    - :ref:`highs-ipm         `
+
+    `scipy.optimize.quadratic_assignment`
+
+    - :ref:`faq             `
+    - :ref:`2opt            `
+
+    Examples
+    --------
+    We can print documentations of a solver in stdout:
+
+    >>> from scipy.optimize import show_options
+    >>> show_options(solver="minimize")
+    ...
+
+    Specifying a method is possible:
+
+    >>> show_options(solver="minimize", method="Nelder-Mead")
+    ...
+
+    We can also get the documentations as a string:
+
+    >>> show_options(solver="minimize", method="Nelder-Mead", disp=False)
+    Minimization of scalar function of one or more variables using the ...
+
+    """
+    import textwrap
+
+    doc_routines = {
+        'minimize': (
+            ('bfgs', 'scipy.optimize._optimize._minimize_bfgs'),
+            ('cg', 'scipy.optimize._optimize._minimize_cg'),
+            ('cobyla', 'scipy.optimize._cobyla_py._minimize_cobyla'),
+            ('cobyqa', 'scipy.optimize._cobyqa_py._minimize_cobyqa'),
+            ('dogleg', 'scipy.optimize._trustregion_dogleg._minimize_dogleg'),
+            ('l-bfgs-b', 'scipy.optimize._lbfgsb_py._minimize_lbfgsb'),
+            ('nelder-mead', 'scipy.optimize._optimize._minimize_neldermead'),
+            ('newton-cg', 'scipy.optimize._optimize._minimize_newtoncg'),
+            ('powell', 'scipy.optimize._optimize._minimize_powell'),
+            ('slsqp', 'scipy.optimize._slsqp_py._minimize_slsqp'),
+            ('tnc', 'scipy.optimize._tnc._minimize_tnc'),
+            ('trust-ncg',
+             'scipy.optimize._trustregion_ncg._minimize_trust_ncg'),
+            ('trust-constr',
+             'scipy.optimize._trustregion_constr.'
+             '_minimize_trustregion_constr'),
+            ('trust-exact',
+             'scipy.optimize._trustregion_exact._minimize_trustregion_exact'),
+            ('trust-krylov',
+             'scipy.optimize._trustregion_krylov._minimize_trust_krylov'),
+        ),
+        'root': (
+            ('hybr', 'scipy.optimize._minpack_py._root_hybr'),
+            ('lm', 'scipy.optimize._root._root_leastsq'),
+            ('broyden1', 'scipy.optimize._root._root_broyden1_doc'),
+            ('broyden2', 'scipy.optimize._root._root_broyden2_doc'),
+            ('anderson', 'scipy.optimize._root._root_anderson_doc'),
+            ('diagbroyden', 'scipy.optimize._root._root_diagbroyden_doc'),
+            ('excitingmixing', 'scipy.optimize._root._root_excitingmixing_doc'),
+            ('linearmixing', 'scipy.optimize._root._root_linearmixing_doc'),
+            ('krylov', 'scipy.optimize._root._root_krylov_doc'),
+            ('df-sane', 'scipy.optimize._spectral._root_df_sane'),
+        ),
+        'root_scalar': (
+            ('bisect', 'scipy.optimize._root_scalar._root_scalar_bisect_doc'),
+            ('brentq', 'scipy.optimize._root_scalar._root_scalar_brentq_doc'),
+            ('brenth', 'scipy.optimize._root_scalar._root_scalar_brenth_doc'),
+            ('ridder', 'scipy.optimize._root_scalar._root_scalar_ridder_doc'),
+            ('toms748', 'scipy.optimize._root_scalar._root_scalar_toms748_doc'),
+            ('secant', 'scipy.optimize._root_scalar._root_scalar_secant_doc'),
+            ('newton', 'scipy.optimize._root_scalar._root_scalar_newton_doc'),
+            ('halley', 'scipy.optimize._root_scalar._root_scalar_halley_doc'),
+        ),
+        'linprog': (
+            ('simplex', 'scipy.optimize._linprog._linprog_simplex_doc'),
+            ('interior-point', 'scipy.optimize._linprog._linprog_ip_doc'),
+            ('revised simplex', 'scipy.optimize._linprog._linprog_rs_doc'),
+            ('highs-ipm', 'scipy.optimize._linprog._linprog_highs_ipm_doc'),
+            ('highs-ds', 'scipy.optimize._linprog._linprog_highs_ds_doc'),
+            ('highs', 'scipy.optimize._linprog._linprog_highs_doc'),
+        ),
+        'quadratic_assignment': (
+            ('faq', 'scipy.optimize._qap._quadratic_assignment_faq'),
+            ('2opt', 'scipy.optimize._qap._quadratic_assignment_2opt'),
+        ),
+        'minimize_scalar': (
+            ('brent', 'scipy.optimize._optimize._minimize_scalar_brent'),
+            ('bounded', 'scipy.optimize._optimize._minimize_scalar_bounded'),
+            ('golden', 'scipy.optimize._optimize._minimize_scalar_golden'),
+        ),
+    }
+
+    if solver is None:
+        text = ["\n\n\n========\n", "minimize\n", "========\n"]
+        text.append(show_options('minimize', disp=False))
+        text.extend(["\n\n===============\n", "minimize_scalar\n",
+                     "===============\n"])
+        text.append(show_options('minimize_scalar', disp=False))
+        text.extend(["\n\n\n====\n", "root\n",
+                     "====\n"])
+        text.append(show_options('root', disp=False))
+        text.extend(['\n\n\n=======\n', 'linprog\n',
+                     '=======\n'])
+        text.append(show_options('linprog', disp=False))
+        text = "".join(text)
+    else:
+        solver = solver.lower()
+        if solver not in doc_routines:
+            raise ValueError(f'Unknown solver {solver!r}')
+
+        if method is None:
+            text = []
+            for name, _ in doc_routines[solver]:
+                text.extend(["\n\n" + name, "\n" + "="*len(name) + "\n\n"])
+                text.append(show_options(solver, name, disp=False))
+            text = "".join(text)
+        else:
+            method = method.lower()
+            methods = dict(doc_routines[solver])
+            if method not in methods:
+                raise ValueError(f"Unknown method {method!r}")
+            name = methods[method]
+
+            # Import function object
+            parts = name.split('.')
+            mod_name = ".".join(parts[:-1])
+            __import__(mod_name)
+            obj = getattr(sys.modules[mod_name], parts[-1])
+
+            # Get doc
+            doc = obj.__doc__
+            if doc is not None:
+                text = textwrap.dedent(doc).strip()
+            else:
+                text = ""
+
+    if disp:
+        print(text)
+        return
+    else:
+        return text
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_qap.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_qap.py
new file mode 100644
index 0000000000000000000000000000000000000000..03fe3b128c066adb21406021ec2e34effbf65703
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_qap.py
@@ -0,0 +1,760 @@
+import numpy as np
+import operator
+import warnings
+import numbers
+from . import (linear_sum_assignment, OptimizeResult)
+from ._optimize import _check_unknown_options
+
+from scipy._lib._util import check_random_state
+import itertools
+
+QUADRATIC_ASSIGNMENT_METHODS = ['faq', '2opt']
+
+
+def quadratic_assignment(A, B, method="faq", options=None):
+    r"""
+    Approximates solution to the quadratic assignment problem and
+    the graph matching problem.
+
+    Quadratic assignment solves problems of the following form:
+
+    .. math::
+
+        \min_P & \ {\ \text{trace}(A^T P B P^T)}\\
+        \mbox{s.t. } & {P \ \epsilon \ \mathcal{P}}\\
+
+    where :math:`\mathcal{P}` is the set of all permutation matrices,
+    and :math:`A` and :math:`B` are square matrices.
+
+    Graph matching tries to *maximize* the same objective function.
+    This algorithm can be thought of as finding the alignment of the
+    nodes of two graphs that minimizes the number of induced edge
+    disagreements, or, in the case of weighted graphs, the sum of squared
+    edge weight differences.
+
+    Note that the quadratic assignment problem is NP-hard. The results given
+    here are approximations and are not guaranteed to be optimal.
+
+
+    Parameters
+    ----------
+    A : 2-D array, square
+        The square matrix :math:`A` in the objective function above.
+
+    B : 2-D array, square
+        The square matrix :math:`B` in the objective function above.
+
+    method :  str in {'faq', '2opt'} (default: 'faq')
+        The algorithm used to solve the problem.
+        :ref:`'faq' ` (default) and
+        :ref:`'2opt' ` are available.
+
+    options : dict, optional
+        A dictionary of solver options. All solvers support the following:
+
+        maximize : bool (default: False)
+            Maximizes the objective function if ``True``.
+
+        partial_match : 2-D array of integers, optional (default: None)
+            Fixes part of the matching. Also known as a "seed" [2]_.
+
+            Each row of `partial_match` specifies a pair of matched nodes:
+            node ``partial_match[i, 0]`` of `A` is matched to node
+            ``partial_match[i, 1]`` of `B`. The array has shape ``(m, 2)``,
+            where ``m`` is not greater than the number of nodes, :math:`n`.
+
+        rng : `numpy.random.Generator`, optional
+            Pseudorandom number generator state. When `rng` is None, a new
+            `numpy.random.Generator` is created using entropy from the
+            operating system. Types other than `numpy.random.Generator` are
+            passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+            .. versionchanged:: 1.15.0
+                As part of the `SPEC-007 `_
+                transition from use of `numpy.random.RandomState` to
+                `numpy.random.Generator` is occurring. Supplying
+                `np.random.RandomState` to this function will now emit a
+                `DeprecationWarning`. In SciPy 1.17 its use will raise an exception.
+                In addition relying on global state using `np.random.seed`
+                will emit a `FutureWarning`. In SciPy 1.17 the global random number
+                generator will no longer be used.
+                Use of an int-like seed will raise a `FutureWarning`, in SciPy 1.17 it
+                will be normalized via `np.random.default_rng` rather than
+                `np.random.RandomState`.
+
+        For method-specific options, see
+        :func:`show_options('quadratic_assignment') `.
+
+    Returns
+    -------
+    res : OptimizeResult
+        `OptimizeResult` containing the following fields.
+
+        col_ind : 1-D array
+            Column indices corresponding to the best permutation found of the
+            nodes of `B`.
+        fun : float
+            The objective value of the solution.
+        nit : int
+            The number of iterations performed during optimization.
+
+    Notes
+    -----
+    The default method :ref:`'faq' ` uses the Fast
+    Approximate QAP algorithm [1]_; it typically offers the best combination of
+    speed and accuracy.
+    Method :ref:`'2opt' ` can be computationally expensive,
+    but may be a useful alternative, or it can be used to refine the solution
+    returned by another method.
+
+    References
+    ----------
+    .. [1] J.T. Vogelstein, J.M. Conroy, V. Lyzinski, L.J. Podrazik,
+           S.G. Kratzer, E.T. Harley, D.E. Fishkind, R.J. Vogelstein, and
+           C.E. Priebe, "Fast approximate quadratic programming for graph
+           matching," PLOS one, vol. 10, no. 4, p. e0121002, 2015,
+           :doi:`10.1371/journal.pone.0121002`
+
+    .. [2] D. Fishkind, S. Adali, H. Patsolic, L. Meng, D. Singh, V. Lyzinski,
+           C. Priebe, "Seeded graph matching", Pattern Recognit. 87 (2019):
+           203-215, :doi:`10.1016/j.patcog.2018.09.014`
+
+    .. [3] "2-opt," Wikipedia.
+           https://en.wikipedia.org/wiki/2-opt
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.optimize import quadratic_assignment
+    >>> rng = np.random.default_rng()
+    >>> A = np.array([[0, 80, 150, 170], [80, 0, 130, 100],
+    ...               [150, 130, 0, 120], [170, 100, 120, 0]])
+    >>> B = np.array([[0, 5, 2, 7], [0, 0, 3, 8],
+    ...               [0, 0, 0, 3], [0, 0, 0, 0]])
+    >>> res = quadratic_assignment(A, B, options={'rng': rng})
+    >>> print(res)
+         fun: 3260
+     col_ind: [0 3 2 1]
+         nit: 9
+
+    The see the relationship between the returned ``col_ind`` and ``fun``,
+    use ``col_ind`` to form the best permutation matrix found, then evaluate
+    the objective function :math:`f(P) = trace(A^T P B P^T )`.
+
+    >>> perm = res['col_ind']
+    >>> P = np.eye(len(A), dtype=int)[perm]
+    >>> fun = np.trace(A.T @ P @ B @ P.T)
+    >>> print(fun)
+    3260
+
+    Alternatively, to avoid constructing the permutation matrix explicitly,
+    directly permute the rows and columns of the distance matrix.
+
+    >>> fun = np.trace(A.T @ B[perm][:, perm])
+    >>> print(fun)
+    3260
+
+    Although not guaranteed in general, ``quadratic_assignment`` happens to
+    have found the globally optimal solution.
+
+    >>> from itertools import permutations
+    >>> perm_opt, fun_opt = None, np.inf
+    >>> for perm in permutations([0, 1, 2, 3]):
+    ...     perm = np.array(perm)
+    ...     fun = np.trace(A.T @ B[perm][:, perm])
+    ...     if fun < fun_opt:
+    ...         fun_opt, perm_opt = fun, perm
+    >>> print(np.array_equal(perm_opt, res['col_ind']))
+    True
+
+    Here is an example for which the default method,
+    :ref:`'faq' `, does not find the global optimum.
+
+    >>> A = np.array([[0, 5, 8, 6], [5, 0, 5, 1],
+    ...               [8, 5, 0, 2], [6, 1, 2, 0]])
+    >>> B = np.array([[0, 1, 8, 4], [1, 0, 5, 2],
+    ...               [8, 5, 0, 5], [4, 2, 5, 0]])
+    >>> res = quadratic_assignment(A, B, options={'rng': rng})
+    >>> print(res)
+         fun: 178
+     col_ind: [1 0 3 2]
+         nit: 13
+
+    If accuracy is important, consider using  :ref:`'2opt' `
+    to refine the solution.
+
+    >>> guess = np.array([np.arange(len(A)), res.col_ind]).T
+    >>> res = quadratic_assignment(A, B, method="2opt",
+    ...     options = {'rng': rng, 'partial_guess': guess})
+    >>> print(res)
+         fun: 176
+     col_ind: [1 2 3 0]
+         nit: 17
+
+    """
+
+    if options is None:
+        options = {}
+
+    method = method.lower()
+    methods = {"faq": _quadratic_assignment_faq,
+               "2opt": _quadratic_assignment_2opt}
+    if method not in methods:
+        raise ValueError(f"method {method} must be in {methods}.")
+
+    _spec007_transition(options.get("rng", None))
+    res = methods[method](A, B, **options)
+    return res
+
+
+def _spec007_transition(rng):
+    if isinstance(rng, np.random.RandomState):
+        warnings.warn(
+            "Use of `RandomState` with `quadratic_assignment` is deprecated"
+            " and will result in an exception in SciPy 1.17",
+            DeprecationWarning,
+            stacklevel=2
+        )
+    if ((rng is None or rng is np.random) and
+            np.random.mtrand._rand._bit_generator._seed_seq is None):
+        warnings.warn(
+            "The NumPy global RNG was seeded by calling `np.random.seed`."
+            " From SciPy 1.17, this function will no longer use the global RNG.",
+            FutureWarning,
+            stacklevel=2
+        )
+    if isinstance(rng, numbers.Integral | np.integer):
+        warnings.warn(
+            "The behavior when the rng option is an integer is changing: the value"
+            " will be normalized using np.random.default_rng beginning in SciPy 1.17,"
+            " and the resulting Generator will be used to generate random numbers.",
+            FutureWarning,
+            stacklevel=2
+        )
+
+
+def _calc_score(A, B, perm):
+    # equivalent to objective function but avoids matmul
+    return np.sum(A * B[perm][:, perm])
+
+
+def _common_input_validation(A, B, partial_match):
+    A = np.atleast_2d(A)
+    B = np.atleast_2d(B)
+
+    if partial_match is None:
+        partial_match = np.array([[], []]).T
+    partial_match = np.atleast_2d(partial_match).astype(int)
+
+    msg = None
+    if A.shape[0] != A.shape[1]:
+        msg = "`A` must be square"
+    elif B.shape[0] != B.shape[1]:
+        msg = "`B` must be square"
+    elif A.ndim != 2 or B.ndim != 2:
+        msg = "`A` and `B` must have exactly two dimensions"
+    elif A.shape != B.shape:
+        msg = "`A` and `B` matrices must be of equal size"
+    elif partial_match.shape[0] > A.shape[0]:
+        msg = "`partial_match` can have only as many seeds as there are nodes"
+    elif partial_match.shape[1] != 2:
+        msg = "`partial_match` must have two columns"
+    elif partial_match.ndim != 2:
+        msg = "`partial_match` must have exactly two dimensions"
+    elif (partial_match < 0).any():
+        msg = "`partial_match` must contain only positive indices"
+    elif (partial_match >= len(A)).any():
+        msg = "`partial_match` entries must be less than number of nodes"
+    elif (not len(set(partial_match[:, 0])) == len(partial_match[:, 0]) or
+          not len(set(partial_match[:, 1])) == len(partial_match[:, 1])):
+        msg = "`partial_match` column entries must be unique"
+
+    if msg is not None:
+        raise ValueError(msg)
+
+    return A, B, partial_match
+
+
+def _quadratic_assignment_faq(A, B,
+                              maximize=False, partial_match=None, rng=None,
+                              P0="barycenter", shuffle_input=False, maxiter=30,
+                              tol=0.03, **unknown_options):
+    r"""Solve the quadratic assignment problem (approximately).
+
+    This function solves the Quadratic Assignment Problem (QAP) and the
+    Graph Matching Problem (GMP) using the Fast Approximate QAP Algorithm
+    (FAQ) [1]_.
+
+    Quadratic assignment solves problems of the following form:
+
+    .. math::
+
+        \min_P & \ {\ \text{trace}(A^T P B P^T)}\\
+        \mbox{s.t. } & {P \ \epsilon \ \mathcal{P}}\\
+
+    where :math:`\mathcal{P}` is the set of all permutation matrices,
+    and :math:`A` and :math:`B` are square matrices.
+
+    Graph matching tries to *maximize* the same objective function.
+    This algorithm can be thought of as finding the alignment of the
+    nodes of two graphs that minimizes the number of induced edge
+    disagreements, or, in the case of weighted graphs, the sum of squared
+    edge weight differences.
+
+    Note that the quadratic assignment problem is NP-hard. The results given
+    here are approximations and are not guaranteed to be optimal.
+
+    Parameters
+    ----------
+    A : 2-D array, square
+        The square matrix :math:`A` in the objective function above.
+    B : 2-D array, square
+        The square matrix :math:`B` in the objective function above.
+    method :  str in {'faq', '2opt'} (default: 'faq')
+        The algorithm used to solve the problem. This is the method-specific
+        documentation for 'faq'.
+        :ref:`'2opt' ` is also available.
+
+    Options
+    -------
+    maximize : bool (default: False)
+        Maximizes the objective function if ``True``.
+    partial_match : 2-D array of integers, optional (default: None)
+        Fixes part of the matching. Also known as a "seed" [2]_.
+
+        Each row of `partial_match` specifies a pair of matched nodes:
+        node ``partial_match[i, 0]`` of `A` is matched to node
+        ``partial_match[i, 1]`` of `B`. The array has shape ``(m, 2)``, where
+        ``m`` is not greater than the number of nodes, :math:`n`.
+
+    rng : {None, int, `numpy.random.Generator`}, optional
+        Pseudorandom number generator state. See `quadratic_assignment` for details.
+    P0 : 2-D array, "barycenter", or "randomized" (default: "barycenter")
+        Initial position. Must be a doubly-stochastic matrix [3]_.
+
+        If the initial position is an array, it must be a doubly stochastic
+        matrix of size :math:`m' \times m'` where :math:`m' = n - m`.
+
+        If ``"barycenter"`` (default), the initial position is the barycenter
+        of the Birkhoff polytope (the space of doubly stochastic matrices).
+        This is a :math:`m' \times m'` matrix with all entries equal to
+        :math:`1 / m'`.
+
+        If ``"randomized"`` the initial search position is
+        :math:`P_0 = (J + K) / 2`, where :math:`J` is the barycenter and
+        :math:`K` is a random doubly stochastic matrix.
+    shuffle_input : bool (default: False)
+        Set to `True` to resolve degenerate gradients randomly. For
+        non-degenerate gradients this option has no effect.
+    maxiter : int, positive (default: 30)
+        Integer specifying the max number of Frank-Wolfe iterations performed.
+    tol : float (default: 0.03)
+        Tolerance for termination. Frank-Wolfe iteration terminates when
+        :math:`\frac{||P_{i}-P_{i+1}||_F}{\sqrt{m'}} \leq tol`,
+        where :math:`i` is the iteration number.
+
+    Returns
+    -------
+    res : OptimizeResult
+        `OptimizeResult` containing the following fields.
+
+        col_ind : 1-D array
+            Column indices corresponding to the best permutation found of the
+            nodes of `B`.
+        fun : float
+            The objective value of the solution.
+        nit : int
+            The number of Frank-Wolfe iterations performed.
+
+    Notes
+    -----
+    The algorithm may be sensitive to the initial permutation matrix (or
+    search "position") due to the possibility of several local minima
+    within the feasible region. A barycenter initialization is more likely to
+    result in a better solution than a single random initialization. However,
+    calling ``quadratic_assignment`` several times with different random
+    initializations may result in a better optimum at the cost of longer
+    total execution time.
+
+    Examples
+    --------
+    As mentioned above, a barycenter initialization often results in a better
+    solution than a single random initialization.
+
+    >>> from scipy.optimize import quadratic_assignment
+    >>> import numpy as np
+    >>> rng = np.random.default_rng()
+    >>> n = 15
+    >>> A = rng.random((n, n))
+    >>> B = rng.random((n, n))
+    >>> options = {"rng": rng}
+    >>> res = quadratic_assignment(A, B, options=options)  # FAQ is default method
+    >>> print(res.fun)
+    47.797048706380636  # may vary
+
+    >>> options = {"rng": rng, "P0": "randomized"}  # use randomized initialization
+    >>> res = quadratic_assignment(A, B, options=options)
+    >>> print(res.fun)
+    47.37287069769966 # may vary
+
+    However, consider running from several randomized initializations and
+    keeping the best result.
+
+    >>> res = min([quadratic_assignment(A, B, options=options)
+    ...            for i in range(30)], key=lambda x: x.fun)
+    >>> print(res.fun)
+    46.55974835248574 # may vary
+
+    The '2-opt' method can be used to attempt to refine the results.
+
+    >>> options = {"partial_guess": np.array([np.arange(n), res.col_ind]).T, "rng": rng}
+    >>> res = quadratic_assignment(A, B, method="2opt", options=options)
+    >>> print(res.fun)
+    46.55974835248574 # may vary
+
+    References
+    ----------
+    .. [1] J.T. Vogelstein, J.M. Conroy, V. Lyzinski, L.J. Podrazik,
+           S.G. Kratzer, E.T. Harley, D.E. Fishkind, R.J. Vogelstein, and
+           C.E. Priebe, "Fast approximate quadratic programming for graph
+           matching," PLOS one, vol. 10, no. 4, p. e0121002, 2015,
+           :doi:`10.1371/journal.pone.0121002`
+
+    .. [2] D. Fishkind, S. Adali, H. Patsolic, L. Meng, D. Singh, V. Lyzinski,
+           C. Priebe, "Seeded graph matching", Pattern Recognit. 87 (2019):
+           203-215, :doi:`10.1016/j.patcog.2018.09.014`
+
+    .. [3] "Doubly stochastic Matrix," Wikipedia.
+           https://en.wikipedia.org/wiki/Doubly_stochastic_matrix
+
+    """
+
+    _check_unknown_options(unknown_options)
+
+    maxiter = operator.index(maxiter)
+
+    # ValueError check
+    A, B, partial_match = _common_input_validation(A, B, partial_match)
+
+    msg = None
+    if isinstance(P0, str) and P0 not in {'barycenter', 'randomized'}:
+        msg = "Invalid 'P0' parameter string"
+    elif maxiter <= 0:
+        msg = "'maxiter' must be a positive integer"
+    elif tol <= 0:
+        msg = "'tol' must be a positive float"
+    if msg is not None:
+        raise ValueError(msg)
+
+    rng = check_random_state(rng)
+    n = len(A)  # number of vertices in graphs
+    n_seeds = len(partial_match)  # number of seeds
+    n_unseed = n - n_seeds
+
+    # [1] Algorithm 1 Line 1 - choose initialization
+    if not isinstance(P0, str):
+        P0 = np.atleast_2d(P0)
+        if P0.shape != (n_unseed, n_unseed):
+            msg = "`P0` matrix must have shape m' x m', where m'=n-m"
+        elif ((P0 < 0).any() or not np.allclose(np.sum(P0, axis=0), 1)
+              or not np.allclose(np.sum(P0, axis=1), 1)):
+            msg = "`P0` matrix must be doubly stochastic"
+        if msg is not None:
+            raise ValueError(msg)
+    elif P0 == 'barycenter':
+        P0 = np.ones((n_unseed, n_unseed)) / n_unseed
+    elif P0 == 'randomized':
+        J = np.ones((n_unseed, n_unseed)) / n_unseed
+        # generate a nxn matrix where each entry is a random number [0, 1]
+        # would use rand, but Generators don't have it
+        # would use random, but old mtrand.RandomStates don't have it
+        K = _doubly_stochastic(rng.uniform(size=(n_unseed, n_unseed)))
+        P0 = (J + K) / 2
+
+    # check trivial cases
+    if n == 0 or n_seeds == n:
+        score = _calc_score(A, B, partial_match[:, 1])
+        res = {"col_ind": partial_match[:, 1], "fun": score, "nit": 0}
+        return OptimizeResult(res)
+
+    obj_func_scalar = 1
+    if maximize:
+        obj_func_scalar = -1
+
+    nonseed_B = np.setdiff1d(range(n), partial_match[:, 1])
+    if shuffle_input:
+        nonseed_B = rng.permutation(nonseed_B)
+
+    nonseed_A = np.setdiff1d(range(n), partial_match[:, 0])
+    perm_A = np.concatenate([partial_match[:, 0], nonseed_A])
+    perm_B = np.concatenate([partial_match[:, 1], nonseed_B])
+
+    # definitions according to Seeded Graph Matching [2].
+    A11, A12, A21, A22 = _split_matrix(A[perm_A][:, perm_A], n_seeds)
+    B11, B12, B21, B22 = _split_matrix(B[perm_B][:, perm_B], n_seeds)
+    const_sum = A21 @ B21.T + A12.T @ B12
+
+    P = P0
+    # [1] Algorithm 1 Line 2 - loop while stopping criteria not met
+    for n_iter in range(1, maxiter+1):
+        # [1] Algorithm 1 Line 3 - compute the gradient of f(P) = -tr(APB^tP^t)
+        grad_fp = (const_sum + A22 @ P @ B22.T + A22.T @ P @ B22)
+        # [1] Algorithm 1 Line 4 - get direction Q by solving Eq. 8
+        _, cols = linear_sum_assignment(grad_fp, maximize=maximize)
+        Q = np.eye(n_unseed)[cols]
+
+        # [1] Algorithm 1 Line 5 - compute the step size
+        # Noting that e.g. trace(Ax) = trace(A)*x, expand and re-collect
+        # terms as ax**2 + bx + c. c does not affect location of minimum
+        # and can be ignored. Also, note that trace(A@B) = (A.T*B).sum();
+        # apply where possible for efficiency.
+        R = P - Q
+        b21 = ((R.T @ A21) * B21).sum()
+        b12 = ((R.T @ A12.T) * B12.T).sum()
+        AR22 = A22.T @ R
+        BR22 = B22 @ R.T
+        b22a = (AR22 * B22.T[cols]).sum()
+        b22b = (A22 * BR22[cols]).sum()
+        a = (AR22.T * BR22).sum()
+        b = b21 + b12 + b22a + b22b
+        # critical point of ax^2 + bx + c is at x = -d/(2*e)
+        # if a * obj_func_scalar > 0, it is a minimum
+        # if minimum is not in [0, 1], only endpoints need to be considered
+        if a*obj_func_scalar > 0 and 0 <= -b/(2*a) <= 1:
+            alpha = -b/(2*a)
+        else:
+            alpha = np.argmin([0, (b + a)*obj_func_scalar])
+
+        # [1] Algorithm 1 Line 6 - Update P
+        P_i1 = alpha * P + (1 - alpha) * Q
+        if np.linalg.norm(P - P_i1) / np.sqrt(n_unseed) < tol:
+            P = P_i1
+            break
+        P = P_i1
+    # [1] Algorithm 1 Line 7 - end main loop
+
+    # [1] Algorithm 1 Line 8 - project onto the set of permutation matrices
+    _, col = linear_sum_assignment(P, maximize=True)
+    perm = np.concatenate((np.arange(n_seeds), col + n_seeds))
+
+    unshuffled_perm = np.zeros(n, dtype=int)
+    unshuffled_perm[perm_A] = perm_B[perm]
+
+    score = _calc_score(A, B, unshuffled_perm)
+    res = {"col_ind": unshuffled_perm, "fun": score, "nit": n_iter}
+    return OptimizeResult(res)
+
+
+def _split_matrix(X, n):
+    # definitions according to Seeded Graph Matching [2].
+    upper, lower = X[:n], X[n:]
+    return upper[:, :n], upper[:, n:], lower[:, :n], lower[:, n:]
+
+
+def _doubly_stochastic(P, tol=1e-3):
+    # Adapted from @btaba implementation
+    # https://github.com/btaba/sinkhorn_knopp
+    # of Sinkhorn-Knopp algorithm
+    # https://projecteuclid.org/euclid.pjm/1102992505
+
+    max_iter = 1000
+    c = 1 / P.sum(axis=0)
+    r = 1 / (P @ c)
+    P_eps = P
+
+    for it in range(max_iter):
+        if ((np.abs(P_eps.sum(axis=1) - 1) < tol).all() and
+                (np.abs(P_eps.sum(axis=0) - 1) < tol).all()):
+            # All column/row sums ~= 1 within threshold
+            break
+
+        c = 1 / (r @ P)
+        r = 1 / (P @ c)
+        P_eps = r[:, None] * P * c
+
+    return P_eps
+
+
+def _quadratic_assignment_2opt(A, B, maximize=False, rng=None,
+                               partial_match=None,
+                               partial_guess=None,
+                               **unknown_options):
+    r"""Solve the quadratic assignment problem (approximately).
+
+    This function solves the Quadratic Assignment Problem (QAP) and the
+    Graph Matching Problem (GMP) using the 2-opt algorithm [1]_.
+
+    Quadratic assignment solves problems of the following form:
+
+    .. math::
+
+        \min_P & \ {\ \text{trace}(A^T P B P^T)}\\
+        \mbox{s.t. } & {P \ \epsilon \ \mathcal{P}}\\
+
+    where :math:`\mathcal{P}` is the set of all permutation matrices,
+    and :math:`A` and :math:`B` are square matrices.
+
+    Graph matching tries to *maximize* the same objective function.
+    This algorithm can be thought of as finding the alignment of the
+    nodes of two graphs that minimizes the number of induced edge
+    disagreements, or, in the case of weighted graphs, the sum of squared
+    edge weight differences.
+
+    Note that the quadratic assignment problem is NP-hard. The results given
+    here are approximations and are not guaranteed to be optimal.
+
+    Parameters
+    ----------
+    A : 2-D array, square
+        The square matrix :math:`A` in the objective function above.
+    B : 2-D array, square
+        The square matrix :math:`B` in the objective function above.
+    method :  str in {'faq', '2opt'} (default: 'faq')
+        The algorithm used to solve the problem. This is the method-specific
+        documentation for '2opt'.
+        :ref:`'faq' ` is also available.
+
+    Options
+    -------
+    maximize : bool (default: False)
+        Maximizes the objective function if ``True``.
+    rng : {None, int, `numpy.random.Generator`}, optional
+        Pseudorandom number generator state. See `quadratic_assignment` for details.
+    partial_match : 2-D array of integers, optional (default: None)
+        Fixes part of the matching. Also known as a "seed" [2]_.
+
+        Each row of `partial_match` specifies a pair of matched nodes: node
+        ``partial_match[i, 0]`` of `A` is matched to node
+        ``partial_match[i, 1]`` of `B`. The array has shape ``(m, 2)``,
+        where ``m`` is not greater than the number of nodes, :math:`n`.
+
+        .. note::
+             `partial_match` must be sorted by the first column.
+
+    partial_guess : 2-D array of integers, optional (default: None)
+        A guess for the matching between the two matrices. Unlike
+        `partial_match`, `partial_guess` does not fix the indices; they are
+        still free to be optimized.
+
+        Each row of `partial_guess` specifies a pair of matched nodes: node
+        ``partial_guess[i, 0]`` of `A` is matched to node
+        ``partial_guess[i, 1]`` of `B`. The array has shape ``(m, 2)``,
+        where ``m`` is not greater than the number of nodes, :math:`n`.
+
+        .. note::
+                `partial_guess` must be sorted by the first column.
+
+    Returns
+    -------
+    res : OptimizeResult
+        `OptimizeResult` containing the following fields.
+
+        col_ind : 1-D array
+            Column indices corresponding to the best permutation found of the
+            nodes of `B`.
+        fun : float
+            The objective value of the solution.
+        nit : int
+            The number of iterations performed during optimization.
+
+    Notes
+    -----
+    This is a greedy algorithm that works similarly to bubble sort: beginning
+    with an initial permutation, it iteratively swaps pairs of indices to
+    improve the objective function until no such improvements are possible.
+
+    References
+    ----------
+    .. [1] "2-opt," Wikipedia.
+           https://en.wikipedia.org/wiki/2-opt
+
+    .. [2] D. Fishkind, S. Adali, H. Patsolic, L. Meng, D. Singh, V. Lyzinski,
+           C. Priebe, "Seeded graph matching", Pattern Recognit. 87 (2019):
+           203-215, https://doi.org/10.1016/j.patcog.2018.09.014
+
+    """
+    _check_unknown_options(unknown_options)
+    rng = check_random_state(rng)
+    A, B, partial_match = _common_input_validation(A, B, partial_match)
+
+    N = len(A)
+    # check trivial cases
+    if N == 0 or partial_match.shape[0] == N:
+        score = _calc_score(A, B, partial_match[:, 1])
+        res = {"col_ind": partial_match[:, 1], "fun": score, "nit": 0}
+        return OptimizeResult(res)
+
+    if partial_guess is None:
+        partial_guess = np.array([[], []]).T
+    partial_guess = np.atleast_2d(partial_guess).astype(int)
+
+    msg = None
+    if partial_guess.shape[0] > A.shape[0]:
+        msg = ("`partial_guess` can have only as "
+               "many entries as there are nodes")
+    elif partial_guess.shape[1] != 2:
+        msg = "`partial_guess` must have two columns"
+    elif partial_guess.ndim != 2:
+        msg = "`partial_guess` must have exactly two dimensions"
+    elif (partial_guess < 0).any():
+        msg = "`partial_guess` must contain only positive indices"
+    elif (partial_guess >= len(A)).any():
+        msg = "`partial_guess` entries must be less than number of nodes"
+    elif (not len(set(partial_guess[:, 0])) == len(partial_guess[:, 0]) or
+          not len(set(partial_guess[:, 1])) == len(partial_guess[:, 1])):
+        msg = "`partial_guess` column entries must be unique"
+    if msg is not None:
+        raise ValueError(msg)
+
+    fixed_rows = None
+    if partial_match.size or partial_guess.size:
+        # use partial_match and partial_guess for initial permutation,
+        # but randomly permute the rest.
+        guess_rows = np.zeros(N, dtype=bool)
+        guess_cols = np.zeros(N, dtype=bool)
+        fixed_rows = np.zeros(N, dtype=bool)
+        fixed_cols = np.zeros(N, dtype=bool)
+        perm = np.zeros(N, dtype=int)
+
+        rg, cg = partial_guess.T
+        guess_rows[rg] = True
+        guess_cols[cg] = True
+        perm[guess_rows] = cg
+
+        # match overrides guess
+        rf, cf = partial_match.T
+        fixed_rows[rf] = True
+        fixed_cols[cf] = True
+        perm[fixed_rows] = cf
+
+        random_rows = ~fixed_rows & ~guess_rows
+        random_cols = ~fixed_cols & ~guess_cols
+        perm[random_rows] = rng.permutation(np.arange(N)[random_cols])
+    else:
+        perm = rng.permutation(np.arange(N))
+
+    best_score = _calc_score(A, B, perm)
+
+    i_free = np.arange(N)
+    if fixed_rows is not None:
+        i_free = i_free[~fixed_rows]
+
+    better = operator.gt if maximize else operator.lt
+    n_iter = 0
+    done = False
+    while not done:
+        # equivalent to nested for loops i in range(N), j in range(i, N)
+        for i, j in itertools.combinations_with_replacement(i_free, 2):
+            n_iter += 1
+            perm[i], perm[j] = perm[j], perm[i]
+            score = _calc_score(A, B, perm)
+            if better(score, best_score):
+                best_score = score
+                break
+            # faster to swap back than to create a new list every time
+            perm[i], perm[j] = perm[j], perm[i]
+        else:  # no swaps made
+            done = True
+
+    res = {"col_ind": perm, "fun": best_score, "nit": n_iter}
+    return OptimizeResult(res)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_remove_redundancy.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_remove_redundancy.py
new file mode 100644
index 0000000000000000000000000000000000000000..cb81ad1696b768d2304b2fc42a80cc9678cbde00
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_remove_redundancy.py
@@ -0,0 +1,522 @@
+"""
+Routines for removing redundant (linearly dependent) equations from linear
+programming equality constraints.
+"""
+# Author: Matt Haberland
+
+import numpy as np
+from scipy.linalg import svd
+from scipy.linalg.interpolative import interp_decomp
+import scipy
+from scipy.linalg.blas import dtrsm
+
+
+def _row_count(A):
+    """
+    Counts the number of nonzeros in each row of input array A.
+    Nonzeros are defined as any element with absolute value greater than
+    tol = 1e-13. This value should probably be an input to the function.
+
+    Parameters
+    ----------
+    A : 2-D array
+        An array representing a matrix
+
+    Returns
+    -------
+    rowcount : 1-D array
+        Number of nonzeros in each row of A
+
+    """
+    tol = 1e-13
+    return np.array((abs(A) > tol).sum(axis=1)).flatten()
+
+
+def _get_densest(A, eligibleRows):
+    """
+    Returns the index of the densest row of A. Ignores rows that are not
+    eligible for consideration.
+
+    Parameters
+    ----------
+    A : 2-D array
+        An array representing a matrix
+    eligibleRows : 1-D logical array
+        Values indicate whether the corresponding row of A is eligible
+        to be considered
+
+    Returns
+    -------
+    i_densest : int
+        Index of the densest row in A eligible for consideration
+
+    """
+    rowCounts = _row_count(A)
+    return np.argmax(rowCounts * eligibleRows)
+
+
+def _remove_zero_rows(A, b):
+    """
+    Eliminates trivial equations from system of equations defined by Ax = b
+   and identifies trivial infeasibilities
+
+    Parameters
+    ----------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    b : 1-D array
+        An array representing the right-hand side of a system of equations
+
+    Returns
+    -------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    b : 1-D array
+        An array representing the right-hand side of a system of equations
+    status: int
+        An integer indicating the status of the removal operation
+        0: No infeasibility identified
+        2: Trivially infeasible
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    """
+    status = 0
+    message = ""
+    i_zero = _row_count(A) == 0
+    A = A[np.logical_not(i_zero), :]
+    if not np.allclose(b[i_zero], 0):
+        status = 2
+        message = "There is a zero row in A_eq with a nonzero corresponding " \
+                  "entry in b_eq. The problem is infeasible."
+    b = b[np.logical_not(i_zero)]
+    return A, b, status, message
+
+
+def bg_update_dense(plu, perm_r, v, j):
+    LU, p = plu
+
+    vperm = v[perm_r]
+    u = dtrsm(1, LU, vperm, lower=1, diag=1)
+    LU[:j+1, j] = u[:j+1]
+    l = u[j+1:]
+    piv = LU[j, j]
+    LU[j+1:, j] += (l/piv)
+    return LU, p
+
+
+def _remove_redundancy_pivot_dense(A, rhs, true_rank=None):
+    """
+    Eliminates redundant equations from system of equations defined by Ax = b
+    and identifies infeasibilities.
+
+    Parameters
+    ----------
+    A : 2-D sparse matrix
+        An matrix representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+
+    Returns
+    -------
+    A : 2-D sparse matrix
+        A matrix representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+    status: int
+        An integer indicating the status of the system
+        0: No infeasibility identified
+        2: Trivially infeasible
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    References
+    ----------
+    .. [2] Andersen, Erling D. "Finding all linearly dependent rows in
+           large-scale linear programming." Optimization Methods and Software
+           6.3 (1995): 219-227.
+
+    """
+    tolapiv = 1e-8
+    tolprimal = 1e-8
+    status = 0
+    message = ""
+    inconsistent = ("There is a linear combination of rows of A_eq that "
+                    "results in zero, suggesting a redundant constraint. "
+                    "However the same linear combination of b_eq is "
+                    "nonzero, suggesting that the constraints conflict "
+                    "and the problem is infeasible.")
+    A, rhs, status, message = _remove_zero_rows(A, rhs)
+
+    if status != 0:
+        return A, rhs, status, message
+
+    m, n = A.shape
+
+    v = list(range(m))      # Artificial column indices.
+    b = list(v)             # Basis column indices.
+    # This is better as a list than a set because column order of basis matrix
+    # needs to be consistent.
+    d = []                  # Indices of dependent rows
+    perm_r = None
+
+    A_orig = A
+    A = np.zeros((m, m + n), order='F')
+    np.fill_diagonal(A, 1)
+    A[:, m:] = A_orig
+    e = np.zeros(m)
+
+    js_candidates = np.arange(m, m+n, dtype=int)  # candidate columns for basis
+    # manual masking was faster than masked array
+    js_mask = np.ones(js_candidates.shape, dtype=bool)
+
+    # Implements basic algorithm from [2]
+    # Uses some of the suggested improvements (removing zero rows and
+    # Bartels-Golub update idea).
+    # Removing column singletons would be easy, but it is not as important
+    # because the procedure is performed only on the equality constraint
+    # matrix from the original problem - not on the canonical form matrix,
+    # which would have many more column singletons due to slack variables
+    # from the inequality constraints.
+    # The thoughts on "crashing" the initial basis are only really useful if
+    # the matrix is sparse.
+
+    lu = np.eye(m, order='F'), np.arange(m)  # initial LU is trivial
+    perm_r = lu[1]
+    for i in v:
+
+        e[i] = 1
+        if i > 0:
+            e[i-1] = 0
+
+        try:  # fails for i==0 and any time it gets ill-conditioned
+            j = b[i-1]
+            lu = bg_update_dense(lu, perm_r, A[:, j], i-1)
+        except Exception:
+            lu = scipy.linalg.lu_factor(A[:, b])
+            LU, p = lu
+            perm_r = list(range(m))
+            for i1, i2 in enumerate(p):
+                perm_r[i1], perm_r[i2] = perm_r[i2], perm_r[i1]
+
+        pi = scipy.linalg.lu_solve(lu, e, trans=1)
+
+        js = js_candidates[js_mask]
+        batch = 50
+
+        # This is a tiny bit faster than looping over columns individually,
+        # like for j in js: if abs(A[:,j].transpose().dot(pi)) > tolapiv:
+        for j_index in range(0, len(js), batch):
+            j_indices = js[j_index: min(j_index+batch, len(js))]
+
+            c = abs(A[:, j_indices].transpose().dot(pi))
+            if (c > tolapiv).any():
+                j = js[j_index + np.argmax(c)]  # very independent column
+                b[i] = j
+                js_mask[j-m] = False
+                break
+        else:
+            bibar = pi.T.dot(rhs.reshape(-1, 1))
+            bnorm = np.linalg.norm(rhs)
+            if abs(bibar)/(1+bnorm) > tolprimal:  # inconsistent
+                status = 2
+                message = inconsistent
+                return A_orig, rhs, status, message
+            else:  # dependent
+                d.append(i)
+                if true_rank is not None and len(d) == m - true_rank:
+                    break   # found all redundancies
+
+    keep = set(range(m))
+    keep = list(keep - set(d))
+    return A_orig[keep, :], rhs[keep], status, message
+
+
+def _remove_redundancy_pivot_sparse(A, rhs):
+    """
+    Eliminates redundant equations from system of equations defined by Ax = b
+    and identifies infeasibilities.
+
+    Parameters
+    ----------
+    A : 2-D sparse matrix
+        An matrix representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+
+    Returns
+    -------
+    A : 2-D sparse matrix
+        A matrix representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+    status: int
+        An integer indicating the status of the system
+        0: No infeasibility identified
+        2: Trivially infeasible
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    References
+    ----------
+    .. [2] Andersen, Erling D. "Finding all linearly dependent rows in
+           large-scale linear programming." Optimization Methods and Software
+           6.3 (1995): 219-227.
+
+    """
+
+    tolapiv = 1e-8
+    tolprimal = 1e-8
+    status = 0
+    message = ""
+    inconsistent = ("There is a linear combination of rows of A_eq that "
+                    "results in zero, suggesting a redundant constraint. "
+                    "However the same linear combination of b_eq is "
+                    "nonzero, suggesting that the constraints conflict "
+                    "and the problem is infeasible.")
+    A, rhs, status, message = _remove_zero_rows(A, rhs)
+
+    if status != 0:
+        return A, rhs, status, message
+
+    m, n = A.shape
+
+    v = list(range(m))      # Artificial column indices.
+    b = list(v)             # Basis column indices.
+    # This is better as a list than a set because column order of basis matrix
+    # needs to be consistent.
+    k = set(range(m, m+n))  # Structural column indices.
+    d = []                  # Indices of dependent rows
+
+    A_orig = A
+    A = scipy.sparse.hstack((scipy.sparse.eye(m), A)).tocsc()
+    e = np.zeros(m)
+
+    # Implements basic algorithm from [2]
+    # Uses only one of the suggested improvements (removing zero rows).
+    # Removing column singletons would be easy, but it is not as important
+    # because the procedure is performed only on the equality constraint
+    # matrix from the original problem - not on the canonical form matrix,
+    # which would have many more column singletons due to slack variables
+    # from the inequality constraints.
+    # The thoughts on "crashing" the initial basis sound useful, but the
+    # description of the procedure seems to assume a lot of familiarity with
+    # the subject; it is not very explicit. I already went through enough
+    # trouble getting the basic algorithm working, so I was not interested in
+    # trying to decipher this, too. (Overall, the paper is fraught with
+    # mistakes and ambiguities - which is strange, because the rest of
+    # Andersen's papers are quite good.)
+    # I tried and tried and tried to improve performance using the
+    # Bartels-Golub update. It works, but it's only practical if the LU
+    # factorization can be specialized as described, and that is not possible
+    # until the SciPy SuperLU interface permits control over column
+    # permutation - see issue #7700.
+
+    for i in v:
+        B = A[:, b]
+
+        e[i] = 1
+        if i > 0:
+            e[i-1] = 0
+
+        pi = scipy.sparse.linalg.spsolve(B.transpose(), e).reshape(-1, 1)
+
+        js = list(k-set(b))  # not efficient, but this is not the time sink...
+
+        # Due to overhead, it tends to be faster (for problems tested) to
+        # compute the full matrix-vector product rather than individual
+        # vector-vector products (with the chance of terminating as soon
+        # as any are nonzero). For very large matrices, it might be worth
+        # it to compute, say, 100 or 1000 at a time and stop when a nonzero
+        # is found.
+
+        c = (np.abs(A[:, js].transpose().dot(pi)) > tolapiv).nonzero()[0]
+        if len(c) > 0:  # independent
+            j = js[c[0]]
+            # in a previous commit, the previous line was changed to choose
+            # index j corresponding with the maximum dot product.
+            # While this avoided issues with almost
+            # singular matrices, it slowed the routine in most NETLIB tests.
+            # I think this is because these columns were denser than the
+            # first column with nonzero dot product (c[0]).
+            # It would be nice to have a heuristic that balances sparsity with
+            # high dot product, but I don't think it's worth the time to
+            # develop one right now. Bartels-Golub update is a much higher
+            # priority.
+            b[i] = j  # replace artificial column
+        else:
+            bibar = pi.T.dot(rhs.reshape(-1, 1))
+            bnorm = np.linalg.norm(rhs)
+            if abs(bibar)/(1 + bnorm) > tolprimal:
+                status = 2
+                message = inconsistent
+                return A_orig, rhs, status, message
+            else:  # dependent
+                d.append(i)
+
+    keep = set(range(m))
+    keep = list(keep - set(d))
+    return A_orig[keep, :], rhs[keep], status, message
+
+
+def _remove_redundancy_svd(A, b):
+    """
+    Eliminates redundant equations from system of equations defined by Ax = b
+    and identifies infeasibilities.
+
+    Parameters
+    ----------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    b : 1-D array
+        An array representing the right-hand side of a system of equations
+
+    Returns
+    -------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    b : 1-D array
+        An array representing the right-hand side of a system of equations
+    status: int
+        An integer indicating the status of the system
+        0: No infeasibility identified
+        2: Trivially infeasible
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    References
+    ----------
+    .. [2] Andersen, Erling D. "Finding all linearly dependent rows in
+           large-scale linear programming." Optimization Methods and Software
+           6.3 (1995): 219-227.
+
+    """
+
+    A, b, status, message = _remove_zero_rows(A, b)
+
+    if status != 0:
+        return A, b, status, message
+
+    U, s, Vh = svd(A)
+    eps = np.finfo(float).eps
+    tol = s.max() * max(A.shape) * eps
+
+    m, n = A.shape
+    s_min = s[-1] if m <= n else 0
+
+    # this algorithm is faster than that of [2] when the nullspace is small
+    # but it could probably be improvement by randomized algorithms and with
+    # a sparse implementation.
+    # it relies on repeated singular value decomposition to find linearly
+    # dependent rows (as identified by columns of U that correspond with zero
+    # singular values). Unfortunately, only one row can be removed per
+    # decomposition (I tried otherwise; doing so can cause problems.)
+    # It would be nice if we could do truncated SVD like sp.sparse.linalg.svds
+    # but that function is unreliable at finding singular values near zero.
+    # Finding max eigenvalue L of A A^T, then largest eigenvalue (and
+    # associated eigenvector) of -A A^T + L I (I is identity) via power
+    # iteration would also work in theory, but is only efficient if the
+    # smallest nonzero eigenvalue of A A^T is close to the largest nonzero
+    # eigenvalue.
+
+    while abs(s_min) < tol:
+        v = U[:, -1]  # TODO: return these so user can eliminate from problem?
+        # rows need to be represented in significant amount
+        eligibleRows = np.abs(v) > tol * 10e6
+        if not np.any(eligibleRows) or np.any(np.abs(v.dot(A)) > tol):
+            status = 4
+            message = ("Due to numerical issues, redundant equality "
+                       "constraints could not be removed automatically. "
+                       "Try providing your constraint matrices as sparse "
+                       "matrices to activate sparse presolve, try turning "
+                       "off redundancy removal, or try turning off presolve "
+                       "altogether.")
+            break
+        if np.any(np.abs(v.dot(b)) > tol * 100):  # factor of 100 to fix 10038 and 10349
+            status = 2
+            message = ("There is a linear combination of rows of A_eq that "
+                       "results in zero, suggesting a redundant constraint. "
+                       "However the same linear combination of b_eq is "
+                       "nonzero, suggesting that the constraints conflict "
+                       "and the problem is infeasible.")
+            break
+
+        i_remove = _get_densest(A, eligibleRows)
+        A = np.delete(A, i_remove, axis=0)
+        b = np.delete(b, i_remove)
+        U, s, Vh = svd(A)
+        m, n = A.shape
+        s_min = s[-1] if m <= n else 0
+
+    return A, b, status, message
+
+
+def _remove_redundancy_id(A, rhs, rank=None, randomized=True):
+    """Eliminates redundant equations from a system of equations.
+
+    Eliminates redundant equations from system of equations defined by Ax = b
+    and identifies infeasibilities.
+
+    Parameters
+    ----------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+    rank : int, optional
+        The rank of A
+    randomized: bool, optional
+        True for randomized interpolative decomposition
+
+    Returns
+    -------
+    A : 2-D array
+        An array representing the left-hand side of a system of equations
+    rhs : 1-D array
+        An array representing the right-hand side of a system of equations
+    status: int
+        An integer indicating the status of the system
+        0: No infeasibility identified
+        2: Trivially infeasible
+    message : str
+        A string descriptor of the exit status of the optimization.
+
+    """
+
+    status = 0
+    message = ""
+    inconsistent = ("There is a linear combination of rows of A_eq that "
+                    "results in zero, suggesting a redundant constraint. "
+                    "However the same linear combination of b_eq is "
+                    "nonzero, suggesting that the constraints conflict "
+                    "and the problem is infeasible.")
+
+    A, rhs, status, message = _remove_zero_rows(A, rhs)
+
+    if status != 0:
+        return A, rhs, status, message
+
+    m, n = A.shape
+
+    k = rank
+    if rank is None:
+        k = np.linalg.matrix_rank(A)
+
+    idx, proj = interp_decomp(A.T, k, rand=randomized)
+
+    # first k entries in idx are indices of the independent rows
+    # remaining entries are the indices of the m-k dependent rows
+    # proj provides a linear combinations of rows of A2 that form the
+    # remaining m-k (dependent) rows. The same linear combination of entries
+    # in rhs2 must give the remaining m-k entries. If not, the system is
+    # inconsistent, and the problem is infeasible.
+    if not np.allclose(rhs[idx[:k]] @ proj, rhs[idx[k:]]):
+        status = 2
+        message = inconsistent
+
+    # sort indices because the other redundancy removal routines leave rows
+    # in original order and tests were written with that in mind
+    idx = sorted(idx[:k])
+    A2 = A[idx, :]
+    rhs2 = rhs[idx]
+    return A2, rhs2, status, message
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root.py
new file mode 100644
index 0000000000000000000000000000000000000000..fdf5a0cf409392d4c3ece21f23ad2e061860c699
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root.py
@@ -0,0 +1,732 @@
+"""
+Unified interfaces to root finding algorithms.
+
+Functions
+---------
+- root : find a root of a vector function.
+"""
+__all__ = ['root']
+
+import numpy as np
+
+from warnings import warn
+
+from ._optimize import MemoizeJac, OptimizeResult, _check_unknown_options
+from ._minpack_py import _root_hybr, leastsq
+from ._spectral import _root_df_sane
+from . import _nonlin as nonlin
+
+
+ROOT_METHODS = ['hybr', 'lm', 'broyden1', 'broyden2', 'anderson',
+                'linearmixing', 'diagbroyden', 'excitingmixing', 'krylov',
+                'df-sane']
+
+
+def root(fun, x0, args=(), method='hybr', jac=None, tol=None, callback=None,
+         options=None):
+    r"""
+    Find a root of a vector function.
+
+    Parameters
+    ----------
+    fun : callable
+        A vector function to find a root of.
+
+        Suppose the callable has signature ``f0(x, *my_args, **my_kwargs)``, where
+        ``my_args`` and ``my_kwargs`` are required positional and keyword arguments.
+        Rather than passing ``f0`` as the callable, wrap it to accept
+        only ``x``; e.g., pass ``fun=lambda x: f0(x, *my_args, **my_kwargs)`` as the
+        callable, where ``my_args`` (tuple) and ``my_kwargs`` (dict) have been
+        gathered before invoking this function.
+    x0 : ndarray
+        Initial guess.
+    args : tuple, optional
+        Extra arguments passed to the objective function and its Jacobian.
+    method : str, optional
+        Type of solver. Should be one of
+
+        - 'hybr'             :ref:`(see here) `
+        - 'lm'               :ref:`(see here) `
+        - 'broyden1'         :ref:`(see here) `
+        - 'broyden2'         :ref:`(see here) `
+        - 'anderson'         :ref:`(see here) `
+        - 'linearmixing'     :ref:`(see here) `
+        - 'diagbroyden'      :ref:`(see here) `
+        - 'excitingmixing'   :ref:`(see here) `
+        - 'krylov'           :ref:`(see here) `
+        - 'df-sane'          :ref:`(see here) `
+
+    jac : bool or callable, optional
+        If `jac` is a Boolean and is True, `fun` is assumed to return the
+        value of Jacobian along with the objective function. If False, the
+        Jacobian will be estimated numerically.
+        `jac` can also be a callable returning the Jacobian of `fun`. In
+        this case, it must accept the same arguments as `fun`.
+    tol : float, optional
+        Tolerance for termination. For detailed control, use solver-specific
+        options.
+    callback : function, optional
+        Optional callback function. It is called on every iteration as
+        ``callback(x, f)`` where `x` is the current solution and `f`
+        the corresponding residual. For all methods but 'hybr' and 'lm'.
+    options : dict, optional
+        A dictionary of solver options. E.g., `xtol` or `maxiter`, see
+        :obj:`show_options()` for details.
+
+    Returns
+    -------
+    sol : OptimizeResult
+        The solution represented as a ``OptimizeResult`` object.
+        Important attributes are: ``x`` the solution array, ``success`` a
+        Boolean flag indicating if the algorithm exited successfully and
+        ``message`` which describes the cause of the termination. See
+        `OptimizeResult` for a description of other attributes.
+
+    See also
+    --------
+    show_options : Additional options accepted by the solvers
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter. The default method is *hybr*.
+
+    Method *hybr* uses a modification of the Powell hybrid method as
+    implemented in MINPACK [1]_.
+
+    Method *lm* solves the system of nonlinear equations in a least squares
+    sense using a modification of the Levenberg-Marquardt algorithm as
+    implemented in MINPACK [1]_.
+
+    Method *df-sane* is a derivative-free spectral method. [3]_
+
+    Methods *broyden1*, *broyden2*, *anderson*, *linearmixing*,
+    *diagbroyden*, *excitingmixing*, *krylov* are inexact Newton methods,
+    with backtracking or full line searches [2]_. Each method corresponds
+    to a particular Jacobian approximations.
+
+    - Method *broyden1* uses Broyden's first Jacobian approximation, it is
+      known as Broyden's good method.
+    - Method *broyden2* uses Broyden's second Jacobian approximation, it
+      is known as Broyden's bad method.
+    - Method *anderson* uses (extended) Anderson mixing.
+    - Method *Krylov* uses Krylov approximation for inverse Jacobian. It
+      is suitable for large-scale problem.
+    - Method *diagbroyden* uses diagonal Broyden Jacobian approximation.
+    - Method *linearmixing* uses a scalar Jacobian approximation.
+    - Method *excitingmixing* uses a tuned diagonal Jacobian
+      approximation.
+
+    .. warning::
+
+        The algorithms implemented for methods *diagbroyden*,
+        *linearmixing* and *excitingmixing* may be useful for specific
+        problems, but whether they will work may depend strongly on the
+        problem.
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1] More, Jorge J., Burton S. Garbow, and Kenneth E. Hillstrom.
+       1980. User Guide for MINPACK-1.
+    .. [2] C. T. Kelley. 1995. Iterative Methods for Linear and Nonlinear
+       Equations. Society for Industrial and Applied Mathematics.
+       
+    .. [3] W. La Cruz, J.M. Martinez, M. Raydan. Math. Comp. 75, 1429 (2006).
+
+    Examples
+    --------
+    The following functions define a system of nonlinear equations and its
+    jacobian.
+
+    >>> import numpy as np
+    >>> def fun(x):
+    ...     return [x[0]  + 0.5 * (x[0] - x[1])**3 - 1.0,
+    ...             0.5 * (x[1] - x[0])**3 + x[1]]
+
+    >>> def jac(x):
+    ...     return np.array([[1 + 1.5 * (x[0] - x[1])**2,
+    ...                       -1.5 * (x[0] - x[1])**2],
+    ...                      [-1.5 * (x[1] - x[0])**2,
+    ...                       1 + 1.5 * (x[1] - x[0])**2]])
+
+    A solution can be obtained as follows.
+
+    >>> from scipy import optimize
+    >>> sol = optimize.root(fun, [0, 0], jac=jac, method='hybr')
+    >>> sol.x
+    array([ 0.8411639,  0.1588361])
+
+    **Large problem**
+
+    Suppose that we needed to solve the following integrodifferential
+    equation on the square :math:`[0,1]\times[0,1]`:
+
+    .. math::
+
+       \nabla^2 P = 10 \left(\int_0^1\int_0^1\cosh(P)\,dx\,dy\right)^2
+
+    with :math:`P(x,1) = 1` and :math:`P=0` elsewhere on the boundary of
+    the square.
+
+    The solution can be found using the ``method='krylov'`` solver:
+
+    >>> from scipy import optimize
+    >>> # parameters
+    >>> nx, ny = 75, 75
+    >>> hx, hy = 1./(nx-1), 1./(ny-1)
+
+    >>> P_left, P_right = 0, 0
+    >>> P_top, P_bottom = 1, 0
+
+    >>> def residual(P):
+    ...    d2x = np.zeros_like(P)
+    ...    d2y = np.zeros_like(P)
+    ...
+    ...    d2x[1:-1] = (P[2:]   - 2*P[1:-1] + P[:-2]) / hx/hx
+    ...    d2x[0]    = (P[1]    - 2*P[0]    + P_left)/hx/hx
+    ...    d2x[-1]   = (P_right - 2*P[-1]   + P[-2])/hx/hx
+    ...
+    ...    d2y[:,1:-1] = (P[:,2:] - 2*P[:,1:-1] + P[:,:-2])/hy/hy
+    ...    d2y[:,0]    = (P[:,1]  - 2*P[:,0]    + P_bottom)/hy/hy
+    ...    d2y[:,-1]   = (P_top   - 2*P[:,-1]   + P[:,-2])/hy/hy
+    ...
+    ...    return d2x + d2y - 10*np.cosh(P).mean()**2
+
+    >>> guess = np.zeros((nx, ny), float)
+    >>> sol = optimize.root(residual, guess, method='krylov')
+    >>> print('Residual: %g' % abs(residual(sol.x)).max())
+    Residual: 5.7972e-06  # may vary
+
+    >>> import matplotlib.pyplot as plt
+    >>> x, y = np.mgrid[0:1:(nx*1j), 0:1:(ny*1j)]
+    >>> plt.pcolormesh(x, y, sol.x, shading='gouraud')
+    >>> plt.colorbar()
+    >>> plt.show()
+
+    """
+    def _wrapped_fun(*fargs):
+        """
+        Wrapped `func` to track the number of times
+        the function has been called.
+        """
+        _wrapped_fun.nfev += 1
+        return fun(*fargs)
+
+    _wrapped_fun.nfev = 0
+
+    if not isinstance(args, tuple):
+        args = (args,)
+
+    meth = method.lower()
+    if options is None:
+        options = {}
+
+    if callback is not None and meth in ('hybr', 'lm'):
+        warn(f'Method {method} does not accept callback.',
+             RuntimeWarning, stacklevel=2)
+
+    # fun also returns the Jacobian
+    if not callable(jac) and meth in ('hybr', 'lm'):
+        if bool(jac):
+            fun = MemoizeJac(fun)
+            jac = fun.derivative
+        else:
+            jac = None
+
+    # set default tolerances
+    if tol is not None:
+        options = dict(options)
+        if meth in ('hybr', 'lm'):
+            options.setdefault('xtol', tol)
+        elif meth in ('df-sane',):
+            options.setdefault('ftol', tol)
+        elif meth in ('broyden1', 'broyden2', 'anderson', 'linearmixing',
+                      'diagbroyden', 'excitingmixing', 'krylov'):
+            options.setdefault('xtol', tol)
+            options.setdefault('xatol', np.inf)
+            options.setdefault('ftol', np.inf)
+            options.setdefault('fatol', np.inf)
+
+    if meth == 'hybr':
+        sol = _root_hybr(_wrapped_fun, x0, args=args, jac=jac, **options)
+    elif meth == 'lm':
+        sol = _root_leastsq(_wrapped_fun, x0, args=args, jac=jac, **options)
+    elif meth == 'df-sane':
+        _warn_jac_unused(jac, method)
+        sol = _root_df_sane(_wrapped_fun, x0, args=args, callback=callback,
+                            **options)
+    elif meth in ('broyden1', 'broyden2', 'anderson', 'linearmixing',
+                  'diagbroyden', 'excitingmixing', 'krylov'):
+        _warn_jac_unused(jac, method)
+        sol = _root_nonlin_solve(_wrapped_fun, x0, args=args, jac=jac,
+                                 _method=meth, _callback=callback,
+                                 **options)
+    else:
+        raise ValueError(f'Unknown solver {method}')
+
+    sol.nfev = _wrapped_fun.nfev
+    return sol
+
+
+def _warn_jac_unused(jac, method):
+    if jac is not None:
+        warn(f'Method {method} does not use the jacobian (jac).',
+             RuntimeWarning, stacklevel=2)
+
+
+def _root_leastsq(fun, x0, args=(), jac=None,
+                  col_deriv=0, xtol=1.49012e-08, ftol=1.49012e-08,
+                  gtol=0.0, maxiter=0, eps=0.0, factor=100, diag=None,
+                  **unknown_options):
+    """
+    Solve for least squares with Levenberg-Marquardt
+
+    Options
+    -------
+    col_deriv : bool
+        non-zero to specify that the Jacobian function computes derivatives
+        down the columns (faster, because there is no transpose operation).
+    ftol : float
+        Relative error desired in the sum of squares.
+    xtol : float
+        Relative error desired in the approximate solution.
+    gtol : float
+        Orthogonality desired between the function vector and the columns
+        of the Jacobian.
+    maxiter : int
+        The maximum number of calls to the function. If zero, then
+        100*(N+1) is the maximum where N is the number of elements in x0.
+    eps : float
+        A suitable step length for the forward-difference approximation of
+        the Jacobian (for Dfun=None). If `eps` is less than the machine
+        precision, it is assumed that the relative errors in the functions
+        are of the order of the machine precision.
+    factor : float
+        A parameter determining the initial step bound
+        (``factor * || diag * x||``). Should be in interval ``(0.1, 100)``.
+    diag : sequence
+        N positive entries that serve as a scale factors for the variables.
+    """
+    nfev = 0
+    def _wrapped_fun(*fargs):
+        """
+        Wrapped `func` to track the number of times
+        the function has been called.
+        """
+        nonlocal nfev
+        nfev += 1
+        return fun(*fargs)
+
+    _check_unknown_options(unknown_options)
+    x, cov_x, info, msg, ier = leastsq(_wrapped_fun, x0, args=args,
+                                       Dfun=jac, full_output=True,
+                                       col_deriv=col_deriv, xtol=xtol,
+                                       ftol=ftol, gtol=gtol,
+                                       maxfev=maxiter, epsfcn=eps,
+                                       factor=factor, diag=diag)
+    sol = OptimizeResult(x=x, message=msg, status=ier,
+                         success=ier in (1, 2, 3, 4), cov_x=cov_x,
+                         fun=info.pop('fvec'), method="lm")
+    sol.update(info)
+    sol.nfev = nfev
+    return sol
+
+
+def _root_nonlin_solve(fun, x0, args=(), jac=None,
+                       _callback=None, _method=None,
+                       nit=None, disp=False, maxiter=None,
+                       ftol=None, fatol=None, xtol=None, xatol=None,
+                       tol_norm=None, line_search='armijo', jac_options=None,
+                       **unknown_options):
+    _check_unknown_options(unknown_options)
+
+    f_tol = fatol
+    f_rtol = ftol
+    x_tol = xatol
+    x_rtol = xtol
+    verbose = disp
+    if jac_options is None:
+        jac_options = dict()
+
+    jacobian = {'broyden1': nonlin.BroydenFirst,
+                'broyden2': nonlin.BroydenSecond,
+                'anderson': nonlin.Anderson,
+                'linearmixing': nonlin.LinearMixing,
+                'diagbroyden': nonlin.DiagBroyden,
+                'excitingmixing': nonlin.ExcitingMixing,
+                'krylov': nonlin.KrylovJacobian
+                }[_method]
+
+    if args:
+        if jac is True:
+            def f(x):
+                return fun(x, *args)[0]
+        else:
+            def f(x):
+                return fun(x, *args)
+    else:
+        f = fun
+
+    x, info = nonlin.nonlin_solve(f, x0, jacobian=jacobian(**jac_options),
+                                  iter=nit, verbose=verbose,
+                                  maxiter=maxiter, f_tol=f_tol,
+                                  f_rtol=f_rtol, x_tol=x_tol,
+                                  x_rtol=x_rtol, tol_norm=tol_norm,
+                                  line_search=line_search,
+                                  callback=_callback, full_output=True,
+                                  raise_exception=False)
+    sol = OptimizeResult(x=x, method=_method)
+    sol.update(info)
+    return sol
+
+def _root_broyden1_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            Initial guess for the Jacobian is (-1/alpha).
+        reduction_method : str or tuple, optional
+            Method used in ensuring that the rank of the Broyden
+            matrix stays low. Can either be a string giving the
+            name of the method, or a tuple of the form ``(method,
+            param1, param2, ...)`` that gives the name of the
+            method and values for additional parameters.
+
+            Methods available:
+
+            - ``restart``: drop all matrix columns. Has no extra parameters.
+            - ``simple``: drop oldest matrix column. Has no extra parameters.
+            - ``svd``: keep only the most significant SVD components.
+              Takes an extra parameter, ``to_retain``, which determines the
+              number of SVD components to retain when rank reduction is done.
+              Default is ``max_rank - 2``.
+
+        max_rank : int, optional
+            Maximum rank for the Broyden matrix.
+            Default is infinity (i.e., no rank reduction).
+
+    Examples
+    --------
+    >>> def func(x):
+    ...     return np.cos(x) + x[::-1] - [1, 2, 3, 4]
+    ...
+    >>> from scipy import optimize
+    >>> res = optimize.root(func, [1, 1, 1, 1], method='broyden1', tol=1e-14)
+    >>> x = res.x
+    >>> x
+    array([4.04674914, 3.91158389, 2.71791677, 1.61756251])
+    >>> np.cos(x) + x[::-1]
+    array([1., 2., 3., 4.])
+
+    """
+    pass
+
+
+def _root_broyden2_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            Initial guess for the Jacobian is (-1/alpha).
+        reduction_method : str or tuple, optional
+            Method used in ensuring that the rank of the Broyden
+            matrix stays low. Can either be a string giving the
+            name of the method, or a tuple of the form ``(method,
+            param1, param2, ...)`` that gives the name of the
+            method and values for additional parameters.
+
+            Methods available:
+
+            - ``restart``: drop all matrix columns. Has no extra parameters.
+            - ``simple``: drop oldest matrix column. Has no extra parameters.
+            - ``svd``: keep only the most significant SVD components.
+              Takes an extra parameter, ``to_retain``, which determines the
+              number of SVD components to retain when rank reduction is done.
+              Default is ``max_rank - 2``.
+
+        max_rank : int, optional
+            Maximum rank for the Broyden matrix.
+            Default is infinity (i.e., no rank reduction).
+    """
+    pass
+
+
+def _root_anderson_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            Initial guess for the Jacobian is (-1/alpha).
+        M : float, optional
+            Number of previous vectors to retain. Defaults to 5.
+        w0 : float, optional
+            Regularization parameter for numerical stability.
+            Compared to unity, good values of the order of 0.01.
+    """
+    pass
+
+def _root_linearmixing_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            initial guess for the jacobian is (-1/alpha).
+    """
+    pass
+
+def _root_diagbroyden_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            initial guess for the jacobian is (-1/alpha).
+    """
+    pass
+
+def _root_excitingmixing_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        alpha : float, optional
+            Initial Jacobian approximation is (-1/alpha).
+        alphamax : float, optional
+            The entries of the diagonal Jacobian are kept in the range
+            ``[alpha, alphamax]``.
+    """
+    pass
+
+def _root_krylov_doc():
+    """
+    Options
+    -------
+    nit : int, optional
+        Number of iterations to make. If omitted (default), make as many
+        as required to meet tolerances.
+    disp : bool, optional
+        Print status to stdout on every iteration.
+    maxiter : int, optional
+        Maximum number of iterations to make.
+    ftol : float, optional
+        Relative tolerance for the residual. If omitted, not used.
+    fatol : float, optional
+        Absolute tolerance (in max-norm) for the residual.
+        If omitted, default is 6e-6.
+    xtol : float, optional
+        Relative minimum step size. If omitted, not used.
+    xatol : float, optional
+        Absolute minimum step size, as determined from the Jacobian
+        approximation. If the step size is smaller than this, optimization
+        is terminated as successful. If omitted, not used.
+    tol_norm : function(vector) -> scalar, optional
+        Norm to use in convergence check. Default is the maximum norm.
+    line_search : {None, 'armijo' (default), 'wolfe'}, optional
+        Which type of a line search to use to determine the step size in
+        the direction given by the Jacobian approximation. Defaults to
+        'armijo'.
+    jac_options : dict, optional
+        Options for the respective Jacobian approximation.
+
+        rdiff : float, optional
+            Relative step size to use in numerical differentiation.
+        method : str or callable, optional
+            Krylov method to use to approximate the Jacobian.  Can be a string,
+            or a function implementing the same interface as the iterative
+            solvers in `scipy.sparse.linalg`. If a string, needs to be one of:
+            ``'lgmres'``, ``'gmres'``, ``'bicgstab'``, ``'cgs'``, ``'minres'``,
+            ``'tfqmr'``.
+
+            The default is `scipy.sparse.linalg.lgmres`.
+        inner_M : LinearOperator or InverseJacobian
+            Preconditioner for the inner Krylov iteration.
+            Note that you can use also inverse Jacobians as (adaptive)
+            preconditioners. For example,
+
+            >>> jac = BroydenFirst()
+            >>> kjac = KrylovJacobian(inner_M=jac.inverse).
+
+            If the preconditioner has a method named 'update', it will
+            be called as ``update(x, f)`` after each nonlinear step,
+            with ``x`` giving the current point, and ``f`` the current
+            function value.
+        inner_rtol, inner_atol, inner_callback, ...
+            Parameters to pass on to the "inner" Krylov solver.
+
+            For a full list of options, see the documentation for the
+            solver you are using. By default this is `scipy.sparse.linalg.lgmres`.
+            If the solver has been overridden through `method`, see the documentation
+            for that solver instead.
+            To use an option for that solver, prepend ``inner_`` to it.
+            For example, to control the ``rtol`` argument to the solver,
+            set the `inner_rtol` option here.
+
+        outer_k : int, optional
+            Size of the subspace kept across LGMRES nonlinear
+            iterations.
+
+            See `scipy.sparse.linalg.lgmres` for details.
+    """
+    pass
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root_scalar.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root_scalar.py
new file mode 100644
index 0000000000000000000000000000000000000000..668565de62ea36e0cc9be378875604855e489d17
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_root_scalar.py
@@ -0,0 +1,538 @@
+"""
+Unified interfaces to root finding algorithms for real or complex
+scalar functions.
+
+Functions
+---------
+- root : find a root of a scalar function.
+"""
+import numpy as np
+
+from . import _zeros_py as optzeros
+from ._numdiff import approx_derivative
+
+__all__ = ['root_scalar']
+
+ROOT_SCALAR_METHODS = ['bisect', 'brentq', 'brenth', 'ridder', 'toms748',
+                       'newton', 'secant', 'halley']
+
+
+class MemoizeDer:
+    """Decorator that caches the value and derivative(s) of function each
+    time it is called.
+
+    This is a simplistic memoizer that calls and caches a single value
+    of ``f(x, *args)``.
+    It assumes that `args` does not change between invocations.
+    It supports the use case of a root-finder where `args` is fixed,
+    `x` changes, and only rarely, if at all, does x assume the same value
+    more than once."""
+    def __init__(self, fun):
+        self.fun = fun
+        self.vals = None
+        self.x = None
+        self.n_calls = 0
+
+    def __call__(self, x, *args):
+        r"""Calculate f or use cached value if available"""
+        # Derivative may be requested before the function itself, always check
+        if self.vals is None or x != self.x:
+            fg = self.fun(x, *args)
+            self.x = x
+            self.n_calls += 1
+            self.vals = fg[:]
+        return self.vals[0]
+
+    def fprime(self, x, *args):
+        r"""Calculate f' or use a cached value if available"""
+        if self.vals is None or x != self.x:
+            self(x, *args)
+        return self.vals[1]
+
+    def fprime2(self, x, *args):
+        r"""Calculate f'' or use a cached value if available"""
+        if self.vals is None or x != self.x:
+            self(x, *args)
+        return self.vals[2]
+
+    def ncalls(self):
+        return self.n_calls
+
+
+def root_scalar(f, args=(), method=None, bracket=None,
+                fprime=None, fprime2=None,
+                x0=None, x1=None,
+                xtol=None, rtol=None, maxiter=None,
+                options=None):
+    """
+    Find a root of a scalar function.
+
+    Parameters
+    ----------
+    f : callable
+        A function to find a root of.
+
+        Suppose the callable has signature ``f0(x, *my_args, **my_kwargs)``, where
+        ``my_args`` and ``my_kwargs`` are required positional and keyword arguments.
+        Rather than passing ``f0`` as the callable, wrap it to accept
+        only ``x``; e.g., pass ``fun=lambda x: f0(x, *my_args, **my_kwargs)`` as the
+        callable, where ``my_args`` (tuple) and ``my_kwargs`` (dict) have been
+        gathered before invoking this function.
+    args : tuple, optional
+        Extra arguments passed to the objective function and its derivative(s).
+    method : str, optional
+        Type of solver.  Should be one of
+
+        - 'bisect'    :ref:`(see here) `
+        - 'brentq'    :ref:`(see here) `
+        - 'brenth'    :ref:`(see here) `
+        - 'ridder'    :ref:`(see here) `
+        - 'toms748'    :ref:`(see here) `
+        - 'newton'    :ref:`(see here) `
+        - 'secant'    :ref:`(see here) `
+        - 'halley'    :ref:`(see here) `
+
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    x0 : float, optional
+        Initial guess.
+    x1 : float, optional
+        A second guess.
+    fprime : bool or callable, optional
+        If `fprime` is a boolean and is True, `f` is assumed to return the
+        value of the objective function and of the derivative.
+        `fprime` can also be a callable returning the derivative of `f`. In
+        this case, it must accept the same arguments as `f`.
+    fprime2 : bool or callable, optional
+        If `fprime2` is a boolean and is True, `f` is assumed to return the
+        value of the objective function and of the
+        first and second derivatives.
+        `fprime2` can also be a callable returning the second derivative of `f`.
+        In this case, it must accept the same arguments as `f`.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options : dict, optional
+        A dictionary of solver options. E.g., ``k``, see
+        :obj:`show_options()` for details.
+
+    Returns
+    -------
+    sol : RootResults
+        The solution represented as a ``RootResults`` object.
+        Important attributes are: ``root`` the solution , ``converged`` a
+        boolean flag indicating if the algorithm exited successfully and
+        ``flag`` which describes the cause of the termination. See
+        `RootResults` for a description of other attributes.
+
+    See also
+    --------
+    show_options : Additional options accepted by the solvers
+    root : Find a root of a vector function.
+
+    Notes
+    -----
+    This section describes the available solvers that can be selected by the
+    'method' parameter.
+
+    The default is to use the best method available for the situation
+    presented.
+    If a bracket is provided, it may use one of the bracketing methods.
+    If a derivative and an initial value are specified, it may
+    select one of the derivative-based methods.
+    If no method is judged applicable, it will raise an Exception.
+
+    Arguments for each method are as follows (x=required, o=optional).
+
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    |                    method                     | f | args | bracket | x0 | x1 | fprime | fprime2 | xtol | rtol | maxiter | options |
+    +===============================================+===+======+=========+====+====+========+=========+======+======+=========+=========+
+    | :ref:`bisect `   | x |  o   |    x    |    |    |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`brentq `   | x |  o   |    x    |    |    |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`brenth `   | x |  o   |    x    |    |    |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`ridder `   | x |  o   |    x    |    |    |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`toms748 ` | x |  o   |    x    |    |    |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`secant `   | x |  o   |         | x  | o  |        |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`newton `   | x |  o   |         | x  |    |   o    |         |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+    | :ref:`halley `   | x |  o   |         | x  |    |   x    |    x    |  o   |  o   |    o    |   o     |
+    +-----------------------------------------------+---+------+---------+----+----+--------+---------+------+------+---------+---------+
+
+    Examples
+    --------
+
+    Find the root of a simple cubic
+
+    >>> from scipy import optimize
+    >>> def f(x):
+    ...     return (x**3 - 1)  # only one real root at x = 1
+
+    >>> def fprime(x):
+    ...     return 3*x**2
+
+    The `brentq` method takes as input a bracket
+
+    >>> sol = optimize.root_scalar(f, bracket=[0, 3], method='brentq')
+    >>> sol.root, sol.iterations, sol.function_calls
+    (1.0, 10, 11)
+
+    The `newton` method takes as input a single point and uses the
+    derivative(s).
+
+    >>> sol = optimize.root_scalar(f, x0=0.2, fprime=fprime, method='newton')
+    >>> sol.root, sol.iterations, sol.function_calls
+    (1.0, 11, 22)
+
+    The function can provide the value and derivative(s) in a single call.
+
+    >>> def f_p_pp(x):
+    ...     return (x**3 - 1), 3*x**2, 6*x
+
+    >>> sol = optimize.root_scalar(
+    ...     f_p_pp, x0=0.2, fprime=True, method='newton'
+    ... )
+    >>> sol.root, sol.iterations, sol.function_calls
+    (1.0, 11, 11)
+
+    >>> sol = optimize.root_scalar(
+    ...     f_p_pp, x0=0.2, fprime=True, fprime2=True, method='halley'
+    ... )
+    >>> sol.root, sol.iterations, sol.function_calls
+    (1.0, 7, 8)
+
+
+    """  # noqa: E501
+    if not isinstance(args, tuple):
+        args = (args,)
+
+    if options is None:
+        options = {}
+
+    # fun also returns the derivative(s)
+    is_memoized = False
+    if fprime2 is not None and not callable(fprime2):
+        if bool(fprime2):
+            f = MemoizeDer(f)
+            is_memoized = True
+            fprime2 = f.fprime2
+            fprime = f.fprime
+        else:
+            fprime2 = None
+    if fprime is not None and not callable(fprime):
+        if bool(fprime):
+            f = MemoizeDer(f)
+            is_memoized = True
+            fprime = f.fprime
+        else:
+            fprime = None
+
+    # respect solver-specific default tolerances - only pass in if actually set
+    kwargs = {}
+    for k in ['xtol', 'rtol', 'maxiter']:
+        v = locals().get(k)
+        if v is not None:
+            kwargs[k] = v
+
+    # Set any solver-specific options
+    if options:
+        kwargs.update(options)
+    # Always request full_output from the underlying method as _root_scalar
+    # always returns a RootResults object
+    kwargs.update(full_output=True, disp=False)
+
+    # Pick a method if not specified.
+    # Use the "best" method available for the situation.
+    if not method:
+        if bracket is not None:
+            method = 'brentq'
+        elif x0 is not None:
+            if fprime:
+                if fprime2:
+                    method = 'halley'
+                else:
+                    method = 'newton'
+            elif x1 is not None:
+                method = 'secant'
+            else:
+                method = 'newton'
+    if not method:
+        raise ValueError('Unable to select a solver as neither bracket '
+                         'nor starting point provided.')
+
+    meth = method.lower()
+    map2underlying = {'halley': 'newton', 'secant': 'newton'}
+
+    try:
+        methodc = getattr(optzeros, map2underlying.get(meth, meth))
+    except AttributeError as e:
+        raise ValueError(f'Unknown solver {meth}') from e
+
+    if meth in ['bisect', 'ridder', 'brentq', 'brenth', 'toms748']:
+        if not isinstance(bracket, (list, tuple, np.ndarray)):
+            raise ValueError(f'Bracket needed for {method}')
+
+        a, b = bracket[:2]
+        try:
+            r, sol = methodc(f, a, b, args=args, **kwargs)
+        except ValueError as e:
+            # gh-17622 fixed some bugs in low-level solvers by raising an error
+            # (rather than returning incorrect results) when the callable
+            # returns a NaN. It did so by wrapping the callable rather than
+            # modifying compiled code, so the iteration count is not available.
+            if hasattr(e, "_x"):
+                sol = optzeros.RootResults(root=e._x,
+                                           iterations=np.nan,
+                                           function_calls=e._function_calls,
+                                           flag=str(e), method=method)
+            else:
+                raise
+
+    elif meth in ['secant']:
+        if x0 is None:
+            raise ValueError(f'x0 must not be None for {method}')
+        if 'xtol' in kwargs:
+            kwargs['tol'] = kwargs.pop('xtol')
+        r, sol = methodc(f, x0, args=args, fprime=None, fprime2=None,
+                         x1=x1, **kwargs)
+    elif meth in ['newton']:
+        if x0 is None:
+            raise ValueError(f'x0 must not be None for {method}')
+        if not fprime:
+            # approximate fprime with finite differences
+
+            def fprime(x, *args):
+                # `root_scalar` doesn't actually seem to support vectorized
+                # use of `newton`. In that case, `approx_derivative` will
+                # always get scalar input. Nonetheless, it always returns an
+                # array, so we extract the element to produce scalar output.
+                # Similarly, `approx_derivative` always passes array input, so
+                # we extract the element to ensure the user's function gets
+                # scalar input.
+                def f_wrapped(x, *args):
+                    return f(x[0], *args)
+                return approx_derivative(f_wrapped, x, method='2-point', args=args)[0]
+
+        if 'xtol' in kwargs:
+            kwargs['tol'] = kwargs.pop('xtol')
+        r, sol = methodc(f, x0, args=args, fprime=fprime, fprime2=None,
+                         **kwargs)
+    elif meth in ['halley']:
+        if x0 is None:
+            raise ValueError(f'x0 must not be None for {method}')
+        if not fprime:
+            raise ValueError(f'fprime must be specified for {method}')
+        if not fprime2:
+            raise ValueError(f'fprime2 must be specified for {method}')
+        if 'xtol' in kwargs:
+            kwargs['tol'] = kwargs.pop('xtol')
+        r, sol = methodc(f, x0, args=args, fprime=fprime, fprime2=fprime2, **kwargs)
+    else:
+        raise ValueError(f'Unknown solver {method}')
+
+    if is_memoized:
+        # Replace the function_calls count with the memoized count.
+        # Avoids double and triple-counting.
+        n_calls = f.n_calls
+        sol.function_calls = n_calls
+
+    return sol
+
+
+def _root_scalar_brentq_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options: dict, optional
+        Specifies any method-specific options not covered above
+
+    """
+    pass
+
+
+def _root_scalar_brenth_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+def _root_scalar_toms748_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+
+def _root_scalar_secant_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    x0 : float, required
+        Initial guess.
+    x1 : float, optional
+        A second guess. Must be different from `x0`. If not specified,
+        a value near `x0` will be chosen.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+
+def _root_scalar_newton_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function and its derivative.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    x0 : float, required
+        Initial guess.
+    fprime : bool or callable, optional
+        If `fprime` is a boolean and is True, `f` is assumed to return the
+        value of derivative along with the objective function.
+        `fprime` can also be a callable returning the derivative of `f`. In
+        this case, it must accept the same arguments as `f`.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+
+def _root_scalar_halley_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function and its derivatives.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    x0 : float, required
+        Initial guess.
+    fprime : bool or callable, required
+        If `fprime` is a boolean and is True, `f` is assumed to return the
+        value of derivative along with the objective function.
+        `fprime` can also be a callable returning the derivative of `f`. In
+        this case, it must accept the same arguments as `f`.
+    fprime2 : bool or callable, required
+        If `fprime2` is a boolean and is True, `f` is assumed to return the
+        value of 1st and 2nd derivatives along with the objective function.
+        `fprime2` can also be a callable returning the 2nd derivative of `f`.
+        In this case, it must accept the same arguments as `f`.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+
+def _root_scalar_ridder_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
+
+
+def _root_scalar_bisect_doc():
+    r"""
+    Options
+    -------
+    args : tuple, optional
+        Extra arguments passed to the objective function.
+    bracket: A sequence of 2 floats, optional
+        An interval bracketing a root.  ``f(x, *args)`` must have different
+        signs at the two endpoints.
+    xtol : float, optional
+        Tolerance (absolute) for termination.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    maxiter : int, optional
+        Maximum number of iterations.
+    options: dict, optional
+        Specifies any method-specific options not covered above.
+
+    """
+    pass
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e9f37ce003ba42df054e25f03fbcdfe1478a423
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo.py
@@ -0,0 +1,1600 @@
+"""shgo: The simplicial homology global optimisation algorithm."""
+from collections import namedtuple
+import time
+import logging
+import warnings
+import sys
+
+import numpy as np
+
+from scipy import spatial
+from scipy.optimize import OptimizeResult, minimize, Bounds
+from scipy.optimize._optimize import MemoizeJac
+from scipy.optimize._constraints import new_bounds_to_old
+from scipy.optimize._minimize import standardize_constraints
+from scipy._lib._util import _FunctionWrapper
+
+from scipy.optimize._shgo_lib._complex import Complex
+
+__all__ = ['shgo']
+
+
+def shgo(
+    func, bounds, args=(), constraints=None, n=100, iters=1, callback=None,
+    minimizer_kwargs=None, options=None, sampling_method='simplicial', *,
+    workers=1
+):
+    """
+    Finds the global minimum of a function using SHG optimization.
+
+    SHGO stands for "simplicial homology global optimization".
+
+    Parameters
+    ----------
+    func : callable
+        The objective function to be minimized.  Must be in the form
+        ``f(x, *args)``, where ``x`` is the argument in the form of a 1-D array
+        and ``args`` is a tuple of any additional fixed parameters needed to
+        completely specify the function.
+    bounds : sequence or `Bounds`
+        Bounds for variables. There are two ways to specify the bounds:
+
+        1. Instance of `Bounds` class.
+        2. Sequence of ``(min, max)`` pairs for each element in `x`.
+
+    args : tuple, optional
+        Any additional fixed parameters needed to completely specify the
+        objective function.
+    constraints : {Constraint, dict} or List of {Constraint, dict}, optional
+        Constraints definition. Only for COBYLA, COBYQA, SLSQP and trust-constr.
+        See the tutorial [5]_ for further details on specifying constraints.
+
+        .. note::
+
+           Only COBYLA, COBYQA, SLSQP, and trust-constr local minimize methods
+           currently support constraint arguments. If the ``constraints``
+           sequence used in the local optimization problem is not defined in
+           ``minimizer_kwargs`` and a constrained method is used then the
+           global ``constraints`` will be used.
+           (Defining a ``constraints`` sequence in ``minimizer_kwargs``
+           means that ``constraints`` will not be added so if equality
+           constraints and so forth need to be added then the inequality
+           functions in ``constraints`` need to be added to
+           ``minimizer_kwargs`` too).
+           COBYLA only supports inequality constraints.
+
+        .. versionchanged:: 1.11.0
+
+           ``constraints`` accepts `NonlinearConstraint`, `LinearConstraint`.
+
+    n : int, optional
+        Number of sampling points used in the construction of the simplicial
+        complex. For the default ``simplicial`` sampling method 2**dim + 1
+        sampling points are generated instead of the default ``n=100``. For all
+        other specified values `n` sampling points are generated. For
+        ``sobol``, ``halton`` and other arbitrary `sampling_methods` ``n=100`` or
+        another specified number of sampling points are generated.
+    iters : int, optional
+        Number of iterations used in the construction of the simplicial
+        complex. Default is 1.
+    callback : callable, optional
+        Called after each iteration, as ``callback(xk)``, where ``xk`` is the
+        current parameter vector.
+    minimizer_kwargs : dict, optional
+        Extra keyword arguments to be passed to the minimizer
+        ``scipy.optimize.minimize``. Some important options could be:
+
+        method : str
+            The minimization method. If not given, chosen to be one of
+            BFGS, L-BFGS-B, SLSQP, depending on whether or not the
+            problem has constraints or bounds.
+        args : tuple
+            Extra arguments passed to the objective function (``func``) and
+            its derivatives (Jacobian, Hessian).
+        options : dict, optional
+            Note that by default the tolerance is specified as
+            ``{ftol: 1e-12}``
+
+    options : dict, optional
+        A dictionary of solver options. Many of the options specified for the
+        global routine are also passed to the ``scipy.optimize.minimize``
+        routine. The options that are also passed to the local routine are
+        marked with "(L)".
+
+        Stopping criteria, the algorithm will terminate if any of the specified
+        criteria are met. However, the default algorithm does not require any
+        to be specified:
+
+        maxfev : int (L)
+            Maximum number of function evaluations in the feasible domain.
+            (Note only methods that support this option will terminate
+            the routine at precisely exact specified value. Otherwise the
+            criterion will only terminate during a global iteration)
+        f_min : float
+            Specify the minimum objective function value, if it is known.
+        f_tol : float
+            Precision goal for the value of f in the stopping
+            criterion. Note that the global routine will also
+            terminate if a sampling point in the global routine is
+            within this tolerance.
+        maxiter : int
+            Maximum number of iterations to perform.
+        maxev : int
+            Maximum number of sampling evaluations to perform (includes
+            searching in infeasible points).
+        maxtime : float
+            Maximum processing runtime allowed
+        minhgrd : int
+            Minimum homology group rank differential. The homology group of the
+            objective function is calculated (approximately) during every
+            iteration. The rank of this group has a one-to-one correspondence
+            with the number of locally convex subdomains in the objective
+            function (after adequate sampling points each of these subdomains
+            contain a unique global minimum). If the difference in the hgr is 0
+            between iterations for ``maxhgrd`` specified iterations the
+            algorithm will terminate.
+
+        Objective function knowledge:
+
+        symmetry : list or bool
+            Specify if the objective function contains symmetric variables.
+            The search space (and therefore performance) is decreased by up to
+            O(n!) times in the fully symmetric case. If `True` is specified
+            then all variables will be set symmetric to the first variable.
+            Default
+            is set to False.
+
+            E.g.  f(x) = (x_1 + x_2 + x_3) + (x_4)**2 + (x_5)**2 + (x_6)**2
+
+            In this equation x_2 and x_3 are symmetric to x_1, while x_5 and
+            x_6 are symmetric to x_4, this can be specified to the solver as::
+
+                symmetry = [0,  # Variable 1
+                            0,  # symmetric to variable 1
+                            0,  # symmetric to variable 1
+                            3,  # Variable 4
+                            3,  # symmetric to variable 4
+                            3,  # symmetric to variable 4
+                            ]
+
+        jac : bool or callable, optional
+            Jacobian (gradient) of objective function. Only for CG, BFGS,
+            Newton-CG, L-BFGS-B, TNC, SLSQP, dogleg, trust-ncg. If ``jac`` is a
+            boolean and is True, ``fun`` is assumed to return the gradient
+            along with the objective function. If False, the gradient will be
+            estimated numerically. ``jac`` can also be a callable returning the
+            gradient of the objective. In this case, it must accept the same
+            arguments as ``fun``. (Passed to `scipy.optimize.minimize`
+            automatically)
+
+        hess, hessp : callable, optional
+            Hessian (matrix of second-order derivatives) of objective function
+            or Hessian of objective function times an arbitrary vector p.
+            Only for Newton-CG, dogleg, trust-ncg. Only one of ``hessp`` or
+            ``hess`` needs to be given. If ``hess`` is provided, then
+            ``hessp`` will be ignored. If neither ``hess`` nor ``hessp`` is
+            provided, then the Hessian product will be approximated using
+            finite differences on ``jac``. ``hessp`` must compute the Hessian
+            times an arbitrary vector. (Passed to `scipy.optimize.minimize`
+            automatically)
+
+        Algorithm settings:
+
+        minimize_every_iter : bool
+            If True then promising global sampling points will be passed to a
+            local minimization routine every iteration. If True then only the
+            final minimizer pool will be run. Defaults to True.
+
+        local_iter : int
+            Only evaluate a few of the best minimizer pool candidates every
+            iteration. If False all potential points are passed to the local
+            minimization routine.
+
+        infty_constraints : bool
+            If True then any sampling points generated which are outside will
+            the feasible domain will be saved and given an objective function
+            value of ``inf``. If False then these points will be discarded.
+            Using this functionality could lead to higher performance with
+            respect to function evaluations before the global minimum is found,
+            specifying False will use less memory at the cost of a slight
+            decrease in performance. Defaults to True.
+
+        Feedback:
+
+        disp : bool (L)
+            Set to True to print convergence messages.
+
+    sampling_method : str or function, optional
+        Current built in sampling method options are ``halton``, ``sobol`` and
+        ``simplicial``. The default ``simplicial`` provides
+        the theoretical guarantee of convergence to the global minimum in
+        finite time. ``halton`` and ``sobol`` method are faster in terms of
+        sampling point generation at the cost of the loss of
+        guaranteed convergence. It is more appropriate for most "easier"
+        problems where the convergence is relatively fast.
+        User defined sampling functions must accept two arguments of ``n``
+        sampling points of dimension ``dim`` per call and output an array of
+        sampling points with shape `n x dim`.
+
+    workers : int or map-like callable, optional
+        Sample and run the local serial minimizations in parallel.
+        Supply -1 to use all available CPU cores, or an int to use
+        that many Processes (uses `multiprocessing.Pool `).
+
+        Alternatively supply a map-like callable, such as
+        `multiprocessing.Pool.map` for parallel evaluation.
+        This evaluation is carried out as ``workers(func, iterable)``.
+        Requires that `func` be pickleable.
+
+        .. versionadded:: 1.11.0
+
+    Returns
+    -------
+    res : OptimizeResult
+        The optimization result represented as a `OptimizeResult` object.
+        Important attributes are:
+        ``x`` the solution array corresponding to the global minimum,
+        ``fun`` the function output at the global solution,
+        ``xl`` an ordered list of local minima solutions,
+        ``funl`` the function output at the corresponding local solutions,
+        ``success`` a Boolean flag indicating if the optimizer exited
+        successfully,
+        ``message`` which describes the cause of the termination,
+        ``nfev`` the total number of objective function evaluations including
+        the sampling calls,
+        ``nlfev`` the total number of objective function evaluations
+        culminating from all local search optimizations,
+        ``nit`` number of iterations performed by the global routine.
+
+    Notes
+    -----
+    Global optimization using simplicial homology global optimization [1]_.
+    Appropriate for solving general purpose NLP and blackbox optimization
+    problems to global optimality (low-dimensional problems).
+
+    In general, the optimization problems are of the form::
+
+        minimize f(x) subject to
+
+        g_i(x) >= 0,  i = 1,...,m
+        h_j(x)  = 0,  j = 1,...,p
+
+    where x is a vector of one or more variables. ``f(x)`` is the objective
+    function ``R^n -> R``, ``g_i(x)`` are the inequality constraints, and
+    ``h_j(x)`` are the equality constraints.
+
+    Optionally, the lower and upper bounds for each element in x can also be
+    specified using the `bounds` argument.
+
+    While most of the theoretical advantages of SHGO are only proven for when
+    ``f(x)`` is a Lipschitz smooth function, the algorithm is also proven to
+    converge to the global optimum for the more general case where ``f(x)`` is
+    non-continuous, non-convex and non-smooth, if the default sampling method
+    is used [1]_.
+
+    The local search method may be specified using the ``minimizer_kwargs``
+    parameter which is passed on to ``scipy.optimize.minimize``. By default,
+    the ``SLSQP`` method is used. In general, it is recommended to use the
+    ``SLSQP``, ``COBYLA``, or ``COBYQA`` local minimization if inequality
+    constraints are defined for the problem since the other methods do not use
+    constraints.
+
+    The ``halton`` and ``sobol`` method points are generated using
+    `scipy.stats.qmc`. Any other QMC method could be used.
+
+    References
+    ----------
+    .. [1] Endres, SC, Sandrock, C, Focke, WW (2018) "A simplicial homology
+           algorithm for lipschitz optimisation", Journal of Global
+           Optimization.
+    .. [2] Joe, SW and Kuo, FY (2008) "Constructing Sobol' sequences with
+           better  two-dimensional projections", SIAM J. Sci. Comput. 30,
+           2635-2654.
+    .. [3] Hock, W and Schittkowski, K (1981) "Test examples for nonlinear
+           programming codes", Lecture Notes in Economics and Mathematical
+           Systems, 187. Springer-Verlag, New York.
+           http://www.ai7.uni-bayreuth.de/test_problem_coll.pdf
+    .. [4] Wales, DJ (2015) "Perspective: Insight into reaction coordinates and
+           dynamics from the potential energy landscape",
+           Journal of Chemical Physics, 142(13), 2015.
+    .. [5] https://docs.scipy.org/doc/scipy/tutorial/optimize.html#constrained-minimization-of-multivariate-scalar-functions-minimize
+
+    Examples
+    --------
+    First consider the problem of minimizing the Rosenbrock function, `rosen`:
+
+    >>> from scipy.optimize import rosen, shgo
+    >>> bounds = [(0,2), (0, 2), (0, 2), (0, 2), (0, 2)]
+    >>> result = shgo(rosen, bounds)
+    >>> result.x, result.fun
+    (array([1., 1., 1., 1., 1.]), 2.920392374190081e-18)
+
+    Note that bounds determine the dimensionality of the objective
+    function and is therefore a required input, however you can specify
+    empty bounds using ``None`` or objects like ``np.inf`` which will be
+    converted to large float numbers.
+
+    >>> bounds = [(None, None), ]*4
+    >>> result = shgo(rosen, bounds)
+    >>> result.x
+    array([0.99999851, 0.99999704, 0.99999411, 0.9999882 ])
+
+    Next, we consider the Eggholder function, a problem with several local
+    minima and one global minimum. We will demonstrate the use of arguments and
+    the capabilities of `shgo`.
+    (https://en.wikipedia.org/wiki/Test_functions_for_optimization)
+
+    >>> import numpy as np
+    >>> def eggholder(x):
+    ...     return (-(x[1] + 47.0)
+    ...             * np.sin(np.sqrt(abs(x[0]/2.0 + (x[1] + 47.0))))
+    ...             - x[0] * np.sin(np.sqrt(abs(x[0] - (x[1] + 47.0))))
+    ...             )
+    ...
+    >>> bounds = [(-512, 512), (-512, 512)]
+
+    `shgo` has built-in low discrepancy sampling sequences. First, we will
+    input 64 initial sampling points of the *Sobol'* sequence:
+
+    >>> result = shgo(eggholder, bounds, n=64, sampling_method='sobol')
+    >>> result.x, result.fun
+    (array([512.        , 404.23180824]), -959.6406627208397)
+
+    `shgo` also has a return for any other local minima that was found, these
+    can be called using:
+
+    >>> result.xl
+    array([[ 512.        ,  404.23180824],
+           [ 283.0759062 , -487.12565635],
+           [-294.66820039, -462.01964031],
+           [-105.87688911,  423.15323845],
+           [-242.97926   ,  274.38030925],
+           [-506.25823477,    6.3131022 ],
+           [-408.71980731, -156.10116949],
+           [ 150.23207937,  301.31376595],
+           [  91.00920901, -391.283763  ],
+           [ 202.89662724, -269.38043241],
+           [ 361.66623976, -106.96493868],
+           [-219.40612786, -244.06020508]])
+
+    >>> result.funl
+    array([-959.64066272, -718.16745962, -704.80659592, -565.99778097,
+           -559.78685655, -557.36868733, -507.87385942, -493.9605115 ,
+           -426.48799655, -421.15571437, -419.31194957, -410.98477763])
+
+    These results are useful in applications where there are many global minima
+    and the values of other global minima are desired or where the local minima
+    can provide insight into the system (for example morphologies
+    in physical chemistry [4]_).
+
+    If we want to find a larger number of local minima, we can increase the
+    number of sampling points or the number of iterations. We'll increase the
+    number of sampling points to 64 and the number of iterations from the
+    default of 1 to 3. Using ``simplicial`` this would have given us
+    64 x 3 = 192 initial sampling points.
+
+    >>> result_2 = shgo(eggholder,
+    ...                 bounds, n=64, iters=3, sampling_method='sobol')
+    >>> len(result.xl), len(result_2.xl)
+    (12, 23)
+
+    Note the difference between, e.g., ``n=192, iters=1`` and ``n=64,
+    iters=3``.
+    In the first case the promising points contained in the minimiser pool
+    are processed only once. In the latter case it is processed every 64
+    sampling points for a total of 3 times.
+
+    To demonstrate solving problems with non-linear constraints consider the
+    following example from Hock and Schittkowski problem 73 (cattle-feed)
+    [3]_::
+
+        minimize: f = 24.55 * x_1 + 26.75 * x_2 + 39 * x_3 + 40.50 * x_4
+
+        subject to: 2.3 * x_1 + 5.6 * x_2 + 11.1 * x_3 + 1.3 * x_4 - 5    >= 0,
+
+                    12 * x_1 + 11.9 * x_2 + 41.8 * x_3 + 52.1 * x_4 - 21
+                        -1.645 * sqrt(0.28 * x_1**2 + 0.19 * x_2**2 +
+                                      20.5 * x_3**2 + 0.62 * x_4**2)      >= 0,
+
+                    x_1 + x_2 + x_3 + x_4 - 1                             == 0,
+
+                    1 >= x_i >= 0 for all i
+
+    The approximate answer given in [3]_ is::
+
+        f([0.6355216, -0.12e-11, 0.3127019, 0.05177655]) = 29.894378
+
+    >>> def f(x):  # (cattle-feed)
+    ...     return 24.55*x[0] + 26.75*x[1] + 39*x[2] + 40.50*x[3]
+    ...
+    >>> def g1(x):
+    ...     return 2.3*x[0] + 5.6*x[1] + 11.1*x[2] + 1.3*x[3] - 5  # >=0
+    ...
+    >>> def g2(x):
+    ...     return (12*x[0] + 11.9*x[1] +41.8*x[2] + 52.1*x[3] - 21
+    ...             - 1.645 * np.sqrt(0.28*x[0]**2 + 0.19*x[1]**2
+    ...                             + 20.5*x[2]**2 + 0.62*x[3]**2)
+    ...             ) # >=0
+    ...
+    >>> def h1(x):
+    ...     return x[0] + x[1] + x[2] + x[3] - 1  # == 0
+    ...
+    >>> cons = ({'type': 'ineq', 'fun': g1},
+    ...         {'type': 'ineq', 'fun': g2},
+    ...         {'type': 'eq', 'fun': h1})
+    >>> bounds = [(0, 1.0),]*4
+    >>> res = shgo(f, bounds, n=150, constraints=cons)
+    >>> res
+     message: Optimization terminated successfully.
+     success: True
+         fun: 29.894378159142136
+        funl: [ 2.989e+01]
+           x: [ 6.355e-01  1.137e-13  3.127e-01  5.178e-02] # may vary
+          xl: [[ 6.355e-01  1.137e-13  3.127e-01  5.178e-02]] # may vary
+         nit: 1
+        nfev: 142 # may vary
+       nlfev: 35 # may vary
+       nljev: 5
+       nlhev: 0
+
+    >>> g1(res.x), g2(res.x), h1(res.x)
+    (-5.062616992290714e-14, -2.9594104944408173e-12, 0.0)
+
+    """
+    # if necessary, convert bounds class to old bounds
+    if isinstance(bounds, Bounds):
+        bounds = new_bounds_to_old(bounds.lb, bounds.ub, len(bounds.lb))
+
+    # Initiate SHGO class
+    # use in context manager to make sure that any parallelization
+    # resources are freed.
+    with SHGO(func, bounds, args=args, constraints=constraints, n=n,
+               iters=iters, callback=callback,
+               minimizer_kwargs=minimizer_kwargs,
+               options=options, sampling_method=sampling_method,
+               workers=workers) as shc:
+        # Run the algorithm, process results and test success
+        shc.iterate_all()
+
+    if not shc.break_routine:
+        if shc.disp:
+            logging.info("Successfully completed construction of complex.")
+
+    # Test post iterations success
+    if len(shc.LMC.xl_maps) == 0:
+        # If sampling failed to find pool, return lowest sampled point
+        # with a warning
+        shc.find_lowest_vertex()
+        shc.break_routine = True
+        shc.fail_routine(mes="Failed to find a feasible minimizer point. "
+                             f"Lowest sampling point = {shc.f_lowest}")
+        shc.res.fun = shc.f_lowest
+        shc.res.x = shc.x_lowest
+        shc.res.nfev = shc.fn
+        shc.res.tnev = shc.n_sampled
+    else:
+        # Test that the optimal solutions do not violate any constraints
+        pass  # TODO
+
+    # Confirm the routine ran successfully
+    if not shc.break_routine:
+        shc.res.message = 'Optimization terminated successfully.'
+        shc.res.success = True
+
+    # Return the final results
+    return shc.res
+
+
+class SHGO:
+    def __init__(self, func, bounds, args=(), constraints=None, n=None,
+                 iters=None, callback=None, minimizer_kwargs=None,
+                 options=None, sampling_method='simplicial', workers=1):
+        from scipy.stats import qmc
+        # Input checks
+        methods = ['halton', 'sobol', 'simplicial']
+        if isinstance(sampling_method, str) and sampling_method not in methods:
+            raise ValueError(("Unknown sampling_method specified."
+                              " Valid methods: {}").format(', '.join(methods)))
+
+        # Split obj func if given with Jac
+        try:
+            if ((minimizer_kwargs['jac'] is True) and
+                    (not callable(minimizer_kwargs['jac']))):
+                self.func = MemoizeJac(func)
+                jac = self.func.derivative
+                minimizer_kwargs['jac'] = jac
+                func = self.func  # .fun
+            else:
+                self.func = func  # Normal definition of objective function
+        except (TypeError, KeyError):
+            self.func = func  # Normal definition of objective function
+
+        # Initiate class
+        self.func = _FunctionWrapper(func, args)
+        self.bounds = bounds
+        self.args = args
+        self.callback = callback
+
+        # Bounds
+        abound = np.array(bounds, float)
+        self.dim = np.shape(abound)[0]  # Dimensionality of problem
+
+        # Set none finite values to large floats
+        infind = ~np.isfinite(abound)
+        abound[infind[:, 0], 0] = -1e50
+        abound[infind[:, 1], 1] = 1e50
+
+        # Check if bounds are correctly specified
+        bnderr = abound[:, 0] > abound[:, 1]
+        if bnderr.any():
+            raise ValueError("Error: lb > ub in bounds "
+                             f"{', '.join(str(b) for b in bnderr)}.")
+
+        self.bounds = abound
+
+        # Constraints
+        # Process constraint dict sequence:
+        self.constraints = constraints
+        if constraints is not None:
+            self.min_cons = constraints
+            self.g_cons = []
+            self.g_args = []
+
+            # shgo internals deals with old-style constraints
+            # self.constraints is used to create Complex, so need
+            # to be stored internally in old-style.
+            # `minimize` takes care of normalising these constraints
+            # for slsqp/cobyla/cobyqa/trust-constr.
+            self.constraints = standardize_constraints(
+                constraints,
+                np.empty(self.dim, float),
+                'old'
+            )
+            for cons in self.constraints:
+                if cons['type'] in ('ineq'):
+                    self.g_cons.append(cons['fun'])
+                    try:
+                        self.g_args.append(cons['args'])
+                    except KeyError:
+                        self.g_args.append(())
+            self.g_cons = tuple(self.g_cons)
+            self.g_args = tuple(self.g_args)
+        else:
+            self.g_cons = None
+            self.g_args = None
+
+        # Define local minimization keyword arguments
+        # Start with defaults
+        self.minimizer_kwargs = {'method': 'SLSQP',
+                                 'bounds': self.bounds,
+                                 'options': {},
+                                 'callback': self.callback
+                                 }
+        if minimizer_kwargs is not None:
+            # Overwrite with supplied values
+            self.minimizer_kwargs.update(minimizer_kwargs)
+
+        else:
+            self.minimizer_kwargs['options'] = {'ftol': 1e-12}
+
+        if (
+            self.minimizer_kwargs['method'].lower() in ('slsqp', 'cobyla',
+                                                        'cobyqa',
+                                                        'trust-constr')
+            and (
+                minimizer_kwargs is not None and
+                'constraints' not in minimizer_kwargs and
+                constraints is not None
+            ) or
+            (self.g_cons is not None)
+        ):
+            self.minimizer_kwargs['constraints'] = self.min_cons
+
+        # Process options dict
+        if options is not None:
+            self.init_options(options)
+        else:  # Default settings:
+            self.f_min_true = None
+            self.minimize_every_iter = True
+
+            # Algorithm limits
+            self.maxiter = None
+            self.maxfev = None
+            self.maxev = None
+            self.maxtime = None
+            self.f_min_true = None
+            self.minhgrd = None
+
+            # Objective function knowledge
+            self.symmetry = None
+
+            # Algorithm functionality
+            self.infty_cons_sampl = True
+            self.local_iter = False
+
+            # Feedback
+            self.disp = False
+
+        # Remove unknown arguments in self.minimizer_kwargs
+        # Start with arguments all the solvers have in common
+        self.min_solver_args = ['fun', 'x0', 'args',
+                                'callback', 'options', 'method']
+        # then add the ones unique to specific solvers
+        solver_args = {
+            '_custom': ['jac', 'hess', 'hessp', 'bounds', 'constraints'],
+            'nelder-mead': [],
+            'powell': [],
+            'cg': ['jac'],
+            'bfgs': ['jac'],
+            'newton-cg': ['jac', 'hess', 'hessp'],
+            'l-bfgs-b': ['jac', 'bounds'],
+            'tnc': ['jac', 'bounds'],
+            'cobyla': ['constraints', 'catol'],
+            'cobyqa': ['bounds', 'constraints', 'feasibility_tol'],
+            'slsqp': ['jac', 'bounds', 'constraints'],
+            'dogleg': ['jac', 'hess'],
+            'trust-ncg': ['jac', 'hess', 'hessp'],
+            'trust-krylov': ['jac', 'hess', 'hessp'],
+            'trust-exact': ['jac', 'hess'],
+            'trust-constr': ['jac', 'hess', 'hessp', 'constraints'],
+        }
+        method = self.minimizer_kwargs['method']
+        self.min_solver_args += solver_args[method.lower()]
+
+        # Only retain the known arguments
+        def _restrict_to_keys(dictionary, goodkeys):
+            """Remove keys from dictionary if not in goodkeys - inplace"""
+            existingkeys = set(dictionary)
+            for key in existingkeys - set(goodkeys):
+                dictionary.pop(key, None)
+
+        _restrict_to_keys(self.minimizer_kwargs, self.min_solver_args)
+        _restrict_to_keys(self.minimizer_kwargs['options'],
+                          self.min_solver_args + ['ftol'])
+
+        # Algorithm controls
+        # Global controls
+        self.stop_global = False  # Used in the stopping_criteria method
+        self.break_routine = False  # Break the algorithm globally
+        self.iters = iters  # Iterations to be ran
+        self.iters_done = 0  # Iterations completed
+        self.n = n  # Sampling points per iteration
+        self.nc = 0  # n  # Sampling points to sample in current iteration
+        self.n_prc = 0  # Processed points (used to track Delaunay iters)
+        self.n_sampled = 0  # To track no. of sampling points already generated
+        self.fn = 0  # Number of feasible sampling points evaluations performed
+        self.hgr = 0  # Homology group rank
+        # Initially attempt to build the triangulation incrementally:
+        self.qhull_incremental = True
+
+        # Default settings if no sampling criteria.
+        if (self.n is None) and (self.iters is None) \
+                and (sampling_method == 'simplicial'):
+            self.n = 2 ** self.dim + 1
+            self.nc = 0  # self.n
+        if self.iters is None:
+            self.iters = 1
+        if (self.n is None) and not (sampling_method == 'simplicial'):
+            self.n = self.n = 100
+            self.nc = 0  # self.n
+        if (self.n == 100) and (sampling_method == 'simplicial'):
+            self.n = 2 ** self.dim + 1
+
+        if not ((self.maxiter is None) and (self.maxfev is None) and (
+                self.maxev is None)
+                and (self.minhgrd is None) and (self.f_min_true is None)):
+            self.iters = None
+
+        # Set complex construction mode based on a provided stopping criteria:
+        # Initialise sampling Complex and function cache
+        # Note that sfield_args=() since args are already wrapped in self.func
+        # using the_FunctionWrapper class.
+        self.HC = Complex(dim=self.dim, domain=self.bounds,
+                          sfield=self.func, sfield_args=(),
+                          symmetry=self.symmetry,
+                          constraints=self.constraints,
+                          workers=workers)
+
+        # Choose complex constructor
+        if sampling_method == 'simplicial':
+            self.iterate_complex = self.iterate_hypercube
+            self.sampling_method = sampling_method
+
+        elif sampling_method in ['halton', 'sobol'] or \
+                not isinstance(sampling_method, str):
+            self.iterate_complex = self.iterate_delaunay
+            # Sampling method used
+            if sampling_method in ['halton', 'sobol']:
+                if sampling_method == 'sobol':
+                    self.n = int(2 ** np.ceil(np.log2(self.n)))
+                    # self.n #TODO: Should always be self.n, this is
+                    # unacceptable for shgo, check that nfev behaves as
+                    # expected.
+                    self.nc = 0
+                    self.sampling_method = 'sobol'
+                    self.qmc_engine = qmc.Sobol(d=self.dim, scramble=False,
+                                                seed=0)
+                else:
+                    self.sampling_method = 'halton'
+                    self.qmc_engine = qmc.Halton(d=self.dim, scramble=True,
+                                                 seed=0)
+
+                def sampling_method(n, d):
+                    return self.qmc_engine.random(n)
+
+            else:
+                # A user defined sampling method:
+                self.sampling_method = 'custom'
+
+            self.sampling = self.sampling_custom
+            self.sampling_function = sampling_method  # F(n, d)
+
+        # Local controls
+        self.stop_l_iter = False  # Local minimisation iterations
+        self.stop_complex_iter = False  # Sampling iterations
+
+        # Initiate storage objects used in algorithm classes
+        self.minimizer_pool = []
+
+        # Cache of local minimizers mapped
+        self.LMC = LMapCache()
+
+        # Initialize return object
+        self.res = OptimizeResult()  # scipy.optimize.OptimizeResult object
+        self.res.nfev = 0  # Includes each sampling point as func evaluation
+        self.res.nlfev = 0  # Local function evals for all minimisers
+        self.res.nljev = 0  # Local Jacobian evals for all minimisers
+        self.res.nlhev = 0  # Local Hessian evals for all minimisers
+
+    # Initiation aids
+    def init_options(self, options):
+        """
+        Initiates the options.
+
+        Can also be useful to change parameters after class initiation.
+
+        Parameters
+        ----------
+        options : dict
+
+        Returns
+        -------
+        None
+
+        """
+        # Update 'options' dict passed to optimize.minimize
+        # Do this first so we don't mutate `options` below.
+        self.minimizer_kwargs['options'].update(options)
+
+        # Ensure that 'jac', 'hess', and 'hessp' are passed directly to
+        # `minimize` as keywords, not as part of its 'options' dictionary.
+        for opt in ['jac', 'hess', 'hessp']:
+            if opt in self.minimizer_kwargs['options']:
+                self.minimizer_kwargs[opt] = (
+                    self.minimizer_kwargs['options'].pop(opt))
+
+        # Default settings:
+        self.minimize_every_iter = options.get('minimize_every_iter', True)
+
+        # Algorithm limits
+        # Maximum number of iterations to perform.
+        self.maxiter = options.get('maxiter', None)
+        # Maximum number of function evaluations in the feasible domain
+        self.maxfev = options.get('maxfev', None)
+        # Maximum number of sampling evaluations (includes searching in
+        # infeasible points
+        self.maxev = options.get('maxev', None)
+        # Maximum processing runtime allowed
+        self.init = time.time()
+        self.maxtime = options.get('maxtime', None)
+        if 'f_min' in options:
+            # Specify the minimum objective function value, if it is known.
+            self.f_min_true = options['f_min']
+            self.f_tol = options.get('f_tol', 1e-4)
+        else:
+            self.f_min_true = None
+
+        self.minhgrd = options.get('minhgrd', None)
+
+        # Objective function knowledge
+        self.symmetry = options.get('symmetry', False)
+        if self.symmetry:
+            self.symmetry = [0, ]*len(self.bounds)
+        else:
+            self.symmetry = None
+        # Algorithm functionality
+        # Only evaluate a few of the best candidates
+        self.local_iter = options.get('local_iter', False)
+        self.infty_cons_sampl = options.get('infty_constraints', True)
+
+        # Feedback
+        self.disp = options.get('disp', False)
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, *args):
+        return self.HC.V._mapwrapper.__exit__(*args)
+
+    # Iteration properties
+    # Main construction loop:
+    def iterate_all(self):
+        """
+        Construct for `iters` iterations.
+
+        If uniform sampling is used, every iteration adds 'n' sampling points.
+
+        Iterations if a stopping criteria (e.g., sampling points or
+        processing time) has been met.
+
+        """
+        if self.disp:
+            logging.info('Splitting first generation')
+
+        while not self.stop_global:
+            if self.break_routine:
+                break
+            # Iterate complex, process minimisers
+            self.iterate()
+            self.stopping_criteria()
+
+        # Build minimiser pool
+        # Final iteration only needed if pools weren't minimised every
+        # iteration
+        if not self.minimize_every_iter:
+            if not self.break_routine:
+                self.find_minima()
+
+        self.res.nit = self.iters_done  # + 1
+        self.fn = self.HC.V.nfev
+
+    def find_minima(self):
+        """
+        Construct the minimizer pool, map the minimizers to local minima
+        and sort the results into a global return object.
+        """
+        if self.disp:
+            logging.info('Searching for minimizer pool...')
+
+        self.minimizers()
+
+        if len(self.X_min) != 0:
+            # Minimize the pool of minimizers with local minimization methods
+            # Note that if Options['local_iter'] is an `int` instead of default
+            # value False then only that number of candidates will be minimized
+            self.minimise_pool(self.local_iter)
+            # Sort results and build the global return object
+            self.sort_result()
+
+            # Lowest values used to report in case of failures
+            self.f_lowest = self.res.fun
+            self.x_lowest = self.res.x
+        else:
+            self.find_lowest_vertex()
+
+        if self.disp:
+            logging.info(f"Minimiser pool = SHGO.X_min = {self.X_min}")
+
+    def find_lowest_vertex(self):
+        # Find the lowest objective function value on one of
+        # the vertices of the simplicial complex
+        self.f_lowest = np.inf
+        for x in self.HC.V.cache:
+            if self.HC.V[x].f < self.f_lowest:
+                if self.disp:
+                    logging.info(f'self.HC.V[x].f = {self.HC.V[x].f}')
+                self.f_lowest = self.HC.V[x].f
+                self.x_lowest = self.HC.V[x].x_a
+        for lmc in self.LMC.cache:
+            if self.LMC[lmc].f_min < self.f_lowest:
+                self.f_lowest = self.LMC[lmc].f_min
+                self.x_lowest = self.LMC[lmc].x_l
+
+        if self.f_lowest == np.inf:  # no feasible point
+            self.f_lowest = None
+            self.x_lowest = None
+
+    # Stopping criteria functions:
+    def finite_iterations(self):
+        mi = min(x for x in [self.iters, self.maxiter] if x is not None)
+        if self.disp:
+            logging.info(f'Iterations done = {self.iters_done} / {mi}')
+        if self.iters is not None:
+            if self.iters_done >= (self.iters):
+                self.stop_global = True
+
+        if self.maxiter is not None:  # Stop for infeasible sampling
+            if self.iters_done >= (self.maxiter):
+                self.stop_global = True
+        return self.stop_global
+
+    def finite_fev(self):
+        # Finite function evals in the feasible domain
+        if self.disp:
+            logging.info(f'Function evaluations done = {self.fn} / {self.maxfev}')
+        if self.fn >= self.maxfev:
+            self.stop_global = True
+        return self.stop_global
+
+    def finite_ev(self):
+        # Finite evaluations including infeasible sampling points
+        if self.disp:
+            logging.info(f'Sampling evaluations done = {self.n_sampled} '
+                         f'/ {self.maxev}')
+        if self.n_sampled >= self.maxev:
+            self.stop_global = True
+
+    def finite_time(self):
+        if self.disp:
+            logging.info(f'Time elapsed = {time.time() - self.init} '
+                         f'/ {self.maxtime}')
+        if (time.time() - self.init) >= self.maxtime:
+            self.stop_global = True
+
+    def finite_precision(self):
+        """
+        Stop the algorithm if the final function value is known
+
+        Specify in options (with ``self.f_min_true = options['f_min']``)
+        and the tolerance with ``f_tol = options['f_tol']``
+        """
+        # If no minimizer has been found use the lowest sampling value
+        self.find_lowest_vertex()
+        if self.disp:
+            logging.info(f'Lowest function evaluation = {self.f_lowest}')
+            logging.info(f'Specified minimum = {self.f_min_true}')
+        # If no feasible point was return from test
+        if self.f_lowest is None:
+            return self.stop_global
+
+        # Function to stop algorithm at specified percentage error:
+        if self.f_min_true == 0.0:
+            if self.f_lowest <= self.f_tol:
+                self.stop_global = True
+        else:
+            pe = (self.f_lowest - self.f_min_true) / abs(self.f_min_true)
+            if self.f_lowest <= self.f_min_true:
+                self.stop_global = True
+                # 2if (pe - self.f_tol) <= abs(1.0 / abs(self.f_min_true)):
+                if abs(pe) >= 2 * self.f_tol:
+                    warnings.warn(
+                        f"A much lower value than expected f* = {self.f_min_true} "
+                        f"was found f_lowest = {self.f_lowest}",
+                        stacklevel=3
+                    )
+            if pe <= self.f_tol:
+                self.stop_global = True
+
+        return self.stop_global
+
+    def finite_homology_growth(self):
+        """
+        Stop the algorithm if homology group rank did not grow in iteration.
+        """
+        if self.LMC.size == 0:
+            return  # pass on no reason to stop yet.
+        self.hgrd = self.LMC.size - self.hgr
+
+        self.hgr = self.LMC.size
+        if self.hgrd <= self.minhgrd:
+            self.stop_global = True
+        if self.disp:
+            logging.info(f'Current homology growth = {self.hgrd} '
+                         f' (minimum growth = {self.minhgrd})')
+        return self.stop_global
+
+    def stopping_criteria(self):
+        """
+        Various stopping criteria ran every iteration
+
+        Returns
+        -------
+        stop : bool
+        """
+        if self.maxiter is not None:
+            self.finite_iterations()
+        if self.iters is not None:
+            self.finite_iterations()
+        if self.maxfev is not None:
+            self.finite_fev()
+        if self.maxev is not None:
+            self.finite_ev()
+        if self.maxtime is not None:
+            self.finite_time()
+        if self.f_min_true is not None:
+            self.finite_precision()
+        if self.minhgrd is not None:
+            self.finite_homology_growth()
+        return self.stop_global
+
+    def iterate(self):
+        self.iterate_complex()
+
+        # Build minimizer pool
+        if self.minimize_every_iter:
+            if not self.break_routine:
+                self.find_minima()  # Process minimizer pool
+
+        # Algorithm updates
+        self.iters_done += 1
+
+    def iterate_hypercube(self):
+        """
+        Iterate a subdivision of the complex
+
+        Note: called with ``self.iterate_complex()`` after class initiation
+        """
+        # Iterate the complex
+        if self.disp:
+            logging.info('Constructing and refining simplicial complex graph '
+                         'structure')
+        if self.n is None:
+            self.HC.refine_all()
+            self.n_sampled = self.HC.V.size()  # nevs counted
+        else:
+            self.HC.refine(self.n)
+            self.n_sampled += self.n
+
+        if self.disp:
+            logging.info('Triangulation completed, evaluating all constraints '
+                         'and objective function values.')
+
+        # Re-add minimisers to complex
+        if len(self.LMC.xl_maps) > 0:
+            for xl in self.LMC.cache:
+                v = self.HC.V[xl]
+                v_near = v.star()
+                for v in v.nn:
+                    v_near = v_near.union(v.nn)
+                # Reconnect vertices to complex
+                # if self.HC.connect_vertex_non_symm(tuple(self.LMC[xl].x_l),
+                #                                   near=v_near):
+                #    continue
+                # else:
+                    # If failure to find in v_near, then search all vertices
+                    # (very expensive operation:
+                #    self.HC.connect_vertex_non_symm(tuple(self.LMC[xl].x_l)
+                #                                    )
+
+        # Evaluate all constraints and functions
+        self.HC.V.process_pools()
+        if self.disp:
+            logging.info('Evaluations completed.')
+
+        # feasible sampling points counted by the triangulation.py routines
+        self.fn = self.HC.V.nfev
+        return
+
+    def iterate_delaunay(self):
+        """
+        Build a complex of Delaunay triangulated points
+
+        Note: called with ``self.iterate_complex()`` after class initiation
+        """
+        self.nc += self.n
+        self.sampled_surface(infty_cons_sampl=self.infty_cons_sampl)
+
+        # Add sampled points to a triangulation, construct self.Tri
+        if self.disp:
+            logging.info(f'self.n = {self.n}')
+            logging.info(f'self.nc = {self.nc}')
+            logging.info('Constructing and refining simplicial complex graph '
+                         'structure from sampling points.')
+
+        if self.dim < 2:
+            self.Ind_sorted = np.argsort(self.C, axis=0)
+            self.Ind_sorted = self.Ind_sorted.flatten()
+            tris = []
+            for ind, ind_s in enumerate(self.Ind_sorted):
+                if ind > 0:
+                    tris.append(self.Ind_sorted[ind - 1:ind + 1])
+
+            tris = np.array(tris)
+            # Store 1D triangulation:
+            self.Tri = namedtuple('Tri', ['points', 'simplices'])(self.C, tris)
+            self.points = {}
+        else:
+            if self.C.shape[0] > self.dim + 1:  # Ensure a simplex can be built
+                self.delaunay_triangulation(n_prc=self.n_prc)
+            self.n_prc = self.C.shape[0]
+
+        if self.disp:
+            logging.info('Triangulation completed, evaluating all '
+                         'constraints and objective function values.')
+
+        if hasattr(self, 'Tri'):
+            self.HC.vf_to_vv(self.Tri.points, self.Tri.simplices)
+
+        # Process all pools
+        # Evaluate all constraints and functions
+        if self.disp:
+            logging.info('Triangulation completed, evaluating all constraints '
+                         'and objective function values.')
+
+        # Evaluate all constraints and functions
+        self.HC.V.process_pools()
+        if self.disp:
+            logging.info('Evaluations completed.')
+
+        # feasible sampling points counted by the triangulation.py routines
+        self.fn = self.HC.V.nfev
+        self.n_sampled = self.nc  # nevs counted in triangulation
+        return
+
+    # Hypercube minimizers
+    def minimizers(self):
+        """
+        Returns the indexes of all minimizers
+        """
+        self.minimizer_pool = []
+        # Note: Can implement parallelization here
+        for x in self.HC.V.cache:
+            in_LMC = False
+            if len(self.LMC.xl_maps) > 0:
+                for xlmi in self.LMC.xl_maps:
+                    if np.all(np.array(x) == np.array(xlmi)):
+                        in_LMC = True
+            if in_LMC:
+                continue
+
+            if self.HC.V[x].minimiser():
+                if self.disp:
+                    logging.info('=' * 60)
+                    logging.info(f'v.x = {self.HC.V[x].x_a} is minimizer')
+                    logging.info(f'v.f = {self.HC.V[x].f} is minimizer')
+                    logging.info('=' * 30)
+
+                if self.HC.V[x] not in self.minimizer_pool:
+                    self.minimizer_pool.append(self.HC.V[x])
+
+                if self.disp:
+                    logging.info('Neighbors:')
+                    logging.info('=' * 30)
+                    for vn in self.HC.V[x].nn:
+                        logging.info(f'x = {vn.x} || f = {vn.f}')
+
+                    logging.info('=' * 60)
+        self.minimizer_pool_F = []
+        self.X_min = []
+        # normalized tuple in the Vertex cache
+        self.X_min_cache = {}  # Cache used in hypercube sampling
+
+        for v in self.minimizer_pool:
+            self.X_min.append(v.x_a)
+            self.minimizer_pool_F.append(v.f)
+            self.X_min_cache[tuple(v.x_a)] = v.x
+
+        self.minimizer_pool_F = np.array(self.minimizer_pool_F)
+        self.X_min = np.array(self.X_min)
+
+        # TODO: Only do this if global mode
+        self.sort_min_pool()
+
+        return self.X_min
+
+    # Local minimisation
+    # Minimiser pool processing
+    def minimise_pool(self, force_iter=False):
+        """
+        This processing method can optionally minimise only the best candidate
+        solutions in the minimiser pool
+
+        Parameters
+        ----------
+        force_iter : int
+                     Number of starting minimizers to process (can be specified
+                     globally or locally)
+
+        """
+        # Find first local minimum
+        # NOTE: Since we always minimize this value regardless it is a waste to
+        # build the topograph first before minimizing
+        lres_f_min = self.minimize(self.X_min[0], ind=self.minimizer_pool[0])
+
+        # Trim minimized point from current minimizer set
+        self.trim_min_pool(0)
+
+        while not self.stop_l_iter:
+            # Global stopping criteria:
+            self.stopping_criteria()
+
+            # Note first iteration is outside loop:
+            if force_iter:
+                force_iter -= 1
+                if force_iter == 0:
+                    self.stop_l_iter = True
+                    break
+
+            if np.shape(self.X_min)[0] == 0:
+                self.stop_l_iter = True
+                break
+
+            # Construct topograph from current minimizer set
+            # (NOTE: This is a very small topograph using only the minizer pool
+            #        , it might be worth using some graph theory tools instead.
+            self.g_topograph(lres_f_min.x, self.X_min)
+
+            # Find local minimum at the miniser with the greatest Euclidean
+            # distance from the current solution
+            ind_xmin_l = self.Z[:, -1]
+            lres_f_min = self.minimize(self.Ss[-1, :], self.minimizer_pool[-1])
+
+            # Trim minimised point from current minimizer set
+            self.trim_min_pool(ind_xmin_l)
+
+        # Reset controls
+        self.stop_l_iter = False
+        return
+
+    def sort_min_pool(self):
+        # Sort to find minimum func value in min_pool
+        self.ind_f_min = np.argsort(self.minimizer_pool_F)
+        self.minimizer_pool = np.array(self.minimizer_pool)[self.ind_f_min]
+        self.minimizer_pool_F = np.array(self.minimizer_pool_F)[
+            self.ind_f_min]
+        return
+
+    def trim_min_pool(self, trim_ind):
+        self.X_min = np.delete(self.X_min, trim_ind, axis=0)
+        self.minimizer_pool_F = np.delete(self.minimizer_pool_F, trim_ind)
+        self.minimizer_pool = np.delete(self.minimizer_pool, trim_ind)
+        return
+
+    def g_topograph(self, x_min, X_min):
+        """
+        Returns the topographical vector stemming from the specified value
+        ``x_min`` for the current feasible set ``X_min`` with True boolean
+        values indicating positive entries and False values indicating
+        negative entries.
+
+        """
+        x_min = np.array([x_min])
+        self.Y = spatial.distance.cdist(x_min, X_min, 'euclidean')
+        # Find sorted indexes of spatial distances:
+        self.Z = np.argsort(self.Y, axis=-1)
+
+        self.Ss = X_min[self.Z][0]
+        self.minimizer_pool = self.minimizer_pool[self.Z]
+        self.minimizer_pool = self.minimizer_pool[0]
+        return self.Ss
+
+    # Local bound functions
+    def construct_lcb_simplicial(self, v_min):
+        """
+        Construct locally (approximately) convex bounds
+
+        Parameters
+        ----------
+        v_min : Vertex object
+                The minimizer vertex
+
+        Returns
+        -------
+        cbounds : list of lists
+            List of size dimension with length-2 list of bounds for each
+            dimension.
+
+        """
+        cbounds = [[x_b_i[0], x_b_i[1]] for x_b_i in self.bounds]
+        # Loop over all bounds
+        for vn in v_min.nn:
+            for i, x_i in enumerate(vn.x_a):
+                # Lower bound
+                if (x_i < v_min.x_a[i]) and (x_i > cbounds[i][0]):
+                    cbounds[i][0] = x_i
+
+                # Upper bound
+                if (x_i > v_min.x_a[i]) and (x_i < cbounds[i][1]):
+                    cbounds[i][1] = x_i
+
+        if self.disp:
+            logging.info(f'cbounds found for v_min.x_a = {v_min.x_a}')
+            logging.info(f'cbounds = {cbounds}')
+
+        return cbounds
+
+    def construct_lcb_delaunay(self, v_min, ind=None):
+        """
+        Construct locally (approximately) convex bounds
+
+        Parameters
+        ----------
+        v_min : Vertex object
+                The minimizer vertex
+
+        Returns
+        -------
+        cbounds : list of lists
+            List of size dimension with length-2 list of bounds for each
+            dimension.
+        """
+        cbounds = [[x_b_i[0], x_b_i[1]] for x_b_i in self.bounds]
+
+        return cbounds
+
+    # Minimize a starting point locally
+    def minimize(self, x_min, ind=None):
+        """
+        This function is used to calculate the local minima using the specified
+        sampling point as a starting value.
+
+        Parameters
+        ----------
+        x_min : vector of floats
+            Current starting point to minimize.
+
+        Returns
+        -------
+        lres : OptimizeResult
+            The local optimization result represented as a `OptimizeResult`
+            object.
+        """
+        # Use minima maps if vertex was already run
+        if self.disp:
+            logging.info(f'Vertex minimiser maps = {self.LMC.v_maps}')
+
+        if self.LMC[x_min].lres is not None:
+            logging.info(f'Found self.LMC[x_min].lres = '
+                         f'{self.LMC[x_min].lres}')
+            return self.LMC[x_min].lres
+
+        if self.callback is not None:
+            logging.info(f'Callback for minimizer starting at {x_min}:')
+
+        if self.disp:
+            logging.info(f'Starting minimization at {x_min}...')
+
+        if self.sampling_method == 'simplicial':
+            x_min_t = tuple(x_min)
+            # Find the normalized tuple in the Vertex cache:
+            x_min_t_norm = self.X_min_cache[tuple(x_min_t)]
+            x_min_t_norm = tuple(x_min_t_norm)
+            g_bounds = self.construct_lcb_simplicial(self.HC.V[x_min_t_norm])
+            if 'bounds' in self.min_solver_args:
+                self.minimizer_kwargs['bounds'] = g_bounds
+                logging.info(self.minimizer_kwargs['bounds'])
+
+        else:
+            g_bounds = self.construct_lcb_delaunay(x_min, ind=ind)
+            if 'bounds' in self.min_solver_args:
+                self.minimizer_kwargs['bounds'] = g_bounds
+                logging.info(self.minimizer_kwargs['bounds'])
+
+        if self.disp and 'bounds' in self.minimizer_kwargs:
+            logging.info('bounds in kwarg:')
+            logging.info(self.minimizer_kwargs['bounds'])
+
+        # Local minimization using scipy.optimize.minimize:
+        lres = minimize(self.func, x_min, **self.minimizer_kwargs)
+
+        if self.disp:
+            logging.info(f'lres = {lres}')
+
+        # Local function evals for all minimizers
+        self.res.nlfev += lres.nfev
+        if 'njev' in lres:
+            self.res.nljev += lres.njev
+        if 'nhev' in lres:
+            self.res.nlhev += lres.nhev
+
+        try:  # Needed because of the brain dead 1x1 NumPy arrays
+            lres.fun = lres.fun[0]
+        except (IndexError, TypeError):
+            lres.fun
+
+        # Append minima maps
+        self.LMC[x_min]
+        self.LMC.add_res(x_min, lres, bounds=g_bounds)
+
+        return lres
+
+    # Post local minimization processing
+    def sort_result(self):
+        """
+        Sort results and build the global return object
+        """
+        # Sort results in local minima cache
+        results = self.LMC.sort_cache_result()
+        self.res.xl = results['xl']
+        self.res.funl = results['funl']
+        self.res.x = results['x']
+        self.res.fun = results['fun']
+
+        # Add local func evals to sampling func evals
+        # Count the number of feasible vertices and add to local func evals:
+        self.res.nfev = self.fn + self.res.nlfev
+        return self.res
+
+    # Algorithm controls
+    def fail_routine(self, mes=("Failed to converge")):
+        self.break_routine = True
+        self.res.success = False
+        self.X_min = [None]
+        self.res.message = mes
+
+    def sampled_surface(self, infty_cons_sampl=False):
+        """
+        Sample the function surface.
+
+        There are 2 modes, if ``infty_cons_sampl`` is True then the sampled
+        points that are generated outside the feasible domain will be
+        assigned an ``inf`` value in accordance with SHGO rules.
+        This guarantees convergence and usually requires less objective
+        function evaluations at the computational costs of more Delaunay
+        triangulation points.
+
+        If ``infty_cons_sampl`` is False, then the infeasible points are
+        discarded and only a subspace of the sampled points are used. This
+        comes at the cost of the loss of guaranteed convergence and usually
+        requires more objective function evaluations.
+        """
+        # Generate sampling points
+        if self.disp:
+            logging.info('Generating sampling points')
+        self.sampling(self.nc, self.dim)
+        if len(self.LMC.xl_maps) > 0:
+            self.C = np.vstack((self.C, np.array(self.LMC.xl_maps)))
+        if not infty_cons_sampl:
+            # Find subspace of feasible points
+            if self.g_cons is not None:
+                self.sampling_subspace()
+
+        # Sort remaining samples
+        self.sorted_samples()
+
+        # Find objective function references
+        self.n_sampled = self.nc
+
+    def sampling_custom(self, n, dim):
+        """
+        Generates uniform sampling points in a hypercube and scales the points
+        to the bound limits.
+        """
+        # Generate sampling points.
+        # Generate uniform sample points in [0, 1]^m \subset R^m
+        if self.n_sampled == 0:
+            self.C = self.sampling_function(n, dim)
+        else:
+            self.C = self.sampling_function(n, dim)
+        # Distribute over bounds
+        for i in range(len(self.bounds)):
+            self.C[:, i] = (self.C[:, i] *
+                            (self.bounds[i][1] - self.bounds[i][0])
+                            + self.bounds[i][0])
+        return self.C
+
+    def sampling_subspace(self):
+        """Find subspace of feasible points from g_func definition"""
+        # Subspace of feasible points.
+        for ind, g in enumerate(self.g_cons):
+            # C.shape = (Z, dim) where Z is the number of sampling points to
+            # evaluate and dim is the dimensionality of the problem.
+            # the constraint function may not be vectorised so have to step
+            # through each sampling point sequentially.
+            feasible = np.array(
+                [np.all(g(x_C, *self.g_args[ind]) >= 0.0) for x_C in self.C],
+                dtype=bool
+            )
+            self.C = self.C[feasible]
+
+            if self.C.size == 0:
+                self.res.message = ('No sampling point found within the '
+                                    + 'feasible set. Increasing sampling '
+                                    + 'size.')
+                # sampling correctly for both 1-D and >1-D cases
+                if self.disp:
+                    logging.info(self.res.message)
+
+    def sorted_samples(self):  # Validated
+        """Find indexes of the sorted sampling points"""
+        self.Ind_sorted = np.argsort(self.C, axis=0)
+        self.Xs = self.C[self.Ind_sorted]
+        return self.Ind_sorted, self.Xs
+
+    def delaunay_triangulation(self, n_prc=0):
+        if hasattr(self, 'Tri') and self.qhull_incremental:
+            # TODO: Uncertain if n_prc needs to add len(self.LMC.xl_maps)
+            # in self.sampled_surface
+            self.Tri.add_points(self.C[n_prc:, :])
+        else:
+            try:
+                self.Tri = spatial.Delaunay(self.C,
+                                            incremental=self.qhull_incremental,
+                                            )
+            except spatial.QhullError:
+                if str(sys.exc_info()[1])[:6] == 'QH6239':
+                    logging.warning('QH6239 Qhull precision error detected, '
+                                    'this usually occurs when no bounds are '
+                                    'specified, Qhull can only run with '
+                                    'handling cocircular/cospherical points'
+                                    ' and in this case incremental mode is '
+                                    'switched off. The performance of shgo '
+                                    'will be reduced in this mode.')
+                    self.qhull_incremental = False
+                    self.Tri = spatial.Delaunay(self.C,
+                                                incremental=
+                                                self.qhull_incremental)
+                else:
+                    raise
+
+        return self.Tri
+
+
+class LMap:
+    def __init__(self, v):
+        self.v = v
+        self.x_l = None
+        self.lres = None
+        self.f_min = None
+        self.lbounds = []
+
+
+class LMapCache:
+    def __init__(self):
+        self.cache = {}
+
+        # Lists for search queries
+        self.v_maps = []
+        self.xl_maps = []
+        self.xl_maps_set = set()
+        self.f_maps = []
+        self.lbound_maps = []
+        self.size = 0
+
+    def __getitem__(self, v):
+        try:
+            v = np.ndarray.tolist(v)
+        except TypeError:
+            pass
+        v = tuple(v)
+        try:
+            return self.cache[v]
+        except KeyError:
+            xval = LMap(v)
+            self.cache[v] = xval
+
+            return self.cache[v]
+
+    def add_res(self, v, lres, bounds=None):
+        v = np.ndarray.tolist(v)
+        v = tuple(v)
+        self.cache[v].x_l = lres.x
+        self.cache[v].lres = lres
+        self.cache[v].f_min = lres.fun
+        self.cache[v].lbounds = bounds
+
+        # Update cache size
+        self.size += 1
+
+        # Cache lists for search queries
+        self.v_maps.append(v)
+        self.xl_maps.append(lres.x)
+        self.xl_maps_set.add(tuple(lres.x))
+        self.f_maps.append(lres.fun)
+        self.lbound_maps.append(bounds)
+
+    def sort_cache_result(self):
+        """
+        Sort results and build the global return object
+        """
+        results = {}
+        # Sort results and save
+        self.xl_maps = np.array(self.xl_maps)
+        self.f_maps = np.array(self.f_maps)
+
+        # Sorted indexes in Func_min
+        ind_sorted = np.argsort(self.f_maps)
+
+        # Save ordered list of minima
+        results['xl'] = self.xl_maps[ind_sorted]  # Ordered x vals
+        self.f_maps = np.array(self.f_maps)
+        results['funl'] = self.f_maps[ind_sorted]
+        results['funl'] = results['funl'].T
+
+        # Find global of all minimizers
+        results['x'] = self.xl_maps[ind_sorted[0]]  # Save global minima
+        results['fun'] = self.f_maps[ind_sorted[0]]  # Save global fun value
+
+        self.xl_maps = np.ndarray.tolist(self.xl_maps)
+        self.f_maps = np.ndarray.tolist(self.f_maps)
+        return results
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..98817e02740f06452b8ca1e63ada729670af354a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_complex.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_complex.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..37d2e80112a3c40c61a6424927f07eb019496ef6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_complex.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_vertex.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_vertex.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a8f1dfdec1cf7807d54d850f2e9c0172920f4f6c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/__pycache__/_vertex.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_complex.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_complex.py
new file mode 100644
index 0000000000000000000000000000000000000000..178e9daea2d03e335a6901483f574d7453fb9340
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_complex.py
@@ -0,0 +1,1225 @@
+"""Base classes for low memory simplicial complex structures."""
+import copy
+import logging
+import itertools
+import decimal
+from functools import cache
+
+import numpy as np
+
+from ._vertex import (VertexCacheField, VertexCacheIndex)
+
+
+class Complex:
+    """
+    Base class for a simplicial complex described as a cache of vertices
+    together with their connections.
+
+    Important methods:
+        Domain triangulation:
+                Complex.triangulate, Complex.split_generation
+        Triangulating arbitrary points (must be traingulable,
+            may exist outside domain):
+                Complex.triangulate(sample_set)
+        Converting another simplicial complex structure data type to the
+            structure used in Complex (ex. OBJ wavefront)
+                Complex.convert(datatype, data)
+
+    Important objects:
+        HC.V: The cache of vertices and their connection
+        HC.H: Storage structure of all vertex groups
+
+    Parameters
+    ----------
+    dim : int
+        Spatial dimensionality of the complex R^dim
+    domain : list of tuples, optional
+        The bounds [x_l, x_u]^dim of the hyperrectangle space
+        ex. The default domain is the hyperrectangle [0, 1]^dim
+        Note: The domain must be convex, non-convex spaces can be cut
+              away from this domain using the non-linear
+              g_cons functions to define any arbitrary domain
+              (these domains may also be disconnected from each other)
+    sfield :
+        A scalar function defined in the associated domain f: R^dim --> R
+    sfield_args : tuple
+        Additional arguments to be passed to `sfield`
+    vfield :
+        A scalar function defined in the associated domain
+                       f: R^dim --> R^m
+                   (for example a gradient function of the scalar field)
+    vfield_args : tuple
+        Additional arguments to be passed to vfield
+    symmetry : None or list
+            Specify if the objective function contains symmetric variables.
+            The search space (and therefore performance) is decreased by up to
+            O(n!) times in the fully symmetric case.
+
+            E.g.  f(x) = (x_1 + x_2 + x_3) + (x_4)**2 + (x_5)**2 + (x_6)**2
+
+            In this equation x_2 and x_3 are symmetric to x_1, while x_5 and
+             x_6 are symmetric to x_4, this can be specified to the solver as:
+
+            symmetry = [0,  # Variable 1
+                        0,  # symmetric to variable 1
+                        0,  # symmetric to variable 1
+                        3,  # Variable 4
+                        3,  # symmetric to variable 4
+                        3,  # symmetric to variable 4
+                        ]
+
+    constraints : dict or sequence of dict, optional
+        Constraints definition.
+        Function(s) ``R**n`` in the form::
+
+            g(x) <= 0 applied as g : R^n -> R^m
+            h(x) == 0 applied as h : R^n -> R^p
+
+        Each constraint is defined in a dictionary with fields:
+
+            type : str
+                Constraint type: 'eq' for equality, 'ineq' for inequality.
+            fun : callable
+                The function defining the constraint.
+            jac : callable, optional
+                The Jacobian of `fun` (only for SLSQP).
+            args : sequence, optional
+                Extra arguments to be passed to the function and Jacobian.
+
+        Equality constraint means that the constraint function result is to
+        be zero whereas inequality means that it is to be
+        non-negative.constraints : dict or sequence of dict, optional
+        Constraints definition.
+        Function(s) ``R**n`` in the form::
+
+            g(x) <= 0 applied as g : R^n -> R^m
+            h(x) == 0 applied as h : R^n -> R^p
+
+        Each constraint is defined in a dictionary with fields:
+
+            type : str
+                Constraint type: 'eq' for equality, 'ineq' for inequality.
+            fun : callable
+                The function defining the constraint.
+            jac : callable, optional
+                The Jacobian of `fun` (unused).
+            args : sequence, optional
+                Extra arguments to be passed to the function and Jacobian.
+
+        Equality constraint means that the constraint function result is to
+        be zero whereas inequality means that it is to be non-negative.
+
+    workers : int  optional
+        Uses `multiprocessing.Pool `) to compute the field
+         functions in parallel.
+    """
+    def __init__(self, dim, domain=None, sfield=None, sfield_args=(),
+                 symmetry=None, constraints=None, workers=1):
+        self.dim = dim
+
+        # Domains
+        self.domain = domain
+        if domain is None:
+            self.bounds = [(0.0, 1.0), ] * dim
+        else:
+            self.bounds = domain
+        self.symmetry = symmetry
+        #      here in init to avoid if checks
+
+        # Field functions
+        self.sfield = sfield
+        self.sfield_args = sfield_args
+
+        # Process constraints
+        # Constraints
+        # Process constraint dict sequence:
+        if constraints is not None:
+            self.min_cons = constraints
+            self.g_cons = []
+            self.g_args = []
+            if not isinstance(constraints, (tuple, list)):
+                constraints = (constraints,)
+
+            for cons in constraints:
+                if cons['type'] in ('ineq'):
+                    self.g_cons.append(cons['fun'])
+                    try:
+                        self.g_args.append(cons['args'])
+                    except KeyError:
+                        self.g_args.append(())
+            self.g_cons = tuple(self.g_cons)
+            self.g_args = tuple(self.g_args)
+        else:
+            self.g_cons = None
+            self.g_args = None
+
+        # Homology properties
+        self.gen = 0
+        self.perm_cycle = 0
+
+        # Every cell is stored in a list of its generation,
+        # ex. the initial cell is stored in self.H[0]
+        # 1st get new cells are stored in self.H[1] etc.
+        # When a cell is sub-generated it is removed from this list
+
+        self.H = []  # Storage structure of vertex groups
+
+        # Cache of all vertices
+        if (sfield is not None) or (self.g_cons is not None):
+            # Initiate a vertex cache and an associated field cache, note that
+            # the field case is always initiated inside the vertex cache if an
+            # associated field scalar field is defined:
+            if sfield is not None:
+                self.V = VertexCacheField(field=sfield, field_args=sfield_args,
+                                          g_cons=self.g_cons,
+                                          g_cons_args=self.g_args,
+                                          workers=workers)
+            elif self.g_cons is not None:
+                self.V = VertexCacheField(field=sfield, field_args=sfield_args,
+                                          g_cons=self.g_cons,
+                                          g_cons_args=self.g_args,
+                                          workers=workers)
+        else:
+            self.V = VertexCacheIndex()
+
+        self.V_non_symm = []  # List of non-symmetric vertices
+
+    def __call__(self):
+        return self.H
+
+    # %% Triangulation methods
+    def cyclic_product(self, bounds, origin, supremum, centroid=True):
+        """Generate initial triangulation using cyclic product"""
+        # Define current hyperrectangle
+        vot = tuple(origin)
+        vut = tuple(supremum)  # Hyperrectangle supremum
+        self.V[vot]
+        vo = self.V[vot]
+        yield vo.x
+        self.V[vut].connect(self.V[vot])
+        yield vut
+        # Cyclic group approach with second x_l --- x_u operation.
+
+        # These containers store the "lower" and "upper" vertices
+        # corresponding to the origin or supremum of every C2 group.
+        # It has the structure of `dim` times embedded lists each containing
+        # these vertices as the entire complex grows. Bounds[0] has to be done
+        # outside the loops before we have symmetric containers.
+        # NOTE: This means that bounds[0][1] must always exist
+        C0x = [[self.V[vot]]]
+        a_vo = copy.copy(list(origin))
+        a_vo[0] = vut[0]  # Update aN Origin
+        a_vo = self.V[tuple(a_vo)]
+        # self.V[vot].connect(self.V[tuple(a_vo)])
+        self.V[vot].connect(a_vo)
+        yield a_vo.x
+        C1x = [[a_vo]]
+        # C1x = [[self.V[tuple(a_vo)]]]
+        ab_C = []  # Container for a + b operations
+
+        # Loop over remaining bounds
+        for i, x in enumerate(bounds[1:]):
+            # Update lower and upper containers
+            C0x.append([])
+            C1x.append([])
+            # try to access a second bound (if not, C1 is symmetric)
+            try:
+                # Early try so that we don't have to copy the cache before
+                # moving on to next C1/C2: Try to add the operation of a new
+                # C2 product by accessing the upper bound
+                x[1]
+                # Copy lists for iteration
+                cC0x = [x[:] for x in C0x[:i + 1]]
+                cC1x = [x[:] for x in C1x[:i + 1]]
+                for j, (VL, VU) in enumerate(zip(cC0x, cC1x)):
+                    for k, (vl, vu) in enumerate(zip(VL, VU)):
+                        # Build aN vertices for each lower-upper pair in N:
+                        a_vl = list(vl.x)
+                        a_vu = list(vu.x)
+                        a_vl[i + 1] = vut[i + 1]
+                        a_vu[i + 1] = vut[i + 1]
+                        a_vl = self.V[tuple(a_vl)]
+
+                        # Connect vertices in N to corresponding vertices
+                        # in aN:
+                        vl.connect(a_vl)
+
+                        yield a_vl.x
+
+                        a_vu = self.V[tuple(a_vu)]
+                        # Connect vertices in N to corresponding vertices
+                        # in aN:
+                        vu.connect(a_vu)
+
+                        # Connect new vertex pair in aN:
+                        a_vl.connect(a_vu)
+
+                        # Connect lower pair to upper (triangulation
+                        # operation of a + b (two arbitrary operations):
+                        vl.connect(a_vu)
+                        ab_C.append((vl, a_vu))
+
+                        # Update the containers
+                        C0x[i + 1].append(vl)
+                        C0x[i + 1].append(vu)
+                        C1x[i + 1].append(a_vl)
+                        C1x[i + 1].append(a_vu)
+
+                        # Update old containers
+                        C0x[j].append(a_vl)
+                        C1x[j].append(a_vu)
+
+                        # Yield new points
+                        yield a_vu.x
+
+                # Try to connect aN lower source of previous a + b
+                # operation with a aN vertex
+                ab_Cc = copy.copy(ab_C)
+
+                for vp in ab_Cc:
+                    b_v = list(vp[0].x)
+                    ab_v = list(vp[1].x)
+                    b_v[i + 1] = vut[i + 1]
+                    ab_v[i + 1] = vut[i + 1]
+                    b_v = self.V[tuple(b_v)]  # b + vl
+                    ab_v = self.V[tuple(ab_v)]  # b + a_vl
+                    # Note o---o is already connected
+                    vp[0].connect(ab_v)  # o-s
+                    b_v.connect(ab_v)  # s-s
+
+                    # Add new list of cross pairs
+                    ab_C.append((vp[0], ab_v))
+                    ab_C.append((b_v, ab_v))
+
+            except IndexError:
+                cC0x = C0x[i]
+                cC1x = C1x[i]
+                VL, VU = cC0x, cC1x
+                for k, (vl, vu) in enumerate(zip(VL, VU)):
+                    # Build aN vertices for each lower-upper pair in N:
+                    a_vu = list(vu.x)
+                    a_vu[i + 1] = vut[i + 1]
+                    # Connect vertices in N to corresponding vertices
+                    # in aN:
+                    a_vu = self.V[tuple(a_vu)]
+                    # Connect vertices in N to corresponding vertices
+                    # in aN:
+                    vu.connect(a_vu)
+                    # Connect new vertex pair in aN:
+                    # a_vl.connect(a_vu)
+                    # Connect lower pair to upper (triangulation
+                    # operation of a + b (two arbitrary operations):
+                    vl.connect(a_vu)
+                    ab_C.append((vl, a_vu))
+                    C0x[i + 1].append(vu)
+                    C1x[i + 1].append(a_vu)
+                    # Yield new points
+                    a_vu.connect(self.V[vut])
+                    yield a_vu.x
+                    ab_Cc = copy.copy(ab_C)
+                    for vp in ab_Cc:
+                        if vp[1].x[i] == vut[i]:
+                            ab_v = list(vp[1].x)
+                            ab_v[i + 1] = vut[i + 1]
+                            ab_v = self.V[tuple(ab_v)]  # b + a_vl
+                            # Note o---o is already connected
+                            vp[0].connect(ab_v)  # o-s
+
+                            # Add new list of cross pairs
+                            ab_C.append((vp[0], ab_v))
+
+        # Clean class trash
+        try:
+            del C0x
+            del cC0x
+            del C1x
+            del cC1x
+            del ab_C
+            del ab_Cc
+        except UnboundLocalError:
+            pass
+
+        # Extra yield to ensure that the triangulation is completed
+        if centroid:
+            vo = self.V[vot]
+            vs = self.V[vut]
+            # Disconnect the origin and supremum
+            vo.disconnect(vs)
+            # Build centroid
+            vc = self.split_edge(vot, vut)
+            for v in vo.nn:
+                v.connect(vc)
+            yield vc.x
+            return vc.x
+        else:
+            yield vut
+            return vut
+
+    def triangulate(self, n=None, symmetry=None, centroid=True,
+                    printout=False):
+        """
+        Triangulate the initial domain, if n is not None then a limited number
+        of points will be generated
+
+        Parameters
+        ----------
+        n : int, Number of points to be sampled.
+        symmetry :
+
+            Ex. Dictionary/hashtable
+            f(x) = (x_1 + x_2 + x_3) + (x_4)**2 + (x_5)**2 + (x_6)**2
+
+            symmetry = symmetry[0]: 0,  # Variable 1
+                       symmetry[1]: 0,  # symmetric to variable 1
+                       symmetry[2]: 0,  # symmetric to variable 1
+                       symmetry[3]: 3,  # Variable 4
+                       symmetry[4]: 3,  # symmetric to variable 4
+                       symmetry[5]: 3,  # symmetric to variable 4
+                        }
+        centroid : bool, if True add a central point to the hypercube
+        printout : bool, if True print out results
+
+        NOTES:
+        ------
+        Rather than using the combinatorial algorithm to connect vertices we
+        make the following observation:
+
+        The bound pairs are similar a C2 cyclic group and the structure is
+        formed using the cartesian product:
+
+        H = C2 x C2 x C2 ... x C2 (dim times)
+
+        So construct any normal subgroup N and consider H/N first, we connect
+        all vertices within N (ex. N is C2 (the first dimension), then we move
+        to a left coset aN (an operation moving around the defined H/N group by
+        for example moving from the lower bound in C2 (dimension 2) to the
+        higher bound in C2. During this operation connection all the vertices.
+        Now repeat the N connections. Note that these elements can be connected
+        in parallel.
+        """
+        # Inherit class arguments
+        if symmetry is None:
+            symmetry = self.symmetry
+        # Build origin and supremum vectors
+        origin = [i[0] for i in self.bounds]
+        self.origin = origin
+        supremum = [i[1] for i in self.bounds]
+
+        self.supremum = supremum
+
+        if symmetry is None:
+            cbounds = self.bounds
+        else:
+            cbounds = copy.copy(self.bounds)
+            for i, j in enumerate(symmetry):
+                if i is not j:
+                    # pop second entry on second symmetry vars
+                    cbounds[i] = [self.bounds[symmetry[i]][0]]
+                    # Sole (first) entry is the sup value and there is no
+                    # origin:
+                    cbounds[i] = [self.bounds[symmetry[i]][1]]
+                    if (self.bounds[symmetry[i]] is not
+                            self.bounds[symmetry[j]]):
+                        logging.warning(f"Variable {i} was specified as "
+                                        f"symmetric to variable {j}, however"
+                                        f", the bounds {i} ="
+                                        f" {self.bounds[symmetry[i]]} and {j}"
+                                        f" ="
+                                        f" {self.bounds[symmetry[j]]} do not "
+                                        f"match, the mismatch was ignored in "
+                                        f"the initial triangulation.")
+                        cbounds[i] = self.bounds[symmetry[j]]
+
+        if n is None:
+            # Build generator
+            self.cp = self.cyclic_product(cbounds, origin, supremum, centroid)
+            for i in self.cp:
+                i
+
+            try:
+                self.triangulated_vectors.append((tuple(self.origin),
+                                                  tuple(self.supremum)))
+            except (AttributeError, KeyError):
+                self.triangulated_vectors = [(tuple(self.origin),
+                                              tuple(self.supremum))]
+
+        else:
+            # Check if generator already exists
+            try:
+                self.cp
+            except (AttributeError, KeyError):
+                self.cp = self.cyclic_product(cbounds, origin, supremum,
+                                              centroid)
+
+            try:
+                while len(self.V.cache) < n:
+                    next(self.cp)
+            except StopIteration:
+                try:
+                    self.triangulated_vectors.append((tuple(self.origin),
+                                                      tuple(self.supremum)))
+                except (AttributeError, KeyError):
+                    self.triangulated_vectors = [(tuple(self.origin),
+                                                  tuple(self.supremum))]
+
+        if printout:
+            # for v in self.C0():
+            #   v.print_out()
+            for v in self.V.cache:
+                self.V[v].print_out()
+
+        return
+
+    def refine(self, n=1):
+        if n is None:
+            try:
+                self.triangulated_vectors
+                self.refine_all()
+                return
+            except AttributeError as ae:
+                if str(ae) == "'Complex' object has no attribute " \
+                              "'triangulated_vectors'":
+                    self.triangulate(symmetry=self.symmetry)
+                    return
+                else:
+                    raise
+
+        nt = len(self.V.cache) + n  # Target number of total vertices
+        # In the outer while loop we iterate until we have added an extra `n`
+        # vertices to the complex:
+        while len(self.V.cache) < nt:  # while loop 1
+            try:  # try 1
+                # Try to access triangulated_vectors, this should only be
+                # defined if an initial triangulation has already been
+                # performed:
+                self.triangulated_vectors
+                # Try a usual iteration of the current generator, if it
+                # does not exist or is exhausted then produce a new generator
+                try:  # try 2
+                    next(self.rls)
+                except (AttributeError, StopIteration, KeyError):
+                    vp = self.triangulated_vectors[0]
+                    self.rls = self.refine_local_space(*vp, bounds=self.bounds)
+                    next(self.rls)
+
+            except (AttributeError, KeyError):
+                # If an initial triangulation has not been completed, then
+                # we start/continue the initial triangulation targeting `nt`
+                # vertices, if nt is greater than the initial number of
+                # vertices then the `refine` routine will move back to try 1.
+                self.triangulate(nt, self.symmetry)
+        return
+
+    def refine_all(self, centroids=True):
+        """Refine the entire domain of the current complex."""
+        try:
+            self.triangulated_vectors
+            tvs = copy.copy(self.triangulated_vectors)
+            for i, vp in enumerate(tvs):
+                self.rls = self.refine_local_space(*vp, bounds=self.bounds)
+                for i in self.rls:
+                    i
+        except AttributeError as ae:
+            if str(ae) == "'Complex' object has no attribute " \
+                          "'triangulated_vectors'":
+                self.triangulate(symmetry=self.symmetry, centroid=centroids)
+            else:
+                raise
+
+        # This adds a centroid to every new sub-domain generated and defined
+        # by self.triangulated_vectors, in addition the vertices ! to complete
+        # the triangulation
+        return
+
+    def refine_local_space(self, origin, supremum, bounds, centroid=1):
+        # Copy for later removal
+        origin_c = copy.copy(origin)
+        supremum_c = copy.copy(supremum)
+
+        # Initiate local variables redefined in later inner `for` loop:
+        vl, vu, a_vu = None, None, None
+
+        # Change the vector orientation so that it is only increasing
+        s_ov = list(origin)
+        s_origin = list(origin)
+        s_sv = list(supremum)
+        s_supremum = list(supremum)
+        for i, vi in enumerate(s_origin):
+            if s_ov[i] > s_sv[i]:
+                s_origin[i] = s_sv[i]
+                s_supremum[i] = s_ov[i]
+
+        vot = tuple(s_origin)
+        vut = tuple(s_supremum)  # Hyperrectangle supremum
+
+        vo = self.V[vot]  # initiate if doesn't exist yet
+        vs = self.V[vut]
+        # Start by finding the old centroid of the new space:
+        vco = self.split_edge(vo.x, vs.x)  # Split in case not centroid arg
+
+        # Find set of extreme vertices in current local space
+        sup_set = copy.copy(vco.nn)
+        # Cyclic group approach with second x_l --- x_u operation.
+
+        # These containers store the "lower" and "upper" vertices
+        # corresponding to the origin or supremum of every C2 group.
+        # It has the structure of `dim` times embedded lists each containing
+        # these vertices as the entire complex grows. Bounds[0] has to be done
+        # outside the loops before we have symmetric containers.
+        # NOTE: This means that bounds[0][1] must always exist
+
+        a_vl = copy.copy(list(vot))
+        a_vl[0] = vut[0]  # Update aN Origin
+        if tuple(a_vl) not in self.V.cache:
+            vo = self.V[vot]  # initiate if doesn't exist yet
+            vs = self.V[vut]
+            # Start by finding the old centroid of the new space:
+            vco = self.split_edge(vo.x, vs.x)  # Split in case not centroid arg
+
+            # Find set of extreme vertices in current local space
+            sup_set = copy.copy(vco.nn)
+            a_vl = copy.copy(list(vot))
+            a_vl[0] = vut[0]  # Update aN Origin
+            a_vl = self.V[tuple(a_vl)]
+        else:
+            a_vl = self.V[tuple(a_vl)]
+
+        c_v = self.split_edge(vo.x, a_vl.x)
+        c_v.connect(vco)
+        yield c_v.x
+        Cox = [[vo]]
+        Ccx = [[c_v]]
+        Cux = [[a_vl]]
+        ab_C = []  # Container for a + b operations
+        s_ab_C = []  # Container for symmetric a + b operations
+
+        # Loop over remaining bounds
+        for i, x in enumerate(bounds[1:]):
+            # Update lower and upper containers
+            Cox.append([])
+            Ccx.append([])
+            Cux.append([])
+            # try to access a second bound (if not, C1 is symmetric)
+            try:
+                t_a_vl = list(vot)
+                t_a_vl[i + 1] = vut[i + 1]
+
+                # New: lists are used anyway, so copy all
+                # %%
+                # Copy lists for iteration
+                cCox = [x[:] for x in Cox[:i + 1]]
+                cCcx = [x[:] for x in Ccx[:i + 1]]
+                cCux = [x[:] for x in Cux[:i + 1]]
+                # Try to connect aN lower source of previous a + b
+                # operation with a aN vertex
+                ab_Cc = copy.copy(ab_C)  # NOTE: We append ab_C in the
+                # (VL, VC, VU) for-loop, but we use the copy of the list in the
+                # ab_Cc for-loop.
+                s_ab_Cc = copy.copy(s_ab_C)
+
+                # Early try so that we don't have to copy the cache before
+                # moving on to next C1/C2: Try to add the operation of a new
+                # C2 product by accessing the upper bound
+                if tuple(t_a_vl) not in self.V.cache:
+                    # Raise error to continue symmetric refine
+                    raise IndexError
+                t_a_vu = list(vut)
+                t_a_vu[i + 1] = vut[i + 1]
+                if tuple(t_a_vu) not in self.V.cache:
+                    # Raise error to continue symmetric refine:
+                    raise IndexError
+
+                for vectors in s_ab_Cc:
+                    # s_ab_C.append([c_vc, vl, vu, a_vu])
+                    bc_vc = list(vectors[0].x)
+                    b_vl = list(vectors[1].x)
+                    b_vu = list(vectors[2].x)
+                    ba_vu = list(vectors[3].x)
+
+                    bc_vc[i + 1] = vut[i + 1]
+                    b_vl[i + 1] = vut[i + 1]
+                    b_vu[i + 1] = vut[i + 1]
+                    ba_vu[i + 1] = vut[i + 1]
+
+                    bc_vc = self.V[tuple(bc_vc)]
+                    bc_vc.connect(vco)  # NOTE: Unneeded?
+                    yield bc_vc
+
+                    # Split to centre, call this centre group "d = 0.5*a"
+                    d_bc_vc = self.split_edge(vectors[0].x, bc_vc.x)
+                    d_bc_vc.connect(bc_vc)
+                    d_bc_vc.connect(vectors[1])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[2])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[3])  # Connect all to centroid
+                    yield d_bc_vc.x
+                    b_vl = self.V[tuple(b_vl)]
+                    bc_vc.connect(b_vl)  # Connect aN cross pairs
+                    d_bc_vc.connect(b_vl)  # Connect all to centroid
+
+                    yield b_vl
+                    b_vu = self.V[tuple(b_vu)]
+                    bc_vc.connect(b_vu)  # Connect aN cross pairs
+                    d_bc_vc.connect(b_vu)  # Connect all to centroid
+
+                    b_vl_c = self.split_edge(b_vu.x, b_vl.x)
+                    bc_vc.connect(b_vl_c)
+
+                    yield b_vu
+                    ba_vu = self.V[tuple(ba_vu)]
+                    bc_vc.connect(ba_vu)  # Connect aN cross pairs
+                    d_bc_vc.connect(ba_vu)  # Connect all to centroid
+
+                    # Split the a + b edge of the initial triangulation:
+                    os_v = self.split_edge(vectors[1].x, ba_vu.x)  # o-s
+                    ss_v = self.split_edge(b_vl.x, ba_vu.x)  # s-s
+                    b_vu_c = self.split_edge(b_vu.x, ba_vu.x)
+                    bc_vc.connect(b_vu_c)
+                    yield os_v.x  # often equal to vco, but not always
+                    yield ss_v.x  # often equal to bc_vu, but not always
+                    yield ba_vu
+                    # Split remaining to centre, call this centre group
+                    # "d = 0.5*a"
+                    d_bc_vc = self.split_edge(vectors[0].x, bc_vc.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    yield d_bc_vc.x
+                    d_b_vl = self.split_edge(vectors[1].x, b_vl.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_b_vl)  # Connect dN cross pairs
+                    yield d_b_vl.x
+                    d_b_vu = self.split_edge(vectors[2].x, b_vu.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_b_vu)  # Connect dN cross pairs
+                    yield d_b_vu.x
+                    d_ba_vu = self.split_edge(vectors[3].x, ba_vu.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_ba_vu)  # Connect dN cross pairs
+                    yield d_ba_vu
+
+                    # comb = [c_vc, vl, vu, a_vl, a_vu,
+                    #       bc_vc, b_vl, b_vu, ba_vl, ba_vu]
+                    comb = [vl, vu, a_vu,
+                            b_vl, b_vu, ba_vu]
+                    comb_iter = itertools.combinations(comb, 2)
+                    for vecs in comb_iter:
+                        self.split_edge(vecs[0].x, vecs[1].x)
+                    # Add new list of cross pairs
+                    ab_C.append((d_bc_vc, vectors[1], b_vl, a_vu, ba_vu))
+                    ab_C.append((d_bc_vc, vl, b_vl, a_vu, ba_vu))  # = prev
+
+                for vectors in ab_Cc:
+                    bc_vc = list(vectors[0].x)
+                    b_vl = list(vectors[1].x)
+                    b_vu = list(vectors[2].x)
+                    ba_vl = list(vectors[3].x)
+                    ba_vu = list(vectors[4].x)
+                    bc_vc[i + 1] = vut[i + 1]
+                    b_vl[i + 1] = vut[i + 1]
+                    b_vu[i + 1] = vut[i + 1]
+                    ba_vl[i + 1] = vut[i + 1]
+                    ba_vu[i + 1] = vut[i + 1]
+                    bc_vc = self.V[tuple(bc_vc)]
+                    bc_vc.connect(vco)  # NOTE: Unneeded?
+                    yield bc_vc
+
+                    # Split to centre, call this centre group "d = 0.5*a"
+                    d_bc_vc = self.split_edge(vectors[0].x, bc_vc.x)
+                    d_bc_vc.connect(bc_vc)
+                    d_bc_vc.connect(vectors[1])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[2])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[3])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[4])  # Connect all to centroid
+                    yield d_bc_vc.x
+                    b_vl = self.V[tuple(b_vl)]
+                    bc_vc.connect(b_vl)  # Connect aN cross pairs
+                    d_bc_vc.connect(b_vl)  # Connect all to centroid
+                    yield b_vl
+                    b_vu = self.V[tuple(b_vu)]
+                    bc_vc.connect(b_vu)  # Connect aN cross pairs
+                    d_bc_vc.connect(b_vu)  # Connect all to centroid
+                    yield b_vu
+                    ba_vl = self.V[tuple(ba_vl)]
+                    bc_vc.connect(ba_vl)  # Connect aN cross pairs
+                    d_bc_vc.connect(ba_vl)  # Connect all to centroid
+                    self.split_edge(b_vu.x, ba_vl.x)
+                    yield ba_vl
+                    ba_vu = self.V[tuple(ba_vu)]
+                    bc_vc.connect(ba_vu)  # Connect aN cross pairs
+                    d_bc_vc.connect(ba_vu)  # Connect all to centroid
+                    # Split the a + b edge of the initial triangulation:
+                    os_v = self.split_edge(vectors[1].x, ba_vu.x)  # o-s
+                    ss_v = self.split_edge(b_vl.x, ba_vu.x)  # s-s
+                    yield os_v.x  # often equal to vco, but not always
+                    yield ss_v.x  # often equal to bc_vu, but not always
+                    yield ba_vu
+                    # Split remaining to centre, call this centre group
+                    # "d = 0.5*a"
+                    d_bc_vc = self.split_edge(vectors[0].x, bc_vc.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    yield d_bc_vc.x
+                    d_b_vl = self.split_edge(vectors[1].x, b_vl.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_b_vl)  # Connect dN cross pairs
+                    yield d_b_vl.x
+                    d_b_vu = self.split_edge(vectors[2].x, b_vu.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_b_vu)  # Connect dN cross pairs
+                    yield d_b_vu.x
+                    d_ba_vl = self.split_edge(vectors[3].x, ba_vl.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_ba_vl)  # Connect dN cross pairs
+                    yield d_ba_vl
+                    d_ba_vu = self.split_edge(vectors[4].x, ba_vu.x)
+                    d_bc_vc.connect(vco)  # NOTE: Unneeded?
+                    d_bc_vc.connect(d_ba_vu)  # Connect dN cross pairs
+                    yield d_ba_vu
+                    c_vc, vl, vu, a_vl, a_vu = vectors
+
+                    comb = [vl, vu, a_vl, a_vu,
+                            b_vl, b_vu, ba_vl, ba_vu]
+                    comb_iter = itertools.combinations(comb, 2)
+                    for vecs in comb_iter:
+                        self.split_edge(vecs[0].x, vecs[1].x)
+
+                    # Add new list of cross pairs
+                    ab_C.append((bc_vc, b_vl, b_vu, ba_vl, ba_vu))
+                    ab_C.append((d_bc_vc, d_b_vl, d_b_vu, d_ba_vl, d_ba_vu))
+                    ab_C.append((d_bc_vc, vectors[1], b_vl, a_vu, ba_vu))
+                    ab_C.append((d_bc_vc, vu, b_vu, a_vl, ba_vl))
+
+                for j, (VL, VC, VU) in enumerate(zip(cCox, cCcx, cCux)):
+                    for k, (vl, vc, vu) in enumerate(zip(VL, VC, VU)):
+                        # Build aN vertices for each lower-upper C3 group in N:
+                        a_vl = list(vl.x)
+                        a_vu = list(vu.x)
+                        a_vl[i + 1] = vut[i + 1]
+                        a_vu[i + 1] = vut[i + 1]
+                        a_vl = self.V[tuple(a_vl)]
+                        a_vu = self.V[tuple(a_vu)]
+                        # Note, build (a + vc) later for consistent yields
+                        # Split the a + b edge of the initial triangulation:
+                        c_vc = self.split_edge(vl.x, a_vu.x)
+                        self.split_edge(vl.x, vu.x)  # Equal to vc
+                        # Build cN vertices for each lower-upper C3 group in N:
+                        c_vc.connect(vco)
+                        c_vc.connect(vc)
+                        c_vc.connect(vl)  # Connect c + ac operations
+                        c_vc.connect(vu)  # Connect c + ac operations
+                        c_vc.connect(a_vl)  # Connect c + ac operations
+                        c_vc.connect(a_vu)  # Connect c + ac operations
+                        yield c_vc.x
+                        c_vl = self.split_edge(vl.x, a_vl.x)
+                        c_vl.connect(vco)
+                        c_vc.connect(c_vl)  # Connect cN group vertices
+                        yield c_vl.x
+                        # yield at end of loop:
+                        c_vu = self.split_edge(vu.x, a_vu.x)
+                        c_vu.connect(vco)
+                        # Connect remaining cN group vertices
+                        c_vc.connect(c_vu)  # Connect cN group vertices
+                        yield c_vu.x
+
+                        a_vc = self.split_edge(a_vl.x, a_vu.x)  # is (a + vc) ?
+                        a_vc.connect(vco)
+                        a_vc.connect(c_vc)
+
+                        # Storage for connecting c + ac operations:
+                        ab_C.append((c_vc, vl, vu, a_vl, a_vu))
+
+                        # Update the containers
+                        Cox[i + 1].append(vl)
+                        Cox[i + 1].append(vc)
+                        Cox[i + 1].append(vu)
+                        Ccx[i + 1].append(c_vl)
+                        Ccx[i + 1].append(c_vc)
+                        Ccx[i + 1].append(c_vu)
+                        Cux[i + 1].append(a_vl)
+                        Cux[i + 1].append(a_vc)
+                        Cux[i + 1].append(a_vu)
+
+                        # Update old containers
+                        Cox[j].append(c_vl)  # !
+                        Cox[j].append(a_vl)
+                        Ccx[j].append(c_vc)  # !
+                        Ccx[j].append(a_vc)  # !
+                        Cux[j].append(c_vu)  # !
+                        Cux[j].append(a_vu)
+
+                        # Yield new points
+                        yield a_vc.x
+
+            except IndexError:
+                for vectors in ab_Cc:
+                    ba_vl = list(vectors[3].x)
+                    ba_vu = list(vectors[4].x)
+                    ba_vl[i + 1] = vut[i + 1]
+                    ba_vu[i + 1] = vut[i + 1]
+                    ba_vu = self.V[tuple(ba_vu)]
+                    yield ba_vu
+                    d_bc_vc = self.split_edge(vectors[1].x, ba_vu.x)  # o-s
+                    yield ba_vu
+                    d_bc_vc.connect(vectors[1])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[2])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[3])  # Connect all to centroid
+                    d_bc_vc.connect(vectors[4])  # Connect all to centroid
+                    yield d_bc_vc.x
+                    ba_vl = self.V[tuple(ba_vl)]
+                    yield ba_vl
+                    d_ba_vl = self.split_edge(vectors[3].x, ba_vl.x)
+                    d_ba_vu = self.split_edge(vectors[4].x, ba_vu.x)
+                    d_ba_vc = self.split_edge(d_ba_vl.x, d_ba_vu.x)
+                    yield d_ba_vl
+                    yield d_ba_vu
+                    yield d_ba_vc
+                    c_vc, vl, vu, a_vl, a_vu = vectors
+                    comb = [vl, vu, a_vl, a_vu,
+                            ba_vl,
+                            ba_vu]
+                    comb_iter = itertools.combinations(comb, 2)
+                    for vecs in comb_iter:
+                        self.split_edge(vecs[0].x, vecs[1].x)
+
+                # Copy lists for iteration
+                cCox = Cox[i]
+                cCcx = Ccx[i]
+                cCux = Cux[i]
+                VL, VC, VU = cCox, cCcx, cCux
+                for k, (vl, vc, vu) in enumerate(zip(VL, VC, VU)):
+                    # Build aN vertices for each lower-upper pair in N:
+                    a_vu = list(vu.x)
+                    a_vu[i + 1] = vut[i + 1]
+
+                    # Connect vertices in N to corresponding vertices
+                    # in aN:
+                    a_vu = self.V[tuple(a_vu)]
+                    yield a_vl.x
+                    # Split the a + b edge of the initial triangulation:
+                    c_vc = self.split_edge(vl.x, a_vu.x)
+                    self.split_edge(vl.x, vu.x)  # Equal to vc
+                    c_vc.connect(vco)
+                    c_vc.connect(vc)
+                    c_vc.connect(vl)  # Connect c + ac operations
+                    c_vc.connect(vu)  # Connect c + ac operations
+                    c_vc.connect(a_vu)  # Connect c + ac operations
+                    yield (c_vc.x)
+                    c_vu = self.split_edge(vu.x,
+                                           a_vu.x)  # yield at end of loop
+                    c_vu.connect(vco)
+                    # Connect remaining cN group vertices
+                    c_vc.connect(c_vu)  # Connect cN group vertices
+                    yield (c_vu.x)
+
+                    # Update the containers
+                    Cox[i + 1].append(vu)
+                    Ccx[i + 1].append(c_vu)
+                    Cux[i + 1].append(a_vu)
+
+                    # Update old containers
+                    s_ab_C.append([c_vc, vl, vu, a_vu])
+
+                    yield a_vu.x
+
+        # Clean class trash
+        try:
+            del Cox
+            del Ccx
+            del Cux
+            del ab_C
+            del ab_Cc
+        except UnboundLocalError:
+            pass
+
+        try:
+            self.triangulated_vectors.remove((tuple(origin_c),
+                                              tuple(supremum_c)))
+        except ValueError:
+            # Turn this into a logging warning?
+            pass
+        # Add newly triangulated vectors:
+        for vs in sup_set:
+            self.triangulated_vectors.append((tuple(vco.x), tuple(vs.x)))
+
+        # Extra yield to ensure that the triangulation is completed
+        if centroid:
+            vcn_set = set()
+            c_nn_lists = []
+            for vs in sup_set:
+                # Build centroid
+                c_nn = self.vpool(vco.x, vs.x)
+                try:
+                    c_nn.remove(vcn_set)
+                except KeyError:
+                    pass
+                c_nn_lists.append(c_nn)
+
+            for c_nn in c_nn_lists:
+                try:
+                    c_nn.remove(vcn_set)
+                except KeyError:
+                    pass
+
+            for vs, c_nn in zip(sup_set, c_nn_lists):
+                # Build centroid
+                vcn = self.split_edge(vco.x, vs.x)
+                vcn_set.add(vcn)
+                try:  # Shouldn't be needed?
+                    c_nn.remove(vcn_set)
+                except KeyError:
+                    pass
+                for vnn in c_nn:
+                    vcn.connect(vnn)
+                yield vcn.x
+        else:
+            pass
+
+        yield vut
+        return
+
+    def refine_star(self, v):
+        """Refine the star domain of a vertex `v`."""
+        # Copy lists before iteration
+        vnn = copy.copy(v.nn)
+        v1nn = []
+        d_v0v1_set = set()
+        for v1 in vnn:
+            v1nn.append(copy.copy(v1.nn))
+
+        for v1, v1nn in zip(vnn, v1nn):
+            vnnu = v1nn.intersection(vnn)
+
+            d_v0v1 = self.split_edge(v.x, v1.x)
+            for o_d_v0v1 in d_v0v1_set:
+                d_v0v1.connect(o_d_v0v1)
+            d_v0v1_set.add(d_v0v1)
+            for v2 in vnnu:
+                d_v1v2 = self.split_edge(v1.x, v2.x)
+                d_v0v1.connect(d_v1v2)
+        return
+
+    @cache
+    def split_edge(self, v1, v2):
+        v1 = self.V[v1]
+        v2 = self.V[v2]
+        # Destroy original edge, if it exists:
+        v1.disconnect(v2)
+        # Compute vertex on centre of edge:
+        try:
+            vct = (v2.x_a - v1.x_a) / 2.0 + v1.x_a
+        except TypeError:  # Allow for decimal operations
+            vct = (v2.x_a - v1.x_a) / decimal.Decimal(2.0) + v1.x_a
+
+        vc = self.V[tuple(vct)]
+        # Connect to original 2 vertices to the new centre vertex
+        vc.connect(v1)
+        vc.connect(v2)
+        return vc
+
+    def vpool(self, origin, supremum):
+        vot = tuple(origin)
+        vst = tuple(supremum)
+        # Initiate vertices in case they don't exist
+        vo = self.V[vot]
+        vs = self.V[vst]
+
+        # Remove origin - supremum disconnect
+
+        # Find the lower/upper bounds of the refinement hyperrectangle
+        bl = list(vot)
+        bu = list(vst)
+        for i, (voi, vsi) in enumerate(zip(vot, vst)):
+            if bl[i] > vsi:
+                bl[i] = vsi
+            if bu[i] < voi:
+                bu[i] = voi
+
+        #      NOTE: This is mostly done with sets/lists because we aren't sure
+        #            how well the numpy arrays will scale to thousands of
+        #             dimensions.
+        vn_pool = set()
+        vn_pool.update(vo.nn)
+        vn_pool.update(vs.nn)
+        cvn_pool = copy.copy(vn_pool)
+        for vn in cvn_pool:
+            for i, xi in enumerate(vn.x):
+                if bl[i] <= xi <= bu[i]:
+                    pass
+                else:
+                    try:
+                        vn_pool.remove(vn)
+                    except KeyError:
+                        pass  # NOTE: Not all neighbours are in initial pool
+        return vn_pool
+
+    def vf_to_vv(self, vertices, simplices):
+        """
+        Convert a vertex-face mesh to a vertex-vertex mesh used by this class
+
+        Parameters
+        ----------
+        vertices : list
+            Vertices
+        simplices : list
+            Simplices
+        """
+        if self.dim > 1:
+            for s in simplices:
+                edges = itertools.combinations(s, self.dim)
+                for e in edges:
+                    self.V[tuple(vertices[e[0]])].connect(
+                        self.V[tuple(vertices[e[1]])])
+        else:
+            for e in simplices:
+                self.V[tuple(vertices[e[0]])].connect(
+                    self.V[tuple(vertices[e[1]])])
+        return
+
+    def connect_vertex_non_symm(self, v_x, near=None):
+        """
+        Adds a vertex at coords v_x to the complex that is not symmetric to the
+        initial triangulation and sub-triangulation.
+
+        If near is specified (for example; a star domain or collections of
+        cells known to contain v) then only those simplices containd in near
+        will be searched, this greatly speeds up the process.
+
+        If near is not specified this method will search the entire simplicial
+        complex structure.
+
+        Parameters
+        ----------
+        v_x : tuple
+            Coordinates of non-symmetric vertex
+        near : set or list
+            List of vertices, these are points near v to check for
+        """
+        if near is None:
+            star = self.V
+        else:
+            star = near
+        # Create the vertex origin
+        if tuple(v_x) in self.V.cache:
+            if self.V[v_x] in self.V_non_symm:
+                pass
+            else:
+                return
+
+        self.V[v_x]
+        found_nn = False
+        S_rows = []
+        for v in star:
+            S_rows.append(v.x)
+
+        S_rows = np.array(S_rows)
+        A = np.array(S_rows) - np.array(v_x)
+        # Iterate through all the possible simplices of S_rows
+        for s_i in itertools.combinations(range(S_rows.shape[0]),
+                                          r=self.dim + 1):
+            # Check if connected, else s_i is not a simplex
+            valid_simplex = True
+            for i in itertools.combinations(s_i, r=2):
+                # Every combination of vertices must be connected, we check of
+                # the current iteration of all combinations of s_i are
+                # connected we break the loop if it is not.
+                if ((self.V[tuple(S_rows[i[1]])] not in
+                        self.V[tuple(S_rows[i[0]])].nn)
+                    and (self.V[tuple(S_rows[i[0]])] not in
+                         self.V[tuple(S_rows[i[1]])].nn)):
+                    valid_simplex = False
+                    break
+
+            S = S_rows[tuple([s_i])]
+            if valid_simplex:
+                if self.deg_simplex(S, proj=None):
+                    valid_simplex = False
+
+            # If s_i is a valid simplex we can test if v_x is inside si
+            if valid_simplex:
+                # Find the A_j0 value from the precalculated values
+                A_j0 = A[tuple([s_i])]
+                if self.in_simplex(S, v_x, A_j0):
+                    found_nn = True
+                    # breaks the main for loop, s_i is the target simplex:
+                    break
+
+        # Connect the simplex to point
+        if found_nn:
+            for i in s_i:
+                self.V[v_x].connect(self.V[tuple(S_rows[i])])
+        # Attached the simplex to storage for all non-symmetric vertices
+        self.V_non_symm.append(self.V[v_x])
+        # this bool value indicates a successful connection if True:
+        return found_nn
+
+    def in_simplex(self, S, v_x, A_j0=None):
+        """Check if a vector v_x is in simplex `S`.
+
+        Parameters
+        ----------
+        S : array_like
+            Array containing simplex entries of vertices as rows
+        v_x :
+            A candidate vertex
+        A_j0 : array, optional,
+            Allows for A_j0 to be pre-calculated
+
+        Returns
+        -------
+        res : boolean
+            True if `v_x` is in `S`
+        """
+        A_11 = np.delete(S, 0, 0) - S[0]
+
+        sign_det_A_11 = np.sign(np.linalg.det(A_11))
+        if sign_det_A_11 == 0:
+            # NOTE: We keep the variable A_11, but we loop through A_jj
+            # ind=
+            # while sign_det_A_11 == 0:
+            #    A_11 = np.delete(S, ind, 0) - S[ind]
+            #    sign_det_A_11 = np.sign(np.linalg.det(A_11))
+
+            sign_det_A_11 = -1  # TODO: Choose another det of j instead?
+            # TODO: Unlikely to work in many cases
+
+        if A_j0 is None:
+            A_j0 = S - v_x
+
+        for d in range(self.dim + 1):
+            det_A_jj = (-1)**d * sign_det_A_11
+            # TODO: Note that scipy might be faster to add as an optional
+            #       dependency
+            sign_det_A_j0 = np.sign(np.linalg.det(np.delete(A_j0, d,
+                                                                     0)))
+            # TODO: Note if sign_det_A_j0 == then the point is coplanar to the
+            #       current simplex facet, so perhaps return True and attach?
+            if det_A_jj == sign_det_A_j0:
+                continue
+            else:
+                return False
+
+        return True
+
+    def deg_simplex(self, S, proj=None):
+        """Test a simplex S for degeneracy (linear dependence in R^dim).
+
+        Parameters
+        ----------
+        S : np.array
+            Simplex with rows as vertex vectors
+        proj : array, optional,
+            If the projection S[1:] - S[0] is already
+            computed it can be added as an optional argument.
+        """
+        # Strategy: we test all combination of faces, if any of the
+        # determinants are zero then the vectors lie on the same face and is
+        # therefore linearly dependent in the space of R^dim
+        if proj is None:
+            proj = S[1:] - S[0]
+
+        # TODO: Is checking the projection of one vertex against faces of other
+        #       vertices sufficient? Or do we need to check more vertices in
+        #       dimensions higher than 2?
+        # TODO: Literature seems to suggest using proj.T, but why is this
+        #       needed?
+        if np.linalg.det(proj) == 0.0:  # TODO: Replace with tolerance?
+            return True  # Simplex is degenerate
+        else:
+            return False  # Simplex is not degenerate
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_vertex.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_vertex.py
new file mode 100644
index 0000000000000000000000000000000000000000..e47558ee7b9a181638841c34bb63603b5d37e221
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_shgo_lib/_vertex.py
@@ -0,0 +1,460 @@
+import collections
+from abc import ABC, abstractmethod
+
+import numpy as np
+
+from scipy._lib._util import MapWrapper
+
+
+class VertexBase(ABC):
+    """
+    Base class for a vertex.
+    """
+    def __init__(self, x, nn=None, index=None):
+        """
+        Initiation of a vertex object.
+
+        Parameters
+        ----------
+        x : tuple or vector
+            The geometric location (domain).
+        nn : list, optional
+            Nearest neighbour list.
+        index : int, optional
+            Index of vertex.
+        """
+        self.x = x
+        self.hash = hash(self.x)  # Save precomputed hash
+
+        if nn is not None:
+            self.nn = set(nn)  # can use .indexupdate to add a new list
+        else:
+            self.nn = set()
+
+        self.index = index
+
+    def __hash__(self):
+        return self.hash
+
+    def __getattr__(self, item):
+        if item not in ['x_a']:
+            raise AttributeError(f"{type(self)} object has no attribute "
+                                 f"'{item}'")
+        if item == 'x_a':
+            self.x_a = np.array(self.x)
+            return self.x_a
+
+    @abstractmethod
+    def connect(self, v):
+        raise NotImplementedError("This method is only implemented with an "
+                                  "associated child of the base class.")
+
+    @abstractmethod
+    def disconnect(self, v):
+        raise NotImplementedError("This method is only implemented with an "
+                                  "associated child of the base class.")
+
+    def star(self):
+        """Returns the star domain ``st(v)`` of the vertex.
+
+        Parameters
+        ----------
+        v :
+            The vertex ``v`` in ``st(v)``
+
+        Returns
+        -------
+        st : set
+            A set containing all the vertices in ``st(v)``
+        """
+        self.st = self.nn
+        self.st.add(self)
+        return self.st
+
+
+class VertexScalarField(VertexBase):
+    """
+    Add homology properties of a scalar field f: R^n --> R associated with
+    the geometry built from the VertexBase class
+    """
+
+    def __init__(self, x, field=None, nn=None, index=None, field_args=(),
+                 g_cons=None, g_cons_args=()):
+        """
+        Parameters
+        ----------
+        x : tuple,
+            vector of vertex coordinates
+        field : callable, optional
+            a scalar field f: R^n --> R associated with the geometry
+        nn : list, optional
+            list of nearest neighbours
+        index : int, optional
+            index of the vertex
+        field_args : tuple, optional
+            additional arguments to be passed to field
+        g_cons : callable, optional
+            constraints on the vertex
+        g_cons_args : tuple, optional
+            additional arguments to be passed to g_cons
+
+        """
+        super().__init__(x, nn=nn, index=index)
+
+        # Note Vertex is only initiated once for all x so only
+        # evaluated once
+        # self.feasible = None
+
+        # self.f is externally defined by the cache to allow parallel
+        # processing
+        # None type that will break arithmetic operations unless defined
+        # self.f = None
+
+        self.check_min = True
+        self.check_max = True
+
+    def connect(self, v):
+        """Connects self to another vertex object v.
+
+        Parameters
+        ----------
+        v : VertexBase or VertexScalarField object
+        """
+        if v is not self and v not in self.nn:
+            self.nn.add(v)
+            v.nn.add(self)
+
+            # Flags for checking homology properties:
+            self.check_min = True
+            self.check_max = True
+            v.check_min = True
+            v.check_max = True
+
+    def disconnect(self, v):
+        if v in self.nn:
+            self.nn.remove(v)
+            v.nn.remove(self)
+
+            # Flags for checking homology properties:
+            self.check_min = True
+            self.check_max = True
+            v.check_min = True
+            v.check_max = True
+
+    def minimiser(self):
+        """Check whether this vertex is strictly less than all its
+           neighbours"""
+        if self.check_min:
+            self._min = all(self.f < v.f for v in self.nn)
+            self.check_min = False
+
+        return self._min
+
+    def maximiser(self):
+        """
+        Check whether this vertex is strictly greater than all its
+        neighbours.
+        """
+        if self.check_max:
+            self._max = all(self.f > v.f for v in self.nn)
+            self.check_max = False
+
+        return self._max
+
+
+class VertexVectorField(VertexBase):
+    """
+    Add homology properties of a scalar field f: R^n --> R^m associated with
+    the geometry built from the VertexBase class.
+    """
+
+    def __init__(self, x, sfield=None, vfield=None, field_args=(),
+                 vfield_args=(), g_cons=None,
+                 g_cons_args=(), nn=None, index=None):
+        super().__init__(x, nn=nn, index=index)
+
+        raise NotImplementedError("This class is still a work in progress")
+
+
+class VertexCacheBase:
+    """Base class for a vertex cache for a simplicial complex."""
+    def __init__(self):
+
+        self.cache = collections.OrderedDict()
+        self.nfev = 0  # Feasible points
+        self.index = -1
+
+    def __iter__(self):
+        for v in self.cache:
+            yield self.cache[v]
+        return
+
+    def size(self):
+        """Returns the size of the vertex cache."""
+        return self.index + 1
+
+    def print_out(self):
+        headlen = len(f"Vertex cache of size: {len(self.cache)}:")
+        print('=' * headlen)
+        print(f"Vertex cache of size: {len(self.cache)}:")
+        print('=' * headlen)
+        for v in self.cache:
+            self.cache[v].print_out()
+
+
+class VertexCube(VertexBase):
+    """Vertex class to be used for a pure simplicial complex with no associated
+    differential geometry (single level domain that exists in R^n)"""
+    def __init__(self, x, nn=None, index=None):
+        super().__init__(x, nn=nn, index=index)
+
+    def connect(self, v):
+        if v is not self and v not in self.nn:
+            self.nn.add(v)
+            v.nn.add(self)
+
+    def disconnect(self, v):
+        if v in self.nn:
+            self.nn.remove(v)
+            v.nn.remove(self)
+
+
+class VertexCacheIndex(VertexCacheBase):
+    def __init__(self):
+        """
+        Class for a vertex cache for a simplicial complex without an associated
+        field. Useful only for building and visualising a domain complex.
+
+        Parameters
+        ----------
+        """
+        super().__init__()
+        self.Vertex = VertexCube
+
+    def __getitem__(self, x, nn=None):
+        try:
+            return self.cache[x]
+        except KeyError:
+            self.index += 1
+            xval = self.Vertex(x, index=self.index)
+            # logging.info("New generated vertex at x = {}".format(x))
+            # NOTE: Surprisingly high performance increase if logging
+            # is commented out
+            self.cache[x] = xval
+            return self.cache[x]
+
+
+class VertexCacheField(VertexCacheBase):
+    def __init__(self, field=None, field_args=(), g_cons=None, g_cons_args=(),
+                 workers=1):
+        """
+        Class for a vertex cache for a simplicial complex with an associated
+        field.
+
+        Parameters
+        ----------
+        field : callable
+            Scalar or vector field callable.
+        field_args : tuple, optional
+            Any additional fixed parameters needed to completely specify the
+            field function
+        g_cons : dict or sequence of dict, optional
+            Constraints definition.
+            Function(s) ``R**n`` in the form::
+        g_cons_args : tuple, optional
+            Any additional fixed parameters needed to completely specify the
+            constraint functions
+        workers : int  optional
+            Uses `multiprocessing.Pool `) to compute the field
+             functions in parallel.
+
+        """
+        super().__init__()
+        self.index = -1
+        self.Vertex = VertexScalarField
+        self.field = field
+        self.field_args = field_args
+        self.wfield = FieldWrapper(field, field_args)  # if workers is not 1
+
+        self.g_cons = g_cons
+        self.g_cons_args = g_cons_args
+        self.wgcons = ConstraintWrapper(g_cons, g_cons_args)
+        self.gpool = set()  # A set of tuples to process for feasibility
+
+        # Field processing objects
+        self.fpool = set()  # A set of tuples to process for scalar function
+        self.sfc_lock = False  # True if self.fpool is non-Empty
+
+        self.workers = workers
+        self._mapwrapper = MapWrapper(workers)
+
+        if workers == 1:
+            self.process_gpool = self.proc_gpool
+            if g_cons is None:
+                self.process_fpool = self.proc_fpool_nog
+            else:
+                self.process_fpool = self.proc_fpool_g
+        else:
+            self.process_gpool = self.pproc_gpool
+            if g_cons is None:
+                self.process_fpool = self.pproc_fpool_nog
+            else:
+                self.process_fpool = self.pproc_fpool_g
+
+    def __getitem__(self, x, nn=None):
+        try:
+            return self.cache[x]
+        except KeyError:
+            self.index += 1
+            xval = self.Vertex(x, field=self.field, nn=nn, index=self.index,
+                               field_args=self.field_args,
+                               g_cons=self.g_cons,
+                               g_cons_args=self.g_cons_args)
+
+            self.cache[x] = xval  # Define in cache
+            self.gpool.add(xval)  # Add to pool for processing feasibility
+            self.fpool.add(xval)  # Add to pool for processing field values
+            return self.cache[x]
+
+    def __getstate__(self):
+        self_dict = self.__dict__.copy()
+        del self_dict['pool']
+        return self_dict
+
+    def process_pools(self):
+        if self.g_cons is not None:
+            self.process_gpool()
+        self.process_fpool()
+        self.proc_minimisers()
+
+    def feasibility_check(self, v):
+        v.feasible = True
+        for g, args in zip(self.g_cons, self.g_cons_args):
+            # constraint may return more than 1 value.
+            if np.any(g(v.x_a, *args) < 0.0):
+                v.f = np.inf
+                v.feasible = False
+                break
+
+    def compute_sfield(self, v):
+        """Compute the scalar field values of a vertex object `v`.
+
+        Parameters
+        ----------
+        v : VertexBase or VertexScalarField object
+        """
+        try:
+            v.f = self.field(v.x_a, *self.field_args)
+            self.nfev += 1
+        except AttributeError:
+            v.f = np.inf
+            # logging.warning(f"Field function not found at x = {self.x_a}")
+        if np.isnan(v.f):
+            v.f = np.inf
+
+    def proc_gpool(self):
+        """Process all constraints."""
+        if self.g_cons is not None:
+            for v in self.gpool:
+                self.feasibility_check(v)
+        # Clean the pool
+        self.gpool = set()
+
+    def pproc_gpool(self):
+        """Process all constraints in parallel."""
+        gpool_l = []
+        for v in self.gpool:
+            gpool_l.append(v.x_a)
+
+        G = self._mapwrapper(self.wgcons.gcons, gpool_l)
+        for v, g in zip(self.gpool, G):
+            v.feasible = g  # set vertex object attribute v.feasible = g (bool)
+
+    def proc_fpool_g(self):
+        """Process all field functions with constraints supplied."""
+        for v in self.fpool:
+            if v.feasible:
+                self.compute_sfield(v)
+        # Clean the pool
+        self.fpool = set()
+
+    def proc_fpool_nog(self):
+        """Process all field functions with no constraints supplied."""
+        for v in self.fpool:
+            self.compute_sfield(v)
+        # Clean the pool
+        self.fpool = set()
+
+    def pproc_fpool_g(self):
+        """
+        Process all field functions with constraints supplied in parallel.
+        """
+        self.wfield.func
+        fpool_l = []
+        for v in self.fpool:
+            if v.feasible:
+                fpool_l.append(v.x_a)
+            else:
+                v.f = np.inf
+        F = self._mapwrapper(self.wfield.func, fpool_l)
+        for va, f in zip(fpool_l, F):
+            vt = tuple(va)
+            self[vt].f = f  # set vertex object attribute v.f = f
+            self.nfev += 1
+        # Clean the pool
+        self.fpool = set()
+
+    def pproc_fpool_nog(self):
+        """
+        Process all field functions with no constraints supplied in parallel.
+        """
+        self.wfield.func
+        fpool_l = []
+        for v in self.fpool:
+            fpool_l.append(v.x_a)
+        F = self._mapwrapper(self.wfield.func, fpool_l)
+        for va, f in zip(fpool_l, F):
+            vt = tuple(va)
+            self[vt].f = f  # set vertex object attribute v.f = f
+            self.nfev += 1
+        # Clean the pool
+        self.fpool = set()
+
+    def proc_minimisers(self):
+        """Check for minimisers."""
+        for v in self:
+            v.minimiser()
+            v.maximiser()
+
+
+class ConstraintWrapper:
+    """Object to wrap constraints to pass to `multiprocessing.Pool`."""
+    def __init__(self, g_cons, g_cons_args):
+        self.g_cons = g_cons
+        self.g_cons_args = g_cons_args
+
+    def gcons(self, v_x_a):
+        vfeasible = True
+        for g, args in zip(self.g_cons, self.g_cons_args):
+            # constraint may return more than 1 value.
+            if np.any(g(v_x_a, *args) < 0.0):
+                vfeasible = False
+                break
+        return vfeasible
+
+
+class FieldWrapper:
+    """Object to wrap field to pass to `multiprocessing.Pool`."""
+    def __init__(self, field, field_args):
+        self.field = field
+        self.field_args = field_args
+
+    def func(self, v_x_a):
+        try:
+            v_f = self.field(v_x_a, *self.field_args)
+        except Exception:
+            v_f = np.inf
+        if np.isnan(v_f):
+            v_f = np.inf
+
+        return v_f
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..1f64a0469d430cfacd71e0d9a2e72eb73fb28c66
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..0ab66837497a6626d042d56530ead46ea134ad9c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_slsqp_py.py
@@ -0,0 +1,511 @@
+"""
+This module implements the Sequential Least Squares Programming optimization
+algorithm (SLSQP), originally developed by Dieter Kraft.
+See http://www.netlib.org/toms/733
+
+Functions
+---------
+.. autosummary::
+   :toctree: generated/
+
+    approx_jacobian
+    fmin_slsqp
+
+"""
+
+__all__ = ['approx_jacobian', 'fmin_slsqp']
+
+import numpy as np
+from scipy.optimize._slsqp import slsqp
+from numpy import (zeros, array, linalg, append, concatenate, finfo,
+                   sqrt, vstack, isfinite, atleast_1d)
+from ._optimize import (OptimizeResult, _check_unknown_options,
+                        _prepare_scalar_function, _clip_x_for_func,
+                        _check_clip_x)
+from ._numdiff import approx_derivative
+from ._constraints import old_bound_to_new, _arr_to_scalar
+from scipy._lib._array_api import array_namespace
+from scipy._lib import array_api_extra as xpx
+
+
+__docformat__ = "restructuredtext en"
+
+_epsilon = sqrt(finfo(float).eps)
+
+
+def approx_jacobian(x, func, epsilon, *args):
+    """
+    Approximate the Jacobian matrix of a callable function.
+
+    Parameters
+    ----------
+    x : array_like
+        The state vector at which to compute the Jacobian matrix.
+    func : callable f(x,*args)
+        The vector-valued function.
+    epsilon : float
+        The perturbation used to determine the partial derivatives.
+    args : sequence
+        Additional arguments passed to func.
+
+    Returns
+    -------
+    An array of dimensions ``(lenf, lenx)`` where ``lenf`` is the length
+    of the outputs of `func`, and ``lenx`` is the number of elements in
+    `x`.
+
+    Notes
+    -----
+    The approximation is done using forward differences.
+
+    """
+    # approx_derivative returns (m, n) == (lenf, lenx)
+    jac = approx_derivative(func, x, method='2-point', abs_step=epsilon,
+                            args=args)
+    # if func returns a scalar jac.shape will be (lenx,). Make sure
+    # it's at least a 2D array.
+    return np.atleast_2d(jac)
+
+
+def fmin_slsqp(func, x0, eqcons=(), f_eqcons=None, ieqcons=(), f_ieqcons=None,
+               bounds=(), fprime=None, fprime_eqcons=None,
+               fprime_ieqcons=None, args=(), iter=100, acc=1.0E-6,
+               iprint=1, disp=None, full_output=0, epsilon=_epsilon,
+               callback=None):
+    """
+    Minimize a function using Sequential Least Squares Programming
+
+    Python interface function for the SLSQP Optimization subroutine
+    originally implemented by Dieter Kraft.
+
+    Parameters
+    ----------
+    func : callable f(x,*args)
+        Objective function.  Must return a scalar.
+    x0 : 1-D ndarray of float
+        Initial guess for the independent variable(s).
+    eqcons : list, optional
+        A list of functions of length n such that
+        eqcons[j](x,*args) == 0.0 in a successfully optimized
+        problem.
+    f_eqcons : callable f(x,*args), optional
+        Returns a 1-D array in which each element must equal 0.0 in a
+        successfully optimized problem. If f_eqcons is specified,
+        eqcons is ignored.
+    ieqcons : list, optional
+        A list of functions of length n such that
+        ieqcons[j](x,*args) >= 0.0 in a successfully optimized
+        problem.
+    f_ieqcons : callable f(x,*args), optional
+        Returns a 1-D ndarray in which each element must be greater or
+        equal to 0.0 in a successfully optimized problem. If
+        f_ieqcons is specified, ieqcons is ignored.
+    bounds : list, optional
+        A list of tuples specifying the lower and upper bound
+        for each independent variable [(xl0, xu0),(xl1, xu1),...]
+        Infinite values will be interpreted as large floating values.
+    fprime : callable ``f(x,*args)``, optional
+        A function that evaluates the partial derivatives of func.
+    fprime_eqcons : callable ``f(x,*args)``, optional
+        A function of the form ``f(x, *args)`` that returns the m by n
+        array of equality constraint normals. If not provided,
+        the normals will be approximated. The array returned by
+        fprime_eqcons should be sized as ( len(eqcons), len(x0) ).
+    fprime_ieqcons : callable ``f(x,*args)``, optional
+        A function of the form ``f(x, *args)`` that returns the m by n
+        array of inequality constraint normals. If not provided,
+        the normals will be approximated. The array returned by
+        fprime_ieqcons should be sized as ( len(ieqcons), len(x0) ).
+    args : sequence, optional
+        Additional arguments passed to func and fprime.
+    iter : int, optional
+        The maximum number of iterations.
+    acc : float, optional
+        Requested accuracy.
+    iprint : int, optional
+        The verbosity of fmin_slsqp :
+
+        * iprint <= 0 : Silent operation
+        * iprint == 1 : Print summary upon completion (default)
+        * iprint >= 2 : Print status of each iterate and summary
+    disp : int, optional
+        Overrides the iprint interface (preferred).
+    full_output : bool, optional
+        If False, return only the minimizer of func (default).
+        Otherwise, output final objective function and summary
+        information.
+    epsilon : float, optional
+        The step size for finite-difference derivative estimates.
+    callback : callable, optional
+        Called after each iteration, as ``callback(x)``, where ``x`` is the
+        current parameter vector.
+
+    Returns
+    -------
+    out : ndarray of float
+        The final minimizer of func.
+    fx : ndarray of float, if full_output is true
+        The final value of the objective function.
+    its : int, if full_output is true
+        The number of iterations.
+    imode : int, if full_output is true
+        The exit mode from the optimizer (see below).
+    smode : string, if full_output is true
+        Message describing the exit mode from the optimizer.
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'SLSQP' `method` in particular.
+
+    Notes
+    -----
+    Exit modes are defined as follows:
+
+    - ``-1`` : Gradient evaluation required (g & a)
+    - ``0`` : Optimization terminated successfully
+    - ``1`` : Function evaluation required (f & c)
+    - ``2`` : More equality constraints than independent variables
+    - ``3`` : More than 3*n iterations in LSQ subproblem
+    - ``4`` : Inequality constraints incompatible
+    - ``5`` : Singular matrix E in LSQ subproblem
+    - ``6`` : Singular matrix C in LSQ subproblem
+    - ``7`` : Rank-deficient equality constraint subproblem HFTI
+    - ``8`` : Positive directional derivative for linesearch
+    - ``9`` : Iteration limit reached
+
+    Examples
+    --------
+    Examples are given :ref:`in the tutorial `.
+
+    """
+    if disp is not None:
+        iprint = disp
+
+    opts = {'maxiter': iter,
+            'ftol': acc,
+            'iprint': iprint,
+            'disp': iprint != 0,
+            'eps': epsilon,
+            'callback': callback}
+
+    # Build the constraints as a tuple of dictionaries
+    cons = ()
+    # 1. constraints of the 1st kind (eqcons, ieqcons); no Jacobian; take
+    #    the same extra arguments as the objective function.
+    cons += tuple({'type': 'eq', 'fun': c, 'args': args} for c in eqcons)
+    cons += tuple({'type': 'ineq', 'fun': c, 'args': args} for c in ieqcons)
+    # 2. constraints of the 2nd kind (f_eqcons, f_ieqcons) and their Jacobian
+    #    (fprime_eqcons, fprime_ieqcons); also take the same extra arguments
+    #    as the objective function.
+    if f_eqcons:
+        cons += ({'type': 'eq', 'fun': f_eqcons, 'jac': fprime_eqcons,
+                  'args': args}, )
+    if f_ieqcons:
+        cons += ({'type': 'ineq', 'fun': f_ieqcons, 'jac': fprime_ieqcons,
+                  'args': args}, )
+
+    res = _minimize_slsqp(func, x0, args, jac=fprime, bounds=bounds,
+                          constraints=cons, **opts)
+    if full_output:
+        return res['x'], res['fun'], res['nit'], res['status'], res['message']
+    else:
+        return res['x']
+
+
+def _minimize_slsqp(func, x0, args=(), jac=None, bounds=None,
+                    constraints=(),
+                    maxiter=100, ftol=1.0E-6, iprint=1, disp=False,
+                    eps=_epsilon, callback=None, finite_diff_rel_step=None,
+                    **unknown_options):
+    """
+    Minimize a scalar function of one or more variables using Sequential
+    Least Squares Programming (SLSQP).
+
+    Options
+    -------
+    ftol : float
+        Precision goal for the value of f in the stopping criterion.
+    eps : float
+        Step size used for numerical approximation of the Jacobian.
+    disp : bool
+        Set to True to print convergence messages. If False,
+        `verbosity` is ignored and set to 0.
+    maxiter : int
+        Maximum number of iterations.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of `jac`. The absolute step
+        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
+        possibly adjusted to fit into the bounds. For ``method='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+    """
+    _check_unknown_options(unknown_options)
+    iter = maxiter - 1
+    acc = ftol
+    epsilon = eps
+
+    if not disp:
+        iprint = 0
+
+    # Transform x0 into an array.
+    xp = array_namespace(x0)
+    x0 = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+    dtype = xp.float64
+    if xp.isdtype(x0.dtype, "real floating"):
+        dtype = x0.dtype
+    x = xp.reshape(xp.astype(x0, dtype), -1)
+
+    # SLSQP is sent 'old-style' bounds, 'new-style' bounds are required by
+    # ScalarFunction
+    if bounds is None or len(bounds) == 0:
+        new_bounds = (-np.inf, np.inf)
+    else:
+        new_bounds = old_bound_to_new(bounds)
+
+    # clip the initial guess to bounds, otherwise ScalarFunction doesn't work
+    x = np.clip(x, new_bounds[0], new_bounds[1])
+
+    # Constraints are triaged per type into a dictionary of tuples
+    if isinstance(constraints, dict):
+        constraints = (constraints, )
+
+    cons = {'eq': (), 'ineq': ()}
+    for ic, con in enumerate(constraints):
+        # check type
+        try:
+            ctype = con['type'].lower()
+        except KeyError as e:
+            raise KeyError('Constraint %d has no type defined.' % ic) from e
+        except TypeError as e:
+            raise TypeError('Constraints must be defined using a '
+                            'dictionary.') from e
+        except AttributeError as e:
+            raise TypeError("Constraint's type must be a string.") from e
+        else:
+            if ctype not in ['eq', 'ineq']:
+                raise ValueError(f"Unknown constraint type '{con['type']}'.")
+
+        # check function
+        if 'fun' not in con:
+            raise ValueError('Constraint %d has no function defined.' % ic)
+
+        # check Jacobian
+        cjac = con.get('jac')
+        if cjac is None:
+            # approximate Jacobian function. The factory function is needed
+            # to keep a reference to `fun`, see gh-4240.
+            def cjac_factory(fun):
+                def cjac(x, *args):
+                    x = _check_clip_x(x, new_bounds)
+
+                    if jac in ['2-point', '3-point', 'cs']:
+                        return approx_derivative(fun, x, method=jac, args=args,
+                                                 rel_step=finite_diff_rel_step,
+                                                 bounds=new_bounds)
+                    else:
+                        return approx_derivative(fun, x, method='2-point',
+                                                 abs_step=epsilon, args=args,
+                                                 bounds=new_bounds)
+
+                return cjac
+            cjac = cjac_factory(con['fun'])
+
+        # update constraints' dictionary
+        cons[ctype] += ({'fun': con['fun'],
+                         'jac': cjac,
+                         'args': con.get('args', ())}, )
+
+    exit_modes = {-1: "Gradient evaluation required (g & a)",
+                   0: "Optimization terminated successfully",
+                   1: "Function evaluation required (f & c)",
+                   2: "More equality constraints than independent variables",
+                   3: "More than 3*n iterations in LSQ subproblem",
+                   4: "Inequality constraints incompatible",
+                   5: "Singular matrix E in LSQ subproblem",
+                   6: "Singular matrix C in LSQ subproblem",
+                   7: "Rank-deficient equality constraint subproblem HFTI",
+                   8: "Positive directional derivative for linesearch",
+                   9: "Iteration limit reached"}
+
+    # Set the parameters that SLSQP will need
+    # meq, mieq: number of equality and inequality constraints
+    meq = sum(map(len, [atleast_1d(c['fun'](x, *c['args']))
+              for c in cons['eq']]))
+    mieq = sum(map(len, [atleast_1d(c['fun'](x, *c['args']))
+               for c in cons['ineq']]))
+    # m = The total number of constraints
+    m = meq + mieq
+    # la = The number of constraints, or 1 if there are no constraints
+    la = array([1, m]).max()
+    # n = The number of independent variables
+    n = len(x)
+
+    # Define the workspaces for SLSQP
+    n1 = n + 1
+    mineq = m - meq + n1 + n1
+    len_w = (3*n1+m)*(n1+1)+(n1-meq+1)*(mineq+2) + 2*mineq+(n1+mineq)*(n1-meq) \
+            + 2*meq + n1 + ((n+1)*n)//2 + 2*m + 3*n + 3*n1 + 1
+    len_jw = mineq
+    w = zeros(len_w)
+    jw = zeros(len_jw)
+
+    # Decompose bounds into xl and xu
+    if bounds is None or len(bounds) == 0:
+        xl = np.empty(n, dtype=float)
+        xu = np.empty(n, dtype=float)
+        xl.fill(np.nan)
+        xu.fill(np.nan)
+    else:
+        bnds = array([(_arr_to_scalar(l), _arr_to_scalar(u))
+                      for (l, u) in bounds], float)
+        if bnds.shape[0] != n:
+            raise IndexError('SLSQP Error: the length of bounds is not '
+                             'compatible with that of x0.')
+
+        with np.errstate(invalid='ignore'):
+            bnderr = bnds[:, 0] > bnds[:, 1]
+
+        if bnderr.any():
+            raise ValueError("SLSQP Error: lb > ub in bounds "
+                             f"{', '.join(str(b) for b in bnderr)}.")
+        xl, xu = bnds[:, 0], bnds[:, 1]
+
+        # Mark infinite bounds with nans; the Fortran code understands this
+        infbnd = ~isfinite(bnds)
+        xl[infbnd[:, 0]] = np.nan
+        xu[infbnd[:, 1]] = np.nan
+
+    # ScalarFunction provides function and gradient evaluation
+    sf = _prepare_scalar_function(func, x, jac=jac, args=args, epsilon=eps,
+                                  finite_diff_rel_step=finite_diff_rel_step,
+                                  bounds=new_bounds)
+    # gh11403 SLSQP sometimes exceeds bounds by 1 or 2 ULP, make sure this
+    # doesn't get sent to the func/grad evaluator.
+    wrapped_fun = _clip_x_for_func(sf.fun, new_bounds)
+    wrapped_grad = _clip_x_for_func(sf.grad, new_bounds)
+
+    # Initialize the iteration counter and the mode value
+    mode = array(0, int)
+    acc = array(acc, float)
+    majiter = array(iter, int)
+    majiter_prev = 0
+
+    # Initialize internal SLSQP state variables
+    alpha = array(0, float)
+    f0 = array(0, float)
+    gs = array(0, float)
+    h1 = array(0, float)
+    h2 = array(0, float)
+    h3 = array(0, float)
+    h4 = array(0, float)
+    t = array(0, float)
+    t0 = array(0, float)
+    tol = array(0, float)
+    iexact = array(0, int)
+    incons = array(0, int)
+    ireset = array(0, int)
+    itermx = array(0, int)
+    line = array(0, int)
+    n1 = array(0, int)
+    n2 = array(0, int)
+    n3 = array(0, int)
+
+    # Print the header if iprint >= 2
+    if iprint >= 2:
+        print("%5s %5s %16s %16s" % ("NIT", "FC", "OBJFUN", "GNORM"))
+
+    # mode is zero on entry, so call objective, constraints and gradients
+    # there should be no func evaluations here because it's cached from
+    # ScalarFunction
+    fx = wrapped_fun(x)
+    g = append(wrapped_grad(x), 0.0)
+    c = _eval_constraint(x, cons)
+    a = _eval_con_normals(x, cons, la, n, m, meq, mieq)
+
+    while 1:
+        # Call SLSQP
+        slsqp(m, meq, x, xl, xu, fx, c, g, a, acc, majiter, mode, w, jw,
+              alpha, f0, gs, h1, h2, h3, h4, t, t0, tol,
+              iexact, incons, ireset, itermx, line,
+              n1, n2, n3)
+
+        if mode == 1:  # objective and constraint evaluation required
+            fx = wrapped_fun(x)
+            c = _eval_constraint(x, cons)
+
+        if mode == -1:  # gradient evaluation required
+            g = append(wrapped_grad(x), 0.0)
+            a = _eval_con_normals(x, cons, la, n, m, meq, mieq)
+
+        if majiter > majiter_prev:
+            # call callback if major iteration has incremented
+            if callback is not None:
+                callback(np.copy(x))
+
+            # Print the status of the current iterate if iprint > 2
+            if iprint >= 2:
+                print("%5i %5i % 16.6E % 16.6E" % (majiter, sf.nfev,
+                                                   fx, linalg.norm(g)))
+
+        # If exit mode is not -1 or 1, slsqp has completed
+        if abs(mode) != 1:
+            break
+
+        majiter_prev = int(majiter)
+
+    # Optimization loop complete. Print status if requested
+    if iprint >= 1:
+        print(exit_modes[int(mode)] + "    (Exit mode " + str(mode) + ')')
+        print("            Current function value:", fx)
+        print("            Iterations:", majiter)
+        print("            Function evaluations:", sf.nfev)
+        print("            Gradient evaluations:", sf.ngev)
+
+    return OptimizeResult(x=x, fun=fx, jac=g[:-1], nit=int(majiter),
+                          nfev=sf.nfev, njev=sf.ngev, status=int(mode),
+                          message=exit_modes[int(mode)], success=(mode == 0))
+
+
+def _eval_constraint(x, cons):
+    # Compute constraints
+    if cons['eq']:
+        c_eq = concatenate([atleast_1d(con['fun'](x, *con['args']))
+                            for con in cons['eq']])
+    else:
+        c_eq = zeros(0)
+
+    if cons['ineq']:
+        c_ieq = concatenate([atleast_1d(con['fun'](x, *con['args']))
+                             for con in cons['ineq']])
+    else:
+        c_ieq = zeros(0)
+
+    # Now combine c_eq and c_ieq into a single matrix
+    c = concatenate((c_eq, c_ieq))
+    return c
+
+
+def _eval_con_normals(x, cons, la, n, m, meq, mieq):
+    # Compute the normals of the constraints
+    if cons['eq']:
+        a_eq = vstack([con['jac'](x, *con['args'])
+                       for con in cons['eq']])
+    else:  # no equality constraint
+        a_eq = zeros((meq, n))
+
+    if cons['ineq']:
+        a_ieq = vstack([con['jac'](x, *con['args'])
+                        for con in cons['ineq']])
+    else:  # no inequality constraint
+        a_ieq = zeros((mieq, n))
+
+    # Now combine a_eq and a_ieq into a single a matrix
+    if m == 0:  # no constraints
+        a = zeros((la, n))
+    else:
+        a = vstack((a_eq, a_ieq))
+    a = concatenate((a, zeros([la, 1])), 1)
+
+    return a
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_spectral.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_spectral.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ff5bef0283b2d6b6c018c1c8b98cd46a335d7cb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_spectral.py
@@ -0,0 +1,260 @@
+"""
+Spectral Algorithm for Nonlinear Equations
+"""
+import collections
+
+import numpy as np
+from scipy.optimize import OptimizeResult
+from scipy.optimize._optimize import _check_unknown_options
+from ._linesearch import _nonmonotone_line_search_cruz, _nonmonotone_line_search_cheng
+
+class _NoConvergence(Exception):
+    pass
+
+
+def _root_df_sane(func, x0, args=(), ftol=1e-8, fatol=1e-300, maxfev=1000,
+                  fnorm=None, callback=None, disp=False, M=10, eta_strategy=None,
+                  sigma_eps=1e-10, sigma_0=1.0, line_search='cruz', **unknown_options):
+    r"""
+    Solve nonlinear equation with the DF-SANE method
+
+    Options
+    -------
+    ftol : float, optional
+        Relative norm tolerance.
+    fatol : float, optional
+        Absolute norm tolerance.
+        Algorithm terminates when ``||func(x)|| < fatol + ftol ||func(x_0)||``.
+    fnorm : callable, optional
+        Norm to use in the convergence check. If None, 2-norm is used.
+    maxfev : int, optional
+        Maximum number of function evaluations.
+    disp : bool, optional
+        Whether to print convergence process to stdout.
+    eta_strategy : callable, optional
+        Choice of the ``eta_k`` parameter, which gives slack for growth
+        of ``||F||**2``.  Called as ``eta_k = eta_strategy(k, x, F)`` with
+        `k` the iteration number, `x` the current iterate and `F` the current
+        residual. Should satisfy ``eta_k > 0`` and ``sum(eta, k=0..inf) < inf``.
+        Default: ``||F||**2 / (1 + k)**2``.
+    sigma_eps : float, optional
+        The spectral coefficient is constrained to ``sigma_eps < sigma < 1/sigma_eps``.
+        Default: 1e-10
+    sigma_0 : float, optional
+        Initial spectral coefficient.
+        Default: 1.0
+    M : int, optional
+        Number of iterates to include in the nonmonotonic line search.
+        Default: 10
+    line_search : {'cruz', 'cheng'}
+        Type of line search to employ. 'cruz' is the original one defined in
+        [Martinez & Raydan. Math. Comp. 75, 1429 (2006)], 'cheng' is
+        a modified search defined in [Cheng & Li. IMA J. Numer. Anal. 29, 814 (2009)].
+        Default: 'cruz'
+
+    References
+    ----------
+    .. [1] "Spectral residual method without gradient information for solving
+           large-scale nonlinear systems of equations." W. La Cruz,
+           J.M. Martinez, M. Raydan. Math. Comp. **75**, 1429 (2006).
+    .. [2] W. La Cruz, Opt. Meth. Software, 29, 24 (2014).
+    .. [3] W. Cheng, D.-H. Li. IMA J. Numer. Anal. **29**, 814 (2009).
+
+    """
+    _check_unknown_options(unknown_options)
+
+    if line_search not in ('cheng', 'cruz'):
+        raise ValueError(f"Invalid value {line_search!r} for 'line_search'")
+
+    nexp = 2
+
+    if eta_strategy is None:
+        # Different choice from [1], as their eta is not invariant
+        # vs. scaling of F.
+        def eta_strategy(k, x, F):
+            # Obtain squared 2-norm of the initial residual from the outer scope
+            return f_0 / (1 + k)**2
+
+    if fnorm is None:
+        def fnorm(F):
+            # Obtain squared 2-norm of the current residual from the outer scope
+            return f_k**(1.0/nexp)
+
+    def fmerit(F):
+        return np.linalg.norm(F)**nexp
+
+    nfev = [0]
+    f, x_k, x_shape, f_k, F_k, is_complex = _wrap_func(func, x0, fmerit,
+                                                       nfev, maxfev, args)
+
+    k = 0
+    f_0 = f_k
+    sigma_k = sigma_0
+
+    F_0_norm = fnorm(F_k)
+
+    # For the 'cruz' line search
+    prev_fs = collections.deque([f_k], M)
+
+    # For the 'cheng' line search
+    Q = 1.0
+    C = f_0
+
+    converged = False
+    message = "too many function evaluations required"
+
+    while True:
+        F_k_norm = fnorm(F_k)
+
+        if disp:
+            print("iter %d: ||F|| = %g, sigma = %g" % (k, F_k_norm, sigma_k))
+
+        if callback is not None:
+            callback(x_k, F_k)
+
+        if F_k_norm < ftol * F_0_norm + fatol:
+            # Converged!
+            message = "successful convergence"
+            converged = True
+            break
+
+        # Control spectral parameter, from [2]
+        if abs(sigma_k) > 1/sigma_eps:
+            sigma_k = 1/sigma_eps * np.sign(sigma_k)
+        elif abs(sigma_k) < sigma_eps:
+            sigma_k = sigma_eps
+
+        # Line search direction
+        d = -sigma_k * F_k
+
+        # Nonmonotone line search
+        eta = eta_strategy(k, x_k, F_k)
+        try:
+            if line_search == 'cruz':
+                alpha, xp, fp, Fp = _nonmonotone_line_search_cruz(f, x_k, d, prev_fs,
+                                                                  eta=eta)
+            elif line_search == 'cheng':
+                alpha, xp, fp, Fp, C, Q = _nonmonotone_line_search_cheng(f, x_k, d, f_k,
+                                                                         C, Q, eta=eta)
+        except _NoConvergence:
+            break
+
+        # Update spectral parameter
+        s_k = xp - x_k
+        y_k = Fp - F_k
+        sigma_k = np.vdot(s_k, s_k) / np.vdot(s_k, y_k)
+
+        # Take step
+        x_k = xp
+        F_k = Fp
+        f_k = fp
+
+        # Store function value
+        if line_search == 'cruz':
+            prev_fs.append(fp)
+
+        k += 1
+
+    x = _wrap_result(x_k, is_complex, shape=x_shape)
+    F = _wrap_result(F_k, is_complex)
+
+    result = OptimizeResult(x=x, success=converged,
+                            message=message,
+                            fun=F, nfev=nfev[0], nit=k, method="df-sane")
+
+    return result
+
+
+def _wrap_func(func, x0, fmerit, nfev_list, maxfev, args=()):
+    """
+    Wrap a function and an initial value so that (i) complex values
+    are wrapped to reals, and (ii) value for a merit function
+    fmerit(x, f) is computed at the same time, (iii) iteration count
+    is maintained and an exception is raised if it is exceeded.
+
+    Parameters
+    ----------
+    func : callable
+        Function to wrap
+    x0 : ndarray
+        Initial value
+    fmerit : callable
+        Merit function fmerit(f) for computing merit value from residual.
+    nfev_list : list
+        List to store number of evaluations in. Should be [0] in the beginning.
+    maxfev : int
+        Maximum number of evaluations before _NoConvergence is raised.
+    args : tuple
+        Extra arguments to func
+
+    Returns
+    -------
+    wrap_func : callable
+        Wrapped function, to be called as
+        ``F, fp = wrap_func(x0)``
+    x0_wrap : ndarray of float
+        Wrapped initial value; raveled to 1-D and complex
+        values mapped to reals.
+    x0_shape : tuple
+        Shape of the initial value array
+    f : float
+        Merit function at F
+    F : ndarray of float
+        Residual at x0_wrap
+    is_complex : bool
+        Whether complex values were mapped to reals
+
+    """
+    x0 = np.asarray(x0)
+    x0_shape = x0.shape
+    F = np.asarray(func(x0, *args)).ravel()
+    is_complex = np.iscomplexobj(x0) or np.iscomplexobj(F)
+    x0 = x0.ravel()
+
+    nfev_list[0] = 1
+
+    if is_complex:
+        def wrap_func(x):
+            if nfev_list[0] >= maxfev:
+                raise _NoConvergence()
+            nfev_list[0] += 1
+            z = _real2complex(x).reshape(x0_shape)
+            v = np.asarray(func(z, *args)).ravel()
+            F = _complex2real(v)
+            f = fmerit(F)
+            return f, F
+
+        x0 = _complex2real(x0)
+        F = _complex2real(F)
+    else:
+        def wrap_func(x):
+            if nfev_list[0] >= maxfev:
+                raise _NoConvergence()
+            nfev_list[0] += 1
+            x = x.reshape(x0_shape)
+            F = np.asarray(func(x, *args)).ravel()
+            f = fmerit(F)
+            return f, F
+
+    return wrap_func, x0, x0_shape, fmerit(F), F, is_complex
+
+
+def _wrap_result(result, is_complex, shape=None):
+    """
+    Convert from real to complex and reshape result arrays.
+    """
+    if is_complex:
+        z = _real2complex(result)
+    else:
+        z = result
+    if shape is not None:
+        z = z.reshape(shape)
+    return z
+
+
+def _real2complex(x):
+    return np.ascontiguousarray(x, dtype=float).view(np.complex128)
+
+
+def _complex2real(z):
+    return np.ascontiguousarray(z, dtype=complex).view(np.float64)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tnc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tnc.py
new file mode 100644
index 0000000000000000000000000000000000000000..327fe4262e25f2f7e2c95d7e5261b6f188e72881
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tnc.py
@@ -0,0 +1,431 @@
+# TNC Python interface
+# @(#) $Jeannot: tnc.py,v 1.11 2005/01/28 18:27:31 js Exp $
+
+# Copyright (c) 2004-2005, Jean-Sebastien Roy (js@jeannot.org)
+
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+"""
+TNC: A Python interface to the TNC non-linear optimizer
+
+TNC is a non-linear optimizer. To use it, you must provide a function to
+minimize. The function must take one argument: the list of coordinates where to
+evaluate the function; and it must return either a tuple, whose first element is the
+value of the function, and whose second argument is the gradient of the function
+(as a list of values); or None, to abort the minimization.
+"""
+
+from scipy.optimize import _moduleTNC as moduleTNC
+from ._optimize import (MemoizeJac, OptimizeResult, _check_unknown_options,
+                       _prepare_scalar_function)
+from ._constraints import old_bound_to_new
+from scipy._lib._array_api import array_namespace
+from scipy._lib import array_api_extra as xpx
+
+from numpy import inf, array, zeros
+
+__all__ = ['fmin_tnc']
+
+
+MSG_NONE = 0  # No messages
+MSG_ITER = 1  # One line per iteration
+MSG_INFO = 2  # Informational messages
+MSG_VERS = 4  # Version info
+MSG_EXIT = 8  # Exit reasons
+MSG_ALL = MSG_ITER + MSG_INFO + MSG_VERS + MSG_EXIT
+
+MSGS = {
+        MSG_NONE: "No messages",
+        MSG_ITER: "One line per iteration",
+        MSG_INFO: "Informational messages",
+        MSG_VERS: "Version info",
+        MSG_EXIT: "Exit reasons",
+        MSG_ALL: "All messages"
+}
+
+INFEASIBLE = -1  # Infeasible (lower bound > upper bound)
+LOCALMINIMUM = 0  # Local minimum reached (|pg| ~= 0)
+FCONVERGED = 1  # Converged (|f_n-f_(n-1)| ~= 0)
+XCONVERGED = 2  # Converged (|x_n-x_(n-1)| ~= 0)
+MAXFUN = 3  # Max. number of function evaluations reached
+LSFAIL = 4  # Linear search failed
+CONSTANT = 5  # All lower bounds are equal to the upper bounds
+NOPROGRESS = 6  # Unable to progress
+USERABORT = 7  # User requested end of minimization
+
+RCSTRINGS = {
+        INFEASIBLE: "Infeasible (lower bound > upper bound)",
+        LOCALMINIMUM: "Local minimum reached (|pg| ~= 0)",
+        FCONVERGED: "Converged (|f_n-f_(n-1)| ~= 0)",
+        XCONVERGED: "Converged (|x_n-x_(n-1)| ~= 0)",
+        MAXFUN: "Max. number of function evaluations reached",
+        LSFAIL: "Linear search failed",
+        CONSTANT: "All lower bounds are equal to the upper bounds",
+        NOPROGRESS: "Unable to progress",
+        USERABORT: "User requested end of minimization"
+}
+
+# Changes to interface made by Travis Oliphant, Apr. 2004 for inclusion in
+#  SciPy
+
+
+def fmin_tnc(func, x0, fprime=None, args=(), approx_grad=0,
+             bounds=None, epsilon=1e-8, scale=None, offset=None,
+             messages=MSG_ALL, maxCGit=-1, maxfun=None, eta=-1,
+             stepmx=0, accuracy=0, fmin=0, ftol=-1, xtol=-1, pgtol=-1,
+             rescale=-1, disp=None, callback=None):
+    r"""
+    Minimize a function with variables subject to bounds, using
+    gradient information in a truncated Newton algorithm. This
+    method wraps a C implementation of the algorithm.
+
+    Parameters
+    ----------
+    func : callable ``func(x, *args)``
+        Function to minimize.  Must do one of:
+
+        1. Return f and g, where f is the value of the function and g its
+           gradient (a list of floats).
+
+        2. Return the function value but supply gradient function
+           separately as `fprime`.
+
+        3. Return the function value and set ``approx_grad=True``.
+
+        If the function returns None, the minimization
+        is aborted.
+    x0 : array_like
+        Initial estimate of minimum.
+    fprime : callable ``fprime(x, *args)``, optional
+        Gradient of `func`. If None, then either `func` must return the
+        function value and the gradient (``f,g = func(x, *args)``)
+        or `approx_grad` must be True.
+    args : tuple, optional
+        Arguments to pass to function.
+    approx_grad : bool, optional
+        If true, approximate the gradient numerically.
+    bounds : list, optional
+        (min, max) pairs for each element in x0, defining the
+        bounds on that parameter. Use None or +/-inf for one of
+        min or max when there is no bound in that direction.
+    epsilon : float, optional
+        Used if approx_grad is True. The stepsize in a finite
+        difference approximation for fprime.
+    scale : array_like, optional
+        Scaling factors to apply to each variable. If None, the
+        factors are up-low for interval bounded variables and
+        1+|x| for the others. Defaults to None.
+    offset : array_like, optional
+        Value to subtract from each variable. If None, the
+        offsets are (up+low)/2 for interval bounded variables
+        and x for the others.
+    messages : int, optional
+        Bit mask used to select messages display during
+        minimization values defined in the MSGS dict. Defaults to
+        MGS_ALL.
+    disp : int, optional
+        Integer interface to messages. 0 = no message, 5 = all messages
+    maxCGit : int, optional
+        Maximum number of hessian*vector evaluations per main
+        iteration. If maxCGit == 0, the direction chosen is
+        -gradient if maxCGit < 0, maxCGit is set to
+        max(1,min(50,n/2)). Defaults to -1.
+    maxfun : int, optional
+        Maximum number of function evaluation. If None, maxfun is
+        set to max(100, 10*len(x0)). Defaults to None. Note that this function
+        may violate the limit because of evaluating gradients by numerical
+        differentiation.
+    eta : float, optional
+        Severity of the line search. If < 0 or > 1, set to 0.25.
+        Defaults to -1.
+    stepmx : float, optional
+        Maximum step for the line search. May be increased during
+        call. If too small, it will be set to 10.0. Defaults to 0.
+    accuracy : float, optional
+        Relative precision for finite difference calculations. If
+        <= machine_precision, set to sqrt(machine_precision).
+        Defaults to 0.
+    fmin : float, optional
+        Minimum function value estimate. Defaults to 0.
+    ftol : float, optional
+        Precision goal for the value of f in the stopping criterion.
+        If ftol < 0.0, ftol is set to 0.0 defaults to -1.
+    xtol : float, optional
+        Precision goal for the value of x in the stopping
+        criterion (after applying x scaling factors). If xtol <
+        0.0, xtol is set to sqrt(machine_precision). Defaults to
+        -1.
+    pgtol : float, optional
+        Precision goal for the value of the projected gradient in
+        the stopping criterion (after applying x scaling factors).
+        If pgtol < 0.0, pgtol is set to 1e-2 * sqrt(accuracy).
+        Setting it to 0.0 is not recommended. Defaults to -1.
+    rescale : float, optional
+        Scaling factor (in log10) used to trigger f value
+        rescaling. If 0, rescale at each iteration. If a large
+        value, never rescale. If < 0, rescale is set to 1.3.
+    callback : callable, optional
+        Called after each iteration, as callback(xk), where xk is the
+        current parameter vector.
+
+    Returns
+    -------
+    x : ndarray
+        The solution.
+    nfeval : int
+        The number of function evaluations.
+    rc : int
+        Return code, see below
+
+    See also
+    --------
+    minimize: Interface to minimization algorithms for multivariate
+        functions. See the 'TNC' `method` in particular.
+
+    Notes
+    -----
+    The underlying algorithm is truncated Newton, also called
+    Newton Conjugate-Gradient. This method differs from
+    scipy.optimize.fmin_ncg in that
+
+    1. it wraps a C implementation of the algorithm
+    2. it allows each variable to be given an upper and lower bound.
+
+    The algorithm incorporates the bound constraints by determining
+    the descent direction as in an unconstrained truncated Newton,
+    but never taking a step-size large enough to leave the space
+    of feasible x's. The algorithm keeps track of a set of
+    currently active constraints, and ignores them when computing
+    the minimum allowable step size. (The x's associated with the
+    active constraint are kept fixed.) If the maximum allowable
+    step size is zero then a new constraint is added. At the end
+    of each iteration one of the constraints may be deemed no
+    longer active and removed. A constraint is considered
+    no longer active is if it is currently active
+    but the gradient for that variable points inward from the
+    constraint. The specific constraint removed is the one
+    associated with the variable of largest index whose
+    constraint is no longer active.
+
+    Return codes are defined as follows:
+
+    - ``-1`` : Infeasible (lower bound > upper bound)
+    - ``0`` : Local minimum reached (:math:`|pg| \approx 0`)
+    - ``1`` : Converged (:math:`|f_n-f_(n-1)| \approx 0`)
+    - ``2`` : Converged (:math:`|x_n-x_(n-1)| \approx 0`)
+    - ``3`` : Max. number of function evaluations reached
+    - ``4`` : Linear search failed
+    - ``5`` : All lower bounds are equal to the upper bounds
+    - ``6`` : Unable to progress
+    - ``7`` : User requested end of minimization
+
+    References
+    ----------
+    Wright S., Nocedal J. (2006), 'Numerical Optimization'
+
+    Nash S.G. (1984), "Newton-Type Minimization Via the Lanczos Method",
+    SIAM Journal of Numerical Analysis 21, pp. 770-778
+
+    """
+    # handle fprime/approx_grad
+    if approx_grad:
+        fun = func
+        jac = None
+    elif fprime is None:
+        fun = MemoizeJac(func)
+        jac = fun.derivative
+    else:
+        fun = func
+        jac = fprime
+
+    if disp is not None:  # disp takes precedence over messages
+        mesg_num = disp
+    else:
+        mesg_num = {0:MSG_NONE, 1:MSG_ITER, 2:MSG_INFO, 3:MSG_VERS,
+                    4:MSG_EXIT, 5:MSG_ALL}.get(messages, MSG_ALL)
+    # build options
+    opts = {'eps': epsilon,
+            'scale': scale,
+            'offset': offset,
+            'mesg_num': mesg_num,
+            'maxCGit': maxCGit,
+            'maxfun': maxfun,
+            'eta': eta,
+            'stepmx': stepmx,
+            'accuracy': accuracy,
+            'minfev': fmin,
+            'ftol': ftol,
+            'xtol': xtol,
+            'gtol': pgtol,
+            'rescale': rescale,
+            'disp': False}
+
+    res = _minimize_tnc(fun, x0, args, jac, bounds, callback=callback, **opts)
+
+    return res['x'], res['nfev'], res['status']
+
+
+def _minimize_tnc(fun, x0, args=(), jac=None, bounds=None,
+                  eps=1e-8, scale=None, offset=None, mesg_num=None,
+                  maxCGit=-1, eta=-1, stepmx=0, accuracy=0,
+                  minfev=0, ftol=-1, xtol=-1, gtol=-1, rescale=-1, disp=False,
+                  callback=None, finite_diff_rel_step=None, maxfun=None,
+                  **unknown_options):
+    """
+    Minimize a scalar function of one or more variables using a truncated
+    Newton (TNC) algorithm.
+
+    Options
+    -------
+    eps : float or ndarray
+        If `jac is None` the absolute step size used for numerical
+        approximation of the jacobian via forward differences.
+    scale : list of floats
+        Scaling factors to apply to each variable. If None, the
+        factors are up-low for interval bounded variables and
+        1+|x] for the others. Defaults to None.
+    offset : float
+        Value to subtract from each variable. If None, the
+        offsets are (up+low)/2 for interval bounded variables
+        and x for the others.
+    disp : bool
+       Set to True to print convergence messages.
+    maxCGit : int
+        Maximum number of hessian*vector evaluations per main
+        iteration. If maxCGit == 0, the direction chosen is
+        -gradient if maxCGit < 0, maxCGit is set to
+        max(1,min(50,n/2)). Defaults to -1.
+    eta : float
+        Severity of the line search. If < 0 or > 1, set to 0.25.
+        Defaults to -1.
+    stepmx : float
+        Maximum step for the line search. May be increased during
+        call. If too small, it will be set to 10.0. Defaults to 0.
+    accuracy : float
+        Relative precision for finite difference calculations. If
+        <= machine_precision, set to sqrt(machine_precision).
+        Defaults to 0.
+    minfev : float
+        Minimum function value estimate. Defaults to 0.
+    ftol : float
+        Precision goal for the value of f in the stopping criterion.
+        If ftol < 0.0, ftol is set to 0.0 defaults to -1.
+    xtol : float
+        Precision goal for the value of x in the stopping
+        criterion (after applying x scaling factors). If xtol <
+        0.0, xtol is set to sqrt(machine_precision). Defaults to
+        -1.
+    gtol : float
+        Precision goal for the value of the projected gradient in
+        the stopping criterion (after applying x scaling factors).
+        If gtol < 0.0, gtol is set to 1e-2 * sqrt(accuracy).
+        Setting it to 0.0 is not recommended. Defaults to -1.
+    rescale : float
+        Scaling factor (in log10) used to trigger f value
+        rescaling.  If 0, rescale at each iteration.  If a large
+        value, never rescale.  If < 0, rescale is set to 1.3.
+    finite_diff_rel_step : None or array_like, optional
+        If ``jac in ['2-point', '3-point', 'cs']`` the relative step size to
+        use for numerical approximation of the jacobian. The absolute step
+        size is computed as ``h = rel_step * sign(x) * max(1, abs(x))``,
+        possibly adjusted to fit into the bounds. For ``method='3-point'``
+        the sign of `h` is ignored. If None (default) then step is selected
+        automatically.
+    maxfun : int
+        Maximum number of function evaluations. If None, `maxfun` is
+        set to max(100, 10*len(x0)). Defaults to None.
+    """
+    _check_unknown_options(unknown_options)
+    fmin = minfev
+    pgtol = gtol
+
+    xp = array_namespace(x0)
+    x0 = xpx.atleast_nd(xp.asarray(x0), ndim=1, xp=xp)
+    dtype = xp.float64
+    if xp.isdtype(x0.dtype, "real floating"):
+        dtype = x0.dtype
+    x0 = xp.reshape(xp.astype(x0, dtype), -1)
+
+    n = len(x0)
+
+    if bounds is None:
+        bounds = [(None,None)] * n
+    if len(bounds) != n:
+        raise ValueError('length of x0 != length of bounds')
+    new_bounds = old_bound_to_new(bounds)
+
+    if mesg_num is not None:
+        messages = {0:MSG_NONE, 1:MSG_ITER, 2:MSG_INFO, 3:MSG_VERS,
+                    4:MSG_EXIT, 5:MSG_ALL}.get(mesg_num, MSG_ALL)
+    elif disp:
+        messages = MSG_ALL
+    else:
+        messages = MSG_NONE
+
+    sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
+                                  finite_diff_rel_step=finite_diff_rel_step,
+                                  bounds=new_bounds)
+    func_and_grad = sf.fun_and_grad
+
+    """
+    low, up   : the bounds (lists of floats)
+                if low is None, the lower bounds are removed.
+                if up is None, the upper bounds are removed.
+                low and up defaults to None
+    """
+    low = zeros(n)
+    up = zeros(n)
+    for i in range(n):
+        if bounds[i] is None:
+            l, u = -inf, inf
+        else:
+            l,u = bounds[i]
+            if l is None:
+                low[i] = -inf
+            else:
+                low[i] = l
+            if u is None:
+                up[i] = inf
+            else:
+                up[i] = u
+
+    if scale is None:
+        scale = array([])
+
+    if offset is None:
+        offset = array([])
+
+    if maxfun is None:
+        maxfun = max(100, 10*len(x0))
+
+    rc, nf, nit, x, funv, jacv = moduleTNC.tnc_minimize(
+        func_and_grad, x0, low, up, scale,
+        offset, messages, maxCGit, maxfun,
+        eta, stepmx, accuracy, fmin, ftol,
+        xtol, pgtol, rescale, callback
+    )
+    # the TNC documentation states: "On output, x, f and g may be very
+    # slightly out of sync because of scaling". Therefore re-evaluate
+    # func_and_grad so they are synced.
+    funv, jacv = func_and_grad(x)
+
+    return OptimizeResult(x=x, fun=funv, jac=jacv, nfev=sf.nfev,
+                          nit=nit, status=rc, message=RCSTRINGS[rc],
+                          success=(-1 < rc < 3))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..537b73b3aeb36df09863a0cd24957e5612deb030
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__init__.py
@@ -0,0 +1,12 @@
+from ._trlib import TRLIBQuadraticSubproblem
+
+__all__ = ['TRLIBQuadraticSubproblem', 'get_trlib_quadratic_subproblem']
+
+
+def get_trlib_quadratic_subproblem(tol_rel_i=-2.0, tol_rel_b=-3.0, disp=False):
+    def subproblem_factory(x, fun, jac, hess, hessp):
+        return TRLIBQuadraticSubproblem(x, fun, jac, hess, hessp,
+                                        tol_rel_i=tol_rel_i,
+                                        tol_rel_b=tol_rel_b,
+                                        disp=disp)
+    return subproblem_factory
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d001c90a032cdb5f2fda183a6b7d07ed4970f4c0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trlib/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion.py
new file mode 100644
index 0000000000000000000000000000000000000000..0dadc727e74e40b5200810191b21cdeda941c5f6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion.py
@@ -0,0 +1,304 @@
+"""Trust-region optimization."""
+import math
+import warnings
+
+import numpy as np
+import scipy.linalg
+from ._optimize import (_check_unknown_options, _status_message,
+                        OptimizeResult, _prepare_scalar_function,
+                        _call_callback_maybe_halt)
+from scipy.optimize._hessian_update_strategy import HessianUpdateStrategy
+from scipy.optimize._differentiable_functions import FD_METHODS
+__all__ = []
+
+
+def _wrap_function(function, args):
+    # wraps a minimizer function to count number of evaluations
+    # and to easily provide an args kwd.
+    ncalls = [0]
+    if function is None:
+        return ncalls, None
+
+    def function_wrapper(x, *wrapper_args):
+        ncalls[0] += 1
+        # A copy of x is sent to the user function (gh13740)
+        return function(np.copy(x), *(wrapper_args + args))
+
+    return ncalls, function_wrapper
+
+
+class BaseQuadraticSubproblem:
+    """
+    Base/abstract class defining the quadratic model for trust-region
+    minimization. Child classes must implement the ``solve`` method.
+
+    Values of the objective function, Jacobian and Hessian (if provided) at
+    the current iterate ``x`` are evaluated on demand and then stored as
+    attributes ``fun``, ``jac``, ``hess``.
+    """
+
+    def __init__(self, x, fun, jac, hess=None, hessp=None):
+        self._x = x
+        self._f = None
+        self._g = None
+        self._h = None
+        self._g_mag = None
+        self._cauchy_point = None
+        self._newton_point = None
+        self._fun = fun
+        self._jac = jac
+        self._hess = hess
+        self._hessp = hessp
+
+    def __call__(self, p):
+        return self.fun + np.dot(self.jac, p) + 0.5 * np.dot(p, self.hessp(p))
+
+    @property
+    def fun(self):
+        """Value of objective function at current iteration."""
+        if self._f is None:
+            self._f = self._fun(self._x)
+        return self._f
+
+    @property
+    def jac(self):
+        """Value of Jacobian of objective function at current iteration."""
+        if self._g is None:
+            self._g = self._jac(self._x)
+        return self._g
+
+    @property
+    def hess(self):
+        """Value of Hessian of objective function at current iteration."""
+        if self._h is None:
+            self._h = self._hess(self._x)
+        return self._h
+
+    def hessp(self, p):
+        if self._hessp is not None:
+            return self._hessp(self._x, p)
+        else:
+            return np.dot(self.hess, p)
+
+    @property
+    def jac_mag(self):
+        """Magnitude of jacobian of objective function at current iteration."""
+        if self._g_mag is None:
+            self._g_mag = scipy.linalg.norm(self.jac)
+        return self._g_mag
+
+    def get_boundaries_intersections(self, z, d, trust_radius):
+        """
+        Solve the scalar quadratic equation ``||z + t d|| == trust_radius``.
+        This is like a line-sphere intersection.
+        Return the two values of t, sorted from low to high.
+        """
+        a = np.dot(d, d)
+        b = 2 * np.dot(z, d)
+        c = np.dot(z, z) - trust_radius**2
+        sqrt_discriminant = math.sqrt(b*b - 4*a*c)
+
+        # The following calculation is mathematically
+        # equivalent to:
+        # ta = (-b - sqrt_discriminant) / (2*a)
+        # tb = (-b + sqrt_discriminant) / (2*a)
+        # but produce smaller round off errors.
+        # Look at Matrix Computation p.97
+        # for a better justification.
+        aux = b + math.copysign(sqrt_discriminant, b)
+        ta = -aux / (2*a)
+        tb = -2*c / aux
+        return sorted([ta, tb])
+
+    def solve(self, trust_radius):
+        raise NotImplementedError('The solve method should be implemented by '
+                                  'the child class')
+
+
+def _minimize_trust_region(fun, x0, args=(), jac=None, hess=None, hessp=None,
+                           subproblem=None, initial_trust_radius=1.0,
+                           max_trust_radius=1000.0, eta=0.15, gtol=1e-4,
+                           maxiter=None, disp=False, return_all=False,
+                           callback=None, inexact=True, **unknown_options):
+    """
+    Minimization of scalar function of one or more variables using a
+    trust-region algorithm.
+
+    Options for the trust-region algorithm are:
+        initial_trust_radius : float
+            Initial trust radius.
+        max_trust_radius : float
+            Never propose steps that are longer than this value.
+        eta : float
+            Trust region related acceptance stringency for proposed steps.
+        gtol : float
+            Gradient norm must be less than `gtol`
+            before successful termination.
+        maxiter : int
+            Maximum number of iterations to perform.
+        disp : bool
+            If True, print convergence message.
+        inexact : bool
+            Accuracy to solve subproblems. If True requires less nonlinear
+            iterations, but more vector products. Only effective for method
+            trust-krylov.
+
+    This function is called by the `minimize` function.
+    It is not supposed to be called directly.
+    """
+    _check_unknown_options(unknown_options)
+
+    if jac is None:
+        raise ValueError('Jacobian is currently required for trust-region '
+                         'methods')
+    if hess is None and hessp is None:
+        raise ValueError('Either the Hessian or the Hessian-vector product '
+                         'is currently required for trust-region methods')
+    if subproblem is None:
+        raise ValueError('A subproblem solving strategy is required for '
+                         'trust-region methods')
+    if not (0 <= eta < 0.25):
+        raise Exception('invalid acceptance stringency')
+    if max_trust_radius <= 0:
+        raise Exception('the max trust radius must be positive')
+    if initial_trust_radius <= 0:
+        raise ValueError('the initial trust radius must be positive')
+    if initial_trust_radius >= max_trust_radius:
+        raise ValueError('the initial trust radius must be less than the '
+                         'max trust radius')
+
+    # force the initial guess into a nice format
+    x0 = np.asarray(x0).flatten()
+
+    # A ScalarFunction representing the problem. This caches calls to fun, jac,
+    # hess.
+    sf = _prepare_scalar_function(fun, x0, jac=jac, hess=hess, args=args)
+    fun = sf.fun
+    jac = sf.grad
+    if callable(hess):
+        hess = sf.hess
+    elif callable(hessp):
+        # this elif statement must come before examining whether hess
+        # is estimated by FD methods or a HessianUpdateStrategy
+        pass
+    elif (hess in FD_METHODS or isinstance(hess, HessianUpdateStrategy)):
+        # If the Hessian is being estimated by finite differences or a
+        # Hessian update strategy then ScalarFunction.hess returns a
+        # LinearOperator or a HessianUpdateStrategy. This enables the
+        # calculation/creation of a hessp. BUT you only want to do this
+        # if the user *hasn't* provided a callable(hessp) function.
+        hess = None
+
+        def hessp(x, p, *args):
+            return sf.hess(x).dot(p)
+    else:
+        raise ValueError('Either the Hessian or the Hessian-vector product '
+                         'is currently required for trust-region methods')
+
+    # ScalarFunction doesn't represent hessp
+    nhessp, hessp = _wrap_function(hessp, args)
+
+    # limit the number of iterations
+    if maxiter is None:
+        maxiter = len(x0)*200
+
+    # init the search status
+    warnflag = 0
+
+    # initialize the search
+    trust_radius = initial_trust_radius
+    x = x0
+    if return_all:
+        allvecs = [x]
+    m = subproblem(x, fun, jac, hess, hessp)
+    k = 0
+
+    # search for the function min
+    # do not even start if the gradient is small enough
+    while m.jac_mag >= gtol:
+
+        # Solve the sub-problem.
+        # This gives us the proposed step relative to the current position
+        # and it tells us whether the proposed step
+        # has reached the trust region boundary or not.
+        try:
+            p, hits_boundary = m.solve(trust_radius)
+        except np.linalg.LinAlgError:
+            warnflag = 3
+            break
+
+        # calculate the predicted value at the proposed point
+        predicted_value = m(p)
+
+        # define the local approximation at the proposed point
+        x_proposed = x + p
+        m_proposed = subproblem(x_proposed, fun, jac, hess, hessp)
+
+        # evaluate the ratio defined in equation (4.4)
+        actual_reduction = m.fun - m_proposed.fun
+        predicted_reduction = m.fun - predicted_value
+        if predicted_reduction <= 0:
+            warnflag = 2
+            break
+        rho = actual_reduction / predicted_reduction
+
+        # update the trust radius according to the actual/predicted ratio
+        if rho < 0.25:
+            trust_radius *= 0.25
+        elif rho > 0.75 and hits_boundary:
+            trust_radius = min(2*trust_radius, max_trust_radius)
+
+        # if the ratio is high enough then accept the proposed step
+        if rho > eta:
+            x = x_proposed
+            m = m_proposed
+
+        # append the best guess, call back, increment the iteration count
+        if return_all:
+            allvecs.append(np.copy(x))
+        k += 1
+
+        intermediate_result = OptimizeResult(x=x, fun=m.fun)
+        if _call_callback_maybe_halt(callback, intermediate_result):
+            break
+
+        # check if the gradient is small enough to stop
+        if m.jac_mag < gtol:
+            warnflag = 0
+            break
+
+        # check if we have looked at enough iterations
+        if k >= maxiter:
+            warnflag = 1
+            break
+
+    # print some stuff if requested
+    status_messages = (
+            _status_message['success'],
+            _status_message['maxiter'],
+            'A bad approximation caused failure to predict improvement.',
+            'A linalg error occurred, such as a non-psd Hessian.',
+            )
+    if disp:
+        if warnflag == 0:
+            print(status_messages[warnflag])
+        else:
+            warnings.warn(status_messages[warnflag], RuntimeWarning, stacklevel=3)
+        print(f"         Current function value: {m.fun:f}")
+        print("         Iterations: %d" % k)
+        print("         Function evaluations: %d" % sf.nfev)
+        print("         Gradient evaluations: %d" % sf.ngev)
+        print("         Hessian evaluations: %d" % (sf.nhev + nhessp[0]))
+
+    result = OptimizeResult(x=x, success=(warnflag == 0), status=warnflag,
+                            fun=m.fun, jac=m.jac, nfev=sf.nfev, njev=sf.ngev,
+                            nhev=sf.nhev + nhessp[0], nit=k,
+                            message=status_messages[warnflag])
+
+    if hess is not None:
+        result['hess'] = m.hess
+
+    if return_all:
+        result['allvecs'] = allvecs
+
+    return result
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..549cfb9760dda474cb858b7b36d236af48111067
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__init__.py
@@ -0,0 +1,6 @@
+"""This module contains the equality constrained SQP solver."""
+
+
+from .minimize_trustregion_constr import _minimize_trustregion_constr
+
+__all__ = ['_minimize_trustregion_constr']
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c21e324cb8dcd1843028b0703104ad081e0d0f7c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/canonical_constraint.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/canonical_constraint.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4deed022999b37a854dc1cb04cba89cf54ff746f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/canonical_constraint.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/equality_constrained_sqp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/equality_constrained_sqp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a7b95e613afa8575a53a6c8c9e5f5deaa0457cdd
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/equality_constrained_sqp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/minimize_trustregion_constr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/minimize_trustregion_constr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6799e8e9933658be850a10904d350a1accd68ae4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/minimize_trustregion_constr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/projections.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/projections.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b833380542fde5d8aee8cc08c710985b99b87939
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/projections.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/qp_subproblem.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/qp_subproblem.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f1228304b3a5ccda9fd17ea12d7b6577b7ac1f78
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/qp_subproblem.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/report.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/report.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f995e26ed5125a784f04cfceaf9ae207bd0d9b93
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/report.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/tr_interior_point.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/tr_interior_point.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d6cccac9d2de65545a4cf33bde4fe73c383b9ef0
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/__pycache__/tr_interior_point.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/canonical_constraint.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/canonical_constraint.py
new file mode 100644
index 0000000000000000000000000000000000000000..7e9e75f04c032e5be077f9b7db210b96072092c9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/canonical_constraint.py
@@ -0,0 +1,390 @@
+import numpy as np
+import scipy.sparse as sps
+
+
+class CanonicalConstraint:
+    """Canonical constraint to use with trust-constr algorithm.
+
+    It represents the set of constraints of the form::
+
+        f_eq(x) = 0
+        f_ineq(x) <= 0
+
+    where ``f_eq`` and ``f_ineq`` are evaluated by a single function, see
+    below.
+
+    The class is supposed to be instantiated by factory methods, which
+    should prepare the parameters listed below.
+
+    Parameters
+    ----------
+    n_eq, n_ineq : int
+        Number of equality and inequality constraints respectively.
+    fun : callable
+        Function defining the constraints. The signature is
+        ``fun(x) -> c_eq, c_ineq``, where ``c_eq`` is ndarray with `n_eq`
+        components and ``c_ineq`` is ndarray with `n_ineq` components.
+    jac : callable
+        Function to evaluate the Jacobian of the constraint. The signature
+        is ``jac(x) -> J_eq, J_ineq``, where ``J_eq`` and ``J_ineq`` are
+        either ndarray of csr_matrix of shapes (n_eq, n) and (n_ineq, n),
+        respectively.
+    hess : callable
+        Function to evaluate the Hessian of the constraints multiplied
+        by Lagrange multipliers, that is
+        ``dot(f_eq, v_eq) + dot(f_ineq, v_ineq)``. The signature is
+        ``hess(x, v_eq, v_ineq) -> H``, where ``H`` has an implied
+        shape (n, n) and provide a matrix-vector product operation
+        ``H.dot(p)``.
+    keep_feasible : ndarray, shape (n_ineq,)
+        Mask indicating which inequality constraints should be kept feasible.
+    """
+    def __init__(self, n_eq, n_ineq, fun, jac, hess, keep_feasible):
+        self.n_eq = n_eq
+        self.n_ineq = n_ineq
+        self.fun = fun
+        self.jac = jac
+        self.hess = hess
+        self.keep_feasible = keep_feasible
+
+    @classmethod
+    def from_PreparedConstraint(cls, constraint):
+        """Create an instance from `PreparedConstrained` object."""
+        lb, ub = constraint.bounds
+        cfun = constraint.fun
+        keep_feasible = constraint.keep_feasible
+
+        if np.all(lb == -np.inf) and np.all(ub == np.inf):
+            return cls.empty(cfun.n)
+
+        if np.all(lb == -np.inf) and np.all(ub == np.inf):
+            return cls.empty(cfun.n)
+        elif np.all(lb == ub):
+            return cls._equal_to_canonical(cfun, lb)
+        elif np.all(lb == -np.inf):
+            return cls._less_to_canonical(cfun, ub, keep_feasible)
+        elif np.all(ub == np.inf):
+            return cls._greater_to_canonical(cfun, lb, keep_feasible)
+        else:
+            return cls._interval_to_canonical(cfun, lb, ub, keep_feasible)
+
+    @classmethod
+    def empty(cls, n):
+        """Create an "empty" instance.
+
+        This "empty" instance is required to allow working with unconstrained
+        problems as if they have some constraints.
+        """
+        empty_fun = np.empty(0)
+        empty_jac = np.empty((0, n))
+        empty_hess = sps.csr_matrix((n, n))
+
+        def fun(x):
+            return empty_fun, empty_fun
+
+        def jac(x):
+            return empty_jac, empty_jac
+
+        def hess(x, v_eq, v_ineq):
+            return empty_hess
+
+        return cls(0, 0, fun, jac, hess, np.empty(0, dtype=np.bool_))
+
+    @classmethod
+    def concatenate(cls, canonical_constraints, sparse_jacobian):
+        """Concatenate multiple `CanonicalConstraint` into one.
+
+        `sparse_jacobian` (bool) determines the Jacobian format of the
+        concatenated constraint. Note that items in `canonical_constraints`
+        must have their Jacobians in the same format.
+        """
+        def fun(x):
+            if canonical_constraints:
+                eq_all, ineq_all = zip(
+                        *[c.fun(x) for c in canonical_constraints])
+            else:
+                eq_all, ineq_all = [], []
+
+            return np.hstack(eq_all), np.hstack(ineq_all)
+
+        if sparse_jacobian:
+            vstack = sps.vstack
+        else:
+            vstack = np.vstack
+
+        def jac(x):
+            if canonical_constraints:
+                eq_all, ineq_all = zip(
+                        *[c.jac(x) for c in canonical_constraints])
+            else:
+                eq_all, ineq_all = [], []
+
+            return vstack(eq_all), vstack(ineq_all)
+
+        def hess(x, v_eq, v_ineq):
+            hess_all = []
+            index_eq = 0
+            index_ineq = 0
+            for c in canonical_constraints:
+                vc_eq = v_eq[index_eq:index_eq + c.n_eq]
+                vc_ineq = v_ineq[index_ineq:index_ineq + c.n_ineq]
+                hess_all.append(c.hess(x, vc_eq, vc_ineq))
+                index_eq += c.n_eq
+                index_ineq += c.n_ineq
+
+            def matvec(p):
+                result = np.zeros_like(p, dtype=float)
+                for h in hess_all:
+                    result += h.dot(p)
+                return result
+
+            n = x.shape[0]
+            return sps.linalg.LinearOperator((n, n), matvec, dtype=float)
+
+        n_eq = sum(c.n_eq for c in canonical_constraints)
+        n_ineq = sum(c.n_ineq for c in canonical_constraints)
+        keep_feasible = np.hstack([c.keep_feasible for c in
+                                   canonical_constraints])
+
+        return cls(n_eq, n_ineq, fun, jac, hess, keep_feasible)
+
+    @classmethod
+    def _equal_to_canonical(cls, cfun, value):
+        empty_fun = np.empty(0)
+        n = cfun.n
+
+        n_eq = value.shape[0]
+        n_ineq = 0
+        keep_feasible = np.empty(0, dtype=bool)
+
+        if cfun.sparse_jacobian:
+            empty_jac = sps.csr_matrix((0, n))
+        else:
+            empty_jac = np.empty((0, n))
+
+        def fun(x):
+            return cfun.fun(x) - value, empty_fun
+
+        def jac(x):
+            return cfun.jac(x), empty_jac
+
+        def hess(x, v_eq, v_ineq):
+            return cfun.hess(x, v_eq)
+
+        empty_fun = np.empty(0)
+        n = cfun.n
+        if cfun.sparse_jacobian:
+            empty_jac = sps.csr_matrix((0, n))
+        else:
+            empty_jac = np.empty((0, n))
+
+        return cls(n_eq, n_ineq, fun, jac, hess, keep_feasible)
+
+    @classmethod
+    def _less_to_canonical(cls, cfun, ub, keep_feasible):
+        empty_fun = np.empty(0)
+        n = cfun.n
+        if cfun.sparse_jacobian:
+            empty_jac = sps.csr_matrix((0, n))
+        else:
+            empty_jac = np.empty((0, n))
+
+        finite_ub = ub < np.inf
+        n_eq = 0
+        n_ineq = np.sum(finite_ub)
+
+        if np.all(finite_ub):
+            def fun(x):
+                return empty_fun, cfun.fun(x) - ub
+
+            def jac(x):
+                return empty_jac, cfun.jac(x)
+
+            def hess(x, v_eq, v_ineq):
+                return cfun.hess(x, v_ineq)
+        else:
+            finite_ub = np.nonzero(finite_ub)[0]
+            keep_feasible = keep_feasible[finite_ub]
+            ub = ub[finite_ub]
+
+            def fun(x):
+                return empty_fun, cfun.fun(x)[finite_ub] - ub
+
+            def jac(x):
+                return empty_jac, cfun.jac(x)[finite_ub]
+
+            def hess(x, v_eq, v_ineq):
+                v = np.zeros(cfun.m)
+                v[finite_ub] = v_ineq
+                return cfun.hess(x, v)
+
+        return cls(n_eq, n_ineq, fun, jac, hess, keep_feasible)
+
+    @classmethod
+    def _greater_to_canonical(cls, cfun, lb, keep_feasible):
+        empty_fun = np.empty(0)
+        n = cfun.n
+        if cfun.sparse_jacobian:
+            empty_jac = sps.csr_matrix((0, n))
+        else:
+            empty_jac = np.empty((0, n))
+
+        finite_lb = lb > -np.inf
+        n_eq = 0
+        n_ineq = np.sum(finite_lb)
+
+        if np.all(finite_lb):
+            def fun(x):
+                return empty_fun, lb - cfun.fun(x)
+
+            def jac(x):
+                return empty_jac, -cfun.jac(x)
+
+            def hess(x, v_eq, v_ineq):
+                return cfun.hess(x, -v_ineq)
+        else:
+            finite_lb = np.nonzero(finite_lb)[0]
+            keep_feasible = keep_feasible[finite_lb]
+            lb = lb[finite_lb]
+
+            def fun(x):
+                return empty_fun, lb - cfun.fun(x)[finite_lb]
+
+            def jac(x):
+                return empty_jac, -cfun.jac(x)[finite_lb]
+
+            def hess(x, v_eq, v_ineq):
+                v = np.zeros(cfun.m)
+                v[finite_lb] = -v_ineq
+                return cfun.hess(x, v)
+
+        return cls(n_eq, n_ineq, fun, jac, hess, keep_feasible)
+
+    @classmethod
+    def _interval_to_canonical(cls, cfun, lb, ub, keep_feasible):
+        lb_inf = lb == -np.inf
+        ub_inf = ub == np.inf
+        equal = lb == ub
+        less = lb_inf & ~ub_inf
+        greater = ub_inf & ~lb_inf
+        interval = ~equal & ~lb_inf & ~ub_inf
+
+        equal = np.nonzero(equal)[0]
+        less = np.nonzero(less)[0]
+        greater = np.nonzero(greater)[0]
+        interval = np.nonzero(interval)[0]
+        n_less = less.shape[0]
+        n_greater = greater.shape[0]
+        n_interval = interval.shape[0]
+        n_ineq = n_less + n_greater + 2 * n_interval
+        n_eq = equal.shape[0]
+
+        keep_feasible = np.hstack((keep_feasible[less],
+                                   keep_feasible[greater],
+                                   keep_feasible[interval],
+                                   keep_feasible[interval]))
+
+        def fun(x):
+            f = cfun.fun(x)
+            eq = f[equal] - lb[equal]
+            le = f[less] - ub[less]
+            ge = lb[greater] - f[greater]
+            il = f[interval] - ub[interval]
+            ig = lb[interval] - f[interval]
+            return eq, np.hstack((le, ge, il, ig))
+
+        def jac(x):
+            J = cfun.jac(x)
+            eq = J[equal]
+            le = J[less]
+            ge = -J[greater]
+            il = J[interval]
+            ig = -il
+            if sps.issparse(J):
+                ineq = sps.vstack((le, ge, il, ig))
+            else:
+                ineq = np.vstack((le, ge, il, ig))
+            return eq, ineq
+
+        def hess(x, v_eq, v_ineq):
+            n_start = 0
+            v_l = v_ineq[n_start:n_start + n_less]
+            n_start += n_less
+            v_g = v_ineq[n_start:n_start + n_greater]
+            n_start += n_greater
+            v_il = v_ineq[n_start:n_start + n_interval]
+            n_start += n_interval
+            v_ig = v_ineq[n_start:n_start + n_interval]
+
+            v = np.zeros_like(lb)
+            v[equal] = v_eq
+            v[less] = v_l
+            v[greater] = -v_g
+            v[interval] = v_il - v_ig
+
+            return cfun.hess(x, v)
+
+        return cls(n_eq, n_ineq, fun, jac, hess, keep_feasible)
+
+
+def initial_constraints_as_canonical(n, prepared_constraints, sparse_jacobian):
+    """Convert initial values of the constraints to the canonical format.
+
+    The purpose to avoid one additional call to the constraints at the initial
+    point. It takes saved values in `PreparedConstraint`, modifies and
+    concatenates them to the canonical constraint format.
+    """
+    c_eq = []
+    c_ineq = []
+    J_eq = []
+    J_ineq = []
+
+    for c in prepared_constraints:
+        f = c.fun.f
+        J = c.fun.J
+        lb, ub = c.bounds
+        if np.all(lb == ub):
+            c_eq.append(f - lb)
+            J_eq.append(J)
+        elif np.all(lb == -np.inf):
+            finite_ub = ub < np.inf
+            c_ineq.append(f[finite_ub] - ub[finite_ub])
+            J_ineq.append(J[finite_ub])
+        elif np.all(ub == np.inf):
+            finite_lb = lb > -np.inf
+            c_ineq.append(lb[finite_lb] - f[finite_lb])
+            J_ineq.append(-J[finite_lb])
+        else:
+            lb_inf = lb == -np.inf
+            ub_inf = ub == np.inf
+            equal = lb == ub
+            less = lb_inf & ~ub_inf
+            greater = ub_inf & ~lb_inf
+            interval = ~equal & ~lb_inf & ~ub_inf
+
+            c_eq.append(f[equal] - lb[equal])
+            c_ineq.append(f[less] - ub[less])
+            c_ineq.append(lb[greater] - f[greater])
+            c_ineq.append(f[interval] - ub[interval])
+            c_ineq.append(lb[interval] - f[interval])
+
+            J_eq.append(J[equal])
+            J_ineq.append(J[less])
+            J_ineq.append(-J[greater])
+            J_ineq.append(J[interval])
+            J_ineq.append(-J[interval])
+
+    c_eq = np.hstack(c_eq) if c_eq else np.empty(0)
+    c_ineq = np.hstack(c_ineq) if c_ineq else np.empty(0)
+
+    if sparse_jacobian:
+        vstack = sps.vstack
+        empty = sps.csr_matrix((0, n))
+    else:
+        vstack = np.vstack
+        empty = np.empty((0, n))
+
+    J_eq = vstack(J_eq) if J_eq else empty
+    J_ineq = vstack(J_ineq) if J_ineq else empty
+
+    return c_eq, c_ineq, J_eq, J_ineq
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/equality_constrained_sqp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/equality_constrained_sqp.py
new file mode 100644
index 0000000000000000000000000000000000000000..88a9f8deb1abfaa82533eeb6308bbfbd5516ed4d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/equality_constrained_sqp.py
@@ -0,0 +1,231 @@
+"""Byrd-Omojokun Trust-Region SQP method."""
+
+from scipy.sparse import eye as speye
+from .projections import projections
+from .qp_subproblem import modified_dogleg, projected_cg, box_intersections
+import numpy as np
+from numpy.linalg import norm
+
+__all__ = ['equality_constrained_sqp']
+
+
+def default_scaling(x):
+    n, = np.shape(x)
+    return speye(n)
+
+
+def equality_constrained_sqp(fun_and_constr, grad_and_jac, lagr_hess,
+                             x0, fun0, grad0, constr0,
+                             jac0, stop_criteria,
+                             state,
+                             initial_penalty,
+                             initial_trust_radius,
+                             factorization_method,
+                             trust_lb=None,
+                             trust_ub=None,
+                             scaling=default_scaling):
+    """Solve nonlinear equality-constrained problem using trust-region SQP.
+
+    Solve optimization problem:
+
+        minimize fun(x)
+        subject to: constr(x) = 0
+
+    using Byrd-Omojokun Trust-Region SQP method described in [1]_. Several
+    implementation details are based on [2]_ and [3]_, p. 549.
+
+    References
+    ----------
+    .. [1] Lalee, Marucha, Jorge Nocedal, and Todd Plantenga. "On the
+           implementation of an algorithm for large-scale equality
+           constrained optimization." SIAM Journal on
+           Optimization 8.3 (1998): 682-706.
+    .. [2] Byrd, Richard H., Mary E. Hribar, and Jorge Nocedal.
+           "An interior point algorithm for large-scale nonlinear
+           programming." SIAM Journal on Optimization 9.4 (1999): 877-900.
+    .. [3] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+           Second Edition (2006).
+    """
+    PENALTY_FACTOR = 0.3  # Rho from formula (3.51), reference [2]_, p.891.
+    LARGE_REDUCTION_RATIO = 0.9
+    INTERMEDIARY_REDUCTION_RATIO = 0.3
+    SUFFICIENT_REDUCTION_RATIO = 1e-8  # Eta from reference [2]_, p.892.
+    TRUST_ENLARGEMENT_FACTOR_L = 7.0
+    TRUST_ENLARGEMENT_FACTOR_S = 2.0
+    MAX_TRUST_REDUCTION = 0.5
+    MIN_TRUST_REDUCTION = 0.1
+    SOC_THRESHOLD = 0.1
+    TR_FACTOR = 0.8  # Zeta from formula (3.21), reference [2]_, p.885.
+    BOX_FACTOR = 0.5
+
+    n, = np.shape(x0)  # Number of parameters
+
+    # Set default lower and upper bounds.
+    if trust_lb is None:
+        trust_lb = np.full(n, -np.inf)
+    if trust_ub is None:
+        trust_ub = np.full(n, np.inf)
+
+    # Initial values
+    x = np.copy(x0)
+    trust_radius = initial_trust_radius
+    penalty = initial_penalty
+    # Compute Values
+    f = fun0
+    c = grad0
+    b = constr0
+    A = jac0
+    S = scaling(x)
+    # Get projections
+    try:
+        Z, LS, Y = projections(A, factorization_method)
+    except ValueError as e:
+        if str(e) == "expected square matrix":
+            # can be the case if there are more equality
+            # constraints than independent variables
+            raise ValueError(
+                "The 'expected square matrix' error can occur if there are"
+                " more equality constraints than independent variables."
+                " Consider how your constraints are set up, or use"
+                " factorization_method='SVDFactorization'."
+            ) from e
+        else:
+            raise e
+
+    # Compute least-square lagrange multipliers
+    v = -LS.dot(c)
+    # Compute Hessian
+    H = lagr_hess(x, v)
+
+    # Update state parameters
+    optimality = norm(c + A.T.dot(v), np.inf)
+    constr_violation = norm(b, np.inf) if len(b) > 0 else 0
+    cg_info = {'niter': 0, 'stop_cond': 0,
+               'hits_boundary': False}
+
+    last_iteration_failed = False
+    while not stop_criteria(state, x, last_iteration_failed,
+                            optimality, constr_violation,
+                            trust_radius, penalty, cg_info):
+        # Normal Step - `dn`
+        # minimize 1/2*||A dn + b||^2
+        # subject to:
+        # ||dn|| <= TR_FACTOR * trust_radius
+        # BOX_FACTOR * lb <= dn <= BOX_FACTOR * ub.
+        dn = modified_dogleg(A, Y, b,
+                             TR_FACTOR*trust_radius,
+                             BOX_FACTOR*trust_lb,
+                             BOX_FACTOR*trust_ub)
+
+        # Tangential Step - `dt`
+        # Solve the QP problem:
+        # minimize 1/2 dt.T H dt + dt.T (H dn + c)
+        # subject to:
+        # A dt = 0
+        # ||dt|| <= sqrt(trust_radius**2 - ||dn||**2)
+        # lb - dn <= dt <= ub - dn
+        c_t = H.dot(dn) + c
+        b_t = np.zeros_like(b)
+        trust_radius_t = np.sqrt(trust_radius**2 - np.linalg.norm(dn)**2)
+        lb_t = trust_lb - dn
+        ub_t = trust_ub - dn
+        dt, cg_info = projected_cg(H, c_t, Z, Y, b_t,
+                                   trust_radius_t,
+                                   lb_t, ub_t)
+
+        # Compute update (normal + tangential steps).
+        d = dn + dt
+
+        # Compute second order model: 1/2 d H d + c.T d + f.
+        quadratic_model = 1/2*(H.dot(d)).dot(d) + c.T.dot(d)
+        # Compute linearized constraint: l = A d + b.
+        linearized_constr = A.dot(d)+b
+        # Compute new penalty parameter according to formula (3.52),
+        # reference [2]_, p.891.
+        vpred = norm(b) - norm(linearized_constr)
+        # Guarantee `vpred` always positive,
+        # regardless of roundoff errors.
+        vpred = max(1e-16, vpred)
+        previous_penalty = penalty
+        if quadratic_model > 0:
+            new_penalty = quadratic_model / ((1-PENALTY_FACTOR)*vpred)
+            penalty = max(penalty, new_penalty)
+        # Compute predicted reduction according to formula (3.52),
+        # reference [2]_, p.891.
+        predicted_reduction = -quadratic_model + penalty*vpred
+
+        # Compute merit function at current point
+        merit_function = f + penalty*norm(b)
+        # Evaluate function and constraints at trial point
+        x_next = x + S.dot(d)
+        f_next, b_next = fun_and_constr(x_next)
+        # Compute merit function at trial point
+        merit_function_next = f_next + penalty*norm(b_next)
+        # Compute actual reduction according to formula (3.54),
+        # reference [2]_, p.892.
+        actual_reduction = merit_function - merit_function_next
+        # Compute reduction ratio
+        reduction_ratio = actual_reduction / predicted_reduction
+
+        # Second order correction (SOC), reference [2]_, p.892.
+        if reduction_ratio < SUFFICIENT_REDUCTION_RATIO and \
+           norm(dn) <= SOC_THRESHOLD * norm(dt):
+            # Compute second order correction
+            y = -Y.dot(b_next)
+            # Make sure increment is inside box constraints
+            _, t, intersect = box_intersections(d, y, trust_lb, trust_ub)
+            # Compute tentative point
+            x_soc = x + S.dot(d + t*y)
+            f_soc, b_soc = fun_and_constr(x_soc)
+            # Recompute actual reduction
+            merit_function_soc = f_soc + penalty*norm(b_soc)
+            actual_reduction_soc = merit_function - merit_function_soc
+            # Recompute reduction ratio
+            reduction_ratio_soc = actual_reduction_soc / predicted_reduction
+            if intersect and reduction_ratio_soc >= SUFFICIENT_REDUCTION_RATIO:
+                x_next = x_soc
+                f_next = f_soc
+                b_next = b_soc
+                reduction_ratio = reduction_ratio_soc
+
+        # Readjust trust region step, formula (3.55), reference [2]_, p.892.
+        if reduction_ratio >= LARGE_REDUCTION_RATIO:
+            trust_radius = max(TRUST_ENLARGEMENT_FACTOR_L * norm(d),
+                               trust_radius)
+        elif reduction_ratio >= INTERMEDIARY_REDUCTION_RATIO:
+            trust_radius = max(TRUST_ENLARGEMENT_FACTOR_S * norm(d),
+                               trust_radius)
+        # Reduce trust region step, according to reference [3]_, p.696.
+        elif reduction_ratio < SUFFICIENT_REDUCTION_RATIO:
+            trust_reduction = ((1-SUFFICIENT_REDUCTION_RATIO) /
+                               (1-reduction_ratio))
+            new_trust_radius = trust_reduction * norm(d)
+            if new_trust_radius >= MAX_TRUST_REDUCTION * trust_radius:
+                trust_radius *= MAX_TRUST_REDUCTION
+            elif new_trust_radius >= MIN_TRUST_REDUCTION * trust_radius:
+                trust_radius = new_trust_radius
+            else:
+                trust_radius *= MIN_TRUST_REDUCTION
+
+        # Update iteration
+        if reduction_ratio >= SUFFICIENT_REDUCTION_RATIO:
+            x = x_next
+            f, b = f_next, b_next
+            c, A = grad_and_jac(x)
+            S = scaling(x)
+            # Get projections
+            Z, LS, Y = projections(A, factorization_method)
+            # Compute least-square lagrange multipliers
+            v = -LS.dot(c)
+            # Compute Hessian
+            H = lagr_hess(x, v)
+            # Set Flag
+            last_iteration_failed = False
+            # Optimality values
+            optimality = norm(c + A.T.dot(v), np.inf)
+            constr_violation = norm(b, np.inf) if len(b) > 0 else 0
+        else:
+            penalty = previous_penalty
+            last_iteration_failed = True
+
+    return x, state
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py
new file mode 100644
index 0000000000000000000000000000000000000000..580f9ccf8eab9f22d73ae41f130b2e5e541a71da
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py
@@ -0,0 +1,576 @@
+import time
+import numpy as np
+from scipy.sparse.linalg import LinearOperator
+from .._differentiable_functions import VectorFunction
+from .._constraints import (
+    NonlinearConstraint, LinearConstraint, PreparedConstraint, Bounds, strict_bounds)
+from .._hessian_update_strategy import BFGS
+from .._optimize import OptimizeResult
+from .._differentiable_functions import ScalarFunction
+from .equality_constrained_sqp import equality_constrained_sqp
+from .canonical_constraint import (CanonicalConstraint,
+                                   initial_constraints_as_canonical)
+from .tr_interior_point import tr_interior_point
+from .report import BasicReport, SQPReport, IPReport
+
+
+TERMINATION_MESSAGES = {
+    0: "The maximum number of function evaluations is exceeded.",
+    1: "`gtol` termination condition is satisfied.",
+    2: "`xtol` termination condition is satisfied.",
+    3: "`callback` function requested termination.",
+    4: "Constraint violation exceeds 'gtol'"
+}
+
+
+class HessianLinearOperator:
+    """Build LinearOperator from hessp"""
+    def __init__(self, hessp, n):
+        self.hessp = hessp
+        self.n = n
+
+    def __call__(self, x, *args):
+        def matvec(p):
+            return self.hessp(x, p, *args)
+
+        return LinearOperator((self.n, self.n), matvec=matvec)
+
+
+class LagrangianHessian:
+    """The Hessian of the Lagrangian as LinearOperator.
+
+    The Lagrangian is computed as the objective function plus all the
+    constraints multiplied with some numbers (Lagrange multipliers).
+    """
+    def __init__(self, n, objective_hess, constraints_hess):
+        self.n = n
+        self.objective_hess = objective_hess
+        self.constraints_hess = constraints_hess
+
+    def __call__(self, x, v_eq, v_ineq=None):
+        if v_ineq is None:
+            v_ineq = np.empty(0)
+        H_objective = self.objective_hess(x)
+        H_constraints = self.constraints_hess(x, v_eq, v_ineq)
+
+        def matvec(p):
+            return H_objective.dot(p) + H_constraints.dot(p)
+
+        return LinearOperator((self.n, self.n), matvec)
+
+
+def update_state_sqp(state, x, last_iteration_failed, objective, prepared_constraints,
+                     start_time, tr_radius, constr_penalty, cg_info):
+    state.nit += 1
+    state.nfev = objective.nfev
+    state.njev = objective.ngev
+    state.nhev = objective.nhev
+    state.constr_nfev = [c.fun.nfev if isinstance(c.fun, VectorFunction) else 0
+                         for c in prepared_constraints]
+    state.constr_njev = [c.fun.njev if isinstance(c.fun, VectorFunction) else 0
+                         for c in prepared_constraints]
+    state.constr_nhev = [c.fun.nhev if isinstance(c.fun, VectorFunction) else 0
+                         for c in prepared_constraints]
+
+    if not last_iteration_failed:
+        state.x = x
+        state.fun = objective.f
+        state.grad = objective.g
+        state.v = [c.fun.v for c in prepared_constraints]
+        state.constr = [c.fun.f for c in prepared_constraints]
+        state.jac = [c.fun.J for c in prepared_constraints]
+        # Compute Lagrangian Gradient
+        state.lagrangian_grad = np.copy(state.grad)
+        for c in prepared_constraints:
+            state.lagrangian_grad += c.fun.J.T.dot(c.fun.v)
+        state.optimality = np.linalg.norm(state.lagrangian_grad, np.inf)
+        # Compute maximum constraint violation
+        state.constr_violation = 0
+        for i in range(len(prepared_constraints)):
+            lb, ub = prepared_constraints[i].bounds
+            c = state.constr[i]
+            state.constr_violation = np.max([state.constr_violation,
+                                             np.max(lb - c),
+                                             np.max(c - ub)])
+
+    state.execution_time = time.time() - start_time
+    state.tr_radius = tr_radius
+    state.constr_penalty = constr_penalty
+    state.cg_niter += cg_info["niter"]
+    state.cg_stop_cond = cg_info["stop_cond"]
+
+    return state
+
+
+def update_state_ip(state, x, last_iteration_failed, objective,
+                    prepared_constraints, start_time,
+                    tr_radius, constr_penalty, cg_info,
+                    barrier_parameter, barrier_tolerance):
+    state = update_state_sqp(state, x, last_iteration_failed, objective,
+                             prepared_constraints, start_time, tr_radius,
+                             constr_penalty, cg_info)
+    state.barrier_parameter = barrier_parameter
+    state.barrier_tolerance = barrier_tolerance
+    return state
+
+
+def _minimize_trustregion_constr(fun, x0, args, grad,
+                                 hess, hessp, bounds, constraints,
+                                 xtol=1e-8, gtol=1e-8,
+                                 barrier_tol=1e-8,
+                                 sparse_jacobian=None,
+                                 callback=None, maxiter=1000,
+                                 verbose=0, finite_diff_rel_step=None,
+                                 initial_constr_penalty=1.0, initial_tr_radius=1.0,
+                                 initial_barrier_parameter=0.1,
+                                 initial_barrier_tolerance=0.1,
+                                 factorization_method=None,
+                                 disp=False):
+    """Minimize a scalar function subject to constraints.
+
+    Parameters
+    ----------
+    gtol : float, optional
+        Tolerance for termination by the norm of the Lagrangian gradient.
+        The algorithm will terminate when both the infinity norm (i.e., max
+        abs value) of the Lagrangian gradient and the constraint violation
+        are smaller than ``gtol``. Default is 1e-8.
+    xtol : float, optional
+        Tolerance for termination by the change of the independent variable.
+        The algorithm will terminate when ``tr_radius < xtol``, where
+        ``tr_radius`` is the radius of the trust region used in the algorithm.
+        Default is 1e-8.
+    barrier_tol : float, optional
+        Threshold on the barrier parameter for the algorithm termination.
+        When inequality constraints are present, the algorithm will terminate
+        only when the barrier parameter is less than `barrier_tol`.
+        Default is 1e-8.
+    sparse_jacobian : {bool, None}, optional
+        Determines how to represent Jacobians of the constraints. If bool,
+        then Jacobians of all the constraints will be converted to the
+        corresponding format. If None (default), then Jacobians won't be
+        converted, but the algorithm can proceed only if they all have the
+        same format.
+    initial_tr_radius: float, optional
+        Initial trust radius. The trust radius gives the maximum distance
+        between solution points in consecutive iterations. It reflects the
+        trust the algorithm puts in the local approximation of the optimization
+        problem. For an accurate local approximation the trust-region should be
+        large and for an  approximation valid only close to the current point it
+        should be a small one. The trust radius is automatically updated throughout
+        the optimization process, with ``initial_tr_radius`` being its initial value.
+        Default is 1 (recommended in [1]_, p. 19).
+    initial_constr_penalty : float, optional
+        Initial constraints penalty parameter. The penalty parameter is used for
+        balancing the requirements of decreasing the objective function
+        and satisfying the constraints. It is used for defining the merit function:
+        ``merit_function(x) = fun(x) + constr_penalty * constr_norm_l2(x)``,
+        where ``constr_norm_l2(x)`` is the l2 norm of a vector containing all
+        the constraints. The merit function is used for accepting or rejecting
+        trial points and ``constr_penalty`` weights the two conflicting goals
+        of reducing objective function and constraints. The penalty is automatically
+        updated throughout the optimization  process, with
+        ``initial_constr_penalty`` being its  initial value. Default is 1
+        (recommended in [1]_, p 19).
+    initial_barrier_parameter, initial_barrier_tolerance: float, optional
+        Initial barrier parameter and initial tolerance for the barrier subproblem.
+        Both are used only when inequality constraints are present. For dealing with
+        optimization problems ``min_x f(x)`` subject to inequality constraints
+        ``c(x) <= 0`` the algorithm introduces slack variables, solving the problem
+        ``min_(x,s) f(x) + barrier_parameter*sum(ln(s))`` subject to the equality
+        constraints  ``c(x) + s = 0`` instead of the original problem. This subproblem
+        is solved for decreasing values of ``barrier_parameter`` and with decreasing
+        tolerances for the termination, starting with ``initial_barrier_parameter``
+        for the barrier parameter and ``initial_barrier_tolerance`` for the
+        barrier tolerance. Default is 0.1 for both values (recommended in [1]_ p. 19).
+        Also note that ``barrier_parameter`` and ``barrier_tolerance`` are updated
+        with the same prefactor.
+    factorization_method : string or None, optional
+        Method to factorize the Jacobian of the constraints. Use None (default)
+        for the auto selection or one of:
+
+        - 'NormalEquation' (requires scikit-sparse)
+        - 'AugmentedSystem'
+        - 'QRFactorization'
+        - 'SVDFactorization'
+
+        The methods 'NormalEquation' and 'AugmentedSystem' can be used only
+        with sparse constraints. The projections required by the algorithm
+        will be computed using, respectively, the normal equation  and the
+        augmented system approaches explained in [1]_. 'NormalEquation'
+        computes the Cholesky factorization of ``A A.T`` and 'AugmentedSystem'
+        performs the LU factorization of an augmented system. They usually
+        provide similar results. 'AugmentedSystem' is used by default for
+        sparse matrices.
+
+        The methods 'QRFactorization' and 'SVDFactorization' can be used
+        only with dense constraints. They compute the required projections
+        using, respectively, QR and SVD factorizations. The 'SVDFactorization'
+        method can cope with Jacobian matrices with deficient row rank and will
+        be used whenever other factorization methods fail (which may imply the
+        conversion of sparse matrices to a dense format when required).
+        By default, 'QRFactorization' is used for dense matrices.
+    finite_diff_rel_step : None or array_like, optional
+        Relative step size for the finite difference approximation.
+    maxiter : int, optional
+        Maximum number of algorithm iterations. Default is 1000.
+    verbose : {0, 1, 2, 3}, optional
+        Level of algorithm's verbosity:
+
+        * 0 (default) : work silently.
+        * 1 : display a termination report.
+        * 2 : display progress during iterations.
+        * 3 : display progress during iterations (more complete report).
+
+    disp : bool, optional
+        If True (default), then `verbose` will be set to 1 if it was 0.
+
+    Returns
+    -------
+    `OptimizeResult` with the fields documented below. Note the following:
+
+        1. All values corresponding to the constraints are ordered as they
+           were passed to the solver. And values corresponding to `bounds`
+           constraints are put *after* other constraints.
+        2. All numbers of function, Jacobian or Hessian evaluations correspond
+           to numbers of actual Python function calls. It means, for example,
+           that if a Jacobian is estimated by finite differences, then the
+           number of Jacobian evaluations will be zero and the number of
+           function evaluations will be incremented by all calls during the
+           finite difference estimation.
+
+    x : ndarray, shape (n,)
+        Solution found.
+    optimality : float
+        Infinity norm of the Lagrangian gradient at the solution.
+    constr_violation : float
+        Maximum constraint violation at the solution.
+    fun : float
+        Objective function at the solution.
+    grad : ndarray, shape (n,)
+        Gradient of the objective function at the solution.
+    lagrangian_grad : ndarray, shape (n,)
+        Gradient of the Lagrangian function at the solution.
+    nit : int
+        Total number of iterations.
+    nfev : integer
+        Number of the objective function evaluations.
+    njev : integer
+        Number of the objective function gradient evaluations.
+    nhev : integer
+        Number of the objective function Hessian evaluations.
+    cg_niter : int
+        Total number of the conjugate gradient method iterations.
+    method : {'equality_constrained_sqp', 'tr_interior_point'}
+        Optimization method used.
+    constr : list of ndarray
+        List of constraint values at the solution.
+    jac : list of {ndarray, sparse matrix}
+        List of the Jacobian matrices of the constraints at the solution.
+    v : list of ndarray
+        List of the Lagrange multipliers for the constraints at the solution.
+        For an inequality constraint a positive multiplier means that the upper
+        bound is active, a negative multiplier means that the lower bound is
+        active and if a multiplier is zero it means the constraint is not
+        active.
+    constr_nfev : list of int
+        Number of constraint evaluations for each of the constraints.
+    constr_njev : list of int
+        Number of Jacobian matrix evaluations for each of the constraints.
+    constr_nhev : list of int
+        Number of Hessian evaluations for each of the constraints.
+    tr_radius : float
+        Radius of the trust region at the last iteration.
+    constr_penalty : float
+        Penalty parameter at the last iteration, see `initial_constr_penalty`.
+    barrier_tolerance : float
+        Tolerance for the barrier subproblem at the last iteration.
+        Only for problems with inequality constraints.
+    barrier_parameter : float
+        Barrier parameter at the last iteration. Only for problems
+        with inequality constraints.
+    execution_time : float
+        Total execution time.
+    message : str
+        Termination message.
+    status : {0, 1, 2, 3, 4}
+        Termination status:
+
+        * 0 : The maximum number of function evaluations is exceeded.
+        * 1 : `gtol` termination condition is satisfied.
+        * 2 : `xtol` termination condition is satisfied.
+        * 3 : `callback` function requested termination.
+        * 4 : Constraint violation exceeds 'gtol'.
+
+        .. versionchanged:: 1.15.0
+            If the constraint violation exceeds `gtol`, then ``result.success``
+            will now be False.
+
+    cg_stop_cond : int
+        Reason for CG subproblem termination at the last iteration:
+
+        * 0 : CG subproblem not evaluated.
+        * 1 : Iteration limit was reached.
+        * 2 : Reached the trust-region boundary.
+        * 3 : Negative curvature detected.
+        * 4 : Tolerance was satisfied.
+
+    References
+    ----------
+    .. [1] Conn, A. R., Gould, N. I., & Toint, P. L.
+           Trust region methods. 2000. Siam. pp. 19.
+    """
+    x0 = np.atleast_1d(x0).astype(float)
+    n_vars = np.size(x0)
+    if hess is None:
+        if callable(hessp):
+            hess = HessianLinearOperator(hessp, n_vars)
+        else:
+            hess = BFGS()
+    if disp and verbose == 0:
+        verbose = 1
+
+    if bounds is not None:
+        modified_lb = np.nextafter(bounds.lb, -np.inf, where=bounds.lb > -np.inf)
+        modified_ub = np.nextafter(bounds.ub, np.inf, where=bounds.ub < np.inf)
+        modified_lb = np.where(np.isfinite(bounds.lb), modified_lb, bounds.lb)
+        modified_ub = np.where(np.isfinite(bounds.ub), modified_ub, bounds.ub)
+        bounds = Bounds(modified_lb, modified_ub, keep_feasible=bounds.keep_feasible)
+        finite_diff_bounds = strict_bounds(bounds.lb, bounds.ub,
+                                           bounds.keep_feasible, n_vars)
+    else:
+        finite_diff_bounds = (-np.inf, np.inf)
+
+    # Define Objective Function
+    objective = ScalarFunction(fun, x0, args, grad, hess,
+                               finite_diff_rel_step, finite_diff_bounds)
+
+    # Put constraints in list format when needed.
+    if isinstance(constraints, (NonlinearConstraint | LinearConstraint)):
+        constraints = [constraints]
+
+    # Prepare constraints.
+    prepared_constraints = [
+        PreparedConstraint(c, x0, sparse_jacobian, finite_diff_bounds)
+        for c in constraints]
+
+    # Check that all constraints are either sparse or dense.
+    n_sparse = sum(c.fun.sparse_jacobian for c in prepared_constraints)
+    if 0 < n_sparse < len(prepared_constraints):
+        raise ValueError("All constraints must have the same kind of the "
+                         "Jacobian --- either all sparse or all dense. "
+                         "You can set the sparsity globally by setting "
+                         "`sparse_jacobian` to either True of False.")
+    if prepared_constraints:
+        sparse_jacobian = n_sparse > 0
+
+    if bounds is not None:
+        if sparse_jacobian is None:
+            sparse_jacobian = True
+        prepared_constraints.append(PreparedConstraint(bounds, x0,
+                                                       sparse_jacobian))
+
+    # Concatenate initial constraints to the canonical form.
+    c_eq0, c_ineq0, J_eq0, J_ineq0 = initial_constraints_as_canonical(
+        n_vars, prepared_constraints, sparse_jacobian)
+
+    # Prepare all canonical constraints and concatenate it into one.
+    canonical_all = [CanonicalConstraint.from_PreparedConstraint(c)
+                     for c in prepared_constraints]
+
+    if len(canonical_all) == 0:
+        canonical = CanonicalConstraint.empty(n_vars)
+    elif len(canonical_all) == 1:
+        canonical = canonical_all[0]
+    else:
+        canonical = CanonicalConstraint.concatenate(canonical_all,
+                                                    sparse_jacobian)
+
+    # Generate the Hessian of the Lagrangian.
+    lagrangian_hess = LagrangianHessian(n_vars, objective.hess, canonical.hess)
+
+    # Choose appropriate method
+    if canonical.n_ineq == 0:
+        method = 'equality_constrained_sqp'
+    else:
+        method = 'tr_interior_point'
+
+    # Construct OptimizeResult
+    state = OptimizeResult(
+        nit=0, nfev=0, njev=0, nhev=0,
+        cg_niter=0, cg_stop_cond=0,
+        fun=objective.f, grad=objective.g,
+        lagrangian_grad=np.copy(objective.g),
+        constr=[c.fun.f for c in prepared_constraints],
+        jac=[c.fun.J for c in prepared_constraints],
+        constr_nfev=[0 for c in prepared_constraints],
+        constr_njev=[0 for c in prepared_constraints],
+        constr_nhev=[0 for c in prepared_constraints],
+        v=[c.fun.v for c in prepared_constraints],
+        method=method)
+
+    # Start counting
+    start_time = time.time()
+
+    # Define stop criteria
+    if method == 'equality_constrained_sqp':
+        def stop_criteria(state, x, last_iteration_failed,
+                          optimality, constr_violation,
+                          tr_radius, constr_penalty, cg_info):
+            state = update_state_sqp(state, x, last_iteration_failed,
+                                     objective, prepared_constraints,
+                                     start_time, tr_radius, constr_penalty,
+                                     cg_info)
+            if verbose == 2:
+                BasicReport.print_iteration(state.nit,
+                                            state.nfev,
+                                            state.cg_niter,
+                                            state.fun,
+                                            state.tr_radius,
+                                            state.optimality,
+                                            state.constr_violation)
+            elif verbose > 2:
+                SQPReport.print_iteration(state.nit,
+                                          state.nfev,
+                                          state.cg_niter,
+                                          state.fun,
+                                          state.tr_radius,
+                                          state.optimality,
+                                          state.constr_violation,
+                                          state.constr_penalty,
+                                          state.cg_stop_cond)
+            state.status = None
+            state.niter = state.nit  # Alias for callback (backward-compatibility)
+            if callback is not None:
+                callback_stop = False
+                try:
+                    callback_stop = callback(state)
+                except StopIteration:
+                    callback_stop = True
+                if callback_stop:
+                    state.status = 3
+                    return True
+            if state.optimality < gtol and state.constr_violation < gtol:
+                state.status = 1
+            elif state.tr_radius < xtol:
+                state.status = 2
+            elif state.nit >= maxiter:
+                state.status = 0
+            return state.status in (0, 1, 2, 3)
+    elif method == 'tr_interior_point':
+        def stop_criteria(state, x, last_iteration_failed, tr_radius,
+                          constr_penalty, cg_info, barrier_parameter,
+                          barrier_tolerance):
+            state = update_state_ip(state, x, last_iteration_failed,
+                                    objective, prepared_constraints,
+                                    start_time, tr_radius, constr_penalty,
+                                    cg_info, barrier_parameter, barrier_tolerance)
+            if verbose == 2:
+                BasicReport.print_iteration(state.nit,
+                                            state.nfev,
+                                            state.cg_niter,
+                                            state.fun,
+                                            state.tr_radius,
+                                            state.optimality,
+                                            state.constr_violation)
+            elif verbose > 2:
+                IPReport.print_iteration(state.nit,
+                                         state.nfev,
+                                         state.cg_niter,
+                                         state.fun,
+                                         state.tr_radius,
+                                         state.optimality,
+                                         state.constr_violation,
+                                         state.constr_penalty,
+                                         state.barrier_parameter,
+                                         state.cg_stop_cond)
+            state.status = None
+            state.niter = state.nit  # Alias for callback (backward compatibility)
+            if callback is not None:
+                callback_stop = False
+                try:
+                    callback_stop = callback(state)
+                except StopIteration:
+                    callback_stop = True
+                if callback_stop:
+                    state.status = 3
+                    return True
+            if state.optimality < gtol and state.constr_violation < gtol:
+                state.status = 1
+            elif (state.tr_radius < xtol
+                  and state.barrier_parameter < barrier_tol):
+                state.status = 2
+            elif state.nit >= maxiter:
+                state.status = 0
+            return state.status in (0, 1, 2, 3)
+
+    if verbose == 2:
+        BasicReport.print_header()
+    elif verbose > 2:
+        if method == 'equality_constrained_sqp':
+            SQPReport.print_header()
+        elif method == 'tr_interior_point':
+            IPReport.print_header()
+
+    # Call inferior function to do the optimization
+    if method == 'equality_constrained_sqp':
+        def fun_and_constr(x):
+            f = objective.fun(x)
+            c_eq, _ = canonical.fun(x)
+            return f, c_eq
+
+        def grad_and_jac(x):
+            g = objective.grad(x)
+            J_eq, _ = canonical.jac(x)
+            return g, J_eq
+
+        _, result = equality_constrained_sqp(
+            fun_and_constr, grad_and_jac, lagrangian_hess,
+            x0, objective.f, objective.g,
+            c_eq0, J_eq0,
+            stop_criteria, state,
+            initial_constr_penalty, initial_tr_radius,
+            factorization_method)
+
+    elif method == 'tr_interior_point':
+        _, result = tr_interior_point(
+            objective.fun, objective.grad, lagrangian_hess,
+            n_vars, canonical.n_ineq, canonical.n_eq,
+            canonical.fun, canonical.jac,
+            x0, objective.f, objective.g,
+            c_ineq0, J_ineq0, c_eq0, J_eq0,
+            stop_criteria,
+            canonical.keep_feasible,
+            xtol, state, initial_barrier_parameter,
+            initial_barrier_tolerance,
+            initial_constr_penalty, initial_tr_radius,
+            factorization_method, finite_diff_bounds)
+
+    # Status 4 occurs when minimize is successful but constraints are not satisfied.
+    if result.status in (1, 2) and state.constr_violation > gtol:
+        result.status = 4
+
+    # Status 3 occurs when the callback function requests termination,
+    # this is assumed to not be a success.
+    result.success = True if result.status in (1, 2) else False
+    result.message = TERMINATION_MESSAGES[result.status]
+
+    # Alias (for backward compatibility with 1.1.0)
+    result.niter = result.nit
+
+    if verbose == 2:
+        BasicReport.print_footer()
+    elif verbose > 2:
+        if method == 'equality_constrained_sqp':
+            SQPReport.print_footer()
+        elif method == 'tr_interior_point':
+            IPReport.print_footer()
+    if verbose >= 1:
+        print(result.message)
+        print(f"Number of iterations: {result.nit}, "
+              f"function evaluations: {result.nfev}, "
+              f"CG iterations: {result.cg_niter}, "
+              f"optimality: {result.optimality:.2e}, "
+              f"constraint violation: {result.constr_violation:.2e}, "
+              f"execution time: {result.execution_time:4.2} s.")
+    return result
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/projections.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/projections.py
new file mode 100644
index 0000000000000000000000000000000000000000..a07b836bdbad688a265ae34ce91a361fd5050eb1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/projections.py
@@ -0,0 +1,407 @@
+"""Basic linear factorizations needed by the solver."""
+
+from scipy.sparse import (bmat, csc_matrix, eye, issparse)
+from scipy.sparse.linalg import LinearOperator
+import scipy.linalg
+import scipy.sparse.linalg
+try:
+    from sksparse.cholmod import cholesky_AAt
+    sksparse_available = True
+except ImportError:
+    import warnings
+    sksparse_available = False
+import numpy as np
+from warnings import warn
+
+__all__ = [
+    'orthogonality',
+    'projections',
+]
+
+
+def orthogonality(A, g):
+    """Measure orthogonality between a vector and the null space of a matrix.
+
+    Compute a measure of orthogonality between the null space
+    of the (possibly sparse) matrix ``A`` and a given vector ``g``.
+
+    The formula is a simplified (and cheaper) version of formula (3.13)
+    from [1]_.
+    ``orth =  norm(A g, ord=2)/(norm(A, ord='fro')*norm(g, ord=2))``.
+
+    References
+    ----------
+    .. [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal.
+           "On the solution of equality constrained quadratic
+            programming problems arising in optimization."
+            SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395.
+    """
+    # Compute vector norms
+    norm_g = np.linalg.norm(g)
+    # Compute Froebnius norm of the matrix A
+    if issparse(A):
+        norm_A = scipy.sparse.linalg.norm(A, ord='fro')
+    else:
+        norm_A = np.linalg.norm(A, ord='fro')
+
+    # Check if norms are zero
+    if norm_g == 0 or norm_A == 0:
+        return 0
+
+    norm_A_g = np.linalg.norm(A.dot(g))
+    # Orthogonality measure
+    orth = norm_A_g / (norm_A*norm_g)
+    return orth
+
+
+def normal_equation_projections(A, m, n, orth_tol, max_refin, tol):
+    """Return linear operators for matrix A using ``NormalEquation`` approach.
+    """
+    # Cholesky factorization
+    factor = cholesky_AAt(A)
+
+    # z = x - A.T inv(A A.T) A x
+    def null_space(x):
+        v = factor(A.dot(x))
+        z = x - A.T.dot(v)
+
+        # Iterative refinement to improve roundoff
+        # errors described in [2]_, algorithm 5.1.
+        k = 0
+        while orthogonality(A, z) > orth_tol:
+            if k >= max_refin:
+                break
+            # z_next = z - A.T inv(A A.T) A z
+            v = factor(A.dot(z))
+            z = z - A.T.dot(v)
+            k += 1
+
+        return z
+
+    # z = inv(A A.T) A x
+    def least_squares(x):
+        return factor(A.dot(x))
+
+    # z = A.T inv(A A.T) x
+    def row_space(x):
+        return A.T.dot(factor(x))
+
+    return null_space, least_squares, row_space
+
+
+def augmented_system_projections(A, m, n, orth_tol, max_refin, tol):
+    """Return linear operators for matrix A - ``AugmentedSystem``."""
+    # Form augmented system
+    K = csc_matrix(bmat([[eye(n), A.T], [A, None]]))
+    # LU factorization
+    # TODO: Use a symmetric indefinite factorization
+    #       to solve the system twice as fast (because
+    #       of the symmetry).
+    try:
+        solve = scipy.sparse.linalg.factorized(K)
+    except RuntimeError:
+        warn("Singular Jacobian matrix. Using dense SVD decomposition to "
+             "perform the factorizations.",
+             stacklevel=3)
+        return svd_factorization_projections(A.toarray(),
+                                             m, n, orth_tol,
+                                             max_refin, tol)
+
+    # z = x - A.T inv(A A.T) A x
+    # is computed solving the extended system:
+    # [I A.T] * [ z ] = [x]
+    # [A  O ]   [aux]   [0]
+    def null_space(x):
+        # v = [x]
+        #     [0]
+        v = np.hstack([x, np.zeros(m)])
+        # lu_sol = [ z ]
+        #          [aux]
+        lu_sol = solve(v)
+        z = lu_sol[:n]
+
+        # Iterative refinement to improve roundoff
+        # errors described in [2]_, algorithm 5.2.
+        k = 0
+        while orthogonality(A, z) > orth_tol:
+            if k >= max_refin:
+                break
+            # new_v = [x] - [I A.T] * [ z ]
+            #         [0]   [A  O ]   [aux]
+            new_v = v - K.dot(lu_sol)
+            # [I A.T] * [delta  z ] = new_v
+            # [A  O ]   [delta aux]
+            lu_update = solve(new_v)
+            #  [ z ] += [delta  z ]
+            #  [aux]    [delta aux]
+            lu_sol += lu_update
+            z = lu_sol[:n]
+            k += 1
+
+        # return z = x - A.T inv(A A.T) A x
+        return z
+
+    # z = inv(A A.T) A x
+    # is computed solving the extended system:
+    # [I A.T] * [aux] = [x]
+    # [A  O ]   [ z ]   [0]
+    def least_squares(x):
+        # v = [x]
+        #     [0]
+        v = np.hstack([x, np.zeros(m)])
+        # lu_sol = [aux]
+        #          [ z ]
+        lu_sol = solve(v)
+        # return z = inv(A A.T) A x
+        return lu_sol[n:m+n]
+
+    # z = A.T inv(A A.T) x
+    # is computed solving the extended system:
+    # [I A.T] * [ z ] = [0]
+    # [A  O ]   [aux]   [x]
+    def row_space(x):
+        # v = [0]
+        #     [x]
+        v = np.hstack([np.zeros(n), x])
+        # lu_sol = [ z ]
+        #          [aux]
+        lu_sol = solve(v)
+        # return z = A.T inv(A A.T) x
+        return lu_sol[:n]
+
+    return null_space, least_squares, row_space
+
+
+def qr_factorization_projections(A, m, n, orth_tol, max_refin, tol):
+    """Return linear operators for matrix A using ``QRFactorization`` approach.
+    """
+    # QRFactorization
+    Q, R, P = scipy.linalg.qr(A.T, pivoting=True, mode='economic')
+
+    if np.linalg.norm(R[-1, :], np.inf) < tol:
+        warn('Singular Jacobian matrix. Using SVD decomposition to ' +
+             'perform the factorizations.',
+             stacklevel=3)
+        return svd_factorization_projections(A, m, n,
+                                             orth_tol,
+                                             max_refin,
+                                             tol)
+
+    # z = x - A.T inv(A A.T) A x
+    def null_space(x):
+        # v = P inv(R) Q.T x
+        aux1 = Q.T.dot(x)
+        aux2 = scipy.linalg.solve_triangular(R, aux1, lower=False)
+        v = np.zeros(m)
+        v[P] = aux2
+        z = x - A.T.dot(v)
+
+        # Iterative refinement to improve roundoff
+        # errors described in [2]_, algorithm 5.1.
+        k = 0
+        while orthogonality(A, z) > orth_tol:
+            if k >= max_refin:
+                break
+            # v = P inv(R) Q.T x
+            aux1 = Q.T.dot(z)
+            aux2 = scipy.linalg.solve_triangular(R, aux1, lower=False)
+            v[P] = aux2
+            # z_next = z - A.T v
+            z = z - A.T.dot(v)
+            k += 1
+
+        return z
+
+    # z = inv(A A.T) A x
+    def least_squares(x):
+        # z = P inv(R) Q.T x
+        aux1 = Q.T.dot(x)
+        aux2 = scipy.linalg.solve_triangular(R, aux1, lower=False)
+        z = np.zeros(m)
+        z[P] = aux2
+        return z
+
+    # z = A.T inv(A A.T) x
+    def row_space(x):
+        # z = Q inv(R.T) P.T x
+        aux1 = x[P]
+        aux2 = scipy.linalg.solve_triangular(R, aux1,
+                                             lower=False,
+                                             trans='T')
+        z = Q.dot(aux2)
+        return z
+
+    return null_space, least_squares, row_space
+
+
+def svd_factorization_projections(A, m, n, orth_tol, max_refin, tol):
+    """Return linear operators for matrix A using ``SVDFactorization`` approach.
+    """
+    # SVD Factorization
+    U, s, Vt = scipy.linalg.svd(A, full_matrices=False)
+
+    # Remove dimensions related with very small singular values
+    U = U[:, s > tol]
+    Vt = Vt[s > tol, :]
+    s = s[s > tol]
+
+    # z = x - A.T inv(A A.T) A x
+    def null_space(x):
+        # v = U 1/s V.T x = inv(A A.T) A x
+        aux1 = Vt.dot(x)
+        aux2 = 1/s*aux1
+        v = U.dot(aux2)
+        z = x - A.T.dot(v)
+
+        # Iterative refinement to improve roundoff
+        # errors described in [2]_, algorithm 5.1.
+        k = 0
+        while orthogonality(A, z) > orth_tol:
+            if k >= max_refin:
+                break
+            # v = U 1/s V.T x = inv(A A.T) A x
+            aux1 = Vt.dot(z)
+            aux2 = 1/s*aux1
+            v = U.dot(aux2)
+            # z_next = z - A.T v
+            z = z - A.T.dot(v)
+            k += 1
+
+        return z
+
+    # z = inv(A A.T) A x
+    def least_squares(x):
+        # z = U 1/s V.T x = inv(A A.T) A x
+        aux1 = Vt.dot(x)
+        aux2 = 1/s*aux1
+        z = U.dot(aux2)
+        return z
+
+    # z = A.T inv(A A.T) x
+    def row_space(x):
+        # z = V 1/s U.T x
+        aux1 = U.T.dot(x)
+        aux2 = 1/s*aux1
+        z = Vt.T.dot(aux2)
+        return z
+
+    return null_space, least_squares, row_space
+
+
+def projections(A, method=None, orth_tol=1e-12, max_refin=3, tol=1e-15):
+    """Return three linear operators related with a given matrix A.
+
+    Parameters
+    ----------
+    A : sparse matrix (or ndarray), shape (m, n)
+        Matrix ``A`` used in the projection.
+    method : string, optional
+        Method used for compute the given linear
+        operators. Should be one of:
+
+            - 'NormalEquation': The operators
+               will be computed using the
+               so-called normal equation approach
+               explained in [1]_. In order to do
+               so the Cholesky factorization of
+               ``(A A.T)`` is computed. Exclusive
+               for sparse matrices.
+            - 'AugmentedSystem': The operators
+               will be computed using the
+               so-called augmented system approach
+               explained in [1]_. Exclusive
+               for sparse matrices.
+            - 'QRFactorization': Compute projections
+               using QR factorization. Exclusive for
+               dense matrices.
+            - 'SVDFactorization': Compute projections
+               using SVD factorization. Exclusive for
+               dense matrices.
+
+    orth_tol : float, optional
+        Tolerance for iterative refinements.
+    max_refin : int, optional
+        Maximum number of iterative refinements.
+    tol : float, optional
+        Tolerance for singular values.
+
+    Returns
+    -------
+    Z : LinearOperator, shape (n, n)
+        Null-space operator. For a given vector ``x``,
+        the null space operator is equivalent to apply
+        a projection matrix ``P = I - A.T inv(A A.T) A``
+        to the vector. It can be shown that this is
+        equivalent to project ``x`` into the null space
+        of A.
+    LS : LinearOperator, shape (m, n)
+        Least-squares operator. For a given vector ``x``,
+        the least-squares operator is equivalent to apply a
+        pseudoinverse matrix ``pinv(A.T) = inv(A A.T) A``
+        to the vector. It can be shown that this vector
+        ``pinv(A.T) x`` is the least_square solution to
+        ``A.T y = x``.
+    Y : LinearOperator, shape (n, m)
+        Row-space operator. For a given vector ``x``,
+        the row-space operator is equivalent to apply a
+        projection matrix ``Q = A.T inv(A A.T)``
+        to the vector.  It can be shown that this
+        vector ``y = Q x``  the minimum norm solution
+        of ``A y = x``.
+
+    Notes
+    -----
+    Uses iterative refinements described in [1]
+    during the computation of ``Z`` in order to
+    cope with the possibility of large roundoff errors.
+
+    References
+    ----------
+    .. [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal.
+        "On the solution of equality constrained quadratic
+        programming problems arising in optimization."
+        SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395.
+    """
+    m, n = np.shape(A)
+
+    # The factorization of an empty matrix
+    # only works for the sparse representation.
+    if m*n == 0:
+        A = csc_matrix(A)
+
+    # Check Argument
+    if issparse(A):
+        if method is None:
+            method = "AugmentedSystem"
+        if method not in ("NormalEquation", "AugmentedSystem"):
+            raise ValueError("Method not allowed for sparse matrix.")
+        if method == "NormalEquation" and not sksparse_available:
+            warnings.warn("Only accepts 'NormalEquation' option when "
+                          "scikit-sparse is available. Using "
+                          "'AugmentedSystem' option instead.",
+                          ImportWarning, stacklevel=3)
+            method = 'AugmentedSystem'
+    else:
+        if method is None:
+            method = "QRFactorization"
+        if method not in ("QRFactorization", "SVDFactorization"):
+            raise ValueError("Method not allowed for dense array.")
+
+    if method == 'NormalEquation':
+        null_space, least_squares, row_space \
+            = normal_equation_projections(A, m, n, orth_tol, max_refin, tol)
+    elif method == 'AugmentedSystem':
+        null_space, least_squares, row_space \
+            = augmented_system_projections(A, m, n, orth_tol, max_refin, tol)
+    elif method == "QRFactorization":
+        null_space, least_squares, row_space \
+            = qr_factorization_projections(A, m, n, orth_tol, max_refin, tol)
+    elif method == "SVDFactorization":
+        null_space, least_squares, row_space \
+            = svd_factorization_projections(A, m, n, orth_tol, max_refin, tol)
+
+    Z = LinearOperator((n, n), null_space)
+    LS = LinearOperator((m, n), least_squares)
+    Y = LinearOperator((n, m), row_space)
+
+    return Z, LS, Y
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/qp_subproblem.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/qp_subproblem.py
new file mode 100644
index 0000000000000000000000000000000000000000..a039a7738c283f90f30fd7c4583bf9e1a8f559d5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/qp_subproblem.py
@@ -0,0 +1,637 @@
+"""Equality-constrained quadratic programming solvers."""
+
+from scipy.sparse import (linalg, bmat, csc_matrix)
+from math import copysign
+import numpy as np
+from numpy.linalg import norm
+
+__all__ = [
+    'eqp_kktfact',
+    'sphere_intersections',
+    'box_intersections',
+    'box_sphere_intersections',
+    'inside_box_boundaries',
+    'modified_dogleg',
+    'projected_cg'
+]
+
+
+# For comparison with the projected CG
+def eqp_kktfact(H, c, A, b):
+    """Solve equality-constrained quadratic programming (EQP) problem.
+
+    Solve ``min 1/2 x.T H x + x.t c`` subject to ``A x + b = 0``
+    using direct factorization of the KKT system.
+
+    Parameters
+    ----------
+    H : sparse matrix, shape (n, n)
+        Hessian matrix of the EQP problem.
+    c : array_like, shape (n,)
+        Gradient of the quadratic objective function.
+    A : sparse matrix
+        Jacobian matrix of the EQP problem.
+    b : array_like, shape (m,)
+        Right-hand side of the constraint equation.
+
+    Returns
+    -------
+    x : array_like, shape (n,)
+        Solution of the KKT problem.
+    lagrange_multipliers : ndarray, shape (m,)
+        Lagrange multipliers of the KKT problem.
+    """
+    n, = np.shape(c)  # Number of parameters
+    m, = np.shape(b)  # Number of constraints
+
+    # Karush-Kuhn-Tucker matrix of coefficients.
+    # Defined as in Nocedal/Wright "Numerical
+    # Optimization" p.452 in Eq. (16.4).
+    kkt_matrix = csc_matrix(bmat([[H, A.T], [A, None]]))
+    # Vector of coefficients.
+    kkt_vec = np.hstack([-c, -b])
+
+    # TODO: Use a symmetric indefinite factorization
+    #       to solve the system twice as fast (because
+    #       of the symmetry).
+    lu = linalg.splu(kkt_matrix)
+    kkt_sol = lu.solve(kkt_vec)
+    x = kkt_sol[:n]
+    lagrange_multipliers = -kkt_sol[n:n+m]
+
+    return x, lagrange_multipliers
+
+
+def sphere_intersections(z, d, trust_radius,
+                         entire_line=False):
+    """Find the intersection between segment (or line) and spherical constraints.
+
+    Find the intersection between the segment (or line) defined by the
+    parametric  equation ``x(t) = z + t*d`` and the ball
+    ``||x|| <= trust_radius``.
+
+    Parameters
+    ----------
+    z : array_like, shape (n,)
+        Initial point.
+    d : array_like, shape (n,)
+        Direction.
+    trust_radius : float
+        Ball radius.
+    entire_line : bool, optional
+        When ``True``, the function returns the intersection between the line
+        ``x(t) = z + t*d`` (``t`` can assume any value) and the ball
+        ``||x|| <= trust_radius``. When ``False``, the function returns the intersection
+        between the segment ``x(t) = z + t*d``, ``0 <= t <= 1``, and the ball.
+
+    Returns
+    -------
+    ta, tb : float
+        The line/segment ``x(t) = z + t*d`` is inside the ball for
+        for ``ta <= t <= tb``.
+    intersect : bool
+        When ``True``, there is a intersection between the line/segment
+        and the sphere. On the other hand, when ``False``, there is no
+        intersection.
+    """
+    # Special case when d=0
+    if norm(d) == 0:
+        return 0, 0, False
+    # Check for inf trust_radius
+    if np.isinf(trust_radius):
+        if entire_line:
+            ta = -np.inf
+            tb = np.inf
+        else:
+            ta = 0
+            tb = 1
+        intersect = True
+        return ta, tb, intersect
+
+    a = np.dot(d, d)
+    b = 2 * np.dot(z, d)
+    c = np.dot(z, z) - trust_radius**2
+    discriminant = b*b - 4*a*c
+    if discriminant < 0:
+        intersect = False
+        return 0, 0, intersect
+    sqrt_discriminant = np.sqrt(discriminant)
+
+    # The following calculation is mathematically
+    # equivalent to:
+    # ta = (-b - sqrt_discriminant) / (2*a)
+    # tb = (-b + sqrt_discriminant) / (2*a)
+    # but produce smaller round off errors.
+    # Look at Matrix Computation p.97
+    # for a better justification.
+    aux = b + copysign(sqrt_discriminant, b)
+    ta = -aux / (2*a)
+    tb = -2*c / aux
+    ta, tb = sorted([ta, tb])
+
+    if entire_line:
+        intersect = True
+    else:
+        # Checks to see if intersection happens
+        # within vectors length.
+        if tb < 0 or ta > 1:
+            intersect = False
+            ta = 0
+            tb = 0
+        else:
+            intersect = True
+            # Restrict intersection interval
+            # between 0 and 1.
+            ta = max(0, ta)
+            tb = min(1, tb)
+
+    return ta, tb, intersect
+
+
+def box_intersections(z, d, lb, ub,
+                      entire_line=False):
+    """Find the intersection between segment (or line) and box constraints.
+
+    Find the intersection between the segment (or line) defined by the
+    parametric  equation ``x(t) = z + t*d`` and the rectangular box
+    ``lb <= x <= ub``.
+
+    Parameters
+    ----------
+    z : array_like, shape (n,)
+        Initial point.
+    d : array_like, shape (n,)
+        Direction.
+    lb : array_like, shape (n,)
+        Lower bounds to each one of the components of ``x``. Used
+        to delimit the rectangular box.
+    ub : array_like, shape (n, )
+        Upper bounds to each one of the components of ``x``. Used
+        to delimit the rectangular box.
+    entire_line : bool, optional
+        When ``True``, the function returns the intersection between the line
+        ``x(t) = z + t*d`` (``t`` can assume any value) and the rectangular
+        box. When ``False``, the function returns the intersection between the segment
+        ``x(t) = z + t*d``, ``0 <= t <= 1``, and the rectangular box.
+
+    Returns
+    -------
+    ta, tb : float
+        The line/segment ``x(t) = z + t*d`` is inside the box for
+        for ``ta <= t <= tb``.
+    intersect : bool
+        When ``True``, there is a intersection between the line (or segment)
+        and the rectangular box. On the other hand, when ``False``, there is no
+        intersection.
+    """
+    # Make sure it is a numpy array
+    z = np.asarray(z)
+    d = np.asarray(d)
+    lb = np.asarray(lb)
+    ub = np.asarray(ub)
+    # Special case when d=0
+    if norm(d) == 0:
+        return 0, 0, False
+
+    # Get values for which d==0
+    zero_d = (d == 0)
+    # If the boundaries are not satisfied for some coordinate
+    # for which "d" is zero, there is no box-line intersection.
+    if (z[zero_d] < lb[zero_d]).any() or (z[zero_d] > ub[zero_d]).any():
+        intersect = False
+        return 0, 0, intersect
+    # Remove values for which d is zero
+    not_zero_d = np.logical_not(zero_d)
+    z = z[not_zero_d]
+    d = d[not_zero_d]
+    lb = lb[not_zero_d]
+    ub = ub[not_zero_d]
+
+    # Find a series of intervals (t_lb[i], t_ub[i]).
+    t_lb = (lb-z) / d
+    t_ub = (ub-z) / d
+    # Get the intersection of all those intervals.
+    ta = max(np.minimum(t_lb, t_ub))
+    tb = min(np.maximum(t_lb, t_ub))
+
+    # Check if intersection is feasible
+    if ta <= tb:
+        intersect = True
+    else:
+        intersect = False
+    # Checks to see if intersection happens within vectors length.
+    if not entire_line:
+        if tb < 0 or ta > 1:
+            intersect = False
+            ta = 0
+            tb = 0
+        else:
+            # Restrict intersection interval between 0 and 1.
+            ta = max(0, ta)
+            tb = min(1, tb)
+
+    return ta, tb, intersect
+
+
+def box_sphere_intersections(z, d, lb, ub, trust_radius,
+                             entire_line=False,
+                             extra_info=False):
+    """Find the intersection between segment (or line) and box/sphere constraints.
+
+    Find the intersection between the segment (or line) defined by the
+    parametric  equation ``x(t) = z + t*d``, the rectangular box
+    ``lb <= x <= ub`` and the ball ``||x|| <= trust_radius``.
+
+    Parameters
+    ----------
+    z : array_like, shape (n,)
+        Initial point.
+    d : array_like, shape (n,)
+        Direction.
+    lb : array_like, shape (n,)
+        Lower bounds to each one of the components of ``x``. Used
+        to delimit the rectangular box.
+    ub : array_like, shape (n, )
+        Upper bounds to each one of the components of ``x``. Used
+        to delimit the rectangular box.
+    trust_radius : float
+        Ball radius.
+    entire_line : bool, optional
+        When ``True``, the function returns the intersection between the line
+        ``x(t) = z + t*d`` (``t`` can assume any value) and the constraints.
+        When ``False``, the function returns the intersection between the segment
+        ``x(t) = z + t*d``, ``0 <= t <= 1`` and the constraints.
+    extra_info : bool, optional
+        When ``True``, the function returns ``intersect_sphere`` and ``intersect_box``.
+
+    Returns
+    -------
+    ta, tb : float
+        The line/segment ``x(t) = z + t*d`` is inside the rectangular box and
+        inside the ball for ``ta <= t <= tb``.
+    intersect : bool
+        When ``True``, there is a intersection between the line (or segment)
+        and both constraints. On the other hand, when ``False``, there is no
+        intersection.
+    sphere_info : dict, optional
+        Dictionary ``{ta, tb, intersect}`` containing the interval ``[ta, tb]``
+        for which the line intercepts the ball. And a boolean value indicating
+        whether the sphere is intersected by the line.
+    box_info : dict, optional
+        Dictionary ``{ta, tb, intersect}`` containing the interval ``[ta, tb]``
+        for which the line intercepts the box. And a boolean value indicating
+        whether the box is intersected by the line.
+    """
+    ta_b, tb_b, intersect_b = box_intersections(z, d, lb, ub,
+                                                entire_line)
+    ta_s, tb_s, intersect_s = sphere_intersections(z, d,
+                                                   trust_radius,
+                                                   entire_line)
+    ta = np.maximum(ta_b, ta_s)
+    tb = np.minimum(tb_b, tb_s)
+    if intersect_b and intersect_s and ta <= tb:
+        intersect = True
+    else:
+        intersect = False
+
+    if extra_info:
+        sphere_info = {'ta': ta_s, 'tb': tb_s, 'intersect': intersect_s}
+        box_info = {'ta': ta_b, 'tb': tb_b, 'intersect': intersect_b}
+        return ta, tb, intersect, sphere_info, box_info
+    else:
+        return ta, tb, intersect
+
+
+def inside_box_boundaries(x, lb, ub):
+    """Check if lb <= x <= ub."""
+    return (lb <= x).all() and (x <= ub).all()
+
+
+def reinforce_box_boundaries(x, lb, ub):
+    """Return clipped value of x"""
+    return np.minimum(np.maximum(x, lb), ub)
+
+
+def modified_dogleg(A, Y, b, trust_radius, lb, ub):
+    """Approximately  minimize ``1/2*|| A x + b ||^2`` inside trust-region.
+
+    Approximately solve the problem of minimizing ``1/2*|| A x + b ||^2``
+    subject to ``||x|| < Delta`` and ``lb <= x <= ub`` using a modification
+    of the classical dogleg approach.
+
+    Parameters
+    ----------
+    A : LinearOperator (or sparse matrix or ndarray), shape (m, n)
+        Matrix ``A`` in the minimization problem. It should have
+        dimension ``(m, n)`` such that ``m < n``.
+    Y : LinearOperator (or sparse matrix or ndarray), shape (n, m)
+        LinearOperator that apply the projection matrix
+        ``Q = A.T inv(A A.T)`` to the vector. The obtained vector
+        ``y = Q x`` being the minimum norm solution of ``A y = x``.
+    b : array_like, shape (m,)
+        Vector ``b``in the minimization problem.
+    trust_radius: float
+        Trust radius to be considered. Delimits a sphere boundary
+        to the problem.
+    lb : array_like, shape (n,)
+        Lower bounds to each one of the components of ``x``.
+        It is expected that ``lb <= 0``, otherwise the algorithm
+        may fail. If ``lb[i] = -Inf``, the lower
+        bound for the ith component is just ignored.
+    ub : array_like, shape (n, )
+        Upper bounds to each one of the components of ``x``.
+        It is expected that ``ub >= 0``, otherwise the algorithm
+        may fail. If ``ub[i] = Inf``, the upper bound for the ith
+        component is just ignored.
+
+    Returns
+    -------
+    x : array_like, shape (n,)
+        Solution to the problem.
+
+    Notes
+    -----
+    Based on implementations described in pp. 885-886 from [1]_.
+
+    References
+    ----------
+    .. [1] Byrd, Richard H., Mary E. Hribar, and Jorge Nocedal.
+           "An interior point algorithm for large-scale nonlinear
+           programming." SIAM Journal on Optimization 9.4 (1999): 877-900.
+    """
+    # Compute minimum norm minimizer of 1/2*|| A x + b ||^2.
+    newton_point = -Y.dot(b)
+    # Check for interior point
+    if inside_box_boundaries(newton_point, lb, ub)  \
+       and norm(newton_point) <= trust_radius:
+        x = newton_point
+        return x
+
+    # Compute gradient vector ``g = A.T b``
+    g = A.T.dot(b)
+    # Compute Cauchy point
+    # `cauchy_point = g.T g / (g.T A.T A g)``.
+    A_g = A.dot(g)
+    cauchy_point = -np.dot(g, g) / np.dot(A_g, A_g) * g
+    # Origin
+    origin_point = np.zeros_like(cauchy_point)
+
+    # Check the segment between cauchy_point and newton_point
+    # for a possible solution.
+    z = cauchy_point
+    p = newton_point - cauchy_point
+    _, alpha, intersect = box_sphere_intersections(z, p, lb, ub,
+                                                   trust_radius)
+    if intersect:
+        x1 = z + alpha*p
+    else:
+        # Check the segment between the origin and cauchy_point
+        # for a possible solution.
+        z = origin_point
+        p = cauchy_point
+        _, alpha, _ = box_sphere_intersections(z, p, lb, ub,
+                                               trust_radius)
+        x1 = z + alpha*p
+
+    # Check the segment between origin and newton_point
+    # for a possible solution.
+    z = origin_point
+    p = newton_point
+    _, alpha, _ = box_sphere_intersections(z, p, lb, ub,
+                                           trust_radius)
+    x2 = z + alpha*p
+
+    # Return the best solution among x1 and x2.
+    if norm(A.dot(x1) + b) < norm(A.dot(x2) + b):
+        return x1
+    else:
+        return x2
+
+
+def projected_cg(H, c, Z, Y, b, trust_radius=np.inf,
+                 lb=None, ub=None, tol=None,
+                 max_iter=None, max_infeasible_iter=None,
+                 return_all=False):
+    """Solve EQP problem with projected CG method.
+
+    Solve equality-constrained quadratic programming problem
+    ``min 1/2 x.T H x + x.t c``  subject to ``A x + b = 0`` and,
+    possibly, to trust region constraints ``||x|| < trust_radius``
+    and box constraints ``lb <= x <= ub``.
+
+    Parameters
+    ----------
+    H : LinearOperator (or sparse matrix or ndarray), shape (n, n)
+        Operator for computing ``H v``.
+    c : array_like, shape (n,)
+        Gradient of the quadratic objective function.
+    Z : LinearOperator (or sparse matrix or ndarray), shape (n, n)
+        Operator for projecting ``x`` into the null space of A.
+    Y : LinearOperator,  sparse matrix, ndarray, shape (n, m)
+        Operator that, for a given a vector ``b``, compute smallest
+        norm solution of ``A x + b = 0``.
+    b : array_like, shape (m,)
+        Right-hand side of the constraint equation.
+    trust_radius : float, optional
+        Trust radius to be considered. By default, uses ``trust_radius=inf``,
+        which means no trust radius at all.
+    lb : array_like, shape (n,), optional
+        Lower bounds to each one of the components of ``x``.
+        If ``lb[i] = -Inf`` the lower bound for the i-th
+        component is just ignored (default).
+    ub : array_like, shape (n, ), optional
+        Upper bounds to each one of the components of ``x``.
+        If ``ub[i] = Inf`` the upper bound for the i-th
+        component is just ignored (default).
+    tol : float, optional
+        Tolerance used to interrupt the algorithm.
+    max_iter : int, optional
+        Maximum algorithm iterations. Where ``max_inter <= n-m``.
+        By default, uses ``max_iter = n-m``.
+    max_infeasible_iter : int, optional
+        Maximum infeasible (regarding box constraints) iterations the
+        algorithm is allowed to take.
+        By default, uses ``max_infeasible_iter = n-m``.
+    return_all : bool, optional
+        When ``true``, return the list of all vectors through the iterations.
+
+    Returns
+    -------
+    x : array_like, shape (n,)
+        Solution of the EQP problem.
+    info : Dict
+        Dictionary containing the following:
+
+            - niter : Number of iterations.
+            - stop_cond : Reason for algorithm termination:
+                1. Iteration limit was reached;
+                2. Reached the trust-region boundary;
+                3. Negative curvature detected;
+                4. Tolerance was satisfied.
+            - allvecs : List containing all intermediary vectors (optional).
+            - hits_boundary : True if the proposed step is on the boundary
+              of the trust region.
+
+    Notes
+    -----
+    Implementation of Algorithm 6.2 on [1]_.
+
+    In the absence of spherical and box constraints, for sufficient
+    iterations, the method returns a truly optimal result.
+    In the presence of those constraints, the value returned is only
+    a inexpensive approximation of the optimal value.
+
+    References
+    ----------
+    .. [1] Gould, Nicholas IM, Mary E. Hribar, and Jorge Nocedal.
+           "On the solution of equality constrained quadratic
+            programming problems arising in optimization."
+            SIAM Journal on Scientific Computing 23.4 (2001): 1376-1395.
+    """
+    CLOSE_TO_ZERO = 1e-25
+
+    n, = np.shape(c)  # Number of parameters
+    m, = np.shape(b)  # Number of constraints
+
+    # Initial Values
+    x = Y.dot(-b)
+    r = Z.dot(H.dot(x) + c)
+    g = Z.dot(r)
+    p = -g
+
+    # Store ``x`` value
+    if return_all:
+        allvecs = [x]
+    # Values for the first iteration
+    H_p = H.dot(p)
+    rt_g = norm(g)**2  # g.T g = r.T Z g = r.T g (ref [1]_ p.1389)
+
+    # If x > trust-region the problem does not have a solution.
+    tr_distance = trust_radius - norm(x)
+    if tr_distance < 0:
+        raise ValueError("Trust region problem does not have a solution.")
+    # If x == trust_radius, then x is the solution
+    # to the optimization problem, since x is the
+    # minimum norm solution to Ax=b.
+    elif tr_distance < CLOSE_TO_ZERO:
+        info = {'niter': 0, 'stop_cond': 2, 'hits_boundary': True}
+        if return_all:
+            allvecs.append(x)
+            info['allvecs'] = allvecs
+        return x, info
+
+    # Set default tolerance
+    if tol is None:
+        tol = max(min(0.01 * np.sqrt(rt_g), 0.1 * rt_g), CLOSE_TO_ZERO)
+    # Set default lower and upper bounds
+    if lb is None:
+        lb = np.full(n, -np.inf)
+    if ub is None:
+        ub = np.full(n, np.inf)
+    # Set maximum iterations
+    if max_iter is None:
+        max_iter = n-m
+    max_iter = min(max_iter, n-m)
+    # Set maximum infeasible iterations
+    if max_infeasible_iter is None:
+        max_infeasible_iter = n-m
+
+    hits_boundary = False
+    stop_cond = 1
+    counter = 0
+    last_feasible_x = np.zeros_like(x)
+    k = 0
+    for i in range(max_iter):
+        # Stop criteria - Tolerance : r.T g < tol
+        if rt_g < tol:
+            stop_cond = 4
+            break
+        k += 1
+        # Compute curvature
+        pt_H_p = H_p.dot(p)
+        # Stop criteria - Negative curvature
+        if pt_H_p <= 0:
+            if np.isinf(trust_radius):
+                raise ValueError("Negative curvature not allowed "
+                                 "for unrestricted problems.")
+            else:
+                # Find intersection with constraints
+                _, alpha, intersect = box_sphere_intersections(
+                    x, p, lb, ub, trust_radius, entire_line=True)
+                # Update solution
+                if intersect:
+                    x = x + alpha*p
+                # Reinforce variables are inside box constraints.
+                # This is only necessary because of roundoff errors.
+                x = reinforce_box_boundaries(x, lb, ub)
+                # Attribute information
+                stop_cond = 3
+                hits_boundary = True
+                break
+
+        # Get next step
+        alpha = rt_g / pt_H_p
+        x_next = x + alpha*p
+
+        # Stop criteria - Hits boundary
+        if np.linalg.norm(x_next) >= trust_radius:
+            # Find intersection with box constraints
+            _, theta, intersect = box_sphere_intersections(x, alpha*p, lb, ub,
+                                                           trust_radius)
+            # Update solution
+            if intersect:
+                x = x + theta*alpha*p
+            # Reinforce variables are inside box constraints.
+            # This is only necessary because of roundoff errors.
+            x = reinforce_box_boundaries(x, lb, ub)
+            # Attribute information
+            stop_cond = 2
+            hits_boundary = True
+            break
+
+        # Check if ``x`` is inside the box and start counter if it is not.
+        if inside_box_boundaries(x_next, lb, ub):
+            counter = 0
+        else:
+            counter += 1
+        # Whenever outside box constraints keep looking for intersections.
+        if counter > 0:
+            _, theta, intersect = box_sphere_intersections(x, alpha*p, lb, ub,
+                                                           trust_radius)
+            if intersect:
+                last_feasible_x = x + theta*alpha*p
+                # Reinforce variables are inside box constraints.
+                # This is only necessary because of roundoff errors.
+                last_feasible_x = reinforce_box_boundaries(last_feasible_x,
+                                                           lb, ub)
+                counter = 0
+        # Stop after too many infeasible (regarding box constraints) iteration.
+        if counter > max_infeasible_iter:
+            break
+        # Store ``x_next`` value
+        if return_all:
+            allvecs.append(x_next)
+
+        # Update residual
+        r_next = r + alpha*H_p
+        # Project residual g+ = Z r+
+        g_next = Z.dot(r_next)
+        # Compute conjugate direction step d
+        rt_g_next = norm(g_next)**2  # g.T g = r.T g (ref [1]_ p.1389)
+        beta = rt_g_next / rt_g
+        p = - g_next + beta*p
+        # Prepare for next iteration
+        x = x_next
+        g = g_next
+        r = g_next
+        rt_g = norm(g)**2  # g.T g = r.T Z g = r.T g (ref [1]_ p.1389)
+        H_p = H.dot(p)
+
+    if not inside_box_boundaries(x, lb, ub):
+        x = last_feasible_x
+        hits_boundary = True
+    info = {'niter': k, 'stop_cond': stop_cond,
+            'hits_boundary': hits_boundary}
+    if return_all:
+        info['allvecs'] = allvecs
+    return x, info
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/report.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/report.py
new file mode 100644
index 0000000000000000000000000000000000000000..f7f997d663cd5ce6265e77f940622b6105362bf7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/report.py
@@ -0,0 +1,49 @@
+"""Progress report printers."""
+
+class ReportBase:
+    COLUMN_NAMES: list[str] = NotImplemented
+    COLUMN_WIDTHS: list[int] = NotImplemented
+    ITERATION_FORMATS: list[str] = NotImplemented
+
+    @classmethod
+    def print_header(cls):
+        fmt = ("|"
+               + "|".join([f"{{:^{x}}}" for x in cls.COLUMN_WIDTHS])
+               + "|")
+        separators = ['-' * x for x in cls.COLUMN_WIDTHS]
+        print(fmt.format(*cls.COLUMN_NAMES))
+        print(fmt.format(*separators))
+
+    @classmethod
+    def print_iteration(cls, *args):
+        iteration_format = [f"{{:{x}}}" for x in cls.ITERATION_FORMATS]
+        fmt = "|" + "|".join(iteration_format) + "|"
+        print(fmt.format(*args))
+
+    @classmethod
+    def print_footer(cls):
+        print()
+
+
+class BasicReport(ReportBase):
+    COLUMN_NAMES = ["niter", "f evals", "CG iter", "obj func", "tr radius",
+                    "opt", "c viol"]
+    COLUMN_WIDTHS = [7, 7, 7, 13, 10, 10, 10]
+    ITERATION_FORMATS = ["^7", "^7", "^7", "^+13.4e",
+                         "^10.2e", "^10.2e", "^10.2e"]
+
+
+class SQPReport(ReportBase):
+    COLUMN_NAMES = ["niter", "f evals", "CG iter", "obj func", "tr radius",
+                    "opt", "c viol", "penalty", "CG stop"]
+    COLUMN_WIDTHS = [7, 7, 7, 13, 10, 10, 10, 10, 7]
+    ITERATION_FORMATS = ["^7", "^7", "^7", "^+13.4e", "^10.2e", "^10.2e",
+                         "^10.2e", "^10.2e", "^7"]
+
+
+class IPReport(ReportBase):
+    COLUMN_NAMES = ["niter", "f evals", "CG iter", "obj func", "tr radius",
+                    "opt", "c viol", "penalty", "barrier param", "CG stop"]
+    COLUMN_WIDTHS = [7, 7, 7, 13, 10, 10, 10, 10, 13, 7]
+    ITERATION_FORMATS = ["^7", "^7", "^7", "^+13.4e", "^10.2e", "^10.2e",
+                         "^10.2e", "^10.2e", "^13.2e", "^7"]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py
new file mode 100644
index 0000000000000000000000000000000000000000..452b327d02da3b3bd3fab9592bdef4d56d6aff57
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py
@@ -0,0 +1,296 @@
+import numpy as np
+from numpy.testing import assert_array_equal, assert_equal
+from scipy.optimize._constraints import (NonlinearConstraint, Bounds,
+                                         PreparedConstraint)
+from scipy.optimize._trustregion_constr.canonical_constraint \
+    import CanonicalConstraint, initial_constraints_as_canonical
+
+
+def create_quadratic_function(n, m, rng):
+    a = rng.rand(m)
+    A = rng.rand(m, n)
+    H = rng.rand(m, n, n)
+    HT = np.transpose(H, (1, 2, 0))
+
+    def fun(x):
+        return a + A.dot(x) + 0.5 * H.dot(x).dot(x)
+
+    def jac(x):
+        return A + H.dot(x)
+
+    def hess(x, v):
+        return HT.dot(v)
+
+    return fun, jac, hess
+
+
+def test_bounds_cases():
+    # Test 1: no constraints.
+    user_constraint = Bounds(-np.inf, np.inf)
+    x0 = np.array([-1, 2])
+    prepared_constraint = PreparedConstraint(user_constraint, x0, False)
+    c = CanonicalConstraint.from_PreparedConstraint(prepared_constraint)
+
+    assert_equal(c.n_eq, 0)
+    assert_equal(c.n_ineq, 0)
+
+    c_eq, c_ineq = c.fun(x0)
+    assert_array_equal(c_eq, [])
+    assert_array_equal(c_ineq, [])
+
+    J_eq, J_ineq = c.jac(x0)
+    assert_array_equal(J_eq, np.empty((0, 2)))
+    assert_array_equal(J_ineq, np.empty((0, 2)))
+
+    assert_array_equal(c.keep_feasible, [])
+
+    # Test 2: infinite lower bound.
+    user_constraint = Bounds(-np.inf, [0, np.inf, 1], [False, True, True])
+    x0 = np.array([-1, -2, -3], dtype=float)
+    prepared_constraint = PreparedConstraint(user_constraint, x0, False)
+    c = CanonicalConstraint.from_PreparedConstraint(prepared_constraint)
+
+    assert_equal(c.n_eq, 0)
+    assert_equal(c.n_ineq, 2)
+
+    c_eq, c_ineq = c.fun(x0)
+    assert_array_equal(c_eq, [])
+    assert_array_equal(c_ineq, [-1, -4])
+
+    J_eq, J_ineq = c.jac(x0)
+    assert_array_equal(J_eq, np.empty((0, 3)))
+    assert_array_equal(J_ineq, np.array([[1, 0, 0], [0, 0, 1]]))
+
+    assert_array_equal(c.keep_feasible, [False, True])
+
+    # Test 3: infinite upper bound.
+    user_constraint = Bounds([0, 1, -np.inf], np.inf, [True, False, True])
+    x0 = np.array([1, 2, 3], dtype=float)
+    prepared_constraint = PreparedConstraint(user_constraint, x0, False)
+    c = CanonicalConstraint.from_PreparedConstraint(prepared_constraint)
+
+    assert_equal(c.n_eq, 0)
+    assert_equal(c.n_ineq, 2)
+
+    c_eq, c_ineq = c.fun(x0)
+    assert_array_equal(c_eq, [])
+    assert_array_equal(c_ineq, [-1, -1])
+
+    J_eq, J_ineq = c.jac(x0)
+    assert_array_equal(J_eq, np.empty((0, 3)))
+    assert_array_equal(J_ineq, np.array([[-1, 0, 0], [0, -1, 0]]))
+
+    assert_array_equal(c.keep_feasible, [True, False])
+
+    # Test 4: interval constraint.
+    user_constraint = Bounds([-1, -np.inf, 2, 3], [1, np.inf, 10, 3],
+                             [False, True, True, True])
+    x0 = np.array([0, 10, 8, 5])
+    prepared_constraint = PreparedConstraint(user_constraint, x0, False)
+    c = CanonicalConstraint.from_PreparedConstraint(prepared_constraint)
+
+    assert_equal(c.n_eq, 1)
+    assert_equal(c.n_ineq, 4)
+
+    c_eq, c_ineq = c.fun(x0)
+    assert_array_equal(c_eq, [2])
+    assert_array_equal(c_ineq, [-1, -2, -1, -6])
+
+    J_eq, J_ineq = c.jac(x0)
+    assert_array_equal(J_eq, [[0, 0, 0, 1]])
+    assert_array_equal(J_ineq, [[1, 0, 0, 0],
+                                [0, 0, 1, 0],
+                                [-1, 0, 0, 0],
+                                [0, 0, -1, 0]])
+
+    assert_array_equal(c.keep_feasible, [False, True, False, True])
+
+
+def test_nonlinear_constraint():
+    n = 3
+    m = 5
+    rng = np.random.RandomState(0)
+    x0 = rng.rand(n)
+
+    fun, jac, hess = create_quadratic_function(n, m, rng)
+    f = fun(x0)
+    J = jac(x0)
+
+    lb = [-10, 3, -np.inf, -np.inf, -5]
+    ub = [10, 3, np.inf, 3, np.inf]
+    user_constraint = NonlinearConstraint(
+        fun, lb, ub, jac, hess, [True, False, False, True, False])
+
+    for sparse_jacobian in [False, True]:
+        prepared_constraint = PreparedConstraint(user_constraint, x0,
+                                                 sparse_jacobian)
+        c = CanonicalConstraint.from_PreparedConstraint(prepared_constraint)
+
+        assert_array_equal(c.n_eq, 1)
+        assert_array_equal(c.n_ineq, 4)
+
+        c_eq, c_ineq = c.fun(x0)
+        assert_array_equal(c_eq, [f[1] - lb[1]])
+        assert_array_equal(c_ineq, [f[3] - ub[3], lb[4] - f[4],
+                                    f[0] - ub[0], lb[0] - f[0]])
+
+        J_eq, J_ineq = c.jac(x0)
+        if sparse_jacobian:
+            J_eq = J_eq.toarray()
+            J_ineq = J_ineq.toarray()
+
+        assert_array_equal(J_eq, J[1, None])
+        assert_array_equal(J_ineq, np.vstack((J[3], -J[4], J[0], -J[0])))
+
+        v_eq = rng.rand(c.n_eq)
+        v_ineq = rng.rand(c.n_ineq)
+        v = np.zeros(m)
+        v[1] = v_eq[0]
+        v[3] = v_ineq[0]
+        v[4] = -v_ineq[1]
+        v[0] = v_ineq[2] - v_ineq[3]
+        assert_array_equal(c.hess(x0, v_eq, v_ineq), hess(x0, v))
+
+        assert_array_equal(c.keep_feasible, [True, False, True, True])
+
+
+def test_concatenation():
+    rng = np.random.RandomState(0)
+    n = 4
+    x0 = rng.rand(n)
+
+    f1 = x0
+    J1 = np.eye(n)
+    lb1 = [-1, -np.inf, -2, 3]
+    ub1 = [1, np.inf, np.inf, 3]
+    bounds = Bounds(lb1, ub1, [False, False, True, False])
+
+    fun, jac, hess = create_quadratic_function(n, 5, rng)
+    f2 = fun(x0)
+    J2 = jac(x0)
+    lb2 = [-10, 3, -np.inf, -np.inf, -5]
+    ub2 = [10, 3, np.inf, 5, np.inf]
+    nonlinear = NonlinearConstraint(
+        fun, lb2, ub2, jac, hess, [True, False, False, True, False])
+
+    for sparse_jacobian in [False, True]:
+        bounds_prepared = PreparedConstraint(bounds, x0, sparse_jacobian)
+        nonlinear_prepared = PreparedConstraint(nonlinear, x0, sparse_jacobian)
+
+        c1 = CanonicalConstraint.from_PreparedConstraint(bounds_prepared)
+        c2 = CanonicalConstraint.from_PreparedConstraint(nonlinear_prepared)
+        c = CanonicalConstraint.concatenate([c1, c2], sparse_jacobian)
+
+        assert_equal(c.n_eq, 2)
+        assert_equal(c.n_ineq, 7)
+
+        c_eq, c_ineq = c.fun(x0)
+        assert_array_equal(c_eq, [f1[3] - lb1[3], f2[1] - lb2[1]])
+        assert_array_equal(c_ineq, [lb1[2] - f1[2], f1[0] - ub1[0],
+                                    lb1[0] - f1[0], f2[3] - ub2[3],
+                                    lb2[4] - f2[4], f2[0] - ub2[0],
+                                    lb2[0] - f2[0]])
+
+        J_eq, J_ineq = c.jac(x0)
+        if sparse_jacobian:
+            J_eq = J_eq.toarray()
+            J_ineq = J_ineq.toarray()
+
+        assert_array_equal(J_eq, np.vstack((J1[3], J2[1])))
+        assert_array_equal(J_ineq, np.vstack((-J1[2], J1[0], -J1[0], J2[3],
+                                              -J2[4], J2[0], -J2[0])))
+
+        v_eq = rng.rand(c.n_eq)
+        v_ineq = rng.rand(c.n_ineq)
+        v = np.zeros(5)
+        v[1] = v_eq[1]
+        v[3] = v_ineq[3]
+        v[4] = -v_ineq[4]
+        v[0] = v_ineq[5] - v_ineq[6]
+        H = c.hess(x0, v_eq, v_ineq).dot(np.eye(n))
+        assert_array_equal(H, hess(x0, v))
+
+        assert_array_equal(c.keep_feasible,
+                           [True, False, False, True, False, True, True])
+
+
+def test_empty():
+    x = np.array([1, 2, 3])
+    c = CanonicalConstraint.empty(3)
+    assert_equal(c.n_eq, 0)
+    assert_equal(c.n_ineq, 0)
+
+    c_eq, c_ineq = c.fun(x)
+    assert_array_equal(c_eq, [])
+    assert_array_equal(c_ineq, [])
+
+    J_eq, J_ineq = c.jac(x)
+    assert_array_equal(J_eq, np.empty((0, 3)))
+    assert_array_equal(J_ineq, np.empty((0, 3)))
+
+    H = c.hess(x, None, None).toarray()
+    assert_array_equal(H, np.zeros((3, 3)))
+
+
+def test_initial_constraints_as_canonical():
+    # rng is only used to generate the coefficients of the quadratic
+    # function that is used by the nonlinear constraint.
+    rng = np.random.RandomState(0)
+
+    x0 = np.array([0.5, 0.4, 0.3, 0.2])
+    n = len(x0)
+
+    lb1 = [-1, -np.inf, -2, 3]
+    ub1 = [1, np.inf, np.inf, 3]
+    bounds = Bounds(lb1, ub1, [False, False, True, False])
+
+    fun, jac, hess = create_quadratic_function(n, 5, rng)
+    lb2 = [-10, 3, -np.inf, -np.inf, -5]
+    ub2 = [10, 3, np.inf, 5, np.inf]
+    nonlinear = NonlinearConstraint(
+        fun, lb2, ub2, jac, hess, [True, False, False, True, False])
+
+    for sparse_jacobian in [False, True]:
+        bounds_prepared = PreparedConstraint(bounds, x0, sparse_jacobian)
+        nonlinear_prepared = PreparedConstraint(nonlinear, x0, sparse_jacobian)
+
+        f1 = bounds_prepared.fun.f
+        J1 = bounds_prepared.fun.J
+        f2 = nonlinear_prepared.fun.f
+        J2 = nonlinear_prepared.fun.J
+
+        c_eq, c_ineq, J_eq, J_ineq = initial_constraints_as_canonical(
+            n, [bounds_prepared, nonlinear_prepared], sparse_jacobian)
+
+        assert_array_equal(c_eq, [f1[3] - lb1[3], f2[1] - lb2[1]])
+        assert_array_equal(c_ineq, [lb1[2] - f1[2], f1[0] - ub1[0],
+                                    lb1[0] - f1[0], f2[3] - ub2[3],
+                                    lb2[4] - f2[4], f2[0] - ub2[0],
+                                    lb2[0] - f2[0]])
+
+        if sparse_jacobian:
+            J1 = J1.toarray()
+            J2 = J2.toarray()
+            J_eq = J_eq.toarray()
+            J_ineq = J_ineq.toarray()
+
+        assert_array_equal(J_eq, np.vstack((J1[3], J2[1])))
+        assert_array_equal(J_ineq, np.vstack((-J1[2], J1[0], -J1[0], J2[3],
+                                              -J2[4], J2[0], -J2[0])))
+
+
+def test_initial_constraints_as_canonical_empty():
+    n = 3
+    for sparse_jacobian in [False, True]:
+        c_eq, c_ineq, J_eq, J_ineq = initial_constraints_as_canonical(
+            n, [], sparse_jacobian)
+
+        assert_array_equal(c_eq, [])
+        assert_array_equal(c_ineq, [])
+
+        if sparse_jacobian:
+            J_eq = J_eq.toarray()
+            J_ineq = J_ineq.toarray()
+
+        assert_array_equal(J_eq, np.empty((0, n)))
+        assert_array_equal(J_ineq, np.empty((0, n)))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_nested_minimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_nested_minimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..f9aa57058c6523d4106b26840ef447431d615cd6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_nested_minimize.py
@@ -0,0 +1,39 @@
+import pytest
+import numpy as np
+from scipy.optimize import minimize, NonlinearConstraint, rosen, rosen_der
+
+
+# Ignore this warning about inefficient use of Hessians
+# The bug only shows up with the default HUS
+@pytest.mark.filterwarnings(
+    "ignore:delta_grad == 0.0. Check if the approximated function is linear."
+)
+def test_gh21193():
+    # Test that nested minimization does not share Hessian objects
+    def identity(x):
+        return x[0]
+    def identity_jac(x):
+        a = np.zeros(len(x))
+        a[0] = 1
+        return a
+    constraint1 = NonlinearConstraint(identity, 0, 0, identity_jac)
+    constraint2 = NonlinearConstraint(identity, 0, 0, identity_jac)
+
+    # The default HUS for each should be distinct
+    assert constraint1.hess is not constraint2.hess
+
+    _ = minimize(
+        lambda x: minimize(
+            rosen,
+            x[1:],
+            jac=rosen_der,
+            constraints=constraint1,
+            method="trust-constr",
+            options={'maxiter': 2},
+        ).fun,
+        [1, 0, 0],
+        constraints=constraint2,
+        method="trust-constr",
+        options={'maxiter': 2},
+    )
+    # This test doesn't check that the output is correct, just that it doesn't crash
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_projections.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_projections.py
new file mode 100644
index 0000000000000000000000000000000000000000..6ff3c39d649d0ac663d9b71bb906f1daac021118
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_projections.py
@@ -0,0 +1,214 @@
+import numpy as np
+import scipy.linalg
+from scipy.sparse import csc_matrix
+from scipy.optimize._trustregion_constr.projections \
+    import projections, orthogonality
+from numpy.testing import (TestCase, assert_array_almost_equal,
+                           assert_equal, assert_allclose)
+
+try:
+    from sksparse.cholmod import cholesky_AAt  # noqa: F401
+    sksparse_available = True
+    available_sparse_methods = ("NormalEquation", "AugmentedSystem")
+except ImportError:
+    sksparse_available = False
+    available_sparse_methods = ("AugmentedSystem",)
+available_dense_methods = ('QRFactorization', 'SVDFactorization')
+
+
+class TestProjections(TestCase):
+
+    def test_nullspace_and_least_squares_sparse(self):
+        A_dense = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                            [0, 8, 7, 0, 1, 5, 9, 0],
+                            [1, 0, 0, 0, 0, 1, 2, 3]])
+        At_dense = A_dense.T
+        A = csc_matrix(A_dense)
+        test_points = ([1, 2, 3, 4, 5, 6, 7, 8],
+                       [1, 10, 3, 0, 1, 6, 7, 8],
+                       [1.12, 10, 0, 0, 100000, 6, 0.7, 8])
+
+        for method in available_sparse_methods:
+            Z, LS, _ = projections(A, method)
+            for z in test_points:
+                # Test if x is in the null_space
+                x = Z.matvec(z)
+                assert_array_almost_equal(A.dot(x), 0)
+                # Test orthogonality
+                assert_array_almost_equal(orthogonality(A, x), 0)
+                # Test if x is the least square solution
+                x = LS.matvec(z)
+                x2 = scipy.linalg.lstsq(At_dense, z)[0]
+                assert_array_almost_equal(x, x2)
+
+    def test_iterative_refinements_sparse(self):
+        A_dense = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                            [0, 8, 7, 0, 1, 5, 9, 0],
+                            [1, 0, 0, 0, 0, 1, 2, 3]])
+        A = csc_matrix(A_dense)
+        test_points = ([1, 2, 3, 4, 5, 6, 7, 8],
+                       [1, 10, 3, 0, 1, 6, 7, 8],
+                       [1.12, 10, 0, 0, 100000, 6, 0.7, 8],
+                       [1, 0, 0, 0, 0, 1, 2, 3+1e-10])
+
+        for method in available_sparse_methods:
+            Z, LS, _ = projections(A, method, orth_tol=1e-18, max_refin=100)
+            for z in test_points:
+                # Test if x is in the null_space
+                x = Z.matvec(z)
+                atol = 1e-13 * abs(x).max()
+                assert_allclose(A.dot(x), 0, atol=atol)
+                # Test orthogonality
+                assert_allclose(orthogonality(A, x), 0, atol=1e-13)
+
+    def test_rowspace_sparse(self):
+        A_dense = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                            [0, 8, 7, 0, 1, 5, 9, 0],
+                            [1, 0, 0, 0, 0, 1, 2, 3]])
+        A = csc_matrix(A_dense)
+        test_points = ([1, 2, 3],
+                       [1, 10, 3],
+                       [1.12, 10, 0])
+
+        for method in available_sparse_methods:
+            _, _, Y = projections(A, method)
+            for z in test_points:
+                # Test if x is solution of A x = z
+                x = Y.matvec(z)
+                assert_array_almost_equal(A.dot(x), z)
+                # Test if x is in the return row space of A
+                A_ext = np.vstack((A_dense, x))
+                assert_equal(np.linalg.matrix_rank(A_dense),
+                             np.linalg.matrix_rank(A_ext))
+
+    def test_nullspace_and_least_squares_dense(self):
+        A = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                      [0, 8, 7, 0, 1, 5, 9, 0],
+                      [1, 0, 0, 0, 0, 1, 2, 3]])
+        At = A.T
+        test_points = ([1, 2, 3, 4, 5, 6, 7, 8],
+                       [1, 10, 3, 0, 1, 6, 7, 8],
+                       [1.12, 10, 0, 0, 100000, 6, 0.7, 8])
+
+        for method in available_dense_methods:
+            Z, LS, _ = projections(A, method)
+            for z in test_points:
+                # Test if x is in the null_space
+                x = Z.matvec(z)
+                assert_array_almost_equal(A.dot(x), 0)
+                # Test orthogonality
+                assert_array_almost_equal(orthogonality(A, x), 0)
+                # Test if x is the least square solution
+                x = LS.matvec(z)
+                x2 = scipy.linalg.lstsq(At, z)[0]
+                assert_array_almost_equal(x, x2)
+
+    def test_compare_dense_and_sparse(self):
+        D = np.diag(range(1, 101))
+        A = np.hstack([D, D, D, D])
+        A_sparse = csc_matrix(A)
+        np.random.seed(0)
+
+        Z, LS, Y = projections(A)
+        Z_sparse, LS_sparse, Y_sparse = projections(A_sparse)
+        for k in range(20):
+            z = np.random.normal(size=(400,))
+            assert_array_almost_equal(Z.dot(z), Z_sparse.dot(z))
+            assert_array_almost_equal(LS.dot(z), LS_sparse.dot(z))
+            x = np.random.normal(size=(100,))
+            assert_array_almost_equal(Y.dot(x), Y_sparse.dot(x))
+
+    def test_compare_dense_and_sparse2(self):
+        D1 = np.diag([-1.7, 1, 0.5])
+        D2 = np.diag([1, -0.6, -0.3])
+        D3 = np.diag([-0.3, -1.5, 2])
+        A = np.hstack([D1, D2, D3])
+        A_sparse = csc_matrix(A)
+        np.random.seed(0)
+
+        Z, LS, Y = projections(A)
+        Z_sparse, LS_sparse, Y_sparse = projections(A_sparse)
+        for k in range(1):
+            z = np.random.normal(size=(9,))
+            assert_array_almost_equal(Z.dot(z), Z_sparse.dot(z))
+            assert_array_almost_equal(LS.dot(z), LS_sparse.dot(z))
+            x = np.random.normal(size=(3,))
+            assert_array_almost_equal(Y.dot(x), Y_sparse.dot(x))
+
+    def test_iterative_refinements_dense(self):
+        A = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                            [0, 8, 7, 0, 1, 5, 9, 0],
+                            [1, 0, 0, 0, 0, 1, 2, 3]])
+        test_points = ([1, 2, 3, 4, 5, 6, 7, 8],
+                       [1, 10, 3, 0, 1, 6, 7, 8],
+                       [1, 0, 0, 0, 0, 1, 2, 3+1e-10])
+
+        for method in available_dense_methods:
+            Z, LS, _ = projections(A, method, orth_tol=1e-18, max_refin=10)
+            for z in test_points:
+                # Test if x is in the null_space
+                x = Z.matvec(z)
+                assert_allclose(A.dot(x), 0, rtol=0, atol=2.5e-14)
+                # Test orthogonality
+                assert_allclose(orthogonality(A, x), 0, rtol=0, atol=5e-16)
+
+    def test_rowspace_dense(self):
+        A = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                      [0, 8, 7, 0, 1, 5, 9, 0],
+                      [1, 0, 0, 0, 0, 1, 2, 3]])
+        test_points = ([1, 2, 3],
+                       [1, 10, 3],
+                       [1.12, 10, 0])
+
+        for method in available_dense_methods:
+            _, _, Y = projections(A, method)
+            for z in test_points:
+                # Test if x is solution of A x = z
+                x = Y.matvec(z)
+                assert_array_almost_equal(A.dot(x), z)
+                # Test if x is in the return row space of A
+                A_ext = np.vstack((A, x))
+                assert_equal(np.linalg.matrix_rank(A),
+                             np.linalg.matrix_rank(A_ext))
+
+
+class TestOrthogonality(TestCase):
+
+    def test_dense_matrix(self):
+        A = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                      [0, 8, 7, 0, 1, 5, 9, 0],
+                      [1, 0, 0, 0, 0, 1, 2, 3]])
+        test_vectors = ([-1.98931144, -1.56363389,
+                         -0.84115584, 2.2864762,
+                         5.599141, 0.09286976,
+                         1.37040802, -0.28145812],
+                        [697.92794044, -4091.65114008,
+                         -3327.42316335, 836.86906951,
+                         99434.98929065, -1285.37653682,
+                         -4109.21503806, 2935.29289083])
+        test_expected_orth = (0, 0)
+
+        for i in range(len(test_vectors)):
+            x = test_vectors[i]
+            orth = test_expected_orth[i]
+            assert_array_almost_equal(orthogonality(A, x), orth)
+
+    def test_sparse_matrix(self):
+        A = np.array([[1, 2, 3, 4, 0, 5, 0, 7],
+                      [0, 8, 7, 0, 1, 5, 9, 0],
+                      [1, 0, 0, 0, 0, 1, 2, 3]])
+        A = csc_matrix(A)
+        test_vectors = ([-1.98931144, -1.56363389,
+                         -0.84115584, 2.2864762,
+                         5.599141, 0.09286976,
+                         1.37040802, -0.28145812],
+                        [697.92794044, -4091.65114008,
+                         -3327.42316335, 836.86906951,
+                         99434.98929065, -1285.37653682,
+                         -4109.21503806, 2935.29289083])
+        test_expected_orth = (0, 0)
+
+        for i in range(len(test_vectors)):
+            x = test_vectors[i]
+            orth = test_expected_orth[i]
+            assert_array_almost_equal(orthogonality(A, x), orth)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py
new file mode 100644
index 0000000000000000000000000000000000000000..70e65e53b9d2389541c0aab45b94b1d30dcdd146
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py
@@ -0,0 +1,645 @@
+import numpy as np
+from scipy.sparse import csc_matrix
+from scipy.optimize._trustregion_constr.qp_subproblem \
+    import (eqp_kktfact,
+            projected_cg,
+            box_intersections,
+            sphere_intersections,
+            box_sphere_intersections,
+            modified_dogleg)
+from scipy.optimize._trustregion_constr.projections \
+    import projections
+from numpy.testing import TestCase, assert_array_almost_equal, assert_equal
+import pytest
+
+
+class TestEQPDirectFactorization(TestCase):
+
+    # From Example 16.2 Nocedal/Wright "Numerical
+    # Optimization" p.452.
+    def test_nocedal_example(self):
+        H = csc_matrix([[6, 2, 1],
+                        [2, 5, 2],
+                        [1, 2, 4]])
+        A = csc_matrix([[1, 0, 1],
+                        [0, 1, 1]])
+        c = np.array([-8, -3, -3])
+        b = -np.array([3, 0])
+        x, lagrange_multipliers = eqp_kktfact(H, c, A, b)
+        assert_array_almost_equal(x, [2, -1, 1])
+        assert_array_almost_equal(lagrange_multipliers, [3, -2])
+
+
+class TestSphericalBoundariesIntersections(TestCase):
+
+    def test_2d_sphere_constraints(self):
+        # Interior initial point
+        ta, tb, intersect = sphere_intersections([0, 0],
+                                                 [1, 0], 0.5)
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # No intersection between line and circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [0, 1], 1)
+        assert_equal(intersect, False)
+
+        # Outside initial point pointing toward outside the circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [1, 0], 1)
+        assert_equal(intersect, False)
+
+        # Outside initial point pointing toward inside the circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [-1, 0], 1.5)
+        assert_array_almost_equal([ta, tb], [0.5, 1])
+        assert_equal(intersect, True)
+
+        # Initial point on the boundary
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [1, 0], 2)
+        assert_array_almost_equal([ta, tb], [0, 0])
+        assert_equal(intersect, True)
+
+    def test_2d_sphere_constraints_line_intersections(self):
+        # Interior initial point
+        ta, tb, intersect = sphere_intersections([0, 0],
+                                                 [1, 0], 0.5,
+                                                 entire_line=True)
+        assert_array_almost_equal([ta, tb], [-0.5, 0.5])
+        assert_equal(intersect, True)
+
+        # No intersection between line and circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [0, 1], 1,
+                                                 entire_line=True)
+        assert_equal(intersect, False)
+
+        # Outside initial point pointing toward outside the circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [1, 0], 1,
+                                                 entire_line=True)
+        assert_array_almost_equal([ta, tb], [-3, -1])
+        assert_equal(intersect, True)
+
+        # Outside initial point pointing toward inside the circle
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [-1, 0], 1.5,
+                                                 entire_line=True)
+        assert_array_almost_equal([ta, tb], [0.5, 3.5])
+        assert_equal(intersect, True)
+
+        # Initial point on the boundary
+        ta, tb, intersect = sphere_intersections([2, 0],
+                                                 [1, 0], 2,
+                                                 entire_line=True)
+        assert_array_almost_equal([ta, tb], [-4, 0])
+        assert_equal(intersect, True)
+
+
+class TestBoxBoundariesIntersections(TestCase):
+
+    def test_2d_box_constraints(self):
+        # Box constraint in the direction of vector d
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [1, 1], [3, 3])
+        assert_array_almost_equal([ta, tb], [0.5, 1])
+        assert_equal(intersect, True)
+
+        # Negative direction
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [1, -3], [3, -1])
+        assert_equal(intersect, False)
+
+        # Some constraints are absent (set to +/- inf)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-np.inf, 1],
+                                              [np.inf, np.inf])
+        assert_array_almost_equal([ta, tb], [0.5, 1])
+        assert_equal(intersect, True)
+
+        # Intersect on the face of the box
+        ta, tb, intersect = box_intersections([1, 0], [0, 1],
+                                              [1, 1], [3, 3])
+        assert_array_almost_equal([ta, tb], [1, 1])
+        assert_equal(intersect, True)
+
+        # Interior initial point
+        ta, tb, intersect = box_intersections([0, 0], [4, 4],
+                                              [-2, -3], [3, 2])
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # No intersection between line and box constraints
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, -3], [-1, -1])
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, 3], [-1, 1])
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, -np.inf],
+                                              [-1, np.inf])
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([0, 0], [1, 100],
+                                              [1, 1], [3, 3])
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([0.99, 0], [0, 2],
+                                                         [1, 1], [3, 3])
+        assert_equal(intersect, False)
+
+        # Initial point on the boundary
+        ta, tb, intersect = box_intersections([2, 2], [0, 1],
+                                              [-2, -2], [2, 2])
+        assert_array_almost_equal([ta, tb], [0, 0])
+        assert_equal(intersect, True)
+
+    def test_2d_box_constraints_entire_line(self):
+        # Box constraint in the direction of vector d
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [1, 1], [3, 3],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [0.5, 1.5])
+        assert_equal(intersect, True)
+
+        # Negative direction
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [1, -3], [3, -1],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [-1.5, -0.5])
+        assert_equal(intersect, True)
+
+        # Some constraints are absent (set to +/- inf)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-np.inf, 1],
+                                              [np.inf, np.inf],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [0.5, np.inf])
+        assert_equal(intersect, True)
+
+        # Intersect on the face of the box
+        ta, tb, intersect = box_intersections([1, 0], [0, 1],
+                                              [1, 1], [3, 3],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [1, 3])
+        assert_equal(intersect, True)
+
+        # Interior initial point
+        ta, tb, intersect = box_intersections([0, 0], [4, 4],
+                                              [-2, -3], [3, 2],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [-0.5, 0.5])
+        assert_equal(intersect, True)
+
+        # No intersection between line and box constraints
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, -3], [-1, -1],
+                                              entire_line=True)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, 3], [-1, 1],
+                                              entire_line=True)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([2, 0], [0, 2],
+                                              [-3, -np.inf],
+                                              [-1, np.inf],
+                                              entire_line=True)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([0, 0], [1, 100],
+                                              [1, 1], [3, 3],
+                                              entire_line=True)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_intersections([0.99, 0], [0, 2],
+                                              [1, 1], [3, 3],
+                                              entire_line=True)
+        assert_equal(intersect, False)
+
+        # Initial point on the boundary
+        ta, tb, intersect = box_intersections([2, 2], [0, 1],
+                                              [-2, -2], [2, 2],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [-4, 0])
+        assert_equal(intersect, True)
+
+    def test_3d_box_constraints(self):
+        # Simple case
+        ta, tb, intersect = box_intersections([1, 1, 0], [0, 0, 1],
+                                              [1, 1, 1], [3, 3, 3])
+        assert_array_almost_equal([ta, tb], [1, 1])
+        assert_equal(intersect, True)
+
+        # Negative direction
+        ta, tb, intersect = box_intersections([1, 1, 0], [0, 0, -1],
+                                              [1, 1, 1], [3, 3, 3])
+        assert_equal(intersect, False)
+
+        # Interior point
+        ta, tb, intersect = box_intersections([2, 2, 2], [0, -1, 1],
+                                              [1, 1, 1], [3, 3, 3])
+        assert_array_almost_equal([ta, tb], [0, 1])
+        assert_equal(intersect, True)
+
+    def test_3d_box_constraints_entire_line(self):
+        # Simple case
+        ta, tb, intersect = box_intersections([1, 1, 0], [0, 0, 1],
+                                              [1, 1, 1], [3, 3, 3],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [1, 3])
+        assert_equal(intersect, True)
+
+        # Negative direction
+        ta, tb, intersect = box_intersections([1, 1, 0], [0, 0, -1],
+                                              [1, 1, 1], [3, 3, 3],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [-3, -1])
+        assert_equal(intersect, True)
+
+        # Interior point
+        ta, tb, intersect = box_intersections([2, 2, 2], [0, -1, 1],
+                                              [1, 1, 1], [3, 3, 3],
+                                              entire_line=True)
+        assert_array_almost_equal([ta, tb], [-1, 1])
+        assert_equal(intersect, True)
+
+
+class TestBoxSphereBoundariesIntersections(TestCase):
+
+    def test_2d_box_constraints(self):
+        # Both constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-2, 2],
+                                                     [-1, -2], [1, 2], 2,
+                                                     entire_line=False)
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # None of the constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-1, 1],
+                                                     [-1, -3], [1, 3], 10,
+                                                     entire_line=False)
+        assert_array_almost_equal([ta, tb], [0, 1])
+        assert_equal(intersect, True)
+
+        # Box constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [-1, -3], [1, 3], 10,
+                                                     entire_line=False)
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # Spherical constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [-1, -3], [1, 3], 2,
+                                                     entire_line=False)
+        assert_array_almost_equal([ta, tb], [0, 0.25])
+        assert_equal(intersect, True)
+
+        # Infeasible problems
+        ta, tb, intersect = box_sphere_intersections([2, 2], [-4, 4],
+                                                     [-1, -3], [1, 3], 2,
+                                                     entire_line=False)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [2, 4], [2, 4], 2,
+                                                     entire_line=False)
+        assert_equal(intersect, False)
+
+    def test_2d_box_constraints_entire_line(self):
+        # Both constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-2, 2],
+                                                     [-1, -2], [1, 2], 2,
+                                                     entire_line=True)
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # None of the constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-1, 1],
+                                                     [-1, -3], [1, 3], 10,
+                                                     entire_line=True)
+        assert_array_almost_equal([ta, tb], [0, 2])
+        assert_equal(intersect, True)
+
+        # Box constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [-1, -3], [1, 3], 10,
+                                                     entire_line=True)
+        assert_array_almost_equal([ta, tb], [0, 0.5])
+        assert_equal(intersect, True)
+
+        # Spherical constraints are active
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [-1, -3], [1, 3], 2,
+                                                     entire_line=True)
+        assert_array_almost_equal([ta, tb], [0, 0.25])
+        assert_equal(intersect, True)
+
+        # Infeasible problems
+        ta, tb, intersect = box_sphere_intersections([2, 2], [-4, 4],
+                                                     [-1, -3], [1, 3], 2,
+                                                     entire_line=True)
+        assert_equal(intersect, False)
+        ta, tb, intersect = box_sphere_intersections([1, 1], [-4, 4],
+                                                     [2, 4], [2, 4], 2,
+                                                     entire_line=True)
+        assert_equal(intersect, False)
+
+
+class TestModifiedDogleg(TestCase):
+
+    def test_cauchypoint_equalsto_newtonpoint(self):
+        A = np.array([[1, 8]])
+        b = np.array([-16])
+        _, _, Y = projections(A)
+        newton_point = np.array([0.24615385, 1.96923077])
+
+        # Newton point inside boundaries
+        x = modified_dogleg(A, Y, b, 2, [-np.inf, -np.inf], [np.inf, np.inf])
+        assert_array_almost_equal(x, newton_point)
+
+        # Spherical constraint active
+        x = modified_dogleg(A, Y, b, 1, [-np.inf, -np.inf], [np.inf, np.inf])
+        assert_array_almost_equal(x, newton_point/np.linalg.norm(newton_point))
+
+        # Box constraints active
+        x = modified_dogleg(A, Y, b, 2, [-np.inf, -np.inf], [0.1, np.inf])
+        assert_array_almost_equal(x, (newton_point/newton_point[0]) * 0.1)
+
+    def test_3d_example(self):
+        A = np.array([[1, 8, 1],
+                      [4, 2, 2]])
+        b = np.array([-16, 2])
+        Z, LS, Y = projections(A)
+
+        newton_point = np.array([-1.37090909, 2.23272727, -0.49090909])
+        cauchy_point = np.array([0.11165723, 1.73068711, 0.16748585])
+        origin = np.zeros_like(newton_point)
+
+        # newton_point inside boundaries
+        x = modified_dogleg(A, Y, b, 3, [-np.inf, -np.inf, -np.inf],
+                            [np.inf, np.inf, np.inf])
+        assert_array_almost_equal(x, newton_point)
+
+        # line between cauchy_point and newton_point contains best point
+        # (spherical constraint is active).
+        x = modified_dogleg(A, Y, b, 2, [-np.inf, -np.inf, -np.inf],
+                            [np.inf, np.inf, np.inf])
+        z = cauchy_point
+        d = newton_point-cauchy_point
+        t = ((x-z)/(d))
+        assert_array_almost_equal(t, np.full(3, 0.40807330))
+        assert_array_almost_equal(np.linalg.norm(x), 2)
+
+        # line between cauchy_point and newton_point contains best point
+        # (box constraint is active).
+        x = modified_dogleg(A, Y, b, 5, [-1, -np.inf, -np.inf],
+                            [np.inf, np.inf, np.inf])
+        z = cauchy_point
+        d = newton_point-cauchy_point
+        t = ((x-z)/(d))
+        assert_array_almost_equal(t, np.full(3, 0.7498195))
+        assert_array_almost_equal(x[0], -1)
+
+        # line between origin and cauchy_point contains best point
+        # (spherical constraint is active).
+        x = modified_dogleg(A, Y, b, 1, [-np.inf, -np.inf, -np.inf],
+                            [np.inf, np.inf, np.inf])
+        z = origin
+        d = cauchy_point
+        t = ((x-z)/(d))
+        assert_array_almost_equal(t, np.full(3, 0.573936265))
+        assert_array_almost_equal(np.linalg.norm(x), 1)
+
+        # line between origin and newton_point contains best point
+        # (box constraint is active).
+        x = modified_dogleg(A, Y, b, 2, [-np.inf, -np.inf, -np.inf],
+                            [np.inf, 1, np.inf])
+        z = origin
+        d = newton_point
+        t = ((x-z)/(d))
+        assert_array_almost_equal(t, np.full(3, 0.4478827364))
+        assert_array_almost_equal(x[1], 1)
+
+
+class TestProjectCG(TestCase):
+
+    # From Example 16.2 Nocedal/Wright "Numerical
+    # Optimization" p.452.
+    def test_nocedal_example(self):
+        H = csc_matrix([[6, 2, 1],
+                        [2, 5, 2],
+                        [1, 2, 4]])
+        A = csc_matrix([[1, 0, 1],
+                        [0, 1, 1]])
+        c = np.array([-8, -3, -3])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b)
+        assert_equal(info["stop_cond"], 4)
+        assert_equal(info["hits_boundary"], False)
+        assert_array_almost_equal(x, [2, -1, 1])
+
+    def test_compare_with_direct_fact(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b, tol=0)
+        x_kkt, _ = eqp_kktfact(H, c, A, b)
+        assert_equal(info["stop_cond"], 1)
+        assert_equal(info["hits_boundary"], False)
+        assert_array_almost_equal(x, x_kkt)
+
+    def test_trust_region_infeasible(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        trust_radius = 1
+        Z, _, Y = projections(A)
+        with pytest.raises(ValueError):
+            projected_cg(H, c, Z, Y, b, trust_radius=trust_radius)
+
+    def test_trust_region_barely_feasible(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        trust_radius = 2.32379000772445021283
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               trust_radius=trust_radius)
+        assert_equal(info["stop_cond"], 2)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(np.linalg.norm(x), trust_radius)
+        assert_array_almost_equal(x, -Y.dot(b))
+
+    def test_hits_boundary(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        trust_radius = 3
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               trust_radius=trust_radius)
+        assert_equal(info["stop_cond"], 2)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(np.linalg.norm(x), trust_radius)
+
+    def test_negative_curvature_unconstrained(self):
+        H = csc_matrix([[1, 2, 1, 3],
+                        [2, 0, 2, 4],
+                        [1, 2, 0, 2],
+                        [3, 4, 2, 0]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 0, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        with pytest.raises(ValueError):
+            projected_cg(H, c, Z, Y, b, tol=0)
+
+    def test_negative_curvature(self):
+        H = csc_matrix([[1, 2, 1, 3],
+                        [2, 0, 2, 4],
+                        [1, 2, 0, 2],
+                        [3, 4, 2, 0]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 0, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        trust_radius = 1000
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               trust_radius=trust_radius)
+        assert_equal(info["stop_cond"], 3)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(np.linalg.norm(x), trust_radius)
+
+    # The box constraints are inactive at the solution but
+    # are active during the iterations.
+    def test_inactive_box_constraints(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               lb=[0.5, -np.inf,
+                                   -np.inf, -np.inf],
+                               return_all=True)
+        x_kkt, _ = eqp_kktfact(H, c, A, b)
+        assert_equal(info["stop_cond"], 1)
+        assert_equal(info["hits_boundary"], False)
+        assert_array_almost_equal(x, x_kkt)
+
+    # The box constraints active and the termination is
+    # by maximum iterations (infeasible interaction).
+    def test_active_box_constraints_maximum_iterations_reached(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               lb=[0.8, -np.inf,
+                                   -np.inf, -np.inf],
+                               return_all=True)
+        assert_equal(info["stop_cond"], 1)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(A.dot(x), -b)
+        assert_array_almost_equal(x[0], 0.8)
+
+    # The box constraints are active and the termination is
+    # because it hits boundary (without infeasible interaction).
+    def test_active_box_constraints_hits_boundaries(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        trust_radius = 3
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               ub=[np.inf, np.inf, 1.6, np.inf],
+                               trust_radius=trust_radius,
+                               return_all=True)
+        assert_equal(info["stop_cond"], 2)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(x[2], 1.6)
+
+    # The box constraints are active and the termination is
+    # because it hits boundary (infeasible interaction).
+    def test_active_box_constraints_hits_boundaries_infeasible_iter(self):
+        H = csc_matrix([[6, 2, 1, 3],
+                        [2, 5, 2, 4],
+                        [1, 2, 4, 5],
+                        [3, 4, 5, 7]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 1, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        trust_radius = 4
+        Z, _, Y = projections(A)
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               ub=[np.inf, 0.1, np.inf, np.inf],
+                               trust_radius=trust_radius,
+                               return_all=True)
+        assert_equal(info["stop_cond"], 2)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(x[1], 0.1)
+
+    # The box constraints are active and the termination is
+    # because it hits boundary (no infeasible interaction).
+    def test_active_box_constraints_negative_curvature(self):
+        H = csc_matrix([[1, 2, 1, 3],
+                        [2, 0, 2, 4],
+                        [1, 2, 0, 2],
+                        [3, 4, 2, 0]])
+        A = csc_matrix([[1, 0, 1, 0],
+                        [0, 1, 0, 1]])
+        c = np.array([-2, -3, -3, 1])
+        b = -np.array([3, 0])
+        Z, _, Y = projections(A)
+        trust_radius = 1000
+        x, info = projected_cg(H, c, Z, Y, b,
+                               tol=0,
+                               ub=[np.inf, np.inf, 100, np.inf],
+                               trust_radius=trust_radius)
+        assert_equal(info["stop_cond"], 3)
+        assert_equal(info["hits_boundary"], True)
+        assert_array_almost_equal(x[2], 100)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_report.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_report.py
new file mode 100644
index 0000000000000000000000000000000000000000..66fa5bd17f80a907db425c927c08e5dc0797028e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tests/test_report.py
@@ -0,0 +1,34 @@
+import pytest
+import numpy as np
+from scipy.optimize import minimize, Bounds
+
+def test_gh10880():
+    # checks that verbose reporting works with trust-constr for
+    # bound-constrained problems
+    bnds = Bounds(1, 2)
+    opts = {'maxiter': 1000, 'verbose': 2}
+    minimize(lambda x: x**2, x0=2., method='trust-constr',
+             bounds=bnds, options=opts)
+
+    opts = {'maxiter': 1000, 'verbose': 3}
+    minimize(lambda x: x**2, x0=2., method='trust-constr',
+             bounds=bnds, options=opts)
+
+@pytest.mark.xslow
+def test_gh12922():
+    # checks that verbose reporting works with trust-constr for
+    # general constraints
+    def objective(x):
+        return np.array([(np.sum((x+1)**4))])
+
+    cons = {'type': 'ineq', 'fun': lambda x: -x[0]**2}
+    n = 25
+    x0 = np.linspace(-5, 5, n)
+
+    opts = {'maxiter': 1000, 'verbose': 2}
+    minimize(objective, x0=x0, method='trust-constr',
+                      constraints=cons, options=opts)
+
+    opts = {'maxiter': 1000, 'verbose': 3}
+    minimize(objective, x0=x0, method='trust-constr',
+                      constraints=cons, options=opts)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tr_interior_point.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tr_interior_point.py
new file mode 100644
index 0000000000000000000000000000000000000000..e14b3f366fba818d9174af97fa91e065bf26e826
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_constr/tr_interior_point.py
@@ -0,0 +1,361 @@
+"""Trust-region interior point method.
+
+References
+----------
+.. [1] Byrd, Richard H., Mary E. Hribar, and Jorge Nocedal.
+       "An interior point algorithm for large-scale nonlinear
+       programming." SIAM Journal on Optimization 9.4 (1999): 877-900.
+.. [2] Byrd, Richard H., Guanghui Liu, and Jorge Nocedal.
+       "On the local behavior of an interior point method for
+       nonlinear programming." Numerical analysis 1997 (1997): 37-56.
+.. [3] Nocedal, Jorge, and Stephen J. Wright. "Numerical optimization"
+       Second Edition (2006).
+"""
+
+import scipy.sparse as sps
+import numpy as np
+from .equality_constrained_sqp import equality_constrained_sqp
+from scipy.sparse.linalg import LinearOperator
+
+__all__ = ['tr_interior_point']
+
+
+class BarrierSubproblem:
+    """
+    Barrier optimization problem:
+        minimize fun(x) - barrier_parameter*sum(log(s))
+        subject to: constr_eq(x)     = 0
+                  constr_ineq(x) + s = 0
+    """
+
+    def __init__(self, x0, s0, fun, grad, lagr_hess, n_vars, n_ineq, n_eq,
+                 constr, jac, barrier_parameter, tolerance,
+                 enforce_feasibility, global_stop_criteria,
+                 xtol, fun0, grad0, constr_ineq0, jac_ineq0, constr_eq0,
+                 jac_eq0, finite_diff_bounds):
+        # Store parameters
+        self.n_vars = n_vars
+        self.x0 = x0
+        self.s0 = s0
+        self.fun = fun
+        self.grad = grad
+        self.lagr_hess = lagr_hess
+        self.constr = constr
+        self.jac = jac
+        self.barrier_parameter = barrier_parameter
+        self.tolerance = tolerance
+        self.n_eq = n_eq
+        self.n_ineq = n_ineq
+        self.enforce_feasibility = enforce_feasibility
+        self.global_stop_criteria = global_stop_criteria
+        self.xtol = xtol
+        self.fun0 = self._compute_function(fun0, constr_ineq0, s0)
+        self.grad0 = self._compute_gradient(grad0)
+        self.constr0 = self._compute_constr(constr_ineq0, constr_eq0, s0)
+        self.jac0 = self._compute_jacobian(jac_eq0, jac_ineq0, s0)
+        self.terminate = False
+        self.lb = finite_diff_bounds[0]
+        self.ub = finite_diff_bounds[1]
+
+    def update(self, barrier_parameter, tolerance):
+        self.barrier_parameter = barrier_parameter
+        self.tolerance = tolerance
+
+    def get_slack(self, z):
+        return z[self.n_vars:self.n_vars+self.n_ineq]
+
+    def get_variables(self, z):
+        return z[:self.n_vars]
+
+    def function_and_constraints(self, z):
+        """Returns barrier function and constraints at given point.
+
+        For z = [x, s], returns barrier function:
+            function(z) = fun(x) - barrier_parameter*sum(log(s))
+        and barrier constraints:
+            constraints(z) = [   constr_eq(x)     ]
+                             [ constr_ineq(x) + s ]
+
+        """
+        # Get variables and slack variables
+        x = self.get_variables(z)
+        s = self.get_slack(z)
+
+        # Compute function and constraints,
+        # making sure x is within any strict bounds
+        if np.any((x < self.lb) | (x > self.ub)):
+            # If x is out of the strict bounds, set f = inf,
+            # and just set both equality and inequality
+            # constraints to 0 since we can't evaluate
+            # them separately.
+            f = np.inf
+            c_eq = np.full(self.n_eq, 0.)
+            c_ineq = np.full(self.n_ineq, 0.)
+        else:
+            f = self.fun(x)
+            c_eq, c_ineq = self.constr(x)
+
+        # Return objective function and constraints
+        return (self._compute_function(f, c_ineq, s),
+                self._compute_constr(c_ineq, c_eq, s))
+
+    def _compute_function(self, f, c_ineq, s):
+        # Use technique from Nocedal and Wright book, ref [3]_, p.576,
+        # to guarantee constraints from `enforce_feasibility`
+        # stay feasible along iterations.
+        s[self.enforce_feasibility] = -c_ineq[self.enforce_feasibility]
+        log_s = [np.log(s_i) if s_i > 0 else -np.inf for s_i in s]
+        # Compute barrier objective function
+        return f - self.barrier_parameter*np.sum(log_s)
+
+    def _compute_constr(self, c_ineq, c_eq, s):
+        # Compute barrier constraint
+        return np.hstack((c_eq,
+                          c_ineq + s))
+
+    def scaling(self, z):
+        """Returns scaling vector.
+        Given by:
+            scaling = [ones(n_vars), s]
+        """
+        s = self.get_slack(z)
+        diag_elements = np.hstack((np.ones(self.n_vars), s))
+
+        # Diagonal matrix
+        def matvec(vec):
+            return diag_elements*vec
+        return LinearOperator((self.n_vars+self.n_ineq,
+                               self.n_vars+self.n_ineq),
+                              matvec)
+
+    def gradient_and_jacobian(self, z):
+        """Returns scaled gradient.
+
+        Return scaled gradient:
+            gradient = [             grad(x)             ]
+                       [ -barrier_parameter*ones(n_ineq) ]
+        and scaled Jacobian matrix:
+            jacobian = [  jac_eq(x)  0  ]
+                       [ jac_ineq(x) S  ]
+        Both of them scaled by the previously defined scaling factor.
+        """
+        # Get variables and slack variables
+        x = self.get_variables(z)
+        s = self.get_slack(z)
+        # Compute first derivatives
+        g = self.grad(x)
+        J_eq, J_ineq = self.jac(x)
+        # Return gradient and Jacobian
+        return (self._compute_gradient(g),
+                self._compute_jacobian(J_eq, J_ineq, s))
+
+    def _compute_gradient(self, g):
+        return np.hstack((g, -self.barrier_parameter*np.ones(self.n_ineq)))
+
+    def _compute_jacobian(self, J_eq, J_ineq, s):
+        if self.n_ineq == 0:
+            return J_eq
+        else:
+            if sps.issparse(J_eq) or sps.issparse(J_ineq):
+                # It is expected that J_eq and J_ineq
+                # are already `csr_matrix` because of
+                # the way ``BoxConstraint``, ``NonlinearConstraint``
+                # and ``LinearConstraint`` are defined.
+                J_eq = sps.csr_matrix(J_eq)
+                J_ineq = sps.csr_matrix(J_ineq)
+                return self._assemble_sparse_jacobian(J_eq, J_ineq, s)
+            else:
+                S = np.diag(s)
+                zeros = np.zeros((self.n_eq, self.n_ineq))
+                # Convert to matrix
+                if sps.issparse(J_ineq):
+                    J_ineq = J_ineq.toarray()
+                if sps.issparse(J_eq):
+                    J_eq = J_eq.toarray()
+                # Concatenate matrices
+                return np.block([[J_eq, zeros],
+                                 [J_ineq, S]])
+
+    def _assemble_sparse_jacobian(self, J_eq, J_ineq, s):
+        """Assemble sparse Jacobian given its components.
+
+        Given ``J_eq``, ``J_ineq`` and ``s`` returns:
+            jacobian = [ J_eq,     0     ]
+                       [ J_ineq, diag(s) ]
+
+        It is equivalent to:
+            sps.bmat([[ J_eq,   None    ],
+                      [ J_ineq, diag(s) ]], "csr")
+        but significantly more efficient for this
+        given structure.
+        """
+        n_vars, n_ineq, n_eq = self.n_vars, self.n_ineq, self.n_eq
+        J_aux = sps.vstack([J_eq, J_ineq], "csr")
+        indptr, indices, data = J_aux.indptr, J_aux.indices, J_aux.data
+        new_indptr = indptr + np.hstack((np.zeros(n_eq, dtype=int),
+                                         np.arange(n_ineq+1, dtype=int)))
+        size = indices.size+n_ineq
+        new_indices = np.empty(size)
+        new_data = np.empty(size)
+        mask = np.full(size, False, bool)
+        mask[new_indptr[-n_ineq:]-1] = True
+        new_indices[mask] = n_vars+np.arange(n_ineq)
+        new_indices[~mask] = indices
+        new_data[mask] = s
+        new_data[~mask] = data
+        J = sps.csr_matrix((new_data, new_indices, new_indptr),
+                           (n_eq + n_ineq, n_vars + n_ineq))
+        return J
+
+    def lagrangian_hessian_x(self, z, v):
+        """Returns Lagrangian Hessian (in relation to `x`) -> Hx"""
+        x = self.get_variables(z)
+        # Get lagrange multipliers related to nonlinear equality constraints
+        v_eq = v[:self.n_eq]
+        # Get lagrange multipliers related to nonlinear ineq. constraints
+        v_ineq = v[self.n_eq:self.n_eq+self.n_ineq]
+        lagr_hess = self.lagr_hess
+        return lagr_hess(x, v_eq, v_ineq)
+
+    def lagrangian_hessian_s(self, z, v):
+        """Returns scaled Lagrangian Hessian (in relation to`s`) -> S Hs S"""
+        s = self.get_slack(z)
+        # Using the primal formulation:
+        #     S Hs S = diag(s)*diag(barrier_parameter/s**2)*diag(s).
+        # Reference [1]_ p. 882, formula (3.1)
+        primal = self.barrier_parameter
+        # Using the primal-dual formulation
+        #     S Hs S = diag(s)*diag(v/s)*diag(s)
+        # Reference [1]_ p. 883, formula (3.11)
+        primal_dual = v[-self.n_ineq:]*s
+        # Uses the primal-dual formulation for
+        # positives values of v_ineq, and primal
+        # formulation for the remaining ones.
+        return np.where(v[-self.n_ineq:] > 0, primal_dual, primal)
+
+    def lagrangian_hessian(self, z, v):
+        """Returns scaled Lagrangian Hessian"""
+        # Compute Hessian in relation to x and s
+        Hx = self.lagrangian_hessian_x(z, v)
+        if self.n_ineq > 0:
+            S_Hs_S = self.lagrangian_hessian_s(z, v)
+
+        # The scaled Lagragian Hessian is:
+        #     [ Hx    0    ]
+        #     [ 0   S Hs S ]
+        def matvec(vec):
+            vec_x = self.get_variables(vec)
+            vec_s = self.get_slack(vec)
+            if self.n_ineq > 0:
+                return np.hstack((Hx.dot(vec_x), S_Hs_S*vec_s))
+            else:
+                return Hx.dot(vec_x)
+        return LinearOperator((self.n_vars+self.n_ineq,
+                               self.n_vars+self.n_ineq),
+                              matvec)
+
+    def stop_criteria(self, state, z, last_iteration_failed,
+                      optimality, constr_violation,
+                      trust_radius, penalty, cg_info):
+        """Stop criteria to the barrier problem.
+        The criteria here proposed is similar to formula (2.3)
+        from [1]_, p.879.
+        """
+        x = self.get_variables(z)
+        if self.global_stop_criteria(state, x,
+                                     last_iteration_failed,
+                                     trust_radius, penalty,
+                                     cg_info,
+                                     self.barrier_parameter,
+                                     self.tolerance):
+            self.terminate = True
+            return True
+        else:
+            g_cond = (optimality < self.tolerance and
+                      constr_violation < self.tolerance)
+            x_cond = trust_radius < self.xtol
+            return g_cond or x_cond
+
+
+def tr_interior_point(fun, grad, lagr_hess, n_vars, n_ineq, n_eq,
+                      constr, jac, x0, fun0, grad0,
+                      constr_ineq0, jac_ineq0, constr_eq0,
+                      jac_eq0, stop_criteria,
+                      enforce_feasibility, xtol, state,
+                      initial_barrier_parameter,
+                      initial_tolerance,
+                      initial_penalty,
+                      initial_trust_radius,
+                      factorization_method,
+                      finite_diff_bounds):
+    """Trust-region interior points method.
+
+    Solve problem:
+        minimize fun(x)
+        subject to: constr_ineq(x) <= 0
+                    constr_eq(x) = 0
+    using trust-region interior point method described in [1]_.
+    """
+    # BOUNDARY_PARAMETER controls the decrease on the slack
+    # variables. Represents ``tau`` from [1]_ p.885, formula (3.18).
+    BOUNDARY_PARAMETER = 0.995
+    # BARRIER_DECAY_RATIO controls the decay of the barrier parameter
+    # and of the subproblem tolerance. Represents ``theta`` from [1]_ p.879.
+    BARRIER_DECAY_RATIO = 0.2
+    # TRUST_ENLARGEMENT controls the enlargement on trust radius
+    # after each iteration
+    TRUST_ENLARGEMENT = 5
+
+    # Default enforce_feasibility
+    if enforce_feasibility is None:
+        enforce_feasibility = np.zeros(n_ineq, bool)
+    # Initial Values
+    barrier_parameter = initial_barrier_parameter
+    tolerance = initial_tolerance
+    trust_radius = initial_trust_radius
+    # Define initial value for the slack variables
+    s0 = np.maximum(-1.5*constr_ineq0, np.ones(n_ineq))
+    # Define barrier subproblem
+    subprob = BarrierSubproblem(
+        x0, s0, fun, grad, lagr_hess, n_vars, n_ineq, n_eq, constr, jac,
+        barrier_parameter, tolerance, enforce_feasibility,
+        stop_criteria, xtol, fun0, grad0, constr_ineq0, jac_ineq0,
+        constr_eq0, jac_eq0, finite_diff_bounds)
+    # Define initial parameter for the first iteration.
+    z = np.hstack((x0, s0))
+    fun0_subprob, constr0_subprob = subprob.fun0, subprob.constr0
+    grad0_subprob, jac0_subprob = subprob.grad0, subprob.jac0
+    # Define trust region bounds
+    trust_lb = np.hstack((np.full(subprob.n_vars, -np.inf),
+                          np.full(subprob.n_ineq, -BOUNDARY_PARAMETER)))
+    trust_ub = np.full(subprob.n_vars+subprob.n_ineq, np.inf)
+
+    # Solves a sequence of barrier problems
+    while True:
+        # Solve SQP subproblem
+        z, state = equality_constrained_sqp(
+            subprob.function_and_constraints,
+            subprob.gradient_and_jacobian,
+            subprob.lagrangian_hessian,
+            z, fun0_subprob, grad0_subprob,
+            constr0_subprob, jac0_subprob, subprob.stop_criteria,
+            state, initial_penalty, trust_radius,
+            factorization_method, trust_lb, trust_ub, subprob.scaling)
+        if subprob.terminate:
+            break
+        # Update parameters
+        trust_radius = max(initial_trust_radius,
+                           TRUST_ENLARGEMENT*state.tr_radius)
+        # TODO: Use more advanced strategies from [2]_
+        # to update this parameters.
+        barrier_parameter *= BARRIER_DECAY_RATIO
+        tolerance *= BARRIER_DECAY_RATIO
+        # Update Barrier Problem
+        subprob.update(barrier_parameter, tolerance)
+        # Compute initial values for next iteration
+        fun0_subprob, constr0_subprob = subprob.function_and_constraints(z)
+        grad0_subprob, jac0_subprob = subprob.gradient_and_jacobian(z)
+
+    # Get x and s
+    x = subprob.get_variables(z)
+    return x, state
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_dogleg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_dogleg.py
new file mode 100644
index 0000000000000000000000000000000000000000..a54abd60c703408d6c87cb5020d6781fdf0213c7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_dogleg.py
@@ -0,0 +1,122 @@
+"""Dog-leg trust-region optimization."""
+import numpy as np
+import scipy.linalg
+from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproblem)
+
+__all__ = []
+
+
+def _minimize_dogleg(fun, x0, args=(), jac=None, hess=None,
+                     **trust_region_options):
+    """
+    Minimization of scalar function of one or more variables using
+    the dog-leg trust-region algorithm.
+
+    Options
+    -------
+    initial_trust_radius : float
+        Initial trust-region radius.
+    max_trust_radius : float
+        Maximum value of the trust-region radius. No steps that are longer
+        than this value will be proposed.
+    eta : float
+        Trust region related acceptance stringency for proposed steps.
+    gtol : float
+        Gradient norm must be less than `gtol` before successful
+        termination.
+
+    """
+    if jac is None:
+        raise ValueError('Jacobian is required for dogleg minimization')
+    if not callable(hess):
+        raise ValueError('Hessian is required for dogleg minimization')
+    return _minimize_trust_region(fun, x0, args=args, jac=jac, hess=hess,
+                                  subproblem=DoglegSubproblem,
+                                  **trust_region_options)
+
+
+class DoglegSubproblem(BaseQuadraticSubproblem):
+    """Quadratic subproblem solved by the dogleg method"""
+
+    def cauchy_point(self):
+        """
+        The Cauchy point is minimal along the direction of steepest descent.
+        """
+        if self._cauchy_point is None:
+            g = self.jac
+            Bg = self.hessp(g)
+            self._cauchy_point = -(np.dot(g, g) / np.dot(g, Bg)) * g
+        return self._cauchy_point
+
+    def newton_point(self):
+        """
+        The Newton point is a global minimum of the approximate function.
+        """
+        if self._newton_point is None:
+            g = self.jac
+            B = self.hess
+            cho_info = scipy.linalg.cho_factor(B)
+            self._newton_point = -scipy.linalg.cho_solve(cho_info, g)
+        return self._newton_point
+
+    def solve(self, trust_radius):
+        """
+        Minimize a function using the dog-leg trust-region algorithm.
+
+        This algorithm requires function values and first and second derivatives.
+        It also performs a costly Hessian decomposition for most iterations,
+        and the Hessian is required to be positive definite.
+
+        Parameters
+        ----------
+        trust_radius : float
+            We are allowed to wander only this far away from the origin.
+
+        Returns
+        -------
+        p : ndarray
+            The proposed step.
+        hits_boundary : bool
+            True if the proposed step is on the boundary of the trust region.
+
+        Notes
+        -----
+        The Hessian is required to be positive definite.
+
+        References
+        ----------
+        .. [1] Jorge Nocedal and Stephen Wright,
+               Numerical Optimization, second edition,
+               Springer-Verlag, 2006, page 73.
+        """
+
+        # Compute the Newton point.
+        # This is the optimum for the quadratic model function.
+        # If it is inside the trust radius then return this point.
+        p_best = self.newton_point()
+        if scipy.linalg.norm(p_best) < trust_radius:
+            hits_boundary = False
+            return p_best, hits_boundary
+
+        # Compute the Cauchy point.
+        # This is the predicted optimum along the direction of steepest descent.
+        p_u = self.cauchy_point()
+
+        # If the Cauchy point is outside the trust region,
+        # then return the point where the path intersects the boundary.
+        p_u_norm = scipy.linalg.norm(p_u)
+        if p_u_norm >= trust_radius:
+            p_boundary = p_u * (trust_radius / p_u_norm)
+            hits_boundary = True
+            return p_boundary, hits_boundary
+
+        # Compute the intersection of the trust region boundary
+        # and the line segment connecting the Cauchy and Newton points.
+        # This requires solving a quadratic equation.
+        # ||p_u + t*(p_best - p_u)||**2 == trust_radius**2
+        # Solve this for positive time t using the quadratic formula.
+        _, tb = self.get_boundaries_intersections(p_u, p_best - p_u,
+                                                  trust_radius)
+        p_boundary = p_u + tb * (p_best - p_u)
+        hits_boundary = True
+        return p_boundary, hits_boundary
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_exact.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_exact.py
new file mode 100644
index 0000000000000000000000000000000000000000..956e4f261907f001cf5bbb3616f331c18a676af0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_exact.py
@@ -0,0 +1,438 @@
+"""Nearly exact trust-region optimization subproblem."""
+import numpy as np
+from scipy.linalg import (norm, get_lapack_funcs, solve_triangular,
+                          cho_solve)
+from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproblem)
+
+__all__ = ['_minimize_trustregion_exact',
+           'estimate_smallest_singular_value',
+           'singular_leading_submatrix',
+           'IterativeSubproblem']
+
+
+def _minimize_trustregion_exact(fun, x0, args=(), jac=None, hess=None,
+                                **trust_region_options):
+    """
+    Minimization of scalar function of one or more variables using
+    a nearly exact trust-region algorithm.
+
+    Options
+    -------
+    initial_trust_radius : float
+        Initial trust-region radius.
+    max_trust_radius : float
+        Maximum value of the trust-region radius. No steps that are longer
+        than this value will be proposed.
+    eta : float
+        Trust region related acceptance stringency for proposed steps.
+    gtol : float
+        Gradient norm must be less than ``gtol`` before successful
+        termination.
+    """
+
+    if jac is None:
+        raise ValueError('Jacobian is required for trust region '
+                         'exact minimization.')
+    if not callable(hess):
+        raise ValueError('Hessian matrix is required for trust region '
+                         'exact minimization.')
+    return _minimize_trust_region(fun, x0, args=args, jac=jac, hess=hess,
+                                  subproblem=IterativeSubproblem,
+                                  **trust_region_options)
+
+
+def estimate_smallest_singular_value(U):
+    """Given upper triangular matrix ``U`` estimate the smallest singular
+    value and the correspondent right singular vector in O(n**2) operations.
+
+    Parameters
+    ----------
+    U : ndarray
+        Square upper triangular matrix.
+
+    Returns
+    -------
+    s_min : float
+        Estimated smallest singular value of the provided matrix.
+    z_min : ndarray
+        Estimated right singular vector.
+
+    Notes
+    -----
+    The procedure is based on [1]_ and is done in two steps. First, it finds
+    a vector ``e`` with components selected from {+1, -1} such that the
+    solution ``w`` from the system ``U.T w = e`` is as large as possible.
+    Next it estimate ``U v = w``. The smallest singular value is close
+    to ``norm(w)/norm(v)`` and the right singular vector is close
+    to ``v/norm(v)``.
+
+    The estimation will be better more ill-conditioned is the matrix.
+
+    References
+    ----------
+    .. [1] Cline, A. K., Moler, C. B., Stewart, G. W., Wilkinson, J. H.
+           An estimate for the condition number of a matrix.  1979.
+           SIAM Journal on Numerical Analysis, 16(2), 368-375.
+    """
+
+    U = np.atleast_2d(U)
+    m, n = U.shape
+
+    if m != n:
+        raise ValueError("A square triangular matrix should be provided.")
+
+    # A vector `e` with components selected from {+1, -1}
+    # is selected so that the solution `w` to the system
+    # `U.T w = e` is as large as possible. Implementation
+    # based on algorithm 3.5.1, p. 142, from reference [2]
+    # adapted for lower triangular matrix.
+
+    p = np.zeros(n)
+    w = np.empty(n)
+
+    # Implemented according to:  Golub, G. H., Van Loan, C. F. (2013).
+    # "Matrix computations". Forth Edition. JHU press. pp. 140-142.
+    for k in range(n):
+        wp = (1-p[k]) / U.T[k, k]
+        wm = (-1-p[k]) / U.T[k, k]
+        pp = p[k+1:] + U.T[k+1:, k]*wp
+        pm = p[k+1:] + U.T[k+1:, k]*wm
+
+        if abs(wp) + norm(pp, 1) >= abs(wm) + norm(pm, 1):
+            w[k] = wp
+            p[k+1:] = pp
+        else:
+            w[k] = wm
+            p[k+1:] = pm
+
+    # The system `U v = w` is solved using backward substitution.
+    v = solve_triangular(U, w)
+
+    v_norm = norm(v)
+    w_norm = norm(w)
+
+    # Smallest singular value
+    s_min = w_norm / v_norm
+
+    # Associated vector
+    z_min = v / v_norm
+
+    return s_min, z_min
+
+
+def gershgorin_bounds(H):
+    """
+    Given a square matrix ``H`` compute upper
+    and lower bounds for its eigenvalues (Gregoshgorin Bounds).
+    Defined ref. [1].
+
+    References
+    ----------
+    .. [1] Conn, A. R., Gould, N. I., & Toint, P. L.
+           Trust region methods. 2000. Siam. pp. 19.
+    """
+
+    H_diag = np.diag(H)
+    H_diag_abs = np.abs(H_diag)
+    H_row_sums = np.sum(np.abs(H), axis=1)
+    lb = np.min(H_diag + H_diag_abs - H_row_sums)
+    ub = np.max(H_diag - H_diag_abs + H_row_sums)
+
+    return lb, ub
+
+
+def singular_leading_submatrix(A, U, k):
+    """
+    Compute term that makes the leading ``k`` by ``k``
+    submatrix from ``A`` singular.
+
+    Parameters
+    ----------
+    A : ndarray
+        Symmetric matrix that is not positive definite.
+    U : ndarray
+        Upper triangular matrix resulting of an incomplete
+        Cholesky decomposition of matrix ``A``.
+    k : int
+        Positive integer such that the leading k by k submatrix from
+        `A` is the first non-positive definite leading submatrix.
+
+    Returns
+    -------
+    delta : float
+        Amount that should be added to the element (k, k) of the
+        leading k by k submatrix of ``A`` to make it singular.
+    v : ndarray
+        A vector such that ``v.T B v = 0``. Where B is the matrix A after
+        ``delta`` is added to its element (k, k).
+    """
+
+    # Compute delta
+    delta = np.sum(U[:k-1, k-1]**2) - A[k-1, k-1]
+
+    n = len(A)
+
+    # Initialize v
+    v = np.zeros(n)
+    v[k-1] = 1
+
+    # Compute the remaining values of v by solving a triangular system.
+    if k != 1:
+        v[:k-1] = solve_triangular(U[:k-1, :k-1], -U[:k-1, k-1])
+
+    return delta, v
+
+
+class IterativeSubproblem(BaseQuadraticSubproblem):
+    """Quadratic subproblem solved by nearly exact iterative method.
+
+    Notes
+    -----
+    This subproblem solver was based on [1]_, [2]_ and [3]_,
+    which implement similar algorithms. The algorithm is basically
+    that of [1]_ but ideas from [2]_ and [3]_ were also used.
+
+    References
+    ----------
+    .. [1] A.R. Conn, N.I. Gould, and P.L. Toint, "Trust region methods",
+           Siam, pp. 169-200, 2000.
+    .. [2] J. Nocedal and  S. Wright, "Numerical optimization",
+           Springer Science & Business Media. pp. 83-91, 2006.
+    .. [3] J.J. More and D.C. Sorensen, "Computing a trust region step",
+           SIAM Journal on Scientific and Statistical Computing, vol. 4(3),
+           pp. 553-572, 1983.
+    """
+
+    # UPDATE_COEFF appears in reference [1]_
+    # in formula 7.3.14 (p. 190) named as "theta".
+    # As recommended there it value is fixed in 0.01.
+    UPDATE_COEFF = 0.01
+
+    EPS = np.finfo(float).eps
+
+    def __init__(self, x, fun, jac, hess, hessp=None,
+                 k_easy=0.1, k_hard=0.2):
+
+        super().__init__(x, fun, jac, hess)
+
+        # When the trust-region shrinks in two consecutive
+        # calculations (``tr_radius < previous_tr_radius``)
+        # the lower bound ``lambda_lb`` may be reused,
+        # facilitating  the convergence. To indicate no
+        # previous value is known at first ``previous_tr_radius``
+        # is set to -1  and ``lambda_lb`` to None.
+        self.previous_tr_radius = -1
+        self.lambda_lb = None
+
+        self.niter = 0
+
+        # ``k_easy`` and ``k_hard`` are parameters used
+        # to determine the stop criteria to the iterative
+        # subproblem solver. Take a look at pp. 194-197
+        # from reference _[1] for a more detailed description.
+        self.k_easy = k_easy
+        self.k_hard = k_hard
+
+        # Get Lapack function for cholesky decomposition.
+        # The implemented SciPy wrapper does not return
+        # the incomplete factorization needed by the method.
+        self.cholesky, = get_lapack_funcs(('potrf',), (self.hess,))
+
+        # Get info about Hessian
+        self.dimension = len(self.hess)
+        self.hess_gershgorin_lb,\
+            self.hess_gershgorin_ub = gershgorin_bounds(self.hess)
+        self.hess_inf = norm(self.hess, np.inf)
+        self.hess_fro = norm(self.hess, 'fro')
+
+        # A constant such that for vectors smaller than that
+        # backward substitution is not reliable. It was established
+        # based on Golub, G. H., Van Loan, C. F. (2013).
+        # "Matrix computations". Forth Edition. JHU press., p.165.
+        self.CLOSE_TO_ZERO = self.dimension * self.EPS * self.hess_inf
+
+    def _initial_values(self, tr_radius):
+        """Given a trust radius, return a good initial guess for
+        the damping factor, the lower bound and the upper bound.
+        The values were chosen accordingly to the guidelines on
+        section 7.3.8 (p. 192) from [1]_.
+        """
+
+        # Upper bound for the damping factor
+        lambda_ub = max(0, self.jac_mag/tr_radius + min(-self.hess_gershgorin_lb,
+                                                        self.hess_fro,
+                                                        self.hess_inf))
+
+        # Lower bound for the damping factor
+        lambda_lb = max(0, -min(self.hess.diagonal()),
+                        self.jac_mag/tr_radius - min(self.hess_gershgorin_ub,
+                                                     self.hess_fro,
+                                                     self.hess_inf))
+
+        # Improve bounds with previous info
+        if tr_radius < self.previous_tr_radius:
+            lambda_lb = max(self.lambda_lb, lambda_lb)
+
+        # Initial guess for the damping factor
+        if lambda_lb == 0:
+            lambda_initial = 0
+        else:
+            lambda_initial = max(np.sqrt(lambda_lb * lambda_ub),
+                                 lambda_lb + self.UPDATE_COEFF*(lambda_ub-lambda_lb))
+
+        return lambda_initial, lambda_lb, lambda_ub
+
+    def solve(self, tr_radius):
+        """Solve quadratic subproblem"""
+
+        lambda_current, lambda_lb, lambda_ub = self._initial_values(tr_radius)
+        n = self.dimension
+        hits_boundary = True
+        already_factorized = False
+        self.niter = 0
+
+        while True:
+
+            # Compute Cholesky factorization
+            if already_factorized:
+                already_factorized = False
+            else:
+                H = self.hess+lambda_current*np.eye(n)
+                U, info = self.cholesky(H, lower=False,
+                                        overwrite_a=False,
+                                        clean=True)
+
+            self.niter += 1
+
+            # Check if factorization succeeded
+            if info == 0 and self.jac_mag > self.CLOSE_TO_ZERO:
+                # Successful factorization
+
+                # Solve `U.T U p = s`
+                p = cho_solve((U, False), -self.jac)
+
+                p_norm = norm(p)
+
+                # Check for interior convergence
+                if p_norm <= tr_radius and lambda_current == 0:
+                    hits_boundary = False
+                    break
+
+                # Solve `U.T w = p`
+                w = solve_triangular(U, p, trans='T')
+
+                w_norm = norm(w)
+
+                # Compute Newton step accordingly to
+                # formula (4.44) p.87 from ref [2]_.
+                delta_lambda = (p_norm/w_norm)**2 * (p_norm-tr_radius)/tr_radius
+                lambda_new = lambda_current + delta_lambda
+
+                if p_norm < tr_radius:  # Inside boundary
+                    s_min, z_min = estimate_smallest_singular_value(U)
+
+                    ta, tb = self.get_boundaries_intersections(p, z_min,
+                                                               tr_radius)
+
+                    # Choose `step_len` with the smallest magnitude.
+                    # The reason for this choice is explained at
+                    # ref [3]_, p. 6 (Immediately before the formula
+                    # for `tau`).
+                    step_len = min([ta, tb], key=abs)
+
+                    # Compute the quadratic term  (p.T*H*p)
+                    quadratic_term = np.dot(p, np.dot(H, p))
+
+                    # Check stop criteria
+                    relative_error = ((step_len**2 * s_min**2)
+                                      / (quadratic_term + lambda_current*tr_radius**2))
+                    if relative_error <= self.k_hard:
+                        p += step_len * z_min
+                        break
+
+                    # Update uncertainty bounds
+                    lambda_ub = lambda_current
+                    lambda_lb = max(lambda_lb, lambda_current - s_min**2)
+
+                    # Compute Cholesky factorization
+                    H = self.hess + lambda_new*np.eye(n)
+                    c, info = self.cholesky(H, lower=False,
+                                            overwrite_a=False,
+                                            clean=True)
+
+                    # Check if the factorization have succeeded
+                    #
+                    if info == 0:  # Successful factorization
+                        # Update damping factor
+                        lambda_current = lambda_new
+                        already_factorized = True
+                    else:  # Unsuccessful factorization
+                        # Update uncertainty bounds
+                        lambda_lb = max(lambda_lb, lambda_new)
+
+                        # Update damping factor
+                        lambda_current = max(
+                            np.sqrt(lambda_lb * lambda_ub),
+                            lambda_lb + self.UPDATE_COEFF*(lambda_ub-lambda_lb)
+                        )
+
+                else:  # Outside boundary
+                    # Check stop criteria
+                    relative_error = abs(p_norm - tr_radius) / tr_radius
+                    if relative_error <= self.k_easy:
+                        break
+
+                    # Update uncertainty bounds
+                    lambda_lb = lambda_current
+
+                    # Update damping factor
+                    lambda_current = lambda_new
+
+            elif info == 0 and self.jac_mag <= self.CLOSE_TO_ZERO:
+                # jac_mag very close to zero
+
+                # Check for interior convergence
+                if lambda_current == 0:
+                    p = np.zeros(n)
+                    hits_boundary = False
+                    break
+
+                s_min, z_min = estimate_smallest_singular_value(U)
+                step_len = tr_radius
+
+                # Check stop criteria
+                if (step_len**2 * s_min**2
+                    <= self.k_hard * lambda_current * tr_radius**2):
+                    p = step_len * z_min
+                    break
+
+                # Update uncertainty bounds
+                lambda_ub = lambda_current
+                lambda_lb = max(lambda_lb, lambda_current - s_min**2)
+
+                # Update damping factor
+                lambda_current = max(
+                    np.sqrt(lambda_lb * lambda_ub),
+                    lambda_lb + self.UPDATE_COEFF*(lambda_ub-lambda_lb)
+                )
+
+            else:  # Unsuccessful factorization
+
+                # Compute auxiliary terms
+                delta, v = singular_leading_submatrix(H, U, info)
+                v_norm = norm(v)
+
+                # Update uncertainty interval
+                lambda_lb = max(lambda_lb, lambda_current + delta/v_norm**2)
+
+                # Update damping factor
+                lambda_current = max(
+                    np.sqrt(lambda_lb * lambda_ub),
+                    lambda_lb + self.UPDATE_COEFF*(lambda_ub-lambda_lb)
+                )
+
+        self.lambda_lb = lambda_lb
+        self.lambda_current = lambda_current
+        self.previous_tr_radius = tr_radius
+
+        return p, hits_boundary
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_krylov.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_krylov.py
new file mode 100644
index 0000000000000000000000000000000000000000..54e861ae2de02164966a33c437e5fdb08ba3006c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_krylov.py
@@ -0,0 +1,65 @@
+from ._trustregion import (_minimize_trust_region)
+from ._trlib import (get_trlib_quadratic_subproblem)
+
+__all__ = ['_minimize_trust_krylov']
+
+def _minimize_trust_krylov(fun, x0, args=(), jac=None, hess=None, hessp=None,
+                           inexact=True, **trust_region_options):
+    """
+    Minimization of a scalar function of one or more variables using
+    a nearly exact trust-region algorithm that only requires matrix
+    vector products with the hessian matrix.
+
+    .. versionadded:: 1.0.0
+
+    Options
+    -------
+    inexact : bool, optional
+        Accuracy to solve subproblems. If True requires less nonlinear
+        iterations, but more vector products.
+    """
+
+    if jac is None:
+        raise ValueError('Jacobian is required for trust region ',
+                         'exact minimization.')
+    if hess is None and hessp is None:
+        raise ValueError('Either the Hessian or the Hessian-vector product '
+                         'is required for Krylov trust-region minimization')
+
+    # tol_rel specifies the termination tolerance relative to the initial
+    # gradient norm in the Krylov subspace iteration.
+
+    # - tol_rel_i specifies the tolerance for interior convergence.
+    # - tol_rel_b specifies the tolerance for boundary convergence.
+    #   in nonlinear programming applications it is not necessary to solve
+    #   the boundary case as exact as the interior case.
+
+    # - setting tol_rel_i=-2 leads to a forcing sequence in the Krylov
+    #   subspace iteration leading to quadratic convergence if eventually
+    #   the trust region stays inactive.
+    # - setting tol_rel_b=-3 leads to a forcing sequence in the Krylov
+    #   subspace iteration leading to superlinear convergence as long
+    #   as the iterates hit the trust region boundary.
+
+    # For details consult the documentation of trlib_krylov_min
+    # in _trlib/trlib_krylov.h
+    #
+    # Optimality of this choice of parameters among a range of possibilities
+    # has been tested on the unconstrained subset of the CUTEst library.
+
+    if inexact:
+        return _minimize_trust_region(fun, x0, args=args, jac=jac,
+                                      hess=hess, hessp=hessp,
+                                      subproblem=get_trlib_quadratic_subproblem(
+                                          tol_rel_i=-2.0, tol_rel_b=-3.0,
+                                          disp=trust_region_options.get('disp', False)
+                                          ),
+                                      **trust_region_options)
+    else:
+        return _minimize_trust_region(fun, x0, args=args, jac=jac,
+                                      hess=hess, hessp=hessp,
+                                      subproblem=get_trlib_quadratic_subproblem(
+                                          tol_rel_i=1e-8, tol_rel_b=1e-6,
+                                          disp=trust_region_options.get('disp', False)
+                                          ),
+                                      **trust_region_options)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_ncg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_ncg.py
new file mode 100644
index 0000000000000000000000000000000000000000..fed17ff8b84eaf019c0ad69a03f260ca674477ad
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_ncg.py
@@ -0,0 +1,126 @@
+"""Newton-CG trust-region optimization."""
+import math
+
+import numpy as np
+import scipy.linalg
+from ._trustregion import (_minimize_trust_region, BaseQuadraticSubproblem)
+
+__all__ = []
+
+
+def _minimize_trust_ncg(fun, x0, args=(), jac=None, hess=None, hessp=None,
+                        **trust_region_options):
+    """
+    Minimization of scalar function of one or more variables using
+    the Newton conjugate gradient trust-region algorithm.
+
+    Options
+    -------
+    initial_trust_radius : float
+        Initial trust-region radius.
+    max_trust_radius : float
+        Maximum value of the trust-region radius. No steps that are longer
+        than this value will be proposed.
+    eta : float
+        Trust region related acceptance stringency for proposed steps.
+    gtol : float
+        Gradient norm must be less than `gtol` before successful
+        termination.
+
+    """
+    if jac is None:
+        raise ValueError('Jacobian is required for Newton-CG trust-region '
+                         'minimization')
+    if hess is None and hessp is None:
+        raise ValueError('Either the Hessian or the Hessian-vector product '
+                         'is required for Newton-CG trust-region minimization')
+    return _minimize_trust_region(fun, x0, args=args, jac=jac, hess=hess,
+                                  hessp=hessp, subproblem=CGSteihaugSubproblem,
+                                  **trust_region_options)
+
+
+class CGSteihaugSubproblem(BaseQuadraticSubproblem):
+    """Quadratic subproblem solved by a conjugate gradient method"""
+    def solve(self, trust_radius):
+        """
+        Solve the subproblem using a conjugate gradient method.
+
+        Parameters
+        ----------
+        trust_radius : float
+            We are allowed to wander only this far away from the origin.
+
+        Returns
+        -------
+        p : ndarray
+            The proposed step.
+        hits_boundary : bool
+            True if the proposed step is on the boundary of the trust region.
+
+        Notes
+        -----
+        This is algorithm (7.2) of Nocedal and Wright 2nd edition.
+        Only the function that computes the Hessian-vector product is required.
+        The Hessian itself is not required, and the Hessian does
+        not need to be positive semidefinite.
+        """
+
+        # get the norm of jacobian and define the origin
+        p_origin = np.zeros_like(self.jac)
+
+        # define a default tolerance
+        tolerance = min(0.5, math.sqrt(self.jac_mag)) * self.jac_mag
+
+        # Stop the method if the search direction
+        # is a direction of nonpositive curvature.
+        if self.jac_mag < tolerance:
+            hits_boundary = False
+            return p_origin, hits_boundary
+
+        # init the state for the first iteration
+        z = p_origin
+        r = self.jac
+        d = -r
+
+        # Search for the min of the approximation of the objective function.
+        while True:
+
+            # do an iteration
+            Bd = self.hessp(d)
+            dBd = np.dot(d, Bd)
+            if dBd <= 0:
+                # Look at the two boundary points.
+                # Find both values of t to get the boundary points such that
+                # ||z + t d|| == trust_radius
+                # and then choose the one with the predicted min value.
+                ta, tb = self.get_boundaries_intersections(z, d, trust_radius)
+                pa = z + ta * d
+                pb = z + tb * d
+                if self(pa) < self(pb):
+                    p_boundary = pa
+                else:
+                    p_boundary = pb
+                hits_boundary = True
+                return p_boundary, hits_boundary
+            r_squared = np.dot(r, r)
+            alpha = r_squared / dBd
+            z_next = z + alpha * d
+            if scipy.linalg.norm(z_next) >= trust_radius:
+                # Find t >= 0 to get the boundary point such that
+                # ||z + t d|| == trust_radius
+                ta, tb = self.get_boundaries_intersections(z, d, trust_radius)
+                p_boundary = z + tb * d
+                hits_boundary = True
+                return p_boundary, hits_boundary
+            r_next = r + alpha * Bd
+            r_next_squared = np.dot(r_next, r_next)
+            if math.sqrt(r_next_squared) < tolerance:
+                hits_boundary = False
+                return z_next, hits_boundary
+            beta_next = r_next_squared / r_squared
+            d_next = -r_next + beta_next * d
+
+            # update the state for the next iteration
+            z = z_next
+            r = r_next
+            d = d_next
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tstutils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tstutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..f56e835e345d66023efae81114a45ed29269f18d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_tstutils.py
@@ -0,0 +1,972 @@
+r"""
+Parameters used in test and benchmark methods.
+
+Collections of test cases suitable for testing 1-D root-finders
+  'original': The original benchmarking functions.
+     Real-valued functions of real-valued inputs on an interval
+     with a zero.
+     f1, .., f3 are continuous and infinitely differentiable
+     f4 has a left- and right- discontinuity at the root
+     f5 has a root at 1 replacing a 1st order pole
+     f6 is randomly positive on one side of the root,
+     randomly negative on the other.
+     f4 - f6 are not continuous at the root.
+
+  'aps': The test problems in the 1995 paper
+     TOMS "Algorithm 748: Enclosing Zeros of Continuous Functions"
+     by Alefeld, Potra and Shi. Real-valued functions of
+     real-valued inputs on an interval with a zero.
+     Suitable for methods which start with an enclosing interval, and
+     derivatives up to 2nd order.
+
+  'complex': Some complex-valued functions of complex-valued inputs.
+     No enclosing bracket is provided.
+     Suitable for methods which use one or more starting values, and
+     derivatives up to 2nd order.
+
+  The test cases are provided as a list of dictionaries. The dictionary
+  keys will be a subset of:
+  ["f", "fprime", "fprime2", "args", "bracket", "smoothness",
+  "a", "b", "x0", "x1", "root", "ID"]
+"""
+
+# Sources:
+#  [1] Alefeld, G. E. and Potra, F. A. and Shi, Yixun,
+#      "Algorithm 748: Enclosing Zeros of Continuous Functions",
+#      ACM Trans. Math. Softw. Volume 221(1995)
+#       doi = {10.1145/210089.210111},
+#  [2] Chandrupatla, Tirupathi R. "A new hybrid quadratic/bisection algorithm
+#      for finding the zero of a nonlinear function without using derivatives."
+#      Advances in Engineering Software 28.3 (1997): 145-149.
+
+from random import random
+
+import numpy as np
+
+from scipy.optimize import _zeros_py as cc
+from scipy._lib._array_api import array_namespace
+
+# "description" refers to the original functions
+description = """
+f2 is a symmetric parabola, x**2 - 1
+f3 is a quartic polynomial with large hump in interval
+f4 is step function with a discontinuity at 1
+f5 is a hyperbola with vertical asymptote at 1
+f6 has random values positive to left of 1, negative to right
+
+Of course, these are not real problems. They just test how the
+'good' solvers behave in bad circumstances where bisection is
+really the best. A good solver should not be much worse than
+bisection in such circumstance, while being faster for smooth
+monotone sorts of functions.
+"""
+
+
+def f1(x):
+    r"""f1 is a quadratic with roots at 0 and 1"""
+    return x * (x - 1.)
+
+
+def f1_fp(x):
+    return 2 * x - 1
+
+
+def f1_fpp(x):
+    return 2
+
+
+def f2(x):
+    r"""f2 is a symmetric parabola, x**2 - 1"""
+    return x**2 - 1
+
+
+def f2_fp(x):
+    return 2 * x
+
+
+def f2_fpp(x):
+    return 2
+
+
+def f3(x):
+    r"""A quartic with roots at 0, 1, 2 and 3"""
+    return x * (x - 1.) * (x - 2.) * (x - 3.)  # x**4 - 6x**3 + 11x**2 - 6x
+
+
+def f3_fp(x):
+    return 4 * x**3 - 18 * x**2 + 22 * x - 6
+
+
+def f3_fpp(x):
+    return 12 * x**2 - 36 * x + 22
+
+
+def f4(x):
+    r"""Piecewise linear, left- and right- discontinuous at x=1, the root."""
+    if x > 1:
+        return 1.0 + .1 * x
+    if x < 1:
+        return -1.0 + .1 * x
+    return 0
+
+
+def f5(x):
+    r"""
+    Hyperbola with a pole at x=1, but pole replaced with 0. Not continuous at root.
+    """
+    if x != 1:
+        return 1.0 / (1. - x)
+    return 0
+
+
+# f6(x) returns random value. Without memoization, calling twice with the
+# same x returns different values, hence a "random value", not a
+# "function with random values"
+_f6_cache = {}
+def f6(x):
+    v = _f6_cache.get(x, None)
+    if v is None:
+        if x > 1:
+            v = random()
+        elif x < 1:
+            v = -random()
+        else:
+            v = 0
+        _f6_cache[x] = v
+    return v
+
+
+# Each Original test case has
+# - a function and its two derivatives,
+# - additional arguments,
+# - a bracket enclosing a root,
+# - the order of differentiability (smoothness) on this interval
+# - a starting value for methods which don't require a bracket
+# - the root (inside the bracket)
+# - an Identifier of the test case
+
+_ORIGINAL_TESTS_KEYS = [
+    "f", "fprime", "fprime2", "args", "bracket", "smoothness", "x0", "root", "ID"
+]
+_ORIGINAL_TESTS = [
+    [f1, f1_fp, f1_fpp, (), [0.5, np.sqrt(3)], np.inf, 0.6, 1.0, "original.01.00"],
+    [f2, f2_fp, f2_fpp, (), [0.5, np.sqrt(3)], np.inf, 0.6, 1.0, "original.02.00"],
+    [f3, f3_fp, f3_fpp, (), [0.5, np.sqrt(3)], np.inf, 0.6, 1.0, "original.03.00"],
+    [f4, None, None, (), [0.5, np.sqrt(3)], -1, 0.6, 1.0, "original.04.00"],
+    [f5, None, None, (), [0.5, np.sqrt(3)], -1, 0.6, 1.0, "original.05.00"],
+    [f6, None, None, (), [0.5, np.sqrt(3)], -np.inf, 0.6, 1.0, "original.05.00"]
+]
+
+_ORIGINAL_TESTS_DICTS = [
+    dict(zip(_ORIGINAL_TESTS_KEYS, testcase)) for testcase in _ORIGINAL_TESTS
+]
+
+#   ##################
+#   "APS" test cases
+#   Functions and test cases that appear in [1]
+
+
+def aps01_f(x):
+    r"""Straightforward sum of trigonometric function and polynomial"""
+    return np.sin(x) - x / 2
+
+
+def aps01_fp(x):
+    return np.cos(x) - 1.0 / 2
+
+
+def aps01_fpp(x):
+    return -np.sin(x)
+
+
+def aps02_f(x):
+    r"""poles at x=n**2, 1st and 2nd derivatives at root are also close to 0"""
+    ii = np.arange(1, 21)
+    return -2 * np.sum((2 * ii - 5)**2 / (x - ii**2)**3)
+
+
+def aps02_fp(x):
+    ii = np.arange(1, 21)
+    return 6 * np.sum((2 * ii - 5)**2 / (x - ii**2)**4)
+
+
+def aps02_fpp(x):
+    ii = np.arange(1, 21)
+    return 24 * np.sum((2 * ii - 5)**2 / (x - ii**2)**5)
+
+
+def aps03_f(x, a, b):
+    r"""Rapidly changing at the root"""
+    return a * x * np.exp(b * x)
+
+
+def aps03_fp(x, a, b):
+    return a * (b * x + 1) * np.exp(b * x)
+
+
+def aps03_fpp(x, a, b):
+    return a * (b * (b * x + 1) + b) * np.exp(b * x)
+
+
+def aps04_f(x, n, a):
+    r"""Medium-degree polynomial"""
+    return x**n - a
+
+
+def aps04_fp(x, n, a):
+    return n * x**(n - 1)
+
+
+def aps04_fpp(x, n, a):
+    return n * (n - 1) * x**(n - 2)
+
+
+def aps05_f(x):
+    r"""Simple Trigonometric function"""
+    return np.sin(x) - 1.0 / 2
+
+
+def aps05_fp(x):
+    return np.cos(x)
+
+
+def aps05_fpp(x):
+    return -np.sin(x)
+
+
+def aps06_f(x, n):
+    r"""Exponential rapidly changing from -1 to 1 at x=0"""
+    return 2 * x * np.exp(-n) - 2 * np.exp(-n * x) + 1
+
+
+def aps06_fp(x, n):
+    return 2 * np.exp(-n) + 2 * n * np.exp(-n * x)
+
+
+def aps06_fpp(x, n):
+    return -2 * n * n * np.exp(-n * x)
+
+
+def aps07_f(x, n):
+    r"""Upside down parabola with parametrizable height"""
+    return (1 + (1 - n)**2) * x - (1 - n * x)**2
+
+
+def aps07_fp(x, n):
+    return (1 + (1 - n)**2) + 2 * n * (1 - n * x)
+
+
+def aps07_fpp(x, n):
+    return -2 * n * n
+
+
+def aps08_f(x, n):
+    r"""Degree n polynomial"""
+    return x * x - (1 - x)**n
+
+
+def aps08_fp(x, n):
+    return 2 * x + n * (1 - x)**(n - 1)
+
+
+def aps08_fpp(x, n):
+    return 2 - n * (n - 1) * (1 - x)**(n - 2)
+
+
+def aps09_f(x, n):
+    r"""Upside down quartic with parametrizable height"""
+    return (1 + (1 - n)**4) * x - (1 - n * x)**4
+
+
+def aps09_fp(x, n):
+    return (1 + (1 - n)**4) + 4 * n * (1 - n * x)**3
+
+
+def aps09_fpp(x, n):
+    return -12 * n * (1 - n * x)**2
+
+
+def aps10_f(x, n):
+    r"""Exponential plus a polynomial"""
+    return np.exp(-n * x) * (x - 1) + x**n
+
+
+def aps10_fp(x, n):
+    return np.exp(-n * x) * (-n * (x - 1) + 1) + n * x**(n - 1)
+
+
+def aps10_fpp(x, n):
+    return (np.exp(-n * x) * (-n * (-n * (x - 1) + 1) + -n * x)
+            + n * (n - 1) * x**(n - 2))
+
+
+def aps11_f(x, n):
+    r"""Rational function with a zero at x=1/n and a pole at x=0"""
+    return (n * x - 1) / ((n - 1) * x)
+
+
+def aps11_fp(x, n):
+    return 1 / (n - 1) / x**2
+
+
+def aps11_fpp(x, n):
+    return -2 / (n - 1) / x**3
+
+
+def aps12_f(x, n):
+    r"""nth root of x, with a zero at x=n"""
+    return np.power(x, 1.0 / n) - np.power(n, 1.0 / n)
+
+
+def aps12_fp(x, n):
+    return np.power(x, (1.0 - n) / n) / n
+
+
+def aps12_fpp(x, n):
+    return np.power(x, (1.0 - 2 * n) / n) * (1.0 / n) * (1.0 - n) / n
+
+
+_MAX_EXPABLE = np.log(np.finfo(float).max)
+
+
+def aps13_f(x):
+    r"""Function with *all* derivatives 0 at the root"""
+    if x == 0:
+        return 0
+    # x2 = 1.0/x**2
+    # if x2 > 708:
+    #     return 0
+    y = 1 / x**2
+    if y > _MAX_EXPABLE:
+        return 0
+    return x / np.exp(y)
+
+
+def aps13_fp(x):
+    if x == 0:
+        return 0
+    y = 1 / x**2
+    if y > _MAX_EXPABLE:
+        return 0
+    return (1 + 2 / x**2) / np.exp(y)
+
+
+def aps13_fpp(x):
+    if x == 0:
+        return 0
+    y = 1 / x**2
+    if y > _MAX_EXPABLE:
+        return 0
+    return 2 * (2 - x**2) / x**5 / np.exp(y)
+
+
+def aps14_f(x, n):
+    r"""0 for negative x-values, trigonometric+linear for x positive"""
+    if x <= 0:
+        return -n / 20.0
+    return n / 20.0 * (x / 1.5 + np.sin(x) - 1)
+
+
+def aps14_fp(x, n):
+    if x <= 0:
+        return 0
+    return n / 20.0 * (1.0 / 1.5 + np.cos(x))
+
+
+def aps14_fpp(x, n):
+    if x <= 0:
+        return 0
+    return -n / 20.0 * (np.sin(x))
+
+
+def aps15_f(x, n):
+    r"""piecewise linear, constant outside of [0, 0.002/(1+n)]"""
+    if x < 0:
+        return -0.859
+    if x > 2 * 1e-3 / (1 + n):
+        return np.e - 1.859
+    return np.exp((n + 1) * x / 2 * 1000) - 1.859
+
+
+def aps15_fp(x, n):
+    if not 0 <= x <= 2 * 1e-3 / (1 + n):
+        return np.e - 1.859
+    return np.exp((n + 1) * x / 2 * 1000) * (n + 1) / 2 * 1000
+
+
+def aps15_fpp(x, n):
+    if not 0 <= x <= 2 * 1e-3 / (1 + n):
+        return np.e - 1.859
+    return np.exp((n + 1) * x / 2 * 1000) * (n + 1) / 2 * 1000 * (n + 1) / 2 * 1000
+
+
+# Each APS test case has
+# - a function and its two derivatives,
+# - additional arguments,
+# - a bracket enclosing a root,
+# - the order of differentiability of the function on this interval
+# - a starting value for methods which don't require a bracket
+# - the root (inside the bracket)
+# - an Identifier of the test case
+#
+# Algorithm 748 is a bracketing algorithm so a bracketing interval was provided
+# in [1] for each test case. Newton and Halley methods need a single
+# starting point x0, which was chosen to be near the middle of the interval,
+# unless that would have made the problem too easy.
+
+_APS_TESTS_KEYS = [
+    "f", "fprime", "fprime2", "args", "bracket", "smoothness", "x0", "root", "ID"
+]
+_APS_TESTS = [
+    [aps01_f, aps01_fp, aps01_fpp, (), [np.pi / 2, np.pi], np.inf,
+     3, 1.89549426703398094e+00, "aps.01.00"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [1 + 1e-9, 4 - 1e-9], np.inf,
+     2, 3.02291534727305677e+00, "aps.02.00"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [4 + 1e-9, 9 - 1e-9], np.inf,
+     5, 6.68375356080807848e+00, "aps.02.01"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [9 + 1e-9, 16 - 1e-9], np.inf,
+     10, 1.12387016550022114e+01, "aps.02.02"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [16 + 1e-9, 25 - 1e-9], np.inf,
+     17, 1.96760000806234103e+01, "aps.02.03"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [25 + 1e-9, 36 - 1e-9], np.inf,
+     26, 2.98282273265047557e+01, "aps.02.04"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [36 + 1e-9, 49 - 1e-9], np.inf,
+     37, 4.19061161952894139e+01, "aps.02.05"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [49 + 1e-9, 64 - 1e-9], np.inf,
+     50, 5.59535958001430913e+01, "aps.02.06"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [64 + 1e-9, 81 - 1e-9], np.inf,
+     65, 7.19856655865877997e+01, "aps.02.07"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [81 + 1e-9, 100 - 1e-9], np.inf,
+     82, 9.00088685391666701e+01, "aps.02.08"],
+    [aps02_f, aps02_fp, aps02_fpp, (), [100 + 1e-9, 121 - 1e-9], np.inf,
+     101, 1.10026532748330197e+02, "aps.02.09"],
+    [aps03_f, aps03_fp, aps03_fpp, (-40, -1), [-9, 31], np.inf,
+     -2, 0, "aps.03.00"],
+    [aps03_f, aps03_fp, aps03_fpp, (-100, -2), [-9, 31], np.inf,
+     -2, 0, "aps.03.01"],
+    [aps03_f, aps03_fp, aps03_fpp, (-200, -3), [-9, 31], np.inf,
+     -2, 0, "aps.03.02"],
+    [aps04_f, aps04_fp, aps04_fpp, (4, 0.2), [0, 5], np.inf,
+     2.5, 6.68740304976422006e-01, "aps.04.00"],
+    [aps04_f, aps04_fp, aps04_fpp, (6, 0.2), [0, 5], np.inf,
+     2.5, 7.64724491331730039e-01, "aps.04.01"],
+    [aps04_f, aps04_fp, aps04_fpp, (8, 0.2), [0, 5], np.inf,
+     2.5, 8.17765433957942545e-01, "aps.04.02"],
+    [aps04_f, aps04_fp, aps04_fpp, (10, 0.2), [0, 5], np.inf,
+     2.5, 8.51339922520784609e-01, "aps.04.03"],
+    [aps04_f, aps04_fp, aps04_fpp, (12, 0.2), [0, 5], np.inf,
+     2.5, 8.74485272221167897e-01, "aps.04.04"],
+    [aps04_f, aps04_fp, aps04_fpp, (4, 1), [0, 5], np.inf,
+     2.5, 1, "aps.04.05"],
+    [aps04_f, aps04_fp, aps04_fpp, (6, 1), [0, 5], np.inf,
+     2.5, 1, "aps.04.06"],
+    [aps04_f, aps04_fp, aps04_fpp, (8, 1), [0, 5], np.inf,
+     2.5, 1, "aps.04.07"],
+    [aps04_f, aps04_fp, aps04_fpp, (10, 1), [0, 5], np.inf,
+     2.5, 1, "aps.04.08"],
+    [aps04_f, aps04_fp, aps04_fpp, (12, 1), [0, 5], np.inf,
+     2.5, 1, "aps.04.09"],
+    [aps04_f, aps04_fp, aps04_fpp, (8, 1), [-0.95, 4.05], np.inf,
+     1.5, 1, "aps.04.10"],
+    [aps04_f, aps04_fp, aps04_fpp, (10, 1), [-0.95, 4.05], np.inf,
+     1.5, 1, "aps.04.11"],
+    [aps04_f, aps04_fp, aps04_fpp, (12, 1), [-0.95, 4.05], np.inf,
+     1.5, 1, "aps.04.12"],
+    [aps04_f, aps04_fp, aps04_fpp, (14, 1), [-0.95, 4.05], np.inf,
+     1.5, 1, "aps.04.13"],
+    [aps05_f, aps05_fp, aps05_fpp, (), [0, 1.5], np.inf,
+     1.3, np.pi / 6, "aps.05.00"],
+    [aps06_f, aps06_fp, aps06_fpp, (1,), [0, 1], np.inf,
+     0.5, 4.22477709641236709e-01, "aps.06.00"],
+    [aps06_f, aps06_fp, aps06_fpp, (2,), [0, 1], np.inf,
+     0.5, 3.06699410483203705e-01, "aps.06.01"],
+    [aps06_f, aps06_fp, aps06_fpp, (3,), [0, 1], np.inf,
+     0.5, 2.23705457654662959e-01, "aps.06.02"],
+    [aps06_f, aps06_fp, aps06_fpp, (4,), [0, 1], np.inf,
+     0.5, 1.71719147519508369e-01, "aps.06.03"],
+    [aps06_f, aps06_fp, aps06_fpp, (5,), [0, 1], np.inf,
+     0.4, 1.38257155056824066e-01, "aps.06.04"],
+    [aps06_f, aps06_fp, aps06_fpp, (20,), [0, 1], np.inf,
+     0.1, 3.46573590208538521e-02, "aps.06.05"],
+    [aps06_f, aps06_fp, aps06_fpp, (40,), [0, 1], np.inf,
+     5e-02, 1.73286795139986315e-02, "aps.06.06"],
+    [aps06_f, aps06_fp, aps06_fpp, (60,), [0, 1], np.inf,
+     1.0 / 30, 1.15524530093324210e-02, "aps.06.07"],
+    [aps06_f, aps06_fp, aps06_fpp, (80,), [0, 1], np.inf,
+     2.5e-02, 8.66433975699931573e-03, "aps.06.08"],
+    [aps06_f, aps06_fp, aps06_fpp, (100,), [0, 1], np.inf,
+     2e-02, 6.93147180559945415e-03, "aps.06.09"],
+    [aps07_f, aps07_fp, aps07_fpp, (5,), [0, 1], np.inf,
+     0.4, 3.84025518406218985e-02, "aps.07.00"],
+    [aps07_f, aps07_fp, aps07_fpp, (10,), [0, 1], np.inf,
+     0.4, 9.90000999800049949e-03, "aps.07.01"],
+    [aps07_f, aps07_fp, aps07_fpp, (20,), [0, 1], np.inf,
+     0.4, 2.49375003906201174e-03, "aps.07.02"],
+    [aps08_f, aps08_fp, aps08_fpp, (2,), [0, 1], np.inf,
+     0.9, 0.5, "aps.08.00"],
+    [aps08_f, aps08_fp, aps08_fpp, (5,), [0, 1], np.inf,
+     0.9, 3.45954815848242059e-01, "aps.08.01"],
+    [aps08_f, aps08_fp, aps08_fpp, (10,), [0, 1], np.inf,
+     0.9, 2.45122333753307220e-01, "aps.08.02"],
+    [aps08_f, aps08_fp, aps08_fpp, (15,), [0, 1], np.inf,
+     0.9, 1.95547623536565629e-01, "aps.08.03"],
+    [aps08_f, aps08_fp, aps08_fpp, (20,), [0, 1], np.inf,
+     0.9, 1.64920957276440960e-01, "aps.08.04"],
+    [aps09_f, aps09_fp, aps09_fpp, (1,), [0, 1], np.inf,
+     0.5, 2.75508040999484394e-01, "aps.09.00"],
+    [aps09_f, aps09_fp, aps09_fpp, (2,), [0, 1], np.inf,
+     0.5, 1.37754020499742197e-01, "aps.09.01"],
+    [aps09_f, aps09_fp, aps09_fpp, (4,), [0, 1], np.inf,
+     0.5, 1.03052837781564422e-02, "aps.09.02"],
+    [aps09_f, aps09_fp, aps09_fpp, (5,), [0, 1], np.inf,
+     0.5, 3.61710817890406339e-03, "aps.09.03"],
+    [aps09_f, aps09_fp, aps09_fpp, (8,), [0, 1], np.inf,
+     0.5, 4.10872918496395375e-04, "aps.09.04"],
+    [aps09_f, aps09_fp, aps09_fpp, (15,), [0, 1], np.inf,
+     0.5, 2.59895758929076292e-05, "aps.09.05"],
+    [aps09_f, aps09_fp, aps09_fpp, (20,), [0, 1], np.inf,
+     0.5, 7.66859512218533719e-06, "aps.09.06"],
+    [aps10_f, aps10_fp, aps10_fpp, (1,), [0, 1], np.inf,
+     0.9, 4.01058137541547011e-01, "aps.10.00"],
+    [aps10_f, aps10_fp, aps10_fpp, (5,), [0, 1], np.inf,
+     0.9, 5.16153518757933583e-01, "aps.10.01"],
+    [aps10_f, aps10_fp, aps10_fpp, (10,), [0, 1], np.inf,
+     0.9, 5.39522226908415781e-01, "aps.10.02"],
+    [aps10_f, aps10_fp, aps10_fpp, (15,), [0, 1], np.inf,
+     0.9, 5.48182294340655241e-01, "aps.10.03"],
+    [aps10_f, aps10_fp, aps10_fpp, (20,), [0, 1], np.inf,
+     0.9, 5.52704666678487833e-01, "aps.10.04"],
+    [aps11_f, aps11_fp, aps11_fpp, (2,), [0.01, 1], np.inf,
+     1e-02, 1.0 / 2, "aps.11.00"],
+    [aps11_f, aps11_fp, aps11_fpp, (5,), [0.01, 1], np.inf,
+     1e-02, 1.0 / 5, "aps.11.01"],
+    [aps11_f, aps11_fp, aps11_fpp, (15,), [0.01, 1], np.inf,
+     1e-02, 1.0 / 15, "aps.11.02"],
+    [aps11_f, aps11_fp, aps11_fpp, (20,), [0.01, 1], np.inf,
+     1e-02, 1.0 / 20, "aps.11.03"],
+    [aps12_f, aps12_fp, aps12_fpp, (2,), [1, 100], np.inf,
+     1.1, 2, "aps.12.00"],
+    [aps12_f, aps12_fp, aps12_fpp, (3,), [1, 100], np.inf,
+     1.1, 3, "aps.12.01"],
+    [aps12_f, aps12_fp, aps12_fpp, (4,), [1, 100], np.inf,
+     1.1, 4, "aps.12.02"],
+    [aps12_f, aps12_fp, aps12_fpp, (5,), [1, 100], np.inf,
+     1.1, 5, "aps.12.03"],
+    [aps12_f, aps12_fp, aps12_fpp, (6,), [1, 100], np.inf,
+     1.1, 6, "aps.12.04"],
+    [aps12_f, aps12_fp, aps12_fpp, (7,), [1, 100], np.inf,
+     1.1, 7, "aps.12.05"],
+    [aps12_f, aps12_fp, aps12_fpp, (9,), [1, 100], np.inf,
+     1.1, 9, "aps.12.06"],
+    [aps12_f, aps12_fp, aps12_fpp, (11,), [1, 100], np.inf,
+     1.1, 11, "aps.12.07"],
+    [aps12_f, aps12_fp, aps12_fpp, (13,), [1, 100], np.inf,
+     1.1, 13, "aps.12.08"],
+    [aps12_f, aps12_fp, aps12_fpp, (15,), [1, 100], np.inf,
+     1.1, 15, "aps.12.09"],
+    [aps12_f, aps12_fp, aps12_fpp, (17,), [1, 100], np.inf,
+     1.1, 17, "aps.12.10"],
+    [aps12_f, aps12_fp, aps12_fpp, (19,), [1, 100], np.inf,
+     1.1, 19, "aps.12.11"],
+    [aps12_f, aps12_fp, aps12_fpp, (21,), [1, 100], np.inf,
+     1.1, 21, "aps.12.12"],
+    [aps12_f, aps12_fp, aps12_fpp, (23,), [1, 100], np.inf,
+     1.1, 23, "aps.12.13"],
+    [aps12_f, aps12_fp, aps12_fpp, (25,), [1, 100], np.inf,
+     1.1, 25, "aps.12.14"],
+    [aps12_f, aps12_fp, aps12_fpp, (27,), [1, 100], np.inf,
+     1.1, 27, "aps.12.15"],
+    [aps12_f, aps12_fp, aps12_fpp, (29,), [1, 100], np.inf,
+     1.1, 29, "aps.12.16"],
+    [aps12_f, aps12_fp, aps12_fpp, (31,), [1, 100], np.inf,
+     1.1, 31, "aps.12.17"],
+    [aps12_f, aps12_fp, aps12_fpp, (33,), [1, 100], np.inf,
+     1.1, 33, "aps.12.18"],
+    [aps13_f, aps13_fp, aps13_fpp, (), [-1, 4], np.inf,
+     1.5, 0, "aps.13.00"],
+    [aps14_f, aps14_fp, aps14_fpp, (1,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.00"],
+    [aps14_f, aps14_fp, aps14_fpp, (2,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.01"],
+    [aps14_f, aps14_fp, aps14_fpp, (3,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.02"],
+    [aps14_f, aps14_fp, aps14_fpp, (4,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.03"],
+    [aps14_f, aps14_fp, aps14_fpp, (5,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.04"],
+    [aps14_f, aps14_fp, aps14_fpp, (6,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.05"],
+    [aps14_f, aps14_fp, aps14_fpp, (7,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.06"],
+    [aps14_f, aps14_fp, aps14_fpp, (8,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.07"],
+    [aps14_f, aps14_fp, aps14_fpp, (9,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.08"],
+    [aps14_f, aps14_fp, aps14_fpp, (10,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.09"],
+    [aps14_f, aps14_fp, aps14_fpp, (11,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.10"],
+    [aps14_f, aps14_fp, aps14_fpp, (12,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.11"],
+    [aps14_f, aps14_fp, aps14_fpp, (13,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.12"],
+    [aps14_f, aps14_fp, aps14_fpp, (14,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.13"],
+    [aps14_f, aps14_fp, aps14_fpp, (15,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.14"],
+    [aps14_f, aps14_fp, aps14_fpp, (16,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.15"],
+    [aps14_f, aps14_fp, aps14_fpp, (17,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.16"],
+    [aps14_f, aps14_fp, aps14_fpp, (18,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.17"],
+    [aps14_f, aps14_fp, aps14_fpp, (19,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.18"],
+    [aps14_f, aps14_fp, aps14_fpp, (20,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.19"],
+    [aps14_f, aps14_fp, aps14_fpp, (21,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.20"],
+    [aps14_f, aps14_fp, aps14_fpp, (22,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.21"],
+    [aps14_f, aps14_fp, aps14_fpp, (23,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.22"],
+    [aps14_f, aps14_fp, aps14_fpp, (24,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.23"],
+    [aps14_f, aps14_fp, aps14_fpp, (25,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.24"],
+    [aps14_f, aps14_fp, aps14_fpp, (26,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.25"],
+    [aps14_f, aps14_fp, aps14_fpp, (27,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.26"],
+    [aps14_f, aps14_fp, aps14_fpp, (28,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.27"],
+    [aps14_f, aps14_fp, aps14_fpp, (29,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.28"],
+    [aps14_f, aps14_fp, aps14_fpp, (30,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.29"],
+    [aps14_f, aps14_fp, aps14_fpp, (31,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.30"],
+    [aps14_f, aps14_fp, aps14_fpp, (32,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.31"],
+    [aps14_f, aps14_fp, aps14_fpp, (33,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.32"],
+    [aps14_f, aps14_fp, aps14_fpp, (34,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.33"],
+    [aps14_f, aps14_fp, aps14_fpp, (35,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.34"],
+    [aps14_f, aps14_fp, aps14_fpp, (36,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.35"],
+    [aps14_f, aps14_fp, aps14_fpp, (37,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.36"],
+    [aps14_f, aps14_fp, aps14_fpp, (38,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.37"],
+    [aps14_f, aps14_fp, aps14_fpp, (39,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.38"],
+    [aps14_f, aps14_fp, aps14_fpp, (40,), [-1000, np.pi / 2], 0,
+     1, 6.23806518961612433e-01, "aps.14.39"],
+    [aps15_f, aps15_fp, aps15_fpp, (20,), [-1000, 1e-4], 0,
+     -2, 5.90513055942197166e-05, "aps.15.00"],
+    [aps15_f, aps15_fp, aps15_fpp, (21,), [-1000, 1e-4], 0,
+     -2, 5.63671553399369967e-05, "aps.15.01"],
+    [aps15_f, aps15_fp, aps15_fpp, (22,), [-1000, 1e-4], 0,
+     -2, 5.39164094555919196e-05, "aps.15.02"],
+    [aps15_f, aps15_fp, aps15_fpp, (23,), [-1000, 1e-4], 0,
+     -2, 5.16698923949422470e-05, "aps.15.03"],
+    [aps15_f, aps15_fp, aps15_fpp, (24,), [-1000, 1e-4], 0,
+     -2, 4.96030966991445609e-05, "aps.15.04"],
+    [aps15_f, aps15_fp, aps15_fpp, (25,), [-1000, 1e-4], 0,
+     -2, 4.76952852876389951e-05, "aps.15.05"],
+    [aps15_f, aps15_fp, aps15_fpp, (26,), [-1000, 1e-4], 0,
+     -2, 4.59287932399486662e-05, "aps.15.06"],
+    [aps15_f, aps15_fp, aps15_fpp, (27,), [-1000, 1e-4], 0,
+     -2, 4.42884791956647841e-05, "aps.15.07"],
+    [aps15_f, aps15_fp, aps15_fpp, (28,), [-1000, 1e-4], 0,
+     -2, 4.27612902578832391e-05, "aps.15.08"],
+    [aps15_f, aps15_fp, aps15_fpp, (29,), [-1000, 1e-4], 0,
+     -2, 4.13359139159538030e-05, "aps.15.09"],
+    [aps15_f, aps15_fp, aps15_fpp, (30,), [-1000, 1e-4], 0,
+     -2, 4.00024973380198076e-05, "aps.15.10"],
+    [aps15_f, aps15_fp, aps15_fpp, (31,), [-1000, 1e-4], 0,
+     -2, 3.87524192962066869e-05, "aps.15.11"],
+    [aps15_f, aps15_fp, aps15_fpp, (32,), [-1000, 1e-4], 0,
+     -2, 3.75781035599579910e-05, "aps.15.12"],
+    [aps15_f, aps15_fp, aps15_fpp, (33,), [-1000, 1e-4], 0,
+     -2, 3.64728652199592355e-05, "aps.15.13"],
+    [aps15_f, aps15_fp, aps15_fpp, (34,), [-1000, 1e-4], 0,
+     -2, 3.54307833565318273e-05, "aps.15.14"],
+    [aps15_f, aps15_fp, aps15_fpp, (35,), [-1000, 1e-4], 0,
+     -2, 3.44465949299614980e-05, "aps.15.15"],
+    [aps15_f, aps15_fp, aps15_fpp, (36,), [-1000, 1e-4], 0,
+     -2, 3.35156058778003705e-05, "aps.15.16"],
+    [aps15_f, aps15_fp, aps15_fpp, (37,), [-1000, 1e-4], 0,
+     -2, 3.26336162494372125e-05, "aps.15.17"],
+    [aps15_f, aps15_fp, aps15_fpp, (38,), [-1000, 1e-4], 0,
+     -2, 3.17968568584260013e-05, "aps.15.18"],
+    [aps15_f, aps15_fp, aps15_fpp, (39,), [-1000, 1e-4], 0,
+     -2, 3.10019354369653455e-05, "aps.15.19"],
+    [aps15_f, aps15_fp, aps15_fpp, (40,), [-1000, 1e-4], 0,
+     -2, 3.02457906702100968e-05, "aps.15.20"],
+    [aps15_f, aps15_fp, aps15_fpp, (100,), [-1000, 1e-4], 0,
+     -2, 1.22779942324615231e-05, "aps.15.21"],
+    [aps15_f, aps15_fp, aps15_fpp, (200,), [-1000, 1e-4], 0,
+     -2, 6.16953939044086617e-06, "aps.15.22"],
+    [aps15_f, aps15_fp, aps15_fpp, (300,), [-1000, 1e-4], 0,
+     -2, 4.11985852982928163e-06, "aps.15.23"],
+    [aps15_f, aps15_fp, aps15_fpp, (400,), [-1000, 1e-4], 0,
+     -2, 3.09246238772721682e-06, "aps.15.24"],
+    [aps15_f, aps15_fp, aps15_fpp, (500,), [-1000, 1e-4], 0,
+     -2, 2.47520442610501789e-06, "aps.15.25"],
+    [aps15_f, aps15_fp, aps15_fpp, (600,), [-1000, 1e-4], 0,
+     -2, 2.06335676785127107e-06, "aps.15.26"],
+    [aps15_f, aps15_fp, aps15_fpp, (700,), [-1000, 1e-4], 0,
+     -2, 1.76901200781542651e-06, "aps.15.27"],
+    [aps15_f, aps15_fp, aps15_fpp, (800,), [-1000, 1e-4], 0,
+     -2, 1.54816156988591016e-06, "aps.15.28"],
+    [aps15_f, aps15_fp, aps15_fpp, (900,), [-1000, 1e-4], 0,
+     -2, 1.37633453660223511e-06, "aps.15.29"],
+    [aps15_f, aps15_fp, aps15_fpp, (1000,), [-1000, 1e-4], 0,
+     -2, 1.23883857889971403e-06, "aps.15.30"]
+]
+
+_APS_TESTS_DICTS = [dict(zip(_APS_TESTS_KEYS, testcase)) for testcase in _APS_TESTS]
+
+
+#   ##################
+#   "complex" test cases
+#   A few simple, complex-valued, functions, defined on the complex plane.
+
+
+def cplx01_f(z, n, a):
+    r"""z**n-a:  Use to find the nth root of a"""
+    return z**n - a
+
+
+def cplx01_fp(z, n, a):
+    return n * z**(n - 1)
+
+
+def cplx01_fpp(z, n, a):
+    return n * (n - 1) * z**(n - 2)
+
+
+def cplx02_f(z, a):
+    r"""e**z - a: Use to find the log of a"""
+    return np.exp(z) - a
+
+
+def cplx02_fp(z, a):
+    return np.exp(z)
+
+
+def cplx02_fpp(z, a):
+    return np.exp(z)
+
+
+# Each "complex" test case has
+# - a function and its two derivatives,
+# - additional arguments,
+# - the order of differentiability of the function on this interval
+# - two starting values x0 and x1
+# - the root
+# - an Identifier of the test case
+#
+# Algorithm 748 is a bracketing algorithm so a bracketing interval was provided
+# in [1] for each test case. Newton and Halley need a single starting point
+# x0, which was chosen to be near the middle of the interval, unless that
+# would make the problem too easy.
+
+
+_COMPLEX_TESTS_KEYS = [
+    "f", "fprime", "fprime2", "args", "smoothness", "x0", "x1", "root", "ID"
+]
+_COMPLEX_TESTS = [
+    [cplx01_f, cplx01_fp, cplx01_fpp, (2, -1), np.inf,
+     (1 + 1j), (0.5 + 0.5j), 1j, "complex.01.00"],
+    [cplx01_f, cplx01_fp, cplx01_fpp, (3, 1), np.inf,
+     (-1 + 1j), (-0.5 + 2.0j), (-0.5 + np.sqrt(3) / 2 * 1.0j),
+     "complex.01.01"],
+    [cplx01_f, cplx01_fp, cplx01_fpp, (3, -1), np.inf,
+     1j, (0.5 + 0.5j), (0.5 + np.sqrt(3) / 2 * 1.0j),
+     "complex.01.02"],
+    [cplx01_f, cplx01_fp, cplx01_fpp, (3, 8), np.inf,
+     5, 4, 2, "complex.01.03"],
+    [cplx02_f, cplx02_fp, cplx02_fpp, (-1,), np.inf,
+     (1 + 2j), (0.5 + 0.5j), np.pi * 1.0j, "complex.02.00"],
+    [cplx02_f, cplx02_fp, cplx02_fpp, (1j,), np.inf,
+     (1 + 2j), (0.5 + 0.5j), np.pi * 0.5j, "complex.02.01"],
+]
+
+_COMPLEX_TESTS_DICTS = [
+    dict(zip(_COMPLEX_TESTS_KEYS, testcase)) for testcase in _COMPLEX_TESTS
+]
+
+
+def _add_a_b(tests):
+    r"""Add "a" and "b" keys to each test from the "bracket" value"""
+    for d in tests:
+        for k, v in zip(['a', 'b'], d.get('bracket', [])):
+            d[k] = v
+
+
+_add_a_b(_ORIGINAL_TESTS_DICTS)
+_add_a_b(_APS_TESTS_DICTS)
+_add_a_b(_COMPLEX_TESTS_DICTS)
+
+
+def get_tests(collection='original', smoothness=None):
+    r"""Return the requested collection of test cases, as an array of dicts with subset-specific keys
+
+    Allowed values of collection:
+    'original': The original benchmarking functions.
+         Real-valued functions of real-valued inputs on an interval with a zero.
+         f1, .., f3 are continuous and infinitely differentiable
+         f4 has a single discontinuity at the root
+         f5 has a root at 1 replacing a 1st order pole
+         f6 is randomly positive on one side of the root, randomly negative on the other
+    'aps': The test problems in the TOMS "Algorithm 748: Enclosing Zeros of Continuous Functions"
+         paper by Alefeld, Potra and Shi. Real-valued functions of
+         real-valued inputs on an interval with a zero.
+         Suitable for methods which start with an enclosing interval, and
+         derivatives up to 2nd order.
+    'complex': Some complex-valued functions of complex-valued inputs.
+         No enclosing bracket is provided.
+         Suitable for methods which use one or more starting values, and
+         derivatives up to 2nd order.
+
+    The dictionary keys will be a subset of
+    ["f", "fprime", "fprime2", "args", "bracket", "a", b", "smoothness", "x0", "x1", "root", "ID"]
+    """  # noqa: E501
+    collection = collection or "original"
+    subsets = {"aps": _APS_TESTS_DICTS,
+               "complex": _COMPLEX_TESTS_DICTS,
+               "original": _ORIGINAL_TESTS_DICTS,
+               "chandrupatla": _CHANDRUPATLA_TESTS_DICTS}
+    tests = subsets.get(collection, [])
+    if smoothness is not None:
+        tests = [tc for tc in tests if tc['smoothness'] >= smoothness]
+    return tests
+
+
+# Backwards compatibility
+methods = [cc.bisect, cc.ridder, cc.brenth, cc.brentq]
+mstrings = ['cc.bisect', 'cc.ridder', 'cc.brenth', 'cc.brentq']
+functions = [f2, f3, f4, f5, f6]
+fstrings = ['f2', 'f3', 'f4', 'f5', 'f6']
+
+#   ##################
+#   "Chandrupatla" test cases
+#   Functions and test cases that appear in [2]
+
+def fun1(x):
+    return x**3 - 2*x - 5
+fun1.root = 2.0945514815423265  # additional precision using mpmath.findroot
+
+
+def fun2(x):
+    return 1 - 1/x**2
+fun2.root = 1
+
+
+def fun3(x):
+    return (x-3)**3
+fun3.root = 3
+
+
+def fun4(x):
+    return 6*(x-2)**5
+fun4.root = 2
+
+
+def fun5(x):
+    return x**9
+fun5.root = 0
+
+
+def fun6(x):
+    return x**19
+fun6.root = 0
+
+
+def fun7(x):
+    xp = array_namespace(x)
+    return 0 if xp.abs(x) < 3.8e-4 else x*xp.exp(-x**(-2))
+fun7.root = 0
+
+
+def fun8(x):
+    xp = array_namespace(x)
+    xi = 0.61489
+    return -(3062*(1-xi)*xp.exp(-x))/(xi + (1-xi)*xp.exp(-x)) - 1013 + 1628/x
+fun8.root = 1.0375360332870405
+
+
+def fun9(x):
+    xp = array_namespace(x)
+    return xp.exp(x) - 2 - 0.01/x**2 + .000002/x**3
+fun9.root = 0.7032048403631358
+
+# Each "chandropatla" test case has
+# - a function,
+# - two starting values x0 and x1
+# - the root
+# - the number of function evaluations required by Chandrupatla's algorithm
+# - an Identifier of the test case
+#
+# Chandrupatla's is a bracketing algorithm, so a bracketing interval was
+# provided in [2] for each test case. No special support for testing with
+# secant/Newton/Halley is provided.
+
+_CHANDRUPATLA_TESTS_KEYS = ["f", "bracket", "root", "nfeval", "ID"]
+_CHANDRUPATLA_TESTS = [
+    [fun1, [2, 3], fun1.root, 7],
+    [fun1, [1, 10], fun1.root, 11],
+    [fun1, [1, 100], fun1.root, 14],
+    [fun1, [-1e4, 1e4], fun1.root, 23],
+    [fun1, [-1e10, 1e10], fun1.root, 43],
+    [fun2, [0.5, 1.51], fun2.root, 8],
+    [fun2, [1e-4, 1e4], fun2.root, 22],
+    [fun2, [1e-6, 1e6], fun2.root, 28],
+    [fun2, [1e-10, 1e10], fun2.root, 41],
+    [fun2, [1e-12, 1e12], fun2.root, 48],
+    [fun3, [0, 5], fun3.root, 21],
+    [fun3, [-10, 10], fun3.root, 23],
+    [fun3, [-1e4, 1e4], fun3.root, 36],
+    [fun3, [-1e6, 1e6], fun3.root, 45],
+    [fun3, [-1e10, 1e10], fun3.root, 55],
+    [fun4, [0, 5], fun4.root, 21],
+    [fun4, [-10, 10], fun4.root, 23],
+    [fun4, [-1e4, 1e4], fun4.root, 33],
+    [fun4, [-1e6, 1e6], fun4.root, 43],
+    [fun4, [-1e10, 1e10], fun4.root, 54],
+    [fun5, [-1, 4], fun5.root, 21],
+    [fun5, [-2, 5], fun5.root, 22],
+    [fun5, [-1, 10], fun5.root, 23],
+    [fun5, [-5, 50], fun5.root, 25],
+    [fun5, [-10, 100], fun5.root, 26],
+    [fun6, [-1., 4.], fun6.root, 21],
+    [fun6, [-2., 5.], fun6.root, 22],
+    [fun6, [-1., 10.], fun6.root, 23],
+    [fun6, [-5., 50.], fun6.root, 25],
+    [fun6, [-10., 100.], fun6.root, 26],
+    [fun7, [-1, 4], fun7.root, 8],
+    [fun7, [-2, 5], fun7.root, 8],
+    [fun7, [-1, 10], fun7.root, 11],
+    [fun7, [-5, 50], fun7.root, 18],
+    [fun7, [-10, 100], fun7.root, 19],
+    [fun8, [2e-4, 2], fun8.root, 9],
+    [fun8, [2e-4, 3], fun8.root, 10],
+    [fun8, [2e-4, 9], fun8.root, 11],
+    [fun8, [2e-4, 27], fun8.root, 12],
+    [fun8, [2e-4, 81], fun8.root, 14],
+    [fun9, [2e-4, 1], fun9.root, 7],
+    [fun9, [2e-4, 3], fun9.root, 8],
+    [fun9, [2e-4, 9], fun9.root, 10],
+    [fun9, [2e-4, 27], fun9.root, 11],
+    [fun9, [2e-4, 81], fun9.root, 13],
+]
+_CHANDRUPATLA_TESTS = [test + [f'{test[0].__name__}.{i%5+1}']
+                       for i, test in enumerate(_CHANDRUPATLA_TESTS)]
+
+_CHANDRUPATLA_TESTS_DICTS = [dict(zip(_CHANDRUPATLA_TESTS_KEYS, testcase))
+                             for testcase in _CHANDRUPATLA_TESTS]
+_add_a_b(_CHANDRUPATLA_TESTS_DICTS)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros.cpython-310-x86_64-linux-gnu.so b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros.cpython-310-x86_64-linux-gnu.so
new file mode 100644
index 0000000000000000000000000000000000000000..7af3971d3d8f44903d9da2be40e4e414cbf6463d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros.cpython-310-x86_64-linux-gnu.so differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros_py.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros_py.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b96902ccbd58ed8fb6de3bbafe551f53fb8bf86
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/_zeros_py.py
@@ -0,0 +1,1395 @@
+import warnings
+from collections import namedtuple
+import operator
+from . import _zeros
+from ._optimize import OptimizeResult
+import numpy as np
+
+
+_iter = 100
+_xtol = 2e-12
+_rtol = 4 * np.finfo(float).eps
+
+__all__ = ['newton', 'bisect', 'ridder', 'brentq', 'brenth', 'toms748',
+           'RootResults']
+
+# Must agree with CONVERGED, SIGNERR, CONVERR, ...  in zeros.h
+_ECONVERGED = 0
+_ESIGNERR = -1  # used in _chandrupatla
+_ECONVERR = -2
+_EVALUEERR = -3
+_ECALLBACK = -4
+_EINPROGRESS = 1
+
+CONVERGED = 'converged'
+SIGNERR = 'sign error'
+CONVERR = 'convergence error'
+VALUEERR = 'value error'
+INPROGRESS = 'No error'
+
+
+flag_map = {_ECONVERGED: CONVERGED, _ESIGNERR: SIGNERR, _ECONVERR: CONVERR,
+            _EVALUEERR: VALUEERR, _EINPROGRESS: INPROGRESS}
+
+
+class RootResults(OptimizeResult):
+    """Represents the root finding result.
+
+    Attributes
+    ----------
+    root : float
+        Estimated root location.
+    iterations : int
+        Number of iterations needed to find the root.
+    function_calls : int
+        Number of times the function was called.
+    converged : bool
+        True if the routine converged.
+    flag : str
+        Description of the cause of termination.
+    method : str
+        Root finding method used.
+
+    """
+
+    def __init__(self, root, iterations, function_calls, flag, method):
+        self.root = root
+        self.iterations = iterations
+        self.function_calls = function_calls
+        self.converged = flag == _ECONVERGED
+        if flag in flag_map:
+            self.flag = flag_map[flag]
+        else:
+            self.flag = flag
+        self.method = method
+
+
+def results_c(full_output, r, method):
+    if full_output:
+        x, funcalls, iterations, flag = r
+        results = RootResults(root=x,
+                              iterations=iterations,
+                              function_calls=funcalls,
+                              flag=flag, method=method)
+        return x, results
+    else:
+        return r
+
+
+def _results_select(full_output, r, method):
+    """Select from a tuple of (root, funccalls, iterations, flag)"""
+    x, funcalls, iterations, flag = r
+    if full_output:
+        results = RootResults(root=x,
+                              iterations=iterations,
+                              function_calls=funcalls,
+                              flag=flag, method=method)
+        return x, results
+    return x
+
+
+def _wrap_nan_raise(f):
+
+    def f_raise(x, *args):
+        fx = f(x, *args)
+        f_raise._function_calls += 1
+        if np.isnan(fx):
+            msg = (f'The function value at x={x} is NaN; '
+                   'solver cannot continue.')
+            err = ValueError(msg)
+            err._x = x
+            err._function_calls = f_raise._function_calls
+            raise err
+        return fx
+
+    f_raise._function_calls = 0
+    return f_raise
+
+
+def newton(func, x0, fprime=None, args=(), tol=1.48e-8, maxiter=50,
+           fprime2=None, x1=None, rtol=0.0,
+           full_output=False, disp=True):
+    """
+    Find a root of a real or complex function using the Newton-Raphson
+    (or secant or Halley's) method.
+
+    Find a root of the scalar-valued function `func` given a nearby scalar
+    starting point `x0`.
+    The Newton-Raphson method is used if the derivative `fprime` of `func`
+    is provided, otherwise the secant method is used. If the second order
+    derivative `fprime2` of `func` is also provided, then Halley's method is
+    used.
+
+    If `x0` is a sequence with more than one item, `newton` returns an array:
+    the roots of the function from each (scalar) starting point in `x0`.
+    In this case, `func` must be vectorized to return a sequence or array of
+    the same shape as its first argument. If `fprime` (`fprime2`) is given,
+    then its return must also have the same shape: each element is the first
+    (second) derivative of `func` with respect to its only variable evaluated
+    at each element of its first argument.
+
+    `newton` is for finding roots of a scalar-valued functions of a single
+    variable. For problems involving several variables, see `root`.
+
+    Parameters
+    ----------
+    func : callable
+        The function whose root is wanted. It must be a function of a
+        single variable of the form ``f(x,a,b,c...)``, where ``a,b,c...``
+        are extra arguments that can be passed in the `args` parameter.
+    x0 : float, sequence, or ndarray
+        An initial estimate of the root that should be somewhere near the
+        actual root. If not scalar, then `func` must be vectorized and return
+        a sequence or array of the same shape as its first argument.
+    fprime : callable, optional
+        The derivative of the function when available and convenient. If it
+        is None (default), then the secant method is used.
+    args : tuple, optional
+        Extra arguments to be used in the function call.
+    tol : float, optional
+        The allowable error of the root's value. If `func` is complex-valued,
+        a larger `tol` is recommended as both the real and imaginary parts
+        of `x` contribute to ``|x - x0|``.
+    maxiter : int, optional
+        Maximum number of iterations.
+    fprime2 : callable, optional
+        The second order derivative of the function when available and
+        convenient. If it is None (default), then the normal Newton-Raphson
+        or the secant method is used. If it is not None, then Halley's method
+        is used.
+    x1 : float, optional
+        Another estimate of the root that should be somewhere near the
+        actual root. Used if `fprime` is not provided.
+    rtol : float, optional
+        Tolerance (relative) for termination.
+    full_output : bool, optional
+        If `full_output` is False (default), the root is returned.
+        If True and `x0` is scalar, the return value is ``(x, r)``, where ``x``
+        is the root and ``r`` is a `RootResults` object.
+        If True and `x0` is non-scalar, the return value is ``(x, converged,
+        zero_der)`` (see Returns section for details).
+    disp : bool, optional
+        If True, raise a RuntimeError if the algorithm didn't converge, with
+        the error message containing the number of iterations and current
+        function value. Otherwise, the convergence status is recorded in a
+        `RootResults` return object.
+        Ignored if `x0` is not scalar.
+        *Note: this has little to do with displaying, however,
+        the `disp` keyword cannot be renamed for backwards compatibility.*
+
+    Returns
+    -------
+    root : float, sequence, or ndarray
+        Estimated location where function is zero.
+    r : `RootResults`, optional
+        Present if ``full_output=True`` and `x0` is scalar.
+        Object containing information about the convergence. In particular,
+        ``r.converged`` is True if the routine converged.
+    converged : ndarray of bool, optional
+        Present if ``full_output=True`` and `x0` is non-scalar.
+        For vector functions, indicates which elements converged successfully.
+    zero_der : ndarray of bool, optional
+        Present if ``full_output=True`` and `x0` is non-scalar.
+        For vector functions, indicates which elements had a zero derivative.
+
+    See Also
+    --------
+    root_scalar : interface to root solvers for scalar functions
+    root : interface to root solvers for multi-input, multi-output functions
+
+    Notes
+    -----
+    The convergence rate of the Newton-Raphson method is quadratic,
+    the Halley method is cubic, and the secant method is
+    sub-quadratic. This means that if the function is well-behaved
+    the actual error in the estimated root after the nth iteration
+    is approximately the square (cube for Halley) of the error
+    after the (n-1)th step. However, the stopping criterion used
+    here is the step size and there is no guarantee that a root
+    has been found. Consequently, the result should be verified.
+    Safer algorithms are brentq, brenth, ridder, and bisect,
+    but they all require that the root first be bracketed in an
+    interval where the function changes sign. The brentq algorithm
+    is recommended for general use in one dimensional problems
+    when such an interval has been found.
+
+    When `newton` is used with arrays, it is best suited for the following
+    types of problems:
+
+    * The initial guesses, `x0`, are all relatively the same distance from
+      the roots.
+    * Some or all of the extra arguments, `args`, are also arrays so that a
+      class of similar problems can be solved together.
+    * The size of the initial guesses, `x0`, is larger than O(100) elements.
+      Otherwise, a naive loop may perform as well or better than a vector.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import matplotlib.pyplot as plt
+    >>> from scipy import optimize
+
+    >>> def f(x):
+    ...     return (x**3 - 1)  # only one real root at x = 1
+
+    ``fprime`` is not provided, use the secant method:
+
+    >>> root = optimize.newton(f, 1.5)
+    >>> root
+    1.0000000000000016
+    >>> root = optimize.newton(f, 1.5, fprime2=lambda x: 6 * x)
+    >>> root
+    1.0000000000000016
+
+    Only ``fprime`` is provided, use the Newton-Raphson method:
+
+    >>> root = optimize.newton(f, 1.5, fprime=lambda x: 3 * x**2)
+    >>> root
+    1.0
+
+    Both ``fprime2`` and ``fprime`` are provided, use Halley's method:
+
+    >>> root = optimize.newton(f, 1.5, fprime=lambda x: 3 * x**2,
+    ...                        fprime2=lambda x: 6 * x)
+    >>> root
+    1.0
+
+    When we want to find roots for a set of related starting values and/or
+    function parameters, we can provide both of those as an array of inputs:
+
+    >>> f = lambda x, a: x**3 - a
+    >>> fder = lambda x, a: 3 * x**2
+    >>> rng = np.random.default_rng()
+    >>> x = rng.standard_normal(100)
+    >>> a = np.arange(-50, 50)
+    >>> vec_res = optimize.newton(f, x, fprime=fder, args=(a, ), maxiter=200)
+
+    The above is the equivalent of solving for each value in ``(x, a)``
+    separately in a for-loop, just faster:
+
+    >>> loop_res = [optimize.newton(f, x0, fprime=fder, args=(a0,),
+    ...                             maxiter=200)
+    ...             for x0, a0 in zip(x, a)]
+    >>> np.allclose(vec_res, loop_res)
+    True
+
+    Plot the results found for all values of ``a``:
+
+    >>> analytical_result = np.sign(a) * np.abs(a)**(1/3)
+    >>> fig, ax = plt.subplots()
+    >>> ax.plot(a, analytical_result, 'o')
+    >>> ax.plot(a, vec_res, '.')
+    >>> ax.set_xlabel('$a$')
+    >>> ax.set_ylabel('$x$ where $f(x, a)=0$')
+    >>> plt.show()
+
+    """
+    if tol <= 0:
+        raise ValueError(f"tol too small ({tol:g} <= 0)")
+    maxiter = operator.index(maxiter)
+    if maxiter < 1:
+        raise ValueError("maxiter must be greater than 0")
+    if np.size(x0) > 1:
+        return _array_newton(func, x0, fprime, args, tol, maxiter, fprime2,
+                             full_output)
+
+    # Convert to float (don't use float(x0); this works also for complex x0)
+    # Use np.asarray because we want x0 to be a numpy object, not a Python
+    # object. e.g. np.complex(1+1j) > 0 is possible, but (1 + 1j) > 0 raises
+    # a TypeError
+    x0 = np.asarray(x0)[()] * 1.0
+    p0 = x0
+    funcalls = 0
+    if fprime is not None:
+        # Newton-Raphson method
+        method = "newton"
+        for itr in range(maxiter):
+            # first evaluate fval
+            fval = func(p0, *args)
+            funcalls += 1
+            # If fval is 0, a root has been found, then terminate
+            if fval == 0:
+                return _results_select(
+                    full_output, (p0, funcalls, itr, _ECONVERGED), method)
+            fder = fprime(p0, *args)
+            funcalls += 1
+            if fder == 0:
+                msg = "Derivative was zero."
+                if disp:
+                    msg += (
+                        " Failed to converge after %d iterations, value is %s."
+                        % (itr + 1, p0))
+                    raise RuntimeError(msg)
+                warnings.warn(msg, RuntimeWarning, stacklevel=2)
+                return _results_select(
+                    full_output, (p0, funcalls, itr + 1, _ECONVERR), method)
+            newton_step = fval / fder
+            if fprime2:
+                fder2 = fprime2(p0, *args)
+                funcalls += 1
+                method = "halley"
+                # Halley's method:
+                #   newton_step /= (1.0 - 0.5 * newton_step * fder2 / fder)
+                # Only do it if denominator stays close enough to 1
+                # Rationale: If 1-adj < 0, then Halley sends x in the
+                # opposite direction to Newton. Doesn't happen if x is close
+                # enough to root.
+                adj = newton_step * fder2 / fder / 2
+                if np.abs(adj) < 1:
+                    newton_step /= 1.0 - adj
+            p = p0 - newton_step
+            if np.isclose(p, p0, rtol=rtol, atol=tol):
+                return _results_select(
+                    full_output, (p, funcalls, itr + 1, _ECONVERGED), method)
+            p0 = p
+    else:
+        # Secant method
+        method = "secant"
+        if x1 is not None:
+            if x1 == x0:
+                raise ValueError("x1 and x0 must be different")
+            p1 = x1
+        else:
+            eps = 1e-4
+            p1 = x0 * (1 + eps)
+            p1 += (eps if p1 >= 0 else -eps)
+        q0 = func(p0, *args)
+        funcalls += 1
+        q1 = func(p1, *args)
+        funcalls += 1
+        if abs(q1) < abs(q0):
+            p0, p1, q0, q1 = p1, p0, q1, q0
+        for itr in range(maxiter):
+            if q1 == q0:
+                if p1 != p0:
+                    msg = f"Tolerance of {p1 - p0} reached."
+                    if disp:
+                        msg += (
+                            " Failed to converge after %d iterations, value is %s."
+                            % (itr + 1, p1))
+                        raise RuntimeError(msg)
+                    warnings.warn(msg, RuntimeWarning, stacklevel=2)
+                p = (p1 + p0) / 2.0
+                return _results_select(
+                    full_output, (p, funcalls, itr + 1, _ECONVERR), method)
+            else:
+                if abs(q1) > abs(q0):
+                    p = (-q0 / q1 * p1 + p0) / (1 - q0 / q1)
+                else:
+                    p = (-q1 / q0 * p0 + p1) / (1 - q1 / q0)
+            if np.isclose(p, p1, rtol=rtol, atol=tol):
+                return _results_select(
+                    full_output, (p, funcalls, itr + 1, _ECONVERGED), method)
+            p0, q0 = p1, q1
+            p1 = p
+            q1 = func(p1, *args)
+            funcalls += 1
+
+    if disp:
+        msg = ("Failed to converge after %d iterations, value is %s."
+               % (itr + 1, p))
+        raise RuntimeError(msg)
+
+    return _results_select(full_output, (p, funcalls, itr + 1, _ECONVERR), method)
+
+
+def _array_newton(func, x0, fprime, args, tol, maxiter, fprime2, full_output):
+    """
+    A vectorized version of Newton, Halley, and secant methods for arrays.
+
+    Do not use this method directly. This method is called from `newton`
+    when ``np.size(x0) > 1`` is ``True``. For docstring, see `newton`.
+    """
+    # Explicitly copy `x0` as `p` will be modified inplace, but the
+    # user's array should not be altered.
+    p = np.array(x0, copy=True)
+
+    failures = np.ones_like(p, dtype=bool)
+    nz_der = np.ones_like(failures)
+    if fprime is not None:
+        # Newton-Raphson method
+        for iteration in range(maxiter):
+            # first evaluate fval
+            fval = np.asarray(func(p, *args))
+            # If all fval are 0, all roots have been found, then terminate
+            if not fval.any():
+                failures = fval.astype(bool)
+                break
+            fder = np.asarray(fprime(p, *args))
+            nz_der = (fder != 0)
+            # stop iterating if all derivatives are zero
+            if not nz_der.any():
+                break
+            # Newton step
+            dp = fval[nz_der] / fder[nz_der]
+            if fprime2 is not None:
+                fder2 = np.asarray(fprime2(p, *args))
+                dp = dp / (1.0 - 0.5 * dp * fder2[nz_der] / fder[nz_der])
+            # only update nonzero derivatives
+            p = np.asarray(p, dtype=np.result_type(p, dp, np.float64))
+            p[nz_der] -= dp
+            failures[nz_der] = np.abs(dp) >= tol  # items not yet converged
+            # stop iterating if there aren't any failures, not incl zero der
+            if not failures[nz_der].any():
+                break
+    else:
+        # Secant method
+        dx = np.finfo(float).eps**0.33
+        p1 = p * (1 + dx) + np.where(p >= 0, dx, -dx)
+        q0 = np.asarray(func(p, *args))
+        q1 = np.asarray(func(p1, *args))
+        active = np.ones_like(p, dtype=bool)
+        for iteration in range(maxiter):
+            nz_der = (q1 != q0)
+            # stop iterating if all derivatives are zero
+            if not nz_der.any():
+                p = (p1 + p) / 2.0
+                break
+            # Secant Step
+            dp = (q1 * (p1 - p))[nz_der] / (q1 - q0)[nz_der]
+            # only update nonzero derivatives
+            p = np.asarray(p, dtype=np.result_type(p, p1, dp, np.float64))
+            p[nz_der] = p1[nz_der] - dp
+            active_zero_der = ~nz_der & active
+            p[active_zero_der] = (p1 + p)[active_zero_der] / 2.0
+            active &= nz_der  # don't assign zero derivatives again
+            failures[nz_der] = np.abs(dp) >= tol  # not yet converged
+            # stop iterating if there aren't any failures, not incl zero der
+            if not failures[nz_der].any():
+                break
+            p1, p = p, p1
+            q0 = q1
+            q1 = np.asarray(func(p1, *args))
+
+    zero_der = ~nz_der & failures  # don't include converged with zero-ders
+    if zero_der.any():
+        # Secant warnings
+        if fprime is None:
+            nonzero_dp = (p1 != p)
+            # non-zero dp, but infinite newton step
+            zero_der_nz_dp = (zero_der & nonzero_dp)
+            if zero_der_nz_dp.any():
+                rms = np.sqrt(
+                    sum((p1[zero_der_nz_dp] - p[zero_der_nz_dp]) ** 2)
+                )
+                warnings.warn(f'RMS of {rms:g} reached', RuntimeWarning, stacklevel=3)
+        # Newton or Halley warnings
+        else:
+            all_or_some = 'all' if zero_der.all() else 'some'
+            msg = f'{all_or_some:s} derivatives were zero'
+            warnings.warn(msg, RuntimeWarning, stacklevel=3)
+    elif failures.any():
+        all_or_some = 'all' if failures.all() else 'some'
+        msg = f'{all_or_some:s} failed to converge after {maxiter:d} iterations'
+        if failures.all():
+            raise RuntimeError(msg)
+        warnings.warn(msg, RuntimeWarning, stacklevel=3)
+
+    if full_output:
+        result = namedtuple('result', ('root', 'converged', 'zero_der'))
+        p = result(p, ~failures, zero_der)
+
+    return p
+
+
+def bisect(f, a, b, args=(),
+           xtol=_xtol, rtol=_rtol, maxiter=_iter,
+           full_output=False, disp=True):
+    """
+    Find root of a function within an interval using bisection.
+
+    Basic bisection routine to find a root of the function `f` between the
+    arguments `a` and `b`. `f(a)` and `f(b)` cannot have the same signs.
+    Slow but sure.
+
+    Parameters
+    ----------
+    f : function
+        Python function returning a number.  `f` must be continuous, and
+        f(a) and f(b) must have opposite signs.
+    a : scalar
+        One end of the bracketing interval [a,b].
+    b : scalar
+        The other end of the bracketing interval [a,b].
+    xtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter must be positive.
+    rtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter cannot be smaller than its default value of
+        ``4*np.finfo(float).eps``.
+    maxiter : int, optional
+        If convergence is not achieved in `maxiter` iterations, an error is
+        raised. Must be >= 0.
+    args : tuple, optional
+        Containing extra arguments for the function `f`.
+        `f` is called by ``apply(f, (x)+args)``.
+    full_output : bool, optional
+        If `full_output` is False, the root is returned. If `full_output` is
+        True, the return value is ``(x, r)``, where x is the root, and r is
+        a `RootResults` object.
+    disp : bool, optional
+        If True, raise RuntimeError if the algorithm didn't converge.
+        Otherwise, the convergence status is recorded in a `RootResults`
+        return object.
+
+    Returns
+    -------
+    root : float
+        Root of `f` between `a` and `b`.
+    r : `RootResults` (present if ``full_output = True``)
+        Object containing information about the convergence. In particular,
+        ``r.converged`` is True if the routine converged.
+
+    Examples
+    --------
+
+    >>> def f(x):
+    ...     return (x**2 - 1)
+
+    >>> from scipy import optimize
+
+    >>> root = optimize.bisect(f, 0, 2)
+    >>> root
+    1.0
+
+    >>> root = optimize.bisect(f, -2, 0)
+    >>> root
+    -1.0
+
+    See Also
+    --------
+    brentq, brenth, bisect, newton
+    fixed_point : scalar fixed-point finder
+    fsolve : n-dimensional root-finding
+
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+    maxiter = operator.index(maxiter)
+    if xtol <= 0:
+        raise ValueError(f"xtol too small ({xtol:g} <= 0)")
+    if rtol < _rtol:
+        raise ValueError(f"rtol too small ({rtol:g} < {_rtol:g})")
+    f = _wrap_nan_raise(f)
+    r = _zeros._bisect(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
+    return results_c(full_output, r, "bisect")
+
+
+def ridder(f, a, b, args=(),
+           xtol=_xtol, rtol=_rtol, maxiter=_iter,
+           full_output=False, disp=True):
+    """
+    Find a root of a function in an interval using Ridder's method.
+
+    Parameters
+    ----------
+    f : function
+        Python function returning a number. f must be continuous, and f(a) and
+        f(b) must have opposite signs.
+    a : scalar
+        One end of the bracketing interval [a,b].
+    b : scalar
+        The other end of the bracketing interval [a,b].
+    xtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter must be positive.
+    rtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter cannot be smaller than its default value of
+        ``4*np.finfo(float).eps``.
+    maxiter : int, optional
+        If convergence is not achieved in `maxiter` iterations, an error is
+        raised. Must be >= 0.
+    args : tuple, optional
+        Containing extra arguments for the function `f`.
+        `f` is called by ``apply(f, (x)+args)``.
+    full_output : bool, optional
+        If `full_output` is False, the root is returned. If `full_output` is
+        True, the return value is ``(x, r)``, where `x` is the root, and `r` is
+        a `RootResults` object.
+    disp : bool, optional
+        If True, raise RuntimeError if the algorithm didn't converge.
+        Otherwise, the convergence status is recorded in any `RootResults`
+        return object.
+
+    Returns
+    -------
+    root : float
+        Root of `f` between `a` and `b`.
+    r : `RootResults` (present if ``full_output = True``)
+        Object containing information about the convergence.
+        In particular, ``r.converged`` is True if the routine converged.
+
+    See Also
+    --------
+    brentq, brenth, bisect, newton : 1-D root-finding
+    fixed_point : scalar fixed-point finder
+
+    Notes
+    -----
+    Uses [Ridders1979]_ method to find a root of the function `f` between the
+    arguments `a` and `b`. Ridders' method is faster than bisection, but not
+    generally as fast as the Brent routines. [Ridders1979]_ provides the
+    classic description and source of the algorithm. A description can also be
+    found in any recent edition of Numerical Recipes.
+
+    The routine used here diverges slightly from standard presentations in
+    order to be a bit more careful of tolerance.
+
+    References
+    ----------
+    .. [Ridders1979]
+       Ridders, C. F. J. "A New Algorithm for Computing a
+       Single Root of a Real Continuous Function."
+       IEEE Trans. Circuits Systems 26, 979-980, 1979.
+
+    Examples
+    --------
+
+    >>> def f(x):
+    ...     return (x**2 - 1)
+
+    >>> from scipy import optimize
+
+    >>> root = optimize.ridder(f, 0, 2)
+    >>> root
+    1.0
+
+    >>> root = optimize.ridder(f, -2, 0)
+    >>> root
+    -1.0
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+    maxiter = operator.index(maxiter)
+    if xtol <= 0:
+        raise ValueError(f"xtol too small ({xtol:g} <= 0)")
+    if rtol < _rtol:
+        raise ValueError(f"rtol too small ({rtol:g} < {_rtol:g})")
+    f = _wrap_nan_raise(f)
+    r = _zeros._ridder(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
+    return results_c(full_output, r, "ridder")
+
+
+def brentq(f, a, b, args=(),
+           xtol=_xtol, rtol=_rtol, maxiter=_iter,
+           full_output=False, disp=True):
+    """
+    Find a root of a function in a bracketing interval using Brent's method.
+
+    Uses the classic Brent's method to find a root of the function `f` on
+    the sign changing interval [a , b]. Generally considered the best of the
+    rootfinding routines here. It is a safe version of the secant method that
+    uses inverse quadratic extrapolation. Brent's method combines root
+    bracketing, interval bisection, and inverse quadratic interpolation. It is
+    sometimes known as the van Wijngaarden-Dekker-Brent method. Brent (1973)
+    claims convergence is guaranteed for functions computable within [a,b].
+
+    [Brent1973]_ provides the classic description of the algorithm. Another
+    description can be found in a recent edition of Numerical Recipes, including
+    [PressEtal1992]_. A third description is at
+    http://mathworld.wolfram.com/BrentsMethod.html. It should be easy to
+    understand the algorithm just by reading our code. Our code diverges a bit
+    from standard presentations: we choose a different formula for the
+    extrapolation step.
+
+    Parameters
+    ----------
+    f : function
+        Python function returning a number. The function :math:`f`
+        must be continuous, and :math:`f(a)` and :math:`f(b)` must
+        have opposite signs.
+    a : scalar
+        One end of the bracketing interval :math:`[a, b]`.
+    b : scalar
+        The other end of the bracketing interval :math:`[a, b]`.
+    xtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter must be positive. For nice functions, Brent's
+        method will often satisfy the above condition with ``xtol/2``
+        and ``rtol/2``. [Brent1973]_
+    rtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter cannot be smaller than its default value of
+        ``4*np.finfo(float).eps``. For nice functions, Brent's
+        method will often satisfy the above condition with ``xtol/2``
+        and ``rtol/2``. [Brent1973]_
+    maxiter : int, optional
+        If convergence is not achieved in `maxiter` iterations, an error is
+        raised. Must be >= 0.
+    args : tuple, optional
+        Containing extra arguments for the function `f`.
+        `f` is called by ``apply(f, (x)+args)``.
+    full_output : bool, optional
+        If `full_output` is False, the root is returned. If `full_output` is
+        True, the return value is ``(x, r)``, where `x` is the root, and `r` is
+        a `RootResults` object.
+    disp : bool, optional
+        If True, raise RuntimeError if the algorithm didn't converge.
+        Otherwise, the convergence status is recorded in any `RootResults`
+        return object.
+
+    Returns
+    -------
+    root : float
+        Root of `f` between `a` and `b`.
+    r : `RootResults` (present if ``full_output = True``)
+        Object containing information about the convergence. In particular,
+        ``r.converged`` is True if the routine converged.
+
+    See Also
+    --------
+    fmin, fmin_powell, fmin_cg, fmin_bfgs, fmin_ncg : multivariate local optimizers
+    leastsq : nonlinear least squares minimizer
+    fmin_l_bfgs_b, fmin_tnc, fmin_cobyla : constrained multivariate optimizers
+    basinhopping, differential_evolution, brute : global optimizers
+    fminbound, brent, golden, bracket : local scalar minimizers
+    fsolve : N-D root-finding
+    brenth, ridder, bisect, newton : 1-D root-finding
+    fixed_point : scalar fixed-point finder
+
+    Notes
+    -----
+    `f` must be continuous.  f(a) and f(b) must have opposite signs.
+
+    References
+    ----------
+    .. [Brent1973]
+       Brent, R. P.,
+       *Algorithms for Minimization Without Derivatives*.
+       Englewood Cliffs, NJ: Prentice-Hall, 1973. Ch. 3-4.
+
+    .. [PressEtal1992]
+       Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T.
+       *Numerical Recipes in FORTRAN: The Art of Scientific Computing*, 2nd ed.
+       Cambridge, England: Cambridge University Press, pp. 352-355, 1992.
+       Section 9.3:  "Van Wijngaarden-Dekker-Brent Method."
+
+    Examples
+    --------
+    >>> def f(x):
+    ...     return (x**2 - 1)
+
+    >>> from scipy import optimize
+
+    >>> root = optimize.brentq(f, -2, 0)
+    >>> root
+    -1.0
+
+    >>> root = optimize.brentq(f, 0, 2)
+    >>> root
+    1.0
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+    maxiter = operator.index(maxiter)
+    if xtol <= 0:
+        raise ValueError(f"xtol too small ({xtol:g} <= 0)")
+    if rtol < _rtol:
+        raise ValueError(f"rtol too small ({rtol:g} < {_rtol:g})")
+    f = _wrap_nan_raise(f)
+    r = _zeros._brentq(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
+    return results_c(full_output, r, "brentq")
+
+
+def brenth(f, a, b, args=(),
+           xtol=_xtol, rtol=_rtol, maxiter=_iter,
+           full_output=False, disp=True):
+    """Find a root of a function in a bracketing interval using Brent's
+    method with hyperbolic extrapolation.
+
+    A variation on the classic Brent routine to find a root of the function f
+    between the arguments a and b that uses hyperbolic extrapolation instead of
+    inverse quadratic extrapolation. Bus & Dekker (1975) guarantee convergence
+    for this method, claiming that the upper bound of function evaluations here
+    is 4 or 5 times that of bisection.
+    f(a) and f(b) cannot have the same signs. Generally, on a par with the
+    brent routine, but not as heavily tested. It is a safe version of the
+    secant method that uses hyperbolic extrapolation.
+    The version here is by Chuck Harris, and implements Algorithm M of
+    [BusAndDekker1975]_, where further details (convergence properties,
+    additional remarks and such) can be found
+
+    Parameters
+    ----------
+    f : function
+        Python function returning a number. f must be continuous, and f(a) and
+        f(b) must have opposite signs.
+    a : scalar
+        One end of the bracketing interval [a,b].
+    b : scalar
+        The other end of the bracketing interval [a,b].
+    xtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter must be positive. As with `brentq`, for nice
+        functions the method will often satisfy the above condition
+        with ``xtol/2`` and ``rtol/2``.
+    rtol : number, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter cannot be smaller than its default value of
+        ``4*np.finfo(float).eps``. As with `brentq`, for nice functions
+        the method will often satisfy the above condition with
+        ``xtol/2`` and ``rtol/2``.
+    maxiter : int, optional
+        If convergence is not achieved in `maxiter` iterations, an error is
+        raised. Must be >= 0.
+    args : tuple, optional
+        Containing extra arguments for the function `f`.
+        `f` is called by ``apply(f, (x)+args)``.
+    full_output : bool, optional
+        If `full_output` is False, the root is returned. If `full_output` is
+        True, the return value is ``(x, r)``, where `x` is the root, and `r` is
+        a `RootResults` object.
+    disp : bool, optional
+        If True, raise RuntimeError if the algorithm didn't converge.
+        Otherwise, the convergence status is recorded in any `RootResults`
+        return object.
+
+    Returns
+    -------
+    root : float
+        Root of `f` between `a` and `b`.
+    r : `RootResults` (present if ``full_output = True``)
+        Object containing information about the convergence. In particular,
+        ``r.converged`` is True if the routine converged.
+
+    See Also
+    --------
+    fmin, fmin_powell, fmin_cg, fmin_bfgs, fmin_ncg : multivariate local optimizers
+    leastsq : nonlinear least squares minimizer
+    fmin_l_bfgs_b, fmin_tnc, fmin_cobyla : constrained multivariate optimizers
+    basinhopping, differential_evolution, brute : global optimizers
+    fminbound, brent, golden, bracket : local scalar minimizers
+    fsolve : N-D root-finding
+    brentq, ridder, bisect, newton : 1-D root-finding
+    fixed_point : scalar fixed-point finder
+
+    References
+    ----------
+    .. [BusAndDekker1975]
+       Bus, J. C. P., Dekker, T. J.,
+       "Two Efficient Algorithms with Guaranteed Convergence for Finding a Zero
+       of a Function", ACM Transactions on Mathematical Software, Vol. 1, Issue
+       4, Dec. 1975, pp. 330-345. Section 3: "Algorithm M".
+       :doi:`10.1145/355656.355659`
+
+    Examples
+    --------
+    >>> def f(x):
+    ...     return (x**2 - 1)
+
+    >>> from scipy import optimize
+
+    >>> root = optimize.brenth(f, -2, 0)
+    >>> root
+    -1.0
+
+    >>> root = optimize.brenth(f, 0, 2)
+    >>> root
+    1.0
+
+    """
+    if not isinstance(args, tuple):
+        args = (args,)
+    maxiter = operator.index(maxiter)
+    if xtol <= 0:
+        raise ValueError(f"xtol too small ({xtol:g} <= 0)")
+    if rtol < _rtol:
+        raise ValueError(f"rtol too small ({rtol:g} < {_rtol:g})")
+    f = _wrap_nan_raise(f)
+    r = _zeros._brenth(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
+    return results_c(full_output, r, "brenth")
+
+
+################################
+# TOMS "Algorithm 748: Enclosing Zeros of Continuous Functions", by
+#  Alefeld, G. E. and Potra, F. A. and Shi, Yixun,
+#  See [1]
+
+
+def _notclose(fs, rtol=_rtol, atol=_xtol):
+    # Ensure not None, not 0, all finite, and not very close to each other
+    notclosefvals = (
+            all(fs) and all(np.isfinite(fs)) and
+            not any(any(np.isclose(_f, fs[i + 1:], rtol=rtol, atol=atol))
+                    for i, _f in enumerate(fs[:-1])))
+    return notclosefvals
+
+
+def _secant(xvals, fvals):
+    """Perform a secant step, taking a little care"""
+    # Secant has many "mathematically" equivalent formulations
+    # x2 = x0 - (x1 - x0)/(f1 - f0) * f0
+    #    = x1 - (x1 - x0)/(f1 - f0) * f1
+    #    = (-x1 * f0 + x0 * f1) / (f1 - f0)
+    #    = (-f0 / f1 * x1 + x0) / (1 - f0 / f1)
+    #    = (-f1 / f0 * x0 + x1) / (1 - f1 / f0)
+    x0, x1 = xvals[:2]
+    f0, f1 = fvals[:2]
+    if f0 == f1:
+        return np.nan
+    if np.abs(f1) > np.abs(f0):
+        x2 = (-f0 / f1 * x1 + x0) / (1 - f0 / f1)
+    else:
+        x2 = (-f1 / f0 * x0 + x1) / (1 - f1 / f0)
+    return x2
+
+
+def _update_bracket(ab, fab, c, fc):
+    """Update a bracket given (c, fc), return the discarded endpoints."""
+    fa, fb = fab
+    idx = (0 if np.sign(fa) * np.sign(fc) > 0 else 1)
+    rx, rfx = ab[idx], fab[idx]
+    fab[idx] = fc
+    ab[idx] = c
+    return rx, rfx
+
+
+def _compute_divided_differences(xvals, fvals, N=None, full=True,
+                                 forward=True):
+    """Return a matrix of divided differences for the xvals, fvals pairs
+
+    DD[i, j] = f[x_{i-j}, ..., x_i] for 0 <= j <= i
+
+    If full is False, just return the main diagonal(or last row):
+      f[a], f[a, b] and f[a, b, c].
+    If forward is False, return f[c], f[b, c], f[a, b, c]."""
+    if full:
+        if forward:
+            xvals = np.asarray(xvals)
+        else:
+            xvals = np.array(xvals)[::-1]
+        M = len(xvals)
+        N = M if N is None else min(N, M)
+        DD = np.zeros([M, N])
+        DD[:, 0] = fvals[:]
+        for i in range(1, N):
+            DD[i:, i] = (np.diff(DD[i - 1:, i - 1]) /
+                         (xvals[i:] - xvals[:M - i]))
+        return DD
+
+    xvals = np.asarray(xvals)
+    dd = np.array(fvals)
+    row = np.array(fvals)
+    idx2Use = (0 if forward else -1)
+    dd[0] = fvals[idx2Use]
+    for i in range(1, len(xvals)):
+        denom = xvals[i:i + len(row) - 1] - xvals[:len(row) - 1]
+        row = np.diff(row)[:] / denom
+        dd[i] = row[idx2Use]
+    return dd
+
+
+def _interpolated_poly(xvals, fvals, x):
+    """Compute p(x) for the polynomial passing through the specified locations.
+
+    Use Neville's algorithm to compute p(x) where p is the minimal degree
+    polynomial passing through the points xvals, fvals"""
+    xvals = np.asarray(xvals)
+    N = len(xvals)
+    Q = np.zeros([N, N])
+    D = np.zeros([N, N])
+    Q[:, 0] = fvals[:]
+    D[:, 0] = fvals[:]
+    for k in range(1, N):
+        alpha = D[k:, k - 1] - Q[k - 1:N - 1, k - 1]
+        diffik = xvals[0:N - k] - xvals[k:N]
+        Q[k:, k] = (xvals[k:] - x) / diffik * alpha
+        D[k:, k] = (xvals[:N - k] - x) / diffik * alpha
+    # Expect Q[-1, 1:] to be small relative to Q[-1, 0] as x approaches a root
+    return np.sum(Q[-1, 1:]) + Q[-1, 0]
+
+
+def _inverse_poly_zero(a, b, c, d, fa, fb, fc, fd):
+    """Inverse cubic interpolation f-values -> x-values
+
+    Given four points (fa, a), (fb, b), (fc, c), (fd, d) with
+    fa, fb, fc, fd all distinct, find poly IP(y) through the 4 points
+    and compute x=IP(0).
+    """
+    return _interpolated_poly([fa, fb, fc, fd], [a, b, c, d], 0)
+
+
+def _newton_quadratic(ab, fab, d, fd, k):
+    """Apply Newton-Raphson like steps, using divided differences to approximate f'
+
+    ab is a real interval [a, b] containing a root,
+    fab holds the real values of f(a), f(b)
+    d is a real number outside [ab, b]
+    k is the number of steps to apply
+    """
+    a, b = ab
+    fa, fb = fab
+    _, B, A = _compute_divided_differences([a, b, d], [fa, fb, fd],
+                                           forward=True, full=False)
+
+    # _P  is the quadratic polynomial through the 3 points
+    def _P(x):
+        # Horner evaluation of fa + B * (x - a) + A * (x - a) * (x - b)
+        return (A * (x - b) + B) * (x - a) + fa
+
+    if A == 0:
+        r = a - fa / B
+    else:
+        r = (a if np.sign(A) * np.sign(fa) > 0 else b)
+        # Apply k Newton-Raphson steps to _P(x), starting from x=r
+        for i in range(k):
+            r1 = r - _P(r) / (B + A * (2 * r - a - b))
+            if not (ab[0] < r1 < ab[1]):
+                if (ab[0] < r < ab[1]):
+                    return r
+                r = sum(ab) / 2.0
+                break
+            r = r1
+
+    return r
+
+
+class TOMS748Solver:
+    """Solve f(x, *args) == 0 using Algorithm748 of Alefeld, Potro & Shi.
+    """
+    _MU = 0.5
+    _K_MIN = 1
+    _K_MAX = 100  # A very high value for real usage. Expect 1, 2, maybe 3.
+
+    def __init__(self):
+        self.f = None
+        self.args = None
+        self.function_calls = 0
+        self.iterations = 0
+        self.k = 2
+        # ab=[a,b] is a global interval containing a root
+        self.ab = [np.nan, np.nan]
+        # fab is function values at a, b
+        self.fab = [np.nan, np.nan]
+        self.d = None
+        self.fd = None
+        self.e = None
+        self.fe = None
+        self.disp = False
+        self.xtol = _xtol
+        self.rtol = _rtol
+        self.maxiter = _iter
+
+    def configure(self, xtol, rtol, maxiter, disp, k):
+        self.disp = disp
+        self.xtol = xtol
+        self.rtol = rtol
+        self.maxiter = maxiter
+        # Silently replace a low value of k with 1
+        self.k = max(k, self._K_MIN)
+        # Noisily replace a high value of k with self._K_MAX
+        if self.k > self._K_MAX:
+            msg = "toms748: Overriding k: ->%d" % self._K_MAX
+            warnings.warn(msg, RuntimeWarning, stacklevel=3)
+            self.k = self._K_MAX
+
+    def _callf(self, x, error=True):
+        """Call the user-supplied function, update book-keeping"""
+        fx = self.f(x, *self.args)
+        self.function_calls += 1
+        if not np.isfinite(fx) and error:
+            raise ValueError(f"Invalid function value: f({x:f}) -> {fx} ")
+        return fx
+
+    def get_result(self, x, flag=_ECONVERGED):
+        r"""Package the result and statistics into a tuple."""
+        return (x, self.function_calls, self.iterations, flag)
+
+    def _update_bracket(self, c, fc):
+        return _update_bracket(self.ab, self.fab, c, fc)
+
+    def start(self, f, a, b, args=()):
+        r"""Prepare for the iterations."""
+        self.function_calls = 0
+        self.iterations = 0
+
+        self.f = f
+        self.args = args
+        self.ab[:] = [a, b]
+        if not np.isfinite(a) or np.imag(a) != 0:
+            raise ValueError(f"Invalid x value: {a} ")
+        if not np.isfinite(b) or np.imag(b) != 0:
+            raise ValueError(f"Invalid x value: {b} ")
+
+        fa = self._callf(a)
+        if not np.isfinite(fa) or np.imag(fa) != 0:
+            raise ValueError(f"Invalid function value: f({a:f}) -> {fa} ")
+        if fa == 0:
+            return _ECONVERGED, a
+        fb = self._callf(b)
+        if not np.isfinite(fb) or np.imag(fb) != 0:
+            raise ValueError(f"Invalid function value: f({b:f}) -> {fb} ")
+        if fb == 0:
+            return _ECONVERGED, b
+
+        if np.sign(fb) * np.sign(fa) > 0:
+            raise ValueError("f(a) and f(b) must have different signs, but "
+                             f"f({a:e})={fa:e}, f({b:e})={fb:e} ")
+        self.fab[:] = [fa, fb]
+
+        return _EINPROGRESS, sum(self.ab) / 2.0
+
+    def get_status(self):
+        """Determine the current status."""
+        a, b = self.ab[:2]
+        if np.isclose(a, b, rtol=self.rtol, atol=self.xtol):
+            return _ECONVERGED, sum(self.ab) / 2.0
+        if self.iterations >= self.maxiter:
+            return _ECONVERR, sum(self.ab) / 2.0
+        return _EINPROGRESS, sum(self.ab) / 2.0
+
+    def iterate(self):
+        """Perform one step in the algorithm.
+
+        Implements Algorithm 4.1(k=1) or 4.2(k=2) in [APS1995]
+        """
+        self.iterations += 1
+        eps = np.finfo(float).eps
+        d, fd, e, fe = self.d, self.fd, self.e, self.fe
+        ab_width = self.ab[1] - self.ab[0]  # Need the start width below
+        c = None
+
+        for nsteps in range(2, self.k+2):
+            # If the f-values are sufficiently separated, perform an inverse
+            # polynomial interpolation step. Otherwise, nsteps repeats of
+            # an approximate Newton-Raphson step.
+            if _notclose(self.fab + [fd, fe], rtol=0, atol=32*eps):
+                c0 = _inverse_poly_zero(self.ab[0], self.ab[1], d, e,
+                                        self.fab[0], self.fab[1], fd, fe)
+                if self.ab[0] < c0 < self.ab[1]:
+                    c = c0
+            if c is None:
+                c = _newton_quadratic(self.ab, self.fab, d, fd, nsteps)
+
+            fc = self._callf(c)
+            if fc == 0:
+                return _ECONVERGED, c
+
+            # re-bracket
+            e, fe = d, fd
+            d, fd = self._update_bracket(c, fc)
+
+        # u is the endpoint with the smallest f-value
+        uix = (0 if np.abs(self.fab[0]) < np.abs(self.fab[1]) else 1)
+        u, fu = self.ab[uix], self.fab[uix]
+
+        _, A = _compute_divided_differences(self.ab, self.fab,
+                                            forward=(uix == 0), full=False)
+        c = u - 2 * fu / A
+        if np.abs(c - u) > 0.5 * (self.ab[1] - self.ab[0]):
+            c = sum(self.ab) / 2.0
+        else:
+            if np.isclose(c, u, rtol=eps, atol=0):
+                # c didn't change (much).
+                # Either because the f-values at the endpoints have vastly
+                # differing magnitudes, or because the root is very close to
+                # that endpoint
+                frs = np.frexp(self.fab)[1]
+                if frs[uix] < frs[1 - uix] - 50:  # Differ by more than 2**50
+                    c = (31 * self.ab[uix] + self.ab[1 - uix]) / 32
+                else:
+                    # Make a bigger adjustment, about the
+                    # size of the requested tolerance.
+                    mm = (1 if uix == 0 else -1)
+                    adj = mm * np.abs(c) * self.rtol + mm * self.xtol
+                    c = u + adj
+                if not self.ab[0] < c < self.ab[1]:
+                    c = sum(self.ab) / 2.0
+
+        fc = self._callf(c)
+        if fc == 0:
+            return _ECONVERGED, c
+
+        e, fe = d, fd
+        d, fd = self._update_bracket(c, fc)
+
+        # If the width of the new interval did not decrease enough, bisect
+        if self.ab[1] - self.ab[0] > self._MU * ab_width:
+            e, fe = d, fd
+            z = sum(self.ab) / 2.0
+            fz = self._callf(z)
+            if fz == 0:
+                return _ECONVERGED, z
+            d, fd = self._update_bracket(z, fz)
+
+        # Record d and e for next iteration
+        self.d, self.fd = d, fd
+        self.e, self.fe = e, fe
+
+        status, xn = self.get_status()
+        return status, xn
+
+    def solve(self, f, a, b, args=(),
+              xtol=_xtol, rtol=_rtol, k=2, maxiter=_iter, disp=True):
+        r"""Solve f(x) = 0 given an interval containing a root."""
+        self.configure(xtol=xtol, rtol=rtol, maxiter=maxiter, disp=disp, k=k)
+        status, xn = self.start(f, a, b, args)
+        if status == _ECONVERGED:
+            return self.get_result(xn)
+
+        # The first step only has two x-values.
+        c = _secant(self.ab, self.fab)
+        if not self.ab[0] < c < self.ab[1]:
+            c = sum(self.ab) / 2.0
+        fc = self._callf(c)
+        if fc == 0:
+            return self.get_result(c)
+
+        self.d, self.fd = self._update_bracket(c, fc)
+        self.e, self.fe = None, None
+        self.iterations += 1
+
+        while True:
+            status, xn = self.iterate()
+            if status == _ECONVERGED:
+                return self.get_result(xn)
+            if status == _ECONVERR:
+                fmt = "Failed to converge after %d iterations, bracket is %s"
+                if disp:
+                    msg = fmt % (self.iterations + 1, self.ab)
+                    raise RuntimeError(msg)
+                return self.get_result(xn, _ECONVERR)
+
+
+def toms748(f, a, b, args=(), k=1,
+            xtol=_xtol, rtol=_rtol, maxiter=_iter,
+            full_output=False, disp=True):
+    """
+    Find a root using TOMS Algorithm 748 method.
+
+    Implements the Algorithm 748 method of Alefeld, Potro and Shi to find a
+    root of the function `f` on the interval ``[a , b]``, where ``f(a)`` and
+    `f(b)` must have opposite signs.
+
+    It uses a mixture of inverse cubic interpolation and
+    "Newton-quadratic" steps. [APS1995].
+
+    Parameters
+    ----------
+    f : function
+        Python function returning a scalar. The function :math:`f`
+        must be continuous, and :math:`f(a)` and :math:`f(b)`
+        have opposite signs.
+    a : scalar,
+        lower boundary of the search interval
+    b : scalar,
+        upper boundary of the search interval
+    args : tuple, optional
+        containing extra arguments for the function `f`.
+        `f` is called by ``f(x, *args)``.
+    k : int, optional
+        The number of Newton quadratic steps to perform each
+        iteration. ``k>=1``.
+    xtol : scalar, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root. The
+        parameter must be positive.
+    rtol : scalar, optional
+        The computed root ``x0`` will satisfy ``np.allclose(x, x0,
+        atol=xtol, rtol=rtol)``, where ``x`` is the exact root.
+    maxiter : int, optional
+        If convergence is not achieved in `maxiter` iterations, an error is
+        raised. Must be >= 0.
+    full_output : bool, optional
+        If `full_output` is False, the root is returned. If `full_output` is
+        True, the return value is ``(x, r)``, where `x` is the root, and `r` is
+        a `RootResults` object.
+    disp : bool, optional
+        If True, raise RuntimeError if the algorithm didn't converge.
+        Otherwise, the convergence status is recorded in the `RootResults`
+        return object.
+
+    Returns
+    -------
+    root : float
+        Approximate root of `f`
+    r : `RootResults` (present if ``full_output = True``)
+        Object containing information about the convergence. In particular,
+        ``r.converged`` is True if the routine converged.
+
+    See Also
+    --------
+    brentq, brenth, ridder, bisect, newton
+    fsolve : find roots in N dimensions.
+
+    Notes
+    -----
+    `f` must be continuous.
+    Algorithm 748 with ``k=2`` is asymptotically the most efficient
+    algorithm known for finding roots of a four times continuously
+    differentiable function.
+    In contrast with Brent's algorithm, which may only decrease the length of
+    the enclosing bracket on the last step, Algorithm 748 decreases it each
+    iteration with the same asymptotic efficiency as it finds the root.
+
+    For easy statement of efficiency indices, assume that `f` has 4
+    continuous deriviatives.
+    For ``k=1``, the convergence order is at least 2.7, and with about
+    asymptotically 2 function evaluations per iteration, the efficiency
+    index is approximately 1.65.
+    For ``k=2``, the order is about 4.6 with asymptotically 3 function
+    evaluations per iteration, and the efficiency index 1.66.
+    For higher values of `k`, the efficiency index approaches
+    the kth root of ``(3k-2)``, hence ``k=1`` or ``k=2`` are
+    usually appropriate.
+
+    References
+    ----------
+    .. [APS1995]
+       Alefeld, G. E. and Potra, F. A. and Shi, Yixun,
+       *Algorithm 748: Enclosing Zeros of Continuous Functions*,
+       ACM Trans. Math. Softw. Volume 221(1995)
+       doi = {10.1145/210089.210111}
+
+    Examples
+    --------
+    >>> def f(x):
+    ...     return (x**3 - 1)  # only one real root at x = 1
+
+    >>> from scipy import optimize
+    >>> root, results = optimize.toms748(f, 0, 2, full_output=True)
+    >>> root
+    1.0
+    >>> results
+          converged: True
+               flag: converged
+     function_calls: 11
+         iterations: 5
+               root: 1.0
+             method: toms748
+    """
+    if xtol <= 0:
+        raise ValueError(f"xtol too small ({xtol:g} <= 0)")
+    if rtol < _rtol / 4:
+        raise ValueError(f"rtol too small ({rtol:g} < {_rtol/4:g})")
+    maxiter = operator.index(maxiter)
+    if maxiter < 1:
+        raise ValueError("maxiter must be greater than 0")
+    if not np.isfinite(a):
+        raise ValueError(f"a is not finite {a}")
+    if not np.isfinite(b):
+        raise ValueError(f"b is not finite {b}")
+    if a >= b:
+        raise ValueError(f"a and b are not an interval [{a}, {b}]")
+    if not k >= 1:
+        raise ValueError(f"k too small ({k} < 1)")
+
+    if not isinstance(args, tuple):
+        args = (args,)
+    f = _wrap_nan_raise(f)
+    solver = TOMS748Solver()
+    result = solver.solve(f, a, b, args=args, k=k, xtol=xtol, rtol=rtol,
+                          maxiter=maxiter, disp=disp)
+    x, function_calls, iterations, flag = result
+    return _results_select(full_output, (x, function_calls, iterations, flag),
+                           "toms748")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cobyla.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cobyla.py
new file mode 100644
index 0000000000000000000000000000000000000000..87d111d8fc1634e54d3766a3f1c58abd37ac58cb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cobyla.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'OptimizeResult',
+    'fmin_cobyla',
+]
+
+def __dir__():
+    return __all__
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="cobyla",
+                                   private_modules=["_cobyla_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..d35f8da68b34d3a587f3a99326770d8550a2135c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize.pxd
@@ -0,0 +1,11 @@
+# Public Cython API declarations
+#
+# See doc/source/dev/contributor/public_cython_api.rst for guidelines
+
+
+# The following cimport statement provides legacy ABI
+# support. Changing it causes an ABI forward-compatibility break
+# (gh-11793), so we currently leave it as is (no further cimport
+# statements should be used in this file).
+from scipy.optimize.cython_optimize._zeros cimport (
+    brentq, brenth, ridder, bisect, zeros_full_output)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..a07250bbeb06542721480c42005307992558fced
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/__init__.py
@@ -0,0 +1,133 @@
+"""
+Cython optimize root finding API
+================================
+The underlying C functions for the following root finders can be accessed
+directly using Cython:
+
+- `~scipy.optimize.bisect`
+- `~scipy.optimize.ridder`
+- `~scipy.optimize.brenth`
+- `~scipy.optimize.brentq`
+
+The Cython API for the root finding functions is similar except there is no
+``disp`` argument. Import the root finding functions using ``cimport`` from
+`scipy.optimize.cython_optimize`. ::
+
+    from scipy.optimize.cython_optimize cimport bisect, ridder, brentq, brenth
+
+
+Callback signature
+------------------
+The zeros functions in `~scipy.optimize.cython_optimize` expect a callback that
+takes a double for the scalar independent variable as the 1st argument and a
+user defined ``struct`` with any extra parameters as the 2nd argument. ::
+
+    double (*callback_type)(double, void*) noexcept
+
+
+Examples
+--------
+Usage of `~scipy.optimize.cython_optimize` requires Cython to write callbacks
+that are compiled into C. For more information on compiling Cython, see the
+`Cython Documentation `_.
+
+These are the basic steps:
+
+1. Create a Cython ``.pyx`` file, for example: ``myexample.pyx``.
+2. Import the desired root finder from `~scipy.optimize.cython_optimize`.
+3. Write the callback function, and call the selected root finding function
+   passing the callback, any extra arguments, and the other solver
+   parameters. ::
+
+       from scipy.optimize.cython_optimize cimport brentq
+
+       # import math from Cython
+       from libc cimport math
+
+       myargs = {'C0': 1.0, 'C1': 0.7}  # a dictionary of extra arguments
+       XLO, XHI = 0.5, 1.0  # lower and upper search boundaries
+       XTOL, RTOL, MITR = 1e-3, 1e-3, 10  # other solver parameters
+
+       # user-defined struct for extra parameters
+       ctypedef struct test_params:
+           double C0
+           double C1
+
+
+       # user-defined callback
+       cdef double f(double x, void *args) noexcept:
+           cdef test_params *myargs =  args
+           return myargs.C0 - math.exp(-(x - myargs.C1))
+
+
+       # Cython wrapper function
+       cdef double brentq_wrapper_example(dict args, double xa, double xb,
+                                          double xtol, double rtol, int mitr):
+           # Cython automatically casts dictionary to struct
+           cdef test_params myargs = args
+           return brentq(
+               f, xa, xb,  &myargs, xtol, rtol, mitr, NULL)
+
+
+       # Python function
+       def brentq_example(args=myargs, xa=XLO, xb=XHI, xtol=XTOL, rtol=RTOL,
+                          mitr=MITR):
+           '''Calls Cython wrapper from Python.'''
+           return brentq_wrapper_example(args, xa, xb, xtol, rtol, mitr)
+
+4. If you want to call your function from Python, create a Cython wrapper, and
+   a Python function that calls the wrapper, or use ``cpdef``. Then, in Python,
+   you can import and run the example. ::
+
+       from myexample import brentq_example
+
+       x = brentq_example()
+       # 0.6999942848231314
+
+5. Create a Cython ``.pxd`` file if you need to export any Cython functions.
+
+
+Full output
+-----------
+The  functions in `~scipy.optimize.cython_optimize` can also copy the full
+output from the solver to a C ``struct`` that is passed as its last argument.
+If you don't want the full output, just pass ``NULL``. The full output
+``struct`` must be type ``zeros_full_output``, which is defined in
+`scipy.optimize.cython_optimize` with the following fields:
+
+- ``int funcalls``: number of function calls
+- ``int iterations``: number of iterations
+- ``int error_num``: error number
+- ``double root``: root of function
+
+The root is copied by `~scipy.optimize.cython_optimize` to the full output
+``struct``. An error number of -1 means a sign error, -2 means a convergence
+error, and 0 means the solver converged. Continuing from the previous example::
+
+    from scipy.optimize.cython_optimize cimport zeros_full_output
+
+
+    # cython brentq solver with full output
+    cdef zeros_full_output brentq_full_output_wrapper_example(
+            dict args, double xa, double xb, double xtol, double rtol,
+            int mitr):
+        cdef test_params myargs = args
+        cdef zeros_full_output my_full_output
+        # use my_full_output instead of NULL
+        brentq(f, xa, xb, &myargs, xtol, rtol, mitr, &my_full_output)
+        return my_full_output
+
+
+    # Python function
+    def brent_full_output_example(args=myargs, xa=XLO, xb=XHI, xtol=XTOL,
+                                  rtol=RTOL, mitr=MITR):
+        '''Returns full output'''
+        return brentq_full_output_wrapper_example(args, xa, xb, xtol, rtol,
+                                                  mitr)
+
+    result = brent_full_output_example()
+    # {'error_num': 0,
+    #  'funcalls': 6,
+    #  'iterations': 5,
+    #  'root': 0.6999942848231314}
+"""
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/_zeros.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/_zeros.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..d3c9e98f0a24d80d15d1f7052f690d608f66dd80
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/_zeros.pxd
@@ -0,0 +1,33 @@
+# Legacy public Cython API declarations
+#
+# NOTE: due to the way Cython ABI compatibility works, **no changes
+# should be made to this file** --- any API additions/changes should be
+# done in `cython_optimize.pxd` (see gh-11793).
+
+ctypedef double (*callback_type)(double, void*) noexcept
+
+ctypedef struct zeros_parameters:
+    callback_type function
+    void* args
+
+ctypedef struct zeros_full_output:
+    int funcalls
+    int iterations
+    int error_num
+    double root
+
+cdef double bisect(callback_type f, double xa, double xb, void* args,
+                   double xtol, double rtol, int iter,
+                   zeros_full_output *full_output) noexcept nogil
+
+cdef double ridder(callback_type f, double xa, double xb, void* args,
+                   double xtol, double rtol, int iter,
+                   zeros_full_output *full_output) noexcept nogil
+
+cdef double brenth(callback_type f, double xa, double xb, void* args,
+                   double xtol, double rtol, int iter,
+                   zeros_full_output *full_output) noexcept nogil
+
+cdef double brentq(callback_type f, double xa, double xb, void* args,
+                   double xtol, double rtol, int iter,
+                   zeros_full_output *full_output) noexcept nogil
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/c_zeros.pxd b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/c_zeros.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..0d83c80eb886846ddbbd6927e37e05812911f856
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/cython_optimize/c_zeros.pxd
@@ -0,0 +1,26 @@
+cdef extern from "../Zeros/zeros.h":
+    ctypedef double (*callback_type)(double, void*) noexcept
+    ctypedef struct scipy_zeros_info:
+        int funcalls
+        int iterations
+        int error_num
+
+cdef extern from "../Zeros/bisect.c" nogil:
+    double bisect(callback_type f, double xa, double xb, double xtol,
+                  double rtol, int iter, void *func_data_param,
+                  scipy_zeros_info *solver_stats)
+
+cdef extern from "../Zeros/ridder.c" nogil:
+    double ridder(callback_type f, double xa, double xb, double xtol,
+                  double rtol, int iter, void *func_data_param,
+                  scipy_zeros_info *solver_stats)
+
+cdef extern from "../Zeros/brenth.c" nogil:
+    double brenth(callback_type f, double xa, double xb, double xtol,
+                  double rtol, int iter, void *func_data_param,
+                  scipy_zeros_info *solver_stats)
+
+cdef extern from "../Zeros/brentq.c" nogil:
+    double brentq(callback_type f, double xa, double xb, double xtol,
+                  double rtol, int iter, void *func_data_param,
+                  scipy_zeros_info *solver_stats)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/elementwise.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/elementwise.py
new file mode 100644
index 0000000000000000000000000000000000000000..f7be4484626880182a17acf883d72388937578d1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/elementwise.py
@@ -0,0 +1,38 @@
+"""
+===================================================================
+Elementwise Scalar Optimization (:mod:`scipy.optimize.elementwise`)
+===================================================================
+
+.. currentmodule:: scipy.optimize.elementwise
+
+This module provides a collection of functions for root finding and
+minimization of scalar, real-valued functions of one variable. Unlike their
+counterparts in the base :mod:`scipy.optimize` namespace, these functions work
+elementwise, enabling the solution of many related problems in an efficient,
+vectorized call. Furthermore, when environment variable ``SCIPY_ARRAY_API=1``,
+these functions can accept non-NumPy, array API standard compatible arrays and
+perform all calculations using the corresponding array library (e.g. PyTorch,
+JAX, CuPy).
+
+Root finding
+============
+
+.. autosummary::
+   :toctree: generated/
+
+   find_root
+   bracket_root
+
+Minimization
+============
+
+.. autosummary::
+   :toctree: generated/
+
+   find_minimum
+   bracket_minimum
+
+"""
+from ._elementwise import find_root, find_minimum, bracket_root, bracket_minimum  # noqa: F401, E501
+
+__all__ = ["find_root", "find_minimum", "bracket_root", "bracket_minimum"]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/lbfgsb.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/lbfgsb.py
new file mode 100644
index 0000000000000000000000000000000000000000..866407cabb3decf0ff72239e6fd372f69f7550c0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/lbfgsb.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'LbfgsInvHessProduct',
+    'OptimizeResult',
+    'fmin_l_bfgs_b',
+    'zeros',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="lbfgsb",
+                                   private_modules=["_lbfgsb_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/linesearch.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/linesearch.py
new file mode 100644
index 0000000000000000000000000000000000000000..cb34b25092da34991c868683da3d6a894d1a7f80
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/linesearch.py
@@ -0,0 +1,18 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = ["line_search"]  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="linesearch",
+                                   private_modules=["_linesearch"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..29fddef537361d8508e6343d23b2c3c7d6d12ec6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack.py
@@ -0,0 +1,27 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'OptimizeResult',
+    'OptimizeWarning',
+    'curve_fit',
+    'fixed_point',
+    'fsolve',
+    'least_squares',
+    'leastsq',
+    'zeros',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="minpack",
+                                   private_modules=["_minpack_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack2.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack2.py
new file mode 100644
index 0000000000000000000000000000000000000000..cdb3503e0e1e4c886c89bfb62e6a2efc3ba54549
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/minpack2.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="minpack2",
+                                   private_modules=["_minpack2"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/moduleTNC.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/moduleTNC.py
new file mode 100644
index 0000000000000000000000000000000000000000..3fc5884ed5c39437b7681395419d641443a1fdb8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/moduleTNC.py
@@ -0,0 +1,19 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="moduleTNC",
+                                   private_modules=["_moduleTNC"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/nonlin.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/nonlin.py
new file mode 100644
index 0000000000000000000000000000000000000000..20b490b40ef790a2943d539790b45fc378df2c76
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/nonlin.py
@@ -0,0 +1,29 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'BroydenFirst',
+    'InverseJacobian',
+    'KrylovJacobian',
+    'anderson',
+    'broyden1',
+    'broyden2',
+    'diagbroyden',
+    'excitingmixing',
+    'linearmixing',
+    'newton_krylov',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="nonlin",
+                                   private_modules=["_nonlin"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/optimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/optimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..4db770e5f6e921906c916f2650003d92f5507791
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/optimize.py
@@ -0,0 +1,40 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'OptimizeResult',
+    'OptimizeWarning',
+    'approx_fprime',
+    'bracket',
+    'brent',
+    'brute',
+    'check_grad',
+    'fmin',
+    'fmin_bfgs',
+    'fmin_cg',
+    'fmin_ncg',
+    'fmin_powell',
+    'fminbound',
+    'golden',
+    'line_search',
+    'rosen',
+    'rosen_der',
+    'rosen_hess',
+    'rosen_hess_prod',
+    'show_options',
+    'zeros',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="optimize",
+                                   private_modules=["_optimize"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/slsqp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/slsqp.py
new file mode 100644
index 0000000000000000000000000000000000000000..c2b77d2eb447527cd91e92907e06ad53dd1ad3d8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/slsqp.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'OptimizeResult',
+    'fmin_slsqp',
+    'slsqp',
+    'zeros',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="slsqp",
+                                   private_modules=["_slsqp_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/extending.pyx b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/extending.pyx
new file mode 100644
index 0000000000000000000000000000000000000000..d831b3c7f5dcaee71371027c7ee95aa9ee51d157
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/extending.pyx
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+#cython: language_level=3
+#cython: boundscheck=False
+#cython: wraparound=False
+"""
+Taken from docstring for scipy.optimize.cython_optimize module.
+"""
+
+from scipy.optimize.cython_optimize cimport brentq
+
+# import math from Cython
+from libc cimport math
+
+myargs = {'C0': 1.0, 'C1': 0.7}  # a dictionary of extra arguments
+XLO, XHI = 0.5, 1.0  # lower and upper search boundaries
+XTOL, RTOL, MITR = 1e-3, 1e-3, 10  # other solver parameters
+
+# user-defined struct for extra parameters
+ctypedef struct test_params:
+    double C0
+    double C1
+
+
+# user-defined callback
+cdef double f(double x, void *args) noexcept:
+    cdef test_params *myargs =  args
+    return myargs.C0 - math.exp(-(x - myargs.C1))
+
+
+# Cython wrapper function
+cdef double brentq_wrapper_example(dict args, double xa, double xb,
+                                    double xtol, double rtol, int mitr):
+    # Cython automatically casts dictionary to struct
+    cdef test_params myargs = args
+    return brentq(
+        f, xa, xb,  &myargs, xtol, rtol, mitr, NULL)
+
+
+# Python function
+def brentq_example(args=myargs, xa=XLO, xb=XHI, xtol=XTOL, rtol=RTOL,
+                    mitr=MITR):
+    '''Calls Cython wrapper from Python.'''
+    return brentq_wrapper_example(args, xa, xb, xtol, rtol, mitr)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/meson.build b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..1fb210fbecb84a21518ad8828a789376410f02aa
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/_cython_examples/meson.build
@@ -0,0 +1,32 @@
+project('random-build-examples', 'c', 'cpp', 'cython')
+
+fs = import('fs')
+
+py3 = import('python').find_installation(pure: false)
+
+cy = meson.get_compiler('cython')
+
+if not cy.version().version_compare('>=3.0.8')
+  error('tests requires Cython >= 3.0.8')
+endif
+
+cython_args = []
+if cy.version().version_compare('>=3.1.0')
+  cython_args += ['-Xfreethreading_compatible=True']
+endif
+
+py3.extension_module(
+  'extending',
+  'extending.pyx',
+  cython_args: cython_args,
+  install: false,
+)
+
+extending_cpp = fs.copyfile('extending.pyx', 'extending_cpp.pyx')
+py3.extension_module(
+  'extending_cpp',
+  extending_cpp,
+  cython_args: cython_args,
+  install: false,
+  override_options : ['cython_language=cpp']
+)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__basinhopping.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__basinhopping.py
new file mode 100644
index 0000000000000000000000000000000000000000..80729460ee6aa596d7dc2c398ce43ff4aacc7bff
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__basinhopping.py
@@ -0,0 +1,535 @@
+"""
+Unit tests for the basin hopping global minimization algorithm.
+"""
+import copy
+
+from numpy.testing import (assert_almost_equal, assert_equal, assert_,
+                           assert_allclose)
+import pytest
+from pytest import raises as assert_raises
+import numpy as np
+from numpy import cos, sin
+
+from scipy.optimize import basinhopping, OptimizeResult
+from scipy.optimize._basinhopping import (
+    Storage, RandomDisplacement, Metropolis, AdaptiveStepsize)
+
+
+def func1d(x):
+    f = cos(14.5 * x - 0.3) + (x + 0.2) * x
+    df = np.array(-14.5 * sin(14.5 * x - 0.3) + 2. * x + 0.2)
+    return f, df
+
+
+def func2d_nograd(x):
+    f = cos(14.5 * x[0] - 0.3) + (x[1] + 0.2) * x[1] + (x[0] + 0.2) * x[0]
+    return f
+
+
+def func2d(x):
+    f = cos(14.5 * x[0] - 0.3) + (x[1] + 0.2) * x[1] + (x[0] + 0.2) * x[0]
+    df = np.zeros(2)
+    df[0] = -14.5 * sin(14.5 * x[0] - 0.3) + 2. * x[0] + 0.2
+    df[1] = 2. * x[1] + 0.2
+    return f, df
+
+
+def func2d_easyderiv(x):
+    f = 2.0*x[0]**2 + 2.0*x[0]*x[1] + 2.0*x[1]**2 - 6.0*x[0]
+    df = np.zeros(2)
+    df[0] = 4.0*x[0] + 2.0*x[1] - 6.0
+    df[1] = 2.0*x[0] + 4.0*x[1]
+
+    return f, df
+
+
+class MyTakeStep1(RandomDisplacement):
+    """use a copy of displace, but have it set a special parameter to
+    make sure it's actually being used."""
+    def __init__(self):
+        self.been_called = False
+        super().__init__()
+
+    def __call__(self, x):
+        self.been_called = True
+        return super().__call__(x)
+
+
+def myTakeStep2(x):
+    """redo RandomDisplacement in function form without the attribute stepsize
+    to make sure everything still works ok
+    """
+    s = 0.5
+    x += np.random.uniform(-s, s, np.shape(x))
+    return x
+
+
+class MyAcceptTest:
+    """pass a custom accept test
+
+    This does nothing but make sure it's being used and ensure all the
+    possible return values are accepted
+    """
+    def __init__(self):
+        self.been_called = False
+        self.ncalls = 0
+        self.testres = [False, 'force accept', True, np.bool_(True),
+                        np.bool_(False), [], {}, 0, 1]
+
+    def __call__(self, **kwargs):
+        self.been_called = True
+        self.ncalls += 1
+        if self.ncalls - 1 < len(self.testres):
+            return self.testres[self.ncalls - 1]
+        else:
+            return True
+
+
+class MyCallBack:
+    """pass a custom callback function
+
+    This makes sure it's being used. It also returns True after 10
+    steps to ensure that it's stopping early.
+
+    """
+    def __init__(self):
+        self.been_called = False
+        self.ncalls = 0
+
+    def __call__(self, x, f, accepted):
+        self.been_called = True
+        self.ncalls += 1
+        if self.ncalls == 10:
+            return True
+
+
+class TestBasinHopping:
+
+    def setup_method(self):
+        """ Tests setup.
+
+        Run tests based on the 1-D and 2-D functions described above.
+        """
+        self.x0 = (1.0, [1.0, 1.0])
+        self.sol = (-0.195, np.array([-0.195, -0.1]))
+
+        self.tol = 3  # number of decimal places
+
+        self.niter = 100
+        self.disp = False
+
+        self.kwargs = {"method": "L-BFGS-B", "jac": True}
+        self.kwargs_nograd = {"method": "L-BFGS-B"}
+
+    def test_TypeError(self):
+        # test the TypeErrors are raised on bad input
+        i = 1
+        # if take_step is passed, it must be callable
+        assert_raises(TypeError, basinhopping, func2d, self.x0[i],
+                      take_step=1)
+        # if accept_test is passed, it must be callable
+        assert_raises(TypeError, basinhopping, func2d, self.x0[i],
+                      accept_test=1)
+
+    def test_input_validation(self):
+        msg = 'target_accept_rate has to be in range \\(0, 1\\)'
+        with assert_raises(ValueError, match=msg):
+            basinhopping(func1d, self.x0[0], target_accept_rate=0.)
+        with assert_raises(ValueError, match=msg):
+            basinhopping(func1d, self.x0[0], target_accept_rate=1.)
+
+        msg = 'stepwise_factor has to be in range \\(0, 1\\)'
+        with assert_raises(ValueError, match=msg):
+            basinhopping(func1d, self.x0[0], stepwise_factor=0.)
+        with assert_raises(ValueError, match=msg):
+            basinhopping(func1d, self.x0[0], stepwise_factor=1.)
+
+    def test_1d_grad(self):
+        # test 1-D minimizations with gradient
+        i = 0
+        res = basinhopping(func1d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=self.niter, disp=self.disp)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+
+    def test_2d(self):
+        # test 2d minimizations with gradient
+        i = 1
+        res = basinhopping(func2d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=self.niter, disp=self.disp)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+        assert_(res.nfev > 0)
+
+    def test_njev(self):
+        # test njev is returned correctly
+        i = 1
+        minimizer_kwargs = self.kwargs.copy()
+        # L-BFGS-B doesn't use njev, but BFGS does
+        minimizer_kwargs["method"] = "BFGS"
+        res = basinhopping(func2d, self.x0[i],
+                           minimizer_kwargs=minimizer_kwargs, niter=self.niter,
+                           disp=self.disp)
+        assert_(res.nfev > 0)
+        assert_equal(res.nfev, res.njev)
+
+    def test_jac(self):
+        # test Jacobian returned
+        minimizer_kwargs = self.kwargs.copy()
+        # BFGS returns a Jacobian
+        minimizer_kwargs["method"] = "BFGS"
+
+        res = basinhopping(func2d_easyderiv, [0.0, 0.0],
+                           minimizer_kwargs=minimizer_kwargs, niter=self.niter,
+                           disp=self.disp)
+
+        assert_(hasattr(res.lowest_optimization_result, "jac"))
+
+        # in this case, the Jacobian is just [df/dx, df/dy]
+        _, jacobian = func2d_easyderiv(res.x)
+        assert_almost_equal(res.lowest_optimization_result.jac, jacobian,
+                            self.tol)
+
+    def test_2d_nograd(self):
+        # test 2-D minimizations without gradient
+        i = 1
+        res = basinhopping(func2d_nograd, self.x0[i],
+                           minimizer_kwargs=self.kwargs_nograd,
+                           niter=self.niter, disp=self.disp)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+
+    @pytest.mark.fail_slow(10)
+    def test_all_minimizers(self):
+        # Test 2-D minimizations with gradient. Nelder-Mead, Powell, COBYLA, and
+        # COBYQA don't accept jac=True, so aren't included here.
+        i = 1
+        methods = ['CG', 'BFGS', 'Newton-CG', 'L-BFGS-B', 'TNC', 'SLSQP']
+        minimizer_kwargs = copy.copy(self.kwargs)
+        for method in methods:
+            minimizer_kwargs["method"] = method
+            res = basinhopping(func2d, self.x0[i],
+                               minimizer_kwargs=minimizer_kwargs,
+                               niter=self.niter, disp=self.disp)
+            assert_almost_equal(res.x, self.sol[i], self.tol)
+
+    @pytest.mark.fail_slow(20)
+    def test_all_nograd_minimizers(self):
+        # Test 2-D minimizations without gradient. Newton-CG requires jac=True,
+        # so not included here.
+        i = 1
+        methods = ['CG', 'BFGS', 'L-BFGS-B', 'TNC', 'SLSQP',
+                   'Nelder-Mead', 'Powell', 'COBYLA', 'COBYQA']
+        minimizer_kwargs = copy.copy(self.kwargs_nograd)
+        for method in methods:
+            # COBYQA takes extensive amount of time on this problem
+            niter = 10 if method == 'COBYQA' else self.niter
+            minimizer_kwargs["method"] = method
+            res = basinhopping(func2d_nograd, self.x0[i],
+                               minimizer_kwargs=minimizer_kwargs,
+                               niter=niter, disp=self.disp, seed=1234)
+            tol = self.tol
+            if method == 'COBYLA':
+                tol = 2
+            assert_almost_equal(res.x, self.sol[i], decimal=tol)
+
+    def test_pass_takestep(self):
+        # test that passing a custom takestep works
+        # also test that the stepsize is being adjusted
+        takestep = MyTakeStep1()
+        initial_step_size = takestep.stepsize
+        i = 1
+        res = basinhopping(func2d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=self.niter, disp=self.disp,
+                           take_step=takestep)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+        assert_(takestep.been_called)
+        # make sure that the build in adaptive step size has been used
+        assert_(initial_step_size != takestep.stepsize)
+
+    def test_pass_simple_takestep(self):
+        # test that passing a custom takestep without attribute stepsize
+        takestep = myTakeStep2
+        i = 1
+        res = basinhopping(func2d_nograd, self.x0[i],
+                           minimizer_kwargs=self.kwargs_nograd,
+                           niter=self.niter, disp=self.disp,
+                           take_step=takestep)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+
+    def test_pass_accept_test(self):
+        # test passing a custom accept test
+        # makes sure it's being used and ensures all the possible return values
+        # are accepted.
+        accept_test = MyAcceptTest()
+        i = 1
+        # there's no point in running it more than a few steps.
+        basinhopping(func2d, self.x0[i], minimizer_kwargs=self.kwargs,
+                     niter=10, disp=self.disp, accept_test=accept_test)
+        assert_(accept_test.been_called)
+
+    def test_pass_callback(self):
+        # test passing a custom callback function
+        # This makes sure it's being used. It also returns True after 10 steps
+        # to ensure that it's stopping early.
+        callback = MyCallBack()
+        i = 1
+        # there's no point in running it more than a few steps.
+        res = basinhopping(func2d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=30, disp=self.disp, callback=callback)
+        assert_(callback.been_called)
+        assert_("callback" in res.message[0])
+        # One of the calls of MyCallBack is during BasinHoppingRunner
+        # construction, so there are only 9 remaining before MyCallBack stops
+        # the minimization.
+        assert_equal(res.nit, 9)
+
+    def test_minimizer_fail(self):
+        # test if a minimizer fails
+        i = 1
+        self.kwargs["options"] = dict(maxiter=0)
+        self.niter = 10
+        res = basinhopping(func2d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=self.niter, disp=self.disp)
+        # the number of failed minimizations should be the number of
+        # iterations + 1
+        assert_equal(res.nit + 1, res.minimization_failures)
+
+    def test_niter_zero(self):
+        # gh5915, what happens if you call basinhopping with niter=0
+        i = 0
+        basinhopping(func1d, self.x0[i], minimizer_kwargs=self.kwargs,
+                     niter=0, disp=self.disp)
+
+    def test_rng_reproducibility(self):
+        # rng should ensure reproducibility between runs
+        minimizer_kwargs = {"method": "L-BFGS-B", "jac": True}
+
+        f_1 = []
+
+        def callback(x, f, accepted):
+            f_1.append(f)
+
+        basinhopping(func2d, [1.0, 1.0], minimizer_kwargs=minimizer_kwargs,
+                     niter=10, callback=callback, rng=10)
+
+        f_2 = []
+
+        def callback2(x, f, accepted):
+            f_2.append(f)
+
+        basinhopping(func2d, [1.0, 1.0], minimizer_kwargs=minimizer_kwargs,
+                     niter=10, callback=callback2, rng=10)
+        assert_equal(np.array(f_1), np.array(f_2))
+
+    def test_random_gen(self):
+        # check that np.random.Generator can be used (numpy >= 1.17)
+        rng = np.random.default_rng(1)
+
+        minimizer_kwargs = {"method": "L-BFGS-B", "jac": True}
+
+        res1 = basinhopping(func2d, [1.0, 1.0],
+                            minimizer_kwargs=minimizer_kwargs,
+                            niter=10, rng=rng)
+
+        rng = np.random.default_rng(1)
+        res2 = basinhopping(func2d, [1.0, 1.0],
+                            minimizer_kwargs=minimizer_kwargs,
+                            niter=10, rng=rng)
+        assert_equal(res1.x, res2.x)
+
+    def test_monotonic_basin_hopping(self):
+        # test 1-D minimizations with gradient and T=0
+        i = 0
+
+        res = basinhopping(func1d, self.x0[i], minimizer_kwargs=self.kwargs,
+                           niter=self.niter, disp=self.disp, T=0)
+        assert_almost_equal(res.x, self.sol[i], self.tol)
+
+
+@pytest.mark.thread_unsafe
+class Test_Storage:
+    def setup_method(self):
+        self.x0 = np.array(1)
+        self.f0 = 0
+
+        minres = OptimizeResult(success=True)
+        minres.x = self.x0
+        minres.fun = self.f0
+
+        self.storage = Storage(minres)
+
+    def test_higher_f_rejected(self):
+        new_minres = OptimizeResult(success=True)
+        new_minres.x = self.x0 + 1
+        new_minres.fun = self.f0 + 1
+
+        ret = self.storage.update(new_minres)
+        minres = self.storage.get_lowest()
+        assert_equal(self.x0, minres.x)
+        assert_equal(self.f0, minres.fun)
+        assert_(not ret)
+
+    @pytest.mark.parametrize('success', [True, False])
+    def test_lower_f_accepted(self, success):
+        new_minres = OptimizeResult(success=success)
+        new_minres.x = self.x0 + 1
+        new_minres.fun = self.f0 - 1
+
+        ret = self.storage.update(new_minres)
+        minres = self.storage.get_lowest()
+        assert (self.x0 != minres.x) == success  # can't use `is`
+        assert (self.f0 != minres.fun) == success  # left side is NumPy bool
+        assert ret is success
+
+
+class Test_RandomDisplacement:
+    def setup_method(self):
+        self.stepsize = 1.0
+        self.N = 300000
+
+    def test_random(self):
+        # the mean should be 0
+        # the variance should be (2*stepsize)**2 / 12
+        # note these tests are random, they will fail from time to time
+        rng = np.random.RandomState(0)
+        x0 = np.zeros([self.N])
+        displace = RandomDisplacement(stepsize=self.stepsize, rng=rng)
+        x = displace(x0)
+        v = (2. * self.stepsize) ** 2 / 12
+        assert_almost_equal(np.mean(x), 0., 1)
+        assert_almost_equal(np.var(x), v, 1)
+
+
+class Test_Metropolis:
+    def setup_method(self):
+        self.T = 2.
+        self.met = Metropolis(self.T)
+        self.res_new = OptimizeResult(success=True, fun=0.)
+        self.res_old = OptimizeResult(success=True, fun=1.)
+
+    def test_boolean_return(self):
+        # the return must be a bool, else an error will be raised in
+        # basinhopping
+        ret = self.met(res_new=self.res_new, res_old=self.res_old)
+        assert isinstance(ret, bool)
+
+    def test_lower_f_accepted(self):
+        assert_(self.met(res_new=self.res_new, res_old=self.res_old))
+
+    def test_accept(self):
+        # test that steps are randomly accepted for f_new > f_old
+        one_accept = False
+        one_reject = False
+        for i in range(1000):
+            if one_accept and one_reject:
+                break
+            res_new = OptimizeResult(success=True, fun=1.)
+            res_old = OptimizeResult(success=True, fun=0.5)
+            ret = self.met(res_new=res_new, res_old=res_old)
+            if ret:
+                one_accept = True
+            else:
+                one_reject = True
+        assert_(one_accept)
+        assert_(one_reject)
+
+    def test_GH7495(self):
+        # an overflow in exp was producing a RuntimeWarning
+        # create own object here in case someone changes self.T
+        met = Metropolis(2)
+        res_new = OptimizeResult(success=True, fun=0.)
+        res_old = OptimizeResult(success=True, fun=2000)
+        with np.errstate(over='raise'):
+            met.accept_reject(res_new=res_new, res_old=res_old)
+
+    def test_gh7799(self):
+        # gh-7799 reported a problem in which local search was successful but
+        # basinhopping returned an invalid solution. Show that this is fixed.
+        def func(x):
+            return (x**2-8)**2+(x+2)**2
+
+        x0 = -4
+        limit = 50  # Constrain to func value >= 50
+        con = {'type': 'ineq', 'fun': lambda x: func(x) - limit},
+        res = basinhopping(
+            func,
+            x0,
+            30,
+            seed=np.random.RandomState(1234),
+            minimizer_kwargs={'constraints': con}
+        )
+        assert res.success
+        assert_allclose(res.fun, limit, rtol=1e-6)
+
+    def test_accept_gh7799(self):
+        # Metropolis should not accept the result of an unsuccessful new local
+        # search if the old local search was successful
+
+        met = Metropolis(0)  # monotonic basin hopping
+        res_new = OptimizeResult(success=True, fun=0.)
+        res_old = OptimizeResult(success=True, fun=1.)
+
+        # if new local search was successful and energy is lower, accept
+        assert met(res_new=res_new, res_old=res_old)
+        # if new res is unsuccessful, don't accept - even if energy is lower
+        res_new.success = False
+        assert not met(res_new=res_new, res_old=res_old)
+        # ...unless the old res was unsuccessful, too. In that case, why not?
+        res_old.success = False
+        assert met(res_new=res_new, res_old=res_old)
+
+    def test_reject_all_gh7799(self):
+        # Test the behavior when there is no feasible solution
+        def fun(x):
+            return x@x
+
+        def constraint(x):
+            return x + 1
+
+        kwargs = {'constraints': {'type': 'eq', 'fun': constraint},
+                  'bounds': [(0, 1), (0, 1)], 'method': 'slsqp'}
+        res = basinhopping(fun, x0=[2, 3], niter=10, minimizer_kwargs=kwargs)
+        assert not res.success
+
+
+class Test_AdaptiveStepsize:
+    def setup_method(self):
+        self.stepsize = 1.
+        self.ts = RandomDisplacement(stepsize=self.stepsize)
+        self.target_accept_rate = 0.5
+        self.takestep = AdaptiveStepsize(takestep=self.ts, verbose=False,
+                                         accept_rate=self.target_accept_rate)
+
+    def test_adaptive_increase(self):
+        # if few steps are rejected, the stepsize should increase
+        x = 0.
+        self.takestep(x)
+        self.takestep.report(False)
+        for i in range(self.takestep.interval):
+            self.takestep(x)
+            self.takestep.report(True)
+        assert_(self.ts.stepsize > self.stepsize)
+
+    def test_adaptive_decrease(self):
+        # if few steps are rejected, the stepsize should increase
+        x = 0.
+        self.takestep(x)
+        self.takestep.report(True)
+        for i in range(self.takestep.interval):
+            self.takestep(x)
+            self.takestep.report(False)
+        assert_(self.ts.stepsize < self.stepsize)
+
+    def test_all_accepted(self):
+        # test that everything works OK if all steps were accepted
+        x = 0.
+        for i in range(self.takestep.interval + 1):
+            self.takestep(x)
+            self.takestep.report(True)
+        assert_(self.ts.stepsize > self.stepsize)
+
+    def test_all_rejected(self):
+        # test that everything works OK if all steps were rejected
+        x = 0.
+        for i in range(self.takestep.interval + 1):
+            self.takestep(x)
+            self.takestep.report(False)
+        assert_(self.ts.stepsize < self.stepsize)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__differential_evolution.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__differential_evolution.py
new file mode 100644
index 0000000000000000000000000000000000000000..3f81877f08abe436211210d5bd15d876c9a7177c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__differential_evolution.py
@@ -0,0 +1,1703 @@
+"""
+Unit tests for the differential global minimization algorithm.
+"""
+import multiprocessing
+from multiprocessing.dummy import Pool as ThreadPool
+import platform
+
+from scipy.optimize._differentialevolution import (DifferentialEvolutionSolver,
+                                                   _ConstraintWrapper)
+from scipy.optimize import differential_evolution, OptimizeResult
+from scipy.optimize._constraints import (Bounds, NonlinearConstraint,
+                                         LinearConstraint)
+from scipy.optimize import rosen, minimize
+from scipy.sparse import csr_matrix
+from scipy import stats
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_allclose, assert_almost_equal,
+                           assert_string_equal, assert_, suppress_warnings)
+from pytest import raises as assert_raises, warns
+import pytest
+
+
+class TestDifferentialEvolutionSolver:
+
+    def setup_method(self):
+        self.old_seterr = np.seterr(invalid='raise')
+        self.limits = np.array([[0., 0.],
+                                [2., 2.]])
+        self.bounds = [(0., 2.), (0., 2.)]
+
+        self.dummy_solver = DifferentialEvolutionSolver(self.quadratic,
+                                                        [(0, 100)])
+
+        # dummy_solver2 will be used to test mutation strategies
+        self.dummy_solver2 = DifferentialEvolutionSolver(self.quadratic,
+                                                         [(0, 1)],
+                                                         popsize=7,
+                                                         mutation=0.5)
+        # create a population that's only 7 members long
+        # [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7]
+        population = np.atleast_2d(np.arange(0.1, 0.8, 0.1)).T
+        self.dummy_solver2.population = population
+
+    def teardown_method(self):
+        np.seterr(**self.old_seterr)
+
+    def quadratic(self, x):
+        return x[0]**2
+
+    def test__strategy_resolves(self):
+        # test that the correct mutation function is resolved by
+        # different requested strategy arguments
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='best1exp')
+        assert_equal(solver.strategy, 'best1exp')
+        assert_equal(solver.mutation_func.__name__, '_best1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='best1bin')
+        assert_equal(solver.strategy, 'best1bin')
+        assert_equal(solver.mutation_func.__name__, '_best1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='rand1bin')
+        assert_equal(solver.strategy, 'rand1bin')
+        assert_equal(solver.mutation_func.__name__, '_rand1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='rand1exp')
+        assert_equal(solver.strategy, 'rand1exp')
+        assert_equal(solver.mutation_func.__name__, '_rand1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='rand2exp')
+        assert_equal(solver.strategy, 'rand2exp')
+        assert_equal(solver.mutation_func.__name__, '_rand2')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='best2bin')
+        assert_equal(solver.strategy, 'best2bin')
+        assert_equal(solver.mutation_func.__name__, '_best2')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='rand2bin')
+        assert_equal(solver.strategy, 'rand2bin')
+        assert_equal(solver.mutation_func.__name__, '_rand2')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='rand2exp')
+        assert_equal(solver.strategy, 'rand2exp')
+        assert_equal(solver.mutation_func.__name__, '_rand2')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='randtobest1bin')
+        assert_equal(solver.strategy, 'randtobest1bin')
+        assert_equal(solver.mutation_func.__name__, '_randtobest1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='randtobest1exp')
+        assert_equal(solver.strategy, 'randtobest1exp')
+        assert_equal(solver.mutation_func.__name__, '_randtobest1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='currenttobest1bin')
+        assert_equal(solver.strategy, 'currenttobest1bin')
+        assert_equal(solver.mutation_func.__name__, '_currenttobest1')
+
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='currenttobest1exp')
+        assert_equal(solver.strategy, 'currenttobest1exp')
+        assert_equal(solver.mutation_func.__name__, '_currenttobest1')
+
+    def test__mutate1(self):
+        # strategies */1/*, i.e. rand/1/bin, best/1/exp, etc.
+        result = np.array([0.05])
+        trial = self.dummy_solver2._best1(np.array([2, 3, 4, 5, 6]))
+        assert_allclose(trial, result)
+
+        result = np.array([0.25])
+        trial = self.dummy_solver2._rand1(np.array([2, 3, 4, 5, 6]))
+        assert_allclose(trial, result)
+
+    def test__mutate2(self):
+        # strategies */2/*, i.e. rand/2/bin, best/2/exp, etc.
+        # [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7]
+
+        result = np.array([-0.1])
+        trial = self.dummy_solver2._best2(np.array([2, 3, 4, 5, 6]))
+        assert_allclose(trial, result)
+
+        result = np.array([0.1])
+        trial = self.dummy_solver2._rand2(np.array([2, 3, 4, 5, 6]))
+        assert_allclose(trial, result)
+
+    def test__randtobest1(self):
+        # strategies randtobest/1/*
+        result = np.array([0.15])
+        trial = self.dummy_solver2._randtobest1(np.array([2, 3, 4, 5, 6]))
+        assert_allclose(trial, result)
+
+    def test__currenttobest1(self):
+        # strategies currenttobest/1/*
+        result = np.array([0.1])
+        trial = self.dummy_solver2._currenttobest1(
+            1,
+            np.array([2, 3, 4, 5, 6])
+        )
+        assert_allclose(trial, result)
+
+    def test_can_init_with_dithering(self):
+        mutation = (0.5, 1)
+        solver = DifferentialEvolutionSolver(self.quadratic,
+                                             self.bounds,
+                                             mutation=mutation)
+
+        assert_equal(solver.dither, list(mutation))
+
+    def test_invalid_mutation_values_arent_accepted(self):
+        func = rosen
+        mutation = (0.5, 3)
+        assert_raises(ValueError,
+                          DifferentialEvolutionSolver,
+                          func,
+                          self.bounds,
+                          mutation=mutation)
+
+        mutation = (-1, 1)
+        assert_raises(ValueError,
+                          DifferentialEvolutionSolver,
+                          func,
+                          self.bounds,
+                          mutation=mutation)
+
+        mutation = (0.1, np.nan)
+        assert_raises(ValueError,
+                          DifferentialEvolutionSolver,
+                          func,
+                          self.bounds,
+                          mutation=mutation)
+
+        mutation = 0.5
+        solver = DifferentialEvolutionSolver(func,
+                                             self.bounds,
+                                             mutation=mutation)
+        assert_equal(0.5, solver.scale)
+        assert_equal(None, solver.dither)
+
+    def test_invalid_functional(self):
+        def func(x):
+            return np.array([np.sum(x ** 2), np.sum(x)])
+
+        with assert_raises(
+                RuntimeError,
+                match=r"func\(x, \*args\) must return a scalar value"):
+            differential_evolution(func, [(-2, 2), (-2, 2)])
+
+    def test__scale_parameters(self):
+        trial = np.array([0.3])
+        assert_equal(30, self.dummy_solver._scale_parameters(trial))
+
+        # it should also work with the limits reversed
+        self.dummy_solver.limits = np.array([[100], [0.]])
+        assert_equal(30, self.dummy_solver._scale_parameters(trial))
+
+    def test__unscale_parameters(self):
+        trial = np.array([30])
+        assert_equal(0.3, self.dummy_solver._unscale_parameters(trial))
+
+        # it should also work with the limits reversed
+        self.dummy_solver.limits = np.array([[100], [0.]])
+        assert_equal(0.3, self.dummy_solver._unscale_parameters(trial))
+
+    def test_equal_bounds(self):
+        with np.errstate(invalid='raise'):
+            solver = DifferentialEvolutionSolver(
+                self.quadratic,
+                bounds=[(2.0, 2.0), (1.0, 3.0)]
+            )
+            v = solver._unscale_parameters([2.0, 2.0])
+            assert_allclose(v, 0.5)
+
+        res = differential_evolution(self.quadratic, [(2.0, 2.0), (3.0, 3.0)])
+        assert_equal(res.x, [2.0, 3.0])
+
+    def test__ensure_constraint(self):
+        trial = np.array([1.1, -100, 0.9, 2., 300., -0.00001])
+        self.dummy_solver._ensure_constraint(trial)
+
+        assert_equal(trial[2], 0.9)
+        assert_(np.logical_and(trial >= 0, trial <= 1).all())
+
+    def test_differential_evolution(self):
+        # test that the Jmin of DifferentialEvolutionSolver
+        # is the same as the function evaluation
+        solver = DifferentialEvolutionSolver(
+            self.quadratic, [(-2, 2)], maxiter=1, polish=False
+        )
+        result = solver.solve()
+        assert_equal(result.fun, self.quadratic(result.x))
+
+        solver = DifferentialEvolutionSolver(
+            self.quadratic, [(-2, 2)], maxiter=1, polish=True
+        )
+        result = solver.solve()
+        assert_equal(result.fun, self.quadratic(result.x))
+
+    def test_best_solution_retrieval(self):
+        # test that the getter property method for the best solution works.
+        solver = DifferentialEvolutionSolver(self.quadratic, [(-2, 2)])
+        result = solver.solve()
+        assert_equal(result.x, solver.x)
+
+    def test_intermediate_result(self):
+        # Check that intermediate result object passed into the callback
+        # function contains the expected information and that raising
+        # `StopIteration` causes the expected behavior.
+        maxiter = 10
+
+        def func(x):
+            val = rosen(x)
+            if val < func.val:
+                func.x = x
+                func.val = val
+            return val
+        func.x = None
+        func.val = np.inf
+
+        def callback(intermediate_result):
+            callback.nit += 1
+            callback.intermediate_result = intermediate_result
+            assert intermediate_result.population.ndim == 2
+            assert intermediate_result.population.shape[1] == 2
+            assert intermediate_result.nit == callback.nit
+
+            # Check that `x` and `fun` attributes are the best found so far
+            assert_equal(intermediate_result.x, callback.func.x)
+            assert_equal(intermediate_result.fun, callback.func.val)
+
+            # Check for consistency between `fun`, `population_energies`,
+            # `x`, and `population`
+            assert_equal(intermediate_result.fun, rosen(intermediate_result.x))
+            for i in range(len(intermediate_result.population_energies)):
+                res = intermediate_result.population_energies[i]
+                ref = rosen(intermediate_result.population[i])
+                assert_equal(res, ref)
+            assert_equal(intermediate_result.x,
+                         intermediate_result.population[0])
+            assert_equal(intermediate_result.fun,
+                         intermediate_result.population_energies[0])
+
+            assert intermediate_result.message == 'in progress'
+            assert intermediate_result.success is True
+            assert isinstance(intermediate_result, OptimizeResult)
+            if callback.nit == maxiter:
+                raise StopIteration
+        callback.nit = 0
+        callback.intermediate_result = None
+        callback.func = func
+
+        bounds = [(0, 2), (0, 2)]
+        kwargs = dict(func=func, bounds=bounds, rng=838245, polish=False)
+        res = differential_evolution(**kwargs, callback=callback)
+        ref = differential_evolution(**kwargs, maxiter=maxiter)
+
+        # Check that final `intermediate_result` is equivalent to returned
+        # result object and that terminating with callback `StopIteration`
+        # after `maxiter` iterations is equivalent to terminating with
+        # `maxiter` parameter.
+        assert res.success is ref.success is False
+        assert callback.nit == res.nit == maxiter
+        assert res.message == 'callback function requested stop early'
+        assert ref.message == 'Maximum number of iterations has been exceeded.'
+        for field, val in ref.items():
+            if field in {'message', 'success'}:  # checked separately
+                continue
+            assert_equal(callback.intermediate_result[field], val)
+            assert_equal(res[field], val)
+
+        # Check that polish occurs after `StopIteration` as advertised
+        callback.nit = 0
+        func.val = np.inf
+        kwargs['polish'] = True
+        res = differential_evolution(**kwargs, callback=callback)
+        assert res.fun < ref.fun
+
+    def test_callback_terminates(self):
+        # test that if the callback returns true, then the minimization halts
+        bounds = [(0, 2), (0, 2)]
+        expected_msg = 'callback function requested stop early'
+        def callback_python_true(param, convergence=0.):
+            return True
+
+        result = differential_evolution(
+            rosen, bounds, callback=callback_python_true
+        )
+        assert_string_equal(result.message, expected_msg)
+
+        # if callback raises StopIteration then solve should be interrupted
+        def callback_stop(intermediate_result):
+            raise StopIteration
+
+        result = differential_evolution(rosen, bounds, callback=callback_stop)
+        assert not result.success
+
+        def callback_evaluates_true(param, convergence=0.):
+            # DE should stop if bool(self.callback) is True
+            return [10]
+
+        result = differential_evolution(rosen, bounds, callback=callback_evaluates_true)
+        assert_string_equal(result.message, expected_msg)
+        assert not result.success
+
+        def callback_evaluates_false(param, convergence=0.):
+            return []
+
+        result = differential_evolution(rosen, bounds,
+                                        callback=callback_evaluates_false)
+        assert result.success
+
+    def test_args_tuple_is_passed(self):
+        # test that the args tuple is passed to the cost function properly.
+        bounds = [(-10, 10)]
+        args = (1., 2., 3.)
+
+        def quadratic(x, *args):
+            if not isinstance(args, tuple):
+                raise ValueError('args should be a tuple')
+            return args[0] + args[1] * x + args[2] * x**2.
+
+        result = differential_evolution(quadratic,
+                                        bounds,
+                                        args=args,
+                                        polish=True)
+        assert_almost_equal(result.fun, 2 / 3.)
+
+    def test_init_with_invalid_strategy(self):
+        # test that passing an invalid strategy raises ValueError
+        func = rosen
+        bounds = [(-3, 3)]
+        assert_raises(ValueError,
+                          differential_evolution,
+                          func,
+                          bounds,
+                          strategy='abc')
+
+    def test_bounds_checking(self):
+        # test that the bounds checking works
+        func = rosen
+        bounds = [(-3)]
+        assert_raises(ValueError,
+                          differential_evolution,
+                          func,
+                          bounds)
+        bounds = [(-3, 3), (3, 4, 5)]
+        assert_raises(ValueError,
+                          differential_evolution,
+                          func,
+                          bounds)
+
+        # test that we can use a new-type Bounds object
+        result = differential_evolution(rosen, Bounds([0, 0], [2, 2]))
+        assert_almost_equal(result.x, (1., 1.))
+
+    def test_select_samples(self):
+        # select_samples should return 5 separate random numbers.
+        limits = np.arange(12., dtype='float64').reshape(2, 6)
+        bounds = list(zip(limits[0, :], limits[1, :]))
+        solver = DifferentialEvolutionSolver(None, bounds, popsize=1)
+        candidate = 0
+        r1, r2, r3, r4, r5 = solver._select_samples(candidate, 5)
+        assert_equal(
+            len(np.unique(np.array([candidate, r1, r2, r3, r4, r5]))), 6)
+
+    def test_maxiter_stops_solve(self):
+        # test that if the maximum number of iterations is exceeded
+        # the solver stops.
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, maxiter=1)
+        result = solver.solve()
+        assert_equal(result.success, False)
+        assert_equal(result.message,
+                        'Maximum number of iterations has been exceeded.')
+
+    def test_maxfun_stops_solve(self):
+        # test that if the maximum number of function evaluations is exceeded
+        # during initialisation the solver stops
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, maxfun=1,
+                                             polish=False)
+        result = solver.solve()
+
+        assert_equal(result.nfev, 2)
+        assert_equal(result.success, False)
+        assert_equal(result.message,
+                     'Maximum number of function evaluations has '
+                     'been exceeded.')
+
+        # test that if the maximum number of function evaluations is exceeded
+        # during the actual minimisation, then the solver stops.
+        # Have to turn polishing off, as this will still occur even if maxfun
+        # is reached. For popsize=5 and len(bounds)=2, then there are only 10
+        # function evaluations during initialisation.
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             popsize=5,
+                                             polish=False,
+                                             maxfun=40)
+        result = solver.solve()
+
+        assert_equal(result.nfev, 41)
+        assert_equal(result.success, False)
+        assert_equal(result.message,
+                     'Maximum number of function evaluations has '
+                     'been exceeded.')
+
+        # now repeat for updating='deferred version
+        # 47 function evaluations is not a multiple of the population size,
+        # so maxfun is reached partway through a population evaluation.
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             popsize=5,
+                                             polish=False,
+                                             maxfun=47,
+                                             updating='deferred')
+        result = solver.solve()
+
+        assert_equal(result.nfev, 47)
+        assert_equal(result.success, False)
+        assert_equal(result.message,
+                     'Maximum number of function evaluations has '
+                     'been reached.')
+
+    def test_quadratic(self):
+        # test the quadratic function from object
+        solver = DifferentialEvolutionSolver(self.quadratic,
+                                             [(-100, 100)],
+                                             tol=0.02)
+        solver.solve()
+        assert_equal(np.argmin(solver.population_energies), 0)
+
+    def test_quadratic_from_diff_ev(self):
+        # test the quadratic function from differential_evolution function
+        differential_evolution(self.quadratic,
+                               [(-100, 100)],
+                               tol=0.02,
+                               seed=1)
+
+    def test_rng_gives_repeatability(self):
+        result = differential_evolution(self.quadratic,
+                                        [(-100, 100)],
+                                        polish=False,
+                                        rng=1,
+                                        tol=0.5)
+        result2 = differential_evolution(self.quadratic,
+                                        [(-100, 100)],
+                                        polish=False,
+                                        rng=1,
+                                        tol=0.5)
+        assert_equal(result.x, result2.x)
+        assert_equal(result.nfev, result2.nfev)
+
+    def test_random_generator(self):
+        # check that np.random.Generator can be used (numpy >= 1.17)
+        # obtain a np.random.Generator object
+        rng = np.random.default_rng()
+
+        inits = ['random', 'latinhypercube', 'sobol', 'halton']
+        for init in inits:
+            differential_evolution(self.quadratic,
+                                   [(-100, 100)],
+                                   polish=False,
+                                   rng=rng,
+                                   tol=0.5,
+                                   init=init)
+
+    def test_exp_runs(self):
+        # test whether exponential mutation loop runs
+        solver = DifferentialEvolutionSolver(rosen,
+                                             self.bounds,
+                                             strategy='best1exp',
+                                             maxiter=1)
+
+        solver.solve()
+
+    def test_gh_4511_regression(self):
+        # This modification of the differential evolution docstring example
+        # uses a custom popsize that had triggered an off-by-one error.
+        # Because we do not care about solving the optimization problem in
+        # this test, we use maxiter=1 to reduce the testing time.
+        bounds = [(-5, 5), (-5, 5)]
+        # result = differential_evolution(rosen, bounds, popsize=1815,
+        #                                 maxiter=1)
+
+        # the original issue arose because of rounding error in arange, with
+        # linspace being a much better solution. 1815 is quite a large popsize
+        # to use and results in a long test time (~13s). I used the original
+        # issue to figure out the lowest number of samples that would cause
+        # this rounding error to occur, 49.
+        differential_evolution(rosen, bounds, popsize=49, maxiter=1)
+
+    def test_calculate_population_energies(self):
+        # if popsize is 3, then the overall generation has size (6,)
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, popsize=3)
+        solver._calculate_population_energies(solver.population)
+        solver._promote_lowest_energy()
+        assert_equal(np.argmin(solver.population_energies), 0)
+
+        # initial calculation of the energies should require 6 nfev.
+        assert_equal(solver._nfev, 6)
+
+    def test_iteration(self):
+        # test that DifferentialEvolutionSolver is iterable
+        # if popsize is 3, then the overall generation has size (6,)
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, popsize=3,
+                                             maxfun=12)
+        x, fun = next(solver)
+        assert_equal(np.size(x, 0), 2)
+
+        # 6 nfev are required for initial calculation of energies, 6 nfev are
+        # required for the evolution of the 6 population members.
+        assert_equal(solver._nfev, 12)
+
+        # the next generation should halt because it exceeds maxfun
+        assert_raises(StopIteration, next, solver)
+
+        # check a proper minimisation can be done by an iterable solver
+        solver = DifferentialEvolutionSolver(rosen, self.bounds)
+        _, fun_prev = next(solver)
+        for i, soln in enumerate(solver):
+            x_current, fun_current = soln
+            assert fun_prev >= fun_current
+            _, fun_prev = x_current, fun_current
+            # need to have this otherwise the solver would never stop.
+            if i == 50:
+                break
+
+    def test_convergence(self):
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, tol=0.2,
+                                             polish=False)
+        solver.solve()
+        assert_(solver.convergence < 0.2)
+
+    def test_maxiter_none_GH5731(self):
+        # Pre 0.17 the previous default for maxiter and maxfun was None.
+        # the numerical defaults are now 1000 and np.inf. However, some scripts
+        # will still supply None for both of those, this will raise a TypeError
+        # in the solve method.
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, maxiter=None,
+                                             maxfun=None)
+        solver.solve()
+
+    def test_population_initiation(self):
+        # test the different modes of population initiation
+
+        # init must be either 'latinhypercube' or 'random'
+        # raising ValueError is something else is passed in
+        assert_raises(ValueError,
+                      DifferentialEvolutionSolver,
+                      *(rosen, self.bounds),
+                      **{'init': 'rubbish'})
+
+        solver = DifferentialEvolutionSolver(rosen, self.bounds)
+
+        # check that population initiation:
+        # 1) resets _nfev to 0
+        # 2) all population energies are np.inf
+        solver.init_population_random()
+        assert_equal(solver._nfev, 0)
+        assert_(np.all(np.isinf(solver.population_energies)))
+
+        solver.init_population_lhs()
+        assert_equal(solver._nfev, 0)
+        assert_(np.all(np.isinf(solver.population_energies)))
+
+        solver.init_population_qmc(qmc_engine='halton')
+        assert_equal(solver._nfev, 0)
+        assert_(np.all(np.isinf(solver.population_energies)))
+
+        solver = DifferentialEvolutionSolver(rosen, self.bounds, init='sobol')
+        solver.init_population_qmc(qmc_engine='sobol')
+        assert_equal(solver._nfev, 0)
+        assert_(np.all(np.isinf(solver.population_energies)))
+
+        # we should be able to initialize with our own array
+        population = np.linspace(-1, 3, 10).reshape(5, 2)
+        solver = DifferentialEvolutionSolver(rosen, self.bounds,
+                                             init=population,
+                                             strategy='best2bin',
+                                             atol=0.01, rng=1, popsize=5)
+
+        assert_equal(solver._nfev, 0)
+        assert_(np.all(np.isinf(solver.population_energies)))
+        assert_(solver.num_population_members == 5)
+        assert_(solver.population_shape == (5, 2))
+
+        # check that the population was initialized correctly
+        unscaled_population = np.clip(solver._unscale_parameters(population),
+                                      0, 1)
+        assert_almost_equal(solver.population[:5], unscaled_population)
+
+        # population values need to be clipped to bounds
+        assert_almost_equal(np.min(solver.population[:5]), 0)
+        assert_almost_equal(np.max(solver.population[:5]), 1)
+
+        # shouldn't be able to initialize with an array if it's the wrong shape
+        # this would have too many parameters
+        population = np.linspace(-1, 3, 15).reshape(5, 3)
+        assert_raises(ValueError,
+                      DifferentialEvolutionSolver,
+                      *(rosen, self.bounds),
+                      **{'init': population})
+
+        # provide an initial solution
+        # bounds are [(0, 2), (0, 2)]
+        x0 = np.random.uniform(low=0.0, high=2.0, size=2)
+        solver = DifferentialEvolutionSolver(
+            rosen, self.bounds, x0=x0
+        )
+        # parameters are scaled to unit interval
+        assert_allclose(solver.population[0], x0 / 2.0)
+
+    def test_x0(self):
+        # smoke test that checks that x0 is usable.
+        res = differential_evolution(rosen, self.bounds, x0=[0.2, 0.8])
+        assert res.success
+
+        # check what happens if some of the x0 lay outside the bounds
+        with assert_raises(ValueError):
+            differential_evolution(rosen, self.bounds, x0=[0.2, 2.1])
+
+    def test_infinite_objective_function(self):
+        # Test that there are no problems if the objective function
+        # returns inf on some runs
+        def sometimes_inf(x):
+            if x[0] < .5:
+                return np.inf
+            return x[1]
+        bounds = [(0, 1), (0, 1)]
+        differential_evolution(sometimes_inf, bounds=bounds, disp=False)
+
+    def test_deferred_updating(self):
+        # check setting of deferred updating, with default workers
+        bounds = [(0., 2.), (0., 2.)]
+        solver = DifferentialEvolutionSolver(rosen, bounds, updating='deferred')
+        assert_(solver._updating == 'deferred')
+        assert_(solver._mapwrapper._mapfunc is map)
+        res = solver.solve()
+        assert res.success
+
+        # check that deferred updating works with an exponential crossover
+        res = differential_evolution(
+            rosen, bounds, updating='deferred', strategy='best1exp'
+        )
+        assert res.success
+
+    @pytest.mark.thread_unsafe
+    def test_immediate_updating(self):
+        # check setting of immediate updating, with default workers
+        bounds = [(0., 2.), (0., 2.)]
+        solver = DifferentialEvolutionSolver(rosen, bounds)
+        assert_(solver._updating == 'immediate')
+
+        # Safely forking from a multithreaded process is
+        # problematic, and deprecated in Python 3.12, so
+        # we use a slower but portable alternative
+        # see gh-19848
+        ctx = multiprocessing.get_context("spawn")
+        with ctx.Pool(2) as p:
+            # should raise a UserWarning because the updating='immediate'
+            # is being overridden by the workers keyword
+            with warns(UserWarning):
+                with DifferentialEvolutionSolver(rosen, bounds, workers=p.map) as s:
+                    solver.solve()
+            assert s._updating == 'deferred'
+
+    @pytest.mark.fail_slow(10)
+    def test_parallel(self):
+        # smoke test for parallelization with deferred updating
+        bounds = [(0., 2.), (0., 2.)]
+        # use threads instead of Process to speed things up for this simple example
+        with ThreadPool(2) as p, DifferentialEvolutionSolver(
+            rosen, bounds, updating='deferred', workers=p.map, tol=0.1, popsize=3
+        ) as solver:
+            assert solver._mapwrapper.pool is not None
+            assert solver._updating == 'deferred'
+            solver.solve()
+
+        with DifferentialEvolutionSolver(
+            rosen, bounds, updating='deferred', workers=2, popsize=3, tol=0.1
+        ) as solver:
+            assert solver._mapwrapper.pool is not None
+            assert solver._updating == 'deferred'
+            solver.solve()
+
+    def test_converged(self):
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)])
+        solver.solve()
+        assert_(solver.converged())
+
+    def test_constraint_violation_fn(self):
+        def constr_f(x):
+            return [x[0] + x[1]]
+
+        def constr_f2(x):
+            return np.array([x[0]**2 + x[1], x[0] - x[1]])
+
+        nlc = NonlinearConstraint(constr_f, -np.inf, 1.9)
+
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc,))
+
+        cv = solver._constraint_violation_fn(np.array([1.0, 1.0]))
+        assert_almost_equal(cv, 0.1)
+
+        nlc2 = NonlinearConstraint(constr_f2, -np.inf, 1.8)
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc, nlc2))
+
+        # for multiple constraints the constraint violations should
+        # be concatenated.
+        xs = [(1.2, 1), (2.0, 2.0), (0.5, 0.5)]
+        vs = [(0.3, 0.64, 0.0), (2.1, 4.2, 0.0), (0, 0, 0)]
+
+        for x, v in zip(xs, vs):
+            cv = solver._constraint_violation_fn(np.array(x))
+            assert_allclose(cv, np.atleast_2d(v))
+
+        # vectorized calculation of a series of solutions
+        assert_allclose(
+            solver._constraint_violation_fn(np.array(xs)), np.array(vs)
+        )
+
+        # the following line is used in _calculate_population_feasibilities.
+        # _constraint_violation_fn returns an (1, M) array when
+        # x.shape == (N,), i.e. a single solution. Therefore this list
+        # comprehension should generate (S, 1, M) array.
+        constraint_violation = np.array([solver._constraint_violation_fn(x)
+                                         for x in np.array(xs)])
+        assert constraint_violation.shape == (3, 1, 3)
+
+        # we need reasonable error messages if the constraint function doesn't
+        # return the right thing
+        def constr_f3(x):
+            # returns (S, M), rather than (M, S)
+            return constr_f2(x).T
+
+        nlc2 = NonlinearConstraint(constr_f3, -np.inf, 1.8)
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc, nlc2),
+                                             vectorized=False)
+        solver.vectorized = True
+        with pytest.raises(
+                RuntimeError, match="An array returned from a Constraint"
+        ):
+            solver._constraint_violation_fn(np.array(xs))
+
+    def test_constraint_population_feasibilities(self):
+        def constr_f(x):
+            return [x[0] + x[1]]
+
+        def constr_f2(x):
+            return [x[0]**2 + x[1], x[0] - x[1]]
+
+        nlc = NonlinearConstraint(constr_f, -np.inf, 1.9)
+
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc,))
+
+        # are population feasibilities correct
+        # [0.5, 0.5] corresponds to scaled values of [1., 1.]
+        feas, cv = solver._calculate_population_feasibilities(
+            np.array([[0.5, 0.5], [1., 1.]]))
+        assert_equal(feas, [False, False])
+        assert_almost_equal(cv, np.array([[0.1], [2.1]]))
+        assert cv.shape == (2, 1)
+
+        nlc2 = NonlinearConstraint(constr_f2, -np.inf, 1.8)
+
+        for vectorize in [False, True]:
+            solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                                 constraints=(nlc, nlc2),
+                                                 vectorized=vectorize,
+                                                 updating='deferred')
+
+            feas, cv = solver._calculate_population_feasibilities(
+                np.array([[0.5, 0.5], [0.6, 0.5]]))
+            assert_equal(feas, [False, False])
+            assert_almost_equal(cv, np.array([[0.1, 0.2, 0], [0.3, 0.64, 0]]))
+
+            feas, cv = solver._calculate_population_feasibilities(
+                np.array([[0.5, 0.5], [1., 1.]]))
+            assert_equal(feas, [False, False])
+            assert_almost_equal(cv, np.array([[0.1, 0.2, 0], [2.1, 4.2, 0]]))
+            assert cv.shape == (2, 3)
+
+            feas, cv = solver._calculate_population_feasibilities(
+                np.array([[0.25, 0.25], [1., 1.]]))
+            assert_equal(feas, [True, False])
+            assert_almost_equal(cv, np.array([[0.0, 0.0, 0.], [2.1, 4.2, 0]]))
+            assert cv.shape == (2, 3)
+
+    @pytest.mark.thread_unsafe
+    def test_constraint_solve(self):
+        def constr_f(x):
+            return np.array([x[0] + x[1]])
+
+        nlc = NonlinearConstraint(constr_f, -np.inf, 1.9)
+
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc,))
+
+        # trust-constr warns if the constraint function is linear
+        with warns(UserWarning):
+            res = solver.solve()
+
+        assert constr_f(res.x) <= 1.9
+        assert res.success
+
+    @pytest.mark.fail_slow(10)
+    @pytest.mark.thread_unsafe
+    def test_impossible_constraint(self):
+        def constr_f(x):
+            return np.array([x[0] + x[1]])
+
+        nlc = NonlinearConstraint(constr_f, -np.inf, -1)
+
+        solver = DifferentialEvolutionSolver(
+            rosen, [(0, 2), (0, 2)], constraints=(nlc,), popsize=1, rng=1, maxiter=100
+        )
+
+        # a UserWarning is issued because the 'trust-constr' polishing is
+        # attempted on the least infeasible solution found.
+        with warns(UserWarning):
+            res = solver.solve()
+
+        assert res.maxcv > 0
+        assert not res.success
+
+        # test _promote_lowest_energy works when none of the population is
+        # feasible. In this case, the solution with the lowest constraint
+        # violation should be promoted.
+        solver = DifferentialEvolutionSolver(
+            rosen, [(0, 2), (0, 2)], constraints=(nlc,), polish=False)
+        next(solver)
+        assert not solver.feasible.all()
+        assert not np.isfinite(solver.population_energies).all()
+
+        # now swap two of the entries in the population
+        l = 20
+        cv = solver.constraint_violation[0]
+
+        solver.population_energies[[0, l]] = solver.population_energies[[l, 0]]
+        solver.population[[0, l], :] = solver.population[[l, 0], :]
+        solver.constraint_violation[[0, l], :] = (
+            solver.constraint_violation[[l, 0], :])
+
+        solver._promote_lowest_energy()
+        assert_equal(solver.constraint_violation[0], cv)
+
+    def test_accept_trial(self):
+        # _accept_trial(self, energy_trial, feasible_trial, cv_trial,
+        #               energy_orig, feasible_orig, cv_orig)
+        def constr_f(x):
+            return [x[0] + x[1]]
+        nlc = NonlinearConstraint(constr_f, -np.inf, 1.9)
+        solver = DifferentialEvolutionSolver(rosen, [(0, 2), (0, 2)],
+                                             constraints=(nlc,))
+        fn = solver._accept_trial
+        # both solutions are feasible, select lower energy
+        assert fn(0.1, True, np.array([0.]), 1.0, True, np.array([0.]))
+        assert (fn(1.0, True, np.array([0.0]), 0.1, True, np.array([0.0])) is False)
+        assert fn(0.1, True, np.array([0.]), 0.1, True, np.array([0.]))
+
+        # trial is feasible, original is not
+        assert fn(9.9, True, np.array([0.]), 1.0, False, np.array([1.]))
+
+        # trial and original are infeasible
+        # cv_trial have to be <= cv_original to be better
+        assert (fn(0.1, False, np.array([0.5, 0.5]),
+                   1.0, False, np.array([1., 1.0])))
+        assert (fn(0.1, False, np.array([0.5, 0.5]),
+                   1.0, False, np.array([1., 0.50])))
+        assert not (fn(1.0, False, np.array([0.5, 0.5]),
+                       1.0, False, np.array([1.0, 0.4])))
+
+    def test_constraint_wrapper(self):
+        lb = np.array([0, 20, 30])
+        ub = np.array([0.5, np.inf, 70])
+        x0 = np.array([1, 2, 3])
+        pc = _ConstraintWrapper(Bounds(lb, ub), x0)
+        assert (pc.violation(x0) > 0).any()
+        assert (pc.violation([0.25, 21, 31]) == 0).all()
+
+        # check vectorized Bounds constraint
+        xs = np.arange(1, 16).reshape(5, 3)
+        violations = []
+        for x in xs:
+            violations.append(pc.violation(x))
+        np.testing.assert_allclose(pc.violation(xs.T), np.array(violations).T)
+
+        x0 = np.array([1, 2, 3, 4])
+        A = np.array([[1, 2, 3, 4], [5, 0, 0, 6], [7, 0, 8, 0]])
+        pc = _ConstraintWrapper(LinearConstraint(A, -np.inf, 0), x0)
+        assert (pc.violation(x0) > 0).any()
+        assert (pc.violation([-10, 2, -10, 4]) == 0).all()
+
+        # check vectorized LinearConstraint, for 7 lots of parameter vectors
+        # with each parameter vector being 4 long, with 3 constraints
+        # xs is the same shape as stored in the differential evolution
+        # population, but it's sent to the violation function as (len(x), M)
+        xs = np.arange(1, 29).reshape(7, 4)
+        violations = []
+        for x in xs:
+            violations.append(pc.violation(x))
+        np.testing.assert_allclose(pc.violation(xs.T), np.array(violations).T)
+
+        pc = _ConstraintWrapper(LinearConstraint(csr_matrix(A), -np.inf, 0),
+                                x0)
+        assert (pc.violation(x0) > 0).any()
+        assert (pc.violation([-10, 2, -10, 4]) == 0).all()
+
+        def fun(x):
+            return A.dot(x)
+
+        nonlinear = NonlinearConstraint(fun, -np.inf, 0)
+        pc = _ConstraintWrapper(nonlinear, [-10, 2, -10, 4])
+        assert (pc.violation(x0) > 0).any()
+        assert (pc.violation([-10, 2, -10, 4]) == 0).all()
+
+    def test_constraint_wrapper_violation(self):
+        def cons_f(x):
+            # written in vectorised form to accept an array of (N, S)
+            # returning (M, S)
+            # where N is the number of parameters,
+            # S is the number of solution vectors to be examined,
+            # and M is the number of constraint components
+            return np.array([x[0] ** 2 + x[1],
+                             x[0] ** 2 - x[1]])
+
+        nlc = NonlinearConstraint(cons_f, [-1, -0.8500], [2, 2])
+        pc = _ConstraintWrapper(nlc, [0.5, 1])
+        assert np.size(pc.bounds[0]) == 2
+
+        xs = [(0.5, 1), (0.5, 1.2), (1.2, 1.2), (0.1, -1.2), (0.1, 2.0)]
+        vs = [(0, 0), (0, 0.1), (0.64, 0), (0.19, 0), (0.01, 1.14)]
+
+        for x, v in zip(xs, vs):
+            assert_allclose(pc.violation(x), v)
+
+        # now check that we can vectorize the constraint wrapper
+        assert_allclose(pc.violation(np.array(xs).T),
+                        np.array(vs).T)
+        assert pc.fun(np.array(xs).T).shape == (2, len(xs))
+        assert pc.violation(np.array(xs).T).shape == (2, len(xs))
+        assert pc.num_constr == 2
+        assert pc.parameter_count == 2
+
+    def test_matrix_linear_constraint(self):
+        # gh20041 supplying an np.matrix to construct a LinearConstraint caused
+        # _ConstraintWrapper to start returning constraint violations of the
+        # wrong shape.
+        with suppress_warnings() as sup:
+            sup.filter(PendingDeprecationWarning)
+            matrix = np.matrix([[1, 1, 1, 1.],
+                                [2, 2, 2, 2.]])
+        lc = LinearConstraint(matrix, 0, 1)
+        x0 = np.ones(4)
+        cw = _ConstraintWrapper(lc, x0)
+        # the shape of the constraint violation should be the same as the number
+        # of constraints applied.
+        assert cw.violation(x0).shape == (2,)
+
+        # let's try a vectorised violation call.
+        xtrial = np.arange(4 * 5).reshape(4, 5)
+        assert cw.violation(xtrial).shape == (2, 5)
+
+    @pytest.mark.fail_slow(20)
+    def test_L1(self):
+        # Lampinen ([5]) test problem 1
+
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = np.sum(5*x[1:5]) - 5*x[1:5]@x[1:5] - np.sum(x[5:])
+            return fun
+
+        A = np.zeros((10, 14))  # 1-indexed to match reference
+        A[1, [1, 2, 10, 11]] = 2, 2, 1, 1
+        A[2, [1, 10]] = -8, 1
+        A[3, [4, 5, 10]] = -2, -1, 1
+        A[4, [1, 3, 10, 11]] = 2, 2, 1, 1
+        A[5, [2, 11]] = -8, 1
+        A[6, [6, 7, 11]] = -2, -1, 1
+        A[7, [2, 3, 11, 12]] = 2, 2, 1, 1
+        A[8, [3, 12]] = -8, 1
+        A[9, [8, 9, 12]] = -2, -1, 1
+        A = A[1:, 1:]
+
+        b = np.array([10, 0, 0, 10, 0, 0, 10, 0, 0])
+
+        L = LinearConstraint(A, -np.inf, b)
+
+        bounds = [(0, 1)]*9 + [(0, 100)]*3 + [(0, 1)]
+
+        # using a lower popsize to speed the test up
+        res = differential_evolution(
+            f, bounds, strategy='best1bin', rng=12345, constraints=(L,),
+            popsize=5, tol=0.01
+        )
+
+        x_opt = (1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1)
+        f_opt = -15
+
+        assert_allclose(f(x_opt), f_opt, atol=6e-4)
+        assert res.success
+        assert_allclose(res.x, x_opt, atol=6e-4)
+        assert_allclose(res.fun, f_opt, atol=5e-3)
+        assert_(np.all(A@res.x <= b))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+        # now repeat the same solve, using the same overall constraints,
+        # but using a sparse matrix for the LinearConstraint instead of an
+        # array
+
+        L = LinearConstraint(csr_matrix(A), -np.inf, b)
+
+        # using a lower popsize to speed the test up
+        res = differential_evolution(
+            f, bounds, strategy='best1bin', rng=1211134, constraints=(L,),
+            popsize=2, tol=0.05
+        )
+
+        assert_allclose(f(x_opt), f_opt)
+        assert res.success
+        assert_allclose(res.x, x_opt, atol=5e-4)
+        assert_allclose(res.fun, f_opt, atol=5e-3)
+        assert_(np.all(A@res.x <= b))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+        # now repeat the same solve, using the same overall constraints,
+        # but specify half the constraints in terms of LinearConstraint,
+        # and the other half by NonlinearConstraint
+        def c1(x):
+            x = np.hstack(([0], x))
+            return [2*x[2] + 2*x[3] + x[11] + x[12],
+                    -8*x[3] + x[12]]
+
+        def c2(x):
+            x = np.hstack(([0], x))
+            return -2*x[8] - x[9] + x[12]
+
+        L = LinearConstraint(A[:5, :], -np.inf, b[:5])
+        L2 = LinearConstraint(A[5:6, :], -np.inf, b[5:6])
+        N = NonlinearConstraint(c1, -np.inf, b[6:8])
+        N2 = NonlinearConstraint(c2, -np.inf, b[8:9])
+        constraints = (L, N, L2, N2)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            res = differential_evolution(
+                f, bounds, strategy='best1bin', rng=1211134,
+                constraints=constraints, popsize=2, tol=0.05
+            )
+
+        assert_allclose(res.x, x_opt, atol=6e-4)
+        assert_allclose(res.fun, f_opt, atol=5e-3)
+        assert_(np.all(A@res.x <= b))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_L2(self):
+        # Lampinen ([5]) test problem 2
+
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = ((x[1]-10)**2 + 5*(x[2]-12)**2 + x[3]**4 + 3*(x[4]-11)**2 +
+                   10*x[5]**6 + 7*x[6]**2 + x[7]**4 - 4*x[6]*x[7] - 10*x[6] -
+                   8*x[7])
+            return fun
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [127 - 2*x[1]**2 - 3*x[2]**4 - x[3] - 4*x[4]**2 - 5*x[5],
+                    196 - 23*x[1] - x[2]**2 - 6*x[6]**2 + 8*x[7],
+                    282 - 7*x[1] - 3*x[2] - 10*x[3]**2 - x[4] + x[5],
+                    -4*x[1]**2 - x[2]**2 + 3*x[1]*x[2] - 2*x[3]**2 -
+                    5*x[6] + 11*x[7]]
+
+        N = NonlinearConstraint(c1, 0, np.inf)
+        bounds = [(-10, 10)]*7
+        constraints = (N)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            res = differential_evolution(f, bounds, strategy='best1bin',
+                                         rng=1234, constraints=constraints)
+
+        f_opt = 680.6300599487869
+        x_opt = (2.330499, 1.951372, -0.4775414, 4.365726,
+                 -0.6244870, 1.038131, 1.594227)
+
+        assert_allclose(f(x_opt), f_opt)
+        assert_allclose(res.fun, f_opt)
+        assert_allclose(res.x, x_opt, atol=1e-5)
+        assert res.success
+        assert_(np.all(np.array(c1(res.x)) >= 0))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_L3(self):
+        # Lampinen ([5]) test problem 3
+
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = (x[1]**2 + x[2]**2 + x[1]*x[2] - 14*x[1] - 16*x[2] +
+                   (x[3]-10)**2 + 4*(x[4]-5)**2 + (x[5]-3)**2 + 2*(x[6]-1)**2 +
+                   5*x[7]**2 + 7*(x[8]-11)**2 + 2*(x[9]-10)**2 +
+                   (x[10] - 7)**2 + 45
+                   )
+            return fun  # maximize
+
+        A = np.zeros((4, 11))
+        A[1, [1, 2, 7, 8]] = -4, -5, 3, -9
+        A[2, [1, 2, 7, 8]] = -10, 8, 17, -2
+        A[3, [1, 2, 9, 10]] = 8, -2, -5, 2
+        A = A[1:, 1:]
+        b = np.array([-105, 0, -12])
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [3*x[1] - 6*x[2] - 12*(x[9]-8)**2 + 7*x[10],
+                    -3*(x[1]-2)**2 - 4*(x[2]-3)**2 - 2*x[3]**2 + 7*x[4] + 120,
+                    -x[1]**2 - 2*(x[2]-2)**2 + 2*x[1]*x[2] - 14*x[5] + 6*x[6],
+                    -5*x[1]**2 - 8*x[2] - (x[3]-6)**2 + 2*x[4] + 40,
+                    -0.5*(x[1]-8)**2 - 2*(x[2]-4)**2 - 3*x[5]**2 + x[6] + 30]
+
+        L = LinearConstraint(A, b, np.inf)
+        N = NonlinearConstraint(c1, 0, np.inf)
+        bounds = [(-10, 10)]*10
+        constraints = (L, N)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            res = differential_evolution(f, bounds, rng=1234,
+                                         constraints=constraints, popsize=3)
+
+        x_opt = (2.171996, 2.363683, 8.773926, 5.095984, 0.9906548,
+                 1.430574, 1.321644, 9.828726, 8.280092, 8.375927)
+        f_opt = 24.3062091
+
+        assert_allclose(f(x_opt), f_opt, atol=1e-5)
+        assert_allclose(res.x, x_opt, atol=1e-6)
+        assert_allclose(res.fun, f_opt, atol=1e-5)
+        assert res.success
+        assert_(np.all(A @ res.x >= b))
+        assert_(np.all(np.array(c1(res.x)) >= 0))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_L4(self):
+        # Lampinen ([5]) test problem 4
+        def f(x):
+            return np.sum(x[:3])
+
+        A = np.zeros((4, 9))
+        A[1, [4, 6]] = 0.0025, 0.0025
+        A[2, [5, 7, 4]] = 0.0025, 0.0025, -0.0025
+        A[3, [8, 5]] = 0.01, -0.01
+        A = A[1:, 1:]
+        b = np.array([1, 1, 1])
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [x[1]*x[6] - 833.33252*x[4] - 100*x[1] + 83333.333,
+                    x[2]*x[7] - 1250*x[5] - x[2]*x[4] + 1250*x[4],
+                    x[3]*x[8] - 1250000 - x[3]*x[5] + 2500*x[5]]
+
+        L = LinearConstraint(A, -np.inf, 1)
+        N = NonlinearConstraint(c1, 0, np.inf)
+
+        bounds = [(100, 10000)] + [(1000, 10000)]*2 + [(10, 1000)]*5
+        constraints = (L, N)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            res = differential_evolution(
+                f, bounds, strategy='best1bin', rng=1234,
+                constraints=constraints, popsize=3, tol=0.05
+            )
+
+        f_opt = 7049.248
+
+        x_opt = [579.306692, 1359.97063, 5109.9707, 182.0177, 295.601172,
+                217.9823, 286.416528, 395.601172]
+
+        assert_allclose(f(x_opt), f_opt, atol=0.001)
+        assert_allclose(res.fun, f_opt, atol=0.001)
+
+        # use higher tol here for 32-bit Windows, see gh-11693
+        if (platform.system() == 'Windows' and np.dtype(np.intp).itemsize < 8):
+            assert_allclose(res.x, x_opt, rtol=2.4e-6, atol=0.0035)
+        else:
+            # tolerance determined from macOS + MKL failure, see gh-12701
+            assert_allclose(res.x, x_opt, rtol=5e-6, atol=0.0024)
+
+        assert res.success
+        assert_(np.all(A @ res.x <= b))
+        assert_(np.all(np.array(c1(res.x)) >= 0))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_L5(self):
+        # Lampinen ([5]) test problem 5
+
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = (np.sin(2*np.pi*x[1])**3*np.sin(2*np.pi*x[2]) /
+                   (x[1]**3*(x[1]+x[2])))
+            return -fun  # maximize
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [x[1]**2 - x[2] + 1,
+                    1 - x[1] + (x[2]-4)**2]
+
+        N = NonlinearConstraint(c1, -np.inf, 0)
+        bounds = [(0, 10)]*2
+        constraints = (N)
+
+        res = differential_evolution(f, bounds, strategy='rand1bin', rng=1234,
+                                     constraints=constraints)
+
+        x_opt = (1.22797135, 4.24537337)
+        f_opt = -0.095825
+        assert_allclose(f(x_opt), f_opt, atol=2e-5)
+        assert_allclose(res.fun, f_opt, atol=1e-4)
+        assert res.success
+        assert_(np.all(np.array(c1(res.x)) <= 0))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_L6(self):
+        # Lampinen ([5]) test problem 6
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = (x[1]-10)**3 + (x[2] - 20)**3
+            return fun
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [(x[1]-5)**2 + (x[2] - 5)**2 - 100,
+                    -(x[1]-6)**2 - (x[2] - 5)**2 + 82.81]
+
+        N = NonlinearConstraint(c1, 0, np.inf)
+        bounds = [(13, 100), (0, 100)]
+        constraints = (N)
+        res = differential_evolution(f, bounds, strategy='rand1bin', rng=1234,
+                                     constraints=constraints, tol=1e-7)
+        x_opt = (14.095, 0.84296)
+        f_opt = -6961.814744
+
+        assert_allclose(f(x_opt), f_opt, atol=1e-6)
+        assert_allclose(res.fun, f_opt, atol=0.001)
+        assert_allclose(res.x, x_opt, atol=1e-4)
+        assert res.success
+        assert_(np.all(np.array(c1(res.x)) >= 0))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    def test_L7(self):
+        # Lampinen ([5]) test problem 7
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = (5.3578547*x[3]**2 + 0.8356891*x[1]*x[5] +
+                   37.293239*x[1] - 40792.141)
+            return fun
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [
+                    85.334407 + 0.0056858*x[2]*x[5] + 0.0006262*x[1]*x[4] -
+                    0.0022053*x[3]*x[5],
+
+                    80.51249 + 0.0071317*x[2]*x[5] + 0.0029955*x[1]*x[2] +
+                    0.0021813*x[3]**2,
+
+                    9.300961 + 0.0047026*x[3]*x[5] + 0.0012547*x[1]*x[3] +
+                    0.0019085*x[3]*x[4]
+                    ]
+
+        N = NonlinearConstraint(c1, [0, 90, 20], [92, 110, 25])
+
+        bounds = [(78, 102), (33, 45)] + [(27, 45)]*3
+        constraints = (N)
+
+        res = differential_evolution(f, bounds, strategy='rand1bin', rng=1234,
+                                     constraints=constraints)
+
+        # using our best solution, rather than Lampinen/Koziel. Koziel solution
+        # doesn't satisfy constraints, Lampinen f_opt just plain wrong.
+        x_opt = [78.00000686, 33.00000362, 29.99526064, 44.99999971,
+                 36.77579979]
+
+        f_opt = -30665.537578
+
+        assert_allclose(f(x_opt), f_opt)
+        assert_allclose(res.x, x_opt, atol=1e-3)
+        assert_allclose(res.fun, f_opt, atol=1e-3)
+
+        assert res.success
+        assert_(np.all(np.array(c1(res.x)) >= np.array([0, 90, 20])))
+        assert_(np.all(np.array(c1(res.x)) <= np.array([92, 110, 25])))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.xslow
+    @pytest.mark.xfail(platform.machine() == 'ppc64le',
+                       reason="fails on ppc64le")
+    def test_L8(self):
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            fun = 3*x[1] + 0.000001*x[1]**3 + 2*x[2] + 0.000002/3*x[2]**3
+            return fun
+
+        A = np.zeros((3, 5))
+        A[1, [4, 3]] = 1, -1
+        A[2, [3, 4]] = 1, -1
+        A = A[1:, 1:]
+        b = np.array([-.55, -.55])
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [
+                    1000*np.sin(-x[3]-0.25) + 1000*np.sin(-x[4]-0.25) +
+                    894.8 - x[1],
+                    1000*np.sin(x[3]-0.25) + 1000*np.sin(x[3]-x[4]-0.25) +
+                    894.8 - x[2],
+                    1000*np.sin(x[4]-0.25) + 1000*np.sin(x[4]-x[3]-0.25) +
+                    1294.8
+                    ]
+        L = LinearConstraint(A, b, np.inf)
+        N = NonlinearConstraint(c1, np.full(3, -0.001), np.full(3, 0.001))
+
+        bounds = [(0, 1200)]*2+[(-.55, .55)]*2
+        constraints = (L, N)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            # original Lampinen test was with rand1bin, but that takes a
+            # huge amount of CPU time. Changing strategy to best1bin speeds
+            # things up a lot
+            res = differential_evolution(f, bounds, strategy='best1bin',
+                                         rng=1234, constraints=constraints,
+                                         maxiter=5000)
+
+        x_opt = (679.9453, 1026.067, 0.1188764, -0.3962336)
+        f_opt = 5126.4981
+
+        assert_allclose(f(x_opt), f_opt, atol=1e-3)
+        assert_allclose(res.x[:2], x_opt[:2], atol=2e-3)
+        assert_allclose(res.x[2:], x_opt[2:], atol=2e-3)
+        assert_allclose(res.fun, f_opt, atol=2e-2)
+        assert res.success
+        assert_(np.all(A@res.x >= b))
+        assert_(np.all(np.array(c1(res.x)) >= -0.001))
+        assert_(np.all(np.array(c1(res.x)) <= 0.001))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(5)
+    def test_L9(self):
+        # Lampinen ([5]) test problem 9
+
+        def f(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return x[1]**2 + (x[2]-1)**2
+
+        def c1(x):
+            x = np.hstack(([0], x))  # 1-indexed to match reference
+            return [x[2] - x[1]**2]
+
+        N = NonlinearConstraint(c1, [-.001], [0.001])
+
+        bounds = [(-1, 1)]*2
+        constraints = (N)
+        res = differential_evolution(f, bounds, strategy='rand1bin', rng=1234,
+                                     constraints=constraints)
+
+        x_opt = [np.sqrt(2)/2, 0.5]
+        f_opt = 0.75
+
+        assert_allclose(f(x_opt), f_opt)
+        assert_allclose(np.abs(res.x), x_opt, atol=1e-3)
+        assert_allclose(res.fun, f_opt, atol=1e-3)
+        assert res.success
+        assert_(np.all(np.array(c1(res.x)) >= -0.001))
+        assert_(np.all(np.array(c1(res.x)) <= 0.001))
+        assert_(np.all(res.x >= np.array(bounds)[:, 0]))
+        assert_(np.all(res.x <= np.array(bounds)[:, 1]))
+
+    @pytest.mark.fail_slow(10)
+    def test_integrality(self):
+        # test fitting discrete distribution to data
+        rng = np.random.default_rng(6519843218105)
+        dist = stats.nbinom
+        shapes = (5, 0.5)
+        x = dist.rvs(*shapes, size=10000, random_state=rng)
+
+        def func(p, *args):
+            dist, x = args
+            # negative log-likelihood function
+            ll = -np.log(dist.pmf(x, *p)).sum(axis=-1)
+            if np.isnan(ll):  # occurs when x is outside of support
+                ll = np.inf  # we don't want that
+            return ll
+
+        integrality = [True, False]
+        bounds = [(1, 18), (0, 0.95)]
+
+        res = differential_evolution(func, bounds, args=(dist, x),
+                                     integrality=integrality, polish=False,
+                                     rng=rng)
+        # tolerance has to be fairly relaxed for the second parameter
+        # because we're fitting a distribution to random variates.
+        assert res.x[0] == 5
+        assert_allclose(res.x, shapes, rtol=0.025)
+
+        # check that we can still use integrality constraints with polishing
+        res2 = differential_evolution(func, bounds, args=(dist, x),
+                                      integrality=integrality, polish=True,
+                                      rng=rng)
+
+        def func2(p, *args):
+            n, dist, x = args
+            return func(np.array([n, p[0]]), dist, x)
+
+        # compare the DE derived solution to an LBFGSB solution (that doesn't
+        # have to find the integral values). Note we're setting x0 to be the
+        # output from the first DE result, thereby making the polishing step
+        # and this minimisation pretty much equivalent.
+        LBFGSB = minimize(func2, res2.x[1], args=(5, dist, x),
+                          bounds=[(0, 0.95)])
+        assert_allclose(res2.x[1], LBFGSB.x)
+        assert res2.fun <= res.fun
+
+    def test_integrality_limits(self):
+        def f(x):
+            return x
+
+        integrality = [True, False, True]
+        bounds = [(0.2, 1.1), (0.9, 2.2), (3.3, 4.9)]
+
+        # no integrality constraints
+        solver = DifferentialEvolutionSolver(f, bounds=bounds, polish=False,
+                                             integrality=False)
+        assert_allclose(solver.limits[0], [0.2, 0.9, 3.3])
+        assert_allclose(solver.limits[1], [1.1, 2.2, 4.9])
+
+        # with integrality constraints
+        solver = DifferentialEvolutionSolver(f, bounds=bounds, polish=False,
+                                             integrality=integrality)
+        assert_allclose(solver.limits[0], [0.5, 0.9, 3.5])
+        assert_allclose(solver.limits[1], [1.5, 2.2, 4.5])
+        assert_equal(solver.integrality, [True, False, True])
+        assert solver.polish is False
+
+        bounds = [(-1.2, -0.9), (0.9, 2.2), (-10.3, 4.1)]
+        solver = DifferentialEvolutionSolver(f, bounds=bounds, polish=False,
+                                             integrality=integrality)
+        assert_allclose(solver.limits[0], [-1.5, 0.9, -10.5])
+        assert_allclose(solver.limits[1], [-0.5, 2.2, 4.5])
+
+        # A lower bound of -1.2 is converted to
+        # np.nextafter(np.ceil(-1.2) - 0.5, np.inf)
+        # with a similar process to the upper bound. Check that the
+        # conversions work
+        assert_allclose(np.round(solver.limits[0]), [-1.0, 1.0, -10.0])
+        assert_allclose(np.round(solver.limits[1]), [-1.0, 2.0, 4.0])
+
+        bounds = [(-10.2, -8.1), (0.9, 2.2), (-10.9, -9.9999)]
+        solver = DifferentialEvolutionSolver(f, bounds=bounds, polish=False,
+                                             integrality=integrality)
+        assert_allclose(solver.limits[0], [-10.5, 0.9, -10.5])
+        assert_allclose(solver.limits[1], [-8.5, 2.2, -9.5])
+
+        bounds = [(-10.2, -10.1), (0.9, 2.2), (-10.9, -9.9999)]
+        with pytest.raises(ValueError, match='One of the integrality'):
+            DifferentialEvolutionSolver(f, bounds=bounds, polish=False,
+                                        integrality=integrality)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.fail_slow(10)
+    def test_vectorized(self):
+        def quadratic(x):
+            return np.sum(x**2)
+
+        def quadratic_vec(x):
+            return np.sum(x**2, axis=0)
+
+        # A vectorized function needs to accept (len(x), S) and return (S,)
+        with pytest.raises(RuntimeError, match='The vectorized function'):
+            differential_evolution(quadratic, self.bounds,
+                                   vectorized=True, updating='deferred')
+
+        # vectorized overrides the updating keyword, check for warning
+        with warns(UserWarning, match="differential_evolution: the 'vector"):
+            differential_evolution(quadratic_vec, self.bounds,
+                                   vectorized=True)
+
+        # vectorized defers to the workers keyword, check for warning
+        with warns(UserWarning, match="differential_evolution: the 'workers"):
+            differential_evolution(quadratic_vec, self.bounds,
+                                   vectorized=True, workers=map,
+                                   updating='deferred')
+
+        ncalls = [0]
+
+        def rosen_vec(x):
+            ncalls[0] += 1
+            return rosen(x)
+
+        bounds = [(0, 10), (0, 10)]
+        res1 = differential_evolution(rosen, bounds, updating='deferred',
+                                      rng=1)
+        res2 = differential_evolution(rosen_vec, bounds, vectorized=True,
+                                      updating='deferred', rng=1)
+
+        # the two minimisation runs should be functionally equivalent
+        assert_allclose(res1.x, res2.x)
+        assert ncalls[0] == res2.nfev
+        assert res1.nit == res2.nit
+
+    def test_vectorized_constraints(self):
+        def constr_f(x):
+            return np.array([x[0] + x[1]])
+
+        def constr_f2(x):
+            return np.array([x[0]**2 + x[1], x[0] - x[1]])
+
+        nlc1 = NonlinearConstraint(constr_f, -np.inf, 1.9)
+        nlc2 = NonlinearConstraint(constr_f2, (0.9, 0.5), (2.0, 2.0))
+
+        def rosen_vec(x):
+            # accept an (len(x0), S) array, returning a (S,) array
+            v = 100 * (x[1:] - x[:-1]**2.0)**2.0
+            v += (1 - x[:-1])**2.0
+            return np.squeeze(v)
+
+        bounds = [(0, 10), (0, 10)]
+
+        res1 = differential_evolution(rosen, bounds, updating='deferred',
+                                      rng=1, constraints=[nlc1, nlc2],
+                                      polish=False)
+        res2 = differential_evolution(rosen_vec, bounds, vectorized=True,
+                                      updating='deferred', rng=1,
+                                      constraints=[nlc1, nlc2],
+                                      polish=False)
+        # the two minimisation runs should be functionally equivalent
+        assert_allclose(res1.x, res2.x)
+
+    def test_constraint_violation_error_message(self):
+
+        def func(x):
+            return np.cos(x[0]) + np.sin(x[1])
+
+        # Intentionally infeasible constraints.
+        c0 = NonlinearConstraint(lambda x: x[1] - (x[0]-1)**2, 0, np.inf)
+        c1 = NonlinearConstraint(lambda x: x[1] + x[0]**2, -np.inf, 0)
+
+        result = differential_evolution(func,
+                                        bounds=[(-1, 2), (-1, 1)],
+                                        constraints=[c0, c1],
+                                        maxiter=10,
+                                        polish=False,
+                                        rng=864197532)
+        assert result.success is False
+        # The numerical value in the error message might be sensitive to
+        # changes in the implementation.  It can be updated if the code is
+        # changed.  The essential part of the test is that there is a number
+        # after the '=', so if necessary, the text could be reduced to, say,
+        # "MAXCV = 0.".
+        assert "MAXCV = 0." in result.message
+
+    @pytest.mark.fail_slow(20)  # fail-slow exception by request - see gh-20806
+    def test_strategy_fn(self):
+        # examines ability to customize strategy by mimicking one of the
+        # in-built strategies
+        parameter_count = 4
+        popsize = 10
+        bounds = [(0, 10.)] * parameter_count
+        total_popsize = parameter_count * popsize
+        mutation = 0.8
+        recombination = 0.7
+
+        calls = [0]
+        def custom_strategy_fn(candidate, population, rng=None):
+            calls[0] += 1
+            trial = np.copy(population[candidate])
+            fill_point = rng.choice(parameter_count)
+
+            pool = np.arange(total_popsize)
+            rng.shuffle(pool)
+            idxs = pool[:2 + 1]
+            idxs = idxs[idxs != candidate][:2]
+
+            r0, r1 = idxs[:2]
+
+            bprime = (population[0] + mutation *
+                    (population[r0] - population[r1]))
+
+            crossovers = rng.uniform(size=parameter_count)
+            crossovers = crossovers < recombination
+            crossovers[fill_point] = True
+            trial = np.where(crossovers, bprime, trial)
+            return trial
+
+        solver = DifferentialEvolutionSolver(
+            rosen,
+            bounds,
+            popsize=popsize,
+            recombination=recombination,
+            mutation=mutation,
+            maxiter=2,
+            strategy=custom_strategy_fn,
+            rng=10,
+            polish=False
+        )
+        assert solver.strategy is custom_strategy_fn
+        solver.solve()
+        assert calls[0] > 0
+
+        # check custom strategy works with updating='deferred'
+        res = differential_evolution(
+            rosen, bounds, strategy=custom_strategy_fn, updating='deferred'
+        )
+        assert res.success
+
+        def custom_strategy_fn(candidate, population, rng=None):
+            return np.array([1.0, 2.0])
+
+        with pytest.raises(RuntimeError, match="strategy*"):
+            differential_evolution(
+                rosen,
+                bounds,
+                strategy=custom_strategy_fn
+            )
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__dual_annealing.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__dual_annealing.py
new file mode 100644
index 0000000000000000000000000000000000000000..3465be508491aae411e113167b8fdd84f6d2d70b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__dual_annealing.py
@@ -0,0 +1,416 @@
+# Dual annealing unit tests implementation.
+# Copyright (c) 2018 Sylvain Gubian ,
+# Yang Xiang 
+# Author: Sylvain Gubian, PMP S.A.
+"""
+Unit tests for the dual annealing global optimizer
+"""
+from scipy.optimize import dual_annealing, Bounds
+
+from scipy.optimize._dual_annealing import EnergyState
+from scipy.optimize._dual_annealing import LocalSearchWrapper
+from scipy.optimize._dual_annealing import ObjectiveFunWrapper
+from scipy.optimize._dual_annealing import StrategyChain
+from scipy.optimize._dual_annealing import VisitingDistribution
+from scipy.optimize import rosen, rosen_der
+import pytest
+import numpy as np
+from numpy.testing import assert_equal, assert_allclose, assert_array_less
+from pytest import raises as assert_raises
+from scipy._lib._util import check_random_state
+
+import threading
+
+
+class TestDualAnnealing:
+
+    def setup_method(self):
+        # A function that returns always infinity for initialization tests
+        self.weirdfunc = lambda x: np.inf
+        # 2-D bounds for testing function
+        self.ld_bounds = [(-5.12, 5.12)] * 2
+        # 4-D bounds for testing function
+        self.hd_bounds = self.ld_bounds * 4
+        # Number of values to be generated for testing visit function
+        self.nbtestvalues = 5000
+        self.high_temperature = 5230
+        self.low_temperature = 0.1
+        self.qv = 2.62
+        self.seed = 1234
+        self.rng = check_random_state(self.seed)
+        self.nb_fun_call = threading.local()
+        self.ngev = threading.local()
+
+    def callback(self, x, f, context):
+        # For testing callback mechanism. Should stop for e <= 1 as
+        # the callback function returns True
+        if f <= 1.0:
+            return True
+
+    def func(self, x, args=()):
+        # Using Rastrigin function for performing tests
+        if args:
+            shift = args
+        else:
+            shift = 0
+        y = np.sum((x - shift) ** 2 - 10 * np.cos(2 * np.pi * (
+            x - shift))) + 10 * np.size(x) + shift
+        if not hasattr(self.nb_fun_call, 'c'):
+            self.nb_fun_call.c = 0
+        self.nb_fun_call.c += 1
+        return y
+
+    def rosen_der_wrapper(self, x, args=()):
+        if not hasattr(self.ngev, 'c'):
+            self.ngev.c = 0
+        self.ngev.c += 1
+        return rosen_der(x, *args)
+
+    # FIXME: there are some discontinuities in behaviour as a function of `qv`,
+    #        this needs investigating - see gh-12384
+    @pytest.mark.parametrize('qv', [1.1, 1.41, 2, 2.62, 2.9])
+    def test_visiting_stepping(self, qv):
+        lu = list(zip(*self.ld_bounds))
+        lower = np.array(lu[0])
+        upper = np.array(lu[1])
+        dim = lower.size
+        vd = VisitingDistribution(lower, upper, qv, self.rng)
+        values = np.zeros(dim)
+        x_step_low = vd.visiting(values, 0, self.high_temperature)
+        # Make sure that only the first component is changed
+        assert_equal(np.not_equal(x_step_low, 0), True)
+        values = np.zeros(dim)
+        x_step_high = vd.visiting(values, dim, self.high_temperature)
+        # Make sure that component other than at dim has changed
+        assert_equal(np.not_equal(x_step_high[0], 0), True)
+
+    @pytest.mark.parametrize('qv', [2.25, 2.62, 2.9])
+    def test_visiting_dist_high_temperature(self, qv):
+        lu = list(zip(*self.ld_bounds))
+        lower = np.array(lu[0])
+        upper = np.array(lu[1])
+        vd = VisitingDistribution(lower, upper, qv, self.rng)
+        # values = np.zeros(self.nbtestvalues)
+        # for i in np.arange(self.nbtestvalues):
+        #     values[i] = vd.visit_fn(self.high_temperature)
+        values = vd.visit_fn(self.high_temperature, self.nbtestvalues)
+
+        # Visiting distribution is a distorted version of Cauchy-Lorentz
+        # distribution, and as no 1st and higher moments (no mean defined,
+        # no variance defined).
+        # Check that big tails values are generated
+        assert_array_less(np.min(values), 1e-10)
+        assert_array_less(1e+10, np.max(values))
+
+    def test_reset(self):
+        owf = ObjectiveFunWrapper(self.weirdfunc)
+        lu = list(zip(*self.ld_bounds))
+        lower = np.array(lu[0])
+        upper = np.array(lu[1])
+        es = EnergyState(lower, upper)
+        assert_raises(ValueError, es.reset, owf, check_random_state(None))
+
+    def test_low_dim(self):
+        ret = dual_annealing(
+            self.func, self.ld_bounds, rng=self.seed)
+        assert_allclose(ret.fun, 0., atol=1e-12)
+        assert ret.success
+
+    @pytest.mark.fail_slow(10)
+    def test_high_dim(self):
+        ret = dual_annealing(self.func, self.hd_bounds, rng=self.seed)
+        assert_allclose(ret.fun, 0., atol=1e-12)
+        assert ret.success
+
+    def test_low_dim_no_ls(self):
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             no_local_search=True, seed=self.seed)
+        assert_allclose(ret.fun, 0., atol=1e-4)
+
+    @pytest.mark.fail_slow(10)
+    def test_high_dim_no_ls(self):
+        ret = dual_annealing(self.func, self.hd_bounds,
+                             no_local_search=True, rng=self.seed)
+        assert_allclose(ret.fun, 0., atol=1.2e-4)
+
+    def test_nb_fun_call(self):
+        self.nb_fun_call.c = 0
+        ret = dual_annealing(self.func, self.ld_bounds, rng=self.seed)
+        assert_equal(self.nb_fun_call.c, ret.nfev)
+
+    def test_nb_fun_call_no_ls(self):
+        self.nb_fun_call.c = 0
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             no_local_search=True, rng=self.seed)
+        assert_equal(self.nb_fun_call.c, ret.nfev)
+
+    def test_max_reinit(self):
+        assert_raises(ValueError, dual_annealing, self.weirdfunc,
+                      self.ld_bounds)
+
+    @pytest.mark.fail_slow(10)
+    def test_reproduce(self):
+        res1 = dual_annealing(self.func, self.ld_bounds, rng=self.seed)
+        res2 = dual_annealing(self.func, self.ld_bounds, rng=self.seed)
+        res3 = dual_annealing(self.func, self.ld_bounds, rng=self.seed)
+        # If we have reproducible results, x components found has to
+        # be exactly the same, which is not the case with no seeding
+        assert_equal(res1.x, res2.x)
+        assert_equal(res1.x, res3.x)
+
+    def test_rand_gen(self):
+        # check that np.random.Generator can be used (numpy >= 1.17)
+        # obtain a np.random.Generator object
+        rng = np.random.default_rng(1)
+
+        res1 = dual_annealing(self.func, self.ld_bounds, rng=rng)
+        # seed again
+        rng = np.random.default_rng(1)
+        res2 = dual_annealing(self.func, self.ld_bounds, rng=rng)
+        # If we have reproducible results, x components found has to
+        # be exactly the same, which is not the case with no seeding
+        assert_equal(res1.x, res2.x)
+
+    def test_bounds_integrity(self):
+        wrong_bounds = [(-5.12, 5.12), (1, 0), (5.12, 5.12)]
+        assert_raises(ValueError, dual_annealing, self.func,
+                      wrong_bounds)
+
+    def test_bound_validity(self):
+        invalid_bounds = [(-5, 5), (-np.inf, 0), (-5, 5)]
+        assert_raises(ValueError, dual_annealing, self.func,
+                      invalid_bounds)
+        invalid_bounds = [(-5, 5), (0, np.inf), (-5, 5)]
+        assert_raises(ValueError, dual_annealing, self.func,
+                      invalid_bounds)
+        invalid_bounds = [(-5, 5), (0, np.nan), (-5, 5)]
+        assert_raises(ValueError, dual_annealing, self.func,
+                      invalid_bounds)
+
+    @pytest.mark.thread_unsafe
+    def test_deprecated_local_search_options_bounds(self):
+        def func(x):
+            return np.sum((x - 5) * (x - 1))
+        bounds = list(zip([-6, -5], [6, 5]))
+        # Test bounds can be passed (see gh-10831)
+
+        with pytest.warns(RuntimeWarning, match=r"Method CG cannot handle "):
+            dual_annealing(
+                func,
+                bounds=bounds,
+                minimizer_kwargs={"method": "CG", "bounds": bounds})
+
+    @pytest.mark.thread_unsafe
+    def test_minimizer_kwargs_bounds(self):
+        def func(x):
+            return np.sum((x - 5) * (x - 1))
+        bounds = list(zip([-6, -5], [6, 5]))
+        # Test bounds can be passed (see gh-10831)
+        dual_annealing(
+            func,
+            bounds=bounds,
+            minimizer_kwargs={"method": "SLSQP", "bounds": bounds})
+
+        with pytest.warns(RuntimeWarning, match=r"Method CG cannot handle "):
+            dual_annealing(
+                func,
+                bounds=bounds,
+                minimizer_kwargs={"method": "CG", "bounds": bounds})
+
+    def test_max_fun_ls(self):
+        ret = dual_annealing(self.func, self.ld_bounds, maxfun=100,
+                             rng=self.seed)
+
+        ls_max_iter = min(max(
+            len(self.ld_bounds) * LocalSearchWrapper.LS_MAXITER_RATIO,
+            LocalSearchWrapper.LS_MAXITER_MIN),
+            LocalSearchWrapper.LS_MAXITER_MAX)
+        assert ret.nfev <= 100 + ls_max_iter
+        assert not ret.success
+
+    def test_max_fun_no_ls(self):
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             no_local_search=True, maxfun=500, rng=self.seed)
+        assert ret.nfev <= 500
+        assert not ret.success
+
+    def test_maxiter(self):
+        ret = dual_annealing(self.func, self.ld_bounds, maxiter=700,
+                             rng=self.seed)
+        assert ret.nit <= 700
+
+    # Testing that args are passed correctly for dual_annealing
+    def test_fun_args_ls(self):
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             args=((3.14159,)), rng=self.seed)
+        assert_allclose(ret.fun, 3.14159, atol=1e-6)
+
+    # Testing that args are passed correctly for pure simulated annealing
+    def test_fun_args_no_ls(self):
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             args=((3.14159, )), no_local_search=True,
+                             rng=self.seed)
+        assert_allclose(ret.fun, 3.14159, atol=1e-4)
+
+    def test_callback_stop(self):
+        # Testing that callback make the algorithm stop for
+        # fun value <= 1.0 (see callback method)
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             callback=self.callback, rng=self.seed)
+        assert ret.fun <= 1.0
+        assert 'stop early' in ret.message[0]
+        assert not ret.success
+
+    @pytest.mark.parametrize('method, atol', [
+        ('Nelder-Mead', 2e-5),
+        ('COBYLA', 1e-5),
+        ('COBYQA', 1e-8),
+        ('Powell', 1e-8),
+        ('CG', 1e-8),
+        ('BFGS', 1e-8),
+        ('TNC', 1e-8),
+        ('SLSQP', 2e-7),
+    ])
+    def test_multi_ls_minimizer(self, method, atol):
+        ret = dual_annealing(self.func, self.ld_bounds,
+                             minimizer_kwargs=dict(method=method),
+                             rng=self.seed)
+        assert_allclose(ret.fun, 0., atol=atol)
+
+    def test_wrong_restart_temp(self):
+        assert_raises(ValueError, dual_annealing, self.func,
+                      self.ld_bounds, restart_temp_ratio=1)
+        assert_raises(ValueError, dual_annealing, self.func,
+                      self.ld_bounds, restart_temp_ratio=0)
+
+    def test_gradient_gnev(self):
+        minimizer_opts = {
+            'jac': self.rosen_der_wrapper,
+        }
+        ret = dual_annealing(rosen, self.ld_bounds,
+                             minimizer_kwargs=minimizer_opts,
+                             rng=self.seed)
+        assert ret.njev == self.ngev.c
+
+    @pytest.mark.fail_slow(10)
+    def test_from_docstring(self):
+        def func(x):
+            return np.sum(x * x - 10 * np.cos(2 * np.pi * x)) + 10 * np.size(x)
+        lw = [-5.12] * 10
+        up = [5.12] * 10
+        ret = dual_annealing(func, bounds=list(zip(lw, up)), rng=1234)
+        assert_allclose(ret.x,
+                        [-4.26437714e-09, -3.91699361e-09, -1.86149218e-09,
+                         -3.97165720e-09, -6.29151648e-09, -6.53145322e-09,
+                         -3.93616815e-09, -6.55623025e-09, -6.05775280e-09,
+                         -5.00668935e-09], atol=4e-8)
+        assert_allclose(ret.fun, 0.000000, atol=5e-13)
+
+    @pytest.mark.parametrize('new_e, temp_step, accepted, accept_rate', [
+        (0, 100, 1000, 1.0097587941791923),
+        (0, 2, 1000, 1.2599210498948732),
+        (10, 100, 878, 0.8786035869128718),
+        (10, 60, 695, 0.6812920690579612),
+        (2, 100, 990, 0.9897404249173424),
+    ])
+    def test_accept_reject_probabilistic(
+            self, new_e, temp_step, accepted, accept_rate):
+        # Test accepts unconditionally with e < current_energy and
+        # probabilistically with e > current_energy
+
+        rs = check_random_state(123)
+
+        count_accepted = 0
+        iterations = 1000
+
+        accept_param = -5
+        current_energy = 1
+        for _ in range(iterations):
+            energy_state = EnergyState(lower=None, upper=None)
+            # Set energy state with current_energy, any location.
+            energy_state.update_current(current_energy, [0])
+
+            chain = StrategyChain(
+                accept_param, None, None, None, rs, energy_state)
+            # Normally this is set in run()
+            chain.temperature_step = temp_step
+
+            # Check if update is accepted.
+            chain.accept_reject(j=1, e=new_e, x_visit=[2])
+            if energy_state.current_energy == new_e:
+                count_accepted += 1
+
+        assert count_accepted == accepted
+
+        # Check accept rate
+        pqv = 1 - (1 - accept_param) * (new_e - current_energy) / temp_step
+        rate = 0 if pqv <= 0 else np.exp(np.log(pqv) / (1 - accept_param))
+
+        assert_allclose(rate, accept_rate)
+
+    @pytest.mark.fail_slow(10)
+    def test_bounds_class(self):
+        # test that result does not depend on the bounds type
+        def func(x):
+            f = np.sum(x * x - 10 * np.cos(2 * np.pi * x)) + 10 * np.size(x)
+            return f
+        lw = [-5.12] * 5
+        up = [5.12] * 5
+
+        # Unbounded global minimum is all zeros. Most bounds below will force
+        # a DV away from unbounded minimum and be active at solution.
+        up[0] = -2.0
+        up[1] = -1.0
+        lw[3] = 1.0
+        lw[4] = 2.0
+
+        # run optimizations
+        bounds = Bounds(lw, up)
+        ret_bounds_class = dual_annealing(func, bounds=bounds, rng=1234)
+
+        bounds_old = list(zip(lw, up))
+        ret_bounds_list = dual_annealing(func, bounds=bounds_old, rng=1234)
+
+        # test that found minima, function evaluations and iterations match
+        assert_allclose(ret_bounds_class.x, ret_bounds_list.x, atol=1e-8)
+        assert_allclose(ret_bounds_class.x, np.arange(-2, 3), atol=1e-7)
+        assert_allclose(ret_bounds_list.fun, ret_bounds_class.fun, atol=1e-9)
+        assert ret_bounds_list.nfev == ret_bounds_class.nfev
+
+    @pytest.mark.fail_slow(10)
+    def test_callable_jac_hess_with_args_gh11052(self):
+        # dual_annealing used to fail when `jac` was callable and `args` were
+        # used; check that this is resolved. Example is from gh-11052.
+
+        # extended to hess as part of closing gh20614
+        rng = np.random.default_rng(94253637693657847462)
+        def f(x, power):
+            return np.sum(np.exp(x ** power))
+
+        def jac(x, power):
+            return np.exp(x ** power) * power * x ** (power - 1)
+
+        def hess(x, power):
+            # calculated using WolframAlpha as d^2/dx^2 e^(x^p)
+            return np.diag(
+                power * np.exp(x ** power) * x ** (power - 2) *
+                (power * x ** power + power - 1)
+            )
+
+        def hessp(x, p, power):
+            return hess(x, power) @ p
+
+        res1 = dual_annealing(f, args=(2, ), bounds=[[0, 1], [0, 1]], rng=rng,
+                              minimizer_kwargs=dict(method='L-BFGS-B'))
+        res2 = dual_annealing(f, args=(2, ), bounds=[[0, 1], [0, 1]], rng=rng,
+                              minimizer_kwargs=dict(method='L-BFGS-B',
+                                                    jac=jac))
+        res3 = dual_annealing(f, args=(2, ), bounds=[[0, 1], [0, 1]], rng=rng,
+                              minimizer_kwargs=dict(method='newton-cg',
+                                                    jac=jac, hess=hess))
+        res4 = dual_annealing(f, args=(2, ), bounds=[[0, 1], [0, 1]], rng=rng,
+                              minimizer_kwargs=dict(method='newton-cg',
+                                                    jac=jac, hessp=hessp))
+        assert_allclose(res1.fun, res2.fun, rtol=1e-6)
+        assert_allclose(res3.fun, res2.fun, rtol=1e-6)
+        assert_allclose(res4.fun, res2.fun, rtol=1e-6)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__linprog_clean_inputs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__linprog_clean_inputs.py
new file mode 100644
index 0000000000000000000000000000000000000000..3b0e4097bc9aadbfd3335aa3a86d063216f2c69a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__linprog_clean_inputs.py
@@ -0,0 +1,310 @@
+"""
+Unit test for Linear Programming via Simplex Algorithm.
+"""
+import numpy as np
+from numpy.testing import assert_, assert_allclose, assert_equal
+from pytest import raises as assert_raises
+from scipy.optimize._linprog_util import _clean_inputs, _LPProblem
+from scipy._lib._util import VisibleDeprecationWarning
+from copy import deepcopy
+from datetime import date
+
+
+def test_aliasing():
+    """
+    Test for ensuring that no objects referred to by `lp` attributes,
+    `c`, `A_ub`, `b_ub`, `A_eq`, `b_eq`, `bounds`, have been modified
+    by `_clean_inputs` as a side effect.
+    """
+    lp = _LPProblem(
+        c=1,
+        A_ub=[[1]],
+        b_ub=[1],
+        A_eq=[[1]],
+        b_eq=[1],
+        bounds=(-np.inf, np.inf)
+    )
+    lp_copy = deepcopy(lp)
+
+    _clean_inputs(lp)
+
+    assert_(lp.c == lp_copy.c, "c modified by _clean_inputs")
+    assert_(lp.A_ub == lp_copy.A_ub, "A_ub modified by _clean_inputs")
+    assert_(lp.b_ub == lp_copy.b_ub, "b_ub modified by _clean_inputs")
+    assert_(lp.A_eq == lp_copy.A_eq, "A_eq modified by _clean_inputs")
+    assert_(lp.b_eq == lp_copy.b_eq, "b_eq modified by _clean_inputs")
+    assert_(lp.bounds == lp_copy.bounds, "bounds modified by _clean_inputs")
+
+
+def test_aliasing2():
+    """
+    Similar purpose as `test_aliasing` above.
+    """
+    lp = _LPProblem(
+        c=np.array([1, 1]),
+        A_ub=np.array([[1, 1], [2, 2]]),
+        b_ub=np.array([[1], [1]]),
+        A_eq=np.array([[1, 1]]),
+        b_eq=np.array([1]),
+        bounds=[(-np.inf, np.inf), (None, 1)]
+    )
+    lp_copy = deepcopy(lp)
+
+    _clean_inputs(lp)
+
+    assert_allclose(lp.c, lp_copy.c, err_msg="c modified by _clean_inputs")
+    assert_allclose(lp.A_ub, lp_copy.A_ub, err_msg="A_ub modified by _clean_inputs")
+    assert_allclose(lp.b_ub, lp_copy.b_ub, err_msg="b_ub modified by _clean_inputs")
+    assert_allclose(lp.A_eq, lp_copy.A_eq, err_msg="A_eq modified by _clean_inputs")
+    assert_allclose(lp.b_eq, lp_copy.b_eq, err_msg="b_eq modified by _clean_inputs")
+    assert_(lp.bounds == lp_copy.bounds, "bounds modified by _clean_inputs")
+
+
+def test_missing_inputs():
+    c = [1, 2]
+    A_ub = np.array([[1, 1], [2, 2]])
+    b_ub = np.array([1, 1])
+    A_eq = np.array([[1, 1], [2, 2]])
+    b_eq = np.array([1, 1])
+
+    assert_raises(TypeError, _clean_inputs)
+    assert_raises(TypeError, _clean_inputs, _LPProblem(c=None))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_ub=A_ub))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_ub=A_ub, b_ub=None))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, b_ub=b_ub))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_ub=None, b_ub=b_ub))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_eq=A_eq))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_eq=A_eq, b_eq=None))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, b_eq=b_eq))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_eq=None, b_eq=b_eq))
+
+
+def test_too_many_dimensions():
+    cb = [1, 2, 3, 4]
+    A = np.random.rand(4, 4)
+    bad2D = [[1, 2], [3, 4]]
+    bad3D = np.random.rand(4, 4, 4)
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=bad2D, A_ub=A, b_ub=cb))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_ub=bad3D, b_ub=cb))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_ub=A, b_ub=bad2D))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_eq=bad3D, b_eq=cb))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_eq=A, b_eq=bad2D))
+
+
+def test_too_few_dimensions():
+    bad = np.random.rand(4, 4).ravel()
+    cb = np.random.rand(4)
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_ub=bad, b_ub=cb))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=cb, A_eq=bad, b_eq=cb))
+
+
+def test_inconsistent_dimensions():
+    m = 2
+    n = 4
+    c = [1, 2, 3, 4]
+
+    Agood = np.random.rand(m, n)
+    Abad = np.random.rand(m, n + 1)
+    bgood = np.random.rand(m)
+    bbad = np.random.rand(m + 1)
+    boundsbad = [(0, 1)] * (n + 1)
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_ub=Abad, b_ub=bgood))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_ub=Agood, b_ub=bbad))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_eq=Abad, b_eq=bgood))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, A_eq=Agood, b_eq=bbad))
+    assert_raises(ValueError, _clean_inputs, _LPProblem(c=c, bounds=boundsbad))
+    with np.testing.suppress_warnings() as sup:
+        sup.filter(VisibleDeprecationWarning, "Creating an ndarray from ragged")
+        assert_raises(ValueError, _clean_inputs,
+                      _LPProblem(c=c, bounds=[[1, 2], [2, 3], [3, 4], [4, 5, 6]]))
+
+
+def test_type_errors():
+    lp = _LPProblem(
+        c=[1, 2],
+        A_ub=np.array([[1, 1], [2, 2]]),
+        b_ub=np.array([1, 1]),
+        A_eq=np.array([[1, 1], [2, 2]]),
+        b_eq=np.array([1, 1]),
+        bounds=[(0, 1)]
+    )
+    bad = "hello"
+
+    assert_raises(TypeError, _clean_inputs, lp._replace(c=bad))
+    assert_raises(TypeError, _clean_inputs, lp._replace(A_ub=bad))
+    assert_raises(TypeError, _clean_inputs, lp._replace(b_ub=bad))
+    assert_raises(TypeError, _clean_inputs, lp._replace(A_eq=bad))
+    assert_raises(TypeError, _clean_inputs, lp._replace(b_eq=bad))
+
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=bad))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds="hi"))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=["hi"]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=[("hi")]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=[(1, "")]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=[(1, 2), (1, "")]))
+    assert_raises(TypeError, _clean_inputs,
+                  lp._replace(bounds=[(1, date(2020, 2, 29))]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=[[[1, 2]]]))
+
+
+def test_non_finite_errors():
+    lp = _LPProblem(
+        c=[1, 2],
+        A_ub=np.array([[1, 1], [2, 2]]),
+        b_ub=np.array([1, 1]),
+        A_eq=np.array([[1, 1], [2, 2]]),
+        b_eq=np.array([1, 1]),
+        bounds=[(0, 1)]
+    )
+    assert_raises(ValueError, _clean_inputs, lp._replace(c=[0, None]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(c=[np.inf, 0]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(c=[0, -np.inf]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(c=[np.nan, 0]))
+
+    assert_raises(ValueError, _clean_inputs, lp._replace(A_ub=[[1, 2], [None, 1]]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(b_ub=[np.inf, 1]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(A_eq=[[1, 2], [1, -np.inf]]))
+    assert_raises(ValueError, _clean_inputs, lp._replace(b_eq=[1, np.nan]))
+
+
+def test__clean_inputs1():
+    lp = _LPProblem(
+        c=[1, 2],
+        A_ub=[[1, 1], [2, 2]],
+        b_ub=[1, 1],
+        A_eq=[[1, 1], [2, 2]],
+        b_eq=[1, 1],
+        bounds=None
+    )
+
+    lp_cleaned = _clean_inputs(lp)
+
+    assert_allclose(lp_cleaned.c, np.array(lp.c))
+    assert_allclose(lp_cleaned.A_ub, np.array(lp.A_ub))
+    assert_allclose(lp_cleaned.b_ub, np.array(lp.b_ub))
+    assert_allclose(lp_cleaned.A_eq, np.array(lp.A_eq))
+    assert_allclose(lp_cleaned.b_eq, np.array(lp.b_eq))
+    assert_equal(lp_cleaned.bounds, [(0, np.inf)] * 2)
+
+    assert_(lp_cleaned.c.shape == (2,), "")
+    assert_(lp_cleaned.A_ub.shape == (2, 2), "")
+    assert_(lp_cleaned.b_ub.shape == (2,), "")
+    assert_(lp_cleaned.A_eq.shape == (2, 2), "")
+    assert_(lp_cleaned.b_eq.shape == (2,), "")
+
+
+def test__clean_inputs2():
+    lp = _LPProblem(
+        c=1,
+        A_ub=[[1]],
+        b_ub=1,
+        A_eq=[[1]],
+        b_eq=1,
+        bounds=(0, 1)
+    )
+
+    lp_cleaned = _clean_inputs(lp)
+
+    assert_allclose(lp_cleaned.c, np.array(lp.c))
+    assert_allclose(lp_cleaned.A_ub, np.array(lp.A_ub))
+    assert_allclose(lp_cleaned.b_ub, np.array(lp.b_ub))
+    assert_allclose(lp_cleaned.A_eq, np.array(lp.A_eq))
+    assert_allclose(lp_cleaned.b_eq, np.array(lp.b_eq))
+    assert_equal(lp_cleaned.bounds, [(0, 1)])
+
+    assert_(lp_cleaned.c.shape == (1,), "")
+    assert_(lp_cleaned.A_ub.shape == (1, 1), "")
+    assert_(lp_cleaned.b_ub.shape == (1,), "")
+    assert_(lp_cleaned.A_eq.shape == (1, 1), "")
+    assert_(lp_cleaned.b_eq.shape == (1,), "")
+
+
+def test__clean_inputs3():
+    lp = _LPProblem(
+        c=[[1, 2]],
+        A_ub=np.random.rand(2, 2),
+        b_ub=[[1], [2]],
+        A_eq=np.random.rand(2, 2),
+        b_eq=[[1], [2]],
+        bounds=[(0, 1)]
+    )
+
+    lp_cleaned = _clean_inputs(lp)
+
+    assert_allclose(lp_cleaned.c, np.array([1, 2]))
+    assert_allclose(lp_cleaned.b_ub, np.array([1, 2]))
+    assert_allclose(lp_cleaned.b_eq, np.array([1, 2]))
+    assert_equal(lp_cleaned.bounds, [(0, 1)] * 2)
+
+    assert_(lp_cleaned.c.shape == (2,), "")
+    assert_(lp_cleaned.b_ub.shape == (2,), "")
+    assert_(lp_cleaned.b_eq.shape == (2,), "")
+
+
+def test_bad_bounds():
+    lp = _LPProblem(c=[1, 2])
+
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=(1, 2, 2)))
+    assert_raises(ValueError, _clean_inputs, lp._replace(bounds=[(1, 2, 2)]))
+    with np.testing.suppress_warnings() as sup:
+        sup.filter(VisibleDeprecationWarning, "Creating an ndarray from ragged")
+        assert_raises(ValueError, _clean_inputs,
+                      lp._replace(bounds=[(1, 2), (1, 2, 2)]))
+    assert_raises(ValueError, _clean_inputs,
+                  lp._replace(bounds=[(1, 2), (1, 2), (1, 2)]))
+
+    lp = _LPProblem(c=[1, 2, 3, 4])
+
+    assert_raises(ValueError, _clean_inputs,
+                  lp._replace(bounds=[(1, 2, 3, 4), (1, 2, 3, 4)]))
+
+
+def test_good_bounds():
+    lp = _LPProblem(c=[1, 2])
+
+    lp_cleaned = _clean_inputs(lp)  # lp.bounds is None by default
+    assert_equal(lp_cleaned.bounds, [(0, np.inf)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[]))
+    assert_equal(lp_cleaned.bounds, [(0, np.inf)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[[]]))
+    assert_equal(lp_cleaned.bounds, [(0, np.inf)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=(1, 2)))
+    assert_equal(lp_cleaned.bounds, [(1, 2)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(1, 2)]))
+    assert_equal(lp_cleaned.bounds, [(1, 2)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(1, None)]))
+    assert_equal(lp_cleaned.bounds, [(1, np.inf)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(None, 1)]))
+    assert_equal(lp_cleaned.bounds, [(-np.inf, 1)] * 2)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(None, None), (-np.inf, None)]))
+    assert_equal(lp_cleaned.bounds, [(-np.inf, np.inf)] * 2)
+
+    lp = _LPProblem(c=[1, 2, 3, 4])
+
+    lp_cleaned = _clean_inputs(lp)  # lp.bounds is None by default
+    assert_equal(lp_cleaned.bounds, [(0, np.inf)] * 4)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=(1, 2)))
+    assert_equal(lp_cleaned.bounds, [(1, 2)] * 4)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(1, 2)]))
+    assert_equal(lp_cleaned.bounds, [(1, 2)] * 4)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(1, None)]))
+    assert_equal(lp_cleaned.bounds, [(1, np.inf)] * 4)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(None, 1)]))
+    assert_equal(lp_cleaned.bounds, [(-np.inf, 1)] * 4)
+
+    lp_cleaned = _clean_inputs(lp._replace(bounds=[(None, None),
+                                                   (-np.inf, None),
+                                                   (None, np.inf),
+                                                   (-np.inf, np.inf)]))
+    assert_equal(lp_cleaned.bounds, [(-np.inf, np.inf)] * 4)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__numdiff.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__numdiff.py
new file mode 100644
index 0000000000000000000000000000000000000000..21fcf36b01f480ea23e15b67e4bebb1270d63c3b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__numdiff.py
@@ -0,0 +1,841 @@
+import math
+from itertools import product
+
+import numpy as np
+from numpy.testing import assert_allclose, assert_equal, assert_
+from pytest import raises as assert_raises
+
+from scipy.sparse import csr_matrix, csc_matrix, lil_matrix
+
+from scipy.optimize._numdiff import (
+    _adjust_scheme_to_bounds, approx_derivative, check_derivative,
+    group_columns, _eps_for_method, _compute_absolute_step)
+
+
+def test_group_columns():
+    structure = [
+        [1, 1, 0, 0, 0, 0],
+        [1, 1, 1, 0, 0, 0],
+        [0, 1, 1, 1, 0, 0],
+        [0, 0, 1, 1, 1, 0],
+        [0, 0, 0, 1, 1, 1],
+        [0, 0, 0, 0, 1, 1],
+        [0, 0, 0, 0, 0, 0]
+    ]
+    for transform in [np.asarray, csr_matrix, csc_matrix, lil_matrix]:
+        A = transform(structure)
+        order = np.arange(6)
+        groups_true = np.array([0, 1, 2, 0, 1, 2])
+        groups = group_columns(A, order)
+        assert_equal(groups, groups_true)
+
+        order = [1, 2, 4, 3, 5, 0]
+        groups_true = np.array([2, 0, 1, 2, 0, 1])
+        groups = group_columns(A, order)
+        assert_equal(groups, groups_true)
+
+    # Test repeatability.
+    groups_1 = group_columns(A)
+    groups_2 = group_columns(A)
+    assert_equal(groups_1, groups_2)
+
+
+def test_correct_fp_eps():
+    # check that relative step size is correct for FP size
+    EPS = np.finfo(np.float64).eps
+    relative_step = {"2-point": EPS**0.5,
+                    "3-point": EPS**(1/3),
+                     "cs": EPS**0.5}
+    for method in ['2-point', '3-point', 'cs']:
+        assert_allclose(
+            _eps_for_method(np.float64, np.float64, method),
+            relative_step[method])
+        assert_allclose(
+            _eps_for_method(np.complex128, np.complex128, method),
+            relative_step[method]
+        )
+
+    # check another FP size
+    EPS = np.finfo(np.float32).eps
+    relative_step = {"2-point": EPS**0.5,
+                    "3-point": EPS**(1/3),
+                     "cs": EPS**0.5}
+
+    for method in ['2-point', '3-point', 'cs']:
+        assert_allclose(
+            _eps_for_method(np.float64, np.float32, method),
+            relative_step[method]
+        )
+        assert_allclose(
+            _eps_for_method(np.float32, np.float64, method),
+            relative_step[method]
+        )
+        assert_allclose(
+            _eps_for_method(np.float32, np.float32, method),
+            relative_step[method]
+        )
+
+
+class TestAdjustSchemeToBounds:
+    def test_no_bounds(self):
+        x0 = np.zeros(3)
+        h = np.full(3, 1e-2)
+        inf_lower = np.empty_like(x0)
+        inf_upper = np.empty_like(x0)
+        inf_lower.fill(-np.inf)
+        inf_upper.fill(np.inf)
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 1, '1-sided', inf_lower, inf_upper)
+        assert_allclose(h_adjusted, h)
+        assert_(np.all(one_sided))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 2, '1-sided', inf_lower, inf_upper)
+        assert_allclose(h_adjusted, h)
+        assert_(np.all(one_sided))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 1, '2-sided', inf_lower, inf_upper)
+        assert_allclose(h_adjusted, h)
+        assert_(np.all(~one_sided))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 2, '2-sided', inf_lower, inf_upper)
+        assert_allclose(h_adjusted, h)
+        assert_(np.all(~one_sided))
+
+    def test_with_bound(self):
+        x0 = np.array([0.0, 0.85, -0.85])
+        lb = -np.ones(3)
+        ub = np.ones(3)
+        h = np.array([1, 1, -1]) * 1e-1
+
+        h_adjusted, _ = _adjust_scheme_to_bounds(x0, h, 1, '1-sided', lb, ub)
+        assert_allclose(h_adjusted, h)
+
+        h_adjusted, _ = _adjust_scheme_to_bounds(x0, h, 2, '1-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([1, -1, 1]) * 1e-1)
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 1, '2-sided', lb, ub)
+        assert_allclose(h_adjusted, np.abs(h))
+        assert_(np.all(~one_sided))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 2, '2-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([1, -1, 1]) * 1e-1)
+        assert_equal(one_sided, np.array([False, True, True]))
+
+    def test_tight_bounds(self):
+        lb = np.array([-0.03, -0.03])
+        ub = np.array([0.05, 0.05])
+        x0 = np.array([0.0, 0.03])
+        h = np.array([-0.1, -0.1])
+
+        h_adjusted, _ = _adjust_scheme_to_bounds(x0, h, 1, '1-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([0.05, -0.06]))
+
+        h_adjusted, _ = _adjust_scheme_to_bounds(x0, h, 2, '1-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([0.025, -0.03]))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 1, '2-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([0.03, -0.03]))
+        assert_equal(one_sided, np.array([False, True]))
+
+        h_adjusted, one_sided = _adjust_scheme_to_bounds(
+            x0, h, 2, '2-sided', lb, ub)
+        assert_allclose(h_adjusted, np.array([0.015, -0.015]))
+        assert_equal(one_sided, np.array([False, True]))
+
+
+class TestApproxDerivativesDense:
+    def fun_scalar_scalar(self, x):
+        return np.sinh(x)
+
+    def jac_scalar_scalar(self, x):
+        return np.cosh(x)
+
+    def fun_scalar_vector(self, x):
+        return np.array([x[0]**2, np.tan(x[0]), np.exp(x[0])])
+
+    def jac_scalar_vector(self, x):
+        return np.array(
+            [2 * x[0], np.cos(x[0]) ** -2, np.exp(x[0])]).reshape(-1, 1)
+
+    def fun_vector_scalar(self, x):
+        return np.sin(x[0] * x[1]) * np.log(x[0])
+
+    def wrong_dimensions_fun(self, x):
+        return np.array([x**2, np.tan(x), np.exp(x)])
+
+    def jac_vector_scalar(self, x):
+        return np.array([
+            x[1] * np.cos(x[0] * x[1]) * np.log(x[0]) +
+            np.sin(x[0] * x[1]) / x[0],
+            x[0] * np.cos(x[0] * x[1]) * np.log(x[0])
+        ])
+
+    def fun_vector_vector(self, x):
+        return np.array([
+            x[0] * np.sin(x[1]),
+            x[1] * np.cos(x[0]),
+            x[0] ** 3 * x[1] ** -0.5
+        ])
+
+    def fun_vector_vector_with_arg(self, x, arg):
+        """Used to test passing custom arguments with check_derivative()"""
+        assert arg == 42
+        return np.array([
+            x[0] * np.sin(x[1]),
+            x[1] * np.cos(x[0]),
+            x[0] ** 3 * x[1] ** -0.5
+        ])
+
+    def jac_vector_vector(self, x):
+        return np.array([
+            [np.sin(x[1]), x[0] * np.cos(x[1])],
+            [-x[1] * np.sin(x[0]), np.cos(x[0])],
+            [3 * x[0] ** 2 * x[1] ** -0.5, -0.5 * x[0] ** 3 * x[1] ** -1.5]
+        ])
+
+    def jac_vector_vector_with_arg(self, x, arg):
+        """Used to test passing custom arguments with check_derivative()"""
+        assert arg == 42
+        return np.array([
+            [np.sin(x[1]), x[0] * np.cos(x[1])],
+            [-x[1] * np.sin(x[0]), np.cos(x[0])],
+            [3 * x[0] ** 2 * x[1] ** -0.5, -0.5 * x[0] ** 3 * x[1] ** -1.5]
+        ])
+
+    def fun_parametrized(self, x, c0, c1=1.0):
+        return np.array([np.exp(c0 * x[0]), np.exp(c1 * x[1])])
+
+    def jac_parametrized(self, x, c0, c1=0.1):
+        return np.array([
+            [c0 * np.exp(c0 * x[0]), 0],
+            [0, c1 * np.exp(c1 * x[1])]
+        ])
+
+    def fun_with_nan(self, x):
+        return x if np.abs(x) <= 1e-8 else np.nan
+
+    def jac_with_nan(self, x):
+        return 1.0 if np.abs(x) <= 1e-8 else np.nan
+
+    def fun_zero_jacobian(self, x):
+        return np.array([x[0] * x[1], np.cos(x[0] * x[1])])
+
+    def jac_zero_jacobian(self, x):
+        return np.array([
+            [x[1], x[0]],
+            [-x[1] * np.sin(x[0] * x[1]), -x[0] * np.sin(x[0] * x[1])]
+        ])
+
+    def jac_non_numpy(self, x):
+        # x can be a scalar or an array [val].
+        # Cast to true scalar before handing over to math.exp
+        xp = np.asarray(x).item()
+        return math.exp(xp)
+
+    def test_scalar_scalar(self):
+        x0 = 1.0
+        jac_diff_2 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='2-point')
+        jac_diff_3 = approx_derivative(self.fun_scalar_scalar, x0)
+        jac_diff_4 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='cs')
+        jac_true = self.jac_scalar_scalar(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_scalar_scalar_abs_step(self):
+        # can approx_derivative use abs_step?
+        x0 = 1.0
+        jac_diff_2 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='2-point', abs_step=1.49e-8)
+        jac_diff_3 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       abs_step=1.49e-8)
+        jac_diff_4 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='cs', abs_step=1.49e-8)
+        jac_true = self.jac_scalar_scalar(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_scalar_vector(self):
+        x0 = 0.5
+        jac_diff_2 = approx_derivative(self.fun_scalar_vector, x0,
+                                       method='2-point')
+        jac_diff_3 = approx_derivative(self.fun_scalar_vector, x0)
+        jac_diff_4 = approx_derivative(self.fun_scalar_vector, x0,
+                                       method='cs')
+        jac_true = self.jac_scalar_vector(np.atleast_1d(x0))
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_vector_scalar(self):
+        x0 = np.array([100.0, -0.5])
+        jac_diff_2 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='2-point')
+        jac_diff_3 = approx_derivative(self.fun_vector_scalar, x0)
+        jac_diff_4 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='cs')
+        jac_true = self.jac_vector_scalar(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-7)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_vector_scalar_abs_step(self):
+        # can approx_derivative use abs_step?
+        x0 = np.array([100.0, -0.5])
+        jac_diff_2 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='2-point', abs_step=1.49e-8)
+        jac_diff_3 = approx_derivative(self.fun_vector_scalar, x0,
+                                       abs_step=1.49e-8, rel_step=np.inf)
+        jac_diff_4 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='cs', abs_step=1.49e-8)
+        jac_true = self.jac_vector_scalar(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=3e-9)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_vector_vector(self):
+        x0 = np.array([-100.0, 0.2])
+        jac_diff_2 = approx_derivative(self.fun_vector_vector, x0,
+                                       method='2-point')
+        jac_diff_3 = approx_derivative(self.fun_vector_vector, x0)
+        jac_diff_4 = approx_derivative(self.fun_vector_vector, x0,
+                                       method='cs')
+        jac_true = self.jac_vector_vector(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-5)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_4, jac_true, rtol=1e-12)
+
+    def test_wrong_dimensions(self):
+        x0 = 1.0
+        assert_raises(RuntimeError, approx_derivative,
+                      self.wrong_dimensions_fun, x0)
+        f0 = self.wrong_dimensions_fun(np.atleast_1d(x0))
+        assert_raises(ValueError, approx_derivative,
+                      self.wrong_dimensions_fun, x0, f0=f0)
+
+    def test_custom_rel_step(self):
+        x0 = np.array([-0.1, 0.1])
+        jac_diff_2 = approx_derivative(self.fun_vector_vector, x0,
+                                       method='2-point', rel_step=1e-4)
+        jac_diff_3 = approx_derivative(self.fun_vector_vector, x0,
+                                       rel_step=1e-4)
+        jac_true = self.jac_vector_vector(x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-2)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-4)
+
+    def test_options(self):
+        x0 = np.array([1.0, 1.0])
+        c0 = -1.0
+        c1 = 1.0
+        lb = 0.0
+        ub = 2.0
+        f0 = self.fun_parametrized(x0, c0, c1=c1)
+        rel_step = np.array([-1e-6, 1e-7])
+        jac_true = self.jac_parametrized(x0, c0, c1)
+        jac_diff_2 = approx_derivative(
+            self.fun_parametrized, x0, method='2-point', rel_step=rel_step,
+            f0=f0, args=(c0,), kwargs=dict(c1=c1), bounds=(lb, ub))
+        jac_diff_3 = approx_derivative(
+            self.fun_parametrized, x0, rel_step=rel_step,
+            f0=f0, args=(c0,), kwargs=dict(c1=c1), bounds=(lb, ub))
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+
+    def test_with_bounds_2_point(self):
+        lb = -np.ones(2)
+        ub = np.ones(2)
+
+        x0 = np.array([-2.0, 0.2])
+        assert_raises(ValueError, approx_derivative,
+                      self.fun_vector_vector, x0, bounds=(lb, ub))
+
+        x0 = np.array([-1.0, 1.0])
+        jac_diff = approx_derivative(self.fun_vector_vector, x0,
+                                     method='2-point', bounds=(lb, ub))
+        jac_true = self.jac_vector_vector(x0)
+        assert_allclose(jac_diff, jac_true, rtol=1e-6)
+
+    def test_with_bounds_3_point(self):
+        lb = np.array([1.0, 1.0])
+        ub = np.array([2.0, 2.0])
+
+        x0 = np.array([1.0, 2.0])
+        jac_true = self.jac_vector_vector(x0)
+
+        jac_diff = approx_derivative(self.fun_vector_vector, x0)
+        assert_allclose(jac_diff, jac_true, rtol=1e-9)
+
+        jac_diff = approx_derivative(self.fun_vector_vector, x0,
+                                     bounds=(lb, np.inf))
+        assert_allclose(jac_diff, jac_true, rtol=1e-9)
+
+        jac_diff = approx_derivative(self.fun_vector_vector, x0,
+                                     bounds=(-np.inf, ub))
+        assert_allclose(jac_diff, jac_true, rtol=1e-9)
+
+        jac_diff = approx_derivative(self.fun_vector_vector, x0,
+                                     bounds=(lb, ub))
+        assert_allclose(jac_diff, jac_true, rtol=1e-9)
+
+    def test_tight_bounds(self):
+        x0 = np.array([10.0, 10.0])
+        lb = x0 - 3e-9
+        ub = x0 + 2e-9
+        jac_true = self.jac_vector_vector(x0)
+        jac_diff = approx_derivative(
+            self.fun_vector_vector, x0, method='2-point', bounds=(lb, ub))
+        assert_allclose(jac_diff, jac_true, rtol=1e-6)
+        jac_diff = approx_derivative(
+            self.fun_vector_vector, x0, method='2-point',
+            rel_step=1e-6, bounds=(lb, ub))
+        assert_allclose(jac_diff, jac_true, rtol=1e-6)
+
+        jac_diff = approx_derivative(
+            self.fun_vector_vector, x0, bounds=(lb, ub))
+        assert_allclose(jac_diff, jac_true, rtol=1e-6)
+        jac_diff = approx_derivative(
+            self.fun_vector_vector, x0, rel_step=1e-6, bounds=(lb, ub))
+        assert_allclose(jac_true, jac_diff, rtol=1e-6)
+
+    def test_bound_switches(self):
+        lb = -1e-8
+        ub = 1e-8
+        x0 = 0.0
+        jac_true = self.jac_with_nan(x0)
+        jac_diff_2 = approx_derivative(
+            self.fun_with_nan, x0, method='2-point', rel_step=1e-6,
+            bounds=(lb, ub))
+        jac_diff_3 = approx_derivative(
+            self.fun_with_nan, x0, rel_step=1e-6, bounds=(lb, ub))
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+
+        x0 = 1e-8
+        jac_true = self.jac_with_nan(x0)
+        jac_diff_2 = approx_derivative(
+            self.fun_with_nan, x0, method='2-point', rel_step=1e-6,
+            bounds=(lb, ub))
+        jac_diff_3 = approx_derivative(
+            self.fun_with_nan, x0, rel_step=1e-6, bounds=(lb, ub))
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-9)
+
+    def test_non_numpy(self):
+        x0 = 1.0
+        jac_true = self.jac_non_numpy(x0)
+        jac_diff_2 = approx_derivative(self.jac_non_numpy, x0,
+                                       method='2-point')
+        jac_diff_3 = approx_derivative(self.jac_non_numpy, x0)
+        assert_allclose(jac_diff_2, jac_true, rtol=1e-6)
+        assert_allclose(jac_diff_3, jac_true, rtol=1e-8)
+
+        # math.exp cannot handle complex arguments, hence this raises
+        assert_raises(TypeError, approx_derivative, self.jac_non_numpy, x0,
+                      **dict(method='cs'))
+
+    def test_fp(self):
+        # checks that approx_derivative works for FP size other than 64.
+        # Example is derived from the minimal working example in gh12991.
+        np.random.seed(1)
+
+        def func(p, x):
+            return p[0] + p[1] * x
+
+        def err(p, x, y):
+            return func(p, x) - y
+
+        x = np.linspace(0, 1, 100, dtype=np.float64)
+        y = np.random.random(100).astype(np.float64)
+        p0 = np.array([-1.0, -1.0])
+
+        jac_fp64 = approx_derivative(err, p0, method='2-point', args=(x, y))
+
+        # parameter vector is float32, func output is float64
+        jac_fp = approx_derivative(err, p0.astype(np.float32),
+                                   method='2-point', args=(x, y))
+        assert err(p0, x, y).dtype == np.float64
+        assert_allclose(jac_fp, jac_fp64, atol=1e-3)
+
+        # parameter vector is float64, func output is float32
+        def err_fp32(p):
+            assert p.dtype == np.float32
+            return err(p, x, y).astype(np.float32)
+
+        jac_fp = approx_derivative(err_fp32, p0.astype(np.float32),
+                                   method='2-point')
+        assert_allclose(jac_fp, jac_fp64, atol=1e-3)
+
+        # check upper bound of error on the derivative for 2-point
+        def f(x):
+            return np.sin(x)
+        def g(x):
+            return np.cos(x)
+        def hess(x):
+            return -np.sin(x)
+
+        def calc_atol(h, x0, f, hess, EPS):
+            # truncation error
+            t0 = h / 2 * max(np.abs(hess(x0)), np.abs(hess(x0 + h)))
+            # roundoff error. There may be a divisor (>1) missing from
+            # the following line, so this contribution is possibly
+            # overestimated
+            t1 = EPS / h * max(np.abs(f(x0)), np.abs(f(x0 + h)))
+            return t0 + t1
+
+        for dtype in [np.float16, np.float32, np.float64]:
+            EPS = np.finfo(dtype).eps
+            x0 = np.array(1.0).astype(dtype)
+            h = _compute_absolute_step(None, x0, f(x0), '2-point')
+            atol = calc_atol(h, x0, f, hess, EPS)
+            err = approx_derivative(f, x0, method='2-point',
+                                    abs_step=h) - g(x0)
+            assert abs(err) < atol
+
+    def test_check_derivative(self):
+        x0 = np.array([-10.0, 10])
+        accuracy = check_derivative(self.fun_vector_vector,
+                                    self.jac_vector_vector, x0)
+        assert_(accuracy < 1e-9)
+        accuracy = check_derivative(self.fun_vector_vector,
+                                    self.jac_vector_vector, x0)
+        assert_(accuracy < 1e-6)
+
+        x0 = np.array([0.0, 0.0])
+        accuracy = check_derivative(self.fun_zero_jacobian,
+                                    self.jac_zero_jacobian, x0)
+        assert_(accuracy == 0)
+        accuracy = check_derivative(self.fun_zero_jacobian,
+                                    self.jac_zero_jacobian, x0)
+        assert_(accuracy == 0)
+
+    def test_check_derivative_with_kwargs(self):
+        x0 = np.array([-10.0, 10])
+        accuracy = check_derivative(self.fun_vector_vector_with_arg,
+                                    self.jac_vector_vector_with_arg,
+                                    x0,
+                                    kwargs={'arg': 42})
+        assert_(accuracy < 1e-9)
+
+
+class TestApproxDerivativeSparse:
+    # Example from Numerical Optimization 2nd edition, p. 198.
+    def setup_method(self):
+        np.random.seed(0)
+        self.n = 50
+        self.lb = -0.1 * (1 + np.arange(self.n))
+        self.ub = 0.1 * (1 + np.arange(self.n))
+        self.x0 = np.empty(self.n)
+        self.x0[::2] = (1 - 1e-7) * self.lb[::2]
+        self.x0[1::2] = (1 - 1e-7) * self.ub[1::2]
+
+        self.J_true = self.jac(self.x0)
+
+    def fun(self, x):
+        e = x[1:]**3 - x[:-1]**2
+        return np.hstack((0, 3 * e)) + np.hstack((2 * e, 0))
+
+    def jac(self, x):
+        n = x.size
+        J = np.zeros((n, n))
+        J[0, 0] = -4 * x[0]
+        J[0, 1] = 6 * x[1]**2
+        for i in range(1, n - 1):
+            J[i, i - 1] = -6 * x[i-1]
+            J[i, i] = 9 * x[i]**2 - 4 * x[i]
+            J[i, i + 1] = 6 * x[i+1]**2
+        J[-1, -1] = 9 * x[-1]**2
+        J[-1, -2] = -6 * x[-2]
+
+        return J
+
+    def structure(self, n):
+        A = np.zeros((n, n), dtype=int)
+        A[0, 0] = 1
+        A[0, 1] = 1
+        for i in range(1, n - 1):
+            A[i, i - 1: i + 2] = 1
+        A[-1, -1] = 1
+        A[-1, -2] = 1
+
+        return A
+
+    def test_all(self):
+        A = self.structure(self.n)
+        order = np.arange(self.n)
+        groups_1 = group_columns(A, order)
+        np.random.shuffle(order)
+        groups_2 = group_columns(A, order)
+
+        for method, groups, l, u in product(
+                ['2-point', '3-point', 'cs'], [groups_1, groups_2],
+                [-np.inf, self.lb], [np.inf, self.ub]):
+            J = approx_derivative(self.fun, self.x0, method=method,
+                                  bounds=(l, u), sparsity=(A, groups))
+            assert_(isinstance(J, csr_matrix))
+            assert_allclose(J.toarray(), self.J_true, rtol=1e-6)
+
+            rel_step = np.full_like(self.x0, 1e-8)
+            rel_step[::2] *= -1
+            J = approx_derivative(self.fun, self.x0, method=method,
+                                  rel_step=rel_step, sparsity=(A, groups))
+            assert_allclose(J.toarray(), self.J_true, rtol=1e-5)
+
+    def test_no_precomputed_groups(self):
+        A = self.structure(self.n)
+        J = approx_derivative(self.fun, self.x0, sparsity=A)
+        assert_allclose(J.toarray(), self.J_true, rtol=1e-6)
+
+    def test_equivalence(self):
+        structure = np.ones((self.n, self.n), dtype=int)
+        groups = np.arange(self.n)
+        for method in ['2-point', '3-point', 'cs']:
+            J_dense = approx_derivative(self.fun, self.x0, method=method)
+            J_sparse = approx_derivative(
+                self.fun, self.x0, sparsity=(structure, groups), method=method)
+            assert_allclose(J_dense, J_sparse.toarray(),
+                            rtol=5e-16, atol=7e-15)
+
+    def test_check_derivative(self):
+        def jac(x):
+            return csr_matrix(self.jac(x))
+
+        accuracy = check_derivative(self.fun, jac, self.x0,
+                                    bounds=(self.lb, self.ub))
+        assert_(accuracy < 1e-9)
+
+        accuracy = check_derivative(self.fun, jac, self.x0,
+                                    bounds=(self.lb, self.ub))
+        assert_(accuracy < 1e-9)
+
+
+class TestApproxDerivativeLinearOperator:
+
+    def fun_scalar_scalar(self, x):
+        return np.sinh(x)
+
+    def jac_scalar_scalar(self, x):
+        return np.cosh(x)
+
+    def fun_scalar_vector(self, x):
+        return np.array([x[0]**2, np.tan(x[0]), np.exp(x[0])])
+
+    def jac_scalar_vector(self, x):
+        return np.array(
+            [2 * x[0], np.cos(x[0]) ** -2, np.exp(x[0])]).reshape(-1, 1)
+
+    def fun_vector_scalar(self, x):
+        return np.sin(x[0] * x[1]) * np.log(x[0])
+
+    def jac_vector_scalar(self, x):
+        return np.array([
+            x[1] * np.cos(x[0] * x[1]) * np.log(x[0]) +
+            np.sin(x[0] * x[1]) / x[0],
+            x[0] * np.cos(x[0] * x[1]) * np.log(x[0])
+        ])
+
+    def fun_vector_vector(self, x):
+        return np.array([
+            x[0] * np.sin(x[1]),
+            x[1] * np.cos(x[0]),
+            x[0] ** 3 * x[1] ** -0.5
+        ])
+
+    def jac_vector_vector(self, x):
+        return np.array([
+            [np.sin(x[1]), x[0] * np.cos(x[1])],
+            [-x[1] * np.sin(x[0]), np.cos(x[0])],
+            [3 * x[0] ** 2 * x[1] ** -0.5, -0.5 * x[0] ** 3 * x[1] ** -1.5]
+        ])
+
+    def test_scalar_scalar(self):
+        x0 = 1.0
+        jac_diff_2 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='2-point',
+                                       as_linear_operator=True)
+        jac_diff_3 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       as_linear_operator=True)
+        jac_diff_4 = approx_derivative(self.fun_scalar_scalar, x0,
+                                       method='cs',
+                                       as_linear_operator=True)
+        jac_true = self.jac_scalar_scalar(x0)
+        np.random.seed(1)
+        for i in range(10):
+            p = np.random.uniform(-10, 10, size=(1,))
+            assert_allclose(jac_diff_2.dot(p), jac_true*p,
+                            rtol=1e-5)
+            assert_allclose(jac_diff_3.dot(p), jac_true*p,
+                            rtol=5e-6)
+            assert_allclose(jac_diff_4.dot(p), jac_true*p,
+                            rtol=5e-6)
+
+    def test_scalar_vector(self):
+        x0 = 0.5
+        jac_diff_2 = approx_derivative(self.fun_scalar_vector, x0,
+                                       method='2-point',
+                                       as_linear_operator=True)
+        jac_diff_3 = approx_derivative(self.fun_scalar_vector, x0,
+                                       as_linear_operator=True)
+        jac_diff_4 = approx_derivative(self.fun_scalar_vector, x0,
+                                       method='cs',
+                                       as_linear_operator=True)
+        jac_true = self.jac_scalar_vector(np.atleast_1d(x0))
+        np.random.seed(1)
+        for i in range(10):
+            p = np.random.uniform(-10, 10, size=(1,))
+            assert_allclose(jac_diff_2.dot(p), jac_true.dot(p),
+                            rtol=1e-5)
+            assert_allclose(jac_diff_3.dot(p), jac_true.dot(p),
+                            rtol=5e-6)
+            assert_allclose(jac_diff_4.dot(p), jac_true.dot(p),
+                            rtol=5e-6)
+
+    def test_vector_scalar(self):
+        x0 = np.array([100.0, -0.5])
+        jac_diff_2 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='2-point',
+                                       as_linear_operator=True)
+        jac_diff_3 = approx_derivative(self.fun_vector_scalar, x0,
+                                       as_linear_operator=True)
+        jac_diff_4 = approx_derivative(self.fun_vector_scalar, x0,
+                                       method='cs',
+                                       as_linear_operator=True)
+        jac_true = self.jac_vector_scalar(x0)
+        np.random.seed(1)
+        for i in range(10):
+            p = np.random.uniform(-10, 10, size=x0.shape)
+            assert_allclose(jac_diff_2.dot(p), np.atleast_1d(jac_true.dot(p)),
+                            rtol=1e-5)
+            assert_allclose(jac_diff_3.dot(p), np.atleast_1d(jac_true.dot(p)),
+                            rtol=5e-6)
+            assert_allclose(jac_diff_4.dot(p), np.atleast_1d(jac_true.dot(p)),
+                            rtol=1e-7)
+
+    def test_vector_vector(self):
+        x0 = np.array([-100.0, 0.2])
+        jac_diff_2 = approx_derivative(self.fun_vector_vector, x0,
+                                       method='2-point',
+                                       as_linear_operator=True)
+        jac_diff_3 = approx_derivative(self.fun_vector_vector, x0,
+                                       as_linear_operator=True)
+        jac_diff_4 = approx_derivative(self.fun_vector_vector, x0,
+                                       method='cs',
+                                       as_linear_operator=True)
+        jac_true = self.jac_vector_vector(x0)
+        np.random.seed(1)
+        for i in range(10):
+            p = np.random.uniform(-10, 10, size=x0.shape)
+            assert_allclose(jac_diff_2.dot(p), jac_true.dot(p), rtol=1e-5)
+            assert_allclose(jac_diff_3.dot(p), jac_true.dot(p), rtol=1e-6)
+            assert_allclose(jac_diff_4.dot(p), jac_true.dot(p), rtol=1e-7)
+
+    def test_exception(self):
+        x0 = np.array([-100.0, 0.2])
+        assert_raises(ValueError, approx_derivative,
+                      self.fun_vector_vector, x0,
+                      method='2-point', bounds=(1, np.inf))
+
+
+def test_absolute_step_sign():
+    # test for gh12487
+    # if an absolute step is specified for 2-point differences make sure that
+    # the side corresponds to the step. i.e. if step is positive then forward
+    # differences should be used, if step is negative then backwards
+    # differences should be used.
+
+    # function has double discontinuity at x = [-1, -1]
+    # first component is \/, second component is /\
+    def f(x):
+        return -np.abs(x[0] + 1) + np.abs(x[1] + 1)
+
+    # check that the forward difference is used
+    grad = approx_derivative(f, [-1, -1], method='2-point', abs_step=1e-8)
+    assert_allclose(grad, [-1.0, 1.0])
+
+    # check that the backwards difference is used
+    grad = approx_derivative(f, [-1, -1], method='2-point', abs_step=-1e-8)
+    assert_allclose(grad, [1.0, -1.0])
+
+    # check that the forwards difference is used with a step for both
+    # parameters
+    grad = approx_derivative(
+        f, [-1, -1], method='2-point', abs_step=[1e-8, 1e-8]
+    )
+    assert_allclose(grad, [-1.0, 1.0])
+
+    # check that we can mix forward/backwards steps.
+    grad = approx_derivative(
+        f, [-1, -1], method='2-point', abs_step=[1e-8, -1e-8]
+     )
+    assert_allclose(grad, [-1.0, -1.0])
+    grad = approx_derivative(
+        f, [-1, -1], method='2-point', abs_step=[-1e-8, 1e-8]
+    )
+    assert_allclose(grad, [1.0, 1.0])
+
+    # the forward step should reverse to a backwards step if it runs into a
+    # bound
+    # This is kind of tested in TestAdjustSchemeToBounds, but only for a lower level
+    # function.
+    grad = approx_derivative(
+        f, [-1, -1], method='2-point', abs_step=1e-8,
+        bounds=(-np.inf, -1)
+    )
+    assert_allclose(grad, [1.0, -1.0])
+
+    grad = approx_derivative(
+        f, [-1, -1], method='2-point', abs_step=-1e-8, bounds=(-1, np.inf)
+    )
+    assert_allclose(grad, [-1.0, 1.0])
+
+
+def test__compute_absolute_step():
+    # tests calculation of absolute step from rel_step
+    methods = ['2-point', '3-point', 'cs']
+
+    x0 = np.array([1e-5, 0, 1, 1e5])
+
+    EPS = np.finfo(np.float64).eps
+    relative_step = {
+        "2-point": EPS**0.5,
+        "3-point": EPS**(1/3),
+        "cs": EPS**0.5
+    }
+    f0 = np.array(1.0)
+
+    for method in methods:
+        rel_step = relative_step[method]
+        correct_step = np.array([rel_step,
+                                 rel_step * 1.,
+                                 rel_step * 1.,
+                                 rel_step * np.abs(x0[3])])
+
+        abs_step = _compute_absolute_step(None, x0, f0, method)
+        assert_allclose(abs_step, correct_step)
+
+        sign_x0 = (-x0 >= 0).astype(float) * 2 - 1
+        abs_step = _compute_absolute_step(None, -x0, f0, method)
+        assert_allclose(abs_step, sign_x0 * correct_step)
+
+    # if a relative step is provided it should be used
+    rel_step = np.array([0.1, 1, 10, 100])
+    correct_step = np.array([rel_step[0] * x0[0],
+                             relative_step['2-point'],
+                             rel_step[2] * 1.,
+                             rel_step[3] * np.abs(x0[3])])
+
+    abs_step = _compute_absolute_step(rel_step, x0, f0, '2-point')
+    assert_allclose(abs_step, correct_step)
+
+    sign_x0 = (-x0 >= 0).astype(float) * 2 - 1
+    abs_step = _compute_absolute_step(rel_step, -x0, f0, '2-point')
+    assert_allclose(abs_step, sign_x0 * correct_step)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__remove_redundancy.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__remove_redundancy.py
new file mode 100644
index 0000000000000000000000000000000000000000..817282011699dea333042a4173f65c999a2925fc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__remove_redundancy.py
@@ -0,0 +1,228 @@
+"""
+Unit test for Linear Programming via Simplex Algorithm.
+"""
+
+# TODO: add tests for:
+# https://github.com/scipy/scipy/issues/5400
+# https://github.com/scipy/scipy/issues/6690
+
+import numpy as np
+from numpy.testing import (
+    assert_,
+    assert_allclose,
+    assert_equal)
+
+from .test_linprog import magic_square
+from scipy.optimize._remove_redundancy import _remove_redundancy_svd
+from scipy.optimize._remove_redundancy import _remove_redundancy_pivot_dense
+from scipy.optimize._remove_redundancy import _remove_redundancy_pivot_sparse
+from scipy.optimize._remove_redundancy import _remove_redundancy_id
+
+from scipy.sparse import csc_matrix
+
+
+def setup_module():
+    np.random.seed(2017)
+
+
+def redundancy_removed(A, B):
+    """Checks whether a matrix contains only independent rows of another"""
+    for rowA in A:
+        # `rowA in B` is not a reliable check
+        for rowB in B:
+            if np.all(rowA == rowB):
+                break
+        else:
+            return False
+    return A.shape[0] == np.linalg.matrix_rank(A) == np.linalg.matrix_rank(B)
+
+
+class RRCommonTests:
+    def test_no_redundancy(self):
+        m, n = 10, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_allclose(A0, A1)
+        assert_allclose(b0, b1)
+        assert_equal(status, 0)
+
+    def test_infeasible_zero_row(self):
+        A = np.eye(3)
+        A[1, :] = 0
+        b = np.random.rand(3)
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 2)
+
+    def test_remove_zero_row(self):
+        A = np.eye(3)
+        A[1, :] = 0
+        b = np.random.rand(3)
+        b[1] = 0
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_allclose(A1, A[[0, 2], :])
+        assert_allclose(b1, b[[0, 2]])
+
+    def test_infeasible_m_gt_n(self):
+        m, n = 20, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 2)
+
+    def test_infeasible_m_eq_n(self):
+        m, n = 10, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        A0[-1, :] = 2 * A0[-2, :]
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 2)
+
+    def test_infeasible_m_lt_n(self):
+        m, n = 9, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        A0[-1, :] = np.arange(m - 1).dot(A0[:-1])
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 2)
+
+    def test_m_gt_n(self):
+        np.random.seed(2032)
+        m, n = 20, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        x = np.linalg.solve(A0[:n, :], b0[:n])
+        b0[n:] = A0[n:, :].dot(x)
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], n)
+        assert_equal(np.linalg.matrix_rank(A1), n)
+
+    def test_m_gt_n_rank_deficient(self):
+        m, n = 20, 10
+        A0 = np.zeros((m, n))
+        A0[:, 0] = 1
+        b0 = np.ones(m)
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 0)
+        assert_allclose(A1, A0[0:1, :])
+        assert_allclose(b1, b0[0])
+
+    def test_m_lt_n_rank_deficient(self):
+        m, n = 9, 10
+        A0 = np.random.rand(m, n)
+        b0 = np.random.rand(m)
+        A0[-1, :] = np.arange(m - 1).dot(A0[:-1])
+        b0[-1] = np.arange(m - 1).dot(b0[:-1])
+        A1, b1, status, message = self.rr(A0, b0)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], 8)
+        assert_equal(np.linalg.matrix_rank(A1), 8)
+
+    def test_dense1(self):
+        A = np.ones((6, 6))
+        A[0, :3] = 0
+        A[1, 3:] = 0
+        A[3:, ::2] = -1
+        A[3, :2] = 0
+        A[4, 2:] = 0
+        b = np.zeros(A.shape[0])
+
+        A1, b1, status, message = self.rr(A, b)
+        assert_(redundancy_removed(A1, A))
+        assert_equal(status, 0)
+
+    def test_dense2(self):
+        A = np.eye(6)
+        A[-2, -1] = 1
+        A[-1, :] = 1
+        b = np.zeros(A.shape[0])
+        A1, b1, status, message = self.rr(A, b)
+        assert_(redundancy_removed(A1, A))
+        assert_equal(status, 0)
+
+    def test_dense3(self):
+        A = np.eye(6)
+        A[-2, -1] = 1
+        A[-1, :] = 1
+        b = np.random.rand(A.shape[0])
+        b[-1] = np.sum(b[:-1])
+        A1, b1, status, message = self.rr(A, b)
+        assert_(redundancy_removed(A1, A))
+        assert_equal(status, 0)
+
+    def test_m_gt_n_sparse(self):
+        np.random.seed(2013)
+        m, n = 20, 5
+        p = 0.1
+        A = np.random.rand(m, n)
+        A[np.random.rand(m, n) > p] = 0
+        rank = np.linalg.matrix_rank(A)
+        b = np.zeros(A.shape[0])
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], rank)
+        assert_equal(np.linalg.matrix_rank(A1), rank)
+
+    def test_m_lt_n_sparse(self):
+        np.random.seed(2017)
+        m, n = 20, 50
+        p = 0.05
+        A = np.random.rand(m, n)
+        A[np.random.rand(m, n) > p] = 0
+        rank = np.linalg.matrix_rank(A)
+        b = np.zeros(A.shape[0])
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], rank)
+        assert_equal(np.linalg.matrix_rank(A1), rank)
+
+    def test_m_eq_n_sparse(self):
+        np.random.seed(2017)
+        m, n = 100, 100
+        p = 0.01
+        A = np.random.rand(m, n)
+        A[np.random.rand(m, n) > p] = 0
+        rank = np.linalg.matrix_rank(A)
+        b = np.zeros(A.shape[0])
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], rank)
+        assert_equal(np.linalg.matrix_rank(A1), rank)
+
+    def test_magic_square(self):
+        A, b, c, numbers, _ = magic_square(3)
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], 23)
+        assert_equal(np.linalg.matrix_rank(A1), 23)
+
+    def test_magic_square2(self):
+        A, b, c, numbers, _ = magic_square(4)
+        A1, b1, status, message = self.rr(A, b)
+        assert_equal(status, 0)
+        assert_equal(A1.shape[0], 39)
+        assert_equal(np.linalg.matrix_rank(A1), 39)
+
+
+class TestRRSVD(RRCommonTests):
+    def rr(self, A, b):
+        return _remove_redundancy_svd(A, b)
+
+
+class TestRRPivotDense(RRCommonTests):
+    def rr(self, A, b):
+        return _remove_redundancy_pivot_dense(A, b)
+
+
+class TestRRID(RRCommonTests):
+    def rr(self, A, b):
+        return _remove_redundancy_id(A, b)
+
+
+class TestRRPivotSparse(RRCommonTests):
+    def rr(self, A, b):
+        rr_res = _remove_redundancy_pivot_sparse(csc_matrix(A), b)
+        A1, b1, status, message = rr_res
+        return A1.toarray(), b1, status, message
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__root.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__root.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e2f45a10d3d976d02be18084d241adea8612b05
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__root.py
@@ -0,0 +1,124 @@
+"""
+Unit tests for optimization routines from _root.py.
+"""
+from numpy.testing import assert_, assert_equal
+import pytest
+from pytest import raises as assert_raises, warns as assert_warns
+import numpy as np
+
+from scipy.optimize import root
+
+
+class TestRoot:
+    def test_tol_parameter(self):
+        # Check that the minimize() tol= argument does something
+        def func(z):
+            x, y = z
+            return np.array([x**3 - 1, y**3 - 1])
+
+        def dfunc(z):
+            x, y = z
+            return np.array([[3*x**2, 0], [0, 3*y**2]])
+
+        for method in ['hybr', 'lm', 'broyden1', 'broyden2', 'anderson',
+                       'diagbroyden', 'krylov']:
+            if method in ('linearmixing', 'excitingmixing'):
+                # doesn't converge
+                continue
+
+            if method in ('hybr', 'lm'):
+                jac = dfunc
+            else:
+                jac = None
+
+            sol1 = root(func, [1.1,1.1], jac=jac, tol=1e-4, method=method)
+            sol2 = root(func, [1.1,1.1], jac=jac, tol=0.5, method=method)
+            msg = f"{method}: {func(sol1.x)} vs. {func(sol2.x)}"
+            assert_(sol1.success, msg)
+            assert_(sol2.success, msg)
+            assert_(abs(func(sol1.x)).max() < abs(func(sol2.x)).max(),
+                    msg)
+
+    def test_tol_norm(self):
+
+        def norm(x):
+            return abs(x[0])
+
+        for method in ['excitingmixing',
+                       'diagbroyden',
+                       'linearmixing',
+                       'anderson',
+                       'broyden1',
+                       'broyden2',
+                       'krylov']:
+
+            root(np.zeros_like, np.zeros(2), method=method,
+                options={"tol_norm": norm})
+
+    def test_minimize_scalar_coerce_args_param(self):
+        # GitHub issue #3503
+        def func(z, f=1):
+            x, y = z
+            return np.array([x**3 - 1, y**3 - f])
+        root(func, [1.1, 1.1], args=1.5)
+
+    def test_f_size(self):
+        # gh8320
+        # check that decreasing the size of the returned array raises an error
+        # and doesn't segfault
+        class fun:
+            def __init__(self):
+                self.count = 0
+
+            def __call__(self, x):
+                self.count += 1
+
+                if not (self.count % 5):
+                    ret = x[0] + 0.5 * (x[0] - x[1]) ** 3 - 1.0
+                else:
+                    ret = ([x[0] + 0.5 * (x[0] - x[1]) ** 3 - 1.0,
+                           0.5 * (x[1] - x[0]) ** 3 + x[1]])
+
+                return ret
+
+        F = fun()
+        with assert_raises(ValueError):
+            root(F, [0.1, 0.0], method='lm')
+
+    @pytest.mark.thread_unsafe
+    def test_gh_10370(self):
+        # gh-10370 reported that passing both `args` and `jac` to `root` with
+        # `method='krylov'` caused a failure. Ensure that this is fixed whether
+        # the gradient is passed via `jac` or as a second output of `fun`.
+        def fun(x, ignored):
+            return [3*x[0] - 0.25*x[1]**2 + 10, 0.1*x[0]**2 + 5*x[1] - 2]
+
+        def grad(x, ignored):
+            return [[3, 0.5 * x[1]], [0.2 * x[0], 5]]
+
+        def fun_grad(x, ignored):
+            return fun(x, ignored), grad(x, ignored)
+
+        x0 = np.zeros(2)
+
+        ref = root(fun, x0, args=(1,), method='krylov')
+        message = 'Method krylov does not use the jacobian'
+        with assert_warns(RuntimeWarning, match=message):
+            res1 = root(fun, x0, args=(1,), method='krylov', jac=grad)
+        with assert_warns(RuntimeWarning, match=message):
+            res2 = root(fun_grad, x0, args=(1,), method='krylov', jac=True)
+
+        assert_equal(res1.x, ref.x)
+        assert_equal(res2.x, ref.x)
+        assert res1.success is res2.success is ref.success is True
+
+    @pytest.mark.parametrize("method", ["hybr", "lm", "broyden1", "broyden2",
+                                        "anderson", "linearmixing",
+                                        "diagbroyden", "excitingmixing",
+                                        "krylov", "df-sane"])
+    def test_method_in_result(self, method):
+        def func(x):
+            return x - 1
+
+        res = root(func, x0=[1], method=method)
+        assert res.method == method
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__shgo.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__shgo.py
new file mode 100644
index 0000000000000000000000000000000000000000..82efb74beee92eacc75f64c6c705374fa5ada322
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__shgo.py
@@ -0,0 +1,1156 @@
+import logging
+import sys
+
+import numpy as np
+import time
+from multiprocessing import Pool
+from numpy.testing import assert_allclose, IS_PYPY
+import pytest
+from pytest import raises as assert_raises, warns
+from scipy.optimize import (shgo, Bounds, minimize_scalar, minimize, rosen,
+                            rosen_der, rosen_hess, NonlinearConstraint)
+from scipy.optimize._constraints import new_constraint_to_old
+from scipy.optimize._shgo import SHGO
+
+
+class StructTestFunction:
+    def __init__(self, bounds, expected_x, expected_fun=None,
+                 expected_xl=None, expected_funl=None):
+        self.bounds = bounds
+        self.expected_x = expected_x
+        self.expected_fun = expected_fun
+        self.expected_xl = expected_xl
+        self.expected_funl = expected_funl
+
+
+def wrap_constraints(g):
+    cons = []
+    if g is not None:
+        if not isinstance(g, (tuple, list)):
+            g = (g,)
+        else:
+            pass
+        for g in g:
+            cons.append({'type': 'ineq',
+                         'fun': g})
+        cons = tuple(cons)
+    else:
+        cons = None
+    return cons
+
+
+class StructTest1(StructTestFunction):
+    def f(self, x):
+        return x[0] ** 2 + x[1] ** 2
+
+    def g(x):
+        return -(np.sum(x, axis=0) - 6.0)
+
+    cons = wrap_constraints(g)
+
+
+test1_1 = StructTest1(bounds=[(-1, 6), (-1, 6)],
+                      expected_x=[0, 0])
+test1_2 = StructTest1(bounds=[(0, 1), (0, 1)],
+                      expected_x=[0, 0])
+test1_3 = StructTest1(bounds=[(None, None), (None, None)],
+                      expected_x=[0, 0])
+
+
+class StructTest2(StructTestFunction):
+    """
+    Scalar function with several minima to test all minimiser retrievals
+    """
+
+    def f(self, x):
+        return (x - 30) * np.sin(x)
+
+    def g(x):
+        return 58 - np.sum(x, axis=0)
+
+    cons = wrap_constraints(g)
+
+
+test2_1 = StructTest2(bounds=[(0, 60)],
+                      expected_x=[1.53567906],
+                      expected_fun=-28.44677132,
+                      # Important: test that funl return is in the correct
+                      # order
+                      expected_xl=np.array([[1.53567906],
+                                            [55.01782167],
+                                            [7.80894889],
+                                            [48.74797493],
+                                            [14.07445705],
+                                            [42.4913859],
+                                            [20.31743841],
+                                            [36.28607535],
+                                            [26.43039605],
+                                            [30.76371366]]),
+
+                      expected_funl=np.array([-28.44677132, -24.99785984,
+                                              -22.16855376, -18.72136195,
+                                              -15.89423937, -12.45154942,
+                                              -9.63133158, -6.20801301,
+                                              -3.43727232, -0.46353338])
+                      )
+
+test2_2 = StructTest2(bounds=[(0, 4.5)],
+                      expected_x=[1.53567906],
+                      expected_fun=[-28.44677132],
+                      expected_xl=np.array([[1.53567906]]),
+                      expected_funl=np.array([-28.44677132])
+                      )
+
+
+class StructTest3(StructTestFunction):
+    """
+    Hock and Schittkowski 18 problem (HS18). Hoch and Schittkowski (1981)
+    http://www.ai7.uni-bayreuth.de/test_problem_coll.pdf
+    Minimize: f = 0.01 * (x_1)**2 + (x_2)**2
+
+    Subject to: x_1 * x_2 - 25.0 >= 0,
+                (x_1)**2 + (x_2)**2 - 25.0 >= 0,
+                2 <= x_1 <= 50,
+                0 <= x_2 <= 50.
+
+    Approx. Answer:
+        f([(250)**0.5 , (2.5)**0.5]) = 5.0
+
+
+    """
+
+    # amended to test vectorisation of constraints
+    def f(self, x):
+        return 0.01 * (x[0]) ** 2 + (x[1]) ** 2
+
+    def g1(x):
+        return x[0] * x[1] - 25.0
+
+    def g2(x):
+        return x[0] ** 2 + x[1] ** 2 - 25.0
+
+    # g = (g1, g2)
+    # cons = wrap_constraints(g)
+
+    def g(x):
+        return x[0] * x[1] - 25.0, x[0] ** 2 + x[1] ** 2 - 25.0
+
+    # this checks that shgo can be sent new-style constraints
+    __nlc = NonlinearConstraint(g, 0, np.inf)
+    cons = (__nlc,)
+
+test3_1 = StructTest3(bounds=[(2, 50), (0, 50)],
+                      expected_x=[250 ** 0.5, 2.5 ** 0.5],
+                      expected_fun=5.0
+                      )
+
+
+class StructTest4(StructTestFunction):
+    """
+    Hock and Schittkowski 11 problem (HS11). Hoch and Schittkowski (1981)
+
+    NOTE: Did not find in original reference to HS collection, refer to
+          Henderson (2015) problem 7 instead. 02.03.2016
+    """
+
+    def f(self, x):
+        return ((x[0] - 10) ** 2 + 5 * (x[1] - 12) ** 2 + x[2] ** 4
+                + 3 * (x[3] - 11) ** 2 + 10 * x[4] ** 6 + 7 * x[5] ** 2 + x[
+                    6] ** 4
+                - 4 * x[5] * x[6] - 10 * x[5] - 8 * x[6]
+                )
+
+    def g1(x):
+        return -(2 * x[0] ** 2 + 3 * x[1] ** 4 + x[2] + 4 * x[3] ** 2
+                 + 5 * x[4] - 127)
+
+    def g2(x):
+        return -(7 * x[0] + 3 * x[1] + 10 * x[2] ** 2 + x[3] - x[4] - 282.0)
+
+    def g3(x):
+        return -(23 * x[0] + x[1] ** 2 + 6 * x[5] ** 2 - 8 * x[6] - 196)
+
+    def g4(x):
+        return -(4 * x[0] ** 2 + x[1] ** 2 - 3 * x[0] * x[1] + 2 * x[2] ** 2
+                 + 5 * x[5] - 11 * x[6])
+
+    g = (g1, g2, g3, g4)
+
+    cons = wrap_constraints(g)
+
+
+test4_1 = StructTest4(bounds=[(-10, 10), ] * 7,
+                      expected_x=[2.330499, 1.951372, -0.4775414,
+                                  4.365726, -0.6244870, 1.038131, 1.594227],
+                      expected_fun=680.6300573
+                      )
+
+
+class StructTest5(StructTestFunction):
+    def f(self, x):
+        return (
+            -(x[1] + 47.0)*np.sin(np.sqrt(abs(x[0]/2.0 + (x[1] + 47.0))))
+            - x[0]*np.sin(np.sqrt(abs(x[0] - (x[1] + 47.0))))
+        )
+
+    g = None
+    cons = wrap_constraints(g)
+
+
+test5_1 = StructTest5(bounds=[(-512, 512), (-512, 512)],
+                      expected_fun=[-959.64066272085051],
+                      expected_x=[512., 404.23180542])
+
+
+class StructTestLJ(StructTestFunction):
+    """
+    LennardJones objective function. Used to test symmetry constraints
+    settings.
+    """
+
+    def f(self, x, *args):
+        print(f'x = {x}')
+        self.N = args[0]
+        k = int(self.N / 3)
+        s = 0.0
+
+        for i in range(k - 1):
+            for j in range(i + 1, k):
+                a = 3 * i
+                b = 3 * j
+                xd = x[a] - x[b]
+                yd = x[a + 1] - x[b + 1]
+                zd = x[a + 2] - x[b + 2]
+                ed = xd * xd + yd * yd + zd * zd
+                ud = ed * ed * ed
+                if ed > 0.0:
+                    s += (1.0 / ud - 2.0) / ud
+
+        return s
+
+    g = None
+    cons = wrap_constraints(g)
+
+
+N = 6
+boundsLJ = list(zip([-4.0] * 6, [4.0] * 6))
+
+testLJ = StructTestLJ(bounds=boundsLJ,
+                      expected_fun=[-1.0],
+                      expected_x=None,
+                      # expected_x=[-2.71247337e-08,
+                      #            -2.71247337e-08,
+                      #            -2.50000222e+00,
+                      #            -2.71247337e-08,
+                      #            -2.71247337e-08,
+                      #            -1.50000222e+00]
+                      )
+
+
+class StructTestS(StructTestFunction):
+    def f(self, x):
+        return ((x[0] - 0.5) ** 2 + (x[1] - 0.5) ** 2
+                + (x[2] - 0.5) ** 2 + (x[3] - 0.5) ** 2)
+
+    g = None
+    cons = wrap_constraints(g)
+
+
+test_s = StructTestS(bounds=[(0, 2.0), ] * 4,
+                     expected_fun=0.0,
+                     expected_x=np.ones(4) - 0.5
+                     )
+
+
+class StructTestTable(StructTestFunction):
+    def f(self, x):
+        if x[0] == 3.0 and x[1] == 3.0:
+            return 50
+        else:
+            return 100
+
+    g = None
+    cons = wrap_constraints(g)
+
+
+test_table = StructTestTable(bounds=[(-10, 10), (-10, 10)],
+                             expected_fun=[50],
+                             expected_x=[3.0, 3.0])
+
+
+class StructTestInfeasible(StructTestFunction):
+    """
+    Test function with no feasible domain.
+    """
+
+    def f(self, x, *args):
+        return x[0] ** 2 + x[1] ** 2
+
+    def g1(x):
+        return x[0] + x[1] - 1
+
+    def g2(x):
+        return -(x[0] + x[1] - 1)
+
+    def g3(x):
+        return -x[0] + x[1] - 1
+
+    def g4(x):
+        return -(-x[0] + x[1] - 1)
+
+    g = (g1, g2, g3, g4)
+    cons = wrap_constraints(g)
+
+
+test_infeasible = StructTestInfeasible(bounds=[(2, 50), (-1, 1)],
+                                       expected_fun=None,
+                                       expected_x=None
+                                       )
+
+
+@pytest.mark.skip("Not a test")
+def run_test(test, args=(), test_atol=1e-5, n=100, iters=None,
+             callback=None, minimizer_kwargs=None, options=None,
+             sampling_method='sobol', workers=1):
+    res = shgo(test.f, test.bounds, args=args, constraints=test.cons,
+               n=n, iters=iters, callback=callback,
+               minimizer_kwargs=minimizer_kwargs, options=options,
+               sampling_method=sampling_method, workers=workers)
+
+    print(f'res = {res}')
+    logging.info(f'res = {res}')
+    if test.expected_x is not None:
+        np.testing.assert_allclose(res.x, test.expected_x,
+                                   rtol=test_atol,
+                                   atol=test_atol)
+
+    # (Optional tests)
+    if test.expected_fun is not None:
+        np.testing.assert_allclose(res.fun,
+                                   test.expected_fun,
+                                   atol=test_atol)
+
+    if test.expected_xl is not None:
+        np.testing.assert_allclose(res.xl,
+                                   test.expected_xl,
+                                   atol=test_atol)
+
+    if test.expected_funl is not None:
+        np.testing.assert_allclose(res.funl,
+                                   test.expected_funl,
+                                   atol=test_atol)
+    return
+
+
+# Base test functions:
+class TestShgoSobolTestFunctions:
+    """
+    Global optimisation tests with Sobol sampling:
+    """
+
+    # Sobol algorithm
+    def test_f1_1_sobol(self):
+        """Multivariate test function 1:
+        x[0]**2 + x[1]**2 with bounds=[(-1, 6), (-1, 6)]"""
+        run_test(test1_1)
+
+    def test_f1_2_sobol(self):
+        """Multivariate test function 1:
+         x[0]**2 + x[1]**2 with bounds=[(0, 1), (0, 1)]"""
+        run_test(test1_2)
+
+    def test_f1_3_sobol(self):
+        """Multivariate test function 1:
+        x[0]**2 + x[1]**2 with bounds=[(None, None),(None, None)]"""
+        options = {'disp': True}
+        run_test(test1_3, options=options)
+
+    def test_f2_1_sobol(self):
+        """Univariate test function on
+        f(x) = (x - 30) * sin(x) with bounds=[(0, 60)]"""
+        run_test(test2_1)
+
+    def test_f2_2_sobol(self):
+        """Univariate test function on
+        f(x) = (x - 30) * sin(x) bounds=[(0, 4.5)]"""
+        run_test(test2_2)
+
+    def test_f3_sobol(self):
+        """NLP: Hock and Schittkowski problem 18"""
+        run_test(test3_1)
+
+    @pytest.mark.slow
+    def test_f4_sobol(self):
+        """NLP: (High dimensional) Hock and Schittkowski 11 problem (HS11)"""
+        options = {'infty_constraints': False}
+        # run_test(test4_1, n=990, options=options)
+        run_test(test4_1, n=990 * 2, options=options)
+
+    def test_f5_1_sobol(self):
+        """NLP: Eggholder, multimodal"""
+        # run_test(test5_1, n=30)
+        run_test(test5_1, n=60)
+
+    def test_f5_2_sobol(self):
+        """NLP: Eggholder, multimodal"""
+        # run_test(test5_1, n=60, iters=5)
+        run_test(test5_1, n=60, iters=5)
+
+        # def test_t911(self):
+        #    """1D tabletop function"""
+        #    run_test(test11_1)
+
+
+class TestShgoSimplicialTestFunctions:
+    """
+    Global optimisation tests with Simplicial sampling:
+    """
+
+    def test_f1_1_simplicial(self):
+        """Multivariate test function 1:
+        x[0]**2 + x[1]**2 with bounds=[(-1, 6), (-1, 6)]"""
+        run_test(test1_1, n=1, sampling_method='simplicial')
+
+    def test_f1_2_simplicial(self):
+        """Multivariate test function 1:
+        x[0]**2 + x[1]**2 with bounds=[(0, 1), (0, 1)]"""
+        run_test(test1_2, n=1, sampling_method='simplicial')
+
+    def test_f1_3_simplicial(self):
+        """Multivariate test function 1: x[0]**2 + x[1]**2
+        with bounds=[(None, None),(None, None)]"""
+        run_test(test1_3, n=5, sampling_method='simplicial')
+
+    def test_f2_1_simplicial(self):
+        """Univariate test function on
+        f(x) = (x - 30) * sin(x) with bounds=[(0, 60)]"""
+        options = {'minimize_every_iter': False}
+        run_test(test2_1, n=200, iters=7, options=options,
+                 sampling_method='simplicial')
+
+    def test_f2_2_simplicial(self):
+        """Univariate test function on
+        f(x) = (x - 30) * sin(x) bounds=[(0, 4.5)]"""
+        run_test(test2_2, n=1, sampling_method='simplicial')
+
+    def test_f3_simplicial(self):
+        """NLP: Hock and Schittkowski problem 18"""
+        run_test(test3_1, n=1, sampling_method='simplicial')
+
+    @pytest.mark.slow
+    def test_f4_simplicial(self):
+        """NLP: (High dimensional) Hock and Schittkowski 11 problem (HS11)"""
+        run_test(test4_1, n=1, sampling_method='simplicial')
+
+    def test_lj_symmetry_old(self):
+        """LJ: Symmetry-constrained test function"""
+        options = {'symmetry': True,
+                   'disp': True}
+        args = (6,)  # Number of atoms
+        run_test(testLJ, args=args, n=300,
+                 options=options, iters=1,
+                 sampling_method='simplicial')
+
+    def test_f5_1_lj_symmetry(self):
+        """LJ: Symmetry constrained test function"""
+        options = {'symmetry': [0, ] * 6,
+                   'disp': True}
+        args = (6,)  # No. of atoms
+
+        run_test(testLJ, args=args, n=300,
+                 options=options, iters=1,
+                 sampling_method='simplicial')
+
+    def test_f5_2_cons_symmetry(self):
+        """Symmetry constrained test function"""
+        options = {'symmetry': [0, 0],
+                   'disp': True}
+
+        run_test(test1_1, n=200,
+                 options=options, iters=1,
+                 sampling_method='simplicial')
+
+    @pytest.mark.fail_slow(10)
+    def test_f5_3_cons_symmetry(self):
+        """Asymmetrically constrained test function"""
+        options = {'symmetry': [0, 0, 0, 3],
+                   'disp': True}
+
+        run_test(test_s, n=10000,
+                 options=options,
+                 iters=1,
+                 sampling_method='simplicial')
+
+    @pytest.mark.skip("Not a test")
+    def test_f0_min_variance(self):
+        """Return a minimum on a perfectly symmetric problem, based on
+            gh10429"""
+        avg = 0.5  # Given average value of x
+        cons = {'type': 'eq', 'fun': lambda x: np.mean(x) - avg}
+
+        # Minimize the variance of x under the given constraint
+        res = shgo(np.var, bounds=6 * [(0, 1)], constraints=cons)
+        assert res.success
+        assert_allclose(res.fun, 0, atol=1e-15)
+        assert_allclose(res.x, 0.5)
+
+    @pytest.mark.skip("Not a test")
+    def test_f0_min_variance_1D(self):
+        """Return a minimum on a perfectly symmetric 1D problem, based on
+            gh10538"""
+
+        def fun(x):
+            return x * (x - 1.0) * (x - 0.5)
+
+        bounds = [(0, 1)]
+        res = shgo(fun, bounds=bounds)
+        ref = minimize_scalar(fun, bounds=bounds[0])
+        assert res.success
+        assert_allclose(res.fun, ref.fun)
+        assert_allclose(res.x, ref.x, rtol=1e-6)
+
+# Argument test functions
+class TestShgoArguments:
+    def test_1_1_simpl_iter(self):
+        """Iterative simplicial sampling on TestFunction 1 (multivariate)"""
+        run_test(test1_2, n=None, iters=2, sampling_method='simplicial')
+
+    def test_1_2_simpl_iter(self):
+        """Iterative simplicial on TestFunction 2 (univariate)"""
+        options = {'minimize_every_iter': False}
+        run_test(test2_1, n=None, iters=9, options=options,
+                 sampling_method='simplicial')
+
+    def test_2_1_sobol_iter(self):
+        """Iterative Sobol sampling on TestFunction 1 (multivariate)"""
+        run_test(test1_2, n=None, iters=1, sampling_method='sobol')
+
+    def test_2_2_sobol_iter(self):
+        """Iterative Sobol sampling on TestFunction 2 (univariate)"""
+        res = shgo(test2_1.f, test2_1.bounds, constraints=test2_1.cons,
+                   n=None, iters=1, sampling_method='sobol')
+
+        np.testing.assert_allclose(res.x, test2_1.expected_x, rtol=1e-5, atol=1e-5)
+        np.testing.assert_allclose(res.fun, test2_1.expected_fun, atol=1e-5)
+
+    def test_3_1_disp_simplicial(self):
+        """Iterative sampling on TestFunction 1 and 2  (multi and univariate)
+        """
+
+        def callback_func(x):
+            print("Local minimization callback test")
+
+        for test in [test1_1, test2_1]:
+            shgo(test.f, test.bounds, iters=1,
+                 sampling_method='simplicial',
+                 callback=callback_func, options={'disp': True})
+            shgo(test.f, test.bounds, n=1, sampling_method='simplicial',
+                 callback=callback_func, options={'disp': True})
+
+    def test_3_2_disp_sobol(self):
+        """Iterative sampling on TestFunction 1 and 2 (multi and univariate)"""
+
+        def callback_func(x):
+            print("Local minimization callback test")
+
+        for test in [test1_1, test2_1]:
+            shgo(test.f, test.bounds, iters=1, sampling_method='sobol',
+                 callback=callback_func, options={'disp': True})
+
+            shgo(test.f, test.bounds, n=1, sampling_method='simplicial',
+                 callback=callback_func, options={'disp': True})
+
+    def test_args_gh14589(self):
+        """Using `args` used to cause `shgo` to fail; see #14589, #15986,
+        #16506"""
+        res = shgo(func=lambda x, y, z: x * z + y, bounds=[(0, 3)], args=(1, 2)
+                   )
+        ref = shgo(func=lambda x: 2 * x + 1, bounds=[(0, 3)])
+        assert_allclose(res.fun, ref.fun)
+        assert_allclose(res.x, ref.x)
+
+    @pytest.mark.slow
+    def test_4_1_known_f_min(self):
+        """Test known function minima stopping criteria"""
+        # Specify known function value
+        options = {'f_min': test4_1.expected_fun,
+                   'f_tol': 1e-6,
+                   'minimize_every_iter': True}
+        # TODO: Make default n higher for faster tests
+        run_test(test4_1, n=None, test_atol=1e-5, options=options,
+                 sampling_method='simplicial')
+
+    @pytest.mark.slow
+    def test_4_2_known_f_min(self):
+        """Test Global mode limiting local evaluations"""
+        options = {  # Specify known function value
+            'f_min': test4_1.expected_fun,
+            'f_tol': 1e-6,
+            # Specify number of local iterations to perform
+            'minimize_every_iter': True,
+            'local_iter': 1}
+
+        run_test(test4_1, n=None, test_atol=1e-5, options=options,
+                 sampling_method='simplicial')
+
+    def test_4_4_known_f_min(self):
+        """Test Global mode limiting local evaluations for 1D funcs"""
+        options = {  # Specify known function value
+            'f_min': test2_1.expected_fun,
+            'f_tol': 1e-6,
+            # Specify number of local iterations to perform+
+            'minimize_every_iter': True,
+            'local_iter': 1,
+            'infty_constraints': False}
+
+        res = shgo(test2_1.f, test2_1.bounds, constraints=test2_1.cons,
+                   n=None, iters=None, options=options,
+                   sampling_method='sobol')
+        np.testing.assert_allclose(res.x, test2_1.expected_x, rtol=1e-5, atol=1e-5)
+
+    def test_5_1_simplicial_argless(self):
+        """Test Default simplicial sampling settings on TestFunction 1"""
+        res = shgo(test1_1.f, test1_1.bounds, constraints=test1_1.cons)
+        np.testing.assert_allclose(res.x, test1_1.expected_x, rtol=1e-5, atol=1e-5)
+
+    def test_5_2_sobol_argless(self):
+        """Test Default sobol sampling settings on TestFunction 1"""
+        res = shgo(test1_1.f, test1_1.bounds, constraints=test1_1.cons,
+                   sampling_method='sobol')
+        np.testing.assert_allclose(res.x, test1_1.expected_x, rtol=1e-5, atol=1e-5)
+
+    def test_6_1_simplicial_max_iter(self):
+        """Test that maximum iteration option works on TestFunction 3"""
+        options = {'max_iter': 2}
+        res = shgo(test3_1.f, test3_1.bounds, constraints=test3_1.cons,
+                   options=options, sampling_method='simplicial')
+        np.testing.assert_allclose(res.x, test3_1.expected_x, rtol=1e-5, atol=1e-5)
+        np.testing.assert_allclose(res.fun, test3_1.expected_fun, atol=1e-5)
+
+    def test_6_2_simplicial_min_iter(self):
+        """Test that maximum iteration option works on TestFunction 3"""
+        options = {'min_iter': 2}
+        res = shgo(test3_1.f, test3_1.bounds, constraints=test3_1.cons,
+                   options=options, sampling_method='simplicial')
+        np.testing.assert_allclose(res.x, test3_1.expected_x, rtol=1e-5, atol=1e-5)
+        np.testing.assert_allclose(res.fun, test3_1.expected_fun, atol=1e-5)
+
+    def test_7_1_minkwargs(self):
+        """Test the minimizer_kwargs arguments for solvers with constraints"""
+        # Test solvers
+        for solver in ['COBYLA', 'COBYQA', 'SLSQP']:
+            # Note that passing global constraints to SLSQP is tested in other
+            # unittests which run test4_1 normally
+            minimizer_kwargs = {'method': solver,
+                                'constraints': test3_1.cons}
+            run_test(test3_1, n=100, test_atol=1e-3,
+                     minimizer_kwargs=minimizer_kwargs,
+                     sampling_method='sobol')
+
+    def test_7_2_minkwargs(self):
+        """Test the minimizer_kwargs default inits"""
+        minimizer_kwargs = {'ftol': 1e-5}
+        options = {'disp': True}  # For coverage purposes
+        SHGO(test3_1.f, test3_1.bounds, constraints=test3_1.cons[0],
+             minimizer_kwargs=minimizer_kwargs, options=options)
+
+    def test_7_3_minkwargs(self):
+        """Test minimizer_kwargs arguments for solvers without constraints"""
+        for solver in ['Nelder-Mead', 'Powell', 'CG', 'BFGS', 'Newton-CG',
+                       'L-BFGS-B', 'TNC', 'dogleg', 'trust-ncg', 'trust-exact',
+                       'trust-krylov']:
+            def jac(x):
+                return np.array([2 * x[0], 2 * x[1]]).T
+
+            def hess(x):
+                return np.array([[2, 0], [0, 2]])
+
+            minimizer_kwargs = {'method': solver,
+                                'jac': jac,
+                                'hess': hess}
+            logging.info(f"Solver = {solver}")
+            logging.info("=" * 100)
+            run_test(test1_1, n=100, test_atol=1e-3,
+                     minimizer_kwargs=minimizer_kwargs,
+                     sampling_method='sobol')
+
+    def test_8_homology_group_diff(self):
+        options = {'minhgrd': 1,
+                   'minimize_every_iter': True}
+
+        run_test(test1_1, n=None, iters=None, options=options,
+                 sampling_method='simplicial')
+
+    def test_9_cons_g(self):
+        """Test single function constraint passing"""
+        SHGO(test3_1.f, test3_1.bounds, constraints=test3_1.cons[0])
+
+    @pytest.mark.xfail(IS_PYPY and sys.platform == 'win32',
+            reason="Failing and fix in PyPy not planned (see gh-18632)")
+    def test_10_finite_time(self):
+        """Test single function constraint passing"""
+        options = {'maxtime': 1e-15}
+
+        def f(x):
+            time.sleep(1e-14)
+            return 0.0
+
+        res = shgo(f, test1_1.bounds, iters=5, options=options)
+        # Assert that only 1 rather than 5 requested iterations ran:
+        assert res.nit == 1
+
+    def test_11_f_min_0(self):
+        """Test to cover the case where f_lowest == 0"""
+        options = {'f_min': 0.0,
+                   'disp': True}
+        res = shgo(test1_2.f, test1_2.bounds, n=10, iters=None,
+                   options=options, sampling_method='sobol')
+        np.testing.assert_equal(0, res.x[0])
+        np.testing.assert_equal(0, res.x[1])
+
+    # @nottest
+    @pytest.mark.skip(reason="no way of currently testing this")
+    def test_12_sobol_inf_cons(self):
+        """Test to cover the case where f_lowest == 0"""
+        # TODO: This test doesn't cover anything new, it is unknown what the
+        # original test was intended for as it was never complete. Delete or
+        # replace in the future.
+        options = {'maxtime': 1e-15,
+                   'f_min': 0.0}
+        res = shgo(test1_2.f, test1_2.bounds, n=1, iters=None,
+                   options=options, sampling_method='sobol')
+        np.testing.assert_equal(0.0, res.fun)
+
+    def test_13_high_sobol(self):
+        """Test init of high-dimensional sobol sequences"""
+
+        def f(x):
+            return 0
+
+        bounds = [(None, None), ] * 41
+        SHGOc = SHGO(f, bounds, sampling_method='sobol')
+        # SHGOc.sobol_points(2, 50)
+        SHGOc.sampling_function(2, 50)
+
+    def test_14_local_iter(self):
+        """Test limited local iterations for a pseudo-global mode"""
+        options = {'local_iter': 4}
+        run_test(test5_1, n=60, options=options)
+
+    def test_15_min_every_iter(self):
+        """Test minimize every iter options and cover function cache"""
+        options = {'minimize_every_iter': True}
+        run_test(test1_1, n=1, iters=7, options=options,
+                 sampling_method='sobol')
+
+    def test_16_disp_bounds_minimizer(self, capsys):
+        """Test disp=True with minimizers that do not support bounds """
+        options = {'disp': True}
+        minimizer_kwargs = {'method': 'nelder-mead'}
+        run_test(test1_2, sampling_method='simplicial',
+                 options=options, minimizer_kwargs=minimizer_kwargs)
+
+    def test_17_custom_sampling(self):
+        """Test the functionality to add custom sampling methods to shgo"""
+
+        def sample(n, d):
+            return np.random.uniform(size=(n, d))
+
+        run_test(test1_1, n=30, sampling_method=sample)
+
+    def test_18_bounds_class(self):
+        # test that new and old bounds yield same result
+        def f(x):
+            return np.square(x).sum()
+
+        lb = [-6., 1., -5.]
+        ub = [-1., 3., 5.]
+        bounds_old = list(zip(lb, ub))
+        bounds_new = Bounds(lb, ub)
+
+        res_old_bounds = shgo(f, bounds_old)
+        res_new_bounds = shgo(f, bounds_new)
+
+        assert res_new_bounds.nfev == res_old_bounds.nfev
+        assert res_new_bounds.message == res_old_bounds.message
+        assert res_new_bounds.success == res_old_bounds.success
+        x_opt = np.array([-1., 1., 0.])
+        np.testing.assert_allclose(res_new_bounds.x, x_opt)
+        np.testing.assert_allclose(res_new_bounds.x, res_old_bounds.x)
+
+    @pytest.mark.fail_slow(10)
+    def test_19_parallelization(self):
+        """Test the functionality to add custom sampling methods to shgo"""
+
+        with Pool(2) as p:
+            run_test(test1_1, n=30, workers=p.map)  # Constrained
+        run_test(test1_1, n=30, workers=map)  # Constrained
+        with Pool(2) as p:
+            run_test(test_s, n=30, workers=p.map)  # Unconstrained
+        run_test(test_s, n=30, workers=map)  # Unconstrained
+
+    def test_20_constrained_args(self):
+        """Test that constraints can be passed to arguments"""
+
+        def eggholder(x):
+            return (
+                -(x[1] + 47.0)*np.sin(np.sqrt(abs(x[0] / 2.0 + (x[1] + 47.0))))
+                - x[0]*np.sin(np.sqrt(abs(x[0] - (x[1] + 47.0))))
+            )
+
+        def f(x):  # (cattle-feed)
+            return 24.55 * x[0] + 26.75 * x[1] + 39 * x[2] + 40.50 * x[3]
+
+        bounds = [(0, 1.0), ] * 4
+
+        def g1_modified(x, i):
+            return i * 2.3 * x[0] + i * 5.6 * x[1] + 11.1 * x[2] + 1.3 * x[
+                3] - 5  # >=0
+
+        def g2(x):
+            return (
+                12*x[0] + 11.9*x[1] + 41.8*x[2] + 52.1*x[3] - 21
+                - 1.645*np.sqrt(
+                    0.28*x[0]**2 + 0.19*x[1]**2 + 20.5*x[2]**2 + 0.62*x[3]**2
+                )
+            )  # >=0
+
+        def h1(x):
+            return x[0] + x[1] + x[2] + x[3] - 1  # == 0
+
+        cons = ({'type': 'ineq', 'fun': g1_modified, "args": (0,)},
+                {'type': 'ineq', 'fun': g2},
+                {'type': 'eq', 'fun': h1})
+
+        shgo(f, bounds, n=300, iters=1, constraints=cons)
+        # using constrain with arguments AND sampling method sobol
+        shgo(f, bounds, n=300, iters=1, constraints=cons,
+             sampling_method='sobol')
+
+    def test_21_1_jac_true(self):
+        """Test that shgo can handle objective functions that return the
+        gradient alongside the objective value. Fixes gh-13547"""
+        # previous
+        def func(x):
+            return np.sum(np.power(x, 2)), 2 * x
+
+        shgo(
+            func,
+            bounds=[[-1, 1], [1, 2]],
+            n=100, iters=5,
+            sampling_method="sobol",
+            minimizer_kwargs={'method': 'SLSQP', 'jac': True}
+        )
+
+        # new
+        def func(x):
+            return np.sum(x ** 2), 2 * x
+
+        bounds = [[-1, 1], [1, 2], [-1, 1], [1, 2], [0, 3]]
+
+        res = shgo(func, bounds=bounds, sampling_method="sobol",
+                   minimizer_kwargs={'method': 'SLSQP', 'jac': True})
+        ref = minimize(func, x0=[1, 1, 1, 1, 1], bounds=bounds,
+                       jac=True)
+        assert res.success
+        assert_allclose(res.fun, ref.fun)
+        assert_allclose(res.x, ref.x, atol=1e-15)
+
+    @pytest.mark.parametrize('derivative', ['jac', 'hess', 'hessp'])
+    def test_21_2_derivative_options(self, derivative):
+        """shgo used to raise an error when passing `options` with 'jac'
+        # see gh-12963. check that this is resolved
+        """
+
+        def objective(x):
+            return 3 * x[0] * x[0] + 2 * x[0] + 5
+
+        def gradient(x):
+            return 6 * x[0] + 2
+
+        def hess(x):
+            return 6
+
+        def hessp(x, p):
+            return 6 * p
+
+        derivative_funcs = {'jac': gradient, 'hess': hess, 'hessp': hessp}
+        options = {derivative: derivative_funcs[derivative]}
+        minimizer_kwargs = {'method': 'trust-constr'}
+
+        bounds = [(-100, 100)]
+        res = shgo(objective, bounds, minimizer_kwargs=minimizer_kwargs,
+                   options=options)
+        ref = minimize(objective, x0=[0], bounds=bounds, **minimizer_kwargs,
+                       **options)
+
+        assert res.success
+        np.testing.assert_allclose(res.fun, ref.fun)
+        np.testing.assert_allclose(res.x, ref.x)
+
+    def test_21_3_hess_options_rosen(self):
+        """Ensure the Hessian gets passed correctly to the local minimizer
+        routine. Previous report gh-14533.
+        """
+        bounds = [(0, 1.6), (0, 1.6), (0, 1.4), (0, 1.4), (0, 1.4)]
+        options = {'jac': rosen_der, 'hess': rosen_hess}
+        minimizer_kwargs = {'method': 'Newton-CG'}
+        res = shgo(rosen, bounds, minimizer_kwargs=minimizer_kwargs,
+                   options=options)
+        ref = minimize(rosen, np.zeros(5), method='Newton-CG',
+                       **options)
+        assert res.success
+        assert_allclose(res.fun, ref.fun)
+        assert_allclose(res.x, ref.x, atol=1e-15)
+
+    def test_21_arg_tuple_sobol(self):
+        """shgo used to raise an error when passing `args` with Sobol sampling
+        # see gh-12114. check that this is resolved"""
+
+        def fun(x, k):
+            return x[0] ** k
+
+        constraints = ({'type': 'ineq', 'fun': lambda x: x[0] - 1})
+
+        bounds = [(0, 10)]
+        res = shgo(fun, bounds, args=(1,), constraints=constraints,
+                   sampling_method='sobol')
+        ref = minimize(fun, np.zeros(1), bounds=bounds, args=(1,),
+                       constraints=constraints)
+        assert res.success
+        assert_allclose(res.fun, ref.fun)
+        assert_allclose(res.x, ref.x)
+
+
+# Failure test functions
+class TestShgoFailures:
+    def test_1_maxiter(self):
+        """Test failure on insufficient iterations"""
+        options = {'maxiter': 2}
+        res = shgo(test4_1.f, test4_1.bounds, n=2, iters=None,
+                   options=options, sampling_method='sobol')
+
+        np.testing.assert_equal(False, res.success)
+        # np.testing.assert_equal(4, res.nfev)
+        np.testing.assert_equal(4, res.tnev)
+
+    def test_2_sampling(self):
+        """Rejection of unknown sampling method"""
+        assert_raises(ValueError, shgo, test1_1.f, test1_1.bounds,
+                      sampling_method='not_Sobol')
+
+    def test_3_1_no_min_pool_sobol(self):
+        """Check that the routine stops when no minimiser is found
+           after maximum specified function evaluations"""
+        options = {'maxfev': 10,
+                   # 'maxev': 10,
+                   'disp': True}
+        res = shgo(test_table.f, test_table.bounds, n=3, options=options,
+                   sampling_method='sobol')
+        np.testing.assert_equal(False, res.success)
+        # np.testing.assert_equal(9, res.nfev)
+        np.testing.assert_equal(12, res.nfev)
+
+    def test_3_2_no_min_pool_simplicial(self):
+        """Check that the routine stops when no minimiser is found
+           after maximum specified sampling evaluations"""
+        options = {'maxev': 10,
+                   'disp': True}
+        res = shgo(test_table.f, test_table.bounds, n=3, options=options,
+                   sampling_method='simplicial')
+        np.testing.assert_equal(False, res.success)
+
+    def test_4_1_bound_err(self):
+        """Specified bounds ub > lb"""
+        bounds = [(6, 3), (3, 5)]
+        assert_raises(ValueError, shgo, test1_1.f, bounds)
+
+    def test_4_2_bound_err(self):
+        """Specified bounds are of the form (lb, ub)"""
+        bounds = [(3, 5, 5), (3, 5)]
+        assert_raises(ValueError, shgo, test1_1.f, bounds)
+
+    def test_5_1_1_infeasible_sobol(self):
+        """Ensures the algorithm terminates on infeasible problems
+           after maxev is exceeded. Use infty constraints option"""
+        options = {'maxev': 100,
+                   'disp': True}
+
+        res = shgo(test_infeasible.f, test_infeasible.bounds,
+                   constraints=test_infeasible.cons, n=100, options=options,
+                   sampling_method='sobol')
+
+        np.testing.assert_equal(False, res.success)
+
+    def test_5_1_2_infeasible_sobol(self):
+        """Ensures the algorithm terminates on infeasible problems
+           after maxev is exceeded. Do not use infty constraints option"""
+        options = {'maxev': 100,
+                   'disp': True,
+                   'infty_constraints': False}
+
+        res = shgo(test_infeasible.f, test_infeasible.bounds,
+                   constraints=test_infeasible.cons, n=100, options=options,
+                   sampling_method='sobol')
+
+        np.testing.assert_equal(False, res.success)
+
+    def test_5_2_infeasible_simplicial(self):
+        """Ensures the algorithm terminates on infeasible problems
+           after maxev is exceeded."""
+        options = {'maxev': 1000,
+                   'disp': False}
+
+        res = shgo(test_infeasible.f, test_infeasible.bounds,
+                   constraints=test_infeasible.cons, n=100, options=options,
+                   sampling_method='simplicial')
+
+        np.testing.assert_equal(False, res.success)
+
+    @pytest.mark.thread_unsafe
+    def test_6_1_lower_known_f_min(self):
+        """Test Global mode limiting local evaluations with f* too high"""
+        options = {  # Specify known function value
+            'f_min': test2_1.expected_fun + 2.0,
+            'f_tol': 1e-6,
+            # Specify number of local iterations to perform+
+            'minimize_every_iter': True,
+            'local_iter': 1,
+            'infty_constraints': False}
+        args = (test2_1.f, test2_1.bounds)
+        kwargs = {'constraints': test2_1.cons,
+                  'n': None,
+                  'iters': None,
+                  'options': options,
+                  'sampling_method': 'sobol'
+                  }
+        warns(UserWarning, shgo, *args, **kwargs)
+
+    def test(self):
+        from scipy.optimize import rosen, shgo
+        bounds = [(0, 2), (0, 2), (0, 2), (0, 2), (0, 2)]
+
+        def fun(x):
+            fun.nfev += 1
+            return rosen(x)
+
+        fun.nfev = 0
+
+        result = shgo(fun, bounds)
+        print(result.x, result.fun, fun.nfev)  # 50
+
+
+# Returns
+class TestShgoReturns:
+    def test_1_nfev_simplicial(self):
+        bounds = [(0, 2), (0, 2), (0, 2), (0, 2), (0, 2)]
+
+        def fun(x):
+            fun.nfev += 1
+            return rosen(x)
+
+        fun.nfev = 0
+
+        result = shgo(fun, bounds)
+        np.testing.assert_equal(fun.nfev, result.nfev)
+
+    def test_1_nfev_sobol(self):
+        bounds = [(0, 2), (0, 2), (0, 2), (0, 2), (0, 2)]
+
+        def fun(x):
+            fun.nfev += 1
+            return rosen(x)
+
+        fun.nfev = 0
+
+        result = shgo(fun, bounds, sampling_method='sobol')
+        np.testing.assert_equal(fun.nfev, result.nfev)
+
+
+def test_vector_constraint():
+    # gh15514
+    def quad(x):
+        x = np.asarray(x)
+        return [np.sum(x ** 2)]
+
+    nlc = NonlinearConstraint(quad, [2.2], [3])
+    oldc = new_constraint_to_old(nlc, np.array([1.0, 1.0]))
+
+    res = shgo(rosen, [(0, 10), (0, 10)], constraints=oldc, sampling_method='sobol')
+    assert np.all(np.sum((res.x)**2) >= 2.2)
+    assert np.all(np.sum((res.x) ** 2) <= 3.0)
+    assert res.success
+
+
+@pytest.mark.filterwarnings("ignore:delta_grad")
+def test_trust_constr():
+    def quad(x):
+        x = np.asarray(x)
+        return [np.sum(x ** 2)]
+
+    nlc = NonlinearConstraint(quad, [2.6], [3])
+    minimizer_kwargs = {'method': 'trust-constr'}
+    # note that we don't supply the constraints in minimizer_kwargs,
+    # so if the final result obeys the constraints we know that shgo
+    # passed them on to 'trust-constr'
+    res = shgo(
+        rosen,
+        [(0, 10), (0, 10)],
+        constraints=nlc,
+        sampling_method='sobol',
+        minimizer_kwargs=minimizer_kwargs
+    )
+    assert np.all(np.sum((res.x)**2) >= 2.6)
+    assert np.all(np.sum((res.x) ** 2) <= 3.0)
+    assert res.success
+
+
+def test_equality_constraints():
+    # gh16260
+    bounds = [(0.9, 4.0)] * 2  # Constrain probabilities to 0 and 1.
+
+    def faulty(x):
+        return x[0] + x[1]
+
+    nlc = NonlinearConstraint(faulty, 3.9, 3.9)
+    res = shgo(rosen, bounds=bounds, constraints=nlc)
+    assert_allclose(np.sum(res.x), 3.9)
+
+    def faulty(x):
+        return x[0] + x[1] - 3.9
+
+    constraints = {'type': 'eq', 'fun': faulty}
+    res = shgo(rosen, bounds=bounds, constraints=constraints)
+    assert_allclose(np.sum(res.x), 3.9)
+
+    bounds = [(0, 1.0)] * 4
+    # sum of variable should equal 1.
+    def faulty(x):
+        return x[0] + x[1] + x[2] + x[3] - 1
+
+    # options = {'minimize_every_iter': True, 'local_iter':10}
+    constraints = {'type': 'eq', 'fun': faulty}
+    res = shgo(
+        lambda x: - np.prod(x),
+        bounds=bounds,
+        constraints=constraints,
+        sampling_method='sobol'
+    )
+    assert_allclose(np.sum(res.x), 1.0)
+
+def test_gh16971():
+    def cons(x):
+        return np.sum(x**2) - 0
+
+    c = {'fun': cons, 'type': 'ineq'}
+    minimizer_kwargs = {
+        'method': 'COBYLA',
+        'options': {'rhobeg': 5, 'tol': 5e-1, 'catol': 0.05}
+    }
+
+    s = SHGO(
+        rosen, [(0, 10)]*2, constraints=c, minimizer_kwargs=minimizer_kwargs
+    )
+
+    assert s.minimizer_kwargs['method'].lower() == 'cobyla'
+    assert s.minimizer_kwargs['options']['catol'] == 0.05
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__spectral.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__spectral.py
new file mode 100644
index 0000000000000000000000000000000000000000..7b4dc52cc20caf0206fe53933d4dfc6d0fbb2c34
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test__spectral.py
@@ -0,0 +1,226 @@
+import itertools
+
+import numpy as np
+from numpy import exp
+from numpy.testing import assert_, assert_equal
+
+from scipy.optimize import root
+
+
+def test_performance():
+    # Compare performance results to those listed in
+    # [Cheng & Li, IMA J. Num. An. 29, 814 (2008)]
+    # and
+    # [W. La Cruz, J.M. Martinez, M. Raydan, Math. Comp. 75, 1429 (2006)].
+    # and those produced by dfsane.f from M. Raydan's website.
+    #
+    # Where the results disagree, the largest limits are taken.
+
+    e_a = 1e-5
+    e_r = 1e-4
+
+    table_1 = [
+        dict(F=F_1, x0=x0_1, n=1000, nit=5, nfev=5),
+        dict(F=F_1, x0=x0_1, n=10000, nit=2, nfev=2),
+        dict(F=F_2, x0=x0_2, n=500, nit=11, nfev=11),
+        dict(F=F_2, x0=x0_2, n=2000, nit=11, nfev=11),
+        # dict(F=F_4, x0=x0_4, n=999, nit=243, nfev=1188) removed:
+        # too sensitive to rounding errors
+        # Results from dfsane.f; papers list nit=3, nfev=3
+        dict(F=F_6, x0=x0_6, n=100, nit=6, nfev=6),
+        # Must have n%3==0, typo in papers?
+        dict(F=F_7, x0=x0_7, n=99, nit=23, nfev=29),
+        # Must have n%3==0, typo in papers?
+        dict(F=F_7, x0=x0_7, n=999, nit=23, nfev=29),
+        # Results from dfsane.f; papers list nit=nfev=6?
+        dict(F=F_9, x0=x0_9, n=100, nit=12, nfev=18),
+        dict(F=F_9, x0=x0_9, n=1000, nit=12, nfev=18),
+        # Results from dfsane.f; papers list nit=2, nfev=12
+        dict(F=F_10, x0=x0_10, n=1000, nit=5, nfev=5),
+    ]
+
+    # Check also scaling invariance
+    for xscale, yscale, line_search in itertools.product(
+        [1.0, 1e-10, 1e10], [1.0, 1e-10, 1e10], ['cruz', 'cheng']
+    ):
+        for problem in table_1:
+            n = problem['n']
+            def func(x, n):
+                return yscale * problem['F'](x / xscale, n)
+            args = (n,)
+            x0 = problem['x0'](n) * xscale
+
+            fatol = np.sqrt(n) * e_a * yscale + e_r * np.linalg.norm(func(x0, n))
+
+            sigma_eps = 1e-10 * min(yscale/xscale, xscale/yscale)
+            sigma_0 = xscale/yscale
+
+            with np.errstate(over='ignore'):
+                sol = root(func, x0, args=args,
+                           options=dict(ftol=0, fatol=fatol, maxfev=problem['nfev'] + 1,
+                                        sigma_0=sigma_0, sigma_eps=sigma_eps,
+                                        line_search=line_search),
+                           method='DF-SANE')
+
+            err_msg = repr(
+                [xscale, yscale, line_search, problem, np.linalg.norm(func(sol.x, n)),
+                 fatol, sol.success, sol.nit, sol.nfev]
+            )
+            assert sol.success, err_msg
+            # nfev+1: dfsane.f doesn't count first eval
+            assert sol.nfev <= problem['nfev'] + 1, err_msg
+            assert sol.nit <= problem['nit'], err_msg
+            assert np.linalg.norm(func(sol.x, n)) <= fatol, err_msg
+
+
+def test_complex():
+    def func(z):
+        return z**2 - 1 + 2j
+    x0 = 2.0j
+
+    ftol = 1e-4
+    sol = root(func, x0, tol=ftol, method='DF-SANE')
+
+    assert_(sol.success)
+
+    f0 = np.linalg.norm(func(x0))
+    fx = np.linalg.norm(func(sol.x))
+    assert_(fx <= ftol*f0)
+
+
+def test_linear_definite():
+    # The DF-SANE paper proves convergence for "strongly isolated"
+    # solutions.
+    #
+    # For linear systems F(x) = A x - b = 0, with A positive or
+    # negative definite, the solution is strongly isolated.
+
+    def check_solvability(A, b, line_search='cruz'):
+        def func(x):
+            return A.dot(x) - b
+        xp = np.linalg.solve(A, b)
+        eps = np.linalg.norm(func(xp)) * 1e3
+        sol = root(
+            func, b,
+            options=dict(fatol=eps, ftol=0, maxfev=17523, line_search=line_search),
+            method='DF-SANE',
+        )
+        assert_(sol.success)
+        assert_(np.linalg.norm(func(sol.x)) <= eps)
+
+    n = 90
+
+    # Test linear pos.def. system
+    np.random.seed(1234)
+    A = np.arange(n*n).reshape(n, n)
+    A = A + n*n * np.diag(1 + np.arange(n))
+    assert_(np.linalg.eigvals(A).min() > 0)
+    b = np.arange(n) * 1.0
+    check_solvability(A, b, 'cruz')
+    check_solvability(A, b, 'cheng')
+
+    # Test linear neg.def. system
+    check_solvability(-A, b, 'cruz')
+    check_solvability(-A, b, 'cheng')
+
+
+def test_shape():
+    def f(x, arg):
+        return x - arg
+
+    for dt in [float, complex]:
+        x = np.zeros([2,2])
+        arg = np.ones([2,2], dtype=dt)
+
+        sol = root(f, x, args=(arg,), method='DF-SANE')
+        assert_(sol.success)
+        assert_equal(sol.x.shape, x.shape)
+
+
+# Some of the test functions and initial guesses listed in
+# [W. La Cruz, M. Raydan. Optimization Methods and Software, 18, 583 (2003)]
+
+def F_1(x, n):
+    g = np.zeros([n])
+    i = np.arange(2, n+1)
+    g[0] = exp(x[0] - 1) - 1
+    g[1:] = i*(exp(x[1:] - 1) - x[1:])
+    return g
+
+def x0_1(n):
+    x0 = np.empty([n])
+    x0.fill(n/(n-1))
+    return x0
+
+def F_2(x, n):
+    g = np.zeros([n])
+    i = np.arange(2, n+1)
+    g[0] = exp(x[0]) - 1
+    g[1:] = 0.1*i*(exp(x[1:]) + x[:-1] - 1)
+    return g
+
+def x0_2(n):
+    x0 = np.empty([n])
+    x0.fill(1/n**2)
+    return x0
+
+
+def F_4(x, n):  # skip name check
+    assert_equal(n % 3, 0)
+    g = np.zeros([n])
+    # Note: the first line is typoed in some of the references;
+    # correct in original [Gasparo, Optimization Meth. 13, 79 (2000)]
+    g[::3] = 0.6 * x[::3] + 1.6 * x[1::3]**3 - 7.2 * x[1::3]**2 + 9.6 * x[1::3] - 4.8
+    g[1::3] = (0.48 * x[::3] - 0.72 * x[1::3]**3 + 3.24 * x[1::3]**2 - 4.32 * x[1::3]
+               - x[2::3] + 0.2 * x[2::3]**3 + 2.16)
+    g[2::3] = 1.25 * x[2::3] - 0.25*x[2::3]**3
+    return g
+
+
+def x0_4(n):  # skip name check
+    assert_equal(n % 3, 0)
+    x0 = np.array([-1, 1/2, -1] * (n//3))
+    return x0
+
+def F_6(x, n):
+    c = 0.9
+    mu = (np.arange(1, n+1) - 0.5)/n
+    return x - 1/(1 - c/(2*n) * (mu[:,None]*x / (mu[:,None] + mu)).sum(axis=1))
+
+def x0_6(n):
+    return np.ones([n])
+
+def F_7(x, n):
+    assert_equal(n % 3, 0)
+
+    def phi(t):
+        v = 0.5*t - 2
+        v[t > -1] = ((-592*t**3 + 888*t**2 + 4551*t - 1924)/1998)[t > -1]
+        v[t >= 2] = (0.5*t + 2)[t >= 2]
+        return v
+    g = np.zeros([n])
+    g[::3] = 1e4 * x[1::3]**2 - 1
+    g[1::3] = exp(-x[::3]) + exp(-x[1::3]) - 1.0001
+    g[2::3] = phi(x[2::3])
+    return g
+
+def x0_7(n):
+    assert_equal(n % 3, 0)
+    return np.array([1e-3, 18, 1] * (n//3))
+
+def F_9(x, n):
+    g = np.zeros([n])
+    i = np.arange(2, n)
+    g[0] = x[0]**3/3 + x[1]**2/2
+    g[1:-1] = -x[1:-1]**2/2 + i*x[1:-1]**3/3 + x[2:]**2/2
+    g[-1] = -x[-1]**2/2 + n*x[-1]**3/3
+    return g
+
+def x0_9(n):
+    return np.ones([n])
+
+def F_10(x, n):
+    return np.log(1 + x) - x/n
+
+def x0_10(n):
+    return np.ones([n])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_bracket.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_bracket.py
new file mode 100644
index 0000000000000000000000000000000000000000..f3a47fc005a2af6bbd02465634fdb72fa131f8f8
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_bracket.py
@@ -0,0 +1,906 @@
+import pytest
+
+import numpy as np
+
+from scipy.optimize._bracket import _ELIMITS
+from scipy.optimize.elementwise import bracket_root, bracket_minimum
+import scipy._lib._elementwise_iterative_method as eim
+from scipy import stats
+from scipy._lib._array_api_no_0d import (xp_assert_close, xp_assert_equal,
+                                         xp_assert_less, array_namespace)
+from scipy._lib._array_api import xp_ravel
+from scipy.conftest import array_api_compatible
+
+
+# These tests were originally written for the private `optimize._bracket`
+# interfaces, but now we want the tests to check the behavior of the public
+# `optimize.elementwise` interfaces. Therefore, rather than importing
+# `_bracket_root`/`_bracket_minimum` from `_bracket.py`, we import
+# `bracket_root`/`bracket_minimum` from `optimize.elementwise` and wrap those
+# functions to conform to the private interface. This may look a little strange,
+# since it effectively just inverts the interface transformation done within the
+# `bracket_root`/`bracket_minimum` functions, but it allows us to run the original,
+# unmodified tests on the public interfaces, simplifying the PR that adds
+# the public interfaces. We'll refactor this when we want to @parametrize the
+# tests over multiple `method`s.
+def _bracket_root(*args, **kwargs):
+    res = bracket_root(*args, **kwargs)
+    res.xl, res.xr = res.bracket
+    res.fl, res.fr = res.f_bracket
+    del res.bracket
+    del res.f_bracket
+    return res
+
+
+def _bracket_minimum(*args, **kwargs):
+    res = bracket_minimum(*args, **kwargs)
+    res.xl, res.xm, res.xr = res.bracket
+    res.fl, res.fm, res.fr = res.f_bracket
+    del res.bracket
+    del res.f_bracket
+    return res
+
+
+array_api_strict_skip_reason = 'Array API does not support fancy indexing assignment.'
+jax_skip_reason = 'JAX arrays do not support item assignment.'
+
+@pytest.mark.skip_xp_backends('array_api_strict', reason=array_api_strict_skip_reason)
+@pytest.mark.skip_xp_backends('jax.numpy', reason=jax_skip_reason)
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+class TestBracketRoot:
+    @pytest.mark.parametrize("seed", (615655101, 3141866013, 238075752))
+    @pytest.mark.parametrize("use_xmin", (False, True))
+    @pytest.mark.parametrize("other_side", (False, True))
+    @pytest.mark.parametrize("fix_one_side", (False, True))
+    def test_nfev_expected(self, seed, use_xmin, other_side, fix_one_side, xp):
+        # Property-based test to confirm that _bracket_root is behaving as
+        # expected. The basic case is when root < a < b.
+        # The number of times bracket expands (per side) can be found by
+        # setting the expression for the left endpoint of the bracket to the
+        # root of f (x=0), solving for i, and rounding up. The corresponding
+        # lower and upper ends of the bracket are found by plugging this back
+        # into the expression for the ends of the bracket.
+        # `other_side=True` is the case that a < b < root
+        # Special cases like a < root < b are tested separately
+        rng = np.random.default_rng(seed)
+        xl0, d, factor = xp.asarray(rng.random(size=3) * [1e5, 10, 5])
+        factor = 1 + factor  # factor must be greater than 1
+        xr0 = xl0 + d  # xr0 must be greater than a in basic case
+
+        def f(x):
+            f.count += 1
+            return x  # root is 0
+
+        if use_xmin:
+            xmin = xp.asarray(-rng.random())
+            n = xp.ceil(xp.log(-(xl0 - xmin) / xmin) / xp.log(factor))
+            l, u = xmin + (xl0 - xmin)*factor**-n, xmin + (xl0 - xmin)*factor**-(n - 1)
+            kwargs = dict(xl0=xl0, xr0=xr0, factor=factor, xmin=xmin)
+        else:
+            n = xp.ceil(xp.log(xr0/d) / xp.log(factor))
+            l, u = xr0 - d*factor**n, xr0 - d*factor**(n-1)
+            kwargs = dict(xl0=xl0, xr0=xr0, factor=factor)
+
+        if other_side:
+            kwargs['xl0'], kwargs['xr0'] = -kwargs['xr0'], -kwargs['xl0']
+            l, u = -u, -l
+            if 'xmin' in kwargs:
+                kwargs['xmax'] = -kwargs.pop('xmin')
+
+        if fix_one_side:
+            if other_side:
+                kwargs['xmin'] = -xr0
+            else:
+                kwargs['xmax'] = xr0
+
+        f.count = 0
+        res = _bracket_root(f, **kwargs)
+
+        # Compare reported number of function evaluations `nfev` against
+        # reported `nit`, actual function call count `f.count`, and theoretical
+        # number of expansions `n`.
+        # When both sides are free, these get multiplied by 2 because function
+        # is evaluated on the left and the right each iteration.
+        # When one side is fixed, however, we add one: on the right side, the
+        # function gets evaluated once at b.
+        # Add 1 to `n` and `res.nit` because function evaluations occur at
+        # iterations *0*, 1, ..., `n`. Subtract 1 from `f.count` because
+        # function is called separately for left and right in iteration 0.
+        if not fix_one_side:
+            assert res.nfev == 2*(res.nit+1) == 2*(f.count-1) == 2*(n + 1)
+        else:
+            assert res.nfev == (res.nit+1)+1 == (f.count-1)+1 == (n+1)+1
+
+        # Compare reported bracket to theoretical bracket and reported function
+        # values to function evaluated at bracket.
+        bracket = xp.asarray([res.xl, res.xr])
+        xp_assert_close(bracket, xp.asarray([l, u]))
+        f_bracket = xp.asarray([res.fl, res.fr])
+        xp_assert_close(f_bracket, f(bracket))
+
+        # Check that bracket is valid and that status and success are correct
+        assert res.xr > res.xl
+        signs = xp.sign(f_bracket)
+        assert signs[0] == -signs[1]
+        assert res.status == 0
+        assert res.success
+
+    def f(self, q, p):
+        return stats._stats_py._SimpleNormal().cdf(q) - p
+
+    @pytest.mark.parametrize('p', [0.6, np.linspace(0.05, 0.95, 10)])
+    @pytest.mark.parametrize('xmin', [-5, None])
+    @pytest.mark.parametrize('xmax', [5, None])
+    @pytest.mark.parametrize('factor', [1.2, 2])
+    def test_basic(self, p, xmin, xmax, factor, xp):
+        # Test basic functionality to bracket root (distribution PPF)
+        res = _bracket_root(self.f, xp.asarray(-0.01), 0.01, xmin=xmin, xmax=xmax,
+                            factor=factor, args=(xp.asarray(p),))
+        xp_assert_equal(-xp.sign(res.fl), xp.sign(res.fr))
+
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        p = np.linspace(-0.05, 1.05, 12).reshape(shape) if shape else np.float64(0.6)
+        args = (p,)
+        maxiter = 10
+
+        @np.vectorize
+        def bracket_root_single(xl0, xr0, xmin, xmax, factor, p):
+            return _bracket_root(self.f, xl0, xr0, xmin=xmin, xmax=xmax,
+                                 factor=factor, args=(p,),
+                                 maxiter=maxiter)
+
+        def f(*args, **kwargs):
+            f.f_evals += 1
+            return self.f(*args, **kwargs)
+        f.f_evals = 0
+
+        rng = np.random.default_rng(2348234)
+        xl0 = -rng.random(size=shape)
+        xr0 = rng.random(size=shape)
+        xmin, xmax = 1e3*xl0, 1e3*xr0
+        if shape:  # make some elements un
+            i = rng.random(size=shape) > 0.5
+            xmin[i], xmax[i] = -np.inf, np.inf
+        factor = rng.random(size=shape) + 1.5
+        refs = bracket_root_single(xl0, xr0, xmin, xmax, factor, p).ravel()
+        xl0, xr0, xmin, xmax, factor = (xp.asarray(xl0), xp.asarray(xr0),
+                                        xp.asarray(xmin), xp.asarray(xmax),
+                                        xp.asarray(factor))
+        args = tuple(map(xp.asarray, args))
+        res = _bracket_root(f, xl0, xr0, xmin=xmin, xmax=xmax, factor=factor,
+                            args=args, maxiter=maxiter)
+
+        attrs = ['xl', 'xr', 'fl', 'fr', 'success', 'nfev', 'nit']
+        for attr in attrs:
+            ref_attr = [xp.asarray(getattr(ref, attr)) for ref in refs]
+            res_attr = getattr(res, attr)
+            xp_assert_close(xp_ravel(res_attr, xp=xp), xp.stack(ref_attr))
+            xp_assert_equal(res_attr.shape, shape)
+
+        xp_test = array_namespace(xp.asarray(1.))
+        assert res.success.dtype == xp_test.bool
+        if shape:
+            assert xp.all(res.success[1:-1])
+        assert res.status.dtype == xp.int32
+        assert res.nfev.dtype == xp.int32
+        assert res.nit.dtype == xp.int32
+        assert xp.max(res.nit) == f.f_evals - 2
+        xp_assert_less(res.xl, res.xr)
+        xp_assert_close(res.fl, xp.asarray(self.f(res.xl, *args)))
+        xp_assert_close(res.fr, xp.asarray(self.f(res.xr, *args)))
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously.
+        def f(xs, js):
+            funcs = [lambda x: x - 1.5,
+                     lambda x: x - 1000,
+                     lambda x: x - 1000,
+                     lambda x: x * xp.nan,
+                     lambda x: x]
+
+            return [funcs[int(j)](x) for x, j in zip(xs, js)]
+
+        args = (xp.arange(5, dtype=xp.int64),)
+        res = _bracket_root(f,
+                            xl0=xp.asarray([-1., -1., -1., -1., 4.]),
+                            xr0=xp.asarray([1, 1, 1, 1, -4]),
+                            xmin=xp.asarray([-xp.inf, -1, -xp.inf, -xp.inf, 6]),
+                            xmax=xp.asarray([xp.inf, 1, xp.inf, xp.inf, 2]),
+                            args=args, maxiter=3)
+
+        ref_flags = xp.asarray([eim._ECONVERGED,
+                                _ELIMITS,
+                                eim._ECONVERR,
+                                eim._EVALUEERR,
+                                eim._EINPUTERR],
+                               dtype=xp.int32)
+
+        xp_assert_equal(res.status, ref_flags)
+
+    @pytest.mark.parametrize("root", (0.622, [0.622, 0.623]))
+    @pytest.mark.parametrize('xmin', [-5, None])
+    @pytest.mark.parametrize('xmax', [5, None])
+    @pytest.mark.parametrize("dtype", ("float16", "float32", "float64"))
+    def test_dtype(self, root, xmin, xmax, dtype, xp):
+        # Test that dtypes are preserved
+        dtype = getattr(xp, dtype)
+        xp_test = array_namespace(xp.asarray(1.))
+
+        xmin = xmin if xmin is None else xp.asarray(xmin, dtype=dtype)
+        xmax = xmax if xmax is None else xp.asarray(xmax, dtype=dtype)
+        root = xp.asarray(root, dtype=dtype)
+        def f(x, root):
+            return xp_test.astype((x - root) ** 3, dtype)
+
+        bracket = xp.asarray([-0.01, 0.01], dtype=dtype)
+        res = _bracket_root(f, *bracket, xmin=xmin, xmax=xmax, args=(root,))
+        assert xp.all(res.success)
+        assert res.xl.dtype == res.xr.dtype == dtype
+        assert res.fl.dtype == res.fr.dtype == dtype
+
+    def test_input_validation(self, xp):
+        # Test input validation for appropriate error messages
+
+        message = '`func` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(None, -4, 4)
+
+        message = '...must be numeric and real.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4+1j, 4)
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 'hello')
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, xmin=np)
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, xmax=object())
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, factor=sum)
+
+        message = "All elements of `factor` must be greater than 1."
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, factor=0.5)
+
+        message = "broadcast"
+        # raised by `xp.broadcast, but the traceback is readable IMO
+        with pytest.raises(Exception, match=message):
+            _bracket_root(lambda x: x, xp.asarray([-2, -3]), xp.asarray([3, 4, 5]))
+        # Consider making this give a more readable error message
+        # with pytest.raises(ValueError, match=message):
+        #     _bracket_root(lambda x: [x[0], x[1], x[1]], [-3, -3], [5, 5])
+
+        message = '`maxiter` must be a non-negative integer.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, maxiter=1.5)
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, maxiter=-1)
+        with pytest.raises(ValueError, match=message):
+            _bracket_root(lambda x: x, -4, 4, maxiter="shrubbery")
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases
+        xp_test = array_namespace(xp.asarray(1.))
+
+        # Test that integers are not passed to `f`
+        # (otherwise this would overflow)
+        def f(x):
+            assert xp_test.isdtype(x.dtype, "real floating")
+            return x ** 99 - 1
+
+        res = _bracket_root(f, xp.asarray(-7.), xp.asarray(5.))
+        assert res.success
+
+        # Test maxiter = 0. Should do nothing to bracket.
+        def f(x):
+            return x - 10
+
+        bracket = (xp.asarray(-3.), xp.asarray(5.))
+        res = _bracket_root(f, *bracket, maxiter=0)
+        assert res.xl, res.xr == bracket
+        assert res.nit == 0
+        assert res.nfev == 2
+        assert res.status == -2
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return c*x - 1
+
+        res = _bracket_root(f, xp.asarray(-1.), xp.asarray(1.),
+                            args=xp.asarray(3.))
+        assert res.success
+        xp_assert_close(res.fl, f(res.xl, 3))
+
+        # Test other edge cases
+
+        def f(x):
+            f.count += 1
+            return x
+
+        # 1. root lies within guess of bracket
+        f.count = 0
+        _bracket_root(f, xp.asarray(-10), xp.asarray(20))
+        assert f.count == 2
+
+        # 2. bracket endpoint hits root exactly
+        f.count = 0
+        res = _bracket_root(f, xp.asarray(5.), xp.asarray(10.), 
+                            factor=2)
+
+        assert res.nfev == 4
+        xp_assert_close(res.xl, xp.asarray(0.), atol=1e-15)
+        xp_assert_close(res.xr, xp.asarray(5.), atol=1e-15)
+
+        # 3. bracket limit hits root exactly
+        with np.errstate(over='ignore'):
+            res = _bracket_root(f, xp.asarray(5.), xp.asarray(10.), 
+                                xmin=0)
+        xp_assert_close(res.xl, xp.asarray(0.), atol=1e-15)
+
+        with np.errstate(over='ignore'):
+            res = _bracket_root(f, xp.asarray(-10.), xp.asarray(-5.), 
+                                xmax=0)
+        xp_assert_close(res.xr, xp.asarray(0.), atol=1e-15)
+
+        # 4. bracket not within min, max
+        with np.errstate(over='ignore'):
+            res = _bracket_root(f, xp.asarray(5.), xp.asarray(10.),
+                                xmin=1)
+        assert not res.success
+
+    def test_bug_fixes(self):
+        # 1. Bug in double sided bracket search.
+        # Happened in some cases where there are terminations on one side
+        # after corresponding searches on other side failed due to reaching the
+        # boundary.
+
+        # https://github.com/scipy/scipy/pull/22560#discussion_r1962853839
+        def f(x, p):
+            return np.exp(x) - p
+
+        p = np.asarray([0.29, 0.35])
+        res = _bracket_root(f, xl0=-1, xmin=-np.inf, xmax=0, args=(p, ))
+
+        # https://github.com/scipy/scipy/pull/22560/files#r1962952517
+        def f(x, p, c):
+            return np.exp(x*c) - p
+
+        p = [0.32061201, 0.39175242, 0.40047535, 0.50527218, 0.55654373,
+             0.11911647, 0.37507896, 0.66554191]
+        c = [1., -1., 1., 1., -1., 1., 1., 1.]
+        xl0 = [-7.63108551,  3.27840947, -8.36968526, -1.78124372,
+               0.92201295, -2.48930123, -0.66733533, -0.44606749]
+        xr0 = [-6.63108551,  4.27840947, -7.36968526, -0.78124372,
+               1.92201295, -1.48930123, 0., 0.]
+        xmin = [-np.inf, 0., -np.inf, -np.inf, 0., -np.inf, -np.inf,
+                -np.inf]
+        xmax = [0., np.inf, 0., 0., np.inf, 0., 0., 0.]
+
+        res = _bracket_root(f, xl0=xl0, xr0=xr0, xmin=xmin, xmax=xmax, args=(p, c))
+
+        # 2. Default xl0 + 1 for xr0 exceeds xmax.
+        # https://github.com/scipy/scipy/pull/22560#discussion_r1962947434
+        res = _bracket_root(lambda x: x + 0.25, xl0=-0.5, xmin=-np.inf, xmax=0)
+        assert res.success
+
+
+@pytest.mark.skip_xp_backends('array_api_strict', reason=array_api_strict_skip_reason)
+@pytest.mark.skip_xp_backends('jax.numpy', reason=jax_skip_reason)
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+class TestBracketMinimum:
+    def init_f(self):
+        def f(x, a, b):
+            f.count += 1
+            return (x - a)**2 + b
+        f.count = 0
+        return f
+
+    def assert_valid_bracket(self, result, xp):
+        assert xp.all(
+            (result.xl < result.xm) & (result.xm < result.xr)
+        )
+        assert xp.all(
+            (result.fl >= result.fm) & (result.fr > result.fm)
+            | (result.fl > result.fm) & (result.fr > result.fm)
+        )
+
+    def get_kwargs(
+            self, *, xl0=None, xr0=None, factor=None, xmin=None, xmax=None, args=None
+    ):
+        names = ("xl0", "xr0", "xmin", "xmax", "factor", "args")
+        return {
+            name: val for name, val in zip(names, (xl0, xr0, xmin, xmax, factor, args))
+            if val is not None
+        }
+
+    @pytest.mark.parametrize(
+        "seed",
+        (
+            307448016549685229886351382450158984917,
+            11650702770735516532954347931959000479,
+            113767103358505514764278732330028568336,
+        )
+    )
+    @pytest.mark.parametrize("use_xmin", (False, True))
+    @pytest.mark.parametrize("other_side", (False, True))
+    def test_nfev_expected(self, seed, use_xmin, other_side, xp):
+        rng = np.random.default_rng(seed)
+        args = (xp.asarray(0.), xp.asarray(0.))  # f(x) = x^2 with minimum at 0
+        # xl0, xm0, xr0 are chosen such that the initial bracket is to
+        # the right of the minimum, and the bracket will expand
+        # downhill towards zero.
+        xl0, d1, d2, factor = xp.asarray(rng.random(size=4) * [1e5, 10, 10, 5])
+        xm0 = xl0 + d1
+        xr0 = xm0 + d2
+        # Factor should be greater than one.
+        factor += 1
+
+        if use_xmin:
+            xmin = xp.asarray(-rng.random() * 5, dtype=xp.float64)
+            n = int(xp.ceil(xp.log(-(xl0 - xmin) / xmin) / xp.log(factor)))
+            lower = xmin + (xl0 - xmin)*factor**-n
+            middle = xmin + (xl0 - xmin)*factor**-(n-1)
+            upper = xmin + (xl0 - xmin)*factor**-(n-2) if n > 1 else xm0
+            # It may be the case the lower is below the minimum, but we still
+            # don't have a valid bracket.
+            if middle**2 > lower**2:
+                n += 1
+                lower, middle, upper = (
+                    xmin + (xl0 - xmin)*factor**-n, lower, middle
+                )
+        else:
+            xmin = None
+            n = int(xp.ceil(xp.log(xl0 / d1) / xp.log(factor)))
+            lower = xl0 - d1*factor**n
+            middle = xl0 - d1*factor**(n-1) if n > 1 else xl0
+            upper = xl0 - d1*factor**(n-2) if n > 1 else xm0
+            # It may be the case the lower is below the minimum, but we still
+            # don't have a valid bracket.
+            if middle**2 > lower**2:
+                n += 1
+                lower, middle, upper = (
+                    xl0 - d1*factor**n, lower, middle
+                )
+        f = self.init_f()
+
+        xmax = None
+        if other_side:
+            xl0, xm0, xr0 = -xr0, -xm0, -xl0
+            xmin, xmax = None, -xmin if xmin is not None else None
+            lower, middle, upper = -upper, -middle, -lower
+
+        kwargs = self.get_kwargs(
+            xl0=xl0, xr0=xr0, xmin=xmin, xmax=xmax, factor=factor, args=args
+        )
+        result = _bracket_minimum(f, xp.asarray(xm0), **kwargs)
+
+        # Check that `nfev` and `nit` have the correct relationship
+        assert result.nfev == result.nit + 3
+        # Check that `nfev` reports the correct number of function evaluations.
+        assert result.nfev == f.count
+        # Check that the number of iterations matches the theoretical value.
+        assert result.nit == n
+
+        # Compare reported bracket to theoretical bracket and reported function
+        # values to function evaluated at bracket.
+        xp_assert_close(result.xl, lower)
+        xp_assert_close(result.xm, middle)
+        xp_assert_close(result.xr, upper)
+        xp_assert_close(result.fl, f(lower, *args))
+        xp_assert_close(result.fm, f(middle, *args))
+        xp_assert_close(result.fr, f(upper, *args))
+
+        self.assert_valid_bracket(result, xp)
+        assert result.status == 0
+        assert result.success
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously
+        def f(xs, js):
+            funcs = [lambda x: (x - 1.5)**2,
+                     lambda x: x,
+                     lambda x: x,
+                     lambda x: xp.nan,
+                     lambda x: x**2]
+
+            return [funcs[j](x) for x, j in zip(xs, js)]
+
+        args = (xp.arange(5, dtype=xp.int64),)
+        xl0 = xp.asarray([-1.0, -1.0, -1.0, -1.0, 6.0])
+        xm0 = xp.asarray([0.0, 0.0, 0.0, 0.0, 4.0])
+        xr0 = xp.asarray([1.0, 1.0, 1.0, 1.0, 2.0])
+        xmin = xp.asarray([-xp.inf, -1.0, -xp.inf, -xp.inf, 8.0])
+
+        result = _bracket_minimum(f, xm0, xl0=xl0, xr0=xr0, xmin=xmin,
+                                  args=args, maxiter=3)
+
+        reference_flags = xp.asarray([eim._ECONVERGED, _ELIMITS,
+                                      eim._ECONVERR, eim._EVALUEERR,
+                                      eim._EINPUTERR], dtype=xp.int32)
+        xp_assert_equal(result.status, reference_flags)
+
+    @pytest.mark.parametrize("minimum", (0.622, [0.622, 0.623]))
+    @pytest.mark.parametrize("dtype", ("float16", "float32", "float64"))
+    @pytest.mark.parametrize("xmin", [-5, None])
+    @pytest.mark.parametrize("xmax", [5, None])
+    def test_dtypes(self, minimum, xmin, xmax, dtype, xp):
+        dtype = getattr(xp, dtype)
+        xp_test = array_namespace(xp.asarray(1.))
+        xmin = xmin if xmin is None else xp.asarray(xmin, dtype=dtype)
+        xmax = xmax if xmax is None else xp.asarray(xmax, dtype=dtype)
+        minimum = xp.asarray(minimum, dtype=dtype)
+
+        def f(x, minimum):
+            return xp_test.astype((x - minimum)**2, dtype)
+
+        xl0, xm0, xr0 = [-0.01, 0.0, 0.01]
+        result = _bracket_minimum(
+            f, xp.asarray(xm0, dtype=dtype), xl0=xp.asarray(xl0, dtype=dtype),
+            xr0=xp.asarray(xr0, dtype=dtype), xmin=xmin, xmax=xmax, args=(minimum, )
+        )
+        assert xp.all(result.success)
+        assert result.xl.dtype == result.xm.dtype == result.xr.dtype == dtype
+        assert result.fl.dtype == result.fm.dtype == result.fr.dtype == dtype
+
+    @pytest.mark.skip_xp_backends(np_only=True, reason="str/object arrays")
+    def test_input_validation(self, xp):
+        # Test input validation for appropriate error messages
+
+        message = '`func` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(None, -4, xl0=4)
+
+        message = '...must be numeric and real.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(4+1j))
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xl0='hello')
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4),
+                             xr0='farcical aquatic ceremony')
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xmin=np)
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xmax=object())
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), factor=sum)
+
+        message = "All elements of `factor` must be greater than 1."
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x, xp.asarray(-4), factor=0.5)
+
+        message = "shape mismatch: objects cannot be broadcast"
+        # raised by `xp.broadcast, but the traceback is readable IMO
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray([-2, -3]), xl0=[-3, -4, -5])
+
+        message = '`maxiter` must be a non-negative integer.'
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xr0=4, maxiter=1.5)
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xr0=4, maxiter=-1)
+        with pytest.raises(ValueError, match=message):
+            _bracket_minimum(lambda x: x**2, xp.asarray(-4), xr0=4, maxiter="ekki")
+
+    @pytest.mark.parametrize("xl0", [0.0, None])
+    @pytest.mark.parametrize("xm0", (0.05, 0.1, 0.15))
+    @pytest.mark.parametrize("xr0", (0.2, 0.4, 0.6, None))
+    # Minimum is ``a`` for each tuple ``(a, b)`` below. Tests cases where minimum
+    # is within, or at varying distances to the left or right of the initial
+    # bracket.
+    @pytest.mark.parametrize(
+        "args",
+        (
+            (1.2, 0), (-0.5, 0), (0.1, 0), (0.2, 0), (3.6, 0), (21.4, 0),
+            (121.6, 0), (5764.1, 0), (-6.4, 0), (-12.9, 0), (-146.2, 0)
+        )
+    )
+    def test_scalar_no_limits(self, xl0, xm0, xr0, args, xp):
+        f = self.init_f()
+        kwargs = self.get_kwargs(xl0=xl0, xr0=xr0, args=tuple(map(xp.asarray, args)))
+        result = _bracket_minimum(f, xp.asarray(xm0, dtype=xp.float64), **kwargs)
+        self.assert_valid_bracket(result, xp)
+        assert result.status == 0
+        assert result.success
+        assert result.nfev == f.count
+
+    @pytest.mark.parametrize(
+        # xmin is set at 0.0 in all cases.
+        "xl0,xm0,xr0,xmin",
+        (
+            # Initial bracket at varying distances from the xmin.
+            (0.5, 0.75, 1.0, 0.0),
+            (1.0, 2.5, 4.0, 0.0),
+            (2.0, 4.0, 6.0, 0.0),
+            (12.0, 16.0, 20.0, 0.0),
+            # Test default initial left endpoint selection. It should not
+            # be below xmin.
+            (None, 0.75, 1.0, 0.0),
+            (None, 2.5, 4.0, 0.0),
+            (None, 4.0, 6.0, 0.0),
+            (None, 16.0, 20.0, 0.0),
+        )
+    )
+    @pytest.mark.parametrize(
+        "args", (
+            (0.0, 0.0), # Minimum is directly at xmin.
+            (1e-300, 0.0), # Minimum is extremely close to xmin.
+            (1e-20, 0.0), # Minimum is very close to xmin.
+            # Minimum at varying distances from xmin.
+            (0.1, 0.0),
+            (0.2, 0.0),
+            (0.4, 0.0)
+        )
+    )
+    def test_scalar_with_limit_left(self, xl0, xm0, xr0, xmin, args, xp):
+        f = self.init_f()
+        kwargs = self.get_kwargs(xl0=xl0, xr0=xr0, xmin=xmin,
+                                 args=tuple(map(xp.asarray, args)))
+        result = _bracket_minimum(f, xp.asarray(xm0), **kwargs)
+        self.assert_valid_bracket(result, xp)
+        assert result.status == 0
+        assert result.success
+        assert result.nfev == f.count
+
+    @pytest.mark.parametrize(
+        #xmax is set to 1.0 in all cases.
+        "xl0,xm0,xr0,xmax",
+        (
+            # Bracket at varying distances from xmax.
+            (0.2, 0.3, 0.4, 1.0),
+            (0.05, 0.075, 0.1, 1.0),
+            (-0.2, -0.1, 0.0, 1.0),
+            (-21.2, -17.7, -14.2, 1.0),
+            # Test default right endpoint selection. It should not exceed xmax.
+            (0.2, 0.3, None, 1.0),
+            (0.05, 0.075, None, 1.0),
+            (-0.2, -0.1, None, 1.0),
+            (-21.2, -17.7, None, 1.0),
+        )
+    )
+    @pytest.mark.parametrize(
+        "args", (
+            (0.9999999999999999, 0.0), # Minimum very close to xmax.
+            # Minimum at varying distances from xmax.
+            (0.9, 0.0),
+            (0.7, 0.0),
+            (0.5, 0.0)
+        )
+    )
+    def test_scalar_with_limit_right(self, xl0, xm0, xr0, xmax, args, xp):
+        f = self.init_f()
+        args = tuple(xp.asarray(arg, dtype=xp.float64) for arg in args)
+        kwargs = self.get_kwargs(xl0=xl0, xr0=xr0, xmax=xmax, args=args)
+        result = _bracket_minimum(f, xp.asarray(xm0, dtype=xp.float64), **kwargs)
+        self.assert_valid_bracket(result, xp)
+        assert result.status == 0
+        assert result.success
+        assert result.nfev == f.count
+
+    @pytest.mark.parametrize(
+        "xl0,xm0,xr0,xmin,xmax,args",
+        (
+            (   # Case 1:
+                # Initial bracket.
+                0.2,
+                0.3,
+                0.4,
+                # Function slopes down to the right from the bracket to a minimum
+                # at 1.0. xmax is also at 1.0
+                None,
+                1.0,
+                (1.0, 0.0)
+            ),
+            (   # Case 2:
+                # Initial bracket.
+                1.4,
+                1.95,
+                2.5,
+                # Function slopes down to the left from the bracket to a minimum at
+                # 0.3 with xmin set to 0.3.
+                0.3,
+                None,
+                (0.3, 0.0)
+            ),
+            (
+                # Case 3:
+                # Initial bracket.
+                2.6,
+                3.25,
+                3.9,
+                # Function slopes down and to the right to a minimum at 99.4 with xmax
+                # at 99.4. Tests case where minimum is at xmax relatively further from
+                # the bracket.
+                None,
+                99.4,
+                (99.4, 0)
+            ),
+            (
+                # Case 4:
+                # Initial bracket.
+                4,
+                4.5,
+                5,
+                # Function slopes down and to the left away from the bracket with a
+                # minimum at -26.3 with xmin set to -26.3. Tests case where minimum is
+                # at xmin relatively far from the bracket.
+                -26.3,
+                None,
+                (-26.3, 0)
+            ),
+            (
+                # Case 5:
+                # Similar to Case 1 above, but tests default values of xl0 and xr0.
+                None,
+                0.3,
+                None,
+                None,
+                1.0,
+                (1.0, 0.0)
+            ),
+            (   # Case 6:
+                # Similar to Case 2 above, but tests default values of xl0 and xr0.
+                None,
+                1.95,
+                None,
+                0.3,
+                None,
+                (0.3, 0.0)
+            ),
+            (
+                # Case 7:
+                # Similar to Case 3 above, but tests default values of xl0 and xr0.
+                None,
+                3.25,
+                None,
+                None,
+                99.4,
+                (99.4, 0)
+            ),
+            (
+                # Case 8:
+                # Similar to Case 4 above, but tests default values of xl0 and xr0.
+                None,
+                4.5,
+                None,
+                -26.3,
+                None,
+                (-26.3, 0)
+            ),
+        )
+    )
+    def test_minimum_at_boundary_point(self, xl0, xm0, xr0, xmin, xmax, args, xp):
+        f = self.init_f()
+        kwargs = self.get_kwargs(xr0=xr0, xmin=xmin, xmax=xmax,
+                                 args=tuple(map(xp.asarray, args)))
+        result = _bracket_minimum(f, xp.asarray(xm0), **kwargs)
+        assert result.status == -1
+        assert args[0] in (result.xl, result.xr)
+        assert result.nfev == f.count
+
+    @pytest.mark.parametrize('shape', [tuple(), (12, ), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for
+        # various input shapes.
+        a = np.linspace(-0.05, 1.05, 12).reshape(shape) if shape else 0.6
+        args = (a, 0.)
+        maxiter = 10
+
+        @np.vectorize
+        def bracket_minimum_single(xm0, xl0, xr0, xmin, xmax, factor, a):
+            return _bracket_minimum(self.init_f(), xm0, xl0=xl0, xr0=xr0, xmin=xmin,
+                                    xmax=xmax, factor=factor, maxiter=maxiter,
+                                    args=(a, 0.0))
+
+        f = self.init_f()
+
+        rng = np.random.default_rng(2348234)
+        xl0 = -rng.random(size=shape)
+        xr0 = rng.random(size=shape)
+        xm0 = xl0 + rng.random(size=shape) * (xr0 - xl0)
+        xmin, xmax = 1e3*xl0, 1e3*xr0
+        if shape:  # make some elements un
+            i = rng.random(size=shape) > 0.5
+            xmin[i], xmax[i] = -np.inf, np.inf
+        factor = rng.random(size=shape) + 1.5
+        refs = bracket_minimum_single(xm0, xl0, xr0, xmin, xmax, factor, a).ravel()
+        args = tuple(xp.asarray(arg, dtype=xp.float64) for arg in args)
+        res = _bracket_minimum(f, xp.asarray(xm0), xl0=xl0, xr0=xr0, xmin=xmin,
+                               xmax=xmax, factor=factor, args=args, maxiter=maxiter)
+
+        attrs = ['xl', 'xm', 'xr', 'fl', 'fm', 'fr', 'success', 'nfev', 'nit']
+        for attr in attrs:
+            ref_attr = [xp.asarray(getattr(ref, attr)) for ref in refs]
+            res_attr = getattr(res, attr)
+            xp_assert_close(xp_ravel(res_attr, xp=xp), xp.stack(ref_attr))
+            xp_assert_equal(res_attr.shape, shape)
+
+        xp_test = array_namespace(xp.asarray(1.))
+        assert res.success.dtype == xp_test.bool
+        if shape:
+            assert xp.all(res.success[1:-1])
+        assert res.status.dtype == xp.int32
+        assert res.nfev.dtype == xp.int32
+        assert res.nit.dtype == xp.int32
+        assert xp.max(res.nit) == f.count - 3
+        self.assert_valid_bracket(res, xp)
+        xp_assert_close(res.fl, f(res.xl, *args))
+        xp_assert_close(res.fm, f(res.xm, *args))
+        xp_assert_close(res.fr, f(res.xr, *args))
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases.
+        xp_test = array_namespace(xp.asarray(1.))
+
+        # Test that integers are not passed to `f`
+        # (otherwise this would overflow)
+        def f(x):
+            assert xp_test.isdtype(x.dtype, "numeric")
+            return x ** 98 - 1
+
+        result = _bracket_minimum(f, xp.asarray(-7., dtype=xp.float64), xr0=5)
+        assert result.success
+
+        # Test maxiter = 0. Should do nothing to bracket.
+        def f(x):
+            return x**2 - 10
+
+        xl0, xm0, xr0 = xp.asarray(-3.), xp.asarray(-1.), xp.asarray(2.)
+        result = _bracket_minimum(f, xm0, xl0=xl0, xr0=xr0, maxiter=0)
+        xp_assert_equal(result.xl, xl0)
+        xp_assert_equal(result.xm, xm0)
+        xp_assert_equal(result.xr, xr0)
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return c*x**2 - 1
+
+        result = _bracket_minimum(f, xp.asarray(-1.), args=xp.asarray(3.))
+        assert result.success
+        xp_assert_close(result.fl, f(result.xl, 3))
+
+        # Initial bracket is valid.
+        f = self.init_f()
+        xl0, xm0, xr0 = xp.asarray(-1.0), xp.asarray(-0.2), xp.asarray(1.0)
+        args = (xp.asarray(0.), xp.asarray(0.))
+        result = _bracket_minimum(f, xm0, xl0=xl0, xr0=xr0, args=args)
+        assert f.count == 3
+
+        xp_assert_equal(result.xl, xl0)
+        xp_assert_equal(result.xm , xm0)
+        xp_assert_equal(result.xr, xr0)
+        xp_assert_equal(result.fl, f(xl0, *args))
+        xp_assert_equal(result.fm, f(xm0, *args))
+        xp_assert_equal(result.fr, f(xr0, *args))
+
+    def test_gh_20562_left(self, xp):
+        # Regression test for https://github.com/scipy/scipy/issues/20562
+        # minimum of f in [xmin, xmax] is at xmin.
+        xmin, xmax = xp.asarray(0.21933608), xp.asarray(1.39713606)
+
+        def f(x):
+            log_a, log_b = xp.log(xmin), xp.log(xmax)
+            return -((log_b - log_a)*x)**-1
+
+        result = _bracket_minimum(f, xp.asarray(0.5535723499480897), xmin=xmin,
+                                  xmax=xmax)
+        assert xmin == result.xl
+
+    def test_gh_20562_right(self, xp):
+        # Regression test for https://github.com/scipy/scipy/issues/20562
+        # minimum of f in [xmin, xmax] is at xmax.
+        xmin, xmax = xp.asarray(-1.39713606), xp.asarray(-0.21933608)
+
+        def f(x):
+            log_a, log_b = xp.log(-xmax), xp.log(-xmin)
+            return ((log_b - log_a)*x)**-1
+
+        result = _bracket_minimum(f, xp.asarray(-0.5535723499480897),
+                                  xmin=xmin, xmax=xmax)
+        assert xmax == result.xr
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_chandrupatla.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_chandrupatla.py
new file mode 100644
index 0000000000000000000000000000000000000000..bcc2ae1a70be2883a3d2346a1cb8d95d8ac027fa
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_chandrupatla.py
@@ -0,0 +1,984 @@
+import math
+import pytest
+import numpy as np
+
+from scipy import stats, special
+import scipy._lib._elementwise_iterative_method as eim
+from scipy.conftest import array_api_compatible
+from scipy._lib._array_api import array_namespace, is_cupy, is_numpy, xp_ravel, xp_size
+from scipy._lib._array_api_no_0d import (xp_assert_close, xp_assert_equal,
+                                         xp_assert_less)
+
+from scipy.optimize.elementwise import find_minimum, find_root
+from scipy.optimize._tstutils import _CHANDRUPATLA_TESTS
+
+from itertools import permutations
+from .test_zeros import TestScalarRootFinders
+
+
+def _vectorize(xp):
+    # xp-compatible version of np.vectorize
+    # assumes arguments are all arrays of the same shape
+    def decorator(f):
+        def wrapped(*arg_arrays):
+            shape = arg_arrays[0].shape
+            arg_arrays = [xp_ravel(arg_array, xp=xp) for arg_array in arg_arrays]
+            res = []
+            for i in range(math.prod(shape)):
+                arg_scalars = [arg_array[i] for arg_array in arg_arrays]
+                res.append(f(*arg_scalars))
+            return res
+
+        return wrapped
+
+    return decorator
+
+
+# These tests were originally written for the private `optimize._chandrupatla`
+# interfaces, but now we want the tests to check the behavior of the public
+# `optimize.elementwise` interfaces. Therefore, rather than importing
+# `_chandrupatla`/`_chandrupatla_minimize` from `_chandrupatla.py`, we import
+# `find_root`/`find_minimum` from `optimize.elementwise` and wrap those
+# functions to conform to the private interface. This may look a little strange,
+# since it effectively just inverts the interface transformation done within the
+# `find_root`/`find_minimum` functions, but it allows us to run the original,
+# unmodified tests on the public interfaces, simplifying the PR that adds
+# the public interfaces. We'll refactor this when we want to @parametrize the
+# tests over multiple `method`s.
+def _wrap_chandrupatla(func):
+    def _chandrupatla_wrapper(f, *bracket, **kwargs):
+        # avoid passing arguments to `find_minimum` to this function
+        tol_keys = {'xatol', 'xrtol', 'fatol', 'frtol'}
+        tolerances = {key: kwargs.pop(key) for key in tol_keys if key in kwargs}
+        _callback = kwargs.pop('callback', None)
+        if callable(_callback):
+            def callback(res):
+                if func == find_root:
+                    res.xl, res.xr = res.bracket
+                    res.fl, res.fr = res.f_bracket
+                else:
+                    res.xl, res.xm, res.xr = res.bracket
+                    res.fl, res.fm, res.fr = res.f_bracket
+                res.fun = res.f_x
+                del res.bracket
+                del res.f_bracket
+                del res.f_x
+                return _callback(res)
+        else:
+            callback = _callback
+
+        res = func(f, bracket, tolerances=tolerances, callback=callback, **kwargs)
+        if func == find_root:
+            res.xl, res.xr = res.bracket
+            res.fl, res.fr = res.f_bracket
+        else:
+            res.xl, res.xm, res.xr = res.bracket
+            res.fl, res.fm, res.fr = res.f_bracket
+        res.fun = res.f_x
+        del res.bracket
+        del res.f_bracket
+        del res.f_x
+        return res
+    return _chandrupatla_wrapper
+
+
+_chandrupatla_root = _wrap_chandrupatla(find_root)
+_chandrupatla_minimize = _wrap_chandrupatla(find_minimum)
+
+
+def f1(x):
+    return 100*(1 - x**3.)**2 + (1-x**2.) + 2*(1-x)**2.
+
+
+def f2(x):
+    return 5 + (x - 2.)**6
+
+
+def f3(x):
+    xp = array_namespace(x)
+    return xp.exp(x) - 5*x
+
+
+def f4(x):
+    return x**5. - 5*x**3. - 20.*x + 5.
+
+
+def f5(x):
+    return 8*x**3 - 2*x**2 - 7*x + 3
+
+
+def _bracket_minimum(func, x1, x2):
+    phi = 1.61803398875
+    maxiter = 100
+    f1 = func(x1)
+    f2 = func(x2)
+    step = x2 - x1
+    x1, x2, f1, f2, step = ((x2, x1, f2, f1, -step) if f2 > f1
+                            else (x1, x2, f1, f2, step))
+
+    for i in range(maxiter):
+        step *= phi
+        x3 = x2 + step
+        f3 = func(x3)
+        if f3 < f2:
+            x1, x2, f1, f2 = x2, x3, f2, f3
+        else:
+            break
+    return x1, x2, x3, f1, f2, f3
+
+
+cases = [
+    (f1, -1, 11),
+    (f1, -2, 13),
+    (f1, -4, 13),
+    (f1, -8, 15),
+    (f1, -16, 16),
+    (f1, -32, 19),
+    (f1, -64, 20),
+    (f1, -128, 21),
+    (f1, -256, 21),
+    (f1, -512, 19),
+    (f1, -1024, 24),
+    (f2, -1, 8),
+    (f2, -2, 6),
+    (f2, -4, 6),
+    (f2, -8, 7),
+    (f2, -16, 8),
+    (f2, -32, 8),
+    (f2, -64, 9),
+    (f2, -128, 11),
+    (f2, -256, 13),
+    (f2, -512, 12),
+    (f2, -1024, 13),
+    (f3, -1, 11),
+    (f3, -2, 11),
+    (f3, -4, 11),
+    (f3, -8, 10),
+    (f3, -16, 14),
+    (f3, -32, 12),
+    (f3, -64, 15),
+    (f3, -128, 18),
+    (f3, -256, 18),
+    (f3, -512, 19),
+    (f3, -1024, 19),
+    (f4, -0.05, 9),
+    (f4, -0.10, 11),
+    (f4, -0.15, 11),
+    (f4, -0.20, 11),
+    (f4, -0.25, 11),
+    (f4, -0.30, 9),
+    (f4, -0.35, 9),
+    (f4, -0.40, 9),
+    (f4, -0.45, 10),
+    (f4, -0.50, 10),
+    (f4, -0.55, 10),
+    (f5, -0.05, 6),
+    (f5, -0.10, 7),
+    (f5, -0.15, 8),
+    (f5, -0.20, 10),
+    (f5, -0.25, 9),
+    (f5, -0.30, 8),
+    (f5, -0.35, 7),
+    (f5, -0.40, 7),
+    (f5, -0.45, 9),
+    (f5, -0.50, 9),
+    (f5, -0.55, 8)
+]
+
+
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+@pytest.mark.skip_xp_backends('jax.numpy',
+                              reason='JAX arrays do not support item assignment.')
+@pytest.mark.skip_xp_backends('array_api_strict',
+                              reason='Currently uses fancy indexing assignment.')
+class TestChandrupatlaMinimize:
+
+    def f(self, x, loc):
+        xp = array_namespace(x, loc)
+        res = -xp.exp(-1/2 * (x-loc)**2) / (2*xp.pi)**0.5
+        return xp.asarray(res, dtype=x.dtype)[()]
+
+    @pytest.mark.parametrize('dtype', ('float32', 'float64'))
+    @pytest.mark.parametrize('loc', [0.6, np.linspace(-1.05, 1.05, 10)])
+    def test_basic(self, loc, xp, dtype):
+        # Find mode of normal distribution. Compare mode against location
+        # parameter and value of pdf at mode against expected pdf.
+        rtol = {'float32': 5e-3, 'float64': 5e-7}[dtype]
+        dtype = getattr(xp, dtype)
+        bracket = (xp.asarray(xi, dtype=dtype) for xi in (-5, 0, 5))
+        loc = xp.asarray(loc, dtype=dtype)
+        fun = xp.broadcast_to(xp.asarray(-stats.norm.pdf(0), dtype=dtype), loc.shape)
+
+        res = _chandrupatla_minimize(self.f, *bracket, args=(loc,))
+        xp_assert_close(res.x, loc, rtol=rtol)
+        xp_assert_equal(res.fun, fun)
+
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        loc = xp.linspace(-0.05, 1.05, 12).reshape(shape) if shape else xp.asarray(0.6)
+        args = (loc,)
+        bracket = xp.asarray(-5.), xp.asarray(0.), xp.asarray(5.)
+        xp_test = array_namespace(loc)  # need xp.stack
+
+        @_vectorize(xp)
+        def chandrupatla_single(loc_single):
+            return _chandrupatla_minimize(self.f, *bracket, args=(loc_single,))
+
+        def f(*args, **kwargs):
+            f.f_evals += 1
+            return self.f(*args, **kwargs)
+        f.f_evals = 0
+
+        res = _chandrupatla_minimize(f, *bracket, args=args)
+        refs = chandrupatla_single(loc)
+
+        attrs = ['x', 'fun', 'success', 'status', 'nfev', 'nit',
+                 'xl', 'xm', 'xr', 'fl', 'fm', 'fr']
+        for attr in attrs:
+            ref_attr = xp_test.stack([getattr(ref, attr) for ref in refs])
+            res_attr = xp_ravel(getattr(res, attr))
+            xp_assert_equal(res_attr, ref_attr)
+            assert getattr(res, attr).shape == shape
+
+        xp_assert_equal(res.fun, self.f(res.x, *args))
+        xp_assert_equal(res.fl, self.f(res.xl, *args))
+        xp_assert_equal(res.fm, self.f(res.xm, *args))
+        xp_assert_equal(res.fr, self.f(res.xr, *args))
+        assert xp.max(res.nfev) == f.f_evals
+        assert xp.max(res.nit) == f.f_evals - 3
+
+        assert xp_test.isdtype(res.success.dtype, 'bool')
+        assert xp_test.isdtype(res.status.dtype, 'integral')
+        assert xp_test.isdtype(res.nfev.dtype, 'integral')
+        assert xp_test.isdtype(res.nit.dtype, 'integral')
+
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously.
+        def f(xs, js):
+            funcs = [lambda x: (x - 2.5) ** 2,
+                     lambda x: x - 10,
+                     lambda x: (x - 2.5) ** 4,
+                     lambda x: xp.full_like(x, xp.asarray(xp.nan))]
+            res = []
+            for i in range(xp_size(js)):
+                x = xs[i, ...]
+                j = int(xp_ravel(js)[i])
+                res.append(funcs[j](x))
+            return xp.stack(res)
+
+        args = (xp.arange(4, dtype=xp.int64),)
+        bracket = (xp.asarray([0]*4, dtype=xp.float64),
+                   xp.asarray([2]*4, dtype=xp.float64),
+                   xp.asarray([np.pi]*4, dtype=xp.float64))
+        res = _chandrupatla_minimize(f, *bracket, args=args, maxiter=10)
+
+        ref_flags = xp.asarray([eim._ECONVERGED, eim._ESIGNERR, eim._ECONVERR,
+                                eim._EVALUEERR], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_convergence(self, xp):
+        # Test that the convergence tolerances behave as expected
+        rng = np.random.default_rng(2585255913088665241)
+        p = xp.asarray(rng.random(size=3))
+        bracket = (xp.asarray(-5), xp.asarray(0), xp.asarray(5))
+        args = (p,)
+        kwargs0 = dict(args=args, xatol=0, xrtol=0, fatol=0, frtol=0)
+
+        kwargs = kwargs0.copy()
+        kwargs['xatol'] = 1e-3
+        res1 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        j1 = xp.abs(res1.xr - res1.xl)
+        tol = xp.asarray(4*kwargs['xatol'], dtype=p.dtype)
+        xp_assert_less(j1, xp.full((3,), tol, dtype=p.dtype))
+        kwargs['xatol'] = 1e-6
+        res2 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        j2 = xp.abs(res2.xr - res2.xl)
+        tol = xp.asarray(4*kwargs['xatol'], dtype=p.dtype)
+        xp_assert_less(j2, xp.full((3,), tol, dtype=p.dtype))
+        xp_assert_less(j2, j1)
+
+        kwargs = kwargs0.copy()
+        kwargs['xrtol'] = 1e-3
+        res1 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        j1 = xp.abs(res1.xr - res1.xl)
+        tol = xp.asarray(4*kwargs['xrtol']*xp.abs(res1.x), dtype=p.dtype)
+        xp_assert_less(j1, tol)
+        kwargs['xrtol'] = 1e-6
+        res2 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        j2 = xp.abs(res2.xr - res2.xl)
+        tol = xp.asarray(4*kwargs['xrtol']*xp.abs(res2.x), dtype=p.dtype)
+        xp_assert_less(j2, tol)
+        xp_assert_less(j2, j1)
+
+        kwargs = kwargs0.copy()
+        kwargs['fatol'] = 1e-3
+        res1 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        h1 = xp.abs(res1.fl - 2 * res1.fm + res1.fr)
+        tol = xp.asarray(2*kwargs['fatol'], dtype=p.dtype)
+        xp_assert_less(h1, xp.full((3,), tol, dtype=p.dtype))
+        kwargs['fatol'] = 1e-6
+        res2 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        h2 = xp.abs(res2.fl - 2 * res2.fm + res2.fr)
+        tol = xp.asarray(2*kwargs['fatol'], dtype=p.dtype)
+        xp_assert_less(h2, xp.full((3,), tol, dtype=p.dtype))
+        xp_assert_less(h2, h1)
+
+        kwargs = kwargs0.copy()
+        kwargs['frtol'] = 1e-3
+        res1 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        h1 = xp.abs(res1.fl - 2 * res1.fm + res1.fr)
+        tol = xp.asarray(2*kwargs['frtol']*xp.abs(res1.fun), dtype=p.dtype)
+        xp_assert_less(h1, tol)
+        kwargs['frtol'] = 1e-6
+        res2 = _chandrupatla_minimize(self.f, *bracket, **kwargs)
+        h2 = xp.abs(res2.fl - 2 * res2.fm + res2.fr)
+        tol = xp.asarray(2*kwargs['frtol']*abs(res2.fun), dtype=p.dtype)
+        xp_assert_less(h2, tol)
+        xp_assert_less(h2, h1)
+
+    def test_maxiter_callback(self, xp):
+        # Test behavior of `maxiter` parameter and `callback` interface
+        loc = xp.asarray(0.612814)
+        bracket = (xp.asarray(-5), xp.asarray(0), xp.asarray(5))
+        maxiter = 5
+
+        res = _chandrupatla_minimize(self.f, *bracket, args=(loc,),
+                                     maxiter=maxiter)
+        assert not xp.any(res.success)
+        assert xp.all(res.nfev == maxiter+3)
+        assert xp.all(res.nit == maxiter)
+
+        def callback(res):
+            callback.iter += 1
+            callback.res = res
+            assert hasattr(res, 'x')
+            if callback.iter == 0:
+                # callback is called once with initial bracket
+                assert (res.xl, res.xm, res.xr) == bracket
+            else:
+                changed_xr = (res.xl == callback.xl) & (res.xr != callback.xr)
+                changed_xl = (res.xl != callback.xl) & (res.xr == callback.xr)
+                assert xp.all(changed_xr | changed_xl)
+
+            callback.xl = res.xl
+            callback.xr = res.xr
+            assert res.status == eim._EINPROGRESS
+            xp_assert_equal(self.f(res.xl, loc), res.fl)
+            xp_assert_equal(self.f(res.xm, loc), res.fm)
+            xp_assert_equal(self.f(res.xr, loc), res.fr)
+            xp_assert_equal(self.f(res.x, loc), res.fun)
+            if callback.iter == maxiter:
+                raise StopIteration
+
+        callback.xl = xp.nan
+        callback.xr = xp.nan
+        callback.iter = -1  # callback called once before first iteration
+        callback.res = None
+
+        res2 = _chandrupatla_minimize(self.f, *bracket, args=(loc,),
+                                      callback=callback)
+
+        # terminating with callback is identical to terminating due to maxiter
+        # (except for `status`)
+        for key in res.keys():
+            if key == 'status':
+                assert res[key] == eim._ECONVERR
+                # assert callback.res[key] == eim._EINPROGRESS
+                assert res2[key] == eim._ECALLBACK
+            else:
+                assert res2[key] == callback.res[key] == res[key]
+
+    @pytest.mark.parametrize('case', cases)
+    def test_nit_expected(self, case, xp):
+        # Test that `_chandrupatla` implements Chandrupatla's algorithm:
+        # in all 55 test cases, the number of iterations performed
+        # matches the number reported in the original paper.
+        func, x1, nit = case
+
+        # Find bracket using the algorithm in the paper
+        step = 0.2
+        x2 = x1 + step
+        x1, x2, x3, f1, f2, f3 = _bracket_minimum(func, x1, x2)
+
+        # Use tolerances from original paper
+        xatol = 0.0001
+        fatol = 0.000001
+        xrtol = 1e-16
+        frtol = 1e-16
+
+        bracket = xp.asarray(x1), xp.asarray(x2), xp.asarray(x3, dtype=xp.float64)
+        res = _chandrupatla_minimize(func, *bracket, xatol=xatol,
+                                     fatol=fatol, xrtol=xrtol, frtol=frtol)
+        xp_assert_equal(res.nit, xp.asarray(nit, dtype=xp.int32))
+
+    @pytest.mark.parametrize("loc", (0.65, [0.65, 0.7]))
+    @pytest.mark.parametrize("dtype", ('float16', 'float32', 'float64'))
+    def test_dtype(self, loc, dtype, xp):
+        # Test that dtypes are preserved
+        dtype = getattr(xp, dtype)
+
+        loc = xp.asarray(loc, dtype=dtype)
+        bracket = (xp.asarray(-3, dtype=dtype),
+                   xp.asarray(1, dtype=dtype),
+                   xp.asarray(5, dtype=dtype))
+
+        xp_test = array_namespace(loc)  # need astype
+        def f(x, loc):
+            assert x.dtype == dtype
+            return xp_test.astype((x - loc)**2, dtype)
+
+        res = _chandrupatla_minimize(f, *bracket, args=(loc,))
+        assert res.x.dtype == dtype
+        xp_assert_close(res.x, loc, rtol=math.sqrt(xp.finfo(dtype).eps))
+
+    def test_input_validation(self, xp):
+        # Test input validation for appropriate error messages
+
+        message = '`func` must be callable.'
+        bracket = xp.asarray(-4), xp.asarray(0), xp.asarray(4)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(None, *bracket)
+
+        message = 'Abscissae and function output must be real numbers.'
+        bracket = xp.asarray(-4 + 1j), xp.asarray(0), xp.asarray(4)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket)
+
+        message = "...be broadcast..."
+        bracket = xp.asarray([-2, -3]), xp.asarray([0, 0]), xp.asarray([3, 4, 5])
+        # raised by `np.broadcast, but the traceback is readable IMO
+        with pytest.raises((ValueError, RuntimeError), match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket)
+
+        message = "The shape of the array returned by `func` must be the same"
+        bracket = xp.asarray([-3, -3]), xp.asarray([0, 0]), xp.asarray([5, 5])
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: [x[0, ...], x[1, ...], x[1, ...]],
+                                   *bracket)
+
+        message = 'Tolerances must be non-negative scalars.'
+        bracket = xp.asarray(-4), xp.asarray(0), xp.asarray(4)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, xatol=-1)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, xrtol=xp.nan)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, fatol='ekki')
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, frtol=xp.nan)
+
+        message = '`maxiter` must be a non-negative integer.'
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, maxiter=1.5)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, maxiter=-1)
+
+        message = '`callback` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_minimize(lambda x: x, *bracket, callback='shrubbery')
+
+    def test_bracket_order(self, xp):
+        # Confirm that order of points in bracket doesn't
+        xp_test = array_namespace(xp.asarray(1.))  # need `xp.newaxis`
+        loc = xp.linspace(-1, 1, 6)[:, xp_test.newaxis]
+        brackets = xp.asarray(list(permutations([-5, 0, 5]))).T
+        res = _chandrupatla_minimize(self.f, *brackets, args=(loc,))
+        assert xp.all(xp.isclose(res.x, loc) | (res.fun == self.f(loc, loc)))
+        ref = res.x[:, 0]  # all columns should be the same
+        xp_test = array_namespace(loc)  # need `xp.broadcast_arrays
+        xp_assert_close(*xp_test.broadcast_arrays(res.x.T, ref), rtol=1e-15)
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases
+
+        # Test that integers are not passed to `f`
+        xp_test = array_namespace(xp.asarray(1.))  # need `xp.isdtype`
+        def f(x):
+            assert xp_test.isdtype(x.dtype, "real floating")
+            return (x - 1)**2
+
+        bracket = xp.asarray(-7), xp.asarray(0), xp.asarray(8)
+        with np.errstate(invalid='ignore'):
+            res = _chandrupatla_minimize(f, *bracket, fatol=0, frtol=0)
+        assert res.success
+        xp_assert_close(res.x, xp.asarray(1.), rtol=1e-3)
+        xp_assert_close(res.fun, xp.asarray(0.), atol=1e-200)
+
+        # Test that if all elements of bracket equal minimizer, algorithm
+        # reports convergence
+        def f(x):
+            return (x-1)**2
+
+        bracket = xp.asarray(1), xp.asarray(1), xp.asarray(1)
+        res = _chandrupatla_minimize(f, *bracket)
+        assert res.success
+        xp_assert_equal(res.x, xp.asarray(1.))
+
+        # Test maxiter = 0. Should do nothing to bracket.
+        def f(x):
+            return (x-1)**2
+
+        bracket = xp.asarray(-3), xp.asarray(1.1), xp.asarray(5)
+        res = _chandrupatla_minimize(f, *bracket, maxiter=0)
+        assert res.xl, res.xr == bracket
+        assert res.nit == 0
+        assert res.nfev == 3
+        assert res.status == -2
+        assert res.x == 1.1  # best so far
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return (x-c)**2 - 1
+
+        bracket = xp.asarray(-1), xp.asarray(0), xp.asarray(1)
+        c = xp.asarray(1/3)
+        res = _chandrupatla_minimize(f, *bracket, args=(c,))
+        xp_assert_close(res.x, c)
+
+        # Test zero tolerances
+        def f(x):
+            return -xp.sin(x)
+
+        bracket = xp.asarray(0), xp.asarray(1), xp.asarray(xp.pi)
+        res = _chandrupatla_minimize(f, *bracket, xatol=0, xrtol=0, fatol=0, frtol=0)
+        assert res.success
+        # found a minimum exactly (according to floating point arithmetic)
+        assert res.xl < res.xm < res.xr
+        assert f(res.xl) == f(res.xm) == f(res.xr)
+
+
+@array_api_compatible
+@pytest.mark.usefixtures("skip_xp_backends")
+@pytest.mark.skip_xp_backends('array_api_strict',
+                              reason='Currently uses fancy indexing assignment.')
+@pytest.mark.skip_xp_backends('jax.numpy',
+                              reason='JAX arrays do not support item assignment.')
+@pytest.mark.skip_xp_backends('cupy',
+                              reason='cupy/cupy#8391')
+class TestChandrupatla(TestScalarRootFinders):
+
+    def f(self, q, p):
+        return special.ndtr(q) - p
+
+    @pytest.mark.parametrize('p', [0.6, np.linspace(-0.05, 1.05, 10)])
+    def test_basic(self, p, xp):
+        # Invert distribution CDF and compare against distribution `ppf`
+        a, b = xp.asarray(-5.), xp.asarray(5.)
+        res = _chandrupatla_root(self.f, a, b, args=(xp.asarray(p),))
+        ref = xp.asarray(stats.norm().ppf(p), dtype=xp.asarray(p).dtype)
+        xp_assert_close(res.x, ref)
+
+    @pytest.mark.parametrize('shape', [tuple(), (12,), (3, 4), (3, 2, 2)])
+    def test_vectorization(self, shape, xp):
+        # Test for correct functionality, output shapes, and dtypes for various
+        # input shapes.
+        p = (np.linspace(-0.05, 1.05, 12).reshape(shape) if shape
+             else np.float64(0.6))
+        p_xp = xp.asarray(p)
+        args_xp = (p_xp,)
+        dtype = p_xp.dtype
+        xp_test = array_namespace(p_xp)  # need xp.bool
+
+        @np.vectorize
+        def chandrupatla_single(p):
+            return _chandrupatla_root(self.f, -5, 5, args=(p,))
+
+        def f(*args, **kwargs):
+            f.f_evals += 1
+            return self.f(*args, **kwargs)
+        f.f_evals = 0
+
+        res = _chandrupatla_root(f, xp.asarray(-5.), xp.asarray(5.), args=args_xp)
+        refs = chandrupatla_single(p).ravel()
+
+        ref_x = [ref.x for ref in refs]
+        ref_x = xp.reshape(xp.asarray(ref_x, dtype=dtype), shape)
+        xp_assert_close(res.x, ref_x)
+
+        ref_fun = [ref.fun for ref in refs]
+        ref_fun = xp.reshape(xp.asarray(ref_fun, dtype=dtype), shape)
+        xp_assert_close(res.fun, ref_fun, atol=1e-15)
+        xp_assert_equal(res.fun, self.f(res.x, *args_xp))
+
+        ref_success = [bool(ref.success) for ref in refs]
+        ref_success = xp.reshape(xp.asarray(ref_success, dtype=xp_test.bool), shape)
+        xp_assert_equal(res.success, ref_success)
+
+        ref_flag = [ref.status for ref in refs]
+        ref_flag = xp.reshape(xp.asarray(ref_flag, dtype=xp.int32), shape)
+        xp_assert_equal(res.status, ref_flag)
+
+        ref_nfev = [ref.nfev for ref in refs]
+        ref_nfev = xp.reshape(xp.asarray(ref_nfev, dtype=xp.int32), shape)
+        if is_numpy(xp):
+            xp_assert_equal(res.nfev, ref_nfev)
+            assert xp.max(res.nfev) == f.f_evals
+        else:  # different backend may lead to different nfev
+            assert res.nfev.shape == shape
+            assert res.nfev.dtype == xp.int32
+
+        ref_nit = [ref.nit for ref in refs]
+        ref_nit = xp.reshape(xp.asarray(ref_nit, dtype=xp.int32), shape)
+        if is_numpy(xp):
+            xp_assert_equal(res.nit, ref_nit)
+            assert xp.max(res.nit) == f.f_evals-2
+        else:
+            assert res.nit.shape == shape
+            assert res.nit.dtype == xp.int32
+
+        ref_xl = [ref.xl for ref in refs]
+        ref_xl = xp.reshape(xp.asarray(ref_xl, dtype=dtype), shape)
+        xp_assert_close(res.xl, ref_xl)
+
+        ref_xr = [ref.xr for ref in refs]
+        ref_xr = xp.reshape(xp.asarray(ref_xr, dtype=dtype), shape)
+        xp_assert_close(res.xr, ref_xr)
+
+        xp_assert_less(res.xl, res.xr)
+        finite = xp.isfinite(res.x)
+        assert xp.all((res.x[finite] == res.xl[finite])
+                      | (res.x[finite] == res.xr[finite]))
+
+        # PyTorch and CuPy don't solve to the same accuracy as NumPy - that's OK.
+        atol = 1e-15 if is_numpy(xp) else 1e-9
+
+        ref_fl = [ref.fl for ref in refs]
+        ref_fl = xp.reshape(xp.asarray(ref_fl, dtype=dtype), shape)
+        xp_assert_close(res.fl, ref_fl, atol=atol)
+        xp_assert_equal(res.fl, self.f(res.xl, *args_xp))
+
+        ref_fr = [ref.fr for ref in refs]
+        ref_fr = xp.reshape(xp.asarray(ref_fr, dtype=dtype), shape)
+        xp_assert_close(res.fr, ref_fr, atol=atol)
+        xp_assert_equal(res.fr, self.f(res.xr, *args_xp))
+
+        assert xp.all(xp.abs(res.fun[finite]) ==
+                      xp.minimum(xp.abs(res.fl[finite]),
+                                 xp.abs(res.fr[finite])))
+
+    def test_flags(self, xp):
+        # Test cases that should produce different status flags; show that all
+        # can be produced simultaneously.
+        def f(xs, js):
+            # Note that full_like and int(j) shouldn't really be required. CuPy
+            # is just really picky here, so I'm making it a special case to
+            # make sure the other backends work when the user is less careful.
+            assert js.dtype == xp.int64
+            if is_cupy(xp):
+                funcs = [lambda x: x - 2.5,
+                         lambda x: x - 10,
+                         lambda x: (x - 0.1)**3,
+                         lambda x: xp.full_like(x, xp.asarray(xp.nan))]
+                return [funcs[int(j)](x) for x, j in zip(xs, js)]
+
+            funcs = [lambda x: x - 2.5,
+                     lambda x: x - 10,
+                     lambda x: (x - 0.1) ** 3,
+                     lambda x: xp.nan]
+            return [funcs[j](x) for x, j in zip(xs, js)]
+
+        args = (xp.arange(4, dtype=xp.int64),)
+        a, b = xp.asarray([0.]*4), xp.asarray([xp.pi]*4)
+        res = _chandrupatla_root(f, a, b, args=args, maxiter=2)
+
+        ref_flags = xp.asarray([eim._ECONVERGED,
+                                eim._ESIGNERR,
+                                eim._ECONVERR,
+                                eim._EVALUEERR], dtype=xp.int32)
+        xp_assert_equal(res.status, ref_flags)
+
+    def test_convergence(self, xp):
+        # Test that the convergence tolerances behave as expected
+        rng = np.random.default_rng(2585255913088665241)
+        p = xp.asarray(rng.random(size=3))
+        bracket = (-xp.asarray(5.), xp.asarray(5.))
+        args = (p,)
+        kwargs0 = dict(args=args, xatol=0, xrtol=0, fatol=0, frtol=0)
+
+        kwargs = kwargs0.copy()
+        kwargs['xatol'] = 1e-3
+        res1 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(res1.xr - res1.xl, xp.full_like(p, xp.asarray(1e-3)))
+        kwargs['xatol'] = 1e-6
+        res2 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(res2.xr - res2.xl, xp.full_like(p, xp.asarray(1e-6)))
+        xp_assert_less(res2.xr - res2.xl, res1.xr - res1.xl)
+
+        kwargs = kwargs0.copy()
+        kwargs['xrtol'] = 1e-3
+        res1 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(res1.xr - res1.xl, 1e-3 * xp.abs(res1.x))
+        kwargs['xrtol'] = 1e-6
+        res2 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(res2.xr - res2.xl, 1e-6 * xp.abs(res2.x))
+        xp_assert_less(res2.xr - res2.xl, res1.xr - res1.xl)
+
+        kwargs = kwargs0.copy()
+        kwargs['fatol'] = 1e-3
+        res1 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(xp.abs(res1.fun), xp.full_like(p, xp.asarray(1e-3)))
+        kwargs['fatol'] = 1e-6
+        res2 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(xp.abs(res2.fun), xp.full_like(p, xp.asarray(1e-6)))
+        xp_assert_less(xp.abs(res2.fun), xp.abs(res1.fun))
+
+        kwargs = kwargs0.copy()
+        kwargs['frtol'] = 1e-3
+        x1, x2 = bracket
+        f0 = xp.minimum(xp.abs(self.f(x1, *args)), xp.abs(self.f(x2, *args)))
+        res1 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(xp.abs(res1.fun), 1e-3*f0)
+        kwargs['frtol'] = 1e-6
+        res2 = _chandrupatla_root(self.f, *bracket, **kwargs)
+        xp_assert_less(xp.abs(res2.fun), 1e-6*f0)
+        xp_assert_less(xp.abs(res2.fun), xp.abs(res1.fun))
+
+    def test_maxiter_callback(self, xp):
+        # Test behavior of `maxiter` parameter and `callback` interface
+        p = xp.asarray(0.612814)
+        bracket = (xp.asarray(-5.), xp.asarray(5.))
+        maxiter = 5
+
+        def f(q, p):
+            res = special.ndtr(q) - p
+            f.x = q
+            f.fun = res
+            return res
+        f.x = None
+        f.fun = None
+
+        res = _chandrupatla_root(f, *bracket, args=(p,), maxiter=maxiter)
+        assert not xp.any(res.success)
+        assert xp.all(res.nfev == maxiter+2)
+        assert xp.all(res.nit == maxiter)
+
+        def callback(res):
+            callback.iter += 1
+            callback.res = res
+            assert hasattr(res, 'x')
+            if callback.iter == 0:
+                # callback is called once with initial bracket
+                assert (res.xl, res.xr) == bracket
+            else:
+                changed = (((res.xl == callback.xl) & (res.xr != callback.xr))
+                           | ((res.xl != callback.xl) & (res.xr == callback.xr)))
+                assert xp.all(changed)
+
+            callback.xl = res.xl
+            callback.xr = res.xr
+            assert res.status == eim._EINPROGRESS
+            xp_assert_equal(self.f(res.xl, p), res.fl)
+            xp_assert_equal(self.f(res.xr, p), res.fr)
+            xp_assert_equal(self.f(res.x, p), res.fun)
+            if callback.iter == maxiter:
+                raise StopIteration
+        callback.iter = -1  # callback called once before first iteration
+        callback.res = None
+        callback.xl = None
+        callback.xr = None
+
+        res2 = _chandrupatla_root(f, *bracket, args=(p,), callback=callback)
+
+        # terminating with callback is identical to terminating due to maxiter
+        # (except for `status`)
+        for key in res.keys():
+            if key == 'status':
+                xp_assert_equal(res[key], xp.asarray(eim._ECONVERR, dtype=xp.int32))
+                xp_assert_equal(res2[key], xp.asarray(eim._ECALLBACK, dtype=xp.int32))
+            elif key.startswith('_'):
+                continue
+            else:
+                xp_assert_equal(res2[key], res[key])
+
+    @pytest.mark.parametrize('case', _CHANDRUPATLA_TESTS)
+    def test_nit_expected(self, case, xp):
+        # Test that `_chandrupatla` implements Chandrupatla's algorithm:
+        # in all 40 test cases, the number of iterations performed
+        # matches the number reported in the original paper.
+        f, bracket, root, nfeval, id = case
+        # Chandrupatla's criterion is equivalent to
+        # abs(x2-x1) < 4*abs(xmin)*xrtol + xatol, but we use the more standard
+        # abs(x2-x1) < abs(xmin)*xrtol + xatol. Therefore, set xrtol to 4x
+        # that used by Chandrupatla in tests.
+        bracket = (xp.asarray(bracket[0], dtype=xp.float64),
+                   xp.asarray(bracket[1], dtype=xp.float64))
+        root = xp.asarray(root, dtype=xp.float64)
+
+        res = _chandrupatla_root(f, *bracket, xrtol=4e-10, xatol=1e-5)
+        xp_assert_close(res.fun, xp.asarray(f(root), dtype=xp.float64),
+                        rtol=1e-8, atol=2e-3)
+        xp_assert_equal(res.nfev, xp.asarray(nfeval, dtype=xp.int32))
+
+    @pytest.mark.parametrize("root", (0.622, [0.622, 0.623]))
+    @pytest.mark.parametrize("dtype", ('float16', 'float32', 'float64'))
+    def test_dtype(self, root, dtype, xp):
+        # Test that dtypes are preserved
+        not_numpy = not is_numpy(xp)
+        if not_numpy and dtype == 'float16':
+            pytest.skip("`float16` dtype only supported for NumPy arrays.")
+
+        dtype = getattr(xp, dtype, None)
+        if dtype is None:
+            pytest.skip(f"{xp} does not support {dtype}")
+
+        def f(x, root):
+            res = (x - root) ** 3.
+            if is_numpy(xp):  # NumPy does not preserve dtype
+                return xp.asarray(res, dtype=dtype)
+            return res
+
+        a, b = xp.asarray(-3, dtype=dtype), xp.asarray(3, dtype=dtype)
+        root = xp.asarray(root, dtype=dtype)
+        res = _chandrupatla_root(f, a, b, args=(root,), xatol=1e-3)
+        try:
+            xp_assert_close(res.x, root, atol=1e-3)
+        except AssertionError:
+            assert res.x.dtype == dtype
+            xp.all(res.fun == 0)
+
+    def test_input_validation(self, xp):
+        # Test input validation for appropriate error messages
+
+        def func(x):
+            return x
+
+        message = '`func` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            bracket = xp.asarray(-4), xp.asarray(4)
+            _chandrupatla_root(None, *bracket)
+
+        message = 'Abscissae and function output must be real numbers.'
+        with pytest.raises(ValueError, match=message):
+            bracket = xp.asarray(-4+1j), xp.asarray(4)
+            _chandrupatla_root(func, *bracket)
+
+        # raised by `np.broadcast, but the traceback is readable IMO
+        message = "...not be broadcast..."  # all messages include this part
+        with pytest.raises((ValueError, RuntimeError), match=message):
+            bracket = xp.asarray([-2, -3]), xp.asarray([3, 4, 5])
+            _chandrupatla_root(func, *bracket)
+
+        message = "The shape of the array returned by `func`..."
+        with pytest.raises(ValueError, match=message):
+            bracket = xp.asarray([-3, -3]), xp.asarray([5, 5])
+            _chandrupatla_root(lambda x: [x[0], x[1], x[1]], *bracket)
+
+        message = 'Tolerances must be non-negative scalars.'
+        bracket = xp.asarray(-4), xp.asarray(4)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, xatol=-1)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, xrtol=xp.nan)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, fatol='ekki')
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, frtol=xp.nan)
+
+        message = '`maxiter` must be a non-negative integer.'
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, maxiter=1.5)
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, maxiter=-1)
+
+        message = '`callback` must be callable.'
+        with pytest.raises(ValueError, match=message):
+            _chandrupatla_root(func, *bracket, callback='shrubbery')
+
+    def test_special_cases(self, xp):
+        # Test edge cases and other special cases
+
+        # Test infinite function values
+        def f(x):
+            return 1 / x + 1 - 1 / (-x + 1)
+
+        a, b = xp.asarray([0.1, 0., 0., 0.1]),  xp.asarray([0.9, 1.0, 0.9, 1.0])
+
+        with np.errstate(divide='ignore', invalid='ignore'):
+            res = _chandrupatla_root(f, a, b)
+
+        assert xp.all(res.success)
+        xp_assert_close(res.x[1:], xp.full((3,), res.x[0]))
+
+        # Test that integers are not passed to `f`
+        # (otherwise this would overflow)
+        xp_test = array_namespace(a)  # need isdtype
+        def f(x):
+            assert xp_test.isdtype(x.dtype, "real floating")
+            # this would overflow if x were an xp integer dtype
+            return x ** 31 - 1
+
+        # note that all inputs are integer type; result is automatically default float
+        res = _chandrupatla_root(f, xp.asarray(-7), xp.asarray(5))
+        assert res.success
+        xp_assert_close(res.x, xp.asarray(1.))
+
+        # Test that if both ends of bracket equal root, algorithm reports
+        # convergence.
+        def f(x, root):
+            return x**2 - root
+
+        root = xp.asarray([0, 1])
+        res = _chandrupatla_root(f, xp.asarray(1), xp.asarray(1), args=(root,))
+        xp_assert_equal(res.success, xp.asarray([False, True]))
+        xp_assert_equal(res.x, xp.asarray([xp.nan, 1.]))
+
+        def f(x):
+            return 1/x
+
+        with np.errstate(invalid='ignore'):
+            inf = xp.asarray(xp.inf)
+            res = _chandrupatla_root(f, inf, inf)
+        assert res.success
+        xp_assert_equal(res.x, xp.asarray(xp.inf))
+
+        # Test maxiter = 0. Should do nothing to bracket.
+        def f(x):
+            return x**3 - 1
+
+        a, b = xp.asarray(-3.), xp.asarray(5.)
+        res = _chandrupatla_root(f, a, b, maxiter=0)
+        xp_assert_equal(res.success, xp.asarray(False))
+        xp_assert_equal(res.status, xp.asarray(-2, dtype=xp.int32))
+        xp_assert_equal(res.nit, xp.asarray(0, dtype=xp.int32))
+        xp_assert_equal(res.nfev, xp.asarray(2, dtype=xp.int32))
+        xp_assert_equal(res.xl, a)
+        xp_assert_equal(res.xr, b)
+        # The `x` attribute is the one with the smaller function value
+        xp_assert_equal(res.x, a)
+        # Reverse bracket; check that this is still true
+        res = _chandrupatla_root(f, -b, -a, maxiter=0)
+        xp_assert_equal(res.x, -a)
+
+        # Test maxiter = 1
+        res = _chandrupatla_root(f, a, b, maxiter=1)
+        xp_assert_equal(res.success, xp.asarray(True))
+        xp_assert_equal(res.status, xp.asarray(0, dtype=xp.int32))
+        xp_assert_equal(res.nit, xp.asarray(1, dtype=xp.int32))
+        xp_assert_equal(res.nfev, xp.asarray(3, dtype=xp.int32))
+        xp_assert_close(res.x, xp.asarray(1.))
+
+        # Test scalar `args` (not in tuple)
+        def f(x, c):
+            return c*x - 1
+
+        res = _chandrupatla_root(f, xp.asarray(-1), xp.asarray(1), args=xp.asarray(3))
+        xp_assert_close(res.x, xp.asarray(1/3))
+
+        # # TODO: Test zero tolerance
+        # # ~~What's going on here - why are iterations repeated?~~
+        # # tl goes to zero when xatol=xrtol=0. When function is nearly linear,
+        # # this causes convergence issues.
+        # def f(x):
+        #     return np.cos(x)
+        #
+        # res = _chandrupatla_root(f, 0, np.pi, xatol=0, xrtol=0)
+        # assert res.nit < 100
+        # xp = np.nextafter(res.x, np.inf)
+        # xm = np.nextafter(res.x, -np.inf)
+        # assert np.abs(res.fun) < np.abs(f(xp))
+        # assert np.abs(res.fun) < np.abs(f(xm))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyla.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyla.py
new file mode 100644
index 0000000000000000000000000000000000000000..bd27eb9baa27433d1f801e8582dd2e8d29db3da2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyla.py
@@ -0,0 +1,166 @@
+import math
+
+import numpy as np
+from numpy.testing import assert_allclose, assert_, assert_array_equal
+import pytest
+
+from scipy.optimize import fmin_cobyla, minimize, Bounds
+
+
+class TestCobyla:
+    def setup_method(self):
+        self.x0 = [4.95, 0.66]
+        self.solution = [math.sqrt(25 - (2.0/3)**2), 2.0/3]
+        self.opts = {'disp': False, 'rhobeg': 1, 'tol': 1e-5,
+                     'maxiter': 100}
+
+    def fun(self, x):
+        return x[0]**2 + abs(x[1])**3
+
+    def con1(self, x):
+        return x[0]**2 + x[1]**2 - 25
+
+    def con2(self, x):
+        return -self.con1(x)
+
+    @pytest.mark.xslow(True, reason='not slow, but noisy so only run rarely')
+    def test_simple(self, capfd):
+        # use disp=True as smoke test for gh-8118
+        x = fmin_cobyla(self.fun, self.x0, [self.con1, self.con2], rhobeg=1,
+                        rhoend=1e-5, maxfun=100, disp=True)
+        assert_allclose(x, self.solution, atol=1e-4)
+
+    def test_minimize_simple(self):
+        class Callback:
+            def __init__(self):
+                self.n_calls = 0
+                self.last_x = None
+
+            def __call__(self, x):
+                self.n_calls += 1
+                self.last_x = x
+
+        callback = Callback()
+
+        # Minimize with method='COBYLA'
+        cons = ({'type': 'ineq', 'fun': self.con1},
+                {'type': 'ineq', 'fun': self.con2})
+        sol = minimize(self.fun, self.x0, method='cobyla', constraints=cons,
+                       callback=callback, options=self.opts)
+        assert_allclose(sol.x, self.solution, atol=1e-4)
+        assert_(sol.success, sol.message)
+        assert_(sol.maxcv < 1e-5, sol)
+        assert_(sol.nfev < 70, sol)
+        assert_(sol.fun < self.fun(self.solution) + 1e-3, sol)
+        assert_(sol.nfev == callback.n_calls,
+                "Callback is not called exactly once for every function eval.")
+        assert_array_equal(
+            sol.x,
+            callback.last_x,
+            "Last design vector sent to the callback is not equal to returned value.",
+        )
+
+    def test_minimize_constraint_violation(self):
+        rng = np.random.RandomState(1234)
+        pb = rng.rand(10, 10)
+        spread = rng.rand(10)
+
+        def p(w):
+            return pb.dot(w)
+
+        def f(w):
+            return -(w * spread).sum()
+
+        def c1(w):
+            return 500 - abs(p(w)).sum()
+
+        def c2(w):
+            return 5 - abs(p(w).sum())
+
+        def c3(w):
+            return 5 - abs(p(w)).max()
+
+        cons = ({'type': 'ineq', 'fun': c1},
+                {'type': 'ineq', 'fun': c2},
+                {'type': 'ineq', 'fun': c3})
+        w0 = np.zeros((10,))
+        sol = minimize(f, w0, method='cobyla', constraints=cons,
+                       options={'catol': 1e-6})
+        assert_(sol.maxcv > 1e-6)
+        assert_(not sol.success)
+
+
+def test_vector_constraints():
+    # test that fmin_cobyla and minimize can take a combination
+    # of constraints, some returning a number and others an array
+    def fun(x):
+        return (x[0] - 1)**2 + (x[1] - 2.5)**2
+
+    def fmin(x):
+        return fun(x) - 1
+
+    def cons1(x):
+        a = np.array([[1, -2, 2], [-1, -2, 6], [-1, 2, 2]])
+        return np.array([a[i, 0] * x[0] + a[i, 1] * x[1] +
+                         a[i, 2] for i in range(len(a))])
+
+    def cons2(x):
+        return x     # identity, acts as bounds x > 0
+
+    x0 = np.array([2, 0])
+    cons_list = [fun, cons1, cons2]
+
+    xsol = [1.4, 1.7]
+    fsol = 0.8
+
+    # testing fmin_cobyla
+    sol = fmin_cobyla(fun, x0, cons_list, rhoend=1e-5)
+    assert_allclose(sol, xsol, atol=1e-4)
+
+    sol = fmin_cobyla(fun, x0, fmin, rhoend=1e-5)
+    assert_allclose(fun(sol), 1, atol=1e-4)
+
+    # testing minimize
+    constraints = [{'type': 'ineq', 'fun': cons} for cons in cons_list]
+    sol = minimize(fun, x0, constraints=constraints, tol=1e-5)
+    assert_allclose(sol.x, xsol, atol=1e-4)
+    assert_(sol.success, sol.message)
+    assert_allclose(sol.fun, fsol, atol=1e-4)
+
+    constraints = {'type': 'ineq', 'fun': fmin}
+    sol = minimize(fun, x0, constraints=constraints, tol=1e-5)
+    assert_allclose(sol.fun, 1, atol=1e-4)
+
+
+class TestBounds:
+    # Test cobyla support for bounds (only when used via `minimize`)
+    # Invalid bounds is tested in
+    # test_optimize.TestOptimizeSimple.test_minimize_invalid_bounds
+
+    def test_basic(self):
+        def f(x):
+            return np.sum(x**2)
+
+        lb = [-1, None, 1, None, -0.5]
+        ub = [-0.5, -0.5, None, None, -0.5]
+        bounds = [(a, b) for a, b in zip(lb, ub)]
+        # these are converted to Bounds internally
+
+        res = minimize(f, x0=[1, 2, 3, 4, 5], method='cobyla', bounds=bounds)
+        ref = [-0.5, -0.5, 1, 0, -0.5]
+        assert res.success
+        assert_allclose(res.x, ref, atol=1e-3)
+
+    def test_unbounded(self):
+        def f(x):
+            return np.sum(x**2)
+
+        bounds = Bounds([-np.inf, -np.inf], [np.inf, np.inf])
+        res = minimize(f, x0=[1, 2], method='cobyla', bounds=bounds)
+        assert res.success
+        assert_allclose(res.x, 0, atol=1e-3)
+
+        bounds = Bounds([1, -np.inf], [np.inf, np.inf])
+        res = minimize(f, x0=[1, 2], method='cobyla', bounds=bounds)
+        assert res.success
+        assert_allclose(res.x, [1, 0], atol=1e-3)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyqa.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyqa.py
new file mode 100644
index 0000000000000000000000000000000000000000..bf16af71625c4d476353407f9708c981915b098a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cobyqa.py
@@ -0,0 +1,252 @@
+import numpy as np
+import pytest
+import threading
+from numpy.testing import assert_allclose, assert_equal
+
+from scipy.optimize import (
+    Bounds,
+    LinearConstraint,
+    NonlinearConstraint,
+    OptimizeResult,
+    minimize,
+)
+
+
+class TestCOBYQA:
+
+    def setup_method(self):
+        self.x0 = [4.95, 0.66]
+        self.options = {'maxfev': 100}
+
+    @staticmethod
+    def fun(x, c=1.0):
+        return x[0]**2 + c * abs(x[1])**3
+
+    @staticmethod
+    def con(x):
+        return x[0]**2 + x[1]**2 - 25.0
+
+    def test_minimize_simple(self):
+        class Callback:
+            def __init__(self):
+                self.lock = threading.Lock()
+                self.n_calls = 0
+
+            def __call__(self, x):
+                assert isinstance(x, np.ndarray)
+                with self.lock:
+                    self.n_calls += 1
+
+        class CallbackNewSyntax:
+            def __init__(self):
+                self.lock = threading.Lock()
+                self.n_calls = 0
+
+            def __call__(self, intermediate_result):
+                assert isinstance(intermediate_result, OptimizeResult)
+                with self.lock:
+                    self.n_calls += 1
+
+        x0 = [4.95, 0.66]
+        callback = Callback()
+        callback_new_syntax = CallbackNewSyntax()
+
+        # Minimize with method='cobyqa'.
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        sol = minimize(
+            self.fun,
+            x0,
+            method='cobyqa',
+            constraints=constraints,
+            callback=callback,
+            options=self.options,
+        )
+        sol_new = minimize(
+            self.fun,
+            x0,
+            method='cobyqa',
+            constraints=constraints,
+            callback=callback_new_syntax,
+            options=self.options,
+        )
+        solution = [np.sqrt(25.0 - 4.0 / 9.0), 2.0 / 3.0]
+        assert_allclose(sol.x, solution, atol=1e-4)
+        assert sol.success, sol.message
+        assert sol.maxcv < 1e-8, sol
+        assert sol.nfev <= 100, sol
+        assert sol.fun < self.fun(solution) + 1e-3, sol
+        assert sol.nfev == callback.n_calls, \
+            "Callback is not called exactly once for every function eval."
+        assert_equal(sol.x, sol_new.x)
+        assert sol_new.success, sol_new.message
+        assert sol.fun == sol_new.fun
+        assert sol.maxcv == sol_new.maxcv
+        assert sol.nfev == sol_new.nfev
+        assert sol.nit == sol_new.nit
+        assert sol_new.nfev == callback_new_syntax.n_calls, \
+            "Callback is not called exactly once for every function eval."
+
+    def test_minimize_bounds(self):
+        def fun_check_bounds(x):
+            assert np.all(bounds.lb <= x) and np.all(x <= bounds.ub)
+            return self.fun(x)
+
+        # Case where the bounds are not active at the solution.
+        bounds = Bounds([4.5, 0.6], [5.0, 0.7])
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        sol = minimize(
+            fun_check_bounds,
+            self.x0,
+            method='cobyqa',
+            bounds=bounds,
+            constraints=constraints,
+            options=self.options,
+        )
+        solution = [np.sqrt(25.0 - 4.0 / 9.0), 2.0 / 3.0]
+        assert_allclose(sol.x, solution, atol=1e-4)
+        assert sol.success, sol.message
+        assert sol.maxcv < 1e-8, sol
+        assert np.all(bounds.lb <= sol.x) and np.all(sol.x <= bounds.ub), sol
+        assert sol.nfev <= 100, sol
+        assert sol.fun < self.fun(solution) + 1e-3, sol
+
+        # Case where the bounds are active at the solution.
+        bounds = Bounds([5.0, 0.6], [5.5, 0.65])
+        sol = minimize(
+            fun_check_bounds,
+            self.x0,
+            method='cobyqa',
+            bounds=bounds,
+            constraints=constraints,
+            options=self.options,
+        )
+        assert not sol.success, sol.message
+        assert sol.maxcv > 0.35, sol
+        assert np.all(bounds.lb <= sol.x) and np.all(sol.x <= bounds.ub), sol
+        assert sol.nfev <= 100, sol
+
+    def test_minimize_linear_constraints(self):
+        constraints = LinearConstraint([1.0, 1.0], 1.0, 1.0)
+        sol = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            constraints=constraints,
+            options=self.options,
+        )
+        solution = [(4 - np.sqrt(7)) / 3, (np.sqrt(7) - 1) / 3]
+        assert_allclose(sol.x, solution, atol=1e-4)
+        assert sol.success, sol.message
+        assert sol.maxcv < 1e-8, sol
+        assert sol.nfev <= 100, sol
+        assert sol.fun < self.fun(solution) + 1e-3, sol
+
+    def test_minimize_args(self):
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        sol = minimize(
+            self.fun,
+            self.x0,
+            args=(2.0,),
+            method='cobyqa',
+            constraints=constraints,
+            options=self.options,
+        )
+        solution = [np.sqrt(25.0 - 4.0 / 36.0), 2.0 / 6.0]
+        assert_allclose(sol.x, solution, atol=1e-4)
+        assert sol.success, sol.message
+        assert sol.maxcv < 1e-8, sol
+        assert sol.nfev <= 100, sol
+        assert sol.fun < self.fun(solution, 2.0) + 1e-3, sol
+
+    def test_minimize_array(self):
+        def fun_array(x, dim):
+            f = np.array(self.fun(x))
+            return np.reshape(f, (1,) * dim)
+
+        # The argument fun can return an array with a single element.
+        bounds = Bounds([4.5, 0.6], [5.0, 0.7])
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        sol = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            bounds=bounds,
+            constraints=constraints,
+            options=self.options,
+        )
+        for dim in [0, 1, 2]:
+            sol_array = minimize(
+                fun_array,
+                self.x0,
+                args=(dim,),
+                method='cobyqa',
+                bounds=bounds,
+                constraints=constraints,
+                options=self.options,
+            )
+            assert_equal(sol.x, sol_array.x)
+            assert sol_array.success, sol_array.message
+            assert sol.fun == sol_array.fun
+            assert sol.maxcv == sol_array.maxcv
+            assert sol.nfev == sol_array.nfev
+            assert sol.nit == sol_array.nit
+
+        # The argument fun cannot return an array with more than one element.
+        with pytest.raises(TypeError):
+            minimize(
+                lambda x: np.array([self.fun(x), self.fun(x)]),
+                self.x0,
+                method='cobyqa',
+                bounds=bounds,
+                constraints=constraints,
+                options=self.options,
+            )
+
+    def test_minimize_maxfev(self):
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        options = {'maxfev': 2}
+        sol = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            constraints=constraints,
+            options=options,
+        )
+        assert not sol.success, sol.message
+        assert sol.nfev <= 2, sol
+
+    def test_minimize_maxiter(self):
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        options = {'maxiter': 2}
+        sol = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            constraints=constraints,
+            options=options,
+        )
+        assert not sol.success, sol.message
+        assert sol.nit <= 2, sol
+
+    def test_minimize_f_target(self):
+        constraints = NonlinearConstraint(self.con, 0.0, 0.0)
+        sol_ref = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            constraints=constraints,
+            options=self.options,
+        )
+        options = dict(self.options)
+        options['f_target'] = sol_ref.fun
+        sol = minimize(
+            self.fun,
+            self.x0,
+            method='cobyqa',
+            constraints=constraints,
+            options=options,
+        )
+        assert sol.success, sol.message
+        assert sol.maxcv < 1e-8, sol
+        assert sol.nfev <= sol_ref.nfev, sol
+        assert sol.fun <= sol_ref.fun, sol
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraint_conversion.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraint_conversion.py
new file mode 100644
index 0000000000000000000000000000000000000000..c33183d5cb4e7ccaf4d755cbd2d8b28afaf46395
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraint_conversion.py
@@ -0,0 +1,286 @@
+"""
+Unit test for constraint conversion
+"""
+
+import numpy as np
+from numpy.testing import (assert_array_almost_equal,
+                           assert_allclose, assert_warns, suppress_warnings)
+import pytest
+from scipy.optimize import (NonlinearConstraint, LinearConstraint,
+                            OptimizeWarning, minimize, BFGS)
+from .test_minimize_constrained import (Maratos, HyperbolicIneq, Rosenbrock,
+                                        IneqRosenbrock, EqIneqRosenbrock,
+                                        BoundedRosenbrock, Elec)
+
+
+class TestOldToNew:
+    x0 = (2, 0)
+    bnds = ((0, None), (0, None))
+    method = "trust-constr"
+
+    def test_constraint_dictionary_1(self):
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2
+        cons = ({'type': 'ineq', 'fun': lambda x: x[0] - 2 * x[1] + 2},
+                {'type': 'ineq', 'fun': lambda x: -x[0] - 2 * x[1] + 6},
+                {'type': 'ineq', 'fun': lambda x: -x[0] + 2 * x[1] + 2})
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            res = minimize(fun, self.x0, method=self.method,
+                           bounds=self.bnds, constraints=cons)
+        assert_allclose(res.x, [1.4, 1.7], rtol=1e-4)
+        assert_allclose(res.fun, 0.8, rtol=1e-4)
+
+    def test_constraint_dictionary_2(self):
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2
+        cons = {'type': 'eq',
+                'fun': lambda x, p1, p2: p1*x[0] - p2*x[1],
+                'args': (1, 1.1),
+                'jac': lambda x, p1, p2: np.array([[p1, -p2]])}
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            res = minimize(fun, self.x0, method=self.method,
+                           bounds=self.bnds, constraints=cons)
+        assert_allclose(res.x, [1.7918552, 1.62895927])
+        assert_allclose(res.fun, 1.3857466063348418)
+
+    def test_constraint_dictionary_3(self):
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2
+        cons = [{'type': 'ineq', 'fun': lambda x: x[0] - 2 * x[1] + 2},
+                NonlinearConstraint(lambda x: x[0] - x[1], 0, 0)]
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            res = minimize(fun, self.x0, method=self.method,
+                           bounds=self.bnds, constraints=cons)
+        assert_allclose(res.x, [1.75, 1.75], rtol=1e-4)
+        assert_allclose(res.fun, 1.125, rtol=1e-4)
+
+
+class TestNewToOld:
+    @pytest.mark.fail_slow(2)
+    def test_multiple_constraint_objects(self, num_parallel_threads):
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2 + (x[2] - 0.75) ** 2
+        x0 = [2, 0, 1]
+        coni = []  # only inequality constraints (can use cobyla)
+        methods = ["slsqp", "cobyla", "cobyqa", "trust-constr"]
+
+        # mixed old and new
+        coni.append([{'type': 'ineq', 'fun': lambda x: x[0] - 2 * x[1] + 2},
+                     NonlinearConstraint(lambda x: x[0] - x[1], -1, 1)])
+
+        coni.append([LinearConstraint([1, -2, 0], -2, np.inf),
+                     NonlinearConstraint(lambda x: x[0] - x[1], -1, 1)])
+
+        coni.append([NonlinearConstraint(lambda x: x[0] - 2 * x[1] + 2, 0, np.inf),
+                     NonlinearConstraint(lambda x: x[0] - x[1], -1, 1)])
+
+        for con in coni:
+            funs = {}
+            for method in methods:
+                with suppress_warnings() as sup:
+                    sup.filter(UserWarning)
+                    result = minimize(fun, x0, method=method, constraints=con)
+                    funs[method] = result.fun
+            assert_allclose(funs['slsqp'], funs['trust-constr'], rtol=1e-4)
+            assert_allclose(funs['cobyla'], funs['trust-constr'], rtol=1e-4)
+            if num_parallel_threads == 1:
+                assert_allclose(funs['cobyqa'], funs['trust-constr'],
+                                rtol=1e-4)
+
+    @pytest.mark.fail_slow(20)
+    def test_individual_constraint_objects(self, num_parallel_threads):
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2 + (x[2] - 0.75) ** 2
+        x0 = [2, 0, 1]
+
+        cone = []  # with equality constraints (can't use cobyla)
+        coni = []  # only inequality constraints (can use cobyla)
+        methods = ["slsqp", "cobyla", "cobyqa", "trust-constr"]
+
+        # nonstandard data types for constraint equality bounds
+        cone.append(NonlinearConstraint(lambda x: x[0] - x[1], 1, 1))
+        cone.append(NonlinearConstraint(lambda x: x[0] - x[1], [1.21], [1.21]))
+        cone.append(NonlinearConstraint(lambda x: x[0] - x[1],
+                                        1.21, np.array([1.21])))
+
+        # multiple equalities
+        cone.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    1.21, 1.21))  # two same equalities
+        cone.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [1.21, 1.4], [1.21, 1.4]))  # two different equalities
+        cone.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [1.21, 1.21], 1.21))  # equality specified two ways
+        cone.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [1.21, -np.inf], [1.21, np.inf]))  # equality + unbounded
+
+        # nonstandard data types for constraint inequality bounds
+        coni.append(NonlinearConstraint(lambda x: x[0] - x[1], 1.21, np.inf))
+        coni.append(NonlinearConstraint(lambda x: x[0] - x[1], [1.21], np.inf))
+        coni.append(NonlinearConstraint(lambda x: x[0] - x[1],
+                                        1.21, np.array([np.inf])))
+        coni.append(NonlinearConstraint(lambda x: x[0] - x[1], -np.inf, -3))
+        coni.append(NonlinearConstraint(lambda x: x[0] - x[1],
+                                        np.array(-np.inf), -3))
+
+        # multiple inequalities/equalities
+        coni.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    1.21, np.inf))  # two same inequalities
+        cone.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [1.21, -np.inf], [1.21, 1.4]))  # mixed equality/inequality
+        coni.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [1.1, .8], [1.2, 1.4]))  # bounded above and below
+        coni.append(NonlinearConstraint(
+                    lambda x: [x[0] - x[1], x[1] - x[2]],
+                    [-1.2, -1.4], [-1.1, -.8]))  # - bounded above and below
+
+        # quick check of LinearConstraint class (very little new code to test)
+        cone.append(LinearConstraint([1, -1, 0], 1.21, 1.21))
+        cone.append(LinearConstraint([[1, -1, 0], [0, 1, -1]], 1.21, 1.21))
+        cone.append(LinearConstraint([[1, -1, 0], [0, 1, -1]],
+                                     [1.21, -np.inf], [1.21, 1.4]))
+
+        for con in coni:
+            funs = {}
+            for method in methods:
+                with suppress_warnings() as sup:
+                    sup.filter(UserWarning)
+                    result = minimize(fun, x0, method=method, constraints=con)
+                    funs[method] = result.fun
+            assert_allclose(funs['slsqp'], funs['trust-constr'], rtol=1e-3)
+            assert_allclose(funs['cobyla'], funs['trust-constr'], rtol=1e-3)
+            if num_parallel_threads == 1:
+                assert_allclose(funs['cobyqa'], funs['trust-constr'],
+                                rtol=1e-3)
+
+        for con in cone:
+            funs = {}
+            for method in [method for method in methods if method != 'cobyla']:
+                with suppress_warnings() as sup:
+                    sup.filter(UserWarning)
+                    result = minimize(fun, x0, method=method, constraints=con)
+                    funs[method] = result.fun
+            assert_allclose(funs['slsqp'], funs['trust-constr'], rtol=1e-3)
+            if num_parallel_threads == 1:
+                assert_allclose(funs['cobyqa'], funs['trust-constr'],
+                                rtol=1e-3)
+
+
+class TestNewToOldSLSQP:
+    method = 'slsqp'
+    elec = Elec(n_electrons=2)
+    elec.x_opt = np.array([-0.58438468, 0.58438466, 0.73597047,
+                           -0.73597044, 0.34180668, -0.34180667])
+    brock = BoundedRosenbrock()
+    brock.x_opt = [0, 0]
+    list_of_problems = [Maratos(),
+                        HyperbolicIneq(),
+                        Rosenbrock(),
+                        IneqRosenbrock(),
+                        EqIneqRosenbrock(),
+                        elec,
+                        brock
+                        ]
+
+    def test_list_of_problems(self):
+
+        for prob in self.list_of_problems:
+
+            with suppress_warnings() as sup:
+                sup.filter(UserWarning)
+                result = minimize(prob.fun, prob.x0,
+                                  method=self.method,
+                                  bounds=prob.bounds,
+                                  constraints=prob.constr)
+
+            assert_array_almost_equal(result.x, prob.x_opt, decimal=3)
+
+    @pytest.mark.thread_unsafe
+    def test_warn_mixed_constraints(self):
+        # warns about inefficiency of mixed equality/inequality constraints
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2 + (x[2] - 0.75) ** 2
+        cons = NonlinearConstraint(lambda x: [x[0]**2 - x[1], x[1] - x[2]],
+                                   [1.1, .8], [1.1, 1.4])
+        bnds = ((0, None), (0, None), (0, None))
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            assert_warns(OptimizeWarning, minimize, fun, (2, 0, 1),
+                         method=self.method, bounds=bnds, constraints=cons)
+
+    @pytest.mark.thread_unsafe
+    def test_warn_ignored_options(self):
+        # warns about constraint options being ignored
+        def fun(x):
+            return (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2 + (x[2] - 0.75) ** 2
+        x0 = (2, 0, 1)
+
+        if self.method == "slsqp":
+            bnds = ((0, None), (0, None), (0, None))
+        else:
+            bnds = None
+
+        cons = NonlinearConstraint(lambda x: x[0], 2, np.inf)
+        res = minimize(fun, x0, method=self.method,
+                       bounds=bnds, constraints=cons)
+        # no warnings without constraint options
+        assert_allclose(res.fun, 1)
+
+        cons = LinearConstraint([1, 0, 0], 2, np.inf)
+        res = minimize(fun, x0, method=self.method,
+                       bounds=bnds, constraints=cons)
+        # no warnings without constraint options
+        assert_allclose(res.fun, 1)
+
+        cons = []
+        cons.append(NonlinearConstraint(lambda x: x[0]**2, 2, np.inf,
+                                        keep_feasible=True))
+        cons.append(NonlinearConstraint(lambda x: x[0]**2, 2, np.inf,
+                                        hess=BFGS()))
+        cons.append(NonlinearConstraint(lambda x: x[0]**2, 2, np.inf,
+                                        finite_diff_jac_sparsity=42))
+        cons.append(NonlinearConstraint(lambda x: x[0]**2, 2, np.inf,
+                                        finite_diff_rel_step=42))
+        cons.append(LinearConstraint([1, 0, 0], 2, np.inf,
+                                     keep_feasible=True))
+        for con in cons:
+            assert_warns(OptimizeWarning, minimize, fun, x0,
+                         method=self.method, bounds=bnds, constraints=cons)
+
+
+class TestNewToOldCobyla:
+    method = 'cobyla'
+
+    list_of_problems = [
+                        Elec(n_electrons=2),
+                        Elec(n_electrons=4),
+                        ]
+
+    @pytest.mark.slow
+    def test_list_of_problems(self):
+
+        for prob in self.list_of_problems:
+
+            with suppress_warnings() as sup:
+                sup.filter(UserWarning)
+                truth = minimize(prob.fun, prob.x0,
+                                 method='trust-constr',
+                                 bounds=prob.bounds,
+                                 constraints=prob.constr)
+                result = minimize(prob.fun, prob.x0,
+                                  method=self.method,
+                                  bounds=prob.bounds,
+                                  constraints=prob.constr)
+
+            assert_allclose(result.fun, truth.fun, rtol=1e-3)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraints.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraints.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c4186ba7b6dd6f56b89e2f39add9eb16e6beccb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_constraints.py
@@ -0,0 +1,255 @@
+import pytest
+import numpy as np
+from numpy.testing import TestCase, assert_array_equal
+import scipy.sparse as sps
+from scipy.optimize._constraints import (
+    Bounds, LinearConstraint, NonlinearConstraint, PreparedConstraint,
+    new_bounds_to_old, old_bound_to_new, strict_bounds)
+
+
+class TestStrictBounds(TestCase):
+    def test_scalarvalue_unique_enforce_feasibility(self):
+        m = 3
+        lb = 2
+        ub = 4
+        enforce_feasibility = False
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                             enforce_feasibility,
+                                             m)
+        assert_array_equal(strict_lb, [-np.inf, -np.inf, -np.inf])
+        assert_array_equal(strict_ub, [np.inf, np.inf, np.inf])
+
+        enforce_feasibility = True
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                             enforce_feasibility,
+                                             m)
+        assert_array_equal(strict_lb, [2, 2, 2])
+        assert_array_equal(strict_ub, [4, 4, 4])
+
+    def test_vectorvalue_unique_enforce_feasibility(self):
+        m = 3
+        lb = [1, 2, 3]
+        ub = [4, 5, 6]
+        enforce_feasibility = False
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                              enforce_feasibility,
+                                              m)
+        assert_array_equal(strict_lb, [-np.inf, -np.inf, -np.inf])
+        assert_array_equal(strict_ub, [np.inf, np.inf, np.inf])
+
+        enforce_feasibility = True
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                              enforce_feasibility,
+                                              m)
+        assert_array_equal(strict_lb, [1, 2, 3])
+        assert_array_equal(strict_ub, [4, 5, 6])
+
+    def test_scalarvalue_vector_enforce_feasibility(self):
+        m = 3
+        lb = 2
+        ub = 4
+        enforce_feasibility = [False, True, False]
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                             enforce_feasibility,
+                                             m)
+        assert_array_equal(strict_lb, [-np.inf, 2, -np.inf])
+        assert_array_equal(strict_ub, [np.inf, 4, np.inf])
+
+    def test_vectorvalue_vector_enforce_feasibility(self):
+        m = 3
+        lb = [1, 2, 3]
+        ub = [4, 6, np.inf]
+        enforce_feasibility = [True, False, True]
+        strict_lb, strict_ub = strict_bounds(lb, ub,
+                                             enforce_feasibility,
+                                             m)
+        assert_array_equal(strict_lb, [1, -np.inf, 3])
+        assert_array_equal(strict_ub, [4, np.inf, np.inf])
+
+
+def test_prepare_constraint_infeasible_x0():
+    lb = np.array([0, 20, 30])
+    ub = np.array([0.5, np.inf, 70])
+    x0 = np.array([1, 2, 3])
+    enforce_feasibility = np.array([False, True, True], dtype=bool)
+    bounds = Bounds(lb, ub, enforce_feasibility)
+    pytest.raises(ValueError, PreparedConstraint, bounds, x0)
+
+    pc = PreparedConstraint(Bounds(lb, ub), [1, 2, 3])
+    assert (pc.violation([1, 2, 3]) > 0).any()
+    assert (pc.violation([0.25, 21, 31]) == 0).all()
+
+    x0 = np.array([1, 2, 3, 4])
+    A = np.array([[1, 2, 3, 4], [5, 0, 0, 6], [7, 0, 8, 0]])
+    enforce_feasibility = np.array([True, True, True], dtype=bool)
+    linear = LinearConstraint(A, -np.inf, 0, enforce_feasibility)
+    pytest.raises(ValueError, PreparedConstraint, linear, x0)
+
+    pc = PreparedConstraint(LinearConstraint(A, -np.inf, 0),
+                            [1, 2, 3, 4])
+    assert (pc.violation([1, 2, 3, 4]) > 0).any()
+    assert (pc.violation([-10, 2, -10, 4]) == 0).all()
+
+    def fun(x):
+        return A.dot(x)
+
+    def jac(x):
+        return A
+
+    def hess(x, v):
+        return sps.csr_matrix((4, 4))
+
+    nonlinear = NonlinearConstraint(fun, -np.inf, 0, jac, hess,
+                                    enforce_feasibility)
+    pytest.raises(ValueError, PreparedConstraint, nonlinear, x0)
+
+    pc = PreparedConstraint(nonlinear, [-10, 2, -10, 4])
+    assert (pc.violation([1, 2, 3, 4]) > 0).any()
+    assert (pc.violation([-10, 2, -10, 4]) == 0).all()
+
+
+def test_violation():
+    def cons_f(x):
+        return np.array([x[0] ** 2 + x[1], x[0] ** 2 - x[1]])
+
+    nlc = NonlinearConstraint(cons_f, [-1, -0.8500], [2, 2])
+    pc = PreparedConstraint(nlc, [0.5, 1])
+
+    assert_array_equal(pc.violation([0.5, 1]), [0., 0.])
+
+    np.testing.assert_almost_equal(pc.violation([0.5, 1.2]), [0., 0.1])
+
+    np.testing.assert_almost_equal(pc.violation([1.2, 1.2]), [0.64, 0])
+
+    np.testing.assert_almost_equal(pc.violation([0.1, -1.2]), [0.19, 0])
+
+    np.testing.assert_almost_equal(pc.violation([0.1, 2]), [0.01, 1.14])
+
+
+def test_new_bounds_to_old():
+    lb = np.array([-np.inf, 2, 3])
+    ub = np.array([3, np.inf, 10])
+
+    bounds = [(None, 3), (2, None), (3, 10)]
+    assert_array_equal(new_bounds_to_old(lb, ub, 3), bounds)
+
+    bounds_single_lb = [(-1, 3), (-1, None), (-1, 10)]
+    assert_array_equal(new_bounds_to_old(-1, ub, 3), bounds_single_lb)
+
+    bounds_no_lb = [(None, 3), (None, None), (None, 10)]
+    assert_array_equal(new_bounds_to_old(-np.inf, ub, 3), bounds_no_lb)
+
+    bounds_single_ub = [(None, 20), (2, 20), (3, 20)]
+    assert_array_equal(new_bounds_to_old(lb, 20, 3), bounds_single_ub)
+
+    bounds_no_ub = [(None, None), (2, None), (3, None)]
+    assert_array_equal(new_bounds_to_old(lb, np.inf, 3), bounds_no_ub)
+
+    bounds_single_both = [(1, 2), (1, 2), (1, 2)]
+    assert_array_equal(new_bounds_to_old(1, 2, 3), bounds_single_both)
+
+    bounds_no_both = [(None, None), (None, None), (None, None)]
+    assert_array_equal(new_bounds_to_old(-np.inf, np.inf, 3), bounds_no_both)
+
+
+def test_old_bounds_to_new():
+    bounds = ([1, 2], (None, 3), (-1, None))
+    lb_true = np.array([1, -np.inf, -1])
+    ub_true = np.array([2, 3, np.inf])
+
+    lb, ub = old_bound_to_new(bounds)
+    assert_array_equal(lb, lb_true)
+    assert_array_equal(ub, ub_true)
+
+    bounds = [(-np.inf, np.inf), (np.array([1]), np.array([1]))]
+    lb, ub = old_bound_to_new(bounds)
+
+    assert_array_equal(lb, [-np.inf, 1])
+    assert_array_equal(ub, [np.inf, 1])
+
+
+class TestBounds:
+    def test_repr(self):
+        # so that eval works
+        from numpy import array, inf  # noqa: F401
+        for args in (
+            (-1.0, 5.0),
+            (-1.0, np.inf, True),
+            (np.array([1.0, -np.inf]), np.array([2.0, np.inf])),
+            (np.array([1.0, -np.inf]), np.array([2.0, np.inf]),
+             np.array([True, False])),
+        ):
+            bounds = Bounds(*args)
+            bounds2 = eval(repr(Bounds(*args)))
+            assert_array_equal(bounds.lb, bounds2.lb)
+            assert_array_equal(bounds.ub, bounds2.ub)
+            assert_array_equal(bounds.keep_feasible, bounds2.keep_feasible)
+
+    def test_array(self):
+        # gh13501
+        b = Bounds(lb=[0.0, 0.0], ub=[1.0, 1.0])
+        assert isinstance(b.lb, np.ndarray)
+        assert isinstance(b.ub, np.ndarray)
+
+    def test_defaults(self):
+        b1 = Bounds()
+        b2 = Bounds(np.asarray(-np.inf), np.asarray(np.inf))
+        assert b1.lb == b2.lb
+        assert b1.ub == b2.ub
+
+    def test_input_validation(self):
+        message = "Lower and upper bounds must be dense arrays."
+        with pytest.raises(ValueError, match=message):
+            Bounds(sps.coo_array([1, 2]), [1, 2])
+        with pytest.raises(ValueError, match=message):
+            Bounds([1, 2], sps.coo_array([1, 2]))
+
+        message = "`keep_feasible` must be a dense array."
+        with pytest.raises(ValueError, match=message):
+            Bounds([1, 2], [1, 2], keep_feasible=sps.coo_array([True, True]))
+
+        message = "`lb`, `ub`, and `keep_feasible` must be broadcastable."
+        with pytest.raises(ValueError, match=message):
+            Bounds([1, 2], [1, 2, 3])
+
+    def test_residual(self):
+        bounds = Bounds(-2, 4)
+        x0 = [-1, 2]
+        np.testing.assert_allclose(bounds.residual(x0), ([1, 4], [5, 2]))
+
+
+class TestLinearConstraint:
+    def test_defaults(self):
+        A = np.eye(4)
+        lc = LinearConstraint(A)
+        lc2 = LinearConstraint(A, -np.inf, np.inf)
+        assert_array_equal(lc.lb, lc2.lb)
+        assert_array_equal(lc.ub, lc2.ub)
+
+    def test_input_validation(self):
+        A = np.eye(4)
+        message = "`lb`, `ub`, and `keep_feasible` must be broadcastable"
+        with pytest.raises(ValueError, match=message):
+            LinearConstraint(A, [1, 2], [1, 2, 3])
+
+        message = "Constraint limits must be dense arrays"
+        with pytest.raises(ValueError, match=message):
+            LinearConstraint(A, sps.coo_array([1, 2]), [2, 3])
+        with pytest.raises(ValueError, match=message):
+            LinearConstraint(A, [1, 2], sps.coo_array([2, 3]))
+
+        message = "`keep_feasible` must be a dense array"
+        with pytest.raises(ValueError, match=message):
+            keep_feasible = sps.coo_array([True, True])
+            LinearConstraint(A, [1, 2], [2, 3], keep_feasible=keep_feasible)
+
+        A = np.empty((4, 3, 5))
+        message = "`A` must have exactly two dimensions."
+        with pytest.raises(ValueError, match=message):
+            LinearConstraint(A)
+
+    def test_residual(self):
+        A = np.eye(2)
+        lc = LinearConstraint(A, -2, 4)
+        x0 = [-1, 2]
+        np.testing.assert_allclose(lc.residual(x0), ([1, 4], [5, 2]))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cython_optimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cython_optimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..2f859c1143eb6b63c439fe278bfdd4fdaa15410f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_cython_optimize.py
@@ -0,0 +1,92 @@
+"""
+Test Cython optimize zeros API functions: ``bisect``, ``ridder``, ``brenth``,
+and ``brentq`` in `scipy.optimize.cython_optimize`, by finding the roots of a
+3rd order polynomial given a sequence of constant terms, ``a0``, and fixed 1st,
+2nd, and 3rd order terms in ``args``.
+
+.. math::
+
+    f(x, a0, args) =  ((args[2]*x + args[1])*x + args[0])*x + a0
+
+The 3rd order polynomial function is written in Cython and called in a Python
+wrapper named after the zero function. See the private ``_zeros`` Cython module
+in `scipy.optimize.cython_optimze` for more information.
+"""
+
+import numpy.testing as npt
+from scipy.optimize.cython_optimize import _zeros
+
+# CONSTANTS
+# Solve x**3 - A0 = 0  for A0 = [2.0, 2.1, ..., 2.9].
+# The ARGS have 3 elements just to show how this could be done for any cubic
+# polynomial.
+A0 = tuple(-2.0 - x/10.0 for x in range(10))  # constant term
+ARGS = (0.0, 0.0, 1.0)  # 1st, 2nd, and 3rd order terms
+XLO, XHI = 0.0, 2.0  # first and second bounds of zeros functions
+# absolute and relative tolerances and max iterations for zeros functions
+XTOL, RTOL, MITR = 0.001, 0.001, 10
+EXPECTED = [(-a0) ** (1.0/3.0) for a0 in A0]
+# = [1.2599210498948732,
+#    1.2805791649874942,
+#    1.300591446851387,
+#    1.3200061217959123,
+#    1.338865900164339,
+#    1.3572088082974532,
+#    1.375068867074141,
+#    1.3924766500838337,
+#    1.4094597464129783,
+#    1.4260431471424087]
+
+
+# test bisect
+def test_bisect():
+    npt.assert_allclose(
+        EXPECTED,
+        list(
+            _zeros.loop_example('bisect', A0, ARGS, XLO, XHI, XTOL, RTOL, MITR)
+        ),
+        rtol=RTOL, atol=XTOL
+    )
+
+
+# test ridder
+def test_ridder():
+    npt.assert_allclose(
+        EXPECTED,
+        list(
+            _zeros.loop_example('ridder', A0, ARGS, XLO, XHI, XTOL, RTOL, MITR)
+        ),
+        rtol=RTOL, atol=XTOL
+    )
+
+
+# test brenth
+def test_brenth():
+    npt.assert_allclose(
+        EXPECTED,
+        list(
+            _zeros.loop_example('brenth', A0, ARGS, XLO, XHI, XTOL, RTOL, MITR)
+        ),
+        rtol=RTOL, atol=XTOL
+    )
+
+
+# test brentq
+def test_brentq():
+    npt.assert_allclose(
+        EXPECTED,
+        list(
+            _zeros.loop_example('brentq', A0, ARGS, XLO, XHI, XTOL, RTOL, MITR)
+        ),
+        rtol=RTOL, atol=XTOL
+    )
+
+
+# test brentq with full output
+def test_brentq_full_output():
+    output = _zeros.full_output_example(
+        (A0[0],) + ARGS, XLO, XHI, XTOL, RTOL, MITR)
+    npt.assert_allclose(EXPECTED[0], output['root'], rtol=RTOL, atol=XTOL)
+    npt.assert_equal(6, output['iterations'])
+    npt.assert_equal(7, output['funcalls'])
+    npt.assert_equal(0, output['error_num'])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_differentiable_functions.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_differentiable_functions.py
new file mode 100644
index 0000000000000000000000000000000000000000..cac12af0033c09c3fbf73c52a9c2cb52b84d8239
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_differentiable_functions.py
@@ -0,0 +1,805 @@
+import pytest
+import platform
+import numpy as np
+from numpy.testing import (TestCase, assert_array_almost_equal,
+                           assert_array_equal, assert_, assert_allclose,
+                           assert_equal)
+from scipy._lib._gcutils import assert_deallocated
+from scipy.sparse import csr_matrix
+from scipy.sparse.linalg import LinearOperator
+from scipy.optimize._differentiable_functions import (ScalarFunction,
+                                                      VectorFunction,
+                                                      LinearVectorFunction,
+                                                      IdentityVectorFunction)
+from scipy.optimize import rosen, rosen_der, rosen_hess
+from scipy.optimize._hessian_update_strategy import BFGS
+
+
+class ExScalarFunction:
+
+    def __init__(self):
+        self.nfev = 0
+        self.ngev = 0
+        self.nhev = 0
+
+    def fun(self, x):
+        self.nfev += 1
+        return 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+
+    def grad(self, x):
+        self.ngev += 1
+        return np.array([4*x[0]-1, 4*x[1]])
+
+    def hess(self, x):
+        self.nhev += 1
+        return 4*np.eye(2)
+
+
+class TestScalarFunction(TestCase):
+
+    def test_finite_difference_grad(self):
+        ex = ExScalarFunction()
+        nfev = 0
+        ngev = 0
+
+        x0 = [1.0, 0.0]
+        analit = ScalarFunction(ex.fun, x0, (), ex.grad,
+                                ex.hess, None, (-np.inf, np.inf))
+        nfev += 1
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev, nfev)
+        approx = ScalarFunction(ex.fun, x0, (), '2-point',
+                                ex.hess, None, (-np.inf, np.inf))
+        nfev += 3
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(analit.f, approx.f)
+        assert_array_almost_equal(analit.g, approx.g)
+
+        x = [10, 0.3]
+        f_analit = analit.fun(x)
+        g_analit = analit.grad(x)
+        nfev += 1
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        f_approx = approx.fun(x)
+        g_approx = approx.grad(x)
+        nfev += 3
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(g_analit, g_approx)
+
+        x = [2.0, 1.0]
+        g_analit = analit.grad(x)
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+
+        g_approx = approx.grad(x)
+        nfev += 3
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_almost_equal(g_analit, g_approx)
+
+        x = [2.5, 0.3]
+        f_analit = analit.fun(x)
+        g_analit = analit.grad(x)
+        nfev += 1
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        f_approx = approx.fun(x)
+        g_approx = approx.grad(x)
+        nfev += 3
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(g_analit, g_approx)
+
+        x = [2, 0.3]
+        f_analit = analit.fun(x)
+        g_analit = analit.grad(x)
+        nfev += 1
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        f_approx = approx.fun(x)
+        g_approx = approx.grad(x)
+        nfev += 3
+        ngev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(g_analit, g_approx)
+
+    def test_fun_and_grad(self):
+        ex = ExScalarFunction()
+
+        def fg_allclose(x, y):
+            assert_allclose(x[0], y[0])
+            assert_allclose(x[1], y[1])
+
+        # with analytic gradient
+        x0 = [2.0, 0.3]
+        analit = ScalarFunction(ex.fun, x0, (), ex.grad,
+                                ex.hess, None, (-np.inf, np.inf))
+
+        fg = ex.fun(x0), ex.grad(x0)
+        fg_allclose(analit.fun_and_grad(x0), fg)
+        assert analit.ngev == 1
+
+        x0[1] = 1.
+        fg = ex.fun(x0), ex.grad(x0)
+        fg_allclose(analit.fun_and_grad(x0), fg)
+
+        # with finite difference gradient
+        x0 = [2.0, 0.3]
+        sf = ScalarFunction(ex.fun, x0, (), '3-point',
+                                ex.hess, None, (-np.inf, np.inf))
+        assert sf.ngev == 1
+        fg = ex.fun(x0), ex.grad(x0)
+        fg_allclose(sf.fun_and_grad(x0), fg)
+        assert sf.ngev == 1
+
+        x0[1] = 1.
+        fg = ex.fun(x0), ex.grad(x0)
+        fg_allclose(sf.fun_and_grad(x0), fg)
+
+    def test_finite_difference_hess_linear_operator(self):
+        ex = ExScalarFunction()
+        nfev = 0
+        ngev = 0
+        nhev = 0
+
+        x0 = [1.0, 0.0]
+        analit = ScalarFunction(ex.fun, x0, (), ex.grad,
+                                ex.hess, None, (-np.inf, np.inf))
+        nfev += 1
+        ngev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev, nhev)
+        approx = ScalarFunction(ex.fun, x0, (), ex.grad,
+                                '2-point', None, (-np.inf, np.inf))
+        assert_(isinstance(approx.H, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_equal(analit.f, approx.f)
+            assert_array_almost_equal(analit.g, approx.g)
+            assert_array_almost_equal(analit.H.dot(v), approx.H.dot(v))
+        nfev += 1
+        ngev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.0, 1.0]
+        H_analit = analit.hess(x)
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        H_approx = approx.hess(x)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v))
+        ngev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.1, 1.2]
+        H_analit = analit.hess(x)
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        H_approx = approx.hess(x)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v))
+        ngev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.5, 0.3]
+        _ = analit.grad(x)
+        H_analit = analit.hess(x)
+        ngev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        _ = approx.grad(x)
+        H_approx = approx.hess(x)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v))
+        ngev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [5.2, 2.3]
+        _ = analit.grad(x)
+        H_analit = analit.hess(x)
+        ngev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        _ = approx.grad(x)
+        H_approx = approx.hess(x)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v))
+        ngev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.ngev, ngev)
+        assert_array_equal(analit.ngev+approx.ngev, ngev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+    @pytest.mark.thread_unsafe
+    def test_x_storage_overlap(self):
+        # Scalar_Function should not store references to arrays, it should
+        # store copies - this checks that updating an array in-place causes
+        # Scalar_Function.x to be updated.
+
+        def f(x):
+            return np.sum(np.asarray(x) ** 2)
+
+        x = np.array([1., 2., 3.])
+        sf = ScalarFunction(f, x, (), '3-point', lambda x: x, None, (-np.inf, np.inf))
+
+        assert x is not sf.x
+        assert_equal(sf.fun(x), 14.0)
+        assert x is not sf.x
+
+        x[0] = 0.
+        f1 = sf.fun(x)
+        assert_equal(f1, 13.0)
+
+        x[0] = 1
+        f2 = sf.fun(x)
+        assert_equal(f2, 14.0)
+        assert x is not sf.x
+
+        # now test with a HessianUpdate strategy specified
+        hess = BFGS()
+        x = np.array([1., 2., 3.])
+        sf = ScalarFunction(f, x, (), '3-point', hess, None, (-np.inf, np.inf))
+
+        assert x is not sf.x
+        assert_equal(sf.fun(x), 14.0)
+        assert x is not sf.x
+
+        x[0] = 0.
+        f1 = sf.fun(x)
+        assert_equal(f1, 13.0)
+
+        x[0] = 1
+        f2 = sf.fun(x)
+        assert_equal(f2, 14.0)
+        assert x is not sf.x
+
+        # gh13740 x is changed in user function
+        def ff(x):
+            x *= x    # overwrite x
+            return np.sum(x)
+
+        x = np.array([1., 2., 3.])
+        sf = ScalarFunction(
+            ff, x, (), '3-point', lambda x: x, None, (-np.inf, np.inf)
+        )
+        assert x is not sf.x
+        assert_equal(sf.fun(x), 14.0)
+        assert_equal(sf.x, np.array([1., 2., 3.]))
+        assert x is not sf.x
+
+    def test_lowest_x(self):
+        # ScalarFunction should remember the lowest func(x) visited.
+        x0 = np.array([2, 3, 4])
+        sf = ScalarFunction(rosen, x0, (), rosen_der, rosen_hess,
+                            None, None)
+        sf.fun([1, 1, 1])
+        sf.fun(x0)
+        sf.fun([1.01, 1, 1.0])
+        sf.grad([1.01, 1, 1.0])
+        assert_equal(sf._lowest_f, 0.0)
+        assert_equal(sf._lowest_x, [1.0, 1.0, 1.0])
+
+        sf = ScalarFunction(rosen, x0, (), '2-point', rosen_hess,
+                            None, (-np.inf, np.inf))
+        sf.fun([1, 1, 1])
+        sf.fun(x0)
+        sf.fun([1.01, 1, 1.0])
+        sf.grad([1.01, 1, 1.0])
+        assert_equal(sf._lowest_f, 0.0)
+        assert_equal(sf._lowest_x, [1.0, 1.0, 1.0])
+
+    def test_float_size(self):
+        x0 = np.array([2, 3, 4]).astype(np.float32)
+
+        # check that ScalarFunction/approx_derivative always send the correct
+        # float width
+        def rosen_(x):
+            assert x.dtype == np.float32
+            return rosen(x)
+
+        sf = ScalarFunction(rosen_, x0, (), '2-point', rosen_hess,
+                            None, (-np.inf, np.inf))
+        res = sf.fun(x0)
+        assert res.dtype == np.float32
+
+
+class ExVectorialFunction:
+
+    def __init__(self):
+        self.nfev = 0
+        self.njev = 0
+        self.nhev = 0
+
+    def fun(self, x):
+        self.nfev += 1
+        return np.array([2*(x[0]**2 + x[1]**2 - 1) - x[0],
+                         4*(x[0]**3 + x[1]**2 - 4) - 3*x[0]], dtype=x.dtype)
+
+    def jac(self, x):
+        self.njev += 1
+        return np.array([[4*x[0]-1, 4*x[1]],
+                         [12*x[0]**2-3, 8*x[1]]], dtype=x.dtype)
+
+    def hess(self, x, v):
+        self.nhev += 1
+        return v[0]*4*np.eye(2) + v[1]*np.array([[24*x[0], 0],
+                                                 [0, 8]])
+
+
+class TestVectorialFunction(TestCase):
+
+    def test_finite_difference_jac(self):
+        ex = ExVectorialFunction()
+        nfev = 0
+        njev = 0
+
+        x0 = [1.0, 0.0]
+        analit = VectorFunction(ex.fun, x0, ex.jac, ex.hess, None, None,
+                                (-np.inf, np.inf), None)
+        nfev += 1
+        njev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev, njev)
+        approx = VectorFunction(ex.fun, x0, '2-point', ex.hess, None, None,
+                                (-np.inf, np.inf), None)
+        nfev += 3
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(analit.f, approx.f)
+        assert_array_almost_equal(analit.J, approx.J)
+
+        x = [10, 0.3]
+        f_analit = analit.fun(x)
+        J_analit = analit.jac(x)
+        nfev += 1
+        njev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        f_approx = approx.fun(x)
+        J_approx = approx.jac(x)
+        nfev += 3
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(J_analit, J_approx, decimal=4)
+
+        x = [2.0, 1.0]
+        J_analit = analit.jac(x)
+        njev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        J_approx = approx.jac(x)
+        nfev += 3
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_almost_equal(J_analit, J_approx)
+
+        x = [2.5, 0.3]
+        f_analit = analit.fun(x)
+        J_analit = analit.jac(x)
+        nfev += 1
+        njev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        f_approx = approx.fun(x)
+        J_approx = approx.jac(x)
+        nfev += 3
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(J_analit, J_approx)
+
+        x = [2, 0.3]
+        f_analit = analit.fun(x)
+        J_analit = analit.jac(x)
+        nfev += 1
+        njev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        f_approx = approx.fun(x)
+        J_approx = approx.jac(x)
+        nfev += 3
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_almost_equal(f_analit, f_approx)
+        assert_array_almost_equal(J_analit, J_approx)
+
+    def test_finite_difference_hess_linear_operator(self):
+        ex = ExVectorialFunction()
+        nfev = 0
+        njev = 0
+        nhev = 0
+
+        x0 = [1.0, 0.0]
+        v0 = [1.0, 2.0]
+        analit = VectorFunction(ex.fun, x0, ex.jac, ex.hess, None, None,
+                                (-np.inf, np.inf), None)
+        nfev += 1
+        njev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev, nhev)
+        approx = VectorFunction(ex.fun, x0, ex.jac, '2-point', None, None,
+                                (-np.inf, np.inf), None)
+        assert_(isinstance(approx.H, LinearOperator))
+        for p in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_equal(analit.f, approx.f)
+            assert_array_almost_equal(analit.J, approx.J)
+            assert_array_almost_equal(analit.H.dot(p), approx.H.dot(p))
+        nfev += 1
+        njev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.0, 1.0]
+        H_analit = analit.hess(x, v0)
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        H_approx = approx.hess(x, v0)
+        assert_(isinstance(H_approx, LinearOperator))
+        for p in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(p), H_approx.dot(p),
+                                      decimal=5)
+        njev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.1, 1.2]
+        v = [1.0, 1.0]
+        H_analit = analit.hess(x, v)
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        H_approx = approx.hess(x, v)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v))
+        njev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [2.5, 0.3]
+        _ = analit.jac(x)
+        H_analit = analit.hess(x, v0)
+        njev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        _ = approx.jac(x)
+        H_approx = approx.hess(x, v0)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v), decimal=4)
+        njev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+        x = [5.2, 2.3]
+        v = [2.3, 5.2]
+        _ = analit.jac(x)
+        H_analit = analit.hess(x, v)
+        njev += 1
+        nhev += 1
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+        _ = approx.jac(x)
+        H_approx = approx.hess(x, v)
+        assert_(isinstance(H_approx, LinearOperator))
+        for v in ([1.0, 2.0], [3.0, 4.0], [5.0, 2.0]):
+            assert_array_almost_equal(H_analit.dot(v), H_approx.dot(v), decimal=4)
+        njev += 4
+        assert_array_equal(ex.nfev, nfev)
+        assert_array_equal(analit.nfev+approx.nfev, nfev)
+        assert_array_equal(ex.njev, njev)
+        assert_array_equal(analit.njev+approx.njev, njev)
+        assert_array_equal(ex.nhev, nhev)
+        assert_array_equal(analit.nhev+approx.nhev, nhev)
+
+    @pytest.mark.thread_unsafe
+    def test_x_storage_overlap(self):
+        # VectorFunction should not store references to arrays, it should
+        # store copies - this checks that updating an array in-place causes
+        # Scalar_Function.x to be updated.
+        ex = ExVectorialFunction()
+        x0 = np.array([1.0, 0.0])
+
+        vf = VectorFunction(ex.fun, x0, '3-point', ex.hess, None, None,
+                            (-np.inf, np.inf), None)
+
+        assert x0 is not vf.x
+        assert_equal(vf.fun(x0), ex.fun(x0))
+        assert x0 is not vf.x
+
+        x0[0] = 2.
+        assert_equal(vf.fun(x0), ex.fun(x0))
+        assert x0 is not vf.x
+
+        x0[0] = 1.
+        assert_equal(vf.fun(x0), ex.fun(x0))
+        assert x0 is not vf.x
+
+        # now test with a HessianUpdate strategy specified
+        hess = BFGS()
+        x0 = np.array([1.0, 0.0])
+        vf = VectorFunction(ex.fun, x0, '3-point', hess, None, None,
+                            (-np.inf, np.inf), None)
+
+        with pytest.warns(UserWarning):
+            # filter UserWarning because ExVectorialFunction is linear and
+            # a quasi-Newton approximation is used for the Hessian.
+            assert x0 is not vf.x
+            assert_equal(vf.fun(x0), ex.fun(x0))
+            assert x0 is not vf.x
+
+            x0[0] = 2.
+            assert_equal(vf.fun(x0), ex.fun(x0))
+            assert x0 is not vf.x
+
+            x0[0] = 1.
+            assert_equal(vf.fun(x0), ex.fun(x0))
+            assert x0 is not vf.x
+
+    def test_float_size(self):
+        ex = ExVectorialFunction()
+        x0 = np.array([1.0, 0.0]).astype(np.float32)
+
+        vf = VectorFunction(ex.fun, x0, ex.jac, ex.hess, None, None,
+                            (-np.inf, np.inf), None)
+
+        res = vf.fun(x0)
+        assert res.dtype == np.float32
+
+        res = vf.jac(x0)
+        assert res.dtype == np.float32
+
+
+def test_LinearVectorFunction():
+    A_dense = np.array([
+        [-1, 2, 0],
+        [0, 4, 2]
+    ])
+    x0 = np.zeros(3)
+    A_sparse = csr_matrix(A_dense)
+    x = np.array([1, -1, 0])
+    v = np.array([-1, 1])
+    Ax = np.array([-3, -4])
+
+    f1 = LinearVectorFunction(A_dense, x0, None)
+    assert_(not f1.sparse_jacobian)
+
+    f2 = LinearVectorFunction(A_dense, x0, True)
+    assert_(f2.sparse_jacobian)
+
+    f3 = LinearVectorFunction(A_dense, x0, False)
+    assert_(not f3.sparse_jacobian)
+
+    f4 = LinearVectorFunction(A_sparse, x0, None)
+    assert_(f4.sparse_jacobian)
+
+    f5 = LinearVectorFunction(A_sparse, x0, True)
+    assert_(f5.sparse_jacobian)
+
+    f6 = LinearVectorFunction(A_sparse, x0, False)
+    assert_(not f6.sparse_jacobian)
+
+    assert_array_equal(f1.fun(x), Ax)
+    assert_array_equal(f2.fun(x), Ax)
+    assert_array_equal(f1.jac(x), A_dense)
+    assert_array_equal(f2.jac(x).toarray(), A_sparse.toarray())
+    assert_array_equal(f1.hess(x, v).toarray(), np.zeros((3, 3)))
+
+
+def test_LinearVectorFunction_memoization():
+    A = np.array([[-1, 2, 0], [0, 4, 2]])
+    x0 = np.array([1, 2, -1])
+    fun = LinearVectorFunction(A, x0, False)
+
+    assert_array_equal(x0, fun.x)
+    assert_array_equal(A.dot(x0), fun.f)
+
+    x1 = np.array([-1, 3, 10])
+    assert_array_equal(A, fun.jac(x1))
+    assert_array_equal(x1, fun.x)
+    assert_array_equal(A.dot(x0), fun.f)
+    assert_array_equal(A.dot(x1), fun.fun(x1))
+    assert_array_equal(A.dot(x1), fun.f)
+
+
+def test_IdentityVectorFunction():
+    x0 = np.zeros(3)
+
+    f1 = IdentityVectorFunction(x0, None)
+    f2 = IdentityVectorFunction(x0, False)
+    f3 = IdentityVectorFunction(x0, True)
+
+    assert_(f1.sparse_jacobian)
+    assert_(not f2.sparse_jacobian)
+    assert_(f3.sparse_jacobian)
+
+    x = np.array([-1, 2, 1])
+    v = np.array([-2, 3, 0])
+
+    assert_array_equal(f1.fun(x), x)
+    assert_array_equal(f2.fun(x), x)
+
+    assert_array_equal(f1.jac(x).toarray(), np.eye(3))
+    assert_array_equal(f2.jac(x), np.eye(3))
+
+    assert_array_equal(f1.hess(x, v).toarray(), np.zeros((3, 3)))
+
+
+@pytest.mark.skipif(
+    platform.python_implementation() == "PyPy",
+    reason="assert_deallocate not available on PyPy"
+)
+def test_ScalarFunctionNoReferenceCycle():
+    """Regression test for gh-20768."""
+    ex = ExScalarFunction()
+    x0 = np.zeros(3)
+    with assert_deallocated(lambda: ScalarFunction(ex.fun, x0, (), ex.grad,
+                            ex.hess, None, (-np.inf, np.inf))):
+        pass
+
+
+@pytest.mark.skipif(
+    platform.python_implementation() == "PyPy",
+    reason="assert_deallocate not available on PyPy"
+)
+@pytest.mark.xfail(reason="TODO remove reference cycle from VectorFunction")
+def test_VectorFunctionNoReferenceCycle():
+    """Regression test for gh-20768."""
+    ex = ExVectorialFunction()
+    x0 = [1.0, 0.0]
+    with assert_deallocated(lambda: VectorFunction(ex.fun, x0, ex.jac,
+                            ex.hess, None, None, (-np.inf, np.inf), None)):
+        pass
+
+
+@pytest.mark.skipif(
+    platform.python_implementation() == "PyPy",
+    reason="assert_deallocate not available on PyPy"
+)
+def test_LinearVectorFunctionNoReferenceCycle():
+    """Regression test for gh-20768."""
+    A_dense = np.array([
+        [-1, 2, 0],
+        [0, 4, 2]
+    ])
+    x0 = np.zeros(3)
+    A_sparse = csr_matrix(A_dense)
+    with assert_deallocated(lambda: LinearVectorFunction(A_sparse, x0, None)):
+        pass
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_direct.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_direct.py
new file mode 100644
index 0000000000000000000000000000000000000000..835d3164c8d547599a507550dcc7629e7d327394
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_direct.py
@@ -0,0 +1,321 @@
+"""
+Unit test for DIRECT optimization algorithm.
+"""
+from numpy.testing import (assert_allclose,
+                           assert_array_less)
+import pytest
+import numpy as np
+from scipy.optimize import direct, Bounds
+import threading
+
+
+class TestDIRECT:
+
+    def setup_method(self):
+        self.fun_calls = threading.local()
+        self.bounds_sphere = 4*[(-2, 3)]
+        self.optimum_sphere_pos = np.zeros((4, ))
+        self.optimum_sphere = 0.0
+        self.bounds_stylinski_tang = Bounds([-4., -4.], [4., 4.])
+        self.maxiter = 1000
+
+    # test functions
+    def sphere(self, x):
+        if not hasattr(self.fun_calls, 'c'):
+            self.fun_calls.c = 0
+        self.fun_calls.c += 1
+        return np.square(x).sum()
+
+    def inv(self, x):
+        if np.sum(x) == 0:
+            raise ZeroDivisionError()
+        return 1/np.sum(x)
+
+    def nan_fun(self, x):
+        return np.nan
+
+    def inf_fun(self, x):
+        return np.inf
+
+    def styblinski_tang(self, pos):
+        x, y = pos
+        return 0.5 * (x**4 - 16 * x**2 + 5 * x + y**4 - 16 * y**2 + 5 * y)
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_direct(self, locally_biased):
+        res = direct(self.sphere, self.bounds_sphere,
+                     locally_biased=locally_biased)
+
+        # test accuracy
+        assert_allclose(res.x, self.optimum_sphere_pos,
+                        rtol=1e-3, atol=1e-3)
+        assert_allclose(res.fun, self.optimum_sphere, atol=1e-5, rtol=1e-5)
+
+        # test that result lies within bounds
+        _bounds = np.asarray(self.bounds_sphere)
+        assert_array_less(_bounds[:, 0], res.x)
+        assert_array_less(res.x, _bounds[:, 1])
+
+        # test number of function evaluations. Original DIRECT overshoots by
+        # up to 500 evaluations in last iteration
+        assert res.nfev <= 1000 * (len(self.bounds_sphere) + 1)
+        # test that number of function evaluations is correct
+        assert res.nfev == self.fun_calls.c
+
+        # test that number of iterations is below supplied maximum
+        assert res.nit <= self.maxiter
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_direct_callback(self, locally_biased):
+        # test that callback does not change the result
+        res = direct(self.sphere, self.bounds_sphere,
+                     locally_biased=locally_biased)
+
+        def callback(x):
+            x = 2*x
+            dummy = np.square(x)
+            print("DIRECT minimization algorithm callback test")
+            return dummy
+
+        res_callback = direct(self.sphere, self.bounds_sphere,
+                              locally_biased=locally_biased,
+                              callback=callback)
+
+        assert_allclose(res.x, res_callback.x)
+
+        assert res.nit == res_callback.nit
+        assert res.nfev == res_callback.nfev
+        assert res.status == res_callback.status
+        assert res.success == res_callback.success
+        assert res.fun == res_callback.fun
+        assert_allclose(res.x, res_callback.x)
+        assert res.message == res_callback.message
+
+        # test accuracy
+        assert_allclose(res_callback.x, self.optimum_sphere_pos,
+                        rtol=1e-3, atol=1e-3)
+        assert_allclose(res_callback.fun, self.optimum_sphere,
+                        atol=1e-5, rtol=1e-5)
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_exception(self, locally_biased):
+        bounds = 4*[(-10, 10)]
+        with pytest.raises(ZeroDivisionError):
+            direct(self.inv, bounds=bounds,
+                   locally_biased=locally_biased)
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_nan(self, locally_biased):
+        bounds = 4*[(-10, 10)]
+        direct(self.nan_fun, bounds=bounds,
+               locally_biased=locally_biased)
+
+    @pytest.mark.parametrize("len_tol", [1e-3, 1e-4])
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_len_tol(self, len_tol, locally_biased):
+        bounds = 4*[(-10., 10.)]
+        res = direct(self.sphere, bounds=bounds, len_tol=len_tol,
+                     vol_tol=1e-30, locally_biased=locally_biased)
+        assert res.status == 5
+        assert res.success
+        assert_allclose(res.x, np.zeros((4, )))
+        message = ("The side length measure of the hyperrectangle containing "
+                   "the lowest function value found is below "
+                   f"len_tol={len_tol}")
+        assert res.message == message
+
+    @pytest.mark.parametrize("vol_tol", [1e-6, 1e-8])
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_vol_tol(self, vol_tol, locally_biased):
+        bounds = 4*[(-10., 10.)]
+        res = direct(self.sphere, bounds=bounds, vol_tol=vol_tol,
+                     len_tol=0., locally_biased=locally_biased)
+        assert res.status == 4
+        assert res.success
+        assert_allclose(res.x, np.zeros((4, )))
+        message = ("The volume of the hyperrectangle containing the lowest "
+                   f"function value found is below vol_tol={vol_tol}")
+        assert res.message == message
+
+    @pytest.mark.parametrize("f_min_rtol", [1e-3, 1e-5, 1e-7])
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_f_min(self, f_min_rtol, locally_biased):
+        # test that desired function value is reached within
+        # relative tolerance of f_min_rtol
+        f_min = 1.
+        bounds = 4*[(-2., 10.)]
+        res = direct(self.sphere, bounds=bounds, f_min=f_min,
+                     f_min_rtol=f_min_rtol,
+                     locally_biased=locally_biased)
+        assert res.status == 3
+        assert res.success
+        assert res.fun < f_min * (1. + f_min_rtol)
+        message = ("The best function value found is within a relative "
+                   f"error={f_min_rtol} of the (known) global optimum f_min")
+        assert res.message == message
+
+    def circle_with_args(self, x, a, b):
+        return np.square(x[0] - a) + np.square(x[1] - b).sum()
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_f_circle_with_args(self, locally_biased):
+        bounds = 2*[(-2.0, 2.0)]
+
+        res = direct(self.circle_with_args, bounds, args=(1, 1), maxfun=1250,
+                     locally_biased=locally_biased)
+        assert_allclose(res.x, np.array([1., 1.]), rtol=1e-5)
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_failure_maxfun(self, locally_biased):
+        # test that if optimization runs for the maximal number of
+        # evaluations, success = False is returned
+
+        maxfun = 100
+        result = direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                        maxfun=maxfun, locally_biased=locally_biased)
+        assert result.success is False
+        assert result.status == 1
+        assert result.nfev >= maxfun
+        message = ("Number of function evaluations done is "
+                   f"larger than maxfun={maxfun}")
+        assert result.message == message
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_failure_maxiter(self, locally_biased):
+        # test that if optimization runs for the maximal number of
+        # iterations, success = False is returned
+
+        maxiter = 10
+        result = direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                        maxiter=maxiter, locally_biased=locally_biased)
+        assert result.success is False
+        assert result.status == 2
+        assert result.nit >= maxiter
+        message = f"Number of iterations is larger than maxiter={maxiter}"
+        assert result.message == message
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_bounds_variants(self, locally_biased):
+        # test that new and old bounds yield same result
+
+        lb = [-6., 1., -5.]
+        ub = [-1., 3., 5.]
+        x_opt = np.array([-1., 1., 0.])
+        bounds_old = list(zip(lb, ub))
+        bounds_new = Bounds(lb, ub)
+
+        res_old_bounds = direct(self.sphere, bounds_old,
+                                locally_biased=locally_biased)
+        res_new_bounds = direct(self.sphere, bounds_new,
+                                locally_biased=locally_biased)
+
+        assert res_new_bounds.nfev == res_old_bounds.nfev
+        assert res_new_bounds.message == res_old_bounds.message
+        assert res_new_bounds.success == res_old_bounds.success
+        assert res_new_bounds.nit == res_old_bounds.nit
+        assert_allclose(res_new_bounds.x, res_old_bounds.x)
+        assert_allclose(res_new_bounds.x, x_opt, rtol=1e-2)
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    @pytest.mark.parametrize("eps", [1e-5, 1e-4, 1e-3])
+    def test_epsilon(self, eps, locally_biased):
+        result = direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                        eps=eps, vol_tol=1e-6,
+                        locally_biased=locally_biased)
+        assert result.status == 4
+        assert result.success
+
+    @pytest.mark.xslow
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_no_segmentation_fault(self, locally_biased):
+        # test that an excessive number of function evaluations
+        # does not result in segmentation fault
+        bounds = [(-5., 20.)] * 100
+        result = direct(self.sphere, bounds, maxfun=10000000,
+                        maxiter=1000000, locally_biased=locally_biased)
+        assert result is not None
+
+    @pytest.mark.parametrize("locally_biased", [True, False])
+    def test_inf_fun(self, locally_biased):
+        # test that an objective value of infinity does not crash DIRECT
+        bounds = [(-5., 5.)] * 2
+        result = direct(self.inf_fun, bounds,
+                        locally_biased=locally_biased)
+        assert result is not None
+
+    @pytest.mark.parametrize("len_tol", [-1, 2])
+    def test_len_tol_validation(self, len_tol):
+        error_msg = "len_tol must be between 0 and 1."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   len_tol=len_tol)
+
+    @pytest.mark.parametrize("vol_tol", [-1, 2])
+    def test_vol_tol_validation(self, vol_tol):
+        error_msg = "vol_tol must be between 0 and 1."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   vol_tol=vol_tol)
+
+    @pytest.mark.parametrize("f_min_rtol", [-1, 2])
+    def test_fmin_rtol_validation(self, f_min_rtol):
+        error_msg = "f_min_rtol must be between 0 and 1."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   f_min_rtol=f_min_rtol, f_min=0.)
+
+    @pytest.mark.parametrize("maxfun", [1.5, "string", (1, 2)])
+    def test_maxfun_wrong_type(self, maxfun):
+        error_msg = "maxfun must be of type int."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   maxfun=maxfun)
+
+    @pytest.mark.parametrize("maxiter", [1.5, "string", (1, 2)])
+    def test_maxiter_wrong_type(self, maxiter):
+        error_msg = "maxiter must be of type int."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   maxiter=maxiter)
+
+    def test_negative_maxiter(self):
+        error_msg = "maxiter must be > 0."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   maxiter=-1)
+
+    def test_negative_maxfun(self):
+        error_msg = "maxfun must be > 0."
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   maxfun=-1)
+
+    @pytest.mark.parametrize("bounds", ["bounds", 2., 0])
+    def test_invalid_bounds_type(self, bounds):
+        error_msg = ("bounds must be a sequence or "
+                     "instance of Bounds class")
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, bounds)
+
+    @pytest.mark.parametrize("bounds",
+                             [Bounds([-1., -1], [-2, 1]),
+                              Bounds([-np.nan, -1], [-2, np.nan]),
+                              ]
+                             )
+    def test_incorrect_bounds(self, bounds):
+        error_msg = 'Bounds are not consistent min < max'
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, bounds)
+
+    def test_inf_bounds(self):
+        error_msg = 'Bounds must not be inf.'
+        bounds = Bounds([-np.inf, -1], [-2, np.inf])
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, bounds)
+
+    @pytest.mark.parametrize("locally_biased", ["bias", [0, 0], 2.])
+    def test_locally_biased_validation(self, locally_biased):
+        error_msg = 'locally_biased must be True or False.'
+        with pytest.raises(ValueError, match=error_msg):
+            direct(self.styblinski_tang, self.bounds_stylinski_tang,
+                   locally_biased=locally_biased)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_extending.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_extending.py
new file mode 100644
index 0000000000000000000000000000000000000000..279cac794e5f453fee52f19026f96eb530259485
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_extending.py
@@ -0,0 +1,28 @@
+import os
+import platform
+import sysconfig
+
+import pytest
+
+from scipy._lib._testutils import IS_EDITABLE, _test_cython_extension, cython
+
+
+@pytest.mark.fail_slow(40)
+# essential per https://github.com/scipy/scipy/pull/20487#discussion_r1567057247
+@pytest.mark.skipif(IS_EDITABLE,
+                    reason='Editable install cannot find .pxd headers.')
+@pytest.mark.skipif((platform.system() == 'Windows' and
+                     sysconfig.get_config_var('Py_GIL_DISABLED')),
+                    reason='gh-22039')
+@pytest.mark.skipif(platform.machine() in ["wasm32", "wasm64"],
+                    reason="Can't start subprocess")
+@pytest.mark.skipif(cython is None, reason="requires cython")
+def test_cython(tmp_path):
+    srcdir = os.path.dirname(os.path.dirname(__file__))
+    extensions, extensions_cpp = _test_cython_extension(tmp_path, srcdir)
+    # actually test the cython c-extensions
+    # From docstring for scipy.optimize.cython_optimize module
+    x = extensions.brentq_example()
+    assert x == 0.6999942848231314
+    x = extensions_cpp.brentq_example()
+    assert x == 0.6999942848231314
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_hessian_update_strategy.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_hessian_update_strategy.py
new file mode 100644
index 0000000000000000000000000000000000000000..2434e92434ff2ecc74ce2e8b8119632207fd0853
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_hessian_update_strategy.py
@@ -0,0 +1,300 @@
+import re
+from copy import deepcopy
+
+import numpy as np
+import pytest
+from numpy.linalg import norm
+from numpy.testing import (TestCase, assert_array_almost_equal,
+                           assert_array_equal, assert_array_less)
+from scipy.optimize import (BFGS, SR1)
+
+
+class Rosenbrock:
+    """Rosenbrock function.
+
+    The following optimization problem:
+        minimize sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)
+    """
+
+    def __init__(self, n=2, random_state=0):
+        rng = np.random.RandomState(random_state)
+        self.x0 = rng.uniform(-1, 1, n)
+        self.x_opt = np.ones(n)
+
+    def fun(self, x):
+        x = np.asarray(x)
+        r = np.sum(100.0 * (x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0,
+                   axis=0)
+        return r
+
+    def grad(self, x):
+        x = np.asarray(x)
+        xm = x[1:-1]
+        xm_m1 = x[:-2]
+        xm_p1 = x[2:]
+        der = np.zeros_like(x)
+        der[1:-1] = (200 * (xm - xm_m1**2) -
+                     400 * (xm_p1 - xm**2) * xm - 2 * (1 - xm))
+        der[0] = -400 * x[0] * (x[1] - x[0]**2) - 2 * (1 - x[0])
+        der[-1] = 200 * (x[-1] - x[-2]**2)
+        return der
+
+    def hess(self, x):
+        x = np.atleast_1d(x)
+        H = np.diag(-400 * x[:-1], 1) - np.diag(400 * x[:-1], -1)
+        diagonal = np.zeros(len(x), dtype=x.dtype)
+        diagonal[0] = 1200 * x[0]**2 - 400 * x[1] + 2
+        diagonal[-1] = 200
+        diagonal[1:-1] = 202 + 1200 * x[1:-1]**2 - 400 * x[2:]
+        H = H + np.diag(diagonal)
+        return H
+
+
+class TestHessianUpdateStrategy(TestCase):
+
+
+    def test_hessian_initialization(self):
+
+        ndims = 5
+        symmetric_matrix = np.array([[43, 24, 33, 34, 49],
+                                     [24, 36, 44, 15, 44],
+                                     [33, 44, 37, 1, 30],
+                                     [34, 15, 1, 5, 46],
+                                     [49, 44, 30, 46, 22]])
+        init_scales = (
+            ('auto', np.eye(ndims)),
+            (2, np.eye(ndims) * 2),
+            (np.arange(1, ndims + 1) * np.eye(ndims),
+             np.arange(1, ndims + 1) * np.eye(ndims)),
+            (symmetric_matrix, symmetric_matrix),)
+        for approx_type in ['hess', 'inv_hess']:
+            for init_scale, true_matrix in init_scales:
+                # large min_{denominator,curvatur} makes them skip an update,
+                # so we can have our initial matrix
+                quasi_newton = (BFGS(init_scale=init_scale,
+                                     min_curvature=1e50,
+                                     exception_strategy='skip_update'),
+                                SR1(init_scale=init_scale,
+                                    min_denominator=1e50))
+
+                for qn in quasi_newton:
+                    qn.initialize(ndims, approx_type)
+                    B = qn.get_matrix()
+
+                    assert_array_equal(B, np.eye(ndims))
+                    # don't test the auto init scale
+                    if isinstance(init_scale, str) and init_scale == 'auto':
+                        continue
+
+                    qn.update(np.ones(ndims) * 1e-5, np.arange(ndims) + 0.2)
+                    B = qn.get_matrix()
+                    assert_array_equal(B, true_matrix)
+
+    # For this list of points, it is known
+    # that no exception occur during the
+    # Hessian update. Hence no update is
+    # skiped or damped.
+
+
+    def test_initialize_catch_illegal(self):
+        ndims = 3
+        # no complex allowed
+        inits_msg_errtype = ((complex(3.14),
+                              r"float\(\) argument must be a string or a "
+                              r"(real )?number, not 'complex'",
+                              TypeError),
+
+                             (np.array([3.2, 2.3, 1.2]).astype(np.complex128),
+                              "init_scale contains complex elements, "
+                              "must be real.",
+                              TypeError),
+
+                             (np.array([[43, 24, 33],
+                                        [24, 36, 44, ],
+                                        [33, 44, 37, ]]).astype(np.complex128),
+                              "init_scale contains complex elements, "
+                              "must be real.",
+                              TypeError),
+
+                             # not square
+                             (np.array([[43, 55, 66]]),
+                              re.escape(
+                                  "If init_scale is an array, it must have the "
+                                  "dimensions of the hess/inv_hess: (3, 3)."
+                                  " Got (1, 3)."),
+                              ValueError),
+
+                             # not symmetric
+                             (np.array([[43, 24, 33],
+                                        [24.1, 36, 44, ],
+                                        [33, 44, 37, ]]),
+                              re.escape("If init_scale is an array, it must be"
+                                        " symmetric (passing scipy.linalg.issymmetric)"
+                                        " to be an approximation of a hess/inv_hess."),
+                              ValueError),
+                             )
+        for approx_type in ['hess', 'inv_hess']:
+            for init_scale, message, errortype in inits_msg_errtype:
+                # large min_{denominator,curvatur} makes it skip an update,
+                # so we can retrieve our initial matrix
+                quasi_newton = (BFGS(init_scale=init_scale),
+                                SR1(init_scale=init_scale))
+
+                for qn in quasi_newton:
+                    qn.initialize(ndims, approx_type)
+                    with pytest.raises(errortype, match=message):
+                        qn.update(np.ones(ndims), np.arange(ndims))
+
+    def test_rosenbrock_with_no_exception(self):
+        # Define auxiliary problem
+        prob = Rosenbrock(n=5)
+        # Define iteration points
+        x_list = [[0.0976270, 0.4303787, 0.2055267, 0.0897663, -0.15269040],
+                  [0.1847239, 0.0505757, 0.2123832, 0.0255081, 0.00083286],
+                  [0.2142498, -0.0188480, 0.0503822, 0.0347033, 0.03323606],
+                  [0.2071680, -0.0185071, 0.0341337, -0.0139298, 0.02881750],
+                  [0.1533055, -0.0322935, 0.0280418, -0.0083592, 0.01503699],
+                  [0.1382378, -0.0276671, 0.0266161, -0.0074060, 0.02801610],
+                  [0.1651957, -0.0049124, 0.0269665, -0.0040025, 0.02138184],
+                  [0.2354930, 0.0443711, 0.0173959, 0.0041872, 0.00794563],
+                  [0.4168118, 0.1433867, 0.0111714, 0.0126265, -0.00658537],
+                  [0.4681972, 0.2153273, 0.0225249, 0.0152704, -0.00463809],
+                  [0.6023068, 0.3346815, 0.0731108, 0.0186618, -0.00371541],
+                  [0.6415743, 0.3985468, 0.1324422, 0.0214160, -0.00062401],
+                  [0.7503690, 0.5447616, 0.2804541, 0.0539851, 0.00242230],
+                  [0.7452626, 0.5644594, 0.3324679, 0.0865153, 0.00454960],
+                  [0.8059782, 0.6586838, 0.4229577, 0.1452990, 0.00976702],
+                  [0.8549542, 0.7226562, 0.4991309, 0.2420093, 0.02772661],
+                  [0.8571332, 0.7285741, 0.5279076, 0.2824549, 0.06030276],
+                  [0.8835633, 0.7727077, 0.5957984, 0.3411303, 0.09652185],
+                  [0.9071558, 0.8299587, 0.6771400, 0.4402896, 0.17469338],
+                  [0.9190793, 0.8486480, 0.7163332, 0.5083780, 0.26107691],
+                  [0.9371223, 0.8762177, 0.7653702, 0.5773109, 0.32181041],
+                  [0.9554613, 0.9119893, 0.8282687, 0.6776178, 0.43162744],
+                  [0.9545744, 0.9099264, 0.8270244, 0.6822220, 0.45237623],
+                  [0.9688112, 0.9351710, 0.8730961, 0.7546601, 0.56622448],
+                  [0.9743227, 0.9491953, 0.9005150, 0.8086497, 0.64505437],
+                  [0.9807345, 0.9638853, 0.9283012, 0.8631675, 0.73812581],
+                  [0.9886746, 0.9777760, 0.9558950, 0.9123417, 0.82726553],
+                  [0.9899096, 0.9803828, 0.9615592, 0.9255600, 0.85822149],
+                  [0.9969510, 0.9935441, 0.9864657, 0.9726775, 0.94358663],
+                  [0.9979533, 0.9960274, 0.9921724, 0.9837415, 0.96626288],
+                  [0.9995981, 0.9989171, 0.9974178, 0.9949954, 0.99023356],
+                  [1.0002640, 1.0005088, 1.0010594, 1.0021161, 1.00386912],
+                  [0.9998903, 0.9998459, 0.9997795, 0.9995484, 0.99916305],
+                  [1.0000008, 0.9999905, 0.9999481, 0.9998903, 0.99978047],
+                  [1.0000004, 0.9999983, 1.0000001, 1.0000031, 1.00000297],
+                  [0.9999995, 1.0000003, 1.0000005, 1.0000001, 1.00000032],
+                  [0.9999999, 0.9999997, 0.9999994, 0.9999989, 0.99999786],
+                  [0.9999999, 0.9999999, 0.9999999, 0.9999999, 0.99999991]]
+        # Get iteration points
+        grad_list = [prob.grad(x) for x in x_list]
+        delta_x = [np.array(x_list[i+1])-np.array(x_list[i])
+                   for i in range(len(x_list)-1)]
+        delta_grad = [grad_list[i+1]-grad_list[i]
+                      for i in range(len(grad_list)-1)]
+        # Check curvature condition
+        for s, y in zip(delta_x, delta_grad):
+            if np.dot(s, y) <= 0:
+                raise ArithmeticError()
+        # Define QuasiNewton update
+        for quasi_newton in (BFGS(init_scale=1, min_curvature=1e-4),
+                             SR1(init_scale=1)):
+            hess = deepcopy(quasi_newton)
+            inv_hess = deepcopy(quasi_newton)
+            hess.initialize(len(x_list[0]), 'hess')
+            inv_hess.initialize(len(x_list[0]), 'inv_hess')
+            # Compare the hessian and its inverse
+            for s, y in zip(delta_x, delta_grad):
+                hess.update(s, y)
+                inv_hess.update(s, y)
+                B = hess.get_matrix()
+                H = inv_hess.get_matrix()
+                assert_array_almost_equal(np.linalg.inv(B), H, decimal=10)
+            B_true = prob.hess(x_list[len(delta_x)])
+            assert_array_less(norm(B - B_true)/norm(B_true), 0.1)
+
+    def test_SR1_skip_update(self):
+        # Define auxiliary problem
+        prob = Rosenbrock(n=5)
+        # Define iteration points
+        x_list = [[0.0976270, 0.4303787, 0.2055267, 0.0897663, -0.15269040],
+                  [0.1847239, 0.0505757, 0.2123832, 0.0255081, 0.00083286],
+                  [0.2142498, -0.0188480, 0.0503822, 0.0347033, 0.03323606],
+                  [0.2071680, -0.0185071, 0.0341337, -0.0139298, 0.02881750],
+                  [0.1533055, -0.0322935, 0.0280418, -0.0083592, 0.01503699],
+                  [0.1382378, -0.0276671, 0.0266161, -0.0074060, 0.02801610],
+                  [0.1651957, -0.0049124, 0.0269665, -0.0040025, 0.02138184],
+                  [0.2354930, 0.0443711, 0.0173959, 0.0041872, 0.00794563],
+                  [0.4168118, 0.1433867, 0.0111714, 0.0126265, -0.00658537],
+                  [0.4681972, 0.2153273, 0.0225249, 0.0152704, -0.00463809],
+                  [0.6023068, 0.3346815, 0.0731108, 0.0186618, -0.00371541],
+                  [0.6415743, 0.3985468, 0.1324422, 0.0214160, -0.00062401],
+                  [0.7503690, 0.5447616, 0.2804541, 0.0539851, 0.00242230],
+                  [0.7452626, 0.5644594, 0.3324679, 0.0865153, 0.00454960],
+                  [0.8059782, 0.6586838, 0.4229577, 0.1452990, 0.00976702],
+                  [0.8549542, 0.7226562, 0.4991309, 0.2420093, 0.02772661],
+                  [0.8571332, 0.7285741, 0.5279076, 0.2824549, 0.06030276],
+                  [0.8835633, 0.7727077, 0.5957984, 0.3411303, 0.09652185],
+                  [0.9071558, 0.8299587, 0.6771400, 0.4402896, 0.17469338]]
+        # Get iteration points
+        grad_list = [prob.grad(x) for x in x_list]
+        delta_x = [np.array(x_list[i+1])-np.array(x_list[i])
+                   for i in range(len(x_list)-1)]
+        delta_grad = [grad_list[i+1]-grad_list[i]
+                      for i in range(len(grad_list)-1)]
+        hess = SR1(init_scale=1, min_denominator=1e-2)
+        hess.initialize(len(x_list[0]), 'hess')
+        # Compare the Hessian and its inverse
+        for i in range(len(delta_x)-1):
+            s = delta_x[i]
+            y = delta_grad[i]
+            hess.update(s, y)
+        # Test skip update
+        B = np.copy(hess.get_matrix())
+        s = delta_x[17]
+        y = delta_grad[17]
+        hess.update(s, y)
+        B_updated = np.copy(hess.get_matrix())
+        assert_array_equal(B, B_updated)
+
+    def test_BFGS_skip_update(self):
+        # Define auxiliary problem
+        prob = Rosenbrock(n=5)
+        # Define iteration points
+        x_list = [[0.0976270, 0.4303787, 0.2055267, 0.0897663, -0.15269040],
+                  [0.1847239, 0.0505757, 0.2123832, 0.0255081, 0.00083286],
+                  [0.2142498, -0.0188480, 0.0503822, 0.0347033, 0.03323606],
+                  [0.2071680, -0.0185071, 0.0341337, -0.0139298, 0.02881750],
+                  [0.1533055, -0.0322935, 0.0280418, -0.0083592, 0.01503699],
+                  [0.1382378, -0.0276671, 0.0266161, -0.0074060, 0.02801610],
+                  [0.1651957, -0.0049124, 0.0269665, -0.0040025, 0.02138184]]
+        # Get iteration points
+        grad_list = [prob.grad(x) for x in x_list]
+        delta_x = [np.array(x_list[i+1])-np.array(x_list[i])
+                   for i in range(len(x_list)-1)]
+        delta_grad = [grad_list[i+1]-grad_list[i]
+                      for i in range(len(grad_list)-1)]
+        hess = BFGS(init_scale=1, min_curvature=10)
+        hess.initialize(len(x_list[0]), 'hess')
+        # Compare the Hessian and its inverse
+        for i in range(len(delta_x)-1):
+            s = delta_x[i]
+            y = delta_grad[i]
+            hess.update(s, y)
+        # Test skip update
+        B = np.copy(hess.get_matrix())
+        s = delta_x[5]
+        y = delta_grad[5]
+        hess.update(s, y)
+        B_updated = np.copy(hess.get_matrix())
+        assert_array_equal(B, B_updated)
+
+
+@pytest.mark.parametrize('strategy', [BFGS, SR1])
+@pytest.mark.parametrize('approx_type', ['hess', 'inv_hess'])
+def test_matmul_equals_dot(strategy, approx_type):
+    H = strategy(init_scale=1)
+    H.initialize(2, approx_type)
+    v = np.array([1, 2])
+    assert_array_equal(H @ v, H.dot(v))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_isotonic_regression.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_isotonic_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..b49c56db5b4470c1e4e0f787df52c80eb055c120
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_isotonic_regression.py
@@ -0,0 +1,167 @@
+import numpy as np
+from numpy.testing import assert_allclose, assert_equal
+import pytest
+
+from scipy.optimize._pava_pybind import pava
+from scipy.optimize import isotonic_regression
+
+
+class TestIsotonicRegression:
+    @pytest.mark.parametrize(
+        ("y", "w", "msg"),
+        [
+            ([[0, 1]], None,
+             "array has incorrect number of dimensions: 2; expected 1"),
+            ([0, 1], [[1, 2]],
+             "Input arrays y and w must have one dimension of equal length"),
+            ([0, 1], [1],
+             "Input arrays y and w must have one dimension of equal length"),
+            (1, [1, 2],
+             "Input arrays y and w must have one dimension of equal length"),
+            ([1, 2], 1,
+             "Input arrays y and w must have one dimension of equal length"),
+            ([0, 1], [0, 1],
+             "Weights w must be strictly positive"),
+        ]
+    )
+    def test_raise_error(self, y, w, msg):
+        with pytest.raises(ValueError, match=msg):
+            isotonic_regression(y=y, weights=w)
+
+    def test_simple_pava(self):
+        # Test case of Busing 2020
+        # https://doi.org/10.18637/jss.v102.c01
+        y = np.array([8, 4, 8, 2, 2, 0, 8], dtype=np.float64)
+        w = np.ones_like(y)
+        r = np.full(shape=y.shape[0] + 1, fill_value=-1, dtype=np.intp)
+        pava(y, w, r)
+        assert_allclose(y, [4, 4, 4, 4, 4, 4, 8])
+        # Only first 2 elements of w are changed.
+        assert_allclose(w, [6, 1, 1, 1, 1, 1, 1])
+        # Only first 3 elements of r are changed.
+        assert_allclose(r, [0, 6, 7, -1, -1, -1, -1, -1])
+
+    @pytest.mark.parametrize("y_dtype", [np.float64, np.float32, np.int64, np.int32])
+    @pytest.mark.parametrize("w_dtype", [np.float64, np.float32, np.int64, np.int32])
+    @pytest.mark.parametrize("w", [None, "ones"])
+    def test_simple_isotonic_regression(self, w, w_dtype, y_dtype):
+        # Test case of Busing 2020
+        # https://doi.org/10.18637/jss.v102.c01
+        y = np.array([8, 4, 8, 2, 2, 0, 8], dtype=y_dtype)
+        if w is not None:
+            w = np.ones_like(y, dtype=w_dtype)
+        res = isotonic_regression(y, weights=w)
+        assert res.x.dtype == np.float64
+        assert res.weights.dtype == np.float64
+        assert_allclose(res.x, [4, 4, 4, 4, 4, 4, 8])
+        assert_allclose(res.weights, [6, 1])
+        assert_allclose(res.blocks, [0, 6, 7])
+        # Assert that y was not overwritten
+        assert_equal(y, np.array([8, 4, 8, 2, 2, 0, 8], dtype=np.float64))
+
+    @pytest.mark.parametrize("increasing", [True, False])
+    def test_linspace(self, increasing):
+        n = 10
+        y = np.linspace(0, 1, n) if increasing else np.linspace(1, 0, n)
+        res = isotonic_regression(y, increasing=increasing)
+        assert_allclose(res.x, y)
+        assert_allclose(res.blocks, np.arange(n + 1))
+
+    def test_weights(self):
+        w = np.array([1, 2, 5, 0.5, 0.5, 0.5, 1, 3])
+        y = np.array([3, 2, 1, 10, 9, 8, 20, 10])
+        res = isotonic_regression(y, weights=w)
+        assert_allclose(res.x, [12/8, 12/8, 12/8, 9, 9, 9, 50/4, 50/4])
+        assert_allclose(res.weights, [8, 1.5, 4])
+        assert_allclose(res.blocks, [0, 3, 6, 8])
+
+        # weights are like repeated observations, we repeat the 3rd element 5
+        # times.
+        w2 = np.array([1, 2, 1, 1, 1, 1, 1, 0.5, 0.5, 0.5, 1, 3])
+        y2 = np.array([3, 2, 1, 1, 1, 1, 1, 10, 9, 8, 20, 10])
+        res2 = isotonic_regression(y2, weights=w2)
+        assert_allclose(np.diff(res2.x[0:7]), 0)
+        assert_allclose(res2.x[4:], res.x)
+        assert_allclose(res2.weights, res.weights)
+        assert_allclose(res2.blocks[1:] - 4, res.blocks[1:])
+
+    def test_against_R_monotone(self):
+        y = [0, 6, 8, 3, 5, 2, 1, 7, 9, 4]
+        res = isotonic_regression(y)
+        # R code
+        # library(monotone)
+        # options(digits=8)
+        # monotone(c(0, 6, 8, 3, 5, 2, 1, 7, 9, 4))
+        x_R = [
+            0, 4.1666667, 4.1666667, 4.1666667, 4.1666667, 4.1666667,
+            4.1666667, 6.6666667, 6.6666667, 6.6666667,
+        ]
+        assert_allclose(res.x, x_R)
+        assert_equal(res.blocks, [0, 1, 7, 10])
+
+        n = 100
+        y = np.linspace(0, 1, num=n, endpoint=False)
+        y = 5 * y + np.sin(10 * y)
+        res = isotonic_regression(y)
+        # R code
+        # library(monotone)
+        # n <- 100
+        # y <- 5 * ((1:n)-1)/n + sin(10 * ((1:n)-1)/n)
+        # options(digits=8)
+        # monotone(y)
+        x_R = [
+            0.00000000, 0.14983342, 0.29866933, 0.44552021, 0.58941834, 0.72942554,
+            0.86464247, 0.99421769, 1.11735609, 1.23332691, 1.34147098, 1.44120736,
+            1.53203909, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100, 1.57081100,
+            1.57081100, 1.57081100, 1.57081100, 1.62418532, 1.71654534, 1.81773256,
+            1.92723551, 2.04445967, 2.16873336, 2.29931446, 2.43539782, 2.57612334,
+            2.72058450, 2.86783750, 3.01691060, 3.16681390, 3.31654920, 3.46511999,
+            3.61154136, 3.75484992, 3.89411335, 4.02843976, 4.15698660, 4.27896904,
+            4.39366786, 4.50043662, 4.59870810, 4.68799998, 4.76791967, 4.83816823,
+            4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130,
+            4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130,
+            4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130, 4.86564130,
+            4.86564130, 4.86564130, 4.86564130, 4.86564130,
+        ]
+        assert_allclose(res.x, x_R)
+
+        # Test increasing
+        assert np.all(np.diff(res.x) >= 0)
+
+        # Test balance property: sum(y) == sum(x)
+        assert_allclose(np.sum(res.x), np.sum(y))
+
+        # Reverse order
+        res_inv = isotonic_regression(-y, increasing=False)
+        assert_allclose(-res_inv.x, res.x)
+        assert_equal(res_inv.blocks, res.blocks)
+
+    def test_readonly(self):
+        x = np.arange(3, dtype=float)
+        w = np.ones(3, dtype=float)
+
+        x.flags.writeable = False
+        w.flags.writeable = False
+
+        res = isotonic_regression(x, weights=w)
+        assert np.all(np.isfinite(res.x))
+        assert np.all(np.isfinite(res.weights))
+        assert np.all(np.isfinite(res.blocks))
+
+    def test_non_contiguous_arrays(self):
+        x = np.arange(10, dtype=float)[::3]
+        w = np.ones(10, dtype=float)[::3]
+        assert not x.flags.c_contiguous
+        assert not x.flags.f_contiguous
+        assert not w.flags.c_contiguous
+        assert not w.flags.f_contiguous
+
+        res = isotonic_regression(x, weights=w)
+        assert np.all(np.isfinite(res.x))
+        assert np.all(np.isfinite(res.weights))
+        assert np.all(np.isfinite(res.blocks))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_hessinv.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_hessinv.py
new file mode 100644
index 0000000000000000000000000000000000000000..8e4452cd61c5400c13f4f239055352bae754ad7e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_hessinv.py
@@ -0,0 +1,43 @@
+import numpy as np
+from numpy.testing import assert_allclose
+import scipy.linalg
+from scipy.optimize import minimize
+
+
+def test_1():
+    def f(x):
+        return x**4, 4*x**3
+
+    for gtol in [1e-8, 1e-12, 1e-20]:
+        for maxcor in range(20, 35):
+            result = minimize(fun=f, jac=True, method='L-BFGS-B', x0=20,
+                options={'gtol': gtol, 'maxcor': maxcor})
+
+            H1 = result.hess_inv(np.array([1])).reshape(1,1)
+            H2 = result.hess_inv.todense()
+
+            assert_allclose(H1, H2)
+
+
+def test_2():
+    H0 = [[3, 0], [1, 2]]
+
+    def f(x):
+        return np.dot(x, np.dot(scipy.linalg.inv(H0), x))
+
+    result1 = minimize(fun=f, method='L-BFGS-B', x0=[10, 20])
+    result2 = minimize(fun=f, method='BFGS', x0=[10, 20])
+
+    H1 = result1.hess_inv.todense()
+
+    H2 = np.vstack((
+        result1.hess_inv(np.array([1, 0])),
+        result1.hess_inv(np.array([0, 1]))))
+
+    assert_allclose(
+        result1.hess_inv(np.array([1, 0]).reshape(2,1)).reshape(-1),
+        result1.hess_inv(np.array([1, 0])))
+    assert_allclose(H1, H2)
+    assert_allclose(H1, result2.hess_inv, rtol=1e-2, atol=0.03)
+
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_setulb.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_setulb.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee47f45509c86968b9b551eb8740ad301fd37958
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lbfgsb_setulb.py
@@ -0,0 +1,122 @@
+import numpy as np
+from scipy.optimize import _lbfgsb, minimize
+
+
+def objfun(x):
+    """simplified objective func to test lbfgsb bound violation"""
+    x0 = [0.8750000000000278,
+          0.7500000000000153,
+          0.9499999999999722,
+          0.8214285714285992,
+          0.6363636363636085]
+    x1 = [1.0, 0.0, 1.0, 0.0, 0.0]
+    x2 = [1.0,
+          0.0,
+          0.9889733043149325,
+          0.0,
+          0.026353554421041155]
+    x3 = [1.0,
+          0.0,
+          0.9889917442915558,
+          0.0,
+          0.020341986743231205]
+
+    f0 = 5163.647901211178
+    f1 = 5149.8181642072905
+    f2 = 5149.379332309634
+    f3 = 5149.374490771297
+
+    g0 = np.array([-0.5934820547965749,
+                   1.6251549718258351,
+                   -71.99168459202559,
+                   5.346636965797545,
+                   37.10732723092604])
+    g1 = np.array([-0.43295349282641515,
+                   1.008607936794592,
+                   18.223666726602975,
+                   31.927010036981997,
+                   -19.667512518739386])
+    g2 = np.array([-0.4699874455100256,
+                   0.9466285353668347,
+                   -0.016874360242016825,
+                   48.44999161133457,
+                   5.819631620590712])
+    g3 = np.array([-0.46970678696829116,
+                   0.9612719312174818,
+                   0.006129809488833699,
+                   48.43557729419473,
+                   6.005481418498221])
+
+    if np.allclose(x, x0):
+        f = f0
+        g = g0
+    elif np.allclose(x, x1):
+        f = f1
+        g = g1
+    elif np.allclose(x, x2):
+        f = f2
+        g = g2
+    elif np.allclose(x, x3):
+        f = f3
+        g = g3
+    else:
+        raise ValueError(
+            'Simplified objective function not defined '
+            'at requested point')
+    return (np.copy(f), np.copy(g))
+
+
+def test_setulb_floatround():
+    """test if setulb() violates bounds
+
+    checks for violation due to floating point rounding error
+    """
+
+    n = 5
+    m = 10
+    factr = 1e7
+    pgtol = 1e-5
+    maxls = 20
+    nbd = np.full(shape=(n,), fill_value=2, dtype=np.int32)
+    low_bnd = np.zeros(n, dtype=np.float64)
+    upper_bnd = np.ones(n, dtype=np.float64)
+
+    x0 = np.array(
+        [0.8750000000000278,
+         0.7500000000000153,
+         0.9499999999999722,
+         0.8214285714285992,
+         0.6363636363636085])
+    x = np.copy(x0)
+
+    f = np.array(0.0, dtype=np.float64)
+    g = np.zeros(n, dtype=np.float64)
+
+    wa = np.zeros(2*m*n + 5*n + 11*m*m + 8*m, dtype=np.float64)
+    iwa = np.zeros(3*n, dtype=np.int32)
+    task = np.zeros(2, dtype=np.int32)
+    ln_task = np.zeros(2, dtype=np.int32)
+    lsave = np.zeros(4, dtype=np.int32)
+    isave = np.zeros(44, dtype=np.int32)
+    dsave = np.zeros(29, dtype=np.float64)
+
+    for n_iter in range(7):  # 7 steps required to reproduce error
+        f, g = objfun(x)
+
+        _lbfgsb.setulb(m, x, low_bnd, upper_bnd, nbd, f, g, factr, pgtol, wa,
+                       iwa, task, lsave, isave, dsave, maxls, ln_task)
+
+        assert (x <= upper_bnd).all() and (x >= low_bnd).all(), (
+            "_lbfgsb.setulb() stepped to a point outside of the bounds")
+
+
+def test_gh_issue18730():
+    # issue 18730 reported that l-bfgs-b did not work with objectives
+    # returning single precision gradient arrays
+    def fun_single_precision(x):
+        x = x.astype(np.float32)
+        return np.sum(x**2), (2*x)
+
+    res = minimize(fun_single_precision, x0=np.array([1., 1.]), jac=True,
+                   method="l-bfgs-b")
+    np.testing.assert_allclose(res.fun, 0., atol=1e-15)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_least_squares.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_least_squares.py
new file mode 100644
index 0000000000000000000000000000000000000000..d27d670a1aac01f7129d483e0a048a38dce35404
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_least_squares.py
@@ -0,0 +1,874 @@
+from itertools import product
+
+import numpy as np
+from numpy.linalg import norm
+from numpy.testing import (assert_, assert_allclose,
+                           assert_equal, suppress_warnings)
+import pytest
+from pytest import raises as assert_raises
+from scipy.sparse import issparse, lil_matrix
+from scipy.sparse.linalg import aslinearoperator
+
+from scipy.optimize import least_squares, Bounds
+from scipy.optimize._lsq.least_squares import IMPLEMENTED_LOSSES
+from scipy.optimize._lsq.common import EPS, make_strictly_feasible, CL_scaling_vector
+
+
+def fun_trivial(x, a=0):
+    return (x - a)**2 + 5.0
+
+
+def jac_trivial(x, a=0.0):
+    return 2 * (x - a)
+
+
+def fun_2d_trivial(x):
+    return np.array([x[0], x[1]])
+
+
+def jac_2d_trivial(x):
+    return np.identity(2)
+
+
+def fun_rosenbrock(x):
+    return np.array([10 * (x[1] - x[0]**2), (1 - x[0])])
+
+
+def jac_rosenbrock(x):
+    return np.array([
+        [-20 * x[0], 10],
+        [-1, 0]
+    ])
+
+
+def jac_rosenbrock_bad_dim(x):
+    return np.array([
+        [-20 * x[0], 10],
+        [-1, 0],
+        [0.0, 0.0]
+    ])
+
+
+def fun_rosenbrock_cropped(x):
+    return fun_rosenbrock(x)[0]
+
+
+def jac_rosenbrock_cropped(x):
+    return jac_rosenbrock(x)[0]
+
+
+# When x is 1-D array, return is 2-D array.
+def fun_wrong_dimensions(x):
+    return np.array([x, x**2, x**3])
+
+
+def jac_wrong_dimensions(x, a=0.0):
+    return np.atleast_3d(jac_trivial(x, a=a))
+
+
+def fun_bvp(x):
+    n = int(np.sqrt(x.shape[0]))
+    u = np.zeros((n + 2, n + 2))
+    x = x.reshape((n, n))
+    u[1:-1, 1:-1] = x
+    y = u[:-2, 1:-1] + u[2:, 1:-1] + u[1:-1, :-2] + u[1:-1, 2:] - 4 * x + x**3
+    return y.ravel()
+
+
+class BroydenTridiagonal:
+    def __init__(self, n=100, mode='sparse'):
+        rng = np.random.RandomState(0)
+
+        self.n = n
+
+        self.x0 = -np.ones(n)
+        self.lb = np.linspace(-2, -1.5, n)
+        self.ub = np.linspace(-0.8, 0.0, n)
+
+        self.lb += 0.1 * rng.randn(n)
+        self.ub += 0.1 * rng.randn(n)
+
+        self.x0 += 0.1 * rng.randn(n)
+        self.x0 = make_strictly_feasible(self.x0, self.lb, self.ub)
+
+        if mode == 'sparse':
+            self.sparsity = lil_matrix((n, n), dtype=int)
+            i = np.arange(n)
+            self.sparsity[i, i] = 1
+            i = np.arange(1, n)
+            self.sparsity[i, i - 1] = 1
+            i = np.arange(n - 1)
+            self.sparsity[i, i + 1] = 1
+
+            self.jac = self._jac
+        elif mode == 'operator':
+            self.jac = lambda x: aslinearoperator(self._jac(x))
+        elif mode == 'dense':
+            self.sparsity = None
+            self.jac = lambda x: self._jac(x).toarray()
+        else:
+            assert_(False)
+
+    def fun(self, x):
+        f = (3 - x) * x + 1
+        f[1:] -= x[:-1]
+        f[:-1] -= 2 * x[1:]
+        return f
+
+    def _jac(self, x):
+        J = lil_matrix((self.n, self.n))
+        i = np.arange(self.n)
+        J[i, i] = 3 - 2 * x
+        i = np.arange(1, self.n)
+        J[i, i - 1] = -1
+        i = np.arange(self.n - 1)
+        J[i, i + 1] = -2
+        return J
+
+
+class ExponentialFittingProblem:
+    """Provide data and function for exponential fitting in the form
+    y = a + exp(b * x) + noise."""
+
+    def __init__(self, a, b, noise, n_outliers=1, x_range=(-1, 1),
+                 n_points=11, random_seed=None):
+        rng = np.random.RandomState(random_seed)
+        self.m = n_points
+        self.n = 2
+
+        self.p0 = np.zeros(2)
+        self.x = np.linspace(x_range[0], x_range[1], n_points)
+
+        self.y = a + np.exp(b * self.x)
+        self.y += noise * rng.randn(self.m)
+
+        outliers = rng.randint(0, self.m, n_outliers)
+        self.y[outliers] += 50 * noise * rng.rand(n_outliers)
+
+        self.p_opt = np.array([a, b])
+
+    def fun(self, p):
+        return p[0] + np.exp(p[1] * self.x) - self.y
+
+    def jac(self, p):
+        J = np.empty((self.m, self.n))
+        J[:, 0] = 1
+        J[:, 1] = self.x * np.exp(p[1] * self.x)
+        return J
+
+
+def cubic_soft_l1(z):
+    rho = np.empty((3, z.size))
+
+    t = 1 + z
+    rho[0] = 3 * (t**(1/3) - 1)
+    rho[1] = t ** (-2/3)
+    rho[2] = -2/3 * t**(-5/3)
+
+    return rho
+
+
+LOSSES = list(IMPLEMENTED_LOSSES.keys()) + [cubic_soft_l1]
+
+
+class BaseMixin:
+    def test_basic(self):
+        # Test that the basic calling sequence works.
+        res = least_squares(fun_trivial, 2., method=self.method)
+        assert_allclose(res.x, 0, atol=1e-4)
+        assert_allclose(res.fun, fun_trivial(res.x))
+
+    def test_args_kwargs(self):
+        # Test that args and kwargs are passed correctly to the functions.
+        a = 3.0
+        for jac in ['2-point', '3-point', 'cs', jac_trivial]:
+            with suppress_warnings() as sup:
+                sup.filter(
+                    UserWarning,
+                    "jac='(3-point|cs)' works equivalently to '2-point' for method='lm'"
+                )
+                res = least_squares(fun_trivial, 2.0, jac, args=(a,),
+                                    method=self.method)
+                res1 = least_squares(fun_trivial, 2.0, jac, kwargs={'a': a},
+                                    method=self.method)
+
+            assert_allclose(res.x, a, rtol=1e-4)
+            assert_allclose(res1.x, a, rtol=1e-4)
+
+            assert_raises(TypeError, least_squares, fun_trivial, 2.0,
+                          args=(3, 4,), method=self.method)
+            assert_raises(TypeError, least_squares, fun_trivial, 2.0,
+                          kwargs={'kaboom': 3}, method=self.method)
+
+    def test_jac_options(self):
+        for jac in ['2-point', '3-point', 'cs', jac_trivial]:
+            with suppress_warnings() as sup:
+                sup.filter(
+                    UserWarning,
+                    "jac='(3-point|cs)' works equivalently to '2-point' for method='lm'"
+                )
+                res = least_squares(fun_trivial, 2.0, jac, method=self.method)
+            assert_allclose(res.x, 0, atol=1e-4)
+
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0, jac='oops',
+                      method=self.method)
+
+    def test_nfev_options(self):
+        for max_nfev in [None, 20]:
+            res = least_squares(fun_trivial, 2.0, max_nfev=max_nfev,
+                                method=self.method)
+            assert_allclose(res.x, 0, atol=1e-4)
+
+    def test_x_scale_options(self):
+        for x_scale in [1.0, np.array([0.5]), 'jac']:
+            res = least_squares(fun_trivial, 2.0, x_scale=x_scale)
+            assert_allclose(res.x, 0)
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, x_scale='auto', method=self.method)
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, x_scale=-1.0, method=self.method)
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, x_scale=None, method=self.method)
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, x_scale=1.0+2.0j, method=self.method)
+
+    def test_diff_step(self):
+        # res1 and res2 should be equivalent.
+        # res2 and res3 should be different.
+        res1 = least_squares(fun_trivial, 2.0, diff_step=1e-1,
+                             method=self.method)
+        res2 = least_squares(fun_trivial, 2.0, diff_step=-1e-1,
+                             method=self.method)
+        res3 = least_squares(fun_trivial, 2.0,
+                             diff_step=None, method=self.method)
+        assert_allclose(res1.x, 0, atol=1e-4)
+        assert_allclose(res2.x, 0, atol=1e-4)
+        assert_allclose(res3.x, 0, atol=1e-4)
+        assert_equal(res1.x, res2.x)
+        assert_equal(res1.nfev, res2.nfev)
+
+    def test_incorrect_options_usage(self):
+        assert_raises(TypeError, least_squares, fun_trivial, 2.0,
+                      method=self.method, options={'no_such_option': 100})
+        assert_raises(TypeError, least_squares, fun_trivial, 2.0,
+                      method=self.method, options={'max_nfev': 100})
+
+    def test_full_result(self):
+        # MINPACK doesn't work very well with factor=100 on this problem,
+        # thus using low 'atol'.
+        res = least_squares(fun_trivial, 2.0, method=self.method)
+        assert_allclose(res.x, 0, atol=1e-4)
+        assert_allclose(res.cost, 12.5)
+        assert_allclose(res.fun, 5)
+        assert_allclose(res.jac, 0, atol=1e-4)
+        assert_allclose(res.grad, 0, atol=1e-2)
+        assert_allclose(res.optimality, 0, atol=1e-2)
+        assert_equal(res.active_mask, 0)
+        if self.method == 'lm':
+            assert_(res.nfev < 30)
+            assert_(res.njev is None)
+        else:
+            assert_(res.nfev < 10)
+            assert_(res.njev < 10)
+        assert_(res.status > 0)
+        assert_(res.success)
+
+    def test_full_result_single_fev(self):
+        # MINPACK checks the number of nfev after the iteration,
+        # so it's hard to tell what he is going to compute.
+        if self.method == 'lm':
+            return
+
+        res = least_squares(fun_trivial, 2.0, method=self.method,
+                            max_nfev=1)
+        assert_equal(res.x, np.array([2]))
+        assert_equal(res.cost, 40.5)
+        assert_equal(res.fun, np.array([9]))
+        assert_equal(res.jac, np.array([[4]]))
+        assert_equal(res.grad, np.array([36]))
+        assert_equal(res.optimality, 36)
+        assert_equal(res.active_mask, np.array([0]))
+        assert_equal(res.nfev, 1)
+        assert_equal(res.njev, 1)
+        assert_equal(res.status, 0)
+        assert_equal(res.success, 0)
+
+    def test_rosenbrock(self):
+        x0 = [-2, 1]
+        x_opt = [1, 1]
+        for jac, x_scale, tr_solver in product(
+                ['2-point', '3-point', 'cs', jac_rosenbrock],
+                [1.0, np.array([1.0, 0.2]), 'jac'],
+                ['exact', 'lsmr']):
+            with suppress_warnings() as sup:
+                sup.filter(
+                    UserWarning,
+                    "jac='(3-point|cs)' works equivalently to '2-point' for method='lm'"
+                )
+                res = least_squares(fun_rosenbrock, x0, jac, x_scale=x_scale,
+                                    tr_solver=tr_solver, method=self.method)
+            assert_allclose(res.x, x_opt)
+
+    def test_rosenbrock_cropped(self):
+        x0 = [-2, 1]
+        if self.method == 'lm':
+            assert_raises(ValueError, least_squares, fun_rosenbrock_cropped,
+                          x0, method='lm')
+        else:
+            for jac, x_scale, tr_solver in product(
+                    ['2-point', '3-point', 'cs', jac_rosenbrock_cropped],
+                    [1.0, np.array([1.0, 0.2]), 'jac'],
+                    ['exact', 'lsmr']):
+                res = least_squares(
+                    fun_rosenbrock_cropped, x0, jac, x_scale=x_scale,
+                    tr_solver=tr_solver, method=self.method)
+                assert_allclose(res.cost, 0, atol=1e-14)
+
+    def test_fun_wrong_dimensions(self):
+        assert_raises(ValueError, least_squares, fun_wrong_dimensions,
+                      2.0, method=self.method)
+
+    def test_jac_wrong_dimensions(self):
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, jac_wrong_dimensions, method=self.method)
+
+    def test_fun_and_jac_inconsistent_dimensions(self):
+        x0 = [1, 2]
+        assert_raises(ValueError, least_squares, fun_rosenbrock, x0,
+                      jac_rosenbrock_bad_dim, method=self.method)
+
+    def test_x0_multidimensional(self):
+        x0 = np.ones(4).reshape(2, 2)
+        assert_raises(ValueError, least_squares, fun_trivial, x0,
+                      method=self.method)
+
+    def test_x0_complex_scalar(self):
+        x0 = 2.0 + 0.0*1j
+        assert_raises(ValueError, least_squares, fun_trivial, x0,
+                      method=self.method)
+
+    def test_x0_complex_array(self):
+        x0 = [1.0, 2.0 + 0.0*1j]
+        assert_raises(ValueError, least_squares, fun_trivial, x0,
+                      method=self.method)
+
+    def test_bvp(self):
+        # This test was introduced with fix #5556. It turned out that
+        # dogbox solver had a bug with trust-region radius update, which
+        # could block its progress and create an infinite loop. And this
+        # discrete boundary value problem is the one which triggers it.
+        n = 10
+        x0 = np.ones(n**2)
+        if self.method == 'lm':
+            max_nfev = 5000  # To account for Jacobian estimation.
+        else:
+            max_nfev = 100
+        res = least_squares(fun_bvp, x0, ftol=1e-2, method=self.method,
+                            max_nfev=max_nfev)
+
+        assert_(res.nfev < max_nfev)
+        assert_(res.cost < 0.5)
+
+    def test_error_raised_when_all_tolerances_below_eps(self):
+        # Test that all 0 tolerances are not allowed.
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      method=self.method, ftol=None, xtol=None, gtol=None)
+
+    def test_convergence_with_only_one_tolerance_enabled(self):
+        if self.method == 'lm':
+            return  # should not do test
+        x0 = [-2, 1]
+        x_opt = [1, 1]
+        for ftol, xtol, gtol in [(1e-8, None, None),
+                                  (None, 1e-8, None),
+                                  (None, None, 1e-8)]:
+            res = least_squares(fun_rosenbrock, x0, jac=jac_rosenbrock,
+                                ftol=ftol, gtol=gtol, xtol=xtol,
+                                method=self.method)
+            assert_allclose(res.x, x_opt)
+
+
+class BoundsMixin:
+    def test_inconsistent(self):
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      bounds=(10.0, 0.0), method=self.method)
+
+    def test_infeasible(self):
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      bounds=(3., 4), method=self.method)
+
+    def test_wrong_number(self):
+        assert_raises(ValueError, least_squares, fun_trivial, 2.,
+                      bounds=(1., 2, 3), method=self.method)
+
+    def test_inconsistent_shape(self):
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      bounds=(1.0, [2.0, 3.0]), method=self.method)
+        # 1-D array won't be broadcast
+        assert_raises(ValueError, least_squares, fun_rosenbrock, [1.0, 2.0],
+                      bounds=([0.0], [3.0, 4.0]), method=self.method)
+
+    def test_in_bounds(self):
+        for jac in ['2-point', '3-point', 'cs', jac_trivial]:
+            res = least_squares(fun_trivial, 2.0, jac=jac,
+                                bounds=(-1.0, 3.0), method=self.method)
+            assert_allclose(res.x, 0.0, atol=1e-4)
+            assert_equal(res.active_mask, [0])
+            assert_(-1 <= res.x <= 3)
+            res = least_squares(fun_trivial, 2.0, jac=jac,
+                                bounds=(0.5, 3.0), method=self.method)
+            assert_allclose(res.x, 0.5, atol=1e-4)
+            assert_equal(res.active_mask, [-1])
+            assert_(0.5 <= res.x <= 3)
+
+    def test_bounds_shape(self):
+        def get_bounds_direct(lb, ub):
+            return lb, ub
+
+        def get_bounds_instances(lb, ub):
+            return Bounds(lb, ub)
+
+        for jac in ['2-point', '3-point', 'cs', jac_2d_trivial]:
+            for bounds_func in [get_bounds_direct, get_bounds_instances]:
+                x0 = [1.0, 1.0]
+                res = least_squares(fun_2d_trivial, x0, jac=jac)
+                assert_allclose(res.x, [0.0, 0.0])
+                res = least_squares(fun_2d_trivial, x0, jac=jac,
+                                    bounds=bounds_func(0.5, [2.0, 2.0]),
+                                    method=self.method)
+                assert_allclose(res.x, [0.5, 0.5])
+                res = least_squares(fun_2d_trivial, x0, jac=jac,
+                                    bounds=bounds_func([0.3, 0.2], 3.0),
+                                    method=self.method)
+                assert_allclose(res.x, [0.3, 0.2])
+                res = least_squares(
+                    fun_2d_trivial, x0, jac=jac,
+                    bounds=bounds_func([-1, 0.5], [1.0, 3.0]),
+                    method=self.method)
+                assert_allclose(res.x, [0.0, 0.5], atol=1e-5)
+
+    def test_bounds_instances(self):
+        res = least_squares(fun_trivial, 0.5, bounds=Bounds())
+        assert_allclose(res.x, 0.0, atol=1e-4)
+
+        res = least_squares(fun_trivial, 3.0, bounds=Bounds(lb=1.0))
+        assert_allclose(res.x, 1.0, atol=1e-4)
+
+        res = least_squares(fun_trivial, 0.5, bounds=Bounds(lb=-1.0, ub=1.0))
+        assert_allclose(res.x, 0.0, atol=1e-4)
+
+        res = least_squares(fun_trivial, -3.0, bounds=Bounds(ub=-1.0))
+        assert_allclose(res.x, -1.0, atol=1e-4)
+
+        res = least_squares(fun_2d_trivial, [0.5, 0.5],
+                            bounds=Bounds(lb=[-1.0, -1.0], ub=1.0))
+        assert_allclose(res.x, [0.0, 0.0], atol=1e-5)
+
+        res = least_squares(fun_2d_trivial, [0.5, 0.5],
+                            bounds=Bounds(lb=[0.1, 0.1]))
+        assert_allclose(res.x, [0.1, 0.1], atol=1e-5)
+
+    @pytest.mark.fail_slow(10)
+    def test_rosenbrock_bounds(self):
+        x0_1 = np.array([-2.0, 1.0])
+        x0_2 = np.array([2.0, 2.0])
+        x0_3 = np.array([-2.0, 2.0])
+        x0_4 = np.array([0.0, 2.0])
+        x0_5 = np.array([-1.2, 1.0])
+        problems = [
+            (x0_1, ([-np.inf, -1.5], np.inf)),
+            (x0_2, ([-np.inf, 1.5], np.inf)),
+            (x0_3, ([-np.inf, 1.5], np.inf)),
+            (x0_4, ([-np.inf, 1.5], [1.0, np.inf])),
+            (x0_2, ([1.0, 1.5], [3.0, 3.0])),
+            (x0_5, ([-50.0, 0.0], [0.5, 100]))
+        ]
+        for x0, bounds in problems:
+            for jac, x_scale, tr_solver in product(
+                    ['2-point', '3-point', 'cs', jac_rosenbrock],
+                    [1.0, [1.0, 0.5], 'jac'],
+                    ['exact', 'lsmr']):
+                res = least_squares(fun_rosenbrock, x0, jac, bounds,
+                                    x_scale=x_scale, tr_solver=tr_solver,
+                                    method=self.method)
+                assert_allclose(res.optimality, 0.0, atol=1e-5)
+
+
+class SparseMixin:
+    def test_exact_tr_solver(self):
+        p = BroydenTridiagonal()
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      tr_solver='exact', method=self.method)
+        assert_raises(ValueError, least_squares, p.fun, p.x0,
+                      tr_solver='exact', jac_sparsity=p.sparsity,
+                      method=self.method)
+
+    def test_equivalence(self):
+        sparse = BroydenTridiagonal(mode='sparse')
+        dense = BroydenTridiagonal(mode='dense')
+        res_sparse = least_squares(
+            sparse.fun, sparse.x0, jac=sparse.jac,
+            method=self.method)
+        res_dense = least_squares(
+            dense.fun, dense.x0, jac=sparse.jac,
+            method=self.method)
+        assert_equal(res_sparse.nfev, res_dense.nfev)
+        assert_allclose(res_sparse.x, res_dense.x, atol=1e-20)
+        assert_allclose(res_sparse.cost, 0, atol=1e-20)
+        assert_allclose(res_dense.cost, 0, atol=1e-20)
+
+    def test_tr_options(self):
+        p = BroydenTridiagonal()
+        res = least_squares(p.fun, p.x0, p.jac, method=self.method,
+                            tr_options={'btol': 1e-10})
+        assert_allclose(res.cost, 0, atol=1e-20)
+
+    def test_wrong_parameters(self):
+        p = BroydenTridiagonal()
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      tr_solver='best', method=self.method)
+        assert_raises(TypeError, least_squares, p.fun, p.x0, p.jac,
+                      tr_solver='lsmr', tr_options={'tol': 1e-10})
+
+    def test_solver_selection(self):
+        sparse = BroydenTridiagonal(mode='sparse')
+        dense = BroydenTridiagonal(mode='dense')
+        res_sparse = least_squares(sparse.fun, sparse.x0, jac=sparse.jac,
+                                   method=self.method)
+        res_dense = least_squares(dense.fun, dense.x0, jac=dense.jac,
+                                  method=self.method)
+        assert_allclose(res_sparse.cost, 0, atol=1e-20)
+        assert_allclose(res_dense.cost, 0, atol=1e-20)
+        assert_(issparse(res_sparse.jac))
+        assert_(isinstance(res_dense.jac, np.ndarray))
+
+    def test_numerical_jac(self):
+        p = BroydenTridiagonal()
+        for jac in ['2-point', '3-point', 'cs']:
+            res_dense = least_squares(p.fun, p.x0, jac, method=self.method)
+            res_sparse = least_squares(
+                p.fun, p.x0, jac,method=self.method,
+                jac_sparsity=p.sparsity)
+            assert_equal(res_dense.nfev, res_sparse.nfev)
+            assert_allclose(res_dense.x, res_sparse.x, atol=1e-20)
+            assert_allclose(res_dense.cost, 0, atol=1e-20)
+            assert_allclose(res_sparse.cost, 0, atol=1e-20)
+
+    @pytest.mark.fail_slow(10)
+    def test_with_bounds(self):
+        p = BroydenTridiagonal()
+        for jac, jac_sparsity in product(
+                [p.jac, '2-point', '3-point', 'cs'], [None, p.sparsity]):
+            res_1 = least_squares(
+                p.fun, p.x0, jac, bounds=(p.lb, np.inf),
+                method=self.method,jac_sparsity=jac_sparsity)
+            res_2 = least_squares(
+                p.fun, p.x0, jac, bounds=(-np.inf, p.ub),
+                method=self.method, jac_sparsity=jac_sparsity)
+            res_3 = least_squares(
+                p.fun, p.x0, jac, bounds=(p.lb, p.ub),
+                method=self.method, jac_sparsity=jac_sparsity)
+            assert_allclose(res_1.optimality, 0, atol=1e-10)
+            assert_allclose(res_2.optimality, 0, atol=1e-10)
+            assert_allclose(res_3.optimality, 0, atol=1e-10)
+
+    def test_wrong_jac_sparsity(self):
+        p = BroydenTridiagonal()
+        sparsity = p.sparsity[:-1]
+        assert_raises(ValueError, least_squares, p.fun, p.x0,
+                      jac_sparsity=sparsity, method=self.method)
+
+    def test_linear_operator(self):
+        p = BroydenTridiagonal(mode='operator')
+        res = least_squares(p.fun, p.x0, p.jac, method=self.method)
+        assert_allclose(res.cost, 0.0, atol=1e-20)
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      method=self.method, tr_solver='exact')
+
+    def test_x_scale_jac_scale(self):
+        p = BroydenTridiagonal()
+        res = least_squares(p.fun, p.x0, p.jac, method=self.method,
+                            x_scale='jac')
+        assert_allclose(res.cost, 0.0, atol=1e-20)
+
+        p = BroydenTridiagonal(mode='operator')
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      method=self.method, x_scale='jac')
+
+
+class LossFunctionMixin:
+    def test_options(self):
+        for loss in LOSSES:
+            res = least_squares(fun_trivial, 2.0, loss=loss,
+                                method=self.method)
+            assert_allclose(res.x, 0, atol=1e-15)
+
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      loss='hinge', method=self.method)
+
+    def test_fun(self):
+        # Test that res.fun is actual residuals, and not modified by loss
+        # function stuff.
+        for loss in LOSSES:
+            res = least_squares(fun_trivial, 2.0, loss=loss,
+                                method=self.method)
+            assert_equal(res.fun, fun_trivial(res.x))
+
+    def test_grad(self):
+        # Test that res.grad is true gradient of loss function at the
+        # solution. Use max_nfev = 1, to avoid reaching minimum.
+        x = np.array([2.0])  # res.x will be this.
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='linear',
+                            max_nfev=1, method=self.method)
+        assert_equal(res.grad, 2 * x * (x**2 + 5))
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='huber',
+                            max_nfev=1, method=self.method)
+        assert_equal(res.grad, 2 * x)
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='soft_l1',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.grad,
+                        2 * x * (x**2 + 5) / (1 + (x**2 + 5)**2)**0.5)
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='cauchy',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.grad, 2 * x * (x**2 + 5) / (1 + (x**2 + 5)**2))
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='arctan',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.grad, 2 * x * (x**2 + 5) / (1 + (x**2 + 5)**4))
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss=cubic_soft_l1,
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.grad,
+                        2 * x * (x**2 + 5) / (1 + (x**2 + 5)**2)**(2/3))
+
+    def test_jac(self):
+        # Test that res.jac.T.dot(res.jac) gives Gauss-Newton approximation
+        # of Hessian. This approximation is computed by doubly differentiating
+        # the cost function and dropping the part containing second derivative
+        # of f. For a scalar function it is computed as
+        # H = (rho' + 2 * rho'' * f**2) * f'**2, if the expression inside the
+        # brackets is less than EPS it is replaced by EPS. Here, we check
+        # against the root of H.
+
+        x = 2.0  # res.x will be this.
+        f = x**2 + 5  # res.fun will be this.
+
+        res = least_squares(fun_trivial, x, jac_trivial, loss='linear',
+                            max_nfev=1, method=self.method)
+        assert_equal(res.jac, 2 * x)
+
+        # For `huber` loss the Jacobian correction is identically zero
+        # in outlier region, in such cases it is modified to be equal EPS**0.5.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='huber',
+                            max_nfev=1, method=self.method)
+        assert_equal(res.jac, 2 * x * EPS**0.5)
+
+        # Now, let's apply `loss_scale` to turn the residual into an inlier.
+        # The loss function becomes linear.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='huber',
+                            f_scale=10, max_nfev=1)
+        assert_equal(res.jac, 2 * x)
+
+        # 'soft_l1' always gives a positive scaling.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='soft_l1',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.jac, 2 * x * (1 + f**2)**-0.75)
+
+        # For 'cauchy' the correction term turns out to be negative, and it
+        # replaced by EPS**0.5.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='cauchy',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.jac, 2 * x * EPS**0.5)
+
+        # Now use scaling to turn the residual to inlier.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='cauchy',
+                            f_scale=10, max_nfev=1, method=self.method)
+        fs = f / 10
+        assert_allclose(res.jac, 2 * x * (1 - fs**2)**0.5 / (1 + fs**2))
+
+        # 'arctan' gives an outlier.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='arctan',
+                            max_nfev=1, method=self.method)
+        assert_allclose(res.jac, 2 * x * EPS**0.5)
+
+        # Turn to inlier.
+        res = least_squares(fun_trivial, x, jac_trivial, loss='arctan',
+                            f_scale=20.0, max_nfev=1, method=self.method)
+        fs = f / 20
+        assert_allclose(res.jac, 2 * x * (1 - 3 * fs**4)**0.5 / (1 + fs**4))
+
+        # cubic_soft_l1 will give an outlier.
+        res = least_squares(fun_trivial, x, jac_trivial, loss=cubic_soft_l1,
+                            max_nfev=1)
+        assert_allclose(res.jac, 2 * x * EPS**0.5)
+
+        # Turn to inlier.
+        res = least_squares(fun_trivial, x, jac_trivial,
+                            loss=cubic_soft_l1, f_scale=6, max_nfev=1)
+        fs = f / 6
+        assert_allclose(res.jac,
+                        2 * x * (1 - fs**2 / 3)**0.5 * (1 + fs**2)**(-5/6))
+
+    def test_robustness(self):
+        for noise in [0.1, 1.0]:
+            p = ExponentialFittingProblem(1, 0.1, noise, random_seed=0)
+
+            for jac in ['2-point', '3-point', 'cs', p.jac]:
+                res_lsq = least_squares(p.fun, p.p0, jac=jac,
+                                        method=self.method)
+                assert_allclose(res_lsq.optimality, 0, atol=1e-2)
+                for loss in LOSSES:
+                    if loss == 'linear':
+                        continue
+                    res_robust = least_squares(
+                        p.fun, p.p0, jac=jac, loss=loss, f_scale=noise,
+                        method=self.method)
+                    assert_allclose(res_robust.optimality, 0, atol=1e-2)
+                    assert_(norm(res_robust.x - p.p_opt) <
+                            norm(res_lsq.x - p.p_opt))
+
+
+class TestDogbox(BaseMixin, BoundsMixin, SparseMixin, LossFunctionMixin):
+    method = 'dogbox'
+
+
+class TestTRF(BaseMixin, BoundsMixin, SparseMixin, LossFunctionMixin):
+    method = 'trf'
+
+    def test_lsmr_regularization(self):
+        p = BroydenTridiagonal()
+        for regularize in [True, False]:
+            res = least_squares(p.fun, p.x0, p.jac, method='trf',
+                                tr_options={'regularize': regularize})
+            assert_allclose(res.cost, 0, atol=1e-20)
+
+
+class TestLM(BaseMixin):
+    method = 'lm'
+
+    def test_bounds_not_supported(self):
+        assert_raises(ValueError, least_squares, fun_trivial,
+                      2.0, bounds=(-3.0, 3.0), method='lm')
+
+    def test_m_less_n_not_supported(self):
+        x0 = [-2, 1]
+        assert_raises(ValueError, least_squares, fun_rosenbrock_cropped, x0,
+                      method='lm')
+
+    def test_sparse_not_supported(self):
+        p = BroydenTridiagonal()
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      method='lm')
+
+    def test_jac_sparsity_not_supported(self):
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      jac_sparsity=[1], method='lm')
+
+    def test_LinearOperator_not_supported(self):
+        p = BroydenTridiagonal(mode="operator")
+        assert_raises(ValueError, least_squares, p.fun, p.x0, p.jac,
+                      method='lm')
+
+    def test_loss(self):
+        res = least_squares(fun_trivial, 2.0, loss='linear', method='lm')
+        assert_allclose(res.x, 0.0, atol=1e-4)
+
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0,
+                      method='lm', loss='huber')
+
+
+def test_basic():
+    # test that 'method' arg is really optional
+    res = least_squares(fun_trivial, 2.0)
+    assert_allclose(res.x, 0, atol=1e-10)
+
+
+def test_small_tolerances_for_lm():
+    for ftol, xtol, gtol in [(None, 1e-13, 1e-13),
+                             (1e-13, None, 1e-13),
+                             (1e-13, 1e-13, None)]:
+        assert_raises(ValueError, least_squares, fun_trivial, 2.0, xtol=xtol,
+                      ftol=ftol, gtol=gtol, method='lm')
+
+
+def test_fp32_gh12991():
+    # checks that smaller FP sizes can be used in least_squares
+    # this is the minimum working example reported for gh12991
+    rng = np.random.RandomState(1)
+
+    x = np.linspace(0, 1, 100).astype("float32")
+    y = rng.random(100).astype("float32")
+
+    def func(p, x):
+        return p[0] + p[1] * x
+
+    def err(p, x, y):
+        return func(p, x) - y
+
+    res = least_squares(err, [-1.0, -1.0], args=(x, y))
+    # previously the initial jacobian calculated for this would be all 0
+    # and the minimize would terminate immediately, with nfev=1, would
+    # report a successful minimization (it shouldn't have done), but be
+    # unchanged from the initial solution.
+    # It was terminating early because the underlying approx_derivative
+    # used a step size for FP64 when the working space was FP32.
+    assert res.nfev > 2
+    assert_allclose(res.x, np.array([0.4082241, 0.15530563]), atol=5e-5)
+
+
+def test_gh_18793_and_19351():
+    answer = 1e-12
+    initial_guess = 1.1e-12
+
+    def chi2(x):
+        return (x-answer)**2
+
+    gtol = 1e-15
+    res = least_squares(chi2, x0=initial_guess, gtol=1e-15, bounds=(0, np.inf))
+    # Original motivation: gh-18793
+    # if we choose an initial condition that is close to the solution
+    # we shouldn't return an answer that is further away from the solution
+
+    # Update: gh-19351
+    # However this requirement does not go well with 'trf' algorithm logic.
+    # Some regressions were reported after the presumed fix.
+    # The returned solution is good as long as it satisfies the convergence
+    # conditions.
+    # Specifically in this case the scaled gradient will be sufficiently low.
+
+    scaling, _ = CL_scaling_vector(res.x, res.grad,
+                                   np.atleast_1d(0), np.atleast_1d(np.inf))
+    assert res.status == 1  # Converged by gradient
+    assert np.linalg.norm(res.grad * scaling, ord=np.inf) < gtol
+
+
+def test_gh_19103():
+    # Checks that least_squares trf method selects a strictly feasible point,
+    # and thus succeeds instead of failing,
+    # when the initial guess is reported exactly at a boundary point.
+    # This is a reduced example from gh191303
+
+    ydata = np.array([0.] * 66 + [
+        1., 0., 0., 0., 0., 0., 1., 1., 0., 0., 1.,
+        1., 1., 1., 0., 0., 0., 1., 0., 0., 2., 1.,
+        0., 3., 1., 6., 5., 0., 0., 2., 8., 4., 4.,
+        6., 9., 7., 2., 7., 8., 2., 13., 9., 8., 11.,
+        10., 13., 14., 19., 11., 15., 18., 26., 19., 32., 29.,
+        28., 36., 32., 35., 36., 43., 52., 32., 58., 56., 52.,
+        67., 53., 72., 88., 77., 95., 94., 84., 86., 101., 107.,
+        108., 118., 96., 115., 138., 137.,
+    ])
+    xdata = np.arange(0, ydata.size) * 0.1
+
+    def exponential_wrapped(params):
+        A, B, x0 = params
+        return A * np.exp(B * (xdata - x0)) - ydata
+
+    x0 = [0.01, 1., 5.]
+    bounds = ((0.01, 0, 0), (np.inf, 10, 20.9))
+    res = least_squares(exponential_wrapped, x0, method='trf', bounds=bounds)
+    assert res.success
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linear_assignment.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linear_assignment.py
new file mode 100644
index 0000000000000000000000000000000000000000..d59792da9eef38e313eaa0bca70f873627f8d3cf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linear_assignment.py
@@ -0,0 +1,116 @@
+# Author: Brian M. Clapper, G. Varoquaux, Lars Buitinck
+# License: BSD
+
+from numpy.testing import assert_array_equal
+import pytest
+
+import numpy as np
+
+from scipy.optimize import linear_sum_assignment
+from scipy.sparse import random
+from scipy.sparse._sputils import matrix
+from scipy.sparse.csgraph import min_weight_full_bipartite_matching
+from scipy.sparse.csgraph.tests.test_matching import (
+    linear_sum_assignment_assertions, linear_sum_assignment_test_cases
+)
+
+
+def test_linear_sum_assignment_input_shape():
+    with pytest.raises(ValueError, match="expected a matrix"):
+        linear_sum_assignment([1, 2, 3])
+
+
+def test_linear_sum_assignment_input_object():
+    C = [[1, 2, 3], [4, 5, 6]]
+    assert_array_equal(linear_sum_assignment(C),
+                       linear_sum_assignment(np.asarray(C)))
+    assert_array_equal(linear_sum_assignment(C),
+                       linear_sum_assignment(matrix(C)))
+
+
+def test_linear_sum_assignment_input_bool():
+    I = np.identity(3)
+    assert_array_equal(linear_sum_assignment(I.astype(np.bool_)),
+                       linear_sum_assignment(I))
+
+
+def test_linear_sum_assignment_input_string():
+    I = np.identity(3)
+    with pytest.raises(TypeError, match="Cannot cast array data"):
+        linear_sum_assignment(I.astype(str))
+
+
+def test_linear_sum_assignment_input_nan():
+    I = np.diag([np.nan, 1, 1])
+    with pytest.raises(ValueError, match="contains invalid numeric entries"):
+        linear_sum_assignment(I)
+
+
+def test_linear_sum_assignment_input_neginf():
+    I = np.diag([1, -np.inf, 1])
+    with pytest.raises(ValueError, match="contains invalid numeric entries"):
+        linear_sum_assignment(I)
+
+
+def test_linear_sum_assignment_input_inf():
+    I = np.identity(3)
+    I[:, 0] = np.inf
+    with pytest.raises(ValueError, match="cost matrix is infeasible"):
+        linear_sum_assignment(I)
+
+
+def test_constant_cost_matrix():
+    # Fixes #11602
+    n = 8
+    C = np.ones((n, n))
+    row_ind, col_ind = linear_sum_assignment(C)
+    assert_array_equal(row_ind, np.arange(n))
+    assert_array_equal(col_ind, np.arange(n))
+
+
+@pytest.mark.parametrize('num_rows,num_cols', [(0, 0), (2, 0), (0, 3)])
+def test_linear_sum_assignment_trivial_cost(num_rows, num_cols):
+    C = np.empty(shape=(num_cols, num_rows))
+    row_ind, col_ind = linear_sum_assignment(C)
+    assert len(row_ind) == 0
+    assert len(col_ind) == 0
+
+
+@pytest.mark.parametrize('sign,test_case', linear_sum_assignment_test_cases)
+def test_linear_sum_assignment_small_inputs(sign, test_case):
+    linear_sum_assignment_assertions(
+        linear_sum_assignment, np.array, sign, test_case)
+
+
+# Tests that combine scipy.optimize.linear_sum_assignment and
+# scipy.sparse.csgraph.min_weight_full_bipartite_matching
+def test_two_methods_give_same_result_on_many_sparse_inputs():
+    # As opposed to the test above, here we do not spell out the expected
+    # output; only assert that the two methods give the same result.
+    # Concretely, the below tests 100 cases of size 100x100, out of which
+    # 36 are infeasible.
+    np.random.seed(1234)
+    for _ in range(100):
+        lsa_raises = False
+        mwfbm_raises = False
+        sparse = random(100, 100, density=0.06,
+                        data_rvs=lambda size: np.random.randint(1, 100, size))
+        # In csgraph, zeros correspond to missing edges, so we explicitly
+        # replace those with infinities
+        dense = np.full(sparse.shape, np.inf)
+        dense[sparse.row, sparse.col] = sparse.data
+        sparse = sparse.tocsr()
+        try:
+            row_ind, col_ind = linear_sum_assignment(dense)
+            lsa_cost = dense[row_ind, col_ind].sum()
+        except ValueError:
+            lsa_raises = True
+        try:
+            row_ind, col_ind = min_weight_full_bipartite_matching(sparse)
+            mwfbm_cost = sparse[row_ind, col_ind].sum()
+        except ValueError:
+            mwfbm_raises = True
+        # Ensure that if one method raises, so does the other one.
+        assert lsa_raises == mwfbm_raises
+        if not lsa_raises:
+            assert lsa_cost == mwfbm_cost
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linesearch.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linesearch.py
new file mode 100644
index 0000000000000000000000000000000000000000..6eee0743d97665185c35cf144d66e00542925480
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linesearch.py
@@ -0,0 +1,328 @@
+"""
+Tests for line search routines
+"""
+from numpy.testing import (assert_equal, assert_array_almost_equal,
+                           assert_array_almost_equal_nulp, assert_warns,
+                           suppress_warnings)
+import scipy.optimize._linesearch as ls
+from scipy.optimize._linesearch import LineSearchWarning
+import numpy as np
+import pytest
+import threading
+
+
+def assert_wolfe(s, phi, derphi, c1=1e-4, c2=0.9, err_msg=""):
+    """
+    Check that strong Wolfe conditions apply
+    """
+    phi1 = phi(s)
+    phi0 = phi(0)
+    derphi0 = derphi(0)
+    derphi1 = derphi(s)
+    msg = (f"s = {s}; phi(0) = {phi0}; phi(s) = {phi1}; phi'(0) = {derphi0};"
+           f" phi'(s) = {derphi1}; {err_msg}")
+
+    assert phi1 <= phi0 + c1*s*derphi0, "Wolfe 1 failed: " + msg
+    assert abs(derphi1) <= abs(c2*derphi0), "Wolfe 2 failed: " + msg
+
+
+def assert_armijo(s, phi, c1=1e-4, err_msg=""):
+    """
+    Check that Armijo condition applies
+    """
+    phi1 = phi(s)
+    phi0 = phi(0)
+    msg = f"s = {s}; phi(0) = {phi0}; phi(s) = {phi1}; {err_msg}"
+    assert phi1 <= (1 - c1*s)*phi0, msg
+
+
+def assert_line_wolfe(x, p, s, f, fprime, **kw):
+    assert_wolfe(s, phi=lambda sp: f(x + p*sp),
+                 derphi=lambda sp: np.dot(fprime(x + p*sp), p), **kw)
+
+
+def assert_line_armijo(x, p, s, f, **kw):
+    assert_armijo(s, phi=lambda sp: f(x + p*sp), **kw)
+
+
+def assert_fp_equal(x, y, err_msg="", nulp=50):
+    """Assert two arrays are equal, up to some floating-point rounding error"""
+    try:
+        assert_array_almost_equal_nulp(x, y, nulp)
+    except AssertionError as e:
+        raise AssertionError(f"{e}\n{err_msg}") from e
+
+
+class TestLineSearch:
+    # -- scalar functions; must have dphi(0.) < 0
+    def _scalar_func_1(self, s):  # skip name check
+        if not hasattr(self.fcount, 'c'):
+            self.fcount.c = 0
+        self.fcount.c += 1
+        p = -s - s**3 + s**4
+        dp = -1 - 3*s**2 + 4*s**3
+        return p, dp
+
+    def _scalar_func_2(self, s):  # skip name check
+        if not hasattr(self.fcount, 'c'):
+            self.fcount.c = 0
+        self.fcount.c += 1
+        p = np.exp(-4*s) + s**2
+        dp = -4*np.exp(-4*s) + 2*s
+        return p, dp
+
+    def _scalar_func_3(self, s):  # skip name check
+        if not hasattr(self.fcount, 'c'):
+            self.fcount.c = 0
+        self.fcount.c += 1
+        p = -np.sin(10*s)
+        dp = -10*np.cos(10*s)
+        return p, dp
+
+    # -- n-d functions
+
+    def _line_func_1(self, x):  # skip name check
+        if not hasattr(self.fcount, 'c'):
+            self.fcount.c = 0
+        self.fcount.c += 1
+        f = np.dot(x, x)
+        df = 2*x
+        return f, df
+
+    def _line_func_2(self, x):  # skip name check
+        if not hasattr(self.fcount, 'c'):
+            self.fcount.c = 0
+        self.fcount.c += 1
+        f = np.dot(x, np.dot(self.A, x)) + 1
+        df = np.dot(self.A + self.A.T, x)
+        return f, df
+
+    # --
+
+    def setup_method(self):
+        self.scalar_funcs = []
+        self.line_funcs = []
+        self.N = 20
+        self.fcount = threading.local()
+
+        def bind_index(func, idx):
+            # Remember Python's closure semantics!
+            return lambda *a, **kw: func(*a, **kw)[idx]
+
+        for name in sorted(dir(self)):
+            if name.startswith('_scalar_func_'):
+                value = getattr(self, name)
+                self.scalar_funcs.append(
+                    (name, bind_index(value, 0), bind_index(value, 1)))
+            elif name.startswith('_line_func_'):
+                value = getattr(self, name)
+                self.line_funcs.append(
+                    (name, bind_index(value, 0), bind_index(value, 1)))
+
+        np.random.seed(1234)
+        self.A = np.random.randn(self.N, self.N)
+
+    def scalar_iter(self):
+        for name, phi, derphi in self.scalar_funcs:
+            for old_phi0 in np.random.randn(3):
+                yield name, phi, derphi, old_phi0
+
+    def line_iter(self):
+        rng = np.random.RandomState(1234)
+        for name, f, fprime in self.line_funcs:
+            k = 0
+            while k < 9:
+                x = rng.randn(self.N)
+                p = rng.randn(self.N)
+                if np.dot(p, fprime(x)) >= 0:
+                    # always pick a descent direction
+                    continue
+                k += 1
+                old_fv = float(rng.randn())
+                yield name, f, fprime, x, p, old_fv
+
+    # -- Generic scalar searches
+
+    def test_scalar_search_wolfe1(self):
+        c = 0
+        for name, phi, derphi, old_phi0 in self.scalar_iter():
+            c += 1
+            s, phi1, phi0 = ls.scalar_search_wolfe1(phi, derphi, phi(0),
+                                                    old_phi0, derphi(0))
+            assert_fp_equal(phi0, phi(0), name)
+            assert_fp_equal(phi1, phi(s), name)
+            assert_wolfe(s, phi, derphi, err_msg=name)
+
+        assert c > 3  # check that the iterator really works...
+
+    def test_scalar_search_wolfe2(self):
+        for name, phi, derphi, old_phi0 in self.scalar_iter():
+            s, phi1, phi0, derphi1 = ls.scalar_search_wolfe2(
+                phi, derphi, phi(0), old_phi0, derphi(0))
+            assert_fp_equal(phi0, phi(0), name)
+            assert_fp_equal(phi1, phi(s), name)
+            if derphi1 is not None:
+                assert_fp_equal(derphi1, derphi(s), name)
+            assert_wolfe(s, phi, derphi, err_msg=f"{name} {old_phi0:g}")
+
+    def test_scalar_search_wolfe2_with_low_amax(self):
+        def phi(alpha):
+            return (alpha - 5) ** 2
+
+        def derphi(alpha):
+            return 2 * (alpha - 5)
+
+        alpha_star, _, _, derphi_star = ls.scalar_search_wolfe2(phi, derphi, amax=0.001)
+        assert alpha_star is None  # Not converged
+        assert derphi_star is None  # Not converged
+
+    def test_scalar_search_wolfe2_regression(self):
+        # Regression test for gh-12157
+        # This phi has its minimum at alpha=4/3 ~ 1.333.
+        def phi(alpha):
+            if alpha < 1:
+                return - 3*np.pi/2 * (alpha - 1)
+            else:
+                return np.cos(3*np.pi/2 * alpha - np.pi)
+
+        def derphi(alpha):
+            if alpha < 1:
+                return - 3*np.pi/2
+            else:
+                return - 3*np.pi/2 * np.sin(3*np.pi/2 * alpha - np.pi)
+
+        s, _, _, _ = ls.scalar_search_wolfe2(phi, derphi)
+        # Without the fix in gh-13073, the scalar_search_wolfe2
+        # returned s=2.0 instead.
+        assert s < 1.5
+
+    def test_scalar_search_armijo(self):
+        for name, phi, derphi, old_phi0 in self.scalar_iter():
+            s, phi1 = ls.scalar_search_armijo(phi, phi(0), derphi(0))
+            assert_fp_equal(phi1, phi(s), name)
+            assert_armijo(s, phi, err_msg=f"{name} {old_phi0:g}")
+
+    # -- Generic line searches
+
+    def test_line_search_wolfe1(self):
+        c = 0
+        smax = 100
+        for name, f, fprime, x, p, old_f in self.line_iter():
+            f0 = f(x)
+            g0 = fprime(x)
+            self.fcount.c = 0
+            s, fc, gc, fv, ofv, gv = ls.line_search_wolfe1(f, fprime, x, p,
+                                                           g0, f0, old_f,
+                                                           amax=smax)
+            assert_equal(self.fcount.c, fc+gc)
+            assert_fp_equal(ofv, f(x))
+            if s is None:
+                continue
+            assert_fp_equal(fv, f(x + s*p))
+            assert_array_almost_equal(gv, fprime(x + s*p), decimal=14)
+            if s < smax:
+                c += 1
+                assert_line_wolfe(x, p, s, f, fprime, err_msg=name)
+
+        assert c > 3  # check that the iterator really works...
+
+    def test_line_search_wolfe2(self):
+        c = 0
+        smax = 512
+        for name, f, fprime, x, p, old_f in self.line_iter():
+            f0 = f(x)
+            g0 = fprime(x)
+            self.fcount.c = 0
+            with suppress_warnings() as sup:
+                sup.filter(LineSearchWarning,
+                           "The line search algorithm could not find a solution")
+                sup.filter(LineSearchWarning,
+                           "The line search algorithm did not converge")
+                s, fc, gc, fv, ofv, gv = ls.line_search_wolfe2(f, fprime, x, p,
+                                                               g0, f0, old_f,
+                                                               amax=smax)
+            assert_equal(self.fcount.c, fc+gc)
+            assert_fp_equal(ofv, f(x))
+            assert_fp_equal(fv, f(x + s*p))
+            if gv is not None:
+                assert_array_almost_equal(gv, fprime(x + s*p), decimal=14)
+            if s < smax:
+                c += 1
+                assert_line_wolfe(x, p, s, f, fprime, err_msg=name)
+        assert c > 3  # check that the iterator really works...
+
+    @pytest.mark.thread_unsafe
+    def test_line_search_wolfe2_bounds(self):
+        # See gh-7475
+
+        # For this f and p, starting at a point on axis 0, the strong Wolfe
+        # condition 2 is met if and only if the step length s satisfies
+        # |x + s| <= c2 * |x|
+        def f(x):
+            return np.dot(x, x)
+        def fp(x):
+            return 2 * x
+        p = np.array([1, 0])
+
+        # Smallest s satisfying strong Wolfe conditions for these arguments is 30
+        x = -60 * p
+        c2 = 0.5
+
+        s, _, _, _, _, _ = ls.line_search_wolfe2(f, fp, x, p, amax=30, c2=c2)
+        assert_line_wolfe(x, p, s, f, fp)
+
+        s, _, _, _, _, _ = assert_warns(LineSearchWarning,
+                                        ls.line_search_wolfe2, f, fp, x, p,
+                                        amax=29, c2=c2)
+        assert s is None
+
+        # s=30 will only be tried on the 6th iteration, so this won't converge
+        assert_warns(LineSearchWarning, ls.line_search_wolfe2, f, fp, x, p,
+                     c2=c2, maxiter=5)
+
+    def test_line_search_armijo(self):
+        c = 0
+        for name, f, fprime, x, p, old_f in self.line_iter():
+            f0 = f(x)
+            g0 = fprime(x)
+            self.fcount.c = 0
+            s, fc, fv = ls.line_search_armijo(f, x, p, g0, f0)
+            c += 1
+            assert_equal(self.fcount.c, fc)
+            assert_fp_equal(fv, f(x + s*p))
+            assert_line_armijo(x, p, s, f, err_msg=name)
+        assert c >= 9
+
+    # -- More specific tests
+
+    def test_armijo_terminate_1(self):
+        # Armijo should evaluate the function only once if the trial step
+        # is already suitable
+        count = [0]
+
+        def phi(s):
+            count[0] += 1
+            return -s + 0.01*s**2
+        s, phi1 = ls.scalar_search_armijo(phi, phi(0), -1, alpha0=1)
+        assert_equal(s, 1)
+        assert_equal(count[0], 2)
+        assert_armijo(s, phi)
+
+    def test_wolfe_terminate(self):
+        # wolfe1 and wolfe2 should also evaluate the function only a few
+        # times if the trial step is already suitable
+
+        def phi(s):
+            count[0] += 1
+            return -s + 0.05*s**2
+
+        def derphi(s):
+            count[0] += 1
+            return -1 + 0.05*2*s
+
+        for func in [ls.scalar_search_wolfe1, ls.scalar_search_wolfe2]:
+            count = [0]
+            r = func(phi, derphi, phi(0), None, derphi(0))
+            assert r[0] is not None, (r, func)
+            assert count[0] <= 2 + 2, (count, func)
+            assert_wolfe(r[0], phi, derphi, err_msg=str(func))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linprog.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linprog.py
new file mode 100644
index 0000000000000000000000000000000000000000..4d18e68e394c31e3bc19f49e80c8e9adbc055193
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_linprog.py
@@ -0,0 +1,2577 @@
+"""
+Unit test for Linear Programming
+"""
+import sys
+import platform
+
+import numpy as np
+from numpy.testing import (assert_, assert_allclose, assert_equal,
+                           assert_array_less, assert_warns, suppress_warnings)
+from pytest import raises as assert_raises
+from scipy.optimize import linprog, OptimizeWarning
+from scipy.optimize._numdiff import approx_derivative
+from scipy.sparse.linalg import MatrixRankWarning
+from scipy.linalg import LinAlgWarning
+from scipy._lib._util import VisibleDeprecationWarning
+import scipy.sparse
+import pytest
+
+has_umfpack = True
+try:
+    from scikits.umfpack import UmfpackWarning
+except ImportError:
+    has_umfpack = False
+
+has_cholmod = True
+try:
+    import sksparse  # noqa: F401
+    from sksparse.cholmod import cholesky as cholmod  # noqa: F401
+except ImportError:
+    has_cholmod = False
+
+
+def _assert_iteration_limit_reached(res, maxiter):
+    assert_(not res.success, "Incorrectly reported success")
+    assert_(res.success < maxiter, "Incorrectly reported number of iterations")
+    assert_equal(res.status, 1, "Failed to report iteration limit reached")
+
+
+def _assert_infeasible(res):
+    # res: linprog result object
+    assert_(not res.success, "incorrectly reported success")
+    assert_equal(res.status, 2, "failed to report infeasible status")
+
+
+def _assert_unbounded(res):
+    # res: linprog result object
+    assert_(not res.success, "incorrectly reported success")
+    assert_equal(res.status, 3, "failed to report unbounded status")
+
+
+def _assert_unable_to_find_basic_feasible_sol(res):
+    # res: linprog result object
+
+    # The status may be either 2 or 4 depending on why the feasible solution
+    # could not be found. If the underlying problem is expected to not have a
+    # feasible solution, _assert_infeasible should be used.
+    assert_(not res.success, "incorrectly reported success")
+    assert_(res.status in (2, 4), "failed to report optimization failure")
+
+
+def _assert_success(res, desired_fun=None, desired_x=None,
+                    rtol=1e-8, atol=1e-8):
+    # res: linprog result object
+    # desired_fun: desired objective function value or None
+    # desired_x: desired solution or None
+    if not res.success:
+        msg = f"linprog status {res.status}, message: {res.message}"
+        raise AssertionError(msg)
+
+    assert_equal(res.status, 0)
+    if desired_fun is not None:
+        assert_allclose(res.fun, desired_fun,
+                        err_msg="converged to an unexpected objective value",
+                        rtol=rtol, atol=atol)
+    if desired_x is not None:
+        assert_allclose(res.x, desired_x,
+                        err_msg="converged to an unexpected solution",
+                        rtol=rtol, atol=atol)
+
+
+def magic_square(n):
+    """
+    Generates a linear program for which integer solutions represent an
+    n x n magic square; binary decision variables represent the presence
+    (or absence) of an integer 1 to n^2 in each position of the square.
+    """
+
+    rng = np.random.RandomState(0)
+    M = n * (n**2 + 1) / 2
+
+    numbers = np.arange(n**4) // n**2 + 1
+
+    numbers = numbers.reshape(n**2, n, n)
+
+    zeros = np.zeros((n**2, n, n))
+
+    A_list = []
+    b_list = []
+
+    # Rule 1: use every number exactly once
+    for i in range(n**2):
+        A_row = zeros.copy()
+        A_row[i, :, :] = 1
+        A_list.append(A_row.flatten())
+        b_list.append(1)
+
+    # Rule 2: Only one number per square
+    for i in range(n):
+        for j in range(n):
+            A_row = zeros.copy()
+            A_row[:, i, j] = 1
+            A_list.append(A_row.flatten())
+            b_list.append(1)
+
+    # Rule 3: sum of rows is M
+    for i in range(n):
+        A_row = zeros.copy()
+        A_row[:, i, :] = numbers[:, i, :]
+        A_list.append(A_row.flatten())
+        b_list.append(M)
+
+    # Rule 4: sum of columns is M
+    for i in range(n):
+        A_row = zeros.copy()
+        A_row[:, :, i] = numbers[:, :, i]
+        A_list.append(A_row.flatten())
+        b_list.append(M)
+
+    # Rule 5: sum of diagonals is M
+    A_row = zeros.copy()
+    A_row[:, range(n), range(n)] = numbers[:, range(n), range(n)]
+    A_list.append(A_row.flatten())
+    b_list.append(M)
+    A_row = zeros.copy()
+    A_row[:, range(n), range(-1, -n - 1, -1)] = \
+        numbers[:, range(n), range(-1, -n - 1, -1)]
+    A_list.append(A_row.flatten())
+    b_list.append(M)
+
+    A = np.array(np.vstack(A_list), dtype=float)
+    b = np.array(b_list, dtype=float)
+    c = rng.rand(A.shape[1])
+
+    return A, b, c, numbers, M
+
+
+def lpgen_2d(m, n):
+    """ -> A b c LP test: m*n vars, m+n constraints
+        row sums == n/m, col sums == 1
+        https://gist.github.com/denis-bz/8647461
+    """
+    rng = np.random.RandomState(0)
+    c = - rng.exponential(size=(m, n))
+    Arow = np.zeros((m, m * n))
+    brow = np.zeros(m)
+    for j in range(m):
+        j1 = j + 1
+        Arow[j, j * n:j1 * n] = 1
+        brow[j] = n / m
+
+    Acol = np.zeros((n, m * n))
+    bcol = np.zeros(n)
+    for j in range(n):
+        j1 = j + 1
+        Acol[j, j::n] = 1
+        bcol[j] = 1
+
+    A = np.vstack((Arow, Acol))
+    b = np.hstack((brow, bcol))
+
+    return A, b, c.ravel()
+
+
+def very_random_gen(seed=0):
+    rng = np.random.RandomState(seed)
+    m_eq, m_ub, n = 10, 20, 50
+    c = rng.rand(n)-0.5
+    A_ub = rng.rand(m_ub, n)-0.5
+    b_ub = rng.rand(m_ub)-0.5
+    A_eq = rng.rand(m_eq, n)-0.5
+    b_eq = rng.rand(m_eq)-0.5
+    lb = -rng.rand(n)
+    ub = rng.rand(n)
+    lb[lb < -rng.rand()] = -np.inf
+    ub[ub > rng.rand()] = np.inf
+    bounds = np.vstack((lb, ub)).T
+    return c, A_ub, b_ub, A_eq, b_eq, bounds
+
+
+def nontrivial_problem():
+    c = [-1, 8, 4, -6]
+    A_ub = [[-7, -7, 6, 9],
+            [1, -1, -3, 0],
+            [10, -10, -7, 7],
+            [6, -1, 3, 4]]
+    b_ub = [-3, 6, -6, 6]
+    A_eq = [[-10, 1, 1, -8]]
+    b_eq = [-4]
+    x_star = [101 / 1391, 1462 / 1391, 0, 752 / 1391]
+    f_star = 7083 / 1391
+    return c, A_ub, b_ub, A_eq, b_eq, x_star, f_star
+
+
+def l1_regression_prob(seed=0, m=8, d=9, n=100):
+    '''
+    Training data is {(x0, y0), (x1, y2), ..., (xn-1, yn-1)}
+        x in R^d
+        y in R
+    n: number of training samples
+    d: dimension of x, i.e. x in R^d
+    phi: feature map R^d -> R^m
+    m: dimension of feature space
+    '''
+    rng = np.random.RandomState(seed)
+    phi = rng.normal(0, 1, size=(m, d))  # random feature mapping
+    w_true = rng.randn(m)
+    x = rng.normal(0, 1, size=(d, n))  # features
+    y = w_true @ (phi @ x) + rng.normal(0, 1e-5, size=n)  # measurements
+
+    # construct the problem
+    c = np.ones(m+n)
+    c[:m] = 0
+    A_ub = scipy.sparse.lil_matrix((2*n, n+m))
+    idx = 0
+    for ii in range(n):
+        A_ub[idx, :m] = phi @ x[:, ii]
+        A_ub[idx, m+ii] = -1
+        A_ub[idx+1, :m] = -1*phi @ x[:, ii]
+        A_ub[idx+1, m+ii] = -1
+        idx += 2
+    A_ub = A_ub.tocsc()
+    b_ub = np.zeros(2*n)
+    b_ub[0::2] = y
+    b_ub[1::2] = -y
+    bnds = [(None, None)]*m + [(0, None)]*n
+    return c, A_ub, b_ub, bnds
+
+
+def generic_callback_test(self):
+    # Check that callback is as advertised
+    last_cb = {}
+
+    def cb(res):
+        message = res.pop('message')
+        complete = res.pop('complete')
+
+        assert_(res.pop('phase') in (1, 2))
+        assert_(res.pop('status') in range(4))
+        assert_(isinstance(res.pop('nit'), int))
+        assert_(isinstance(complete, bool))
+        assert_(isinstance(message, str))
+
+        last_cb['x'] = res['x']
+        last_cb['fun'] = res['fun']
+        last_cb['slack'] = res['slack']
+        last_cb['con'] = res['con']
+
+    c = np.array([-3, -2])
+    A_ub = [[2, 1], [1, 1], [1, 0]]
+    b_ub = [10, 8, 4]
+    res = linprog(c, A_ub=A_ub, b_ub=b_ub, callback=cb, method=self.method)
+
+    _assert_success(res, desired_fun=-18.0, desired_x=[2, 6])
+    assert_allclose(last_cb['fun'], res['fun'])
+    assert_allclose(last_cb['x'], res['x'])
+    assert_allclose(last_cb['con'], res['con'])
+    assert_allclose(last_cb['slack'], res['slack'])
+
+
+@pytest.mark.thread_unsafe
+def test_unknown_solvers_and_options():
+    c = np.array([-3, -2])
+    A_ub = [[2, 1], [1, 1], [1, 0]]
+    b_ub = [10, 8, 4]
+
+    assert_raises(ValueError, linprog,
+                  c, A_ub=A_ub, b_ub=b_ub, method='ekki-ekki-ekki')
+    assert_raises(ValueError, linprog,
+                  c, A_ub=A_ub, b_ub=b_ub, method='highs-ekki')
+    message = "Unrecognized options detected: {'rr_method': 'ekki-ekki-ekki'}"
+    with pytest.warns(OptimizeWarning, match=message):
+        linprog(c, A_ub=A_ub, b_ub=b_ub,
+                options={"rr_method": 'ekki-ekki-ekki'})
+
+
+def test_choose_solver():
+    # 'highs' chooses 'dual'
+    c = np.array([-3, -2])
+    A_ub = [[2, 1], [1, 1], [1, 0]]
+    b_ub = [10, 8, 4]
+
+    res = linprog(c, A_ub, b_ub, method='highs')
+    _assert_success(res, desired_fun=-18.0, desired_x=[2, 6])
+
+
+@pytest.mark.thread_unsafe
+def test_deprecation():
+    with pytest.warns(DeprecationWarning):
+        linprog(1, method='interior-point')
+    with pytest.warns(DeprecationWarning):
+        linprog(1, method='revised simplex')
+    with pytest.warns(DeprecationWarning):
+        linprog(1, method='simplex')
+
+
+def test_highs_status_message():
+    res = linprog(1, method='highs')
+    msg = "Optimization terminated successfully. (HiGHS Status 7:"
+    assert res.status == 0
+    assert res.message.startswith(msg)
+
+    A, b, c, numbers, M = magic_square(6)
+    bounds = [(0, 1)] * len(c)
+    integrality = [1] * len(c)
+    options = {"time_limit": 0.1}
+    res = linprog(c=c, A_eq=A, b_eq=b, bounds=bounds, method='highs',
+                  options=options, integrality=integrality)
+    msg = "Time limit reached. (HiGHS Status 13:"
+    assert res.status == 1
+    assert res.message.startswith(msg)
+
+    options = {"maxiter": 10}
+    res = linprog(c=c, A_eq=A, b_eq=b, bounds=bounds, method='highs-ds',
+                  options=options)
+    msg = "Iteration limit reached. (HiGHS Status 14:"
+    assert res.status == 1
+    assert res.message.startswith(msg)
+
+    res = linprog(1, bounds=(1, -1), method='highs')
+    msg = "The problem is infeasible. (HiGHS Status 8:"
+    assert res.status == 2
+    assert res.message.startswith(msg)
+
+    res = linprog(-1, method='highs')
+    msg = "The problem is unbounded. (HiGHS Status 10:"
+    assert res.status == 3
+    assert res.message.startswith(msg)
+
+    from scipy.optimize._linprog_highs import _highs_to_scipy_status_message
+    status, message = _highs_to_scipy_status_message(58, "Hello!")
+    msg = "The HiGHS status code was not recognized. (HiGHS Status 58:"
+    assert status == 4
+    assert message.startswith(msg)
+
+    status, message = _highs_to_scipy_status_message(None, None)
+    msg = "HiGHS did not provide a status code. (HiGHS Status None: None)"
+    assert status == 4
+    assert message.startswith(msg)
+
+
+def test_bug_17380():
+    linprog([1, 1], A_ub=[[-1, 0]], b_ub=[-2.5], integrality=[1, 1])
+
+
+A_ub = None
+b_ub = None
+A_eq = None
+b_eq = None
+bounds = None
+
+################
+# Common Tests #
+################
+
+
+class LinprogCommonTests:
+    """
+    Base class for `linprog` tests. Generally, each test will be performed
+    once for every derived class of LinprogCommonTests, each of which will
+    typically change self.options and/or self.method. Effectively, these tests
+    are run for many combination of method (simplex, revised simplex, and
+    interior point) and options (such as pivoting rule or sparse treatment).
+    """
+
+    ##################
+    # Targeted Tests #
+    ##################
+
+    def test_callback(self):
+        generic_callback_test(self)
+
+    def test_disp(self):
+        # test that display option does not break anything.
+        A, b, c = lpgen_2d(20, 20)
+        res = linprog(c, A_ub=A, b_ub=b, method=self.method,
+                      options={"disp": True})
+        _assert_success(res, desired_fun=-64.049494229)
+
+    def test_docstring_example(self):
+        # Example from linprog docstring.
+        c = [-1, 4]
+        A = [[-3, 1], [1, 2]]
+        b = [6, 4]
+        x0_bounds = (None, None)
+        x1_bounds = (-3, None)
+        res = linprog(c, A_ub=A, b_ub=b, bounds=(x0_bounds, x1_bounds),
+                      options=self.options, method=self.method)
+        _assert_success(res, desired_fun=-22)
+
+    def test_type_error(self):
+        # (presumably) checks that linprog recognizes type errors
+        # This is tested more carefully in test__linprog_clean_inputs.py
+        c = [1]
+        A_eq = [[1]]
+        b_eq = "hello"
+        assert_raises(TypeError, linprog,
+                      c, A_eq=A_eq, b_eq=b_eq,
+                      method=self.method, options=self.options)
+
+    def test_aliasing_b_ub(self):
+        # (presumably) checks that linprog does not modify b_ub
+        # This is tested more carefully in test__linprog_clean_inputs.py
+        c = np.array([1.0])
+        A_ub = np.array([[1.0]])
+        b_ub_orig = np.array([3.0])
+        b_ub = b_ub_orig.copy()
+        bounds = (-4.0, np.inf)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-4, desired_x=[-4])
+        assert_allclose(b_ub_orig, b_ub)
+
+    def test_aliasing_b_eq(self):
+        # (presumably) checks that linprog does not modify b_eq
+        # This is tested more carefully in test__linprog_clean_inputs.py
+        c = np.array([1.0])
+        A_eq = np.array([[1.0]])
+        b_eq_orig = np.array([3.0])
+        b_eq = b_eq_orig.copy()
+        bounds = (-4.0, np.inf)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=3, desired_x=[3])
+        assert_allclose(b_eq_orig, b_eq)
+
+    def test_non_ndarray_args(self):
+        # (presumably) checks that linprog accepts list in place of arrays
+        # This is tested more carefully in test__linprog_clean_inputs.py
+        c = [1.0]
+        A_ub = [[1.0]]
+        b_ub = [3.0]
+        A_eq = [[1.0]]
+        b_eq = [2.0]
+        bounds = (-1.0, 10.0)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=2, desired_x=[2])
+
+    @pytest.mark.thread_unsafe
+    def test_unknown_options(self):
+        c = np.array([-3, -2])
+        A_ub = [[2, 1], [1, 1], [1, 0]]
+        b_ub = [10, 8, 4]
+
+        def f(c, A_ub=None, b_ub=None, A_eq=None,
+              b_eq=None, bounds=None, options=None):
+            linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                    method=self.method, options=options)
+
+        o = {key: self.options[key] for key in self.options}
+        o['spam'] = 42
+
+        assert_warns(OptimizeWarning, f,
+                     c, A_ub=A_ub, b_ub=b_ub, options=o)
+
+    @pytest.mark.thread_unsafe
+    def test_integrality_without_highs(self):
+        # ensure that using `integrality` parameter without `method='highs'`
+        # raises warning and produces correct solution to relaxed problem
+        # source: https://en.wikipedia.org/wiki/Integer_programming#Example
+        A_ub = np.array([[-1, 1], [3, 2], [2, 3]])
+        b_ub = np.array([1, 12, 12])
+        c = -np.array([0, 1])
+
+        bounds = [(0, np.inf)] * len(c)
+        integrality = [1] * len(c)
+
+        with np.testing.assert_warns(OptimizeWarning):
+            res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, bounds=bounds,
+                          method=self.method, integrality=integrality)
+
+        np.testing.assert_allclose(res.x, [1.8, 2.8])
+        np.testing.assert_allclose(res.fun, -2.8)
+
+    def test_invalid_inputs(self):
+
+        def f(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None, bounds=None):
+            linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                    method=self.method, options=self.options)
+
+        # Test ill-formatted bounds
+        assert_raises(ValueError, f, [1, 2, 3], bounds=[(1, 2), (3, 4)])
+        with np.testing.suppress_warnings() as sup:
+            sup.filter(VisibleDeprecationWarning, "Creating an ndarray from ragged")
+            assert_raises(ValueError, f, [1, 2, 3], bounds=[(1, 2), (3, 4), (3, 4, 5)])
+        assert_raises(ValueError, f, [1, 2, 3], bounds=[(1, -2), (1, 2)])
+
+        # Test other invalid inputs
+        assert_raises(ValueError, f, [1, 2], A_ub=[[1, 2]], b_ub=[1, 2])
+        assert_raises(ValueError, f, [1, 2], A_ub=[[1]], b_ub=[1])
+        assert_raises(ValueError, f, [1, 2], A_eq=[[1, 2]], b_eq=[1, 2])
+        assert_raises(ValueError, f, [1, 2], A_eq=[[1]], b_eq=[1])
+        assert_raises(ValueError, f, [1, 2], A_eq=[1], b_eq=1)
+
+        # this last check doesn't make sense for sparse presolve
+        if ("_sparse_presolve" in self.options and
+                self.options["_sparse_presolve"]):
+            return
+            # there aren't 3-D sparse matrices
+
+        assert_raises(ValueError, f, [1, 2], A_ub=np.zeros((1, 1, 3)), b_eq=1)
+
+    def test_sparse_constraints(self):
+        # gh-13559: improve error message for sparse inputs when unsupported
+        def f(c, A_ub=None, b_ub=None, A_eq=None, b_eq=None, bounds=None):
+            linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                    method=self.method, options=self.options)
+
+        rng = np.random.RandomState(0)
+        m = 100
+        n = 150
+        A_eq = scipy.sparse.rand(m, n, 0.5)
+        x_valid = rng.randn(n)
+        c = rng.randn(n)
+        ub = x_valid + rng.rand(n)
+        lb = x_valid - rng.rand(n)
+        bounds = np.column_stack((lb, ub))
+        b_eq = A_eq @ x_valid
+
+        if self.method in {'simplex', 'revised simplex'}:
+            # simplex and revised simplex should raise error
+            with assert_raises(ValueError, match=f"Method '{self.method}' "
+                               "does not support sparse constraint matrices."):
+                linprog(c=c, A_eq=A_eq, b_eq=b_eq, bounds=bounds,
+                        method=self.method, options=self.options)
+        else:
+            # other methods should succeed
+            options = {**self.options}
+            if self.method in {'interior-point'}:
+                options['sparse'] = True
+
+            res = linprog(c=c, A_eq=A_eq, b_eq=b_eq, bounds=bounds,
+                          method=self.method, options=options)
+            assert res.success
+
+    def test_maxiter(self):
+        # test iteration limit w/ Enzo example
+        c = [4, 8, 3, 0, 0, 0]
+        A = [
+            [2, 5, 3, -1, 0, 0],
+            [3, 2.5, 8, 0, -1, 0],
+            [8, 10, 4, 0, 0, -1]]
+        b = [185, 155, 600]
+        np.random.seed(0)
+        maxiter = 3
+        res = linprog(c, A_eq=A, b_eq=b, method=self.method,
+                      options={"maxiter": maxiter})
+        _assert_iteration_limit_reached(res, maxiter)
+        assert_equal(res.nit, maxiter)
+
+    def test_bounds_fixed(self):
+
+        # Test fixed bounds (upper equal to lower)
+        # If presolve option True, test if solution found in presolve (i.e.
+        # number of iterations is 0).
+        do_presolve = self.options.get('presolve', True)
+
+        res = linprog([1], bounds=(1, 1),
+                      method=self.method, options=self.options)
+        _assert_success(res, 1, 1)
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+        res = linprog([1, 2, 3], bounds=[(5, 5), (-1, -1), (3, 3)],
+                      method=self.method, options=self.options)
+        _assert_success(res, 12, [5, -1, 3])
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+        res = linprog([1, 1], bounds=[(1, 1), (1, 3)],
+                      method=self.method, options=self.options)
+        _assert_success(res, 2, [1, 1])
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+        res = linprog([1, 1, 2], A_eq=[[1, 0, 0], [0, 1, 0]], b_eq=[1, 7],
+                      bounds=[(-5, 5), (0, 10), (3.5, 3.5)],
+                      method=self.method, options=self.options)
+        _assert_success(res, 15, [1, 7, 3.5])
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+    def test_bounds_infeasible(self):
+
+        # Test ill-valued bounds (upper less than lower)
+        # If presolve option True, test if solution found in presolve (i.e.
+        # number of iterations is 0).
+        do_presolve = self.options.get('presolve', True)
+
+        res = linprog([1], bounds=(1, -2), method=self.method, options=self.options)
+        _assert_infeasible(res)
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+        res = linprog([1], bounds=[(1, -2)], method=self.method, options=self.options)
+        _assert_infeasible(res)
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+        res = linprog([1, 2, 3], bounds=[(5, 0), (1, 2), (3, 4)],
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+        if do_presolve:
+            assert_equal(res.nit, 0)
+
+    @pytest.mark.thread_unsafe
+    def test_bounds_infeasible_2(self):
+
+        # Test ill-valued bounds (lower inf, upper -inf)
+        # If presolve option True, test if solution found in presolve (i.e.
+        # number of iterations is 0).
+        # For the simplex method, the cases do not result in an
+        # infeasible status, but in a RuntimeWarning. This is a
+        # consequence of having _presolve() take care of feasibility
+        # checks. See issue gh-11618.
+        do_presolve = self.options.get('presolve', True)
+        simplex_without_presolve = not do_presolve and self.method == 'simplex'
+
+        c = [1, 2, 3]
+        bounds_1 = [(1, 2), (np.inf, np.inf), (3, 4)]
+        bounds_2 = [(1, 2), (-np.inf, -np.inf), (3, 4)]
+
+        if simplex_without_presolve:
+            def g(c, bounds):
+                res = linprog(c, bounds=bounds,
+                              method=self.method, options=self.options)
+                return res
+
+            with pytest.warns(RuntimeWarning):
+                with pytest.raises(IndexError):
+                    g(c, bounds=bounds_1)
+
+            with pytest.warns(RuntimeWarning):
+                with pytest.raises(IndexError):
+                    g(c, bounds=bounds_2)
+        else:
+            res = linprog(c=c, bounds=bounds_1,
+                          method=self.method, options=self.options)
+            _assert_infeasible(res)
+            if do_presolve:
+                assert_equal(res.nit, 0)
+            res = linprog(c=c, bounds=bounds_2,
+                          method=self.method, options=self.options)
+            _assert_infeasible(res)
+            if do_presolve:
+                assert_equal(res.nit, 0)
+
+    def test_empty_constraint_1(self):
+        c = [-1, -2]
+        res = linprog(c, method=self.method, options=self.options)
+        _assert_unbounded(res)
+
+    def test_empty_constraint_2(self):
+        c = [-1, 1, -1, 1]
+        bounds = [(0, np.inf), (-np.inf, 0), (-1, 1), (-1, 1)]
+        res = linprog(c, bounds=bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+        # Unboundedness detected in presolve requires no iterations
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_empty_constraint_3(self):
+        c = [1, -1, 1, -1]
+        bounds = [(0, np.inf), (-np.inf, 0), (-1, 1), (-1, 1)]
+        res = linprog(c, bounds=bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[0, 0, -1, 1], desired_fun=-2)
+
+    def test_inequality_constraints(self):
+        # Minimize linear function subject to linear inequality constraints.
+        #  http://www.dam.brown.edu/people/huiwang/classes/am121/Archive/simplex_121_c.pdf
+        c = np.array([3, 2]) * -1  # maximize
+        A_ub = [[2, 1],
+                [1, 1],
+                [1, 0]]
+        b_ub = [10, 8, 4]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-18, desired_x=[2, 6])
+
+    def test_inequality_constraints2(self):
+        # Minimize linear function subject to linear inequality constraints.
+        # http://www.statslab.cam.ac.uk/~ff271/teaching/opt/notes/notes8.pdf
+        # (dead link)
+        c = [6, 3]
+        A_ub = [[0, 3],
+                [-1, -1],
+                [-2, 1]]
+        b_ub = [2, -1, -1]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=5, desired_x=[2 / 3, 1 / 3])
+
+    def test_bounds_simple(self):
+        c = [1, 2]
+        bounds = (1, 2)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[1, 1])
+
+        bounds = [(1, 2), (1, 2)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[1, 1])
+
+    def test_bounded_below_only_1(self):
+        c = np.array([1.0])
+        A_eq = np.array([[1.0]])
+        b_eq = np.array([3.0])
+        bounds = (1.0, None)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=3, desired_x=[3])
+
+    def test_bounded_below_only_2(self):
+        c = np.ones(3)
+        A_eq = np.eye(3)
+        b_eq = np.array([1, 2, 3])
+        bounds = (0.5, np.inf)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=b_eq, desired_fun=np.sum(b_eq))
+
+    def test_bounded_above_only_1(self):
+        c = np.array([1.0])
+        A_eq = np.array([[1.0]])
+        b_eq = np.array([3.0])
+        bounds = (None, 10.0)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=3, desired_x=[3])
+
+    def test_bounded_above_only_2(self):
+        c = np.ones(3)
+        A_eq = np.eye(3)
+        b_eq = np.array([1, 2, 3])
+        bounds = (-np.inf, 4)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=b_eq, desired_fun=np.sum(b_eq))
+
+    def test_bounds_infinity(self):
+        c = np.ones(3)
+        A_eq = np.eye(3)
+        b_eq = np.array([1, 2, 3])
+        bounds = (-np.inf, np.inf)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=b_eq, desired_fun=np.sum(b_eq))
+
+    def test_bounds_mixed(self):
+        # Problem has one unbounded variable and
+        # another with a negative lower bound.
+        c = np.array([-1, 4]) * -1  # maximize
+        A_ub = np.array([[-3, 1],
+                         [1, 2]], dtype=np.float64)
+        b_ub = [6, 4]
+        x0_bounds = (-np.inf, np.inf)
+        x1_bounds = (-3, np.inf)
+        bounds = (x0_bounds, x1_bounds)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-80 / 7, desired_x=[-8 / 7, 18 / 7])
+
+    def test_bounds_equal_but_infeasible(self):
+        c = [-4, 1]
+        A_ub = [[7, -2], [0, 1], [2, -2]]
+        b_ub = [14, 0, 3]
+        bounds = [(2, 2), (0, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+    def test_bounds_equal_but_infeasible2(self):
+        c = [-4, 1]
+        A_eq = [[7, -2], [0, 1], [2, -2]]
+        b_eq = [14, 0, 3]
+        bounds = [(2, 2), (0, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+    def test_bounds_equal_no_presolve(self):
+        # There was a bug when a lower and upper bound were equal but
+        # presolve was not on to eliminate the variable. The bound
+        # was being converted to an equality constraint, but the bound
+        # was not eliminated, leading to issues in postprocessing.
+        c = [1, 2]
+        A_ub = [[1, 2], [1.1, 2.2]]
+        b_ub = [4, 8]
+        bounds = [(1, 2), (2, 2)]
+
+        o = {key: self.options[key] for key in self.options}
+        o["presolve"] = False
+
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=o)
+        _assert_infeasible(res)
+
+    def test_zero_column_1(self):
+        m, n = 3, 4
+        rng = np.random.RandomState(0)
+        c = rng.rand(n)
+        c[1] = 1
+        A_eq = rng.rand(m, n)
+        A_eq[:, 1] = 0
+        b_eq = rng.rand(m)
+        A_ub = [[1, 0, 1, 1]]
+        b_ub = 3
+        bounds = [(-10, 10), (-10, 10), (-10, None), (None, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-9.7087836730413404)
+
+    def test_zero_column_2(self):
+        if self.method in {'highs-ds', 'highs-ipm'}:
+            # See upstream issue https://github.com/ERGO-Code/HiGHS/issues/648
+            pytest.xfail()
+
+        rng = np.random.RandomState(0)
+        m, n = 2, 4
+        c = rng.rand(n)
+        c[1] = -1
+        A_eq = rng.rand(m, n)
+        A_eq[:, 1] = 0
+        b_eq = rng.rand(m)
+
+        A_ub = rng.rand(m, n)
+        A_ub[:, 1] = 0
+        b_ub = rng.rand(m)
+        bounds = (None, None)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+        # Unboundedness detected in presolve
+        if self.options.get('presolve', True) and "highs" not in self.method:
+            # HiGHS detects unboundedness or infeasibility in presolve
+            # It needs an iteration of simplex to be sure of unboundedness
+            # Other solvers report that the problem is unbounded if feasible
+            assert_equal(res.nit, 0)
+
+    def test_zero_row_1(self):
+        c = [1, 2, 3]
+        A_eq = [[0, 0, 0], [1, 1, 1], [0, 0, 0]]
+        b_eq = [0, 3, 0]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=3)
+
+    def test_zero_row_2(self):
+        A_ub = [[0, 0, 0], [1, 1, 1], [0, 0, 0]]
+        b_ub = [0, 3, 0]
+        c = [1, 2, 3]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=0)
+
+    def test_zero_row_3(self):
+        m, n = 2, 4
+        rng = np.random.RandomState(1234)
+        c = rng.rand(n)
+        A_eq = rng.rand(m, n)
+        A_eq[0, :] = 0
+        b_eq = rng.rand(m)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+        # Infeasibility detected in presolve
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_zero_row_4(self):
+        m, n = 2, 4
+        rng = np.random.RandomState(1234)
+        c = rng.rand(n)
+        A_ub = rng.rand(m, n)
+        A_ub[0, :] = 0
+        b_ub = -rng.rand(m)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+        # Infeasibility detected in presolve
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_singleton_row_eq_1(self):
+        c = [1, 1, 1, 2]
+        A_eq = [[1, 0, 0, 0], [0, 2, 0, 0], [1, 0, 0, 0], [1, 1, 1, 1]]
+        b_eq = [1, 2, 2, 4]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+        # Infeasibility detected in presolve
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_singleton_row_eq_2(self):
+        c = [1, 1, 1, 2]
+        A_eq = [[1, 0, 0, 0], [0, 2, 0, 0], [1, 0, 0, 0], [1, 1, 1, 1]]
+        b_eq = [1, 2, 1, 4]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=4)
+
+    def test_singleton_row_ub_1(self):
+        c = [1, 1, 1, 2]
+        A_ub = [[1, 0, 0, 0], [0, 2, 0, 0], [-1, 0, 0, 0], [1, 1, 1, 1]]
+        b_ub = [1, 2, -2, 4]
+        bounds = [(None, None), (0, None), (0, None), (0, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+        # Infeasibility detected in presolve
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_singleton_row_ub_2(self):
+        c = [1, 1, 1, 2]
+        A_ub = [[1, 0, 0, 0], [0, 2, 0, 0], [-1, 0, 0, 0], [1, 1, 1, 1]]
+        b_ub = [1, 2, -0.5, 4]
+        bounds = [(None, None), (0, None), (0, None), (0, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=0.5)
+
+    def test_infeasible(self):
+        # Test linprog response to an infeasible problem
+        c = [-1, -1]
+        A_ub = [[1, 0],
+                [0, 1],
+                [-1, -1]]
+        b_ub = [2, 2, -5]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+    def test_infeasible_inequality_bounds(self):
+        c = [1]
+        A_ub = [[2]]
+        b_ub = 4
+        bounds = (5, 6)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+        # Infeasibility detected in presolve
+        if self.options.get('presolve', True):
+            assert_equal(res.nit, 0)
+
+    def test_unbounded(self):
+        # Test linprog response to an unbounded problem
+        c = np.array([1, 1]) * -1  # maximize
+        A_ub = [[-1, 1],
+                [-1, -1]]
+        b_ub = [-1, -2]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+
+    def test_unbounded_below_no_presolve_corrected(self):
+        c = [1]
+        bounds = [(None, 1)]
+
+        o = {key: self.options[key] for key in self.options}
+        o["presolve"] = False
+
+        res = linprog(c=c, bounds=bounds,
+                      method=self.method,
+                      options=o)
+        if self.method == "revised simplex":
+            # Revised simplex has a special pathway for no constraints.
+            assert_equal(res.status, 5)
+        else:
+            _assert_unbounded(res)
+
+    def test_unbounded_no_nontrivial_constraints_1(self):
+        """
+        Test whether presolve pathway for detecting unboundedness after
+        constraint elimination is working.
+        """
+        c = np.array([0, 0, 0, 1, -1, -1])
+        A_ub = np.array([[1, 0, 0, 0, 0, 0],
+                         [0, 1, 0, 0, 0, 0],
+                         [0, 0, 0, 0, 0, -1]])
+        b_ub = np.array([2, -2, 0])
+        bounds = [(None, None), (None, None), (None, None),
+                  (-1, 1), (-1, 1), (0, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+        if not self.method.lower().startswith("highs"):
+            assert_equal(res.x[-1], np.inf)
+            assert_equal(res.message[:36],
+                         "The problem is (trivially) unbounded")
+
+    def test_unbounded_no_nontrivial_constraints_2(self):
+        """
+        Test whether presolve pathway for detecting unboundedness after
+        constraint elimination is working.
+        """
+        c = np.array([0, 0, 0, 1, -1, 1])
+        A_ub = np.array([[1, 0, 0, 0, 0, 0],
+                         [0, 1, 0, 0, 0, 0],
+                         [0, 0, 0, 0, 0, 1]])
+        b_ub = np.array([2, -2, 0])
+        bounds = [(None, None), (None, None), (None, None),
+                  (-1, 1), (-1, 1), (None, 0)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+        if not self.method.lower().startswith("highs"):
+            assert_equal(res.x[-1], -np.inf)
+            assert_equal(res.message[:36],
+                         "The problem is (trivially) unbounded")
+
+    def test_cyclic_recovery(self):
+        # Test linprogs recovery from cycling using the Klee-Minty problem
+        # Klee-Minty  https://www.math.ubc.ca/~israel/m340/kleemin3.pdf
+        c = np.array([100, 10, 1]) * -1  # maximize
+        A_ub = [[1, 0, 0],
+                [20, 1, 0],
+                [200, 20, 1]]
+        b_ub = [1, 100, 10000]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[0, 0, 10000], atol=5e-6, rtol=1e-7)
+
+    def test_cyclic_bland(self):
+        # Test the effect of Bland's rule on a cycling problem
+        c = np.array([-10, 57, 9, 24.])
+        A_ub = np.array([[0.5, -5.5, -2.5, 9],
+                         [0.5, -1.5, -0.5, 1],
+                         [1, 0, 0, 0]])
+        b_ub = [0, 0, 1]
+
+        # copy the existing options dictionary but change maxiter
+        maxiter = 100
+        o = {key: val for key, val in self.options.items()}
+        o['maxiter'] = maxiter
+
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=o)
+
+        if self.method == 'simplex' and not self.options.get('bland'):
+            # simplex cycles without Bland's rule
+            _assert_iteration_limit_reached(res, o['maxiter'])
+        else:
+            # other methods, including simplex with Bland's rule, succeed
+            _assert_success(res, desired_x=[1, 0, 1, 0])
+        # note that revised simplex skips this test because it may or may not
+        # cycle depending on the initial basis
+
+    def test_remove_redundancy_infeasibility(self):
+        # mostly a test of redundancy removal, which is carefully tested in
+        # test__remove_redundancy.py
+        m, n = 10, 10
+        rng = np.random.RandomState(0)
+        c = rng.rand(n)
+        A_eq = rng.rand(m, n)
+        b_eq = rng.rand(m)
+        A_eq[-1, :] = 2 * A_eq[-2, :]
+        b_eq[-1] *= -1
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+    #################
+    # General Tests #
+    #################
+
+    def test_nontrivial_problem(self):
+        # Problem involves all constraint types,
+        # negative resource limits, and rounding issues.
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+
+    def test_lpgen_problem(self):
+        # Test linprog  with a rather large problem (400 variables,
+        # 40 constraints) generated by https://gist.github.com/denis-bz/8647461
+        A_ub, b_ub, c = lpgen_2d(20, 20)
+
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "Solving system with option 'sym_pos'")
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-64.049494229)
+
+    def test_network_flow(self):
+        # A network flow problem with supply and demand at nodes
+        # and with costs along directed edges.
+        # https://www.princeton.edu/~rvdb/542/lectures/lec10.pdf
+        c = [2, 4, 9, 11, 4, 3, 8, 7, 0, 15, 16, 18]
+        n, p = -1, 1
+        A_eq = [
+            [n, n, p, 0, p, 0, 0, 0, 0, p, 0, 0],
+            [p, 0, 0, p, 0, p, 0, 0, 0, 0, 0, 0],
+            [0, 0, n, n, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, p, p, 0, 0, p, 0],
+            [0, 0, 0, 0, n, n, n, 0, p, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, n, n, 0, 0, p],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, n, n, n]]
+        b_eq = [0, 19, -16, 33, 0, 0, -36]
+        with suppress_warnings() as sup:
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=755, atol=1e-6, rtol=1e-7)
+
+    def test_network_flow_limited_capacity(self):
+        # A network flow problem with supply and demand at nodes
+        # and with costs and capacities along directed edges.
+        # http://blog.sommer-forst.de/2013/04/10/
+        c = [2, 2, 1, 3, 1]
+        bounds = [
+            [0, 4],
+            [0, 2],
+            [0, 2],
+            [0, 3],
+            [0, 5]]
+        n, p = -1, 1
+        A_eq = [
+            [n, n, 0, 0, 0],
+            [p, 0, n, n, 0],
+            [0, p, p, 0, n],
+            [0, 0, 0, p, p]]
+        b_eq = [-4, 0, 0, 4]
+
+        with suppress_warnings() as sup:
+            # this is an UmfpackWarning but I had trouble importing it
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(RuntimeWarning, "scipy.linalg.solve\nIll...")
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            sup.filter(OptimizeWarning, "Solving system with option...")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=14)
+
+    def test_simplex_algorithm_wikipedia_example(self):
+        # https://en.wikipedia.org/wiki/Simplex_algorithm#Example
+        c = [-2, -3, -4]
+        A_ub = [
+            [3, 2, 1],
+            [2, 5, 3]]
+        b_ub = [10, 15]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-20)
+
+    def test_enzo_example(self):
+        # https://github.com/scipy/scipy/issues/1779 lp2.py
+        #
+        # Translated from Octave code at:
+        # http://www.ecs.shimane-u.ac.jp/~kyoshida/lpeng.htm
+        # and placed under MIT licence by Enzo Michelangeli
+        # with permission explicitly granted by the original author,
+        # Prof. Kazunobu Yoshida
+        c = [4, 8, 3, 0, 0, 0]
+        A_eq = [
+            [2, 5, 3, -1, 0, 0],
+            [3, 2.5, 8, 0, -1, 0],
+            [8, 10, 4, 0, 0, -1]]
+        b_eq = [185, 155, 600]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=317.5,
+                        desired_x=[66.25, 0, 17.5, 0, 183.75, 0],
+                        atol=6e-6, rtol=1e-7)
+
+    def test_enzo_example_b(self):
+        # rescued from https://github.com/scipy/scipy/pull/218
+        c = [2.8, 6.3, 10.8, -2.8, -6.3, -10.8]
+        A_eq = [[-1, -1, -1, 0, 0, 0],
+                [0, 0, 0, 1, 1, 1],
+                [1, 0, 0, 1, 0, 0],
+                [0, 1, 0, 0, 1, 0],
+                [0, 0, 1, 0, 0, 1]]
+        b_eq = [-0.5, 0.4, 0.3, 0.3, 0.3]
+
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-1.77,
+                        desired_x=[0.3, 0.2, 0.0, 0.0, 0.1, 0.3])
+
+    def test_enzo_example_c_with_degeneracy(self):
+        # rescued from https://github.com/scipy/scipy/pull/218
+        m = 20
+        c = -np.ones(m)
+        tmp = 2 * np.pi * np.arange(1, m + 1) / (m + 1)
+        A_eq = np.vstack((np.cos(tmp) - 1, np.sin(tmp)))
+        b_eq = [0, 0]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=0, desired_x=np.zeros(m))
+
+    def test_enzo_example_c_with_unboundedness(self):
+        # rescued from https://github.com/scipy/scipy/pull/218
+        m = 50
+        c = -np.ones(m)
+        tmp = 2 * np.pi * np.arange(m) / (m + 1)
+        # This test relies on `cos(0) -1 == sin(0)`, so ensure that's true
+        # (SIMD code or -ffast-math may cause spurious failures otherwise)
+        row0 = np.cos(tmp) - 1
+        row0[0] = 0.0
+        row1 = np.sin(tmp)
+        row1[0] = 0.0
+        A_eq = np.vstack((row0, row1))
+        b_eq = [0, 0]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_unbounded(res)
+
+    def test_enzo_example_c_with_infeasibility(self):
+        # rescued from https://github.com/scipy/scipy/pull/218
+        m = 50
+        c = -np.ones(m)
+        tmp = 2 * np.pi * np.arange(m) / (m + 1)
+        A_eq = np.vstack((np.cos(tmp) - 1, np.sin(tmp)))
+        b_eq = [1, 1]
+
+        o = {key: self.options[key] for key in self.options}
+        o["presolve"] = False
+
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=o)
+        _assert_infeasible(res)
+
+    def test_basic_artificial_vars(self):
+        # Problem is chosen to test two phase simplex methods when at the end
+        # of phase 1 some artificial variables remain in the basis.
+        # Also, for `method='simplex'`, the row in the tableau corresponding
+        # with the artificial variables is not all zero.
+        c = np.array([-0.1, -0.07, 0.004, 0.004, 0.004, 0.004])
+        A_ub = np.array([[1.0, 0, 0, 0, 0, 0], [-1.0, 0, 0, 0, 0, 0],
+                         [0, -1.0, 0, 0, 0, 0], [0, 1.0, 0, 0, 0, 0],
+                         [1.0, 1.0, 0, 0, 0, 0]])
+        b_ub = np.array([3.0, 3.0, 3.0, 3.0, 20.0])
+        A_eq = np.array([[1.0, 0, -1, 1, -1, 1], [0, -1.0, -1, 1, -1, 1]])
+        b_eq = np.array([0, 0])
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=0, desired_x=np.zeros_like(c),
+                        atol=2e-6)
+
+    def test_optimize_result(self):
+        # check all fields in OptimizeResult
+        c, A_ub, b_ub, A_eq, b_eq, bounds = very_random_gen(0)
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method, options=self.options)
+        assert_(res.success)
+        assert_(res.nit)
+        assert_(not res.status)
+        if 'highs' not in self.method:
+            # HiGHS status/message tested separately
+            assert_(res.message == "Optimization terminated successfully.")
+        assert_allclose(c @ res.x, res.fun)
+        assert_allclose(b_eq - A_eq @ res.x, res.con, atol=1e-11)
+        assert_allclose(b_ub - A_ub @ res.x, res.slack, atol=1e-11)
+        for key in ['eqlin', 'ineqlin', 'lower', 'upper']:
+            if key in res.keys():
+                assert isinstance(res[key]['marginals'], np.ndarray)
+                assert isinstance(res[key]['residual'], np.ndarray)
+
+    #################
+    # Bug Fix Tests #
+    #################
+
+    def test_bug_5400(self):
+        # https://github.com/scipy/scipy/issues/5400
+        bounds = [
+            (0, None),
+            (0, 100), (0, 100), (0, 100), (0, 100), (0, 100), (0, 100),
+            (0, 900), (0, 900), (0, 900), (0, 900), (0, 900), (0, 900),
+            (0, None), (0, None), (0, None), (0, None), (0, None), (0, None)]
+
+        f = 1 / 9
+        g = -1e4
+        h = -3.1
+        A_ub = np.array([
+            [1, -2.99, 0, 0, -3, 0, 0, 0, -1, -1, 0, -1, -1, 1, 1, 0, 0, 0, 0],
+            [1, 0, -2.9, h, 0, -3, 0, -1, 0, 0, -1, 0, -1, 0, 0, 1, 1, 0, 0],
+            [1, 0, 0, h, 0, 0, -3, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0, 1, 1],
+            [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1],
+            [0, 1.99, -1, -1, 0, 0, 0, -1, f, f, 0, 0, 0, g, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 2, -1, -1, 0, 0, 0, -1, f, f, 0, g, 0, 0, 0, 0],
+            [0, -1, 1.9, 2.1, 0, 0, 0, f, -1, -1, 0, 0, 0, 0, 0, g, 0, 0, 0],
+            [0, 0, 0, 0, -1, 2, -1, 0, 0, 0, f, -1, f, 0, 0, 0, g, 0, 0],
+            [0, -1, -1, 2.1, 0, 0, 0, f, f, -1, 0, 0, 0, 0, 0, 0, 0, g, 0],
+            [0, 0, 0, 0, -1, -1, 2, 0, 0, 0, f, f, -1, 0, 0, 0, 0, 0, g]])
+
+        b_ub = np.array([
+            0.0, 0, 0, 100, 100, 100, 100, 100, 100, 900, 900, 900, 900, 900,
+            900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
+
+        c = np.array([-1.0, 1, 1, 1, 1, 1, 1, 1, 1,
+                      1, 1, 1, 1, 0, 0, 0, 0, 0, 0])
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning,
+                       "Solving system with option 'sym_pos'")
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=-106.63507541835018)
+
+    def test_bug_6139(self):
+        # linprog(method='simplex') fails to find a basic feasible solution
+        # if phase 1 pseudo-objective function is outside the provided tol.
+        # https://github.com/scipy/scipy/issues/6139
+
+        # Note: This is not strictly a bug as the default tolerance determines
+        # if a result is "close enough" to zero and should not be expected
+        # to work for all cases.
+
+        c = np.array([1, 1, 1])
+        A_eq = np.array([[1., 0., 0.], [-1000., 0., - 1000.]])
+        b_eq = np.array([5.00000000e+00, -1.00000000e+04])
+        A_ub = -np.array([[0., 1000000., 1010000.]])
+        b_ub = -np.array([10000000.])
+        bounds = (None, None)
+
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+
+        _assert_success(res, desired_fun=14.95,
+                        desired_x=np.array([5, 4.95, 5]))
+
+    def test_bug_6690(self):
+        # linprog simplex used to violate bound constraint despite reporting
+        # success.
+        # https://github.com/scipy/scipy/issues/6690
+
+        A_eq = np.array([[0, 0, 0, 0.93, 0, 0.65, 0, 0, 0.83, 0]])
+        b_eq = np.array([0.9626])
+        A_ub = np.array([
+            [0, 0, 0, 1.18, 0, 0, 0, -0.2, 0, -0.22],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0.43, 0, 0, 0, 0, 0, 0],
+            [0, -1.22, -0.25, 0, 0, 0, -2.06, 0, 0, 1.37],
+            [0, 0, 0, 0, 0, 0, 0, -0.25, 0, 0]
+        ])
+        b_ub = np.array([0.615, 0, 0.172, -0.869, -0.022])
+        bounds = np.array([
+            [-0.84, -0.97, 0.34, 0.4, -0.33, -0.74, 0.47, 0.09, -1.45, -0.73],
+            [0.37, 0.02, 2.86, 0.86, 1.18, 0.5, 1.76, 0.17, 0.32, -0.15]
+        ]).T
+        c = np.array([
+            -1.64, 0.7, 1.8, -1.06, -1.16, 0.26, 2.13, 1.53, 0.66, 0.28
+            ])
+
+        with suppress_warnings() as sup:
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(OptimizeWarning,
+                       "Solving system with option 'cholesky'")
+            sup.filter(OptimizeWarning, "Solving system with option 'sym_pos'")
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+
+        desired_fun = -1.19099999999
+        desired_x = np.array([0.3700, -0.9700, 0.3400, 0.4000, 1.1800,
+                              0.5000, 0.4700, 0.0900, 0.3200, -0.7300])
+        _assert_success(res, desired_fun=desired_fun, desired_x=desired_x)
+
+        # Add small tol value to ensure arrays are less than or equal.
+        atol = 1e-6
+        assert_array_less(bounds[:, 0] - atol, res.x)
+        assert_array_less(res.x, bounds[:, 1] + atol)
+
+    def test_bug_7044(self):
+        # linprog simplex failed to "identify correct constraints" (?)
+        # leading to a non-optimal solution if A is rank-deficient.
+        # https://github.com/scipy/scipy/issues/7044
+
+        A_eq, b_eq, c, _, _ = magic_square(3)
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+
+        desired_fun = 1.730550597
+        _assert_success(res, desired_fun=desired_fun)
+        assert_allclose(A_eq.dot(res.x), b_eq)
+        assert_array_less(np.zeros(res.x.size) - 1e-5, res.x)
+
+    def test_bug_7237(self):
+        # https://github.com/scipy/scipy/issues/7237
+        # linprog simplex "explodes" when the pivot value is very
+        # close to zero.
+
+        c = np.array([-1, 0, 0, 0, 0, 0, 0, 0, 0])
+        A_ub = np.array([
+            [1., -724., 911., -551., -555., -896., 478., -80., -293.],
+            [1., 566., 42., 937., 233., 883., 392., -909., 57.],
+            [1., -208., -894., 539., 321., 532., -924., 942., 55.],
+            [1., 857., -859., 83., 462., -265., -971., 826., 482.],
+            [1., 314., -424., 245., -424., 194., -443., -104., -429.],
+            [1., 540., 679., 361., 149., -827., 876., 633., 302.],
+            [0., -1., -0., -0., -0., -0., -0., -0., -0.],
+            [0., -0., -1., -0., -0., -0., -0., -0., -0.],
+            [0., -0., -0., -1., -0., -0., -0., -0., -0.],
+            [0., -0., -0., -0., -1., -0., -0., -0., -0.],
+            [0., -0., -0., -0., -0., -1., -0., -0., -0.],
+            [0., -0., -0., -0., -0., -0., -1., -0., -0.],
+            [0., -0., -0., -0., -0., -0., -0., -1., -0.],
+            [0., -0., -0., -0., -0., -0., -0., -0., -1.],
+            [0., 1., 0., 0., 0., 0., 0., 0., 0.],
+            [0., 0., 1., 0., 0., 0., 0., 0., 0.],
+            [0., 0., 0., 1., 0., 0., 0., 0., 0.],
+            [0., 0., 0., 0., 1., 0., 0., 0., 0.],
+            [0., 0., 0., 0., 0., 1., 0., 0., 0.],
+            [0., 0., 0., 0., 0., 0., 1., 0., 0.],
+            [0., 0., 0., 0., 0., 0., 0., 1., 0.],
+            [0., 0., 0., 0., 0., 0., 0., 0., 1.]
+            ])
+        b_ub = np.array([
+            0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+            0., 0., 0., 1., 1., 1., 1., 1., 1., 1., 1.])
+        A_eq = np.array([[0., 1., 1., 1., 1., 1., 1., 1., 1.]])
+        b_eq = np.array([[1.]])
+        bounds = [(None, None)] * 9
+
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_fun=108.568535, atol=1e-6)
+
+    def test_bug_8174(self):
+        # https://github.com/scipy/scipy/issues/8174
+        # The simplex method sometimes "explodes" if the pivot value is very
+        # close to zero.
+        A_ub = np.array([
+            [22714, 1008, 13380, -2713.5, -1116],
+            [-4986, -1092, -31220, 17386.5, 684],
+            [-4986, 0, 0, -2713.5, 0],
+            [22714, 0, 0, 17386.5, 0]])
+        b_ub = np.zeros(A_ub.shape[0])
+        c = -np.ones(A_ub.shape[1])
+        bounds = [(0, 1)] * A_ub.shape[1]
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+
+        if self.options.get('tol', 1e-9) < 1e-10 and self.method == 'simplex':
+            _assert_unable_to_find_basic_feasible_sol(res)
+        else:
+            _assert_success(res, desired_fun=-2.0080717488789235, atol=1e-6)
+
+    def test_bug_8174_2(self):
+        # Test supplementary example from issue 8174.
+        # https://github.com/scipy/scipy/issues/8174
+        # https://stackoverflow.com/questions/47717012/linprog-in-scipy-optimize-checking-solution
+        c = np.array([1, 0, 0, 0, 0, 0, 0])
+        A_ub = -np.identity(7)
+        b_ub = np.array([[-2], [-2], [-2], [-2], [-2], [-2], [-2]])
+        A_eq = np.array([
+            [1, 1, 1, 1, 1, 1, 0],
+            [0.3, 1.3, 0.9, 0, 0, 0, -1],
+            [0.3, 0, 0, 0, 0, 0, -2/3],
+            [0, 0.65, 0, 0, 0, 0, -1/15],
+            [0, 0, 0.3, 0, 0, 0, -1/15]
+        ])
+        b_eq = np.array([[100], [0], [0], [0], [0]])
+
+        with suppress_warnings() as sup:
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_fun=43.3333333331385)
+
+    def test_bug_8561(self):
+        # Test that pivot row is chosen correctly when using Bland's rule
+        # This was originally written for the simplex method with
+        # Bland's rule only, but it doesn't hurt to test all methods/options
+        # https://github.com/scipy/scipy/issues/8561
+        c = np.array([7, 0, -4, 1.5, 1.5])
+        A_ub = np.array([
+            [4, 5.5, 1.5, 1.0, -3.5],
+            [1, -2.5, -2, 2.5, 0.5],
+            [3, -0.5, 4, -12.5, -7],
+            [-1, 4.5, 2, -3.5, -2],
+            [5.5, 2, -4.5, -1, 9.5]])
+        b_ub = np.array([0, 0, 0, 0, 1])
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, options=self.options,
+                      method=self.method)
+        _assert_success(res, desired_x=[0, 0, 19, 16/3, 29/3])
+
+    def test_bug_8662(self):
+        # linprog simplex used to report incorrect optimal results
+        # https://github.com/scipy/scipy/issues/8662
+        c = [-10, 10, 6, 3]
+        A_ub = [[8, -8, -4, 6],
+                [-8, 8, 4, -6],
+                [-4, 4, 8, -4],
+                [3, -3, -3, -10]]
+        b_ub = [9, -9, -9, -4]
+        bounds = [(0, None), (0, None), (0, None), (0, None)]
+        desired_fun = 36.0000000000
+
+        with suppress_warnings() as sup:
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res1 = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                           method=self.method, options=self.options)
+
+        # Set boundary condition as a constraint
+        A_ub.append([0, 0, -1, 0])
+        b_ub.append(0)
+        bounds[2] = (None, None)
+
+        with suppress_warnings() as sup:
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res2 = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                           method=self.method, options=self.options)
+        rtol = 1e-5
+        _assert_success(res1, desired_fun=desired_fun, rtol=rtol)
+        _assert_success(res2, desired_fun=desired_fun, rtol=rtol)
+
+    def test_bug_8663(self):
+        # exposed a bug in presolve
+        # https://github.com/scipy/scipy/issues/8663
+        c = [1, 5]
+        A_eq = [[0, -7]]
+        b_eq = [-6]
+        bounds = [(0, None), (None, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[0, 6./7], desired_fun=5*6./7)
+
+    def test_bug_8664(self):
+        # interior-point has trouble with this when presolve is off
+        # tested for interior-point with presolve off in TestLinprogIPSpecific
+        # https://github.com/scipy/scipy/issues/8664
+        c = [4]
+        A_ub = [[2], [5]]
+        b_ub = [4, 4]
+        A_eq = [[0], [-8], [9]]
+        b_eq = [3, 2, 10]
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning)
+            sup.filter(OptimizeWarning, "Solving system with option...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_infeasible(res)
+
+    def test_bug_8973(self):
+        """
+        Test whether bug described at:
+        https://github.com/scipy/scipy/issues/8973
+        was fixed.
+        """
+        c = np.array([0, 0, 0, 1, -1])
+        A_ub = np.array([[1, 0, 0, 0, 0], [0, 1, 0, 0, 0]])
+        b_ub = np.array([2, -2])
+        bounds = [(None, None), (None, None), (None, None), (-1, 1), (-1, 1)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        # solution vector x is not unique
+        _assert_success(res, desired_fun=-2)
+        # HiGHS IPM had an issue where the following wasn't true!
+        assert_equal(c @ res.x, res.fun)
+
+    def test_bug_8973_2(self):
+        """
+        Additional test for:
+        https://github.com/scipy/scipy/issues/8973
+        suggested in
+        https://github.com/scipy/scipy/pull/8985
+        review by @antonior92
+        """
+        c = np.zeros(1)
+        A_ub = np.array([[1]])
+        b_ub = np.array([-2])
+        bounds = (None, None)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options)
+        _assert_success(res, desired_x=[-2], desired_fun=0)
+
+    def test_bug_10124(self):
+        """
+        Test for linprog docstring problem
+        'disp'=True caused revised simplex failure
+        """
+        c = np.zeros(1)
+        A_ub = np.array([[1]])
+        b_ub = np.array([-2])
+        bounds = (None, None)
+        c = [-1, 4]
+        A_ub = [[-3, 1], [1, 2]]
+        b_ub = [6, 4]
+        bounds = [(None, None), (-3, None)]
+        o = {"disp": True}
+        o.update(self.options)
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=o)
+        _assert_success(res, desired_x=[10, -3], desired_fun=-22)
+
+    def test_bug_10349(self):
+        """
+        Test for redundancy removal tolerance issue
+        https://github.com/scipy/scipy/issues/10349
+        """
+        A_eq = np.array([[1, 1, 0, 0, 0, 0],
+                         [0, 0, 1, 1, 0, 0],
+                         [0, 0, 0, 0, 1, 1],
+                         [1, 0, 1, 0, 0, 0],
+                         [0, 0, 0, 1, 1, 0],
+                         [0, 1, 0, 0, 0, 1]])
+        b_eq = np.array([221, 210, 10, 141, 198, 102])
+        c = np.concatenate((0, 1, np.zeros(4)), axis=None)
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=self.options)
+        _assert_success(res, desired_x=[129, 92, 12, 198, 0, 10], desired_fun=92)
+
+    @pytest.mark.skipif(sys.platform == 'darwin',
+                        reason=("Failing on some local macOS builds, "
+                                "see gh-13846"))
+    def test_bug_10466(self):
+        """
+        Test that autoscale fixes poorly-scaled problem
+        """
+        c = [-8., -0., -8., -0., -8., -0., -0., -0., -0., -0., -0., -0., -0.]
+        A_eq = [[1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
+                [0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
+                [0., 0., 0., 0., 1., 1., 0., 0., 0., 0., 0., 0., 0.],
+                [1., 0., 1., 0., 1., 0., -1., 0., 0., 0., 0., 0., 0.],
+                [1., 0., 1., 0., 1., 0., 0., 1., 0., 0., 0., 0., 0.],
+                [1., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.],
+                [1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.],
+                [1., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0.],
+                [0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0.],
+                [0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 0., 0., 1.]]
+
+        b_eq = [3.14572800e+08, 4.19430400e+08, 5.24288000e+08,
+                1.00663296e+09, 1.07374182e+09, 1.07374182e+09,
+                1.07374182e+09, 1.07374182e+09, 1.07374182e+09,
+                1.07374182e+09]
+
+        o = {}
+        # HiGHS methods don't use autoscale option
+        if not self.method.startswith("highs"):
+            o = {"autoscale": True}
+        o.update(self.options)
+
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "Solving system with option...")
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(RuntimeWarning, "scipy.linalg.solve\nIll...")
+            sup.filter(RuntimeWarning, "divide by zero encountered...")
+            sup.filter(RuntimeWarning, "overflow encountered...")
+            sup.filter(RuntimeWarning, "invalid value encountered...")
+            sup.filter(LinAlgWarning, "Ill-conditioned matrix...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=o)
+        assert_allclose(res.fun, -8589934560)
+
+
+#########################
+# Method-specific Tests #
+#########################
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class LinprogSimplexTests(LinprogCommonTests):
+    method = "simplex"
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class LinprogIPTests(LinprogCommonTests):
+    method = "interior-point"
+
+    def test_bug_10466(self):
+        pytest.skip("Test is failing, but solver is deprecated.")
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class LinprogRSTests(LinprogCommonTests):
+    method = "revised simplex"
+
+    # Revised simplex does not reliably solve these problems.
+    # Failure is intermittent due to the random choice of elements to complete
+    # the basis after phase 1 terminates. In any case, linprog exists
+    # gracefully, reporting numerical difficulties. I do not think this should
+    # prevent revised simplex from being merged, as it solves the problems
+    # most of the time and solves a broader range of problems than the existing
+    # simplex implementation.
+    # I believe that the root cause is the same for all three and that this
+    # same issue prevents revised simplex from solving many other problems
+    # reliably. Somehow the pivoting rule allows the algorithm to pivot into
+    # a singular basis. I haven't been able to find a reference that
+    # acknowledges this possibility, suggesting that there is a bug. On the
+    # other hand, the pivoting rule is quite simple, and I can't find a
+    # mistake, which suggests that this is a possibility with the pivoting
+    # rule. Hopefully, a better pivoting rule will fix the issue.
+
+    def test_bug_5400(self):
+        pytest.skip("Intermittent failure acceptable.")
+
+    def test_bug_8662(self):
+        pytest.skip("Intermittent failure acceptable.")
+
+    def test_network_flow(self):
+        pytest.skip("Intermittent failure acceptable.")
+
+
+class LinprogHiGHSTests(LinprogCommonTests):
+    def test_callback(self):
+        # this is the problem from test_callback
+        def cb(res):
+            return None
+        c = np.array([-3, -2])
+        A_ub = [[2, 1], [1, 1], [1, 0]]
+        b_ub = [10, 8, 4]
+        assert_raises(NotImplementedError, linprog, c, A_ub=A_ub, b_ub=b_ub,
+                      callback=cb, method=self.method)
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, method=self.method)
+        _assert_success(res, desired_fun=-18.0, desired_x=[2, 6])
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("options",
+                             [{"maxiter": -1},
+                              {"disp": -1},
+                              {"presolve": -1},
+                              {"time_limit": -1},
+                              {"dual_feasibility_tolerance": -1},
+                              {"primal_feasibility_tolerance": -1},
+                              {"ipm_optimality_tolerance": -1},
+                              {"simplex_dual_edge_weight_strategy": "ekki"},
+                              ])
+    def test_invalid_option_values(self, options):
+        def f(options):
+            linprog(1, method=self.method, options=options)
+        options.update(self.options)
+        assert_warns(OptimizeWarning, f, options=options)
+
+    def test_crossover(self):
+        A_eq, b_eq, c, _, _ = magic_square(4)
+        bounds = (0, 1)
+        res = linprog(c, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method, options=self.options)
+        # there should be nonzero crossover iterations for IPM (only)
+        assert_equal(res.crossover_nit == 0, self.method != "highs-ipm")
+
+    @pytest.mark.fail_slow(10)
+    def test_marginals(self):
+        # Ensure lagrange multipliers are correct by comparing the derivative
+        # w.r.t. b_ub/b_eq/ub/lb to the reported duals.
+        c, A_ub, b_ub, A_eq, b_eq, bounds = very_random_gen(seed=0)
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method, options=self.options)
+        lb, ub = bounds.T
+
+        # sensitivity w.r.t. b_ub
+        def f_bub(x):
+            return linprog(c, A_ub, x, A_eq, b_eq, bounds,
+                           method=self.method).fun
+
+        dfdbub = approx_derivative(f_bub, b_ub, method='3-point', f0=res.fun)
+        assert_allclose(res.ineqlin.marginals, dfdbub)
+
+        # sensitivity w.r.t. b_eq
+        def f_beq(x):
+            return linprog(c, A_ub, b_ub, A_eq, x, bounds,
+                           method=self.method).fun
+
+        dfdbeq = approx_derivative(f_beq, b_eq, method='3-point', f0=res.fun)
+        assert_allclose(res.eqlin.marginals, dfdbeq)
+
+        # sensitivity w.r.t. lb
+        def f_lb(x):
+            bounds = np.array([x, ub]).T
+            return linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                           method=self.method).fun
+
+        with np.errstate(invalid='ignore'):
+            # approx_derivative has trouble where lb is infinite
+            dfdlb = approx_derivative(f_lb, lb, method='3-point', f0=res.fun)
+            dfdlb[~np.isfinite(lb)] = 0
+
+        assert_allclose(res.lower.marginals, dfdlb)
+
+        # sensitivity w.r.t. ub
+        def f_ub(x):
+            bounds = np.array([lb, x]).T
+            return linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                           method=self.method).fun
+
+        with np.errstate(invalid='ignore'):
+            dfdub = approx_derivative(f_ub, ub, method='3-point', f0=res.fun)
+            dfdub[~np.isfinite(ub)] = 0
+
+        assert_allclose(res.upper.marginals, dfdub)
+
+    def test_dual_feasibility(self):
+        # Ensure solution is dual feasible using marginals
+        c, A_ub, b_ub, A_eq, b_eq, bounds = very_random_gen(seed=42)
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method, options=self.options)
+
+        # KKT dual feasibility equation from Theorem 1 from
+        # http://www.personal.psu.edu/cxg286/LPKKT.pdf
+        resid = (-c + A_ub.T @ res.ineqlin.marginals +
+                 A_eq.T @ res.eqlin.marginals +
+                 res.upper.marginals +
+                 res.lower.marginals)
+        assert_allclose(resid, 0, atol=1e-12)
+
+    def test_complementary_slackness(self):
+        # Ensure that the complementary slackness condition is satisfied.
+        c, A_ub, b_ub, A_eq, b_eq, bounds = very_random_gen(seed=42)
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method, options=self.options)
+
+        # KKT complementary slackness equation from Theorem 1 from
+        # http://www.personal.psu.edu/cxg286/LPKKT.pdf modified for
+        # non-zero RHS
+        assert np.allclose(res.ineqlin.marginals @ (b_ub - A_ub @ res.x), 0)
+
+    @pytest.mark.xfail(reason='Upstream / Wrapper issue, see gh-20589')
+    def test_bug_20336(self):
+        """
+        Test that `linprog` now solves a poorly-scaled problem
+        """
+        boundaries = [(10000.0, 9010000.0), (0.0, None), (10000.0, None),
+                     (0.0, 84.62623413258109), (10000.0, None), (10000.0, None),
+                     (10000.0, None), (10000.0, None), (10000.0, None),
+                     (10000.0, None), (10000.0, None), (10000.0, None),
+                     (10000.0, None), (None, None), (None, None), (None, None),
+                     (None, None), (None, None), (None, None), (None, None),
+                     (None, None), (None, None), (None, None), (None, None),
+                     (None, None), (None, None), (None, None), (None, None),
+                     (None, None), (None, None), (None, None), (None, None),
+                     (None, None)]
+        eq_entries = [-1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0,
+                      -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 0.001,
+                      -0.001, 3.7337777768059636e-10, 3.7337777768059636e-10, 1.0, -1.0,
+                      0.001, -0.001, 3.7337777768059636e-10, 3.7337777768059636e-10,
+                      1.0, -1.0, 0.001, -0.001, 3.7337777768059636e-10,
+                      3.7337777768059636e-10, 1.0, -1.0, 0.001, -0.001,
+                      3.7337777768059636e-10, 3.7337777768059636e-10, 1.0, -1.0, 0.001,
+                      -0.001, 3.7337777768059636e-10, 3.7337777768059636e-10, 1.0, -1.0,
+                      0.001, -0.001, 3.7337777768059636e-10, 3.7337777768059636e-10,
+                      1.0, -1.0, 0.001, -0.001, 3.7337777768059636e-10,
+                      3.7337777768059636e-10, 1.0,  -1.0, 0.001, -0.001,
+                      3.7337777768059636e-10, 3.7337777768059636e-10, 1.0, -1.0, 0.001,
+                      -0.001, 3.7337777768059636e-10,  3.7337777768059636e-10, 1.0,
+                      -1.0, 0.001, -0.001, 3.7337777768059636e-10,
+                      3.7337777768059636e-10, 1.0, -1.0]
+        eq_indizes = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10,
+                      11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 16,
+                      16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21,
+                      22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26,
+                      27, 27, 28, 28, 28, 28, 29, 29, 30, 30, 30, 30, 31, 31]
+        eq_vars = [15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 29, 28, 31,
+                   30, 13, 1, 0, 32, 3, 14, 13, 4, 0, 4, 0, 32, 31, 2, 12, 2, 12, 16,
+                   15, 5, 4, 5, 4, 18, 17, 6, 5, 6, 5, 20, 19, 7, 6, 7, 6, 22, 21, 8,
+                   7, 8, 7, 24, 23, 9, 8, 9, 8, 26, 25, 10, 9, 10, 9, 28, 27, 11, 10,
+                   11, 10, 30, 29, 12, 11, 12, 11]
+        eq_values = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9000000.0, 0.0,
+                     0.006587392118285457, -5032.197406716549, 0.0041860502789104696,
+                     -7918.93439542944, 0.0063205763583549035, -5244.625751707402,
+                     0.006053760598424349, -5475.7793929428, 0.005786944838493795,
+                     -5728.248403917573, 0.0055201290785632405, -6005.123623538355,
+                     0.005253313318632687, -6310.123825488683, 0.004986497558702133,
+                     -6647.763714796453, 0.004719681798771578, -7023.578908071522,
+                     0.004452866038841024, -7444.431798646482]
+        coefficients = [0.0, 0.0, 0.0, -0.011816666666666668, 0.0, 0.0, 0.0, 0.0, 0.0,
+                        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+                        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
+        np_eq_entries = np.asarray(eq_entries, dtype=np.float64)
+        np_eq_indizes = np.asarray(eq_indizes, dtype=np.int32)
+        np_eq_vars = np.asarray(eq_vars, dtype=np.int32)
+
+        a_eq=  scipy.sparse.csr_array((np_eq_entries,(np_eq_indizes, np_eq_vars)),
+                                      shape=(32, 33))
+        b_eq = np.asarray(eq_values, dtype=np.float64)
+        c = np.asarray(coefficients, dtype=np.float64)
+
+        result = scipy.optimize.linprog(c, A_ub=None, b_ub=None, A_eq=a_eq, b_eq=b_eq,
+                                        bounds=boundaries)
+        assert result.status==0
+        x = result.x
+        n_r_x = np.linalg.norm(a_eq @ x - b_eq)
+        n_r = np.linalg.norm(result.eqlin.residual)
+        assert_allclose(n_r, n_r_x)
+
+
+################################
+# Simplex Option-Specific Tests#
+################################
+
+
+class TestLinprogSimplexDefault(LinprogSimplexTests):
+
+    def setup_method(self):
+        self.options = {}
+
+    def test_bug_5400(self):
+        pytest.skip("Simplex fails on this problem.")
+
+    def test_bug_7237_low_tol(self):
+        # Fails if the tolerance is too strict. Here, we test that
+        # even if the solution is wrong, the appropriate error is raised.
+        pytest.skip("Simplex fails on this problem.")
+
+    @pytest.mark.thread_unsafe
+    def test_bug_8174_low_tol(self):
+        # Fails if the tolerance is too strict. Here, we test that
+        # even if the solution is wrong, the appropriate warning is issued.
+        self.options.update({'tol': 1e-12})
+        with pytest.warns(OptimizeWarning):
+            super().test_bug_8174()
+
+
+class TestLinprogSimplexBland(LinprogSimplexTests):
+
+    def setup_method(self):
+        self.options = {'bland': True}
+
+    def test_bug_5400(self):
+        pytest.skip("Simplex fails on this problem.")
+
+    @pytest.mark.thread_unsafe
+    def test_bug_8174_low_tol(self):
+        # Fails if the tolerance is too strict. Here, we test that
+        # even if the solution is wrong, the appropriate error is raised.
+        self.options.update({'tol': 1e-12})
+        with pytest.raises(AssertionError):
+            with pytest.warns(OptimizeWarning):
+                super().test_bug_8174()
+
+
+class TestLinprogSimplexNoPresolve(LinprogSimplexTests):
+
+    def setup_method(self):
+        self.options = {'presolve': False}
+
+    is_32_bit = np.intp(0).itemsize < 8
+    is_linux = sys.platform.startswith('linux')
+
+    @pytest.mark.xfail(
+        condition=is_32_bit and is_linux,
+        reason='Fails with warning on 32-bit linux')
+    def test_bug_5400(self):
+        super().test_bug_5400()
+
+    def test_bug_6139_low_tol(self):
+        # Linprog(method='simplex') fails to find a basic feasible solution
+        # if phase 1 pseudo-objective function is outside the provided tol.
+        # https://github.com/scipy/scipy/issues/6139
+        # Without ``presolve`` eliminating such rows the result is incorrect.
+        self.options.update({'tol': 1e-12})
+        with pytest.raises(AssertionError, match='linprog status 4'):
+            return super().test_bug_6139()
+
+    def test_bug_7237_low_tol(self):
+        pytest.skip("Simplex fails on this problem.")
+
+    @pytest.mark.thread_unsafe
+    def test_bug_8174_low_tol(self):
+        # Fails if the tolerance is too strict. Here, we test that
+        # even if the solution is wrong, the appropriate warning is issued.
+        self.options.update({'tol': 1e-12})
+        with pytest.warns(OptimizeWarning):
+            super().test_bug_8174()
+
+    def test_unbounded_no_nontrivial_constraints_1(self):
+        pytest.skip("Tests behavior specific to presolve")
+
+    def test_unbounded_no_nontrivial_constraints_2(self):
+        pytest.skip("Tests behavior specific to presolve")
+
+
+#######################################
+# Interior-Point Option-Specific Tests#
+#######################################
+
+
+class TestLinprogIPDense(LinprogIPTests):
+    options = {"sparse": False}
+
+    # see https://github.com/scipy/scipy/issues/20216 for skip reason
+    @pytest.mark.skipif(
+        sys.platform == 'darwin',
+        reason="Fails on some macOS builds for reason not relevant to test"
+    )
+    def test_bug_6139(self):
+        super().test_bug_6139()
+
+if has_cholmod:
+    class TestLinprogIPSparseCholmod(LinprogIPTests):
+        options = {"sparse": True, "cholesky": True}
+
+
+if has_umfpack:
+    class TestLinprogIPSparseUmfpack(LinprogIPTests):
+        options = {"sparse": True, "cholesky": False}
+
+        def test_network_flow_limited_capacity(self):
+            pytest.skip("Failing due to numerical issues on some platforms.")
+
+
+class TestLinprogIPSparse(LinprogIPTests):
+    options = {"sparse": True, "cholesky": False, "sym_pos": False}
+
+    @pytest.mark.skipif(
+        sys.platform == 'darwin',
+        reason="Fails on macOS x86 Accelerate builds (gh-20510)"
+    )
+    @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
+                                "perturbations in linear system solution in "
+                                "_linprog_ip._sym_solve.")
+    def test_bug_6139(self):
+        super().test_bug_6139()
+
+    @pytest.mark.xfail(reason='Fails with ATLAS, see gh-7877')
+    def test_bug_6690(self):
+        # Test defined in base class, but can't mark as xfail there
+        super().test_bug_6690()
+
+    def test_magic_square_sparse_no_presolve(self):
+        # test linprog with a problem with a rank-deficient A_eq matrix
+        A_eq, b_eq, c, _, _ = magic_square(3)
+        bounds = (0, 1)
+
+        with suppress_warnings() as sup:
+            if has_umfpack:
+                sup.filter(UmfpackWarning)
+            sup.filter(MatrixRankWarning, "Matrix is exactly singular")
+            sup.filter(OptimizeWarning, "Solving system with option...")
+
+            o = {key: self.options[key] for key in self.options}
+            o["presolve"] = False
+
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options=o)
+        _assert_success(res, desired_fun=1.730550597)
+
+    def test_sparse_solve_options(self):
+        # checking that problem is solved with all column permutation options
+        A_eq, b_eq, c, _, _ = magic_square(3)
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            sup.filter(OptimizeWarning, "Invalid permc_spec option")
+            o = {key: self.options[key] for key in self.options}
+            permc_specs = ('NATURAL', 'MMD_ATA', 'MMD_AT_PLUS_A',
+                           'COLAMD', 'ekki-ekki-ekki')
+            # 'ekki-ekki-ekki' raises warning about invalid permc_spec option
+            # and uses default
+            for permc_spec in permc_specs:
+                o["permc_spec"] = permc_spec
+                res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                              method=self.method, options=o)
+                _assert_success(res, desired_fun=1.730550597)
+
+
+class TestLinprogIPSparsePresolve(LinprogIPTests):
+    options = {"sparse": True, "_sparse_presolve": True}
+
+    @pytest.mark.skipif(
+        sys.platform == 'darwin',
+        reason="Fails on macOS x86 Accelerate builds (gh-20510)"
+    )
+    @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
+                                "perturbations in linear system solution in "
+                                "_linprog_ip._sym_solve.")
+    def test_bug_6139(self):
+        super().test_bug_6139()
+
+    def test_enzo_example_c_with_infeasibility(self):
+        pytest.skip('_sparse_presolve=True incompatible with presolve=False')
+
+    @pytest.mark.xfail(reason='Fails with ATLAS, see gh-7877')
+    def test_bug_6690(self):
+        # Test defined in base class, but can't mark as xfail there
+        super().test_bug_6690()
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class TestLinprogIPSpecific:
+    method = "interior-point"
+    # the following tests don't need to be performed separately for
+    # sparse presolve, sparse after presolve, and dense
+
+    def test_solver_select(self):
+        # check that default solver is selected as expected
+        if has_cholmod:
+            options = {'sparse': True, 'cholesky': True}
+        elif has_umfpack:
+            options = {'sparse': True, 'cholesky': False}
+        else:
+            options = {'sparse': True, 'cholesky': False, 'sym_pos': False}
+        A, b, c = lpgen_2d(20, 20)
+        res1 = linprog(c, A_ub=A, b_ub=b, method=self.method, options=options)
+        res2 = linprog(c, A_ub=A, b_ub=b, method=self.method)  # default solver
+        assert_allclose(res1.fun, res2.fun,
+                        err_msg="linprog default solver unexpected result",
+                        rtol=2e-15, atol=1e-15)
+
+    def test_unbounded_below_no_presolve_original(self):
+        # formerly caused segfault in TravisCI w/ "cholesky":True
+        c = [-1]
+        bounds = [(None, 1)]
+        res = linprog(c=c, bounds=bounds,
+                      method=self.method,
+                      options={"presolve": False, "cholesky": True})
+        _assert_success(res, desired_fun=-1)
+
+    def test_cholesky(self):
+        # use cholesky factorization and triangular solves
+        A, b, c = lpgen_2d(20, 20)
+        res = linprog(c, A_ub=A, b_ub=b, method=self.method,
+                      options={"cholesky": True})  # only for dense
+        _assert_success(res, desired_fun=-64.049494229)
+
+    def test_alternate_initial_point(self):
+        # use "improved" initial point
+        A, b, c = lpgen_2d(20, 20)
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning, "scipy.linalg.solve\nIll...")
+            sup.filter(OptimizeWarning, "Solving system with option...")
+            sup.filter(LinAlgWarning, "Ill-conditioned matrix...")
+            res = linprog(c, A_ub=A, b_ub=b, method=self.method,
+                          options={"ip": True, "disp": True})
+            # ip code is independent of sparse/dense
+        _assert_success(res, desired_fun=-64.049494229)
+
+    def test_bug_8664(self):
+        # interior-point has trouble with this when presolve is off
+        c = [4]
+        A_ub = [[2], [5]]
+        b_ub = [4, 4]
+        A_eq = [[0], [-8], [9]]
+        b_eq = [3, 2, 10]
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning)
+            sup.filter(OptimizeWarning, "Solving system with option...")
+            res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                          method=self.method, options={"presolve": False})
+        assert_(not res.success, "Incorrectly reported success")
+
+
+########################################
+# Revised Simplex Option-Specific Tests#
+########################################
+
+
+class TestLinprogRSCommon(LinprogRSTests):
+    options = {}
+
+    def test_cyclic_bland(self):
+        pytest.skip("Intermittent failure acceptable.")
+
+    def test_nontrivial_problem_with_guess(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=x_star)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+        assert_equal(res.nit, 0)
+
+    def test_nontrivial_problem_with_unbounded_variables(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        bounds = [(None, None), (None, None), (0, None), (None, None)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=x_star)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+        assert_equal(res.nit, 0)
+
+    def test_nontrivial_problem_with_bounded_variables(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        bounds = [(None, 1), (1, None), (0, None), (.4, .6)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=x_star)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+        assert_equal(res.nit, 0)
+
+    def test_nontrivial_problem_with_negative_unbounded_variable(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        b_eq = [4]
+        x_star = np.array([-219/385, 582/385, 0, 4/10])
+        f_star = 3951/385
+        bounds = [(None, None), (1, None), (0, None), (.4, .6)]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=x_star)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+        assert_equal(res.nit, 0)
+
+    def test_nontrivial_problem_with_bad_guess(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        bad_guess = [1, 2, 3, .5]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=bad_guess)
+        assert_equal(res.status, 6)
+
+    def test_redundant_constraints_with_guess(self):
+        A, b, c, _, _ = magic_square(3)
+        p = np.random.rand(*c.shape)
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning, "A_eq does not appear...")
+            sup.filter(RuntimeWarning, "invalid value encountered")
+            sup.filter(LinAlgWarning)
+            res = linprog(c, A_eq=A, b_eq=b, method=self.method)
+            res2 = linprog(c, A_eq=A, b_eq=b, method=self.method, x0=res.x)
+            res3 = linprog(c + p, A_eq=A, b_eq=b, method=self.method, x0=res.x)
+        _assert_success(res2, desired_fun=1.730550597)
+        assert_equal(res2.nit, 0)
+        _assert_success(res3)
+        assert_(res3.nit < res.nit)  # hot start reduces iterations
+
+
+class TestLinprogRSBland(LinprogRSTests):
+    options = {"pivot": "bland"}
+
+
+############################################
+# HiGHS-Simplex-Dual Option-Specific Tests #
+############################################
+
+
+class TestLinprogHiGHSSimplexDual(LinprogHiGHSTests):
+    method = "highs-ds"
+    options = {}
+
+    def test_lad_regression(self):
+        '''
+        The scaled model should be optimal, i.e. not produce unscaled model
+        infeasible.  See https://github.com/ERGO-Code/HiGHS/issues/494.
+        '''
+        # Test to ensure gh-13610 is resolved (mismatch between HiGHS scaled
+        # and unscaled model statuses)
+        c, A_ub, b_ub, bnds = l1_regression_prob()
+        res = linprog(c, A_ub=A_ub, b_ub=b_ub, bounds=bnds,
+                      method=self.method, options=self.options)
+        assert_equal(res.status, 0)
+        assert_(res.x is not None)
+        assert_(np.all(res.slack > -1e-6))
+        assert_(np.all(res.x <= [np.inf if ub is None else ub
+                                 for lb, ub in bnds]))
+        assert_(np.all(res.x >= [-np.inf if lb is None else lb - 1e-7
+                                 for lb, ub in bnds]))
+
+
+###################################
+# HiGHS-IPM Option-Specific Tests #
+###################################
+
+
+class TestLinprogHiGHSIPM(LinprogHiGHSTests):
+    method = "highs-ipm"
+    options = {}
+
+
+###################################
+# HiGHS-MIP Option-Specific Tests #
+###################################
+
+
+class TestLinprogHiGHSMIP:
+    method = "highs"
+    options = {}
+
+    @pytest.mark.fail_slow(10)
+    @pytest.mark.xfail(condition=(sys.maxsize < 2 ** 32 and
+                       platform.system() == "Linux"),
+                       run=False,
+                       reason="gh-16347")
+    def test_mip1(self):
+        # solve non-relaxed magic square problem (finally!)
+        # also check that values are all integers - they don't always
+        # come out of HiGHS that way
+        n = 4
+        A, b, c, numbers, M = magic_square(n)
+        bounds = [(0, 1)] * len(c)
+        integrality = [1] * len(c)
+
+        res = linprog(c=c*0, A_eq=A, b_eq=b, bounds=bounds,
+                      method=self.method, integrality=integrality)
+
+        s = (numbers.flatten() * res.x).reshape(n**2, n, n)
+        square = np.sum(s, axis=0)
+        np.testing.assert_allclose(square.sum(axis=0), M)
+        np.testing.assert_allclose(square.sum(axis=1), M)
+        np.testing.assert_allclose(np.diag(square).sum(), M)
+        np.testing.assert_allclose(np.diag(square[:, ::-1]).sum(), M)
+
+        np.testing.assert_allclose(res.x, np.round(res.x), atol=1e-12)
+
+    def test_mip2(self):
+        # solve MIP with inequality constraints and all integer constraints
+        # source: slide 5,
+        # https://www.cs.upc.edu/~erodri/webpage/cps/theory/lp/milp/slides.pdf
+
+        # use all array inputs to test gh-16681 (integrality couldn't be array)
+        A_ub = np.array([[2, -2], [-8, 10]])
+        b_ub = np.array([-1, 13])
+        c = -np.array([1, 1])
+
+        bounds = np.array([(0, np.inf)] * len(c))
+        integrality = np.ones_like(c)
+
+        res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, bounds=bounds,
+                      method=self.method, integrality=integrality)
+
+        np.testing.assert_allclose(res.x, [1, 2])
+        np.testing.assert_allclose(res.fun, -3)
+
+    def test_mip3(self):
+        # solve MIP with inequality constraints and all integer constraints
+        # source: https://en.wikipedia.org/wiki/Integer_programming#Example
+        A_ub = np.array([[-1, 1], [3, 2], [2, 3]])
+        b_ub = np.array([1, 12, 12])
+        c = -np.array([0, 1])
+
+        bounds = [(0, np.inf)] * len(c)
+        integrality = [1] * len(c)
+
+        res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, bounds=bounds,
+                      method=self.method, integrality=integrality)
+
+        np.testing.assert_allclose(res.fun, -2)
+        # two optimal solutions possible, just need one of them
+        assert np.allclose(res.x, [1, 2]) or np.allclose(res.x, [2, 2])
+
+    def test_mip4(self):
+        # solve MIP with inequality constraints and only one integer constraint
+        # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+        A_ub = np.array([[-1, -2], [-4, -1], [2, 1]])
+        b_ub = np.array([14, -33, 20])
+        c = np.array([8, 1])
+
+        bounds = [(0, np.inf)] * len(c)
+        integrality = [0, 1]
+
+        res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, bounds=bounds,
+                      method=self.method, integrality=integrality)
+
+        np.testing.assert_allclose(res.x, [6.5, 7])
+        np.testing.assert_allclose(res.fun, 59)
+
+    def test_mip5(self):
+        # solve MIP with inequality and inequality constraints
+        # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+        A_ub = np.array([[1, 1, 1]])
+        b_ub = np.array([7])
+        A_eq = np.array([[4, 2, 1]])
+        b_eq = np.array([12])
+        c = np.array([-3, -2, -1])
+
+        bounds = [(0, np.inf), (0, np.inf), (0, 1)]
+        integrality = [0, 1, 0]
+
+        res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                      bounds=bounds, method=self.method,
+                      integrality=integrality)
+
+        np.testing.assert_allclose(res.x, [0, 6, 0])
+        np.testing.assert_allclose(res.fun, -12)
+
+        # gh-16897: these fields were not present, ensure that they are now
+        assert res.get("mip_node_count", None) is not None
+        assert res.get("mip_dual_bound", None) is not None
+        assert res.get("mip_gap", None) is not None
+
+    @pytest.mark.xslow
+    def test_mip6(self):
+        # solve a larger MIP with only equality constraints
+        # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+        A_eq = np.array([[22, 13, 26, 33, 21, 3, 14, 26],
+                         [39, 16, 22, 28, 26, 30, 23, 24],
+                         [18, 14, 29, 27, 30, 38, 26, 26],
+                         [41, 26, 28, 36, 18, 38, 16, 26]])
+        b_eq = np.array([7872, 10466, 11322, 12058])
+        c = np.array([2, 10, 13, 17, 7, 5, 7, 3])
+
+        bounds = [(0, np.inf)]*8
+        integrality = [1]*8
+
+        res = linprog(c=c, A_eq=A_eq, b_eq=b_eq, bounds=bounds,
+                      method=self.method, integrality=integrality)
+
+        np.testing.assert_allclose(res.fun, 1854)
+
+    @pytest.mark.xslow
+    def test_mip_rel_gap_passdown(self):
+        # MIP taken from test_mip6, solved with different values of mip_rel_gap
+        # solve a larger MIP with only equality constraints
+        # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+        A_eq = np.array([[22, 13, 26, 33, 21, 3, 14, 26],
+                         [39, 16, 22, 28, 26, 30, 23, 24],
+                         [18, 14, 29, 27, 30, 38, 26, 26],
+                         [41, 26, 28, 36, 18, 38, 16, 26]])
+        b_eq = np.array([7872, 10466, 11322, 12058])
+        c = np.array([2, 10, 13, 17, 7, 5, 7, 3])
+
+        bounds = [(0, np.inf)]*8
+        integrality = [1]*8
+
+        mip_rel_gaps = [0.5, 0.25, 0.01, 0.001]
+        sol_mip_gaps = []
+        for mip_rel_gap in mip_rel_gaps:
+            res = linprog(c=c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq,
+                          bounds=bounds, method=self.method,
+                          integrality=integrality,
+                          options={"mip_rel_gap": mip_rel_gap})
+            final_mip_gap = res["mip_gap"]
+            # assert that the solution actually has mip_gap lower than the
+            # required mip_rel_gap supplied
+            assert final_mip_gap <= mip_rel_gap
+            sol_mip_gaps.append(final_mip_gap)
+
+        # make sure that the mip_rel_gap parameter is actually doing something
+        # check that differences between solution gaps are declining
+        # monotonically with the mip_rel_gap parameter. np.diff does
+        # x[i+1] - x[i], so flip the array before differencing to get
+        # what should be a positive, monotone decreasing series of solution
+        # gaps
+        gap_diffs = np.diff(np.flip(sol_mip_gaps))
+        assert np.all(gap_diffs >= 0)
+        assert not np.all(gap_diffs == 0)
+
+    def test_semi_continuous(self):
+        # See issue #18106. This tests whether the solution is being
+        # checked correctly (status is 0) when integrality > 1:
+        # values are allowed to be 0 even if 0 is out of bounds.
+
+        c = np.array([1., 1., -1, -1])
+        bounds = np.array([[0.5, 1.5], [0.5, 1.5], [0.5, 1.5], [0.5, 1.5]])
+        integrality = np.array([2, 3, 2, 3])
+
+        res = linprog(c, bounds=bounds,
+                      integrality=integrality, method='highs')
+
+        np.testing.assert_allclose(res.x, [0, 0, 1.5, 1])
+        assert res.status == 0
+
+    def test_bug_20584(self):
+        """
+        Test that when integrality is a list of all zeros, linprog gives the
+        same result as when it is an array of all zeros / integrality=None
+        """
+        c = [1, 1]
+        A_ub = [[-1, 0]]
+        b_ub = [-2.5]
+        res1 = linprog(c, A_ub=A_ub, b_ub=b_ub, integrality=[0, 0])
+        res2 = linprog(c, A_ub=A_ub, b_ub=b_ub, integrality=np.asarray([0, 0]))
+        res3 = linprog(c, A_ub=A_ub, b_ub=b_ub, integrality=None)
+        assert_equal(res1.x, res2.x)
+        assert_equal(res1.x, res3.x)
+
+
+###########################
+# Autoscale-Specific Tests#
+###########################
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class AutoscaleTests:
+    options = {"autoscale": True}
+
+    test_bug_6139 = LinprogCommonTests.test_bug_6139
+    test_bug_6690 = LinprogCommonTests.test_bug_6690
+    test_bug_7237 = LinprogCommonTests.test_bug_7237
+
+
+class TestAutoscaleIP(AutoscaleTests):
+    method = "interior-point"
+
+    def test_bug_6139(self):
+        self.options['tol'] = 1e-10
+        return AutoscaleTests.test_bug_6139(self)
+
+
+class TestAutoscaleSimplex(AutoscaleTests):
+    method = "simplex"
+
+
+class TestAutoscaleRS(AutoscaleTests):
+    method = "revised simplex"
+
+    def test_nontrivial_problem_with_guess(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=x_star)
+        _assert_success(res, desired_fun=f_star, desired_x=x_star)
+        assert_equal(res.nit, 0)
+
+    def test_nontrivial_problem_with_bad_guess(self):
+        c, A_ub, b_ub, A_eq, b_eq, x_star, f_star = nontrivial_problem()
+        bad_guess = [1, 2, 3, .5]
+        res = linprog(c, A_ub, b_ub, A_eq, b_eq, bounds,
+                      method=self.method, options=self.options, x0=bad_guess)
+        assert_equal(res.status, 6)
+
+
+###########################
+# Redundancy Removal Tests#
+###########################
+
+
+@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+class RRTests:
+    method = "interior-point"
+    LCT = LinprogCommonTests
+    # these are a few of the existing tests that have redundancy
+    test_RR_infeasibility = LCT.test_remove_redundancy_infeasibility
+    test_bug_10349 = LCT.test_bug_10349
+    test_bug_7044 = LCT.test_bug_7044
+    test_NFLC = LCT.test_network_flow_limited_capacity
+    test_enzo_example_b = LCT.test_enzo_example_b
+
+
+class TestRRSVD(RRTests):
+    options = {"rr_method": "SVD"}
+
+
+class TestRRPivot(RRTests):
+    options = {"rr_method": "pivot"}
+
+
+class TestRRID(RRTests):
+    options = {"rr_method": "ID"}
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_common.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_common.py
new file mode 100644
index 0000000000000000000000000000000000000000..650deedce88b6babd8a3f2b62a5839f1a6cb966c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_common.py
@@ -0,0 +1,297 @@
+from numpy.testing import assert_, assert_allclose, assert_equal
+from pytest import raises as assert_raises
+import numpy as np
+
+from scipy.optimize._lsq.common import (
+    step_size_to_bound, find_active_constraints, make_strictly_feasible,
+    CL_scaling_vector, intersect_trust_region, build_quadratic_1d,
+    minimize_quadratic_1d, evaluate_quadratic, reflective_transformation,
+    left_multiplied_operator, right_multiplied_operator)
+
+
+class TestBounds:
+    def test_step_size_to_bounds(self):
+        lb = np.array([-1.0, 2.5, 10.0])
+        ub = np.array([1.0, 5.0, 100.0])
+        x = np.array([0.0, 2.5, 12.0])
+
+        s = np.array([0.1, 0.0, 0.0])
+        step, hits = step_size_to_bound(x, s, lb, ub)
+        assert_equal(step, 10)
+        assert_equal(hits, [1, 0, 0])
+
+        s = np.array([0.01, 0.05, -1.0])
+        step, hits = step_size_to_bound(x, s, lb, ub)
+        assert_equal(step, 2)
+        assert_equal(hits, [0, 0, -1])
+
+        s = np.array([10.0, -0.0001, 100.0])
+        step, hits = step_size_to_bound(x, s, lb, ub)
+        assert_equal(step, np.array(-0))
+        assert_equal(hits, [0, -1, 0])
+
+        s = np.array([1.0, 0.5, -2.0])
+        step, hits = step_size_to_bound(x, s, lb, ub)
+        assert_equal(step, 1.0)
+        assert_equal(hits, [1, 0, -1])
+
+        s = np.zeros(3)
+        step, hits = step_size_to_bound(x, s, lb, ub)
+        assert_equal(step, np.inf)
+        assert_equal(hits, [0, 0, 0])
+
+    def test_find_active_constraints(self):
+        lb = np.array([0.0, -10.0, 1.0])
+        ub = np.array([1.0, 0.0, 100.0])
+
+        x = np.array([0.5, -5.0, 2.0])
+        active = find_active_constraints(x, lb, ub)
+        assert_equal(active, [0, 0, 0])
+
+        x = np.array([0.0, 0.0, 10.0])
+        active = find_active_constraints(x, lb, ub)
+        assert_equal(active, [-1, 1, 0])
+
+        active = find_active_constraints(x, lb, ub, rtol=0)
+        assert_equal(active, [-1, 1, 0])
+
+        x = np.array([1e-9, -1e-8, 100 - 1e-9])
+        active = find_active_constraints(x, lb, ub)
+        assert_equal(active, [0, 0, 1])
+
+        active = find_active_constraints(x, lb, ub, rtol=1.5e-9)
+        assert_equal(active, [-1, 0, 1])
+
+        lb = np.array([1.0, -np.inf, -np.inf])
+        ub = np.array([np.inf, 10.0, np.inf])
+
+        x = np.ones(3)
+        active = find_active_constraints(x, lb, ub)
+        assert_equal(active, [-1, 0, 0])
+
+        # Handles out-of-bound cases.
+        x = np.array([0.0, 11.0, 0.0])
+        active = find_active_constraints(x, lb, ub)
+        assert_equal(active, [-1, 1, 0])
+
+        active = find_active_constraints(x, lb, ub, rtol=0)
+        assert_equal(active, [-1, 1, 0])
+
+    def test_make_strictly_feasible(self):
+        lb = np.array([-0.5, -0.8, 2.0])
+        ub = np.array([0.8, 1.0, 3.0])
+
+        x = np.array([-0.5, 0.0, 2 + 1e-10])
+
+        x_new = make_strictly_feasible(x, lb, ub, rstep=0)
+        assert_(x_new[0] > -0.5)
+        assert_equal(x_new[1:], x[1:])
+
+        x_new = make_strictly_feasible(x, lb, ub, rstep=1e-4)
+        assert_equal(x_new, [-0.5 + 1e-4, 0.0, 2 * (1 + 1e-4)])
+
+        x = np.array([-0.5, -1, 3.1])
+        x_new = make_strictly_feasible(x, lb, ub)
+        assert_(np.all((x_new >= lb) & (x_new <= ub)))
+
+        x_new = make_strictly_feasible(x, lb, ub, rstep=0)
+        assert_(np.all((x_new >= lb) & (x_new <= ub)))
+
+        lb = np.array([-1, 100.0])
+        ub = np.array([1, 100.0 + 1e-10])
+        x = np.array([0, 100.0])
+        x_new = make_strictly_feasible(x, lb, ub, rstep=1e-8)
+        assert_equal(x_new, [0, 100.0 + 0.5e-10])
+
+    def test_scaling_vector(self):
+        lb = np.array([-np.inf, -5.0, 1.0, -np.inf])
+        ub = np.array([1.0, np.inf, 10.0, np.inf])
+        x = np.array([0.5, 2.0, 5.0, 0.0])
+        g = np.array([1.0, 0.1, -10.0, 0.0])
+        v, dv = CL_scaling_vector(x, g, lb, ub)
+        assert_equal(v, [1.0, 7.0, 5.0, 1.0])
+        assert_equal(dv, [0.0, 1.0, -1.0, 0.0])
+
+
+class TestQuadraticFunction:
+    def setup_method(self):
+        self.J = np.array([
+            [0.1, 0.2],
+            [-1.0, 1.0],
+            [0.5, 0.2]])
+        self.g = np.array([0.8, -2.0])
+        self.diag = np.array([1.0, 2.0])
+
+    def test_build_quadratic_1d(self):
+        s = np.zeros(2)
+        a, b = build_quadratic_1d(self.J, self.g, s)
+        assert_equal(a, 0)
+        assert_equal(b, 0)
+
+        a, b = build_quadratic_1d(self.J, self.g, s, diag=self.diag)
+        assert_equal(a, 0)
+        assert_equal(b, 0)
+
+        s = np.array([1.0, -1.0])
+        a, b = build_quadratic_1d(self.J, self.g, s)
+        assert_equal(a, 2.05)
+        assert_equal(b, 2.8)
+
+        a, b = build_quadratic_1d(self.J, self.g, s, diag=self.diag)
+        assert_equal(a, 3.55)
+        assert_equal(b, 2.8)
+
+        s0 = np.array([0.5, 0.5])
+        a, b, c = build_quadratic_1d(self.J, self.g, s, diag=self.diag, s0=s0)
+        assert_equal(a, 3.55)
+        assert_allclose(b, 2.39)
+        assert_allclose(c, -0.1525)
+
+    def test_minimize_quadratic_1d(self):
+        a = 5
+        b = -1
+
+        t, y = minimize_quadratic_1d(a, b, 1, 2)
+        assert_equal(t, 1)
+        assert_allclose(y, a * t**2 + b * t, rtol=1e-15)
+
+        t, y = minimize_quadratic_1d(a, b, -2, -1)
+        assert_equal(t, -1)
+        assert_allclose(y, a * t**2 + b * t, rtol=1e-15)
+
+        t, y = minimize_quadratic_1d(a, b, -1, 1)
+        assert_equal(t, 0.1)
+        assert_allclose(y, a * t**2 + b * t, rtol=1e-15)
+
+        c = 10
+        t, y = minimize_quadratic_1d(a, b, -1, 1, c=c)
+        assert_equal(t, 0.1)
+        assert_allclose(y, a * t**2 + b * t + c, rtol=1e-15)
+
+        t, y = minimize_quadratic_1d(a, b, -np.inf, np.inf, c=c)
+        assert_equal(t, 0.1)
+        assert_allclose(y, a * t ** 2 + b * t + c, rtol=1e-15)
+
+        t, y = minimize_quadratic_1d(a, b, 0, np.inf, c=c)
+        assert_equal(t, 0.1)
+        assert_allclose(y, a * t ** 2 + b * t + c, rtol=1e-15)
+
+        t, y = minimize_quadratic_1d(a, b, -np.inf, 0, c=c)
+        assert_equal(t, 0)
+        assert_allclose(y, a * t ** 2 + b * t + c, rtol=1e-15)
+
+        a = -1
+        b = 0.2
+        t, y = minimize_quadratic_1d(a, b, -np.inf, np.inf)
+        assert_equal(y, -np.inf)
+
+        t, y = minimize_quadratic_1d(a, b, 0, np.inf)
+        assert_equal(t, np.inf)
+        assert_equal(y, -np.inf)
+
+        t, y = minimize_quadratic_1d(a, b, -np.inf, 0)
+        assert_equal(t, -np.inf)
+        assert_equal(y, -np.inf)
+
+    def test_evaluate_quadratic(self):
+        s = np.array([1.0, -1.0])
+
+        value = evaluate_quadratic(self.J, self.g, s)
+        assert_equal(value, 4.85)
+
+        value = evaluate_quadratic(self.J, self.g, s, diag=self.diag)
+        assert_equal(value, 6.35)
+
+        s = np.array([[1.0, -1.0],
+                     [1.0, 1.0],
+                     [0.0, 0.0]])
+
+        values = evaluate_quadratic(self.J, self.g, s)
+        assert_allclose(values, [4.85, -0.91, 0.0])
+
+        values = evaluate_quadratic(self.J, self.g, s, diag=self.diag)
+        assert_allclose(values, [6.35, 0.59, 0.0])
+
+
+class TestTrustRegion:
+    def test_intersect(self):
+        Delta = 1.0
+
+        x = np.zeros(3)
+        s = np.array([1.0, 0.0, 0.0])
+        t_neg, t_pos = intersect_trust_region(x, s, Delta)
+        assert_equal(t_neg, -1)
+        assert_equal(t_pos, 1)
+
+        s = np.array([-1.0, 1.0, -1.0])
+        t_neg, t_pos = intersect_trust_region(x, s, Delta)
+        assert_allclose(t_neg, -3**-0.5)
+        assert_allclose(t_pos, 3**-0.5)
+
+        x = np.array([0.5, -0.5, 0])
+        s = np.array([0, 0, 1.0])
+        t_neg, t_pos = intersect_trust_region(x, s, Delta)
+        assert_allclose(t_neg, -2**-0.5)
+        assert_allclose(t_pos, 2**-0.5)
+
+        x = np.ones(3)
+        assert_raises(ValueError, intersect_trust_region, x, s, Delta)
+
+        x = np.zeros(3)
+        s = np.zeros(3)
+        assert_raises(ValueError, intersect_trust_region, x, s, Delta)
+
+
+def test_reflective_transformation():
+    lb = np.array([-1, -2], dtype=float)
+    ub = np.array([5, 3], dtype=float)
+
+    y = np.array([0, 0])
+    x, g = reflective_transformation(y, lb, ub)
+    assert_equal(x, y)
+    assert_equal(g, np.ones(2))
+
+    y = np.array([-4, 4], dtype=float)
+
+    x, g = reflective_transformation(y, lb, np.array([np.inf, np.inf]))
+    assert_equal(x, [2, 4])
+    assert_equal(g, [-1, 1])
+
+    x, g = reflective_transformation(y, np.array([-np.inf, -np.inf]), ub)
+    assert_equal(x, [-4, 2])
+    assert_equal(g, [1, -1])
+
+    x, g = reflective_transformation(y, lb, ub)
+    assert_equal(x, [2, 2])
+    assert_equal(g, [-1, -1])
+
+    lb = np.array([-np.inf, -2])
+    ub = np.array([5, np.inf])
+    y = np.array([10, 10], dtype=float)
+    x, g = reflective_transformation(y, lb, ub)
+    assert_equal(x, [0, 10])
+    assert_equal(g, [-1, 1])
+
+
+def test_linear_operators():
+    A = np.arange(6).reshape((3, 2))
+
+    d_left = np.array([-1, 2, 5])
+    DA = np.diag(d_left).dot(A)
+    J_left = left_multiplied_operator(A, d_left)
+
+    d_right = np.array([5, 10])
+    AD = A.dot(np.diag(d_right))
+    J_right = right_multiplied_operator(A, d_right)
+
+    x = np.array([-2, 3])
+    X = -2 * np.arange(2, 8).reshape((2, 3))
+    xt = np.array([0, -2, 15])
+
+    assert_allclose(DA.dot(x), J_left.matvec(x))
+    assert_allclose(DA.dot(X), J_left.matmat(X))
+    assert_allclose(DA.T.dot(xt), J_left.rmatvec(xt))
+
+    assert_allclose(AD.dot(x), J_right.matvec(x))
+    assert_allclose(AD.dot(X), J_right.matmat(X))
+    assert_allclose(AD.T.dot(xt), J_right.rmatvec(xt))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_linear.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_linear.py
new file mode 100644
index 0000000000000000000000000000000000000000..23032e99764ed2e90d7192c078e5cb4518e328fd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_lsq_linear.py
@@ -0,0 +1,287 @@
+import pytest
+
+import numpy as np
+from numpy.linalg import lstsq
+from numpy.testing import assert_allclose, assert_equal, assert_
+
+from scipy.sparse import rand, coo_matrix
+from scipy.sparse.linalg import aslinearoperator
+from scipy.optimize import lsq_linear
+from scipy.optimize._minimize import Bounds
+
+
+A = np.array([
+    [0.171, -0.057],
+    [-0.049, -0.248],
+    [-0.166, 0.054],
+])
+b = np.array([0.074, 1.014, -0.383])
+
+
+class BaseMixin:
+    def setup_method(self):
+        self.rnd = np.random.RandomState(0)
+
+    def test_dense_no_bounds(self):
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, method=self.method, lsq_solver=lsq_solver)
+            assert_allclose(res.x, lstsq(A, b, rcond=-1)[0])
+            assert_allclose(res.x, res.unbounded_sol[0])
+
+    def test_dense_bounds(self):
+        # Solutions for comparison are taken from MATLAB.
+        lb = np.array([-1, -10])
+        ub = np.array([1, 0])
+        unbounded_sol = lstsq(A, b, rcond=-1)[0]
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, lstsq(A, b, rcond=-1)[0])
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+        lb = np.array([0.0, -np.inf])
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, np.inf), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, np.array([0.0, -4.084174437334673]),
+                            atol=1e-6)
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+        lb = np.array([-1, 0])
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, np.inf), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, np.array([0.448427311733504, 0]),
+                            atol=1e-15)
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+        ub = np.array([np.inf, -5])
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (-np.inf, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, np.array([-0.105560998682388, -5]))
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+        ub = np.array([-1, np.inf])
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (-np.inf, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, np.array([-1, -4.181102129483254]))
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+        lb = np.array([0, -4])
+        ub = np.array([1, 0])
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, np.array([0.005236663400791, -4]))
+            assert_allclose(res.unbounded_sol[0], unbounded_sol)
+
+    def test_bounds_variants(self):
+        x = np.array([1, 3])
+        A = self.rnd.uniform(size=(2, 2))
+        b = A@x
+        lb = np.array([1, 1])
+        ub = np.array([2, 2])
+        bounds_old = (lb, ub)
+        bounds_new = Bounds(lb, ub)
+        res_old = lsq_linear(A, b, bounds_old)
+        res_new = lsq_linear(A, b, bounds_new)
+        assert not np.allclose(res_new.x, res_new.unbounded_sol[0])
+        assert_allclose(res_old.x, res_new.x)
+
+    def test_np_matrix(self):
+        # gh-10711
+        with np.testing.suppress_warnings() as sup:
+            sup.filter(PendingDeprecationWarning)
+            A = np.matrix([[20, -4, 0, 2, 3], [10, -2, 1, 0, -1]])
+        k = np.array([20, 15])
+        lsq_linear(A, k)
+
+    def test_dense_rank_deficient(self):
+        A = np.array([[-0.307, -0.184]])
+        b = np.array([0.773])
+        lb = [-0.1, -0.1]
+        ub = [0.1, 0.1]
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.x, [-0.1, -0.1])
+            assert_allclose(res.unbounded_sol[0], lstsq(A, b, rcond=-1)[0])
+
+        A = np.array([
+            [0.334, 0.668],
+            [-0.516, -1.032],
+            [0.192, 0.384],
+        ])
+        b = np.array([-1.436, 0.135, 0.909])
+        lb = [0, -1]
+        ub = [1, -0.5]
+        for lsq_solver in self.lsq_solvers:
+            res = lsq_linear(A, b, (lb, ub), method=self.method,
+                             lsq_solver=lsq_solver)
+            assert_allclose(res.optimality, 0, atol=1e-11)
+            assert_allclose(res.unbounded_sol[0], lstsq(A, b, rcond=-1)[0])
+
+    def test_full_result(self):
+        lb = np.array([0, -4])
+        ub = np.array([1, 0])
+        res = lsq_linear(A, b, (lb, ub), method=self.method)
+
+        assert_allclose(res.x, [0.005236663400791, -4])
+        assert_allclose(res.unbounded_sol[0], lstsq(A, b, rcond=-1)[0])
+
+        r = A.dot(res.x) - b
+        assert_allclose(res.cost, 0.5 * np.dot(r, r))
+        assert_allclose(res.fun, r)
+
+        assert_allclose(res.optimality, 0.0, atol=1e-12)
+        assert_equal(res.active_mask, [0, -1])
+        assert_(res.nit < 15)
+        assert_(res.status == 1 or res.status == 3)
+        assert_(isinstance(res.message, str))
+        assert_(res.success)
+
+    # This is a test for issue #9982.
+    def test_almost_singular(self):
+        A = np.array(
+            [[0.8854232310355122, 0.0365312146937765, 0.0365312146836789],
+             [0.3742460132129041, 0.0130523214078376, 0.0130523214077873],
+             [0.9680633871281361, 0.0319366128718639, 0.0319366128718388]])
+
+        b = np.array(
+            [0.0055029366538097, 0.0026677442422208, 0.0066612514782381])
+
+        result = lsq_linear(A, b, method=self.method)
+        assert_(result.cost < 1.1e-8)
+
+    @pytest.mark.xslow
+    def test_large_rank_deficient(self):
+        np.random.seed(0)
+        n, m = np.sort(np.random.randint(2, 1000, size=2))
+        m *= 2   # make m >> n
+        A = 1.0 * np.random.randint(-99, 99, size=[m, n])
+        b = 1.0 * np.random.randint(-99, 99, size=[m])
+        bounds = 1.0 * np.sort(np.random.randint(-99, 99, size=(2, n)), axis=0)
+        bounds[1, :] += 1.0  # ensure up > lb
+
+        # Make the A matrix strongly rank deficient by replicating some columns
+        w = np.random.choice(n, n)  # Select random columns with duplicates
+        A = A[:, w]
+
+        x_bvls = lsq_linear(A, b, bounds=bounds, method='bvls').x
+        x_trf = lsq_linear(A, b, bounds=bounds, method='trf').x
+
+        cost_bvls = np.sum((A @ x_bvls - b)**2)
+        cost_trf = np.sum((A @ x_trf - b)**2)
+
+        assert_(abs(cost_bvls - cost_trf) < cost_trf*1e-10)
+
+    def test_convergence_small_matrix(self):
+        A = np.array([[49.0, 41.0, -32.0],
+                      [-19.0, -32.0, -8.0],
+                      [-13.0, 10.0, 69.0]])
+        b = np.array([-41.0, -90.0, 47.0])
+        bounds = np.array([[31.0, -44.0, 26.0],
+                           [54.0, -32.0, 28.0]])
+
+        x_bvls = lsq_linear(A, b, bounds=bounds, method='bvls').x
+        x_trf = lsq_linear(A, b, bounds=bounds, method='trf').x
+
+        cost_bvls = np.sum((A @ x_bvls - b)**2)
+        cost_trf = np.sum((A @ x_trf - b)**2)
+
+        assert_(abs(cost_bvls - cost_trf) < cost_trf*1e-10)
+
+
+class SparseMixin:
+    def test_sparse_and_LinearOperator(self):
+        m = 5000
+        n = 1000
+        rng = np.random.RandomState(0)
+        A = rand(m, n, random_state=rng)
+        b = rng.randn(m)
+        res = lsq_linear(A, b)
+        assert_allclose(res.optimality, 0, atol=1e-6)
+
+        A = aslinearoperator(A)
+        res = lsq_linear(A, b)
+        assert_allclose(res.optimality, 0, atol=1e-6)
+
+    @pytest.mark.fail_slow(10)
+    def test_sparse_bounds(self):
+        m = 5000
+        n = 1000
+        rng = np.random.RandomState(0)
+        A = rand(m, n, random_state=rng)
+        b = rng.randn(m)
+        lb = rng.randn(n)
+        ub = lb + 1
+        res = lsq_linear(A, b, (lb, ub))
+        assert_allclose(res.optimality, 0.0, atol=1e-6)
+
+        res = lsq_linear(A, b, (lb, ub), lsmr_tol=1e-13,
+                         lsmr_maxiter=1500)
+        assert_allclose(res.optimality, 0.0, atol=1e-6)
+
+        res = lsq_linear(A, b, (lb, ub), lsmr_tol='auto')
+        assert_allclose(res.optimality, 0.0, atol=1e-6)
+
+    def test_sparse_ill_conditioned(self):
+        # Sparse matrix with condition number of ~4 million
+        data = np.array([1., 1., 1., 1. + 1e-6, 1.])
+        row = np.array([0, 0, 1, 2, 2])
+        col = np.array([0, 2, 1, 0, 2])
+        A = coo_matrix((data, (row, col)), shape=(3, 3))
+
+        # Get the exact solution
+        exact_sol = lsq_linear(A.toarray(), b, lsq_solver='exact')
+
+        # Default lsmr arguments should not fully converge the solution
+        default_lsmr_sol = lsq_linear(A, b, lsq_solver='lsmr')
+        with pytest.raises(AssertionError, match=""):
+            assert_allclose(exact_sol.x, default_lsmr_sol.x)
+
+        # By increasing the maximum lsmr iters, it will converge
+        conv_lsmr = lsq_linear(A, b, lsq_solver='lsmr', lsmr_maxiter=10)
+        assert_allclose(exact_sol.x, conv_lsmr.x)
+
+
+class TestTRF(BaseMixin, SparseMixin):
+    method = 'trf'
+    lsq_solvers = ['exact', 'lsmr']
+
+
+class TestBVLS(BaseMixin):
+    method = 'bvls'
+    lsq_solvers = ['exact']
+
+
+class TestErrorChecking:
+    def test_option_lsmr_tol(self):
+        # Should work with a positive float, string equal to 'auto', or None
+        _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol=1e-2)
+        _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol='auto')
+        _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol=None)
+
+        # Should raise error with negative float, strings
+        # other than 'auto', and integers
+        err_message = "`lsmr_tol` must be None, 'auto', or positive float."
+        with pytest.raises(ValueError, match=err_message):
+            _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol=-0.1)
+        with pytest.raises(ValueError, match=err_message):
+            _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol='foo')
+        with pytest.raises(ValueError, match=err_message):
+            _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_tol=1)
+
+    def test_option_lsmr_maxiter(self):
+        # Should work with positive integers or None
+        _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_maxiter=1)
+        _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_maxiter=None)
+
+        # Should raise error with 0 or negative max iter
+        err_message = "`lsmr_maxiter` must be None or positive integer."
+        with pytest.raises(ValueError, match=err_message):
+            _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_maxiter=0)
+        with pytest.raises(ValueError, match=err_message):
+            _ = lsq_linear(A, b, lsq_solver='lsmr', lsmr_maxiter=-1)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_milp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_milp.py
new file mode 100644
index 0000000000000000000000000000000000000000..165417fa1c0a9799056fd67a7218499c611a673e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_milp.py
@@ -0,0 +1,459 @@
+"""
+Unit test for Mixed Integer Linear Programming
+"""
+import re
+import sys
+
+import numpy as np
+from numpy.testing import assert_allclose, assert_array_equal
+import pytest
+
+from .test_linprog import magic_square
+from scipy.optimize import milp, Bounds, LinearConstraint
+from scipy import sparse
+
+
+_IS_32BIT = (sys.maxsize < 2**32)
+
+def test_milp_iv():
+
+    message = "`c` must be a dense array"
+    with pytest.raises(ValueError, match=message):
+        milp(sparse.coo_array([0, 0]))
+
+    message = "`c` must be a one-dimensional array of finite numbers with"
+    with pytest.raises(ValueError, match=message):
+        milp(np.zeros((3, 4)))
+    with pytest.raises(ValueError, match=message):
+        milp([])
+    with pytest.raises(ValueError, match=message):
+        milp(None)
+
+    message = "`bounds` must be convertible into an instance of..."
+    with pytest.raises(ValueError, match=message):
+        milp(1, bounds=10)
+
+    message = "`constraints` (or each element within `constraints`) must be"
+    with pytest.raises(ValueError, match=re.escape(message)):
+        milp(1, constraints=10)
+    with pytest.raises(ValueError, match=re.escape(message)):
+        milp(np.zeros(3), constraints=([[1, 2, 3]], [2, 3], [2, 3]))
+    with pytest.raises(ValueError, match=re.escape(message)):
+        milp(np.zeros(2), constraints=([[1, 2]], [2], sparse.coo_array([2])))
+
+    message = "The shape of `A` must be (len(b_l), len(c))."
+    with pytest.raises(ValueError, match=re.escape(message)):
+        milp(np.zeros(3), constraints=([[1, 2]], [2], [2]))
+
+    message = "`integrality` must be a dense array"
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2], integrality=sparse.coo_array([1, 2]))
+
+    message = ("`integrality` must contain integers 0-3 and be broadcastable "
+               "to `c.shape`.")
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], integrality=[1, 2])
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], integrality=[1, 5, 3])
+
+    message = "Lower and upper bounds must be dense arrays."
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2], sparse.coo_array([3, 4])))
+
+    message = "`lb`, `ub`, and `keep_feasible` must be broadcastable."
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2], [3, 4, 5]))
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2, 3], [4, 5]))
+
+    message = "`bounds.lb` and `bounds.ub` must contain reals and..."
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2], [3, 4]))
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2, 3], ["3+4", 4, 5]))
+    with pytest.raises(ValueError, match=message):
+        milp([1, 2, 3], bounds=([1, 2, 3], [set(), 4, 5]))
+
+
+@pytest.mark.xfail(run=False,
+                   reason="Needs to be fixed in `_highs_wrapper`")
+def test_milp_options(capsys):
+    # run=False now because of gh-16347
+    message = "Unrecognized options detected: {'ekki'}..."
+    options = {'ekki': True}
+    with pytest.warns(RuntimeWarning, match=message):
+        milp(1, options=options)
+
+    A, b, c, numbers, M = magic_square(3)
+    options = {"disp": True, "presolve": False, "time_limit": 0.05}
+    res = milp(c=c, constraints=(A, b, b), bounds=(0, 1), integrality=1,
+               options=options)
+
+    captured = capsys.readouterr()
+    assert "Presolve is switched off" in captured.out
+    assert "Time Limit Reached" in captured.out
+    assert not res.success
+
+
+def test_result():
+    A, b, c, numbers, M = magic_square(3)
+    res = milp(c=c, constraints=(A, b, b), bounds=(0, 1), integrality=1)
+    assert res.status == 0
+    assert res.success
+    msg = "Optimization terminated successfully. (HiGHS Status 7:"
+    assert res.message.startswith(msg)
+    assert isinstance(res.x, np.ndarray)
+    assert isinstance(res.fun, float)
+    assert isinstance(res.mip_node_count, int)
+    assert isinstance(res.mip_dual_bound, float)
+    assert isinstance(res.mip_gap, float)
+
+    A, b, c, numbers, M = magic_square(6)
+    res = milp(c=c*0, constraints=(A, b, b), bounds=(0, 1), integrality=1,
+               options={'time_limit': 0.05})
+    assert res.status == 1
+    assert not res.success
+    msg = "Time limit reached. (HiGHS Status 13:"
+    assert res.message.startswith(msg)
+    assert (res.fun is res.mip_dual_bound is res.mip_gap
+            is res.mip_node_count is res.x is None)
+
+    res = milp(1, bounds=(1, -1))
+    assert res.status == 2
+    assert not res.success
+    msg = "The problem is infeasible. (HiGHS Status 8:"
+    assert res.message.startswith(msg)
+    assert (res.fun is res.mip_dual_bound is res.mip_gap
+            is res.mip_node_count is res.x is None)
+
+    res = milp(-1)
+    assert res.status == 3
+    assert not res.success
+    msg = "The problem is unbounded. (HiGHS Status 10:"
+    assert res.message.startswith(msg)
+    assert (res.fun is res.mip_dual_bound is res.mip_gap
+            is res.mip_node_count is res.x is None)
+
+
+def test_milp_optional_args():
+    # check that arguments other than `c` are indeed optional
+    res = milp(1)
+    assert res.fun == 0
+    assert_array_equal(res.x, [0])
+
+
+def test_milp_1():
+    # solve magic square problem
+    n = 3
+    A, b, c, numbers, M = magic_square(n)
+    A = sparse.csc_array(A)  # confirm that sparse arrays are accepted
+    res = milp(c=c*0, constraints=(A, b, b), bounds=(0, 1), integrality=1)
+
+    # check that solution is a magic square
+    x = np.round(res.x)
+    s = (numbers.flatten() * x).reshape(n**2, n, n)
+    square = np.sum(s, axis=0)
+    np.testing.assert_allclose(square.sum(axis=0), M)
+    np.testing.assert_allclose(square.sum(axis=1), M)
+    np.testing.assert_allclose(np.diag(square).sum(), M)
+    np.testing.assert_allclose(np.diag(square[:, ::-1]).sum(), M)
+
+
+def test_milp_2():
+    # solve MIP with inequality constraints and all integer constraints
+    # source: slide 5,
+    # https://www.cs.upc.edu/~erodri/webpage/cps/theory/lp/milp/slides.pdf
+    # also check that `milp` accepts all valid ways of specifying constraints
+    c = -np.ones(2)
+    A = [[-2, 2], [-8, 10]]
+    b_l = [1, -np.inf]
+    b_u = [np.inf, 13]
+    linear_constraint = LinearConstraint(A, b_l, b_u)
+
+    # solve original problem
+    res1 = milp(c=c, constraints=(A, b_l, b_u), integrality=True)
+    res2 = milp(c=c, constraints=linear_constraint, integrality=True)
+    res3 = milp(c=c, constraints=[(A, b_l, b_u)], integrality=True)
+    res4 = milp(c=c, constraints=[linear_constraint], integrality=True)
+    res5 = milp(c=c, integrality=True,
+                constraints=[(A[:1], b_l[:1], b_u[:1]),
+                             (A[1:], b_l[1:], b_u[1:])])
+    res6 = milp(c=c, integrality=True,
+                constraints=[LinearConstraint(A[:1], b_l[:1], b_u[:1]),
+                             LinearConstraint(A[1:], b_l[1:], b_u[1:])])
+    res7 = milp(c=c, integrality=True,
+                constraints=[(A[:1], b_l[:1], b_u[:1]),
+                             LinearConstraint(A[1:], b_l[1:], b_u[1:])])
+    xs = np.array([res1.x, res2.x, res3.x, res4.x, res5.x, res6.x, res7.x])
+    funs = np.array([res1.fun, res2.fun, res3.fun,
+                     res4.fun, res5.fun, res6.fun, res7.fun])
+    np.testing.assert_allclose(xs, np.broadcast_to([1, 2], xs.shape))
+    np.testing.assert_allclose(funs, -3)
+
+    # solve relaxed problem
+    res = milp(c=c, constraints=(A, b_l, b_u))
+    np.testing.assert_allclose(res.x, [4, 4.5])
+    np.testing.assert_allclose(res.fun, -8.5)
+
+
+def test_milp_3():
+    # solve MIP with inequality constraints and all integer constraints
+    # source: https://en.wikipedia.org/wiki/Integer_programming#Example
+    c = [0, -1]
+    A = [[-1, 1], [3, 2], [2, 3]]
+    b_u = [1, 12, 12]
+    b_l = np.full_like(b_u, -np.inf, dtype=np.float64)
+    constraints = LinearConstraint(A, b_l, b_u)
+
+    integrality = np.ones_like(c)
+
+    # solve original problem
+    res = milp(c=c, constraints=constraints, integrality=integrality)
+    assert_allclose(res.fun, -2)
+    # two optimal solutions possible, just need one of them
+    assert np.allclose(res.x, [1, 2]) or np.allclose(res.x, [2, 2])
+
+    # solve relaxed problem
+    res = milp(c=c, constraints=constraints)
+    assert_allclose(res.fun, -2.8)
+    assert_allclose(res.x, [1.8, 2.8])
+
+
+def test_milp_4():
+    # solve MIP with inequality constraints and only one integer constraint
+    # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+    c = [8, 1]
+    integrality = [0, 1]
+    A = [[1, 2], [-4, -1], [2, 1]]
+    b_l = [-14, -np.inf, -np.inf]
+    b_u = [np.inf, -33, 20]
+    constraints = LinearConstraint(A, b_l, b_u)
+    bounds = Bounds(-np.inf, np.inf)
+
+    res = milp(c, integrality=integrality, bounds=bounds,
+               constraints=constraints)
+    assert_allclose(res.fun, 59)
+    assert_allclose(res.x, [6.5, 7])
+
+
+def test_milp_5():
+    # solve MIP with inequality and equality constraints
+    # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+    c = [-3, -2, -1]
+    integrality = [0, 0, 1]
+    lb = [0, 0, 0]
+    ub = [np.inf, np.inf, 1]
+    bounds = Bounds(lb, ub)
+    A = [[1, 1, 1], [4, 2, 1]]
+    b_l = [-np.inf, 12]
+    b_u = [7, 12]
+    constraints = LinearConstraint(A, b_l, b_u)
+
+    res = milp(c, integrality=integrality, bounds=bounds,
+               constraints=constraints)
+    # there are multiple solutions
+    assert_allclose(res.fun, -12)
+
+
+@pytest.mark.xslow
+def test_milp_6():
+    # solve a larger MIP with only equality constraints
+    # source: https://www.mathworks.com/help/optim/ug/intlinprog.html
+    integrality = 1
+    A_eq = np.array([[22, 13, 26, 33, 21, 3, 14, 26],
+                     [39, 16, 22, 28, 26, 30, 23, 24],
+                     [18, 14, 29, 27, 30, 38, 26, 26],
+                     [41, 26, 28, 36, 18, 38, 16, 26]])
+    b_eq = np.array([7872, 10466, 11322, 12058])
+    c = np.array([2, 10, 13, 17, 7, 5, 7, 3])
+
+    res = milp(c=c, constraints=(A_eq, b_eq, b_eq), integrality=integrality)
+
+    np.testing.assert_allclose(res.fun, 1854)
+
+
+def test_infeasible_prob_16609():
+    # Ensure presolve does not mark trivially infeasible problems
+    # as Optimal -- see gh-16609
+    c = [1.0, 0.0]
+    integrality = [0, 1]
+
+    lb = [0, -np.inf]
+    ub = [np.inf, np.inf]
+    bounds = Bounds(lb, ub)
+
+    A_eq = [[0.0, 1.0]]
+    b_eq = [0.5]
+    constraints = LinearConstraint(A_eq, b_eq, b_eq)
+
+    res = milp(c, integrality=integrality, bounds=bounds,
+               constraints=constraints)
+    np.testing.assert_equal(res.status, 2)
+
+
+_msg_time = "Time limit reached. (HiGHS Status 13:"
+_msg_iter = "Iteration limit reached. (HiGHS Status 14:"
+
+@pytest.mark.thread_unsafe
+# See https://github.com/scipy/scipy/pull/19255#issuecomment-1778438888
+@pytest.mark.xfail(reason="Often buggy, revisit with callbacks, gh-19255")
+@pytest.mark.skipif(np.intp(0).itemsize < 8,
+                    reason="Unhandled 32-bit GCC FP bug")
+@pytest.mark.slow
+@pytest.mark.parametrize(["options", "msg"], [({"time_limit": 0.1}, _msg_time),
+                                              ({"node_limit": 1}, _msg_iter)])
+def test_milp_timeout_16545(options, msg):
+    # Ensure solution is not thrown away if MILP solver times out
+    # -- see gh-16545
+    rng = np.random.default_rng(5123833489170494244)
+    A = rng.integers(0, 5, size=(100, 100))
+    b_lb = np.full(100, fill_value=-np.inf)
+    b_ub = np.full(100, fill_value=25)
+    constraints = LinearConstraint(A, b_lb, b_ub)
+    variable_lb = np.zeros(100)
+    variable_ub = np.ones(100)
+    variable_bounds = Bounds(variable_lb, variable_ub)
+    integrality = np.ones(100)
+    c_vector = -np.ones(100)
+    res = milp(
+        c_vector,
+        integrality=integrality,
+        bounds=variable_bounds,
+        constraints=constraints,
+        options=options,
+    )
+
+    assert res.message.startswith(msg)
+    assert res["x"] is not None
+
+    # ensure solution is feasible
+    x = res["x"]
+    tol = 1e-8  # sometimes needed due to finite numerical precision
+    assert np.all(b_lb - tol <= A @ x) and np.all(A @ x <= b_ub + tol)
+    assert np.all(variable_lb - tol <= x) and np.all(x <= variable_ub + tol)
+    assert np.allclose(x, np.round(x))
+
+
+def test_three_constraints_16878():
+    # `milp` failed when exactly three constraints were passed
+    # Ensure that this is no longer the case.
+    rng = np.random.default_rng(5123833489170494244)
+    A = rng.integers(0, 5, size=(6, 6))
+    bl = np.full(6, fill_value=-np.inf)
+    bu = np.full(6, fill_value=10)
+    constraints = [LinearConstraint(A[:2], bl[:2], bu[:2]),
+                   LinearConstraint(A[2:4], bl[2:4], bu[2:4]),
+                   LinearConstraint(A[4:], bl[4:], bu[4:])]
+    constraints2 = [(A[:2], bl[:2], bu[:2]),
+                    (A[2:4], bl[2:4], bu[2:4]),
+                    (A[4:], bl[4:], bu[4:])]
+    lb = np.zeros(6)
+    ub = np.ones(6)
+    variable_bounds = Bounds(lb, ub)
+    c = -np.ones(6)
+    res1 = milp(c, bounds=variable_bounds, constraints=constraints)
+    res2 = milp(c, bounds=variable_bounds, constraints=constraints2)
+    ref = milp(c, bounds=variable_bounds, constraints=(A, bl, bu))
+    assert res1.success and res2.success
+    assert_allclose(res1.x, ref.x)
+    assert_allclose(res2.x, ref.x)
+
+
+@pytest.mark.xslow
+def test_mip_rel_gap_passdown():
+    # Solve problem with decreasing mip_gap to make sure mip_rel_gap decreases
+    # Adapted from test_linprog::TestLinprogHiGHSMIP::test_mip_rel_gap_passdown
+    # MIP taken from test_mip_6 above
+    A_eq = np.array([[22, 13, 26, 33, 21, 3, 14, 26],
+                     [39, 16, 22, 28, 26, 30, 23, 24],
+                     [18, 14, 29, 27, 30, 38, 26, 26],
+                     [41, 26, 28, 36, 18, 38, 16, 26]])
+    b_eq = np.array([7872, 10466, 11322, 12058])
+    c = np.array([2, 10, 13, 17, 7, 5, 7, 3])
+
+    mip_rel_gaps = [0.25, 0.01, 0.001]
+    sol_mip_gaps = []
+    for mip_rel_gap in mip_rel_gaps:
+        res = milp(c=c, bounds=(0, np.inf), constraints=(A_eq, b_eq, b_eq),
+                   integrality=True, options={"mip_rel_gap": mip_rel_gap})
+        # assert that the solution actually has mip_gap lower than the
+        # required mip_rel_gap supplied
+        assert res.mip_gap <= mip_rel_gap
+        # check that `res.mip_gap` is as defined in the documentation
+        assert res.mip_gap == (res.fun - res.mip_dual_bound)/res.fun
+        sol_mip_gaps.append(res.mip_gap)
+
+    # make sure that the mip_rel_gap parameter is actually doing something
+    # check that differences between solution gaps are declining
+    # monotonically with the mip_rel_gap parameter.
+    assert np.all(np.diff(sol_mip_gaps) < 0)
+
+@pytest.mark.xfail(reason='Upstream / Wrapper issue, see gh-20116')
+def test_large_numbers_gh20116():
+    h = 10 ** 12
+    A = np.array([[100.4534, h], [100.4534, -h]])
+    b = np.array([h, 0])
+    constraints = LinearConstraint(A=A, ub=b)
+    bounds = Bounds([0, 0], [1, 1])
+    c = np.array([0, 0])
+    res = milp(c=c, constraints=constraints, bounds=bounds, integrality=1)
+    assert res.status == 0
+    assert np.all(A @ res.x < b)
+
+
+def test_presolve_gh18907():
+    from scipy.optimize import milp
+    import numpy as np
+    inf = np.inf
+
+    # set up problem
+    c = np.array([-0.85850509, -0.82892676, -0.80026454, -0.63015535, -0.5099006,
+                  -0.50077193, -0.4894404, -0.47285865,  -0.39867774, -0.38069646,
+                  -0.36733012, -0.36733012, -0.35820411, -0.31576141, -0.20626091,
+                  -0.12466144, -0.10679516, -0.1061887, -0.1061887, -0.1061887,
+                  -0., -0., -0., -0., 0., 0., 0., 0.])
+
+    A = np.array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
+                   1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 0., 0., 0., 0.],
+                  [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                   1., 0., 0., 0., 0., 0., 1., 0., 0., 0., -25., -0., -0., -0.],
+                  [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                   -1., 0., 0., 0., 0., 0., -1., 0., 0., 0., 2., 0., 0., 0.],
+                  [0., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 0., 0., 0., 0.,
+                   0., 0., 0., 0., 0., 0., 0., 0., 0., -0., -25., -0., -0.],
+                  [0., 0., 0., 0., -1., -1., -1., -1., 0., -1., 0., 0., 0.,
+                   0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0.],
+                  [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                   0., 0., 1., 1., 1., 0., 0., 0., 0., -0., -0., -25., -0.],
+                  [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+                   0., 0., -1., -1., -1., 0., 0., 0., 0., 0., 0., 2., 0.],
+                  [1., 1., 1., 1., 0., 0., 0., 0., 1., 0., 1., 1., 1., 1., 0.,
+                   1., 1., 0., 0., 0., 0., 1., 1., 1., -0., -0., -0., -25.],
+                  [-1., -1., -1., -1., 0., 0., 0., 0., -1., 0., -1., -1., -1., -1.,
+                   0., -1., -1., 0., 0., 0., 0., -1., -1., -1., 0., 0., 0., 2.]])
+    bl = np.array([-inf, -inf, -inf, -inf, -inf, -inf, -inf, -inf, -inf])
+    bu = np.array([100., 0., 0., 0., 0., 0., 0., 0., 0.])
+    constraints = LinearConstraint(A, bl, bu)
+    integrality = 1
+    bounds = (0, 1)
+    r1 = milp(c=c, constraints=constraints, integrality=integrality, bounds=bounds,
+              options={'presolve': True})
+    r2 = milp(c=c, constraints=constraints, integrality=integrality, bounds=bounds,
+              options={'presolve': False})
+    assert r1.status == r2.status
+    assert_allclose(r1.x, r2.x)
+
+    # another example from the same issue
+    bounds = Bounds(lb=0, ub=1)
+    integrality = [1, 1, 0, 0]
+    c = [10, 9.52380952, -1000, -952.38095238]
+    A = [[1, 1, 0, 0], [0, 0, 1, 1], [200, 0, 0, 0], [0, 200, 0, 0],
+         [0, 0, 2000, 0], [0, 0, 0, 2000], [-1, 0, 1, 0], [-1, -1, 0, 1]]
+    ub = [1, 1, 200, 200, 1000, 1000, 0, 0]
+    constraints = LinearConstraint(A, ub=ub)
+    r1 = milp(c=c, constraints=constraints,  bounds=bounds,
+              integrality=integrality, options={"presolve": False})
+    r2 = milp(c=c, constraints=constraints,  bounds=bounds,
+              integrality=integrality, options={"presolve": False})
+    assert r1.status == r2.status
+    assert_allclose(r1.x, r2.x)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minimize_constrained.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minimize_constrained.py
new file mode 100644
index 0000000000000000000000000000000000000000..cda21fd1dc2b24b128e47405e01353fdae41a75c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minimize_constrained.py
@@ -0,0 +1,845 @@
+import numpy as np
+import pytest
+from scipy.linalg import block_diag
+from scipy.sparse import csc_matrix
+from numpy.testing import (assert_array_almost_equal,
+                           assert_array_less, assert_,
+                           suppress_warnings)
+from scipy.optimize import (NonlinearConstraint,
+                            LinearConstraint,
+                            Bounds,
+                            minimize,
+                            BFGS,
+                            SR1,
+                            rosen)
+
+
+class Maratos:
+    """Problem 15.4 from Nocedal and Wright
+
+    The following optimization problem:
+        minimize 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+        Subject to: x[0]**2 + x[1]**2 - 1 = 0
+    """
+
+    def __init__(self, degrees=60, constr_jac=None, constr_hess=None):
+        rads = degrees/180*np.pi
+        self.x0 = [np.cos(rads), np.sin(rads)]
+        self.x_opt = np.array([1.0, 0.0])
+        self.constr_jac = constr_jac
+        self.constr_hess = constr_hess
+        self.bounds = None
+
+    def fun(self, x):
+        return 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+
+    def grad(self, x):
+        return np.array([4*x[0]-1, 4*x[1]])
+
+    def hess(self, x):
+        return 4*np.eye(2)
+
+    @property
+    def constr(self):
+        def fun(x):
+            return x[0]**2 + x[1]**2
+
+        if self.constr_jac is None:
+            def jac(x):
+                return [[2*x[0], 2*x[1]]]
+        else:
+            jac = self.constr_jac
+
+        if self.constr_hess is None:
+            def hess(x, v):
+                return 2*v[0]*np.eye(2)
+        else:
+            hess = self.constr_hess
+
+        return NonlinearConstraint(fun, 1, 1, jac, hess)
+
+
+class MaratosTestArgs:
+    """Problem 15.4 from Nocedal and Wright
+
+    The following optimization problem:
+        minimize 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+        Subject to: x[0]**2 + x[1]**2 - 1 = 0
+    """
+
+    def __init__(self, a, b, degrees=60, constr_jac=None, constr_hess=None):
+        rads = degrees/180*np.pi
+        self.x0 = [np.cos(rads), np.sin(rads)]
+        self.x_opt = np.array([1.0, 0.0])
+        self.constr_jac = constr_jac
+        self.constr_hess = constr_hess
+        self.a = a
+        self.b = b
+        self.bounds = None
+
+    def _test_args(self, a, b):
+        if self.a != a or self.b != b:
+            raise ValueError()
+
+    def fun(self, x, a, b):
+        self._test_args(a, b)
+        return 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+
+    def grad(self, x, a, b):
+        self._test_args(a, b)
+        return np.array([4*x[0]-1, 4*x[1]])
+
+    def hess(self, x, a, b):
+        self._test_args(a, b)
+        return 4*np.eye(2)
+
+    @property
+    def constr(self):
+        def fun(x):
+            return x[0]**2 + x[1]**2
+
+        if self.constr_jac is None:
+            def jac(x):
+                return [[4*x[0], 4*x[1]]]
+        else:
+            jac = self.constr_jac
+
+        if self.constr_hess is None:
+            def hess(x, v):
+                return 2*v[0]*np.eye(2)
+        else:
+            hess = self.constr_hess
+
+        return NonlinearConstraint(fun, 1, 1, jac, hess)
+
+
+class MaratosGradInFunc:
+    """Problem 15.4 from Nocedal and Wright
+
+    The following optimization problem:
+        minimize 2*(x[0]**2 + x[1]**2 - 1) - x[0]
+        Subject to: x[0]**2 + x[1]**2 - 1 = 0
+    """
+
+    def __init__(self, degrees=60, constr_jac=None, constr_hess=None):
+        rads = degrees/180*np.pi
+        self.x0 = [np.cos(rads), np.sin(rads)]
+        self.x_opt = np.array([1.0, 0.0])
+        self.constr_jac = constr_jac
+        self.constr_hess = constr_hess
+        self.bounds = None
+
+    def fun(self, x):
+        return (2*(x[0]**2 + x[1]**2 - 1) - x[0],
+                np.array([4*x[0]-1, 4*x[1]]))
+
+    @property
+    def grad(self):
+        return True
+
+    def hess(self, x):
+        return 4*np.eye(2)
+
+    @property
+    def constr(self):
+        def fun(x):
+            return x[0]**2 + x[1]**2
+
+        if self.constr_jac is None:
+            def jac(x):
+                return [[4*x[0], 4*x[1]]]
+        else:
+            jac = self.constr_jac
+
+        if self.constr_hess is None:
+            def hess(x, v):
+                return 2*v[0]*np.eye(2)
+        else:
+            hess = self.constr_hess
+
+        return NonlinearConstraint(fun, 1, 1, jac, hess)
+
+
+class HyperbolicIneq:
+    """Problem 15.1 from Nocedal and Wright
+
+    The following optimization problem:
+        minimize 1/2*(x[0] - 2)**2 + 1/2*(x[1] - 1/2)**2
+        Subject to: 1/(x[0] + 1) - x[1] >= 1/4
+                                   x[0] >= 0
+                                   x[1] >= 0
+    """
+    def __init__(self, constr_jac=None, constr_hess=None):
+        self.x0 = [0, 0]
+        self.x_opt = [1.952823, 0.088659]
+        self.constr_jac = constr_jac
+        self.constr_hess = constr_hess
+        self.bounds = Bounds(0, np.inf)
+
+    def fun(self, x):
+        return 1/2*(x[0] - 2)**2 + 1/2*(x[1] - 1/2)**2
+
+    def grad(self, x):
+        return [x[0] - 2, x[1] - 1/2]
+
+    def hess(self, x):
+        return np.eye(2)
+
+    @property
+    def constr(self):
+        def fun(x):
+            return 1/(x[0] + 1) - x[1]
+
+        if self.constr_jac is None:
+            def jac(x):
+                return [[-1/(x[0] + 1)**2, -1]]
+        else:
+            jac = self.constr_jac
+
+        if self.constr_hess is None:
+            def hess(x, v):
+                return 2*v[0]*np.array([[1/(x[0] + 1)**3, 0],
+                                        [0, 0]])
+        else:
+            hess = self.constr_hess
+
+        return NonlinearConstraint(fun, 0.25, np.inf, jac, hess)
+
+
+class Rosenbrock:
+    """Rosenbrock function.
+
+    The following optimization problem:
+        minimize sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)
+    """
+
+    def __init__(self, n=2, random_state=0):
+        rng = np.random.RandomState(random_state)
+        self.x0 = rng.uniform(-1, 1, n)
+        self.x_opt = np.ones(n)
+        self.bounds = None
+
+    def fun(self, x):
+        x = np.asarray(x)
+        r = np.sum(100.0 * (x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0,
+                   axis=0)
+        return r
+
+    def grad(self, x):
+        x = np.asarray(x)
+        xm = x[1:-1]
+        xm_m1 = x[:-2]
+        xm_p1 = x[2:]
+        der = np.zeros_like(x)
+        der[1:-1] = (200 * (xm - xm_m1**2) -
+                     400 * (xm_p1 - xm**2) * xm - 2 * (1 - xm))
+        der[0] = -400 * x[0] * (x[1] - x[0]**2) - 2 * (1 - x[0])
+        der[-1] = 200 * (x[-1] - x[-2]**2)
+        return der
+
+    def hess(self, x):
+        x = np.atleast_1d(x)
+        H = np.diag(-400 * x[:-1], 1) - np.diag(400 * x[:-1], -1)
+        diagonal = np.zeros(len(x), dtype=x.dtype)
+        diagonal[0] = 1200 * x[0]**2 - 400 * x[1] + 2
+        diagonal[-1] = 200
+        diagonal[1:-1] = 202 + 1200 * x[1:-1]**2 - 400 * x[2:]
+        H = H + np.diag(diagonal)
+        return H
+
+    @property
+    def constr(self):
+        return ()
+
+
+class IneqRosenbrock(Rosenbrock):
+    """Rosenbrock subject to inequality constraints.
+
+    The following optimization problem:
+        minimize sum(100.0*(x[1] - x[0]**2)**2.0 + (1 - x[0])**2)
+        subject to: x[0] + 2 x[1] <= 1
+
+    Taken from matlab ``fmincon`` documentation.
+    """
+    def __init__(self, random_state=0):
+        Rosenbrock.__init__(self, 2, random_state)
+        self.x0 = [-1, -0.5]
+        self.x_opt = [0.5022, 0.2489]
+        self.bounds = None
+
+    @property
+    def constr(self):
+        A = [[1, 2]]
+        b = 1
+        return LinearConstraint(A, -np.inf, b)
+
+
+class BoundedRosenbrock(Rosenbrock):
+    """Rosenbrock subject to inequality constraints.
+
+    The following optimization problem:
+        minimize sum(100.0*(x[1] - x[0]**2)**2.0 + (1 - x[0])**2)
+        subject to:  -2 <= x[0] <= 0
+                      0 <= x[1] <= 2
+
+    Taken from matlab ``fmincon`` documentation.
+    """
+    def __init__(self, random_state=0):
+        Rosenbrock.__init__(self, 2, random_state)
+        self.x0 = [-0.2, 0.2]
+        self.x_opt = None
+        self.bounds = Bounds([-2, 0], [0, 2])
+
+
+class EqIneqRosenbrock(Rosenbrock):
+    """Rosenbrock subject to equality and inequality constraints.
+
+    The following optimization problem:
+        minimize sum(100.0*(x[1] - x[0]**2)**2.0 + (1 - x[0])**2)
+        subject to: x[0] + 2 x[1] <= 1
+                    2 x[0] + x[1] = 1
+
+    Taken from matlab ``fimincon`` documentation.
+    """
+    def __init__(self, random_state=0):
+        Rosenbrock.__init__(self, 2, random_state)
+        self.x0 = [-1, -0.5]
+        self.x_opt = [0.41494, 0.17011]
+        self.bounds = None
+
+    @property
+    def constr(self):
+        A_ineq = [[1, 2]]
+        b_ineq = 1
+        A_eq = [[2, 1]]
+        b_eq = 1
+        return (LinearConstraint(A_ineq, -np.inf, b_ineq),
+                LinearConstraint(A_eq, b_eq, b_eq))
+
+
+class Elec:
+    """Distribution of electrons on a sphere.
+
+    Problem no 2 from COPS collection [2]_. Find
+    the equilibrium state distribution (of minimal
+    potential) of the electrons positioned on a
+    conducting sphere.
+
+    References
+    ----------
+    .. [1] E. D. Dolan, J. J. Mor\'{e}, and T. S. Munson,
+           "Benchmarking optimization software with COPS 3.0.",
+            Argonne National Lab., Argonne, IL (US), 2004.
+    """
+    def __init__(self, n_electrons=200, random_state=0,
+                 constr_jac=None, constr_hess=None):
+        self.n_electrons = n_electrons
+        self.rng = np.random.RandomState(random_state)
+        # Initial Guess
+        phi = self.rng.uniform(0, 2 * np.pi, self.n_electrons)
+        theta = self.rng.uniform(-np.pi, np.pi, self.n_electrons)
+        x = np.cos(theta) * np.cos(phi)
+        y = np.cos(theta) * np.sin(phi)
+        z = np.sin(theta)
+        self.x0 = np.hstack((x, y, z))
+        self.x_opt = None
+        self.constr_jac = constr_jac
+        self.constr_hess = constr_hess
+        self.bounds = None
+
+    def _get_cordinates(self, x):
+        x_coord = x[:self.n_electrons]
+        y_coord = x[self.n_electrons:2 * self.n_electrons]
+        z_coord = x[2 * self.n_electrons:]
+        return x_coord, y_coord, z_coord
+
+    def _compute_coordinate_deltas(self, x):
+        x_coord, y_coord, z_coord = self._get_cordinates(x)
+        dx = x_coord[:, None] - x_coord
+        dy = y_coord[:, None] - y_coord
+        dz = z_coord[:, None] - z_coord
+        return dx, dy, dz
+
+    def fun(self, x):
+        dx, dy, dz = self._compute_coordinate_deltas(x)
+        with np.errstate(divide='ignore'):
+            dm1 = (dx**2 + dy**2 + dz**2) ** -0.5
+        dm1[np.diag_indices_from(dm1)] = 0
+        return 0.5 * np.sum(dm1)
+
+    def grad(self, x):
+        dx, dy, dz = self._compute_coordinate_deltas(x)
+
+        with np.errstate(divide='ignore'):
+            dm3 = (dx**2 + dy**2 + dz**2) ** -1.5
+        dm3[np.diag_indices_from(dm3)] = 0
+
+        grad_x = -np.sum(dx * dm3, axis=1)
+        grad_y = -np.sum(dy * dm3, axis=1)
+        grad_z = -np.sum(dz * dm3, axis=1)
+
+        return np.hstack((grad_x, grad_y, grad_z))
+
+    def hess(self, x):
+        dx, dy, dz = self._compute_coordinate_deltas(x)
+        d = (dx**2 + dy**2 + dz**2) ** 0.5
+
+        with np.errstate(divide='ignore'):
+            dm3 = d ** -3
+            dm5 = d ** -5
+
+        i = np.arange(self.n_electrons)
+        dm3[i, i] = 0
+        dm5[i, i] = 0
+
+        Hxx = dm3 - 3 * dx**2 * dm5
+        Hxx[i, i] = -np.sum(Hxx, axis=1)
+
+        Hxy = -3 * dx * dy * dm5
+        Hxy[i, i] = -np.sum(Hxy, axis=1)
+
+        Hxz = -3 * dx * dz * dm5
+        Hxz[i, i] = -np.sum(Hxz, axis=1)
+
+        Hyy = dm3 - 3 * dy**2 * dm5
+        Hyy[i, i] = -np.sum(Hyy, axis=1)
+
+        Hyz = -3 * dy * dz * dm5
+        Hyz[i, i] = -np.sum(Hyz, axis=1)
+
+        Hzz = dm3 - 3 * dz**2 * dm5
+        Hzz[i, i] = -np.sum(Hzz, axis=1)
+
+        H = np.vstack((
+            np.hstack((Hxx, Hxy, Hxz)),
+            np.hstack((Hxy, Hyy, Hyz)),
+            np.hstack((Hxz, Hyz, Hzz))
+        ))
+
+        return H
+
+    @property
+    def constr(self):
+        def fun(x):
+            x_coord, y_coord, z_coord = self._get_cordinates(x)
+            return x_coord**2 + y_coord**2 + z_coord**2 - 1
+
+        if self.constr_jac is None:
+            def jac(x):
+                x_coord, y_coord, z_coord = self._get_cordinates(x)
+                Jx = 2 * np.diag(x_coord)
+                Jy = 2 * np.diag(y_coord)
+                Jz = 2 * np.diag(z_coord)
+                return csc_matrix(np.hstack((Jx, Jy, Jz)))
+        else:
+            jac = self.constr_jac
+
+        if self.constr_hess is None:
+            def hess(x, v):
+                D = 2 * np.diag(v)
+                return block_diag(D, D, D)
+        else:
+            hess = self.constr_hess
+
+        return NonlinearConstraint(fun, -np.inf, 0, jac, hess)
+
+
+class TestTrustRegionConstr:
+    list_of_problems = [Maratos(),
+                        Maratos(constr_hess='2-point'),
+                        Maratos(constr_hess=SR1()),
+                        Maratos(constr_jac='2-point', constr_hess=SR1()),
+                        MaratosGradInFunc(),
+                        HyperbolicIneq(),
+                        HyperbolicIneq(constr_hess='3-point'),
+                        HyperbolicIneq(constr_hess=BFGS()),
+                        HyperbolicIneq(constr_jac='3-point',
+                                       constr_hess=BFGS()),
+                        Rosenbrock(),
+                        IneqRosenbrock(),
+                        EqIneqRosenbrock(),
+                        BoundedRosenbrock(),
+                        Elec(n_electrons=2),
+                        Elec(n_electrons=2, constr_hess='2-point'),
+                        Elec(n_electrons=2, constr_hess=SR1()),
+                        Elec(n_electrons=2, constr_jac='3-point',
+                             constr_hess=SR1())]
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('prob', list_of_problems)
+    @pytest.mark.parametrize('grad', ('prob.grad', '3-point', False))
+    @pytest.mark.parametrize('hess', ("prob.hess", '3-point', SR1(),
+                                      BFGS(exception_strategy='damp_update'),
+                                      BFGS(exception_strategy='skip_update')))
+    def test_list_of_problems(self, prob, grad, hess):
+        grad = prob.grad if grad == "prob.grad" else grad
+        hess = prob.hess if hess == "prob.hess" else hess
+        # Remove exceptions
+        if (grad in {'2-point', '3-point', 'cs', False} and
+                hess in {'2-point', '3-point', 'cs'}):
+            pytest.skip("Numerical Hessian needs analytical gradient")
+        if prob.grad is True and grad in {'3-point', False}:
+            pytest.skip("prob.grad incompatible with grad in {'3-point', False}")
+        sensitive = (isinstance(prob, BoundedRosenbrock) and grad == '3-point'
+                     and isinstance(hess, BFGS))
+        if sensitive:
+            pytest.xfail("Seems sensitive to initial conditions w/ Accelerate")
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            result = minimize(prob.fun, prob.x0,
+                              method='trust-constr',
+                              jac=grad, hess=hess,
+                              bounds=prob.bounds,
+                              constraints=prob.constr)
+
+        if prob.x_opt is not None:
+            assert_array_almost_equal(result.x, prob.x_opt,
+                                      decimal=5)
+            # gtol
+            if result.status == 1:
+                assert_array_less(result.optimality, 1e-8)
+        # xtol
+        if result.status == 2:
+            assert_array_less(result.tr_radius, 1e-8)
+
+            if result.method == "tr_interior_point":
+                assert_array_less(result.barrier_parameter, 1e-8)
+
+        # check for max iter
+        message = f"Invalid termination condition: {result.status}."
+        assert result.status not in {0, 3}, message
+
+
+    def test_default_jac_and_hess(self):
+        def fun(x):
+            return (x - 1) ** 2
+        bounds = [(-2, 2)]
+        res = minimize(fun, x0=[-1.5], bounds=bounds, method='trust-constr')
+        assert_array_almost_equal(res.x, 1, decimal=5)
+
+    def test_default_hess(self):
+        def fun(x):
+            return (x - 1) ** 2
+        bounds = [(-2, 2)]
+        res = minimize(fun, x0=[-1.5], bounds=bounds, method='trust-constr',
+                       jac='2-point')
+        assert_array_almost_equal(res.x, 1, decimal=5)
+
+    def test_no_constraints(self):
+        prob = Rosenbrock()
+        result = minimize(prob.fun, prob.x0,
+                          method='trust-constr',
+                          jac=prob.grad, hess=prob.hess)
+        result1 = minimize(prob.fun, prob.x0,
+                           method='L-BFGS-B',
+                           jac='2-point')
+
+        result2 = minimize(prob.fun, prob.x0,
+                           method='L-BFGS-B',
+                           jac='3-point')
+        assert_array_almost_equal(result.x, prob.x_opt, decimal=5)
+        assert_array_almost_equal(result1.x, prob.x_opt, decimal=5)
+        assert_array_almost_equal(result2.x, prob.x_opt, decimal=5)
+
+    def test_hessp(self):
+        prob = Maratos()
+
+        def hessp(x, p):
+            H = prob.hess(x)
+            return H.dot(p)
+
+        result = minimize(prob.fun, prob.x0,
+                          method='trust-constr',
+                          jac=prob.grad, hessp=hessp,
+                          bounds=prob.bounds,
+                          constraints=prob.constr)
+
+        if prob.x_opt is not None:
+            assert_array_almost_equal(result.x, prob.x_opt, decimal=2)
+
+        # gtol
+        if result.status == 1:
+            assert_array_less(result.optimality, 1e-8)
+        # xtol
+        if result.status == 2:
+            assert_array_less(result.tr_radius, 1e-8)
+
+            if result.method == "tr_interior_point":
+                assert_array_less(result.barrier_parameter, 1e-8)
+        # max iter
+        if result.status in (0, 3):
+            raise RuntimeError("Invalid termination condition.")
+
+    def test_args(self):
+        prob = MaratosTestArgs("a", 234)
+
+        result = minimize(prob.fun, prob.x0, ("a", 234),
+                          method='trust-constr',
+                          jac=prob.grad, hess=prob.hess,
+                          bounds=prob.bounds,
+                          constraints=prob.constr)
+
+        if prob.x_opt is not None:
+            assert_array_almost_equal(result.x, prob.x_opt, decimal=2)
+
+        # gtol
+        if result.status == 1:
+            assert_array_less(result.optimality, 1e-8)
+        # xtol
+        if result.status == 2:
+            assert_array_less(result.tr_radius, 1e-8)
+            if result.method == "tr_interior_point":
+                assert_array_less(result.barrier_parameter, 1e-8)
+        # max iter
+        if result.status in (0, 3):
+            raise RuntimeError("Invalid termination condition.")
+
+    def test_raise_exception(self):
+        prob = Maratos()
+        message = "Whenever the gradient is estimated via finite-differences"
+        with pytest.raises(ValueError, match=message):
+            minimize(prob.fun, prob.x0, method='trust-constr', jac='2-point',
+                     hess='2-point', constraints=prob.constr)
+
+    def test_issue_9044(self):
+        # https://github.com/scipy/scipy/issues/9044
+        # Test the returned `OptimizeResult` contains keys consistent with
+        # other solvers.
+
+        def callback(x, info):
+            assert_('nit' in info)
+            assert_('niter' in info)
+
+        result = minimize(lambda x: x**2, [0], jac=lambda x: 2*x,
+                          hess=lambda x: 2, callback=callback,
+                          method='trust-constr')
+        assert_(result.get('success'))
+        assert_(result.get('nit', -1) == 1)
+
+        # Also check existence of the 'niter' attribute, for backward
+        # compatibility
+        assert_(result.get('niter', -1) == 1)
+
+    def test_issue_15093(self):
+        # scipy docs define bounds as inclusive, so it shouldn't be
+        # an issue to set x0 on the bounds even if keep_feasible is
+        # True. Previously, trust-constr would treat bounds as
+        # exclusive.
+
+        x0 = np.array([0., 0.5])
+
+        def obj(x):
+            x1 = x[0]
+            x2 = x[1]
+            return x1 ** 2 + x2 ** 2
+
+        bounds = Bounds(np.array([0., 0.]), np.array([1., 1.]),
+                        keep_feasible=True)
+
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.0")
+            result = minimize(
+                method='trust-constr',
+                fun=obj,
+                x0=x0,
+                bounds=bounds)
+
+        assert result['success']
+
+class TestEmptyConstraint:
+    """
+    Here we minimize x^2+y^2 subject to x^2-y^2>1.
+    The actual minimum is at (0, 0) which fails the constraint.
+    Therefore we will find a minimum on the boundary at (+/-1, 0).
+
+    When minimizing on the boundary, optimize uses a set of
+    constraints that removes the constraint that sets that
+    boundary.  In our case, there's only one constraint, so
+    the result is an empty constraint.
+
+    This tests that the empty constraint works.
+    """
+    def test_empty_constraint(self):
+
+        def function(x):
+            return x[0]**2 + x[1]**2
+
+        def functionjacobian(x):
+            return np.array([2.*x[0], 2.*x[1]])
+
+        def functionhvp(x, v):
+            return 2.*v
+
+        def constraint(x):
+            return np.array([x[0]**2 - x[1]**2])
+
+        def constraintjacobian(x):
+            return np.array([[2*x[0], -2*x[1]]])
+
+        def constraintlcoh(x, v):
+            return np.array([[2., 0.], [0., -2.]]) * v[0]
+
+        constraint = NonlinearConstraint(constraint, 1., np.inf,
+                                         constraintjacobian, constraintlcoh)
+
+        startpoint = [1., 2.]
+
+        bounds = Bounds([-np.inf, -np.inf], [np.inf, np.inf])
+
+        result = minimize(
+          function,
+          startpoint,
+          method='trust-constr',
+          jac=functionjacobian,
+          hessp=functionhvp,
+          constraints=[constraint],
+          bounds=bounds,
+        )
+
+        assert_array_almost_equal(abs(result.x), np.array([1, 0]), decimal=4)
+
+
+def test_bug_11886():
+    def opt(x):
+        return x[0]**2+x[1]**2
+
+    with np.testing.suppress_warnings() as sup:
+        sup.filter(PendingDeprecationWarning)
+        A = np.matrix(np.diag([1, 1]))
+    lin_cons = LinearConstraint(A, -1, np.inf)
+    # just checking that there are no errors
+    minimize(opt, 2*[1], constraints = lin_cons)
+
+
+def test_gh11649():
+    # trust - constr error when attempting to keep bound constrained solutions
+    # feasible. Algorithm attempts to go outside bounds when evaluating finite
+    # differences. (don't give objective an analytic gradient)
+    bnds = Bounds(lb=[-1, -1], ub=[1, 1], keep_feasible=True)
+
+    def assert_inbounds(x):
+        assert np.all(x >= bnds.lb)
+        assert np.all(x <= bnds.ub)
+
+    def obj(x):
+        assert_inbounds(x)
+        return np.exp(x[0])*(4*x[0]**2 + 2*x[1]**2 + 4*x[0]*x[1] + 2*x[1] + 1)
+
+    def nce(x):
+        assert_inbounds(x)
+        return x[0]**2 + x[1]
+
+    def nce_jac(x):
+        return np.array([2*x[0], 1])
+
+    def nci(x):
+        assert_inbounds(x)
+        return x[0]*x[1]
+
+    x0 = np.array((0.99, -0.99))
+    nlcs = [NonlinearConstraint(nci, -10, np.inf),
+            NonlinearConstraint(nce, 1, 1, jac=nce_jac)]
+
+    res = minimize(fun=obj, x0=x0, method='trust-constr',
+                   bounds=bnds, constraints=nlcs)
+    assert_inbounds(res.x)
+    assert nlcs[0].lb < nlcs[0].fun(res.x) < nlcs[0].ub
+
+
+def test_gh20665_too_many_constraints():
+    # gh-20665 reports a confusing error message when there are more equality
+    # constraints than variables. Check that the error message is improved.
+    message = "...more equality constraints than independent variables..."
+    with pytest.raises(ValueError, match=message):
+        x0 = np.ones((2,))
+        A_eq, b_eq = np.arange(6).reshape((3, 2)), np.ones((3,))
+        g = NonlinearConstraint(lambda x:  A_eq @ x, lb=b_eq, ub=b_eq)
+        minimize(rosen, x0, method='trust-constr', constraints=[g])
+    # no error with `SVDFactorization`
+    with np.testing.suppress_warnings() as sup:
+        sup.filter(UserWarning)
+        minimize(rosen, x0, method='trust-constr', constraints=[g],
+                 options={'factorization_method': 'SVDFactorization'})
+
+def test_issue_18882():
+    def lsf(u):
+        u1, u2 = u
+        a, b = [3.0, 4.0]
+        return 1.0 + u1**2 / a**2 - u2**2 / b**2
+
+    def of(u):
+        return np.sum(u**2)
+
+    with suppress_warnings() as sup:
+        sup.filter(UserWarning, "delta_grad == 0.0")
+        sup.filter(UserWarning, "Singular Jacobian matrix.")
+        res = minimize(
+            of,
+            [0.0, 0.0],
+            method="trust-constr",
+            constraints=NonlinearConstraint(lsf, 0, 0),
+        )
+    assert (not res.success) and (res.constr_violation > 1e-8)
+
+class TestBoundedNelderMead:
+
+    @pytest.mark.parametrize('bounds, x_opt',
+                             [(Bounds(-np.inf, np.inf), Rosenbrock().x_opt),
+                              (Bounds(-np.inf, -0.8), [-0.8, -0.8]),
+                              (Bounds(3.0, np.inf), [3.0, 9.0]),
+                              (Bounds([3.0, 1.0], [4.0, 5.0]), [3., 5.]),
+                              ])
+    def test_rosen_brock_with_bounds(self, bounds, x_opt):
+        prob = Rosenbrock()
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "Initial guess is not within "
+                                    "the specified bounds")
+            result = minimize(prob.fun, [-10, -10],
+                              method='Nelder-Mead',
+                              bounds=bounds)
+            assert np.less_equal(bounds.lb, result.x).all()
+            assert np.less_equal(result.x, bounds.ub).all()
+            assert np.allclose(prob.fun(result.x), result.fun)
+            assert np.allclose(result.x, x_opt, atol=1.e-3)
+
+    def test_equal_all_bounds(self):
+        prob = Rosenbrock()
+        bounds = Bounds([4.0, 5.0], [4.0, 5.0])
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "Initial guess is not within "
+                                    "the specified bounds")
+            result = minimize(prob.fun, [-10, 8],
+                              method='Nelder-Mead',
+                              bounds=bounds)
+            assert np.allclose(result.x, [4.0, 5.0])
+
+    def test_equal_one_bounds(self):
+        prob = Rosenbrock()
+        bounds = Bounds([4.0, 5.0], [4.0, 20.0])
+        with suppress_warnings() as sup:
+            sup.filter(UserWarning, "Initial guess is not within "
+                                    "the specified bounds")
+            result = minimize(prob.fun, [-10, 8],
+                              method='Nelder-Mead',
+                              bounds=bounds)
+            assert np.allclose(result.x, [4.0, 16.0])
+
+    def test_invalid_bounds(self):
+        prob = Rosenbrock()
+        message = 'An upper bound is less than the corresponding lower bound.'
+        with pytest.raises(ValueError, match=message):
+            bounds = Bounds([-np.inf, 1.0], [4.0, -5.0])
+            minimize(prob.fun, [-10, 3],
+                     method='Nelder-Mead',
+                     bounds=bounds)
+
+    @pytest.mark.xfail(reason="Failing on Azure Linux and macOS builds, "
+                              "see gh-13846")
+    def test_outside_bounds_warning(self):
+        prob = Rosenbrock()
+        message = "Initial guess is not within the specified bounds"
+        with pytest.warns(UserWarning, match=message):
+            bounds = Bounds([-np.inf, 1.0], [4.0, 5.0])
+            minimize(prob.fun, [-10, 8],
+                     method='Nelder-Mead',
+                     bounds=bounds)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..ef107c5692c2d30a06b6943542696b95bc21e818
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_minpack.py
@@ -0,0 +1,1194 @@
+"""
+Unit tests for optimization routines from minpack.py.
+"""
+import warnings
+import pytest
+import threading
+
+from numpy.testing import (assert_, assert_almost_equal, assert_array_equal,
+                           assert_array_almost_equal, assert_allclose,
+                           assert_warns, suppress_warnings)
+from pytest import raises as assert_raises
+import numpy as np
+from numpy import array, float64
+from multiprocessing.pool import ThreadPool
+
+from scipy import optimize, linalg
+from scipy.special import lambertw
+from scipy.optimize._minpack_py import leastsq, curve_fit, fixed_point
+from scipy.optimize import OptimizeWarning
+from scipy.optimize._minimize import Bounds
+
+
+class ReturnShape:
+    """This class exists to create a callable that does not have a '__name__' attribute.
+
+    __init__ takes the argument 'shape', which should be a tuple of ints.
+    When an instance is called with a single argument 'x', it returns numpy.ones(shape).
+    """
+
+    def __init__(self, shape):
+        self.shape = shape
+
+    def __call__(self, x):
+        return np.ones(self.shape)
+
+
+def dummy_func(x, shape):
+    """A function that returns an array of ones of the given shape.
+    `x` is ignored.
+    """
+    return np.ones(shape)
+
+
+def sequence_parallel(fs):
+    with ThreadPool(len(fs)) as pool:
+        return pool.map(lambda f: f(), fs)
+
+
+# Function and Jacobian for tests of solvers for systems of nonlinear
+# equations
+
+
+def pressure_network(flow_rates, Qtot, k):
+    """Evaluate non-linear equation system representing
+    the pressures and flows in a system of n parallel pipes::
+
+        f_i = P_i - P_0, for i = 1..n
+        f_0 = sum(Q_i) - Qtot
+
+    where Q_i is the flow rate in pipe i and P_i the pressure in that pipe.
+    Pressure is modeled as a P=kQ**2 where k is a valve coefficient and
+    Q is the flow rate.
+
+    Parameters
+    ----------
+    flow_rates : float
+        A 1-D array of n flow rates [kg/s].
+    k : float
+        A 1-D array of n valve coefficients [1/kg m].
+    Qtot : float
+        A scalar, the total input flow rate [kg/s].
+
+    Returns
+    -------
+    F : float
+        A 1-D array, F[i] == f_i.
+
+    """
+    P = k * flow_rates**2
+    F = np.hstack((P[1:] - P[0], flow_rates.sum() - Qtot))
+    return F
+
+
+def pressure_network_jacobian(flow_rates, Qtot, k):
+    """Return the jacobian of the equation system F(flow_rates)
+    computed by `pressure_network` with respect to
+    *flow_rates*. See `pressure_network` for the detailed
+    description of parameters.
+
+    Returns
+    -------
+    jac : float
+        *n* by *n* matrix ``df_i/dQ_i`` where ``n = len(flow_rates)``
+        and *f_i* and *Q_i* are described in the doc for `pressure_network`
+    """
+    n = len(flow_rates)
+    pdiff = np.diag(flow_rates[1:] * 2 * k[1:] - 2 * flow_rates[0] * k[0])
+
+    jac = np.empty((n, n))
+    jac[:n-1, :n-1] = pdiff * 0
+    jac[:n-1, n-1] = 0
+    jac[n-1, :] = np.ones(n)
+
+    return jac
+
+
+def pressure_network_fun_and_grad(flow_rates, Qtot, k):
+    return (pressure_network(flow_rates, Qtot, k),
+            pressure_network_jacobian(flow_rates, Qtot, k))
+
+
+class TestFSolve:
+    def test_pressure_network_no_gradient(self):
+        # fsolve without gradient, equal pipes -> equal flows.
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows, info, ier, mesg = optimize.fsolve(
+            pressure_network, initial_guess, args=(Qtot, k),
+            full_output=True)
+        assert_array_almost_equal(final_flows, np.ones(4))
+        assert_(ier == 1, mesg)
+
+    def test_pressure_network_with_gradient(self):
+        # fsolve with gradient, equal pipes -> equal flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows = optimize.fsolve(
+            pressure_network, initial_guess, args=(Qtot, k),
+            fprime=pressure_network_jacobian)
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+    def test_wrong_shape_func_callable(self):
+        func = ReturnShape(1)
+        # x0 is a list of two elements, but func will return an array with
+        # length 1, so this should result in a TypeError.
+        x0 = [1.5, 2.0]
+        assert_raises(TypeError, optimize.fsolve, func, x0)
+
+    def test_wrong_shape_func_function(self):
+        # x0 is a list of two elements, but func will return an array with
+        # length 1, so this should result in a TypeError.
+        x0 = [1.5, 2.0]
+        assert_raises(TypeError, optimize.fsolve, dummy_func, x0, args=((1,),))
+
+    def test_wrong_shape_fprime_callable(self):
+        func = ReturnShape(1)
+        deriv_func = ReturnShape((2,2))
+        assert_raises(TypeError, optimize.fsolve, func, x0=[0,1], fprime=deriv_func)
+
+    def test_wrong_shape_fprime_function(self):
+        def func(x):
+            return dummy_func(x, (2,))
+        def deriv_func(x):
+            return dummy_func(x, (3, 3))
+        assert_raises(TypeError, optimize.fsolve, func, x0=[0,1], fprime=deriv_func)
+
+    def test_func_can_raise(self):
+        def func(*args):
+            raise ValueError('I raised')
+
+        with assert_raises(ValueError, match='I raised'):
+            optimize.fsolve(func, x0=[0])
+
+    def test_Dfun_can_raise(self):
+        def func(x):
+            return x - np.array([10])
+
+        def deriv_func(*args):
+            raise ValueError('I raised')
+
+        with assert_raises(ValueError, match='I raised'):
+            optimize.fsolve(func, x0=[0], fprime=deriv_func)
+
+    def test_float32(self):
+        def func(x):
+            return np.array([x[0] - 100, x[1] - 1000], dtype=np.float32) ** 2
+        p = optimize.fsolve(func, np.array([1, 1], np.float32))
+        assert_allclose(func(p), [0, 0], atol=1e-3)
+
+    def test_reentrant_func(self):
+        def func(*args):
+            self.test_pressure_network_no_gradient()
+            return pressure_network(*args)
+
+        # fsolve without gradient, equal pipes -> equal flows.
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows, info, ier, mesg = optimize.fsolve(
+            func, initial_guess, args=(Qtot, k),
+            full_output=True)
+        assert_array_almost_equal(final_flows, np.ones(4))
+        assert_(ier == 1, mesg)
+
+    def test_reentrant_Dfunc(self):
+        def deriv_func(*args):
+            self.test_pressure_network_with_gradient()
+            return pressure_network_jacobian(*args)
+
+        # fsolve with gradient, equal pipes -> equal flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows = optimize.fsolve(
+            pressure_network, initial_guess, args=(Qtot, k),
+            fprime=deriv_func)
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+    def test_concurrent_no_gradient(self):
+        v = sequence_parallel([self.test_pressure_network_no_gradient] * 10)
+        assert all([result is None for result in v])
+
+    def test_concurrent_with_gradient(self):
+        v = sequence_parallel([self.test_pressure_network_with_gradient] * 10)
+        assert all([result is None for result in v])
+
+
+class TestRootHybr:
+    def test_pressure_network_no_gradient(self):
+        # root/hybr without gradient, equal pipes -> equal flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows = optimize.root(pressure_network, initial_guess,
+                                    method='hybr', args=(Qtot, k)).x
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+    def test_pressure_network_with_gradient(self):
+        # root/hybr with gradient, equal pipes -> equal flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([[2., 0., 2., 0.]])
+        final_flows = optimize.root(pressure_network, initial_guess,
+                                    args=(Qtot, k), method='hybr',
+                                    jac=pressure_network_jacobian).x
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+    def test_pressure_network_with_gradient_combined(self):
+        # root/hybr with gradient and function combined, equal pipes -> equal
+        # flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows = optimize.root(pressure_network_fun_and_grad,
+                                    initial_guess, args=(Qtot, k),
+                                    method='hybr', jac=True).x
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+
+class TestRootLM:
+    def test_pressure_network_no_gradient(self):
+        # root/lm without gradient, equal pipes -> equal flows
+        k = np.full(4, 0.5)
+        Qtot = 4
+        initial_guess = array([2., 0., 2., 0.])
+        final_flows = optimize.root(pressure_network, initial_guess,
+                                    method='lm', args=(Qtot, k)).x
+        assert_array_almost_equal(final_flows, np.ones(4))
+
+
+class TestNfev:
+    def setup_method(self):
+        self.nfev = threading.local()
+
+    def zero_f(self, y):
+        if not hasattr(self.nfev, 'c'):
+            self.nfev.c = 0
+        self.nfev.c += 1
+        return y**2-3
+
+    @pytest.mark.parametrize('method', ['hybr', 'lm', 'broyden1',
+                                        'broyden2', 'anderson',
+                                        'linearmixing', 'diagbroyden',
+                                        'excitingmixing', 'krylov',
+                                        'df-sane'])
+    def test_root_nfev(self, method):
+        self.nfev.c = 0
+        solution = optimize.root(self.zero_f, 100, method=method)
+        assert solution.nfev == self.nfev.c
+
+    def test_fsolve_nfev(self):
+        self.nfev.c = 0
+        x, info, ier, mesg = optimize.fsolve(self.zero_f, 100, full_output=True)
+        assert info['nfev'] == self.nfev.c
+
+
+class TestLeastSq:
+    def setup_method(self):
+        x = np.linspace(0, 10, 40)
+        a,b,c = 3.1, 42, -304.2
+        self.x = x
+        self.abc = a,b,c
+        y_true = a*x**2 + b*x + c
+        np.random.seed(0)
+        self.y_meas = y_true + 0.01*np.random.standard_normal(y_true.shape)
+
+    def residuals(self, p, y, x):
+        a,b,c = p
+        err = y-(a*x**2 + b*x + c)
+        return err
+
+    def residuals_jacobian(self, _p, _y, x):
+        return -np.vstack([x**2, x, np.ones_like(x)]).T
+
+    def test_basic(self):
+        p0 = array([0,0,0])
+        params_fit, ier = leastsq(self.residuals, p0,
+                                  args=(self.y_meas, self.x))
+        assert_(ier in (1,2,3,4), 'solution not found (ier=%d)' % ier)
+        # low precision due to random
+        assert_array_almost_equal(params_fit, self.abc, decimal=2)
+
+    def test_basic_with_gradient(self):
+        p0 = array([0,0,0])
+        params_fit, ier = leastsq(self.residuals, p0,
+                                  args=(self.y_meas, self.x),
+                                  Dfun=self.residuals_jacobian)
+        assert_(ier in (1,2,3,4), 'solution not found (ier=%d)' % ier)
+        # low precision due to random
+        assert_array_almost_equal(params_fit, self.abc, decimal=2)
+
+    def test_full_output(self):
+        p0 = array([[0,0,0]])
+        full_output = leastsq(self.residuals, p0,
+                              args=(self.y_meas, self.x),
+                              full_output=True)
+        params_fit, cov_x, infodict, mesg, ier = full_output
+        assert_(ier in (1,2,3,4), f'solution not found: {mesg}')
+
+    def test_input_untouched(self):
+        p0 = array([0,0,0],dtype=float64)
+        p0_copy = array(p0, copy=True)
+        full_output = leastsq(self.residuals, p0,
+                              args=(self.y_meas, self.x),
+                              full_output=True)
+        params_fit, cov_x, infodict, mesg, ier = full_output
+        assert_(ier in (1,2,3,4), f'solution not found: {mesg}')
+        assert_array_equal(p0, p0_copy)
+
+    def test_wrong_shape_func_callable(self):
+        func = ReturnShape(1)
+        # x0 is a list of two elements, but func will return an array with
+        # length 1, so this should result in a TypeError.
+        x0 = [1.5, 2.0]
+        assert_raises(TypeError, optimize.leastsq, func, x0)
+
+    def test_wrong_shape_func_function(self):
+        # x0 is a list of two elements, but func will return an array with
+        # length 1, so this should result in a TypeError.
+        x0 = [1.5, 2.0]
+        assert_raises(TypeError, optimize.leastsq, dummy_func, x0, args=((1,),))
+
+    def test_wrong_shape_Dfun_callable(self):
+        func = ReturnShape(1)
+        deriv_func = ReturnShape((2,2))
+        assert_raises(TypeError, optimize.leastsq, func, x0=[0,1], Dfun=deriv_func)
+
+    def test_wrong_shape_Dfun_function(self):
+        def func(x):
+            return dummy_func(x, (2,))
+        def deriv_func(x):
+            return dummy_func(x, (3, 3))
+        assert_raises(TypeError, optimize.leastsq, func, x0=[0,1], Dfun=deriv_func)
+
+    def test_float32(self):
+        # Regression test for gh-1447
+        def func(p,x,y):
+            q = p[0]*np.exp(-(x-p[1])**2/(2.0*p[2]**2))+p[3]
+            return q - y
+
+        x = np.array([1.475,1.429,1.409,1.419,1.455,1.519,1.472, 1.368,1.286,
+                       1.231], dtype=np.float32)
+        y = np.array([0.0168,0.0193,0.0211,0.0202,0.0171,0.0151,0.0185,0.0258,
+                      0.034,0.0396], dtype=np.float32)
+        p0 = np.array([1.0,1.0,1.0,1.0])
+        p1, success = optimize.leastsq(func, p0, args=(x,y))
+
+        assert_(success in [1,2,3,4])
+        assert_((func(p1,x,y)**2).sum() < 1e-4 * (func(p0,x,y)**2).sum())
+
+    def test_func_can_raise(self):
+        def func(*args):
+            raise ValueError('I raised')
+
+        with assert_raises(ValueError, match='I raised'):
+            optimize.leastsq(func, x0=[0])
+
+    def test_Dfun_can_raise(self):
+        def func(x):
+            return x - np.array([10])
+
+        def deriv_func(*args):
+            raise ValueError('I raised')
+
+        with assert_raises(ValueError, match='I raised'):
+            optimize.leastsq(func, x0=[0], Dfun=deriv_func)
+
+    def test_reentrant_func(self):
+        def func(*args):
+            self.test_basic()
+            return self.residuals(*args)
+
+        p0 = array([0,0,0])
+        params_fit, ier = leastsq(func, p0,
+                                  args=(self.y_meas, self.x))
+        assert_(ier in (1,2,3,4), 'solution not found (ier=%d)' % ier)
+        # low precision due to random
+        assert_array_almost_equal(params_fit, self.abc, decimal=2)
+
+    def test_reentrant_Dfun(self):
+        def deriv_func(*args):
+            self.test_basic()
+            return self.residuals_jacobian(*args)
+
+        p0 = array([0,0,0])
+        params_fit, ier = leastsq(self.residuals, p0,
+                                  args=(self.y_meas, self.x),
+                                  Dfun=deriv_func)
+        assert_(ier in (1,2,3,4), 'solution not found (ier=%d)' % ier)
+        # low precision due to random
+        assert_array_almost_equal(params_fit, self.abc, decimal=2)
+
+    def test_concurrent_no_gradient(self):
+        v = sequence_parallel([self.test_basic] * 10)
+        assert all([result is None for result in v])
+
+    def test_concurrent_with_gradient(self):
+        v = sequence_parallel([self.test_basic_with_gradient] * 10)
+        assert all([result is None for result in v])
+
+    def test_func_input_output_length_check(self):
+
+        def func(x):
+            return 2 * (x[0] - 3) ** 2 + 1
+
+        with assert_raises(TypeError,
+                           match='Improper input: func input vector length N='):
+            optimize.leastsq(func, x0=[0, 1])
+
+
+class TestCurveFit:
+    def setup_method(self):
+        self.y = array([1.0, 3.2, 9.5, 13.7])
+        self.x = array([1.0, 2.0, 3.0, 4.0])
+
+    def test_one_argument(self):
+        def func(x,a):
+            return x**a
+        popt, pcov = curve_fit(func, self.x, self.y)
+        assert_(len(popt) == 1)
+        assert_(pcov.shape == (1,1))
+        assert_almost_equal(popt[0], 1.9149, decimal=4)
+        assert_almost_equal(pcov[0,0], 0.0016, decimal=4)
+
+        # Test if we get the same with full_output. Regression test for #1415.
+        # Also test if check_finite can be turned off.
+        res = curve_fit(func, self.x, self.y,
+                        full_output=1, check_finite=False)
+        (popt2, pcov2, infodict, errmsg, ier) = res
+        assert_array_almost_equal(popt, popt2)
+
+    def test_two_argument(self):
+        def func(x, a, b):
+            return b*x**a
+        popt, pcov = curve_fit(func, self.x, self.y)
+        assert_(len(popt) == 2)
+        assert_(pcov.shape == (2,2))
+        assert_array_almost_equal(popt, [1.7989, 1.1642], decimal=4)
+        assert_array_almost_equal(pcov, [[0.0852, -0.1260], [-0.1260, 0.1912]],
+                                  decimal=4)
+
+    def test_func_is_classmethod(self):
+        class test_self:
+            """This class tests if curve_fit passes the correct number of
+               arguments when the model function is a class instance method.
+            """
+
+            def func(self, x, a, b):
+                return b * x**a
+
+        test_self_inst = test_self()
+        popt, pcov = curve_fit(test_self_inst.func, self.x, self.y)
+        assert_(pcov.shape == (2,2))
+        assert_array_almost_equal(popt, [1.7989, 1.1642], decimal=4)
+        assert_array_almost_equal(pcov, [[0.0852, -0.1260], [-0.1260, 0.1912]],
+                                  decimal=4)
+
+    def test_regression_2639(self):
+        # This test fails if epsfcn in leastsq is too large.
+        x = [574.14200000000005, 574.154, 574.16499999999996,
+             574.17700000000002, 574.18799999999999, 574.19899999999996,
+             574.21100000000001, 574.22199999999998, 574.23400000000004,
+             574.245]
+        y = [859.0, 997.0, 1699.0, 2604.0, 2013.0, 1964.0, 2435.0,
+             1550.0, 949.0, 841.0]
+        guess = [574.1861428571428, 574.2155714285715, 1302.0, 1302.0,
+                 0.0035019999999983615, 859.0]
+        good = [5.74177150e+02, 5.74209188e+02, 1.74187044e+03, 1.58646166e+03,
+                1.0068462e-02, 8.57450661e+02]
+
+        def f_double_gauss(x, x0, x1, A0, A1, sigma, c):
+            return (A0*np.exp(-(x-x0)**2/(2.*sigma**2))
+                    + A1*np.exp(-(x-x1)**2/(2.*sigma**2)) + c)
+        popt, pcov = curve_fit(f_double_gauss, x, y, guess, maxfev=10000)
+        assert_allclose(popt, good, rtol=1e-5)
+
+    def test_pcov(self):
+        xdata = np.array([0, 1, 2, 3, 4, 5])
+        ydata = np.array([1, 1, 5, 7, 8, 12])
+        sigma = np.array([1, 2, 1, 2, 1, 2])
+
+        def f(x, a, b):
+            return a*x + b
+
+        for method in ['lm', 'trf', 'dogbox']:
+            popt, pcov = curve_fit(f, xdata, ydata, p0=[2, 0], sigma=sigma,
+                                   method=method)
+            perr_scaled = np.sqrt(np.diag(pcov))
+            assert_allclose(perr_scaled, [0.20659803, 0.57204404], rtol=1e-3)
+
+            popt, pcov = curve_fit(f, xdata, ydata, p0=[2, 0], sigma=3*sigma,
+                                   method=method)
+            perr_scaled = np.sqrt(np.diag(pcov))
+            assert_allclose(perr_scaled, [0.20659803, 0.57204404], rtol=1e-3)
+
+            popt, pcov = curve_fit(f, xdata, ydata, p0=[2, 0], sigma=sigma,
+                                   absolute_sigma=True, method=method)
+            perr = np.sqrt(np.diag(pcov))
+            assert_allclose(perr, [0.30714756, 0.85045308], rtol=1e-3)
+
+            popt, pcov = curve_fit(f, xdata, ydata, p0=[2, 0], sigma=3*sigma,
+                                   absolute_sigma=True, method=method)
+            perr = np.sqrt(np.diag(pcov))
+            assert_allclose(perr, [3*0.30714756, 3*0.85045308], rtol=1e-3)
+
+        # infinite variances
+
+        def f_flat(x, a, b):
+            return a*x
+
+        pcov_expected = np.array([np.inf]*4).reshape(2, 2)
+
+        with suppress_warnings() as sup:
+            sup.filter(OptimizeWarning,
+                       "Covariance of the parameters could not be estimated")
+            popt, pcov = curve_fit(f_flat, xdata, ydata, p0=[2, 0], sigma=sigma)
+            popt1, pcov1 = curve_fit(f, xdata[:2], ydata[:2], p0=[2, 0])
+
+        assert_(pcov.shape == (2, 2))
+        assert_array_equal(pcov, pcov_expected)
+
+        assert_(pcov1.shape == (2, 2))
+        assert_array_equal(pcov1, pcov_expected)
+
+    def test_array_like(self):
+        # Test sequence input. Regression test for gh-3037.
+        def f_linear(x, a, b):
+            return a*x + b
+
+        x = [1, 2, 3, 4]
+        y = [3, 5, 7, 9]
+        assert_allclose(curve_fit(f_linear, x, y)[0], [2, 1], atol=1e-10)
+
+    @pytest.mark.thread_unsafe
+    def test_indeterminate_covariance(self):
+        # Test that a warning is returned when pcov is indeterminate
+        xdata = np.array([1, 2, 3, 4, 5, 6])
+        ydata = np.array([1, 2, 3, 4, 5.5, 6])
+        assert_warns(OptimizeWarning, curve_fit,
+                     lambda x, a, b: a*x, xdata, ydata)
+
+    def test_NaN_handling(self):
+        # Test for correct handling of NaNs in input data: gh-3422
+
+        # create input with NaNs
+        xdata = np.array([1, np.nan, 3])
+        ydata = np.array([1, 2, 3])
+
+        assert_raises(ValueError, curve_fit,
+                      lambda x, a, b: a*x + b, xdata, ydata)
+        assert_raises(ValueError, curve_fit,
+                      lambda x, a, b: a*x + b, ydata, xdata)
+
+        assert_raises(ValueError, curve_fit, lambda x, a, b: a*x + b,
+                      xdata, ydata, **{"check_finite": True})
+
+    @staticmethod
+    def _check_nan_policy(f, xdata_with_nan, xdata_without_nan,
+                          ydata_with_nan, ydata_without_nan, method):
+        kwargs = {'f': f, 'xdata': xdata_with_nan, 'ydata': ydata_with_nan,
+                  'method': method, 'check_finite': False}
+        # propagate test
+        error_msg = ("`nan_policy='propagate'` is not supported "
+                     "by this function.")
+        with assert_raises(ValueError, match=error_msg):
+            curve_fit(**kwargs, nan_policy="propagate", maxfev=2000)
+
+        # raise test
+        with assert_raises(ValueError, match="The input contains nan"):
+            curve_fit(**kwargs, nan_policy="raise")
+
+        # omit test
+        result_with_nan, _ = curve_fit(**kwargs, nan_policy="omit")
+        kwargs['xdata'] = xdata_without_nan
+        kwargs['ydata'] = ydata_without_nan
+        result_without_nan, _ = curve_fit(**kwargs)
+        assert_allclose(result_with_nan, result_without_nan)
+
+        # not valid policy test
+        # check for argument names in any order
+        error_msg = (r"nan_policy must be one of \{(?:'raise'|'omit'|None)"
+                     r"(?:, ?(?:'raise'|'omit'|None))*\}")
+        with assert_raises(ValueError, match=error_msg):
+            curve_fit(**kwargs, nan_policy="hi")
+
+    @pytest.mark.parametrize('method', ["lm", "trf", "dogbox"])
+    def test_nan_policy_1d(self, method):
+        def f(x, a, b):
+            return a*x + b
+
+        xdata_with_nan = np.array([2, 3, np.nan, 4, 4, np.nan])
+        ydata_with_nan = np.array([1, 2, 5, 3, np.nan, 7])
+        xdata_without_nan = np.array([2, 3, 4])
+        ydata_without_nan = np.array([1, 2, 3])
+
+        self._check_nan_policy(f, xdata_with_nan, xdata_without_nan,
+                               ydata_with_nan, ydata_without_nan, method)
+
+    @pytest.mark.parametrize('method', ["lm", "trf", "dogbox"])
+    def test_nan_policy_2d(self, method):
+        def f(x, a, b):
+            x1 = x[0, :]
+            x2 = x[1, :]
+            return a*x1 + b + x2
+
+        xdata_with_nan = np.array([[2, 3, np.nan, 4, 4, np.nan, 5],
+                                   [2, 3, np.nan, np.nan, 4, np.nan, 7]])
+        ydata_with_nan = np.array([1, 2, 5, 3, np.nan, 7, 10])
+        xdata_without_nan = np.array([[2, 3, 5], [2, 3, 7]])
+        ydata_without_nan = np.array([1, 2, 10])
+
+        self._check_nan_policy(f, xdata_with_nan, xdata_without_nan,
+                               ydata_with_nan, ydata_without_nan, method)
+
+    @pytest.mark.parametrize('n', [2, 3])
+    @pytest.mark.parametrize('method', ["lm", "trf", "dogbox"])
+    def test_nan_policy_2_3d(self, n, method):
+        def f(x, a, b):
+            x1 = x[..., 0, :].squeeze()
+            x2 = x[..., 1, :].squeeze()
+            return a*x1 + b + x2
+
+        xdata_with_nan = np.array([[[2, 3, np.nan, 4, 4, np.nan, 5],
+                                   [2, 3, np.nan, np.nan, 4, np.nan, 7]]])
+        xdata_with_nan = xdata_with_nan.squeeze() if n == 2 else xdata_with_nan
+        ydata_with_nan = np.array([1, 2, 5, 3, np.nan, 7, 10])
+        xdata_without_nan = np.array([[[2, 3, 5], [2, 3, 7]]])
+        ydata_without_nan = np.array([1, 2, 10])
+
+        self._check_nan_policy(f, xdata_with_nan, xdata_without_nan,
+                               ydata_with_nan, ydata_without_nan, method)
+
+    def test_empty_inputs(self):
+        # Test both with and without bounds (regression test for gh-9864)
+        assert_raises(ValueError, curve_fit, lambda x, a: a*x, [], [])
+        assert_raises(ValueError, curve_fit, lambda x, a: a*x, [], [],
+                      bounds=(1, 2))
+        assert_raises(ValueError, curve_fit, lambda x, a: a*x, [1], [])
+        assert_raises(ValueError, curve_fit, lambda x, a: a*x, [2], [],
+                      bounds=(1, 2))
+
+    def test_function_zero_params(self):
+        # Fit args is zero, so "Unable to determine number of fit parameters."
+        assert_raises(ValueError, curve_fit, lambda x: x, [1, 2], [3, 4])
+
+    def test_None_x(self):  # Added in GH10196
+        popt, pcov = curve_fit(lambda _, a: a * np.arange(10),
+                               None, 2 * np.arange(10))
+        assert_allclose(popt, [2.])
+
+    def test_method_argument(self):
+        def f(x, a, b):
+            return a * np.exp(-b*x)
+
+        xdata = np.linspace(0, 1, 11)
+        ydata = f(xdata, 2., 2.)
+
+        for method in ['trf', 'dogbox', 'lm', None]:
+            popt, pcov = curve_fit(f, xdata, ydata, method=method)
+            assert_allclose(popt, [2., 2.])
+
+        assert_raises(ValueError, curve_fit, f, xdata, ydata, method='unknown')
+
+    def test_full_output(self):
+        def f(x, a, b):
+            return a * np.exp(-b * x)
+
+        xdata = np.linspace(0, 1, 11)
+        ydata = f(xdata, 2., 2.)
+
+        for method in ['trf', 'dogbox', 'lm', None]:
+            popt, pcov, infodict, errmsg, ier = curve_fit(
+                f, xdata, ydata, method=method, full_output=True)
+            assert_allclose(popt, [2., 2.])
+            assert "nfev" in infodict
+            assert "fvec" in infodict
+            if method == 'lm' or method is None:
+                assert "fjac" in infodict
+                assert "ipvt" in infodict
+                assert "qtf" in infodict
+            assert isinstance(errmsg, str)
+            assert ier in (1, 2, 3, 4)
+
+    def test_bounds(self):
+        def f(x, a, b):
+            return a * np.exp(-b*x)
+
+        xdata = np.linspace(0, 1, 11)
+        ydata = f(xdata, 2., 2.)
+
+        # The minimum w/out bounds is at [2., 2.],
+        # and with bounds it's at [1.5, smth].
+        lb = [1., 0]
+        ub = [1.5, 3.]
+
+        # Test that both variants of the bounds yield the same result
+        bounds = (lb, ub)
+        bounds_class = Bounds(lb, ub)
+        for method in [None, 'trf', 'dogbox']:
+            popt, pcov = curve_fit(f, xdata, ydata, bounds=bounds,
+                                   method=method)
+            assert_allclose(popt[0], 1.5)
+
+            popt_class, pcov_class = curve_fit(f, xdata, ydata,
+                                               bounds=bounds_class,
+                                               method=method)
+            assert_allclose(popt_class, popt)
+
+        # With bounds, the starting estimate is feasible.
+        popt, pcov = curve_fit(f, xdata, ydata, method='trf',
+                               bounds=([0., 0], [0.6, np.inf]))
+        assert_allclose(popt[0], 0.6)
+
+        # method='lm' doesn't support bounds.
+        assert_raises(ValueError, curve_fit, f, xdata, ydata, bounds=bounds,
+                      method='lm')
+
+    def test_bounds_p0(self):
+        # This test is for issue #5719. The problem was that an initial guess
+        # was ignored when 'trf' or 'dogbox' methods were invoked.
+        def f(x, a):
+            return np.sin(x + a)
+
+        xdata = np.linspace(-2*np.pi, 2*np.pi, 40)
+        ydata = np.sin(xdata)
+        bounds = (-3 * np.pi, 3 * np.pi)
+        for method in ['trf', 'dogbox']:
+            popt_1, _ = curve_fit(f, xdata, ydata, p0=2.1*np.pi)
+            popt_2, _ = curve_fit(f, xdata, ydata, p0=2.1*np.pi,
+                                  bounds=bounds, method=method)
+
+            # If the initial guess is ignored, then popt_2 would be close 0.
+            assert_allclose(popt_1, popt_2)
+
+    def test_jac(self):
+        # Test that Jacobian callable is handled correctly and
+        # weighted if sigma is provided.
+        def f(x, a, b):
+            return a * np.exp(-b*x)
+
+        def jac(x, a, b):
+            e = np.exp(-b*x)
+            return np.vstack((e, -a * x * e)).T
+
+        xdata = np.linspace(0, 1, 11)
+        ydata = f(xdata, 2., 2.)
+
+        # Test numerical options for least_squares backend.
+        for method in ['trf', 'dogbox']:
+            for scheme in ['2-point', '3-point', 'cs']:
+                popt, pcov = curve_fit(f, xdata, ydata, jac=scheme,
+                                       method=method)
+                assert_allclose(popt, [2, 2])
+
+        # Test the analytic option.
+        for method in ['lm', 'trf', 'dogbox']:
+            popt, pcov = curve_fit(f, xdata, ydata, method=method, jac=jac)
+            assert_allclose(popt, [2, 2])
+
+        # Now add an outlier and provide sigma.
+        ydata[5] = 100
+        sigma = np.ones(xdata.shape[0])
+        sigma[5] = 200
+        for method in ['lm', 'trf', 'dogbox']:
+            popt, pcov = curve_fit(f, xdata, ydata, sigma=sigma, method=method,
+                                   jac=jac)
+            # Still the optimization process is influenced somehow,
+            # have to set rtol=1e-3.
+            assert_allclose(popt, [2, 2], rtol=1e-3)
+
+    def test_maxfev_and_bounds(self):
+        # gh-6340: with no bounds, curve_fit accepts parameter maxfev (via leastsq)
+        # but with bounds, the parameter is `max_nfev` (via least_squares)
+        x = np.arange(0, 10)
+        y = 2*x
+        popt1, _ = curve_fit(lambda x,p: p*x, x, y, bounds=(0, 3), maxfev=100)
+        popt2, _ = curve_fit(lambda x,p: p*x, x, y, bounds=(0, 3), max_nfev=100)
+
+        assert_allclose(popt1, 2, atol=1e-14)
+        assert_allclose(popt2, 2, atol=1e-14)
+
+    @pytest.mark.parametrize("sigma_dim", [0, 1, 2])
+    def test_curvefit_omitnan(self, sigma_dim):
+        def exponential(x, a, b):
+            return b * np.exp(a * x)
+
+        rng = np.random.default_rng(578285731148908)
+        N = 100
+        x = np.linspace(1, 10, N)
+        y = exponential(x, 0.2, 0.5)
+
+        if (sigma_dim == 0):
+            sigma = 0.05
+            y += rng.normal(0, sigma, N)
+
+        elif (sigma_dim == 1):
+            sigma = x * 0.05
+            y += rng.normal(0, sigma, N)
+
+        elif (sigma_dim == 2):
+            # The covariance matrix must be symmetric positive-semidefinite
+            a = rng.normal(0, 2, (N, N))
+            sigma = a @ a.T
+            y += rng.multivariate_normal(np.zeros_like(x), sigma)
+        else:
+            assert False, "The sigma must be a scalar, 1D array or 2D array."
+
+        p0 = [0.1, 1.0]
+
+        # Choose indices to place NaNs.
+        i_x = rng.integers(N, size=5)
+        i_y = rng.integers(N, size=5)
+
+        # Add NaNs and compute result using `curve_fit`
+        x[i_x] = np.nan
+        y[i_y] = np.nan
+        res_opt, res_cov = curve_fit(exponential, x, y, p0=p0, sigma=sigma,
+                                     nan_policy="omit")
+
+        # Manually remove elements that should be eliminated, and
+        # calculate reference using `curve_fit`
+        i_delete = np.unique(np.concatenate((i_x, i_y)))
+        x = np.delete(x, i_delete, axis=0)
+        y = np.delete(y, i_delete, axis=0)
+
+        sigma = np.asarray(sigma)
+        if sigma.ndim == 1:
+            sigma = np.delete(sigma, i_delete)
+        elif sigma.ndim == 2:
+            sigma = np.delete(sigma, i_delete, axis=0)
+            sigma = np.delete(sigma, i_delete, axis=1)
+        ref_opt, ref_cov = curve_fit(exponential, x, y, p0=p0, sigma=sigma)
+
+        assert_allclose(res_opt, ref_opt, atol=1e-14)
+        assert_allclose(res_cov, ref_cov, atol=1e-14)
+
+    def test_curvefit_simplecovariance(self):
+
+        def func(x, a, b):
+            return a * np.exp(-b*x)
+
+        def jac(x, a, b):
+            e = np.exp(-b*x)
+            return np.vstack((e, -a * x * e)).T
+
+        np.random.seed(0)
+        xdata = np.linspace(0, 4, 50)
+        y = func(xdata, 2.5, 1.3)
+        ydata = y + 0.2 * np.random.normal(size=len(xdata))
+
+        sigma = np.zeros(len(xdata)) + 0.2
+        covar = np.diag(sigma**2)
+
+        for jac1, jac2 in [(jac, jac), (None, None)]:
+            for absolute_sigma in [False, True]:
+                popt1, pcov1 = curve_fit(func, xdata, ydata, sigma=sigma,
+                        jac=jac1, absolute_sigma=absolute_sigma)
+                popt2, pcov2 = curve_fit(func, xdata, ydata, sigma=covar,
+                        jac=jac2, absolute_sigma=absolute_sigma)
+
+                assert_allclose(popt1, popt2, atol=1e-14)
+                assert_allclose(pcov1, pcov2, atol=1e-14)
+
+    def test_curvefit_covariance(self):
+
+        def funcp(x, a, b):
+            rotn = np.array([[1./np.sqrt(2), -1./np.sqrt(2), 0],
+                             [1./np.sqrt(2), 1./np.sqrt(2), 0],
+                             [0, 0, 1.0]])
+            return rotn.dot(a * np.exp(-b*x))
+
+        def jacp(x, a, b):
+            rotn = np.array([[1./np.sqrt(2), -1./np.sqrt(2), 0],
+                             [1./np.sqrt(2), 1./np.sqrt(2), 0],
+                             [0, 0, 1.0]])
+            e = np.exp(-b*x)
+            return rotn.dot(np.vstack((e, -a * x * e)).T)
+
+        def func(x, a, b):
+            return a * np.exp(-b*x)
+
+        def jac(x, a, b):
+            e = np.exp(-b*x)
+            return np.vstack((e, -a * x * e)).T
+
+        rng = np.random.RandomState(0)
+        xdata = np.arange(1, 4)
+        y = func(xdata, 2.5, 1.0)
+        ydata = y + 0.2 * rng.normal(size=len(xdata))
+        sigma = np.zeros(len(xdata)) + 0.2
+        covar = np.diag(sigma**2)
+        # Get a rotation matrix, and obtain ydatap = R ydata
+        # Chisq = ydata^T C^{-1} ydata
+        #       = ydata^T R^T R C^{-1} R^T R ydata
+        #       = ydatap^T Cp^{-1} ydatap
+        # Cp^{-1} = R C^{-1} R^T
+        # Cp      = R C R^T, since R^-1 = R^T
+        rotn = np.array([[1./np.sqrt(2), -1./np.sqrt(2), 0],
+                         [1./np.sqrt(2), 1./np.sqrt(2), 0],
+                         [0, 0, 1.0]])
+        ydatap = rotn.dot(ydata)
+        covarp = rotn.dot(covar).dot(rotn.T)
+
+        for jac1, jac2 in [(jac, jacp), (None, None)]:
+            for absolute_sigma in [False, True]:
+                popt1, pcov1 = curve_fit(func, xdata, ydata, sigma=sigma,
+                        jac=jac1, absolute_sigma=absolute_sigma)
+                popt2, pcov2 = curve_fit(funcp, xdata, ydatap, sigma=covarp,
+                        jac=jac2, absolute_sigma=absolute_sigma)
+
+                assert_allclose(popt1, popt2, rtol=1.2e-7, atol=1e-14)
+                assert_allclose(pcov1, pcov2, rtol=1.2e-7, atol=1e-14)
+
+    @pytest.mark.parametrize("absolute_sigma", [False, True])
+    def test_curvefit_scalar_sigma(self, absolute_sigma):
+        def func(x, a, b):
+            return a * x + b
+
+        x, y = self.x, self.y
+        _, pcov1 = curve_fit(func, x, y, sigma=2, absolute_sigma=absolute_sigma)
+        # Explicitly building the sigma 1D array
+        _, pcov2 = curve_fit(
+                func, x, y, sigma=np.full_like(y, 2), absolute_sigma=absolute_sigma
+        )
+        assert np.all(pcov1 == pcov2)
+
+    def test_dtypes(self):
+        # regression test for gh-9581: curve_fit fails if x and y dtypes differ
+        x = np.arange(-3, 5)
+        y = 1.5*x + 3.0 + 0.5*np.sin(x)
+
+        def func(x, a, b):
+            return a*x + b
+
+        for method in ['lm', 'trf', 'dogbox']:
+            for dtx in [np.float32, np.float64]:
+                for dty in [np.float32, np.float64]:
+                    x = x.astype(dtx)
+                    y = y.astype(dty)
+
+                with warnings.catch_warnings():
+                    warnings.simplefilter("error", OptimizeWarning)
+                    p, cov = curve_fit(func, x, y, method=method)
+
+                    assert np.isfinite(cov).all()
+                    assert not np.allclose(p, 1)   # curve_fit's initial value
+
+    def test_dtypes2(self):
+        # regression test for gh-7117: curve_fit fails if
+        # both inputs are float32
+        def hyperbola(x, s_1, s_2, o_x, o_y, c):
+            b_2 = (s_1 + s_2) / 2
+            b_1 = (s_2 - s_1) / 2
+            return o_y + b_1*(x-o_x) + b_2*np.sqrt((x-o_x)**2 + c**2/4)
+
+        min_fit = np.array([-3.0, 0.0, -2.0, -10.0, 0.0])
+        max_fit = np.array([0.0, 3.0, 3.0, 0.0, 10.0])
+        guess = np.array([-2.5/3.0, 4/3.0, 1.0, -4.0, 0.5])
+
+        params = [-2, .4, -1, -5, 9.5]
+        xdata = np.array([-32, -16, -8, 4, 4, 8, 16, 32])
+        ydata = hyperbola(xdata, *params)
+
+        # run optimization twice, with xdata being float32 and float64
+        popt_64, _ = curve_fit(f=hyperbola, xdata=xdata, ydata=ydata, p0=guess,
+                               bounds=(min_fit, max_fit))
+
+        xdata = xdata.astype(np.float32)
+        ydata = hyperbola(xdata, *params)
+
+        popt_32, _ = curve_fit(f=hyperbola, xdata=xdata, ydata=ydata, p0=guess,
+                               bounds=(min_fit, max_fit))
+
+        assert_allclose(popt_32, popt_64, atol=2e-5)
+
+    def test_broadcast_y(self):
+        xdata = np.arange(10)
+        target = 4.7 * xdata ** 2 + 3.5 * xdata + np.random.rand(len(xdata))
+        def fit_func(x, a, b):
+            return a * x ** 2 + b * x - target
+        for method in ['lm', 'trf', 'dogbox']:
+            popt0, pcov0 = curve_fit(fit_func,
+                                     xdata=xdata,
+                                     ydata=np.zeros_like(xdata),
+                                     method=method)
+            popt1, pcov1 = curve_fit(fit_func,
+                                     xdata=xdata,
+                                     ydata=0,
+                                     method=method)
+            assert_allclose(pcov0, pcov1)
+
+    def test_args_in_kwargs(self):
+        # Ensure that `args` cannot be passed as keyword argument to `curve_fit`
+
+        def func(x, a, b):
+            return a * x + b
+
+        with assert_raises(ValueError):
+            curve_fit(func,
+                      xdata=[1, 2, 3, 4],
+                      ydata=[5, 9, 13, 17],
+                      p0=[1],
+                      args=(1,))
+
+    def test_data_point_number_validation(self):
+        def func(x, a, b, c, d, e):
+            return a * np.exp(-b * x) + c + d + e
+
+        with assert_raises(TypeError, match="The number of func parameters="):
+            curve_fit(func,
+                      xdata=[1, 2, 3, 4],
+                      ydata=[5, 9, 13, 17])
+
+    @pytest.mark.filterwarnings('ignore::RuntimeWarning')
+    def test_gh4555(self):
+        # gh-4555 reported that covariance matrices returned by `leastsq`
+        # can have negative diagonal elements and eigenvalues. (In fact,
+        # they can also be asymmetric.) This shows up in the output of
+        # `scipy.optimize.curve_fit`. Check that it has been resolved.giit
+        def f(x, a, b, c, d, e):
+            return a*np.log(x + 1 + b) + c*np.log(x + 1 + d) + e
+
+        rng = np.random.default_rng(408113519974467917)
+        n = 100
+        x = np.arange(n)
+        y = np.linspace(2, 7, n) + rng.random(n)
+        p, cov = optimize.curve_fit(f, x, y, maxfev=100000)
+        assert np.all(np.diag(cov) > 0)
+        eigs = linalg.eigh(cov)[0]  # separate line for debugging
+        # some platforms see a small negative eigevenvalue
+        assert np.all(eigs > -1e-2)
+        assert_allclose(cov, cov.T)
+
+    def test_gh4555b(self):
+        # check that PR gh-17247 did not significantly change covariance matrix
+        # for simple cases
+        rng = np.random.default_rng(408113519974467917)
+
+        def func(x, a, b, c):
+            return a * np.exp(-b * x) + c
+
+        xdata = np.linspace(0, 4, 50)
+        y = func(xdata, 2.5, 1.3, 0.5)
+        y_noise = 0.2 * rng.normal(size=xdata.size)
+        ydata = y + y_noise
+        _, res = curve_fit(func, xdata, ydata)
+        # reference from commit 1d80a2f254380d2b45733258ca42eb6b55c8755b
+        ref = [[+0.0158972536486215, 0.0069207183284242, -0.0007474400714749],
+               [+0.0069207183284242, 0.0205057958128679, +0.0053997711275403],
+               [-0.0007474400714749, 0.0053997711275403, +0.0027833930320877]]
+        # Linux_Python_38_32bit_full fails with default tolerance
+        assert_allclose(res, ref, 2e-7)
+
+    def test_gh13670(self):
+        # gh-13670 reported that `curve_fit` executes callables
+        # with the same values of the parameters at the beginning of
+        # optimization. Check that this has been resolved.
+
+        rng = np.random.default_rng(8250058582555444926)
+        x = np.linspace(0, 3, 101)
+        y = 2 * x + 1 + rng.normal(size=101) * 0.5
+
+        def line(x, *p):
+            assert not np.all(line.last_p == p)
+            line.last_p = p
+            return x * p[0] + p[1]
+
+        def jac(x, *p):
+            assert not np.all(jac.last_p == p)
+            jac.last_p = p
+            return np.array([x, np.ones_like(x)]).T
+
+        line.last_p = None
+        jac.last_p = None
+        p0 = np.array([1.0, 5.0])
+        curve_fit(line, x, y, p0, method='lm', jac=jac)
+
+    @pytest.mark.parametrize('method', ['trf', 'dogbox'])
+    def test_gh20155_error_mentions_x0(self, method):
+        # `curve_fit` produced an error message that referred to an undocumented
+        # variable `x0`, which was really `p0`. Check that this is resolved.
+        def func(x,a):
+            return x**a
+        message = "Initial guess is outside of provided bounds"
+        with pytest.raises(ValueError, match=message):
+            curve_fit(func, self.x, self.y, p0=[1], bounds=(1000, 1001),
+                      method=method)
+
+
+class TestFixedPoint:
+
+    def test_scalar_trivial(self):
+        # f(x) = 2x; fixed point should be x=0
+        def func(x):
+            return 2.0*x
+        x0 = 1.0
+        x = fixed_point(func, x0)
+        assert_almost_equal(x, 0.0)
+
+    def test_scalar_basic1(self):
+        # f(x) = x**2; x0=1.05; fixed point should be x=1
+        def func(x):
+            return x**2
+        x0 = 1.05
+        x = fixed_point(func, x0)
+        assert_almost_equal(x, 1.0)
+
+    def test_scalar_basic2(self):
+        # f(x) = x**0.5; x0=1.05; fixed point should be x=1
+        def func(x):
+            return x**0.5
+        x0 = 1.05
+        x = fixed_point(func, x0)
+        assert_almost_equal(x, 1.0)
+
+    def test_array_trivial(self):
+        def func(x):
+            return 2.0*x
+        x0 = [0.3, 0.15]
+        with np.errstate(all='ignore'):
+            x = fixed_point(func, x0)
+        assert_almost_equal(x, [0.0, 0.0])
+
+    def test_array_basic1(self):
+        # f(x) = c * x**2; fixed point should be x=1/c
+        def func(x, c):
+            return c * x**2
+        c = array([0.75, 1.0, 1.25])
+        x0 = [1.1, 1.15, 0.9]
+        with np.errstate(all='ignore'):
+            x = fixed_point(func, x0, args=(c,))
+        assert_almost_equal(x, 1.0/c)
+
+    def test_array_basic2(self):
+        # f(x) = c * x**0.5; fixed point should be x=c**2
+        def func(x, c):
+            return c * x**0.5
+        c = array([0.75, 1.0, 1.25])
+        x0 = [0.8, 1.1, 1.1]
+        x = fixed_point(func, x0, args=(c,))
+        assert_almost_equal(x, c**2)
+
+    def test_lambertw(self):
+        # python-list/2010-December/594592.html
+        xxroot = fixed_point(lambda xx: np.exp(-2.0*xx)/2.0, 1.0,
+                args=(), xtol=1e-12, maxiter=500)
+        assert_allclose(xxroot, np.exp(-2.0*xxroot)/2.0)
+        assert_allclose(xxroot, lambertw(1)/2)
+
+    def test_no_acceleration(self):
+        # GitHub issue 5460
+        ks = 2
+        kl = 6
+        m = 1.3
+        n0 = 1.001
+        i0 = ((m-1)/m)*(kl/ks/m)**(1/(m-1))
+
+        def func(n):
+            return np.log(kl/ks/n) / np.log(i0*n/(n - 1)) + 1
+
+        n = fixed_point(func, n0, method='iteration')
+        assert_allclose(n, m)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nnls.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nnls.py
new file mode 100644
index 0000000000000000000000000000000000000000..67443dd6147bd7ee8898bac2a1a7993f6e56e799
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nnls.py
@@ -0,0 +1,429 @@
+import numpy as np
+from numpy.testing import assert_allclose
+from pytest import raises as assert_raises
+from scipy.optimize import nnls
+
+
+class TestNNLS:
+    def setup_method(self):
+        self.rng = np.random.default_rng(1685225766635251)
+
+    def test_nnls(self):
+        a = np.arange(25.0).reshape(-1, 5)
+        x = np.arange(5.0)
+        y = a @ x
+        x, res = nnls(a, y)
+        assert res < 1e-7
+        assert np.linalg.norm((a @ x) - y) < 1e-7
+
+    def test_nnls_tall(self):
+        a = self.rng.uniform(low=-10, high=10, size=[50, 10])
+        x = np.abs(self.rng.uniform(low=-2, high=2, size=[10]))
+        x[::2] = 0
+        b = a @ x
+        xact, rnorm = nnls(a, b, atol=500*np.linalg.norm(a, 1)*np.spacing(1.))
+        assert_allclose(xact, x, rtol=0., atol=1e-10)
+        assert rnorm < 1e-12
+
+    def test_nnls_wide(self):
+        # If too wide then problem becomes too ill-conditioned ans starts
+        # emitting warnings, hence small m, n difference.
+        a = self.rng.uniform(low=-10, high=10, size=[100, 120])
+        x = np.abs(self.rng.uniform(low=-2, high=2, size=[120]))
+        x[::2] = 0
+        b = a @ x
+        xact, rnorm = nnls(a, b, atol=500*np.linalg.norm(a, 1)*np.spacing(1.))
+        assert_allclose(xact, x, rtol=0., atol=1e-10)
+        assert rnorm < 1e-12
+
+    def test_maxiter(self):
+        # test that maxiter argument does stop iterations
+        a = self.rng.uniform(size=(5, 10))
+        b = self.rng.uniform(size=5)
+        with assert_raises(RuntimeError):
+            nnls(a, b, maxiter=1)
+
+    def test_nnls_inner_loop_case1(self):
+        # See gh-20168
+        n = np.array(
+            [3, 2, 0, 1, 1, 1, 3, 8, 14, 16, 29, 23, 41, 47, 53, 57, 67, 76,
+             103, 89, 97, 94, 85, 95, 78, 78, 78, 77, 73, 50, 50, 56, 68, 98,
+             95, 112, 134, 145, 158, 172, 213, 234, 222, 215, 216, 216, 206,
+             183, 135, 156, 110, 92, 63, 60, 52, 29, 20, 16, 12, 5, 5, 5, 1, 2,
+             3, 0, 2])
+        k = np.array(
+            [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+             0., 0., 0., 0.7205812007860187, 0., 1.4411624015720375,
+             0.7205812007860187, 2.882324803144075, 5.76464960628815,
+             5.76464960628815, 12.249880413362318, 15.132205216506394,
+             20.176273622008523, 27.382085629868712, 48.27894045266326,
+             47.558359251877235, 68.45521407467177, 97.99904330689854,
+             108.0871801179028, 135.46926574777152, 140.51333415327366,
+             184.4687874012208, 171.49832578707245, 205.36564222401535,
+             244.27702706646033, 214.01261663344755, 228.42424064916793,
+             232.02714665309804, 205.36564222401535, 172.9394881886445,
+             191.67459940908097, 162.1307701768542, 153.48379576742198,
+             110.96950492104689, 103.04311171240067, 86.46974409432225,
+             60.528820866025576, 43.234872047161126, 23.779179625938617,
+             24.499760826724636, 17.29394881886445, 11.5292992125763,
+             5.76464960628815, 5.044068405502131, 3.6029060039300935, 0.,
+             2.882324803144075, 0., 0., 0.])
+        d = np.array(
+            [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+             0., 0., 0., 0.003889242101538, 0., 0.007606268390096, 0.,
+             0.025457371599973, 0.036952882091577, 0., 0.08518359183449,
+             0.048201126400243, 0.196234990022205, 0.144116240157247,
+             0.171145134062442, 0., 0., 0.269555036538714, 0., 0., 0.,
+             0.010893241091872, 0., 0., 0., 0., 0., 0., 0., 0.,
+             0.048167058272886, 0.011238724891049, 0., 0., 0.055162603456078,
+             0., 0., 0., 0., 0.027753339088588, 0., 0., 0., 0., 0., 0., 0., 0.,
+             0., 0.])
+        # The following code sets up a system of equations such that
+        # $k_i-p_i*n_i$ is minimized for $p_i$ with weights $n_i$ and
+        # monotonicity constraints on $p_i$. This translates to a system of
+        # equations of the form $k_i - (d_1 + ... + d_i) * n_i$ and
+        # non-negativity constraints on the $d_i$. If $n_i$ is zero the
+        # system is modified such that $d_i - d_{i+1}$ is then minimized.
+        N = len(n)
+        A = np.diag(n) @ np.tril(np.ones((N, N)))
+        w = n ** 0.5
+
+        nz = (n == 0).nonzero()[0]
+        A[nz, nz] = 1
+        A[nz, np.minimum(nz + 1, N - 1)] = -1
+        w[nz] = 1
+        k[nz] = 0
+        W = np.diag(w)
+
+        # Small perturbations can already make the infinite loop go away (just
+        # uncomment the next line)
+        # k = k + 1e-10 * np.random.normal(size=N)
+        dact, _ = nnls(W @ A, W @ k)
+        assert_allclose(dact, d, rtol=0., atol=1e-10)
+
+    def test_nnls_inner_loop_case2(self):
+        # See gh-20168
+        n = np.array(
+            [1, 0, 1, 2, 2, 2, 3, 3, 5, 4, 14, 14, 19, 26, 36, 42, 36, 64, 64,
+             64, 81, 85, 85, 95, 95, 95, 75, 76, 69, 81, 62, 59, 68, 64, 71, 67,
+             74, 78, 118, 135, 153, 159, 210, 195, 218, 243, 236, 215, 196, 175,
+             185, 149, 144, 103, 104, 75, 56, 40, 32, 26, 17, 9, 12, 8, 2, 1, 1,
+             1])
+        k = np.array(
+            [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+             0., 0., 0., 0., 0., 0.7064355064917867, 0., 0., 2.11930651947536,
+             0.7064355064917867, 0., 3.5321775324589333, 7.064355064917867,
+             11.302968103868587, 16.95445215580288, 20.486629688261814,
+             20.486629688261814, 37.44108184406469, 55.808405012851146,
+             78.41434122058831, 103.13958394780086, 105.965325973768,
+             125.74552015553803, 149.057891869767, 176.60887662294667,
+             197.09550631120848, 211.930651947536, 204.86629688261814,
+             233.8301526487814, 221.1143135319292, 195.6826352982249,
+             197.80194181770025, 191.4440222592742, 187.91184472681525,
+             144.11284332432447, 131.39700420747232, 116.5618585711448,
+             93.24948685691584, 89.01087381796512, 53.68909849337579,
+             45.211872415474346, 31.083162285638615, 24.72524272721253,
+             16.95445215580288, 9.890097090885014, 9.890097090885014,
+             2.8257420259671466, 2.8257420259671466, 1.4128710129835733,
+             0.7064355064917867, 1.4128710129835733])
+        d = np.array(
+            [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
+             0., 0., 0., 0., 0., 0.0021916146355674473, 0., 0.,
+             0.011252740799789484, 0., 0., 0.037746623295934395,
+             0.03602328132946222, 0.09509167709829734, 0.10505765870204821,
+             0.01391037014274718, 0.0188296228752321, 0.20723559202324254,
+             0.3056220879462608, 0.13304643490426477, 0., 0., 0., 0., 0., 0.,
+             0., 0., 0., 0., 0., 0.043185876949706214, 0.0037266261379722554,
+             0., 0., 0., 0., 0., 0.094797899357143, 0., 0., 0., 0., 0., 0., 0.,
+             0., 0.23450935613672663, 0., 0., 0.07064355064917871])
+        # The following code sets up a system of equations such that
+        # $k_i-p_i*n_i$ is minimized for $p_i$ with weights $n_i$ and
+        # monotonicity constraints on $p_i$. This translates to a system of
+        # equations of the form $k_i - (d_1 + ... + d_i) * n_i$ and
+        # non-negativity constraints on the $d_i$. If $n_i$ is zero the
+        # system is modified such that $d_i - d_{i+1}$ is then minimized.
+        N = len(n)
+        A = np.diag(n) @ np.tril(np.ones((N, N)))
+        w = n ** 0.5
+
+        nz = (n == 0).nonzero()[0]
+        A[nz, nz] = 1
+        A[nz, np.minimum(nz + 1, N - 1)] = -1
+        w[nz] = 1
+        k[nz] = 0
+        W = np.diag(w)
+
+        dact, _ = nnls(W @ A, W @ k, atol=1e-7)
+
+        p = np.cumsum(dact)
+        assert np.all(dact >= 0)
+        assert np.linalg.norm(k - n * p, ord=np.inf) < 28
+        assert_allclose(dact, d, rtol=0., atol=1e-10)
+
+    def test_nnls_gh20302(self):
+        # See gh-20302
+        A = np.array(
+            [0.33408569134321575, 0.11136189711440525, 0.049140798007949286,
+             0.03712063237146841, 0.055680948557202625, 0.16642814595936478,
+             0.11095209730624318, 0.09791993030943345, 0.14793612974165757,
+             0.44380838922497273, 0.11099502671044059, 0.11099502671044059,
+             0.14693672599330593, 0.3329850801313218, 1.498432860590948,
+             0.0832374225132955, 0.11098323001772734, 0.19589481249472837,
+             0.5919105600945457, 3.5514633605672747, 0.06658716751427037,
+             0.11097861252378394, 0.24485832778293645, 0.9248217710315328,
+             6.936163282736496, 0.05547609388181014, 0.11095218776362029,
+             0.29376003042571264, 1.3314262531634435, 11.982836278470993,
+             0.047506113282944136, 0.11084759766020298, 0.3423969672933396,
+             1.8105107617833156, 19.010362998724812, 0.041507335004505576,
+             0.11068622667868154, 0.39074115283013344, 2.361306169145206,
+             28.335674029742474, 0.03682846280947718, 0.11048538842843154,
+             0.4387861797121048, 2.9831054875676517, 40.2719240821633,
+             0.03311278164362387, 0.11037593881207958, 0.4870572300443105,
+             3.6791979604026523, 55.187969406039784, 0.030079304092299915,
+             0.11029078167176636, 0.5353496017200152, 4.448394860761242,
+             73.3985152025605, 0.02545939709595835, 0.11032405408248619,
+             0.6328767609778363, 6.214921713313388, 121.19097340961108,
+             0.022080881724881523, 0.11040440862440762, 0.7307742886903428,
+             8.28033064683057, 186.30743955368786, 0.020715838214945492,
+             0.1104844704797093, 0.7800578384588346, 9.42800814760186,
+             226.27219554244465, 0.01843179728340054, 0.11059078370040323,
+             0.8784095015912599, 11.94380463964355, 322.48272527037585,
+             0.015812787653789077, 0.11068951357652354, 1.0257259848595766,
+             16.27135849574896, 512.5477926160922, 0.014438550529330062,
+             0.11069555405819713, 1.1234754801775881, 19.519316032262093,
+             673.4164031130423, 0.012760770585072577, 0.110593345070629,
+             1.2688431112524712, 24.920367089248398, 971.8943164806875,
+             0.011427556646114315, 0.11046638091243838, 1.413623342459821,
+             30.967408782453557, 1347.0822820367298, 0.010033330264470307,
+             0.11036663290917338, 1.6071533470570285, 40.063087746029936,
+             1983.122843428482, 0.008950061496507258, 0.11038409179025618,
+             1.802244865119193, 50.37194055362024, 2795.642700725923,
+             0.008071078821135658, 0.11030474388885401, 1.9956465761433504,
+             61.80742482572119, 3801.1566267818534, 0.007191031207777556,
+             0.11026247851925586, 2.238160187262168, 77.7718015155818,
+             5366.2543045751445, 0.00636834224248, 0.11038459886965334,
+             2.5328963107984297, 99.49331844784753, 7760.4788389321075,
+             0.005624259098118485, 0.11061042892966355, 2.879742607664547,
+             128.34496770138628, 11358.529641572684, 0.0050354270614989555,
+             0.11077939535297703, 3.2263279459292575, 160.85168205252265,
+             15924.316523199741, 0.0044997853165982555, 0.1109947044760903,
+             3.6244287189055613, 202.60233390369015, 22488.859063309606,
+             0.004023601950058174, 0.1113196539516095, 4.07713905729421,
+             255.6270320242126, 31825.565487014468, 0.0036024117873727094,
+             0.111674765408554, 4.582933773135057, 321.9583486728612,
+             44913.18963986413, 0.003201503089582304, 0.11205260813538065,
+             5.191786833370116, 411.79333489752383, 64857.45024636,
+             0.0028633044552448853, 0.11262330857296549, 5.864295861648949,
+             522.7223161899905, 92521.84996562831, 0.0025691897303891965,
+             0.11304434813712465, 6.584584405106342, 656.5615739804199,
+             129999.19164812315, 0.0022992911894424675, 0.11343169867916175,
+             7.4080129906658305, 828.2026426227864, 183860.98666225857,
+             0.0020449922071108764, 0.11383789952917212, 8.388975556433872,
+             1058.2750599896935, 265097.9025274183, 0.001831274615120854,
+             0.11414945100919989, 9.419351803810935, 1330.564050780237,
+             373223.2162438565, 0.0016363333454631633, 0.11454333418242145,
+             10.6143816579462, 1683.787012481595, 530392.9089317025,
+             0.0014598610433380044, 0.11484240207592301, 11.959688127956882,
+             2132.0874753402027, 754758.9662704318, 0.0012985240015312626,
+             0.11513579480243862, 13.514425358573531, 2715.5160990137824,
+             1083490.9235064993, 0.0011614735761289934, 0.11537304189548002,
+             15.171418602667567, 3415.195870828736, 1526592.554260445,
+             0.0010347472698811352, 0.11554677847006009, 17.080800985009617,
+             4322.412404600832, 2172012.2333119176, 0.0009232988811258664,
+             0.1157201264344419, 19.20004861829407, 5453.349531598553,
+             3075689.135821584, 0.0008228871862975205, 0.11602709326795038,
+             21.65735242414206, 6920.203923780365, 4390869.389638642,
+             0.00073528900066722, 0.11642075843897651, 24.40223571298994,
+             8755.811207598026, 6238515.485413593, 0.0006602764384729194,
+             0.11752920604817965, 27.694443541914293, 11171.386093291572,
+             8948280.260726549, 0.0005935538977939806, 0.11851292825953147,
+             31.325508920763063, 14174.185724149384, 12735505.873148222,
+             0.0005310755355633124, 0.11913794514470308, 35.381052949627765,
+             17987.010118815077, 18157886.71494382, 0.00047239949671590953,
+             0.1190446731724092, 39.71342528048061, 22679.438775422022,
+             25718483.571328573, 0.00041829129789387623, 0.11851586773659825,
+             44.45299332965028, 28542.57147989741, 36391778.63686921,
+             0.00037321512015419886, 0.11880681324908665, 50.0668539579632,
+             36118.26128449941, 51739409.29004541, 0.0003315539616702064,
+             0.1184752823034871, 56.04387059062639, 45383.29960621684,
+             72976345.76679668, 0.00029456064937920213, 0.11831519416731286,
+             62.91195073220101, 57265.53993693082, 103507463.43600245,
+             0.00026301867496859703, 0.11862142241083726, 70.8217262087034,
+             72383.14781936012, 146901598.49939138, 0.00023618734450420032,
+             0.11966825454879482, 80.26535457124461, 92160.51176984518,
+             210125966.835247, 0.00021165918071578316, 0.12043407382728061,
+             90.7169587544247, 116975.56852918258, 299515943.218972,
+             0.00018757727511329545, 0.11992440455576689, 101.49899864101785,
+             147056.26174166967, 423080865.0307836, 0.00016654469159895833,
+             0.11957908856805206, 113.65970431102812, 184937.67016486943,
+             597533612.3026931, 0.00014717439179415048, 0.11872067604728138,
+             126.77899683346702, 231758.58906776624, 841283678.3159915,
+             0.00012868496382376066, 0.1166314722122684, 139.93635237349534,
+             287417.30847929465, 1172231492.6328032, 0.00011225559452625302,
+             0.11427619522772557, 154.0034283704458, 355281.4912295324,
+             1627544511.322488, 9.879511142981067e-05, 0.11295574406808354,
+             170.96532050841535, 442971.0111288653, 2279085852.2580123,
+             8.71257780313587e-05, 0.11192758284428547, 190.35067416684697,
+             554165.2523674504, 3203629323.93623, 7.665069027765277e-05,
+             0.11060694607065294, 211.28835951100046, 690933.608546013,
+             4486577387.093535, 6.734021094824451e-05, 0.10915848194710433,
+             234.24338803525194, 860487.9079859136, 6276829044.8032465,
+             5.9191625040287665e-05, 0.10776821865668373, 259.7454711820425,
+             1071699.0387579766, 8780430224.544102, 5.1856803674907676e-05,
+             0.10606444911641115, 287.1843540288165, 1331126.3723998806,
+             12251687131.5685, 4.503421404759231e-05, 0.10347361247668461,
+             314.7338642485931, 1638796.0697522392, 16944331963.203278,
+             3.90470387455642e-05, 0.1007804070023012, 344.3427560918527,
+             2014064.4865519698, 23392351979.057854, 3.46557661636393e-05,
+             0.10046706610839032, 385.56603915081587, 2533036.2523656,
+             33044724430.235435, 3.148745865254635e-05, 0.1025441570117926,
+             442.09038234164746, 3262712.3882769793, 47815050050.199135,
+             2.9790762078715404e-05, 0.1089845379379672, 527.8068231298969,
+             4375751.903321453, 72035815708.42941, 2.8772639817606534e-05,
+             0.11823636789048445, 643.2048194503195, 5989838.001888927,
+             110764084330.93005, 2.7951691815106586e-05, 0.12903432664913705,
+             788.5500418523591, 8249371.000613411, 171368308481.2427,
+             2.6844392423114212e-05, 0.1392060709754626, 955.6296403631383,
+             11230229.319931043, 262063016295.25085, 2.499458273851386e-05,
+             0.14559344445184325, 1122.7022399726002, 14820229.698461473,
+             388475270970.9214, 2.337386729019776e-05, 0.15294300496886065,
+             1324.8158105672455, 19644861.137128454, 578442936182.7473,
+             2.0081014872174113e-05, 0.14760215298210377, 1436.2385042492353,
+             23923681.729276657, 791311658718.4193, 1.773374462991839e-05,
+             0.14642752940923615, 1600.5596278736678, 29949429.82503553,
+             1112815989293.9326, 1.5303115839590797e-05, 0.14194150045081785,
+             1742.873058605698, 36634451.931305364, 1529085389160.7544,
+             1.3148448731163076e-05, 0.13699368732998807, 1889.5284359054356,
+             44614279.74469635, 2091762812969.9607, 1.1739194407590062e-05,
+             0.13739553134643406, 2128.794599579694, 56462810.11822766,
+             2973783283306.8145, 1.0293367506254706e-05, 0.13533033372723272,
+             2355.372854690074, 70176508.28667311, 4151852759764.441,
+             9.678312586863569e-06, 0.14293577249119244, 2794.531827932675,
+             93528671.31952812, 6215821967224.52, -1.174086323572049e-05,
+             0.1429501325944908, 3139.4804810720925, 118031680.16618933,
+             -6466892421886.174, -2.1188265307407812e-05, 0.1477108290912869,
+             3644.1133424610953, 153900132.62392554, -4828013117542.036,
+             -8.614483025123122e-05, 0.16037100755883044, 4444.386620899393,
+             210846007.89660168, -1766340937974.433, 4.981445776141726e-05,
+             0.16053420251962536, 4997.558254401547, 266327328.4755411,
+             3862250287024.725, 1.8500019169456637e-05, 0.15448417164977674,
+             5402.289867444643, 323399508.1475582, 12152445411933.408,
+             -5.647882376069748e-05, 0.1406372975946189, 5524.633133597753,
+             371512945.9909363, -4162951345292.1514, 2.8048523486337994e-05,
+             0.13183417571186926, 5817.462495763679, 439447252.3728975,
+             9294740538175.03]).reshape(89, 5)
+        b = np.ones(89, dtype=np.float64)
+        sol, rnorm = nnls(A, b)
+        assert_allclose(sol, np.array([0.61124315, 8.22262829, 0., 0., 0.]))
+        assert_allclose(rnorm, 1.0556460808977297)
+
+    def test_nnls_gh21021_ex1(self):
+        # Review examples used in gh-21021
+        A = [[0.004734199143798789, -0.09661916455815653, -0.04308779048103441,
+             0.4039475561867938, -0.27742598780954364, -0.20816924034369574,
+             -0.17264070902176, 0.05251808558963846],
+             [-0.030263548855047975, -0.30356483926431466, 0.18080406600591398,
+              -0.06892233941254086, -0.41837298885432317, 0.30245352819647003,
+              -0.19008975278116397, -0.00990809825429995],
+             [-0.2561747595787612, -0.04376282125249583, 0.4422181991706678,
+              -0.13720906318924858, -0.0069523811763796475, -0.059238287107464795,
+              0.028663214369642594, 0.5415531284893763],
+             [0.2949336072968401, 0.33997647534935094, 0.38441519339815755,
+              -0.306001783010386, 0.18120773805949028, -0.36669767490747895,
+              -0.021539960590992304, -0.2784251712424615],
+             [0.5009075736232653, -0.20161970347571165, 0.08404512586550646,
+              0.2520496489348788, 0.14812015101612894, -0.25823455803981266,
+              -0.1596872058396596, 0.5960141613922691]
+             ]
+        b = [18.036779281222124, -18.126530733870887, 13.535652034584029,
+             -2.6654275476795966, 9.166315328199575]
+
+        # Obtained from matlab's lstnonneg
+        des_sol = np.array([0., 118.017802006619, 45.1996532316584, 102.62156313537,
+                            0., 55.8590204314398, 0., 29.7328833253434])
+        sol, res = nnls(A, b)
+        assert_allclose(sol, des_sol)
+        assert np.abs(np.linalg.norm(A@sol - b) - res) < 5e-14
+
+    def test_nnls_gh21021_ex2(self):
+        A = np.array([
+            [0.2508259992635229, -0.24031300195203256],
+            [0.510647748500133, 0.2872936081767836],
+            [0.8196387904102849, -0.03520620107046682],
+            [0.030739759120097084, -0.07768656359879388]])
+        b = np.array([24.456141951303913,
+                      28.047143273432333,
+                      41.10526799545987,
+                      -1.2078282698324068])
+
+        sol, res = nnls(A, b)
+        assert_allclose(sol, np.array([54.3047953202271, 0.0]))
+        assert np.abs(np.linalg.norm(A@sol - b) - res) < 5e-14
+
+    def test_nnls_gh21021_ex3(self):
+        A = np.array([
+            [0.08247592017366788, 0.058398241636675674, -0.1031496693415968,
+             0.03156983127072098, -0.029503680182026665],
+            [0.21463607509982277, -0.2164518969308173, -0.10816833396662294,
+             0.12133867146012027, -0.15025010408668332],
+            [0.07251900316494089, -0.003044559315020767, 0.042682817961676424,
+             -0.018157525489298176, 0.11561953260568134],
+            [0.2328797918159187, -0.09112909645892767, 0.21348169727099078,
+             0.00449447624089599, -0.16615256386885716],
+            [-0.02440856024843897, -0.20131427208575386, 0.030275781997161483,
+             -0.04560777213546784, 0.11007266012013553],
+            [-0.2928391429686263, -0.20437574856615687, -0.020892110811574407,
+             -0.10455040720819309, 0.05337267000160461],
+            [0.22041503019400316, 0.014262782992311842, 0.08274606359871121,
+             -0.17933172096518907, -0.11809690350702161],
+            [0.10440436007469953, 0.09171452270577712, 0.03942347724809893,
+             0.11457669688231396, 0.07529747295631585],
+            [-0.052087576116032056, -0.15787717158077047, -0.08232202515883282,
+             -0.03194837933710708, -0.0546812506025729],
+            [-0.010388407673304468, 0.015174707581808923, 0.04764509565386281,
+             -0.1781221936030805, 0.10218894080536609],
+            [0.03272263140115928, -0.27576456949442574, 0.024897570959901753,
+             -0.1417129166632282, -0.03320796462136591],
+            [-0.12490006751823997, -0.03012003515442302, -0.051495264012509506,
+             0.012070729698374614, 0.04811700123118234],
+            [0.15254854117990788, -0.051863547789218374, 0.058012914127346174,
+             -0.06717991061422621, -0.14514671564242257],
+            [0.12251250415395559, -0.17462495626695362, -0.025334728552179834,
+             0.11425350676877533, 0.06183915953812639],
+            [0.19334259720491218, 0.2164301986218955, -0.018882278726614483,
+             0.07950236716817938, -0.2220529357431092],
+            [-0.01822205701890852, 0.12630444976752267, -0.03118092027244001,
+             0.02773743885242581, 0.06444433740044248],
+            [0.13344116850581977, -0.05142877469996826, 0.3385702016705455,
+             -0.25814970787123004, 0.2679034842977378],
+            [0.1309747058619377, 0.12090608957940627, -0.13957978654106512,
+             0.17048819760322642, -0.241775259969348],
+            [0.28613102173467275, -0.47153463906732174, 0.20359970518269746,
+             -0.0962095202871843, -0.07703076550836387],
+            [0.2212788380372723, 0.02569245145758152, -0.021596152392209966,
+             0.04610005150029433, -0.2024454395619734],
+            [-0.043225338359410316, 0.17816095186290315, -0.014709092962616079,
+             0.06993970293287989, -0.09033722782555903],
+            [0.17747622942563512, -0.20991014784011458, 0.06265720409894943,
+             0.0689704059061795, 0.024474319398401525],
+            [-0.1163880385601698, 0.29989570587630027, 0.033443765320984545,
+             0.008470296514656, -0.0014457113271462002],
+            [0.024375314902718406, 0.05279830705548363, 0.02691082431023144,
+             0.05265079368002343, 0.15542988147487913],
+            [-0.01855218360922308, -0.050265869142888164, 0.2567912677240452,
+             -0.2606428528561333, 0.25334396245022245]])
+
+        b = np.array([-7.876625373734849, -8.259856278691373, 3.2593082374900963,
+                      16.30170376973345, 2.311892943629045, -1.595345202555738,
+                      6.318582970536518, 3.0104212955340093, -6.286202915842167,
+                      3.6382333725029294, 1.9012066681249356, -3.932236581436514,
+                      4.4299317131740406, -1.9345885161292682, -1.4418721521970805,
+                      -2.3810103256943926, 25.853603392922526, -10.658470311610483,
+                      15.547103681119214, -1.6491066136547277, -1.1232029689817422,
+                      4.7845749463206975, 2.553803732013229, 2.0549409701753705,
+                      19.60887153608244])
+
+        sol, res = nnls(A, b)
+        assert_allclose(sol, np.array([0.0, 0.0, 76.3611306173957, 0.0, 0.0]),
+                        atol=5e-14)
+        assert np.abs(np.linalg.norm(A@sol - b) - res) < 5e-14
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nonlin.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nonlin.py
new file mode 100644
index 0000000000000000000000000000000000000000..e5eb094c15902eca6e089ba3bbf6dfd8eb06970e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_nonlin.py
@@ -0,0 +1,536 @@
+""" Unit tests for nonlinear solvers
+Author: Ondrej Certik
+May 2007
+"""
+from numpy.testing import assert_
+import pytest
+from functools import partial
+
+from scipy.optimize import _nonlin as nonlin, root
+from scipy.sparse import csr_array
+from numpy import diag, dot
+from numpy.linalg import inv
+import numpy as np
+import scipy
+
+from .test_minpack import pressure_network
+
+SOLVERS = {'anderson': nonlin.anderson,
+           'diagbroyden': nonlin.diagbroyden,
+           'linearmixing': nonlin.linearmixing,
+           'excitingmixing': nonlin.excitingmixing,
+           'broyden1': nonlin.broyden1,
+           'broyden2': nonlin.broyden2,
+           'krylov': nonlin.newton_krylov}
+MUST_WORK = {'anderson': nonlin.anderson, 'broyden1': nonlin.broyden1,
+             'broyden2': nonlin.broyden2, 'krylov': nonlin.newton_krylov}
+
+# ----------------------------------------------------------------------------
+# Test problems
+# ----------------------------------------------------------------------------
+
+
+def F(x):
+    x = np.asarray(x).T
+    d = diag([3, 2, 1.5, 1, 0.5])
+    c = 0.01
+    f = -d @ x - c * float(x.T @ x) * x
+    return f
+
+
+F.xin = [1, 1, 1, 1, 1]
+F.KNOWN_BAD = {}
+F.JAC_KSP_BAD = {}
+F.ROOT_JAC_KSP_BAD = {}
+
+
+def F2(x):
+    return x
+
+
+F2.xin = [1, 2, 3, 4, 5, 6]
+F2.KNOWN_BAD = {'linearmixing': nonlin.linearmixing,
+                'excitingmixing': nonlin.excitingmixing}
+F2.JAC_KSP_BAD = {}
+F2.ROOT_JAC_KSP_BAD = {}
+
+
+def F2_lucky(x):
+    return x
+
+
+F2_lucky.xin = [0, 0, 0, 0, 0, 0]
+F2_lucky.KNOWN_BAD = {}
+F2_lucky.JAC_KSP_BAD = {}
+F2_lucky.ROOT_JAC_KSP_BAD = {}
+
+
+def F3(x):
+    A = np.array([[-2, 1, 0.], [1, -2, 1], [0, 1, -2]])
+    b = np.array([1, 2, 3.])
+    return A @ x - b
+
+
+F3.xin = [1, 2, 3]
+F3.KNOWN_BAD = {}
+F3.JAC_KSP_BAD = {}
+F3.ROOT_JAC_KSP_BAD = {}
+
+
+def F4_powell(x):
+    A = 1e4
+    return [A*x[0]*x[1] - 1, np.exp(-x[0]) + np.exp(-x[1]) - (1 + 1/A)]
+
+
+F4_powell.xin = [-1, -2]
+F4_powell.KNOWN_BAD = {'linearmixing': nonlin.linearmixing,
+                       'excitingmixing': nonlin.excitingmixing,
+                       'diagbroyden': nonlin.diagbroyden}
+# In the extreme case, it does not converge for nolinear problem solved by
+# MINRES and root problem solved by GMRES/BiCGStab/CGS/MINRES/TFQMR when using
+# Krylov method to approximate Jacobian
+F4_powell.JAC_KSP_BAD = {'minres'}
+F4_powell.ROOT_JAC_KSP_BAD = {'gmres', 'bicgstab', 'cgs', 'minres', 'tfqmr'}
+
+
+def F5(x):
+    return pressure_network(x, 4, np.array([.5, .5, .5, .5]))
+
+
+F5.xin = [2., 0, 2, 0]
+F5.KNOWN_BAD = {'excitingmixing': nonlin.excitingmixing,
+                'linearmixing': nonlin.linearmixing,
+                'diagbroyden': nonlin.diagbroyden}
+# In the extreme case, the Jacobian inversion yielded zero vector for nonlinear
+# problem solved by CGS/MINRES and it does not converge for root problem solved
+# by MINRES and when using Krylov method to approximate Jacobian
+F5.JAC_KSP_BAD = {'cgs', 'minres'}
+F5.ROOT_JAC_KSP_BAD = {'minres'}
+
+
+def F6(x):
+    x1, x2 = x
+    J0 = np.array([[-4.256, 14.7],
+                   [0.8394989, 0.59964207]])
+    v = np.array([(x1 + 3) * (x2**5 - 7) + 3*6,
+                  np.sin(x2 * np.exp(x1) - 1)])
+    return -np.linalg.solve(J0, v)
+
+
+F6.xin = [-0.5, 1.4]
+F6.KNOWN_BAD = {'excitingmixing': nonlin.excitingmixing,
+                'linearmixing': nonlin.linearmixing,
+                'diagbroyden': nonlin.diagbroyden}
+F6.JAC_KSP_BAD = {}
+F6.ROOT_JAC_KSP_BAD = {}
+
+
+# ----------------------------------------------------------------------------
+# Tests
+# ----------------------------------------------------------------------------
+
+
+class TestNonlin:
+    """
+    Check the Broyden methods for a few test problems.
+
+    broyden1, broyden2, and newton_krylov must succeed for
+    all functions. Some of the others don't -- tests in KNOWN_BAD are skipped.
+
+    """
+
+    def _check_nonlin_func(self, f, func, f_tol=1e-2):
+        # Test all methods mentioned in the class `KrylovJacobian`
+        if func == SOLVERS['krylov']:
+            for method in ['gmres', 'bicgstab', 'cgs', 'minres', 'tfqmr']:
+                if method in f.JAC_KSP_BAD:
+                    continue
+
+                x = func(f, f.xin, method=method, line_search=None,
+                         f_tol=f_tol, maxiter=200, verbose=0)
+                assert_(np.absolute(f(x)).max() < f_tol)
+
+        x = func(f, f.xin, f_tol=f_tol, maxiter=200, verbose=0)
+        assert_(np.absolute(f(x)).max() < f_tol)
+
+    def _check_root(self, f, method, f_tol=1e-2):
+        # Test Krylov methods
+        if method == 'krylov':
+            for jac_method in ['gmres', 'bicgstab', 'cgs', 'minres', 'tfqmr']:
+                if jac_method in f.ROOT_JAC_KSP_BAD:
+                    continue
+
+                res = root(f, f.xin, method=method,
+                           options={'ftol': f_tol, 'maxiter': 200,
+                                    'disp': 0,
+                                    'jac_options': {'method': jac_method}})
+                assert_(np.absolute(res.fun).max() < f_tol)
+
+        res = root(f, f.xin, method=method,
+                   options={'ftol': f_tol, 'maxiter': 200, 'disp': 0})
+        assert_(np.absolute(res.fun).max() < f_tol)
+
+    @pytest.mark.xfail
+    def _check_func_fail(self, *a, **kw):
+        pass
+
+    @pytest.mark.filterwarnings('ignore::DeprecationWarning')
+    def test_problem_nonlin(self):
+        for f in [F, F2, F2_lucky, F3, F4_powell, F5, F6]:
+            for func in SOLVERS.values():
+                if func in f.KNOWN_BAD.values():
+                    if func in MUST_WORK.values():
+                        self._check_func_fail(f, func)
+                    continue
+                self._check_nonlin_func(f, func)
+
+    @pytest.mark.filterwarnings('ignore::DeprecationWarning')
+    @pytest.mark.parametrize("method", ['lgmres', 'gmres', 'bicgstab', 'cgs',
+                                        'minres', 'tfqmr'])
+    def test_tol_norm_called(self, method):
+        # Check that supplying tol_norm keyword to nonlin_solve works
+        self._tol_norm_used = False
+
+        def local_norm_func(x):
+            self._tol_norm_used = True
+            return np.absolute(x).max()
+
+        nonlin.newton_krylov(F, F.xin, method=method, f_tol=1e-2,
+                             maxiter=200, verbose=0,
+                             tol_norm=local_norm_func)
+        assert_(self._tol_norm_used)
+
+    @pytest.mark.filterwarnings('ignore::DeprecationWarning')
+    def test_problem_root(self):
+        for f in [F, F2, F2_lucky, F3, F4_powell, F5, F6]:
+            for meth in SOLVERS:
+                if meth in f.KNOWN_BAD:
+                    if meth in MUST_WORK:
+                        self._check_func_fail(f, meth)
+                    continue
+                self._check_root(f, meth)
+
+    def test_no_convergence(self):
+        def wont_converge(x):
+            return 1e3 + x
+
+        with pytest.raises(scipy.optimize.NoConvergence):
+            nonlin.newton_krylov(wont_converge, xin=[0], maxiter=1)
+
+
+class TestSecant:
+    """Check that some Jacobian approximations satisfy the secant condition"""
+
+    xs = [np.array([1., 2., 3., 4., 5.]),
+          np.array([2., 3., 4., 5., 1.]),
+          np.array([3., 4., 5., 1., 2.]),
+          np.array([4., 5., 1., 2., 3.]),
+          np.array([9., 1., 9., 1., 3.]),
+          np.array([0., 1., 9., 1., 3.]),
+          np.array([5., 5., 7., 1., 1.]),
+          np.array([1., 2., 7., 5., 1.]),]
+    fs = [x**2 - 1 for x in xs]
+
+    def _check_secant(self, jac_cls, npoints=1, **kw):
+        """
+        Check that the given Jacobian approximation satisfies secant
+        conditions for last `npoints` points.
+        """
+        jac = jac_cls(**kw)
+        jac.setup(self.xs[0], self.fs[0], None)
+        for j, (x, f) in enumerate(zip(self.xs[1:], self.fs[1:])):
+            jac.update(x, f)
+
+            for k in range(min(npoints, j+1)):
+                dx = self.xs[j-k+1] - self.xs[j-k]
+                df = self.fs[j-k+1] - self.fs[j-k]
+                assert_(np.allclose(dx, jac.solve(df)))
+
+            # Check that the `npoints` secant bound is strict
+            if j >= npoints:
+                dx = self.xs[j-npoints+1] - self.xs[j-npoints]
+                df = self.fs[j-npoints+1] - self.fs[j-npoints]
+                assert_(not np.allclose(dx, jac.solve(df)))
+
+    def test_broyden1(self):
+        self._check_secant(nonlin.BroydenFirst)
+
+    def test_broyden2(self):
+        self._check_secant(nonlin.BroydenSecond)
+
+    def test_broyden1_update(self):
+        # Check that BroydenFirst update works as for a dense matrix
+        jac = nonlin.BroydenFirst(alpha=0.1)
+        jac.setup(self.xs[0], self.fs[0], None)
+
+        B = np.identity(5) * (-1/0.1)
+
+        for last_j, (x, f) in enumerate(zip(self.xs[1:], self.fs[1:])):
+            df = f - self.fs[last_j]
+            dx = x - self.xs[last_j]
+            B += (df - dot(B, dx))[:, None] * dx[None, :] / dot(dx, dx)
+            jac.update(x, f)
+            assert_(np.allclose(jac.todense(), B, rtol=1e-10, atol=1e-13))
+
+    def test_broyden2_update(self):
+        # Check that BroydenSecond update works as for a dense matrix
+        jac = nonlin.BroydenSecond(alpha=0.1)
+        jac.setup(self.xs[0], self.fs[0], None)
+
+        H = np.identity(5) * (-0.1)
+
+        for last_j, (x, f) in enumerate(zip(self.xs[1:], self.fs[1:])):
+            df = f - self.fs[last_j]
+            dx = x - self.xs[last_j]
+            H += (dx - dot(H, df))[:, None] * df[None, :] / dot(df, df)
+            jac.update(x, f)
+            assert_(np.allclose(jac.todense(), inv(H), rtol=1e-10, atol=1e-13))
+
+    def test_anderson(self):
+        # Anderson mixing (with w0=0) satisfies secant conditions
+        # for the last M iterates, see [Ey]_
+        #
+        # .. [Ey] V. Eyert, J. Comp. Phys., 124, 271 (1996).
+        self._check_secant(nonlin.Anderson, M=3, w0=0, npoints=3)
+
+
+class TestLinear:
+    """Solve a linear equation;
+    some methods find the exact solution in a finite number of steps"""
+
+    def _check(self, jac, N, maxiter, complex=False, **kw):
+        np.random.seed(123)
+
+        A = np.random.randn(N, N)
+        if complex:
+            A = A + 1j*np.random.randn(N, N)
+        b = np.random.randn(N)
+        if complex:
+            b = b + 1j*np.random.randn(N)
+
+        def func(x):
+            return dot(A, x) - b
+
+        sol = nonlin.nonlin_solve(func, np.zeros(N), jac, maxiter=maxiter,
+                                  f_tol=1e-6, line_search=None, verbose=0)
+        assert_(np.allclose(dot(A, sol), b, atol=1e-6))
+
+    def test_broyden1(self):
+        # Broyden methods solve linear systems exactly in 2*N steps
+        self._check(nonlin.BroydenFirst(alpha=1.0), 20, 41, False)
+        self._check(nonlin.BroydenFirst(alpha=1.0), 20, 41, True)
+
+    def test_broyden2(self):
+        # Broyden methods solve linear systems exactly in 2*N steps
+        self._check(nonlin.BroydenSecond(alpha=1.0), 20, 41, False)
+        self._check(nonlin.BroydenSecond(alpha=1.0), 20, 41, True)
+
+    def test_anderson(self):
+        # Anderson is rather similar to Broyden, if given enough storage space
+        self._check(nonlin.Anderson(M=50, alpha=1.0), 20, 29, False)
+        self._check(nonlin.Anderson(M=50, alpha=1.0), 20, 29, True)
+
+    def test_krylov(self):
+        # Krylov methods solve linear systems exactly in N inner steps
+        self._check(nonlin.KrylovJacobian, 20, 2, False, inner_m=10)
+        self._check(nonlin.KrylovJacobian, 20, 2, True, inner_m=10)
+
+    def _check_autojac(self, A, b):
+        def func(x):
+            return A.dot(x) - b
+
+        def jac(v):
+            return A
+
+        sol = nonlin.nonlin_solve(func, np.zeros(b.shape[0]), jac, maxiter=2,
+                                  f_tol=1e-6, line_search=None, verbose=0)
+        np.testing.assert_allclose(A @ sol, b, atol=1e-6)
+        # test jac input as array -- not a function
+        sol = nonlin.nonlin_solve(func, np.zeros(b.shape[0]), A, maxiter=2,
+                                  f_tol=1e-6, line_search=None, verbose=0)
+        np.testing.assert_allclose(A @ sol, b, atol=1e-6)
+
+    def test_jac_sparse(self):
+        A = csr_array([[1, 2], [2, 1]])
+        b = np.array([1, -1])
+        self._check_autojac(A, b)
+        self._check_autojac((1 + 2j) * A, (2 + 2j) * b)
+
+    def test_jac_ndarray(self):
+        A = np.array([[1, 2], [2, 1]])
+        b = np.array([1, -1])
+        self._check_autojac(A, b)
+        self._check_autojac((1 + 2j) * A, (2 + 2j) * b)
+
+
+class TestJacobianDotSolve:
+    """
+    Check that solve/dot methods in Jacobian approximations are consistent
+    """
+
+    def _func(self, x, A=None):
+        return x**2 - 1 + np.dot(A, x)
+
+    def _check_dot(self, jac_cls, complex=False, tol=1e-6, **kw):
+        rng = np.random.RandomState(123)
+
+        N = 7
+
+        def rand(*a):
+            q = rng.rand(*a)
+            if complex:
+                q = q + 1j*rng.rand(*a)
+            return q
+
+        def assert_close(a, b, msg):
+            d = abs(a - b).max()
+            f = tol + abs(b).max()*tol
+            if d > f:
+                raise AssertionError(f'{msg}: err {d:g}')
+
+        A = rand(N, N)
+
+        # initialize
+        x0 = rng.rand(N)
+        jac = jac_cls(**kw)
+        jac.setup(x0, self._func(x0, A), partial(self._func, A=A))
+
+        # check consistency
+        for k in range(2*N):
+            v = rand(N)
+
+            if hasattr(jac, '__array__'):
+                Jd = np.array(jac)
+                if hasattr(jac, 'solve'):
+                    Gv = jac.solve(v)
+                    Gv2 = np.linalg.solve(Jd, v)
+                    assert_close(Gv, Gv2, 'solve vs array')
+                if hasattr(jac, 'rsolve'):
+                    Gv = jac.rsolve(v)
+                    Gv2 = np.linalg.solve(Jd.T.conj(), v)
+                    assert_close(Gv, Gv2, 'rsolve vs array')
+                if hasattr(jac, 'matvec'):
+                    Jv = jac.matvec(v)
+                    Jv2 = np.dot(Jd, v)
+                    assert_close(Jv, Jv2, 'dot vs array')
+                if hasattr(jac, 'rmatvec'):
+                    Jv = jac.rmatvec(v)
+                    Jv2 = np.dot(Jd.T.conj(), v)
+                    assert_close(Jv, Jv2, 'rmatvec vs array')
+
+            if hasattr(jac, 'matvec') and hasattr(jac, 'solve'):
+                Jv = jac.matvec(v)
+                Jv2 = jac.solve(jac.matvec(Jv))
+                assert_close(Jv, Jv2, 'dot vs solve')
+
+            if hasattr(jac, 'rmatvec') and hasattr(jac, 'rsolve'):
+                Jv = jac.rmatvec(v)
+                Jv2 = jac.rmatvec(jac.rsolve(Jv))
+                assert_close(Jv, Jv2, 'rmatvec vs rsolve')
+
+            x = rand(N)
+            jac.update(x, self._func(x, A))
+
+    def test_broyden1(self):
+        self._check_dot(nonlin.BroydenFirst, complex=False)
+        self._check_dot(nonlin.BroydenFirst, complex=True)
+
+    def test_broyden2(self):
+        self._check_dot(nonlin.BroydenSecond, complex=False)
+        self._check_dot(nonlin.BroydenSecond, complex=True)
+
+    def test_anderson(self):
+        self._check_dot(nonlin.Anderson, complex=False)
+        self._check_dot(nonlin.Anderson, complex=True)
+
+    def test_diagbroyden(self):
+        self._check_dot(nonlin.DiagBroyden, complex=False)
+        self._check_dot(nonlin.DiagBroyden, complex=True)
+
+    def test_linearmixing(self):
+        self._check_dot(nonlin.LinearMixing, complex=False)
+        self._check_dot(nonlin.LinearMixing, complex=True)
+
+    def test_excitingmixing(self):
+        self._check_dot(nonlin.ExcitingMixing, complex=False)
+        self._check_dot(nonlin.ExcitingMixing, complex=True)
+
+    @pytest.mark.thread_unsafe
+    def test_krylov(self):
+        self._check_dot(nonlin.KrylovJacobian, complex=False, tol=1e-3)
+        self._check_dot(nonlin.KrylovJacobian, complex=True, tol=1e-3)
+
+
+class TestNonlinOldTests:
+    """ Test case for a simple constrained entropy maximization problem
+    (the machine translation example of Berger et al in
+    Computational Linguistics, vol 22, num 1, pp 39--72, 1996.)
+    """
+
+    def test_broyden1(self):
+        x = nonlin.broyden1(F, F.xin, iter=12, alpha=1)
+        assert_(nonlin.norm(x) < 1e-9)
+        assert_(nonlin.norm(F(x)) < 1e-9)
+
+    def test_broyden2(self):
+        x = nonlin.broyden2(F, F.xin, iter=12, alpha=1)
+        assert_(nonlin.norm(x) < 1e-9)
+        assert_(nonlin.norm(F(x)) < 1e-9)
+
+    def test_anderson(self):
+        x = nonlin.anderson(F, F.xin, iter=12, alpha=0.03, M=5)
+        assert_(nonlin.norm(x) < 0.33)
+
+    def test_linearmixing(self):
+        x = nonlin.linearmixing(F, F.xin, iter=60, alpha=0.5)
+        assert_(nonlin.norm(x) < 1e-7)
+        assert_(nonlin.norm(F(x)) < 1e-7)
+
+    def test_exciting(self):
+        x = nonlin.excitingmixing(F, F.xin, iter=20, alpha=0.5)
+        assert_(nonlin.norm(x) < 1e-5)
+        assert_(nonlin.norm(F(x)) < 1e-5)
+
+    def test_diagbroyden(self):
+        x = nonlin.diagbroyden(F, F.xin, iter=11, alpha=1)
+        assert_(nonlin.norm(x) < 1e-8)
+        assert_(nonlin.norm(F(x)) < 1e-8)
+
+    def test_root_broyden1(self):
+        res = root(F, F.xin, method='broyden1',
+                   options={'nit': 12, 'jac_options': {'alpha': 1}})
+        assert_(nonlin.norm(res.x) < 1e-9)
+        assert_(nonlin.norm(res.fun) < 1e-9)
+
+    def test_root_broyden2(self):
+        res = root(F, F.xin, method='broyden2',
+                   options={'nit': 12, 'jac_options': {'alpha': 1}})
+        assert_(nonlin.norm(res.x) < 1e-9)
+        assert_(nonlin.norm(res.fun) < 1e-9)
+
+    def test_root_anderson(self):
+        res = root(F, F.xin, method='anderson',
+                   options={'nit': 12,
+                            'jac_options': {'alpha': 0.03, 'M': 5}})
+        assert_(nonlin.norm(res.x) < 0.33)
+
+    def test_root_linearmixing(self):
+        res = root(F, F.xin, method='linearmixing',
+                   options={'nit': 60,
+                            'jac_options': {'alpha': 0.5}})
+        assert_(nonlin.norm(res.x) < 1e-7)
+        assert_(nonlin.norm(res.fun) < 1e-7)
+
+    def test_root_excitingmixing(self):
+        res = root(F, F.xin, method='excitingmixing',
+                   options={'nit': 20,
+                            'jac_options': {'alpha': 0.5}})
+        assert_(nonlin.norm(res.x) < 1e-5)
+        assert_(nonlin.norm(res.fun) < 1e-5)
+
+    def test_root_diagbroyden(self):
+        res = root(F, F.xin, method='diagbroyden',
+                   options={'nit': 11,
+                            'jac_options': {'alpha': 1}})
+        assert_(nonlin.norm(res.x) < 1e-8)
+        assert_(nonlin.norm(res.fun) < 1e-8)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_optimize.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_optimize.py
new file mode 100644
index 0000000000000000000000000000000000000000..913ef51f049386a06c61164a3fc07c15111ed212
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_optimize.py
@@ -0,0 +1,3257 @@
+"""
+Unit tests for optimization routines from optimize.py
+
+Authors:
+   Ed Schofield, Nov 2005
+   Andrew Straw, April 2008
+
+"""
+import itertools
+import platform
+import threading
+import numpy as np
+from numpy.testing import (assert_allclose, assert_equal,
+                           assert_almost_equal,
+                           assert_no_warnings, assert_warns,
+                           assert_array_less, suppress_warnings)
+import pytest
+from pytest import raises as assert_raises
+
+import scipy
+from scipy import optimize
+from scipy.optimize._minimize import Bounds, NonlinearConstraint
+from scipy.optimize._minimize import (MINIMIZE_METHODS,
+                                      MINIMIZE_METHODS_NEW_CB,
+                                      MINIMIZE_SCALAR_METHODS)
+from scipy.optimize._linprog import LINPROG_METHODS
+from scipy.optimize._root import ROOT_METHODS
+from scipy.optimize._root_scalar import ROOT_SCALAR_METHODS
+from scipy.optimize._qap import QUADRATIC_ASSIGNMENT_METHODS
+from scipy.optimize._differentiable_functions import ScalarFunction, FD_METHODS
+from scipy.optimize._optimize import MemoizeJac, show_options, OptimizeResult
+from scipy.optimize import rosen, rosen_der, rosen_hess
+
+from scipy.sparse import (coo_matrix, csc_matrix, csr_matrix, coo_array,
+                          csr_array, csc_array)
+from scipy.conftest import array_api_compatible
+from scipy._lib._array_api_no_0d import xp_assert_equal, array_namespace
+
+skip_xp_backends = pytest.mark.skip_xp_backends
+
+
+def test_check_grad():
+    # Verify if check_grad is able to estimate the derivative of the
+    # expit (logistic sigmoid) function.
+
+    def expit(x):
+        return 1 / (1 + np.exp(-x))
+
+    def der_expit(x):
+        return np.exp(-x) / (1 + np.exp(-x))**2
+
+    x0 = np.array([1.5])
+
+    r = optimize.check_grad(expit, der_expit, x0)
+    assert_almost_equal(r, 0)
+    # SPEC-007 leave one call with seed to check it still works
+    r = optimize.check_grad(expit, der_expit, x0,
+                            direction='random', seed=1234)
+    assert_almost_equal(r, 0)
+
+    r = optimize.check_grad(expit, der_expit, x0, epsilon=1e-6)
+    assert_almost_equal(r, 0)
+    r = optimize.check_grad(expit, der_expit, x0, epsilon=1e-6,
+                            direction='random', rng=1234)
+    assert_almost_equal(r, 0)
+
+    # Check if the epsilon parameter is being considered.
+    r = abs(optimize.check_grad(expit, der_expit, x0, epsilon=1e-1) - 0)
+    assert r > 1e-7
+    r = abs(optimize.check_grad(expit, der_expit, x0, epsilon=1e-1,
+                                direction='random', rng=1234) - 0)
+    assert r > 1e-7
+
+    def x_sinx(x):
+        return (x*np.sin(x)).sum()
+
+    def der_x_sinx(x):
+        return np.sin(x) + x*np.cos(x)
+
+    x0 = np.arange(0, 2, 0.2)
+
+    r = optimize.check_grad(x_sinx, der_x_sinx, x0,
+                            direction='random', rng=1234)
+    assert_almost_equal(r, 0)
+
+    assert_raises(ValueError, optimize.check_grad,
+                  x_sinx, der_x_sinx, x0,
+                  direction='random_projection', rng=1234)
+
+    # checking can be done for derivatives of vector valued functions
+    r = optimize.check_grad(himmelblau_grad, himmelblau_hess, himmelblau_x0,
+                            direction='all', rng=1234)
+    assert r < 5e-7
+
+
+class CheckOptimize:
+    """ Base test case for a simple constrained entropy maximization problem
+    (the machine translation example of Berger et al in
+    Computational Linguistics, vol 22, num 1, pp 39--72, 1996.)
+    """
+
+    def setup_method(self):
+        self.F = np.array([[1, 1, 1],
+                           [1, 1, 0],
+                           [1, 0, 1],
+                           [1, 0, 0],
+                           [1, 0, 0]])
+        self.K = np.array([1., 0.3, 0.5])
+        self.startparams = np.zeros(3, np.float64)
+        self.solution = np.array([0., -0.524869316, 0.487525860])
+        self.maxiter = 1000
+        self.funccalls = threading.local()
+        self.gradcalls = threading.local()
+        self.trace = threading.local()
+
+    def func(self, x):
+        if not hasattr(self.funccalls, 'c'):
+            self.funccalls.c = 0
+
+        if not hasattr(self.gradcalls, 'c'):
+            self.gradcalls.c = 0
+
+        self.funccalls.c += 1
+        if self.funccalls.c > 6000:
+            raise RuntimeError("too many iterations in optimization routine")
+        log_pdot = np.dot(self.F, x)
+        logZ = np.log(sum(np.exp(log_pdot)))
+        f = logZ - np.dot(self.K, x)
+        if not hasattr(self.trace, 't'):
+            self.trace.t = []
+        self.trace.t.append(np.copy(x))
+        return f
+
+    def grad(self, x):
+        if not hasattr(self.gradcalls, 'c'):
+            self.gradcalls.c = 0
+        self.gradcalls.c += 1
+        log_pdot = np.dot(self.F, x)
+        logZ = np.log(sum(np.exp(log_pdot)))
+        p = np.exp(log_pdot - logZ)
+        return np.dot(self.F.transpose(), p) - self.K
+
+    def hess(self, x):
+        log_pdot = np.dot(self.F, x)
+        logZ = np.log(sum(np.exp(log_pdot)))
+        p = np.exp(log_pdot - logZ)
+        return np.dot(self.F.T,
+                      np.dot(np.diag(p), self.F - np.dot(self.F.T, p)))
+
+    def hessp(self, x, p):
+        return np.dot(self.hess(x), p)
+
+
+class CheckOptimizeParameterized(CheckOptimize):
+
+    def test_cg(self):
+        # conjugate gradient optimization routine
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    method='CG', jac=self.grad,
+                                    options=opts)
+            params, fopt, func_calls, grad_calls, warnflag = \
+                res['x'], res['fun'], res['nfev'], res['njev'], res['status']
+        else:
+            retval = optimize.fmin_cg(self.func, self.startparams,
+                                      self.grad, (), maxiter=self.maxiter,
+                                      full_output=True, disp=self.disp,
+                                      retall=False)
+            (params, fopt, func_calls, grad_calls, warnflag) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c == 9, self.funccalls.c
+        assert self.gradcalls.c == 7, self.gradcalls.c
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[2:4],
+                        [[0, -0.5, 0.5],
+                         [0, -5.05700028e-01, 4.95985862e-01]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_cg_cornercase(self):
+        def f(r):
+            return 2.5 * (1 - np.exp(-1.5*(r - 0.5)))**2
+
+        # Check several initial guesses. (Too far away from the
+        # minimum, the function ends up in the flat region of exp.)
+        for x0 in np.linspace(-0.75, 3, 71):
+            sol = optimize.minimize(f, [x0], method='CG')
+            assert sol.success
+            assert_allclose(sol.x, [0.5], rtol=1e-5)
+
+    def test_bfgs(self):
+        # Broyden-Fletcher-Goldfarb-Shanno optimization routine
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams,
+                                    jac=self.grad, method='BFGS', args=(),
+                                    options=opts)
+
+            params, fopt, gopt, Hopt, func_calls, grad_calls, warnflag = (
+                    res['x'], res['fun'], res['jac'], res['hess_inv'],
+                    res['nfev'], res['njev'], res['status'])
+        else:
+            retval = optimize.fmin_bfgs(self.func, self.startparams, self.grad,
+                                        args=(), maxiter=self.maxiter,
+                                        full_output=True, disp=self.disp,
+                                        retall=False)
+            (params, fopt, gopt, Hopt,
+             func_calls, grad_calls, warnflag) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c == 10, self.funccalls.c
+        assert self.gradcalls.c == 8, self.gradcalls.c
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[6:8],
+                        [[0, -5.25060743e-01, 4.87748473e-01],
+                         [0, -5.24885582e-01, 4.87530347e-01]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_bfgs_hess_inv0_neg(self):
+        # Ensure that BFGS does not accept neg. def. initial inverse
+        # Hessian estimate.
+        with pytest.raises(ValueError, match="'hess_inv0' matrix isn't "
+                           "positive definite."):
+            x0 = np.array([1.3, 0.7, 0.8, 1.9, 1.2])
+            opts = {'disp': self.disp, 'hess_inv0': -np.eye(5)}
+            optimize.minimize(optimize.rosen, x0=x0, method='BFGS', args=(),
+                              options=opts)
+
+    def test_bfgs_hess_inv0_semipos(self):
+        # Ensure that BFGS does not accept semi pos. def. initial inverse
+        # Hessian estimate.
+        with pytest.raises(ValueError, match="'hess_inv0' matrix isn't "
+                           "positive definite."):
+            x0 = np.array([1.3, 0.7, 0.8, 1.9, 1.2])
+            hess_inv0 = np.eye(5)
+            hess_inv0[0, 0] = 0
+            opts = {'disp': self.disp, 'hess_inv0': hess_inv0}
+            optimize.minimize(optimize.rosen, x0=x0, method='BFGS', args=(),
+                              options=opts)
+
+    def test_bfgs_hess_inv0_sanity(self):
+        # Ensure that BFGS handles `hess_inv0` parameter correctly.
+        fun = optimize.rosen
+        x0 = np.array([1.3, 0.7, 0.8, 1.9, 1.2])
+        opts = {'disp': self.disp, 'hess_inv0': 1e-2 * np.eye(5)}
+        res = optimize.minimize(fun, x0=x0, method='BFGS', args=(),
+                                options=opts)
+        res_true = optimize.minimize(fun, x0=x0, method='BFGS', args=(),
+                                     options={'disp': self.disp})
+        assert_allclose(res.fun, res_true.fun, atol=1e-6)
+
+    @pytest.mark.filterwarnings('ignore::UserWarning')
+    def test_bfgs_infinite(self):
+        # Test corner case where -Inf is the minimum.  See gh-2019.
+        def func(x):
+            return -np.e ** (-x)
+        def fprime(x):
+            return -func(x)
+        x0 = [0]
+        with np.errstate(over='ignore'):
+            if self.use_wrapper:
+                opts = {'disp': self.disp}
+                x = optimize.minimize(func, x0, jac=fprime, method='BFGS',
+                                      args=(), options=opts)['x']
+            else:
+                x = optimize.fmin_bfgs(func, x0, fprime, disp=self.disp)
+            assert not np.isfinite(func(x))
+
+    def test_bfgs_xrtol(self):
+        # test for #17345 to test xrtol parameter
+        x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
+        res = optimize.minimize(optimize.rosen,
+                                x0, method='bfgs', options={'xrtol': 1e-3})
+        ref = optimize.minimize(optimize.rosen,
+                                x0, method='bfgs', options={'gtol': 1e-3})
+        assert res.nit != ref.nit
+
+    def test_bfgs_c1(self):
+        # test for #18977 insufficiently low value of c1 leads to precision loss
+        # for poor starting parameters
+        x0 = [10.3, 20.7, 10.8, 1.9, -1.2]
+        res_c1_small = optimize.minimize(optimize.rosen,
+                                         x0, method='bfgs', options={'c1': 1e-8})
+        res_c1_big = optimize.minimize(optimize.rosen,
+                                       x0, method='bfgs', options={'c1': 1e-1})
+
+        assert res_c1_small.nfev > res_c1_big.nfev
+
+    def test_bfgs_c2(self):
+        # test that modification of c2 parameter
+        # results in different number of iterations
+        x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
+        res_default = optimize.minimize(optimize.rosen,
+                                        x0, method='bfgs', options={'c2': .9})
+        res_mod = optimize.minimize(optimize.rosen,
+                                    x0, method='bfgs', options={'c2': 1e-2})
+        assert res_default.nit > res_mod.nit
+
+    @pytest.mark.parametrize(["c1", "c2"], [[0.5, 2],
+                                            [-0.1, 0.1],
+                                            [0.2, 0.1]])
+    def test_invalid_c1_c2(self, c1, c2):
+        with pytest.raises(ValueError, match="'c1' and 'c2'"):
+            x0 = [10.3, 20.7, 10.8, 1.9, -1.2]
+            optimize.minimize(optimize.rosen, x0, method='cg',
+                              options={'c1': c1, 'c2': c2})
+
+    def test_powell(self):
+        # Powell (direction set) optimization routine
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    method='Powell', options=opts)
+            params, fopt, direc, numiter, func_calls, warnflag = (
+                    res['x'], res['fun'], res['direc'], res['nit'],
+                    res['nfev'], res['status'])
+        else:
+            retval = optimize.fmin_powell(self.func, self.startparams,
+                                          args=(), maxiter=self.maxiter,
+                                          full_output=True, disp=self.disp,
+                                          retall=False)
+            (params, fopt, direc, numiter, func_calls, warnflag) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+        # params[0] does not affect the objective function
+        assert_allclose(params[1:], self.solution[1:], atol=5e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        #
+        # However, some leeway must be added: the exact evaluation
+        # count is sensitive to numerical error, and floating-point
+        # computations are not bit-for-bit reproducible across
+        # machines, and when using e.g., MKL, data alignment
+        # etc., affect the rounding error.
+        #
+        assert self.funccalls.c <= 116 + 20, self.funccalls.c
+        assert self.gradcalls.c == 0, self.gradcalls.c
+
+    @pytest.mark.xfail(reason="This part of test_powell fails on some "
+                       "platforms, but the solution returned by powell is "
+                       "still valid.")
+    def test_powell_gh14014(self):
+        # This part of test_powell started failing on some CI platforms;
+        # see gh-14014. Since the solution is still correct and the comments
+        # in test_powell suggest that small differences in the bits are known
+        # to change the "trace" of the solution, seems safe to xfail to get CI
+        # green now and investigate later.
+
+        # Powell (direction set) optimization routine
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    method='Powell', options=opts)
+            params, fopt, direc, numiter, func_calls, warnflag = (
+                    res['x'], res['fun'], res['direc'], res['nit'],
+                    res['nfev'], res['status'])
+        else:
+            retval = optimize.fmin_powell(self.func, self.startparams,
+                                          args=(), maxiter=self.maxiter,
+                                          full_output=True, disp=self.disp,
+                                          retall=False)
+            (params, fopt, direc, numiter, func_calls, warnflag) = retval
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace[34:39],
+                        [[0.72949016, -0.44156936, 0.47100962],
+                         [0.72949016, -0.44156936, 0.48052496],
+                         [1.45898031, -0.88313872, 0.95153458],
+                         [0.72949016, -0.44156936, 0.47576729],
+                         [1.72949016, -0.44156936, 0.47576729]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_powell_bounded(self):
+        # Powell (direction set) optimization routine
+        # same as test_powell above, but with bounds
+        bounds = [(-np.pi, np.pi) for _ in self.startparams]
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    bounds=bounds,
+                                    method='Powell', options=opts)
+            params, func_calls = (res['x'], res['nfev'])
+
+            assert func_calls == self.funccalls.c
+            assert_allclose(self.func(params), self.func(self.solution),
+                            atol=1e-6, rtol=1e-5)
+
+            # The exact evaluation count is sensitive to numerical error, and
+            # floating-point computations are not bit-for-bit reproducible
+            # across machines, and when using e.g. MKL, data alignment etc.
+            # affect the rounding error.
+            # It takes 155 calls on my machine, but we can add the same +20
+            # margin as is used in `test_powell`
+            assert self.funccalls.c <= 155 + 20
+            assert self.gradcalls.c == 0
+
+    def test_neldermead(self):
+        # Nelder-Mead simplex algorithm
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    method='Nelder-mead', options=opts)
+            params, fopt, numiter, func_calls, warnflag = (
+                    res['x'], res['fun'], res['nit'], res['nfev'],
+                    res['status'])
+        else:
+            retval = optimize.fmin(self.func, self.startparams,
+                                   args=(), maxiter=self.maxiter,
+                                   full_output=True, disp=self.disp,
+                                   retall=False)
+            (params, fopt, numiter, func_calls, warnflag) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c == 167, self.funccalls.c
+        assert self.gradcalls.c == 0, self.gradcalls.c
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[76:78],
+                        [[0.1928968, -0.62780447, 0.35166118],
+                         [0.19572515, -0.63648426, 0.35838135]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_neldermead_initial_simplex(self):
+        # Nelder-Mead simplex algorithm
+        simplex = np.zeros((4, 3))
+        simplex[...] = self.startparams
+        for j in range(3):
+            simplex[j+1, j] += 0.1
+
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': False,
+                    'return_all': True, 'initial_simplex': simplex}
+            res = optimize.minimize(self.func, self.startparams, args=(),
+                                    method='Nelder-mead', options=opts)
+            params, fopt, numiter, func_calls, warnflag = (res['x'],
+                                                           res['fun'],
+                                                           res['nit'],
+                                                           res['nfev'],
+                                                           res['status'])
+            assert_allclose(res['allvecs'][0], simplex[0])
+        else:
+            retval = optimize.fmin(self.func, self.startparams,
+                                   args=(), maxiter=self.maxiter,
+                                   full_output=True, disp=False, retall=False,
+                                   initial_simplex=simplex)
+
+            (params, fopt, numiter, func_calls, warnflag) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.17.0. Don't allow them to increase.
+        assert self.funccalls.c == 100, self.funccalls.c
+        assert self.gradcalls.c == 0, self.gradcalls.c
+
+        # Ensure that the function behaves the same; this is from SciPy 0.15.0
+        assert_allclose(self.trace.t[50:52],
+                        [[0.14687474, -0.5103282, 0.48252111],
+                         [0.14474003, -0.5282084, 0.48743951]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_neldermead_initial_simplex_bad(self):
+        # Check it fails with a bad simplices
+        bad_simplices = []
+
+        simplex = np.zeros((3, 2))
+        simplex[...] = self.startparams[:2]
+        for j in range(2):
+            simplex[j+1, j] += 0.1
+        bad_simplices.append(simplex)
+
+        simplex = np.zeros((3, 3))
+        bad_simplices.append(simplex)
+
+        for simplex in bad_simplices:
+            if self.use_wrapper:
+                opts = {'maxiter': self.maxiter, 'disp': False,
+                        'return_all': False, 'initial_simplex': simplex}
+                assert_raises(ValueError,
+                              optimize.minimize,
+                              self.func,
+                              self.startparams,
+                              args=(),
+                              method='Nelder-mead',
+                              options=opts)
+            else:
+                assert_raises(ValueError, optimize.fmin,
+                              self.func, self.startparams,
+                              args=(), maxiter=self.maxiter,
+                              full_output=True, disp=False, retall=False,
+                              initial_simplex=simplex)
+
+    def test_neldermead_x0_ub(self):
+        # checks whether minimisation occurs correctly for entries where
+        # x0 == ub
+        # gh19991
+        def quad(x):
+            return np.sum(x**2)
+
+        res = optimize.minimize(
+            quad,
+            [1],
+            bounds=[(0, 1.)],
+            method='nelder-mead'
+        )
+        assert_allclose(res.x, [0])
+
+        res = optimize.minimize(
+            quad,
+            [1, 2],
+            bounds=[(0, 1.), (1, 3.)],
+            method='nelder-mead'
+        )
+        assert_allclose(res.x, [0, 1])
+
+    def test_ncg_negative_maxiter(self):
+        # Regression test for gh-8241
+        opts = {'maxiter': -1}
+        result = optimize.minimize(self.func, self.startparams,
+                                   method='Newton-CG', jac=self.grad,
+                                   args=(), options=opts)
+        assert result.status == 1
+
+    def test_ncg_zero_xtol(self):
+        # Regression test for gh-20214
+        def cosine(x):
+            return np.cos(x[0])
+
+        def jac(x):
+            return -np.sin(x[0])
+
+        x0 = [0.1]
+        xtol = 0
+        result = optimize.minimize(cosine,
+                                   x0=x0,
+                                   jac=jac,
+                                   method="newton-cg",
+                                   options=dict(xtol=xtol))
+        assert result.status == 0
+        assert_almost_equal(result.x[0], np.pi)
+
+    def test_ncg(self):
+        # line-search Newton conjugate gradient optimization routine
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            retval = optimize.minimize(self.func, self.startparams,
+                                       method='Newton-CG', jac=self.grad,
+                                       args=(), options=opts)['x']
+        else:
+            retval = optimize.fmin_ncg(self.func, self.startparams, self.grad,
+                                       args=(), maxiter=self.maxiter,
+                                       full_output=False, disp=self.disp,
+                                       retall=False)
+
+        params = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c == 7, self.funccalls.c
+        assert self.gradcalls.c <= 22, self.gradcalls.c  # 0.13.0
+        # assert self.gradcalls <= 18, self.gradcalls  # 0.9.0
+        # assert self.gradcalls == 18, self.gradcalls  # 0.8.0
+        # assert self.gradcalls == 22, self.gradcalls  # 0.7.0
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[3:5],
+                        [[-4.35700753e-07, -5.24869435e-01, 4.87527480e-01],
+                         [-4.35700753e-07, -5.24869401e-01, 4.87527774e-01]],
+                        atol=1e-6, rtol=1e-7)
+
+    def test_ncg_hess(self):
+        # Newton conjugate gradient with Hessian
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            retval = optimize.minimize(self.func, self.startparams,
+                                       method='Newton-CG', jac=self.grad,
+                                       hess=self.hess,
+                                       args=(), options=opts)['x']
+        else:
+            retval = optimize.fmin_ncg(self.func, self.startparams, self.grad,
+                                       fhess=self.hess,
+                                       args=(), maxiter=self.maxiter,
+                                       full_output=False, disp=self.disp,
+                                       retall=False)
+
+        params = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c <= 7, self.funccalls.c  # gh10673
+        assert self.gradcalls.c <= 18, self.gradcalls.c  # 0.9.0
+        # assert self.gradcalls == 18, self.gradcalls  # 0.8.0
+        # assert self.gradcalls == 22, self.gradcalls  # 0.7.0
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[3:5],
+                        [[-4.35700753e-07, -5.24869435e-01, 4.87527480e-01],
+                         [-4.35700753e-07, -5.24869401e-01, 4.87527774e-01]],
+                        atol=1e-6, rtol=1e-7)
+
+    def test_ncg_hessp(self):
+        # Newton conjugate gradient with Hessian times a vector p.
+        if self.use_wrapper:
+            opts = {'maxiter': self.maxiter, 'disp': self.disp,
+                    'return_all': False}
+            retval = optimize.minimize(self.func, self.startparams,
+                                       method='Newton-CG', jac=self.grad,
+                                       hessp=self.hessp,
+                                       args=(), options=opts)['x']
+        else:
+            retval = optimize.fmin_ncg(self.func, self.startparams, self.grad,
+                                       fhess_p=self.hessp,
+                                       args=(), maxiter=self.maxiter,
+                                       full_output=False, disp=self.disp,
+                                       retall=False)
+
+        params = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c <= 7, self.funccalls.c  # gh10673
+        assert self.gradcalls.c <= 18, self.gradcalls.c  # 0.9.0
+        # assert self.gradcalls == 18, self.gradcalls  # 0.8.0
+        # assert self.gradcalls == 22, self.gradcalls  # 0.7.0
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        assert_allclose(self.trace.t[3:5],
+                        [[-4.35700753e-07, -5.24869435e-01, 4.87527480e-01],
+                         [-4.35700753e-07, -5.24869401e-01, 4.87527774e-01]],
+                        atol=1e-6, rtol=1e-7)
+
+    def test_cobyqa(self):
+        # COBYQA method.
+        if self.use_wrapper:
+            res = optimize.minimize(
+                self.func,
+                self.startparams,
+                method='cobyqa',
+                options={'maxiter': self.maxiter, 'disp': self.disp},
+            )
+            assert_allclose(res.fun, self.func(self.solution), atol=1e-6)
+
+            # Ensure that function call counts are 'known good'; these are from
+            # SciPy 1.14.0. Don't allow them to increase. The exact evaluation
+            # count is sensitive to numerical error and floating-point
+            # computations are not bit-for-bit reproducible across machines. It
+            # takes 45 calls on my machine, but we can add the same +20 margin
+            # as is used in `test_powell`
+            assert self.funccalls.c <= 45 + 20, self.funccalls.c
+
+
+def test_maxfev_test():
+    rng = np.random.default_rng(271707100830272976862395227613146332411)
+
+    def cost(x):
+        return rng.random(1) * 1000  # never converged problem
+
+    for imaxfev in [1, 10, 50]:
+        # "TNC" and "L-BFGS-B" also supports max function evaluation, but
+        # these may violate the limit because of evaluating gradients
+        # by numerical differentiation. See the discussion in PR #14805.
+        for method in ['Powell', 'Nelder-Mead']:
+            result = optimize.minimize(cost, rng.random(10),
+                                       method=method,
+                                       options={'maxfev': imaxfev})
+            assert result["nfev"] == imaxfev
+
+
+def test_wrap_scalar_function_with_validation():
+
+    def func_(x):
+        return x
+
+    fcalls, func = optimize._optimize.\
+        _wrap_scalar_function_maxfun_validation(func_, np.asarray(1), 5)
+
+    for i in range(5):
+        func(np.asarray(i))
+        assert fcalls[0] == i+1
+
+    msg = "Too many function calls"
+    with assert_raises(optimize._optimize._MaxFuncCallError, match=msg):
+        func(np.asarray(i))  # exceeded maximum function call
+
+    fcalls, func = optimize._optimize.\
+        _wrap_scalar_function_maxfun_validation(func_, np.asarray(1), 5)
+
+    msg = "The user-provided objective function must return a scalar value."
+    with assert_raises(ValueError, match=msg):
+        func(np.array([1, 1]))
+
+
+def test_obj_func_returns_scalar():
+    match = ("The user-provided "
+             "objective function must "
+             "return a scalar value.")
+    with assert_raises(ValueError, match=match):
+        optimize.minimize(lambda x: x, np.array([1, 1]), method='BFGS')
+
+
+def test_neldermead_iteration_num():
+    x0 = np.array([1.3, 0.7, 0.8, 1.9, 1.2])
+    res = optimize._minimize._minimize_neldermead(optimize.rosen, x0,
+                                                  xatol=1e-8)
+    assert res.nit <= 339
+
+
+def test_neldermead_respect_fp():
+    # Nelder-Mead should respect the fp type of the input + function
+    x0 = np.array([5.0, 4.0]).astype(np.float32)
+    def rosen_(x):
+        assert x.dtype == np.float32
+        return optimize.rosen(x)
+
+    optimize.minimize(rosen_, x0, method='Nelder-Mead')
+
+
+def test_neldermead_xatol_fatol():
+    # gh4484
+    # test we can call with fatol, xatol specified
+    def func(x):
+        return x[0] ** 2 + x[1] ** 2
+
+    optimize._minimize._minimize_neldermead(func, [1, 1], maxiter=2,
+                                            xatol=1e-3, fatol=1e-3)
+
+
+def test_neldermead_adaptive():
+    def func(x):
+        return np.sum(x ** 2)
+    p0 = [0.15746215, 0.48087031, 0.44519198, 0.4223638, 0.61505159,
+          0.32308456, 0.9692297, 0.4471682, 0.77411992, 0.80441652,
+          0.35994957, 0.75487856, 0.99973421, 0.65063887, 0.09626474]
+
+    res = optimize.minimize(func, p0, method='Nelder-Mead')
+    assert_equal(res.success, False)
+
+    res = optimize.minimize(func, p0, method='Nelder-Mead',
+                            options={'adaptive': True})
+    assert_equal(res.success, True)
+
+
+@pytest.mark.thread_unsafe
+def test_bounded_powell_outsidebounds():
+    # With the bounded Powell method if you start outside the bounds the final
+    # should still be within the bounds (provided that the user doesn't make a
+    # bad choice for the `direc` argument).
+    def func(x):
+        return np.sum(x ** 2)
+    bounds = (-1, 1), (-1, 1), (-1, 1)
+    x0 = [-4, .5, -.8]
+
+    # we're starting outside the bounds, so we should get a warning
+    with assert_warns(optimize.OptimizeWarning):
+        res = optimize.minimize(func, x0, bounds=bounds, method="Powell")
+    assert_allclose(res.x, np.array([0.] * len(x0)), atol=1e-6)
+    assert_equal(res.success, True)
+    assert_equal(res.status, 0)
+
+    # However, now if we change the `direc` argument such that the
+    # set of vectors does not span the parameter space, then we may
+    # not end up back within the bounds. Here we see that the first
+    # parameter cannot be updated!
+    direc = [[0, 0, 0], [0, 1, 0], [0, 0, 1]]
+    # we're starting outside the bounds, so we should get a warning
+    with assert_warns(optimize.OptimizeWarning):
+        res = optimize.minimize(func, x0,
+                                bounds=bounds, method="Powell",
+                                options={'direc': direc})
+    assert_allclose(res.x, np.array([-4., 0, 0]), atol=1e-6)
+    assert_equal(res.success, False)
+    assert_equal(res.status, 4)
+
+
+@pytest.mark.thread_unsafe
+def test_bounded_powell_vs_powell():
+    # here we test an example where the bounded Powell method
+    # will return a different result than the standard Powell
+    # method.
+
+    # first we test a simple example where the minimum is at
+    # the origin and the minimum that is within the bounds is
+    # larger than the minimum at the origin.
+    def func(x):
+        return np.sum(x ** 2)
+    bounds = (-5, -1), (-10, -0.1), (1, 9.2), (-4, 7.6), (-15.9, -2)
+    x0 = [-2.1, -5.2, 1.9, 0, -2]
+
+    options = {'ftol': 1e-10, 'xtol': 1e-10}
+
+    res_powell = optimize.minimize(func, x0, method="Powell", options=options)
+    assert_allclose(res_powell.x, 0., atol=1e-6)
+    assert_allclose(res_powell.fun, 0., atol=1e-6)
+
+    res_bounded_powell = optimize.minimize(func, x0, options=options,
+                                           bounds=bounds,
+                                           method="Powell")
+    p = np.array([-1, -0.1, 1, 0, -2])
+    assert_allclose(res_bounded_powell.x, p, atol=1e-6)
+    assert_allclose(res_bounded_powell.fun, func(p), atol=1e-6)
+
+    # now we test bounded Powell but with a mix of inf bounds.
+    bounds = (None, -1), (-np.inf, -.1), (1, np.inf), (-4, None), (-15.9, -2)
+    res_bounded_powell = optimize.minimize(func, x0, options=options,
+                                           bounds=bounds,
+                                           method="Powell")
+    p = np.array([-1, -0.1, 1, 0, -2])
+    assert_allclose(res_bounded_powell.x, p, atol=1e-6)
+    assert_allclose(res_bounded_powell.fun, func(p), atol=1e-6)
+
+    # next we test an example where the global minimum is within
+    # the bounds, but the bounded Powell method performs better
+    # than the standard Powell method.
+    def func(x):
+        t = np.sin(-x[0]) * np.cos(x[1]) * np.sin(-x[0] * x[1]) * np.cos(x[1])
+        t -= np.cos(np.sin(x[1] * x[2]) * np.cos(x[2]))
+        return t**2
+
+    bounds = [(-2, 5)] * 3
+    x0 = [-0.5, -0.5, -0.5]
+
+    res_powell = optimize.minimize(func, x0, method="Powell")
+    res_bounded_powell = optimize.minimize(func, x0,
+                                           bounds=bounds,
+                                           method="Powell")
+    assert_allclose(res_powell.fun, 0.007136253919761627, atol=1e-6)
+    assert_allclose(res_bounded_powell.fun, 0, atol=1e-6)
+
+    # next we test the previous example where the we provide Powell
+    # with (-inf, inf) bounds, and compare it to providing Powell
+    # with no bounds. They should end up the same.
+    bounds = [(-np.inf, np.inf)] * 3
+
+    res_bounded_powell = optimize.minimize(func, x0,
+                                           bounds=bounds,
+                                           method="Powell")
+    assert_allclose(res_powell.fun, res_bounded_powell.fun, atol=1e-6)
+    assert_allclose(res_powell.nfev, res_bounded_powell.nfev, atol=1e-6)
+    assert_allclose(res_powell.x, res_bounded_powell.x, atol=1e-6)
+
+    # now test when x0 starts outside of the bounds.
+    x0 = [45.46254415, -26.52351498, 31.74830248]
+    bounds = [(-2, 5)] * 3
+    # we're starting outside the bounds, so we should get a warning
+    with assert_warns(optimize.OptimizeWarning):
+        res_bounded_powell = optimize.minimize(func, x0,
+                                               bounds=bounds,
+                                               method="Powell")
+    assert_allclose(res_bounded_powell.fun, 0, atol=1e-6)
+
+
+def test_onesided_bounded_powell_stability():
+    # When the Powell method is bounded on only one side, a
+    # np.tan transform is done in order to convert it into a
+    # completely bounded problem. Here we do some simple tests
+    # of one-sided bounded Powell where the optimal solutions
+    # are large to test the stability of the transformation.
+    kwargs = {'method': 'Powell',
+              'bounds': [(-np.inf, 1e6)] * 3,
+              'options': {'ftol': 1e-8, 'xtol': 1e-8}}
+    x0 = [1, 1, 1]
+
+    # df/dx is constant.
+    def f(x):
+        return -np.sum(x)
+    res = optimize.minimize(f, x0, **kwargs)
+    assert_allclose(res.fun, -3e6, atol=1e-4)
+
+    # df/dx gets smaller and smaller.
+    def f(x):
+        return -np.abs(np.sum(x)) ** (0.1) * (1 if np.all(x > 0) else -1)
+
+    res = optimize.minimize(f, x0, **kwargs)
+    assert_allclose(res.fun, -(3e6) ** (0.1))
+
+    # df/dx gets larger and larger.
+    def f(x):
+        return -np.abs(np.sum(x)) ** 10 * (1 if np.all(x > 0) else -1)
+
+    res = optimize.minimize(f, x0, **kwargs)
+    assert_allclose(res.fun, -(3e6) ** 10, rtol=1e-7)
+
+    # df/dx gets larger for some of the variables and smaller for others.
+    def f(x):
+        t = -np.abs(np.sum(x[:2])) ** 5 - np.abs(np.sum(x[2:])) ** (0.1)
+        t *= (1 if np.all(x > 0) else -1)
+        return t
+
+    kwargs['bounds'] = [(-np.inf, 1e3)] * 3
+    res = optimize.minimize(f, x0, **kwargs)
+    assert_allclose(res.fun, -(2e3) ** 5 - (1e6) ** (0.1), rtol=1e-7)
+
+
+class TestOptimizeWrapperDisp(CheckOptimizeParameterized):
+    use_wrapper = True
+    disp = True
+
+
+class TestOptimizeWrapperNoDisp(CheckOptimizeParameterized):
+    use_wrapper = True
+    disp = False
+
+
+class TestOptimizeNoWrapperDisp(CheckOptimizeParameterized):
+    use_wrapper = False
+    disp = True
+
+
+class TestOptimizeNoWrapperNoDisp(CheckOptimizeParameterized):
+    use_wrapper = False
+    disp = False
+
+
+class TestOptimizeSimple(CheckOptimize):
+
+    def test_bfgs_nan(self):
+        # Test corner case where nan is fed to optimizer.  See gh-2067.
+        def func(x):
+            return x
+        def fprime(x):
+            return np.ones_like(x)
+        x0 = [np.nan]
+        with np.errstate(over='ignore', invalid='ignore'):
+            x = optimize.fmin_bfgs(func, x0, fprime, disp=False)
+            assert np.isnan(func(x))
+
+    def test_bfgs_nan_return(self):
+        # Test corner cases where fun returns NaN. See gh-4793.
+
+        # First case: NaN from first call.
+        def func(x):
+            return np.nan
+        with np.errstate(invalid='ignore'):
+            result = optimize.minimize(func, 0)
+
+        assert np.isnan(result['fun'])
+        assert result['success'] is False
+
+        # Second case: NaN from second call.
+        def func(x):
+            return 0 if x == 0 else np.nan
+        def fprime(x):
+            return np.ones_like(x)  # Steer away from zero.
+        with np.errstate(invalid='ignore'):
+            result = optimize.minimize(func, 0, jac=fprime)
+
+        assert np.isnan(result['fun'])
+        assert result['success'] is False
+
+    def test_bfgs_numerical_jacobian(self):
+        # BFGS with numerical Jacobian and a vector epsilon parameter.
+        # define the epsilon parameter using a random vector
+        epsilon = np.sqrt(np.spacing(1.)) * np.random.rand(len(self.solution))
+
+        params = optimize.fmin_bfgs(self.func, self.startparams,
+                                    epsilon=epsilon, args=(),
+                                    maxiter=self.maxiter, disp=False)
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+    def test_finite_differences_jac(self):
+        methods = ['BFGS', 'CG', 'TNC']
+        jacs = ['2-point', '3-point', None]
+        for method, jac in itertools.product(methods, jacs):
+            result = optimize.minimize(self.func, self.startparams,
+                                       method=method, jac=jac)
+            assert_allclose(self.func(result.x), self.func(self.solution),
+                            atol=1e-6)
+
+    def test_finite_differences_hess(self):
+        # test that all the methods that require hess can use finite-difference
+        # For Newton-CG, trust-ncg, trust-krylov the FD estimated hessian is
+        # wrapped in a hessp function
+        # dogleg, trust-exact actually require true hessians at the moment, so
+        # they're excluded.
+        methods = ['trust-constr', 'Newton-CG', 'trust-ncg', 'trust-krylov']
+        hesses = FD_METHODS + (optimize.BFGS,)
+        for method, hess in itertools.product(methods, hesses):
+            if hess is optimize.BFGS:
+                hess = hess()
+            result = optimize.minimize(self.func, self.startparams,
+                                       method=method, jac=self.grad,
+                                       hess=hess)
+            assert result.success
+
+        # check that the methods demand some sort of Hessian specification
+        # Newton-CG creates its own hessp, and trust-constr doesn't need a hess
+        # specified either
+        methods = ['trust-ncg', 'trust-krylov', 'dogleg', 'trust-exact']
+        for method in methods:
+            with pytest.raises(ValueError):
+                optimize.minimize(self.func, self.startparams,
+                                  method=method, jac=self.grad,
+                                  hess=None)
+
+    def test_bfgs_gh_2169(self):
+        def f(x):
+            if x < 0:
+                return 1.79769313e+308
+            else:
+                return x + 1./x
+        xs = optimize.fmin_bfgs(f, [10.], disp=False)
+        assert_allclose(xs, 1.0, rtol=1e-4, atol=1e-4)
+
+    def test_bfgs_double_evaluations(self):
+        # check BFGS does not evaluate twice in a row at same point
+        def f(x):
+            xp = x[0]
+            assert xp not in seen
+            seen.add(xp)
+            return 10*x**2, 20*x
+
+        seen = set()
+        optimize.minimize(f, -100, method='bfgs', jac=True, tol=1e-7)
+
+    def test_l_bfgs_b(self):
+        # limited-memory bound-constrained BFGS algorithm
+        retval = optimize.fmin_l_bfgs_b(self.func, self.startparams,
+                                        self.grad, args=(),
+                                        maxiter=self.maxiter)
+
+        (params, fopt, d) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+        # Ensure that function call counts are 'known good'; these are from
+        # SciPy 0.7.0. Don't allow them to increase.
+        assert self.funccalls.c == 7, self.funccalls.c
+        assert self.gradcalls.c == 5, self.gradcalls.c
+
+        # Ensure that the function behaves the same; this is from SciPy 0.7.0
+        # test fixed in gh10673
+        assert_allclose(self.trace.t[3:5],
+                        [[8.117083e-16, -5.196198e-01, 4.897617e-01],
+                         [0., -0.52489628, 0.48753042]],
+                        atol=1e-14, rtol=1e-7)
+
+    def test_l_bfgs_b_numjac(self):
+        # L-BFGS-B with numerical Jacobian
+        retval = optimize.fmin_l_bfgs_b(self.func, self.startparams,
+                                        approx_grad=True,
+                                        maxiter=self.maxiter)
+
+        (params, fopt, d) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+    def test_l_bfgs_b_funjac(self):
+        # L-BFGS-B with combined objective function and Jacobian
+        def fun(x):
+            return self.func(x), self.grad(x)
+
+        retval = optimize.fmin_l_bfgs_b(fun, self.startparams,
+                                        maxiter=self.maxiter)
+
+        (params, fopt, d) = retval
+
+        assert_allclose(self.func(params), self.func(self.solution),
+                        atol=1e-6)
+
+    def test_l_bfgs_b_maxiter(self):
+        # gh7854
+        # Ensure that not more than maxiters are ever run.
+        class Callback:
+            def __init__(self):
+                self.nit = 0
+                self.fun = None
+                self.x = None
+
+            def __call__(self, x):
+                self.x = x
+                self.fun = optimize.rosen(x)
+                self.nit += 1
+
+        c = Callback()
+        res = optimize.minimize(optimize.rosen, [0., 0.], method='l-bfgs-b',
+                                callback=c, options={'maxiter': 5})
+
+        assert_equal(res.nit, 5)
+        assert_almost_equal(res.x, c.x)
+        assert_almost_equal(res.fun, c.fun)
+        assert_equal(res.status, 1)
+        assert res.success is False
+        assert_equal(res.message,
+                     'STOP: TOTAL NO. OF ITERATIONS REACHED LIMIT')
+
+    def test_minimize_l_bfgs_b(self):
+        # Minimize with L-BFGS-B method
+        opts = {'disp': False, 'maxiter': self.maxiter}
+        r = optimize.minimize(self.func, self.startparams,
+                              method='L-BFGS-B', jac=self.grad,
+                              options=opts)
+        assert_allclose(self.func(r.x), self.func(self.solution),
+                        atol=1e-6)
+        assert self.gradcalls.c == r.njev
+
+        self.funccalls.c = self.gradcalls.c = 0
+        # approximate jacobian
+        ra = optimize.minimize(self.func, self.startparams,
+                               method='L-BFGS-B', options=opts)
+        # check that function evaluations in approximate jacobian are counted
+        # assert_(ra.nfev > r.nfev)
+        assert self.funccalls.c == ra.nfev
+        assert_allclose(self.func(ra.x), self.func(self.solution),
+                        atol=1e-6)
+
+        self.funccalls.c = self.gradcalls.c = 0
+        # approximate jacobian
+        ra = optimize.minimize(self.func, self.startparams, jac='3-point',
+                               method='L-BFGS-B', options=opts)
+        assert self.funccalls.c == ra.nfev
+        assert_allclose(self.func(ra.x), self.func(self.solution),
+                        atol=1e-6)
+
+    def test_minimize_l_bfgs_b_ftol(self):
+        # Check that the `ftol` parameter in l_bfgs_b works as expected
+        v0 = None
+        for tol in [1e-1, 1e-4, 1e-7, 1e-10]:
+            opts = {'disp': False, 'maxiter': self.maxiter, 'ftol': tol}
+            sol = optimize.minimize(self.func, self.startparams,
+                                    method='L-BFGS-B', jac=self.grad,
+                                    options=opts)
+            v = self.func(sol.x)
+
+            if v0 is None:
+                v0 = v
+            else:
+                assert v < v0
+
+            assert_allclose(v, self.func(self.solution), rtol=tol)
+
+    def test_minimize_l_bfgs_maxls(self):
+        # check that the maxls is passed down to the Fortran routine
+        sol = optimize.minimize(optimize.rosen, np.array([-1.2, 1.0]),
+                                method='L-BFGS-B', jac=optimize.rosen_der,
+                                options={'disp': False, 'maxls': 1})
+        assert not sol.success
+
+    def test_minimize_l_bfgs_b_maxfun_interruption(self):
+        # gh-6162
+        f = optimize.rosen
+        g = optimize.rosen_der
+        values = []
+        x0 = np.full(7, 1000)
+
+        def objfun(x):
+            value = f(x)
+            values.append(value)
+            return value
+
+        # Look for an interesting test case.
+        # Request a maxfun that stops at a particularly bad function
+        # evaluation somewhere between 100 and 300 evaluations.
+        low, medium, high = 30, 100, 300
+        optimize.fmin_l_bfgs_b(objfun, x0, fprime=g, maxfun=high)
+        v, k = max((y, i) for i, y in enumerate(values[medium:]))
+        maxfun = medium + k
+        # If the minimization strategy is reasonable,
+        # the minimize() result should not be worse than the best
+        # of the first 30 function evaluations.
+        target = min(values[:low])
+        xmin, fmin, d = optimize.fmin_l_bfgs_b(f, x0, fprime=g, maxfun=maxfun)
+        assert_array_less(fmin, target)
+
+    def test_custom(self):
+        # This function comes from the documentation example.
+        def custmin(fun, x0, args=(), maxfev=None, stepsize=0.1,
+                    maxiter=100, callback=None, **options):
+            bestx = x0
+            besty = fun(x0)
+            funcalls = 1
+            niter = 0
+            improved = True
+            stop = False
+
+            while improved and not stop and niter < maxiter:
+                improved = False
+                niter += 1
+                for dim in range(np.size(x0)):
+                    for s in [bestx[dim] - stepsize, bestx[dim] + stepsize]:
+                        testx = np.copy(bestx)
+                        testx[dim] = s
+                        testy = fun(testx, *args)
+                        funcalls += 1
+                        if testy < besty:
+                            besty = testy
+                            bestx = testx
+                            improved = True
+                    if callback is not None:
+                        callback(bestx)
+                    if maxfev is not None and funcalls >= maxfev:
+                        stop = True
+                        break
+
+            return optimize.OptimizeResult(fun=besty, x=bestx, nit=niter,
+                                           nfev=funcalls, success=(niter > 1))
+
+        x0 = [1.35, 0.9, 0.8, 1.1, 1.2]
+        res = optimize.minimize(optimize.rosen, x0, method=custmin,
+                                options=dict(stepsize=0.05))
+        assert_allclose(res.x, 1.0, rtol=1e-4, atol=1e-4)
+
+    def test_gh10771(self):
+        # check that minimize passes bounds and constraints to a custom
+        # minimizer without altering them.
+        bounds = [(-2, 2), (0, 3)]
+        constraints = 'constraints'
+
+        def custmin(fun, x0, **options):
+            assert options['bounds'] is bounds
+            assert options['constraints'] is constraints
+            return optimize.OptimizeResult()
+
+        x0 = [1, 1]
+        optimize.minimize(optimize.rosen, x0, method=custmin,
+                          bounds=bounds, constraints=constraints)
+
+    def test_minimize_tol_parameter(self):
+        # Check that the minimize() tol= argument does something
+        def func(z):
+            x, y = z
+            return x**2*y**2 + x**4 + 1
+
+        def dfunc(z):
+            x, y = z
+            return np.array([2*x*y**2 + 4*x**3, 2*x**2*y])
+
+        for method in ['nelder-mead', 'powell', 'cg', 'bfgs',
+                       'newton-cg', 'l-bfgs-b', 'tnc',
+                       'cobyla', 'cobyqa', 'slsqp']:
+            if method in ('nelder-mead', 'powell', 'cobyla', 'cobyqa'):
+                jac = None
+            else:
+                jac = dfunc
+
+            sol1 = optimize.minimize(func, [2, 2], jac=jac, tol=1e-10,
+                                     method=method)
+            sol2 = optimize.minimize(func, [2, 2], jac=jac, tol=1.0,
+                                     method=method)
+            assert func(sol1.x) < func(sol2.x), \
+                   f"{method}: {func(sol1.x)} vs. {func(sol2.x)}"
+
+    @pytest.mark.fail_slow(10)
+    @pytest.mark.filterwarnings('ignore::UserWarning')
+    @pytest.mark.filterwarnings('ignore::RuntimeWarning')  # See gh-18547
+    @pytest.mark.parametrize('method',
+                             ['fmin', 'fmin_powell', 'fmin_cg', 'fmin_bfgs',
+                              'fmin_ncg', 'fmin_l_bfgs_b', 'fmin_tnc',
+                              'fmin_slsqp'] + MINIMIZE_METHODS)
+    def test_minimize_callback_copies_array(self, method):
+        # Check that arrays passed to callbacks are not modified
+        # inplace by the optimizer afterward
+
+        if method in ('fmin_tnc', 'fmin_l_bfgs_b'):
+            def func(x):
+                return optimize.rosen(x), optimize.rosen_der(x)
+        else:
+            func = optimize.rosen
+            jac = optimize.rosen_der
+            hess = optimize.rosen_hess
+
+        x0 = np.zeros(10)
+
+        # Set options
+        kwargs = {}
+        if method.startswith('fmin'):
+            routine = getattr(optimize, method)
+            if method == 'fmin_slsqp':
+                kwargs['iter'] = 5
+            elif method == 'fmin_tnc':
+                kwargs['maxfun'] = 100
+            elif method in ('fmin', 'fmin_powell'):
+                kwargs['maxiter'] = 3500
+            else:
+                kwargs['maxiter'] = 5
+        else:
+            def routine(*a, **kw):
+                kw['method'] = method
+                return optimize.minimize(*a, **kw)
+
+            if method == 'tnc':
+                kwargs['options'] = dict(maxfun=100)
+            else:
+                kwargs['options'] = dict(maxiter=5)
+
+        if method in ('fmin_ncg',):
+            kwargs['fprime'] = jac
+        elif method in ('newton-cg',):
+            kwargs['jac'] = jac
+        elif method in ('trust-krylov', 'trust-exact', 'trust-ncg', 'dogleg',
+                        'trust-constr'):
+            kwargs['jac'] = jac
+            kwargs['hess'] = hess
+
+        # Run with callback
+        results = []
+
+        def callback(x, *args, **kwargs):
+            assert not isinstance(x, optimize.OptimizeResult)
+            results.append((x, np.copy(x)))
+
+        routine(func, x0, callback=callback, **kwargs)
+
+        # Check returned arrays coincide with their copies
+        # and have no memory overlap
+        assert len(results) > 2
+        assert all(np.all(x == y) for x, y in results)
+        combinations = itertools.combinations(results, 2)
+        assert not any(np.may_share_memory(x[0], y[0]) for x, y in combinations)
+
+    @pytest.mark.parametrize('method', ['nelder-mead', 'powell', 'cg',
+                                        'bfgs', 'newton-cg', 'l-bfgs-b',
+                                        'tnc', 'cobyla', 'cobyqa', 'slsqp'])
+    def test_no_increase(self, method):
+        # Check that the solver doesn't return a value worse than the
+        # initial point.
+
+        def func(x):
+            return (x - 1)**2
+
+        def bad_grad(x):
+            # purposefully invalid gradient function, simulates a case
+            # where line searches start failing
+            return 2*(x - 1) * (-1) - 2
+
+        x0 = np.array([2.0])
+        f0 = func(x0)
+        jac = bad_grad
+        options = dict(maxfun=20) if method == 'tnc' else dict(maxiter=20)
+        if method in ['nelder-mead', 'powell', 'cobyla', 'cobyqa']:
+            jac = None
+        sol = optimize.minimize(func, x0, jac=jac, method=method,
+                                options=options)
+        assert_equal(func(sol.x), sol.fun)
+
+        if method == 'slsqp':
+            pytest.xfail("SLSQP returns slightly worse")
+        assert func(sol.x) <= f0
+
+    def test_slsqp_respect_bounds(self):
+        # Regression test for gh-3108
+        def f(x):
+            return sum((x - np.array([1., 2., 3., 4.]))**2)
+
+        def cons(x):
+            a = np.array([[-1, -1, -1, -1], [-3, -3, -2, -1]])
+            return np.concatenate([np.dot(a, x) + np.array([5, 10]), x])
+
+        x0 = np.array([0.5, 1., 1.5, 2.])
+        res = optimize.minimize(f, x0, method='slsqp',
+                                constraints={'type': 'ineq', 'fun': cons})
+        assert_allclose(res.x, np.array([0., 2, 5, 8])/3, atol=1e-12)
+
+    @pytest.mark.parametrize('method', ['Nelder-Mead', 'Powell', 'CG', 'BFGS',
+                                        'Newton-CG', 'L-BFGS-B', 'SLSQP',
+                                        'trust-constr', 'dogleg', 'trust-ncg',
+                                        'trust-exact', 'trust-krylov',
+                                        'cobyqa'])
+    def test_respect_maxiter(self, method):
+        # Check that the number of iterations equals max_iter, assuming
+        # convergence doesn't establish before
+        MAXITER = 4
+
+        x0 = np.zeros(10)
+
+        sf = ScalarFunction(optimize.rosen, x0, (), optimize.rosen_der,
+                            optimize.rosen_hess, None, None)
+
+        # Set options
+        kwargs = {'method': method, 'options': dict(maxiter=MAXITER)}
+
+        if method in ('Newton-CG',):
+            kwargs['jac'] = sf.grad
+        elif method in ('trust-krylov', 'trust-exact', 'trust-ncg', 'dogleg',
+                        'trust-constr'):
+            kwargs['jac'] = sf.grad
+            kwargs['hess'] = sf.hess
+
+        sol = optimize.minimize(sf.fun, x0, **kwargs)
+        assert sol.nit == MAXITER
+        assert sol.nfev >= sf.nfev
+        if hasattr(sol, 'njev'):
+            assert sol.njev >= sf.ngev
+
+        # method specific tests
+        if method == 'SLSQP':
+            assert sol.status == 9  # Iteration limit reached
+        elif method == 'cobyqa':
+            assert sol.status == 6  # Iteration limit reached
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('method', ['Nelder-Mead', 'Powell',
+                                        'fmin', 'fmin_powell'])
+    def test_runtime_warning(self, method):
+        x0 = np.zeros(10)
+        sf = ScalarFunction(optimize.rosen, x0, (), optimize.rosen_der,
+                            optimize.rosen_hess, None, None)
+        options = {"maxiter": 1, "disp": True}
+        with pytest.warns(RuntimeWarning,
+                          match=r'Maximum number of iterations'):
+            if method.startswith('fmin'):
+                routine = getattr(optimize, method)
+                routine(sf.fun, x0, **options)
+            else:
+                optimize.minimize(sf.fun, x0, method=method, options=options)
+
+    def test_respect_maxiter_trust_constr_ineq_constraints(self):
+        # special case of minimization with trust-constr and inequality
+        # constraints to check maxiter limit is obeyed when using internal
+        # method 'tr_interior_point'
+        MAXITER = 4
+        f = optimize.rosen
+        jac = optimize.rosen_der
+        hess = optimize.rosen_hess
+
+        def fun(x):
+            return np.array([0.2 * x[0] - 0.4 * x[1] - 0.33 * x[2]])
+        cons = ({'type': 'ineq',
+                 'fun': fun},)
+
+        x0 = np.zeros(10)
+        sol = optimize.minimize(f, x0, constraints=cons, jac=jac, hess=hess,
+                                method='trust-constr',
+                                options=dict(maxiter=MAXITER))
+        assert sol.nit == MAXITER
+
+    def test_minimize_automethod(self):
+        def f(x):
+            return x**2
+
+        def cons(x):
+            return x - 2
+
+        x0 = np.array([10.])
+        sol_0 = optimize.minimize(f, x0)
+        sol_1 = optimize.minimize(f, x0, constraints=[{'type': 'ineq',
+                                                       'fun': cons}])
+        sol_2 = optimize.minimize(f, x0, bounds=[(5, 10)])
+        sol_3 = optimize.minimize(f, x0,
+                                  constraints=[{'type': 'ineq', 'fun': cons}],
+                                  bounds=[(5, 10)])
+        sol_4 = optimize.minimize(f, x0,
+                                  constraints=[{'type': 'ineq', 'fun': cons}],
+                                  bounds=[(1, 10)])
+        for sol in [sol_0, sol_1, sol_2, sol_3, sol_4]:
+            assert sol.success
+        assert_allclose(sol_0.x, 0, atol=1e-7)
+        assert_allclose(sol_1.x, 2, atol=1e-7)
+        assert_allclose(sol_2.x, 5, atol=1e-7)
+        assert_allclose(sol_3.x, 5, atol=1e-7)
+        assert_allclose(sol_4.x, 2, atol=1e-7)
+
+    def test_minimize_coerce_args_param(self):
+        # Regression test for gh-3503
+        def Y(x, c):
+            return np.sum((x-c)**2)
+
+        def dY_dx(x, c=None):
+            return 2*(x-c)
+
+        c = np.array([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5])
+        xinit = np.random.randn(len(c))
+        optimize.minimize(Y, xinit, jac=dY_dx, args=(c), method="BFGS")
+
+    def test_initial_step_scaling(self):
+        # Check that optimizer initial step is not huge even if the
+        # function and gradients are
+
+        scales = [1e-50, 1, 1e50]
+        methods = ['CG', 'BFGS', 'L-BFGS-B', 'Newton-CG']
+
+        def f(x):
+            if first_step_size[0] is None and x[0] != x0[0]:
+                first_step_size[0] = abs(x[0] - x0[0])
+            if abs(x).max() > 1e4:
+                raise AssertionError("Optimization stepped far away!")
+            return scale*(x[0] - 1)**2
+
+        def g(x):
+            return np.array([scale*(x[0] - 1)])
+
+        for scale, method in itertools.product(scales, methods):
+            if method in ('CG', 'BFGS'):
+                options = dict(gtol=scale*1e-8)
+            else:
+                options = dict()
+
+            if scale < 1e-10 and method in ('L-BFGS-B', 'Newton-CG'):
+                # XXX: return initial point if they see small gradient
+                continue
+
+            x0 = [-1.0]
+            first_step_size = [None]
+            res = optimize.minimize(f, x0, jac=g, method=method,
+                                    options=options)
+
+            err_msg = f"{method} {scale}: {first_step_size}: {res}"
+
+            assert res.success, err_msg
+            assert_allclose(res.x, [1.0], err_msg=err_msg)
+            assert res.nit <= 3, err_msg
+
+            if scale > 1e-10:
+                if method in ('CG', 'BFGS'):
+                    assert_allclose(first_step_size[0], 1.01, err_msg=err_msg)
+                else:
+                    # Newton-CG and L-BFGS-B use different logic for the first
+                    # step, but are both scaling invariant with step sizes ~ 1
+                    assert first_step_size[0] > 0.5 and first_step_size[0] < 3, err_msg
+            else:
+                # step size has upper bound of ||grad||, so line
+                # search makes many small steps
+                pass
+
+    @pytest.mark.parametrize('method', ['nelder-mead', 'powell', 'cg', 'bfgs',
+                                        'newton-cg', 'l-bfgs-b', 'tnc',
+                                        'cobyla', 'cobyqa', 'slsqp',
+                                        'trust-constr', 'dogleg', 'trust-ncg',
+                                        'trust-exact', 'trust-krylov'])
+    def test_nan_values(self, method, num_parallel_threads):
+        if num_parallel_threads > 1 and method == 'cobyqa':
+            pytest.skip('COBYQA does not support concurrent execution')
+
+        # Check nan values result to failed exit status
+        rng = np.random.RandomState(1234)
+
+        count = [0]
+
+        def func(x):
+            return np.nan
+
+        def func2(x):
+            count[0] += 1
+            if count[0] > 2:
+                return np.nan
+            else:
+                return rng.rand()
+
+        def grad(x):
+            return np.array([1.0])
+
+        def hess(x):
+            return np.array([[1.0]])
+
+        x0 = np.array([1.0])
+
+        needs_grad = method in ('newton-cg', 'trust-krylov', 'trust-exact',
+                                'trust-ncg', 'dogleg')
+        needs_hess = method in ('trust-krylov', 'trust-exact', 'trust-ncg',
+                                'dogleg')
+
+        funcs = [func, func2]
+        grads = [grad] if needs_grad else [grad, None]
+        hesss = [hess] if needs_hess else [hess, None]
+        options = dict(maxfun=20) if method == 'tnc' else dict(maxiter=20)
+
+        with np.errstate(invalid='ignore'), suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.*")
+            sup.filter(RuntimeWarning, ".*does not use Hessian.*")
+            sup.filter(RuntimeWarning, ".*does not use gradient.*")
+
+            for f, g, h in itertools.product(funcs, grads, hesss):
+                count = [0]
+                sol = optimize.minimize(f, x0, jac=g, hess=h, method=method,
+                                        options=options)
+                assert_equal(sol.success, False)
+
+    @pytest.mark.parametrize('method', ['nelder-mead', 'cg', 'bfgs',
+                                        'l-bfgs-b', 'tnc',
+                                        'cobyla', 'cobyqa', 'slsqp',
+                                        'trust-constr', 'dogleg', 'trust-ncg',
+                                        'trust-exact', 'trust-krylov'])
+    def test_duplicate_evaluations(self, method):
+        # check that there are no duplicate evaluations for any methods
+        jac = hess = None
+        if method in ('newton-cg', 'trust-krylov', 'trust-exact',
+                      'trust-ncg', 'dogleg'):
+            jac = self.grad
+        if method in ('trust-krylov', 'trust-exact', 'trust-ncg',
+                      'dogleg'):
+            hess = self.hess
+
+        with np.errstate(invalid='ignore'), suppress_warnings() as sup:
+            # for trust-constr
+            sup.filter(UserWarning, "delta_grad == 0.*")
+            optimize.minimize(self.func, self.startparams,
+                              method=method, jac=jac, hess=hess)
+
+        for i in range(1, len(self.trace.t)):
+            if np.array_equal(self.trace.t[i - 1], self.trace.t[i]):
+                raise RuntimeError(
+                    f"Duplicate evaluations made by {method}")
+
+    @pytest.mark.filterwarnings('ignore::RuntimeWarning')
+    @pytest.mark.parametrize('method', MINIMIZE_METHODS_NEW_CB)
+    @pytest.mark.parametrize('new_cb_interface', [0, 1, 2])
+    def test_callback_stopiteration(self, method, new_cb_interface):
+        # Check that if callback raises StopIteration, optimization
+        # terminates with the same result as if iterations were limited
+
+        def f(x):
+            f.flag = False  # check that f isn't called after StopIteration
+            return optimize.rosen(x)
+        f.flag = False
+
+        def g(x):
+            f.flag = False
+            return optimize.rosen_der(x)
+
+        def h(x):
+            f.flag = False
+            return optimize.rosen_hess(x)
+
+        maxiter = 5
+
+        if new_cb_interface == 1:
+            def callback_interface(*, intermediate_result):
+                assert intermediate_result.fun == f(intermediate_result.x)
+                callback()
+        elif new_cb_interface == 2:
+            class Callback:
+                def __call__(self, intermediate_result: OptimizeResult):
+                    assert intermediate_result.fun == f(intermediate_result.x)
+                    callback()
+            callback_interface = Callback()
+        else:
+            def callback_interface(xk, *args):  # type: ignore[misc]
+                callback()
+
+        def callback():
+            callback.i += 1
+            callback.flag = False
+            if callback.i == maxiter:
+                callback.flag = True
+                raise StopIteration()
+        callback.i = 0
+        callback.flag = False
+
+        kwargs = {'x0': [1.1]*5, 'method': method,
+                  'fun': f, 'jac': g, 'hess': h}
+
+        res = optimize.minimize(**kwargs, callback=callback_interface)
+        if method == 'nelder-mead':
+            maxiter = maxiter + 1  # nelder-mead counts differently
+        if method == 'cobyqa':
+            ref = optimize.minimize(**kwargs, options={'maxfev': maxiter})
+            assert res.nfev == ref.nfev == maxiter
+        else:
+            ref = optimize.minimize(**kwargs, options={'maxiter': maxiter})
+            assert res.nit == ref.nit == maxiter
+        assert res.fun == ref.fun
+        assert_equal(res.x, ref.x)
+        assert res.status == (3 if method in [
+            'trust-constr',
+            'cobyqa',
+        ] else 99)
+
+    def test_ndim_error(self):
+        msg = "'x0' must only have one dimension."
+        with assert_raises(ValueError, match=msg):
+            optimize.minimize(lambda x: x, np.ones((2, 1)))
+
+    @pytest.mark.parametrize('method', ('nelder-mead', 'l-bfgs-b', 'tnc',
+                                        'powell', 'cobyla', 'cobyqa',
+                                        'trust-constr'))
+    def test_minimize_invalid_bounds(self, method):
+        def f(x):
+            return np.sum(x**2)
+
+        bounds = Bounds([1, 2], [3, 4])
+        msg = 'The number of bounds is not compatible with the length of `x0`.'
+        with pytest.raises(ValueError, match=msg):
+            optimize.minimize(f, x0=[1, 2, 3], method=method, bounds=bounds)
+
+        bounds = Bounds([1, 6, 1], [3, 4, 2])
+        msg = 'An upper bound is less than the corresponding lower bound.'
+        with pytest.raises(ValueError, match=msg):
+            optimize.minimize(f, x0=[1, 2, 3], method=method, bounds=bounds)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('method', ['bfgs', 'cg', 'newton-cg', 'powell'])
+    def test_minimize_warnings_gh1953(self, method):
+        # test that minimize methods produce warnings rather than just using
+        # `print`; see gh-1953.
+        kwargs = {} if method=='powell' else {'jac': optimize.rosen_der}
+        warning_type = (RuntimeWarning if method=='powell'
+                        else optimize.OptimizeWarning)
+
+        options = {'disp': True, 'maxiter': 10}
+        with pytest.warns(warning_type, match='Maximum number'):
+            optimize.minimize(lambda x: optimize.rosen(x), [0, 0],
+                              method=method, options=options, **kwargs)
+
+        options['disp'] = False
+        optimize.minimize(lambda x: optimize.rosen(x), [0, 0],
+                          method=method, options=options, **kwargs)
+
+
+@pytest.mark.parametrize(
+    'method',
+    ['l-bfgs-b', 'tnc', 'Powell', 'Nelder-Mead', 'cobyqa']
+)
+def test_minimize_with_scalar(method):
+    # checks that minimize works with a scalar being provided to it.
+    def f(x):
+        return np.sum(x ** 2)
+
+    res = optimize.minimize(f, 17, bounds=[(-100, 100)], method=method)
+    assert res.success
+    assert_allclose(res.x, [0.0], atol=1e-5)
+
+
+class TestLBFGSBBounds:
+    def setup_method(self):
+        self.bounds = ((1, None), (None, None))
+        self.solution = (1, 0)
+
+    def fun(self, x, p=2.0):
+        return 1.0 / p * (x[0]**p + x[1]**p)
+
+    def jac(self, x, p=2.0):
+        return x**(p - 1)
+
+    def fj(self, x, p=2.0):
+        return self.fun(x, p), self.jac(x, p)
+
+    def test_l_bfgs_b_bounds(self):
+        x, f, d = optimize.fmin_l_bfgs_b(self.fun, [0, -1],
+                                         fprime=self.jac,
+                                         bounds=self.bounds)
+        assert d['warnflag'] == 0, d['task']
+        assert_allclose(x, self.solution, atol=1e-6)
+
+    def test_l_bfgs_b_funjac(self):
+        # L-BFGS-B with fun and jac combined and extra arguments
+        x, f, d = optimize.fmin_l_bfgs_b(self.fj, [0, -1], args=(2.0, ),
+                                         bounds=self.bounds)
+        assert d['warnflag'] == 0, d['task']
+        assert_allclose(x, self.solution, atol=1e-6)
+
+    def test_minimize_l_bfgs_b_bounds(self):
+        # Minimize with method='L-BFGS-B' with bounds
+        res = optimize.minimize(self.fun, [0, -1], method='L-BFGS-B',
+                                jac=self.jac, bounds=self.bounds)
+        assert res['success'], res['message']
+        assert_allclose(res.x, self.solution, atol=1e-6)
+
+    @pytest.mark.parametrize('bounds', [
+        ([(10, 1), (1, 10)]),
+        ([(1, 10), (10, 1)]),
+        ([(10, 1), (10, 1)])
+    ])
+    def test_minimize_l_bfgs_b_incorrect_bounds(self, bounds):
+        with pytest.raises(ValueError, match='.*bound.*'):
+            optimize.minimize(self.fun, [0, -1], method='L-BFGS-B',
+                              jac=self.jac, bounds=bounds)
+
+    def test_minimize_l_bfgs_b_bounds_FD(self):
+        # test that initial starting value outside bounds doesn't raise
+        # an error (done with clipping).
+        # test all different finite differences combos, with and without args
+
+        jacs = ['2-point', '3-point', None]
+        argss = [(2.,), ()]
+        for jac, args in itertools.product(jacs, argss):
+            res = optimize.minimize(self.fun, [0, -1], args=args,
+                                    method='L-BFGS-B',
+                                    jac=jac, bounds=self.bounds,
+                                    options={'finite_diff_rel_step': None})
+            assert res['success'], res['message']
+            assert_allclose(res.x, self.solution, atol=1e-6)
+
+
+class TestOptimizeScalar:
+    def setup_method(self):
+        self.solution = 1.5
+
+    def fun(self, x, a=1.5):
+        """Objective function"""
+        return (x - a)**2 - 0.8
+
+    def test_brent(self):
+        x = optimize.brent(self.fun)
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.brent(self.fun, brack=(-3, -2))
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.brent(self.fun, full_output=True)
+        assert_allclose(x[0], self.solution, atol=1e-6)
+
+        x = optimize.brent(self.fun, brack=(-15, -1, 15))
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        message = r"\(f\(xb\) < f\(xa\)\) and \(f\(xb\) < f\(xc\)\)"
+        with pytest.raises(ValueError, match=message):
+            optimize.brent(self.fun, brack=(-1, 0, 1))
+
+        message = r"\(xa < xb\) and \(xb < xc\)"
+        with pytest.raises(ValueError, match=message):
+            optimize.brent(self.fun, brack=(0, -1, 1))
+
+    @pytest.mark.filterwarnings('ignore::UserWarning')
+    def test_golden(self):
+        x = optimize.golden(self.fun)
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.golden(self.fun, brack=(-3, -2))
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.golden(self.fun, full_output=True)
+        assert_allclose(x[0], self.solution, atol=1e-6)
+
+        x = optimize.golden(self.fun, brack=(-15, -1, 15))
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.golden(self.fun, tol=0)
+        assert_allclose(x, self.solution)
+
+        maxiter_test_cases = [0, 1, 5]
+        for maxiter in maxiter_test_cases:
+            x0 = optimize.golden(self.fun, maxiter=0, full_output=True)
+            x = optimize.golden(self.fun, maxiter=maxiter, full_output=True)
+            nfev0, nfev = x0[2], x[2]
+            assert_equal(nfev - nfev0, maxiter)
+
+        message = r"\(f\(xb\) < f\(xa\)\) and \(f\(xb\) < f\(xc\)\)"
+        with pytest.raises(ValueError, match=message):
+            optimize.golden(self.fun, brack=(-1, 0, 1))
+
+        message = r"\(xa < xb\) and \(xb < xc\)"
+        with pytest.raises(ValueError, match=message):
+            optimize.golden(self.fun, brack=(0, -1, 1))
+
+    def test_fminbound(self):
+        x = optimize.fminbound(self.fun, 0, 1)
+        assert_allclose(x, 1, atol=1e-4)
+
+        x = optimize.fminbound(self.fun, 1, 5)
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.fminbound(self.fun, np.array([1]), np.array([5]))
+        assert_allclose(x, self.solution, atol=1e-6)
+        assert_raises(ValueError, optimize.fminbound, self.fun, 5, 1)
+
+    def test_fminbound_scalar(self):
+        with pytest.raises(ValueError, match='.*must be finite scalars.*'):
+            optimize.fminbound(self.fun, np.zeros((1, 2)), 1)
+
+        x = optimize.fminbound(self.fun, 1, np.array(5))
+        assert_allclose(x, self.solution, atol=1e-6)
+
+    def test_gh11207(self):
+        def fun(x):
+            return x**2
+        optimize.fminbound(fun, 0, 0)
+
+    def test_minimize_scalar(self):
+        # combine all tests above for the minimize_scalar wrapper
+        x = optimize.minimize_scalar(self.fun).x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, method='Brent')
+        assert x.success
+
+        x = optimize.minimize_scalar(self.fun, method='Brent',
+                                     options=dict(maxiter=3))
+        assert not x.success
+
+        x = optimize.minimize_scalar(self.fun, bracket=(-3, -2),
+                                     args=(1.5, ), method='Brent').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, method='Brent',
+                                     args=(1.5,)).x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, bracket=(-15, -1, 15),
+                                     args=(1.5, ), method='Brent').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, bracket=(-3, -2),
+                                     args=(1.5, ), method='golden').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, method='golden',
+                                     args=(1.5,)).x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, bracket=(-15, -1, 15),
+                                     args=(1.5, ), method='golden').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, bounds=(0, 1), args=(1.5,),
+                                     method='Bounded').x
+        assert_allclose(x, 1, atol=1e-4)
+
+        x = optimize.minimize_scalar(self.fun, bounds=(1, 5), args=(1.5, ),
+                                     method='bounded').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        x = optimize.minimize_scalar(self.fun, bounds=(np.array([1]),
+                                                       np.array([5])),
+                                     args=(np.array([1.5]), ),
+                                     method='bounded').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+        assert_raises(ValueError, optimize.minimize_scalar, self.fun,
+                      bounds=(5, 1), method='bounded', args=(1.5, ))
+
+        assert_raises(ValueError, optimize.minimize_scalar, self.fun,
+                      bounds=(np.zeros(2), 1), method='bounded', args=(1.5, ))
+
+        x = optimize.minimize_scalar(self.fun, bounds=(1, np.array(5)),
+                                     method='bounded').x
+        assert_allclose(x, self.solution, atol=1e-6)
+
+    def test_minimize_scalar_custom(self):
+        # This function comes from the documentation example.
+        def custmin(fun, bracket, args=(), maxfev=None, stepsize=0.1,
+                    maxiter=100, callback=None, **options):
+            bestx = (bracket[1] + bracket[0]) / 2.0
+            besty = fun(bestx)
+            funcalls = 1
+            niter = 0
+            improved = True
+            stop = False
+
+            while improved and not stop and niter < maxiter:
+                improved = False
+                niter += 1
+                for testx in [bestx - stepsize, bestx + stepsize]:
+                    testy = fun(testx, *args)
+                    funcalls += 1
+                    if testy < besty:
+                        besty = testy
+                        bestx = testx
+                        improved = True
+                if callback is not None:
+                    callback(bestx)
+                if maxfev is not None and funcalls >= maxfev:
+                    stop = True
+                    break
+
+            return optimize.OptimizeResult(fun=besty, x=bestx, nit=niter,
+                                           nfev=funcalls, success=(niter > 1))
+
+        res = optimize.minimize_scalar(self.fun, bracket=(0, 4),
+                                       method=custmin,
+                                       options=dict(stepsize=0.05))
+        assert_allclose(res.x, self.solution, atol=1e-6)
+
+    def test_minimize_scalar_coerce_args_param(self):
+        # Regression test for gh-3503
+        optimize.minimize_scalar(self.fun, args=1.5)
+
+    @pytest.mark.parametrize('method', ['brent', 'bounded', 'golden'])
+    def test_disp(self, method):
+        # test that all minimize_scalar methods accept a disp option.
+        for disp in [0, 1, 2, 3]:
+            optimize.minimize_scalar(self.fun, options={"disp": disp})
+
+    @pytest.mark.parametrize('method', ['brent', 'bounded', 'golden'])
+    def test_result_attributes(self, method):
+        kwargs = {"bounds": [-10, 10]} if method == 'bounded' else {}
+        result = optimize.minimize_scalar(self.fun, method=method, **kwargs)
+        assert hasattr(result, "x")
+        assert hasattr(result, "success")
+        assert hasattr(result, "message")
+        assert hasattr(result, "fun")
+        assert hasattr(result, "nfev")
+        assert hasattr(result, "nit")
+
+    @pytest.mark.filterwarnings('ignore::UserWarning')
+    @pytest.mark.parametrize('method', ['brent', 'bounded', 'golden'])
+    def test_nan_values(self, method):
+        # Check nan values result to failed exit status
+        np.random.seed(1234)
+
+        count = [0]
+
+        def func(x):
+            count[0] += 1
+            if count[0] > 4:
+                return np.nan
+            else:
+                return x**2 + 0.1 * np.sin(x)
+
+        bracket = (-1, 0, 1)
+        bounds = (-1, 1)
+
+        with np.errstate(invalid='ignore'), suppress_warnings() as sup:
+            sup.filter(UserWarning, "delta_grad == 0.*")
+            sup.filter(RuntimeWarning, ".*does not use Hessian.*")
+            sup.filter(RuntimeWarning, ".*does not use gradient.*")
+
+            count = [0]
+
+            kwargs = {"bounds": bounds} if method == 'bounded' else {}
+            sol = optimize.minimize_scalar(func, bracket=bracket,
+                                           **kwargs, method=method,
+                                           options=dict(maxiter=20))
+            assert_equal(sol.success, False)
+
+    def test_minimize_scalar_defaults_gh10911(self):
+        # Previously, bounds were silently ignored unless `method='bounds'`
+        # was chosen. See gh-10911. Check that this is no longer the case.
+        def f(x):
+            return x**2
+
+        res = optimize.minimize_scalar(f)
+        assert_allclose(res.x, 0, atol=1e-8)
+
+        res = optimize.minimize_scalar(f, bounds=(1, 100),
+                                       options={'xatol': 1e-10})
+        assert_allclose(res.x, 1)
+
+    def test_minimize_non_finite_bounds_gh10911(self):
+        # Previously, minimize_scalar misbehaved with infinite bounds.
+        # See gh-10911. Check that it now raises an error, instead.
+        msg = "Optimization bounds must be finite scalars."
+        with pytest.raises(ValueError, match=msg):
+            optimize.minimize_scalar(np.sin, bounds=(1, np.inf))
+        with pytest.raises(ValueError, match=msg):
+            optimize.minimize_scalar(np.sin, bounds=(np.nan, 1))
+
+    @pytest.mark.parametrize("method", ['brent', 'golden'])
+    def test_minimize_unbounded_method_with_bounds_gh10911(self, method):
+        # Previously, `bounds` were silently ignored when `method='brent'` or
+        # `method='golden'`. See gh-10911. Check that error is now raised.
+        msg = "Use of `bounds` is incompatible with..."
+        with pytest.raises(ValueError, match=msg):
+            optimize.minimize_scalar(np.sin, method=method, bounds=(1, 2))
+
+    @pytest.mark.filterwarnings('ignore::RuntimeWarning')
+    @pytest.mark.parametrize("method", MINIMIZE_SCALAR_METHODS)
+    @pytest.mark.parametrize("tol", [1, 1e-6])
+    @pytest.mark.parametrize("fshape", [(), (1,), (1, 1)])
+    def test_minimize_scalar_dimensionality_gh16196(self, method, tol, fshape):
+        # gh-16196 reported that the output shape of `minimize_scalar` was not
+        # consistent when an objective function returned an array. Check that
+        # `res.fun` and `res.x` are now consistent.
+        def f(x):
+            return np.array(x**4).reshape(fshape)
+
+        a, b = -0.1, 0.2
+        kwargs = (dict(bracket=(a, b)) if method != "bounded"
+                  else dict(bounds=(a, b)))
+        kwargs.update(dict(method=method, tol=tol))
+
+        res = optimize.minimize_scalar(f, **kwargs)
+        assert res.x.shape == res.fun.shape == f(res.x).shape == fshape
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize('method', ['bounded', 'brent', 'golden'])
+    def test_minimize_scalar_warnings_gh1953(self, method):
+        # test that minimize_scalar methods produce warnings rather than just
+        # using `print`; see gh-1953.
+        def f(x):
+            return (x - 1)**2
+
+        kwargs = {}
+        kwd = 'bounds' if method == 'bounded' else 'bracket'
+        kwargs[kwd] = [-2, 10]
+
+        options = {'disp': True, 'maxiter': 3}
+        with pytest.warns(optimize.OptimizeWarning, match='Maximum number'):
+            optimize.minimize_scalar(f, method=method, options=options,
+                                     **kwargs)
+
+        options['disp'] = False
+        optimize.minimize_scalar(f, method=method, options=options, **kwargs)
+
+
+class TestBracket:
+
+    @pytest.mark.filterwarnings('ignore::RuntimeWarning')
+    def test_errors_and_status_false(self):
+        # Check that `bracket` raises the errors it is supposed to
+        def f(x):  # gh-14858
+            return x**2 if ((-1 < x) & (x < 1)) else 100.0
+
+        message = "The algorithm terminated without finding a valid bracket."
+        with pytest.raises(RuntimeError, match=message):
+            optimize.bracket(f, -1, 1)
+        with pytest.raises(RuntimeError, match=message):
+            optimize.bracket(f, -1, np.inf)
+        with pytest.raises(RuntimeError, match=message):
+            optimize.brent(f, brack=(-1, 1))
+        with pytest.raises(RuntimeError, match=message):
+            optimize.golden(f, brack=(-1, 1))
+
+        def f(x):  # gh-5899
+            return -5 * x**5 + 4 * x**4 - 12 * x**3 + 11 * x**2 - 2 * x + 1
+
+        message = "No valid bracket was found before the iteration limit..."
+        with pytest.raises(RuntimeError, match=message):
+            optimize.bracket(f, -0.5, 0.5, maxiter=10)
+
+    @pytest.mark.parametrize('method', ('brent', 'golden'))
+    def test_minimize_scalar_success_false(self, method):
+        # Check that status information from `bracket` gets to minimize_scalar
+        def f(x):  # gh-14858
+            return x**2 if ((-1 < x) & (x < 1)) else 100.0
+
+        message = "The algorithm terminated without finding a valid bracket."
+
+        res = optimize.minimize_scalar(f, bracket=(-1, 1), method=method)
+        assert not res.success
+        assert message in res.message
+        assert res.nfev == 3
+        assert res.nit == 0
+        assert res.fun == 100
+
+
+def test_brent_negative_tolerance():
+    assert_raises(ValueError, optimize.brent, np.cos, tol=-.01)
+
+
+class TestNewtonCg:
+    def test_rosenbrock(self):
+        x0 = np.array([-1.2, 1.0])
+        sol = optimize.minimize(optimize.rosen, x0,
+                                jac=optimize.rosen_der,
+                                hess=optimize.rosen_hess,
+                                tol=1e-5,
+                                method='Newton-CG')
+        assert sol.success, sol.message
+        assert_allclose(sol.x, np.array([1, 1]), rtol=1e-4)
+
+    def test_himmelblau(self):
+        x0 = np.array(himmelblau_x0)
+        sol = optimize.minimize(himmelblau,
+                                x0,
+                                jac=himmelblau_grad,
+                                hess=himmelblau_hess,
+                                method='Newton-CG',
+                                tol=1e-6)
+        assert sol.success, sol.message
+        assert_allclose(sol.x, himmelblau_xopt, rtol=1e-4)
+        assert_allclose(sol.fun, himmelblau_min, atol=1e-4)
+
+    def test_finite_difference(self):
+        x0 = np.array([-1.2, 1.0])
+        sol = optimize.minimize(optimize.rosen, x0,
+                                jac=optimize.rosen_der,
+                                hess='2-point',
+                                tol=1e-5,
+                                method='Newton-CG')
+        assert sol.success, sol.message
+        assert_allclose(sol.x, np.array([1, 1]), rtol=1e-4)
+
+    def test_hessian_update_strategy(self):
+        x0 = np.array([-1.2, 1.0])
+        sol = optimize.minimize(optimize.rosen, x0,
+                                jac=optimize.rosen_der,
+                                hess=optimize.BFGS(),
+                                tol=1e-5,
+                                method='Newton-CG')
+        assert sol.success, sol.message
+        assert_allclose(sol.x, np.array([1, 1]), rtol=1e-4)
+
+
+def test_line_for_search():
+    # _line_for_search is only used in _linesearch_powell, which is also
+    # tested below. Thus there are more tests of _line_for_search in the
+    # test_linesearch_powell_bounded function.
+
+    line_for_search = optimize._optimize._line_for_search
+    # args are x0, alpha, lower_bound, upper_bound
+    # returns lmin, lmax
+
+    lower_bound = np.array([-5.3, -1, -1.5, -3])
+    upper_bound = np.array([1.9, 1, 2.8, 3])
+
+    # test when starting in the bounds
+    x0 = np.array([0., 0, 0, 0])
+    # and when starting outside of the bounds
+    x1 = np.array([0., 2, -3, 0])
+
+    all_tests = (
+        (x0, np.array([1., 0, 0, 0]), -5.3, 1.9),
+        (x0, np.array([0., 1, 0, 0]), -1, 1),
+        (x0, np.array([0., 0, 1, 0]), -1.5, 2.8),
+        (x0, np.array([0., 0, 0, 1]), -3, 3),
+        (x0, np.array([1., 1, 0, 0]), -1, 1),
+        (x0, np.array([1., 0, -1, 2]), -1.5, 1.5),
+        (x0, np.array([2., 0, -1, 2]), -1.5, 0.95),
+        (x1, np.array([1., 0, 0, 0]), -5.3, 1.9),
+        (x1, np.array([0., 1, 0, 0]), -3, -1),
+        (x1, np.array([0., 0, 1, 0]), 1.5, 5.8),
+        (x1, np.array([0., 0, 0, 1]), -3, 3),
+        (x1, np.array([1., 1, 0, 0]), -3, -1),
+        (x1, np.array([1., 0, -1, 0]), -5.3, -1.5),
+    )
+
+    for x, alpha, lmin, lmax in all_tests:
+        mi, ma = line_for_search(x, alpha, lower_bound, upper_bound)
+        assert_allclose(mi, lmin, atol=1e-6)
+        assert_allclose(ma, lmax, atol=1e-6)
+
+    # now with infinite bounds
+    lower_bound = np.array([-np.inf, -1, -np.inf, -3])
+    upper_bound = np.array([np.inf, 1, 2.8, np.inf])
+
+    all_tests = (
+        (x0, np.array([1., 0, 0, 0]), -np.inf, np.inf),
+        (x0, np.array([0., 1, 0, 0]), -1, 1),
+        (x0, np.array([0., 0, 1, 0]), -np.inf, 2.8),
+        (x0, np.array([0., 0, 0, 1]), -3, np.inf),
+        (x0, np.array([1., 1, 0, 0]), -1, 1),
+        (x0, np.array([1., 0, -1, 2]), -1.5, np.inf),
+        (x1, np.array([1., 0, 0, 0]), -np.inf, np.inf),
+        (x1, np.array([0., 1, 0, 0]), -3, -1),
+        (x1, np.array([0., 0, 1, 0]), -np.inf, 5.8),
+        (x1, np.array([0., 0, 0, 1]), -3, np.inf),
+        (x1, np.array([1., 1, 0, 0]), -3, -1),
+        (x1, np.array([1., 0, -1, 0]), -5.8, np.inf),
+    )
+
+    for x, alpha, lmin, lmax in all_tests:
+        mi, ma = line_for_search(x, alpha, lower_bound, upper_bound)
+        assert_allclose(mi, lmin, atol=1e-6)
+        assert_allclose(ma, lmax, atol=1e-6)
+
+
+def test_linesearch_powell():
+    # helper function in optimize.py, not a public function.
+    linesearch_powell = optimize._optimize._linesearch_powell
+    # args are func, p, xi, fval, lower_bound=None, upper_bound=None, tol=1e-3
+    # returns new_fval, p + direction, direction
+    def func(x):
+        return np.sum((x - np.array([-1.0, 2.0, 1.5, -0.4])) ** 2)
+    p0 = np.array([0., 0, 0, 0])
+    fval = func(p0)
+    lower_bound = np.array([-np.inf] * 4)
+    upper_bound = np.array([np.inf] * 4)
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), -1),
+        (np.array([0., 1, 0, 0]), 2),
+        (np.array([0., 0, 1, 0]), 1.5),
+        (np.array([0., 0, 0, 1]), -.4),
+        (np.array([-1., 0, 1, 0]), 1.25),
+        (np.array([0., 0, 1, 1]), .55),
+        (np.array([2., 0, -1, 1]), -.65),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi,
+                                            fval=fval, tol=1e-5)
+        assert_allclose(f, func(l * xi), atol=1e-6)
+        assert_allclose(p, l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(l * xi), atol=1e-6)
+        assert_allclose(p, l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+
+def test_linesearch_powell_bounded():
+    # helper function in optimize.py, not a public function.
+    linesearch_powell = optimize._optimize._linesearch_powell
+    # args are func, p, xi, fval, lower_bound=None, upper_bound=None, tol=1e-3
+    # returns new_fval, p+direction, direction
+    def func(x):
+        return np.sum((x - np.array([-1.0, 2.0, 1.5, -0.4])) ** 2)
+    p0 = np.array([0., 0, 0, 0])
+    fval = func(p0)
+
+    # first choose bounds such that the same tests from
+    # test_linesearch_powell should pass.
+    lower_bound = np.array([-2.]*4)
+    upper_bound = np.array([2.]*4)
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), -1),
+        (np.array([0., 1, 0, 0]), 2),
+        (np.array([0., 0, 1, 0]), 1.5),
+        (np.array([0., 0, 0, 1]), -.4),
+        (np.array([-1., 0, 1, 0]), 1.25),
+        (np.array([0., 0, 1, 1]), .55),
+        (np.array([2., 0, -1, 1]), -.65),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(l * xi), atol=1e-6)
+        assert_allclose(p, l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+    # now choose bounds such that unbounded vs bounded gives different results
+    lower_bound = np.array([-.3]*3 + [-1])
+    upper_bound = np.array([.45]*3 + [.9])
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), -.3),
+        (np.array([0., 1, 0, 0]), .45),
+        (np.array([0., 0, 1, 0]), .45),
+        (np.array([0., 0, 0, 1]), -.4),
+        (np.array([-1., 0, 1, 0]), .3),
+        (np.array([0., 0, 1, 1]), .45),
+        (np.array([2., 0, -1, 1]), -.15),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(l * xi), atol=1e-6)
+        assert_allclose(p, l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+    # now choose as above but start outside the bounds
+    p0 = np.array([-1., 0, 0, 2])
+    fval = func(p0)
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), .7),
+        (np.array([0., 1, 0, 0]), .45),
+        (np.array([0., 0, 1, 0]), .45),
+        (np.array([0., 0, 0, 1]), -2.4),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(p0 + l * xi), atol=1e-6)
+        assert_allclose(p, p0 + l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+    # now mix in inf
+    p0 = np.array([0., 0, 0, 0])
+    fval = func(p0)
+
+    # now choose bounds that mix inf
+    lower_bound = np.array([-.3, -np.inf, -np.inf, -1])
+    upper_bound = np.array([np.inf, .45, np.inf, .9])
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), -.3),
+        (np.array([0., 1, 0, 0]), .45),
+        (np.array([0., 0, 1, 0]), 1.5),
+        (np.array([0., 0, 0, 1]), -.4),
+        (np.array([-1., 0, 1, 0]), .3),
+        (np.array([0., 0, 1, 1]), .55),
+        (np.array([2., 0, -1, 1]), -.15),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(l * xi), atol=1e-6)
+        assert_allclose(p, l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+    # now choose as above but start outside the bounds
+    p0 = np.array([-1., 0, 0, 2])
+    fval = func(p0)
+
+    all_tests = (
+        (np.array([1., 0, 0, 0]), .7),
+        (np.array([0., 1, 0, 0]), .45),
+        (np.array([0., 0, 1, 0]), 1.5),
+        (np.array([0., 0, 0, 1]), -2.4),
+    )
+
+    for xi, l in all_tests:
+        f, p, direction = linesearch_powell(func, p0, xi, tol=1e-5,
+                                            lower_bound=lower_bound,
+                                            upper_bound=upper_bound,
+                                            fval=fval)
+        assert_allclose(f, func(p0 + l * xi), atol=1e-6)
+        assert_allclose(p, p0 + l * xi, atol=1e-6)
+        assert_allclose(direction, l * xi, atol=1e-6)
+
+
+def test_powell_limits():
+    # gh15342 - powell was going outside bounds for some function evaluations.
+    bounds = optimize.Bounds([0, 0], [0.6, 20])
+
+    def fun(x):
+        a, b = x
+        assert (x >= bounds.lb).all() and (x <= bounds.ub).all()
+        return a ** 2 + b ** 2
+
+    optimize.minimize(fun, x0=[0.6, 20], method='Powell', bounds=bounds)
+
+    # Another test from the original report - gh-13411
+    bounds = optimize.Bounds(lb=[0,], ub=[1,], keep_feasible=[True,])
+
+    def func(x):
+        assert x >= 0 and x <= 1
+        return np.exp(x)
+
+    optimize.minimize(fun=func, x0=[0.5], method='powell', bounds=bounds)
+
+
+def test_powell_output():
+    funs = [rosen, lambda x: np.array(rosen(x)), lambda x: np.array([rosen(x)])]
+    for fun in funs:
+        res = optimize.minimize(fun, x0=[0.6, 20], method='Powell')
+        assert np.isscalar(res.fun)
+
+
+@array_api_compatible
+class TestRosen:
+    def test_rosen(self, xp):
+        # integer input should be promoted to the default floating type
+        x = xp.asarray([1, 1, 1])
+        xp_assert_equal(optimize.rosen(x),
+                        xp.asarray(0.))
+
+    @skip_xp_backends('jax.numpy',
+                      reasons=["JAX arrays do not support item assignment"])
+    @pytest.mark.usefixtures("skip_xp_backends")
+    def test_rosen_der(self, xp):
+        x = xp.asarray([1, 1, 1, 1])
+        xp_assert_equal(optimize.rosen_der(x),
+                        xp.zeros_like(x, dtype=xp.asarray(1.).dtype))
+
+    @skip_xp_backends('jax.numpy',
+                      reasons=["JAX arrays do not support item assignment"])
+    @pytest.mark.usefixtures("skip_xp_backends")
+    def test_hess_prod(self, xp):
+        one = xp.asarray(1.)
+        xp_test = array_namespace(one)
+        # Compare rosen_hess(x) times p with rosen_hess_prod(x,p). See gh-1775.
+        x = xp.asarray([3, 4, 5])
+        p = xp.asarray([2, 2, 2])
+        hp = optimize.rosen_hess_prod(x, p)
+        p = xp_test.astype(p, one.dtype)
+        dothp = optimize.rosen_hess(x) @ p
+        xp_assert_equal(hp, dothp)
+
+
+def himmelblau(p):
+    """
+    R^2 -> R^1 test function for optimization. The function has four local
+    minima where himmelblau(xopt) == 0.
+    """
+    x, y = p
+    a = x*x + y - 11
+    b = x + y*y - 7
+    return a*a + b*b
+
+
+def himmelblau_grad(p):
+    x, y = p
+    return np.array([4*x**3 + 4*x*y - 42*x + 2*y**2 - 14,
+                     2*x**2 + 4*x*y + 4*y**3 - 26*y - 22])
+
+
+def himmelblau_hess(p):
+    x, y = p
+    return np.array([[12*x**2 + 4*y - 42, 4*x + 4*y],
+                     [4*x + 4*y, 4*x + 12*y**2 - 26]])
+
+
+himmelblau_x0 = [-0.27, -0.9]
+himmelblau_xopt = [3, 2]
+himmelblau_min = 0.0
+
+
+def test_minimize_multiple_constraints():
+    # Regression test for gh-4240.
+    def func(x):
+        return np.array([25 - 0.2 * x[0] - 0.4 * x[1] - 0.33 * x[2]])
+
+    def func1(x):
+        return np.array([x[1]])
+
+    def func2(x):
+        return np.array([x[2]])
+
+    cons = ({'type': 'ineq', 'fun': func},
+            {'type': 'ineq', 'fun': func1},
+            {'type': 'ineq', 'fun': func2})
+
+    def f(x):
+        return -1 * (x[0] + x[1] + x[2])
+
+    res = optimize.minimize(f, [0, 0, 0], method='SLSQP', constraints=cons)
+    assert_allclose(res.x, [125, 0, 0], atol=1e-10)
+
+
+class TestOptimizeResultAttributes:
+    # Test that all minimizers return an OptimizeResult containing
+    # all the OptimizeResult attributes
+    def setup_method(self):
+        self.x0 = [5, 5]
+        self.func = optimize.rosen
+        self.jac = optimize.rosen_der
+        self.hess = optimize.rosen_hess
+        self.hessp = optimize.rosen_hess_prod
+        self.bounds = [(0., 10.), (0., 10.)]
+
+    @pytest.mark.fail_slow(2)
+    def test_attributes_present(self):
+        attributes = ['nit', 'nfev', 'x', 'success', 'status', 'fun',
+                      'message']
+        skip = {'cobyla': ['nit']}
+        for method in MINIMIZE_METHODS:
+            with suppress_warnings() as sup:
+                sup.filter(RuntimeWarning,
+                           ("Method .+ does not use (gradient|Hessian.*)"
+                            " information"))
+                res = optimize.minimize(self.func, self.x0, method=method,
+                                        jac=self.jac, hess=self.hess,
+                                        hessp=self.hessp)
+            for attribute in attributes:
+                if method in skip and attribute in skip[method]:
+                    continue
+
+                assert hasattr(res, attribute)
+                assert attribute in dir(res)
+
+            # gh13001, OptimizeResult.message should be a str
+            assert isinstance(res.message, str)
+
+
+def f1(z, *params):
+    x, y = z
+    a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    return (a * x**2 + b * x * y + c * y**2 + d*x + e*y + f)
+
+
+def f2(z, *params):
+    x, y = z
+    a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    return (-g*np.exp(-((x-h)**2 + (y-i)**2) / scale))
+
+
+def f3(z, *params):
+    x, y = z
+    a, b, c, d, e, f, g, h, i, j, k, l, scale = params
+    return (-j*np.exp(-((x-k)**2 + (y-l)**2) / scale))
+
+
+def brute_func(z, *params):
+    return f1(z, *params) + f2(z, *params) + f3(z, *params)
+
+
+class TestBrute:
+    # Test the "brute force" method
+    def setup_method(self):
+        self.params = (2, 3, 7, 8, 9, 10, 44, -1, 2, 26, 1, -2, 0.5)
+        self.rranges = (slice(-4, 4, 0.25), slice(-4, 4, 0.25))
+        self.solution = np.array([-1.05665192, 1.80834843])
+
+    def brute_func(self, z, *params):
+        # an instance method optimizing
+        return brute_func(z, *params)
+
+    def test_brute(self):
+        # test fmin
+        resbrute = optimize.brute(brute_func, self.rranges, args=self.params,
+                                  full_output=True, finish=optimize.fmin)
+        assert_allclose(resbrute[0], self.solution, atol=1e-3)
+        assert_allclose(resbrute[1], brute_func(self.solution, *self.params),
+                        atol=1e-3)
+
+        # test minimize
+        resbrute = optimize.brute(brute_func, self.rranges, args=self.params,
+                                  full_output=True,
+                                  finish=optimize.minimize)
+        assert_allclose(resbrute[0], self.solution, atol=1e-3)
+        assert_allclose(resbrute[1], brute_func(self.solution, *self.params),
+                        atol=1e-3)
+
+        # test that brute can optimize an instance method (the other tests use
+        # a non-class based function
+        resbrute = optimize.brute(self.brute_func, self.rranges,
+                                  args=self.params, full_output=True,
+                                  finish=optimize.minimize)
+        assert_allclose(resbrute[0], self.solution, atol=1e-3)
+
+    def test_1D(self):
+        # test that for a 1-D problem the test function is passed an array,
+        # not a scalar.
+        def f(x):
+            assert len(x.shape) == 1
+            assert x.shape[0] == 1
+            return x ** 2
+
+        optimize.brute(f, [(-1, 1)], Ns=3, finish=None)
+
+    @pytest.mark.fail_slow(10)
+    def test_workers(self):
+        # check that parallel evaluation works
+        resbrute = optimize.brute(brute_func, self.rranges, args=self.params,
+                                  full_output=True, finish=None)
+
+        resbrute1 = optimize.brute(brute_func, self.rranges, args=self.params,
+                                   full_output=True, finish=None, workers=2)
+
+        assert_allclose(resbrute1[-1], resbrute[-1])
+        assert_allclose(resbrute1[0], resbrute[0])
+
+    @pytest.mark.thread_unsafe
+    def test_runtime_warning(self, capsys):
+        rng = np.random.default_rng(1234)
+
+        def func(z, *params):
+            return rng.random(1) * 1000  # never converged problem
+
+        msg = "final optimization did not succeed.*|Maximum number of function eval.*"
+        with pytest.warns(RuntimeWarning, match=msg):
+            optimize.brute(func, self.rranges, args=self.params, disp=True)
+
+    def test_coerce_args_param(self):
+        # optimize.brute should coerce non-iterable args to a tuple.
+        def f(x, *args):
+            return x ** args[0]
+
+        resbrute = optimize.brute(f, (slice(-4, 4, .25),), args=2)
+        assert_allclose(resbrute, 0)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.fail_slow(20)
+def test_cobyla_threadsafe():
+
+    # Verify that cobyla is threadsafe. Will segfault if it is not.
+
+    import concurrent.futures
+    import time
+
+    def objective1(x):
+        time.sleep(0.1)
+        return x[0]**2
+
+    def objective2(x):
+        time.sleep(0.1)
+        return (x[0]-1)**2
+
+    min_method = "COBYLA"
+
+    def minimizer1():
+        return optimize.minimize(objective1,
+                                      [0.0],
+                                      method=min_method)
+
+    def minimizer2():
+        return optimize.minimize(objective2,
+                                      [0.0],
+                                      method=min_method)
+
+    with concurrent.futures.ThreadPoolExecutor() as pool:
+        tasks = []
+        tasks.append(pool.submit(minimizer1))
+        tasks.append(pool.submit(minimizer2))
+        for t in tasks:
+            t.result()
+
+
+class TestIterationLimits:
+    # Tests that optimisation does not give up before trying requested
+    # number of iterations or evaluations. And that it does not succeed
+    # by exceeding the limits.
+    def setup_method(self):
+        self.funcalls = threading.local()
+
+    def slow_func(self, v):
+        if not hasattr(self.funcalls, 'c'):
+            self.funcalls.c = 0
+        self.funcalls.c += 1
+        r, t = np.sqrt(v[0]**2+v[1]**2), np.arctan2(v[0], v[1])
+        return np.sin(r*20 + t)+r*0.5
+
+    @pytest.mark.fail_slow(10)
+    def test_neldermead_limit(self):
+        self.check_limits("Nelder-Mead", 200)
+
+    def test_powell_limit(self):
+        self.check_limits("powell", 1000)
+
+    def check_limits(self, method, default_iters):
+        for start_v in [[0.1, 0.1], [1, 1], [2, 2]]:
+            for mfev in [50, 500, 5000]:
+                self.funcalls.c = 0
+                res = optimize.minimize(self.slow_func, start_v,
+                                        method=method,
+                                        options={"maxfev": mfev})
+                assert self.funcalls.c == res["nfev"]
+                if res["success"]:
+                    assert res["nfev"] < mfev
+                else:
+                    assert res["nfev"] >= mfev
+            for mit in [50, 500, 5000]:
+                res = optimize.minimize(self.slow_func, start_v,
+                                        method=method,
+                                        options={"maxiter": mit})
+                if res["success"]:
+                    assert res["nit"] <= mit
+                else:
+                    assert res["nit"] >= mit
+            for mfev, mit in [[50, 50], [5000, 5000], [5000, np.inf]]:
+                self.funcalls.c = 0
+                res = optimize.minimize(self.slow_func, start_v,
+                                        method=method,
+                                        options={"maxiter": mit,
+                                                 "maxfev": mfev})
+                assert self.funcalls.c == res["nfev"]
+                if res["success"]:
+                    assert res["nfev"] < mfev and res["nit"] <= mit
+                else:
+                    assert res["nfev"] >= mfev or res["nit"] >= mit
+            for mfev, mit in [[np.inf, None], [None, np.inf]]:
+                self.funcalls.c = 0
+                res = optimize.minimize(self.slow_func, start_v,
+                                        method=method,
+                                        options={"maxiter": mit,
+                                                 "maxfev": mfev})
+                assert self.funcalls.c == res["nfev"]
+                if res["success"]:
+                    if mfev is None:
+                        assert res["nfev"] < default_iters*2
+                    else:
+                        assert res["nit"] <= default_iters*2
+                else:
+                    assert (res["nfev"] >= default_iters*2
+                            or res["nit"] >= default_iters*2)
+
+
+def test_result_x_shape_when_len_x_is_one():
+    def fun(x):
+        return x * x
+
+    def jac(x):
+        return 2. * x
+
+    def hess(x):
+        return np.array([[2.]])
+
+    methods = ['Nelder-Mead', 'Powell', 'CG', 'BFGS', 'L-BFGS-B', 'TNC',
+               'COBYLA', 'COBYQA', 'SLSQP']
+    for method in methods:
+        res = optimize.minimize(fun, np.array([0.1]), method=method)
+        assert res.x.shape == (1,)
+
+    # use jac + hess
+    methods = ['trust-constr', 'dogleg', 'trust-ncg', 'trust-exact',
+               'trust-krylov', 'Newton-CG']
+    for method in methods:
+        res = optimize.minimize(fun, np.array([0.1]), method=method, jac=jac,
+                                hess=hess)
+        assert res.x.shape == (1,)
+
+
+class FunctionWithGradient:
+    def __init__(self):
+        self.number_of_calls = threading.local()
+
+    def __call__(self, x):
+        if not hasattr(self.number_of_calls, 'c'):
+            self.number_of_calls.c = 0
+        self.number_of_calls.c += 1
+        return np.sum(x**2), 2 * x
+
+
+@pytest.fixture
+def function_with_gradient():
+    return FunctionWithGradient()
+
+
+def test_memoize_jac_function_before_gradient(function_with_gradient):
+    memoized_function = MemoizeJac(function_with_gradient)
+
+    x0 = np.array([1.0, 2.0])
+    assert_allclose(memoized_function(x0), 5.0)
+    assert function_with_gradient.number_of_calls.c == 1
+
+    assert_allclose(memoized_function.derivative(x0), 2 * x0)
+    assert function_with_gradient.number_of_calls.c == 1, \
+        "function is not recomputed " \
+        "if gradient is requested after function value"
+
+    assert_allclose(
+        memoized_function(2 * x0), 20.0,
+        err_msg="different input triggers new computation")
+    assert function_with_gradient.number_of_calls.c == 2, \
+        "different input triggers new computation"
+
+
+def test_memoize_jac_gradient_before_function(function_with_gradient):
+    memoized_function = MemoizeJac(function_with_gradient)
+
+    x0 = np.array([1.0, 2.0])
+    assert_allclose(memoized_function.derivative(x0), 2 * x0)
+    assert function_with_gradient.number_of_calls.c == 1
+
+    assert_allclose(memoized_function(x0), 5.0)
+    assert function_with_gradient.number_of_calls.c == 1, \
+        "function is not recomputed " \
+        "if function value is requested after gradient"
+
+    assert_allclose(
+        memoized_function.derivative(2 * x0), 4 * x0,
+        err_msg="different input triggers new computation")
+    assert function_with_gradient.number_of_calls.c == 2, \
+        "different input triggers new computation"
+
+
+def test_memoize_jac_with_bfgs(function_with_gradient):
+    """ Tests that using MemoizedJac in combination with ScalarFunction
+        and BFGS does not lead to repeated function evaluations.
+        Tests changes made in response to GH11868.
+    """
+    memoized_function = MemoizeJac(function_with_gradient)
+    jac = memoized_function.derivative
+    hess = optimize.BFGS()
+
+    x0 = np.array([1.0, 0.5])
+    scalar_function = ScalarFunction(
+        memoized_function, x0, (), jac, hess, None, None)
+    assert function_with_gradient.number_of_calls.c == 1
+
+    scalar_function.fun(x0 + 0.1)
+    assert function_with_gradient.number_of_calls.c == 2
+
+    scalar_function.fun(x0 + 0.2)
+    assert function_with_gradient.number_of_calls.c == 3
+
+
+def test_gh12696():
+    # Test that optimize doesn't throw warning gh-12696
+    with assert_no_warnings():
+        optimize.fminbound(
+            lambda x: np.array([x**2]), -np.pi, np.pi, disp=False)
+
+
+# --- Test minimize with equal upper and lower bounds --- #
+
+def setup_test_equal_bounds():
+
+    rng = np.random.RandomState(0)
+    x0 = rng.rand(4)
+    lb = np.array([0, 2, -1, -1.0])
+    ub = np.array([3, 2, 2, -1.0])
+    i_eb = (lb == ub)
+
+    def check_x(x, check_size=True, check_values=True):
+        if check_size:
+            assert x.size == 4
+        if check_values:
+            assert_allclose(x[i_eb], lb[i_eb])
+
+    def func(x):
+        check_x(x)
+        return optimize.rosen(x)
+
+    def grad(x):
+        check_x(x)
+        return optimize.rosen_der(x)
+
+    def callback(x, *args):
+        check_x(x)
+
+    def constraint1(x):
+        check_x(x, check_values=False)
+        return x[0:1] - 1
+
+    def jacobian1(x):
+        check_x(x, check_values=False)
+        dc = np.zeros_like(x)
+        dc[0] = 1
+        return dc
+
+    def constraint2(x):
+        check_x(x, check_values=False)
+        return x[2:3] - 0.5
+
+    def jacobian2(x):
+        check_x(x, check_values=False)
+        dc = np.zeros_like(x)
+        dc[2] = 1
+        return dc
+
+    c1a = NonlinearConstraint(constraint1, -np.inf, 0)
+    c1b = NonlinearConstraint(constraint1, -np.inf, 0, jacobian1)
+    c2a = NonlinearConstraint(constraint2, -np.inf, 0)
+    c2b = NonlinearConstraint(constraint2, -np.inf, 0, jacobian2)
+
+    # test using the three methods that accept bounds, use derivatives, and
+    # have some trouble when bounds fix variables
+    methods = ('L-BFGS-B', 'SLSQP', 'TNC')
+
+    # test w/out gradient, w/ gradient, and w/ combined objective/gradient
+    kwds = ({"fun": func, "jac": False},
+            {"fun": func, "jac": grad},
+            {"fun": (lambda x: (func(x), grad(x))),
+             "jac": True})
+
+    # test with both old- and new-style bounds
+    bound_types = (lambda lb, ub: list(zip(lb, ub)),
+                   Bounds)
+
+    # Test for many combinations of constraints w/ and w/out jacobian
+    # Pairs in format: (test constraints, reference constraints)
+    # (always use analytical jacobian in reference)
+    constraints = ((None, None), ([], []),
+                   (c1a, c1b), (c2b, c2b),
+                   ([c1b], [c1b]), ([c2a], [c2b]),
+                   ([c1a, c2a], [c1b, c2b]),
+                   ([c1a, c2b], [c1b, c2b]),
+                   ([c1b, c2b], [c1b, c2b]))
+
+    # test with and without callback function
+    callbacks = (None, callback)
+
+    data = {"methods": methods, "kwds": kwds, "bound_types": bound_types,
+            "constraints": constraints, "callbacks": callbacks,
+            "lb": lb, "ub": ub, "x0": x0, "i_eb": i_eb}
+
+    return data
+
+
+eb_data = setup_test_equal_bounds()
+
+
+# This test is about handling fixed variables, not the accuracy of the solvers
+@pytest.mark.xfail_on_32bit("Failures due to floating point issues, not logic")
+@pytest.mark.xfail(scipy.show_config(mode='dicts')['Compilers']['fortran']['name'] ==
+                   "intel-llvm",
+                   reason="Failures due to floating point issues, not logic")
+@pytest.mark.parametrize('method', eb_data["methods"])
+@pytest.mark.parametrize('kwds', eb_data["kwds"])
+@pytest.mark.parametrize('bound_type', eb_data["bound_types"])
+@pytest.mark.parametrize('constraints', eb_data["constraints"])
+@pytest.mark.parametrize('callback', eb_data["callbacks"])
+def test_equal_bounds(method, kwds, bound_type, constraints, callback):
+    """
+    Tests that minimizers still work if (bounds.lb == bounds.ub).any()
+    gh12502 - Divide by zero in Jacobian numerical differentiation when
+    equality bounds constraints are used
+    """
+    # GH-15051; slightly more skips than necessary; hopefully fixed by GH-14882
+    if (platform.machine() == 'aarch64' and method == "TNC"
+            and kwds["jac"] is False and callback is not None):
+        pytest.skip('Tolerance violation on aarch')
+
+    lb, ub = eb_data["lb"], eb_data["ub"]
+    x0, i_eb = eb_data["x0"], eb_data["i_eb"]
+
+    test_constraints, reference_constraints = constraints
+    if test_constraints and not method == 'SLSQP':
+        pytest.skip('Only SLSQP supports nonlinear constraints')
+    # reference constraints always have analytical jacobian
+    # if test constraints are not the same, we'll need finite differences
+    fd_needed = (test_constraints != reference_constraints)
+
+    bounds = bound_type(lb, ub)  # old- or new-style
+
+    kwds.update({"x0": x0, "method": method, "bounds": bounds,
+                 "constraints": test_constraints, "callback": callback})
+    res = optimize.minimize(**kwds)
+
+    expected = optimize.minimize(optimize.rosen, x0, method=method,
+                                 jac=optimize.rosen_der, bounds=bounds,
+                                 constraints=reference_constraints)
+
+    # compare the output of a solution with FD vs that of an analytic grad
+    assert res.success
+    assert_allclose(res.fun, expected.fun, rtol=1.5e-6)
+    assert_allclose(res.x, expected.x, rtol=5e-4)
+
+    if fd_needed or kwds['jac'] is False:
+        expected.jac[i_eb] = np.nan
+    assert res.jac.shape[0] == 4
+    assert_allclose(res.jac[i_eb], expected.jac[i_eb], rtol=1e-6)
+
+    if not (kwds['jac'] or test_constraints or isinstance(bounds, Bounds)):
+        # compare the output to an equivalent FD minimization that doesn't
+        # need factorization
+        def fun(x):
+            new_x = np.array([np.nan, 2, np.nan, -1])
+            new_x[[0, 2]] = x
+            return optimize.rosen(new_x)
+
+        fd_res = optimize.minimize(fun,
+                                   x0[[0, 2]],
+                                   method=method,
+                                   bounds=bounds[::2])
+        assert_allclose(res.fun, fd_res.fun)
+        # TODO this test should really be equivalent to factorized version
+        # above, down to res.nfev. However, testing found that when TNC is
+        # called with or without a callback the output is different. The two
+        # should be the same! This indicates that the TNC callback may be
+        # mutating something when it shouldn't.
+        assert_allclose(res.x[[0, 2]], fd_res.x, rtol=2e-6)
+
+
+@pytest.mark.parametrize('method', eb_data["methods"])
+def test_all_bounds_equal(method):
+    # this only tests methods that have parameters factored out when lb==ub
+    # it does not test other methods that work with bounds
+    def f(x, p1=1):
+        return np.linalg.norm(x) + p1
+
+    bounds = [(1, 1), (2, 2)]
+    x0 = (1.0, 3.0)
+    res = optimize.minimize(f, x0, bounds=bounds, method=method)
+    assert res.success
+    assert_allclose(res.fun, f([1.0, 2.0]))
+    assert res.nfev == 1
+    assert res.message == 'All independent variables were fixed by bounds.'
+
+    args = (2,)
+    res = optimize.minimize(f, x0, bounds=bounds, method=method, args=args)
+    assert res.success
+    assert_allclose(res.fun, f([1.0, 2.0], 2))
+
+    if method.upper() == 'SLSQP':
+        def con(x):
+            return np.sum(x)
+        nlc = NonlinearConstraint(con, -np.inf, 0.0)
+        res = optimize.minimize(
+            f, x0, bounds=bounds, method=method, constraints=[nlc]
+        )
+        assert res.success is False
+        assert_allclose(res.fun, f([1.0, 2.0]))
+        assert res.nfev == 1
+        message = "All independent variables were fixed by bounds, but"
+        assert res.message.startswith(message)
+
+        nlc = NonlinearConstraint(con, -np.inf, 4)
+        res = optimize.minimize(
+            f, x0, bounds=bounds, method=method, constraints=[nlc]
+        )
+        assert res.success is True
+        assert_allclose(res.fun, f([1.0, 2.0]))
+        assert res.nfev == 1
+        message = "All independent variables were fixed by bounds at values"
+        assert res.message.startswith(message)
+
+
+def test_eb_constraints():
+    # make sure constraint functions aren't overwritten when equal bounds
+    # are employed, and a parameter is factored out. GH14859
+    def f(x):
+        return x[0]**3 + x[1]**2 + x[2]*x[3]
+
+    def cfun(x):
+        return x[0] + x[1] + x[2] + x[3] - 40
+
+    constraints = [{'type': 'ineq', 'fun': cfun}]
+
+    bounds = [(0, 20)] * 4
+    bounds[1] = (5, 5)
+    optimize.minimize(
+        f,
+        x0=[1, 2, 3, 4],
+        method='SLSQP',
+        bounds=bounds,
+        constraints=constraints,
+    )
+    assert constraints[0]['fun'] == cfun
+
+
+def test_show_options():
+    solver_methods = {
+        'minimize': MINIMIZE_METHODS,
+        'minimize_scalar': MINIMIZE_SCALAR_METHODS,
+        'root': ROOT_METHODS,
+        'root_scalar': ROOT_SCALAR_METHODS,
+        'linprog': LINPROG_METHODS,
+        'quadratic_assignment': QUADRATIC_ASSIGNMENT_METHODS,
+    }
+    for solver, methods in solver_methods.items():
+        for method in methods:
+            # testing that `show_options` works without error
+            show_options(solver, method)
+
+    unknown_solver_method = {
+        'minimize': "ekki",  # unknown method
+        'maximize': "cg",  # unknown solver
+        'maximize_scalar': "ekki",  # unknown solver and method
+    }
+    for solver, method in unknown_solver_method.items():
+        # testing that `show_options` raises ValueError
+        assert_raises(ValueError, show_options, solver, method)
+
+
+def test_bounds_with_list():
+    # gh13501. Bounds created with lists weren't working for Powell.
+    bounds = optimize.Bounds(lb=[5., 5.], ub=[10., 10.])
+    optimize.minimize(
+        optimize.rosen, x0=np.array([9, 9]), method='Powell', bounds=bounds
+    )
+
+
+def test_x_overwritten_user_function():
+    # if the user overwrites the x-array in the user function it's likely
+    # that the minimizer stops working properly.
+    # gh13740
+    def fquad(x):
+        a = np.arange(np.size(x))
+        x -= a
+        x *= x
+        return np.sum(x)
+
+    def fquad_jac(x):
+        a = np.arange(np.size(x))
+        x *= 2
+        x -= 2 * a
+        return x
+
+    def fquad_hess(x):
+        return np.eye(np.size(x)) * 2.0
+
+    meth_jac = [
+        'newton-cg', 'dogleg', 'trust-ncg', 'trust-exact',
+        'trust-krylov', 'trust-constr'
+    ]
+    meth_hess = [
+        'dogleg', 'trust-ncg', 'trust-exact', 'trust-krylov', 'trust-constr'
+    ]
+
+    x0 = np.ones(5) * 1.5
+
+    for meth in MINIMIZE_METHODS:
+        jac = None
+        hess = None
+        if meth in meth_jac:
+            jac = fquad_jac
+        if meth in meth_hess:
+            hess = fquad_hess
+        res = optimize.minimize(fquad, x0, method=meth, jac=jac, hess=hess)
+        assert_allclose(res.x, np.arange(np.size(x0)), atol=2e-4)
+
+
+class TestGlobalOptimization:
+
+    def test_optimize_result_attributes(self):
+        def func(x):
+            return x ** 2
+
+        # Note that `brute` solver does not return `OptimizeResult`
+        results = [optimize.basinhopping(func, x0=1),
+                   optimize.differential_evolution(func, [(-4, 4)]),
+                   optimize.shgo(func, [(-4, 4)]),
+                   optimize.dual_annealing(func, [(-4, 4)]),
+                   optimize.direct(func, [(-4, 4)]),
+                   ]
+
+        for result in results:
+            assert isinstance(result, optimize.OptimizeResult)
+            assert hasattr(result, "x")
+            assert hasattr(result, "success")
+            assert hasattr(result, "message")
+            assert hasattr(result, "fun")
+            assert hasattr(result, "nfev")
+            assert hasattr(result, "nit")
+
+
+def test_approx_fprime():
+    # check that approx_fprime (serviced by approx_derivative) works for
+    # jac and hess
+    g = optimize.approx_fprime(himmelblau_x0, himmelblau)
+    assert_allclose(g, himmelblau_grad(himmelblau_x0), rtol=5e-6)
+
+    h = optimize.approx_fprime(himmelblau_x0, himmelblau_grad)
+    assert_allclose(h, himmelblau_hess(himmelblau_x0), rtol=5e-6)
+
+
+def test_gh12594():
+    # gh-12594 reported an error in `_linesearch_powell` and
+    # `_line_for_search` when `Bounds` was passed lists instead of arrays.
+    # Check that results are the same whether the inputs are lists or arrays.
+
+    def f(x):
+        return x[0]**2 + (x[1] - 1)**2
+
+    bounds = Bounds(lb=[-10, -10], ub=[10, 10])
+    res = optimize.minimize(f, x0=(0, 0), method='Powell', bounds=bounds)
+    bounds = Bounds(lb=np.array([-10, -10]), ub=np.array([10, 10]))
+    ref = optimize.minimize(f, x0=(0, 0), method='Powell', bounds=bounds)
+
+    assert_allclose(res.fun, ref.fun)
+    assert_allclose(res.x, ref.x)
+
+
+@pytest.mark.parametrize('method', ['Newton-CG', 'trust-constr'])
+@pytest.mark.parametrize('sparse_type', [coo_matrix, csc_matrix, csr_matrix,
+                                         coo_array, csr_array, csc_array])
+def test_sparse_hessian(method, sparse_type):
+    # gh-8792 reported an error for minimization with `newton_cg` when `hess`
+    # returns a sparse matrix. Check that results are the same whether `hess`
+    # returns a dense or sparse matrix for optimization methods that accept
+    # sparse Hessian matrices.
+
+    def sparse_rosen_hess(x):
+        return sparse_type(rosen_hess(x))
+
+    x0 = [2., 2.]
+
+    res_sparse = optimize.minimize(rosen, x0, method=method,
+                                   jac=rosen_der, hess=sparse_rosen_hess)
+    res_dense = optimize.minimize(rosen, x0, method=method,
+                                  jac=rosen_der, hess=rosen_hess)
+
+    assert_allclose(res_dense.fun, res_sparse.fun)
+    assert_allclose(res_dense.x, res_sparse.x)
+    assert res_dense.nfev == res_sparse.nfev
+    assert res_dense.njev == res_sparse.njev
+    assert res_dense.nhev == res_sparse.nhev
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_quadratic_assignment.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_quadratic_assignment.py
new file mode 100644
index 0000000000000000000000000000000000000000..3f7f26158d8e7ddb33012db4dfc4030661aa75bb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_quadratic_assignment.py
@@ -0,0 +1,455 @@
+import pytest
+import numpy as np
+from numpy.random import default_rng
+from scipy.optimize import quadratic_assignment, OptimizeWarning
+from scipy.optimize._qap import _calc_score as _score
+from numpy.testing import assert_equal, assert_, assert_warns
+
+
+################
+# Common Tests #
+################
+
+def chr12c():
+    A = [
+        [0, 90, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+        [90, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0],
+        [10, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0],
+        [0, 23, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0],
+        [0, 0, 43, 0, 0, 0, 26, 0, 0, 0, 0, 0],
+        [0, 0, 0, 88, 0, 0, 0, 16, 0, 0, 0, 0],
+        [0, 0, 0, 0, 26, 0, 0, 0, 1, 0, 0, 0],
+        [0, 0, 0, 0, 0, 16, 0, 0, 0, 96, 0, 0],
+        [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 29, 0],
+        [0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 37],
+        [0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0],
+        [0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0],
+    ]
+    B = [
+        [0, 36, 54, 26, 59, 72, 9, 34, 79, 17, 46, 95],
+        [36, 0, 73, 35, 90, 58, 30, 78, 35, 44, 79, 36],
+        [54, 73, 0, 21, 10, 97, 58, 66, 69, 61, 54, 63],
+        [26, 35, 21, 0, 93, 12, 46, 40, 37, 48, 68, 85],
+        [59, 90, 10, 93, 0, 64, 5, 29, 76, 16, 5, 76],
+        [72, 58, 97, 12, 64, 0, 96, 55, 38, 54, 0, 34],
+        [9, 30, 58, 46, 5, 96, 0, 83, 35, 11, 56, 37],
+        [34, 78, 66, 40, 29, 55, 83, 0, 44, 12, 15, 80],
+        [79, 35, 69, 37, 76, 38, 35, 44, 0, 64, 39, 33],
+        [17, 44, 61, 48, 16, 54, 11, 12, 64, 0, 70, 86],
+        [46, 79, 54, 68, 5, 0, 56, 15, 39, 70, 0, 18],
+        [95, 36, 63, 85, 76, 34, 37, 80, 33, 86, 18, 0],
+    ]
+    A, B = np.array(A), np.array(B)
+    n = A.shape[0]
+
+    opt_perm = np.array([7, 5, 1, 3, 10, 4, 8, 6, 9, 11, 2, 12]) - [1] * n
+
+    return A, B, opt_perm
+
+
+@pytest.mark.filterwarnings("ignore:The NumPy global RNG was seeded by calling")
+class QAPCommonTests:
+    """
+    Base class for `quadratic_assignment` tests.
+    """
+    # Test global optima of problem from Umeyama IVB
+    # https://pcl.sitehost.iu.edu/rgoldsto/papers/weighted%20graph%20match2.pdf
+    # Graph matching maximum is in the paper
+    # QAP minimum determined by brute force
+    def test_accuracy_1(self):
+        # besides testing accuracy, check that A and B can be lists
+        rng = np.random.default_rng(4358764578823597324)
+
+        A = [[0, 3, 4, 2],
+             [0, 0, 1, 2],
+             [1, 0, 0, 1],
+             [0, 0, 1, 0]]
+
+        B = [[0, 4, 2, 4],
+             [0, 0, 1, 0],
+             [0, 2, 0, 2],
+             [0, 1, 2, 0]]
+
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng, "maximize": False})
+
+        assert_equal(res.fun, 10)
+        assert_equal(res.col_ind, np.array([1, 2, 3, 0]))
+
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng, "maximize": True})
+
+        if self.method == 'faq':
+            # Global optimum is 40, but FAQ gets 37
+            assert_equal(res.fun, 37)
+            assert_equal(res.col_ind, np.array([0, 2, 3, 1]))
+        else:
+            assert_equal(res.fun, 40)
+            assert_equal(res.col_ind, np.array([0, 3, 1, 2]))
+
+        quadratic_assignment(A, B, method=self.method,
+                             options={"rng": rng, "maximize": True})
+
+    # Test global optima of problem from Umeyama IIIB
+    # https://pcl.sitehost.iu.edu/rgoldsto/papers/weighted%20graph%20match2.pdf
+    # Graph matching maximum is in the paper
+    # QAP minimum determined by brute force
+    def test_accuracy_2(self):
+        rng = np.random.default_rng(4358764578823597324)
+
+        A = np.array([[0, 5, 8, 6],
+                      [5, 0, 5, 1],
+                      [8, 5, 0, 2],
+                      [6, 1, 2, 0]])
+
+        B = np.array([[0, 1, 8, 4],
+                      [1, 0, 5, 2],
+                      [8, 5, 0, 5],
+                      [4, 2, 5, 0]])
+
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng, "maximize": False})
+
+        if self.method == 'faq':
+            # Global optimum is 176, but FAQ gets 178
+            assert_equal(res.fun, 178)
+            assert_equal(res.col_ind, np.array([1, 0, 3, 2]))
+        else:
+            assert_equal(res.fun, 176)
+            assert_equal(res.col_ind, np.array([1, 2, 3, 0]))
+
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng, "maximize": True})
+
+        assert_equal(res.fun, 286)
+        assert_equal(res.col_ind, np.array([2, 3, 0, 1]))
+
+    def test_accuracy_3(self):
+        rng = np.random.default_rng(4358764578823597324)
+        A, B, opt_perm = chr12c()
+
+        # basic minimization
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng})
+        assert_(11156 <= res.fun < 21000)
+        assert_equal(res.fun, _score(A, B, res.col_ind))
+
+        # basic maximization
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={"rng": rng, 'maximize': True})
+        assert_(74000 <= res.fun < 85000)
+        assert_equal(res.fun, _score(A, B, res.col_ind))
+
+        # check ofv with strictly partial match
+        seed_cost = np.array([4, 8, 10])
+        seed = np.asarray([seed_cost, opt_perm[seed_cost]]).T
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={'partial_match': seed, "rng": rng})
+        assert_(11156 <= res.fun < 21000)
+        assert_equal(res.col_ind[seed_cost], opt_perm[seed_cost])
+
+        # check performance when partial match is the global optimum
+        seed = np.asarray([np.arange(len(A)), opt_perm]).T
+        res = quadratic_assignment(A, B, method=self.method,
+                                   options={'partial_match': seed, "rng": rng})
+        assert_equal(res.col_ind, seed[:, 1].T)
+        assert_equal(res.fun, 11156)
+        assert_equal(res.nit, 0)
+
+        # check performance with zero sized matrix inputs
+        empty = np.empty((0, 0))
+        res = quadratic_assignment(empty, empty, method=self.method,
+                                   options={"rng": rng})
+        assert_equal(res.nit, 0)
+        assert_equal(res.fun, 0)
+
+    @pytest.mark.thread_unsafe
+    def test_unknown_options(self):
+        A, B, opt_perm = chr12c()
+
+        def f():
+            quadratic_assignment(A, B, method=self.method,
+                                 options={"ekki-ekki": True})
+        assert_warns(OptimizeWarning, f)
+
+    @pytest.mark.thread_unsafe
+    def test_deprecation_future_warnings(self):
+        # May be removed after SPEC-7 transition is complete in SciPy 1.17
+        A = np.arange(16).reshape((4, 4))
+        B = np.arange(16).reshape((4, 4))
+
+        with pytest.warns(DeprecationWarning, match="Use of `RandomState`*"):
+            rng = np.random.RandomState(0)
+            quadratic_assignment(A, B, method=self.method,
+                                 options={"rng": rng, "maximize": False})
+
+        with pytest.warns(FutureWarning, match="The NumPy global RNG was seeded*"):
+            np.random.seed(0)
+            quadratic_assignment(A, B, method=self.method,
+                                 options={"maximize": False})
+
+        with pytest.warns(FutureWarning, match="The behavior when the rng option*"):
+            quadratic_assignment(A, B, method=self.method,
+                                 options={"rng": 0, "maximize": False})
+
+
+class TestFAQ(QAPCommonTests):
+    method = "faq"
+
+    def test_options(self):
+        # cost and distance matrices of QAPLIB instance chr12c
+        rng = np.random.default_rng(4358764578823597324)
+
+        A, B, opt_perm = chr12c()
+        n = len(A)
+
+        # check that max_iter is obeying with low input value
+        res = quadratic_assignment(A, B, options={'maxiter': 5})
+        assert_equal(res.nit, 5)
+
+        # test with shuffle
+        res = quadratic_assignment(A, B, options={'shuffle_input': True})
+        assert_(11156 <= res.fun < 21000)
+
+        # test with randomized init
+        res = quadratic_assignment(A, B, options={'rng': rng, 'P0': "randomized"})
+        assert_(11156 <= res.fun < 21000)
+
+        # check with specified P0
+        K = np.ones((n, n)) / float(n)
+        K = _doubly_stochastic(K)
+        res = quadratic_assignment(A, B, options={'P0': K})
+        assert_(11156 <= res.fun < 21000)
+
+    def test_specific_input_validation(self):
+
+        A = np.identity(2)
+        B = A
+
+        # method is implicitly faq
+
+        # ValueError Checks: making sure single value parameters are of
+        # correct value
+        with pytest.raises(ValueError, match="Invalid 'P0' parameter"):
+            quadratic_assignment(A, B, options={'P0': "random"})
+        with pytest.raises(
+                ValueError, match="'maxiter' must be a positive integer"):
+            quadratic_assignment(A, B, options={'maxiter': -1})
+        with pytest.raises(ValueError, match="'tol' must be a positive float"):
+            quadratic_assignment(A, B, options={'tol': -1})
+
+        # TypeError Checks: making sure single value parameters are of
+        # correct type
+        with pytest.raises(TypeError):
+            quadratic_assignment(A, B, options={'maxiter': 1.5})
+
+        # test P0 matrix input
+        with pytest.raises(
+                ValueError,
+                match="`P0` matrix must have shape m' x m', where m'=n-m"):
+            quadratic_assignment(
+                np.identity(4), np.identity(4),
+                options={'P0': np.ones((3, 3))}
+            )
+
+        K = [[0.4, 0.2, 0.3],
+             [0.3, 0.6, 0.2],
+             [0.2, 0.2, 0.7]]
+        # matrix that isn't quite doubly stochastic
+        with pytest.raises(
+                ValueError, match="`P0` matrix must be doubly stochastic"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3), options={'P0': K}
+            )
+
+
+class Test2opt(QAPCommonTests):
+    method = "2opt"
+
+    def test_deterministic(self):
+        n = 20
+        rng = default_rng(51982908)
+        A = rng.random(size=(n, n))
+        B = rng.random(size=(n, n))
+        res1 = quadratic_assignment(A, B, method=self.method, options={'rng': rng})
+
+        rng = default_rng(51982908)
+        A = rng.random(size=(n, n))
+        B = rng.random(size=(n, n))
+        res2 = quadratic_assignment(A, B, method=self.method, options={'rng': rng})
+
+        assert_equal(res1.nit, res2.nit)
+
+    def test_partial_guess(self):
+        n = 5
+        rng = np.random.default_rng(4358764578823597324)
+
+        A = rng.random(size=(n, n))
+        B = rng.random(size=(n, n))
+
+        res1 = quadratic_assignment(A, B, method=self.method,
+                                    options={'rng': rng})
+        guess = np.array([np.arange(5), res1.col_ind]).T
+        res2 = quadratic_assignment(A, B, method=self.method,
+                                    options={'rng': rng, 'partial_guess': guess})
+        fix = [2, 4]
+        match = np.array([np.arange(5)[fix], res1.col_ind[fix]]).T
+        res3 = quadratic_assignment(A, B, method=self.method,
+                                    options={'rng': rng, 'partial_guess': guess,
+                                             'partial_match': match})
+        assert_(res1.nit != n*(n+1)/2)
+        assert_equal(res2.nit, n*(n+1)/2)      # tests each swap exactly once
+        assert_equal(res3.nit, (n-2)*(n-1)/2)  # tests free swaps exactly once
+
+    def test_specific_input_validation(self):
+        # can't have more seed nodes than cost/dist nodes
+        _rm = _range_matrix
+        with pytest.raises(
+                ValueError,
+                match="`partial_guess` can have only as many entries as"):
+            quadratic_assignment(np.identity(3), np.identity(3),
+                                 method=self.method,
+                                 options={'partial_guess': _rm(5, 2)})
+        # test for only two seed columns
+        with pytest.raises(
+                ValueError, match="`partial_guess` must have two columns"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3), method=self.method,
+                options={'partial_guess': _range_matrix(2, 3)}
+            )
+        # test that seed has no more than two dimensions
+        with pytest.raises(
+                ValueError, match="`partial_guess` must have exactly two"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3), method=self.method,
+                options={'partial_guess': np.random.rand(3, 2, 2)}
+            )
+        # seeds cannot be negative valued
+        with pytest.raises(
+                ValueError, match="`partial_guess` must contain only pos"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3), method=self.method,
+                options={'partial_guess': -1 * _range_matrix(2, 2)}
+            )
+        # seeds can't have values greater than number of nodes
+        with pytest.raises(
+                ValueError,
+                match="`partial_guess` entries must be less than number"):
+            quadratic_assignment(
+                np.identity(5), np.identity(5), method=self.method,
+                options={'partial_guess': 2 * _range_matrix(4, 2)}
+            )
+        # columns of seed matrix must be unique
+        with pytest.raises(
+                ValueError,
+                match="`partial_guess` column entries must be unique"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3), method=self.method,
+                options={'partial_guess': np.ones((2, 2))}
+            )
+
+
+@pytest.mark.filterwarnings("ignore:The NumPy global RNG was seeded by calling")
+class TestQAPOnce:
+
+    # these don't need to be repeated for each method
+    def test_common_input_validation(self):
+        rng = default_rng(12349038)
+        # test that non square matrices return error
+        with pytest.raises(ValueError, match="`A` must be square"):
+            quadratic_assignment(
+                rng.random((3, 4)),
+                rng.random((3, 3)),
+            )
+        with pytest.raises(ValueError, match="`B` must be square"):
+            quadratic_assignment(
+                rng.random((3, 3)),
+                rng.random((3, 4)),
+            )
+        # test that cost and dist matrices have no more than two dimensions
+        with pytest.raises(
+                ValueError, match="`A` and `B` must have exactly two"):
+            quadratic_assignment(
+                rng.random((3, 3, 3)),
+                rng.random((3, 3, 3)),
+            )
+        # test that cost and dist matrices of different sizes return error
+        with pytest.raises(
+                ValueError,
+                match="`A` and `B` matrices must be of equal size"):
+            quadratic_assignment(
+                rng.random((3, 3)),
+                rng.random((4, 4)),
+            )
+        # can't have more seed nodes than cost/dist nodes
+        _rm = _range_matrix
+        with pytest.raises(
+                ValueError,
+                match="`partial_match` can have only as many seeds as"):
+            quadratic_assignment(np.identity(3), np.identity(3),
+                                 options={'partial_match': _rm(5, 2)})
+        # test for only two seed columns
+        with pytest.raises(
+                ValueError, match="`partial_match` must have two columns"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3),
+                options={'partial_match': _range_matrix(2, 3)}
+            )
+        # test that seed has no more than two dimensions
+        with pytest.raises(
+                ValueError, match="`partial_match` must have exactly two"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3),
+                options={'partial_match': np.random.rand(3, 2, 2)}
+            )
+        # seeds cannot be negative valued
+        with pytest.raises(
+                ValueError, match="`partial_match` must contain only pos"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3),
+                options={'partial_match': -1 * _range_matrix(2, 2)}
+            )
+        # seeds can't have values greater than number of nodes
+        with pytest.raises(
+                ValueError,
+                match="`partial_match` entries must be less than number"):
+            quadratic_assignment(
+                np.identity(5), np.identity(5),
+                options={'partial_match': 2 * _range_matrix(4, 2)}
+            )
+        # columns of seed matrix must be unique
+        with pytest.raises(
+                ValueError,
+                match="`partial_match` column entries must be unique"):
+            quadratic_assignment(
+                np.identity(3), np.identity(3),
+                options={'partial_match': np.ones((2, 2))}
+            )
+
+
+def _range_matrix(a, b):
+    mat = np.zeros((a, b))
+    for i in range(b):
+        mat[:, i] = np.arange(a)
+    return mat
+
+
+def _doubly_stochastic(P, tol=1e-3):
+    # cleaner implementation of btaba/sinkhorn_knopp
+
+    max_iter = 1000
+    c = 1 / P.sum(axis=0)
+    r = 1 / (P @ c)
+    P_eps = P
+
+    for it in range(max_iter):
+        if ((np.abs(P_eps.sum(axis=1) - 1) < tol).all() and
+                (np.abs(P_eps.sum(axis=0) - 1) < tol).all()):
+            # All column/row sums ~= 1 within threshold
+            break
+
+        c = 1 / (r @ P)
+        r = 1 / (P @ c)
+        P_eps = r[:, None] * P * c
+
+    return P_eps
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_regression.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_regression.py
new file mode 100644
index 0000000000000000000000000000000000000000..44916ba96293db19756b8222422e76945aa48ebb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_regression.py
@@ -0,0 +1,40 @@
+"""Regression tests for optimize.
+
+"""
+import numpy as np
+from numpy.testing import assert_almost_equal
+from pytest import raises as assert_raises
+
+import scipy.optimize
+
+
+class TestRegression:
+
+    def test_newton_x0_is_0(self):
+        # Regression test for gh-1601
+        tgt = 1
+        res = scipy.optimize.newton(lambda x: x - 1, 0)
+        assert_almost_equal(res, tgt)
+
+    def test_newton_integers(self):
+        # Regression test for gh-1741
+        root = scipy.optimize.newton(lambda x: x**2 - 1, x0=2,
+                                    fprime=lambda x: 2*x)
+        assert_almost_equal(root, 1.0)
+
+    def test_lmdif_errmsg(self):
+        # This shouldn't cause a crash on Python 3
+        class SomeError(Exception):
+            pass
+        counter = [0]
+
+        def func(x):
+            counter[0] += 1
+            if counter[0] < 3:
+                return x**2 - np.array([9, 10, 11])
+            else:
+                raise SomeError()
+        assert_raises(SomeError,
+                      scipy.optimize.leastsq,
+                      func, [1, 2, 3])
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_slsqp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_slsqp.py
new file mode 100644
index 0000000000000000000000000000000000000000..45216aa296b56a6a71b89c994e8fc360b826ba00
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_slsqp.py
@@ -0,0 +1,613 @@
+"""
+Unit test for SLSQP optimization.
+"""
+from numpy.testing import (assert_, assert_array_almost_equal,
+                           assert_allclose, assert_equal)
+from pytest import raises as assert_raises
+import pytest
+import numpy as np
+import scipy
+
+from scipy.optimize import fmin_slsqp, minimize, Bounds, NonlinearConstraint
+
+
+class MyCallBack:
+    """pass a custom callback function
+
+    This makes sure it's being used.
+    """
+    def __init__(self):
+        self.been_called = False
+        self.ncalls = 0
+
+    def __call__(self, x):
+        self.been_called = True
+        self.ncalls += 1
+
+
+class TestSLSQP:
+    """
+    Test SLSQP algorithm using Example 14.4 from Numerical Methods for
+    Engineers by Steven Chapra and Raymond Canale.
+    This example maximizes the function f(x) = 2*x*y + 2*x - x**2 - 2*y**2,
+    which has a maximum at x=2, y=1.
+    """
+    def setup_method(self):
+        self.opts = {'disp': False}
+
+    def fun(self, d, sign=1.0):
+        """
+        Arguments:
+        d     - A list of two elements, where d[0] represents x and d[1] represents y
+                 in the following equation.
+        sign - A multiplier for f. Since we want to optimize it, and the SciPy
+               optimizers can only minimize functions, we need to multiply it by
+               -1 to achieve the desired solution
+        Returns:
+        2*x*y + 2*x - x**2 - 2*y**2
+
+        """
+        x = d[0]
+        y = d[1]
+        return sign*(2*x*y + 2*x - x**2 - 2*y**2)
+
+    def jac(self, d, sign=1.0):
+        """
+        This is the derivative of fun, returning a NumPy array
+        representing df/dx and df/dy.
+
+        """
+        x = d[0]
+        y = d[1]
+        dfdx = sign*(-2*x + 2*y + 2)
+        dfdy = sign*(2*x - 4*y)
+        return np.array([dfdx, dfdy], float)
+
+    def fun_and_jac(self, d, sign=1.0):
+        return self.fun(d, sign), self.jac(d, sign)
+
+    def f_eqcon(self, x, sign=1.0):
+        """ Equality constraint """
+        return np.array([x[0] - x[1]])
+
+    def fprime_eqcon(self, x, sign=1.0):
+        """ Equality constraint, derivative """
+        return np.array([[1, -1]])
+
+    def f_eqcon_scalar(self, x, sign=1.0):
+        """ Scalar equality constraint """
+        return self.f_eqcon(x, sign)[0]
+
+    def fprime_eqcon_scalar(self, x, sign=1.0):
+        """ Scalar equality constraint, derivative """
+        return self.fprime_eqcon(x, sign)[0].tolist()
+
+    def f_ieqcon(self, x, sign=1.0):
+        """ Inequality constraint """
+        return np.array([x[0] - x[1] - 1.0])
+
+    def fprime_ieqcon(self, x, sign=1.0):
+        """ Inequality constraint, derivative """
+        return np.array([[1, -1]])
+
+    def f_ieqcon2(self, x):
+        """ Vector inequality constraint """
+        return np.asarray(x)
+
+    def fprime_ieqcon2(self, x):
+        """ Vector inequality constraint, derivative """
+        return np.identity(x.shape[0])
+
+    # minimize
+    def test_minimize_unbounded_approximated(self):
+        # Minimize, method='SLSQP': unbounded, approximated jacobian.
+        jacs = [None, False, '2-point', '3-point']
+        for jac in jacs:
+            res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                           jac=jac, method='SLSQP',
+                           options=self.opts)
+            assert_(res['success'], res['message'])
+            assert_allclose(res.x, [2, 1])
+
+    def test_minimize_unbounded_given(self):
+        # Minimize, method='SLSQP': unbounded, given Jacobian.
+        res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                       jac=self.jac, method='SLSQP', options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [2, 1])
+
+    def test_minimize_bounded_approximated(self):
+        # Minimize, method='SLSQP': bounded, approximated jacobian.
+        jacs = [None, False, '2-point', '3-point']
+        for jac in jacs:
+            with np.errstate(invalid='ignore'):
+                res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                               jac=jac,
+                               bounds=((2.5, None), (None, 0.5)),
+                               method='SLSQP', options=self.opts)
+            assert_(res['success'], res['message'])
+            assert_allclose(res.x, [2.5, 0.5])
+            assert_(2.5 <= res.x[0])
+            assert_(res.x[1] <= 0.5)
+
+    def test_minimize_unbounded_combined(self):
+        # Minimize, method='SLSQP': unbounded, combined function and Jacobian.
+        res = minimize(self.fun_and_jac, [-1.0, 1.0], args=(-1.0, ),
+                       jac=True, method='SLSQP', options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [2, 1])
+
+    def test_minimize_equality_approximated(self):
+        # Minimize with method='SLSQP': equality constraint, approx. jacobian.
+        jacs = [None, False, '2-point', '3-point']
+        for jac in jacs:
+            res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                           jac=jac,
+                           constraints={'type': 'eq',
+                                        'fun': self.f_eqcon,
+                                        'args': (-1.0, )},
+                           method='SLSQP', options=self.opts)
+            assert_(res['success'], res['message'])
+            assert_allclose(res.x, [1, 1])
+
+    def test_minimize_equality_given(self):
+        # Minimize with method='SLSQP': equality constraint, given Jacobian.
+        res = minimize(self.fun, [-1.0, 1.0], jac=self.jac,
+                       method='SLSQP', args=(-1.0,),
+                       constraints={'type': 'eq', 'fun':self.f_eqcon,
+                                    'args': (-1.0, )},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [1, 1])
+
+    def test_minimize_equality_given2(self):
+        # Minimize with method='SLSQP': equality constraint, given Jacobian
+        # for fun and const.
+        res = minimize(self.fun, [-1.0, 1.0], method='SLSQP',
+                       jac=self.jac, args=(-1.0,),
+                       constraints={'type': 'eq',
+                                    'fun': self.f_eqcon,
+                                    'args': (-1.0, ),
+                                    'jac': self.fprime_eqcon},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [1, 1])
+
+    def test_minimize_equality_given_cons_scalar(self):
+        # Minimize with method='SLSQP': scalar equality constraint, given
+        # Jacobian for fun and const.
+        res = minimize(self.fun, [-1.0, 1.0], method='SLSQP',
+                       jac=self.jac, args=(-1.0,),
+                       constraints={'type': 'eq',
+                                    'fun': self.f_eqcon_scalar,
+                                    'args': (-1.0, ),
+                                    'jac': self.fprime_eqcon_scalar},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [1, 1])
+
+    def test_minimize_inequality_given(self):
+        # Minimize with method='SLSQP': inequality constraint, given Jacobian.
+        res = minimize(self.fun, [-1.0, 1.0], method='SLSQP',
+                       jac=self.jac, args=(-1.0, ),
+                       constraints={'type': 'ineq',
+                                    'fun': self.f_ieqcon,
+                                    'args': (-1.0, )},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [2, 1], atol=1e-3)
+
+    def test_minimize_inequality_given_vector_constraints(self):
+        # Minimize with method='SLSQP': vector inequality constraint, given
+        # Jacobian.
+        res = minimize(self.fun, [-1.0, 1.0], jac=self.jac,
+                       method='SLSQP', args=(-1.0,),
+                       constraints={'type': 'ineq',
+                                    'fun': self.f_ieqcon2,
+                                    'jac': self.fprime_ieqcon2},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [2, 1])
+
+    def test_minimize_bounded_constraint(self):
+        # when the constraint makes the solver go up against a parameter
+        # bound make sure that the numerical differentiation of the
+        # jacobian doesn't try to exceed that bound using a finite difference.
+        # gh11403
+        def c(x):
+            assert 0 <= x[0] <= 1 and 0 <= x[1] <= 1, x
+            return x[0] ** 0.5 + x[1]
+
+        def f(x):
+            assert 0 <= x[0] <= 1 and 0 <= x[1] <= 1, x
+            return -x[0] ** 2 + x[1] ** 2
+
+        cns = [NonlinearConstraint(c, 0, 1.5)]
+        x0 = np.asarray([0.9, 0.5])
+        bnd = Bounds([0., 0.], [1.0, 1.0])
+        minimize(f, x0, method='SLSQP', bounds=bnd, constraints=cns)
+
+    def test_minimize_bound_equality_given2(self):
+        # Minimize with method='SLSQP': bounds, eq. const., given jac. for
+        # fun. and const.
+        res = minimize(self.fun, [-1.0, 1.0], method='SLSQP',
+                       jac=self.jac, args=(-1.0, ),
+                       bounds=[(-0.8, 1.), (-1, 0.8)],
+                       constraints={'type': 'eq',
+                                    'fun': self.f_eqcon,
+                                    'args': (-1.0, ),
+                                    'jac': self.fprime_eqcon},
+                       options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_allclose(res.x, [0.8, 0.8], atol=1e-3)
+        assert_(-0.8 <= res.x[0] <= 1)
+        assert_(-1 <= res.x[1] <= 0.8)
+
+    # fmin_slsqp
+    def test_unbounded_approximated(self):
+        # SLSQP: unbounded, approximated Jacobian.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                         iprint = 0, full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [2, 1])
+
+    def test_unbounded_given(self):
+        # SLSQP: unbounded, given Jacobian.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                         fprime = self.jac, iprint = 0,
+                         full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [2, 1])
+
+    def test_equality_approximated(self):
+        # SLSQP: equality constraint, approximated Jacobian.
+        res = fmin_slsqp(self.fun,[-1.0,1.0], args=(-1.0,),
+                         eqcons = [self.f_eqcon],
+                         iprint = 0, full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [1, 1])
+
+    def test_equality_given(self):
+        # SLSQP: equality constraint, given Jacobian.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0],
+                         fprime=self.jac, args=(-1.0,),
+                         eqcons = [self.f_eqcon], iprint = 0,
+                         full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [1, 1])
+
+    def test_equality_given2(self):
+        # SLSQP: equality constraint, given Jacobian for fun and const.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0],
+                         fprime=self.jac, args=(-1.0,),
+                         f_eqcons = self.f_eqcon,
+                         fprime_eqcons = self.fprime_eqcon,
+                         iprint = 0,
+                         full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [1, 1])
+
+    def test_inequality_given(self):
+        # SLSQP: inequality constraint, given Jacobian.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0],
+                         fprime=self.jac, args=(-1.0, ),
+                         ieqcons = [self.f_ieqcon],
+                         iprint = 0, full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [2, 1], decimal=3)
+
+    def test_bound_equality_given2(self):
+        # SLSQP: bounds, eq. const., given jac. for fun. and const.
+        res = fmin_slsqp(self.fun, [-1.0, 1.0],
+                         fprime=self.jac, args=(-1.0, ),
+                         bounds = [(-0.8, 1.), (-1, 0.8)],
+                         f_eqcons = self.f_eqcon,
+                         fprime_eqcons = self.fprime_eqcon,
+                         iprint = 0, full_output = 1)
+        x, fx, its, imode, smode = res
+        assert_(imode == 0, imode)
+        assert_array_almost_equal(x, [0.8, 0.8], decimal=3)
+        assert_(-0.8 <= x[0] <= 1)
+        assert_(-1 <= x[1] <= 0.8)
+
+    def test_scalar_constraints(self):
+        # Regression test for gh-2182
+        x = fmin_slsqp(lambda z: z**2, [3.],
+                       ieqcons=[lambda z: z[0] - 1],
+                       iprint=0)
+        assert_array_almost_equal(x, [1.])
+
+        x = fmin_slsqp(lambda z: z**2, [3.],
+                       f_ieqcons=lambda z: [z[0] - 1],
+                       iprint=0)
+        assert_array_almost_equal(x, [1.])
+
+    def test_integer_bounds(self):
+        # This should not raise an exception
+        fmin_slsqp(lambda z: z**2 - 1, [0], bounds=[[0, 1]], iprint=0)
+
+    def test_array_bounds(self):
+        # NumPy used to treat n-dimensional 1-element arrays as scalars
+        # in some cases.  The handling of `bounds` by `fmin_slsqp` still
+        # supports this behavior.
+        bounds = [(-np.inf, np.inf), (np.array([2]), np.array([3]))]
+        x = fmin_slsqp(lambda z: np.sum(z**2 - 1), [2.5, 2.5], bounds=bounds,
+                       iprint=0)
+        assert_array_almost_equal(x, [0, 2])
+
+    def test_obj_must_return_scalar(self):
+        # Regression test for Github Issue #5433
+        # If objective function does not return a scalar, raises ValueError
+        with assert_raises(ValueError):
+            fmin_slsqp(lambda x: [0, 1], [1, 2, 3])
+
+    def test_obj_returns_scalar_in_list(self):
+        # Test for Github Issue #5433 and PR #6691
+        # Objective function should be able to return length-1 Python list
+        #  containing the scalar
+        fmin_slsqp(lambda x: [0], [1, 2, 3], iprint=0)
+
+    def test_callback(self):
+        # Minimize, method='SLSQP': unbounded, approximated jacobian. Check for callback
+        callback = MyCallBack()
+        res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ),
+                       method='SLSQP', callback=callback, options=self.opts)
+        assert_(res['success'], res['message'])
+        assert_(callback.been_called)
+        assert_equal(callback.ncalls, res['nit'])
+
+    def test_inconsistent_linearization(self):
+        # SLSQP must be able to solve this problem, even if the
+        # linearized problem at the starting point is infeasible.
+
+        # Linearized constraints are
+        #
+        #    2*x0[0]*x[0] >= 1
+        #
+        # At x0 = [0, 1], the second constraint is clearly infeasible.
+        # This triggers a call with n2==1 in the LSQ subroutine.
+        x = [0, 1]
+        def f1(x):
+            return x[0] + x[1] - 2
+        def f2(x):
+            return x[0] ** 2 - 1
+        sol = minimize(
+            lambda x: x[0]**2 + x[1]**2,
+            x,
+            constraints=({'type':'eq','fun': f1},
+                         {'type':'ineq','fun': f2}),
+            bounds=((0,None), (0,None)),
+            method='SLSQP')
+        x = sol.x
+
+        assert_allclose(f1(x), 0, atol=1e-8)
+        assert_(f2(x) >= -1e-8)
+        assert_(sol.success, sol)
+
+    def test_regression_5743(self):
+        # SLSQP must not indicate success for this problem,
+        # which is infeasible.
+        x = [1, 2]
+        sol = minimize(
+            lambda x: x[0]**2 + x[1]**2,
+            x,
+            constraints=({'type':'eq','fun': lambda x: x[0]+x[1]-1},
+                         {'type':'ineq','fun': lambda x: x[0]-2}),
+            bounds=((0,None), (0,None)),
+            method='SLSQP')
+        assert_(not sol.success, sol)
+
+    def test_gh_6676(self):
+        def func(x):
+            return (x[0] - 1)**2 + 2*(x[1] - 1)**2 + 0.5*(x[2] - 1)**2
+
+        sol = minimize(func, [0, 0, 0], method='SLSQP')
+        assert_(sol.jac.shape == (3,))
+
+    def test_invalid_bounds(self):
+        # Raise correct error when lower bound is greater than upper bound.
+        # See Github issue 6875.
+        bounds_list = [
+            ((1, 2), (2, 1)),
+            ((2, 1), (1, 2)),
+            ((2, 1), (2, 1)),
+            ((np.inf, 0), (np.inf, 0)),
+            ((1, -np.inf), (0, 1)),
+        ]
+        for bounds in bounds_list:
+            with assert_raises(ValueError):
+                minimize(self.fun, [-1.0, 1.0], bounds=bounds, method='SLSQP')
+
+    def test_bounds_clipping(self):
+        #
+        # SLSQP returns bogus results for initial guess out of bounds, gh-6859
+        #
+        def f(x):
+            return (x[0] - 1)**2
+
+        sol = minimize(f, [10], method='slsqp', bounds=[(None, 0)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [-10], method='slsqp', bounds=[(2, None)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 2, atol=1e-10)
+
+        sol = minimize(f, [-10], method='slsqp', bounds=[(None, 0)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [10], method='slsqp', bounds=[(2, None)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 2, atol=1e-10)
+
+        sol = minimize(f, [-0.5], method='slsqp', bounds=[(-1, 0)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [10], method='slsqp', bounds=[(-1, 0)])
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+    def test_infeasible_initial(self):
+        # Check SLSQP behavior with infeasible initial point
+        def f(x):
+            x, = x
+            return x*x - 2*x + 1
+
+        cons_u = [{'type': 'ineq', 'fun': lambda x: 0 - x}]
+        cons_l = [{'type': 'ineq', 'fun': lambda x: x - 2}]
+        cons_ul = [{'type': 'ineq', 'fun': lambda x: 0 - x},
+                   {'type': 'ineq', 'fun': lambda x: x + 1}]
+
+        sol = minimize(f, [10], method='slsqp', constraints=cons_u)
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [-10], method='slsqp', constraints=cons_l)
+        assert_(sol.success)
+        assert_allclose(sol.x, 2, atol=1e-10)
+
+        sol = minimize(f, [-10], method='slsqp', constraints=cons_u)
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [10], method='slsqp', constraints=cons_l)
+        assert_(sol.success)
+        assert_allclose(sol.x, 2, atol=1e-10)
+
+        sol = minimize(f, [-0.5], method='slsqp', constraints=cons_ul)
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+        sol = minimize(f, [10], method='slsqp', constraints=cons_ul)
+        assert_(sol.success)
+        assert_allclose(sol.x, 0, atol=1e-10)
+
+    @pytest.mark.xfail(scipy.show_config(mode='dicts')['Compilers']['fortran']['name']
+                       == "intel-llvm",
+                       reason="Runtime warning due to floating point issues, not logic")
+    def test_inconsistent_inequalities(self):
+        # gh-7618
+
+        def cost(x):
+            return -1 * x[0] + 4 * x[1]
+
+        def ineqcons1(x):
+            return x[1] - x[0] - 1
+
+        def ineqcons2(x):
+            return x[0] - x[1]
+
+        # The inequalities are inconsistent, so no solution can exist:
+        #
+        # x1 >= x0 + 1
+        # x0 >= x1
+
+        x0 = (1,5)
+        bounds = ((-5, 5), (-5, 5))
+        cons = (dict(type='ineq', fun=ineqcons1), dict(type='ineq', fun=ineqcons2))
+        res = minimize(cost, x0, method='SLSQP', bounds=bounds, constraints=cons)
+
+        assert_(not res.success)
+
+    def test_new_bounds_type(self):
+        def f(x):
+            return x[0] ** 2 + x[1] ** 2
+        bounds = Bounds([1, 0], [np.inf, np.inf])
+        sol = minimize(f, [0, 0], method='slsqp', bounds=bounds)
+        assert_(sol.success)
+        assert_allclose(sol.x, [1, 0])
+
+    def test_nested_minimization(self):
+
+        class NestedProblem:
+
+            def __init__(self):
+                self.F_outer_count = 0
+
+            def F_outer(self, x):
+                self.F_outer_count += 1
+                if self.F_outer_count > 1000:
+                    raise Exception("Nested minimization failed to terminate.")
+                inner_res = minimize(self.F_inner, (3, 4), method="SLSQP")
+                assert_(inner_res.success)
+                assert_allclose(inner_res.x, [1, 1])
+                return x[0]**2 + x[1]**2 + x[2]**2
+
+            def F_inner(self, x):
+                return (x[0] - 1)**2 + (x[1] - 1)**2
+
+            def solve(self):
+                outer_res = minimize(self.F_outer, (5, 5, 5), method="SLSQP")
+                assert_(outer_res.success)
+                assert_allclose(outer_res.x, [0, 0, 0])
+
+        problem = NestedProblem()
+        problem.solve()
+
+    def test_gh1758(self):
+        # the test suggested in gh1758
+        # https://nlopt.readthedocs.io/en/latest/NLopt_Tutorial/
+        # implement two equality constraints, in R^2.
+        def fun(x):
+            return np.sqrt(x[1])
+
+        def f_eqcon(x):
+            """ Equality constraint """
+            return x[1] - (2 * x[0]) ** 3
+
+        def f_eqcon2(x):
+            """ Equality constraint """
+            return x[1] - (-x[0] + 1) ** 3
+
+        c1 = {'type': 'eq', 'fun': f_eqcon}
+        c2 = {'type': 'eq', 'fun': f_eqcon2}
+
+        res = minimize(fun, [8, 0.25], method='SLSQP',
+                       constraints=[c1, c2], bounds=[(-0.5, 1), (0, 8)])
+
+        np.testing.assert_allclose(res.fun, 0.5443310539518)
+        np.testing.assert_allclose(res.x, [0.33333333, 0.2962963])
+        assert res.success
+
+    def test_gh9640(self):
+        np.random.seed(10)
+        cons = ({'type': 'ineq', 'fun': lambda x: -x[0] - x[1] - 3},
+                {'type': 'ineq', 'fun': lambda x: x[1] + x[2] - 2})
+        bnds = ((-2, 2), (-2, 2), (-2, 2))
+
+        def target(x):
+            return 1
+        x0 = [-1.8869783504471584, -0.640096352696244, -0.8174212253407696]
+        res = minimize(target, x0, method='SLSQP', bounds=bnds, constraints=cons,
+                       options={'disp':False, 'maxiter':10000})
+
+        # The problem is infeasible, so it cannot succeed
+        assert not res.success
+
+    @pytest.mark.thread_unsafe
+    def test_parameters_stay_within_bounds(self):
+        # gh11403. For some problems the SLSQP Fortran code suggests a step
+        # outside one of the lower/upper bounds. When this happens
+        # approx_derivative complains because it's being asked to evaluate
+        # a gradient outside its domain.
+        np.random.seed(1)
+        bounds = Bounds(np.array([0.1]), np.array([1.0]))
+        n_inputs = len(bounds.lb)
+        x0 = np.array(bounds.lb + (bounds.ub - bounds.lb) *
+                      np.random.random(n_inputs))
+
+        def f(x):
+            assert (x >= bounds.lb).all()
+            return np.linalg.norm(x)
+
+        with pytest.warns(RuntimeWarning, match='x were outside bounds'):
+            res = minimize(f, x0, method='SLSQP', bounds=bounds)
+            assert res.success
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_tnc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_tnc.py
new file mode 100644
index 0000000000000000000000000000000000000000..2cde9837bfd08e62916660a9750d833629b6b547
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_tnc.py
@@ -0,0 +1,345 @@
+"""
+Unit tests for TNC optimization routine from tnc.py
+"""
+import pytest
+from numpy.testing import assert_allclose, assert_equal
+
+import numpy as np
+from math import pow
+
+from scipy import optimize
+
+
+class TestTnc:
+    """TNC non-linear optimization.
+
+    These tests are taken from Prof. K. Schittkowski's test examples
+    for constrained non-linear programming.
+
+    http://www.uni-bayreuth.de/departments/math/~kschittkowski/home.htm
+
+    """
+    def setup_method(self):
+        # options for minimize
+        self.opts = {'disp': False, 'maxfun': 200}
+
+    # objective functions and Jacobian for each test
+    def f1(self, x, a=100.0):
+        return a * pow((x[1] - pow(x[0], 2)), 2) + pow(1.0 - x[0], 2)
+
+    def g1(self, x, a=100.0):
+        dif = [0, 0]
+        dif[1] = 2 * a * (x[1] - pow(x[0], 2))
+        dif[0] = -2.0 * (x[0] * (dif[1] - 1.0) + 1.0)
+        return dif
+
+    def fg1(self, x, a=100.0):
+        return self.f1(x, a), self.g1(x, a)
+
+    def f3(self, x):
+        return x[1] + pow(x[1] - x[0], 2) * 1.0e-5
+
+    def g3(self, x):
+        dif = [0, 0]
+        dif[0] = -2.0 * (x[1] - x[0]) * 1.0e-5
+        dif[1] = 1.0 - dif[0]
+        return dif
+
+    def fg3(self, x):
+        return self.f3(x), self.g3(x)
+
+    def f4(self, x):
+        return pow(x[0] + 1.0, 3) / 3.0 + x[1]
+
+    def g4(self, x):
+        dif = [0, 0]
+        dif[0] = pow(x[0] + 1.0, 2)
+        dif[1] = 1.0
+        return dif
+
+    def fg4(self, x):
+        return self.f4(x), self.g4(x)
+
+    def f5(self, x):
+        return np.sin(x[0] + x[1]) + pow(x[0] - x[1], 2) - \
+                1.5 * x[0] + 2.5 * x[1] + 1.0
+
+    def g5(self, x):
+        dif = [0, 0]
+        v1 = np.cos(x[0] + x[1])
+        v2 = 2.0*(x[0] - x[1])
+
+        dif[0] = v1 + v2 - 1.5
+        dif[1] = v1 - v2 + 2.5
+        return dif
+
+    def fg5(self, x):
+        return self.f5(x), self.g5(x)
+
+    def f38(self, x):
+        return (100.0 * pow(x[1] - pow(x[0], 2), 2) +
+                pow(1.0 - x[0], 2) + 90.0 * pow(x[3] - pow(x[2], 2), 2) +
+                pow(1.0 - x[2], 2) + 10.1 * (pow(x[1] - 1.0, 2) +
+                                             pow(x[3] - 1.0, 2)) +
+                19.8 * (x[1] - 1.0) * (x[3] - 1.0)) * 1.0e-5
+
+    def g38(self, x):
+        dif = [0, 0, 0, 0]
+        dif[0] = (-400.0 * x[0] * (x[1] - pow(x[0], 2)) -
+                  2.0 * (1.0 - x[0])) * 1.0e-5
+        dif[1] = (200.0 * (x[1] - pow(x[0], 2)) + 20.2 * (x[1] - 1.0) +
+                  19.8 * (x[3] - 1.0)) * 1.0e-5
+        dif[2] = (- 360.0 * x[2] * (x[3] - pow(x[2], 2)) -
+                  2.0 * (1.0 - x[2])) * 1.0e-5
+        dif[3] = (180.0 * (x[3] - pow(x[2], 2)) + 20.2 * (x[3] - 1.0) +
+                  19.8 * (x[1] - 1.0)) * 1.0e-5
+        return dif
+
+    def fg38(self, x):
+        return self.f38(x), self.g38(x)
+
+    def f45(self, x):
+        return 2.0 - x[0] * x[1] * x[2] * x[3] * x[4] / 120.0
+
+    def g45(self, x):
+        dif = [0] * 5
+        dif[0] = - x[1] * x[2] * x[3] * x[4] / 120.0
+        dif[1] = - x[0] * x[2] * x[3] * x[4] / 120.0
+        dif[2] = - x[0] * x[1] * x[3] * x[4] / 120.0
+        dif[3] = - x[0] * x[1] * x[2] * x[4] / 120.0
+        dif[4] = - x[0] * x[1] * x[2] * x[3] / 120.0
+        return dif
+
+    def fg45(self, x):
+        return self.f45(x), self.g45(x)
+
+    # tests
+    # minimize with method=TNC
+    def test_minimize_tnc1(self):
+        x0, bnds = [-2, 1], ([-np.inf, None], [-1.5, None])
+        xopt = [1, 1]
+        iterx = []  # to test callback
+
+        res = optimize.minimize(self.f1, x0, method='TNC', jac=self.g1,
+                                bounds=bnds, options=self.opts,
+                                callback=iterx.append)
+        assert_allclose(res.fun, self.f1(xopt), atol=1e-8)
+        assert_equal(len(iterx), res.nit)
+
+    def test_minimize_tnc1b(self):
+        x0, bnds = np.array([-2, 1]), ([-np.inf, None], [-1.5, None])
+        xopt = [1, 1]
+        x = optimize.minimize(self.f1, x0, method='TNC',
+                              bounds=bnds, options=self.opts).x
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-4)
+
+    def test_minimize_tnc1c(self):
+        x0, bnds = [-2, 1], ([-np.inf, None],[-1.5, None])
+        xopt = [1, 1]
+        x = optimize.minimize(self.fg1, x0, method='TNC',
+                              jac=True, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-8)
+
+    def test_minimize_tnc2(self):
+        x0, bnds = [-2, 1], ([-np.inf, None], [1.5, None])
+        xopt = [-1.2210262419616387, 1.5]
+        x = optimize.minimize(self.f1, x0, method='TNC',
+                              jac=self.g1, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-8)
+
+    def test_minimize_tnc3(self):
+        x0, bnds = [10, 1], ([-np.inf, None], [0.0, None])
+        xopt = [0, 0]
+        x = optimize.minimize(self.f3, x0, method='TNC',
+                              jac=self.g3, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f3(x), self.f3(xopt), atol=1e-8)
+
+    def test_minimize_tnc4(self):
+        x0,bnds = [1.125, 0.125], [(1, None), (0, None)]
+        xopt = [1, 0]
+        x = optimize.minimize(self.f4, x0, method='TNC',
+                              jac=self.g4, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f4(x), self.f4(xopt), atol=1e-8)
+
+    def test_minimize_tnc5(self):
+        x0, bnds = [0, 0], [(-1.5, 4),(-3, 3)]
+        xopt = [-0.54719755119659763, -1.5471975511965976]
+        x = optimize.minimize(self.f5, x0, method='TNC',
+                              jac=self.g5, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f5(x), self.f5(xopt), atol=1e-8)
+
+    def test_minimize_tnc38(self):
+        x0, bnds = np.array([-3, -1, -3, -1]), [(-10, 10)]*4
+        xopt = [1]*4
+        x = optimize.minimize(self.f38, x0, method='TNC',
+                              jac=self.g38, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f38(x), self.f38(xopt), atol=1e-8)
+
+    def test_minimize_tnc45(self):
+        x0, bnds = [2] * 5, [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5)]
+        xopt = [1, 2, 3, 4, 5]
+        x = optimize.minimize(self.f45, x0, method='TNC',
+                              jac=self.g45, bounds=bnds,
+                              options=self.opts).x
+        assert_allclose(self.f45(x), self.f45(xopt), atol=1e-8)
+
+    # fmin_tnc
+    def test_tnc1(self):
+        fg, x, bounds = self.fg1, [-2, 1], ([-np.inf, None], [-1.5, None])
+        xopt = [1, 1]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds, args=(100.0, ),
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc1b(self):
+        x, bounds = [-2, 1], ([-np.inf, None], [-1.5, None])
+        xopt = [1, 1]
+
+        x, nf, rc = optimize.fmin_tnc(self.f1, x, approx_grad=True,
+                                      bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-4,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc1c(self):
+        x, bounds = [-2, 1], ([-np.inf, None], [-1.5, None])
+        xopt = [1, 1]
+
+        x, nf, rc = optimize.fmin_tnc(self.f1, x, fprime=self.g1,
+                                      bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc2(self):
+        fg, x, bounds = self.fg1, [-2, 1], ([-np.inf, None], [1.5, None])
+        xopt = [-1.2210262419616387, 1.5]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f1(x), self.f1(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc3(self):
+        fg, x, bounds = self.fg3, [10, 1], ([-np.inf, None], [0.0, None])
+        xopt = [0, 0]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f3(x), self.f3(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc4(self):
+        fg, x, bounds = self.fg4, [1.125, 0.125], [(1, None), (0, None)]
+        xopt = [1, 0]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f4(x), self.f4(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc5(self):
+        fg, x, bounds = self.fg5, [0, 0], [(-1.5, 4),(-3, 3)]
+        xopt = [-0.54719755119659763, -1.5471975511965976]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f5(x), self.f5(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc38(self):
+        fg, x, bounds = self.fg38, np.array([-3, -1, -3, -1]), [(-10, 10)]*4
+        xopt = [1]*4
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f38(x), self.f38(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_tnc45(self):
+        fg, x, bounds = self.fg45, [2] * 5, [(0, 1), (0, 2), (0, 3),
+                                             (0, 4), (0, 5)]
+        xopt = [1, 2, 3, 4, 5]
+
+        x, nf, rc = optimize.fmin_tnc(fg, x, bounds=bounds,
+                                      messages=optimize._tnc.MSG_NONE,
+                                      maxfun=200)
+
+        assert_allclose(self.f45(x), self.f45(xopt), atol=1e-8,
+                        err_msg="TNC failed with status: " +
+                                optimize._tnc.RCSTRINGS[rc])
+
+    def test_raising_exceptions(self):
+        # tnc was ported to cython from hand-crafted cpython code
+        # check that Exception handling works.
+        def myfunc(x):
+            raise RuntimeError("myfunc")
+
+        def myfunc1(x):
+            return optimize.rosen(x)
+
+        def callback(x):
+            raise ValueError("callback")
+
+        with pytest.raises(RuntimeError):
+            optimize.minimize(myfunc, [0, 1], method="TNC")
+
+        with pytest.raises(ValueError):
+            optimize.minimize(
+                myfunc1, [0, 1], method="TNC", callback=callback
+            )
+
+    def test_callback_shouldnt_affect_minimization(self):
+        # gh14879. The output of a TNC minimization was different depending
+        # on whether a callback was used or not. The two should be equivalent.
+        # The issue was that TNC was unscaling/scaling x, and this process was
+        # altering x in the process. Now the callback uses an unscaled
+        # temporary copy of x.
+        def callback(x):
+            pass
+
+        fun = optimize.rosen
+        bounds = [(0, 10)] * 4
+        x0 = [1, 2, 3, 4.]
+        res = optimize.minimize(
+            fun, x0, bounds=bounds, method="TNC", options={"maxfun": 1000}
+        )
+        res2 = optimize.minimize(
+            fun, x0, bounds=bounds, method="TNC", options={"maxfun": 1000},
+            callback=callback
+        )
+        assert_allclose(res2.x, res.x)
+        assert_allclose(res2.fun, res.fun)
+        assert_equal(res2.nfev, res.nfev)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion.py
new file mode 100644
index 0000000000000000000000000000000000000000..0439f8125c565d70cbed8c6c41f762fdae06d4ce
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion.py
@@ -0,0 +1,110 @@
+"""
+Unit tests for trust-region optimization routines.
+
+"""
+import pytest
+import numpy as np
+from numpy.testing import assert_, assert_equal, assert_allclose
+from scipy.optimize import (minimize, rosen, rosen_der, rosen_hess,
+                            rosen_hess_prod)
+
+
+class Accumulator:
+    """ This is for testing callbacks."""
+    def __init__(self):
+        self.count = 0
+        self.accum = None
+
+    def __call__(self, x):
+        self.count += 1
+        if self.accum is None:
+            self.accum = np.array(x)
+        else:
+            self.accum += x
+
+
+class TestTrustRegionSolvers:
+
+    def setup_method(self):
+        self.x_opt = [1.0, 1.0]
+        self.easy_guess = [2.0, 2.0]
+        self.hard_guess = [-1.2, 1.0]
+
+    def test_dogleg_accuracy(self):
+        # test the accuracy and the return_all option
+        x0 = self.hard_guess
+        r = minimize(rosen, x0, jac=rosen_der, hess=rosen_hess, tol=1e-8,
+                     method='dogleg', options={'return_all': True},)
+        assert_allclose(x0, r['allvecs'][0])
+        assert_allclose(r['x'], r['allvecs'][-1])
+        assert_allclose(r['x'], self.x_opt)
+
+    def test_dogleg_callback(self):
+        # test the callback mechanism and the maxiter and return_all options
+        accumulator = Accumulator()
+        maxiter = 5
+        r = minimize(rosen, self.hard_guess, jac=rosen_der, hess=rosen_hess,
+                     callback=accumulator, method='dogleg',
+                     options={'return_all': True, 'maxiter': maxiter},)
+        assert_equal(accumulator.count, maxiter)
+        assert_equal(len(r['allvecs']), maxiter+1)
+        assert_allclose(r['x'], r['allvecs'][-1])
+        assert_allclose(sum(r['allvecs'][1:]), accumulator.accum)
+
+    @pytest.mark.thread_unsafe
+    def test_dogleg_user_warning(self):
+        with pytest.warns(RuntimeWarning,
+                          match=r'Maximum number of iterations'):
+            minimize(rosen, self.hard_guess, jac=rosen_der,
+                     hess=rosen_hess, method='dogleg',
+                     options={'disp': True, 'maxiter': 1}, )
+
+    def test_solver_concordance(self):
+        # Assert that dogleg uses fewer iterations than ncg on the Rosenbrock
+        # test function, although this does not necessarily mean
+        # that dogleg is faster or better than ncg even for this function
+        # and especially not for other test functions.
+        f = rosen
+        g = rosen_der
+        h = rosen_hess
+        for x0 in (self.easy_guess, self.hard_guess):
+            r_dogleg = minimize(f, x0, jac=g, hess=h, tol=1e-8,
+                                method='dogleg', options={'return_all': True})
+            r_trust_ncg = minimize(f, x0, jac=g, hess=h, tol=1e-8,
+                                   method='trust-ncg',
+                                   options={'return_all': True})
+            r_trust_krylov = minimize(f, x0, jac=g, hess=h, tol=1e-8,
+                                   method='trust-krylov',
+                                   options={'return_all': True})
+            r_ncg = minimize(f, x0, jac=g, hess=h, tol=1e-8,
+                             method='newton-cg', options={'return_all': True})
+            r_iterative = minimize(f, x0, jac=g, hess=h, tol=1e-8,
+                                   method='trust-exact',
+                                   options={'return_all': True})
+            assert_allclose(self.x_opt, r_dogleg['x'])
+            assert_allclose(self.x_opt, r_trust_ncg['x'])
+            assert_allclose(self.x_opt, r_trust_krylov['x'])
+            assert_allclose(self.x_opt, r_ncg['x'])
+            assert_allclose(self.x_opt, r_iterative['x'])
+            assert_(len(r_dogleg['allvecs']) < len(r_ncg['allvecs']))
+
+    def test_trust_ncg_hessp(self):
+        for x0 in (self.easy_guess, self.hard_guess, self.x_opt):
+            r = minimize(rosen, x0, jac=rosen_der, hessp=rosen_hess_prod,
+                         tol=1e-8, method='trust-ncg')
+            assert_allclose(self.x_opt, r['x'])
+
+    def test_trust_ncg_start_in_optimum(self):
+        r = minimize(rosen, x0=self.x_opt, jac=rosen_der, hess=rosen_hess,
+                     tol=1e-8, method='trust-ncg')
+        assert_allclose(self.x_opt, r['x'])
+
+    def test_trust_krylov_start_in_optimum(self):
+        r = minimize(rosen, x0=self.x_opt, jac=rosen_der, hess=rosen_hess,
+                     tol=1e-8, method='trust-krylov')
+        assert_allclose(self.x_opt, r['x'])
+
+    def test_trust_exact_start_in_optimum(self):
+        r = minimize(rosen, x0=self.x_opt, jac=rosen_der, hess=rosen_hess,
+                     tol=1e-8, method='trust-exact')
+        assert_allclose(self.x_opt, r['x'])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_exact.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_exact.py
new file mode 100644
index 0000000000000000000000000000000000000000..020b6d883a5fa59006c142df4fcb8c3e115c46bf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_exact.py
@@ -0,0 +1,351 @@
+"""
+Unit tests for trust-region iterative subproblem.
+
+"""
+import pytest
+import numpy as np
+from scipy.optimize._trustregion_exact import (
+    estimate_smallest_singular_value,
+    singular_leading_submatrix,
+    IterativeSubproblem)
+from scipy.linalg import (svd, get_lapack_funcs, det, qr, norm)
+from numpy.testing import (assert_array_equal,
+                           assert_equal, assert_array_almost_equal)
+
+
+def random_entry(n, min_eig, max_eig, case):
+
+    # Generate random matrix
+    rand = np.random.uniform(-1, 1, (n, n))
+
+    # QR decomposition
+    Q, _, _ = qr(rand, pivoting='True')
+
+    # Generate random eigenvalues
+    eigvalues = np.random.uniform(min_eig, max_eig, n)
+    eigvalues = np.sort(eigvalues)[::-1]
+
+    # Generate matrix
+    Qaux = np.multiply(eigvalues, Q)
+    A = np.dot(Qaux, Q.T)
+
+    # Generate gradient vector accordingly
+    # to the case is being tested.
+    if case == 'hard':
+        g = np.zeros(n)
+        g[:-1] = np.random.uniform(-1, 1, n-1)
+        g = np.dot(Q, g)
+    elif case == 'jac_equal_zero':
+        g = np.zeros(n)
+    else:
+        g = np.random.uniform(-1, 1, n)
+
+    return A, g
+
+
+class TestEstimateSmallestSingularValue:
+
+    def test_for_ill_condiotioned_matrix(self):
+
+        # Ill-conditioned triangular matrix
+        C = np.array([[1, 2, 3, 4],
+                      [0, 0.05, 60, 7],
+                      [0, 0, 0.8, 9],
+                      [0, 0, 0, 10]])
+
+        # Get svd decomposition
+        U, s, Vt = svd(C)
+
+        # Get smallest singular value and correspondent right singular vector.
+        smin_svd = s[-1]
+        zmin_svd = Vt[-1, :]
+
+        # Estimate smallest singular value
+        smin, zmin = estimate_smallest_singular_value(C)
+
+        # Check the estimation
+        assert_array_almost_equal(smin, smin_svd, decimal=8)
+        assert_array_almost_equal(abs(zmin), abs(zmin_svd), decimal=8)
+
+
+class TestSingularLeadingSubmatrix:
+
+    def test_for_already_singular_leading_submatrix(self):
+
+        # Define test matrix A.
+        # Note that the leading 2x2 submatrix is singular.
+        A = np.array([[1, 2, 3],
+                      [2, 4, 5],
+                      [3, 5, 6]])
+
+        # Get Cholesky from lapack functions
+        cholesky, = get_lapack_funcs(('potrf',), (A,))
+
+        # Compute Cholesky Decomposition
+        c, k = cholesky(A, lower=False, overwrite_a=False, clean=True)
+
+        delta, v = singular_leading_submatrix(A, c, k)
+
+        A[k-1, k-1] += delta
+
+        # Check if the leading submatrix is singular.
+        assert_array_almost_equal(det(A[:k, :k]), 0)
+
+        # Check if `v` fulfil the specified properties
+        quadratic_term = np.dot(v, np.dot(A, v))
+        assert_array_almost_equal(quadratic_term, 0)
+
+    def test_for_simetric_indefinite_matrix(self):
+
+        # Define test matrix A.
+        # Note that the leading 5x5 submatrix is indefinite.
+        A = np.asarray([[1, 2, 3, 7, 8],
+                        [2, 5, 5, 9, 0],
+                        [3, 5, 11, 1, 2],
+                        [7, 9, 1, 7, 5],
+                        [8, 0, 2, 5, 8]])
+
+        # Get Cholesky from lapack functions
+        cholesky, = get_lapack_funcs(('potrf',), (A,))
+
+        # Compute Cholesky Decomposition
+        c, k = cholesky(A, lower=False, overwrite_a=False, clean=True)
+
+        delta, v = singular_leading_submatrix(A, c, k)
+
+        A[k-1, k-1] += delta
+
+        # Check if the leading submatrix is singular.
+        assert_array_almost_equal(det(A[:k, :k]), 0)
+
+        # Check if `v` fulfil the specified properties
+        quadratic_term = np.dot(v, np.dot(A, v))
+        assert_array_almost_equal(quadratic_term, 0)
+
+    def test_for_first_element_equal_to_zero(self):
+
+        # Define test matrix A.
+        # Note that the leading 2x2 submatrix is singular.
+        A = np.array([[0, 3, 11],
+                      [3, 12, 5],
+                      [11, 5, 6]])
+
+        # Get Cholesky from lapack functions
+        cholesky, = get_lapack_funcs(('potrf',), (A,))
+
+        # Compute Cholesky Decomposition
+        c, k = cholesky(A, lower=False, overwrite_a=False, clean=True)
+
+        delta, v = singular_leading_submatrix(A, c, k)
+
+        A[k-1, k-1] += delta
+
+        # Check if the leading submatrix is singular
+        assert_array_almost_equal(det(A[:k, :k]), 0)
+
+        # Check if `v` fulfil the specified properties
+        quadratic_term = np.dot(v, np.dot(A, v))
+        assert_array_almost_equal(quadratic_term, 0)
+
+
+class TestIterativeSubproblem:
+
+    def test_for_the_easy_case(self):
+
+        # `H` is chosen such that `g` is not orthogonal to the
+        # eigenvector associated with the smallest eigenvalue `s`.
+        H = [[10, 2, 3, 4],
+             [2, 1, 7, 1],
+             [3, 7, 1, 7],
+             [4, 1, 7, 2]]
+        g = [1, 1, 1, 1]
+
+        # Trust Radius
+        trust_radius = 1
+
+        # Solve Subproblem
+        subprob = IterativeSubproblem(x=0,
+                                      fun=lambda x: 0,
+                                      jac=lambda x: np.array(g),
+                                      hess=lambda x: np.array(H),
+                                      k_easy=1e-10,
+                                      k_hard=1e-10)
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(p, [0.00393332, -0.55260862,
+                                      0.67065477, -0.49480341])
+        assert_array_almost_equal(hits_boundary, True)
+
+    def test_for_the_hard_case(self):
+
+        # `H` is chosen such that `g` is orthogonal to the
+        # eigenvector associated with the smallest eigenvalue `s`.
+        H = [[10, 2, 3, 4],
+             [2, 1, 7, 1],
+             [3, 7, 1, 7],
+             [4, 1, 7, 2]]
+        g = [6.4852641521327437, 1, 1, 1]
+        s = -8.2151519874416614
+
+        # Trust Radius
+        trust_radius = 1
+
+        # Solve Subproblem
+        subprob = IterativeSubproblem(x=0,
+                                      fun=lambda x: 0,
+                                      jac=lambda x: np.array(g),
+                                      hess=lambda x: np.array(H),
+                                      k_easy=1e-10,
+                                      k_hard=1e-10)
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(-s, subprob.lambda_current)
+
+    def test_for_interior_convergence(self):
+
+        H = [[1.812159, 0.82687265, 0.21838879, -0.52487006, 0.25436988],
+             [0.82687265, 2.66380283, 0.31508988, -0.40144163, 0.08811588],
+             [0.21838879, 0.31508988, 2.38020726, -0.3166346, 0.27363867],
+             [-0.52487006, -0.40144163, -0.3166346, 1.61927182, -0.42140166],
+             [0.25436988, 0.08811588, 0.27363867, -0.42140166, 1.33243101]]
+
+        g = [0.75798952, 0.01421945, 0.33847612, 0.83725004, -0.47909534]
+
+        # Solve Subproblem
+        subprob = IterativeSubproblem(x=0,
+                                      fun=lambda x: 0,
+                                      jac=lambda x: np.array(g),
+                                      hess=lambda x: np.array(H))
+        p, hits_boundary = subprob.solve(1.1)
+
+        assert_array_almost_equal(p, [-0.68585435, 0.1222621, -0.22090999,
+                                      -0.67005053, 0.31586769])
+        assert_array_almost_equal(hits_boundary, False)
+        assert_array_almost_equal(subprob.lambda_current, 0)
+        assert_array_almost_equal(subprob.niter, 1)
+
+    def test_for_jac_equal_zero(self):
+
+        H = [[0.88547534, 2.90692271, 0.98440885, -0.78911503, -0.28035809],
+             [2.90692271, -0.04618819, 0.32867263, -0.83737945, 0.17116396],
+             [0.98440885, 0.32867263, -0.87355957, -0.06521957, -1.43030957],
+             [-0.78911503, -0.83737945, -0.06521957, -1.645709, -0.33887298],
+             [-0.28035809, 0.17116396, -1.43030957, -0.33887298, -1.68586978]]
+
+        g = [0, 0, 0, 0, 0]
+
+        # Solve Subproblem
+        subprob = IterativeSubproblem(x=0,
+                                      fun=lambda x: 0,
+                                      jac=lambda x: np.array(g),
+                                      hess=lambda x: np.array(H),
+                                      k_easy=1e-10,
+                                      k_hard=1e-10)
+        p, hits_boundary = subprob.solve(1.1)
+
+        assert_array_almost_equal(p, [0.06910534, -0.01432721,
+                                      -0.65311947, -0.23815972,
+                                      -0.84954934])
+        assert_array_almost_equal(hits_boundary, True)
+
+    def test_for_jac_very_close_to_zero(self):
+
+        H = [[0.88547534, 2.90692271, 0.98440885, -0.78911503, -0.28035809],
+             [2.90692271, -0.04618819, 0.32867263, -0.83737945, 0.17116396],
+             [0.98440885, 0.32867263, -0.87355957, -0.06521957, -1.43030957],
+             [-0.78911503, -0.83737945, -0.06521957, -1.645709, -0.33887298],
+             [-0.28035809, 0.17116396, -1.43030957, -0.33887298, -1.68586978]]
+
+        g = [0, 0, 0, 0, 1e-15]
+
+        # Solve Subproblem
+        subprob = IterativeSubproblem(x=0,
+                                      fun=lambda x: 0,
+                                      jac=lambda x: np.array(g),
+                                      hess=lambda x: np.array(H),
+                                      k_easy=1e-10,
+                                      k_hard=1e-10)
+        p, hits_boundary = subprob.solve(1.1)
+
+        assert_array_almost_equal(p, [0.06910534, -0.01432721,
+                                      -0.65311947, -0.23815972,
+                                      -0.84954934])
+        assert_array_almost_equal(hits_boundary, True)
+
+    @pytest.mark.fail_slow(10)
+    def test_for_random_entries(self):
+        # Seed
+        np.random.seed(1)
+
+        # Dimension
+        n = 5
+
+        for case in ('easy', 'hard', 'jac_equal_zero'):
+
+            eig_limits = [(-20, -15),
+                          (-10, -5),
+                          (-10, 0),
+                          (-5, 5),
+                          (-10, 10),
+                          (0, 10),
+                          (5, 10),
+                          (15, 20)]
+
+            for min_eig, max_eig in eig_limits:
+                # Generate random symmetric matrix H with
+                # eigenvalues between min_eig and max_eig.
+                H, g = random_entry(n, min_eig, max_eig, case)
+
+                # Trust radius
+                trust_radius_list = [0.1, 0.3, 0.6, 0.8, 1, 1.2, 3.3, 5.5, 10]
+
+                for trust_radius in trust_radius_list:
+                    # Solve subproblem with very high accuracy
+                    subprob_ac = IterativeSubproblem(0,
+                                                     lambda x: 0,
+                                                     lambda x: g,
+                                                     lambda x: H,
+                                                     k_easy=1e-10,
+                                                     k_hard=1e-10)
+
+                    p_ac, hits_boundary_ac = subprob_ac.solve(trust_radius)
+
+                    # Compute objective function value
+                    J_ac = 1/2*np.dot(p_ac, np.dot(H, p_ac))+np.dot(g, p_ac)
+
+                    stop_criteria = [(0.1, 2),
+                                     (0.5, 1.1),
+                                     (0.9, 1.01)]
+
+                    for k_opt, k_trf in stop_criteria:
+
+                        # k_easy and k_hard computed in function
+                        # of k_opt and k_trf accordingly to
+                        # Conn, A. R., Gould, N. I., & Toint, P. L. (2000).
+                        # "Trust region methods". Siam. p. 197.
+                        k_easy = min(k_trf-1,
+                                     1-np.sqrt(k_opt))
+                        k_hard = 1-k_opt
+
+                        # Solve subproblem
+                        subprob = IterativeSubproblem(0,
+                                                      lambda x: 0,
+                                                      lambda x: g,
+                                                      lambda x: H,
+                                                      k_easy=k_easy,
+                                                      k_hard=k_hard)
+                        p, hits_boundary = subprob.solve(trust_radius)
+
+                        # Compute objective function value
+                        J = 1/2*np.dot(p, np.dot(H, p))+np.dot(g, p)
+
+                        # Check if it respect k_trf
+                        if hits_boundary:
+                            assert_array_equal(np.abs(norm(p)-trust_radius) <=
+                                               (k_trf-1)*trust_radius, True)
+                        else:
+                            assert_equal(norm(p) <= trust_radius, True)
+
+                        # Check if it respect k_opt
+                        assert_equal(J <= k_opt*J_ac, True)
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_krylov.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_krylov.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee288c1b1348d280141bb62c09aba8fa67027142
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_trustregion_krylov.py
@@ -0,0 +1,170 @@
+"""
+Unit tests for Krylov space trust-region subproblem solver.
+
+"""
+import pytest
+import numpy as np
+from scipy.optimize._trlib import (get_trlib_quadratic_subproblem)
+from numpy.testing import (assert_,
+                           assert_almost_equal,
+                           assert_equal, assert_array_almost_equal)
+
+KrylovQP = get_trlib_quadratic_subproblem(tol_rel_i=1e-8, tol_rel_b=1e-6)
+KrylovQP_disp = get_trlib_quadratic_subproblem(tol_rel_i=1e-8, tol_rel_b=1e-6,
+                                               disp=True)
+
+class TestKrylovQuadraticSubproblem:
+
+    def test_for_the_easy_case(self):
+
+        # `H` is chosen such that `g` is not orthogonal to the
+        # eigenvector associated with the smallest eigenvalue.
+        H = np.array([[1.0, 0.0, 4.0],
+                      [0.0, 2.0, 0.0],
+                      [4.0, 0.0, 3.0]])
+        g = np.array([5.0, 0.0, 4.0])
+
+        # Trust Radius
+        trust_radius = 1.0
+
+        # Solve Subproblem
+        subprob = KrylovQP(x=0,
+                           fun=lambda x: 0,
+                           jac=lambda x: g,
+                           hess=lambda x: None,
+                           hessp=lambda x, y: H.dot(y))
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(p, np.array([-1.0, 0.0, 0.0]))
+        assert_equal(hits_boundary, True)
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+        # check trust region constraint
+        assert_almost_equal(np.linalg.norm(p), trust_radius)
+
+        trust_radius = 0.5
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(p,
+                np.array([-0.46125446, 0., -0.19298788]))
+        assert_equal(hits_boundary, True)
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+        # check trust region constraint
+        assert_almost_equal(np.linalg.norm(p), trust_radius)
+
+    def test_for_the_hard_case(self):
+
+        # `H` is chosen such that `g` is orthogonal to the
+        # eigenvector associated with the smallest eigenvalue.
+        H = np.array([[1.0, 0.0, 4.0],
+                      [0.0, 2.0, 0.0],
+                      [4.0, 0.0, 3.0]])
+        g = np.array([0.0, 2.0, 0.0])
+
+        # Trust Radius
+        trust_radius = 1.0
+
+        # Solve Subproblem
+        subprob = KrylovQP(x=0,
+                           fun=lambda x: 0,
+                           jac=lambda x: g,
+                           hess=lambda x: None,
+                           hessp=lambda x, y: H.dot(y))
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(p, np.array([0.0, -1.0, 0.0]))
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+        # check trust region constraint
+        assert_almost_equal(np.linalg.norm(p), trust_radius)
+
+        trust_radius = 0.5
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        assert_array_almost_equal(p, np.array([0.0, -0.5, 0.0]))
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+        # check trust region constraint
+        assert_almost_equal(np.linalg.norm(p), trust_radius)
+
+    def test_for_interior_convergence(self):
+
+        H = np.array([[1.812159, 0.82687265, 0.21838879, -0.52487006, 0.25436988],
+                      [0.82687265, 2.66380283, 0.31508988, -0.40144163, 0.08811588],
+                      [0.21838879, 0.31508988, 2.38020726, -0.3166346, 0.27363867],
+                      [-0.52487006, -0.40144163, -0.3166346, 1.61927182, -0.42140166],
+                      [0.25436988, 0.08811588, 0.27363867, -0.42140166, 1.33243101]])
+        g = np.array([0.75798952, 0.01421945, 0.33847612, 0.83725004, -0.47909534])
+        trust_radius = 1.1
+
+        # Solve Subproblem
+        subprob = KrylovQP(x=0,
+                           fun=lambda x: 0,
+                           jac=lambda x: g,
+                           hess=lambda x: None,
+                           hessp=lambda x, y: H.dot(y))
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+
+        assert_array_almost_equal(p, [-0.68585435, 0.1222621, -0.22090999,
+                                      -0.67005053, 0.31586769])
+        assert_array_almost_equal(hits_boundary, False)
+
+    def test_for_very_close_to_zero(self):
+
+        H = np.array([[0.88547534, 2.90692271, 0.98440885, -0.78911503, -0.28035809],
+                      [2.90692271, -0.04618819, 0.32867263, -0.83737945, 0.17116396],
+                      [0.98440885, 0.32867263, -0.87355957, -0.06521957, -1.43030957],
+                      [-0.78911503, -0.83737945, -0.06521957, -1.645709, -0.33887298],
+                      [-0.28035809, 0.17116396, -1.43030957, -0.33887298, -1.68586978]])
+        g = np.array([0, 0, 0, 0, 1e-6])
+        trust_radius = 1.1
+
+        # Solve Subproblem
+        subprob = KrylovQP(x=0,
+                           fun=lambda x: 0,
+                           jac=lambda x: g,
+                           hess=lambda x: None,
+                           hessp=lambda x, y: H.dot(y))
+        p, hits_boundary = subprob.solve(trust_radius)
+
+        # check kkt satisfaction
+        assert_almost_equal(
+                np.linalg.norm(H.dot(p) + subprob.lam * p + g),
+                0.0)
+        # check trust region constraint
+        assert_almost_equal(np.linalg.norm(p), trust_radius)
+
+        assert_array_almost_equal(p, [0.06910534, -0.01432721,
+                                      -0.65311947, -0.23815972,
+                                      -0.84954934])
+        assert_array_almost_equal(hits_boundary, True)
+
+    @pytest.mark.thread_unsafe
+    def test_disp(self, capsys):
+        H = -np.eye(5)
+        g = np.array([0, 0, 0, 0, 1e-6])
+        trust_radius = 1.1
+
+        subprob = KrylovQP_disp(x=0,
+                                fun=lambda x: 0,
+                                jac=lambda x: g,
+                                hess=lambda x: None,
+                                hessp=lambda x, y: H.dot(y))
+        p, hits_boundary = subprob.solve(trust_radius)
+        out, err = capsys.readouterr()
+        assert_(out.startswith(' TR Solving trust region problem'), repr(out))
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_zeros.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_zeros.py
new file mode 100644
index 0000000000000000000000000000000000000000..99fedb181424a3669719f9d4703b739bb53fa8c4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tests/test_zeros.py
@@ -0,0 +1,965 @@
+import pytest
+
+from functools import lru_cache
+
+from numpy.testing import (assert_warns, assert_,
+                           assert_allclose,
+                           assert_equal,
+                           assert_array_equal,
+                           suppress_warnings)
+import numpy as np
+from numpy import finfo, power, nan, isclose, sqrt, exp, sin, cos
+
+from scipy import optimize
+from scipy.optimize import (_zeros_py as zeros, newton, root_scalar,
+                            OptimizeResult)
+
+from scipy._lib._util import getfullargspec_no_self as _getfullargspec
+
+# Import testing parameters
+from scipy.optimize._tstutils import get_tests, functions as tstutils_functions
+
+TOL = 4*np.finfo(float).eps  # tolerance
+
+_FLOAT_EPS = finfo(float).eps
+
+bracket_methods = [zeros.bisect, zeros.ridder, zeros.brentq, zeros.brenth,
+                   zeros.toms748]
+gradient_methods = [zeros.newton]
+all_methods = bracket_methods + gradient_methods
+
+# A few test functions used frequently:
+# # A simple quadratic, (x-1)^2 - 1
+def f1(x):
+    return x ** 2 - 2 * x - 1
+
+
+def f1_1(x):
+    return 2 * x - 2
+
+
+def f1_2(x):
+    return 2.0 + 0 * x
+
+
+def f1_and_p_and_pp(x):
+    return f1(x), f1_1(x), f1_2(x)
+
+
+# Simple transcendental function
+def f2(x):
+    return exp(x) - cos(x)
+
+
+def f2_1(x):
+    return exp(x) + sin(x)
+
+
+def f2_2(x):
+    return exp(x) + cos(x)
+
+
+# lru cached function
+@lru_cache
+def f_lrucached(x):
+    return x
+
+
+class TestScalarRootFinders:
+    # Basic tests for all scalar root finders
+
+    xtol = 4 * np.finfo(float).eps
+    rtol = 4 * np.finfo(float).eps
+
+    def _run_one_test(self, tc, method, sig_args_keys=None,
+                      sig_kwargs_keys=None, **kwargs):
+        method_args = []
+        for k in sig_args_keys or []:
+            if k not in tc:
+                # If a,b not present use x0, x1. Similarly for f and func
+                k = {'a': 'x0', 'b': 'x1', 'func': 'f'}.get(k, k)
+            method_args.append(tc[k])
+
+        method_kwargs = dict(**kwargs)
+        method_kwargs.update({'full_output': True, 'disp': False})
+        for k in sig_kwargs_keys or []:
+            method_kwargs[k] = tc[k]
+
+        root = tc.get('root')
+        func_args = tc.get('args', ())
+
+        try:
+            r, rr = method(*method_args, args=func_args, **method_kwargs)
+            return root, rr, tc
+        except Exception:
+            return root, zeros.RootResults(nan, -1, -1, zeros._EVALUEERR, method), tc
+
+    def run_tests(self, tests, method, name, known_fail=None, **kwargs):
+        r"""Run test-cases using the specified method and the supplied signature.
+
+        Extract the arguments for the method call from the test case
+        dictionary using the supplied keys for the method's signature."""
+        # The methods have one of two base signatures:
+        # (f, a, b, **kwargs)  # newton
+        # (func, x0, **kwargs)  # bisect/brentq/...
+
+        # FullArgSpec with args, varargs, varkw, defaults, ...
+        sig = _getfullargspec(method)
+        assert_(not sig.kwonlyargs)
+        nDefaults = len(sig.defaults)
+        nRequired = len(sig.args) - nDefaults
+        sig_args_keys = sig.args[:nRequired]
+        sig_kwargs_keys = []
+        if name in ['secant', 'newton', 'halley']:
+            if name in ['newton', 'halley']:
+                sig_kwargs_keys.append('fprime')
+                if name in ['halley']:
+                    sig_kwargs_keys.append('fprime2')
+            kwargs['tol'] = self.xtol
+        else:
+            kwargs['xtol'] = self.xtol
+            kwargs['rtol'] = self.rtol
+
+        results = [list(self._run_one_test(
+            tc, method, sig_args_keys=sig_args_keys,
+            sig_kwargs_keys=sig_kwargs_keys, **kwargs)) for tc in tests]
+        # results= [[true root, full output, tc], ...]
+
+        known_fail = known_fail or []
+        notcvgd = [elt for elt in results if not elt[1].converged]
+        notcvgd = [elt for elt in notcvgd if elt[-1]['ID'] not in known_fail]
+        notcvged_IDS = [elt[-1]['ID'] for elt in notcvgd]
+        assert_equal([len(notcvged_IDS), notcvged_IDS], [0, []])
+
+        # The usable xtol and rtol depend on the test
+        tols = {'xtol': self.xtol, 'rtol': self.rtol}
+        tols.update(**kwargs)
+        rtol = tols['rtol']
+        atol = tols.get('tol', tols['xtol'])
+
+        cvgd = [elt for elt in results if elt[1].converged]
+        approx = [elt[1].root for elt in cvgd]
+        correct = [elt[0] for elt in cvgd]
+        # See if the root matches the reference value
+        notclose = [[a] + elt for a, c, elt in zip(approx, correct, cvgd) if
+                    not isclose(a, c, rtol=rtol, atol=atol)
+                    and elt[-1]['ID'] not in known_fail]
+        # If not, evaluate the function and see if is 0 at the purported root
+        fvs = [tc['f'](aroot, *tc.get('args', tuple()))
+               for aroot, c, fullout, tc in notclose]
+        notclose = [[fv] + elt for fv, elt in zip(fvs, notclose) if fv != 0]
+        assert_equal([notclose, len(notclose)], [[], 0])
+        method_from_result = [result[1].method for result in results]
+        expected_method = [name for _ in results]
+        assert_equal(method_from_result, expected_method)
+
+    def run_collection(self, collection, method, name, smoothness=None,
+                       known_fail=None, **kwargs):
+        r"""Run a collection of tests using the specified method.
+
+        The name is used to determine some optional arguments."""
+        tests = get_tests(collection, smoothness=smoothness)
+        self.run_tests(tests, method, name, known_fail=known_fail, **kwargs)
+
+
+class TestBracketMethods(TestScalarRootFinders):
+    @pytest.mark.parametrize('method', bracket_methods)
+    @pytest.mark.parametrize('function', tstutils_functions)
+    def test_basic_root_scalar(self, method, function):
+        # Tests bracketing root finders called via `root_scalar` on a small
+        # set of simple problems, each of which has a root at `x=1`. Checks for
+        # converged status and that the root was found.
+        a, b = .5, sqrt(3)
+
+        r = root_scalar(function, method=method.__name__, bracket=[a, b], x0=a,
+                        xtol=self.xtol, rtol=self.rtol)
+        assert r.converged
+        assert_allclose(r.root, 1.0, atol=self.xtol, rtol=self.rtol)
+        assert r.method == method.__name__
+
+    @pytest.mark.parametrize('method', bracket_methods)
+    @pytest.mark.parametrize('function', tstutils_functions)
+    def test_basic_individual(self, method, function):
+        # Tests individual bracketing root finders on a small set of simple
+        # problems, each of which has a root at `x=1`. Checks for converged
+        # status and that the root was found.
+        a, b = .5, sqrt(3)
+        root, r = method(function, a, b, xtol=self.xtol, rtol=self.rtol,
+                         full_output=True)
+
+        assert r.converged
+        assert_allclose(root, 1.0, atol=self.xtol, rtol=self.rtol)
+
+    @pytest.mark.parametrize('method', bracket_methods)
+    @pytest.mark.parametrize('function', tstutils_functions)
+    def test_bracket_is_array(self, method, function):
+        # Test bracketing root finders called via `root_scalar` on a small set
+        # of simple problems, each of which has a root at `x=1`. Check that
+        # passing `bracket` as a `ndarray` is accepted and leads to finding the
+        # correct root.
+        a, b = .5, sqrt(3)
+        r = root_scalar(function, method=method.__name__,
+                        bracket=np.array([a, b]), x0=a, xtol=self.xtol,
+                        rtol=self.rtol)
+        assert r.converged
+        assert_allclose(r.root, 1.0, atol=self.xtol, rtol=self.rtol)
+        assert r.method == method.__name__
+
+    @pytest.mark.parametrize('method', bracket_methods)
+    def test_aps_collection(self, method):
+        self.run_collection('aps', method, method.__name__, smoothness=1)
+
+    @pytest.mark.parametrize('method', [zeros.bisect, zeros.ridder,
+                                        zeros.toms748])
+    def test_chandrupatla_collection(self, method):
+        known_fail = {'fun7.4'} if method == zeros.ridder else {}
+        self.run_collection('chandrupatla', method, method.__name__,
+                            known_fail=known_fail)
+
+    @pytest.mark.parametrize('method', bracket_methods)
+    def test_lru_cached_individual(self, method):
+        # check that https://github.com/scipy/scipy/issues/10846 is fixed
+        # (`root_scalar` failed when passed a function that was `@lru_cache`d)
+        a, b = -1, 1
+        root, r = method(f_lrucached, a, b, full_output=True)
+        assert r.converged
+        assert_allclose(root, 0)
+
+
+class TestNewton(TestScalarRootFinders):
+    def test_newton_collections(self):
+        known_fail = ['aps.13.00']
+        known_fail += ['aps.12.05', 'aps.12.17']  # fails under Windows Py27
+        for collection in ['aps', 'complex']:
+            self.run_collection(collection, zeros.newton, 'newton',
+                                smoothness=2, known_fail=known_fail)
+
+    def test_halley_collections(self):
+        known_fail = ['aps.12.06', 'aps.12.07', 'aps.12.08', 'aps.12.09',
+                      'aps.12.10', 'aps.12.11', 'aps.12.12', 'aps.12.13',
+                      'aps.12.14', 'aps.12.15', 'aps.12.16', 'aps.12.17',
+                      'aps.12.18', 'aps.13.00']
+        for collection in ['aps', 'complex']:
+            self.run_collection(collection, zeros.newton, 'halley',
+                                smoothness=2, known_fail=known_fail)
+
+    def test_newton(self):
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            x = zeros.newton(f, 3, tol=1e-6)
+            assert_allclose(f(x), 0, atol=1e-6)
+            x = zeros.newton(f, 3, x1=5, tol=1e-6)  # secant, x0 and x1
+            assert_allclose(f(x), 0, atol=1e-6)
+            x = zeros.newton(f, 3, fprime=f_1, tol=1e-6)   # newton
+            assert_allclose(f(x), 0, atol=1e-6)
+            x = zeros.newton(f, 3, fprime=f_1, fprime2=f_2, tol=1e-6)  # halley
+            assert_allclose(f(x), 0, atol=1e-6)
+
+    def test_newton_by_name(self):
+        r"""Invoke newton through root_scalar()"""
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            r = root_scalar(f, method='newton', x0=3, fprime=f_1, xtol=1e-6)
+            assert_allclose(f(r.root), 0, atol=1e-6)
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            r = root_scalar(f, method='newton', x0=3, xtol=1e-6)  # without f'
+            assert_allclose(f(r.root), 0, atol=1e-6)
+
+    def test_secant_by_name(self):
+        r"""Invoke secant through root_scalar()"""
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            r = root_scalar(f, method='secant', x0=3, x1=2, xtol=1e-6)
+            assert_allclose(f(r.root), 0, atol=1e-6)
+            r = root_scalar(f, method='secant', x0=3, x1=5, xtol=1e-6)
+            assert_allclose(f(r.root), 0, atol=1e-6)
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            r = root_scalar(f, method='secant', x0=3, xtol=1e-6)  # without x1
+            assert_allclose(f(r.root), 0, atol=1e-6)
+
+    def test_halley_by_name(self):
+        r"""Invoke halley through root_scalar()"""
+        for f, f_1, f_2 in [(f1, f1_1, f1_2), (f2, f2_1, f2_2)]:
+            r = root_scalar(f, method='halley', x0=3,
+                            fprime=f_1, fprime2=f_2, xtol=1e-6)
+            assert_allclose(f(r.root), 0, atol=1e-6)
+
+    def test_root_scalar_fail(self):
+        message = 'fprime2 must be specified for halley'
+        with pytest.raises(ValueError, match=message):
+            root_scalar(f1, method='halley', fprime=f1_1, x0=3, xtol=1e-6)  # no fprime2
+        message = 'fprime must be specified for halley'
+        with pytest.raises(ValueError, match=message):
+            root_scalar(f1, method='halley', fprime2=f1_2, x0=3, xtol=1e-6)  # no fprime
+
+    def test_array_newton(self):
+        """test newton with array"""
+
+        def f1(x, *a):
+            b = a[0] + x * a[3]
+            return a[1] - a[2] * (np.exp(b / a[5]) - 1.0) - b / a[4] - x
+
+        def f1_1(x, *a):
+            b = a[3] / a[5]
+            return -a[2] * np.exp(a[0] / a[5] + x * b) * b - a[3] / a[4] - 1
+
+        def f1_2(x, *a):
+            b = a[3] / a[5]
+            return -a[2] * np.exp(a[0] / a[5] + x * b) * b**2
+
+        a0 = np.array([
+            5.32725221, 5.48673747, 5.49539973,
+            5.36387202, 4.80237316, 1.43764452,
+            5.23063958, 5.46094772, 5.50512718,
+            5.42046290
+        ])
+        a1 = (np.sin(range(10)) + 1.0) * 7.0
+        args = (a0, a1, 1e-09, 0.004, 10, 0.27456)
+        x0 = [7.0] * 10
+        x = zeros.newton(f1, x0, f1_1, args)
+        x_expected = (
+            6.17264965, 11.7702805, 12.2219954,
+            7.11017681, 1.18151293, 0.143707955,
+            4.31928228, 10.5419107, 12.7552490,
+            8.91225749
+        )
+        assert_allclose(x, x_expected)
+        # test halley's
+        x = zeros.newton(f1, x0, f1_1, args, fprime2=f1_2)
+        assert_allclose(x, x_expected)
+        # test secant
+        x = zeros.newton(f1, x0, args=args)
+        assert_allclose(x, x_expected)
+
+    def test_array_newton_complex(self):
+        def f(x):
+            return x + 1+1j
+
+        def fprime(x):
+            return 1.0
+
+        t = np.full(4, 1j)
+        x = zeros.newton(f, t, fprime=fprime)
+        assert_allclose(f(x), 0.)
+
+        # should work even if x0 is not complex
+        t = np.ones(4)
+        x = zeros.newton(f, t, fprime=fprime)
+        assert_allclose(f(x), 0.)
+
+        x = zeros.newton(f, t)
+        assert_allclose(f(x), 0.)
+
+    def test_array_secant_active_zero_der(self):
+        """test secant doesn't continue to iterate zero derivatives"""
+        x = zeros.newton(lambda x, *a: x*x - a[0], x0=[4.123, 5],
+                         args=[np.array([17, 25])])
+        assert_allclose(x, (4.123105625617661, 5.0))
+
+    def test_array_newton_integers(self):
+        # test secant with float
+        x = zeros.newton(lambda y, z: z - y ** 2, [4.0] * 2,
+                         args=([15.0, 17.0],))
+        assert_allclose(x, (3.872983346207417, 4.123105625617661))
+        # test integer becomes float
+        x = zeros.newton(lambda y, z: z - y ** 2, [4] * 2, args=([15, 17],))
+        assert_allclose(x, (3.872983346207417, 4.123105625617661))
+
+    @pytest.mark.thread_unsafe
+    def test_array_newton_zero_der_failures(self):
+        # test derivative zero warning
+        assert_warns(RuntimeWarning, zeros.newton,
+                     lambda y: y**2 - 2, [0., 0.], lambda y: 2 * y)
+        # test failures and zero_der
+        with pytest.warns(RuntimeWarning):
+            results = zeros.newton(lambda y: y**2 - 2, [0., 0.],
+                                   lambda y: 2*y, full_output=True)
+            assert_allclose(results.root, 0)
+            assert results.zero_der.all()
+            assert not results.converged.any()
+
+    def test_newton_combined(self):
+        def f1(x):
+            return x ** 2 - 2 * x - 1
+        def f1_1(x):
+            return 2 * x - 2
+        def f1_2(x):
+            return 2.0 + 0 * x
+
+        def f1_and_p_and_pp(x):
+            return x**2 - 2*x-1, 2*x-2, 2.0
+
+        sol0 = root_scalar(f1, method='newton', x0=3, fprime=f1_1)
+        sol = root_scalar(f1_and_p_and_pp, method='newton', x0=3, fprime=True)
+        assert_allclose(sol0.root, sol.root, atol=1e-8)
+        assert_equal(2*sol.function_calls, sol0.function_calls)
+
+        sol0 = root_scalar(f1, method='halley', x0=3, fprime=f1_1, fprime2=f1_2)
+        sol = root_scalar(f1_and_p_and_pp, method='halley', x0=3, fprime2=True)
+        assert_allclose(sol0.root, sol.root, atol=1e-8)
+        assert_equal(3*sol.function_calls, sol0.function_calls)
+
+    def test_newton_full_output(self, capsys):
+        # Test the full_output capability, both when converging and not.
+        # Use simple polynomials, to avoid hitting platform dependencies
+        # (e.g., exp & trig) in number of iterations
+
+        x0 = 3
+        expected_counts = [(6, 7), (5, 10), (3, 9)]
+
+        for derivs in range(3):
+            kwargs = {'tol': 1e-6, 'full_output': True, }
+            for k, v in [['fprime', f1_1], ['fprime2', f1_2]][:derivs]:
+                kwargs[k] = v
+
+            x, r = zeros.newton(f1, x0, disp=False, **kwargs)
+            assert_(r.converged)
+            assert_equal(x, r.root)
+            assert_equal((r.iterations, r.function_calls), expected_counts[derivs])
+            if derivs == 0:
+                assert r.function_calls <= r.iterations + 1
+            else:
+                assert_equal(r.function_calls, (derivs + 1) * r.iterations)
+
+            # Now repeat, allowing one fewer iteration to force convergence failure
+            iters = r.iterations - 1
+            x, r = zeros.newton(f1, x0, maxiter=iters, disp=False, **kwargs)
+            assert_(not r.converged)
+            assert_equal(x, r.root)
+            assert_equal(r.iterations, iters)
+
+            if derivs == 1:
+                # Check that the correct Exception is raised and
+                # validate the start of the message.
+                msg = 'Failed to converge after %d iterations, value is .*' % (iters)
+                with pytest.raises(RuntimeError, match=msg):
+                    x, r = zeros.newton(f1, x0, maxiter=iters, disp=True, **kwargs)
+
+    @pytest.mark.thread_unsafe
+    def test_deriv_zero_warning(self):
+        def func(x):
+            return x ** 2 - 2.0
+        def dfunc(x):
+            return 2 * x
+        assert_warns(RuntimeWarning, zeros.newton, func, 0.0, dfunc, disp=False)
+        with pytest.raises(RuntimeError, match='Derivative was zero'):
+            zeros.newton(func, 0.0, dfunc)
+
+    def test_newton_does_not_modify_x0(self):
+        # https://github.com/scipy/scipy/issues/9964
+        x0 = np.array([0.1, 3])
+        x0_copy = x0.copy()  # Copy to test for equality.
+        newton(np.sin, x0, np.cos)
+        assert_array_equal(x0, x0_copy)
+
+    def test_gh17570_defaults(self):
+        # Previously, when fprime was not specified, root_scalar would default
+        # to secant. When x1 was not specified, secant failed.
+        # Check that without fprime, the default is secant if x1 is specified
+        # and newton otherwise.
+        # Also confirm that `x` is always a scalar (gh-21148)
+        def f(x):
+            assert np.isscalar(x)
+            return f1(x)
+
+        res_newton_default = root_scalar(f, method='newton', x0=3, xtol=1e-6)
+        res_secant_default = root_scalar(f, method='secant', x0=3, x1=2,
+                                         xtol=1e-6)
+        # `newton` uses the secant method when `x1` and `x2` are specified
+        res_secant = newton(f, x0=3, x1=2, tol=1e-6, full_output=True)[1]
+
+        # all three found a root
+        assert_allclose(f(res_newton_default.root), 0, atol=1e-6)
+        assert res_newton_default.root.shape == tuple()
+        assert_allclose(f(res_secant_default.root), 0, atol=1e-6)
+        assert res_secant_default.root.shape == tuple()
+        assert_allclose(f(res_secant.root), 0, atol=1e-6)
+        assert res_secant.root.shape == tuple()
+
+        # Defaults are correct
+        assert (res_secant_default.root
+                == res_secant.root
+                != res_newton_default.iterations)
+        assert (res_secant_default.iterations
+                == res_secant_default.function_calls - 1  # true for secant
+                == res_secant.iterations
+                != res_newton_default.iterations
+                == res_newton_default.function_calls/2)  # newton 2-point diff
+
+    @pytest.mark.parametrize('kwargs', [dict(), {'method': 'newton'}])
+    def test_args_gh19090(self, kwargs):
+        def f(x, a, b):
+            assert a == 3
+            assert b == 1
+            return (x ** a - b)
+
+        res = optimize.root_scalar(f, x0=3, args=(3, 1), **kwargs)
+        assert res.converged
+        assert_allclose(res.root, 1)
+
+    @pytest.mark.parametrize('method', ['secant', 'newton'])
+    def test_int_x0_gh19280(self, method):
+        # Originally, `newton` ensured that only floats were passed to the
+        # callable. This was inadvertently changed by gh-17669. Check that
+        # it has been changed back.
+        def f(x):
+            # an integer raised to a negative integer power would fail
+            return x**-2 - 2
+
+        res = optimize.root_scalar(f, x0=1, method=method)
+        assert res.converged
+        assert_allclose(abs(res.root), 2**-0.5)
+        assert res.root.dtype == np.dtype(np.float64)
+
+
+def test_gh_5555():
+    root = 0.1
+
+    def f(x):
+        return x - root
+
+    methods = [zeros.bisect, zeros.ridder]
+    xtol = rtol = TOL
+    for method in methods:
+        res = method(f, -1e8, 1e7, xtol=xtol, rtol=rtol)
+        assert_allclose(root, res, atol=xtol, rtol=rtol,
+                        err_msg=f'method {method.__name__}')
+
+
+def test_gh_5557():
+    # Show that without the changes in 5557 brentq and brenth might
+    # only achieve a tolerance of 2*(xtol + rtol*|res|).
+
+    # f linearly interpolates (0, -0.1), (0.5, -0.1), and (1,
+    # 0.4). The important parts are that |f(0)| < |f(1)| (so that
+    # brent takes 0 as the initial guess), |f(0)| < atol (so that
+    # brent accepts 0 as the root), and that the exact root of f lies
+    # more than atol away from 0 (so that brent doesn't achieve the
+    # desired tolerance).
+    def f(x):
+        if x < 0.5:
+            return -0.1
+        else:
+            return x - 0.6
+
+    atol = 0.51
+    rtol = 4 * _FLOAT_EPS
+    methods = [zeros.brentq, zeros.brenth]
+    for method in methods:
+        res = method(f, 0, 1, xtol=atol, rtol=rtol)
+        assert_allclose(0.6, res, atol=atol, rtol=rtol)
+
+
+def test_brent_underflow_in_root_bracketing():
+    # Testing if an interval [a,b] brackets a zero of a function
+    # by checking f(a)*f(b) < 0 is not reliable when the product
+    # underflows/overflows. (reported in issue# 13737)
+
+    underflow_scenario = (-450.0, -350.0, -400.0)
+    overflow_scenario = (350.0, 450.0, 400.0)
+
+    for a, b, root in [underflow_scenario, overflow_scenario]:
+        c = np.exp(root)
+        for method in [zeros.brenth, zeros.brentq]:
+            res = method(lambda x: np.exp(x)-c, a, b)
+            assert_allclose(root, res)
+
+
+class TestRootResults:
+    r = zeros.RootResults(root=1.0, iterations=44, function_calls=46, flag=0,
+                          method="newton")
+
+    def test_repr(self):
+        expected_repr = ("      converged: True\n           flag: converged"
+                         "\n function_calls: 46\n     iterations: 44\n"
+                         "           root: 1.0\n         method: newton")
+        assert_equal(repr(self.r), expected_repr)
+
+    def test_type(self):
+        assert isinstance(self.r, OptimizeResult)
+
+
+def test_complex_halley():
+    """Test Halley's works with complex roots"""
+    def f(x, *a):
+        return a[0] * x**2 + a[1] * x + a[2]
+
+    def f_1(x, *a):
+        return 2 * a[0] * x + a[1]
+
+    def f_2(x, *a):
+        retval = 2 * a[0]
+        try:
+            size = len(x)
+        except TypeError:
+            return retval
+        else:
+            return [retval] * size
+
+    z = complex(1.0, 2.0)
+    coeffs = (2.0, 3.0, 4.0)
+    y = zeros.newton(f, z, args=coeffs, fprime=f_1, fprime2=f_2, tol=1e-6)
+    # (-0.75000000000000078+1.1989578808281789j)
+    assert_allclose(f(y, *coeffs), 0, atol=1e-6)
+    z = [z] * 10
+    coeffs = (2.0, 3.0, 4.0)
+    y = zeros.newton(f, z, args=coeffs, fprime=f_1, fprime2=f_2, tol=1e-6)
+    assert_allclose(f(y, *coeffs), 0, atol=1e-6)
+
+
+@pytest.mark.thread_unsafe
+def test_zero_der_nz_dp(capsys):
+    """Test secant method with a non-zero dp, but an infinite newton step"""
+    # pick a symmetrical functions and choose a point on the side that with dx
+    # makes a secant that is a flat line with zero slope, EG: f = (x - 100)**2,
+    # which has a root at x = 100 and is symmetrical around the line x = 100
+    # we have to pick a really big number so that it is consistently true
+    # now find a point on each side so that the secant has a zero slope
+    dx = np.finfo(float).eps ** 0.33
+    # 100 - p0 = p1 - 100 = p0 * (1 + dx) + dx - 100
+    # -> 200 = p0 * (2 + dx) + dx
+    p0 = (200.0 - dx) / (2.0 + dx)
+    with suppress_warnings() as sup:
+        sup.filter(RuntimeWarning, "RMS of")
+        x = zeros.newton(lambda y: (y - 100.0)**2, x0=[p0] * 10)
+    assert_allclose(x, [100] * 10)
+    # test scalar cases too
+    p0 = (2.0 - 1e-4) / (2.0 + 1e-4)
+    with suppress_warnings() as sup:
+        sup.filter(RuntimeWarning, "Tolerance of")
+        x = zeros.newton(lambda y: (y - 1.0) ** 2, x0=p0, disp=False)
+    assert_allclose(x, 1)
+    with pytest.raises(RuntimeError, match='Tolerance of'):
+        x = zeros.newton(lambda y: (y - 1.0) ** 2, x0=p0, disp=True)
+    p0 = (-2.0 + 1e-4) / (2.0 + 1e-4)
+    with suppress_warnings() as sup:
+        sup.filter(RuntimeWarning, "Tolerance of")
+        x = zeros.newton(lambda y: (y + 1.0) ** 2, x0=p0, disp=False)
+    assert_allclose(x, -1)
+    with pytest.raises(RuntimeError, match='Tolerance of'):
+        x = zeros.newton(lambda y: (y + 1.0) ** 2, x0=p0, disp=True)
+
+
+@pytest.mark.thread_unsafe
+def test_array_newton_failures():
+    """Test that array newton fails as expected"""
+    # p = 0.68  # [MPa]
+    # dp = -0.068 * 1e6  # [Pa]
+    # T = 323  # [K]
+    diameter = 0.10  # [m]
+    # L = 100  # [m]
+    roughness = 0.00015  # [m]
+    rho = 988.1  # [kg/m**3]
+    mu = 5.4790e-04  # [Pa*s]
+    u = 2.488  # [m/s]
+    reynolds_number = rho * u * diameter / mu  # Reynolds number
+
+    def colebrook_eqn(darcy_friction, re, dia):
+        return (1 / np.sqrt(darcy_friction) +
+                2 * np.log10(roughness / 3.7 / dia +
+                             2.51 / re / np.sqrt(darcy_friction)))
+
+    # only some failures
+    with pytest.warns(RuntimeWarning):
+        result = zeros.newton(
+            colebrook_eqn, x0=[0.01, 0.2, 0.02223, 0.3], maxiter=2,
+            args=[reynolds_number, diameter], full_output=True
+        )
+        assert not result.converged.all()
+    # they all fail
+    with pytest.raises(RuntimeError):
+        result = zeros.newton(
+            colebrook_eqn, x0=[0.01] * 2, maxiter=2,
+            args=[reynolds_number, diameter], full_output=True
+        )
+
+
+# this test should **not** raise a RuntimeWarning
+def test_gh8904_zeroder_at_root_fails():
+    """Test that Newton or Halley don't warn if zero derivative at root"""
+
+    # a function that has a zero derivative at it's root
+    def f_zeroder_root(x):
+        return x**3 - x**2
+
+    # should work with secant
+    r = zeros.newton(f_zeroder_root, x0=0)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    # test again with array
+    r = zeros.newton(f_zeroder_root, x0=[0]*10)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+
+    # 1st derivative
+    def fder(x):
+        return 3 * x**2 - 2 * x
+
+    # 2nd derivative
+    def fder2(x):
+        return 6*x - 2
+
+    # should work with newton and halley
+    r = zeros.newton(f_zeroder_root, x0=0, fprime=fder)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    r = zeros.newton(f_zeroder_root, x0=0, fprime=fder,
+                     fprime2=fder2)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    # test again with array
+    r = zeros.newton(f_zeroder_root, x0=[0]*10, fprime=fder)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    r = zeros.newton(f_zeroder_root, x0=[0]*10, fprime=fder,
+                     fprime2=fder2)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+
+    # also test that if a root is found we do not raise RuntimeWarning even if
+    # the derivative is zero, EG: at x = 0.5, then fval = -0.125 and
+    # fder = -0.25 so the next guess is 0.5 - (-0.125/-0.5) = 0 which is the
+    # root, but if the solver continued with that guess, then it will calculate
+    # a zero derivative, so it should return the root w/o RuntimeWarning
+    r = zeros.newton(f_zeroder_root, x0=0.5, fprime=fder)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    # test again with array
+    r = zeros.newton(f_zeroder_root, x0=[0.5]*10, fprime=fder)
+    assert_allclose(r, 0, atol=zeros._xtol, rtol=zeros._rtol)
+    # doesn't apply to halley
+
+
+def test_gh_8881():
+    r"""Test that Halley's method realizes that the 2nd order adjustment
+    is too big and drops off to the 1st order adjustment."""
+    n = 9
+
+    def f(x):
+        return power(x, 1.0/n) - power(n, 1.0/n)
+
+    def fp(x):
+        return power(x, (1.0-n)/n)/n
+
+    def fpp(x):
+        return power(x, (1.0-2*n)/n) * (1.0/n) * (1.0-n)/n
+
+    x0 = 0.1
+    # The root is at x=9.
+    # The function has positive slope, x0 < root.
+    # Newton succeeds in 8 iterations
+    rt, r = newton(f, x0, fprime=fp, full_output=True)
+    assert r.converged
+    # Before the Issue 8881/PR 8882, halley would send x in the wrong direction.
+    # Check that it now succeeds.
+    rt, r = newton(f, x0, fprime=fp, fprime2=fpp, full_output=True)
+    assert r.converged
+
+
+def test_gh_9608_preserve_array_shape():
+    """
+    Test that shape is preserved for array inputs even if fprime or fprime2 is
+    scalar
+    """
+    def f(x):
+        return x**2
+
+    def fp(x):
+        return 2 * x
+
+    def fpp(x):
+        return 2
+
+    x0 = np.array([-2], dtype=np.float32)
+    rt, r = newton(f, x0, fprime=fp, fprime2=fpp, full_output=True)
+    assert r.converged
+
+    x0_array = np.array([-2, -3], dtype=np.float32)
+    # This next invocation should fail
+    with pytest.raises(IndexError):
+        result = zeros.newton(
+            f, x0_array, fprime=fp, fprime2=fpp, full_output=True
+        )
+
+    def fpp_array(x):
+        return np.full(np.shape(x), 2, dtype=np.float32)
+
+    result = zeros.newton(
+        f, x0_array, fprime=fp, fprime2=fpp_array, full_output=True
+    )
+    assert result.converged.all()
+
+
+@pytest.mark.parametrize(
+    "maximum_iterations,flag_expected",
+    [(10, zeros.CONVERR), (100, zeros.CONVERGED)])
+def test_gh9254_flag_if_maxiter_exceeded(maximum_iterations, flag_expected):
+    """
+    Test that if the maximum iterations is exceeded that the flag is not
+    converged.
+    """
+    result = zeros.brentq(
+        lambda x: ((1.2*x - 2.3)*x + 3.4)*x - 4.5,
+        -30, 30, (), 1e-6, 1e-6, maximum_iterations,
+        full_output=True, disp=False)
+    assert result[1].flag == flag_expected
+    if flag_expected == zeros.CONVERR:
+        # didn't converge because exceeded maximum iterations
+        assert result[1].iterations == maximum_iterations
+    elif flag_expected == zeros.CONVERGED:
+        # converged before maximum iterations
+        assert result[1].iterations < maximum_iterations
+
+
+@pytest.mark.thread_unsafe
+def test_gh9551_raise_error_if_disp_true():
+    """Test that if disp is true then zero derivative raises RuntimeError"""
+
+    def f(x):
+        return x*x + 1
+
+    def f_p(x):
+        return 2*x
+
+    assert_warns(RuntimeWarning, zeros.newton, f, 1.0, f_p, disp=False)
+    with pytest.raises(
+            RuntimeError,
+            match=r'^Derivative was zero\. Failed to converge after \d+ iterations, '
+                  r'value is [+-]?\d*\.\d+\.$'):
+        zeros.newton(f, 1.0, f_p)
+    root = zeros.newton(f, complex(10.0, 10.0), f_p)
+    assert_allclose(root, complex(0.0, 1.0))
+
+
+@pytest.mark.parametrize('solver_name',
+                         ['brentq', 'brenth', 'bisect', 'ridder', 'toms748'])
+def test_gh3089_8394(solver_name):
+    # gh-3089 and gh-8394 reported that bracketing solvers returned incorrect
+    # results when they encountered NaNs. Check that this is resolved.
+    def f(x):
+        return np.nan
+
+    solver = getattr(zeros, solver_name)
+    with pytest.raises(ValueError, match="The function value at x..."):
+        solver(f, 0, 1)
+
+
+@pytest.mark.parametrize('method',
+                         ['brentq', 'brenth', 'bisect', 'ridder', 'toms748'])
+def test_gh18171(method):
+    # gh-3089 and gh-8394 reported that bracketing solvers returned incorrect
+    # results when they encountered NaNs. Check that `root_scalar` returns
+    # normally but indicates that convergence was unsuccessful. See gh-18171.
+    def f(x):
+        f._count += 1
+        return np.nan
+    f._count = 0
+
+    res = root_scalar(f, bracket=(0, 1), method=method)
+    assert res.converged is False
+    assert res.flag.startswith("The function value at x")
+    assert res.function_calls == f._count
+    assert str(res.root) in res.flag
+
+
+@pytest.mark.parametrize('solver_name',
+                         ['brentq', 'brenth', 'bisect', 'ridder', 'toms748'])
+@pytest.mark.parametrize('rs_interface', [True, False])
+def test_function_calls(solver_name, rs_interface):
+    # There do not appear to be checks that the bracketing solvers report the
+    # correct number of function evaluations. Check that this is the case.
+    solver = ((lambda f, a, b, **kwargs: root_scalar(f, bracket=(a, b)))
+              if rs_interface else getattr(zeros, solver_name))
+
+    def f(x):
+        f.calls += 1
+        return x**2 - 1
+    f.calls = 0
+
+    res = solver(f, 0, 10, full_output=True)
+
+    if rs_interface:
+        assert res.function_calls == f.calls
+    else:
+        assert res[1].function_calls == f.calls
+
+
+@pytest.mark.thread_unsafe
+def test_gh_14486_converged_false():
+    """Test that zero slope with secant method results in a converged=False"""
+    def lhs(x):
+        return x * np.exp(-x*x) - 0.07
+
+    with pytest.warns(RuntimeWarning, match='Tolerance of'):
+        res = root_scalar(lhs, method='secant', x0=-0.15, x1=1.0)
+    assert not res.converged
+    assert res.flag == 'convergence error'
+
+    with pytest.warns(RuntimeWarning, match='Tolerance of'):
+        res = newton(lhs, x0=-0.15, x1=1.0, disp=False, full_output=True)[1]
+    assert not res.converged
+    assert res.flag == 'convergence error'
+
+
+@pytest.mark.parametrize('solver_name',
+                         ['brentq', 'brenth', 'bisect', 'ridder', 'toms748'])
+@pytest.mark.parametrize('rs_interface', [True, False])
+def test_gh5584(solver_name, rs_interface):
+    # gh-5584 reported that an underflow can cause sign checks in the algorithm
+    # to fail. Check that this is resolved.
+    solver = ((lambda f, a, b, **kwargs: root_scalar(f, bracket=(a, b)))
+              if rs_interface else getattr(zeros, solver_name))
+
+    def f(x):
+        return 1e-200*x
+
+    # Report failure when signs are the same
+    with pytest.raises(ValueError, match='...must have different signs'):
+        solver(f, -0.5, -0.4, full_output=True)
+
+    # Solve successfully when signs are different
+    res = solver(f, -0.5, 0.4, full_output=True)
+    res = res if rs_interface else res[1]
+    assert res.converged
+    assert_allclose(res.root, 0, atol=1e-8)
+
+    # Solve successfully when one side is negative zero
+    res = solver(f, -0.5, float('-0.0'), full_output=True)
+    res = res if rs_interface else res[1]
+    assert res.converged
+    assert_allclose(res.root, 0, atol=1e-8)
+
+
+def test_gh13407():
+    # gh-13407 reported that the message produced by `scipy.optimize.toms748`
+    # when `rtol < eps` is incorrect, and also that toms748 is unusual in
+    # accepting `rtol` as low as eps while other solvers raise at 4*eps. Check
+    # that the error message has been corrected and that `rtol=eps` can produce
+    # a lower function value than `rtol=4*eps`.
+    def f(x):
+        return x**3 - 2*x - 5
+
+    xtol = 1e-300
+    eps = np.finfo(float).eps
+    x1 = zeros.toms748(f, 1e-10, 1e10, xtol=xtol, rtol=1*eps)
+    f1 = f(x1)
+    x4 = zeros.toms748(f, 1e-10, 1e10, xtol=xtol, rtol=4*eps)
+    f4 = f(x4)
+    assert f1 < f4
+
+    # using old-style syntax to get exactly the same message
+    message = fr"rtol too small \({eps/2:g} < {eps:g}\)"
+    with pytest.raises(ValueError, match=message):
+        zeros.toms748(f, 1e-10, 1e10, xtol=xtol, rtol=eps/2)
+
+
+def test_newton_complex_gh10103():
+    # gh-10103 reported a problem when `newton` is pass a Python complex x0,
+    # no `fprime` (secant method), and no `x1` (`x1` must be constructed).
+    # Check that this is resolved.
+    def f(z):
+        return z - 1
+    res = newton(f, 1+1j)
+    assert_allclose(res, 1, atol=1e-12)
+
+    res = root_scalar(f, x0=1+1j, x1=2+1.5j, method='secant')
+    assert_allclose(res.root, 1, atol=1e-12)
+
+
+@pytest.mark.parametrize('method', all_methods)
+def test_maxiter_int_check_gh10236(method):
+    # gh-10236 reported that the error message when `maxiter` is not an integer
+    # was difficult to interpret. Check that this was resolved (by gh-10907).
+    message = "'float' object cannot be interpreted as an integer"
+    with pytest.raises(TypeError, match=message):
+        method(f1, 0.0, 1.0, maxiter=72.45)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tnc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tnc.py
new file mode 100644
index 0000000000000000000000000000000000000000..e0f66058bbcc501eb1303eb3075cb55705b93192
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/tnc.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'OptimizeResult',
+    'fmin_tnc',
+    'zeros',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="tnc",
+                                   private_modules=["_tnc"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/zeros.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/zeros.py
new file mode 100644
index 0000000000000000000000000000000000000000..907d49d37fc1e7476e81a25dbbc0d3910cbbe004
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/optimize/zeros.py
@@ -0,0 +1,26 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.optimize` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'RootResults',
+    'bisect',
+    'brenth',
+    'brentq',
+    'newton',
+    'ridder',
+    'toms748',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="optimize", module="zeros",
+                                   private_modules=["_zeros_py"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..18fe7e011db102f57a8263d1db343818715aeeee
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/__init__.py
@@ -0,0 +1,331 @@
+"""
+===================================
+Sparse arrays (:mod:`scipy.sparse`)
+===================================
+
+.. currentmodule:: scipy.sparse
+
+.. toctree::
+   :hidden:
+
+   sparse.csgraph
+   sparse.linalg
+   sparse.migration_to_sparray
+
+SciPy 2-D sparse array package for numeric data.
+
+.. note::
+
+   This package is switching to an array interface, compatible with
+   NumPy arrays, from the older matrix interface.  We recommend that
+   you use the array objects (`bsr_array`, `coo_array`, etc.) for
+   all new work.
+
+   When using the array interface, please note that:
+
+   - ``x * y`` no longer performs matrix multiplication, but
+     element-wise multiplication (just like with NumPy arrays).  To
+     make code work with both arrays and matrices, use ``x @ y`` for
+     matrix multiplication.
+   - Operations such as ``sum``, that used to produce dense matrices, now
+     produce arrays, whose multiplication behavior differs similarly.
+   - Sparse arrays use array style *slicing* operations, returning scalars,
+     1D, or 2D sparse arrays. If you need 2D results, use an appropriate index.
+     E.g. ``A[:, i, None]`` or ``A[:, [i]]``.
+
+   The construction utilities (`eye`, `kron`, `random`, `diags`, etc.)
+   have appropriate replacements (see :ref:`sparse-construction-functions`).
+
+   For more information see
+   :ref:`Migration from spmatrix to sparray `.
+
+
+Submodules
+==========
+
+.. autosummary::
+
+   csgraph - Compressed sparse graph routines
+   linalg - Sparse linear algebra routines
+
+
+Sparse array classes
+====================
+
+.. autosummary::
+   :toctree: generated/
+
+   bsr_array - Block Sparse Row array
+   coo_array - A sparse array in COOrdinate format
+   csc_array - Compressed Sparse Column array
+   csr_array - Compressed Sparse Row array
+   dia_array - Sparse array with DIAgonal storage
+   dok_array - Dictionary Of Keys based sparse array
+   lil_array - Row-based list of lists sparse array
+   sparray - Sparse array base class
+
+.. _sparse-construction-functions:
+
+Building sparse arrays
+----------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   diags_array - Return a sparse array from diagonals
+   eye_array - Sparse MxN array whose k-th diagonal is all ones
+   random_array - Random values in a given shape array
+   block_array - Build a sparse array from sub-blocks
+
+.. _combining-arrays:
+
+Combining arrays
+----------------
+
+.. autosummary::
+   :toctree: generated/
+
+   kron - Kronecker product of two sparse arrays
+   kronsum - Kronecker sum of sparse arrays
+   block_diag - Build a block diagonal sparse array
+   tril - Lower triangular portion of a sparse array
+   triu - Upper triangular portion of a sparse array
+   hstack - Stack sparse arrays horizontally (column wise)
+   vstack - Stack sparse arrays vertically (row wise)
+
+Sparse tools
+------------
+
+.. autosummary::
+   :toctree: generated/
+
+   save_npz - Save a sparse array to a file using ``.npz`` format.
+   load_npz - Load a sparse array from a file using ``.npz`` format.
+   find - Return the indices and values of the nonzero elements
+   get_index_dtype - determine a good dtype for index arrays.
+   safely_cast_index_arrays - cast index array dtype or raise if shape too big
+
+Identifying sparse arrays
+-------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   issparse - Check if the argument is a sparse object (array or matrix).
+
+
+Sparse matrix classes
+=====================
+
+.. autosummary::
+   :toctree: generated/
+
+   bsr_matrix - Block Sparse Row matrix
+   coo_matrix - A sparse matrix in COOrdinate format
+   csc_matrix - Compressed Sparse Column matrix
+   csr_matrix - Compressed Sparse Row matrix
+   dia_matrix - Sparse matrix with DIAgonal storage
+   dok_matrix - Dictionary Of Keys based sparse matrix
+   lil_matrix - Row-based list of lists sparse matrix
+   spmatrix - Sparse matrix base class
+
+Building sparse matrices
+------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   eye - Sparse MxN matrix whose k-th diagonal is all ones
+   identity - Identity matrix in sparse matrix format
+   diags - Return a sparse matrix from diagonals
+   spdiags - Return a sparse matrix from diagonals
+   bmat - Build a sparse matrix from sparse sub-blocks
+   random - Random values in a given shape matrix
+   rand - Random values in a given shape matrix (old interface)
+
+**Combining matrices use the same functions as for** :ref:`combining-arrays`.
+
+Identifying sparse matrices
+---------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   issparse
+   isspmatrix
+   isspmatrix_csc
+   isspmatrix_csr
+   isspmatrix_bsr
+   isspmatrix_lil
+   isspmatrix_dok
+   isspmatrix_coo
+   isspmatrix_dia
+
+
+Warnings
+========
+
+.. autosummary::
+   :toctree: generated/
+
+   SparseEfficiencyWarning
+   SparseWarning
+
+
+Usage information
+=================
+
+There are seven available sparse array types:
+
+    1. csc_array: Compressed Sparse Column format
+    2. csr_array: Compressed Sparse Row format
+    3. bsr_array: Block Sparse Row format
+    4. lil_array: List of Lists format
+    5. dok_array: Dictionary of Keys format
+    6. coo_array: COOrdinate format (aka IJV, triplet format)
+    7. dia_array: DIAgonal format
+
+To construct an array efficiently, use any of `coo_array`,
+`dok_array` or `lil_array`. `dok_array` and `lil_array`
+support basic slicing and fancy indexing with a similar syntax
+to NumPy arrays. The COO format does not support indexing (yet)
+but can also be used to efficiently construct arrays using coord
+and value info.
+
+Despite their similarity to NumPy arrays, it is **strongly discouraged**
+to use NumPy functions directly on these arrays because NumPy typically
+treats them as generic Python objects rather than arrays, leading to
+unexpected (and incorrect) results. If you do want to apply a NumPy
+function to these arrays, first check if SciPy has its own implementation
+for the given sparse array class, or **convert the sparse array to
+a NumPy array** (e.g., using the `toarray` method of the class)
+before applying the method.
+
+All conversions among the CSR, CSC, and COO formats are efficient,
+linear-time operations.
+
+To perform manipulations such as multiplication or inversion, first
+convert the array to either CSC or CSR format. The `lil_array`
+format is row-based, so conversion to CSR is efficient, whereas
+conversion to CSC is less so.
+
+Matrix vector product
+---------------------
+
+To do a vector product between a 2D sparse array and a vector use
+the matmul operator (i.e., ``@``) which performs a dot product (like the
+``dot`` method):
+
+>>> import numpy as np
+>>> from scipy.sparse import csr_array
+>>> A = csr_array([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
+>>> v = np.array([1, 0, -1])
+>>> A @ v
+array([ 1, -3, -1], dtype=int64)
+
+The CSR format is especially suitable for fast matrix vector products.
+
+Example 1
+---------
+
+Construct a 1000x1000 `lil_array` and add some values to it:
+
+>>> from scipy.sparse import lil_array
+>>> from scipy.sparse.linalg import spsolve
+>>> from numpy.linalg import solve, norm
+>>> from numpy.random import rand
+
+>>> A = lil_array((1000, 1000))
+>>> A[0, :100] = rand(100)
+>>> A.setdiag(rand(1000))
+
+Now convert it to CSR format and solve A x = b for x:
+
+>>> A = A.tocsr()
+>>> b = rand(1000)
+>>> x = spsolve(A, b)
+
+Convert it to a dense array and solve, and check that the result
+is the same:
+
+>>> x_ = solve(A.toarray(), b)
+
+Now we can compute norm of the error with:
+
+>>> err = norm(x-x_)
+>>> err < 1e-10
+True
+
+It should be small :)
+
+
+Example 2
+---------
+
+Construct an array in COO format:
+
+>>> from scipy import sparse
+>>> from numpy import array
+>>> I = array([0,3,1,0])
+>>> J = array([0,3,1,2])
+>>> V = array([4,5,7,9])
+>>> A = sparse.coo_array((V,(I,J)),shape=(4,4))
+
+Notice that the indices do not need to be sorted.
+
+Duplicate (i,j) entries are summed when converting to CSR or CSC.
+
+>>> I = array([0,0,1,3,1,0,0])
+>>> J = array([0,2,1,3,1,0,0])
+>>> V = array([1,1,1,1,1,1,1])
+>>> B = sparse.coo_array((V,(I,J)),shape=(4,4)).tocsr()
+
+This is useful for constructing finite-element stiffness and mass matrices.
+
+Further details
+---------------
+
+CSR column indices are not necessarily sorted. Likewise for CSC row
+indices. Use the ``.sorted_indices()`` and ``.sort_indices()`` methods when
+sorted indices are required (e.g., when passing data to other libraries).
+
+"""
+
+# Original code by Travis Oliphant.
+# Modified and extended by Ed Schofield, Robert Cimrman,
+# Nathan Bell, and Jake Vanderplas.
+
+import warnings as _warnings
+
+from ._base import *
+from ._csr import *
+from ._csc import *
+from ._lil import *
+from ._dok import *
+from ._coo import *
+from ._dia import *
+from ._bsr import *
+from ._construct import *
+from ._extract import *
+from ._matrix import spmatrix
+from ._matrix_io import *
+from ._sputils import get_index_dtype, safely_cast_index_arrays
+
+# For backward compatibility with v0.19.
+from . import csgraph
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import (
+    base, bsr, compressed, construct, coo, csc, csr, data, dia, dok, extract,
+    lil, sparsetools, sputils
+)
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+# Filter PendingDeprecationWarning for np.matrix introduced with numpy 1.15
+msg = 'the matrix subclass is not the recommended way'
+_warnings.filterwarnings('ignore', message=msg)
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_base.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_base.py
new file mode 100644
index 0000000000000000000000000000000000000000..926e191013c7cacebab7a8e025a017358ba82f50
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_base.py
@@ -0,0 +1,1448 @@
+"""Base class for sparse matrices"""
+
+import numpy as np
+
+from ._sputils import (asmatrix, check_reshape_kwargs, check_shape,
+                       get_sum_dtype, isdense, isscalarlike,
+                       matrix, validateaxis, getdtype)
+
+from ._matrix import spmatrix
+
+__all__ = ['isspmatrix', 'issparse', 'sparray',
+           'SparseWarning', 'SparseEfficiencyWarning']
+
+
+class SparseWarning(Warning):
+    pass
+
+
+class SparseFormatWarning(SparseWarning):
+    pass
+
+
+class SparseEfficiencyWarning(SparseWarning):
+    pass
+
+
+# The formats that we might potentially understand.
+_formats = {'csc': [0, "Compressed Sparse Column"],
+            'csr': [1, "Compressed Sparse Row"],
+            'dok': [2, "Dictionary Of Keys"],
+            'lil': [3, "List of Lists"],
+            'dod': [4, "Dictionary of Dictionaries"],
+            'sss': [5, "Symmetric Sparse Skyline"],
+            'coo': [6, "COOrdinate"],
+            'lba': [7, "Linpack BAnded"],
+            'egd': [8, "Ellpack-itpack Generalized Diagonal"],
+            'dia': [9, "DIAgonal"],
+            'bsr': [10, "Block Sparse Row"],
+            'msr': [11, "Modified compressed Sparse Row"],
+            'bsc': [12, "Block Sparse Column"],
+            'msc': [13, "Modified compressed Sparse Column"],
+            'ssk': [14, "Symmetric SKyline"],
+            'nsk': [15, "Nonsymmetric SKyline"],
+            'jad': [16, "JAgged Diagonal"],
+            'uss': [17, "Unsymmetric Sparse Skyline"],
+            'vbr': [18, "Variable Block Row"],
+            'und': [19, "Undefined"]
+            }
+
+
+# These univariate ufuncs preserve zeros.
+_ufuncs_with_fixed_point_at_zero = frozenset([
+        np.sin, np.tan, np.arcsin, np.arctan, np.sinh, np.tanh, np.arcsinh,
+        np.arctanh, np.rint, np.sign, np.expm1, np.log1p, np.deg2rad,
+        np.rad2deg, np.floor, np.ceil, np.trunc, np.sqrt])
+
+
+MAXPRINT = 50
+
+
+class _spbase:
+    """ This class provides a base class for all sparse arrays.  It
+    cannot be instantiated.  Most of the work is provided by subclasses.
+    """
+
+    __array_priority__ = 10.1
+    _format = 'und'  # undefined
+    _allow_nd = (2,)
+
+    @property
+    def ndim(self) -> int:
+        return len(self._shape)
+
+    @property
+    def _shape_as_2d(self):
+        s = self._shape
+        return (1, s[-1]) if len(s) == 1 else s
+
+    @property
+    def _bsr_container(self):
+        from ._bsr import bsr_array
+        return bsr_array
+
+    @property
+    def _coo_container(self):
+        from ._coo import coo_array
+        return coo_array
+
+    @property
+    def _csc_container(self):
+        from ._csc import csc_array
+        return csc_array
+
+    @property
+    def _csr_container(self):
+        from ._csr import csr_array
+        return csr_array
+
+    @property
+    def _dia_container(self):
+        from ._dia import dia_array
+        return dia_array
+
+    @property
+    def _dok_container(self):
+        from ._dok import dok_array
+        return dok_array
+
+    @property
+    def _lil_container(self):
+        from ._lil import lil_array
+        return lil_array
+
+    def __init__(self, arg1, *, maxprint=None):
+        self._shape = None
+        if self.__class__.__name__ == '_spbase':
+            raise ValueError("This class is not intended"
+                             " to be instantiated directly.")
+        if isinstance(self, sparray) and np.isscalar(arg1):
+            raise ValueError(
+                "scipy sparse array classes do not support instantiation from a scalar"
+            )
+        self.maxprint = MAXPRINT if maxprint is None else maxprint
+
+    @property
+    def shape(self):
+        return self._shape
+
+    def reshape(self, *args, **kwargs):
+        """reshape(self, shape, order='C', copy=False)
+
+        Gives a new shape to a sparse array/matrix without changing its data.
+
+        Parameters
+        ----------
+        shape : length-2 tuple of ints
+            The new shape should be compatible with the original shape.
+        order : {'C', 'F'}, optional
+            Read the elements using this index order. 'C' means to read and
+            write the elements using C-like index order; e.g., read entire first
+            row, then second row, etc. 'F' means to read and write the elements
+            using Fortran-like index order; e.g., read entire first column, then
+            second column, etc.
+        copy : bool, optional
+            Indicates whether or not attributes of self should be copied
+            whenever possible. The degree to which attributes are copied varies
+            depending on the type of sparse array being used.
+
+        Returns
+        -------
+        reshaped : sparse array/matrix
+            A sparse array/matrix with the given `shape`, not necessarily of the same
+            format as the current object.
+
+        See Also
+        --------
+        numpy.reshape : NumPy's implementation of 'reshape' for ndarrays
+        """
+        # If the shape already matches, don't bother doing an actual reshape
+        # Otherwise, the default is to convert to COO and use its reshape
+        # Don't restrict ndim on this first call. That happens in constructor
+        shape = check_shape(args, self.shape, allow_nd=range(1, 65))
+        order, copy = check_reshape_kwargs(kwargs)
+        if shape == self.shape:
+            if copy:
+                return self.copy()
+            else:
+                return self
+
+        return self.tocoo(copy=copy).reshape(shape, order=order, copy=False)
+
+    def resize(self, shape):
+        """Resize the array/matrix in-place to dimensions given by ``shape``
+
+        Any elements that lie within the new shape will remain at the same
+        indices, while non-zero elements lying outside the new shape are
+        removed.
+
+        Parameters
+        ----------
+        shape : (int, int)
+            number of rows and columns in the new array/matrix
+
+        Notes
+        -----
+        The semantics are not identical to `numpy.ndarray.resize` or
+        `numpy.resize`. Here, the same data will be maintained at each index
+        before and after reshape, if that index is within the new bounds. In
+        numpy, resizing maintains contiguity of the array, moving elements
+        around in the logical array but not within a flattened representation.
+
+        We give no guarantees about whether the underlying data attributes
+        (arrays, etc.) will be modified in place or replaced with new objects.
+        """
+        # As an inplace operation, this requires implementation in each format.
+        raise NotImplementedError(
+            f'{type(self).__name__}.resize is not implemented')
+
+    def astype(self, dtype, casting='unsafe', copy=True):
+        """Cast the array/matrix elements to a specified type.
+
+        Parameters
+        ----------
+        dtype : string or numpy dtype
+            Typecode or data-type to which to cast the data.
+        casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
+            Controls what kind of data casting may occur.
+            Defaults to 'unsafe' for backwards compatibility.
+            'no' means the data types should not be cast at all.
+            'equiv' means only byte-order changes are allowed.
+            'safe' means only casts which can preserve values are allowed.
+            'same_kind' means only safe casts or casts within a kind,
+            like float64 to float32, are allowed.
+            'unsafe' means any data conversions may be done.
+        copy : bool, optional
+            If `copy` is `False`, the result might share some memory with this
+            array/matrix. If `copy` is `True`, it is guaranteed that the result and
+            this array/matrix do not share any memory.
+        """
+
+        dtype = getdtype(dtype)
+        if self.dtype != dtype:
+            return self.tocsr().astype(
+                dtype, casting=casting, copy=copy).asformat(self.format)
+        elif copy:
+            return self.copy()
+        else:
+            return self
+
+    @classmethod
+    def _ascontainer(cls, X, **kwargs):
+        if issubclass(cls, sparray):
+            return np.asarray(X, **kwargs)
+        else:
+            return asmatrix(X, **kwargs)
+
+    @classmethod
+    def _container(cls, X, **kwargs):
+        if issubclass(cls, sparray):
+            return np.array(X, **kwargs)
+        else:
+            return matrix(X, **kwargs)
+
+    def _asfptype(self):
+        """Upcast array to a floating point format (if necessary)"""
+
+        fp_types = ['f', 'd', 'F', 'D']
+
+        if self.dtype.char in fp_types:
+            return self
+        else:
+            for fp_type in fp_types:
+                if self.dtype <= np.dtype(fp_type):
+                    return self.astype(fp_type)
+
+            raise TypeError(
+                f'cannot upcast [{self.dtype.name}] to a floating point format'
+            )
+
+    def __iter__(self):
+        for r in range(self.shape[0]):
+            yield self[r]
+
+    def _getmaxprint(self):
+        """Maximum number of elements to display when printed."""
+        return self.maxprint
+
+    def count_nonzero(self, axis=None):
+        """Number of non-zero entries, equivalent to
+
+        np.count_nonzero(a.toarray(), axis=axis)
+
+        Unlike the nnz property, which return the number of stored
+        entries (the length of the data attribute), this method counts the
+        actual number of non-zero entries in data.
+
+        Duplicate entries are summed before counting.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Count nonzeros for the whole array, or along a specified axis.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        numpy array
+            A reduced array (no axis `axis`) holding the number of nonzero values
+            for each of the indices of the nonaxis dimensions.
+
+        Notes
+        -----
+        If you want to count nonzero and explicit zero stored values (e.g. nnz)
+        along an axis, two fast idioms are provided by `numpy` functions for the
+        common CSR, CSC, COO formats.
+
+        For the major axis in CSR (rows) and CSC (cols) use `np.diff`:
+
+            >>> import numpy as np
+            >>> import scipy as sp
+            >>> A = sp.sparse.csr_array([[4, 5, 0], [7, 0, 0]])
+            >>> major_axis_stored_values = np.diff(A.indptr)  # -> np.array([2, 1])
+
+        For the minor axis in CSR (cols) and CSC (rows) use `numpy.bincount` with
+        minlength ``A.shape[1]`` for CSR and ``A.shape[0]`` for CSC:
+
+            >>> csr_minor_stored_values = np.bincount(A.indices, minlength=A.shape[1])
+
+        For COO, use the minor axis approach for either `axis`:
+
+            >>> A = A.tocoo()
+            >>> coo_axis0_stored_values = np.bincount(A.coords[0], minlength=A.shape[1])
+            >>> coo_axis1_stored_values = np.bincount(A.coords[1], minlength=A.shape[0])
+
+        Examples
+        --------
+
+            >>> A = sp.sparse.csr_array([[4, 5, 0], [7, 0, 0]])
+            >>> A.count_nonzero(axis=0)
+            array([2, 1, 0])
+        """
+        clsname = self.__class__.__name__
+        raise NotImplementedError(f"count_nonzero not implemented for {clsname}.")
+
+    def _getnnz(self, axis=None):
+        """Number of stored values, including explicit zeros.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Report stored values for the whole array, or along a specified axis.
+
+        See also
+        --------
+        count_nonzero : Number of non-zero entries
+        """
+        clsname = self.__class__.__name__
+        raise NotImplementedError(f"getnnz not implemented for {clsname}.")
+
+    @property
+    def nnz(self) -> int:
+        """Number of stored values, including explicit zeros.
+
+        See also
+        --------
+        count_nonzero : Number of non-zero entries
+        """
+        return self._getnnz()
+
+    @property
+    def size(self) -> int:
+        """Number of stored values.
+
+        See also
+        --------
+        count_nonzero : Number of non-zero values.
+        """
+        return self._getnnz()
+
+    @property
+    def format(self) -> str:
+        """Format string for matrix."""
+        return self._format
+
+    @property
+    def T(self):
+        """Transpose."""
+        return self.transpose()
+
+    @property
+    def real(self):
+        return self._real()
+
+    @property
+    def imag(self):
+        return self._imag()
+
+    def __repr__(self):
+        _, format_name = _formats[self.format]
+        sparse_cls = 'array' if isinstance(self, sparray) else 'matrix'
+        return (
+            f"<{format_name} sparse {sparse_cls} of dtype '{self.dtype}'\n"
+            f"\twith {self.nnz} stored elements and shape {self.shape}>"
+        )
+
+    def __str__(self):
+        maxprint = self._getmaxprint()
+
+        A = self.tocoo()
+
+        # helper function, outputs "(i,j)  v"
+        def tostr(coords, data):
+            pairs = zip(zip(*(c.tolist() for c in coords)), data)
+            return '\n'.join(f'  {idx}\t{val}' for idx, val in pairs)
+
+        out = repr(self)
+        if self.nnz == 0:
+            return out
+
+        out += '\n  Coords\tValues\n'
+        if self.nnz > maxprint:
+            half = maxprint // 2
+            out += tostr(tuple(c[:half] for c in A.coords), A.data[:half])
+            out += "\n  :\t:\n"
+            half = maxprint - half
+            out += tostr(tuple(c[-half:] for c in A.coords), A.data[-half:])
+        else:
+            out += tostr(A.coords, A.data)
+
+        return out
+
+    def __bool__(self):  # Simple -- other ideas?
+        if self.shape == (1, 1):
+            return self.nnz != 0
+        else:
+            raise ValueError("The truth value of an array with more than one "
+                             "element is ambiguous. Use a.any() or a.all().")
+    __nonzero__ = __bool__
+
+    # What should len(sparse) return? For consistency with dense matrices,
+    # perhaps it should be the number of rows?  But for some uses the number of
+    # non-zeros is more important.  For now, raise an exception!
+    def __len__(self):
+        raise TypeError("sparse array length is ambiguous; use getnnz()"
+                        " or shape[0]")
+
+    def asformat(self, format, copy=False):
+        """Return this array/matrix in the passed format.
+
+        Parameters
+        ----------
+        format : {str, None}
+            The desired sparse format ("csr", "csc", "lil", "dok", "array", ...)
+            or None for no conversion.
+        copy : bool, optional
+            If True, the result is guaranteed to not share data with self.
+
+        Returns
+        -------
+        A : This array/matrix in the passed format.
+        """
+        if format is None or format == self.format:
+            if copy:
+                return self.copy()
+            else:
+                return self
+        else:
+            try:
+                convert_method = getattr(self, 'to' + format)
+            except AttributeError as e:
+                raise ValueError(f'Format {format} is unknown.') from e
+
+            # Forward the copy kwarg, if it's accepted.
+            try:
+                return convert_method(copy=copy)
+            except TypeError:
+                return convert_method()
+
+    ###################################################################
+    #  NOTE: All arithmetic operations use csr_matrix by default.
+    # Therefore a new sparse array format just needs to define a
+    # .tocsr() method to provide arithmetic support. Any of these
+    # methods can be overridden for efficiency.
+    ####################################################################
+
+    def multiply(self, other):
+        """Point-wise multiplication by another array/matrix."""
+        if isscalarlike(other):
+            return self._mul_scalar(other)
+        return self.tocsr().multiply(other)
+
+    def maximum(self, other):
+        """Element-wise maximum between this and another array/matrix."""
+        return self.tocsr().maximum(other)
+
+    def minimum(self, other):
+        """Element-wise minimum between this and another array/matrix."""
+        return self.tocsr().minimum(other)
+
+    def dot(self, other):
+        """Ordinary dot product
+
+        Examples
+        --------
+        >>> import numpy as np
+        >>> from scipy.sparse import csr_array
+        >>> A = csr_array([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
+        >>> v = np.array([1, 0, -1])
+        >>> A.dot(v)
+        array([ 1, -3, -1], dtype=int64)
+
+        """
+        if np.isscalar(other):
+            return self * other
+        else:
+            return self @ other
+
+    def power(self, n, dtype=None):
+        """Element-wise power."""
+        return self.tocsr().power(n, dtype=dtype)
+
+    def _broadcast_to(self, shape, copy=False):
+        if self.shape == shape:
+            return self.copy() if copy else self
+        else:
+            return self.tocsr()._broadcast_to(shape, copy)
+
+    def __eq__(self, other):
+        return self.tocsr().__eq__(other)
+
+    def __ne__(self, other):
+        return self.tocsr().__ne__(other)
+
+    def __lt__(self, other):
+        return self.tocsr().__lt__(other)
+
+    def __gt__(self, other):
+        return self.tocsr().__gt__(other)
+
+    def __le__(self, other):
+        return self.tocsr().__le__(other)
+
+    def __ge__(self, other):
+        return self.tocsr().__ge__(other)
+
+    def __abs__(self):
+        return abs(self.tocsr())
+
+    def __round__(self, ndigits=0):
+        return round(self.tocsr(), ndigits=ndigits)
+
+    def _add_sparse(self, other):
+        return self.tocsr()._add_sparse(other)
+
+    def _add_dense(self, other):
+        return self.tocoo()._add_dense(other)
+
+    def _sub_sparse(self, other):
+        return self.tocsr()._sub_sparse(other)
+
+    def _sub_dense(self, other):
+        return self.todense() - other
+
+    def _rsub_dense(self, other):
+        # note: this can't be replaced by other + (-self) for unsigned types
+        return other - self.todense()
+
+    def __add__(self, other):  # self + other
+        if isscalarlike(other):
+            if other == 0:
+                return self.copy()
+            # Now we would add this scalar to every element.
+            raise NotImplementedError('adding a nonzero scalar to a '
+                                      'sparse array is not supported')
+        elif issparse(other):
+            if other.shape != self.shape:
+                raise ValueError("inconsistent shapes")
+            return self._add_sparse(other)
+        elif isdense(other):
+            other = np.broadcast_to(other, self.shape)
+            return self._add_dense(other)
+        else:
+            return NotImplemented
+
+    def __radd__(self,other):  # other + self
+        return self.__add__(other)
+
+    def __sub__(self, other):  # self - other
+        if isscalarlike(other):
+            if other == 0:
+                return self.copy()
+            raise NotImplementedError('subtracting a nonzero scalar from a '
+                                      'sparse array is not supported')
+        elif issparse(other):
+            if other.shape != self.shape:
+                raise ValueError("inconsistent shapes")
+            return self._sub_sparse(other)
+        elif isdense(other):
+            other = np.broadcast_to(other, self.shape)
+            return self._sub_dense(other)
+        else:
+            return NotImplemented
+
+    def __rsub__(self,other):  # other - self
+        if isscalarlike(other):
+            if other == 0:
+                return -self.copy()
+            raise NotImplementedError('subtracting a sparse array from a '
+                                      'nonzero scalar is not supported')
+        elif isdense(other):
+            other = np.broadcast_to(other, self.shape)
+            return self._rsub_dense(other)
+        else:
+            return NotImplemented
+
+    def _matmul_dispatch(self, other):
+        """np.array-like matmul & `np.matrix`-like mul, i.e. `dot` or `NotImplemented`
+
+        interpret other and call one of the following
+        self._mul_scalar()
+        self._matmul_vector()
+        self._matmul_multivector()
+        self._matmul_sparse()
+        """
+        # This method has to be different from `__matmul__` because it is also
+        # called by sparse matrix classes.
+
+        # Currently matrix multiplication is only supported
+        # for 2D arrays. Hence we unpacked and use only the
+        # two last axes' lengths.
+        M, N = self._shape_as_2d
+
+        if other.__class__ is np.ndarray:
+            # Fast path for the most common case
+            if other.shape == (N,):
+                return self._matmul_vector(other)
+            elif other.shape == (N, 1):
+                result = self._matmul_vector(other.ravel())
+                if self.ndim == 1:
+                    return result.reshape(1)
+                return result.reshape(M, 1)
+            elif other.ndim == 2 and other.shape[0] == N:
+                return self._matmul_multivector(other)
+
+        if isscalarlike(other):
+            # scalar value
+            return self._mul_scalar(other)
+
+        err_prefix = "matmul: dimension mismatch with signature"
+        if issparse(other):
+            if N != other.shape[0]:
+                raise ValueError(
+                    f"{err_prefix} (n,k={N}),(k={other.shape[0]},m)->(n,m)"
+                )
+            return self._matmul_sparse(other)
+
+        # If it's a list or whatever, treat it like an array
+        other_a = np.asanyarray(other)
+
+        if other_a.ndim == 0 and other_a.dtype == np.object_:
+            # Not interpretable as an array; return NotImplemented so that
+            # other's __rmatmul__ can kick in if that's implemented.
+            return NotImplemented
+
+        try:
+            other.shape
+        except AttributeError:
+            other = other_a
+
+        if other.ndim == 1 or other.ndim == 2 and other.shape[1] == 1:
+            # dense row or column vector
+            if other.shape[0] != N:
+                raise ValueError(
+                    f"{err_prefix} (n,k={N}),(k={other.shape[0]},1?)->(n,1?)"
+                )
+
+            result = self._matmul_vector(np.ravel(other))
+
+            if isinstance(other, np.matrix):
+                result = self._ascontainer(result)
+
+            if other.ndim == 2 and other.shape[1] == 1:
+                # If 'other' was an (nx1) column vector, reshape the result
+                if self.ndim == 1:
+                    result = result.reshape(1)
+                else:
+                    result = result.reshape(-1, 1)
+
+            return result
+
+        elif other.ndim == 2:
+            ##
+            # dense 2D array or matrix ("multivector")
+
+            if other.shape[0] != N:
+                raise ValueError(
+                    f"{err_prefix} (n,k={N}),(k={other.shape[0]},m)->(n,m)"
+                )
+
+            result = self._matmul_multivector(np.asarray(other))
+
+            if isinstance(other, np.matrix):
+                result = self._ascontainer(result)
+
+            return result
+
+        else:
+            raise ValueError('could not interpret dimensions')
+
+    def __mul__(self, other):
+        return self.multiply(other)
+
+    def __rmul__(self, other):  # other * self
+        return self.multiply(other)
+
+    # by default, use CSR for __mul__ handlers
+    def _mul_scalar(self, other):
+        return self.tocsr()._mul_scalar(other)
+
+    def _matmul_vector(self, other):
+        return self.tocsr()._matmul_vector(other)
+
+    def _matmul_multivector(self, other):
+        return self.tocsr()._matmul_multivector(other)
+
+    def _matmul_sparse(self, other):
+        return self.tocsr()._matmul_sparse(other)
+
+    def _rmatmul_dispatch(self, other):
+        if isscalarlike(other):
+            return self._mul_scalar(other)
+        else:
+            # Don't use asarray unless we have to
+            try:
+                tr = other.transpose()
+            except AttributeError:
+                tr = np.asarray(other).transpose()
+            ret = self.transpose()._matmul_dispatch(tr)
+            if ret is NotImplemented:
+                return NotImplemented
+            return ret.transpose()
+
+    #######################
+    # matmul (@) operator #
+    #######################
+
+    def __matmul__(self, other):
+        if isscalarlike(other):
+            raise ValueError("Scalar operands are not allowed, "
+                             "use '*' instead")
+        return self._matmul_dispatch(other)
+
+    def __rmatmul__(self, other):
+        if isscalarlike(other):
+            raise ValueError("Scalar operands are not allowed, "
+                             "use '*' instead")
+        return self._rmatmul_dispatch(other)
+
+    ####################
+    # Other Arithmetic #
+    ####################
+
+    def _divide(self, other, true_divide=False, rdivide=False):
+        if isscalarlike(other):
+            if rdivide:
+                if true_divide:
+                    return np.true_divide(other, self.todense())
+                else:
+                    return np.divide(other, self.todense())
+
+            if true_divide and np.can_cast(self.dtype, np.float64):
+                return self.astype(np.float64)._mul_scalar(1./other)
+            else:
+                r = self._mul_scalar(1./other)
+
+                scalar_dtype = np.asarray(other).dtype
+                if (np.issubdtype(self.dtype, np.integer) and
+                        np.issubdtype(scalar_dtype, np.integer)):
+                    return r.astype(self.dtype)
+                else:
+                    return r
+
+        elif isdense(other):
+            if not rdivide:
+                if true_divide:
+                    recip = np.true_divide(1., other)
+                else:
+                    recip = np.divide(1., other)
+                return self.multiply(recip)
+            else:
+                if true_divide:
+                    return np.true_divide(other, self.todense())
+                else:
+                    return np.divide(other, self.todense())
+        elif issparse(other):
+            if rdivide:
+                return other._divide(self, true_divide, rdivide=False)
+
+            self_csr = self.tocsr()
+            if true_divide and np.can_cast(self.dtype, np.float64):
+                return self_csr.astype(np.float64)._divide_sparse(other)
+            else:
+                return self_csr._divide_sparse(other)
+        else:
+            return NotImplemented
+
+    def __truediv__(self, other):
+        return self._divide(other, true_divide=True)
+
+    def __div__(self, other):
+        # Always do true division
+        return self._divide(other, true_divide=True)
+
+    def __rtruediv__(self, other):
+        # Implementing this as the inverse would be too magical -- bail out
+        return NotImplemented
+
+    def __rdiv__(self, other):
+        # Implementing this as the inverse would be too magical -- bail out
+        return NotImplemented
+
+    def __neg__(self):
+        return -self.tocsr()
+
+    def __iadd__(self, other):
+        return NotImplemented
+
+    def __isub__(self, other):
+        return NotImplemented
+
+    def __imul__(self, other):
+        return NotImplemented
+
+    def __idiv__(self, other):
+        return self.__itruediv__(other)
+
+    def __itruediv__(self, other):
+        return NotImplemented
+
+    def __pow__(self, *args, **kwargs):
+        return self.power(*args, **kwargs)
+
+    def transpose(self, axes=None, copy=False):
+        """
+        Reverses the dimensions of the sparse array/matrix.
+
+        Parameters
+        ----------
+        axes : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except
+            for the default value.
+        copy : bool, optional
+            Indicates whether or not attributes of `self` should be
+            copied whenever possible. The degree to which attributes
+            are copied varies depending on the type of sparse array/matrix
+            being used.
+
+        Returns
+        -------
+        p : `self` with the dimensions reversed.
+
+        Notes
+        -----
+        If `self` is a `csr_array` or a `csc_array`, then this will return a
+        `csc_array` or a `csr_array`, respectively.
+
+        See Also
+        --------
+        numpy.transpose : NumPy's implementation of 'transpose' for ndarrays
+        """
+        return self.tocsr(copy=copy).transpose(axes=axes, copy=False)
+
+    def conjugate(self, copy=True):
+        """Element-wise complex conjugation.
+
+        If the array/matrix is of non-complex data type and `copy` is False,
+        this method does nothing and the data is not copied.
+
+        Parameters
+        ----------
+        copy : bool, optional
+            If True, the result is guaranteed to not share data with self.
+
+        Returns
+        -------
+        A : The element-wise complex conjugate.
+
+        """
+        if np.issubdtype(self.dtype, np.complexfloating):
+            return self.tocsr(copy=copy).conjugate(copy=False)
+        elif copy:
+            return self.copy()
+        else:
+            return self
+
+    def conj(self, copy=True):
+        return self.conjugate(copy=copy)
+
+    conj.__doc__ = conjugate.__doc__
+
+    def _real(self):
+        return self.tocsr()._real()
+
+    def _imag(self):
+        return self.tocsr()._imag()
+
+    def nonzero(self):
+        """Nonzero indices of the array/matrix.
+
+        Returns a tuple of arrays (row,col) containing the indices
+        of the non-zero elements of the array.
+
+        Examples
+        --------
+        >>> from scipy.sparse import csr_array
+        >>> A = csr_array([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
+        >>> A.nonzero()
+        (array([0, 0, 1, 2, 2], dtype=int32), array([0, 1, 2, 0, 2], dtype=int32))
+
+        """
+
+        # convert to COOrdinate format
+        A = self.tocoo()
+        nz_mask = A.data != 0
+        return tuple(idx[nz_mask] for idx in A.coords)
+
+    def _getcol(self, j):
+        """Returns a copy of column j of the array, as an (m x 1) sparse
+        array (column vector).
+        """
+        if self.ndim == 1:
+            raise ValueError("getcol not provided for 1d arrays. Use indexing A[j]")
+        # Subclasses should override this method for efficiency.
+        # Post-multiply by a (n x 1) column vector 'a' containing all zeros
+        # except for a_j = 1
+        N = self.shape[-1]
+        if j < 0:
+            j += N
+        if j < 0 or j >= N:
+            raise IndexError("index out of bounds")
+        col_selector = self._csc_container(([1], [[j], [0]]),
+                                           shape=(N, 1), dtype=self.dtype)
+        result = self @ col_selector
+        return result
+
+    def _getrow(self, i):
+        """Returns a copy of row i of the array, as a (1 x n) sparse
+        array (row vector).
+        """
+        if self.ndim == 1:
+            raise ValueError("getrow not meaningful for a 1d array")
+        # Subclasses should override this method for efficiency.
+        # Pre-multiply by a (1 x m) row vector 'a' containing all zeros
+        # except for a_i = 1
+        M = self.shape[0]
+        if i < 0:
+            i += M
+        if i < 0 or i >= M:
+            raise IndexError("index out of bounds")
+        row_selector = self._csr_container(([1], [[0], [i]]),
+                                           shape=(1, M), dtype=self.dtype)
+        return row_selector @ self
+
+    # The following dunder methods cannot be implemented.
+    #
+    # def __array__(self):
+    #     # Sparse matrices rely on NumPy wrapping them in object arrays under
+    #     # the hood to make unary ufuncs work on them. So we cannot raise
+    #     # TypeError here - which would be handy to not give users object
+    #     # arrays they probably don't want (they're looking for `.toarray()`).
+    #     #
+    #     # Conversion with `toarray()` would also break things because of the
+    #     # behavior discussed above, plus we want to avoid densification by
+    #     # accident because that can too easily blow up memory.
+    #
+    # def __array_ufunc__(self):
+    #     # We cannot implement __array_ufunc__ due to mismatching semantics.
+    #     # See gh-7707 and gh-7349 for details.
+    #
+    # def __array_function__(self):
+    #     # We cannot implement __array_function__ due to mismatching semantics.
+    #     # See gh-10362 for details.
+
+    def todense(self, order=None, out=None):
+        """
+        Return a dense representation of this sparse array.
+
+        Parameters
+        ----------
+        order : {'C', 'F'}, optional
+            Whether to store multi-dimensional data in C (row-major)
+            or Fortran (column-major) order in memory. The default
+            is 'None', which provides no ordering guarantees.
+            Cannot be specified in conjunction with the `out`
+            argument.
+
+        out : ndarray, 2-D, optional
+            If specified, uses this array as the output buffer
+            instead of allocating a new array to return. The
+            provided array must have the same shape and dtype as
+            the sparse array on which you are calling the method.
+
+        Returns
+        -------
+        arr : ndarray, 2-D
+            An array with the same shape and containing the same
+            data represented by the sparse array, with the requested
+            memory order. If `out` was passed, the same object is
+            returned after being modified in-place to contain the
+            appropriate values.
+        """
+        return self._ascontainer(self.toarray(order=order, out=out))
+
+    def toarray(self, order=None, out=None):
+        """
+        Return a dense ndarray representation of this sparse array/matrix.
+
+        Parameters
+        ----------
+        order : {'C', 'F'}, optional
+            Whether to store multidimensional data in C (row-major)
+            or Fortran (column-major) order in memory. The default
+            is 'None', which provides no ordering guarantees.
+            Cannot be specified in conjunction with the `out`
+            argument.
+
+        out : ndarray, 2-D, optional
+            If specified, uses this array as the output buffer
+            instead of allocating a new array to return. The provided
+            array must have the same shape and dtype as the sparse
+            array/matrix on which you are calling the method. For most
+            sparse types, `out` is required to be memory contiguous
+            (either C or Fortran ordered).
+
+        Returns
+        -------
+        arr : ndarray, 2-D
+            An array with the same shape and containing the same
+            data represented by the sparse array/matrix, with the requested
+            memory order. If `out` was passed, the same object is
+            returned after being modified in-place to contain the
+            appropriate values.
+        """
+        return self.tocoo(copy=False).toarray(order=order, out=out)
+
+    # Any sparse array format deriving from _spbase must define one of
+    # tocsr or tocoo. The other conversion methods may be implemented for
+    # efficiency, but are not required.
+    def tocsr(self, copy=False):
+        """Convert this array/matrix to Compressed Sparse Row format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant csr_array/matrix.
+        """
+        return self.tocoo(copy=copy).tocsr(copy=False)
+
+    def todok(self, copy=False):
+        """Convert this array/matrix to Dictionary Of Keys format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant dok_array/matrix.
+        """
+        return self.tocoo(copy=copy).todok(copy=False)
+
+    def tocoo(self, copy=False):
+        """Convert this array/matrix to COOrdinate format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant coo_array/matrix.
+        """
+        return self.tocsr(copy=False).tocoo(copy=copy)
+
+    def tolil(self, copy=False):
+        """Convert this array/matrix to List of Lists format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant lil_array/matrix.
+        """
+        return self.tocsr(copy=False).tolil(copy=copy)
+
+    def todia(self, copy=False):
+        """Convert this array/matrix to sparse DIAgonal format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant dia_array/matrix.
+        """
+        return self.tocoo(copy=copy).todia(copy=False)
+
+    def tobsr(self, blocksize=None, copy=False):
+        """Convert this array/matrix to Block Sparse Row format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant bsr_array/matrix.
+
+        When blocksize=(R, C) is provided, it will be used for construction of
+        the bsr_array/matrix.
+        """
+        return self.tocsr(copy=False).tobsr(blocksize=blocksize, copy=copy)
+
+    def tocsc(self, copy=False):
+        """Convert this array/matrix to Compressed Sparse Column format.
+
+        With copy=False, the data/indices may be shared between this array/matrix and
+        the resultant csc_array/matrix.
+        """
+        return self.tocsr(copy=copy).tocsc(copy=False)
+
+    def copy(self):
+        """Returns a copy of this array/matrix.
+
+        No data/indices will be shared between the returned value and current
+        array/matrix.
+        """
+        return self.__class__(self, copy=True)
+
+    def sum(self, axis=None, dtype=None, out=None):
+        """
+        Sum the array/matrix elements over a given axis.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the sum is computed. The default is to
+            compute the sum of all the array/matrix elements, returning a scalar
+            (i.e., `axis` = `None`).
+        dtype : dtype, optional
+            The type of the returned array/matrix and of the accumulator in which
+            the elements are summed.  The dtype of `a` is used by default
+            unless `a` has an integer dtype of less precision than the default
+            platform integer.  In that case, if `a` is signed then the platform
+            integer is used while if `a` is unsigned then an unsigned integer
+            of the same precision as the platform integer is used.
+
+            .. versionadded:: 0.18.0
+
+        out : np.matrix, optional
+            Alternative output matrix in which to place the result. It must
+            have the same shape as the expected output, but the type of the
+            output values will be cast if necessary.
+
+            .. versionadded:: 0.18.0
+
+        Returns
+        -------
+        sum_along_axis : np.matrix
+            A matrix with the same shape as `self`, with the specified
+            axis removed.
+
+        See Also
+        --------
+        numpy.matrix.sum : NumPy's implementation of 'sum' for matrices
+
+        """
+        validateaxis(axis)
+
+        # Mimic numpy's casting.
+        res_dtype = get_sum_dtype(self.dtype)
+
+        if self.ndim == 1:
+            if axis not in (None, -1, 0):
+                raise ValueError("axis must be None, -1 or 0")
+            res = self @ np.ones(self.shape, dtype=res_dtype)
+            return res.sum(dtype=dtype, out=out)
+
+        # We use multiplication by a matrix of ones to achieve this.
+        # For some sparse array formats more efficient methods are
+        # possible -- these should override this function.
+        M, N = self.shape
+
+        if axis is None:
+            # sum over rows and columns
+            return (
+                self @ self._ascontainer(np.ones((N, 1), dtype=res_dtype))
+            ).sum(dtype=dtype, out=out)
+
+        if axis < 0:
+            axis += 2
+
+        # axis = 0 or 1 now
+        if axis == 0:
+            # sum over columns
+            ret = self._ascontainer(
+                np.ones((1, M), dtype=res_dtype)
+            ) @ self
+        else:
+            # sum over rows
+            ret = self @ self._ascontainer(
+                np.ones((N, 1), dtype=res_dtype)
+            )
+
+        return ret.sum(axis=axis, dtype=dtype, out=out)
+
+    def mean(self, axis=None, dtype=None, out=None):
+        """
+        Compute the arithmetic mean along the specified axis.
+
+        Returns the average of the array/matrix elements. The average is taken
+        over all elements in the array/matrix by default, otherwise over the
+        specified axis. `float64` intermediate and return values are used
+        for integer inputs.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the mean is computed. The default is to compute
+            the mean of all elements in the array/matrix (i.e., `axis` = `None`).
+        dtype : data-type, optional
+            Type to use in computing the mean. For integer inputs, the default
+            is `float64`; for floating point inputs, it is the same as the
+            input dtype.
+
+            .. versionadded:: 0.18.0
+
+        out : np.matrix, optional
+            Alternative output matrix in which to place the result. It must
+            have the same shape as the expected output, but the type of the
+            output values will be cast if necessary.
+
+            .. versionadded:: 0.18.0
+
+        Returns
+        -------
+        m : np.matrix
+
+        See Also
+        --------
+        numpy.matrix.mean : NumPy's implementation of 'mean' for matrices
+
+        """
+        validateaxis(axis)
+
+        res_dtype = self.dtype.type
+        integral = (np.issubdtype(self.dtype, np.integer) or
+                    np.issubdtype(self.dtype, np.bool_))
+
+        # output dtype
+        if dtype is None:
+            if integral:
+                res_dtype = np.float64
+        else:
+            res_dtype = np.dtype(dtype).type
+
+        # intermediate dtype for summation
+        inter_dtype = np.float64 if integral else res_dtype
+        inter_self = self.astype(inter_dtype)
+
+        if self.ndim == 1:
+            if axis not in (None, -1, 0):
+                raise ValueError("axis must be None, -1 or 0")
+            res = inter_self / self.shape[-1]
+            return res.sum(dtype=res_dtype, out=out)
+
+        if axis is None:
+            return (inter_self / (self.shape[0] * self.shape[1]))\
+                .sum(dtype=res_dtype, out=out)
+
+        if axis < 0:
+            axis += 2
+
+        # axis = 0 or 1 now
+        if axis == 0:
+            return (inter_self * (1.0 / self.shape[0])).sum(
+                axis=0, dtype=res_dtype, out=out)
+        else:
+            return (inter_self * (1.0 / self.shape[1])).sum(
+                axis=1, dtype=res_dtype, out=out)
+
+    def diagonal(self, k=0):
+        """Returns the kth diagonal of the array/matrix.
+
+        Parameters
+        ----------
+        k : int, optional
+            Which diagonal to get, corresponding to elements a[i, i+k].
+            Default: 0 (the main diagonal).
+
+            .. versionadded:: 1.0
+
+        See also
+        --------
+        numpy.diagonal : Equivalent numpy function.
+
+        Examples
+        --------
+        >>> from scipy.sparse import csr_array
+        >>> A = csr_array([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
+        >>> A.diagonal()
+        array([1, 0, 5])
+        >>> A.diagonal(k=1)
+        array([2, 3])
+        """
+        return self.tocsr().diagonal(k=k)
+
+    def trace(self, offset=0):
+        """Returns the sum along diagonals of the sparse array/matrix.
+
+        Parameters
+        ----------
+        offset : int, optional
+            Which diagonal to get, corresponding to elements a[i, i+offset].
+            Default: 0 (the main diagonal).
+
+        """
+        return self.diagonal(k=offset).sum()
+
+    def setdiag(self, values, k=0):
+        """
+        Set diagonal or off-diagonal elements of the array/matrix.
+
+        Parameters
+        ----------
+        values : array_like
+            New values of the diagonal elements.
+
+            Values may have any length. If the diagonal is longer than values,
+            then the remaining diagonal entries will not be set. If values are
+            longer than the diagonal, then the remaining values are ignored.
+
+            If a scalar value is given, all of the diagonal is set to it.
+
+        k : int, optional
+            Which off-diagonal to set, corresponding to elements a[i,i+k].
+            Default: 0 (the main diagonal).
+
+        """
+        M, N = self.shape
+        if (k > 0 and k >= N) or (k < 0 and -k >= M):
+            raise ValueError("k exceeds array dimensions")
+        self._setdiag(np.asarray(values), k)
+
+    def _setdiag(self, values, k):
+        """This part of the implementation gets overridden by the
+        different formats.
+        """
+        M, N = self.shape
+        if k < 0:
+            if values.ndim == 0:
+                # broadcast
+                max_index = min(M+k, N)
+                for i in range(max_index):
+                    self[i - k, i] = values
+            else:
+                max_index = min(M+k, N, len(values))
+                if max_index <= 0:
+                    return
+                for i, v in enumerate(values[:max_index]):
+                    self[i - k, i] = v
+        else:
+            if values.ndim == 0:
+                # broadcast
+                max_index = min(M, N-k)
+                for i in range(max_index):
+                    self[i, i + k] = values
+            else:
+                max_index = min(M, N-k, len(values))
+                if max_index <= 0:
+                    return
+                for i, v in enumerate(values[:max_index]):
+                    self[i, i + k] = v
+
+    def _process_toarray_args(self, order, out):
+        if out is not None:
+            if order is not None:
+                raise ValueError('order cannot be specified if out '
+                                 'is not None')
+            if out.shape != self.shape or out.dtype != self.dtype:
+                raise ValueError('out array must be same dtype and shape as '
+                                 'sparse array')
+            out[...] = 0.
+            return out
+        else:
+            return np.zeros(self.shape, dtype=self.dtype, order=order)
+
+    def _get_index_dtype(self, arrays=(), maxval=None, check_contents=False):
+        """
+        Determine index dtype for array.
+
+        This wraps _sputils.get_index_dtype, providing compatibility for both
+        array and matrix API sparse matrices. Matrix API sparse matrices would
+        attempt to downcast the indices - which can be computationally
+        expensive and undesirable for users. The array API changes this
+        behaviour.
+
+        See discussion: https://github.com/scipy/scipy/issues/16774
+
+        The get_index_dtype import is due to implementation details of the test
+        suite. It allows the decorator ``with_64bit_maxval_limit`` to mock a
+        lower int32 max value for checks on the matrix API's downcasting
+        behaviour.
+        """
+        from ._sputils import get_index_dtype
+
+        # Don't check contents for array API
+        return get_index_dtype(arrays,
+                               maxval,
+                               (check_contents and not isinstance(self, sparray)))
+
+
+class sparray:
+    """A namespace class to separate sparray from spmatrix"""
+
+
+sparray.__doc__ = _spbase.__doc__
+
+
+def issparse(x):
+    """Is `x` of a sparse array or sparse matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a sparse array or sparse matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a sparse array or a sparse matrix, False otherwise
+
+    Notes
+    -----
+    Use `isinstance(x, sp.sparse.sparray)` to check between an array or matrix.
+    Use `a.format` to check the sparse format, e.g. `a.format == 'csr'`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csr_array, csr_matrix, issparse
+    >>> issparse(csr_matrix([[5]]))
+    True
+    >>> issparse(csr_array([[5]]))
+    True
+    >>> issparse(np.array([[5]]))
+    False
+    >>> issparse(5)
+    False
+    """
+    return isinstance(x, _spbase)
+
+
+def isspmatrix(x):
+    """Is `x` of a sparse matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a sparse matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a sparse matrix, False otherwise
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csr_array, csr_matrix, isspmatrix
+    >>> isspmatrix(csr_matrix([[5]]))
+    True
+    >>> isspmatrix(csr_array([[5]]))
+    False
+    >>> isspmatrix(np.array([[5]]))
+    False
+    >>> isspmatrix(5)
+    False
+    """
+    return isinstance(x, spmatrix)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_bsr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_bsr.py
new file mode 100644
index 0000000000000000000000000000000000000000..14cf85f8ccf8d7d2b4c63d19938b215e54a9736b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_bsr.py
@@ -0,0 +1,877 @@
+"""Compressed Block Sparse Row format"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['bsr_array', 'bsr_matrix', 'isspmatrix_bsr']
+
+from warnings import warn
+
+import numpy as np
+
+from scipy._lib._util import copy_if_needed
+from ._matrix import spmatrix
+from ._data import _data_matrix, _minmax_mixin
+from ._compressed import _cs_matrix
+from ._base import issparse, _formats, _spbase, sparray
+from ._sputils import (isshape, getdtype, getdata, to_native, upcast,
+                       check_shape)
+from . import _sparsetools
+from ._sparsetools import (bsr_matvec, bsr_matvecs, csr_matmat_maxnnz,
+                           bsr_matmat, bsr_transpose, bsr_sort_indices,
+                           bsr_tocsr)
+
+
+class _bsr_base(_cs_matrix, _minmax_mixin):
+    _format = 'bsr'
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False,
+                 blocksize=None, *, maxprint=None):
+        _data_matrix.__init__(self, arg1, maxprint=maxprint)
+
+        if issparse(arg1):
+            if arg1.format == self.format and copy:
+                arg1 = arg1.copy()
+            else:
+                arg1 = arg1.tobsr(blocksize=blocksize)
+            self.indptr, self.indices, self.data, self._shape = (
+                arg1.indptr, arg1.indices, arg1.data, arg1._shape
+            )
+
+        elif isinstance(arg1,tuple):
+            if isshape(arg1):
+                # it's a tuple of matrix dimensions (M,N)
+                self._shape = check_shape(arg1)
+                M,N = self.shape
+                # process blocksize
+                if blocksize is None:
+                    blocksize = (1,1)
+                else:
+                    if not isshape(blocksize):
+                        raise ValueError(f'invalid blocksize={blocksize}')
+                    blocksize = tuple(blocksize)
+                self.data = np.zeros((0,) + blocksize, getdtype(dtype, default=float))
+
+                R,C = blocksize
+                if (M % R) != 0 or (N % C) != 0:
+                    raise ValueError('shape must be multiple of blocksize')
+
+                # Select index dtype large enough to pass array and
+                # scalar parameters to sparsetools
+                idx_dtype = self._get_index_dtype(maxval=max(M//R, N//C, R, C))
+                self.indices = np.zeros(0, dtype=idx_dtype)
+                self.indptr = np.zeros(M//R + 1, dtype=idx_dtype)
+
+            elif len(arg1) == 2:
+                # (data,(row,col)) format
+                coo = self._coo_container(arg1, dtype=dtype, shape=shape)
+                bsr = coo.tobsr(blocksize=blocksize)
+                self.indptr, self.indices, self.data, self._shape = (
+                    bsr.indptr, bsr.indices, bsr.data, bsr._shape
+                )
+
+            elif len(arg1) == 3:
+                # (data,indices,indptr) format
+                (data, indices, indptr) = arg1
+
+                # Select index dtype large enough to pass array and
+                # scalar parameters to sparsetools
+                maxval = 1
+                if shape is not None:
+                    maxval = max(shape)
+                if blocksize is not None:
+                    maxval = max(maxval, max(blocksize))
+                idx_dtype = self._get_index_dtype((indices, indptr), maxval=maxval,
+                                                  check_contents=True)
+                if not copy:
+                    copy = copy_if_needed
+                self.indices = np.array(indices, copy=copy, dtype=idx_dtype)
+                self.indptr = np.array(indptr, copy=copy, dtype=idx_dtype)
+                self.data = getdata(data, copy=copy, dtype=dtype)
+                if self.data.ndim != 3:
+                    raise ValueError(
+                        f'BSR data must be 3-dimensional, got shape={self.data.shape}'
+                    )
+                if blocksize is not None:
+                    if not isshape(blocksize):
+                        raise ValueError(f'invalid blocksize={blocksize}')
+                    if tuple(blocksize) != self.data.shape[1:]:
+                        raise ValueError(
+                            f'mismatching blocksize={blocksize}'
+                            f' vs {self.data.shape[1:]}'
+                        )
+            else:
+                raise ValueError('unrecognized bsr_array constructor usage')
+        else:
+            # must be dense
+            try:
+                arg1 = np.asarray(arg1)
+            except Exception as e:
+                raise ValueError("unrecognized form for "
+                                 f"{self.format}_matrix constructor") from e
+            if isinstance(self, sparray) and arg1.ndim != 2:
+                raise ValueError(f"BSR arrays don't support {arg1.ndim}D input. Use 2D")
+            arg1 = self._coo_container(arg1, dtype=dtype).tobsr(blocksize=blocksize)
+            self.indptr, self.indices, self.data, self._shape = (
+                arg1.indptr, arg1.indices, arg1.data, arg1._shape
+            )
+
+        if shape is not None:
+            self._shape = check_shape(shape)
+        else:
+            if self.shape is None:
+                # shape not already set, try to infer dimensions
+                try:
+                    M = len(self.indptr) - 1
+                    N = self.indices.max() + 1
+                except Exception as e:
+                    raise ValueError('unable to infer matrix dimensions') from e
+                else:
+                    R,C = self.blocksize
+                    self._shape = check_shape((M*R,N*C))
+
+        if self.shape is None:
+            if shape is None:
+                # TODO infer shape here
+                raise ValueError('need to infer shape')
+            else:
+                self._shape = check_shape(shape)
+
+        if dtype is not None:
+            self.data = self.data.astype(getdtype(dtype, self.data), copy=False)
+
+        self.check_format(full_check=False)
+
+    def check_format(self, full_check=True):
+        """Check whether the array/matrix respects the BSR format.
+
+        Parameters
+        ----------
+        full_check : bool, optional
+            If `True`, run rigorous check, scanning arrays for valid values.
+            Note that activating those check might copy arrays for casting,
+            modifying indices and index pointers' inplace.
+            If `False`, run basic checks on attributes. O(1) operations.
+            Default is `True`.
+        """
+        M,N = self.shape
+        R,C = self.blocksize
+
+        # index arrays should have integer data types
+        if self.indptr.dtype.kind != 'i':
+            warn(f"indptr array has non-integer dtype ({self.indptr.dtype.name})",
+                 stacklevel=2)
+        if self.indices.dtype.kind != 'i':
+            warn(f"indices array has non-integer dtype ({self.indices.dtype.name})",
+                 stacklevel=2)
+
+        # check array shapes
+        if self.indices.ndim != 1 or self.indptr.ndim != 1:
+            raise ValueError("indices, and indptr should be 1-D")
+        if self.data.ndim != 3:
+            raise ValueError("data should be 3-D")
+
+        # check index pointer
+        if (len(self.indptr) != M//R + 1):
+            raise ValueError("index pointer size (%d) should be (%d)" %
+                                (len(self.indptr), M//R + 1))
+        if (self.indptr[0] != 0):
+            raise ValueError("index pointer should start with 0")
+
+        # check index and data arrays
+        if (len(self.indices) != len(self.data)):
+            raise ValueError("indices and data should have the same size")
+        if (self.indptr[-1] > len(self.indices)):
+            raise ValueError("Last value of index pointer should be less than "
+                                "the size of index and data arrays")
+
+        self.prune()
+
+        if full_check:
+            # check format validity (more expensive)
+            if self.nnz > 0:
+                if self.indices.max() >= N//C:
+                    raise ValueError("column index values must be < %d (now max %d)"
+                                     % (N//C, self.indices.max()))
+                if self.indices.min() < 0:
+                    raise ValueError("column index values must be >= 0")
+                if np.diff(self.indptr).min() < 0:
+                    raise ValueError("index pointer values must form a "
+                                        "non-decreasing sequence")
+
+            idx_dtype = self._get_index_dtype((self.indices, self.indptr))
+            self.indptr = np.asarray(self.indptr, dtype=idx_dtype)
+            self.indices = np.asarray(self.indices, dtype=idx_dtype)
+            self.data = to_native(self.data)
+        # if not self.has_sorted_indices():
+        #    warn('Indices were not in sorted order. Sorting indices.')
+        #    self.sort_indices(check_first=False)
+
+    @property
+    def blocksize(self) -> tuple:
+        """Block size of the matrix."""
+        return self.data.shape[1:]
+
+    def _getnnz(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError("_getnnz over an axis is not implemented "
+                                      "for BSR format")
+        R, C = self.blocksize
+        return int(self.indptr[-1]) * R * C
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+
+    def count_nonzero(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError(
+                "count_nonzero over axis is not implemented for BSR format."
+            )
+        return np.count_nonzero(self._deduped_data())
+
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def __repr__(self):
+        _, fmt = _formats[self.format]
+        sparse_cls = 'array' if isinstance(self, sparray) else 'matrix'
+        b = 'x'.join(str(x) for x in self.blocksize)
+        return (
+            f"<{fmt} sparse {sparse_cls} of dtype '{self.dtype}'\n"
+            f"\twith {self.nnz} stored elements (blocksize={b}) and shape {self.shape}>"
+        )
+
+    def diagonal(self, k=0):
+        rows, cols = self.shape
+        if k <= -rows or k >= cols:
+            return np.empty(0, dtype=self.data.dtype)
+        R, C = self.blocksize
+        y = np.zeros(min(rows + min(k, 0), cols - max(k, 0)),
+                     dtype=upcast(self.dtype))
+        _sparsetools.bsr_diagonal(k, rows // R, cols // C, R, C,
+                                  self.indptr, self.indices,
+                                  np.ravel(self.data), y)
+        return y
+
+    diagonal.__doc__ = _spbase.diagonal.__doc__
+
+    ##########################
+    # NotImplemented methods #
+    ##########################
+
+    def __getitem__(self,key):
+        raise NotImplementedError
+
+    def __setitem__(self,key,val):
+        raise NotImplementedError
+
+    ######################
+    # Arithmetic methods #
+    ######################
+
+    def _add_dense(self, other):
+        return self.tocoo(copy=False)._add_dense(other)
+
+    def _matmul_vector(self, other):
+        M,N = self.shape
+        R,C = self.blocksize
+
+        result = np.zeros(self.shape[0], dtype=upcast(self.dtype, other.dtype))
+
+        bsr_matvec(M//R, N//C, R, C,
+            self.indptr, self.indices, self.data.ravel(),
+            other, result)
+
+        return result
+
+    def _matmul_multivector(self,other):
+        R,C = self.blocksize
+        M,N = self.shape
+        n_vecs = other.shape[1]  # number of column vectors
+
+        result = np.zeros((M,n_vecs), dtype=upcast(self.dtype,other.dtype))
+
+        bsr_matvecs(M//R, N//C, n_vecs, R, C,
+                self.indptr, self.indices, self.data.ravel(),
+                other.ravel(), result.ravel())
+
+        return result
+
+    def _matmul_sparse(self, other):
+        M, K1 = self.shape
+        K2, N = other.shape
+
+        R,n = self.blocksize
+
+        # convert to this format
+        if other.format == "bsr":
+            C = other.blocksize[1]
+        else:
+            C = 1
+
+        if other.format == "csr" and n == 1:
+            other = other.tobsr(blocksize=(n,C), copy=False)  # lightweight conversion
+        else:
+            other = other.tobsr(blocksize=(n,C))
+
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                           other.indptr, other.indices))
+
+        bnnz = csr_matmat_maxnnz(M//R, N//C,
+                                 self.indptr.astype(idx_dtype),
+                                 self.indices.astype(idx_dtype),
+                                 other.indptr.astype(idx_dtype),
+                                 other.indices.astype(idx_dtype))
+
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                           other.indptr, other.indices),
+                                          maxval=bnnz)
+        indptr = np.empty(self.indptr.shape, dtype=idx_dtype)
+        indices = np.empty(bnnz, dtype=idx_dtype)
+        data = np.empty(R*C*bnnz, dtype=upcast(self.dtype,other.dtype))
+
+        bsr_matmat(bnnz, M//R, N//C, R, C, n,
+                   self.indptr.astype(idx_dtype),
+                   self.indices.astype(idx_dtype),
+                   np.ravel(self.data),
+                   other.indptr.astype(idx_dtype),
+                   other.indices.astype(idx_dtype),
+                   np.ravel(other.data),
+                   indptr,
+                   indices,
+                   data)
+
+        data = data.reshape(-1,R,C)
+
+        # TODO eliminate zeros
+
+        return self._bsr_container(
+            (data, indices, indptr), shape=(M, N), blocksize=(R, C)
+        )
+
+    ######################
+    # Conversion methods #
+    ######################
+
+    def tobsr(self, blocksize=None, copy=False):
+        """Convert this array/matrix into Block Sparse Row Format.
+
+        With copy=False, the data/indices may be shared between this
+        array/matrix and the resultant bsr_array/bsr_matrix.
+
+        If blocksize=(R, C) is provided, it will be used for determining
+        block size of the bsr_array/bsr_matrix.
+        """
+        if blocksize not in [None, self.blocksize]:
+            return self.tocsr().tobsr(blocksize=blocksize)
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    def tocsr(self, copy=False):
+        M, N = self.shape
+        R, C = self.blocksize
+        nnz = self.nnz
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices),
+                                          maxval=max(nnz, N))
+        indptr = np.empty(M + 1, dtype=idx_dtype)
+        indices = np.empty(nnz, dtype=idx_dtype)
+        data = np.empty(nnz, dtype=upcast(self.dtype))
+
+        bsr_tocsr(M // R,  # n_brow
+                  N // C,  # n_bcol
+                  R, C,
+                  self.indptr.astype(idx_dtype, copy=False),
+                  self.indices.astype(idx_dtype, copy=False),
+                  self.data,
+                  indptr,
+                  indices,
+                  data)
+        return self._csr_container((data, indices, indptr), shape=self.shape)
+
+    tocsr.__doc__ = _spbase.tocsr.__doc__
+
+    def tocsc(self, copy=False):
+        return self.tocsr(copy=False).tocsc(copy=copy)
+
+    tocsc.__doc__ = _spbase.tocsc.__doc__
+
+    def tocoo(self, copy=True):
+        """Convert this array/matrix to COOrdinate format.
+
+        When copy=False the data array will be shared between
+        this array/matrix and the resultant coo_array/coo_matrix.
+        """
+
+        M,N = self.shape
+        R,C = self.blocksize
+
+        indptr_diff = np.diff(self.indptr)
+        if indptr_diff.dtype.itemsize > np.dtype(np.intp).itemsize:
+            # Check for potential overflow
+            indptr_diff_limited = indptr_diff.astype(np.intp)
+            if np.any(indptr_diff_limited != indptr_diff):
+                raise ValueError("Matrix too big to convert")
+            indptr_diff = indptr_diff_limited
+
+        idx_dtype = self._get_index_dtype(maxval=max(M, N))
+        row = (R * np.arange(M//R, dtype=idx_dtype)).repeat(indptr_diff)
+        row = row.repeat(R*C).reshape(-1,R,C)
+        row += np.tile(np.arange(R, dtype=idx_dtype).reshape(-1,1), (1,C))
+        row = row.reshape(-1)
+
+        col = ((C * self.indices).astype(idx_dtype, copy=False)
+               .repeat(R*C).reshape(-1,R,C))
+        col += np.tile(np.arange(C, dtype=idx_dtype), (R,1))
+        col = col.reshape(-1)
+
+        data = self.data.reshape(-1)
+
+        if copy:
+            data = data.copy()
+
+        return self._coo_container(
+            (data, (row, col)), shape=self.shape
+        )
+
+    def toarray(self, order=None, out=None):
+        return self.tocoo(copy=False).toarray(order=order, out=out)
+
+    toarray.__doc__ = _spbase.toarray.__doc__
+
+    def transpose(self, axes=None, copy=False):
+        if axes is not None and axes != (1, 0):
+            raise ValueError("Sparse matrices do not support "
+                              "an 'axes' parameter because swapping "
+                              "dimensions is the only logical permutation.")
+
+        R, C = self.blocksize
+        M, N = self.shape
+        NBLK = self.nnz//(R*C)
+
+        if self.nnz == 0:
+            return self._bsr_container((N, M), blocksize=(C, R),
+                                       dtype=self.dtype, copy=copy)
+
+        indptr = np.empty(N//C + 1, dtype=self.indptr.dtype)
+        indices = np.empty(NBLK, dtype=self.indices.dtype)
+        data = np.empty((NBLK, C, R), dtype=self.data.dtype)
+
+        bsr_transpose(M//R, N//C, R, C,
+                      self.indptr, self.indices, self.data.ravel(),
+                      indptr, indices, data.ravel())
+
+        return self._bsr_container((data, indices, indptr),
+                                   shape=(N, M), copy=copy)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    ##############################################################
+    # methods that examine or modify the internal data structure #
+    ##############################################################
+
+    def eliminate_zeros(self):
+        """Remove zero elements in-place."""
+
+        if not self.nnz:
+            return  # nothing to do
+
+        R,C = self.blocksize
+        M,N = self.shape
+
+        mask = (self.data != 0).reshape(-1,R*C).sum(axis=1)  # nonzero blocks
+
+        nonzero_blocks = mask.nonzero()[0]
+
+        self.data[:len(nonzero_blocks)] = self.data[nonzero_blocks]
+
+        # modifies self.indptr and self.indices *in place*
+        _sparsetools.csr_eliminate_zeros(M//R, N//C, self.indptr,
+                                         self.indices, mask)
+        self.prune()
+
+    def sum_duplicates(self):
+        """Eliminate duplicate array/matrix entries by adding them together
+
+        The is an *in place* operation
+        """
+        if self.has_canonical_format:
+            return
+        self.sort_indices()
+        R, C = self.blocksize
+        M, N = self.shape
+
+        # port of _sparsetools.csr_sum_duplicates
+        n_row = M // R
+        nnz = 0
+        row_end = 0
+        for i in range(n_row):
+            jj = row_end
+            row_end = self.indptr[i+1]
+            while jj < row_end:
+                j = self.indices[jj]
+                x = self.data[jj]
+                jj += 1
+                while jj < row_end and self.indices[jj] == j:
+                    x += self.data[jj]
+                    jj += 1
+                self.indices[nnz] = j
+                self.data[nnz] = x
+                nnz += 1
+            self.indptr[i+1] = nnz
+
+        self.prune()  # nnz may have changed
+        self.has_canonical_format = True
+
+    def sort_indices(self):
+        """Sort the indices of this array/matrix *in place*
+        """
+        if self.has_sorted_indices:
+            return
+
+        R,C = self.blocksize
+        M,N = self.shape
+
+        bsr_sort_indices(M//R, N//C, R, C, self.indptr, self.indices, self.data.ravel())
+
+        self.has_sorted_indices = True
+
+    def prune(self):
+        """Remove empty space after all non-zero elements.
+        """
+
+        R,C = self.blocksize
+        M,N = self.shape
+
+        if len(self.indptr) != M//R + 1:
+            raise ValueError("index pointer has invalid length")
+
+        bnnz = self.indptr[-1]
+
+        if len(self.indices) < bnnz:
+            raise ValueError("indices array has too few elements")
+        if len(self.data) < bnnz:
+            raise ValueError("data array has too few elements")
+
+        self.data = self.data[:bnnz]
+        self.indices = self.indices[:bnnz]
+
+    # utility functions
+    def _binopt(self, other, op, in_shape=None, out_shape=None):
+        """Apply the binary operation fn to two sparse matrices."""
+
+        # Ideally we'd take the GCDs of the blocksize dimensions
+        # and explode self and other to match.
+        other = self.__class__(other, blocksize=self.blocksize)
+
+        # e.g. bsr_plus_bsr, etc.
+        fn = getattr(_sparsetools, self.format + op + self.format)
+
+        R,C = self.blocksize
+
+        max_bnnz = len(self.data) + len(other.data)
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                           other.indptr, other.indices),
+                                          maxval=max_bnnz)
+        indptr = np.empty(self.indptr.shape, dtype=idx_dtype)
+        indices = np.empty(max_bnnz, dtype=idx_dtype)
+
+        bool_ops = ['_ne_', '_lt_', '_gt_', '_le_', '_ge_']
+        if op in bool_ops:
+            data = np.empty(R*C*max_bnnz, dtype=np.bool_)
+        else:
+            data = np.empty(R*C*max_bnnz, dtype=upcast(self.dtype,other.dtype))
+
+        fn(self.shape[0]//R, self.shape[1]//C, R, C,
+           self.indptr.astype(idx_dtype),
+           self.indices.astype(idx_dtype),
+           self.data,
+           other.indptr.astype(idx_dtype),
+           other.indices.astype(idx_dtype),
+           np.ravel(other.data),
+           indptr,
+           indices,
+           data)
+
+        actual_bnnz = indptr[-1]
+        indices = indices[:actual_bnnz]
+        data = data[:R*C*actual_bnnz]
+
+        if actual_bnnz < max_bnnz/2:
+            indices = indices.copy()
+            data = data.copy()
+
+        data = data.reshape(-1,R,C)
+
+        return self.__class__((data, indices, indptr), shape=self.shape)
+
+    # needed by _data_matrix
+    def _with_data(self,data,copy=True):
+        """Returns a matrix with the same sparsity structure as self,
+        but with different data.  By default the structure arrays
+        (i.e. .indptr and .indices) are copied.
+        """
+        if copy:
+            return self.__class__((data,self.indices.copy(),self.indptr.copy()),
+                                   shape=self.shape,dtype=data.dtype)
+        else:
+            return self.__class__((data,self.indices,self.indptr),
+                                   shape=self.shape,dtype=data.dtype)
+
+#    # these functions are used by the parent class
+#    # to remove redundancy between bsc_matrix and bsr_matrix
+#    def _swap(self,x):
+#        """swap the members of x if this is a column-oriented matrix
+#        """
+#        return (x[0],x[1])
+
+    def _broadcast_to(self, shape, copy=False):
+        return _spbase._broadcast_to(self, shape, copy)
+
+
+def isspmatrix_bsr(x):
+    """Is `x` of a bsr_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a bsr matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a bsr matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import bsr_array, bsr_matrix, csr_matrix, isspmatrix_bsr
+    >>> isspmatrix_bsr(bsr_matrix([[5]]))
+    True
+    >>> isspmatrix_bsr(bsr_array([[5]]))
+    False
+    >>> isspmatrix_bsr(csr_matrix([[5]]))
+    False
+    """
+    return isinstance(x, bsr_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class bsr_array(_bsr_base, sparray):
+    """
+    Block Sparse Row format sparse array.
+
+    This can be instantiated in several ways:
+        bsr_array(D, [blocksize=(R,C)])
+            where D is a 2-D ndarray.
+
+        bsr_array(S, [blocksize=(R,C)])
+            with another sparse array or matrix S (equivalent to S.tobsr())
+
+        bsr_array((M, N), [blocksize=(R,C), dtype])
+            to construct an empty sparse array with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        bsr_array((data, ij), [blocksize=(R,C), shape=(M, N)])
+            where ``data`` and ``ij`` satisfy ``a[ij[0, k], ij[1, k]] = data[k]``
+
+        bsr_array((data, indices, indptr), [shape=(M, N)])
+            is the standard BSR representation where the block column
+            indices for row i are stored in ``indices[indptr[i]:indptr[i+1]]``
+            and their corresponding block values are stored in
+            ``data[ indptr[i]: indptr[i+1] ]``. If the shape parameter is not
+            supplied, the array dimensions are inferred from the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        BSR format data array of the array
+    indices
+        BSR format index array of the array
+    indptr
+        BSR format index pointer array of the array
+    blocksize
+        Block size
+    has_sorted_indices : bool
+        Whether indices are sorted
+    has_canonical_format : bool
+    T
+
+    Notes
+    -----
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    **Summary of BSR format**
+
+    The Block Sparse Row (BSR) format is very similar to the Compressed
+    Sparse Row (CSR) format. BSR is appropriate for sparse matrices with dense
+    sub matrices like the last example below. Such sparse block matrices often
+    arise in vector-valued finite element discretizations. In such cases, BSR is
+    considerably more efficient than CSR and CSC for many sparse arithmetic
+    operations.
+
+    **Blocksize**
+
+    The blocksize (R,C) must evenly divide the shape of the sparse array (M,N).
+    That is, R and C must satisfy the relationship ``M % R = 0`` and
+    ``N % C = 0``.
+
+    If no blocksize is specified, a simple heuristic is applied to determine
+    an appropriate blocksize.
+
+    **Canonical Format**
+
+    In canonical format, there are no duplicate blocks and indices are sorted
+    per row.
+
+    **Limitations**
+
+    Block Sparse Row format sparse arrays do not support slicing.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import bsr_array
+    >>> bsr_array((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 0, 1, 2, 2, 2])
+    >>> col = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3 ,4, 5, 6])
+    >>> bsr_array((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6]).repeat(4).reshape(6, 2, 2)
+    >>> bsr_array((data,indices,indptr), shape=(6, 6)).toarray()
+    array([[1, 1, 0, 0, 2, 2],
+           [1, 1, 0, 0, 2, 2],
+           [0, 0, 0, 0, 3, 3],
+           [0, 0, 0, 0, 3, 3],
+           [4, 4, 5, 5, 6, 6],
+           [4, 4, 5, 5, 6, 6]])
+
+    """
+
+
+class bsr_matrix(spmatrix, _bsr_base):
+    """
+    Block Sparse Row format sparse matrix.
+
+    This can be instantiated in several ways:
+        bsr_matrix(D, [blocksize=(R,C)])
+            where D is a 2-D ndarray.
+
+        bsr_matrix(S, [blocksize=(R,C)])
+            with another sparse array or matrix S (equivalent to S.tobsr())
+
+        bsr_matrix((M, N), [blocksize=(R,C), dtype])
+            to construct an empty sparse matrix with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        bsr_matrix((data, ij), [blocksize=(R,C), shape=(M, N)])
+            where ``data`` and ``ij`` satisfy ``a[ij[0, k], ij[1, k]] = data[k]``
+
+        bsr_matrix((data, indices, indptr), [shape=(M, N)])
+            is the standard BSR representation where the block column
+            indices for row i are stored in ``indices[indptr[i]:indptr[i+1]]``
+            and their corresponding block values are stored in
+            ``data[ indptr[i]: indptr[i+1] ]``. If the shape parameter is not
+            supplied, the matrix dimensions are inferred from the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        BSR format data array of the matrix
+    indices
+        BSR format index array of the matrix
+    indptr
+        BSR format index pointer array of the matrix
+    blocksize
+        Block size
+    has_sorted_indices : bool
+        Whether indices are sorted
+    has_canonical_format : bool
+    T
+
+    Notes
+    -----
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    **Summary of BSR format**
+
+    The Block Sparse Row (BSR) format is very similar to the Compressed
+    Sparse Row (CSR) format. BSR is appropriate for sparse matrices with dense
+    sub matrices like the last example below. Such sparse block matrices often
+    arise in vector-valued finite element discretizations. In such cases, BSR is
+    considerably more efficient than CSR and CSC for many sparse arithmetic
+    operations.
+
+    **Blocksize**
+
+    The blocksize (R,C) must evenly divide the shape of the sparse matrix (M,N).
+    That is, R and C must satisfy the relationship ``M % R = 0`` and
+    ``N % C = 0``.
+
+    If no blocksize is specified, a simple heuristic is applied to determine
+    an appropriate blocksize.
+
+    **Canonical Format**
+
+    In canonical format, there are no duplicate blocks and indices are sorted
+    per row.
+
+    **Limitations**
+
+    Block Sparse Row format sparse matrices do not support slicing.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import bsr_matrix
+    >>> bsr_matrix((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 0, 1, 2, 2, 2])
+    >>> col = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3 ,4, 5, 6])
+    >>> bsr_matrix((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6]).repeat(4).reshape(6, 2, 2)
+    >>> bsr_matrix((data,indices,indptr), shape=(6, 6)).toarray()
+    array([[1, 1, 0, 0, 2, 2],
+           [1, 1, 0, 0, 2, 2],
+           [0, 0, 0, 0, 3, 3],
+           [0, 0, 0, 0, 3, 3],
+           [4, 4, 5, 5, 6, 6],
+           [4, 4, 5, 5, 6, 6]])
+
+    """
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_compressed.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_compressed.py
new file mode 100644
index 0000000000000000000000000000000000000000..e5f43c16bd924ac6bd70cfd4634dc3afcd298391
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_compressed.py
@@ -0,0 +1,1500 @@
+"""Base class for sparse matrix formats using compressed storage."""
+__all__ = []
+
+from warnings import warn
+import itertools
+import operator
+
+import numpy as np
+from scipy._lib._util import _prune_array, copy_if_needed
+
+from ._base import _spbase, issparse, sparray, SparseEfficiencyWarning
+from ._data import _data_matrix, _minmax_mixin
+from . import _sparsetools
+from ._sparsetools import (get_csr_submatrix, csr_sample_offsets, csr_todense,
+                           csr_sample_values, csr_row_index, csr_row_slice,
+                           csr_column_index1, csr_column_index2)
+from ._index import IndexMixin
+from ._sputils import (upcast, upcast_char, to_native, isdense, isshape,
+                       getdtype, isscalarlike, isintlike, downcast_intp_index,
+                       get_sum_dtype, check_shape, get_index_dtype, broadcast_shapes,
+                       is_pydata_spmatrix)
+
+
+class _cs_matrix(_data_matrix, _minmax_mixin, IndexMixin):
+    """
+    base array/matrix class for compressed row- and column-oriented arrays/matrices
+    """
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False, *, maxprint=None):
+        _data_matrix.__init__(self, arg1, maxprint=maxprint)
+
+        if issparse(arg1):
+            if arg1.format == self.format and copy:
+                arg1 = arg1.copy()
+            else:
+                arg1 = arg1.asformat(self.format)
+            self.indptr, self.indices, self.data, self._shape = (
+                arg1.indptr, arg1.indices, arg1.data, arg1._shape
+            )
+
+        elif isinstance(arg1, tuple):
+            if isshape(arg1, allow_nd=self._allow_nd):
+                # It's a tuple of matrix dimensions (M, N)
+                # create empty matrix
+                self._shape = check_shape(arg1, allow_nd=self._allow_nd)
+                M, N = self._swap(self._shape_as_2d)
+                # Select index dtype large enough to pass array and
+                # scalar parameters to sparsetools
+                idx_dtype = self._get_index_dtype(maxval=max(self.shape))
+                self.data = np.zeros(0, getdtype(dtype, default=float))
+                self.indices = np.zeros(0, idx_dtype)
+                self.indptr = np.zeros(M + 1, dtype=idx_dtype)
+            else:
+                if len(arg1) == 2:
+                    # (data, ij) format
+                    coo = self._coo_container(arg1, shape=shape, dtype=dtype)
+                    arrays = coo._coo_to_compressed(self._swap)
+                    self.indptr, self.indices, self.data, self._shape = arrays
+                    self.sum_duplicates()
+                elif len(arg1) == 3:
+                    # (data, indices, indptr) format
+                    (data, indices, indptr) = arg1
+
+                    # Select index dtype large enough to pass array and
+                    # scalar parameters to sparsetools
+                    maxval = None
+                    if shape is not None and 0 not in shape:
+                        maxval = max(shape)
+                    idx_dtype = self._get_index_dtype((indices, indptr),
+                                                maxval=maxval,
+                                                check_contents=True)
+
+                    if not copy:
+                        copy = copy_if_needed
+                    self.indices = np.array(indices, copy=copy, dtype=idx_dtype)
+                    self.indptr = np.array(indptr, copy=copy, dtype=idx_dtype)
+                    self.data = np.array(data, copy=copy, dtype=dtype)
+                else:
+                    raise ValueError(f"unrecognized {self.__class__.__name__} "
+                                     f"constructor input: {arg1}")
+
+        else:
+            # must be dense
+            try:
+                arg1 = np.asarray(arg1)
+            except Exception as e:
+                raise ValueError(f"unrecognized {self.__class__.__name__} "
+                                 f"constructor input: {arg1}") from e
+            if isinstance(self, sparray) and arg1.ndim != 2 and self.format == "csc":
+                raise ValueError(f"CSC arrays don't support {arg1.ndim}D input. Use 2D")
+            if arg1.ndim > 2:
+                raise ValueError(f"CSR arrays don't yet support {arg1.ndim}D.")
+
+            coo = self._coo_container(arg1, dtype=dtype)
+            arrays = coo._coo_to_compressed(self._swap)
+            self.indptr, self.indices, self.data, self._shape = arrays
+
+        # Read matrix dimensions given, if any
+        if shape is not None:
+            self._shape = check_shape(shape, allow_nd=self._allow_nd)
+        elif self.shape is None:
+            # shape not already set, try to infer dimensions
+            try:
+                M = len(self.indptr) - 1
+                N = self.indices.max() + 1
+            except Exception as e:
+                raise ValueError('unable to infer matrix dimensions') from e
+
+            self._shape = check_shape(self._swap((M, N)), allow_nd=self._allow_nd)
+
+        if dtype is not None:
+            newdtype = getdtype(dtype)
+            self.data = self.data.astype(newdtype, copy=False)
+
+        self.check_format(full_check=False)
+
+    def _getnnz(self, axis=None):
+        if axis is None:
+            return int(self.indptr[-1])
+        elif self.ndim == 1:
+            if axis in (0, -1):
+                return int(self.indptr[-1])
+            raise ValueError('axis out of bounds')
+        else:
+            if axis < 0:
+                axis += 2
+            axis, _ = self._swap((axis, 1 - axis))
+            _, N = self._swap(self.shape)
+            if axis == 0:
+                return np.bincount(downcast_intp_index(self.indices), minlength=N)
+            elif axis == 1:
+                return np.diff(self.indptr)
+            raise ValueError('axis out of bounds')
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+
+    def count_nonzero(self, axis=None):
+        self.sum_duplicates()
+        if axis is None:
+            return np.count_nonzero(self.data)
+
+        if self.ndim == 1:
+            if axis not in (0, -1):
+                raise ValueError('axis out of bounds')
+            return np.count_nonzero(self.data)
+
+        if axis < 0:
+            axis += 2
+        axis, _ = self._swap((axis, 1 - axis))
+        if axis == 0:
+            _, N = self._swap(self.shape)
+            mask = self.data != 0
+            idx = self.indices if mask.all() else self.indices[mask]
+            return np.bincount(downcast_intp_index(idx), minlength=N)
+        elif axis == 1:
+            if self.data.all():
+                return np.diff(self.indptr)
+            pairs = itertools.pairwise(self.indptr)
+            return np.array([np.count_nonzero(self.data[i:j]) for i, j in pairs])
+        else:
+            raise ValueError('axis out of bounds')
+
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def check_format(self, full_check=True):
+        """Check whether the array/matrix respects the CSR or CSC format.
+
+        Parameters
+        ----------
+        full_check : bool, optional
+            If `True`, run rigorous check, scanning arrays for valid values.
+            Note that activating those check might copy arrays for casting,
+            modifying indices and index pointers' inplace.
+            If `False`, run basic checks on attributes. O(1) operations.
+            Default is `True`.
+        """
+        # index arrays should have integer data types
+        if self.indptr.dtype.kind != 'i':
+            warn(f"indptr array has non-integer dtype ({self.indptr.dtype.name})",
+                 stacklevel=3)
+        if self.indices.dtype.kind != 'i':
+            warn(f"indices array has non-integer dtype ({self.indices.dtype.name})",
+                 stacklevel=3)
+
+        # check array shapes
+        for x in [self.data.ndim, self.indices.ndim, self.indptr.ndim]:
+            if x != 1:
+                raise ValueError('data, indices, and indptr should be 1-D')
+
+        # check index pointer. Use _swap to determine proper bounds
+        M, N = self._swap(self._shape_as_2d)
+
+        if (len(self.indptr) != M + 1):
+            raise ValueError(f"index pointer size {len(self.indptr)} should be {M + 1}")
+        if (self.indptr[0] != 0):
+            raise ValueError("index pointer should start with 0")
+
+        # check index and data arrays
+        if (len(self.indices) != len(self.data)):
+            raise ValueError("indices and data should have the same size")
+        if (self.indptr[-1] > len(self.indices)):
+            raise ValueError("Last value of index pointer should be less than "
+                             "the size of index and data arrays")
+
+        self.prune()
+
+        if full_check:
+            # check format validity (more expensive)
+            if self.nnz > 0:
+                if self.indices.max() >= N:
+                    raise ValueError(f"indices must be < {N}")
+                if self.indices.min() < 0:
+                    raise ValueError("indices must be >= 0")
+                if np.diff(self.indptr).min() < 0:
+                    raise ValueError("indptr must be a non-decreasing sequence")
+
+            idx_dtype = self._get_index_dtype((self.indptr, self.indices))
+            self.indptr = np.asarray(self.indptr, dtype=idx_dtype)
+            self.indices = np.asarray(self.indices, dtype=idx_dtype)
+            self.data = to_native(self.data)
+
+        # if not self.has_sorted_indices():
+        #    warn('Indices were not in sorted order.  Sorting indices.')
+        #    self.sort_indices()
+        #    assert(self.has_sorted_indices())
+        # TODO check for duplicates?
+
+    #######################
+    # Boolean comparisons #
+    #######################
+
+    def _scalar_binopt(self, other, op):
+        """Scalar version of self._binopt, for cases in which no new nonzeros
+        are added. Produces a new sparse array in canonical form.
+        """
+        self.sum_duplicates()
+        res = self._with_data(op(self.data, other), copy=True)
+        res.eliminate_zeros()
+        return res
+
+    def __eq__(self, other):
+        # Scalar other.
+        if isscalarlike(other):
+            if np.isnan(other):
+                return self.__class__(self.shape, dtype=np.bool_)
+
+            if other == 0:
+                warn("Comparing a sparse matrix with 0 using == is inefficient"
+                     ", try using != instead.", SparseEfficiencyWarning,
+                     stacklevel=3)
+                all_true = self.__class__(np.ones(self.shape, dtype=np.bool_))
+                inv = self._scalar_binopt(other, operator.ne)
+                return all_true - inv
+            else:
+                return self._scalar_binopt(other, operator.eq)
+        # Dense other.
+        elif isdense(other):
+            return self.todense() == other
+        # Pydata sparse other.
+        elif is_pydata_spmatrix(other):
+            return NotImplemented
+        # Sparse other.
+        elif issparse(other):
+            warn("Comparing sparse matrices using == is inefficient, try using"
+                 " != instead.", SparseEfficiencyWarning, stacklevel=3)
+            # TODO sparse broadcasting
+            if self.shape != other.shape:
+                return False
+            elif self.format != other.format:
+                other = other.asformat(self.format)
+            res = self._binopt(other, '_ne_')
+            all_true = self.__class__(np.ones(self.shape, dtype=np.bool_))
+            return all_true - res
+        else:
+            return NotImplemented
+
+    def __ne__(self, other):
+        # Scalar other.
+        if isscalarlike(other):
+            if np.isnan(other):
+                warn("Comparing a sparse matrix with nan using != is"
+                     " inefficient", SparseEfficiencyWarning, stacklevel=3)
+                all_true = self.__class__(np.ones(self.shape, dtype=np.bool_))
+                return all_true
+            elif other != 0:
+                warn("Comparing a sparse matrix with a nonzero scalar using !="
+                     " is inefficient, try using == instead.",
+                     SparseEfficiencyWarning, stacklevel=3)
+                all_true = self.__class__(np.ones(self.shape), dtype=np.bool_)
+                inv = self._scalar_binopt(other, operator.eq)
+                return all_true - inv
+            else:
+                return self._scalar_binopt(other, operator.ne)
+        # Dense other.
+        elif isdense(other):
+            return self.todense() != other
+        # Pydata sparse other.
+        elif is_pydata_spmatrix(other):
+            return NotImplemented
+        # Sparse other.
+        elif issparse(other):
+            # TODO sparse broadcasting
+            if self.shape != other.shape:
+                return True
+            elif self.format != other.format:
+                other = other.asformat(self.format)
+            return self._binopt(other, '_ne_')
+        else:
+            return NotImplemented
+
+    def _inequality(self, other, op, op_name, bad_scalar_msg):
+        # Scalar other.
+        if isscalarlike(other):
+            if 0 == other and op_name in ('_le_', '_ge_'):
+                raise NotImplementedError(" >= and <= don't work with 0.")
+            elif op(0, other):
+                warn(bad_scalar_msg, SparseEfficiencyWarning, stacklevel=3)
+                other_arr = np.empty(self.shape, dtype=np.result_type(other))
+                other_arr.fill(other)
+                other_arr = self.__class__(other_arr)
+                return self._binopt(other_arr, op_name)
+            else:
+                return self._scalar_binopt(other, op)
+        # Dense other.
+        elif isdense(other):
+            return op(self.todense(), other)
+        # Sparse other.
+        elif issparse(other):
+            # TODO sparse broadcasting
+            if self.shape != other.shape:
+                raise ValueError("inconsistent shapes")
+            elif self.format != other.format:
+                other = other.asformat(self.format)
+            if op_name not in ('_ge_', '_le_'):
+                return self._binopt(other, op_name)
+
+            warn("Comparing sparse matrices using >= and <= is inefficient, "
+                 "using <, >, or !=, instead.",
+                 SparseEfficiencyWarning, stacklevel=3)
+            all_true = self.__class__(np.ones(self.shape, dtype=np.bool_))
+            res = self._binopt(other, '_gt_' if op_name == '_le_' else '_lt_')
+            return all_true - res
+        else:
+            return NotImplemented
+
+    def __lt__(self, other):
+        return self._inequality(other, operator.lt, '_lt_',
+                                "Comparing a sparse matrix with a scalar "
+                                "greater than zero using < is inefficient, "
+                                "try using >= instead.")
+
+    def __gt__(self, other):
+        return self._inequality(other, operator.gt, '_gt_',
+                                "Comparing a sparse matrix with a scalar "
+                                "less than zero using > is inefficient, "
+                                "try using <= instead.")
+
+    def __le__(self, other):
+        return self._inequality(other, operator.le, '_le_',
+                                "Comparing a sparse matrix with a scalar "
+                                "greater than zero using <= is inefficient, "
+                                "try using > instead.")
+
+    def __ge__(self, other):
+        return self._inequality(other, operator.ge, '_ge_',
+                                "Comparing a sparse matrix with a scalar "
+                                "less than zero using >= is inefficient, "
+                                "try using < instead.")
+
+    #################################
+    # Arithmetic operator overrides #
+    #################################
+
+    def _add_dense(self, other):
+        if other.shape != self.shape:
+            raise ValueError(f'Incompatible shapes ({self.shape} and {other.shape})')
+        dtype = upcast_char(self.dtype.char, other.dtype.char)
+        order = self._swap('CF')[0]
+        result = np.array(other, dtype=dtype, order=order, copy=True)
+        y = result if result.flags.c_contiguous else result.T
+        M, N = self._swap(self._shape_as_2d)
+        csr_todense(M, N, self.indptr, self.indices, self.data, y)
+        return self._container(result, copy=False)
+
+    def _add_sparse(self, other):
+        return self._binopt(other, '_plus_')
+
+    def _sub_sparse(self, other):
+        return self._binopt(other, '_minus_')
+
+    def multiply(self, other):
+        """Point-wise multiplication by array/matrix, vector, or scalar."""
+        # Scalar multiplication.
+        if isscalarlike(other):
+            return self._mul_scalar(other)
+        # Sparse matrix or vector.
+        if issparse(other):
+            if self.shape == other.shape:
+                other = self.__class__(other)
+                return self._binopt(other, '_elmul_')
+            # Single element.
+            if other.shape == (1, 1):
+                result = self._mul_scalar(other.toarray()[0, 0])
+                if self.ndim == 1:
+                    return result.reshape((1, self.shape[0]))
+                return result
+            if other.shape == (1,):
+                return self._mul_scalar(other.toarray()[0])
+            if self.shape in ((1,), (1, 1)):
+                return other._mul_scalar(self.data.sum())
+
+            # broadcast. treat 1d like a row
+            sM, sN = self._shape_as_2d
+            oM, oN = other._shape_as_2d
+            # A row times a column.
+            if sM == 1 and oN == 1:
+                return other._matmul_sparse(self.reshape(sM, sN).tocsc())
+            if sN == 1 and oM == 1:
+                return self._matmul_sparse(other.reshape(oM, oN).tocsc())
+
+            is_array = isinstance(self, sparray)
+            # Other is a row.
+            if oM == 1 and sN == oN:
+                new_other = _make_diagonal_csr(other.toarray().ravel(), is_array)
+                result = self._matmul_sparse(new_other)
+                return result if self.ndim == 2 else result.reshape((1, oN))
+            # self is a row.
+            if sM == 1 and sN == oN:
+                copy = _make_diagonal_csr(self.toarray().ravel(), is_array)
+                return other._matmul_sparse(copy)
+
+            # Other is a column.
+            if oN == 1 and sM == oM:
+                new_other = _make_diagonal_csr(other.toarray().ravel(), is_array)
+                return new_other._matmul_sparse(self)
+            # self is a column.
+            if sN == 1 and sM == oM:
+                new_self = _make_diagonal_csr(self.toarray().ravel(), is_array)
+                return new_self._matmul_sparse(other)
+            raise ValueError("inconsistent shapes")
+
+        # Assume other is a dense matrix/array, which produces a single-item
+        # object array if other isn't convertible to ndarray.
+        other = np.asanyarray(other)
+
+        if other.ndim > 2:
+            return np.multiply(self.toarray(), other)
+        # Single element / wrapped object.
+        if other.size == 1:
+            if other.dtype == np.object_:
+                # 'other' not convertible to ndarray.
+                return NotImplemented
+            bshape = broadcast_shapes(self.shape, other.shape)
+            return self._mul_scalar(other.flat[0]).reshape(bshape)
+        # Fast case for trivial sparse matrix.
+        if self.shape in ((1,), (1, 1)):
+            bshape = broadcast_shapes(self.shape, other.shape)
+            return np.multiply(self.data.sum(), other).reshape(bshape)
+
+        ret = self.tocoo()
+        # Matching shapes.
+        if self.shape == other.shape:
+            data = np.multiply(ret.data, other[ret.coords])
+            ret.data = data.view(np.ndarray).ravel()
+            return ret
+
+        # convert other to 2d
+        other2d = np.atleast_2d(other)
+        # Sparse row vector times...
+        if self.shape[0] == 1 or self.ndim == 1:
+            if other2d.shape[1] == 1:  # Dense column vector.
+                data = np.multiply(ret.data, other2d)
+            elif other2d.shape[1] == self.shape[-1]:  # Dense 2d matrix.
+                data = np.multiply(ret.data, other2d[:, ret.col])
+            else:
+                raise ValueError("inconsistent shapes")
+            idx_dtype = self._get_index_dtype(ret.col,
+                                              maxval=ret.nnz * other2d.shape[0])
+            row = np.repeat(np.arange(other2d.shape[0], dtype=idx_dtype), ret.nnz)
+            col = np.tile(ret.col.astype(idx_dtype, copy=False), other2d.shape[0])
+            return self._coo_container(
+                (data.view(np.ndarray).ravel(), (row, col)),
+                shape=(other2d.shape[0], self.shape[-1]),
+                copy=False
+            )
+        # Sparse column vector times...
+        if self.shape[1] == 1:
+            if other2d.shape[0] == 1:  # Dense row vector.
+                data = np.multiply(ret.data[:, None], other2d)
+            elif other2d.shape[0] == self.shape[0]:  # Dense 2d array.
+                data = np.multiply(ret.data[:, None], other2d[ret.row])
+            else:
+                raise ValueError("inconsistent shapes")
+            idx_dtype = self._get_index_dtype(ret.row,
+                                              maxval=ret.nnz * other2d.shape[1])
+            row = np.repeat(ret.row.astype(idx_dtype, copy=False), other2d.shape[1])
+            col = np.tile(np.arange(other2d.shape[1], dtype=idx_dtype), ret.nnz)
+            return self._coo_container(
+                (data.view(np.ndarray).ravel(), (row, col)),
+                shape=(self.shape[0], other2d.shape[1]),
+                copy=False
+            )
+        # Sparse matrix times dense row vector.
+        if other2d.shape[0] == 1 and self.shape[1] == other2d.shape[1]:
+            data = np.multiply(ret.data, other2d[:, ret.col].ravel())
+        # Sparse matrix times dense column vector.
+        elif other2d.shape[1] == 1 and self.shape[0] == other2d.shape[0]:
+            data = np.multiply(ret.data, other2d[ret.row].ravel())
+        else:
+            raise ValueError("inconsistent shapes")
+        ret.data = data.view(np.ndarray).ravel()
+        return ret
+
+    ###########################
+    # Multiplication handlers #
+    ###########################
+
+    def _matmul_vector(self, other):
+        M, N = self._shape_as_2d
+
+        # output array
+        result = np.zeros(M, dtype=upcast_char(self.dtype.char, other.dtype.char))
+
+        # csr_matvec or csc_matvec
+        fn = getattr(_sparsetools, self.format + '_matvec')
+        fn(M, N, self.indptr, self.indices, self.data, other, result)
+
+        return result[0] if self.ndim == 1 else result
+
+    def _matmul_multivector(self, other):
+        M, N = self._shape_as_2d
+        n_vecs = other.shape[-1]  # number of column vectors
+
+        result = np.zeros((M, n_vecs),
+                          dtype=upcast_char(self.dtype.char, other.dtype.char))
+
+        # csr_matvecs or csc_matvecs
+        fn = getattr(_sparsetools, self.format + '_matvecs')
+        fn(M, N, n_vecs, self.indptr, self.indices, self.data,
+           other.ravel(), result.ravel())
+
+        if self.ndim == 1:
+            return result.reshape((n_vecs,))
+        return result
+
+    def _matmul_sparse(self, other):
+        M, K1 = self._shape_as_2d
+        # if other is 1d, treat as a **column**
+        o_ndim = other.ndim
+        if o_ndim == 1:
+            # convert 1d array to a 2d column when on the right of @
+            other = other.reshape((1, other.shape[0])).T  # Note: converts to CSC
+        K2, N = other._shape if other.ndim == 2 else (other.shape[0], 1)
+
+        # find new_shape: (M, N), (M,), (N,) or ()
+        new_shape = ()
+        if self.ndim == 2:
+            new_shape += (M,)
+        if o_ndim == 2:
+            new_shape += (N,)
+        faux_shape = (M if self.ndim == 2 else 1, N if o_ndim == 2 else 1)
+
+        major_dim = self._swap((M, N))[0]
+        other = self.__class__(other)  # convert to this format
+
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                     other.indptr, other.indices))
+
+        fn = getattr(_sparsetools, self.format + '_matmat_maxnnz')
+        nnz = fn(M, N,
+                 np.asarray(self.indptr, dtype=idx_dtype),
+                 np.asarray(self.indices, dtype=idx_dtype),
+                 np.asarray(other.indptr, dtype=idx_dtype),
+                 np.asarray(other.indices, dtype=idx_dtype))
+        if nnz == 0:
+            if new_shape == ():
+                return np.array(0, dtype=upcast(self.dtype, other.dtype))
+            return self.__class__(new_shape, dtype=upcast(self.dtype, other.dtype))
+
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                     other.indptr, other.indices),
+                                    maxval=nnz)
+
+        indptr = np.empty(major_dim + 1, dtype=idx_dtype)
+        indices = np.empty(nnz, dtype=idx_dtype)
+        data = np.empty(nnz, dtype=upcast(self.dtype, other.dtype))
+
+        fn = getattr(_sparsetools, self.format + '_matmat')
+        fn(M, N, np.asarray(self.indptr, dtype=idx_dtype),
+           np.asarray(self.indices, dtype=idx_dtype),
+           self.data,
+           np.asarray(other.indptr, dtype=idx_dtype),
+           np.asarray(other.indices, dtype=idx_dtype),
+           other.data,
+           indptr, indices, data)
+
+        if new_shape == ():
+            return np.array(data[0])
+        res = self.__class__((data, indices, indptr), shape=faux_shape)
+        if faux_shape != new_shape:
+            if res.format != 'csr':
+                res = res.tocsr()
+            res = res.reshape(new_shape)
+        return res
+
+    def diagonal(self, k=0):
+        rows, cols = self.shape
+        if k <= -rows or k >= cols:
+            return np.empty(0, dtype=self.data.dtype)
+        fn = getattr(_sparsetools, self.format + "_diagonal")
+        y = np.empty(min(rows + min(k, 0), cols - max(k, 0)),
+                     dtype=upcast(self.dtype))
+        fn(k, self.shape[0], self.shape[1], self.indptr, self.indices,
+           self.data, y)
+        return y
+
+    diagonal.__doc__ = _spbase.diagonal.__doc__
+
+    #####################
+    # Other binary ops  #
+    #####################
+
+    def _maximum_minimum(self, other, npop, op_name, dense_check):
+        if isscalarlike(other):
+            if dense_check(other):
+                warn("Taking maximum (minimum) with > 0 (< 0) number results"
+                     " to a dense matrix.", SparseEfficiencyWarning,
+                     stacklevel=3)
+                other_arr = np.empty(self.shape, dtype=np.asarray(other).dtype)
+                other_arr.fill(other)
+                other_arr = self.__class__(other_arr)
+                return self._binopt(other_arr, op_name)
+            else:
+                self.sum_duplicates()
+                new_data = npop(self.data, np.asarray(other))
+                mat = self.__class__((new_data, self.indices, self.indptr),
+                                     dtype=new_data.dtype, shape=self.shape)
+                return mat
+        elif isdense(other):
+            return npop(self.todense(), other)
+        elif issparse(other):
+            return self._binopt(other, op_name)
+        else:
+            raise ValueError("Operands not compatible.")
+
+    def maximum(self, other):
+        return self._maximum_minimum(other, np.maximum,
+                                     '_maximum_', lambda x: np.asarray(x) > 0)
+
+    maximum.__doc__ = _spbase.maximum.__doc__
+
+    def minimum(self, other):
+        return self._maximum_minimum(other, np.minimum,
+                                     '_minimum_', lambda x: np.asarray(x) < 0)
+
+    minimum.__doc__ = _spbase.minimum.__doc__
+
+    #####################
+    # Reduce operations #
+    #####################
+
+    def sum(self, axis=None, dtype=None, out=None):
+        """Sum the array/matrix over the given axis.  If the axis is None, sum
+        over both rows and columns, returning a scalar.
+        """
+        # The _spbase base class already does axis=0 and axis=1 efficiently
+        # so we only do the case axis=None here
+        if (self.ndim == 2 and not hasattr(self, 'blocksize') and
+                axis in self._swap(((1, -1), (0, -2)))[0]):
+            # faster than multiplication for large minor axis in CSC/CSR
+            res_dtype = get_sum_dtype(self.dtype)
+            ret = np.zeros(len(self.indptr) - 1, dtype=res_dtype)
+
+            major_index, value = self._minor_reduce(np.add)
+            ret[major_index] = value
+            ret = self._ascontainer(ret)
+            if axis % 2 == 1:
+                ret = ret.T
+
+            return ret.sum(axis=(), dtype=dtype, out=out)
+        else:
+            # _spbase handles the situations when axis is in {None, -2, -1, 0, 1}
+            return _spbase.sum(self, axis=axis, dtype=dtype, out=out)
+
+    sum.__doc__ = _spbase.sum.__doc__
+
+    def _minor_reduce(self, ufunc, data=None):
+        """Reduce nonzeros with a ufunc over the minor axis when non-empty
+
+        Can be applied to a function of self.data by supplying data parameter.
+
+        Warning: this does not call sum_duplicates()
+
+        Returns
+        -------
+        major_index : array of ints
+            Major indices where nonzero
+
+        value : array of self.dtype
+            Reduce result for nonzeros in each major_index
+        """
+        if data is None:
+            data = self.data
+        major_index = np.flatnonzero(np.diff(self.indptr))
+        value = ufunc.reduceat(data,
+                               downcast_intp_index(self.indptr[major_index]))
+        return major_index, value
+
+    #######################
+    # Getting and Setting #
+    #######################
+
+    def _get_intXint(self, row, col):
+        M, N = self._swap(self.shape)
+        major, minor = self._swap((row, col))
+        indptr, indices, data = get_csr_submatrix(
+            M, N, self.indptr, self.indices, self.data,
+            major, major + 1, minor, minor + 1)
+        return data.sum(dtype=self.dtype)
+
+    def _get_sliceXslice(self, row, col):
+        major, minor = self._swap((row, col))
+        if major.step in (1, None) and minor.step in (1, None):
+            return self._get_submatrix(major, minor, copy=True)
+        return self._major_slice(major)._minor_slice(minor)
+
+    def _get_arrayXarray(self, row, col):
+        # inner indexing
+        idx_dtype = self.indices.dtype
+        M, N = self._swap(self.shape)
+        major, minor = self._swap((row, col))
+        major = np.asarray(major, dtype=idx_dtype)
+        minor = np.asarray(minor, dtype=idx_dtype)
+
+        val = np.empty(major.size, dtype=self.dtype)
+        csr_sample_values(M, N, self.indptr, self.indices, self.data,
+                          major.size, major.ravel(), minor.ravel(), val)
+        if major.ndim == 1:
+            return self._ascontainer(val)
+        return self.__class__(val.reshape(major.shape))
+
+    def _get_columnXarray(self, row, col):
+        # outer indexing
+        major, minor = self._swap((row, col))
+        return self._major_index_fancy(major)._minor_index_fancy(minor)
+
+    def _major_index_fancy(self, idx):
+        """Index along the major axis where idx is an array of ints.
+        """
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices))
+        indices = np.asarray(idx, dtype=idx_dtype).ravel()
+
+        N = self._swap(self._shape_as_2d)[1]
+        M = len(indices)
+        new_shape = self._swap((M, N)) if self.ndim == 2 else (M,)
+        if M == 0:
+            return self.__class__(new_shape, dtype=self.dtype)
+
+        row_nnz = (self.indptr[indices + 1] - self.indptr[indices]).astype(idx_dtype)
+        res_indptr = np.zeros(M + 1, dtype=idx_dtype)
+        np.cumsum(row_nnz, out=res_indptr[1:])
+
+        nnz = res_indptr[-1]
+        res_indices = np.empty(nnz, dtype=idx_dtype)
+        res_data = np.empty(nnz, dtype=self.dtype)
+        csr_row_index(
+            M,
+            indices,
+            self.indptr.astype(idx_dtype, copy=False),
+            self.indices.astype(idx_dtype, copy=False),
+            self.data,
+            res_indices,
+            res_data
+        )
+
+        return self.__class__((res_data, res_indices, res_indptr),
+                              shape=new_shape, copy=False)
+
+    def _major_slice(self, idx, copy=False):
+        """Index along the major axis where idx is a slice object.
+        """
+        if idx == slice(None):
+            return self.copy() if copy else self
+
+        M, N = self._swap(self._shape_as_2d)
+        start, stop, step = idx.indices(M)
+        M = len(range(start, stop, step))
+        new_shape = self._swap((M, N)) if self.ndim == 2 else (M,)
+        if M == 0:
+            return self.__class__(new_shape, dtype=self.dtype)
+
+        # Work out what slices are needed for `row_nnz`
+        # start,stop can be -1, only if step is negative
+        start0, stop0 = start, stop
+        if stop == -1 and start >= 0:
+            stop0 = None
+        start1, stop1 = start + 1, stop + 1
+
+        row_nnz = self.indptr[start1:stop1:step] - \
+            self.indptr[start0:stop0:step]
+        idx_dtype = self.indices.dtype
+        res_indptr = np.zeros(M+1, dtype=idx_dtype)
+        np.cumsum(row_nnz, out=res_indptr[1:])
+
+        if step == 1:
+            all_idx = slice(self.indptr[start], self.indptr[stop])
+            res_indices = np.array(self.indices[all_idx], copy=copy)
+            res_data = np.array(self.data[all_idx], copy=copy)
+        else:
+            nnz = res_indptr[-1]
+            res_indices = np.empty(nnz, dtype=idx_dtype)
+            res_data = np.empty(nnz, dtype=self.dtype)
+            csr_row_slice(start, stop, step, self.indptr, self.indices,
+                          self.data, res_indices, res_data)
+
+        return self.__class__((res_data, res_indices, res_indptr),
+                              shape=new_shape, copy=False)
+
+    def _minor_index_fancy(self, idx):
+        """Index along the minor axis where idx is an array of ints.
+        """
+        idx_dtype = self._get_index_dtype((self.indices, self.indptr))
+        indices = self.indices.astype(idx_dtype, copy=False)
+        indptr = self.indptr.astype(idx_dtype, copy=False)
+
+        idx = np.asarray(idx, dtype=idx_dtype).ravel()
+
+        M, N = self._swap(self._shape_as_2d)
+        k = len(idx)
+        new_shape = self._swap((M, k)) if self.ndim == 2 else (k,)
+        if k == 0:
+            return self.__class__(new_shape, dtype=self.dtype)
+
+        # pass 1: count idx entries and compute new indptr
+        col_offsets = np.zeros(N, dtype=idx_dtype)
+        res_indptr = np.empty_like(self.indptr, dtype=idx_dtype)
+        csr_column_index1(
+            k,
+            idx,
+            M,
+            N,
+            indptr,
+            indices,
+            col_offsets,
+            res_indptr,
+        )
+
+        # pass 2: copy indices/data for selected idxs
+        col_order = np.argsort(idx).astype(idx_dtype, copy=False)
+        nnz = res_indptr[-1]
+        res_indices = np.empty(nnz, dtype=idx_dtype)
+        res_data = np.empty(nnz, dtype=self.dtype)
+        csr_column_index2(col_order, col_offsets, len(self.indices),
+                          indices, self.data, res_indices, res_data)
+        return self.__class__((res_data, res_indices, res_indptr),
+                              shape=new_shape, copy=False)
+
+    def _minor_slice(self, idx, copy=False):
+        """Index along the minor axis where idx is a slice object.
+        """
+        if idx == slice(None):
+            return self.copy() if copy else self
+
+        M, N = self._swap(self._shape_as_2d)
+        start, stop, step = idx.indices(N)
+        N = len(range(start, stop, step))
+        if N == 0:
+            return self.__class__(self._swap((M, N)), dtype=self.dtype)
+        if step == 1:
+            return self._get_submatrix(minor=idx, copy=copy)
+        # TODO: don't fall back to fancy indexing here
+        return self._minor_index_fancy(np.arange(start, stop, step))
+
+    def _get_submatrix(self, major=None, minor=None, copy=False):
+        """Return a submatrix of this matrix.
+
+        major, minor: None, int, or slice with step 1
+        """
+        M, N = self._swap(self._shape_as_2d)
+        i0, i1 = _process_slice(major, M)
+        j0, j1 = _process_slice(minor, N)
+
+        if i0 == 0 and j0 == 0 and i1 == M and j1 == N:
+            return self.copy() if copy else self
+
+        indptr, indices, data = get_csr_submatrix(
+            M, N, self.indptr, self.indices, self.data, i0, i1, j0, j1)
+
+        shape = self._swap((i1 - i0, j1 - j0))
+        if self.ndim == 1:
+            shape = (shape[1],)
+        return self.__class__((data, indices, indptr), shape=shape,
+                              dtype=self.dtype, copy=False)
+
+    def _set_intXint(self, row, col, x):
+        i, j = self._swap((row, col))
+        self._set_many(i, j, x)
+
+    def _set_arrayXarray(self, row, col, x):
+        i, j = self._swap((row, col))
+        self._set_many(i, j, x)
+
+    def _set_arrayXarray_sparse(self, row, col, x):
+        # clear entries that will be overwritten
+        self._zero_many(*self._swap((row, col)))
+
+        M, N = row.shape  # matches col.shape
+        broadcast_row = M != 1 and x.shape[0] == 1
+        broadcast_col = N != 1 and x.shape[1] == 1
+        r, c = x.row, x.col
+
+        x = np.asarray(x.data, dtype=self.dtype)
+        if x.size == 0:
+            return
+
+        if broadcast_row:
+            r = np.repeat(np.arange(M), len(r))
+            c = np.tile(c, M)
+            x = np.tile(x, M)
+        if broadcast_col:
+            r = np.repeat(r, N)
+            c = np.tile(np.arange(N), len(c))
+            x = np.repeat(x, N)
+        # only assign entries in the new sparsity structure
+        i, j = self._swap((row[r, c], col[r, c]))
+        self._set_many(i, j, x)
+
+    def _setdiag(self, values, k):
+        if 0 in self.shape:
+            return
+        if self.ndim == 1:
+            raise NotImplementedError('diagonals cant be set in 1d arrays')
+
+        M, N = self.shape
+        broadcast = (values.ndim == 0)
+
+        if k < 0:
+            if broadcast:
+                max_index = min(M + k, N)
+            else:
+                max_index = min(M + k, N, len(values))
+            i = np.arange(-k, max_index - k, dtype=self.indices.dtype)
+            j = np.arange(max_index, dtype=self.indices.dtype)
+
+        else:
+            if broadcast:
+                max_index = min(M, N - k)
+            else:
+                max_index = min(M, N - k, len(values))
+            i = np.arange(max_index, dtype=self.indices.dtype)
+            j = np.arange(k, k + max_index, dtype=self.indices.dtype)
+
+        if not broadcast:
+            values = values[:len(i)]
+
+        x = np.atleast_1d(np.asarray(values, dtype=self.dtype)).ravel()
+        if x.squeeze().shape != i.squeeze().shape:
+            x = np.broadcast_to(x, i.shape)
+        if x.size == 0:
+            return
+
+        M, N = self._swap((M, N))
+        i, j = self._swap((i, j))
+        n_samples = x.size
+        offsets = np.empty(n_samples, dtype=self.indices.dtype)
+        ret = csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                                 i, j, offsets)
+        if ret == 1:
+            # rinse and repeat
+            self.sum_duplicates()
+            csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                               i, j, offsets)
+        if -1 not in offsets:
+            # only affects existing non-zero cells
+            self.data[offsets] = x
+            return
+
+        mask = (offsets >= 0)
+        # Boundary between csc and convert to coo
+        # The value 0.001 is justified in gh-19962#issuecomment-1920499678
+        if self.nnz - mask.sum() < self.nnz * 0.001:
+            # replace existing entries
+            self.data[offsets[mask]] = x[mask]
+            # create new entries
+            mask = ~mask
+            i = i[mask]
+            j = j[mask]
+            self._insert_many(i, j, x[mask])
+        else:
+            # convert to coo for _set_diag
+            coo = self.tocoo()
+            coo._setdiag(values, k)
+            arrays = coo._coo_to_compressed(self._swap)
+            self.indptr, self.indices, self.data, _ = arrays
+
+    def _prepare_indices(self, i, j):
+        M, N = self._swap(self._shape_as_2d)
+
+        def check_bounds(indices, bound):
+            idx = indices.max()
+            if idx >= bound:
+                raise IndexError(f'index ({idx}) out of range (>= {bound})')
+            idx = indices.min()
+            if idx < -bound:
+                raise IndexError(f'index ({idx}) out of range (< -{bound})')
+
+        i = np.atleast_1d(np.asarray(i, dtype=self.indices.dtype)).ravel()
+        j = np.atleast_1d(np.asarray(j, dtype=self.indices.dtype)).ravel()
+        check_bounds(i, M)
+        check_bounds(j, N)
+        return i, j, M, N
+
+    def _set_many(self, i, j, x):
+        """Sets value at each (i, j) to x
+
+        Here (i,j) index major and minor respectively, and must not contain
+        duplicate entries.
+        """
+        i, j, M, N = self._prepare_indices(i, j)
+        x = np.atleast_1d(np.asarray(x, dtype=self.dtype)).ravel()
+
+        n_samples = x.size
+        offsets = np.empty(n_samples, dtype=self.indices.dtype)
+        ret = csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                                 i, j, offsets)
+        if ret == 1:
+            # rinse and repeat
+            self.sum_duplicates()
+            csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                               i, j, offsets)
+
+        if -1 not in offsets:
+            # only affects existing non-zero cells
+            self.data[offsets] = x
+            return
+
+        else:
+            warn(f"Changing the sparsity structure of a {self.__class__.__name__} is"
+                 " expensive. lil and dok are more efficient.",
+                 SparseEfficiencyWarning, stacklevel=3)
+            # replace where possible
+            mask = offsets > -1
+            self.data[offsets[mask]] = x[mask]
+            # only insertions remain
+            mask = ~mask
+            i = i[mask]
+            i[i < 0] += M
+            j = j[mask]
+            j[j < 0] += N
+            self._insert_many(i, j, x[mask])
+
+    def _zero_many(self, i, j):
+        """Sets value at each (i, j) to zero, preserving sparsity structure.
+
+        Here (i,j) index major and minor respectively.
+        """
+        i, j, M, N = self._prepare_indices(i, j)
+
+        n_samples = len(i)
+        offsets = np.empty(n_samples, dtype=self.indices.dtype)
+        ret = csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                                 i, j, offsets)
+        if ret == 1:
+            # rinse and repeat
+            self.sum_duplicates()
+            csr_sample_offsets(M, N, self.indptr, self.indices, n_samples,
+                               i, j, offsets)
+
+        # only assign zeros to the existing sparsity structure
+        self.data[offsets[offsets > -1]] = 0
+
+    def _insert_many(self, i, j, x):
+        """Inserts new nonzero at each (i, j) with value x
+
+        Here (i,j) index major and minor respectively.
+        i, j and x must be non-empty, 1d arrays.
+        Inserts each major group (e.g. all entries per row) at a time.
+        Maintains has_sorted_indices property.
+        Modifies i, j, x in place.
+        """
+        order = np.argsort(i, kind='mergesort')  # stable for duplicates
+        i = i.take(order, mode='clip')
+        j = j.take(order, mode='clip')
+        x = x.take(order, mode='clip')
+
+        do_sort = self.has_sorted_indices
+
+        # Update index data type
+        idx_dtype = self._get_index_dtype((self.indices, self.indptr),
+                                    maxval=(self.indptr[-1] + x.size))
+        self.indptr = np.asarray(self.indptr, dtype=idx_dtype)
+        self.indices = np.asarray(self.indices, dtype=idx_dtype)
+        i = np.asarray(i, dtype=idx_dtype)
+        j = np.asarray(j, dtype=idx_dtype)
+
+        # Collate old and new in chunks by major index
+        indices_parts = []
+        data_parts = []
+        ui, ui_indptr = np.unique(i, return_index=True)
+        ui_indptr = np.append(ui_indptr, len(j))
+        new_nnzs = np.diff(ui_indptr)
+        prev = 0
+        for c, (ii, js, je) in enumerate(zip(ui, ui_indptr, ui_indptr[1:])):
+            # old entries
+            start = self.indptr[prev]
+            stop = self.indptr[ii]
+            indices_parts.append(self.indices[start:stop])
+            data_parts.append(self.data[start:stop])
+
+            # handle duplicate j: keep last setting
+            uj, uj_indptr = np.unique(j[js:je][::-1], return_index=True)
+            if len(uj) == je - js:
+                indices_parts.append(j[js:je])
+                data_parts.append(x[js:je])
+            else:
+                indices_parts.append(j[js:je][::-1][uj_indptr])
+                data_parts.append(x[js:je][::-1][uj_indptr])
+                new_nnzs[c] = len(uj)
+
+            prev = ii
+
+        # remaining old entries
+        start = self.indptr[ii]
+        indices_parts.append(self.indices[start:])
+        data_parts.append(self.data[start:])
+
+        # update attributes
+        self.indices = np.concatenate(indices_parts)
+        self.data = np.concatenate(data_parts)
+        nnzs = np.empty(self.indptr.shape, dtype=idx_dtype)
+        nnzs[0] = idx_dtype(0)
+        indptr_diff = np.diff(self.indptr)
+        indptr_diff[ui] += new_nnzs
+        nnzs[1:] = indptr_diff
+        self.indptr = np.cumsum(nnzs, out=nnzs)
+
+        if do_sort:
+            # TODO: only sort where necessary
+            self.has_sorted_indices = False
+            self.sort_indices()
+
+        self.check_format(full_check=False)
+
+    ######################
+    # Conversion methods #
+    ######################
+
+    def tocoo(self, copy=True):
+        if self.ndim == 1:
+            csr = self.tocsr()
+            return self._coo_container((csr.data, (csr.indices,)), csr.shape, copy=copy)
+        major_dim, minor_dim = self._swap(self.shape)
+        minor_indices = self.indices
+        major_indices = np.empty(len(minor_indices), dtype=self.indices.dtype)
+        _sparsetools.expandptr(major_dim, self.indptr, major_indices)
+        coords = self._swap((major_indices, minor_indices))
+
+        return self._coo_container(
+            (self.data, coords), self.shape, copy=copy, dtype=self.dtype
+        )
+
+    tocoo.__doc__ = _spbase.tocoo.__doc__
+
+    def toarray(self, order=None, out=None):
+        if out is None and order is None:
+            order = self._swap('cf')[0]
+        out = self._process_toarray_args(order, out)
+        if not (out.flags.c_contiguous or out.flags.f_contiguous):
+            raise ValueError('Output array must be C or F contiguous')
+        # align ideal order with output array order
+        if out.flags.c_contiguous:
+            x = self.tocsr()
+            y = out
+        else:
+            x = self.tocsc()
+            y = out.T
+        M, N = x._swap(x._shape_as_2d)
+        csr_todense(M, N, x.indptr, x.indices, x.data, y)
+        return out
+
+    toarray.__doc__ = _spbase.toarray.__doc__
+
+    ##############################################################
+    # methods that examine or modify the internal data structure #
+    ##############################################################
+
+    def eliminate_zeros(self):
+        """Remove zero entries from the array/matrix
+
+        This is an *in place* operation.
+        """
+        M, N = self._swap(self._shape_as_2d)
+        _sparsetools.csr_eliminate_zeros(M, N, self.indptr, self.indices, self.data)
+        self.prune()  # nnz may have changed
+
+    @property
+    def has_canonical_format(self) -> bool:
+        """Whether the array/matrix has sorted indices and no duplicates
+
+        Returns
+            - True: if the above applies
+            - False: otherwise
+
+        has_canonical_format implies has_sorted_indices, so if the latter flag
+        is False, so will the former be; if the former is found True, the
+        latter flag is also set.
+        """
+        # first check to see if result was cached
+        if not getattr(self, '_has_sorted_indices', True):
+            # not sorted => not canonical
+            self._has_canonical_format = False
+        elif not hasattr(self, '_has_canonical_format'):
+            self.has_canonical_format = bool(
+                _sparsetools.csr_has_canonical_format(
+                    len(self.indptr) - 1, self.indptr, self.indices)
+                )
+        return self._has_canonical_format
+
+    @has_canonical_format.setter
+    def has_canonical_format(self, val: bool):
+        self._has_canonical_format = bool(val)
+        if val:
+            self.has_sorted_indices = True
+
+    def sum_duplicates(self):
+        """Eliminate duplicate entries by adding them together
+
+        This is an *in place* operation.
+        """
+        if self.has_canonical_format:
+            return
+        self.sort_indices()
+
+        M, N = self._swap(self._shape_as_2d)
+        _sparsetools.csr_sum_duplicates(M, N, self.indptr, self.indices, self.data)
+
+        self.prune()  # nnz may have changed
+        self.has_canonical_format = True
+
+    @property
+    def has_sorted_indices(self) -> bool:
+        """Whether the indices are sorted
+
+        Returns
+            - True: if the indices of the array/matrix are in sorted order
+            - False: otherwise
+        """
+        # first check to see if result was cached
+        if not hasattr(self, '_has_sorted_indices'):
+            self._has_sorted_indices = bool(
+                _sparsetools.csr_has_sorted_indices(
+                    len(self.indptr) - 1, self.indptr, self.indices)
+                )
+        return self._has_sorted_indices
+
+    @has_sorted_indices.setter
+    def has_sorted_indices(self, val: bool):
+        self._has_sorted_indices = bool(val)
+
+
+    def sorted_indices(self):
+        """Return a copy of this array/matrix with sorted indices
+        """
+        A = self.copy()
+        A.sort_indices()
+        return A
+
+        # an alternative that has linear complexity is the following
+        # although the previous option is typically faster
+        # return self.toother().toother()
+
+    def sort_indices(self):
+        """Sort the indices of this array/matrix *in place*
+        """
+
+        if not self.has_sorted_indices:
+            _sparsetools.csr_sort_indices(len(self.indptr) - 1, self.indptr,
+                                          self.indices, self.data)
+            self.has_sorted_indices = True
+
+    def prune(self):
+        """Remove empty space after all non-zero elements.
+        """
+        major_dim = self._swap(self._shape_as_2d)[0]
+
+        if len(self.indptr) != major_dim + 1:
+            raise ValueError('index pointer has invalid length')
+        if len(self.indices) < self.nnz:
+            raise ValueError('indices array has fewer than nnz elements')
+        if len(self.data) < self.nnz:
+            raise ValueError('data array has fewer than nnz elements')
+
+        self.indices = _prune_array(self.indices[:self.nnz])
+        self.data = _prune_array(self.data[:self.nnz])
+
+    def resize(self, *shape):
+        shape = check_shape(shape, allow_nd=self._allow_nd)
+
+        if hasattr(self, 'blocksize'):
+            bm, bn = self.blocksize
+            new_M, rm = divmod(shape[0], bm)
+            new_N, rn = divmod(shape[1], bn)
+            if rm or rn:
+                raise ValueError(f"shape must be divisible into {self.blocksize}"
+                                 f" blocks. Got {shape}")
+            M, N = self.shape[0] // bm, self.shape[1] // bn
+        else:
+            new_M, new_N = self._swap(shape if len(shape)>1 else (1, shape[0]))
+            M, N = self._swap(self._shape_as_2d)
+
+        if new_M < M:
+            self.indices = self.indices[:self.indptr[new_M]]
+            self.data = self.data[:self.indptr[new_M]]
+            self.indptr = self.indptr[:new_M + 1]
+        elif new_M > M:
+            self.indptr = np.resize(self.indptr, new_M + 1)
+            self.indptr[M + 1:].fill(self.indptr[M])
+
+        if new_N < N:
+            mask = self.indices < new_N
+            if not np.all(mask):
+                self.indices = self.indices[mask]
+                self.data = self.data[mask]
+                major_index, val = self._minor_reduce(np.add, mask)
+                self.indptr.fill(0)
+                self.indptr[1:][major_index] = val
+                np.cumsum(self.indptr, out=self.indptr)
+
+        self._shape = shape
+
+    resize.__doc__ = _spbase.resize.__doc__
+
+    ###################
+    # utility methods #
+    ###################
+
+    # needed by _data_matrix
+    def _with_data(self, data, copy=True):
+        """Returns a matrix with the same sparsity structure as self,
+        but with different data.  By default the structure arrays
+        (i.e. .indptr and .indices) are copied.
+        """
+        if copy:
+            return self.__class__((data, self.indices.copy(),
+                                   self.indptr.copy()),
+                                  shape=self.shape,
+                                  dtype=data.dtype)
+        else:
+            return self.__class__((data, self.indices, self.indptr),
+                                  shape=self.shape, dtype=data.dtype)
+
+    def _binopt(self, other, op):
+        """apply the binary operation fn to two sparse matrices."""
+        other = self.__class__(other)
+
+        # e.g. csr_plus_csr, csr_minus_csr, etc.
+        fn = getattr(_sparsetools, self.format + op + self.format)
+
+        maxnnz = self.nnz + other.nnz
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices,
+                                     other.indptr, other.indices),
+                                    maxval=maxnnz)
+        indptr = np.empty(self.indptr.shape, dtype=idx_dtype)
+        indices = np.empty(maxnnz, dtype=idx_dtype)
+
+        bool_ops = ['_ne_', '_lt_', '_gt_', '_le_', '_ge_']
+        if op in bool_ops:
+            data = np.empty(maxnnz, dtype=np.bool_)
+        else:
+            data = np.empty(maxnnz, dtype=upcast(self.dtype, other.dtype))
+
+        M, N = self._shape_as_2d
+        fn(M, N,
+           np.asarray(self.indptr, dtype=idx_dtype),
+           np.asarray(self.indices, dtype=idx_dtype),
+           self.data,
+           np.asarray(other.indptr, dtype=idx_dtype),
+           np.asarray(other.indices, dtype=idx_dtype),
+           other.data,
+           indptr, indices, data)
+
+        A = self.__class__((data, indices, indptr), shape=self.shape)
+        A.prune()
+
+        return A
+
+    def _divide_sparse(self, other):
+        """
+        Divide this matrix by a second sparse matrix.
+        """
+        if other.shape != self.shape:
+            raise ValueError('inconsistent shapes')
+
+        r = self._binopt(other, '_eldiv_')
+
+        if np.issubdtype(r.dtype, np.inexact):
+            # Eldiv leaves entries outside the combined sparsity
+            # pattern empty, so they must be filled manually.
+            # Everything outside of other's sparsity is NaN, and everything
+            # inside it is either zero or defined by eldiv.
+            out = np.empty(self.shape, dtype=self.dtype)
+            out.fill(np.nan)
+            coords = other.nonzero()
+            if self.ndim == 1:
+                coords = (coords[-1],)
+            out[coords] = 0
+            r = r.tocoo()
+            out[r.coords] = r.data
+            return self._container(out)
+        else:
+            # integers types go with nan <-> 0
+            out = r
+            return out
+
+    def _broadcast_to(self, shape, copy=False):
+        if self.shape == shape:
+            return self.copy() if copy else self
+
+        shape = check_shape(shape, allow_nd=(self._allow_nd))
+
+        if broadcast_shapes(self.shape, shape) != shape:
+            raise ValueError("cannot be broadcast")
+
+        if len(self.shape) == 1 and len(shape) == 1:
+            self.sum_duplicates()
+            if self.nnz == 0: # array has no non zero elements
+                return self.__class__(shape, dtype=self.dtype, copy=False)
+
+            N = shape[0]
+            data = np.full(N, self.data[0])
+            indices = np.arange(0,N)
+            indptr = np.array([0, N])
+            return self._csr_container((data, indices, indptr), shape=shape, copy=False)
+
+        # treat 1D as a 2D row
+        old_shape = self._shape_as_2d
+
+        if len(shape) != 2:
+            ndim = len(shape)
+            raise ValueError(f'CSR/CSC broadcast_to cannot have shape >2D. Got {ndim}D')
+
+        if self.nnz == 0: # array has no non zero elements
+            return self.__class__(shape, dtype=self.dtype, copy=False)
+
+        self.sum_duplicates()
+        M, N = self._swap(shape)
+        oM, oN = self._swap(old_shape)
+        if all(s == 1 for s in old_shape):
+            # Broadcast a single element to the entire shape
+            data = np.full(M * N, self.data[0])
+            indices = np.tile(np.arange(N), M)
+            indptr = np.arange(0, len(data) + 1, N)
+        elif oM == 1 and oN == N:
+            # Broadcast row-wise (columns for CSC)
+            data = np.tile(self.data, M)
+            indices = np.tile(self.indices, M)
+            indptr = np.arange(0, len(data) + 1, len(self.data))
+        elif oN == 1 and oM == M:
+            # Broadcast column-wise (rows for CSC)
+            data = np.repeat(self.data, N)
+            indices = np.tile(np.arange(N), len(self.data))
+            indptr = self.indptr * N
+        return self.__class__((data, indices, indptr), shape=shape, copy=False)
+
+
+def _make_diagonal_csr(data, is_array=False):
+    """build diagonal csc_array/csr_array => self._csr_container
+
+    Parameter `data` should be a raveled numpy array holding the
+    values on the diagonal of the resulting sparse matrix.
+    """
+    from ._csr import csr_array, csr_matrix
+    csr_array = csr_array if is_array else csr_matrix
+
+    N = len(data)
+    idx_dtype = get_index_dtype(maxval=N)
+    indptr = np.arange(N + 1, dtype=idx_dtype)
+    indices = indptr[:-1]
+
+    return csr_array((data, indices, indptr), shape=(N, N))
+
+
+def _process_slice(sl, num):
+    if sl is None:
+        i0, i1 = 0, num
+    elif isinstance(sl, slice):
+        i0, i1, stride = sl.indices(num)
+        if stride != 1:
+            raise ValueError('slicing with step != 1 not supported')
+        i0 = min(i0, i1)  # give an empty slice when i0 > i1
+    elif isintlike(sl):
+        if sl < 0:
+            sl += num
+        i0, i1 = sl, sl + 1
+        if i0 < 0 or i1 > num:
+            raise IndexError(f'index out of bounds: 0 <= {i0} < {i1} <= {num}')
+    else:
+        raise TypeError('expected slice or scalar')
+
+    return i0, i1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_construct.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_construct.py
new file mode 100644
index 0000000000000000000000000000000000000000..f483976badb771d777c9dba0eecfbeb94d2e76fd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_construct.py
@@ -0,0 +1,1402 @@
+"""Functions to construct sparse matrices and arrays
+"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['spdiags', 'eye', 'identity', 'kron', 'kronsum',
+           'hstack', 'vstack', 'bmat', 'rand', 'random', 'diags', 'block_diag',
+           'diags_array', 'block_array', 'eye_array', 'random_array']
+
+import numbers
+import math
+import numpy as np
+
+from scipy._lib._util import check_random_state, rng_integers, _transition_to_rng
+from ._sputils import upcast, get_index_dtype, isscalarlike
+
+from ._sparsetools import csr_hstack
+from ._bsr import bsr_matrix, bsr_array
+from ._coo import coo_matrix, coo_array
+from ._csc import csc_matrix, csc_array
+from ._csr import csr_matrix, csr_array
+from ._dia import dia_matrix, dia_array
+
+from ._base import issparse, sparray
+
+
+def spdiags(data, diags, m=None, n=None, format=None):
+    """
+    Return a sparse matrix from diagonals.
+
+    Parameters
+    ----------
+    data : array_like
+        Matrix diagonals stored row-wise
+    diags : sequence of int or an int
+        Diagonals to set:
+
+        * k = 0  the main diagonal
+        * k > 0  the kth upper diagonal
+        * k < 0  the kth lower diagonal
+    m, n : int, tuple, optional
+        Shape of the result. If `n` is None and `m` is a given tuple,
+        the shape is this tuple. If omitted, the matrix is square and
+        its shape is len(data[0]).
+    format : str, optional
+        Format of the result. By default (format=None) an appropriate sparse
+        matrix format is returned. This choice is subject to change.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``dia_array`` to take advantage
+        of the sparse array functionality.
+
+    Notes
+    -----
+    This function can be replaced by an equivalent call to ``dia_matrix``
+    as::
+
+        dia_matrix((data, diags), shape=(m, n)).asformat(format)
+
+    See Also
+    --------
+    diags_array : more convenient form of this function
+    diags : matrix version of diags_array
+    dia_matrix : the sparse DIAgonal format.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import spdiags
+    >>> data = np.array([[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]])
+    >>> diags = np.array([0, -1, 2])
+    >>> spdiags(data, diags, 4, 4).toarray()
+    array([[1, 0, 3, 0],
+           [1, 2, 0, 4],
+           [0, 2, 3, 0],
+           [0, 0, 3, 4]])
+
+    """
+    if m is None and n is None:
+        m = n = len(data[0])
+    elif n is None:
+        m, n = m
+    return dia_matrix((data, diags), shape=(m, n)).asformat(format)
+
+
+def diags_array(diagonals, /, *, offsets=0, shape=None, format=None, dtype=None):
+    """
+    Construct a sparse array from diagonals.
+
+    Parameters
+    ----------
+    diagonals : sequence of array_like
+        Sequence of arrays containing the array diagonals,
+        corresponding to `offsets`.
+    offsets : sequence of int or an int, optional
+        Diagonals to set (repeated offsets are not allowed):
+          - k = 0  the main diagonal (default)
+          - k > 0  the kth upper diagonal
+          - k < 0  the kth lower diagonal
+    shape : tuple of int, optional
+        Shape of the result. If omitted, a square array large enough
+        to contain the diagonals is returned.
+    format : {"dia", "csr", "csc", "lil", ...}, optional
+        Matrix format of the result. By default (format=None) an
+        appropriate sparse array format is returned. This choice is
+        subject to change.
+    dtype : dtype, optional
+        Data type of the array.
+
+    Notes
+    -----
+    Repeated diagonal offsets are disallowed.
+
+    The result from `diags_array` is the sparse equivalent of::
+
+        np.diag(diagonals[0], offsets[0])
+        + ...
+        + np.diag(diagonals[k], offsets[k])
+
+    ``diags_array`` differs from `dia_array` in the way it handles off-diagonals.
+    Specifically, `dia_array` assumes the data input includes padding
+    (ignored values) at the start/end of the rows for positive/negative
+    offset, while ``diags_array` assumes the input data has no padding.
+    Each value in the input ``diagonals`` is used.
+
+    .. versionadded:: 1.11
+
+    Examples
+    --------
+    >>> from scipy.sparse import diags_array
+    >>> diagonals = [[1, 2, 3, 4], [1, 2, 3], [1, 2]]
+    >>> diags_array(diagonals, offsets=[0, -1, 2]).toarray()
+    array([[1., 0., 1., 0.],
+           [1., 2., 0., 2.],
+           [0., 2., 3., 0.],
+           [0., 0., 3., 4.]])
+
+    Broadcasting of scalars is supported (but shape needs to be
+    specified):
+
+    >>> diags_array([1, -2, 1], offsets=[-1, 0, 1], shape=(4, 4)).toarray()
+    array([[-2.,  1.,  0.,  0.],
+           [ 1., -2.,  1.,  0.],
+           [ 0.,  1., -2.,  1.],
+           [ 0.,  0.,  1., -2.]])
+
+
+    If only one diagonal is wanted (as in `numpy.diag`), the following
+    works as well:
+
+    >>> diags_array([1, 2, 3], offsets=1).toarray()
+    array([[ 0.,  1.,  0.,  0.],
+           [ 0.,  0.,  2.,  0.],
+           [ 0.,  0.,  0.,  3.],
+           [ 0.,  0.,  0.,  0.]])
+
+    """
+    # if offsets is not a sequence, assume that there's only one diagonal
+    if isscalarlike(offsets):
+        # now check that there's actually only one diagonal
+        if len(diagonals) == 0 or isscalarlike(diagonals[0]):
+            diagonals = [np.atleast_1d(diagonals)]
+        else:
+            raise ValueError("Different number of diagonals and offsets.")
+    else:
+        diagonals = list(map(np.atleast_1d, diagonals))
+
+    offsets = np.atleast_1d(offsets)
+
+    # Basic check
+    if len(diagonals) != len(offsets):
+        raise ValueError("Different number of diagonals and offsets.")
+
+    # Determine shape, if omitted
+    if shape is None:
+        m = len(diagonals[0]) + abs(int(offsets[0]))
+        shape = (m, m)
+
+    # Determine data type, if omitted
+    if dtype is None:
+        dtype = np.common_type(*diagonals)
+
+    # Construct data array
+    m, n = shape
+
+    M = max([min(m + offset, n - offset) + max(0, offset)
+             for offset in offsets])
+    M = max(0, M)
+    data_arr = np.zeros((len(offsets), M), dtype=dtype)
+
+    K = min(m, n)
+
+    for j, diagonal in enumerate(diagonals):
+        offset = offsets[j]
+        k = max(0, offset)
+        length = min(m + offset, n - offset, K)
+        if length < 0:
+            raise ValueError(f"Offset {offset} (index {j}) out of bounds")
+        try:
+            data_arr[j, k:k+length] = diagonal[...,:length]
+        except ValueError as e:
+            if len(diagonal) != length and len(diagonal) != 1:
+                raise ValueError(
+                    f"Diagonal length (index {j}: {len(diagonal)} at"
+                    f" offset {offset}) does not agree with array size ({m}, {n})."
+                ) from e
+            raise
+
+    return dia_array((data_arr, offsets), shape=(m, n)).asformat(format)
+
+
+def diags(diagonals, offsets=0, shape=None, format=None, dtype=None):
+    """
+    Construct a sparse matrix from diagonals.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``diags_array`` to take advantage
+        of the sparse array functionality.
+
+    Parameters
+    ----------
+    diagonals : sequence of array_like
+        Sequence of arrays containing the matrix diagonals,
+        corresponding to `offsets`.
+    offsets : sequence of int or an int, optional
+        Diagonals to set (repeated offsets are not allowed):
+          - k = 0  the main diagonal (default)
+          - k > 0  the kth upper diagonal
+          - k < 0  the kth lower diagonal
+    shape : tuple of int, optional
+        Shape of the result. If omitted, a square matrix large enough
+        to contain the diagonals is returned.
+    format : {"dia", "csr", "csc", "lil", ...}, optional
+        Matrix format of the result. By default (format=None) an
+        appropriate sparse matrix format is returned. This choice is
+        subject to change.
+    dtype : dtype, optional
+        Data type of the matrix.
+
+    See Also
+    --------
+    spdiags : construct matrix from diagonals
+    diags_array : construct sparse array instead of sparse matrix
+
+    Notes
+    -----
+    Repeated diagonal offsets are disallowed.
+
+    The result from `diags` is the sparse equivalent of::
+
+        np.diag(diagonals[0], offsets[0])
+        + ...
+        + np.diag(diagonals[k], offsets[k])
+
+    ``diags`` differs from ``dia_matrix`` in the way it handles off-diagonals.
+    Specifically, `dia_matrix` assumes the data input includes padding
+    (ignored values) at the start/end of the rows for positive/negative
+    offset, while ``diags` assumes the input data has no padding.
+    Each value in the input ``diagonals`` is used.
+
+    .. versionadded:: 0.11
+
+    Examples
+    --------
+    >>> from scipy.sparse import diags
+    >>> diagonals = [[1, 2, 3, 4], [1, 2, 3], [1, 2]]
+    >>> diags(diagonals, [0, -1, 2]).toarray()
+    array([[1., 0., 1., 0.],
+           [1., 2., 0., 2.],
+           [0., 2., 3., 0.],
+           [0., 0., 3., 4.]])
+
+    Broadcasting of scalars is supported (but shape needs to be
+    specified):
+
+    >>> diags([1, -2, 1], [-1, 0, 1], shape=(4, 4)).toarray()
+    array([[-2.,  1.,  0.,  0.],
+           [ 1., -2.,  1.,  0.],
+           [ 0.,  1., -2.,  1.],
+           [ 0.,  0.,  1., -2.]])
+
+
+    If only one diagonal is wanted (as in `numpy.diag`), the following
+    works as well:
+
+    >>> diags([1, 2, 3], 1).toarray()
+    array([[ 0.,  1.,  0.,  0.],
+           [ 0.,  0.,  2.,  0.],
+           [ 0.,  0.,  0.,  3.],
+           [ 0.,  0.,  0.,  0.]])
+
+    """
+    A = diags_array(diagonals, offsets=offsets, shape=shape, dtype=dtype)
+    return dia_matrix(A).asformat(format)
+
+
+def identity(n, dtype='d', format=None):
+    """Identity matrix in sparse format
+
+    Returns an identity matrix with shape (n,n) using a given
+    sparse format and dtype. This differs from `eye_array` in
+    that it has a square shape with ones only on the main diagonal.
+    It is thus the multiplicative identity. `eye_array` allows
+    rectangular shapes and the diagonal can be offset from the main one.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``eye_array`` to take advantage
+        of the sparse array functionality.
+
+    Parameters
+    ----------
+    n : int
+        Shape of the identity matrix.
+    dtype : dtype, optional
+        Data type of the matrix
+    format : str, optional
+        Sparse format of the result, e.g., format="csr", etc.
+
+    Examples
+    --------
+    >>> import scipy as sp
+    >>> sp.sparse.identity(3).toarray()
+    array([[ 1.,  0.,  0.],
+           [ 0.,  1.,  0.],
+           [ 0.,  0.,  1.]])
+    >>> sp.sparse.identity(3, dtype='int8', format='dia')
+    
+    >>> sp.sparse.eye_array(3, dtype='int8', format='dia')
+    
+
+    """
+    return eye(n, n, dtype=dtype, format=format)
+
+
+def eye_array(m, n=None, *, k=0, dtype=float, format=None):
+    """Identity matrix in sparse array format
+
+    Return a sparse array with ones on diagonal.
+    Specifically a sparse array (m x n) where the kth diagonal
+    is all ones and everything else is zeros.
+
+    Parameters
+    ----------
+    m : int
+        Number of rows requested.
+    n : int, optional
+        Number of columns. Default: `m`.
+    k : int, optional
+        Diagonal to place ones on. Default: 0 (main diagonal).
+    dtype : dtype, optional
+        Data type of the array
+    format : str, optional (default: "dia")
+        Sparse format of the result, e.g., format="csr", etc.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> sp.sparse.eye_array(3).toarray()
+    array([[ 1.,  0.,  0.],
+           [ 0.,  1.,  0.],
+           [ 0.,  0.,  1.]])
+    >>> sp.sparse.eye_array(3, dtype=np.int8)
+    
+
+    """
+    # TODO: delete next 15 lines [combine with _eye()] once spmatrix removed
+    return _eye(m, n, k, dtype, format)
+
+
+def _eye(m, n, k, dtype, format, as_sparray=True):
+    if as_sparray:
+        csr_sparse = csr_array
+        csc_sparse = csc_array
+        coo_sparse = coo_array
+        diags_sparse = diags_array
+    else:
+        csr_sparse = csr_matrix
+        csc_sparse = csc_matrix
+        coo_sparse = coo_matrix
+        diags_sparse = diags
+
+    if n is None:
+        n = m
+    m, n = int(m), int(n)
+
+    if m == n and k == 0:
+        # fast branch for special formats
+        if format in ['csr', 'csc']:
+            idx_dtype = get_index_dtype(maxval=n)
+            indptr = np.arange(n+1, dtype=idx_dtype)
+            indices = np.arange(n, dtype=idx_dtype)
+            data = np.ones(n, dtype=dtype)
+            cls = {'csr': csr_sparse, 'csc': csc_sparse}[format]
+            return cls((data, indices, indptr), (n, n))
+
+        elif format == 'coo':
+            idx_dtype = get_index_dtype(maxval=n)
+            row = np.arange(n, dtype=idx_dtype)
+            col = np.arange(n, dtype=idx_dtype)
+            data = np.ones(n, dtype=dtype)
+            return coo_sparse((data, (row, col)), (n, n))
+
+    data = np.ones((1, max(0, min(m + k, n))), dtype=dtype)
+    return diags_sparse(data, offsets=[k], shape=(m, n), dtype=dtype).asformat(format)
+
+
+def eye(m, n=None, k=0, dtype=float, format=None):
+    """Sparse matrix with ones on diagonal
+
+    Returns a sparse matrix (m x n) where the kth diagonal
+    is all ones and everything else is zeros.
+
+    Parameters
+    ----------
+    m : int
+        Number of rows in the matrix.
+    n : int, optional
+        Number of columns. Default: `m`.
+    k : int, optional
+        Diagonal to place ones on. Default: 0 (main diagonal).
+    dtype : dtype, optional
+        Data type of the matrix.
+    format : str, optional
+        Sparse format of the result, e.g., format="csr", etc.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``eye_array`` to take advantage
+        of the sparse array functionality.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> sp.sparse.eye(3).toarray()
+    array([[ 1.,  0.,  0.],
+           [ 0.,  1.,  0.],
+           [ 0.,  0.,  1.]])
+    >>> sp.sparse.eye(3, dtype=np.int8)
+    
+
+    """
+    return _eye(m, n, k, dtype, format, False)
+
+
+def kron(A, B, format=None):
+    """kronecker product of sparse matrices A and B
+
+    Parameters
+    ----------
+    A : sparse or dense matrix
+        first matrix of the product
+    B : sparse or dense matrix
+        second matrix of the product
+    format : str, optional (default: 'bsr' or 'coo')
+        format of the result (e.g. "csr")
+        If None, choose 'bsr' for relatively dense array and 'coo' for others
+
+    Returns
+    -------
+    kronecker product in a sparse format.
+    Returns a sparse matrix unless either A or B is a
+    sparse array in which case returns a sparse array.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> A = sp.sparse.csr_array(np.array([[0, 2], [5, 0]]))
+    >>> B = sp.sparse.csr_array(np.array([[1, 2], [3, 4]]))
+    >>> sp.sparse.kron(A, B).toarray()
+    array([[ 0,  0,  2,  4],
+           [ 0,  0,  6,  8],
+           [ 5, 10,  0,  0],
+           [15, 20,  0,  0]])
+
+    >>> sp.sparse.kron(A, [[1, 2], [3, 4]]).toarray()
+    array([[ 0,  0,  2,  4],
+           [ 0,  0,  6,  8],
+           [ 5, 10,  0,  0],
+           [15, 20,  0,  0]])
+
+    """
+    # TODO: delete next 10 lines and replace _sparse with _array when spmatrix removed
+    if isinstance(A, sparray) or isinstance(B, sparray):
+        # convert to local variables
+        bsr_sparse = bsr_array
+        csr_sparse = csr_array
+        coo_sparse = coo_array
+    else:  # use spmatrix
+        bsr_sparse = bsr_matrix
+        csr_sparse = csr_matrix
+        coo_sparse = coo_matrix
+
+    B = coo_sparse(B)
+    if B.ndim != 2:
+        raise ValueError(f"kron requires 2D input arrays. `B` is {B.ndim}D.")
+
+    # B is fairly dense, use BSR
+    if (format is None or format == "bsr") and 2*B.nnz >= B.shape[0] * B.shape[1]:
+        A = csr_sparse(A,copy=True)
+        if A.ndim != 2:
+            raise ValueError(f"kron requires 2D input arrays. `A` is {A.ndim}D.")
+        output_shape = (A.shape[0]*B.shape[0], A.shape[1]*B.shape[1])
+
+        if A.nnz == 0 or B.nnz == 0:
+            # kronecker product is the zero matrix
+            return coo_sparse(output_shape).asformat(format)
+
+        B = B.toarray()
+        data = A.data.repeat(B.size).reshape(-1,B.shape[0],B.shape[1])
+        data = data * B
+
+        return bsr_sparse((data,A.indices,A.indptr), shape=output_shape)
+    else:
+        # use COO
+        A = coo_sparse(A)
+        if A.ndim != 2:
+            raise ValueError(f"kron requires 2D input arrays. `A` is {A.ndim}D.")
+        output_shape = (A.shape[0]*B.shape[0], A.shape[1]*B.shape[1])
+
+        if A.nnz == 0 or B.nnz == 0:
+            # kronecker product is the zero matrix
+            return coo_sparse(output_shape).asformat(format)
+
+        # expand entries of a into blocks
+        idx_dtype = get_index_dtype(A.coords, maxval=max(output_shape))
+        row = np.asarray(A.row, dtype=idx_dtype).repeat(B.nnz)
+        col = np.asarray(A.col, dtype=idx_dtype).repeat(B.nnz)
+        data = A.data.repeat(B.nnz)
+
+        row *= B.shape[0]
+        col *= B.shape[1]
+
+        # increment block indices
+        row,col = row.reshape(-1,B.nnz),col.reshape(-1,B.nnz)
+        row += B.row
+        col += B.col
+        row,col = row.reshape(-1),col.reshape(-1)
+
+        # compute block entries
+        data = data.reshape(-1,B.nnz) * B.data
+        data = data.reshape(-1)
+
+        return coo_sparse((data,(row,col)), shape=output_shape).asformat(format)
+
+
+def kronsum(A, B, format=None):
+    """kronecker sum of square sparse matrices A and B
+
+    Kronecker sum of two sparse matrices is a sum of two Kronecker
+    products kron(I_n,A) + kron(B,I_m) where A has shape (m,m)
+    and B has shape (n,n) and I_m and I_n are identity matrices
+    of shape (m,m) and (n,n), respectively.
+
+    Parameters
+    ----------
+    A
+        square matrix
+    B
+        square matrix
+    format : str
+        format of the result (e.g. "csr")
+
+    Returns
+    -------
+    kronecker sum in a sparse matrix format
+
+    """
+    # TODO: delete next 8 lines and replace _sparse with _array when spmatrix removed
+    if isinstance(A, sparray) or isinstance(B, sparray):
+        # convert to local variables
+        coo_sparse = coo_array
+        identity_sparse = eye_array
+    else:
+        coo_sparse = coo_matrix
+        identity_sparse = identity
+
+    A = coo_sparse(A)
+    B = coo_sparse(B)
+
+    if A.ndim != 2:
+        raise ValueError(f"kronsum requires 2D inputs. `A` is {A.ndim}D.")
+    if B.ndim != 2:
+        raise ValueError(f"kronsum requires 2D inputs. `B` is {B.ndim}D.")
+    if A.shape[0] != A.shape[1]:
+        raise ValueError('A is not square')
+    if B.shape[0] != B.shape[1]:
+        raise ValueError('B is not square')
+
+    dtype = upcast(A.dtype, B.dtype)
+
+    I_n = identity_sparse(A.shape[0], dtype=dtype)
+    I_m = identity_sparse(B.shape[0], dtype=dtype)
+    L = kron(I_m, A, format='coo')
+    R = kron(B, I_n, format='coo')
+
+    return (L + R).asformat(format)
+
+
+def _compressed_sparse_stack(blocks, axis, return_spmatrix):
+    """
+    Stacking fast path for CSR/CSC matrices or arrays
+    (i) vstack for CSR, (ii) hstack for CSC.
+    """
+    other_axis = 1 if axis == 0 else 0
+    data = np.concatenate([b.data for b in blocks])
+    constant_dim = blocks[0]._shape_as_2d[other_axis]
+    idx_dtype = get_index_dtype(arrays=[b.indptr for b in blocks],
+                                maxval=max(data.size, constant_dim))
+    indices = np.empty(data.size, dtype=idx_dtype)
+    indptr = np.empty(sum(b._shape_as_2d[axis] for b in blocks) + 1, dtype=idx_dtype)
+    last_indptr = idx_dtype(0)
+    sum_dim = 0
+    sum_indices = 0
+    for b in blocks:
+        if b._shape_as_2d[other_axis] != constant_dim:
+            raise ValueError(f'incompatible dimensions for axis {other_axis}')
+        indices[sum_indices:sum_indices+b.indices.size] = b.indices
+        sum_indices += b.indices.size
+        idxs = slice(sum_dim, sum_dim + b._shape_as_2d[axis])
+        indptr[idxs] = b.indptr[:-1]
+        indptr[idxs] += last_indptr
+        sum_dim += b._shape_as_2d[axis]
+        last_indptr += b.indptr[-1]
+    indptr[-1] = last_indptr
+    # TODO remove this if-structure when sparse matrices removed
+    if return_spmatrix:
+        if axis == 0:
+            return csr_matrix((data, indices, indptr),
+                              shape=(sum_dim, constant_dim))
+        else:
+            return csc_matrix((data, indices, indptr),
+                              shape=(constant_dim, sum_dim))
+
+    if axis == 0:
+        return csr_array((data, indices, indptr),
+                          shape=(sum_dim, constant_dim))
+    else:
+        return csc_array((data, indices, indptr),
+                          shape=(constant_dim, sum_dim))
+
+
+def _stack_along_minor_axis(blocks, axis):
+    """
+    Stacking fast path for CSR/CSC matrices along the minor axis
+    (i) hstack for CSR, (ii) vstack for CSC.
+    """
+    n_blocks = len(blocks)
+    if n_blocks == 0:
+        raise ValueError('Missing block matrices')
+
+    if n_blocks == 1:
+        return blocks[0]
+
+    # check for incompatible dimensions
+    other_axis = 1 if axis == 0 else 0
+    other_axis_dims = {b._shape_as_2d[other_axis] for b in blocks}
+    if len(other_axis_dims) > 1:
+        raise ValueError(f'Mismatching dimensions along axis {other_axis}: '
+                         f'{other_axis_dims}')
+    constant_dim, = other_axis_dims
+
+    # Do the stacking
+    indptr_list = [b.indptr for b in blocks]
+    data_cat = np.concatenate([b.data for b in blocks])
+
+    # Need to check if any indices/indptr, would be too large post-
+    # concatenation for np.int32:
+    # - The max value of indices is the output array's stacking-axis length - 1
+    # - The max value in indptr is the number of non-zero entries. This is
+    #   exceedingly unlikely to require int64, but is checked out of an
+    #   abundance of caution.
+    sum_dim = sum(b._shape_as_2d[axis] for b in blocks)
+    nnz = sum(len(b.indices) for b in blocks)
+    idx_dtype = get_index_dtype(indptr_list, maxval=max(sum_dim - 1, nnz))
+    stack_dim_cat = np.array([b._shape_as_2d[axis] for b in blocks], dtype=idx_dtype)
+    if data_cat.size > 0:
+        indptr_cat = np.concatenate(indptr_list, dtype=idx_dtype)
+        indices_cat = np.concatenate([b.indices for b in blocks], dtype=idx_dtype)
+        indptr = np.empty(constant_dim + 1, dtype=idx_dtype)
+        indices = np.empty_like(indices_cat)
+        data = np.empty_like(data_cat)
+        csr_hstack(n_blocks, constant_dim, stack_dim_cat,
+                   indptr_cat, indices_cat, data_cat,
+                   indptr, indices, data)
+    else:
+        indptr = np.zeros(constant_dim + 1, dtype=idx_dtype)
+        indices = np.empty(0, dtype=idx_dtype)
+        data = np.empty(0, dtype=data_cat.dtype)
+
+    if axis == 0:
+        return blocks[0]._csc_container((data, indices, indptr),
+                          shape=(sum_dim, constant_dim))
+    else:
+        return blocks[0]._csr_container((data, indices, indptr),
+                          shape=(constant_dim, sum_dim))
+
+
+def hstack(blocks, format=None, dtype=None):
+    """
+    Stack sparse matrices horizontally (column wise)
+
+    Parameters
+    ----------
+    blocks
+        sequence of sparse matrices with compatible shapes
+    format : str
+        sparse format of the result (e.g., "csr")
+        by default an appropriate sparse matrix format is returned.
+        This choice is subject to change.
+    dtype : dtype, optional
+        The data-type of the output matrix. If not given, the dtype is
+        determined from that of `blocks`.
+
+    Returns
+    -------
+    new_array : sparse matrix or array
+        If any block in blocks is a sparse array, return a sparse array.
+        Otherwise return a sparse matrix.
+
+        If you want a sparse array built from blocks that are not sparse
+        arrays, use ``block(hstack(blocks))`` or convert one block
+        e.g. ``blocks[0] = csr_array(blocks[0])``.
+
+    See Also
+    --------
+    vstack : stack sparse matrices vertically (row wise)
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_matrix, hstack
+    >>> A = coo_matrix([[1, 2], [3, 4]])
+    >>> B = coo_matrix([[5], [6]])
+    >>> hstack([A,B]).toarray()
+    array([[1, 2, 5],
+           [3, 4, 6]])
+
+    """
+    blocks = np.asarray(blocks, dtype='object')
+    if any(isinstance(b, sparray) for b in blocks.flat):
+        return _block([blocks], format, dtype)
+    else:
+        return _block([blocks], format, dtype, return_spmatrix=True)
+
+
+def vstack(blocks, format=None, dtype=None):
+    """
+    Stack sparse arrays vertically (row wise)
+
+    Parameters
+    ----------
+    blocks
+        sequence of sparse arrays with compatible shapes
+    format : str, optional
+        sparse format of the result (e.g., "csr")
+        by default an appropriate sparse array format is returned.
+        This choice is subject to change.
+    dtype : dtype, optional
+        The data-type of the output array. If not given, the dtype is
+        determined from that of `blocks`.
+
+    Returns
+    -------
+    new_array : sparse matrix or array
+        If any block in blocks is a sparse array, return a sparse array.
+        Otherwise return a sparse matrix.
+
+        If you want a sparse array built from blocks that are not sparse
+        arrays, use ``block(vstack(blocks))`` or convert one block
+        e.g. `blocks[0] = csr_array(blocks[0])`.
+
+    See Also
+    --------
+    hstack : stack sparse matrices horizontally (column wise)
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_array, vstack
+    >>> A = coo_array([[1, 2], [3, 4]])
+    >>> B = coo_array([[5, 6]])
+    >>> vstack([A, B]).toarray()
+    array([[1, 2],
+           [3, 4],
+           [5, 6]])
+
+    """
+    blocks = np.asarray(blocks, dtype='object')
+    if any(isinstance(b, sparray) for b in blocks.flat):
+        return _block([[b] for b in blocks], format, dtype)
+    else:
+        return _block([[b] for b in blocks], format, dtype, return_spmatrix=True)
+
+
+def bmat(blocks, format=None, dtype=None):
+    """
+    Build a sparse array or matrix from sparse sub-blocks
+
+    Note: `block_array` is preferred over `bmat`. They are the same function
+    except that `bmat` can return a deprecated sparse matrix.
+    `bmat` returns a coo_matrix if none of the inputs are a sparse array.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``block_array`` to take advantage
+        of the sparse array functionality.
+
+    Parameters
+    ----------
+    blocks : array_like
+        Grid of sparse matrices with compatible shapes.
+        An entry of None implies an all-zero matrix.
+    format : {'bsr', 'coo', 'csc', 'csr', 'dia', 'dok', 'lil'}, optional
+        The sparse format of the result (e.g. "csr"). By default an
+        appropriate sparse matrix format is returned.
+        This choice is subject to change.
+    dtype : dtype, optional
+        The data-type of the output matrix. If not given, the dtype is
+        determined from that of `blocks`.
+
+    Returns
+    -------
+    bmat : sparse matrix or array
+        If any block in blocks is a sparse array, return a sparse array.
+        Otherwise return a sparse matrix.
+
+        If you want a sparse array built from blocks that are not sparse
+        arrays, use ``block_array()``.
+
+    See Also
+    --------
+    block_array
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_array, bmat
+    >>> A = coo_array([[1, 2], [3, 4]])
+    >>> B = coo_array([[5], [6]])
+    >>> C = coo_array([[7]])
+    >>> bmat([[A, B], [None, C]]).toarray()
+    array([[1, 2, 5],
+           [3, 4, 6],
+           [0, 0, 7]])
+
+    >>> bmat([[A, None], [None, C]]).toarray()
+    array([[1, 2, 0],
+           [3, 4, 0],
+           [0, 0, 7]])
+
+    """
+    blocks = np.asarray(blocks, dtype='object')
+    if any(isinstance(b, sparray) for b in blocks.flat):
+        return _block(blocks, format, dtype)
+    else:
+        return _block(blocks, format, dtype, return_spmatrix=True)
+
+
+def block_array(blocks, *, format=None, dtype=None):
+    """
+    Build a sparse array from sparse sub-blocks
+
+    Parameters
+    ----------
+    blocks : array_like
+        Grid of sparse arrays with compatible shapes.
+        An entry of None implies an all-zero array.
+    format : {'bsr', 'coo', 'csc', 'csr', 'dia', 'dok', 'lil'}, optional
+        The sparse format of the result (e.g. "csr"). By default an
+        appropriate sparse array format is returned.
+        This choice is subject to change.
+    dtype : dtype, optional
+        The data-type of the output array. If not given, the dtype is
+        determined from that of `blocks`.
+
+    Returns
+    -------
+    block : sparse array
+
+    See Also
+    --------
+    block_diag : specify blocks along the main diagonals
+    diags : specify (possibly offset) diagonals
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_array, block_array
+    >>> A = coo_array([[1, 2], [3, 4]])
+    >>> B = coo_array([[5], [6]])
+    >>> C = coo_array([[7]])
+    >>> block_array([[A, B], [None, C]]).toarray()
+    array([[1, 2, 5],
+           [3, 4, 6],
+           [0, 0, 7]])
+
+    >>> block_array([[A, None], [None, C]]).toarray()
+    array([[1, 2, 0],
+           [3, 4, 0],
+           [0, 0, 7]])
+
+    """
+    return _block(blocks, format, dtype)
+
+
+def _block(blocks, format, dtype, return_spmatrix=False):
+    blocks = np.asarray(blocks, dtype='object')
+
+    if blocks.ndim != 2:
+        raise ValueError('blocks must be 2-D')
+
+    M,N = blocks.shape
+
+    # check for fast path cases
+    if (format in (None, 'csr') and
+        all(issparse(b) and b.format == 'csr' for b in blocks.flat)
+    ):
+        if N > 1:
+            # stack along columns (axis 1): must have shape (M, 1)
+            blocks = [[_stack_along_minor_axis(blocks[b, :], 1)] for b in range(M)]
+            blocks = np.asarray(blocks, dtype='object')
+
+        # stack along rows (axis 0):
+        A = _compressed_sparse_stack(blocks[:, 0], 0, return_spmatrix)
+        if dtype is not None:
+            A = A.astype(dtype, copy=False)
+        return A
+    elif (format in (None, 'csc') and
+          all(issparse(b) and b.format == 'csc' for b in blocks.flat)
+    ):
+        if M > 1:
+            # stack along rows (axis 0): must have shape (1, N)
+            blocks = [[_stack_along_minor_axis(blocks[:, b], 0) for b in range(N)]]
+            blocks = np.asarray(blocks, dtype='object')
+
+        # stack along columns (axis 1):
+        A = _compressed_sparse_stack(blocks[0, :], 1, return_spmatrix)
+        if dtype is not None:
+            A = A.astype(dtype, copy=False)
+        return A
+
+    block_mask = np.zeros(blocks.shape, dtype=bool)
+    brow_lengths = np.zeros(M, dtype=np.int64)
+    bcol_lengths = np.zeros(N, dtype=np.int64)
+
+    # convert everything to COO format
+    for i in range(M):
+        for j in range(N):
+            if blocks[i,j] is not None:
+                A = coo_array(blocks[i,j])
+                blocks[i,j] = A
+                block_mask[i,j] = True
+
+                if brow_lengths[i] == 0:
+                    brow_lengths[i] = A._shape_as_2d[0]
+                elif brow_lengths[i] != A._shape_as_2d[0]:
+                    msg = (f'blocks[{i},:] has incompatible row dimensions. '
+                           f'Got blocks[{i},{j}].shape[0] == {A._shape_as_2d[0]}, '
+                           f'expected {brow_lengths[i]}.')
+                    raise ValueError(msg)
+
+                if bcol_lengths[j] == 0:
+                    bcol_lengths[j] = A._shape_as_2d[1]
+                elif bcol_lengths[j] != A._shape_as_2d[1]:
+                    msg = (f'blocks[:,{j}] has incompatible column '
+                           f'dimensions. '
+                           f'Got blocks[{i},{j}].shape[1] == {A._shape_as_2d[1]}, '
+                           f'expected {bcol_lengths[j]}.')
+                    raise ValueError(msg)
+
+    nnz = sum(block.nnz for block in blocks[block_mask])
+    if dtype is None:
+        all_dtypes = [blk.dtype for blk in blocks[block_mask]]
+        dtype = upcast(*all_dtypes) if all_dtypes else None
+
+    row_offsets = np.append(0, np.cumsum(brow_lengths))
+    col_offsets = np.append(0, np.cumsum(bcol_lengths))
+
+    shape = (row_offsets[-1], col_offsets[-1])
+
+    data = np.empty(nnz, dtype=dtype)
+    idx_dtype = get_index_dtype([b.coords[0] for b in blocks[block_mask]],
+                                maxval=max(shape))
+    row = np.empty(nnz, dtype=idx_dtype)
+    col = np.empty(nnz, dtype=idx_dtype)
+
+    nnz = 0
+    ii, jj = np.nonzero(block_mask)
+    for i, j in zip(ii, jj):
+        B = blocks[i, j]
+        idx = slice(nnz, nnz + B.nnz)
+        data[idx] = B.data
+        np.add(B.row, row_offsets[i], out=row[idx], dtype=idx_dtype)
+        np.add(B.col, col_offsets[j], out=col[idx], dtype=idx_dtype)
+        nnz += B.nnz
+
+    if return_spmatrix:
+        return coo_matrix((data, (row, col)), shape=shape).asformat(format)
+    return coo_array((data, (row, col)), shape=shape).asformat(format)
+
+
+def block_diag(mats, format=None, dtype=None):
+    """
+    Build a block diagonal sparse matrix or array from provided matrices.
+
+    Parameters
+    ----------
+    mats : sequence of matrices or arrays
+        Input matrices or arrays.
+    format : str, optional
+        The sparse format of the result (e.g., "csr"). If not given, the result
+        is returned in "coo" format.
+    dtype : dtype specifier, optional
+        The data-type of the output. If not given, the dtype is
+        determined from that of `blocks`.
+
+    Returns
+    -------
+    res : sparse matrix or array
+        If at least one input is a sparse array, the output is a sparse array.
+        Otherwise the output is a sparse matrix.
+
+    Notes
+    -----
+
+    .. versionadded:: 0.11.0
+
+    See Also
+    --------
+    block_array
+    diags_array
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_array, block_diag
+    >>> A = coo_array([[1, 2], [3, 4]])
+    >>> B = coo_array([[5], [6]])
+    >>> C = coo_array([[7]])
+    >>> block_diag((A, B, C)).toarray()
+    array([[1, 2, 0, 0],
+           [3, 4, 0, 0],
+           [0, 0, 5, 0],
+           [0, 0, 6, 0],
+           [0, 0, 0, 7]])
+
+    """
+    if any(isinstance(a, sparray) for a in mats):
+        container = coo_array
+    else:
+        container = coo_matrix
+
+    row = []
+    col = []
+    data = []
+    idx_arrays = []  # track idx_dtype of incoming sparse arrays
+    r_idx = 0
+    c_idx = 0
+    for a in mats:
+        if isinstance(a, (list | numbers.Number)):
+            a = coo_array(np.atleast_2d(a))
+        if issparse(a):
+            a = a.tocoo()
+            if not idx_arrays and a.coords[0].dtype == np.int64:
+                idx_arrays.append(a.coords[0])
+            nrows, ncols = a._shape_as_2d
+            row.append(a.row + r_idx)
+            col.append(a.col + c_idx)
+            data.append(a.data)
+        else:
+            nrows, ncols = a.shape
+            a_row, a_col = np.divmod(np.arange(nrows*ncols), ncols)
+            row.append(a_row + r_idx)
+            col.append(a_col + c_idx)
+            data.append(a.ravel())
+        r_idx += nrows
+        c_idx += ncols
+    idx_dtype = get_index_dtype(idx_arrays, maxval=max(r_idx, c_idx))
+    row = np.concatenate(row, dtype=idx_dtype)
+    col = np.concatenate(col, dtype=idx_dtype)
+    data = np.concatenate(data)
+    new_shape = (r_idx, c_idx)
+
+    return container((data, (row, col)), shape=new_shape, dtype=dtype).asformat(format)
+
+
+@_transition_to_rng("random_state")
+def random_array(shape, *, density=0.01, format='coo', dtype=None,
+                 rng=None, data_sampler=None):
+    """Return a sparse array of uniformly random numbers in [0, 1)
+
+    Returns a sparse array with the given shape and density
+    where values are generated uniformly randomly in the range [0, 1).
+
+    Parameters
+    ----------
+    shape : int or tuple of ints
+        shape of the array
+    density : real, optional (default: 0.01)
+        density of the generated matrix: density equal to one means a full
+        matrix, density of 0 means a matrix with no non-zero items.
+    format : str, optional (default: 'coo')
+        sparse matrix format.
+    dtype : dtype, optional (default: np.float64)
+        type of the returned matrix values.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+        This random state will be used for sampling `indices` (the sparsity
+        structure), and by default for the data values too (see `data_sampler`).
+    data_sampler : callable, optional (default depends on dtype)
+        Sampler of random data values with keyword arg `size`.
+        This function should take a single keyword argument `size` specifying
+        the length of its returned ndarray. It is used to generate the nonzero
+        values in the matrix after the locations of those values are chosen.
+        By default, uniform [0, 1) random values are used unless `dtype` is
+        an integer (default uniform integers from that dtype) or
+        complex (default uniform over the unit square in the complex plane).
+        For these, the `rng` is used e.g. ``rng.uniform(size=size)``.
+
+    Returns
+    -------
+    res : sparse array
+
+    Examples
+    --------
+
+    Passing a ``np.random.Generator`` instance for better performance:
+
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> rng = np.random.default_rng()
+
+    Default sampling uniformly from [0, 1):
+
+    >>> S = sp.sparse.random_array((3, 4), density=0.25, rng=rng)
+
+    Providing a sampler for the values:
+
+    >>> rvs = sp.stats.poisson(25, loc=10).rvs
+    >>> S = sp.sparse.random_array((3, 4), density=0.25,
+    ...                            rng=rng, data_sampler=rvs)
+    >>> S.toarray()
+    array([[ 36.,   0.,  33.,   0.],   # random
+           [  0.,   0.,   0.,   0.],
+           [  0.,   0.,  36.,   0.]])
+
+    Building a custom distribution.
+    This example builds a squared normal from np.random:
+
+    >>> def np_normal_squared(size=None, rng=rng):
+    ...     return rng.standard_normal(size) ** 2
+    >>> S = sp.sparse.random_array((3, 4), density=0.25, rng=rng,
+    ...                            data_sampler=np_normal_squared)
+
+    Or we can build it from sp.stats style rvs functions:
+
+    >>> def sp_stats_normal_squared(size=None, rng=rng):
+    ...     std_normal = sp.stats.distributions.norm_gen().rvs
+    ...     return std_normal(size=size, random_state=rng) ** 2
+    >>> S = sp.sparse.random_array((3, 4), density=0.25, rng=rng,
+    ...                            data_sampler=sp_stats_normal_squared)
+
+    Or we can subclass sp.stats rv_continuous or rv_discrete:
+
+    >>> class NormalSquared(sp.stats.rv_continuous):
+    ...     def _rvs(self,  size=None, random_state=rng):
+    ...         return rng.standard_normal(size) ** 2
+    >>> X = NormalSquared()
+    >>> Y = X().rvs
+    >>> S = sp.sparse.random_array((3, 4), density=0.25,
+    ...                            rng=rng, data_sampler=Y)
+    """
+    data, ind = _random(shape, density, format, dtype, rng, data_sampler)
+
+    # downcast, if safe, before calling coo_constructor
+    idx_dtype = get_index_dtype(maxval=max(shape))
+    ind = tuple(np.asarray(co, dtype=idx_dtype) for co in ind)
+    return coo_array((data, ind), shape=shape).asformat(format)
+
+
+def _random(shape, density=0.01, format=None, dtype=None,
+            rng=None, data_sampler=None):
+    if density < 0 or density > 1:
+        raise ValueError("density expected to be 0 <= density <= 1")
+
+    tot_prod = math.prod(shape)  # use `math` for when prod is >= 2**64
+
+    # Number of non zero values
+    size = int(round(density * tot_prod))
+
+    rng = check_random_state(rng)
+
+    if data_sampler is None:
+        if np.issubdtype(dtype, np.integer):
+            def data_sampler(size):
+                return rng_integers(rng,
+                                    np.iinfo(dtype).min,
+                                    np.iinfo(dtype).max,
+                                    size,
+                                    dtype=dtype)
+        elif np.issubdtype(dtype, np.complexfloating):
+            def data_sampler(size):
+                return (rng.uniform(size=size) +
+                        rng.uniform(size=size) * 1j)
+        else:
+            data_sampler = rng.uniform
+
+    idx_dtype = get_index_dtype(maxval=max(shape))
+    # rng.choice uses int64 if first arg is an int
+    if tot_prod <= np.iinfo(np.int64).max:
+        raveled_ind = rng.choice(tot_prod, size=size, replace=False)
+        ind = np.unravel_index(raveled_ind, shape=shape, order='F')
+        ind = tuple(np.asarray(co, idx_dtype) for co in ind)
+    else:
+        # for ravel indices bigger than dtype max, use sets to remove duplicates
+        ndim = len(shape)
+        seen = set()
+        while len(seen) < size:
+            dsize = size - len(seen)
+            seen.update(map(tuple, rng_integers(rng, shape, size=(dsize, ndim))))
+        ind = tuple(np.array(list(seen), dtype=idx_dtype).T)
+
+    # size kwarg allows eg data_sampler=partial(np.random.poisson, lam=5)
+    vals = data_sampler(size=size).astype(dtype, copy=False)
+    return vals, ind
+
+
+@_transition_to_rng("random_state", position_num=5)
+def random(m, n, density=0.01, format='coo', dtype=None,
+           rng=None, data_rvs=None):
+    """Generate a sparse matrix of the given shape and density with randomly
+    distributed values.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``random_array`` to take advantage of the
+        sparse array functionality.
+
+    Parameters
+    ----------
+    m, n : int
+        shape of the matrix
+    density : real, optional
+        density of the generated matrix: density equal to one means a full
+        matrix, density of 0 means a matrix with no non-zero items.
+    format : str, optional
+        sparse matrix format.
+    dtype : dtype, optional
+        type of the returned matrix values.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+        This random state will be used for sampling the sparsity structure, but
+        not necessarily for sampling the values of the structurally nonzero
+        entries of the matrix.
+    data_rvs : callable, optional
+        Samples a requested number of random values.
+        This function should take a single argument specifying the length
+        of the ndarray that it will return. The structurally nonzero entries
+        of the sparse random matrix will be taken from the array sampled
+        by this function. By default, uniform [0, 1) random values will be
+        sampled using the same random state as is used for sampling
+        the sparsity structure.
+
+    Returns
+    -------
+    res : sparse matrix
+
+    See Also
+    --------
+    random_array : constructs sparse arrays instead of sparse matrices
+
+    Examples
+    --------
+
+    Passing a ``np.random.Generator`` instance for better performance:
+
+    >>> import scipy as sp
+    >>> import numpy as np
+    >>> rng = np.random.default_rng()
+    >>> S = sp.sparse.random(3, 4, density=0.25, rng=rng)
+
+    Providing a sampler for the values:
+
+    >>> rvs = sp.stats.poisson(25, loc=10).rvs
+    >>> S = sp.sparse.random(3, 4, density=0.25, rng=rng, data_rvs=rvs)
+    >>> S.toarray()
+    array([[ 36.,   0.,  33.,   0.],   # random
+           [  0.,   0.,   0.,   0.],
+           [  0.,   0.,  36.,   0.]])
+
+    Building a custom distribution.
+    This example builds a squared normal from np.random:
+
+    >>> def np_normal_squared(size=None, rng=rng):
+    ...     return rng.standard_normal(size) ** 2
+    >>> S = sp.sparse.random(3, 4, density=0.25, rng=rng,
+    ...                      data_rvs=np_normal_squared)
+
+    Or we can build it from sp.stats style rvs functions:
+
+    >>> def sp_stats_normal_squared(size=None, rng=rng):
+    ...     std_normal = sp.stats.distributions.norm_gen().rvs
+    ...     return std_normal(size=size, random_state=rng) ** 2
+    >>> S = sp.sparse.random(3, 4, density=0.25, rng=rng,
+    ...                      data_rvs=sp_stats_normal_squared)
+
+    Or we can subclass sp.stats rv_continuous or rv_discrete:
+
+    >>> class NormalSquared(sp.stats.rv_continuous):
+    ...     def _rvs(self,  size=None, random_state=rng):
+    ...         return rng.standard_normal(size) ** 2
+    >>> X = NormalSquared()
+    >>> Y = X()  # get a frozen version of the distribution
+    >>> S = sp.sparse.random(3, 4, density=0.25, rng=rng, data_rvs=Y.rvs)
+    """
+    if n is None:
+        n = m
+    m, n = int(m), int(n)
+    # make keyword syntax work for data_rvs e.g. data_rvs(size=7)
+    if data_rvs is not None:
+        def data_rvs_kw(size):
+            return data_rvs(size)
+    else:
+        data_rvs_kw = None
+    vals, ind = _random((m, n), density, format, dtype, rng, data_rvs_kw)
+    return coo_matrix((vals, ind), shape=(m, n)).asformat(format)
+
+
+@_transition_to_rng("random_state", position_num=5)
+def rand(m, n, density=0.01, format="coo", dtype=None, rng=None):
+    """Generate a sparse matrix of the given shape and density with uniformly
+    distributed values.
+
+    .. warning::
+
+        This function returns a sparse matrix -- not a sparse array.
+        You are encouraged to use ``random_array`` to take advantage
+        of the sparse array functionality.
+
+    Parameters
+    ----------
+    m, n : int
+        shape of the matrix
+    density : real, optional
+        density of the generated matrix: density equal to one means a full
+        matrix, density of 0 means a matrix with no non-zero items.
+    format : str, optional
+        sparse matrix format.
+    dtype : dtype, optional
+        type of the returned matrix values.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+    Returns
+    -------
+    res : sparse matrix
+
+    Notes
+    -----
+    Only float types are supported for now.
+
+    See Also
+    --------
+    random : Similar function allowing a custom random data sampler
+    random_array : Similar to random() but returns a sparse array
+
+    Examples
+    --------
+    >>> from scipy.sparse import rand
+    >>> matrix = rand(3, 4, density=0.25, format="csr", rng=42)
+    >>> matrix
+    
+    >>> matrix.toarray()
+    array([[0.05641158, 0.        , 0.        , 0.65088847],  # random
+           [0.        , 0.        , 0.        , 0.14286682],
+           [0.        , 0.        , 0.        , 0.        ]])
+
+    """
+    return random(m, n, density, format, dtype, rng)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_coo.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_coo.py
new file mode 100644
index 0000000000000000000000000000000000000000..3b1d577f90e5cf4d585aede3f30c6caf5b8ae059
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_coo.py
@@ -0,0 +1,1647 @@
+""" A sparse matrix in COOrdinate or 'triplet' format"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['coo_array', 'coo_matrix', 'isspmatrix_coo']
+
+import math
+from warnings import warn
+
+import numpy as np
+
+from .._lib._util import copy_if_needed
+from ._matrix import spmatrix
+from ._sparsetools import (coo_tocsr, coo_todense, coo_todense_nd,
+                           coo_matvec, coo_matvec_nd, coo_matmat_dense,
+                           coo_matmat_dense_nd)
+from ._base import issparse, SparseEfficiencyWarning, _spbase, sparray
+from ._data import _data_matrix, _minmax_mixin
+from ._sputils import (upcast_char, to_native, isshape, getdtype,
+                       getdata, downcast_intp_index, get_index_dtype,
+                       check_shape, check_reshape_kwargs, isscalarlike, isdense)
+
+import operator
+
+
+class _coo_base(_data_matrix, _minmax_mixin):
+    _format = 'coo'
+    _allow_nd = range(1, 65)
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False, *, maxprint=None):
+        _data_matrix.__init__(self, arg1, maxprint=maxprint)
+        if not copy:
+            copy = copy_if_needed
+
+        if isinstance(arg1, tuple):
+            if isshape(arg1, allow_nd=self._allow_nd):
+                self._shape = check_shape(arg1, allow_nd=self._allow_nd)
+                idx_dtype = self._get_index_dtype(maxval=max(self._shape))
+                data_dtype = getdtype(dtype, default=float)
+                self.coords = tuple(np.array([], dtype=idx_dtype)
+                                     for _ in range(len(self._shape)))
+                self.data = np.array([], dtype=data_dtype)
+                self.has_canonical_format = True
+            else:
+                try:
+                    obj, coords = arg1
+                except (TypeError, ValueError) as e:
+                    raise TypeError('invalid input format') from e
+
+                if shape is None:
+                    if any(len(idx) == 0 for idx in coords):
+                        raise ValueError('cannot infer dimensions from zero '
+                                         'sized index arrays')
+                    shape = tuple(operator.index(np.max(idx)) + 1
+                                  for idx in coords)
+                self._shape = check_shape(shape, allow_nd=self._allow_nd)
+                idx_dtype = self._get_index_dtype(coords,
+                                                  maxval=max(self.shape),
+                                                  check_contents=True)
+                self.coords = tuple(np.array(idx, copy=copy, dtype=idx_dtype)
+                                     for idx in coords)
+                self.data = getdata(obj, copy=copy, dtype=dtype)
+                self.has_canonical_format = False
+        else:
+            if issparse(arg1):
+                if arg1.format == self.format and copy:
+                    self.coords = tuple(idx.copy() for idx in arg1.coords)
+                    self.data = arg1.data.astype(getdtype(dtype, arg1))  # copy=True
+                    self._shape = check_shape(arg1.shape, allow_nd=self._allow_nd)
+                    self.has_canonical_format = arg1.has_canonical_format
+                else:
+                    coo = arg1.tocoo()
+                    self.coords = tuple(coo.coords)
+                    self.data = coo.data.astype(getdtype(dtype, coo), copy=False)
+                    self._shape = check_shape(coo.shape, allow_nd=self._allow_nd)
+                    self.has_canonical_format = False
+            else:
+                # dense argument
+                M = np.asarray(arg1)
+                if not isinstance(self, sparray):
+                    M = np.atleast_2d(M)
+                    if M.ndim != 2:
+                        raise TypeError(f'expected 2D array or matrix, not {M.ndim}D')
+
+                self._shape = check_shape(M.shape, allow_nd=self._allow_nd)
+                if shape is not None:
+                    if check_shape(shape, allow_nd=self._allow_nd) != self._shape:
+                        message = f'inconsistent shapes: {shape} != {self._shape}'
+                        raise ValueError(message)
+
+                index_dtype = self._get_index_dtype(maxval=max(self._shape))
+                coords = M.nonzero()
+                self.coords = tuple(idx.astype(index_dtype, copy=False)
+                                     for idx in coords)
+                self.data = getdata(M[coords], copy=copy, dtype=dtype)
+                self.has_canonical_format = True
+
+        if len(self._shape) > 2:
+            self.coords = tuple(idx.astype(np.int64, copy=False) for idx in self.coords)
+
+        self._check()
+
+    @property
+    def row(self):
+        if self.ndim > 1:
+            return self.coords[-2]
+        result = np.zeros_like(self.col)
+        result.setflags(write=False)
+        return result
+
+
+    @row.setter
+    def row(self, new_row):
+        if self.ndim < 2:
+            raise ValueError('cannot set row attribute of a 1-dimensional sparse array')
+        new_row = np.asarray(new_row, dtype=self.coords[-2].dtype)
+        self.coords = self.coords[:-2] + (new_row,) + self.coords[-1:]
+
+    @property
+    def col(self):
+        return self.coords[-1]
+
+    @col.setter
+    def col(self, new_col):
+        new_col = np.asarray(new_col, dtype=self.coords[-1].dtype)
+        self.coords = self.coords[:-1] + (new_col,)
+
+    def reshape(self, *args, **kwargs):
+        shape = check_shape(args, self.shape, allow_nd=self._allow_nd)
+        order, copy = check_reshape_kwargs(kwargs)
+
+        # Return early if reshape is not required
+        if shape == self.shape:
+            if copy:
+                return self.copy()
+            else:
+                return self
+
+        # When reducing the number of dimensions, we need to be careful about
+        # index overflow. This is why we can't simply call
+        # `np.ravel_multi_index()` followed by `np.unravel_index()` here.
+        flat_coords = _ravel_coords(self.coords, self.shape, order=order)
+        if len(shape) == 2:
+            if order == 'C':
+                new_coords = divmod(flat_coords, shape[1])
+            else:
+                new_coords = divmod(flat_coords, shape[0])[::-1]
+        else:
+            new_coords = np.unravel_index(flat_coords, shape, order=order)
+
+        idx_dtype = self._get_index_dtype(self.coords, maxval=max(shape))
+        new_coords = tuple(np.asarray(co, dtype=idx_dtype) for co in new_coords)
+
+        # Handle copy here rather than passing on to the constructor so that no
+        # copy will be made of `new_coords` regardless.
+        if copy:
+            new_data = self.data.copy()
+        else:
+            new_data = self.data
+
+        return self.__class__((new_data, new_coords), shape=shape, copy=False)
+
+    reshape.__doc__ = _spbase.reshape.__doc__
+
+    def _getnnz(self, axis=None):
+        if axis is None or (axis == 0 and self.ndim == 1):
+            nnz = len(self.data)
+            if any(len(idx) != nnz for idx in self.coords):
+                raise ValueError('all index and data arrays must have the '
+                                 'same length')
+
+            if self.data.ndim != 1 or any(idx.ndim != 1 for idx in self.coords):
+                raise ValueError('coordinates and data arrays must be 1-D')
+
+            return int(nnz)
+
+        if axis < 0:
+            axis += self.ndim
+        if axis >= self.ndim:
+            raise ValueError('axis out of bounds')
+
+        return np.bincount(downcast_intp_index(self.coords[1 - axis]),
+                           minlength=self.shape[1 - axis])
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+
+    def count_nonzero(self, axis=None):
+        self.sum_duplicates()
+        if axis is None:
+            return np.count_nonzero(self.data)
+
+        if axis < 0:
+            axis += self.ndim
+        if axis < 0 or axis >= self.ndim:
+            raise ValueError('axis out of bounds')
+        mask = self.data != 0
+        coord = self.coords[1 - axis][mask]
+        return np.bincount(downcast_intp_index(coord), minlength=self.shape[1 - axis])
+
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def _check(self):
+        """ Checks data structure for consistency """
+        if self.ndim != len(self.coords):
+            raise ValueError('mismatching number of index arrays for shape; '
+                             f'got {len(self.coords)}, expected {self.ndim}')
+
+        # index arrays should have integer data types
+        for i, idx in enumerate(self.coords):
+            if idx.dtype.kind != 'i':
+                warn(f'index array {i} has non-integer dtype ({idx.dtype.name})',
+                     stacklevel=3)
+
+        idx_dtype = self._get_index_dtype(self.coords, maxval=max(self.shape))
+        self.coords = tuple(np.asarray(idx, dtype=idx_dtype)
+                             for idx in self.coords)
+        self.data = to_native(self.data)
+
+        if self.nnz > 0:
+            for i, idx in enumerate(self.coords):
+                if idx.max() >= self.shape[i]:
+                    raise ValueError(f'axis {i} index {idx.max()} exceeds '
+                                     f'matrix dimension {self.shape[i]}')
+                if idx.min() < 0:
+                    raise ValueError(f'negative axis {i} index: {idx.min()}')
+
+    def transpose(self, axes=None, copy=False):
+        if axes is None:
+            axes = range(self.ndim)[::-1]
+        elif isinstance(self, sparray):
+            if not hasattr(axes, "__len__") or len(axes) != self.ndim:
+                raise ValueError("axes don't match matrix dimensions")
+            if len(set(axes)) != self.ndim:
+                raise ValueError("repeated axis in transpose")
+        elif axes != (1, 0):
+            raise ValueError("Sparse matrices do not support an 'axes' "
+                             "parameter because swapping dimensions is the "
+                             "only logical permutation.")
+
+        permuted_shape = tuple(self._shape[i] for i in axes)
+        permuted_coords = tuple(self.coords[i] for i in axes)
+        return self.__class__((self.data, permuted_coords),
+                              shape=permuted_shape, copy=copy)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def resize(self, *shape) -> None:
+        shape = check_shape(shape, allow_nd=self._allow_nd)
+        if self.ndim > 2:
+            raise ValueError("only 1-D or 2-D input accepted")
+        if len(shape) > 2:
+            raise ValueError("shape argument must be 1-D or 2-D")
+        # Check for added dimensions.
+        if len(shape) > self.ndim:
+            flat_coords = _ravel_coords(self.coords, self.shape)
+            max_size = math.prod(shape)
+            self.coords = np.unravel_index(flat_coords[:max_size], shape)
+            self.data = self.data[:max_size]
+            self._shape = shape
+            return
+
+        # Check for removed dimensions.
+        if len(shape) < self.ndim:
+            tmp_shape = (
+                self._shape[:len(shape) - 1]  # Original shape without last axis
+                + (-1,)  # Last axis is used to flatten the array
+                + (1,) * (self.ndim - len(shape))  # Pad with ones
+            )
+            tmp = self.reshape(tmp_shape)
+            self.coords = tmp.coords[:len(shape)]
+            self._shape = tmp.shape[:len(shape)]
+
+        # Handle truncation of existing dimensions.
+        is_truncating = any(old > new for old, new in zip(self.shape, shape))
+        if is_truncating:
+            mask = np.logical_and.reduce([
+                idx < size for idx, size in zip(self.coords, shape)
+            ])
+            if not mask.all():
+                self.coords = tuple(idx[mask] for idx in self.coords)
+                self.data = self.data[mask]
+
+        self._shape = shape
+
+    resize.__doc__ = _spbase.resize.__doc__
+
+    def toarray(self, order=None, out=None):
+        B = self._process_toarray_args(order, out)
+        fortran = int(B.flags.f_contiguous)
+        if not fortran and not B.flags.c_contiguous:
+            raise ValueError("Output array must be C or F contiguous")
+        # This handles both 0D and 1D cases correctly regardless of the
+        # original shape.
+        if self.ndim == 1:
+            coo_todense_nd(np.array([1]), self.nnz, self.ndim,
+                           self.coords[0], self.data, B.ravel('A'), fortran)
+        elif self.ndim == 2:
+            M, N = self.shape
+            coo_todense(M, N, self.nnz, self.row, self.col, self.data,
+                        B.ravel('A'), fortran)
+        else:
+            if fortran:
+                strides = np.append(1, np.cumprod(self.shape[:-1]))
+            else:
+                strides = np.append(np.cumprod(self.shape[1:][::-1])[::-1], 1)
+            coords = np.concatenate(self.coords)
+            coo_todense_nd(strides, self.nnz, self.ndim,
+                           coords, self.data, B.ravel('A'), fortran)
+        # Note: reshape() doesn't copy here, but does return a new array (view).
+        return B.reshape(self.shape)
+
+    toarray.__doc__ = _spbase.toarray.__doc__
+
+    def tocsc(self, copy=False):
+        """Convert this array/matrix to Compressed Sparse Column format
+
+        Duplicate entries will be summed together.
+
+        Examples
+        --------
+        >>> from numpy import array
+        >>> from scipy.sparse import coo_array
+        >>> row  = array([0, 0, 1, 3, 1, 0, 0])
+        >>> col  = array([0, 2, 1, 3, 1, 0, 0])
+        >>> data = array([1, 1, 1, 1, 1, 1, 1])
+        >>> A = coo_array((data, (row, col)), shape=(4, 4)).tocsc()
+        >>> A.toarray()
+        array([[3, 0, 1, 0],
+               [0, 2, 0, 0],
+               [0, 0, 0, 0],
+               [0, 0, 0, 1]])
+
+        """
+        if self.ndim != 2:
+            raise ValueError(f'Cannot convert. CSC format must be 2D. Got {self.ndim}D')
+        if self.nnz == 0:
+            return self._csc_container(self.shape, dtype=self.dtype)
+        else:
+            from ._csc import csc_array
+            indptr, indices, data, shape = self._coo_to_compressed(csc_array._swap)
+
+            x = self._csc_container((data, indices, indptr), shape=shape)
+            if not self.has_canonical_format:
+                x.sum_duplicates()
+            return x
+
+    def tocsr(self, copy=False):
+        """Convert this array/matrix to Compressed Sparse Row format
+
+        Duplicate entries will be summed together.
+
+        Examples
+        --------
+        >>> from numpy import array
+        >>> from scipy.sparse import coo_array
+        >>> row  = array([0, 0, 1, 3, 1, 0, 0])
+        >>> col  = array([0, 2, 1, 3, 1, 0, 0])
+        >>> data = array([1, 1, 1, 1, 1, 1, 1])
+        >>> A = coo_array((data, (row, col)), shape=(4, 4)).tocsr()
+        >>> A.toarray()
+        array([[3, 0, 1, 0],
+               [0, 2, 0, 0],
+               [0, 0, 0, 0],
+               [0, 0, 0, 1]])
+
+        """
+        if self.ndim > 2:
+            raise ValueError(f'Cannot convert. CSR must be 1D or 2D. Got {self.ndim}D')
+        if self.nnz == 0:
+            return self._csr_container(self.shape, dtype=self.dtype)
+        else:
+            from ._csr import csr_array
+            arrays = self._coo_to_compressed(csr_array._swap, copy=copy)
+            indptr, indices, data, shape = arrays
+
+            x = self._csr_container((data, indices, indptr), shape=self.shape)
+            if not self.has_canonical_format:
+                x.sum_duplicates()
+            return x
+
+    def _coo_to_compressed(self, swap, copy=False):
+        """convert (shape, coords, data) to (indptr, indices, data, shape)"""
+        M, N = swap(self._shape_as_2d)
+        # convert idx_dtype intc to int32 for pythran.
+        # tested in scipy/optimize/tests/test__numdiff.py::test_group_columns
+        idx_dtype = self._get_index_dtype(self.coords, maxval=max(self.nnz, N))
+
+        if self.ndim == 1:
+            indices = self.coords[0].copy() if copy else self.coords[0]
+            nnz = len(indices)
+            indptr = np.array([0, nnz], dtype=idx_dtype)
+            data = self.data.copy() if copy else self.data
+            return indptr, indices, data, self.shape
+
+        # ndim == 2
+        major, minor = swap(self.coords)
+        nnz = len(major)
+        major = major.astype(idx_dtype, copy=False)
+        minor = minor.astype(idx_dtype, copy=False)
+
+        indptr = np.empty(M + 1, dtype=idx_dtype)
+        indices = np.empty_like(minor, dtype=idx_dtype)
+        data = np.empty_like(self.data, dtype=self.dtype)
+
+        coo_tocsr(M, N, nnz, major, minor, self.data, indptr, indices, data)
+        return indptr, indices, data, self.shape
+
+    def tocoo(self, copy=False):
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    tocoo.__doc__ = _spbase.tocoo.__doc__
+
+    def todia(self, copy=False):
+        if self.ndim != 2:
+            raise ValueError(f'Cannot convert. DIA format must be 2D. Got {self.ndim}D')
+        self.sum_duplicates()
+        ks = self.col - self.row  # the diagonal for each nonzero
+        diags, diag_idx = np.unique(ks, return_inverse=True)
+
+        if len(diags) > 100:
+            # probably undesired, should todia() have a maxdiags parameter?
+            warn(f"Constructing a DIA matrix with {len(diags)} diagonals "
+                 "is inefficient",
+                 SparseEfficiencyWarning, stacklevel=2)
+
+        #initialize and fill in data array
+        if self.data.size == 0:
+            data = np.zeros((0, 0), dtype=self.dtype)
+        else:
+            data = np.zeros((len(diags), self.col.max()+1), dtype=self.dtype)
+            data[diag_idx, self.col] = self.data
+
+        return self._dia_container((data, diags), shape=self.shape)
+
+    todia.__doc__ = _spbase.todia.__doc__
+
+    def todok(self, copy=False):
+        if self.ndim > 2:
+            raise ValueError(f'Cannot convert. DOK must be 1D or 2D. Got {self.ndim}D')
+        self.sum_duplicates()
+        dok = self._dok_container(self.shape, dtype=self.dtype)
+        # ensure that 1d coordinates are not tuples
+        if self.ndim == 1:
+            coords = self.coords[0]
+        else:
+            coords = zip(*self.coords)
+
+        dok._dict = dict(zip(coords, self.data))
+        return dok
+
+    todok.__doc__ = _spbase.todok.__doc__
+
+    def diagonal(self, k=0):
+        if self.ndim != 2:
+            raise ValueError("diagonal requires two dimensions")
+        rows, cols = self.shape
+        if k <= -rows or k >= cols:
+            return np.empty(0, dtype=self.data.dtype)
+        diag = np.zeros(min(rows + min(k, 0), cols - max(k, 0)),
+                        dtype=self.dtype)
+        diag_mask = (self.row + k) == self.col
+
+        if self.has_canonical_format:
+            row = self.row[diag_mask]
+            data = self.data[diag_mask]
+        else:
+            inds = tuple(idx[diag_mask] for idx in self.coords)
+            (row, _), data = self._sum_duplicates(inds, self.data[diag_mask])
+        diag[row + min(k, 0)] = data
+
+        return diag
+
+    diagonal.__doc__ = _data_matrix.diagonal.__doc__
+
+    def _setdiag(self, values, k):
+        if self.ndim != 2:
+            raise ValueError("setting a diagonal requires two dimensions")
+        M, N = self.shape
+        if values.ndim and not len(values):
+            return
+        idx_dtype = self.row.dtype
+
+        # Determine which triples to keep and where to put the new ones.
+        full_keep = self.col - self.row != k
+        if k < 0:
+            max_index = min(M+k, N)
+            if values.ndim:
+                max_index = min(max_index, len(values))
+            keep = np.logical_or(full_keep, self.col >= max_index)
+            new_row = np.arange(-k, -k + max_index, dtype=idx_dtype)
+            new_col = np.arange(max_index, dtype=idx_dtype)
+        else:
+            max_index = min(M, N-k)
+            if values.ndim:
+                max_index = min(max_index, len(values))
+            keep = np.logical_or(full_keep, self.row >= max_index)
+            new_row = np.arange(max_index, dtype=idx_dtype)
+            new_col = np.arange(k, k + max_index, dtype=idx_dtype)
+
+        # Define the array of data consisting of the entries to be added.
+        if values.ndim:
+            new_data = values[:max_index]
+        else:
+            new_data = np.empty(max_index, dtype=self.dtype)
+            new_data[:] = values
+
+        # Update the internal structure.
+        self.coords = (np.concatenate((self.row[keep], new_row)),
+                       np.concatenate((self.col[keep], new_col)))
+        self.data = np.concatenate((self.data[keep], new_data))
+        self.has_canonical_format = False
+
+    # needed by _data_matrix
+    def _with_data(self, data, copy=True):
+        """Returns a matrix with the same sparsity structure as self,
+        but with different data. By default the index arrays are copied.
+        """
+        if copy:
+            coords = tuple(idx.copy() for idx in self.coords)
+        else:
+            coords = self.coords
+        return self.__class__((data, coords), shape=self.shape, dtype=data.dtype)
+
+    def sum_duplicates(self) -> None:
+        """Eliminate duplicate entries by adding them together
+
+        This is an *in place* operation
+        """
+        if self.has_canonical_format:
+            return
+        summed = self._sum_duplicates(self.coords, self.data)
+        self.coords, self.data = summed
+        self.has_canonical_format = True
+
+    def _sum_duplicates(self, coords, data):
+        # Assumes coords not in canonical format.
+        if len(data) == 0:
+            return coords, data
+        # Sort coords w.r.t. rows, then cols. This corresponds to C-order,
+        # which we rely on for argmin/argmax to return the first index in the
+        # same way that numpy does (in the case of ties).
+        order = np.lexsort(coords[::-1])
+        coords = tuple(idx[order] for idx in coords)
+        data = data[order]
+        unique_mask = np.logical_or.reduce([
+            idx[1:] != idx[:-1] for idx in coords
+        ])
+        unique_mask = np.append(True, unique_mask)
+        coords = tuple(idx[unique_mask] for idx in coords)
+        unique_inds, = np.nonzero(unique_mask)
+        data = np.add.reduceat(data, downcast_intp_index(unique_inds), dtype=self.dtype)
+        return coords, data
+
+    def eliminate_zeros(self):
+        """Remove zero entries from the array/matrix
+
+        This is an *in place* operation
+        """
+        mask = self.data != 0
+        self.data = self.data[mask]
+        self.coords = tuple(idx[mask] for idx in self.coords)
+
+    #######################
+    # Arithmetic handlers #
+    #######################
+
+    def _add_dense(self, other):
+        if other.shape != self.shape:
+            raise ValueError(f'Incompatible shapes ({self.shape} and {other.shape})')
+        dtype = upcast_char(self.dtype.char, other.dtype.char)
+        result = np.array(other, dtype=dtype, copy=True)
+        fortran = int(result.flags.f_contiguous)
+        if self.ndim == 1:
+            coo_todense_nd(np.array([1]), self.nnz, self.ndim,
+                           self.coords[0], self.data, result.ravel('A'), fortran)
+        elif self.ndim == 2:
+            M, N = self._shape_as_2d
+            coo_todense(M, N, self.nnz, self.row, self.col, self.data,
+                        result.ravel('A'), fortran)
+        else:
+            if fortran:
+                strides = np.append(1, np.cumprod(self.shape[:-1]))
+            else:
+                strides = np.append(np.cumprod(self.shape[1:][::-1])[::-1], 1)
+            coords = np.concatenate(self.coords)
+            coo_todense_nd(strides, self.nnz, self.ndim,
+                           coords, self.data, result.ravel('A'), fortran)
+        return self._container(result, copy=False)
+
+
+    def _add_sparse(self, other):
+        if self.ndim < 3:
+            return self.tocsr()._add_sparse(other)
+
+        if other.shape != self.shape:
+            raise ValueError(f'Incompatible shapes ({self.shape} and {other.shape})')
+        other = self.__class__(other)
+        new_data = np.concatenate((self.data, other.data))
+        new_coords = tuple(np.concatenate((self.coords, other.coords), axis=1))
+        A = self.__class__((new_data, new_coords), shape=self.shape)
+        return A
+
+
+    def _sub_sparse(self, other):
+        if self.ndim < 3:
+            return self.tocsr()._sub_sparse(other)
+
+        if other.shape != self.shape:
+            raise ValueError(f'Incompatible shapes ({self.shape} and {other.shape})')
+        other = self.__class__(other)
+        new_data = np.concatenate((self.data, -other.data))
+        new_coords = tuple(np.concatenate((self.coords, other.coords), axis=1))
+        A = coo_array((new_data, new_coords), shape=self.shape)
+        return A
+
+
+    def _matmul_vector(self, other):
+        if self.ndim > 2:
+            result = np.zeros(math.prod(self.shape[:-1]),
+                              dtype=upcast_char(self.dtype.char, other.dtype.char))
+            shape = np.array(self.shape)
+            strides = np.append(np.cumprod(shape[:-1][::-1])[::-1][1:], 1)
+            coords = np.concatenate(self.coords)
+            coo_matvec_nd(self.nnz, len(self.shape), strides, coords, self.data,
+                          other, result)
+
+            result = result.reshape(self.shape[:-1])
+            return result
+
+        # self.ndim <= 2
+        result_shape = self.shape[0] if self.ndim > 1 else 1
+        result = np.zeros(result_shape,
+                          dtype=upcast_char(self.dtype.char, other.dtype.char))
+        if self.ndim == 2:
+            col = self.col
+            row = self.row
+        elif self.ndim == 1:
+            col = self.coords[0]
+            row = np.zeros_like(col)
+        else:
+            raise NotImplementedError(
+                f"coo_matvec not implemented for ndim={self.ndim}")
+
+        coo_matvec(self.nnz, row, col, self.data, other, result)
+        # Array semantics return a scalar here, not a single-element array.
+        if isinstance(self, sparray) and result_shape == 1:
+            return result[0]
+        return result
+
+
+    def _rmatmul_dispatch(self, other):
+        if isscalarlike(other):
+            return self._mul_scalar(other)
+        else:
+            # Don't use asarray unless we have to
+            try:
+                o_ndim = other.ndim
+            except AttributeError:
+                other = np.asarray(other)
+                o_ndim = other.ndim
+            perm = tuple(range(o_ndim)[:-2]) + tuple(range(o_ndim)[-2:][::-1])
+            tr = other.transpose(perm)
+
+            s_ndim = self.ndim
+            perm = tuple(range(s_ndim)[:-2]) + tuple(range(s_ndim)[-2:][::-1])
+            ret = self.transpose(perm)._matmul_dispatch(tr)
+            if ret is NotImplemented:
+                return NotImplemented
+
+            if s_ndim == 1 or o_ndim == 1:
+                perm = range(ret.ndim)
+            else:
+                perm = tuple(range(ret.ndim)[:-2]) + tuple(range(ret.ndim)[-2:][::-1])
+            return ret.transpose(perm)
+
+
+    def _matmul_dispatch(self, other):
+        if isscalarlike(other):
+            return self.multiply(other)
+
+        if not (issparse(other) or isdense(other)):
+            # If it's a list or whatever, treat it like an array
+            other_a = np.asanyarray(other)
+
+            if other_a.ndim == 0 and other_a.dtype == np.object_:
+                # Not interpretable as an array; return NotImplemented so that
+                # other's __rmatmul__ can kick in if that's implemented.
+                return NotImplemented
+
+            try:
+                other.shape
+            except AttributeError:
+                other = other_a
+
+        if self.ndim < 3 and other.ndim < 3:
+            return _spbase._matmul_dispatch(self, other)
+
+        N = self.shape[-1]
+        err_prefix = "matmul: dimension mismatch with signature"
+        if other.__class__ is np.ndarray:
+            if other.shape == (N,):
+                return self._matmul_vector(other)
+            if other.shape == (N, 1):
+                result = self._matmul_vector(other.ravel())
+                return result.reshape(*self.shape[:-1], 1)
+            if other.ndim == 1:
+                msg = f"{err_prefix} (n,k={N}),(k={other.shape[0]},)->(n,)"
+                raise ValueError(msg)
+            if other.shape[-2] == N:
+                # check for batch dimensions compatibility
+                batch_shape_A = self.shape[:-2]
+                batch_shape_B = other.shape[:-2]
+                if batch_shape_A != batch_shape_B:
+                    try:
+                        # This will raise an error if the shapes are not broadcastable
+                        np.broadcast_shapes(batch_shape_A, batch_shape_B)
+                    except ValueError:
+                        raise ValueError("Batch dimensions are not broadcastable")
+
+                return self._matmul_multivector(other)
+            else:
+                raise ValueError(
+                    f"{err_prefix} (n,..,k={N}),(k={other.shape[-2]},..,m)->(n,..,m)"
+                )
+
+
+        if isscalarlike(other):
+            # scalar value
+            return self._mul_scalar(other)
+
+        if issparse(other):
+            self_is_1d = self.ndim == 1
+            other_is_1d = other.ndim == 1
+
+            # reshape to 2-D if self or other is 1-D
+            if self_is_1d:
+                self = self.reshape(self._shape_as_2d) # prepend 1 to shape
+
+            if other_is_1d:
+                other = other.reshape((other.shape[0], 1)) # append 1 to shape
+
+            # Check if the inner dimensions match for matrix multiplication
+            if N != other.shape[-2]:
+                raise ValueError(
+                    f"{err_prefix} (n,..,k={N}),(k={other.shape[-2]},..,m)->(n,..,m)"
+                )
+
+            # If A or B has more than 2 dimensions, check for
+            # batch dimensions compatibility
+            if self.ndim > 2 or other.ndim > 2:
+                batch_shape_A = self.shape[:-2]
+                batch_shape_B = other.shape[:-2]
+                if batch_shape_A != batch_shape_B:
+                    try:
+                        # This will raise an error if the shapes are not broadcastable
+                        np.broadcast_shapes(batch_shape_A, batch_shape_B)
+                    except ValueError:
+                        raise ValueError("Batch dimensions are not broadcastable")
+
+            result = self._matmul_sparse(other)
+
+            # reshape back if a or b were originally 1-D
+            if self_is_1d:
+                # if self was originally 1-D, reshape result accordingly
+                result = result.reshape(tuple(result.shape[:-2]) +
+                                        tuple(result.shape[-1:]))
+            if other_is_1d:
+                result = result.reshape(result.shape[:-1])
+            return result
+
+
+    def _matmul_multivector(self, other):
+        result_dtype = upcast_char(self.dtype.char, other.dtype.char)
+        if self.ndim >= 3 or other.ndim >= 3:
+            # if self has shape (N,), reshape to (1,N)
+            if self.ndim == 1:
+                result = self.reshape(1, self.shape[0])._matmul_multivector(other)
+                return result.reshape(tuple(other.shape[:-2]) + tuple(other.shape[-1:]))
+
+            broadcast_shape = np.broadcast_shapes(self.shape[:-2], other.shape[:-2])
+            self_shape = broadcast_shape + self.shape[-2:]
+            other_shape = broadcast_shape + other.shape[-2:]
+
+            self = self._broadcast_to(self_shape)
+            other = np.broadcast_to(other, other_shape)
+            result_shape = broadcast_shape + self.shape[-2:-1] + other.shape[-1:]
+            result = np.zeros(result_shape, dtype=result_dtype)
+            coo_matmat_dense_nd(self.nnz, len(self.shape), other.shape[-1],
+                                np.array(other_shape), np.array(result_shape),
+                                np.concatenate(self.coords),
+                                self.data, other.ravel('C'), result)
+            return result
+
+        if self.ndim == 2:
+            result_shape = (self.shape[0], other.shape[1])
+            col = self.col
+            row = self.row
+        elif self.ndim == 1:
+            result_shape = (other.shape[1],)
+            col = self.coords[0]
+            row = np.zeros_like(col)
+        result = np.zeros(result_shape, dtype=result_dtype)
+        coo_matmat_dense(self.nnz, other.shape[-1], row, col,
+                         self.data, other.ravel('C'), result)
+        return result.view(type=type(other))
+
+
+    def dot(self, other):
+        """Return the dot product of two arrays.
+
+        Strictly speaking a dot product involves two vectors.
+        But in the sense that an array with ndim >= 1 is a collection
+        of vectors, the function computes the collection of dot products
+        between each vector in the first array with each vector in the
+        second array. The axis upon which the sum of products is performed
+        is the last axis of the first array and the second to last axis of
+        the second array. If the second array is 1-D, the last axis is used.
+
+        Thus, if both arrays are 1-D, the inner product is returned.
+        If both are 2-D, we have matrix multiplication. If `other` is 1-D,
+        the sum product is taken along the last axis of each array. If
+        `other` is N-D for N>=2, the sum product is over the last axis of
+        the first array and the second-to-last axis of the second array.
+
+        Parameters
+        ----------
+        other : array_like (dense or sparse)
+            Second array
+
+        Returns
+        -------
+        output : array (sparse or dense)
+            The dot product of this array with `other`.
+            It will be dense/sparse if `other` is dense/sparse.
+
+        Examples
+        --------
+
+        >>> import numpy as np
+        >>> from scipy.sparse import coo_array
+        >>> A = coo_array([[1, 2, 0], [0, 0, 3], [4, 0, 5]])
+        >>> v = np.array([1, 0, -1])
+        >>> A.dot(v)
+        array([ 1, -3, -1], dtype=int64)
+
+        For 2-D arrays it is the matrix product:
+
+        >>> A = coo_array([[1, 0], [0, 1]])
+        >>> B = coo_array([[4, 1], [2, 2]])
+        >>> A.dot(B).toarray()
+        array([[4, 1],
+               [2, 2]])
+
+        For 3-D arrays the shape extends unused axes by other unused axes.
+
+        >>> A = coo_array(np.arange(3*4*5*6)).reshape((3,4,5,6))
+        >>> B = coo_array(np.arange(3*4*5*6)).reshape((5,4,6,3))
+        >>> A.dot(B).shape
+        (3, 4, 5, 5, 4, 3)
+        """
+        if not (issparse(other) or isdense(other) or isscalarlike(other)):
+            # If it's a list or whatever, treat it like an array
+            o_array = np.asanyarray(other)
+
+            if o_array.ndim == 0 and o_array.dtype == np.object_:
+                raise TypeError(f"dot argument not supported type: '{type(other)}'")
+            try:
+                other.shape
+            except AttributeError:
+                other = o_array
+
+        if self.ndim < 3 and (np.isscalar(other) or other.ndim<3):
+            return _spbase.dot(self, other)
+        # Handle scalar multiplication
+        if np.isscalar(other):
+            return self * other
+        if isdense(other):
+            return self._dense_dot(other)
+        elif other.format != "coo":
+            raise TypeError("input must be a COO matrix/array")
+        elif self.ndim == 1 and other.ndim == 1:
+            # Handle inner product of vectors (1-D arrays)
+            if self.shape[0] != other.shape[0]:
+                raise ValueError(f"shapes {self.shape} and {other.shape}"
+                                 " are not aligned for inner product")
+            return self @ other
+        elif self.ndim == 2 and other.ndim == 2:
+            # Handle matrix multiplication (2-D arrays)
+            if self.shape[1] != other.shape[0]:
+                raise ValueError(f"shapes {self.shape} and {other.shape}"
+                                 " are not aligned for matmul")
+            return self @ other
+        else:
+            return self._sparse_dot(other)
+
+
+    def _sparse_dot(self, other):
+        self_is_1d = self.ndim == 1
+        other_is_1d = other.ndim == 1
+
+        # reshape to 2-D if self or other is 1-D
+        if self_is_1d:
+            self = self.reshape(self._shape_as_2d)  # prepend 1 to shape
+        if other_is_1d:
+            other = other.reshape((other.shape[0], 1))  # append 1 to shape
+
+        if self.shape[-1] != other.shape[-2]:
+                raise ValueError(f"shapes {self.shape} and {other.shape}"
+                                 " are not aligned for n-D dot")
+
+        # Prepare the tensors for dot operation
+        # Ravel non-reduced axes coordinates
+        self_raveled_coords = _ravel_non_reduced_axes(self.coords,
+                                                      self.shape, [self.ndim-1])
+        other_raveled_coords = _ravel_non_reduced_axes(other.coords,
+                                                       other.shape, [other.ndim-2])
+
+        # Get the shape of the non-reduced axes
+        self_nonreduced_shape = self.shape[:-1]
+        other_nonreduced_shape = other.shape[:-2] + other.shape[-1:]
+
+        # Create 2D coords arrays
+        ravel_coords_shape_self = (math.prod(self_nonreduced_shape), self.shape[-1])
+        ravel_coords_shape_other = (other.shape[-2], math.prod(other_nonreduced_shape))
+
+        self_2d_coords = (self_raveled_coords, self.coords[-1])
+        other_2d_coords = (other.coords[-2], other_raveled_coords)
+
+        self_2d = coo_array((self.data, self_2d_coords), ravel_coords_shape_self)
+        other_2d = coo_array((other.data, other_2d_coords), ravel_coords_shape_other)
+
+        prod = (self_2d @ other_2d).tocoo() # routes via 2-D CSR
+
+        # Combine the shapes of the non-reduced axes
+        combined_shape = self_nonreduced_shape + other_nonreduced_shape
+
+        # Unravel the 2D coordinates to get multi-dimensional coordinates
+        shapes = (self_nonreduced_shape, other_nonreduced_shape)
+        prod_coords = []
+        for c, s in zip(prod.coords, shapes):
+            prod_coords.extend(np.unravel_index(c, s))
+
+        prod_arr = coo_array((prod.data, prod_coords), combined_shape)
+
+        # reshape back if a or b were originally 1-D
+        # TODO: Move this logic before computation of prod_coords for efficiency
+        if self_is_1d:
+            prod_arr = prod_arr.reshape(combined_shape[1:])
+        if other_is_1d:
+            prod_arr = prod_arr.reshape(combined_shape[:-1])
+
+        return prod_arr
+
+    def _dense_dot(self, other):
+        self_is_1d = self.ndim == 1
+        other_is_1d = other.ndim == 1
+
+        # reshape to 2-D if self or other is 1-D
+        if self_is_1d:
+            self = self.reshape(self._shape_as_2d)  # prepend 1 to shape
+        if other_is_1d:
+            other = other.reshape((other.shape[0], 1))  # append 1 to shape
+
+        if self.shape[-1] != other.shape[-2]:
+                raise ValueError(f"shapes {self.shape} and {other.shape}"
+                                 " are not aligned for n-D dot")
+
+        new_shape_self = (
+            self.shape[:-1] + (1,) * (len(other.shape) - 1) + self.shape[-1:]
+        )
+        new_shape_other = (1,) * (len(self.shape) - 1) + other.shape
+
+        result_shape = self.shape[:-1] + other.shape[:-2] + other.shape[-1:]
+        result = self.reshape(new_shape_self) @ other.reshape(new_shape_other)
+        prod_arr = result.reshape(result_shape)
+
+        # reshape back if a or b were originally 1-D
+        if self_is_1d:
+            prod_arr = prod_arr.reshape(result_shape[1:])
+        if other_is_1d:
+            prod_arr = prod_arr.reshape(result_shape[:-1])
+
+        return prod_arr
+
+    def tensordot(self, other, axes=2):
+        """Return the tensordot product with another array along the given axes.
+
+        The tensordot differs from dot and matmul in that any axis can be
+        chosen for each of the first and second array and the sum of the
+        products is computed just like for matrix multiplication, only not
+        just for the rows of the first times the columns of the second. It
+        takes the dot product of the collection of vectors along the specified
+        axes.  Here we can even take the sum of the products along two or even
+        more axes if desired. So, tensordot is a dot product computation
+        applied to arrays of any dimension >= 1. It is like matmul but over
+        arbitrary axes for each matrix.
+
+        Given two tensors, `a` and `b`, and the desired axes specified as a
+        2-tuple/list/array containing two sequences of axis numbers,
+        ``(a_axes, b_axes)``, sum the products of `a`'s and `b`'s elements
+        (components) over the axes specified by ``a_axes`` and ``b_axes``.
+        The `axes` input can be a single non-negative integer, ``N``;
+        if it is, then the last ``N`` dimensions of `a` and the first
+        ``N`` dimensions of `b` are summed over.
+
+        Parameters
+        ----------
+        a, b : array_like
+            Tensors to "dot".
+
+        axes : int or (2,) array_like
+            * integer_like
+              If an int N, sum over the last N axes of `a` and the first N axes
+              of `b` in order. The sizes of the corresponding axes must match.
+            * (2,) array_like
+              A 2-tuple of sequences of axes to be summed over, the first applying
+              to `a`, the second to `b`. The sequences must be the same length.
+              The shape of the corresponding axes must match between `a` and `b`.
+
+        Returns
+        -------
+        output : coo_array
+            The tensor dot product of this array with `other`.
+            It will be dense/sparse if `other` is dense/sparse.
+
+        See Also
+        --------
+        dot
+
+        Examples
+        --------
+        >>> import numpy as np
+        >>> import scipy.sparse
+        >>> A = scipy.sparse.coo_array([[[2, 3], [0, 0]], [[0, 1], [0, 5]]])
+        >>> A.shape
+        (2, 2, 2)
+
+        Integer axes N are shorthand for (range(-N, 0), range(0, N)):
+
+        >>> A.tensordot(A, axes=1).toarray()
+        array([[[[ 4,  9],
+                 [ 0, 15]],
+        
+                [[ 0,  0],
+                 [ 0,  0]]],
+        
+        
+               [[[ 0,  1],
+                 [ 0,  5]],
+        
+                [[ 0,  5],
+                 [ 0, 25]]]])
+        >>> A.tensordot(A, axes=2).toarray()
+        array([[ 4,  6],
+               [ 0, 25]])
+        >>> A.tensordot(A, axes=3)
+        array(39)
+
+        Using tuple for axes:
+
+        >>> a = scipy.sparse.coo_array(np.arange(60).reshape(3,4,5))
+        >>> b = np.arange(24).reshape(4,3,2)
+        >>> c = a.tensordot(b, axes=([1,0],[0,1]))
+        >>> c.shape
+        (5, 2)
+        >>> c
+        array([[4400, 4730],
+               [4532, 4874],
+               [4664, 5018],
+               [4796, 5162],
+               [4928, 5306]])
+
+        """
+        if not isdense(other) and not issparse(other):
+            # If it's a list or whatever, treat it like an array
+            other_array = np.asanyarray(other)
+
+            if other_array.ndim == 0 and other_array.dtype == np.object_:
+                raise TypeError(f"tensordot arg not supported type: '{type(other)}'")
+            try:
+                other.shape
+            except AttributeError:
+                other = other_array
+
+        axes_self, axes_other = _process_axes(self.ndim, other.ndim, axes)
+
+        # Check for shape compatibility along specified axes
+        if any(self.shape[ax] != other.shape[bx]
+               for ax, bx in zip(axes_self, axes_other)):
+            raise ValueError("sizes of the corresponding axes must match")
+
+        if isdense(other):
+            return self._dense_tensordot(other, axes_self, axes_other)
+        else:
+            return self._sparse_tensordot(other, axes_self, axes_other)
+
+
+    def _sparse_tensordot(self, other, axes_self, axes_other):
+        ndim_self = len(self.shape)
+        ndim_other = len(other.shape)
+
+        # Prepare the tensors for tensordot operation
+        # Ravel non-reduced axes coordinates
+        self_non_red_coords = _ravel_non_reduced_axes(self.coords, self.shape,
+                                                      axes_self)
+        self_reduced_coords = np.ravel_multi_index(
+            [self.coords[ax] for ax in axes_self], [self.shape[ax] for ax in axes_self])
+        other_non_red_coords = _ravel_non_reduced_axes(other.coords, other.shape,
+                                                       axes_other)
+        other_reduced_coords = np.ravel_multi_index(
+            [other.coords[a] for a in axes_other], [other.shape[a] for a in axes_other]
+        )
+        # Get the shape of the non-reduced axes
+        self_nonreduced_shape = tuple(self.shape[ax] for ax in range(ndim_self)
+                              if ax not in axes_self)
+        other_nonreduced_shape = tuple(other.shape[ax] for ax in range(ndim_other)
+                               if ax not in axes_other)
+
+        # Create 2D coords arrays
+        ravel_coords_shape_self = (math.prod(self_nonreduced_shape),
+                                math.prod([self.shape[ax] for ax in axes_self]))
+        ravel_coords_shape_other = (math.prod([other.shape[ax] for ax in axes_other]),
+                                    math.prod(other_nonreduced_shape))
+
+        self_2d_coords = (self_non_red_coords, self_reduced_coords)
+        other_2d_coords = (other_reduced_coords, other_non_red_coords)
+
+        self_2d = coo_array((self.data, self_2d_coords), ravel_coords_shape_self)
+        other_2d = coo_array((other.data, other_2d_coords), ravel_coords_shape_other)
+
+        # Perform matrix multiplication (routed via 2-D CSR)
+        prod = (self_2d @ other_2d).tocoo()
+
+        # Combine the shapes of the non-contracted axes
+        combined_shape = self_nonreduced_shape + other_nonreduced_shape
+
+        # Unravel the 2D coordinates to get multi-dimensional coordinates
+        coords = []
+        for c, s in zip(prod.coords, (self_nonreduced_shape, other_nonreduced_shape)):
+            if s:
+                coords.extend(np.unravel_index(c, s))
+
+        if coords == []:  # if result is scalar
+            return sum(prod.data)
+
+        # Construct the resulting COO array with combined coordinates and shape
+        return coo_array((prod.data, coords), shape=combined_shape)
+
+
+    def _dense_tensordot(self, other, axes_self, axes_other):
+        ndim_self = len(self.shape)
+        ndim_other = len(other.shape)
+
+        non_reduced_axes_self = [ax for ax in range(ndim_self) if ax not in axes_self]
+        reduced_shape_self = [self.shape[s] for s in axes_self]
+        non_reduced_shape_self = [self.shape[s] for s in non_reduced_axes_self]
+
+        non_reduced_axes_other = [ax for ax in range(ndim_other)
+                                  if ax not in axes_other]
+        reduced_shape_other = [other.shape[s] for s in axes_other]
+        non_reduced_shape_other = [other.shape[s] for s in non_reduced_axes_other]
+
+        permute_self = non_reduced_axes_self + axes_self
+        permute_other = (
+            non_reduced_axes_other[:-1] + axes_other + non_reduced_axes_other[-1:]
+        )
+        self = self.transpose(permute_self)
+        other = np.transpose(other, permute_other)
+
+        reshape_self = (*non_reduced_shape_self, math.prod(reduced_shape_self))
+        reshape_other = (*non_reduced_shape_other[:-1], math.prod(reduced_shape_other),
+                        *non_reduced_shape_other[-1:])
+
+        return self.reshape(reshape_self).dot(other.reshape(reshape_other))
+
+
+    def _matmul_sparse(self, other):
+        """
+        Perform sparse-sparse matrix multiplication for two n-D COO arrays.
+        The method converts input n-D arrays to 2-D block array format,
+        uses csr_matmat to multiply them, and then converts the
+        result back to n-D COO array.
+
+        Parameters:
+        self (COO): The first n-D sparse array in COO format.
+        other (COO): The second n-D sparse array in COO format.
+
+        Returns:
+        prod (COO): The resulting n-D sparse array after multiplication.
+        """
+        if self.ndim < 3 and other.ndim < 3:
+            return _spbase._matmul_sparse(self, other)
+
+        # Get the shapes of self and other
+        self_shape = self.shape
+        other_shape = other.shape
+
+        # Determine the new shape to broadcast self and other
+        broadcast_shape = np.broadcast_shapes(self_shape[:-2], other_shape[:-2])
+        self_new_shape = tuple(broadcast_shape) + self_shape[-2:]
+        other_new_shape = tuple(broadcast_shape) + other_shape[-2:]
+
+        self_broadcasted = self._broadcast_to(self_new_shape)
+        other_broadcasted = other._broadcast_to(other_new_shape)
+
+        # Convert n-D COO arrays to 2-D block diagonal arrays
+        self_block_diag = _block_diag(self_broadcasted)
+        other_block_diag = _block_diag(other_broadcasted)
+
+        # Use csr_matmat to perform sparse matrix multiplication
+        prod_block_diag = (self_block_diag @ other_block_diag).tocoo()
+
+        # Convert the 2-D block diagonal array back to n-D
+        return _extract_block_diag(
+            prod_block_diag,
+            shape=(*broadcast_shape, self.shape[-2], other.shape[-1]),
+        )
+
+
+    def _broadcast_to(self, new_shape, copy=False):
+        if self.shape == new_shape:
+            return self.copy() if copy else self
+
+        old_shape = self.shape
+
+        # Check if the new shape is compatible for broadcasting
+        if len(new_shape) < len(old_shape):
+            raise ValueError("New shape must have at least as many dimensions"
+                             " as the current shape")
+
+        # Add leading ones to shape to ensure same length as `new_shape`
+        shape = (1,) * (len(new_shape) - len(old_shape)) + tuple(old_shape)
+
+        # Ensure the old shape can be broadcast to the new shape
+        if any((o != 1 and o != n) for o, n in zip(shape, new_shape)):
+            raise ValueError(f"current shape {old_shape} cannot be "
+                             "broadcast to new shape {new_shape}")
+
+        # Reshape the COO array to match the new dimensions
+        self = self.reshape(shape)
+
+        idx_dtype = get_index_dtype(self.coords, maxval=max(new_shape))
+        coords = self.coords
+        new_data = self.data
+        new_coords = coords[-1:]  # Copy last coordinate to start
+        cum_repeat = 1 # Cumulative repeat factor for broadcasting
+
+        if shape[-1] != new_shape[-1]: # broadcasting the n-th (col) dimension
+            repeat_count = new_shape[-1]
+            cum_repeat *= repeat_count
+            new_data = np.tile(new_data, repeat_count)
+            new_dim = np.repeat(np.arange(0, repeat_count, dtype=idx_dtype), self.nnz)
+            new_coords = (new_dim,)
+
+        for i in range(-2, -(len(shape)+1), -1):
+            if shape[i] != new_shape[i]:
+                repeat_count = new_shape[i] # number of times to repeat data, coords
+                cum_repeat *= repeat_count # update cumulative repeat factor
+                nnz = len(new_data) # Number of non-zero elements so far
+
+                # Tile data and coordinates to match the new repeat count
+                new_data = np.tile(new_data, repeat_count)
+                new_coords = tuple(np.tile(new_coords[i+1:], repeat_count))
+
+                # Create new dimensions and stack them
+                new_dim = np.repeat(np.arange(0, repeat_count, dtype=idx_dtype), nnz)
+                new_coords = (new_dim,) + new_coords
+            else:
+                # If no broadcasting needed, tile the coordinates
+                new_dim = np.tile(coords[i], cum_repeat)
+                new_coords = (new_dim,) + new_coords
+
+        return coo_array((new_data, new_coords), new_shape)
+
+
+def _block_diag(self):
+    """
+    Converts an N-D COO array into a 2-D COO array in block diagonal form.
+
+    Parameters:
+    self (coo_array): An N-Dimensional COO sparse array.
+
+    Returns:
+    coo_array: A 2-Dimensional COO sparse array in block diagonal form.
+    """
+    if self.ndim<2:
+        raise ValueError("array must have atleast dim=2")
+    num_blocks = math.prod(self.shape[:-2])
+    n_col = self.shape[-1]
+    n_row = self.shape[-2]
+    res_arr = self.reshape((num_blocks, n_row, n_col))
+    new_coords = (
+        res_arr.coords[1] + res_arr.coords[0] * res_arr.shape[1],
+        res_arr.coords[2] + res_arr.coords[0] * res_arr.shape[2],
+    )
+
+    new_shape = (num_blocks * n_row, num_blocks * n_col)
+    return coo_array((self.data, tuple(new_coords)), shape=new_shape)
+
+
+def _extract_block_diag(self, shape):
+    n_row, n_col = shape[-2], shape[-1]
+
+    # Extract data and coordinates from the block diagonal COO array
+    data = self.data
+    row, col = self.row, self.col
+
+    # Initialize new coordinates array
+    new_coords = np.empty((len(shape), self.nnz), dtype=int)
+
+    # Calculate within-block indices
+    new_coords[-2] = row % n_row
+    new_coords[-1] = col % n_col
+
+    # Calculate coordinates for higher dimensions
+    temp_block_idx = row // n_row
+    for i in range(len(shape) - 3, -1, -1):
+        size = shape[i]
+        new_coords[i] = temp_block_idx % size
+        temp_block_idx = temp_block_idx // size
+
+    # Create the new COO array with the original n-D shape
+    return coo_array((data, tuple(new_coords)), shape=shape)
+
+
+def _process_axes(ndim_a, ndim_b, axes):
+    if isinstance(axes, int):
+        if axes < 1 or axes > min(ndim_a, ndim_b):
+            raise ValueError("axes integer is out of bounds for input arrays")
+        axes_a = list(range(ndim_a - axes, ndim_a))
+        axes_b = list(range(axes))
+    elif isinstance(axes, (tuple, list)):
+        if len(axes) != 2:
+            raise ValueError("axes must be a tuple/list of length 2")
+        axes_a, axes_b = axes
+        if len(axes_a) != len(axes_b):
+            raise ValueError("axes lists/tuples must be of the same length")
+        if any(ax >= ndim_a or ax < -ndim_a for ax in axes_a) or \
+           any(bx >= ndim_b or bx < -ndim_b for bx in axes_b):
+            raise ValueError("axes indices are out of bounds for input arrays")
+    else:
+        raise TypeError("axes must be an integer or a tuple/list of integers")
+
+    axes_a = [axis + ndim_a if axis < 0 else axis for axis in axes_a]
+    axes_b = [axis + ndim_b if axis < 0 else axis for axis in axes_b]
+    return axes_a, axes_b
+
+
+def _ravel_non_reduced_axes(coords, shape, axes):
+    ndim = len(shape)
+    non_reduced_axes = [ax for ax in range(ndim) if ax not in axes]
+
+    if not non_reduced_axes:
+        # Return an array with one row
+        return np.zeros_like(coords[0])
+
+    # Extract the shape of the non-reduced axes
+    non_reduced_shape = [shape[ax] for ax in non_reduced_axes]
+
+    # Extract the coordinates of the non-reduced axes
+    non_reduced_coords = tuple(coords[idx] for idx in non_reduced_axes)
+
+    # Ravel the coordinates into 1D
+    return np.ravel_multi_index(non_reduced_coords, non_reduced_shape)
+
+
+def _ravel_coords(coords, shape, order='C'):
+    """Like np.ravel_multi_index, but avoids some overflow issues."""
+    if len(coords) == 1:
+        return coords[0]
+    # Handle overflow as in https://github.com/scipy/scipy/pull/9132
+    if len(coords) == 2:
+        nrows, ncols = shape
+        row, col = coords
+        if order == 'C':
+            maxval = (ncols * max(0, nrows - 1) + max(0, ncols - 1))
+            idx_dtype = get_index_dtype(maxval=maxval)
+            return np.multiply(ncols, row, dtype=idx_dtype) + col
+        elif order == 'F':
+            maxval = (nrows * max(0, ncols - 1) + max(0, nrows - 1))
+            idx_dtype = get_index_dtype(maxval=maxval)
+            return np.multiply(nrows, col, dtype=idx_dtype) + row
+        else:
+            raise ValueError("'order' must be 'C' or 'F'")
+    return np.ravel_multi_index(coords, shape, order=order)
+
+
+def isspmatrix_coo(x):
+    """Is `x` of coo_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a coo matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a coo matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import coo_array, coo_matrix, csr_matrix, isspmatrix_coo
+    >>> isspmatrix_coo(coo_matrix([[5]]))
+    True
+    >>> isspmatrix_coo(coo_array([[5]]))
+    False
+    >>> isspmatrix_coo(csr_matrix([[5]]))
+    False
+    """
+    return isinstance(x, coo_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class coo_array(_coo_base, sparray):
+    """
+    A sparse array in COOrdinate format.
+
+    Also known as the 'ijv' or 'triplet' format.
+
+    This can be instantiated in several ways:
+        coo_array(D)
+            where D is an ndarray
+
+        coo_array(S)
+            with another sparse array or matrix S (equivalent to S.tocoo())
+
+        coo_array(shape, [dtype])
+            to construct an empty sparse array with shape `shape`
+            dtype is optional, defaulting to dtype='d'.
+
+        coo_array((data, coords), [shape])
+            to construct from existing data and index arrays:
+                1. data[:]       the entries of the sparse array, in any order
+                2. coords[i][:]  the axis-i coordinates of the data entries
+
+            Where ``A[coords] = data``, and coords is a tuple of index arrays.
+            When shape is not specified, it is inferred from the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the sparse array
+    shape : tuple of integers
+        Shape of the sparse array
+    ndim : int
+        Number of dimensions of the sparse array
+    nnz
+    size
+    data
+        COO format data array of the sparse array
+    coords
+        COO format tuple of index arrays
+    has_canonical_format : bool
+        Whether the matrix has sorted coordinates and no duplicates
+    format
+    T
+
+    Notes
+    -----
+
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the COO format
+        - facilitates fast conversion among sparse formats
+        - permits duplicate entries (see example)
+        - very fast conversion to and from CSR/CSC formats
+
+    Disadvantages of the COO format
+        - does not directly support:
+            + arithmetic operations
+            + slicing
+
+    Intended Usage
+        - COO is a fast format for constructing sparse arrays
+        - Once a COO array has been constructed, convert to CSR or
+          CSC format for fast arithmetic and matrix vector operations
+        - By default when converting to CSR or CSC format, duplicate (i,j)
+          entries will be summed together.  This facilitates efficient
+          construction of finite element matrices and the like. (see example)
+
+    Canonical format
+        - Entries and coordinates sorted by row, then column.
+        - There are no duplicate entries (i.e. duplicate (i,j) locations)
+        - Data arrays MAY have explicit zeros.
+
+    Examples
+    --------
+
+    >>> # Constructing an empty sparse array
+    >>> import numpy as np
+    >>> from scipy.sparse import coo_array
+    >>> coo_array((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> # Constructing a sparse array using ijv format
+    >>> row  = np.array([0, 3, 1, 0])
+    >>> col  = np.array([0, 3, 1, 2])
+    >>> data = np.array([4, 5, 7, 9])
+    >>> coo_array((data, (row, col)), shape=(4, 4)).toarray()
+    array([[4, 0, 9, 0],
+           [0, 7, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 5]])
+
+    >>> # Constructing a sparse array with duplicate coordinates
+    >>> row  = np.array([0, 0, 1, 3, 1, 0, 0])
+    >>> col  = np.array([0, 2, 1, 3, 1, 0, 0])
+    >>> data = np.array([1, 1, 1, 1, 1, 1, 1])
+    >>> coo = coo_array((data, (row, col)), shape=(4, 4))
+    >>> # Duplicate coordinates are maintained until implicitly or explicitly summed
+    >>> np.max(coo.data)
+    1
+    >>> coo.toarray()
+    array([[3, 0, 1, 0],
+           [0, 2, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 1]])
+
+    """
+
+
+class coo_matrix(spmatrix, _coo_base):
+    """
+    A sparse matrix in COOrdinate format.
+
+    Also known as the 'ijv' or 'triplet' format.
+
+    This can be instantiated in several ways:
+        coo_matrix(D)
+            where D is a 2-D ndarray
+
+        coo_matrix(S)
+            with another sparse array or matrix S (equivalent to S.tocoo())
+
+        coo_matrix((M, N), [dtype])
+            to construct an empty matrix with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        coo_matrix((data, (i, j)), [shape=(M, N)])
+            to construct from three arrays:
+                1. data[:]   the entries of the matrix, in any order
+                2. i[:]      the row indices of the matrix entries
+                3. j[:]      the column indices of the matrix entries
+
+            Where ``A[i[k], j[k]] = data[k]``.  When shape is not
+            specified, it is inferred from the index arrays
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        COO format data array of the matrix
+    row
+        COO format row index array of the matrix
+    col
+        COO format column index array of the matrix
+    has_canonical_format : bool
+        Whether the matrix has sorted indices and no duplicates
+    format
+    T
+
+    Notes
+    -----
+
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the COO format
+        - facilitates fast conversion among sparse formats
+        - permits duplicate entries (see example)
+        - very fast conversion to and from CSR/CSC formats
+
+    Disadvantages of the COO format
+        - does not directly support:
+            + arithmetic operations
+            + slicing
+
+    Intended Usage
+        - COO is a fast format for constructing sparse matrices
+        - Once a COO matrix has been constructed, convert to CSR or
+          CSC format for fast arithmetic and matrix vector operations
+        - By default when converting to CSR or CSC format, duplicate (i,j)
+          entries will be summed together.  This facilitates efficient
+          construction of finite element matrices and the like. (see example)
+
+    Canonical format
+        - Entries and coordinates sorted by row, then column.
+        - There are no duplicate entries (i.e. duplicate (i,j) locations)
+        - Data arrays MAY have explicit zeros.
+
+    Examples
+    --------
+
+    >>> # Constructing an empty matrix
+    >>> import numpy as np
+    >>> from scipy.sparse import coo_matrix
+    >>> coo_matrix((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> # Constructing a matrix using ijv format
+    >>> row  = np.array([0, 3, 1, 0])
+    >>> col  = np.array([0, 3, 1, 2])
+    >>> data = np.array([4, 5, 7, 9])
+    >>> coo_matrix((data, (row, col)), shape=(4, 4)).toarray()
+    array([[4, 0, 9, 0],
+           [0, 7, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 5]])
+
+    >>> # Constructing a matrix with duplicate coordinates
+    >>> row  = np.array([0, 0, 1, 3, 1, 0, 0])
+    >>> col  = np.array([0, 2, 1, 3, 1, 0, 0])
+    >>> data = np.array([1, 1, 1, 1, 1, 1, 1])
+    >>> coo = coo_matrix((data, (row, col)), shape=(4, 4))
+    >>> # Duplicate coordinates are maintained until implicitly or explicitly summed
+    >>> np.max(coo.data)
+    1
+    >>> coo.toarray()
+    array([[3, 0, 1, 0],
+           [0, 2, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 1]])
+
+    """
+
+    def __setstate__(self, state):
+        if 'coords' not in state:
+            # For retro-compatibility with the previous attributes
+            # storing nnz coordinates for 2D COO matrix.
+            state['coords'] = (state.pop('row'), state.pop('col'))
+        self.__dict__.update(state)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csc.py
new file mode 100644
index 0000000000000000000000000000000000000000..9a03f50f6a29c71a838e6a9c93d61c20114bb432
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csc.py
@@ -0,0 +1,367 @@
+"""Compressed Sparse Column matrix format"""
+__docformat__ = "restructuredtext en"
+
+__all__ = ['csc_array', 'csc_matrix', 'isspmatrix_csc']
+
+
+import numpy as np
+
+from ._matrix import spmatrix
+from ._base import _spbase, sparray
+from ._sparsetools import csc_tocsr, expandptr
+from ._sputils import upcast
+
+from ._compressed import _cs_matrix
+
+
+class _csc_base(_cs_matrix):
+    _format = 'csc'
+
+    def transpose(self, axes=None, copy=False):
+        if axes is not None and axes != (1, 0):
+            raise ValueError("Sparse arrays/matrices do not support "
+                              "an 'axes' parameter because swapping "
+                              "dimensions is the only logical permutation.")
+
+        M, N = self.shape
+
+        return self._csr_container((self.data, self.indices,
+                                    self.indptr), (N, M), copy=copy)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def __iter__(self):
+        yield from self.tocsr()
+
+    def tocsc(self, copy=False):
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    tocsc.__doc__ = _spbase.tocsc.__doc__
+
+    def tocsr(self, copy=False):
+        M,N = self.shape
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices),
+                                    maxval=max(self.nnz, N))
+        indptr = np.empty(M + 1, dtype=idx_dtype)
+        indices = np.empty(self.nnz, dtype=idx_dtype)
+        data = np.empty(self.nnz, dtype=upcast(self.dtype))
+
+        csc_tocsr(M, N,
+                  self.indptr.astype(idx_dtype),
+                  self.indices.astype(idx_dtype),
+                  self.data,
+                  indptr,
+                  indices,
+                  data)
+
+        A = self._csr_container(
+            (data, indices, indptr),
+            shape=self.shape, copy=False
+        )
+        A.has_sorted_indices = True
+        return A
+
+    tocsr.__doc__ = _spbase.tocsr.__doc__
+
+    def nonzero(self):
+        # CSC can't use _cs_matrix's .nonzero method because it
+        # returns the indices sorted for self transposed.
+
+        # Get row and col indices, from _cs_matrix.tocoo
+        major_dim, minor_dim = self._swap(self.shape)
+        minor_indices = self.indices
+        major_indices = np.empty(len(minor_indices), dtype=self.indices.dtype)
+        expandptr(major_dim, self.indptr, major_indices)
+        row, col = self._swap((major_indices, minor_indices))
+
+        # Remove explicit zeros
+        nz_mask = self.data != 0
+        row = row[nz_mask]
+        col = col[nz_mask]
+
+        # Sort them to be in C-style order
+        ind = np.argsort(row, kind='mergesort')
+        row = row[ind]
+        col = col[ind]
+
+        return row, col
+
+    nonzero.__doc__ = _cs_matrix.nonzero.__doc__
+
+    def _getrow(self, i):
+        """Returns a copy of row i of the matrix, as a (1 x n)
+        CSR matrix (row vector).
+        """
+        M, N = self.shape
+        i = int(i)
+        if i < 0:
+            i += M
+        if i < 0 or i >= M:
+            raise IndexError('index (%d) out of range' % i)
+        return self._get_submatrix(minor=i).tocsr()
+
+    def _getcol(self, i):
+        """Returns a copy of column i of the matrix, as a (m x 1)
+        CSC matrix (column vector).
+        """
+        M, N = self.shape
+        i = int(i)
+        if i < 0:
+            i += N
+        if i < 0 or i >= N:
+            raise IndexError('index (%d) out of range' % i)
+        return self._get_submatrix(major=i, copy=True)
+
+    def _get_intXarray(self, row, col):
+        return self._major_index_fancy(col)._get_submatrix(minor=row)
+
+    def _get_intXslice(self, row, col):
+        if col.step in (1, None):
+            return self._get_submatrix(major=col, minor=row, copy=True)
+        return self._major_slice(col)._get_submatrix(minor=row)
+
+    def _get_sliceXint(self, row, col):
+        if row.step in (1, None):
+            return self._get_submatrix(major=col, minor=row, copy=True)
+        return self._get_submatrix(major=col)._minor_slice(row)
+
+    def _get_sliceXarray(self, row, col):
+        return self._major_index_fancy(col)._minor_slice(row)
+
+    def _get_arrayXint(self, row, col):
+        res = self._get_submatrix(major=col)._minor_index_fancy(row)
+        if row.ndim > 1:
+            return res.reshape(row.shape)
+        return res
+
+    def _get_arrayXslice(self, row, col):
+        return self._major_slice(col)._minor_index_fancy(row)
+
+    # these functions are used by the parent class (_cs_matrix)
+    # to remove redundancy between csc_array and csr_matrix
+    @staticmethod
+    def _swap(x):
+        """swap the members of x if this is a column-oriented matrix
+        """
+        return x[1], x[0]
+
+
+def isspmatrix_csc(x):
+    """Is `x` of csc_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a csc matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a csc matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import csc_array, csc_matrix, coo_matrix, isspmatrix_csc
+    >>> isspmatrix_csc(csc_matrix([[5]]))
+    True
+    >>> isspmatrix_csc(csc_array([[5]]))
+    False
+    >>> isspmatrix_csc(coo_matrix([[5]]))
+    False
+    """
+    return isinstance(x, csc_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class csc_array(_csc_base, sparray):
+    """
+    Compressed Sparse Column array.
+
+    This can be instantiated in several ways:
+        csc_array(D)
+            where D is a 2-D ndarray
+
+        csc_array(S)
+            with another sparse array or matrix S (equivalent to S.tocsc())
+
+        csc_array((M, N), [dtype])
+            to construct an empty array with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        csc_array((data, (row_ind, col_ind)), [shape=(M, N)])
+            where ``data``, ``row_ind`` and ``col_ind`` satisfy the
+            relationship ``a[row_ind[k], col_ind[k]] = data[k]``.
+
+        csc_array((data, indices, indptr), [shape=(M, N)])
+            is the standard CSC representation where the row indices for
+            column i are stored in ``indices[indptr[i]:indptr[i+1]]``
+            and their corresponding values are stored in
+            ``data[indptr[i]:indptr[i+1]]``.  If the shape parameter is
+            not supplied, the array dimensions are inferred from
+            the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        CSC format data array of the array
+    indices
+        CSC format index array of the array
+    indptr
+        CSC format index pointer array of the array
+    has_sorted_indices
+    has_canonical_format
+    T
+
+    Notes
+    -----
+
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the CSC format
+        - efficient arithmetic operations CSC + CSC, CSC * CSC, etc.
+        - efficient column slicing
+        - fast matrix vector products (CSR, BSR may be faster)
+
+    Disadvantages of the CSC format
+      - slow row slicing operations (consider CSR)
+      - changes to the sparsity structure are expensive (consider LIL or DOK)
+
+    Canonical format
+      - Within each column, indices are sorted by row.
+      - There are no duplicate entries.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> csc_array((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 2, 2, 0, 1, 2])
+    >>> col = np.array([0, 0, 1, 2, 2, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csc_array((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 4],
+           [0, 0, 5],
+           [2, 3, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csc_array((data, indices, indptr), shape=(3, 3)).toarray()
+    array([[1, 0, 4],
+           [0, 0, 5],
+           [2, 3, 6]])
+
+    """
+
+
+class csc_matrix(spmatrix, _csc_base):
+    """
+    Compressed Sparse Column matrix.
+
+    This can be instantiated in several ways:
+        csc_matrix(D)
+            where D is a 2-D ndarray
+
+        csc_matrix(S)
+            with another sparse array or matrix S (equivalent to S.tocsc())
+
+        csc_matrix((M, N), [dtype])
+            to construct an empty matrix with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        csc_matrix((data, (row_ind, col_ind)), [shape=(M, N)])
+            where ``data``, ``row_ind`` and ``col_ind`` satisfy the
+            relationship ``a[row_ind[k], col_ind[k]] = data[k]``.
+
+        csc_matrix((data, indices, indptr), [shape=(M, N)])
+            is the standard CSC representation where the row indices for
+            column i are stored in ``indices[indptr[i]:indptr[i+1]]``
+            and their corresponding values are stored in
+            ``data[indptr[i]:indptr[i+1]]``.  If the shape parameter is
+            not supplied, the matrix dimensions are inferred from
+            the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        CSC format data array of the matrix
+    indices
+        CSC format index array of the matrix
+    indptr
+        CSC format index pointer array of the matrix
+    has_sorted_indices
+    has_canonical_format
+    T
+
+    Notes
+    -----
+
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the CSC format
+        - efficient arithmetic operations CSC + CSC, CSC * CSC, etc.
+        - efficient column slicing
+        - fast matrix vector products (CSR, BSR may be faster)
+
+    Disadvantages of the CSC format
+      - slow row slicing operations (consider CSR)
+      - changes to the sparsity structure are expensive (consider LIL or DOK)
+
+    Canonical format
+      - Within each column, indices are sorted by row.
+      - There are no duplicate entries.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_matrix
+    >>> csc_matrix((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 2, 2, 0, 1, 2])
+    >>> col = np.array([0, 0, 1, 2, 2, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csc_matrix((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 4],
+           [0, 0, 5],
+           [2, 3, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csc_matrix((data, indices, indptr), shape=(3, 3)).toarray()
+    array([[1, 0, 4],
+           [0, 0, 5],
+           [2, 3, 6]])
+
+    """
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csr.py
new file mode 100644
index 0000000000000000000000000000000000000000..52ce35cdb1fbf75c26a08b4e13b93d236566ab0b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_csr.py
@@ -0,0 +1,558 @@
+"""Compressed Sparse Row matrix format"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['csr_array', 'csr_matrix', 'isspmatrix_csr']
+
+import numpy as np
+
+from ._matrix import spmatrix
+from ._base import _spbase, sparray
+from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
+                           get_csr_submatrix, csr_sample_values)
+from ._sputils import upcast
+
+from ._compressed import _cs_matrix
+
+
+class _csr_base(_cs_matrix):
+    _format = 'csr'
+    _allow_nd = (1, 2)
+
+    def transpose(self, axes=None, copy=False):
+        if axes is not None and axes != (1, 0):
+            raise ValueError("Sparse arrays/matrices do not support "
+                              "an 'axes' parameter because swapping "
+                              "dimensions is the only logical permutation.")
+
+        if self.ndim == 1:
+            return self.copy() if copy else self
+        M, N = self.shape
+        return self._csc_container((self.data, self.indices,
+                                    self.indptr), shape=(N, M), copy=copy)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def tolil(self, copy=False):
+        if self.ndim != 2:
+            raise ValueError("Cannot convert a 1d sparse array to lil format")
+        lil = self._lil_container(self.shape, dtype=self.dtype)
+
+        self.sum_duplicates()
+        ptr,ind,dat = self.indptr,self.indices,self.data
+        rows, data = lil.rows, lil.data
+
+        for n in range(self.shape[0]):
+            start = ptr[n]
+            end = ptr[n+1]
+            rows[n] = ind[start:end].tolist()
+            data[n] = dat[start:end].tolist()
+
+        return lil
+
+    tolil.__doc__ = _spbase.tolil.__doc__
+
+    def tocsr(self, copy=False):
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    tocsr.__doc__ = _spbase.tocsr.__doc__
+
+    def tocsc(self, copy=False):
+        if self.ndim != 2:
+            raise ValueError("Cannot convert a 1d sparse array to csc format")
+        M, N = self.shape
+        idx_dtype = self._get_index_dtype((self.indptr, self.indices),
+                                    maxval=max(self.nnz, M))
+        indptr = np.empty(N + 1, dtype=idx_dtype)
+        indices = np.empty(self.nnz, dtype=idx_dtype)
+        data = np.empty(self.nnz, dtype=upcast(self.dtype))
+
+        csr_tocsc(M, N,
+                  self.indptr.astype(idx_dtype),
+                  self.indices.astype(idx_dtype),
+                  self.data,
+                  indptr,
+                  indices,
+                  data)
+
+        A = self._csc_container((data, indices, indptr), shape=self.shape)
+        A.has_sorted_indices = True
+        return A
+
+    tocsc.__doc__ = _spbase.tocsc.__doc__
+
+    def tobsr(self, blocksize=None, copy=True):
+        if self.ndim != 2:
+            raise ValueError("Cannot convert a 1d sparse array to bsr format")
+        if blocksize is None:
+            from ._spfuncs import estimate_blocksize
+            return self.tobsr(blocksize=estimate_blocksize(self))
+
+        elif blocksize == (1,1):
+            arg1 = (self.data.reshape(-1,1,1),self.indices,self.indptr)
+            return self._bsr_container(arg1, shape=self.shape, copy=copy)
+
+        else:
+            R,C = blocksize
+            M,N = self.shape
+
+            if R < 1 or C < 1 or M % R != 0 or N % C != 0:
+                raise ValueError(f'invalid blocksize {blocksize}')
+
+            blks = csr_count_blocks(M,N,R,C,self.indptr,self.indices)
+
+            idx_dtype = self._get_index_dtype((self.indptr, self.indices),
+                                        maxval=max(N//C, blks))
+            indptr = np.empty(M//R+1, dtype=idx_dtype)
+            indices = np.empty(blks, dtype=idx_dtype)
+            data = np.zeros((blks,R,C), dtype=self.dtype)
+
+            csr_tobsr(M, N, R, C,
+                      self.indptr.astype(idx_dtype),
+                      self.indices.astype(idx_dtype),
+                      self.data,
+                      indptr, indices, data.ravel())
+
+            return self._bsr_container(
+                (data, indices, indptr), shape=self.shape
+            )
+
+    tobsr.__doc__ = _spbase.tobsr.__doc__
+
+    # these functions are used by the parent class (_cs_matrix)
+    # to remove redundancy between csc_matrix and csr_array
+    @staticmethod
+    def _swap(x):
+        """swap the members of x if this is a column-oriented matrix
+        """
+        return x
+
+    def __iter__(self):
+        if self.ndim == 1:
+            zero = self.dtype.type(0)
+            u = 0
+            for v, d in zip(self.indices, self.data):
+                for _ in range(v - u):
+                    yield zero
+                yield d
+                u = v + 1
+            for _ in range(self.shape[0] - u):
+                yield zero
+            return
+
+        indptr = np.zeros(2, dtype=self.indptr.dtype)
+        # return 1d (sparray) or 2drow (spmatrix)
+        shape = self.shape[1:] if isinstance(self, sparray) else (1, self.shape[1])
+        i0 = 0
+        for i1 in self.indptr[1:]:
+            indptr[1] = i1 - i0
+            indices = self.indices[i0:i1]
+            data = self.data[i0:i1]
+            yield self.__class__((data, indices, indptr), shape=shape, copy=True)
+            i0 = i1
+
+    def _getrow(self, i):
+        """Returns a copy of row i of the matrix, as a (1 x n)
+        CSR matrix (row vector).
+        """
+        if self.ndim == 1:
+            if i not in (0, -1):
+                raise IndexError(f'index ({i}) out of range')
+            return self.reshape((1, self.shape[0]), copy=True)
+
+        M, N = self.shape
+        i = int(i)
+        if i < 0:
+            i += M
+        if i < 0 or i >= M:
+            raise IndexError('index (%d) out of range' % i)
+        indptr, indices, data = get_csr_submatrix(
+            M, N, self.indptr, self.indices, self.data, i, i + 1, 0, N)
+        return self.__class__((data, indices, indptr), shape=(1, N),
+                              dtype=self.dtype, copy=False)
+
+    def _getcol(self, i):
+        """Returns a copy of column i. A (m x 1) sparse array (column vector).
+        """
+        if self.ndim == 1:
+            raise ValueError("getcol not provided for 1d arrays. Use indexing A[j]")
+        M, N = self.shape
+        i = int(i)
+        if i < 0:
+            i += N
+        if i < 0 or i >= N:
+            raise IndexError('index (%d) out of range' % i)
+        indptr, indices, data = get_csr_submatrix(
+            M, N, self.indptr, self.indices, self.data, 0, M, i, i + 1)
+        return self.__class__((data, indices, indptr), shape=(M, 1),
+                              dtype=self.dtype, copy=False)
+
+    def _get_int(self, idx):
+        spot = np.flatnonzero(self.indices == idx)
+        if spot.size:
+            return self.data[spot[0]]
+        return self.data.dtype.type(0)
+
+    def _get_slice(self, idx):
+        if idx == slice(None):
+            return self.copy()
+        if idx.step in (1, None):
+            ret = self._get_submatrix(0, idx, copy=True)
+            return ret.reshape(ret.shape[-1])
+        return self._minor_slice(idx)
+
+    def _get_array(self, idx):
+        idx_dtype = self._get_index_dtype(self.indices)
+        idx = np.asarray(idx, dtype=idx_dtype)
+        if idx.size == 0:
+            return self.__class__([], dtype=self.dtype)
+
+        M, N = 1, self.shape[0]
+        row = np.zeros_like(idx, dtype=idx_dtype)
+        col = np.asarray(idx, dtype=idx_dtype)
+        val = np.empty(row.size, dtype=self.dtype)
+        csr_sample_values(M, N, self.indptr, self.indices, self.data,
+                          row.size, row, col, val)
+
+        new_shape = col.shape if col.shape[0] > 1 else (col.shape[0],)
+        return self.__class__(val.reshape(new_shape))
+
+    def _get_intXarray(self, row, col):
+        return self._getrow(row)._minor_index_fancy(col)
+
+    def _get_intXslice(self, row, col):
+        if col.step in (1, None):
+            return self._get_submatrix(row, col, copy=True)
+        # TODO: uncomment this once it's faster:
+        # return self._getrow(row)._minor_slice(col)
+
+        M, N = self.shape
+        start, stop, stride = col.indices(N)
+
+        ii, jj = self.indptr[row:row+2]
+        row_indices = self.indices[ii:jj]
+        row_data = self.data[ii:jj]
+
+        if stride > 0:
+            ind = (row_indices >= start) & (row_indices < stop)
+        else:
+            ind = (row_indices <= start) & (row_indices > stop)
+
+        if abs(stride) > 1:
+            ind &= (row_indices - start) % stride == 0
+
+        row_indices = (row_indices[ind] - start) // stride
+        row_data = row_data[ind]
+        row_indptr = np.array([0, len(row_indices)])
+
+        if stride < 0:
+            row_data = row_data[::-1]
+            row_indices = abs(row_indices[::-1])
+
+        shape = (1, max(0, int(np.ceil(float(stop - start) / stride))))
+        return self.__class__((row_data, row_indices, row_indptr), shape=shape,
+                              dtype=self.dtype, copy=False)
+
+    def _get_sliceXint(self, row, col):
+        if row.step in (1, None):
+            return self._get_submatrix(row, col, copy=True)
+        return self._major_slice(row)._get_submatrix(minor=col)
+
+    def _get_sliceXarray(self, row, col):
+        return self._major_slice(row)._minor_index_fancy(col)
+
+    def _get_arrayXint(self, row, col):
+        res = self._major_index_fancy(row)._get_submatrix(minor=col)
+        if row.ndim > 1:
+            return res.reshape(row.shape)
+        return res
+
+    def _get_arrayXslice(self, row, col):
+        if col.step not in (1, None):
+            col = np.arange(*col.indices(self.shape[1]))
+            return self._get_arrayXarray(row, col)
+        return self._major_index_fancy(row)._get_submatrix(minor=col)
+
+    def _set_int(self, idx, x):
+        self._set_many(0, idx, x)
+
+    def _set_array(self, idx, x):
+        x = np.broadcast_to(x, idx.shape)
+        self._set_many(np.zeros_like(idx), idx, x)
+
+
+def isspmatrix_csr(x):
+    """Is `x` of csr_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a csr matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a csr matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import csr_array, csr_matrix, coo_matrix, isspmatrix_csr
+    >>> isspmatrix_csr(csr_matrix([[5]]))
+    True
+    >>> isspmatrix_csr(csr_array([[5]]))
+    False
+    >>> isspmatrix_csr(coo_matrix([[5]]))
+    False
+    """
+    return isinstance(x, csr_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class csr_array(_csr_base, sparray):
+    """
+    Compressed Sparse Row array.
+
+    This can be instantiated in several ways:
+        csr_array(D)
+            where D is a 2-D ndarray
+
+        csr_array(S)
+            with another sparse array or matrix S (equivalent to S.tocsr())
+
+        csr_array((M, N), [dtype])
+            to construct an empty array with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        csr_array((data, (row_ind, col_ind)), [shape=(M, N)])
+            where ``data``, ``row_ind`` and ``col_ind`` satisfy the
+            relationship ``a[row_ind[k], col_ind[k]] = data[k]``.
+
+        csr_array((data, indices, indptr), [shape=(M, N)])
+            is the standard CSR representation where the column indices for
+            row i are stored in ``indices[indptr[i]:indptr[i+1]]`` and their
+            corresponding values are stored in ``data[indptr[i]:indptr[i+1]]``.
+            If the shape parameter is not supplied, the array dimensions
+            are inferred from the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        CSR format data array of the array
+    indices
+        CSR format index array of the array
+    indptr
+        CSR format index pointer array of the array
+    has_sorted_indices
+    has_canonical_format
+    T
+
+    Notes
+    -----
+
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the CSR format
+      - efficient arithmetic operations CSR + CSR, CSR * CSR, etc.
+      - efficient row slicing
+      - fast matrix vector products
+
+    Disadvantages of the CSR format
+      - slow column slicing operations (consider CSC)
+      - changes to the sparsity structure are expensive (consider LIL or DOK)
+
+    Canonical Format
+        - Within each row, indices are sorted by column.
+        - There are no duplicate entries.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import csr_array
+    >>> csr_array((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 0, 1, 2, 2, 2])
+    >>> col = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csr_array((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csr_array((data, indices, indptr), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    Duplicate entries are summed together:
+
+    >>> row = np.array([0, 1, 2, 0])
+    >>> col = np.array([0, 1, 1, 0])
+    >>> data = np.array([1, 2, 4, 8])
+    >>> csr_array((data, (row, col)), shape=(3, 3)).toarray()
+    array([[9, 0, 0],
+           [0, 2, 0],
+           [0, 4, 0]])
+
+    As an example of how to construct a CSR array incrementally,
+    the following snippet builds a term-document array from texts:
+
+    >>> docs = [["hello", "world", "hello"], ["goodbye", "cruel", "world"]]
+    >>> indptr = [0]
+    >>> indices = []
+    >>> data = []
+    >>> vocabulary = {}
+    >>> for d in docs:
+    ...     for term in d:
+    ...         index = vocabulary.setdefault(term, len(vocabulary))
+    ...         indices.append(index)
+    ...         data.append(1)
+    ...     indptr.append(len(indices))
+    ...
+    >>> csr_array((data, indices, indptr), dtype=int).toarray()
+    array([[2, 1, 0, 0],
+           [0, 1, 1, 1]])
+
+    """
+
+
+class csr_matrix(spmatrix, _csr_base):
+    """
+    Compressed Sparse Row matrix.
+
+    This can be instantiated in several ways:
+        csr_matrix(D)
+            where D is a 2-D ndarray
+
+        csr_matrix(S)
+            with another sparse array or matrix S (equivalent to S.tocsr())
+
+        csr_matrix((M, N), [dtype])
+            to construct an empty matrix with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+        csr_matrix((data, (row_ind, col_ind)), [shape=(M, N)])
+            where ``data``, ``row_ind`` and ``col_ind`` satisfy the
+            relationship ``a[row_ind[k], col_ind[k]] = data[k]``.
+
+        csr_matrix((data, indices, indptr), [shape=(M, N)])
+            is the standard CSR representation where the column indices for
+            row i are stored in ``indices[indptr[i]:indptr[i+1]]`` and their
+            corresponding values are stored in ``data[indptr[i]:indptr[i+1]]``.
+            If the shape parameter is not supplied, the matrix dimensions
+            are inferred from the index arrays.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        CSR format data array of the matrix
+    indices
+        CSR format index array of the matrix
+    indptr
+        CSR format index pointer array of the matrix
+    has_sorted_indices
+    has_canonical_format
+    T
+
+    Notes
+    -----
+
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the CSR format
+      - efficient arithmetic operations CSR + CSR, CSR * CSR, etc.
+      - efficient row slicing
+      - fast matrix vector products
+
+    Disadvantages of the CSR format
+      - slow column slicing operations (consider CSC)
+      - changes to the sparsity structure are expensive (consider LIL or DOK)
+
+    Canonical Format
+        - Within each row, indices are sorted by column.
+        - There are no duplicate entries.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import csr_matrix
+    >>> csr_matrix((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> row = np.array([0, 0, 1, 2, 2, 2])
+    >>> col = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csr_matrix((data, (row, col)), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    >>> indptr = np.array([0, 2, 3, 6])
+    >>> indices = np.array([0, 2, 2, 0, 1, 2])
+    >>> data = np.array([1, 2, 3, 4, 5, 6])
+    >>> csr_matrix((data, indices, indptr), shape=(3, 3)).toarray()
+    array([[1, 0, 2],
+           [0, 0, 3],
+           [4, 5, 6]])
+
+    Duplicate entries are summed together:
+
+    >>> row = np.array([0, 1, 2, 0])
+    >>> col = np.array([0, 1, 1, 0])
+    >>> data = np.array([1, 2, 4, 8])
+    >>> csr_matrix((data, (row, col)), shape=(3, 3)).toarray()
+    array([[9, 0, 0],
+           [0, 2, 0],
+           [0, 4, 0]])
+
+    As an example of how to construct a CSR matrix incrementally,
+    the following snippet builds a term-document matrix from texts:
+
+    >>> docs = [["hello", "world", "hello"], ["goodbye", "cruel", "world"]]
+    >>> indptr = [0]
+    >>> indices = []
+    >>> data = []
+    >>> vocabulary = {}
+    >>> for d in docs:
+    ...     for term in d:
+    ...         index = vocabulary.setdefault(term, len(vocabulary))
+    ...         indices.append(index)
+    ...         data.append(1)
+    ...     indptr.append(len(indices))
+    ...
+    >>> csr_matrix((data, indices, indptr), dtype=int).toarray()
+    array([[2, 1, 0, 0],
+           [0, 1, 1, 1]])
+
+    """
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_data.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..585820b10a65271b52b81d140e82130eb4177979
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_data.py
@@ -0,0 +1,569 @@
+"""Base class for sparse matrice with a .data attribute
+
+    subclasses must provide a _with_data() method that
+    creates a new matrix with the same sparsity pattern
+    as self but with a different data array
+
+"""
+
+import math
+import numpy as np
+
+from ._base import _spbase, sparray, _ufuncs_with_fixed_point_at_zero
+from ._sputils import isscalarlike, validateaxis
+
+__all__ = []
+
+
+# TODO implement all relevant operations
+# use .data.__methods__() instead of /=, *=, etc.
+class _data_matrix(_spbase):
+    def __init__(self, arg1, *, maxprint=None):
+        _spbase.__init__(self, arg1, maxprint=maxprint)
+
+    @property
+    def dtype(self):
+        return self.data.dtype
+
+    @dtype.setter
+    def dtype(self, newtype):
+        self.data.dtype = newtype
+
+    def _deduped_data(self):
+        if hasattr(self, 'sum_duplicates'):
+            self.sum_duplicates()
+        return self.data
+
+    def __abs__(self):
+        return self._with_data(abs(self._deduped_data()))
+
+    def __round__(self, ndigits=0):
+        return self._with_data(np.around(self._deduped_data(), decimals=ndigits))
+
+    def _real(self):
+        return self._with_data(self.data.real)
+
+    def _imag(self):
+        return self._with_data(self.data.imag)
+
+    def __neg__(self):
+        if self.dtype.kind == 'b':
+            raise NotImplementedError('negating a boolean sparse array is not '
+                                      'supported')
+        return self._with_data(-self.data)
+
+    def __imul__(self, other):  # self *= other
+        if isscalarlike(other):
+            self.data *= other
+            return self
+        return NotImplemented
+
+    def __itruediv__(self, other):  # self /= other
+        if isscalarlike(other):
+            recip = 1.0 / other
+            self.data *= recip
+            return self
+        else:
+            return NotImplemented
+
+    def astype(self, dtype, casting='unsafe', copy=True):
+        dtype = np.dtype(dtype)
+        if self.dtype != dtype:
+            matrix = self._with_data(
+                self.data.astype(dtype, casting=casting, copy=True),
+                copy=True
+            )
+            return matrix._with_data(matrix._deduped_data(), copy=False)
+        elif copy:
+            return self.copy()
+        else:
+            return self
+
+    astype.__doc__ = _spbase.astype.__doc__
+
+    def conjugate(self, copy=True):
+        if np.issubdtype(self.dtype, np.complexfloating):
+            return self._with_data(self.data.conjugate(), copy=copy)
+        elif copy:
+            return self.copy()
+        else:
+            return self
+
+    conjugate.__doc__ = _spbase.conjugate.__doc__
+
+    def copy(self):
+        return self._with_data(self.data.copy(), copy=True)
+
+    copy.__doc__ = _spbase.copy.__doc__
+
+    def power(self, n, dtype=None):
+        """
+        This function performs element-wise power.
+
+        Parameters
+        ----------
+        n : scalar
+            n is a non-zero scalar (nonzero avoids dense ones creation)
+            If zero power is desired, special case it to use `np.ones`
+
+        dtype : If dtype is not specified, the current dtype will be preserved.
+
+        Raises
+        ------
+        NotImplementedError : if n is a zero scalar
+            If zero power is desired, special case it to use
+            ``np.ones(A.shape, dtype=A.dtype)``
+        """
+        if not isscalarlike(n):
+            raise NotImplementedError("input is not scalar")
+        if not n:
+            raise NotImplementedError(
+                "zero power is not supported as it would densify the matrix.\n"
+                "Use `np.ones(A.shape, dtype=A.dtype)` for this case."
+            )
+
+        data = self._deduped_data()
+        if dtype is not None:
+            data = data.astype(dtype)
+        return self._with_data(data ** n)
+
+    ###########################
+    # Multiplication handlers #
+    ###########################
+
+    def _mul_scalar(self, other):
+        return self._with_data(self.data * other)
+
+
+# Add the numpy unary ufuncs for which func(0) = 0 to _data_matrix.
+for npfunc in _ufuncs_with_fixed_point_at_zero:
+    name = npfunc.__name__
+
+    def _create_method(op):
+        def method(self):
+            result = op(self._deduped_data())
+            return self._with_data(result, copy=True)
+
+        method.__doc__ = (f"Element-wise {name}.\n\n"
+                          f"See `numpy.{name}` for more information.")
+        method.__name__ = name
+
+        return method
+
+    setattr(_data_matrix, name, _create_method(npfunc))
+
+
+def _find_missing_index(ind, n):
+    for k, a in enumerate(ind):
+        if k != a:
+            return k
+
+    k += 1
+    if k < n:
+        return k
+    else:
+        return -1
+
+
+class _minmax_mixin:
+    """Mixin for min and max methods.
+
+    These are not implemented for dia_matrix, hence the separate class.
+    """
+
+    def _min_or_max_axis(self, axis, min_or_max, explicit):
+        N = self.shape[axis]
+        if N == 0:
+            raise ValueError("zero-size array to reduction operation")
+        M = self.shape[1 - axis]
+        idx_dtype = self._get_index_dtype(maxval=M)
+
+        mat = self.tocsc() if axis == 0 else self.tocsr()
+        mat.sum_duplicates()
+
+        major_index, value = mat._minor_reduce(min_or_max)
+        if not explicit:
+            not_full = np.diff(mat.indptr)[major_index] < N
+            value[not_full] = min_or_max(value[not_full], 0)
+
+        mask = value != 0
+        major_index = np.compress(mask, major_index).astype(idx_dtype, copy=False)
+        value = np.compress(mask, value)
+
+        if isinstance(self, sparray):
+            coords = (major_index,)
+            shape = (M,)
+            return self._coo_container((value, coords), shape=shape, dtype=self.dtype)
+
+        if axis == 0:
+            return self._coo_container(
+                (value, (np.zeros(len(value), dtype=idx_dtype), major_index)),
+                dtype=self.dtype, shape=(1, M)
+            )
+        else:
+            return self._coo_container(
+                (value, (major_index, np.zeros(len(value), dtype=idx_dtype))),
+                dtype=self.dtype, shape=(M, 1)
+            )
+
+    def _min_or_max(self, axis, out, min_or_max, explicit):
+        if out is not None:
+            raise ValueError("Sparse arrays do not support an 'out' parameter.")
+
+        validateaxis(axis)
+        if self.ndim == 1:
+            if axis not in (None, 0, -1):
+                raise ValueError("axis out of range")
+            axis = None  # avoid calling special axis case. no impact on 1d
+
+        if axis is None:
+            if 0 in self.shape:
+                raise ValueError("zero-size array to reduction operation")
+
+            zero = self.dtype.type(0)
+            if self.nnz == 0:
+                return zero
+            m = min_or_max.reduce(self._deduped_data().ravel())
+            if self.nnz != math.prod(self.shape) and not explicit:
+                m = min_or_max(zero, m)
+            return m
+
+        if axis < 0:
+            axis += 2
+
+        if (axis == 0) or (axis == 1):
+            return self._min_or_max_axis(axis, min_or_max, explicit)
+        else:
+            raise ValueError("axis out of range")
+
+    def _arg_min_or_max_axis(self, axis, argmin_or_argmax, compare, explicit):
+        if self.shape[axis] == 0:
+            raise ValueError("Cannot apply the operation along a zero-sized dimension.")
+
+        if axis < 0:
+            axis += 2
+
+        zero = self.dtype.type(0)
+
+        mat = self.tocsc() if axis == 0 else self.tocsr()
+        mat.sum_duplicates()
+
+        ret_size, line_size = mat._swap(mat.shape)
+        ret = np.zeros(ret_size, dtype=int)
+
+        nz_lines, = np.nonzero(np.diff(mat.indptr))
+        for i in nz_lines:
+            p, q = mat.indptr[i:i + 2]
+            data = mat.data[p:q]
+            indices = mat.indices[p:q]
+            extreme_index = argmin_or_argmax(data)
+            extreme_value = data[extreme_index]
+            if explicit:
+                if q - p > 0:
+                    ret[i] = indices[extreme_index]
+            else:
+                if compare(extreme_value, zero) or q - p == line_size:
+                    ret[i] = indices[extreme_index]
+                else:
+                    zero_ind = _find_missing_index(indices, line_size)
+                    if extreme_value == zero:
+                        ret[i] = min(extreme_index, zero_ind)
+                    else:
+                        ret[i] = zero_ind
+
+        if isinstance(self, sparray):
+            return ret
+
+        if axis == 1:
+            ret = ret.reshape(-1, 1)
+
+        return self._ascontainer(ret)
+
+    def _arg_min_or_max(self, axis, out, argmin_or_argmax, compare, explicit):
+        if out is not None:
+            raise ValueError("Sparse types do not support an 'out' parameter.")
+
+        validateaxis(axis)
+
+        if self.ndim == 1:
+            if axis not in (None, 0, -1):
+                raise ValueError("axis out of range")
+            axis = None  # avoid calling special axis case. no impact on 1d
+
+        if axis is not None:
+            return self._arg_min_or_max_axis(axis, argmin_or_argmax, compare, explicit)
+
+        if 0 in self.shape:
+            raise ValueError("Cannot apply the operation to an empty matrix.")
+
+        if self.nnz == 0:
+            if explicit:
+                raise ValueError("Cannot apply the operation to zero matrix "
+                                 "when explicit=True.")
+            return 0
+
+        zero = self.dtype.type(0)
+        mat = self.tocoo()
+        # Convert to canonical form: no duplicates, sorted indices.
+        mat.sum_duplicates()
+        extreme_index = argmin_or_argmax(mat.data)
+        if explicit:
+            return extreme_index
+        extreme_value = mat.data[extreme_index]
+        num_col = mat.shape[-1]
+
+        # If the min value is less than zero, or max is greater than zero,
+        # then we do not need to worry about implicit zeros.
+        if compare(extreme_value, zero):
+            # cast to Python int to avoid overflow and RuntimeError
+            return int(mat.row[extreme_index]) * num_col + int(mat.col[extreme_index])
+
+        # Cheap test for the rare case where we have no implicit zeros.
+        size = math.prod(self.shape)
+        if size == mat.nnz:
+            return int(mat.row[extreme_index]) * num_col + int(mat.col[extreme_index])
+
+        # At this stage, any implicit zero could be the min or max value.
+        # After sum_duplicates(), the `row` and `col` arrays are guaranteed to
+        # be sorted in C-order, which means the linearized indices are sorted.
+        linear_indices = mat.row * num_col + mat.col
+        first_implicit_zero_index = _find_missing_index(linear_indices, size)
+        if extreme_value == zero:
+            return min(first_implicit_zero_index, extreme_index)
+        return first_implicit_zero_index
+
+    def max(self, axis=None, out=None, *, explicit=False):
+        """Return the maximum of the array/matrix or maximum along an axis.
+
+        By default, all elements are taken into account, not just the non-zero ones.
+        But with `explicit` set, only the stored elements are considered.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the sum is computed. The default is to
+            compute the maximum over all elements, returning
+            a scalar (i.e., `axis` = `None`).
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except
+            for the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only the stored elements will be considered.
+            If a row/column is empty, the sparse.coo_array returned
+            has no stored element (i.e. an implicit zero) for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        amax : coo_array or scalar
+            Maximum of `a`. If `axis` is None, the result is a scalar value.
+            If `axis` is given, the result is a sparse.coo_array of dimension
+            ``a.ndim - 1``.
+
+        See Also
+        --------
+        min : The minimum value of a sparse array/matrix along a given axis.
+        numpy.max : NumPy's implementation of 'max'
+
+        """
+        return self._min_or_max(axis, out, np.maximum, explicit)
+
+    def min(self, axis=None, out=None, *, explicit=False):
+        """Return the minimum of the array/matrix or maximum along an axis.
+
+        By default, all elements are taken into account, not just the non-zero ones.
+        But with `explicit` set, only the stored elements are considered.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the sum is computed. The default is to
+            compute the minimum over all elements, returning
+            a scalar (i.e., `axis` = `None`).
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except for
+            the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only the stored elements will be considered.
+            If a row/column is empty, the sparse.coo_array returned
+            has no stored element (i.e. an implicit zero) for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        amin : coo_matrix or scalar
+            Minimum of `a`. If `axis` is None, the result is a scalar value.
+            If `axis` is given, the result is a sparse.coo_array of dimension
+            ``a.ndim - 1``.
+
+        See Also
+        --------
+        max : The maximum value of a sparse array/matrix along a given axis.
+        numpy.min : NumPy's implementation of 'min'
+
+        """
+        return self._min_or_max(axis, out, np.minimum, explicit)
+
+    def nanmax(self, axis=None, out=None, *, explicit=False):
+        """Return the maximum, ignoring any Nans, along an axis.
+
+        Return the maximum, ignoring any Nans, of the array/matrix along an axis.
+        By default this takes all elements into account, but with `explicit` set,
+        only stored elements are considered.
+
+        .. versionadded:: 1.11.0
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the maximum is computed. The default is to
+            compute the maximum over all elements, returning
+            a scalar (i.e., `axis` = `None`).
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except
+            for the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only the stored elements will be considered.
+            If a row/column is empty, the sparse.coo_array returned
+            has no stored element (i.e. an implicit zero) for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        amax : coo_array or scalar
+            Maximum of `a`. If `axis` is None, the result is a scalar value.
+            If `axis` is given, the result is a sparse.coo_array of dimension
+            ``a.ndim - 1``.
+
+        See Also
+        --------
+        nanmin : The minimum value of a sparse array/matrix along a given axis,
+                 ignoring NaNs.
+        max : The maximum value of a sparse array/matrix along a given axis,
+              propagating NaNs.
+        numpy.nanmax : NumPy's implementation of 'nanmax'.
+
+        """
+        return self._min_or_max(axis, out, np.fmax, explicit)
+
+    def nanmin(self, axis=None, out=None, *, explicit=False):
+        """Return the minimum, ignoring any Nans, along an axis.
+
+        Return the minimum, ignoring any Nans, of the array/matrix along an axis.
+        By default this takes all elements into account, but with `explicit` set,
+        only stored elements are considered.
+
+        .. versionadded:: 1.11.0
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None} optional
+            Axis along which the minimum is computed. The default is to
+            compute the minimum over all elements, returning
+            a scalar (i.e., `axis` = `None`).
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except for
+            the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only the stored elements will be considered.
+            If a row/column is empty, the sparse.coo_array returned
+            has no stored element (i.e. an implicit zero) for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        amin : coo_array or scalar
+            Minimum of `a`. If `axis` is None, the result is a scalar value.
+            If `axis` is given, the result is a sparse.coo_array of dimension
+            ``a.ndim - 1``.
+
+        See Also
+        --------
+        nanmax : The maximum value of a sparse array/matrix along a given axis,
+                 ignoring NaNs.
+        min : The minimum value of a sparse array/matrix along a given axis,
+              propagating NaNs.
+        numpy.nanmin : NumPy's implementation of 'nanmin'.
+
+        """
+        return self._min_or_max(axis, out, np.fmin, explicit)
+
+    def argmax(self, axis=None, out=None, *, explicit=False):
+        """Return indices of maximum elements along an axis.
+
+        By default, implicit zero elements are taken into account. If there are
+        several minimum values, the index of the first occurrence is returned.
+        If `explicit` is set, only explicitly stored elements will be considered.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None}, optional
+            Axis along which the argmax is computed. If None (default), index
+            of the maximum element in the flatten data is returned.
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except for
+            the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only explicitly stored elements will be considered.
+            If axis is not None and a row/column has no stored elements, argmax
+            is undefined, so the index ``0`` is returned for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+        ind : numpy.matrix or int
+            Indices of maximum elements. If matrix, its size along `axis` is 1.
+        """
+        return self._arg_min_or_max(axis, out, np.argmax, np.greater, explicit)
+
+    def argmin(self, axis=None, out=None, *, explicit=False):
+        """Return indices of minimum elements along an axis.
+
+        By default, implicit zero elements are taken into account. If there are
+        several minimum values, the index of the first occurrence is returned.
+        If `explicit` is set, only explicitly stored elements will be considered.
+
+        Parameters
+        ----------
+        axis : {-2, -1, 0, 1, None}, optional
+            Axis along which the argmin is computed. If None (default), index
+            of the minimum element in the flatten data is returned.
+
+        out : None, optional
+            This argument is in the signature *solely* for NumPy
+            compatibility reasons. Do not pass in anything except for
+            the default value, as this argument is not used.
+
+        explicit : {False, True} optional (default: False)
+            When set to True, only explicitly stored elements will be considered.
+            If axis is not None and a row/column has no stored elements, argmin
+            is undefined, so the index ``0`` is returned for that row/column.
+
+            .. versionadded:: 1.15.0
+
+        Returns
+        -------
+         ind : numpy.matrix or int
+            Indices of minimum elements. If matrix, its size along `axis` is 1.
+        """
+        return self._arg_min_or_max(axis, out, np.argmin, np.less, explicit)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dia.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dia.py
new file mode 100644
index 0000000000000000000000000000000000000000..c2944e080b6abc1705d3f597dda7478335b2bcf3
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dia.py
@@ -0,0 +1,590 @@
+"""Sparse DIAgonal format"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['dia_array', 'dia_matrix', 'isspmatrix_dia']
+
+import numpy as np
+
+from .._lib._util import copy_if_needed
+from ._matrix import spmatrix
+from ._base import issparse, _formats, _spbase, sparray
+from ._data import _data_matrix
+from ._sputils import (
+    isshape, upcast_char, getdtype, get_sum_dtype, validateaxis, check_shape
+)
+from ._sparsetools import dia_matvec
+
+
+class _dia_base(_data_matrix):
+    _format = 'dia'
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False, *, maxprint=None):
+        _data_matrix.__init__(self, arg1, maxprint=maxprint)
+
+        if issparse(arg1):
+            if arg1.format == "dia":
+                if copy:
+                    arg1 = arg1.copy()
+                self.data = arg1.data
+                self.offsets = arg1.offsets
+                self._shape = check_shape(arg1.shape)
+            else:
+                if arg1.format == self.format and copy:
+                    A = arg1.copy()
+                else:
+                    A = arg1.todia()
+                self.data = A.data
+                self.offsets = A.offsets
+                self._shape = check_shape(A.shape)
+        elif isinstance(arg1, tuple):
+            if isshape(arg1):
+                # It's a tuple of matrix dimensions (M, N)
+                # create empty matrix
+                self._shape = check_shape(arg1)
+                self.data = np.zeros((0,0), getdtype(dtype, default=float))
+                idx_dtype = self._get_index_dtype(maxval=max(self.shape))
+                self.offsets = np.zeros((0), dtype=idx_dtype)
+            else:
+                try:
+                    # Try interpreting it as (data, offsets)
+                    data, offsets = arg1
+                except Exception as e:
+                    message = 'unrecognized form for dia_array constructor'
+                    raise ValueError(message) from e
+                else:
+                    if shape is None:
+                        raise ValueError('expected a shape argument')
+                    if not copy:
+                        copy = copy_if_needed
+                    self.data = np.atleast_2d(np.array(arg1[0], dtype=dtype, copy=copy))
+                    offsets = np.array(arg1[1],
+                                       dtype=self._get_index_dtype(maxval=max(shape)),
+                                       copy=copy)
+                    self.offsets = np.atleast_1d(offsets)
+                    self._shape = check_shape(shape)
+        else:
+            # must be dense, convert to COO first, then to DIA
+            try:
+                arg1 = np.asarray(arg1)
+            except Exception as e:
+                raise ValueError("unrecognized form for "
+                                 f"{self.format}_matrix constructor") from e
+            if isinstance(self, sparray) and arg1.ndim != 2:
+                raise ValueError(f"DIA arrays don't support {arg1.ndim}D input. Use 2D")
+            A = self._coo_container(arg1, dtype=dtype, shape=shape).todia()
+            self.data = A.data
+            self.offsets = A.offsets
+            self._shape = check_shape(A.shape)
+
+        if dtype is not None:
+            newdtype = getdtype(dtype)
+            self.data = self.data.astype(newdtype)
+
+        # check format
+        if self.offsets.ndim != 1:
+            raise ValueError('offsets array must have rank 1')
+
+        if self.data.ndim != 2:
+            raise ValueError('data array must have rank 2')
+
+        if self.data.shape[0] != len(self.offsets):
+            raise ValueError('number of diagonals (%d) '
+                    'does not match the number of offsets (%d)'
+                    % (self.data.shape[0], len(self.offsets)))
+
+        if len(np.unique(self.offsets)) != len(self.offsets):
+            raise ValueError('offset array contains duplicate values')
+
+    def __repr__(self):
+        _, fmt = _formats[self.format]
+        sparse_cls = 'array' if isinstance(self, sparray) else 'matrix'
+        d = self.data.shape[0]
+        return (
+            f"<{fmt} sparse {sparse_cls} of dtype '{self.dtype}'\n"
+            f"\twith {self.nnz} stored elements ({d} diagonals) and shape {self.shape}>"
+        )
+
+    def _data_mask(self):
+        """Returns a mask of the same shape as self.data, where
+        mask[i,j] is True when data[i,j] corresponds to a stored element."""
+        num_rows, num_cols = self.shape
+        offset_inds = np.arange(self.data.shape[1])
+        row = offset_inds - self.offsets[:,None]
+        mask = (row >= 0)
+        mask &= (row < num_rows)
+        mask &= (offset_inds < num_cols)
+        return mask
+
+    def count_nonzero(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError(
+                "count_nonzero over an axis is not implemented for DIA format"
+            )
+        mask = self._data_mask()
+        return np.count_nonzero(self.data[mask])
+
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def _getnnz(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError("_getnnz over an axis is not implemented "
+                                      "for DIA format")
+        M,N = self.shape
+        nnz = 0
+        for k in self.offsets:
+            if k > 0:
+                nnz += min(M,N-k)
+            else:
+                nnz += min(M+k,N)
+        return int(nnz)
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+
+    def sum(self, axis=None, dtype=None, out=None):
+        validateaxis(axis)
+
+        if axis is not None and axis < 0:
+            axis += 2
+
+        res_dtype = get_sum_dtype(self.dtype)
+        num_rows, num_cols = self.shape
+        ret = None
+
+        if axis == 0:
+            mask = self._data_mask()
+            x = (self.data * mask).sum(axis=0)
+            if x.shape[0] == num_cols:
+                res = x
+            else:
+                res = np.zeros(num_cols, dtype=x.dtype)
+                res[:x.shape[0]] = x
+            ret = self._ascontainer(res, dtype=res_dtype)
+
+        else:
+            row_sums = np.zeros((num_rows, 1), dtype=res_dtype)
+            one = np.ones(num_cols, dtype=res_dtype)
+            dia_matvec(num_rows, num_cols, len(self.offsets),
+                       self.data.shape[1], self.offsets, self.data, one, row_sums)
+
+            row_sums = self._ascontainer(row_sums)
+
+            if axis is None:
+                return row_sums.sum(dtype=dtype, out=out)
+
+            ret = self._ascontainer(row_sums.sum(axis=axis))
+
+        return ret.sum(axis=(), dtype=dtype, out=out)
+
+    sum.__doc__ = _spbase.sum.__doc__
+
+    def _add_sparse(self, other):
+        # If other is not DIA format, let them handle us instead.
+        if not isinstance(other, _dia_base):
+            return other._add_sparse(self)
+
+        # Fast path for exact equality of the sparsity structure.
+        if np.array_equal(self.offsets, other.offsets):
+            return self._with_data(self.data + other.data)
+
+        # Find the union of the offsets (which will be sorted and unique).
+        new_offsets = np.union1d(self.offsets, other.offsets)
+        self_idx = np.searchsorted(new_offsets, self.offsets)
+        other_idx = np.searchsorted(new_offsets, other.offsets)
+
+        self_d = self.data.shape[1]
+        other_d = other.data.shape[1]
+        # Fast path for a sparsity structure where the final offsets are a
+        # permutation of the existing offsets and the diagonal lengths match.
+        if self_d == other_d and len(new_offsets) == len(self.offsets):
+            new_data = self.data[_invert_index(self_idx)]
+            new_data[other_idx, :] += other.data
+        elif self_d == other_d and len(new_offsets) == len(other.offsets):
+            new_data = other.data[_invert_index(other_idx)]
+            new_data[self_idx, :] += self.data
+        else:
+            # Maximum diagonal length of the result.
+            d = min(self.shape[0] + new_offsets[-1], self.shape[1])
+
+            # Add all diagonals to a freshly-allocated data array.
+            new_data = np.zeros(
+                (len(new_offsets), d),
+                dtype=np.result_type(self.data, other.data),
+            )
+            new_data[self_idx, :self_d] += self.data[:, :d]
+            new_data[other_idx, :other_d] += other.data[:, :d]
+        return self._dia_container((new_data, new_offsets), shape=self.shape)
+
+    def _mul_scalar(self, other):
+        return self._with_data(self.data * other)
+
+    def _matmul_vector(self, other):
+        x = other
+
+        y = np.zeros(self.shape[0], dtype=upcast_char(self.dtype.char,
+                                                       x.dtype.char))
+
+        L = self.data.shape[1]
+
+        M,N = self.shape
+
+        dia_matvec(M,N, len(self.offsets), L, self.offsets, self.data,
+                   x.ravel(), y.ravel())
+
+        return y
+
+    def _setdiag(self, values, k=0):
+        M, N = self.shape
+
+        if values.ndim == 0:
+            # broadcast
+            values_n = np.inf
+        else:
+            values_n = len(values)
+
+        if k < 0:
+            n = min(M + k, N, values_n)
+            min_index = 0
+            max_index = n
+        else:
+            n = min(M, N - k, values_n)
+            min_index = k
+            max_index = k + n
+
+        if values.ndim != 0:
+            # allow also longer sequences
+            values = values[:n]
+
+        data_rows, data_cols = self.data.shape
+        if k in self.offsets:
+            if max_index > data_cols:
+                data = np.zeros((data_rows, max_index), dtype=self.data.dtype)
+                data[:, :data_cols] = self.data
+                self.data = data
+            self.data[self.offsets == k, min_index:max_index] = values
+        else:
+            self.offsets = np.append(self.offsets, self.offsets.dtype.type(k))
+            m = max(max_index, data_cols)
+            data = np.zeros((data_rows + 1, m), dtype=self.data.dtype)
+            data[:-1, :data_cols] = self.data
+            data[-1, min_index:max_index] = values
+            self.data = data
+
+    def todia(self, copy=False):
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    todia.__doc__ = _spbase.todia.__doc__
+
+    def transpose(self, axes=None, copy=False):
+        if axes is not None and axes != (1, 0):
+            raise ValueError("Sparse arrays/matrices do not support "
+                              "an 'axes' parameter because swapping "
+                              "dimensions is the only logical permutation.")
+
+        num_rows, num_cols = self.shape
+        max_dim = max(self.shape)
+
+        # flip diagonal offsets
+        offsets = -self.offsets
+
+        # re-align the data matrix
+        r = np.arange(len(offsets), dtype=np.intc)[:, None]
+        c = np.arange(num_rows, dtype=np.intc) - (offsets % max_dim)[:, None]
+        pad_amount = max(0, max_dim-self.data.shape[1])
+        data = np.hstack((self.data, np.zeros((self.data.shape[0], pad_amount),
+                                              dtype=self.data.dtype)))
+        data = data[r, c]
+        return self._dia_container((data, offsets), shape=(
+            num_cols, num_rows), copy=copy)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def diagonal(self, k=0):
+        rows, cols = self.shape
+        if k <= -rows or k >= cols:
+            return np.empty(0, dtype=self.data.dtype)
+        idx, = np.nonzero(self.offsets == k)
+        first_col = max(0, k)
+        last_col = min(rows + k, cols)
+        result_size = last_col - first_col
+        if idx.size == 0:
+            return np.zeros(result_size, dtype=self.data.dtype)
+        result = self.data[idx[0], first_col:last_col]
+        padding = result_size - len(result)
+        if padding > 0:
+            result = np.pad(result, (0, padding), mode='constant')
+        return result
+
+    diagonal.__doc__ = _spbase.diagonal.__doc__
+
+    def tocsc(self, copy=False):
+        if self.nnz == 0:
+            return self._csc_container(self.shape, dtype=self.dtype)
+
+        num_rows, num_cols = self.shape
+        num_offsets, offset_len = self.data.shape
+        offset_inds = np.arange(offset_len)
+
+        row = offset_inds - self.offsets[:,None]
+        mask = (row >= 0)
+        mask &= (row < num_rows)
+        mask &= (offset_inds < num_cols)
+        mask &= (self.data != 0)
+
+        idx_dtype = self._get_index_dtype(maxval=max(self.shape))
+        indptr = np.zeros(num_cols + 1, dtype=idx_dtype)
+        indptr[1:offset_len+1] = np.cumsum(mask.sum(axis=0)[:num_cols])
+        if offset_len < num_cols:
+            indptr[offset_len+1:] = indptr[offset_len]
+        indices = row.T[mask.T].astype(idx_dtype, copy=False)
+        data = self.data.T[mask.T]
+        return self._csc_container((data, indices, indptr), shape=self.shape,
+                                   dtype=self.dtype)
+
+    tocsc.__doc__ = _spbase.tocsc.__doc__
+
+    def tocoo(self, copy=False):
+        num_rows, num_cols = self.shape
+        num_offsets, offset_len = self.data.shape
+        offset_inds = np.arange(offset_len)
+
+        row = offset_inds - self.offsets[:,None]
+        mask = (row >= 0)
+        mask &= (row < num_rows)
+        mask &= (offset_inds < num_cols)
+        mask &= (self.data != 0)
+        row = row[mask]
+        col = np.tile(offset_inds, num_offsets)[mask.ravel()]
+        idx_dtype = self._get_index_dtype(
+            arrays=(self.offsets,), maxval=max(self.shape)
+        )
+        row = row.astype(idx_dtype, copy=False)
+        col = col.astype(idx_dtype, copy=False)
+        data = self.data[mask]
+        # Note: this cannot set has_canonical_format=True, because despite the
+        # lack of duplicates, we do not generate sorted indices.
+        return self._coo_container(
+            (data, (row, col)), shape=self.shape, dtype=self.dtype, copy=False
+        )
+
+    tocoo.__doc__ = _spbase.tocoo.__doc__
+
+    # needed by _data_matrix
+    def _with_data(self, data, copy=True):
+        """Returns a matrix with the same sparsity structure as self,
+        but with different data.  By default the structure arrays are copied.
+        """
+        if copy:
+            return self._dia_container(
+                (data, self.offsets.copy()), shape=self.shape
+            )
+        else:
+            return self._dia_container(
+                (data, self.offsets), shape=self.shape
+            )
+
+    def resize(self, *shape):
+        shape = check_shape(shape)
+        M, N = shape
+        # we do not need to handle the case of expanding N
+        self.data = self.data[:, :N]
+
+        if (M > self.shape[0] and
+                np.any(self.offsets + self.shape[0] < self.data.shape[1])):
+            # explicitly clear values that were previously hidden
+            mask = (self.offsets[:, None] + self.shape[0] <=
+                    np.arange(self.data.shape[1]))
+            self.data[mask] = 0
+
+        self._shape = shape
+
+    resize.__doc__ = _spbase.resize.__doc__
+
+
+def _invert_index(idx):
+    """Helper function to invert an index array."""
+    inv = np.zeros_like(idx)
+    inv[idx] = np.arange(len(idx))
+    return inv
+
+
+def isspmatrix_dia(x):
+    """Is `x` of dia_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a dia matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a dia matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import dia_array, dia_matrix, coo_matrix, isspmatrix_dia
+    >>> isspmatrix_dia(dia_matrix([[5]]))
+    True
+    >>> isspmatrix_dia(dia_array([[5]]))
+    False
+    >>> isspmatrix_dia(coo_matrix([[5]]))
+    False
+    """
+    return isinstance(x, dia_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class dia_array(_dia_base, sparray):
+    """
+    Sparse array with DIAgonal storage.
+
+    This can be instantiated in several ways:
+        dia_array(D)
+            where D is a 2-D ndarray
+
+        dia_array(S)
+            with another sparse array or matrix S (equivalent to S.todia())
+
+        dia_array((M, N), [dtype])
+            to construct an empty array with shape (M, N),
+            dtype is optional, defaulting to dtype='d'.
+
+        dia_array((data, offsets), shape=(M, N))
+            where the ``data[k,:]`` stores the diagonal entries for
+            diagonal ``offsets[k]`` (See example below)
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        DIA format data array of the array
+    offsets
+        DIA format offset array of the array
+    T
+
+    Notes
+    -----
+
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+    Sparse arrays with DIAgonal storage do not support slicing.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import dia_array
+    >>> dia_array((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> data = np.array([[1, 2, 3, 4]]).repeat(3, axis=0)
+    >>> offsets = np.array([0, -1, 2])
+    >>> dia_array((data, offsets), shape=(4, 4)).toarray()
+    array([[1, 0, 3, 0],
+           [1, 2, 0, 4],
+           [0, 2, 3, 0],
+           [0, 0, 3, 4]])
+
+    >>> from scipy.sparse import dia_array
+    >>> n = 10
+    >>> ex = np.ones(n)
+    >>> data = np.array([ex, 2 * ex, ex])
+    >>> offsets = np.array([-1, 0, 1])
+    >>> dia_array((data, offsets), shape=(n, n)).toarray()
+    array([[2., 1., 0., ..., 0., 0., 0.],
+           [1., 2., 1., ..., 0., 0., 0.],
+           [0., 1., 2., ..., 0., 0., 0.],
+           ...,
+           [0., 0., 0., ..., 2., 1., 0.],
+           [0., 0., 0., ..., 1., 2., 1.],
+           [0., 0., 0., ..., 0., 1., 2.]])
+    """
+
+
+class dia_matrix(spmatrix, _dia_base):
+    """
+    Sparse matrix with DIAgonal storage.
+
+    This can be instantiated in several ways:
+        dia_matrix(D)
+            where D is a 2-D ndarray
+
+        dia_matrix(S)
+            with another sparse array or matrix S (equivalent to S.todia())
+
+        dia_matrix((M, N), [dtype])
+            to construct an empty matrix with shape (M, N),
+            dtype is optional, defaulting to dtype='d'.
+
+        dia_matrix((data, offsets), shape=(M, N))
+            where the ``data[k,:]`` stores the diagonal entries for
+            diagonal ``offsets[k]`` (See example below)
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        DIA format data array of the matrix
+    offsets
+        DIA format offset array of the matrix
+    T
+
+    Notes
+    -----
+
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+    Sparse matrices with DIAgonal storage do not support slicing.
+
+    Examples
+    --------
+
+    >>> import numpy as np
+    >>> from scipy.sparse import dia_matrix
+    >>> dia_matrix((3, 4), dtype=np.int8).toarray()
+    array([[0, 0, 0, 0],
+           [0, 0, 0, 0],
+           [0, 0, 0, 0]], dtype=int8)
+
+    >>> data = np.array([[1, 2, 3, 4]]).repeat(3, axis=0)
+    >>> offsets = np.array([0, -1, 2])
+    >>> dia_matrix((data, offsets), shape=(4, 4)).toarray()
+    array([[1, 0, 3, 0],
+           [1, 2, 0, 4],
+           [0, 2, 3, 0],
+           [0, 0, 3, 4]])
+
+    >>> from scipy.sparse import dia_matrix
+    >>> n = 10
+    >>> ex = np.ones(n)
+    >>> data = np.array([ex, 2 * ex, ex])
+    >>> offsets = np.array([-1, 0, 1])
+    >>> dia_matrix((data, offsets), shape=(n, n)).toarray()
+    array([[2., 1., 0., ..., 0., 0., 0.],
+           [1., 2., 1., ..., 0., 0., 0.],
+           [0., 1., 2., ..., 0., 0., 0.],
+           ...,
+           [0., 0., 0., ..., 2., 1., 0.],
+           [0., 0., 0., ..., 1., 2., 1.],
+           [0., 0., 0., ..., 0., 1., 2.]])
+    """
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dok.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dok.py
new file mode 100644
index 0000000000000000000000000000000000000000..c9814a9e8d0b2d5a67185faae9311f4216cc7d13
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_dok.py
@@ -0,0 +1,692 @@
+"""Dictionary Of Keys based matrix"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['dok_array', 'dok_matrix', 'isspmatrix_dok']
+
+import itertools
+from warnings import warn
+import numpy as np
+
+from ._matrix import spmatrix
+from ._base import _spbase, sparray, issparse
+from ._index import IndexMixin
+from ._sputils import (isdense, getdtype, isshape, isintlike, isscalarlike,
+                       upcast, upcast_scalar, check_shape)
+
+
+class _dok_base(_spbase, IndexMixin, dict):
+    _format = 'dok'
+    _allow_nd = (1, 2)
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False, *, maxprint=None):
+        _spbase.__init__(self, arg1, maxprint=maxprint)
+
+        if isinstance(arg1, tuple) and isshape(arg1, allow_nd=self._allow_nd):
+            self._shape = check_shape(arg1, allow_nd=self._allow_nd)
+            self._dict = {}
+            self.dtype = getdtype(dtype, default=float)
+        elif issparse(arg1):  # Sparse ctor
+            if arg1.format == self.format:
+                arg1 = arg1.copy() if copy else arg1
+            else:
+                arg1 = arg1.todok()
+
+            if dtype is not None:
+                arg1 = arg1.astype(dtype, copy=False)
+
+            self._dict = arg1._dict
+            self._shape = check_shape(arg1.shape, allow_nd=self._allow_nd)
+            self.dtype = getdtype(arg1.dtype)
+        else:  # Dense ctor
+            try:
+                arg1 = np.asarray(arg1)
+            except Exception as e:
+                raise TypeError('Invalid input format.') from e
+
+            if arg1.ndim > 2:
+                raise ValueError(f"DOK arrays don't yet support {arg1.ndim}D input.")
+
+            if arg1.ndim == 1:
+                if dtype is not None:
+                    arg1 = arg1.astype(dtype)
+                self._dict = {i: v for i, v in enumerate(arg1) if v != 0}
+                self.dtype = getdtype(arg1.dtype)
+            else:
+                d = self._coo_container(arg1, shape=shape, dtype=dtype).todok()
+                self._dict = d._dict
+                self.dtype = getdtype(d.dtype)
+            self._shape = check_shape(arg1.shape, allow_nd=self._allow_nd)
+
+    def update(self, val):
+        # Prevent direct usage of update
+        raise NotImplementedError("Direct update to DOK sparse format is not allowed.")
+
+    def _getnnz(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError(
+                "_getnnz over an axis is not implemented for DOK format."
+            )
+        return len(self._dict)
+
+    def count_nonzero(self, axis=None):
+        if axis is not None:
+            raise NotImplementedError(
+                "count_nonzero over an axis is not implemented for DOK format."
+            )
+        return sum(x != 0 for x in self.values())
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def __len__(self):
+        return len(self._dict)
+
+    def __contains__(self, key):
+        return key in self._dict
+
+    def setdefault(self, key, default=None, /):
+        return self._dict.setdefault(key, default)
+
+    def __delitem__(self, key, /):
+        del self._dict[key]
+
+    def clear(self):
+        return self._dict.clear()
+
+    def pop(self, /, *args):
+        return self._dict.pop(*args)
+
+    def __reversed__(self):
+        raise TypeError("reversed is not defined for dok_array type")
+
+    def __or__(self, other):
+        type_names = f"{type(self).__name__} and {type(other).__name__}"
+        raise TypeError(f"unsupported operand type for |: {type_names}")
+
+    def __ror__(self, other):
+        type_names = f"{type(self).__name__} and {type(other).__name__}"
+        raise TypeError(f"unsupported operand type for |: {type_names}")
+
+    def __ior__(self, other):
+        type_names = f"{type(self).__name__} and {type(other).__name__}"
+        raise TypeError(f"unsupported operand type for |: {type_names}")
+
+    def popitem(self):
+        return self._dict.popitem()
+
+    def items(self):
+        return self._dict.items()
+
+    def keys(self):
+        return self._dict.keys()
+
+    def values(self):
+        return self._dict.values()
+
+    def get(self, key, default=0.0):
+        """This provides dict.get method functionality with type checking"""
+        if key in self._dict:
+            return self._dict[key]
+        if isintlike(key) and self.ndim == 1:
+            key = (key,)
+        if self.ndim != len(key):
+            raise IndexError(f'Index {key} length needs to match self.shape')
+        try:
+            for i in key:
+                assert isintlike(i)
+        except (AssertionError, TypeError, ValueError) as e:
+            raise IndexError('Index must be or consist of integers.') from e
+        key = tuple(i + M if i < 0 else i for i, M in zip(key, self.shape))
+        if any(i < 0 or i >= M for i, M in zip(key, self.shape)):
+            raise IndexError('Index out of bounds.')
+        if self.ndim == 1:
+            key = key[0]
+        return self._dict.get(key, default)
+
+    # 1D get methods
+    def _get_int(self, idx):
+        return self._dict.get(idx, self.dtype.type(0))
+
+    def _get_slice(self, idx):
+        i_range = range(*idx.indices(self.shape[0]))
+        return self._get_array(list(i_range))
+
+    def _get_array(self, idx):
+        idx = np.asarray(idx)
+        if idx.ndim == 0:
+            val = self._dict.get(int(idx), self.dtype.type(0))
+            return np.array(val, stype=self.dtype)
+        new_dok = self._dok_container(idx.shape, dtype=self.dtype)
+        dok_vals = [self._dict.get(i, 0) for i in idx.ravel()]
+        if dok_vals:
+            if len(idx.shape) == 1:
+                for i, v in enumerate(dok_vals):
+                    if v:
+                        new_dok._dict[i] = v
+            else:
+                new_idx = np.unravel_index(np.arange(len(dok_vals)), idx.shape)
+                new_idx = new_idx[0] if len(new_idx) == 1 else zip(*new_idx)
+                for i, v in zip(new_idx, dok_vals, strict=True):
+                    if v:
+                        new_dok._dict[i] = v
+        return new_dok
+
+    # 2D get methods
+    def _get_intXint(self, row, col):
+        return self._dict.get((row, col), self.dtype.type(0))
+
+    def _get_intXslice(self, row, col):
+        return self._get_sliceXslice(slice(row, row + 1), col)
+
+    def _get_sliceXint(self, row, col):
+        return self._get_sliceXslice(row, slice(col, col + 1))
+
+    def _get_sliceXslice(self, row, col):
+        row_start, row_stop, row_step = row.indices(self.shape[0])
+        col_start, col_stop, col_step = col.indices(self.shape[1])
+        row_range = range(row_start, row_stop, row_step)
+        col_range = range(col_start, col_stop, col_step)
+        shape = (len(row_range), len(col_range))
+        # Switch paths only when advantageous
+        # (count the iterations in the loops, adjust for complexity)
+        if len(self) >= 2 * shape[0] * shape[1]:
+            # O(nr*nc) path: loop over 
+            return self._get_columnXarray(row_range, col_range)
+        # O(nnz) path: loop over entries of self
+        newdok = self._dok_container(shape, dtype=self.dtype)
+        for key in self.keys():
+            i, ri = divmod(int(key[0]) - row_start, row_step)
+            if ri != 0 or i < 0 or i >= shape[0]:
+                continue
+            j, rj = divmod(int(key[1]) - col_start, col_step)
+            if rj != 0 or j < 0 or j >= shape[1]:
+                continue
+            newdok._dict[i, j] = self._dict[key]
+        return newdok
+
+    def _get_intXarray(self, row, col):
+        return self._get_columnXarray([row], col.ravel())
+
+    def _get_arrayXint(self, row, col):
+        res = self._get_columnXarray(row.ravel(), [col])
+        if row.ndim > 1:
+            return res.reshape(row.shape)
+        return res
+
+    def _get_sliceXarray(self, row, col):
+        row = list(range(*row.indices(self.shape[0])))
+        return self._get_columnXarray(row, col)
+
+    def _get_arrayXslice(self, row, col):
+        col = list(range(*col.indices(self.shape[1])))
+        return self._get_columnXarray(row, col)
+
+    def _get_columnXarray(self, row, col):
+        # outer indexing
+        newdok = self._dok_container((len(row), len(col)), dtype=self.dtype)
+
+        for i, r in enumerate(row):
+            for j, c in enumerate(col):
+                v = self._dict.get((r, c), 0)
+                if v:
+                    newdok._dict[i, j] = v
+        return newdok
+
+    def _get_arrayXarray(self, row, col):
+        # inner indexing
+        i, j = map(np.atleast_2d, np.broadcast_arrays(row, col))
+        newdok = self._dok_container(i.shape, dtype=self.dtype)
+
+        for key in itertools.product(range(i.shape[0]), range(i.shape[1])):
+            v = self._dict.get((i[key], j[key]), 0)
+            if v:
+                newdok._dict[key] = v
+        return newdok
+
+    # 1D set methods
+    def _set_int(self, idx, x):
+        if x:
+            self._dict[idx] = x
+        elif idx in self._dict:
+            del self._dict[idx]
+
+    def _set_array(self, idx, x):
+        idx_set = idx.ravel()
+        x_set = x.ravel()
+        if len(idx_set) != len(x_set):
+            if len(x_set) == 1:
+                x_set = np.full(len(idx_set), x_set[0], dtype=self.dtype)
+            else:
+              raise ValueError("Need len(index)==len(data) or len(data)==1")
+        for i, v in zip(idx_set, x_set):
+            if v:
+                self._dict[i] = v
+            elif i in self._dict:
+                del self._dict[i]
+
+    # 2D set methods
+    def _set_intXint(self, row, col, x):
+        key = (row, col)
+        if x:
+            self._dict[key] = x
+        elif key in self._dict:
+            del self._dict[key]
+
+    def _set_arrayXarray(self, row, col, x):
+        row = list(map(int, row.ravel()))
+        col = list(map(int, col.ravel()))
+        x = x.ravel()
+        self._dict.update(zip(zip(row, col), x))
+
+        for i in np.nonzero(x == 0)[0]:
+            key = (row[i], col[i])
+            if self._dict[key] == 0:
+                # may have been superseded by later update
+                del self._dict[key]
+
+    def __add__(self, other):
+        if isscalarlike(other):
+            res_dtype = upcast_scalar(self.dtype, other)
+            new = self._dok_container(self.shape, dtype=res_dtype)
+            # Add this scalar to each element.
+            for key in itertools.product(*[range(d) for d in self.shape]):
+                aij = self._dict.get(key, 0) + other
+                if aij:
+                    new[key] = aij
+        elif issparse(other):
+            if other.shape != self.shape:
+                raise ValueError("Matrix dimensions are not equal.")
+            res_dtype = upcast(self.dtype, other.dtype)
+            new = self._dok_container(self.shape, dtype=res_dtype)
+            new._dict = self._dict.copy()
+            if other.format == "dok":
+                o_items = other.items()
+            else:
+                other = other.tocoo()
+                if self.ndim == 1:
+                    o_items = zip(other.coords[0], other.data)
+                else:
+                    o_items = zip(zip(*other.coords), other.data)
+            with np.errstate(over='ignore'):
+                new._dict.update((k, new[k] + v) for k, v in o_items)
+        elif isdense(other):
+            new = self.todense() + other
+        else:
+            return NotImplemented
+        return new
+
+    def __radd__(self, other):
+        return self + other  # addition is commutative
+
+    def __neg__(self):
+        if self.dtype.kind == 'b':
+            raise NotImplementedError(
+                'Negating a sparse boolean matrix is not supported.'
+            )
+        new = self._dok_container(self.shape, dtype=self.dtype)
+        new._dict.update((k, -v) for k, v in self.items())
+        return new
+
+    def _mul_scalar(self, other):
+        res_dtype = upcast_scalar(self.dtype, other)
+        # Multiply this scalar by every element.
+        new = self._dok_container(self.shape, dtype=res_dtype)
+        new._dict.update(((k, v * other) for k, v in self.items()))
+        return new
+
+    def _matmul_vector(self, other):
+        res_dtype = upcast(self.dtype, other.dtype)
+
+        # vector @ vector
+        if self.ndim == 1:
+            if issparse(other):
+                if other.format == "dok":
+                    keys = self.keys() & other.keys()
+                else:
+                    keys = self.keys() & other.tocoo().coords[0]
+                return res_dtype(sum(self._dict[k] * other._dict[k] for k in keys))
+            elif isdense(other):
+                return res_dtype(sum(other[k] * v for k, v in self.items()))
+            else:
+                return NotImplemented
+
+        # matrix @ vector
+        result = np.zeros(self.shape[0], dtype=res_dtype)
+        for (i, j), v in self.items():
+            result[i] += v * other[j]
+        return result
+
+    def _matmul_multivector(self, other):
+        result_dtype = upcast(self.dtype, other.dtype)
+        # vector @ multivector
+        if self.ndim == 1:
+            # works for other 1d or 2d
+            return sum(v * other[j] for j, v in self._dict.items())
+
+        # matrix @ multivector
+        M = self.shape[0]
+        new_shape = (M,) if other.ndim == 1 else (M, other.shape[1])
+        result = np.zeros(new_shape, dtype=result_dtype)
+        for (i, j), v in self.items():
+            result[i] += v * other[j]
+        return result
+
+    def __imul__(self, other):
+        if isscalarlike(other):
+            self._dict.update((k, v * other) for k, v in self.items())
+            return self
+        return NotImplemented
+
+    def __truediv__(self, other):
+        if isscalarlike(other):
+            res_dtype = upcast_scalar(self.dtype, other)
+            new = self._dok_container(self.shape, dtype=res_dtype)
+            new._dict.update(((k, v / other) for k, v in self.items()))
+            return new
+        return self.tocsr() / other
+
+    def __itruediv__(self, other):
+        if isscalarlike(other):
+            self._dict.update((k, v / other) for k, v in self.items())
+            return self
+        return NotImplemented
+
+    def __reduce__(self):
+        # this approach is necessary because __setstate__ is called after
+        # __setitem__ upon unpickling and since __init__ is not called there
+        # is no shape attribute hence it is not possible to unpickle it.
+        return dict.__reduce__(self)
+
+    def diagonal(self, k=0):
+        if self.ndim == 2:
+            return super().diagonal(k)
+        raise ValueError("diagonal requires two dimensions")
+
+    def transpose(self, axes=None, copy=False):
+        if self.ndim == 1:
+            return self.copy()
+
+        if axes is not None and axes != (1, 0):
+            raise ValueError(
+                "Sparse arrays/matrices do not support "
+                "an 'axes' parameter because swapping "
+                "dimensions is the only logical permutation."
+            )
+
+        M, N = self.shape
+        new = self._dok_container((N, M), dtype=self.dtype, copy=copy)
+        new._dict.update((((right, left), val) for (left, right), val in self.items()))
+        return new
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def conjtransp(self):
+        """DEPRECATED: Return the conjugate transpose.
+
+        .. deprecated:: 1.14.0
+
+            `conjtransp` is deprecated and will be removed in v1.16.0.
+            Use ``.T.conj()`` instead.
+        """
+        msg = ("`conjtransp` is deprecated and will be removed in v1.16.0. "
+                   "Use `.T.conj()` instead.")
+        warn(msg, DeprecationWarning, stacklevel=2)
+
+        if self.ndim == 1:
+            new = self.tocoo()
+            new.data = new.data.conjugate()
+            return new
+
+        M, N = self.shape
+        new = self._dok_container((N, M), dtype=self.dtype)
+        new._dict = {(right, left): np.conj(val) for (left, right), val in self.items()}
+        return new
+
+    def copy(self):
+        new = self._dok_container(self.shape, dtype=self.dtype)
+        new._dict.update(self._dict)
+        return new
+
+    copy.__doc__ = _spbase.copy.__doc__
+
+    @classmethod
+    def fromkeys(cls, iterable, value=1, /):
+        tmp = dict.fromkeys(iterable, value)
+        if isinstance(next(iter(tmp)), tuple):
+            shape = tuple(max(idx) + 1 for idx in zip(*tmp))
+        else:
+            shape = (max(tmp) + 1,)
+        result = cls(shape, dtype=type(value))
+        result._dict = tmp
+        return result
+
+    def tocoo(self, copy=False):
+        nnz = self.nnz
+        if nnz == 0:
+            return self._coo_container(self.shape, dtype=self.dtype)
+
+        idx_dtype = self._get_index_dtype(maxval=max(self.shape))
+        data = np.fromiter(self.values(), dtype=self.dtype, count=nnz)
+        # handle 1d keys specially b/c not a tuple
+        inds = zip(*self.keys()) if self.ndim > 1 else (self.keys(),)
+        coords = tuple(np.fromiter(ix, dtype=idx_dtype, count=nnz) for ix in inds)
+        A = self._coo_container((data, coords), shape=self.shape, dtype=self.dtype)
+        A.has_canonical_format = True
+        return A
+
+    tocoo.__doc__ = _spbase.tocoo.__doc__
+
+    def todok(self, copy=False):
+        if copy:
+            return self.copy()
+        return self
+
+    todok.__doc__ = _spbase.todok.__doc__
+
+    def tocsc(self, copy=False):
+        if self.ndim == 1:
+            raise NotImplementedError("tocsr() not valid for 1d sparse array")
+        return self.tocoo(copy=False).tocsc(copy=copy)
+
+    tocsc.__doc__ = _spbase.tocsc.__doc__
+
+    def resize(self, *shape):
+        shape = check_shape(shape, allow_nd=self._allow_nd)
+        if len(shape) != len(self.shape):
+            # TODO implement resize across dimensions
+            raise NotImplementedError
+
+        if self.ndim == 1:
+            newN = shape[-1]
+            for i in list(self._dict):
+                if i >= newN:
+                    del self._dict[i]
+            self._shape = shape
+            return
+
+        newM, newN = shape
+        M, N = self.shape
+        if newM < M or newN < N:
+            # Remove all elements outside new dimensions
+            for i, j in list(self.keys()):
+                if i >= newM or j >= newN:
+                    del self._dict[i, j]
+        self._shape = shape
+
+    resize.__doc__ = _spbase.resize.__doc__
+
+    # Added for 1d to avoid `tocsr` from _base.py
+    def astype(self, dtype, casting='unsafe', copy=True):
+        dtype = np.dtype(dtype)
+        if self.dtype != dtype:
+            result = self._dok_container(self.shape, dtype=dtype)
+            data = np.array(list(self._dict.values()), dtype=dtype)
+            result._dict = dict(zip(self._dict, data))
+            return result
+        elif copy:
+            return self.copy()
+        return self
+
+
+def isspmatrix_dok(x):
+    """Is `x` of dok_array type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a dok matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a dok matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import dok_array, dok_matrix, coo_matrix, isspmatrix_dok
+    >>> isspmatrix_dok(dok_matrix([[5]]))
+    True
+    >>> isspmatrix_dok(dok_array([[5]]))
+    False
+    >>> isspmatrix_dok(coo_matrix([[5]]))
+    False
+    """
+    return isinstance(x, dok_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class dok_array(_dok_base, sparray):
+    """
+    Dictionary Of Keys based sparse array.
+
+    This is an efficient structure for constructing sparse
+    arrays incrementally.
+
+    This can be instantiated in several ways:
+        dok_array(D)
+            where D is a 2-D ndarray
+
+        dok_array(S)
+            with another sparse array or matrix S (equivalent to S.todok())
+
+        dok_array((M,N), [dtype])
+            create the array with initial shape (M,N)
+            dtype is optional, defaulting to dtype='d'
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+        Number of nonzero elements
+    size
+    T
+
+    Notes
+    -----
+
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    - Allows for efficient O(1) access of individual elements.
+    - Duplicates are not allowed.
+    - Can be efficiently converted to a coo_array once constructed.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import dok_array
+    >>> S = dok_array((5, 5), dtype=np.float32)
+    >>> for i in range(5):
+    ...     for j in range(5):
+    ...         S[i, j] = i + j    # Update element
+
+    """
+
+
+class dok_matrix(spmatrix, _dok_base):
+    """
+    Dictionary Of Keys based sparse matrix.
+
+    This is an efficient structure for constructing sparse
+    matrices incrementally.
+
+    This can be instantiated in several ways:
+        dok_matrix(D)
+            where D is a 2-D ndarray
+
+        dok_matrix(S)
+            with another sparse array or matrix S (equivalent to S.todok())
+
+        dok_matrix((M,N), [dtype])
+            create the matrix with initial shape (M,N)
+            dtype is optional, defaulting to dtype='d'
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+        Number of nonzero elements
+    size
+    T
+
+    Notes
+    -----
+
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    - Allows for efficient O(1) access of individual elements.
+    - Duplicates are not allowed.
+    - Can be efficiently converted to a coo_matrix once constructed.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import dok_matrix
+    >>> S = dok_matrix((5, 5), dtype=np.float32)
+    >>> for i in range(5):
+    ...     for j in range(5):
+    ...         S[i, j] = i + j    # Update element
+
+    """
+
+    def set_shape(self, shape):
+        new_matrix = self.reshape(shape, copy=False).asformat(self.format)
+        self.__dict__ = new_matrix.__dict__
+
+    def get_shape(self):
+        """Get shape of a sparse matrix."""
+        return self._shape
+
+    shape = property(fget=get_shape, fset=set_shape)
+
+    def __reversed__(self):
+        return self._dict.__reversed__()
+
+    def __or__(self, other):
+        if isinstance(other, _dok_base):
+            return self._dict | other._dict
+        return self._dict | other
+
+    def __ror__(self, other):
+        if isinstance(other, _dok_base):
+            return self._dict | other._dict
+        return self._dict | other
+
+    def __ior__(self, other):
+        if isinstance(other, _dok_base):
+            self._dict |= other._dict
+        else:
+            self._dict |= other
+        return self
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_extract.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_extract.py
new file mode 100644
index 0000000000000000000000000000000000000000..0ee1a88575926efa1d5a921edbd3d88696157dc2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_extract.py
@@ -0,0 +1,178 @@
+"""Functions to extract parts of sparse matrices
+"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['find', 'tril', 'triu']
+
+
+from ._coo import coo_matrix, coo_array
+from ._base import sparray
+
+
+def find(A):
+    """Return the indices and values of the nonzero elements of a matrix
+
+    Parameters
+    ----------
+    A : dense or sparse array or matrix
+        Matrix whose nonzero elements are desired.
+
+    Returns
+    -------
+    (I,J,V) : tuple of arrays
+        I,J, and V contain the row indices, column indices, and values
+        of the nonzero entries.
+
+
+    Examples
+    --------
+    >>> from scipy.sparse import csr_array, find
+    >>> A = csr_array([[7.0, 8.0, 0],[0, 0, 9.0]])
+    >>> find(A)
+    (array([0, 0, 1], dtype=int32),
+     array([0, 1, 2], dtype=int32),
+     array([ 7.,  8.,  9.]))
+
+    """
+
+    A = coo_array(A, copy=True)
+    A.sum_duplicates()
+    # remove explicit zeros
+    nz_mask = A.data != 0
+    return A.row[nz_mask], A.col[nz_mask], A.data[nz_mask]
+
+
+def tril(A, k=0, format=None):
+    """Return the lower triangular portion of a sparse array or matrix
+
+    Returns the elements on or below the k-th diagonal of A.
+        - k = 0 corresponds to the main diagonal
+        - k > 0 is above the main diagonal
+        - k < 0 is below the main diagonal
+
+    Parameters
+    ----------
+    A : dense or sparse array or matrix
+        Matrix whose lower trianglar portion is desired.
+    k : integer : optional
+        The top-most diagonal of the lower triangle.
+    format : string
+        Sparse format of the result, e.g. format="csr", etc.
+
+    Returns
+    -------
+    L : sparse matrix
+        Lower triangular portion of A in sparse format.
+
+    See Also
+    --------
+    triu : upper triangle in sparse format
+
+    Examples
+    --------
+    >>> from scipy.sparse import csr_array, tril
+    >>> A = csr_array([[1, 2, 0, 0, 3], [4, 5, 0, 6, 7], [0, 0, 8, 9, 0]],
+    ...               dtype='int32')
+    >>> A.toarray()
+    array([[1, 2, 0, 0, 3],
+           [4, 5, 0, 6, 7],
+           [0, 0, 8, 9, 0]], dtype=int32)
+    >>> tril(A).toarray()
+    array([[1, 0, 0, 0, 0],
+           [4, 5, 0, 0, 0],
+           [0, 0, 8, 0, 0]], dtype=int32)
+    >>> tril(A).nnz
+    4
+    >>> tril(A, k=1).toarray()
+    array([[1, 2, 0, 0, 0],
+           [4, 5, 0, 0, 0],
+           [0, 0, 8, 9, 0]], dtype=int32)
+    >>> tril(A, k=-1).toarray()
+    array([[0, 0, 0, 0, 0],
+           [4, 0, 0, 0, 0],
+           [0, 0, 0, 0, 0]], dtype=int32)
+    >>> tril(A, format='csc')
+    
+
+    """
+    coo_sparse = coo_array if isinstance(A, sparray) else coo_matrix
+
+    # convert to COOrdinate format where things are easy
+    A = coo_sparse(A, copy=False)
+    mask = A.row + k >= A.col
+
+    row = A.row[mask]
+    col = A.col[mask]
+    data = A.data[mask]
+    new_coo = coo_sparse((data, (row, col)), shape=A.shape, dtype=A.dtype)
+    return new_coo.asformat(format)
+
+
+def triu(A, k=0, format=None):
+    """Return the upper triangular portion of a sparse array or matrix
+
+    Returns the elements on or above the k-th diagonal of A.
+        - k = 0 corresponds to the main diagonal
+        - k > 0 is above the main diagonal
+        - k < 0 is below the main diagonal
+
+    Parameters
+    ----------
+    A : dense or sparse array or matrix
+        Matrix whose upper trianglar portion is desired.
+    k : integer : optional
+        The bottom-most diagonal of the upper triangle.
+    format : string
+        Sparse format of the result, e.g. format="csr", etc.
+
+    Returns
+    -------
+    L : sparse array or matrix
+        Upper triangular portion of A in sparse format.
+        Sparse array if A is a sparse array, otherwise matrix.
+
+    See Also
+    --------
+    tril : lower triangle in sparse format
+
+    Examples
+    --------
+    >>> from scipy.sparse import csr_array, triu
+    >>> A = csr_array([[1, 2, 0, 0, 3], [4, 5, 0, 6, 7], [0, 0, 8, 9, 0]],
+    ...                dtype='int32')
+    >>> A.toarray()
+    array([[1, 2, 0, 0, 3],
+           [4, 5, 0, 6, 7],
+           [0, 0, 8, 9, 0]], dtype=int32)
+    >>> triu(A).toarray()
+    array([[1, 2, 0, 0, 3],
+           [0, 5, 0, 6, 7],
+           [0, 0, 8, 9, 0]], dtype=int32)
+    >>> triu(A).nnz
+    8
+    >>> triu(A, k=1).toarray()
+    array([[0, 2, 0, 0, 3],
+           [0, 0, 0, 6, 7],
+           [0, 0, 0, 9, 0]], dtype=int32)
+    >>> triu(A, k=-1).toarray()
+    array([[1, 2, 0, 0, 3],
+           [4, 5, 0, 6, 7],
+           [0, 0, 8, 9, 0]], dtype=int32)
+    >>> triu(A, format='csc')
+    
+
+    """
+    coo_sparse = coo_array if isinstance(A, sparray) else coo_matrix
+
+    # convert to COOrdinate format where things are easy
+    A = coo_sparse(A, copy=False)
+    mask = A.row + k <= A.col
+
+    row = A.row[mask]
+    col = A.col[mask]
+    data = A.data[mask]
+    new_coo = coo_sparse((data, (row, col)), shape=A.shape, dtype=A.dtype)
+    return new_coo.asformat(format)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_index.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_index.py
new file mode 100644
index 0000000000000000000000000000000000000000..451df8b242c73b35036878feaf1f7ad302dc1f91
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_index.py
@@ -0,0 +1,444 @@
+"""Indexing mixin for sparse array/matrix classes.
+"""
+import numpy as np
+from ._sputils import isintlike
+from ._base import sparray, issparse
+
+INT_TYPES = (int, np.integer)
+
+
+def _broadcast_arrays(a, b):
+    """
+    Same as np.broadcast_arrays(a, b) but old writeability rules.
+
+    NumPy >= 1.17.0 transitions broadcast_arrays to return
+    read-only arrays. Set writeability explicitly to avoid warnings.
+    Retain the old writeability rules, as our Cython code assumes
+    the old behavior.
+    """
+    x, y = np.broadcast_arrays(a, b)
+    x.flags.writeable = a.flags.writeable
+    y.flags.writeable = b.flags.writeable
+    return x, y
+
+
+class IndexMixin:
+    """
+    This class provides common dispatching and validation logic for indexing.
+    """
+    def __getitem__(self, key):
+        index, new_shape = self._validate_indices(key)
+
+        # 1D array
+        if len(index) == 1:
+            idx = index[0]
+            if isinstance(idx, np.ndarray):
+                if idx.shape == ():
+                    idx = idx.item()
+            if isinstance(idx, INT_TYPES):
+                res = self._get_int(idx)
+            elif isinstance(idx, slice):
+                res = self._get_slice(idx)
+            else:  # assume array idx
+                res = self._get_array(idx)
+
+            # package the result and return
+            if not isinstance(self, sparray):
+                return res
+            # handle np.newaxis in idx when result would otherwise be a scalar
+            if res.shape == () and new_shape != ():
+                if len(new_shape) == 1:
+                    return self.__class__([res], shape=new_shape, dtype=self.dtype)
+                if len(new_shape) == 2:
+                    return self.__class__([[res]], shape=new_shape, dtype=self.dtype)
+            return res.reshape(new_shape)
+
+        # 2D array
+        row, col = index
+
+        # Dispatch to specialized methods.
+        if isinstance(row, INT_TYPES):
+            if isinstance(col, INT_TYPES):
+                res = self._get_intXint(row, col)
+            elif isinstance(col, slice):
+                res = self._get_intXslice(row, col)
+            elif col.ndim == 1:
+                res = self._get_intXarray(row, col)
+            elif col.ndim == 2:
+                res = self._get_intXarray(row, col)
+            else:
+                raise IndexError('index results in >2 dimensions')
+        elif isinstance(row, slice):
+            if isinstance(col, INT_TYPES):
+                res = self._get_sliceXint(row, col)
+            elif isinstance(col, slice):
+                if row == slice(None) and row == col:
+                    res = self.copy()
+                else:
+                    res = self._get_sliceXslice(row, col)
+            elif col.ndim == 1:
+                res = self._get_sliceXarray(row, col)
+            else:
+                raise IndexError('index results in >2 dimensions')
+        else:
+            if isinstance(col, INT_TYPES):
+                res = self._get_arrayXint(row, col)
+            elif isinstance(col, slice):
+                res = self._get_arrayXslice(row, col)
+            # arrayXarray preprocess
+            elif (row.ndim == 2 and row.shape[1] == 1
+                and (col.ndim == 1 or col.shape[0] == 1)):
+                # outer indexing
+                res = self._get_columnXarray(row[:, 0], col.ravel())
+            else:
+                # inner indexing
+                row, col = _broadcast_arrays(row, col)
+                if row.shape != col.shape:
+                    raise IndexError('number of row and column indices differ')
+                if row.size == 0:
+                    res = self.__class__(np.atleast_2d(row).shape, dtype=self.dtype)
+                else:
+                    res = self._get_arrayXarray(row, col)
+
+        # handle spmatrix (must be 2d, dont let 1d new_shape start reshape)
+        if not isinstance(self, sparray):
+            if new_shape == () or (len(new_shape) == 1 and res.ndim != 0):
+                # res handles cases not inflated by None
+                return res
+            if len(new_shape) == 1:
+                # shape inflated to 1D by None in index. Make 2D
+                new_shape = (1,) + new_shape
+            # reshape if needed (when None changes shape, e.g. A[1,:,None])
+            return res if new_shape == res.shape else res.reshape(new_shape)
+
+        # package the result and return
+        if res.shape != new_shape:
+            # handle formats that support indexing but not 1D (lil for now)
+            if self.format == "lil" and len(new_shape) != 2:
+                if res.shape == ():
+                    return self._coo_container([res], shape = new_shape)
+                return res.tocoo().reshape(new_shape)
+            return res.reshape(new_shape)
+        return res
+
+    def __setitem__(self, key, x):
+        index, _ = self._validate_indices(key)
+
+        # 1D array
+        if len(index) == 1:
+            idx = index[0]
+
+            if issparse(x):
+                x = x.toarray()
+            else:
+                x = np.asarray(x, dtype=self.dtype)
+
+            if isinstance(idx, INT_TYPES):
+                if x.size != 1:
+                    raise ValueError('Trying to assign a sequence to an item')
+                self._set_int(idx, x.flat[0])
+                return
+
+            if isinstance(idx, slice):
+                # check for simple case of slice that gives 1 item
+                # Note: Python `range` does not use lots of memory
+                idx_range = range(*idx.indices(self.shape[0]))
+                N = len(idx_range)
+                if N == 1 and x.size == 1:
+                    self._set_int(idx_range[0], x.flat[0])
+                    return
+                idx = np.arange(*idx.indices(self.shape[0]))
+                idx_shape = idx.shape
+            else:
+                idx_shape = idx.squeeze().shape
+            # broadcast scalar to full 1d
+            if x.squeeze().shape != idx_shape:
+                x = np.broadcast_to(x, idx.shape)
+            if x.size != 0:
+                self._set_array(idx, x)
+            return
+
+        # 2D array
+        row, col = index
+
+        if isinstance(row, INT_TYPES) and isinstance(col, INT_TYPES):
+            x = np.asarray(x, dtype=self.dtype)
+            if x.size != 1:
+                raise ValueError('Trying to assign a sequence to an item')
+            self._set_intXint(row, col, x.flat[0])
+            return
+
+        if isinstance(row, slice):
+            row = np.arange(*row.indices(self.shape[0]))[:, None]
+        else:
+            row = np.atleast_1d(row)
+
+        if isinstance(col, slice):
+            col = np.arange(*col.indices(self.shape[1]))[None, :]
+            if row.ndim == 1:
+                row = row[:, None]
+        else:
+            col = np.atleast_1d(col)
+
+        i, j = _broadcast_arrays(row, col)
+        if i.shape != j.shape:
+            raise IndexError('number of row and column indices differ')
+
+        if issparse(x):
+            if 0 in x.shape:
+                return
+            if i.ndim == 1:
+                # Inner indexing, so treat them like row vectors.
+                i = i[None]
+                j = j[None]
+            x = x.tocoo(copy=False).reshape(x._shape_as_2d, copy=True)
+            broadcast_row = x.shape[0] == 1 and i.shape[0] != 1
+            broadcast_col = x.shape[1] == 1 and i.shape[1] != 1
+            if not ((broadcast_row or x.shape[0] == i.shape[0]) and
+                    (broadcast_col or x.shape[1] == i.shape[1])):
+                raise ValueError('shape mismatch in assignment')
+            x.sum_duplicates()
+            self._set_arrayXarray_sparse(i, j, x)
+        else:
+            # Make x and i into the same shape
+            x = np.asarray(x, dtype=self.dtype)
+            if x.squeeze().shape != i.squeeze().shape:
+                x = np.broadcast_to(x, i.shape)
+            if x.size == 0:
+                return
+            x = x.reshape(i.shape)
+            self._set_arrayXarray(i, j, x)
+
+    def _validate_indices(self, key):
+        """Returns two tuples: (index tuple, requested shape tuple)"""
+        # single ellipsis
+        if key is Ellipsis:
+            return (slice(None),) * self.ndim, self.shape
+
+        if not isinstance(key, tuple):
+            key = [key]
+
+        ellps_pos = None
+        index_1st = []
+        prelim_ndim = 0
+        for i, idx in enumerate(key):
+            if idx is Ellipsis:
+                if ellps_pos is not None:
+                    raise IndexError('an index can only have a single ellipsis')
+                ellps_pos = i
+            elif idx is None:
+                index_1st.append(idx)
+            elif isinstance(idx, slice) or isintlike(idx):
+                index_1st.append(idx)
+                prelim_ndim += 1
+            elif (ix := _compatible_boolean_index(idx, self.ndim)) is not None:
+                index_1st.append(ix)
+                prelim_ndim += ix.ndim
+            elif issparse(idx):
+                # TODO: make sparse matrix indexing work for sparray
+                raise IndexError(
+                    'Indexing with sparse matrices is not supported '
+                    'except boolean indexing where matrix and index '
+                    'are equal shapes.')
+            else:  # dense array
+                index_1st.append(np.asarray(idx))
+                prelim_ndim += 1
+        ellip_slices = (self.ndim - prelim_ndim) * [slice(None)]
+        if ellip_slices:
+            if ellps_pos is None:
+                index_1st.extend(ellip_slices)
+            else:
+                index_1st = index_1st[:ellps_pos] + ellip_slices + index_1st[ellps_pos:]
+
+        # second pass (have processed ellipsis and preprocessed arrays)
+        idx_shape = []
+        index_ndim = 0
+        index = []
+        array_indices = []
+        for i, idx in enumerate(index_1st):
+            if idx is None:
+                idx_shape.append(1)
+            elif isinstance(idx, slice):
+                index.append(idx)
+                Ms = self._shape[index_ndim]
+                len_slice = len(range(*idx.indices(Ms)))
+                idx_shape.append(len_slice)
+                index_ndim += 1
+            elif isintlike(idx):
+                N = self._shape[index_ndim]
+                if not (-N <= idx < N):
+                    raise IndexError(f'index ({idx}) out of range')
+                idx = int(idx + N if idx < 0 else idx)
+                index.append(idx)
+                index_ndim += 1
+            # bool array (checked in first pass)
+            elif idx.dtype.kind == 'b':
+                ix = idx
+                tmp_ndim = index_ndim + ix.ndim
+                mid_shape = self._shape[index_ndim:tmp_ndim]
+                if ix.shape != mid_shape:
+                    raise IndexError(
+                        f"bool index {i} has shape {mid_shape} instead of {ix.shape}"
+                    )
+                index.extend(ix.nonzero())
+                array_indices.extend(range(index_ndim, tmp_ndim))
+                index_ndim = tmp_ndim
+            else:  # dense array
+                N = self._shape[index_ndim]
+                idx = self._asindices(idx, N)
+                index.append(idx)
+                array_indices.append(index_ndim)
+                index_ndim += 1
+        if index_ndim > self.ndim:
+            raise IndexError(
+                f'invalid index ndim. Array is {self.ndim}D. Index needs {index_ndim}D'
+            )
+        if len(array_indices) > 1:
+            idx_arrays = _broadcast_arrays(*(index[i] for i in array_indices))
+            if any(idx_arrays[0].shape != ix.shape for ix in idx_arrays[1:]):
+                shapes = " ".join(str(ix.shape) for ix in idx_arrays)
+                msg = (f'shape mismatch: indexing arrays could not be broadcast '
+                       f'together with shapes {shapes}')
+                raise IndexError(msg)
+            # TODO: handle this for nD (adjacent arrays stay, separated move to start)
+            idx_shape = list(idx_arrays[0].shape) + idx_shape
+        elif len(array_indices) == 1:
+            arr_index = array_indices[0]
+            arr_shape = list(index[arr_index].shape)
+            idx_shape = idx_shape[:arr_index] + arr_shape + idx_shape[arr_index:]
+        if (ndim := len(idx_shape)) > 2:
+            raise IndexError(f'Only 1D or 2D arrays allowed. Index makes {ndim}D')
+        return tuple(index), tuple(idx_shape)
+
+    def _asindices(self, idx, length):
+        """Convert `idx` to a valid index for an axis with a given length.
+
+        Subclasses that need special validation can override this method.
+        """
+        try:
+            x = np.asarray(idx)
+        except (ValueError, TypeError, MemoryError) as e:
+            raise IndexError('invalid index') from e
+
+        if x.ndim not in (1, 2):
+            raise IndexError('Index dimension must be 1 or 2')
+
+        if x.size == 0:
+            return x
+
+        # Check bounds
+        max_indx = x.max()
+        if max_indx >= length:
+            raise IndexError('index (%d) out of range' % max_indx)
+
+        min_indx = x.min()
+        if min_indx < 0:
+            if min_indx < -length:
+                raise IndexError('index (%d) out of range' % min_indx)
+            if x is idx or not x.flags.owndata:
+                x = x.copy()
+            x[x < 0] += length
+        return x
+
+    def _getrow(self, i):
+        """Return a copy of row i of the matrix, as a (1 x n) row vector.
+        """
+        M, N = self.shape
+        i = int(i)
+        if i < -M or i >= M:
+            raise IndexError('index (%d) out of range' % i)
+        if i < 0:
+            i += M
+        return self._get_intXslice(i, slice(None))
+
+    def _getcol(self, i):
+        """Return a copy of column i of the matrix, as a (m x 1) column vector.
+        """
+        M, N = self.shape
+        i = int(i)
+        if i < -N or i >= N:
+            raise IndexError('index (%d) out of range' % i)
+        if i < 0:
+            i += N
+        return self._get_sliceXint(slice(None), i)
+
+    def _get_int(self, idx):
+        raise NotImplementedError()
+
+    def _get_slice(self, idx):
+        raise NotImplementedError()
+
+    def _get_array(self, idx):
+        raise NotImplementedError()
+
+    def _get_intXint(self, row, col):
+        raise NotImplementedError()
+
+    def _get_intXarray(self, row, col):
+        raise NotImplementedError()
+
+    def _get_intXslice(self, row, col):
+        raise NotImplementedError()
+
+    def _get_sliceXint(self, row, col):
+        raise NotImplementedError()
+
+    def _get_sliceXslice(self, row, col):
+        raise NotImplementedError()
+
+    def _get_sliceXarray(self, row, col):
+        raise NotImplementedError()
+
+    def _get_arrayXint(self, row, col):
+        raise NotImplementedError()
+
+    def _get_arrayXslice(self, row, col):
+        raise NotImplementedError()
+
+    def _get_columnXarray(self, row, col):
+        raise NotImplementedError()
+
+    def _get_arrayXarray(self, row, col):
+        raise NotImplementedError()
+
+    def _set_int(self, idx, x):
+        raise NotImplementedError()
+
+    def _set_array(self, idx, x):
+        raise NotImplementedError()
+
+    def _set_intXint(self, row, col, x):
+        raise NotImplementedError()
+
+    def _set_arrayXarray(self, row, col, x):
+        raise NotImplementedError()
+
+    def _set_arrayXarray_sparse(self, row, col, x):
+        # Fall back to densifying x
+        x = np.asarray(x.toarray(), dtype=self.dtype)
+        x, _ = _broadcast_arrays(x, row)
+        self._set_arrayXarray(row, col, x)
+
+
+def _compatible_boolean_index(idx, desired_ndim):
+    """Check for boolean array or array-like. peek before asarray for array-like"""
+    # use attribute ndim to indicate a compatible array and check dtype
+    # if not, look at 1st element as quick rejection of bool, else slower asanyarray
+    if not hasattr(idx, 'ndim'):
+        # is first element boolean?
+        try:
+            ix = next(iter(idx), None)
+            for _ in range(desired_ndim):
+                if isinstance(ix, bool):
+                    break
+                ix = next(iter(ix), None)
+            else:
+                return None
+        except TypeError:
+            return None
+        # since first is boolean, construct array and check all elements
+        idx = np.asanyarray(idx)
+
+    if idx.dtype.kind == 'b':
+        return idx
+    return None
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_lil.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_lil.py
new file mode 100644
index 0000000000000000000000000000000000000000..479472445cd8bdc36374b3d8bc18e6f9df123306
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_lil.py
@@ -0,0 +1,632 @@
+"""List of Lists sparse matrix class
+"""
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['lil_array', 'lil_matrix', 'isspmatrix_lil']
+
+from bisect import bisect_left
+
+import numpy as np
+
+from ._matrix import spmatrix
+from ._base import _spbase, sparray, issparse
+from ._index import IndexMixin, INT_TYPES, _broadcast_arrays
+from ._sputils import (getdtype, isshape, isscalarlike, upcast_scalar,
+                       check_shape, check_reshape_kwargs)
+from . import _csparsetools
+
+
+class _lil_base(_spbase, IndexMixin):
+    _format = 'lil'
+
+    def __init__(self, arg1, shape=None, dtype=None, copy=False, *, maxprint=None):
+        _spbase.__init__(self, arg1, maxprint=maxprint)
+        self.dtype = getdtype(dtype, arg1, default=float)
+
+        # First get the shape
+        if issparse(arg1):
+            if arg1.format == "lil" and copy:
+                A = arg1.copy()
+            else:
+                A = arg1.tolil()
+
+            if dtype is not None:
+                newdtype = getdtype(dtype)
+                A = A.astype(newdtype, copy=False)
+
+            self._shape = check_shape(A.shape)
+            self.dtype = A.dtype
+            self.rows = A.rows
+            self.data = A.data
+        elif isinstance(arg1,tuple):
+            if isshape(arg1):
+                if shape is not None:
+                    raise ValueError('invalid use of shape parameter')
+                M, N = arg1
+                self._shape = check_shape((M, N))
+                self.rows = np.empty((M,), dtype=object)
+                self.data = np.empty((M,), dtype=object)
+                for i in range(M):
+                    self.rows[i] = []
+                    self.data[i] = []
+            else:
+                raise TypeError('unrecognized lil_array constructor usage')
+        else:
+            # assume A is dense
+            try:
+                A = self._ascontainer(arg1)
+            except TypeError as e:
+                raise TypeError('unsupported matrix type') from e
+            if isinstance(self, sparray) and A.ndim != 2:
+                raise ValueError(f"LIL arrays don't support {A.ndim}D input. Use 2D")
+            A = self._csr_container(A, dtype=dtype).tolil()
+
+            self._shape = check_shape(A.shape)
+            self.dtype = getdtype(A.dtype)
+            self.rows = A.rows
+            self.data = A.data
+
+    def __iadd__(self,other):
+        self[:,:] = self + other
+        return self
+
+    def __isub__(self,other):
+        self[:,:] = self - other
+        return self
+
+    def __imul__(self,other):
+        if isscalarlike(other):
+            self[:,:] = self * other
+            return self
+        else:
+            return NotImplemented
+
+    def __itruediv__(self,other):
+        if isscalarlike(other):
+            self[:,:] = self / other
+            return self
+        else:
+            return NotImplemented
+
+    # Whenever the dimensions change, empty lists should be created for each
+    # row
+
+    def _getnnz(self, axis=None):
+        if axis is None:
+            return sum([len(rowvals) for rowvals in self.data])
+        if axis < 0:
+            axis += 2
+        if axis == 0:
+            out = np.zeros(self.shape[1], dtype=np.intp)
+            for row in self.rows:
+                out[row] += 1
+            return out
+        elif axis == 1:
+            return np.array([len(rowvals) for rowvals in self.data], dtype=np.intp)
+        else:
+            raise ValueError('axis out of bounds')
+
+    _getnnz.__doc__ = _spbase._getnnz.__doc__
+
+    def count_nonzero(self, axis=None):
+        if axis is None:
+            return sum(np.count_nonzero(rowvals) for rowvals in self.data)
+
+        if axis < 0:
+            axis += 2
+        if axis == 0:
+            out = np.zeros(self.shape[1], dtype=np.intp)
+            for row, data in zip(self.rows, self.data):
+                mask = [c for c, d in zip(row, data) if d != 0]
+                out[mask] += 1
+            return out
+        elif axis == 1:
+            return np.array(
+                [np.count_nonzero(rowvals) for rowvals in self.data], dtype=np.intp,
+            )
+        else:
+            raise ValueError('axis out of bounds')
+
+    count_nonzero.__doc__ = _spbase.count_nonzero.__doc__
+
+    def getrowview(self, i):
+        """Returns a view of the 'i'th row (without copying).
+        """
+        new = self._lil_container((1, self.shape[1]), dtype=self.dtype)
+        new.rows[0] = self.rows[i]
+        new.data[0] = self.data[i]
+        return new
+
+    def getrow(self, i):
+        """Returns a copy of the 'i'th row.
+        """
+        M, N = self.shape
+        if i < 0:
+            i += M
+        if i < 0 or i >= M:
+            raise IndexError('row index out of bounds')
+        new = self._lil_container((1, N), dtype=self.dtype)
+        new.rows[0] = self.rows[i][:]
+        new.data[0] = self.data[i][:]
+        return new
+
+    def __getitem__(self, key):
+        # Fast path for simple (int, int) indexing.
+        if (isinstance(key, tuple) and len(key) == 2 and
+                isinstance(key[0], INT_TYPES) and
+                isinstance(key[1], INT_TYPES)):
+            # lil_get1 handles validation for us.
+            return self._get_intXint(*key)
+        # Everything else takes the normal path.
+        return IndexMixin.__getitem__(self, key)
+
+    def _asindices(self, idx, N):
+        # LIL routines handle bounds-checking for us, so don't do it here.
+        try:
+            x = np.asarray(idx)
+        except (ValueError, TypeError, MemoryError) as e:
+            raise IndexError('invalid index') from e
+        if x.ndim not in (1, 2):
+            raise IndexError('Index dimension must be <= 2')
+        return x
+
+    def _get_intXint(self, row, col):
+        v = _csparsetools.lil_get1(self.shape[0], self.shape[1], self.rows,
+                                   self.data, row, col)
+        return self.dtype.type(v)
+
+    def _get_sliceXint(self, row, col):
+        row = range(*row.indices(self.shape[0]))
+        return self._get_row_ranges(row, slice(col, col+1))
+
+    def _get_arrayXint(self, row, col):
+        res = self._get_row_ranges(row.ravel(), slice(col, col+1))
+        if row.ndim > 1:
+            return res.reshape(row.shape)
+        return res
+
+    def _get_intXslice(self, row, col):
+        return self._get_row_ranges((row,), col)
+
+    def _get_sliceXslice(self, row, col):
+        row = range(*row.indices(self.shape[0]))
+        return self._get_row_ranges(row, col)
+
+    def _get_arrayXslice(self, row, col):
+        return self._get_row_ranges(row, col)
+
+    def _get_intXarray(self, row, col):
+        row = np.array(row, dtype=col.dtype, ndmin=1)
+        return self._get_columnXarray(row, col)
+
+    def _get_sliceXarray(self, row, col):
+        row = np.arange(*row.indices(self.shape[0]))
+        return self._get_columnXarray(row, col)
+
+    def _get_columnXarray(self, row, col):
+        # outer indexing
+        row, col = _broadcast_arrays(row[:,None], col)
+        return self._get_arrayXarray(row, col)
+
+    def _get_arrayXarray(self, row, col):
+        # inner indexing
+        i, j = map(np.atleast_2d, _prepare_index_for_memoryview(row, col))
+        new = self._lil_container(i.shape, dtype=self.dtype)
+        _csparsetools.lil_fancy_get(self.shape[0], self.shape[1],
+                                    self.rows, self.data,
+                                    new.rows, new.data,
+                                    i, j)
+        return new
+
+    def _get_row_ranges(self, rows, col_slice):
+        """
+        Fast path for indexing in the case where column index is slice.
+
+        This gains performance improvement over brute force by more
+        efficient skipping of zeros, by accessing the elements
+        column-wise in order.
+
+        Parameters
+        ----------
+        rows : sequence or range
+            Rows indexed. If range, must be within valid bounds.
+        col_slice : slice
+            Columns indexed
+
+        """
+        j_start, j_stop, j_stride = col_slice.indices(self.shape[1])
+        col_range = range(j_start, j_stop, j_stride)
+        nj = len(col_range)
+        new = self._lil_container((len(rows), nj), dtype=self.dtype)
+
+        _csparsetools.lil_get_row_ranges(self.shape[0], self.shape[1],
+                                         self.rows, self.data,
+                                         new.rows, new.data,
+                                         rows,
+                                         j_start, j_stop, j_stride, nj)
+
+        return new
+
+    def _set_intXint(self, row, col, x):
+        _csparsetools.lil_insert(self.shape[0], self.shape[1], self.rows,
+                                 self.data, row, col, x)
+
+    def _set_arrayXarray(self, row, col, x):
+        i, j, x = map(np.atleast_2d, _prepare_index_for_memoryview(row, col, x))
+        _csparsetools.lil_fancy_set(self.shape[0], self.shape[1],
+                                    self.rows, self.data,
+                                    i, j, x)
+
+    def _set_arrayXarray_sparse(self, row, col, x):
+        # Fall back to densifying x
+        x = np.asarray(x.toarray(), dtype=self.dtype)
+        x, _ = _broadcast_arrays(x, row)
+        self._set_arrayXarray(row, col, x)
+
+    def __setitem__(self, key, x):
+        if isinstance(key, tuple) and len(key) == 2:
+            row, col = key
+            # Fast path for simple (int, int) indexing.
+            if isinstance(row, INT_TYPES) and isinstance(col, INT_TYPES):
+                x = self.dtype.type(x)
+                if x.size > 1:
+                    raise ValueError("Trying to assign a sequence to an item")
+                return self._set_intXint(row, col, x)
+            # Fast path for full-matrix sparse assignment.
+            if (isinstance(row, slice) and isinstance(col, slice) and
+                    row == slice(None) and col == slice(None) and
+                    issparse(x) and x.shape == self.shape):
+                x = self._lil_container(x, dtype=self.dtype)
+                self.rows = x.rows
+                self.data = x.data
+                return
+        # Everything else takes the normal path.
+        IndexMixin.__setitem__(self, key, x)
+
+    def _mul_scalar(self, other):
+        if other == 0:
+            # Multiply by zero: return the zero matrix
+            new = self._lil_container(self.shape, dtype=self.dtype)
+        else:
+            res_dtype = upcast_scalar(self.dtype, other)
+
+            new = self.copy()
+            new = new.astype(res_dtype)
+            # Multiply this scalar by every element.
+            for j, rowvals in enumerate(new.data):
+                new.data[j] = [val*other for val in rowvals]
+        return new
+
+    def __truediv__(self, other):           # self / other
+        if isscalarlike(other):
+            new = self.copy()
+            new.dtype = np.result_type(self, other)
+            # Divide every element by this scalar
+            for j, rowvals in enumerate(new.data):
+                new.data[j] = [val/other for val in rowvals]
+            return new
+        else:
+            return self.tocsr() / other
+
+    def copy(self):
+        M, N = self.shape
+        new = self._lil_container(self.shape, dtype=self.dtype)
+        # This is ~14x faster than calling deepcopy() on rows and data.
+        _csparsetools.lil_get_row_ranges(M, N, self.rows, self.data,
+                                         new.rows, new.data, range(M),
+                                         0, N, 1, N)
+        return new
+
+    copy.__doc__ = _spbase.copy.__doc__
+
+    def reshape(self, *args, **kwargs):
+        shape = check_shape(args, self.shape)
+        order, copy = check_reshape_kwargs(kwargs)
+
+        # Return early if reshape is not required
+        if shape == self.shape:
+            if copy:
+                return self.copy()
+            else:
+                return self
+
+        new = self._lil_container(shape, dtype=self.dtype)
+
+        if order == 'C':
+            ncols = self.shape[1]
+            for i, row in enumerate(self.rows):
+                for col, j in enumerate(row):
+                    new_r, new_c = np.unravel_index(i * ncols + j, shape)
+                    new[new_r, new_c] = self[i, j]
+        elif order == 'F':
+            nrows = self.shape[0]
+            for i, row in enumerate(self.rows):
+                for col, j in enumerate(row):
+                    new_r, new_c = np.unravel_index(i + j * nrows, shape, order)
+                    new[new_r, new_c] = self[i, j]
+        else:
+            raise ValueError("'order' must be 'C' or 'F'")
+
+        return new
+
+    reshape.__doc__ = _spbase.reshape.__doc__
+
+    def resize(self, *shape):
+        shape = check_shape(shape)
+        new_M, new_N = shape
+        M, N = self.shape
+
+        if new_M < M:
+            self.rows = self.rows[:new_M]
+            self.data = self.data[:new_M]
+        elif new_M > M:
+            self.rows = np.resize(self.rows, new_M)
+            self.data = np.resize(self.data, new_M)
+            for i in range(M, new_M):
+                self.rows[i] = []
+                self.data[i] = []
+
+        if new_N < N:
+            for row, data in zip(self.rows, self.data):
+                trunc = bisect_left(row, new_N)
+                del row[trunc:]
+                del data[trunc:]
+
+        self._shape = shape
+
+    resize.__doc__ = _spbase.resize.__doc__
+
+    def toarray(self, order=None, out=None):
+        d = self._process_toarray_args(order, out)
+        for i, row in enumerate(self.rows):
+            for pos, j in enumerate(row):
+                d[i, j] = self.data[i][pos]
+        return d
+
+    toarray.__doc__ = _spbase.toarray.__doc__
+
+    def transpose(self, axes=None, copy=False):
+        return self.tocsr(copy=copy).transpose(axes=axes, copy=False).tolil(copy=False)
+
+    transpose.__doc__ = _spbase.transpose.__doc__
+
+    def tolil(self, copy=False):
+        if copy:
+            return self.copy()
+        else:
+            return self
+
+    tolil.__doc__ = _spbase.tolil.__doc__
+
+    def tocsr(self, copy=False):
+        M, N = self.shape
+        if M == 0 or N == 0:
+            return self._csr_container((M, N), dtype=self.dtype)
+
+        # construct indptr array
+        if M*N <= np.iinfo(np.int32).max:
+            # fast path: it is known that 64-bit indexing will not be needed.
+            idx_dtype = np.int32
+            indptr = np.empty(M + 1, dtype=idx_dtype)
+            indptr[0] = 0
+            _csparsetools.lil_get_lengths(self.rows, indptr[1:])
+            np.cumsum(indptr, out=indptr)
+            nnz = indptr[-1]
+        else:
+            idx_dtype = self._get_index_dtype(maxval=N)
+            lengths = np.empty(M, dtype=idx_dtype)
+            _csparsetools.lil_get_lengths(self.rows, lengths)
+            nnz = lengths.sum(dtype=np.int64)
+            idx_dtype = self._get_index_dtype(maxval=max(N, nnz))
+            indptr = np.empty(M + 1, dtype=idx_dtype)
+            indptr[0] = 0
+            np.cumsum(lengths, dtype=idx_dtype, out=indptr[1:])
+
+        indices = np.empty(nnz, dtype=idx_dtype)
+        data = np.empty(nnz, dtype=self.dtype)
+        _csparsetools.lil_flatten_to_array(self.rows, indices)
+        _csparsetools.lil_flatten_to_array(self.data, data)
+
+        # init csr matrix
+        return self._csr_container((data, indices, indptr), shape=self.shape)
+
+    tocsr.__doc__ = _spbase.tocsr.__doc__
+
+
+def _prepare_index_for_memoryview(i, j, x=None):
+    """
+    Convert index and data arrays to form suitable for passing to the
+    Cython fancy getset routines.
+
+    The conversions are necessary since to (i) ensure the integer
+    index arrays are in one of the accepted types, and (ii) to ensure
+    the arrays are writable so that Cython memoryview support doesn't
+    choke on them.
+
+    Parameters
+    ----------
+    i, j
+        Index arrays
+    x : optional
+        Data arrays
+
+    Returns
+    -------
+    i, j, x
+        Re-formatted arrays (x is omitted, if input was None)
+
+    """
+    if i.dtype > j.dtype:
+        j = j.astype(i.dtype)
+    elif i.dtype < j.dtype:
+        i = i.astype(j.dtype)
+
+    if not i.flags.writeable or i.dtype not in (np.int32, np.int64):
+        i = i.astype(np.intp)
+    if not j.flags.writeable or j.dtype not in (np.int32, np.int64):
+        j = j.astype(np.intp)
+
+    if x is not None:
+        if not x.flags.writeable:
+            x = x.copy()
+        return i, j, x
+    else:
+        return i, j
+
+
+def isspmatrix_lil(x):
+    """Is `x` of lil_matrix type?
+
+    Parameters
+    ----------
+    x
+        object to check for being a lil matrix
+
+    Returns
+    -------
+    bool
+        True if `x` is a lil matrix, False otherwise
+
+    Examples
+    --------
+    >>> from scipy.sparse import lil_array, lil_matrix, coo_matrix, isspmatrix_lil
+    >>> isspmatrix_lil(lil_matrix([[5]]))
+    True
+    >>> isspmatrix_lil(lil_array([[5]]))
+    False
+    >>> isspmatrix_lil(coo_matrix([[5]]))
+    False
+    """
+    return isinstance(x, lil_matrix)
+
+
+# This namespace class separates array from matrix with isinstance
+class lil_array(_lil_base, sparray):
+    """
+    Row-based LIst of Lists sparse array.
+
+    This is a structure for constructing sparse arrays incrementally.
+    Note that inserting a single item can take linear time in the worst case;
+    to construct the array efficiently, make sure the items are pre-sorted by
+    index, per row.
+
+    This can be instantiated in several ways:
+        lil_array(D)
+            where D is a 2-D ndarray
+
+        lil_array(S)
+            with another sparse array or matrix S (equivalent to S.tolil())
+
+        lil_array((M, N), [dtype])
+            to construct an empty array with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the array
+    shape : 2-tuple
+        Shape of the array
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        LIL format data array of the array
+    rows
+        LIL format row index array of the array
+    T
+
+    Notes
+    -----
+    Sparse arrays can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the LIL format
+        - supports flexible slicing
+        - changes to the array sparsity structure are efficient
+
+    Disadvantages of the LIL format
+        - arithmetic operations LIL + LIL are slow (consider CSR or CSC)
+        - slow column slicing (consider CSC)
+        - slow matrix vector products (consider CSR or CSC)
+
+    Intended Usage
+        - LIL is a convenient format for constructing sparse arrays
+        - once an array has been constructed, convert to CSR or
+          CSC format for fast arithmetic and matrix vector operations
+        - consider using the COO format when constructing large arrays
+
+    Data Structure
+        - An array (``self.rows``) of rows, each of which is a sorted
+          list of column indices of non-zero elements.
+        - The corresponding nonzero values are stored in similar
+          fashion in ``self.data``.
+
+    """
+
+
+class lil_matrix(spmatrix, _lil_base):
+    """
+    Row-based LIst of Lists sparse matrix.
+
+    This is a structure for constructing sparse matrices incrementally.
+    Note that inserting a single item can take linear time in the worst case;
+    to construct the matrix efficiently, make sure the items are pre-sorted by
+    index, per row.
+
+    This can be instantiated in several ways:
+        lil_matrix(D)
+            where D is a 2-D ndarray
+
+        lil_matrix(S)
+            with another sparse array or matrix S (equivalent to S.tolil())
+
+        lil_matrix((M, N), [dtype])
+            to construct an empty matrix with shape (M, N)
+            dtype is optional, defaulting to dtype='d'.
+
+    Attributes
+    ----------
+    dtype : dtype
+        Data type of the matrix
+    shape : 2-tuple
+        Shape of the matrix
+    ndim : int
+        Number of dimensions (this is always 2)
+    nnz
+    size
+    data
+        LIL format data array of the matrix
+    rows
+        LIL format row index array of the matrix
+    T
+
+    Notes
+    -----
+    Sparse matrices can be used in arithmetic operations: they support
+    addition, subtraction, multiplication, division, and matrix power.
+
+    Advantages of the LIL format
+        - supports flexible slicing
+        - changes to the matrix sparsity structure are efficient
+
+    Disadvantages of the LIL format
+        - arithmetic operations LIL + LIL are slow (consider CSR or CSC)
+        - slow column slicing (consider CSC)
+        - slow matrix vector products (consider CSR or CSC)
+
+    Intended Usage
+        - LIL is a convenient format for constructing sparse matrices
+        - once a matrix has been constructed, convert to CSR or
+          CSC format for fast arithmetic and matrix vector operations
+        - consider using the COO format when constructing large matrices
+
+    Data Structure
+        - An array (``self.rows``) of rows, each of which is a sorted
+          list of column indices of non-zero elements.
+        - The corresponding nonzero values are stored in similar
+          fashion in ``self.data``.
+
+    """
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix.py
new file mode 100644
index 0000000000000000000000000000000000000000..351660ba389ea7f2adf2576e350e840783d894fa
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix.py
@@ -0,0 +1,146 @@
+class spmatrix:
+    """This class provides a base class for all sparse matrix classes.
+
+    It cannot be instantiated.  Most of the work is provided by subclasses.
+    """
+    _allow_nd = (2,)
+
+    @property
+    def _bsr_container(self):
+        from ._bsr import bsr_matrix
+        return bsr_matrix
+
+    @property
+    def _coo_container(self):
+        from ._coo import coo_matrix
+        return coo_matrix
+
+    @property
+    def _csc_container(self):
+        from ._csc import csc_matrix
+        return csc_matrix
+
+    @property
+    def _csr_container(self):
+        from ._csr import csr_matrix
+        return csr_matrix
+
+    @property
+    def _dia_container(self):
+        from ._dia import dia_matrix
+        return dia_matrix
+
+    @property
+    def _dok_container(self):
+        from ._dok import dok_matrix
+        return dok_matrix
+
+    @property
+    def _lil_container(self):
+        from ._lil import lil_matrix
+        return lil_matrix
+
+    # Restore matrix multiplication
+    def __mul__(self, other):
+        return self._matmul_dispatch(other)
+
+    def __rmul__(self, other):
+        return self._rmatmul_dispatch(other)
+
+    # Restore matrix power
+    def __pow__(self, power):
+        from .linalg import matrix_power
+
+        return matrix_power(self, power)
+
+    ## Backward compatibility
+
+    def set_shape(self, shape):
+        """Set the shape of the matrix in-place"""
+        # Make sure copy is False since this is in place
+        # Make sure format is unchanged because we are doing a __dict__ swap
+        new_self = self.reshape(shape, copy=False).asformat(self.format)
+        self.__dict__ = new_self.__dict__
+
+    def get_shape(self):
+        """Get the shape of the matrix"""
+        return self._shape
+
+    shape = property(fget=get_shape, fset=set_shape,
+                     doc="Shape of the matrix")
+
+    def asfptype(self):
+        """Upcast matrix to a floating point format (if necessary)"""
+        return self._asfptype()
+
+    def getmaxprint(self):
+        """Maximum number of elements to display when printed."""
+        return self._getmaxprint()
+
+    def getformat(self):
+        """Matrix storage format"""
+        return self.format
+
+    def getnnz(self, axis=None):
+        """Number of stored values, including explicit zeros.
+
+        Parameters
+        ----------
+        axis : None, 0, or 1
+            Select between the number of values across the whole array, in
+            each column, or in each row.
+        """
+        return self._getnnz(axis=axis)
+
+    def getH(self):
+        """Return the Hermitian transpose of this matrix.
+
+        See Also
+        --------
+        numpy.matrix.getH : NumPy's implementation of `getH` for matrices
+        """
+        return self.conjugate().transpose()
+
+    def getcol(self, j):
+        """Returns a copy of column j of the matrix, as an (m x 1) sparse
+        matrix (column vector).
+        """
+        return self._getcol(j)
+
+    def getrow(self, i):
+        """Returns a copy of row i of the matrix, as a (1 x n) sparse
+        matrix (row vector).
+        """
+        return self._getrow(i)
+
+    def todense(self, order=None, out=None):
+        """
+        Return a dense representation of this sparse matrix.
+
+        Parameters
+        ----------
+        order : {'C', 'F'}, optional
+            Whether to store multi-dimensional data in C (row-major)
+            or Fortran (column-major) order in memory. The default
+            is 'None', which provides no ordering guarantees.
+            Cannot be specified in conjunction with the `out`
+            argument.
+
+        out : ndarray, 2-D, optional
+            If specified, uses this array (or `numpy.matrix`) as the
+            output buffer instead of allocating a new array to
+            return. The provided array must have the same shape and
+            dtype as the sparse matrix on which you are calling the
+            method.
+
+        Returns
+        -------
+        arr : numpy.matrix, 2-D
+            A NumPy matrix object with the same shape and containing
+            the same data represented by the sparse matrix, with the
+            requested memory order. If `out` was passed and was an
+            array (rather than a `numpy.matrix`), it will be filled
+            with the appropriate values and returned wrapped in a
+            `numpy.matrix` object that shares the same memory.
+        """
+        return super().todense(order, out)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix_io.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix_io.py
new file mode 100644
index 0000000000000000000000000000000000000000..5b7f533926fd415a379cb08420b4a65a14baeb43
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_matrix_io.py
@@ -0,0 +1,167 @@
+import numpy as np
+import scipy as sp
+
+__all__ = ['save_npz', 'load_npz']
+
+
+# Make loading safe vs. malicious input
+PICKLE_KWARGS = dict(allow_pickle=False)
+
+
+def save_npz(file, matrix, compressed=True):
+    """ Save a sparse matrix or array to a file using ``.npz`` format.
+
+    Parameters
+    ----------
+    file : str or file-like object
+        Either the file name (string) or an open file (file-like object)
+        where the data will be saved. If file is a string, the ``.npz``
+        extension will be appended to the file name if it is not already
+        there.
+    matrix: spmatrix or sparray
+        The sparse matrix or array to save.
+        Supported formats: ``csc``, ``csr``, ``bsr``, ``dia`` or ``coo``.
+    compressed : bool, optional
+        Allow compressing the file. Default: True
+
+    See Also
+    --------
+    scipy.sparse.load_npz: Load a sparse matrix from a file using ``.npz`` format.
+    numpy.savez: Save several arrays into a ``.npz`` archive.
+    numpy.savez_compressed : Save several arrays into a compressed ``.npz`` archive.
+
+    Examples
+    --------
+    Store sparse matrix to disk, and load it again:
+
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> sparse_matrix = sp.sparse.csc_matrix([[0, 0, 3], [4, 0, 0]])
+    >>> sparse_matrix
+    
+    >>> sparse_matrix.toarray()
+    array([[0, 0, 3],
+           [4, 0, 0]], dtype=int64)
+
+    >>> sp.sparse.save_npz('/tmp/sparse_matrix.npz', sparse_matrix)
+    >>> sparse_matrix = sp.sparse.load_npz('/tmp/sparse_matrix.npz')
+
+    >>> sparse_matrix
+    
+    >>> sparse_matrix.toarray()
+    array([[0, 0, 3],
+           [4, 0, 0]], dtype=int64)
+    """
+    arrays_dict = {}
+    if matrix.format in ('csc', 'csr', 'bsr'):
+        arrays_dict.update(indices=matrix.indices, indptr=matrix.indptr)
+    elif matrix.format == 'dia':
+        arrays_dict.update(offsets=matrix.offsets)
+    elif matrix.format == 'coo':
+        arrays_dict.update(row=matrix.row, col=matrix.col)
+    else:
+        msg = f'Save is not implemented for sparse matrix of format {matrix.format}.'
+        raise NotImplementedError(msg)
+    arrays_dict.update(
+        format=matrix.format.encode('ascii'),
+        shape=matrix.shape,
+        data=matrix.data
+    )
+    if isinstance(matrix, sp.sparse.sparray):
+        arrays_dict.update(_is_array=True)
+    if compressed:
+        np.savez_compressed(file, **arrays_dict)
+    else:
+        np.savez(file, **arrays_dict)
+
+
+def load_npz(file):
+    """ Load a sparse array/matrix from a file using ``.npz`` format.
+
+    Parameters
+    ----------
+    file : str or file-like object
+        Either the file name (string) or an open file (file-like object)
+        where the data will be loaded.
+
+    Returns
+    -------
+    result : csc_array, csr_array, bsr_array, dia_array or coo_array
+        A sparse array/matrix containing the loaded data.
+
+    Raises
+    ------
+    OSError
+        If the input file does not exist or cannot be read.
+
+    See Also
+    --------
+    scipy.sparse.save_npz: Save a sparse array/matrix to a file using ``.npz`` format.
+    numpy.load: Load several arrays from a ``.npz`` archive.
+
+    Examples
+    --------
+    Store sparse array/matrix to disk, and load it again:
+
+    >>> import numpy as np
+    >>> import scipy as sp
+    >>> sparse_array = sp.sparse.csc_array([[0, 0, 3], [4, 0, 0]])
+    >>> sparse_array
+    
+    >>> sparse_array.toarray()
+    array([[0, 0, 3],
+           [4, 0, 0]], dtype=int64)
+
+    >>> sp.sparse.save_npz('/tmp/sparse_array.npz', sparse_array)
+    >>> sparse_array = sp.sparse.load_npz('/tmp/sparse_array.npz')
+
+    >>> sparse_array
+    
+    >>> sparse_array.toarray()
+    array([[0, 0, 3],
+           [4, 0, 0]], dtype=int64)
+
+    In this example we force the result to be csr_array from csr_matrix
+    >>> sparse_matrix = sp.sparse.csc_matrix([[0, 0, 3], [4, 0, 0]])
+    >>> sp.sparse.save_npz('/tmp/sparse_matrix.npz', sparse_matrix)
+    >>> tmp = sp.sparse.load_npz('/tmp/sparse_matrix.npz')
+    >>> sparse_array = sp.sparse.csr_array(tmp)
+    """
+    with np.load(file, **PICKLE_KWARGS) as loaded:
+        sparse_format = loaded.get('format')
+        if sparse_format is None:
+            raise ValueError(f'The file {file} does not contain '
+                             f'a sparse array or matrix.')
+        sparse_format = sparse_format.item()
+
+        if not isinstance(sparse_format, str):
+            # Play safe with Python 2 vs 3 backward compatibility;
+            # files saved with SciPy < 1.0.0 may contain unicode or bytes.
+            sparse_format = sparse_format.decode('ascii')
+
+        if loaded.get('_is_array'):
+            sparse_type = sparse_format + '_array'
+        else:
+            sparse_type = sparse_format + '_matrix'
+
+        try:
+            cls = getattr(sp.sparse, f'{sparse_type}')
+        except AttributeError as e:
+            raise ValueError(f'Unknown format "{sparse_type}"') from e
+
+        if sparse_format in ('csc', 'csr', 'bsr'):
+            return cls((loaded['data'], loaded['indices'], loaded['indptr']),
+                       shape=loaded['shape'])
+        elif sparse_format == 'dia':
+            return cls((loaded['data'], loaded['offsets']),
+                       shape=loaded['shape'])
+        elif sparse_format == 'coo':
+            return cls((loaded['data'], (loaded['row'], loaded['col'])),
+                       shape=loaded['shape'])
+        else:
+            raise NotImplementedError(f'Load is not implemented for '
+                                      f'sparse matrix of format {sparse_format}.')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_spfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_spfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..8e9b0abcede6387e74538baf839a303c6cc1b6be
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_spfuncs.py
@@ -0,0 +1,76 @@
+""" Functions that operate on sparse matrices
+"""
+
+__all__ = ['count_blocks','estimate_blocksize']
+
+from ._base import issparse
+from ._csr import csr_array
+from ._sparsetools import csr_count_blocks
+
+
+def estimate_blocksize(A,efficiency=0.7):
+    """Attempt to determine the blocksize of a sparse matrix
+
+    Returns a blocksize=(r,c) such that
+        - A.nnz / A.tobsr( (r,c) ).nnz > efficiency
+    """
+    if not (issparse(A) and A.format in ("csc", "csr")):
+        A = csr_array(A)
+
+    if A.nnz == 0:
+        return (1,1)
+
+    if not 0 < efficiency < 1.0:
+        raise ValueError('efficiency must satisfy 0.0 < efficiency < 1.0')
+
+    high_efficiency = (1.0 + efficiency) / 2.0
+    nnz = float(A.nnz)
+    M,N = A.shape
+
+    if M % 2 == 0 and N % 2 == 0:
+        e22 = nnz / (4 * count_blocks(A,(2,2)))
+    else:
+        e22 = 0.0
+
+    if M % 3 == 0 and N % 3 == 0:
+        e33 = nnz / (9 * count_blocks(A,(3,3)))
+    else:
+        e33 = 0.0
+
+    if e22 > high_efficiency and e33 > high_efficiency:
+        e66 = nnz / (36 * count_blocks(A,(6,6)))
+        if e66 > efficiency:
+            return (6,6)
+        else:
+            return (3,3)
+    else:
+        if M % 4 == 0 and N % 4 == 0:
+            e44 = nnz / (16 * count_blocks(A,(4,4)))
+        else:
+            e44 = 0.0
+
+        if e44 > efficiency:
+            return (4,4)
+        elif e33 > efficiency:
+            return (3,3)
+        elif e22 > efficiency:
+            return (2,2)
+        else:
+            return (1,1)
+
+
+def count_blocks(A,blocksize):
+    """For a given blocksize=(r,c) count the number of occupied
+    blocks in a sparse matrix A
+    """
+    r,c = blocksize
+    if r < 1 or c < 1:
+        raise ValueError('r and c must be positive')
+
+    if issparse(A):
+        if A.format == "csr":
+            M,N = A.shape
+            return csr_count_blocks(M,N,r,c,A.indptr,A.indices)
+        elif A.format == "csc":
+            return count_blocks(A.T,(c,r))
+    return count_blocks(csr_array(A),blocksize)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_sputils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_sputils.py
new file mode 100644
index 0000000000000000000000000000000000000000..4fb5b5fc6c2e37d0c61dd3a3aa0aa382c7486a03
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/_sputils.py
@@ -0,0 +1,617 @@
+""" Utility functions for sparse matrix module
+"""
+
+import sys
+from typing import Any, Literal, Union
+import operator
+import numpy as np
+from math import prod
+import scipy.sparse as sp
+from scipy._lib._util import np_long, np_ulong
+
+
+__all__ = ['upcast', 'getdtype', 'getdata', 'isscalarlike', 'isintlike',
+           'isshape', 'issequence', 'isdense', 'ismatrix', 'get_sum_dtype',
+           'broadcast_shapes']
+
+supported_dtypes = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc,
+                    np.uintc, np_long, np_ulong, np.longlong, np.ulonglong,
+                    np.float32, np.float64, np.longdouble,
+                    np.complex64, np.complex128, np.clongdouble]
+
+_upcast_memo = {}
+
+
+def upcast(*args):
+    """Returns the nearest supported sparse dtype for the
+    combination of one or more types.
+
+    upcast(t0, t1, ..., tn) -> T  where T is a supported dtype
+
+    Examples
+    --------
+    >>> from scipy.sparse._sputils import upcast
+    >>> upcast('int32')
+    
+    >>> upcast('bool')
+    
+    >>> upcast('int32','float32')
+    
+    >>> upcast('bool',complex,float)
+    
+
+    """
+
+    t = _upcast_memo.get(hash(args))
+    if t is not None:
+        return t
+
+    upcast = np.result_type(*args)
+
+    for t in supported_dtypes:
+        if np.can_cast(upcast, t):
+            _upcast_memo[hash(args)] = t
+            return t
+
+    raise TypeError(f'no supported conversion for types: {args!r}')
+
+
+def upcast_char(*args):
+    """Same as `upcast` but taking dtype.char as input (faster)."""
+    t = _upcast_memo.get(args)
+    if t is not None:
+        return t
+    t = upcast(*map(np.dtype, args))
+    _upcast_memo[args] = t
+    return t
+
+
+def upcast_scalar(dtype, scalar):
+    """Determine data type for binary operation between an array of
+    type `dtype` and a scalar.
+    """
+    return (np.array([0], dtype=dtype) * scalar).dtype
+
+
+def downcast_intp_index(arr):
+    """
+    Down-cast index array to np.intp dtype if it is of a larger dtype.
+
+    Raise an error if the array contains a value that is too large for
+    intp.
+    """
+    if arr.dtype.itemsize > np.dtype(np.intp).itemsize:
+        if arr.size == 0:
+            return arr.astype(np.intp)
+        maxval = arr.max()
+        minval = arr.min()
+        if maxval > np.iinfo(np.intp).max or minval < np.iinfo(np.intp).min:
+            raise ValueError("Cannot deal with arrays with indices larger "
+                             "than the machine maximum address size "
+                             "(e.g. 64-bit indices on 32-bit machine).")
+        return arr.astype(np.intp)
+    return arr
+
+
+def to_native(A):
+    """
+    Ensure that the data type of the NumPy array `A` has native byte order.
+
+    `A` must be a NumPy array.  If the data type of `A` does not have native
+    byte order, a copy of `A` with a native byte order is returned. Otherwise
+    `A` is returned.
+    """
+    dt = A.dtype
+    if dt.isnative:
+        # Don't call `asarray()` if A is already native, to avoid unnecessarily
+        # creating a view of the input array.
+        return A
+    return np.asarray(A, dtype=dt.newbyteorder('native'))
+
+
+def getdtype(dtype, a=None, default=None):
+    """Form a supported numpy dtype based on input arguments.
+
+    Returns a valid ``numpy.dtype`` from `dtype` if not None,
+    or else ``a.dtype`` if possible, or else the given `default`
+    if not None, or else raise a ``TypeError``.
+
+    The resulting ``dtype`` must be in ``supported_dtypes``:
+        bool_, int8, uint8, int16, uint16, int32, uint32,
+        int64, uint64, longlong, ulonglong, float32, float64,
+        longdouble, complex64, complex128, clongdouble
+    """
+    if dtype is None:
+        try:
+            newdtype = a.dtype
+        except AttributeError as e:
+            if default is not None:
+                newdtype = np.dtype(default)
+            else:
+                raise TypeError("could not interpret data type") from e
+    else:
+        newdtype = np.dtype(dtype)
+
+    if newdtype not in supported_dtypes:
+        supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes)
+        raise ValueError(f"scipy.sparse does not support dtype {newdtype.name}. "
+                         f"The only supported types are: {supported_dtypes_fmt}.")
+    return newdtype
+
+
+def getdata(obj, dtype=None, copy=False) -> np.ndarray:
+    """
+    This is a wrapper of `np.array(obj, dtype=dtype, copy=copy)`
+    that will generate a warning if the result is an object array.
+    """
+    data = np.array(obj, dtype=dtype, copy=copy)
+    # Defer to getdtype for checking that the dtype is OK.
+    # This is called for the validation only; we don't need the return value.
+    getdtype(data.dtype)
+    return data
+
+
+def safely_cast_index_arrays(A, idx_dtype=np.int32, msg=""):
+    """Safely cast sparse array indices to `idx_dtype`.
+
+    Check the shape of `A` to determine if it is safe to cast its index
+    arrays to dtype `idx_dtype`. If any dimension in shape is larger than
+    fits in the dtype, casting is unsafe so raise ``ValueError``.
+    If safe, cast the index arrays to `idx_dtype` and return the result
+    without changing the input `A`. The caller can assign results to `A`
+    attributes if desired or use the recast index arrays directly.
+
+    Unless downcasting is needed, the original index arrays are returned.
+    You can test e.g. ``A.indptr is new_indptr`` to see if downcasting occurred.
+
+    .. versionadded:: 1.15.0
+
+    Parameters
+    ----------
+    A : sparse array or matrix
+        The array for which index arrays should be downcast.
+    idx_dtype : dtype
+        Desired dtype. Should be an integer dtype (default: ``np.int32``).
+        Most of scipy.sparse uses either int64 or int32.
+    msg : string, optional
+        A string to be added to the end of the ValueError message
+        if the array shape is too big to fit in `idx_dtype`.
+        The error message is ``f" values too large for {msg}"``
+        It should indicate why the downcasting is needed, e.g. "SuperLU",
+        and defaults to f"dtype {idx_dtype}".
+
+    Returns
+    -------
+    idx_arrays : ndarray or tuple of ndarrays
+        Based on ``A.format``, index arrays are returned after casting to `idx_dtype`.
+        For CSC/CSR, returns ``(indices, indptr)``.
+        For COO, returns ``coords``.
+        For DIA, returns ``offsets``.
+        For BSR, returns ``(indices, indptr)``.
+
+    Raises
+    ------
+    ValueError
+        If the array has shape that would not fit in the new dtype, or if
+        the sparse format does not use index arrays.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import sparse
+    >>> data = [3]
+    >>> coords = (np.array([3]), np.array([1]))  # Note: int64 arrays
+    >>> A = sparse.coo_array((data, coords))
+    >>> A.coords[0].dtype
+    dtype('int64')
+
+    >>> # rescast after construction, raising exception if shape too big
+    >>> coords = sparse.safely_cast_index_arrays(A, np.int32)
+    >>> A.coords[0] is coords[0]  # False if casting is needed
+    False
+    >>> A.coords = coords  # set the index dtype of A
+    >>> A.coords[0].dtype
+    dtype('int32')
+    """
+    if not msg:
+        msg = f"dtype {idx_dtype}"
+    # check for safe downcasting
+    max_value = np.iinfo(idx_dtype).max
+
+    if A.format in ("csc", "csr"):
+        # indptr[-1] is max b/c indptr always sorted
+        if A.indptr[-1] > max_value:
+            raise ValueError(f"indptr values too large for {msg}")
+
+        # check shape vs dtype
+        if max(*A.shape) > max_value:
+            if (A.indices > max_value).any():
+                raise ValueError(f"indices values too large for {msg}")
+
+        indices = A.indices.astype(idx_dtype, copy=False)
+        indptr = A.indptr.astype(idx_dtype, copy=False)
+        return indices, indptr
+
+    elif A.format == "coo":
+        if max(*A.shape) > max_value:
+            if any((co > max_value).any() for co in A.coords):
+                raise ValueError(f"coords values too large for {msg}")
+        return tuple(co.astype(idx_dtype, copy=False) for co in A.coords)
+
+    elif A.format == "dia":
+        if max(*A.shape) > max_value:
+            if (A.offsets > max_value).any():
+                raise ValueError(f"offsets values too large for {msg}")
+        offsets = A.offsets.astype(idx_dtype, copy=False)
+        return offsets
+
+    elif A.format == 'bsr':
+        R, C = A.blocksize
+        if A.indptr[-1] * R > max_value:
+            raise ValueError("indptr values too large for {msg}")
+        if max(*A.shape) > max_value:
+            if (A.indices * C > max_value).any():
+                raise ValueError(f"indices values too large for {msg}")
+        indices = A.indices.astype(idx_dtype, copy=False)
+        indptr = A.indptr.astype(idx_dtype, copy=False)
+        return indices, indptr
+
+    else:
+        raise TypeError(f'Format {A.format} is not associated with index arrays. '
+                        'DOK and LIL have dict and list, not array.')
+
+
+def get_index_dtype(arrays=(), maxval=None, check_contents=False):
+    """
+    Based on input (integer) arrays `a`, determine a suitable index data
+    type that can hold the data in the arrays.
+
+    Parameters
+    ----------
+    arrays : tuple of array_like
+        Input arrays whose types/contents to check
+    maxval : float, optional
+        Maximum value needed
+    check_contents : bool, optional
+        Whether to check the values in the arrays and not just their types.
+        Default: False (check only the types)
+
+    Returns
+    -------
+    dtype : dtype
+        Suitable index data type (int32 or int64)
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy import sparse
+    >>> # select index dtype based on shape
+    >>> shape = (3, 3)
+    >>> idx_dtype = sparse.get_index_dtype(maxval=max(shape))
+    >>> data = [1.1, 3.0, 1.5]
+    >>> indices = np.array([0, 1, 0], dtype=idx_dtype)
+    >>> indptr = np.array([0, 2, 3, 3], dtype=idx_dtype)
+    >>> A = sparse.csr_array((data, indices, indptr), shape=shape)
+    >>> A.indptr.dtype
+    dtype('int32')
+
+    >>> # select based on larger of existing arrays and shape
+    >>> shape = (3, 3)
+    >>> idx_dtype = sparse.get_index_dtype(A.indptr, maxval=max(shape))
+    >>> idx_dtype
+    
+    """
+    # not using intc directly due to misinteractions with pythran
+    if np.intc().itemsize != 4:
+        return np.int64
+
+    int32min = np.int32(np.iinfo(np.int32).min)
+    int32max = np.int32(np.iinfo(np.int32).max)
+
+    if maxval is not None:
+        maxval = np.int64(maxval)
+        if maxval > int32max:
+            return np.int64
+
+    if isinstance(arrays, np.ndarray):
+        arrays = (arrays,)
+
+    for arr in arrays:
+        arr = np.asarray(arr)
+        if not np.can_cast(arr.dtype, np.int32):
+            if check_contents:
+                if arr.size == 0:
+                    # a bigger type not needed
+                    continue
+                elif np.issubdtype(arr.dtype, np.integer):
+                    maxval = arr.max()
+                    minval = arr.min()
+                    if minval >= int32min and maxval <= int32max:
+                        # a bigger type not needed
+                        continue
+            return np.int64
+    return np.int32
+
+
+def get_sum_dtype(dtype: np.dtype) -> np.dtype:
+    """Mimic numpy's casting for np.sum"""
+    if dtype.kind == 'u' and np.can_cast(dtype, np.uint):
+        return np.uint
+    if np.can_cast(dtype, np.int_):
+        return np.int_
+    return dtype
+
+
+def isscalarlike(x) -> bool:
+    """Is x either a scalar, an array scalar, or a 0-dim array?"""
+    return np.isscalar(x) or (isdense(x) and x.ndim == 0)
+
+
+def isintlike(x) -> bool:
+    """Is x appropriate as an index into a sparse matrix? Returns True
+    if it can be cast safely to a machine int.
+    """
+    # Fast-path check to eliminate non-scalar values. operator.index would
+    # catch this case too, but the exception catching is slow.
+    if np.ndim(x) != 0:
+        return False
+    try:
+        operator.index(x)
+    except (TypeError, ValueError):
+        try:
+            loose_int = bool(int(x) == x)
+        except (TypeError, ValueError):
+            return False
+        if loose_int:
+            msg = "Inexact indices into sparse matrices are not allowed"
+            raise ValueError(msg)
+        return loose_int
+    return True
+
+
+def isshape(x, nonneg=False, *, allow_nd=(2,)) -> bool:
+    """Is x a valid tuple of dimensions?
+
+    If nonneg, also checks that the dimensions are non-negative.
+    Shapes of length in the tuple allow_nd are allowed.
+    """
+    ndim = len(x)
+    if ndim not in allow_nd:
+        return False
+
+    for d in x:
+        if not isintlike(d):
+            return False
+        if nonneg and d < 0:
+            return False
+    return True
+
+
+def issequence(t) -> bool:
+    return ((isinstance(t, list | tuple) and
+            (len(t) == 0 or np.isscalar(t[0]))) or
+            (isinstance(t, np.ndarray) and (t.ndim == 1)))
+
+
+def ismatrix(t) -> bool:
+    return ((isinstance(t, list | tuple) and
+             len(t) > 0 and issequence(t[0])) or
+            (isinstance(t, np.ndarray) and t.ndim == 2))
+
+
+def isdense(x) -> bool:
+    return isinstance(x, np.ndarray)
+
+
+def validateaxis(axis) -> None:
+    if axis is None:
+        return
+    axis_type = type(axis)
+
+    # In NumPy, you can pass in tuples for 'axis', but they are
+    # not very useful for sparse matrices given their limited
+    # dimensions, so let's make it explicit that they are not
+    # allowed to be passed in
+    if isinstance(axis, tuple):
+        raise TypeError("Tuples are not accepted for the 'axis' parameter. "
+                        "Please pass in one of the following: "
+                        "{-2, -1, 0, 1, None}.")
+
+    # If not a tuple, check that the provided axis is actually
+    # an integer and raise a TypeError similar to NumPy's
+    if not np.issubdtype(np.dtype(axis_type), np.integer):
+        raise TypeError(f"axis must be an integer, not {axis_type.__name__}")
+
+    if not (-2 <= axis <= 1):
+        raise ValueError("axis out of range")
+
+
+def check_shape(args, current_shape=None, *, allow_nd=(2,)) -> tuple[int, ...]:
+    """Imitate numpy.matrix handling of shape arguments
+
+    Parameters
+    ----------
+    args : array_like
+        Data structures providing information about the shape of the sparse array.
+    current_shape : tuple, optional
+        The current shape of the sparse array or matrix.
+        If None (default), the current shape will be inferred from args.
+    allow_nd : tuple of ints, optional default: (2,)
+        If shape does not have a length in the tuple allow_nd an error is raised.
+
+    Returns
+    -------
+    new_shape: tuple
+        The new shape after validation.
+    """
+    if len(args) == 0:
+        raise TypeError("function missing 1 required positional argument: 'shape'")
+    if len(args) == 1:
+        try:
+            shape_iter = iter(args[0])
+        except TypeError:
+            new_shape = (operator.index(args[0]), )
+        else:
+            new_shape = tuple(operator.index(arg) for arg in shape_iter)
+    else:
+        new_shape = tuple(operator.index(arg) for arg in args)
+
+    if current_shape is None:
+        if len(new_shape) not in allow_nd:
+            raise ValueError(f'shape must have length in {allow_nd}. Got {new_shape=}')
+        if any(d < 0 for d in new_shape):
+            raise ValueError("'shape' elements cannot be negative")
+    else:
+        # Check the current size only if needed
+        current_size = prod(current_shape)
+
+        # Check for negatives
+        negative_indexes = [i for i, x in enumerate(new_shape) if x < 0]
+        if not negative_indexes:
+            new_size = prod(new_shape)
+            if new_size != current_size:
+                raise ValueError(f'cannot reshape array of size {current_size}'
+                                 f' into shape {new_shape}')
+        elif len(negative_indexes) == 1:
+            skip = negative_indexes[0]
+            specified = prod(new_shape[:skip] + new_shape[skip+1:])
+            unspecified, remainder = divmod(current_size, specified)
+            if remainder != 0:
+                err_shape = tuple('newshape' if x < 0 else x for x in new_shape)
+                raise ValueError(f'cannot reshape array of size {current_size}'
+                                 f' into shape {err_shape}')
+            new_shape = new_shape[:skip] + (unspecified,) + new_shape[skip+1:]
+        else:
+            raise ValueError('can only specify one unknown dimension')
+
+    if len(new_shape) not in allow_nd:
+        raise ValueError(f'shape must have length in {allow_nd}. Got {new_shape=}')
+
+    return new_shape
+
+
+def broadcast_shapes(*shapes):
+    """Check if shapes can be broadcast and return resulting shape
+
+    This is similar to the NumPy ``broadcast_shapes`` function but
+    does not check memory consequences of the resulting dense matrix.
+
+    Parameters
+    ----------
+    *shapes : tuple of shape tuples
+        The tuple of shapes to be considered for broadcasting.
+        Shapes should be tuples of non-negative integers.
+
+    Returns
+    -------
+    new_shape : tuple of integers
+        The shape that results from broadcasting th input shapes.
+    """
+    if not shapes:
+        return ()
+    shapes = [shp if isinstance(shp, (tuple, list)) else (shp,) for shp in shapes]
+    big_shp = max(shapes, key=len)
+    out = list(big_shp)
+    for shp in shapes:
+        if shp is big_shp:
+            continue
+        for i, x in enumerate(shp, start=-len(shp)):
+            if x != 1 and x != out[i]:
+                if out[i] != 1:
+                    raise ValueError("shapes cannot be broadcast to a single shape.")
+                out[i] = x
+    return (*out,)
+
+
+def check_reshape_kwargs(kwargs):
+    """Unpack keyword arguments for reshape function.
+
+    This is useful because keyword arguments after star arguments are not
+    allowed in Python 2, but star keyword arguments are. This function unpacks
+    'order' and 'copy' from the star keyword arguments (with defaults) and
+    throws an error for any remaining.
+    """
+
+    order = kwargs.pop('order', 'C')
+    copy = kwargs.pop('copy', False)
+    if kwargs:  # Some unused kwargs remain
+        raise TypeError("reshape() got unexpected keywords arguments: "
+                        f"{', '.join(kwargs.keys())}")
+    return order, copy
+
+
+def is_pydata_spmatrix(m) -> bool:
+    """
+    Check whether object is pydata/sparse matrix, avoiding importing the module.
+    """
+    base_cls = getattr(sys.modules.get('sparse'), 'SparseArray', None)
+    return base_cls is not None and isinstance(m, base_cls)
+
+
+def convert_pydata_sparse_to_scipy(
+    arg: Any,
+    target_format: None | Literal["csc", "csr"] = None,
+    accept_fv: Any = None,
+) -> Union[Any, "sp.spmatrix"]:
+    """
+    Convert a pydata/sparse array to scipy sparse matrix,
+    pass through anything else.
+    """
+    if is_pydata_spmatrix(arg):
+        # The `accept_fv` keyword is new in PyData Sparse 0.15.4 (May 2024),
+        # remove the `except` once the minimum supported version is >=0.15.4
+        try:
+            arg = arg.to_scipy_sparse(accept_fv=accept_fv)
+        except TypeError:
+            arg = arg.to_scipy_sparse()
+        if target_format is not None:
+            arg = arg.asformat(target_format)
+        elif arg.format not in ("csc", "csr"):
+            arg = arg.tocsc()
+    return arg
+
+
+###############################################################################
+# Wrappers for NumPy types that are deprecated
+
+# Numpy versions of these functions raise deprecation warnings, the
+# ones below do not.
+
+def matrix(*args, **kwargs):
+    return np.array(*args, **kwargs).view(np.matrix)
+
+
+def asmatrix(data, dtype=None):
+    if isinstance(data, np.matrix) and (dtype is None or data.dtype == dtype):
+        return data
+    return np.asarray(data, dtype=dtype).view(np.matrix)
+
+###############################################################################
+
+
+def _todata(s) -> np.ndarray:
+    """Access nonzero values, possibly after summing duplicates.
+
+    Parameters
+    ----------
+    s : sparse array
+        Input sparse array.
+
+    Returns
+    -------
+    data: ndarray
+      Nonzero values of the array, with shape (s.nnz,)
+
+    """
+    if isinstance(s, sp._data._data_matrix):
+        return s._deduped_data()
+
+    if isinstance(s, sp.dok_array):
+        return np.fromiter(s.values(), dtype=s.dtype, count=s.nnz)
+
+    if isinstance(s, sp.lil_array):
+        data = np.empty(s.nnz, dtype=s.dtype)
+        sp._csparsetools.lil_flatten_to_array(s.data, data)
+        return data
+
+    return s.tocoo()._deduped_data()
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/base.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/base.py
new file mode 100644
index 0000000000000000000000000000000000000000..d0a427e4570e07cc71e9e45bf98c7cf61798125b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/base.py
@@ -0,0 +1,33 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'MAXPRINT',
+    'SparseEfficiencyWarning',
+    'SparseFormatWarning',
+    'SparseWarning',
+    'asmatrix',
+    'check_reshape_kwargs',
+    'check_shape',
+    'get_sum_dtype',
+    'isdense',
+    'isscalarlike',
+    'issparse',
+    'isspmatrix',
+    'spmatrix',
+    'validateaxis',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="base",
+                                   private_modules=["_base"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/bsr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/bsr.py
new file mode 100644
index 0000000000000000000000000000000000000000..c686301a78fc3e2221600eb06035a5cb12898cdb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/bsr.py
@@ -0,0 +1,36 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'bsr_matmat',
+    'bsr_matrix',
+    'bsr_matvec',
+    'bsr_matvecs',
+    'bsr_sort_indices',
+    'bsr_tocsr',
+    'bsr_transpose',
+    'check_shape',
+    'csr_matmat_maxnnz',
+    'getdata',
+    'getdtype',
+    'isshape',
+    'isspmatrix_bsr',
+    'spmatrix',
+    'to_native',
+    'upcast',
+    'warn',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="bsr",
+                                   private_modules=["_bsr"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/compressed.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/compressed.py
new file mode 100644
index 0000000000000000000000000000000000000000..e6dc8a73e5ab527cfe0b73d558dae25047cfb98b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/compressed.py
@@ -0,0 +1,43 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'IndexMixin',
+    'SparseEfficiencyWarning',
+    'check_shape',
+    'csr_column_index1',
+    'csr_column_index2',
+    'csr_row_index',
+    'csr_row_slice',
+    'csr_sample_offsets',
+    'csr_sample_values',
+    'csr_todense',
+    'downcast_intp_index',
+    'get_csr_submatrix',
+    'get_sum_dtype',
+    'getdtype',
+    'is_pydata_spmatrix',
+    'isdense',
+    'isintlike',
+    'isscalarlike',
+    'isshape',
+    'operator',
+    'to_native',
+    'upcast',
+    'upcast_char',
+    'warn',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="compressed",
+                                   private_modules=["_compressed"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/construct.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/construct.py
new file mode 100644
index 0000000000000000000000000000000000000000..c3d34d2fd38887877980727bceaaa215129bf283
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/construct.py
@@ -0,0 +1,44 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'block_diag',
+    'bmat',
+    'bsr_matrix',
+    'check_random_state',
+    'coo_matrix',
+    'csc_matrix',
+    'csr_hstack',
+    'csr_matrix',
+    'dia_matrix',
+    'diags',
+    'eye',
+    'get_index_dtype',
+    'hstack',
+    'identity',
+    'isscalarlike',
+    'issparse',
+    'kron',
+    'kronsum',
+    'numbers',
+    'rand',
+    'random',
+    'rng_integers',
+    'spdiags',
+    'upcast',
+    'vstack',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="construct",
+                                   private_modules=["_construct"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/coo.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/coo.py
new file mode 100644
index 0000000000000000000000000000000000000000..bda2da3d09a676ab79739331a21ba26102bb90ae
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/coo.py
@@ -0,0 +1,37 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'SparseEfficiencyWarning',
+    'check_reshape_kwargs',
+    'check_shape',
+    'coo_matrix',
+    'coo_matvec',
+    'coo_tocsr',
+    'coo_todense',
+    'downcast_intp_index',
+    'getdata',
+    'getdtype',
+    'isshape',
+    'isspmatrix_coo',
+    'operator',
+    'spmatrix',
+    'to_native',
+    'upcast',
+    'upcast_char',
+    'warn',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="coo",
+                                   private_modules=["_coo"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csc.py
new file mode 100644
index 0000000000000000000000000000000000000000..d140b841e0724155f8602a4215836e2c8a7fad72
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csc.py
@@ -0,0 +1,25 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'csc_matrix',
+    'csc_tocsr',
+    'expandptr',
+    'isspmatrix_csc',
+    'spmatrix',
+    'upcast',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="csc",
+                                   private_modules=["_csc"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csr.py
new file mode 100644
index 0000000000000000000000000000000000000000..86bb1e072ebe4480e9dcb01f2d36f7387872b898
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/csr.py
@@ -0,0 +1,27 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'csr_count_blocks',
+    'csr_matrix',
+    'csr_tobsr',
+    'csr_tocsc',
+    'get_csr_submatrix',
+    'isspmatrix_csr',
+    'spmatrix',
+    'upcast',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="csr",
+                                   private_modules=["_csr"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/data.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/data.py
new file mode 100644
index 0000000000000000000000000000000000000000..a9958bcda6dd35ac0779514d79b7f1c494c1b01a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/data.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'isscalarlike',
+    'name',
+    'npfunc',
+    'validateaxis',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="data",
+                                   private_modules=["_data"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dia.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dia.py
new file mode 100644
index 0000000000000000000000000000000000000000..f79abd39f114b23df8ceb6eafb7fcc1c07218dcb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dia.py
@@ -0,0 +1,29 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'check_shape',
+    'dia_matrix',
+    'dia_matvec',
+    'get_sum_dtype',
+    'getdtype',
+    'isshape',
+    'isspmatrix_dia',
+    'spmatrix',
+    'upcast_char',
+    'validateaxis',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="dia",
+                                   private_modules=["_dia"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dok.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dok.py
new file mode 100644
index 0000000000000000000000000000000000000000..847824456eaa3145d5ecb078e30251875168775b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/dok.py
@@ -0,0 +1,32 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'IndexMixin',
+    'check_shape',
+    'dok_matrix',
+    'getdtype',
+    'isdense',
+    'isintlike',
+    'isscalarlike',
+    'isshape',
+    'isspmatrix_dok',
+    'itertools',
+    'spmatrix',
+    'upcast',
+    'upcast_scalar',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="dok",
+                                   private_modules=["_dok"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/extract.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/extract.py
new file mode 100644
index 0000000000000000000000000000000000000000..be5e161b6f99e57e2b2a6b3d4f1ef6427c07658d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/extract.py
@@ -0,0 +1,23 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'coo_matrix',
+    'find',
+    'tril',
+    'triu',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="extract",
+                                   private_modules=["_extract"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/lil.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/lil.py
new file mode 100644
index 0000000000000000000000000000000000000000..5f7bf8eb03bb36a1b2fa77c5fc0840e532ab64fd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/lil.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'isspmatrix_lil',
+    'lil_array',
+    'lil_matrix',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="lil",
+                                   private_modules=["_lil"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..ae19314d48b3689a556b2a795689a3a1b75458da
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__init__.py
@@ -0,0 +1,148 @@
+"""
+Sparse linear algebra (:mod:`scipy.sparse.linalg`)
+==================================================
+
+.. currentmodule:: scipy.sparse.linalg
+
+Abstract linear operators
+-------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   LinearOperator -- abstract representation of a linear operator
+   aslinearoperator -- convert an object to an abstract linear operator
+
+Matrix Operations
+-----------------
+
+.. autosummary::
+   :toctree: generated/
+
+   inv -- compute the sparse matrix inverse
+   expm -- compute the sparse matrix exponential
+   expm_multiply -- compute the product of a matrix exponential and a matrix
+   matrix_power -- compute the matrix power by raising a matrix to an exponent
+
+Matrix norms
+------------
+
+.. autosummary::
+   :toctree: generated/
+
+   norm -- Norm of a sparse matrix
+   onenormest -- Estimate the 1-norm of a sparse matrix
+
+Solving linear problems
+-----------------------
+
+Direct methods for linear equation systems:
+
+.. autosummary::
+   :toctree: generated/
+
+   spsolve -- Solve the sparse linear system Ax=b
+   spsolve_triangular -- Solve sparse linear system Ax=b for a triangular A.
+   is_sptriangular -- Check if sparse A is triangular.
+   spbandwidth -- Find the bandwidth of a sparse matrix.
+   factorized -- Pre-factorize matrix to a function solving a linear system
+   MatrixRankWarning -- Warning on exactly singular matrices
+   use_solver -- Select direct solver to use
+
+Iterative methods for linear equation systems:
+
+.. autosummary::
+   :toctree: generated/
+
+   bicg -- Use BIConjugate Gradient iteration to solve Ax = b
+   bicgstab -- Use BIConjugate Gradient STABilized iteration to solve Ax = b
+   cg -- Use Conjugate Gradient iteration to solve Ax = b
+   cgs -- Use Conjugate Gradient Squared iteration to solve Ax = b
+   gmres -- Use Generalized Minimal RESidual iteration to solve Ax = b
+   lgmres -- Solve a matrix equation using the LGMRES algorithm
+   minres -- Use MINimum RESidual iteration to solve Ax = b
+   qmr -- Use Quasi-Minimal Residual iteration to solve Ax = b
+   gcrotmk -- Solve a matrix equation using the GCROT(m,k) algorithm
+   tfqmr -- Use Transpose-Free Quasi-Minimal Residual iteration to solve Ax = b
+
+Iterative methods for least-squares problems:
+
+.. autosummary::
+   :toctree: generated/
+
+   lsqr -- Find the least-squares solution to a sparse linear equation system
+   lsmr -- Find the least-squares solution to a sparse linear equation system
+
+Matrix factorizations
+---------------------
+
+Eigenvalue problems:
+
+.. autosummary::
+   :toctree: generated/
+
+   eigs -- Find k eigenvalues and eigenvectors of the square matrix A
+   eigsh -- Find k eigenvalues and eigenvectors of a symmetric matrix
+   lobpcg -- Solve symmetric partial eigenproblems with optional preconditioning
+
+Singular values problems:
+
+.. autosummary::
+   :toctree: generated/
+
+   svds -- Compute k singular values/vectors for a sparse matrix
+
+The `svds` function supports the following solvers:
+
+.. toctree::
+
+    sparse.linalg.svds-arpack
+    sparse.linalg.svds-lobpcg
+    sparse.linalg.svds-propack
+
+Complete or incomplete LU factorizations
+
+.. autosummary::
+   :toctree: generated/
+
+   splu -- Compute a LU decomposition for a sparse matrix
+   spilu -- Compute an incomplete LU decomposition for a sparse matrix
+   SuperLU -- Object representing an LU factorization
+
+Sparse arrays with structure
+----------------------------
+
+.. autosummary::
+   :toctree: generated/
+
+   LaplacianNd -- Laplacian on a uniform rectangular grid in ``N`` dimensions
+
+Exceptions
+----------
+
+.. autosummary::
+   :toctree: generated/
+
+   ArpackNoConvergence
+   ArpackError
+
+"""
+
+from ._isolve import *
+from ._dsolve import *
+from ._interface import *
+from ._eigen import *
+from ._matfuncs import *
+from ._onenormest import *
+from ._norm import *
+from ._expm_multiply import *
+from ._special_sparse_arrays import *
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import isolve, dsolve, interface, eigen, matfuncs
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6dde92f9aed7861fcb6bdb247d2db359e7e64d22
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_expm_multiply.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_expm_multiply.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c7490b719d942bf72f26d80559e2b25f1a4138e5
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_expm_multiply.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_interface.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_interface.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2e30409a5c6012f3cf4871ae24da82a1e6d09b6a
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_interface.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_matfuncs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_matfuncs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c002f8650eb98334e4edd2408e8fda4be77a3461
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_matfuncs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_norm.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_norm.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3d51eb3600d548797a02a235f8851b71b4c36f43
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_norm.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_onenormest.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_onenormest.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e9e5cb53f0d6511e946dc79ae2cdf0abaafcc698
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_onenormest.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_special_sparse_arrays.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_special_sparse_arrays.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..79deee50a1d3687a7a51be3e2c308a5a46edc743
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_special_sparse_arrays.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_svdp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_svdp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4fa39a913fe85bb68f69869d81e58ab0e4ac6618
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/_svdp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/dsolve.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/dsolve.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1fd3dd463b5e02314da9cc44a14c4be7c7744192
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/dsolve.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/eigen.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/eigen.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..609c6c2099bcae70eedcdb859c014c7c4d470a16
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/eigen.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/interface.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/interface.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c160fda8bccf3d6a635b76e88fd63f26e1b62d76
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/interface.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/isolve.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/isolve.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cf1bb450be5e4f843daff1986d64b67b187f87f6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/isolve.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/matfuncs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/matfuncs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..95a535e7dbfe5cc628ed735a052518a10fc81e8f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/__pycache__/matfuncs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..90005e3af863d2f7913e6fc4ea8de85962a3efdf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__init__.py
@@ -0,0 +1,71 @@
+"""
+Linear Solvers
+==============
+
+The default solver is SuperLU (included in the scipy distribution),
+which can solve real or complex linear systems in both single and
+double precisions.  It is automatically replaced by UMFPACK, if
+available.  Note that UMFPACK works in double precision only, so
+switch it off by::
+
+    >>> from scipy.sparse.linalg import spsolve, use_solver
+    >>> use_solver(useUmfpack=False)
+
+to solve in the single precision. See also use_solver documentation.
+
+Example session::
+
+    >>> from scipy.sparse import csc_array, dia_array
+    >>> from numpy import array
+    >>>
+    >>> print("Inverting a sparse linear system:")
+    >>> print("The sparse matrix (constructed from diagonals):")
+    >>> a = dia_array(([[1, 2, 3, 4, 5], [6, 5, 8, 9, 10]], [0, 1]), shape=(5, 5))
+    >>> b = array([1, 2, 3, 4, 5])
+    >>> print("Solve: single precision complex:")
+    >>> use_solver( useUmfpack = False )
+    >>> a = a.astype('F')
+    >>> x = spsolve(a, b)
+    >>> print(x)
+    >>> print("Error: ", a@x-b)
+    >>>
+    >>> print("Solve: double precision complex:")
+    >>> use_solver( useUmfpack = True )
+    >>> a = a.astype('D')
+    >>> x = spsolve(a, b)
+    >>> print(x)
+    >>> print("Error: ", a@x-b)
+    >>>
+    >>> print("Solve: double precision:")
+    >>> a = a.astype('d')
+    >>> x = spsolve(a, b)
+    >>> print(x)
+    >>> print("Error: ", a@x-b)
+    >>>
+    >>> print("Solve: single precision:")
+    >>> use_solver( useUmfpack = False )
+    >>> a = a.astype('f')
+    >>> x = spsolve(a, b.astype('f'))
+    >>> print(x)
+    >>> print("Error: ", a@x-b)
+
+"""
+
+#import umfpack
+#__doc__ = '\n\n'.join( (__doc__,  umfpack.__doc__) )
+#del umfpack
+
+from .linsolve import *
+from ._superlu import SuperLU
+from . import _add_newdocs
+from . import linsolve
+
+__all__ = [
+    'MatrixRankWarning', 'SuperLU', 'factorized',
+    'spilu', 'splu', 'spsolve', 'is_sptriangular',
+    'spsolve_triangular', 'use_solver', 'spbandwidth',
+]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..65e00d597ee816056fc30eb98c80ee02dddcfabe
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/_add_newdocs.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/_add_newdocs.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c74bf3ffb422d04cc26b9952f4011fea99ef861d
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/_add_newdocs.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/linsolve.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/linsolve.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f6177de10dc692f69f6a6d7c3c7334f13b8163dc
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/__pycache__/linsolve.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/_add_newdocs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/_add_newdocs.py
new file mode 100644
index 0000000000000000000000000000000000000000..cec34dca456b36a1f77e64f853fc1d821f5215eb
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/_add_newdocs.py
@@ -0,0 +1,147 @@
+from numpy.lib import add_newdoc
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU',
+    """
+    LU factorization of a sparse matrix.
+
+    Factorization is represented as::
+
+        Pr @ A @ Pc = L @ U
+
+    To construct these `SuperLU` objects, call the `splu` and `spilu`
+    functions.
+
+    Attributes
+    ----------
+    shape
+    nnz
+    perm_c
+    perm_r
+    L
+    U
+
+    Methods
+    -------
+    solve
+
+    Notes
+    -----
+
+    .. versionadded:: 0.14.0
+
+    Examples
+    --------
+    The LU decomposition can be used to solve matrix equations. Consider:
+
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import splu
+    >>> A = csc_array([[1,2,0,4], [1,0,0,1], [1,0,2,1], [2,2,1,0.]])
+
+    This can be solved for a given right-hand side:
+
+    >>> lu = splu(A)
+    >>> b = np.array([1, 2, 3, 4])
+    >>> x = lu.solve(b)
+    >>> A.dot(x)
+    array([ 1.,  2.,  3.,  4.])
+
+    The ``lu`` object also contains an explicit representation of the
+    decomposition. The permutations are represented as mappings of
+    indices:
+
+    >>> lu.perm_r
+    array([2, 1, 3, 0], dtype=int32)  # may vary
+    >>> lu.perm_c
+    array([0, 1, 3, 2], dtype=int32)  # may vary
+
+    The L and U factors are sparse matrices in CSC format:
+
+    >>> lu.L.toarray()
+    array([[ 1. ,  0. ,  0. ,  0. ],  # may vary
+           [ 0.5,  1. ,  0. ,  0. ],
+           [ 0.5, -1. ,  1. ,  0. ],
+           [ 0.5,  1. ,  0. ,  1. ]])
+    >>> lu.U.toarray()
+    array([[ 2. ,  2. ,  0. ,  1. ],  # may vary
+           [ 0. , -1. ,  1. , -0.5],
+           [ 0. ,  0. ,  5. , -1. ],
+           [ 0. ,  0. ,  0. ,  2. ]])
+
+    The permutation matrices can be constructed:
+
+    >>> Pr = csc_array((np.ones(4), (lu.perm_r, np.arange(4))))
+    >>> Pc = csc_array((np.ones(4), (np.arange(4), lu.perm_c)))
+
+    We can reassemble the original matrix:
+
+    >>> (Pr.T @ (lu.L @ lu.U) @ Pc.T).toarray()
+    array([[ 1.,  2.,  0.,  4.],
+           [ 1.,  0.,  0.,  1.],
+           [ 1.,  0.,  2.,  1.],
+           [ 2.,  2.,  1.,  0.]])
+    """)
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('solve',
+    """
+    solve(rhs[, trans])
+
+    Solves linear system of equations with one or several right-hand sides.
+
+    Parameters
+    ----------
+    rhs : ndarray, shape (n,) or (n, k)
+        Right hand side(s) of equation
+    trans : {'N', 'T', 'H'}, optional
+        Type of system to solve::
+
+            'N':   A   @ x == rhs  (default)
+            'T':   A^T @ x == rhs
+            'H':   A^H @ x == rhs
+
+        i.e., normal, transposed, and hermitian conjugate.
+
+    Returns
+    -------
+    x : ndarray, shape ``rhs.shape``
+        Solution vector(s)
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('L',
+    """
+    Lower triangular factor with unit diagonal as a
+    `scipy.sparse.csc_array`.
+
+    .. versionadded:: 0.14.0
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('U',
+    """
+    Upper triangular factor as a `scipy.sparse.csc_array`.
+
+    .. versionadded:: 0.14.0
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('shape',
+    """
+    Shape of the original matrix as a tuple of ints.
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('nnz',
+    """
+    Number of nonzero elements in the matrix.
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('perm_c',
+    """
+    Permutation Pc represented as an array of indices.
+
+    See the `SuperLU` docstring for details.
+    """))
+
+add_newdoc('scipy.sparse.linalg._dsolve._superlu', 'SuperLU', ('perm_r',
+    """
+    Permutation Pr represented as an array of indices.
+
+    See the `SuperLU` docstring for details.
+    """))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py
new file mode 100644
index 0000000000000000000000000000000000000000..192da969d89300d1c616f8f795d91ee4bf65ff8e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/linsolve.py
@@ -0,0 +1,873 @@
+from warnings import warn, catch_warnings, simplefilter
+
+import numpy as np
+from numpy import asarray
+from scipy.sparse import (issparse, SparseEfficiencyWarning,
+                          csr_array, csc_array, eye_array, diags_array)
+from scipy.sparse._sputils import (is_pydata_spmatrix, convert_pydata_sparse_to_scipy,
+                                   get_index_dtype, safely_cast_index_arrays)
+from scipy.linalg import LinAlgError
+import copy
+import threading
+
+from . import _superlu
+
+noScikit = False
+try:
+    import scikits.umfpack as umfpack
+except ImportError:
+    noScikit = True
+
+useUmfpack = threading.local()
+
+
+__all__ = ['use_solver', 'spsolve', 'splu', 'spilu', 'factorized',
+           'MatrixRankWarning', 'spsolve_triangular', 'is_sptriangular', 'spbandwidth']
+
+
+class MatrixRankWarning(UserWarning):
+    pass
+
+
+def use_solver(**kwargs):
+    """
+    Select default sparse direct solver to be used.
+
+    Parameters
+    ----------
+    useUmfpack : bool, optional
+        Use UMFPACK [1]_, [2]_, [3]_, [4]_. over SuperLU. Has effect only
+        if ``scikits.umfpack`` is installed. Default: True
+    assumeSortedIndices : bool, optional
+        Allow UMFPACK to skip the step of sorting indices for a CSR/CSC matrix.
+        Has effect only if useUmfpack is True and ``scikits.umfpack`` is
+        installed. Default: False
+
+    Notes
+    -----
+    The default sparse solver is UMFPACK when available
+    (``scikits.umfpack`` is installed). This can be changed by passing
+    useUmfpack = False, which then causes the always present SuperLU
+    based solver to be used.
+
+    UMFPACK requires a CSR/CSC matrix to have sorted column/row indices. If
+    sure that the matrix fulfills this, pass ``assumeSortedIndices=True``
+    to gain some speed.
+
+    References
+    ----------
+    .. [1] T. A. Davis, Algorithm 832:  UMFPACK - an unsymmetric-pattern
+           multifrontal method with a column pre-ordering strategy, ACM
+           Trans. on Mathematical Software, 30(2), 2004, pp. 196--199.
+           https://dl.acm.org/doi/abs/10.1145/992200.992206
+
+    .. [2] T. A. Davis, A column pre-ordering strategy for the
+           unsymmetric-pattern multifrontal method, ACM Trans.
+           on Mathematical Software, 30(2), 2004, pp. 165--195.
+           https://dl.acm.org/doi/abs/10.1145/992200.992205
+
+    .. [3] T. A. Davis and I. S. Duff, A combined unifrontal/multifrontal
+           method for unsymmetric sparse matrices, ACM Trans. on
+           Mathematical Software, 25(1), 1999, pp. 1--19.
+           https://doi.org/10.1145/305658.287640
+
+    .. [4] T. A. Davis and I. S. Duff, An unsymmetric-pattern multifrontal
+           method for sparse LU factorization, SIAM J. Matrix Analysis and
+           Computations, 18(1), 1997, pp. 140--158.
+           https://doi.org/10.1137/S0895479894246905T.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import use_solver, spsolve
+    >>> from scipy.sparse import csc_array
+    >>> R = np.random.randn(5, 5)
+    >>> A = csc_array(R)
+    >>> b = np.random.randn(5)
+    >>> use_solver(useUmfpack=False) # enforce superLU over UMFPACK
+    >>> x = spsolve(A, b)
+    >>> np.allclose(A.dot(x), b)
+    True
+    >>> use_solver(useUmfpack=True) # reset umfPack usage to default
+    """
+    global useUmfpack
+    if 'useUmfpack' in kwargs:
+        useUmfpack.u = kwargs['useUmfpack']
+    if useUmfpack.u and 'assumeSortedIndices' in kwargs:
+        umfpack.configure(assumeSortedIndices=kwargs['assumeSortedIndices'])
+
+def _get_umf_family(A):
+    """Get umfpack family string given the sparse matrix dtype."""
+    _families = {
+        (np.float64, np.int32): 'di',
+        (np.complex128, np.int32): 'zi',
+        (np.float64, np.int64): 'dl',
+        (np.complex128, np.int64): 'zl'
+    }
+
+    # A.dtype.name can only be "float64" or
+    # "complex128" in control flow
+    f_type = getattr(np, A.dtype.name)
+    # control flow may allow for more index
+    # types to get through here
+    i_type = getattr(np, A.indices.dtype.name)
+
+    try:
+        family = _families[(f_type, i_type)]
+
+    except KeyError as e:
+        msg = ('only float64 or complex128 matrices with int32 or int64 '
+               f'indices are supported! (got: matrix: {f_type}, indices: {i_type})')
+        raise ValueError(msg) from e
+
+    # See gh-8278. Considered converting only if
+    # A.shape[0]*A.shape[1] > np.iinfo(np.int32).max,
+    # but that didn't always fix the issue.
+    family = family[0] + "l"
+    A_new = copy.copy(A)
+    A_new.indptr = np.asarray(A.indptr, dtype=np.int64)
+    A_new.indices = np.asarray(A.indices, dtype=np.int64)
+
+    return family, A_new
+
+def spsolve(A, b, permc_spec=None, use_umfpack=True):
+    """Solve the sparse linear system Ax=b, where b may be a vector or a matrix.
+
+    Parameters
+    ----------
+    A : ndarray or sparse array or matrix
+        The square matrix A will be converted into CSC or CSR form
+    b : ndarray or sparse array or matrix
+        The matrix or vector representing the right hand side of the equation.
+        If a vector, b.shape must be (n,) or (n, 1).
+    permc_spec : str, optional
+        How to permute the columns of the matrix for sparsity preservation.
+        (default: 'COLAMD')
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering [1]_, [2]_.
+
+    use_umfpack : bool, optional
+        if True (default) then use UMFPACK for the solution [3]_, [4]_, [5]_,
+        [6]_ . This is only referenced if b is a vector and
+        ``scikits.umfpack`` is installed.
+
+    Returns
+    -------
+    x : ndarray or sparse array or matrix
+        the solution of the sparse linear equation.
+        If b is a vector, then x is a vector of size A.shape[1]
+        If b is a matrix, then x is a matrix of size (A.shape[1], b.shape[1])
+
+    Notes
+    -----
+    For solving the matrix expression AX = B, this solver assumes the resulting
+    matrix X is sparse, as is often the case for very sparse inputs.  If the
+    resulting X is dense, the construction of this sparse result will be
+    relatively expensive.  In that case, consider converting A to a dense
+    matrix and using scipy.linalg.solve or its variants.
+
+    References
+    ----------
+    .. [1] T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, Algorithm 836:
+           COLAMD, an approximate column minimum degree ordering algorithm,
+           ACM Trans. on Mathematical Software, 30(3), 2004, pp. 377--380.
+           :doi:`10.1145/1024074.1024080`
+
+    .. [2] T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, A column approximate
+           minimum degree ordering algorithm, ACM Trans. on Mathematical
+           Software, 30(3), 2004, pp. 353--376. :doi:`10.1145/1024074.1024079`
+
+    .. [3] T. A. Davis, Algorithm 832:  UMFPACK - an unsymmetric-pattern
+           multifrontal method with a column pre-ordering strategy, ACM
+           Trans. on Mathematical Software, 30(2), 2004, pp. 196--199.
+           https://dl.acm.org/doi/abs/10.1145/992200.992206
+
+    .. [4] T. A. Davis, A column pre-ordering strategy for the
+           unsymmetric-pattern multifrontal method, ACM Trans.
+           on Mathematical Software, 30(2), 2004, pp. 165--195.
+           https://dl.acm.org/doi/abs/10.1145/992200.992205
+
+    .. [5] T. A. Davis and I. S. Duff, A combined unifrontal/multifrontal
+           method for unsymmetric sparse matrices, ACM Trans. on
+           Mathematical Software, 25(1), 1999, pp. 1--19.
+           https://doi.org/10.1145/305658.287640
+
+    .. [6] T. A. Davis and I. S. Duff, An unsymmetric-pattern multifrontal
+           method for sparse LU factorization, SIAM J. Matrix Analysis and
+           Computations, 18(1), 1997, pp. 140--158.
+           https://doi.org/10.1137/S0895479894246905T.
+
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import spsolve
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
+    >>> B = csc_array([[2, 0], [-1, 0], [2, 0]], dtype=float)
+    >>> x = spsolve(A, B)
+    >>> np.allclose(A.dot(x).toarray(), B.toarray())
+    True
+    """
+    is_pydata_sparse = is_pydata_spmatrix(b)
+    pydata_sparse_cls = b.__class__ if is_pydata_sparse else None
+    A = convert_pydata_sparse_to_scipy(A)
+    b = convert_pydata_sparse_to_scipy(b)
+
+    if not (issparse(A) and A.format in ("csc", "csr")):
+        A = csc_array(A)
+        warn('spsolve requires A be CSC or CSR matrix format',
+             SparseEfficiencyWarning, stacklevel=2)
+
+    # b is a vector only if b have shape (n,) or (n, 1)
+    b_is_sparse = issparse(b)
+    if not b_is_sparse:
+        b = asarray(b)
+    b_is_vector = ((b.ndim == 1) or (b.ndim == 2 and b.shape[1] == 1))
+
+    # sum duplicates for non-canonical format
+    A.sum_duplicates()
+    A = A._asfptype()  # upcast to a floating point format
+    result_dtype = np.promote_types(A.dtype, b.dtype)
+    if A.dtype != result_dtype:
+        A = A.astype(result_dtype)
+    if b.dtype != result_dtype:
+        b = b.astype(result_dtype)
+
+    # validate input shapes
+    M, N = A.shape
+    if (M != N):
+        raise ValueError(f"matrix must be square (has shape {(M, N)})")
+
+    if M != b.shape[0]:
+        raise ValueError(f"matrix - rhs dimension mismatch ({A.shape} - {b.shape[0]})")
+
+    if not hasattr(useUmfpack, 'u'):
+        useUmfpack.u = not noScikit
+
+    use_umfpack = use_umfpack and useUmfpack.u
+
+    if b_is_vector and use_umfpack:
+        if b_is_sparse:
+            b_vec = b.toarray()
+        else:
+            b_vec = b
+        b_vec = asarray(b_vec, dtype=A.dtype).ravel()
+
+        if noScikit:
+            raise RuntimeError('Scikits.umfpack not installed.')
+
+        if A.dtype.char not in 'dD':
+            raise ValueError("convert matrix data to double, please, using"
+                  " .astype(), or set linsolve.useUmfpack.u = False")
+
+        umf_family, A = _get_umf_family(A)
+        umf = umfpack.UmfpackContext(umf_family)
+        x = umf.linsolve(umfpack.UMFPACK_A, A, b_vec,
+                         autoTranspose=True)
+    else:
+        if b_is_vector and b_is_sparse:
+            b = b.toarray()
+            b_is_sparse = False
+
+        if not b_is_sparse:
+            if A.format == "csc":
+                flag = 1  # CSC format
+            else:
+                flag = 0  # CSR format
+
+            indices = A.indices.astype(np.intc, copy=False)
+            indptr = A.indptr.astype(np.intc, copy=False)
+            options = dict(ColPerm=permc_spec)
+            x, info = _superlu.gssv(N, A.nnz, A.data, indices, indptr,
+                                    b, flag, options=options)
+            if info != 0:
+                warn("Matrix is exactly singular", MatrixRankWarning, stacklevel=2)
+                x.fill(np.nan)
+            if b_is_vector:
+                x = x.ravel()
+        else:
+            # b is sparse
+            Afactsolve = factorized(A)
+
+            if not (b.format == "csc" or is_pydata_spmatrix(b)):
+                warn('spsolve is more efficient when sparse b '
+                     'is in the CSC matrix format',
+                     SparseEfficiencyWarning, stacklevel=2)
+                b = csc_array(b)
+
+            # Create a sparse output matrix by repeatedly applying
+            # the sparse factorization to solve columns of b.
+            data_segs = []
+            row_segs = []
+            col_segs = []
+            for j in range(b.shape[1]):
+                bj = b[:, j].toarray().ravel()
+                xj = Afactsolve(bj)
+                w = np.flatnonzero(xj)
+                segment_length = w.shape[0]
+                row_segs.append(w)
+                col_segs.append(np.full(segment_length, j, dtype=int))
+                data_segs.append(np.asarray(xj[w], dtype=A.dtype))
+            sparse_data = np.concatenate(data_segs)
+            idx_dtype = get_index_dtype(maxval=max(b.shape))
+            sparse_row = np.concatenate(row_segs, dtype=idx_dtype)
+            sparse_col = np.concatenate(col_segs, dtype=idx_dtype)
+            x = A.__class__((sparse_data, (sparse_row, sparse_col)),
+                           shape=b.shape, dtype=A.dtype)
+
+            if is_pydata_sparse:
+                x = pydata_sparse_cls.from_scipy_sparse(x)
+
+    return x
+
+
+def splu(A, permc_spec=None, diag_pivot_thresh=None,
+         relax=None, panel_size=None, options=None):
+    """
+    Compute the LU decomposition of a sparse, square matrix.
+
+    Parameters
+    ----------
+    A : sparse array or matrix
+        Sparse array to factorize. Most efficient when provided in CSC
+        format. Other formats will be converted to CSC before factorization.
+    permc_spec : str, optional
+        How to permute the columns of the matrix for sparsity preservation.
+        (default: 'COLAMD')
+
+        - ``NATURAL``: natural ordering.
+        - ``MMD_ATA``: minimum degree ordering on the structure of A^T A.
+        - ``MMD_AT_PLUS_A``: minimum degree ordering on the structure of A^T+A.
+        - ``COLAMD``: approximate minimum degree column ordering
+
+    diag_pivot_thresh : float, optional
+        Threshold used for a diagonal entry to be an acceptable pivot.
+        See SuperLU user's guide for details [1]_
+    relax : int, optional
+        Expert option for customizing the degree of relaxing supernodes.
+        See SuperLU user's guide for details [1]_
+    panel_size : int, optional
+        Expert option for customizing the panel size.
+        See SuperLU user's guide for details [1]_
+    options : dict, optional
+        Dictionary containing additional expert options to SuperLU.
+        See SuperLU user guide [1]_ (section 2.4 on the 'Options' argument)
+        for more details. For example, you can specify
+        ``options=dict(Equil=False, IterRefine='SINGLE'))``
+        to turn equilibration off and perform a single iterative refinement.
+
+    Returns
+    -------
+    invA : scipy.sparse.linalg.SuperLU
+        Object, which has a ``solve`` method.
+
+    See also
+    --------
+    spilu : incomplete LU decomposition
+
+    Notes
+    -----
+    This function uses the SuperLU library.
+
+    References
+    ----------
+    .. [1] SuperLU https://portal.nersc.gov/project/sparse/superlu/
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import splu
+    >>> A = csc_array([[1., 0., 0.], [5., 0., 2.], [0., -1., 0.]], dtype=float)
+    >>> B = splu(A)
+    >>> x = np.array([1., 2., 3.], dtype=float)
+    >>> B.solve(x)
+    array([ 1. , -3. , -1.5])
+    >>> A.dot(B.solve(x))
+    array([ 1.,  2.,  3.])
+    >>> B.solve(A.dot(x))
+    array([ 1.,  2.,  3.])
+    """
+
+    if is_pydata_spmatrix(A):
+        A_cls = type(A)
+        def csc_construct_func(*a, cls=A_cls):
+            return cls.from_scipy_sparse(csc_array(*a))
+        A = A.to_scipy_sparse().tocsc()
+    else:
+        csc_construct_func = csc_array
+
+    if not (issparse(A) and A.format == "csc"):
+        A = csc_array(A)
+        warn('splu converted its input to CSC format',
+             SparseEfficiencyWarning, stacklevel=2)
+
+    # sum duplicates for non-canonical format
+    A.sum_duplicates()
+    A = A._asfptype()  # upcast to a floating point format
+
+    M, N = A.shape
+    if (M != N):
+        raise ValueError("can only factor square matrices")  # is this true?
+
+    indices, indptr = safely_cast_index_arrays(A, np.intc, "SuperLU")
+
+    _options = dict(DiagPivotThresh=diag_pivot_thresh, ColPerm=permc_spec,
+                    PanelSize=panel_size, Relax=relax)
+    if options is not None:
+        _options.update(options)
+
+    # Ensure that no column permutations are applied
+    if (_options["ColPerm"] == "NATURAL"):
+        _options["SymmetricMode"] = True
+
+    return _superlu.gstrf(N, A.nnz, A.data, indices, indptr,
+                          csc_construct_func=csc_construct_func,
+                          ilu=False, options=_options)
+
+
+def spilu(A, drop_tol=None, fill_factor=None, drop_rule=None, permc_spec=None,
+          diag_pivot_thresh=None, relax=None, panel_size=None, options=None):
+    """
+    Compute an incomplete LU decomposition for a sparse, square matrix.
+
+    The resulting object is an approximation to the inverse of `A`.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Sparse array to factorize. Most efficient when provided in CSC format.
+        Other formats will be converted to CSC before factorization.
+    drop_tol : float, optional
+        Drop tolerance (0 <= tol <= 1) for an incomplete LU decomposition.
+        (default: 1e-4)
+    fill_factor : float, optional
+        Specifies the fill ratio upper bound (>= 1.0) for ILU. (default: 10)
+    drop_rule : str, optional
+        Comma-separated string of drop rules to use.
+        Available rules: ``basic``, ``prows``, ``column``, ``area``,
+        ``secondary``, ``dynamic``, ``interp``. (Default: ``basic,area``)
+
+        See SuperLU documentation for details.
+
+    Remaining other options
+        Same as for `splu`
+
+    Returns
+    -------
+    invA_approx : scipy.sparse.linalg.SuperLU
+        Object, which has a ``solve`` method.
+
+    See also
+    --------
+    splu : complete LU decomposition
+
+    Notes
+    -----
+    To improve the better approximation to the inverse, you may need to
+    increase `fill_factor` AND decrease `drop_tol`.
+
+    This function uses the SuperLU library.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import spilu
+    >>> A = csc_array([[1., 0., 0.], [5., 0., 2.], [0., -1., 0.]], dtype=float)
+    >>> B = spilu(A)
+    >>> x = np.array([1., 2., 3.], dtype=float)
+    >>> B.solve(x)
+    array([ 1. , -3. , -1.5])
+    >>> A.dot(B.solve(x))
+    array([ 1.,  2.,  3.])
+    >>> B.solve(A.dot(x))
+    array([ 1.,  2.,  3.])
+    """
+
+    if is_pydata_spmatrix(A):
+        A_cls = type(A)
+        def csc_construct_func(*a, cls=A_cls):
+            return cls.from_scipy_sparse(csc_array(*a))
+        A = A.to_scipy_sparse().tocsc()
+    else:
+        csc_construct_func = csc_array
+
+    if not (issparse(A) and A.format == "csc"):
+        A = csc_array(A)
+        warn('spilu converted its input to CSC format',
+             SparseEfficiencyWarning, stacklevel=2)
+
+    # sum duplicates for non-canonical format
+    A.sum_duplicates()
+    A = A._asfptype()  # upcast to a floating point format
+
+    M, N = A.shape
+    if (M != N):
+        raise ValueError("can only factor square matrices")  # is this true?
+
+    indices, indptr = safely_cast_index_arrays(A, np.intc, "SuperLU")
+
+    _options = dict(ILU_DropRule=drop_rule, ILU_DropTol=drop_tol,
+                    ILU_FillFactor=fill_factor,
+                    DiagPivotThresh=diag_pivot_thresh, ColPerm=permc_spec,
+                    PanelSize=panel_size, Relax=relax)
+    if options is not None:
+        _options.update(options)
+
+    # Ensure that no column permutations are applied
+    if (_options["ColPerm"] == "NATURAL"):
+        _options["SymmetricMode"] = True
+
+    return _superlu.gstrf(N, A.nnz, A.data, indices, indptr,
+                          csc_construct_func=csc_construct_func,
+                          ilu=True, options=_options)
+
+
+def factorized(A):
+    """
+    Return a function for solving a sparse linear system, with A pre-factorized.
+
+    Parameters
+    ----------
+    A : (N, N) array_like
+        Input. A in CSC format is most efficient. A CSR format matrix will
+        be converted to CSC before factorization.
+
+    Returns
+    -------
+    solve : callable
+        To solve the linear system of equations given in `A`, the `solve`
+        callable should be passed an ndarray of shape (N,).
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import factorized
+    >>> from scipy.sparse import csc_array
+    >>> A = np.array([[ 3. ,  2. , -1. ],
+    ...               [ 2. , -2. ,  4. ],
+    ...               [-1. ,  0.5, -1. ]])
+    >>> solve = factorized(csc_array(A)) # Makes LU decomposition.
+    >>> rhs1 = np.array([1, -2, 0])
+    >>> solve(rhs1) # Uses the LU factors.
+    array([ 1., -2., -2.])
+
+    """
+    if is_pydata_spmatrix(A):
+        A = A.to_scipy_sparse().tocsc()
+
+    if not hasattr(useUmfpack, 'u'):
+        useUmfpack.u = not noScikit
+
+    if useUmfpack.u:
+        if noScikit:
+            raise RuntimeError('Scikits.umfpack not installed.')
+
+        if not (issparse(A) and A.format == "csc"):
+            A = csc_array(A)
+            warn('splu converted its input to CSC format',
+                 SparseEfficiencyWarning, stacklevel=2)
+
+        A = A._asfptype()  # upcast to a floating point format
+
+        if A.dtype.char not in 'dD':
+            raise ValueError("convert matrix data to double, please, using"
+                  " .astype(), or set linsolve.useUmfpack.u = False")
+
+        umf_family, A = _get_umf_family(A)
+        umf = umfpack.UmfpackContext(umf_family)
+
+        # Make LU decomposition.
+        umf.numeric(A)
+
+        def solve(b):
+            with np.errstate(divide="ignore", invalid="ignore"):
+                # Ignoring warnings with numpy >= 1.23.0, see gh-16523
+                result = umf.solve(umfpack.UMFPACK_A, A, b, autoTranspose=True)
+
+            return result
+
+        return solve
+    else:
+        return splu(A).solve
+
+
+def spsolve_triangular(A, b, lower=True, overwrite_A=False, overwrite_b=False,
+                       unit_diagonal=False):
+    """
+    Solve the equation ``A x = b`` for `x`, assuming A is a triangular matrix.
+
+    Parameters
+    ----------
+    A : (M, M) sparse array or matrix
+        A sparse square triangular matrix. Should be in CSR or CSC format.
+    b : (M,) or (M, N) array_like
+        Right-hand side matrix in ``A x = b``
+    lower : bool, optional
+        Whether `A` is a lower or upper triangular matrix.
+        Default is lower triangular matrix.
+    overwrite_A : bool, optional
+        Allow changing `A`.
+        Enabling gives a performance gain. Default is False.
+    overwrite_b : bool, optional
+        Allow overwriting data in `b`.
+        Enabling gives a performance gain. Default is False.
+        If `overwrite_b` is True, it should be ensured that
+        `b` has an appropriate dtype to be able to store the result.
+    unit_diagonal : bool, optional
+        If True, diagonal elements of `a` are assumed to be 1.
+
+        .. versionadded:: 1.4.0
+
+    Returns
+    -------
+    x : (M,) or (M, N) ndarray
+        Solution to the system ``A x = b``. Shape of return matches shape
+        of `b`.
+
+    Raises
+    ------
+    LinAlgError
+        If `A` is singular or not triangular.
+    ValueError
+        If shape of `A` or shape of `b` do not match the requirements.
+
+    Notes
+    -----
+    .. versionadded:: 0.19.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import spsolve_triangular
+    >>> A = csc_array([[3, 0, 0], [1, -1, 0], [2, 0, 1]], dtype=float)
+    >>> B = np.array([[2, 0], [-1, 0], [2, 0]], dtype=float)
+    >>> x = spsolve_triangular(A, B)
+    >>> np.allclose(A.dot(x), B)
+    True
+    """
+
+    if is_pydata_spmatrix(A):
+        A = A.to_scipy_sparse().tocsc()
+
+    trans = "N"
+    if issparse(A) and A.format == "csr":
+        A = A.T
+        trans = "T"
+        lower = not lower
+
+    if not (issparse(A) and A.format == "csc"):
+        warn('CSC or CSR matrix format is required. Converting to CSC matrix.',
+             SparseEfficiencyWarning, stacklevel=2)
+        A = csc_array(A)
+    elif not overwrite_A:
+        A = A.copy()
+
+
+    M, N = A.shape
+    if M != N:
+        raise ValueError(
+            f'A must be a square matrix but its shape is {A.shape}.')
+
+    if unit_diagonal:
+        with catch_warnings():
+            simplefilter('ignore', SparseEfficiencyWarning)
+            A.setdiag(1)
+    else:
+        diag = A.diagonal()
+        if np.any(diag == 0):
+            raise LinAlgError(
+                'A is singular: zero entry on diagonal.')
+        invdiag = 1/diag
+        if trans == "N":
+            A = A @ diags_array(invdiag)
+        else:
+            A = (A.T @ diags_array(invdiag)).T
+
+    # sum duplicates for non-canonical format
+    A.sum_duplicates()
+
+    b = np.asanyarray(b)
+
+    if b.ndim not in [1, 2]:
+        raise ValueError(
+            f'b must have 1 or 2 dims but its shape is {b.shape}.')
+    if M != b.shape[0]:
+        raise ValueError(
+            'The size of the dimensions of A must be equal to '
+            'the size of the first dimension of b but the shape of A is '
+            f'{A.shape} and the shape of b is {b.shape}.'
+        )
+
+    result_dtype = np.promote_types(np.promote_types(A.dtype, np.float32), b.dtype)
+    if A.dtype != result_dtype:
+        A = A.astype(result_dtype)
+    if b.dtype != result_dtype:
+        b = b.astype(result_dtype)
+    elif not overwrite_b:
+        b = b.copy()
+
+    if lower:
+        L = A
+        U = csc_array((N, N), dtype=result_dtype)
+    else:
+        L = eye_array(N, dtype=result_dtype, format='csc')
+        U = A
+        U.setdiag(0)
+
+    x, info = _superlu.gstrs(trans,
+                             N, L.nnz, L.data, L.indices, L.indptr,
+                             N, U.nnz, U.data, U.indices, U.indptr,
+                             b)
+    if info:
+        raise LinAlgError('A is singular.')
+
+    if not unit_diagonal:
+        invdiag = invdiag.reshape(-1, *([1] * (len(x.shape) - 1)))
+        x = x * invdiag
+
+    return x
+
+
+def is_sptriangular(A):
+    """Returns 2-tuple indicating lower/upper triangular structure for sparse ``A``
+
+    Checks for triangular structure in ``A``. The result is summarized in
+    two boolean values ``lower`` and ``upper`` to designate whether ``A`` is
+    lower triangular or upper triangular respectively. Diagonal ``A`` will
+    result in both being True. Non-triangular structure results in False for both.
+
+    Only the sparse structure is used here. Values are not checked for zeros.
+
+    This function will convert a copy of ``A`` to CSC format if it is not already
+    CSR or CSC format. So it may be more efficient to convert it yourself if you
+    have other uses for the CSR/CSC version.
+
+    If ``A`` is not square, the portions outside the upper left square of the
+    matrix do not affect its triangular structure. You probably want to work
+    with the square portion of the matrix, though it is not requred here.
+
+    Parameters
+    ----------
+    A : SciPy sparse array or matrix
+        A sparse matrix preferrably in CSR or CSC format.
+
+    Returns
+    -------
+    lower, upper : 2-tuple of bool
+
+        .. versionadded:: 1.15.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array, eye_array
+    >>> from scipy.sparse.linalg import is_sptriangular
+    >>> A = csc_array([[3, 0, 0], [1, -1, 0], [2, 0, 1]], dtype=float)
+    >>> is_sptriangular(A)
+    (True, False)
+    >>> D = eye_array(3, format='csr')
+    >>> is_sptriangular(D)
+    (True, True)
+    """
+    if not (issparse(A) and A.format in ("csc", "csr", "coo", "dia", "dok", "lil")):
+        warn('is_sptriangular needs sparse and not BSR format. Converting to CSR.',
+             SparseEfficiencyWarning, stacklevel=2)
+        A = csr_array(A)
+
+    # bsr is better off converting to csr
+    if A.format == "dia":
+        return A.offsets.max() <= 0, A.offsets.min() >= 0
+    elif A.format == "coo":
+        rows, cols = A.coords
+        return (cols <= rows).all(), (cols >= rows).all()
+    elif A.format == "dok":
+        return all(c <= r for r, c in A.keys()), all(c >= r for r, c in A.keys())
+    elif A.format == "lil":
+        lower = all(col <= row for row, cols in enumerate(A.rows) for col in cols)
+        upper = all(col >= row for row, cols in enumerate(A.rows) for col in cols)
+        return lower, upper
+    # format in ("csc", "csr")
+    indptr, indices = A.indptr, A.indices
+    N = len(indptr) - 1
+
+    lower, upper = True, True
+    # check middle, 1st, last col (treat as CSC and switch at end if CSR)
+    for col in [N // 2, 0, -1]:
+        rows = indices[indptr[col]:indptr[col + 1]]
+        upper = upper and (col >= rows).all()
+        lower = lower and (col <= rows).all()
+        if not upper and not lower:
+            return False, False
+    # check all cols
+    cols = np.repeat(np.arange(N), np.diff(indptr))
+    rows = indices
+    upper = upper and (cols >= rows).all()
+    lower = lower and (cols <= rows).all()
+    if A.format == 'csr':
+        return upper, lower
+    return lower, upper
+
+
+def spbandwidth(A):
+    """Return the lower and upper bandwidth of a 2D numeric array.
+
+    Computes the lower and upper limits on the bandwidth of the
+    sparse 2D array ``A``. The result is summarized as a 2-tuple
+    of positive integers ``(lo, hi)``. A zero denotes no sub/super
+    diagonal entries on that side (tringular). The maximum value
+    for ``lo``(``hi``) is one less than the number of rows(cols).
+
+    Only the sparse structure is used here. Values are not checked for zeros.
+
+    Parameters
+    ----------
+    A : SciPy sparse array or matrix
+        A sparse matrix preferrably in CSR or CSC format.
+
+    Returns
+    -------
+    below, above : 2-tuple of int
+        The distance to the farthest non-zero diagonal below/above the
+        main diagonal.
+
+        .. versionadded:: 1.15.0
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import spbandwidth
+    >>> from scipy.sparse import csc_array, eye_array
+    >>> A = csc_array([[3, 0, 0], [1, -1, 0], [2, 0, 1]], dtype=float)
+    >>> spbandwidth(A)
+    (2, 0)
+    >>> D = eye_array(3, format='csr')
+    >>> spbandwidth(D)
+    (0, 0)
+    """
+    if not (issparse(A) and A.format in ("csc", "csr", "coo", "dia", "dok")):
+        warn('spbandwidth needs sparse format not LIL and BSR. Converting to CSR.',
+             SparseEfficiencyWarning, stacklevel=2)
+        A = csr_array(A)
+
+    # bsr and lil are better off converting to csr
+    if A.format == "dia":
+        return max(0, -A.offsets.min().item()), max(0, A.offsets.max().item())
+    if A.format in ("csc", "csr"):
+        indptr, indices = A.indptr, A.indices
+        N = len(indptr) - 1
+        gap = np.repeat(np.arange(N), np.diff(indptr)) - indices
+        if A.format == 'csr':
+            gap = -gap
+    elif A.format == "coo":
+        gap = A.coords[1] - A.coords[0]
+    elif A.format == "dok":
+        gap = [(c - r) for r, c in A.keys()] + [0]
+        return -min(gap), max(gap)
+    return max(-np.min(gap).item(), 0), max(np.max(gap).item(), 0)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/tests/test_linsolve.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/tests/test_linsolve.py
new file mode 100644
index 0000000000000000000000000000000000000000..c9c5bfed1b5458a8c43ee2234087f164f2a37a80
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_dsolve/tests/test_linsolve.py
@@ -0,0 +1,921 @@
+import sys
+import threading
+
+import numpy as np
+from numpy import array, finfo, arange, eye, all, unique, ones, dot
+import numpy.random as random
+from numpy.testing import (
+        assert_array_almost_equal, assert_almost_equal,
+        assert_equal, assert_array_equal, assert_, assert_allclose,
+        assert_warns, suppress_warnings)
+import pytest
+from pytest import raises as assert_raises
+
+import scipy.linalg
+from scipy.linalg import norm, inv
+from scipy.sparse import (dia_array, SparseEfficiencyWarning, csc_array,
+        csr_array, eye_array, issparse, dok_array, lil_array, bsr_array, kron)
+from scipy.sparse.linalg import SuperLU
+from scipy.sparse.linalg._dsolve import (spsolve, use_solver, splu, spilu,
+        MatrixRankWarning, _superlu, spsolve_triangular, factorized,
+        is_sptriangular, spbandwidth)
+import scipy.sparse
+
+from scipy._lib._testutils import check_free_memory
+from scipy._lib._util import ComplexWarning
+
+
+sup_sparse_efficiency = suppress_warnings()
+sup_sparse_efficiency.filter(SparseEfficiencyWarning)
+
+# scikits.umfpack is not a SciPy dependency but it is optionally used in
+# dsolve, so check whether it's available
+try:
+    import scikits.umfpack as umfpack
+    has_umfpack = True
+except ImportError:
+    has_umfpack = False
+
+def toarray(a):
+    if issparse(a):
+        return a.toarray()
+    else:
+        return a
+
+
+def setup_bug_8278():
+    N = 2 ** 6
+    h = 1/N
+    Ah1D = dia_array(([-1, 2, -1], [-1, 0, 1]), shape=(N-1, N-1))/(h**2)
+    eyeN = eye_array(N - 1)
+    A = (kron(eyeN, kron(eyeN, Ah1D))
+         + kron(eyeN, kron(Ah1D, eyeN))
+         + kron(Ah1D, kron(eyeN, eyeN)))
+    b = np.random.rand((N-1)**3)
+    return A, b
+
+
+class TestFactorized:
+    def setup_method(self):
+        n = 5
+        d = arange(n) + 1
+        self.n = n
+        self.A = dia_array(((d, 2*d, d[::-1]), (-3, 0, 5)), shape=(n,n)).tocsc()
+        random.seed(1234)
+
+    def _check_singular(self):
+        A = csc_array((5,5), dtype='d')
+        b = ones(5)
+        assert_array_almost_equal(0. * b, factorized(A)(b))
+
+    def _check_non_singular(self):
+        # Make a diagonal dominant, to make sure it is not singular
+        n = 5
+        a = csc_array(random.rand(n, n))
+        b = ones(n)
+
+        expected = splu(a).solve(b)
+        assert_array_almost_equal(factorized(a)(b), expected)
+
+    def test_singular_without_umfpack(self):
+        use_solver(useUmfpack=False)
+        with assert_raises(RuntimeError, match="Factor is exactly singular"):
+            self._check_singular()
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_singular_with_umfpack(self):
+        use_solver(useUmfpack=True)
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning, "divide by zero encountered in double_scalars")
+            assert_warns(umfpack.UmfpackWarning, self._check_singular)
+
+    def test_non_singular_without_umfpack(self):
+        use_solver(useUmfpack=False)
+        self._check_non_singular()
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_non_singular_with_umfpack(self):
+        use_solver(useUmfpack=True)
+        self._check_non_singular()
+
+    def test_cannot_factorize_nonsquare_matrix_without_umfpack(self):
+        use_solver(useUmfpack=False)
+        msg = "can only factor square matrices"
+        with assert_raises(ValueError, match=msg):
+            factorized(self.A[:, :4])
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_factorizes_nonsquare_matrix_with_umfpack(self):
+        use_solver(useUmfpack=True)
+        # does not raise
+        factorized(self.A[:,:4])
+
+    def test_call_with_incorrectly_sized_matrix_without_umfpack(self):
+        use_solver(useUmfpack=False)
+        solve = factorized(self.A)
+        b = random.rand(4)
+        B = random.rand(4, 3)
+        BB = random.rand(self.n, 3, 9)
+
+        with assert_raises(ValueError, match="is of incompatible size"):
+            solve(b)
+        with assert_raises(ValueError, match="is of incompatible size"):
+            solve(B)
+        with assert_raises(ValueError,
+                           match="object too deep for desired array"):
+            solve(BB)
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_call_with_incorrectly_sized_matrix_with_umfpack(self):
+        use_solver(useUmfpack=True)
+        solve = factorized(self.A)
+        b = random.rand(4)
+        B = random.rand(4, 3)
+        BB = random.rand(self.n, 3, 9)
+
+        # does not raise
+        solve(b)
+        msg = "object too deep for desired array"
+        with assert_raises(ValueError, match=msg):
+            solve(B)
+        with assert_raises(ValueError, match=msg):
+            solve(BB)
+
+    def test_call_with_cast_to_complex_without_umfpack(self):
+        use_solver(useUmfpack=False)
+        solve = factorized(self.A)
+        b = random.rand(4)
+        for t in [np.complex64, np.complex128]:
+            with assert_raises(TypeError, match="Cannot cast array data"):
+                solve(b.astype(t))
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_call_with_cast_to_complex_with_umfpack(self):
+        use_solver(useUmfpack=True)
+        solve = factorized(self.A)
+        b = random.rand(4)
+        for t in [np.complex64, np.complex128]:
+            assert_warns(ComplexWarning, solve, b.astype(t))
+
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_assume_sorted_indices_flag(self):
+        # a sparse matrix with unsorted indices
+        unsorted_inds = np.array([2, 0, 1, 0])
+        data = np.array([10, 16, 5, 0.4])
+        indptr = np.array([0, 1, 2, 4])
+        A = csc_array((data, unsorted_inds, indptr), (3, 3))
+        b = ones(3)
+
+        # should raise when incorrectly assuming indices are sorted
+        use_solver(useUmfpack=True, assumeSortedIndices=True)
+        with assert_raises(RuntimeError,
+                           match="UMFPACK_ERROR_invalid_matrix"):
+            factorized(A)
+
+        # should sort indices and succeed when not assuming indices are sorted
+        use_solver(useUmfpack=True, assumeSortedIndices=False)
+        expected = splu(A.copy()).solve(b)
+
+        assert_equal(A.has_sorted_indices, 0)
+        assert_array_almost_equal(factorized(A)(b), expected)
+
+    @pytest.mark.slow
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_bug_8278(self):
+        check_free_memory(8000)
+        use_solver(useUmfpack=True)
+        A, b = setup_bug_8278()
+        A = A.tocsc()
+        f = factorized(A)
+        x = f(b)
+        assert_array_almost_equal(A @ x, b)
+
+
+class TestLinsolve:
+    def setup_method(self):
+        use_solver(useUmfpack=False)
+
+    def test_singular(self):
+        A = csc_array((5,5), dtype='d')
+        b = array([1, 2, 3, 4, 5],dtype='d')
+        with suppress_warnings() as sup:
+            sup.filter(MatrixRankWarning, "Matrix is exactly singular")
+            x = spsolve(A, b)
+        assert_(not np.isfinite(x).any())
+
+    def test_singular_gh_3312(self):
+        # "Bad" test case that leads SuperLU to call LAPACK with invalid
+        # arguments. Check that it fails moderately gracefully.
+        ij = np.array([(17, 0), (17, 6), (17, 12), (10, 13)], dtype=np.int32)
+        v = np.array([0.284213, 0.94933781, 0.15767017, 0.38797296])
+        A = csc_array((v, ij.T), shape=(20, 20))
+        b = np.arange(20)
+
+        try:
+            # should either raise a runtime error or return value
+            # appropriate for singular input (which yields the warning)
+            with suppress_warnings() as sup:
+                sup.filter(MatrixRankWarning, "Matrix is exactly singular")
+                x = spsolve(A, b)
+            assert not np.isfinite(x).any()
+        except RuntimeError:
+            pass
+
+    @pytest.mark.parametrize('format', ['csc', 'csr'])
+    @pytest.mark.parametrize('idx_dtype', [np.int32, np.int64])
+    def test_twodiags(self, format: str, idx_dtype: np.dtype):
+        A = dia_array(([[1, 2, 3, 4, 5], [6, 5, 8, 9, 10]], [0, 1]),
+                        shape=(5, 5)).asformat(format)
+        b = array([1, 2, 3, 4, 5])
+
+        # condition number of A
+        cond_A = norm(A.toarray(), 2) * norm(inv(A.toarray()), 2)
+
+        for t in ['f','d','F','D']:
+            eps = finfo(t).eps  # floating point epsilon
+            b = b.astype(t)
+            Asp = A.astype(t)
+            Asp.indices = Asp.indices.astype(idx_dtype, copy=False)
+            Asp.indptr = Asp.indptr.astype(idx_dtype, copy=False)
+
+            x = spsolve(Asp, b)
+            assert_(norm(b - Asp@x) < 10 * cond_A * eps)
+
+    def test_bvector_smoketest(self):
+        Adense = array([[0., 1., 1.],
+                        [1., 0., 1.],
+                        [0., 0., 1.]])
+        As = csc_array(Adense)
+        random.seed(1234)
+        x = random.randn(3)
+        b = As@x
+        x2 = spsolve(As, b)
+
+        assert_array_almost_equal(x, x2)
+
+    def test_bmatrix_smoketest(self):
+        Adense = array([[0., 1., 1.],
+                        [1., 0., 1.],
+                        [0., 0., 1.]])
+        As = csc_array(Adense)
+        random.seed(1234)
+        x = random.randn(3, 4)
+        Bdense = As.dot(x)
+        Bs = csc_array(Bdense)
+        x2 = spsolve(As, Bs)
+        assert_array_almost_equal(x, x2.toarray())
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_non_square(self):
+        # A is not square.
+        A = ones((3, 4))
+        b = ones((4, 1))
+        assert_raises(ValueError, spsolve, A, b)
+        # A2 and b2 have incompatible shapes.
+        A2 = csc_array(eye(3))
+        b2 = array([1.0, 2.0])
+        assert_raises(ValueError, spsolve, A2, b2)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_example_comparison(self):
+        row = array([0,0,1,2,2,2])
+        col = array([0,2,2,0,1,2])
+        data = array([1,2,3,-4,5,6])
+        sM = csr_array((data,(row,col)), shape=(3,3), dtype=float)
+        M = sM.toarray()
+
+        row = array([0,0,1,1,0,0])
+        col = array([0,2,1,1,0,0])
+        data = array([1,1,1,1,1,1])
+        sN = csr_array((data, (row,col)), shape=(3,3), dtype=float)
+        N = sN.toarray()
+
+        sX = spsolve(sM, sN)
+        X = scipy.linalg.solve(M, N)
+
+        assert_array_almost_equal(X, sX.toarray())
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_shape_compatibility(self):
+        use_solver(useUmfpack=True)
+        A = csc_array([[1., 0], [0, 2]])
+        bs = [
+            [1, 6],
+            array([1, 6]),
+            [[1], [6]],
+            array([[1], [6]]),
+            csc_array([[1], [6]]),
+            csr_array([[1], [6]]),
+            dok_array([[1], [6]]),
+            bsr_array([[1], [6]]),
+            array([[1., 2., 3.], [6., 8., 10.]]),
+            csc_array([[1., 2., 3.], [6., 8., 10.]]),
+            csr_array([[1., 2., 3.], [6., 8., 10.]]),
+            dok_array([[1., 2., 3.], [6., 8., 10.]]),
+            bsr_array([[1., 2., 3.], [6., 8., 10.]]),
+            ]
+
+        for b in bs:
+            x = np.linalg.solve(A.toarray(), toarray(b))
+            for spmattype in [csc_array, csr_array, dok_array, lil_array]:
+                x1 = spsolve(spmattype(A), b, use_umfpack=True)
+                x2 = spsolve(spmattype(A), b, use_umfpack=False)
+
+                # check solution
+                if x.ndim == 2 and x.shape[1] == 1:
+                    # interprets also these as "vectors"
+                    x = x.ravel()
+
+                assert_array_almost_equal(toarray(x1), x,
+                                          err_msg=repr((b, spmattype, 1)))
+                assert_array_almost_equal(toarray(x2), x,
+                                          err_msg=repr((b, spmattype, 2)))
+
+                # dense vs. sparse output  ("vectors" are always dense)
+                if issparse(b) and x.ndim > 1:
+                    assert_(issparse(x1), repr((b, spmattype, 1)))
+                    assert_(issparse(x2), repr((b, spmattype, 2)))
+                else:
+                    assert_(isinstance(x1, np.ndarray), repr((b, spmattype, 1)))
+                    assert_(isinstance(x2, np.ndarray), repr((b, spmattype, 2)))
+
+                # check output shape
+                if x.ndim == 1:
+                    # "vector"
+                    assert_equal(x1.shape, (A.shape[1],))
+                    assert_equal(x2.shape, (A.shape[1],))
+                else:
+                    # "matrix"
+                    assert_equal(x1.shape, x.shape)
+                    assert_equal(x2.shape, x.shape)
+
+        A = csc_array((3, 3))
+        b = csc_array((1, 3))
+        assert_raises(ValueError, spsolve, A, b)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_ndarray_support(self):
+        A = array([[1., 2.], [2., 0.]])
+        x = array([[1., 1.], [0.5, -0.5]])
+        b = array([[2., 0.], [2., 2.]])
+
+        assert_array_almost_equal(x, spsolve(A, b))
+
+    def test_gssv_badinput(self):
+        N = 10
+        d = arange(N) + 1.0
+        A = dia_array(((d, 2*d, d[::-1]), (-3, 0, 5)), shape=(N, N))
+
+        for container in (csc_array, csr_array):
+            A = container(A)
+            b = np.arange(N)
+
+            def not_c_contig(x):
+                return x.repeat(2)[::2]
+
+            def not_1dim(x):
+                return x[:,None]
+
+            def bad_type(x):
+                return x.astype(bool)
+
+            def too_short(x):
+                return x[:-1]
+
+            badops = [not_c_contig, not_1dim, bad_type, too_short]
+
+            for badop in badops:
+                msg = f"{container!r} {badop!r}"
+                # Not C-contiguous
+                assert_raises((ValueError, TypeError), _superlu.gssv,
+                              N, A.nnz, badop(A.data), A.indices, A.indptr,
+                              b, int(A.format == 'csc'), err_msg=msg)
+                assert_raises((ValueError, TypeError), _superlu.gssv,
+                              N, A.nnz, A.data, badop(A.indices), A.indptr,
+                              b, int(A.format == 'csc'), err_msg=msg)
+                assert_raises((ValueError, TypeError), _superlu.gssv,
+                              N, A.nnz, A.data, A.indices, badop(A.indptr),
+                              b, int(A.format == 'csc'), err_msg=msg)
+
+    def test_sparsity_preservation(self):
+        ident = csc_array([
+            [1, 0, 0],
+            [0, 1, 0],
+            [0, 0, 1]])
+        b = csc_array([
+            [0, 1],
+            [1, 0],
+            [0, 0]])
+        x = spsolve(ident, b)
+        assert_equal(ident.nnz, 3)
+        assert_equal(b.nnz, 2)
+        assert_equal(x.nnz, 2)
+        assert_allclose(x.toarray(), b.toarray(), atol=1e-12, rtol=1e-12)
+
+    def test_dtype_cast(self):
+        A_real = scipy.sparse.csr_array([[1, 2, 0],
+                                          [0, 0, 3],
+                                          [4, 0, 5]])
+        A_complex = scipy.sparse.csr_array([[1, 2, 0],
+                                             [0, 0, 3],
+                                             [4, 0, 5 + 1j]])
+        b_real = np.array([1,1,1])
+        b_complex = np.array([1,1,1]) + 1j*np.array([1,1,1])
+        x = spsolve(A_real, b_real)
+        assert_(np.issubdtype(x.dtype, np.floating))
+        x = spsolve(A_real, b_complex)
+        assert_(np.issubdtype(x.dtype, np.complexfloating))
+        x = spsolve(A_complex, b_real)
+        assert_(np.issubdtype(x.dtype, np.complexfloating))
+        x = spsolve(A_complex, b_complex)
+        assert_(np.issubdtype(x.dtype, np.complexfloating))
+
+    @pytest.mark.slow
+    @pytest.mark.skipif(not has_umfpack, reason="umfpack not available")
+    def test_bug_8278(self):
+        check_free_memory(8000)
+        use_solver(useUmfpack=True)
+        A, b = setup_bug_8278()
+        x = spsolve(A, b)
+        assert_array_almost_equal(A @ x, b)
+
+
+class TestSplu:
+    def setup_method(self):
+        use_solver(useUmfpack=False)
+        n = 40
+        d = arange(n) + 1
+        self.n = n
+        self.A = dia_array(((d, 2*d, d[::-1]), (-3, 0, 5)), shape=(n, n)).tocsc()
+        random.seed(1234)
+
+    def _smoketest(self, spxlu, check, dtype, idx_dtype):
+        if np.issubdtype(dtype, np.complexfloating):
+            A = self.A + 1j*self.A.T
+        else:
+            A = self.A
+
+        A = A.astype(dtype)
+        A.indices = A.indices.astype(idx_dtype, copy=False)
+        A.indptr = A.indptr.astype(idx_dtype, copy=False)
+        lu = spxlu(A)
+
+        rng = random.RandomState(1234)
+
+        # Input shapes
+        for k in [None, 1, 2, self.n, self.n+2]:
+            msg = f"k={k!r}"
+
+            if k is None:
+                b = rng.rand(self.n)
+            else:
+                b = rng.rand(self.n, k)
+
+            if np.issubdtype(dtype, np.complexfloating):
+                b = b + 1j*rng.rand(*b.shape)
+            b = b.astype(dtype)
+
+            x = lu.solve(b)
+            check(A, b, x, msg)
+
+            x = lu.solve(b, 'T')
+            check(A.T, b, x, msg)
+
+            x = lu.solve(b, 'H')
+            check(A.T.conj(), b, x, msg)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_splu_smoketest(self):
+        self._internal_test_splu_smoketest()
+
+    def _internal_test_splu_smoketest(self):
+        # Check that splu works at all
+        def check(A, b, x, msg=""):
+            eps = np.finfo(A.dtype).eps
+            r = A @ x
+            assert_(abs(r - b).max() < 1e3*eps, msg)
+
+        for dtype in [np.float32, np.float64, np.complex64, np.complex128]:
+            for idx_dtype in [np.int32, np.int64]:
+                self._smoketest(splu, check, dtype, idx_dtype)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_spilu_smoketest(self):
+        self._internal_test_spilu_smoketest()
+
+    def _internal_test_spilu_smoketest(self):
+        errors = []
+
+        def check(A, b, x, msg=""):
+            r = A @ x
+            err = abs(r - b).max()
+            assert_(err < 1e-2, msg)
+            if b.dtype in (np.float64, np.complex128):
+                errors.append(err)
+
+        for dtype in [np.float32, np.float64, np.complex64, np.complex128]:
+            for idx_dtype in [np.int32, np.int64]:
+                self._smoketest(spilu, check, dtype, idx_dtype)
+
+        assert_(max(errors) > 1e-5)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_spilu_drop_rule(self):
+        # Test passing in the drop_rule argument to spilu.
+        A = eye_array(2)
+
+        rules = [
+            b'basic,area'.decode('ascii'),  # unicode
+            b'basic,area',  # ascii
+            [b'basic', b'area'.decode('ascii')]
+        ]
+        for rule in rules:
+            # Argument should be accepted
+            assert_(isinstance(spilu(A, drop_rule=rule), SuperLU))
+
+    def test_splu_nnz0(self):
+        A = csc_array((5,5), dtype='d')
+        assert_raises(RuntimeError, splu, A)
+
+    def test_spilu_nnz0(self):
+        A = csc_array((5,5), dtype='d')
+        assert_raises(RuntimeError, spilu, A)
+
+    def test_splu_basic(self):
+        # Test basic splu functionality.
+        n = 30
+        rng = random.RandomState(12)
+        a = rng.rand(n, n)
+        a[a < 0.95] = 0
+        # First test with a singular matrix
+        a[:, 0] = 0
+        a_ = csc_array(a)
+        # Matrix is exactly singular
+        assert_raises(RuntimeError, splu, a_)
+
+        # Make a diagonal dominant, to make sure it is not singular
+        a += 4*eye(n)
+        a_ = csc_array(a)
+        lu = splu(a_)
+        b = ones(n)
+        x = lu.solve(b)
+        assert_almost_equal(dot(a, x), b)
+
+    def test_splu_perm(self):
+        # Test the permutation vectors exposed by splu.
+        n = 30
+        a = random.random((n, n))
+        a[a < 0.95] = 0
+        # Make a diagonal dominant, to make sure it is not singular
+        a += 4*eye(n)
+        a_ = csc_array(a)
+        lu = splu(a_)
+        # Check that the permutation indices do belong to [0, n-1].
+        for perm in (lu.perm_r, lu.perm_c):
+            assert_(all(perm > -1))
+            assert_(all(perm < n))
+            assert_equal(len(unique(perm)), len(perm))
+
+        # Now make a symmetric, and test that the two permutation vectors are
+        # the same
+        # Note: a += a.T relies on undefined behavior.
+        a = a + a.T
+        a_ = csc_array(a)
+        lu = splu(a_)
+        assert_array_equal(lu.perm_r, lu.perm_c)
+
+    @pytest.mark.parametrize("splu_fun, rtol", [(splu, 1e-7), (spilu, 1e-1)])
+    def test_natural_permc(self, splu_fun, rtol):
+        # Test that the "NATURAL" permc_spec does not permute the matrix
+        rng = np.random.RandomState(42)
+        n = 500
+        p = 0.01
+        A = scipy.sparse.random(n, n, p, random_state=rng)
+        x = rng.rand(n)
+        # Make A diagonal dominant to make sure it is not singular
+        A += (n+1)*scipy.sparse.eye_array(n)
+        A_ = csc_array(A)
+        b = A_ @ x
+
+        # without permc_spec, permutation is not identity
+        lu = splu_fun(A_)
+        assert_(np.any(lu.perm_c != np.arange(n)))
+
+        # with permc_spec="NATURAL", permutation is identity
+        lu = splu_fun(A_, permc_spec="NATURAL")
+        assert_array_equal(lu.perm_c, np.arange(n))
+
+        # Also, lu decomposition is valid
+        x2 = lu.solve(b)
+        assert_allclose(x, x2, rtol=rtol)
+
+    @pytest.mark.skipif(not hasattr(sys, 'getrefcount'), reason="no sys.getrefcount")
+    def test_lu_refcount(self):
+        # Test that we are keeping track of the reference count with splu.
+        n = 30
+        a = random.random((n, n))
+        a[a < 0.95] = 0
+        # Make a diagonal dominant, to make sure it is not singular
+        a += 4*eye(n)
+        a_ = csc_array(a)
+        lu = splu(a_)
+
+        # And now test that we don't have a refcount bug
+        rc = sys.getrefcount(lu)
+        for attr in ('perm_r', 'perm_c'):
+            perm = getattr(lu, attr)
+            assert_equal(sys.getrefcount(lu), rc + 1)
+            del perm
+            assert_equal(sys.getrefcount(lu), rc)
+
+    def test_bad_inputs(self):
+        A = self.A.tocsc()
+
+        assert_raises(ValueError, splu, A[:,:4])
+        assert_raises(ValueError, spilu, A[:,:4])
+
+        for lu in [splu(A), spilu(A)]:
+            b = random.rand(42)
+            B = random.rand(42, 3)
+            BB = random.rand(self.n, 3, 9)
+            assert_raises(ValueError, lu.solve, b)
+            assert_raises(ValueError, lu.solve, B)
+            assert_raises(ValueError, lu.solve, BB)
+            assert_raises(TypeError, lu.solve,
+                          b.astype(np.complex64))
+            assert_raises(TypeError, lu.solve,
+                          b.astype(np.complex128))
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_superlu_dlamch_i386_nan(self):
+        # SuperLU 4.3 calls some functions returning floats without
+        # declaring them. On i386@linux call convention, this fails to
+        # clear floating point registers after call. As a result, NaN
+        # can appear in the next floating point operation made.
+        #
+        # Here's a test case that triggered the issue.
+        n = 8
+        d = np.arange(n) + 1
+        A = dia_array(((d, 2*d, d[::-1]), (-3, 0, 5)), shape=(n, n))
+        A = A.astype(np.float32)
+        spilu(A)
+        A = A + 1j*A
+        B = A.toarray()
+        assert_(not np.isnan(B).any())
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_lu_attr(self):
+
+        def check(dtype, complex_2=False):
+            A = self.A.astype(dtype)
+
+            if complex_2:
+                A = A + 1j*A.T
+
+            n = A.shape[0]
+            lu = splu(A)
+
+            # Check that the decomposition is as advertised
+
+            Pc = np.zeros((n, n))
+            Pc[np.arange(n), lu.perm_c] = 1
+
+            Pr = np.zeros((n, n))
+            Pr[lu.perm_r, np.arange(n)] = 1
+
+            Ad = A.toarray()
+            lhs = Pr.dot(Ad).dot(Pc)
+            rhs = (lu.L @ lu.U).toarray()
+
+            eps = np.finfo(dtype).eps
+
+            assert_allclose(lhs, rhs, atol=100*eps)
+
+        check(np.float32)
+        check(np.float64)
+        check(np.complex64)
+        check(np.complex128)
+        check(np.complex64, True)
+        check(np.complex128, True)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.slow
+    @sup_sparse_efficiency
+    def test_threads_parallel(self):
+        oks = []
+
+        def worker():
+            try:
+                self.test_splu_basic()
+                self._internal_test_splu_smoketest()
+                self._internal_test_spilu_smoketest()
+                oks.append(True)
+            except Exception:
+                pass
+
+        threads = [threading.Thread(target=worker)
+                   for k in range(20)]
+        for t in threads:
+            t.start()
+        for t in threads:
+            t.join()
+
+        assert_equal(len(oks), 20)
+
+    @pytest.mark.thread_unsafe
+    def test_singular_matrix(self):
+        # Test that SuperLU does not print to stdout when a singular matrix is
+        # passed. See gh-20993.
+        A = eye_array(10, format='csr')
+        A[-1, -1] = 0
+        b = np.zeros(10)
+        with pytest.warns(MatrixRankWarning):
+            res = spsolve(A, b)
+            assert np.isnan(res).all()
+
+
+class TestGstrsErrors:
+    def setup_method(self):
+      self.A = array([[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]], dtype=np.float64)
+      self.b = np.array([[1.0],[2.0],[3.0]], dtype=np.float64)
+
+    def test_trans(self):
+        L = scipy.sparse.tril(self.A, format='csc')
+        U = scipy.sparse.triu(self.A, k=1, format='csc')
+        with assert_raises(ValueError, match="trans must be N, T, or H"):
+            _superlu.gstrs('X', L.shape[0], L.nnz, L.data, L.indices, L.indptr,
+                                U.shape[0], U.nnz, U.data, U.indices, U.indptr, self.b)
+
+    def test_shape_LU(self):
+        L = scipy.sparse.tril(self.A[0:2,0:2], format='csc')
+        U = scipy.sparse.triu(self.A, k=1, format='csc')
+        with assert_raises(ValueError, match="L and U must have the same dimension"):
+            _superlu.gstrs('N', L.shape[0], L.nnz, L.data, L.indices, L.indptr,
+                                U.shape[0], U.nnz, U.data, U.indices, U.indptr, self.b)
+
+    def test_shape_b(self):
+        L = scipy.sparse.tril(self.A, format='csc')
+        U = scipy.sparse.triu(self.A, k=1, format='csc')
+        with assert_raises(ValueError, match="right hand side array has invalid shape"):
+            _superlu.gstrs('N', L.shape[0], L.nnz, L.data, L.indices, L.indptr,
+                                U.shape[0], U.nnz, U.data, U.indices, U.indptr,
+                                self.b[0:2])
+
+    def test_types_differ(self):
+        L = scipy.sparse.tril(self.A.astype(np.float32), format='csc')
+        U = scipy.sparse.triu(self.A, k=1, format='csc')
+        with assert_raises(TypeError, match="nzvals types of L and U differ"):
+            _superlu.gstrs('N', L.shape[0], L.nnz, L.data, L.indices, L.indptr,
+                                U.shape[0], U.nnz, U.data, U.indices, U.indptr, self.b)
+
+    def test_types_unsupported(self):
+        L = scipy.sparse.tril(self.A.astype(np.uint8), format='csc')
+        U = scipy.sparse.triu(self.A.astype(np.uint8), k=1, format='csc')
+        with assert_raises(TypeError, match="nzvals is not of a type supported"):
+            _superlu.gstrs('N', L.shape[0], L.nnz, L.data, L.indices, L.indptr,
+                                U.shape[0], U.nnz, U.data, U.indices, U.indptr,
+                                self.b.astype(np.uint8))
+
+class TestSpsolveTriangular:
+    def setup_method(self):
+        use_solver(useUmfpack=False)
+
+    @pytest.mark.parametrize("fmt",["csr","csc"])
+    def test_zero_diagonal(self,fmt):
+        n = 5
+        rng = np.random.default_rng(43876432987)
+        A = rng.standard_normal((n, n))
+        b = np.arange(n)
+        A = scipy.sparse.tril(A, k=0, format=fmt)
+
+        x = spsolve_triangular(A, b, unit_diagonal=True, lower=True)
+
+        A.setdiag(1)
+        assert_allclose(A.dot(x), b)
+
+        # Regression test from gh-15199
+        A = np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0]], dtype=np.float64)
+        b = np.array([1., 2., 3.])
+        with suppress_warnings() as sup:
+            sup.filter(SparseEfficiencyWarning, "CSC or CSR matrix format is")
+            spsolve_triangular(A, b, unit_diagonal=True)
+
+    @pytest.mark.parametrize("fmt",["csr","csc"])
+    def test_singular(self,fmt):
+        n = 5
+        if fmt == "csr":
+            A = csr_array((n, n))
+        else:
+            A = csc_array((n, n))
+        b = np.arange(n)
+        for lower in (True, False):
+            assert_raises(scipy.linalg.LinAlgError,
+                          spsolve_triangular, A, b, lower=lower)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_bad_shape(self):
+        # A is not square.
+        A = np.zeros((3, 4))
+        b = ones((4, 1))
+        assert_raises(ValueError, spsolve_triangular, A, b)
+        # A2 and b2 have incompatible shapes.
+        A2 = csr_array(eye(3))
+        b2 = array([1.0, 2.0])
+        assert_raises(ValueError, spsolve_triangular, A2, b2)
+
+    @pytest.mark.thread_unsafe
+    @sup_sparse_efficiency
+    def test_input_types(self):
+        A = array([[1., 0.], [1., 2.]])
+        b = array([[2., 0.], [2., 2.]])
+        for matrix_type in (array, csc_array, csr_array):
+            x = spsolve_triangular(matrix_type(A), b, lower=True)
+            assert_array_almost_equal(A.dot(x), b)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.slow
+    @sup_sparse_efficiency
+    @pytest.mark.parametrize("n", [10, 10**2, 10**3])
+    @pytest.mark.parametrize("m", [1, 10])
+    @pytest.mark.parametrize("lower", [True, False])
+    @pytest.mark.parametrize("format", ["csr", "csc"])
+    @pytest.mark.parametrize("unit_diagonal", [False, True])
+    @pytest.mark.parametrize("choice_of_A", ["real", "complex"])
+    @pytest.mark.parametrize("choice_of_b", ["floats", "ints", "complexints"])
+    def test_random(self, n, m, lower, format, unit_diagonal, choice_of_A, choice_of_b):
+        def random_triangle_matrix(n, lower=True, format="csr", choice_of_A="real"):
+            if choice_of_A == "real":
+                dtype = np.float64
+            elif choice_of_A == "complex":
+                dtype = np.complex128
+            else:
+                raise ValueError("choice_of_A must be 'real' or 'complex'.")
+            rng = np.random.default_rng(789002319)
+            rvs = rng.random
+            A = scipy.sparse.random(n, n, density=0.1, format='lil', dtype=dtype,
+                    random_state=rng, data_rvs=rvs)
+            if lower:
+                A = scipy.sparse.tril(A, format="lil")
+            else:
+                A = scipy.sparse.triu(A, format="lil")
+            for i in range(n):
+                A[i, i] = np.random.rand() + 1
+            if format == "csc":
+                A = A.tocsc(copy=False)
+            else:
+                A = A.tocsr(copy=False)
+            return A
+
+        np.random.seed(1234)
+        A = random_triangle_matrix(n, lower=lower)
+        if choice_of_b == "floats":
+            b = np.random.rand(n, m)
+        elif choice_of_b == "ints":
+            b = np.random.randint(-9, 9, (n, m))
+        elif choice_of_b == "complexints":
+            b = np.random.randint(-9, 9, (n, m)) + np.random.randint(-9, 9, (n, m)) * 1j
+        else:
+            raise ValueError(
+                "choice_of_b must be 'floats', 'ints', or 'complexints'.")
+        x = spsolve_triangular(A, b, lower=lower, unit_diagonal=unit_diagonal)
+        if unit_diagonal:
+            A.setdiag(1)
+        assert_allclose(A.dot(x), b, atol=1.5e-6)
+
+
+@pytest.mark.thread_unsafe
+@sup_sparse_efficiency
+@pytest.mark.parametrize("nnz", [10, 10**2, 10**3])
+@pytest.mark.parametrize("fmt", ["csr", "csc", "coo", "dia", "dok", "lil"])
+def test_is_sptriangular_and_spbandwidth(nnz, fmt):
+    rng = np.random.default_rng(42)
+
+    N = nnz // 2
+    dens = 0.1
+    A = scipy.sparse.random_array((N, N), density=dens, format="csr", rng=rng)
+    A[1, 3] = A[3, 1] = 22  # ensure not upper or lower
+    A = A.asformat(fmt)
+    AU = scipy.sparse.triu(A, format=fmt)
+    AL = scipy.sparse.tril(A, format=fmt)
+    D = 0.1 * scipy.sparse.eye_array(N, format=fmt)
+
+    assert is_sptriangular(A) == (False, False)
+    assert is_sptriangular(AL) == (True, False)
+    assert is_sptriangular(AU) == (False, True)
+    assert is_sptriangular(D) == (True, True)
+
+    assert spbandwidth(A) == scipy.linalg.bandwidth(A.toarray())
+    assert spbandwidth(AU) == scipy.linalg.bandwidth(AU.toarray())
+    assert spbandwidth(AL) == scipy.linalg.bandwidth(AL.toarray())
+    assert spbandwidth(D) == scipy.linalg.bandwidth(D.toarray())
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..25278d34ecd3353d409a25f7a94797902fe6ef93
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__init__.py
@@ -0,0 +1,22 @@
+"""
+Sparse Eigenvalue Solvers
+-------------------------
+
+The submodules of sparse.linalg._eigen:
+    1. lobpcg: Locally Optimal Block Preconditioned Conjugate Gradient Method
+
+"""
+from .arpack import *
+from .lobpcg import *
+from ._svds import svds
+
+from . import arpack
+
+__all__ = [
+    'ArpackError', 'ArpackNoConvergence',
+    'eigs', 'eigsh', 'lobpcg', 'svds'
+]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..adb14054e4106296f950ef35946aa5005a68d0c3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/_svds.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/_svds.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a2e01f5be25610ef77e24a2c6a6ce6f5e6d13657
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/__pycache__/_svds.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce57e841f9f163edd3945f248a653c94acd2a93c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds.py
@@ -0,0 +1,540 @@
+import math
+import numpy as np
+
+from .arpack import _arpack  # type: ignore[attr-defined]
+from . import eigsh
+
+from scipy._lib._util import check_random_state, _transition_to_rng
+from scipy.sparse.linalg._interface import LinearOperator, aslinearoperator
+from scipy.sparse.linalg._eigen.lobpcg import lobpcg  # type: ignore[no-redef]
+from scipy.sparse.linalg._svdp import _svdp
+from scipy.linalg import svd
+
+arpack_int = _arpack.timing.nbx.dtype
+__all__ = ['svds']
+
+
+def _herm(x):
+    return x.T.conj()
+
+
+def _iv(A, k, ncv, tol, which, v0, maxiter,
+        return_singular, solver, rng):
+
+    # input validation/standardization for `solver`
+    # out of order because it's needed for other parameters
+    solver = str(solver).lower()
+    solvers = {"arpack", "lobpcg", "propack"}
+    if solver not in solvers:
+        raise ValueError(f"solver must be one of {solvers}.")
+
+    # input validation/standardization for `A`
+    A = aslinearoperator(A)  # this takes care of some input validation
+    if not np.issubdtype(A.dtype, np.number):
+        message = "`A` must be of numeric data type."
+        raise ValueError(message)
+    if math.prod(A.shape) == 0:
+        message = "`A` must not be empty."
+        raise ValueError(message)
+
+    # input validation/standardization for `k`
+    kmax = min(A.shape) if solver == 'propack' else min(A.shape) - 1
+    if int(k) != k or not (0 < k <= kmax):
+        message = "`k` must be an integer satisfying `0 < k < min(A.shape)`."
+        raise ValueError(message)
+    k = int(k)
+
+    # input validation/standardization for `ncv`
+    if solver == "arpack" and ncv is not None:
+        if int(ncv) != ncv or not (k < ncv < min(A.shape)):
+            message = ("`ncv` must be an integer satisfying "
+                       "`k < ncv < min(A.shape)`.")
+            raise ValueError(message)
+        ncv = int(ncv)
+
+    # input validation/standardization for `tol`
+    if tol < 0 or not np.isfinite(tol):
+        message = "`tol` must be a non-negative floating point value."
+        raise ValueError(message)
+    tol = float(tol)
+
+    # input validation/standardization for `which`
+    which = str(which).upper()
+    whichs = {'LM', 'SM'}
+    if which not in whichs:
+        raise ValueError(f"`which` must be in {whichs}.")
+
+    # input validation/standardization for `v0`
+    if v0 is not None:
+        v0 = np.atleast_1d(v0)
+        if not (np.issubdtype(v0.dtype, np.complexfloating)
+                or np.issubdtype(v0.dtype, np.floating)):
+            message = ("`v0` must be of floating or complex floating "
+                       "data type.")
+            raise ValueError(message)
+
+        shape = (A.shape[0],) if solver == 'propack' else (min(A.shape),)
+        if v0.shape != shape:
+            message = f"`v0` must have shape {shape}."
+            raise ValueError(message)
+
+    # input validation/standardization for `maxiter`
+    if maxiter is not None and (int(maxiter) != maxiter or maxiter <= 0):
+        message = "`maxiter` must be a positive integer."
+        raise ValueError(message)
+    maxiter = int(maxiter) if maxiter is not None else maxiter
+
+    # input validation/standardization for `return_singular_vectors`
+    # not going to be flexible with this; too complicated for little gain
+    rs_options = {True, False, "vh", "u"}
+    if return_singular not in rs_options:
+        raise ValueError(f"`return_singular_vectors` must be in {rs_options}.")
+
+    rng = check_random_state(rng)
+
+    return (A, k, ncv, tol, which, v0, maxiter,
+            return_singular, solver, rng)
+
+
+@_transition_to_rng("random_state", position_num=9)
+def svds(A, k=6, ncv=None, tol=0, which='LM', v0=None,
+         maxiter=None, return_singular_vectors=True,
+         solver='arpack', rng=None, options=None):
+    """
+    Partial singular value decomposition of a sparse matrix.
+
+    Compute the largest or smallest `k` singular values and corresponding
+    singular vectors of a sparse matrix `A`. The order in which the singular
+    values are returned is not guaranteed.
+
+    In the descriptions below, let ``M, N = A.shape``.
+
+    Parameters
+    ----------
+    A : ndarray, sparse matrix, or LinearOperator
+        Matrix to decompose of a floating point numeric dtype.
+    k : int, default: 6
+        Number of singular values and singular vectors to compute.
+        Must satisfy ``1 <= k <= kmax``, where ``kmax=min(M, N)`` for
+        ``solver='propack'`` and ``kmax=min(M, N) - 1`` otherwise.
+    ncv : int, optional
+        When ``solver='arpack'``, this is the number of Lanczos vectors
+        generated. See :ref:`'arpack' ` for details.
+        When ``solver='lobpcg'`` or ``solver='propack'``, this parameter is
+        ignored.
+    tol : float, optional
+        Tolerance for singular values. Zero (default) means machine precision.
+    which : {'LM', 'SM'}
+        Which `k` singular values to find: either the largest magnitude ('LM')
+        or smallest magnitude ('SM') singular values.
+    v0 : ndarray, optional
+        The starting vector for iteration; see method-specific
+        documentation (:ref:`'arpack' `,
+        :ref:`'lobpcg' `), or
+        :ref:`'propack' ` for details.
+    maxiter : int, optional
+        Maximum number of iterations; see method-specific
+        documentation (:ref:`'arpack' `,
+        :ref:`'lobpcg' `), or
+        :ref:`'propack' ` for details.
+    return_singular_vectors : {True, False, "u", "vh"}
+        Singular values are always computed and returned; this parameter
+        controls the computation and return of singular vectors.
+
+        - ``True``: return singular vectors.
+        - ``False``: do not return singular vectors.
+        - ``"u"``: if ``M <= N``, compute only the left singular vectors and
+          return ``None`` for the right singular vectors. Otherwise, compute
+          all singular vectors.
+        - ``"vh"``: if ``M > N``, compute only the right singular vectors and
+          return ``None`` for the left singular vectors. Otherwise, compute
+          all singular vectors.
+
+        If ``solver='propack'``, the option is respected regardless of the
+        matrix shape.
+
+    solver :  {'arpack', 'propack', 'lobpcg'}, optional
+            The solver used.
+            :ref:`'arpack' `,
+            :ref:`'lobpcg' `, and
+            :ref:`'propack' ` are supported.
+            Default: `'arpack'`.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    options : dict, optional
+        A dictionary of solver-specific options. No solver-specific options
+        are currently supported; this parameter is reserved for future use.
+
+    Returns
+    -------
+    u : ndarray, shape=(M, k)
+        Unitary matrix having left singular vectors as columns.
+    s : ndarray, shape=(k,)
+        The singular values.
+    vh : ndarray, shape=(k, N)
+        Unitary matrix having right singular vectors as rows.
+
+    Notes
+    -----
+    This is a naive implementation using ARPACK or LOBPCG as an eigensolver
+    on the matrix ``A.conj().T @ A`` or ``A @ A.conj().T``, depending on
+    which one is smaller size, followed by the Rayleigh-Ritz method
+    as postprocessing; see
+    Using the normal matrix, in Rayleigh-Ritz method, (2022, Nov. 19),
+    Wikipedia, https://w.wiki/4zms.
+
+    Alternatively, the PROPACK solver can be called.
+
+    Choices of the input matrix `A` numeric dtype may be limited.
+    Only ``solver="lobpcg"`` supports all floating point dtypes
+    real: 'np.float32', 'np.float64', 'np.longdouble' and
+    complex: 'np.complex64', 'np.complex128', 'np.clongdouble'.
+    The ``solver="arpack"`` supports only
+    'np.float32', 'np.float64', and 'np.complex128'.
+
+    Examples
+    --------
+    Construct a matrix `A` from singular values and vectors.
+
+    >>> import numpy as np
+    >>> from scipy import sparse, linalg, stats
+    >>> from scipy.sparse.linalg import svds, aslinearoperator, LinearOperator
+
+    Construct a dense matrix `A` from singular values and vectors.
+
+    >>> rng = np.random.default_rng(258265244568965474821194062361901728911)
+    >>> orthogonal = stats.ortho_group.rvs(10, random_state=rng)
+    >>> s = [1e-3, 1, 2, 3, 4]  # non-zero singular values
+    >>> u = orthogonal[:, :5]         # left singular vectors
+    >>> vT = orthogonal[:, 5:].T      # right singular vectors
+    >>> A = u @ np.diag(s) @ vT
+
+    With only four singular values/vectors, the SVD approximates the original
+    matrix.
+
+    >>> u4, s4, vT4 = svds(A, k=4)
+    >>> A4 = u4 @ np.diag(s4) @ vT4
+    >>> np.allclose(A4, A, atol=1e-3)
+    True
+
+    With all five non-zero singular values/vectors, we can reproduce
+    the original matrix more accurately.
+
+    >>> u5, s5, vT5 = svds(A, k=5)
+    >>> A5 = u5 @ np.diag(s5) @ vT5
+    >>> np.allclose(A5, A)
+    True
+
+    The singular values match the expected singular values.
+
+    >>> np.allclose(s5, s)
+    True
+
+    Since the singular values are not close to each other in this example,
+    every singular vector matches as expected up to a difference in sign.
+
+    >>> (np.allclose(np.abs(u5), np.abs(u)) and
+    ...  np.allclose(np.abs(vT5), np.abs(vT)))
+    True
+
+    The singular vectors are also orthogonal.
+
+    >>> (np.allclose(u5.T @ u5, np.eye(5)) and
+    ...  np.allclose(vT5 @ vT5.T, np.eye(5)))
+    True
+
+    If there are (nearly) multiple singular values, the corresponding
+    individual singular vectors may be unstable, but the whole invariant
+    subspace containing all such singular vectors is computed accurately
+    as can be measured by angles between subspaces via 'subspace_angles'.
+
+    >>> rng = np.random.default_rng(178686584221410808734965903901790843963)
+    >>> s = [1, 1 + 1e-6]  # non-zero singular values
+    >>> u, _ = np.linalg.qr(rng.standard_normal((99, 2)))
+    >>> v, _ = np.linalg.qr(rng.standard_normal((99, 2)))
+    >>> vT = v.T
+    >>> A = u @ np.diag(s) @ vT
+    >>> A = A.astype(np.float32)
+    >>> u2, s2, vT2 = svds(A, k=2, rng=rng)
+    >>> np.allclose(s2, s)
+    True
+
+    The angles between the individual exact and computed singular vectors
+    may not be so small. To check use:
+
+    >>> (linalg.subspace_angles(u2[:, :1], u[:, :1]) +
+    ...  linalg.subspace_angles(u2[:, 1:], u[:, 1:]))
+    array([0.06562513])  # may vary
+    >>> (linalg.subspace_angles(vT2[:1, :].T, vT[:1, :].T) +
+    ...  linalg.subspace_angles(vT2[1:, :].T, vT[1:, :].T))
+    array([0.06562507])  # may vary
+
+    As opposed to the angles between the 2-dimensional invariant subspaces
+    that these vectors span, which are small for rights singular vectors
+
+    >>> linalg.subspace_angles(u2, u).sum() < 1e-6
+    True
+
+    as well as for left singular vectors.
+
+    >>> linalg.subspace_angles(vT2.T, vT.T).sum() < 1e-6
+    True
+
+    The next example follows that of 'sklearn.decomposition.TruncatedSVD'.
+
+    >>> rng = np.random.default_rng(0)
+    >>> X_dense = rng.random(size=(100, 100))
+    >>> X_dense[:, 2 * np.arange(50)] = 0
+    >>> X = sparse.csr_array(X_dense)
+    >>> _, singular_values, _ = svds(X, k=5, rng=rng)
+    >>> print(singular_values)
+    [ 4.3221...  4.4043...  4.4907...  4.5858... 35.4549...]
+
+    The function can be called without the transpose of the input matrix
+    ever explicitly constructed.
+
+    >>> rng = np.random.default_rng(102524723947864966825913730119128190974)
+    >>> G = sparse.random_array((8, 9), density=0.5, rng=rng)
+    >>> Glo = aslinearoperator(G)
+    >>> _, singular_values_svds, _ = svds(Glo, k=5, rng=rng)
+    >>> _, singular_values_svd, _ = linalg.svd(G.toarray())
+    >>> np.allclose(singular_values_svds, singular_values_svd[-4::-1])
+    True
+
+    The most memory efficient scenario is where neither
+    the original matrix, nor its transpose, is explicitly constructed.
+    Our example computes the smallest singular values and vectors
+    of 'LinearOperator' constructed from the numpy function 'np.diff' used
+    column-wise to be consistent with 'LinearOperator' operating on columns.
+
+    >>> diff0 = lambda a: np.diff(a, axis=0)
+
+    Let us create the matrix from 'diff0' to be used for validation only.
+
+    >>> n = 5  # The dimension of the space.
+    >>> M_from_diff0 = diff0(np.eye(n))
+    >>> print(M_from_diff0.astype(int))
+    [[-1  1  0  0  0]
+     [ 0 -1  1  0  0]
+     [ 0  0 -1  1  0]
+     [ 0  0  0 -1  1]]
+
+    The matrix 'M_from_diff0' is bi-diagonal and could be alternatively
+    created directly by
+
+    >>> M = - np.eye(n - 1, n, dtype=int)
+    >>> np.fill_diagonal(M[:,1:], 1)
+    >>> np.allclose(M, M_from_diff0)
+    True
+
+    Its transpose
+
+    >>> print(M.T)
+    [[-1  0  0  0]
+     [ 1 -1  0  0]
+     [ 0  1 -1  0]
+     [ 0  0  1 -1]
+     [ 0  0  0  1]]
+
+    can be viewed as the incidence matrix; see
+    Incidence matrix, (2022, Nov. 19), Wikipedia, https://w.wiki/5YXU,
+    of a linear graph with 5 vertices and 4 edges. The 5x5 normal matrix
+    ``M.T @ M`` thus is
+
+    >>> print(M.T @ M)
+    [[ 1 -1  0  0  0]
+     [-1  2 -1  0  0]
+     [ 0 -1  2 -1  0]
+     [ 0  0 -1  2 -1]
+     [ 0  0  0 -1  1]]
+
+    the graph Laplacian, while the actually used in 'svds' smaller size
+    4x4 normal matrix ``M @ M.T``
+
+    >>> print(M @ M.T)
+    [[ 2 -1  0  0]
+     [-1  2 -1  0]
+     [ 0 -1  2 -1]
+     [ 0  0 -1  2]]
+
+    is the so-called edge-based Laplacian; see
+    Symmetric Laplacian via the incidence matrix, in Laplacian matrix,
+    (2022, Nov. 19), Wikipedia, https://w.wiki/5YXW.
+
+    The 'LinearOperator' setup needs the options 'rmatvec' and 'rmatmat'
+    of multiplication by the matrix transpose ``M.T``, but we want to be
+    matrix-free to save memory, so knowing how ``M.T`` looks like, we
+    manually construct the following function to be
+    used in ``rmatmat=diff0t``.
+
+    >>> def diff0t(a):
+    ...     if a.ndim == 1:
+    ...         a = a[:,np.newaxis]  # Turn 1D into 2D array
+    ...     d = np.zeros((a.shape[0] + 1, a.shape[1]), dtype=a.dtype)
+    ...     d[0, :] = - a[0, :]
+    ...     d[1:-1, :] = a[0:-1, :] - a[1:, :]
+    ...     d[-1, :] = a[-1, :]
+    ...     return d
+
+    We check that our function 'diff0t' for the matrix transpose is valid.
+
+    >>> np.allclose(M.T, diff0t(np.eye(n-1)))
+    True
+
+    Now we setup our matrix-free 'LinearOperator' called 'diff0_func_aslo'
+    and for validation the matrix-based 'diff0_matrix_aslo'.
+
+    >>> def diff0_func_aslo_def(n):
+    ...     return LinearOperator(matvec=diff0,
+    ...                           matmat=diff0,
+    ...                           rmatvec=diff0t,
+    ...                           rmatmat=diff0t,
+    ...                           shape=(n - 1, n))
+    >>> diff0_func_aslo = diff0_func_aslo_def(n)
+    >>> diff0_matrix_aslo = aslinearoperator(M_from_diff0)
+
+    And validate both the matrix and its transpose in 'LinearOperator'.
+
+    >>> np.allclose(diff0_func_aslo(np.eye(n)),
+    ...             diff0_matrix_aslo(np.eye(n)))
+    True
+    >>> np.allclose(diff0_func_aslo.T(np.eye(n-1)),
+    ...             diff0_matrix_aslo.T(np.eye(n-1)))
+    True
+
+    Having the 'LinearOperator' setup validated, we run the solver.
+
+    >>> n = 100
+    >>> diff0_func_aslo = diff0_func_aslo_def(n)
+    >>> u, s, vT = svds(diff0_func_aslo, k=3, which='SM')
+
+    The singular values squared and the singular vectors are known
+    explicitly; see
+    Pure Dirichlet boundary conditions, in
+    Eigenvalues and eigenvectors of the second derivative,
+    (2022, Nov. 19), Wikipedia, https://w.wiki/5YX6,
+    since 'diff' corresponds to first
+    derivative, and its smaller size n-1 x n-1 normal matrix
+    ``M @ M.T`` represent the discrete second derivative with the Dirichlet
+    boundary conditions. We use these analytic expressions for validation.
+
+    >>> se = 2. * np.sin(np.pi * np.arange(1, 4) / (2. * n))
+    >>> ue = np.sqrt(2 / n) * np.sin(np.pi * np.outer(np.arange(1, n),
+    ...                              np.arange(1, 4)) / n)
+    >>> np.allclose(s, se, atol=1e-3)
+    True
+    >>> np.allclose(np.abs(u), np.abs(ue), atol=1e-6)
+    True
+
+    """
+    args = _iv(A, k, ncv, tol, which, v0, maxiter, return_singular_vectors,
+               solver, rng)
+    (A, k, ncv, tol, which, v0, maxiter,
+     return_singular_vectors, solver, rng) = args
+
+    largest = (which == 'LM')
+    n, m = A.shape
+
+    if n >= m:
+        X_dot = A.matvec
+        X_matmat = A.matmat
+        XH_dot = A.rmatvec
+        XH_mat = A.rmatmat
+        transpose = False
+    else:
+        X_dot = A.rmatvec
+        X_matmat = A.rmatmat
+        XH_dot = A.matvec
+        XH_mat = A.matmat
+        transpose = True
+
+        dtype = getattr(A, 'dtype', None)
+        if dtype is None:
+            dtype = A.dot(np.zeros([m, 1])).dtype
+
+    def matvec_XH_X(x):
+        return XH_dot(X_dot(x))
+
+    def matmat_XH_X(x):
+        return XH_mat(X_matmat(x))
+
+    XH_X = LinearOperator(matvec=matvec_XH_X, dtype=A.dtype,
+                          matmat=matmat_XH_X,
+                          shape=(min(A.shape), min(A.shape)))
+
+    # Get a low rank approximation of the implicitly defined gramian matrix.
+    # This is not a stable way to approach the problem.
+    if solver == 'lobpcg':
+
+        if k == 1 and v0 is not None:
+            X = np.reshape(v0, (-1, 1))
+        else:
+            X = rng.standard_normal(size=(min(A.shape), k))
+
+        _, eigvec = lobpcg(XH_X, X, tol=tol ** 2, maxiter=maxiter,
+                           largest=largest)
+
+    elif solver == 'propack':
+        jobu = return_singular_vectors in {True, 'u'}
+        jobv = return_singular_vectors in {True, 'vh'}
+        irl_mode = (which == 'SM')
+        res = _svdp(A, k=k, tol=tol**2, which=which, maxiter=None,
+                    compute_u=jobu, compute_v=jobv, irl_mode=irl_mode,
+                    kmax=maxiter, v0=v0, rng=rng)
+
+        u, s, vh, _ = res  # but we'll ignore bnd, the last output
+
+        # PROPACK order appears to be largest first. `svds` output order is not
+        # guaranteed, according to documentation, but for ARPACK and LOBPCG
+        # they actually are ordered smallest to largest, so reverse for
+        # consistency.
+        s = s[::-1]
+        u = u[:, ::-1]
+        vh = vh[::-1]
+
+        u = u if jobu else None
+        vh = vh if jobv else None
+
+        if return_singular_vectors:
+            return u, s, vh
+        else:
+            return s
+
+    elif solver == 'arpack' or solver is None:
+        if v0 is None:
+            v0 = rng.standard_normal(size=(min(A.shape),))
+        _, eigvec = eigsh(XH_X, k=k, tol=tol ** 2, maxiter=maxiter,
+                          ncv=ncv, which=which, v0=v0)
+        # arpack do not guarantee exactly orthonormal eigenvectors
+        # for clustered eigenvalues, especially in complex arithmetic
+        eigvec, _ = np.linalg.qr(eigvec)
+
+    # the eigenvectors eigvec must be orthonomal here; see gh-16712
+    Av = X_matmat(eigvec)
+    if not return_singular_vectors:
+        s = svd(Av, compute_uv=False, overwrite_a=True)
+        return s[::-1]
+
+    # compute the left singular vectors of X and update the right ones
+    # accordingly
+    u, s, vh = svd(Av, full_matrices=False, overwrite_a=True)
+    u = u[:, ::-1]
+    s = s[::-1]
+    vh = vh[::-1]
+
+    jobu = return_singular_vectors in {True, 'u'}
+    jobv = return_singular_vectors in {True, 'vh'}
+
+    if transpose:
+        u_tmp = eigvec @ _herm(vh) if jobu else None
+        vh = _herm(u) if jobv else None
+        u = u_tmp
+    else:
+        if not jobu:
+            u = None
+        vh = vh @ _herm(eigvec) if jobv else None
+
+    return u, s, vh
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds_doc.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds_doc.py
new file mode 100644
index 0000000000000000000000000000000000000000..90b85876d2a69dd3c2efa56445e46c93bf0eaa9e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/_svds_doc.py
@@ -0,0 +1,382 @@
+def _svds_arpack_doc(A, k=6, ncv=None, tol=0, which='LM', v0=None,
+                     maxiter=None, return_singular_vectors=True,
+                     solver='arpack', rng=None):
+    """
+    Partial singular value decomposition of a sparse matrix using ARPACK.
+
+    Compute the largest or smallest `k` singular values and corresponding
+    singular vectors of a sparse matrix `A`. The order in which the singular
+    values are returned is not guaranteed.
+
+    In the descriptions below, let ``M, N = A.shape``.
+
+    Parameters
+    ----------
+    A : sparse matrix or LinearOperator
+        Matrix to decompose.
+    k : int, optional
+        Number of singular values and singular vectors to compute.
+        Must satisfy ``1 <= k <= min(M, N) - 1``.
+        Default is 6.
+    ncv : int, optional
+        The number of Lanczos vectors generated.
+        The default is ``min(n, max(2*k + 1, 20))``.
+        If specified, must satisfy ``k + 1 < ncv < min(M, N)``; ``ncv > 2*k``
+        is recommended.
+    tol : float, optional
+        Tolerance for singular values. Zero (default) means machine precision.
+    which : {'LM', 'SM'}
+        Which `k` singular values to find: either the largest magnitude ('LM')
+        or smallest magnitude ('SM') singular values.
+    v0 : ndarray, optional
+        The starting vector for iteration:
+        an (approximate) left singular vector if ``N > M`` and a right singular
+        vector otherwise. Must be of length ``min(M, N)``.
+        Default: random
+    maxiter : int, optional
+        Maximum number of Arnoldi update iterations allowed;
+        default is ``min(M, N) * 10``.
+    return_singular_vectors : {True, False, "u", "vh"}
+        Singular values are always computed and returned; this parameter
+        controls the computation and return of singular vectors.
+
+        - ``True``: return singular vectors.
+        - ``False``: do not return singular vectors.
+        - ``"u"``: if ``M <= N``, compute only the left singular vectors and
+          return ``None`` for the right singular vectors. Otherwise, compute
+          all singular vectors.
+        - ``"vh"``: if ``M > N``, compute only the right singular vectors and
+          return ``None`` for the left singular vectors. Otherwise, compute
+          all singular vectors.
+
+    solver :  {'arpack', 'propack', 'lobpcg'}, optional
+            This is the solver-specific documentation for ``solver='arpack'``.
+            :ref:`'lobpcg' ` and
+            :ref:`'propack' `
+            are also supported.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    options : dict, optional
+        A dictionary of solver-specific options. No solver-specific options
+        are currently supported; this parameter is reserved for future use.
+
+    Returns
+    -------
+    u : ndarray, shape=(M, k)
+        Unitary matrix having left singular vectors as columns.
+    s : ndarray, shape=(k,)
+        The singular values.
+    vh : ndarray, shape=(k, N)
+        Unitary matrix having right singular vectors as rows.
+
+    Notes
+    -----
+    This is a naive implementation using ARPACK as an eigensolver
+    on ``A.conj().T @ A`` or ``A @ A.conj().T``, depending on which one is more
+    efficient.
+
+    Examples
+    --------
+    Construct a matrix ``A`` from singular values and vectors.
+
+    >>> import numpy as np
+    >>> from scipy.stats import ortho_group
+    >>> from scipy.sparse import csc_array, diags_array
+    >>> from scipy.sparse.linalg import svds
+    >>> rng = np.random.default_rng()
+    >>> orthogonal = csc_array(ortho_group.rvs(10, random_state=rng))
+    >>> s = [0.0001, 0.001, 3, 4, 5]  # singular values
+    >>> u = orthogonal[:, :5]         # left singular vectors
+    >>> vT = orthogonal[:, 5:].T      # right singular vectors
+    >>> A = u @ diags_array(s) @ vT
+
+    With only three singular values/vectors, the SVD approximates the original
+    matrix.
+
+    >>> u2, s2, vT2 = svds(A, k=3, solver='arpack')
+    >>> A2 = u2 @ np.diag(s2) @ vT2
+    >>> np.allclose(A2, A.toarray(), atol=1e-3)
+    True
+
+    With all five singular values/vectors, we can reproduce the original
+    matrix.
+
+    >>> u3, s3, vT3 = svds(A, k=5, solver='arpack')
+    >>> A3 = u3 @ np.diag(s3) @ vT3
+    >>> np.allclose(A3, A.toarray())
+    True
+
+    The singular values match the expected singular values, and the singular
+    vectors are as expected up to a difference in sign.
+
+    >>> (np.allclose(s3, s) and
+    ...  np.allclose(np.abs(u3), np.abs(u.toarray())) and
+    ...  np.allclose(np.abs(vT3), np.abs(vT.toarray())))
+    True
+
+    The singular vectors are also orthogonal.
+
+    >>> (np.allclose(u3.T @ u3, np.eye(5)) and
+    ...  np.allclose(vT3 @ vT3.T, np.eye(5)))
+    True
+    """
+    pass
+
+
+def _svds_lobpcg_doc(A, k=6, ncv=None, tol=0, which='LM', v0=None,
+                     maxiter=None, return_singular_vectors=True,
+                     solver='lobpcg', rng=None):
+    """
+    Partial singular value decomposition of a sparse matrix using LOBPCG.
+
+    Compute the largest or smallest `k` singular values and corresponding
+    singular vectors of a sparse matrix `A`. The order in which the singular
+    values are returned is not guaranteed.
+
+    In the descriptions below, let ``M, N = A.shape``.
+
+    Parameters
+    ----------
+    A : sparse matrix or LinearOperator
+        Matrix to decompose.
+    k : int, default: 6
+        Number of singular values and singular vectors to compute.
+        Must satisfy ``1 <= k <= min(M, N) - 1``.
+    ncv : int, optional
+        Ignored.
+    tol : float, optional
+        Tolerance for singular values. Zero (default) means machine precision.
+    which : {'LM', 'SM'}
+        Which `k` singular values to find: either the largest magnitude ('LM')
+        or smallest magnitude ('SM') singular values.
+    v0 : ndarray, optional
+        If `k` is 1, the starting vector for iteration:
+        an (approximate) left singular vector if ``N > M`` and a right singular
+        vector otherwise. Must be of length ``min(M, N)``.
+        Ignored otherwise.
+        Default: random
+    maxiter : int, default: 20
+        Maximum number of iterations.
+    return_singular_vectors : {True, False, "u", "vh"}
+        Singular values are always computed and returned; this parameter
+        controls the computation and return of singular vectors.
+
+        - ``True``: return singular vectors.
+        - ``False``: do not return singular vectors.
+        - ``"u"``: if ``M <= N``, compute only the left singular vectors and
+          return ``None`` for the right singular vectors. Otherwise, compute
+          all singular vectors.
+        - ``"vh"``: if ``M > N``, compute only the right singular vectors and
+          return ``None`` for the left singular vectors. Otherwise, compute
+          all singular vectors.
+
+    solver :  {'arpack', 'propack', 'lobpcg'}, optional
+            This is the solver-specific documentation for ``solver='lobpcg'``.
+            :ref:`'arpack' ` and
+            :ref:`'propack' `
+            are also supported.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    options : dict, optional
+        A dictionary of solver-specific options. No solver-specific options
+        are currently supported; this parameter is reserved for future use.
+
+    Returns
+    -------
+    u : ndarray, shape=(M, k)
+        Unitary matrix having left singular vectors as columns.
+    s : ndarray, shape=(k,)
+        The singular values.
+    vh : ndarray, shape=(k, N)
+        Unitary matrix having right singular vectors as rows.
+
+    Notes
+    -----
+    This is a naive implementation using LOBPCG as an eigensolver
+    on ``A.conj().T @ A`` or ``A @ A.conj().T``, depending on which one is more
+    efficient.
+
+    Examples
+    --------
+    Construct a matrix ``A`` from singular values and vectors.
+
+    >>> import numpy as np
+    >>> from scipy.stats import ortho_group
+    >>> from scipy.sparse import csc_array, diags_array
+    >>> from scipy.sparse.linalg import svds
+    >>> rng = np.random.default_rng()
+    >>> orthogonal = csc_array(ortho_group.rvs(10, random_state=rng))
+    >>> s = [0.0001, 0.001, 3, 4, 5]  # singular values
+    >>> u = orthogonal[:, :5]         # left singular vectors
+    >>> vT = orthogonal[:, 5:].T      # right singular vectors
+    >>> A = u @ diags_array(s) @ vT
+
+    With only three singular values/vectors, the SVD approximates the original
+    matrix.
+
+    >>> u2, s2, vT2 = svds(A, k=3, solver='lobpcg')
+    >>> A2 = u2 @ np.diag(s2) @ vT2
+    >>> np.allclose(A2, A.toarray(), atol=1e-3)
+    True
+
+    With all five singular values/vectors, we can reproduce the original
+    matrix.
+
+    >>> u3, s3, vT3 = svds(A, k=5, solver='lobpcg')
+    >>> A3 = u3 @ np.diag(s3) @ vT3
+    >>> np.allclose(A3, A.toarray())
+    True
+
+    The singular values match the expected singular values, and the singular
+    vectors are as expected up to a difference in sign.
+
+    >>> (np.allclose(s3, s) and
+    ...  np.allclose(np.abs(u3), np.abs(u.todense())) and
+    ...  np.allclose(np.abs(vT3), np.abs(vT.todense())))
+    True
+
+    The singular vectors are also orthogonal.
+
+    >>> (np.allclose(u3.T @ u3, np.eye(5)) and
+    ...  np.allclose(vT3 @ vT3.T, np.eye(5)))
+    True
+
+    """
+    pass
+
+
+def _svds_propack_doc(A, k=6, ncv=None, tol=0, which='LM', v0=None,
+                      maxiter=None, return_singular_vectors=True,
+                      solver='propack', rng=None):
+    """
+    Partial singular value decomposition of a sparse matrix using PROPACK.
+
+    Compute the largest or smallest `k` singular values and corresponding
+    singular vectors of a sparse matrix `A`. The order in which the singular
+    values are returned is not guaranteed.
+
+    In the descriptions below, let ``M, N = A.shape``.
+
+    Parameters
+    ----------
+    A : sparse matrix or LinearOperator
+        Matrix to decompose. If `A` is a ``LinearOperator``
+        object, it must define both ``matvec`` and ``rmatvec`` methods.
+    k : int, default: 6
+        Number of singular values and singular vectors to compute.
+        Must satisfy ``1 <= k <= min(M, N)``.
+    ncv : int, optional
+        Ignored.
+    tol : float, optional
+        The desired relative accuracy for computed singular values.
+        Zero (default) means machine precision.
+    which : {'LM', 'SM'}
+        Which `k` singular values to find: either the largest magnitude ('LM')
+        or smallest magnitude ('SM') singular values. Note that choosing
+        ``which='SM'`` will force the ``irl`` option to be set ``True``.
+    v0 : ndarray, optional
+        Starting vector for iterations: must be of length ``A.shape[0]``.
+        If not specified, PROPACK will generate a starting vector.
+    maxiter : int, optional
+        Maximum number of iterations / maximal dimension of the Krylov
+        subspace. Default is ``10 * k``.
+    return_singular_vectors : {True, False, "u", "vh"}
+        Singular values are always computed and returned; this parameter
+        controls the computation and return of singular vectors.
+
+        - ``True``: return singular vectors.
+        - ``False``: do not return singular vectors.
+        - ``"u"``: compute only the left singular vectors; return ``None`` for
+          the right singular vectors.
+        - ``"vh"``: compute only the right singular vectors; return ``None``
+          for the left singular vectors.
+
+    solver :  {'arpack', 'propack', 'lobpcg'}, optional
+            This is the solver-specific documentation for ``solver='propack'``.
+            :ref:`'arpack' ` and
+            :ref:`'lobpcg' `
+            are also supported.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+    options : dict, optional
+        A dictionary of solver-specific options. No solver-specific options
+        are currently supported; this parameter is reserved for future use.
+
+    Returns
+    -------
+    u : ndarray, shape=(M, k)
+        Unitary matrix having left singular vectors as columns.
+    s : ndarray, shape=(k,)
+        The singular values.
+    vh : ndarray, shape=(k, N)
+        Unitary matrix having right singular vectors as rows.
+
+    Notes
+    -----
+    This is an interface to the Fortran library PROPACK [1]_.
+    The current default is to run with IRL mode disabled unless seeking the
+    smallest singular values/vectors (``which='SM'``).
+
+    References
+    ----------
+
+    .. [1] Larsen, Rasmus Munk. "PROPACK-Software for large and sparse SVD
+       calculations." Available online. URL
+       http://sun.stanford.edu/~rmunk/PROPACK (2004): 2008-2009.
+
+    Examples
+    --------
+    Construct a matrix ``A`` from singular values and vectors.
+
+    >>> import numpy as np
+    >>> from scipy.stats import ortho_group
+    >>> from scipy.sparse import csc_array, diags_array
+    >>> from scipy.sparse.linalg import svds
+    >>> rng = np.random.default_rng()
+    >>> orthogonal = csc_array(ortho_group.rvs(10, random_state=rng))
+    >>> s = [0.0001, 0.001, 3, 4, 5]  # singular values
+    >>> u = orthogonal[:, :5]         # left singular vectors
+    >>> vT = orthogonal[:, 5:].T      # right singular vectors
+    >>> A = u @ diags_array(s) @ vT
+
+    With only three singular values/vectors, the SVD approximates the original
+    matrix.
+
+    >>> u2, s2, vT2 = svds(A, k=3, solver='propack')
+    >>> A2 = u2 @ np.diag(s2) @ vT2
+    >>> np.allclose(A2, A.todense(), atol=1e-3)
+    True
+
+    With all five singular values/vectors, we can reproduce the original
+    matrix.
+
+    >>> u3, s3, vT3 = svds(A, k=5, solver='propack')
+    >>> A3 = u3 @ np.diag(s3) @ vT3
+    >>> np.allclose(A3, A.todense())
+    True
+
+    The singular values match the expected singular values, and the singular
+    vectors are as expected up to a difference in sign.
+
+    >>> (np.allclose(s3, s) and
+    ...  np.allclose(np.abs(u3), np.abs(u.toarray())) and
+    ...  np.allclose(np.abs(vT3), np.abs(vT.toarray())))
+    True
+
+    The singular vectors are also orthogonal.
+
+    >>> (np.allclose(u3.T @ u3, np.eye(5)) and
+    ...  np.allclose(vT3 @ vT3.T, np.eye(5)))
+    True
+
+    """
+    pass
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/COPYING b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..e87667e1b8c178e53c6a7c6268ebc09ab4b0476c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/COPYING
@@ -0,0 +1,45 @@
+
+BSD Software License
+
+Pertains to ARPACK and P_ARPACK
+
+Copyright (c) 1996-2008 Rice University.
+Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff.
+All rights reserved.
+
+Arpack has been renamed to arpack-ng.
+
+Copyright (c) 2001-2011 - Scilab Enterprises
+Updated by Allan Cornet, Sylvestre Ledru.
+
+Copyright (c) 2010 - Jordi Gutiérrez Hermoso (Octave patch)
+
+Copyright (c) 2007 - Sébastien Fabbro (gentoo patch)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+- Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer listed
+  in this license in the documentation and/or other materials
+  provided with the distribution.
+
+- Neither the name of the copyright holders nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..679b94480d7ff5a11e037ffb758f2214c6e5097f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__init__.py
@@ -0,0 +1,20 @@
+"""
+Eigenvalue solver using iterative methods.
+
+Find k eigenvectors and eigenvalues of a matrix A using the
+Arnoldi/Lanczos iterative methods from ARPACK [1]_,[2]_.
+
+These methods are most useful for large sparse matrices.
+
+  - eigs(A,k)
+  - eigsh(A,k)
+
+References
+----------
+.. [1] ARPACK Software, http://www.caam.rice.edu/software/ARPACK/
+.. [2] R. B. Lehoucq, D. C. Sorensen, and C. Yang,  ARPACK USERS GUIDE:
+   Solution of Large Scale Eigenvalue Problems by Implicitly Restarted
+   Arnoldi Methods. SIAM, Philadelphia, PA, 1998.
+
+"""
+from .arpack import *
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..57f596e2519dbd56adfc3854df1ff19e1dba8760
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/arpack.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/arpack.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b80feb350173f7d6541c2292227932de4bf6a862
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/__pycache__/arpack.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..623b605b2da51b462c88b97c8083bc1a135cc161
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/arpack.py
@@ -0,0 +1,1700 @@
+"""
+Find a few eigenvectors and eigenvalues of a matrix.
+
+
+Uses ARPACK: https://github.com/opencollab/arpack-ng
+
+"""
+# Wrapper implementation notes
+#
+# ARPACK Entry Points
+# -------------------
+# The entry points to ARPACK are
+# - (s,d)seupd : single and double precision symmetric matrix
+# - (s,d,c,z)neupd: single,double,complex,double complex general matrix
+# This wrapper puts the *neupd (general matrix) interfaces in eigs()
+# and the *seupd (symmetric matrix) in eigsh().
+# There is no specialized interface for complex Hermitian matrices.
+# To find eigenvalues of a complex Hermitian matrix you
+# may use eigsh(), but eigsh() will simply call eigs()
+# and return the real part of the eigenvalues thus obtained.
+
+# Number of eigenvalues returned and complex eigenvalues
+# ------------------------------------------------------
+# The ARPACK nonsymmetric real and double interface (s,d)naupd return
+# eigenvalues and eigenvectors in real (float,double) arrays.
+# Since the eigenvalues and eigenvectors are, in general, complex
+# ARPACK puts the real and imaginary parts in consecutive entries
+# in real-valued arrays.   This wrapper puts the real entries
+# into complex data types and attempts to return the requested eigenvalues
+# and eigenvectors.
+
+
+# Solver modes
+# ------------
+# ARPACK and handle shifted and shift-inverse computations
+# for eigenvalues by providing a shift (sigma) and a solver.
+
+import numpy as np
+import warnings
+from scipy.sparse.linalg._interface import aslinearoperator, LinearOperator
+from scipy.sparse import eye, issparse
+from scipy.linalg import eig, eigh, lu_factor, lu_solve
+from scipy.sparse._sputils import (
+    convert_pydata_sparse_to_scipy, isdense, is_pydata_spmatrix,
+)
+from scipy.sparse.linalg import gmres, splu
+from scipy._lib._util import _aligned_zeros
+from scipy._lib._threadsafety import ReentrancyLock
+from . import _arpack
+arpack_int = _arpack.timing.nbx.dtype
+
+__docformat__ = "restructuredtext en"
+
+__all__ = ['eigs', 'eigsh', 'ArpackError', 'ArpackNoConvergence']
+
+
+_type_conv = {'f': 's', 'd': 'd', 'F': 'c', 'D': 'z'}
+_ndigits = {'f': 5, 'd': 12, 'F': 5, 'D': 12}
+
+DNAUPD_ERRORS = {
+    0: "Normal exit.",
+    1: "Maximum number of iterations taken. "
+       "All possible eigenvalues of OP has been found. IPARAM(5) "
+       "returns the number of wanted converged Ritz values.",
+    2: "No longer an informational error. Deprecated starting "
+       "with release 2 of ARPACK.",
+    3: "No shifts could be applied during a cycle of the "
+       "Implicitly restarted Arnoldi iteration. One possibility "
+       "is to increase the size of NCV relative to NEV. ",
+    -1: "N must be positive.",
+    -2: "NEV must be positive.",
+    -3: "NCV-NEV >= 2 and less than or equal to N.",
+    -4: "The maximum number of Arnoldi update iterations allowed "
+        "must be greater than zero.",
+    -5: " WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI', 'SI'",
+    -6: "BMAT must be one of 'I' or 'G'.",
+    -7: "Length of private work array WORKL is not sufficient.",
+    -8: "Error return from LAPACK eigenvalue calculation;",
+    -9: "Starting vector is zero.",
+    -10: "IPARAM(7) must be 1,2,3,4.",
+    -11: "IPARAM(7) = 1 and BMAT = 'G' are incompatible.",
+    -12: "IPARAM(1) must be equal to 0 or 1.",
+    -13: "NEV and WHICH = 'BE' are incompatible.",
+    -9999: "Could not build an Arnoldi factorization. "
+           "IPARAM(5) returns the size of the current Arnoldi "
+           "factorization. The user is advised to check that "
+           "enough workspace and array storage has been allocated."
+}
+
+SNAUPD_ERRORS = DNAUPD_ERRORS
+
+ZNAUPD_ERRORS = DNAUPD_ERRORS.copy()
+ZNAUPD_ERRORS[-10] = "IPARAM(7) must be 1,2,3."
+
+CNAUPD_ERRORS = ZNAUPD_ERRORS
+
+DSAUPD_ERRORS = {
+    0: "Normal exit.",
+    1: "Maximum number of iterations taken. "
+       "All possible eigenvalues of OP has been found.",
+    2: "No longer an informational error. Deprecated starting with "
+       "release 2 of ARPACK.",
+    3: "No shifts could be applied during a cycle of the Implicitly "
+       "restarted Arnoldi iteration. One possibility is to increase "
+       "the size of NCV relative to NEV. ",
+    -1: "N must be positive.",
+    -2: "NEV must be positive.",
+    -3: "NCV must be greater than NEV and less than or equal to N.",
+    -4: "The maximum number of Arnoldi update iterations allowed "
+        "must be greater than zero.",
+    -5: "WHICH must be one of 'LM', 'SM', 'LA', 'SA' or 'BE'.",
+    -6: "BMAT must be one of 'I' or 'G'.",
+    -7: "Length of private work array WORKL is not sufficient.",
+    -8: "Error return from trid. eigenvalue calculation; "
+        "Informational error from LAPACK routine dsteqr .",
+    -9: "Starting vector is zero.",
+    -10: "IPARAM(7) must be 1,2,3,4,5.",
+    -11: "IPARAM(7) = 1 and BMAT = 'G' are incompatible.",
+    -12: "IPARAM(1) must be equal to 0 or 1.",
+    -13: "NEV and WHICH = 'BE' are incompatible. ",
+    -9999: "Could not build an Arnoldi factorization. "
+           "IPARAM(5) returns the size of the current Arnoldi "
+           "factorization. The user is advised to check that "
+           "enough workspace and array storage has been allocated.",
+}
+
+SSAUPD_ERRORS = DSAUPD_ERRORS
+
+DNEUPD_ERRORS = {
+    0: "Normal exit.",
+    1: "The Schur form computed by LAPACK routine dlahqr "
+       "could not be reordered by LAPACK routine dtrsen. "
+       "Re-enter subroutine dneupd  with IPARAM(5)NCV and "
+       "increase the size of the arrays DR and DI to have "
+       "dimension at least dimension NCV and allocate at least NCV "
+       "columns for Z. NOTE: Not necessary if Z and V share "
+       "the same space. Please notify the authors if this error"
+       "occurs.",
+    -1: "N must be positive.",
+    -2: "NEV must be positive.",
+    -3: "NCV-NEV >= 2 and less than or equal to N.",
+    -5: "WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI', 'SI'",
+    -6: "BMAT must be one of 'I' or 'G'.",
+    -7: "Length of private work WORKL array is not sufficient.",
+    -8: "Error return from calculation of a real Schur form. "
+        "Informational error from LAPACK routine dlahqr .",
+    -9: "Error return from calculation of eigenvectors. "
+        "Informational error from LAPACK routine dtrevc.",
+    -10: "IPARAM(7) must be 1,2,3,4.",
+    -11: "IPARAM(7) = 1 and BMAT = 'G' are incompatible.",
+    -12: "HOWMNY = 'S' not yet implemented",
+    -13: "HOWMNY must be one of 'A' or 'P' if RVEC = .true.",
+    -14: "DNAUPD  did not find any eigenvalues to sufficient "
+         "accuracy.",
+    -15: "DNEUPD got a different count of the number of converged "
+         "Ritz values than DNAUPD got.  This indicates the user "
+         "probably made an error in passing data from DNAUPD to "
+         "DNEUPD or that the data was modified before entering "
+         "DNEUPD",
+}
+
+SNEUPD_ERRORS = DNEUPD_ERRORS.copy()
+SNEUPD_ERRORS[1] = ("The Schur form computed by LAPACK routine slahqr "
+                    "could not be reordered by LAPACK routine strsen . "
+                    "Re-enter subroutine dneupd  with IPARAM(5)=NCV and "
+                    "increase the size of the arrays DR and DI to have "
+                    "dimension at least dimension NCV and allocate at least "
+                    "NCV columns for Z. NOTE: Not necessary if Z and V share "
+                    "the same space. Please notify the authors if this error "
+                    "occurs.")
+SNEUPD_ERRORS[-14] = ("SNAUPD did not find any eigenvalues to sufficient "
+                      "accuracy.")
+SNEUPD_ERRORS[-15] = ("SNEUPD got a different count of the number of "
+                      "converged Ritz values than SNAUPD got.  This indicates "
+                      "the user probably made an error in passing data from "
+                      "SNAUPD to SNEUPD or that the data was modified before "
+                      "entering SNEUPD")
+
+ZNEUPD_ERRORS = {0: "Normal exit.",
+                 1: "The Schur form computed by LAPACK routine csheqr "
+                    "could not be reordered by LAPACK routine ztrsen. "
+                    "Re-enter subroutine zneupd with IPARAM(5)=NCV and "
+                    "increase the size of the array D to have "
+                    "dimension at least dimension NCV and allocate at least "
+                    "NCV columns for Z. NOTE: Not necessary if Z and V share "
+                    "the same space. Please notify the authors if this error "
+                    "occurs.",
+                 -1: "N must be positive.",
+                 -2: "NEV must be positive.",
+                 -3: "NCV-NEV >= 1 and less than or equal to N.",
+                 -5: "WHICH must be one of 'LM', 'SM', 'LR', 'SR', 'LI', 'SI'",
+                 -6: "BMAT must be one of 'I' or 'G'.",
+                 -7: "Length of private work WORKL array is not sufficient.",
+                 -8: "Error return from LAPACK eigenvalue calculation. "
+                     "This should never happened.",
+                 -9: "Error return from calculation of eigenvectors. "
+                     "Informational error from LAPACK routine ztrevc.",
+                 -10: "IPARAM(7) must be 1,2,3",
+                 -11: "IPARAM(7) = 1 and BMAT = 'G' are incompatible.",
+                 -12: "HOWMNY = 'S' not yet implemented",
+                 -13: "HOWMNY must be one of 'A' or 'P' if RVEC = .true.",
+                 -14: "ZNAUPD did not find any eigenvalues to sufficient "
+                      "accuracy.",
+                 -15: "ZNEUPD got a different count of the number of "
+                      "converged Ritz values than ZNAUPD got.  This "
+                      "indicates the user probably made an error in passing "
+                      "data from ZNAUPD to ZNEUPD or that the data was "
+                      "modified before entering ZNEUPD"
+                 }
+
+CNEUPD_ERRORS = ZNEUPD_ERRORS.copy()
+CNEUPD_ERRORS[-14] = ("CNAUPD did not find any eigenvalues to sufficient "
+                      "accuracy.")
+CNEUPD_ERRORS[-15] = ("CNEUPD got a different count of the number of "
+                      "converged Ritz values than CNAUPD got.  This indicates "
+                      "the user probably made an error in passing data from "
+                      "CNAUPD to CNEUPD or that the data was modified before "
+                      "entering CNEUPD")
+
+DSEUPD_ERRORS = {
+    0: "Normal exit.",
+    -1: "N must be positive.",
+    -2: "NEV must be positive.",
+    -3: "NCV must be greater than NEV and less than or equal to N.",
+    -5: "WHICH must be one of 'LM', 'SM', 'LA', 'SA' or 'BE'.",
+    -6: "BMAT must be one of 'I' or 'G'.",
+    -7: "Length of private work WORKL array is not sufficient.",
+    -8: ("Error return from trid. eigenvalue calculation; "
+         "Information error from LAPACK routine dsteqr."),
+    -9: "Starting vector is zero.",
+    -10: "IPARAM(7) must be 1,2,3,4,5.",
+    -11: "IPARAM(7) = 1 and BMAT = 'G' are incompatible.",
+    -12: "NEV and WHICH = 'BE' are incompatible.",
+    -14: "DSAUPD  did not find any eigenvalues to sufficient accuracy.",
+    -15: "HOWMNY must be one of 'A' or 'S' if RVEC = .true.",
+    -16: "HOWMNY = 'S' not yet implemented",
+    -17: ("DSEUPD  got a different count of the number of converged "
+          "Ritz values than DSAUPD  got.  This indicates the user "
+          "probably made an error in passing data from DSAUPD  to "
+          "DSEUPD  or that the data was modified before entering  "
+          "DSEUPD.")
+}
+
+SSEUPD_ERRORS = DSEUPD_ERRORS.copy()
+SSEUPD_ERRORS[-14] = ("SSAUPD  did not find any eigenvalues "
+                      "to sufficient accuracy.")
+SSEUPD_ERRORS[-17] = ("SSEUPD  got a different count of the number of "
+                      "converged "
+                      "Ritz values than SSAUPD  got.  This indicates the user "
+                      "probably made an error in passing data from SSAUPD  to "
+                      "SSEUPD  or that the data was modified before entering  "
+                      "SSEUPD.")
+
+_SAUPD_ERRORS = {'d': DSAUPD_ERRORS,
+                 's': SSAUPD_ERRORS}
+_NAUPD_ERRORS = {'d': DNAUPD_ERRORS,
+                 's': SNAUPD_ERRORS,
+                 'z': ZNAUPD_ERRORS,
+                 'c': CNAUPD_ERRORS}
+_SEUPD_ERRORS = {'d': DSEUPD_ERRORS,
+                 's': SSEUPD_ERRORS}
+_NEUPD_ERRORS = {'d': DNEUPD_ERRORS,
+                 's': SNEUPD_ERRORS,
+                 'z': ZNEUPD_ERRORS,
+                 'c': CNEUPD_ERRORS}
+
+# accepted values of parameter WHICH in _SEUPD
+_SEUPD_WHICH = ['LM', 'SM', 'LA', 'SA', 'BE']
+
+# accepted values of parameter WHICH in _NAUPD
+_NEUPD_WHICH = ['LM', 'SM', 'LR', 'SR', 'LI', 'SI']
+
+
+class ArpackError(RuntimeError):
+    """
+    ARPACK error
+    """
+
+    def __init__(self, info, infodict=None):
+        if infodict is None:
+            infodict = _NAUPD_ERRORS
+
+        msg = infodict.get(info, "Unknown error")
+        super().__init__(f"ARPACK error {info}: {msg}")
+
+
+class ArpackNoConvergence(ArpackError):
+    """
+    ARPACK iteration did not converge
+
+    Attributes
+    ----------
+    eigenvalues : ndarray
+        Partial result. Converged eigenvalues.
+    eigenvectors : ndarray
+        Partial result. Converged eigenvectors.
+
+    """
+
+    def __init__(self, msg, eigenvalues, eigenvectors):
+        ArpackError.__init__(self, -1, {-1: msg})
+        self.eigenvalues = eigenvalues
+        self.eigenvectors = eigenvectors
+
+
+def choose_ncv(k):
+    """
+    Choose number of lanczos vectors based on target number
+    of singular/eigen values and vectors to compute, k.
+    """
+    return max(2 * k + 1, 20)
+
+
+class _ArpackParams:
+    def __init__(self, n, k, tp, mode=1, sigma=None,
+                 ncv=None, v0=None, maxiter=None, which="LM", tol=0):
+        if k <= 0:
+            raise ValueError("k must be positive, k=%d" % k)
+
+        if maxiter is None:
+            maxiter = n * 10
+        if maxiter <= 0:
+            raise ValueError("maxiter must be positive, maxiter=%d" % maxiter)
+
+        if tp not in 'fdFD':
+            # Use `float64` libraries from integer dtypes.
+            if np.can_cast(tp, 'd'):
+                tp = 'd'
+            else:
+                raise ValueError("matrix type must be 'f', 'd', 'F', or 'D'")
+
+        if v0 is not None:
+            # ARPACK overwrites its initial resid,  make a copy
+            self.resid = np.array(v0, copy=True)
+            info = 1
+        else:
+            # ARPACK will use a random initial vector.
+            self.resid = np.zeros(n, tp)
+            info = 0
+
+        if sigma is None:
+            #sigma not used
+            self.sigma = 0
+        else:
+            self.sigma = sigma
+
+        if ncv is None:
+            ncv = choose_ncv(k)
+        ncv = min(ncv, n)
+
+        self.v = np.zeros((n, ncv), tp)  # holds Ritz vectors
+        self.iparam = np.zeros(11, arpack_int)
+
+        # set solver mode and parameters
+        ishfts = 1
+        self.mode = mode
+        self.iparam[0] = ishfts
+        self.iparam[2] = maxiter
+        self.iparam[3] = 1
+        self.iparam[6] = mode
+
+        self.n = n
+        self.tol = tol
+        self.k = k
+        self.maxiter = maxiter
+        self.ncv = ncv
+        self.which = which
+        self.tp = tp
+        self.info = info
+
+        self.converged = False
+        self.ido = 0
+
+    def _raise_no_convergence(self):
+        msg = "No convergence (%d iterations, %d/%d eigenvectors converged)"
+        k_ok = self.iparam[4]
+        num_iter = self.iparam[2]
+        try:
+            ev, vec = self.extract(True)
+        except ArpackError as err:
+            msg = f"{msg} [{err}]"
+            ev = np.zeros((0,))
+            vec = np.zeros((self.n, 0))
+            k_ok = 0
+        raise ArpackNoConvergence(msg % (num_iter, k_ok, self.k), ev, vec)
+
+
+class _SymmetricArpackParams(_ArpackParams):
+    def __init__(self, n, k, tp, matvec, mode=1, M_matvec=None,
+                 Minv_matvec=None, sigma=None,
+                 ncv=None, v0=None, maxiter=None, which="LM", tol=0):
+        # The following modes are supported:
+        #  mode = 1:
+        #    Solve the standard eigenvalue problem:
+        #      A*x = lambda*x :
+        #       A - symmetric
+        #    Arguments should be
+        #       matvec      = left multiplication by A
+        #       M_matvec    = None [not used]
+        #       Minv_matvec = None [not used]
+        #
+        #  mode = 2:
+        #    Solve the general eigenvalue problem:
+        #      A*x = lambda*M*x
+        #       A - symmetric
+        #       M - symmetric positive definite
+        #    Arguments should be
+        #       matvec      = left multiplication by A
+        #       M_matvec    = left multiplication by M
+        #       Minv_matvec = left multiplication by M^-1
+        #
+        #  mode = 3:
+        #    Solve the general eigenvalue problem in shift-invert mode:
+        #      A*x = lambda*M*x
+        #       A - symmetric
+        #       M - symmetric positive semi-definite
+        #    Arguments should be
+        #       matvec      = None [not used]
+        #       M_matvec    = left multiplication by M
+        #                     or None, if M is the identity
+        #       Minv_matvec = left multiplication by [A-sigma*M]^-1
+        #
+        #  mode = 4:
+        #    Solve the general eigenvalue problem in Buckling mode:
+        #      A*x = lambda*AG*x
+        #       A  - symmetric positive semi-definite
+        #       AG - symmetric indefinite
+        #    Arguments should be
+        #       matvec      = left multiplication by A
+        #       M_matvec    = None [not used]
+        #       Minv_matvec = left multiplication by [A-sigma*AG]^-1
+        #
+        #  mode = 5:
+        #    Solve the general eigenvalue problem in Cayley-transformed mode:
+        #      A*x = lambda*M*x
+        #       A - symmetric
+        #       M - symmetric positive semi-definite
+        #    Arguments should be
+        #       matvec      = left multiplication by A
+        #       M_matvec    = left multiplication by M
+        #                     or None, if M is the identity
+        #       Minv_matvec = left multiplication by [A-sigma*M]^-1
+        if mode == 1:
+            if matvec is None:
+                raise ValueError("matvec must be specified for mode=1")
+            if M_matvec is not None:
+                raise ValueError("M_matvec cannot be specified for mode=1")
+            if Minv_matvec is not None:
+                raise ValueError("Minv_matvec cannot be specified for mode=1")
+
+            self.OP = matvec
+            self.B = lambda x: x
+            self.bmat = 'I'
+        elif mode == 2:
+            if matvec is None:
+                raise ValueError("matvec must be specified for mode=2")
+            if M_matvec is None:
+                raise ValueError("M_matvec must be specified for mode=2")
+            if Minv_matvec is None:
+                raise ValueError("Minv_matvec must be specified for mode=2")
+
+            self.OP = lambda x: Minv_matvec(matvec(x))
+            self.OPa = Minv_matvec
+            self.OPb = matvec
+            self.B = M_matvec
+            self.bmat = 'G'
+        elif mode == 3:
+            if matvec is not None:
+                raise ValueError("matvec must not be specified for mode=3")
+            if Minv_matvec is None:
+                raise ValueError("Minv_matvec must be specified for mode=3")
+
+            if M_matvec is None:
+                self.OP = Minv_matvec
+                self.OPa = Minv_matvec
+                self.B = lambda x: x
+                self.bmat = 'I'
+            else:
+                self.OP = lambda x: Minv_matvec(M_matvec(x))
+                self.OPa = Minv_matvec
+                self.B = M_matvec
+                self.bmat = 'G'
+        elif mode == 4:
+            if matvec is None:
+                raise ValueError("matvec must be specified for mode=4")
+            if M_matvec is not None:
+                raise ValueError("M_matvec must not be specified for mode=4")
+            if Minv_matvec is None:
+                raise ValueError("Minv_matvec must be specified for mode=4")
+            self.OPa = Minv_matvec
+            self.OP = lambda x: self.OPa(matvec(x))
+            self.B = matvec
+            self.bmat = 'G'
+        elif mode == 5:
+            if matvec is None:
+                raise ValueError("matvec must be specified for mode=5")
+            if Minv_matvec is None:
+                raise ValueError("Minv_matvec must be specified for mode=5")
+
+            self.OPa = Minv_matvec
+            self.A_matvec = matvec
+
+            if M_matvec is None:
+                self.OP = lambda x: Minv_matvec(matvec(x) + sigma * x)
+                self.B = lambda x: x
+                self.bmat = 'I'
+            else:
+                self.OP = lambda x: Minv_matvec(matvec(x)
+                                                + sigma * M_matvec(x))
+                self.B = M_matvec
+                self.bmat = 'G'
+        else:
+            raise ValueError("mode=%i not implemented" % mode)
+
+        if which not in _SEUPD_WHICH:
+            raise ValueError(f"which must be one of {' '.join(_SEUPD_WHICH)}")
+        if k >= n:
+            raise ValueError("k must be less than ndim(A), k=%d" % k)
+
+        _ArpackParams.__init__(self, n, k, tp, mode, sigma,
+                               ncv, v0, maxiter, which, tol)
+
+        if self.ncv > n or self.ncv <= k:
+            raise ValueError(f"ncv must be k= n - 1:
+            raise ValueError("k must be less than ndim(A)-1, k=%d" % k)
+
+        _ArpackParams.__init__(self, n, k, tp, mode, sigma,
+                               ncv, v0, maxiter, which, tol)
+
+        if self.ncv > n or self.ncv <= k + 1:
+            raise ValueError(f"ncv must be k+1 k, so we'll
+                            # throw out this case.
+                            nreturned -= 1
+                    i += 1
+
+            else:
+                # real matrix, mode 3 or 4, imag(sigma) is nonzero:
+                # see remark 3 in neupd.f
+                # Build complex eigenvalues from real and imaginary parts
+                i = 0
+                while i <= k:
+                    if abs(d[i].imag) == 0:
+                        d[i] = np.dot(zr[:, i], self.matvec(zr[:, i]))
+                    else:
+                        if i < k:
+                            z[:, i] = zr[:, i] + 1.0j * zr[:, i + 1]
+                            z[:, i + 1] = z[:, i].conjugate()
+                            d[i] = ((np.dot(zr[:, i],
+                                            self.matvec(zr[:, i]))
+                                     + np.dot(zr[:, i + 1],
+                                              self.matvec(zr[:, i + 1])))
+                                    + 1j * (np.dot(zr[:, i],
+                                                   self.matvec(zr[:, i + 1]))
+                                            - np.dot(zr[:, i + 1],
+                                                     self.matvec(zr[:, i]))))
+                            d[i + 1] = d[i].conj()
+                            i += 1
+                        else:
+                            #last eigenvalue is complex: the imaginary part of
+                            # the eigenvector has not been returned
+                            #this can only happen if nreturned > k, so we'll
+                            # throw out this case.
+                            nreturned -= 1
+                    i += 1
+
+            # Now we have k+1 possible eigenvalues and eigenvectors
+            # Return the ones specified by the keyword "which"
+
+            if nreturned <= k:
+                # we got less or equal as many eigenvalues we wanted
+                d = d[:nreturned]
+                z = z[:, :nreturned]
+            else:
+                # we got one extra eigenvalue (likely a cc pair, but which?)
+                if self.mode in (1, 2):
+                    rd = d
+                elif self.mode in (3, 4):
+                    rd = 1 / (d - self.sigma)
+
+                if self.which in ['LR', 'SR']:
+                    ind = np.argsort(rd.real)
+                elif self.which in ['LI', 'SI']:
+                    # for LI,SI ARPACK returns largest,smallest
+                    # abs(imaginary) (complex pairs come together)
+                    ind = np.argsort(abs(rd.imag))
+                else:
+                    ind = np.argsort(abs(rd))
+
+                if self.which in ['LR', 'LM', 'LI']:
+                    ind = ind[-k:][::-1]
+                elif self.which in ['SR', 'SM', 'SI']:
+                    ind = ind[:k]
+
+                d = d[ind]
+                z = z[:, ind]
+        else:
+            # complex is so much simpler...
+            d, z, ierr =\
+                    self._arpack_extract(return_eigenvectors,
+                           howmny, sselect, self.sigma, workev,
+                           self.bmat, self.which, k, self.tol, self.resid,
+                           self.v, self.iparam, self.ipntr,
+                           self.workd, self.workl, self.rwork, ierr)
+
+            if ierr != 0:
+                raise ArpackError(ierr, infodict=self.extract_infodict)
+
+            k_ok = self.iparam[4]
+            d = d[:k_ok]
+            z = z[:, :k_ok]
+
+        if return_eigenvectors:
+            return d, z
+        else:
+            return d
+
+class SpLuInv(LinearOperator):
+    """
+    SpLuInv:
+       helper class to repeatedly solve M*x=b
+       using a sparse LU-decomposition of M
+    """
+
+    def __init__(self, M):
+        self.M_lu = splu(M)
+        self.shape = M.shape
+        self.dtype = M.dtype
+        self.isreal = not np.issubdtype(self.dtype, np.complexfloating)
+
+    def _matvec(self, x):
+        # careful here: splu.solve will throw away imaginary
+        # part of x if M is real
+        x = np.asarray(x)
+        if self.isreal and np.issubdtype(x.dtype, np.complexfloating):
+            return (self.M_lu.solve(np.real(x).astype(self.dtype))
+                    + 1j * self.M_lu.solve(np.imag(x).astype(self.dtype)))
+        else:
+            return self.M_lu.solve(x.astype(self.dtype))
+
+
+class LuInv(LinearOperator):
+    """
+    LuInv:
+       helper class to repeatedly solve M*x=b
+       using an LU-decomposition of M
+    """
+
+    def __init__(self, M):
+        self.M_lu = lu_factor(M)
+        self.shape = M.shape
+        self.dtype = M.dtype
+
+    def _matvec(self, x):
+        return lu_solve(self.M_lu, x)
+
+
+def gmres_loose(A, b, tol):
+    """
+    gmres with looser termination condition.
+    """
+    b = np.asarray(b)
+    min_tol = 1000 * np.sqrt(b.size) * np.finfo(b.dtype).eps
+    return gmres(A, b, rtol=max(tol, min_tol), atol=0)
+
+
+class IterInv(LinearOperator):
+    """
+    IterInv:
+       helper class to repeatedly solve M*x=b
+       using an iterative method.
+    """
+
+    def __init__(self, M, ifunc=gmres_loose, tol=0):
+        self.M = M
+        if hasattr(M, 'dtype'):
+            self.dtype = M.dtype
+        else:
+            x = np.zeros(M.shape[1])
+            self.dtype = (M * x).dtype
+        self.shape = M.shape
+
+        if tol <= 0:
+            # when tol=0, ARPACK uses machine tolerance as calculated
+            # by LAPACK's _LAMCH function.  We should match this
+            tol = 2 * np.finfo(self.dtype).eps
+        self.ifunc = ifunc
+        self.tol = tol
+
+    def _matvec(self, x):
+        b, info = self.ifunc(self.M, x, tol=self.tol)
+        if info != 0:
+            raise ValueError("Error in inverting M: function "
+                             "%s did not converge (info = %i)."
+                             % (self.ifunc.__name__, info))
+        return b
+
+
+class IterOpInv(LinearOperator):
+    """
+    IterOpInv:
+       helper class to repeatedly solve [A-sigma*M]*x = b
+       using an iterative method
+    """
+
+    def __init__(self, A, M, sigma, ifunc=gmres_loose, tol=0):
+        self.A = A
+        self.M = M
+        self.sigma = sigma
+
+        def mult_func(x):
+            return A.matvec(x) - sigma * M.matvec(x)
+
+        def mult_func_M_None(x):
+            return A.matvec(x) - sigma * x
+
+        x = np.zeros(A.shape[1])
+        if M is None:
+            dtype = mult_func_M_None(x).dtype
+            self.OP = LinearOperator(self.A.shape,
+                                     mult_func_M_None,
+                                     dtype=dtype)
+        else:
+            dtype = mult_func(x).dtype
+            self.OP = LinearOperator(self.A.shape,
+                                     mult_func,
+                                     dtype=dtype)
+        self.shape = A.shape
+
+        if tol <= 0:
+            # when tol=0, ARPACK uses machine tolerance as calculated
+            # by LAPACK's _LAMCH function.  We should match this
+            tol = 2 * np.finfo(self.OP.dtype).eps
+        self.ifunc = ifunc
+        self.tol = tol
+
+    def _matvec(self, x):
+        b, info = self.ifunc(self.OP, x, tol=self.tol)
+        if info != 0:
+            raise ValueError("Error in inverting [A-sigma*M]: function "
+                             "%s did not converge (info = %i)."
+                             % (self.ifunc.__name__, info))
+        return b
+
+    @property
+    def dtype(self):
+        return self.OP.dtype
+
+
+def _fast_spmatrix_to_csc(A, hermitian=False):
+    """Convert sparse matrix to CSC (by transposing, if possible)"""
+    if (A.format == "csr" and hermitian
+            and not np.issubdtype(A.dtype, np.complexfloating)):
+        return A.T
+    elif is_pydata_spmatrix(A):
+        # No need to convert
+        return A
+    else:
+        return A.tocsc()
+
+
+def get_inv_matvec(M, hermitian=False, tol=0):
+    if isdense(M):
+        return LuInv(M).matvec
+    elif issparse(M) or is_pydata_spmatrix(M):
+        M = _fast_spmatrix_to_csc(M, hermitian=hermitian)
+        return SpLuInv(M).matvec
+    else:
+        return IterInv(M, tol=tol).matvec
+
+
+def get_OPinv_matvec(A, M, sigma, hermitian=False, tol=0):
+    if sigma == 0:
+        return get_inv_matvec(A, hermitian=hermitian, tol=tol)
+
+    if M is None:
+        #M is the identity matrix
+        if isdense(A):
+            if (np.issubdtype(A.dtype, np.complexfloating)
+                    or np.imag(sigma) == 0):
+                A = np.copy(A)
+            else:
+                A = A + 0j
+            A.flat[::A.shape[1] + 1] -= sigma
+            return LuInv(A).matvec
+        elif issparse(A) or is_pydata_spmatrix(A):
+            A = A - sigma * eye(A.shape[0])
+            A = _fast_spmatrix_to_csc(A, hermitian=hermitian)
+            return SpLuInv(A).matvec
+        else:
+            return IterOpInv(aslinearoperator(A),
+                             M, sigma, tol=tol).matvec
+    else:
+        if ((not isdense(A) and not issparse(A) and not is_pydata_spmatrix(A)) or
+                (not isdense(M) and not issparse(M) and not is_pydata_spmatrix(A))):
+            return IterOpInv(aslinearoperator(A),
+                             aslinearoperator(M),
+                             sigma, tol=tol).matvec
+        elif isdense(A) or isdense(M):
+            return LuInv(A - sigma * M).matvec
+        else:
+            OP = A - sigma * M
+            OP = _fast_spmatrix_to_csc(OP, hermitian=hermitian)
+            return SpLuInv(OP).matvec
+
+
+# ARPACK is not threadsafe or reentrant (SAVE variables), so we need a
+# lock and a re-entering check.
+_ARPACK_LOCK = ReentrancyLock("Nested calls to eigs/eighs not allowed: "
+                              "ARPACK is not re-entrant")
+
+
+def eigs(A, k=6, M=None, sigma=None, which='LM', v0=None,
+         ncv=None, maxiter=None, tol=0, return_eigenvectors=True,
+         Minv=None, OPinv=None, OPpart=None):
+    """
+    Find k eigenvalues and eigenvectors of the square matrix A.
+
+    Solves ``A @ x[i] = w[i] * x[i]``, the standard eigenvalue problem
+    for w[i] eigenvalues with corresponding eigenvectors x[i].
+
+    If M is specified, solves ``A @ x[i] = w[i] * M @ x[i]``, the
+    generalized eigenvalue problem for w[i] eigenvalues
+    with corresponding eigenvectors x[i]
+
+    Parameters
+    ----------
+    A : ndarray, sparse matrix or LinearOperator
+        An array, sparse matrix, or LinearOperator representing
+        the operation ``A @ x``, where A is a real or complex square matrix.
+    k : int, optional
+        The number of eigenvalues and eigenvectors desired.
+        `k` must be smaller than N-1. It is not possible to compute all
+        eigenvectors of a matrix.
+    M : ndarray, sparse matrix or LinearOperator, optional
+        An array, sparse matrix, or LinearOperator representing
+        the operation M@x for the generalized eigenvalue problem
+
+            A @ x = w * M @ x.
+
+        M must represent a real symmetric matrix if A is real, and must
+        represent a complex Hermitian matrix if A is complex. For best
+        results, the data type of M should be the same as that of A.
+        Additionally:
+
+            If `sigma` is None, M is positive definite
+
+            If sigma is specified, M is positive semi-definite
+
+        If sigma is None, eigs requires an operator to compute the solution
+        of the linear equation ``M @ x = b``.  This is done internally via a
+        (sparse) LU decomposition for an explicit matrix M, or via an
+        iterative solver for a general linear operator.  Alternatively,
+        the user can supply the matrix or operator Minv, which gives
+        ``x = Minv @ b = M^-1 @ b``.
+    sigma : real or complex, optional
+        Find eigenvalues near sigma using shift-invert mode.  This requires
+        an operator to compute the solution of the linear system
+        ``[A - sigma * M] @ x = b``, where M is the identity matrix if
+        unspecified. This is computed internally via a (sparse) LU
+        decomposition for explicit matrices A & M, or via an iterative
+        solver if either A or M is a general linear operator.
+        Alternatively, the user can supply the matrix or operator OPinv,
+        which gives ``x = OPinv @ b = [A - sigma * M]^-1 @ b``.
+        For a real matrix A, shift-invert can either be done in imaginary
+        mode or real mode, specified by the parameter OPpart ('r' or 'i').
+        Note that when sigma is specified, the keyword 'which' (below)
+        refers to the shifted eigenvalues ``w'[i]`` where:
+
+            If A is real and OPpart == 'r' (default),
+              ``w'[i] = 1/2 * [1/(w[i]-sigma) + 1/(w[i]-conj(sigma))]``.
+
+            If A is real and OPpart == 'i',
+              ``w'[i] = 1/2i * [1/(w[i]-sigma) - 1/(w[i]-conj(sigma))]``.
+
+            If A is complex, ``w'[i] = 1/(w[i]-sigma)``.
+
+    v0 : ndarray, optional
+        Starting vector for iteration.
+        Default: random
+    ncv : int, optional
+        The number of Lanczos vectors generated
+        `ncv` must be greater than `k`; it is recommended that ``ncv > 2*k``.
+        Default: ``min(n, max(2*k + 1, 20))``
+    which : str, ['LM' | 'SM' | 'LR' | 'SR' | 'LI' | 'SI'], optional
+        Which `k` eigenvectors and eigenvalues to find:
+
+            'LM' : largest magnitude
+
+            'SM' : smallest magnitude
+
+            'LR' : largest real part
+
+            'SR' : smallest real part
+
+            'LI' : largest imaginary part
+
+            'SI' : smallest imaginary part
+
+        When sigma != None, 'which' refers to the shifted eigenvalues w'[i]
+        (see discussion in 'sigma', above).  ARPACK is generally better
+        at finding large values than small values.  If small eigenvalues are
+        desired, consider using shift-invert mode for better performance.
+    maxiter : int, optional
+        Maximum number of Arnoldi update iterations allowed
+        Default: ``n*10``
+    tol : float, optional
+        Relative accuracy for eigenvalues (stopping criterion)
+        The default value of 0 implies machine precision.
+    return_eigenvectors : bool, optional
+        Return eigenvectors (True) in addition to eigenvalues
+    Minv : ndarray, sparse matrix or LinearOperator, optional
+        See notes in M, above.
+    OPinv : ndarray, sparse matrix or LinearOperator, optional
+        See notes in sigma, above.
+    OPpart : {'r' or 'i'}, optional
+        See notes in sigma, above
+
+    Returns
+    -------
+    w : ndarray
+        Array of k eigenvalues.
+    v : ndarray
+        An array of `k` eigenvectors.
+        ``v[:, i]`` is the eigenvector corresponding to the eigenvalue w[i].
+
+    Raises
+    ------
+    ArpackNoConvergence
+        When the requested convergence is not obtained.
+        The currently converged eigenvalues and eigenvectors can be found
+        as ``eigenvalues`` and ``eigenvectors`` attributes of the exception
+        object.
+
+    See Also
+    --------
+    eigsh : eigenvalues and eigenvectors for symmetric matrix A
+    svds : singular value decomposition for a matrix A
+
+    Notes
+    -----
+    This function is a wrapper to the ARPACK [1]_ SNEUPD, DNEUPD, CNEUPD,
+    ZNEUPD, functions which use the Implicitly Restarted Arnoldi Method to
+    find the eigenvalues and eigenvectors [2]_.
+
+    References
+    ----------
+    .. [1] ARPACK Software, https://github.com/opencollab/arpack-ng
+    .. [2] R. B. Lehoucq, D. C. Sorensen, and C. Yang,  ARPACK USERS GUIDE:
+       Solution of Large Scale Eigenvalue Problems by Implicitly Restarted
+       Arnoldi Methods. SIAM, Philadelphia, PA, 1998.
+
+    Examples
+    --------
+    Find 6 eigenvectors of the identity matrix:
+
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import eigs
+    >>> id = np.eye(13)
+    >>> vals, vecs = eigs(id, k=6)
+    >>> vals
+    array([ 1.+0.j,  1.+0.j,  1.+0.j,  1.+0.j,  1.+0.j,  1.+0.j])
+    >>> vecs.shape
+    (13, 6)
+
+    """
+    A = convert_pydata_sparse_to_scipy(A)
+    M = convert_pydata_sparse_to_scipy(M)
+    if A.shape[0] != A.shape[1]:
+        raise ValueError(f'expected square matrix (shape={A.shape})')
+    if M is not None:
+        if M.shape != A.shape:
+            raise ValueError(f'wrong M dimensions {M.shape}, should be {A.shape}')
+        if np.dtype(M.dtype).char.lower() != np.dtype(A.dtype).char.lower():
+            warnings.warn('M does not have the same type precision as A. '
+                          'This may adversely affect ARPACK convergence',
+                          stacklevel=2)
+
+    n = A.shape[0]
+
+    if k <= 0:
+        raise ValueError("k=%d must be greater than 0." % k)
+
+    if k >= n - 1:
+        warnings.warn("k >= N - 1 for N * N square matrix. "
+                      "Attempting to use scipy.linalg.eig instead.",
+                      RuntimeWarning, stacklevel=2)
+
+        if issparse(A):
+            raise TypeError("Cannot use scipy.linalg.eig for sparse A with "
+                            "k >= N - 1. Use scipy.linalg.eig(A.toarray()) or"
+                            " reduce k.")
+        if isinstance(A, LinearOperator):
+            raise TypeError("Cannot use scipy.linalg.eig for LinearOperator "
+                            "A with k >= N - 1.")
+        if isinstance(M, LinearOperator):
+            raise TypeError("Cannot use scipy.linalg.eig for LinearOperator "
+                            "M with k >= N - 1.")
+
+        return eig(A, b=M, right=return_eigenvectors)
+
+    if sigma is None:
+        matvec = aslinearoperator(A).matvec
+
+        if OPinv is not None:
+            raise ValueError("OPinv should not be specified "
+                             "with sigma = None.")
+        if OPpart is not None:
+            raise ValueError("OPpart should not be specified with "
+                             "sigma = None or complex A")
+
+        if M is None:
+            #standard eigenvalue problem
+            mode = 1
+            M_matvec = None
+            Minv_matvec = None
+            if Minv is not None:
+                raise ValueError("Minv should not be "
+                                 "specified with M = None.")
+        else:
+            #general eigenvalue problem
+            mode = 2
+            if Minv is None:
+                Minv_matvec = get_inv_matvec(M, hermitian=True, tol=tol)
+            else:
+                Minv = aslinearoperator(Minv)
+                Minv_matvec = Minv.matvec
+            M_matvec = aslinearoperator(M).matvec
+    else:
+        #sigma is not None: shift-invert mode
+        if np.issubdtype(A.dtype, np.complexfloating):
+            if OPpart is not None:
+                raise ValueError("OPpart should not be specified "
+                                 "with sigma=None or complex A")
+            mode = 3
+        elif OPpart is None or OPpart.lower() == 'r':
+            mode = 3
+        elif OPpart.lower() == 'i':
+            if np.imag(sigma) == 0:
+                raise ValueError("OPpart cannot be 'i' if sigma is real")
+            mode = 4
+        else:
+            raise ValueError("OPpart must be one of ('r','i')")
+
+        matvec = aslinearoperator(A).matvec
+        if Minv is not None:
+            raise ValueError("Minv should not be specified when sigma is")
+        if OPinv is None:
+            Minv_matvec = get_OPinv_matvec(A, M, sigma,
+                                           hermitian=False, tol=tol)
+        else:
+            OPinv = aslinearoperator(OPinv)
+            Minv_matvec = OPinv.matvec
+        if M is None:
+            M_matvec = None
+        else:
+            M_matvec = aslinearoperator(M).matvec
+
+    params = _UnsymmetricArpackParams(n, k, A.dtype.char, matvec, mode,
+                                      M_matvec, Minv_matvec, sigma,
+                                      ncv, v0, maxiter, which, tol)
+
+    with _ARPACK_LOCK:
+        while not params.converged:
+            params.iterate()
+
+        return params.extract(return_eigenvectors)
+
+
+def eigsh(A, k=6, M=None, sigma=None, which='LM', v0=None,
+          ncv=None, maxiter=None, tol=0, return_eigenvectors=True,
+          Minv=None, OPinv=None, mode='normal'):
+    """
+    Find k eigenvalues and eigenvectors of the real symmetric square matrix
+    or complex Hermitian matrix A.
+
+    Solves ``A @ x[i] = w[i] * x[i]``, the standard eigenvalue problem for
+    w[i] eigenvalues with corresponding eigenvectors x[i].
+
+    If M is specified, solves ``A @ x[i] = w[i] * M @ x[i]``, the
+    generalized eigenvalue problem for w[i] eigenvalues
+    with corresponding eigenvectors x[i].
+
+    Note that there is no specialized routine for the case when A is a complex
+    Hermitian matrix. In this case, ``eigsh()`` will call ``eigs()`` and return the
+    real parts of the eigenvalues thus obtained.
+
+    Parameters
+    ----------
+    A : ndarray, sparse matrix or LinearOperator
+        A square operator representing the operation ``A @ x``, where ``A`` is
+        real symmetric or complex Hermitian. For buckling mode (see below)
+        ``A`` must additionally be positive-definite.
+    k : int, optional
+        The number of eigenvalues and eigenvectors desired.
+        `k` must be smaller than N. It is not possible to compute all
+        eigenvectors of a matrix.
+
+    Returns
+    -------
+    w : array
+        Array of k eigenvalues.
+    v : array
+        An array representing the `k` eigenvectors.  The column ``v[:, i]`` is
+        the eigenvector corresponding to the eigenvalue ``w[i]``.
+
+    Other Parameters
+    ----------------
+    M : An N x N matrix, array, sparse matrix, or linear operator representing
+        the operation ``M @ x`` for the generalized eigenvalue problem
+
+            A @ x = w * M @ x.
+
+        M must represent a real symmetric matrix if A is real, and must
+        represent a complex Hermitian matrix if A is complex. For best
+        results, the data type of M should be the same as that of A.
+        Additionally:
+
+            If sigma is None, M is symmetric positive definite.
+
+            If sigma is specified, M is symmetric positive semi-definite.
+
+            In buckling mode, M is symmetric indefinite.
+
+        If sigma is None, eigsh requires an operator to compute the solution
+        of the linear equation ``M @ x = b``. This is done internally via a
+        (sparse) LU decomposition for an explicit matrix M, or via an
+        iterative solver for a general linear operator.  Alternatively,
+        the user can supply the matrix or operator Minv, which gives
+        ``x = Minv @ b = M^-1 @ b``.
+    sigma : real
+        Find eigenvalues near sigma using shift-invert mode.  This requires
+        an operator to compute the solution of the linear system
+        ``[A - sigma * M] x = b``, where M is the identity matrix if
+        unspecified.  This is computed internally via a (sparse) LU
+        decomposition for explicit matrices A & M, or via an iterative
+        solver if either A or M is a general linear operator.
+        Alternatively, the user can supply the matrix or operator OPinv,
+        which gives ``x = OPinv @ b = [A - sigma * M]^-1 @ b``.
+        Note that when sigma is specified, the keyword 'which' refers to
+        the shifted eigenvalues ``w'[i]`` where:
+
+            if mode == 'normal', ``w'[i] = 1 / (w[i] - sigma)``.
+
+            if mode == 'cayley', ``w'[i] = (w[i] + sigma) / (w[i] - sigma)``.
+
+            if mode == 'buckling', ``w'[i] = w[i] / (w[i] - sigma)``.
+
+        (see further discussion in 'mode' below)
+    v0 : ndarray, optional
+        Starting vector for iteration.
+        Default: random
+    ncv : int, optional
+        The number of Lanczos vectors generated ncv must be greater than k and
+        smaller than n; it is recommended that ``ncv > 2*k``.
+        Default: ``min(n, max(2*k + 1, 20))``
+    which : str ['LM' | 'SM' | 'LA' | 'SA' | 'BE']
+        If A is a complex Hermitian matrix, 'BE' is invalid.
+        Which `k` eigenvectors and eigenvalues to find:
+
+            'LM' : Largest (in magnitude) eigenvalues.
+
+            'SM' : Smallest (in magnitude) eigenvalues.
+
+            'LA' : Largest (algebraic) eigenvalues.
+
+            'SA' : Smallest (algebraic) eigenvalues.
+
+            'BE' : Half (k/2) from each end of the spectrum.
+
+        When k is odd, return one more (k/2+1) from the high end.
+        When sigma != None, 'which' refers to the shifted eigenvalues ``w'[i]``
+        (see discussion in 'sigma', above).  ARPACK is generally better
+        at finding large values than small values.  If small eigenvalues are
+        desired, consider using shift-invert mode for better performance.
+    maxiter : int, optional
+        Maximum number of Arnoldi update iterations allowed.
+        Default: ``n*10``
+    tol : float
+        Relative accuracy for eigenvalues (stopping criterion).
+        The default value of 0 implies machine precision.
+    Minv : N x N matrix, array, sparse matrix, or LinearOperator
+        See notes in M, above.
+    OPinv : N x N matrix, array, sparse matrix, or LinearOperator
+        See notes in sigma, above.
+    return_eigenvectors : bool
+        Return eigenvectors (True) in addition to eigenvalues.
+        This value determines the order in which eigenvalues are sorted.
+        The sort order is also dependent on the `which` variable.
+
+            For which = 'LM' or 'SA':
+                If `return_eigenvectors` is True, eigenvalues are sorted by
+                algebraic value.
+
+                If `return_eigenvectors` is False, eigenvalues are sorted by
+                absolute value.
+
+            For which = 'BE' or 'LA':
+                eigenvalues are always sorted by algebraic value.
+
+            For which = 'SM':
+                If `return_eigenvectors` is True, eigenvalues are sorted by
+                algebraic value.
+
+                If `return_eigenvectors` is False, eigenvalues are sorted by
+                decreasing absolute value.
+
+    mode : string ['normal' | 'buckling' | 'cayley']
+        Specify strategy to use for shift-invert mode.  This argument applies
+        only for real-valued A and sigma != None.  For shift-invert mode,
+        ARPACK internally solves the eigenvalue problem
+        ``OP @ x'[i] = w'[i] * B @ x'[i]``
+        and transforms the resulting Ritz vectors x'[i] and Ritz values w'[i]
+        into the desired eigenvectors and eigenvalues of the problem
+        ``A @ x[i] = w[i] * M @ x[i]``.
+        The modes are as follows:
+
+            'normal' :
+                OP = [A - sigma * M]^-1 @ M,
+                B = M,
+                w'[i] = 1 / (w[i] - sigma)
+
+            'buckling' :
+                OP = [A - sigma * M]^-1 @ A,
+                B = A,
+                w'[i] = w[i] / (w[i] - sigma)
+
+            'cayley' :
+                OP = [A - sigma * M]^-1 @ [A + sigma * M],
+                B = M,
+                w'[i] = (w[i] + sigma) / (w[i] - sigma)
+
+        The choice of mode will affect which eigenvalues are selected by
+        the keyword 'which', and can also impact the stability of
+        convergence (see [2] for a discussion).
+
+    Raises
+    ------
+    ArpackNoConvergence
+        When the requested convergence is not obtained.
+
+        The currently converged eigenvalues and eigenvectors can be found
+        as ``eigenvalues`` and ``eigenvectors`` attributes of the exception
+        object.
+
+    See Also
+    --------
+    eigs : eigenvalues and eigenvectors for a general (nonsymmetric) matrix A
+    svds : singular value decomposition for a matrix A
+
+    Notes
+    -----
+    This function is a wrapper to the ARPACK [1]_ SSEUPD and DSEUPD
+    functions which use the Implicitly Restarted Lanczos Method to
+    find the eigenvalues and eigenvectors [2]_.
+
+    References
+    ----------
+    .. [1] ARPACK Software, https://github.com/opencollab/arpack-ng
+    .. [2] R. B. Lehoucq, D. C. Sorensen, and C. Yang,  ARPACK USERS GUIDE:
+       Solution of Large Scale Eigenvalue Problems by Implicitly Restarted
+       Arnoldi Methods. SIAM, Philadelphia, PA, 1998.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import eigsh
+    >>> identity = np.eye(13)
+    >>> eigenvalues, eigenvectors = eigsh(identity, k=6)
+    >>> eigenvalues
+    array([1., 1., 1., 1., 1., 1.])
+    >>> eigenvectors.shape
+    (13, 6)
+
+    """
+    # complex Hermitian matrices should be solved with eigs
+    if np.issubdtype(A.dtype, np.complexfloating):
+        if mode != 'normal':
+            raise ValueError(f"mode={mode} cannot be used with complex matrix A")
+        if which == 'BE':
+            raise ValueError("which='BE' cannot be used with complex matrix A")
+        elif which == 'LA':
+            which = 'LR'
+        elif which == 'SA':
+            which = 'SR'
+        ret = eigs(A, k, M=M, sigma=sigma, which=which, v0=v0,
+                   ncv=ncv, maxiter=maxiter, tol=tol,
+                   return_eigenvectors=return_eigenvectors, Minv=Minv,
+                   OPinv=OPinv)
+
+        if return_eigenvectors:
+            return ret[0].real, ret[1]
+        else:
+            return ret.real
+
+    if A.shape[0] != A.shape[1]:
+        raise ValueError(f'expected square matrix (shape={A.shape})')
+    if M is not None:
+        if M.shape != A.shape:
+            raise ValueError(f'wrong M dimensions {M.shape}, should be {A.shape}')
+        if np.dtype(M.dtype).char.lower() != np.dtype(A.dtype).char.lower():
+            warnings.warn('M does not have the same type precision as A. '
+                          'This may adversely affect ARPACK convergence',
+                          stacklevel=2)
+
+    n = A.shape[0]
+
+    if k <= 0:
+        raise ValueError("k must be greater than 0.")
+
+    if k >= n:
+        warnings.warn("k >= N for N * N square matrix. "
+                      "Attempting to use scipy.linalg.eigh instead.",
+                      RuntimeWarning, stacklevel=2)
+
+        if issparse(A):
+            raise TypeError("Cannot use scipy.linalg.eigh for sparse A with "
+                            "k >= N. Use scipy.linalg.eigh(A.toarray()) or"
+                            " reduce k.")
+        if isinstance(A, LinearOperator):
+            raise TypeError("Cannot use scipy.linalg.eigh for LinearOperator "
+                            "A with k >= N.")
+        if isinstance(M, LinearOperator):
+            raise TypeError("Cannot use scipy.linalg.eigh for LinearOperator "
+                            "M with k >= N.")
+
+        return eigh(A, b=M, eigvals_only=not return_eigenvectors)
+
+    if sigma is None:
+        A = aslinearoperator(A)
+        matvec = A.matvec
+
+        if OPinv is not None:
+            raise ValueError("OPinv should not be specified "
+                             "with sigma = None.")
+        if M is None:
+            #standard eigenvalue problem
+            mode = 1
+            M_matvec = None
+            Minv_matvec = None
+            if Minv is not None:
+                raise ValueError("Minv should not be "
+                                 "specified with M = None.")
+        else:
+            #general eigenvalue problem
+            mode = 2
+            if Minv is None:
+                Minv_matvec = get_inv_matvec(M, hermitian=True, tol=tol)
+            else:
+                Minv = aslinearoperator(Minv)
+                Minv_matvec = Minv.matvec
+            M_matvec = aslinearoperator(M).matvec
+    else:
+        # sigma is not None: shift-invert mode
+        if Minv is not None:
+            raise ValueError("Minv should not be specified when sigma is")
+
+        # normal mode
+        if mode == 'normal':
+            mode = 3
+            matvec = None
+            if OPinv is None:
+                Minv_matvec = get_OPinv_matvec(A, M, sigma,
+                                               hermitian=True, tol=tol)
+            else:
+                OPinv = aslinearoperator(OPinv)
+                Minv_matvec = OPinv.matvec
+            if M is None:
+                M_matvec = None
+            else:
+                M = aslinearoperator(M)
+                M_matvec = M.matvec
+
+        # buckling mode
+        elif mode == 'buckling':
+            mode = 4
+            if OPinv is None:
+                Minv_matvec = get_OPinv_matvec(A, M, sigma,
+                                               hermitian=True, tol=tol)
+            else:
+                Minv_matvec = aslinearoperator(OPinv).matvec
+            matvec = aslinearoperator(A).matvec
+            M_matvec = None
+
+        # cayley-transform mode
+        elif mode == 'cayley':
+            mode = 5
+            matvec = aslinearoperator(A).matvec
+            if OPinv is None:
+                Minv_matvec = get_OPinv_matvec(A, M, sigma,
+                                               hermitian=True, tol=tol)
+            else:
+                Minv_matvec = aslinearoperator(OPinv).matvec
+            if M is None:
+                M_matvec = None
+            else:
+                M_matvec = aslinearoperator(M).matvec
+
+        # unrecognized mode
+        else:
+            raise ValueError(f"unrecognized mode '{mode}'")
+
+    params = _SymmetricArpackParams(n, k, A.dtype.char, matvec, mode,
+                                    M_matvec, Minv_matvec, sigma,
+                                    ncv, v0, maxiter, which, tol)
+
+    with _ARPACK_LOCK:
+        while not params.converged:
+            params.iterate()
+
+        return params.extract(return_eigenvectors)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py
new file mode 100644
index 0000000000000000000000000000000000000000..e962798a9ffce0b380c17cdf1f9deb4d6fa83159
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py
@@ -0,0 +1,717 @@
+__usage__ = """
+To run tests locally:
+  python tests/test_arpack.py [-l] [-v]
+
+"""
+
+import threading
+import itertools
+
+import numpy as np
+
+from numpy.testing import assert_allclose, assert_equal, suppress_warnings
+from pytest import raises as assert_raises
+import pytest
+
+from numpy import dot, conj, random
+from scipy.linalg import eig, eigh
+from scipy.sparse import csc_array, csr_array, diags_array, random_array
+from scipy.sparse.linalg import LinearOperator, aslinearoperator
+from scipy.sparse.linalg._eigen.arpack import (eigs, eigsh, arpack,
+                                              ArpackNoConvergence)
+
+
+from scipy._lib._gcutils import assert_deallocated, IS_PYPY
+
+
+# precision for tests
+_ndigits = {'f': 3, 'd': 11, 'F': 3, 'D': 11}
+
+
+def _get_test_tolerance(type_char, mattype=None, D_type=None, which=None):
+    """
+    Return tolerance values suitable for a given test:
+
+    Parameters
+    ----------
+    type_char : {'f', 'd', 'F', 'D'}
+        Data type in ARPACK eigenvalue problem
+    mattype : {csr_array, aslinearoperator, asarray}, optional
+        Linear operator type
+
+    Returns
+    -------
+    tol
+        Tolerance to pass to the ARPACK routine
+    rtol
+        Relative tolerance for outputs
+    atol
+        Absolute tolerance for outputs
+
+    """
+
+    rtol = {'f': 3000 * np.finfo(np.float32).eps,
+            'F': 3000 * np.finfo(np.float32).eps,
+            'd': 2000 * np.finfo(np.float64).eps,
+            'D': 2000 * np.finfo(np.float64).eps}[type_char]
+    atol = rtol
+    tol = 0
+
+    if mattype is aslinearoperator and type_char in ('f', 'F'):
+        # iterative methods in single precision: worse errors
+        # also: bump ARPACK tolerance so that the iterative method converges
+        tol = 30 * np.finfo(np.float32).eps
+        rtol *= 5
+
+    if (
+        isinstance(mattype, type) and issubclass(mattype, csr_array)
+        and type_char in ('f', 'F')
+    ):
+        # sparse in single precision: worse errors
+        rtol *= 5
+
+    if (
+        which in ('LM', 'SM', 'LA')
+        and D_type.name == "gen-hermitian-Mc"
+    ):
+        if type_char == 'F':
+            # missing case 1, 2, and more, from PR 14798
+            rtol *= 5
+
+        if type_char == 'D':
+            # missing more cases, from PR 14798
+            rtol *= 10
+            atol *= 10
+
+    return tol, rtol, atol
+
+
+def generate_matrix(N, complex_=False, hermitian=False,
+                    pos_definite=False, sparse=False, rng=None):
+    M = rng.random((N, N))
+    if complex_:
+        M = M + 1j * rng.random((N, N))
+
+    if hermitian:
+        if pos_definite:
+            if sparse:
+                i = np.arange(N)
+                j = rng.randint(N, size=N-2)
+                i, j = np.meshgrid(i, j)
+                M[i, j] = 0
+            M = np.dot(M.conj(), M.T)
+        else:
+            M = np.dot(M.conj(), M.T)
+            if sparse:
+                i = rng.randint(N, size=N * N // 4)
+                j = rng.randint(N, size=N * N // 4)
+                ind = np.nonzero(i == j)
+                j[ind] = (j[ind] + 1) % N
+                M[i, j] = 0
+                M[j, i] = 0
+    else:
+        if sparse:
+            i = rng.randint(N, size=N * N // 2)
+            j = rng.randint(N, size=N * N // 2)
+            M[i, j] = 0
+    return M
+
+
+def generate_matrix_symmetric(N, pos_definite=False, sparse=False, rng=None):
+    M = rng.random((N, N))
+
+    M = 0.5 * (M + M.T)  # Make M symmetric
+
+    if pos_definite:
+        Id = N * np.eye(N)
+        if sparse:
+            M = csr_array(M)
+        M += Id
+    else:
+        if sparse:
+            M = csr_array(M)
+
+    return M
+
+
+def assert_allclose_cc(actual, desired, **kw):
+    """Almost equal or complex conjugates almost equal"""
+    try:
+        assert_allclose(actual, desired, **kw)
+    except AssertionError:
+        assert_allclose(actual, conj(desired), **kw)
+
+
+def argsort_which(eigenvalues, typ, k, which,
+                  sigma=None, OPpart=None, mode=None):
+    """Return sorted indices of eigenvalues using the "which" keyword
+    from eigs and eigsh"""
+    if sigma is None:
+        reval = np.round(eigenvalues, decimals=_ndigits[typ])
+    else:
+        if mode is None or mode == 'normal':
+            if OPpart is None:
+                reval = 1. / (eigenvalues - sigma)
+            elif OPpart == 'r':
+                reval = 0.5 * (1. / (eigenvalues - sigma)
+                               + 1. / (eigenvalues - np.conj(sigma)))
+            elif OPpart == 'i':
+                reval = -0.5j * (1. / (eigenvalues - sigma)
+                                 - 1. / (eigenvalues - np.conj(sigma)))
+        elif mode == 'cayley':
+            reval = (eigenvalues + sigma) / (eigenvalues - sigma)
+        elif mode == 'buckling':
+            reval = eigenvalues / (eigenvalues - sigma)
+        else:
+            raise ValueError(f"mode='{mode}' not recognized")
+
+        reval = np.round(reval, decimals=_ndigits[typ])
+
+    if which in ['LM', 'SM']:
+        ind = np.argsort(abs(reval))
+    elif which in ['LR', 'SR', 'LA', 'SA', 'BE']:
+        ind = np.argsort(np.real(reval))
+    elif which in ['LI', 'SI']:
+        # for LI,SI ARPACK returns largest,smallest abs(imaginary) why?
+        if typ.islower():
+            ind = np.argsort(abs(np.imag(reval)))
+        else:
+            ind = np.argsort(np.imag(reval))
+    else:
+        raise ValueError(f"which='{which}' is unrecognized")
+
+    if which in ['LM', 'LA', 'LR', 'LI']:
+        return ind[-k:]
+    elif which in ['SM', 'SA', 'SR', 'SI']:
+        return ind[:k]
+    elif which == 'BE':
+        return np.concatenate((ind[:k//2], ind[k//2-k:]))
+
+
+def eval_evec(symmetric, d, typ, k, which, v0=None, sigma=None,
+              mattype=np.asarray, OPpart=None, mode='normal'):
+    general = ('bmat' in d)
+
+    if symmetric:
+        eigs_func = eigsh
+    else:
+        eigs_func = eigs
+
+    if general:
+        err = (f"error for {eigs_func.__name__}:general, typ={typ}, which={which}, "
+               f"sigma={sigma}, mattype={mattype.__name__},"
+               f" OPpart={OPpart}, mode={mode}")
+    else:
+        err = (f"error for {eigs_func.__name__}:standard, typ={typ}, which={which}, "
+               f"sigma={sigma}, mattype={mattype.__name__}, "
+               f"OPpart={OPpart}, mode={mode}")
+
+    a = d['mat'].astype(typ)
+    ac = mattype(a)
+
+    if general:
+        b = d['bmat'].astype(typ)
+        bc = mattype(b)
+
+    # get exact eigenvalues
+    exact_eval = d['eval'].astype(typ.upper())
+    ind = argsort_which(exact_eval, typ, k, which,
+                        sigma, OPpart, mode)
+    exact_eval = exact_eval[ind]
+
+    # compute arpack eigenvalues
+    kwargs = dict(which=which, v0=v0, sigma=sigma)
+    if eigs_func is eigsh:
+        kwargs['mode'] = mode
+    else:
+        kwargs['OPpart'] = OPpart
+
+    # compute suitable tolerances
+    kwargs['tol'], rtol, atol = _get_test_tolerance(typ, mattype, d, which)
+    # on rare occasions, ARPACK routines return results that are proper
+    # eigenvalues and -vectors, but not necessarily the ones requested in
+    # the parameter which. This is inherent to the Krylov methods, and
+    # should not be treated as a failure. If such a rare situation
+    # occurs, the calculation is tried again (but at most a few times).
+    ntries = 0
+    while ntries < 5:
+        # solve
+        if general:
+            try:
+                eigenvalues, evec = eigs_func(ac, k, bc, **kwargs)
+            except ArpackNoConvergence:
+                kwargs['maxiter'] = 20*a.shape[0]
+                eigenvalues, evec = eigs_func(ac, k, bc, **kwargs)
+        else:
+            try:
+                eigenvalues, evec = eigs_func(ac, k, **kwargs)
+            except ArpackNoConvergence:
+                kwargs['maxiter'] = 20*a.shape[0]
+                eigenvalues, evec = eigs_func(ac, k, **kwargs)
+
+        ind = argsort_which(eigenvalues, typ, k, which,
+                            sigma, OPpart, mode)
+        eigenvalues = eigenvalues[ind]
+        evec = evec[:, ind]
+
+        try:
+            # check eigenvalues
+            assert_allclose_cc(eigenvalues, exact_eval, rtol=rtol, atol=atol,
+                               err_msg=err)
+            check_evecs = True
+        except AssertionError:
+            check_evecs = False
+            ntries += 1
+
+        if check_evecs:
+            # check eigenvectors
+            LHS = np.dot(a, evec)
+            if general:
+                RHS = eigenvalues * np.dot(b, evec)
+            else:
+                RHS = eigenvalues * evec
+
+            assert_allclose(LHS, RHS, rtol=rtol, atol=atol, err_msg=err)
+            break
+
+    # check eigenvalues
+    assert_allclose_cc(eigenvalues, exact_eval, rtol=rtol, atol=atol, err_msg=err)
+
+
+class DictWithRepr(dict):
+    def __init__(self, name):
+        self.name = name
+
+    def __repr__(self):
+        return f"<{self.name}>"
+
+
+class SymmetricParams:
+    def __init__(self):
+        self.eigs = eigsh
+        self.which = ['LM', 'SM', 'LA', 'SA', 'BE']
+        self.mattypes = [csr_array, aslinearoperator, np.asarray]
+        self.sigmas_modes = {None: ['normal'],
+                             0.5: ['normal', 'buckling', 'cayley']}
+
+        # generate matrices
+        # these should all be float32 so that the eigenvalues
+        # are the same in float32 and float64
+        N = 6
+        rng = np.random.RandomState(2300)
+        Ar = generate_matrix(N, hermitian=True,
+                             pos_definite=True,
+                             rng=rng).astype('f').astype('d')
+        M = generate_matrix(N, hermitian=True,
+                            pos_definite=True,
+                            rng=rng).astype('f').astype('d')
+        Ac = generate_matrix(N, hermitian=True, pos_definite=True,
+                             complex_=True, rng=rng).astype('F').astype('D')
+        Mc = generate_matrix(N, hermitian=True, pos_definite=True,
+                             complex_=True, rng=rng).astype('F').astype('D')
+        v0 = rng.random(N)
+
+        # standard symmetric problem
+        SS = DictWithRepr("std-symmetric")
+        SS['mat'] = Ar
+        SS['v0'] = v0
+        SS['eval'] = eigh(SS['mat'], eigvals_only=True)
+
+        # general symmetric problem
+        GS = DictWithRepr("gen-symmetric")
+        GS['mat'] = Ar
+        GS['bmat'] = M
+        GS['v0'] = v0
+        GS['eval'] = eigh(GS['mat'], GS['bmat'], eigvals_only=True)
+
+        # standard hermitian problem
+        SH = DictWithRepr("std-hermitian")
+        SH['mat'] = Ac
+        SH['v0'] = v0
+        SH['eval'] = eigh(SH['mat'], eigvals_only=True)
+
+        # general hermitian problem
+        GH = DictWithRepr("gen-hermitian")
+        GH['mat'] = Ac
+        GH['bmat'] = M
+        GH['v0'] = v0
+        GH['eval'] = eigh(GH['mat'], GH['bmat'], eigvals_only=True)
+
+        # general hermitian problem with hermitian M
+        GHc = DictWithRepr("gen-hermitian-Mc")
+        GHc['mat'] = Ac
+        GHc['bmat'] = Mc
+        GHc['v0'] = v0
+        GHc['eval'] = eigh(GHc['mat'], GHc['bmat'], eigvals_only=True)
+
+        self.real_test_cases = [SS, GS]
+        self.complex_test_cases = [SH, GH, GHc]
+
+
+class NonSymmetricParams:
+    def __init__(self):
+        self.eigs = eigs
+        self.which = ['LM', 'LR', 'LI']  # , 'SM', 'LR', 'SR', 'LI', 'SI']
+        self.mattypes = [csr_array, aslinearoperator, np.asarray]
+        self.sigmas_OPparts = {None: [None],
+                               0.1: ['r'],
+                               0.1 + 0.1j: ['r', 'i']}
+
+        # generate matrices
+        # these should all be float32 so that the eigenvalues
+        # are the same in float32 and float64
+        N = 6
+        rng = np.random.RandomState(2300)
+        Ar = generate_matrix(N, rng=rng).astype('f').astype('d')
+        M = generate_matrix(N, hermitian=True,
+                            pos_definite=True, rng=rng).astype('f').astype('d')
+        Ac = generate_matrix(N, complex_=True, rng=rng).astype('F').astype('D')
+        v0 = rng.random(N)
+
+        # standard real nonsymmetric problem
+        SNR = DictWithRepr("std-real-nonsym")
+        SNR['mat'] = Ar
+        SNR['v0'] = v0
+        SNR['eval'] = eig(SNR['mat'], left=False, right=False)
+
+        # general real nonsymmetric problem
+        GNR = DictWithRepr("gen-real-nonsym")
+        GNR['mat'] = Ar
+        GNR['bmat'] = M
+        GNR['v0'] = v0
+        GNR['eval'] = eig(GNR['mat'], GNR['bmat'], left=False, right=False)
+
+        # standard complex nonsymmetric problem
+        SNC = DictWithRepr("std-cmplx-nonsym")
+        SNC['mat'] = Ac
+        SNC['v0'] = v0
+        SNC['eval'] = eig(SNC['mat'], left=False, right=False)
+
+        # general complex nonsymmetric problem
+        GNC = DictWithRepr("gen-cmplx-nonsym")
+        GNC['mat'] = Ac
+        GNC['bmat'] = M
+        GNC['v0'] = v0
+        GNC['eval'] = eig(GNC['mat'], GNC['bmat'], left=False, right=False)
+
+        self.real_test_cases = [SNR, GNR]
+        self.complex_test_cases = [SNC, GNC]
+
+
+@pytest.mark.iterations(1)
+@pytest.mark.thread_unsafe
+def test_symmetric_modes(num_parallel_threads):
+    assert num_parallel_threads == 1
+    params = SymmetricParams()
+    k = 2
+    symmetric = True
+    for D in params.real_test_cases:
+        for typ in 'fd':
+            for which in params.which:
+                for mattype in params.mattypes:
+                    for (sigma, modes) in params.sigmas_modes.items():
+                        for mode in modes:
+                            eval_evec(symmetric, D, typ, k, which,
+                                      None, sigma, mattype, None, mode)
+
+
+def test_hermitian_modes():
+    params = SymmetricParams()
+    k = 2
+    symmetric = True
+    for D in params.complex_test_cases:
+        for typ in 'FD':
+            for which in params.which:
+                if which == 'BE':
+                    continue  # BE invalid for complex
+                for mattype in params.mattypes:
+                    for sigma in params.sigmas_modes:
+                        eval_evec(symmetric, D, typ, k, which,
+                                  None, sigma, mattype)
+
+
+def test_symmetric_starting_vector():
+    params = SymmetricParams()
+    symmetric = True
+    for k in [1, 2, 3, 4, 5]:
+        for D in params.real_test_cases:
+            for typ in 'fd':
+                v0 = random.rand(len(D['v0'])).astype(typ)
+                eval_evec(symmetric, D, typ, k, 'LM', v0)
+
+
+def test_symmetric_no_convergence():
+    rng = np.random.RandomState(1234)
+    m = generate_matrix(30, hermitian=True, pos_definite=True, rng=rng)
+    tol, rtol, atol = _get_test_tolerance('d')
+    try:
+        w, v = eigsh(m, 4, which='LM', v0=m[:, 0], maxiter=5, tol=tol, ncv=9)
+        raise AssertionError("Spurious no-error exit")
+    except ArpackNoConvergence as err:
+        k = len(err.eigenvalues)
+        if k <= 0:
+            raise AssertionError("Spurious no-eigenvalues-found case") from err
+        w, v = err.eigenvalues, err.eigenvectors
+        assert_allclose(dot(m, v), w * v, rtol=rtol, atol=atol)
+
+
+def test_real_nonsymmetric_modes():
+    params = NonSymmetricParams()
+    k = 2
+    symmetric = False
+    for D in params.real_test_cases:
+        for typ in 'fd':
+            for which in params.which:
+                for mattype in params.mattypes:
+                    for sigma, OPparts in params.sigmas_OPparts.items():
+                        for OPpart in OPparts:
+                            eval_evec(symmetric, D, typ, k, which,
+                                      None, sigma, mattype, OPpart)
+
+
+def test_complex_nonsymmetric_modes():
+    params = NonSymmetricParams()
+    k = 2
+    symmetric = False
+    for D in params.complex_test_cases:
+        for typ in 'DF':
+            for which in params.which:
+                for mattype in params.mattypes:
+                    for sigma in params.sigmas_OPparts:
+                        eval_evec(symmetric, D, typ, k, which,
+                                  None, sigma, mattype)
+
+
+def test_standard_nonsymmetric_starting_vector():
+    params = NonSymmetricParams()
+    sigma = None
+    symmetric = False
+    for k in [1, 2, 3, 4]:
+        for d in params.complex_test_cases:
+            for typ in 'FD':
+                A = d['mat']
+                n = A.shape[0]
+                v0 = random.rand(n).astype(typ)
+                eval_evec(symmetric, d, typ, k, "LM", v0, sigma)
+
+
+def test_general_nonsymmetric_starting_vector():
+    params = NonSymmetricParams()
+    sigma = None
+    symmetric = False
+    for k in [1, 2, 3, 4]:
+        for d in params.complex_test_cases:
+            for typ in 'FD':
+                A = d['mat']
+                n = A.shape[0]
+                v0 = random.rand(n).astype(typ)
+                eval_evec(symmetric, d, typ, k, "LM", v0, sigma)
+
+
+def test_standard_nonsymmetric_no_convergence():
+    rng = np.random.RandomState(1234)
+    m = generate_matrix(30, complex_=True, rng=rng)
+    tol, rtol, atol = _get_test_tolerance('d')
+    try:
+        w, v = eigs(m, 4, which='LM', v0=m[:, 0], maxiter=5, tol=tol)
+        raise AssertionError("Spurious no-error exit")
+    except ArpackNoConvergence as err:
+        k = len(err.eigenvalues)
+        if k <= 0:
+            raise AssertionError("Spurious no-eigenvalues-found case") from err
+        w, v = err.eigenvalues, err.eigenvectors
+        for ww, vv in zip(w, v.T):
+            assert_allclose(dot(m, vv), ww * vv, rtol=rtol, atol=atol)
+
+
+def test_eigen_bad_shapes():
+    # A is not square.
+    A = csc_array(np.zeros((2, 3)))
+    assert_raises(ValueError, eigs, A)
+
+
+def test_eigen_bad_kwargs():
+    # Test eigen on wrong keyword argument
+    A = csc_array(np.zeros((8, 8)))
+    assert_raises(ValueError, eigs, A, which='XX')
+
+
+def test_ticket_1459_arpack_crash():
+    for dtype in [np.float32, np.float64]:
+        # This test does not seem to catch the issue for float32,
+        # but we made the same fix there, just to be sure
+
+        N = 6
+        k = 2
+
+        np.random.seed(2301)
+        A = np.random.random((N, N)).astype(dtype)
+        v0 = np.array([-0.71063568258907849895, -0.83185111795729227424,
+                       -0.34365925382227402451, 0.46122533684552280420,
+                       -0.58001341115969040629, -0.78844877570084292984e-01],
+                      dtype=dtype)
+
+        # Should not crash:
+        evals, evecs = eigs(A, k, v0=v0)
+
+
+@pytest.mark.skipif(IS_PYPY, reason="Test not meaningful on PyPy")
+def test_linearoperator_deallocation():
+    # Check that the linear operators used by the Arpack wrappers are
+    # deallocatable by reference counting -- they are big objects, so
+    # Python's cyclic GC may not collect them fast enough before
+    # running out of memory if eigs/eigsh are called in a tight loop.
+
+    M_d = np.eye(10)
+    M_s = csc_array(M_d)
+    M_o = aslinearoperator(M_d)
+
+    with assert_deallocated(lambda: arpack.SpLuInv(M_s)):
+        pass
+    with assert_deallocated(lambda: arpack.LuInv(M_d)):
+        pass
+    with assert_deallocated(lambda: arpack.IterInv(M_s)):
+        pass
+    with assert_deallocated(lambda: arpack.IterOpInv(M_o, None, 0.3)):
+        pass
+    with assert_deallocated(lambda: arpack.IterOpInv(M_o, M_o, 0.3)):
+        pass
+
+
+@pytest.mark.thread_unsafe
+def test_parallel_threads():
+    results = []
+    v0 = np.random.rand(50)
+
+    def worker():
+        x = diags_array([1, -2, 1], offsets=[-1, 0, 1], shape=(50, 50))
+        w, v = eigs(x, k=3, v0=v0)
+        results.append(w)
+
+        w, v = eigsh(x, k=3, v0=v0)
+        results.append(w)
+
+    threads = [threading.Thread(target=worker) for k in range(10)]
+    for t in threads:
+        t.start()
+    for t in threads:
+        t.join()
+
+    worker()
+
+    for r in results:
+        assert_allclose(r, results[-1])
+
+
+def test_reentering():
+    # Just some linear operator that calls eigs recursively
+    def A_matvec(x):
+        x = diags_array([1, -2, 1], offsets=[-1, 0, 1], shape=(50, 50))
+        w, v = eigs(x, k=1)
+        return v / w[0]
+    A = LinearOperator(matvec=A_matvec, dtype=float, shape=(50, 50))
+
+    # The Fortran code is not reentrant, so this fails (gracefully, not crashing)
+    assert_raises(RuntimeError, eigs, A, k=1)
+    assert_raises(RuntimeError, eigsh, A, k=1)
+
+
+def test_regression_arpackng_1315():
+    # Check that issue arpack-ng/#1315 is not present.
+    # Adapted from arpack-ng/TESTS/bug_1315_single.c
+    # If this fails, then the installed ARPACK library is faulty.
+
+    for dtype in [np.float32, np.float64]:
+        np.random.seed(1234)
+
+        w0 = np.arange(1, 1000+1).astype(dtype)
+        A = diags_array([w0], offsets=[0], shape=(1000, 1000))
+
+        v0 = np.random.rand(1000).astype(dtype)
+        w, v = eigs(A, k=9, ncv=2*9+1, which="LM", v0=v0)
+
+        assert_allclose(np.sort(w), np.sort(w0[-9:]),
+                        rtol=1e-4)
+
+
+def test_eigs_for_k_greater():
+    # Test eigs() for k beyond limits.
+    rng = np.random.RandomState(1234)
+    A_sparse = diags_array([1, -2, 1], offsets=[-1, 0, 1], shape=(4, 4))  # sparse
+    A = generate_matrix(4, sparse=False, rng=rng)
+    M_dense = rng.random((4, 4))
+    M_sparse = generate_matrix(4, sparse=True, rng=rng)
+    M_linop = aslinearoperator(M_dense)
+    eig_tuple1 = eig(A, b=M_dense)
+    eig_tuple2 = eig(A, b=M_sparse)
+
+    with suppress_warnings() as sup:
+        sup.filter(RuntimeWarning)
+
+        assert_equal(eigs(A, M=M_dense, k=3), eig_tuple1)
+        assert_equal(eigs(A, M=M_dense, k=4), eig_tuple1)
+        assert_equal(eigs(A, M=M_dense, k=5), eig_tuple1)
+        assert_equal(eigs(A, M=M_sparse, k=5), eig_tuple2)
+
+        # M as LinearOperator
+        assert_raises(TypeError, eigs, A, M=M_linop, k=3)
+
+        # Test 'A' for different types
+        assert_raises(TypeError, eigs, aslinearoperator(A), k=3)
+        assert_raises(TypeError, eigs, A_sparse, k=3)
+
+
+def test_eigsh_for_k_greater():
+    # Test eigsh() for k beyond limits.
+    rng = np.random.RandomState(1234)
+    A_sparse = diags_array([1, -2, 1], offsets=[-1, 0, 1], shape=(4, 4))  # sparse
+    A = generate_matrix(4, sparse=False, rng=rng)
+    M_dense = generate_matrix_symmetric(4, pos_definite=True, rng=rng)
+    M_sparse = generate_matrix_symmetric(
+        4, pos_definite=True, sparse=True, rng=rng)
+    M_linop = aslinearoperator(M_dense)
+    eig_tuple1 = eigh(A, b=M_dense)
+    eig_tuple2 = eigh(A, b=M_sparse)
+
+    with suppress_warnings() as sup:
+        sup.filter(RuntimeWarning)
+
+        assert_equal(eigsh(A, M=M_dense, k=4), eig_tuple1)
+        assert_equal(eigsh(A, M=M_dense, k=5), eig_tuple1)
+        assert_equal(eigsh(A, M=M_sparse, k=5), eig_tuple2)
+
+        # M as LinearOperator
+        assert_raises(TypeError, eigsh, A, M=M_linop, k=4)
+
+        # Test 'A' for different types
+        assert_raises(TypeError, eigsh, aslinearoperator(A), k=4)
+        assert_raises(TypeError, eigsh, A_sparse, M=M_dense, k=4)
+
+
+def test_real_eigs_real_k_subset():
+    rng = np.random.default_rng(2)
+
+    n = 10
+    A = random_array(shape=(n, n), density=0.5, rng=rng)
+    A.data *= 2
+    A.data -= 1
+    A += A.T  # make symmetric to test real eigenvalues
+
+    v0 = np.ones(n)
+
+    whichs = ['LM', 'SM', 'LR', 'SR', 'LI', 'SI']
+    dtypes = [np.float32, np.float64]
+
+    for which, sigma, dtype in itertools.product(whichs, [None, 0, 5], dtypes):
+        prev_w = np.array([], dtype=dtype)
+        eps = np.finfo(dtype).eps
+        for k in range(1, 9):
+            w, z = eigs(A.astype(dtype), k=k, which=which, sigma=sigma,
+                        v0=v0.astype(dtype), tol=0)
+            assert_allclose(np.linalg.norm(A.dot(z) - z * w), 0, atol=np.sqrt(eps))
+
+            # Check that the set of eigenvalues for `k` is a subset of that for `k+1`
+            dist = abs(prev_w[:,None] - w).min(axis=1)
+            assert_allclose(dist, 0, atol=np.sqrt(eps))
+
+            prev_w = w
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..6ab5330361a6bcc2a8403f9b3788aedae750d57f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__init__.py
@@ -0,0 +1,16 @@
+"""
+Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG)
+
+LOBPCG is a preconditioned eigensolver for large symmetric positive definite
+(SPD) generalized eigenproblems.
+
+Call the function lobpcg - see help for lobpcg.lobpcg.
+
+"""
+from .lobpcg import *
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..40eecdd2ca5b46f2d3ade77883affb9b78ee83d1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/lobpcg.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/lobpcg.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..049a7036c6eac7e0d109a71ba086719fd2d926f4
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/__pycache__/lobpcg.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py
new file mode 100644
index 0000000000000000000000000000000000000000..3bace8c76ccd11be7bb25f02806382a60ac5e9c7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py
@@ -0,0 +1,1110 @@
+"""
+Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG).
+
+References
+----------
+.. [1] A. V. Knyazev (2001),
+       Toward the Optimal Preconditioned Eigensolver: Locally Optimal
+       Block Preconditioned Conjugate Gradient Method.
+       SIAM Journal on Scientific Computing 23, no. 2,
+       pp. 517-541. :doi:`10.1137/S1064827500366124`
+
+.. [2] A. V. Knyazev, I. Lashuk, M. E. Argentati, and E. Ovchinnikov (2007),
+       Block Locally Optimal Preconditioned Eigenvalue Xolvers (BLOPEX)
+       in hypre and PETSc.  :arxiv:`0705.2626`
+
+.. [3] A. V. Knyazev's C and MATLAB implementations:
+       https://github.com/lobpcg/blopex
+"""
+
+import warnings
+import numpy as np
+from scipy.linalg import (inv, eigh, cho_factor, cho_solve,
+                          cholesky, LinAlgError)
+from scipy.sparse.linalg import LinearOperator
+from scipy.sparse import issparse
+
+__all__ = ["lobpcg"]
+
+
+def _report_nonhermitian(M, name):
+    """
+    Report if `M` is not a Hermitian matrix given its type.
+    """
+    from scipy.linalg import norm
+
+    md = M - M.T.conj()
+    nmd = norm(md, 1)
+    tol = 10 * np.finfo(M.dtype).eps
+    tol = max(tol, tol * norm(M, 1))
+    if nmd > tol:
+        warnings.warn(
+              f"Matrix {name} of the type {M.dtype} is not Hermitian: "
+              f"condition: {nmd} < {tol} fails.",
+              UserWarning, stacklevel=4
+         )
+
+def _as2d(ar):
+    """
+    If the input array is 2D return it, if it is 1D, append a dimension,
+    making it a column vector.
+    """
+    if ar.ndim == 2:
+        return ar
+    else:  # Assume 1!
+        aux = np.asarray(ar)
+        aux.shape = (ar.shape[0], 1)
+        return aux
+
+
+def _makeMatMat(m):
+    if m is None:
+        return None
+    elif callable(m):
+        return lambda v: m(v)
+    else:
+        return lambda v: m @ v
+
+
+def _matmul_inplace(x, y, verbosityLevel=0):
+    """Perform 'np.matmul' in-place if possible.
+
+    If some sufficient conditions for inplace matmul are met, do so.
+    Otherwise try inplace update and fall back to overwrite if that fails.
+    """
+    if x.flags["CARRAY"] and x.shape[1] == y.shape[1] and x.dtype == y.dtype:
+        # conditions where we can guarantee that inplace updates will work;
+        # i.e. x is not a view/slice, x & y have compatible dtypes, and the
+        # shape of the result of x @ y matches the shape of x.
+        np.matmul(x, y, out=x)
+    else:
+        # ideally, we'd have an exhaustive list of conditions above when
+        # inplace updates are possible; since we don't, we opportunistically
+        # try if it works, and fall back to overwriting if necessary
+        try:
+            np.matmul(x, y, out=x)
+        except Exception:
+            if verbosityLevel:
+                warnings.warn(
+                    "Inplace update of x = x @ y failed, "
+                    "x needs to be overwritten.",
+                    UserWarning, stacklevel=3
+                )
+            x = x @ y
+    return x
+
+
+def _applyConstraints(blockVectorV, factYBY, blockVectorBY, blockVectorY):
+    """Changes blockVectorV in-place."""
+    YBV = blockVectorBY.T.conj() @ blockVectorV
+    tmp = cho_solve(factYBY, YBV)
+    blockVectorV -= blockVectorY @ tmp
+
+
+def _b_orthonormalize(B, blockVectorV, blockVectorBV=None,
+                      verbosityLevel=0):
+    """in-place B-orthonormalize the given block vector using Cholesky."""
+    if blockVectorBV is None:
+        if B is None:
+            blockVectorBV = blockVectorV
+        else:
+            try:
+                blockVectorBV = B(blockVectorV)
+            except Exception as e:
+                if verbosityLevel:
+                    warnings.warn(
+                        f"Secondary MatMul call failed with error\n"
+                        f"{e}\n",
+                        UserWarning, stacklevel=3
+                    )
+                    return None, None, None
+            if blockVectorBV.shape != blockVectorV.shape:
+                raise ValueError(
+                    f"The shape {blockVectorV.shape} "
+                    f"of the orthogonalized matrix not preserved\n"
+                    f"and changed to {blockVectorBV.shape} "
+                    f"after multiplying by the secondary matrix.\n"
+                )
+
+    VBV = blockVectorV.T.conj() @ blockVectorBV
+    try:
+        # VBV is a Cholesky factor from now on...
+        VBV = cholesky(VBV, overwrite_a=True)
+        VBV = inv(VBV, overwrite_a=True)
+        blockVectorV = _matmul_inplace(
+            blockVectorV, VBV,
+            verbosityLevel=verbosityLevel
+        )
+        if B is not None:
+            blockVectorBV = _matmul_inplace(
+                blockVectorBV, VBV,
+                verbosityLevel=verbosityLevel
+            )
+        return blockVectorV, blockVectorBV, VBV
+    except LinAlgError:
+        if verbosityLevel:
+            warnings.warn(
+                "Cholesky has failed.",
+                UserWarning, stacklevel=3
+            )
+        return None, None, None
+
+
+def _get_indx(_lambda, num, largest):
+    """Get `num` indices into `_lambda` depending on `largest` option."""
+    ii = np.argsort(_lambda)
+    if largest:
+        ii = ii[:-num - 1:-1]
+    else:
+        ii = ii[:num]
+
+    return ii
+
+
+def _handle_gramA_gramB_verbosity(gramA, gramB, verbosityLevel):
+    if verbosityLevel:
+        _report_nonhermitian(gramA, "gramA")
+        _report_nonhermitian(gramB, "gramB")
+
+
+def lobpcg(
+    A,
+    X,
+    B=None,
+    M=None,
+    Y=None,
+    tol=None,
+    maxiter=None,
+    largest=True,
+    verbosityLevel=0,
+    retLambdaHistory=False,
+    retResidualNormsHistory=False,
+    restartControl=20,
+):
+    """Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG).
+
+    LOBPCG is a preconditioned eigensolver for large real symmetric and complex
+    Hermitian definite generalized eigenproblems.
+
+    Parameters
+    ----------
+    A : {sparse matrix, ndarray, LinearOperator, callable object}
+        The Hermitian linear operator of the problem, usually given by a
+        sparse matrix.  Often called the "stiffness matrix".
+    X : ndarray, float32 or float64
+        Initial approximation to the ``k`` eigenvectors (non-sparse).
+        If `A` has ``shape=(n,n)`` then `X` must have ``shape=(n,k)``.
+    B : {sparse matrix, ndarray, LinearOperator, callable object}
+        Optional. By default ``B = None``, which is equivalent to identity.
+        The right hand side operator in a generalized eigenproblem if present.
+        Often called the "mass matrix". Must be Hermitian positive definite.
+    M : {sparse matrix, ndarray, LinearOperator, callable object}
+        Optional. By default ``M = None``, which is equivalent to identity.
+        Preconditioner aiming to accelerate convergence.
+    Y : ndarray, float32 or float64, default: None
+        An ``n-by-sizeY`` ndarray of constraints with ``sizeY < n``.
+        The iterations will be performed in the ``B``-orthogonal complement
+        of the column-space of `Y`. `Y` must be full rank if present.
+    tol : scalar, optional
+        The default is ``tol=n*sqrt(eps)``.
+        Solver tolerance for the stopping criterion.
+    maxiter : int, default: 20
+        Maximum number of iterations.
+    largest : bool, default: True
+        When True, solve for the largest eigenvalues, otherwise the smallest.
+    verbosityLevel : int, optional
+        By default ``verbosityLevel=0`` no output.
+        Controls the solver standard/screen output.
+    retLambdaHistory : bool, default: False
+        Whether to return iterative eigenvalue history.
+    retResidualNormsHistory : bool, default: False
+        Whether to return iterative history of residual norms.
+    restartControl : int, optional.
+        Iterations restart if the residuals jump ``2**restartControl`` times
+        compared to the smallest recorded in ``retResidualNormsHistory``.
+        The default is ``restartControl=20``, making the restarts rare for
+        backward compatibility.
+
+    Returns
+    -------
+    lambda : ndarray of the shape ``(k, )``.
+        Array of ``k`` approximate eigenvalues.
+    v : ndarray of the same shape as ``X.shape``.
+        An array of ``k`` approximate eigenvectors.
+    lambdaHistory : ndarray, optional.
+        The eigenvalue history, if `retLambdaHistory` is ``True``.
+    ResidualNormsHistory : ndarray, optional.
+        The history of residual norms, if `retResidualNormsHistory`
+        is ``True``.
+
+    Notes
+    -----
+    The iterative loop runs ``maxit=maxiter`` (20 if ``maxit=None``)
+    iterations at most and finishes earlier if the tolerance is met.
+    Breaking backward compatibility with the previous version, LOBPCG
+    now returns the block of iterative vectors with the best accuracy rather
+    than the last one iterated, as a cure for possible divergence.
+
+    If ``X.dtype == np.float32`` and user-provided operations/multiplications
+    by `A`, `B`, and `M` all preserve the ``np.float32`` data type,
+    all the calculations and the output are in ``np.float32``.
+
+    The size of the iteration history output equals to the number of the best
+    (limited by `maxit`) iterations plus 3: initial, final, and postprocessing.
+
+    If both `retLambdaHistory` and `retResidualNormsHistory` are ``True``,
+    the return tuple has the following format
+    ``(lambda, V, lambda history, residual norms history)``.
+
+    In the following ``n`` denotes the matrix size and ``k`` the number
+    of required eigenvalues (smallest or largest).
+
+    The LOBPCG code internally solves eigenproblems of the size ``3k`` on every
+    iteration by calling the dense eigensolver `eigh`, so if ``k`` is not
+    small enough compared to ``n``, it makes no sense to call the LOBPCG code.
+    Moreover, if one calls the LOBPCG algorithm for ``5k > n``, it would likely
+    break internally, so the code calls the standard function `eigh` instead.
+    It is not that ``n`` should be large for the LOBPCG to work, but rather the
+    ratio ``n / k`` should be large. It you call LOBPCG with ``k=1``
+    and ``n=10``, it works though ``n`` is small. The method is intended
+    for extremely large ``n / k``.
+
+    The convergence speed depends basically on three factors:
+
+    1. Quality of the initial approximations `X` to the seeking eigenvectors.
+       Randomly distributed around the origin vectors work well if no better
+       choice is known.
+
+    2. Relative separation of the desired eigenvalues from the rest
+       of the eigenvalues. One can vary ``k`` to improve the separation.
+
+    3. Proper preconditioning to shrink the spectral spread.
+       For example, a rod vibration test problem (under tests
+       directory) is ill-conditioned for large ``n``, so convergence will be
+       slow, unless efficient preconditioning is used. For this specific
+       problem, a good simple preconditioner function would be a linear solve
+       for `A`, which is easy to code since `A` is tridiagonal.
+
+    References
+    ----------
+    .. [1] A. V. Knyazev (2001),
+           Toward the Optimal Preconditioned Eigensolver: Locally Optimal
+           Block Preconditioned Conjugate Gradient Method.
+           SIAM Journal on Scientific Computing 23, no. 2,
+           pp. 517-541. :doi:`10.1137/S1064827500366124`
+
+    .. [2] A. V. Knyazev, I. Lashuk, M. E. Argentati, and E. Ovchinnikov
+           (2007), Block Locally Optimal Preconditioned Eigenvalue Xolvers
+           (BLOPEX) in hypre and PETSc. :arxiv:`0705.2626`
+
+    .. [3] A. V. Knyazev's C and MATLAB implementations:
+           https://github.com/lobpcg/blopex
+
+    Examples
+    --------
+    Our first example is minimalistic - find the largest eigenvalue of
+    a diagonal matrix by solving the non-generalized eigenvalue problem
+    ``A x = lambda x`` without constraints or preconditioning.
+
+    >>> import numpy as np
+    >>> from scipy.sparse import spdiags
+    >>> from scipy.sparse.linalg import LinearOperator, aslinearoperator
+    >>> from scipy.sparse.linalg import lobpcg
+
+    The square matrix size is
+
+    >>> n = 100
+
+    and its diagonal entries are 1, ..., 100 defined by
+
+    >>> vals = np.arange(1, n + 1).astype(np.int16)
+
+    The first mandatory input parameter in this test is
+    the sparse diagonal matrix `A`
+    of the eigenvalue problem ``A x = lambda x`` to solve.
+
+    >>> A = spdiags(vals, 0, n, n)
+    >>> A = A.astype(np.int16)
+    >>> A.toarray()
+    array([[  1,   0,   0, ...,   0,   0,   0],
+           [  0,   2,   0, ...,   0,   0,   0],
+           [  0,   0,   3, ...,   0,   0,   0],
+           ...,
+           [  0,   0,   0, ...,  98,   0,   0],
+           [  0,   0,   0, ...,   0,  99,   0],
+           [  0,   0,   0, ...,   0,   0, 100]], shape=(100, 100), dtype=int16)
+
+    The second mandatory input parameter `X` is a 2D array with the
+    row dimension determining the number of requested eigenvalues.
+    `X` is an initial guess for targeted eigenvectors.
+    `X` must have linearly independent columns.
+    If no initial approximations available, randomly oriented vectors
+    commonly work best, e.g., with components normally distributed
+    around zero or uniformly distributed on the interval [-1 1].
+    Setting the initial approximations to dtype ``np.float32``
+    forces all iterative values to dtype ``np.float32`` speeding up
+    the run while still allowing accurate eigenvalue computations.
+
+    >>> k = 1
+    >>> rng = np.random.default_rng()
+    >>> X = rng.normal(size=(n, k))
+    >>> X = X.astype(np.float32)
+
+    >>> eigenvalues, _ = lobpcg(A, X, maxiter=60)
+    >>> eigenvalues
+    array([100.], dtype=float32)
+
+    `lobpcg` needs only access the matrix product with `A` rather
+    then the matrix itself. Since the matrix `A` is diagonal in
+    this example, one can write a function of the matrix product
+    ``A @ X`` using the diagonal values ``vals`` only, e.g., by
+    element-wise multiplication with broadcasting in the lambda-function
+
+    >>> A_lambda = lambda X: vals[:, np.newaxis] * X
+
+    or the regular function
+
+    >>> def A_matmat(X):
+    ...     return vals[:, np.newaxis] * X
+
+    and use the handle to one of these callables as an input
+
+    >>> eigenvalues, _ = lobpcg(A_lambda, X, maxiter=60)
+    >>> eigenvalues
+    array([100.], dtype=float32)
+    >>> eigenvalues, _ = lobpcg(A_matmat, X, maxiter=60)
+    >>> eigenvalues
+    array([100.], dtype=float32)
+
+    The traditional callable `LinearOperator` is no longer
+    necessary but still supported as the input to `lobpcg`.
+    Specifying ``matmat=A_matmat`` explicitly improves performance. 
+
+    >>> A_lo = LinearOperator((n, n), matvec=A_matmat, matmat=A_matmat, dtype=np.int16)
+    >>> eigenvalues, _ = lobpcg(A_lo, X, maxiter=80)
+    >>> eigenvalues
+    array([100.], dtype=float32)
+
+    The least efficient callable option is `aslinearoperator`:
+
+    >>> eigenvalues, _ = lobpcg(aslinearoperator(A), X, maxiter=80)
+    >>> eigenvalues
+    array([100.], dtype=float32)
+
+    We now switch to computing the three smallest eigenvalues specifying
+
+    >>> k = 3
+    >>> X = np.random.default_rng().normal(size=(n, k))
+
+    and ``largest=False`` parameter
+
+    >>> eigenvalues, _ = lobpcg(A, X, largest=False, maxiter=90)
+    >>> print(eigenvalues)  
+    [1. 2. 3.]
+
+    The next example illustrates computing 3 smallest eigenvalues of
+    the same matrix `A` given by the function handle ``A_matmat`` but
+    with constraints and preconditioning.
+
+    Constraints - an optional input parameter is a 2D array comprising
+    of column vectors that the eigenvectors must be orthogonal to
+
+    >>> Y = np.eye(n, 3)
+
+    The preconditioner acts as the inverse of `A` in this example, but
+    in the reduced precision ``np.float32`` even though the initial `X`
+    and thus all iterates and the output are in full ``np.float64``.
+
+    >>> inv_vals = 1./vals
+    >>> inv_vals = inv_vals.astype(np.float32)
+    >>> M = lambda X: inv_vals[:, np.newaxis] * X
+
+    Let us now solve the eigenvalue problem for the matrix `A` first
+    without preconditioning requesting 80 iterations
+
+    >>> eigenvalues, _ = lobpcg(A_matmat, X, Y=Y, largest=False, maxiter=80)
+    >>> eigenvalues
+    array([4., 5., 6.])
+    >>> eigenvalues.dtype
+    dtype('float64')
+
+    With preconditioning we need only 20 iterations from the same `X`
+
+    >>> eigenvalues, _ = lobpcg(A_matmat, X, Y=Y, M=M, largest=False, maxiter=20)
+    >>> eigenvalues
+    array([4., 5., 6.])
+
+    Note that the vectors passed in `Y` are the eigenvectors of the 3
+    smallest eigenvalues. The results returned above are orthogonal to those.
+
+    The primary matrix `A` may be indefinite, e.g., after shifting
+    ``vals`` by 50 from 1, ..., 100 to -49, ..., 50, we still can compute
+    the 3 smallest or largest eigenvalues.
+
+    >>> vals = vals - 50
+    >>> X = rng.normal(size=(n, k))
+    >>> eigenvalues, _ = lobpcg(A_matmat, X, largest=False, maxiter=99)
+    >>> eigenvalues
+    array([-49., -48., -47.])
+    >>> eigenvalues, _ = lobpcg(A_matmat, X, largest=True, maxiter=99)
+    >>> eigenvalues
+    array([50., 49., 48.])
+
+    """
+    blockVectorX = X
+    bestblockVectorX = blockVectorX
+    blockVectorY = Y
+    residualTolerance = tol
+    if maxiter is None:
+        maxiter = 20
+
+    bestIterationNumber = maxiter
+
+    sizeY = 0
+    if blockVectorY is not None:
+        if len(blockVectorY.shape) != 2:
+            warnings.warn(
+                f"Expected rank-2 array for argument Y, instead got "
+                f"{len(blockVectorY.shape)}, "
+                f"so ignore it and use no constraints.",
+                UserWarning, stacklevel=2
+            )
+            blockVectorY = None
+        else:
+            sizeY = blockVectorY.shape[1]
+
+    # Block size.
+    if blockVectorX is None:
+        raise ValueError("The mandatory initial matrix X cannot be None")
+    if len(blockVectorX.shape) != 2:
+        raise ValueError("expected rank-2 array for argument X")
+
+    n, sizeX = blockVectorX.shape
+
+    # Data type of iterates, determined by X, must be inexact
+    if not np.issubdtype(blockVectorX.dtype, np.inexact):
+        warnings.warn(
+            f"Data type for argument X is {blockVectorX.dtype}, "
+            f"which is not inexact, so casted to np.float32.",
+            UserWarning, stacklevel=2
+        )
+        blockVectorX = np.asarray(blockVectorX, dtype=np.float32)
+
+    if retLambdaHistory:
+        lambdaHistory = np.zeros((maxiter + 3, sizeX),
+                                 dtype=blockVectorX.dtype)
+    if retResidualNormsHistory:
+        residualNormsHistory = np.zeros((maxiter + 3, sizeX),
+                                        dtype=blockVectorX.dtype)
+
+    if verbosityLevel:
+        aux = "Solving "
+        if B is None:
+            aux += "standard"
+        else:
+            aux += "generalized"
+        aux += " eigenvalue problem with"
+        if M is None:
+            aux += "out"
+        aux += " preconditioning\n\n"
+        aux += "matrix size %d\n" % n
+        aux += "block size %d\n\n" % sizeX
+        if blockVectorY is None:
+            aux += "No constraints\n\n"
+        else:
+            if sizeY > 1:
+                aux += "%d constraints\n\n" % sizeY
+            else:
+                aux += "%d constraint\n\n" % sizeY
+        print(aux)
+
+    if (n - sizeY) < (5 * sizeX):
+        warnings.warn(
+            f"The problem size {n} minus the constraints size {sizeY} "
+            f"is too small relative to the block size {sizeX}. "
+            f"Using a dense eigensolver instead of LOBPCG iterations."
+            f"No output of the history of the iterations.",
+            UserWarning, stacklevel=2
+        )
+
+        sizeX = min(sizeX, n)
+
+        if blockVectorY is not None:
+            raise NotImplementedError(
+                "The dense eigensolver does not support constraints."
+            )
+
+        # Define the closed range of indices of eigenvalues to return.
+        if largest:
+            eigvals = (n - sizeX, n - 1)
+        else:
+            eigvals = (0, sizeX - 1)
+
+        try:
+            if isinstance(A, LinearOperator):
+                A = A(np.eye(n, dtype=int))
+            elif callable(A):
+                A = A(np.eye(n, dtype=int))
+                if A.shape != (n, n):
+                    raise ValueError(
+                        f"The shape {A.shape} of the primary matrix\n"
+                        f"defined by a callable object is wrong.\n"
+                    )
+            elif issparse(A):
+                A = A.toarray()
+            else:
+                A = np.asarray(A)
+        except Exception as e:
+            raise Exception(
+                f"Primary MatMul call failed with error\n"
+                f"{e}\n")
+
+        if B is not None:
+            try:
+                if isinstance(B, LinearOperator):
+                    B = B(np.eye(n, dtype=int))
+                elif callable(B):
+                    B = B(np.eye(n, dtype=int))
+                    if B.shape != (n, n):
+                        raise ValueError(
+                            f"The shape {B.shape} of the secondary matrix\n"
+                            f"defined by a callable object is wrong.\n"
+                        )
+                elif issparse(B):
+                    B = B.toarray()
+                else:
+                    B = np.asarray(B)
+            except Exception as e:
+                raise Exception(
+                    f"Secondary MatMul call failed with error\n"
+                    f"{e}\n")
+
+        try:
+            vals, vecs = eigh(A,
+                              B,
+                              subset_by_index=eigvals,
+                              check_finite=False)
+            if largest:
+                # Reverse order to be compatible with eigs() in 'LM' mode.
+                vals = vals[::-1]
+                vecs = vecs[:, ::-1]
+
+            return vals, vecs
+        except Exception as e:
+            raise Exception(
+                f"Dense eigensolver failed with error\n"
+                f"{e}\n"
+            )
+
+    if (residualTolerance is None) or (residualTolerance <= 0.0):
+        residualTolerance = np.sqrt(np.finfo(blockVectorX.dtype).eps) * n
+
+    A = _makeMatMat(A)
+    B = _makeMatMat(B)
+    M = _makeMatMat(M)
+
+    # Apply constraints to X.
+    if blockVectorY is not None:
+
+        if B is not None:
+            blockVectorBY = B(blockVectorY)
+            if blockVectorBY.shape != blockVectorY.shape:
+                raise ValueError(
+                    f"The shape {blockVectorY.shape} "
+                    f"of the constraint not preserved\n"
+                    f"and changed to {blockVectorBY.shape} "
+                    f"after multiplying by the secondary matrix.\n"
+                )
+        else:
+            blockVectorBY = blockVectorY
+
+        # gramYBY is a dense array.
+        gramYBY = blockVectorY.T.conj() @ blockVectorBY
+        try:
+            # gramYBY is a Cholesky factor from now on...
+            gramYBY = cho_factor(gramYBY, overwrite_a=True)
+        except LinAlgError as e:
+            raise ValueError("Linearly dependent constraints") from e
+
+        _applyConstraints(blockVectorX, gramYBY, blockVectorBY, blockVectorY)
+
+    ##
+    # B-orthonormalize X.
+    blockVectorX, blockVectorBX, _ = _b_orthonormalize(
+        B, blockVectorX, verbosityLevel=verbosityLevel)
+    if blockVectorX is None:
+        raise ValueError("Linearly dependent initial approximations")
+
+    ##
+    # Compute the initial Ritz vectors: solve the eigenproblem.
+    blockVectorAX = A(blockVectorX)
+    if blockVectorAX.shape != blockVectorX.shape:
+        raise ValueError(
+            f"The shape {blockVectorX.shape} "
+            f"of the initial approximations not preserved\n"
+            f"and changed to {blockVectorAX.shape} "
+            f"after multiplying by the primary matrix.\n"
+        )
+
+    gramXAX = blockVectorX.T.conj() @ blockVectorAX
+
+    _lambda, eigBlockVector = eigh(gramXAX, check_finite=False)
+    ii = _get_indx(_lambda, sizeX, largest)
+    _lambda = _lambda[ii]
+    if retLambdaHistory:
+        lambdaHistory[0, :] = _lambda
+
+    eigBlockVector = np.asarray(eigBlockVector[:, ii])
+    blockVectorX = _matmul_inplace(
+        blockVectorX, eigBlockVector,
+        verbosityLevel=verbosityLevel
+    )
+    blockVectorAX = _matmul_inplace(
+        blockVectorAX, eigBlockVector,
+        verbosityLevel=verbosityLevel
+    )
+    if B is not None:
+        blockVectorBX = _matmul_inplace(
+            blockVectorBX, eigBlockVector,
+            verbosityLevel=verbosityLevel
+        )
+
+    ##
+    # Active index set.
+    activeMask = np.ones((sizeX,), dtype=bool)
+
+    ##
+    # Main iteration loop.
+
+    blockVectorP = None  # set during iteration
+    blockVectorAP = None
+    blockVectorBP = None
+
+    smallestResidualNorm = np.abs(np.finfo(blockVectorX.dtype).max)
+
+    iterationNumber = -1
+    restart = True
+    forcedRestart = False
+    explicitGramFlag = False
+    while iterationNumber < maxiter:
+        iterationNumber += 1
+
+        if B is not None:
+            aux = blockVectorBX * _lambda[np.newaxis, :]
+        else:
+            aux = blockVectorX * _lambda[np.newaxis, :]
+
+        blockVectorR = blockVectorAX - aux
+
+        aux = np.sum(blockVectorR.conj() * blockVectorR, 0)
+        residualNorms = np.sqrt(np.abs(aux))
+        if retResidualNormsHistory:
+            residualNormsHistory[iterationNumber, :] = residualNorms
+        residualNorm = np.sum(np.abs(residualNorms)) / sizeX
+
+        if residualNorm < smallestResidualNorm:
+            smallestResidualNorm = residualNorm
+            bestIterationNumber = iterationNumber
+            bestblockVectorX = blockVectorX
+        elif residualNorm > 2**restartControl * smallestResidualNorm:
+            forcedRestart = True
+            blockVectorAX = A(blockVectorX)
+            if blockVectorAX.shape != blockVectorX.shape:
+                raise ValueError(
+                    f"The shape {blockVectorX.shape} "
+                    f"of the restarted iterate not preserved\n"
+                    f"and changed to {blockVectorAX.shape} "
+                    f"after multiplying by the primary matrix.\n"
+                )
+            if B is not None:
+                blockVectorBX = B(blockVectorX)
+                if blockVectorBX.shape != blockVectorX.shape:
+                    raise ValueError(
+                        f"The shape {blockVectorX.shape} "
+                        f"of the restarted iterate not preserved\n"
+                        f"and changed to {blockVectorBX.shape} "
+                        f"after multiplying by the secondary matrix.\n"
+                    )
+
+        ii = np.where(residualNorms > residualTolerance, True, False)
+        activeMask = activeMask & ii
+        currentBlockSize = activeMask.sum()
+
+        if verbosityLevel:
+            print(f"iteration {iterationNumber}")
+            print(f"current block size: {currentBlockSize}")
+            print(f"eigenvalue(s):\n{_lambda}")
+            print(f"residual norm(s):\n{residualNorms}")
+
+        if currentBlockSize == 0:
+            break
+
+        activeBlockVectorR = _as2d(blockVectorR[:, activeMask])
+
+        if iterationNumber > 0:
+            activeBlockVectorP = _as2d(blockVectorP[:, activeMask])
+            activeBlockVectorAP = _as2d(blockVectorAP[:, activeMask])
+            if B is not None:
+                activeBlockVectorBP = _as2d(blockVectorBP[:, activeMask])
+
+        if M is not None:
+            # Apply preconditioner T to the active residuals.
+            activeBlockVectorR = M(activeBlockVectorR)
+
+        ##
+        # Apply constraints to the preconditioned residuals.
+        if blockVectorY is not None:
+            _applyConstraints(activeBlockVectorR,
+                              gramYBY,
+                              blockVectorBY,
+                              blockVectorY)
+
+        ##
+        # B-orthogonalize the preconditioned residuals to X.
+        if B is not None:
+            activeBlockVectorR = activeBlockVectorR - (
+                blockVectorX @
+                (blockVectorBX.T.conj() @ activeBlockVectorR)
+            )
+        else:
+            activeBlockVectorR = activeBlockVectorR - (
+                blockVectorX @
+                (blockVectorX.T.conj() @ activeBlockVectorR)
+            )
+
+        ##
+        # B-orthonormalize the preconditioned residuals.
+        aux = _b_orthonormalize(
+            B, activeBlockVectorR, verbosityLevel=verbosityLevel)
+        activeBlockVectorR, activeBlockVectorBR, _ = aux
+
+        if activeBlockVectorR is None:
+            warnings.warn(
+                f"Failed at iteration {iterationNumber} with accuracies "
+                f"{residualNorms}\n not reaching the requested "
+                f"tolerance {residualTolerance}.",
+                UserWarning, stacklevel=2
+            )
+            break
+        activeBlockVectorAR = A(activeBlockVectorR)
+
+        if iterationNumber > 0:
+            if B is not None:
+                aux = _b_orthonormalize(
+                    B, activeBlockVectorP, activeBlockVectorBP,
+                    verbosityLevel=verbosityLevel
+                )
+                activeBlockVectorP, activeBlockVectorBP, invR = aux
+            else:
+                aux = _b_orthonormalize(B, activeBlockVectorP,
+                                        verbosityLevel=verbosityLevel)
+                activeBlockVectorP, _, invR = aux
+            # Function _b_orthonormalize returns None if Cholesky fails
+            if activeBlockVectorP is not None:
+                activeBlockVectorAP = _matmul_inplace(
+                    activeBlockVectorAP, invR,
+                    verbosityLevel=verbosityLevel
+                )
+                restart = forcedRestart
+            else:
+                restart = True
+
+        ##
+        # Perform the Rayleigh Ritz Procedure:
+        # Compute symmetric Gram matrices:
+
+        if activeBlockVectorAR.dtype == "float32":
+            myeps = 1
+        else:
+            myeps = np.sqrt(np.finfo(activeBlockVectorR.dtype).eps)
+
+        if residualNorms.max() > myeps and not explicitGramFlag:
+            explicitGramFlag = False
+        else:
+            # Once explicitGramFlag, forever explicitGramFlag.
+            explicitGramFlag = True
+
+        # Shared memory assignments to simplify the code
+        if B is None:
+            blockVectorBX = blockVectorX
+            activeBlockVectorBR = activeBlockVectorR
+            if not restart:
+                activeBlockVectorBP = activeBlockVectorP
+
+        # Common submatrices:
+        gramXAR = np.dot(blockVectorX.T.conj(), activeBlockVectorAR)
+        gramRAR = np.dot(activeBlockVectorR.T.conj(), activeBlockVectorAR)
+
+        gramDtype = activeBlockVectorAR.dtype
+        if explicitGramFlag:
+            gramRAR = (gramRAR + gramRAR.T.conj()) / 2
+            gramXAX = np.dot(blockVectorX.T.conj(), blockVectorAX)
+            gramXAX = (gramXAX + gramXAX.T.conj()) / 2
+            gramXBX = np.dot(blockVectorX.T.conj(), blockVectorBX)
+            gramRBR = np.dot(activeBlockVectorR.T.conj(), activeBlockVectorBR)
+            gramXBR = np.dot(blockVectorX.T.conj(), activeBlockVectorBR)
+        else:
+            gramXAX = np.diag(_lambda).astype(gramDtype)
+            gramXBX = np.eye(sizeX, dtype=gramDtype)
+            gramRBR = np.eye(currentBlockSize, dtype=gramDtype)
+            gramXBR = np.zeros((sizeX, currentBlockSize), dtype=gramDtype)
+
+        if not restart:
+            gramXAP = np.dot(blockVectorX.T.conj(), activeBlockVectorAP)
+            gramRAP = np.dot(activeBlockVectorR.T.conj(), activeBlockVectorAP)
+            gramPAP = np.dot(activeBlockVectorP.T.conj(), activeBlockVectorAP)
+            gramXBP = np.dot(blockVectorX.T.conj(), activeBlockVectorBP)
+            gramRBP = np.dot(activeBlockVectorR.T.conj(), activeBlockVectorBP)
+            if explicitGramFlag:
+                gramPAP = (gramPAP + gramPAP.T.conj()) / 2
+                gramPBP = np.dot(activeBlockVectorP.T.conj(),
+                                 activeBlockVectorBP)
+            else:
+                gramPBP = np.eye(currentBlockSize, dtype=gramDtype)
+
+            gramA = np.block(
+                [
+                    [gramXAX, gramXAR, gramXAP],
+                    [gramXAR.T.conj(), gramRAR, gramRAP],
+                    [gramXAP.T.conj(), gramRAP.T.conj(), gramPAP],
+                ]
+            )
+            gramB = np.block(
+                [
+                    [gramXBX, gramXBR, gramXBP],
+                    [gramXBR.T.conj(), gramRBR, gramRBP],
+                    [gramXBP.T.conj(), gramRBP.T.conj(), gramPBP],
+                ]
+            )
+
+            _handle_gramA_gramB_verbosity(gramA, gramB, verbosityLevel)
+
+            try:
+                _lambda, eigBlockVector = eigh(gramA,
+                                               gramB,
+                                               check_finite=False)
+            except LinAlgError as e:
+                # raise ValueError("eigh failed in lobpcg iterations") from e
+                if verbosityLevel:
+                    warnings.warn(
+                        f"eigh failed at iteration {iterationNumber} \n"
+                        f"with error {e} causing a restart.\n",
+                        UserWarning, stacklevel=2
+                    )
+                # try again after dropping the direction vectors P from RR
+                restart = True
+
+        if restart:
+            gramA = np.block([[gramXAX, gramXAR], [gramXAR.T.conj(), gramRAR]])
+            gramB = np.block([[gramXBX, gramXBR], [gramXBR.T.conj(), gramRBR]])
+
+            _handle_gramA_gramB_verbosity(gramA, gramB, verbosityLevel)
+
+            try:
+                _lambda, eigBlockVector = eigh(gramA,
+                                               gramB,
+                                               check_finite=False)
+            except LinAlgError as e:
+                # raise ValueError("eigh failed in lobpcg iterations") from e
+                warnings.warn(
+                    f"eigh failed at iteration {iterationNumber} with error\n"
+                    f"{e}\n",
+                    UserWarning, stacklevel=2
+                )
+                break
+
+        ii = _get_indx(_lambda, sizeX, largest)
+        _lambda = _lambda[ii]
+        eigBlockVector = eigBlockVector[:, ii]
+        if retLambdaHistory:
+            lambdaHistory[iterationNumber + 1, :] = _lambda
+
+        # Compute Ritz vectors.
+        if B is not None:
+            if not restart:
+                eigBlockVectorX = eigBlockVector[:sizeX]
+                eigBlockVectorR = eigBlockVector[sizeX:
+                                                 sizeX + currentBlockSize]
+                eigBlockVectorP = eigBlockVector[sizeX + currentBlockSize:]
+
+                pp = np.dot(activeBlockVectorR, eigBlockVectorR)
+                pp += np.dot(activeBlockVectorP, eigBlockVectorP)
+
+                app = np.dot(activeBlockVectorAR, eigBlockVectorR)
+                app += np.dot(activeBlockVectorAP, eigBlockVectorP)
+
+                bpp = np.dot(activeBlockVectorBR, eigBlockVectorR)
+                bpp += np.dot(activeBlockVectorBP, eigBlockVectorP)
+            else:
+                eigBlockVectorX = eigBlockVector[:sizeX]
+                eigBlockVectorR = eigBlockVector[sizeX:]
+
+                pp = np.dot(activeBlockVectorR, eigBlockVectorR)
+                app = np.dot(activeBlockVectorAR, eigBlockVectorR)
+                bpp = np.dot(activeBlockVectorBR, eigBlockVectorR)
+
+            blockVectorX = np.dot(blockVectorX, eigBlockVectorX) + pp
+            blockVectorAX = np.dot(blockVectorAX, eigBlockVectorX) + app
+            blockVectorBX = np.dot(blockVectorBX, eigBlockVectorX) + bpp
+
+            blockVectorP, blockVectorAP, blockVectorBP = pp, app, bpp
+
+        else:
+            if not restart:
+                eigBlockVectorX = eigBlockVector[:sizeX]
+                eigBlockVectorR = eigBlockVector[sizeX:
+                                                 sizeX + currentBlockSize]
+                eigBlockVectorP = eigBlockVector[sizeX + currentBlockSize:]
+
+                pp = np.dot(activeBlockVectorR, eigBlockVectorR)
+                pp += np.dot(activeBlockVectorP, eigBlockVectorP)
+
+                app = np.dot(activeBlockVectorAR, eigBlockVectorR)
+                app += np.dot(activeBlockVectorAP, eigBlockVectorP)
+            else:
+                eigBlockVectorX = eigBlockVector[:sizeX]
+                eigBlockVectorR = eigBlockVector[sizeX:]
+
+                pp = np.dot(activeBlockVectorR, eigBlockVectorR)
+                app = np.dot(activeBlockVectorAR, eigBlockVectorR)
+
+            blockVectorX = np.dot(blockVectorX, eigBlockVectorX) + pp
+            blockVectorAX = np.dot(blockVectorAX, eigBlockVectorX) + app
+
+            blockVectorP, blockVectorAP = pp, app
+
+    if B is not None:
+        aux = blockVectorBX * _lambda[np.newaxis, :]
+    else:
+        aux = blockVectorX * _lambda[np.newaxis, :]
+
+    blockVectorR = blockVectorAX - aux
+
+    aux = np.sum(blockVectorR.conj() * blockVectorR, 0)
+    residualNorms = np.sqrt(np.abs(aux))
+    # Use old lambda in case of early loop exit.
+    if retLambdaHistory:
+        lambdaHistory[iterationNumber + 1, :] = _lambda
+    if retResidualNormsHistory:
+        residualNormsHistory[iterationNumber + 1, :] = residualNorms
+    residualNorm = np.sum(np.abs(residualNorms)) / sizeX
+    if residualNorm < smallestResidualNorm:
+        smallestResidualNorm = residualNorm
+        bestIterationNumber = iterationNumber + 1
+        bestblockVectorX = blockVectorX
+
+    if np.max(np.abs(residualNorms)) > residualTolerance:
+        warnings.warn(
+            f"Exited at iteration {iterationNumber} with accuracies \n"
+            f"{residualNorms}\n"
+            f"not reaching the requested tolerance {residualTolerance}.\n"
+            f"Use iteration {bestIterationNumber} instead with accuracy \n"
+            f"{smallestResidualNorm}.\n",
+            UserWarning, stacklevel=2
+        )
+
+    if verbosityLevel:
+        print(f"Final iterative eigenvalue(s):\n{_lambda}")
+        print(f"Final iterative residual norm(s):\n{residualNorms}")
+
+    blockVectorX = bestblockVectorX
+    # Making eigenvectors "exactly" satisfy the blockVectorY constrains
+    if blockVectorY is not None:
+        _applyConstraints(blockVectorX,
+                          gramYBY,
+                          blockVectorBY,
+                          blockVectorY)
+
+    # Making eigenvectors "exactly" othonormalized by final "exact" RR
+    blockVectorAX = A(blockVectorX)
+    if blockVectorAX.shape != blockVectorX.shape:
+        raise ValueError(
+            f"The shape {blockVectorX.shape} "
+            f"of the postprocessing iterate not preserved\n"
+            f"and changed to {blockVectorAX.shape} "
+            f"after multiplying by the primary matrix.\n"
+        )
+    gramXAX = np.dot(blockVectorX.T.conj(), blockVectorAX)
+
+    blockVectorBX = blockVectorX
+    if B is not None:
+        blockVectorBX = B(blockVectorX)
+        if blockVectorBX.shape != blockVectorX.shape:
+            raise ValueError(
+                f"The shape {blockVectorX.shape} "
+                f"of the postprocessing iterate not preserved\n"
+                f"and changed to {blockVectorBX.shape} "
+                f"after multiplying by the secondary matrix.\n"
+            )
+
+    gramXBX = np.dot(blockVectorX.T.conj(), blockVectorBX)
+    _handle_gramA_gramB_verbosity(gramXAX, gramXBX, verbosityLevel)
+    gramXAX = (gramXAX + gramXAX.T.conj()) / 2
+    gramXBX = (gramXBX + gramXBX.T.conj()) / 2
+    try:
+        _lambda, eigBlockVector = eigh(gramXAX,
+                                       gramXBX,
+                                       check_finite=False)
+    except LinAlgError as e:
+        raise ValueError("eigh has failed in lobpcg postprocessing") from e
+
+    ii = _get_indx(_lambda, sizeX, largest)
+    _lambda = _lambda[ii]
+    eigBlockVector = np.asarray(eigBlockVector[:, ii])
+
+    blockVectorX = np.dot(blockVectorX, eigBlockVector)
+    blockVectorAX = np.dot(blockVectorAX, eigBlockVector)
+
+    if B is not None:
+        blockVectorBX = np.dot(blockVectorBX, eigBlockVector)
+        aux = blockVectorBX * _lambda[np.newaxis, :]
+    else:
+        aux = blockVectorX * _lambda[np.newaxis, :]
+
+    blockVectorR = blockVectorAX - aux
+
+    aux = np.sum(blockVectorR.conj() * blockVectorR, 0)
+    residualNorms = np.sqrt(np.abs(aux))
+
+    if retLambdaHistory:
+        lambdaHistory[bestIterationNumber + 1, :] = _lambda
+    if retResidualNormsHistory:
+        residualNormsHistory[bestIterationNumber + 1, :] = residualNorms
+
+    if retLambdaHistory:
+        lambdaHistory = lambdaHistory[
+            : bestIterationNumber + 2, :]
+    if retResidualNormsHistory:
+        residualNormsHistory = residualNormsHistory[
+            : bestIterationNumber + 2, :]
+
+    if np.max(np.abs(residualNorms)) > residualTolerance:
+        warnings.warn(
+            f"Exited postprocessing with accuracies \n"
+            f"{residualNorms}\n"
+            f"not reaching the requested tolerance {residualTolerance}.",
+            UserWarning, stacklevel=2
+        )
+
+    if verbosityLevel:
+        print(f"Final postprocessing eigenvalue(s):\n{_lambda}")
+        print(f"Final residual norm(s):\n{residualNorms}")
+
+    if retLambdaHistory:
+        lambdaHistory = np.vsplit(lambdaHistory, np.shape(lambdaHistory)[0])
+        lambdaHistory = [np.squeeze(i) for i in lambdaHistory]
+    if retResidualNormsHistory:
+        residualNormsHistory = np.vsplit(residualNormsHistory,
+                                         np.shape(residualNormsHistory)[0])
+        residualNormsHistory = [np.squeeze(i) for i in residualNormsHistory]
+
+    if retLambdaHistory:
+        if retResidualNormsHistory:
+            return _lambda, blockVectorX, lambdaHistory, residualNormsHistory
+        else:
+            return _lambda, blockVectorX, lambdaHistory
+    else:
+        if retResidualNormsHistory:
+            return _lambda, blockVectorX, residualNormsHistory
+        else:
+            return _lambda, blockVectorX
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
new file mode 100644
index 0000000000000000000000000000000000000000..850aa0c1b3f5d0c47c1ba66d518b8a7059c85e95
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
@@ -0,0 +1,725 @@
+""" Test functions for the sparse.linalg._eigen.lobpcg module
+"""
+
+import itertools
+import platform
+import sys
+import pytest
+import numpy as np
+from numpy import ones, r_, diag
+from numpy.testing import (assert_almost_equal, assert_equal,
+                           assert_allclose, assert_array_less)
+
+from scipy import sparse
+from scipy.linalg import (eigh, toeplitz,
+                          cholesky_banded, cho_solve_banded)
+from scipy.sparse import dia_array, eye_array, csr_array
+from scipy.sparse.linalg import eigsh, LinearOperator
+from scipy.sparse.linalg._eigen.lobpcg import lobpcg
+from scipy.sparse.linalg._eigen.lobpcg.lobpcg import _b_orthonormalize
+from scipy._lib._util import np_long, np_ulong
+from scipy.sparse.linalg._special_sparse_arrays import (Sakurai,
+                                                        MikotaPair)
+
+_IS_32BIT = (sys.maxsize < 2**32)
+
+INT_DTYPES = (np.intc, np_long, np.longlong, np.uintc, np_ulong, np.ulonglong)
+# np.half is unsupported on many test systems so excluded
+REAL_DTYPES = (np.float32, np.float64, np.longdouble)
+COMPLEX_DTYPES = (np.complex64, np.complex128, np.clongdouble)
+INEXACTDTYPES = REAL_DTYPES + COMPLEX_DTYPES
+ALLDTYPES = INT_DTYPES + INEXACTDTYPES
+
+
+def sign_align(A, B):
+    """Align signs of columns of A match those of B: column-wise remove
+    sign of A by multiplying with its sign then multiply in sign of B.
+    """
+    return np.array([col_A * np.sign(col_A[0]) * np.sign(col_B[0])
+                     for col_A, col_B in zip(A.T, B.T)]).T
+
+def ElasticRod(n):
+    """Build the matrices for the generalized eigenvalue problem of the
+    fixed-free elastic rod vibration model.
+    """
+    L = 1.0
+    le = L/n
+    rho = 7.85e3
+    S = 1.e-4
+    E = 2.1e11
+    mass = rho*S*le/6.
+    k = E*S/le
+    A = k*(diag(r_[2.*ones(n-1), 1])-diag(ones(n-1), 1)-diag(ones(n-1), -1))
+    B = mass*(diag(r_[4.*ones(n-1), 2])+diag(ones(n-1), 1)+diag(ones(n-1), -1))
+    return A, B
+
+
+@pytest.mark.filterwarnings("ignore:The problem size")
+@pytest.mark.parametrize("n", [10, 20])
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_ElasticRod(n):
+    """Check eigh vs. lobpcg consistency for elastic rod model.
+    """
+    A, B = ElasticRod(n)
+    m = 2
+    rnd = np.random.RandomState(0)
+    X = rnd.standard_normal((n, m))
+    eigvals, _ = lobpcg(A, X, B=B, tol=1e-2, maxiter=50, largest=False)
+    eigvals.sort()
+    w, _ = eigh(A, b=B)
+    w.sort()
+    assert_almost_equal(w[:int(m/2)], eigvals[:int(m/2)], decimal=2)
+
+
+@pytest.mark.parametrize("n", [50])
+@pytest.mark.parametrize("m", [1, 2, 10])
+@pytest.mark.filterwarnings("ignore:Casting complex values to real")
+@pytest.mark.parametrize("Vdtype", INEXACTDTYPES)
+@pytest.mark.parametrize("Bdtype", ALLDTYPES)
+@pytest.mark.parametrize("BVdtype", INEXACTDTYPES)
+def test_b_orthonormalize(n, m, Vdtype, Bdtype, BVdtype):
+    """Test B-orthonormalization by Cholesky with callable 'B'.
+    The function '_b_orthonormalize' is key in LOBPCG but may
+    lead to numerical instabilities. The input vectors are often
+    badly scaled, so the function needs scale-invariant Cholesky;
+    see https://netlib.org/lapack/lawnspdf/lawn14.pdf.
+    """
+    rnd = np.random.RandomState(0)
+    X = rnd.standard_normal((n, m)).astype(Vdtype)
+    Xcopy = np.copy(X)
+    vals = np.arange(1, n+1, dtype=float)
+    B = dia_array(([vals], [0]), shape=(n, n)).astype(Bdtype)
+    BX = B @ X
+    BX = BX.astype(BVdtype)
+    is_all_complex = (np.issubdtype(Vdtype, np.complexfloating) and
+                     np.issubdtype(BVdtype, np.complexfloating))
+    is_all_notcomplex = (not np.issubdtype(Vdtype, np.complexfloating) and
+                        not np.issubdtype(Bdtype, np.complexfloating) and
+                        not np.issubdtype(BVdtype, np.complexfloating))
+
+    # All complex or all not complex can calculate in-place
+    check_inplace = is_all_complex or is_all_notcomplex
+    # np.longdouble tol cannot be achieved on most systems
+    atol = m * n * max(np.finfo(Vdtype).eps,
+                       np.finfo(BVdtype).eps,
+                       np.finfo(np.float64).eps)
+
+    Xo, BXo, _ = _b_orthonormalize(lambda v: B @ v, X, BX)
+    if check_inplace:
+        # Check in-place
+        assert_equal(X, Xo)
+        assert_equal(id(X), id(Xo))
+        assert_equal(BX, BXo)
+        assert_equal(id(BX), id(BXo))
+    # Check BXo
+    assert_allclose(B @ Xo, BXo, atol=atol, rtol=atol)
+    # Check B-orthonormality
+    assert_allclose(Xo.T.conj() @ B @ Xo, np.identity(m),
+                    atol=atol, rtol=atol)
+    # Repeat without BX in outputs
+    X = np.copy(Xcopy)
+    Xo1, BXo1, _ = _b_orthonormalize(lambda v: B @ v, X)
+    assert_allclose(Xo, Xo1, atol=atol, rtol=atol)
+    assert_allclose(BXo, BXo1, atol=atol, rtol=atol)
+    if check_inplace:
+        # Check in-place.
+        assert_equal(X, Xo1)
+        assert_equal(id(X), id(Xo1))
+    # Check BXo1
+    assert_allclose(B @ Xo1, BXo1, atol=atol, rtol=atol)
+
+    # Introduce column-scaling in X
+    scaling = 1.0 / np.geomspace(10, 1e10, num=m)
+    X = Xcopy * scaling
+    X = X.astype(Vdtype)
+    BX = B @ X
+    BX = BX.astype(BVdtype)
+    # Check scaling-invariance of Cholesky-based orthonormalization
+    Xo1, BXo1, _ = _b_orthonormalize(lambda v: B @ v, X, BX)
+    # The output should be the same, up the signs of the columns
+    Xo1 =  sign_align(Xo1, Xo)
+    assert_allclose(Xo, Xo1, atol=atol, rtol=atol)
+    BXo1 =  sign_align(BXo1, BXo)
+    assert_allclose(BXo, BXo1, atol=atol, rtol=atol)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.filterwarnings("ignore:Exited at iteration 0")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_nonhermitian_warning(capsys):
+    """Check the warning of a Ritz matrix being not Hermitian
+    by feeding a non-Hermitian input matrix.
+    Also check stdout since verbosityLevel=1 and lack of stderr.
+    """
+    n = 10
+    X = np.arange(n * 2).reshape(n, 2).astype(np.float32)
+    A = np.arange(n * n).reshape(n, n).astype(np.float32)
+    with pytest.warns(UserWarning, match="Matrix gramA"):
+        _, _ = lobpcg(A, X, verbosityLevel=1, maxiter=0)
+    out, err = capsys.readouterr()  # Capture output
+    assert out.startswith("Solving standard eigenvalue")  # Test stdout
+    assert err == ''  # Test empty stderr
+    # Make the matrix symmetric and the UserWarning disappears.
+    A += A.T
+    _, _ = lobpcg(A, X, verbosityLevel=1, maxiter=0)
+    out, err = capsys.readouterr()  # Capture output
+    assert out.startswith("Solving standard eigenvalue")  # Test stdout
+    assert err == ''  # Test empty stderr
+
+
+def test_regression():
+    """Check the eigenvalue of the identity matrix is one.
+    """
+    # https://mail.python.org/pipermail/scipy-user/2010-October/026944.html
+    n = 10
+    X = np.ones((n, 1))
+    A = np.identity(n)
+    w, _ = lobpcg(A, X)
+    assert_allclose(w, [1])
+
+
+@pytest.mark.filterwarnings("ignore:The problem size")
+@pytest.mark.parametrize('n, m, m_excluded', [(30, 4, 3), (4, 2, 0)])
+def test_diagonal(n, m, m_excluded):
+    """Test ``m - m_excluded`` eigenvalues and eigenvectors of
+    diagonal matrices of the size ``n`` varying matrix formats:
+    dense array, spare matrix, and ``LinearOperator`` for both
+    matrixes in the generalized eigenvalue problem ``Av = cBv``
+    and for the preconditioner.
+    """
+    rnd = np.random.RandomState(0)
+
+    # Define the generalized eigenvalue problem Av = cBv
+    # where (c, v) is a generalized eigenpair,
+    # A is the diagonal matrix whose entries are 1,...n,
+    # B is the identity matrix.
+    vals = np.arange(1, n+1, dtype=float)
+    A_s = dia_array(([vals], [0]), shape=(n, n))
+    A_a = A_s.toarray()
+
+    def A_f(x):
+        return A_s @ x
+
+    A_lo = LinearOperator(matvec=A_f,
+                          matmat=A_f,
+                          shape=(n, n), dtype=float)
+
+    B_a = eye_array(n)
+    B_s = csr_array(B_a)
+
+    def B_f(x):
+        return B_a @ x
+
+    B_lo = LinearOperator(matvec=B_f,
+                          matmat=B_f,
+                          shape=(n, n), dtype=float)
+
+    # Let the preconditioner M be the inverse of A.
+    M_s = dia_array(([1./vals], [0]), shape=(n, n))
+    M_a = M_s.toarray()
+
+    def M_f(x):
+        return M_s @ x
+
+    M_lo = LinearOperator(matvec=M_f,
+                          matmat=M_f,
+                          shape=(n, n), dtype=float)
+
+    # Pick random initial vectors.
+    X = rnd.normal(size=(n, m))
+
+    # Require that the returned eigenvectors be in the orthogonal complement
+    # of the first few standard basis vectors.
+    if m_excluded > 0:
+        Y = np.eye(n, m_excluded)
+    else:
+        Y = None
+
+    for A in [A_a, A_s, A_lo]:
+        for B in [B_a, B_s, B_lo]:
+            for M in [M_a, M_s, M_lo]:
+                eigvals, vecs = lobpcg(A, X, B, M=M, Y=Y,
+                                       maxiter=40, largest=False)
+
+                assert_allclose(eigvals, np.arange(1+m_excluded,
+                                                   1+m_excluded+m))
+                _check_eigen(A, eigvals, vecs, rtol=1e-3, atol=1e-3)
+
+
+def _check_eigen(M, w, V, rtol=1e-8, atol=1e-14):
+    """Check if the eigenvalue residual is small.
+    """
+    mult_wV = np.multiply(w, V)
+    dot_MV = M.dot(V)
+    assert_allclose(mult_wV, dot_MV, rtol=rtol, atol=atol)
+
+
+def _check_fiedler(n, p):
+    """Check the Fiedler vector computation.
+    """
+    # This is not necessarily the recommended way to find the Fiedler vector.
+    col = np.zeros(n)
+    col[1] = 1
+    A = toeplitz(col)
+    D = np.diag(A.sum(axis=1))
+    L = D - A
+    # Compute the full eigendecomposition using tricks, e.g.
+    # http://www.cs.yale.edu/homes/spielman/561/2009/lect02-09.pdf
+    tmp = np.pi * np.arange(n) / n
+    analytic_w = 2 * (1 - np.cos(tmp))
+    analytic_V = np.cos(np.outer(np.arange(n) + 1/2, tmp))
+    _check_eigen(L, analytic_w, analytic_V)
+    # Compute the full eigendecomposition using eigh.
+    eigh_w, eigh_V = eigh(L)
+    _check_eigen(L, eigh_w, eigh_V)
+    # Check that the first eigenvalue is near zero and that the rest agree.
+    assert_array_less(np.abs([eigh_w[0], analytic_w[0]]), 1e-14)
+    assert_allclose(eigh_w[1:], analytic_w[1:])
+
+    # Check small lobpcg eigenvalues.
+    X = analytic_V[:, :p]
+    lobpcg_w, lobpcg_V = lobpcg(L, X, largest=False)
+    assert_equal(lobpcg_w.shape, (p,))
+    assert_equal(lobpcg_V.shape, (n, p))
+    _check_eigen(L, lobpcg_w, lobpcg_V)
+    assert_array_less(np.abs(np.min(lobpcg_w)), 1e-14)
+    assert_allclose(np.sort(lobpcg_w)[1:], analytic_w[1:p])
+
+    # Check large lobpcg eigenvalues.
+    X = analytic_V[:, -p:]
+    lobpcg_w, lobpcg_V = lobpcg(L, X, largest=True)
+    assert_equal(lobpcg_w.shape, (p,))
+    assert_equal(lobpcg_V.shape, (n, p))
+    _check_eigen(L, lobpcg_w, lobpcg_V)
+    assert_allclose(np.sort(lobpcg_w), analytic_w[-p:])
+
+    # Look for the Fiedler vector using good but not exactly correct guesses.
+    fiedler_guess = np.concatenate((np.ones(n//2), -np.ones(n-n//2)))
+    X = np.vstack((np.ones(n), fiedler_guess)).T
+    lobpcg_w, _ = lobpcg(L, X, largest=False)
+    # Mathematically, the smaller eigenvalue should be zero
+    # and the larger should be the algebraic connectivity.
+    lobpcg_w = np.sort(lobpcg_w)
+    assert_allclose(lobpcg_w, analytic_w[:2], atol=1e-14)
+
+
+@pytest.mark.thread_unsafe
+def test_fiedler_small_8():
+    """Check the dense workaround path for small matrices.
+    """
+    # This triggers the dense path because 8 < 2*5.
+    with pytest.warns(UserWarning, match="The problem size"):
+        _check_fiedler(8, 2)
+
+
+def test_fiedler_large_12():
+    """Check the dense workaround path avoided for non-small matrices.
+    """
+    # This does not trigger the dense path, because 2*5 <= 12.
+    _check_fiedler(12, 2)
+
+
+@pytest.mark.filterwarnings("ignore:Failed at iteration")
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_failure_to_run_iterations():
+    """Check that the code exits gracefully without breaking. Issue #10974.
+    The code may or not issue a warning, filtered out. Issue #15935, #17954.
+    """
+    rnd = np.random.RandomState(0)
+    X = rnd.standard_normal((100, 10))
+    A = X @ X.T
+    Q = rnd.standard_normal((X.shape[0], 4))
+    eigenvalues, _ = lobpcg(A, Q, maxiter=40, tol=1e-12)
+    assert np.max(eigenvalues) > 0
+
+
+@pytest.mark.thread_unsafe
+def test_failure_to_run_iterations_nonsymmetric():
+    """Check that the code exists gracefully without breaking
+    if the matrix in not symmetric.
+    """
+    A = np.zeros((10, 10))
+    A[0, 1] = 1
+    Q = np.ones((10, 1))
+    msg = "Exited at iteration 2|Exited postprocessing with accuracies.*"
+    with pytest.warns(UserWarning, match=msg):
+        eigenvalues, _ = lobpcg(A, Q, maxiter=20)
+    assert np.max(eigenvalues) > 0
+
+
+@pytest.mark.filterwarnings("ignore:The problem size")
+def test_hermitian():
+    """Check complex-value Hermitian cases.
+    """
+    rnd = np.random.RandomState(0)
+
+    sizes = [3, 12]
+    ks = [1, 2]
+    gens = [True, False]
+
+    for s, k, gen, dh, dx, db in (
+        itertools.product(sizes, ks, gens, gens, gens, gens)
+    ):
+        H = rnd.random((s, s)) + 1.j * rnd.random((s, s))
+        H = 10 * np.eye(s) + H + H.T.conj()
+        H = H.astype(np.complex128) if dh else H.astype(np.complex64)
+
+        X = rnd.standard_normal((s, k))
+        X = X + 1.j * rnd.standard_normal((s, k))
+        X = X.astype(np.complex128) if dx else X.astype(np.complex64)
+
+        if not gen:
+            B = np.eye(s)
+            w, v = lobpcg(H, X, maxiter=99, verbosityLevel=0)
+            # Also test mixing complex H with real B.
+            wb, _ = lobpcg(H, X, B, maxiter=99, verbosityLevel=0)
+            assert_allclose(w, wb, rtol=1e-6)
+            w0, _ = eigh(H)
+        else:
+            B = rnd.random((s, s)) + 1.j * rnd.random((s, s))
+            B = 10 * np.eye(s) + B.dot(B.T.conj())
+            B = B.astype(np.complex128) if db else B.astype(np.complex64)
+            w, v = lobpcg(H, X, B, maxiter=99, verbosityLevel=0)
+            w0, _ = eigh(H, B)
+
+        for wx, vx in zip(w, v.T):
+            # Check eigenvector
+            assert_allclose(np.linalg.norm(H.dot(vx) - B.dot(vx) * wx)
+                            / np.linalg.norm(H.dot(vx)),
+                            0, atol=5e-2, rtol=0)
+
+            # Compare eigenvalues
+            j = np.argmin(abs(w0 - wx))
+            assert_allclose(wx, w0[j], rtol=1e-4)
+
+
+# The n=5 case tests the alternative small matrix code path that uses eigh().
+@pytest.mark.filterwarnings("ignore:The problem size")
+@pytest.mark.parametrize('n, atol', [(20, 1e-3), (5, 1e-8)])
+def test_eigsh_consistency(n, atol):
+    """Check eigsh vs. lobpcg consistency.
+    """
+    vals = np.arange(1, n+1, dtype=np.float64)
+    A = dia_array((vals, 0), shape=(n, n))
+    rnd = np.random.RandomState(0)
+    X = rnd.standard_normal((n, 2))
+    lvals, lvecs = lobpcg(A, X, largest=True, maxiter=100)
+    vals, _ = eigsh(A, k=2)
+
+    _check_eigen(A, lvals, lvecs, atol=atol, rtol=0)
+    assert_allclose(np.sort(vals), np.sort(lvals), atol=1e-14)
+
+
+@pytest.mark.thread_unsafe
+def test_verbosity():
+    """Check that nonzero verbosity level code runs.
+    """
+    rnd = np.random.RandomState(0)
+    X = rnd.standard_normal((10, 10))
+    A = X @ X.T
+    Q = rnd.standard_normal((X.shape[0], 1))
+    msg = "Exited at iteration.*|Exited postprocessing with accuracies.*"
+    with pytest.warns(UserWarning, match=msg):
+        _, _ = lobpcg(A, Q, maxiter=3, verbosityLevel=9)
+
+
+@pytest.mark.xfail(_IS_32BIT and sys.platform == 'win32',
+                   reason="tolerance violation on windows")
+@pytest.mark.xfail(platform.machine() == 'ppc64le',
+                   reason="fails on ppc64le")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_tolerance_float32():
+    """Check lobpcg for attainable tolerance in float32.
+    """
+    rnd = np.random.RandomState(0)
+    n = 50
+    m = 3
+    vals = -np.arange(1, n + 1)
+    A = dia_array(([vals], [0]), shape=(n, n))
+    A = A.astype(np.float32)
+    X = rnd.standard_normal((n, m))
+    X = X.astype(np.float32)
+    eigvals, _ = lobpcg(A, X, tol=1.25e-5, maxiter=50, verbosityLevel=0)
+    assert_allclose(eigvals, -np.arange(1, 1 + m), atol=2e-5, rtol=1e-5)
+
+
+@pytest.mark.parametrize("vdtype", INEXACTDTYPES)
+@pytest.mark.parametrize("mdtype", ALLDTYPES)
+@pytest.mark.parametrize("arr_type", [np.array,
+                                      sparse.csr_array,
+                                      sparse.coo_array])
+def test_dtypes(vdtype, mdtype, arr_type):
+    """Test lobpcg in various dtypes.
+    """
+    rnd = np.random.RandomState(0)
+    n = 12
+    m = 2
+    A = arr_type(np.diag(np.arange(1, n + 1)).astype(mdtype))
+    X = rnd.random((n, m))
+    X = X.astype(vdtype)
+    eigvals, eigvecs = lobpcg(A, X, tol=1e-2, largest=False)
+    assert_allclose(eigvals, np.arange(1, 1 + m), atol=1e-1)
+    # eigenvectors must be nearly real in any case
+    assert_allclose(np.sum(np.abs(eigvecs - eigvecs.conj())), 0, atol=1e-2)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_inplace_warning():
+    """Check lobpcg gives a warning in '_b_orthonormalize'
+    that in-place orthogonalization is impossible due to dtype mismatch.
+    """
+    rnd = np.random.RandomState(0)
+    n = 6
+    m = 1
+    vals = -np.arange(1, n + 1)
+    A = dia_array(([vals], [0]), shape=(n, n))
+    A = A.astype(np.cdouble)
+    X = rnd.standard_normal((n, m))
+    with pytest.warns(UserWarning, match="Inplace update"):
+        eigvals, _ = lobpcg(A, X, maxiter=2, verbosityLevel=1)
+
+
+@pytest.mark.thread_unsafe
+def test_maxit():
+    """Check lobpcg if maxit=maxiter runs maxiter iterations and
+    if maxit=None runs 20 iterations (the default)
+    by checking the size of the iteration history output, which should
+    be the number of iterations plus 3 (initial, final, and postprocessing)
+    typically when maxiter is small and the choice of the best is passive.
+    """
+    rnd = np.random.RandomState(0)
+    n = 50
+    m = 4
+    vals = -np.arange(1, n + 1)
+    A = dia_array(([vals], [0]), shape=(n, n))
+    A = A.astype(np.float32)
+    X = rnd.standard_normal((n, m))
+    X = X.astype(np.float64)
+    msg = "Exited at iteration.*|Exited postprocessing with accuracies.*"
+    for maxiter in range(1, 4):
+        with pytest.warns(UserWarning, match=msg):
+            _, _, l_h, r_h = lobpcg(A, X, tol=1e-8, maxiter=maxiter,
+                                    retLambdaHistory=True,
+                                    retResidualNormsHistory=True)
+        assert_allclose(np.shape(l_h)[0], maxiter+3)
+        assert_allclose(np.shape(r_h)[0], maxiter+3)
+    with pytest.warns(UserWarning, match=msg):
+        l, _, l_h, r_h = lobpcg(A, X, tol=1e-8,
+                                retLambdaHistory=True,
+                                retResidualNormsHistory=True)
+    assert_allclose(np.shape(l_h)[0], 20+3)
+    assert_allclose(np.shape(r_h)[0], 20+3)
+    # Check that eigenvalue output is the last one in history
+    assert_allclose(l, l_h[-1])
+    # Make sure that both history outputs are lists
+    assert isinstance(l_h, list)
+    assert isinstance(r_h, list)
+    # Make sure that both history lists are arrays-like
+    assert_allclose(np.shape(l_h), np.shape(np.asarray(l_h)))
+    assert_allclose(np.shape(r_h), np.shape(np.asarray(r_h)))
+
+
+@pytest.mark.xslow
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_sakurai():
+    """Check lobpcg and eighs accuracy for the Sakurai example
+    already used in `benchmarks/benchmarks/sparse_linalg_lobpcg.py`.
+    """
+    n = 50
+    tol = 100 * n * n * n* np.finfo(float).eps
+    sakurai_obj = Sakurai(n, dtype='int')
+    A = sakurai_obj
+    m = 3
+    ee = sakurai_obj.eigenvalues(3)
+    rng = np.random.default_rng(0)
+    X = rng.normal(size=(n, m))
+    el, _ = lobpcg(A, X, tol=1e-9, maxiter=5000, largest=False)
+    accuracy = max(abs(ee - el) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+    a_l = LinearOperator((n, n), matvec=A, matmat=A, dtype='float64')
+    ea, _ = eigsh(a_l, k=m, which='SA', tol=1e-9, maxiter=15000,
+                  v0 = rng.normal(size=(n, 1)))
+    accuracy = max(abs(ee - ea) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+
+
+@pytest.mark.parametrize("n", [500, 1000])
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_sakurai_inverse(n):
+    """Check lobpcg and eighs accuracy for the sakurai_inverse example
+    already used in `benchmarks/benchmarks/sparse_linalg_lobpcg.py`.
+    """
+    def a(x):
+        return cho_solve_banded((c, False), x)
+    tol = 100 * n * n * n* np.finfo(float).eps
+    sakurai_obj = Sakurai(n)
+    A = sakurai_obj.tobanded().astype(np.float64)
+    m = 3
+    ee = sakurai_obj.eigenvalues(3)
+    rng = np.random.default_rng(0)
+    X = rng.normal(size=(n, m))
+    c = cholesky_banded(A)
+    el, _ = lobpcg(a, X, tol=1e-9, maxiter=8)
+    accuracy = max(abs(ee - 1. / el) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+    a_l = LinearOperator((n, n), matvec=a, matmat=a, dtype='float64')
+    ea, _ = eigsh(a_l, k=m, which='LA', tol=1e-9, maxiter=8,
+                  v0 = rng.normal(size=(n, 1)))
+    accuracy = max(abs(ee - np.sort(1. / ea)) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+
+
+@pytest.mark.filterwarnings("ignore:The problem size")
+@pytest.mark.parametrize("n", [10, 20, 128, 256, 512, 1024, 2048])
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_MikotaPair(n):
+    """Check lobpcg and eighs accuracy for the Mikota example
+    already used in `benchmarks/benchmarks/sparse_linalg_lobpcg.py`.
+    """
+    def a(x):
+        return cho_solve_banded((c, False), x)
+    mik = MikotaPair(n)
+    mik_k = mik.k
+    mik_m = mik.m
+    Ac = mik_k
+    Bc = mik_m
+    Ab = mik_k.tobanded()
+    eigenvalues = mik.eigenvalues
+    if n == 10:
+        m = 3 # lobpcg calls eigh
+    elif n == 20:
+        m = 2
+    else:
+        m = 10
+    ee = eigenvalues(m)
+    tol = 100 * m * n * n * np.finfo(float).eps
+    rng = np.random.default_rng(0)
+    X = rng.normal(size=(n, m))
+    c = cholesky_banded(Ab.astype(np.float32))
+    el, _ = lobpcg(Ac, X, Bc, M=a, tol=1e-4,
+                   maxiter=40, largest=False)
+    accuracy = max(abs(ee - el) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+    B = LinearOperator((n, n), matvec=Bc, matmat=Bc, dtype='float64')
+    A = LinearOperator((n, n), matvec=Ac, matmat=Ac, dtype='float64')
+    c = cholesky_banded(Ab)
+    a_l = LinearOperator((n, n), matvec=a, matmat=a, dtype='float64')
+    ea, _ = eigsh(B, k=m, M=A, Minv=a_l, which='LA', tol=1e-4, maxiter=50,
+                  v0 = rng.normal(size=(n, 1)))
+    accuracy = max(abs(ee - np.sort(1./ea)) / ee)
+    assert_allclose(accuracy, 0., atol=tol)
+
+
+@pytest.mark.slow
+@pytest.mark.parametrize("n", [15])
+@pytest.mark.parametrize("m", [1, 2])
+@pytest.mark.filterwarnings("ignore:Exited at iteration")
+@pytest.mark.filterwarnings("ignore:Exited postprocessing")
+def test_diagonal_data_types(n, m):
+    """Check lobpcg for diagonal matrices for all matrix types.
+    Constraints are imposed, so a dense eigensolver eig cannot run.
+    """
+    rnd = np.random.RandomState(0)
+    # Define the generalized eigenvalue problem Av = cBv
+    # where (c, v) is a generalized eigenpair,
+    # and where we choose A  and B to be diagonal.
+    vals = np.arange(1, n + 1)
+
+    list_sparse_format = ['bsr', 'coo', 'csc', 'csr', 'dia', 'dok', 'lil']
+    for s_f_i, s_f in enumerate(list_sparse_format):
+
+        As64 = dia_array(([vals * vals], [0]), shape=(n, n)).asformat(s_f)
+        As32 = As64.astype(np.float32)
+        Af64 = As64.toarray()
+        Af32 = Af64.astype(np.float32)
+
+        def As32f(x):
+            return As32 @ x
+        As32LO = LinearOperator(matvec=As32f,
+                                matmat=As32f,
+                                shape=(n, n),
+                                dtype=As32.dtype)
+
+        listA = [Af64, As64, Af32, As32, As32f, As32LO, lambda v: As32 @ v]
+
+        Bs64 = dia_array(([vals], [0]), shape=(n, n)).asformat(s_f)
+        Bf64 = Bs64.toarray()
+        Bs32 = Bs64.astype(np.float32)
+
+        def Bs32f(x):
+            return Bs32 @ x
+        Bs32LO = LinearOperator(matvec=Bs32f,
+                                matmat=Bs32f,
+                                shape=(n, n),
+                                dtype=Bs32.dtype)
+        listB = [Bf64, Bs64, Bs32, Bs32f, Bs32LO, lambda v: Bs32 @ v]
+
+        # Define the preconditioner function as LinearOperator.
+        Ms64 = dia_array(([1./vals], [0]), shape=(n, n)).asformat(s_f)
+
+        def Ms64precond(x):
+            return Ms64 @ x
+        Ms64precondLO = LinearOperator(matvec=Ms64precond,
+                                       matmat=Ms64precond,
+                                       shape=(n, n),
+                                       dtype=Ms64.dtype)
+        Mf64 = Ms64.toarray()
+
+        def Mf64precond(x):
+            return Mf64 @ x
+        Mf64precondLO = LinearOperator(matvec=Mf64precond,
+                                       matmat=Mf64precond,
+                                       shape=(n, n),
+                                       dtype=Mf64.dtype)
+        Ms32 = Ms64.astype(np.float32)
+
+        def Ms32precond(x):
+            return Ms32 @ x
+        Ms32precondLO = LinearOperator(matvec=Ms32precond,
+                                       matmat=Ms32precond,
+                                       shape=(n, n),
+                                       dtype=Ms32.dtype)
+        Mf32 = Ms32.toarray()
+
+        def Mf32precond(x):
+            return Mf32 @ x
+        Mf32precondLO = LinearOperator(matvec=Mf32precond,
+                                       matmat=Mf32precond,
+                                       shape=(n, n),
+                                       dtype=Mf32.dtype)
+        listM = [None, Ms64, Ms64precondLO, Mf64precondLO, Ms64precond,
+                 Ms32, Ms32precondLO, Mf32precondLO, Ms32precond]
+
+        # Setup matrix of the initial approximation to the eigenvectors
+        # (cannot be sparse array).
+        Xf64 = rnd.random((n, m))
+        Xf32 = Xf64.astype(np.float32)
+        listX = [Xf64, Xf32]
+
+        # Require that the returned eigenvectors be in the orthogonal complement
+        # of the first few standard basis vectors (cannot be sparse array).
+        m_excluded = 3
+        Yf64 = np.eye(n, m_excluded, dtype=float)
+        Yf32 = np.eye(n, m_excluded, dtype=np.float32)
+        listY = [Yf64, Yf32]
+
+        tests = list(itertools.product(listA, listB, listM, listX, listY))
+
+        for A, B, M, X, Y in tests:
+            # This is one of the slower tests because there are >1,000 configs
+            # to test here. Flip a biased coin to decide whether to run  each
+            # test to get decent coverage in less time.
+            if rnd.random() < 0.98:
+                continue  # too many tests
+            eigvals, _ = lobpcg(A, X, B=B, M=M, Y=Y, tol=1e-4,
+                                maxiter=100, largest=False)
+            assert_allclose(eigvals,
+                            np.arange(1 + m_excluded, 1 + m_excluded + m),
+                            atol=1e-5)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/tests/test_svds.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/tests/test_svds.py
new file mode 100644
index 0000000000000000000000000000000000000000..7fddf19af26811364ca8551021244e20c6da2239
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_eigen/tests/test_svds.py
@@ -0,0 +1,886 @@
+import re
+import copy
+import numpy as np
+
+from numpy.testing import assert_allclose, assert_equal, assert_array_equal
+import pytest
+
+from scipy.linalg import svd, null_space
+from scipy.sparse import csc_array, issparse, dia_array, random_array
+from scipy.sparse.linalg import LinearOperator, aslinearoperator
+from scipy.sparse.linalg import svds
+from scipy.sparse.linalg._eigen.arpack import ArpackNoConvergence
+
+
+# --- Helper Functions / Classes ---
+
+
+def sorted_svd(m, k, which='LM'):
+    # Compute svd of a dense matrix m, and return singular vectors/values
+    # sorted.
+    if issparse(m):
+        m = m.toarray()
+    u, s, vh = svd(m)
+    if which == 'LM':
+        ii = np.argsort(s)[-k:]
+    elif which == 'SM':
+        ii = np.argsort(s)[:k]
+    else:
+        raise ValueError(f"unknown which={which!r}")
+
+    return u[:, ii], s[ii], vh[ii]
+
+
+def _check_svds(A, k, u, s, vh, which="LM", check_usvh_A=False,
+                check_svd=True, atol=1e-10, rtol=1e-7):
+    n, m = A.shape
+
+    # Check shapes.
+    assert_equal(u.shape, (n, k))
+    assert_equal(s.shape, (k,))
+    assert_equal(vh.shape, (k, m))
+
+    # Check that the original matrix can be reconstituted.
+    A_rebuilt = (u*s).dot(vh)
+    assert_equal(A_rebuilt.shape, A.shape)
+    if check_usvh_A:
+        assert_allclose(A_rebuilt, A, atol=atol, rtol=rtol)
+
+    # Check that u is a semi-orthogonal matrix.
+    uh_u = np.dot(u.T.conj(), u)
+    assert_equal(uh_u.shape, (k, k))
+    assert_allclose(uh_u, np.identity(k), atol=atol, rtol=rtol)
+
+    # Check that vh is a semi-orthogonal matrix.
+    vh_v = np.dot(vh, vh.T.conj())
+    assert_equal(vh_v.shape, (k, k))
+    assert_allclose(vh_v, np.identity(k), atol=atol, rtol=rtol)
+
+    # Check that scipy.sparse.linalg.svds ~ scipy.linalg.svd
+    if check_svd:
+        u2, s2, vh2 = sorted_svd(A, k, which)
+        assert_allclose(np.abs(u), np.abs(u2), atol=atol, rtol=rtol)
+        assert_allclose(s, s2, atol=atol, rtol=rtol)
+        assert_allclose(np.abs(vh), np.abs(vh2), atol=atol, rtol=rtol)
+
+
+def _check_svds_n(A, k, u, s, vh, which="LM", check_res=True,
+                  check_svd=True, atol=1e-10, rtol=1e-7):
+    n, m = A.shape
+
+    # Check shapes.
+    assert_equal(u.shape, (n, k))
+    assert_equal(s.shape, (k,))
+    assert_equal(vh.shape, (k, m))
+
+    # Check that u is a semi-orthogonal matrix.
+    uh_u = np.dot(u.T.conj(), u)
+    assert_equal(uh_u.shape, (k, k))
+    error = np.sum(np.abs(uh_u - np.identity(k))) / (k * k)
+    assert_allclose(error, 0.0, atol=atol, rtol=rtol)
+
+    # Check that vh is a semi-orthogonal matrix.
+    vh_v = np.dot(vh, vh.T.conj())
+    assert_equal(vh_v.shape, (k, k))
+    error = np.sum(np.abs(vh_v - np.identity(k))) / (k * k)
+    assert_allclose(error, 0.0, atol=atol, rtol=rtol)
+
+    # Check residuals
+    if check_res:
+        ru = A.T.conj() @ u - vh.T.conj() * s
+        rus = np.sum(np.abs(ru)) / (n * k)
+        rvh = A @ vh.T.conj() - u * s
+        rvhs = np.sum(np.abs(rvh)) / (m * k)
+        assert_allclose(rus, 0.0, atol=atol, rtol=rtol)
+        assert_allclose(rvhs, 0.0, atol=atol, rtol=rtol)
+
+    # Check that scipy.sparse.linalg.svds ~ scipy.linalg.svd
+    if check_svd:
+        u2, s2, vh2 = sorted_svd(A, k, which)
+        assert_allclose(s, s2, atol=atol, rtol=rtol)
+        A_rebuilt_svd = (u2*s2).dot(vh2)
+        A_rebuilt = (u*s).dot(vh)
+        assert_equal(A_rebuilt.shape, A.shape)
+        error = np.sum(np.abs(A_rebuilt_svd - A_rebuilt)) / (k * k)
+        assert_allclose(error, 0.0, atol=atol, rtol=rtol)
+
+
+class CheckingLinearOperator(LinearOperator):
+    def __init__(self, A):
+        self.A = A
+        self.dtype = A.dtype
+        self.shape = A.shape
+
+    def _matvec(self, x):
+        assert_equal(max(x.shape), np.size(x))
+        return self.A.dot(x)
+
+    def _rmatvec(self, x):
+        assert_equal(max(x.shape), np.size(x))
+        return self.A.T.conjugate().dot(x)
+
+
+# --- Test Input Validation ---
+# Tests input validation on parameters `k` and `which`.
+# Needs better input validation checks for all other parameters.
+
+class SVDSCommonTests:
+
+    solver = None
+
+    # some of these IV tests could run only once, say with solver=None
+
+    _A_empty_msg = "`A` must not be empty."
+    _A_dtype_msg = "`A` must be of numeric data type"
+    _A_type_msg = "type not understood"
+    _A_ndim_msg = "array must have ndim <= 2"
+    _A_validation_inputs = [
+        (np.asarray([[]]), ValueError, _A_empty_msg),
+        (np.array([['a', 'b'], ['c', 'd']], dtype='object'), ValueError, _A_dtype_msg),
+        ("hi", TypeError, _A_type_msg),
+        (np.asarray([[[1., 2.], [3., 4.]]]), ValueError, _A_ndim_msg)]
+
+    @pytest.mark.parametrize("args", _A_validation_inputs)
+    def test_svds_input_validation_A(self, args):
+        A, error_type, message = args
+        with pytest.raises(error_type, match=message):
+            svds(A, k=1, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("which", ["LM", "SM"])
+    def test_svds_int_A(self, which):
+        A = np.asarray([[1, 2], [3, 4]])
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                res = svds(A, k=1, which=which, solver=self.solver, rng=0)
+        else:
+            res = svds(A, k=1, which=which, solver=self.solver, rng=0)
+        _check_svds(A, 1, *res, which=which, atol=8e-10)
+
+    def test_svds_diff0_docstring_example(self):
+        def diff0(a):
+            return np.diff(a, axis=0)
+        def diff0t(a):
+            if a.ndim == 1:
+                a = a[:,np.newaxis]  # Turn 1D into 2D array
+            d = np.zeros((a.shape[0] + 1, a.shape[1]), dtype=a.dtype)
+            d[0, :] = - a[0, :]
+            d[1:-1, :] = a[0:-1, :] - a[1:, :]
+            d[-1, :] = a[-1, :]
+            return d
+        def diff0_func_aslo_def(n):
+            return LinearOperator(matvec=diff0,
+                                  matmat=diff0,
+                                  rmatvec=diff0t,
+                                  rmatmat=diff0t,
+                                  shape=(n - 1, n))
+        n = 100
+        diff0_func_aslo = diff0_func_aslo_def(n)
+        # preserve a use of legacy keyword `random_state` during SPEC 7 transition
+        u, s, _ = svds(diff0_func_aslo, k=3, which='SM', random_state=0)
+        se = 2. * np.sin(np.pi * np.arange(1, 4) / (2. * n))
+        ue = np.sqrt(2 / n) * np.sin(np.pi * np.outer(np.arange(1, n),
+                                     np.arange(1, 4)) / n)
+        assert_allclose(s, se, atol=1e-3)
+        assert_allclose(np.abs(u), np.abs(ue), atol=1e-6)
+
+    @pytest.mark.parametrize("k", [-1, 0, 3, 4, 5, 1.5, "1"])
+    def test_svds_input_validation_k_1(self, k):
+        rng = np.random.default_rng(0)
+        A = rng.random((4, 3))
+
+        # propack can do complete SVD
+        if self.solver == 'propack' and k == 3:
+            res = svds(A, k=k, solver=self.solver, rng=0)
+            _check_svds(A, k, *res, check_usvh_A=True, check_svd=True)
+            return
+
+        message = ("`k` must be an integer satisfying")
+        with pytest.raises(ValueError, match=message):
+            svds(A, k=k, solver=self.solver, rng=0)
+
+    def test_svds_input_validation_k_2(self):
+        # I think the stack trace is reasonable when `k` can't be converted
+        # to an int.
+        message = "int() argument must be a"
+        with pytest.raises(TypeError, match=re.escape(message)):
+            svds(np.eye(10), k=[], solver=self.solver, rng=0)
+
+        message = "invalid literal for int()"
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), k="hi", solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("tol", (-1, np.inf, np.nan))
+    def test_svds_input_validation_tol_1(self, tol):
+        message = "`tol` must be a non-negative floating point value."
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), tol=tol, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("tol", ([], 'hi'))
+    def test_svds_input_validation_tol_2(self, tol):
+        # I think the stack trace is reasonable here
+        message = "'<' not supported between instances"
+        with pytest.raises(TypeError, match=message):
+            svds(np.eye(10), tol=tol, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("which", ('LA', 'SA', 'ekki', 0))
+    def test_svds_input_validation_which(self, which):
+        # Regression test for a github issue.
+        # https://github.com/scipy/scipy/issues/4590
+        # Function was not checking for eigenvalue type and unintended
+        # values could be returned.
+        with pytest.raises(ValueError, match="`which` must be in"):
+            svds(np.eye(10), which=which, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("transpose", (True, False))
+    @pytest.mark.parametrize("n", range(4, 9))
+    def test_svds_input_validation_v0_1(self, transpose, n):
+        rng = np.random.default_rng(0)
+        A = rng.random((5, 7))
+        v0 = rng.random(n)
+        if transpose:
+            A = A.T
+        k = 2
+        message = "`v0` must have shape"
+
+        required_length = (A.shape[0] if self.solver == 'propack'
+                           else min(A.shape))
+        if n != required_length:
+            with pytest.raises(ValueError, match=message):
+                svds(A, k=k, v0=v0, solver=self.solver, rng=0)
+
+    def test_svds_input_validation_v0_2(self):
+        A = np.ones((10, 10))
+        v0 = np.ones((1, 10))
+        message = "`v0` must have shape"
+        with pytest.raises(ValueError, match=message):
+            svds(A, k=1, v0=v0, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("v0", ("hi", 1, np.ones(10, dtype=int)))
+    def test_svds_input_validation_v0_3(self, v0):
+        A = np.ones((10, 10))
+        message = "`v0` must be of floating or complex floating data type."
+        with pytest.raises(ValueError, match=message):
+            svds(A, k=1, v0=v0, solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("maxiter", (-1, 0, 5.5))
+    def test_svds_input_validation_maxiter_1(self, maxiter):
+        message = ("`maxiter` must be a positive integer.")
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), maxiter=maxiter, solver=self.solver, rng=0)
+
+    def test_svds_input_validation_maxiter_2(self):
+        # I think the stack trace is reasonable when `k` can't be converted
+        # to an int.
+        message = "int() argument must be a"
+        with pytest.raises(TypeError, match=re.escape(message)):
+            svds(np.eye(10), maxiter=[], solver=self.solver, rng=0)
+
+        message = "invalid literal for int()"
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), maxiter="hi", solver=self.solver, rng=0)
+
+    @pytest.mark.parametrize("rsv", ('ekki', 10))
+    def test_svds_input_validation_return_singular_vectors(self, rsv):
+        message = "`return_singular_vectors` must be in"
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), return_singular_vectors=rsv, solver=self.solver, rng=0)
+
+    # --- Test Parameters ---
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("k", [3, 5])
+    @pytest.mark.parametrize("which", ["LM", "SM"])
+    def test_svds_parameter_k_which(self, k, which):
+        # check that the `k` parameter sets the number of eigenvalues/
+        # eigenvectors returned.
+        # Also check that the `which` parameter sets whether the largest or
+        # smallest eigenvalues are returned
+        rng = np.random.default_rng(0)
+        A = rng.random((10, 10))
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                res = svds(A, k=k, which=which, solver=self.solver, rng=0)
+        else:
+            res = svds(A, k=k, which=which, solver=self.solver, rng=0)
+        _check_svds(A, k, *res, which=which, atol=1e-9, rtol=2e-13)
+
+    @pytest.mark.filterwarnings("ignore:Exited",
+                                reason="Ignore LOBPCG early exit.")
+    # loop instead of parametrize for simplicity
+    def test_svds_parameter_tol(self):
+        # check the effect of the `tol` parameter on solver accuracy by solving
+        # the same problem with varying `tol` and comparing the eigenvalues
+        # against ground truth computed
+        n = 100  # matrix size
+        k = 3    # number of eigenvalues to check
+
+        # generate a random, sparse-ish matrix
+        # effect isn't apparent for matrices that are too small
+        rng = np.random.default_rng(0)
+        A = rng.random((n, n))
+        A[A > .1] = 0
+        A = A @ A.T
+
+        _, s, _ = svd(A)  # calculate ground truth
+
+        # calculate the error as a function of `tol`
+        A = csc_array(A)
+
+        def err(tol):
+            _, s2, _ = svds(A, k=k, v0=np.ones(n), maxiter=1000,
+                            solver=self.solver, tol=tol, rng=0)
+            return np.linalg.norm((s2 - s[k-1::-1])/s[k-1::-1])
+
+        tols = [1e-4, 1e-2, 1e0]  # tolerance levels to check
+        # for 'arpack' and 'propack', accuracies make discrete steps
+        accuracies = {'propack': [1e-12, 1e-6, 1e-4],
+                      'arpack': [2.5e-15, 1e-10, 1e-10],
+                      'lobpcg': [2e-12, 4e-2, 2]}
+
+        for tol, accuracy in zip(tols, accuracies[self.solver]):
+            error = err(tol)
+            assert error < accuracy
+
+    def test_svd_v0(self):
+        # check that the `v0` parameter affects the solution
+        n = 100
+        k = 1
+        # If k != 1, LOBPCG needs more initial vectors, which are generated
+        # with rng, so it does not pass w/ k >= 2.
+        # For some other values of `n`, the AssertionErrors are not raised
+        # with different v0s, which is reasonable.
+
+        rng = np.random.default_rng(0)
+        A = rng.random((n, n))
+
+        # with the same v0, solutions are the same, and they are accurate
+        # v0 takes precedence over rng
+        v0a = rng.random(n)
+        res1a = svds(A, k, v0=v0a, solver=self.solver, rng=0)
+        res2a = svds(A, k, v0=v0a, solver=self.solver, rng=1)
+        for idx in range(3):
+            assert_allclose(res1a[idx], res2a[idx], rtol=1e-15, atol=2e-16)
+        _check_svds(A, k, *res1a)
+
+        # with the same v0, solutions are the same, and they are accurate
+        v0b = rng.random(n)
+        res1b = svds(A, k, v0=v0b, solver=self.solver, rng=2)
+        res2b = svds(A, k, v0=v0b, solver=self.solver, rng=3)
+        for idx in range(3):
+            assert_allclose(res1b[idx], res2b[idx], rtol=1e-15, atol=2e-16)
+        _check_svds(A, k, *res1b)
+
+        # with different v0, solutions can be numerically different
+        message = "Arrays are not equal"
+        with pytest.raises(AssertionError, match=message):
+            assert_equal(res1a, res1b)
+
+    def test_svd_rng(self):
+        # check that the `rng` parameter affects the solution
+        # Admittedly, `n` and `k` are chosen so that all solver pass all
+        # these checks. That's a tall order, since LOBPCG doesn't want to
+        # achieve the desired accuracy and ARPACK often returns the same
+        # singular values/vectors for different v0.
+        n = 100
+        k = 1
+
+        rng = np.random.default_rng(0)
+        A = rng.random((n, n))
+
+        # with the same rng, solutions are the same and accurate
+        res1a = svds(A, k, solver=self.solver, rng=0)
+        res2a = svds(A, k, solver=self.solver, rng=0)
+        for idx in range(3):
+            assert_allclose(res1a[idx], res2a[idx], rtol=1e-15, atol=2e-16)
+        _check_svds(A, k, *res1a)
+
+        # with the same rng, solutions are the same and accurate
+        res1b = svds(A, k, solver=self.solver, rng=1)
+        res2b = svds(A, k, solver=self.solver, rng=1)
+        for idx in range(3):
+            assert_allclose(res1b[idx], res2b[idx], rtol=1e-15, atol=2e-16)
+        _check_svds(A, k, *res1b)
+
+        # with different rng, solutions can be numerically different
+        message = "Arrays are not equal"
+        with pytest.raises(AssertionError, match=message):
+            assert_equal(res1a, res1b)
+
+    def test_svd_rng_2(self):
+        n = 100
+        k = 1
+
+        rng = np.random.default_rng(234981)
+        A = rng.random((n, n))
+        rng_2 = copy.deepcopy(rng)
+
+        # with the same rng, solutions are the same and accurate
+        res1a = svds(A, k, solver=self.solver, rng=rng)
+        res2a = svds(A, k, solver=self.solver, rng=rng_2)
+        for idx in range(3):
+            assert_allclose(res1a[idx], res2a[idx], rtol=1e-15, atol=2e-16)
+        _check_svds(A, k, *res1a)
+
+    @pytest.mark.filterwarnings("ignore:Exited",
+                                reason="Ignore LOBPCG early exit.")
+    def test_svd_rng_3(self):
+        n = 100
+        k = 5
+
+        rng1 = np.random.default_rng(0)
+        rng2 = np.random.default_rng(234832)
+        A = rng1.random((n, n))
+
+        # rng in different state produces accurate - but not
+        # not necessarily identical - results
+        res1a = svds(A, k, solver=self.solver, rng=rng1, maxiter=1000)
+        res2a = svds(A, k, solver=self.solver, rng=rng2, maxiter=1000)
+        _check_svds(A, k, *res1a, atol=2e-7)
+        _check_svds(A, k, *res2a, atol=2e-7)
+
+        message = "Arrays are not equal"
+        with pytest.raises(AssertionError, match=message):
+            assert_equal(res1a, res2a)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.filterwarnings("ignore:Exited postprocessing")
+    def test_svd_maxiter(self):
+        # check that maxiter works as expected: should not return accurate
+        # solution after 1 iteration, but should with default `maxiter`
+        A = np.diag(np.arange(9)).astype(np.float64)
+        k = 1
+        u, s, vh = sorted_svd(A, k)
+        # Use default maxiter by default
+        maxiter = None
+
+        if self.solver == 'arpack':
+            message = "ARPACK error -1: No convergence"
+            with pytest.raises(ArpackNoConvergence, match=message):
+                svds(A, k, ncv=3, maxiter=1, solver=self.solver, rng=0)
+        elif self.solver == 'lobpcg':
+            # Set maxiter higher so test passes without changing
+            # default and breaking backward compatibility (gh-20221)
+            maxiter = 30
+            with pytest.warns(UserWarning, match="Exited at iteration"):
+                svds(A, k, maxiter=1, solver=self.solver, rng=0)
+        elif self.solver == 'propack':
+            message = "k=1 singular triplets did not converge within"
+            with pytest.raises(np.linalg.LinAlgError, match=message):
+                svds(A, k, maxiter=1, solver=self.solver, rng=0)
+
+        ud, sd, vhd = svds(A, k, solver=self.solver, maxiter=maxiter, rng=0)
+        _check_svds(A, k, ud, sd, vhd, atol=1e-8)
+        assert_allclose(np.abs(ud), np.abs(u), atol=1e-8)
+        assert_allclose(np.abs(vhd), np.abs(vh), atol=1e-8)
+        assert_allclose(np.abs(sd), np.abs(s), atol=1e-9)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("rsv", (True, False, 'u', 'vh'))
+    @pytest.mark.parametrize("shape", ((5, 7), (6, 6), (7, 5)))
+    def test_svd_return_singular_vectors(self, rsv, shape):
+        # check that the return_singular_vectors parameter works as expected
+        rng = np.random.default_rng(0)
+        A = rng.random(shape)
+        k = 2
+        M, N = shape
+        u, s, vh = sorted_svd(A, k)
+
+        respect_u = True if self.solver == 'propack' else M <= N
+        respect_vh = True if self.solver == 'propack' else M > N
+
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                if rsv is False:
+                    s2 = svds(A, k, return_singular_vectors=rsv,
+                              solver=self.solver, rng=rng)
+                    assert_allclose(s2, s)
+                elif rsv == 'u' and respect_u:
+                    u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                       solver=self.solver, rng=rng)
+                    assert_allclose(np.abs(u2), np.abs(u))
+                    assert_allclose(s2, s)
+                    assert vh2 is None
+                elif rsv == 'vh' and respect_vh:
+                    u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                       solver=self.solver, rng=rng)
+                    assert u2 is None
+                    assert_allclose(s2, s)
+                    assert_allclose(np.abs(vh2), np.abs(vh))
+                else:
+                    u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                       solver=self.solver, rng=rng)
+                    if u2 is not None:
+                        assert_allclose(np.abs(u2), np.abs(u))
+                    assert_allclose(s2, s)
+                    if vh2 is not None:
+                        assert_allclose(np.abs(vh2), np.abs(vh))
+        else:
+            if rsv is False:
+                s2 = svds(A, k, return_singular_vectors=rsv,
+                          solver=self.solver, rng=rng)
+                assert_allclose(s2, s)
+            elif rsv == 'u' and respect_u:
+                u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                   solver=self.solver, rng=rng)
+                assert_allclose(np.abs(u2), np.abs(u))
+                assert_allclose(s2, s)
+                assert vh2 is None
+            elif rsv == 'vh' and respect_vh:
+                u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                   solver=self.solver, rng=rng)
+                assert u2 is None
+                assert_allclose(s2, s)
+                assert_allclose(np.abs(vh2), np.abs(vh))
+            else:
+                u2, s2, vh2 = svds(A, k, return_singular_vectors=rsv,
+                                   solver=self.solver, rng=rng)
+                if u2 is not None:
+                    assert_allclose(np.abs(u2), np.abs(u))
+                assert_allclose(s2, s)
+                if vh2 is not None:
+                    assert_allclose(np.abs(vh2), np.abs(vh))
+
+    # --- Test Basic Functionality ---
+    # Tests the accuracy of each solver for real and complex matrices provided
+    # as list, dense array, sparse matrix, and LinearOperator.
+
+    A1 = [[1, 2, 3], [3, 4, 3], [1 + 1j, 0, 2], [0, 0, 1]]
+    A2 = [[1, 2, 3, 8 + 5j], [3 - 2j, 4, 3, 5], [1, 0, 2, 3], [0, 0, 1, 0]]
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.filterwarnings("ignore:k >= N - 1",
+                                reason="needed to demonstrate #16725")
+    @pytest.mark.parametrize('A', (A1, A2))
+    @pytest.mark.parametrize('k', range(1, 5))
+    # PROPACK fails a lot if @pytest.mark.parametrize('which', ("SM", "LM"))
+    @pytest.mark.parametrize('real', (True, False))
+    @pytest.mark.parametrize('transpose', (False, True))
+    # In gh-14299, it was suggested the `svds` should _not_ work with lists
+    @pytest.mark.parametrize('lo_type', (np.asarray, csc_array,
+                                         aslinearoperator))
+    def test_svd_simple(self, A, k, real, transpose, lo_type):
+
+        A = np.asarray(A)
+        A = np.real(A) if real else A
+        A = A.T if transpose else A
+        A2 = lo_type(A)
+
+        # could check for the appropriate errors, but that is tested above
+        if k > min(A.shape):
+            pytest.skip("`k` cannot be greater than `min(A.shape)`")
+        if self.solver != 'propack' and k >= min(A.shape):
+            pytest.skip("Only PROPACK supports complete SVD")
+        if self.solver == 'arpack' and not real and k == min(A.shape) - 1:
+            pytest.skip("#16725")
+
+        atol = 3e-10
+        if self.solver == 'propack':
+            atol = 3e-9  # otherwise test fails on Linux aarch64 (see gh-19855)
+
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                u, s, vh = svds(A2, k, solver=self.solver, rng=0)
+        else:
+            u, s, vh = svds(A2, k, solver=self.solver, rng=0)
+        _check_svds(A, k, u, s, vh, atol=atol)
+
+    @pytest.mark.thread_unsafe
+    def test_svd_linop(self):
+        solver = self.solver
+
+        nmks = [(6, 7, 3),
+                (9, 5, 4),
+                (10, 8, 5)]
+
+        def reorder(args):
+            U, s, VH = args
+            j = np.argsort(s)
+            return U[:, j], s[j], VH[j, :]
+
+        for n, m, k in nmks:
+            # Test svds on a LinearOperator.
+            A = np.random.RandomState(52).randn(n, m)
+            L = CheckingLinearOperator(A)
+
+            if solver == 'propack':
+                v0 = np.ones(n)
+            else:
+                v0 = np.ones(min(A.shape))
+            if solver == 'lobpcg':
+                with pytest.warns(UserWarning, match="The problem size"):
+                    U1, s1, VH1 = reorder(svds(A, k, v0=v0, solver=solver, rng=0))
+                    U2, s2, VH2 = reorder(svds(L, k, v0=v0, solver=solver, rng=0))
+            else:
+                U1, s1, VH1 = reorder(svds(A, k, v0=v0, solver=solver, rng=0))
+                U2, s2, VH2 = reorder(svds(L, k, v0=v0, solver=solver, rng=0))
+
+            assert_allclose(np.abs(U1), np.abs(U2))
+            assert_allclose(s1, s2)
+            assert_allclose(np.abs(VH1), np.abs(VH2))
+            assert_allclose(np.dot(U1, np.dot(np.diag(s1), VH1)),
+                            np.dot(U2, np.dot(np.diag(s2), VH2)))
+
+            # Try again with which="SM".
+            A = np.random.RandomState(1909).randn(n, m)
+            L = CheckingLinearOperator(A)
+
+            # TODO: arpack crashes when v0=v0, which="SM"
+            kwargs = {'v0': v0} if solver not in {None, 'arpack'} else {}
+            if self.solver == 'lobpcg':
+                with pytest.warns(UserWarning, match="The problem size"):
+                    U1, s1, VH1 = reorder(svds(A, k, which="SM", solver=solver,
+                                               rng=0, **kwargs))
+                    U2, s2, VH2 = reorder(svds(L, k, which="SM", solver=solver,
+                                               rng=0, **kwargs))
+            else:
+                U1, s1, VH1 = reorder(svds(A, k, which="SM", solver=solver,
+                                           rng=0, **kwargs))
+                U2, s2, VH2 = reorder(svds(L, k, which="SM", solver=solver,
+                                           rng=0, **kwargs))
+
+            assert_allclose(np.abs(U1), np.abs(U2))
+            assert_allclose(s1 + 1, s2 + 1)
+            assert_allclose(np.abs(VH1), np.abs(VH2))
+            assert_allclose(np.dot(U1, np.dot(np.diag(s1), VH1)),
+                            np.dot(U2, np.dot(np.diag(s2), VH2)))
+
+            if k < min(n, m) - 1:
+                # Complex input and explicit which="LM".
+                for (dt, eps) in [(complex, 1e-7), (np.complex64, 3e-3)]:
+                    rng = np.random.RandomState(1648)
+                    A = (rng.randn(n, m) + 1j * rng.randn(n, m)).astype(dt)
+                    L = CheckingLinearOperator(A)
+
+                    if self.solver == 'lobpcg':
+                        with pytest.warns(UserWarning,
+                                          match="The problem size"):
+                            U1, s1, VH1 = reorder(svds(A, k, which="LM",
+                                                       solver=solver, rng=0))
+                            U2, s2, VH2 = reorder(svds(L, k, which="LM",
+                                                       solver=solver, rng=0))
+                    else:
+                        U1, s1, VH1 = reorder(svds(A, k, which="LM",
+                                                   solver=solver, rng=0))
+                        U2, s2, VH2 = reorder(svds(L, k, which="LM",
+                                                   solver=solver, rng=0))
+
+                    assert_allclose(np.abs(U1), np.abs(U2), rtol=eps)
+                    assert_allclose(s1, s2, rtol=eps)
+                    assert_allclose(np.abs(VH1), np.abs(VH2), rtol=eps)
+                    assert_allclose(np.dot(U1, np.dot(np.diag(s1), VH1)),
+                                    np.dot(U2, np.dot(np.diag(s2), VH2)),
+                                    rtol=eps)
+
+    SHAPES = ((100, 100), (100, 101), (101, 100))
+
+    @pytest.mark.filterwarnings("ignore:Exited at iteration")
+    @pytest.mark.filterwarnings("ignore:Exited postprocessing")
+    @pytest.mark.parametrize("shape", SHAPES)
+    # ARPACK supports only dtype float, complex, or np.float32
+    @pytest.mark.parametrize("dtype", (float, complex, np.float32))
+    def test_small_sigma_sparse(self, shape, dtype):
+        # https://github.com/scipy/scipy/pull/11829
+        solver = self.solver
+        # 2do: PROPACK fails orthogonality of singular vectors
+        # if dtype == complex and self.solver == 'propack':
+        #    pytest.skip("PROPACK unsupported for complex dtype")
+        rng = np.random.default_rng(0)
+        k = 5
+        (m, n) = shape
+        S = random_array(shape=(m, n), density=0.1, rng=rng)
+        if dtype is complex:
+            S = + 1j * random_array(shape=(m, n), density=0.1, rng=rng)
+        e = np.ones(m)
+        e[0:5] *= 1e1 ** np.arange(-5, 0, 1)
+        S = dia_array((e, 0), shape=(m, m)) @ S
+        S = S.astype(dtype)
+        u, s, vh = svds(S, k, which='SM', solver=solver, maxiter=1000, rng=0)
+        c_svd = False  # partial SVD can be different from full SVD
+        _check_svds_n(S, k, u, s, vh, which="SM", check_svd=c_svd, atol=2e-1)
+
+    # --- Test Edge Cases ---
+    # Checks a few edge cases.
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("shape", ((6, 5), (5, 5), (5, 6)))
+    @pytest.mark.parametrize("dtype", (float, complex))
+    def test_svd_LM_ones_matrix(self, shape, dtype):
+        # Check that svds can deal with matrix_rank less than k in LM mode.
+        k = 3
+        n, m = shape
+        A = np.ones((n, m), dtype=dtype)
+
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                U, s, VH = svds(A, k, solver=self.solver, rng=0)
+        else:
+            U, s, VH = svds(A, k, solver=self.solver, rng=0)
+
+        _check_svds(A, k, U, s, VH, check_usvh_A=True, check_svd=False)
+
+        # Check that the largest singular value is near sqrt(n*m)
+        # and the other singular values have been forced to zero.
+        assert_allclose(np.max(s), np.sqrt(n*m))
+        s = np.array(sorted(s)[:-1]) + 1
+        z = np.ones_like(s)
+        assert_allclose(s, z)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.filterwarnings("ignore:k >= N - 1",
+                                reason="needed to demonstrate #16725")
+    @pytest.mark.parametrize("shape", ((3, 4), (4, 4), (4, 3), (4, 2)))
+    @pytest.mark.parametrize("dtype", (float, complex))
+    def test_zero_matrix(self, shape, dtype):
+        # Check that svds can deal with matrices containing only zeros;
+        # see https://github.com/scipy/scipy/issues/3452/
+        # shape = (4, 2) is included because it is the particular case
+        # reported in the issue
+        k = 1
+        n, m = shape
+        A = np.zeros((n, m), dtype=dtype)
+
+        if (self.solver == 'arpack'):
+            pytest.skip('See gh-21110.')
+
+        if (self.solver == 'arpack' and dtype is complex
+                and k == min(A.shape) - 1):
+            pytest.skip("#16725")
+
+        if self.solver == 'propack':
+            pytest.skip("PROPACK failures unrelated to PR #16712")
+
+        if self.solver == 'lobpcg':
+            with pytest.warns(UserWarning, match="The problem size"):
+                U, s, VH = svds(A, k, solver=self.solver, rng=0)
+        else:
+            U, s, VH = svds(A, k, solver=self.solver, rng=0)
+
+        # Check some generic properties of svd.
+        _check_svds(A, k, U, s, VH, check_usvh_A=True, check_svd=False)
+
+        # Check that the singular values are zero.
+        assert_array_equal(s, 0)
+
+    @pytest.mark.parametrize("shape", ((20, 20), (20, 21), (21, 20)))
+    # ARPACK supports only dtype float, complex, or np.float32
+    @pytest.mark.parametrize("dtype", (float, complex, np.float32))
+    @pytest.mark.filterwarnings("ignore:Exited",
+                                reason="Ignore LOBPCG early exit.")
+    def test_small_sigma(self, shape, dtype):
+        rng = np.random.default_rng(179847540)
+        A = rng.random(shape).astype(dtype)
+        u, _, vh = svd(A, full_matrices=False)
+        if dtype == np.float32:
+            e = 10.0
+        else:
+            e = 100.0
+        t = e**(-np.arange(len(vh))).astype(dtype)
+        A = (u*t).dot(vh)
+        k = 4
+        u, s, vh = svds(A, k, solver=self.solver, maxiter=100, rng=0)
+        t = np.sum(s > 0)
+        assert_equal(t, k)
+        # LOBPCG needs larger atol and rtol to pass
+        _check_svds_n(A, k, u, s, vh, atol=1e-3, rtol=1e0, check_svd=False)
+
+    # ARPACK supports only dtype float, complex, or np.float32
+    @pytest.mark.filterwarnings("ignore:The problem size")
+    @pytest.mark.parametrize("dtype", (float, complex, np.float32))
+    def test_small_sigma2(self, dtype):
+        rng = np.random.default_rng(179847540)
+        # create a 10x10 singular matrix with a 4-dim null space
+        dim = 4
+        size = 10
+        x = rng.random((size, size-dim))
+        y = x[:, :dim] * rng.random(dim)
+        mat = np.hstack((x, y))
+        mat = mat.astype(dtype)
+
+        nz = null_space(mat)
+        assert_equal(nz.shape[1], dim)
+
+        # Tolerances atol and rtol adjusted to pass np.float32
+        # Use non-sparse svd
+        u, s, vh = svd(mat)
+        # Singular values are 0:
+        assert_allclose(s[-dim:], 0, atol=1e-6, rtol=1e0)
+        # Smallest right singular vectors in null space:
+        assert_allclose(mat @ vh[-dim:, :].T, 0, atol=1e-6, rtol=1e0)
+
+        # Smallest singular values should be 0
+        sp_mat = csc_array(mat)
+        su, ss, svh = svds(sp_mat, k=dim, which='SM', solver=self.solver, rng=0)
+        # Smallest dim singular values are 0:
+        assert_allclose(ss, 0, atol=1e-5, rtol=1e0)
+        # Smallest singular vectors via svds in null space:
+        n, m = mat.shape
+        if n < m:  # else the assert fails with some libraries unclear why
+            assert_allclose(sp_mat.transpose() @ su, 0, atol=1e-5, rtol=1e0)
+        assert_allclose(sp_mat @ svh.T, 0, atol=1e-5, rtol=1e0)
+
+# --- Perform tests with each solver ---
+
+
+class Test_SVDS_once:
+    @pytest.mark.parametrize("solver", ['ekki', object])
+    def test_svds_input_validation_solver(self, solver):
+        message = "solver must be one of"
+        with pytest.raises(ValueError, match=message):
+            svds(np.ones((3, 4)), k=2, solver=solver, rng=0)
+
+
+class Test_SVDS_ARPACK(SVDSCommonTests):
+
+    def setup_method(self):
+        self.solver = 'arpack'
+
+    @pytest.mark.parametrize("ncv", list(range(-1, 8)) + [4.5, "5"])
+    def test_svds_input_validation_ncv_1(self, ncv):
+        rng = np.random.default_rng(0)
+        A = rng.random((6, 7))
+        k = 3
+        if ncv in {4, 5}:
+            u, s, vh = svds(A, k=k, ncv=ncv, solver=self.solver, rng=0)
+        # partial decomposition, so don't check that u@diag(s)@vh=A;
+        # do check that scipy.sparse.linalg.svds ~ scipy.linalg.svd
+            _check_svds(A, k, u, s, vh)
+        else:
+            message = ("`ncv` must be an integer satisfying")
+            with pytest.raises(ValueError, match=message):
+                svds(A, k=k, ncv=ncv, solver=self.solver, rng=0)
+
+    def test_svds_input_validation_ncv_2(self):
+        # I think the stack trace is reasonable when `ncv` can't be converted
+        # to an int.
+        message = "int() argument must be a"
+        with pytest.raises(TypeError, match=re.escape(message)):
+            svds(np.eye(10), ncv=[], solver=self.solver, rng=0)
+
+        message = "invalid literal for int()"
+        with pytest.raises(ValueError, match=message):
+            svds(np.eye(10), ncv="hi", solver=self.solver, rng=0)
+
+    # I can't see a robust relationship between `ncv` and relevant outputs
+    # (e.g. accuracy, time), so no test of the parameter.
+
+
+class Test_SVDS_LOBPCG(SVDSCommonTests):
+
+    def setup_method(self):
+        self.solver = 'lobpcg'
+
+
+class Test_SVDS_PROPACK(SVDSCommonTests):
+
+    def setup_method(self):
+        self.solver = 'propack'
+
+    def test_svd_LM_ones_matrix(self):
+        message = ("PROPACK does not return orthonormal singular vectors "
+                   "associated with zero singular values.")
+        # There are some other issues with this matrix of all ones, e.g.
+        # `which='sm'` and `k=1` returns the largest singular value
+        pytest.xfail(message)
+
+    def test_svd_LM_zeros_matrix(self):
+        message = ("PROPACK does not return orthonormal singular vectors "
+                   "associated with zero singular values.")
+        pytest.xfail(message)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_expm_multiply.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_expm_multiply.py
new file mode 100644
index 0000000000000000000000000000000000000000..8f5a7a8508a6a9d102a836469d8fb76ddc9534b4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_expm_multiply.py
@@ -0,0 +1,816 @@
+"""Compute the action of the matrix exponential."""
+from warnings import warn
+
+import numpy as np
+
+import scipy.linalg
+import scipy.sparse.linalg
+from scipy.linalg._decomp_qr import qr
+from scipy.sparse._sputils import is_pydata_spmatrix
+from scipy.sparse.linalg import aslinearoperator
+from scipy.sparse.linalg._interface import IdentityOperator
+from scipy.sparse.linalg._onenormest import onenormest
+
+__all__ = ['expm_multiply']
+
+
+def _exact_inf_norm(A):
+    # A compatibility function which should eventually disappear.
+    if scipy.sparse.issparse(A):
+        return max(abs(A).sum(axis=1).flat)
+    elif is_pydata_spmatrix(A):
+        return max(abs(A).sum(axis=1))
+    else:
+        return np.linalg.norm(A, np.inf)
+
+
+def _exact_1_norm(A):
+    # A compatibility function which should eventually disappear.
+    if scipy.sparse.issparse(A):
+        return max(abs(A).sum(axis=0).flat)
+    elif is_pydata_spmatrix(A):
+        return max(abs(A).sum(axis=0))
+    else:
+        return np.linalg.norm(A, 1)
+
+
+def _trace(A):
+    # A compatibility function which should eventually disappear.
+    if is_pydata_spmatrix(A):
+        return A.to_scipy_sparse().trace()
+    else:
+        return A.trace()
+
+
+def traceest(A, m3, seed=None):
+    """Estimate `np.trace(A)` using `3*m3` matrix-vector products.
+
+    The result is not deterministic.
+
+    Parameters
+    ----------
+    A : LinearOperator
+        Linear operator whose trace will be estimated. Has to be square.
+    m3 : int
+        Number of matrix-vector products divided by 3 used to estimate the
+        trace.
+    seed : optional
+        Seed for `numpy.random.default_rng`.
+        Can be provided to obtain deterministic results.
+
+    Returns
+    -------
+    trace : LinearOperator.dtype
+        Estimate of the trace
+
+    Notes
+    -----
+    This is the Hutch++ algorithm given in [1]_.
+
+    References
+    ----------
+    .. [1] Meyer, Raphael A., Cameron Musco, Christopher Musco, and David P.
+       Woodruff. "Hutch++: Optimal Stochastic Trace Estimation." In Symposium
+       on Simplicity in Algorithms (SOSA), pp. 142-155. Society for Industrial
+       and Applied Mathematics, 2021
+       https://doi.org/10.1137/1.9781611976496.16
+
+    """
+    rng = np.random.default_rng(seed)
+    if len(A.shape) != 2 or A.shape[-1] != A.shape[-2]:
+        raise ValueError("Expected A to be like a square matrix.")
+    n = A.shape[-1]
+    S = rng.choice([-1.0, +1.0], [n, m3])
+    Q, _ = qr(A.matmat(S), overwrite_a=True, mode='economic')
+    trQAQ = np.trace(Q.conj().T @ A.matmat(Q))
+    G = rng.choice([-1, +1], [n, m3])
+    right = G - Q@(Q.conj().T @ G)
+    trGAG = np.trace(right.conj().T @ A.matmat(right))
+    return trQAQ + trGAG/m3
+
+
+def _ident_like(A):
+    # A compatibility function which should eventually disappear.
+    if scipy.sparse.issparse(A):
+        # Creates a sparse matrix in dia format
+        out = scipy.sparse.eye(A.shape[0], A.shape[1], dtype=A.dtype)
+        if scipy.sparse.issparse(A):
+            return out.asformat(A.format)
+        return scipy.sparse.dia_array(out).asformat(A.format)
+    elif is_pydata_spmatrix(A):
+        import sparse
+        return sparse.eye(A.shape[0], A.shape[1], dtype=A.dtype)
+    elif isinstance(A, scipy.sparse.linalg.LinearOperator):
+        return IdentityOperator(A.shape, dtype=A.dtype)
+    else:
+        return np.eye(A.shape[0], A.shape[1], dtype=A.dtype)
+
+
+def expm_multiply(A, B, start=None, stop=None, num=None,
+                  endpoint=None, traceA=None):
+    """
+    Compute the action of the matrix exponential of A on B.
+
+    Parameters
+    ----------
+    A : transposable linear operator
+        The operator whose exponential is of interest.
+    B : ndarray, sparse array
+        The matrix or vector to be multiplied by the matrix exponential of A.
+    start : scalar, optional
+        The starting time point of the sequence.
+    stop : scalar, optional
+        The end time point of the sequence, unless `endpoint` is set to False.
+        In that case, the sequence consists of all but the last of ``num + 1``
+        evenly spaced time points, so that `stop` is excluded.
+        Note that the step size changes when `endpoint` is False.
+    num : int, optional
+        Number of time points to use.
+    endpoint : bool, optional
+        If True, `stop` is the last time point.  Otherwise, it is not included.
+    traceA : scalar, optional
+        Trace of `A`. If not given the trace is estimated for linear operators,
+        or calculated exactly for sparse matrices. It is used to precondition
+        `A`, thus an approximate trace is acceptable.
+        For linear operators, `traceA` should be provided to ensure performance
+        as the estimation is not guaranteed to be reliable for all cases.
+
+        .. versionadded:: 1.9.0
+
+    Returns
+    -------
+    expm_A_B : ndarray
+         The result of the action :math:`e^{t_k A} B`.
+
+    Warns
+    -----
+    UserWarning
+        If `A` is a linear operator and ``traceA=None`` (default).
+
+    Notes
+    -----
+    The optional arguments defining the sequence of evenly spaced time points
+    are compatible with the arguments of `numpy.linspace`.
+
+    The output ndarray shape is somewhat complicated so I explain it here.
+    The ndim of the output could be either 1, 2, or 3.
+    It would be 1 if you are computing the expm action on a single vector
+    at a single time point.
+    It would be 2 if you are computing the expm action on a vector
+    at multiple time points, or if you are computing the expm action
+    on a matrix at a single time point.
+    It would be 3 if you want the action on a matrix with multiple
+    columns at multiple time points.
+    If multiple time points are requested, expm_A_B[0] will always
+    be the action of the expm at the first time point,
+    regardless of whether the action is on a vector or a matrix.
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2011)
+           "Computing the Action of the Matrix Exponential,
+           with an Application to Exponential Integrators."
+           SIAM Journal on Scientific Computing,
+           33 (2). pp. 488-511. ISSN 1064-8275
+           http://eprints.ma.man.ac.uk/1591/
+
+    .. [2] Nicholas J. Higham and Awad H. Al-Mohy (2010)
+           "Computing Matrix Functions."
+           Acta Numerica,
+           19. 159-208. ISSN 0962-4929
+           http://eprints.ma.man.ac.uk/1451/
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import expm, expm_multiply
+    >>> A = csc_array([[1, 0], [0, 1]])
+    >>> A.toarray()
+    array([[1, 0],
+           [0, 1]], dtype=int64)
+    >>> B = np.array([np.exp(-1.), np.exp(-2.)])
+    >>> B
+    array([ 0.36787944,  0.13533528])
+    >>> expm_multiply(A, B, start=1, stop=2, num=3, endpoint=True)
+    array([[ 1.        ,  0.36787944],
+           [ 1.64872127,  0.60653066],
+           [ 2.71828183,  1.        ]])
+    >>> expm(A).dot(B)                  # Verify 1st timestep
+    array([ 1.        ,  0.36787944])
+    >>> expm(1.5*A).dot(B)              # Verify 2nd timestep
+    array([ 1.64872127,  0.60653066])
+    >>> expm(2*A).dot(B)                # Verify 3rd timestep
+    array([ 2.71828183,  1.        ])
+    """
+    if all(arg is None for arg in (start, stop, num, endpoint)):
+        X = _expm_multiply_simple(A, B, traceA=traceA)
+    else:
+        X, status = _expm_multiply_interval(A, B, start, stop, num,
+                                            endpoint, traceA=traceA)
+    return X
+
+
+def _expm_multiply_simple(A, B, t=1.0, traceA=None, balance=False):
+    """
+    Compute the action of the matrix exponential at a single time point.
+
+    Parameters
+    ----------
+    A : transposable linear operator
+        The operator whose exponential is of interest.
+    B : ndarray
+        The matrix to be multiplied by the matrix exponential of A.
+    t : float
+        A time point.
+    traceA : scalar, optional
+        Trace of `A`. If not given the trace is estimated for linear operators,
+        or calculated exactly for sparse matrices. It is used to precondition
+        `A`, thus an approximate trace is acceptable
+    balance : bool
+        Indicates whether or not to apply balancing.
+
+    Returns
+    -------
+    F : ndarray
+        :math:`e^{t A} B`
+
+    Notes
+    -----
+    This is algorithm (3.2) in Al-Mohy and Higham (2011).
+
+    """
+    if balance:
+        raise NotImplementedError
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected A to be like a square matrix')
+    if A.shape[1] != B.shape[0]:
+        raise ValueError(f'shapes of matrices A {A.shape} and B {B.shape}'
+                         ' are incompatible')
+    ident = _ident_like(A)
+    is_linear_operator = isinstance(A, scipy.sparse.linalg.LinearOperator)
+    n = A.shape[0]
+    if len(B.shape) == 1:
+        n0 = 1
+    elif len(B.shape) == 2:
+        n0 = B.shape[1]
+    else:
+        raise ValueError('expected B to be like a matrix or a vector')
+    u_d = 2**-53
+    tol = u_d
+    if traceA is None:
+        if is_linear_operator:
+            warn("Trace of LinearOperator not available, it will be estimated."
+                 " Provide `traceA` to ensure performance.", stacklevel=3)
+        # m3=1 is bit arbitrary choice, a more accurate trace (larger m3) might
+        # speed up exponential calculation, but trace estimation is more costly
+        traceA = traceest(A, m3=1) if is_linear_operator else _trace(A)
+    mu = traceA / float(n)
+    A = A - mu * ident
+    A_1_norm = onenormest(A) if is_linear_operator else _exact_1_norm(A)
+    if t*A_1_norm == 0:
+        m_star, s = 0, 1
+    else:
+        ell = 2
+        norm_info = LazyOperatorNormInfo(t*A, A_1_norm=t*A_1_norm, ell=ell)
+        m_star, s = _fragment_3_1(norm_info, n0, tol, ell=ell)
+    return _expm_multiply_simple_core(A, B, t, mu, m_star, s, tol, balance)
+
+
+def _expm_multiply_simple_core(A, B, t, mu, m_star, s, tol=None, balance=False):
+    """
+    A helper function.
+    """
+    if balance:
+        raise NotImplementedError
+    if tol is None:
+        u_d = 2 ** -53
+        tol = u_d
+    F = B
+    eta = np.exp(t*mu / float(s))
+    for i in range(s):
+        c1 = _exact_inf_norm(B)
+        for j in range(m_star):
+            coeff = t / float(s*(j+1))
+            B = coeff * A.dot(B)
+            c2 = _exact_inf_norm(B)
+            F = F + B
+            if c1 + c2 <= tol * _exact_inf_norm(F):
+                break
+            c1 = c2
+        F = eta * F
+        B = F
+    return F
+
+
+# This table helps to compute bounds.
+# They seem to have been difficult to calculate, involving symbolic
+# manipulation of equations, followed by numerical root finding.
+_theta = {
+        # The first 30 values are from table A.3 of Computing Matrix Functions.
+        1: 2.29e-16,
+        2: 2.58e-8,
+        3: 1.39e-5,
+        4: 3.40e-4,
+        5: 2.40e-3,
+        6: 9.07e-3,
+        7: 2.38e-2,
+        8: 5.00e-2,
+        9: 8.96e-2,
+        10: 1.44e-1,
+        # 11
+        11: 2.14e-1,
+        12: 3.00e-1,
+        13: 4.00e-1,
+        14: 5.14e-1,
+        15: 6.41e-1,
+        16: 7.81e-1,
+        17: 9.31e-1,
+        18: 1.09,
+        19: 1.26,
+        20: 1.44,
+        # 21
+        21: 1.62,
+        22: 1.82,
+        23: 2.01,
+        24: 2.22,
+        25: 2.43,
+        26: 2.64,
+        27: 2.86,
+        28: 3.08,
+        29: 3.31,
+        30: 3.54,
+        # The rest are from table 3.1 of
+        # Computing the Action of the Matrix Exponential.
+        35: 4.7,
+        40: 6.0,
+        45: 7.2,
+        50: 8.5,
+        55: 9.9,
+        }
+
+
+def _onenormest_matrix_power(A, p,
+        t=2, itmax=5, compute_v=False, compute_w=False):
+    """
+    Efficiently estimate the 1-norm of A^p.
+
+    Parameters
+    ----------
+    A : ndarray
+        Matrix whose 1-norm of a power is to be computed.
+    p : int
+        Non-negative integer power.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+        Larger values take longer and use more memory
+        but give more accurate output.
+    itmax : int, optional
+        Use at most this many iterations.
+    compute_v : bool, optional
+        Request a norm-maximizing linear operator input vector if True.
+    compute_w : bool, optional
+        Request a norm-maximizing linear operator output vector if True.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse matrix.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+
+    """
+    #XXX Eventually turn this into an API function in the  _onenormest module,
+    #XXX and remove its underscore,
+    #XXX but wait until expm_multiply goes into scipy.
+    from scipy.sparse.linalg._onenormest import onenormest
+    return onenormest(aslinearoperator(A) ** p)
+
+class LazyOperatorNormInfo:
+    """
+    Information about an operator is lazily computed.
+
+    The information includes the exact 1-norm of the operator,
+    in addition to estimates of 1-norms of powers of the operator.
+    This uses the notation of Computing the Action (2011).
+    This class is specialized enough to probably not be of general interest
+    outside of this module.
+
+    """
+
+    def __init__(self, A, A_1_norm=None, ell=2, scale=1):
+        """
+        Provide the operator and some norm-related information.
+
+        Parameters
+        ----------
+        A : linear operator
+            The operator of interest.
+        A_1_norm : float, optional
+            The exact 1-norm of A.
+        ell : int, optional
+            A technical parameter controlling norm estimation quality.
+        scale : int, optional
+            If specified, return the norms of scale*A instead of A.
+
+        """
+        self._A = A
+        self._A_1_norm = A_1_norm
+        self._ell = ell
+        self._d = {}
+        self._scale = scale
+
+    def set_scale(self,scale):
+        """
+        Set the scale parameter.
+        """
+        self._scale = scale
+
+    def onenorm(self):
+        """
+        Compute the exact 1-norm.
+        """
+        if self._A_1_norm is None:
+            self._A_1_norm = _exact_1_norm(self._A)
+        return self._scale*self._A_1_norm
+
+    def d(self, p):
+        """
+        Lazily estimate :math:`d_p(A) ~= || A^p ||^(1/p)`
+        where :math:`||.||` is the 1-norm.
+        """
+        if p not in self._d:
+            est = _onenormest_matrix_power(self._A, p, self._ell)
+            self._d[p] = est ** (1.0 / p)
+        return self._scale*self._d[p]
+
+    def alpha(self, p):
+        """
+        Lazily compute max(d(p), d(p+1)).
+        """
+        return max(self.d(p), self.d(p+1))
+
+def _compute_cost_div_m(m, p, norm_info):
+    """
+    A helper function for computing bounds.
+
+    This is equation (3.10).
+    It measures cost in terms of the number of required matrix products.
+
+    Parameters
+    ----------
+    m : int
+        A valid key of _theta.
+    p : int
+        A matrix power.
+    norm_info : LazyOperatorNormInfo
+        Information about 1-norms of related operators.
+
+    Returns
+    -------
+    cost_div_m : int
+        Required number of matrix products divided by m.
+
+    """
+    return int(np.ceil(norm_info.alpha(p) / _theta[m]))
+
+
+def _compute_p_max(m_max):
+    """
+    Compute the largest positive integer p such that p*(p-1) <= m_max + 1.
+
+    Do this in a slightly dumb way, but safe and not too slow.
+
+    Parameters
+    ----------
+    m_max : int
+        A count related to bounds.
+
+    """
+    sqrt_m_max = np.sqrt(m_max)
+    p_low = int(np.floor(sqrt_m_max))
+    p_high = int(np.ceil(sqrt_m_max + 1))
+    return max(p for p in range(p_low, p_high+1) if p*(p-1) <= m_max + 1)
+
+
+def _fragment_3_1(norm_info, n0, tol, m_max=55, ell=2):
+    """
+    A helper function for the _expm_multiply_* functions.
+
+    Parameters
+    ----------
+    norm_info : LazyOperatorNormInfo
+        Information about norms of certain linear operators of interest.
+    n0 : int
+        Number of columns in the _expm_multiply_* B matrix.
+    tol : float
+        Expected to be
+        :math:`2^{-24}` for single precision or
+        :math:`2^{-53}` for double precision.
+    m_max : int
+        A value related to a bound.
+    ell : int
+        The number of columns used in the 1-norm approximation.
+        This is usually taken to be small, maybe between 1 and 5.
+
+    Returns
+    -------
+    best_m : int
+        Related to bounds for error control.
+    best_s : int
+        Amount of scaling.
+
+    Notes
+    -----
+    This is code fragment (3.1) in Al-Mohy and Higham (2011).
+    The discussion of default values for m_max and ell
+    is given between the definitions of equation (3.11)
+    and the definition of equation (3.12).
+
+    """
+    if ell < 1:
+        raise ValueError('expected ell to be a positive integer')
+    best_m = None
+    best_s = None
+    if _condition_3_13(norm_info.onenorm(), n0, m_max, ell):
+        for m, theta in _theta.items():
+            s = int(np.ceil(norm_info.onenorm() / theta))
+            if best_m is None or m * s < best_m * best_s:
+                best_m = m
+                best_s = s
+    else:
+        # Equation (3.11).
+        for p in range(2, _compute_p_max(m_max) + 1):
+            for m in range(p*(p-1)-1, m_max+1):
+                if m in _theta:
+                    s = _compute_cost_div_m(m, p, norm_info)
+                    if best_m is None or m * s < best_m * best_s:
+                        best_m = m
+                        best_s = s
+        best_s = max(best_s, 1)
+    return best_m, best_s
+
+
+def _condition_3_13(A_1_norm, n0, m_max, ell):
+    """
+    A helper function for the _expm_multiply_* functions.
+
+    Parameters
+    ----------
+    A_1_norm : float
+        The precomputed 1-norm of A.
+    n0 : int
+        Number of columns in the _expm_multiply_* B matrix.
+    m_max : int
+        A value related to a bound.
+    ell : int
+        The number of columns used in the 1-norm approximation.
+        This is usually taken to be small, maybe between 1 and 5.
+
+    Returns
+    -------
+    value : bool
+        Indicates whether or not the condition has been met.
+
+    Notes
+    -----
+    This is condition (3.13) in Al-Mohy and Higham (2011).
+
+    """
+
+    # This is the rhs of equation (3.12).
+    p_max = _compute_p_max(m_max)
+    a = 2 * ell * p_max * (p_max + 3)
+
+    # Evaluate the condition (3.13).
+    b = _theta[m_max] / float(n0 * m_max)
+    return A_1_norm <= a * b
+
+
+def _expm_multiply_interval(A, B, start=None, stop=None, num=None,
+                            endpoint=None, traceA=None, balance=False,
+                            status_only=False):
+    """
+    Compute the action of the matrix exponential at multiple time points.
+
+    Parameters
+    ----------
+    A : transposable linear operator
+        The operator whose exponential is of interest.
+    B : ndarray
+        The matrix to be multiplied by the matrix exponential of A.
+    start : scalar, optional
+        The starting time point of the sequence.
+    stop : scalar, optional
+        The end time point of the sequence, unless `endpoint` is set to False.
+        In that case, the sequence consists of all but the last of ``num + 1``
+        evenly spaced time points, so that `stop` is excluded.
+        Note that the step size changes when `endpoint` is False.
+    num : int, optional
+        Number of time points to use.
+    traceA : scalar, optional
+        Trace of `A`. If not given the trace is estimated for linear operators,
+        or calculated exactly for sparse matrices. It is used to precondition
+        `A`, thus an approximate trace is acceptable
+    endpoint : bool, optional
+        If True, `stop` is the last time point. Otherwise, it is not included.
+    balance : bool
+        Indicates whether or not to apply balancing.
+    status_only : bool
+        A flag that is set to True for some debugging and testing operations.
+
+    Returns
+    -------
+    F : ndarray
+        :math:`e^{t_k A} B`
+    status : int
+        An integer status for testing and debugging.
+
+    Notes
+    -----
+    This is algorithm (5.2) in Al-Mohy and Higham (2011).
+
+    There seems to be a typo, where line 15 of the algorithm should be
+    moved to line 6.5 (between lines 6 and 7).
+
+    """
+    if balance:
+        raise NotImplementedError
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected A to be like a square matrix')
+    if A.shape[1] != B.shape[0]:
+        raise ValueError(f'shapes of matrices A {A.shape} and B {B.shape}'
+                         ' are incompatible')
+    ident = _ident_like(A)
+    is_linear_operator = isinstance(A, scipy.sparse.linalg.LinearOperator)
+    n = A.shape[0]
+    if len(B.shape) == 1:
+        n0 = 1
+    elif len(B.shape) == 2:
+        n0 = B.shape[1]
+    else:
+        raise ValueError('expected B to be like a matrix or a vector')
+    u_d = 2**-53
+    tol = u_d
+    if traceA is None:
+        if is_linear_operator:
+            warn("Trace of LinearOperator not available, it will be estimated."
+                 " Provide `traceA` to ensure performance.", stacklevel=3)
+        # m3=5 is bit arbitrary choice, a more accurate trace (larger m3) might
+        # speed up exponential calculation, but trace estimation is also costly
+        # an educated guess would need to consider the number of time points
+        traceA = traceest(A, m3=5) if is_linear_operator else _trace(A)
+    mu = traceA / float(n)
+
+    # Get the linspace samples, attempting to preserve the linspace defaults.
+    linspace_kwargs = {'retstep': True}
+    if num is not None:
+        linspace_kwargs['num'] = num
+    if endpoint is not None:
+        linspace_kwargs['endpoint'] = endpoint
+    samples, step = np.linspace(start, stop, **linspace_kwargs)
+
+    # Convert the linspace output to the notation used by the publication.
+    nsamples = len(samples)
+    if nsamples < 2:
+        raise ValueError('at least two time points are required')
+    q = nsamples - 1
+    h = step
+    t_0 = samples[0]
+    t_q = samples[q]
+
+    # Define the output ndarray.
+    # Use an ndim=3 shape, such that the last two indices
+    # are the ones that may be involved in level 3 BLAS operations.
+    X_shape = (nsamples,) + B.shape
+    X = np.empty(X_shape, dtype=np.result_type(A.dtype, B.dtype, float))
+    t = t_q - t_0
+    A = A - mu * ident
+    A_1_norm = onenormest(A) if is_linear_operator else _exact_1_norm(A)
+    ell = 2
+    norm_info = LazyOperatorNormInfo(t*A, A_1_norm=t*A_1_norm, ell=ell)
+    if t*A_1_norm == 0:
+        m_star, s = 0, 1
+    else:
+        m_star, s = _fragment_3_1(norm_info, n0, tol, ell=ell)
+
+    # Compute the expm action up to the initial time point.
+    action_t0 = _expm_multiply_simple_core(A, B, t_0, mu, m_star, s)
+    if scipy.sparse.issparse(action_t0):
+        action_t0 = action_t0.toarray()
+    elif is_pydata_spmatrix(action_t0):
+        action_t0 = action_t0.todense()
+    X[0] = action_t0
+
+    # Compute the expm action at the rest of the time points.
+    if q <= s:
+        if status_only:
+            return 0
+        else:
+            return _expm_multiply_interval_core_0(A, X,
+                    h, mu, q, norm_info, tol, ell,n0)
+    elif not (q % s):
+        if status_only:
+            return 1
+        else:
+            return _expm_multiply_interval_core_1(A, X,
+                    h, mu, m_star, s, q, tol)
+    elif (q % s):
+        if status_only:
+            return 2
+        else:
+            return _expm_multiply_interval_core_2(A, X,
+                    h, mu, m_star, s, q, tol)
+    else:
+        raise Exception('internal error')
+
+
+def _expm_multiply_interval_core_0(A, X, h, mu, q, norm_info, tol, ell, n0):
+    """
+    A helper function, for the case q <= s.
+    """
+
+    # Compute the new values of m_star and s which should be applied
+    # over intervals of size t/q
+    if norm_info.onenorm() == 0:
+        m_star, s = 0, 1
+    else:
+        norm_info.set_scale(1./q)
+        m_star, s = _fragment_3_1(norm_info, n0, tol, ell=ell)
+        norm_info.set_scale(1)
+
+    for k in range(q):
+        X[k+1] = _expm_multiply_simple_core(A, X[k], h, mu, m_star, s)
+    return X, 0
+
+
+def _expm_multiply_interval_core_1(A, X, h, mu, m_star, s, q, tol):
+    """
+    A helper function, for the case q > s and q % s == 0.
+    """
+    d = q // s
+    input_shape = X.shape[1:]
+    K_shape = (m_star + 1, ) + input_shape
+    K = np.empty(K_shape, dtype=X.dtype)
+    for i in range(s):
+        Z = X[i*d]
+        K[0] = Z
+        high_p = 0
+        for k in range(1, d+1):
+            F = K[0]
+            c1 = _exact_inf_norm(F)
+            for p in range(1, m_star+1):
+                if p > high_p:
+                    K[p] = h * A.dot(K[p-1]) / float(p)
+                coeff = float(pow(k, p))
+                F = F + coeff * K[p]
+                inf_norm_K_p_1 = _exact_inf_norm(K[p])
+                c2 = coeff * inf_norm_K_p_1
+                if c1 + c2 <= tol * _exact_inf_norm(F):
+                    break
+                c1 = c2
+            X[k + i*d] = np.exp(k*h*mu) * F
+    return X, 1
+
+
+def _expm_multiply_interval_core_2(A, X, h, mu, m_star, s, q, tol):
+    """
+    A helper function, for the case q > s and q % s > 0.
+    """
+    d = q // s
+    j = q // d
+    r = q - d * j
+    input_shape = X.shape[1:]
+    K_shape = (m_star + 1, ) + input_shape
+    K = np.empty(K_shape, dtype=X.dtype)
+    for i in range(j + 1):
+        Z = X[i*d]
+        K[0] = Z
+        high_p = 0
+        if i < j:
+            effective_d = d
+        else:
+            effective_d = r
+        for k in range(1, effective_d+1):
+            F = K[0]
+            c1 = _exact_inf_norm(F)
+            for p in range(1, m_star+1):
+                if p == high_p + 1:
+                    K[p] = h * A.dot(K[p-1]) / float(p)
+                    high_p = p
+                coeff = float(pow(k, p))
+                F = F + coeff * K[p]
+                inf_norm_K_p_1 = _exact_inf_norm(K[p])
+                c2 = coeff * inf_norm_K_p_1
+                if c1 + c2 <= tol * _exact_inf_norm(F):
+                    break
+                c1 = c2
+            X[k + i*d] = np.exp(k*h*mu) * F
+    return X, 2
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py
new file mode 100644
index 0000000000000000000000000000000000000000..510c4ff254eb561fd93da5ca3bda66c2dc92770f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_interface.py
@@ -0,0 +1,921 @@
+"""Abstract linear algebra library.
+
+This module defines a class hierarchy that implements a kind of "lazy"
+matrix representation, called the ``LinearOperator``. It can be used to do
+linear algebra with extremely large sparse or structured matrices, without
+representing those explicitly in memory. Such matrices can be added,
+multiplied, transposed, etc.
+
+As a motivating example, suppose you want have a matrix where almost all of
+the elements have the value one. The standard sparse matrix representation
+skips the storage of zeros, but not ones. By contrast, a LinearOperator is
+able to represent such matrices efficiently. First, we need a compact way to
+represent an all-ones matrix::
+
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg._interface import LinearOperator
+    >>> class Ones(LinearOperator):
+    ...     def __init__(self, shape):
+    ...         super().__init__(dtype=None, shape=shape)
+    ...     def _matvec(self, x):
+    ...         return np.repeat(x.sum(), self.shape[0])
+
+Instances of this class emulate ``np.ones(shape)``, but using a constant
+amount of storage, independent of ``shape``. The ``_matvec`` method specifies
+how this linear operator multiplies with (operates on) a vector. We can now
+add this operator to a sparse matrix that stores only offsets from one::
+
+    >>> from scipy.sparse.linalg._interface import aslinearoperator
+    >>> from scipy.sparse import csr_array
+    >>> offsets = csr_array([[1, 0, 2], [0, -1, 0], [0, 0, 3]])
+    >>> A = aslinearoperator(offsets) + Ones(offsets.shape)
+    >>> A.dot([1, 2, 3])
+    array([13,  4, 15])
+
+The result is the same as that given by its dense, explicitly-stored
+counterpart::
+
+    >>> (np.ones(A.shape, A.dtype) + offsets.toarray()).dot([1, 2, 3])
+    array([13,  4, 15])
+
+Several algorithms in the ``scipy.sparse`` library are able to operate on
+``LinearOperator`` instances.
+"""
+
+import warnings
+
+import numpy as np
+
+from scipy.sparse import issparse
+from scipy.sparse._sputils import isshape, isintlike, asmatrix, is_pydata_spmatrix
+
+__all__ = ['LinearOperator', 'aslinearoperator']
+
+
+class LinearOperator:
+    """Common interface for performing matrix vector products
+
+    Many iterative methods (e.g. cg, gmres) do not need to know the
+    individual entries of a matrix to solve a linear system A@x=b.
+    Such solvers only require the computation of matrix vector
+    products, A@v where v is a dense vector.  This class serves as
+    an abstract interface between iterative solvers and matrix-like
+    objects.
+
+    To construct a concrete LinearOperator, either pass appropriate
+    callables to the constructor of this class, or subclass it.
+
+    A subclass must implement either one of the methods ``_matvec``
+    and ``_matmat``, and the attributes/properties ``shape`` (pair of
+    integers) and ``dtype`` (may be None). It may call the ``__init__``
+    on this class to have these attributes validated. Implementing
+    ``_matvec`` automatically implements ``_matmat`` (using a naive
+    algorithm) and vice-versa.
+
+    Optionally, a subclass may implement ``_rmatvec`` or ``_adjoint``
+    to implement the Hermitian adjoint (conjugate transpose). As with
+    ``_matvec`` and ``_matmat``, implementing either ``_rmatvec`` or
+    ``_adjoint`` implements the other automatically. Implementing
+    ``_adjoint`` is preferable; ``_rmatvec`` is mostly there for
+    backwards compatibility.
+
+    Parameters
+    ----------
+    shape : tuple
+        Matrix dimensions (M, N).
+    matvec : callable f(v)
+        Returns returns A @ v.
+    rmatvec : callable f(v)
+        Returns A^H @ v, where A^H is the conjugate transpose of A.
+    matmat : callable f(V)
+        Returns A @ V, where V is a dense matrix with dimensions (N, K).
+    dtype : dtype
+        Data type of the matrix.
+    rmatmat : callable f(V)
+        Returns A^H @ V, where V is a dense matrix with dimensions (M, K).
+
+    Attributes
+    ----------
+    args : tuple
+        For linear operators describing products etc. of other linear
+        operators, the operands of the binary operation.
+    ndim : int
+        Number of dimensions (this is always 2)
+
+    See Also
+    --------
+    aslinearoperator : Construct LinearOperators
+
+    Notes
+    -----
+    The user-defined matvec() function must properly handle the case
+    where v has shape (N,) as well as the (N,1) case.  The shape of
+    the return type is handled internally by LinearOperator.
+
+    It is highly recommended to explicitly specify the `dtype`, otherwise
+    it is determined automatically at the cost of a single matvec application
+    on `int8` zero vector using the promoted `dtype` of the output.
+    Python `int` could be difficult to automatically cast to numpy integers
+    in the definition of the `matvec` so the determination may be inaccurate.
+    It is assumed that `matmat`, `rmatvec`, and `rmatmat` would result in
+    the same dtype of the output given an `int8` input as `matvec`.
+
+    LinearOperator instances can also be multiplied, added with each
+    other and exponentiated, all lazily: the result of these operations
+    is always a new, composite LinearOperator, that defers linear
+    operations to the original operators and combines the results.
+
+    More details regarding how to subclass a LinearOperator and several
+    examples of concrete LinearOperator instances can be found in the
+    external project `PyLops `_.
+
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import LinearOperator
+    >>> def mv(v):
+    ...     return np.array([2*v[0], 3*v[1]])
+    ...
+    >>> A = LinearOperator((2,2), matvec=mv)
+    >>> A
+    <2x2 _CustomLinearOperator with dtype=int8>
+    >>> A.matvec(np.ones(2))
+    array([ 2.,  3.])
+    >>> A @ np.ones(2)
+    array([ 2.,  3.])
+
+    """
+
+    ndim = 2
+    # Necessary for right matmul with numpy arrays.
+    __array_ufunc__ = None
+
+    def __new__(cls, *args, **kwargs):
+        if cls is LinearOperator:
+            # Operate as _CustomLinearOperator factory.
+            return super().__new__(_CustomLinearOperator)
+        else:
+            obj = super().__new__(cls)
+
+            if (type(obj)._matvec == LinearOperator._matvec
+                    and type(obj)._matmat == LinearOperator._matmat):
+                warnings.warn("LinearOperator subclass should implement"
+                              " at least one of _matvec and _matmat.",
+                              category=RuntimeWarning, stacklevel=2)
+
+            return obj
+
+    def __init__(self, dtype, shape):
+        """Initialize this LinearOperator.
+
+        To be called by subclasses. ``dtype`` may be None; ``shape`` should
+        be convertible to a length-2 tuple.
+        """
+        if dtype is not None:
+            dtype = np.dtype(dtype)
+
+        shape = tuple(shape)
+        if not isshape(shape):
+            raise ValueError(f"invalid shape {shape!r} (must be 2-d)")
+
+        self.dtype = dtype
+        self.shape = shape
+
+    def _init_dtype(self):
+        """Determine the dtype by executing `matvec` on an `int8` test vector.
+
+        In `np.promote_types` hierarchy, the type `int8` is the smallest,
+        so we call `matvec` on `int8` and use the promoted dtype of the output
+        to set the default `dtype` of the `LinearOperator`.
+        We assume that `matmat`, `rmatvec`, and `rmatmat` would result in
+        the same dtype of the output given an `int8` input as `matvec`.
+
+        Called from subclasses at the end of the __init__ routine.
+        """
+        if self.dtype is None:
+            v = np.zeros(self.shape[-1], dtype=np.int8)
+            try:
+                matvec_v = np.asarray(self.matvec(v))
+            except OverflowError:
+                # Python large `int` promoted to `np.int64`or `np.int32`
+                self.dtype = np.dtype(int)
+            else:
+                self.dtype = matvec_v.dtype
+
+    def _matmat(self, X):
+        """Default matrix-matrix multiplication handler.
+
+        Falls back on the user-defined _matvec method, so defining that will
+        define matrix multiplication (though in a very suboptimal way).
+        """
+
+        return np.hstack([self.matvec(col.reshape(-1,1)) for col in X.T])
+
+    def _matvec(self, x):
+        """Default matrix-vector multiplication handler.
+
+        If self is a linear operator of shape (M, N), then this method will
+        be called on a shape (N,) or (N, 1) ndarray, and should return a
+        shape (M,) or (M, 1) ndarray.
+
+        This default implementation falls back on _matmat, so defining that
+        will define matrix-vector multiplication as well.
+        """
+        return self.matmat(x.reshape(-1, 1))
+
+    def matvec(self, x):
+        """Matrix-vector multiplication.
+
+        Performs the operation y=A@x where A is an MxN linear
+        operator and x is a column vector or 1-d array.
+
+        Parameters
+        ----------
+        x : {matrix, ndarray}
+            An array with shape (N,) or (N,1).
+
+        Returns
+        -------
+        y : {matrix, ndarray}
+            A matrix or ndarray with shape (M,) or (M,1) depending
+            on the type and shape of the x argument.
+
+        Notes
+        -----
+        This matvec wraps the user-specified matvec routine or overridden
+        _matvec method to ensure that y has the correct shape and type.
+
+        """
+
+        x = np.asanyarray(x)
+
+        M,N = self.shape
+
+        if x.shape != (N,) and x.shape != (N,1):
+            raise ValueError('dimension mismatch')
+
+        y = self._matvec(x)
+
+        if isinstance(x, np.matrix):
+            y = asmatrix(y)
+        else:
+            y = np.asarray(y)
+
+        if x.ndim == 1:
+            y = y.reshape(M)
+        elif x.ndim == 2:
+            y = y.reshape(M,1)
+        else:
+            raise ValueError('invalid shape returned by user-defined matvec()')
+
+        return y
+
+    def rmatvec(self, x):
+        """Adjoint matrix-vector multiplication.
+
+        Performs the operation y = A^H @ x where A is an MxN linear
+        operator and x is a column vector or 1-d array.
+
+        Parameters
+        ----------
+        x : {matrix, ndarray}
+            An array with shape (M,) or (M,1).
+
+        Returns
+        -------
+        y : {matrix, ndarray}
+            A matrix or ndarray with shape (N,) or (N,1) depending
+            on the type and shape of the x argument.
+
+        Notes
+        -----
+        This rmatvec wraps the user-specified rmatvec routine or overridden
+        _rmatvec method to ensure that y has the correct shape and type.
+
+        """
+
+        x = np.asanyarray(x)
+
+        M,N = self.shape
+
+        if x.shape != (M,) and x.shape != (M,1):
+            raise ValueError('dimension mismatch')
+
+        y = self._rmatvec(x)
+
+        if isinstance(x, np.matrix):
+            y = asmatrix(y)
+        else:
+            y = np.asarray(y)
+
+        if x.ndim == 1:
+            y = y.reshape(N)
+        elif x.ndim == 2:
+            y = y.reshape(N,1)
+        else:
+            raise ValueError('invalid shape returned by user-defined rmatvec()')
+
+        return y
+
+    def _rmatvec(self, x):
+        """Default implementation of _rmatvec; defers to adjoint."""
+        if type(self)._adjoint == LinearOperator._adjoint:
+            # _adjoint not overridden, prevent infinite recursion
+            if (hasattr(self, "_rmatmat")
+                    and type(self)._rmatmat != LinearOperator._rmatmat):
+                # Try to use _rmatmat as a fallback
+                return self._rmatmat(x.reshape(-1, 1)).reshape(-1)
+            raise NotImplementedError
+        else:
+            return self.H.matvec(x)
+
+    def matmat(self, X):
+        """Matrix-matrix multiplication.
+
+        Performs the operation y=A@X where A is an MxN linear
+        operator and X dense N*K matrix or ndarray.
+
+        Parameters
+        ----------
+        X : {matrix, ndarray}
+            An array with shape (N,K).
+
+        Returns
+        -------
+        Y : {matrix, ndarray}
+            A matrix or ndarray with shape (M,K) depending on
+            the type of the X argument.
+
+        Notes
+        -----
+        This matmat wraps any user-specified matmat routine or overridden
+        _matmat method to ensure that y has the correct type.
+
+        """
+        if not (issparse(X) or is_pydata_spmatrix(X)):
+            X = np.asanyarray(X)
+
+        if X.ndim != 2:
+            raise ValueError(f'expected 2-d ndarray or matrix, not {X.ndim}-d')
+
+        if X.shape[0] != self.shape[1]:
+            raise ValueError(f'dimension mismatch: {self.shape}, {X.shape}')
+
+        try:
+            Y = self._matmat(X)
+        except Exception as e:
+            if issparse(X) or is_pydata_spmatrix(X):
+                raise TypeError(
+                    "Unable to multiply a LinearOperator with a sparse matrix."
+                    " Wrap the matrix in aslinearoperator first."
+                ) from e
+            raise
+
+        if isinstance(Y, np.matrix):
+            Y = asmatrix(Y)
+
+        return Y
+
+    def rmatmat(self, X):
+        """Adjoint matrix-matrix multiplication.
+
+        Performs the operation y = A^H @ x where A is an MxN linear
+        operator and x is a column vector or 1-d array, or 2-d array.
+        The default implementation defers to the adjoint.
+
+        Parameters
+        ----------
+        X : {matrix, ndarray}
+            A matrix or 2D array.
+
+        Returns
+        -------
+        Y : {matrix, ndarray}
+            A matrix or 2D array depending on the type of the input.
+
+        Notes
+        -----
+        This rmatmat wraps the user-specified rmatmat routine.
+
+        """
+        if not (issparse(X) or is_pydata_spmatrix(X)):
+            X = np.asanyarray(X)
+
+        if X.ndim != 2:
+            raise ValueError('expected 2-d ndarray or matrix, not %d-d'
+                             % X.ndim)
+
+        if X.shape[0] != self.shape[0]:
+            raise ValueError(f'dimension mismatch: {self.shape}, {X.shape}')
+
+        try:
+            Y = self._rmatmat(X)
+        except Exception as e:
+            if issparse(X) or is_pydata_spmatrix(X):
+                raise TypeError(
+                    "Unable to multiply a LinearOperator with a sparse matrix."
+                    " Wrap the matrix in aslinearoperator() first."
+                ) from e
+            raise
+
+        if isinstance(Y, np.matrix):
+            Y = asmatrix(Y)
+        return Y
+
+    def _rmatmat(self, X):
+        """Default implementation of _rmatmat defers to rmatvec or adjoint."""
+        if type(self)._adjoint == LinearOperator._adjoint:
+            return np.hstack([self.rmatvec(col.reshape(-1, 1)) for col in X.T])
+        else:
+            return self.H.matmat(X)
+
+    def __call__(self, x):
+        return self@x
+
+    def __mul__(self, x):
+        return self.dot(x)
+
+    def __truediv__(self, other):
+        if not np.isscalar(other):
+            raise ValueError("Can only divide a linear operator by a scalar.")
+
+        return _ScaledLinearOperator(self, 1.0/other)
+
+    def dot(self, x):
+        """Matrix-matrix or matrix-vector multiplication.
+
+        Parameters
+        ----------
+        x : array_like
+            1-d or 2-d array, representing a vector or matrix.
+
+        Returns
+        -------
+        Ax : array
+            1-d or 2-d array (depending on the shape of x) that represents
+            the result of applying this linear operator on x.
+
+        """
+        if isinstance(x, LinearOperator):
+            return _ProductLinearOperator(self, x)
+        elif np.isscalar(x):
+            return _ScaledLinearOperator(self, x)
+        else:
+            if not issparse(x) and not is_pydata_spmatrix(x):
+                # Sparse matrices shouldn't be converted to numpy arrays.
+                x = np.asarray(x)
+
+            if x.ndim == 1 or x.ndim == 2 and x.shape[1] == 1:
+                return self.matvec(x)
+            elif x.ndim == 2:
+                return self.matmat(x)
+            else:
+                raise ValueError(f'expected 1-d or 2-d array or matrix, got {x!r}')
+
+    def __matmul__(self, other):
+        if np.isscalar(other):
+            raise ValueError("Scalar operands are not allowed, "
+                             "use '*' instead")
+        return self.__mul__(other)
+
+    def __rmatmul__(self, other):
+        if np.isscalar(other):
+            raise ValueError("Scalar operands are not allowed, "
+                             "use '*' instead")
+        return self.__rmul__(other)
+
+    def __rmul__(self, x):
+        if np.isscalar(x):
+            return _ScaledLinearOperator(self, x)
+        else:
+            return self._rdot(x)
+
+    def _rdot(self, x):
+        """Matrix-matrix or matrix-vector multiplication from the right.
+
+        Parameters
+        ----------
+        x : array_like
+            1-d or 2-d array, representing a vector or matrix.
+
+        Returns
+        -------
+        xA : array
+            1-d or 2-d array (depending on the shape of x) that represents
+            the result of applying this linear operator on x from the right.
+
+        Notes
+        -----
+        This is copied from dot to implement right multiplication.
+        """
+        if isinstance(x, LinearOperator):
+            return _ProductLinearOperator(x, self)
+        elif np.isscalar(x):
+            return _ScaledLinearOperator(self, x)
+        else:
+            if not issparse(x) and not is_pydata_spmatrix(x):
+                # Sparse matrices shouldn't be converted to numpy arrays.
+                x = np.asarray(x)
+
+            # We use transpose instead of rmatvec/rmatmat to avoid
+            # unnecessary complex conjugation if possible.
+            if x.ndim == 1 or x.ndim == 2 and x.shape[0] == 1:
+                return self.T.matvec(x.T).T
+            elif x.ndim == 2:
+                return self.T.matmat(x.T).T
+            else:
+                raise ValueError(f'expected 1-d or 2-d array or matrix, got {x!r}')
+
+    def __pow__(self, p):
+        if np.isscalar(p):
+            return _PowerLinearOperator(self, p)
+        else:
+            return NotImplemented
+
+    def __add__(self, x):
+        if isinstance(x, LinearOperator):
+            return _SumLinearOperator(self, x)
+        else:
+            return NotImplemented
+
+    def __neg__(self):
+        return _ScaledLinearOperator(self, -1)
+
+    def __sub__(self, x):
+        return self.__add__(-x)
+
+    def __repr__(self):
+        M,N = self.shape
+        if self.dtype is None:
+            dt = 'unspecified dtype'
+        else:
+            dt = 'dtype=' + str(self.dtype)
+
+        return '<%dx%d %s with %s>' % (M, N, self.__class__.__name__, dt)
+
+    def adjoint(self):
+        """Hermitian adjoint.
+
+        Returns the Hermitian adjoint of self, aka the Hermitian
+        conjugate or Hermitian transpose. For a complex matrix, the
+        Hermitian adjoint is equal to the conjugate transpose.
+
+        Can be abbreviated self.H instead of self.adjoint().
+
+        Returns
+        -------
+        A_H : LinearOperator
+            Hermitian adjoint of self.
+        """
+        return self._adjoint()
+
+    H = property(adjoint)
+
+    def transpose(self):
+        """Transpose this linear operator.
+
+        Returns a LinearOperator that represents the transpose of this one.
+        Can be abbreviated self.T instead of self.transpose().
+        """
+        return self._transpose()
+
+    T = property(transpose)
+
+    def _adjoint(self):
+        """Default implementation of _adjoint; defers to rmatvec."""
+        return _AdjointLinearOperator(self)
+
+    def _transpose(self):
+        """ Default implementation of _transpose; defers to rmatvec + conj"""
+        return _TransposedLinearOperator(self)
+
+
+class _CustomLinearOperator(LinearOperator):
+    """Linear operator defined in terms of user-specified operations."""
+
+    def __init__(self, shape, matvec, rmatvec=None, matmat=None,
+                 dtype=None, rmatmat=None):
+        super().__init__(dtype, shape)
+
+        self.args = ()
+
+        self.__matvec_impl = matvec
+        self.__rmatvec_impl = rmatvec
+        self.__rmatmat_impl = rmatmat
+        self.__matmat_impl = matmat
+
+        self._init_dtype()
+
+    def _matmat(self, X):
+        if self.__matmat_impl is not None:
+            return self.__matmat_impl(X)
+        else:
+            return super()._matmat(X)
+
+    def _matvec(self, x):
+        return self.__matvec_impl(x)
+
+    def _rmatvec(self, x):
+        func = self.__rmatvec_impl
+        if func is None:
+            raise NotImplementedError("rmatvec is not defined")
+        return self.__rmatvec_impl(x)
+
+    def _rmatmat(self, X):
+        if self.__rmatmat_impl is not None:
+            return self.__rmatmat_impl(X)
+        else:
+            return super()._rmatmat(X)
+
+    def _adjoint(self):
+        return _CustomLinearOperator(shape=(self.shape[1], self.shape[0]),
+                                     matvec=self.__rmatvec_impl,
+                                     rmatvec=self.__matvec_impl,
+                                     matmat=self.__rmatmat_impl,
+                                     rmatmat=self.__matmat_impl,
+                                     dtype=self.dtype)
+
+
+class _AdjointLinearOperator(LinearOperator):
+    """Adjoint of arbitrary Linear Operator"""
+
+    def __init__(self, A):
+        shape = (A.shape[1], A.shape[0])
+        super().__init__(dtype=A.dtype, shape=shape)
+        self.A = A
+        self.args = (A,)
+
+    def _matvec(self, x):
+        return self.A._rmatvec(x)
+
+    def _rmatvec(self, x):
+        return self.A._matvec(x)
+
+    def _matmat(self, x):
+        return self.A._rmatmat(x)
+
+    def _rmatmat(self, x):
+        return self.A._matmat(x)
+
+class _TransposedLinearOperator(LinearOperator):
+    """Transposition of arbitrary Linear Operator"""
+
+    def __init__(self, A):
+        shape = (A.shape[1], A.shape[0])
+        super().__init__(dtype=A.dtype, shape=shape)
+        self.A = A
+        self.args = (A,)
+
+    def _matvec(self, x):
+        # NB. np.conj works also on sparse matrices
+        return np.conj(self.A._rmatvec(np.conj(x)))
+
+    def _rmatvec(self, x):
+        return np.conj(self.A._matvec(np.conj(x)))
+
+    def _matmat(self, x):
+        # NB. np.conj works also on sparse matrices
+        return np.conj(self.A._rmatmat(np.conj(x)))
+
+    def _rmatmat(self, x):
+        return np.conj(self.A._matmat(np.conj(x)))
+
+def _get_dtype(operators, dtypes=None):
+    if dtypes is None:
+        dtypes = []
+    for obj in operators:
+        if obj is not None and hasattr(obj, 'dtype'):
+            dtypes.append(obj.dtype)
+    return np.result_type(*dtypes)
+
+
+class _SumLinearOperator(LinearOperator):
+    def __init__(self, A, B):
+        if not isinstance(A, LinearOperator) or \
+                not isinstance(B, LinearOperator):
+            raise ValueError('both operands have to be a LinearOperator')
+        if A.shape != B.shape:
+            raise ValueError(f'cannot add {A} and {B}: shape mismatch')
+        self.args = (A, B)
+        super().__init__(_get_dtype([A, B]), A.shape)
+
+    def _matvec(self, x):
+        return self.args[0].matvec(x) + self.args[1].matvec(x)
+
+    def _rmatvec(self, x):
+        return self.args[0].rmatvec(x) + self.args[1].rmatvec(x)
+
+    def _rmatmat(self, x):
+        return self.args[0].rmatmat(x) + self.args[1].rmatmat(x)
+
+    def _matmat(self, x):
+        return self.args[0].matmat(x) + self.args[1].matmat(x)
+
+    def _adjoint(self):
+        A, B = self.args
+        return A.H + B.H
+
+
+class _ProductLinearOperator(LinearOperator):
+    def __init__(self, A, B):
+        if not isinstance(A, LinearOperator) or \
+                not isinstance(B, LinearOperator):
+            raise ValueError('both operands have to be a LinearOperator')
+        if A.shape[1] != B.shape[0]:
+            raise ValueError(f'cannot multiply {A} and {B}: shape mismatch')
+        super().__init__(_get_dtype([A, B]),
+                                                     (A.shape[0], B.shape[1]))
+        self.args = (A, B)
+
+    def _matvec(self, x):
+        return self.args[0].matvec(self.args[1].matvec(x))
+
+    def _rmatvec(self, x):
+        return self.args[1].rmatvec(self.args[0].rmatvec(x))
+
+    def _rmatmat(self, x):
+        return self.args[1].rmatmat(self.args[0].rmatmat(x))
+
+    def _matmat(self, x):
+        return self.args[0].matmat(self.args[1].matmat(x))
+
+    def _adjoint(self):
+        A, B = self.args
+        return B.H @ A.H
+
+
+class _ScaledLinearOperator(LinearOperator):
+    def __init__(self, A, alpha):
+        if not isinstance(A, LinearOperator):
+            raise ValueError('LinearOperator expected as A')
+        if not np.isscalar(alpha):
+            raise ValueError('scalar expected as alpha')
+        if isinstance(A, _ScaledLinearOperator):
+            A, alpha_original = A.args
+            # Avoid in-place multiplication so that we don't accidentally mutate
+            # the original prefactor.
+            alpha = alpha * alpha_original
+
+        dtype = _get_dtype([A], [type(alpha)])
+        super().__init__(dtype, A.shape)
+        self.args = (A, alpha)
+        # Note: args[1] is alpha (a scalar), so use `*` below, not `@`
+
+    def _matvec(self, x):
+        return self.args[1] * self.args[0].matvec(x)
+
+    def _rmatvec(self, x):
+        return np.conj(self.args[1]) * self.args[0].rmatvec(x)
+
+    def _rmatmat(self, x):
+        return np.conj(self.args[1]) * self.args[0].rmatmat(x)
+
+    def _matmat(self, x):
+        return self.args[1] * self.args[0].matmat(x)
+
+    def _adjoint(self):
+        A, alpha = self.args
+        return A.H * np.conj(alpha)
+
+
+class _PowerLinearOperator(LinearOperator):
+    def __init__(self, A, p):
+        if not isinstance(A, LinearOperator):
+            raise ValueError('LinearOperator expected as A')
+        if A.shape[0] != A.shape[1]:
+            raise ValueError(f'square LinearOperator expected, got {A!r}')
+        if not isintlike(p) or p < 0:
+            raise ValueError('non-negative integer expected as p')
+
+        super().__init__(_get_dtype([A]), A.shape)
+        self.args = (A, p)
+
+    def _power(self, fun, x):
+        res = np.array(x, copy=True)
+        for i in range(self.args[1]):
+            res = fun(res)
+        return res
+
+    def _matvec(self, x):
+        return self._power(self.args[0].matvec, x)
+
+    def _rmatvec(self, x):
+        return self._power(self.args[0].rmatvec, x)
+
+    def _rmatmat(self, x):
+        return self._power(self.args[0].rmatmat, x)
+
+    def _matmat(self, x):
+        return self._power(self.args[0].matmat, x)
+
+    def _adjoint(self):
+        A, p = self.args
+        return A.H ** p
+
+
+class MatrixLinearOperator(LinearOperator):
+    def __init__(self, A):
+        super().__init__(A.dtype, A.shape)
+        self.A = A
+        self.__adj = None
+        self.args = (A,)
+
+    def _matmat(self, X):
+        return self.A.dot(X)
+
+    def _adjoint(self):
+        if self.__adj is None:
+            self.__adj = _AdjointMatrixOperator(self.A)
+        return self.__adj
+
+
+class _AdjointMatrixOperator(MatrixLinearOperator):
+    def __init__(self, adjoint_array):
+        self.A = adjoint_array.T.conj()
+        self.args = (adjoint_array,)
+        self.shape = adjoint_array.shape[1], adjoint_array.shape[0]
+
+    @property
+    def dtype(self):
+        return self.args[0].dtype
+
+    def _adjoint(self):
+        return MatrixLinearOperator(self.args[0])
+
+
+class IdentityOperator(LinearOperator):
+    def __init__(self, shape, dtype=None):
+        super().__init__(dtype, shape)
+
+    def _matvec(self, x):
+        return x
+
+    def _rmatvec(self, x):
+        return x
+
+    def _rmatmat(self, x):
+        return x
+
+    def _matmat(self, x):
+        return x
+
+    def _adjoint(self):
+        return self
+
+
+def aslinearoperator(A):
+    """Return A as a LinearOperator.
+
+    'A' may be any of the following types:
+     - ndarray
+     - matrix
+     - sparse array (e.g. csr_array, lil_array, etc.)
+     - LinearOperator
+     - An object with .shape and .matvec attributes
+
+    See the LinearOperator documentation for additional information.
+
+    Notes
+    -----
+    If 'A' has no .dtype attribute, the data type is determined by calling
+    :func:`LinearOperator.matvec()` - set the .dtype attribute to prevent this
+    call upon the linear operator creation.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import aslinearoperator
+    >>> M = np.array([[1,2,3],[4,5,6]], dtype=np.int32)
+    >>> aslinearoperator(M)
+    <2x3 MatrixLinearOperator with dtype=int32>
+    """
+    if isinstance(A, LinearOperator):
+        return A
+
+    elif isinstance(A, np.ndarray) or isinstance(A, np.matrix):
+        if A.ndim > 2:
+            raise ValueError('array must have ndim <= 2')
+        A = np.atleast_2d(np.asarray(A))
+        return MatrixLinearOperator(A)
+
+    elif issparse(A) or is_pydata_spmatrix(A):
+        return MatrixLinearOperator(A)
+
+    else:
+        if hasattr(A, 'shape') and hasattr(A, 'matvec'):
+            rmatvec = None
+            rmatmat = None
+            dtype = None
+
+            if hasattr(A, 'rmatvec'):
+                rmatvec = A.rmatvec
+            if hasattr(A, 'rmatmat'):
+                rmatmat = A.rmatmat
+            if hasattr(A, 'dtype'):
+                dtype = A.dtype
+            return LinearOperator(A.shape, A.matvec, rmatvec=rmatvec,
+                                  rmatmat=rmatmat, dtype=dtype)
+
+        else:
+            raise TypeError('type not understood')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..3b57274542928e79c234bb6955849a90be21990e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__init__.py
@@ -0,0 +1,20 @@
+"Iterative Solvers for Sparse Linear Systems"
+
+#from info import __doc__
+from .iterative import *
+from .minres import minres
+from .lgmres import lgmres
+from .lsqr import lsqr
+from .lsmr import lsmr
+from ._gcrotmk import gcrotmk
+from .tfqmr import tfqmr
+
+__all__ = [
+    'bicg', 'bicgstab', 'cg', 'cgs', 'gcrotmk', 'gmres',
+    'lgmres', 'lsmr', 'lsqr',
+    'minres', 'qmr', 'tfqmr'
+]
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..616511188585687ca010b77b2f98d29d9ae25146
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/_gcrotmk.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/_gcrotmk.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f85f8cab2ff22fd4935a015e16bbd4dfb599fe89
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/_gcrotmk.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/iterative.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/iterative.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5e2e08ea9e25898f10d2bc421f844fd1116e18ef
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/iterative.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lgmres.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lgmres.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4762913bfed383c7c90a94a95f40ba156ee4f776
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lgmres.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsmr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsmr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b7d481d2c269fa233cd82e234bdd438191ddf91c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsmr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsqr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsqr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d553f26d243bffc0e3445c6620bd80b7a8e8360f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/lsqr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/minres.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/minres.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..45218bdd688460f1de68a1e2034e84fa5db5b032
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/minres.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/tfqmr.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/tfqmr.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1c2ca4c20dec1ac4f24fb069de73f7100bfbe3ed
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/tfqmr.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/utils.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/utils.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2b6524ad93e49eda6c25e500de36b3ab6a458ef3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/__pycache__/utils.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/_gcrotmk.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/_gcrotmk.py
new file mode 100644
index 0000000000000000000000000000000000000000..e5c1fe9daee2c5a955dd71de3e82f33e3dc02179
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/_gcrotmk.py
@@ -0,0 +1,503 @@
+# Copyright (C) 2015, Pauli Virtanen 
+# Distributed under the same license as SciPy.
+
+import numpy as np
+from numpy.linalg import LinAlgError
+from scipy.linalg import (get_blas_funcs, qr, solve, svd, qr_insert, lstsq)
+from .iterative import _get_atol_rtol
+from scipy.sparse.linalg._isolve.utils import make_system
+
+
+__all__ = ['gcrotmk']
+
+
+def _fgmres(matvec, v0, m, atol, lpsolve=None, rpsolve=None, cs=(), outer_v=(),
+            prepend_outer_v=False):
+    """
+    FGMRES Arnoldi process, with optional projection or augmentation
+
+    Parameters
+    ----------
+    matvec : callable
+        Operation A*x
+    v0 : ndarray
+        Initial vector, normalized to nrm2(v0) == 1
+    m : int
+        Number of GMRES rounds
+    atol : float
+        Absolute tolerance for early exit
+    lpsolve : callable
+        Left preconditioner L
+    rpsolve : callable
+        Right preconditioner R
+    cs : list of (ndarray, ndarray)
+        Columns of matrices C and U in GCROT
+    outer_v : list of ndarrays
+        Augmentation vectors in LGMRES
+    prepend_outer_v : bool, optional
+        Whether augmentation vectors come before or after
+        Krylov iterates
+
+    Raises
+    ------
+    LinAlgError
+        If nans encountered
+
+    Returns
+    -------
+    Q, R : ndarray
+        QR decomposition of the upper Hessenberg H=QR
+    B : ndarray
+        Projections corresponding to matrix C
+    vs : list of ndarray
+        Columns of matrix V
+    zs : list of ndarray
+        Columns of matrix Z
+    y : ndarray
+        Solution to ||H y - e_1||_2 = min!
+    res : float
+        The final (preconditioned) residual norm
+
+    """
+
+    if lpsolve is None:
+        def lpsolve(x):
+            return x
+    if rpsolve is None:
+        def rpsolve(x):
+            return x
+
+    axpy, dot, scal, nrm2 = get_blas_funcs(['axpy', 'dot', 'scal', 'nrm2'], (v0,))
+
+    vs = [v0]
+    zs = []
+    y = None
+    res = np.nan
+
+    m = m + len(outer_v)
+
+    # Orthogonal projection coefficients
+    B = np.zeros((len(cs), m), dtype=v0.dtype)
+
+    # H is stored in QR factorized form
+    Q = np.ones((1, 1), dtype=v0.dtype)
+    R = np.zeros((1, 0), dtype=v0.dtype)
+
+    eps = np.finfo(v0.dtype).eps
+
+    breakdown = False
+
+    # FGMRES Arnoldi process
+    for j in range(m):
+        # L A Z = C B + V H
+
+        if prepend_outer_v and j < len(outer_v):
+            z, w = outer_v[j]
+        elif prepend_outer_v and j == len(outer_v):
+            z = rpsolve(v0)
+            w = None
+        elif not prepend_outer_v and j >= m - len(outer_v):
+            z, w = outer_v[j - (m - len(outer_v))]
+        else:
+            z = rpsolve(vs[-1])
+            w = None
+
+        if w is None:
+            w = lpsolve(matvec(z))
+        else:
+            # w is clobbered below
+            w = w.copy()
+
+        w_norm = nrm2(w)
+
+        # GCROT projection: L A -> (1 - C C^H) L A
+        # i.e. orthogonalize against C
+        for i, c in enumerate(cs):
+            alpha = dot(c, w)
+            B[i,j] = alpha
+            w = axpy(c, w, c.shape[0], -alpha)  # w -= alpha*c
+
+        # Orthogonalize against V
+        hcur = np.zeros(j+2, dtype=Q.dtype)
+        for i, v in enumerate(vs):
+            alpha = dot(v, w)
+            hcur[i] = alpha
+            w = axpy(v, w, v.shape[0], -alpha)  # w -= alpha*v
+        hcur[i+1] = nrm2(w)
+
+        with np.errstate(over='ignore', divide='ignore'):
+            # Careful with denormals
+            alpha = 1/hcur[-1]
+
+        if np.isfinite(alpha):
+            w = scal(alpha, w)
+
+        if not (hcur[-1] > eps * w_norm):
+            # w essentially in the span of previous vectors,
+            # or we have nans. Bail out after updating the QR
+            # solution.
+            breakdown = True
+
+        vs.append(w)
+        zs.append(z)
+
+        # Arnoldi LSQ problem
+
+        # Add new column to H=Q@R, padding other columns with zeros
+        Q2 = np.zeros((j+2, j+2), dtype=Q.dtype, order='F')
+        Q2[:j+1,:j+1] = Q
+        Q2[j+1,j+1] = 1
+
+        R2 = np.zeros((j+2, j), dtype=R.dtype, order='F')
+        R2[:j+1,:] = R
+
+        Q, R = qr_insert(Q2, R2, hcur, j, which='col',
+                         overwrite_qru=True, check_finite=False)
+
+        # Transformed least squares problem
+        # || Q R y - inner_res_0 * e_1 ||_2 = min!
+        # Since R = [R'; 0], solution is y = inner_res_0 (R')^{-1} (Q^H)[:j,0]
+
+        # Residual is immediately known
+        res = abs(Q[0,-1])
+
+        # Check for termination
+        if res < atol or breakdown:
+            break
+
+    if not np.isfinite(R[j,j]):
+        # nans encountered, bail out
+        raise LinAlgError()
+
+    # -- Get the LSQ problem solution
+
+    # The problem is triangular, but the condition number may be
+    # bad (or in case of breakdown the last diagonal entry may be
+    # zero), so use lstsq instead of trtrs.
+    y, _, _, _, = lstsq(R[:j+1,:j+1], Q[0,:j+1].conj())
+
+    B = B[:,:j+1]
+
+    return Q, R, B, vs, zs, y, res
+
+
+def gcrotmk(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=1000, M=None, callback=None,
+            m=20, k=None, CU=None, discard_C=False, truncate='oldest'):
+    """
+    Solve a matrix equation using flexible GCROT(m,k) algorithm.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        `LinearOperator`.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``rtol=1e-5`` and ``atol=0.0``.
+    maxiter : int, optional
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved. The
+        default is ``1000``.
+    M : {sparse array, ndarray, LinearOperator}, optional
+        Preconditioner for `A`.  The preconditioner should approximate the
+        inverse of `A`. gcrotmk is a 'flexible' algorithm and the preconditioner
+        can vary from iteration to iteration. Effective preconditioning
+        dramatically improves the rate of convergence, which implies that
+        fewer iterations are needed to reach a given error tolerance.
+    callback : function, optional
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+    m : int, optional
+        Number of inner FGMRES iterations per each outer iteration.
+        Default: 20
+    k : int, optional
+        Number of vectors to carry between inner FGMRES iterations.
+        According to [2]_, good values are around `m`.
+        Default: `m`
+    CU : list of tuples, optional
+        List of tuples ``(c, u)`` which contain the columns of the matrices
+        C and U in the GCROT(m,k) algorithm. For details, see [2]_.
+        The list given and vectors contained in it are modified in-place.
+        If not given, start from empty matrices. The ``c`` elements in the
+        tuples can be ``None``, in which case the vectors are recomputed
+        via ``c = A u`` on start and orthogonalized as described in [3]_.
+    discard_C : bool, optional
+        Discard the C-vectors at the end. Useful if recycling Krylov subspaces
+        for different linear systems.
+    truncate : {'oldest', 'smallest'}, optional
+        Truncation scheme to use. Drop: oldest vectors, or vectors with
+        smallest singular values using the scheme discussed in [1,2].
+        See [2]_ for detailed comparison.
+        Default: 'oldest'
+
+    Returns
+    -------
+    x : ndarray
+        The solution found.
+    info : int
+        Provides convergence information:
+
+        * 0  : successful exit
+        * >0 : convergence to tolerance not achieved, number of iterations
+
+    References
+    ----------
+    .. [1] E. de Sturler, ''Truncation strategies for optimal Krylov subspace
+           methods'', SIAM J. Numer. Anal. 36, 864 (1999).
+    .. [2] J.E. Hicken and D.W. Zingg, ''A simplified and flexible variant
+           of GCROT for solving nonsymmetric linear systems'',
+           SIAM J. Sci. Comput. 32, 172 (2010).
+    .. [3] M.L. Parks, E. de Sturler, G. Mackey, D.D. Johnson, S. Maiti,
+           ''Recycling Krylov subspaces for sequences of linear systems'',
+           SIAM J. Sci. Comput. 28, 1651 (2006).
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import gcrotmk
+    >>> R = np.random.randn(5, 5)
+    >>> A = csc_array(R)
+    >>> b = np.random.randn(5)
+    >>> x, exit_code = gcrotmk(A, b, atol=1e-5)
+    >>> print(exit_code)
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+
+    """
+    A,M,x,b,postprocess = make_system(A,M,x0,b)
+
+    if not np.isfinite(b).all():
+        raise ValueError("RHS must contain only finite numbers")
+
+    if truncate not in ('oldest', 'smallest'):
+        raise ValueError(f"Invalid value for 'truncate': {truncate!r}")
+
+    matvec = A.matvec
+    psolve = M.matvec
+
+    if CU is None:
+        CU = []
+
+    if k is None:
+        k = m
+
+    axpy, dot, scal = None, None, None
+
+    if x0 is None:
+        r = b.copy()
+    else:
+        r = b - matvec(x)
+
+    axpy, dot, scal, nrm2 = get_blas_funcs(['axpy', 'dot', 'scal', 'nrm2'], (x, r))
+
+    b_norm = nrm2(b)
+
+    # we call this to get the right atol/rtol and raise errors as necessary
+    atol, rtol = _get_atol_rtol('gcrotmk', b_norm, atol, rtol)
+
+    if b_norm == 0:
+        x = b
+        return (postprocess(x), 0)
+
+    if discard_C:
+        CU[:] = [(None, u) for c, u in CU]
+
+    # Reorthogonalize old vectors
+    if CU:
+        # Sort already existing vectors to the front
+        CU.sort(key=lambda cu: cu[0] is not None)
+
+        # Fill-in missing ones
+        C = np.empty((A.shape[0], len(CU)), dtype=r.dtype, order='F')
+        us = []
+        j = 0
+        while CU:
+            # More memory-efficient: throw away old vectors as we go
+            c, u = CU.pop(0)
+            if c is None:
+                c = matvec(u)
+            C[:,j] = c
+            j += 1
+            us.append(u)
+
+        # Orthogonalize
+        Q, R, P = qr(C, overwrite_a=True, mode='economic', pivoting=True)
+        del C
+
+        # C := Q
+        cs = list(Q.T)
+
+        # U := U P R^-1,  back-substitution
+        new_us = []
+        for j in range(len(cs)):
+            u = us[P[j]]
+            for i in range(j):
+                u = axpy(us[P[i]], u, u.shape[0], -R[i,j])
+            if abs(R[j,j]) < 1e-12 * abs(R[0,0]):
+                # discard rest of the vectors
+                break
+            u = scal(1.0/R[j,j], u)
+            new_us.append(u)
+
+        # Form the new CU lists
+        CU[:] = list(zip(cs, new_us))[::-1]
+
+    if CU:
+        axpy, dot = get_blas_funcs(['axpy', 'dot'], (r,))
+
+        # Solve first the projection operation with respect to the CU
+        # vectors. This corresponds to modifying the initial guess to
+        # be
+        #
+        #     x' = x + U y
+        #     y = argmin_y || b - A (x + U y) ||^2
+        #
+        # The solution is y = C^H (b - A x)
+        for c, u in CU:
+            yc = dot(c, r)
+            x = axpy(u, x, x.shape[0], yc)
+            r = axpy(c, r, r.shape[0], -yc)
+
+    # GCROT main iteration
+    for j_outer in range(maxiter):
+        # -- callback
+        if callback is not None:
+            callback(x)
+
+        beta = nrm2(r)
+
+        # -- check stopping condition
+        beta_tol = max(atol, rtol * b_norm)
+
+        if beta <= beta_tol and (j_outer > 0 or CU):
+            # recompute residual to avoid rounding error
+            r = b - matvec(x)
+            beta = nrm2(r)
+
+        if beta <= beta_tol:
+            j_outer = -1
+            break
+
+        ml = m + max(k - len(CU), 0)
+
+        cs = [c for c, u in CU]
+
+        try:
+            Q, R, B, vs, zs, y, pres = _fgmres(matvec,
+                                               r/beta,
+                                               ml,
+                                               rpsolve=psolve,
+                                               atol=max(atol, rtol*b_norm)/beta,
+                                               cs=cs)
+            y *= beta
+        except LinAlgError:
+            # Floating point over/underflow, non-finite result from
+            # matmul etc. -- report failure.
+            break
+
+        #
+        # At this point,
+        #
+        #     [A U, A Z] = [C, V] G;   G =  [ I  B ]
+        #                                   [ 0  H ]
+        #
+        # where [C, V] has orthonormal columns, and r = beta v_0. Moreover,
+        #
+        #     || b - A (x + Z y + U q) ||_2 = || r - C B y - V H y - C q ||_2 = min!
+        #
+        # from which y = argmin_y || beta e_1 - H y ||_2, and q = -B y
+        #
+
+        #
+        # GCROT(m,k) update
+        #
+
+        # Define new outer vectors
+
+        # ux := (Z - U B) y
+        ux = zs[0]*y[0]
+        for z, yc in zip(zs[1:], y[1:]):
+            ux = axpy(z, ux, ux.shape[0], yc)  # ux += z*yc
+        by = B.dot(y)
+        for cu, byc in zip(CU, by):
+            c, u = cu
+            ux = axpy(u, ux, ux.shape[0], -byc)  # ux -= u*byc
+
+        # cx := V H y
+        with np.errstate(invalid="ignore"):
+            hy = Q.dot(R.dot(y))
+        cx = vs[0] * hy[0]
+        for v, hyc in zip(vs[1:], hy[1:]):
+            cx = axpy(v, cx, cx.shape[0], hyc)  # cx += v*hyc
+
+        # Normalize cx, maintaining cx = A ux
+        # This new cx is orthogonal to the previous C, by construction
+        try:
+            alpha = 1/nrm2(cx)
+            if not np.isfinite(alpha):
+                raise FloatingPointError()
+        except (FloatingPointError, ZeroDivisionError):
+            # Cannot update, so skip it
+            continue
+
+        cx = scal(alpha, cx)
+        ux = scal(alpha, ux)
+
+        # Update residual and solution
+        gamma = dot(cx, r)
+        r = axpy(cx, r, r.shape[0], -gamma)  # r -= gamma*cx
+        x = axpy(ux, x, x.shape[0], gamma)  # x += gamma*ux
+
+        # Truncate CU
+        if truncate == 'oldest':
+            while len(CU) >= k and CU:
+                del CU[0]
+        elif truncate == 'smallest':
+            if len(CU) >= k and CU:
+                # cf. [1,2]
+                D = solve(R[:-1,:].T, B.T).T
+                W, sigma, V = svd(D)
+
+                # C := C W[:,:k-1],  U := U W[:,:k-1]
+                new_CU = []
+                for j, w in enumerate(W[:,:k-1].T):
+                    c, u = CU[0]
+                    c = c * w[0]
+                    u = u * w[0]
+                    for cup, wp in zip(CU[1:], w[1:]):
+                        cp, up = cup
+                        c = axpy(cp, c, c.shape[0], wp)
+                        u = axpy(up, u, u.shape[0], wp)
+
+                    # Reorthogonalize at the same time; not necessary
+                    # in exact arithmetic, but floating point error
+                    # tends to accumulate here
+                    for cp, up in new_CU:
+                        alpha = dot(cp, c)
+                        c = axpy(cp, c, c.shape[0], -alpha)
+                        u = axpy(up, u, u.shape[0], -alpha)
+                    alpha = nrm2(c)
+                    c = scal(1.0/alpha, c)
+                    u = scal(1.0/alpha, u)
+
+                    new_CU.append((c, u))
+                CU[:] = new_CU
+
+        # Add new vector to CU
+        CU.append((cx, ux))
+
+    # Include the solution vector to the span
+    CU.append((None, x.copy()))
+    if discard_C:
+        CU[:] = [(None, uz) for cz, uz in CU]
+
+    return postprocess(x), j_outer + 1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/iterative.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/iterative.py
new file mode 100644
index 0000000000000000000000000000000000000000..4b91ef8fe4b37191e76710670eccd9557a397964
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/iterative.py
@@ -0,0 +1,1045 @@
+import warnings
+import numpy as np
+from scipy.sparse.linalg._interface import LinearOperator
+from .utils import make_system
+from scipy.linalg import get_lapack_funcs
+
+__all__ = ['bicg', 'bicgstab', 'cg', 'cgs', 'gmres', 'qmr']
+
+
+def _get_atol_rtol(name, b_norm, atol=0., rtol=1e-5):
+    """
+    A helper function to handle tolerance normalization
+    """
+    if atol == 'legacy' or atol is None or atol < 0:
+        msg = (f"'scipy.sparse.linalg.{name}' called with invalid `atol`={atol}; "
+               "if set, `atol` must be a real, non-negative number.")
+        raise ValueError(msg)
+
+    atol = max(float(atol), float(rtol) * float(b_norm))
+
+    return atol, rtol
+
+
+def bicg(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M=None, callback=None):
+    """Use BIConjugate Gradient iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` and ``A^T x`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}
+        Preconditioner for `A`. It should approximate the
+        inverse of `A` (see Notes). Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+            <0 : parameter breakdown
+
+    Notes
+    -----
+    The preconditioner `M` should be a matrix such that ``M @ A`` has a smaller
+    condition number than `A`, see [1]_ .
+
+    References
+    ----------
+    .. [1] "Preconditioner", Wikipedia, 
+           https://en.wikipedia.org/wiki/Preconditioner
+    .. [2] "Biconjugate gradient method", Wikipedia, 
+           https://en.wikipedia.org/wiki/Biconjugate_gradient_method
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import bicg
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1.]])
+    >>> b = np.array([2., 4., -1.])
+    >>> x, exitCode = bicg(A, b, atol=1e-5)
+    >>> print(exitCode)  # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('bicg', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    n = len(b)
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    if maxiter is None:
+        maxiter = n*10
+
+    matvec, rmatvec = A.matvec, A.rmatvec
+    psolve, rpsolve = M.matvec, M.rmatvec
+
+    rhotol = np.finfo(x.dtype.char).eps**2
+
+    # Dummy values to initialize vars, silence linter warnings
+    rho_prev, p, ptilde = None, None, None
+
+    r = b - matvec(x) if x.any() else b.copy()
+    rtilde = r.copy()
+
+    for iteration in range(maxiter):
+        if np.linalg.norm(r) < atol:  # Are we done?
+            return postprocess(x), 0
+
+        z = psolve(r)
+        ztilde = rpsolve(rtilde)
+        # order matters in this dot product
+        rho_cur = dotprod(rtilde, z)
+
+        if np.abs(rho_cur) < rhotol:  # Breakdown case
+            return postprocess, -10
+
+        if iteration > 0:
+            beta = rho_cur / rho_prev
+            p *= beta
+            p += z
+            ptilde *= beta.conj()
+            ptilde += ztilde
+        else:  # First spin
+            p = z.copy()
+            ptilde = ztilde.copy()
+
+        q = matvec(p)
+        qtilde = rmatvec(ptilde)
+        rv = dotprod(ptilde, q)
+
+        if rv == 0:
+            return postprocess(x), -11
+
+        alpha = rho_cur / rv
+        x += alpha*p
+        r -= alpha*q
+        rtilde -= alpha.conj()*qtilde
+        rho_prev = rho_cur
+
+        if callback:
+            callback(x)
+
+    else:  # for loop exhausted
+        # Return incomplete progress
+        return postprocess(x), maxiter
+
+
+def bicgstab(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M=None,
+             callback=None):
+    """Use BIConjugate Gradient STABilized iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` and ``A^T x`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}
+        Preconditioner for `A`. It should approximate the
+        inverse of `A` (see Notes). Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+            <0 : parameter breakdown
+
+    Notes
+    -----
+    The preconditioner `M` should be a matrix such that ``M @ A`` has a smaller
+    condition number than `A`, see [1]_ .
+
+    References
+    ----------
+    .. [1] "Preconditioner", Wikipedia, 
+           https://en.wikipedia.org/wiki/Preconditioner
+    .. [2] "Biconjugate gradient stabilized method", 
+           Wikipedia, https://en.wikipedia.org/wiki/Biconjugate_gradient_stabilized_method
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import bicgstab
+    >>> R = np.array([[4, 2, 0, 1],
+    ...               [3, 0, 0, 2],
+    ...               [0, 1, 1, 1],
+    ...               [0, 2, 1, 0]])
+    >>> A = csc_array(R)
+    >>> b = np.array([-1, -0.5, -1, 2])
+    >>> x, exit_code = bicgstab(A, b, atol=1e-5)
+    >>> print(exit_code)  # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('bicgstab', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    n = len(b)
+
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    if maxiter is None:
+        maxiter = n*10
+
+    matvec = A.matvec
+    psolve = M.matvec
+
+    # These values make no sense but coming from original Fortran code
+    # sqrt might have been meant instead.
+    rhotol = np.finfo(x.dtype.char).eps**2
+    omegatol = rhotol
+
+    # Dummy values to initialize vars, silence linter warnings
+    rho_prev, omega, alpha, p, v = None, None, None, None, None
+
+    r = b - matvec(x) if x.any() else b.copy()
+    rtilde = r.copy()
+
+    for iteration in range(maxiter):
+        if np.linalg.norm(r) < atol:  # Are we done?
+            return postprocess(x), 0
+
+        rho = dotprod(rtilde, r)
+        if np.abs(rho) < rhotol:  # rho breakdown
+            return postprocess(x), -10
+
+        if iteration > 0:
+            if np.abs(omega) < omegatol:  # omega breakdown
+                return postprocess(x), -11
+
+            beta = (rho / rho_prev) * (alpha / omega)
+            p -= omega*v
+            p *= beta
+            p += r
+        else:  # First spin
+            s = np.empty_like(r)
+            p = r.copy()
+
+        phat = psolve(p)
+        v = matvec(phat)
+        rv = dotprod(rtilde, v)
+        if rv == 0:
+            return postprocess(x), -11
+        alpha = rho / rv
+        r -= alpha*v
+        s[:] = r[:]
+
+        if np.linalg.norm(s) < atol:
+            x += alpha*phat
+            return postprocess(x), 0
+
+        shat = psolve(s)
+        t = matvec(shat)
+        omega = dotprod(t, s) / dotprod(t, t)
+        x += alpha*phat
+        x += omega*shat
+        r -= omega*t
+        rho_prev = rho
+
+        if callback:
+            callback(x)
+
+    else:  # for loop exhausted
+        # Return incomplete progress
+        return postprocess(x), maxiter
+
+
+def cg(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M=None, callback=None):
+    """Use Conjugate Gradient iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        `A` must represent a hermitian, positive definite matrix.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}
+        Preconditioner for `A`. `M` must represent a hermitian, positive definite
+        matrix. It should approximate the inverse of `A` (see Notes).
+        Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+
+    Notes
+    -----
+    The preconditioner `M` should be a matrix such that ``M @ A`` has a smaller
+    condition number than `A`, see [2]_.
+
+    References
+    ----------
+    .. [1] "Conjugate Gradient Method, Wikipedia, 
+           https://en.wikipedia.org/wiki/Conjugate_gradient_method
+    .. [2] "Preconditioner", 
+           Wikipedia, https://en.wikipedia.org/wiki/Preconditioner
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import cg
+    >>> P = np.array([[4, 0, 1, 0],
+    ...               [0, 5, 0, 0],
+    ...               [1, 0, 3, 2],
+    ...               [0, 0, 2, 4]])
+    >>> A = csc_array(P)
+    >>> b = np.array([-1, -0.5, -1, 2])
+    >>> x, exit_code = cg(A, b, atol=1e-5)
+    >>> print(exit_code)    # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('cg', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    n = len(b)
+
+    if maxiter is None:
+        maxiter = n*10
+
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    matvec = A.matvec
+    psolve = M.matvec
+    r = b - matvec(x) if x.any() else b.copy()
+
+    # Dummy value to initialize var, silences warnings
+    rho_prev, p = None, None
+
+    for iteration in range(maxiter):
+        if np.linalg.norm(r) < atol:  # Are we done?
+            return postprocess(x), 0
+
+        z = psolve(r)
+        rho_cur = dotprod(r, z)
+        if iteration > 0:
+            beta = rho_cur / rho_prev
+            p *= beta
+            p += z
+        else:  # First spin
+            p = np.empty_like(r)
+            p[:] = z[:]
+
+        q = matvec(p)
+        alpha = rho_cur / dotprod(p, q)
+        x += alpha*p
+        r -= alpha*q
+        rho_prev = rho_cur
+
+        if callback:
+            callback(x)
+
+    else:  # for loop exhausted
+        # Return incomplete progress
+        return postprocess(x), maxiter
+
+
+def cgs(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M=None, callback=None):
+    """Use Conjugate Gradient Squared iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real-valued N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}
+        Preconditioner for ``A``. It should approximate the
+        inverse of `A` (see Notes). Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+            <0 : parameter breakdown
+
+    Notes
+    -----
+    The preconditioner `M` should be a matrix such that ``M @ A`` has a smaller
+    condition number than `A`, see [1]_.
+
+    References
+    ----------
+    .. [1] "Preconditioner", Wikipedia, 
+           https://en.wikipedia.org/wiki/Preconditioner
+    .. [2] "Conjugate gradient squared", Wikipedia,
+           https://en.wikipedia.org/wiki/Conjugate_gradient_squared_method
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import cgs
+    >>> R = np.array([[4, 2, 0, 1],
+    ...               [3, 0, 0, 2],
+    ...               [0, 1, 1, 1],
+    ...               [0, 2, 1, 0]])
+    >>> A = csc_array(R)
+    >>> b = np.array([-1, -0.5, -1, 2])
+    >>> x, exit_code = cgs(A, b)
+    >>> print(exit_code)  # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('cgs', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    n = len(b)
+
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    if maxiter is None:
+        maxiter = n*10
+
+    matvec = A.matvec
+    psolve = M.matvec
+
+    rhotol = np.finfo(x.dtype.char).eps**2
+
+    r = b - matvec(x) if x.any() else b.copy()
+
+    rtilde = r.copy()
+    bnorm = np.linalg.norm(b)
+    if bnorm == 0:
+        bnorm = 1
+
+    # Dummy values to initialize vars, silence linter warnings
+    rho_prev, p, u, q = None, None, None, None
+
+    for iteration in range(maxiter):
+        rnorm = np.linalg.norm(r)
+        if rnorm < atol:  # Are we done?
+            return postprocess(x), 0
+
+        rho_cur = dotprod(rtilde, r)
+        if np.abs(rho_cur) < rhotol:  # Breakdown case
+            return postprocess, -10
+
+        if iteration > 0:
+            beta = rho_cur / rho_prev
+
+            # u = r + beta * q
+            # p = u + beta * (q + beta * p);
+            u[:] = r[:]
+            u += beta*q
+
+            p *= beta
+            p += q
+            p *= beta
+            p += u
+
+        else:  # First spin
+            p = r.copy()
+            u = r.copy()
+            q = np.empty_like(r)
+
+        phat = psolve(p)
+        vhat = matvec(phat)
+        rv = dotprod(rtilde, vhat)
+
+        if rv == 0:  # Dot product breakdown
+            return postprocess(x), -11
+
+        alpha = rho_cur / rv
+        q[:] = u[:]
+        q -= alpha*vhat
+        uhat = psolve(u + q)
+        x += alpha*uhat
+
+        # Due to numerical error build-up the actual residual is computed
+        # instead of the following two lines that were in the original
+        # FORTRAN templates, still using a single matvec.
+
+        # qhat = matvec(uhat)
+        # r -= alpha*qhat
+        r = b - matvec(x)
+
+        rho_prev = rho_cur
+
+        if callback:
+            callback(x)
+
+    else:  # for loop exhausted
+        # Return incomplete progress
+        return postprocess(x), maxiter
+
+
+def gmres(A, b, x0=None, *, rtol=1e-5, atol=0., restart=None, maxiter=None, M=None,
+          callback=None, callback_type=None):
+    """
+    Use Generalized Minimal RESidual iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution (a vector of zeros by default).
+    atol, rtol : float
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    restart : int, optional
+        Number of iterations between restarts. Larger values increase
+        iteration cost, but may be necessary for convergence.
+        If omitted, ``min(20, n)`` is used.
+    maxiter : int, optional
+        Maximum number of iterations (restart cycles).  Iteration will stop
+        after maxiter steps even if the specified tolerance has not been
+        achieved. See `callback_type`.
+    M : {sparse array, ndarray, LinearOperator}
+        Inverse of the preconditioner of `A`.  `M` should approximate the
+        inverse of `A` and be easy to solve for (see Notes).  Effective
+        preconditioning dramatically improves the rate of convergence,
+        which implies that fewer iterations are needed to reach a given
+        error tolerance.  By default, no preconditioner is used.
+        In this implementation, left preconditioning is used,
+        and the preconditioned residual is minimized. However, the final
+        convergence is tested with respect to the ``b - A @ x`` residual.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(args)``, where ``args`` are selected by `callback_type`.
+    callback_type : {'x', 'pr_norm', 'legacy'}, optional
+        Callback function argument requested:
+          - ``x``: current iterate (ndarray), called on every restart
+          - ``pr_norm``: relative (preconditioned) residual norm (float),
+            called on every inner iteration
+          - ``legacy`` (default): same as ``pr_norm``, but also changes the
+            meaning of `maxiter` to count inner iterations instead of restart
+            cycles.
+
+        This keyword has no effect if `callback` is not set.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : int
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+
+    See Also
+    --------
+    LinearOperator
+
+    Notes
+    -----
+    A preconditioner, P, is chosen such that P is close to A but easy to solve
+    for. The preconditioner parameter required by this routine is
+    ``M = P^-1``. The inverse should preferably not be calculated
+    explicitly.  Rather, use the following template to produce M::
+
+      # Construct a linear operator that computes P^-1 @ x.
+      import scipy.sparse.linalg as spla
+      M_x = lambda x: spla.spsolve(P, x)
+      M = spla.LinearOperator((n, n), M_x)
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import gmres
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
+    >>> b = np.array([2, 4, -1], dtype=float)
+    >>> x, exitCode = gmres(A, b, atol=1e-5)
+    >>> print(exitCode)            # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    if callback is not None and callback_type is None:
+        # Warn about 'callback_type' semantic changes.
+        # Probably should be removed only in far future, Scipy 2.0 or so.
+        msg = ("scipy.sparse.linalg.gmres called without specifying "
+               "`callback_type`. The default value will be changed in"
+               " a future release. For compatibility, specify a value "
+               "for `callback_type` explicitly, e.g., "
+               "``gmres(..., callback_type='pr_norm')``, or to retain the "
+               "old behavior ``gmres(..., callback_type='legacy')``"
+               )
+        warnings.warn(msg, category=DeprecationWarning, stacklevel=3)
+
+    if callback_type is None:
+        callback_type = 'legacy'
+
+    if callback_type not in ('x', 'pr_norm', 'legacy'):
+        raise ValueError(f"Unknown callback_type: {callback_type!r}")
+
+    if callback is None:
+        callback_type = None
+
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+    matvec = A.matvec
+    psolve = M.matvec
+    n = len(b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('gmres', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    eps = np.finfo(x.dtype.char).eps
+
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    if maxiter is None:
+        maxiter = n*10
+
+    if restart is None:
+        restart = 20
+    restart = min(restart, n)
+
+    Mb_nrm2 = np.linalg.norm(psolve(b))
+
+    # ====================================================
+    # =========== Tolerance control from gh-8400 =========
+    # ====================================================
+    # Tolerance passed to GMRESREVCOM applies to the inner
+    # iteration and deals with the left-preconditioned
+    # residual.
+    ptol_max_factor = 1.
+    ptol = Mb_nrm2 * min(ptol_max_factor, atol / bnrm2)
+    presid = 0.
+    # ====================================================
+    lartg = get_lapack_funcs('lartg', dtype=x.dtype)
+
+    # allocate internal variables
+    v = np.empty([restart+1, n], dtype=x.dtype)
+    h = np.zeros([restart, restart+1], dtype=x.dtype)
+    givens = np.zeros([restart, 2], dtype=x.dtype)
+
+    # legacy iteration count
+    inner_iter = 0
+
+    for iteration in range(maxiter):
+        if iteration == 0:
+            r = b - matvec(x) if x.any() else b.copy()
+            if np.linalg.norm(r) < atol:  # Are we done?
+                return postprocess(x), 0
+
+        v[0, :] = psolve(r)
+        tmp = np.linalg.norm(v[0, :])
+        v[0, :] *= (1 / tmp)
+        # RHS of the Hessenberg problem
+        S = np.zeros(restart+1, dtype=x.dtype)
+        S[0] = tmp
+
+        breakdown = False
+        for col in range(restart):
+            av = matvec(v[col, :])
+            w = psolve(av)
+
+            # Modified Gram-Schmidt
+            h0 = np.linalg.norm(w)
+            for k in range(col+1):
+                tmp = dotprod(v[k, :], w)
+                h[col, k] = tmp
+                w -= tmp*v[k, :]
+
+            h1 = np.linalg.norm(w)
+            h[col, col + 1] = h1
+            v[col + 1, :] = w[:]
+
+            # Exact solution indicator
+            if h1 <= eps*h0:
+                h[col, col + 1] = 0
+                breakdown = True
+            else:
+                v[col + 1, :] *= (1 / h1)
+
+            # apply past Givens rotations to current h column
+            for k in range(col):
+                c, s = givens[k, 0], givens[k, 1]
+                n0, n1 = h[col, [k, k+1]]
+                h[col, [k, k + 1]] = [c*n0 + s*n1, -s.conj()*n0 + c*n1]
+
+            # get and apply current rotation to h and S
+            c, s, mag = lartg(h[col, col], h[col, col+1])
+            givens[col, :] = [c, s]
+            h[col, [col, col+1]] = mag, 0
+
+            # S[col+1] component is always 0
+            tmp = -np.conjugate(s)*S[col]
+            S[[col, col + 1]] = [c*S[col], tmp]
+            presid = np.abs(tmp)
+            inner_iter += 1
+
+            if callback_type in ('legacy', 'pr_norm'):
+                callback(presid / bnrm2)
+            # Legacy behavior
+            if callback_type == 'legacy' and inner_iter == maxiter:
+                break
+            if presid <= ptol or breakdown:
+                break
+
+        # Solve h(col, col) upper triangular system and allow pseudo-solve
+        # singular cases as in (but without the f2py copies):
+        # y = trsv(h[:col+1, :col+1].T, S[:col+1])
+
+        if h[col, col] == 0:
+            S[col] = 0
+
+        y = np.zeros([col+1], dtype=x.dtype)
+        y[:] = S[:col+1]
+        for k in range(col, 0, -1):
+            if y[k] != 0:
+                y[k] /= h[k, k]
+                tmp = y[k]
+                y[:k] -= tmp*h[k, :k]
+        if y[0] != 0:
+            y[0] /= h[0, 0]
+
+        x += y @ v[:col+1, :]
+
+        r = b - matvec(x)
+        rnorm = np.linalg.norm(r)
+
+        # Legacy exit
+        if callback_type == 'legacy' and inner_iter == maxiter:
+            return postprocess(x), 0 if rnorm <= atol else maxiter
+
+        if callback_type == 'x':
+            callback(x)
+
+        if rnorm <= atol:
+            break
+        elif breakdown:
+            # Reached breakdown (= exact solution), but the external
+            # tolerance check failed. Bail out with failure.
+            break
+        elif presid <= ptol:
+            # Inner loop passed but outer didn't
+            ptol_max_factor = max(eps, 0.25 * ptol_max_factor)
+        else:
+            ptol_max_factor = min(1.0, 1.5 * ptol_max_factor)
+
+        ptol = presid * min(ptol_max_factor, atol / rnorm)
+
+    info = 0 if (rnorm <= atol) else maxiter
+    return postprocess(x), info
+
+
+def qmr(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M1=None, M2=None,
+        callback=None):
+    """Use Quasi-Minimal Residual iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real-valued N-by-N matrix of the linear system.
+        Alternatively, ``A`` can be a linear operator which can
+        produce ``Ax`` and ``A^T x`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    atol, rtol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``atol=0.`` and ``rtol=1e-5``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M1 : {sparse array, ndarray, LinearOperator}
+        Left preconditioner for A.
+    M2 : {sparse array, ndarray, LinearOperator}
+        Right preconditioner for A. Used together with the left
+        preconditioner M1.  The matrix M1@A@M2 should have better
+        conditioned than A alone.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as callback(xk), where xk is the current solution vector.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+            <0 : parameter breakdown
+
+    See Also
+    --------
+    LinearOperator
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import qmr
+    >>> A = csc_array([[3., 2., 0.], [1., -1., 0.], [0., 5., 1.]])
+    >>> b = np.array([2., 4., -1.])
+    >>> x, exitCode = qmr(A, b, atol=1e-5)
+    >>> print(exitCode)            # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A_ = A
+    A, M, x, b, postprocess = make_system(A, None, x0, b)
+    bnrm2 = np.linalg.norm(b)
+
+    atol, _ = _get_atol_rtol('qmr', bnrm2, atol, rtol)
+
+    if bnrm2 == 0:
+        return postprocess(b), 0
+
+    if M1 is None and M2 is None:
+        if hasattr(A_, 'psolve'):
+            def left_psolve(b):
+                return A_.psolve(b, 'left')
+
+            def right_psolve(b):
+                return A_.psolve(b, 'right')
+
+            def left_rpsolve(b):
+                return A_.rpsolve(b, 'left')
+
+            def right_rpsolve(b):
+                return A_.rpsolve(b, 'right')
+            M1 = LinearOperator(A.shape,
+                                matvec=left_psolve,
+                                rmatvec=left_rpsolve)
+            M2 = LinearOperator(A.shape,
+                                matvec=right_psolve,
+                                rmatvec=right_rpsolve)
+        else:
+            def id(b):
+                return b
+            M1 = LinearOperator(A.shape, matvec=id, rmatvec=id)
+            M2 = LinearOperator(A.shape, matvec=id, rmatvec=id)
+
+    n = len(b)
+    if maxiter is None:
+        maxiter = n*10
+
+    dotprod = np.vdot if np.iscomplexobj(x) else np.dot
+
+    rhotol = np.finfo(x.dtype.char).eps
+    betatol = rhotol
+    gammatol = rhotol
+    deltatol = rhotol
+    epsilontol = rhotol
+    xitol = rhotol
+
+    r = b - A.matvec(x) if x.any() else b.copy()
+
+    vtilde = r.copy()
+    y = M1.matvec(vtilde)
+    rho = np.linalg.norm(y)
+    wtilde = r.copy()
+    z = M2.rmatvec(wtilde)
+    xi = np.linalg.norm(z)
+    gamma, eta, theta = 1, -1, 0
+    v = np.empty_like(vtilde)
+    w = np.empty_like(wtilde)
+
+    # Dummy values to initialize vars, silence linter warnings
+    epsilon, q, d, p, s = None, None, None, None, None
+
+    for iteration in range(maxiter):
+        if np.linalg.norm(r) < atol:  # Are we done?
+            return postprocess(x), 0
+        if np.abs(rho) < rhotol:  # rho breakdown
+            return postprocess(x), -10
+        if np.abs(xi) < xitol:  # xi breakdown
+            return postprocess(x), -15
+
+        v[:] = vtilde[:]
+        v *= (1 / rho)
+        y *= (1 / rho)
+        w[:] = wtilde[:]
+        w *= (1 / xi)
+        z *= (1 / xi)
+        delta = dotprod(z, y)
+
+        if np.abs(delta) < deltatol:  # delta breakdown
+            return postprocess(x), -13
+
+        ytilde = M2.matvec(y)
+        ztilde = M1.rmatvec(z)
+
+        if iteration > 0:
+            ytilde -= (xi * delta / epsilon) * p
+            p[:] = ytilde[:]
+            ztilde -= (rho * (delta / epsilon).conj()) * q
+            q[:] = ztilde[:]
+        else:  # First spin
+            p = ytilde.copy()
+            q = ztilde.copy()
+
+        ptilde = A.matvec(p)
+        epsilon = dotprod(q, ptilde)
+        if np.abs(epsilon) < epsilontol:  # epsilon breakdown
+            return postprocess(x), -14
+
+        beta = epsilon / delta
+        if np.abs(beta) < betatol:  # beta breakdown
+            return postprocess(x), -11
+
+        vtilde[:] = ptilde[:]
+        vtilde -= beta*v
+        y = M1.matvec(vtilde)
+
+        rho_prev = rho
+        rho = np.linalg.norm(y)
+        wtilde[:] = w[:]
+        wtilde *= - beta.conj()
+        wtilde += A.rmatvec(q)
+        z = M2.rmatvec(wtilde)
+        xi = np.linalg.norm(z)
+        gamma_prev = gamma
+        theta_prev = theta
+        theta = rho / (gamma_prev * np.abs(beta))
+        gamma = 1 / np.sqrt(1 + theta**2)
+
+        if np.abs(gamma) < gammatol:  # gamma breakdown
+            return postprocess(x), -12
+
+        eta *= -(rho_prev / beta) * (gamma / gamma_prev)**2
+
+        if iteration > 0:
+            d *= (theta_prev * gamma) ** 2
+            d += eta*p
+            s *= (theta_prev * gamma) ** 2
+            s += eta*ptilde
+        else:
+            d = p.copy()
+            d *= eta
+            s = ptilde.copy()
+            s *= eta
+
+        x += d
+        r -= s
+
+        if callback:
+            callback(x)
+
+    else:  # for loop exhausted
+        # Return incomplete progress
+        return postprocess(x), maxiter
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lgmres.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lgmres.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce368e81a07f282d091cd9bc8281c98e720a206b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lgmres.py
@@ -0,0 +1,230 @@
+# Copyright (C) 2009, Pauli Virtanen 
+# Distributed under the same license as SciPy.
+
+import numpy as np
+from numpy.linalg import LinAlgError
+from scipy.linalg import get_blas_funcs
+from .iterative import _get_atol_rtol
+from .utils import make_system
+
+from ._gcrotmk import _fgmres
+
+__all__ = ['lgmres']
+
+
+def lgmres(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=1000, M=None, callback=None,
+           inner_m=30, outer_k=3, outer_v=None, store_outer_Av=True,
+           prepend_outer_v=False):
+    """
+    Solve a matrix equation using the LGMRES algorithm.
+
+    The LGMRES algorithm [1]_ [2]_ is designed to avoid some problems
+    in the convergence in restarted GMRES, and often converges in fewer
+    iterations.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, ``A`` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : ndarray
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``rtol=1e-5``, the default for ``atol`` is ``0.0``.
+    maxiter : int, optional
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}, optional
+        Preconditioner for A.  The preconditioner should approximate the
+        inverse of A.  Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function, optional
+        User-supplied function to call after each iteration.  It is called
+        as callback(xk), where xk is the current solution vector.
+    inner_m : int, optional
+        Number of inner GMRES iterations per each outer iteration.
+    outer_k : int, optional
+        Number of vectors to carry between inner GMRES iterations.
+        According to [1]_, good values are in the range of 1...3.
+        However, note that if you want to use the additional vectors to
+        accelerate solving multiple similar problems, larger values may
+        be beneficial.
+    outer_v : list of tuples, optional
+        List containing tuples ``(v, Av)`` of vectors and corresponding
+        matrix-vector products, used to augment the Krylov subspace, and
+        carried between inner GMRES iterations. The element ``Av`` can
+        be `None` if the matrix-vector product should be re-evaluated.
+        This parameter is modified in-place by `lgmres`, and can be used
+        to pass "guess" vectors in and out of the algorithm when solving
+        similar problems.
+    store_outer_Av : bool, optional
+        Whether LGMRES should store also A@v in addition to vectors `v`
+        in the `outer_v` list. Default is True.
+    prepend_outer_v : bool, optional
+        Whether to put outer_v augmentation vectors before Krylov iterates.
+        In standard LGMRES, prepend_outer_v=False.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : int
+        Provides convergence information:
+
+            - 0  : successful exit
+            - >0 : convergence to tolerance not achieved, number of iterations
+            - <0 : illegal input or breakdown
+
+    Notes
+    -----
+    The LGMRES algorithm [1]_ [2]_ is designed to avoid the
+    slowing of convergence in restarted GMRES, due to alternating
+    residual vectors. Typically, it often outperforms GMRES(m) of
+    comparable memory requirements by some measure, or at least is not
+    much worse.
+
+    Another advantage in this algorithm is that you can supply it with
+    'guess' vectors in the `outer_v` argument that augment the Krylov
+    subspace. If the solution lies close to the span of these vectors,
+    the algorithm converges faster. This can be useful if several very
+    similar matrices need to be inverted one after another, such as in
+    Newton-Krylov iteration where the Jacobian matrix often changes
+    little in the nonlinear steps.
+
+    References
+    ----------
+    .. [1] A.H. Baker and E.R. Jessup and T. Manteuffel, "A Technique for
+             Accelerating the Convergence of Restarted GMRES", SIAM J. Matrix
+             Anal. Appl. 26, 962 (2005).
+    .. [2] A.H. Baker, "On Improving the Performance of the Linear Solver
+             restarted GMRES", PhD thesis, University of Colorado (2003).
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import lgmres
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
+    >>> b = np.array([2, 4, -1], dtype=float)
+    >>> x, exitCode = lgmres(A, b, atol=1e-5)
+    >>> print(exitCode)            # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+    A,M,x,b,postprocess = make_system(A,M,x0,b)
+
+    if not np.isfinite(b).all():
+        raise ValueError("RHS must contain only finite numbers")
+
+    matvec = A.matvec
+    psolve = M.matvec
+
+    if outer_v is None:
+        outer_v = []
+
+    axpy, dot, scal = None, None, None
+    nrm2 = get_blas_funcs('nrm2', [b])
+
+    b_norm = nrm2(b)
+
+    # we call this to get the right atol/rtol and raise errors as necessary
+    atol, rtol = _get_atol_rtol('lgmres', b_norm, atol, rtol)
+
+    if b_norm == 0:
+        x = b
+        return (postprocess(x), 0)
+
+    ptol_max_factor = 1.0
+
+    for k_outer in range(maxiter):
+        r_outer = matvec(x) - b
+
+        # -- callback
+        if callback is not None:
+            callback(x)
+
+        # -- determine input type routines
+        if axpy is None:
+            if np.iscomplexobj(r_outer) and not np.iscomplexobj(x):
+                x = x.astype(r_outer.dtype)
+            axpy, dot, scal, nrm2 = get_blas_funcs(['axpy', 'dot', 'scal', 'nrm2'],
+                                                   (x, r_outer))
+
+        # -- check stopping condition
+        r_norm = nrm2(r_outer)
+        if r_norm <= max(atol, rtol * b_norm):
+            break
+
+        # -- inner LGMRES iteration
+        v0 = -psolve(r_outer)
+        inner_res_0 = nrm2(v0)
+
+        if inner_res_0 == 0:
+            rnorm = nrm2(r_outer)
+            raise RuntimeError("Preconditioner returned a zero vector; "
+                               f"|v| ~ {rnorm:.1g}, |M v| = 0")
+
+        v0 = scal(1.0/inner_res_0, v0)
+
+        ptol = min(ptol_max_factor, max(atol, rtol*b_norm)/r_norm)
+
+        try:
+            Q, R, B, vs, zs, y, pres = _fgmres(matvec,
+                                               v0,
+                                               inner_m,
+                                               lpsolve=psolve,
+                                               atol=ptol,
+                                               outer_v=outer_v,
+                                               prepend_outer_v=prepend_outer_v)
+            y *= inner_res_0
+            if not np.isfinite(y).all():
+                # Overflow etc. in computation. There's no way to
+                # recover from this, so we have to bail out.
+                raise LinAlgError()
+        except LinAlgError:
+            # Floating point over/underflow, non-finite result from
+            # matmul etc. -- report failure.
+            return postprocess(x), k_outer + 1
+
+        # Inner loop tolerance control
+        if pres > ptol:
+            ptol_max_factor = min(1.0, 1.5 * ptol_max_factor)
+        else:
+            ptol_max_factor = max(1e-16, 0.25 * ptol_max_factor)
+
+        # -- GMRES terminated: eval solution
+        dx = zs[0]*y[0]
+        for w, yc in zip(zs[1:], y[1:]):
+            dx = axpy(w, dx, dx.shape[0], yc)  # dx += w*yc
+
+        # -- Store LGMRES augmentation vectors
+        nx = nrm2(dx)
+        if nx > 0:
+            if store_outer_Av:
+                q = Q.dot(R.dot(y))
+                ax = vs[0]*q[0]
+                for v, qc in zip(vs[1:], q[1:]):
+                    ax = axpy(v, ax, ax.shape[0], qc)
+                outer_v.append((dx/nx, ax/nx))
+            else:
+                outer_v.append((dx/nx, None))
+
+        # -- Retain only a finite number of augmentation vectors
+        while len(outer_v) > outer_k:
+            del outer_v[0]
+
+        # -- Apply step
+        x += dx
+    else:
+        # didn't converge ...
+        return postprocess(x), maxiter
+
+    return postprocess(x), 0
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsmr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsmr.py
new file mode 100644
index 0000000000000000000000000000000000000000..97eb734aa64c3145044a81e97b0e1b8df9506ce2
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsmr.py
@@ -0,0 +1,486 @@
+"""
+Copyright (C) 2010 David Fong and Michael Saunders
+
+LSMR uses an iterative method.
+
+07 Jun 2010: Documentation updated
+03 Jun 2010: First release version in Python
+
+David Chin-lung Fong            clfong@stanford.edu
+Institute for Computational and Mathematical Engineering
+Stanford University
+
+Michael Saunders                saunders@stanford.edu
+Systems Optimization Laboratory
+Dept of MS&E, Stanford University.
+
+"""
+
+__all__ = ['lsmr']
+
+from numpy import zeros, inf, atleast_1d, result_type
+from numpy.linalg import norm
+from math import sqrt
+from scipy.sparse.linalg._interface import aslinearoperator
+
+from scipy.sparse.linalg._isolve.lsqr import _sym_ortho
+
+
+def lsmr(A, b, damp=0.0, atol=1e-6, btol=1e-6, conlim=1e8,
+         maxiter=None, show=False, x0=None):
+    """Iterative solver for least-squares problems.
+
+    lsmr solves the system of linear equations ``Ax = b``. If the system
+    is inconsistent, it solves the least-squares problem ``min ||b - Ax||_2``.
+    ``A`` is a rectangular matrix of dimension m-by-n, where all cases are
+    allowed: m = n, m > n, or m < n. ``b`` is a vector of length m.
+    The matrix A may be dense or sparse (usually sparse).
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        Matrix A in the linear system.
+        Alternatively, ``A`` can be a linear operator which can
+        produce ``Ax`` and ``A^H x`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : array_like, shape (m,)
+        Vector ``b`` in the linear system.
+    damp : float
+        Damping factor for regularized least-squares. `lsmr` solves
+        the regularized least-squares problem::
+
+         min ||(b) - (  A   )x||
+             ||(0)   (damp*I) ||_2
+
+        where damp is a scalar.  If damp is None or 0, the system
+        is solved without regularization. Default is 0.
+    atol, btol : float, optional
+        Stopping tolerances. `lsmr` continues iterations until a
+        certain backward error estimate is smaller than some quantity
+        depending on atol and btol.  Let ``r = b - Ax`` be the
+        residual vector for the current approximate solution ``x``.
+        If ``Ax = b`` seems to be consistent, `lsmr` terminates
+        when ``norm(r) <= atol * norm(A) * norm(x) + btol * norm(b)``.
+        Otherwise, `lsmr` terminates when ``norm(A^H r) <=
+        atol * norm(A) * norm(r)``.  If both tolerances are 1.0e-6 (default),
+        the final ``norm(r)`` should be accurate to about 6
+        digits. (The final ``x`` will usually have fewer correct digits,
+        depending on ``cond(A)`` and the size of LAMBDA.)  If `atol`
+        or `btol` is None, a default value of 1.0e-6 will be used.
+        Ideally, they should be estimates of the relative error in the
+        entries of ``A`` and ``b`` respectively.  For example, if the entries
+        of ``A`` have 7 correct digits, set ``atol = 1e-7``. This prevents
+        the algorithm from doing unnecessary work beyond the
+        uncertainty of the input data.
+    conlim : float, optional
+        `lsmr` terminates if an estimate of ``cond(A)`` exceeds
+        `conlim`.  For compatible systems ``Ax = b``, conlim could be
+        as large as 1.0e+12 (say).  For least-squares problems,
+        `conlim` should be less than 1.0e+8. If `conlim` is None, the
+        default value is 1e+8.  Maximum precision can be obtained by
+        setting ``atol = btol = conlim = 0``, but the number of
+        iterations may then be excessive. Default is 1e8.
+    maxiter : int, optional
+        `lsmr` terminates if the number of iterations reaches
+        `maxiter`.  The default is ``maxiter = min(m, n)``.  For
+        ill-conditioned systems, a larger value of `maxiter` may be
+        needed. Default is False.
+    show : bool, optional
+        Print iterations logs if ``show=True``. Default is False.
+    x0 : array_like, shape (n,), optional
+        Initial guess of ``x``, if None zeros are used. Default is None.
+
+        .. versionadded:: 1.0.0
+
+    Returns
+    -------
+    x : ndarray of float
+        Least-square solution returned.
+    istop : int
+        istop gives the reason for stopping::
+
+          istop   = 0 means x=0 is a solution.  If x0 was given, then x=x0 is a
+                      solution.
+                  = 1 means x is an approximate solution to A@x = B,
+                      according to atol and btol.
+                  = 2 means x approximately solves the least-squares problem
+                      according to atol.
+                  = 3 means COND(A) seems to be greater than CONLIM.
+                  = 4 is the same as 1 with atol = btol = eps (machine
+                      precision)
+                  = 5 is the same as 2 with atol = eps.
+                  = 6 is the same as 3 with CONLIM = 1/eps.
+                  = 7 means ITN reached maxiter before the other stopping
+                      conditions were satisfied.
+
+    itn : int
+        Number of iterations used.
+    normr : float
+        ``norm(b-Ax)``
+    normar : float
+        ``norm(A^H (b - Ax))``
+    norma : float
+        ``norm(A)``
+    conda : float
+        Condition number of A.
+    normx : float
+        ``norm(x)``
+
+    Notes
+    -----
+
+    .. versionadded:: 0.11.0
+
+    References
+    ----------
+    .. [1] D. C.-L. Fong and M. A. Saunders,
+           "LSMR: An iterative algorithm for sparse least-squares problems",
+           SIAM J. Sci. Comput., vol. 33, pp. 2950-2971, 2011.
+           :arxiv:`1006.0758`
+    .. [2] LSMR Software, https://web.stanford.edu/group/SOL/software/lsmr/
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import lsmr
+    >>> A = csc_array([[1., 0.], [1., 1.], [0., 1.]], dtype=float)
+
+    The first example has the trivial solution ``[0, 0]``
+
+    >>> b = np.array([0., 0., 0.], dtype=float)
+    >>> x, istop, itn, normr = lsmr(A, b)[:4]
+    >>> istop
+    0
+    >>> x
+    array([0., 0.])
+
+    The stopping code ``istop=0`` returned indicates that a vector of zeros was
+    found as a solution. The returned solution `x` indeed contains
+    ``[0., 0.]``. The next example has a non-trivial solution:
+
+    >>> b = np.array([1., 0., -1.], dtype=float)
+    >>> x, istop, itn, normr = lsmr(A, b)[:4]
+    >>> istop
+    1
+    >>> x
+    array([ 1., -1.])
+    >>> itn
+    1
+    >>> normr
+    4.440892098500627e-16
+
+    As indicated by ``istop=1``, `lsmr` found a solution obeying the tolerance
+    limits. The given solution ``[1., -1.]`` obviously solves the equation. The
+    remaining return values include information about the number of iterations
+    (`itn=1`) and the remaining difference of left and right side of the solved
+    equation.
+    The final example demonstrates the behavior in the case where there is no
+    solution for the equation:
+
+    >>> b = np.array([1., 0.01, -1.], dtype=float)
+    >>> x, istop, itn, normr = lsmr(A, b)[:4]
+    >>> istop
+    2
+    >>> x
+    array([ 1.00333333, -0.99666667])
+    >>> A.dot(x)-b
+    array([ 0.00333333, -0.00333333,  0.00333333])
+    >>> normr
+    0.005773502691896255
+
+    `istop` indicates that the system is inconsistent and thus `x` is rather an
+    approximate solution to the corresponding least-squares problem. `normr`
+    contains the minimal distance that was found.
+    """
+
+    A = aslinearoperator(A)
+    b = atleast_1d(b)
+    if b.ndim > 1:
+        b = b.squeeze()
+
+    msg = ('The exact solution is x = 0, or x = x0, if x0 was given  ',
+           'Ax - b is small enough, given atol, btol                  ',
+           'The least-squares solution is good enough, given atol     ',
+           'The estimate of cond(Abar) has exceeded conlim            ',
+           'Ax - b is small enough for this machine                   ',
+           'The least-squares solution is good enough for this machine',
+           'Cond(Abar) seems to be too large for this machine         ',
+           'The iteration limit has been reached                      ')
+
+    hdg1 = '   itn      x(1)       norm r    norm Ar'
+    hdg2 = ' compatible   LS      norm A   cond A'
+    pfreq = 20   # print frequency (for repeating the heading)
+    pcount = 0   # print counter
+
+    m, n = A.shape
+
+    # stores the num of singular values
+    minDim = min([m, n])
+
+    if maxiter is None:
+        maxiter = minDim
+
+    if x0 is None:
+        dtype = result_type(A, b, float)
+    else:
+        dtype = result_type(A, b, x0, float)
+
+    if show:
+        print(' ')
+        print('LSMR            Least-squares solution of  Ax = b\n')
+        print(f'The matrix A has {m} rows and {n} columns')
+        print(f'damp = {damp:20.14e}\n')
+        print(f'atol = {atol:8.2e}                 conlim = {conlim:8.2e}\n')
+        print(f'btol = {btol:8.2e}             maxiter = {maxiter:8g}\n')
+
+    u = b
+    normb = norm(b)
+    if x0 is None:
+        x = zeros(n, dtype)
+        beta = normb.copy()
+    else:
+        x = atleast_1d(x0.copy())
+        u = u - A.matvec(x)
+        beta = norm(u)
+
+    if beta > 0:
+        u = (1 / beta) * u
+        v = A.rmatvec(u)
+        alpha = norm(v)
+    else:
+        v = zeros(n, dtype)
+        alpha = 0
+
+    if alpha > 0:
+        v = (1 / alpha) * v
+
+    # Initialize variables for 1st iteration.
+
+    itn = 0
+    zetabar = alpha * beta
+    alphabar = alpha
+    rho = 1
+    rhobar = 1
+    cbar = 1
+    sbar = 0
+
+    h = v.copy()
+    hbar = zeros(n, dtype)
+
+    # Initialize variables for estimation of ||r||.
+
+    betadd = beta
+    betad = 0
+    rhodold = 1
+    tautildeold = 0
+    thetatilde = 0
+    zeta = 0
+    d = 0
+
+    # Initialize variables for estimation of ||A|| and cond(A)
+
+    normA2 = alpha * alpha
+    maxrbar = 0
+    minrbar = 1e+100
+    normA = sqrt(normA2)
+    condA = 1
+    normx = 0
+
+    # Items for use in stopping rules, normb set earlier
+    istop = 0
+    ctol = 0
+    if conlim > 0:
+        ctol = 1 / conlim
+    normr = beta
+
+    # Reverse the order here from the original matlab code because
+    # there was an error on return when arnorm==0
+    normar = alpha * beta
+    if normar == 0:
+        if show:
+            print(msg[0])
+        return x, istop, itn, normr, normar, normA, condA, normx
+
+    if normb == 0:
+        x[()] = 0
+        return x, istop, itn, normr, normar, normA, condA, normx
+
+    if show:
+        print(' ')
+        print(hdg1, hdg2)
+        test1 = 1
+        test2 = alpha / beta
+        str1 = f'{itn:6g} {x[0]:12.5e}'
+        str2 = f' {normr:10.3e} {normar:10.3e}'
+        str3 = f'  {test1:8.1e} {test2:8.1e}'
+        print(''.join([str1, str2, str3]))
+
+    # Main iteration loop.
+    while itn < maxiter:
+        itn = itn + 1
+
+        # Perform the next step of the bidiagonalization to obtain the
+        # next  beta, u, alpha, v.  These satisfy the relations
+        #         beta*u  =  A@v   -  alpha*u,
+        #        alpha*v  =  A'@u  -  beta*v.
+
+        u *= -alpha
+        u += A.matvec(v)
+        beta = norm(u)
+
+        if beta > 0:
+            u *= (1 / beta)
+            v *= -beta
+            v += A.rmatvec(u)
+            alpha = norm(v)
+            if alpha > 0:
+                v *= (1 / alpha)
+
+        # At this point, beta = beta_{k+1}, alpha = alpha_{k+1}.
+
+        # Construct rotation Qhat_{k,2k+1}.
+
+        chat, shat, alphahat = _sym_ortho(alphabar, damp)
+
+        # Use a plane rotation (Q_i) to turn B_i to R_i
+
+        rhoold = rho
+        c, s, rho = _sym_ortho(alphahat, beta)
+        thetanew = s*alpha
+        alphabar = c*alpha
+
+        # Use a plane rotation (Qbar_i) to turn R_i^T to R_i^bar
+
+        rhobarold = rhobar
+        zetaold = zeta
+        thetabar = sbar * rho
+        rhotemp = cbar * rho
+        cbar, sbar, rhobar = _sym_ortho(cbar * rho, thetanew)
+        zeta = cbar * zetabar
+        zetabar = - sbar * zetabar
+
+        # Update h, h_hat, x.
+
+        hbar *= - (thetabar * rho / (rhoold * rhobarold))
+        hbar += h
+        x += (zeta / (rho * rhobar)) * hbar
+        h *= - (thetanew / rho)
+        h += v
+
+        # Estimate of ||r||.
+
+        # Apply rotation Qhat_{k,2k+1}.
+        betaacute = chat * betadd
+        betacheck = -shat * betadd
+
+        # Apply rotation Q_{k,k+1}.
+        betahat = c * betaacute
+        betadd = -s * betaacute
+
+        # Apply rotation Qtilde_{k-1}.
+        # betad = betad_{k-1} here.
+
+        thetatildeold = thetatilde
+        ctildeold, stildeold, rhotildeold = _sym_ortho(rhodold, thetabar)
+        thetatilde = stildeold * rhobar
+        rhodold = ctildeold * rhobar
+        betad = - stildeold * betad + ctildeold * betahat
+
+        # betad   = betad_k here.
+        # rhodold = rhod_k  here.
+
+        tautildeold = (zetaold - thetatildeold * tautildeold) / rhotildeold
+        taud = (zeta - thetatilde * tautildeold) / rhodold
+        d = d + betacheck * betacheck
+        normr = sqrt(d + (betad - taud)**2 + betadd * betadd)
+
+        # Estimate ||A||.
+        normA2 = normA2 + beta * beta
+        normA = sqrt(normA2)
+        normA2 = normA2 + alpha * alpha
+
+        # Estimate cond(A).
+        maxrbar = max(maxrbar, rhobarold)
+        if itn > 1:
+            minrbar = min(minrbar, rhobarold)
+        condA = max(maxrbar, rhotemp) / min(minrbar, rhotemp)
+
+        # Test for convergence.
+
+        # Compute norms for convergence testing.
+        normar = abs(zetabar)
+        normx = norm(x)
+
+        # Now use these norms to estimate certain other quantities,
+        # some of which will be small near a solution.
+
+        test1 = normr / normb
+        if (normA * normr) != 0:
+            test2 = normar / (normA * normr)
+        else:
+            test2 = inf
+        test3 = 1 / condA
+        t1 = test1 / (1 + normA * normx / normb)
+        rtol = btol + atol * normA * normx / normb
+
+        # The following tests guard against extremely small values of
+        # atol, btol or ctol.  (The user may have set any or all of
+        # the parameters atol, btol, conlim  to 0.)
+        # The effect is equivalent to the normAl tests using
+        # atol = eps,  btol = eps,  conlim = 1/eps.
+
+        if itn >= maxiter:
+            istop = 7
+        if 1 + test3 <= 1:
+            istop = 6
+        if 1 + test2 <= 1:
+            istop = 5
+        if 1 + t1 <= 1:
+            istop = 4
+
+        # Allow for tolerances set by the user.
+
+        if test3 <= ctol:
+            istop = 3
+        if test2 <= atol:
+            istop = 2
+        if test1 <= rtol:
+            istop = 1
+
+        # See if it is time to print something.
+
+        if show:
+            if (n <= 40) or (itn <= 10) or (itn >= maxiter - 10) or \
+               (itn % 10 == 0) or (test3 <= 1.1 * ctol) or \
+               (test2 <= 1.1 * atol) or (test1 <= 1.1 * rtol) or \
+               (istop != 0):
+
+                if pcount >= pfreq:
+                    pcount = 0
+                    print(' ')
+                    print(hdg1, hdg2)
+                pcount = pcount + 1
+                str1 = f'{itn:6g} {x[0]:12.5e}'
+                str2 = f' {normr:10.3e} {normar:10.3e}'
+                str3 = f'  {test1:8.1e} {test2:8.1e}'
+                str4 = f' {normA:8.1e} {condA:8.1e}'
+                print(''.join([str1, str2, str3, str4]))
+
+        if istop > 0:
+            break
+
+    # Print the stopping condition.
+
+    if show:
+        print(' ')
+        print('LSMR finished')
+        print(msg[istop])
+        print(f'istop ={istop:8g}    normr ={normr:8.1e}')
+        print(f'    normA ={normA:8.1e}    normAr ={normar:8.1e}')
+        print(f'itn   ={itn:8g}    condA ={condA:8.1e}')
+        print(f'    normx ={normx:8.1e}')
+        print(str1, str2)
+        print(str3, str4)
+
+    return x, istop, itn, normr, normar, normA, condA, normx
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsqr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsqr.py
new file mode 100644
index 0000000000000000000000000000000000000000..3e490a0769e6d20303b1e5fdd111237b72d3abc9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/lsqr.py
@@ -0,0 +1,589 @@
+"""Sparse Equations and Least Squares.
+
+The original Fortran code was written by C. C. Paige and M. A. Saunders as
+described in
+
+C. C. Paige and M. A. Saunders, LSQR: An algorithm for sparse linear
+equations and sparse least squares, TOMS 8(1), 43--71 (1982).
+
+C. C. Paige and M. A. Saunders, Algorithm 583; LSQR: Sparse linear
+equations and least-squares problems, TOMS 8(2), 195--209 (1982).
+
+It is licensed under the following BSD license:
+
+Copyright (c) 2006, Systems Optimization Laboratory
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Stanford University nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The Fortran code was translated to Python for use in CVXOPT by Jeffery
+Kline with contributions by Mridul Aanjaneya and Bob Myhill.
+
+Adapted for SciPy by Stefan van der Walt.
+
+"""
+
+__all__ = ['lsqr']
+
+import numpy as np
+from math import sqrt
+from scipy.sparse.linalg._interface import aslinearoperator
+from scipy.sparse._sputils import convert_pydata_sparse_to_scipy
+
+eps = np.finfo(np.float64).eps
+
+
+def _sym_ortho(a, b):
+    """
+    Stable implementation of Givens rotation.
+
+    Notes
+    -----
+    The routine 'SymOrtho' was added for numerical stability. This is
+    recommended by S.-C. Choi in [1]_.  It removes the unpleasant potential of
+    ``1/eps`` in some important places (see, for example text following
+    "Compute the next plane rotation Qk" in minres.py).
+
+    References
+    ----------
+    .. [1] S.-C. Choi, "Iterative Methods for Singular Linear Equations
+           and Least-Squares Problems", Dissertation,
+           http://www.stanford.edu/group/SOL/dissertations/sou-cheng-choi-thesis.pdf
+
+    """
+    if b == 0:
+        return np.sign(a), 0, abs(a)
+    elif a == 0:
+        return 0, np.sign(b), abs(b)
+    elif abs(b) > abs(a):
+        tau = a / b
+        s = np.sign(b) / sqrt(1 + tau * tau)
+        c = s * tau
+        r = b / s
+    else:
+        tau = b / a
+        c = np.sign(a) / sqrt(1+tau*tau)
+        s = c * tau
+        r = a / c
+    return c, s, r
+
+
+def lsqr(A, b, damp=0.0, atol=1e-6, btol=1e-6, conlim=1e8,
+         iter_lim=None, show=False, calc_var=False, x0=None):
+    """Find the least-squares solution to a large, sparse, linear system
+    of equations.
+
+    The function solves ``Ax = b``  or  ``min ||Ax - b||^2`` or
+    ``min ||Ax - b||^2 + d^2 ||x - x0||^2``.
+
+    The matrix A may be square or rectangular (over-determined or
+    under-determined), and may have any rank.
+
+    ::
+
+      1. Unsymmetric equations --    solve  Ax = b
+
+      2. Linear least squares  --    solve  Ax = b
+                                     in the least-squares sense
+
+      3. Damped least squares  --    solve  (   A    )*x = (    b    )
+                                            ( damp*I )     ( damp*x0 )
+                                     in the least-squares sense
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        Representation of an m-by-n matrix.
+        Alternatively, ``A`` can be a linear operator which can
+        produce ``Ax`` and ``A^T x`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : array_like, shape (m,)
+        Right-hand side vector ``b``.
+    damp : float
+        Damping coefficient. Default is 0.
+    atol, btol : float, optional
+        Stopping tolerances. `lsqr` continues iterations until a
+        certain backward error estimate is smaller than some quantity
+        depending on atol and btol.  Let ``r = b - Ax`` be the
+        residual vector for the current approximate solution ``x``.
+        If ``Ax = b`` seems to be consistent, `lsqr` terminates
+        when ``norm(r) <= atol * norm(A) * norm(x) + btol * norm(b)``.
+        Otherwise, `lsqr` terminates when ``norm(A^H r) <=
+        atol * norm(A) * norm(r)``.  If both tolerances are 1.0e-6 (default),
+        the final ``norm(r)`` should be accurate to about 6
+        digits. (The final ``x`` will usually have fewer correct digits,
+        depending on ``cond(A)`` and the size of LAMBDA.)  If `atol`
+        or `btol` is None, a default value of 1.0e-6 will be used.
+        Ideally, they should be estimates of the relative error in the
+        entries of ``A`` and ``b`` respectively.  For example, if the entries
+        of ``A`` have 7 correct digits, set ``atol = 1e-7``. This prevents
+        the algorithm from doing unnecessary work beyond the
+        uncertainty of the input data.
+    conlim : float, optional
+        Another stopping tolerance.  lsqr terminates if an estimate of
+        ``cond(A)`` exceeds `conlim`.  For compatible systems ``Ax =
+        b``, `conlim` could be as large as 1.0e+12 (say).  For
+        least-squares problems, conlim should be less than 1.0e+8.
+        Maximum precision can be obtained by setting ``atol = btol =
+        conlim = zero``, but the number of iterations may then be
+        excessive. Default is 1e8.
+    iter_lim : int, optional
+        Explicit limitation on number of iterations (for safety).
+    show : bool, optional
+        Display an iteration log. Default is False.
+    calc_var : bool, optional
+        Whether to estimate diagonals of ``(A'A + damp^2*I)^{-1}``.
+    x0 : array_like, shape (n,), optional
+        Initial guess of x, if None zeros are used. Default is None.
+
+        .. versionadded:: 1.0.0
+
+    Returns
+    -------
+    x : ndarray of float
+        The final solution.
+    istop : int
+        Gives the reason for termination.
+        1 means x is an approximate solution to Ax = b.
+        2 means x approximately solves the least-squares problem.
+    itn : int
+        Iteration number upon termination.
+    r1norm : float
+        ``norm(r)``, where ``r = b - Ax``.
+    r2norm : float
+        ``sqrt( norm(r)^2  +  damp^2 * norm(x - x0)^2 )``.  Equal to `r1norm`
+        if ``damp == 0``.
+    anorm : float
+        Estimate of Frobenius norm of ``Abar = [[A]; [damp*I]]``.
+    acond : float
+        Estimate of ``cond(Abar)``.
+    arnorm : float
+        Estimate of ``norm(A'@r - damp^2*(x - x0))``.
+    xnorm : float
+        ``norm(x)``
+    var : ndarray of float
+        If ``calc_var`` is True, estimates all diagonals of
+        ``(A'A)^{-1}`` (if ``damp == 0``) or more generally ``(A'A +
+        damp^2*I)^{-1}``.  This is well defined if A has full column
+        rank or ``damp > 0``.  (Not sure what var means if ``rank(A)
+        < n`` and ``damp = 0.``)
+
+    Notes
+    -----
+    LSQR uses an iterative method to approximate the solution.  The
+    number of iterations required to reach a certain accuracy depends
+    strongly on the scaling of the problem.  Poor scaling of the rows
+    or columns of A should therefore be avoided where possible.
+
+    For example, in problem 1 the solution is unaltered by
+    row-scaling.  If a row of A is very small or large compared to
+    the other rows of A, the corresponding row of ( A  b ) should be
+    scaled up or down.
+
+    In problems 1 and 2, the solution x is easily recovered
+    following column-scaling.  Unless better information is known,
+    the nonzero columns of A should be scaled so that they all have
+    the same Euclidean norm (e.g., 1.0).
+
+    In problem 3, there is no freedom to re-scale if damp is
+    nonzero.  However, the value of damp should be assigned only
+    after attention has been paid to the scaling of A.
+
+    The parameter damp is intended to help regularize
+    ill-conditioned systems, by preventing the true solution from
+    being very large.  Another aid to regularization is provided by
+    the parameter acond, which may be used to terminate iterations
+    before the computed solution becomes very large.
+
+    If some initial estimate ``x0`` is known and if ``damp == 0``,
+    one could proceed as follows:
+
+      1. Compute a residual vector ``r0 = b - A@x0``.
+      2. Use LSQR to solve the system  ``A@dx = r0``.
+      3. Add the correction dx to obtain a final solution ``x = x0 + dx``.
+
+    This requires that ``x0`` be available before and after the call
+    to LSQR.  To judge the benefits, suppose LSQR takes k1 iterations
+    to solve A@x = b and k2 iterations to solve A@dx = r0.
+    If x0 is "good", norm(r0) will be smaller than norm(b).
+    If the same stopping tolerances atol and btol are used for each
+    system, k1 and k2 will be similar, but the final solution x0 + dx
+    should be more accurate.  The only way to reduce the total work
+    is to use a larger stopping tolerance for the second system.
+    If some value btol is suitable for A@x = b, the larger value
+    btol*norm(b)/norm(r0)  should be suitable for A@dx = r0.
+
+    Preconditioning is another way to reduce the number of iterations.
+    If it is possible to solve a related system ``M@x = b``
+    efficiently, where M approximates A in some helpful way (e.g. M -
+    A has low rank or its elements are small relative to those of A),
+    LSQR may converge more rapidly on the system ``A@M(inverse)@z =
+    b``, after which x can be recovered by solving M@x = z.
+
+    If A is symmetric, LSQR should not be used!
+
+    Alternatives are the symmetric conjugate-gradient method (cg)
+    and/or SYMMLQ.  SYMMLQ is an implementation of symmetric cg that
+    applies to any symmetric A and will converge more rapidly than
+    LSQR.  If A is positive definite, there are other implementations
+    of symmetric cg that require slightly less work per iteration than
+    SYMMLQ (but will take the same number of iterations).
+
+    References
+    ----------
+    .. [1] C. C. Paige and M. A. Saunders (1982a).
+           "LSQR: An algorithm for sparse linear equations and
+           sparse least squares", ACM TOMS 8(1), 43-71.
+    .. [2] C. C. Paige and M. A. Saunders (1982b).
+           "Algorithm 583.  LSQR: Sparse linear equations and least
+           squares problems", ACM TOMS 8(2), 195-209.
+    .. [3] M. A. Saunders (1995).  "Solution of sparse rectangular
+           systems using LSQR and CRAIG", BIT 35, 588-604.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import lsqr
+    >>> A = csc_array([[1., 0.], [1., 1.], [0., 1.]], dtype=float)
+
+    The first example has the trivial solution ``[0, 0]``
+
+    >>> b = np.array([0., 0., 0.], dtype=float)
+    >>> x, istop, itn, normr = lsqr(A, b)[:4]
+    >>> istop
+    0
+    >>> x
+    array([ 0.,  0.])
+
+    The stopping code ``istop=0`` returned indicates that a vector of zeros was
+    found as a solution. The returned solution `x` indeed contains
+    ``[0., 0.]``. The next example has a non-trivial solution:
+
+    >>> b = np.array([1., 0., -1.], dtype=float)
+    >>> x, istop, itn, r1norm = lsqr(A, b)[:4]
+    >>> istop
+    1
+    >>> x
+    array([ 1., -1.])
+    >>> itn
+    1
+    >>> r1norm
+    4.440892098500627e-16
+
+    As indicated by ``istop=1``, `lsqr` found a solution obeying the tolerance
+    limits. The given solution ``[1., -1.]`` obviously solves the equation. The
+    remaining return values include information about the number of iterations
+    (`itn=1`) and the remaining difference of left and right side of the solved
+    equation.
+    The final example demonstrates the behavior in the case where there is no
+    solution for the equation:
+
+    >>> b = np.array([1., 0.01, -1.], dtype=float)
+    >>> x, istop, itn, r1norm = lsqr(A, b)[:4]
+    >>> istop
+    2
+    >>> x
+    array([ 1.00333333, -0.99666667])
+    >>> A.dot(x)-b
+    array([ 0.00333333, -0.00333333,  0.00333333])
+    >>> r1norm
+    0.005773502691896255
+
+    `istop` indicates that the system is inconsistent and thus `x` is rather an
+    approximate solution to the corresponding least-squares problem. `r1norm`
+    contains the norm of the minimal residual that was found.
+    """
+    A = convert_pydata_sparse_to_scipy(A)
+    A = aslinearoperator(A)
+    b = np.atleast_1d(b)
+    if b.ndim > 1:
+        b = b.squeeze()
+
+    m, n = A.shape
+    if iter_lim is None:
+        iter_lim = 2 * n
+    var = np.zeros(n)
+
+    msg = ('The exact solution is  x = 0                              ',
+           'Ax - b is small enough, given atol, btol                  ',
+           'The least-squares solution is good enough, given atol     ',
+           'The estimate of cond(Abar) has exceeded conlim            ',
+           'Ax - b is small enough for this machine                   ',
+           'The least-squares solution is good enough for this machine',
+           'Cond(Abar) seems to be too large for this machine         ',
+           'The iteration limit has been reached                      ')
+
+    if show:
+        print(' ')
+        print('LSQR            Least-squares solution of  Ax = b')
+        str1 = f'The matrix A has {m} rows and {n} columns'
+        str2 = f'damp = {damp:20.14e}   calc_var = {calc_var:8g}'
+        str3 = f'atol = {atol:8.2e}                 conlim = {conlim:8.2e}'
+        str4 = f'btol = {btol:8.2e}               iter_lim = {iter_lim:8g}'
+        print(str1)
+        print(str2)
+        print(str3)
+        print(str4)
+
+    itn = 0
+    istop = 0
+    ctol = 0
+    if conlim > 0:
+        ctol = 1/conlim
+    anorm = 0
+    acond = 0
+    dampsq = damp**2
+    ddnorm = 0
+    res2 = 0
+    xnorm = 0
+    xxnorm = 0
+    z = 0
+    cs2 = -1
+    sn2 = 0
+
+    # Set up the first vectors u and v for the bidiagonalization.
+    # These satisfy  beta*u = b - A@x,  alfa*v = A'@u.
+    u = b
+    bnorm = np.linalg.norm(b)
+
+    if x0 is None:
+        x = np.zeros(n)
+        beta = bnorm.copy()
+    else:
+        x = np.asarray(x0)
+        u = u - A.matvec(x)
+        beta = np.linalg.norm(u)
+
+    if beta > 0:
+        u = (1/beta) * u
+        v = A.rmatvec(u)
+        alfa = np.linalg.norm(v)
+    else:
+        v = x.copy()
+        alfa = 0
+
+    if alfa > 0:
+        v = (1/alfa) * v
+    w = v.copy()
+
+    rhobar = alfa
+    phibar = beta
+    rnorm = beta
+    r1norm = rnorm
+    r2norm = rnorm
+
+    # Reverse the order here from the original matlab code because
+    # there was an error on return when arnorm==0
+    arnorm = alfa * beta
+    if arnorm == 0:
+        if show:
+            print(msg[0])
+        return x, istop, itn, r1norm, r2norm, anorm, acond, arnorm, xnorm, var
+
+    head1 = '   Itn      x[0]       r1norm     r2norm '
+    head2 = ' Compatible    LS      Norm A   Cond A'
+
+    if show:
+        print(' ')
+        print(head1, head2)
+        test1 = 1
+        test2 = alfa / beta
+        str1 = f'{itn:6g} {x[0]:12.5e}'
+        str2 = f' {r1norm:10.3e} {r2norm:10.3e}'
+        str3 = f'  {test1:8.1e} {test2:8.1e}'
+        print(str1, str2, str3)
+
+    # Main iteration loop.
+    while itn < iter_lim:
+        itn = itn + 1
+        # Perform the next step of the bidiagonalization to obtain the
+        # next  beta, u, alfa, v. These satisfy the relations
+        #     beta*u  =  a@v   -  alfa*u,
+        #     alfa*v  =  A'@u  -  beta*v.
+        u = A.matvec(v) - alfa * u
+        beta = np.linalg.norm(u)
+
+        if beta > 0:
+            u = (1/beta) * u
+            anorm = sqrt(anorm**2 + alfa**2 + beta**2 + dampsq)
+            v = A.rmatvec(u) - beta * v
+            alfa = np.linalg.norm(v)
+            if alfa > 0:
+                v = (1 / alfa) * v
+
+        # Use a plane rotation to eliminate the damping parameter.
+        # This alters the diagonal (rhobar) of the lower-bidiagonal matrix.
+        if damp > 0:
+            rhobar1 = sqrt(rhobar**2 + dampsq)
+            cs1 = rhobar / rhobar1
+            sn1 = damp / rhobar1
+            psi = sn1 * phibar
+            phibar = cs1 * phibar
+        else:
+            # cs1 = 1 and sn1 = 0
+            rhobar1 = rhobar
+            psi = 0.
+
+        # Use a plane rotation to eliminate the subdiagonal element (beta)
+        # of the lower-bidiagonal matrix, giving an upper-bidiagonal matrix.
+        cs, sn, rho = _sym_ortho(rhobar1, beta)
+
+        theta = sn * alfa
+        rhobar = -cs * alfa
+        phi = cs * phibar
+        phibar = sn * phibar
+        tau = sn * phi
+
+        # Update x and w.
+        t1 = phi / rho
+        t2 = -theta / rho
+        dk = (1 / rho) * w
+
+        x = x + t1 * w
+        w = v + t2 * w
+        ddnorm = ddnorm + np.linalg.norm(dk)**2
+
+        if calc_var:
+            var = var + dk**2
+
+        # Use a plane rotation on the right to eliminate the
+        # super-diagonal element (theta) of the upper-bidiagonal matrix.
+        # Then use the result to estimate norm(x).
+        delta = sn2 * rho
+        gambar = -cs2 * rho
+        rhs = phi - delta * z
+        zbar = rhs / gambar
+        xnorm = sqrt(xxnorm + zbar**2)
+        gamma = sqrt(gambar**2 + theta**2)
+        cs2 = gambar / gamma
+        sn2 = theta / gamma
+        z = rhs / gamma
+        xxnorm = xxnorm + z**2
+
+        # Test for convergence.
+        # First, estimate the condition of the matrix  Abar,
+        # and the norms of  rbar  and  Abar'rbar.
+        acond = anorm * sqrt(ddnorm)
+        res1 = phibar**2
+        res2 = res2 + psi**2
+        rnorm = sqrt(res1 + res2)
+        arnorm = alfa * abs(tau)
+
+        # Distinguish between
+        #    r1norm = ||b - Ax|| and
+        #    r2norm = rnorm in current code
+        #           = sqrt(r1norm^2 + damp^2*||x - x0||^2).
+        #    Estimate r1norm from
+        #    r1norm = sqrt(r2norm^2 - damp^2*||x - x0||^2).
+        # Although there is cancellation, it might be accurate enough.
+        if damp > 0:
+            r1sq = rnorm**2 - dampsq * xxnorm
+            r1norm = sqrt(abs(r1sq))
+            if r1sq < 0:
+                r1norm = -r1norm
+        else:
+            r1norm = rnorm
+        r2norm = rnorm
+
+        # Now use these norms to estimate certain other quantities,
+        # some of which will be small near a solution.
+        test1 = rnorm / bnorm
+        test2 = arnorm / (anorm * rnorm + eps)
+        test3 = 1 / (acond + eps)
+        t1 = test1 / (1 + anorm * xnorm / bnorm)
+        rtol = btol + atol * anorm * xnorm / bnorm
+
+        # The following tests guard against extremely small values of
+        # atol, btol  or  ctol.  (The user may have set any or all of
+        # the parameters  atol, btol, conlim  to 0.)
+        # The effect is equivalent to the normal tests using
+        # atol = eps,  btol = eps,  conlim = 1/eps.
+        if itn >= iter_lim:
+            istop = 7
+        if 1 + test3 <= 1:
+            istop = 6
+        if 1 + test2 <= 1:
+            istop = 5
+        if 1 + t1 <= 1:
+            istop = 4
+
+        # Allow for tolerances set by the user.
+        if test3 <= ctol:
+            istop = 3
+        if test2 <= atol:
+            istop = 2
+        if test1 <= rtol:
+            istop = 1
+
+        if show:
+            # See if it is time to print something.
+            prnt = False
+            if n <= 40:
+                prnt = True
+            if itn <= 10:
+                prnt = True
+            if itn >= iter_lim-10:
+                prnt = True
+            # if itn%10 == 0: prnt = True
+            if test3 <= 2*ctol:
+                prnt = True
+            if test2 <= 10*atol:
+                prnt = True
+            if test1 <= 10*rtol:
+                prnt = True
+            if istop != 0:
+                prnt = True
+
+            if prnt:
+                str1 = f'{itn:6g} {x[0]:12.5e}'
+                str2 = f' {r1norm:10.3e} {r2norm:10.3e}'
+                str3 = f'  {test1:8.1e} {test2:8.1e}'
+                str4 = f' {anorm:8.1e} {acond:8.1e}'
+                print(str1, str2, str3, str4)
+
+        if istop != 0:
+            break
+
+    # End of iteration loop.
+    # Print the stopping condition.
+    if show:
+        print(' ')
+        print('LSQR finished')
+        print(msg[istop])
+        print(' ')
+        str1 = f'istop ={istop:8g}   r1norm ={r1norm:8.1e}'
+        str2 = f'anorm ={anorm:8.1e}   arnorm ={arnorm:8.1e}'
+        str3 = f'itn   ={itn:8g}   r2norm ={r2norm:8.1e}'
+        str4 = f'acond ={acond:8.1e}   xnorm  ={xnorm:8.1e}'
+        print(str1 + '   ' + str2)
+        print(str3 + '   ' + str4)
+        print(' ')
+
+    return x, istop, itn, r1norm, r2norm, anorm, acond, arnorm, xnorm, var
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/minres.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/minres.py
new file mode 100644
index 0000000000000000000000000000000000000000..719d4eed991f15dda61da2c01f28d7f2244fc97d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/minres.py
@@ -0,0 +1,372 @@
+from numpy import inner, zeros, inf, finfo
+from numpy.linalg import norm
+from math import sqrt
+
+from .utils import make_system
+
+__all__ = ['minres']
+
+
+def minres(A, b, x0=None, *, rtol=1e-5, shift=0.0, maxiter=None,
+           M=None, callback=None, show=False, check=False):
+    """
+    Use MINimum RESidual iteration to solve Ax=b
+
+    MINRES minimizes norm(Ax - b) for a real symmetric matrix A.  Unlike
+    the Conjugate Gradient method, A can be indefinite or singular.
+
+    If shift != 0 then the method solves (A - shift*I)x = b
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real symmetric N-by-N matrix of the linear system
+        Alternatively, ``A`` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        ``scipy.sparse.linalg.LinearOperator``.
+    b : ndarray
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : integer
+        Provides convergence information:
+            0  : successful exit
+            >0 : convergence to tolerance not achieved, number of iterations
+            <0 : illegal input or breakdown
+
+    Other Parameters
+    ----------------
+    x0 : ndarray
+        Starting guess for the solution.
+    shift : float
+        Value to apply to the system ``(A - shift * I)x = b``. Default is 0.
+    rtol : float
+        Tolerance to achieve. The algorithm terminates when the relative
+        residual is below ``rtol``.
+    maxiter : integer
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+    M : {sparse array, ndarray, LinearOperator}
+        Preconditioner for A.  The preconditioner should approximate the
+        inverse of A.  Effective preconditioning dramatically improves the
+        rate of convergence, which implies that fewer iterations are needed
+        to reach a given error tolerance.
+    callback : function
+        User-supplied function to call after each iteration.  It is called
+        as callback(xk), where xk is the current solution vector.
+    show : bool
+        If ``True``, print out a summary and metrics related to the solution
+        during iterations. Default is ``False``.
+    check : bool
+        If ``True``, run additional input validation to check that `A` and
+        `M` (if specified) are symmetric. Default is ``False``.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import minres
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
+    >>> A = A + A.T
+    >>> b = np.array([2, 4, -1], dtype=float)
+    >>> x, exitCode = minres(A, b)
+    >>> print(exitCode)            # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+
+    References
+    ----------
+    Solution of sparse indefinite systems of linear equations,
+        C. C. Paige and M. A. Saunders (1975),
+        SIAM J. Numer. Anal. 12(4), pp. 617-629.
+        https://web.stanford.edu/group/SOL/software/minres/
+
+    This file is a translation of the following MATLAB implementation:
+        https://web.stanford.edu/group/SOL/software/minres/minres-matlab.zip
+
+    """
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+
+    matvec = A.matvec
+    psolve = M.matvec
+
+    first = 'Enter minres.   '
+    last = 'Exit  minres.   '
+
+    n = A.shape[0]
+
+    if maxiter is None:
+        maxiter = 5 * n
+
+    msg = [' beta2 = 0.  If M = I, b and x are eigenvectors    ',   # -1
+            ' beta1 = 0.  The exact solution is x0          ',   # 0
+            ' A solution to Ax = b was found, given rtol        ',   # 1
+            ' A least-squares solution was found, given rtol    ',   # 2
+            ' Reasonable accuracy achieved, given eps           ',   # 3
+            ' x has converged to an eigenvector                 ',   # 4
+            ' acond has exceeded 0.1/eps                        ',   # 5
+            ' The iteration limit was reached                   ',   # 6
+            ' A  does not define a symmetric matrix             ',   # 7
+            ' M  does not define a symmetric matrix             ',   # 8
+            ' M  does not define a pos-def preconditioner       ']   # 9
+
+    if show:
+        print(first + 'Solution of symmetric Ax = b')
+        print(first + f'n      =  {n:3g}     shift  =  {shift:23.14e}')
+        print(first + f'itnlim =  {maxiter:3g}     rtol   =  {rtol:11.2e}')
+        print()
+
+    istop = 0
+    itn = 0
+    Anorm = 0
+    Acond = 0
+    rnorm = 0
+    ynorm = 0
+
+    xtype = x.dtype
+
+    eps = finfo(xtype).eps
+
+    # Set up y and v for the first Lanczos vector v1.
+    # y  =  beta1 P' v1,  where  P = C**(-1).
+    # v is really P' v1.
+
+    if x0 is None:
+        r1 = b.copy()
+    else:
+        r1 = b - A@x
+    y = psolve(r1)
+
+    beta1 = inner(r1, y)
+
+    if beta1 < 0:
+        raise ValueError('indefinite preconditioner')
+    elif beta1 == 0:
+        return (postprocess(x), 0)
+
+    bnorm = norm(b)
+    if bnorm == 0:
+        x = b
+        return (postprocess(x), 0)
+
+    beta1 = sqrt(beta1)
+
+    if check:
+        # are these too strict?
+
+        # see if A is symmetric
+        w = matvec(y)
+        r2 = matvec(w)
+        s = inner(w,w)
+        t = inner(y,r2)
+        z = abs(s - t)
+        epsa = (s + eps) * eps**(1.0/3.0)
+        if z > epsa:
+            raise ValueError('non-symmetric matrix')
+
+        # see if M is symmetric
+        r2 = psolve(y)
+        s = inner(y,y)
+        t = inner(r1,r2)
+        z = abs(s - t)
+        epsa = (s + eps) * eps**(1.0/3.0)
+        if z > epsa:
+            raise ValueError('non-symmetric preconditioner')
+
+    # Initialize other quantities
+    oldb = 0
+    beta = beta1
+    dbar = 0
+    epsln = 0
+    qrnorm = beta1
+    phibar = beta1
+    rhs1 = beta1
+    rhs2 = 0
+    tnorm2 = 0
+    gmax = 0
+    gmin = finfo(xtype).max
+    cs = -1
+    sn = 0
+    w = zeros(n, dtype=xtype)
+    w2 = zeros(n, dtype=xtype)
+    r2 = r1
+
+    if show:
+        print()
+        print()
+        print('   Itn     x(1)     Compatible    LS       norm(A)  cond(A) gbar/|A|')
+
+    while itn < maxiter:
+        itn += 1
+
+        s = 1.0/beta
+        v = s*y
+
+        y = matvec(v)
+        y = y - shift * v
+
+        if itn >= 2:
+            y = y - (beta/oldb)*r1
+
+        alfa = inner(v,y)
+        y = y - (alfa/beta)*r2
+        r1 = r2
+        r2 = y
+        y = psolve(r2)
+        oldb = beta
+        beta = inner(r2,y)
+        if beta < 0:
+            raise ValueError('non-symmetric matrix')
+        beta = sqrt(beta)
+        tnorm2 += alfa**2 + oldb**2 + beta**2
+
+        if itn == 1:
+            if beta/beta1 <= 10*eps:
+                istop = -1  # Terminate later
+
+        # Apply previous rotation Qk-1 to get
+        #   [deltak epslnk+1] = [cs  sn][dbark    0   ]
+        #   [gbar k dbar k+1]   [sn -cs][alfak betak+1].
+
+        oldeps = epsln
+        delta = cs * dbar + sn * alfa   # delta1 = 0         deltak
+        gbar = sn * dbar - cs * alfa   # gbar 1 = alfa1     gbar k
+        epsln = sn * beta     # epsln2 = 0         epslnk+1
+        dbar = - cs * beta   # dbar 2 = beta2     dbar k+1
+        root = norm([gbar, dbar])
+        Arnorm = phibar * root
+
+        # Compute the next plane rotation Qk
+
+        gamma = norm([gbar, beta])       # gammak
+        gamma = max(gamma, eps)
+        cs = gbar / gamma             # ck
+        sn = beta / gamma             # sk
+        phi = cs * phibar              # phik
+        phibar = sn * phibar              # phibark+1
+
+        # Update  x.
+
+        denom = 1.0/gamma
+        w1 = w2
+        w2 = w
+        w = (v - oldeps*w1 - delta*w2) * denom
+        x = x + phi*w
+
+        # Go round again.
+
+        gmax = max(gmax, gamma)
+        gmin = min(gmin, gamma)
+        z = rhs1 / gamma
+        rhs1 = rhs2 - delta*z
+        rhs2 = - epsln*z
+
+        # Estimate various norms and test for convergence.
+
+        Anorm = sqrt(tnorm2)
+        ynorm = norm(x)
+        epsa = Anorm * eps
+        epsx = Anorm * ynorm * eps
+        epsr = Anorm * ynorm * rtol
+        diag = gbar
+
+        if diag == 0:
+            diag = epsa
+
+        qrnorm = phibar
+        rnorm = qrnorm
+        if ynorm == 0 or Anorm == 0:
+            test1 = inf
+        else:
+            test1 = rnorm / (Anorm*ynorm)    # ||r||  / (||A|| ||x||)
+        if Anorm == 0:
+            test2 = inf
+        else:
+            test2 = root / Anorm            # ||Ar|| / (||A|| ||r||)
+
+        # Estimate  cond(A).
+        # In this version we look at the diagonals of  R  in the
+        # factorization of the lower Hessenberg matrix,  Q @ H = R,
+        # where H is the tridiagonal matrix from Lanczos with one
+        # extra row, beta(k+1) e_k^T.
+
+        Acond = gmax/gmin
+
+        # See if any of the stopping criteria are satisfied.
+        # In rare cases, istop is already -1 from above (Abar = const*I).
+
+        if istop == 0:
+            t1 = 1 + test1      # These tests work if rtol < eps
+            t2 = 1 + test2
+            if t2 <= 1:
+                istop = 2
+            if t1 <= 1:
+                istop = 1
+
+            if itn >= maxiter:
+                istop = 6
+            if Acond >= 0.1/eps:
+                istop = 4
+            if epsx >= beta1:
+                istop = 3
+            # if rnorm <= epsx   : istop = 2
+            # if rnorm <= epsr   : istop = 1
+            if test2 <= rtol:
+                istop = 2
+            if test1 <= rtol:
+                istop = 1
+
+        # See if it is time to print something.
+
+        prnt = False
+        if n <= 40:
+            prnt = True
+        if itn <= 10:
+            prnt = True
+        if itn >= maxiter-10:
+            prnt = True
+        if itn % 10 == 0:
+            prnt = True
+        if qrnorm <= 10*epsx:
+            prnt = True
+        if qrnorm <= 10*epsr:
+            prnt = True
+        if Acond <= 1e-2/eps:
+            prnt = True
+        if istop != 0:
+            prnt = True
+
+        if show and prnt:
+            str1 = f'{itn:6g} {x[0]:12.5e} {test1:10.3e}'
+            str2 = f' {test2:10.3e}'
+            str3 = f' {Anorm:8.1e} {Acond:8.1e} {gbar/Anorm:8.1e}'
+
+            print(str1 + str2 + str3)
+
+            if itn % 10 == 0:
+                print()
+
+        if callback is not None:
+            callback(x)
+
+        if istop != 0:
+            break  # TODO check this
+
+    if show:
+        print()
+        print(last + f' istop   =  {istop:3g}               itn   ={itn:5g}')
+        print(last + f' Anorm   =  {Anorm:12.4e}      Acond =  {Acond:12.4e}')
+        print(last + f' rnorm   =  {rnorm:12.4e}      ynorm =  {ynorm:12.4e}')
+        print(last + f' Arnorm  =  {Arnorm:12.4e}')
+        print(last + msg[istop+1])
+
+    if istop == 6:
+        info = maxiter
+    else:
+        info = 0
+
+    return (postprocess(x),info)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tfqmr.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tfqmr.py
new file mode 100644
index 0000000000000000000000000000000000000000..efec0302d53f107d8ffb3fcfe82f65cfa37ada5f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tfqmr.py
@@ -0,0 +1,179 @@
+import numpy as np
+from .iterative import _get_atol_rtol
+from .utils import make_system
+
+
+__all__ = ['tfqmr']
+
+
+def tfqmr(A, b, x0=None, *, rtol=1e-5, atol=0., maxiter=None, M=None,
+          callback=None, show=False):
+    """
+    Use Transpose-Free Quasi-Minimal Residual iteration to solve ``Ax = b``.
+
+    Parameters
+    ----------
+    A : {sparse array, ndarray, LinearOperator}
+        The real or complex N-by-N matrix of the linear system.
+        Alternatively, `A` can be a linear operator which can
+        produce ``Ax`` using, e.g.,
+        `scipy.sparse.linalg.LinearOperator`.
+    b : {ndarray}
+        Right hand side of the linear system. Has shape (N,) or (N,1).
+    x0 : {ndarray}
+        Starting guess for the solution.
+    rtol, atol : float, optional
+        Parameters for the convergence test. For convergence,
+        ``norm(b - A @ x) <= max(rtol*norm(b), atol)`` should be satisfied.
+        The default is ``rtol=1e-5``, the default for ``atol`` is ``0.0``.
+    maxiter : int, optional
+        Maximum number of iterations.  Iteration will stop after maxiter
+        steps even if the specified tolerance has not been achieved.
+        Default is ``min(10000, ndofs * 10)``, where ``ndofs = A.shape[0]``.
+    M : {sparse array, ndarray, LinearOperator}
+        Inverse of the preconditioner of A.  M should approximate the
+        inverse of A and be easy to solve for (see Notes).  Effective
+        preconditioning dramatically improves the rate of convergence,
+        which implies that fewer iterations are needed to reach a given
+        error tolerance.  By default, no preconditioner is used.
+    callback : function, optional
+        User-supplied function to call after each iteration.  It is called
+        as ``callback(xk)``, where ``xk`` is the current solution vector.
+    show : bool, optional
+        Specify ``show = True`` to show the convergence, ``show = False`` is
+        to close the output of the convergence.
+        Default is `False`.
+
+    Returns
+    -------
+    x : ndarray
+        The converged solution.
+    info : int
+        Provides convergence information:
+
+            - 0  : successful exit
+            - >0 : convergence to tolerance not achieved, number of iterations
+            - <0 : illegal input or breakdown
+
+    Notes
+    -----
+    The Transpose-Free QMR algorithm is derived from the CGS algorithm.
+    However, unlike CGS, the convergence curves for the TFQMR method is
+    smoothed by computing a quasi minimization of the residual norm. The
+    implementation supports left preconditioner, and the "residual norm"
+    to compute in convergence criterion is actually an upper bound on the
+    actual residual norm ``||b - Axk||``.
+
+    References
+    ----------
+    .. [1] R. W. Freund, A Transpose-Free Quasi-Minimal Residual Algorithm for
+           Non-Hermitian Linear Systems, SIAM J. Sci. Comput., 14(2), 470-482,
+           1993.
+    .. [2] Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd edition,
+           SIAM, Philadelphia, 2003.
+    .. [3] C. T. Kelley, Iterative Methods for Linear and Nonlinear Equations,
+           number 16 in Frontiers in Applied Mathematics, SIAM, Philadelphia,
+           1995.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import tfqmr
+    >>> A = csc_array([[3, 2, 0], [1, -1, 0], [0, 5, 1]], dtype=float)
+    >>> b = np.array([2, 4, -1], dtype=float)
+    >>> x, exitCode = tfqmr(A, b, atol=0.0)
+    >>> print(exitCode)            # 0 indicates successful convergence
+    0
+    >>> np.allclose(A.dot(x), b)
+    True
+    """
+
+    # Check data type
+    dtype = A.dtype
+    if np.issubdtype(dtype, np.int64):
+        dtype = float
+        A = A.astype(dtype)
+    if np.issubdtype(b.dtype, np.int64):
+        b = b.astype(dtype)
+
+    A, M, x, b, postprocess = make_system(A, M, x0, b)
+
+    # Check if the R.H.S is a zero vector
+    if np.linalg.norm(b) == 0.:
+        x = b.copy()
+        return (postprocess(x), 0)
+
+    ndofs = A.shape[0]
+    if maxiter is None:
+        maxiter = min(10000, ndofs * 10)
+
+    if x0 is None:
+        r = b.copy()
+    else:
+        r = b - A.matvec(x)
+    u = r
+    w = r.copy()
+    # Take rstar as b - Ax0, that is rstar := r = b - Ax0 mathematically
+    rstar = r
+    v = M.matvec(A.matvec(r))
+    uhat = v
+    d = theta = eta = 0.
+    # at this point we know rstar == r, so rho is always real
+    rho = np.inner(rstar.conjugate(), r).real
+    rhoLast = rho
+    r0norm = np.sqrt(rho)
+    tau = r0norm
+    if r0norm == 0:
+        return (postprocess(x), 0)
+
+    # we call this to get the right atol and raise errors as necessary
+    atol, _ = _get_atol_rtol('tfqmr', r0norm, atol, rtol)
+
+    for iter in range(maxiter):
+        even = iter % 2 == 0
+        if (even):
+            vtrstar = np.inner(rstar.conjugate(), v)
+            # Check breakdown
+            if vtrstar == 0.:
+                return (postprocess(x), -1)
+            alpha = rho / vtrstar
+            uNext = u - alpha * v  # [1]-(5.6)
+        w -= alpha * uhat  # [1]-(5.8)
+        d = u + (theta**2 / alpha) * eta * d  # [1]-(5.5)
+        # [1]-(5.2)
+        theta = np.linalg.norm(w) / tau
+        c = np.sqrt(1. / (1 + theta**2))
+        tau *= theta * c
+        # Calculate step and direction [1]-(5.4)
+        eta = (c**2) * alpha
+        z = M.matvec(d)
+        x += eta * z
+
+        if callback is not None:
+            callback(x)
+
+        # Convergence criterion
+        if tau * np.sqrt(iter+1) < atol:
+            if (show):
+                print("TFQMR: Linear solve converged due to reach TOL "
+                      f"iterations {iter+1}")
+            return (postprocess(x), 0)
+
+        if (not even):
+            # [1]-(5.7)
+            rho = np.inner(rstar.conjugate(), w)
+            beta = rho / rhoLast
+            u = w + beta * u
+            v = beta * uhat + (beta**2) * v
+            uhat = M.matvec(A.matvec(u))
+            v += uhat
+        else:
+            uhat = M.matvec(A.matvec(uNext))
+            u = uNext
+            rhoLast = rho
+
+    if (show):
+        print("TFQMR: Linear solve not converged due to reach MAXIT "
+              f"iterations {iter+1}")
+    return (postprocess(x), maxiter)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/utils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..80f37fc1cf63fa0352fd93d62be758f87c065db5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/utils.py
@@ -0,0 +1,127 @@
+__docformat__ = "restructuredtext en"
+
+__all__ = []
+
+
+from numpy import asanyarray, asarray, array, zeros
+
+from scipy.sparse.linalg._interface import aslinearoperator, LinearOperator, \
+     IdentityOperator
+
+_coerce_rules = {('f','f'):'f', ('f','d'):'d', ('f','F'):'F',
+                 ('f','D'):'D', ('d','f'):'d', ('d','d'):'d',
+                 ('d','F'):'D', ('d','D'):'D', ('F','f'):'F',
+                 ('F','d'):'D', ('F','F'):'F', ('F','D'):'D',
+                 ('D','f'):'D', ('D','d'):'D', ('D','F'):'D',
+                 ('D','D'):'D'}
+
+
+def coerce(x,y):
+    if x not in 'fdFD':
+        x = 'd'
+    if y not in 'fdFD':
+        y = 'd'
+    return _coerce_rules[x,y]
+
+
+def id(x):
+    return x
+
+
+def make_system(A, M, x0, b):
+    """Make a linear system Ax=b
+
+    Parameters
+    ----------
+    A : LinearOperator
+        sparse or dense matrix (or any valid input to aslinearoperator)
+    M : {LinearOperator, Nones}
+        preconditioner
+        sparse or dense matrix (or any valid input to aslinearoperator)
+    x0 : {array_like, str, None}
+        initial guess to iterative method.
+        ``x0 = 'Mb'`` means using the nonzero initial guess ``M @ b``.
+        Default is `None`, which means using the zero initial guess.
+    b : array_like
+        right hand side
+
+    Returns
+    -------
+    (A, M, x, b, postprocess)
+        A : LinearOperator
+            matrix of the linear system
+        M : LinearOperator
+            preconditioner
+        x : rank 1 ndarray
+            initial guess
+        b : rank 1 ndarray
+            right hand side
+        postprocess : function
+            converts the solution vector to the appropriate
+            type and dimensions (e.g. (N,1) matrix)
+
+    """
+    A_ = A
+    A = aslinearoperator(A)
+
+    if A.shape[0] != A.shape[1]:
+        raise ValueError(f'expected square matrix, but got shape={(A.shape,)}')
+
+    N = A.shape[0]
+
+    b = asanyarray(b)
+
+    if not (b.shape == (N,1) or b.shape == (N,)):
+        raise ValueError(f'shapes of A {A.shape} and b {b.shape} are '
+                         'incompatible')
+
+    if b.dtype.char not in 'fdFD':
+        b = b.astype('d')  # upcast non-FP types to double
+
+    def postprocess(x):
+        return x
+
+    if hasattr(A,'dtype'):
+        xtype = A.dtype.char
+    else:
+        xtype = A.matvec(b).dtype.char
+    xtype = coerce(xtype, b.dtype.char)
+
+    b = asarray(b,dtype=xtype)  # make b the same type as x
+    b = b.ravel()
+
+    # process preconditioner
+    if M is None:
+        if hasattr(A_,'psolve'):
+            psolve = A_.psolve
+        else:
+            psolve = id
+        if hasattr(A_,'rpsolve'):
+            rpsolve = A_.rpsolve
+        else:
+            rpsolve = id
+        if psolve is id and rpsolve is id:
+            M = IdentityOperator(shape=A.shape, dtype=A.dtype)
+        else:
+            M = LinearOperator(A.shape, matvec=psolve, rmatvec=rpsolve,
+                               dtype=A.dtype)
+    else:
+        M = aslinearoperator(M)
+        if A.shape != M.shape:
+            raise ValueError('matrix and preconditioner have different shapes')
+
+    # set initial guess
+    if x0 is None:
+        x = zeros(N, dtype=xtype)
+    elif isinstance(x0, str):
+        if x0 == 'Mb':  # use nonzero initial guess ``M @ b``
+            bCopy = b.copy()
+            x = M.matvec(bCopy)
+    else:
+        x = array(x0, dtype=xtype)
+        if not (x.shape == (N, 1) or x.shape == (N,)):
+            raise ValueError(f'shapes of A {A.shape} and '
+                             f'x0 {x.shape} are incompatible')
+        x = x.ravel()
+
+    return A, M, x, b, postprocess
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..5dff48df52d8b95eb12c64c0117ac57101d9f031
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_matfuncs.py
@@ -0,0 +1,940 @@
+"""
+Sparse matrix functions
+"""
+
+#
+# Authors: Travis Oliphant, March 2002
+#          Anthony Scopatz, August 2012 (Sparse Updates)
+#          Jake Vanderplas, August 2012 (Sparse Updates)
+#
+
+__all__ = ['expm', 'inv', 'matrix_power']
+
+import numpy as np
+from scipy.linalg._basic import solve, solve_triangular
+
+from scipy.sparse._base import issparse
+from scipy.sparse.linalg import spsolve
+from scipy.sparse._sputils import is_pydata_spmatrix, isintlike
+
+import scipy.sparse
+import scipy.sparse.linalg
+from scipy.sparse.linalg._interface import LinearOperator
+from scipy.sparse._construct import eye_array
+
+from ._expm_multiply import _ident_like, _exact_1_norm as _onenorm
+
+
+UPPER_TRIANGULAR = 'upper_triangular'
+
+
+def inv(A):
+    """
+    Compute the inverse of a sparse arrays
+
+    Parameters
+    ----------
+    A : (M, M) sparse arrays
+        square matrix to be inverted
+
+    Returns
+    -------
+    Ainv : (M, M) sparse arrays
+        inverse of `A`
+
+    Notes
+    -----
+    This computes the sparse inverse of `A`. If the inverse of `A` is expected
+    to be non-sparse, it will likely be faster to convert `A` to dense and use
+    `scipy.linalg.inv`.
+
+    Examples
+    --------
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import inv
+    >>> A = csc_array([[1., 0.], [1., 2.]])
+    >>> Ainv = inv(A)
+    >>> Ainv
+    
+    >>> A.dot(Ainv)
+    
+    >>> A.dot(Ainv).toarray()
+    array([[ 1.,  0.],
+           [ 0.,  1.]])
+
+    .. versionadded:: 0.12.0
+
+    """
+    # Check input
+    if not (issparse(A) or is_pydata_spmatrix(A)):
+        raise TypeError('Input must be a sparse arrays')
+
+    # Use sparse direct solver to solve "AX = I" accurately
+    I = _ident_like(A)
+    Ainv = spsolve(A, I)
+    return Ainv
+
+
+def _onenorm_matrix_power_nnm(A, p):
+    """
+    Compute the 1-norm of a non-negative integer power of a non-negative matrix.
+
+    Parameters
+    ----------
+    A : a square ndarray or matrix or sparse arrays
+        Input matrix with non-negative entries.
+    p : non-negative integer
+        The power to which the matrix is to be raised.
+
+    Returns
+    -------
+    out : float
+        The 1-norm of the matrix power p of A.
+
+    """
+    # Check input
+    if int(p) != p or p < 0:
+        raise ValueError('expected non-negative integer p')
+    p = int(p)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected A to be like a square matrix')
+
+    # Explicitly make a column vector so that this works when A is a
+    # numpy matrix (in addition to ndarray and sparse arrays).
+    v = np.ones((A.shape[0], 1), dtype=float)
+    M = A.T
+    for i in range(p):
+        v = M.dot(v)
+    return np.max(v)
+
+
+def _is_upper_triangular(A):
+    # This function could possibly be of wider interest.
+    if issparse(A):
+        lower_part = scipy.sparse.tril(A, -1)
+        # Check structural upper triangularity,
+        # then coincidental upper triangularity if needed.
+        return lower_part.nnz == 0 or lower_part.count_nonzero() == 0
+    elif is_pydata_spmatrix(A):
+        import sparse
+        lower_part = sparse.tril(A, -1)
+        return lower_part.nnz == 0
+    else:
+        return not np.tril(A, -1).any()
+
+
+def _smart_matrix_product(A, B, alpha=None, structure=None):
+    """
+    A matrix product that knows about sparse and structured matrices.
+
+    Parameters
+    ----------
+    A : 2d ndarray
+        First matrix.
+    B : 2d ndarray
+        Second matrix.
+    alpha : float
+        The matrix product will be scaled by this constant.
+    structure : str, optional
+        A string describing the structure of both matrices `A` and `B`.
+        Only `upper_triangular` is currently supported.
+
+    Returns
+    -------
+    M : 2d ndarray
+        Matrix product of A and B.
+
+    """
+    if len(A.shape) != 2:
+        raise ValueError('expected A to be a rectangular matrix')
+    if len(B.shape) != 2:
+        raise ValueError('expected B to be a rectangular matrix')
+    f = None
+    if structure == UPPER_TRIANGULAR:
+        if (not issparse(A) and not issparse(B)
+                and not is_pydata_spmatrix(A) and not is_pydata_spmatrix(B)):
+            f, = scipy.linalg.get_blas_funcs(('trmm',), (A, B))
+    if f is not None:
+        if alpha is None:
+            alpha = 1.
+        out = f(alpha, A, B)
+    else:
+        if alpha is None:
+            out = A.dot(B)
+        else:
+            out = alpha * A.dot(B)
+    return out
+
+
+class MatrixPowerOperator(LinearOperator):
+
+    def __init__(self, A, p, structure=None):
+        if A.ndim != 2 or A.shape[0] != A.shape[1]:
+            raise ValueError('expected A to be like a square matrix')
+        if p < 0:
+            raise ValueError('expected p to be a non-negative integer')
+        self._A = A
+        self._p = p
+        self._structure = structure
+        self.dtype = A.dtype
+        self.ndim = A.ndim
+        self.shape = A.shape
+
+    def _matvec(self, x):
+        for i in range(self._p):
+            x = self._A.dot(x)
+        return x
+
+    def _rmatvec(self, x):
+        A_T = self._A.T
+        x = x.ravel()
+        for i in range(self._p):
+            x = A_T.dot(x)
+        return x
+
+    def _matmat(self, X):
+        for i in range(self._p):
+            X = _smart_matrix_product(self._A, X, structure=self._structure)
+        return X
+
+    @property
+    def T(self):
+        return MatrixPowerOperator(self._A.T, self._p)
+
+
+class ProductOperator(LinearOperator):
+    """
+    For now, this is limited to products of multiple square matrices.
+    """
+
+    def __init__(self, *args, **kwargs):
+        self._structure = kwargs.get('structure', None)
+        for A in args:
+            if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+                raise ValueError(
+                        'For now, the ProductOperator implementation is '
+                        'limited to the product of multiple square matrices.')
+        if args:
+            n = args[0].shape[0]
+            for A in args:
+                for d in A.shape:
+                    if d != n:
+                        raise ValueError(
+                                'The square matrices of the ProductOperator '
+                                'must all have the same shape.')
+            self.shape = (n, n)
+            self.ndim = len(self.shape)
+        self.dtype = np.result_type(*[x.dtype for x in args])
+        self._operator_sequence = args
+
+    def _matvec(self, x):
+        for A in reversed(self._operator_sequence):
+            x = A.dot(x)
+        return x
+
+    def _rmatvec(self, x):
+        x = x.ravel()
+        for A in self._operator_sequence:
+            x = A.T.dot(x)
+        return x
+
+    def _matmat(self, X):
+        for A in reversed(self._operator_sequence):
+            X = _smart_matrix_product(A, X, structure=self._structure)
+        return X
+
+    @property
+    def T(self):
+        T_args = [A.T for A in reversed(self._operator_sequence)]
+        return ProductOperator(*T_args)
+
+
+def _onenormest_matrix_power(A, p,
+        t=2, itmax=5, compute_v=False, compute_w=False, structure=None):
+    """
+    Efficiently estimate the 1-norm of A^p.
+
+    Parameters
+    ----------
+    A : ndarray
+        Matrix whose 1-norm of a power is to be computed.
+    p : int
+        Non-negative integer power.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+        Larger values take longer and use more memory
+        but give more accurate output.
+    itmax : int, optional
+        Use at most this many iterations.
+    compute_v : bool, optional
+        Request a norm-maximizing linear operator input vector if True.
+    compute_w : bool, optional
+        Request a norm-maximizing linear operator output vector if True.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse arrays.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+
+    """
+    return scipy.sparse.linalg.onenormest(
+            MatrixPowerOperator(A, p, structure=structure))
+
+
+def _onenormest_product(operator_seq,
+        t=2, itmax=5, compute_v=False, compute_w=False, structure=None):
+    """
+    Efficiently estimate the 1-norm of the matrix product of the args.
+
+    Parameters
+    ----------
+    operator_seq : linear operator sequence
+        Matrices whose 1-norm of product is to be computed.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+        Larger values take longer and use more memory
+        but give more accurate output.
+    itmax : int, optional
+        Use at most this many iterations.
+    compute_v : bool, optional
+        Request a norm-maximizing linear operator input vector if True.
+    compute_w : bool, optional
+        Request a norm-maximizing linear operator output vector if True.
+    structure : str, optional
+        A string describing the structure of all operators.
+        Only `upper_triangular` is currently supported.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse arrays.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+
+    """
+    return scipy.sparse.linalg.onenormest(
+            ProductOperator(*operator_seq, structure=structure))
+
+
+class _ExpmPadeHelper:
+    """
+    Help lazily evaluate a matrix exponential.
+
+    The idea is to not do more work than we need for high expm precision,
+    so we lazily compute matrix powers and store or precompute
+    other properties of the matrix.
+
+    """
+
+    def __init__(self, A, structure=None, use_exact_onenorm=False):
+        """
+        Initialize the object.
+
+        Parameters
+        ----------
+        A : a dense or sparse square numpy matrix or ndarray
+            The matrix to be exponentiated.
+        structure : str, optional
+            A string describing the structure of matrix `A`.
+            Only `upper_triangular` is currently supported.
+        use_exact_onenorm : bool, optional
+            If True then only the exact one-norm of matrix powers and products
+            will be used. Otherwise, the one-norm of powers and products
+            may initially be estimated.
+        """
+        self.A = A
+        self._A2 = None
+        self._A4 = None
+        self._A6 = None
+        self._A8 = None
+        self._A10 = None
+        self._d4_exact = None
+        self._d6_exact = None
+        self._d8_exact = None
+        self._d10_exact = None
+        self._d4_approx = None
+        self._d6_approx = None
+        self._d8_approx = None
+        self._d10_approx = None
+        self.ident = _ident_like(A)
+        self.structure = structure
+        self.use_exact_onenorm = use_exact_onenorm
+
+    @property
+    def A2(self):
+        if self._A2 is None:
+            self._A2 = _smart_matrix_product(
+                    self.A, self.A, structure=self.structure)
+        return self._A2
+
+    @property
+    def A4(self):
+        if self._A4 is None:
+            self._A4 = _smart_matrix_product(
+                    self.A2, self.A2, structure=self.structure)
+        return self._A4
+
+    @property
+    def A6(self):
+        if self._A6 is None:
+            self._A6 = _smart_matrix_product(
+                    self.A4, self.A2, structure=self.structure)
+        return self._A6
+
+    @property
+    def A8(self):
+        if self._A8 is None:
+            self._A8 = _smart_matrix_product(
+                    self.A6, self.A2, structure=self.structure)
+        return self._A8
+
+    @property
+    def A10(self):
+        if self._A10 is None:
+            self._A10 = _smart_matrix_product(
+                    self.A4, self.A6, structure=self.structure)
+        return self._A10
+
+    @property
+    def d4_tight(self):
+        if self._d4_exact is None:
+            self._d4_exact = _onenorm(self.A4)**(1/4.)
+        return self._d4_exact
+
+    @property
+    def d6_tight(self):
+        if self._d6_exact is None:
+            self._d6_exact = _onenorm(self.A6)**(1/6.)
+        return self._d6_exact
+
+    @property
+    def d8_tight(self):
+        if self._d8_exact is None:
+            self._d8_exact = _onenorm(self.A8)**(1/8.)
+        return self._d8_exact
+
+    @property
+    def d10_tight(self):
+        if self._d10_exact is None:
+            self._d10_exact = _onenorm(self.A10)**(1/10.)
+        return self._d10_exact
+
+    @property
+    def d4_loose(self):
+        if self.use_exact_onenorm:
+            return self.d4_tight
+        if self._d4_exact is not None:
+            return self._d4_exact
+        else:
+            if self._d4_approx is None:
+                self._d4_approx = _onenormest_matrix_power(self.A2, 2,
+                        structure=self.structure)**(1/4.)
+            return self._d4_approx
+
+    @property
+    def d6_loose(self):
+        if self.use_exact_onenorm:
+            return self.d6_tight
+        if self._d6_exact is not None:
+            return self._d6_exact
+        else:
+            if self._d6_approx is None:
+                self._d6_approx = _onenormest_matrix_power(self.A2, 3,
+                        structure=self.structure)**(1/6.)
+            return self._d6_approx
+
+    @property
+    def d8_loose(self):
+        if self.use_exact_onenorm:
+            return self.d8_tight
+        if self._d8_exact is not None:
+            return self._d8_exact
+        else:
+            if self._d8_approx is None:
+                self._d8_approx = _onenormest_matrix_power(self.A4, 2,
+                        structure=self.structure)**(1/8.)
+            return self._d8_approx
+
+    @property
+    def d10_loose(self):
+        if self.use_exact_onenorm:
+            return self.d10_tight
+        if self._d10_exact is not None:
+            return self._d10_exact
+        else:
+            if self._d10_approx is None:
+                self._d10_approx = _onenormest_product((self.A4, self.A6),
+                        structure=self.structure)**(1/10.)
+            return self._d10_approx
+
+    def pade3(self):
+        b = (120., 60., 12., 1.)
+        U = _smart_matrix_product(self.A,
+                b[3]*self.A2 + b[1]*self.ident,
+                structure=self.structure)
+        V = b[2]*self.A2 + b[0]*self.ident
+        return U, V
+
+    def pade5(self):
+        b = (30240., 15120., 3360., 420., 30., 1.)
+        U = _smart_matrix_product(self.A,
+                b[5]*self.A4 + b[3]*self.A2 + b[1]*self.ident,
+                structure=self.structure)
+        V = b[4]*self.A4 + b[2]*self.A2 + b[0]*self.ident
+        return U, V
+
+    def pade7(self):
+        b = (17297280., 8648640., 1995840., 277200., 25200., 1512., 56., 1.)
+        U = _smart_matrix_product(self.A,
+                b[7]*self.A6 + b[5]*self.A4 + b[3]*self.A2 + b[1]*self.ident,
+                structure=self.structure)
+        V = b[6]*self.A6 + b[4]*self.A4 + b[2]*self.A2 + b[0]*self.ident
+        return U, V
+
+    def pade9(self):
+        b = (17643225600., 8821612800., 2075673600., 302702400., 30270240.,
+                2162160., 110880., 3960., 90., 1.)
+        U = _smart_matrix_product(self.A,
+                (b[9]*self.A8 + b[7]*self.A6 + b[5]*self.A4 +
+                    b[3]*self.A2 + b[1]*self.ident),
+                structure=self.structure)
+        V = (b[8]*self.A8 + b[6]*self.A6 + b[4]*self.A4 +
+                b[2]*self.A2 + b[0]*self.ident)
+        return U, V
+
+    def pade13_scaled(self, s):
+        b = (64764752532480000., 32382376266240000., 7771770303897600.,
+                1187353796428800., 129060195264000., 10559470521600.,
+                670442572800., 33522128640., 1323241920., 40840800., 960960.,
+                16380., 182., 1.)
+        B = self.A * 2**-s
+        B2 = self.A2 * 2**(-2*s)
+        B4 = self.A4 * 2**(-4*s)
+        B6 = self.A6 * 2**(-6*s)
+        U2 = _smart_matrix_product(B6,
+                b[13]*B6 + b[11]*B4 + b[9]*B2,
+                structure=self.structure)
+        U = _smart_matrix_product(B,
+                (U2 + b[7]*B6 + b[5]*B4 +
+                    b[3]*B2 + b[1]*self.ident),
+                structure=self.structure)
+        V2 = _smart_matrix_product(B6,
+                b[12]*B6 + b[10]*B4 + b[8]*B2,
+                structure=self.structure)
+        V = V2 + b[6]*B6 + b[4]*B4 + b[2]*B2 + b[0]*self.ident
+        return U, V
+
+
+def expm(A):
+    """
+    Compute the matrix exponential using Pade approximation.
+
+    Parameters
+    ----------
+    A : (M,M) array_like or sparse array
+        2D Array or Matrix (sparse or dense) to be exponentiated
+
+    Returns
+    -------
+    expA : (M,M) ndarray
+        Matrix exponential of `A`
+
+    Notes
+    -----
+    This is algorithm (6.1) which is a simplification of algorithm (5.1).
+
+    .. versionadded:: 0.12.0
+
+    References
+    ----------
+    .. [1] Awad H. Al-Mohy and Nicholas J. Higham (2009)
+           "A New Scaling and Squaring Algorithm for the Matrix Exponential."
+           SIAM Journal on Matrix Analysis and Applications.
+           31 (3). pp. 970-989. ISSN 1095-7162
+
+    Examples
+    --------
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import expm
+    >>> A = csc_array([[1, 0, 0], [0, 2, 0], [0, 0, 3]])
+    >>> A.toarray()
+    array([[1, 0, 0],
+           [0, 2, 0],
+           [0, 0, 3]], dtype=int64)
+    >>> Aexp = expm(A)
+    >>> Aexp
+    
+    >>> Aexp.toarray()
+    array([[  2.71828183,   0.        ,   0.        ],
+           [  0.        ,   7.3890561 ,   0.        ],
+           [  0.        ,   0.        ,  20.08553692]])
+    """
+    return _expm(A, use_exact_onenorm='auto')
+
+
+def _expm(A, use_exact_onenorm):
+    # Core of expm, separated to allow testing exact and approximate
+    # algorithms.
+
+    # Avoid indiscriminate asarray() to allow sparse or other strange arrays.
+    if isinstance(A, (list, tuple, np.matrix)):
+        A = np.asarray(A)
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected a square matrix')
+
+    # gracefully handle size-0 input,
+    # carefully handling sparse scenario
+    if A.shape == (0, 0):
+        out = np.zeros([0, 0], dtype=A.dtype)
+        if issparse(A) or is_pydata_spmatrix(A):
+            return A.__class__(out)
+        return out
+
+    # Trivial case
+    if A.shape == (1, 1):
+        out = [[np.exp(A[0, 0])]]
+
+        # Avoid indiscriminate casting to ndarray to
+        # allow for sparse or other strange arrays
+        if issparse(A) or is_pydata_spmatrix(A):
+            return A.__class__(out)
+
+        return np.array(out)
+
+    # Ensure input is of float type, to avoid integer overflows etc.
+    if ((isinstance(A, np.ndarray) or issparse(A) or is_pydata_spmatrix(A))
+            and not np.issubdtype(A.dtype, np.inexact)):
+        A = A.astype(float)
+
+    # Detect upper triangularity.
+    structure = UPPER_TRIANGULAR if _is_upper_triangular(A) else None
+
+    if use_exact_onenorm == "auto":
+        # Hardcode a matrix order threshold for exact vs. estimated one-norms.
+        use_exact_onenorm = A.shape[0] < 200
+
+    # Track functions of A to help compute the matrix exponential.
+    h = _ExpmPadeHelper(
+            A, structure=structure, use_exact_onenorm=use_exact_onenorm)
+
+    # Try Pade order 3.
+    eta_1 = max(h.d4_loose, h.d6_loose)
+    if eta_1 < 1.495585217958292e-002 and _ell(h.A, 3) == 0:
+        U, V = h.pade3()
+        return _solve_P_Q(U, V, structure=structure)
+
+    # Try Pade order 5.
+    eta_2 = max(h.d4_tight, h.d6_loose)
+    if eta_2 < 2.539398330063230e-001 and _ell(h.A, 5) == 0:
+        U, V = h.pade5()
+        return _solve_P_Q(U, V, structure=structure)
+
+    # Try Pade orders 7 and 9.
+    eta_3 = max(h.d6_tight, h.d8_loose)
+    if eta_3 < 9.504178996162932e-001 and _ell(h.A, 7) == 0:
+        U, V = h.pade7()
+        return _solve_P_Q(U, V, structure=structure)
+    if eta_3 < 2.097847961257068e+000 and _ell(h.A, 9) == 0:
+        U, V = h.pade9()
+        return _solve_P_Q(U, V, structure=structure)
+
+    # Use Pade order 13.
+    eta_4 = max(h.d8_loose, h.d10_loose)
+    eta_5 = min(eta_3, eta_4)
+    theta_13 = 4.25
+
+    # Choose smallest s>=0 such that 2**(-s) eta_5 <= theta_13
+    if eta_5 == 0:
+        # Nilpotent special case
+        s = 0
+    else:
+        s = max(int(np.ceil(np.log2(eta_5 / theta_13))), 0)
+    s = s + _ell(2**-s * h.A, 13)
+    U, V = h.pade13_scaled(s)
+    X = _solve_P_Q(U, V, structure=structure)
+    if structure == UPPER_TRIANGULAR:
+        # Invoke Code Fragment 2.1.
+        X = _fragment_2_1(X, h.A, s)
+    else:
+        # X = r_13(A)^(2^s) by repeated squaring.
+        for i in range(s):
+            X = X.dot(X)
+    return X
+
+
+def _solve_P_Q(U, V, structure=None):
+    """
+    A helper function for expm_2009.
+
+    Parameters
+    ----------
+    U : ndarray
+        Pade numerator.
+    V : ndarray
+        Pade denominator.
+    structure : str, optional
+        A string describing the structure of both matrices `U` and `V`.
+        Only `upper_triangular` is currently supported.
+
+    Notes
+    -----
+    The `structure` argument is inspired by similar args
+    for theano and cvxopt functions.
+
+    """
+    P = U + V
+    Q = -U + V
+    if issparse(U) or is_pydata_spmatrix(U):
+        return spsolve(Q, P)
+    elif structure is None:
+        return solve(Q, P)
+    elif structure == UPPER_TRIANGULAR:
+        return solve_triangular(Q, P)
+    else:
+        raise ValueError('unsupported matrix structure: ' + str(structure))
+
+
+def _exp_sinch(a, x):
+    """
+    Stably evaluate exp(a)*sinh(x)/x
+
+    Notes
+    -----
+    The strategy of falling back to a sixth order Taylor expansion
+    was suggested by the Spallation Neutron Source docs
+    which was found on the internet by google search.
+    http://www.ornl.gov/~t6p/resources/xal/javadoc/gov/sns/tools/math/ElementaryFunction.html
+    The details of the cutoff point and the Horner-like evaluation
+    was picked without reference to anything in particular.
+
+    Note that sinch is not currently implemented in scipy.special,
+    whereas the "engineer's" definition of sinc is implemented.
+    The implementation of sinc involves a scaling factor of pi
+    that distinguishes it from the "mathematician's" version of sinc.
+
+    """
+
+    # If x is small then use sixth order Taylor expansion.
+    # How small is small? I am using the point where the relative error
+    # of the approximation is less than 1e-14.
+    # If x is large then directly evaluate sinh(x) / x.
+    if abs(x) < 0.0135:
+        x2 = x*x
+        return np.exp(a) * (1 + (x2/6.)*(1 + (x2/20.)*(1 + (x2/42.))))
+    else:
+        return (np.exp(a + x) - np.exp(a - x)) / (2*x)
+
+
+def _eq_10_42(lam_1, lam_2, t_12):
+    """
+    Equation (10.42) of Functions of Matrices: Theory and Computation.
+
+    Notes
+    -----
+    This is a helper function for _fragment_2_1 of expm_2009.
+    Equation (10.42) is on page 251 in the section on Schur algorithms.
+    In particular, section 10.4.3 explains the Schur-Parlett algorithm.
+    expm([[lam_1, t_12], [0, lam_1])
+    =
+    [[exp(lam_1), t_12*exp((lam_1 + lam_2)/2)*sinch((lam_1 - lam_2)/2)],
+    [0, exp(lam_2)]
+    """
+
+    # The plain formula t_12 * (exp(lam_2) - exp(lam_2)) / (lam_2 - lam_1)
+    # apparently suffers from cancellation, according to Higham's textbook.
+    # A nice implementation of sinch, defined as sinh(x)/x,
+    # will apparently work around the cancellation.
+    a = 0.5 * (lam_1 + lam_2)
+    b = 0.5 * (lam_1 - lam_2)
+    return t_12 * _exp_sinch(a, b)
+
+
+def _fragment_2_1(X, T, s):
+    """
+    A helper function for expm_2009.
+
+    Notes
+    -----
+    The argument X is modified in-place, but this modification is not the same
+    as the returned value of the function.
+    This function also takes pains to do things in ways that are compatible
+    with sparse arrays, for example by avoiding fancy indexing
+    and by using methods of the matrices whenever possible instead of
+    using functions of the numpy or scipy libraries themselves.
+
+    """
+    # Form X = r_m(2^-s T)
+    # Replace diag(X) by exp(2^-s diag(T)).
+    n = X.shape[0]
+    diag_T = np.ravel(T.diagonal().copy())
+
+    # Replace diag(X) by exp(2^-s diag(T)).
+    scale = 2 ** -s
+    exp_diag = np.exp(scale * diag_T)
+    for k in range(n):
+        X[k, k] = exp_diag[k]
+
+    for i in range(s-1, -1, -1):
+        X = X.dot(X)
+
+        # Replace diag(X) by exp(2^-i diag(T)).
+        scale = 2 ** -i
+        exp_diag = np.exp(scale * diag_T)
+        for k in range(n):
+            X[k, k] = exp_diag[k]
+
+        # Replace (first) superdiagonal of X by explicit formula
+        # for superdiagonal of exp(2^-i T) from Eq (10.42) of
+        # the author's 2008 textbook
+        # Functions of Matrices: Theory and Computation.
+        for k in range(n-1):
+            lam_1 = scale * diag_T[k]
+            lam_2 = scale * diag_T[k+1]
+            t_12 = scale * T[k, k+1]
+            value = _eq_10_42(lam_1, lam_2, t_12)
+            X[k, k+1] = value
+
+    # Return the updated X matrix.
+    return X
+
+
+def _ell(A, m):
+    """
+    A helper function for expm_2009.
+
+    Parameters
+    ----------
+    A : linear operator
+        A linear operator whose norm of power we care about.
+    m : int
+        The power of the linear operator
+
+    Returns
+    -------
+    value : int
+        A value related to a bound.
+
+    """
+    if len(A.shape) != 2 or A.shape[0] != A.shape[1]:
+        raise ValueError('expected A to be like a square matrix')
+
+    # The c_i are explained in (2.2) and (2.6) of the 2005 expm paper.
+    # They are coefficients of terms of a generating function series expansion.
+    c_i = {3: 100800.,
+           5: 10059033600.,
+           7: 4487938430976000.,
+           9: 5914384781877411840000.,
+           13: 113250775606021113483283660800000000.
+           }
+    abs_c_recip = c_i[m]
+
+    # This is explained after Eq. (1.2) of the 2009 expm paper.
+    # It is the "unit roundoff" of IEEE double precision arithmetic.
+    u = 2**-53
+
+    # Compute the one-norm of matrix power p of abs(A).
+    A_abs_onenorm = _onenorm_matrix_power_nnm(abs(A), 2*m + 1)
+
+    # Treat zero norm as a special case.
+    if not A_abs_onenorm:
+        return 0
+
+    alpha = A_abs_onenorm / (_onenorm(A) * abs_c_recip)
+    log2_alpha_div_u = np.log2(alpha/u)
+    value = int(np.ceil(log2_alpha_div_u / (2 * m)))
+    return max(value, 0)
+
+def matrix_power(A, power):
+    """
+    Raise a square matrix to the integer power, `power`.
+
+    For non-negative integers, ``A**power`` is computed using repeated
+    matrix multiplications. Negative integers are not supported. 
+
+    Parameters
+    ----------
+    A : (M, M) square sparse array or matrix
+        sparse array that will be raised to power `power`
+    power : int
+        Exponent used to raise sparse array `A`
+
+    Returns
+    -------
+    A**power : (M, M) sparse array or matrix
+        The output matrix will be the same shape as A, and will preserve
+        the class of A, but the format of the output may be changed.
+    
+    Notes
+    -----
+    This uses a recursive implementation of the matrix power. For computing
+    the matrix power using a reasonably large `power`, this may be less efficient
+    than computing the product directly, using A @ A @ ... @ A.
+    This is contingent upon the number of nonzero entries in the matrix. 
+
+    .. versionadded:: 1.12.0
+
+    Examples
+    --------
+    >>> from scipy import sparse
+    >>> A = sparse.csc_array([[0,1,0],[1,0,1],[0,1,0]])
+    >>> A.todense()
+    array([[0, 1, 0],
+           [1, 0, 1],
+           [0, 1, 0]])
+    >>> (A @ A).todense()
+    array([[1, 0, 1],
+           [0, 2, 0],
+           [1, 0, 1]])
+    >>> A2 = sparse.linalg.matrix_power(A, 2)
+    >>> A2.todense()
+    array([[1, 0, 1],
+           [0, 2, 0],
+           [1, 0, 1]])
+    >>> A4 = sparse.linalg.matrix_power(A, 4)
+    >>> A4.todense()
+    array([[2, 0, 2],
+           [0, 4, 0],
+           [2, 0, 2]])
+
+    """
+    M, N = A.shape
+    if M != N:
+        raise TypeError('sparse matrix is not square')
+
+    if isintlike(power):
+        power = int(power)
+        if power < 0:
+            raise ValueError('exponent must be >= 0')
+
+        if power == 0:
+            return eye_array(M, dtype=A.dtype)
+
+        if power == 1:
+            return A.copy()
+
+        tmp = matrix_power(A, power // 2)
+        if power % 2:
+            return A @ tmp @ tmp
+        else:
+            return tmp @ tmp
+    else:
+        raise ValueError("exponent must be an integer")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_norm.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_norm.py
new file mode 100644
index 0000000000000000000000000000000000000000..821ed02bb1b1d7c2047d5e5dcb3049cc2bf8ad02
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_norm.py
@@ -0,0 +1,195 @@
+"""Sparse matrix norms.
+
+"""
+import numpy as np
+from scipy.sparse import issparse
+from scipy.sparse.linalg import svds
+from scipy.sparse._sputils import convert_pydata_sparse_to_scipy
+import scipy.sparse as sp
+
+from numpy import sqrt, abs
+
+__all__ = ['norm']
+
+
+def _sparse_frobenius_norm(x):
+    data = sp._sputils._todata(x)
+    return np.linalg.norm(data)
+
+
+def norm(x, ord=None, axis=None):
+    """
+    Norm of a sparse matrix
+
+    This function is able to return one of seven different matrix norms,
+    depending on the value of the ``ord`` parameter.
+
+    Parameters
+    ----------
+    x : a sparse array
+        Input sparse array.
+    ord : {non-zero int, inf, -inf, 'fro'}, optional
+        Order of the norm (see table under ``Notes``). inf means numpy's
+        `inf` object.
+    axis : {int, 2-tuple of ints, None}, optional
+        If `axis` is an integer, it specifies the axis of `x` along which to
+        compute the vector norms.  If `axis` is a 2-tuple, it specifies the
+        axes that hold 2-D matrices, and the matrix norms of these matrices
+        are computed.  If `axis` is None then either a vector norm (when `x`
+        is 1-D) or a matrix norm (when `x` is 2-D) is returned.
+
+    Returns
+    -------
+    n : float or ndarray
+
+    Notes
+    -----
+    Some of the ord are not implemented because some associated functions like,
+    _multi_svd_norm, are not yet available for sparse array.
+
+    This docstring is modified based on numpy.linalg.norm.
+    https://github.com/numpy/numpy/blob/main/numpy/linalg/linalg.py
+
+    The following norms can be calculated:
+
+    =====  ============================
+    ord    norm for sparse arrays
+    =====  ============================
+    None   Frobenius norm
+    'fro'  Frobenius norm
+    inf    max(sum(abs(x), axis=1))
+    -inf   min(sum(abs(x), axis=1))
+    0      abs(x).sum(axis=axis)
+    1      max(sum(abs(x), axis=0))
+    -1     min(sum(abs(x), axis=0))
+    2      Spectral norm (the largest singular value)
+    -2     Not implemented
+    other  Not implemented
+    =====  ============================
+
+    The Frobenius norm is given by [1]_:
+
+        :math:`||A||_F = [\\sum_{i,j} abs(a_{i,j})^2]^{1/2}`
+
+    References
+    ----------
+    .. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*,
+        Baltimore, MD, Johns Hopkins University Press, 1985, pg. 15
+
+    Examples
+    --------
+    >>> from scipy.sparse import csr_array, diags_array
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import norm
+    >>> a = np.arange(9) - 4
+    >>> a
+    array([-4, -3, -2, -1, 0, 1, 2, 3, 4])
+    >>> b = a.reshape((3, 3))
+    >>> b
+    array([[-4, -3, -2],
+           [-1, 0, 1],
+           [ 2, 3, 4]])
+
+    >>> b = csr_array(b)
+    >>> norm(b)
+    7.745966692414834
+    >>> norm(b, 'fro')
+    7.745966692414834
+    >>> norm(b, np.inf)
+    9
+    >>> norm(b, -np.inf)
+    2
+    >>> norm(b, 1)
+    7
+    >>> norm(b, -1)
+    6
+
+    The matrix 2-norm or the spectral norm is the largest singular
+    value, computed approximately and with limitations.
+
+    >>> b = diags_array([-1, 1], [0, 1], shape=(9, 10))
+    >>> norm(b, 2)
+    1.9753...
+    """
+    x = convert_pydata_sparse_to_scipy(x, target_format="csr")
+    if not issparse(x):
+        raise TypeError("input is not sparse. use numpy.linalg.norm")
+
+    # Check the default case first and handle it immediately.
+    if axis is None and ord in (None, 'fro', 'f'):
+        return _sparse_frobenius_norm(x)
+
+    # Some norms require functions that are not implemented for all types.
+    x = x.tocsr()
+
+    if axis is None:
+        axis = tuple(range(x.ndim))
+    elif not isinstance(axis, tuple):
+        msg = "'axis' must be None, an integer or a tuple of integers"
+        try:
+            int_axis = int(axis)
+        except TypeError as e:
+            raise TypeError(msg) from e
+        if axis != int_axis:
+            raise TypeError(msg)
+        axis = (int_axis,)
+
+    nd = x.ndim
+    if len(axis) == 2:
+        row_axis, col_axis = axis
+        if not (-nd <= row_axis < nd and -nd <= col_axis < nd):
+            message = f'Invalid axis {axis!r} for an array with shape {x.shape!r}'
+            raise ValueError(message)
+        if row_axis % nd == col_axis % nd:
+            raise ValueError('Duplicate axes given.')
+        if ord == 2:
+            # Only solver="lobpcg" supports all numpy dtypes
+            _, s, _ = svds(x, k=1, solver="lobpcg")
+            return s[0]
+        elif ord == -2:
+            raise NotImplementedError
+            #return _multi_svd_norm(x, row_axis, col_axis, amin)
+        elif ord == 1:
+            return abs(x).sum(axis=row_axis).max()
+        elif ord == np.inf:
+            return abs(x).sum(axis=col_axis).max()
+        elif ord == -1:
+            return abs(x).sum(axis=row_axis).min()
+        elif ord == -np.inf:
+            return abs(x).sum(axis=col_axis).min()
+        elif ord in (None, 'f', 'fro'):
+            # The axis order does not matter for this norm.
+            return _sparse_frobenius_norm(x)
+        else:
+            raise ValueError("Invalid norm order for matrices.")
+    elif len(axis) == 1:
+        a, = axis
+        if not (-nd <= a < nd):
+            message = f'Invalid axis {axis!r} for an array with shape {x.shape!r}'
+            raise ValueError(message)
+        if ord == np.inf:
+            M = abs(x).max(axis=a)
+        elif ord == -np.inf:
+            M = abs(x).min(axis=a)
+        elif ord == 0:
+            # Zero norm
+            M = (x != 0).sum(axis=a)
+        elif ord == 1:
+            # special case for speedup
+            M = abs(x).sum(axis=a)
+        elif ord in (2, None):
+            M = sqrt(abs(x).power(2).sum(axis=a))
+        else:
+            try:
+                ord + 1
+            except TypeError as e:
+                raise ValueError('Invalid norm order for vectors.') from e
+            M = np.power(abs(x).power(ord).sum(axis=a), 1 / ord)
+        if hasattr(M, 'toarray'):
+            return M.toarray().ravel()
+        elif hasattr(M, 'A'):
+            return M.A.ravel()
+        else:
+            return M.ravel()
+    else:
+        raise ValueError("Improper number of dimensions to norm.")
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_onenormest.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_onenormest.py
new file mode 100644
index 0000000000000000000000000000000000000000..a9e806ab6fbd5a2910de823a1046bce225d60a13
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_onenormest.py
@@ -0,0 +1,467 @@
+"""Sparse block 1-norm estimator.
+"""
+
+import numpy as np
+from scipy.sparse.linalg import aslinearoperator
+
+
+__all__ = ['onenormest']
+
+
+def onenormest(A, t=2, itmax=5, compute_v=False, compute_w=False):
+    """
+    Compute a lower bound of the 1-norm of a sparse array.
+
+    Parameters
+    ----------
+    A : ndarray or other linear operator
+        A linear operator that can be transposed and that can
+        produce matrix products.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+        Larger values take longer and use more memory
+        but give more accurate output.
+    itmax : int, optional
+        Use at most this many iterations.
+    compute_v : bool, optional
+        Request a norm-maximizing linear operator input vector if True.
+    compute_w : bool, optional
+        Request a norm-maximizing linear operator output vector if True.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse array.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+
+    Notes
+    -----
+    This is algorithm 2.4 of [1].
+
+    In [2] it is described as follows.
+    "This algorithm typically requires the evaluation of
+    about 4t matrix-vector products and almost invariably
+    produces a norm estimate (which is, in fact, a lower
+    bound on the norm) correct to within a factor 3."
+
+    .. versionadded:: 0.13.0
+
+    References
+    ----------
+    .. [1] Nicholas J. Higham and Francoise Tisseur (2000),
+           "A Block Algorithm for Matrix 1-Norm Estimation,
+           with an Application to 1-Norm Pseudospectra."
+           SIAM J. Matrix Anal. Appl. Vol. 21, No. 4, pp. 1185-1201.
+
+    .. [2] Awad H. Al-Mohy and Nicholas J. Higham (2009),
+           "A new scaling and squaring algorithm for the matrix exponential."
+           SIAM J. Matrix Anal. Appl. Vol. 31, No. 3, pp. 970-989.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse import csc_array
+    >>> from scipy.sparse.linalg import onenormest
+    >>> A = csc_array([[1., 0., 0.], [5., 8., 2.], [0., -1., 0.]], dtype=float)
+    >>> A.toarray()
+    array([[ 1.,  0.,  0.],
+           [ 5.,  8.,  2.],
+           [ 0., -1.,  0.]])
+    >>> onenormest(A)
+    9.0
+    >>> np.linalg.norm(A.toarray(), ord=1)
+    9.0
+    """
+
+    # Check the input.
+    A = aslinearoperator(A)
+    if A.shape[0] != A.shape[1]:
+        raise ValueError('expected the operator to act like a square matrix')
+
+    # If the operator size is small compared to t,
+    # then it is easier to compute the exact norm.
+    # Otherwise estimate the norm.
+    n = A.shape[1]
+    if t >= n:
+        A_explicit = np.asarray(aslinearoperator(A).matmat(np.identity(n)))
+        if A_explicit.shape != (n, n):
+            raise Exception('internal error: ',
+                    'unexpected shape ' + str(A_explicit.shape))
+        col_abs_sums = abs(A_explicit).sum(axis=0)
+        if col_abs_sums.shape != (n, ):
+            raise Exception('internal error: ',
+                    'unexpected shape ' + str(col_abs_sums.shape))
+        argmax_j = np.argmax(col_abs_sums)
+        v = elementary_vector(n, argmax_j)
+        w = A_explicit[:, argmax_j]
+        est = col_abs_sums[argmax_j]
+    else:
+        est, v, w, nmults, nresamples = _onenormest_core(A, A.H, t, itmax)
+
+    # Report the norm estimate along with some certificates of the estimate.
+    if compute_v or compute_w:
+        result = (est,)
+        if compute_v:
+            result += (v,)
+        if compute_w:
+            result += (w,)
+        return result
+    else:
+        return est
+
+
+def _blocked_elementwise(func):
+    """
+    Decorator for an elementwise function, to apply it blockwise along
+    first dimension, to avoid excessive memory usage in temporaries.
+    """
+    block_size = 2**20
+
+    def wrapper(x):
+        if x.shape[0] < block_size:
+            return func(x)
+        else:
+            y0 = func(x[:block_size])
+            y = np.zeros((x.shape[0],) + y0.shape[1:], dtype=y0.dtype)
+            y[:block_size] = y0
+            del y0
+            for j in range(block_size, x.shape[0], block_size):
+                y[j:j+block_size] = func(x[j:j+block_size])
+            return y
+    return wrapper
+
+
+@_blocked_elementwise
+def sign_round_up(X):
+    """
+    This should do the right thing for both real and complex matrices.
+
+    From Higham and Tisseur:
+    "Everything in this section remains valid for complex matrices
+    provided that sign(A) is redefined as the matrix (aij / |aij|)
+    (and sign(0) = 1) transposes are replaced by conjugate transposes."
+
+    """
+    Y = X.copy()
+    Y[Y == 0] = 1
+    Y /= np.abs(Y)
+    return Y
+
+
+@_blocked_elementwise
+def _max_abs_axis1(X):
+    return np.max(np.abs(X), axis=1)
+
+
+def _sum_abs_axis0(X):
+    block_size = 2**20
+    r = None
+    for j in range(0, X.shape[0], block_size):
+        y = np.sum(np.abs(X[j:j+block_size]), axis=0)
+        if r is None:
+            r = y
+        else:
+            r += y
+    return r
+
+
+def elementary_vector(n, i):
+    v = np.zeros(n, dtype=float)
+    v[i] = 1
+    return v
+
+
+def vectors_are_parallel(v, w):
+    # Columns are considered parallel when they are equal or negative.
+    # Entries are required to be in {-1, 1},
+    # which guarantees that the magnitudes of the vectors are identical.
+    if v.ndim != 1 or v.shape != w.shape:
+        raise ValueError('expected conformant vectors with entries in {-1,1}')
+    n = v.shape[0]
+    return np.dot(v, w) == n
+
+
+def every_col_of_X_is_parallel_to_a_col_of_Y(X, Y):
+    for v in X.T:
+        if not any(vectors_are_parallel(v, w) for w in Y.T):
+            return False
+    return True
+
+
+def column_needs_resampling(i, X, Y=None):
+    # column i of X needs resampling if either
+    # it is parallel to a previous column of X or
+    # it is parallel to a column of Y
+    n, t = X.shape
+    v = X[:, i]
+    if any(vectors_are_parallel(v, X[:, j]) for j in range(i)):
+        return True
+    if Y is not None:
+        if any(vectors_are_parallel(v, w) for w in Y.T):
+            return True
+    return False
+
+
+def resample_column(i, X):
+    X[:, i] = np.random.randint(0, 2, size=X.shape[0])*2 - 1
+
+
+def less_than_or_close(a, b):
+    return np.allclose(a, b) or (a < b)
+
+
+def _algorithm_2_2(A, AT, t):
+    """
+    This is Algorithm 2.2.
+
+    Parameters
+    ----------
+    A : ndarray or other linear operator
+        A linear operator that can produce matrix products.
+    AT : ndarray or other linear operator
+        The transpose of A.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+
+    Returns
+    -------
+    g : sequence
+        A non-negative decreasing vector
+        such that g[j] is a lower bound for the 1-norm
+        of the column of A of jth largest 1-norm.
+        The first entry of this vector is therefore a lower bound
+        on the 1-norm of the linear operator A.
+        This sequence has length t.
+    ind : sequence
+        The ith entry of ind is the index of the column A whose 1-norm
+        is given by g[i].
+        This sequence of indices has length t, and its entries are
+        chosen from range(n), possibly with repetition,
+        where n is the order of the operator A.
+
+    Notes
+    -----
+    This algorithm is mainly for testing.
+    It uses the 'ind' array in a way that is similar to
+    its usage in algorithm 2.4. This algorithm 2.2 may be easier to test,
+    so it gives a chance of uncovering bugs related to indexing
+    which could have propagated less noticeably to algorithm 2.4.
+
+    """
+    A_linear_operator = aslinearoperator(A)
+    AT_linear_operator = aslinearoperator(AT)
+    n = A_linear_operator.shape[0]
+
+    # Initialize the X block with columns of unit 1-norm.
+    X = np.ones((n, t))
+    if t > 1:
+        X[:, 1:] = np.random.randint(0, 2, size=(n, t-1))*2 - 1
+    X /= float(n)
+
+    # Iteratively improve the lower bounds.
+    # Track extra things, to assert invariants for debugging.
+    g_prev = None
+    h_prev = None
+    k = 1
+    ind = range(t)
+    while True:
+        Y = np.asarray(A_linear_operator.matmat(X))
+        g = _sum_abs_axis0(Y)
+        best_j = np.argmax(g)
+        g.sort()
+        g = g[::-1]
+        S = sign_round_up(Y)
+        Z = np.asarray(AT_linear_operator.matmat(S))
+        h = _max_abs_axis1(Z)
+
+        # If this algorithm runs for fewer than two iterations,
+        # then its return values do not have the properties indicated
+        # in the description of the algorithm.
+        # In particular, the entries of g are not 1-norms of any
+        # column of A until the second iteration.
+        # Therefore we will require the algorithm to run for at least
+        # two iterations, even though this requirement is not stated
+        # in the description of the algorithm.
+        if k >= 2:
+            if less_than_or_close(max(h), np.dot(Z[:, best_j], X[:, best_j])):
+                break
+        ind = np.argsort(h)[::-1][:t]
+        h = h[ind]
+        for j in range(t):
+            X[:, j] = elementary_vector(n, ind[j])
+
+        # Check invariant (2.2).
+        if k >= 2:
+            if not less_than_or_close(g_prev[0], h_prev[0]):
+                raise Exception('invariant (2.2) is violated')
+            if not less_than_or_close(h_prev[0], g[0]):
+                raise Exception('invariant (2.2) is violated')
+
+        # Check invariant (2.3).
+        if k >= 3:
+            for j in range(t):
+                if not less_than_or_close(g[j], g_prev[j]):
+                    raise Exception('invariant (2.3) is violated')
+
+        # Update for the next iteration.
+        g_prev = g
+        h_prev = h
+        k += 1
+
+    # Return the lower bounds and the corresponding column indices.
+    return g, ind
+
+
+def _onenormest_core(A, AT, t, itmax):
+    """
+    Compute a lower bound of the 1-norm of a sparse array.
+
+    Parameters
+    ----------
+    A : ndarray or other linear operator
+        A linear operator that can produce matrix products.
+    AT : ndarray or other linear operator
+        The transpose of A.
+    t : int, optional
+        A positive parameter controlling the tradeoff between
+        accuracy versus time and memory usage.
+    itmax : int, optional
+        Use at most this many iterations.
+
+    Returns
+    -------
+    est : float
+        An underestimate of the 1-norm of the sparse array.
+    v : ndarray, optional
+        The vector such that ||Av||_1 == est*||v||_1.
+        It can be thought of as an input to the linear operator
+        that gives an output with particularly large norm.
+    w : ndarray, optional
+        The vector Av which has relatively large 1-norm.
+        It can be thought of as an output of the linear operator
+        that is relatively large in norm compared to the input.
+    nmults : int, optional
+        The number of matrix products that were computed.
+    nresamples : int, optional
+        The number of times a parallel column was observed,
+        necessitating a re-randomization of the column.
+
+    Notes
+    -----
+    This is algorithm 2.4.
+
+    """
+    # This function is a more or less direct translation
+    # of Algorithm 2.4 from the Higham and Tisseur (2000) paper.
+    A_linear_operator = aslinearoperator(A)
+    AT_linear_operator = aslinearoperator(AT)
+    if itmax < 2:
+        raise ValueError('at least two iterations are required')
+    if t < 1:
+        raise ValueError('at least one column is required')
+    n = A.shape[0]
+    if t >= n:
+        raise ValueError('t should be smaller than the order of A')
+    # Track the number of big*small matrix multiplications
+    # and the number of resamplings.
+    nmults = 0
+    nresamples = 0
+    # "We now explain our choice of starting matrix.  We take the first
+    # column of X to be the vector of 1s [...] This has the advantage that
+    # for a matrix with nonnegative elements the algorithm converges
+    # with an exact estimate on the second iteration, and such matrices
+    # arise in applications [...]"
+    X = np.ones((n, t), dtype=float)
+    # "The remaining columns are chosen as rand{-1,1},
+    # with a check for and correction of parallel columns,
+    # exactly as for S in the body of the algorithm."
+    if t > 1:
+        for i in range(1, t):
+            # These are technically initial samples, not resamples,
+            # so the resampling count is not incremented.
+            resample_column(i, X)
+        for i in range(t):
+            while column_needs_resampling(i, X):
+                resample_column(i, X)
+                nresamples += 1
+    # "Choose starting matrix X with columns of unit 1-norm."
+    X /= float(n)
+    # "indices of used unit vectors e_j"
+    ind_hist = np.zeros(0, dtype=np.intp)
+    est_old = 0
+    S = np.zeros((n, t), dtype=float)
+    k = 1
+    ind = None
+    while True:
+        Y = np.asarray(A_linear_operator.matmat(X))
+        nmults += 1
+        mags = _sum_abs_axis0(Y)
+        est = np.max(mags)
+        best_j = np.argmax(mags)
+        if est > est_old or k == 2:
+            if k >= 2:
+                ind_best = ind[best_j]
+            w = Y[:, best_j]
+        # (1)
+        if k >= 2 and est <= est_old:
+            est = est_old
+            break
+        est_old = est
+        S_old = S
+        if k > itmax:
+            break
+        S = sign_round_up(Y)
+        del Y
+        # (2)
+        if every_col_of_X_is_parallel_to_a_col_of_Y(S, S_old):
+            break
+        if t > 1:
+            # "Ensure that no column of S is parallel to another column of S
+            # or to a column of S_old by replacing columns of S by rand{-1,1}."
+            for i in range(t):
+                while column_needs_resampling(i, S, S_old):
+                    resample_column(i, S)
+                    nresamples += 1
+        del S_old
+        # (3)
+        Z = np.asarray(AT_linear_operator.matmat(S))
+        nmults += 1
+        h = _max_abs_axis1(Z)
+        del Z
+        # (4)
+        if k >= 2 and max(h) == h[ind_best]:
+            break
+        # "Sort h so that h_first >= ... >= h_last
+        # and re-order ind correspondingly."
+        #
+        # Later on, we will need at most t+len(ind_hist) largest
+        # entries, so drop the rest
+        ind = np.argsort(h)[::-1][:t+len(ind_hist)].copy()
+        del h
+        if t > 1:
+            # (5)
+            # Break if the most promising t vectors have been visited already.
+            if np.isin(ind[:t], ind_hist).all():
+                break
+            # Put the most promising unvisited vectors at the front of the list
+            # and put the visited vectors at the end of the list.
+            # Preserve the order of the indices induced by the ordering of h.
+            seen = np.isin(ind, ind_hist)
+            ind = np.concatenate((ind[~seen], ind[seen]))
+        for j in range(t):
+            X[:, j] = elementary_vector(n, ind[j])
+
+        new_ind = ind[:t][~np.isin(ind[:t], ind_hist)]
+        ind_hist = np.concatenate((ind_hist, new_ind))
+        k += 1
+    v = elementary_vector(n, ind_best)
+    return est, v, w, nmults, nresamples
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_special_sparse_arrays.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_special_sparse_arrays.py
new file mode 100644
index 0000000000000000000000000000000000000000..9d7415e1ec9a7e03b94dd8893935d46294b4b215
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_special_sparse_arrays.py
@@ -0,0 +1,948 @@
+import numpy as np
+from scipy.sparse.linalg import LinearOperator
+from scipy.sparse import kron, eye, dia_array
+
+__all__ = ['LaplacianNd']
+# Sakurai and Mikota classes are intended for tests and benchmarks
+# and explicitly not included in the public API of this module.
+
+
+class LaplacianNd(LinearOperator):
+    """
+    The grid Laplacian in ``N`` dimensions and its eigenvalues/eigenvectors.
+
+    Construct Laplacian on a uniform rectangular grid in `N` dimensions
+    and output its eigenvalues and eigenvectors.
+    The Laplacian ``L`` is square, negative definite, real symmetric array
+    with signed integer entries and zeros otherwise.
+
+    Parameters
+    ----------
+    grid_shape : tuple
+        A tuple of integers of length ``N`` (corresponding to the dimension of
+        the Lapacian), where each entry gives the size of that dimension. The
+        Laplacian matrix is square of the size ``np.prod(grid_shape)``.
+    boundary_conditions : {'neumann', 'dirichlet', 'periodic'}, optional
+        The type of the boundary conditions on the boundaries of the grid.
+        Valid values are ``'dirichlet'`` or ``'neumann'``(default) or
+        ``'periodic'``.
+    dtype : dtype
+        Numerical type of the array. Default is ``np.int8``.
+
+    Methods
+    -------
+    toarray()
+        Construct a dense array from Laplacian data
+    tosparse()
+        Construct a sparse array from Laplacian data
+    eigenvalues(m=None)
+        Construct a 1D array of `m` largest (smallest in absolute value)
+        eigenvalues of the Laplacian matrix in ascending order.
+    eigenvectors(m=None):
+        Construct the array with columns made of `m` eigenvectors (``float``)
+        of the ``Nd`` Laplacian corresponding to the `m` ordered eigenvalues.
+
+    .. versionadded:: 1.12.0
+
+    Notes
+    -----
+    Compared to the MATLAB/Octave implementation [1] of 1-, 2-, and 3-D
+    Laplacian, this code allows the arbitrary N-D case and the matrix-free
+    callable option, but is currently limited to pure Dirichlet, Neumann or
+    Periodic boundary conditions only.
+
+    The Laplacian matrix of a graph (`scipy.sparse.csgraph.laplacian`) of a
+    rectangular grid corresponds to the negative Laplacian with the Neumann
+    conditions, i.e., ``boundary_conditions = 'neumann'``.
+
+    All eigenvalues and eigenvectors of the discrete Laplacian operator for
+    an ``N``-dimensional  regular grid of shape `grid_shape` with the grid
+    step size ``h=1`` are analytically known [2].
+
+    References
+    ----------
+    .. [1] https://github.com/lobpcg/blopex/blob/master/blopex_\
+tools/matlab/laplacian/laplacian.m
+    .. [2] "Eigenvalues and eigenvectors of the second derivative", Wikipedia
+           https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors_\
+of_the_second_derivative
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg import LaplacianNd
+    >>> from scipy.sparse import diags, csgraph
+    >>> from scipy.linalg import eigvalsh
+
+    The one-dimensional Laplacian demonstrated below for pure Neumann boundary
+    conditions on a regular grid with ``n=6`` grid points is exactly the
+    negative graph Laplacian for the undirected linear graph with ``n``
+    vertices using the sparse adjacency matrix ``G`` represented by the
+    famous tri-diagonal matrix:
+
+    >>> n = 6
+    >>> G = diags(np.ones(n - 1), 1, format='csr')
+    >>> Lf = csgraph.laplacian(G, symmetrized=True, form='function')
+    >>> grid_shape = (n, )
+    >>> lap = LaplacianNd(grid_shape, boundary_conditions='neumann')
+    >>> np.array_equal(lap.matmat(np.eye(n)), -Lf(np.eye(n)))
+    True
+
+    Since all matrix entries of the Laplacian are integers, ``'int8'`` is
+    the default dtype for storing matrix representations.
+
+    >>> lap.tosparse()
+    
+    >>> lap.toarray()
+    array([[-1,  1,  0,  0,  0,  0],
+           [ 1, -2,  1,  0,  0,  0],
+           [ 0,  1, -2,  1,  0,  0],
+           [ 0,  0,  1, -2,  1,  0],
+           [ 0,  0,  0,  1, -2,  1],
+           [ 0,  0,  0,  0,  1, -1]], dtype=int8)
+    >>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
+    True
+    >>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
+    True
+
+    Any number of extreme eigenvalues and/or eigenvectors can be computed.
+    
+    >>> lap = LaplacianNd(grid_shape, boundary_conditions='periodic')
+    >>> lap.eigenvalues()
+    array([-4., -3., -3., -1., -1.,  0.])
+    >>> lap.eigenvalues()[-2:]
+    array([-1.,  0.])
+    >>> lap.eigenvalues(2)
+    array([-1.,  0.])
+    >>> lap.eigenvectors(1)
+    array([[0.40824829],
+           [0.40824829],
+           [0.40824829],
+           [0.40824829],
+           [0.40824829],
+           [0.40824829]])
+    >>> lap.eigenvectors(2)
+    array([[ 0.5       ,  0.40824829],
+           [ 0.        ,  0.40824829],
+           [-0.5       ,  0.40824829],
+           [-0.5       ,  0.40824829],
+           [ 0.        ,  0.40824829],
+           [ 0.5       ,  0.40824829]])
+    >>> lap.eigenvectors()
+    array([[ 0.40824829,  0.28867513,  0.28867513,  0.5       ,  0.5       ,
+             0.40824829],
+           [-0.40824829, -0.57735027, -0.57735027,  0.        ,  0.        ,
+             0.40824829],
+           [ 0.40824829,  0.28867513,  0.28867513, -0.5       , -0.5       ,
+             0.40824829],
+           [-0.40824829,  0.28867513,  0.28867513, -0.5       , -0.5       ,
+             0.40824829],
+           [ 0.40824829, -0.57735027, -0.57735027,  0.        ,  0.        ,
+             0.40824829],
+           [-0.40824829,  0.28867513,  0.28867513,  0.5       ,  0.5       ,
+             0.40824829]])
+
+    The two-dimensional Laplacian is illustrated on a regular grid with
+    ``grid_shape = (2, 3)`` points in each dimension.
+
+    >>> grid_shape = (2, 3)
+    >>> n = np.prod(grid_shape)
+
+    Numeration of grid points is as follows:
+
+    >>> np.arange(n).reshape(grid_shape + (-1,))
+    array([[[0],
+            [1],
+            [2]],
+    
+           [[3],
+            [4],
+            [5]]])
+
+    Each of the boundary conditions ``'dirichlet'``, ``'periodic'``, and
+    ``'neumann'`` is illustrated separately; with ``'dirichlet'``
+
+    >>> lap = LaplacianNd(grid_shape, boundary_conditions='dirichlet')
+    >>> lap.tosparse()
+    
+    >>> lap.toarray()
+    array([[-4,  1,  0,  1,  0,  0],
+           [ 1, -4,  1,  0,  1,  0],
+           [ 0,  1, -4,  0,  0,  1],
+           [ 1,  0,  0, -4,  1,  0],
+           [ 0,  1,  0,  1, -4,  1],
+           [ 0,  0,  1,  0,  1, -4]], dtype=int8)
+    >>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
+    True
+    >>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
+    True
+    >>> lap.eigenvalues()
+    array([-6.41421356, -5.        , -4.41421356, -3.58578644, -3.        ,
+           -1.58578644])
+    >>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
+    >>> np.allclose(lap.eigenvalues(), eigvals)
+    True
+    >>> np.allclose(lap.toarray() @ lap.eigenvectors(),
+    ...             lap.eigenvectors() @ np.diag(lap.eigenvalues()))
+    True
+
+    with ``'periodic'``
+
+    >>> lap = LaplacianNd(grid_shape, boundary_conditions='periodic')
+    >>> lap.tosparse()
+    
+    >>> lap.toarray()
+        array([[-4,  1,  1,  2,  0,  0],
+               [ 1, -4,  1,  0,  2,  0],
+               [ 1,  1, -4,  0,  0,  2],
+               [ 2,  0,  0, -4,  1,  1],
+               [ 0,  2,  0,  1, -4,  1],
+               [ 0,  0,  2,  1,  1, -4]], dtype=int8)
+    >>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
+    True
+    >>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
+    True
+    >>> lap.eigenvalues()
+    array([-7., -7., -4., -3., -3.,  0.])
+    >>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
+    >>> np.allclose(lap.eigenvalues(), eigvals)
+    True
+    >>> np.allclose(lap.toarray() @ lap.eigenvectors(),
+    ...             lap.eigenvectors() @ np.diag(lap.eigenvalues()))
+    True
+
+    and with ``'neumann'``
+
+    >>> lap = LaplacianNd(grid_shape, boundary_conditions='neumann')
+    >>> lap.tosparse()
+    
+    >>> lap.toarray()
+    array([[-2,  1,  0,  1,  0,  0],
+           [ 1, -3,  1,  0,  1,  0],
+           [ 0,  1, -2,  0,  0,  1],
+           [ 1,  0,  0, -2,  1,  0],
+           [ 0,  1,  0,  1, -3,  1],
+           [ 0,  0,  1,  0,  1, -2]], dtype=int8)
+    >>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
+    True
+    >>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
+    True
+    >>> lap.eigenvalues()
+    array([-5., -3., -3., -2., -1.,  0.])
+    >>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
+    >>> np.allclose(lap.eigenvalues(), eigvals)
+    True
+    >>> np.allclose(lap.toarray() @ lap.eigenvectors(),
+    ...             lap.eigenvectors() @ np.diag(lap.eigenvalues()))
+    True
+
+    """
+
+    def __init__(self, grid_shape, *,
+                 boundary_conditions='neumann',
+                 dtype=np.int8):
+
+        if boundary_conditions not in ('dirichlet', 'neumann', 'periodic'):
+            raise ValueError(
+                f"Unknown value {boundary_conditions!r} is given for "
+                "'boundary_conditions' parameter. The valid options are "
+                "'dirichlet', 'periodic', and 'neumann' (default)."
+            )
+
+        self.grid_shape = grid_shape
+        self.boundary_conditions = boundary_conditions
+        # LaplacianNd folds all dimensions in `grid_shape` into a single one
+        N = np.prod(grid_shape)
+        super().__init__(dtype=dtype, shape=(N, N))
+
+    def _eigenvalue_ordering(self, m):
+        """Compute `m` largest eigenvalues in each of the ``N`` directions,
+        i.e., up to ``m * N`` total, order them and return `m` largest.
+        """
+        grid_shape = self.grid_shape
+        if m is None:
+            indices = np.indices(grid_shape)
+            Leig = np.zeros(grid_shape)
+        else:
+            grid_shape_min = min(grid_shape,
+                                 tuple(np.ones_like(grid_shape) * m))
+            indices = np.indices(grid_shape_min)
+            Leig = np.zeros(grid_shape_min)
+
+        for j, n in zip(indices, grid_shape):
+            if self.boundary_conditions == 'dirichlet':
+                Leig += -4 * np.sin(np.pi * (j + 1) / (2 * (n + 1))) ** 2
+            elif self.boundary_conditions == 'neumann':
+                Leig += -4 * np.sin(np.pi * j / (2 * n)) ** 2
+            else:  # boundary_conditions == 'periodic'
+                Leig += -4 * np.sin(np.pi * np.floor((j + 1) / 2) / n) ** 2
+
+        Leig_ravel = Leig.ravel()
+        ind = np.argsort(Leig_ravel)
+        eigenvalues = Leig_ravel[ind]
+        if m is not None:
+            eigenvalues = eigenvalues[-m:]
+            ind = ind[-m:]
+
+        return eigenvalues, ind
+
+    def eigenvalues(self, m=None):
+        """Return the requested number of eigenvalues.
+        
+        Parameters
+        ----------
+        m : int, optional
+            The positive number of smallest eigenvalues to return.
+            If not provided, then all eigenvalues will be returned.
+            
+        Returns
+        -------
+        eigenvalues : float array
+            The requested `m` smallest or all eigenvalues, in ascending order.
+        """
+        eigenvalues, _ = self._eigenvalue_ordering(m)
+        return eigenvalues
+
+    def _ev1d(self, j, n):
+        """Return 1 eigenvector in 1d with index `j`
+        and number of grid points `n` where ``j < n``. 
+        """
+        if self.boundary_conditions == 'dirichlet':
+            i = np.pi * (np.arange(n) + 1) / (n + 1)
+            ev = np.sqrt(2. / (n + 1.)) * np.sin(i * (j + 1))
+        elif self.boundary_conditions == 'neumann':
+            i = np.pi * (np.arange(n) + 0.5) / n
+            ev = np.sqrt((1. if j == 0 else 2.) / n) * np.cos(i * j)
+        else:  # boundary_conditions == 'periodic'
+            if j == 0:
+                ev = np.sqrt(1. / n) * np.ones(n)
+            elif j + 1 == n and n % 2 == 0:
+                ev = np.sqrt(1. / n) * np.tile([1, -1], n//2)
+            else:
+                i = 2. * np.pi * (np.arange(n) + 0.5) / n
+                ev = np.sqrt(2. / n) * np.cos(i * np.floor((j + 1) / 2))
+        # make small values exact zeros correcting round-off errors
+        # due to symmetry of eigenvectors the exact 0. is correct 
+        ev[np.abs(ev) < np.finfo(np.float64).eps] = 0.
+        return ev
+
+    def _one_eve(self, k):
+        """Return 1 eigenvector in Nd with multi-index `j`
+        as a tensor product of the corresponding 1d eigenvectors. 
+        """
+        phi = [self._ev1d(j, n) for j, n in zip(k, self.grid_shape)]
+        result = phi[0]
+        for phi in phi[1:]:
+            result = np.tensordot(result, phi, axes=0)
+        return np.asarray(result).ravel()
+
+    def eigenvectors(self, m=None):
+        """Return the requested number of eigenvectors for ordered eigenvalues.
+        
+        Parameters
+        ----------
+        m : int, optional
+            The positive number of eigenvectors to return. If not provided,
+            then all eigenvectors will be returned.
+            
+        Returns
+        -------
+        eigenvectors : float array
+            An array with columns made of the requested `m` or all eigenvectors.
+            The columns are ordered according to the `m` ordered eigenvalues. 
+        """
+        _, ind = self._eigenvalue_ordering(m)
+        if m is None:
+            grid_shape_min = self.grid_shape
+        else:
+            grid_shape_min = min(self.grid_shape,
+                                tuple(np.ones_like(self.grid_shape) * m))
+
+        N_indices = np.unravel_index(ind, grid_shape_min)
+        N_indices = [tuple(x) for x in zip(*N_indices)]
+        eigenvectors_list = [self._one_eve(k) for k in N_indices]
+        return np.column_stack(eigenvectors_list)
+
+    def toarray(self):
+        """
+        Converts the Laplacian data to a dense array.
+
+        Returns
+        -------
+        L : ndarray
+            The shape is ``(N, N)`` where ``N = np.prod(grid_shape)``.
+
+        """
+        grid_shape = self.grid_shape
+        n = np.prod(grid_shape)
+        L = np.zeros([n, n], dtype=np.int8)
+        # Scratch arrays
+        L_i = np.empty_like(L)
+        Ltemp = np.empty_like(L)
+
+        for ind, dim in enumerate(grid_shape):
+            # Start zeroing out L_i
+            L_i[:] = 0
+            # Allocate the top left corner with the kernel of L_i
+            # Einsum returns writable view of arrays
+            np.einsum("ii->i", L_i[:dim, :dim])[:] = -2
+            np.einsum("ii->i", L_i[: dim - 1, 1:dim])[:] = 1
+            np.einsum("ii->i", L_i[1:dim, : dim - 1])[:] = 1
+
+            if self.boundary_conditions == 'neumann':
+                L_i[0, 0] = -1
+                L_i[dim - 1, dim - 1] = -1
+            elif self.boundary_conditions == 'periodic':
+                if dim > 1:
+                    L_i[0, dim - 1] += 1
+                    L_i[dim - 1, 0] += 1
+                else:
+                    L_i[0, 0] += 1
+
+            # kron is too slow for large matrices hence the next two tricks
+            # 1- kron(eye, mat) is block_diag(mat, mat, ...)
+            # 2- kron(mat, eye) can be performed by 4d stride trick
+
+            # 1-
+            new_dim = dim
+            # for block_diag we tile the top left portion on the diagonal
+            if ind > 0:
+                tiles = np.prod(grid_shape[:ind])
+                for j in range(1, tiles):
+                    L_i[j*dim:(j+1)*dim, j*dim:(j+1)*dim] = L_i[:dim, :dim]
+                    new_dim += dim
+            # 2-
+            # we need the keep L_i, but reset the array
+            Ltemp[:new_dim, :new_dim] = L_i[:new_dim, :new_dim]
+            tiles = int(np.prod(grid_shape[ind+1:]))
+            # Zero out the top left, the rest is already 0
+            L_i[:new_dim, :new_dim] = 0
+            idx = [x for x in range(tiles)]
+            L_i.reshape(
+                (new_dim, tiles,
+                 new_dim, tiles)
+                )[:, idx, :, idx] = Ltemp[:new_dim, :new_dim]
+
+            L += L_i
+
+        return L.astype(self.dtype)
+
+    def tosparse(self):
+        """
+        Constructs a sparse array from the Laplacian data. The returned sparse
+        array format is dependent on the selected boundary conditions.
+
+        Returns
+        -------
+        L : scipy.sparse.sparray
+            The shape is ``(N, N)`` where ``N = np.prod(grid_shape)``.
+
+        """
+        N = len(self.grid_shape)
+        p = np.prod(self.grid_shape)
+        L = dia_array((p, p), dtype=np.int8)
+
+        for i in range(N):
+            dim = self.grid_shape[i]
+            data = np.ones([3, dim], dtype=np.int8)
+            data[1, :] *= -2
+
+            if self.boundary_conditions == 'neumann':
+                data[1, 0] = -1
+                data[1, -1] = -1
+
+            L_i = dia_array((data, [-1, 0, 1]), shape=(dim, dim),
+                            dtype=np.int8
+                            )
+
+            if self.boundary_conditions == 'periodic':
+                t = dia_array((dim, dim), dtype=np.int8)
+                t.setdiag([1], k=-dim+1)
+                t.setdiag([1], k=dim-1)
+                L_i += t
+
+            for j in range(i):
+                L_i = kron(eye(self.grid_shape[j], dtype=np.int8), L_i)
+            for j in range(i + 1, N):
+                L_i = kron(L_i, eye(self.grid_shape[j], dtype=np.int8))
+            L += L_i
+        return L.astype(self.dtype)
+
+    def _matvec(self, x):
+        grid_shape = self.grid_shape
+        N = len(grid_shape)
+        X = x.reshape(grid_shape + (-1,))
+        Y = -2 * N * X
+        for i in range(N):
+            Y += np.roll(X, 1, axis=i)
+            Y += np.roll(X, -1, axis=i)
+            if self.boundary_conditions in ('neumann', 'dirichlet'):
+                Y[(slice(None),)*i + (0,) + (slice(None),)*(N-i-1)
+                  ] -= np.roll(X, 1, axis=i)[
+                    (slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
+                ]
+                Y[
+                    (slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
+                ] -= np.roll(X, -1, axis=i)[
+                    (slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
+                ]
+
+                if self.boundary_conditions == 'neumann':
+                    Y[
+                        (slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
+                    ] += np.roll(X, 0, axis=i)[
+                        (slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
+                    ]
+                    Y[
+                        (slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
+                    ] += np.roll(X, 0, axis=i)[
+                        (slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
+                    ]
+
+        return Y.reshape(-1, X.shape[-1])
+
+    def _matmat(self, x):
+        return self._matvec(x)
+
+    def _adjoint(self):
+        return self
+
+    def _transpose(self):
+        return self
+
+
+class Sakurai(LinearOperator):
+    """
+    Construct a Sakurai matrix in various formats and its eigenvalues.
+
+    Constructs the "Sakurai" matrix motivated by reference [1]_:
+    square real symmetric positive definite and 5-diagonal
+    with the main diagonal ``[5, 6, 6, ..., 6, 6, 5], the ``+1`` and ``-1``
+    diagonals filled with ``-4``, and the ``+2`` and ``-2`` diagonals
+    made of ``1``. Its eigenvalues are analytically known to be
+    ``16. * np.power(np.cos(0.5 * k * np.pi / (n + 1)), 4)``.
+    The matrix gets ill-conditioned with its size growing.
+    It is useful for testing and benchmarking sparse eigenvalue solvers
+    especially those taking advantage of its banded 5-diagonal structure.
+    See the notes below for details.
+
+    Parameters
+    ----------
+    n : int
+        The size of the matrix.
+    dtype : dtype
+        Numerical type of the array. Default is ``np.int8``.
+
+    Methods
+    -------
+    toarray()
+        Construct a dense array from Laplacian data
+    tosparse()
+        Construct a sparse array from Laplacian data
+    tobanded()
+        The Sakurai matrix in the format for banded symmetric matrices,
+        i.e., (3, n) ndarray with 3 upper diagonals
+        placing the main diagonal at the bottom.
+    eigenvalues
+        All eigenvalues of the Sakurai matrix ordered ascending.
+
+    Notes
+    -----
+    Reference [1]_ introduces a generalized eigenproblem for the matrix pair
+    `A` and `B` where `A` is the identity so we turn it into an eigenproblem
+    just for the matrix `B` that this function outputs in various formats
+    together with its eigenvalues.
+    
+    .. versionadded:: 1.12.0
+
+    References
+    ----------
+    .. [1] T. Sakurai, H. Tadano, Y. Inadomi, and U. Nagashima,
+       "A moment-based method for large-scale generalized
+       eigenvalue problems",
+       Appl. Num. Anal. Comp. Math. Vol. 1 No. 2 (2004).
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg._special_sparse_arrays import Sakurai
+    >>> from scipy.linalg import eig_banded
+    >>> n = 6
+    >>> sak = Sakurai(n)
+
+    Since all matrix entries are small integers, ``'int8'`` is
+    the default dtype for storing matrix representations.
+
+    >>> sak.toarray()
+    array([[ 5, -4,  1,  0,  0,  0],
+           [-4,  6, -4,  1,  0,  0],
+           [ 1, -4,  6, -4,  1,  0],
+           [ 0,  1, -4,  6, -4,  1],
+           [ 0,  0,  1, -4,  6, -4],
+           [ 0,  0,  0,  1, -4,  5]], dtype=int8)
+    >>> sak.tobanded()
+    array([[ 1,  1,  1,  1,  1,  1],
+           [-4, -4, -4, -4, -4, -4],
+           [ 5,  6,  6,  6,  6,  5]], dtype=int8)
+    >>> sak.tosparse()
+    
+    >>> np.array_equal(sak.dot(np.eye(n)), sak.tosparse().toarray())
+    True
+    >>> sak.eigenvalues()
+    array([0.03922866, 0.56703972, 2.41789479, 5.97822974,
+           10.54287655, 14.45473055])
+    >>> sak.eigenvalues(2)
+    array([0.03922866, 0.56703972])
+
+    The banded form can be used in scipy functions for banded matrices, e.g.,
+
+    >>> e = eig_banded(sak.tobanded(), eigvals_only=True)
+    >>> np.allclose(sak.eigenvalues, e, atol= n * n * n * np.finfo(float).eps)
+    True
+
+    """
+    def __init__(self, n, dtype=np.int8):
+        self.n = n
+        self.dtype = dtype
+        shape = (n, n)
+        super().__init__(dtype, shape)
+
+    def eigenvalues(self, m=None):
+        """Return the requested number of eigenvalues.
+        
+        Parameters
+        ----------
+        m : int, optional
+            The positive number of smallest eigenvalues to return.
+            If not provided, then all eigenvalues will be returned.
+            
+        Returns
+        -------
+        eigenvalues : `np.float64` array
+            The requested `m` smallest or all eigenvalues, in ascending order.
+        """
+        if m is None:
+            m = self.n
+        k = np.arange(self.n + 1 -m, self.n + 1)
+        return np.flip(16. * np.power(np.cos(0.5 * k * np.pi / (self.n + 1)), 4))
+
+    def tobanded(self):
+        """
+        Construct the Sakurai matrix as a banded array.
+        """
+        d0 = np.r_[5, 6 * np.ones(self.n - 2, dtype=self.dtype), 5]
+        d1 = -4 * np.ones(self.n, dtype=self.dtype)
+        d2 = np.ones(self.n, dtype=self.dtype)
+        return np.array([d2, d1, d0]).astype(self.dtype)
+
+    def tosparse(self):
+        """
+        Construct the Sakurai matrix is a sparse format.
+        """
+        from scipy.sparse import spdiags
+        d = self.tobanded()
+        # the banded format has the main diagonal at the bottom
+        # `spdiags` has no `dtype` parameter so inherits dtype from banded
+        return spdiags([d[0], d[1], d[2], d[1], d[0]], [-2, -1, 0, 1, 2],
+                       self.n, self.n)
+
+    def toarray(self):
+        return self.tosparse().toarray()
+    
+    def _matvec(self, x):
+        """
+        Construct matrix-free callable banded-matrix-vector multiplication by
+        the Sakurai matrix without constructing or storing the matrix itself
+        using the knowledge of its entries and the 5-diagonal format.
+        """
+        x = x.reshape(self.n, -1)
+        result_dtype = np.promote_types(x.dtype, self.dtype)
+        sx = np.zeros_like(x, dtype=result_dtype)
+        sx[0, :] = 5 * x[0, :] - 4 * x[1, :] + x[2, :]
+        sx[-1, :] = 5 * x[-1, :] - 4 * x[-2, :] + x[-3, :]
+        sx[1: -1, :] = (6 * x[1: -1, :] - 4 * (x[:-2, :] + x[2:, :])
+                      + np.pad(x[:-3, :], ((1, 0), (0, 0)))
+                      + np.pad(x[3:, :], ((0, 1), (0, 0))))
+        return sx
+
+    def _matmat(self, x):
+        """
+        Construct matrix-free callable matrix-matrix multiplication by
+        the Sakurai matrix without constructing or storing the matrix itself
+        by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
+        """        
+        return self._matvec(x)
+
+    def _adjoint(self):
+        return self
+
+    def _transpose(self):
+        return self
+
+
+class MikotaM(LinearOperator):
+    """
+    Construct a mass matrix in various formats of Mikota pair.
+
+    The mass matrix `M` is square real diagonal
+    positive definite with entries that are reciprocal to integers.
+
+    Parameters
+    ----------
+    shape : tuple of int
+        The shape of the matrix.
+    dtype : dtype
+        Numerical type of the array. Default is ``np.float64``.
+
+    Methods
+    -------
+    toarray()
+        Construct a dense array from Mikota data
+    tosparse()
+        Construct a sparse array from Mikota data
+    tobanded()
+        The format for banded symmetric matrices,
+        i.e., (1, n) ndarray with the main diagonal.
+    """
+    def __init__(self, shape, dtype=np.float64):
+        self.shape = shape
+        self.dtype = dtype
+        super().__init__(dtype, shape)
+
+    def _diag(self):
+        # The matrix is constructed from its diagonal 1 / [1, ..., N+1];
+        # compute in a function to avoid duplicated code & storage footprint
+        return (1. / np.arange(1, self.shape[0] + 1)).astype(self.dtype)
+
+    def tobanded(self):
+        return self._diag()
+
+    def tosparse(self):
+        from scipy.sparse import diags
+        return diags([self._diag()], [0], shape=self.shape, dtype=self.dtype)
+
+    def toarray(self):
+        return np.diag(self._diag()).astype(self.dtype)
+
+    def _matvec(self, x):
+        """
+        Construct matrix-free callable banded-matrix-vector multiplication by
+        the Mikota mass matrix without constructing or storing the matrix itself
+        using the knowledge of its entries and the diagonal format.
+        """
+        x = x.reshape(self.shape[0], -1)
+        return self._diag()[:, np.newaxis] * x
+
+    def _matmat(self, x):
+        """
+        Construct matrix-free callable matrix-matrix multiplication by
+        the Mikota mass matrix without constructing or storing the matrix itself
+        by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
+        """     
+        return self._matvec(x)
+
+    def _adjoint(self):
+        return self
+
+    def _transpose(self):
+        return self
+
+
+class MikotaK(LinearOperator):
+    """
+    Construct a stiffness matrix in various formats of Mikota pair.
+
+    The stiffness matrix `K` is square real tri-diagonal symmetric
+    positive definite with integer entries. 
+
+    Parameters
+    ----------
+    shape : tuple of int
+        The shape of the matrix.
+    dtype : dtype
+        Numerical type of the array. Default is ``np.int32``.
+
+    Methods
+    -------
+    toarray()
+        Construct a dense array from Mikota data
+    tosparse()
+        Construct a sparse array from Mikota data
+    tobanded()
+        The format for banded symmetric matrices,
+        i.e., (2, n) ndarray with 2 upper diagonals
+        placing the main diagonal at the bottom.
+    """
+    def __init__(self, shape, dtype=np.int32):
+        self.shape = shape
+        self.dtype = dtype
+        super().__init__(dtype, shape)
+        # The matrix is constructed from its diagonals;
+        # we precompute these to avoid duplicating the computation
+        n = shape[0]
+        self._diag0 = np.arange(2 * n - 1, 0, -2, dtype=self.dtype)
+        self._diag1 = - np.arange(n - 1, 0, -1, dtype=self.dtype)
+
+    def tobanded(self):
+        return np.array([np.pad(self._diag1, (1, 0), 'constant'), self._diag0])
+
+    def tosparse(self):
+        from scipy.sparse import diags
+        return diags([self._diag1, self._diag0, self._diag1], [-1, 0, 1],
+                     shape=self.shape, dtype=self.dtype)
+
+    def toarray(self):
+        return self.tosparse().toarray()
+
+    def _matvec(self, x):
+        """
+        Construct matrix-free callable banded-matrix-vector multiplication by
+        the Mikota stiffness matrix without constructing or storing the matrix
+        itself using the knowledge of its entries and the 3-diagonal format.
+        """
+        x = x.reshape(self.shape[0], -1)
+        result_dtype = np.promote_types(x.dtype, self.dtype)
+        kx = np.zeros_like(x, dtype=result_dtype)
+        d1 = self._diag1
+        d0 = self._diag0
+        kx[0, :] = d0[0] * x[0, :] + d1[0] * x[1, :]
+        kx[-1, :] = d1[-1] * x[-2, :] + d0[-1] * x[-1, :]
+        kx[1: -1, :] = (d1[:-1, None] * x[: -2, :]
+                        + d0[1: -1, None] * x[1: -1, :]
+                        + d1[1:, None] * x[2:, :])
+        return kx
+
+    def _matmat(self, x):
+        """
+        Construct matrix-free callable matrix-matrix multiplication by
+        the Stiffness mass matrix without constructing or storing the matrix itself
+        by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
+        """  
+        return self._matvec(x)
+
+    def _adjoint(self):
+        return self
+
+    def _transpose(self):
+        return self
+
+
+class MikotaPair:
+    """
+    Construct the Mikota pair of matrices in various formats and
+    eigenvalues of the generalized eigenproblem with them.
+
+    The Mikota pair of matrices [1, 2]_ models a vibration problem
+    of a linear mass-spring system with the ends attached where
+    the stiffness of the springs and the masses increase along
+    the system length such that vibration frequencies are subsequent
+    integers 1, 2, ..., `n` where `n` is the number of the masses. Thus,
+    eigenvalues of the generalized eigenvalue problem for
+    the matrix pair `K` and `M` where `K` is the system stiffness matrix
+    and `M` is the system mass matrix are the squares of the integers,
+    i.e., 1, 4, 9, ..., ``n * n``.
+
+    The stiffness matrix `K` is square real tri-diagonal symmetric
+    positive definite. The mass matrix `M` is diagonal with diagonal
+    entries 1, 1/2, 1/3, ...., ``1/n``. Both matrices get
+    ill-conditioned with `n` growing.
+
+    Parameters
+    ----------
+    n : int
+        The size of the matrices of the Mikota pair.
+    dtype : dtype
+        Numerical type of the array. Default is ``np.float64``.
+
+    Attributes
+    ----------
+    eigenvalues : 1D ndarray, ``np.uint64``
+        All eigenvalues of the Mikota pair ordered ascending.
+
+    Methods
+    -------
+    MikotaK()
+        A `LinearOperator` custom object for the stiffness matrix.
+    MikotaM()
+        A `LinearOperator` custom object for the mass matrix.
+    
+    .. versionadded:: 1.12.0
+
+    References
+    ----------
+    .. [1] J. Mikota, "Frequency tuning of chain structure multibody oscillators
+       to place the natural frequencies at omega1 and N-1 integer multiples
+       omega2,..., omegaN", Z. Angew. Math. Mech. 81 (2001), S2, S201-S202.
+       Appl. Num. Anal. Comp. Math. Vol. 1 No. 2 (2004).
+    .. [2] Peter C. Muller and Metin Gurgoze,
+       "Natural frequencies of a multi-degree-of-freedom vibration system",
+       Proc. Appl. Math. Mech. 6, 319-320 (2006).
+       http://dx.doi.org/10.1002/pamm.200610141.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.sparse.linalg._special_sparse_arrays import MikotaPair
+    >>> n = 6
+    >>> mik = MikotaPair(n)
+    >>> mik_k = mik.k
+    >>> mik_m = mik.m
+    >>> mik_k.toarray()
+    array([[11., -5.,  0.,  0.,  0.,  0.],
+           [-5.,  9., -4.,  0.,  0.,  0.],
+           [ 0., -4.,  7., -3.,  0.,  0.],
+           [ 0.,  0., -3.,  5., -2.,  0.],
+           [ 0.,  0.,  0., -2.,  3., -1.],
+           [ 0.,  0.,  0.,  0., -1.,  1.]])
+    >>> mik_k.tobanded()
+    array([[ 0., -5., -4., -3., -2., -1.],
+           [11.,  9.,  7.,  5.,  3.,  1.]])
+    >>> mik_m.tobanded()
+    array([1.        , 0.5       , 0.33333333, 0.25      , 0.2       ,
+        0.16666667])
+    >>> mik_k.tosparse()
+    
+    >>> mik_m.tosparse()
+    
+    >>> np.array_equal(mik_k(np.eye(n)), mik_k.toarray())
+    True
+    >>> np.array_equal(mik_m(np.eye(n)), mik_m.toarray())
+    True
+    >>> mik.eigenvalues()
+    array([ 1,  4,  9, 16, 25, 36])  
+    >>> mik.eigenvalues(2)
+    array([ 1,  4])
+
+    """
+    def __init__(self, n, dtype=np.float64):
+        self.n = n
+        self.dtype = dtype
+        self.shape = (n, n)
+        self.m = MikotaM(self.shape, self.dtype)
+        self.k = MikotaK(self.shape, self.dtype)
+
+    def eigenvalues(self, m=None):
+        """Return the requested number of eigenvalues.
+        
+        Parameters
+        ----------
+        m : int, optional
+            The positive number of smallest eigenvalues to return.
+            If not provided, then all eigenvalues will be returned.
+            
+        Returns
+        -------
+        eigenvalues : `np.uint64` array
+            The requested `m` smallest or all eigenvalues, in ascending order.
+        """
+        if m is None:
+            m = self.n
+        arange_plus1 = np.arange(1, m + 1, dtype=np.uint64)
+        return arange_plus1 * arange_plus1
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_svdp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_svdp.py
new file mode 100644
index 0000000000000000000000000000000000000000..fd64c6d0c3069eceb5a347111f1ac77bea8ea942
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/_svdp.py
@@ -0,0 +1,309 @@
+"""
+Python wrapper for PROPACK
+--------------------------
+
+PROPACK is a collection of Fortran routines for iterative computation
+of partial SVDs of large matrices or linear operators.
+
+Based on BSD licensed pypropack project:
+  http://github.com/jakevdp/pypropack
+  Author: Jake Vanderplas 
+
+PROPACK source is BSD licensed, and available at
+  http://soi.stanford.edu/~rmunk/PROPACK/
+"""
+
+__all__ = ['_svdp']
+
+import numpy as np
+
+from scipy.sparse.linalg import aslinearoperator
+from scipy.linalg import LinAlgError
+
+from ._propack import _spropack  # type: ignore[attr-defined]
+from ._propack import _dpropack  # type: ignore[attr-defined]
+from ._propack import _cpropack  # type: ignore[attr-defined]
+from ._propack import _zpropack  # type: ignore[attr-defined]
+
+
+_lansvd_dict = {
+    'f': _spropack.slansvd,
+    'd': _dpropack.dlansvd,
+    'F': _cpropack.clansvd,
+    'D': _zpropack.zlansvd,
+}
+
+
+_lansvd_irl_dict = {
+    'f': _spropack.slansvd_irl,
+    'd': _dpropack.dlansvd_irl,
+    'F': _cpropack.clansvd_irl,
+    'D': _zpropack.zlansvd_irl,
+}
+
+_which_converter = {
+    'LM': 'L',
+    'SM': 'S',
+}
+
+
+class _AProd:
+    """
+    Wrapper class for linear operator
+
+    The call signature of the __call__ method matches the callback of
+    the PROPACK routines.
+    """
+    def __init__(self, A):
+        try:
+            self.A = aslinearoperator(A)
+        except TypeError:
+            self.A = aslinearoperator(np.asarray(A))
+
+    def __call__(self, transa, m, n, x, y, sparm, iparm):
+        if transa == 'n':
+            y[:] = self.A.matvec(x)
+        else:
+            y[:] = self.A.rmatvec(x)
+
+    @property
+    def shape(self):
+        return self.A.shape
+
+    @property
+    def dtype(self):
+        try:
+            return self.A.dtype
+        except AttributeError:
+            return self.A.matvec(np.zeros(self.A.shape[1])).dtype
+
+
+def _svdp(A, k, which='LM', irl_mode=True, kmax=None,
+          compute_u=True, compute_v=True, v0=None, full_output=False, tol=0,
+          delta=None, eta=None, anorm=0, cgs=False, elr=True,
+          min_relgap=0.002, shifts=None, maxiter=None, rng=None):
+    """
+    Compute the singular value decomposition of a linear operator using PROPACK
+
+    Parameters
+    ----------
+    A : array_like, sparse matrix, or LinearOperator
+        Operator for which SVD will be computed.  If `A` is a LinearOperator
+        object, it must define both ``matvec`` and ``rmatvec`` methods.
+    k : int
+        Number of singular values/vectors to compute
+    which : {"LM", "SM"}
+        Which singular triplets to compute:
+        - 'LM': compute triplets corresponding to the `k` largest singular
+                values
+        - 'SM': compute triplets corresponding to the `k` smallest singular
+                values
+        `which='SM'` requires `irl_mode=True`.  Computes largest singular
+        values by default.
+    irl_mode : bool, optional
+        If `True`, then compute SVD using IRL (implicitly restarted Lanczos)
+        mode.  Default is `True`.
+    kmax : int, optional
+        Maximal number of iterations / maximal dimension of the Krylov
+        subspace. Default is ``10 * k``.
+    compute_u : bool, optional
+        If `True` (default) then compute left singular vectors, `u`.
+    compute_v : bool, optional
+        If `True` (default) then compute right singular vectors, `v`.
+    tol : float, optional
+        The desired relative accuracy for computed singular values.
+        If not specified, it will be set based on machine precision.
+    v0 : array_like, optional
+        Starting vector for iterations: must be of length ``A.shape[0]``.
+        If not specified, PROPACK will generate a starting vector.
+    full_output : bool, optional
+        If `True`, then return sigma_bound.  Default is `False`.
+    delta : float, optional
+        Level of orthogonality to maintain between Lanczos vectors.
+        Default is set based on machine precision.
+    eta : float, optional
+        Orthogonality cutoff.  During reorthogonalization, vectors with
+        component larger than `eta` along the Lanczos vector will be purged.
+        Default is set based on machine precision.
+    anorm : float, optional
+        Estimate of ``||A||``.  Default is ``0``.
+    cgs : bool, optional
+        If `True`, reorthogonalization is done using classical Gram-Schmidt.
+        If `False` (default), it is done using modified Gram-Schmidt.
+    elr : bool, optional
+        If `True` (default), then extended local orthogonality is enforced
+        when obtaining singular vectors.
+    min_relgap : float, optional
+        The smallest relative gap allowed between any shift in IRL mode.
+        Default is ``0.001``.  Accessed only if ``irl_mode=True``.
+    shifts : int, optional
+        Number of shifts per restart in IRL mode.  Default is determined
+        to satisfy ``k <= min(kmax-shifts, m, n)``.  Must be
+        >= 0, but choosing 0 might lead to performance degradation.
+        Accessed only if ``irl_mode=True``.
+    maxiter : int, optional
+        Maximum number of restarts in IRL mode.  Default is ``1000``.
+        Accessed only if ``irl_mode=True``.
+    rng : `numpy.random.Generator`, optional
+        Pseudorandom number generator state. When `rng` is None, a new
+        `numpy.random.Generator` is created using entropy from the
+        operating system. Types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+
+    Returns
+    -------
+    u : ndarray
+        The `k` largest (``which="LM"``) or smallest (``which="SM"``) left
+        singular vectors, ``shape == (A.shape[0], 3)``, returned only if
+        ``compute_u=True``.
+    sigma : ndarray
+        The top `k` singular values, ``shape == (k,)``
+    vt : ndarray
+        The `k` largest (``which="LM"``) or smallest (``which="SM"``) right
+        singular vectors, ``shape == (3, A.shape[1])``, returned only if
+        ``compute_v=True``.
+    sigma_bound : ndarray
+        the error bounds on the singular values sigma, returned only if
+        ``full_output=True``.
+
+    """
+    if rng is None:
+        raise ValueError("`rng` must be a normalized numpy.random.Generator instance")
+
+    which = which.upper()
+    if which not in {'LM', 'SM'}:
+        raise ValueError("`which` must be either 'LM' or 'SM'")
+    if not irl_mode and which == 'SM':
+        raise ValueError("`which`='SM' requires irl_mode=True")
+
+    aprod = _AProd(A)
+    typ = aprod.dtype.char
+
+    try:
+        lansvd_irl = _lansvd_irl_dict[typ]
+        lansvd = _lansvd_dict[typ]
+    except KeyError:
+        # work with non-supported types using native system precision
+        if np.iscomplexobj(np.empty(0, dtype=typ)):
+            typ = np.dtype(complex).char
+        else:
+            typ = np.dtype(float).char
+        lansvd_irl = _lansvd_irl_dict[typ]
+        lansvd = _lansvd_dict[typ]
+
+    m, n = aprod.shape
+    if (k < 1) or (k > min(m, n)):
+        raise ValueError("k must be positive and not greater than m or n")
+
+    if kmax is None:
+        kmax = 10*k
+    if maxiter is None:
+        maxiter = 1000
+
+    # guard against unnecessarily large kmax
+    kmax = min(m + 1, n + 1, kmax)
+    if kmax < k:
+        raise ValueError(
+            "kmax must be greater than or equal to k, "
+            f"but kmax ({kmax}) < k ({k})")
+
+    # convert python args to fortran args
+    jobu = 'y' if compute_u else 'n'
+    jobv = 'y' if compute_v else 'n'
+
+    # these will be the output arrays
+    u = np.zeros((m, kmax + 1), order='F', dtype=typ)
+    v = np.zeros((n, kmax), order='F', dtype=typ)
+
+    # Specify the starting vector.  if v0 is all zero, PROPACK will generate
+    # a random starting vector: the random seed cannot be controlled in that
+    # case, so we'll instead use numpy to generate a random vector
+    if v0 is None:
+        u[:, 0] = rng.uniform(size=m)
+        if np.iscomplexobj(np.empty(0, dtype=typ)):  # complex type
+            u[:, 0] += 1j * rng.uniform(size=m)
+    else:
+        try:
+            u[:, 0] = v0
+        except ValueError:
+            raise ValueError(f"v0 must be of length {m}")
+
+    # process options for the fit
+    if delta is None:
+        delta = np.sqrt(np.finfo(typ).eps)
+    if eta is None:
+        eta = np.finfo(typ).eps ** 0.75
+
+    if irl_mode:
+        doption = np.array((delta, eta, anorm, min_relgap), dtype=typ.lower())
+
+        # validate or find default shifts
+        if shifts is None:
+            shifts = kmax - k
+        if k > min(kmax - shifts, m, n):
+            raise ValueError('shifts must satisfy '
+                             'k <= min(kmax-shifts, m, n)!')
+        elif shifts < 0:
+            raise ValueError('shifts must be >= 0!')
+
+    else:
+        doption = np.array((delta, eta, anorm), dtype=typ.lower())
+
+    ioption = np.array((int(bool(cgs)), int(bool(elr))), dtype='i')
+
+    # If computing `u` or `v` (left and right singular vectors,
+    # respectively), `blocksize` controls how large a fraction of the
+    # work is done via fast BLAS level 3 operations.  A larger blocksize
+    # may lead to faster computation at the expense of greater memory
+    # consumption.  `blocksize` must be ``>= 1``.  Choosing blocksize
+    # of 16, but docs don't specify; it's almost surely a
+    # power of 2.
+    blocksize = 16
+
+    # Determine lwork & liwork:
+    # the required lengths are specified in the PROPACK documentation
+    if compute_u or compute_v:
+        lwork = m + n + 9*kmax + 5*kmax*kmax + 4 + max(
+            3*kmax*kmax + 4*kmax + 4,
+            blocksize*max(m, n))
+        liwork = 8*kmax
+    else:
+        lwork = m + n + 9*kmax + 2*kmax*kmax + 4 + max(m + n, 4*kmax + 4)
+        liwork = 2*kmax + 1
+    work = np.empty(lwork, dtype=typ.lower())
+    iwork = np.empty(liwork, dtype=np.int32)
+
+    # dummy arguments: these are passed to aprod, and not used in this wrapper
+    dparm = np.empty(1, dtype=typ.lower())
+    iparm = np.empty(1, dtype=np.int32)
+
+    if typ.isupper():
+        # PROPACK documentation is unclear on the required length of zwork.
+        # Use the same length Julia's wrapper uses
+        # see https://github.com/JuliaSmoothOptimizers/PROPACK.jl/
+        zwork = np.empty(m + n + 32*m, dtype=typ)
+        works = work, zwork, iwork
+    else:
+        works = work, iwork
+
+    if irl_mode:
+        u, sigma, bnd, v, info = lansvd_irl(_which_converter[which], jobu,
+                                            jobv, m, n, shifts, k, maxiter,
+                                            aprod, u, v, tol, *works, doption,
+                                            ioption, dparm, iparm)
+    else:
+        u, sigma, bnd, v, info = lansvd(jobu, jobv, m, n, k, aprod, u, v, tol,
+                                        *works, doption, ioption, dparm, iparm)
+
+    if info > 0:
+        raise LinAlgError(
+            f"An invariant subspace of dimension {info} was found.")
+    elif info < 0:
+        raise LinAlgError(
+            f"k={k} singular triplets did not converge within "
+            f"kmax={kmax} iterations")
+
+    # info == 0: The K largest (or smallest) singular triplets were computed
+    # successfully!
+
+    return u[:, :k], sigma, v[:, :k].conj().T, bnd
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/dsolve.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/dsolve.py
new file mode 100644
index 0000000000000000000000000000000000000000..45139f6b280d047386652577d9e1c8d2aaeb7033
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/dsolve.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'MatrixRankWarning', 'SuperLU', 'factorized',
+    'spilu', 'splu', 'spsolve',
+    'spsolve_triangular', 'use_solver', 'test'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse.linalg", module="dsolve",
+                                   private_modules=["_dsolve"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/eigen.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/eigen.py
new file mode 100644
index 0000000000000000000000000000000000000000..588986d6650aad334e6a9a682ed76cef94295298
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/eigen.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'ArpackError', 'ArpackNoConvergence', 'ArpackError',
+    'eigs', 'eigsh', 'lobpcg', 'svds', 'test'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse.linalg", module="eigen",
+                                   private_modules=["_eigen"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/interface.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/interface.py
new file mode 100644
index 0000000000000000000000000000000000000000..24f40f185b1328b16e7e239e5a165cc6b1ed4317
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/interface.py
@@ -0,0 +1,20 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'LinearOperator', 'aslinearoperator',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse.linalg", module="interface",
+                                   private_modules=["_interface"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/isolve.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/isolve.py
new file mode 100644
index 0000000000000000000000000000000000000000..e032ddd9c673be3bc8790adad3bdae1839127050
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/isolve.py
@@ -0,0 +1,22 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'bicg', 'bicgstab', 'cg', 'cgs', 'gcrotmk', 'gmres',
+    'lgmres', 'lsmr', 'lsqr',
+    'minres', 'qmr', 'tfqmr', 'test'
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse.linalg", module="isolve",
+                                   private_modules=["_isolve"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ed877ff1aa6f5a5466ce94729b9225dcce37b36
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/matfuncs.py
@@ -0,0 +1,18 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse.linalg` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = ["expm", "inv", "spsolve", "LinearOperator"]  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse.linalg", module="matfuncs",
+                                   private_modules=["_matfuncs"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_expm_multiply.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_expm_multiply.py
new file mode 100644
index 0000000000000000000000000000000000000000..b6d3661e99580906501dac66c9960d8d4671137f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_expm_multiply.py
@@ -0,0 +1,367 @@
+"""Test functions for the sparse.linalg._expm_multiply module."""
+from functools import partial
+from itertools import product
+
+import numpy as np
+import pytest
+from numpy.testing import (assert_allclose, assert_, assert_equal,
+                           suppress_warnings)
+from scipy.sparse import SparseEfficiencyWarning
+import scipy.sparse
+from scipy.sparse.linalg import aslinearoperator
+import scipy.linalg
+from scipy.sparse.linalg import expm as sp_expm
+from scipy.sparse.linalg._expm_multiply import (_theta, _compute_p_max,
+        _onenormest_matrix_power, expm_multiply, _expm_multiply_simple,
+        _expm_multiply_interval)
+from scipy._lib._util import np_long
+
+
+IMPRECISE = {np.single, np.csingle}
+REAL_DTYPES = (np.intc, np_long, np.longlong,
+               np.float32, np.float64, np.longdouble)
+COMPLEX_DTYPES = (np.complex64, np.complex128, np.clongdouble)
+DTYPES = REAL_DTYPES + COMPLEX_DTYPES
+
+
+def estimated(func):
+    """If trace is estimated, it should warn.
+
+    We warn that estimation of trace might impact performance.
+    All result have to be correct nevertheless!
+
+    """
+    def wrapped(*args, **kwds):
+        with pytest.warns(UserWarning,
+                          match="Trace of LinearOperator not available"):
+            return func(*args, **kwds)
+    return wrapped
+
+
+def less_than_or_close(a, b):
+    return np.allclose(a, b) or (a < b)
+
+
+class TestExpmActionSimple:
+    """
+    These tests do not consider the case of multiple time steps in one call.
+    """
+
+    def test_theta_monotonicity(self):
+        pairs = sorted(_theta.items())
+        for (m_a, theta_a), (m_b, theta_b) in zip(pairs[:-1], pairs[1:]):
+            assert_(theta_a < theta_b)
+
+    def test_p_max_default(self):
+        m_max = 55
+        expected_p_max = 8
+        observed_p_max = _compute_p_max(m_max)
+        assert_equal(observed_p_max, expected_p_max)
+
+    def test_p_max_range(self):
+        for m_max in range(1, 55+1):
+            p_max = _compute_p_max(m_max)
+            assert_(p_max*(p_max - 1) <= m_max + 1)
+            p_too_big = p_max + 1
+            assert_(p_too_big*(p_too_big - 1) > m_max + 1)
+
+    def test_onenormest_matrix_power(self):
+        rng = np.random.RandomState(1234)
+        n = 40
+        nsamples = 10
+        for i in range(nsamples):
+            A = scipy.linalg.inv(rng.randn(n, n))
+            for p in range(4):
+                if not p:
+                    M = np.identity(n)
+                else:
+                    M = np.dot(M, A)
+                estimated = _onenormest_matrix_power(A, p)
+                exact = np.linalg.norm(M, 1)
+                assert_(less_than_or_close(estimated, exact))
+                assert_(less_than_or_close(exact, 3*estimated))
+
+    @pytest.mark.thread_unsafe
+    def test_expm_multiply(self):
+        np.random.seed(1234)
+        n = 40
+        k = 3
+        nsamples = 10
+        for i in range(nsamples):
+            A = scipy.linalg.inv(np.random.randn(n, n))
+            B = np.random.randn(n, k)
+            observed = expm_multiply(A, B)
+            expected = np.dot(sp_expm(A), B)
+            assert_allclose(observed, expected)
+            observed = estimated(expm_multiply)(aslinearoperator(A), B)
+            assert_allclose(observed, expected)
+            traceA = np.trace(A)
+            observed = expm_multiply(aslinearoperator(A), B, traceA=traceA)
+            assert_allclose(observed, expected)
+
+    @pytest.mark.thread_unsafe
+    def test_matrix_vector_multiply(self):
+        np.random.seed(1234)
+        n = 40
+        nsamples = 10
+        for i in range(nsamples):
+            A = scipy.linalg.inv(np.random.randn(n, n))
+            v = np.random.randn(n)
+            observed = expm_multiply(A, v)
+            expected = np.dot(sp_expm(A), v)
+            assert_allclose(observed, expected)
+            observed = estimated(expm_multiply)(aslinearoperator(A), v)
+            assert_allclose(observed, expected)
+
+    @pytest.mark.thread_unsafe
+    def test_scaled_expm_multiply(self):
+        np.random.seed(1234)
+        n = 40
+        k = 3
+        nsamples = 10
+        for i, t in product(range(nsamples), [0.2, 1.0, 1.5]):
+            with np.errstate(invalid='ignore'):
+                A = scipy.linalg.inv(np.random.randn(n, n))
+                B = np.random.randn(n, k)
+                observed = _expm_multiply_simple(A, B, t=t)
+                expected = np.dot(sp_expm(t*A), B)
+                assert_allclose(observed, expected)
+                observed = estimated(_expm_multiply_simple)(
+                    aslinearoperator(A), B, t=t
+                )
+                assert_allclose(observed, expected)
+
+    @pytest.mark.thread_unsafe
+    def test_scaled_expm_multiply_single_timepoint(self):
+        np.random.seed(1234)
+        t = 0.1
+        n = 5
+        k = 2
+        A = np.random.randn(n, n)
+        B = np.random.randn(n, k)
+        observed = _expm_multiply_simple(A, B, t=t)
+        expected = sp_expm(t*A).dot(B)
+        assert_allclose(observed, expected)
+        observed = estimated(_expm_multiply_simple)(
+            aslinearoperator(A), B, t=t
+        )
+        assert_allclose(observed, expected)
+
+    @pytest.mark.thread_unsafe
+    def test_sparse_expm_multiply(self):
+        rng = np.random.default_rng(1234)
+        n = 40
+        k = 3
+        nsamples = 10
+        for i in range(nsamples):
+            A = scipy.sparse.random_array((n, n), density=0.05, rng=rng)
+            B = rng.standard_normal((n, k))
+            observed = expm_multiply(A, B)
+            with suppress_warnings() as sup:
+                sup.filter(SparseEfficiencyWarning,
+                           "splu converted its input to CSC format")
+                sup.filter(SparseEfficiencyWarning,
+                           "spsolve is more efficient when sparse b is in the"
+                           " CSC matrix format")
+                expected = sp_expm(A).dot(B)
+            assert_allclose(observed, expected)
+            observed = estimated(expm_multiply)(aslinearoperator(A), B)
+            assert_allclose(observed, expected)
+
+    @pytest.mark.thread_unsafe
+    def test_complex(self):
+        A = np.array([
+            [1j, 1j],
+            [0, 1j]], dtype=complex)
+        B = np.array([1j, 1j])
+        observed = expm_multiply(A, B)
+        expected = np.array([
+            1j * np.exp(1j) + 1j * (1j*np.cos(1) - np.sin(1)),
+            1j * np.exp(1j)], dtype=complex)
+        assert_allclose(observed, expected)
+        observed = estimated(expm_multiply)(aslinearoperator(A), B)
+        assert_allclose(observed, expected)
+
+
+class TestExpmActionInterval:
+
+    @pytest.mark.fail_slow(20)
+    def test_sparse_expm_multiply_interval(self):
+        rng = np.random.default_rng(1234)
+        start = 0.1
+        stop = 3.2
+        n = 40
+        k = 3
+        endpoint = True
+        for num in (14, 13, 2):
+            A = scipy.sparse.random_array((n, n), density=0.05, rng=rng)
+            B = rng.standard_normal((n, k))
+            v = rng.standard_normal((n,))
+            for target in (B, v):
+                X = expm_multiply(A, target, start=start, stop=stop,
+                                  num=num, endpoint=endpoint)
+                samples = np.linspace(start=start, stop=stop,
+                                      num=num, endpoint=endpoint)
+                with suppress_warnings() as sup:
+                    sup.filter(SparseEfficiencyWarning,
+                               "splu converted its input to CSC format")
+                    sup.filter(SparseEfficiencyWarning,
+                               "spsolve is more efficient when sparse b is in"
+                               " the CSC matrix format")
+                    for solution, t in zip(X, samples):
+                        assert_allclose(solution, sp_expm(t*A).dot(target))
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.fail_slow(20)
+    def test_expm_multiply_interval_vector(self):
+        np.random.seed(1234)
+        interval = {'start': 0.1, 'stop': 3.2, 'endpoint': True}
+        for num, n in product([14, 13, 2], [1, 2, 5, 20, 40]):
+            A = scipy.linalg.inv(np.random.randn(n, n))
+            v = np.random.randn(n)
+            samples = np.linspace(num=num, **interval)
+            X = expm_multiply(A, v, num=num, **interval)
+            for solution, t in zip(X, samples):
+                assert_allclose(solution, sp_expm(t*A).dot(v))
+            # test for linear operator with unknown trace -> estimate trace
+            Xguess = estimated(expm_multiply)(aslinearoperator(A), v,
+                                              num=num, **interval)
+            # test for linear operator with given trace
+            Xgiven = expm_multiply(aslinearoperator(A), v, num=num, **interval,
+                                   traceA=np.trace(A))
+            # test robustness for linear operator with wrong trace
+            Xwrong = expm_multiply(aslinearoperator(A), v, num=num, **interval,
+                                   traceA=np.trace(A)*5)
+            for sol_guess, sol_given, sol_wrong, t in zip(Xguess, Xgiven,
+                                                          Xwrong, samples):
+                correct = sp_expm(t*A).dot(v)
+                assert_allclose(sol_guess, correct)
+                assert_allclose(sol_given, correct)
+                assert_allclose(sol_wrong, correct)
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.fail_slow(20)
+    def test_expm_multiply_interval_matrix(self):
+        np.random.seed(1234)
+        interval = {'start': 0.1, 'stop': 3.2, 'endpoint': True}
+        for num, n, k in product([14, 13, 2], [1, 2, 5, 20, 40], [1, 2]):
+            A = scipy.linalg.inv(np.random.randn(n, n))
+            B = np.random.randn(n, k)
+            samples = np.linspace(num=num, **interval)
+            X = expm_multiply(A, B, num=num, **interval)
+            for solution, t in zip(X, samples):
+                assert_allclose(solution, sp_expm(t*A).dot(B))
+            X = estimated(expm_multiply)(aslinearoperator(A), B, num=num,
+                                         **interval)
+            for solution, t in zip(X, samples):
+                assert_allclose(solution, sp_expm(t*A).dot(B))
+
+    def test_sparse_expm_multiply_interval_dtypes(self):
+        # Test A & B int
+        A = scipy.sparse.diags_array(np.arange(5),format='csr', dtype=int)
+        B = np.ones(5, dtype=int)
+        Aexpm = scipy.sparse.diags_array(np.exp(np.arange(5)),format='csr')
+        BI = np.identity(5, dtype=int)
+        BI_sparse = scipy.sparse.csr_array(BI)
+        assert_allclose(expm_multiply(A,B,0,1)[-1], Aexpm.dot(B))
+        assert_allclose(np.diag(expm_multiply(A, BI_sparse, 0, 1)[-1]), Aexpm.dot(B))
+
+        # Test A complex, B int
+        A = scipy.sparse.diags_array(-1j*np.arange(5),format='csr', dtype=complex)
+        B = np.ones(5, dtype=int)
+        Aexpm = scipy.sparse.diags_array(np.exp(-1j*np.arange(5)),format='csr')
+        assert_allclose(expm_multiply(A,B,0,1)[-1], Aexpm.dot(B))
+        assert_allclose(np.diag(expm_multiply(A, BI_sparse, 0, 1)[-1]), Aexpm.dot(B))
+
+        # Test A int, B complex
+        A = scipy.sparse.diags_array(np.arange(5),format='csr', dtype=int)
+        B = np.full(5, 1j, dtype=complex)
+        Aexpm = scipy.sparse.diags_array(np.exp(np.arange(5)),format='csr')
+        assert_allclose(expm_multiply(A,B,0,1)[-1], Aexpm.dot(B))
+        BI = np.identity(5, dtype=complex)*1j
+        assert_allclose(
+            np.diag(expm_multiply(A, scipy.sparse.csr_array(BI), 0, 1)[-1]),
+            Aexpm.dot(B)
+        )
+
+    def test_expm_multiply_interval_status_0(self):
+        self._help_test_specific_expm_interval_status(0)
+
+    def test_expm_multiply_interval_status_1(self):
+        self._help_test_specific_expm_interval_status(1)
+
+    def test_expm_multiply_interval_status_2(self):
+        self._help_test_specific_expm_interval_status(2)
+
+    def _help_test_specific_expm_interval_status(self, target_status):
+        rng = np.random.RandomState(1234)
+        start = 0.1
+        stop = 3.2
+        num = 13
+        endpoint = True
+        n = 5
+        k = 2
+        nrepeats = 10
+        nsuccesses = 0
+        for num in [14, 13, 2] * nrepeats:
+            A = rng.randn(n, n)
+            B = rng.randn(n, k)
+            status = _expm_multiply_interval(A, B,
+                    start=start, stop=stop, num=num, endpoint=endpoint,
+                    status_only=True)
+            if status == target_status:
+                X, status = _expm_multiply_interval(A, B,
+                        start=start, stop=stop, num=num, endpoint=endpoint,
+                        status_only=False)
+                assert_equal(X.shape, (num, n, k))
+                samples = np.linspace(start=start, stop=stop,
+                        num=num, endpoint=endpoint)
+                for solution, t in zip(X, samples):
+                    assert_allclose(solution, sp_expm(t*A).dot(B))
+                nsuccesses += 1
+        if not nsuccesses:
+            msg = 'failed to find a status-' + str(target_status) + ' interval'
+            raise Exception(msg)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.parametrize("dtype_a", DTYPES)
+@pytest.mark.parametrize("dtype_b", DTYPES)
+@pytest.mark.parametrize("b_is_matrix", [False, True])
+def test_expm_multiply_dtype(dtype_a, dtype_b, b_is_matrix):
+    """Make sure `expm_multiply` handles all numerical dtypes correctly."""
+    assert_allclose_ = (partial(assert_allclose, rtol=1.8e-3, atol=1e-5)
+                        if {dtype_a, dtype_b} & IMPRECISE else assert_allclose)
+    rng = np.random.default_rng(1234)
+    # test data
+    n = 7
+    b_shape = (n, 3) if b_is_matrix else (n, )
+    if dtype_a in REAL_DTYPES:
+        A = scipy.linalg.inv(rng.random([n, n])).astype(dtype_a)
+    else:
+        A = scipy.linalg.inv(
+            rng.random([n, n]) + 1j*rng.random([n, n])
+        ).astype(dtype_a)
+    if dtype_b in REAL_DTYPES:
+        B = (2*rng.random(b_shape)).astype(dtype_b)
+    else:
+        B = (rng.random(b_shape) + 1j*rng.random(b_shape)).astype(dtype_b)
+
+    # single application
+    sol_mat = expm_multiply(A, B)
+    sol_op = estimated(expm_multiply)(aslinearoperator(A), B)
+    direct_sol = np.dot(sp_expm(A), B)
+    assert_allclose_(sol_mat, direct_sol)
+    assert_allclose_(sol_op, direct_sol)
+    sol_op = expm_multiply(aslinearoperator(A), B, traceA=np.trace(A))
+    assert_allclose_(sol_op, direct_sol)
+
+    # for time points
+    interval = {'start': 0.1, 'stop': 3.2, 'num': 13, 'endpoint': True}
+    samples = np.linspace(**interval)
+    X_mat = expm_multiply(A, B, **interval)
+    X_op = estimated(expm_multiply)(aslinearoperator(A), B, **interval)
+    for sol_mat, sol_op, t in zip(X_mat, X_op, samples):
+        direct_sol = sp_expm(t*A).dot(B)
+        assert_allclose_(sol_mat, direct_sol)
+        assert_allclose_(sol_op, direct_sol)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_interface.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_interface.py
new file mode 100644
index 0000000000000000000000000000000000000000..13bbcf16dbfc391a7e1b6fab666221d4c21b4c64
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_interface.py
@@ -0,0 +1,561 @@
+"""Test functions for the sparse.linalg._interface module
+"""
+
+from functools import partial
+from itertools import product
+import operator
+import pytest
+from pytest import raises as assert_raises, warns
+from numpy.testing import assert_, assert_equal
+
+import numpy as np
+import scipy.sparse as sparse
+
+import scipy.sparse.linalg._interface as interface
+from scipy.sparse._sputils import matrix
+from scipy._lib._gcutils import assert_deallocated, IS_PYPY
+
+
+class TestLinearOperator:
+    def setup_method(self):
+        self.A = np.array([[1,2,3],
+                           [4,5,6]])
+        self.B = np.array([[1,2],
+                           [3,4],
+                           [5,6]])
+        self.C = np.array([[1,2],
+                           [3,4]])
+
+    def test_matvec(self):
+        def get_matvecs(A):
+            return [{
+                        'shape': A.shape,
+                        'matvec': lambda x: np.dot(A, x).reshape(A.shape[0]),
+                        'rmatvec': lambda x: np.dot(A.T.conj(),
+                                                    x).reshape(A.shape[1])
+                    },
+                    {
+                        'shape': A.shape,
+                        'matvec': lambda x: np.dot(A, x),
+                        'rmatvec': lambda x: np.dot(A.T.conj(), x),
+                        'rmatmat': lambda x: np.dot(A.T.conj(), x),
+                        'matmat': lambda x: np.dot(A, x)
+                    }]
+
+        for matvecs in get_matvecs(self.A):
+            A = interface.LinearOperator(**matvecs)
+
+            assert_(A.args == ())
+
+            assert_equal(A.matvec(np.array([1,2,3])), [14,32])
+            assert_equal(A.matvec(np.array([[1],[2],[3]])), [[14],[32]])
+            assert_equal(A @ np.array([1,2,3]), [14,32])
+            assert_equal(A @ np.array([[1],[2],[3]]), [[14],[32]])
+            assert_equal(A.dot(np.array([1,2,3])), [14,32])
+            assert_equal(A.dot(np.array([[1],[2],[3]])), [[14],[32]])
+
+            assert_equal(A.matvec(matrix([[1],[2],[3]])), [[14],[32]])
+            assert_equal(A @ matrix([[1],[2],[3]]), [[14],[32]])
+            assert_equal(A.dot(matrix([[1],[2],[3]])), [[14],[32]])
+
+            assert_equal((2*A)@[1,1,1], [12,30])
+            assert_equal((2 * A).rmatvec([1, 1]), [10, 14, 18])
+            assert_equal((2*A).H.matvec([1,1]), [10, 14, 18])
+            assert_equal((2*A).adjoint().matvec([1,1]), [10, 14, 18])
+            assert_equal((2*A)@[[1],[1],[1]], [[12],[30]])
+            assert_equal((2 * A).matmat([[1], [1], [1]]), [[12], [30]])
+            assert_equal((A*2)@[1,1,1], [12,30])
+            assert_equal((A*2)@[[1],[1],[1]], [[12],[30]])
+            assert_equal((2j*A)@[1,1,1], [12j,30j])
+            assert_equal((A+A)@[1,1,1], [12, 30])
+            assert_equal((A + A).rmatvec([1, 1]), [10, 14, 18])
+            assert_equal((A+A).H.matvec([1,1]), [10, 14, 18])
+            assert_equal((A+A).adjoint().matvec([1,1]), [10, 14, 18])
+            assert_equal((A+A)@[[1],[1],[1]], [[12], [30]])
+            assert_equal((A+A).matmat([[1],[1],[1]]), [[12], [30]])
+            assert_equal((-A)@[1,1,1], [-6,-15])
+            assert_equal((-A)@[[1],[1],[1]], [[-6],[-15]])
+            assert_equal((A-A)@[1,1,1], [0,0])
+            assert_equal((A - A) @ [[1], [1], [1]], [[0], [0]])
+
+            X = np.array([[1, 2], [3, 4]])
+            # A_asarray = np.array([[1, 2, 3], [4, 5, 6]])
+            assert_equal((2 * A).rmatmat(X), np.dot((2 * self.A).T, X))
+            assert_equal((A * 2).rmatmat(X), np.dot((self.A * 2).T, X))
+            assert_equal((2j * A).rmatmat(X),
+                         np.dot((2j * self.A).T.conj(), X))
+            assert_equal((A * 2j).rmatmat(X),
+                         np.dot((self.A * 2j).T.conj(), X))
+            assert_equal((A + A).rmatmat(X),
+                         np.dot((self.A + self.A).T, X))
+            assert_equal((A + 2j * A).rmatmat(X),
+                         np.dot((self.A + 2j * self.A).T.conj(), X))
+            assert_equal((-A).rmatmat(X), np.dot((-self.A).T, X))
+            assert_equal((A - A).rmatmat(X),
+                         np.dot((self.A - self.A).T, X))
+            assert_equal((2j * A).rmatmat(2j * X),
+                         np.dot((2j * self.A).T.conj(), 2j * X))
+
+            z = A+A
+            assert_(len(z.args) == 2 and z.args[0] is A and z.args[1] is A)
+            z = 2*A
+            assert_(len(z.args) == 2 and z.args[0] is A and z.args[1] == 2)
+
+            assert_(isinstance(A.matvec([1, 2, 3]), np.ndarray))
+            assert_(isinstance(A.matvec(np.array([[1],[2],[3]])), np.ndarray))
+            assert_(isinstance(A @ np.array([1,2,3]), np.ndarray))
+            assert_(isinstance(A @ np.array([[1],[2],[3]]), np.ndarray))
+            assert_(isinstance(A.dot(np.array([1,2,3])), np.ndarray))
+            assert_(isinstance(A.dot(np.array([[1],[2],[3]])), np.ndarray))
+
+            assert_(isinstance(A.matvec(matrix([[1],[2],[3]])), np.ndarray))
+            assert_(isinstance(A @ matrix([[1],[2],[3]]), np.ndarray))
+            assert_(isinstance(A.dot(matrix([[1],[2],[3]])), np.ndarray))
+
+            assert_(isinstance(2*A, interface._ScaledLinearOperator))
+            assert_(isinstance(2j*A, interface._ScaledLinearOperator))
+            assert_(isinstance(A+A, interface._SumLinearOperator))
+            assert_(isinstance(-A, interface._ScaledLinearOperator))
+            assert_(isinstance(A-A, interface._SumLinearOperator))
+            assert_(isinstance(A/2, interface._ScaledLinearOperator))
+            assert_(isinstance(A/2j, interface._ScaledLinearOperator))
+            assert_(((A * 3) / 3).args[0] is A)  # check for simplification
+
+            # Test that prefactor is of _ScaledLinearOperator is not mutated
+            # when the operator is multiplied by a number
+            result = A @ np.array([1, 2, 3])
+            B = A * 3
+            C = A / 5
+            assert_equal(A @ np.array([1, 2, 3]), result)
+
+            assert_((2j*A).dtype == np.complex128)
+
+            # Test division by non-scalar
+            msg = "Can only divide a linear operator by a scalar."
+            with assert_raises(ValueError, match=msg):
+                A / np.array([1, 2])
+
+            assert_raises(ValueError, A.matvec, np.array([1,2]))
+            assert_raises(ValueError, A.matvec, np.array([1,2,3,4]))
+            assert_raises(ValueError, A.matvec, np.array([[1],[2]]))
+            assert_raises(ValueError, A.matvec, np.array([[1],[2],[3],[4]]))
+
+            assert_raises(ValueError, lambda: A@A)
+            assert_raises(ValueError, lambda: A**2)
+
+        for matvecsA, matvecsB in product(get_matvecs(self.A),
+                                          get_matvecs(self.B)):
+            A = interface.LinearOperator(**matvecsA)
+            B = interface.LinearOperator(**matvecsB)
+            # AtimesB = np.array([[22, 28], [49, 64]])
+            AtimesB = self.A.dot(self.B)
+            X = np.array([[1, 2], [3, 4]])
+
+            assert_equal((A @ B).rmatmat(X), np.dot((AtimesB).T, X))
+            assert_equal((2j * A @ B).rmatmat(X),
+                         np.dot((2j * AtimesB).T.conj(), X))
+
+            assert_equal((A@B)@[1,1], [50,113])
+            assert_equal((A@B)@[[1],[1]], [[50],[113]])
+            assert_equal((A@B).matmat([[1],[1]]), [[50],[113]])
+
+            assert_equal((A @ B).rmatvec([1, 1]), [71, 92])
+            assert_equal((A @ B).H.matvec([1, 1]), [71, 92])
+            assert_equal((A @ B).adjoint().matvec([1, 1]), [71, 92])
+
+            assert_(isinstance(A@B, interface._ProductLinearOperator))
+
+            assert_raises(ValueError, lambda: A+B)
+            assert_raises(ValueError, lambda: A**2)
+
+            z = A@B
+            assert_(len(z.args) == 2 and z.args[0] is A and z.args[1] is B)
+
+        for matvecsC in get_matvecs(self.C):
+            C = interface.LinearOperator(**matvecsC)
+            X = np.array([[1, 2], [3, 4]])
+
+            assert_equal(C.rmatmat(X), np.dot((self.C).T, X))
+            assert_equal((C**2).rmatmat(X),
+                         np.dot((np.dot(self.C, self.C)).T, X))
+
+            assert_equal((C**2)@[1,1], [17,37])
+            assert_equal((C**2).rmatvec([1, 1]), [22, 32])
+            assert_equal((C**2).H.matvec([1, 1]), [22, 32])
+            assert_equal((C**2).adjoint().matvec([1, 1]), [22, 32])
+            assert_equal((C**2).matmat([[1],[1]]), [[17],[37]])
+
+            assert_(isinstance(C**2, interface._PowerLinearOperator))
+
+    def test_matmul(self):
+        D = {'shape': self.A.shape,
+             'matvec': lambda x: np.dot(self.A, x).reshape(self.A.shape[0]),
+             'rmatvec': lambda x: np.dot(self.A.T.conj(),
+                                         x).reshape(self.A.shape[1]),
+             'rmatmat': lambda x: np.dot(self.A.T.conj(), x),
+             'matmat': lambda x: np.dot(self.A, x)}
+        A = interface.LinearOperator(**D)
+        B = np.array([[1 + 1j, 2, 3],
+                      [4, 5, 6],
+                      [7, 8, 9]])
+        b = B[0]
+
+        assert_equal(operator.matmul(A, b), A * b)
+        assert_equal(operator.matmul(A, b.reshape(-1, 1)), A * b.reshape(-1, 1))
+        assert_equal(operator.matmul(A, B), A @ B)
+        assert_equal(operator.matmul(b, A.H), b * A.H)
+        assert_equal(operator.matmul(b, A.adjoint()), b * A.adjoint())
+        assert_equal(operator.matmul(b.reshape(1, -1), A.H), b.reshape(1, -1) * A.H)
+        assert_equal(operator.matmul(b.reshape(1, -1), A.adjoint()),
+                     b.reshape(1, -1) * A.adjoint())
+        assert_equal(operator.matmul(B, A.H), B @ A.H)
+        assert_equal(operator.matmul(B, A.adjoint()), B @ A.adjoint())
+        assert_raises(ValueError, operator.matmul, A, 2)
+        assert_raises(ValueError, operator.matmul, 2, A)
+
+
+class TestAsLinearOperator:
+    def setup_method(self):
+        self.cases = []
+
+        def make_cases(original, dtype):
+            cases = []
+
+            cases.append((matrix(original, dtype=dtype), original))
+            cases.append((np.array(original, dtype=dtype), original))
+            cases.append((sparse.csr_array(original, dtype=dtype), original))
+
+            # Test default implementations of _adjoint and _rmatvec, which
+            # refer to each other.
+            def mv(x, dtype):
+                y = original.dot(x)
+                if len(x.shape) == 2:
+                    y = y.reshape(-1, 1)
+                return y
+
+            def rmv(x, dtype):
+                return original.T.conj().dot(x)
+
+            class BaseMatlike(interface.LinearOperator):
+                args = ()
+
+                def __init__(self, dtype):
+                    self.dtype = np.dtype(dtype)
+                    self.shape = original.shape
+
+                def _matvec(self, x):
+                    return mv(x, self.dtype)
+
+            class HasRmatvec(BaseMatlike):
+                args = ()
+
+                def _rmatvec(self,x):
+                    return rmv(x, self.dtype)
+
+            class HasAdjoint(BaseMatlike):
+                args = ()
+
+                def _adjoint(self):
+                    shape = self.shape[1], self.shape[0]
+                    matvec = partial(rmv, dtype=self.dtype)
+                    rmatvec = partial(mv, dtype=self.dtype)
+                    return interface.LinearOperator(matvec=matvec,
+                                                    rmatvec=rmatvec,
+                                                    dtype=self.dtype,
+                                                    shape=shape)
+
+            class HasRmatmat(HasRmatvec):
+                def _matmat(self, x):
+                    return original.dot(x)
+
+                def _rmatmat(self, x):
+                    return original.T.conj().dot(x)
+
+            cases.append((HasRmatvec(dtype), original))
+            cases.append((HasAdjoint(dtype), original))
+            cases.append((HasRmatmat(dtype), original))
+            return cases
+
+        original = np.array([[1,2,3], [4,5,6]])
+        self.cases += make_cases(original, np.int32)
+        self.cases += make_cases(original, np.float32)
+        self.cases += make_cases(original, np.float64)
+        self.cases += [(interface.aslinearoperator(M).T, A.T)
+                       for M, A in make_cases(original.T, np.float64)]
+        self.cases += [(interface.aslinearoperator(M).H, A.T.conj())
+                       for M, A in make_cases(original.T, np.float64)]
+        self.cases += [(interface.aslinearoperator(M).adjoint(), A.T.conj())
+                       for M, A in make_cases(original.T, np.float64)]
+
+        original = np.array([[1, 2j, 3j], [4j, 5j, 6]])
+        self.cases += make_cases(original, np.complex128)
+        self.cases += [(interface.aslinearoperator(M).T, A.T)
+                       for M, A in make_cases(original.T, np.complex128)]
+        self.cases += [(interface.aslinearoperator(M).H, A.T.conj())
+                       for M, A in make_cases(original.T, np.complex128)]
+        self.cases += [(interface.aslinearoperator(M).adjoint(), A.T.conj())
+                       for M, A in make_cases(original.T, np.complex128)]
+
+    def test_basic(self):
+
+        for M, A_array in self.cases:
+            A = interface.aslinearoperator(M)
+            M,N = A.shape
+
+            xs = [np.array([1, 2, 3]),
+                  np.array([[1], [2], [3]])]
+            ys = [np.array([1, 2]), np.array([[1], [2]])]
+
+            if A.dtype == np.complex128:
+                xs += [np.array([1, 2j, 3j]),
+                       np.array([[1], [2j], [3j]])]
+                ys += [np.array([1, 2j]), np.array([[1], [2j]])]
+
+            x2 = np.array([[1, 4], [2, 5], [3, 6]])
+
+            for x in xs:
+                assert_equal(A.matvec(x), A_array.dot(x))
+                assert_equal(A @ x, A_array.dot(x))
+
+            assert_equal(A.matmat(x2), A_array.dot(x2))
+            assert_equal(A @ x2, A_array.dot(x2))
+
+            for y in ys:
+                assert_equal(A.rmatvec(y), A_array.T.conj().dot(y))
+                assert_equal(A.T.matvec(y), A_array.T.dot(y))
+                assert_equal(A.H.matvec(y), A_array.T.conj().dot(y))
+                assert_equal(A.adjoint().matvec(y), A_array.T.conj().dot(y))
+
+            for y in ys:
+                if y.ndim < 2:
+                    continue
+                assert_equal(A.rmatmat(y), A_array.T.conj().dot(y))
+                assert_equal(A.T.matmat(y), A_array.T.dot(y))
+                assert_equal(A.H.matmat(y), A_array.T.conj().dot(y))
+                assert_equal(A.adjoint().matmat(y), A_array.T.conj().dot(y))
+
+            if hasattr(M,'dtype'):
+                assert_equal(A.dtype, M.dtype)
+
+            assert_(hasattr(A, 'args'))
+
+    def test_dot(self):
+
+        for M, A_array in self.cases:
+            A = interface.aslinearoperator(M)
+            M,N = A.shape
+
+            x0 = np.array([1, 2, 3])
+            x1 = np.array([[1], [2], [3]])
+            x2 = np.array([[1, 4], [2, 5], [3, 6]])
+
+            assert_equal(A.dot(x0), A_array.dot(x0))
+            assert_equal(A.dot(x1), A_array.dot(x1))
+            assert_equal(A.dot(x2), A_array.dot(x2))
+
+
+def test_repr():
+    A = interface.LinearOperator(shape=(1, 1), matvec=lambda x: 1)
+    repr_A = repr(A)
+    assert_('unspecified dtype' not in repr_A, repr_A)
+
+
+def test_identity():
+    ident = interface.IdentityOperator((3, 3))
+    assert_equal(ident @ [1, 2, 3], [1, 2, 3])
+    assert_equal(ident.dot(np.arange(9).reshape(3, 3)).ravel(), np.arange(9))
+
+    assert_raises(ValueError, ident.matvec, [1, 2, 3, 4])
+
+
+def test_attributes():
+    A = interface.aslinearoperator(np.arange(16).reshape(4, 4))
+
+    def always_four_ones(x):
+        x = np.asarray(x)
+        assert_(x.shape == (3,) or x.shape == (3, 1))
+        return np.ones(4)
+
+    B = interface.LinearOperator(shape=(4, 3), matvec=always_four_ones)
+
+    ops = [A, B, A * B, A @ B, A.H, A.adjoint(), A + A, B + B, A**4]
+    for op in ops:
+        assert_(hasattr(op, "dtype"))
+        assert_(hasattr(op, "shape"))
+        assert_(hasattr(op, "_matvec"))
+
+def matvec(x):
+    """ Needed for test_pickle as local functions are not pickleable """
+    return np.zeros(3)
+
+def test_pickle():
+    import pickle
+
+    for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
+        A = interface.LinearOperator((3, 3), matvec)
+        s = pickle.dumps(A, protocol=protocol)
+        B = pickle.loads(s)
+
+        for k in A.__dict__:
+            assert_equal(getattr(A, k), getattr(B, k))
+
+
+@pytest.mark.thread_unsafe
+def test_inheritance():
+    class Empty(interface.LinearOperator):
+        pass
+
+    with warns(RuntimeWarning, match="should implement at least"):
+        assert_raises(TypeError, Empty)
+
+    class Identity(interface.LinearOperator):
+        def __init__(self, n):
+            super().__init__(dtype=None, shape=(n, n))
+
+        def _matvec(self, x):
+            return x
+
+    id3 = Identity(3)
+    assert_equal(id3.matvec([1, 2, 3]), [1, 2, 3])
+    assert_raises(NotImplementedError, id3.rmatvec, [4, 5, 6])
+
+    class MatmatOnly(interface.LinearOperator):
+        def __init__(self, A):
+            super().__init__(A.dtype, A.shape)
+            self.A = A
+
+        def _matmat(self, x):
+            return self.A.dot(x)
+
+    mm = MatmatOnly(np.random.randn(5, 3))
+    assert_equal(mm.matvec(np.random.randn(3)).shape, (5,))
+
+def test_dtypes_of_operator_sum():
+    # gh-6078
+
+    mat_complex = np.random.rand(2,2) + 1j * np.random.rand(2,2)
+    mat_real = np.random.rand(2,2)
+
+    complex_operator = interface.aslinearoperator(mat_complex)
+    real_operator = interface.aslinearoperator(mat_real)
+
+    sum_complex = complex_operator + complex_operator
+    sum_real = real_operator + real_operator
+
+    assert_equal(sum_real.dtype, np.float64)
+    assert_equal(sum_complex.dtype, np.complex128)
+
+def test_no_double_init():
+    call_count = [0]
+
+    def matvec(v):
+        call_count[0] += 1
+        return v
+
+    # It should call matvec exactly once (in order to determine the
+    # operator dtype)
+    interface.LinearOperator((2, 2), matvec=matvec)
+    assert_equal(call_count[0], 1)
+
+INT_DTYPES = (np.int8, np.int16, np.int32, np.int64)
+REAL_DTYPES = (np.float32, np.float64, np.longdouble)
+COMPLEX_DTYPES = (np.complex64, np.complex128, np.clongdouble)
+INEXACTDTYPES = REAL_DTYPES + COMPLEX_DTYPES
+ALLDTYPES = INT_DTYPES + INEXACTDTYPES
+
+
+@pytest.mark.parametrize("test_dtype", ALLDTYPES)
+def test_determine_lo_dtype_from_matvec(test_dtype):
+    # gh-19209
+    scalar = np.array(1, dtype=test_dtype)
+    def mv(v):
+        return np.array([scalar * v[0], v[1]])
+
+    lo = interface.LinearOperator((2, 2), matvec=mv)
+    assert lo.dtype == np.dtype(test_dtype)
+
+def test_determine_lo_dtype_for_int():
+    # gh-19209
+    # test Python int larger than int8 max cast to some int
+    def mv(v):
+        return np.array([128 * v[0], v[1]])
+
+    lo = interface.LinearOperator((2, 2), matvec=mv)
+    assert lo.dtype in INT_DTYPES
+
+def test_adjoint_conjugate():
+    X = np.array([[1j]])
+    A = interface.aslinearoperator(X)
+
+    B = 1j * A
+    Y = 1j * X
+
+    v = np.array([1])
+
+    assert_equal(B.dot(v), Y.dot(v))
+    assert_equal(B.H.dot(v), Y.T.conj().dot(v))
+    assert_equal(B.adjoint().dot(v), Y.T.conj().dot(v))
+
+def test_ndim():
+    X = np.array([[1]])
+    A = interface.aslinearoperator(X)
+    assert_equal(A.ndim, 2)
+
+def test_transpose_noconjugate():
+    X = np.array([[1j]])
+    A = interface.aslinearoperator(X)
+
+    B = 1j * A
+    Y = 1j * X
+
+    v = np.array([1])
+
+    assert_equal(B.dot(v), Y.dot(v))
+    assert_equal(B.T.dot(v), Y.T.dot(v))
+
+def test_transpose_multiplication():
+    class MyMatrix(interface.LinearOperator):
+        def __init__(self, A):
+            super().__init__(A.dtype, A.shape)
+            self.A = A
+        def _matmat(self, other): return self.A @ other
+        def _rmatmat(self, other): return self.A.T @ other
+
+    A = MyMatrix(np.array([[1, 2], [3, 4]]))
+    X = np.array([1, 2])
+    B = np.array([[10, 20], [30, 40]])
+    X2 = X.reshape(-1, 1)
+    Y = np.array([[1, 2], [3, 4]])
+
+    assert_equal(A @ B, Y @ B)
+    assert_equal(B.T @ A, B.T @ Y)
+    assert_equal(A.T @ B, Y.T @ B)
+    assert_equal(A @ X, Y @ X)
+    assert_equal(X.T @ A, X.T @ Y)
+    assert_equal(A.T @ X, Y.T @ X)
+    assert_equal(A @ X2, Y @ X2)
+    assert_equal(X2.T @ A, X2.T @ Y)
+    assert_equal(A.T @ X2, Y.T @ X2)
+
+def test_sparse_matmat_exception():
+    A = interface.LinearOperator((2, 2), matvec=lambda x: x)
+    B = sparse.eye_array(2)
+    msg = "Unable to multiply a LinearOperator with a sparse matrix."
+    with assert_raises(TypeError, match=msg):
+        A @ B
+    with assert_raises(TypeError, match=msg):
+        B @ A
+    with assert_raises(ValueError):
+        A @ np.identity(4)
+    with assert_raises(ValueError):
+        np.identity(4) @ A
+
+
+@pytest.mark.skipif(IS_PYPY, reason="Test not meaningful on PyPy")
+def test_MatrixLinearOperator_refcycle():
+    # gh-10634
+    # Test that MatrixLinearOperator can be automatically garbage collected
+    A = np.eye(2)
+    with assert_deallocated(interface.MatrixLinearOperator, A) as op:
+        op.adjoint()
+        del op
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_matfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_matfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a468c39cad30f6f852cc6df64b98588fa70b5ff
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_matfuncs.py
@@ -0,0 +1,592 @@
+#
+# Created by: Pearu Peterson, March 2002
+#
+""" Test functions for scipy.linalg._matfuncs module
+
+"""
+import math
+
+import numpy as np
+from numpy import array, eye, exp, random
+from numpy.testing import (
+        assert_allclose, assert_, assert_array_almost_equal, assert_equal,
+        assert_array_almost_equal_nulp, suppress_warnings)
+
+from scipy.sparse import csc_array, SparseEfficiencyWarning
+from scipy.sparse._construct import eye_array
+from scipy.sparse.linalg._matfuncs import (expm, _expm,
+        ProductOperator, MatrixPowerOperator,
+        _onenorm_matrix_power_nnm, matrix_power)
+from scipy.sparse._sputils import matrix
+from scipy.linalg import logm
+from scipy.special import factorial, binom
+import scipy.sparse
+import scipy.sparse.linalg
+
+
+def _burkardt_13_power(n, p):
+    """
+    A helper function for testing matrix functions.
+
+    Parameters
+    ----------
+    n : integer greater than 1
+        Order of the square matrix to be returned.
+    p : non-negative integer
+        Power of the matrix.
+
+    Returns
+    -------
+    out : ndarray representing a square matrix
+        A Forsythe matrix of order n, raised to the power p.
+
+    """
+    # Input validation.
+    if n != int(n) or n < 2:
+        raise ValueError('n must be an integer greater than 1')
+    n = int(n)
+    if p != int(p) or p < 0:
+        raise ValueError('p must be a non-negative integer')
+    p = int(p)
+
+    # Construct the matrix explicitly.
+    a, b = divmod(p, n)
+    large = np.power(10.0, -n*a)
+    small = large * np.power(10.0, -n)
+    return np.diag([large]*(n-b), b) + np.diag([small]*b, b-n)
+
+
+def test_onenorm_matrix_power_nnm():
+    np.random.seed(1234)
+    for n in range(1, 5):
+        for p in range(5):
+            M = np.random.random((n, n))
+            Mp = np.linalg.matrix_power(M, p)
+            observed = _onenorm_matrix_power_nnm(M, p)
+            expected = np.linalg.norm(Mp, 1)
+            assert_allclose(observed, expected)
+
+def test_matrix_power():
+    np.random.seed(1234)
+    row, col = np.random.randint(0, 4, size=(2, 6))
+    data = np.random.random(size=(6,))
+    Amat = csc_array((data, (row, col)), shape=(4, 4))
+    A = csc_array((data, (row, col)), shape=(4, 4))
+    Adense = A.toarray()
+    for power in (2, 5, 6):
+        Apow = matrix_power(A, power).toarray()
+        Amat_pow = matrix_power(Amat, power).toarray()
+        Adense_pow = np.linalg.matrix_power(Adense, power)
+        assert_allclose(Apow, Adense_pow)
+        assert_allclose(Apow, Amat_pow)
+
+
+class TestExpM:
+    def test_zero_ndarray(self):
+        a = array([[0.,0],[0,0]])
+        assert_array_almost_equal(expm(a),[[1,0],[0,1]])
+
+    def test_zero_sparse(self):
+        a = csc_array([[0.,0],[0,0]])
+        assert_array_almost_equal(expm(a).toarray(),[[1,0],[0,1]])
+
+    def test_zero_matrix(self):
+        a = matrix([[0.,0],[0,0]])
+        assert_array_almost_equal(expm(a),[[1,0],[0,1]])
+
+    def test_misc_types(self):
+        A = expm(np.array([[1]]))
+        assert_allclose(expm(((1,),)), A)
+        assert_allclose(expm([[1]]), A)
+        assert_allclose(expm(matrix([[1]])), A)
+        assert_allclose(expm(np.array([[1]])), A)
+        assert_allclose(expm(csc_array([[1]])).toarray(), A)
+        B = expm(np.array([[1j]]))
+        assert_allclose(expm(((1j,),)), B)
+        assert_allclose(expm([[1j]]), B)
+        assert_allclose(expm(matrix([[1j]])), B)
+        assert_allclose(expm(csc_array([[1j]])).toarray(), B)
+
+    def test_bidiagonal_sparse(self):
+        A = csc_array([
+            [1, 3, 0],
+            [0, 1, 5],
+            [0, 0, 2]], dtype=float)
+        e1 = math.exp(1)
+        e2 = math.exp(2)
+        expected = np.array([
+            [e1, 3*e1, 15*(e2 - 2*e1)],
+            [0, e1, 5*(e2 - e1)],
+            [0, 0, e2]], dtype=float)
+        observed = expm(A).toarray()
+        assert_array_almost_equal(observed, expected)
+
+    def test_padecases_dtype_float(self):
+        for dtype in [np.float32, np.float64]:
+            for scale in [1e-2, 1e-1, 5e-1, 1, 10]:
+                A = scale * eye(3, dtype=dtype)
+                observed = expm(A)
+                expected = exp(scale, dtype=dtype) * eye(3, dtype=dtype)
+                assert_array_almost_equal_nulp(observed, expected, nulp=100)
+
+    def test_padecases_dtype_complex(self):
+        for dtype in [np.complex64, np.complex128]:
+            for scale in [1e-2, 1e-1, 5e-1, 1, 10]:
+                A = scale * eye(3, dtype=dtype)
+                observed = expm(A)
+                expected = exp(scale, dtype=dtype) * eye(3, dtype=dtype)
+                assert_array_almost_equal_nulp(observed, expected, nulp=100)
+
+    def test_padecases_dtype_sparse_float(self):
+        # float32 and complex64 lead to errors in spsolve/UMFpack
+        dtype = np.float64
+        for scale in [1e-2, 1e-1, 5e-1, 1, 10]:
+            a = scale * eye_array(3, 3, dtype=dtype, format='csc')
+            e = exp(scale, dtype=dtype) * eye(3, dtype=dtype)
+            with suppress_warnings() as sup:
+                sup.filter(SparseEfficiencyWarning, "Changing the sparsity structure")
+                exact_onenorm = _expm(a, use_exact_onenorm=True).toarray()
+                inexact_onenorm = _expm(a, use_exact_onenorm=False).toarray()
+            assert_array_almost_equal_nulp(exact_onenorm, e, nulp=100)
+            assert_array_almost_equal_nulp(inexact_onenorm, e, nulp=100)
+
+    def test_padecases_dtype_sparse_complex(self):
+        # float32 and complex64 lead to errors in spsolve/UMFpack
+        dtype = np.complex128
+        for scale in [1e-2, 1e-1, 5e-1, 1, 10]:
+            a = scale * eye_array(3, 3, dtype=dtype, format='csc')
+            e = exp(scale) * eye(3, dtype=dtype)
+            with suppress_warnings() as sup:
+                sup.filter(SparseEfficiencyWarning, "Changing the sparsity structure")
+                assert_array_almost_equal_nulp(expm(a).toarray(), e, nulp=100)
+
+    def test_logm_consistency(self):
+        random.seed(1234)
+        for dtype in [np.float64, np.complex128]:
+            for n in range(1, 10):
+                for scale in [1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1, 1e2]:
+                    # make logm(A) be of a given scale
+                    A = (eye(n) + random.rand(n, n) * scale).astype(dtype)
+                    if np.iscomplexobj(A):
+                        A = A + 1j * random.rand(n, n) * scale
+                    assert_array_almost_equal(expm(logm(A)), A)
+
+    def test_integer_matrix(self):
+        Q = np.array([
+            [-3, 1, 1, 1],
+            [1, -3, 1, 1],
+            [1, 1, -3, 1],
+            [1, 1, 1, -3]])
+        assert_allclose(expm(Q), expm(1.0 * Q))
+
+    def test_integer_matrix_2(self):
+        # Check for integer overflows
+        Q = np.array([[-500, 500, 0, 0],
+                      [0, -550, 360, 190],
+                      [0, 630, -630, 0],
+                      [0, 0, 0, 0]], dtype=np.int16)
+        assert_allclose(expm(Q), expm(1.0 * Q))
+
+        Q = csc_array(Q)
+        assert_allclose(expm(Q).toarray(), expm(1.0 * Q).toarray())
+
+    def test_triangularity_perturbation(self):
+        # Experiment (1) of
+        # Awad H. Al-Mohy and Nicholas J. Higham (2012)
+        # Improved Inverse Scaling and Squaring Algorithms
+        # for the Matrix Logarithm.
+        A = np.array([
+            [3.2346e-1, 3e4, 3e4, 3e4],
+            [0, 3.0089e-1, 3e4, 3e4],
+            [0, 0, 3.221e-1, 3e4],
+            [0, 0, 0, 3.0744e-1]],
+            dtype=float)
+        A_logm = np.array([
+            [-1.12867982029050462e+00, 9.61418377142025565e+04,
+             -4.52485573953179264e+09, 2.92496941103871812e+14],
+            [0.00000000000000000e+00, -1.20101052953082288e+00,
+             9.63469687211303099e+04, -4.68104828911105442e+09],
+            [0.00000000000000000e+00, 0.00000000000000000e+00,
+             -1.13289322264498393e+00, 9.53249183094775653e+04],
+            [0.00000000000000000e+00, 0.00000000000000000e+00,
+             0.00000000000000000e+00, -1.17947533272554850e+00]],
+            dtype=float)
+        assert_allclose(expm(A_logm), A, rtol=1e-4)
+
+        # Perturb the upper triangular matrix by tiny amounts,
+        # so that it becomes technically not upper triangular.
+        random.seed(1234)
+        tiny = 1e-17
+        A_logm_perturbed = A_logm.copy()
+        A_logm_perturbed[1, 0] = tiny
+        with suppress_warnings() as sup:
+            sup.filter(RuntimeWarning, "Ill-conditioned.*")
+            A_expm_logm_perturbed = expm(A_logm_perturbed)
+        rtol = 1e-4
+        atol = 100 * tiny
+        assert_(not np.allclose(A_expm_logm_perturbed, A, rtol=rtol, atol=atol))
+
+    def test_burkardt_1(self):
+        # This matrix is diagonal.
+        # The calculation of the matrix exponential is simple.
+        #
+        # This is the first of a series of matrix exponential tests
+        # collected by John Burkardt from the following sources.
+        #
+        # Alan Laub,
+        # Review of "Linear System Theory" by Joao Hespanha,
+        # SIAM Review,
+        # Volume 52, Number 4, December 2010, pages 779--781.
+        #
+        # Cleve Moler and Charles Van Loan,
+        # Nineteen Dubious Ways to Compute the Exponential of a Matrix,
+        # Twenty-Five Years Later,
+        # SIAM Review,
+        # Volume 45, Number 1, March 2003, pages 3--49.
+        #
+        # Cleve Moler,
+        # Cleve's Corner: A Balancing Act for the Matrix Exponential,
+        # 23 July 2012.
+        #
+        # Robert Ward,
+        # Numerical computation of the matrix exponential
+        # with accuracy estimate,
+        # SIAM Journal on Numerical Analysis,
+        # Volume 14, Number 4, September 1977, pages 600--610.
+        exp1 = np.exp(1)
+        exp2 = np.exp(2)
+        A = np.array([
+            [1, 0],
+            [0, 2],
+            ], dtype=float)
+        desired = np.array([
+            [exp1, 0],
+            [0, exp2],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_2(self):
+        # This matrix is symmetric.
+        # The calculation of the matrix exponential is straightforward.
+        A = np.array([
+            [1, 3],
+            [3, 2],
+            ], dtype=float)
+        desired = np.array([
+            [39.322809708033859, 46.166301438885753],
+            [46.166301438885768, 54.711576854329110],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_3(self):
+        # This example is due to Laub.
+        # This matrix is ill-suited for the Taylor series approach.
+        # As powers of A are computed, the entries blow up too quickly.
+        exp1 = np.exp(1)
+        exp39 = np.exp(39)
+        A = np.array([
+            [0, 1],
+            [-39, -40],
+            ], dtype=float)
+        desired = np.array([
+            [
+                39/(38*exp1) - 1/(38*exp39),
+                -np.expm1(-38) / (38*exp1)],
+            [
+                39*np.expm1(-38) / (38*exp1),
+                -1/(38*exp1) + 39/(38*exp39)],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_4(self):
+        # This example is due to Moler and Van Loan.
+        # The example will cause problems for the series summation approach,
+        # as well as for diagonal Pade approximations.
+        A = np.array([
+            [-49, 24],
+            [-64, 31],
+            ], dtype=float)
+        U = np.array([[3, 1], [4, 2]], dtype=float)
+        V = np.array([[1, -1/2], [-2, 3/2]], dtype=float)
+        w = np.array([-17, -1], dtype=float)
+        desired = np.dot(U * np.exp(w), V)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_5(self):
+        # This example is due to Moler and Van Loan.
+        # This matrix is strictly upper triangular
+        # All powers of A are zero beyond some (low) limit.
+        # This example will cause problems for Pade approximations.
+        A = np.array([
+            [0, 6, 0, 0],
+            [0, 0, 6, 0],
+            [0, 0, 0, 6],
+            [0, 0, 0, 0],
+            ], dtype=float)
+        desired = np.array([
+            [1, 6, 18, 36],
+            [0, 1, 6, 18],
+            [0, 0, 1, 6],
+            [0, 0, 0, 1],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_6(self):
+        # This example is due to Moler and Van Loan.
+        # This matrix does not have a complete set of eigenvectors.
+        # That means the eigenvector approach will fail.
+        exp1 = np.exp(1)
+        A = np.array([
+            [1, 1],
+            [0, 1],
+            ], dtype=float)
+        desired = np.array([
+            [exp1, exp1],
+            [0, exp1],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_7(self):
+        # This example is due to Moler and Van Loan.
+        # This matrix is very close to example 5.
+        # Mathematically, it has a complete set of eigenvectors.
+        # Numerically, however, the calculation will be suspect.
+        exp1 = np.exp(1)
+        eps = np.spacing(1)
+        A = np.array([
+            [1 + eps, 1],
+            [0, 1 - eps],
+            ], dtype=float)
+        desired = np.array([
+            [exp1, exp1],
+            [0, exp1],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_8(self):
+        # This matrix was an example in Wikipedia.
+        exp4 = np.exp(4)
+        exp16 = np.exp(16)
+        A = np.array([
+            [21, 17, 6],
+            [-5, -1, -6],
+            [4, 4, 16],
+            ], dtype=float)
+        desired = np.array([
+            [13*exp16 - exp4, 13*exp16 - 5*exp4, 2*exp16 - 2*exp4],
+            [-9*exp16 + exp4, -9*exp16 + 5*exp4, -2*exp16 + 2*exp4],
+            [16*exp16, 16*exp16, 4*exp16],
+            ], dtype=float) * 0.25
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_9(self):
+        # This matrix is due to the NAG Library.
+        # It is an example for function F01ECF.
+        A = np.array([
+            [1, 2, 2, 2],
+            [3, 1, 1, 2],
+            [3, 2, 1, 2],
+            [3, 3, 3, 1],
+            ], dtype=float)
+        desired = np.array([
+            [740.7038, 610.8500, 542.2743, 549.1753],
+            [731.2510, 603.5524, 535.0884, 542.2743],
+            [823.7630, 679.4257, 603.5524, 610.8500],
+            [998.4355, 823.7630, 731.2510, 740.7038],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_10(self):
+        # This is Ward's example #1.
+        # It is defective and nonderogatory.
+        A = np.array([
+            [4, 2, 0],
+            [1, 4, 1],
+            [1, 1, 4],
+            ], dtype=float)
+        assert_allclose(sorted(scipy.linalg.eigvals(A)), (3, 3, 6))
+        desired = np.array([
+            [147.8666224463699, 183.7651386463682, 71.79703239999647],
+            [127.7810855231823, 183.7651386463682, 91.88256932318415],
+            [127.7810855231824, 163.6796017231806, 111.9681062463718],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_11(self):
+        # This is Ward's example #2.
+        # It is a symmetric matrix.
+        A = np.array([
+            [29.87942128909879, 0.7815750847907159, -2.289519314033932],
+            [0.7815750847907159, 25.72656945571064, 8.680737820540137],
+            [-2.289519314033932, 8.680737820540137, 34.39400925519054],
+            ], dtype=float)
+        assert_allclose(scipy.linalg.eigvalsh(A), (20, 30, 40))
+        desired = np.array([
+             [
+                 5.496313853692378E+15,
+                 -1.823188097200898E+16,
+                 -3.047577080858001E+16],
+             [
+                -1.823188097200899E+16,
+                6.060522870222108E+16,
+                1.012918429302482E+17],
+             [
+                -3.047577080858001E+16,
+                1.012918429302482E+17,
+                1.692944112408493E+17],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_12(self):
+        # This is Ward's example #3.
+        # Ward's algorithm has difficulty estimating the accuracy
+        # of its results.
+        A = np.array([
+            [-131, 19, 18],
+            [-390, 56, 54],
+            [-387, 57, 52],
+            ], dtype=float)
+        assert_allclose(sorted(scipy.linalg.eigvals(A)), (-20, -2, -1))
+        desired = np.array([
+            [-1.509644158793135, 0.3678794391096522, 0.1353352811751005],
+            [-5.632570799891469, 1.471517758499875, 0.4060058435250609],
+            [-4.934938326088363, 1.103638317328798, 0.5413411267617766],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_burkardt_13(self):
+        # This is Ward's example #4.
+        # This is a version of the Forsythe matrix.
+        # The eigenvector problem is badly conditioned.
+        # Ward's algorithm has difficulty estimating the accuracy
+        # of its results for this problem.
+        #
+        # Check the construction of one instance of this family of matrices.
+        A4_actual = _burkardt_13_power(4, 1)
+        A4_desired = [[0, 1, 0, 0],
+                      [0, 0, 1, 0],
+                      [0, 0, 0, 1],
+                      [1e-4, 0, 0, 0]]
+        assert_allclose(A4_actual, A4_desired)
+        # Check the expm for a few instances.
+        for n in (2, 3, 4, 10):
+            # Approximate expm using Taylor series.
+            # This works well for this matrix family
+            # because each matrix in the summation,
+            # even before dividing by the factorial,
+            # is entrywise positive with max entry 10**(-floor(p/n)*n).
+            k = max(1, int(np.ceil(16/n)))
+            desired = np.zeros((n, n), dtype=float)
+            for p in range(n*k):
+                Ap = _burkardt_13_power(n, p)
+                assert_equal(np.min(Ap), 0)
+                assert_allclose(np.max(Ap), np.power(10, -np.floor(p/n)*n))
+                desired += Ap / factorial(p)
+            actual = expm(_burkardt_13_power(n, 1))
+            assert_allclose(actual, desired)
+
+    def test_burkardt_14(self):
+        # This is Moler's example.
+        # This badly scaled matrix caused problems for MATLAB's expm().
+        A = np.array([
+            [0, 1e-8, 0],
+            [-(2e10 + 4e8/6.), -3, 2e10],
+            [200./3., 0, -200./3.],
+            ], dtype=float)
+        desired = np.array([
+            [0.446849468283175, 1.54044157383952e-09, 0.462811453558774],
+            [-5743067.77947947, -0.0152830038686819, -4526542.71278401],
+            [0.447722977849494, 1.54270484519591e-09, 0.463480648837651],
+            ], dtype=float)
+        actual = expm(A)
+        assert_allclose(actual, desired)
+
+    def test_pascal(self):
+        # Test pascal triangle.
+        # Nilpotent exponential, used to trigger a failure (gh-8029)
+
+        for scale in [1.0, 1e-3, 1e-6]:
+            for n in range(0, 80, 3):
+                sc = scale ** np.arange(n, -1, -1)
+                if np.any(sc < 1e-300):
+                    break
+
+                A = np.diag(np.arange(1, n + 1), -1) * scale
+                B = expm(A)
+
+                got = B
+                expected = binom(np.arange(n + 1)[:,None],
+                                 np.arange(n + 1)[None,:]) * sc[None,:] / sc[:,None]
+                atol = 1e-13 * abs(expected).max()
+                assert_allclose(got, expected, atol=atol)
+
+    def test_matrix_input(self):
+        # Large np.matrix inputs should work, gh-5546
+        A = np.zeros((200, 200))
+        A[-1,0] = 1
+        B0 = expm(A)
+        with suppress_warnings() as sup:
+            sup.filter(DeprecationWarning, "the matrix subclass.*")
+            sup.filter(PendingDeprecationWarning, "the matrix subclass.*")
+            B = expm(np.matrix(A))
+        assert_allclose(B, B0)
+
+    def test_exp_sinch_overflow(self):
+        # Check overflow in intermediate steps is fixed (gh-11839)
+        L = np.array([[1.0, -0.5, -0.5, 0.0, 0.0, 0.0, 0.0],
+                      [0.0, 1.0, 0.0, -0.5, -0.5, 0.0, 0.0],
+                      [0.0, 0.0, 1.0, 0.0, 0.0, -0.5, -0.5],
+                      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+                      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+                      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
+                      [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]])
+
+        E0 = expm(-L)
+        E1 = expm(-2**11 * L)
+        E2 = E0
+        for j in range(11):
+            E2 = E2 @ E2
+
+        assert_allclose(E1, E2)
+
+
+class TestOperators:
+
+    def test_product_operator(self):
+        random.seed(1234)
+        n = 5
+        k = 2
+        nsamples = 10
+        for i in range(nsamples):
+            A = np.random.randn(n, n)
+            B = np.random.randn(n, n)
+            C = np.random.randn(n, n)
+            D = np.random.randn(n, k)
+            op = ProductOperator(A, B, C)
+            assert_allclose(op.matmat(D), A.dot(B).dot(C).dot(D))
+            assert_allclose(op.T.matmat(D), (A.dot(B).dot(C)).T.dot(D))
+
+    def test_matrix_power_operator(self):
+        random.seed(1234)
+        n = 5
+        k = 2
+        p = 3
+        nsamples = 10
+        for i in range(nsamples):
+            A = np.random.randn(n, n)
+            B = np.random.randn(n, k)
+            op = MatrixPowerOperator(A, p)
+            assert_allclose(op.matmat(B), np.linalg.matrix_power(A, p).dot(B))
+            assert_allclose(op.T.matmat(B), np.linalg.matrix_power(A, p).T.dot(B))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_norm.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_norm.py
new file mode 100644
index 0000000000000000000000000000000000000000..7350f7f61d8d32b24930e063d705031b4e94a419
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_norm.py
@@ -0,0 +1,154 @@
+"""Test functions for the sparse.linalg.norm module
+"""
+
+import pytest
+import numpy as np
+from numpy.linalg import norm as npnorm
+from numpy.testing import assert_allclose, assert_equal
+from pytest import raises as assert_raises
+
+import scipy.sparse
+from scipy.sparse.linalg import norm as spnorm
+
+
+# https://github.com/scipy/scipy/issues/16031
+# https://github.com/scipy/scipy/issues/21690
+def test_sparray_norm():
+    row = np.array([0, 0, 1, 1])
+    col = np.array([0, 1, 2, 3])
+    data = np.array([4, 5, 7, 9])
+    test_arr = scipy.sparse.coo_array((data, (row, col)), shape=(2, 4))
+    test_mat = scipy.sparse.coo_matrix((data, (row, col)), shape=(2, 4))
+    for ord in (1, np.inf, None):
+        for ax in [0, 1, None, (0, 1), (1, 0)]:
+            for A in (test_arr, test_mat):
+                expected = npnorm(A.toarray(), ord=ord, axis=ax)
+                actual = spnorm(A, ord=ord, axis=ax)
+                assert hasattr(actual, "dtype")
+                assert_equal(actual, expected)
+    # test 1d array and 1d-like (column) matrix
+    test_arr_1d = scipy.sparse.coo_array((data, (col,)), shape=(4,))
+    test_mat_col = scipy.sparse.coo_matrix((data, (col, [0, 0, 0, 0])), shape=(4, 1))
+    for ord in (1, np.inf, None):
+        for ax in [0, None]:
+            for A in (test_arr_1d, test_mat_col):
+                expected = npnorm(A.toarray(), ord=ord, axis=ax)
+                assert_equal(spnorm(A, ord=ord, axis=ax), expected)
+
+
+class TestNorm:
+    def setup_method(self):
+        a = np.arange(9) - 4
+        b = a.reshape((3, 3))
+        self.b = scipy.sparse.csr_array(b)
+
+    @pytest.mark.thread_unsafe
+    def test_matrix_norm(self):
+
+        # Frobenius norm is the default
+        assert_allclose(spnorm(self.b), 7.745966692414834)
+        assert_allclose(spnorm(self.b, 'fro'), 7.745966692414834)
+
+        assert_allclose(spnorm(self.b, np.inf), 9)
+        assert_allclose(spnorm(self.b, -np.inf), 2)
+        assert_allclose(spnorm(self.b, 1), 7)
+        assert_allclose(spnorm(self.b, -1), 6)
+        # Only floating or complex floating dtype supported by svds.
+        with pytest.warns(UserWarning, match="The problem size"):
+            assert_allclose(spnorm(self.b.astype(np.float64), 2),
+                            7.348469228349534)
+
+        # _multi_svd_norm is not implemented for sparse array
+        assert_raises(NotImplementedError, spnorm, self.b, -2)
+
+    def test_matrix_norm_axis(self):
+        for m, axis in ((self.b, None), (self.b, (0, 1)), (self.b.T, (1, 0))):
+            assert_allclose(spnorm(m, axis=axis), 7.745966692414834)
+            assert_allclose(spnorm(m, 'fro', axis=axis), 7.745966692414834)
+            assert_allclose(spnorm(m, np.inf, axis=axis), 9)
+            assert_allclose(spnorm(m, -np.inf, axis=axis), 2)
+            assert_allclose(spnorm(m, 1, axis=axis), 7)
+            assert_allclose(spnorm(m, -1, axis=axis), 6)
+
+    def test_vector_norm(self):
+        v = [4.5825756949558398, 4.2426406871192848, 4.5825756949558398]
+        for m, a in (self.b, 0), (self.b.T, 1):
+            for axis in a, (a, ), a-2, (a-2, ):
+                assert_allclose(spnorm(m, 1, axis=axis), [7, 6, 7])
+                assert_allclose(spnorm(m, np.inf, axis=axis), [4, 3, 4])
+                assert_allclose(spnorm(m, axis=axis), v)
+                assert_allclose(spnorm(m, ord=2, axis=axis), v)
+                assert_allclose(spnorm(m, ord=None, axis=axis), v)
+
+    def test_norm_exceptions(self):
+        m = self.b
+        assert_raises(TypeError, spnorm, m, None, 1.5)
+        assert_raises(TypeError, spnorm, m, None, [2])
+        assert_raises(ValueError, spnorm, m, None, ())
+        assert_raises(ValueError, spnorm, m, None, (0, 1, 2))
+        assert_raises(ValueError, spnorm, m, None, (0, 0))
+        assert_raises(ValueError, spnorm, m, None, (0, 2))
+        assert_raises(ValueError, spnorm, m, None, (-3, 0))
+        assert_raises(ValueError, spnorm, m, None, 2)
+        assert_raises(ValueError, spnorm, m, None, -3)
+        assert_raises(ValueError, spnorm, m, 'plate_of_shrimp', 0)
+        assert_raises(ValueError, spnorm, m, 'plate_of_shrimp', (0, 1))
+
+
+class TestVsNumpyNorm:
+    _sparse_types = (
+            scipy.sparse.bsr_array,
+            scipy.sparse.coo_array,
+            scipy.sparse.csc_array,
+            scipy.sparse.csr_array,
+            scipy.sparse.dia_array,
+            scipy.sparse.dok_array,
+            scipy.sparse.lil_array,
+            )
+    _test_matrices = (
+            (np.arange(9) - 4).reshape((3, 3)),
+            [
+                [1, 2, 3],
+                [-1, 1, 4]],
+            [
+                [1, 0, 3],
+                [-1, 1, 4j]],
+            )
+
+    def test_sparse_matrix_norms(self):
+        for sparse_type in self._sparse_types:
+            for M in self._test_matrices:
+                S = sparse_type(M)
+                assert_allclose(spnorm(S), npnorm(M))
+                assert_allclose(spnorm(S, 'fro'), npnorm(M, 'fro'))
+                assert_allclose(spnorm(S, np.inf), npnorm(M, np.inf))
+                assert_allclose(spnorm(S, -np.inf), npnorm(M, -np.inf))
+                assert_allclose(spnorm(S, 1), npnorm(M, 1))
+                assert_allclose(spnorm(S, -1), npnorm(M, -1))
+
+    def test_sparse_matrix_norms_with_axis(self):
+        for sparse_type in self._sparse_types:
+            for M in self._test_matrices:
+                S = sparse_type(M)
+                for axis in None, (0, 1), (1, 0):
+                    assert_allclose(spnorm(S, axis=axis), npnorm(M, axis=axis))
+                    for ord in 'fro', np.inf, -np.inf, 1, -1:
+                        assert_allclose(spnorm(S, ord, axis=axis),
+                                        npnorm(M, ord, axis=axis))
+                # Some numpy matrix norms are allergic to negative axes.
+                for axis in (-2, -1), (-1, -2), (1, -2):
+                    assert_allclose(spnorm(S, axis=axis), npnorm(M, axis=axis))
+                    assert_allclose(spnorm(S, 'f', axis=axis),
+                                    npnorm(M, 'f', axis=axis))
+                    assert_allclose(spnorm(S, 'fro', axis=axis),
+                                    npnorm(M, 'fro', axis=axis))
+
+    def test_sparse_vector_norms(self):
+        for sparse_type in self._sparse_types:
+            for M in self._test_matrices:
+                S = sparse_type(M)
+                for axis in (0, 1, -1, -2, (0, ), (1, ), (-1, ), (-2, )):
+                    assert_allclose(spnorm(S, axis=axis), npnorm(M, axis=axis))
+                    for ord in None, 2, np.inf, -np.inf, 1, 0.5, 0.42:
+                        assert_allclose(spnorm(S, ord, axis=axis),
+                                        npnorm(M, ord, axis=axis))
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_onenormest.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_onenormest.py
new file mode 100644
index 0000000000000000000000000000000000000000..d306e8177568d8db31189a5c67b5862e37e8a0fc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_onenormest.py
@@ -0,0 +1,252 @@
+"""Test functions for the sparse.linalg._onenormest module
+"""
+
+import numpy as np
+from numpy.testing import assert_allclose, assert_equal, assert_
+import pytest
+import scipy.linalg
+import scipy.sparse.linalg
+from scipy.sparse.linalg._onenormest import _onenormest_core, _algorithm_2_2
+
+
+class MatrixProductOperator(scipy.sparse.linalg.LinearOperator):
+    """
+    This is purely for onenormest testing.
+    """
+
+    def __init__(self, A, B):
+        if A.ndim != 2 or B.ndim != 2:
+            raise ValueError('expected ndarrays representing matrices')
+        if A.shape[1] != B.shape[0]:
+            raise ValueError('incompatible shapes')
+        self.A = A
+        self.B = B
+        self.ndim = 2
+        self.shape = (A.shape[0], B.shape[1])
+
+    def _matvec(self, x):
+        return np.dot(self.A, np.dot(self.B, x))
+
+    def _rmatvec(self, x):
+        return np.dot(np.dot(x, self.A), self.B)
+
+    def _matmat(self, X):
+        return np.dot(self.A, np.dot(self.B, X))
+
+    @property
+    def T(self):
+        return MatrixProductOperator(self.B.T, self.A.T)
+
+
+class TestOnenormest:
+
+    @pytest.mark.xslow
+    def test_onenormest_table_3_t_2(self):
+        # This will take multiple seconds if your computer is slow like mine.
+        # It is stochastic, so the tolerance could be too strict.
+        np.random.seed(1234)
+        t = 2
+        n = 100
+        itmax = 5
+        nsamples = 5000
+        observed = []
+        expected = []
+        nmult_list = []
+        nresample_list = []
+        for i in range(nsamples):
+            A = scipy.linalg.inv(np.random.randn(n, n))
+            est, v, w, nmults, nresamples = _onenormest_core(A, A.T, t, itmax)
+            observed.append(est)
+            expected.append(scipy.linalg.norm(A, 1))
+            nmult_list.append(nmults)
+            nresample_list.append(nresamples)
+        observed = np.array(observed, dtype=float)
+        expected = np.array(expected, dtype=float)
+        relative_errors = np.abs(observed - expected) / expected
+
+        # check the mean underestimation ratio
+        underestimation_ratio = observed / expected
+        assert_(0.99 < np.mean(underestimation_ratio) < 1.0)
+
+        # check the max and mean required column resamples
+        assert_equal(np.max(nresample_list), 2)
+        assert_(0.05 < np.mean(nresample_list) < 0.2)
+
+        # check the proportion of norms computed exactly correctly
+        nexact = np.count_nonzero(relative_errors < 1e-14)
+        proportion_exact = nexact / float(nsamples)
+        assert_(0.9 < proportion_exact < 0.95)
+
+        # check the average number of matrix*vector multiplications
+        assert_(3.5 < np.mean(nmult_list) < 4.5)
+
+    @pytest.mark.xslow
+    def test_onenormest_table_4_t_7(self):
+        # This will take multiple seconds if your computer is slow like mine.
+        # It is stochastic, so the tolerance could be too strict.
+        np.random.seed(1234)
+        t = 7
+        n = 100
+        itmax = 5
+        nsamples = 5000
+        observed = []
+        expected = []
+        nmult_list = []
+        nresample_list = []
+        for i in range(nsamples):
+            A = np.random.randint(-1, 2, size=(n, n))
+            est, v, w, nmults, nresamples = _onenormest_core(A, A.T, t, itmax)
+            observed.append(est)
+            expected.append(scipy.linalg.norm(A, 1))
+            nmult_list.append(nmults)
+            nresample_list.append(nresamples)
+        observed = np.array(observed, dtype=float)
+        expected = np.array(expected, dtype=float)
+        relative_errors = np.abs(observed - expected) / expected
+
+        # check the mean underestimation ratio
+        underestimation_ratio = observed / expected
+        assert_(0.90 < np.mean(underestimation_ratio) < 0.99)
+
+        # check the required column resamples
+        assert_equal(np.max(nresample_list), 0)
+
+        # check the proportion of norms computed exactly correctly
+        nexact = np.count_nonzero(relative_errors < 1e-14)
+        proportion_exact = nexact / float(nsamples)
+        assert_(0.15 < proportion_exact < 0.25)
+
+        # check the average number of matrix*vector multiplications
+        assert_(3.5 < np.mean(nmult_list) < 4.5)
+
+    def test_onenormest_table_5_t_1(self):
+        # "note that there is no randomness and hence only one estimate for t=1"
+        t = 1
+        n = 100
+        itmax = 5
+        alpha = 1 - 1e-6
+        A = -scipy.linalg.inv(np.identity(n) + alpha*np.eye(n, k=1))
+        first_col = np.array([1] + [0]*(n-1))
+        first_row = np.array([(-alpha)**i for i in range(n)])
+        B = -scipy.linalg.toeplitz(first_col, first_row)
+        assert_allclose(A, B)
+        est, v, w, nmults, nresamples = _onenormest_core(B, B.T, t, itmax)
+        exact_value = scipy.linalg.norm(B, 1)
+        underest_ratio = est / exact_value
+        assert_allclose(underest_ratio, 0.05, rtol=1e-4)
+        assert_equal(nmults, 11)
+        assert_equal(nresamples, 0)
+        # check the non-underscored version of onenormest
+        est_plain = scipy.sparse.linalg.onenormest(B, t=t, itmax=itmax)
+        assert_allclose(est, est_plain)
+
+    @pytest.mark.xslow
+    def test_onenormest_table_6_t_2(self):
+        #TODO this test seems to give estimates that match the table,
+        #TODO even though no attempt has been made to deal with
+        #TODO complex numbers in the one-norm estimation.
+        # This will take multiple seconds if your computer is slow like mine.
+        # It is stochastic, so the tolerance could be too strict.
+        np.random.seed(1234)
+        t = 2
+        n = 100
+        itmax = 5
+        nsamples = 5000
+        observed = []
+        expected = []
+        nmult_list = []
+        nresample_list = []
+        for i in range(nsamples):
+            A_inv = np.random.rand(n, n) + 1j * np.random.rand(n, n)
+            A = scipy.linalg.inv(A_inv)
+            est, v, w, nmults, nresamples = _onenormest_core(A, A.T, t, itmax)
+            observed.append(est)
+            expected.append(scipy.linalg.norm(A, 1))
+            nmult_list.append(nmults)
+            nresample_list.append(nresamples)
+        observed = np.array(observed, dtype=float)
+        expected = np.array(expected, dtype=float)
+        relative_errors = np.abs(observed - expected) / expected
+
+        # check the mean underestimation ratio
+        underestimation_ratio = observed / expected
+        underestimation_ratio_mean = np.mean(underestimation_ratio)
+        assert_(0.90 < underestimation_ratio_mean < 0.99)
+
+        # check the required column resamples
+        max_nresamples = np.max(nresample_list)
+        assert_equal(max_nresamples, 0)
+
+        # check the proportion of norms computed exactly correctly
+        nexact = np.count_nonzero(relative_errors < 1e-14)
+        proportion_exact = nexact / float(nsamples)
+        assert_(0.7 < proportion_exact < 0.8)
+
+        # check the average number of matrix*vector multiplications
+        mean_nmult = np.mean(nmult_list)
+        assert_(4 < mean_nmult < 5)
+
+    def _help_product_norm_slow(self, A, B):
+        # for profiling
+        C = np.dot(A, B)
+        return scipy.linalg.norm(C, 1)
+
+    def _help_product_norm_fast(self, A, B):
+        # for profiling
+        t = 2
+        itmax = 5
+        D = MatrixProductOperator(A, B)
+        est, v, w, nmults, nresamples = _onenormest_core(D, D.T, t, itmax)
+        return est
+
+    @pytest.mark.slow
+    def test_onenormest_linear_operator(self):
+        # Define a matrix through its product A B.
+        # Depending on the shapes of A and B,
+        # it could be easy to multiply this product by a small matrix,
+        # but it could be annoying to look at all of
+        # the entries of the product explicitly.
+        np.random.seed(1234)
+        n = 6000
+        k = 3
+        A = np.random.randn(n, k)
+        B = np.random.randn(k, n)
+        fast_estimate = self._help_product_norm_fast(A, B)
+        exact_value = self._help_product_norm_slow(A, B)
+        assert_(fast_estimate <= exact_value <= 3*fast_estimate,
+                f'fast: {fast_estimate:g}\nexact:{exact_value:g}')
+
+    def test_returns(self):
+        np.random.seed(1234)
+        A = scipy.sparse.rand(50, 50, 0.1)
+
+        s0 = scipy.linalg.norm(A.toarray(), 1)
+        s1, v = scipy.sparse.linalg.onenormest(A, compute_v=True)
+        s2, w = scipy.sparse.linalg.onenormest(A, compute_w=True)
+        s3, v2, w2 = scipy.sparse.linalg.onenormest(A, compute_w=True, compute_v=True)
+
+        assert_allclose(s1, s0, rtol=1e-9)
+        assert_allclose(np.linalg.norm(A.dot(v), 1), s0*np.linalg.norm(v, 1), rtol=1e-9)
+        assert_allclose(A.dot(v), w, rtol=1e-9)
+
+
+class TestAlgorithm_2_2:
+
+    @pytest.mark.thread_unsafe
+    def test_randn_inv(self):
+        rng = np.random.RandomState(1234)
+        n = 20
+        nsamples = 100
+        for i in range(nsamples):
+
+            # Choose integer t uniformly between 1 and 3 inclusive.
+            t = rng.randint(1, 4)
+
+            # Choose n uniformly between 10 and 40 inclusive.
+            n = rng.randint(10, 41)
+
+            # Sample the inverse of a matrix with random normal entries.
+            A = scipy.linalg.inv(rng.randn(n, n))
+
+            # Compute the 1-norm bounds.
+            g, ind = _algorithm_2_2(A, A.T, t)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_propack.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_propack.py
new file mode 100644
index 0000000000000000000000000000000000000000..f13905de08470a410b5aa83d33b6e29ec87e905c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_propack.py
@@ -0,0 +1,165 @@
+import os
+import pytest
+
+import numpy as np
+from numpy.testing import assert_allclose
+from pytest import raises as assert_raises
+from scipy.sparse.linalg._svdp import _svdp
+from scipy.sparse import csr_array, csc_array
+
+
+# dtype_flavour to tolerance
+TOLS = {
+    np.float32: 1e-4,
+    np.float64: 1e-8,
+    np.complex64: 1e-4,
+    np.complex128: 1e-8,
+}
+
+
+def is_complex_type(dtype):
+    return np.dtype(dtype).kind == "c"
+
+
+_dtypes = []
+for dtype_flavour in TOLS.keys():
+    marks = []
+    if is_complex_type(dtype_flavour):
+        marks = [pytest.mark.slow]
+    _dtypes.append(pytest.param(dtype_flavour, marks=marks,
+                                id=dtype_flavour.__name__))
+_dtypes = tuple(_dtypes)  # type: ignore[assignment]
+
+
+def generate_matrix(constructor, n, m, f,
+                    dtype=float, rseed=0, **kwargs):
+    """Generate a random sparse array"""
+    rng = np.random.RandomState(rseed)
+    if is_complex_type(dtype):
+        M = (- 5 + 10 * rng.rand(n, m)
+             - 5j + 10j * rng.rand(n, m)).astype(dtype)
+    else:
+        M = (-5 + 10 * rng.rand(n, m)).astype(dtype)
+    M[M.real > 10 * f - 5] = 0
+    return constructor(M, **kwargs)
+
+
+def assert_orthogonal(u1, u2, rtol, atol):
+    """Check that the first k rows of u1 and u2 are orthogonal"""
+    A = abs(np.dot(u1.conj().T, u2))
+    assert_allclose(A, np.eye(u1.shape[1], u2.shape[1]), rtol=rtol, atol=atol)
+
+
+def check_svdp(n, m, constructor, dtype, k, irl_mode, which, f=0.8):
+    tol = TOLS[dtype]
+
+    M = generate_matrix(np.asarray, n, m, f, dtype)
+    Msp = constructor(M)
+
+    u1, sigma1, vt1 = np.linalg.svd(M, full_matrices=False)
+    u2, sigma2, vt2, _ = _svdp(Msp, k=k, which=which, irl_mode=irl_mode,
+                               tol=tol, rng=np.random.default_rng(0))
+
+    # check the which
+    if which.upper() == 'SM':
+        u1 = np.roll(u1, k, 1)
+        vt1 = np.roll(vt1, k, 0)
+        sigma1 = np.roll(sigma1, k)
+
+    # check that singular values agree
+    assert_allclose(sigma1[:k], sigma2, rtol=tol, atol=tol)
+
+    # check that singular vectors are orthogonal
+    assert_orthogonal(u1, u2, rtol=tol, atol=tol)
+    assert_orthogonal(vt1.T, vt2.T, rtol=tol, atol=tol)
+
+
+@pytest.mark.parametrize('ctor', (np.array, csr_array, csc_array))
+@pytest.mark.parametrize('dtype', _dtypes)
+@pytest.mark.parametrize('irl', (True, False))
+@pytest.mark.parametrize('which', ('LM', 'SM'))
+def test_svdp(ctor, dtype, irl, which):
+    np.random.seed(0)
+    n, m, k = 10, 20, 3
+    if which == 'SM' and not irl:
+        message = "`which`='SM' requires irl_mode=True"
+        with assert_raises(ValueError, match=message):
+            check_svdp(n, m, ctor, dtype, k, irl, which)
+    else:
+        check_svdp(n, m, ctor, dtype, k, irl, which)
+
+
+@pytest.mark.xslow
+@pytest.mark.parametrize('dtype', _dtypes)
+@pytest.mark.parametrize('irl', (False, True))
+def test_examples(dtype, irl):
+    # Note: atol for complex64 bumped from 1e-4 to 1e-3 due to test failures
+    # with BLIS, Netlib, and MKL+AVX512 - see
+    # https://github.com/conda-forge/scipy-feedstock/pull/198#issuecomment-999180432
+    atol = {
+        np.float32: 1.3e-4,
+        np.float64: 1e-9,
+        np.complex64: 1e-3,
+        np.complex128: 1e-9,
+    }[dtype]
+
+    path_prefix = os.path.dirname(__file__)
+    # Test matrices from `illc1850.coord` and `mhd1280b.cua` distributed with
+    # PROPACK 2.1: http://sun.stanford.edu/~rmunk/PROPACK/
+    relative_path = "propack_test_data.npz"
+    filename = os.path.join(path_prefix, relative_path)
+    with np.load(filename, allow_pickle=True) as data:
+        if is_complex_type(dtype):
+            A = data['A_complex'].item().astype(dtype)
+        else:
+            A = data['A_real'].item().astype(dtype)
+
+    k = 200
+    u, s, vh, _ = _svdp(A, k, irl_mode=irl, rng=np.random.default_rng(0))
+
+    # complex example matrix has many repeated singular values, so check only
+    # beginning non-repeated singular vectors to avoid permutations
+    sv_check = 27 if is_complex_type(dtype) else k
+    u = u[:, :sv_check]
+    vh = vh[:sv_check, :]
+    s = s[:sv_check]
+
+    # Check orthogonality of singular vectors
+    assert_allclose(np.eye(u.shape[1]), u.conj().T @ u, atol=atol)
+    assert_allclose(np.eye(vh.shape[0]), vh @ vh.conj().T, atol=atol)
+
+    # Ensure the norm of the difference between the np.linalg.svd and
+    # PROPACK reconstructed matrices is small
+    u3, s3, vh3 = np.linalg.svd(A.todense())
+    u3 = u3[:, :sv_check]
+    s3 = s3[:sv_check]
+    vh3 = vh3[:sv_check, :]
+    A3 = u3 @ np.diag(s3) @ vh3
+    recon = u @ np.diag(s) @ vh
+    assert_allclose(np.linalg.norm(A3 - recon), 0, atol=atol)
+
+
+@pytest.mark.parametrize('shifts', (None, -10, 0, 1, 10, 70))
+@pytest.mark.parametrize('dtype', _dtypes[:2])
+def test_shifts(shifts, dtype):
+    rng = np.random.default_rng(0)
+    n, k = 70, 10
+    A = rng.random((n, n))
+    if shifts is not None and ((shifts < 0) or (k > min(n-1-shifts, n))):
+        with pytest.raises(ValueError):
+            _svdp(A, k, shifts=shifts, kmax=5*k, irl_mode=True, rng=rng)
+    else:
+        _svdp(A, k, shifts=shifts, kmax=5*k, irl_mode=True, rng=rng)
+
+
+@pytest.mark.slow
+@pytest.mark.xfail()
+def test_shifts_accuracy():
+    rng = np.random.default_rng(0)
+    n, k = 70, 10
+    A = rng.random((n, n)).astype(np.float64)
+    u1, s1, vt1, _ = _svdp(A, k, shifts=None, which='SM', irl_mode=True, rng=rng)
+    u2, s2, vt2, _ = _svdp(A, k, shifts=32, which='SM', irl_mode=True, rng=rng)
+    # shifts <= 32 doesn't agree with shifts > 32
+    # Does agree when which='LM' instead of 'SM'
+    assert_allclose(s1, s2)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_pydata_sparse.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_pydata_sparse.py
new file mode 100644
index 0000000000000000000000000000000000000000..f6b855271063ee769c70095c62dd8a09bd05bd95
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_pydata_sparse.py
@@ -0,0 +1,258 @@
+import pytest
+
+import numpy as np
+import scipy.sparse as sp
+import scipy.sparse.linalg as splin
+
+from numpy.testing import assert_allclose, assert_equal
+
+try:
+    import sparse
+except Exception:
+    sparse = None
+
+pytestmark = pytest.mark.skipif(sparse is None,
+                                reason="pydata/sparse not installed")
+
+
+msg = "pydata/sparse (0.15.1) does not implement necessary operations"
+
+
+sparse_params = (pytest.param("COO"),
+                 pytest.param("DOK", marks=[pytest.mark.xfail(reason=msg)]))
+
+scipy_sparse_classes = [
+    sp.bsr_array,
+    sp.csr_array,
+    sp.coo_array,
+    sp.csc_array,
+    sp.dia_array,
+    sp.dok_array
+]
+
+
+@pytest.fixture(params=sparse_params)
+def sparse_cls(request):
+    return getattr(sparse, request.param)
+
+
+@pytest.fixture(params=scipy_sparse_classes)
+def sp_sparse_cls(request):
+    return request.param
+
+
+@pytest.fixture
+def same_matrix(sparse_cls, sp_sparse_cls):
+    np.random.seed(1234)
+    A_dense = np.random.rand(9, 9)
+    return sp_sparse_cls(A_dense), sparse_cls(A_dense)
+
+
+@pytest.fixture
+def matrices(sparse_cls):
+    np.random.seed(1234)
+    A_dense = np.random.rand(9, 9)
+    A_dense = A_dense @ A_dense.T
+    A_sparse = sparse_cls(A_dense)
+    b = np.random.rand(9)
+    return A_dense, A_sparse, b
+
+
+def test_isolve_gmres(matrices):
+    # Several of the iterative solvers use the same
+    # isolve.utils.make_system wrapper code, so test just one of them.
+    A_dense, A_sparse, b = matrices
+    x, info = splin.gmres(A_sparse, b, atol=1e-15)
+    assert info == 0
+    assert isinstance(x, np.ndarray)
+    assert_allclose(A_sparse @ x, b)
+
+
+def test_lsmr(matrices):
+    A_dense, A_sparse, b = matrices
+    res0 = splin.lsmr(A_dense, b)
+    res = splin.lsmr(A_sparse, b)
+    assert_allclose(res[0], res0[0], atol=1e-3)
+
+
+# test issue 17012
+def test_lsmr_output_shape():
+    x = splin.lsmr(A=np.ones((10, 1)), b=np.zeros(10), x0=np.ones(1))[0]
+    assert_equal(x.shape, (1,))
+
+
+def test_lsqr(matrices):
+    A_dense, A_sparse, b = matrices
+    res0 = splin.lsqr(A_dense, b)
+    res = splin.lsqr(A_sparse, b)
+    assert_allclose(res[0], res0[0], atol=1e-5)
+
+
+def test_eigs(matrices):
+    A_dense, A_sparse, v0 = matrices
+
+    M_dense = np.diag(v0**2)
+    M_sparse = A_sparse.__class__(M_dense)
+
+    w_dense, v_dense = splin.eigs(A_dense, k=3, v0=v0)
+    w, v = splin.eigs(A_sparse, k=3, v0=v0)
+
+    assert_allclose(w, w_dense)
+    assert_allclose(v, v_dense)
+
+    for M in [M_sparse, M_dense]:
+        w_dense, v_dense = splin.eigs(A_dense, M=M_dense, k=3, v0=v0)
+        w, v = splin.eigs(A_sparse, M=M, k=3, v0=v0)
+
+        assert_allclose(w, w_dense)
+        assert_allclose(v, v_dense)
+
+        w_dense, v_dense = splin.eigsh(A_dense, M=M_dense, k=3, v0=v0)
+        w, v = splin.eigsh(A_sparse, M=M, k=3, v0=v0)
+
+        assert_allclose(w, w_dense)
+        assert_allclose(v, v_dense)
+
+
+def test_svds(matrices):
+    A_dense, A_sparse, v0 = matrices
+
+    u0, s0, vt0 = splin.svds(A_dense, k=2, v0=v0)
+    u, s, vt = splin.svds(A_sparse, k=2, v0=v0)
+
+    assert_allclose(s, s0)
+    assert_allclose(np.abs(u), np.abs(u0))
+    assert_allclose(np.abs(vt), np.abs(vt0))
+
+
+def test_lobpcg(matrices):
+    A_dense, A_sparse, x = matrices
+    X = x[:,None]
+
+    w_dense, v_dense = splin.lobpcg(A_dense, X)
+    w, v = splin.lobpcg(A_sparse, X)
+
+    assert_allclose(w, w_dense)
+    assert_allclose(v, v_dense)
+
+
+def test_spsolve(matrices):
+    A_dense, A_sparse, b = matrices
+    b2 = np.random.rand(len(b), 3)
+
+    x0 = splin.spsolve(sp.csc_array(A_dense), b)
+    x = splin.spsolve(A_sparse, b)
+    assert isinstance(x, np.ndarray)
+    assert_allclose(x, x0)
+
+    x0 = splin.spsolve(sp.csc_array(A_dense), b)
+    x = splin.spsolve(A_sparse, b, use_umfpack=True)
+    assert isinstance(x, np.ndarray)
+    assert_allclose(x, x0)
+
+    x0 = splin.spsolve(sp.csc_array(A_dense), b2)
+    x = splin.spsolve(A_sparse, b2)
+    assert isinstance(x, np.ndarray)
+    assert_allclose(x, x0)
+
+    x0 = splin.spsolve(sp.csc_array(A_dense),
+                       sp.csc_array(A_dense))
+    x = splin.spsolve(A_sparse, A_sparse)
+    assert isinstance(x, type(A_sparse))
+    assert_allclose(x.todense(), x0.todense())
+
+
+def test_splu(matrices):
+    A_dense, A_sparse, b = matrices
+    n = len(b)
+    sparse_cls = type(A_sparse)
+
+    lu = splin.splu(A_sparse)
+
+    assert isinstance(lu.L, sparse_cls)
+    assert isinstance(lu.U, sparse_cls)
+
+    _Pr_scipy = sp.csc_array((np.ones(n), (lu.perm_r, np.arange(n))))
+    _Pc_scipy = sp.csc_array((np.ones(n), (np.arange(n), lu.perm_c)))
+    Pr = sparse_cls.from_scipy_sparse(_Pr_scipy)
+    Pc = sparse_cls.from_scipy_sparse(_Pc_scipy)
+    A2 = Pr.T @ lu.L @ lu.U @ Pc.T
+
+    assert_allclose(A2.todense(), A_sparse.todense())
+
+    z = lu.solve(A_sparse.todense())
+    assert_allclose(z, np.eye(n), atol=1e-10)
+
+
+def test_spilu(matrices):
+    A_dense, A_sparse, b = matrices
+    sparse_cls = type(A_sparse)
+
+    lu = splin.spilu(A_sparse)
+
+    assert isinstance(lu.L, sparse_cls)
+    assert isinstance(lu.U, sparse_cls)
+
+    z = lu.solve(A_sparse.todense())
+    assert_allclose(z, np.eye(len(b)), atol=1e-3)
+
+
+def test_spsolve_triangular(matrices):
+    A_dense, A_sparse, b = matrices
+    A_sparse = sparse.tril(A_sparse)
+
+    x = splin.spsolve_triangular(A_sparse, b)
+    assert_allclose(A_sparse @ x, b)
+
+
+def test_onenormest(matrices):
+    A_dense, A_sparse, b = matrices
+    est0 = splin.onenormest(A_dense)
+    est = splin.onenormest(A_sparse)
+    assert_allclose(est, est0)
+
+
+def test_norm(matrices):
+    A_dense, A_sparse, b = matrices
+    norm0 = splin.norm(sp.csr_array(A_dense))
+    norm = splin.norm(A_sparse)
+    assert_allclose(norm, norm0)
+
+
+def test_inv(matrices):
+    A_dense, A_sparse, b = matrices
+    x0 = splin.inv(sp.csc_array(A_dense))
+    x = splin.inv(A_sparse)
+    assert_allclose(x.todense(), x0.todense())
+
+
+def test_expm(matrices):
+    A_dense, A_sparse, b = matrices
+    x0 = splin.expm(sp.csc_array(A_dense))
+    x = splin.expm(A_sparse)
+    assert_allclose(x.todense(), x0.todense())
+
+
+def test_expm_multiply(matrices):
+    A_dense, A_sparse, b = matrices
+    x0 = splin.expm_multiply(A_dense, b)
+    x = splin.expm_multiply(A_sparse, b)
+    assert_allclose(x, x0)
+
+    x0 = splin.expm_multiply(A_dense, A_dense)
+    x = splin.expm_multiply(A_sparse, A_sparse)
+    assert_allclose(x.todense(), x0)
+
+
+def test_eq(same_matrix):
+    sp_sparse, pd_sparse = same_matrix
+    # temporary splint until pydata sparse support sparray equality
+    sp_sparse = sp.coo_matrix(sp_sparse).asformat(sp_sparse.format)
+    assert (sp_sparse == pd_sparse).all()
+
+
+def test_ne(same_matrix):
+    sp_sparse, pd_sparse = same_matrix
+    # temporary splint until pydata sparse support sparray equality
+    sp_sparse = sp.coo_matrix(sp_sparse).asformat(sp_sparse.format)
+    assert not (sp_sparse != pd_sparse).any()
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_special_sparse_arrays.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_special_sparse_arrays.py
new file mode 100644
index 0000000000000000000000000000000000000000..d9d1c4001af6697233380edf0047409a41847834
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/linalg/tests/test_special_sparse_arrays.py
@@ -0,0 +1,337 @@
+import pytest
+import numpy as np
+from numpy.testing import assert_array_equal, assert_allclose
+
+from scipy.sparse import diags, csgraph
+from scipy.linalg import eigh
+
+from scipy.sparse.linalg import LaplacianNd
+from scipy.sparse.linalg._special_sparse_arrays import Sakurai
+from scipy.sparse.linalg._special_sparse_arrays import MikotaPair
+
+INT_DTYPES = [np.int8, np.int16, np.int32, np.int64]
+REAL_DTYPES = [np.float32, np.float64]
+COMPLEX_DTYPES = [np.complex64, np.complex128]
+ALLDTYPES = INT_DTYPES + REAL_DTYPES + COMPLEX_DTYPES
+
+
+class TestLaplacianNd:
+    """
+    LaplacianNd tests
+    """
+
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_1d_specific_shape(self, bc):
+        lap = LaplacianNd(grid_shape=(6, ), boundary_conditions=bc)
+        lapa = lap.toarray()
+        if bc == 'neumann':
+            a = np.array(
+                [
+                    [-1, 1, 0, 0, 0, 0],
+                    [1, -2, 1, 0, 0, 0],
+                    [0, 1, -2, 1, 0, 0],
+                    [0, 0, 1, -2, 1, 0],
+                    [0, 0, 0, 1, -2, 1],
+                    [0, 0, 0, 0, 1, -1],
+                ]
+            )
+        elif bc == 'dirichlet':
+            a = np.array(
+                [
+                    [-2, 1, 0, 0, 0, 0],
+                    [1, -2, 1, 0, 0, 0],
+                    [0, 1, -2, 1, 0, 0],
+                    [0, 0, 1, -2, 1, 0],
+                    [0, 0, 0, 1, -2, 1],
+                    [0, 0, 0, 0, 1, -2],
+                ]
+            )
+        else:
+            a = np.array(
+                [
+                    [-2, 1, 0, 0, 0, 1],
+                    [1, -2, 1, 0, 0, 0],
+                    [0, 1, -2, 1, 0, 0],
+                    [0, 0, 1, -2, 1, 0],
+                    [0, 0, 0, 1, -2, 1],
+                    [1, 0, 0, 0, 1, -2],
+                ]
+            )
+        assert_array_equal(a, lapa)
+
+    def test_1d_with_graph_laplacian(self):
+        n = 6
+        G = diags(np.ones(n - 1), 1, format='dia')
+        Lf = csgraph.laplacian(G, symmetrized=True, form='function')
+        La = csgraph.laplacian(G, symmetrized=True, form='array')
+        grid_shape = (n,)
+        bc = 'neumann'
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc)
+        assert_array_equal(lap(np.eye(n)), -Lf(np.eye(n)))
+        assert_array_equal(lap.toarray(), -La.toarray())
+        # https://github.com/numpy/numpy/issues/24351
+        assert_array_equal(lap.tosparse().toarray(), -La.toarray())
+
+    @pytest.mark.parametrize('grid_shape', [(6, ), (2, 3), (2, 3, 4)])
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_eigenvalues(self, grid_shape, bc):
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc, dtype=np.float64)
+        L = lap.toarray()
+        eigvals = eigh(L, eigvals_only=True)
+        n = np.prod(grid_shape)
+        eigenvalues = lap.eigenvalues()
+        dtype = eigenvalues.dtype
+        atol = n * n * np.finfo(dtype).eps
+        # test the default ``m = None``
+        assert_allclose(eigenvalues, eigvals, atol=atol)
+        # test every ``m > 0``
+        for m in np.arange(1, n + 1):
+            assert_array_equal(lap.eigenvalues(m), eigenvalues[-m:])
+
+    @pytest.mark.parametrize('grid_shape', [(6, ), (2, 3), (2, 3, 4)])
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_eigenvectors(self, grid_shape, bc):
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc, dtype=np.float64)
+        n = np.prod(grid_shape)
+        eigenvalues = lap.eigenvalues()
+        eigenvectors = lap.eigenvectors()
+        dtype = eigenvectors.dtype
+        atol = n * n * max(np.finfo(dtype).eps, np.finfo(np.double).eps)
+        # test the default ``m = None`` every individual eigenvector
+        for i in np.arange(n):
+            r = lap.toarray() @ eigenvectors[:, i] - eigenvectors[:, i] * eigenvalues[i]
+            assert_allclose(r, np.zeros_like(r), atol=atol)
+        # test every ``m > 0``
+        for m in np.arange(1, n + 1):
+            e = lap.eigenvalues(m)
+            ev = lap.eigenvectors(m)
+            r = lap.toarray() @ ev - ev @ np.diag(e)
+            assert_allclose(r, np.zeros_like(r), atol=atol)
+
+    @pytest.mark.parametrize('grid_shape', [(6, ), (2, 3), (2, 3, 4)])
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_toarray_tosparse_consistency(self, grid_shape, bc):
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc)
+        n = np.prod(grid_shape)
+        assert_array_equal(lap.toarray(), lap(np.eye(n)))
+        assert_array_equal(lap.tosparse().toarray(), lap.toarray())
+
+    @pytest.mark.parametrize('dtype', ALLDTYPES)
+    @pytest.mark.parametrize('grid_shape', [(6, ), (2, 3), (2, 3, 4)])
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_linearoperator_shape_dtype(self, grid_shape, bc, dtype):
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc, dtype=dtype)
+        n = np.prod(grid_shape)
+        assert lap.shape == (n, n)
+        assert lap.dtype == dtype
+        assert_array_equal(
+            LaplacianNd(
+                grid_shape, boundary_conditions=bc, dtype=dtype
+            ).toarray(),
+            LaplacianNd(grid_shape, boundary_conditions=bc)
+            .toarray()
+            .astype(dtype),
+        )
+        assert_array_equal(
+            LaplacianNd(grid_shape, boundary_conditions=bc, dtype=dtype)
+            .tosparse()
+            .toarray(),
+            LaplacianNd(grid_shape, boundary_conditions=bc)
+            .tosparse()
+            .toarray()
+            .astype(dtype),
+        )
+
+    @pytest.mark.parametrize('dtype', ALLDTYPES)
+    @pytest.mark.parametrize('grid_shape', [(6, ), (2, 3), (2, 3, 4)])
+    @pytest.mark.parametrize('bc', ['neumann', 'dirichlet', 'periodic'])
+    def test_dot(self, grid_shape, bc, dtype):
+        """ Test the dot-product for type preservation and consistency.
+        """
+        lap = LaplacianNd(grid_shape, boundary_conditions=bc)
+        n = np.prod(grid_shape)
+        x0 = np.arange(n)
+        x1 = x0.reshape((-1, 1))
+        x2 = np.arange(2 * n).reshape((n, 2))
+        input_set = [x0, x1, x2]
+        for x in input_set:
+            y = lap.dot(x.astype(dtype))
+            assert x.shape == y.shape
+            assert y.dtype == dtype
+            if x.ndim == 2:
+                yy = lap.toarray() @ x.astype(dtype)
+                assert yy.dtype == dtype
+                np.array_equal(y, yy)
+
+    def test_boundary_conditions_value_error(self):
+        with pytest.raises(ValueError, match="Unknown value 'robin'"):
+            LaplacianNd(grid_shape=(6, ), boundary_conditions='robin')
+
+            
+class TestSakurai:
+    """
+    Sakurai tests
+    """
+
+    def test_specific_shape(self):
+        sak = Sakurai(6)
+        assert_array_equal(sak.toarray(), sak(np.eye(6)))
+        a = np.array(
+            [
+                [ 5, -4,  1,  0,  0,  0],
+                [-4,  6, -4,  1,  0,  0],
+                [ 1, -4,  6, -4,  1,  0],
+                [ 0,  1, -4,  6, -4,  1],
+                [ 0,  0,  1, -4,  6, -4],
+                [ 0,  0,  0,  1, -4,  5]
+            ]
+        )
+
+        np.array_equal(a, sak.toarray())
+        np.array_equal(sak.tosparse().toarray(), sak.toarray())
+        ab = np.array(
+            [
+                [ 1,  1,  1,  1,  1,  1],
+                [-4, -4, -4, -4, -4, -4],
+                [ 5,  6,  6,  6,  6,  5]
+            ]
+        )
+        np.array_equal(ab, sak.tobanded())
+        e = np.array(
+                [0.03922866, 0.56703972, 2.41789479, 5.97822974,
+                 10.54287655, 14.45473055]
+            )
+        np.array_equal(e, sak.eigenvalues())
+        np.array_equal(e[:2], sak.eigenvalues(2))
+
+    # `Sakurai` default `dtype` is `np.int8` as its entries are small integers
+    @pytest.mark.parametrize('dtype', ALLDTYPES)
+    def test_linearoperator_shape_dtype(self, dtype):
+        n = 7
+        sak = Sakurai(n, dtype=dtype)
+        assert sak.shape == (n, n)
+        assert sak.dtype == dtype
+        assert_array_equal(sak.toarray(), Sakurai(n).toarray().astype(dtype))
+        assert_array_equal(sak.tosparse().toarray(),
+                           Sakurai(n).tosparse().toarray().astype(dtype))
+
+    @pytest.mark.parametrize('dtype', ALLDTYPES)
+    @pytest.mark.parametrize('argument_dtype', ALLDTYPES)
+    def test_dot(self, dtype, argument_dtype):
+        """ Test the dot-product for type preservation and consistency.
+        """
+        result_dtype = np.promote_types(argument_dtype, dtype)
+        n = 5
+        sak = Sakurai(n)
+        x0 = np.arange(n)
+        x1 = x0.reshape((-1, 1))
+        x2 = np.arange(2 * n).reshape((n, 2))
+        input_set = [x0, x1, x2]
+        for x in input_set:
+            y = sak.dot(x.astype(argument_dtype))
+            assert x.shape == y.shape
+            assert np.can_cast(y.dtype, result_dtype)
+            if x.ndim == 2:
+                ya = sak.toarray() @ x.astype(argument_dtype)
+                np.array_equal(y, ya)
+                assert np.can_cast(ya.dtype, result_dtype)
+                ys = sak.tosparse() @ x.astype(argument_dtype)
+                np.array_equal(y, ys)
+                assert np.can_cast(ys.dtype, result_dtype)
+
+class TestMikotaPair:
+    """
+    MikotaPair tests
+    """
+    # both MikotaPair `LinearOperator`s share the same dtype
+    # while `MikotaK` `dtype` can be as small as its default `np.int32`
+    # since its entries are integers, the `MikotaM` involves inverses
+    # so its smallest still accurate `dtype` is `np.float32`
+    tested_types = REAL_DTYPES + COMPLEX_DTYPES
+
+    def test_specific_shape(self):
+        n = 6
+        mik = MikotaPair(n)
+        mik_k = mik.k
+        mik_m = mik.m
+        assert_array_equal(mik_k.toarray(), mik_k(np.eye(n)))
+        assert_array_equal(mik_m.toarray(), mik_m(np.eye(n)))
+
+        k = np.array(
+            [
+                [11, -5,  0,  0,  0,  0],
+                [-5,  9, -4,  0,  0,  0],
+                [ 0, -4,  7, -3,  0,  0],
+                [ 0,  0, -3,  5, -2,  0],
+                [ 0,  0,  0, -2,  3, -1],
+                [ 0,  0,  0,  0, -1,  1]
+            ]
+        )
+        np.array_equal(k, mik_k.toarray())
+        np.array_equal(mik_k.tosparse().toarray(), k)
+        kb = np.array(
+            [
+                [ 0, -5, -4, -3, -2, -1],
+                [11,  9,  7,  5,  3,  1]
+            ]
+        )
+        np.array_equal(kb, mik_k.tobanded())
+
+        minv = np.arange(1, n + 1)
+        np.array_equal(np.diag(1. / minv), mik_m.toarray())
+        np.array_equal(mik_m.tosparse().toarray(), mik_m.toarray())
+        np.array_equal(1. / minv, mik_m.tobanded())
+
+        e = np.array([ 1,  4,  9, 16, 25, 36])
+        np.array_equal(e, mik.eigenvalues())
+        np.array_equal(e[:2], mik.eigenvalues(2))
+
+    @pytest.mark.parametrize('dtype', tested_types)
+    def test_linearoperator_shape_dtype(self, dtype):
+        n = 7
+        mik = MikotaPair(n, dtype=dtype)
+        mik_k = mik.k
+        mik_m = mik.m
+        assert mik_k.shape == (n, n)
+        assert mik_k.dtype == dtype
+        assert mik_m.shape == (n, n)
+        assert mik_m.dtype == dtype
+        mik_default_dtype = MikotaPair(n)
+        mikd_k = mik_default_dtype.k
+        mikd_m = mik_default_dtype.m
+        assert mikd_k.shape == (n, n)
+        assert mikd_k.dtype == np.float64
+        assert mikd_m.shape == (n, n)
+        assert mikd_m.dtype == np.float64
+        assert_array_equal(mik_k.toarray(),
+                           mikd_k.toarray().astype(dtype))
+        assert_array_equal(mik_k.tosparse().toarray(),
+                           mikd_k.tosparse().toarray().astype(dtype))
+
+    @pytest.mark.parametrize('dtype', tested_types)
+    @pytest.mark.parametrize('argument_dtype', ALLDTYPES)
+    def test_dot(self, dtype, argument_dtype):
+        """ Test the dot-product for type preservation and consistency.
+        """
+        result_dtype = np.promote_types(argument_dtype, dtype)
+        n = 5
+        mik = MikotaPair(n, dtype=dtype)
+        mik_k = mik.k
+        mik_m = mik.m
+        x0 = np.arange(n)
+        x1 = x0.reshape((-1, 1))
+        x2 = np.arange(2 * n).reshape((n, 2))
+        lo_set = [mik_k, mik_m]
+        input_set = [x0, x1, x2]
+        for lo in lo_set:
+            for x in input_set:
+                y = lo.dot(x.astype(argument_dtype))
+                assert x.shape == y.shape
+                assert np.can_cast(y.dtype, result_dtype)
+                if x.ndim == 2:
+                    ya = lo.toarray() @ x.astype(argument_dtype)
+                    np.array_equal(y, ya)
+                    assert np.can_cast(ya.dtype, result_dtype)
+                    ys = lo.tosparse() @ x.astype(argument_dtype)
+                    np.array_equal(y, ys)
+                    assert np.can_cast(ys.dtype, result_dtype)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sparsetools.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sparsetools.py
new file mode 100644
index 0000000000000000000000000000000000000000..404e431d89d479520d2198ae73b9eab7b23a80f7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sparsetools.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="sparsetools",
+                                   private_modules=["_sparsetools"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/spfuncs.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/spfuncs.py
new file mode 100644
index 0000000000000000000000000000000000000000..911969e414d4a1d3888900ad8392b5fc2177c850
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/spfuncs.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="spfuncs",
+                                   private_modules=["_spfuncs"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sputils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sputils.py
new file mode 100644
index 0000000000000000000000000000000000000000..4ddd27a43889609b0642bd7579e13c8e3c460a8b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/sparse/sputils.py
@@ -0,0 +1,17 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.sparse` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+__all__: list[str] = []
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="sparse", module="sputils",
+                                   private_modules=["_sputils"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..ef478f85bc95b5f5f62b3e72afe8358d88c00c7b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__init__.py
@@ -0,0 +1,129 @@
+"""
+=============================================================
+Spatial algorithms and data structures (:mod:`scipy.spatial`)
+=============================================================
+
+.. currentmodule:: scipy.spatial
+
+.. toctree::
+   :hidden:
+
+   spatial.distance
+
+Spatial transformations
+=======================
+
+These are contained in the `scipy.spatial.transform` submodule.
+
+Nearest-neighbor queries
+========================
+.. autosummary::
+   :toctree: generated/
+
+   KDTree      -- class for efficient nearest-neighbor queries
+   cKDTree     -- class for efficient nearest-neighbor queries (faster implementation)
+   Rectangle
+
+Distance metrics
+================
+
+Distance metrics are contained in the :mod:`scipy.spatial.distance` submodule.
+
+Delaunay triangulation, convex hulls, and Voronoi diagrams
+==========================================================
+
+.. autosummary::
+   :toctree: generated/
+
+   Delaunay    -- compute Delaunay triangulation of input points
+   ConvexHull  -- compute a convex hull for input points
+   Voronoi     -- compute a Voronoi diagram hull from input points
+   SphericalVoronoi -- compute a Voronoi diagram from input points on the surface of a sphere
+   HalfspaceIntersection -- compute the intersection points of input halfspaces
+
+Plotting helpers
+================
+
+.. autosummary::
+   :toctree: generated/
+
+   delaunay_plot_2d     -- plot 2-D triangulation
+   convex_hull_plot_2d  -- plot 2-D convex hull
+   voronoi_plot_2d      -- plot 2-D Voronoi diagram
+
+.. seealso:: :ref:`Tutorial `
+
+
+Simplex representation
+======================
+The simplices (triangles, tetrahedra, etc.) appearing in the Delaunay
+tessellation (N-D simplices), convex hull facets, and Voronoi ridges
+(N-1-D simplices) are represented in the following scheme::
+
+    tess = Delaunay(points)
+    hull = ConvexHull(points)
+    voro = Voronoi(points)
+
+    # coordinates of the jth vertex of the ith simplex
+    tess.points[tess.simplices[i, j], :]        # tessellation element
+    hull.points[hull.simplices[i, j], :]        # convex hull facet
+    voro.vertices[voro.ridge_vertices[i, j], :] # ridge between Voronoi cells
+
+For Delaunay triangulations and convex hulls, the neighborhood
+structure of the simplices satisfies the condition:
+``tess.neighbors[i,j]`` is the neighboring simplex of the ith
+simplex, opposite to the ``j``-vertex. It is -1 in case of no neighbor.
+
+Convex hull facets also define a hyperplane equation::
+
+    (hull.equations[i,:-1] * coord).sum() + hull.equations[i,-1] == 0
+
+Similar hyperplane equations for the Delaunay triangulation correspond
+to the convex hull facets on the corresponding N+1-D
+paraboloid.
+
+The Delaunay triangulation objects offer a method for locating the
+simplex containing a given point, and barycentric coordinate
+computations.
+
+Functions
+---------
+
+.. autosummary::
+   :toctree: generated/
+
+   tsearch
+   distance_matrix
+   minkowski_distance
+   minkowski_distance_p
+   procrustes
+   geometric_slerp
+
+Warnings / Errors used in :mod:`scipy.spatial`
+----------------------------------------------
+.. autosummary::
+   :toctree: generated/
+
+   QhullError
+"""  # noqa: E501
+
+from ._kdtree import *
+from ._ckdtree import *  # type: ignore[import-not-found]
+from ._qhull import *
+from ._spherical_voronoi import SphericalVoronoi
+from ._plotutils import *
+from ._procrustes import procrustes
+from ._geometric_slerp import geometric_slerp
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import ckdtree, kdtree, qhull
+
+__all__ = [s for s in dir() if not s.startswith('_')]
+
+from . import distance, transform
+
+__all__ += ['distance', 'transform']
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..656bb75bcb68c03011489b8084b0fe04c73f1c13
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_geometric_slerp.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_geometric_slerp.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6e92fe2816104cbe5a3008e50fb6a07dd0c59fc6
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_geometric_slerp.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_kdtree.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_kdtree.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bcc8f0a0583fefe482001f8d3cd4785884957ee1
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_kdtree.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_plotutils.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_plotutils.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d091cdd17436e65db5434b4d57962c33bc815983
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_plotutils.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_procrustes.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_procrustes.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..95711ea2f98a7ece7c9ec0baaa384018b98042c3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_procrustes.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_spherical_voronoi.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_spherical_voronoi.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fe40273929f428097f43a4b10dab103e93357279
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/_spherical_voronoi.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/ckdtree.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/ckdtree.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d91eadf8cd13b0edc9f0fa691a365d0f375a72c3
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/ckdtree.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/distance.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/distance.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0d791bec34e890cb7189ca48ff1c4d1f860c0d8b
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/distance.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/kdtree.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/kdtree.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d83103b4ea9bee44fbfb9d35e006409aa37dd29c
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/kdtree.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/qhull.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/qhull.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ad6af7a88173338c3683e2483772bfe9bb6a0b4f
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/__pycache__/qhull.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_geometric_slerp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_geometric_slerp.py
new file mode 100644
index 0000000000000000000000000000000000000000..189381cb06fbe2992123e0facae18101ee7f1927
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_geometric_slerp.py
@@ -0,0 +1,238 @@
+__all__ = ['geometric_slerp']
+
+import warnings
+from typing import TYPE_CHECKING
+
+import numpy as np
+from scipy.spatial.distance import euclidean
+
+if TYPE_CHECKING:
+    import numpy.typing as npt
+
+
+def _geometric_slerp(start, end, t):
+    # create an orthogonal basis using QR decomposition
+    basis = np.vstack([start, end])
+    Q, R = np.linalg.qr(basis.T)
+    signs = 2 * (np.diag(R) >= 0) - 1
+    Q = Q.T * signs.T[:, np.newaxis]
+    R = R.T * signs.T[:, np.newaxis]
+
+    # calculate the angle between `start` and `end`
+    c = np.dot(start, end)
+    s = np.linalg.det(R)
+    omega = np.arctan2(s, c)
+
+    # interpolate
+    start, end = Q
+    s = np.sin(t * omega)
+    c = np.cos(t * omega)
+    return start * c[:, np.newaxis] + end * s[:, np.newaxis]
+
+
+def geometric_slerp(
+    start: "npt.ArrayLike",
+    end: "npt.ArrayLike",
+    t: "npt.ArrayLike",
+    tol: float = 1e-7,
+) -> np.ndarray:
+    """
+    Geometric spherical linear interpolation.
+
+    The interpolation occurs along a unit-radius
+    great circle arc in arbitrary dimensional space.
+
+    Parameters
+    ----------
+    start : (n_dimensions, ) array-like
+        Single n-dimensional input coordinate in a 1-D array-like
+        object. `n` must be greater than 1.
+    end : (n_dimensions, ) array-like
+        Single n-dimensional input coordinate in a 1-D array-like
+        object. `n` must be greater than 1.
+    t : float or (n_points,) 1D array-like
+        A float or 1D array-like of doubles representing interpolation
+        parameters, with values required in the inclusive interval
+        between 0 and 1. A common approach is to generate the array
+        with ``np.linspace(0, 1, n_pts)`` for linearly spaced points.
+        Ascending, descending, and scrambled orders are permitted.
+    tol : float
+        The absolute tolerance for determining if the start and end
+        coordinates are antipodes.
+
+    Returns
+    -------
+    result : (t.size, D)
+        An array of doubles containing the interpolated
+        spherical path and including start and
+        end when 0 and 1 t are used. The
+        interpolated values should correspond to the
+        same sort order provided in the t array. The result
+        may be 1-dimensional if ``t`` is a float.
+
+    Raises
+    ------
+    ValueError
+        If ``start`` and ``end`` are antipodes, not on the
+        unit n-sphere, or for a variety of degenerate conditions.
+
+    See Also
+    --------
+    scipy.spatial.transform.Slerp : 3-D Slerp that works with quaternions
+
+    Notes
+    -----
+    The implementation is based on the mathematical formula provided in [1]_,
+    and the first known presentation of this algorithm, derived from study of
+    4-D geometry, is credited to Glenn Davis in a footnote of the original
+    quaternion Slerp publication by Ken Shoemake [2]_.
+
+    .. versionadded:: 1.5.0
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Slerp#Geometric_Slerp
+    .. [2] Ken Shoemake (1985) Animating rotation with quaternion curves.
+           ACM SIGGRAPH Computer Graphics, 19(3): 245-254.
+
+    Examples
+    --------
+    Interpolate four linearly-spaced values on the circumference of
+    a circle spanning 90 degrees:
+
+    >>> import numpy as np
+    >>> from scipy.spatial import geometric_slerp
+    >>> import matplotlib.pyplot as plt
+    >>> fig = plt.figure()
+    >>> ax = fig.add_subplot(111)
+    >>> start = np.array([1, 0])
+    >>> end = np.array([0, 1])
+    >>> t_vals = np.linspace(0, 1, 4)
+    >>> result = geometric_slerp(start,
+    ...                          end,
+    ...                          t_vals)
+
+    The interpolated results should be at 30 degree intervals
+    recognizable on the unit circle:
+
+    >>> ax.scatter(result[...,0], result[...,1], c='k')
+    >>> circle = plt.Circle((0, 0), 1, color='grey')
+    >>> ax.add_artist(circle)
+    >>> ax.set_aspect('equal')
+    >>> plt.show()
+
+    Attempting to interpolate between antipodes on a circle is
+    ambiguous because there are two possible paths, and on a
+    sphere there are infinite possible paths on the geodesic surface.
+    Nonetheless, one of the ambiguous paths is returned along
+    with a warning:
+
+    >>> opposite_pole = np.array([-1, 0])
+    >>> with np.testing.suppress_warnings() as sup:
+    ...     sup.filter(UserWarning)
+    ...     geometric_slerp(start,
+    ...                     opposite_pole,
+    ...                     t_vals)
+    array([[ 1.00000000e+00,  0.00000000e+00],
+           [ 5.00000000e-01,  8.66025404e-01],
+           [-5.00000000e-01,  8.66025404e-01],
+           [-1.00000000e+00,  1.22464680e-16]])
+
+    Extend the original example to a sphere and plot interpolation
+    points in 3D:
+
+    >>> from mpl_toolkits.mplot3d import proj3d
+    >>> fig = plt.figure()
+    >>> ax = fig.add_subplot(111, projection='3d')
+
+    Plot the unit sphere for reference (optional):
+
+    >>> u = np.linspace(0, 2 * np.pi, 100)
+    >>> v = np.linspace(0, np.pi, 100)
+    >>> x = np.outer(np.cos(u), np.sin(v))
+    >>> y = np.outer(np.sin(u), np.sin(v))
+    >>> z = np.outer(np.ones(np.size(u)), np.cos(v))
+    >>> ax.plot_surface(x, y, z, color='y', alpha=0.1)
+
+    Interpolating over a larger number of points
+    may provide the appearance of a smooth curve on
+    the surface of the sphere, which is also useful
+    for discretized integration calculations on a
+    sphere surface:
+
+    >>> start = np.array([1, 0, 0])
+    >>> end = np.array([0, 0, 1])
+    >>> t_vals = np.linspace(0, 1, 200)
+    >>> result = geometric_slerp(start,
+    ...                          end,
+    ...                          t_vals)
+    >>> ax.plot(result[...,0],
+    ...         result[...,1],
+    ...         result[...,2],
+    ...         c='k')
+    >>> plt.show()
+    """
+
+    start = np.asarray(start, dtype=np.float64)
+    end = np.asarray(end, dtype=np.float64)
+    t = np.asarray(t)
+
+    if t.ndim > 1:
+        raise ValueError("The interpolation parameter "
+                         "value must be one dimensional.")
+
+    if start.ndim != 1 or end.ndim != 1:
+        raise ValueError("Start and end coordinates "
+                         "must be one-dimensional")
+
+    if start.size != end.size:
+        raise ValueError("The dimensions of start and "
+                         "end must match (have same size)")
+
+    if start.size < 2 or end.size < 2:
+        raise ValueError("The start and end coordinates must "
+                         "both be in at least two-dimensional "
+                         "space")
+
+    if np.array_equal(start, end):
+        return np.linspace(start, start, t.size)
+
+    # for points that violate equation for n-sphere
+    for coord in [start, end]:
+        if not np.allclose(np.linalg.norm(coord), 1.0,
+                           rtol=1e-9,
+                           atol=0):
+            raise ValueError("start and end are not"
+                             " on a unit n-sphere")
+
+    if not isinstance(tol, float):
+        raise ValueError("tol must be a float")
+    else:
+        tol = np.fabs(tol)
+
+    coord_dist = euclidean(start, end)
+
+    # diameter of 2 within tolerance means antipodes, which is a problem
+    # for all unit n-spheres (even the 0-sphere would have an ambiguous path)
+    if np.allclose(coord_dist, 2.0, rtol=0, atol=tol):
+        warnings.warn("start and end are antipodes "
+                      "using the specified tolerance; "
+                      "this may cause ambiguous slerp paths",
+                      stacklevel=2)
+
+    t = np.asarray(t, dtype=np.float64)
+
+    if t.size == 0:
+        return np.empty((0, start.size))
+
+    if t.min() < 0 or t.max() > 1:
+        raise ValueError("interpolation parameter must be in [0, 1]")
+
+    if t.ndim == 0:
+        return _geometric_slerp(start,
+                                end,
+                                np.atleast_1d(t)).ravel()
+    else:
+        return _geometric_slerp(start,
+                                end,
+                                t)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_procrustes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_procrustes.py
new file mode 100644
index 0000000000000000000000000000000000000000..e3814ab5a8404461b446eb473f5bf96deb9f8c1f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/_procrustes.py
@@ -0,0 +1,132 @@
+"""
+This module provides functions to perform full Procrustes analysis.
+
+This code was originally written by Justin Kucynski and ported over from
+scikit-bio by Yoshiki Vazquez-Baeza.
+"""
+
+import numpy as np
+from scipy.linalg import orthogonal_procrustes
+
+
+__all__ = ['procrustes']
+
+
+def procrustes(data1, data2):
+    r"""Procrustes analysis, a similarity test for two data sets.
+
+    Each input matrix is a set of points or vectors (the rows of the matrix).
+    The dimension of the space is the number of columns of each matrix. Given
+    two identically sized matrices, procrustes standardizes both such that:
+
+    - :math:`tr(AA^{T}) = 1`.
+
+    - Both sets of points are centered around the origin.
+
+    Procrustes ([1]_, [2]_) then applies the optimal transform to the second
+    matrix (including scaling/dilation, rotations, and reflections) to minimize
+    :math:`M^{2}=\sum(data1-data2)^{2}`, or the sum of the squares of the
+    pointwise differences between the two input datasets.
+
+    This function was not designed to handle datasets with different numbers of
+    datapoints (rows).  If two data sets have different dimensionality
+    (different number of columns), simply add columns of zeros to the smaller
+    of the two.
+
+    Parameters
+    ----------
+    data1 : array_like
+        Matrix, n rows represent points in k (columns) space `data1` is the
+        reference data, after it is standardised, the data from `data2` will be
+        transformed to fit the pattern in `data1` (must have >1 unique points).
+    data2 : array_like
+        n rows of data in k space to be fit to `data1`.  Must be the  same
+        shape ``(numrows, numcols)`` as data1 (must have >1 unique points).
+
+    Returns
+    -------
+    mtx1 : array_like
+        A standardized version of `data1`.
+    mtx2 : array_like
+        The orientation of `data2` that best fits `data1`. Centered, but not
+        necessarily :math:`tr(AA^{T}) = 1`.
+    disparity : float
+        :math:`M^{2}` as defined above.
+
+    Raises
+    ------
+    ValueError
+        If the input arrays are not two-dimensional.
+        If the shape of the input arrays is different.
+        If the input arrays have zero columns or zero rows.
+
+    See Also
+    --------
+    scipy.linalg.orthogonal_procrustes
+    scipy.spatial.distance.directed_hausdorff : Another similarity test
+      for two data sets
+
+    Notes
+    -----
+    - The disparity should not depend on the order of the input matrices, but
+      the output matrices will, as only the first output matrix is guaranteed
+      to be scaled such that :math:`tr(AA^{T}) = 1`.
+
+    - Duplicate data points are generally ok, duplicating a data point will
+      increase its effect on the procrustes fit.
+
+    - The disparity scales as the number of points per input matrix.
+
+    References
+    ----------
+    .. [1] Krzanowski, W. J. (2000). "Principles of Multivariate analysis".
+    .. [2] Gower, J. C. (1975). "Generalized procrustes analysis".
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.spatial import procrustes
+
+    The matrix ``b`` is a rotated, shifted, scaled and mirrored version of
+    ``a`` here:
+
+    >>> a = np.array([[1, 3], [1, 2], [1, 1], [2, 1]], 'd')
+    >>> b = np.array([[4, -2], [4, -4], [4, -6], [2, -6]], 'd')
+    >>> mtx1, mtx2, disparity = procrustes(a, b)
+    >>> round(disparity)
+    0
+
+    """
+    mtx1 = np.array(data1, dtype=np.float64, copy=True)
+    mtx2 = np.array(data2, dtype=np.float64, copy=True)
+
+    if mtx1.ndim != 2 or mtx2.ndim != 2:
+        raise ValueError("Input matrices must be two-dimensional")
+    if mtx1.shape != mtx2.shape:
+        raise ValueError("Input matrices must be of same shape")
+    if mtx1.size == 0:
+        raise ValueError("Input matrices must be >0 rows and >0 cols")
+
+    # translate all the data to the origin
+    mtx1 -= np.mean(mtx1, 0)
+    mtx2 -= np.mean(mtx2, 0)
+
+    norm1 = np.linalg.norm(mtx1)
+    norm2 = np.linalg.norm(mtx2)
+
+    if norm1 == 0 or norm2 == 0:
+        raise ValueError("Input matrices must contain >1 unique points")
+
+    # change scaling of data (in rows) such that trace(mtx*mtx') = 1
+    mtx1 /= norm1
+    mtx2 /= norm2
+
+    # transform mtx2 to minimize disparity
+    R, s = orthogonal_procrustes(mtx1, mtx2)
+    mtx2 = np.dot(mtx2, R.T) * s
+
+    # measure the dissimilarity between the two datasets
+    disparity = np.sum(np.square(mtx1 - mtx2))
+
+    return mtx1, mtx2, disparity
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/ckdtree.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/ckdtree.py
new file mode 100644
index 0000000000000000000000000000000000000000..40f524c71bf122ac822626596c2991b19ee0d30e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/ckdtree.py
@@ -0,0 +1,18 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.spatial` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = ["cKDTree"]  # noqa: F822
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="spatial", module="ckdtree",
+                                   private_modules=["_ckdtree"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.py
new file mode 100644
index 0000000000000000000000000000000000000000..4df984e691b9c70ab64806223e837a457d9fc17e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.py
@@ -0,0 +1,3140 @@
+"""
+Distance computations (:mod:`scipy.spatial.distance`)
+=====================================================
+
+.. sectionauthor:: Damian Eads
+
+Function reference
+------------------
+
+Distance matrix computation from a collection of raw observation vectors
+stored in a rectangular array.
+
+.. autosummary::
+   :toctree: generated/
+
+   pdist   -- pairwise distances between observation vectors.
+   cdist   -- distances between two collections of observation vectors
+   squareform -- convert distance matrix to a condensed one and vice versa
+   directed_hausdorff -- directed Hausdorff distance between arrays
+
+Predicates for checking the validity of distance matrices, both
+condensed and redundant. Also contained in this module are functions
+for computing the number of observations in a distance matrix.
+
+.. autosummary::
+   :toctree: generated/
+
+   is_valid_dm -- checks for a valid distance matrix
+   is_valid_y  -- checks for a valid condensed distance matrix
+   num_obs_dm  -- # of observations in a distance matrix
+   num_obs_y   -- # of observations in a condensed distance matrix
+
+Distance functions between two numeric vectors ``u`` and ``v``. Computing
+distances over a large collection of vectors is inefficient for these
+functions. Use ``pdist`` for this purpose.
+
+.. autosummary::
+   :toctree: generated/
+
+   braycurtis       -- the Bray-Curtis distance.
+   canberra         -- the Canberra distance.
+   chebyshev        -- the Chebyshev distance.
+   cityblock        -- the Manhattan distance.
+   correlation      -- the Correlation distance.
+   cosine           -- the Cosine distance.
+   euclidean        -- the Euclidean distance.
+   jensenshannon    -- the Jensen-Shannon distance.
+   mahalanobis      -- the Mahalanobis distance.
+   minkowski        -- the Minkowski distance.
+   seuclidean       -- the normalized Euclidean distance.
+   sqeuclidean      -- the squared Euclidean distance.
+
+Distance functions between two boolean vectors (representing sets) ``u`` and
+``v``.  As in the case of numerical vectors, ``pdist`` is more efficient for
+computing the distances between all pairs.
+
+.. autosummary::
+   :toctree: generated/
+
+   dice             -- the Dice dissimilarity.
+   hamming          -- the Hamming distance.
+   jaccard          -- the Jaccard distance.
+   kulczynski1      -- the Kulczynski 1 distance.
+   rogerstanimoto   -- the Rogers-Tanimoto dissimilarity.
+   russellrao       -- the Russell-Rao dissimilarity.
+   sokalmichener    -- the Sokal-Michener dissimilarity.
+   sokalsneath      -- the Sokal-Sneath dissimilarity.
+   yule             -- the Yule dissimilarity.
+
+:func:`hamming` also operates over discrete numerical vectors.
+"""
+
+# Copyright (C) Damian Eads, 2007-2008. New BSD License.
+
+__all__ = [
+    'braycurtis',
+    'canberra',
+    'cdist',
+    'chebyshev',
+    'cityblock',
+    'correlation',
+    'cosine',
+    'dice',
+    'directed_hausdorff',
+    'euclidean',
+    'hamming',
+    'is_valid_dm',
+    'is_valid_y',
+    'jaccard',
+    'jensenshannon',
+    'kulczynski1',
+    'mahalanobis',
+    'minkowski',
+    'num_obs_dm',
+    'num_obs_y',
+    'pdist',
+    'rogerstanimoto',
+    'russellrao',
+    'seuclidean',
+    'sokalmichener',
+    'sokalsneath',
+    'sqeuclidean',
+    'squareform',
+    'yule'
+]
+
+
+import math
+import warnings
+import numpy as np
+import dataclasses
+
+from collections.abc import Callable
+from functools import partial
+from scipy._lib._util import _asarray_validated, _transition_to_rng
+from scipy._lib.deprecation import _deprecated
+
+from . import _distance_wrap
+from . import _hausdorff
+from ..linalg import norm
+from ..special import rel_entr
+
+from . import _distance_pybind
+
+
+def _copy_array_if_base_present(a):
+    """Copy the array if its base points to a parent array."""
+    if a.base is not None:
+        return a.copy()
+    return a
+
+
+def _correlation_cdist_wrap(XA, XB, dm, **kwargs):
+    XA = XA - XA.mean(axis=1, keepdims=True)
+    XB = XB - XB.mean(axis=1, keepdims=True)
+    _distance_wrap.cdist_cosine_double_wrap(XA, XB, dm, **kwargs)
+
+
+def _correlation_pdist_wrap(X, dm, **kwargs):
+    X2 = X - X.mean(axis=1, keepdims=True)
+    _distance_wrap.pdist_cosine_double_wrap(X2, dm, **kwargs)
+
+
+def _convert_to_type(X, out_type):
+    return np.ascontiguousarray(X, dtype=out_type)
+
+
+def _nbool_correspond_all(u, v, w=None):
+    if u.dtype == v.dtype == bool and w is None:
+        not_u = ~u
+        not_v = ~v
+        nff = (not_u & not_v).sum()
+        nft = (not_u & v).sum()
+        ntf = (u & not_v).sum()
+        ntt = (u & v).sum()
+    else:
+        dtype = np.result_type(int, u.dtype, v.dtype)
+        u = u.astype(dtype)
+        v = v.astype(dtype)
+        not_u = 1.0 - u
+        not_v = 1.0 - v
+        if w is not None:
+            not_u = w * not_u
+            u = w * u
+        nff = (not_u * not_v).sum()
+        nft = (not_u * v).sum()
+        ntf = (u * not_v).sum()
+        ntt = (u * v).sum()
+    return (nff, nft, ntf, ntt)
+
+
+def _nbool_correspond_ft_tf(u, v, w=None):
+    if u.dtype == v.dtype == bool and w is None:
+        not_u = ~u
+        not_v = ~v
+        nft = (not_u & v).sum()
+        ntf = (u & not_v).sum()
+    else:
+        dtype = np.result_type(int, u.dtype, v.dtype)
+        u = u.astype(dtype)
+        v = v.astype(dtype)
+        not_u = 1.0 - u
+        not_v = 1.0 - v
+        if w is not None:
+            not_u = w * not_u
+            u = w * u
+        nft = (not_u * v).sum()
+        ntf = (u * not_v).sum()
+    return (nft, ntf)
+
+
+def _validate_cdist_input(XA, XB, mA, mB, n, metric_info, **kwargs):
+    # get supported types
+    types = metric_info.types
+    # choose best type
+    typ = types[types.index(XA.dtype)] if XA.dtype in types else types[0]
+    # validate data
+    XA = _convert_to_type(XA, out_type=typ)
+    XB = _convert_to_type(XB, out_type=typ)
+
+    # validate kwargs
+    _validate_kwargs = metric_info.validator
+    if _validate_kwargs:
+        kwargs = _validate_kwargs((XA, XB), mA + mB, n, **kwargs)
+    return XA, XB, typ, kwargs
+
+
+def _validate_weight_with_size(X, m, n, **kwargs):
+    w = kwargs.pop('w', None)
+    if w is None:
+        return kwargs
+
+    if w.ndim != 1 or w.shape[0] != n:
+        raise ValueError("Weights must have same size as input vector. "
+                         f"{w.shape[0]} vs. {n}")
+
+    kwargs['w'] = _validate_weights(w)
+    return kwargs
+
+
+def _validate_hamming_kwargs(X, m, n, **kwargs):
+    w = kwargs.get('w', np.ones((n,), dtype='double'))
+
+    if w.ndim != 1 or w.shape[0] != n:
+        raise ValueError(
+            "Weights must have same size as input vector. %d vs. %d" % (w.shape[0], n)
+        )
+
+    kwargs['w'] = _validate_weights(w)
+    return kwargs
+
+
+def _validate_mahalanobis_kwargs(X, m, n, **kwargs):
+    VI = kwargs.pop('VI', None)
+    if VI is None:
+        if m <= n:
+            # There are fewer observations than the dimension of
+            # the observations.
+            raise ValueError("The number of observations (%d) is too "
+                             "small; the covariance matrix is "
+                             "singular. For observations with %d "
+                             "dimensions, at least %d observations "
+                             "are required." % (m, n, n + 1))
+        if isinstance(X, tuple):
+            X = np.vstack(X)
+        CV = np.atleast_2d(np.cov(X.astype(np.float64, copy=False).T))
+        VI = np.linalg.inv(CV).T.copy()
+    kwargs["VI"] = _convert_to_double(VI)
+    return kwargs
+
+
+def _validate_minkowski_kwargs(X, m, n, **kwargs):
+    kwargs = _validate_weight_with_size(X, m, n, **kwargs)
+    if 'p' not in kwargs:
+        kwargs['p'] = 2.
+    else:
+        if kwargs['p'] <= 0:
+            raise ValueError("p must be greater than 0")
+
+    return kwargs
+
+
+def _validate_pdist_input(X, m, n, metric_info, **kwargs):
+    # get supported types
+    types = metric_info.types
+    # choose best type
+    typ = types[types.index(X.dtype)] if X.dtype in types else types[0]
+    # validate data
+    X = _convert_to_type(X, out_type=typ)
+
+    # validate kwargs
+    _validate_kwargs = metric_info.validator
+    if _validate_kwargs:
+        kwargs = _validate_kwargs(X, m, n, **kwargs)
+    return X, typ, kwargs
+
+
+def _validate_seuclidean_kwargs(X, m, n, **kwargs):
+    V = kwargs.pop('V', None)
+    if V is None:
+        if isinstance(X, tuple):
+            X = np.vstack(X)
+        V = np.var(X.astype(np.float64, copy=False), axis=0, ddof=1)
+    else:
+        V = np.asarray(V, order='c')
+        if len(V.shape) != 1:
+            raise ValueError('Variance vector V must '
+                             'be one-dimensional.')
+        if V.shape[0] != n:
+            raise ValueError('Variance vector V must be of the same '
+                             'dimension as the vectors on which the distances '
+                             'are computed.')
+    kwargs['V'] = _convert_to_double(V)
+    return kwargs
+
+
+def _validate_vector(u, dtype=None):
+    # XXX Is order='c' really necessary?
+    u = np.asarray(u, dtype=dtype, order='c')
+    if u.ndim == 1:
+        return u
+    raise ValueError("Input vector should be 1-D.")
+
+
+def _validate_weights(w, dtype=np.float64):
+    w = _validate_vector(w, dtype=dtype)
+    if np.any(w < 0):
+        raise ValueError("Input weights should be all non-negative")
+    return w
+
+
+@_transition_to_rng('seed', position_num=2, replace_doc=False)
+def directed_hausdorff(u, v, rng=0):
+    """
+    Compute the directed Hausdorff distance between two 2-D arrays.
+
+    Distances between pairs are calculated using a Euclidean metric.
+
+    Parameters
+    ----------
+    u : (M,N) array_like
+        Input array with M points in N dimensions.
+    v : (O,N) array_like
+        Input array with O points in N dimensions.
+    rng : int or `numpy.random.Generator` or None, optional
+        Pseudorandom number generator state. Default is 0 so the
+        shuffling of `u` and `v` is reproducible.
+
+        If `rng` is passed by keyword, types other than `numpy.random.Generator` are
+        passed to `numpy.random.default_rng` to instantiate a ``Generator``.
+        If `rng` is already a ``Generator`` instance, then the provided instance is
+        used.
+
+        If this argument is passed by position or `seed` is passed by keyword,
+        legacy behavior for the argument `seed` applies:
+
+        - If `seed` is None, a new ``RandomState`` instance is used. The state is
+          initialized using data from ``/dev/urandom`` (or the Windows analogue)
+          if available or from the system clock otherwise.
+        - If `seed` is an int, a new ``RandomState`` instance is used,
+          seeded with `seed`.
+        - If `seed` is already a ``Generator`` or ``RandomState`` instance, then
+          that instance is used.
+
+        .. versionchanged:: 1.15.0
+            As part of the `SPEC-007 `_
+            transition from use of `numpy.random.RandomState` to
+            `numpy.random.Generator`, this keyword was changed from `seed` to `rng`.
+            For an interim period, both keywords will continue to work, although only
+            one may be specified at a time. After the interim period, function calls
+            using the `seed` keyword will emit warnings. The behavior of both `seed`
+            and `rng` are outlined above, but only the `rng` keyword should be used in
+            new code.
+
+    Returns
+    -------
+    d : double
+        The directed Hausdorff distance between arrays `u` and `v`,
+
+    index_1 : int
+        index of point contributing to Hausdorff pair in `u`
+
+    index_2 : int
+        index of point contributing to Hausdorff pair in `v`
+
+    Raises
+    ------
+    ValueError
+        An exception is thrown if `u` and `v` do not have
+        the same number of columns.
+
+    See Also
+    --------
+    scipy.spatial.procrustes : Another similarity test for two data sets
+
+    Notes
+    -----
+    Uses the early break technique and the random sampling approach
+    described by [1]_. Although worst-case performance is ``O(m * o)``
+    (as with the brute force algorithm), this is unlikely in practice
+    as the input data would have to require the algorithm to explore
+    every single point interaction, and after the algorithm shuffles
+    the input points at that. The best case performance is O(m), which
+    is satisfied by selecting an inner loop distance that is less than
+    cmax and leads to an early break as often as possible. The authors
+    have formally shown that the average runtime is closer to O(m).
+
+    .. versionadded:: 0.19.0
+
+    References
+    ----------
+    .. [1] A. A. Taha and A. Hanbury, "An efficient algorithm for
+           calculating the exact Hausdorff distance." IEEE Transactions On
+           Pattern Analysis And Machine Intelligence, vol. 37 pp. 2153-63,
+           2015.
+
+    Examples
+    --------
+    Find the directed Hausdorff distance between two 2-D arrays of
+    coordinates:
+
+    >>> from scipy.spatial.distance import directed_hausdorff
+    >>> import numpy as np
+    >>> u = np.array([(1.0, 0.0),
+    ...               (0.0, 1.0),
+    ...               (-1.0, 0.0),
+    ...               (0.0, -1.0)])
+    >>> v = np.array([(2.0, 0.0),
+    ...               (0.0, 2.0),
+    ...               (-2.0, 0.0),
+    ...               (0.0, -4.0)])
+
+    >>> directed_hausdorff(u, v)[0]
+    2.23606797749979
+    >>> directed_hausdorff(v, u)[0]
+    3.0
+
+    Find the general (symmetric) Hausdorff distance between two 2-D
+    arrays of coordinates:
+
+    >>> max(directed_hausdorff(u, v)[0], directed_hausdorff(v, u)[0])
+    3.0
+
+    Find the indices of the points that generate the Hausdorff distance
+    (the Hausdorff pair):
+
+    >>> directed_hausdorff(v, u)[1:]
+    (3, 3)
+
+    """
+    u = np.asarray(u, dtype=np.float64, order='c')
+    v = np.asarray(v, dtype=np.float64, order='c')
+    if u.shape[1] != v.shape[1]:
+        raise ValueError('u and v need to have the same '
+                         'number of columns')
+    result = _hausdorff.directed_hausdorff(u, v, rng)
+    return result
+
+
+def minkowski(u, v, p=2, w=None):
+    """
+    Compute the Minkowski distance between two 1-D arrays.
+
+    The Minkowski distance between 1-D arrays `u` and `v`,
+    is defined as
+
+    .. math::
+
+       {\\|u-v\\|}_p = (\\sum{|u_i - v_i|^p})^{1/p}.
+
+
+       \\left(\\sum{w_i(|(u_i - v_i)|^p)}\\right)^{1/p}.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    p : scalar
+        The order of the norm of the difference :math:`{\\|u-v\\|}_p`. Note
+        that for :math:`0 < p < 1`, the triangle inequality only holds with
+        an additional multiplicative factor, i.e. it is only a quasi-metric.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    minkowski : double
+        The Minkowski distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.minkowski([1, 0, 0], [0, 1, 0], 1)
+    2.0
+    >>> distance.minkowski([1, 0, 0], [0, 1, 0], 2)
+    1.4142135623730951
+    >>> distance.minkowski([1, 0, 0], [0, 1, 0], 3)
+    1.2599210498948732
+    >>> distance.minkowski([1, 1, 0], [0, 1, 0], 1)
+    1.0
+    >>> distance.minkowski([1, 1, 0], [0, 1, 0], 2)
+    1.0
+    >>> distance.minkowski([1, 1, 0], [0, 1, 0], 3)
+    1.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if p <= 0:
+        raise ValueError("p must be greater than 0")
+    u_v = u - v
+    if w is not None:
+        w = _validate_weights(w)
+        if p == 1:
+            root_w = w
+        elif p == 2:
+            # better precision and speed
+            root_w = np.sqrt(w)
+        elif p == np.inf:
+            root_w = (w != 0)
+        else:
+            root_w = np.power(w, 1/p)
+        u_v = root_w * u_v
+    dist = norm(u_v, ord=p)
+    return dist
+
+
+def euclidean(u, v, w=None):
+    """
+    Computes the Euclidean distance between two 1-D arrays.
+
+    The Euclidean distance between 1-D arrays `u` and `v`, is defined as
+
+    .. math::
+
+       {\\|u-v\\|}_2
+
+       \\left(\\sum{(w_i |(u_i - v_i)|^2)}\\right)^{1/2}
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    euclidean : double
+        The Euclidean distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.euclidean([1, 0, 0], [0, 1, 0])
+    1.4142135623730951
+    >>> distance.euclidean([1, 1, 0], [0, 1, 0])
+    1.0
+
+    """
+    return minkowski(u, v, p=2, w=w)
+
+
+def sqeuclidean(u, v, w=None):
+    """
+    Compute the squared Euclidean distance between two 1-D arrays.
+
+    The squared Euclidean distance between `u` and `v` is defined as
+
+    .. math::
+
+       \\sum_i{w_i |u_i - v_i|^2}
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    sqeuclidean : double
+        The squared Euclidean distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.sqeuclidean([1, 0, 0], [0, 1, 0])
+    2.0
+    >>> distance.sqeuclidean([1, 1, 0], [0, 1, 0])
+    1.0
+
+    """
+    # Preserve float dtypes, but convert everything else to np.float64
+    # for stability.
+    utype, vtype = None, None
+    if not (hasattr(u, "dtype") and np.issubdtype(u.dtype, np.inexact)):
+        utype = np.float64
+    if not (hasattr(v, "dtype") and np.issubdtype(v.dtype, np.inexact)):
+        vtype = np.float64
+
+    u = _validate_vector(u, dtype=utype)
+    v = _validate_vector(v, dtype=vtype)
+    u_v = u - v
+    u_v_w = u_v  # only want weights applied once
+    if w is not None:
+        w = _validate_weights(w)
+        u_v_w = w * u_v
+    return np.dot(u_v, u_v_w)
+
+
+def correlation(u, v, w=None, centered=True):
+    """
+    Compute the correlation distance between two 1-D arrays.
+
+    The correlation distance between `u` and `v`, is
+    defined as
+
+    .. math::
+
+        1 - \\frac{(u - \\bar{u}) \\cdot (v - \\bar{v})}
+                  {{\\|(u - \\bar{u})\\|}_2 {\\|(v - \\bar{v})\\|}_2}
+
+    where :math:`\\bar{u}` is the mean of the elements of `u`
+    and :math:`x \\cdot y` is the dot product of :math:`x` and :math:`y`.
+
+    Parameters
+    ----------
+    u : (N,) array_like of floats
+        Input array.
+
+        .. deprecated:: 1.15.0
+           Complex `u` is deprecated and will raise an error in SciPy 1.17.0
+    v : (N,) array_like of floats
+        Input array.
+
+        .. deprecated:: 1.15.0
+           Complex `v` is deprecated and will raise an error in SciPy 1.17.0
+    w : (N,) array_like of floats, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+    centered : bool, optional
+        If True, `u` and `v` will be centered. Default is True.
+
+    Returns
+    -------
+    correlation : double
+        The correlation distance between 1-D array `u` and `v`.
+
+    Examples
+    --------
+    Find the correlation between two arrays.
+
+    >>> from scipy.spatial.distance import correlation
+    >>> correlation([1, 0, 1], [1, 1, 0])
+    1.5
+
+    Using a weighting array, the correlation can be calculated as:
+
+    >>> correlation([1, 0, 1], [1, 1, 0], w=[0.9, 0.1, 0.1])
+    1.1
+
+    If centering is not needed, the correlation can be calculated as:
+
+    >>> correlation([1, 0, 1], [1, 1, 0], centered=False)
+    0.5
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if np.iscomplexobj(u) or np.iscomplexobj(v):
+        message = (
+            "Complex `u` and `v` are deprecated and will raise an error in "
+            "SciPy 1.17.0.")
+        warnings.warn(message, DeprecationWarning, stacklevel=2)
+    if w is not None:
+        w = _validate_weights(w)
+        w = w / w.sum()
+    if centered:
+        if w is not None:
+            umu = np.dot(u, w)
+            vmu = np.dot(v, w)
+        else:
+            umu = np.mean(u)
+            vmu = np.mean(v)
+        u = u - umu
+        v = v - vmu
+    if w is not None:
+        vw = v * w
+        uw = u * w
+    else:
+        vw, uw = v, u
+    uv = np.dot(u, vw)
+    uu = np.dot(u, uw)
+    vv = np.dot(v, vw)
+    dist = 1.0 - uv / math.sqrt(uu * vv)
+    # Clip the result to avoid rounding error
+    return np.clip(dist, 0.0, 2.0)
+
+
+def cosine(u, v, w=None):
+    """
+    Compute the Cosine distance between 1-D arrays.
+
+    The Cosine distance between `u` and `v`, is defined as
+
+    .. math::
+
+        1 - \\frac{u \\cdot v}
+                  {\\|u\\|_2 \\|v\\|_2}.
+
+    where :math:`u \\cdot v` is the dot product of :math:`u` and
+    :math:`v`.
+
+    Parameters
+    ----------
+    u : (N,) array_like of floats
+        Input array.
+
+        .. deprecated:: 1.15.0
+           Complex `u` is deprecated and will raise an error in SciPy 1.17.0
+    v : (N,) array_like of floats
+        Input array.
+
+        .. deprecated:: 1.15.0
+           Complex `v` is deprecated and will raise an error in SciPy 1.17.0
+    w : (N,) array_like of floats, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    cosine : double
+        The Cosine distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.cosine([1, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.cosine([100, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.cosine([1, 1, 0], [0, 1, 0])
+    0.29289321881345254
+
+    """
+    # cosine distance is also referred to as 'uncentered correlation',
+    #   or 'reflective correlation'
+    return correlation(u, v, w=w, centered=False)
+
+
+def hamming(u, v, w=None):
+    """
+    Compute the Hamming distance between two 1-D arrays.
+
+    The Hamming distance between 1-D arrays `u` and `v`, is simply the
+    proportion of disagreeing components in `u` and `v`. If `u` and `v` are
+    boolean vectors, the Hamming distance is
+
+    .. math::
+
+       \\frac{c_{01} + c_{10}}{n}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n`.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    hamming : double
+        The Hamming distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.hamming([1, 0, 0], [0, 1, 0])
+    0.66666666666666663
+    >>> distance.hamming([1, 0, 0], [1, 1, 0])
+    0.33333333333333331
+    >>> distance.hamming([1, 0, 0], [2, 0, 0])
+    0.33333333333333331
+    >>> distance.hamming([1, 0, 0], [3, 0, 0])
+    0.33333333333333331
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if u.shape != v.shape:
+        raise ValueError('The 1d arrays must have equal lengths.')
+    u_ne_v = u != v
+    if w is not None:
+        w = _validate_weights(w)
+        if w.shape != u.shape:
+            raise ValueError("'w' should have the same length as 'u' and 'v'.")
+        w = w / w.sum()
+        return np.dot(u_ne_v, w)
+    return np.mean(u_ne_v)
+
+
+def jaccard(u, v, w=None):
+    r"""
+    Compute the Jaccard dissimilarity between two boolean vectors.
+
+    Given boolean vectors :math:`u \equiv (u_1, \cdots, u_n)`
+    and :math:`v \equiv (v_1, \cdots, v_n)` that are not both zero,
+    their *Jaccard dissimilarity* is defined as ([1]_, p. 26)
+
+    .. math::
+
+       d_\textrm{jaccard}(u, v) := \frac{c_{10} + c_{01}}
+                                        {c_{11} + c_{10} + c_{01}}
+
+    where
+
+    .. math::
+
+       c_{ij} := \sum_{1 \le k \le n, u_k=i, v_k=j} 1
+
+    for :math:`i, j \in \{ 0, 1\}`.  If :math:`u` and :math:`v` are both zero,
+    their Jaccard dissimilarity is defined to be zero. [2]_
+
+    If a (non-negative) weight vector :math:`w \equiv (w_1, \cdots, w_n)`
+    is supplied, the *weighted Jaccard dissimilarity* is defined similarly
+    but with :math:`c_{ij}` replaced by
+
+    .. math::
+
+       \tilde{c}_{ij} := \sum_{1 \le k \le n, u_k=i, v_k=j} w_k
+
+    Parameters
+    ----------
+    u : (N,) array_like of bools
+        Input vector.
+    v : (N,) array_like of bools
+        Input vector.
+    w : (N,) array_like of floats, optional
+        Weights for each pair of :math:`(u_k, v_k)`.  Default is ``None``,
+        which gives each pair a weight of ``1.0``.
+
+    Returns
+    -------
+    jaccard : float
+        The Jaccard dissimilarity between vectors `u` and `v`, optionally
+        weighted by `w` if supplied.
+
+    Notes
+    -----
+    The Jaccard dissimilarity satisfies the triangle inequality and is
+    qualified as a metric. [2]_
+
+    The *Jaccard index*, or *Jaccard similarity coefficient*, is equal to
+    one minus the Jaccard dissimilarity. [3]_
+
+    The dissimilarity between general (finite) sets may be computed by
+    encoding them as boolean vectors and computing the dissimilarity
+    between the encoded vectors.
+    For example, subsets :math:`A,B` of :math:`\{ 1, 2, ..., n \}` may be
+    encoded into boolean vectors :math:`u, v` by setting
+    :math:`u_k := 1_{k \in A}`, :math:`v_k := 1_{k \in B}`
+    for :math:`k = 1,2,\cdots,n`.
+
+    .. versionchanged:: 1.2.0
+       Previously, if all (positively weighted) elements in `u` and `v` are
+       zero, the function would return ``nan``.  This was changed to return
+       ``0`` instead.
+
+    .. versionchanged:: 1.15.0
+       Non-0/1 numeric input used to produce an ad hoc result.  Since 1.15.0,
+       numeric input is converted to Boolean before computation.
+
+    References
+    ----------
+    .. [1] Kaufman, L. and Rousseeuw, P. J.  (1990).  "Finding Groups in Data:
+           An Introduction to Cluster Analysis."  John Wiley & Sons, Inc.
+    .. [2] Kosub, S.  (2019).  "A note on the triangle inequality for the
+           Jaccard distance."  *Pattern Recognition Letters*, 120:36-38.
+    .. [3] https://en.wikipedia.org/wiki/Jaccard_index
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+
+    Non-zero vectors with no matching 1s have dissimilarity of 1.0:
+
+    >>> distance.jaccard([1, 0, 0], [0, 1, 0])
+    1.0
+
+    Vectors with some matching 1s have dissimilarity less than 1.0:
+
+    >>> distance.jaccard([1, 0, 0, 0], [1, 1, 1, 0])
+    0.6666666666666666
+
+    Identical vectors, including zero vectors, have dissimilarity of 0.0:
+
+    >>> distance.jaccard([1, 0, 0], [1, 0, 0])
+    0.0
+    >>> distance.jaccard([0, 0, 0], [0, 0, 0])
+    0.0
+
+    The following example computes the dissimilarity from a confusion matrix
+    directly by setting the weight vector to the frequency of True Positive,
+    False Negative, False Positive, and True Negative:
+
+    >>> distance.jaccard([1, 1, 0, 0], [1, 0, 1, 0], [31, 41, 59, 26])
+    0.7633587786259542  # (41+59)/(31+41+59)
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+
+    unequal = np.bitwise_xor(u != 0, v != 0)
+    nonzero = np.bitwise_or(u != 0, v != 0)
+    if w is not None:
+        w = _validate_weights(w)
+        unequal = w * unequal
+        nonzero = w * nonzero
+    a = np.float64(unequal.sum())
+    b = np.float64(nonzero.sum())
+    return (a / b) if b != 0 else np.float64(0)
+
+
+_deprecated_kulczynski1 = _deprecated(
+    "The kulczynski1 metric is deprecated since SciPy 1.15.0 and will be "
+    "removed in SciPy 1.17.0.  Replace usage of 'kulczynski1(u, v)' with "
+    "'1/jaccard(u, v) - 1'."
+)
+
+
+@_deprecated_kulczynski1
+def kulczynski1(u, v, *, w=None):
+    """
+    Compute the Kulczynski 1 dissimilarity between two boolean 1-D arrays.
+
+    .. deprecated:: 1.15.0
+       This function is deprecated and will be removed in SciPy 1.17.0.
+       Replace usage of ``kulczynski1(u, v)`` with ``1/jaccard(u, v) - 1``.
+
+    The Kulczynski 1 dissimilarity between two boolean 1-D arrays `u` and `v`
+    of length ``n``, is defined as
+
+    .. math::
+
+         \\frac{c_{11}}
+              {c_{01} + c_{10}}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k \\in {0, 1, ..., n-1}`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    kulczynski1 : float
+        The Kulczynski 1 distance between vectors `u` and `v`.
+
+    Notes
+    -----
+    This measure has a minimum value of 0 and no upper limit.
+    It is un-defined when there are no non-matches.
+
+    .. versionadded:: 1.8.0
+
+    References
+    ----------
+    .. [1] Kulczynski S. et al. Bulletin
+           International de l'Academie Polonaise des Sciences
+           et des Lettres, Classe des Sciences Mathematiques
+           et Naturelles, Serie B (Sciences Naturelles). 1927;
+           Supplement II: 57-203.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.kulczynski1([1, 0, 0], [0, 1, 0])
+    0.0
+    >>> distance.kulczynski1([True, False, False], [True, True, False])
+    1.0
+    >>> distance.kulczynski1([True, False, False], [True])
+    0.5
+    >>> distance.kulczynski1([1, 0, 0], [3, 1, 0])
+    -3.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+    (_, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w)
+
+    return ntt / (ntf + nft)
+
+
+def seuclidean(u, v, V):
+    """
+    Return the standardized Euclidean distance between two 1-D arrays.
+
+    The standardized Euclidean distance between two n-vectors `u` and `v` is
+
+    .. math::
+
+       \\sqrt{\\sum\\limits_i \\frac{1}{V_i} \\left(u_i-v_i \\right)^2}
+
+    ``V`` is the variance vector; ``V[I]`` is the variance computed over all the i-th
+    components of the points. If not passed, it is automatically computed.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    V : (N,) array_like
+        `V` is an 1-D array of component variances. It is usually computed
+        among a larger collection of vectors.
+
+    Returns
+    -------
+    seuclidean : double
+        The standardized Euclidean distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.seuclidean([1, 0, 0], [0, 1, 0], [0.1, 0.1, 0.1])
+    4.4721359549995796
+    >>> distance.seuclidean([1, 0, 0], [0, 1, 0], [1, 0.1, 0.1])
+    3.3166247903553998
+    >>> distance.seuclidean([1, 0, 0], [0, 1, 0], [10, 0.1, 0.1])
+    3.1780497164141406
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    V = _validate_vector(V, dtype=np.float64)
+    if V.shape[0] != u.shape[0] or u.shape[0] != v.shape[0]:
+        raise TypeError('V must be a 1-D array of the same dimension '
+                        'as u and v.')
+    return euclidean(u, v, w=1/V)
+
+
+def cityblock(u, v, w=None):
+    """
+    Compute the City Block (Manhattan) distance.
+
+    Computes the Manhattan distance between two 1-D arrays `u` and `v`,
+    which is defined as
+
+    .. math::
+
+       \\sum_i {\\left| u_i - v_i \\right|}.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    cityblock : double
+        The City Block (Manhattan) distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.cityblock([1, 0, 0], [0, 1, 0])
+    2
+    >>> distance.cityblock([1, 0, 0], [0, 2, 0])
+    3
+    >>> distance.cityblock([1, 0, 0], [1, 1, 0])
+    1
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    l1_diff = abs(u - v)
+    if w is not None:
+        w = _validate_weights(w)
+        l1_diff = w * l1_diff
+    return l1_diff.sum()
+
+
+def mahalanobis(u, v, VI):
+    """
+    Compute the Mahalanobis distance between two 1-D arrays.
+
+    The Mahalanobis distance between 1-D arrays `u` and `v`, is defined as
+
+    .. math::
+
+       \\sqrt{ (u-v) V^{-1} (u-v)^T }
+
+    where ``V`` is the covariance matrix.  Note that the argument `VI`
+    is the inverse of ``V``.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    VI : array_like
+        The inverse of the covariance matrix.
+
+    Returns
+    -------
+    mahalanobis : double
+        The Mahalanobis distance between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> iv = [[1, 0.5, 0.5], [0.5, 1, 0.5], [0.5, 0.5, 1]]
+    >>> distance.mahalanobis([1, 0, 0], [0, 1, 0], iv)
+    1.0
+    >>> distance.mahalanobis([0, 2, 0], [0, 1, 0], iv)
+    1.0
+    >>> distance.mahalanobis([2, 0, 0], [0, 1, 0], iv)
+    1.7320508075688772
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    VI = np.atleast_2d(VI)
+    delta = u - v
+    m = np.dot(np.dot(delta, VI), delta)
+    return np.sqrt(m)
+
+
+def chebyshev(u, v, w=None):
+    r"""
+    Compute the Chebyshev distance.
+
+    The *Chebyshev distance* between real vectors
+    :math:`u \equiv (u_1, \cdots, u_n)` and
+    :math:`v \equiv (v_1, \cdots, v_n)` is defined as [1]_
+
+    .. math::
+
+       d_\textrm{chebyshev}(u,v) := \max_{1 \le i \le n} |u_i-v_i|
+
+    If a (non-negative) weight vector :math:`w \equiv (w_1, \cdots, w_n)`
+    is supplied, the *weighted Chebyshev distance* is defined to be the
+    weighted Minkowski distance of infinite order; that is,
+
+    .. math::
+
+       \begin{align}
+       d_\textrm{chebyshev}(u,v;w) &:= \lim_{p\rightarrow \infty}
+          \left( \sum_{i=1}^n w_i | u_i-v_i |^p \right)^\frac{1}{p} \\
+        &= \max_{1 \le i \le n} 1_{w_i > 0} | u_i - v_i |
+       \end{align}
+
+    Parameters
+    ----------
+    u : (N,) array_like of floats
+        Input vector.
+    v : (N,) array_like of floats
+        Input vector.
+    w : (N,) array_like of floats, optional
+        Weight vector.  Default is ``None``, which gives all pairs
+        :math:`(u_i, v_i)` the same weight ``1.0``.
+
+    Returns
+    -------
+    chebyshev : float
+        The Chebyshev distance between vectors `u` and `v`, optionally weighted
+        by `w`.
+
+    References
+    ----------
+    .. [1] https://en.wikipedia.org/wiki/Chebyshev_distance
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.chebyshev([1, 0, 0], [0, 1, 0])
+    1
+    >>> distance.chebyshev([1, 1, 0], [0, 1, 0])
+    1
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+        return max((w > 0) * abs(u - v))
+    return max(abs(u - v))
+
+
+def braycurtis(u, v, w=None):
+    """
+    Compute the Bray-Curtis distance between two 1-D arrays.
+
+    Bray-Curtis distance is defined as
+
+    .. math::
+
+       \\sum{|u_i-v_i|} / \\sum{|u_i+v_i|}
+
+    The Bray-Curtis distance is in the range [0, 1] if all coordinates are
+    positive, and is undefined if the inputs are of length zero.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    braycurtis : double
+        The Bray-Curtis distance between 1-D arrays `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.braycurtis([1, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.braycurtis([1, 1, 0], [0, 1, 0])
+    0.33333333333333331
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v, dtype=np.float64)
+    l1_diff = abs(u - v)
+    l1_sum = abs(u + v)
+    if w is not None:
+        w = _validate_weights(w)
+        l1_diff = w * l1_diff
+        l1_sum = w * l1_sum
+    return l1_diff.sum() / l1_sum.sum()
+
+
+def canberra(u, v, w=None):
+    """
+    Compute the Canberra distance between two 1-D arrays.
+
+    The Canberra distance is defined as
+
+    .. math::
+
+         d(u,v) = \\sum_i \\frac{|u_i-v_i|}
+                              {|u_i|+|v_i|}.
+
+    Parameters
+    ----------
+    u : (N,) array_like
+        Input array.
+    v : (N,) array_like
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    canberra : double
+        The Canberra distance between vectors `u` and `v`.
+
+    Notes
+    -----
+    When ``u[i]`` and ``v[i]`` are 0 for given i, then the fraction 0/0 = 0 is
+    used in the calculation.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.canberra([1, 0, 0], [0, 1, 0])
+    2.0
+    >>> distance.canberra([1, 1, 0], [0, 1, 0])
+    1.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v, dtype=np.float64)
+    if w is not None:
+        w = _validate_weights(w)
+    with np.errstate(invalid='ignore'):
+        abs_uv = abs(u - v)
+        abs_u = abs(u)
+        abs_v = abs(v)
+        d = abs_uv / (abs_u + abs_v)
+        if w is not None:
+            d = w * d
+        d = np.nansum(d)
+    return d
+
+
+def jensenshannon(p, q, base=None, *, axis=0, keepdims=False):
+    """
+    Compute the Jensen-Shannon distance (metric) between
+    two probability arrays. This is the square root
+    of the Jensen-Shannon divergence.
+
+    The Jensen-Shannon distance between two probability
+    vectors `p` and `q` is defined as,
+
+    .. math::
+
+       \\sqrt{\\frac{D(p \\parallel m) + D(q \\parallel m)}{2}}
+
+    where :math:`m` is the pointwise mean of :math:`p` and :math:`q`
+    and :math:`D` is the Kullback-Leibler divergence.
+
+    This routine will normalize `p` and `q` if they don't sum to 1.0.
+
+    Parameters
+    ----------
+    p : (N,) array_like
+        left probability vector
+    q : (N,) array_like
+        right probability vector
+    base : double, optional
+        the base of the logarithm used to compute the output
+        if not given, then the routine uses the default base of
+        scipy.stats.entropy.
+    axis : int, optional
+        Axis along which the Jensen-Shannon distances are computed. The default
+        is 0.
+
+        .. versionadded:: 1.7.0
+    keepdims : bool, optional
+        If this is set to `True`, the reduced axes are left in the
+        result as dimensions with size one. With this option,
+        the result will broadcast correctly against the input array.
+        Default is False.
+
+        .. versionadded:: 1.7.0
+
+    Returns
+    -------
+    js : double or ndarray
+        The Jensen-Shannon distances between `p` and `q` along the `axis`.
+
+    Notes
+    -----
+
+    .. versionadded:: 1.2.0
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> import numpy as np
+    >>> distance.jensenshannon([1.0, 0.0, 0.0], [0.0, 1.0, 0.0], 2.0)
+    1.0
+    >>> distance.jensenshannon([1.0, 0.0], [0.5, 0.5])
+    0.46450140402245893
+    >>> distance.jensenshannon([1.0, 0.0, 0.0], [1.0, 0.0, 0.0])
+    0.0
+    >>> a = np.array([[1, 2, 3, 4],
+    ...               [5, 6, 7, 8],
+    ...               [9, 10, 11, 12]])
+    >>> b = np.array([[13, 14, 15, 16],
+    ...               [17, 18, 19, 20],
+    ...               [21, 22, 23, 24]])
+    >>> distance.jensenshannon(a, b, axis=0)
+    array([0.1954288, 0.1447697, 0.1138377, 0.0927636])
+    >>> distance.jensenshannon(a, b, axis=1)
+    array([0.1402339, 0.0399106, 0.0201815])
+
+    """
+    p = np.asarray(p)
+    q = np.asarray(q)
+    p = p / np.sum(p, axis=axis, keepdims=True)
+    q = q / np.sum(q, axis=axis, keepdims=True)
+    m = (p + q) / 2.0
+    left = rel_entr(p, m)
+    right = rel_entr(q, m)
+    left_sum = np.sum(left, axis=axis, keepdims=keepdims)
+    right_sum = np.sum(right, axis=axis, keepdims=keepdims)
+    js = left_sum + right_sum
+    if base is not None:
+        js /= np.log(base)
+    return np.sqrt(js / 2.0)
+
+
+def yule(u, v, w=None):
+    """
+    Compute the Yule dissimilarity between two boolean 1-D arrays.
+
+    The Yule dissimilarity is defined as
+
+    .. math::
+
+         \\frac{R}{c_{TT} * c_{FF} + \\frac{R}{2}}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n` and :math:`R = 2.0 * c_{TF} * c_{FT}`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    yule : double
+        The Yule dissimilarity between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.yule([1, 0, 0], [0, 1, 0])
+    2.0
+    >>> distance.yule([1, 1, 0], [0, 1, 0])
+    0.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+    (nff, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w)
+    half_R = ntf * nft
+    if half_R == 0:
+        return 0.0
+    else:
+        return float(2.0 * half_R / (ntt * nff + half_R))
+
+
+def dice(u, v, w=None):
+    """
+    Compute the Dice dissimilarity between two boolean 1-D arrays.
+
+    The Dice dissimilarity between `u` and `v`, is
+
+    .. math::
+
+         \\frac{c_{TF} + c_{FT}}
+              {2c_{TT} + c_{FT} + c_{TF}}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input 1-D array.
+    v : (N,) array_like, bool
+        Input 1-D array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    dice : double
+        The Dice dissimilarity between 1-D arrays `u` and `v`.
+
+    Notes
+    -----
+    This function computes the Dice dissimilarity index. To compute the
+    Dice similarity index, convert one to the other with similarity =
+    1 - dissimilarity.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.dice([1, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.dice([1, 0, 0], [1, 1, 0])
+    0.3333333333333333
+    >>> distance.dice([1, 0, 0], [2, 0, 0])
+    -0.3333333333333333
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+    if u.dtype == v.dtype == bool and w is None:
+        ntt = (u & v).sum()
+    else:
+        dtype = np.result_type(int, u.dtype, v.dtype)
+        u = u.astype(dtype)
+        v = v.astype(dtype)
+        if w is None:
+            ntt = (u * v).sum()
+        else:
+            ntt = (u * v * w).sum()
+    (nft, ntf) = _nbool_correspond_ft_tf(u, v, w=w)
+    return float((ntf + nft) / np.array(2.0 * ntt + ntf + nft))
+
+
+def rogerstanimoto(u, v, w=None):
+    """
+    Compute the Rogers-Tanimoto dissimilarity between two boolean 1-D arrays.
+
+    The Rogers-Tanimoto dissimilarity between two boolean 1-D arrays
+    `u` and `v`, is defined as
+
+    .. math::
+       \\frac{R}
+            {c_{TT} + c_{FF} + R}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n` and :math:`R = 2(c_{TF} + c_{FT})`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    rogerstanimoto : double
+        The Rogers-Tanimoto dissimilarity between vectors
+        `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.rogerstanimoto([1, 0, 0], [0, 1, 0])
+    0.8
+    >>> distance.rogerstanimoto([1, 0, 0], [1, 1, 0])
+    0.5
+    >>> distance.rogerstanimoto([1, 0, 0], [2, 0, 0])
+    -1.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+    (nff, nft, ntf, ntt) = _nbool_correspond_all(u, v, w=w)
+    return float(2.0 * (ntf + nft)) / float(ntt + nff + (2.0 * (ntf + nft)))
+
+
+def russellrao(u, v, w=None):
+    """
+    Compute the Russell-Rao dissimilarity between two boolean 1-D arrays.
+
+    The Russell-Rao dissimilarity between two boolean 1-D arrays, `u` and
+    `v`, is defined as
+
+    .. math::
+
+      \\frac{n - c_{TT}}
+           {n}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    russellrao : double
+        The Russell-Rao dissimilarity between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.russellrao([1, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.russellrao([1, 0, 0], [1, 1, 0])
+    0.6666666666666666
+    >>> distance.russellrao([1, 0, 0], [2, 0, 0])
+    0.3333333333333333
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if u.dtype == v.dtype == bool and w is None:
+        ntt = (u & v).sum()
+        n = float(len(u))
+    elif w is None:
+        ntt = (u * v).sum()
+        n = float(len(u))
+    else:
+        w = _validate_weights(w)
+        ntt = (u * v * w).sum()
+        n = w.sum()
+    return float(n - ntt) / n
+
+
+_deprecated_sokalmichener = _deprecated(
+    "The sokalmichener metric is deprecated since SciPy 1.15.0 and will be "
+    "removed in SciPy 1.17.0.  Replace usage of 'sokalmichener(u, v)' with "
+    "'rogerstanimoto(u, v)'."
+)
+
+
+@_deprecated_sokalmichener
+def sokalmichener(u, v, w=None):
+    """
+    Compute the Sokal-Michener dissimilarity between two boolean 1-D arrays.
+
+    .. deprecated:: 1.15.0
+       This function is deprecated and will be removed in SciPy 1.17.0.
+       Replace usage of ``sokalmichener(u, v)`` with ``rogerstanimoto(u, v)``.
+
+    The Sokal-Michener dissimilarity between boolean 1-D arrays `u` and `v`,
+    is defined as
+
+    .. math::
+
+       \\frac{R}
+            {S + R}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n`, :math:`R = 2 * (c_{TF} + c_{FT})` and
+    :math:`S = c_{FF} + c_{TT}`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    sokalmichener : double
+        The Sokal-Michener dissimilarity between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.sokalmichener([1, 0, 0], [0, 1, 0])
+    0.8
+    >>> distance.sokalmichener([1, 0, 0], [1, 1, 0])
+    0.5
+    >>> distance.sokalmichener([1, 0, 0], [2, 0, 0])
+    -1.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if w is not None:
+        w = _validate_weights(w)
+    nff, nft, ntf, ntt = _nbool_correspond_all(u, v, w=w)
+    return float(2.0 * (ntf + nft)) / float(ntt + nff + 2.0 * (ntf + nft))
+
+
+def sokalsneath(u, v, w=None):
+    """
+    Compute the Sokal-Sneath dissimilarity between two boolean 1-D arrays.
+
+    The Sokal-Sneath dissimilarity between `u` and `v`,
+
+    .. math::
+
+       \\frac{R}
+            {c_{TT} + R}
+
+    where :math:`c_{ij}` is the number of occurrences of
+    :math:`\\mathtt{u[k]} = i` and :math:`\\mathtt{v[k]} = j` for
+    :math:`k < n` and :math:`R = 2(c_{TF} + c_{FT})`.
+
+    Parameters
+    ----------
+    u : (N,) array_like, bool
+        Input array.
+    v : (N,) array_like, bool
+        Input array.
+    w : (N,) array_like, optional
+        The weights for each value in `u` and `v`. Default is None,
+        which gives each value a weight of 1.0
+
+    Returns
+    -------
+    sokalsneath : double
+        The Sokal-Sneath dissimilarity between vectors `u` and `v`.
+
+    Examples
+    --------
+    >>> from scipy.spatial import distance
+    >>> distance.sokalsneath([1, 0, 0], [0, 1, 0])
+    1.0
+    >>> distance.sokalsneath([1, 0, 0], [1, 1, 0])
+    0.66666666666666663
+    >>> distance.sokalsneath([1, 0, 0], [2, 1, 0])
+    0.0
+    >>> distance.sokalsneath([1, 0, 0], [3, 1, 0])
+    -2.0
+
+    """
+    u = _validate_vector(u)
+    v = _validate_vector(v)
+    if u.dtype == v.dtype == bool and w is None:
+        ntt = (u & v).sum()
+    elif w is None:
+        ntt = (u * v).sum()
+    else:
+        w = _validate_weights(w)
+        ntt = (u * v * w).sum()
+    (nft, ntf) = _nbool_correspond_ft_tf(u, v, w=w)
+    denom = np.array(ntt + 2.0 * (ntf + nft))
+    if not denom.any():
+        raise ValueError('Sokal-Sneath dissimilarity is not defined for '
+                         'vectors that are entirely false.')
+    return float(2.0 * (ntf + nft)) / denom
+
+
+_convert_to_double = partial(_convert_to_type, out_type=np.float64)
+_convert_to_bool = partial(_convert_to_type, out_type=bool)
+
+# adding python-only wrappers to _distance_wrap module
+_distance_wrap.pdist_correlation_double_wrap = _correlation_pdist_wrap
+_distance_wrap.cdist_correlation_double_wrap = _correlation_cdist_wrap
+
+
+@dataclasses.dataclass(frozen=True)
+class CDistMetricWrapper:
+    metric_name: str
+
+    def __call__(self, XA, XB, *, out=None, **kwargs):
+        XA = np.ascontiguousarray(XA)
+        XB = np.ascontiguousarray(XB)
+        mA, n = XA.shape
+        mB, _ = XB.shape
+        metric_name = self.metric_name
+        metric_info = _METRICS[metric_name]
+        XA, XB, typ, kwargs = _validate_cdist_input(
+            XA, XB, mA, mB, n, metric_info, **kwargs)
+
+        w = kwargs.pop('w', None)
+        if w is not None:
+            metric = metric_info.dist_func
+            return _cdist_callable(
+                XA, XB, metric=metric, out=out, w=w, **kwargs)
+
+        dm = _prepare_out_argument(out, np.float64, (mA, mB))
+        # get cdist wrapper
+        cdist_fn = getattr(_distance_wrap, f'cdist_{metric_name}_{typ}_wrap')
+        cdist_fn(XA, XB, dm, **kwargs)
+        return dm
+
+
+@dataclasses.dataclass(frozen=True)
+class PDistMetricWrapper:
+    metric_name: str
+
+    def __call__(self, X, *, out=None, **kwargs):
+        X = np.ascontiguousarray(X)
+        m, n = X.shape
+        metric_name = self.metric_name
+        metric_info = _METRICS[metric_name]
+        X, typ, kwargs = _validate_pdist_input(
+            X, m, n, metric_info, **kwargs)
+        out_size = (m * (m - 1)) // 2
+        w = kwargs.pop('w', None)
+        if w is not None:
+            metric = metric_info.dist_func
+            return _pdist_callable(
+                X, metric=metric, out=out, w=w, **kwargs)
+
+        dm = _prepare_out_argument(out, np.float64, (out_size,))
+        # get pdist wrapper
+        pdist_fn = getattr(_distance_wrap, f'pdist_{metric_name}_{typ}_wrap')
+        pdist_fn(X, dm, **kwargs)
+        return dm
+
+
+@dataclasses.dataclass(frozen=True)
+class MetricInfo:
+    # Name of python distance function
+    canonical_name: str
+    # All aliases, including canonical_name
+    aka: set[str]
+    # unvectorized distance function
+    dist_func: Callable
+    # Optimized cdist function
+    cdist_func: Callable
+    # Optimized pdist function
+    pdist_func: Callable
+    # function that checks kwargs and computes default values:
+    # f(X, m, n, **kwargs)
+    validator: Callable | None = None
+    # list of supported types:
+    # X (pdist) and XA (cdist) are used to choose the type. if there is no
+    # match the first type is used. Default double
+    types: list[str] = dataclasses.field(default_factory=lambda: ['double'])
+    # true if out array must be C-contiguous
+    requires_contiguous_out: bool = True
+
+
+# Registry of implemented metrics:
+_METRIC_INFOS = [
+    MetricInfo(
+        canonical_name='braycurtis',
+        aka={'braycurtis'},
+        dist_func=braycurtis,
+        cdist_func=_distance_pybind.cdist_braycurtis,
+        pdist_func=_distance_pybind.pdist_braycurtis,
+    ),
+    MetricInfo(
+        canonical_name='canberra',
+        aka={'canberra'},
+        dist_func=canberra,
+        cdist_func=_distance_pybind.cdist_canberra,
+        pdist_func=_distance_pybind.pdist_canberra,
+    ),
+    MetricInfo(
+        canonical_name='chebyshev',
+        aka={'chebychev', 'chebyshev', 'cheby', 'cheb', 'ch'},
+        dist_func=chebyshev,
+        cdist_func=_distance_pybind.cdist_chebyshev,
+        pdist_func=_distance_pybind.pdist_chebyshev,
+    ),
+    MetricInfo(
+        canonical_name='cityblock',
+        aka={'cityblock', 'cblock', 'cb', 'c'},
+        dist_func=cityblock,
+        cdist_func=_distance_pybind.cdist_cityblock,
+        pdist_func=_distance_pybind.pdist_cityblock,
+    ),
+    MetricInfo(
+        canonical_name='correlation',
+        aka={'correlation', 'co'},
+        dist_func=correlation,
+        cdist_func=CDistMetricWrapper('correlation'),
+        pdist_func=PDistMetricWrapper('correlation'),
+    ),
+    MetricInfo(
+        canonical_name='cosine',
+        aka={'cosine', 'cos'},
+        dist_func=cosine,
+        cdist_func=CDistMetricWrapper('cosine'),
+        pdist_func=PDistMetricWrapper('cosine'),
+    ),
+    MetricInfo(
+        canonical_name='dice',
+        aka={'dice'},
+        types=['bool'],
+        dist_func=dice,
+        cdist_func=_distance_pybind.cdist_dice,
+        pdist_func=_distance_pybind.pdist_dice,
+    ),
+    MetricInfo(
+        canonical_name='euclidean',
+        aka={'euclidean', 'euclid', 'eu', 'e'},
+        dist_func=euclidean,
+        cdist_func=_distance_pybind.cdist_euclidean,
+        pdist_func=_distance_pybind.pdist_euclidean,
+    ),
+    MetricInfo(
+        canonical_name='hamming',
+        aka={'matching', 'hamming', 'hamm', 'ha', 'h'},
+        types=['double', 'bool'],
+        validator=_validate_hamming_kwargs,
+        dist_func=hamming,
+        cdist_func=_distance_pybind.cdist_hamming,
+        pdist_func=_distance_pybind.pdist_hamming,
+    ),
+    MetricInfo(
+        canonical_name='jaccard',
+        aka={'jaccard', 'jacc', 'ja', 'j'},
+        types=['double', 'bool'],
+        dist_func=jaccard,
+        cdist_func=_distance_pybind.cdist_jaccard,
+        pdist_func=_distance_pybind.pdist_jaccard,
+    ),
+    MetricInfo(
+        canonical_name='jensenshannon',
+        aka={'jensenshannon', 'js'},
+        dist_func=jensenshannon,
+        cdist_func=CDistMetricWrapper('jensenshannon'),
+        pdist_func=PDistMetricWrapper('jensenshannon'),
+    ),
+    MetricInfo(
+        canonical_name='kulczynski1',
+        aka={'kulczynski1'},
+        types=['bool'],
+        dist_func=kulczynski1,
+        cdist_func=_deprecated_kulczynski1(_distance_pybind.cdist_kulczynski1),
+        pdist_func=_deprecated_kulczynski1(_distance_pybind.pdist_kulczynski1),
+    ),
+    MetricInfo(
+        canonical_name='mahalanobis',
+        aka={'mahalanobis', 'mahal', 'mah'},
+        validator=_validate_mahalanobis_kwargs,
+        dist_func=mahalanobis,
+        cdist_func=CDistMetricWrapper('mahalanobis'),
+        pdist_func=PDistMetricWrapper('mahalanobis'),
+    ),
+    MetricInfo(
+        canonical_name='minkowski',
+        aka={'minkowski', 'mi', 'm', 'pnorm'},
+        validator=_validate_minkowski_kwargs,
+        dist_func=minkowski,
+        cdist_func=_distance_pybind.cdist_minkowski,
+        pdist_func=_distance_pybind.pdist_minkowski,
+    ),
+    MetricInfo(
+        canonical_name='rogerstanimoto',
+        aka={'rogerstanimoto'},
+        types=['bool'],
+        dist_func=rogerstanimoto,
+        cdist_func=_distance_pybind.cdist_rogerstanimoto,
+        pdist_func=_distance_pybind.pdist_rogerstanimoto,
+    ),
+    MetricInfo(
+        canonical_name='russellrao',
+        aka={'russellrao'},
+        types=['bool'],
+        dist_func=russellrao,
+        cdist_func=_distance_pybind.cdist_russellrao,
+        pdist_func=_distance_pybind.pdist_russellrao,
+    ),
+    MetricInfo(
+        canonical_name='seuclidean',
+        aka={'seuclidean', 'se', 's'},
+        validator=_validate_seuclidean_kwargs,
+        dist_func=seuclidean,
+        cdist_func=CDistMetricWrapper('seuclidean'),
+        pdist_func=PDistMetricWrapper('seuclidean'),
+    ),
+    MetricInfo(
+        canonical_name='sokalmichener',
+        aka={'sokalmichener'},
+        types=['bool'],
+        dist_func=sokalmichener,
+        cdist_func=_deprecated_sokalmichener(_distance_pybind.cdist_sokalmichener),
+        pdist_func=_deprecated_sokalmichener(_distance_pybind.pdist_sokalmichener),
+    ),
+    MetricInfo(
+        canonical_name='sokalsneath',
+        aka={'sokalsneath'},
+        types=['bool'],
+        dist_func=sokalsneath,
+        cdist_func=_distance_pybind.cdist_sokalsneath,
+        pdist_func=_distance_pybind.pdist_sokalsneath,
+    ),
+    MetricInfo(
+        canonical_name='sqeuclidean',
+        aka={'sqeuclidean', 'sqe', 'sqeuclid'},
+        dist_func=sqeuclidean,
+        cdist_func=_distance_pybind.cdist_sqeuclidean,
+        pdist_func=_distance_pybind.pdist_sqeuclidean,
+    ),
+    MetricInfo(
+        canonical_name='yule',
+        aka={'yule'},
+        types=['bool'],
+        dist_func=yule,
+        cdist_func=_distance_pybind.cdist_yule,
+        pdist_func=_distance_pybind.pdist_yule,
+    ),
+]
+
+_METRICS = {info.canonical_name: info for info in _METRIC_INFOS}
+_METRIC_ALIAS = {alias: info
+                     for info in _METRIC_INFOS
+                     for alias in info.aka}
+
+_METRICS_NAMES = list(_METRICS.keys())
+
+_TEST_METRICS = {'test_' + info.canonical_name: info for info in _METRIC_INFOS}
+
+
+def pdist(X, metric='euclidean', *, out=None, **kwargs):
+    """
+    Pairwise distances between observations in n-dimensional space.
+
+    See Notes for common calling conventions.
+
+    Parameters
+    ----------
+    X : array_like
+        An m by n array of m original observations in an
+        n-dimensional space.
+    metric : str or function, optional
+        The distance metric to use. The distance function can
+        be 'braycurtis', 'canberra', 'chebyshev', 'cityblock',
+        'correlation', 'cosine', 'dice', 'euclidean', 'hamming',
+        'jaccard', 'jensenshannon', 'kulczynski1',
+        'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto',
+        'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath',
+        'sqeuclidean', 'yule'.
+    out : ndarray, optional
+        The output array.
+        If not None, condensed distance matrix Y is stored in this array.
+    **kwargs : dict, optional
+        Extra arguments to `metric`: refer to each metric documentation for a
+        list of all possible arguments.
+
+        Some possible arguments:
+
+        p : scalar
+        The p-norm to apply for Minkowski, weighted and unweighted.
+        Default: 2.
+
+        w : ndarray
+        The weight vector for metrics that support weights (e.g., Minkowski).
+
+        V : ndarray
+        The variance vector for standardized Euclidean.
+        Default: var(X, axis=0, ddof=1)
+
+        VI : ndarray
+        The inverse of the covariance matrix for Mahalanobis.
+        Default: inv(cov(X.T)).T
+
+    Returns
+    -------
+    Y : ndarray
+        Returns a condensed distance matrix Y. For each :math:`i` and :math:`j`
+        (where :math:`i 0` (note
+       that this is only a quasi-metric if :math:`0 < p < 1`).
+
+    3. ``Y = pdist(X, 'cityblock')``
+
+       Computes the city block or Manhattan distance between the
+       points.
+
+    4. ``Y = pdist(X, 'seuclidean', V=None)``
+
+       Computes the standardized Euclidean distance. The standardized
+       Euclidean distance between two n-vectors ``u`` and ``v`` is
+
+       .. math::
+
+          \\sqrt{\\sum {(u_i-v_i)^2 / V[x_i]}}
+
+
+       V is the variance vector; V[i] is the variance computed over all
+       the i'th components of the points.  If not passed, it is
+       automatically computed.
+
+    5. ``Y = pdist(X, 'sqeuclidean')``
+
+       Computes the squared Euclidean distance :math:`\\|u-v\\|_2^2` between
+       the vectors.
+
+    6. ``Y = pdist(X, 'cosine')``
+
+       Computes the cosine distance between vectors u and v,
+
+       .. math::
+
+          1 - \\frac{u \\cdot v}
+                   {{\\|u\\|}_2 {\\|v\\|}_2}
+
+       where :math:`\\|*\\|_2` is the 2-norm of its argument ``*``, and
+       :math:`u \\cdot v` is the dot product of ``u`` and ``v``.
+
+    7. ``Y = pdist(X, 'correlation')``
+
+       Computes the correlation distance between vectors u and v. This is
+
+       .. math::
+
+          1 - \\frac{(u - \\bar{u}) \\cdot (v - \\bar{v})}
+                   {{\\|(u - \\bar{u})\\|}_2 {\\|(v - \\bar{v})\\|}_2}
+
+       where :math:`\\bar{v}` is the mean of the elements of vector v,
+       and :math:`x \\cdot y` is the dot product of :math:`x` and :math:`y`.
+
+    8. ``Y = pdist(X, 'hamming')``
+
+       Computes the normalized Hamming distance, or the proportion of
+       those vector elements between two n-vectors ``u`` and ``v``
+       which disagree. To save memory, the matrix ``X`` can be of type
+       boolean.
+
+    9. ``Y = pdist(X, 'jaccard')``
+
+       Computes the Jaccard distance between the points. Given two
+       vectors, ``u`` and ``v``, the Jaccard distance is the
+       proportion of those elements ``u[i]`` and ``v[i]`` that
+       disagree.
+
+    10. ``Y = pdist(X, 'jensenshannon')``
+
+        Computes the Jensen-Shannon distance between two probability arrays.
+        Given two probability vectors, :math:`p` and :math:`q`, the
+        Jensen-Shannon distance is
+
+        .. math::
+
+           \\sqrt{\\frac{D(p \\parallel m) + D(q \\parallel m)}{2}}
+
+        where :math:`m` is the pointwise mean of :math:`p` and :math:`q`
+        and :math:`D` is the Kullback-Leibler divergence.
+
+    11. ``Y = pdist(X, 'chebyshev')``
+
+        Computes the Chebyshev distance between the points. The
+        Chebyshev distance between two n-vectors ``u`` and ``v`` is the
+        maximum norm-1 distance between their respective elements. More
+        precisely, the distance is given by
+
+        .. math::
+
+           d(u,v) = \\max_i {|u_i-v_i|}
+
+    12. ``Y = pdist(X, 'canberra')``
+
+        Computes the Canberra distance between the points. The
+        Canberra distance between two points ``u`` and ``v`` is
+
+        .. math::
+
+          d(u,v) = \\sum_i \\frac{|u_i-v_i|}
+                               {|u_i|+|v_i|}
+
+
+    13. ``Y = pdist(X, 'braycurtis')``
+
+        Computes the Bray-Curtis distance between the points. The
+        Bray-Curtis distance between two points ``u`` and ``v`` is
+
+
+        .. math::
+
+             d(u,v) = \\frac{\\sum_i {|u_i-v_i|}}
+                            {\\sum_i {|u_i+v_i|}}
+
+    14. ``Y = pdist(X, 'mahalanobis', VI=None)``
+
+        Computes the Mahalanobis distance between the points. The
+        Mahalanobis distance between two points ``u`` and ``v`` is
+        :math:`\\sqrt{(u-v)(1/V)(u-v)^T}` where :math:`(1/V)` (the ``VI``
+        variable) is the inverse covariance. If ``VI`` is not None,
+        ``VI`` will be used as the inverse covariance matrix.
+
+    15. ``Y = pdist(X, 'yule')``
+
+        Computes the Yule distance between each pair of boolean
+        vectors. (see yule function documentation)
+
+    16. ``Y = pdist(X, 'matching')``
+
+        Synonym for 'hamming'.
+
+    17. ``Y = pdist(X, 'dice')``
+
+        Computes the Dice distance between each pair of boolean
+        vectors. (see dice function documentation)
+
+    18. ``Y = pdist(X, 'kulczynski1')``
+
+        Computes the kulczynski1 distance between each pair of
+        boolean vectors. (see kulczynski1 function documentation)
+
+        .. deprecated:: 1.15.0
+           This metric is deprecated and will be removed in SciPy 1.17.0.
+           Replace usage of ``pdist(X, 'kulczynski1')`` with
+           ``1 / pdist(X, 'jaccard') - 1``.
+
+    19. ``Y = pdist(X, 'rogerstanimoto')``
+
+        Computes the Rogers-Tanimoto distance between each pair of
+        boolean vectors. (see rogerstanimoto function documentation)
+
+    20. ``Y = pdist(X, 'russellrao')``
+
+        Computes the Russell-Rao distance between each pair of
+        boolean vectors. (see russellrao function documentation)
+
+    21. ``Y = pdist(X, 'sokalmichener')``
+
+        Computes the Sokal-Michener distance between each pair of
+        boolean vectors. (see sokalmichener function documentation)
+
+        .. deprecated:: 1.15.0
+           This metric is deprecated and will be removed in SciPy 1.17.0.
+           Replace usage of ``pdist(X, 'sokalmichener')`` with
+           ``pdist(X, 'rogerstanimoto')``.
+
+    22. ``Y = pdist(X, 'sokalsneath')``
+
+        Computes the Sokal-Sneath distance between each pair of
+        boolean vectors. (see sokalsneath function documentation)
+
+    23. ``Y = pdist(X, 'kulczynski1')``
+
+        Computes the Kulczynski 1 distance between each pair of
+        boolean vectors. (see kulczynski1 function documentation)
+
+    24. ``Y = pdist(X, f)``
+
+        Computes the distance between all pairs of vectors in X
+        using the user supplied 2-arity function f. For example,
+        Euclidean distance between the vectors could be computed
+        as follows::
+
+          dm = pdist(X, lambda u, v: np.sqrt(((u-v)**2).sum()))
+
+        Note that you should avoid passing a reference to one of
+        the distance functions defined in this library. For example,::
+
+          dm = pdist(X, sokalsneath)
+
+        would calculate the pair-wise distances between the vectors in
+        X using the Python function sokalsneath. This would result in
+        sokalsneath being called :math:`{n \\choose 2}` times, which
+        is inefficient. Instead, the optimized C version is more
+        efficient, and we call it using the following syntax.::
+
+          dm = pdist(X, 'sokalsneath')
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.spatial.distance import pdist
+
+    ``x`` is an array of five points in three-dimensional space.
+
+    >>> x = np.array([[2, 0, 2], [2, 2, 3], [-2, 4, 5], [0, 1, 9], [2, 2, 4]])
+
+    ``pdist(x)`` with no additional arguments computes the 10 pairwise
+    Euclidean distances:
+
+    >>> pdist(x)
+    array([2.23606798, 6.40312424, 7.34846923, 2.82842712, 4.89897949,
+           6.40312424, 1.        , 5.38516481, 4.58257569, 5.47722558])
+
+    The following computes the pairwise Minkowski distances with ``p = 3.5``:
+
+    >>> pdist(x, metric='minkowski', p=3.5)
+    array([2.04898923, 5.1154929 , 7.02700737, 2.43802731, 4.19042714,
+           6.03956994, 1.        , 4.45128103, 4.10636143, 5.0619695 ])
+
+    The pairwise city block or Manhattan distances:
+
+    >>> pdist(x, metric='cityblock')
+    array([ 3., 11., 10.,  4.,  8.,  9.,  1.,  9.,  7.,  8.])
+
+    """
+    # You can also call this as:
+    #     Y = pdist(X, 'test_abc')
+    # where 'abc' is the metric being tested.  This computes the distance
+    # between all pairs of vectors in X using the distance metric 'abc' but
+    # with a more succinct, verifiable, but less efficient implementation.
+
+    X = _asarray_validated(X, sparse_ok=False, objects_ok=True, mask_ok=True,
+                           check_finite=False)
+
+    s = X.shape
+    if len(s) != 2:
+        raise ValueError('A 2-dimensional array must be passed.')
+
+    m, n = s
+
+    if callable(metric):
+        mstr = getattr(metric, '__name__', 'UnknownCustomMetric')
+        metric_info = _METRIC_ALIAS.get(mstr, None)
+
+        if metric_info is not None:
+            X, typ, kwargs = _validate_pdist_input(
+                X, m, n, metric_info, **kwargs)
+
+        return _pdist_callable(X, metric=metric, out=out, **kwargs)
+    elif isinstance(metric, str):
+        mstr = metric.lower()
+        metric_info = _METRIC_ALIAS.get(mstr, None)
+
+        if metric_info is not None:
+            pdist_fn = metric_info.pdist_func
+            return pdist_fn(X, out=out, **kwargs)
+        elif mstr.startswith("test_"):
+            metric_info = _TEST_METRICS.get(mstr, None)
+            if metric_info is None:
+                raise ValueError(f'Unknown "Test" Distance Metric: {mstr[5:]}')
+            X, typ, kwargs = _validate_pdist_input(
+                X, m, n, metric_info, **kwargs)
+            return _pdist_callable(
+                X, metric=metric_info.dist_func, out=out, **kwargs)
+        else:
+            raise ValueError(f'Unknown Distance Metric: {mstr}')
+    else:
+        raise TypeError('2nd argument metric must be a string identifier '
+                        'or a function.')
+
+
+def squareform(X, force="no", checks=True):
+    """
+    Convert a vector-form distance vector to a square-form distance
+    matrix, and vice-versa.
+
+    Parameters
+    ----------
+    X : array_like
+        Either a condensed or redundant distance matrix.
+    force : str, optional
+        As with MATLAB(TM), if force is equal to ``'tovector'`` or
+        ``'tomatrix'``, the input will be treated as a distance matrix or
+        distance vector respectively.
+    checks : bool, optional
+        If set to False, no checks will be made for matrix
+        symmetry nor zero diagonals. This is useful if it is known that
+        ``X - X.T1`` is small and ``diag(X)`` is close to zero.
+        These values are ignored any way so they do not disrupt the
+        squareform transformation.
+
+    Returns
+    -------
+    Y : ndarray
+        If a condensed distance matrix is passed, a redundant one is
+        returned, or if a redundant one is passed, a condensed distance
+        matrix is returned.
+
+    Notes
+    -----
+    1. ``v = squareform(X)``
+
+       Given a square n-by-n symmetric distance matrix ``X``,
+       ``v = squareform(X)`` returns a ``n * (n-1) / 2``
+       (i.e. binomial coefficient n choose 2) sized vector `v`
+       where :math:`v[{n \\choose 2} - {n-i \\choose 2} + (j-i-1)]`
+       is the distance between distinct points ``i`` and ``j``.
+       If ``X`` is non-square or asymmetric, an error is raised.
+
+    2. ``X = squareform(v)``
+
+       Given a ``n * (n-1) / 2`` sized vector ``v``
+       for some integer ``n >= 1`` encoding distances as described,
+       ``X = squareform(v)`` returns a n-by-n distance matrix ``X``.
+       The ``X[i, j]`` and ``X[j, i]`` values are set to
+       :math:`v[{n \\choose 2} - {n-i \\choose 2} + (j-i-1)]`
+       and all diagonal elements are zero.
+
+    In SciPy 0.19.0, ``squareform`` stopped casting all input types to
+    float64, and started returning arrays of the same dtype as the input.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.spatial.distance import pdist, squareform
+
+    ``x`` is an array of five points in three-dimensional space.
+
+    >>> x = np.array([[2, 0, 2], [2, 2, 3], [-2, 4, 5], [0, 1, 9], [2, 2, 4]])
+
+    ``pdist(x)`` computes the Euclidean distances between each pair of
+    points in ``x``.  The distances are returned in a one-dimensional
+    array with length ``5*(5 - 1)/2 = 10``.
+
+    >>> distvec = pdist(x)
+    >>> distvec
+    array([2.23606798, 6.40312424, 7.34846923, 2.82842712, 4.89897949,
+           6.40312424, 1.        , 5.38516481, 4.58257569, 5.47722558])
+
+    ``squareform(distvec)`` returns the 5x5 distance matrix.
+
+    >>> m = squareform(distvec)
+    >>> m
+    array([[0.        , 2.23606798, 6.40312424, 7.34846923, 2.82842712],
+           [2.23606798, 0.        , 4.89897949, 6.40312424, 1.        ],
+           [6.40312424, 4.89897949, 0.        , 5.38516481, 4.58257569],
+           [7.34846923, 6.40312424, 5.38516481, 0.        , 5.47722558],
+           [2.82842712, 1.        , 4.58257569, 5.47722558, 0.        ]])
+
+    When given a square distance matrix ``m``, ``squareform(m)`` returns
+    the one-dimensional condensed distance vector associated with the
+    matrix.  In this case, we recover ``distvec``.
+
+    >>> squareform(m)
+    array([2.23606798, 6.40312424, 7.34846923, 2.82842712, 4.89897949,
+           6.40312424, 1.        , 5.38516481, 4.58257569, 5.47722558])
+    """
+    X = np.ascontiguousarray(X)
+
+    s = X.shape
+
+    if force.lower() == 'tomatrix':
+        if len(s) != 1:
+            raise ValueError("Forcing 'tomatrix' but input X is not a "
+                             "distance vector.")
+    elif force.lower() == 'tovector':
+        if len(s) != 2:
+            raise ValueError("Forcing 'tovector' but input X is not a "
+                             "distance matrix.")
+
+    # X = squareform(v)
+    if len(s) == 1:
+        if s[0] == 0:
+            return np.zeros((1, 1), dtype=X.dtype)
+
+        # Grab the closest value to the square root of the number
+        # of elements times 2 to see if the number of elements
+        # is indeed a binomial coefficient.
+        d = int(np.ceil(np.sqrt(s[0] * 2)))
+
+        # Check that v is of valid dimensions.
+        if d * (d - 1) != s[0] * 2:
+            raise ValueError('Incompatible vector size. It must be a binomial '
+                             'coefficient n choose 2 for some integer n >= 2.')
+
+        # Allocate memory for the distance matrix.
+        M = np.zeros((d, d), dtype=X.dtype)
+
+        # Since the C code does not support striding using strides.
+        # The dimensions are used instead.
+        X = _copy_array_if_base_present(X)
+
+        # Fill in the values of the distance matrix.
+        _distance_wrap.to_squareform_from_vector_wrap(M, X)
+
+        # Return the distance matrix.
+        return M
+    elif len(s) == 2:
+        if s[0] != s[1]:
+            raise ValueError('The matrix argument must be square.')
+        if checks:
+            is_valid_dm(X, throw=True, name='X')
+
+        # One-side of the dimensions is set here.
+        d = s[0]
+
+        if d <= 1:
+            return np.array([], dtype=X.dtype)
+
+        # Create a vector.
+        v = np.zeros((d * (d - 1)) // 2, dtype=X.dtype)
+
+        # Since the C code does not support striding using strides.
+        # The dimensions are used instead.
+        X = _copy_array_if_base_present(X)
+
+        # Convert the vector to squareform.
+        _distance_wrap.to_vector_from_squareform_wrap(X, v)
+        return v
+    else:
+        raise ValueError("The first argument must be one or two dimensional "
+                         f"array. A {len(s)}-dimensional array is not permitted")
+
+
+def is_valid_dm(D, tol=0.0, throw=False, name="D", warning=False):
+    """
+    Return True if input array is a valid distance matrix.
+
+    Distance matrices must be 2-dimensional numpy arrays.
+    They must have a zero-diagonal, and they must be symmetric.
+
+    Parameters
+    ----------
+    D : array_like
+        The candidate object to test for validity.
+    tol : float, optional
+        The distance matrix should be symmetric. `tol` is the maximum
+        difference between entries ``ij`` and ``ji`` for the distance
+        metric to be considered symmetric.
+    throw : bool, optional
+        An exception is thrown if the distance matrix passed is not valid.
+    name : str, optional
+        The name of the variable to checked. This is useful if
+        throw is set to True so the offending variable can be identified
+        in the exception message when an exception is thrown.
+    warning : bool, optional
+        Instead of throwing an exception, a warning message is
+        raised.
+
+    Returns
+    -------
+    valid : bool
+        True if the variable `D` passed is a valid distance matrix.
+
+    Notes
+    -----
+    Small numerical differences in `D` and `D.T` and non-zeroness of
+    the diagonal are ignored if they are within the tolerance specified
+    by `tol`.
+
+    Examples
+    --------
+    >>> import numpy as np
+    >>> from scipy.spatial.distance import is_valid_dm
+
+    This matrix is a valid distance matrix.
+
+    >>> d = np.array([[0.0, 1.1, 1.2, 1.3],
+    ...               [1.1, 0.0, 1.0, 1.4],
+    ...               [1.2, 1.0, 0.0, 1.5],
+    ...               [1.3, 1.4, 1.5, 0.0]])
+    >>> is_valid_dm(d)
+    True
+
+    In the following examples, the input is not a valid distance matrix.
+
+    Not square:
+
+    >>> is_valid_dm([[0, 2, 2], [2, 0, 2]])
+    False
+
+    Nonzero diagonal element:
+
+    >>> is_valid_dm([[0, 1, 1], [1, 2, 3], [1, 3, 0]])
+    False
+
+    Not symmetric:
+
+    >>> is_valid_dm([[0, 1, 3], [2, 0, 1], [3, 1, 0]])
+    False
+
+    """
+    D = np.asarray(D, order='c')
+    valid = True
+    try:
+        s = D.shape
+        if len(D.shape) != 2:
+            if name:
+                raise ValueError(f"Distance matrix '{name}' must have shape=2 "
+                                 "(i.e. be two-dimensional).")
+            else:
+                raise ValueError('Distance matrix must have shape=2 (i.e. '
+                                 'be two-dimensional).')
+        if tol == 0.0:
+            if not (D == D.T).all():
+                if name:
+                    raise ValueError(f"Distance matrix '{name}' must be symmetric.")
+                else:
+                    raise ValueError('Distance matrix must be symmetric.')
+            if not (D[range(0, s[0]), range(0, s[0])] == 0).all():
+                if name:
+                    raise ValueError(f"Distance matrix '{name}' diagonal must be zero.")
+                else:
+                    raise ValueError('Distance matrix diagonal must be zero.')
+        else:
+            if not (D - D.T <= tol).all():
+                if name:
+                    raise ValueError(f'Distance matrix \'{name}\' must be '
+                                     f'symmetric within tolerance {tol:5.5f}.')
+                else:
+                    raise ValueError('Distance matrix must be symmetric within '
+                                     f'tolerance {tol:5.5f}.')
+            if not (D[range(0, s[0]), range(0, s[0])] <= tol).all():
+                if name:
+                    raise ValueError(f'Distance matrix \'{name}\' diagonal must be '
+                                     f'close to zero within tolerance {tol:5.5f}.')
+                else:
+                    raise ValueError(('Distance matrix \'{}\' diagonal must be close '
+                                      'to zero within tolerance {:5.5f}.').format(*tol))
+    except Exception as e:
+        if throw:
+            raise
+        if warning:
+            warnings.warn(str(e), stacklevel=2)
+        valid = False
+    return valid
+
+
+def is_valid_y(y, warning=False, throw=False, name=None):
+    """
+    Return True if the input array is a valid condensed distance matrix.
+
+    Condensed distance matrices must be 1-dimensional numpy arrays.
+    Their length must be a binomial coefficient :math:`{n \\choose 2}`
+    for some positive integer n.
+
+    Parameters
+    ----------
+    y : array_like
+        The condensed distance matrix.
+    warning : bool, optional
+        Invokes a warning if the variable passed is not a valid
+        condensed distance matrix. The warning message explains why
+        the distance matrix is not valid.  `name` is used when
+        referencing the offending variable.
+    throw : bool, optional
+        Throws an exception if the variable passed is not a valid
+        condensed distance matrix.
+    name : bool, optional
+        Used when referencing the offending variable in the
+        warning or exception message.
+
+    Returns
+    -------
+    bool
+        True if the input array is a valid condensed distance matrix,
+        False otherwise.
+
+    Examples
+    --------
+    >>> from scipy.spatial.distance import is_valid_y
+
+    This vector is a valid condensed distance matrix.  The length is 6,
+    which corresponds to ``n = 4``, since ``4*(4 - 1)/2`` is 6.
+
+    >>> v = [1.0, 1.2, 1.0, 0.5, 1.3, 0.9]
+    >>> is_valid_y(v)
+    True
+
+    An input vector with length, say, 7, is not a valid condensed distance
+    matrix.
+
+    >>> is_valid_y([1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7])
+    False
+
+    """
+    y = np.asarray(y, order='c')
+    valid = True
+    try:
+        if len(y.shape) != 1:
+            if name:
+                raise ValueError(f"Condensed distance matrix '{name}' must "
+                                 "have shape=1 (i.e. be one-dimensional).")
+            else:
+                raise ValueError('Condensed distance matrix must have shape=1 '
+                                 '(i.e. be one-dimensional).')
+        n = y.shape[0]
+        d = int(np.ceil(np.sqrt(n * 2)))
+        if (d * (d - 1) / 2) != n:
+            if name:
+                raise ValueError(f"Length n of condensed distance matrix '{name}' "
+                                 "must be a binomial coefficient, i.e."
+                                 "there must be a k such that (k \\choose 2)=n)!")
+            else:
+                raise ValueError('Length n of condensed distance matrix must '
+                                 'be a binomial coefficient, i.e. there must '
+                                 'be a k such that (k \\choose 2)=n)!')
+    except Exception as e:
+        if throw:
+            raise
+        if warning:
+            warnings.warn(str(e), stacklevel=2)
+        valid = False
+    return valid
+
+
+def num_obs_dm(d):
+    """
+    Return the number of original observations that correspond to a
+    square, redundant distance matrix.
+
+    Parameters
+    ----------
+    d : array_like
+        The target distance matrix.
+
+    Returns
+    -------
+    num_obs_dm : int
+        The number of observations in the redundant distance matrix.
+
+    Examples
+    --------
+    Find the number of original observations corresponding
+    to a square redundant distance matrix d.
+    
+    >>> from scipy.spatial.distance import num_obs_dm
+    >>> d = [[0, 100, 200], [100, 0, 150], [200, 150, 0]]
+    >>> num_obs_dm(d)
+    3
+    """
+    d = np.asarray(d, order='c')
+    is_valid_dm(d, tol=np.inf, throw=True, name='d')
+    return d.shape[0]
+
+
+def num_obs_y(Y):
+    """
+    Return the number of original observations that correspond to a
+    condensed distance matrix.
+
+    Parameters
+    ----------
+    Y : array_like
+        Condensed distance matrix.
+
+    Returns
+    -------
+    n : int
+        The number of observations in the condensed distance matrix `Y`.
+
+    Examples
+    --------
+    Find the number of original observations corresponding to a
+    condensed distance matrix Y.
+    
+    >>> from scipy.spatial.distance import num_obs_y
+    >>> Y = [1, 2, 3.5, 7, 10, 4]
+    >>> num_obs_y(Y)
+    4
+    """
+    Y = np.asarray(Y, order='c')
+    is_valid_y(Y, throw=True, name='Y')
+    k = Y.shape[0]
+    if k == 0:
+        raise ValueError("The number of observations cannot be determined on "
+                         "an empty distance matrix.")
+    d = int(np.ceil(np.sqrt(k * 2)))
+    if (d * (d - 1) / 2) != k:
+        raise ValueError("Invalid condensed distance matrix passed. Must be "
+                         "some k where k=(n choose 2) for some n >= 2.")
+    return d
+
+
+def _prepare_out_argument(out, dtype, expected_shape):
+    if out is None:
+        return np.empty(expected_shape, dtype=dtype)
+
+    if out.shape != expected_shape:
+        raise ValueError("Output array has incorrect shape.")
+    if not out.flags.c_contiguous:
+        raise ValueError("Output array must be C-contiguous.")
+    if out.dtype != np.float64:
+        raise ValueError("Output array must be double type.")
+    return out
+
+
+def _pdist_callable(X, *, out, metric, **kwargs):
+    n = X.shape[0]
+    out_size = (n * (n - 1)) // 2
+    dm = _prepare_out_argument(out, np.float64, (out_size,))
+    k = 0
+    for i in range(X.shape[0] - 1):
+        for j in range(i + 1, X.shape[0]):
+            dm[k] = metric(X[i], X[j], **kwargs)
+            k += 1
+    return dm
+
+
+def _cdist_callable(XA, XB, *, out, metric, **kwargs):
+    mA = XA.shape[0]
+    mB = XB.shape[0]
+    dm = _prepare_out_argument(out, np.float64, (mA, mB))
+    for i in range(mA):
+        for j in range(mB):
+            dm[i, j] = metric(XA[i], XB[j], **kwargs)
+    return dm
+
+
+def cdist(XA, XB, metric='euclidean', *, out=None, **kwargs):
+    """
+    Compute distance between each pair of the two collections of inputs.
+
+    See Notes for common calling conventions.
+
+    Parameters
+    ----------
+    XA : array_like
+        An :math:`m_A` by :math:`n` array of :math:`m_A`
+        original observations in an :math:`n`-dimensional space.
+        Inputs are converted to float type.
+    XB : array_like
+        An :math:`m_B` by :math:`n` array of :math:`m_B`
+        original observations in an :math:`n`-dimensional space.
+        Inputs are converted to float type.
+    metric : str or callable, optional
+        The distance metric to use. If a string, the distance function can be
+        'braycurtis', 'canberra', 'chebyshev', 'cityblock', 'correlation',
+        'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'jensenshannon',
+        'kulczynski1', 'mahalanobis', 'matching', 'minkowski',
+        'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener',
+        'sokalsneath', 'sqeuclidean', 'yule'.
+    **kwargs : dict, optional
+        Extra arguments to `metric`: refer to each metric documentation for a
+        list of all possible arguments.
+
+        Some possible arguments:
+
+        p : scalar
+        The p-norm to apply for Minkowski, weighted and unweighted.
+        Default: 2.
+
+        w : array_like
+        The weight vector for metrics that support weights (e.g., Minkowski).
+
+        V : array_like
+        The variance vector for standardized Euclidean.
+        Default: var(vstack([XA, XB]), axis=0, ddof=1)
+
+        VI : array_like
+        The inverse of the covariance matrix for Mahalanobis.
+        Default: inv(cov(vstack([XA, XB].T))).T
+
+        out : ndarray
+        The output array
+        If not None, the distance matrix Y is stored in this array.
+
+    Returns
+    -------
+    Y : ndarray
+        A :math:`m_A` by :math:`m_B` distance matrix is returned.
+        For each :math:`i` and :math:`j`, the metric
+        ``dist(u=XA[i], v=XB[j])`` is computed and stored in the
+        :math:`ij` th entry.
+
+    Raises
+    ------
+    ValueError
+        An exception is thrown if `XA` and `XB` do not have
+        the same number of columns.
+
+    Notes
+    -----
+    The following are common calling conventions:
+
+    1. ``Y = cdist(XA, XB, 'euclidean')``
+
+       Computes the distance between :math:`m` points using
+       Euclidean distance (2-norm) as the distance metric between the
+       points. The points are arranged as :math:`m`
+       :math:`n`-dimensional row vectors in the matrix X.
+
+    2. ``Y = cdist(XA, XB, 'minkowski', p=2.)``
+
+       Computes the distances using the Minkowski distance
+       :math:`\\|u-v\\|_p` (:math:`p`-norm) where :math:`p > 0` (note
+       that this is only a quasi-metric if :math:`0 < p < 1`).
+
+    3. ``Y = cdist(XA, XB, 'cityblock')``
+
+       Computes the city block or Manhattan distance between the
+       points.
+
+    4. ``Y = cdist(XA, XB, 'seuclidean', V=None)``
+
+       Computes the standardized Euclidean distance. The standardized
+       Euclidean distance between two n-vectors ``u`` and ``v`` is
+
+       .. math::
+
+          \\sqrt{\\sum {(u_i-v_i)^2 / V[x_i]}}.
+
+       V is the variance vector; V[i] is the variance computed over all
+       the i'th components of the points. If not passed, it is
+       automatically computed.
+
+    5. ``Y = cdist(XA, XB, 'sqeuclidean')``
+
+       Computes the squared Euclidean distance :math:`\\|u-v\\|_2^2` between
+       the vectors.
+
+    6. ``Y = cdist(XA, XB, 'cosine')``
+
+       Computes the cosine distance between vectors u and v,
+
+       .. math::
+
+          1 - \\frac{u \\cdot v}
+                   {{\\|u\\|}_2 {\\|v\\|}_2}
+
+       where :math:`\\|*\\|_2` is the 2-norm of its argument ``*``, and
+       :math:`u \\cdot v` is the dot product of :math:`u` and :math:`v`.
+
+    7. ``Y = cdist(XA, XB, 'correlation')``
+
+       Computes the correlation distance between vectors u and v. This is
+
+       .. math::
+
+          1 - \\frac{(u - \\bar{u}) \\cdot (v - \\bar{v})}
+                   {{\\|(u - \\bar{u})\\|}_2 {\\|(v - \\bar{v})\\|}_2}
+
+       where :math:`\\bar{v}` is the mean of the elements of vector v,
+       and :math:`x \\cdot y` is the dot product of :math:`x` and :math:`y`.
+
+
+    8. ``Y = cdist(XA, XB, 'hamming')``
+
+       Computes the normalized Hamming distance, or the proportion of
+       those vector elements between two n-vectors ``u`` and ``v``
+       which disagree. To save memory, the matrix ``X`` can be of type
+       boolean.
+
+    9. ``Y = cdist(XA, XB, 'jaccard')``
+
+       Computes the Jaccard distance between the points. Given two
+       vectors, ``u`` and ``v``, the Jaccard distance is the
+       proportion of those elements ``u[i]`` and ``v[i]`` that
+       disagree where at least one of them is non-zero.
+
+    10. ``Y = cdist(XA, XB, 'jensenshannon')``
+
+        Computes the Jensen-Shannon distance between two probability arrays.
+        Given two probability vectors, :math:`p` and :math:`q`, the
+        Jensen-Shannon distance is
+
+        .. math::
+
+           \\sqrt{\\frac{D(p \\parallel m) + D(q \\parallel m)}{2}}
+
+        where :math:`m` is the pointwise mean of :math:`p` and :math:`q`
+        and :math:`D` is the Kullback-Leibler divergence.
+
+    11. ``Y = cdist(XA, XB, 'chebyshev')``
+
+        Computes the Chebyshev distance between the points. The
+        Chebyshev distance between two n-vectors ``u`` and ``v`` is the
+        maximum norm-1 distance between their respective elements. More
+        precisely, the distance is given by
+
+        .. math::
+
+           d(u,v) = \\max_i {|u_i-v_i|}.
+
+    12. ``Y = cdist(XA, XB, 'canberra')``
+
+        Computes the Canberra distance between the points. The
+        Canberra distance between two points ``u`` and ``v`` is
+
+        .. math::
+
+          d(u,v) = \\sum_i \\frac{|u_i-v_i|}
+                               {|u_i|+|v_i|}.
+
+    13. ``Y = cdist(XA, XB, 'braycurtis')``
+
+        Computes the Bray-Curtis distance between the points. The
+        Bray-Curtis distance between two points ``u`` and ``v`` is
+
+
+        .. math::
+
+             d(u,v) = \\frac{\\sum_i (|u_i-v_i|)}
+                           {\\sum_i (|u_i+v_i|)}
+
+    14. ``Y = cdist(XA, XB, 'mahalanobis', VI=None)``
+
+        Computes the Mahalanobis distance between the points. The
+        Mahalanobis distance between two points ``u`` and ``v`` is
+        :math:`\\sqrt{(u-v)(1/V)(u-v)^T}` where :math:`(1/V)` (the ``VI``
+        variable) is the inverse covariance. If ``VI`` is not None,
+        ``VI`` will be used as the inverse covariance matrix.
+
+    15. ``Y = cdist(XA, XB, 'yule')``
+
+        Computes the Yule distance between the boolean
+        vectors. (see `yule` function documentation)
+
+    16. ``Y = cdist(XA, XB, 'matching')``
+
+        Synonym for 'hamming'.
+
+    17. ``Y = cdist(XA, XB, 'dice')``
+
+        Computes the Dice distance between the boolean vectors. (see
+        `dice` function documentation)
+
+    18. ``Y = cdist(XA, XB, 'kulczynski1')``
+
+        Computes the kulczynski distance between the boolean
+        vectors. (see `kulczynski1` function documentation)
+
+        .. deprecated:: 1.15.0
+           This metric is deprecated and will be removed in SciPy 1.17.0.
+           Replace usage of ``cdist(XA, XB, 'kulczynski1')`` with
+           ``1 / cdist(XA, XB, 'jaccard') - 1``.
+
+    19. ``Y = cdist(XA, XB, 'rogerstanimoto')``
+
+        Computes the Rogers-Tanimoto distance between the boolean
+        vectors. (see `rogerstanimoto` function documentation)
+
+    20. ``Y = cdist(XA, XB, 'russellrao')``
+
+        Computes the Russell-Rao distance between the boolean
+        vectors. (see `russellrao` function documentation)
+
+    21. ``Y = cdist(XA, XB, 'sokalmichener')``
+
+        Computes the Sokal-Michener distance between the boolean
+        vectors. (see `sokalmichener` function documentation)
+
+        .. deprecated:: 1.15.0
+           This metric is deprecated and will be removed in SciPy 1.17.0.
+           Replace usage of ``cdist(XA, XB, 'sokalmichener')`` with
+           ``cdist(XA, XB, 'rogerstanimoto')``.
+
+    22. ``Y = cdist(XA, XB, 'sokalsneath')``
+
+        Computes the Sokal-Sneath distance between the vectors. (see
+        `sokalsneath` function documentation)
+
+    23. ``Y = cdist(XA, XB, f)``
+
+        Computes the distance between all pairs of vectors in X
+        using the user supplied 2-arity function f. For example,
+        Euclidean distance between the vectors could be computed
+        as follows::
+
+          dm = cdist(XA, XB, lambda u, v: np.sqrt(((u-v)**2).sum()))
+
+        Note that you should avoid passing a reference to one of
+        the distance functions defined in this library. For example,::
+
+          dm = cdist(XA, XB, sokalsneath)
+
+        would calculate the pair-wise distances between the vectors in
+        X using the Python function `sokalsneath`. This would result in
+        sokalsneath being called :math:`{n \\choose 2}` times, which
+        is inefficient. Instead, the optimized C version is more
+        efficient, and we call it using the following syntax::
+
+          dm = cdist(XA, XB, 'sokalsneath')
+
+    Examples
+    --------
+    Find the Euclidean distances between four 2-D coordinates:
+
+    >>> from scipy.spatial import distance
+    >>> import numpy as np
+    >>> coords = [(35.0456, -85.2672),
+    ...           (35.1174, -89.9711),
+    ...           (35.9728, -83.9422),
+    ...           (36.1667, -86.7833)]
+    >>> distance.cdist(coords, coords, 'euclidean')
+    array([[ 0.    ,  4.7044,  1.6172,  1.8856],
+           [ 4.7044,  0.    ,  6.0893,  3.3561],
+           [ 1.6172,  6.0893,  0.    ,  2.8477],
+           [ 1.8856,  3.3561,  2.8477,  0.    ]])
+
+
+    Find the Manhattan distance from a 3-D point to the corners of the unit
+    cube:
+
+    >>> a = np.array([[0, 0, 0],
+    ...               [0, 0, 1],
+    ...               [0, 1, 0],
+    ...               [0, 1, 1],
+    ...               [1, 0, 0],
+    ...               [1, 0, 1],
+    ...               [1, 1, 0],
+    ...               [1, 1, 1]])
+    >>> b = np.array([[ 0.1,  0.2,  0.4]])
+    >>> distance.cdist(a, b, 'cityblock')
+    array([[ 0.7],
+           [ 0.9],
+           [ 1.3],
+           [ 1.5],
+           [ 1.5],
+           [ 1.7],
+           [ 2.1],
+           [ 2.3]])
+
+    """
+    # You can also call this as:
+    #     Y = cdist(XA, XB, 'test_abc')
+    # where 'abc' is the metric being tested.  This computes the distance
+    # between all pairs of vectors in XA and XB using the distance metric 'abc'
+    # but with a more succinct, verifiable, but less efficient implementation.
+
+    XA = np.asarray(XA)
+    XB = np.asarray(XB)
+
+    s = XA.shape
+    sB = XB.shape
+
+    if len(s) != 2:
+        raise ValueError('XA must be a 2-dimensional array.')
+    if len(sB) != 2:
+        raise ValueError('XB must be a 2-dimensional array.')
+    if s[1] != sB[1]:
+        raise ValueError('XA and XB must have the same number of columns '
+                         '(i.e. feature dimension.)')
+
+    mA = s[0]
+    mB = sB[0]
+    n = s[1]
+
+    if callable(metric):
+        mstr = getattr(metric, '__name__', 'Unknown')
+        metric_info = _METRIC_ALIAS.get(mstr, None)
+        if metric_info is not None:
+            XA, XB, typ, kwargs = _validate_cdist_input(
+                XA, XB, mA, mB, n, metric_info, **kwargs)
+        return _cdist_callable(XA, XB, metric=metric, out=out, **kwargs)
+    elif isinstance(metric, str):
+        mstr = metric.lower()
+        metric_info = _METRIC_ALIAS.get(mstr, None)
+        if metric_info is not None:
+            cdist_fn = metric_info.cdist_func
+            return cdist_fn(XA, XB, out=out, **kwargs)
+        elif mstr.startswith("test_"):
+            metric_info = _TEST_METRICS.get(mstr, None)
+            if metric_info is None:
+                raise ValueError(f'Unknown "Test" Distance Metric: {mstr[5:]}')
+            XA, XB, typ, kwargs = _validate_cdist_input(
+                XA, XB, mA, mB, n, metric_info, **kwargs)
+            return _cdist_callable(
+                XA, XB, metric=metric_info.dist_func, out=out, **kwargs)
+        else:
+            raise ValueError(f'Unknown Distance Metric: {mstr}')
+    else:
+        raise TypeError('2nd argument metric must be a string identifier '
+                        'or a function.')
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.pyi b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ad058effffc500310de9a992e19c5eedf6980d43
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/distance.pyi
@@ -0,0 +1,210 @@
+from typing import (overload, Any, SupportsFloat, Literal, Protocol, SupportsIndex)
+
+import numpy as np
+from numpy.typing import ArrayLike, NDArray
+
+# Anything that can be parsed by `np.float64.__init__` and is thus
+# compatible with `ndarray.__setitem__` (for a float64 array)
+_FloatValue = None | str | bytes | SupportsFloat | SupportsIndex
+
+class _MetricCallback1(Protocol):
+    def __call__(
+        self, __XA: NDArray[Any], __XB: NDArray[Any]
+    ) -> _FloatValue: ...
+
+class _MetricCallback2(Protocol):
+    def __call__(
+        self, __XA: NDArray[Any], __XB: NDArray[Any], **kwargs: Any
+    ) -> _FloatValue: ...
+
+# TODO: Use a single protocol with a parameter specification variable
+# once available (PEP 612)
+_MetricCallback = _MetricCallback1 | _MetricCallback2
+
+_MetricKind = Literal[
+    'braycurtis',
+    'canberra',
+    'chebychev', 'chebyshev', 'cheby', 'cheb', 'ch',
+    'cityblock', 'cblock', 'cb', 'c',
+    'correlation', 'co',
+    'cosine', 'cos',
+    'dice',
+    'euclidean', 'euclid', 'eu', 'e',
+    'hamming', 'hamm', 'ha', 'h',
+    'minkowski', 'mi', 'm', 'pnorm',
+    'jaccard', 'jacc', 'ja', 'j',
+    'jensenshannon', 'js',
+    'kulczynski1',
+    'mahalanobis', 'mahal', 'mah',
+    'rogerstanimoto',
+    'russellrao',
+    'seuclidean', 'se', 's',
+    'sokalmichener',
+    'sokalsneath',
+    'sqeuclidean', 'sqe', 'sqeuclid',
+    'yule',
+]
+
+# Function annotations
+
+def braycurtis(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def canberra(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+# TODO: Add `metric`-specific overloads
+# Returns a float64 or float128 array, depending on the input dtype
+@overload
+def cdist(
+    XA: ArrayLike,
+    XB: ArrayLike,
+    metric: _MetricKind = ...,
+    *,
+    out: None | NDArray[np.floating[Any]] = ...,
+    p: float = ...,
+    w: ArrayLike | None = ...,
+    V: ArrayLike | None = ...,
+    VI: ArrayLike | None = ...,
+) -> NDArray[np.floating[Any]]: ...
+@overload
+def cdist(
+    XA: ArrayLike,
+    XB: ArrayLike,
+    metric: _MetricCallback,
+    *,
+    out: None | NDArray[np.floating[Any]] = ...,
+    **kwargs: Any,
+) -> NDArray[np.floating[Any]]: ...
+
+# TODO: Wait for dtype support; the return type is
+# dependent on the input arrays dtype
+def chebyshev(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> Any: ...
+
+# TODO: Wait for dtype support; the return type is
+# dependent on the input arrays dtype
+def cityblock(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> Any: ...
+
+def correlation(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ..., centered: bool = ...
+) -> np.float64: ...
+
+def cosine(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def dice(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
+
+def directed_hausdorff(
+    u: ArrayLike, v: ArrayLike, seed: int | None = ...
+) -> tuple[float, int, int]: ...
+
+def euclidean(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
+
+def hamming(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def is_valid_dm(
+    D: ArrayLike,
+    tol: float = ...,
+    throw: bool = ...,
+    name: str | None = ...,
+    warning: bool = ...,
+) -> bool: ...
+
+def is_valid_y(
+    y: ArrayLike,
+    warning: bool = ...,
+    throw: bool = ...,
+    name: str | None = ...,
+) -> bool: ...
+
+def jaccard(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def jensenshannon(
+    p: ArrayLike, q: ArrayLike, base: float | None = ...
+) -> np.float64: ...
+
+def kulczynski1(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def mahalanobis(
+    u: ArrayLike, v: ArrayLike, VI: ArrayLike
+) -> np.float64: ...
+
+def minkowski(
+    u: ArrayLike, v: ArrayLike, p: float = ..., w: ArrayLike | None = ...
+) -> float: ...
+
+def num_obs_dm(d: ArrayLike) -> int: ...
+
+def num_obs_y(Y: ArrayLike) -> int: ...
+
+# TODO: Add `metric`-specific overloads
+@overload
+def pdist(
+    X: ArrayLike,
+    metric: _MetricKind = ...,
+    *,
+    out: None | NDArray[np.floating[Any]] = ...,
+    p: float = ...,
+    w: ArrayLike | None = ...,
+    V: ArrayLike | None = ...,
+    VI: ArrayLike | None = ...,
+) -> NDArray[np.floating[Any]]: ...
+@overload
+def pdist(
+    X: ArrayLike,
+    metric: _MetricCallback,
+    *,
+    out: None | NDArray[np.floating[Any]] = ...,
+    **kwargs: Any,
+) -> NDArray[np.floating[Any]]: ...
+
+def seuclidean(
+    u: ArrayLike, v: ArrayLike, V: ArrayLike
+) -> float: ...
+
+def sokalmichener(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
+
+def sokalsneath(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def sqeuclidean(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> np.float64: ...
+
+def squareform(
+    X: ArrayLike,
+    force: Literal["no", "tomatrix", "tovector"] = ...,
+    checks: bool = ...,
+) -> NDArray[Any]: ...
+
+def rogerstanimoto(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
+
+def russellrao(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
+
+def yule(
+    u: ArrayLike, v: ArrayLike, w: ArrayLike | None = ...
+) -> float: ...
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/qhull_src/COPYING.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/qhull_src/COPYING.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4ac02a07f45d562410025f05305c31d1ec39a28c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/qhull_src/COPYING.txt
@@ -0,0 +1,38 @@
+                    Qhull, Copyright (c) 1993-2019
+                    
+                            C.B. Barber
+                           Arlington, MA 
+                          
+                               and
+
+       The National Science and Technology Research Center for
+        Computation and Visualization of Geometric Structures
+                        (The Geometry Center)
+                       University of Minnesota
+
+                       email: qhull@qhull.org
+
+This software includes Qhull from C.B. Barber and The Geometry Center.  
+Qhull is copyrighted as noted above.  Qhull is free software and may 
+be obtained via http from www.qhull.org.  It may be freely copied, modified, 
+and redistributed under the following conditions:
+
+1. All copyright notices must remain intact in all files.
+
+2. A copy of this text file must be distributed along with any copies 
+   of Qhull that you redistribute; this includes copies that you have 
+   modified, or copies of programs or other software products that 
+   include Qhull.
+
+3. If you modify Qhull, you must include a notice giving the
+   name of the person performing the modification, the date of
+   modification, and the reason for such modification.
+
+4. When distributing modified versions of Qhull, or other software 
+   products that include Qhull, you must provide notice that the original 
+   source code may be obtained as noted above.
+
+5. There is no warranty or other guarantee of fitness for Qhull, it is 
+   provided solely "as is".  Bug reports or fixes may be sent to 
+   qhull_bug@qhull.org; the authors may or may not act on them as 
+   they desire.
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X1.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X1.txt
new file mode 100644
index 0000000000000000000000000000000000000000..833d5bdf2a344f585c5f34faa3e22716b1aa363c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X1.txt
@@ -0,0 +1,10 @@
+1.147593763490969421e-01 8.926156143344999849e-01 1.437758624645746330e-02 1.803435962879929022e-02 5.533046214065578949e-01 5.554315640747428118e-01 4.497546637814608950e-02 4.438089247948049376e-01 7.984582810220538507e-01 2.752880789161644692e-01 1.344667112315823809e-01 9.230479561452992199e-01 6.040471462941819913e-01 3.797251652770228247e-01 4.316042735592399149e-01 5.312356915348823705e-01 4.348143005129563310e-01 3.111531488508799681e-01 9.531194313908697424e-04 8.212995023500069269e-02 6.689953269869852726e-01 9.914864535288493430e-01 8.037556036341153565e-01
+9.608925123801395074e-01 2.974451233678974127e-01 9.001110330654185088e-01 5.824163330415995654e-01 7.308574928293812834e-01 2.276154562412870952e-01 7.306791076039623745e-01 8.677244866905511333e-01 9.160806456176984192e-01 6.157216959991280714e-01 5.149053524695440531e-01 3.056427344890983999e-01 9.790557366933895223e-01 4.484995861076724877e-01 4.776550391081165747e-01 7.210436977670631187e-01 9.136399501661039979e-01 4.260275733550000776e-02 5.943900041968954717e-01 3.864571606342745991e-01 9.442027665110838131e-01 4.779949058608601309e-02 6.107551944250865228e-01
+3.297286578103622023e-01 5.980207401936733502e-01 3.673301293561567205e-01 2.585830520887681949e-01 4.660558746104259686e-01 6.083795956610364986e-01 4.535206368070313632e-01 6.873989778785424276e-01 5.130152688495458468e-01 7.665877846542720198e-01 3.444402973525138023e-01 3.583658123644906102e-02 7.924818220986856732e-01 8.746685720522412444e-01 3.010105569182431884e-01 6.012239357385538163e-01 6.233737362204671006e-01 4.830438698668915176e-01 2.317286885842551047e-02 7.585989958123050547e-01 7.108257632278830451e-01 1.551024884178199281e-01 2.665485998155288083e-01
+2.456278068903017253e-02 4.148739837711815648e-01 1.986372227934196655e-01 6.920408530298168825e-01 1.003067576685774398e-01 7.421560456480125190e-01 1.808453980608998313e-01 4.251297882537475870e-01 6.773002683522370004e-01 4.084108792570182445e-01 7.462888013191590897e-01 8.069930220529277776e-01 9.211110587681808903e-01 4.141491046181076108e-01 7.486318689260342829e-01 9.515405507589296263e-01 4.634288892577109742e-03 8.027593488166355762e-01 3.010346805217798405e-01 8.663248877242523127e-01 2.479968181181605447e-01 5.619851096054278017e-01 3.903886764590250857e-01
+7.122019976035700584e-01 6.188878051047785878e-01 7.290897087051201320e-01 6.334802157757637442e-01 5.523084734954342156e-01 5.614937129563645213e-01 2.496741051791574462e-01 5.972227939599233926e-01 1.786590597761109622e-01 2.609525984850900038e-01 7.210438943286010538e-01 2.211429064605652250e-01 9.140497572472672250e-02 1.430242193668443962e-01 7.856446942916397447e-01 4.635256358156553125e-01 5.278744289813760426e-01 3.702808015407184072e-01 5.527073830480792038e-01 6.370732917599846168e-01 9.953487928925482953e-01 3.021789770611936765e-01 3.354901923998221402e-02
+6.509638560895427695e-01 8.387598220902757751e-01 7.761375971745763103e-01 1.481627639227802717e-01 3.529474982902305324e-01 4.883093646287851586e-01 9.652923033658690199e-01 9.500680513565308294e-01 3.061885005078281985e-01 7.271902818906019750e-01 2.358962978196710303e-03 7.359889703223099211e-01 8.988893768074724955e-01 4.135279653937307121e-02 8.516441856688283796e-01 4.889597623270667270e-01 5.575909822114655245e-01 9.010853652261575641e-01 2.912844516556202246e-01 9.088759383368658629e-01 8.104351227460024898e-01 8.080695436776826890e-01 1.430530913253185155e-01
+8.048001196608134400e-01 3.066089444418462762e-02 9.021887554292090661e-01 6.154331491807940591e-02 1.378912575206647784e-02 5.775720193142440673e-01 1.219298963069791464e-01 1.883270243412101808e-01 5.569262398688379356e-02 8.964817777510125651e-02 7.977092785346929782e-01 4.878149375226197293e-01 4.511973131518809410e-02 1.858690046801604323e-01 6.947686471083162063e-01 5.884058794291086025e-01 8.638884676612634816e-01 3.855470871341656336e-01 3.495049047300468059e-01 2.767740932353948136e-01 4.731087031714035218e-01 6.679001673437914288e-01 7.502944200696660682e-01
+6.527328264244687261e-01 8.289483383553154505e-01 9.179741348282299818e-01 1.065639864466713105e-01 6.253616929058514184e-01 5.927750325266062381e-01 3.039157425463192563e-01 2.452766763359194302e-01 6.514027700704632107e-01 5.529218485487964463e-01 4.941158239308394151e-01 6.605306467722642516e-01 2.273688037050677346e-01 4.282616592244774534e-01 2.956128257930247250e-01 1.154803628237965896e-01 9.228220410235263849e-01 6.663525307676617659e-01 1.908852615936970087e-01 9.921383408926374159e-01 4.988716450388516188e-01 1.014900352736023414e-01 3.363930180244284474e-01
+2.914369076275757919e-01 5.196673601143533272e-01 7.420144907858341465e-01 1.768984185504740569e-01 5.296766993228564369e-01 5.922023566159900776e-01 5.965161262020234334e-01 3.810272333046110793e-01 8.368797246118340194e-01 7.896422363801189892e-01 9.655797561098209414e-01 4.430034032346981121e-01 2.780869795706976122e-01 3.047310845416009162e-01 8.051138863500326703e-01 6.731468634690835895e-01 4.743383036815584930e-01 9.530709614322225853e-01 7.753587619850917934e-01 2.801137109357491051e-01 6.182543660889736614e-01 5.005218857766725593e-01 9.071447804755052857e-01
+2.075071644012620453e-01 4.834950086973934802e-01 3.037011473860764532e-01 6.476084284887700937e-01 8.107195771564194020e-01 7.869075869075803364e-01 6.851234019375299633e-01 3.544187468104398331e-02 4.847673235908021017e-01 5.690262846164507726e-01 1.663354142616256803e-01 9.692796809752548537e-01 4.133441725866372485e-01 6.729167604487583665e-01 3.998813427407297283e-01 8.272617414104491695e-01 2.129248316324727774e-01 6.517004761357130249e-01 7.363013506605019520e-01 4.072375306356985636e-01 4.463336683526665238e-01 5.485059309728204102e-01 1.981745754527846071e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X2.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X2.txt
new file mode 100644
index 0000000000000000000000000000000000000000..fc3ea19674ee36856446c75df98b8c17c53ca51f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/cdist-X2.txt
@@ -0,0 +1,20 @@
+7.680465556300619667e-02 4.675022344069014180e-01 8.955498989131543963e-01 3.816236071436276411e-01 1.109030077070989329e-01 2.318928815459808668e-02 7.477394240984251983e-01 1.202289789304434864e-01 8.007290497575981769e-01 6.795195698871731027e-01 6.568225762396605605e-01 2.231475263228478445e-01 7.064624077661341151e-02 1.081656666815267176e-02 1.592069359090128033e-01 1.363392203645097389e-01 9.277020735447568667e-01 8.103136564528209407e-01 5.229467676276455812e-02 7.708020259874025504e-01 6.527954747473352359e-02 5.516397414886525796e-01 3.653371861367954443e-01
+8.144399106025798085e-01 7.731852525462976633e-01 6.909477620673205589e-01 9.696063817000286633e-01 4.297887511677249694e-01 6.989600553425188156e-01 7.310201335033380543e-01 3.135256147868910048e-01 5.715578037275241829e-01 3.935000744675094531e-01 2.057715781268398825e-01 5.892508589665171881e-01 8.512951599236765476e-01 9.569808799061578775e-01 6.164885878024699561e-01 4.714185430004367294e-01 6.128831737628155363e-01 6.641799309623502845e-01 6.001985185338730711e-01 4.231922889723856995e-01 7.605249308075449077e-01 1.064530958018087281e-01 6.306470691957204444e-01
+4.265470127256254518e-01 5.933766716280767239e-01 3.698589270536845053e-02 2.173799740537294412e-01 3.032679325475639009e-01 4.271831790058847611e-01 1.828944535901013690e-01 4.772333422710156592e-01 2.564773455194128138e-01 7.120329875362141347e-01 8.952243430110462530e-01 1.808777012183288013e-01 3.612151871458374464e-01 3.960999167923041631e-01 1.821669970670747318e-02 8.835474857189200559e-01 1.353104648821573663e-01 3.457291739160937016e-01 1.126467375304566199e-01 4.107293162402323450e-01 4.051719311053743056e-01 4.007382985250427243e-01 1.286905671428811848e-01
+2.910657003883979632e-01 9.616259180685315933e-03 2.033032441536681834e-01 1.096599110293863255e-01 4.191101704605176836e-01 5.462131536027151624e-01 8.393047907010142694e-01 9.046805198676335369e-01 7.009863472176891541e-01 2.508215985039629059e-01 6.754410796667598138e-01 6.740895474032024826e-01 1.358993708621679675e-01 8.219861775211464439e-01 6.322220445623235596e-01 2.766813559002430090e-01 6.575983861590951607e-01 9.515869708336625044e-01 8.654526462353933081e-01 3.450245117834797037e-01 5.649032890631299209e-01 4.717687914789682191e-01 3.296483580510030098e-01
+9.172477457635394016e-01 3.057396583041891436e-01 7.335332344225760082e-01 8.370236206345178509e-01 3.765464253115927695e-01 5.089680319287778199e-01 1.202325719268168003e-01 9.717771065272349240e-01 5.907820104019682050e-01 9.809211614977710880e-01 9.064285003671219698e-01 8.848841466121748489e-01 2.043407730734815297e-01 9.157600394927275511e-01 4.532260315147775831e-01 4.241077335005828397e-01 1.751730149568804240e-01 4.090412146081819911e-01 3.632197861847064058e-02 5.832539334970230360e-01 4.041848151536805434e-01 3.603643989086504629e-01 1.838411383882069261e-01
+2.508806403290032572e-01 4.381403985282813496e-01 4.694787405018008286e-02 6.353900562024634713e-01 1.200813444244532846e-01 6.072397042913001419e-01 9.937255904754030977e-01 4.916670237677555066e-01 3.473845913923001572e-01 3.526875922864345370e-01 5.448595548197197047e-01 2.245096010156972799e-01 9.003258279804994269e-01 3.534560469735994470e-01 2.989266066346342177e-01 4.621024982808636938e-01 9.626538866576676012e-01 9.791401720716153001e-01 7.138514287330390840e-01 9.832862333928654719e-01 3.233999591031431198e-01 5.406467224926423398e-01 9.581890295057201579e-01
+5.210583601680578436e-01 4.598159993059653949e-01 2.111497132057748027e-01 5.949977700916546652e-01 6.342618461422359077e-01 9.888228769705599275e-01 6.096770711536318998e-01 7.548431368960863974e-01 7.490858664860100546e-01 3.186213496546415058e-01 7.895687083231245351e-01 4.178326793268141159e-01 8.095818334534051752e-01 7.886271673523481684e-01 4.038905626506847923e-01 3.652649247094948981e-01 8.267205959224892542e-01 6.433617243328785262e-01 3.117681563249452559e-01 9.675995575054980868e-01 3.675673836358472890e-01 5.863757289184046151e-01 9.099029857959717305e-02
+4.024573981231733821e-01 3.578997554002771864e-01 3.519299868071553705e-01 7.417747693762357653e-01 2.963713903285800644e-01 9.602967989298948348e-01 3.811392331739601458e-01 5.493237898295448840e-01 6.835113342793640578e-01 2.304506220807415184e-01 3.727299857731285471e-01 5.450263991912108752e-01 6.951521210987908761e-01 6.474582745861203747e-01 6.316089475403589004e-01 5.672043967425510758e-02 9.034937506977609445e-01 2.332567550780038079e-01 1.096955741449157085e-02 8.870663813493575578e-01 4.384385452180562526e-01 7.100898998169548060e-01 3.245358176196319056e-01
+9.162009194452818139e-01 5.572224742426723498e-02 3.445910686865658601e-01 9.683564008127462097e-01 9.375063149031520604e-01 9.128188852869822956e-02 9.613605414326487075e-01 5.298598697556915482e-01 6.724799695520149445e-01 1.269103938571825019e-02 1.008406153387807480e-01 8.951105272379104028e-01 1.585460318853607609e-01 6.739986455059543413e-01 5.345419321702655768e-01 6.248843899572337213e-01 3.050288488994817859e-01 1.423645553465189284e-01 1.802121190541096096e-01 9.474646822694763326e-01 2.345716438587298613e-01 9.688281784764296578e-01 1.845165243240991515e-01
+2.548297646910531178e-01 2.580877375379494465e-01 1.355482532666937301e-01 6.478812986505504412e-01 9.971695982152032345e-01 2.606721082477282403e-01 5.483439686378906996e-01 4.409612606704470528e-01 4.396442074915688503e-01 7.414262832597111608e-01 7.308840725375539416e-01 8.072095530497225280e-02 6.829509968656330976e-01 5.700030854230387911e-01 3.801845336730320657e-01 2.481059916867158766e-01 3.977295094395927322e-03 5.749480512407895150e-01 4.112033136603401307e-01 8.676159710377848722e-01 9.062646588480167686e-01 3.326691167317923359e-01 8.498307982774666591e-01
+4.464338109330643345e-01 8.546516760817471914e-01 7.384800352329814466e-01 3.692485164984804502e-02 2.915662689505471583e-02 9.010049994217171898e-01 8.622900253010918892e-01 9.786230638032608065e-01 6.546824077297251909e-01 6.342297560006789903e-01 2.230339826582647955e-01 7.658846744185553446e-01 4.603043831539479491e-01 2.017100469861691225e-01 4.891590639893540482e-01 1.937140918314912419e-01 8.161582138652878626e-01 5.597293607114051106e-02 8.423261093326828153e-02 5.105392204475533990e-02 8.234193902673621057e-01 1.784268309975372002e-01 9.118997881986501408e-02
+8.588746913421980711e-01 1.479641118621310980e-02 1.375875301146138874e-01 7.533888774725254756e-01 5.782592791549248101e-01 9.128573037619659436e-01 1.831275762880391067e-01 3.471382864827737835e-01 4.859524740929310749e-02 8.955146541561730400e-01 4.787220791101074457e-01 4.222803577759057791e-01 8.469923964908064873e-01 6.300290047587608910e-02 1.020873237837905956e-01 3.585612487182909813e-02 6.320107119904569970e-01 5.891245970008752719e-01 1.104698053665007507e-01 4.233226558073774903e-01 4.432217054386708988e-01 2.864765416628194394e-01 2.489777211814803159e-02
+5.343810659756068615e-01 4.829076396403546578e-01 8.364480888953172988e-01 8.931374995414760321e-01 6.034161442354715188e-01 3.578336000768178593e-03 4.100579775972763574e-01 3.968667908067096128e-01 5.897163653686778861e-01 3.003241263928478899e-01 2.520935203143799264e-01 3.112129371563532310e-02 9.052865295974613646e-01 1.172285124002711010e-01 4.840001666149388315e-01 3.424620676348436588e-01 5.526057133826853818e-01 6.346139530261846184e-01 5.747945930485597321e-01 1.389915612177697879e-01 2.413801217666421417e-01 7.829900796662081497e-01 7.213528084845653998e-01
+9.384509283406079483e-01 6.303019601671526750e-01 1.787921522728125323e-01 1.556003868047917127e-02 5.662397078816850948e-01 3.437473614806091371e-01 8.615844972800188462e-01 7.624380237306396246e-01 1.096468347898514883e-01 1.276566836610887323e-01 8.479188493443535757e-01 3.634713454428405432e-01 7.478112314318967613e-01 9.856395696968375253e-01 6.250293654177319080e-02 1.919327272501809567e-01 1.415594476031050153e-01 7.224057351041784925e-01 8.452145259310355208e-01 5.434318833772002755e-01 5.177620959731277228e-02 3.358977598185840518e-01 2.542654881527960375e-01
+4.800909104006243489e-01 3.651345393613150137e-01 3.657093052788148446e-01 8.579662326651369408e-01 5.787694361240260932e-01 6.491966196891312268e-01 3.252508517294879775e-01 8.639694334693422961e-01 3.028097078756678551e-01 6.295814666338699350e-01 7.305627351548695803e-01 6.975931849120264872e-03 8.321205159004851915e-01 2.681809305821257761e-01 3.628869474597150591e-01 9.598981434716586936e-01 5.947913523332928332e-01 7.794864238003402779e-01 2.819511239444029149e-01 5.134200958476284882e-01 7.284684743064278045e-01 3.099571109539331903e-01 1.502222882866774967e-01
+2.463382654375219083e-01 4.465700737264240994e-01 7.180855317941433613e-01 5.056099420785193921e-01 6.182117344332578313e-01 2.370453793561340117e-01 9.831748018047525850e-01 6.397098184531551102e-01 8.260469782208745837e-02 7.474671691560941245e-01 9.963429983418570224e-02 5.450078811081275898e-01 5.370188678062637333e-02 2.774024442708808991e-01 2.082643088545442778e-01 2.704155352788065736e-01 7.225035580445194894e-01 4.866791976239246420e-01 1.357043111201584606e-01 7.911335827987711067e-01 7.278977102006007893e-01 6.880892094410231419e-01 1.029231496520791600e-01
+6.901796117735281566e-01 1.558248977395644275e-01 4.241818789360329855e-01 5.055658246392458199e-01 1.756288758075611467e-01 4.215083703818177652e-01 7.809231602323289945e-01 1.170053878686481141e-01 6.497026323614403243e-01 5.733120641440232479e-01 4.407703406152092551e-01 5.608677124532297498e-01 7.471045703286000039e-01 3.334604336022076732e-01 8.927208811415126011e-01 9.794565286182396191e-01 9.621542824973521313e-01 3.945825239405253981e-01 8.338963875792834157e-01 9.310552325082104286e-01 7.688283033784242271e-01 3.798823731047119567e-01 1.459993613028365278e-02
+7.848623555505630511e-01 2.681039365355797344e-03 7.833208051794043891e-01 8.184381915171493604e-01 4.682581645582317709e-01 2.391069309436419932e-01 1.765377537168698607e-01 9.863494676539893424e-01 4.378412300863872009e-01 7.494505491149090481e-01 1.942180356195394308e-01 9.981402467222395547e-01 7.992190944052800505e-01 1.350875702852057936e-01 4.950149186748543650e-01 7.243422481248201761e-01 3.544596746353472216e-01 8.320192561472177228e-01 9.776840296475269865e-01 7.733852731914863110e-01 2.305732998099923048e-01 9.746878189802981041e-01 7.747723331200035979e-01
+6.521099013127149568e-01 5.452399443648201505e-01 8.146707517183656710e-01 3.827256063695345656e-01 7.954832091744263867e-01 7.834427643148527132e-01 9.661317930643520402e-02 9.215673965718058636e-01 4.914305728788055383e-01 4.105628408027649501e-01 9.844647830893304974e-02 3.974831165301851987e-01 3.857608898053827007e-01 5.520210781401946321e-01 3.445787541654143915e-03 4.552922057017416702e-01 7.456544561760444223e-01 4.753985092154335845e-01 2.821385239833401615e-01 7.560136035104459973e-01 8.453142510471420845e-01 6.679627143276523071e-01 6.910882868284401459e-01
+8.526493480446283302e-01 1.183917973068240315e-01 6.163988861865119517e-01 5.751899460059114455e-01 1.638797964925038375e-01 8.214597298784013235e-01 5.424670654187370156e-01 1.806631819658732763e-01 9.268107278221827672e-01 4.127397378597359445e-01 7.529877485901653733e-01 1.714251090083847018e-01 2.601487784245806179e-01 2.028326156742237263e-01 5.299879450122358948e-01 7.587877062981395193e-01 4.070738595375062996e-01 3.546903049793261875e-01 8.695365138547607176e-01 1.447085661525142619e-01 3.193366245820845606e-01 8.797841086211429795e-01 2.666562188639977071e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4d78390c2596beb41b1abff651a729e4e964c36e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/iris.txt
@@ -0,0 +1,150 @@
+5.099999999999999645e+00 3.500000000000000000e+00 1.399999999999999911e+00 2.000000000000000111e-01
+4.900000000000000355e+00 3.000000000000000000e+00 1.399999999999999911e+00 2.000000000000000111e-01
+4.700000000000000178e+00 3.200000000000000178e+00 1.300000000000000044e+00 2.000000000000000111e-01
+4.599999999999999645e+00 3.100000000000000089e+00 1.500000000000000000e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.600000000000000089e+00 1.399999999999999911e+00 2.000000000000000111e-01
+5.400000000000000355e+00 3.899999999999999911e+00 1.699999999999999956e+00 4.000000000000000222e-01
+4.599999999999999645e+00 3.399999999999999911e+00 1.399999999999999911e+00 2.999999999999999889e-01
+5.000000000000000000e+00 3.399999999999999911e+00 1.500000000000000000e+00 2.000000000000000111e-01
+4.400000000000000355e+00 2.899999999999999911e+00 1.399999999999999911e+00 2.000000000000000111e-01
+4.900000000000000355e+00 3.100000000000000089e+00 1.500000000000000000e+00 1.000000000000000056e-01
+5.400000000000000355e+00 3.700000000000000178e+00 1.500000000000000000e+00 2.000000000000000111e-01
+4.799999999999999822e+00 3.399999999999999911e+00 1.600000000000000089e+00 2.000000000000000111e-01
+4.799999999999999822e+00 3.000000000000000000e+00 1.399999999999999911e+00 1.000000000000000056e-01
+4.299999999999999822e+00 3.000000000000000000e+00 1.100000000000000089e+00 1.000000000000000056e-01
+5.799999999999999822e+00 4.000000000000000000e+00 1.199999999999999956e+00 2.000000000000000111e-01
+5.700000000000000178e+00 4.400000000000000355e+00 1.500000000000000000e+00 4.000000000000000222e-01
+5.400000000000000355e+00 3.899999999999999911e+00 1.300000000000000044e+00 4.000000000000000222e-01
+5.099999999999999645e+00 3.500000000000000000e+00 1.399999999999999911e+00 2.999999999999999889e-01
+5.700000000000000178e+00 3.799999999999999822e+00 1.699999999999999956e+00 2.999999999999999889e-01
+5.099999999999999645e+00 3.799999999999999822e+00 1.500000000000000000e+00 2.999999999999999889e-01
+5.400000000000000355e+00 3.399999999999999911e+00 1.699999999999999956e+00 2.000000000000000111e-01
+5.099999999999999645e+00 3.700000000000000178e+00 1.500000000000000000e+00 4.000000000000000222e-01
+4.599999999999999645e+00 3.600000000000000089e+00 1.000000000000000000e+00 2.000000000000000111e-01
+5.099999999999999645e+00 3.299999999999999822e+00 1.699999999999999956e+00 5.000000000000000000e-01
+4.799999999999999822e+00 3.399999999999999911e+00 1.899999999999999911e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.000000000000000000e+00 1.600000000000000089e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.399999999999999911e+00 1.600000000000000089e+00 4.000000000000000222e-01
+5.200000000000000178e+00 3.500000000000000000e+00 1.500000000000000000e+00 2.000000000000000111e-01
+5.200000000000000178e+00 3.399999999999999911e+00 1.399999999999999911e+00 2.000000000000000111e-01
+4.700000000000000178e+00 3.200000000000000178e+00 1.600000000000000089e+00 2.000000000000000111e-01
+4.799999999999999822e+00 3.100000000000000089e+00 1.600000000000000089e+00 2.000000000000000111e-01
+5.400000000000000355e+00 3.399999999999999911e+00 1.500000000000000000e+00 4.000000000000000222e-01
+5.200000000000000178e+00 4.099999999999999645e+00 1.500000000000000000e+00 1.000000000000000056e-01
+5.500000000000000000e+00 4.200000000000000178e+00 1.399999999999999911e+00 2.000000000000000111e-01
+4.900000000000000355e+00 3.100000000000000089e+00 1.500000000000000000e+00 1.000000000000000056e-01
+5.000000000000000000e+00 3.200000000000000178e+00 1.199999999999999956e+00 2.000000000000000111e-01
+5.500000000000000000e+00 3.500000000000000000e+00 1.300000000000000044e+00 2.000000000000000111e-01
+4.900000000000000355e+00 3.100000000000000089e+00 1.500000000000000000e+00 1.000000000000000056e-01
+4.400000000000000355e+00 3.000000000000000000e+00 1.300000000000000044e+00 2.000000000000000111e-01
+5.099999999999999645e+00 3.399999999999999911e+00 1.500000000000000000e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.500000000000000000e+00 1.300000000000000044e+00 2.999999999999999889e-01
+4.500000000000000000e+00 2.299999999999999822e+00 1.300000000000000044e+00 2.999999999999999889e-01
+4.400000000000000355e+00 3.200000000000000178e+00 1.300000000000000044e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.500000000000000000e+00 1.600000000000000089e+00 5.999999999999999778e-01
+5.099999999999999645e+00 3.799999999999999822e+00 1.899999999999999911e+00 4.000000000000000222e-01
+4.799999999999999822e+00 3.000000000000000000e+00 1.399999999999999911e+00 2.999999999999999889e-01
+5.099999999999999645e+00 3.799999999999999822e+00 1.600000000000000089e+00 2.000000000000000111e-01
+4.599999999999999645e+00 3.200000000000000178e+00 1.399999999999999911e+00 2.000000000000000111e-01
+5.299999999999999822e+00 3.700000000000000178e+00 1.500000000000000000e+00 2.000000000000000111e-01
+5.000000000000000000e+00 3.299999999999999822e+00 1.399999999999999911e+00 2.000000000000000111e-01
+7.000000000000000000e+00 3.200000000000000178e+00 4.700000000000000178e+00 1.399999999999999911e+00
+6.400000000000000355e+00 3.200000000000000178e+00 4.500000000000000000e+00 1.500000000000000000e+00
+6.900000000000000355e+00 3.100000000000000089e+00 4.900000000000000355e+00 1.500000000000000000e+00
+5.500000000000000000e+00 2.299999999999999822e+00 4.000000000000000000e+00 1.300000000000000044e+00
+6.500000000000000000e+00 2.799999999999999822e+00 4.599999999999999645e+00 1.500000000000000000e+00
+5.700000000000000178e+00 2.799999999999999822e+00 4.500000000000000000e+00 1.300000000000000044e+00
+6.299999999999999822e+00 3.299999999999999822e+00 4.700000000000000178e+00 1.600000000000000089e+00
+4.900000000000000355e+00 2.399999999999999911e+00 3.299999999999999822e+00 1.000000000000000000e+00
+6.599999999999999645e+00 2.899999999999999911e+00 4.599999999999999645e+00 1.300000000000000044e+00
+5.200000000000000178e+00 2.700000000000000178e+00 3.899999999999999911e+00 1.399999999999999911e+00
+5.000000000000000000e+00 2.000000000000000000e+00 3.500000000000000000e+00 1.000000000000000000e+00
+5.900000000000000355e+00 3.000000000000000000e+00 4.200000000000000178e+00 1.500000000000000000e+00
+6.000000000000000000e+00 2.200000000000000178e+00 4.000000000000000000e+00 1.000000000000000000e+00
+6.099999999999999645e+00 2.899999999999999911e+00 4.700000000000000178e+00 1.399999999999999911e+00
+5.599999999999999645e+00 2.899999999999999911e+00 3.600000000000000089e+00 1.300000000000000044e+00
+6.700000000000000178e+00 3.100000000000000089e+00 4.400000000000000355e+00 1.399999999999999911e+00
+5.599999999999999645e+00 3.000000000000000000e+00 4.500000000000000000e+00 1.500000000000000000e+00
+5.799999999999999822e+00 2.700000000000000178e+00 4.099999999999999645e+00 1.000000000000000000e+00
+6.200000000000000178e+00 2.200000000000000178e+00 4.500000000000000000e+00 1.500000000000000000e+00
+5.599999999999999645e+00 2.500000000000000000e+00 3.899999999999999911e+00 1.100000000000000089e+00
+5.900000000000000355e+00 3.200000000000000178e+00 4.799999999999999822e+00 1.800000000000000044e+00
+6.099999999999999645e+00 2.799999999999999822e+00 4.000000000000000000e+00 1.300000000000000044e+00
+6.299999999999999822e+00 2.500000000000000000e+00 4.900000000000000355e+00 1.500000000000000000e+00
+6.099999999999999645e+00 2.799999999999999822e+00 4.700000000000000178e+00 1.199999999999999956e+00
+6.400000000000000355e+00 2.899999999999999911e+00 4.299999999999999822e+00 1.300000000000000044e+00
+6.599999999999999645e+00 3.000000000000000000e+00 4.400000000000000355e+00 1.399999999999999911e+00
+6.799999999999999822e+00 2.799999999999999822e+00 4.799999999999999822e+00 1.399999999999999911e+00
+6.700000000000000178e+00 3.000000000000000000e+00 5.000000000000000000e+00 1.699999999999999956e+00
+6.000000000000000000e+00 2.899999999999999911e+00 4.500000000000000000e+00 1.500000000000000000e+00
+5.700000000000000178e+00 2.600000000000000089e+00 3.500000000000000000e+00 1.000000000000000000e+00
+5.500000000000000000e+00 2.399999999999999911e+00 3.799999999999999822e+00 1.100000000000000089e+00
+5.500000000000000000e+00 2.399999999999999911e+00 3.700000000000000178e+00 1.000000000000000000e+00
+5.799999999999999822e+00 2.700000000000000178e+00 3.899999999999999911e+00 1.199999999999999956e+00
+6.000000000000000000e+00 2.700000000000000178e+00 5.099999999999999645e+00 1.600000000000000089e+00
+5.400000000000000355e+00 3.000000000000000000e+00 4.500000000000000000e+00 1.500000000000000000e+00
+6.000000000000000000e+00 3.399999999999999911e+00 4.500000000000000000e+00 1.600000000000000089e+00
+6.700000000000000178e+00 3.100000000000000089e+00 4.700000000000000178e+00 1.500000000000000000e+00
+6.299999999999999822e+00 2.299999999999999822e+00 4.400000000000000355e+00 1.300000000000000044e+00
+5.599999999999999645e+00 3.000000000000000000e+00 4.099999999999999645e+00 1.300000000000000044e+00
+5.500000000000000000e+00 2.500000000000000000e+00 4.000000000000000000e+00 1.300000000000000044e+00
+5.500000000000000000e+00 2.600000000000000089e+00 4.400000000000000355e+00 1.199999999999999956e+00
+6.099999999999999645e+00 3.000000000000000000e+00 4.599999999999999645e+00 1.399999999999999911e+00
+5.799999999999999822e+00 2.600000000000000089e+00 4.000000000000000000e+00 1.199999999999999956e+00
+5.000000000000000000e+00 2.299999999999999822e+00 3.299999999999999822e+00 1.000000000000000000e+00
+5.599999999999999645e+00 2.700000000000000178e+00 4.200000000000000178e+00 1.300000000000000044e+00
+5.700000000000000178e+00 3.000000000000000000e+00 4.200000000000000178e+00 1.199999999999999956e+00
+5.700000000000000178e+00 2.899999999999999911e+00 4.200000000000000178e+00 1.300000000000000044e+00
+6.200000000000000178e+00 2.899999999999999911e+00 4.299999999999999822e+00 1.300000000000000044e+00
+5.099999999999999645e+00 2.500000000000000000e+00 3.000000000000000000e+00 1.100000000000000089e+00
+5.700000000000000178e+00 2.799999999999999822e+00 4.099999999999999645e+00 1.300000000000000044e+00
+6.299999999999999822e+00 3.299999999999999822e+00 6.000000000000000000e+00 2.500000000000000000e+00
+5.799999999999999822e+00 2.700000000000000178e+00 5.099999999999999645e+00 1.899999999999999911e+00
+7.099999999999999645e+00 3.000000000000000000e+00 5.900000000000000355e+00 2.100000000000000089e+00
+6.299999999999999822e+00 2.899999999999999911e+00 5.599999999999999645e+00 1.800000000000000044e+00
+6.500000000000000000e+00 3.000000000000000000e+00 5.799999999999999822e+00 2.200000000000000178e+00
+7.599999999999999645e+00 3.000000000000000000e+00 6.599999999999999645e+00 2.100000000000000089e+00
+4.900000000000000355e+00 2.500000000000000000e+00 4.500000000000000000e+00 1.699999999999999956e+00
+7.299999999999999822e+00 2.899999999999999911e+00 6.299999999999999822e+00 1.800000000000000044e+00
+6.700000000000000178e+00 2.500000000000000000e+00 5.799999999999999822e+00 1.800000000000000044e+00
+7.200000000000000178e+00 3.600000000000000089e+00 6.099999999999999645e+00 2.500000000000000000e+00
+6.500000000000000000e+00 3.200000000000000178e+00 5.099999999999999645e+00 2.000000000000000000e+00
+6.400000000000000355e+00 2.700000000000000178e+00 5.299999999999999822e+00 1.899999999999999911e+00
+6.799999999999999822e+00 3.000000000000000000e+00 5.500000000000000000e+00 2.100000000000000089e+00
+5.700000000000000178e+00 2.500000000000000000e+00 5.000000000000000000e+00 2.000000000000000000e+00
+5.799999999999999822e+00 2.799999999999999822e+00 5.099999999999999645e+00 2.399999999999999911e+00
+6.400000000000000355e+00 3.200000000000000178e+00 5.299999999999999822e+00 2.299999999999999822e+00
+6.500000000000000000e+00 3.000000000000000000e+00 5.500000000000000000e+00 1.800000000000000044e+00
+7.700000000000000178e+00 3.799999999999999822e+00 6.700000000000000178e+00 2.200000000000000178e+00
+7.700000000000000178e+00 2.600000000000000089e+00 6.900000000000000355e+00 2.299999999999999822e+00
+6.000000000000000000e+00 2.200000000000000178e+00 5.000000000000000000e+00 1.500000000000000000e+00
+6.900000000000000355e+00 3.200000000000000178e+00 5.700000000000000178e+00 2.299999999999999822e+00
+5.599999999999999645e+00 2.799999999999999822e+00 4.900000000000000355e+00 2.000000000000000000e+00
+7.700000000000000178e+00 2.799999999999999822e+00 6.700000000000000178e+00 2.000000000000000000e+00
+6.299999999999999822e+00 2.700000000000000178e+00 4.900000000000000355e+00 1.800000000000000044e+00
+6.700000000000000178e+00 3.299999999999999822e+00 5.700000000000000178e+00 2.100000000000000089e+00
+7.200000000000000178e+00 3.200000000000000178e+00 6.000000000000000000e+00 1.800000000000000044e+00
+6.200000000000000178e+00 2.799999999999999822e+00 4.799999999999999822e+00 1.800000000000000044e+00
+6.099999999999999645e+00 3.000000000000000000e+00 4.900000000000000355e+00 1.800000000000000044e+00
+6.400000000000000355e+00 2.799999999999999822e+00 5.599999999999999645e+00 2.100000000000000089e+00
+7.200000000000000178e+00 3.000000000000000000e+00 5.799999999999999822e+00 1.600000000000000089e+00
+7.400000000000000355e+00 2.799999999999999822e+00 6.099999999999999645e+00 1.899999999999999911e+00
+7.900000000000000355e+00 3.799999999999999822e+00 6.400000000000000355e+00 2.000000000000000000e+00
+6.400000000000000355e+00 2.799999999999999822e+00 5.599999999999999645e+00 2.200000000000000178e+00
+6.299999999999999822e+00 2.799999999999999822e+00 5.099999999999999645e+00 1.500000000000000000e+00
+6.099999999999999645e+00 2.600000000000000089e+00 5.599999999999999645e+00 1.399999999999999911e+00
+7.700000000000000178e+00 3.000000000000000000e+00 6.099999999999999645e+00 2.299999999999999822e+00
+6.299999999999999822e+00 3.399999999999999911e+00 5.599999999999999645e+00 2.399999999999999911e+00
+6.400000000000000355e+00 3.100000000000000089e+00 5.500000000000000000e+00 1.800000000000000044e+00
+6.000000000000000000e+00 3.000000000000000000e+00 4.799999999999999822e+00 1.800000000000000044e+00
+6.900000000000000355e+00 3.100000000000000089e+00 5.400000000000000355e+00 2.100000000000000089e+00
+6.700000000000000178e+00 3.100000000000000089e+00 5.599999999999999645e+00 2.399999999999999911e+00
+6.900000000000000355e+00 3.100000000000000089e+00 5.099999999999999645e+00 2.299999999999999822e+00
+5.799999999999999822e+00 2.700000000000000178e+00 5.099999999999999645e+00 1.899999999999999911e+00
+6.799999999999999822e+00 3.200000000000000178e+00 5.900000000000000355e+00 2.299999999999999822e+00
+6.700000000000000178e+00 3.299999999999999822e+00 5.700000000000000178e+00 2.500000000000000000e+00
+6.700000000000000178e+00 3.000000000000000000e+00 5.200000000000000178e+00 2.299999999999999822e+00
+6.299999999999999822e+00 2.500000000000000000e+00 5.000000000000000000e+00 1.899999999999999911e+00
+6.500000000000000000e+00 3.000000000000000000e+00 5.200000000000000178e+00 2.000000000000000000e+00
+6.200000000000000178e+00 3.399999999999999911e+00 5.400000000000000355e+00 2.299999999999999822e+00
+5.900000000000000355e+00 3.000000000000000000e+00 5.099999999999999645e+00 1.800000000000000044e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-boolean-inp.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-boolean-inp.txt
new file mode 100644
index 0000000000000000000000000000000000000000..0636cc9f4590f2e960f7136d83a5d2cb07c56536
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-boolean-inp.txt
@@ -0,0 +1,20 @@
+1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00
+1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..0aff1267ca7fd6f41d38c2273540bb771e9cbd0c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt
@@ -0,0 +1 @@
+   5.0000000e-01   4.0000000e-01   5.0000000e-01   1.0000000e-01   4.0000000e-01   5.0000000e-01   1.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   8.0000000e-01   7.0000000e-01   9.0000000e-01   4.0000000e-01   1.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   2.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   2.0000000e-01   1.0000000e-01   1.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e-01   1.0000000e-01   1.2000000e+00   7.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   2.0000000e-01   2.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   2.0000000e-01   3.0000000e-01   6.0000000e-01   9.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   1.0000000e-01   7.0000000e-01   4.0000000e-01   1.0000000e-01   6.0000000e-01   1.0000000e+00   1.4000000e+00   9.0000000e-01   5.0000000e-01   8.0000000e-01   8.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   3.0000000e-01   5.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   2.0000000e-01   2.0000000e-01   5.0000000e-01   1.1000000e+00   1.2000000e+00   1.0000000e-01   2.0000000e-01   6.0000000e-01   1.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e-01   8.0000000e-01   3.0000000e-01   7.0000000e-01   3.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   2.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   3.0000000e-01   3.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   1.1000000e+00   1.2000000e+00   7.0000000e-01   4.0000000e-01   1.0000000e+00   6.0000000e-01   7.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   7.0000000e-01   9.0000000e-01   1.0000000e+00   2.0000000e-01   3.0000000e-01   8.0000000e-01   2.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   9.0000000e-01   3.0000000e-01   4.0000000e-01   6.0000000e-01   2.0000000e-01   6.0000000e-01   1.0000000e-01   6.0000000e-01   3.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   5.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   2.0000000e-01   3.0000000e-01   8.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   1.2000000e+00   1.3000000e+00   8.0000000e-01   5.0000000e-01   1.1000000e+00   7.0000000e-01   8.0000000e-01   6.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   1.0000000e-01   2.0000000e-01   8.0000000e-01   1.0000000e+00   1.1000000e+00   3.0000000e-01   4.0000000e-01   9.0000000e-01   3.0000000e-01   2.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   2.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   1.0000000e-01   7.0000000e-01   4.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   4.0000000e-01   4.0000000e-01   2.0000000e-01   7.0000000e-01   5.0000000e-01   4.0000000e-01   2.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   8.0000000e-01   4.0000000e-01   1.0000000e-01   7.0000000e-01   2.0000000e-01   4.0000000e-01   2.0000000e-01   4.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   2.0000000e-01   2.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   2.0000000e-01   1.0000000e-01   1.3000000e+00   6.0000000e-01   4.0000000e-01   5.0000000e-01   6.0000000e-01   2.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   8.0000000e-01   5.0000000e-01   1.0000000e+00   8.0000000e-01   2.0000000e-01   6.0000000e-01   9.0000000e-01   1.1000000e+00   5.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   7.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   4.0000000e-01   1.6000000e+00   1.0000000e+00   4.0000000e-01   3.0000000e-01   9.0000000e-01   3.0000000e-01   8.0000000e-01   2.0000000e-01   6.0000000e-01   3.0000000e+00   2.8000000e+00   3.2000000e+00   2.3000000e+00   2.9000000e+00   2.8000000e+00   3.0000000e+00   1.6000000e+00   2.9000000e+00   2.2000000e+00   1.9000000e+00   2.5000000e+00   2.3000000e+00   3.0000000e+00   1.9000000e+00   2.7000000e+00   2.8000000e+00   2.4000000e+00   2.8000000e+00   2.2000000e+00   3.1000000e+00   2.3000000e+00   3.2000000e+00   3.0000000e+00   2.6000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.8000000e+00   1.8000000e+00   2.1000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.7000000e+00   2.4000000e+00   2.3000000e+00   2.7000000e+00   2.9000000e+00   2.3000000e+00   1.6000000e+00   2.5000000e+00   2.5000000e+00   2.5000000e+00   2.6000000e+00   1.4000000e+00   2.4000000e+00   4.3000000e+00   3.4000000e+00   4.2000000e+00   3.9000000e+00   4.1000000e+00   4.9000000e+00   2.8000000e+00   4.6000000e+00   4.1000000e+00   4.4000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   5.0000000e+00   5.2000000e+00   3.3000000e+00   4.0000000e+00   3.2000000e+00   5.0000000e+00   3.2000000e+00   4.0000000e+00   4.3000000e+00   3.1000000e+00   3.2000000e+00   3.9000000e+00   4.1000000e+00   4.4000000e+00   4.7000000e+00   3.9000000e+00   3.4000000e+00   3.9000000e+00   4.4000000e+00   3.9000000e+00   3.8000000e+00   3.1000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.4000000e+00   4.2000000e+00   4.0000000e+00   3.5000000e+00   3.3000000e+00   3.5000000e+00   3.7000000e+00   3.4000000e+00   4.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   2.0000000e-01   4.0000000e-01   4.0000000e-01   1.2000000e+00   1.1000000e+00   8.0000000e-01   5.0000000e-01   1.1000000e+00   5.0000000e-01   8.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   2.0000000e-01   3.0000000e-01   8.0000000e-01   7.0000000e-01   9.0000000e-01   3.0000000e-01   4.0000000e-01   9.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   1.1000000e+00   2.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   2.0000000e-01   7.0000000e-01   4.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   6.0000000e-01   3.0000000e-01   4.0000000e-01   2.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   1.0000000e-01   7.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   5.0000000e-01   3.0000000e-01   4.0000000e-01   4.0000000e-01   2.0000000e-01   2.0000000e-01   2.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   3.0000000e-01   6.0000000e-01   1.0000000e-01   2.0000000e-01   1.1000000e+00   6.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   1.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   5.0000000e-01   1.0000000e+00   5.0000000e-01   4.0000000e-01   3.0000000e-01   1.4000000e+00   1.5000000e+00   1.0000000e+00   7.0000000e-01   1.3000000e+00   9.0000000e-01   1.0000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   8.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   1.0000000e+00   1.2000000e+00   1.3000000e+00   5.0000000e-01   6.0000000e-01   1.1000000e+00   5.0000000e-01   1.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   6.0000000e-01   9.0000000e-01   4.0000000e-01   9.0000000e-01   3.0000000e-01   9.0000000e-01   6.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   6.0000000e-01   3.0000000e-01   1.0000000e-01   6.0000000e-01   9.0000000e-01   1.3000000e+00   8.0000000e-01   4.0000000e-01   8.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   1.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   1.0000000e-01   5.0000000e-01   1.0000000e+00   1.1000000e+00   0.0000000e+00   3.0000000e-01   6.0000000e-01   0.0000000e+00   5.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   6.0000000e-01   2.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   6.0000000e-01   7.0000000e-01   1.1000000e+00   4.0000000e-01   7.0000000e-01   2.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   2.0000000e-01   3.0000000e-01   7.0000000e-01   6.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   2.0000000e-01   6.0000000e-01   1.0000000e+00   3.0000000e-01   4.0000000e-01   1.4000000e+00   1.0000000e+00   4.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   8.0000000e-01   1.0000000e-01   4.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   4.0000000e-01   5.0000000e-01   1.0000000e+00   1.0000000e+00   6.0000000e-01   3.0000000e-01   9.0000000e-01   4.0000000e-01   6.0000000e-01   3.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   2.0000000e-01   4.0000000e-01   4.0000000e-01   2.0000000e-01   3.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   1.1000000e+00   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   2.0000000e-01   5.0000000e-01   2.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   5.0000000e-01   1.0000000e+00   1.4000000e+00   9.0000000e-01   5.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   2.0000000e-01   2.0000000e-01   6.0000000e-01   1.1000000e+00   1.2000000e+00   1.0000000e-01   2.0000000e-01   7.0000000e-01   1.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   4.0000000e-01   5.0000000e-01   8.0000000e-01   2.0000000e-01   8.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   1.5000000e+00   1.4000000e+00   1.1000000e+00   8.0000000e-01   1.4000000e+00   8.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   8.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   9.0000000e-01   9.0000000e-01   5.0000000e-01   5.0000000e-01   1.1000000e+00   1.1000000e+00   1.2000000e+00   6.0000000e-01   7.0000000e-01   1.2000000e+00   6.0000000e-01   2.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   8.0000000e-01   3.0000000e-01   1.0000000e+00   7.0000000e-01   3.6000000e+00   3.4000000e+00   3.8000000e+00   2.9000000e+00   3.5000000e+00   3.4000000e+00   3.6000000e+00   2.2000000e+00   3.5000000e+00   2.8000000e+00   2.4000000e+00   3.1000000e+00   2.9000000e+00   3.6000000e+00   2.5000000e+00   3.3000000e+00   3.4000000e+00   3.0000000e+00   3.4000000e+00   2.8000000e+00   3.7000000e+00   2.9000000e+00   3.8000000e+00   3.6000000e+00   3.2000000e+00   3.3000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   2.4000000e+00   2.7000000e+00   2.6000000e+00   2.8000000e+00   4.0000000e+00   3.4000000e+00   3.4000000e+00   3.6000000e+00   3.3000000e+00   3.0000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   2.9000000e+00   2.2000000e+00   3.1000000e+00   3.1000000e+00   3.1000000e+00   3.2000000e+00   1.9000000e+00   3.0000000e+00   4.9000000e+00   4.0000000e+00   4.8000000e+00   4.5000000e+00   4.7000000e+00   5.5000000e+00   3.4000000e+00   5.2000000e+00   4.7000000e+00   5.0000000e+00   4.0000000e+00   4.2000000e+00   4.4000000e+00   3.9000000e+00   4.0000000e+00   4.2000000e+00   4.4000000e+00   5.6000000e+00   5.8000000e+00   3.9000000e+00   4.6000000e+00   3.8000000e+00   5.6000000e+00   3.8000000e+00   4.6000000e+00   4.9000000e+00   3.7000000e+00   3.8000000e+00   4.5000000e+00   4.7000000e+00   5.0000000e+00   5.3000000e+00   4.5000000e+00   4.0000000e+00   4.5000000e+00   5.0000000e+00   4.5000000e+00   4.4000000e+00   3.7000000e+00   4.3000000e+00   4.5000000e+00   4.0000000e+00   4.0000000e+00   4.8000000e+00   4.6000000e+00   4.1000000e+00   3.9000000e+00   4.1000000e+00   4.3000000e+00   4.0000000e+00   4.0000000e-01   4.0000000e-01   7.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   7.0000000e-01   1.2000000e+00   7.0000000e-01   1.0000000e+00   1.0000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   1.1000000e+00   1.0000000e+00   6.0000000e-01   6.0000000e-01   3.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   9.0000000e-01   1.4000000e+00   7.0000000e-01   8.0000000e-01   1.7000000e+00   1.4000000e+00   8.0000000e-01   7.0000000e-01   1.0000000e+00   7.0000000e-01   1.2000000e+00   5.0000000e-01   8.0000000e-01   3.5000000e+00   3.3000000e+00   3.7000000e+00   2.8000000e+00   3.4000000e+00   3.3000000e+00   3.5000000e+00   2.1000000e+00   3.4000000e+00   2.7000000e+00   2.3000000e+00   3.0000000e+00   2.8000000e+00   3.5000000e+00   2.4000000e+00   3.2000000e+00   3.3000000e+00   2.9000000e+00   3.3000000e+00   2.7000000e+00   3.6000000e+00   2.8000000e+00   3.7000000e+00   3.5000000e+00   3.1000000e+00   3.2000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   2.3000000e+00   2.6000000e+00   2.5000000e+00   2.7000000e+00   3.9000000e+00   3.3000000e+00   3.3000000e+00   3.5000000e+00   3.2000000e+00   2.9000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.8000000e+00   2.1000000e+00   3.0000000e+00   3.0000000e+00   3.0000000e+00   3.1000000e+00   1.8000000e+00   2.9000000e+00   4.8000000e+00   3.9000000e+00   4.7000000e+00   4.4000000e+00   4.6000000e+00   5.4000000e+00   3.3000000e+00   5.1000000e+00   4.6000000e+00   4.9000000e+00   3.9000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.9000000e+00   4.1000000e+00   4.3000000e+00   5.5000000e+00   5.7000000e+00   3.8000000e+00   4.5000000e+00   3.7000000e+00   5.5000000e+00   3.7000000e+00   4.5000000e+00   4.8000000e+00   3.6000000e+00   3.7000000e+00   4.4000000e+00   4.6000000e+00   4.9000000e+00   5.2000000e+00   4.4000000e+00   3.9000000e+00   4.4000000e+00   4.9000000e+00   4.4000000e+00   4.3000000e+00   3.6000000e+00   4.2000000e+00   4.4000000e+00   3.9000000e+00   3.9000000e+00   4.7000000e+00   4.5000000e+00   4.0000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.9000000e+00   5.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   1.0000000e+00   7.0000000e-01   1.1000000e+00   1.1000000e+00   1.0000000e+00   1.4000000e+00   1.0000000e+00   9.0000000e-01   1.0000000e+00   1.2000000e+00   1.3000000e+00   1.0000000e+00   5.0000000e-01   2.0000000e-01   1.3000000e+00   1.2000000e+00   9.0000000e-01   1.3000000e+00   1.4000000e+00   1.0000000e+00   9.0000000e-01   2.1000000e+00   1.3000000e+00   9.0000000e-01   6.0000000e-01   1.4000000e+00   6.0000000e-01   1.2000000e+00   7.0000000e-01   1.1000000e+00   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   2.0000000e+00   3.1000000e+00   2.4000000e+00   2.4000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   2.1000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.9000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   4.0000000e-01   4.0000000e-01   3.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   7.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   4.0000000e-01   1.6000000e+00   1.0000000e+00   4.0000000e-01   6.0000000e-01   9.0000000e-01   3.0000000e-01   8.0000000e-01   2.0000000e-01   6.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   6.0000000e-01   3.0000000e-01   3.0000000e-01   2.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   2.0000000e-01   1.0000000e-01   1.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e-01   1.0000000e-01   1.2000000e+00   7.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   2.0000000e-01   2.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   6.0000000e-01   4.0000000e-01   6.0000000e-01   1.1000000e+00   6.0000000e-01   9.0000000e-01   8.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   1.0000000e+00   9.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   7.0000000e-01   4.0000000e-01   8.0000000e-01   1.3000000e+00   6.0000000e-01   7.0000000e-01   1.5000000e+00   1.3000000e+00   7.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   1.1000000e+00   4.0000000e-01   7.0000000e-01   3.0000000e+00   2.8000000e+00   3.2000000e+00   2.3000000e+00   2.9000000e+00   2.8000000e+00   3.0000000e+00   1.6000000e+00   2.9000000e+00   2.2000000e+00   1.8000000e+00   2.5000000e+00   2.3000000e+00   3.0000000e+00   1.9000000e+00   2.7000000e+00   2.8000000e+00   2.4000000e+00   2.8000000e+00   2.2000000e+00   3.1000000e+00   2.3000000e+00   3.2000000e+00   3.0000000e+00   2.6000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.8000000e+00   1.8000000e+00   2.1000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.7000000e+00   2.4000000e+00   2.3000000e+00   2.7000000e+00   2.9000000e+00   2.3000000e+00   1.6000000e+00   2.5000000e+00   2.5000000e+00   2.5000000e+00   2.6000000e+00   1.3000000e+00   2.4000000e+00   4.3000000e+00   3.4000000e+00   4.2000000e+00   3.9000000e+00   4.1000000e+00   4.9000000e+00   2.8000000e+00   4.6000000e+00   4.1000000e+00   4.4000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   5.0000000e+00   5.2000000e+00   3.3000000e+00   4.0000000e+00   3.2000000e+00   5.0000000e+00   3.2000000e+00   4.0000000e+00   4.3000000e+00   3.1000000e+00   3.2000000e+00   3.9000000e+00   4.1000000e+00   4.4000000e+00   4.7000000e+00   3.9000000e+00   3.4000000e+00   3.9000000e+00   4.4000000e+00   3.9000000e+00   3.8000000e+00   3.1000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.4000000e+00   4.2000000e+00   4.0000000e+00   3.5000000e+00   3.3000000e+00   3.5000000e+00   3.7000000e+00   3.4000000e+00   4.0000000e-01   1.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   7.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   4.0000000e-01   3.0000000e-01   1.5000000e+00   7.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e-01   6.0000000e-01   2.0000000e-01   5.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   3.0000000e-01   8.0000000e-01   3.0000000e-01   6.0000000e-01   4.0000000e-01   4.0000000e-01   2.0000000e-01   3.0000000e-01   7.0000000e-01   6.0000000e-01   2.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   1.0000000e+00   3.0000000e-01   4.0000000e-01   1.1000000e+00   1.0000000e+00   4.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e+00   2.8000000e+00   3.2000000e+00   2.3000000e+00   2.9000000e+00   2.8000000e+00   3.0000000e+00   1.6000000e+00   2.9000000e+00   2.2000000e+00   1.8000000e+00   2.5000000e+00   2.3000000e+00   3.0000000e+00   1.9000000e+00   2.7000000e+00   2.8000000e+00   2.4000000e+00   2.8000000e+00   2.2000000e+00   3.1000000e+00   2.3000000e+00   3.2000000e+00   3.0000000e+00   2.6000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.8000000e+00   1.8000000e+00   2.1000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.7000000e+00   2.4000000e+00   2.3000000e+00   2.7000000e+00   2.9000000e+00   2.3000000e+00   1.6000000e+00   2.5000000e+00   2.5000000e+00   2.5000000e+00   2.6000000e+00   1.3000000e+00   2.4000000e+00   4.3000000e+00   3.4000000e+00   4.2000000e+00   3.9000000e+00   4.1000000e+00   4.9000000e+00   2.8000000e+00   4.6000000e+00   4.1000000e+00   4.4000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   5.0000000e+00   5.2000000e+00   3.3000000e+00   4.0000000e+00   3.2000000e+00   5.0000000e+00   3.2000000e+00   4.0000000e+00   4.3000000e+00   3.1000000e+00   3.2000000e+00   3.9000000e+00   4.1000000e+00   4.4000000e+00   4.7000000e+00   3.9000000e+00   3.4000000e+00   3.9000000e+00   4.4000000e+00   3.9000000e+00   3.8000000e+00   3.1000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.4000000e+00   4.2000000e+00   4.0000000e+00   3.5000000e+00   3.3000000e+00   3.5000000e+00   3.7000000e+00   3.4000000e+00   5.0000000e-01   4.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   2.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   3.0000000e-01   2.0000000e-01   1.4000000e+00   7.0000000e-01   2.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   5.0000000e-01   2.0000000e-01   4.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   7.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   9.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   4.0000000e-01   1.3000000e+00   4.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   4.0000000e-01   3.7000000e+00   3.5000000e+00   3.9000000e+00   3.0000000e+00   3.6000000e+00   3.5000000e+00   3.7000000e+00   2.3000000e+00   3.6000000e+00   2.9000000e+00   2.5000000e+00   3.2000000e+00   3.0000000e+00   3.7000000e+00   2.6000000e+00   3.4000000e+00   3.5000000e+00   3.1000000e+00   3.5000000e+00   2.9000000e+00   3.8000000e+00   3.0000000e+00   3.9000000e+00   3.7000000e+00   3.3000000e+00   3.4000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   2.5000000e+00   2.8000000e+00   2.7000000e+00   2.9000000e+00   4.1000000e+00   3.5000000e+00   3.5000000e+00   3.7000000e+00   3.4000000e+00   3.1000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.0000000e+00   2.3000000e+00   3.2000000e+00   3.2000000e+00   3.2000000e+00   3.3000000e+00   2.0000000e+00   3.1000000e+00   5.0000000e+00   4.1000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.6000000e+00   3.5000000e+00   5.3000000e+00   4.8000000e+00   5.1000000e+00   4.1000000e+00   4.3000000e+00   4.5000000e+00   4.0000000e+00   4.1000000e+00   4.3000000e+00   4.5000000e+00   5.7000000e+00   5.9000000e+00   4.0000000e+00   4.7000000e+00   3.9000000e+00   5.7000000e+00   3.9000000e+00   4.7000000e+00   5.0000000e+00   3.8000000e+00   3.9000000e+00   4.6000000e+00   4.8000000e+00   5.1000000e+00   5.4000000e+00   4.6000000e+00   4.1000000e+00   4.6000000e+00   5.1000000e+00   4.6000000e+00   4.5000000e+00   3.8000000e+00   4.4000000e+00   4.6000000e+00   4.1000000e+00   4.1000000e+00   4.9000000e+00   4.7000000e+00   4.2000000e+00   4.0000000e+00   4.2000000e+00   4.4000000e+00   4.1000000e+00   3.0000000e-01   3.0000000e-01   1.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   9.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   4.0000000e-01   1.0000000e+00   7.0000000e-01   2.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e+00   2.8000000e+00   3.2000000e+00   2.3000000e+00   2.9000000e+00   2.8000000e+00   3.0000000e+00   1.6000000e+00   2.9000000e+00   2.2000000e+00   1.8000000e+00   2.5000000e+00   2.3000000e+00   3.0000000e+00   1.9000000e+00   2.7000000e+00   2.8000000e+00   2.4000000e+00   2.8000000e+00   2.2000000e+00   3.1000000e+00   2.3000000e+00   3.2000000e+00   3.0000000e+00   2.6000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.8000000e+00   1.8000000e+00   2.1000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.7000000e+00   2.4000000e+00   2.3000000e+00   2.7000000e+00   2.9000000e+00   2.3000000e+00   1.6000000e+00   2.5000000e+00   2.5000000e+00   2.5000000e+00   2.6000000e+00   1.3000000e+00   2.4000000e+00   4.3000000e+00   3.4000000e+00   4.2000000e+00   3.9000000e+00   4.1000000e+00   4.9000000e+00   2.8000000e+00   4.6000000e+00   4.1000000e+00   4.4000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   5.0000000e+00   5.2000000e+00   3.3000000e+00   4.0000000e+00   3.2000000e+00   5.0000000e+00   3.2000000e+00   4.0000000e+00   4.3000000e+00   3.1000000e+00   3.2000000e+00   3.9000000e+00   4.1000000e+00   4.4000000e+00   4.7000000e+00   3.9000000e+00   3.4000000e+00   3.9000000e+00   4.4000000e+00   3.9000000e+00   3.8000000e+00   3.1000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.4000000e+00   4.2000000e+00   4.0000000e+00   3.5000000e+00   3.3000000e+00   3.5000000e+00   3.7000000e+00   3.4000000e+00   4.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   4.0000000e-01   7.0000000e-01   7.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   6.0000000e-01   1.1000000e+00   6.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   2.8000000e+00   2.6000000e+00   3.0000000e+00   2.1000000e+00   2.7000000e+00   2.6000000e+00   2.8000000e+00   1.4000000e+00   2.7000000e+00   2.0000000e+00   1.6000000e+00   2.3000000e+00   2.1000000e+00   2.8000000e+00   1.7000000e+00   2.5000000e+00   2.6000000e+00   2.2000000e+00   2.6000000e+00   2.0000000e+00   2.9000000e+00   2.1000000e+00   3.0000000e+00   2.8000000e+00   2.4000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.6000000e+00   1.6000000e+00   1.9000000e+00   1.8000000e+00   2.0000000e+00   3.2000000e+00   2.6000000e+00   2.6000000e+00   2.8000000e+00   2.5000000e+00   2.2000000e+00   2.1000000e+00   2.5000000e+00   2.7000000e+00   2.1000000e+00   1.4000000e+00   2.3000000e+00   2.3000000e+00   2.3000000e+00   2.4000000e+00   1.1000000e+00   2.2000000e+00   4.1000000e+00   3.2000000e+00   4.0000000e+00   3.7000000e+00   3.9000000e+00   4.7000000e+00   2.6000000e+00   4.4000000e+00   3.9000000e+00   4.2000000e+00   3.2000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   3.2000000e+00   3.4000000e+00   3.6000000e+00   4.8000000e+00   5.0000000e+00   3.1000000e+00   3.8000000e+00   3.0000000e+00   4.8000000e+00   3.0000000e+00   3.8000000e+00   4.1000000e+00   2.9000000e+00   3.0000000e+00   3.7000000e+00   3.9000000e+00   4.2000000e+00   4.5000000e+00   3.7000000e+00   3.2000000e+00   3.7000000e+00   4.2000000e+00   3.7000000e+00   3.6000000e+00   2.9000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   3.2000000e+00   4.0000000e+00   3.8000000e+00   3.3000000e+00   3.1000000e+00   3.3000000e+00   3.5000000e+00   3.2000000e+00   4.0000000e-01   5.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   1.1000000e+00   1.2000000e+00   1.0000000e-01   4.0000000e-01   5.0000000e-01   1.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   2.0000000e-01   8.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   2.0000000e-01   2.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   3.0000000e-01   6.0000000e-01   2.0000000e-01   3.0000000e-01   1.1000000e+00   6.0000000e-01   2.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   1.0000000e-01   5.0000000e-01   4.0000000e-01   2.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e-01   2.0000000e-01   1.2000000e+00   8.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   3.0000000e-01   6.0000000e-01   2.0000000e-01   2.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   5.0000000e-01   4.0000000e-01   2.0000000e-01   7.0000000e-01   8.0000000e-01   3.0000000e-01   2.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   1.0000000e-01   2.0000000e-01   1.1000000e+00   8.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   6.0000000e-01   3.0000000e-01   2.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   1.0000000e-01   7.0000000e-01   9.0000000e-01   1.0000000e+00   2.0000000e-01   4.0000000e-01   8.0000000e-01   2.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   9.0000000e-01   3.0000000e-01   4.0000000e-01   6.0000000e-01   2.0000000e-01   6.0000000e-01   2.0000000e-01   6.0000000e-01   3.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   6.0000000e-01   1.0000000e+00   1.1000000e+00   1.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   4.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   2.0000000e-01   6.0000000e-01   2.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   7.0000000e-01   8.0000000e-01   5.0000000e-01   4.0000000e-01   2.0000000e-01   5.0000000e-01   1.0000000e+00   3.0000000e-01   4.0000000e-01   1.1000000e+00   1.0000000e+00   4.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   8.0000000e-01   3.0000000e-01   4.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   3.0000000e-01   1.0000000e+00   9.0000000e-01   6.0000000e-01   1.0000000e+00   1.1000000e+00   7.0000000e-01   6.0000000e-01   1.8000000e+00   9.0000000e-01   6.0000000e-01   4.0000000e-01   1.1000000e+00   3.0000000e-01   9.0000000e-01   4.0000000e-01   8.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.1000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.6000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   1.1000000e+00   1.0000000e+00   7.0000000e-01   1.1000000e+00   1.2000000e+00   8.0000000e-01   7.0000000e-01   1.9000000e+00   1.1000000e+00   7.0000000e-01   5.0000000e-01   1.2000000e+00   4.0000000e-01   1.0000000e+00   5.0000000e-01   9.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.2000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.7000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   3.0000000e-01   6.0000000e-01   0.0000000e+00   5.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   6.0000000e-01   2.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   5.0000000e-01   3.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   9.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   2.0000000e-01   3.5000000e+00   3.3000000e+00   3.7000000e+00   2.8000000e+00   3.4000000e+00   3.3000000e+00   3.5000000e+00   2.1000000e+00   3.4000000e+00   2.7000000e+00   2.3000000e+00   3.0000000e+00   2.8000000e+00   3.5000000e+00   2.4000000e+00   3.2000000e+00   3.3000000e+00   2.9000000e+00   3.3000000e+00   2.7000000e+00   3.6000000e+00   2.8000000e+00   3.7000000e+00   3.5000000e+00   3.1000000e+00   3.2000000e+00   3.6000000e+00   3.8000000e+00   3.3000000e+00   2.3000000e+00   2.6000000e+00   2.5000000e+00   2.7000000e+00   3.9000000e+00   3.3000000e+00   3.3000000e+00   3.5000000e+00   3.2000000e+00   2.9000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.8000000e+00   2.1000000e+00   3.0000000e+00   3.0000000e+00   3.0000000e+00   3.1000000e+00   1.8000000e+00   2.9000000e+00   4.8000000e+00   3.9000000e+00   4.7000000e+00   4.4000000e+00   4.6000000e+00   5.4000000e+00   3.3000000e+00   5.1000000e+00   4.6000000e+00   4.9000000e+00   3.9000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.9000000e+00   4.1000000e+00   4.3000000e+00   5.5000000e+00   5.7000000e+00   3.8000000e+00   4.5000000e+00   3.7000000e+00   5.5000000e+00   3.7000000e+00   4.5000000e+00   4.8000000e+00   3.6000000e+00   3.7000000e+00   4.4000000e+00   4.6000000e+00   4.9000000e+00   5.2000000e+00   4.4000000e+00   3.9000000e+00   4.4000000e+00   4.9000000e+00   4.4000000e+00   4.3000000e+00   3.6000000e+00   4.2000000e+00   4.4000000e+00   3.9000000e+00   3.9000000e+00   4.7000000e+00   4.5000000e+00   4.0000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.9000000e+00   6.0000000e-01   1.1000000e+00   4.0000000e-01   5.0000000e-01   1.2000000e+00   1.1000000e+00   5.0000000e-01   6.0000000e-01   7.0000000e-01   4.0000000e-01   9.0000000e-01   2.0000000e-01   5.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   5.0000000e-01   3.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   6.0000000e-01   2.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   7.0000000e-01   6.0000000e-01   7.0000000e-01   2.0000000e-01   6.0000000e-01   8.0000000e-01   4.0000000e-01   8.0000000e-01   2.0000000e-01   9.0000000e-01   6.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   2.0000000e-01   1.1000000e+00   7.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   3.0000000e-01   1.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   1.2000000e+00   6.0000000e-01   3.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   9.0000000e-01   1.2000000e+00   1.5000000e+00   7.0000000e-01   1.5000000e+00   9.0000000e-01   1.4000000e+00   1.0000000e+00   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   6.0000000e-01   7.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   9.0000000e-01   6.0000000e-01   3.4000000e+00   3.2000000e+00   3.6000000e+00   2.7000000e+00   3.3000000e+00   3.2000000e+00   3.4000000e+00   2.0000000e+00   3.3000000e+00   2.6000000e+00   2.2000000e+00   2.9000000e+00   2.7000000e+00   3.4000000e+00   2.3000000e+00   3.1000000e+00   3.2000000e+00   2.8000000e+00   3.2000000e+00   2.6000000e+00   3.5000000e+00   2.7000000e+00   3.6000000e+00   3.4000000e+00   3.0000000e+00   3.1000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   2.2000000e+00   2.5000000e+00   2.4000000e+00   2.6000000e+00   3.8000000e+00   3.2000000e+00   3.2000000e+00   3.4000000e+00   3.1000000e+00   2.8000000e+00   2.7000000e+00   3.1000000e+00   3.3000000e+00   2.7000000e+00   2.0000000e+00   2.9000000e+00   2.9000000e+00   2.9000000e+00   3.0000000e+00   1.7000000e+00   2.8000000e+00   4.7000000e+00   3.8000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.3000000e+00   3.2000000e+00   5.0000000e+00   4.5000000e+00   4.8000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.8000000e+00   4.0000000e+00   4.2000000e+00   5.4000000e+00   5.6000000e+00   3.7000000e+00   4.4000000e+00   3.6000000e+00   5.4000000e+00   3.6000000e+00   4.4000000e+00   4.7000000e+00   3.5000000e+00   3.6000000e+00   4.3000000e+00   4.5000000e+00   4.8000000e+00   5.1000000e+00   4.3000000e+00   3.8000000e+00   4.3000000e+00   4.8000000e+00   4.3000000e+00   4.2000000e+00   3.5000000e+00   4.1000000e+00   4.3000000e+00   3.8000000e+00   3.8000000e+00   4.6000000e+00   4.4000000e+00   3.9000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.8000000e+00   3.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   8.0000000e-01   3.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   2.8000000e+00   2.6000000e+00   3.0000000e+00   2.1000000e+00   2.7000000e+00   2.6000000e+00   2.8000000e+00   1.4000000e+00   2.7000000e+00   2.0000000e+00   1.8000000e+00   2.3000000e+00   2.1000000e+00   2.8000000e+00   1.7000000e+00   2.5000000e+00   2.6000000e+00   2.2000000e+00   2.6000000e+00   2.0000000e+00   2.9000000e+00   2.1000000e+00   3.0000000e+00   2.8000000e+00   2.4000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.6000000e+00   1.6000000e+00   1.9000000e+00   1.8000000e+00   2.0000000e+00   3.2000000e+00   2.6000000e+00   2.6000000e+00   2.8000000e+00   2.5000000e+00   2.2000000e+00   2.1000000e+00   2.5000000e+00   2.7000000e+00   2.1000000e+00   1.5000000e+00   2.3000000e+00   2.3000000e+00   2.3000000e+00   2.4000000e+00   1.3000000e+00   2.2000000e+00   4.1000000e+00   3.2000000e+00   4.0000000e+00   3.7000000e+00   3.9000000e+00   4.7000000e+00   2.6000000e+00   4.4000000e+00   3.9000000e+00   4.2000000e+00   3.2000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   3.2000000e+00   3.4000000e+00   3.6000000e+00   4.8000000e+00   5.0000000e+00   3.1000000e+00   3.8000000e+00   3.0000000e+00   4.8000000e+00   3.0000000e+00   3.8000000e+00   4.1000000e+00   2.9000000e+00   3.0000000e+00   3.7000000e+00   3.9000000e+00   4.2000000e+00   4.5000000e+00   3.7000000e+00   3.2000000e+00   3.7000000e+00   4.2000000e+00   3.7000000e+00   3.6000000e+00   2.9000000e+00   3.5000000e+00   3.7000000e+00   3.2000000e+00   3.2000000e+00   4.0000000e+00   3.8000000e+00   3.3000000e+00   3.1000000e+00   3.3000000e+00   3.5000000e+00   3.2000000e+00   8.0000000e-01   2.0000000e-01   7.0000000e-01   3.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   6.0000000e-01   2.0000000e-01   5.0000000e-01   3.1000000e+00   2.9000000e+00   3.3000000e+00   2.4000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   1.7000000e+00   3.0000000e+00   2.3000000e+00   1.9000000e+00   2.6000000e+00   2.4000000e+00   3.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   2.9000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   3.3000000e+00   3.1000000e+00   2.7000000e+00   2.8000000e+00   3.2000000e+00   3.4000000e+00   2.9000000e+00   1.9000000e+00   2.2000000e+00   2.1000000e+00   2.3000000e+00   3.5000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   2.8000000e+00   3.0000000e+00   2.4000000e+00   1.7000000e+00   2.6000000e+00   2.6000000e+00   2.6000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   4.4000000e+00   3.5000000e+00   4.3000000e+00   4.0000000e+00   4.2000000e+00   5.0000000e+00   2.9000000e+00   4.7000000e+00   4.2000000e+00   4.5000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.4000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   5.1000000e+00   5.3000000e+00   3.4000000e+00   4.1000000e+00   3.3000000e+00   5.1000000e+00   3.3000000e+00   4.1000000e+00   4.4000000e+00   3.2000000e+00   3.3000000e+00   4.0000000e+00   4.2000000e+00   4.5000000e+00   4.8000000e+00   4.0000000e+00   3.5000000e+00   4.0000000e+00   4.5000000e+00   4.0000000e+00   3.9000000e+00   3.2000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.5000000e+00   4.3000000e+00   4.1000000e+00   3.6000000e+00   3.4000000e+00   3.6000000e+00   3.8000000e+00   3.5000000e+00   7.0000000e-01   4.0000000e-01   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   4.0000000e-01   3.2000000e+00   3.0000000e+00   3.4000000e+00   2.5000000e+00   3.1000000e+00   3.0000000e+00   3.2000000e+00   1.8000000e+00   3.1000000e+00   2.4000000e+00   2.0000000e+00   2.7000000e+00   2.5000000e+00   3.2000000e+00   2.1000000e+00   2.9000000e+00   3.0000000e+00   2.6000000e+00   3.0000000e+00   2.4000000e+00   3.3000000e+00   2.5000000e+00   3.4000000e+00   3.2000000e+00   2.8000000e+00   2.9000000e+00   3.3000000e+00   3.5000000e+00   3.0000000e+00   2.0000000e+00   2.3000000e+00   2.2000000e+00   2.4000000e+00   3.6000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.9000000e+00   2.6000000e+00   2.5000000e+00   2.9000000e+00   3.1000000e+00   2.5000000e+00   1.8000000e+00   2.7000000e+00   2.7000000e+00   2.7000000e+00   2.8000000e+00   1.5000000e+00   2.6000000e+00   4.5000000e+00   3.6000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   5.1000000e+00   3.0000000e+00   4.8000000e+00   4.3000000e+00   4.6000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.5000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   5.2000000e+00   5.4000000e+00   3.5000000e+00   4.2000000e+00   3.4000000e+00   5.2000000e+00   3.4000000e+00   4.2000000e+00   4.5000000e+00   3.3000000e+00   3.4000000e+00   4.1000000e+00   4.3000000e+00   4.6000000e+00   4.9000000e+00   4.1000000e+00   3.6000000e+00   4.1000000e+00   4.6000000e+00   4.1000000e+00   4.0000000e+00   3.3000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.6000000e+00   4.4000000e+00   4.2000000e+00   3.7000000e+00   3.5000000e+00   3.7000000e+00   3.9000000e+00   3.6000000e+00   3.3000000e+00   3.1000000e+00   3.5000000e+00   2.6000000e+00   3.2000000e+00   3.1000000e+00   3.3000000e+00   1.9000000e+00   3.2000000e+00   2.5000000e+00   2.1000000e+00   2.8000000e+00   2.6000000e+00   3.3000000e+00   2.2000000e+00   3.0000000e+00   3.1000000e+00   2.7000000e+00   3.1000000e+00   2.5000000e+00   3.4000000e+00   2.6000000e+00   3.5000000e+00   3.3000000e+00   2.9000000e+00   3.0000000e+00   3.4000000e+00   3.6000000e+00   3.1000000e+00   2.1000000e+00   2.4000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   3.0000000e+00   3.2000000e+00   2.6000000e+00   1.9000000e+00   2.8000000e+00   2.8000000e+00   2.8000000e+00   2.9000000e+00   1.6000000e+00   2.7000000e+00   4.6000000e+00   3.7000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.2000000e+00   3.1000000e+00   4.9000000e+00   4.4000000e+00   4.7000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   3.6000000e+00   3.7000000e+00   3.9000000e+00   4.1000000e+00   5.3000000e+00   5.5000000e+00   3.6000000e+00   4.3000000e+00   3.5000000e+00   5.3000000e+00   3.5000000e+00   4.3000000e+00   4.6000000e+00   3.4000000e+00   3.5000000e+00   4.2000000e+00   4.4000000e+00   4.7000000e+00   5.0000000e+00   4.2000000e+00   3.7000000e+00   4.2000000e+00   4.7000000e+00   4.2000000e+00   4.1000000e+00   3.4000000e+00   4.0000000e+00   4.2000000e+00   3.7000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.0000000e+00   3.7000000e+00   6.0000000e-01   2.0000000e-01   1.5000000e+00   5.0000000e-01   1.3000000e+00   7.0000000e-01   2.1000000e+00   4.0000000e-01   1.8000000e+00   2.0000000e+00   1.1000000e+00   1.0000000e+00   9.0000000e-01   1.4000000e+00   3.0000000e-01   1.4000000e+00   1.2000000e+00   1.0000000e+00   1.4000000e+00   1.1000000e+00   9.0000000e-01   7.0000000e-01   9.0000000e-01   6.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   1.0000000e+00   1.3000000e+00   1.5000000e+00   1.5000000e+00   1.2000000e+00   1.0000000e+00   1.6000000e+00   1.0000000e+00   3.0000000e-01   9.0000000e-01   1.4000000e+00   1.5000000e+00   1.5000000e+00   9.0000000e-01   1.2000000e+00   2.0000000e+00   1.4000000e+00   1.3000000e+00   1.3000000e+00   8.0000000e-01   1.9000000e+00   1.3000000e+00   1.3000000e+00   1.2000000e+00   1.2000000e+00   9.0000000e-01   1.1000000e+00   1.9000000e+00   2.1000000e+00   1.6000000e+00   1.1000000e+00   1.4000000e+00   6.0000000e-01   6.0000000e-01   8.0000000e-01   1.3000000e+00   1.2000000e+00   9.0000000e-01   8.0000000e-01   2.0000000e+00   2.2000000e+00   1.0000000e+00   1.0000000e+00   1.4000000e+00   2.0000000e+00   7.0000000e-01   1.0000000e+00   1.3000000e+00   8.0000000e-01   9.0000000e-01   9.0000000e-01   1.1000000e+00   1.4000000e+00   1.7000000e+00   9.0000000e-01   7.0000000e-01   9.0000000e-01   1.4000000e+00   1.0000000e+00   8.0000000e-01   1.0000000e+00   7.0000000e-01   1.0000000e+00   9.0000000e-01   1.2000000e+00   1.2000000e+00   1.1000000e+00   9.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   1.1000000e+00   5.0000000e-01   9.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   1.5000000e+00   3.0000000e-01   1.2000000e+00   1.4000000e+00   5.0000000e-01   1.0000000e+00   3.0000000e-01   9.0000000e-01   3.0000000e-01   8.0000000e-01   6.0000000e-01   1.0000000e+00   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   1.0000000e+00   9.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   1.0000000e+00   4.0000000e-01   3.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   3.0000000e-01   6.0000000e-01   1.4000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   3.0000000e-01   1.5000000e+00   7.0000000e-01   1.5000000e+00   6.0000000e-01   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   1.5000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   6.0000000e-01   8.0000000e-01   1.0000000e+00   7.0000000e-01   9.0000000e-01   8.0000000e-01   1.0000000e+00   2.2000000e+00   2.4000000e+00   1.0000000e+00   1.2000000e+00   8.0000000e-01   2.2000000e+00   5.0000000e-01   1.2000000e+00   1.5000000e+00   4.0000000e-01   4.0000000e-01   1.1000000e+00   1.3000000e+00   1.6000000e+00   1.9000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.6000000e+00   1.1000000e+00   1.0000000e+00   4.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   1.4000000e+00   1.2000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   9.0000000e-01   6.0000000e-01   1.4000000e+00   4.0000000e-01   1.2000000e+00   6.0000000e-01   2.0000000e+00   3.0000000e-01   1.7000000e+00   1.9000000e+00   1.0000000e+00   9.0000000e-01   8.0000000e-01   1.3000000e+00   5.0000000e-01   1.3000000e+00   1.1000000e+00   9.0000000e-01   1.3000000e+00   1.0000000e+00   9.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   2.0000000e-01   9.0000000e-01   1.4000000e+00   1.4000000e+00   1.4000000e+00   1.1000000e+00   9.0000000e-01   1.5000000e+00   9.0000000e-01   2.0000000e-01   8.0000000e-01   1.3000000e+00   1.4000000e+00   1.4000000e+00   8.0000000e-01   1.1000000e+00   1.9000000e+00   1.3000000e+00   1.2000000e+00   1.2000000e+00   7.0000000e-01   1.9000000e+00   1.2000000e+00   1.1000000e+00   1.1000000e+00   1.0000000e+00   7.0000000e-01   9.0000000e-01   1.7000000e+00   2.0000000e+00   1.4000000e+00   9.0000000e-01   1.2000000e+00   5.0000000e-01   5.0000000e-01   6.0000000e-01   1.2000000e+00   1.1000000e+00   8.0000000e-01   6.0000000e-01   1.8000000e+00   2.0000000e+00   9.0000000e-01   8.0000000e-01   1.3000000e+00   1.8000000e+00   6.0000000e-01   8.0000000e-01   1.1000000e+00   7.0000000e-01   8.0000000e-01   7.0000000e-01   9.0000000e-01   1.2000000e+00   1.5000000e+00   7.0000000e-01   6.0000000e-01   8.0000000e-01   1.2000000e+00   9.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   9.0000000e-01   8.0000000e-01   1.1000000e+00   1.0000000e+00   1.0000000e+00   8.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   1.0000000e+00   5.0000000e-01   1.0000000e+00   7.0000000e-01   1.1000000e+00   4.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   1.2000000e+00   7.0000000e-01   4.0000000e-01   7.0000000e-01   2.0000000e-01   9.0000000e-01   6.0000000e-01   9.0000000e-01   7.0000000e-01   9.0000000e-01   1.1000000e+00   1.3000000e+00   1.2000000e+00   6.0000000e-01   5.0000000e-01   2.0000000e-01   3.0000000e-01   4.0000000e-01   1.1000000e+00   7.0000000e-01   1.1000000e+00   1.2000000e+00   8.0000000e-01   7.0000000e-01   2.0000000e-01   4.0000000e-01   7.0000000e-01   3.0000000e-01   7.0000000e-01   4.0000000e-01   7.0000000e-01   6.0000000e-01   7.0000000e-01   1.0000000e+00   5.0000000e-01   2.0000000e+00   1.1000000e+00   1.9000000e+00   1.6000000e+00   1.8000000e+00   2.6000000e+00   6.0000000e-01   2.3000000e+00   1.8000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.0000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   2.7000000e+00   2.9000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   2.7000000e+00   9.0000000e-01   1.7000000e+00   2.0000000e+00   8.0000000e-01   9.0000000e-01   1.6000000e+00   1.8000000e+00   2.1000000e+00   2.4000000e+00   1.6000000e+00   1.1000000e+00   1.6000000e+00   2.2000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   1.4000000e+00   1.1000000e+00   1.9000000e+00   1.7000000e+00   1.2000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.1000000e+00   8.0000000e-01   5.0000000e-01   1.6000000e+00   2.0000000e-01   1.3000000e+00   1.5000000e+00   6.0000000e-01   6.0000000e-01   4.0000000e-01   1.0000000e+00   3.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   4.0000000e-01   3.0000000e-01   2.0000000e-01   3.0000000e-01   4.0000000e-01   5.0000000e-01   1.1000000e+00   1.0000000e+00   1.0000000e+00   7.0000000e-01   5.0000000e-01   1.1000000e+00   6.0000000e-01   3.0000000e-01   5.0000000e-01   9.0000000e-01   1.0000000e+00   1.0000000e+00   4.0000000e-01   7.0000000e-01   1.5000000e+00   9.0000000e-01   8.0000000e-01   8.0000000e-01   3.0000000e-01   1.6000000e+00   8.0000000e-01   1.4000000e+00   7.0000000e-01   1.3000000e+00   1.0000000e+00   1.2000000e+00   2.0000000e+00   1.6000000e+00   1.7000000e+00   1.2000000e+00   1.5000000e+00   5.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   2.1000000e+00   2.3000000e+00   6.0000000e-01   1.1000000e+00   9.0000000e-01   2.1000000e+00   3.0000000e-01   1.1000000e+00   1.4000000e+00   3.0000000e-01   4.0000000e-01   1.0000000e+00   1.2000000e+00   1.5000000e+00   1.8000000e+00   1.0000000e+00   5.0000000e-01   1.0000000e+00   1.5000000e+00   1.0000000e+00   9.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   8.0000000e-01   7.0000000e-01   1.3000000e+00   1.1000000e+00   8.0000000e-01   4.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   1.2000000e+00   9.0000000e-01   6.0000000e-01   1.0000000e+00   3.0000000e-01   6.0000000e-01   4.0000000e-01   9.0000000e-01   1.0000000e+00   2.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   9.0000000e-01   1.1000000e+00   1.0000000e+00   3.0000000e-01   1.0000000e+00   7.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   6.0000000e-01   1.0000000e+00   6.0000000e-01   4.0000000e-01   5.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   1.2000000e+00   3.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   1.5000000e+00   4.0000000e-01   1.5000000e+00   6.0000000e-01   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   8.0000000e-01   1.8000000e+00   1.3000000e+00   1.6000000e+00   8.0000000e-01   8.0000000e-01   1.1000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   1.0000000e+00   2.2000000e+00   2.4000000e+00   6.0000000e-01   1.2000000e+00   7.0000000e-01   2.2000000e+00   6.0000000e-01   1.2000000e+00   1.5000000e+00   5.0000000e-01   5.0000000e-01   1.1000000e+00   1.5000000e+00   1.7000000e+00   2.2000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   2.0000000e+00   1.1000000e+00   1.0000000e+00   5.0000000e-01   1.2000000e+00   1.1000000e+00   1.2000000e+00   6.0000000e-01   1.4000000e+00   1.2000000e+00   1.0000000e+00   6.0000000e-01   8.0000000e-01   1.0000000e+00   6.0000000e-01   1.4000000e+00   4.0000000e-01   1.1000000e+00   1.3000000e+00   5.0000000e-01   1.1000000e+00   4.0000000e-01   1.1000000e+00   4.0000000e-01   7.0000000e-01   6.0000000e-01   1.1000000e+00   8.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   4.0000000e-01   3.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   1.2000000e+00   9.0000000e-01   1.0000000e+00   8.0000000e-01   6.0000000e-01   9.0000000e-01   3.0000000e-01   4.0000000e-01   1.0000000e+00   7.0000000e-01   8.0000000e-01   8.0000000e-01   3.0000000e-01   7.0000000e-01   1.4000000e+00   7.0000000e-01   6.0000000e-01   6.0000000e-01   4.0000000e-01   1.7000000e+00   6.0000000e-01   1.3000000e+00   6.0000000e-01   1.2000000e+00   9.0000000e-01   1.1000000e+00   1.9000000e+00   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.4000000e+00   4.0000000e-01   6.0000000e-01   8.0000000e-01   8.0000000e-01   8.0000000e-01   7.0000000e-01   8.0000000e-01   2.0000000e+00   2.2000000e+00   1.1000000e+00   1.0000000e+00   7.0000000e-01   2.0000000e+00   6.0000000e-01   1.0000000e+00   1.3000000e+00   5.0000000e-01   3.0000000e-01   9.0000000e-01   1.1000000e+00   1.4000000e+00   1.7000000e+00   9.0000000e-01   5.0000000e-01   9.0000000e-01   1.4000000e+00   9.0000000e-01   8.0000000e-01   3.0000000e-01   7.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   1.2000000e+00   1.0000000e+00   7.0000000e-01   8.0000000e-01   5.0000000e-01   7.0000000e-01   4.0000000e-01   1.7000000e+00   6.0000000e-01   4.0000000e-01   1.0000000e+00   1.1000000e+00   1.4000000e+00   7.0000000e-01   1.8000000e+00   1.2000000e+00   9.0000000e-01   1.3000000e+00   7.0000000e-01   1.5000000e+00   1.2000000e+00   1.6000000e+00   1.4000000e+00   1.5000000e+00   1.7000000e+00   1.9000000e+00   1.8000000e+00   1.2000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.8000000e+00   1.2000000e+00   1.2000000e+00   1.8000000e+00   1.4000000e+00   8.0000000e-01   7.0000000e-01   1.1000000e+00   1.3000000e+00   9.0000000e-01   1.0000000e-01   9.0000000e-01   9.0000000e-01   9.0000000e-01   1.3000000e+00   3.0000000e-01   8.0000000e-01   2.7000000e+00   1.8000000e+00   2.6000000e+00   2.3000000e+00   2.5000000e+00   3.3000000e+00   1.2000000e+00   3.0000000e+00   2.5000000e+00   2.8000000e+00   1.8000000e+00   2.0000000e+00   2.2000000e+00   1.7000000e+00   1.8000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   3.6000000e+00   1.7000000e+00   2.4000000e+00   1.6000000e+00   3.4000000e+00   1.6000000e+00   2.4000000e+00   2.7000000e+00   1.5000000e+00   1.6000000e+00   2.3000000e+00   2.5000000e+00   2.8000000e+00   3.1000000e+00   2.3000000e+00   1.8000000e+00   2.3000000e+00   2.8000000e+00   2.3000000e+00   2.2000000e+00   1.5000000e+00   2.1000000e+00   2.3000000e+00   2.0000000e+00   1.8000000e+00   2.6000000e+00   2.4000000e+00   1.9000000e+00   1.7000000e+00   1.9000000e+00   2.1000000e+00   1.8000000e+00   1.4000000e+00   1.6000000e+00   7.0000000e-01   7.0000000e-01   5.0000000e-01   1.0000000e+00   2.0000000e-01   1.0000000e+00   8.0000000e-01   7.0000000e-01   1.0000000e+00   7.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   3.0000000e-01   2.0000000e-01   2.0000000e-01   4.0000000e-01   6.0000000e-01   1.1000000e+00   1.1000000e+00   1.1000000e+00   8.0000000e-01   6.0000000e-01   1.2000000e+00   6.0000000e-01   2.0000000e-01   6.0000000e-01   1.0000000e+00   1.1000000e+00   1.1000000e+00   5.0000000e-01   8.0000000e-01   1.6000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   4.0000000e-01   1.6000000e+00   9.0000000e-01   1.4000000e+00   8.0000000e-01   1.3000000e+00   1.0000000e+00   1.2000000e+00   2.0000000e+00   1.7000000e+00   1.7000000e+00   1.2000000e+00   1.5000000e+00   7.0000000e-01   7.0000000e-01   9.0000000e-01   9.0000000e-01   1.1000000e+00   1.0000000e+00   9.0000000e-01   2.1000000e+00   2.3000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   2.1000000e+00   5.0000000e-01   1.1000000e+00   1.4000000e+00   5.0000000e-01   5.0000000e-01   1.0000000e+00   1.2000000e+00   1.5000000e+00   1.8000000e+00   1.0000000e+00   5.0000000e-01   1.0000000e+00   1.5000000e+00   1.1000000e+00   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.1000000e+00   1.0000000e+00   8.0000000e-01   1.3000000e+00   1.2000000e+00   1.0000000e+00   6.0000000e-01   7.0000000e-01   1.0000000e+00   7.0000000e-01   7.0000000e-01   7.0000000e-01   8.0000000e-01   9.0000000e-01   4.0000000e-01   1.5000000e+00   6.0000000e-01   6.0000000e-01   1.0000000e+00   4.0000000e-01   9.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   1.2000000e+00   1.4000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   5.0000000e-01   3.0000000e-01   4.0000000e-01   6.0000000e-01   1.2000000e+00   6.0000000e-01   8.0000000e-01   1.5000000e+00   1.1000000e+00   4.0000000e-01   3.0000000e-01   5.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   2.1000000e+00   1.2000000e+00   2.0000000e+00   1.7000000e+00   1.9000000e+00   2.7000000e+00   6.0000000e-01   2.4000000e+00   1.9000000e+00   2.2000000e+00   1.3000000e+00   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   2.8000000e+00   3.0000000e+00   1.1000000e+00   1.8000000e+00   1.0000000e+00   2.8000000e+00   1.1000000e+00   1.8000000e+00   2.1000000e+00   1.0000000e+00   1.0000000e+00   1.7000000e+00   2.0000000e+00   2.2000000e+00   2.7000000e+00   1.7000000e+00   1.2000000e+00   1.7000000e+00   2.5000000e+00   1.7000000e+00   1.6000000e+00   9.0000000e-01   1.7000000e+00   1.7000000e+00   1.7000000e+00   1.2000000e+00   2.0000000e+00   1.8000000e+00   1.5000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.2000000e+00   1.0000000e+00   1.0000000e+00   1.2000000e+00   9.0000000e-01   1.7000000e+00   1.0000000e+00   8.0000000e-01   1.2000000e+00   6.0000000e-01   1.3000000e+00   1.1000000e+00   1.4000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   1.8000000e+00   1.7000000e+00   1.0000000e+00   7.0000000e-01   5.0000000e-01   5.0000000e-01   8.0000000e-01   1.6000000e+00   1.0000000e+00   1.4000000e+00   1.7000000e+00   1.3000000e+00   1.0000000e+00   5.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   3.0000000e-01   7.0000000e-01   1.0000000e+00   9.0000000e-01   1.2000000e+00   5.0000000e-01   8.0000000e-01   2.5000000e+00   1.6000000e+00   2.4000000e+00   2.1000000e+00   2.3000000e+00   3.1000000e+00   1.0000000e+00   2.8000000e+00   2.3000000e+00   2.6000000e+00   1.6000000e+00   1.8000000e+00   2.0000000e+00   1.5000000e+00   1.6000000e+00   1.8000000e+00   2.0000000e+00   3.2000000e+00   3.4000000e+00   1.5000000e+00   2.2000000e+00   1.4000000e+00   3.2000000e+00   1.4000000e+00   2.2000000e+00   2.5000000e+00   1.3000000e+00   1.4000000e+00   2.1000000e+00   2.3000000e+00   2.6000000e+00   2.9000000e+00   2.1000000e+00   1.6000000e+00   2.1000000e+00   2.7000000e+00   2.1000000e+00   2.0000000e+00   1.3000000e+00   1.9000000e+00   2.1000000e+00   1.9000000e+00   1.6000000e+00   2.4000000e+00   2.2000000e+00   1.7000000e+00   1.5000000e+00   1.7000000e+00   1.9000000e+00   1.6000000e+00   8.0000000e-01   5.0000000e-01   6.0000000e-01   8.0000000e-01   3.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   6.0000000e-01   2.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   3.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   7.0000000e-01   3.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   4.0000000e-01   9.0000000e-01   3.0000000e-01   3.0000000e-01   2.0000000e-01   3.0000000e-01   1.2000000e+00   2.0000000e-01   1.8000000e+00   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.6000000e+00   2.4000000e+00   1.0000000e+00   2.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   8.0000000e-01   9.0000000e-01   1.1000000e+00   1.3000000e+00   2.5000000e+00   2.7000000e+00   8.0000000e-01   1.5000000e+00   7.0000000e-01   2.5000000e+00   7.0000000e-01   1.5000000e+00   1.8000000e+00   6.0000000e-01   7.0000000e-01   1.4000000e+00   1.6000000e+00   1.9000000e+00   2.2000000e+00   1.4000000e+00   9.0000000e-01   1.4000000e+00   1.9000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.2000000e+00   1.4000000e+00   1.0000000e+00   9.0000000e-01   1.7000000e+00   1.5000000e+00   1.0000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   7.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   1.0000000e+00   6.0000000e-01   9.0000000e-01   7.0000000e-01   7.0000000e-01   8.0000000e-01   8.0000000e-01   1.0000000e+00   7.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   1.1000000e+00   8.0000000e-01   1.2000000e+00   9.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   8.0000000e-01   4.0000000e-01   1.0000000e+00   5.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   1.0000000e+00   6.0000000e-01   2.0000000e+00   1.1000000e+00   1.9000000e+00   1.6000000e+00   1.8000000e+00   2.6000000e+00   1.1000000e+00   2.3000000e+00   1.8000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.0000000e+00   1.4000000e+00   1.3000000e+00   1.5000000e+00   2.7000000e+00   2.9000000e+00   1.0000000e+00   1.7000000e+00   1.0000000e+00   2.7000000e+00   9.0000000e-01   1.7000000e+00   2.0000000e+00   8.0000000e-01   9.0000000e-01   1.6000000e+00   1.8000000e+00   2.1000000e+00   2.4000000e+00   1.6000000e+00   1.1000000e+00   1.6000000e+00   2.1000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   1.3000000e+00   1.1000000e+00   1.9000000e+00   1.7000000e+00   1.3000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.1000000e+00   1.1000000e+00   6.0000000e-01   5.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   4.0000000e-01   7.0000000e-01   4.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   2.0000000e-01   1.2000000e+00   9.0000000e-01   1.0000000e+00   8.0000000e-01   4.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   1.0000000e-01   7.0000000e-01   1.4000000e+00   5.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   1.7000000e+00   6.0000000e-01   1.3000000e+00   5.0000000e-01   1.2000000e+00   9.0000000e-01   1.1000000e+00   1.9000000e+00   1.2000000e+00   1.6000000e+00   1.1000000e+00   1.4000000e+00   6.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   1.0000000e+00   9.0000000e-01   8.0000000e-01   2.0000000e+00   2.2000000e+00   7.0000000e-01   1.0000000e+00   6.0000000e-01   2.0000000e+00   4.0000000e-01   1.0000000e+00   1.3000000e+00   4.0000000e-01   4.0000000e-01   9.0000000e-01   1.1000000e+00   1.4000000e+00   1.8000000e+00   9.0000000e-01   4.0000000e-01   9.0000000e-01   1.6000000e+00   1.0000000e+00   8.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   1.2000000e+00   1.1000000e+00   9.0000000e-01   5.0000000e-01   6.0000000e-01   9.0000000e-01   4.0000000e-01   1.1000000e+00   9.0000000e-01   5.0000000e-01   9.0000000e-01   4.0000000e-01   1.2000000e+00   5.0000000e-01   1.3000000e+00   1.1000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   1.4000000e+00   9.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   1.5000000e+00   9.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   4.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   2.4000000e+00   1.5000000e+00   2.3000000e+00   2.0000000e+00   2.2000000e+00   3.0000000e+00   9.0000000e-01   2.7000000e+00   2.2000000e+00   2.5000000e+00   1.5000000e+00   1.7000000e+00   1.9000000e+00   1.4000000e+00   1.5000000e+00   1.7000000e+00   1.9000000e+00   3.1000000e+00   3.3000000e+00   1.4000000e+00   2.1000000e+00   1.3000000e+00   3.1000000e+00   1.3000000e+00   2.1000000e+00   2.4000000e+00   1.2000000e+00   1.3000000e+00   2.0000000e+00   2.2000000e+00   2.5000000e+00   2.8000000e+00   2.0000000e+00   1.5000000e+00   2.0000000e+00   2.5000000e+00   2.0000000e+00   1.9000000e+00   1.2000000e+00   1.8000000e+00   2.0000000e+00   1.5000000e+00   1.5000000e+00   2.3000000e+00   2.1000000e+00   1.6000000e+00   1.4000000e+00   1.6000000e+00   1.8000000e+00   1.5000000e+00   1.1000000e+00   9.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   1.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   1.0000000e+00   1.2000000e+00   1.2000000e+00   9.0000000e-01   7.0000000e-01   1.3000000e+00   7.0000000e-01   3.0000000e-01   8.0000000e-01   1.1000000e+00   1.2000000e+00   1.2000000e+00   6.0000000e-01   9.0000000e-01   1.7000000e+00   1.1000000e+00   1.0000000e+00   1.0000000e+00   5.0000000e-01   1.6000000e+00   1.0000000e+00   1.6000000e+00   9.0000000e-01   1.5000000e+00   1.2000000e+00   1.4000000e+00   2.2000000e+00   1.8000000e+00   1.9000000e+00   1.4000000e+00   1.7000000e+00   7.0000000e-01   9.0000000e-01   1.1000000e+00   1.0000000e+00   1.0000000e+00   9.0000000e-01   1.1000000e+00   2.3000000e+00   2.5000000e+00   9.0000000e-01   1.3000000e+00   1.1000000e+00   2.3000000e+00   5.0000000e-01   1.3000000e+00   1.6000000e+00   5.0000000e-01   6.0000000e-01   1.2000000e+00   1.4000000e+00   1.7000000e+00   2.0000000e+00   1.2000000e+00   7.0000000e-01   1.2000000e+00   1.7000000e+00   1.2000000e+00   1.1000000e+00   7.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   9.0000000e-01   1.5000000e+00   1.3000000e+00   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   8.0000000e-01   5.0000000e-01   8.0000000e-01   6.0000000e-01   3.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   1.2000000e+00   1.1000000e+00   4.0000000e-01   1.0000000e+00   7.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   2.0000000e-01   4.0000000e-01   1.1000000e+00   7.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   1.2000000e+00   3.0000000e-01   3.0000000e-01   3.0000000e-01   6.0000000e-01   1.5000000e+00   4.0000000e-01   1.5000000e+00   6.0000000e-01   1.5000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   7.0000000e-01   1.8000000e+00   1.3000000e+00   1.6000000e+00   9.0000000e-01   8.0000000e-01   1.2000000e+00   5.0000000e-01   9.0000000e-01   8.0000000e-01   1.0000000e+00   2.2000000e+00   2.4000000e+00   8.0000000e-01   1.3000000e+00   5.0000000e-01   2.2000000e+00   7.0000000e-01   1.2000000e+00   1.6000000e+00   6.0000000e-01   5.0000000e-01   1.1000000e+00   1.6000000e+00   1.8000000e+00   2.3000000e+00   1.1000000e+00   7.0000000e-01   1.1000000e+00   2.1000000e+00   1.1000000e+00   1.0000000e+00   4.0000000e-01   1.3000000e+00   1.1000000e+00   1.3000000e+00   6.0000000e-01   1.4000000e+00   1.2000000e+00   1.1000000e+00   7.0000000e-01   9.0000000e-01   9.0000000e-01   6.0000000e-01   5.0000000e-01   2.0000000e-01   8.0000000e-01   3.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   6.0000000e-01   3.0000000e-01   4.0000000e-01   2.0000000e-01   1.0000000e+00   5.0000000e-01   7.0000000e-01   9.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   2.0000000e-01   8.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   1.1000000e+00   3.0000000e-01   1.9000000e+00   1.0000000e+00   1.8000000e+00   1.5000000e+00   1.7000000e+00   2.5000000e+00   9.0000000e-01   2.2000000e+00   1.7000000e+00   2.0000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.0000000e+00   1.4000000e+00   1.3000000e+00   1.4000000e+00   2.6000000e+00   2.8000000e+00   9.0000000e-01   1.6000000e+00   1.0000000e+00   2.6000000e+00   8.0000000e-01   1.6000000e+00   1.9000000e+00   8.0000000e-01   8.0000000e-01   1.5000000e+00   1.7000000e+00   2.0000000e+00   2.3000000e+00   1.5000000e+00   1.0000000e+00   1.5000000e+00   2.0000000e+00   1.5000000e+00   1.4000000e+00   8.0000000e-01   1.3000000e+00   1.5000000e+00   1.3000000e+00   1.0000000e+00   1.8000000e+00   1.6000000e+00   1.3000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   1.0000000e+00   6.0000000e-01   1.0000000e+00   6.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   6.0000000e-01   8.0000000e-01   7.0000000e-01   1.0000000e+00   7.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   8.0000000e-01   1.2000000e+00   9.0000000e-01   2.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   1.2000000e+00   6.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   1.5000000e+00   6.0000000e-01   1.5000000e+00   6.0000000e-01   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   1.3000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   1.0000000e+00   8.0000000e-01   1.0000000e+00   5.0000000e-01   9.0000000e-01   1.0000000e+00   1.0000000e+00   2.2000000e+00   2.4000000e+00   5.0000000e-01   1.2000000e+00   6.0000000e-01   2.2000000e+00   5.0000000e-01   1.2000000e+00   1.5000000e+00   6.0000000e-01   8.0000000e-01   1.1000000e+00   1.3000000e+00   1.6000000e+00   1.9000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.6000000e+00   1.2000000e+00   1.0000000e+00   8.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   6.0000000e-01   1.4000000e+00   1.2000000e+00   8.0000000e-01   5.0000000e-01   8.0000000e-01   1.2000000e+00   8.0000000e-01   9.0000000e-01   5.0000000e-01   1.0000000e+00   8.0000000e-01   8.0000000e-01   1.0000000e+00   1.2000000e+00   1.1000000e+00   6.0000000e-01   4.0000000e-01   1.0000000e-01   2.0000000e-01   2.0000000e-01   1.2000000e+00   6.0000000e-01   9.0000000e-01   1.1000000e+00   7.0000000e-01   5.0000000e-01   2.0000000e-01   5.0000000e-01   7.0000000e-01   2.0000000e-01   6.0000000e-01   3.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   9.0000000e-01   3.0000000e-01   2.1000000e+00   1.2000000e+00   2.0000000e+00   1.7000000e+00   1.9000000e+00   2.7000000e+00   7.0000000e-01   2.4000000e+00   1.9000000e+00   2.2000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.3000000e+00   1.4000000e+00   1.6000000e+00   2.8000000e+00   3.0000000e+00   1.1000000e+00   1.8000000e+00   1.0000000e+00   2.8000000e+00   1.0000000e+00   1.8000000e+00   2.1000000e+00   9.0000000e-01   1.0000000e+00   1.7000000e+00   1.9000000e+00   2.2000000e+00   2.5000000e+00   1.7000000e+00   1.2000000e+00   1.7000000e+00   2.2000000e+00   1.7000000e+00   1.6000000e+00   9.0000000e-01   1.5000000e+00   1.7000000e+00   1.3000000e+00   1.2000000e+00   2.0000000e+00   1.8000000e+00   1.3000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.2000000e+00   8.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   3.0000000e-01   1.3000000e+00   1.0000000e+00   1.1000000e+00   9.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   9.0000000e-01   7.0000000e-01   8.0000000e-01   6.0000000e-01   4.0000000e-01   8.0000000e-01   1.5000000e+00   6.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   1.8000000e+00   7.0000000e-01   1.2000000e+00   5.0000000e-01   1.2000000e+00   8.0000000e-01   1.0000000e+00   1.8000000e+00   1.0000000e+00   1.5000000e+00   1.0000000e+00   1.3000000e+00   6.0000000e-01   5.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   1.9000000e+00   2.1000000e+00   1.0000000e+00   1.0000000e+00   4.0000000e-01   1.9000000e+00   5.0000000e-01   9.0000000e-01   1.3000000e+00   4.0000000e-01   2.0000000e-01   8.0000000e-01   1.3000000e+00   1.5000000e+00   2.0000000e+00   8.0000000e-01   4.0000000e-01   8.0000000e-01   1.8000000e+00   8.0000000e-01   7.0000000e-01   2.0000000e-01   1.0000000e+00   8.0000000e-01   1.0000000e+00   5.0000000e-01   1.1000000e+00   9.0000000e-01   8.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   9.0000000e-01   7.0000000e-01   3.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   1.1000000e+00   7.0000000e-01   6.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   1.1000000e+00   5.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   1.0000000e+00   4.0000000e-01   2.0000000e+00   1.1000000e+00   1.9000000e+00   1.6000000e+00   1.8000000e+00   2.6000000e+00   1.2000000e+00   2.3000000e+00   1.8000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.0000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   2.7000000e+00   2.9000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   2.7000000e+00   9.0000000e-01   1.7000000e+00   2.0000000e+00   8.0000000e-01   9.0000000e-01   1.6000000e+00   1.8000000e+00   2.1000000e+00   2.4000000e+00   1.6000000e+00   1.1000000e+00   1.6000000e+00   2.1000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.1000000e+00   1.9000000e+00   1.7000000e+00   1.2000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.1000000e+00   3.0000000e-01   6.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   1.4000000e+00   1.1000000e+00   1.2000000e+00   1.0000000e+00   3.0000000e-01   9.0000000e-01   9.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   9.0000000e-01   1.6000000e+00   7.0000000e-01   7.0000000e-01   7.0000000e-01   6.0000000e-01   1.9000000e+00   8.0000000e-01   1.1000000e+00   5.0000000e-01   1.0000000e+00   7.0000000e-01   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.4000000e+00   9.0000000e-01   1.2000000e+00   7.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   1.8000000e+00   2.0000000e+00   3.0000000e-01   8.0000000e-01   7.0000000e-01   1.8000000e+00   3.0000000e-01   8.0000000e-01   1.1000000e+00   3.0000000e-01   5.0000000e-01   7.0000000e-01   9.0000000e-01   1.2000000e+00   1.6000000e+00   7.0000000e-01   3.0000000e-01   7.0000000e-01   1.4000000e+00   9.0000000e-01   6.0000000e-01   5.0000000e-01   6.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   1.0000000e+00   1.0000000e+00   8.0000000e-01   4.0000000e-01   5.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   3.0000000e-01   1.2000000e+00   9.0000000e-01   1.0000000e+00   8.0000000e-01   4.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   2.0000000e-01   7.0000000e-01   1.4000000e+00   5.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   1.7000000e+00   6.0000000e-01   1.3000000e+00   7.0000000e-01   1.2000000e+00   9.0000000e-01   1.1000000e+00   1.9000000e+00   1.2000000e+00   1.6000000e+00   1.1000000e+00   1.4000000e+00   8.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   1.2000000e+00   1.1000000e+00   8.0000000e-01   2.0000000e+00   2.2000000e+00   6.0000000e-01   1.1000000e+00   8.0000000e-01   2.0000000e+00   6.0000000e-01   1.0000000e+00   1.3000000e+00   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.1000000e+00   1.4000000e+00   1.8000000e+00   1.0000000e+00   4.0000000e-01   9.0000000e-01   1.6000000e+00   1.2000000e+00   8.0000000e-01   6.0000000e-01   9.0000000e-01   1.2000000e+00   1.1000000e+00   7.0000000e-01   1.2000000e+00   1.3000000e+00   1.1000000e+00   7.0000000e-01   8.0000000e-01   1.1000000e+00   6.0000000e-01   2.0000000e-01   5.0000000e-01   7.0000000e-01   4.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   4.0000000e-01   6.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   3.0000000e-01   6.0000000e-01   1.4000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   2.0000000e-01   1.3000000e+00   7.0000000e-01   1.7000000e+00   8.0000000e-01   1.6000000e+00   1.3000000e+00   1.5000000e+00   2.3000000e+00   1.5000000e+00   2.0000000e+00   1.5000000e+00   1.8000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   1.2000000e+00   2.4000000e+00   2.6000000e+00   7.0000000e-01   1.4000000e+00   8.0000000e-01   2.4000000e+00   6.0000000e-01   1.4000000e+00   1.7000000e+00   5.0000000e-01   6.0000000e-01   1.3000000e+00   1.5000000e+00   1.8000000e+00   2.1000000e+00   1.3000000e+00   8.0000000e-01   1.3000000e+00   1.8000000e+00   1.3000000e+00   1.2000000e+00   5.0000000e-01   1.1000000e+00   1.3000000e+00   1.0000000e+00   8.0000000e-01   1.6000000e+00   1.4000000e+00   1.0000000e+00   7.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.1000000e+00   1.1000000e+00   8.0000000e-01   7.0000000e-01   1.2000000e+00   6.0000000e-01   3.0000000e-01   7.0000000e-01   1.0000000e+00   1.1000000e+00   1.1000000e+00   5.0000000e-01   8.0000000e-01   1.6000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   4.0000000e-01   1.5000000e+00   9.0000000e-01   1.6000000e+00   8.0000000e-01   1.5000000e+00   1.2000000e+00   1.4000000e+00   2.2000000e+00   1.7000000e+00   1.9000000e+00   1.4000000e+00   1.7000000e+00   7.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   1.0000000e+00   9.0000000e-01   1.1000000e+00   2.3000000e+00   2.5000000e+00   8.0000000e-01   1.3000000e+00   1.0000000e+00   2.3000000e+00   5.0000000e-01   1.3000000e+00   1.6000000e+00   4.0000000e-01   5.0000000e-01   1.2000000e+00   1.4000000e+00   1.7000000e+00   2.0000000e+00   1.2000000e+00   7.0000000e-01   1.2000000e+00   1.7000000e+00   1.2000000e+00   1.1000000e+00   6.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   8.0000000e-01   1.5000000e+00   1.3000000e+00   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   7.0000000e-01   3.0000000e-01   8.0000000e-01   1.3000000e+00   1.3000000e+00   1.3000000e+00   1.0000000e+00   8.0000000e-01   1.4000000e+00   8.0000000e-01   3.0000000e-01   5.0000000e-01   1.2000000e+00   1.3000000e+00   1.3000000e+00   7.0000000e-01   1.0000000e+00   1.8000000e+00   1.2000000e+00   1.1000000e+00   1.1000000e+00   6.0000000e-01   1.8000000e+00   1.1000000e+00   1.2000000e+00   1.0000000e+00   1.1000000e+00   8.0000000e-01   1.0000000e+00   1.8000000e+00   1.9000000e+00   1.5000000e+00   1.0000000e+00   1.3000000e+00   6.0000000e-01   5.0000000e-01   7.0000000e-01   1.1000000e+00   1.0000000e+00   9.0000000e-01   7.0000000e-01   1.9000000e+00   2.1000000e+00   8.0000000e-01   9.0000000e-01   1.2000000e+00   1.9000000e+00   5.0000000e-01   9.0000000e-01   1.2000000e+00   6.0000000e-01   7.0000000e-01   8.0000000e-01   1.0000000e+00   1.3000000e+00   1.6000000e+00   8.0000000e-01   5.0000000e-01   8.0000000e-01   1.3000000e+00   1.0000000e+00   7.0000000e-01   8.0000000e-01   7.0000000e-01   1.0000000e+00   9.0000000e-01   1.0000000e+00   1.1000000e+00   1.1000000e+00   9.0000000e-01   5.0000000e-01   6.0000000e-01   9.0000000e-01   9.0000000e-01   7.0000000e-01   1.5000000e+00   1.2000000e+00   1.3000000e+00   1.1000000e+00   7.0000000e-01   1.3000000e+00   7.0000000e-01   3.0000000e-01   7.0000000e-01   1.1000000e+00   1.2000000e+00   1.2000000e+00   6.0000000e-01   1.0000000e+00   1.7000000e+00   1.1000000e+00   1.0000000e+00   1.0000000e+00   7.0000000e-01   2.0000000e+00   1.0000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.6000000e+00   1.8000000e+00   1.3000000e+00   8.0000000e-01   1.1000000e+00   3.0000000e-01   3.0000000e-01   5.0000000e-01   1.0000000e+00   9.0000000e-01   6.0000000e-01   5.0000000e-01   1.7000000e+00   1.9000000e+00   8.0000000e-01   7.0000000e-01   1.1000000e+00   1.7000000e+00   4.0000000e-01   7.0000000e-01   1.0000000e+00   5.0000000e-01   6.0000000e-01   6.0000000e-01   8.0000000e-01   1.1000000e+00   1.4000000e+00   6.0000000e-01   4.0000000e-01   6.0000000e-01   1.1000000e+00   7.0000000e-01   5.0000000e-01   7.0000000e-01   4.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   7.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   1.0000000e-01   5.0000000e-01   1.2000000e+00   4.0000000e-01   3.0000000e-01   3.0000000e-01   2.0000000e-01   1.5000000e+00   4.0000000e-01   1.5000000e+00   6.0000000e-01   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   1.1000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   6.0000000e-01   8.0000000e-01   1.0000000e+00   5.0000000e-01   9.0000000e-01   8.0000000e-01   1.0000000e+00   2.2000000e+00   2.4000000e+00   7.0000000e-01   1.2000000e+00   5.0000000e-01   2.2000000e+00   4.0000000e-01   1.2000000e+00   1.5000000e+00   3.0000000e-01   4.0000000e-01   1.1000000e+00   1.3000000e+00   1.6000000e+00   1.9000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.7000000e+00   1.1000000e+00   1.0000000e+00   3.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   6.0000000e-01   1.4000000e+00   1.2000000e+00   8.0000000e-01   5.0000000e-01   7.0000000e-01   9.0000000e-01   6.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   1.6000000e+00   1.0000000e+00   1.0000000e+00   1.2000000e+00   9.0000000e-01   6.0000000e-01   5.0000000e-01   9.0000000e-01   1.1000000e+00   5.0000000e-01   7.0000000e-01   7.0000000e-01   7.0000000e-01   7.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   2.5000000e+00   1.6000000e+00   2.4000000e+00   2.1000000e+00   2.3000000e+00   3.1000000e+00   1.0000000e+00   2.8000000e+00   2.3000000e+00   2.6000000e+00   1.6000000e+00   1.8000000e+00   2.0000000e+00   1.5000000e+00   1.6000000e+00   1.8000000e+00   2.0000000e+00   3.2000000e+00   3.4000000e+00   1.5000000e+00   2.2000000e+00   1.4000000e+00   3.2000000e+00   1.4000000e+00   2.2000000e+00   2.5000000e+00   1.3000000e+00   1.4000000e+00   2.1000000e+00   2.3000000e+00   2.6000000e+00   2.9000000e+00   2.1000000e+00   1.6000000e+00   2.1000000e+00   2.6000000e+00   2.1000000e+00   2.0000000e+00   1.3000000e+00   1.9000000e+00   2.1000000e+00   1.6000000e+00   1.6000000e+00   2.4000000e+00   2.2000000e+00   1.7000000e+00   1.5000000e+00   1.7000000e+00   1.9000000e+00   1.6000000e+00   1.0000000e-01   3.0000000e-01   1.3000000e+00   7.0000000e-01   1.0000000e+00   1.2000000e+00   8.0000000e-01   6.0000000e-01   2.0000000e-01   6.0000000e-01   8.0000000e-01   3.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   8.0000000e-01   4.0000000e-01   2.2000000e+00   1.3000000e+00   2.1000000e+00   1.8000000e+00   2.0000000e+00   2.8000000e+00   7.0000000e-01   2.5000000e+00   2.0000000e+00   2.3000000e+00   1.3000000e+00   1.5000000e+00   1.7000000e+00   1.2000000e+00   1.3000000e+00   1.5000000e+00   1.7000000e+00   2.9000000e+00   3.1000000e+00   1.2000000e+00   1.9000000e+00   1.1000000e+00   2.9000000e+00   1.1000000e+00   1.9000000e+00   2.2000000e+00   1.0000000e+00   1.1000000e+00   1.8000000e+00   2.0000000e+00   2.3000000e+00   2.6000000e+00   1.8000000e+00   1.3000000e+00   1.8000000e+00   2.3000000e+00   1.8000000e+00   1.7000000e+00   1.0000000e+00   1.6000000e+00   1.8000000e+00   1.4000000e+00   1.3000000e+00   2.1000000e+00   1.9000000e+00   1.4000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   1.3000000e+00   3.0000000e-01   1.4000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   8.0000000e-01   6.0000000e-01   3.0000000e-01   7.0000000e-01   9.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   7.0000000e-01   4.0000000e-01   2.3000000e+00   1.4000000e+00   2.2000000e+00   1.9000000e+00   2.1000000e+00   2.9000000e+00   8.0000000e-01   2.6000000e+00   2.1000000e+00   2.4000000e+00   1.4000000e+00   1.6000000e+00   1.8000000e+00   1.3000000e+00   1.4000000e+00   1.6000000e+00   1.8000000e+00   3.0000000e+00   3.2000000e+00   1.3000000e+00   2.0000000e+00   1.2000000e+00   3.0000000e+00   1.2000000e+00   2.0000000e+00   2.3000000e+00   1.1000000e+00   1.2000000e+00   1.9000000e+00   2.1000000e+00   2.4000000e+00   2.7000000e+00   1.9000000e+00   1.4000000e+00   1.9000000e+00   2.4000000e+00   1.9000000e+00   1.8000000e+00   1.1000000e+00   1.7000000e+00   1.9000000e+00   1.4000000e+00   1.4000000e+00   2.2000000e+00   2.0000000e+00   1.5000000e+00   1.3000000e+00   1.5000000e+00   1.7000000e+00   1.4000000e+00   1.2000000e+00   6.0000000e-01   7.0000000e-01   9.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   5.0000000e-01   7.0000000e-01   1.0000000e-01   8.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   4.0000000e-01   9.0000000e-01   2.0000000e-01   2.1000000e+00   1.2000000e+00   2.0000000e+00   1.7000000e+00   1.9000000e+00   2.7000000e+00   9.0000000e-01   2.4000000e+00   1.9000000e+00   2.2000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.2000000e+00   1.4000000e+00   1.6000000e+00   2.8000000e+00   3.0000000e+00   1.1000000e+00   1.8000000e+00   1.0000000e+00   2.8000000e+00   1.0000000e+00   1.8000000e+00   2.1000000e+00   9.0000000e-01   1.0000000e+00   1.7000000e+00   1.9000000e+00   2.2000000e+00   2.5000000e+00   1.7000000e+00   1.2000000e+00   1.7000000e+00   2.2000000e+00   1.7000000e+00   1.6000000e+00   9.0000000e-01   1.5000000e+00   1.7000000e+00   1.2000000e+00   1.2000000e+00   2.0000000e+00   1.8000000e+00   1.3000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.2000000e+00   6.0000000e-01   7.0000000e-01   7.0000000e-01   7.0000000e-01   1.0000000e+00   1.1000000e+00   7.0000000e-01   5.0000000e-01   1.1000000e+00   1.8000000e+00   9.0000000e-01   9.0000000e-01   9.0000000e-01   8.0000000e-01   2.1000000e+00   1.0000000e+00   9.0000000e-01   3.0000000e-01   1.1000000e+00   5.0000000e-01   7.0000000e-01   1.6000000e+00   1.1000000e+00   1.3000000e+00   7.0000000e-01   1.2000000e+00   5.0000000e-01   4.0000000e-01   8.0000000e-01   4.0000000e-01   8.0000000e-01   7.0000000e-01   5.0000000e-01   1.7000000e+00   1.8000000e+00   5.0000000e-01   9.0000000e-01   4.0000000e-01   1.7000000e+00   3.0000000e-01   7.0000000e-01   1.2000000e+00   3.0000000e-01   3.0000000e-01   5.0000000e-01   1.2000000e+00   1.4000000e+00   1.9000000e+00   6.0000000e-01   3.0000000e-01   5.0000000e-01   1.7000000e+00   8.0000000e-01   4.0000000e-01   3.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   3.0000000e-01   8.0000000e-01   9.0000000e-01   7.0000000e-01   3.0000000e-01   5.0000000e-01   7.0000000e-01   3.0000000e-01   6.0000000e-01   1.3000000e+00   9.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   7.0000000e-01   5.0000000e-01   1.2000000e+00   3.0000000e-01   3.0000000e-01   3.0000000e-01   8.0000000e-01   1.5000000e+00   4.0000000e-01   1.5000000e+00   6.0000000e-01   1.7000000e+00   1.1000000e+00   1.3000000e+00   2.2000000e+00   5.0000000e-01   1.9000000e+00   1.3000000e+00   1.8000000e+00   1.1000000e+00   1.0000000e+00   1.4000000e+00   5.0000000e-01   9.0000000e-01   1.0000000e+00   1.1000000e+00   2.3000000e+00   2.4000000e+00   8.0000000e-01   1.5000000e+00   5.0000000e-01   2.3000000e+00   9.0000000e-01   1.3000000e+00   1.8000000e+00   8.0000000e-01   7.0000000e-01   1.1000000e+00   1.8000000e+00   2.0000000e+00   2.5000000e+00   1.1000000e+00   9.0000000e-01   1.1000000e+00   2.3000000e+00   1.1000000e+00   1.0000000e+00   6.0000000e-01   1.5000000e+00   1.3000000e+00   1.5000000e+00   6.0000000e-01   1.4000000e+00   1.3000000e+00   1.3000000e+00   9.0000000e-01   1.1000000e+00   9.0000000e-01   6.0000000e-01   7.0000000e-01   1.1000000e+00   4.0000000e-01   9.0000000e-01   8.0000000e-01   4.0000000e-01   8.0000000e-01   1.2000000e+00   7.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   1.5000000e+00   6.0000000e-01   1.5000000e+00   7.0000000e-01   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.1000000e+00   1.1000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   6.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   8.0000000e-01   8.0000000e-01   1.0000000e+00   2.2000000e+00   2.4000000e+00   1.2000000e+00   1.2000000e+00   6.0000000e-01   2.2000000e+00   7.0000000e-01   1.2000000e+00   1.5000000e+00   6.0000000e-01   4.0000000e-01   1.1000000e+00   1.3000000e+00   1.6000000e+00   1.9000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.7000000e+00   1.1000000e+00   1.0000000e+00   4.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   7.0000000e-01   1.4000000e+00   1.2000000e+00   7.0000000e-01   9.0000000e-01   7.0000000e-01   9.0000000e-01   6.0000000e-01   8.0000000e-01   1.1000000e+00   1.2000000e+00   1.2000000e+00   6.0000000e-01   9.0000000e-01   1.7000000e+00   1.1000000e+00   1.0000000e+00   1.0000000e+00   5.0000000e-01   1.7000000e+00   1.0000000e+00   1.3000000e+00   9.0000000e-01   1.2000000e+00   9.0000000e-01   1.1000000e+00   1.9000000e+00   1.8000000e+00   1.6000000e+00   1.1000000e+00   1.4000000e+00   5.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   8.0000000e-01   8.0000000e-01   2.0000000e+00   2.2000000e+00   9.0000000e-01   1.0000000e+00   1.1000000e+00   2.0000000e+00   4.0000000e-01   1.0000000e+00   1.3000000e+00   5.0000000e-01   6.0000000e-01   9.0000000e-01   1.1000000e+00   1.4000000e+00   1.7000000e+00   9.0000000e-01   4.0000000e-01   9.0000000e-01   1.4000000e+00   9.0000000e-01   8.0000000e-01   7.0000000e-01   7.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   1.2000000e+00   1.0000000e+00   8.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   8.0000000e-01   7.0000000e-01   8.0000000e-01   8.0000000e-01   7.0000000e-01   5.0000000e-01   1.3000000e+00   7.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   1.4000000e+00   6.0000000e-01   1.6000000e+00   7.0000000e-01   1.5000000e+00   1.2000000e+00   1.4000000e+00   2.2000000e+00   1.4000000e+00   1.9000000e+00   1.4000000e+00   1.7000000e+00   9.0000000e-01   9.0000000e-01   1.1000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   1.1000000e+00   2.3000000e+00   2.5000000e+00   6.0000000e-01   1.3000000e+00   7.0000000e-01   2.3000000e+00   5.0000000e-01   1.3000000e+00   1.6000000e+00   5.0000000e-01   7.0000000e-01   1.2000000e+00   1.4000000e+00   1.7000000e+00   2.0000000e+00   1.2000000e+00   7.0000000e-01   1.2000000e+00   1.7000000e+00   1.2000000e+00   1.1000000e+00   7.0000000e-01   1.0000000e+00   1.2000000e+00   1.0000000e+00   7.0000000e-01   1.5000000e+00   1.3000000e+00   1.0000000e+00   6.0000000e-01   8.0000000e-01   1.1000000e+00   7.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   3.0000000e-01   1.0000000e-01   1.0000000e-01   6.0000000e-01   1.1000000e+00   2.0000000e-01   1.9000000e+00   1.0000000e+00   1.8000000e+00   1.5000000e+00   1.7000000e+00   2.5000000e+00   7.0000000e-01   2.2000000e+00   1.7000000e+00   2.0000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   9.0000000e-01   1.1000000e+00   1.2000000e+00   1.4000000e+00   2.6000000e+00   2.8000000e+00   9.0000000e-01   1.6000000e+00   8.0000000e-01   2.6000000e+00   8.0000000e-01   1.6000000e+00   1.9000000e+00   7.0000000e-01   8.0000000e-01   1.5000000e+00   1.7000000e+00   2.0000000e+00   2.3000000e+00   1.5000000e+00   1.0000000e+00   1.5000000e+00   2.1000000e+00   1.5000000e+00   1.4000000e+00   7.0000000e-01   1.3000000e+00   1.5000000e+00   1.3000000e+00   1.0000000e+00   1.8000000e+00   1.6000000e+00   1.1000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   1.0000000e+00   4.0000000e-01   6.0000000e-01   3.0000000e-01   7.0000000e-01   2.0000000e-01   5.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e+00   3.0000000e-01   2.0000000e+00   1.1000000e+00   1.9000000e+00   1.6000000e+00   1.8000000e+00   2.6000000e+00   6.0000000e-01   2.3000000e+00   1.8000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.0000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   2.7000000e+00   2.9000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   2.7000000e+00   9.0000000e-01   1.7000000e+00   2.0000000e+00   8.0000000e-01   9.0000000e-01   1.6000000e+00   1.8000000e+00   2.1000000e+00   2.4000000e+00   1.6000000e+00   1.1000000e+00   1.6000000e+00   2.2000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   1.4000000e+00   1.1000000e+00   1.9000000e+00   1.7000000e+00   1.2000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.1000000e+00   6.0000000e-01   4.0000000e-01   1.1000000e+00   2.0000000e-01   4.0000000e-01   3.0000000e-01   7.0000000e-01   1.4000000e+00   3.0000000e-01   1.6000000e+00   7.0000000e-01   1.6000000e+00   1.2000000e+00   1.4000000e+00   2.2000000e+00   6.0000000e-01   1.9000000e+00   1.4000000e+00   1.7000000e+00   1.0000000e+00   9.0000000e-01   1.3000000e+00   8.0000000e-01   1.2000000e+00   1.1000000e+00   1.1000000e+00   2.3000000e+00   2.5000000e+00   6.0000000e-01   1.4000000e+00   8.0000000e-01   2.3000000e+00   8.0000000e-01   1.3000000e+00   1.7000000e+00   7.0000000e-01   6.0000000e-01   1.2000000e+00   1.7000000e+00   1.9000000e+00   2.4000000e+00   1.2000000e+00   8.0000000e-01   1.2000000e+00   2.2000000e+00   1.2000000e+00   1.1000000e+00   6.0000000e-01   1.4000000e+00   1.2000000e+00   1.4000000e+00   7.0000000e-01   1.5000000e+00   1.3000000e+00   1.2000000e+00   8.0000000e-01   1.0000000e+00   1.1000000e+00   7.0000000e-01   6.0000000e-01   1.3000000e+00   5.0000000e-01   4.0000000e-01   4.0000000e-01   3.0000000e-01   1.6000000e+00   5.0000000e-01   1.4000000e+00   5.0000000e-01   1.3000000e+00   1.0000000e+00   1.2000000e+00   2.0000000e+00   1.2000000e+00   1.7000000e+00   1.2000000e+00   1.5000000e+00   6.0000000e-01   7.0000000e-01   9.0000000e-01   6.0000000e-01   1.0000000e+00   9.0000000e-01   9.0000000e-01   2.1000000e+00   2.3000000e+00   8.0000000e-01   1.1000000e+00   6.0000000e-01   2.1000000e+00   4.0000000e-01   1.1000000e+00   1.4000000e+00   4.0000000e-01   4.0000000e-01   1.0000000e+00   1.2000000e+00   1.5000000e+00   1.8000000e+00   1.0000000e+00   5.0000000e-01   1.0000000e+00   1.6000000e+00   1.0000000e+00   9.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   1.3000000e+00   1.1000000e+00   9.0000000e-01   5.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   8.0000000e-01   2.0000000e-01   4.0000000e-01   3.0000000e-01   4.0000000e-01   1.0000000e+00   2.0000000e-01   2.0000000e+00   1.1000000e+00   1.9000000e+00   1.6000000e+00   1.8000000e+00   2.6000000e+00   9.0000000e-01   2.3000000e+00   1.8000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   1.5000000e+00   1.0000000e+00   1.2000000e+00   1.3000000e+00   1.5000000e+00   2.7000000e+00   2.9000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   2.7000000e+00   9.0000000e-01   1.7000000e+00   2.0000000e+00   8.0000000e-01   9.0000000e-01   1.6000000e+00   1.8000000e+00   2.1000000e+00   2.4000000e+00   1.6000000e+00   1.1000000e+00   1.6000000e+00   2.1000000e+00   1.6000000e+00   1.5000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   1.1000000e+00   1.1000000e+00   1.9000000e+00   1.7000000e+00   1.2000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   1.1000000e+00   9.0000000e-01   9.0000000e-01   9.0000000e-01   1.2000000e+00   3.0000000e-01   8.0000000e-01   2.7000000e+00   1.8000000e+00   2.6000000e+00   2.3000000e+00   2.5000000e+00   3.3000000e+00   1.2000000e+00   3.0000000e+00   2.5000000e+00   2.8000000e+00   1.8000000e+00   2.0000000e+00   2.2000000e+00   1.7000000e+00   1.8000000e+00   2.0000000e+00   2.2000000e+00   3.4000000e+00   3.6000000e+00   1.7000000e+00   2.4000000e+00   1.6000000e+00   3.4000000e+00   1.6000000e+00   2.4000000e+00   2.7000000e+00   1.5000000e+00   1.6000000e+00   2.3000000e+00   2.5000000e+00   2.8000000e+00   3.1000000e+00   2.3000000e+00   1.8000000e+00   2.3000000e+00   2.8000000e+00   2.3000000e+00   2.2000000e+00   1.5000000e+00   2.1000000e+00   2.3000000e+00   1.9000000e+00   1.8000000e+00   2.6000000e+00   2.4000000e+00   1.9000000e+00   1.7000000e+00   1.9000000e+00   2.1000000e+00   1.8000000e+00   3.0000000e-01   2.0000000e-01   6.0000000e-01   1.2000000e+00   1.0000000e-01   1.8000000e+00   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.6000000e+00   2.4000000e+00   7.0000000e-01   2.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   8.0000000e-01   1.1000000e+00   1.1000000e+00   1.3000000e+00   2.5000000e+00   2.7000000e+00   8.0000000e-01   1.5000000e+00   7.0000000e-01   2.5000000e+00   7.0000000e-01   1.5000000e+00   1.8000000e+00   6.0000000e-01   7.0000000e-01   1.4000000e+00   1.6000000e+00   1.9000000e+00   2.3000000e+00   1.4000000e+00   9.0000000e-01   1.4000000e+00   2.1000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.3000000e+00   1.4000000e+00   1.3000000e+00   9.0000000e-01   1.7000000e+00   1.5000000e+00   1.1000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   1.0000000e-01   5.0000000e-01   1.2000000e+00   2.0000000e-01   1.8000000e+00   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.6000000e+00   2.4000000e+00   8.0000000e-01   2.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   8.0000000e-01   1.2000000e+00   1.1000000e+00   1.3000000e+00   2.5000000e+00   2.7000000e+00   8.0000000e-01   1.5000000e+00   8.0000000e-01   2.5000000e+00   7.0000000e-01   1.5000000e+00   1.8000000e+00   6.0000000e-01   7.0000000e-01   1.4000000e+00   1.6000000e+00   1.9000000e+00   2.2000000e+00   1.4000000e+00   9.0000000e-01   1.4000000e+00   2.0000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.2000000e+00   1.4000000e+00   1.2000000e+00   9.0000000e-01   1.7000000e+00   1.5000000e+00   1.1000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   5.0000000e-01   1.2000000e+00   1.0000000e-01   1.8000000e+00   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.6000000e+00   2.4000000e+00   8.0000000e-01   2.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   8.0000000e-01   1.1000000e+00   1.1000000e+00   1.3000000e+00   2.5000000e+00   2.7000000e+00   8.0000000e-01   1.5000000e+00   7.0000000e-01   2.5000000e+00   7.0000000e-01   1.5000000e+00   1.8000000e+00   6.0000000e-01   7.0000000e-01   1.4000000e+00   1.6000000e+00   1.9000000e+00   2.2000000e+00   1.4000000e+00   9.0000000e-01   1.4000000e+00   2.0000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.2000000e+00   1.4000000e+00   1.2000000e+00   9.0000000e-01   1.7000000e+00   1.5000000e+00   1.0000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   1.3000000e+00   5.0000000e-01   1.7000000e+00   8.0000000e-01   1.6000000e+00   1.3000000e+00   1.5000000e+00   2.3000000e+00   1.3000000e+00   2.0000000e+00   1.5000000e+00   1.8000000e+00   8.0000000e-01   1.0000000e+00   1.2000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   1.2000000e+00   2.4000000e+00   2.6000000e+00   7.0000000e-01   1.4000000e+00   7.0000000e-01   2.4000000e+00   6.0000000e-01   1.4000000e+00   1.7000000e+00   5.0000000e-01   6.0000000e-01   1.3000000e+00   1.5000000e+00   1.8000000e+00   2.1000000e+00   1.3000000e+00   8.0000000e-01   1.3000000e+00   1.8000000e+00   1.3000000e+00   1.2000000e+00   5.0000000e-01   1.1000000e+00   1.3000000e+00   1.0000000e+00   8.0000000e-01   1.6000000e+00   1.4000000e+00   1.0000000e+00   7.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   1.1000000e+00   3.0000000e+00   2.1000000e+00   2.9000000e+00   2.6000000e+00   2.8000000e+00   3.6000000e+00   1.5000000e+00   3.3000000e+00   2.8000000e+00   3.1000000e+00   2.1000000e+00   2.3000000e+00   2.5000000e+00   2.0000000e+00   2.1000000e+00   2.3000000e+00   2.5000000e+00   3.7000000e+00   3.9000000e+00   2.0000000e+00   2.7000000e+00   1.9000000e+00   3.7000000e+00   1.9000000e+00   2.7000000e+00   3.0000000e+00   1.8000000e+00   1.9000000e+00   2.6000000e+00   2.8000000e+00   3.1000000e+00   3.4000000e+00   2.6000000e+00   2.1000000e+00   2.6000000e+00   3.1000000e+00   2.6000000e+00   2.5000000e+00   1.8000000e+00   2.4000000e+00   2.6000000e+00   2.1000000e+00   2.1000000e+00   2.9000000e+00   2.7000000e+00   2.2000000e+00   2.0000000e+00   2.2000000e+00   2.4000000e+00   2.1000000e+00   1.9000000e+00   1.0000000e+00   1.8000000e+00   1.5000000e+00   1.7000000e+00   2.5000000e+00   8.0000000e-01   2.2000000e+00   1.7000000e+00   2.0000000e+00   1.0000000e+00   1.2000000e+00   1.4000000e+00   9.0000000e-01   1.1000000e+00   1.2000000e+00   1.4000000e+00   2.6000000e+00   2.8000000e+00   9.0000000e-01   1.6000000e+00   8.0000000e-01   2.6000000e+00   8.0000000e-01   1.6000000e+00   1.9000000e+00   7.0000000e-01   8.0000000e-01   1.5000000e+00   1.7000000e+00   2.0000000e+00   2.3000000e+00   1.5000000e+00   1.0000000e+00   1.5000000e+00   2.0000000e+00   1.5000000e+00   1.4000000e+00   7.0000000e-01   1.3000000e+00   1.5000000e+00   1.2000000e+00   1.0000000e+00   1.8000000e+00   1.6000000e+00   1.1000000e+00   9.0000000e-01   1.1000000e+00   1.3000000e+00   1.0000000e+00   9.0000000e-01   8.0000000e-01   7.0000000e-01   3.0000000e-01   1.3000000e+00   1.5000000e+00   1.0000000e+00   8.0000000e-01   9.0000000e-01   9.0000000e-01   7.0000000e-01   5.0000000e-01   1.0000000e+00   9.0000000e-01   7.0000000e-01   7.0000000e-01   1.4000000e+00   1.4000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.4000000e+00   1.1000000e+00   4.0000000e-01   9.0000000e-01   1.2000000e+00   1.1000000e+00   5.0000000e-01   9.0000000e-01   1.1000000e+00   1.6000000e+00   5.0000000e-01   1.0000000e+00   1.1000000e+00   1.4000000e+00   4.0000000e-01   7.0000000e-01   1.2000000e+00   6.0000000e-01   4.0000000e-01   9.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   8.0000000e-01   6.0000000e-01   9.0000000e-01   1.3000000e+00   5.0000000e-01   7.0000000e-01   1.8000000e+00   9.0000000e-01   1.5000000e+00   9.0000000e-01   1.4000000e+00   7.0000000e-01   6.0000000e-01   1.0000000e+00   2.0000000e-01   5.0000000e-01   6.0000000e-01   7.0000000e-01   1.9000000e+00   1.9000000e+00   5.0000000e-01   1.1000000e+00   2.0000000e-01   1.9000000e+00   5.0000000e-01   9.0000000e-01   1.4000000e+00   4.0000000e-01   3.0000000e-01   6.0000000e-01   1.4000000e+00   1.6000000e+00   2.1000000e+00   6.0000000e-01   5.0000000e-01   5.0000000e-01   1.9000000e+00   7.0000000e-01   6.0000000e-01   3.0000000e-01   1.1000000e+00   9.0000000e-01   1.1000000e+00   0.0000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   5.0000000e-01   7.0000000e-01   7.0000000e-01   3.0000000e-01   8.0000000e-01   6.0000000e-01   7.0000000e-01   2.2000000e+00   4.0000000e-01   5.0000000e-01   6.0000000e-01   8.0000000e-01   7.0000000e-01   4.0000000e-01   1.4000000e+00   1.3000000e+00   7.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   1.1000000e+00   2.0000000e-01   1.5000000e+00   8.0000000e-01   1.0000000e+00   4.0000000e-01   3.0000000e-01   1.1000000e+00   1.0000000e+00   7.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   7.0000000e-01   8.0000000e-01   1.0000000e+00   6.0000000e-01   8.0000000e-01   7.0000000e-01   1.1000000e+00   5.0000000e-01   4.0000000e-01   8.0000000e-01   1.3000000e+00   3.0000000e-01   4.0000000e-01   7.0000000e-01   9.0000000e-01   7.0000000e-01   9.0000000e-01   1.2000000e+00   4.0000000e-01   1.3000000e+00   1.4000000e+00   1.0000000e+00   4.0000000e-01   9.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   2.0000000e-01   1.4000000e+00   1.4000000e+00   7.0000000e-01   6.0000000e-01   7.0000000e-01   1.4000000e+00   7.0000000e-01   4.0000000e-01   9.0000000e-01   8.0000000e-01   7.0000000e-01   3.0000000e-01   9.0000000e-01   1.1000000e+00   1.6000000e+00   4.0000000e-01   5.0000000e-01   4.0000000e-01   1.4000000e+00   6.0000000e-01   2.0000000e-01   8.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   1.1000000e+00   1.6000000e+00   8.0000000e-01   5.0000000e-01   7.0000000e-01   7.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   7.0000000e-01   5.0000000e-01   4.0000000e-01   1.2000000e+00   1.2000000e+00   8.0000000e-01   4.0000000e-01   9.0000000e-01   1.2000000e+00   9.0000000e-01   3.0000000e-01   7.0000000e-01   1.0000000e+00   9.0000000e-01   2.0000000e-01   7.0000000e-01   9.0000000e-01   1.4000000e+00   2.0000000e-01   7.0000000e-01   8.0000000e-01   1.2000000e+00   4.0000000e-01   4.0000000e-01   1.0000000e+00   4.0000000e-01   2.0000000e-01   7.0000000e-01   7.0000000e-01   3.0000000e-01   3.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   2.7000000e+00   3.0000000e-01   9.0000000e-01   6.0000000e-01   1.5000000e+00   1.3000000e+00   1.1000000e+00   1.9000000e+00   1.8000000e+00   1.3000000e+00   1.1000000e+00   8.0000000e-01   4.0000000e-01   1.6000000e+00   9.0000000e-01   2.0000000e+00   2.0000000e-01   1.7000000e+00   9.0000000e-01   6.0000000e-01   1.8000000e+00   1.7000000e+00   1.2000000e+00   8.0000000e-01   5.0000000e-01   8.0000000e-01   1.2000000e+00   1.5000000e+00   1.5000000e+00   5.0000000e-01   1.3000000e+00   1.2000000e+00   1.8000000e+00   1.2000000e+00   1.0000000e+00   1.5000000e+00   1.8000000e+00   8.0000000e-01   9.0000000e-01   1.4000000e+00   1.6000000e+00   1.4000000e+00   1.4000000e+00   1.7000000e+00   2.4000000e+00   1.8000000e+00   2.3000000e+00   1.6000000e+00   1.5000000e+00   1.9000000e+00   8.0000000e-01   9.0000000e-01   1.5000000e+00   1.6000000e+00   2.8000000e+00   2.8000000e+00   1.1000000e+00   2.0000000e+00   7.0000000e-01   2.8000000e+00   1.4000000e+00   1.8000000e+00   2.3000000e+00   1.3000000e+00   1.2000000e+00   1.5000000e+00   2.3000000e+00   2.5000000e+00   3.0000000e+00   1.5000000e+00   1.4000000e+00   1.2000000e+00   2.8000000e+00   1.4000000e+00   1.5000000e+00   1.1000000e+00   2.0000000e+00   1.8000000e+00   2.0000000e+00   9.0000000e-01   1.9000000e+00   1.8000000e+00   1.8000000e+00   1.4000000e+00   1.6000000e+00   1.3000000e+00   1.0000000e+00   6.0000000e-01   7.0000000e-01   1.2000000e+00   1.0000000e+00   8.0000000e-01   1.6000000e+00   1.5000000e+00   1.0000000e+00   8.0000000e-01   9.0000000e-01   6.0000000e-01   1.3000000e+00   6.0000000e-01   1.7000000e+00   4.0000000e-01   1.4000000e+00   6.0000000e-01   3.0000000e-01   1.5000000e+00   1.4000000e+00   9.0000000e-01   5.0000000e-01   2.0000000e-01   9.0000000e-01   9.0000000e-01   1.2000000e+00   1.2000000e+00   5.0000000e-01   1.0000000e+00   9.0000000e-01   1.5000000e+00   9.0000000e-01   7.0000000e-01   1.2000000e+00   1.5000000e+00   5.0000000e-01   7.0000000e-01   1.1000000e+00   1.3000000e+00   1.1000000e+00   1.1000000e+00   1.4000000e+00   1.1000000e+00   7.0000000e-01   5.0000000e-01   5.0000000e-01   1.0000000e+00   9.0000000e-01   7.0000000e-01   5.0000000e-01   1.3000000e+00   1.1000000e+00   8.0000000e-01   7.0000000e-01   1.1000000e+00   1.0000000e+00   9.0000000e-01   8.0000000e-01   7.0000000e-01   1.0000000e+00   9.0000000e-01   3.0000000e-01   5.0000000e-01   7.0000000e-01   1.3000000e+00   4.0000000e-01   7.0000000e-01   6.0000000e-01   1.0000000e+00   9.0000000e-01   6.0000000e-01   1.0000000e+00   6.0000000e-01   6.0000000e-01   7.0000000e-01   9.0000000e-01   7.0000000e-01   8.0000000e-01   6.0000000e-01   8.0000000e-01   6.0000000e-01   9.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   6.0000000e-01   1.5000000e+00   1.4000000e+00   8.0000000e-01   7.0000000e-01   6.0000000e-01   1.0000000e+00   1.4000000e+00   4.0000000e-01   1.6000000e+00   8.0000000e-01   1.2000000e+00   5.0000000e-01   7.0000000e-01   1.3000000e+00   1.2000000e+00   8.0000000e-01   9.0000000e-01   8.0000000e-01   7.0000000e-01   8.0000000e-01   1.0000000e+00   1.1000000e+00   6.0000000e-01   9.0000000e-01   8.0000000e-01   1.3000000e+00   7.0000000e-01   5.0000000e-01   1.0000000e+00   1.4000000e+00   4.0000000e-01   5.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   1.0000000e+00   1.3000000e+00   5.0000000e-01   4.0000000e-01   8.0000000e-01   7.0000000e-01   3.0000000e-01   4.0000000e-01   1.6000000e+00   1.8000000e+00   1.0000000e+00   6.0000000e-01   9.0000000e-01   1.6000000e+00   5.0000000e-01   6.0000000e-01   9.0000000e-01   4.0000000e-01   4.0000000e-01   5.0000000e-01   7.0000000e-01   1.0000000e+00   1.4000000e+00   5.0000000e-01   5.0000000e-01   6.0000000e-01   1.2000000e+00   5.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   6.0000000e-01   3.0000000e-01   7.0000000e-01   2.0000000e-01   3.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   1.4000000e+00   1.6000000e+00   5.0000000e-01   5.0000000e-01   8.0000000e-01   1.4000000e+00   4.0000000e-01   6.0000000e-01   8.0000000e-01   5.0000000e-01   4.0000000e-01   3.0000000e-01   8.0000000e-01   1.0000000e+00   1.5000000e+00   3.0000000e-01   4.0000000e-01   5.0000000e-01   1.3000000e+00   7.0000000e-01   4.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   4.0000000e-01   3.0000000e-01   3.0000000e-01   7.0000000e-01   5.0000000e-01   1.1000000e+00   1.0000000e+00   4.0000000e-01   3.0000000e-01   1.2000000e+00   1.4000000e+00   8.0000000e-01   2.0000000e-01   1.2000000e+00   1.2000000e+00   6.0000000e-01   3.0000000e-01   5.0000000e-01   7.0000000e-01   7.0000000e-01   4.0000000e-01   5.0000000e-01   6.0000000e-01   1.1000000e+00   4.0000000e-01   6.0000000e-01   7.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e-01   3.0000000e-01   4.0000000e-01   1.0000000e+00   4.0000000e-01   4.0000000e-01   3.0000000e-01   5.0000000e-01   3.0000000e-01   6.0000000e-01   9.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   2.0000000e+00   2.0000000e+00   5.0000000e-01   1.2000000e+00   3.0000000e-01   2.0000000e+00   6.0000000e-01   1.0000000e+00   1.5000000e+00   5.0000000e-01   5.0000000e-01   7.0000000e-01   1.5000000e+00   1.7000000e+00   2.2000000e+00   7.0000000e-01   6.0000000e-01   6.0000000e-01   2.0000000e+00   9.0000000e-01   7.0000000e-01   5.0000000e-01   1.2000000e+00   1.0000000e+00   1.2000000e+00   2.0000000e-01   1.1000000e+00   1.0000000e+00   1.0000000e+00   6.0000000e-01   8.0000000e-01   9.0000000e-01   5.0000000e-01   6.0000000e-01   7.0000000e-01   1.9000000e+00   1.9000000e+00   9.0000000e-01   1.1000000e+00   4.0000000e-01   1.9000000e+00   6.0000000e-01   9.0000000e-01   1.4000000e+00   6.0000000e-01   6.0000000e-01   6.0000000e-01   1.4000000e+00   1.6000000e+00   2.1000000e+00   6.0000000e-01   9.0000000e-01   1.0000000e+00   1.9000000e+00   6.0000000e-01   6.0000000e-01   6.0000000e-01   1.1000000e+00   9.0000000e-01   1.1000000e+00   5.0000000e-01   1.0000000e+00   9.0000000e-01   9.0000000e-01   5.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   5.0000000e-01   1.4000000e+00   1.6000000e+00   1.0000000e+00   5.0000000e-01   8.0000000e-01   1.4000000e+00   5.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   4.0000000e-01   8.0000000e-01   1.0000000e+00   1.5000000e+00   4.0000000e-01   8.0000000e-01   9.0000000e-01   1.3000000e+00   3.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   6.0000000e-01   4.0000000e-01   3.0000000e-01   7.0000000e-01   3.0000000e-01   2.0000000e-01   5.0000000e-01   1.2000000e+00   1.4000000e+00   8.0000000e-01   5.0000000e-01   9.0000000e-01   1.2000000e+00   6.0000000e-01   3.0000000e-01   7.0000000e-01   7.0000000e-01   6.0000000e-01   3.0000000e-01   7.0000000e-01   9.0000000e-01   1.4000000e+00   4.0000000e-01   4.0000000e-01   4.0000000e-01   1.2000000e+00   6.0000000e-01   1.0000000e-01   7.0000000e-01   4.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   1.2000000e+00   1.7000000e+00   1.0000000e+00   2.1000000e+00   1.0000000e+00   1.8000000e+00   1.0000000e+00   7.0000000e-01   1.9000000e+00   1.8000000e+00   1.3000000e+00   9.0000000e-01   1.0000000e+00   3.0000000e-01   1.3000000e+00   1.6000000e+00   1.6000000e+00   8.0000000e-01   1.4000000e+00   1.3000000e+00   1.9000000e+00   1.3000000e+00   1.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.0000000e+00   1.5000000e+00   1.7000000e+00   1.5000000e+00   1.5000000e+00   1.8000000e+00   1.9000000e+00   1.2000000e+00   2.1000000e+00   3.0000000e-01   2.0000000e+00   1.2000000e+00   9.0000000e-01   2.1000000e+00   2.0000000e+00   1.3000000e+00   1.1000000e+00   8.0000000e-01   1.2000000e+00   1.3000000e+00   1.8000000e+00   1.6000000e+00   8.0000000e-01   1.4000000e+00   1.4000000e+00   2.1000000e+00   1.5000000e+00   1.3000000e+00   1.8000000e+00   1.9000000e+00   1.0000000e+00   1.2000000e+00   1.7000000e+00   1.9000000e+00   1.7000000e+00   1.5000000e+00   1.8000000e+00   1.0000000e+00   6.0000000e-01   1.7000000e+00   5.0000000e-01   1.1000000e+00   1.2000000e+00   6.0000000e-01   8.0000000e-01   6.0000000e-01   1.2000000e+00   1.4000000e+00   1.9000000e+00   7.0000000e-01   6.0000000e-01   6.0000000e-01   1.7000000e+00   1.2000000e+00   9.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   9.0000000e-01   5.0000000e-01   1.0000000e+00   1.1000000e+00   8.0000000e-01   4.0000000e-01   8.0000000e-01   1.2000000e+00   8.0000000e-01   1.3000000e+00   1.0000000e+00   8.0000000e-01   2.0000000e-01   5.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   1.0000000e+00   5.0000000e-01   8.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   5.0000000e-01   9.0000000e-01   3.0000000e-01   2.0000000e-01   6.0000000e-01   1.1000000e+00   2.0000000e-01   2.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   7.0000000e-01   1.0000000e+00   2.1000000e+00   7.0000000e-01   1.1000000e+00   1.6000000e+00   6.0000000e-01   5.0000000e-01   8.0000000e-01   1.6000000e+00   1.8000000e+00   2.3000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   2.1000000e+00   7.0000000e-01   8.0000000e-01   4.0000000e-01   1.3000000e+00   1.1000000e+00   1.3000000e+00   2.0000000e-01   1.2000000e+00   1.1000000e+00   1.1000000e+00   7.0000000e-01   9.0000000e-01   6.0000000e-01   3.0000000e-01   1.8000000e+00   1.0000000e+00   7.0000000e-01   1.9000000e+00   1.8000000e+00   1.3000000e+00   9.0000000e-01   6.0000000e-01   1.0000000e+00   1.3000000e+00   1.6000000e+00   1.6000000e+00   6.0000000e-01   1.4000000e+00   1.3000000e+00   1.9000000e+00   1.3000000e+00   1.1000000e+00   1.6000000e+00   1.9000000e+00   9.0000000e-01   1.0000000e+00   1.5000000e+00   1.7000000e+00   1.5000000e+00   1.5000000e+00   1.8000000e+00   8.0000000e-01   1.1000000e+00   1.0000000e-01   3.0000000e-01   7.0000000e-01   9.0000000e-01   1.2000000e+00   1.6000000e+00   7.0000000e-01   3.0000000e-01   7.0000000e-01   1.4000000e+00   7.0000000e-01   6.0000000e-01   3.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   5.0000000e-01   1.0000000e+00   8.0000000e-01   5.0000000e-01   2.0000000e-01   3.0000000e-01   7.0000000e-01   4.0000000e-01   5.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   1.2000000e+00   5.0000000e-01   6.0000000e-01   7.0000000e-01   1.0000000e+00   4.0000000e-01   3.0000000e-01   9.0000000e-01   3.0000000e-01   3.0000000e-01   6.0000000e-01   9.0000000e-01   2.0000000e-01   4.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   8.0000000e-01   1.2000000e+00   1.1000000e+00   8.0000000e-01   2.0000000e-01   4.0000000e-01   7.0000000e-01   8.0000000e-01   9.0000000e-01   1.1000000e+00   5.0000000e-01   9.0000000e-01   8.0000000e-01   1.2000000e+00   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.4000000e+00   5.0000000e-01   7.0000000e-01   8.0000000e-01   1.0000000e+00   8.0000000e-01   1.0000000e+00   1.3000000e+00   2.0000000e-01   8.0000000e-01   1.0000000e+00   1.3000000e+00   1.7000000e+00   8.0000000e-01   3.0000000e-01   8.0000000e-01   1.5000000e+00   8.0000000e-01   7.0000000e-01   2.0000000e-01   7.0000000e-01   8.0000000e-01   7.0000000e-01   4.0000000e-01   1.1000000e+00   9.0000000e-01   5.0000000e-01   3.0000000e-01   4.0000000e-01   6.0000000e-01   3.0000000e-01   7.0000000e-01   1.1000000e+00   1.3000000e+00   1.8000000e+00   7.0000000e-01   3.0000000e-01   7.0000000e-01   1.6000000e+00   7.0000000e-01   6.0000000e-01   1.0000000e-01   8.0000000e-01   7.0000000e-01   8.0000000e-01   3.0000000e-01   1.0000000e+00   8.0000000e-01   6.0000000e-01   5.0000000e-01   4.0000000e-01   5.0000000e-01   2.0000000e-01   8.0000000e-01   1.0000000e+00   1.5000000e+00   1.0000000e-01   6.0000000e-01   7.0000000e-01   1.3000000e+00   6.0000000e-01   3.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   8.0000000e-01   8.0000000e-01   9.0000000e-01   1.1000000e+00   7.0000000e-01   9.0000000e-01   8.0000000e-01   1.2000000e+00   5.0000000e-01   8.0000000e-01   7.0000000e-01   1.4000000e+00   7.0000000e-01   9.0000000e-01   7.0000000e-01   9.0000000e-01   7.0000000e-01   1.0000000e+00   1.3000000e+00   1.0000000e+00   1.0000000e+00   1.1000000e+00   1.3000000e+00   4.0000000e-01   1.1000000e+00   1.0000000e+00   1.4000000e+00   7.0000000e-01   7.0000000e-01   1.0000000e+00   1.6000000e+00   6.0000000e-01   7.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   1.2000000e+00   1.5000000e+00   1.5000000e+00   1.6000000e+00   1.8000000e+00   8.0000000e-01   1.6000000e+00   1.5000000e+00   1.9000000e+00   1.0000000e+00   1.2000000e+00   1.3000000e+00   2.1000000e+00   1.1000000e+00   1.2000000e+00   1.2000000e+00   1.6000000e+00   1.4000000e+00   1.7000000e+00   2.0000000e+00   7.0000000e-01   8.0000000e-01   1.3000000e+00   6.0000000e-01   4.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   6.0000000e-01   5.0000000e-01   5.0000000e-01   1.4000000e+00   9.0000000e-01   4.0000000e-01   3.0000000e-01   6.0000000e-01   9.0000000e-01   8.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   8.0000000e-01   4.0000000e-01   5.0000000e-01   8.0000000e-01   4.0000000e-01   1.6000000e+00   1.0000000e+00   5.0000000e-01   8.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   9.0000000e-01   1.1000000e+00   9.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   1.4000000e+00   1.3000000e+00   1.7000000e+00   8.0000000e-01   1.0000000e+00   1.0000000e+00   1.9000000e+00   9.0000000e-01   1.0000000e+00   1.0000000e+00   1.4000000e+00   1.2000000e+00   1.5000000e+00   1.8000000e+00   6.0000000e-01   8.0000000e-01   6.0000000e-01   4.0000000e-01   6.0000000e-01   7.0000000e-01   5.0000000e-01   4.0000000e-01   4.0000000e-01   9.0000000e-01   4.0000000e-01   2.0000000e-01   6.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   6.0000000e-01   5.0000000e-01   7.0000000e-01   5.0000000e-01   6.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   9.0000000e-01   8.0000000e-01   9.0000000e-01   3.0000000e-01   1.1000000e+00   9.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   1.1000000e+00   5.0000000e-01   4.0000000e-01   2.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e+00   5.0000000e-01   9.0000000e-01   3.0000000e-01   2.0000000e-01   4.0000000e-01   6.0000000e-01   4.0000000e-01   5.0000000e-01   8.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   2.0000000e-01   6.0000000e-01   4.0000000e-01   7.0000000e-01   1.0000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   5.0000000e-01   7.0000000e-01   7.0000000e-01   3.0000000e-01   2.0000000e-01   7.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   9.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   5.0000000e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..786486295935319c03a60a349f03328c127935b9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-chebyshev-ml.txt
@@ -0,0 +1 @@
+   8.9084734e-01   9.3573853e-01   9.3507398e-01   9.6040691e-01   9.2918157e-01   9.6617342e-01   9.0430930e-01   9.5753424e-01   8.7106898e-01   9.2169905e-01   9.7401159e-01   8.9013416e-01   9.3956689e-01   9.0041896e-01   9.2588355e-01   9.3849417e-01   8.9713468e-01   9.1481804e-01   9.7500539e-01   9.0012586e-01   9.0962559e-01   8.5860091e-01   8.6981095e-01   8.9995771e-01   8.8070172e-01   9.1456657e-01   8.6711474e-01   9.2593917e-01   8.7560376e-01   8.5193121e-01   9.0898542e-01   8.7765302e-01   8.6555584e-01   8.6093485e-01   9.0447028e-01   8.7614405e-01   9.4803522e-01   8.4998062e-01   7.8398996e-01   8.9538612e-01   8.3902291e-01   9.9039470e-01   9.5480519e-01   8.9152195e-01   9.1623329e-01   7.9094921e-01   9.1777100e-01   9.8972335e-01   9.0429093e-01   8.7646362e-01   9.2136649e-01   9.7178177e-01   8.9610979e-01   9.4710327e-01   9.3612450e-01   9.0241499e-01   7.7992538e-01   8.7262126e-01   9.3325183e-01   8.5796531e-01   9.4267977e-01   6.7224167e-01   7.9568368e-01   8.6411267e-01   9.3311642e-01   9.0160114e-01   9.0698887e-01   8.5833256e-01   9.6902830e-01   9.5072298e-01   8.6808495e-01   9.7879599e-01   8.8060729e-01   8.2818573e-01   8.4366706e-01   8.4506700e-01   9.4532981e-01   9.1792306e-01   7.8917825e-01   9.8337805e-01   8.1751613e-01   9.3037855e-01   9.1618832e-01   8.6568874e-01   8.9751397e-01   8.7923710e-01   8.6814329e-01   9.0330164e-01   8.2426213e-01   9.4644643e-01   8.8431293e-01   8.8497426e-01   9.0633818e-01   9.5537161e-01   8.2167575e-01   8.7771053e-01   9.0681167e-01   8.7626143e-01   8.7463464e-01   9.8033940e-01   9.2920881e-01   9.5108549e-01   9.1287466e-01   8.0052218e-01   9.2409517e-01   8.8252650e-01   8.7873923e-01   9.2989402e-01   9.1985043e-01   9.6172646e-01   8.8223856e-01   9.4477822e-01   8.8310948e-01   9.4461306e-01   9.1875210e-01   9.1233363e-01   9.2124013e-01   9.5460897e-01   8.4640982e-01   9.0882657e-01   9.8169468e-01   9.7828355e-01   8.4150533e-01   8.6888923e-01   9.7138825e-01   8.7988144e-01   9.6720910e-01   8.9450147e-01   9.5331584e-01   8.8871809e-01   8.9736685e-01   8.6258146e-01   9.1331565e-01   9.0968870e-01   9.4833654e-01   9.0536967e-01   9.5099871e-01   8.0251958e-01   9.2526150e-01   9.8971957e-01   9.0340947e-01   9.4955892e-01   9.6838162e-01   8.7534901e-01   9.1178797e-01   9.2649154e-01   9.5260993e-01   9.3178143e-01   9.4943000e-01   8.7816171e-01   9.6506542e-01   8.3422958e-01   9.3443585e-01   9.3220084e-01   8.5706573e-01   8.4666325e-01   9.0474744e-01   9.1080644e-01   9.2406899e-01   8.7901768e-01   9.3265263e-01   9.5992829e-01   9.5696271e-01   9.1932272e-01   8.0937044e-01   9.0904917e-01   8.9516756e-01   9.4797906e-01   8.4159421e-01   9.6773901e-01   9.7099825e-01   9.6941820e-01   9.8174088e-01   9.7569951e-01   9.3655362e-01   8.4130333e-01   9.5994549e-01   8.4235414e-01   9.1429418e-01   9.3418117e-01   8.4600977e-01   8.8166496e-01   8.7594776e-01   8.8571112e-01   9.6308174e-01   9.5315927e-01   8.6997519e-01   8.9383032e-01   9.4686804e-01   9.4399596e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6722928a4a4491c74d3fef5205276b532b15dcbf
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml-iris.txt
@@ -0,0 +1 @@
+   7.0000000e-01   8.0000000e-01   1.0000000e+00   2.0000000e-01   1.2000000e+00   7.0000000e-01   3.0000000e-01   1.3000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.8000000e+00   1.0000000e+00   1.0000000e-01   1.3000000e+00   5.0000000e-01   7.0000000e-01   5.0000000e-01   1.0000000e+00   8.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   2.0000000e-01   2.0000000e-01   9.0000000e-01   9.0000000e-01   7.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   1.3000000e+00   2.0000000e-01   3.0000000e-01   2.0000000e+00   1.1000000e+00   7.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.3000000e+00   6.6000000e+00   5.5000000e+00   6.1000000e+00   4.0000000e+00   6.4000000e+00   4.6000000e+00   4.5000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.4000000e+00   6.2000000e+00   5.4000000e+00   5.0000000e+00   6.8000000e+00   4.9000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   4.8000000e+00   4.6000000e+00   5.0000000e+00   6.8000000e+00   5.2000000e+00   5.5000000e+00   6.6000000e+00   6.5000000e+00   4.8000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   5.2000000e+00   4.0000000e+00   5.2000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   3.5000000e+00   5.1000000e+00   8.3000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   5.8000000e+00   9.3000000e+00   8.6000000e+00   9.2000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   1.0200000e+01   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.5000000e+00   1.0400000e+01   7.1000000e+00   8.0000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   9.9000000e+00   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   7.7000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.4000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.3000000e+00   6.6000000e+00   5.0000000e-01   5.0000000e-01   7.0000000e-01   1.9000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   1.3000000e+00   7.0000000e-01   2.0000000e-01   1.0000000e+00   2.1000000e+00   2.5000000e+00   1.7000000e+00   8.0000000e-01   2.0000000e+00   1.2000000e+00   1.2000000e+00   1.2000000e+00   1.3000000e+00   1.1000000e+00   1.0000000e+00   3.0000000e-01   9.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   4.0000000e-01   1.2000000e+00   1.6000000e+00   1.8000000e+00   3.0000000e-01   5.0000000e-01   1.2000000e+00   3.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   1.3000000e+00   8.0000000e-01   1.2000000e+00   1.7000000e+00   2.0000000e-01   1.2000000e+00   5.0000000e-01   1.2000000e+00   4.0000000e-01   6.8000000e+00   6.1000000e+00   6.9000000e+00   5.0000000e+00   6.3000000e+00   5.2000000e+00   6.4000000e+00   3.3000000e+00   6.1000000e+00   4.3000000e+00   4.0000000e+00   5.1000000e+00   5.3000000e+00   5.8000000e+00   4.1000000e+00   6.1000000e+00   5.1000000e+00   4.7000000e+00   6.5000000e+00   4.6000000e+00   6.2000000e+00   5.1000000e+00   6.7000000e+00   5.7000000e+00   5.6000000e+00   5.9000000e+00   6.7000000e+00   6.9000000e+00   5.6000000e+00   4.1000000e+00   4.5000000e+00   4.3000000e+00   4.7000000e+00   6.5000000e+00   4.9000000e+00   6.0000000e+00   6.5000000e+00   6.2000000e+00   4.5000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   4.9000000e+00   3.5000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   3.2000000e+00   4.8000000e+00   8.6000000e+00   6.6000000e+00   8.6000000e+00   7.3000000e+00   8.0000000e+00   9.8000000e+00   5.1000000e+00   9.0000000e+00   8.3000000e+00   9.9000000e+00   7.3000000e+00   7.4000000e+00   7.9000000e+00   6.7000000e+00   7.0000000e+00   7.7000000e+00   7.3000000e+00   1.0900000e+01   1.0800000e+01   6.8000000e+00   8.6000000e+00   6.2000000e+00   1.0100000e+01   6.8000000e+00   8.3000000e+00   8.7000000e+00   6.5000000e+00   6.3000000e+00   7.8000000e+00   8.1000000e+00   9.1000000e+00   1.0600000e+01   7.9000000e+00   6.6000000e+00   7.0000000e+00   9.6000000e+00   8.2000000e+00   7.3000000e+00   6.1000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.6000000e+00   8.7000000e+00   8.7000000e+00   7.7000000e+00   7.2000000e+00   7.2000000e+00   7.8000000e+00   6.3000000e+00   4.0000000e-01   8.0000000e-01   2.0000000e+00   5.0000000e-01   7.0000000e-01   7.0000000e-01   6.0000000e-01   1.4000000e+00   6.0000000e-01   5.0000000e-01   9.0000000e-01   2.0000000e+00   2.6000000e+00   1.6000000e+00   9.0000000e-01   2.1000000e+00   1.3000000e+00   1.3000000e+00   1.3000000e+00   8.0000000e-01   1.2000000e+00   9.0000000e-01   8.0000000e-01   1.0000000e+00   1.0000000e+00   8.0000000e-01   3.0000000e-01   5.0000000e-01   1.3000000e+00   1.7000000e+00   1.9000000e+00   6.0000000e-01   4.0000000e-01   1.1000000e+00   6.0000000e-01   5.0000000e-01   8.0000000e-01   7.0000000e-01   1.2000000e+00   3.0000000e-01   1.3000000e+00   1.8000000e+00   5.0000000e-01   1.3000000e+00   2.0000000e-01   1.3000000e+00   5.0000000e-01   6.9000000e+00   6.2000000e+00   7.2000000e+00   5.5000000e+00   6.8000000e+00   5.7000000e+00   6.5000000e+00   3.8000000e+00   6.6000000e+00   4.8000000e+00   4.5000000e+00   5.6000000e+00   5.8000000e+00   6.3000000e+00   4.6000000e+00   6.4000000e+00   5.6000000e+00   5.2000000e+00   7.0000000e+00   5.1000000e+00   6.3000000e+00   5.6000000e+00   7.2000000e+00   6.2000000e+00   6.1000000e+00   6.4000000e+00   7.2000000e+00   7.4000000e+00   6.1000000e+00   4.6000000e+00   5.0000000e+00   4.8000000e+00   5.2000000e+00   7.0000000e+00   5.4000000e+00   6.1000000e+00   6.8000000e+00   6.7000000e+00   5.0000000e+00   5.3000000e+00   5.5000000e+00   6.1000000e+00   5.4000000e+00   4.0000000e+00   5.4000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   3.7000000e+00   5.3000000e+00   8.7000000e+00   7.1000000e+00   9.1000000e+00   7.8000000e+00   8.5000000e+00   1.0300000e+01   5.6000000e+00   9.5000000e+00   8.8000000e+00   1.0000000e+01   7.4000000e+00   7.9000000e+00   8.4000000e+00   7.2000000e+00   7.5000000e+00   7.8000000e+00   7.8000000e+00   1.1000000e+01   1.1300000e+01   7.3000000e+00   8.7000000e+00   6.7000000e+00   1.0600000e+01   7.3000000e+00   8.4000000e+00   8.8000000e+00   7.0000000e+00   6.8000000e+00   8.3000000e+00   8.6000000e+00   9.6000000e+00   1.0700000e+01   8.4000000e+00   7.1000000e+00   7.5000000e+00   1.0100000e+01   8.3000000e+00   7.6000000e+00   6.6000000e+00   8.3000000e+00   8.6000000e+00   8.2000000e+00   7.1000000e+00   8.8000000e+00   8.8000000e+00   8.2000000e+00   7.7000000e+00   7.7000000e+00   7.9000000e+00   6.8000000e+00   1.0000000e+00   2.0000000e+00   5.0000000e-01   7.0000000e-01   5.0000000e-01   4.0000000e-01   1.4000000e+00   6.0000000e-01   5.0000000e-01   9.0000000e-01   2.4000000e+00   2.6000000e+00   2.0000000e+00   1.1000000e+00   2.1000000e+00   1.3000000e+00   1.3000000e+00   1.3000000e+00   1.0000000e+00   1.2000000e+00   9.0000000e-01   6.0000000e-01   1.0000000e+00   1.0000000e+00   1.0000000e+00   3.0000000e-01   3.0000000e-01   1.3000000e+00   1.7000000e+00   2.1000000e+00   4.0000000e-01   8.0000000e-01   1.5000000e+00   4.0000000e-01   5.0000000e-01   8.0000000e-01   1.1000000e+00   1.2000000e+00   5.0000000e-01   1.3000000e+00   1.8000000e+00   5.0000000e-01   1.3000000e+00   2.0000000e-01   1.3000000e+00   7.0000000e-01   6.9000000e+00   6.2000000e+00   7.0000000e+00   5.3000000e+00   6.6000000e+00   5.5000000e+00   6.5000000e+00   3.6000000e+00   6.4000000e+00   4.6000000e+00   4.3000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.4000000e+00   6.2000000e+00   5.4000000e+00   5.0000000e+00   6.8000000e+00   4.9000000e+00   6.3000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   4.8000000e+00   4.6000000e+00   5.0000000e+00   6.8000000e+00   5.2000000e+00   6.1000000e+00   6.6000000e+00   6.5000000e+00   4.8000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   5.2000000e+00   3.8000000e+00   5.2000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   3.5000000e+00   5.1000000e+00   8.7000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   5.4000000e+00   9.3000000e+00   8.6000000e+00   1.0000000e+01   7.4000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.8000000e+00   7.6000000e+00   1.1000000e+01   1.1100000e+01   7.1000000e+00   8.7000000e+00   6.5000000e+00   1.0400000e+01   7.1000000e+00   8.4000000e+00   8.8000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   1.0700000e+01   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   8.3000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.8000000e+00   8.8000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.9000000e+00   6.6000000e+00   1.2000000e+00   7.0000000e-01   3.0000000e-01   1.3000000e+00   8.0000000e-01   6.0000000e-01   6.0000000e-01   9.0000000e-01   1.7000000e+00   1.4000000e+00   1.8000000e+00   1.0000000e+00   3.0000000e-01   1.3000000e+00   5.0000000e-01   9.0000000e-01   5.0000000e-01   8.0000000e-01   1.0000000e+00   9.0000000e-01   8.0000000e-01   6.0000000e-01   4.0000000e-01   4.0000000e-01   9.0000000e-01   9.0000000e-01   9.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   7.0000000e-01   8.0000000e-01   1.3000000e+00   4.0000000e-01   3.0000000e-01   2.0000000e+00   1.1000000e+00   7.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   6.9000000e+00   6.2000000e+00   7.2000000e+00   5.5000000e+00   6.8000000e+00   5.7000000e+00   6.3000000e+00   4.0000000e+00   6.6000000e+00   4.8000000e+00   4.5000000e+00   5.6000000e+00   5.8000000e+00   6.3000000e+00   4.6000000e+00   6.4000000e+00   5.6000000e+00   5.2000000e+00   7.0000000e+00   5.1000000e+00   6.3000000e+00   5.6000000e+00   7.2000000e+00   6.2000000e+00   6.1000000e+00   6.4000000e+00   7.2000000e+00   7.4000000e+00   6.1000000e+00   4.6000000e+00   5.0000000e+00   4.8000000e+00   5.2000000e+00   7.0000000e+00   5.4000000e+00   5.7000000e+00   6.8000000e+00   6.7000000e+00   5.0000000e+00   5.3000000e+00   5.5000000e+00   6.1000000e+00   5.4000000e+00   4.0000000e+00   5.4000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   3.7000000e+00   5.3000000e+00   8.5000000e+00   7.1000000e+00   9.1000000e+00   7.8000000e+00   8.5000000e+00   1.0300000e+01   5.8000000e+00   9.5000000e+00   8.8000000e+00   9.2000000e+00   7.4000000e+00   7.9000000e+00   8.4000000e+00   7.2000000e+00   7.5000000e+00   7.8000000e+00   7.8000000e+00   1.0200000e+01   1.1300000e+01   7.3000000e+00   8.7000000e+00   6.7000000e+00   1.0600000e+01   7.3000000e+00   8.2000000e+00   8.8000000e+00   7.0000000e+00   6.8000000e+00   8.3000000e+00   8.6000000e+00   9.6000000e+00   9.9000000e+00   8.4000000e+00   7.1000000e+00   7.5000000e+00   1.0100000e+01   7.9000000e+00   7.6000000e+00   6.6000000e+00   8.3000000e+00   8.6000000e+00   8.2000000e+00   7.1000000e+00   8.8000000e+00   8.6000000e+00   8.2000000e+00   7.7000000e+00   7.7000000e+00   7.5000000e+00   6.8000000e+00   1.7000000e+00   1.3000000e+00   2.5000000e+00   1.8000000e+00   6.0000000e-01   1.4000000e+00   2.1000000e+00   2.9000000e+00   1.2000000e+00   1.0000000e+00   4.0000000e-01   1.1000000e+00   5.0000000e-01   7.0000000e-01   7.0000000e-01   7.0000000e-01   2.0000000e+00   1.0000000e+00   1.5000000e+00   1.6000000e+00   1.0000000e+00   1.0000000e+00   1.2000000e+00   1.7000000e+00   1.7000000e+00   7.0000000e-01   9.0000000e-01   9.0000000e-01   1.8000000e+00   1.8000000e+00   1.1000000e+00   1.8000000e+00   2.5000000e+00   1.2000000e+00   1.3000000e+00   3.0000000e+00   2.3000000e+00   1.1000000e+00   6.0000000e-01   1.9000000e+00   7.0000000e-01   2.0000000e+00   7.0000000e-01   1.5000000e+00   6.3000000e+00   5.6000000e+00   6.6000000e+00   4.9000000e+00   6.2000000e+00   5.1000000e+00   5.7000000e+00   4.2000000e+00   6.0000000e+00   4.6000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.7000000e+00   4.0000000e+00   5.8000000e+00   5.0000000e+00   4.6000000e+00   6.4000000e+00   4.5000000e+00   5.7000000e+00   5.0000000e+00   6.6000000e+00   5.6000000e+00   5.5000000e+00   5.8000000e+00   6.6000000e+00   6.8000000e+00   5.5000000e+00   4.0000000e+00   4.4000000e+00   4.2000000e+00   4.6000000e+00   6.4000000e+00   4.8000000e+00   5.1000000e+00   6.2000000e+00   6.1000000e+00   4.4000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   4.8000000e+00   4.2000000e+00   4.8000000e+00   4.5000000e+00   4.7000000e+00   5.3000000e+00   3.7000000e+00   4.7000000e+00   7.9000000e+00   6.5000000e+00   8.5000000e+00   7.2000000e+00   7.9000000e+00   9.7000000e+00   6.0000000e+00   8.9000000e+00   8.2000000e+00   8.6000000e+00   6.8000000e+00   7.3000000e+00   7.8000000e+00   6.6000000e+00   6.9000000e+00   7.2000000e+00   7.2000000e+00   9.2000000e+00   1.0700000e+01   6.7000000e+00   8.1000000e+00   6.1000000e+00   1.0000000e+01   6.7000000e+00   7.6000000e+00   8.2000000e+00   6.4000000e+00   6.2000000e+00   7.7000000e+00   8.0000000e+00   9.0000000e+00   8.9000000e+00   7.8000000e+00   6.5000000e+00   6.9000000e+00   9.5000000e+00   7.3000000e+00   7.0000000e+00   6.0000000e+00   7.7000000e+00   8.0000000e+00   7.6000000e+00   6.5000000e+00   8.2000000e+00   8.0000000e+00   7.6000000e+00   7.1000000e+00   7.1000000e+00   6.9000000e+00   6.2000000e+00   6.0000000e-01   8.0000000e-01   9.0000000e-01   1.3000000e+00   5.0000000e-01   8.0000000e-01   1.2000000e+00   2.1000000e+00   2.3000000e+00   1.5000000e+00   6.0000000e-01   1.8000000e+00   1.0000000e+00   1.2000000e+00   1.0000000e+00   7.0000000e-01   1.1000000e+00   8.0000000e-01   1.1000000e+00   7.0000000e-01   9.0000000e-01   7.0000000e-01   6.0000000e-01   8.0000000e-01   1.0000000e+00   1.6000000e+00   1.8000000e+00   9.0000000e-01   9.0000000e-01   1.2000000e+00   9.0000000e-01   8.0000000e-01   7.0000000e-01   6.0000000e-01   1.3000000e+00   6.0000000e-01   1.0000000e+00   1.5000000e+00   6.0000000e-01   1.2000000e+00   3.0000000e-01   1.2000000e+00   6.0000000e-01   7.0000000e+00   6.3000000e+00   7.3000000e+00   5.6000000e+00   6.9000000e+00   5.8000000e+00   6.4000000e+00   3.9000000e+00   6.7000000e+00   4.9000000e+00   4.6000000e+00   5.7000000e+00   5.9000000e+00   6.4000000e+00   4.7000000e+00   6.5000000e+00   5.7000000e+00   5.3000000e+00   7.1000000e+00   5.2000000e+00   6.4000000e+00   5.7000000e+00   7.3000000e+00   6.3000000e+00   6.2000000e+00   6.5000000e+00   7.3000000e+00   7.5000000e+00   6.2000000e+00   4.7000000e+00   5.1000000e+00   4.9000000e+00   5.3000000e+00   7.1000000e+00   5.5000000e+00   5.8000000e+00   6.9000000e+00   6.8000000e+00   5.1000000e+00   5.4000000e+00   5.6000000e+00   6.2000000e+00   5.5000000e+00   4.1000000e+00   5.5000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   3.8000000e+00   5.4000000e+00   8.6000000e+00   7.2000000e+00   9.2000000e+00   7.9000000e+00   8.6000000e+00   1.0400000e+01   5.7000000e+00   9.6000000e+00   8.9000000e+00   9.7000000e+00   7.5000000e+00   8.0000000e+00   8.5000000e+00   7.3000000e+00   7.6000000e+00   7.9000000e+00   7.9000000e+00   1.0700000e+01   1.1400000e+01   7.4000000e+00   8.8000000e+00   6.8000000e+00   1.0700000e+01   7.4000000e+00   8.3000000e+00   8.9000000e+00   7.1000000e+00   6.9000000e+00   8.4000000e+00   8.7000000e+00   9.7000000e+00   1.0400000e+01   8.5000000e+00   7.2000000e+00   7.6000000e+00   1.0200000e+01   8.0000000e+00   7.7000000e+00   6.7000000e+00   8.4000000e+00   8.7000000e+00   8.3000000e+00   7.2000000e+00   8.9000000e+00   8.7000000e+00   8.3000000e+00   7.8000000e+00   7.8000000e+00   7.6000000e+00   6.9000000e+00   1.2000000e+00   5.0000000e-01   7.0000000e-01   3.0000000e-01   8.0000000e-01   1.6000000e+00   1.7000000e+00   1.9000000e+00   1.3000000e+00   4.0000000e-01   1.4000000e+00   6.0000000e-01   6.0000000e-01   6.0000000e-01   1.1000000e+00   7.0000000e-01   6.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   3.0000000e-01   6.0000000e-01   6.0000000e-01   6.0000000e-01   1.0000000e+00   1.4000000e+00   5.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   1.2000000e+00   1.0000000e-01   4.0000000e-01   1.9000000e+00   1.0000000e+00   6.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   7.0000000e-01   6.0000000e-01   2.0000000e-01   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.0000000e+00   3.7000000e+00   6.3000000e+00   4.5000000e+00   4.2000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.4000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.7000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.2000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.5000000e+00   9.2000000e+00   8.5000000e+00   9.3000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   1.0300000e+01   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   7.9000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   1.0000000e+01   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   7.6000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.3000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.2000000e+00   6.5000000e+00   9.0000000e-01   1.9000000e+00   1.1000000e+00   6.0000000e-01   6.0000000e-01   2.7000000e+00   3.1000000e+00   2.3000000e+00   1.4000000e+00   2.6000000e+00   1.8000000e+00   1.8000000e+00   1.8000000e+00   1.3000000e+00   1.7000000e+00   1.4000000e+00   9.0000000e-01   1.5000000e+00   1.5000000e+00   1.3000000e+00   8.0000000e-01   8.0000000e-01   1.8000000e+00   2.2000000e+00   2.4000000e+00   9.0000000e-01   1.1000000e+00   1.8000000e+00   9.0000000e-01   2.0000000e-01   1.3000000e+00   1.4000000e+00   9.0000000e-01   4.0000000e-01   1.8000000e+00   2.3000000e+00   6.0000000e-01   1.8000000e+00   5.0000000e-01   1.8000000e+00   1.0000000e+00   7.4000000e+00   6.7000000e+00   7.5000000e+00   5.4000000e+00   6.7000000e+00   5.6000000e+00   7.0000000e+00   3.7000000e+00   6.5000000e+00   4.7000000e+00   4.4000000e+00   5.7000000e+00   5.7000000e+00   6.2000000e+00   4.5000000e+00   6.7000000e+00   5.7000000e+00   5.1000000e+00   6.9000000e+00   5.0000000e+00   6.8000000e+00   5.5000000e+00   7.1000000e+00   6.1000000e+00   6.0000000e+00   6.5000000e+00   7.1000000e+00   7.5000000e+00   6.0000000e+00   4.5000000e+00   4.9000000e+00   4.7000000e+00   5.1000000e+00   6.9000000e+00   5.5000000e+00   6.6000000e+00   7.1000000e+00   6.6000000e+00   5.1000000e+00   5.2000000e+00   5.4000000e+00   6.2000000e+00   5.3000000e+00   3.9000000e+00   5.3000000e+00   5.2000000e+00   5.2000000e+00   5.8000000e+00   3.6000000e+00   5.2000000e+00   9.2000000e+00   7.0000000e+00   9.2000000e+00   7.7000000e+00   8.6000000e+00   1.0400000e+01   5.5000000e+00   9.4000000e+00   8.7000000e+00   1.0500000e+01   7.9000000e+00   7.8000000e+00   8.5000000e+00   7.1000000e+00   7.4000000e+00   8.3000000e+00   7.9000000e+00   1.1500000e+01   1.1200000e+01   7.2000000e+00   9.2000000e+00   6.6000000e+00   1.0500000e+01   7.2000000e+00   8.9000000e+00   9.3000000e+00   6.9000000e+00   6.9000000e+00   8.2000000e+00   8.7000000e+00   9.5000000e+00   1.1200000e+01   8.3000000e+00   7.0000000e+00   7.4000000e+00   1.0200000e+01   8.8000000e+00   7.9000000e+00   6.7000000e+00   8.6000000e+00   8.9000000e+00   8.5000000e+00   7.0000000e+00   9.3000000e+00   9.3000000e+00   8.3000000e+00   7.6000000e+00   7.8000000e+00   8.4000000e+00   6.9000000e+00   1.2000000e+00   6.0000000e-01   3.0000000e-01   1.1000000e+00   2.2000000e+00   2.4000000e+00   1.8000000e+00   9.0000000e-01   1.9000000e+00   1.1000000e+00   1.1000000e+00   1.1000000e+00   1.4000000e+00   1.0000000e+00   9.0000000e-01   4.0000000e-01   8.0000000e-01   8.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   1.1000000e+00   1.3000000e+00   1.9000000e+00   0.0000000e+00   6.0000000e-01   1.3000000e+00   0.0000000e+00   9.0000000e-01   6.0000000e-01   9.0000000e-01   1.6000000e+00   9.0000000e-01   1.1000000e+00   1.6000000e+00   5.0000000e-01   1.1000000e+00   6.0000000e-01   1.1000000e+00   5.0000000e-01   6.7000000e+00   6.0000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   6.3000000e+00   3.4000000e+00   6.2000000e+00   4.4000000e+00   4.1000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   6.1000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.9000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   3.6000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.3000000e+00   4.9000000e+00   8.5000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.2000000e+00   9.1000000e+00   8.4000000e+00   9.8000000e+00   7.2000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.6000000e+00   7.4000000e+00   1.0800000e+01   1.0900000e+01   6.9000000e+00   8.5000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   8.2000000e+00   8.6000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   1.0500000e+01   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   8.1000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.6000000e+00   8.6000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.7000000e+00   6.4000000e+00   1.0000000e+00   1.5000000e+00   2.3000000e+00   1.0000000e+00   1.2000000e+00   6.0000000e-01   7.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   5.0000000e-01   1.4000000e+00   1.2000000e+00   1.3000000e+00   1.2000000e+00   1.0000000e+00   4.0000000e-01   6.0000000e-01   1.3000000e+00   1.3000000e+00   5.0000000e-01   7.0000000e-01   7.0000000e-01   1.2000000e+00   1.2000000e+00   5.0000000e-01   1.2000000e+00   1.9000000e+00   6.0000000e-01   9.0000000e-01   2.6000000e+00   1.7000000e+00   1.1000000e+00   1.0000000e+00   1.5000000e+00   5.0000000e-01   1.4000000e+00   1.0000000e-01   9.0000000e-01   6.5000000e+00   5.8000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   5.9000000e+00   4.4000000e+00   6.2000000e+00   4.8000000e+00   4.9000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   5.9000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.3000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   4.4000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.9000000e+00   4.9000000e+00   8.1000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   6.2000000e+00   9.1000000e+00   8.4000000e+00   8.8000000e+00   7.0000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.4000000e+00   7.4000000e+00   9.6000000e+00   1.0900000e+01   6.9000000e+00   8.3000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   7.8000000e+00   8.4000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   9.3000000e+00   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   7.5000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.4000000e+00   8.2000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.1000000e+00   6.4000000e+00   7.0000000e-01   1.5000000e+00   2.0000000e+00   2.2000000e+00   1.6000000e+00   7.0000000e-01   1.5000000e+00   9.0000000e-01   7.0000000e-01   9.0000000e-01   1.0000000e+00   8.0000000e-01   3.0000000e-01   6.0000000e-01   4.0000000e-01   6.0000000e-01   6.0000000e-01   3.0000000e-01   3.0000000e-01   9.0000000e-01   1.3000000e+00   1.7000000e+00   6.0000000e-01   8.0000000e-01   1.1000000e+00   6.0000000e-01   1.1000000e+00   4.0000000e-01   7.0000000e-01   1.8000000e+00   9.0000000e-01   7.0000000e-01   1.2000000e+00   7.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   5.0000000e-01   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.3000000e+00   6.6000000e+00   5.5000000e+00   6.1000000e+00   3.6000000e+00   6.4000000e+00   4.6000000e+00   4.3000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.4000000e+00   6.2000000e+00   5.4000000e+00   5.0000000e+00   6.8000000e+00   4.9000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   4.8000000e+00   4.6000000e+00   5.0000000e+00   6.8000000e+00   5.2000000e+00   5.5000000e+00   6.6000000e+00   6.5000000e+00   4.8000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   5.2000000e+00   3.8000000e+00   5.2000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   3.5000000e+00   5.1000000e+00   8.3000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   5.4000000e+00   9.3000000e+00   8.6000000e+00   9.4000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   1.0400000e+01   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.5000000e+00   1.0400000e+01   7.1000000e+00   8.0000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   1.0100000e+01   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   7.7000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.4000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.3000000e+00   6.6000000e+00   8.0000000e-01   2.3000000e+00   2.7000000e+00   1.9000000e+00   1.0000000e+00   2.2000000e+00   1.4000000e+00   1.4000000e+00   1.4000000e+00   1.3000000e+00   1.3000000e+00   1.0000000e+00   5.0000000e-01   1.1000000e+00   1.1000000e+00   9.0000000e-01   6.0000000e-01   4.0000000e-01   1.4000000e+00   1.6000000e+00   2.0000000e+00   3.0000000e-01   7.0000000e-01   1.4000000e+00   3.0000000e-01   6.0000000e-01   9.0000000e-01   1.0000000e+00   1.3000000e+00   8.0000000e-01   1.4000000e+00   1.9000000e+00   2.0000000e-01   1.4000000e+00   5.0000000e-01   1.4000000e+00   6.0000000e-01   7.0000000e+00   6.3000000e+00   7.1000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.6000000e+00   3.5000000e+00   6.3000000e+00   4.5000000e+00   4.2000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.3000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.4000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   6.2000000e+00   6.7000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.7000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.8000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.3000000e+00   9.2000000e+00   8.5000000e+00   1.0100000e+01   7.5000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.9000000e+00   7.5000000e+00   1.1100000e+01   1.1000000e+01   7.0000000e+00   8.8000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   8.5000000e+00   8.9000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   1.0800000e+01   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   8.4000000e+00   7.5000000e+00   6.3000000e+00   8.2000000e+00   8.5000000e+00   8.1000000e+00   6.8000000e+00   8.9000000e+00   8.9000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   8.0000000e+00   6.5000000e+00   2.7000000e+00   3.5000000e+00   2.5000000e+00   1.8000000e+00   3.0000000e+00   2.2000000e+00   2.2000000e+00   2.2000000e+00   1.1000000e+00   2.1000000e+00   1.8000000e+00   1.3000000e+00   1.9000000e+00   1.9000000e+00   1.7000000e+00   1.2000000e+00   1.2000000e+00   2.2000000e+00   2.4000000e+00   2.8000000e+00   1.1000000e+00   1.1000000e+00   2.0000000e+00   1.1000000e+00   4.0000000e-01   1.7000000e+00   1.6000000e+00   1.3000000e+00   6.0000000e-01   2.2000000e+00   2.7000000e+00   1.0000000e+00   2.2000000e+00   9.0000000e-01   2.2000000e+00   1.4000000e+00   7.8000000e+00   7.1000000e+00   7.9000000e+00   6.0000000e+00   7.3000000e+00   6.2000000e+00   7.4000000e+00   4.3000000e+00   7.1000000e+00   5.3000000e+00   5.0000000e+00   6.1000000e+00   6.3000000e+00   6.8000000e+00   5.1000000e+00   7.1000000e+00   6.1000000e+00   5.7000000e+00   7.5000000e+00   5.6000000e+00   7.2000000e+00   6.1000000e+00   7.7000000e+00   6.7000000e+00   6.6000000e+00   6.9000000e+00   7.7000000e+00   7.9000000e+00   6.6000000e+00   5.1000000e+00   5.5000000e+00   5.3000000e+00   5.7000000e+00   7.5000000e+00   5.9000000e+00   7.0000000e+00   7.5000000e+00   7.2000000e+00   5.5000000e+00   5.8000000e+00   6.0000000e+00   6.6000000e+00   5.9000000e+00   4.5000000e+00   5.9000000e+00   5.6000000e+00   5.8000000e+00   6.4000000e+00   4.2000000e+00   5.8000000e+00   9.6000000e+00   7.6000000e+00   9.6000000e+00   8.3000000e+00   9.0000000e+00   1.0800000e+01   6.1000000e+00   1.0000000e+01   9.3000000e+00   1.0900000e+01   8.3000000e+00   8.4000000e+00   8.9000000e+00   7.7000000e+00   8.0000000e+00   8.7000000e+00   8.3000000e+00   1.1900000e+01   1.1800000e+01   7.8000000e+00   9.6000000e+00   7.2000000e+00   1.1100000e+01   7.8000000e+00   9.3000000e+00   9.7000000e+00   7.5000000e+00   7.3000000e+00   8.8000000e+00   9.1000000e+00   1.0100000e+01   1.1600000e+01   8.9000000e+00   7.6000000e+00   8.0000000e+00   1.0600000e+01   9.2000000e+00   8.3000000e+00   7.1000000e+00   9.0000000e+00   9.3000000e+00   8.9000000e+00   7.6000000e+00   9.7000000e+00   9.7000000e+00   8.7000000e+00   8.2000000e+00   8.2000000e+00   8.8000000e+00   7.3000000e+00   1.0000000e+00   8.0000000e-01   1.5000000e+00   9.0000000e-01   1.3000000e+00   1.5000000e+00   1.5000000e+00   1.8000000e+00   2.2000000e+00   2.3000000e+00   2.2000000e+00   2.0000000e+00   1.4000000e+00   1.4000000e+00   2.3000000e+00   2.3000000e+00   1.5000000e+00   1.1000000e+00   7.0000000e-01   2.2000000e+00   1.6000000e+00   9.0000000e-01   2.2000000e+00   2.5000000e+00   1.6000000e+00   1.5000000e+00   3.2000000e+00   2.3000000e+00   2.1000000e+00   1.8000000e+00   2.3000000e+00   1.3000000e+00   2.2000000e+00   1.1000000e+00   1.7000000e+00   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.9000000e+00   6.6000000e+00   5.7000000e+00   6.1000000e+00   5.4000000e+00   6.4000000e+00   5.8000000e+00   5.9000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.8000000e+00   6.2000000e+00   5.8000000e+00   5.0000000e+00   6.8000000e+00   5.3000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.6000000e+00   5.4000000e+00   5.2000000e+00   5.0000000e+00   6.8000000e+00   6.0000000e+00   5.5000000e+00   6.6000000e+00   6.5000000e+00   5.2000000e+00   5.7000000e+00   5.9000000e+00   5.9000000e+00   5.2000000e+00   5.4000000e+00   5.6000000e+00   5.1000000e+00   5.3000000e+00   5.7000000e+00   4.9000000e+00   5.3000000e+00   8.3000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   7.2000000e+00   9.3000000e+00   8.6000000e+00   9.0000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.2000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   9.6000000e+00   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.9000000e+00   1.0400000e+01   7.1000000e+00   8.0000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   9.3000000e+00   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   7.7000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.4000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.3000000e+00   6.6000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   1.3000000e+00   1.7000000e+00   1.3000000e+00   2.6000000e+00   2.0000000e+00   2.5000000e+00   2.4000000e+00   1.8000000e+00   1.6000000e+00   1.8000000e+00   2.5000000e+00   2.5000000e+00   1.3000000e+00   1.1000000e+00   7.0000000e-01   2.4000000e+00   2.4000000e+00   1.5000000e+00   2.4000000e+00   3.1000000e+00   1.8000000e+00   1.9000000e+00   3.6000000e+00   2.9000000e+00   1.9000000e+00   1.6000000e+00   2.5000000e+00   1.5000000e+00   2.6000000e+00   1.3000000e+00   2.1000000e+00   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.7000000e+00   6.6000000e+00   5.5000000e+00   6.1000000e+00   5.2000000e+00   6.4000000e+00   5.6000000e+00   5.7000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.6000000e+00   6.2000000e+00   5.6000000e+00   5.0000000e+00   6.8000000e+00   5.1000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   5.2000000e+00   5.0000000e+00   5.0000000e+00   6.8000000e+00   5.8000000e+00   5.5000000e+00   6.6000000e+00   6.5000000e+00   5.0000000e+00   5.5000000e+00   5.7000000e+00   5.9000000e+00   5.2000000e+00   5.2000000e+00   5.4000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   4.7000000e+00   5.1000000e+00   8.3000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   7.0000000e+00   9.3000000e+00   8.6000000e+00   9.0000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   9.6000000e+00   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.7000000e+00   1.0400000e+01   7.1000000e+00   8.0000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   9.3000000e+00   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   7.7000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.4000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.3000000e+00   6.6000000e+00   9.0000000e-01   9.0000000e-01   7.0000000e-01   1.1000000e+00   7.0000000e-01   1.6000000e+00   1.4000000e+00   1.9000000e+00   1.8000000e+00   1.2000000e+00   1.0000000e+00   1.0000000e+00   1.9000000e+00   1.9000000e+00   7.0000000e-01   9.0000000e-01   7.0000000e-01   1.8000000e+00   1.4000000e+00   7.0000000e-01   1.8000000e+00   2.1000000e+00   1.2000000e+00   9.0000000e-01   2.6000000e+00   1.9000000e+00   1.3000000e+00   1.0000000e+00   1.7000000e+00   9.0000000e-01   1.8000000e+00   7.0000000e-01   1.3000000e+00   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.3000000e+00   6.6000000e+00   5.5000000e+00   6.1000000e+00   4.6000000e+00   6.4000000e+00   5.0000000e+00   5.1000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.4000000e+00   6.2000000e+00   5.4000000e+00   5.0000000e+00   6.8000000e+00   4.9000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   4.8000000e+00   4.6000000e+00   5.0000000e+00   6.8000000e+00   5.2000000e+00   5.5000000e+00   6.6000000e+00   6.5000000e+00   4.8000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   5.2000000e+00   4.6000000e+00   5.2000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   4.1000000e+00   5.1000000e+00   8.3000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   6.4000000e+00   9.3000000e+00   8.6000000e+00   9.0000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   9.6000000e+00   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.5000000e+00   1.0400000e+01   7.1000000e+00   8.0000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   9.3000000e+00   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   7.7000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.4000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.3000000e+00   6.6000000e+00   1.2000000e+00   4.0000000e-01   8.0000000e-01   4.0000000e-01   1.1000000e+00   7.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   3.0000000e-01   3.0000000e-01   1.0000000e+00   1.0000000e+00   6.0000000e-01   1.0000000e+00   1.2000000e+00   9.0000000e-01   7.0000000e-01   6.0000000e-01   9.0000000e-01   1.4000000e+00   3.0000000e-01   2.0000000e-01   1.9000000e+00   1.2000000e+00   6.0000000e-01   9.0000000e-01   8.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   4.0000000e-01   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.0000000e+00   3.9000000e+00   6.3000000e+00   4.5000000e+00   4.4000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.4000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.9000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.2000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.7000000e+00   9.2000000e+00   8.5000000e+00   9.1000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   1.0100000e+01   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   7.9000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   9.8000000e+00   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   7.6000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.3000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.2000000e+00   6.5000000e+00   8.0000000e-01   8.0000000e-01   1.0000000e+00   2.1000000e+00   1.3000000e+00   1.6000000e+00   1.7000000e+00   1.3000000e+00   1.1000000e+00   1.3000000e+00   1.8000000e+00   1.8000000e+00   1.0000000e+00   1.2000000e+00   1.0000000e+00   1.9000000e+00   1.9000000e+00   1.0000000e+00   1.9000000e+00   2.6000000e+00   1.3000000e+00   1.4000000e+00   3.1000000e+00   2.4000000e+00   1.4000000e+00   9.0000000e-01   2.0000000e+00   8.0000000e-01   2.1000000e+00   8.0000000e-01   1.6000000e+00   6.0000000e+00   5.3000000e+00   6.3000000e+00   5.0000000e+00   5.9000000e+00   4.8000000e+00   5.4000000e+00   4.5000000e+00   5.7000000e+00   4.9000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.4000000e+00   3.9000000e+00   5.5000000e+00   4.9000000e+00   4.3000000e+00   6.1000000e+00   4.4000000e+00   5.4000000e+00   4.7000000e+00   6.3000000e+00   5.3000000e+00   5.2000000e+00   5.5000000e+00   6.3000000e+00   6.5000000e+00   5.2000000e+00   3.7000000e+00   4.5000000e+00   4.3000000e+00   4.3000000e+00   6.1000000e+00   5.1000000e+00   4.8000000e+00   5.9000000e+00   5.8000000e+00   4.3000000e+00   4.8000000e+00   5.0000000e+00   5.2000000e+00   4.5000000e+00   4.5000000e+00   4.7000000e+00   4.2000000e+00   4.4000000e+00   5.0000000e+00   4.0000000e+00   4.4000000e+00   7.6000000e+00   6.2000000e+00   8.2000000e+00   6.9000000e+00   7.6000000e+00   9.4000000e+00   6.3000000e+00   8.6000000e+00   7.9000000e+00   8.3000000e+00   6.5000000e+00   7.0000000e+00   7.5000000e+00   6.3000000e+00   6.6000000e+00   6.9000000e+00   6.9000000e+00   8.9000000e+00   1.0400000e+01   6.4000000e+00   7.8000000e+00   6.0000000e+00   9.7000000e+00   6.4000000e+00   7.3000000e+00   7.9000000e+00   6.1000000e+00   5.9000000e+00   7.4000000e+00   7.7000000e+00   8.7000000e+00   8.6000000e+00   7.5000000e+00   6.2000000e+00   6.6000000e+00   9.2000000e+00   7.0000000e+00   6.7000000e+00   5.7000000e+00   7.4000000e+00   7.7000000e+00   7.3000000e+00   6.2000000e+00   7.9000000e+00   7.7000000e+00   7.3000000e+00   6.8000000e+00   6.8000000e+00   6.6000000e+00   5.9000000e+00   1.0000000e+00   2.0000000e-01   1.3000000e+00   9.0000000e-01   1.2000000e+00   1.1000000e+00   7.0000000e-01   5.0000000e-01   7.0000000e-01   1.2000000e+00   1.2000000e+00   8.0000000e-01   6.0000000e-01   1.0000000e+00   1.1000000e+00   1.1000000e+00   1.0000000e+00   1.1000000e+00   1.8000000e+00   5.0000000e-01   6.0000000e-01   2.3000000e+00   1.6000000e+00   8.0000000e-01   5.0000000e-01   1.2000000e+00   2.0000000e-01   1.3000000e+00   4.0000000e-01   8.0000000e-01   6.8000000e+00   6.1000000e+00   7.1000000e+00   5.4000000e+00   6.7000000e+00   5.6000000e+00   6.2000000e+00   4.1000000e+00   6.5000000e+00   4.7000000e+00   4.6000000e+00   5.5000000e+00   5.7000000e+00   6.2000000e+00   4.5000000e+00   6.3000000e+00   5.5000000e+00   5.1000000e+00   6.9000000e+00   5.0000000e+00   6.2000000e+00   5.5000000e+00   7.1000000e+00   6.1000000e+00   6.0000000e+00   6.3000000e+00   7.1000000e+00   7.3000000e+00   6.0000000e+00   4.5000000e+00   4.9000000e+00   4.7000000e+00   5.1000000e+00   6.9000000e+00   5.3000000e+00   5.6000000e+00   6.7000000e+00   6.6000000e+00   4.9000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   5.3000000e+00   4.1000000e+00   5.3000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   3.6000000e+00   5.2000000e+00   8.4000000e+00   7.0000000e+00   9.0000000e+00   7.7000000e+00   8.4000000e+00   1.0200000e+01   5.9000000e+00   9.4000000e+00   8.7000000e+00   9.1000000e+00   7.3000000e+00   7.8000000e+00   8.3000000e+00   7.1000000e+00   7.4000000e+00   7.7000000e+00   7.7000000e+00   9.7000000e+00   1.1200000e+01   7.2000000e+00   8.6000000e+00   6.6000000e+00   1.0500000e+01   7.2000000e+00   8.1000000e+00   8.7000000e+00   6.9000000e+00   6.7000000e+00   8.2000000e+00   8.5000000e+00   9.5000000e+00   9.4000000e+00   8.3000000e+00   7.0000000e+00   7.4000000e+00   1.0000000e+01   7.8000000e+00   7.5000000e+00   6.5000000e+00   8.2000000e+00   8.5000000e+00   8.1000000e+00   7.0000000e+00   8.7000000e+00   8.5000000e+00   8.1000000e+00   7.6000000e+00   7.6000000e+00   7.4000000e+00   6.7000000e+00   1.0000000e+00   1.7000000e+00   7.0000000e-01   8.0000000e-01   9.0000000e-01   7.0000000e-01   5.0000000e-01   5.0000000e-01   1.0000000e+00   1.0000000e+00   4.0000000e-01   1.2000000e+00   1.2000000e+00   1.1000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.8000000e+00   5.0000000e-01   1.0000000e+00   2.5000000e+00   1.6000000e+00   1.0000000e+00   1.1000000e+00   1.4000000e+00   8.0000000e-01   1.3000000e+00   6.0000000e-01   8.0000000e-01   6.0000000e+00   5.3000000e+00   6.3000000e+00   4.6000000e+00   5.9000000e+00   4.8000000e+00   5.4000000e+00   3.9000000e+00   5.7000000e+00   4.3000000e+00   4.4000000e+00   4.7000000e+00   4.9000000e+00   5.4000000e+00   3.7000000e+00   5.5000000e+00   4.7000000e+00   4.3000000e+00   6.1000000e+00   4.2000000e+00   5.4000000e+00   4.7000000e+00   6.3000000e+00   5.3000000e+00   5.2000000e+00   5.5000000e+00   6.3000000e+00   6.5000000e+00   5.2000000e+00   3.7000000e+00   4.1000000e+00   3.9000000e+00   4.3000000e+00   6.1000000e+00   4.5000000e+00   4.8000000e+00   5.9000000e+00   5.8000000e+00   4.1000000e+00   4.4000000e+00   4.6000000e+00   5.2000000e+00   4.5000000e+00   3.9000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.0000000e+00   3.4000000e+00   4.4000000e+00   7.6000000e+00   6.2000000e+00   8.2000000e+00   6.9000000e+00   7.6000000e+00   9.4000000e+00   5.7000000e+00   8.6000000e+00   7.9000000e+00   8.7000000e+00   6.5000000e+00   7.0000000e+00   7.5000000e+00   6.3000000e+00   6.6000000e+00   6.9000000e+00   6.9000000e+00   9.7000000e+00   1.0400000e+01   6.4000000e+00   7.8000000e+00   5.8000000e+00   9.7000000e+00   6.4000000e+00   7.3000000e+00   7.9000000e+00   6.1000000e+00   5.9000000e+00   7.4000000e+00   7.7000000e+00   8.7000000e+00   9.4000000e+00   7.5000000e+00   6.2000000e+00   6.6000000e+00   9.2000000e+00   7.0000000e+00   6.7000000e+00   5.7000000e+00   7.4000000e+00   7.7000000e+00   7.3000000e+00   6.2000000e+00   7.9000000e+00   7.7000000e+00   7.3000000e+00   6.8000000e+00   6.8000000e+00   6.6000000e+00   5.9000000e+00   1.3000000e+00   7.0000000e-01   1.2000000e+00   1.1000000e+00   5.0000000e-01   5.0000000e-01   7.0000000e-01   1.2000000e+00   1.2000000e+00   6.0000000e-01   8.0000000e-01   1.2000000e+00   1.1000000e+00   1.1000000e+00   1.0000000e+00   1.1000000e+00   1.8000000e+00   5.0000000e-01   6.0000000e-01   2.3000000e+00   1.6000000e+00   6.0000000e-01   5.0000000e-01   1.2000000e+00   4.0000000e-01   1.3000000e+00   4.0000000e-01   8.0000000e-01   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.0000000e+00   3.9000000e+00   6.3000000e+00   4.5000000e+00   4.4000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.4000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.9000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.2000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.7000000e+00   9.2000000e+00   8.5000000e+00   8.9000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   9.7000000e+00   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   7.9000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   9.4000000e+00   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   7.6000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.3000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.2000000e+00   6.5000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   1.4000000e+00   1.2000000e+00   1.2000000e+00   1.1000000e+00   1.3000000e+00   1.7000000e+00   1.7000000e+00   1.9000000e+00   1.4000000e+00   1.0000000e+00   1.3000000e+00   1.4000000e+00   1.1000000e+00   1.2000000e+00   9.0000000e-01   1.8000000e+00   9.0000000e-01   1.5000000e+00   1.8000000e+00   1.3000000e+00   1.3000000e+00   8.0000000e-01   1.3000000e+00   1.1000000e+00   7.7000000e+00   7.0000000e+00   8.0000000e+00   6.3000000e+00   7.6000000e+00   6.5000000e+00   7.1000000e+00   4.6000000e+00   7.4000000e+00   5.6000000e+00   5.3000000e+00   6.4000000e+00   6.6000000e+00   7.1000000e+00   5.4000000e+00   7.2000000e+00   6.4000000e+00   6.0000000e+00   7.8000000e+00   5.9000000e+00   7.1000000e+00   6.4000000e+00   8.0000000e+00   7.0000000e+00   6.9000000e+00   7.2000000e+00   8.0000000e+00   8.2000000e+00   6.9000000e+00   5.4000000e+00   5.8000000e+00   5.6000000e+00   6.0000000e+00   7.8000000e+00   6.2000000e+00   6.5000000e+00   7.6000000e+00   7.5000000e+00   5.8000000e+00   6.1000000e+00   6.3000000e+00   6.9000000e+00   6.2000000e+00   4.8000000e+00   6.2000000e+00   5.9000000e+00   6.1000000e+00   6.7000000e+00   4.5000000e+00   6.1000000e+00   9.3000000e+00   7.9000000e+00   9.9000000e+00   8.6000000e+00   9.3000000e+00   1.1100000e+01   6.4000000e+00   1.0300000e+01   9.6000000e+00   1.0000000e+01   8.2000000e+00   8.7000000e+00   9.2000000e+00   8.0000000e+00   8.3000000e+00   8.6000000e+00   8.6000000e+00   1.1000000e+01   1.2100000e+01   8.1000000e+00   9.5000000e+00   7.5000000e+00   1.1400000e+01   8.1000000e+00   9.0000000e+00   9.6000000e+00   7.8000000e+00   7.6000000e+00   9.1000000e+00   9.4000000e+00   1.0400000e+01   1.0700000e+01   9.2000000e+00   7.9000000e+00   8.3000000e+00   1.0900000e+01   8.7000000e+00   8.4000000e+00   7.4000000e+00   9.1000000e+00   9.4000000e+00   9.0000000e+00   7.9000000e+00   9.6000000e+00   9.4000000e+00   9.0000000e+00   8.5000000e+00   8.5000000e+00   8.3000000e+00   7.6000000e+00   9.0000000e-01   8.0000000e-01   4.0000000e-01   8.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   7.0000000e-01   1.5000000e+00   1.9000000e+00   1.0000000e+00   1.0000000e+00   1.3000000e+00   1.0000000e+00   1.7000000e+00   6.0000000e-01   9.0000000e-01   2.2000000e+00   1.5000000e+00   5.0000000e-01   8.0000000e-01   1.1000000e+00   9.0000000e-01   1.2000000e+00   1.1000000e+00   7.0000000e-01   5.9000000e+00   5.2000000e+00   6.2000000e+00   4.5000000e+00   5.8000000e+00   4.7000000e+00   5.3000000e+00   3.2000000e+00   5.6000000e+00   3.8000000e+00   3.7000000e+00   4.6000000e+00   4.8000000e+00   5.3000000e+00   3.6000000e+00   5.4000000e+00   4.6000000e+00   4.2000000e+00   6.0000000e+00   4.1000000e+00   5.3000000e+00   4.6000000e+00   6.2000000e+00   5.2000000e+00   5.1000000e+00   5.4000000e+00   6.2000000e+00   6.4000000e+00   5.1000000e+00   3.6000000e+00   4.0000000e+00   3.8000000e+00   4.2000000e+00   6.0000000e+00   4.4000000e+00   4.9000000e+00   5.8000000e+00   5.7000000e+00   4.0000000e+00   4.3000000e+00   4.5000000e+00   5.1000000e+00   4.4000000e+00   3.2000000e+00   4.4000000e+00   4.1000000e+00   4.3000000e+00   4.9000000e+00   2.7000000e+00   4.3000000e+00   7.5000000e+00   6.1000000e+00   8.1000000e+00   6.8000000e+00   7.5000000e+00   9.3000000e+00   5.0000000e+00   8.5000000e+00   7.8000000e+00   8.8000000e+00   6.4000000e+00   6.9000000e+00   7.4000000e+00   6.2000000e+00   6.5000000e+00   6.8000000e+00   6.8000000e+00   9.8000000e+00   1.0300000e+01   6.3000000e+00   7.7000000e+00   5.7000000e+00   9.6000000e+00   6.3000000e+00   7.2000000e+00   7.8000000e+00   6.0000000e+00   5.8000000e+00   7.3000000e+00   7.6000000e+00   8.6000000e+00   9.5000000e+00   7.4000000e+00   6.1000000e+00   6.5000000e+00   9.1000000e+00   7.1000000e+00   6.6000000e+00   5.6000000e+00   7.3000000e+00   7.6000000e+00   7.2000000e+00   6.1000000e+00   7.8000000e+00   7.6000000e+00   7.2000000e+00   6.7000000e+00   6.7000000e+00   6.7000000e+00   5.8000000e+00   9.0000000e-01   7.0000000e-01   9.0000000e-01   9.0000000e-01   6.0000000e-01   6.0000000e-01   1.2000000e+00   1.6000000e+00   2.0000000e+00   9.0000000e-01   1.1000000e+00   1.4000000e+00   9.0000000e-01   1.4000000e+00   7.0000000e-01   1.0000000e+00   2.1000000e+00   1.2000000e+00   1.0000000e+00   9.0000000e-01   1.0000000e+00   1.0000000e+00   9.0000000e-01   1.2000000e+00   8.0000000e-01   6.4000000e+00   5.7000000e+00   6.7000000e+00   5.0000000e+00   6.3000000e+00   5.2000000e+00   5.8000000e+00   3.3000000e+00   6.1000000e+00   4.3000000e+00   4.0000000e+00   5.1000000e+00   5.3000000e+00   5.8000000e+00   4.1000000e+00   5.9000000e+00   5.1000000e+00   4.7000000e+00   6.5000000e+00   4.6000000e+00   5.8000000e+00   5.1000000e+00   6.7000000e+00   5.7000000e+00   5.6000000e+00   5.9000000e+00   6.7000000e+00   6.9000000e+00   5.6000000e+00   4.1000000e+00   4.5000000e+00   4.3000000e+00   4.7000000e+00   6.5000000e+00   4.9000000e+00   5.2000000e+00   6.3000000e+00   6.2000000e+00   4.5000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   4.9000000e+00   3.5000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   3.2000000e+00   4.8000000e+00   8.0000000e+00   6.6000000e+00   8.6000000e+00   7.3000000e+00   8.0000000e+00   9.8000000e+00   5.1000000e+00   9.0000000e+00   8.3000000e+00   9.1000000e+00   6.9000000e+00   7.4000000e+00   7.9000000e+00   6.7000000e+00   7.0000000e+00   7.3000000e+00   7.3000000e+00   1.0100000e+01   1.0800000e+01   6.8000000e+00   8.2000000e+00   6.2000000e+00   1.0100000e+01   6.8000000e+00   7.7000000e+00   8.3000000e+00   6.5000000e+00   6.3000000e+00   7.8000000e+00   8.1000000e+00   9.1000000e+00   9.8000000e+00   7.9000000e+00   6.6000000e+00   7.0000000e+00   9.6000000e+00   7.4000000e+00   7.1000000e+00   6.1000000e+00   7.8000000e+00   8.1000000e+00   7.7000000e+00   6.6000000e+00   8.3000000e+00   8.1000000e+00   7.7000000e+00   7.2000000e+00   7.2000000e+00   7.0000000e+00   6.3000000e+00   6.0000000e-01   8.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   1.1000000e+00   1.5000000e+00   1.9000000e+00   4.0000000e-01   6.0000000e-01   1.3000000e+00   4.0000000e-01   9.0000000e-01   6.0000000e-01   9.0000000e-01   1.6000000e+00   1.1000000e+00   9.0000000e-01   1.4000000e+00   5.0000000e-01   9.0000000e-01   8.0000000e-01   1.1000000e+00   5.0000000e-01   6.5000000e+00   5.8000000e+00   6.6000000e+00   4.7000000e+00   6.0000000e+00   4.9000000e+00   6.1000000e+00   3.2000000e+00   5.8000000e+00   4.0000000e+00   3.7000000e+00   4.8000000e+00   5.0000000e+00   5.5000000e+00   3.8000000e+00   5.8000000e+00   4.8000000e+00   4.4000000e+00   6.2000000e+00   4.3000000e+00   5.9000000e+00   4.8000000e+00   6.4000000e+00   5.4000000e+00   5.3000000e+00   5.6000000e+00   6.4000000e+00   6.6000000e+00   5.3000000e+00   3.8000000e+00   4.2000000e+00   4.0000000e+00   4.4000000e+00   6.2000000e+00   4.6000000e+00   5.7000000e+00   6.2000000e+00   5.9000000e+00   4.2000000e+00   4.5000000e+00   4.7000000e+00   5.3000000e+00   4.6000000e+00   3.2000000e+00   4.6000000e+00   4.3000000e+00   4.5000000e+00   5.1000000e+00   2.9000000e+00   4.5000000e+00   8.3000000e+00   6.3000000e+00   8.3000000e+00   7.0000000e+00   7.7000000e+00   9.5000000e+00   5.0000000e+00   8.7000000e+00   8.0000000e+00   9.6000000e+00   7.0000000e+00   7.1000000e+00   7.6000000e+00   6.4000000e+00   6.7000000e+00   7.4000000e+00   7.0000000e+00   1.0600000e+01   1.0500000e+01   6.5000000e+00   8.3000000e+00   5.9000000e+00   9.8000000e+00   6.5000000e+00   8.0000000e+00   8.4000000e+00   6.2000000e+00   6.0000000e+00   7.5000000e+00   7.8000000e+00   8.8000000e+00   1.0300000e+01   7.6000000e+00   6.3000000e+00   6.7000000e+00   9.3000000e+00   7.9000000e+00   7.0000000e+00   5.8000000e+00   7.7000000e+00   8.0000000e+00   7.6000000e+00   6.3000000e+00   8.4000000e+00   8.4000000e+00   7.4000000e+00   6.9000000e+00   6.9000000e+00   7.5000000e+00   6.0000000e+00   6.0000000e-01   6.0000000e-01   7.0000000e-01   7.0000000e-01   5.0000000e-01   1.3000000e+00   1.7000000e+00   8.0000000e-01   8.0000000e-01   1.1000000e+00   8.0000000e-01   1.5000000e+00   4.0000000e-01   5.0000000e-01   2.0000000e+00   1.3000000e+00   3.0000000e-01   8.0000000e-01   9.0000000e-01   7.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   6.3000000e+00   5.6000000e+00   6.6000000e+00   4.9000000e+00   6.2000000e+00   5.1000000e+00   5.7000000e+00   3.4000000e+00   6.0000000e+00   4.2000000e+00   3.9000000e+00   5.0000000e+00   5.2000000e+00   5.7000000e+00   4.0000000e+00   5.8000000e+00   5.0000000e+00   4.6000000e+00   6.4000000e+00   4.5000000e+00   5.7000000e+00   5.0000000e+00   6.6000000e+00   5.6000000e+00   5.5000000e+00   5.8000000e+00   6.6000000e+00   6.8000000e+00   5.5000000e+00   4.0000000e+00   4.4000000e+00   4.2000000e+00   4.6000000e+00   6.4000000e+00   4.8000000e+00   5.1000000e+00   6.2000000e+00   6.1000000e+00   4.4000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   4.8000000e+00   3.4000000e+00   4.8000000e+00   4.5000000e+00   4.7000000e+00   5.3000000e+00   3.1000000e+00   4.7000000e+00   7.9000000e+00   6.5000000e+00   8.5000000e+00   7.2000000e+00   7.9000000e+00   9.7000000e+00   5.2000000e+00   8.9000000e+00   8.2000000e+00   9.0000000e+00   6.8000000e+00   7.3000000e+00   7.8000000e+00   6.6000000e+00   6.9000000e+00   7.2000000e+00   7.2000000e+00   1.0000000e+01   1.0700000e+01   6.7000000e+00   8.1000000e+00   6.1000000e+00   1.0000000e+01   6.7000000e+00   7.6000000e+00   8.2000000e+00   6.4000000e+00   6.2000000e+00   7.7000000e+00   8.0000000e+00   9.0000000e+00   9.7000000e+00   7.8000000e+00   6.5000000e+00   6.9000000e+00   9.5000000e+00   7.3000000e+00   7.0000000e+00   6.0000000e+00   7.7000000e+00   8.0000000e+00   7.6000000e+00   6.5000000e+00   8.2000000e+00   8.0000000e+00   7.6000000e+00   7.1000000e+00   7.1000000e+00   6.9000000e+00   6.2000000e+00   2.0000000e-01   9.0000000e-01   9.0000000e-01   5.0000000e-01   7.0000000e-01   1.1000000e+00   8.0000000e-01   8.0000000e-01   5.0000000e-01   8.0000000e-01   1.5000000e+00   2.0000000e-01   5.0000000e-01   2.2000000e+00   1.3000000e+00   7.0000000e-01   1.0000000e+00   1.1000000e+00   5.0000000e-01   1.0000000e+00   3.0000000e-01   5.0000000e-01   6.5000000e+00   5.8000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   5.9000000e+00   4.0000000e+00   6.2000000e+00   4.4000000e+00   4.5000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   5.9000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.3000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   4.0000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.5000000e+00   4.9000000e+00   8.1000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.8000000e+00   9.1000000e+00   8.4000000e+00   9.0000000e+00   7.0000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.4000000e+00   7.4000000e+00   1.0000000e+01   1.0900000e+01   6.9000000e+00   8.3000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   7.8000000e+00   8.4000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   9.7000000e+00   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   7.5000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.4000000e+00   8.2000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.1000000e+00   6.4000000e+00   9.0000000e-01   9.0000000e-01   5.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   6.0000000e-01   5.0000000e-01   8.0000000e-01   1.3000000e+00   2.0000000e-01   5.0000000e-01   2.0000000e+00   1.1000000e+00   9.0000000e-01   1.2000000e+00   9.0000000e-01   7.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   6.5000000e+00   5.8000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   5.9000000e+00   4.0000000e+00   6.2000000e+00   4.4000000e+00   4.5000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   5.9000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.3000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   4.0000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.5000000e+00   4.9000000e+00   8.1000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.8000000e+00   9.1000000e+00   8.4000000e+00   9.2000000e+00   7.0000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.4000000e+00   7.4000000e+00   1.0200000e+01   1.0900000e+01   6.9000000e+00   8.3000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   7.8000000e+00   8.4000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   9.9000000e+00   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   7.5000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.4000000e+00   8.2000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.1000000e+00   6.4000000e+00   2.0000000e-01   1.2000000e+00   1.6000000e+00   2.0000000e+00   5.0000000e-01   7.0000000e-01   1.4000000e+00   5.0000000e-01   8.0000000e-01   7.0000000e-01   1.0000000e+00   1.5000000e+00   6.0000000e-01   1.0000000e+00   1.5000000e+00   6.0000000e-01   1.0000000e+00   3.0000000e-01   1.2000000e+00   6.0000000e-01   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.2000000e+00   3.5000000e+00   6.3000000e+00   4.5000000e+00   4.2000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.8000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.7000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.4000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.3000000e+00   9.2000000e+00   8.5000000e+00   9.7000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   1.0700000e+01   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   8.1000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   1.0400000e+01   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   8.0000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.5000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.6000000e+00   6.5000000e+00   1.2000000e+00   1.6000000e+00   2.0000000e+00   3.0000000e-01   7.0000000e-01   1.4000000e+00   3.0000000e-01   8.0000000e-01   7.0000000e-01   1.0000000e+00   1.5000000e+00   8.0000000e-01   1.0000000e+00   1.5000000e+00   4.0000000e-01   1.0000000e+00   5.0000000e-01   1.2000000e+00   6.0000000e-01   6.6000000e+00   5.9000000e+00   6.7000000e+00   5.0000000e+00   6.3000000e+00   5.2000000e+00   6.2000000e+00   3.3000000e+00   6.1000000e+00   4.3000000e+00   4.0000000e+00   5.1000000e+00   5.3000000e+00   5.8000000e+00   4.1000000e+00   5.9000000e+00   5.1000000e+00   4.7000000e+00   6.5000000e+00   4.6000000e+00   6.0000000e+00   5.1000000e+00   6.7000000e+00   5.7000000e+00   5.6000000e+00   5.9000000e+00   6.7000000e+00   6.9000000e+00   5.6000000e+00   4.1000000e+00   4.5000000e+00   4.3000000e+00   4.7000000e+00   6.5000000e+00   4.9000000e+00   5.8000000e+00   6.3000000e+00   6.2000000e+00   4.5000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   4.9000000e+00   3.5000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   3.2000000e+00   4.8000000e+00   8.4000000e+00   6.6000000e+00   8.6000000e+00   7.3000000e+00   8.0000000e+00   9.8000000e+00   5.1000000e+00   9.0000000e+00   8.3000000e+00   9.7000000e+00   7.1000000e+00   7.4000000e+00   7.9000000e+00   6.7000000e+00   7.0000000e+00   7.5000000e+00   7.3000000e+00   1.0700000e+01   1.0800000e+01   6.8000000e+00   8.4000000e+00   6.2000000e+00   1.0100000e+01   6.8000000e+00   8.1000000e+00   8.5000000e+00   6.5000000e+00   6.3000000e+00   7.8000000e+00   8.1000000e+00   9.1000000e+00   1.0400000e+01   7.9000000e+00   6.6000000e+00   7.0000000e+00   9.6000000e+00   8.0000000e+00   7.1000000e+00   6.1000000e+00   7.8000000e+00   8.1000000e+00   7.7000000e+00   6.6000000e+00   8.5000000e+00   8.5000000e+00   7.7000000e+00   7.2000000e+00   7.2000000e+00   7.6000000e+00   6.3000000e+00   1.2000000e+00   1.2000000e+00   1.1000000e+00   1.1000000e+00   6.0000000e-01   1.1000000e+00   1.8000000e+00   5.0000000e-01   8.0000000e-01   2.3000000e+00   1.6000000e+00   8.0000000e-01   1.1000000e+00   1.2000000e+00   1.0000000e+00   1.3000000e+00   6.0000000e-01   8.0000000e-01   6.0000000e+00   5.3000000e+00   6.3000000e+00   4.6000000e+00   5.9000000e+00   4.8000000e+00   5.4000000e+00   3.9000000e+00   5.7000000e+00   4.3000000e+00   4.4000000e+00   4.7000000e+00   4.9000000e+00   5.4000000e+00   3.7000000e+00   5.5000000e+00   4.7000000e+00   4.3000000e+00   6.1000000e+00   4.2000000e+00   5.4000000e+00   4.7000000e+00   6.3000000e+00   5.3000000e+00   5.2000000e+00   5.5000000e+00   6.3000000e+00   6.5000000e+00   5.2000000e+00   3.7000000e+00   4.1000000e+00   3.9000000e+00   4.3000000e+00   6.1000000e+00   4.5000000e+00   4.8000000e+00   5.9000000e+00   5.8000000e+00   4.1000000e+00   4.4000000e+00   4.6000000e+00   5.2000000e+00   4.5000000e+00   3.9000000e+00   4.5000000e+00   4.2000000e+00   4.4000000e+00   5.0000000e+00   3.4000000e+00   4.4000000e+00   7.6000000e+00   6.2000000e+00   8.2000000e+00   6.9000000e+00   7.6000000e+00   9.4000000e+00   5.7000000e+00   8.6000000e+00   7.9000000e+00   8.7000000e+00   6.5000000e+00   7.0000000e+00   7.5000000e+00   6.3000000e+00   6.6000000e+00   6.9000000e+00   6.9000000e+00   9.7000000e+00   1.0400000e+01   6.4000000e+00   7.8000000e+00   5.8000000e+00   9.7000000e+00   6.4000000e+00   7.3000000e+00   7.9000000e+00   6.1000000e+00   5.9000000e+00   7.4000000e+00   7.7000000e+00   8.7000000e+00   9.4000000e+00   7.5000000e+00   6.2000000e+00   6.6000000e+00   9.2000000e+00   7.0000000e+00   6.7000000e+00   5.7000000e+00   7.4000000e+00   7.7000000e+00   7.3000000e+00   6.2000000e+00   7.9000000e+00   7.7000000e+00   7.3000000e+00   6.8000000e+00   6.8000000e+00   6.6000000e+00   5.9000000e+00   6.0000000e-01   1.3000000e+00   1.5000000e+00   1.2000000e+00   1.3000000e+00   2.2000000e+00   9.0000000e-01   1.2000000e+00   2.9000000e+00   2.0000000e+00   1.4000000e+00   1.1000000e+00   1.8000000e+00   6.0000000e-01   1.7000000e+00   6.0000000e-01   1.2000000e+00   7.2000000e+00   6.5000000e+00   7.5000000e+00   5.8000000e+00   7.1000000e+00   6.0000000e+00   6.6000000e+00   4.7000000e+00   6.9000000e+00   5.1000000e+00   5.2000000e+00   5.9000000e+00   6.1000000e+00   6.6000000e+00   4.9000000e+00   6.7000000e+00   5.9000000e+00   5.5000000e+00   7.3000000e+00   5.4000000e+00   6.6000000e+00   5.9000000e+00   7.5000000e+00   6.5000000e+00   6.4000000e+00   6.7000000e+00   7.5000000e+00   7.7000000e+00   6.4000000e+00   4.9000000e+00   5.3000000e+00   5.1000000e+00   5.5000000e+00   7.3000000e+00   5.7000000e+00   6.0000000e+00   7.1000000e+00   7.0000000e+00   5.3000000e+00   5.6000000e+00   5.8000000e+00   6.4000000e+00   5.7000000e+00   4.7000000e+00   5.7000000e+00   5.4000000e+00   5.6000000e+00   6.2000000e+00   4.2000000e+00   5.6000000e+00   8.8000000e+00   7.4000000e+00   9.4000000e+00   8.1000000e+00   8.8000000e+00   1.0600000e+01   6.5000000e+00   9.8000000e+00   9.1000000e+00   9.5000000e+00   7.7000000e+00   8.2000000e+00   8.7000000e+00   7.5000000e+00   7.8000000e+00   8.1000000e+00   8.1000000e+00   1.0100000e+01   1.1600000e+01   7.6000000e+00   9.0000000e+00   7.0000000e+00   1.0900000e+01   7.6000000e+00   8.5000000e+00   9.1000000e+00   7.3000000e+00   7.1000000e+00   8.6000000e+00   8.9000000e+00   9.9000000e+00   9.8000000e+00   8.7000000e+00   7.4000000e+00   7.8000000e+00   1.0400000e+01   8.2000000e+00   7.9000000e+00   6.9000000e+00   8.6000000e+00   8.9000000e+00   8.5000000e+00   7.4000000e+00   9.1000000e+00   8.9000000e+00   8.5000000e+00   8.0000000e+00   8.0000000e+00   7.8000000e+00   7.1000000e+00   1.9000000e+00   1.7000000e+00   8.0000000e-01   1.9000000e+00   2.4000000e+00   1.3000000e+00   1.4000000e+00   3.1000000e+00   2.2000000e+00   1.8000000e+00   1.5000000e+00   2.0000000e+00   1.0000000e+00   1.9000000e+00   8.0000000e-01   1.4000000e+00   7.0000000e+00   6.3000000e+00   7.3000000e+00   5.6000000e+00   6.9000000e+00   5.8000000e+00   6.4000000e+00   5.1000000e+00   6.7000000e+00   5.5000000e+00   5.6000000e+00   5.7000000e+00   5.9000000e+00   6.4000000e+00   4.7000000e+00   6.5000000e+00   5.7000000e+00   5.3000000e+00   7.1000000e+00   5.2000000e+00   6.4000000e+00   5.7000000e+00   7.3000000e+00   6.3000000e+00   6.2000000e+00   6.5000000e+00   7.3000000e+00   7.5000000e+00   6.2000000e+00   4.7000000e+00   5.1000000e+00   4.9000000e+00   5.3000000e+00   7.1000000e+00   5.7000000e+00   5.8000000e+00   6.9000000e+00   6.8000000e+00   5.1000000e+00   5.4000000e+00   5.6000000e+00   6.2000000e+00   5.5000000e+00   5.1000000e+00   5.5000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   4.6000000e+00   5.4000000e+00   8.6000000e+00   7.2000000e+00   9.2000000e+00   7.9000000e+00   8.6000000e+00   1.0400000e+01   6.9000000e+00   9.6000000e+00   8.9000000e+00   9.3000000e+00   7.5000000e+00   8.0000000e+00   8.5000000e+00   7.3000000e+00   7.6000000e+00   7.9000000e+00   7.9000000e+00   9.9000000e+00   1.1400000e+01   7.4000000e+00   8.8000000e+00   6.8000000e+00   1.0700000e+01   7.4000000e+00   8.3000000e+00   8.9000000e+00   7.1000000e+00   6.9000000e+00   8.4000000e+00   8.7000000e+00   9.7000000e+00   9.6000000e+00   8.5000000e+00   7.2000000e+00   7.6000000e+00   1.0200000e+01   8.0000000e+00   7.7000000e+00   6.7000000e+00   8.4000000e+00   8.7000000e+00   8.3000000e+00   7.2000000e+00   8.9000000e+00   8.7000000e+00   8.3000000e+00   7.8000000e+00   7.8000000e+00   7.6000000e+00   6.9000000e+00   6.0000000e-01   1.3000000e+00   0.0000000e+00   9.0000000e-01   6.0000000e-01   9.0000000e-01   1.6000000e+00   9.0000000e-01   1.1000000e+00   1.6000000e+00   5.0000000e-01   1.1000000e+00   6.0000000e-01   1.1000000e+00   5.0000000e-01   6.7000000e+00   6.0000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   6.3000000e+00   3.4000000e+00   6.2000000e+00   4.4000000e+00   4.1000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   6.1000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.9000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   3.6000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.3000000e+00   4.9000000e+00   8.5000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.2000000e+00   9.1000000e+00   8.4000000e+00   9.8000000e+00   7.2000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.6000000e+00   7.4000000e+00   1.0800000e+01   1.0900000e+01   6.9000000e+00   8.5000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   8.2000000e+00   8.6000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   1.0500000e+01   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   8.1000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.6000000e+00   8.6000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.7000000e+00   6.4000000e+00   9.0000000e-01   6.0000000e-01   9.0000000e-01   6.0000000e-01   5.0000000e-01   1.6000000e+00   7.0000000e-01   1.1000000e+00   1.6000000e+00   7.0000000e-01   1.1000000e+00   6.0000000e-01   1.1000000e+00   3.0000000e-01   6.7000000e+00   6.0000000e+00   7.0000000e+00   5.3000000e+00   6.6000000e+00   5.5000000e+00   6.3000000e+00   3.8000000e+00   6.4000000e+00   4.6000000e+00   4.3000000e+00   5.4000000e+00   5.6000000e+00   6.1000000e+00   4.4000000e+00   6.2000000e+00   5.4000000e+00   5.0000000e+00   6.8000000e+00   4.9000000e+00   6.1000000e+00   5.4000000e+00   7.0000000e+00   6.0000000e+00   5.9000000e+00   6.2000000e+00   7.0000000e+00   7.2000000e+00   5.9000000e+00   4.4000000e+00   4.8000000e+00   4.6000000e+00   5.0000000e+00   6.8000000e+00   5.2000000e+00   5.9000000e+00   6.6000000e+00   6.5000000e+00   4.8000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   5.2000000e+00   3.8000000e+00   5.2000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   3.5000000e+00   5.1000000e+00   8.5000000e+00   6.9000000e+00   8.9000000e+00   7.6000000e+00   8.3000000e+00   1.0100000e+01   5.6000000e+00   9.3000000e+00   8.6000000e+00   9.8000000e+00   7.2000000e+00   7.7000000e+00   8.2000000e+00   7.0000000e+00   7.3000000e+00   7.6000000e+00   7.6000000e+00   1.0800000e+01   1.1100000e+01   7.1000000e+00   8.5000000e+00   6.5000000e+00   1.0400000e+01   7.1000000e+00   8.2000000e+00   8.6000000e+00   6.8000000e+00   6.6000000e+00   8.1000000e+00   8.4000000e+00   9.4000000e+00   1.0500000e+01   8.2000000e+00   6.9000000e+00   7.3000000e+00   9.9000000e+00   8.1000000e+00   7.4000000e+00   6.4000000e+00   8.1000000e+00   8.4000000e+00   8.0000000e+00   6.9000000e+00   8.6000000e+00   8.6000000e+00   8.0000000e+00   7.5000000e+00   7.5000000e+00   7.7000000e+00   6.6000000e+00   1.3000000e+00   1.6000000e+00   7.0000000e-01   6.0000000e-01   2.3000000e+00   1.4000000e+00   1.2000000e+00   1.5000000e+00   1.4000000e+00   1.0000000e+00   1.3000000e+00   6.0000000e-01   8.0000000e-01   6.4000000e+00   5.7000000e+00   6.7000000e+00   5.0000000e+00   6.3000000e+00   5.2000000e+00   5.8000000e+00   4.5000000e+00   6.1000000e+00   4.9000000e+00   5.0000000e+00   5.1000000e+00   5.3000000e+00   5.8000000e+00   4.1000000e+00   5.9000000e+00   5.1000000e+00   4.7000000e+00   6.5000000e+00   4.6000000e+00   5.8000000e+00   5.1000000e+00   6.7000000e+00   5.7000000e+00   5.6000000e+00   5.9000000e+00   6.7000000e+00   6.9000000e+00   5.6000000e+00   4.1000000e+00   4.5000000e+00   4.3000000e+00   4.7000000e+00   6.5000000e+00   5.1000000e+00   5.2000000e+00   6.3000000e+00   6.2000000e+00   4.5000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   4.9000000e+00   4.5000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   4.0000000e+00   4.8000000e+00   8.0000000e+00   6.6000000e+00   8.6000000e+00   7.3000000e+00   8.0000000e+00   9.8000000e+00   6.3000000e+00   9.0000000e+00   8.3000000e+00   8.9000000e+00   6.9000000e+00   7.4000000e+00   7.9000000e+00   6.7000000e+00   7.0000000e+00   7.3000000e+00   7.3000000e+00   9.9000000e+00   1.0800000e+01   6.8000000e+00   8.2000000e+00   6.2000000e+00   1.0100000e+01   6.8000000e+00   7.7000000e+00   8.3000000e+00   6.5000000e+00   6.3000000e+00   7.8000000e+00   8.1000000e+00   9.1000000e+00   9.6000000e+00   7.9000000e+00   6.6000000e+00   7.0000000e+00   9.6000000e+00   7.4000000e+00   7.1000000e+00   6.1000000e+00   7.8000000e+00   8.1000000e+00   7.7000000e+00   6.6000000e+00   8.3000000e+00   8.1000000e+00   7.7000000e+00   7.2000000e+00   7.2000000e+00   7.0000000e+00   6.3000000e+00   9.0000000e-01   6.0000000e-01   9.0000000e-01   1.6000000e+00   9.0000000e-01   1.1000000e+00   1.6000000e+00   5.0000000e-01   1.1000000e+00   6.0000000e-01   1.1000000e+00   5.0000000e-01   6.7000000e+00   6.0000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   6.3000000e+00   3.4000000e+00   6.2000000e+00   4.4000000e+00   4.1000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   6.1000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.9000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   3.6000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.3000000e+00   4.9000000e+00   8.5000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.2000000e+00   9.1000000e+00   8.4000000e+00   9.8000000e+00   7.2000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.6000000e+00   7.4000000e+00   1.0800000e+01   1.0900000e+01   6.9000000e+00   8.5000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   8.2000000e+00   8.6000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   1.0500000e+01   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   8.1000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.6000000e+00   8.6000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.7000000e+00   6.4000000e+00   1.3000000e+00   1.2000000e+00   9.0000000e-01   2.0000000e-01   1.8000000e+00   2.3000000e+00   6.0000000e-01   1.8000000e+00   5.0000000e-01   1.8000000e+00   1.0000000e+00   7.4000000e+00   6.7000000e+00   7.5000000e+00   5.6000000e+00   6.9000000e+00   5.8000000e+00   7.0000000e+00   3.9000000e+00   6.7000000e+00   4.9000000e+00   4.6000000e+00   5.7000000e+00   5.9000000e+00   6.4000000e+00   4.7000000e+00   6.7000000e+00   5.7000000e+00   5.3000000e+00   7.1000000e+00   5.2000000e+00   6.8000000e+00   5.7000000e+00   7.3000000e+00   6.3000000e+00   6.2000000e+00   6.5000000e+00   7.3000000e+00   7.5000000e+00   6.2000000e+00   4.7000000e+00   5.1000000e+00   4.9000000e+00   5.3000000e+00   7.1000000e+00   5.5000000e+00   6.6000000e+00   7.1000000e+00   6.8000000e+00   5.1000000e+00   5.4000000e+00   5.6000000e+00   6.2000000e+00   5.5000000e+00   4.1000000e+00   5.5000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   3.8000000e+00   5.4000000e+00   9.2000000e+00   7.2000000e+00   9.2000000e+00   7.9000000e+00   8.6000000e+00   1.0400000e+01   5.7000000e+00   9.6000000e+00   8.9000000e+00   1.0500000e+01   7.9000000e+00   8.0000000e+00   8.5000000e+00   7.3000000e+00   7.6000000e+00   8.3000000e+00   7.9000000e+00   1.1500000e+01   1.1400000e+01   7.4000000e+00   9.2000000e+00   6.8000000e+00   1.0700000e+01   7.4000000e+00   8.9000000e+00   9.3000000e+00   7.1000000e+00   6.9000000e+00   8.4000000e+00   8.7000000e+00   9.7000000e+00   1.1200000e+01   8.5000000e+00   7.2000000e+00   7.6000000e+00   1.0200000e+01   8.8000000e+00   7.9000000e+00   6.7000000e+00   8.6000000e+00   8.9000000e+00   8.5000000e+00   7.2000000e+00   9.3000000e+00   9.3000000e+00   8.3000000e+00   7.8000000e+00   7.8000000e+00   8.4000000e+00   6.9000000e+00   5.0000000e-01   2.0000000e+00   1.1000000e+00   7.0000000e-01   1.0000000e+00   9.0000000e-01   5.0000000e-01   8.0000000e-01   5.0000000e-01   3.0000000e-01   6.5000000e+00   5.8000000e+00   6.8000000e+00   5.1000000e+00   6.4000000e+00   5.3000000e+00   5.9000000e+00   3.8000000e+00   6.2000000e+00   4.4000000e+00   4.3000000e+00   5.2000000e+00   5.4000000e+00   5.9000000e+00   4.2000000e+00   6.0000000e+00   5.2000000e+00   4.8000000e+00   6.6000000e+00   4.7000000e+00   5.9000000e+00   5.2000000e+00   6.8000000e+00   5.8000000e+00   5.7000000e+00   6.0000000e+00   6.8000000e+00   7.0000000e+00   5.7000000e+00   4.2000000e+00   4.6000000e+00   4.4000000e+00   4.8000000e+00   6.6000000e+00   5.0000000e+00   5.3000000e+00   6.4000000e+00   6.3000000e+00   4.6000000e+00   4.9000000e+00   5.1000000e+00   5.7000000e+00   5.0000000e+00   3.8000000e+00   5.0000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   3.3000000e+00   4.9000000e+00   8.1000000e+00   6.7000000e+00   8.7000000e+00   7.4000000e+00   8.1000000e+00   9.9000000e+00   5.6000000e+00   9.1000000e+00   8.4000000e+00   9.2000000e+00   7.0000000e+00   7.5000000e+00   8.0000000e+00   6.8000000e+00   7.1000000e+00   7.4000000e+00   7.4000000e+00   1.0200000e+01   1.0900000e+01   6.9000000e+00   8.3000000e+00   6.3000000e+00   1.0200000e+01   6.9000000e+00   7.8000000e+00   8.4000000e+00   6.6000000e+00   6.4000000e+00   7.9000000e+00   8.2000000e+00   9.2000000e+00   9.9000000e+00   8.0000000e+00   6.7000000e+00   7.1000000e+00   9.7000000e+00   7.5000000e+00   7.2000000e+00   6.2000000e+00   7.9000000e+00   8.2000000e+00   7.8000000e+00   6.7000000e+00   8.4000000e+00   8.2000000e+00   7.8000000e+00   7.3000000e+00   7.3000000e+00   7.1000000e+00   6.4000000e+00   1.7000000e+00   1.0000000e+00   6.0000000e-01   1.1000000e+00   8.0000000e-01   8.0000000e-01   9.0000000e-01   8.0000000e-01   4.0000000e-01   6.8000000e+00   6.1000000e+00   7.1000000e+00   5.4000000e+00   6.7000000e+00   5.6000000e+00   6.2000000e+00   3.9000000e+00   6.5000000e+00   4.7000000e+00   4.4000000e+00   5.5000000e+00   5.7000000e+00   6.2000000e+00   4.5000000e+00   6.3000000e+00   5.5000000e+00   5.1000000e+00   6.9000000e+00   5.0000000e+00   6.2000000e+00   5.5000000e+00   7.1000000e+00   6.1000000e+00   6.0000000e+00   6.3000000e+00   7.1000000e+00   7.3000000e+00   6.0000000e+00   4.5000000e+00   4.9000000e+00   4.7000000e+00   5.1000000e+00   6.9000000e+00   5.3000000e+00   5.6000000e+00   6.7000000e+00   6.6000000e+00   4.9000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   5.3000000e+00   3.9000000e+00   5.3000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   3.6000000e+00   5.2000000e+00   8.4000000e+00   7.0000000e+00   9.0000000e+00   7.7000000e+00   8.4000000e+00   1.0200000e+01   5.7000000e+00   9.4000000e+00   8.7000000e+00   9.3000000e+00   7.3000000e+00   7.8000000e+00   8.3000000e+00   7.1000000e+00   7.4000000e+00   7.7000000e+00   7.7000000e+00   1.0300000e+01   1.1200000e+01   7.2000000e+00   8.6000000e+00   6.6000000e+00   1.0500000e+01   7.2000000e+00   8.1000000e+00   8.7000000e+00   6.9000000e+00   6.7000000e+00   8.2000000e+00   8.5000000e+00   9.5000000e+00   1.0000000e+01   8.3000000e+00   7.0000000e+00   7.4000000e+00   1.0000000e+01   7.8000000e+00   7.5000000e+00   6.5000000e+00   8.2000000e+00   8.5000000e+00   8.1000000e+00   7.0000000e+00   8.7000000e+00   8.5000000e+00   8.1000000e+00   7.6000000e+00   7.6000000e+00   7.4000000e+00   6.7000000e+00   1.1000000e+00   2.3000000e+00   2.8000000e+00   1.1000000e+00   2.5000000e+00   1.2000000e+00   2.5000000e+00   1.7000000e+00   7.9000000e+00   7.2000000e+00   8.0000000e+00   4.7000000e+00   7.0000000e+00   5.9000000e+00   7.5000000e+00   3.2000000e+00   7.0000000e+00   4.8000000e+00   3.7000000e+00   6.2000000e+00   5.0000000e+00   6.7000000e+00   5.0000000e+00   7.2000000e+00   6.2000000e+00   5.2000000e+00   6.2000000e+00   4.7000000e+00   7.3000000e+00   5.8000000e+00   6.8000000e+00   6.4000000e+00   6.5000000e+00   7.0000000e+00   7.4000000e+00   8.0000000e+00   6.5000000e+00   4.4000000e+00   4.4000000e+00   4.2000000e+00   5.2000000e+00   7.0000000e+00   6.0000000e+00   7.1000000e+00   7.6000000e+00   5.9000000e+00   5.6000000e+00   4.9000000e+00   5.3000000e+00   6.7000000e+00   5.2000000e+00   3.2000000e+00   5.4000000e+00   5.7000000e+00   5.7000000e+00   6.3000000e+00   3.3000000e+00   5.5000000e+00   9.7000000e+00   7.1000000e+00   9.7000000e+00   8.2000000e+00   9.1000000e+00   1.0900000e+01   5.2000000e+00   9.9000000e+00   8.4000000e+00   1.1000000e+01   8.4000000e+00   7.9000000e+00   9.0000000e+00   6.8000000e+00   7.7000000e+00   8.8000000e+00   8.4000000e+00   1.2000000e+01   1.1100000e+01   6.5000000e+00   9.7000000e+00   6.9000000e+00   1.0800000e+01   7.3000000e+00   9.4000000e+00   9.8000000e+00   7.2000000e+00   7.4000000e+00   8.5000000e+00   9.2000000e+00   9.8000000e+00   1.1700000e+01   8.6000000e+00   7.3000000e+00   7.3000000e+00   1.0700000e+01   9.3000000e+00   8.4000000e+00   7.2000000e+00   9.1000000e+00   9.4000000e+00   9.0000000e+00   7.1000000e+00   9.8000000e+00   9.8000000e+00   8.8000000e+00   7.3000000e+00   8.3000000e+00   8.9000000e+00   7.4000000e+00   1.6000000e+00   2.1000000e+00   8.0000000e-01   1.6000000e+00   3.0000000e-01   1.6000000e+00   8.0000000e-01   7.2000000e+00   6.5000000e+00   7.5000000e+00   5.8000000e+00   7.1000000e+00   6.0000000e+00   6.8000000e+00   4.1000000e+00   6.9000000e+00   5.1000000e+00   4.8000000e+00   5.9000000e+00   6.1000000e+00   6.6000000e+00   4.9000000e+00   6.7000000e+00   5.9000000e+00   5.5000000e+00   7.3000000e+00   5.4000000e+00   6.6000000e+00   5.9000000e+00   7.5000000e+00   6.5000000e+00   6.4000000e+00   6.7000000e+00   7.5000000e+00   7.7000000e+00   6.4000000e+00   4.9000000e+00   5.3000000e+00   5.1000000e+00   5.5000000e+00   7.3000000e+00   5.7000000e+00   6.4000000e+00   7.1000000e+00   7.0000000e+00   5.3000000e+00   5.6000000e+00   5.8000000e+00   6.4000000e+00   5.7000000e+00   4.3000000e+00   5.7000000e+00   5.4000000e+00   5.6000000e+00   6.2000000e+00   4.0000000e+00   5.6000000e+00   9.0000000e+00   7.4000000e+00   9.4000000e+00   8.1000000e+00   8.8000000e+00   1.0600000e+01   5.9000000e+00   9.8000000e+00   9.1000000e+00   1.0300000e+01   7.7000000e+00   8.2000000e+00   8.7000000e+00   7.5000000e+00   7.8000000e+00   8.1000000e+00   8.1000000e+00   1.1300000e+01   1.1600000e+01   7.6000000e+00   9.0000000e+00   7.0000000e+00   1.0900000e+01   7.6000000e+00   8.7000000e+00   9.1000000e+00   7.3000000e+00   7.1000000e+00   8.6000000e+00   8.9000000e+00   9.9000000e+00   1.1000000e+01   8.7000000e+00   7.4000000e+00   7.8000000e+00   1.0400000e+01   8.6000000e+00   7.9000000e+00   6.9000000e+00   8.6000000e+00   8.9000000e+00   8.5000000e+00   7.4000000e+00   9.1000000e+00   9.1000000e+00   8.5000000e+00   8.0000000e+00   8.0000000e+00   8.2000000e+00   7.1000000e+00   9.0000000e-01   1.2000000e+00   8.0000000e-01   1.3000000e+00   1.0000000e+00   8.0000000e-01   6.2000000e+00   5.5000000e+00   6.5000000e+00   4.8000000e+00   6.1000000e+00   5.0000000e+00   5.6000000e+00   3.3000000e+00   5.9000000e+00   4.1000000e+00   3.8000000e+00   4.9000000e+00   5.1000000e+00   5.6000000e+00   3.9000000e+00   5.7000000e+00   4.9000000e+00   4.5000000e+00   6.3000000e+00   4.4000000e+00   5.6000000e+00   4.9000000e+00   6.5000000e+00   5.5000000e+00   5.4000000e+00   5.7000000e+00   6.5000000e+00   6.7000000e+00   5.4000000e+00   3.9000000e+00   4.3000000e+00   4.1000000e+00   4.5000000e+00   6.3000000e+00   4.7000000e+00   5.0000000e+00   6.1000000e+00   6.0000000e+00   4.3000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   4.7000000e+00   3.3000000e+00   4.7000000e+00   4.4000000e+00   4.6000000e+00   5.2000000e+00   3.0000000e+00   4.6000000e+00   7.8000000e+00   6.4000000e+00   8.4000000e+00   7.1000000e+00   7.8000000e+00   9.6000000e+00   5.1000000e+00   8.8000000e+00   8.1000000e+00   8.7000000e+00   6.7000000e+00   7.2000000e+00   7.7000000e+00   6.5000000e+00   6.8000000e+00   7.1000000e+00   7.1000000e+00   9.7000000e+00   1.0600000e+01   6.6000000e+00   8.0000000e+00   6.0000000e+00   9.9000000e+00   6.6000000e+00   7.5000000e+00   8.1000000e+00   6.3000000e+00   6.1000000e+00   7.6000000e+00   7.9000000e+00   8.9000000e+00   9.4000000e+00   7.7000000e+00   6.4000000e+00   6.8000000e+00   9.4000000e+00   7.2000000e+00   6.9000000e+00   5.9000000e+00   7.6000000e+00   7.9000000e+00   7.5000000e+00   6.4000000e+00   8.1000000e+00   7.9000000e+00   7.5000000e+00   7.0000000e+00   7.0000000e+00   6.8000000e+00   6.1000000e+00   1.7000000e+00   5.0000000e-01   1.8000000e+00   9.0000000e-01   1.3000000e+00   6.3000000e+00   5.6000000e+00   6.6000000e+00   4.9000000e+00   6.2000000e+00   5.1000000e+00   5.7000000e+00   3.6000000e+00   6.0000000e+00   4.2000000e+00   4.1000000e+00   5.0000000e+00   5.2000000e+00   5.7000000e+00   4.0000000e+00   5.8000000e+00   5.0000000e+00   4.6000000e+00   6.4000000e+00   4.5000000e+00   5.7000000e+00   5.0000000e+00   6.6000000e+00   5.6000000e+00   5.5000000e+00   5.8000000e+00   6.6000000e+00   6.8000000e+00   5.5000000e+00   4.0000000e+00   4.4000000e+00   4.2000000e+00   4.6000000e+00   6.4000000e+00   4.8000000e+00   5.1000000e+00   6.2000000e+00   6.1000000e+00   4.4000000e+00   4.7000000e+00   4.9000000e+00   5.5000000e+00   4.8000000e+00   3.6000000e+00   4.8000000e+00   4.5000000e+00   4.7000000e+00   5.3000000e+00   3.1000000e+00   4.7000000e+00   7.9000000e+00   6.5000000e+00   8.5000000e+00   7.2000000e+00   7.9000000e+00   9.7000000e+00   5.4000000e+00   8.9000000e+00   8.2000000e+00   8.6000000e+00   6.8000000e+00   7.3000000e+00   7.8000000e+00   6.6000000e+00   6.9000000e+00   7.2000000e+00   7.2000000e+00   9.2000000e+00   1.0700000e+01   6.7000000e+00   8.1000000e+00   6.1000000e+00   1.0000000e+01   6.7000000e+00   7.6000000e+00   8.2000000e+00   6.4000000e+00   6.2000000e+00   7.7000000e+00   8.0000000e+00   9.0000000e+00   8.9000000e+00   7.8000000e+00   6.5000000e+00   6.9000000e+00   9.5000000e+00   7.3000000e+00   7.0000000e+00   6.0000000e+00   7.7000000e+00   8.0000000e+00   7.6000000e+00   6.5000000e+00   8.2000000e+00   8.0000000e+00   7.6000000e+00   7.1000000e+00   7.1000000e+00   6.9000000e+00   6.2000000e+00   1.4000000e+00   5.0000000e-01   1.4000000e+00   6.0000000e-01   6.8000000e+00   6.1000000e+00   6.9000000e+00   5.0000000e+00   6.3000000e+00   5.2000000e+00   6.4000000e+00   3.3000000e+00   6.1000000e+00   4.3000000e+00   4.0000000e+00   5.1000000e+00   5.3000000e+00   5.8000000e+00   4.1000000e+00   6.1000000e+00   5.1000000e+00   4.7000000e+00   6.5000000e+00   4.6000000e+00   6.2000000e+00   5.1000000e+00   6.7000000e+00   5.7000000e+00   5.6000000e+00   5.9000000e+00   6.7000000e+00   6.9000000e+00   5.6000000e+00   4.1000000e+00   4.5000000e+00   4.3000000e+00   4.7000000e+00   6.5000000e+00   4.9000000e+00   6.0000000e+00   6.5000000e+00   6.2000000e+00   4.5000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   4.9000000e+00   3.5000000e+00   4.9000000e+00   4.6000000e+00   4.8000000e+00   5.4000000e+00   3.2000000e+00   4.8000000e+00   8.6000000e+00   6.6000000e+00   8.6000000e+00   7.3000000e+00   8.0000000e+00   9.8000000e+00   5.1000000e+00   9.0000000e+00   8.3000000e+00   9.9000000e+00   7.3000000e+00   7.4000000e+00   7.9000000e+00   6.7000000e+00   7.0000000e+00   7.7000000e+00   7.3000000e+00   1.0900000e+01   1.0800000e+01   6.8000000e+00   8.6000000e+00   6.2000000e+00   1.0100000e+01   6.8000000e+00   8.3000000e+00   8.7000000e+00   6.5000000e+00   6.3000000e+00   7.8000000e+00   8.1000000e+00   9.1000000e+00   1.0600000e+01   7.9000000e+00   6.6000000e+00   7.0000000e+00   9.6000000e+00   8.2000000e+00   7.3000000e+00   6.1000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.6000000e+00   8.7000000e+00   8.7000000e+00   7.7000000e+00   7.2000000e+00   7.2000000e+00   7.8000000e+00   6.3000000e+00   1.3000000e+00   4.0000000e-01   8.0000000e-01   6.8000000e+00   6.1000000e+00   7.1000000e+00   5.4000000e+00   6.7000000e+00   5.6000000e+00   6.2000000e+00   4.1000000e+00   6.5000000e+00   4.7000000e+00   4.6000000e+00   5.5000000e+00   5.7000000e+00   6.2000000e+00   4.5000000e+00   6.3000000e+00   5.5000000e+00   5.1000000e+00   6.9000000e+00   5.0000000e+00   6.2000000e+00   5.5000000e+00   7.1000000e+00   6.1000000e+00   6.0000000e+00   6.3000000e+00   7.1000000e+00   7.3000000e+00   6.0000000e+00   4.5000000e+00   4.9000000e+00   4.7000000e+00   5.1000000e+00   6.9000000e+00   5.3000000e+00   5.6000000e+00   6.7000000e+00   6.6000000e+00   4.9000000e+00   5.2000000e+00   5.4000000e+00   6.0000000e+00   5.3000000e+00   4.1000000e+00   5.3000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   3.6000000e+00   5.2000000e+00   8.4000000e+00   7.0000000e+00   9.0000000e+00   7.7000000e+00   8.4000000e+00   1.0200000e+01   5.9000000e+00   9.4000000e+00   8.7000000e+00   9.1000000e+00   7.3000000e+00   7.8000000e+00   8.3000000e+00   7.1000000e+00   7.4000000e+00   7.7000000e+00   7.7000000e+00   9.7000000e+00   1.1200000e+01   7.2000000e+00   8.6000000e+00   6.6000000e+00   1.0500000e+01   7.2000000e+00   8.1000000e+00   8.7000000e+00   6.9000000e+00   6.7000000e+00   8.2000000e+00   8.5000000e+00   9.5000000e+00   9.4000000e+00   8.3000000e+00   7.0000000e+00   7.4000000e+00   1.0000000e+01   7.8000000e+00   7.5000000e+00   6.5000000e+00   8.2000000e+00   8.5000000e+00   8.1000000e+00   7.0000000e+00   8.7000000e+00   8.5000000e+00   8.1000000e+00   7.6000000e+00   7.6000000e+00   7.4000000e+00   6.7000000e+00   1.3000000e+00   5.0000000e-01   6.9000000e+00   6.2000000e+00   7.2000000e+00   5.5000000e+00   6.8000000e+00   5.7000000e+00   6.5000000e+00   3.8000000e+00   6.6000000e+00   4.8000000e+00   4.5000000e+00   5.6000000e+00   5.8000000e+00   6.3000000e+00   4.6000000e+00   6.4000000e+00   5.6000000e+00   5.2000000e+00   7.0000000e+00   5.1000000e+00   6.3000000e+00   5.6000000e+00   7.2000000e+00   6.2000000e+00   6.1000000e+00   6.4000000e+00   7.2000000e+00   7.4000000e+00   6.1000000e+00   4.6000000e+00   5.0000000e+00   4.8000000e+00   5.2000000e+00   7.0000000e+00   5.4000000e+00   6.1000000e+00   6.8000000e+00   6.7000000e+00   5.0000000e+00   5.3000000e+00   5.5000000e+00   6.1000000e+00   5.4000000e+00   4.0000000e+00   5.4000000e+00   5.1000000e+00   5.3000000e+00   5.9000000e+00   3.7000000e+00   5.3000000e+00   8.7000000e+00   7.1000000e+00   9.1000000e+00   7.8000000e+00   8.5000000e+00   1.0300000e+01   5.6000000e+00   9.5000000e+00   8.8000000e+00   1.0000000e+01   7.4000000e+00   7.9000000e+00   8.4000000e+00   7.2000000e+00   7.5000000e+00   7.8000000e+00   7.8000000e+00   1.1000000e+01   1.1300000e+01   7.3000000e+00   8.7000000e+00   6.7000000e+00   1.0600000e+01   7.3000000e+00   8.4000000e+00   8.8000000e+00   7.0000000e+00   6.8000000e+00   8.3000000e+00   8.6000000e+00   9.6000000e+00   1.0700000e+01   8.4000000e+00   7.1000000e+00   7.5000000e+00   1.0100000e+01   8.3000000e+00   7.6000000e+00   6.6000000e+00   8.3000000e+00   8.6000000e+00   8.2000000e+00   7.1000000e+00   8.8000000e+00   8.8000000e+00   8.2000000e+00   7.7000000e+00   7.7000000e+00   7.9000000e+00   6.8000000e+00   8.0000000e-01   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.0000000e+00   4.3000000e+00   6.3000000e+00   4.7000000e+00   4.8000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.4000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   4.3000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.8000000e+00   5.0000000e+00   8.2000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   6.1000000e+00   9.2000000e+00   8.5000000e+00   8.9000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   9.7000000e+00   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   7.9000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   9.4000000e+00   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   7.6000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.3000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.2000000e+00   6.5000000e+00   6.6000000e+00   5.9000000e+00   6.9000000e+00   5.2000000e+00   6.5000000e+00   5.4000000e+00   6.0000000e+00   3.7000000e+00   6.3000000e+00   4.5000000e+00   4.2000000e+00   5.3000000e+00   5.5000000e+00   6.0000000e+00   4.3000000e+00   6.1000000e+00   5.3000000e+00   4.9000000e+00   6.7000000e+00   4.8000000e+00   6.0000000e+00   5.3000000e+00   6.9000000e+00   5.9000000e+00   5.8000000e+00   6.1000000e+00   6.9000000e+00   7.1000000e+00   5.8000000e+00   4.3000000e+00   4.7000000e+00   4.5000000e+00   4.9000000e+00   6.7000000e+00   5.1000000e+00   5.6000000e+00   6.5000000e+00   6.4000000e+00   4.7000000e+00   5.0000000e+00   5.2000000e+00   5.8000000e+00   5.1000000e+00   3.7000000e+00   5.1000000e+00   4.8000000e+00   5.0000000e+00   5.6000000e+00   3.4000000e+00   5.0000000e+00   8.2000000e+00   6.8000000e+00   8.8000000e+00   7.5000000e+00   8.2000000e+00   1.0000000e+01   5.5000000e+00   9.2000000e+00   8.5000000e+00   9.5000000e+00   7.1000000e+00   7.6000000e+00   8.1000000e+00   6.9000000e+00   7.2000000e+00   7.5000000e+00   7.5000000e+00   1.0500000e+01   1.1000000e+01   7.0000000e+00   8.4000000e+00   6.4000000e+00   1.0300000e+01   7.0000000e+00   7.9000000e+00   8.5000000e+00   6.7000000e+00   6.5000000e+00   8.0000000e+00   8.3000000e+00   9.3000000e+00   1.0200000e+01   8.1000000e+00   6.8000000e+00   7.2000000e+00   9.8000000e+00   7.8000000e+00   7.3000000e+00   6.3000000e+00   8.0000000e+00   8.3000000e+00   7.9000000e+00   6.8000000e+00   8.5000000e+00   8.3000000e+00   7.9000000e+00   7.4000000e+00   7.4000000e+00   7.4000000e+00   6.5000000e+00   9.0000000e-01   5.0000000e-01   3.2000000e+00   1.1000000e+00   2.0000000e+00   1.0000000e+00   4.7000000e+00   9.0000000e-01   3.1000000e+00   4.8000000e+00   1.9000000e+00   3.1000000e+00   1.2000000e+00   2.9000000e+00   7.0000000e-01   1.9000000e+00   2.7000000e+00   2.1000000e+00   3.2000000e+00   1.6000000e+00   2.1000000e+00   1.7000000e+00   1.5000000e+00   1.4000000e+00   9.0000000e-01   7.0000000e-01   1.1000000e+00   1.6000000e+00   3.5000000e+00   3.5000000e+00   3.7000000e+00   2.7000000e+00   2.1000000e+00   2.1000000e+00   1.6000000e+00   5.0000000e-01   2.0000000e+00   2.3000000e+00   3.0000000e+00   2.6000000e+00   1.2000000e+00   2.7000000e+00   4.7000000e+00   2.5000000e+00   2.2000000e+00   2.2000000e+00   1.6000000e+00   4.6000000e+00   2.4000000e+00   3.2000000e+00   2.6000000e+00   2.2000000e+00   2.3000000e+00   2.6000000e+00   3.4000000e+00   3.3000000e+00   2.6000000e+00   2.5000000e+00   3.1000000e+00   1.5000000e+00   2.2000000e+00   1.9000000e+00   2.9000000e+00   3.0000000e+00   2.1000000e+00   1.9000000e+00   4.1000000e+00   4.4000000e+00   2.4000000e+00   2.0000000e+00   2.6000000e+00   3.7000000e+00   1.8000000e+00   2.1000000e+00   1.9000000e+00   1.7000000e+00   1.7000000e+00   2.6000000e+00   1.7000000e+00   2.7000000e+00   3.8000000e+00   2.7000000e+00   1.6000000e+00   2.4000000e+00   3.2000000e+00   2.8000000e+00   1.9000000e+00   1.7000000e+00   1.6000000e+00   2.3000000e+00   1.5000000e+00   2.6000000e+00   2.3000000e+00   2.5000000e+00   1.9000000e+00   2.2000000e+00   1.8000000e+00   2.6000000e+00   2.1000000e+00   1.0000000e+00   2.5000000e+00   6.0000000e-01   1.3000000e+00   5.0000000e-01   4.0000000e+00   8.0000000e-01   2.4000000e+00   4.1000000e+00   1.0000000e+00   2.4000000e+00   9.0000000e-01   2.2000000e+00   6.0000000e-01   1.0000000e+00   2.0000000e+00   1.2000000e+00   2.5000000e+00   1.1000000e+00   1.4000000e+00   1.2000000e+00   1.2000000e+00   7.0000000e-01   6.0000000e-01   1.2000000e+00   1.2000000e+00   7.0000000e-01   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.0000000e+00   1.6000000e+00   1.2000000e+00   7.0000000e-01   6.0000000e-01   1.3000000e+00   1.6000000e+00   2.3000000e+00   1.9000000e+00   7.0000000e-01   2.0000000e+00   4.0000000e+00   1.8000000e+00   1.5000000e+00   1.5000000e+00   9.0000000e-01   3.9000000e+00   1.7000000e+00   2.7000000e+00   2.1000000e+00   2.9000000e+00   1.8000000e+00   2.3000000e+00   4.1000000e+00   2.4000000e+00   3.3000000e+00   2.6000000e+00   3.8000000e+00   1.2000000e+00   1.7000000e+00   2.2000000e+00   2.4000000e+00   2.5000000e+00   1.6000000e+00   1.6000000e+00   4.8000000e+00   5.1000000e+00   1.9000000e+00   2.5000000e+00   2.1000000e+00   4.4000000e+00   1.3000000e+00   2.2000000e+00   2.6000000e+00   1.2000000e+00   1.2000000e+00   2.1000000e+00   2.4000000e+00   3.4000000e+00   4.5000000e+00   2.2000000e+00   1.1000000e+00   2.1000000e+00   3.9000000e+00   2.3000000e+00   1.4000000e+00   1.2000000e+00   2.1000000e+00   2.4000000e+00   2.0000000e+00   2.1000000e+00   2.6000000e+00   2.6000000e+00   2.0000000e+00   1.7000000e+00   1.5000000e+00   2.1000000e+00   1.6000000e+00   3.3000000e+00   1.0000000e+00   2.1000000e+00   1.1000000e+00   4.8000000e+00   1.0000000e+00   3.2000000e+00   4.9000000e+00   1.8000000e+00   3.2000000e+00   1.3000000e+00   3.0000000e+00   8.0000000e-01   1.8000000e+00   2.8000000e+00   2.0000000e+00   3.3000000e+00   1.5000000e+00   2.2000000e+00   1.2000000e+00   1.6000000e+00   1.5000000e+00   1.0000000e+00   6.0000000e-01   6.0000000e-01   1.5000000e+00   3.6000000e+00   3.6000000e+00   3.8000000e+00   2.8000000e+00   1.6000000e+00   2.0000000e+00   1.7000000e+00   4.0000000e-01   2.1000000e+00   2.4000000e+00   3.1000000e+00   2.7000000e+00   1.3000000e+00   2.8000000e+00   4.8000000e+00   2.6000000e+00   2.3000000e+00   2.3000000e+00   1.7000000e+00   4.7000000e+00   2.5000000e+00   2.9000000e+00   2.1000000e+00   1.9000000e+00   1.8000000e+00   2.1000000e+00   3.1000000e+00   3.2000000e+00   2.3000000e+00   2.0000000e+00   3.0000000e+00   1.2000000e+00   1.7000000e+00   1.4000000e+00   2.4000000e+00   2.5000000e+00   1.8000000e+00   1.4000000e+00   4.0000000e+00   4.1000000e+00   1.9000000e+00   1.7000000e+00   2.1000000e+00   3.4000000e+00   1.3000000e+00   1.8000000e+00   1.8000000e+00   1.4000000e+00   1.2000000e+00   2.1000000e+00   1.4000000e+00   2.4000000e+00   3.7000000e+00   2.2000000e+00   1.1000000e+00   2.1000000e+00   2.9000000e+00   2.5000000e+00   1.4000000e+00   1.4000000e+00   1.1000000e+00   1.8000000e+00   1.0000000e+00   2.1000000e+00   2.0000000e+00   2.2000000e+00   1.4000000e+00   1.7000000e+00   1.3000000e+00   2.3000000e+00   1.6000000e+00   2.3000000e+00   1.2000000e+00   2.8000000e+00   1.7000000e+00   2.3000000e+00   9.0000000e-01   1.6000000e+00   1.5000000e+00   9.0000000e-01   2.0000000e+00   1.1000000e+00   2.5000000e+00   1.5000000e+00   1.1000000e+00   1.5000000e+00   6.0000000e-01   2.6000000e+00   1.1000000e+00   2.1000000e+00   1.9000000e+00   1.8000000e+00   2.3000000e+00   2.7000000e+00   3.3000000e+00   1.8000000e+00   1.3000000e+00   5.0000000e-01   7.0000000e-01   9.0000000e-01   2.3000000e+00   1.5000000e+00   2.4000000e+00   2.9000000e+00   1.2000000e+00   9.0000000e-01   2.0000000e-01   8.0000000e-01   2.0000000e+00   7.0000000e-01   1.5000000e+00   7.0000000e-01   1.2000000e+00   1.0000000e+00   1.6000000e+00   1.8000000e+00   8.0000000e-01   5.0000000e+00   2.4000000e+00   5.0000000e+00   3.5000000e+00   4.4000000e+00   6.2000000e+00   1.7000000e+00   5.2000000e+00   3.7000000e+00   6.3000000e+00   3.7000000e+00   3.2000000e+00   4.3000000e+00   2.1000000e+00   3.0000000e+00   4.1000000e+00   3.7000000e+00   7.3000000e+00   6.4000000e+00   1.8000000e+00   5.0000000e+00   2.2000000e+00   6.1000000e+00   2.6000000e+00   4.7000000e+00   5.1000000e+00   2.5000000e+00   2.7000000e+00   3.8000000e+00   4.5000000e+00   5.1000000e+00   7.0000000e+00   3.9000000e+00   2.6000000e+00   2.6000000e+00   6.0000000e+00   4.6000000e+00   3.7000000e+00   2.5000000e+00   4.4000000e+00   4.7000000e+00   4.3000000e+00   2.4000000e+00   5.1000000e+00   5.1000000e+00   4.1000000e+00   2.6000000e+00   3.6000000e+00   4.2000000e+00   2.7000000e+00   1.1000000e+00   9.0000000e-01   3.8000000e+00   4.0000000e-01   2.2000000e+00   3.9000000e+00   1.2000000e+00   2.2000000e+00   7.0000000e-01   2.2000000e+00   8.0000000e-01   1.2000000e+00   1.8000000e+00   1.0000000e+00   2.3000000e+00   1.5000000e+00   1.2000000e+00   8.0000000e-01   8.0000000e-01   7.0000000e-01   6.0000000e-01   6.0000000e-01   1.0000000e+00   7.0000000e-01   2.6000000e+00   2.6000000e+00   2.8000000e+00   1.8000000e+00   1.2000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.1000000e+00   1.8000000e+00   2.1000000e+00   1.7000000e+00   7.0000000e-01   1.8000000e+00   3.8000000e+00   1.6000000e+00   1.7000000e+00   1.5000000e+00   9.0000000e-01   3.7000000e+00   1.5000000e+00   3.1000000e+00   1.7000000e+00   2.7000000e+00   1.6000000e+00   2.1000000e+00   3.9000000e+00   2.2000000e+00   2.9000000e+00   2.0000000e+00   4.0000000e+00   1.4000000e+00   1.3000000e+00   2.0000000e+00   2.0000000e+00   2.1000000e+00   2.0000000e+00   1.4000000e+00   5.0000000e+00   4.5000000e+00   1.5000000e+00   2.7000000e+00   1.7000000e+00   3.8000000e+00   9.0000000e-01   2.4000000e+00   2.8000000e+00   8.0000000e-01   1.2000000e+00   1.7000000e+00   2.2000000e+00   2.8000000e+00   4.7000000e+00   1.8000000e+00   7.0000000e-01   1.7000000e+00   3.7000000e+00   2.7000000e+00   1.6000000e+00   1.2000000e+00   2.1000000e+00   2.4000000e+00   2.0000000e+00   1.7000000e+00   2.8000000e+00   2.8000000e+00   1.8000000e+00   1.3000000e+00   1.3000000e+00   2.5000000e+00   1.6000000e+00   1.6000000e+00   2.7000000e+00   1.1000000e+00   1.3000000e+00   2.8000000e+00   9.0000000e-01   1.7000000e+00   8.0000000e-01   1.1000000e+00   1.5000000e+00   5.0000000e-01   9.0000000e-01   1.3000000e+00   1.2000000e+00   1.4000000e+00   9.0000000e-01   1.5000000e+00   7.0000000e-01   1.0000000e+00   1.3000000e+00   1.5000000e+00   2.1000000e+00   6.0000000e-01   1.5000000e+00   1.5000000e+00   1.7000000e+00   9.0000000e-01   1.3000000e+00   7.0000000e-01   1.2000000e+00   1.7000000e+00   1.2000000e+00   7.0000000e-01   1.0000000e+00   6.0000000e-01   8.0000000e-01   9.0000000e-01   2.7000000e+00   5.0000000e-01   6.0000000e-01   4.0000000e-01   8.0000000e-01   2.6000000e+00   4.0000000e-01   3.8000000e+00   1.4000000e+00   3.8000000e+00   2.3000000e+00   3.2000000e+00   5.0000000e+00   1.5000000e+00   4.0000000e+00   3.1000000e+00   5.1000000e+00   2.5000000e+00   2.2000000e+00   3.1000000e+00   1.5000000e+00   1.8000000e+00   2.9000000e+00   2.5000000e+00   6.1000000e+00   5.6000000e+00   1.6000000e+00   3.8000000e+00   1.2000000e+00   4.9000000e+00   1.6000000e+00   3.5000000e+00   3.9000000e+00   1.3000000e+00   1.5000000e+00   2.6000000e+00   3.3000000e+00   3.9000000e+00   5.8000000e+00   2.7000000e+00   1.4000000e+00   1.8000000e+00   4.8000000e+00   3.4000000e+00   2.5000000e+00   1.3000000e+00   3.2000000e+00   3.5000000e+00   3.1000000e+00   1.4000000e+00   3.9000000e+00   3.9000000e+00   2.9000000e+00   2.0000000e+00   2.4000000e+00   3.0000000e+00   1.5000000e+00   4.3000000e+00   1.1000000e+00   2.7000000e+00   4.4000000e+00   1.3000000e+00   2.7000000e+00   8.0000000e-01   2.5000000e+00   1.1000000e+00   1.3000000e+00   2.3000000e+00   1.5000000e+00   2.8000000e+00   8.0000000e-01   1.7000000e+00   1.1000000e+00   1.1000000e+00   1.2000000e+00   1.1000000e+00   1.3000000e+00   1.1000000e+00   1.0000000e+00   3.1000000e+00   3.1000000e+00   3.3000000e+00   2.3000000e+00   1.3000000e+00   1.5000000e+00   6.0000000e-01   7.0000000e-01   1.6000000e+00   1.9000000e+00   2.6000000e+00   2.2000000e+00   8.0000000e-01   2.3000000e+00   4.3000000e+00   2.1000000e+00   1.8000000e+00   1.8000000e+00   1.2000000e+00   4.2000000e+00   2.0000000e+00   2.2000000e+00   1.8000000e+00   2.8000000e+00   1.5000000e+00   2.2000000e+00   4.0000000e+00   2.5000000e+00   3.2000000e+00   2.5000000e+00   3.5000000e+00   1.1000000e+00   1.6000000e+00   2.1000000e+00   2.1000000e+00   2.2000000e+00   1.5000000e+00   1.5000000e+00   4.5000000e+00   5.0000000e+00   1.8000000e+00   2.4000000e+00   1.8000000e+00   4.3000000e+00   1.0000000e+00   1.9000000e+00   2.5000000e+00   9.0000000e-01   9.0000000e-01   2.0000000e+00   2.3000000e+00   3.3000000e+00   4.2000000e+00   2.1000000e+00   1.0000000e+00   2.0000000e+00   3.8000000e+00   1.8000000e+00   1.3000000e+00   9.0000000e-01   2.0000000e+00   2.3000000e+00   1.9000000e+00   1.8000000e+00   2.5000000e+00   2.3000000e+00   1.9000000e+00   1.4000000e+00   1.4000000e+00   1.6000000e+00   1.3000000e+00   3.8000000e+00   1.6000000e+00   7.0000000e-01   3.0000000e+00   2.0000000e+00   3.5000000e+00   1.8000000e+00   4.0000000e+00   3.0000000e+00   2.0000000e+00   3.2000000e+00   1.5000000e+00   4.1000000e+00   2.6000000e+00   3.6000000e+00   3.2000000e+00   3.3000000e+00   3.8000000e+00   4.2000000e+00   4.8000000e+00   3.3000000e+00   1.2000000e+00   1.2000000e+00   1.0000000e+00   2.0000000e+00   3.8000000e+00   2.8000000e+00   3.9000000e+00   4.4000000e+00   2.9000000e+00   2.4000000e+00   1.7000000e+00   2.1000000e+00   3.5000000e+00   2.0000000e+00   2.0000000e-01   2.2000000e+00   2.5000000e+00   2.5000000e+00   3.1000000e+00   7.0000000e-01   2.3000000e+00   6.5000000e+00   3.9000000e+00   6.5000000e+00   5.0000000e+00   5.9000000e+00   7.7000000e+00   2.0000000e+00   6.7000000e+00   5.2000000e+00   7.8000000e+00   5.2000000e+00   4.7000000e+00   5.8000000e+00   3.6000000e+00   4.5000000e+00   5.6000000e+00   5.2000000e+00   8.8000000e+00   7.9000000e+00   3.5000000e+00   6.5000000e+00   3.7000000e+00   7.6000000e+00   4.1000000e+00   6.2000000e+00   6.6000000e+00   4.0000000e+00   4.2000000e+00   5.3000000e+00   6.0000000e+00   6.6000000e+00   8.5000000e+00   5.4000000e+00   4.1000000e+00   4.1000000e+00   7.5000000e+00   6.1000000e+00   5.2000000e+00   4.0000000e+00   5.9000000e+00   6.2000000e+00   5.8000000e+00   3.9000000e+00   6.6000000e+00   6.6000000e+00   5.6000000e+00   4.1000000e+00   5.1000000e+00   5.7000000e+00   4.2000000e+00   2.4000000e+00   3.9000000e+00   1.4000000e+00   2.2000000e+00   7.0000000e-01   2.0000000e+00   6.0000000e-01   1.4000000e+00   1.8000000e+00   1.4000000e+00   2.3000000e+00   1.7000000e+00   1.2000000e+00   1.2000000e+00   8.0000000e-01   5.0000000e-01   4.0000000e-01   6.0000000e-01   1.0000000e+00   9.0000000e-01   2.6000000e+00   2.6000000e+00   2.8000000e+00   1.8000000e+00   1.6000000e+00   1.6000000e+00   1.5000000e+00   6.0000000e-01   1.1000000e+00   1.6000000e+00   2.1000000e+00   1.7000000e+00   7.0000000e-01   1.8000000e+00   3.8000000e+00   1.6000000e+00   1.5000000e+00   1.3000000e+00   7.0000000e-01   3.7000000e+00   1.5000000e+00   3.3000000e+00   2.1000000e+00   2.7000000e+00   1.8000000e+00   2.3000000e+00   3.9000000e+00   2.6000000e+00   2.9000000e+00   2.2000000e+00   4.0000000e+00   1.6000000e+00   1.7000000e+00   2.0000000e+00   2.4000000e+00   2.5000000e+00   2.2000000e+00   1.6000000e+00   5.0000000e+00   4.7000000e+00   1.9000000e+00   2.7000000e+00   2.1000000e+00   4.0000000e+00   1.3000000e+00   2.4000000e+00   2.8000000e+00   1.2000000e+00   1.4000000e+00   2.1000000e+00   2.2000000e+00   3.0000000e+00   4.7000000e+00   2.2000000e+00   1.1000000e+00   1.9000000e+00   3.7000000e+00   2.9000000e+00   1.8000000e+00   1.4000000e+00   2.1000000e+00   2.4000000e+00   2.0000000e+00   2.1000000e+00   2.8000000e+00   2.8000000e+00   1.8000000e+00   1.7000000e+00   1.5000000e+00   2.7000000e+00   1.8000000e+00   1.7000000e+00   1.4000000e+00   1.8000000e+00   1.9000000e+00   1.0000000e+00   2.4000000e+00   1.4000000e+00   1.2000000e+00   2.2000000e+00   9.0000000e-01   2.5000000e+00   1.2000000e+00   2.4000000e+00   2.0000000e+00   1.9000000e+00   2.2000000e+00   2.6000000e+00   3.2000000e+00   1.7000000e+00   1.4000000e+00   1.0000000e+00   1.2000000e+00   8.0000000e-01   2.2000000e+00   1.2000000e+00   2.3000000e+00   2.8000000e+00   2.1000000e+00   1.0000000e+00   7.0000000e-01   1.1000000e+00   1.9000000e+00   1.0000000e+00   1.6000000e+00   8.0000000e-01   1.3000000e+00   1.1000000e+00   1.7000000e+00   1.5000000e+00   9.0000000e-01   4.9000000e+00   2.3000000e+00   4.9000000e+00   3.4000000e+00   4.3000000e+00   6.1000000e+00   1.4000000e+00   5.1000000e+00   4.0000000e+00   6.2000000e+00   3.6000000e+00   3.1000000e+00   4.2000000e+00   2.4000000e+00   2.9000000e+00   4.0000000e+00   3.6000000e+00   7.2000000e+00   6.5000000e+00   2.5000000e+00   4.9000000e+00   2.1000000e+00   6.0000000e+00   2.5000000e+00   4.6000000e+00   5.0000000e+00   2.4000000e+00   2.6000000e+00   3.7000000e+00   4.4000000e+00   5.0000000e+00   6.9000000e+00   3.8000000e+00   2.5000000e+00   2.7000000e+00   5.9000000e+00   4.5000000e+00   3.6000000e+00   2.4000000e+00   4.3000000e+00   4.6000000e+00   4.2000000e+00   2.3000000e+00   5.0000000e+00   5.0000000e+00   4.0000000e+00   2.9000000e+00   3.5000000e+00   4.1000000e+00   2.6000000e+00   3.1000000e+00   1.7000000e+00   3.6000000e+00   1.9000000e+00   4.1000000e+00   3.1000000e+00   2.1000000e+00   2.9000000e+00   1.6000000e+00   4.2000000e+00   2.7000000e+00   3.7000000e+00   3.3000000e+00   3.4000000e+00   3.9000000e+00   4.3000000e+00   4.9000000e+00   3.4000000e+00   1.3000000e+00   1.3000000e+00   1.1000000e+00   2.1000000e+00   3.9000000e+00   2.9000000e+00   4.0000000e+00   4.5000000e+00   2.8000000e+00   2.5000000e+00   1.8000000e+00   2.2000000e+00   3.6000000e+00   2.1000000e+00   5.0000000e-01   2.3000000e+00   2.6000000e+00   2.6000000e+00   3.2000000e+00   1.2000000e+00   2.4000000e+00   6.6000000e+00   4.0000000e+00   6.6000000e+00   5.1000000e+00   6.0000000e+00   7.8000000e+00   2.3000000e+00   6.8000000e+00   5.3000000e+00   7.9000000e+00   5.3000000e+00   4.8000000e+00   5.9000000e+00   3.7000000e+00   4.6000000e+00   5.7000000e+00   5.3000000e+00   8.9000000e+00   8.0000000e+00   3.2000000e+00   6.6000000e+00   3.8000000e+00   7.7000000e+00   4.2000000e+00   6.3000000e+00   6.7000000e+00   4.1000000e+00   4.3000000e+00   5.4000000e+00   6.1000000e+00   6.7000000e+00   8.6000000e+00   5.5000000e+00   4.2000000e+00   4.2000000e+00   7.6000000e+00   6.2000000e+00   5.3000000e+00   4.1000000e+00   6.0000000e+00   6.3000000e+00   5.9000000e+00   4.0000000e+00   6.7000000e+00   6.7000000e+00   5.7000000e+00   4.2000000e+00   5.2000000e+00   5.8000000e+00   4.3000000e+00   1.6000000e+00   9.0000000e-01   1.2000000e+00   1.2000000e+00   6.0000000e-01   1.0000000e+00   1.4000000e+00   1.5000000e+00   1.1000000e+00   8.0000000e-01   1.6000000e+00   1.2000000e+00   9.0000000e-01   1.0000000e+00   1.8000000e+00   1.8000000e+00   5.0000000e-01   1.8000000e+00   1.8000000e+00   2.0000000e+00   1.0000000e+00   1.4000000e+00   8.0000000e-01   9.0000000e-01   1.4000000e+00   1.5000000e+00   6.0000000e-01   1.3000000e+00   1.3000000e+00   7.0000000e-01   1.0000000e+00   3.0000000e+00   8.0000000e-01   5.0000000e-01   5.0000000e-01   7.0000000e-01   2.9000000e+00   7.0000000e-01   3.5000000e+00   1.7000000e+00   3.5000000e+00   2.2000000e+00   2.9000000e+00   4.7000000e+00   2.0000000e+00   3.9000000e+00   3.2000000e+00   4.8000000e+00   2.2000000e+00   2.3000000e+00   2.8000000e+00   2.0000000e+00   2.1000000e+00   2.6000000e+00   2.2000000e+00   5.8000000e+00   5.7000000e+00   1.7000000e+00   3.5000000e+00   1.7000000e+00   5.0000000e+00   1.7000000e+00   3.2000000e+00   3.6000000e+00   1.4000000e+00   1.2000000e+00   2.7000000e+00   3.0000000e+00   4.0000000e+00   5.5000000e+00   2.8000000e+00   1.5000000e+00   2.1000000e+00   4.5000000e+00   3.1000000e+00   2.2000000e+00   1.0000000e+00   2.9000000e+00   3.2000000e+00   2.8000000e+00   1.7000000e+00   3.6000000e+00   3.6000000e+00   2.6000000e+00   2.1000000e+00   2.1000000e+00   2.7000000e+00   1.2000000e+00   1.9000000e+00   1.8000000e+00   2.4000000e+00   2.2000000e+00   8.0000000e-01   1.2000000e+00   9.0000000e-01   2.7000000e+00   1.0000000e+00   2.0000000e+00   1.6000000e+00   1.7000000e+00   2.2000000e+00   2.6000000e+00   3.2000000e+00   1.7000000e+00   1.2000000e+00   1.0000000e+00   1.0000000e+00   1.0000000e+00   2.2000000e+00   2.4000000e+00   2.3000000e+00   2.8000000e+00   1.1000000e+00   1.6000000e+00   1.1000000e+00   1.5000000e+00   1.9000000e+00   8.0000000e-01   1.8000000e+00   1.4000000e+00   1.5000000e+00   1.5000000e+00   1.5000000e+00   2.3000000e+00   1.3000000e+00   4.9000000e+00   2.7000000e+00   4.9000000e+00   3.4000000e+00   4.3000000e+00   6.1000000e+00   2.6000000e+00   5.1000000e+00   3.6000000e+00   6.2000000e+00   3.6000000e+00   3.1000000e+00   4.2000000e+00   2.6000000e+00   3.3000000e+00   4.0000000e+00   3.6000000e+00   7.2000000e+00   6.3000000e+00   1.5000000e+00   4.9000000e+00   2.9000000e+00   6.0000000e+00   2.5000000e+00   4.6000000e+00   5.0000000e+00   2.4000000e+00   2.6000000e+00   3.7000000e+00   4.4000000e+00   5.0000000e+00   6.9000000e+00   3.8000000e+00   2.5000000e+00   2.5000000e+00   5.9000000e+00   4.5000000e+00   3.6000000e+00   2.4000000e+00   4.3000000e+00   4.6000000e+00   4.2000000e+00   2.7000000e+00   5.0000000e+00   5.0000000e+00   4.0000000e+00   2.5000000e+00   3.5000000e+00   4.1000000e+00   2.8000000e+00   1.7000000e+00   1.1000000e+00   9.0000000e-01   1.5000000e+00   1.1000000e+00   2.0000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   3.0000000e-01   8.0000000e-01   9.0000000e-01   9.0000000e-01   1.3000000e+00   4.0000000e-01   2.3000000e+00   2.3000000e+00   2.5000000e+00   1.5000000e+00   9.0000000e-01   1.1000000e+00   1.0000000e+00   9.0000000e-01   1.2000000e+00   1.3000000e+00   1.8000000e+00   1.4000000e+00   2.0000000e-01   1.5000000e+00   3.5000000e+00   1.3000000e+00   1.2000000e+00   1.0000000e+00   6.0000000e-01   3.4000000e+00   1.2000000e+00   3.0000000e+00   1.4000000e+00   3.0000000e+00   1.5000000e+00   2.4000000e+00   4.2000000e+00   2.1000000e+00   3.2000000e+00   2.5000000e+00   4.3000000e+00   1.7000000e+00   1.6000000e+00   2.3000000e+00   1.7000000e+00   1.8000000e+00   2.1000000e+00   1.7000000e+00   5.3000000e+00   5.0000000e+00   1.2000000e+00   3.0000000e+00   1.4000000e+00   4.3000000e+00   1.0000000e+00   2.7000000e+00   3.1000000e+00   7.0000000e-01   7.0000000e-01   2.0000000e+00   2.5000000e+00   3.3000000e+00   5.0000000e+00   2.1000000e+00   8.0000000e-01   1.2000000e+00   4.0000000e+00   2.6000000e+00   1.7000000e+00   7.0000000e-01   2.4000000e+00   2.7000000e+00   2.3000000e+00   1.4000000e+00   3.1000000e+00   3.1000000e+00   2.1000000e+00   1.4000000e+00   1.6000000e+00   2.2000000e+00   1.1000000e+00   2.2000000e+00   1.2000000e+00   1.2000000e+00   2.4000000e+00   9.0000000e-01   2.3000000e+00   1.0000000e+00   2.6000000e+00   1.8000000e+00   1.5000000e+00   2.0000000e+00   2.6000000e+00   3.0000000e+00   1.5000000e+00   8.0000000e-01   1.0000000e+00   1.0000000e+00   8.0000000e-01   2.4000000e+00   1.4000000e+00   2.1000000e+00   2.6000000e+00   2.1000000e+00   6.0000000e-01   9.0000000e-01   1.3000000e+00   1.7000000e+00   1.0000000e+00   1.8000000e+00   8.0000000e-01   9.0000000e-01   7.0000000e-01   1.3000000e+00   1.7000000e+00   7.0000000e-01   4.7000000e+00   2.5000000e+00   4.7000000e+00   3.2000000e+00   4.1000000e+00   5.9000000e+00   2.4000000e+00   4.9000000e+00   4.2000000e+00   6.0000000e+00   3.4000000e+00   3.3000000e+00   4.0000000e+00   2.6000000e+00   2.9000000e+00   3.8000000e+00   3.4000000e+00   7.0000000e+00   6.7000000e+00   2.7000000e+00   4.7000000e+00   2.1000000e+00   6.0000000e+00   2.7000000e+00   4.4000000e+00   4.8000000e+00   2.4000000e+00   2.4000000e+00   3.7000000e+00   4.2000000e+00   5.0000000e+00   6.7000000e+00   3.8000000e+00   2.5000000e+00   2.9000000e+00   5.7000000e+00   4.3000000e+00   3.4000000e+00   2.2000000e+00   4.1000000e+00   4.4000000e+00   4.0000000e+00   2.5000000e+00   4.8000000e+00   4.8000000e+00   3.8000000e+00   3.1000000e+00   3.3000000e+00   3.9000000e+00   2.4000000e+00   1.4000000e+00   2.0000000e+00   1.6000000e+00   2.5000000e+00   1.7000000e+00   1.4000000e+00   1.6000000e+00   1.4000000e+00   7.0000000e-01   2.0000000e-01   8.0000000e-01   1.0000000e+00   1.1000000e+00   2.8000000e+00   2.8000000e+00   3.0000000e+00   2.0000000e+00   2.0000000e+00   1.6000000e+00   1.3000000e+00   4.0000000e-01   1.3000000e+00   1.6000000e+00   2.3000000e+00   1.9000000e+00   9.0000000e-01   2.0000000e+00   4.0000000e+00   1.8000000e+00   1.5000000e+00   1.5000000e+00   9.0000000e-01   3.9000000e+00   1.7000000e+00   3.3000000e+00   2.5000000e+00   2.7000000e+00   2.2000000e+00   2.5000000e+00   3.9000000e+00   2.8000000e+00   3.1000000e+00   2.4000000e+00   3.8000000e+00   1.6000000e+00   2.1000000e+00   2.0000000e+00   2.8000000e+00   2.9000000e+00   2.2000000e+00   1.8000000e+00   4.8000000e+00   4.9000000e+00   2.3000000e+00   2.5000000e+00   2.5000000e+00   4.2000000e+00   1.7000000e+00   2.2000000e+00   2.6000000e+00   1.6000000e+00   1.6000000e+00   2.5000000e+00   2.2000000e+00   3.2000000e+00   4.5000000e+00   2.6000000e+00   1.5000000e+00   2.3000000e+00   3.7000000e+00   2.9000000e+00   1.8000000e+00   1.6000000e+00   1.9000000e+00   2.2000000e+00   1.8000000e+00   2.5000000e+00   2.6000000e+00   2.6000000e+00   1.8000000e+00   2.1000000e+00   1.7000000e+00   2.7000000e+00   2.0000000e+00   1.4000000e+00   1.4000000e+00   1.5000000e+00   1.1000000e+00   1.4000000e+00   1.6000000e+00   1.2000000e+00   1.3000000e+00   1.2000000e+00   1.8000000e+00   1.8000000e+00   5.0000000e-01   2.0000000e+00   1.8000000e+00   2.0000000e+00   1.4000000e+00   1.4000000e+00   2.0000000e-01   9.0000000e-01   1.4000000e+00   1.7000000e+00   6.0000000e-01   1.3000000e+00   9.0000000e-01   7.0000000e-01   1.4000000e+00   3.0000000e+00   8.0000000e-01   7.0000000e-01   7.0000000e-01   1.1000000e+00   2.9000000e+00   9.0000000e-01   3.5000000e+00   1.5000000e+00   3.5000000e+00   2.2000000e+00   2.9000000e+00   4.7000000e+00   1.4000000e+00   3.9000000e+00   3.2000000e+00   4.8000000e+00   2.2000000e+00   2.3000000e+00   2.8000000e+00   1.6000000e+00   1.9000000e+00   2.6000000e+00   2.2000000e+00   5.8000000e+00   5.7000000e+00   1.7000000e+00   3.5000000e+00   1.1000000e+00   5.0000000e+00   1.7000000e+00   3.2000000e+00   3.6000000e+00   1.4000000e+00   1.2000000e+00   2.7000000e+00   3.0000000e+00   4.0000000e+00   5.5000000e+00   2.8000000e+00   1.5000000e+00   2.1000000e+00   4.5000000e+00   3.1000000e+00   2.2000000e+00   1.0000000e+00   2.9000000e+00   3.2000000e+00   2.8000000e+00   1.5000000e+00   3.6000000e+00   3.6000000e+00   2.6000000e+00   2.1000000e+00   2.1000000e+00   2.7000000e+00   1.2000000e+00   1.8000000e+00   7.0000000e-01   2.1000000e+00   8.0000000e-01   2.0000000e+00   1.2000000e+00   1.3000000e+00   1.8000000e+00   2.2000000e+00   2.8000000e+00   1.3000000e+00   8.0000000e-01   1.0000000e+00   1.0000000e+00   4.0000000e-01   1.8000000e+00   1.6000000e+00   1.9000000e+00   2.4000000e+00   1.5000000e+00   8.0000000e-01   9.0000000e-01   9.0000000e-01   1.5000000e+00   4.0000000e-01   2.0000000e+00   6.0000000e-01   7.0000000e-01   7.0000000e-01   1.1000000e+00   2.1000000e+00   5.0000000e-01   4.5000000e+00   1.9000000e+00   4.5000000e+00   3.0000000e+00   3.9000000e+00   5.7000000e+00   2.2000000e+00   4.7000000e+00   3.6000000e+00   5.8000000e+00   3.2000000e+00   2.7000000e+00   3.8000000e+00   2.2000000e+00   2.5000000e+00   3.6000000e+00   3.2000000e+00   6.8000000e+00   6.1000000e+00   2.1000000e+00   4.5000000e+00   2.1000000e+00   5.6000000e+00   2.1000000e+00   4.2000000e+00   4.6000000e+00   2.0000000e+00   2.2000000e+00   3.3000000e+00   4.0000000e+00   4.6000000e+00   6.5000000e+00   3.4000000e+00   2.1000000e+00   2.3000000e+00   5.5000000e+00   4.1000000e+00   3.2000000e+00   2.0000000e+00   3.9000000e+00   4.2000000e+00   3.8000000e+00   1.9000000e+00   4.6000000e+00   4.6000000e+00   3.6000000e+00   2.5000000e+00   3.1000000e+00   3.7000000e+00   2.2000000e+00   1.9000000e+00   1.9000000e+00   1.4000000e+00   8.0000000e-01   1.2000000e+00   1.3000000e+00   1.4000000e+00   1.6000000e+00   2.0000000e+00   9.0000000e-01   2.4000000e+00   2.0000000e+00   2.2000000e+00   1.8000000e+00   1.4000000e+00   1.6000000e+00   1.5000000e+00   1.6000000e+00   5.0000000e-01   2.0000000e+00   1.7000000e+00   1.5000000e+00   1.1000000e+00   1.6000000e+00   3.0000000e+00   1.6000000e+00   1.9000000e+00   1.7000000e+00   1.1000000e+00   3.3000000e+00   1.7000000e+00   3.7000000e+00   1.9000000e+00   3.7000000e+00   2.2000000e+00   3.1000000e+00   4.9000000e+00   1.8000000e+00   3.9000000e+00   2.4000000e+00   5.0000000e+00   2.4000000e+00   1.9000000e+00   3.0000000e+00   1.8000000e+00   2.5000000e+00   2.8000000e+00   2.4000000e+00   6.0000000e+00   5.1000000e+00   7.0000000e-01   3.7000000e+00   2.1000000e+00   4.8000000e+00   1.3000000e+00   3.4000000e+00   3.8000000e+00   1.2000000e+00   1.6000000e+00   2.5000000e+00   3.2000000e+00   3.8000000e+00   5.7000000e+00   2.6000000e+00   1.3000000e+00   1.7000000e+00   4.7000000e+00   3.3000000e+00   2.4000000e+00   1.6000000e+00   3.1000000e+00   3.4000000e+00   3.0000000e+00   1.9000000e+00   3.8000000e+00   3.8000000e+00   2.8000000e+00   1.3000000e+00   2.3000000e+00   2.9000000e+00   2.0000000e+00   2.6000000e+00   1.1000000e+00   2.1000000e+00   1.7000000e+00   1.8000000e+00   2.3000000e+00   2.7000000e+00   3.3000000e+00   1.8000000e+00   7.0000000e-01   3.0000000e-01   5.0000000e-01   5.0000000e-01   2.3000000e+00   1.7000000e+00   2.4000000e+00   2.9000000e+00   1.6000000e+00   9.0000000e-01   4.0000000e-01   8.0000000e-01   2.0000000e+00   5.0000000e-01   1.5000000e+00   7.0000000e-01   1.0000000e+00   1.0000000e+00   1.6000000e+00   1.4000000e+00   8.0000000e-01   5.0000000e+00   2.4000000e+00   5.0000000e+00   3.5000000e+00   4.4000000e+00   6.2000000e+00   1.9000000e+00   5.2000000e+00   3.7000000e+00   6.3000000e+00   3.7000000e+00   3.2000000e+00   4.3000000e+00   2.1000000e+00   3.0000000e+00   4.1000000e+00   3.7000000e+00   7.3000000e+00   6.4000000e+00   2.2000000e+00   5.0000000e+00   2.2000000e+00   6.1000000e+00   2.6000000e+00   4.7000000e+00   5.1000000e+00   2.5000000e+00   2.7000000e+00   3.8000000e+00   4.5000000e+00   5.1000000e+00   7.0000000e+00   3.9000000e+00   2.6000000e+00   2.6000000e+00   6.0000000e+00   4.6000000e+00   3.7000000e+00   2.5000000e+00   4.4000000e+00   4.7000000e+00   4.3000000e+00   2.4000000e+00   5.1000000e+00   5.1000000e+00   4.1000000e+00   2.6000000e+00   3.6000000e+00   4.2000000e+00   2.7000000e+00   1.9000000e+00   1.5000000e+00   1.3000000e+00   1.8000000e+00   1.7000000e+00   1.7000000e+00   1.3000000e+00   1.0000000e+00   2.9000000e+00   2.9000000e+00   3.1000000e+00   2.1000000e+00   1.1000000e+00   1.3000000e+00   8.0000000e-01   1.3000000e+00   2.2000000e+00   1.7000000e+00   2.4000000e+00   2.0000000e+00   1.0000000e+00   2.1000000e+00   4.1000000e+00   1.9000000e+00   1.6000000e+00   1.6000000e+00   1.6000000e+00   4.0000000e+00   1.8000000e+00   2.4000000e+00   1.0000000e+00   2.8000000e+00   1.5000000e+00   2.2000000e+00   4.0000000e+00   2.1000000e+00   3.2000000e+00   2.5000000e+00   3.7000000e+00   1.1000000e+00   1.6000000e+00   2.1000000e+00   1.3000000e+00   1.4000000e+00   1.5000000e+00   1.5000000e+00   4.7000000e+00   5.0000000e+00   1.6000000e+00   2.4000000e+00   1.0000000e+00   4.3000000e+00   1.0000000e+00   2.1000000e+00   2.5000000e+00   7.0000000e-01   5.0000000e-01   2.0000000e+00   2.7000000e+00   3.3000000e+00   4.4000000e+00   2.1000000e+00   1.4000000e+00   2.0000000e+00   3.8000000e+00   2.0000000e+00   1.3000000e+00   3.0000000e-01   2.0000000e+00   2.3000000e+00   1.9000000e+00   1.0000000e+00   2.5000000e+00   2.5000000e+00   1.9000000e+00   1.4000000e+00   1.4000000e+00   1.6000000e+00   5.0000000e-01   1.6000000e+00   8.0000000e-01   7.0000000e-01   1.2000000e+00   1.6000000e+00   2.2000000e+00   9.0000000e-01   1.4000000e+00   1.4000000e+00   1.6000000e+00   6.0000000e-01   1.6000000e+00   1.6000000e+00   1.5000000e+00   1.8000000e+00   1.1000000e+00   8.0000000e-01   9.0000000e-01   1.3000000e+00   9.0000000e-01   6.0000000e-01   2.6000000e+00   8.0000000e-01   9.0000000e-01   7.0000000e-01   5.0000000e-01   2.5000000e+00   5.0000000e-01   3.9000000e+00   2.1000000e+00   3.9000000e+00   2.4000000e+00   3.3000000e+00   5.1000000e+00   2.4000000e+00   4.1000000e+00   3.2000000e+00   5.2000000e+00   2.6000000e+00   2.3000000e+00   3.2000000e+00   2.4000000e+00   2.5000000e+00   3.0000000e+00   2.6000000e+00   6.2000000e+00   5.7000000e+00   1.9000000e+00   3.9000000e+00   2.1000000e+00   5.0000000e+00   1.7000000e+00   3.6000000e+00   4.0000000e+00   1.4000000e+00   1.6000000e+00   2.7000000e+00   3.4000000e+00   4.0000000e+00   5.9000000e+00   2.8000000e+00   1.5000000e+00   1.9000000e+00   4.9000000e+00   3.5000000e+00   2.6000000e+00   1.6000000e+00   3.3000000e+00   3.6000000e+00   3.2000000e+00   2.1000000e+00   4.0000000e+00   4.0000000e+00   3.0000000e+00   2.1000000e+00   2.5000000e+00   3.1000000e+00   2.0000000e+00   1.0000000e+00   1.3000000e+00   1.4000000e+00   1.0000000e+00   1.2000000e+00   1.1000000e+00   2.6000000e+00   2.4000000e+00   2.6000000e+00   2.0000000e+00   8.0000000e-01   1.8000000e+00   1.7000000e+00   1.2000000e+00   9.0000000e-01   2.2000000e+00   1.9000000e+00   1.7000000e+00   1.1000000e+00   1.8000000e+00   3.6000000e+00   1.8000000e+00   2.1000000e+00   1.9000000e+00   1.3000000e+00   3.5000000e+00   1.9000000e+00   2.9000000e+00   1.3000000e+00   2.9000000e+00   1.4000000e+00   2.3000000e+00   4.1000000e+00   2.0000000e+00   3.1000000e+00   1.6000000e+00   4.2000000e+00   1.6000000e+00   1.1000000e+00   2.2000000e+00   1.2000000e+00   1.9000000e+00   2.0000000e+00   1.6000000e+00   5.2000000e+00   4.3000000e+00   7.0000000e-01   2.9000000e+00   1.5000000e+00   4.0000000e+00   5.0000000e-01   2.6000000e+00   3.0000000e+00   8.0000000e-01   1.0000000e+00   1.7000000e+00   2.4000000e+00   3.0000000e+00   4.9000000e+00   1.8000000e+00   5.0000000e-01   1.1000000e+00   3.9000000e+00   2.5000000e+00   1.6000000e+00   1.2000000e+00   2.3000000e+00   2.6000000e+00   2.2000000e+00   1.3000000e+00   3.0000000e+00   3.0000000e+00   2.0000000e+00   5.0000000e-01   1.5000000e+00   2.3000000e+00   1.4000000e+00   9.0000000e-01   1.2000000e+00   1.0000000e+00   1.6000000e+00   7.0000000e-01   2.0000000e+00   2.0000000e+00   2.2000000e+00   1.2000000e+00   1.0000000e+00   1.4000000e+00   1.3000000e+00   1.2000000e+00   1.1000000e+00   1.4000000e+00   1.7000000e+00   1.1000000e+00   5.0000000e-01   1.2000000e+00   3.2000000e+00   1.2000000e+00   1.1000000e+00   1.1000000e+00   7.0000000e-01   3.1000000e+00   1.1000000e+00   3.3000000e+00   1.5000000e+00   3.3000000e+00   1.8000000e+00   2.7000000e+00   4.5000000e+00   2.2000000e+00   3.5000000e+00   2.6000000e+00   4.6000000e+00   2.0000000e+00   1.7000000e+00   2.6000000e+00   1.8000000e+00   1.9000000e+00   2.4000000e+00   2.0000000e+00   5.6000000e+00   5.1000000e+00   1.3000000e+00   3.3000000e+00   1.5000000e+00   4.4000000e+00   1.1000000e+00   3.0000000e+00   3.4000000e+00   8.0000000e-01   1.0000000e+00   2.1000000e+00   2.8000000e+00   3.4000000e+00   5.3000000e+00   2.2000000e+00   9.0000000e-01   1.3000000e+00   4.3000000e+00   2.9000000e+00   2.0000000e+00   1.0000000e+00   2.7000000e+00   3.0000000e+00   2.6000000e+00   1.5000000e+00   3.4000000e+00   3.4000000e+00   2.4000000e+00   1.5000000e+00   1.9000000e+00   2.5000000e+00   1.4000000e+00   5.0000000e-01   1.1000000e+00   1.5000000e+00   8.0000000e-01   2.1000000e+00   2.1000000e+00   2.3000000e+00   1.3000000e+00   1.7000000e+00   1.5000000e+00   1.4000000e+00   1.1000000e+00   8.0000000e-01   1.1000000e+00   1.6000000e+00   1.4000000e+00   8.0000000e-01   1.3000000e+00   3.3000000e+00   1.1000000e+00   1.0000000e+00   8.0000000e-01   2.0000000e-01   3.2000000e+00   1.0000000e+00   3.4000000e+00   2.2000000e+00   3.2000000e+00   1.9000000e+00   2.6000000e+00   4.4000000e+00   2.5000000e+00   3.4000000e+00   2.7000000e+00   4.5000000e+00   1.9000000e+00   1.8000000e+00   2.5000000e+00   2.5000000e+00   2.6000000e+00   2.3000000e+00   1.9000000e+00   5.5000000e+00   5.2000000e+00   2.0000000e+00   3.2000000e+00   2.2000000e+00   4.5000000e+00   1.4000000e+00   2.9000000e+00   3.3000000e+00   1.3000000e+00   1.5000000e+00   2.2000000e+00   2.7000000e+00   3.5000000e+00   5.2000000e+00   2.3000000e+00   1.2000000e+00   2.0000000e+00   4.2000000e+00   3.0000000e+00   1.9000000e+00   1.5000000e+00   2.6000000e+00   2.9000000e+00   2.5000000e+00   2.2000000e+00   3.3000000e+00   3.3000000e+00   2.3000000e+00   1.8000000e+00   1.8000000e+00   2.8000000e+00   1.9000000e+00   8.0000000e-01   1.0000000e+00   9.0000000e-01   2.6000000e+00   2.6000000e+00   2.8000000e+00   1.8000000e+00   1.8000000e+00   1.4000000e+00   1.3000000e+00   6.0000000e-01   1.1000000e+00   1.4000000e+00   2.1000000e+00   1.7000000e+00   7.0000000e-01   1.8000000e+00   3.8000000e+00   1.6000000e+00   1.3000000e+00   1.3000000e+00   7.0000000e-01   3.7000000e+00   1.5000000e+00   3.3000000e+00   2.3000000e+00   2.7000000e+00   2.0000000e+00   2.3000000e+00   3.9000000e+00   2.6000000e+00   3.1000000e+00   2.4000000e+00   4.0000000e+00   1.6000000e+00   1.9000000e+00   2.0000000e+00   2.6000000e+00   2.7000000e+00   2.2000000e+00   1.6000000e+00   5.0000000e+00   4.9000000e+00   2.1000000e+00   2.7000000e+00   2.3000000e+00   4.2000000e+00   1.5000000e+00   2.4000000e+00   2.8000000e+00   1.4000000e+00   1.4000000e+00   2.3000000e+00   2.2000000e+00   3.2000000e+00   4.7000000e+00   2.4000000e+00   1.3000000e+00   2.1000000e+00   3.7000000e+00   2.9000000e+00   1.8000000e+00   1.4000000e+00   2.1000000e+00   2.4000000e+00   2.0000000e+00   2.3000000e+00   2.8000000e+00   2.8000000e+00   1.8000000e+00   1.9000000e+00   1.5000000e+00   2.7000000e+00   1.8000000e+00   8.0000000e-01   1.3000000e+00   3.0000000e+00   3.0000000e+00   3.2000000e+00   2.2000000e+00   1.4000000e+00   2.0000000e+00   1.9000000e+00   6.0000000e-01   1.5000000e+00   2.2000000e+00   2.5000000e+00   2.1000000e+00   1.1000000e+00   2.2000000e+00   4.2000000e+00   2.0000000e+00   2.1000000e+00   1.9000000e+00   1.3000000e+00   4.1000000e+00   1.9000000e+00   3.3000000e+00   1.9000000e+00   2.3000000e+00   1.8000000e+00   2.3000000e+00   3.5000000e+00   2.8000000e+00   2.5000000e+00   1.8000000e+00   3.6000000e+00   1.6000000e+00   1.5000000e+00   1.6000000e+00   2.2000000e+00   2.3000000e+00   2.2000000e+00   1.6000000e+00   4.6000000e+00   4.1000000e+00   1.7000000e+00   2.3000000e+00   1.9000000e+00   3.4000000e+00   1.1000000e+00   2.2000000e+00   2.4000000e+00   1.0000000e+00   1.4000000e+00   1.9000000e+00   1.8000000e+00   2.4000000e+00   4.3000000e+00   2.0000000e+00   9.0000000e-01   1.7000000e+00   3.3000000e+00   2.9000000e+00   1.8000000e+00   1.4000000e+00   1.7000000e+00   2.2000000e+00   1.6000000e+00   1.9000000e+00   2.4000000e+00   2.6000000e+00   1.6000000e+00   1.5000000e+00   1.5000000e+00   2.7000000e+00   1.8000000e+00   1.5000000e+00   3.6000000e+00   3.6000000e+00   3.8000000e+00   2.8000000e+00   1.2000000e+00   2.0000000e+00   1.7000000e+00   6.0000000e-01   2.1000000e+00   2.4000000e+00   3.1000000e+00   2.7000000e+00   1.3000000e+00   2.8000000e+00   4.8000000e+00   2.6000000e+00   2.3000000e+00   2.3000000e+00   1.7000000e+00   4.7000000e+00   2.5000000e+00   2.5000000e+00   1.5000000e+00   1.7000000e+00   1.2000000e+00   1.5000000e+00   2.9000000e+00   2.8000000e+00   2.1000000e+00   1.4000000e+00   3.0000000e+00   8.0000000e-01   1.1000000e+00   1.0000000e+00   1.8000000e+00   1.9000000e+00   1.4000000e+00   8.0000000e-01   4.0000000e+00   3.9000000e+00   1.7000000e+00   1.7000000e+00   1.7000000e+00   3.2000000e+00   9.0000000e-01   1.4000000e+00   1.8000000e+00   1.0000000e+00   8.0000000e-01   1.5000000e+00   1.4000000e+00   2.2000000e+00   3.7000000e+00   1.6000000e+00   9.0000000e-01   1.9000000e+00   2.7000000e+00   2.1000000e+00   1.0000000e+00   1.0000000e+00   1.1000000e+00   1.4000000e+00   1.0000000e+00   1.5000000e+00   1.8000000e+00   1.8000000e+00   8.0000000e-01   1.1000000e+00   7.0000000e-01   1.9000000e+00   1.0000000e+00   2.1000000e+00   2.1000000e+00   2.3000000e+00   1.3000000e+00   9.0000000e-01   7.0000000e-01   6.0000000e-01   1.1000000e+00   1.2000000e+00   1.1000000e+00   1.6000000e+00   1.2000000e+00   4.0000000e-01   1.3000000e+00   3.3000000e+00   1.1000000e+00   1.0000000e+00   8.0000000e-01   6.0000000e-01   3.2000000e+00   1.0000000e+00   3.2000000e+00   1.4000000e+00   3.2000000e+00   1.7000000e+00   2.6000000e+00   4.4000000e+00   1.7000000e+00   3.4000000e+00   2.7000000e+00   4.5000000e+00   1.9000000e+00   1.8000000e+00   2.5000000e+00   1.7000000e+00   1.8000000e+00   2.3000000e+00   1.9000000e+00   5.5000000e+00   5.2000000e+00   1.2000000e+00   3.2000000e+00   1.4000000e+00   4.5000000e+00   1.2000000e+00   2.9000000e+00   3.3000000e+00   9.0000000e-01   9.0000000e-01   2.2000000e+00   2.7000000e+00   3.5000000e+00   5.2000000e+00   2.3000000e+00   1.0000000e+00   1.6000000e+00   4.2000000e+00   2.8000000e+00   1.9000000e+00   7.0000000e-01   2.6000000e+00   2.9000000e+00   2.5000000e+00   1.4000000e+00   3.3000000e+00   3.3000000e+00   2.3000000e+00   1.6000000e+00   1.8000000e+00   2.4000000e+00   1.1000000e+00   8.0000000e-01   6.0000000e-01   8.0000000e-01   2.6000000e+00   2.2000000e+00   2.7000000e+00   3.2000000e+00   2.1000000e+00   1.4000000e+00   1.1000000e+00   1.3000000e+00   2.3000000e+00   8.0000000e-01   1.2000000e+00   1.2000000e+00   1.3000000e+00   1.3000000e+00   1.9000000e+00   1.3000000e+00   1.1000000e+00   5.3000000e+00   2.7000000e+00   5.3000000e+00   3.8000000e+00   4.7000000e+00   6.5000000e+00   2.6000000e+00   5.5000000e+00   4.2000000e+00   6.6000000e+00   4.0000000e+00   3.5000000e+00   4.6000000e+00   2.6000000e+00   3.3000000e+00   4.4000000e+00   4.0000000e+00   7.6000000e+00   6.7000000e+00   2.7000000e+00   5.3000000e+00   2.7000000e+00   6.4000000e+00   2.9000000e+00   5.0000000e+00   5.4000000e+00   2.8000000e+00   3.0000000e+00   4.1000000e+00   4.8000000e+00   5.4000000e+00   7.3000000e+00   4.2000000e+00   2.9000000e+00   2.9000000e+00   6.3000000e+00   4.9000000e+00   4.0000000e+00   2.8000000e+00   4.7000000e+00   5.0000000e+00   4.6000000e+00   2.7000000e+00   5.4000000e+00   5.4000000e+00   4.4000000e+00   3.1000000e+00   3.9000000e+00   4.5000000e+00   3.0000000e+00   2.0000000e-01   8.0000000e-01   2.6000000e+00   1.8000000e+00   2.7000000e+00   3.2000000e+00   1.7000000e+00   1.2000000e+00   5.0000000e-01   9.0000000e-01   2.3000000e+00   8.0000000e-01   1.2000000e+00   1.0000000e+00   1.3000000e+00   1.3000000e+00   1.9000000e+00   1.3000000e+00   1.1000000e+00   5.3000000e+00   2.7000000e+00   5.3000000e+00   3.8000000e+00   4.7000000e+00   6.5000000e+00   2.0000000e+00   5.5000000e+00   4.0000000e+00   6.6000000e+00   4.0000000e+00   3.5000000e+00   4.6000000e+00   2.4000000e+00   3.3000000e+00   4.4000000e+00   4.0000000e+00   7.6000000e+00   6.7000000e+00   2.3000000e+00   5.3000000e+00   2.5000000e+00   6.4000000e+00   2.9000000e+00   5.0000000e+00   5.4000000e+00   2.8000000e+00   3.0000000e+00   4.1000000e+00   4.8000000e+00   5.4000000e+00   7.3000000e+00   4.2000000e+00   2.9000000e+00   2.9000000e+00   6.3000000e+00   4.9000000e+00   4.0000000e+00   2.8000000e+00   4.7000000e+00   5.0000000e+00   4.6000000e+00   2.7000000e+00   5.4000000e+00   5.4000000e+00   4.4000000e+00   2.9000000e+00   3.9000000e+00   4.5000000e+00   3.0000000e+00   1.0000000e+00   2.8000000e+00   2.0000000e+00   2.9000000e+00   3.4000000e+00   1.9000000e+00   1.4000000e+00   7.0000000e-01   1.1000000e+00   2.5000000e+00   1.0000000e+00   1.0000000e+00   1.2000000e+00   1.5000000e+00   1.5000000e+00   2.1000000e+00   1.3000000e+00   1.3000000e+00   5.5000000e+00   2.9000000e+00   5.5000000e+00   4.0000000e+00   4.9000000e+00   6.7000000e+00   2.2000000e+00   5.7000000e+00   4.2000000e+00   6.8000000e+00   4.2000000e+00   3.7000000e+00   4.8000000e+00   2.6000000e+00   3.5000000e+00   4.6000000e+00   4.2000000e+00   7.8000000e+00   6.9000000e+00   2.5000000e+00   5.5000000e+00   2.7000000e+00   6.6000000e+00   3.1000000e+00   5.2000000e+00   5.6000000e+00   3.0000000e+00   3.2000000e+00   4.3000000e+00   5.0000000e+00   5.6000000e+00   7.5000000e+00   4.4000000e+00   3.1000000e+00   3.1000000e+00   6.5000000e+00   5.1000000e+00   4.2000000e+00   3.0000000e+00   4.9000000e+00   5.2000000e+00   4.8000000e+00   2.9000000e+00   5.6000000e+00   5.6000000e+00   4.6000000e+00   3.1000000e+00   4.1000000e+00   4.7000000e+00   3.2000000e+00   1.8000000e+00   1.6000000e+00   1.9000000e+00   2.4000000e+00   1.5000000e+00   8.0000000e-01   7.0000000e-01   9.0000000e-01   1.5000000e+00   2.0000000e-01   2.0000000e+00   6.0000000e-01   7.0000000e-01   7.0000000e-01   1.1000000e+00   1.9000000e+00   5.0000000e-01   4.5000000e+00   1.9000000e+00   4.5000000e+00   3.0000000e+00   3.9000000e+00   5.7000000e+00   2.2000000e+00   4.7000000e+00   3.6000000e+00   5.8000000e+00   3.2000000e+00   2.7000000e+00   3.8000000e+00   2.2000000e+00   2.5000000e+00   3.6000000e+00   3.2000000e+00   6.8000000e+00   6.1000000e+00   2.1000000e+00   4.5000000e+00   2.1000000e+00   5.6000000e+00   2.1000000e+00   4.2000000e+00   4.6000000e+00   2.0000000e+00   2.2000000e+00   3.3000000e+00   4.0000000e+00   4.6000000e+00   6.5000000e+00   3.4000000e+00   2.1000000e+00   2.3000000e+00   5.5000000e+00   4.1000000e+00   3.2000000e+00   2.0000000e+00   3.9000000e+00   4.2000000e+00   3.8000000e+00   1.9000000e+00   4.6000000e+00   4.6000000e+00   3.6000000e+00   2.5000000e+00   3.1000000e+00   3.7000000e+00   2.2000000e+00   1.6000000e+00   1.3000000e+00   1.6000000e+00   1.7000000e+00   2.0000000e+00   2.1000000e+00   1.7000000e+00   1.1000000e+00   1.8000000e+00   3.8000000e+00   1.6000000e+00   1.9000000e+00   1.7000000e+00   1.5000000e+00   3.7000000e+00   1.7000000e+00   2.7000000e+00   5.0000000e-01   2.7000000e+00   1.2000000e+00   2.1000000e+00   3.9000000e+00   2.0000000e+00   2.9000000e+00   1.8000000e+00   4.0000000e+00   1.4000000e+00   9.0000000e-01   2.0000000e+00   1.0000000e+00   1.1000000e+00   1.8000000e+00   1.4000000e+00   5.0000000e+00   4.3000000e+00   7.0000000e-01   2.7000000e+00   1.1000000e+00   3.8000000e+00   7.0000000e-01   2.4000000e+00   2.8000000e+00   8.0000000e-01   8.0000000e-01   1.5000000e+00   2.2000000e+00   2.8000000e+00   4.7000000e+00   1.6000000e+00   5.0000000e-01   9.0000000e-01   3.7000000e+00   2.3000000e+00   1.4000000e+00   8.0000000e-01   2.1000000e+00   2.4000000e+00   2.0000000e+00   5.0000000e-01   2.8000000e+00   2.8000000e+00   1.8000000e+00   9.0000000e-01   1.3000000e+00   1.9000000e+00   6.0000000e-01   1.1000000e+00   1.6000000e+00   1.9000000e+00   8.0000000e-01   1.3000000e+00   9.0000000e-01   9.0000000e-01   1.6000000e+00   2.8000000e+00   1.0000000e+00   9.0000000e-01   9.0000000e-01   1.3000000e+00   2.7000000e+00   1.1000000e+00   3.7000000e+00   1.7000000e+00   3.7000000e+00   2.4000000e+00   3.1000000e+00   4.9000000e+00   1.2000000e+00   4.1000000e+00   3.4000000e+00   5.0000000e+00   2.4000000e+00   2.5000000e+00   3.0000000e+00   1.8000000e+00   2.1000000e+00   2.8000000e+00   2.4000000e+00   6.0000000e+00   5.9000000e+00   1.9000000e+00   3.7000000e+00   1.3000000e+00   5.2000000e+00   1.9000000e+00   3.4000000e+00   3.8000000e+00   1.6000000e+00   1.4000000e+00   2.9000000e+00   3.2000000e+00   4.2000000e+00   5.7000000e+00   3.0000000e+00   1.7000000e+00   2.3000000e+00   4.7000000e+00   3.3000000e+00   2.4000000e+00   1.2000000e+00   3.1000000e+00   3.4000000e+00   3.0000000e+00   1.7000000e+00   3.8000000e+00   3.8000000e+00   2.8000000e+00   2.3000000e+00   2.3000000e+00   2.9000000e+00   1.4000000e+00   1.3000000e+00   1.8000000e+00   1.5000000e+00   2.2000000e+00   1.8000000e+00   8.0000000e-01   1.9000000e+00   3.9000000e+00   1.7000000e+00   1.4000000e+00   1.4000000e+00   1.2000000e+00   3.8000000e+00   1.6000000e+00   2.8000000e+00   1.8000000e+00   3.4000000e+00   2.1000000e+00   2.8000000e+00   4.6000000e+00   2.1000000e+00   3.8000000e+00   3.1000000e+00   3.9000000e+00   1.7000000e+00   2.2000000e+00   2.7000000e+00   2.1000000e+00   2.2000000e+00   2.1000000e+00   2.1000000e+00   4.9000000e+00   5.6000000e+00   1.8000000e+00   3.0000000e+00   1.8000000e+00   4.9000000e+00   1.6000000e+00   2.5000000e+00   3.1000000e+00   1.3000000e+00   1.1000000e+00   2.6000000e+00   2.9000000e+00   3.9000000e+00   4.6000000e+00   2.7000000e+00   1.6000000e+00   2.2000000e+00   4.4000000e+00   2.2000000e+00   1.9000000e+00   9.0000000e-01   2.6000000e+00   2.9000000e+00   2.5000000e+00   1.8000000e+00   3.1000000e+00   2.9000000e+00   2.5000000e+00   2.0000000e+00   2.0000000e+00   1.8000000e+00   1.3000000e+00   1.7000000e+00   2.0000000e+00   2.7000000e+00   2.3000000e+00   9.0000000e-01   2.4000000e+00   4.4000000e+00   2.2000000e+00   1.9000000e+00   1.9000000e+00   1.3000000e+00   4.3000000e+00   2.1000000e+00   2.9000000e+00   2.1000000e+00   2.3000000e+00   1.8000000e+00   2.1000000e+00   3.5000000e+00   2.8000000e+00   2.7000000e+00   2.0000000e+00   3.4000000e+00   1.2000000e+00   1.7000000e+00   1.6000000e+00   2.4000000e+00   2.5000000e+00   1.8000000e+00   1.4000000e+00   4.4000000e+00   4.5000000e+00   1.9000000e+00   2.1000000e+00   2.1000000e+00   3.8000000e+00   1.3000000e+00   1.8000000e+00   2.2000000e+00   1.2000000e+00   1.2000000e+00   2.1000000e+00   1.8000000e+00   2.8000000e+00   4.1000000e+00   2.2000000e+00   1.1000000e+00   2.1000000e+00   3.3000000e+00   2.5000000e+00   1.4000000e+00   1.2000000e+00   1.5000000e+00   1.8000000e+00   1.4000000e+00   2.1000000e+00   2.2000000e+00   2.2000000e+00   1.4000000e+00   1.7000000e+00   1.3000000e+00   2.3000000e+00   1.6000000e+00   1.7000000e+00   1.4000000e+00   1.2000000e+00   1.2000000e+00   1.3000000e+00   2.7000000e+00   1.3000000e+00   1.6000000e+00   1.4000000e+00   8.0000000e-01   3.0000000e+00   1.4000000e+00   3.8000000e+00   2.2000000e+00   3.8000000e+00   2.3000000e+00   3.2000000e+00   5.0000000e+00   2.1000000e+00   4.0000000e+00   2.5000000e+00   5.1000000e+00   2.5000000e+00   2.0000000e+00   3.1000000e+00   2.1000000e+00   2.8000000e+00   2.9000000e+00   2.5000000e+00   6.1000000e+00   5.2000000e+00   1.2000000e+00   3.8000000e+00   2.4000000e+00   4.9000000e+00   1.4000000e+00   3.5000000e+00   3.9000000e+00   1.5000000e+00   1.9000000e+00   2.6000000e+00   3.3000000e+00   3.9000000e+00   5.8000000e+00   2.7000000e+00   1.4000000e+00   1.8000000e+00   4.8000000e+00   3.4000000e+00   2.5000000e+00   1.9000000e+00   3.2000000e+00   3.5000000e+00   3.1000000e+00   2.2000000e+00   3.9000000e+00   3.9000000e+00   2.9000000e+00   1.4000000e+00   2.4000000e+00   3.2000000e+00   2.3000000e+00   7.0000000e-01   9.0000000e-01   1.1000000e+00   8.0000000e-01   2.4000000e+00   4.0000000e-01   3.0000000e-01   3.0000000e-01   9.0000000e-01   2.3000000e+00   3.0000000e-01   4.1000000e+00   2.1000000e+00   4.1000000e+00   2.8000000e+00   3.5000000e+00   5.3000000e+00   2.0000000e+00   4.5000000e+00   3.8000000e+00   5.4000000e+00   2.8000000e+00   2.9000000e+00   3.4000000e+00   2.2000000e+00   2.5000000e+00   3.2000000e+00   2.8000000e+00   6.4000000e+00   6.3000000e+00   2.3000000e+00   4.1000000e+00   1.7000000e+00   5.6000000e+00   2.3000000e+00   3.8000000e+00   4.2000000e+00   2.0000000e+00   1.8000000e+00   3.3000000e+00   3.6000000e+00   4.6000000e+00   6.1000000e+00   3.4000000e+00   2.1000000e+00   2.5000000e+00   5.1000000e+00   3.7000000e+00   2.8000000e+00   1.6000000e+00   3.5000000e+00   3.8000000e+00   3.4000000e+00   2.1000000e+00   4.2000000e+00   4.2000000e+00   3.2000000e+00   2.7000000e+00   2.7000000e+00   3.3000000e+00   1.8000000e+00   6.0000000e-01   1.8000000e+00   5.0000000e-01   1.7000000e+00   5.0000000e-01   1.0000000e+00   8.0000000e-01   1.4000000e+00   1.6000000e+00   6.0000000e-01   4.8000000e+00   2.2000000e+00   4.8000000e+00   3.3000000e+00   4.2000000e+00   6.0000000e+00   1.5000000e+00   5.0000000e+00   3.5000000e+00   6.1000000e+00   3.5000000e+00   3.0000000e+00   4.1000000e+00   1.9000000e+00   2.8000000e+00   3.9000000e+00   3.5000000e+00   7.1000000e+00   6.2000000e+00   2.0000000e+00   4.8000000e+00   2.0000000e+00   5.9000000e+00   2.4000000e+00   4.5000000e+00   4.9000000e+00   2.3000000e+00   2.5000000e+00   3.6000000e+00   4.3000000e+00   4.9000000e+00   6.8000000e+00   3.7000000e+00   2.4000000e+00   2.4000000e+00   5.8000000e+00   4.4000000e+00   3.5000000e+00   2.3000000e+00   4.2000000e+00   4.5000000e+00   4.1000000e+00   2.2000000e+00   4.9000000e+00   4.9000000e+00   3.9000000e+00   2.4000000e+00   3.4000000e+00   4.0000000e+00   2.5000000e+00   1.4000000e+00   7.0000000e-01   2.1000000e+00   5.0000000e-01   8.0000000e-01   8.0000000e-01   1.2000000e+00   2.0000000e+00   8.0000000e-01   4.4000000e+00   1.8000000e+00   4.4000000e+00   2.9000000e+00   3.8000000e+00   5.6000000e+00   1.3000000e+00   4.6000000e+00   3.3000000e+00   5.7000000e+00   3.1000000e+00   2.6000000e+00   3.7000000e+00   1.7000000e+00   2.4000000e+00   3.5000000e+00   3.1000000e+00   6.7000000e+00   5.8000000e+00   1.8000000e+00   4.4000000e+00   1.6000000e+00   5.5000000e+00   2.0000000e+00   4.1000000e+00   4.5000000e+00   1.9000000e+00   2.1000000e+00   3.2000000e+00   3.9000000e+00   4.5000000e+00   6.4000000e+00   3.3000000e+00   2.0000000e+00   2.0000000e+00   5.4000000e+00   4.0000000e+00   3.1000000e+00   1.9000000e+00   3.8000000e+00   4.1000000e+00   3.7000000e+00   1.8000000e+00   4.5000000e+00   4.5000000e+00   3.5000000e+00   2.2000000e+00   3.0000000e+00   3.6000000e+00   2.1000000e+00   1.5000000e+00   3.5000000e+00   1.3000000e+00   1.0000000e+00   1.0000000e+00   6.0000000e-01   3.4000000e+00   1.2000000e+00   3.0000000e+00   1.6000000e+00   3.0000000e+00   1.7000000e+00   2.4000000e+00   4.2000000e+00   2.1000000e+00   3.4000000e+00   2.7000000e+00   4.3000000e+00   1.7000000e+00   1.8000000e+00   2.3000000e+00   1.9000000e+00   2.0000000e+00   2.1000000e+00   1.7000000e+00   5.3000000e+00   5.2000000e+00   1.4000000e+00   3.0000000e+00   1.6000000e+00   4.5000000e+00   1.2000000e+00   2.7000000e+00   3.1000000e+00   9.0000000e-01   7.0000000e-01   2.2000000e+00   2.5000000e+00   3.5000000e+00   5.0000000e+00   2.3000000e+00   1.0000000e+00   1.4000000e+00   4.0000000e+00   2.6000000e+00   1.7000000e+00   7.0000000e-01   2.4000000e+00   2.7000000e+00   2.3000000e+00   1.6000000e+00   3.1000000e+00   3.1000000e+00   2.1000000e+00   1.6000000e+00   1.6000000e+00   2.2000000e+00   1.1000000e+00   2.0000000e+00   6.0000000e-01   7.0000000e-01   7.0000000e-01   1.1000000e+00   1.9000000e+00   5.0000000e-01   4.5000000e+00   1.9000000e+00   4.5000000e+00   3.0000000e+00   3.9000000e+00   5.7000000e+00   2.0000000e+00   4.7000000e+00   3.4000000e+00   5.8000000e+00   3.2000000e+00   2.7000000e+00   3.8000000e+00   2.0000000e+00   2.5000000e+00   3.6000000e+00   3.2000000e+00   6.8000000e+00   5.9000000e+00   1.9000000e+00   4.5000000e+00   2.1000000e+00   5.6000000e+00   2.1000000e+00   4.2000000e+00   4.6000000e+00   2.0000000e+00   2.2000000e+00   3.3000000e+00   4.0000000e+00   4.6000000e+00   6.5000000e+00   3.4000000e+00   2.1000000e+00   2.1000000e+00   5.5000000e+00   4.1000000e+00   3.2000000e+00   2.0000000e+00   3.9000000e+00   4.2000000e+00   3.8000000e+00   1.9000000e+00   4.6000000e+00   4.6000000e+00   3.6000000e+00   2.3000000e+00   3.1000000e+00   3.7000000e+00   2.2000000e+00   2.2000000e+00   2.5000000e+00   2.5000000e+00   3.1000000e+00   7.0000000e-01   2.3000000e+00   6.5000000e+00   3.9000000e+00   6.5000000e+00   5.0000000e+00   5.9000000e+00   7.7000000e+00   2.2000000e+00   6.7000000e+00   5.2000000e+00   7.8000000e+00   5.2000000e+00   4.7000000e+00   5.8000000e+00   3.6000000e+00   4.5000000e+00   5.6000000e+00   5.2000000e+00   8.8000000e+00   7.9000000e+00   3.3000000e+00   6.5000000e+00   3.7000000e+00   7.6000000e+00   4.1000000e+00   6.2000000e+00   6.6000000e+00   4.0000000e+00   4.2000000e+00   5.3000000e+00   6.0000000e+00   6.6000000e+00   8.5000000e+00   5.4000000e+00   4.1000000e+00   4.1000000e+00   7.5000000e+00   6.1000000e+00   5.2000000e+00   4.0000000e+00   5.9000000e+00   6.2000000e+00   5.8000000e+00   3.9000000e+00   6.6000000e+00   6.6000000e+00   5.6000000e+00   4.1000000e+00   5.1000000e+00   5.7000000e+00   4.2000000e+00   5.0000000e-01   3.0000000e-01   9.0000000e-01   2.1000000e+00   3.0000000e-01   4.3000000e+00   1.7000000e+00   4.3000000e+00   2.8000000e+00   3.7000000e+00   5.5000000e+00   1.6000000e+00   4.5000000e+00   3.4000000e+00   5.6000000e+00   3.0000000e+00   2.5000000e+00   3.6000000e+00   1.8000000e+00   2.3000000e+00   3.4000000e+00   3.0000000e+00   6.6000000e+00   5.9000000e+00   1.9000000e+00   4.3000000e+00   1.5000000e+00   5.4000000e+00   1.9000000e+00   4.0000000e+00   4.4000000e+00   1.8000000e+00   2.0000000e+00   3.1000000e+00   3.8000000e+00   4.4000000e+00   6.3000000e+00   3.2000000e+00   1.9000000e+00   2.1000000e+00   5.3000000e+00   3.9000000e+00   3.0000000e+00   1.8000000e+00   3.7000000e+00   4.0000000e+00   3.6000000e+00   1.7000000e+00   4.4000000e+00   4.4000000e+00   3.4000000e+00   2.3000000e+00   2.9000000e+00   3.5000000e+00   2.0000000e+00   2.0000000e-01   8.0000000e-01   2.4000000e+00   4.0000000e-01   4.0000000e+00   2.0000000e+00   4.0000000e+00   2.7000000e+00   3.4000000e+00   5.2000000e+00   2.1000000e+00   4.4000000e+00   3.7000000e+00   5.3000000e+00   2.7000000e+00   2.8000000e+00   3.3000000e+00   2.1000000e+00   2.4000000e+00   3.1000000e+00   2.7000000e+00   6.3000000e+00   6.2000000e+00   2.2000000e+00   4.0000000e+00   1.8000000e+00   5.5000000e+00   2.2000000e+00   3.7000000e+00   4.1000000e+00   1.9000000e+00   1.7000000e+00   3.2000000e+00   3.5000000e+00   4.5000000e+00   6.0000000e+00   3.3000000e+00   2.0000000e+00   2.4000000e+00   5.0000000e+00   3.6000000e+00   2.7000000e+00   1.5000000e+00   3.4000000e+00   3.7000000e+00   3.3000000e+00   2.0000000e+00   4.1000000e+00   4.1000000e+00   3.1000000e+00   2.6000000e+00   2.6000000e+00   3.2000000e+00   1.7000000e+00   6.0000000e-01   2.4000000e+00   2.0000000e-01   4.0000000e+00   1.8000000e+00   4.0000000e+00   2.5000000e+00   3.4000000e+00   5.2000000e+00   1.9000000e+00   4.2000000e+00   3.5000000e+00   5.3000000e+00   2.7000000e+00   2.6000000e+00   3.3000000e+00   1.9000000e+00   2.2000000e+00   3.1000000e+00   2.7000000e+00   6.3000000e+00   6.0000000e+00   2.0000000e+00   4.0000000e+00   1.6000000e+00   5.3000000e+00   2.0000000e+00   3.7000000e+00   4.1000000e+00   1.7000000e+00   1.7000000e+00   3.0000000e+00   3.5000000e+00   4.3000000e+00   6.0000000e+00   3.1000000e+00   1.8000000e+00   2.2000000e+00   5.0000000e+00   3.6000000e+00   2.7000000e+00   1.5000000e+00   3.4000000e+00   3.7000000e+00   3.3000000e+00   1.8000000e+00   4.1000000e+00   4.1000000e+00   3.1000000e+00   2.4000000e+00   2.6000000e+00   3.2000000e+00   1.7000000e+00   3.0000000e+00   8.0000000e-01   3.4000000e+00   2.0000000e+00   3.4000000e+00   1.9000000e+00   2.8000000e+00   4.6000000e+00   2.3000000e+00   3.6000000e+00   2.9000000e+00   4.7000000e+00   2.1000000e+00   2.0000000e+00   2.7000000e+00   2.3000000e+00   2.4000000e+00   2.5000000e+00   2.1000000e+00   5.7000000e+00   5.4000000e+00   1.8000000e+00   3.4000000e+00   2.0000000e+00   4.7000000e+00   1.4000000e+00   3.1000000e+00   3.5000000e+00   1.1000000e+00   1.3000000e+00   2.4000000e+00   2.9000000e+00   3.7000000e+00   5.4000000e+00   2.5000000e+00   1.2000000e+00   1.8000000e+00   4.4000000e+00   3.0000000e+00   2.1000000e+00   1.3000000e+00   2.8000000e+00   3.1000000e+00   2.7000000e+00   2.0000000e+00   3.5000000e+00   3.5000000e+00   2.5000000e+00   1.8000000e+00   2.0000000e+00   2.6000000e+00   1.7000000e+00   2.2000000e+00   6.4000000e+00   3.8000000e+00   6.4000000e+00   4.9000000e+00   5.8000000e+00   7.6000000e+00   2.3000000e+00   6.6000000e+00   5.1000000e+00   7.7000000e+00   5.1000000e+00   4.6000000e+00   5.7000000e+00   3.5000000e+00   4.4000000e+00   5.5000000e+00   5.1000000e+00   8.7000000e+00   7.8000000e+00   3.6000000e+00   6.4000000e+00   3.6000000e+00   7.5000000e+00   4.0000000e+00   6.1000000e+00   6.5000000e+00   3.9000000e+00   4.1000000e+00   5.2000000e+00   5.9000000e+00   6.5000000e+00   8.4000000e+00   5.3000000e+00   4.0000000e+00   4.0000000e+00   7.4000000e+00   6.0000000e+00   5.1000000e+00   3.9000000e+00   5.8000000e+00   6.1000000e+00   5.7000000e+00   3.8000000e+00   6.5000000e+00   6.5000000e+00   5.5000000e+00   4.0000000e+00   5.0000000e+00   5.6000000e+00   4.1000000e+00   4.2000000e+00   1.8000000e+00   4.2000000e+00   2.7000000e+00   3.6000000e+00   5.4000000e+00   1.9000000e+00   4.4000000e+00   3.5000000e+00   5.5000000e+00   2.9000000e+00   2.6000000e+00   3.5000000e+00   1.9000000e+00   2.2000000e+00   3.3000000e+00   2.9000000e+00   6.5000000e+00   6.0000000e+00   2.0000000e+00   4.2000000e+00   1.6000000e+00   5.3000000e+00   2.0000000e+00   3.9000000e+00   4.3000000e+00   1.7000000e+00   1.9000000e+00   3.0000000e+00   3.7000000e+00   4.3000000e+00   6.2000000e+00   3.1000000e+00   1.8000000e+00   2.2000000e+00   5.2000000e+00   3.8000000e+00   2.9000000e+00   1.7000000e+00   3.6000000e+00   3.9000000e+00   3.5000000e+00   1.8000000e+00   4.3000000e+00   4.3000000e+00   3.3000000e+00   2.4000000e+00   2.8000000e+00   3.4000000e+00   1.9000000e+00   2.6000000e+00   1.6000000e+00   1.5000000e+00   1.0000000e+00   2.6000000e+00   4.5000000e+00   2.4000000e+00   2.1000000e+00   1.3000000e+00   1.7000000e+00   2.0000000e+00   1.7000000e+00   2.9000000e+00   2.0000000e+00   1.1000000e+00   1.7000000e+00   2.9000000e+00   3.2000000e+00   3.4000000e+00   1.2000000e+00   2.8000000e+00   3.1000000e+00   2.4000000e+00   1.1000000e+00   1.7000000e+00   2.5000000e+00   2.3000000e+00   1.4000000e+00   2.3000000e+00   2.3000000e+00   3.0000000e+00   1.3000000e+00   2.4000000e+00   2.4000000e+00   2.0000000e+00   6.0000000e-01   1.5000000e+00   2.5000000e+00   1.8000000e+00   1.1000000e+00   1.9000000e+00   2.6000000e+00   9.0000000e-01   7.0000000e-01   1.7000000e+00   2.4000000e+00   1.8000000e+00   1.0000000e+00   2.3000000e+00   2.6000000e+00   1.3000000e+00   2.0000000e+00   3.8000000e+00   1.9000000e+00   3.0000000e+00   1.9000000e+00   3.9000000e+00   1.3000000e+00   8.0000000e-01   1.9000000e+00   5.0000000e-01   6.0000000e-01   1.7000000e+00   1.5000000e+00   4.9000000e+00   4.2000000e+00   1.2000000e+00   2.6000000e+00   6.0000000e-01   3.7000000e+00   8.0000000e-01   2.3000000e+00   2.9000000e+00   9.0000000e-01   9.0000000e-01   1.4000000e+00   2.7000000e+00   2.7000000e+00   4.6000000e+00   1.5000000e+00   1.0000000e+00   1.4000000e+00   3.6000000e+00   2.2000000e+00   1.5000000e+00   9.0000000e-01   2.0000000e+00   2.3000000e+00   1.9000000e+00   0.0000000e+00   2.7000000e+00   2.7000000e+00   1.7000000e+00   8.0000000e-01   1.2000000e+00   1.8000000e+00   5.0000000e-01   1.5000000e+00   8.0000000e-01   1.2000000e+00   4.5000000e+00   1.0000000e+00   1.3000000e+00   1.3000000e+00   1.7000000e+00   1.8000000e+00   7.0000000e-01   2.9000000e+00   2.6000000e+00   1.7000000e+00   1.3000000e+00   2.3000000e+00   2.2000000e+00   3.4000000e+00   8.0000000e-01   2.8000000e+00   1.7000000e+00   2.4000000e+00   9.0000000e-01   7.0000000e-01   2.5000000e+00   2.3000000e+00   1.2000000e+00   7.0000000e-01   9.0000000e-01   2.2000000e+00   1.3000000e+00   2.4000000e+00   2.4000000e+00   1.0000000e+00   1.8000000e+00   1.5000000e+00   2.5000000e+00   8.0000000e-01   1.1000000e+00   1.3000000e+00   2.6000000e+00   7.0000000e-01   1.3000000e+00   1.3000000e+00   2.4000000e+00   1.4000000e+00   2.0000000e+00   2.3000000e+00   9.0000000e-01   2.7000000e+00   3.0000000e+00   1.7000000e+00   1.0000000e+00   2.8000000e+00   1.2000000e+00   7.0000000e-01   1.0000000e+00   1.8000000e+00   1.7000000e+00   1.2000000e+00   4.0000000e-01   3.8000000e+00   3.5000000e+00   1.9000000e+00   1.5000000e+00   1.7000000e+00   2.8000000e+00   9.0000000e-01   1.2000000e+00   1.6000000e+00   1.0000000e+00   1.0000000e+00   5.0000000e-01   1.4000000e+00   1.8000000e+00   3.5000000e+00   6.0000000e-01   9.0000000e-01   9.0000000e-01   2.5000000e+00   1.1000000e+00   4.0000000e-01   1.2000000e+00   1.3000000e+00   1.2000000e+00   1.8000000e+00   1.3000000e+00   1.6000000e+00   1.6000000e+00   1.4000000e+00   1.1000000e+00   9.0000000e-01   1.3000000e+00   1.0000000e+00   2.0000000e+00   3.9000000e+00   1.8000000e+00   1.1000000e+00   1.9000000e+00   1.1000000e+00   1.2000000e+00   7.0000000e-01   2.3000000e+00   1.8000000e+00   9.0000000e-01   7.0000000e-01   2.9000000e+00   2.8000000e+00   2.8000000e+00   8.0000000e-01   2.2000000e+00   2.5000000e+00   1.8000000e+00   7.0000000e-01   1.5000000e+00   1.9000000e+00   1.7000000e+00   6.0000000e-01   1.3000000e+00   1.7000000e+00   3.0000000e+00   5.0000000e-01   1.8000000e+00   1.8000000e+00   1.6000000e+00   1.0000000e+00   9.0000000e-01   1.9000000e+00   1.0000000e+00   7.0000000e-01   1.3000000e+00   2.0000000e+00   7.0000000e-01   9.0000000e-01   9.0000000e-01   1.8000000e+00   8.0000000e-01   1.2000000e+00   1.7000000e+00   5.7000000e+00   1.0000000e+00   2.5000000e+00   1.9000000e+00   2.9000000e+00   3.0000000e+00   1.9000000e+00   4.1000000e+00   3.8000000e+00   2.9000000e+00   2.5000000e+00   1.1000000e+00   1.0000000e+00   4.6000000e+00   2.0000000e+00   4.0000000e+00   5.0000000e-01   3.6000000e+00   2.1000000e+00   1.5000000e+00   3.7000000e+00   3.5000000e+00   2.4000000e+00   1.7000000e+00   1.1000000e+00   1.4000000e+00   2.5000000e+00   3.6000000e+00   3.6000000e+00   8.0000000e-01   3.0000000e+00   2.7000000e+00   3.7000000e+00   2.0000000e+00   2.3000000e+00   2.5000000e+00   3.8000000e+00   1.9000000e+00   2.5000000e+00   2.5000000e+00   3.6000000e+00   2.6000000e+00   3.2000000e+00   3.5000000e+00   4.7000000e+00   3.2000000e+00   5.8000000e+00   3.2000000e+00   2.7000000e+00   3.8000000e+00   1.6000000e+00   2.5000000e+00   3.6000000e+00   3.2000000e+00   6.8000000e+00   5.9000000e+00   2.1000000e+00   4.5000000e+00   1.7000000e+00   5.6000000e+00   2.1000000e+00   4.2000000e+00   4.6000000e+00   2.0000000e+00   2.2000000e+00   3.3000000e+00   4.2000000e+00   4.6000000e+00   6.5000000e+00   3.4000000e+00   2.5000000e+00   2.7000000e+00   5.5000000e+00   4.1000000e+00   3.2000000e+00   2.0000000e+00   3.9000000e+00   4.2000000e+00   3.8000000e+00   1.9000000e+00   4.6000000e+00   4.6000000e+00   3.6000000e+00   2.1000000e+00   3.1000000e+00   3.7000000e+00   2.2000000e+00   1.5000000e+00   1.7000000e+00   2.5000000e+00   2.2000000e+00   1.7000000e+00   3.5000000e+00   3.4000000e+00   2.7000000e+00   1.7000000e+00   2.1000000e+00   1.8000000e+00   3.6000000e+00   1.8000000e+00   3.4000000e+00   1.1000000e+00   2.6000000e+00   1.9000000e+00   7.0000000e-01   2.7000000e+00   2.7000000e+00   2.0000000e+00   9.0000000e-01   5.0000000e-01   1.8000000e+00   2.1000000e+00   2.6000000e+00   2.6000000e+00   1.2000000e+00   2.8000000e+00   1.9000000e+00   2.9000000e+00   1.8000000e+00   2.1000000e+00   2.3000000e+00   3.0000000e+00   1.7000000e+00   2.3000000e+00   2.3000000e+00   2.8000000e+00   2.2000000e+00   3.0000000e+00   2.7000000e+00   2.6000000e+00   1.8000000e+00   1.1000000e+00   1.2000000e+00   2.0000000e+00   2.5000000e+00   2.0000000e+00   1.0000000e+00   3.6000000e+00   2.7000000e+00   2.1000000e+00   1.5000000e+00   2.5000000e+00   2.4000000e+00   1.5000000e+00   1.2000000e+00   1.4000000e+00   1.8000000e+00   2.0000000e+00   1.1000000e+00   1.2000000e+00   1.4000000e+00   3.3000000e+00   1.2000000e+00   1.7000000e+00   1.3000000e+00   2.3000000e+00   2.1000000e+00   1.2000000e+00   2.2000000e+00   1.5000000e+00   1.4000000e+00   2.0000000e+00   1.9000000e+00   1.4000000e+00   1.6000000e+00   1.6000000e+00   1.3000000e+00   1.5000000e+00   2.3000000e+00   2.0000000e+00   2.6000000e+00   3.1000000e+00   2.0000000e+00   4.2000000e+00   3.3000000e+00   2.2000000e+00   2.6000000e+00   1.6000000e+00   2.5000000e+00   4.7000000e+00   1.3000000e+00   4.1000000e+00   2.4000000e+00   3.7000000e+00   1.6000000e+00   1.2000000e+00   3.8000000e+00   3.6000000e+00   2.5000000e+00   1.8000000e+00   1.6000000e+00   1.7000000e+00   2.4000000e+00   3.7000000e+00   3.7000000e+00   1.3000000e+00   1.7000000e+00   2.6000000e+00   3.8000000e+00   1.9000000e+00   1.6000000e+00   2.0000000e+00   3.9000000e+00   1.2000000e+00   1.2000000e+00   2.2000000e+00   3.7000000e+00   2.7000000e+00   2.1000000e+00   3.6000000e+00   9.0000000e-01   1.0000000e+00   1.6000000e+00   1.5000000e+00   6.0000000e-01   8.0000000e-01   3.6000000e+00   3.9000000e+00   2.1000000e+00   1.3000000e+00   1.5000000e+00   3.2000000e+00   1.1000000e+00   1.0000000e+00   1.8000000e+00   1.2000000e+00   1.0000000e+00   1.1000000e+00   2.0000000e+00   2.4000000e+00   3.3000000e+00   1.2000000e+00   1.1000000e+00   2.1000000e+00   2.7000000e+00   1.3000000e+00   8.0000000e-01   1.2000000e+00   9.0000000e-01   1.2000000e+00   8.0000000e-01   1.3000000e+00   1.4000000e+00   1.4000000e+00   8.0000000e-01   1.1000000e+00   3.0000000e-01   1.1000000e+00   1.0000000e+00   1.1000000e+00   1.3000000e+00   1.4000000e+00   9.0000000e-01   7.0000000e-01   4.1000000e+00   3.4000000e+00   1.6000000e+00   1.8000000e+00   1.4000000e+00   2.9000000e+00   6.0000000e-01   1.5000000e+00   2.1000000e+00   9.0000000e-01   1.1000000e+00   6.0000000e-01   1.9000000e+00   1.9000000e+00   3.8000000e+00   7.0000000e-01   8.0000000e-01   1.2000000e+00   2.8000000e+00   1.6000000e+00   7.0000000e-01   1.3000000e+00   1.2000000e+00   1.5000000e+00   1.5000000e+00   8.0000000e-01   1.9000000e+00   1.9000000e+00   1.1000000e+00   6.0000000e-01   6.0000000e-01   1.4000000e+00   1.1000000e+00   2.2000000e+00   1.9000000e+00   1.0000000e+00   6.0000000e-01   3.0000000e+00   2.9000000e+00   2.7000000e+00   7.0000000e-01   2.1000000e+00   2.4000000e+00   1.7000000e+00   6.0000000e-01   1.4000000e+00   1.8000000e+00   1.6000000e+00   7.0000000e-01   1.2000000e+00   1.6000000e+00   2.9000000e+00   8.0000000e-01   1.7000000e+00   1.9000000e+00   1.7000000e+00   1.3000000e+00   8.0000000e-01   1.8000000e+00   3.0000000e-01   6.0000000e-01   8.0000000e-01   1.9000000e+00   8.0000000e-01   1.0000000e+00   6.0000000e-01   1.7000000e+00   7.0000000e-01   1.3000000e+00   1.6000000e+00   9.0000000e-01   2.0000000e+00   2.0000000e+00   5.2000000e+00   4.3000000e+00   1.1000000e+00   2.9000000e+00   5.0000000e-01   4.0000000e+00   1.1000000e+00   2.6000000e+00   3.4000000e+00   1.2000000e+00   1.2000000e+00   1.7000000e+00   3.2000000e+00   3.2000000e+00   4.9000000e+00   1.8000000e+00   1.5000000e+00   1.7000000e+00   3.9000000e+00   2.5000000e+00   2.0000000e+00   1.2000000e+00   2.3000000e+00   2.6000000e+00   2.2000000e+00   5.0000000e-01   3.0000000e+00   3.0000000e+00   2.0000000e+00   7.0000000e-01   1.5000000e+00   2.1000000e+00   1.0000000e+00   1.3000000e+00   1.9000000e+00   4.7000000e+00   4.0000000e+00   1.8000000e+00   2.2000000e+00   8.0000000e-01   3.9000000e+00   1.4000000e+00   2.3000000e+00   3.3000000e+00   1.3000000e+00   1.3000000e+00   1.4000000e+00   3.1000000e+00   3.1000000e+00   4.8000000e+00   1.3000000e+00   1.4000000e+00   2.0000000e+00   3.2000000e+00   1.6000000e+00   1.9000000e+00   1.3000000e+00   2.0000000e+00   1.7000000e+00   1.5000000e+00   6.0000000e-01   2.3000000e+00   2.1000000e+00   1.3000000e+00   1.4000000e+00   1.4000000e+00   1.4000000e+00   9.0000000e-01   1.0000000e+00   3.4000000e+00   3.5000000e+00   2.5000000e+00   9.0000000e-01   1.9000000e+00   3.4000000e+00   1.5000000e+00   1.0000000e+00   2.0000000e+00   1.6000000e+00   1.4000000e+00   9.0000000e-01   2.2000000e+00   2.6000000e+00   3.5000000e+00   8.0000000e-01   1.5000000e+00   2.1000000e+00   2.3000000e+00   7.0000000e-01   8.0000000e-01   1.6000000e+00   9.0000000e-01   8.0000000e-01   8.0000000e-01   1.7000000e+00   1.0000000e+00   1.0000000e+00   6.0000000e-01   1.5000000e+00   7.0000000e-01   5.0000000e-01   1.4000000e+00   3.6000000e+00   3.5000000e+00   2.1000000e+00   1.3000000e+00   1.9000000e+00   2.8000000e+00   1.1000000e+00   1.0000000e+00   1.4000000e+00   1.2000000e+00   1.0000000e+00   7.0000000e-01   1.2000000e+00   1.8000000e+00   3.3000000e+00   8.0000000e-01   1.1000000e+00   1.3000000e+00   2.3000000e+00   1.3000000e+00   2.0000000e-01   1.2000000e+00   9.0000000e-01   1.0000000e+00   1.4000000e+00   1.5000000e+00   1.4000000e+00   1.4000000e+00   1.0000000e+00   1.3000000e+00   5.0000000e-01   1.3000000e+00   1.0000000e+00   1.5000000e+00   5.7000000e+00   2.5000000e+00   5.1000000e+00   1.2000000e+00   4.7000000e+00   2.6000000e+00   2.2000000e+00   4.8000000e+00   4.6000000e+00   3.5000000e+00   2.8000000e+00   2.2000000e+00   7.0000000e-01   3.4000000e+00   4.7000000e+00   4.7000000e+00   1.5000000e+00   3.1000000e+00   3.6000000e+00   4.8000000e+00   2.9000000e+00   3.0000000e+00   3.2000000e+00   4.9000000e+00   2.4000000e+00   2.8000000e+00   3.4000000e+00   4.7000000e+00   3.7000000e+00   3.3000000e+00   4.6000000e+00   4.8000000e+00   2.6000000e+00   4.6000000e+00   7.0000000e-01   4.0000000e+00   3.1000000e+00   2.5000000e+00   4.3000000e+00   4.5000000e+00   3.0000000e+00   2.7000000e+00   1.7000000e+00   2.2000000e+00   2.9000000e+00   4.2000000e+00   3.8000000e+00   1.2000000e+00   3.6000000e+00   3.7000000e+00   4.7000000e+00   3.0000000e+00   2.9000000e+00   3.1000000e+00   4.2000000e+00   2.5000000e+00   3.1000000e+00   3.1000000e+00   3.8000000e+00   3.6000000e+00   3.8000000e+00   4.5000000e+00   3.4000000e+00   1.6000000e+00   4.5000000e+00   1.2000000e+00   3.1000000e+00   3.5000000e+00   1.3000000e+00   1.3000000e+00   2.2000000e+00   2.9000000e+00   3.5000000e+00   5.4000000e+00   2.3000000e+00   1.0000000e+00   1.2000000e+00   4.4000000e+00   3.0000000e+00   2.1000000e+00   1.3000000e+00   2.8000000e+00   3.1000000e+00   2.7000000e+00   1.2000000e+00   3.5000000e+00   3.5000000e+00   2.5000000e+00   1.0000000e+00   2.0000000e+00   2.6000000e+00   1.3000000e+00   2.8000000e+00   2.5000000e+00   2.4000000e+00   5.0000000e-01   1.1000000e+00   2.5000000e+00   2.3000000e+00   1.2000000e+00   1.3000000e+00   1.7000000e+00   2.6000000e+00   1.1000000e+00   2.4000000e+00   2.4000000e+00   1.4000000e+00   1.0000000e+00   1.3000000e+00   2.5000000e+00   6.0000000e-01   5.0000000e-01   7.0000000e-01   2.6000000e+00   3.0000000e-01   5.0000000e-01   9.0000000e-01   2.4000000e+00   1.4000000e+00   1.2000000e+00   2.3000000e+00   3.9000000e+00   1.0000000e+00   2.5000000e+00   3.3000000e+00   9.0000000e-01   9.0000000e-01   1.6000000e+00   3.1000000e+00   3.1000000e+00   4.8000000e+00   1.7000000e+00   1.4000000e+00   2.0000000e+00   3.8000000e+00   2.4000000e+00   1.9000000e+00   9.0000000e-01   2.2000000e+00   2.5000000e+00   2.1000000e+00   6.0000000e-01   2.9000000e+00   2.9000000e+00   1.9000000e+00   1.2000000e+00   1.4000000e+00   2.0000000e+00   9.0000000e-01   3.5000000e+00   2.6000000e+00   1.8000000e+00   3.6000000e+00   3.8000000e+00   2.5000000e+00   2.0000000e+00   1.0000000e+00   1.5000000e+00   2.6000000e+00   3.5000000e+00   3.5000000e+00   1.1000000e+00   3.5000000e+00   3.0000000e+00   4.0000000e+00   2.5000000e+00   2.8000000e+00   3.0000000e+00   3.7000000e+00   2.4000000e+00   3.0000000e+00   3.0000000e+00   3.5000000e+00   2.9000000e+00   3.7000000e+00   3.8000000e+00   2.1000000e+00   2.5000000e+00   3.0000000e-01   5.0000000e-01   1.2000000e+00   2.3000000e+00   2.5000000e+00   4.4000000e+00   1.3000000e+00   6.0000000e-01   1.4000000e+00   3.4000000e+00   2.0000000e+00   1.1000000e+00   7.0000000e-01   1.8000000e+00   2.1000000e+00   1.7000000e+00   8.0000000e-01   2.5000000e+00   2.5000000e+00   1.5000000e+00   4.0000000e-01   1.0000000e+00   1.8000000e+00   9.0000000e-01   1.2000000e+00   2.2000000e+00   2.0000000e+00   9.0000000e-01   1.4000000e+00   1.8000000e+00   2.5000000e+00   1.0000000e+00   2.1000000e+00   2.1000000e+00   1.9000000e+00   9.0000000e-01   1.0000000e+00   2.2000000e+00   7.0000000e-01   6.0000000e-01   1.2000000e+00   2.3000000e+00   6.0000000e-01   4.0000000e-01   1.0000000e+00   2.1000000e+00   1.1000000e+00   1.1000000e+00   2.0000000e+00   2.6000000e+00   2.4000000e+00   1.9000000e+00   6.0000000e-01   8.0000000e-01   1.9000000e+00   2.0000000e+00   2.5000000e+00   2.5000000e+00   1.3000000e+00   2.1000000e+00   1.4000000e+00   2.6000000e+00   1.3000000e+00   1.6000000e+00   1.8000000e+00   2.9000000e+00   1.0000000e+00   1.6000000e+00   2.0000000e+00   2.7000000e+00   1.9000000e+00   2.3000000e+00   2.4000000e+00   4.0000000e-01   1.3000000e+00   2.4000000e+00   2.6000000e+00   4.5000000e+00   1.4000000e+00   7.0000000e-01   1.5000000e+00   3.5000000e+00   2.1000000e+00   1.2000000e+00   4.0000000e-01   1.9000000e+00   2.2000000e+00   1.8000000e+00   9.0000000e-01   2.6000000e+00   2.6000000e+00   1.6000000e+00   7.0000000e-01   1.1000000e+00   1.7000000e+00   8.0000000e-01   1.5000000e+00   2.2000000e+00   2.8000000e+00   4.3000000e+00   1.6000000e+00   9.0000000e-01   1.5000000e+00   3.3000000e+00   1.9000000e+00   1.0000000e+00   2.0000000e-01   1.7000000e+00   2.0000000e+00   1.6000000e+00   9.0000000e-01   2.4000000e+00   2.4000000e+00   1.4000000e+00   9.0000000e-01   9.0000000e-01   1.5000000e+00   4.0000000e-01   1.7000000e+00   1.7000000e+00   3.4000000e+00   1.0000000e-01   1.2000000e+00   1.2000000e+00   2.2000000e+00   1.0000000e+00   7.0000000e-01   1.7000000e+00   1.0000000e+00   9.0000000e-01   1.5000000e+00   1.4000000e+00   1.3000000e+00   1.3000000e+00   1.1000000e+00   1.2000000e+00   8.0000000e-01   1.2000000e+00   1.5000000e+00   1.0000000e+00   2.5000000e+00   1.8000000e+00   1.9000000e+00   1.9000000e+00   1.5000000e+00   2.3000000e+00   1.4000000e+00   2.4000000e+00   1.3000000e+00   1.6000000e+00   1.8000000e+00   2.7000000e+00   1.4000000e+00   1.8000000e+00   1.8000000e+00   2.5000000e+00   1.7000000e+00   2.5000000e+00   2.2000000e+00   1.9000000e+00   1.8000000e+00   2.5000000e+00   2.5000000e+00   9.0000000e-01   2.7000000e+00   2.0000000e+00   3.0000000e+00   1.7000000e+00   2.0000000e+00   2.2000000e+00   2.7000000e+00   1.6000000e+00   2.2000000e+00   2.2000000e+00   2.5000000e+00   2.1000000e+00   2.9000000e+00   2.8000000e+00   3.5000000e+00   4.4000000e+00   4.4000000e+00   1.6000000e+00   3.2000000e+00   3.3000000e+00   4.5000000e+00   2.8000000e+00   3.1000000e+00   3.3000000e+00   4.6000000e+00   2.5000000e+00   2.9000000e+00   3.5000000e+00   4.4000000e+00   3.4000000e+00   3.4000000e+00   4.3000000e+00   1.3000000e+00   1.3000000e+00   2.1000000e+00   9.0000000e-01   8.0000000e-01   1.8000000e+00   1.1000000e+00   8.0000000e-01   1.4000000e+00   1.5000000e+00   1.2000000e+00   1.2000000e+00   1.0000000e+00   1.3000000e+00   9.0000000e-01   1.1000000e+00   1.6000000e+00   1.0000000e+00   3.4000000e+00   2.0000000e+00   1.1000000e+00   1.1000000e+00   1.8000000e+00   2.1000000e+00   1.7000000e+00   1.0000000e+00   2.5000000e+00   2.5000000e+00   1.5000000e+00   8.0000000e-01   1.0000000e+00   1.8000000e+00   9.0000000e-01   3.4000000e+00   2.0000000e+00   1.3000000e+00   1.7000000e+00   2.2000000e+00   2.1000000e+00   2.7000000e+00   1.4000000e+00   2.5000000e+00   2.5000000e+00   2.3000000e+00   1.4000000e+00   1.8000000e+00   2.0000000e+00   1.5000000e+00   2.4000000e+00   2.5000000e+00   3.5000000e+00   1.8000000e+00   1.7000000e+00   1.9000000e+00   3.6000000e+00   1.3000000e+00   1.9000000e+00   1.9000000e+00   3.4000000e+00   2.4000000e+00   2.6000000e+00   3.3000000e+00   1.1000000e+00   2.1000000e+00   1.4000000e+00   7.0000000e-01   1.5000000e+00   2.2000000e+00   1.1000000e+00   7.0000000e-01   1.3000000e+00   2.0000000e+00   1.4000000e+00   4.0000000e-01   1.9000000e+00   1.2000000e+00   9.0000000e-01   1.0000000e+00   1.4000000e+00   1.5000000e+00   1.4000000e+00   1.4000000e+00   1.2000000e+00   1.3000000e+00   7.0000000e-01   1.1000000e+00   1.0000000e+00   1.9000000e+00   2.2000000e+00   1.8000000e+00   9.0000000e-01   2.6000000e+00   2.6000000e+00   1.6000000e+00   1.1000000e+00   1.1000000e+00   1.7000000e+00   4.0000000e-01   7.0000000e-01   5.0000000e-01   2.0000000e+00   9.0000000e-01   1.1000000e+00   7.0000000e-01   1.8000000e+00   8.0000000e-01   1.2000000e+00   1.7000000e+00   8.0000000e-01   2.3000000e+00   6.0000000e-01   4.0000000e-01   6.0000000e-01   2.1000000e+00   1.1000000e+00   1.1000000e+00   2.0000000e+00   1.9000000e+00   1.0000000e+00   1.2000000e+00   4.0000000e-01   1.7000000e+00   9.0000000e-01   1.3000000e+00   1.6000000e+00   2.7000000e+00   2.7000000e+00   1.7000000e+00   8.0000000e-01   1.2000000e+00   1.8000000e+00   5.0000000e-01   6.0000000e-01   1.0000000e+00   2.5000000e+00   1.5000000e+00   1.3000000e+00   2.4000000e+00   1.0000000e+00   2.5000000e+00   1.5000000e+00   1.1000000e+00   2.4000000e+00   1.5000000e+00   5.0000000e-01   1.1000000e+00   1.4000000e+00   1.0000000e+00   1.8000000e+00   1.1000000e+00   1.2000000e+00   9.0000000e-01   1.5000000e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8fb22e62200894f9693010ebf45fb23751f4e3a6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cityblock-ml.txt
@@ -0,0 +1 @@
+   3.2420590e+01   3.3246607e+01   3.0526910e+01   3.5166573e+01   3.1868301e+01   3.6025002e+01   3.2513623e+01   3.6557796e+01   3.3752212e+01   3.4422130e+01   3.2526018e+01   3.2581161e+01   3.3743555e+01   3.6960777e+01   3.4225270e+01   3.2965308e+01   3.4591031e+01   3.4204203e+01   3.4678123e+01   3.5728720e+01   3.0830047e+01   3.1550681e+01   3.3304790e+01   3.2676753e+01   3.2742330e+01   3.1684556e+01   3.2830915e+01   3.2956614e+01   2.7365639e+01   3.3207307e+01   3.3420925e+01   3.4357941e+01   2.8280126e+01   3.4523458e+01   3.2705274e+01   3.2455891e+01   3.1636060e+01   3.1594957e+01   3.1805202e+01   3.3886574e+01   3.3438829e+01   3.3330030e+01   3.4168514e+01   3.0637353e+01   4.2149167e+01   3.6340559e+01   2.9315308e+01   3.5778314e+01   3.7693050e+01   3.2598714e+01   3.2990836e+01   3.4967659e+01   3.9748920e+01   3.6745043e+01   2.7117550e+01   3.6014760e+01   2.9367558e+01   3.3845350e+01   3.5477339e+01   3.1513372e+01   3.2517953e+01   2.4755097e+01   3.0229897e+01   3.4799343e+01   3.3371710e+01   2.9600910e+01   3.3275088e+01   3.3567110e+01   3.4527016e+01   3.4942320e+01   3.2359383e+01   3.2607100e+01   3.1467914e+01   2.9032039e+01   3.3122878e+01   2.8496709e+01   2.9908448e+01   2.9962886e+01   3.0345299e+01   3.1737613e+01   2.8551485e+01   3.2610551e+01   3.3082660e+01   3.3719298e+01   3.6434018e+01   3.6589278e+01   3.3889586e+01   3.8036774e+01   3.1483497e+01   3.4196794e+01   3.5154035e+01   3.5488608e+01   3.6143183e+01   3.3473491e+01   3.4686446e+01   2.8687495e+01   3.5725742e+01   3.0188298e+01   3.3084534e+01   3.3538519e+01   3.6226849e+01   2.9052099e+01   3.6032733e+01   3.0811503e+01   3.2616190e+01   3.3888566e+01   3.3074570e+01   2.9683515e+01   3.0600771e+01   3.4345247e+01   3.6983843e+01   3.3692824e+01   3.3762461e+01   3.4024582e+01   3.3698854e+01   3.1238613e+01   3.4978833e+01   3.4991078e+01   3.4577741e+01   3.3749227e+01   3.4982272e+01   3.0487868e+01   3.2317632e+01   3.1125588e+01   3.4413791e+01   3.1881871e+01   3.1373821e+01   3.0416864e+01   3.2066187e+01   3.1128313e+01   3.0240249e+01   3.0125198e+01   3.1343454e+01   3.5479092e+01   3.4450767e+01   3.2953507e+01   3.4456795e+01   3.0136375e+01   3.3462150e+01   2.9894274e+01   3.1367432e+01   3.2839320e+01   3.1440398e+01   2.9400374e+01   3.1106338e+01   3.1242624e+01   3.5537892e+01   3.3056459e+01   2.8610281e+01   3.4296217e+01   3.5819772e+01   3.2503922e+01   3.0963029e+01   3.4762112e+01   3.4796284e+01   2.9645345e+01   3.4468088e+01   2.6975590e+01   3.3738555e+01   2.8825009e+01   3.2663999e+01   3.2547878e+01   3.2308091e+01   3.2489966e+01   3.0868597e+01   3.2974220e+01   3.0866111e+01   3.8197342e+01   3.0609568e+01   3.5478978e+01   2.9249184e+01   3.6185622e+01   3.1948258e+01   3.2649719e+01   3.3305650e+01   3.4643955e+01   3.6566241e+01   3.4968484e+01   3.2632218e+01   3.6741383e+01   3.5700008e+01   3.1962468e+01   3.1410623e+01   3.0412061e+01   3.3749077e+01   3.5649661e+01   3.7649263e+01   3.2832574e+01   3.1783914e+01   2.8264292e+01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f297500381fe33428e6725ea3b10ab6191a46fa3
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml-iris.txt
@@ -0,0 +1 @@
+   4.0013388e-03   2.6088954e-05   1.8315482e-03   6.5266850e-04   4.1394685e-04   1.1888069e-03   4.6185289e-04   1.9233577e-03   3.4480388e-03   1.5150632e-05   1.9126718e-03   3.0974734e-03   2.2295833e-04   2.4043394e-03   5.0134320e-03   3.0165570e-03   1.3145239e-04   6.0759419e-04   1.6672981e-03   4.0036132e-03   6.1375191e-04   8.5916540e-03   3.0212269e-03   8.6923503e-03   7.7875235e-03   5.1612907e-04   2.9662451e-04   6.2402983e-04   2.7278440e-03   4.0510347e-03   3.0027154e-03   6.2616145e-03   4.1342211e-03   3.4480388e-03   1.5822510e-03   1.7143312e-03   3.4480388e-03   2.2462074e-04   6.1048465e-04   6.5190641e-04   2.4247873e-02   9.0785596e-04   2.1652052e-04   3.4845573e-03   3.2507646e-03   2.3346511e-03   4.0773355e-04   1.1278223e-04   5.0819669e-04   2.1340893e-01   2.1253858e-01   2.5193073e-01   2.9479565e-01   2.6774348e-01   2.8869785e-01   2.3348217e-01   1.9273490e-01   2.4443270e-01   2.4320510e-01   2.7679421e-01   2.1672263e-01   2.6813840e-01   2.8435705e-01   1.5561363e-01   2.0057173e-01   2.7812139e-01   2.2900256e-01   3.4724680e-01   2.3882260e-01   2.9132931e-01   2.0333645e-01   3.5307051e-01   2.8812452e-01   2.1722530e-01   2.1423111e-01   2.7396952e-01   2.9207940e-01   2.6626182e-01   1.7106032e-01   2.4279706e-01   2.2559055e-01   2.0940857e-01   3.8432412e-01   2.9354670e-01   2.0829958e-01   2.3669414e-01   3.0463326e-01   2.1035851e-01   2.6623117e-01   3.0835417e-01   2.5871089e-01   2.3465249e-01   2.0319416e-01   2.6292582e-01   2.1771735e-01   2.3212816e-01   2.2399387e-01   1.3799316e-01   2.3049526e-01   4.8512087e-01   4.2535066e-01   4.0184471e-01   4.1903049e-01   4.4627199e-01   4.4692268e-01   4.3569888e-01   4.2673251e-01   4.5731950e-01   3.7438176e-01   3.0619251e-01   4.0039114e-01   3.7245195e-01   4.5829878e-01   4.5814844e-01   3.6107062e-01   3.7600936e-01   3.7662883e-01   5.2492832e-01   4.2684428e-01   3.7975064e-01   4.0636707e-01   4.6364339e-01   3.4607190e-01   3.6988036e-01   3.6764668e-01   3.2524634e-01   3.1943549e-01   4.4481193e-01   3.5496498e-01   4.1356534e-01   3.2082320e-01   4.5322964e-01   3.4300770e-01   4.4485158e-01   3.9755578e-01   3.9702418e-01   3.7202285e-01   3.1131344e-01   3.4018064e-01   4.0217537e-01   3.1441868e-01   4.2535066e-01   4.1533176e-01   3.9695242e-01   3.5313531e-01   3.9400199e-01   3.4652657e-01   3.6608320e-01   3.6684161e-01   3.3929143e-03   2.6033698e-03   7.7673212e-03   6.4081099e-03   9.2794464e-03   2.8819447e-03   1.4536586e-03   9.6714455e-04   3.7992387e-03   5.9342609e-03   3.9974031e-04   6.0694735e-03   9.1304628e-03   1.7655983e-02   1.1643899e-02   4.0363794e-03   1.6463709e-03   1.0706739e-02   6.7984475e-04   7.6845878e-03   2.3516587e-02   9.9502337e-05   1.0315881e-02   1.0821735e-03   1.8887942e-03   2.4624674e-03   1.5760536e-03   3.6638868e-03   1.6253664e-03   7.8762517e-04   1.9487010e-02   1.6211862e-02   9.6714455e-04   2.2382105e-03   2.1712385e-03   9.6714455e-04   2.9674185e-03   1.9068589e-03   6.4555509e-03   8.8254342e-03   8.1777355e-03   3.4663084e-03   9.6481454e-03   9.7747764e-05   1.0706793e-02   4.2246850e-03   4.9836128e-03   1.6613867e-03   1.6856078e-01   1.6930583e-01   2.0381801e-01   2.4171317e-01   2.1689289e-01   2.4212069e-01   1.9027913e-01   1.5127382e-01   1.9696970e-01   1.9830901e-01   2.2503195e-01   1.7290786e-01   2.1618942e-01   2.3648275e-01   1.1720113e-01   1.5636322e-01   2.3357633e-01   1.8548772e-01   2.8791738e-01   1.9215793e-01   2.4470933e-01   1.5850128e-01   2.9662484e-01   2.4061109e-01   1.7172858e-01   1.6853658e-01   2.2283143e-01   2.4032537e-01   2.1849821e-01   1.2975740e-01   1.9502432e-01   1.7953012e-01   1.6504306e-01   3.2966120e-01   2.4985160e-01   1.6946778e-01   1.8991741e-01   2.4919698e-01   1.7046257e-01   2.1691882e-01   2.6018338e-01   2.1310883e-01   1.8776864e-01   1.5909082e-01   2.1620321e-01   1.7782256e-01   1.8911127e-01   1.7894094e-01   9.9649433e-02   1.8605378e-01   4.2702260e-01   3.6742642e-01   3.4284735e-01   3.6351462e-01   3.8703088e-01   3.8643219e-01   3.8033312e-01   3.6849688e-01   3.9561383e-01   3.1894438e-01   2.5437467e-01   3.4129756e-01   3.1464030e-01   3.9617829e-01   3.9513061e-01   3.0506617e-01   3.2181902e-01   3.2465822e-01   4.5849285e-01   3.6615509e-01   3.2201598e-01   3.4969244e-01   4.0175045e-01   2.8934891e-01   3.1614551e-01   3.1385643e-01   2.7059114e-01   2.6798818e-01   3.8429703e-01   3.0087709e-01   3.5349775e-01   2.7097983e-01   3.9156246e-01   2.9045741e-01   3.8972428e-01   3.3603762e-01   3.4254663e-01   3.1960575e-01   2.6050327e-01   2.8406500e-01   3.4225008e-01   2.5735736e-01   3.6742642e-01   3.5724408e-01   3.3861338e-01   2.9412113e-01   3.3288556e-01   2.9101723e-01   3.1374321e-01   3.1516519e-01   1.6665208e-03   9.3886805e-04   6.2270349e-04   1.5623211e-03   3.9549141e-04   1.6439076e-03   3.0144044e-03   3.0583810e-05   2.0234943e-03   2.6246966e-03   3.8983492e-04   2.5645160e-03   5.6944285e-03   3.3339055e-03   1.2831328e-04   4.1302346e-04   2.1101667e-03   3.4972086e-03   8.7482704e-04   9.4271115e-03   2.5080125e-03   8.7042936e-03   7.0125369e-03   3.5088415e-04   1.9451019e-04   3.9574419e-04   2.5986219e-03   3.6402032e-03   2.4900748e-03   7.0784673e-03   4.7935149e-03   3.0144044e-03   1.2869381e-03   1.4017897e-03   3.0144044e-03   1.7197161e-04   4.4525534e-04   7.8138074e-04   2.2693053e-02   1.2229281e-03   1.5754704e-04   3.7899670e-03   2.6957902e-03   2.7721274e-03   4.5733371e-04   2.2324575e-04   3.1003560e-04   2.1002397e-01   2.0931874e-01   2.4834042e-01   2.9081912e-01   2.6391644e-01   2.8536997e-01   2.3033428e-01   1.8962461e-01   2.4088505e-01   2.3991724e-01   2.7290008e-01   2.1345771e-01   2.6419304e-01   2.8088883e-01   1.5266518e-01   1.9720348e-01   2.7496549e-01   2.2580939e-01   3.4275207e-01   2.3533918e-01   2.8800391e-01   1.9991219e-01   3.4890690e-01   2.8470246e-01   2.1378625e-01   2.1075909e-01   2.7013290e-01   2.8823552e-01   2.6275308e-01   1.6787442e-01   2.3921107e-01   2.2212337e-01   2.0605918e-01   3.8041788e-01   2.9051019e-01   2.0550537e-01   2.3319159e-01   3.0043218e-01   2.0746652e-01   2.6256228e-01   3.0491843e-01   2.5539836e-01   2.3113139e-01   1.9984797e-01   2.5951290e-01   2.1484809e-01   2.2899468e-01   2.2062653e-01   1.3495710e-01   2.2721304e-01   4.8106467e-01   4.2120214e-01   3.9753504e-01   4.1511036e-01   4.4203186e-01   4.4255637e-01   4.3182495e-01   4.2255527e-01   4.5284888e-01   3.7037516e-01   3.0238339e-01   3.9606802e-01   3.6819494e-01   4.5378706e-01   4.5354234e-01   3.5697379e-01   3.7213234e-01   3.7297305e-01   5.2009409e-01   4.2241474e-01   3.7552000e-01   4.0230555e-01   4.5916611e-01   3.4185974e-01   3.6603540e-01   3.6379117e-01   3.2119479e-01   3.1570003e-01   4.4043880e-01   3.5104995e-01   4.0917086e-01   3.1725229e-01   4.4875464e-01   3.3921954e-01   4.4101743e-01   3.9296628e-01   3.9316311e-01   3.6831351e-01   3.0762140e-01   3.3601664e-01   3.9776902e-01   3.1006892e-01   4.2120214e-01   4.1114584e-01   3.9269988e-01   3.4869458e-01   3.8944692e-01   3.4244384e-01   3.6236872e-01   3.6319420e-01   3.2811792e-03   2.1674206e-03   3.8606330e-03   4.5444049e-04   1.6669051e-04   6.9315236e-04   1.5191179e-03   7.4896915e-04   1.0486334e-03   3.0115188e-03   8.3553530e-03   1.1528814e-02   9.5172421e-03   2.7099731e-03   7.1677618e-04   4.9455548e-03   1.1260396e-03   4.0113810e-03   1.7041109e-02   1.7048436e-03   3.2998306e-03   3.5839458e-03   6.5708756e-04   7.5073414e-04   1.6739794e-03   1.4404874e-04   6.5489426e-04   3.9918560e-03   9.7678136e-03   9.5698494e-03   6.9315236e-04   4.1051921e-03   4.2098821e-03   6.9315236e-04   7.7852178e-04   5.0066998e-04   4.6641147e-03   1.9877450e-02   2.9999880e-03   2.6696154e-03   2.3124511e-03   2.6940762e-03   3.6188953e-03   7.8131154e-04   1.7395433e-03   1.1236329e-03   1.8068407e-01   1.7911784e-01   2.1632614e-01   2.5732132e-01   2.3189913e-01   2.4898678e-01   1.9775994e-01   1.6095697e-01   2.0933838e-01   2.0710048e-01   2.4048237e-01   1.8306865e-01   2.3298507e-01   2.4543409e-01   1.2760114e-01   1.6921167e-01   2.3873595e-01   1.9385405e-01   3.0859675e-01   2.0396213e-01   2.5141439e-01   1.7197884e-01   3.1193260e-01   2.4875015e-01   1.8437187e-01   1.8189435e-01   2.3759181e-01   2.5412614e-01   2.2898904e-01   1.4232827e-01   2.0806035e-01   1.9199138e-01   1.7693745e-01   3.4002004e-01   2.5277786e-01   1.7384453e-01   2.0213849e-01   2.6767804e-01   1.7597754e-01   2.2968366e-01   2.6752309e-01   2.2134041e-01   2.0039734e-01   1.7140536e-01   2.2556075e-01   1.8258974e-01   1.9648053e-01   1.9006393e-01   1.1321036e-01   1.9554999e-01   4.3600761e-01   3.7954719e-01   3.5812457e-01   3.7278397e-01   3.9968201e-01   4.0081518e-01   3.8843945e-01   3.8096257e-01   4.1111272e-01   3.3107441e-01   2.6691137e-01   3.5682832e-01   3.3041468e-01   4.1223120e-01   4.1255773e-01   3.1903974e-01   3.3211211e-01   3.3199965e-01   4.7707633e-01   3.8217339e-01   3.3708398e-01   3.6131644e-01   4.1712805e-01   3.0571403e-01   3.2625308e-01   3.2419755e-01   2.8563873e-01   2.7883266e-01   3.9884997e-01   3.1256889e-01   3.6952768e-01   2.7953122e-01   4.0726631e-01   3.0093515e-01   3.9702583e-01   3.5566883e-01   3.5181973e-01   3.2782384e-01   2.7114516e-01   3.0000941e-01   3.5891976e-01   2.7762255e-01   3.7954719e-01   3.7024637e-01   3.5327118e-01   3.1362016e-01   3.5214869e-01   3.0546169e-01   3.2226324e-01   3.2277503e-01   1.1668032e-04   8.6044327e-05   1.4968429e-03   3.9691382e-03   6.2388252e-03   7.0588028e-04   1.9691519e-03   6.1279520e-03   1.9660913e-04   2.5761274e-03   2.5168387e-03   2.4029967e-03   9.7429318e-04   2.3122381e-03   2.3682626e-04   7.1643085e-03   1.3128642e-04   5.3939078e-03   6.2992904e-03   9.0353935e-03   1.2266741e-02   2.0706893e-03   1.5408774e-03   2.5522607e-03   3.9522692e-03   6.6899152e-03   6.3980861e-03   2.9039306e-03   1.6942568e-03   6.2388252e-03   3.9336207e-03   4.1533642e-03   6.2388252e-03   1.2180733e-03   2.1518176e-03   8.8270219e-04   3.2743785e-02   7.7572782e-05   1.3417853e-03   2.5322339e-03   6.7844678e-03   8.2761566e-04   8.6236157e-04   3.1792685e-04   2.2579028e-03   2.2976852e-01   2.2800773e-01   2.6917639e-01   3.1391346e-01   2.8619117e-01   3.0434544e-01   2.4844431e-01   2.0773635e-01   2.6148944e-01   2.5886513e-01   2.9555853e-01   2.3241008e-01   2.8723433e-01   3.0077518e-01   1.6999944e-01   2.1692490e-01   2.9290302e-01   2.4423212e-01   3.6894940e-01   2.5556289e-01   3.0695160e-01   2.1997775e-01   3.7292526e-01   3.0427758e-01   2.3385552e-01   2.3106102e-01   2.9243468e-01   3.1048744e-01   2.8298832e-01   1.8662712e-01   2.6007204e-01   2.4232174e-01   2.2560003e-01   4.0265980e-01   3.0762748e-01   2.2151447e-01   2.5355085e-01   3.2493368e-01   2.2408199e-01   2.8382455e-01   3.2448802e-01   2.7442187e-01   2.5162228e-01   2.1940897e-01   2.7915380e-01   2.3127910e-01   2.4702051e-01   2.4019206e-01   1.5301315e-01   2.4619533e-01   5.0391216e-01   4.4483392e-01   4.2228707e-01   4.3731273e-01   4.6617394e-01   4.6750253e-01   4.5367757e-01   4.4636521e-01   4.7842690e-01   3.9329580e-01   3.2434154e-01   4.2091234e-01   3.9272980e-01   4.7962551e-01   4.7998875e-01   3.8052757e-01   3.9422077e-01   3.9365636e-01   5.4778535e-01   4.4784024e-01   3.9985415e-01   4.2545240e-01   4.8476479e-01   3.6622351e-01   3.8794414e-01   3.8577592e-01   3.4462011e-01   3.3712507e-01   4.6543611e-01   3.7346604e-01   4.3442200e-01   3.3762412e-01   4.7437523e-01   3.6087712e-01   4.6258851e-01   4.1954525e-01   4.1507031e-01   3.8935328e-01   3.2880662e-01   3.6009673e-01   4.2314218e-01   3.3549029e-01   4.4483392e-01   4.3505302e-01   4.1710447e-01   3.7450914e-01   4.1581746e-01   3.6597096e-01   3.8346411e-01   3.8386195e-01   2.7739415e-04   8.2117467e-04   2.7843462e-03   4.7394226e-03   3.9365385e-04   1.1964598e-03   4.7400628e-03   2.5527396e-04   3.2634446e-03   3.7103657e-03   3.3188195e-03   8.6302611e-04   1.5635411e-03   6.0189508e-04   5.5859876e-03   3.8282951e-04   7.0925635e-03   5.0273924e-03   7.3470160e-03   1.0223636e-02   1.3503463e-03   9.3049535e-04   1.9663208e-03   2.7155903e-03   5.0798223e-03   5.5875952e-03   3.5987384e-03   2.6550151e-03   4.7394226e-03   3.5923878e-03   3.7937786e-03   4.7394226e-03   6.6480476e-04   1.3814035e-03   1.1581699e-03   3.0091048e-02   1.0888067e-04   1.1634967e-03   1.9052023e-03   5.6332034e-03   7.9034466e-04   3.5005887e-04   1.0179107e-04   1.6076683e-03   2.2018795e-01   2.1841167e-01   2.5888963e-01   3.0298911e-01   2.7568827e-01   2.9345793e-01   2.3845526e-01   1.9853879e-01   2.5133209e-01   2.4870042e-01   2.8491736e-01   2.2273608e-01   2.7678086e-01   2.8993699e-01   1.6165333e-01   2.0762176e-01   2.8220337e-01   2.3432093e-01   3.5743296e-01   2.4549712e-01   2.9602684e-01   2.1063470e-01   3.6116406e-01   2.9338620e-01   2.2421094e-01   2.2149308e-01   2.8182182e-01   2.9956540e-01   2.7243830e-01   1.7796817e-01   2.4995634e-01   2.3251210e-01   2.1609445e-01   3.9047864e-01   2.9675065e-01   2.1202908e-01   2.4353030e-01   3.1395037e-01   2.1453916e-01   2.7329907e-01   3.1330772e-01   2.6399518e-01   2.4164659e-01   2.1003834e-01   2.6865531e-01   2.2160867e-01   2.3705638e-01   2.3039039e-01   1.4523591e-01   2.3625874e-01   4.9071957e-01   4.3219633e-01   4.0993016e-01   4.2475440e-01   4.5332327e-01   4.5465382e-01   4.4096188e-01   4.3371359e-01   4.6548638e-01   3.8123224e-01   3.1318896e-01   4.0857587e-01   3.8073064e-01   4.6668253e-01   4.6707002e-01   3.6864305e-01   3.8213773e-01   3.8159377e-01   5.3428461e-01   4.3521869e-01   3.8775353e-01   4.1301893e-01   4.7176152e-01   3.5457739e-01   3.7593537e-01   3.7379344e-01   3.3323181e-01   3.2577190e-01   4.5261005e-01   3.6164142e-01   4.2194514e-01   3.2625778e-01   4.6147754e-01   3.4920516e-01   4.4979521e-01   4.0734174e-01   4.0275102e-01   3.7733353e-01   3.1756791e-01   3.4852048e-01   4.1080565e-01   3.2443308e-01   4.3219633e-01   4.2252463e-01   4.0479526e-01   3.6286403e-01   4.0364435e-01   3.5428112e-01   3.7151258e-01   3.7191203e-01   2.0478784e-03   4.7860280e-03   7.2727783e-03   1.2329906e-03   2.0550268e-03   7.3066158e-03   5.3810576e-04   3.2245377e-03   2.1674888e-03   2.7856851e-03   1.6387773e-03   3.1323423e-03   6.7307381e-05   8.3332066e-03   3.3954200e-04   4.9119026e-03   7.6276175e-03   8.9240504e-03   1.3851706e-02   2.8347122e-03   2.2069601e-03   3.5278340e-03   4.3892066e-03   7.6179982e-03   7.9398397e-03   2.0003115e-03   1.2885024e-03   7.2727783e-03   5.1809110e-03   5.4327573e-03   7.2727783e-03   1.7938257e-03   2.8924302e-03   1.4132511e-03   3.5877316e-02   5.5425651e-05   2.1070391e-03   2.2246722e-03   8.2675293e-03   4.8309816e-04   1.2152730e-03   6.6498554e-04   3.1323983e-03   2.3387083e-01   2.3171300e-01   2.7340823e-01   3.1873143e-01   2.9087099e-01   3.0765106e-01   2.5178166e-01   2.1138210e-01   2.6568600e-01   2.6244481e-01   3.0032621e-01   2.3618270e-01   2.9221666e-01   3.0443867e-01   1.7368514e-01   2.2112593e-01   2.9589691e-01   2.4771596e-01   3.7467992e-01   2.5965416e-01   3.1023215e-01   2.2429067e-01   3.7775475e-01   3.0780450e-01   2.3805322e-01   2.3537447e-01   2.9708156e-01   3.1499475e-01   2.8689460e-01   1.9071775e-01   2.6437980e-01   2.4650321e-01   2.2965596e-01   4.0666307e-01   3.1024566e-01   2.2426781e-01   2.5770992e-01   3.3024819e-01   2.2703835e-01   2.8812097e-01   3.2789845e-01   2.7792695e-01   2.5584753e-01   2.2352457e-01   2.8285984e-01   2.3411709e-01   2.5033634e-01   2.4414228e-01   1.5718330e-01   2.4987685e-01   5.0772777e-01   4.4916856e-01   4.2715006e-01   4.4114868e-01   4.7061118e-01   4.7223859e-01   4.5731921e-01   4.5076024e-01   4.8335950e-01   3.9759816e-01   3.2864932e-01   4.2581769e-01   3.9765561e-01   4.8465345e-01   4.8525127e-01   3.8513607e-01   3.9820652e-01   3.9712803e-01   5.5326906e-01   4.5284577e-01   4.0466523e-01   4.2968979e-01   4.8967945e-01   3.7122633e-01   3.9189300e-01   3.8976354e-01   3.4937792e-01   3.4115590e-01   4.7020033e-01   3.7767688e-01   4.3942138e-01   3.4125876e-01   4.7934102e-01   3.6486747e-01   4.6609349e-01   4.2514437e-01   4.1889348e-01   3.9297481e-01   3.3279384e-01   3.6502235e-01   4.2824304e-01   3.4111505e-01   4.4916856e-01   4.3953404e-01   4.2185806e-01   3.8004789e-01   4.2135185e-01   3.7064704e-01   3.8713375e-01   3.8737322e-01   5.9378937e-04   1.6263483e-03   3.1194349e-04   8.5089275e-04   1.6365846e-03   1.1579874e-03   4.9430863e-03   7.7957878e-03   5.8209267e-03   9.7423596e-04   2.1559031e-04   2.8280232e-03   2.1261057e-03   1.8496545e-03   1.2342594e-02   1.9347552e-03   5.4995961e-03   5.2624400e-03   1.3773080e-04   7.1496401e-05   7.1145768e-04   9.6706058e-04   1.9028496e-03   3.0842001e-03   7.5087003e-03   6.3709632e-03   1.6263483e-03   2.4219636e-03   2.5416684e-03   1.6263483e-03   4.5881830e-05   1.0508341e-04   2.2101780e-03   2.1711060e-02   1.4779987e-03   1.0004664e-03   2.4029906e-03   2.5527616e-03   2.4859397e-03   1.2918144e-04   4.6388898e-04   3.7292268e-04   1.9674800e-01   1.9551090e-01   2.3384591e-01   2.7581575e-01   2.4956432e-01   2.6852776e-01   2.1529223e-01   1.7652116e-01   2.2659936e-01   2.2483764e-01   2.5838801e-01   1.9958250e-01   2.5031938e-01   2.6459593e-01   1.4127677e-01   1.8459488e-01   2.5809699e-01   2.1110498e-01   3.2773890e-01   2.2109976e-01   2.7105695e-01   1.8736680e-01   3.3227725e-01   2.6813261e-01   2.0050552e-01   1.9777445e-01   2.5552383e-01   2.7284453e-01   2.4733170e-01   1.5638593e-01   2.2514733e-01   2.0849921e-01   1.9287136e-01   3.6191982e-01   2.7281863e-01   1.9071038e-01   2.1912633e-01   2.8593968e-01   1.9281596e-01   2.4768186e-01   2.8763479e-01   2.3971138e-01   2.1723753e-01   1.8699948e-01   2.4393940e-01   1.9979806e-01   2.1397418e-01   2.0672587e-01   1.2529166e-01   2.1270878e-01   4.6033946e-01   4.0222602e-01   3.7977808e-01   3.9565939e-01   4.2276626e-01   4.2367223e-01   4.1181849e-01   4.0362790e-01   4.3403229e-01   3.5248619e-01   2.8628855e-01   3.7840466e-01   3.5121985e-01   4.3508597e-01   4.3518504e-01   3.3982310e-01   3.5380487e-01   3.5403534e-01   5.0086936e-01   4.0431760e-01   3.5820087e-01   3.8360776e-01   4.4020334e-01   3.2567463e-01   3.4780712e-01   3.4566354e-01   3.0520609e-01   2.9886193e-01   4.2163480e-01   3.3351442e-01   3.9135037e-01   2.9988740e-01   4.3006423e-01   3.2170490e-01   4.2068520e-01   3.7643926e-01   3.7416586e-01   3.4964963e-01   2.9095264e-01   3.1987117e-01   3.8035231e-01   2.9582266e-01   4.0222602e-01   3.9256940e-01   3.7489846e-01   3.3318735e-01   3.7289799e-01   3.2576051e-01   3.4389968e-01   3.4452790e-01   2.6022528e-04   1.6357171e-03   1.5776794e-03   3.8821876e-04   3.3383101e-03   8.1348232e-03   1.2673676e-02   9.6454978e-03   2.5951087e-03   4.7710550e-04   5.9640558e-03   5.0935416e-04   4.5005321e-03   1.8295131e-02   8.0881241e-04   4.5548809e-03   2.4342161e-03   4.9437559e-04   7.1285200e-04   1.1827453e-03   5.3640347e-04   3.9274104e-04   2.7126384e-03   1.1795471e-02   1.0834355e-02   2.6022528e-04   3.1798475e-03   3.2407554e-03   2.6022528e-04   8.6271302e-04   3.7982619e-04   4.6816553e-03   1.6563494e-02   3.8583498e-03   2.4190920e-03   3.6876972e-03   1.5540748e-03   4.9548680e-03   1.1822578e-03   2.1020911e-03   7.8943086e-04   1.7690932e-01   1.7592254e-01   2.1244374e-01   2.5265403e-01   2.2738778e-01   2.4651370e-01   1.9514374e-01   1.5780110e-01   2.0549282e-01   2.0415245e-01   2.3585798e-01   1.7978451e-01   2.2802648e-01   2.4243736e-01   1.2428265e-01   1.6526016e-01   2.3669421e-01   1.9101658e-01   3.0265561e-01   2.0025949e-01   2.4898144e-01   1.6786898e-01   3.0733331e-01   2.4595698e-01   1.8046568e-01   1.7781045e-01   2.3314059e-01   2.4991164e-01   2.2560913e-01   1.3845901e-01   2.0404813e-01   1.8812805e-01   1.7322140e-01   3.3666075e-01   2.5129679e-01   1.7201674e-01   1.9833201e-01   2.6229128e-01   1.7386253e-01   2.2573363e-01   2.6492814e-01   2.1852944e-01   1.9648937e-01   1.6758641e-01   2.2246603e-01   1.8066071e-01   1.9389274e-01   1.8653629e-01   1.0911288e-01   1.9242842e-01   4.3299781e-01   3.7574545e-01   3.5353088e-01   3.6969868e-01   3.9574789e-01   3.9644649e-01   3.8564737e-01   3.7707427e-01   4.0646475e-01   3.2727058e-01   2.6301141e-01   3.5217112e-01   3.2569733e-01   4.0744443e-01   4.0742674e-01   3.1477415e-01   3.2876954e-01   3.2939944e-01   4.7166141e-01   3.7739415e-01   3.3254323e-01   3.5763917e-01   4.1251084e-01   3.0085067e-01   3.2295735e-01   3.2084322e-01   2.8110727e-01   2.7535557e-01   3.9443856e-01   3.0887601e-01   3.6474538e-01   2.7663010e-01   4.0256676e-01   2.9754793e-01   3.9443683e-01   3.4998590e-01   3.4873324e-01   3.2500314e-01   2.6771990e-01   2.9525187e-01   3.5397733e-01   2.7178914e-01   3.7574545e-01   3.6622316e-01   3.4883278e-01   3.0797294e-01   3.4655783e-01   3.0107914e-01   3.1936679e-01   3.2010756e-01   3.0868881e-03   2.8691382e-03   1.3643967e-04   5.3429196e-03   1.0581034e-02   1.6459895e-02   1.2551534e-02   4.1576220e-03   1.2160579e-03   8.7064401e-03   5.4418849e-05   6.8214146e-03   2.2732626e-02   5.6586090e-04   4.9831593e-03   1.1314391e-03   1.3090644e-03   1.7262411e-03   1.9770194e-03   1.0389613e-03   9.3641634e-05   2.8067647e-03   1.5471006e-02   1.4411876e-02   0.0000000e+00   4.0251529e-03   4.0402030e-03   0.0000000e+00   2.0104773e-03   1.1579294e-03   6.7733512e-03   1.3328703e-02   6.1195429e-03   3.8280621e-03   5.4471697e-03   1.3203495e-03   7.3930866e-03   2.5511055e-03   3.8011014e-03   1.5935161e-03   1.6488937e-01   1.6420208e-01   1.9946134e-01   2.3841307e-01   2.1377841e-01   2.3352484e-01   1.8323739e-01   1.4660873e-01   1.9269692e-01   1.9183992e-01   2.2200730e-01   1.6791595e-01   2.1423078e-01   2.2922867e-01   1.1407468e-01   1.5349471e-01   2.2418179e-01   1.7908948e-01   2.8692621e-01   1.8765985e-01   2.3596576e-01   1.5596498e-01   2.9203641e-01   2.3278981e-01   1.6829150e-01   1.6563525e-01   2.1942293e-01   2.3592536e-01   2.1256421e-01   1.2755291e-01   1.9121342e-01   1.7576718e-01   1.6132929e-01   3.2148865e-01   2.3885357e-01   1.6118125e-01   1.8573297e-01   2.4757051e-01   1.6279862e-01   2.1240660e-01   2.5149161e-01   2.0595435e-01   1.8389163e-01   1.5580881e-01   2.0964365e-01   1.6953436e-01   1.8203376e-01   1.7437090e-01   9.9184065e-02   1.8031354e-01   4.1664204e-01   3.5971944e-01   3.3744612e-01   3.5416868e-01   3.7936058e-01   3.7982315e-01   3.7006184e-01   3.6098196e-01   3.8956200e-01   3.1201251e-01   2.4889912e-01   3.3607844e-01   3.1002022e-01   3.9046127e-01   3.9028467e-01   2.9949936e-01   3.1373736e-01   3.1479561e-01   4.5355800e-01   3.6085089e-01   3.1682959e-01   3.4195608e-01   3.9553949e-01   2.8555816e-01   3.0804941e-01   3.0593834e-01   2.6633772e-01   2.6121338e-01   3.7782244e-01   2.9399549e-01   3.4839508e-01   2.6278429e-01   3.8569374e-01   2.8303600e-01   3.7885421e-01   3.3349568e-01   3.3352424e-01   3.1033775e-01   2.5375578e-01   2.8011018e-01   3.3772574e-01   2.5671985e-01   3.5971944e-01   3.5022311e-01   3.3289784e-01   2.9224130e-01   3.3016010e-01   2.8599652e-01   3.0475125e-01   3.0561759e-01   1.6232219e-03   2.8110674e-03   3.0992704e-04   2.8009412e-03   5.3859157e-03   3.4428307e-03   2.2389965e-04   4.8865483e-04   1.7600776e-03   3.6417064e-03   7.4576509e-04   9.1296419e-03   2.8123816e-03   8.0068765e-03   7.3379880e-03   3.9579356e-04   1.9713653e-04   6.0194434e-04   2.3367622e-03   3.6239908e-03   3.0185118e-03   6.3202257e-03   4.4046298e-03   3.0868881e-03   1.7141363e-03   1.8461990e-03   3.0868881e-03   1.2729358e-04   4.6571753e-04   8.6393185e-04   2.3903803e-02   9.0441478e-04   3.0528309e-04   3.1648190e-03   3.1223857e-03   2.2339929e-03   2.7724170e-04   9.5102356e-05   4.3913729e-04   2.1061066e-01   2.0964712e-01   2.4888926e-01   2.9163776e-01   2.6471732e-01   2.8522189e-01   2.3035873e-01   1.8998369e-01   2.4143327e-01   2.4006731e-01   2.7373417e-01   2.1381600e-01   2.6519773e-01   2.8097864e-01   1.5319882e-01   1.9790190e-01   2.7464921e-01   2.2594124e-01   3.4406181e-01   2.3583526e-01   2.8783351e-01   2.0067586e-01   3.4959337e-01   2.8469567e-01   2.1442337e-01   2.1148410e-01   2.7089383e-01   2.8885413e-01   2.6304757e-01   1.6861411e-01   2.3983808e-01   2.2272157e-01   2.0662897e-01   3.8050402e-01   2.8992390e-01   2.0524163e-01   2.3373909e-01   3.0156183e-01   2.0732304e-01   2.6311208e-01   3.0478863e-01   2.5545595e-01   2.3172924e-01   2.0047959e-01   2.5968741e-01   2.1460680e-01   2.2900957e-01   2.2107714e-01   1.3590375e-01   2.2746759e-01   4.8087096e-01   4.2142796e-01   3.9814594e-01   4.1502871e-01   4.4228995e-01   4.4300705e-01   4.3159396e-01   4.2281768e-01   4.5341178e-01   3.7067256e-01   3.0283474e-01   3.9670954e-01   3.6890449e-01   4.5441105e-01   4.5432159e-01   3.5749751e-01   3.7222314e-01   3.7273757e-01   5.2092654e-01   4.2307513e-01   3.7613897e-01   4.0250144e-01   4.5970761e-01   3.4267709e-01   3.6611458e-01   3.6389952e-01   3.2189682e-01   3.1593975e-01   4.4091119e-01   3.5132753e-01   4.0985044e-01   3.1723537e-01   4.4934566e-01   3.3938050e-01   4.4068685e-01   3.9407776e-01   3.9311145e-01   3.6818097e-01   3.0785214e-01   3.3679573e-01   3.9853670e-01   3.1138703e-01   4.2142796e-01   4.1148317e-01   3.9324794e-01   3.4985868e-01   3.9052142e-01   3.4304315e-01   3.6227810e-01   3.6300235e-01   3.5297445e-03   2.3993465e-03   8.1469449e-03   8.4116551e-03   8.4748907e-03   3.0443320e-03   1.8587915e-03   2.8140158e-03   3.7033592e-03   2.9317197e-03   1.3265454e-02   4.5015236e-03   2.6265400e-03   7.5415562e-03   1.6353241e-03   1.4046892e-03   3.1172532e-03   6.0159720e-04   2.6265400e-03   7.0517547e-03   5.5270478e-03   6.4518235e-03   2.8691382e-03   6.1014438e-03   6.3013427e-03   2.8691382e-03   1.1615614e-03   1.4498289e-03   4.4069463e-03   2.8268404e-02   1.4610903e-03   3.3082950e-03   4.5136771e-04   5.8170191e-03   1.2876475e-03   5.5964987e-04   1.3152056e-03   2.3446691e-03   1.9624436e-01   1.9365486e-01   2.3272539e-01   2.7570910e-01   2.4962218e-01   2.6341222e-01   2.1161968e-01   1.7505868e-01   2.2555325e-01   2.2171510e-01   2.5853430e-01   1.9783603e-01   2.5146360e-01   2.6075203e-01   1.4121466e-01   1.8483453e-01   2.5221719e-01   2.0803875e-01   3.2980663e-01   2.1983733e-01   2.6580206e-01   1.8792174e-01   3.3096405e-01   2.6375229e-01   2.0022607e-01   1.9799659e-01   2.5530781e-01   2.7170116e-01   2.4472945e-01   1.5721426e-01   2.2453551e-01   2.0791989e-01   1.9232403e-01   3.5721533e-01   2.6541719e-01   1.8583170e-01   2.1815822e-01   2.8740780e-01   1.8853156e-01   2.4642239e-01   2.8243457e-01   2.3594931e-01   2.1655773e-01   1.8685267e-01   2.4074340e-01   1.9492750e-01   2.1026662e-01   2.0538411e-01   1.2769778e-01   2.1026662e-01   4.5350142e-01   3.9795187e-01   3.7769065e-01   3.8983341e-01   4.1851849e-01   4.2042793e-01   4.0510768e-01   3.9953508e-01   4.3130939e-01   3.4895812e-01   2.8413412e-01   3.7648942e-01   3.4987508e-01   4.3267862e-01   4.3359924e-01   3.3758650e-01   3.4918773e-01   3.4772733e-01   4.9915788e-01   4.0231358e-01   3.5632097e-01   3.7931174e-01   4.3732697e-01   3.2511301e-01   3.4317696e-01   3.4120231e-01   3.0420772e-01   2.9548175e-01   4.1851849e-01   3.3003548e-01   3.8954108e-01   2.9516106e-01   4.2751620e-01   3.1771485e-01   4.1340131e-01   3.7704473e-01   3.6865281e-01   3.4390717e-01   2.8759676e-01   3.1915503e-01   3.7909158e-01   2.9821954e-01   3.9795187e-01   3.8894782e-01   3.7251565e-01   3.3442155e-01   3.7333196e-01   3.2403985e-01   3.3841983e-01   3.3852014e-01   4.9713816e-03   9.2903476e-03   1.5944722e-02   1.1386125e-02   3.5402300e-03   9.6201776e-04   8.6911918e-03   9.4953207e-05   6.4447745e-03   2.1940505e-02   1.4660203e-04   6.6774582e-03   1.0681613e-03   1.0987220e-03   1.5397922e-03   1.3925202e-03   1.6744918e-03   4.5493239e-04   1.7274513e-03   1.6063124e-02   1.4167352e-02   1.3643967e-04   2.8974888e-03   2.8893579e-03   1.3643967e-04   1.8844794e-03   1.0195101e-03   5.9835494e-03   1.1907169e-02   6.2144210e-03   3.1461009e-03   6.4603159e-03   6.0804116e-04   7.9398115e-03   2.6608779e-03   3.6611489e-03   1.1878605e-03   1.6827914e-01   1.6808878e-01   2.0330224e-01   2.4208927e-01   2.1725982e-01   2.3901101e-01   1.8791090e-01   1.5022413e-01   1.9646923e-01   1.9636982e-01   2.2550082e-01   1.7178784e-01   2.1730098e-01   2.3423675e-01   1.1690649e-01   1.5652486e-01   2.2988556e-01   1.8351752e-01   2.8999988e-01   1.9148148e-01   2.4151451e-01   1.5889324e-01   2.9641885e-01   2.3800995e-01   1.7162027e-01   1.6875690e-01   2.2303923e-01   2.3997805e-01   2.1702847e-01   1.3016155e-01   1.9481438e-01   1.7925806e-01   1.6471086e-01   3.2723835e-01   2.4516700e-01   1.6613136e-01   1.8943302e-01   2.5069233e-01   1.6755119e-01   2.1637456e-01   2.5710224e-01   2.1080083e-01   1.8747239e-01   1.5900127e-01   2.1430731e-01   1.7454101e-01   1.8671199e-01   1.7813660e-01   1.0093430e-01   1.8452279e-01   4.2348788e-01   3.6545764e-01   3.4229982e-01   3.6044592e-01   3.8515670e-01   3.8525367e-01   3.7671058e-01   3.6665866e-01   3.9483186e-01   3.1729700e-01   2.5339335e-01   3.4086300e-01   3.1448994e-01   3.9561710e-01   3.9513385e-01   3.0425707e-01   3.1942407e-01   3.2109044e-01   4.5863634e-01   3.6575820e-01   3.2152631e-01   3.4763745e-01   4.0088503e-01   2.8963041e-01   3.1371721e-01   3.1153634e-01   2.7048666e-01   2.6621754e-01   3.8319922e-01   2.9918600e-01   3.5318564e-01   2.6828212e-01   3.9088644e-01   2.8836369e-01   3.8573578e-01   3.3732047e-01   3.3961180e-01   3.1641339e-01   2.5871452e-01   2.8421639e-01   3.4227214e-01   2.5952711e-01   3.6545764e-01   3.5568934e-01   3.3784386e-01   2.9565951e-01   3.3403769e-01   2.9050448e-01   3.1070970e-01   3.1176741e-01   1.7225353e-03   3.1252650e-03   1.9141697e-03   3.0572974e-04   1.5621195e-03   7.7657730e-04   6.0730841e-03   9.6969946e-05   6.0804497e-03   4.8728559e-03   1.0019276e-02   1.0630759e-02   1.4028596e-03   1.0008907e-03   1.5106647e-03   3.9425625e-03   5.9922357e-03   4.5089760e-03   4.5296071e-03   2.4544132e-03   5.3429196e-03   2.3927105e-03   2.5658780e-03   5.3429196e-03   8.0759380e-04   1.5345623e-03   3.2653860e-04   2.8784931e-02   4.6959359e-04   5.2961514e-04   3.5529133e-03   5.0787251e-03   1.7528094e-03   7.9750642e-04   1.8469304e-04   1.3949343e-03   2.2601194e-01   2.2489065e-01   2.6538416e-01   3.0933559e-01   2.8173337e-01   3.0217927e-01   2.4601138e-01   2.0461695e-01   2.5772236e-01   2.5608721e-01   2.9099324e-01   2.2920421e-01   2.8227951e-01   2.9802519e-01   1.6660589e-01   2.1294215e-01   2.9118999e-01   2.4154604e-01   3.6304829e-01   2.5194222e-01   3.0483437e-01   2.1582549e-01   3.6852765e-01   3.0175865e-01   2.2996178e-01   2.2696306e-01   2.8805620e-01   3.0640689e-01   2.7978083e-01   1.8266242e-01   2.5611673e-01   2.3849427e-01   2.2189938e-01   3.9968280e-01   3.0655638e-01   2.1989254e-01   2.4981061e-01   3.1957344e-01   2.2214967e-01   2.7998655e-01   3.2222399e-01   2.7182647e-01   2.4776514e-01   2.1557967e-01   2.7625427e-01   2.2956697e-01   2.4461597e-01   2.3673300e-01   1.4870158e-01   2.4319918e-01   5.0146439e-01   4.4143183e-01   4.1797463e-01   4.3468983e-01   4.6265612e-01   4.6350594e-01   4.5140079e-01   4.4286970e-01   4.7413628e-01   3.8981309e-01   3.2063561e-01   4.1652733e-01   3.8823357e-01   4.7518267e-01   4.7516433e-01   3.7651294e-01   3.9124904e-01   3.9150135e-01   5.4273573e-01   4.4336023e-01   3.9556546e-01   4.2215915e-01   4.8051706e-01   3.6152094e-01   3.8501414e-01   3.8277781e-01   3.4024930e-01   3.3391004e-01   4.6138930e-01   3.7007400e-01   4.2991865e-01   3.3504580e-01   4.7002175e-01   3.5780202e-01   4.6054739e-01   4.1401655e-01   4.1241306e-01   3.8694896e-01   3.2563422e-01   3.5550143e-01   4.1844379e-01   3.2964964e-01   4.4143183e-01   4.3139176e-01   4.1295631e-01   3.6894646e-01   4.1038562e-01   3.6180237e-01   3.8096707e-01   3.8161756e-01   2.9059655e-03   2.3706161e-04   1.5622923e-03   4.6985391e-03   3.0899699e-03   1.1144685e-02   1.5452086e-03   4.3912180e-03   8.2378168e-03   1.9894938e-02   1.6022015e-02   4.6248887e-03   4.1434850e-03   3.4955495e-03   1.0239539e-02   1.2012056e-02   5.3911313e-03   8.1025404e-03   3.3141536e-03   1.0581034e-02   2.5128050e-03   2.6447621e-03   1.0581034e-02   4.0444636e-03   5.0265914e-03   5.7591609e-04   3.1111838e-02   3.5439088e-03   1.6935296e-03   1.0096079e-02   7.4536930e-03   6.1909555e-03   4.6446420e-03   2.9301624e-03   3.9714148e-03   2.5068010e-01   2.5098525e-01   2.9216380e-01   3.3638336e-01   3.0774280e-01   3.3430586e-01   2.7479523e-01   2.2946729e-01   2.8415608e-01   2.8467354e-01   3.1719659e-01   2.5534962e-01   3.0706036e-01   3.2874800e-01   1.8820706e-01   2.3625921e-01   3.2370915e-01   2.6954509e-01   3.8903955e-01   2.7840834e-01   3.3718014e-01   2.3890051e-01   3.9852630e-01   3.3314087e-01   2.5453269e-01   2.5085481e-01   3.1457631e-01   3.3452242e-01   3.0863300e-01   2.0400912e-01   2.8201538e-01   2.6372052e-01   2.4645516e-01   4.3401653e-01   3.4099078e-01   2.4885351e-01   2.7587880e-01   3.4510687e-01   2.5062404e-01   3.0740449e-01   3.5503881e-01   3.0161400e-01   2.7344211e-01   2.3943815e-01   3.0560987e-01   2.5890901e-01   2.7338361e-01   2.6272911e-01   1.6653571e-01   2.7061027e-01   5.3996294e-01   4.7622847e-01   4.4996413e-01   4.7092027e-01   4.9784258e-01   4.9765553e-01   4.8884384e-01   4.7750758e-01   5.0792579e-01   4.2270376e-01   3.5026703e-01   4.4829833e-01   4.1874266e-01   5.0865069e-01   5.0773433e-01   4.0771387e-01   4.2529697e-01   4.2723724e-01   5.7654330e-01   4.7578493e-01   4.2683086e-01   4.5657562e-01   5.1458642e-01   3.9050926e-01   4.1892650e-01   4.1646419e-01   3.6916765e-01   3.6521270e-01   4.9536279e-01   4.0243409e-01   4.6185742e-01   3.6775616e-01   5.0354755e-01   3.9037876e-01   4.9872590e-01   4.4290716e-01   4.4784995e-01   4.2202156e-01   3.5667822e-01   3.8450868e-01   4.4953729e-01   3.5436611e-01   4.7622847e-01   4.6530251e-01   4.4515647e-01   3.9606646e-01   4.3939461e-01   3.9207838e-01   4.1563418e-01   4.1682072e-01   1.5609953e-03   4.8490070e-03   9.0958370e-03   1.4989091e-03   1.7813868e-02   2.1261488e-03   5.5450301e-04   1.5694148e-02   1.9384410e-02   2.5209737e-02   8.6954304e-03   7.6213095e-03   8.7105486e-03   1.2654300e-02   1.7334342e-02   1.3883194e-02   2.2522789e-03   1.7443565e-04   1.6459895e-02   9.1718824e-03   9.4916987e-03   1.6459895e-02   6.9918464e-03   8.9833757e-03   2.9662983e-03   4.9266036e-02   2.9055422e-03   5.5731976e-03   8.0889759e-03   1.5739049e-02   3.7597322e-03   6.3200695e-03   4.4644236e-03   8.6395939e-03   2.7692079e-01   2.7499135e-01   3.1941212e-01   3.6719225e-01   3.3760508e-01   3.5656667e-01   2.9687968e-01   2.5298236e-01   3.1115442e-01   3.0819394e-01   3.4760947e-01   2.7976620e-01   3.3861131e-01   3.5300749e-01   2.1161836e-01   2.6294922e-01   3.4413759e-01   2.9242527e-01   4.2523864e-01   3.0477646e-01   3.5931443e-01   2.6623770e-01   4.2973462e-01   3.5665121e-01   2.8133678e-01   2.7828246e-01   3.4429599e-01   3.6357656e-01   3.3414792e-01   2.2982660e-01   3.0962503e-01   2.9049749e-01   2.7240490e-01   4.6073277e-01   3.5937207e-01   2.6744708e-01   3.0261187e-01   3.7874332e-01   2.7038484e-01   3.3511133e-01   3.7800754e-01   3.2481692e-01   3.0053112e-01   2.6567213e-01   3.2997477e-01   2.7805229e-01   2.9533686e-01   2.8819780e-01   1.9246360e-01   2.9461561e-01   5.6604002e-01   5.0500114e-01   4.8160322e-01   4.9684759e-01   5.2728223e-01   5.2878056e-01   5.1374073e-01   5.0662675e-01   5.4019822e-01   4.5105935e-01   3.7828674e-01   4.8016813e-01   4.5059090e-01   5.4146236e-01   5.4186046e-01   4.3772456e-01   4.5187440e-01   4.5090747e-01   6.1216296e-01   5.0833718e-01   4.5807252e-01   4.8471571e-01   5.4678369e-01   4.2264992e-01   4.4526564e-01   4.4301133e-01   3.9982165e-01   3.9174986e-01   5.2663733e-01   4.3017652e-01   4.9431552e-01   3.9206379e-01   5.3598953e-01   4.1681568e-01   5.2288475e-01   4.7864082e-01   4.7360696e-01   4.4651927e-01   3.8292357e-01   4.1618542e-01   4.8251093e-01   3.8978460e-01   5.0500114e-01   4.9485605e-01   4.7615846e-01   4.3123359e-01   4.7475023e-01   4.2239197e-01   4.4037545e-01   4.4066833e-01   2.2696323e-03   5.9674345e-03   2.4448133e-03   1.3335241e-02   1.4550127e-03   2.5899751e-03   1.0462849e-02   2.0483763e-02   1.9016265e-02   5.8048658e-03   5.1341121e-03   4.8749246e-03   1.1285550e-02   1.3907377e-02   7.6337585e-03   6.3180508e-03   2.0267734e-03   1.2551534e-02   4.1078635e-03   4.2919330e-03   1.2551534e-02   4.8854397e-03   6.2043549e-03   8.9134425e-04   3.6466805e-02   3.2782414e-03   2.5696799e-03   9.8307089e-03   9.8120264e-03   5.5450409e-03   5.1728098e-03   3.2838118e-03   5.2555481e-03   2.6123905e-01   2.6103645e-01   3.0329747e-01   3.4864780e-01   3.1958423e-01   3.4458162e-01   2.8459400e-01   2.3921225e-01   2.9516933e-01   2.9488851e-01   3.2923215e-01   2.6553322e-01   3.1926739e-01   3.3946038e-01   1.9751618e-01   2.4678743e-01   3.3347141e-01   2.7948950e-01   4.0283567e-01   2.8923185e-01   3.4744486e-01   2.4959732e-01   4.1128993e-01   3.4370645e-01   2.6525258e-01   2.6168140e-01   3.2643822e-01   3.4638099e-01   3.1949478e-01   2.1402441e-01   2.9314941e-01   2.7451414e-01   2.5691069e-01   4.4594923e-01   3.5036767e-01   2.5760360e-01   2.8676453e-01   3.5805235e-01   2.5967094e-01   3.1875975e-01   3.6562012e-01   3.1188296e-01   2.8438818e-01   2.4989387e-01   3.1618152e-01   2.6787548e-01   2.8314006e-01   2.7321717e-01   1.7615044e-01   2.8082637e-01   5.5224352e-01   4.8885819e-01   4.6311762e-01   4.8285549e-01   5.1073035e-01   5.1093091e-01   5.0061869e-01   4.9022404e-01   5.2151073e-01   4.3495694e-01   3.6199911e-01   4.6149506e-01   4.3176986e-01   5.2236122e-01   5.2173621e-01   4.2026138e-01   4.3714978e-01   4.3841019e-01   5.9117531e-01   4.8927834e-01   4.3976762e-01   4.6895974e-01   5.2818477e-01   4.0343191e-01   4.3068816e-01   4.2826096e-01   3.8162190e-01   3.7670056e-01   5.0866155e-01   4.1442940e-01   4.7525840e-01   3.7873655e-01   5.1715063e-01   4.0199874e-01   5.1036877e-01   4.5693051e-01   4.5962906e-01   4.3336423e-01   3.6804311e-01   3.9729031e-01   4.6298867e-01   3.6775880e-01   4.8885819e-01   4.7805886e-01   4.5813974e-01   4.0968699e-01   4.5331588e-01   4.0460089e-01   4.2699969e-01   4.2797954e-01   8.7894099e-04   2.0541035e-03   4.6305984e-03   6.7282118e-04   8.1166178e-03   3.1872717e-03   1.0880321e-02   8.3605717e-03   8.2577841e-04   6.1811314e-04   5.6936180e-04   3.8806955e-03   4.9821714e-03   2.5043588e-03   7.1844876e-03   4.2468498e-03   4.1576220e-03   9.9353221e-04   1.1055786e-03   4.1576220e-03   5.9733473e-04   9.9247040e-04   3.2081104e-04   2.3598005e-02   1.4307976e-03   3.0934240e-05   4.9322953e-03   3.1299098e-03   3.2877683e-03   9.9769768e-04   4.3968696e-04   6.2770216e-04   2.1786575e-01   2.1746374e-01   2.5686278e-01   2.9961632e-01   2.7235218e-01   2.9521657e-01   2.3917491e-01   1.9737534e-01   2.4929109e-01   2.4877587e-01   2.8142376e-01   2.2163964e-01   2.7235613e-01   2.9042411e-01   1.5945203e-01   2.0466964e-01   2.8483074e-01   2.3445929e-01   3.5153649e-01   2.4372083e-01   2.9790924e-01   2.0734139e-01   3.5860995e-01   2.9439415e-01   2.2162942e-01   2.1843466e-01   2.7871280e-01   2.9725443e-01   2.7179832e-01   1.7471289e-01   2.4749127e-01   2.3015922e-01   2.1385216e-01   3.9117409e-01   3.0083879e-01   2.1421404e-01   2.4147478e-01   3.0893498e-01   2.1609222e-01   2.7129944e-01   3.1500957e-01   2.6459749e-01   2.3931769e-01   2.0744985e-01   2.6864595e-01   2.2369874e-01   2.3782351e-01   2.2882042e-01   1.4076875e-01   2.3574843e-01   4.9305396e-01   4.3221625e-01   4.0786305e-01   4.2639713e-01   4.5320351e-01   4.5351054e-01   4.4342223e-01   4.3354113e-01   4.6376094e-01   3.8078797e-01   3.1179824e-01   4.0634323e-01   3.7808795e-01   4.6463298e-01   4.6419251e-01   3.6697079e-01   3.8279432e-01   3.8398235e-01   5.3121485e-01   4.3292773e-01   3.8560639e-01   4.1316779e-01   4.7015919e-01   3.5131205e-01   3.7664303e-01   3.7434225e-01   3.3054253e-01   3.2553357e-01   4.5134808e-01   3.6126826e-01   4.1953095e-01   3.2738535e-01   4.5959627e-01   3.4943014e-01   4.5279702e-01   4.0259529e-01   4.0419917e-01   3.7916847e-01   3.1736132e-01   3.4544845e-01   4.0790313e-01   3.1842804e-01   4.3221625e-01   4.2193584e-01   4.0305492e-01   3.5775833e-01   3.9908964e-01   3.5217975e-01   3.7311479e-01   3.7405234e-01   4.0128787e-03   1.5082918e-03   2.4327589e-03   1.3749582e-02   9.8644164e-04   7.0275865e-03   4.0509182e-03   9.2137987e-06   8.1954627e-05   2.0221322e-04   1.4919720e-03   1.6918938e-03   1.6810350e-03   9.8366461e-03   7.8161988e-03   1.2160579e-03   1.4072237e-03   1.4774681e-03   1.2160579e-03   1.9402564e-04   2.6249834e-05   2.2527118e-03   1.8043780e-02   2.4914194e-03   7.5228825e-04   4.0311549e-03   1.3209671e-03   4.0483306e-03   6.3837247e-04   9.1866746e-04   4.5668021e-05   1.9279238e-01   1.9221899e-01   2.2979083e-01   2.7088361e-01   2.4479658e-01   2.6610561e-01   2.1267629e-01   1.7326091e-01   2.2258210e-01   2.2184784e-01   2.5349552e-01   1.9619155e-01   2.4503806e-01   2.6157291e-01   1.3780150e-01   1.8042756e-01   2.5616217e-01   2.0823320e-01   3.2136818e-01   2.1724300e-01   2.6868196e-01   1.8301959e-01   3.2745065e-01   2.6534429e-01   1.9640162e-01   1.9346456e-01   2.5082861e-01   2.6843057e-01   2.4386055e-01   1.5229091e-01   2.2093793e-01   2.0444992e-01   1.8898039e-01   3.5852616e-01   2.7153123e-01   1.8897970e-01   2.1514921e-01   2.8018592e-01   1.9075855e-01   2.4355737e-01   2.8508289e-01   2.3688721e-01   2.1314274e-01   1.8298617e-01   2.4079289e-01   1.9795777e-01   2.1138990e-01   2.0306053e-01   1.2090533e-01   2.0951271e-01   4.5737829e-01   3.9834085e-01   3.7497739e-01   3.9259152e-01   4.1873643e-01   4.1914498e-01   4.0909121e-01   3.9964410e-01   4.2918834e-01   3.4857995e-01   2.8224226e-01   3.7353062e-01   3.4626594e-01   4.3008323e-01   4.2978752e-01   3.3538250e-01   3.5042715e-01   3.5150644e-01   4.9516533e-01   3.9931312e-01   3.5345241e-01   3.7985840e-01   4.3539662e-01   3.2054198e-01   3.4448056e-01   3.4226906e-01   3.0044482e-01   2.9530625e-01   4.1705793e-01   3.2972732e-01   3.8633770e-01   2.9699130e-01   4.2515986e-01   3.1826259e-01   4.1819279e-01   3.7038673e-01   3.7108888e-01   3.4686702e-01   2.8745249e-01   3.1485734e-01   3.7515178e-01   2.8956004e-01   3.9834085e-01   3.8842721e-01   3.7027395e-01   3.2715736e-01   3.6694987e-01   3.2117964e-01   3.4102816e-01   3.4191835e-01   9.8460504e-03   4.2097646e-04   3.8720695e-03   8.9609139e-03   1.0271114e-02   1.5759765e-02   3.6853519e-03   2.9640455e-03   4.3261623e-03   5.5313131e-03   9.1074119e-03   8.9974672e-03   1.5687499e-03   7.6879483e-04   8.7064401e-03   5.8625582e-03   6.1329529e-03   8.7064401e-03   2.4949105e-03   3.7729184e-03   1.5387455e-03   3.8489345e-02   2.4427633e-04   2.5870999e-03   2.8098846e-03   9.5472550e-03   6.5811256e-04   1.8465019e-03   1.0925425e-03   3.9557876e-03   2.4136396e-01   2.3914246e-01   2.8140056e-01   3.2726072e-01   2.9909180e-01   3.1587284e-01   2.5940651e-01   2.1853199e-01   2.7358477e-01   2.7023320e-01   3.0865618e-01   2.4367721e-01   3.0046030e-01   3.1269475e-01   1.8026794e-01   2.2845050e-01   3.0393397e-01   2.5531598e-01   3.8377418e-01   2.6747174e-01   3.1847415e-01   2.3166294e-01   3.8684625e-01   3.1607055e-01   2.4560721e-01   2.4289838e-01   3.0537010e-01   3.2346477e-01   2.9500292e-01   1.9758720e-01   2.7227129e-01   2.5416529e-01   2.3708995e-01   4.1588028e-01   3.1833018e-01   2.3144395e-01   2.6550973e-01   3.3890880e-01   2.3429142e-01   2.9628566e-01   3.3633600e-01   2.8587728e-01   2.6362949e-01   2.3087874e-01   2.9089607e-01   2.4143368e-01   2.5794041e-01   2.5175590e-01   1.6347149e-01   2.5753099e-01   5.1758017e-01   4.5875138e-01   4.3664497e-01   4.5058511e-01   4.8035455e-01   4.8203651e-01   4.6682330e-01   4.6036369e-01   4.9325486e-01   4.0679312e-01   3.3723664e-01   4.3530687e-01   4.0692383e-01   4.9456817e-01   4.9519341e-01   3.9426880e-01   4.0735509e-01   4.0616607e-01   5.6363656e-01   4.6254311e-01   4.1397979e-01   4.3911880e-01   4.9961302e-01   3.8027310e-01   4.0098514e-01   3.9884545e-01   3.5820683e-01   3.4982569e-01   4.7998848e-01   3.8669536e-01   4.4902142e-01   3.4986296e-01   4.8921417e-01   3.7374272e-01   4.7562308e-01   4.3467328e-01   4.2816870e-01   4.0201263e-01   3.4137888e-01   3.7400811e-01   4.3776854e-01   3.4988231e-01   4.5875138e-01   4.4907175e-01   4.3130086e-01   3.8919296e-01   4.3084858e-01   3.7966236e-01   3.9613519e-01   3.9634370e-01   7.6697767e-03   2.4232895e-02   4.2497383e-04   5.8645021e-03   7.1697323e-04   1.6459430e-03   2.1472725e-03   2.1701877e-03   1.5644328e-03   2.1493500e-04   2.5540450e-03   1.7185148e-02   1.5785034e-02   5.4418849e-05   4.0402433e-03   4.0294443e-03   5.4418849e-05   2.5045043e-03   1.5070390e-03   7.3845654e-03   1.1685406e-02   7.1165327e-03   4.2192668e-03   6.5870297e-03   1.0764642e-03   8.6213220e-03   3.2147266e-03   4.4993834e-03   1.8554035e-03   1.6163874e-01   1.6124582e-01   1.9600517e-01   2.3441471e-01   2.0995191e-01   2.3066019e-01   1.8049424e-01   1.4375647e-01   1.8928742e-01   1.8888935e-01   2.1809263e-01   1.6489764e-01   2.1018407e-01   2.2610729e-01   1.1131536e-01   1.5021138e-01   2.2157821e-01   1.7624974e-01   2.8213828e-01   1.8434338e-01   2.3311339e-01   1.5259174e-01   2.8788764e-01   2.2976085e-01   1.6495975e-01   1.6222817e-01   2.1560367e-01   2.3216078e-01   2.0930930e-01   1.2444580e-01   1.8772709e-01   1.7242257e-01   1.5812464e-01   3.1788081e-01   2.3649618e-01   1.5894784e-01   1.8237277e-01   2.4318751e-01   1.6040650e-01   2.0886424e-01   2.4850015e-01   2.0301750e-01   1.8048879e-01   1.5257957e-01   2.0654604e-01   1.6721007e-01   1.7931046e-01   1.7120054e-01   9.6139593e-02   1.7732284e-01   4.1297254e-01   3.5577891e-01   3.3316436e-01   3.5061301e-01   3.7530173e-01   3.7554177e-01   3.6661833e-01   3.5699377e-01   3.8511507e-01   3.0820403e-01   2.4524565e-01   3.3176869e-01   3.0575678e-01   3.8594227e-01   3.8559393e-01   2.9549451e-01   3.1016061e-01   3.1160241e-01   4.4857854e-01   3.5641190e-01   3.1263400e-01   3.3812708e-01   3.9109335e-01   2.8129908e-01   3.0451362e-01   3.0237858e-01   2.6230725e-01   2.5773246e-01   3.7352449e-01   2.9029824e-01   3.4398832e-01   2.5959514e-01   3.8123049e-01   2.7952979e-01   3.7549545e-01   3.2868655e-01   3.3002382e-01   3.0704202e-01   2.5032682e-01   2.7592132e-01   3.3326893e-01   2.5208920e-01   3.5577891e-01   3.4619466e-01   3.2870702e-01   2.8757710e-01   3.2540565e-01   2.8197541e-01   3.0143248e-01   3.0241595e-01   4.6779054e-03   6.3405358e-03   1.1072067e-02   1.2740784e-02   2.2273681e-03   1.7042107e-03   2.3469652e-03   4.9562680e-03   7.4940361e-03   5.7695726e-03   3.5981535e-03   1.5844867e-03   6.8214146e-03   3.1957366e-03   3.3967393e-03   6.8214146e-03   1.4289215e-03   2.3814252e-03   3.6906895e-04   3.2052685e-02   4.0942979e-04   9.9039775e-04   3.7975123e-03   6.5400285e-03   1.5831617e-03   1.2837357e-03   4.6903663e-04   2.2256509e-03   2.3440889e-01   2.3310632e-01   2.7431935e-01   3.1898347e-01   2.9103053e-01   3.1107217e-01   2.5431417e-01   2.1253549e-01   2.6655333e-01   2.6462531e-01   3.0042601e-01   2.3750489e-01   2.9168949e-01   3.0705757e-01   1.7397041e-01   2.2119992e-01   2.9980584e-01   2.4986709e-01   3.7353610e-01   2.6066067e-01   3.1374027e-01   2.2416418e-01   3.7874518e-01   3.1076095e-01   2.3844790e-01   2.3545346e-01   2.9741154e-01   3.1590317e-01   2.8873621e-01   1.9043311e-01   2.6497335e-01   2.4708373e-01   2.3022342e-01   4.0978464e-01   3.1511039e-01   2.2757419e-01   2.5853132e-01   3.2950090e-01   2.2996799e-01   2.8911377e-01   3.3136481e-01   2.8050509e-01   2.5648758e-01   2.2384164e-01   2.8507826e-01   2.3741411e-01   2.5289158e-01   2.4520543e-01   1.5591712e-01   2.5163277e-01   5.1215829e-01   4.5200156e-01   4.2861009e-01   4.4496538e-01   4.7341919e-01   4.7441196e-01   4.6168878e-01   4.5347805e-01   4.8519916e-01   3.9997999e-01   3.3019092e-01   4.2716946e-01   3.9865809e-01   4.8629326e-01   4.8637186e-01   3.8670691e-01   4.0127624e-01   4.0126667e-01   5.5444310e-01   4.5424309e-01   4.0600299e-01   4.3254422e-01   4.9161364e-01   3.7174460e-01   3.9497344e-01   3.9273809e-01   3.5018083e-01   3.4346685e-01   4.7229362e-01   3.8003558e-01   4.4070091e-01   3.4442025e-01   4.8107176e-01   3.6755422e-01   4.7082182e-01   4.2490414e-01   4.2252116e-01   3.9675769e-01   3.3509282e-01   3.6564070e-01   4.2918040e-01   3.3977682e-01   4.5200156e-01   4.4195847e-01   4.2350677e-01   3.7942836e-01   4.2122143e-01   3.7189771e-01   3.9075300e-01   3.9132598e-01   2.1401129e-02   2.6296569e-02   3.2566498e-02   1.3297832e-02   1.1999623e-02   1.2969856e-02   1.8466773e-02   2.3873417e-02   1.8518842e-02   4.0273028e-03   1.2616800e-03   2.2732626e-02   1.2827409e-02   1.3181090e-02   2.2732626e-02   1.1261737e-02   1.3701796e-02   5.3984869e-03   5.7610599e-02   5.9941455e-03   8.9691119e-03   1.2694193e-02   2.1144882e-02   7.0627421e-03   1.0543898e-02   8.0308076e-03   1.3063205e-02   2.9989796e-01   2.9808728e-01   3.4381381e-01   3.9275825e-01   3.6234621e-01   3.8238034e-01   3.2086021e-01   2.7526551e-01   3.3529881e-01   3.3248525e-01   3.7261196e-01   3.0300865e-01   3.6317903e-01   3.7865155e-01   2.3211430e-01   2.8532877e-01   3.6963026e-01   3.1621648e-01   4.5177033e-01   3.2875625e-01   3.8520789e-01   2.8867443e-01   4.5697798e-01   3.8242988e-01   3.0442487e-01   3.0118555e-01   3.6926913e-01   3.8920975e-01   3.5915749e-01   2.5088735e-01   3.3365900e-01   3.1393007e-01   2.9523721e-01   4.8898239e-01   3.8528778e-01   2.9050533e-01   3.2648373e-01   4.0430761e-01   2.9352285e-01   3.5998625e-01   4.0438969e-01   3.4965804e-01   3.2429593e-01   2.8821126e-01   3.5492121e-01   3.0147553e-01   3.1927061e-01   3.1166517e-01   2.1164881e-01   3.1841810e-01   5.9626248e-01   5.3406968e-01   5.1001241e-01   5.2586196e-01   5.5673824e-01   5.5816878e-01   5.4309284e-01   5.3570978e-01   5.6971774e-01   4.7901704e-01   4.0442977e-01   5.0852772e-01   4.7828326e-01   5.7096471e-01   5.7126109e-01   4.6526268e-01   4.7993533e-01   4.7902644e-01   6.4260357e-01   5.3722757e-01   4.8599135e-01   5.1340958e-01   5.7642669e-01   4.4962350e-01   4.7318809e-01   4.7087433e-01   4.2633712e-01   4.1835467e-01   5.5597597e-01   4.5768215e-01   5.2292685e-01   4.1877489e-01   5.6541976e-01   4.4406435e-01   5.5240885e-01   5.0657081e-01   5.0216108e-01   4.7452659e-01   4.0930806e-01   4.4303784e-01   5.1082488e-01   4.1541892e-01   5.3406968e-01   5.2368299e-01   5.0449934e-01   4.5807263e-01   5.0263701e-01   4.4952858e-01   4.6823972e-01   4.6855914e-01   8.7198254e-03   1.2902931e-03   1.1684021e-03   1.6341127e-03   1.0742763e-03   2.6208124e-03   1.1173357e-03   8.9620141e-04   1.6960301e-02   1.4197837e-02   5.6586090e-04   2.0157829e-03   1.9836256e-03   5.6586090e-04   2.0413623e-03   1.1637665e-03   5.4511725e-03   1.0718252e-02   6.5990100e-03   2.7263257e-03   7.7966832e-03   1.5754002e-04   8.7922744e-03   3.0619296e-03   3.8030551e-03   1.0550593e-03   1.7203244e-01   1.7235723e-01   2.0751307e-01   2.4611820e-01   2.2109400e-01   2.4491699e-01   1.9298922e-01   1.5421652e-01   2.0061094e-01   2.0129686e-01   2.2934517e-01   1.7603988e-01   2.2070889e-01   2.3964854e-01   1.2009621e-01   1.5990877e-01   2.3601974e-01   1.8834267e-01   2.9339046e-01   1.9567575e-01   2.4748464e-01   1.6217086e-01   3.0116422e-01   2.4364046e-01   1.7530938e-01   1.7223213e-01   2.2701156e-01   2.4439785e-01   2.2188150e-01   1.3311613e-01   1.9877894e-01   1.8311301e-01   1.6845668e-01   3.3339209e-01   2.5192873e-01   1.7150268e-01   1.9350184e-01   2.5414415e-01   1.7271733e-01   2.2071334e-01   2.6313203e-01   2.1605186e-01   1.9141813e-01   1.6255272e-01   2.1936783e-01   1.7996851e-01   1.9179556e-01   1.8227672e-01   1.0300751e-01   1.8912086e-01   4.3075013e-01   3.7158844e-01   3.4752045e-01   3.6713693e-01   3.9134187e-01   3.9105984e-01   3.8378198e-01   3.7272538e-01   4.0046876e-01   3.2297138e-01   2.5826699e-01   3.4601238e-01   3.1932057e-01   4.0113556e-01   4.0033459e-01   3.0938917e-01   3.2551476e-01   3.2781102e-01   4.6405632e-01   3.7102765e-01   3.2659021e-01   3.5371449e-01   4.0659862e-01   2.9405620e-01   3.1978995e-01   3.1753736e-01   2.7499746e-01   2.7161605e-01   3.8895029e-01   3.0476818e-01   3.5833770e-01   2.7419176e-01   3.9644448e-01   2.9409120e-01   3.9304592e-01   3.4147602e-01   3.4611220e-01   3.2290811e-01   2.6406812e-01   2.8867894e-01   3.4717424e-01   2.6265032e-01   3.7158844e-01   3.6154105e-01   3.4316147e-01   2.9940560e-01   3.3824889e-01   2.9538166e-01   3.1708459e-01   3.1834036e-01   8.7316989e-03   6.7615313e-03   6.7580543e-03   9.6081666e-03   2.0657605e-03   3.8371349e-03   1.4271025e-02   1.2184393e-02   1.6084765e-02   4.9831593e-03   1.4699244e-02   1.4912454e-02   4.9831593e-03   6.5028816e-03   6.2489819e-03   1.3726162e-02   3.1411524e-02   7.7445772e-03   1.1141212e-02   2.5000477e-03   1.1143820e-02   6.1604304e-03   5.3711085e-03   7.5849080e-03   8.1835455e-03   1.6688130e-01   1.6291433e-01   2.0003066e-01   2.4149909e-01   2.1722570e-01   2.2445012e-01   1.7758122e-01   1.4623090e-01   1.9343386e-01   1.8753794e-01   2.2568158e-01   1.6690274e-01   2.2030573e-01   2.2323949e-01   1.1699096e-01   1.5725818e-01   2.1323159e-01   1.7489777e-01   2.9532205e-01   1.8786273e-01   2.2655558e-01   1.6049736e-01   2.9226070e-01   2.2550223e-01   1.7083413e-01   1.6938578e-01   2.2221647e-01   2.3649790e-01   2.0956346e-01   1.3266766e-01   1.9299947e-01   1.7760033e-01   1.6320695e-01   3.1350837e-01   2.2421748e-01   1.5253844e-01   1.8664517e-01   2.5447595e-01   1.5560691e-01   2.1266187e-01   2.4223633e-01   2.0012528e-01   1.8549850e-01   1.5864276e-01   2.0519641e-01   1.6093217e-01   1.7628990e-01   1.7435363e-01   1.0801101e-01   1.7763987e-01   4.0351234e-01   3.5280598e-01   3.3582666e-01   3.4348161e-01   3.7251839e-01   3.7541634e-01   3.5722931e-01   3.5450932e-01   3.8642215e-01   3.0688243e-01   2.4703841e-01   3.3487550e-01   3.1018257e-01   3.8808655e-01   3.8990045e-01   2.9749231e-01   3.0596368e-01   3.0291072e-01   4.5287211e-01   3.5944458e-01   3.1570031e-01   3.3498082e-01   3.9202879e-01   2.8759651e-01   3.0023966e-01   2.9853735e-01   2.6729925e-01   2.5639363e-01   3.7372548e-01   2.8896987e-01   3.4745520e-01   2.5469579e-01   3.8297689e-01   2.7675896e-01   3.6463006e-01   3.3839246e-01   3.2358656e-01   2.9982548e-01   2.4898596e-01   2.8176933e-01   3.3810925e-01   2.6587897e-01   3.5280598e-01   3.4488951e-01   3.3055981e-01   2.9862862e-01   3.3464036e-01   2.8522813e-01   2.9487313e-01   2.9445589e-01   4.3312037e-03   5.1674385e-03   4.6600432e-03   4.1032398e-03   1.3249619e-03   3.6837745e-03   2.4877830e-02   2.2958753e-02   1.1314391e-03   6.3769043e-03   6.2810489e-03   1.1314391e-03   5.7702159e-03   4.1635898e-03   1.1902706e-02   7.2040189e-03   1.2293784e-02   7.6706139e-03   1.1339253e-02   1.8296747e-03   1.4280945e-02   6.9429868e-03   8.6587607e-03   4.4388406e-03   1.4462991e-01   1.4494206e-01   1.7756526e-01   2.1378771e-01   1.9031042e-01   2.1286860e-01   1.6419734e-01   1.2822571e-01   1.7113301e-01   1.7185341e-01   1.9804950e-01   1.4833973e-01   1.9005998e-01   2.0775634e-01   9.7105565e-02   1.3348080e-01   2.0467358e-01   1.5981923e-01   2.5874568e-01   1.6653873e-01   2.1530133e-01   1.3558698e-01   2.6575883e-01   2.1156399e-01   1.4766732e-01   1.4484877e-01   1.9583483e-01   2.1211626e-01   1.9101641e-01   1.0897783e-01   1.6943757e-01   1.5488355e-01   1.4132668e-01   2.9650216e-01   2.1994601e-01   1.4455458e-01   1.6451956e-01   2.2152336e-01   1.4555202e-01   1.8989624e-01   2.3000345e-01   1.8566766e-01   1.6258902e-01   1.3589561e-01   1.8870744e-01   1.5235300e-01   1.6309487e-01   1.5410176e-01   8.1942750e-02   1.6048904e-01   3.8999083e-01   3.3294245e-01   3.0988325e-01   3.2882841e-01   3.5187047e-01   3.5156617e-01   3.4487977e-01   3.3402051e-01   3.6059894e-01   2.8649814e-01   2.2516617e-01   3.0844683e-01   2.8301726e-01   3.6124416e-01   3.6050400e-01   2.7355262e-01   2.8899505e-01   2.9139815e-01   4.2192237e-01   3.3236960e-01   2.8992253e-01   3.1585310e-01   3.6648886e-01   2.5905330e-01   2.8355149e-01   2.8139447e-01   2.4097820e-01   2.3780572e-01   3.4954046e-01   2.6919588e-01   3.2022959e-01   2.4036369e-01   3.5673540e-01   2.5910558e-01   3.5384915e-01   3.0430469e-01   3.0871278e-01   2.8664912e-01   2.3068275e-01   2.5394489e-01   3.0958210e-01   2.2970603e-01   3.3294245e-01   3.2329736e-01   3.0571743e-01   2.6432145e-01   3.0120271e-01   2.6026006e-01   2.8107880e-01   2.8234890e-01   3.9333334e-05   2.5761851e-04   1.3896575e-03   1.7536063e-03   1.9216331e-03   9.2702772e-03   7.4022776e-03   1.3090644e-03   1.5444025e-03   1.6252591e-03   1.3090644e-03   1.2151407e-04   1.0618022e-05   2.1493524e-03   1.8833153e-02   2.2172388e-03   7.3253783e-04   3.6800655e-03   1.5497854e-03   3.6733784e-03   4.9421897e-04   7.6664670e-04   7.0183041e-05   1.9407897e-01   1.9337938e-01   2.3114302e-01   2.7244640e-01   2.4629979e-01   2.6718506e-01   2.1373312e-01   1.7438911e-01   2.2391848e-01   2.2298785e-01   2.5503185e-01   1.9737603e-01   2.4663659e-01   2.6276403e-01   1.3891547e-01   1.8173656e-01   2.5713590e-01   2.0933386e-01   3.2324703e-01   2.1854256e-01   2.6975489e-01   1.8436571e-01   3.2904939e-01   2.6649404e-01   1.9772084e-01   1.9481826e-01   2.5232520e-01   2.6989379e-01   2.4511828e-01   1.5354404e-01   2.2230840e-01   2.0576951e-01   1.9024966e-01   3.5987888e-01   2.7239312e-01   1.8983400e-01   2.1646886e-01   2.8191043e-01   1.9167912e-01   2.4493869e-01   2.8620678e-01   2.3801287e-01   2.1448199e-01   1.8427005e-01   2.4198503e-01   1.9884520e-01   2.1243903e-01   2.0430599e-01   1.2215728e-01   2.1067715e-01   4.5871846e-01   3.9981904e-01   3.7661173e-01   3.9390784e-01   4.2025710e-01   4.2076082e-01   4.1035332e-01   4.0114215e-01   4.3087129e-01   3.5002279e-01   2.8365040e-01   3.7517763e-01   3.4790525e-01   4.3179681e-01   4.3157518e-01   3.3691557e-01   3.5177012e-01   3.5268567e-01   4.9705280e-01   4.0100475e-01   3.5505921e-01   3.8129652e-01   4.3707681e-01   3.2219168e-01   3.4580868e-01   3.4360838e-01   3.0200588e-01   2.9663386e-01   4.1868171e-01   3.3113109e-01   3.8802094e-01   2.9819354e-01   4.2685142e-01   3.1959000e-01   4.1941543e-01   3.7225097e-01   3.7239048e-01   3.4809183e-01   2.8876177e-01   3.1647952e-01   3.7686145e-01   2.9138730e-01   3.9981904e-01   3.8994709e-01   3.7187123e-01   3.2897937e-01   3.6879196e-01   3.2272643e-01   3.4226532e-01   3.4310531e-01   3.4181612e-04   1.4644608e-03   2.1632573e-03   2.3231555e-03   8.1286280e-03   6.3818616e-03   1.7262411e-03   1.6624580e-03   1.7631926e-03   1.7262411e-03   2.4569053e-05   5.6859581e-05   1.7551896e-03   2.0541034e-02   1.6702311e-03   5.9025530e-04   3.2341087e-03   2.0408948e-03   3.0131078e-03   2.8888789e-04   4.5924146e-04   1.3293684e-04   1.9862431e-01   1.9776069e-01   2.3600084e-01   2.7779005e-01   2.5142895e-01   2.7187023e-01   2.1810101e-01   1.7860088e-01   2.2871390e-01   2.2752286e-01   2.6024955e-01   2.0181434e-01   2.5187795e-01   2.6758248e-01   1.4283878e-01   1.8622396e-01   2.6161990e-01   2.1373552e-01   3.2920505e-01   2.2325952e-01   2.7444329e-01   1.8891553e-01   3.3470963e-01   2.7127428e-01   2.0233024e-01   1.9944956e-01   2.5748056e-01   2.7510316e-01   2.4993365e-01   1.5775267e-01   2.2713624e-01   2.1043184e-01   1.9474801e-01   3.6534538e-01   2.7678503e-01   1.9377126e-01   2.2119834e-01   2.8749014e-01   1.9572304e-01   2.4991164e-01   2.9104517e-01   2.4261230e-01   2.1922346e-01   1.8874518e-01   2.4669621e-01   2.0288553e-01   2.1678869e-01   2.0886650e-01   1.2608625e-01   2.1517216e-01   4.6449792e-01   4.0560127e-01   3.8251194e-01   3.9944814e-01   4.2616553e-01   4.2679596e-01   4.1587264e-01   4.0695550e-01   4.3702628e-01   3.5557170e-01   2.8885981e-01   3.8108822e-01   3.5369655e-01   4.3799369e-01   4.3786355e-01   3.4252750e-01   3.5719184e-01   3.5788232e-01   5.0366583e-01   4.0706759e-01   3.6083966e-01   3.8695887e-01   4.4324858e-01   3.2788328e-01   3.5118655e-01   3.4899273e-01   3.0749578e-01   3.0179987e-01   4.2472010e-01   3.3655063e-01   3.9402558e-01   3.0319627e-01   4.3300399e-01   3.2485825e-01   4.2490754e-01   3.7841034e-01   3.7783349e-01   3.5333537e-01   2.9386653e-01   3.2211174e-01   3.8285611e-01   2.9712888e-01   4.0560127e-01   3.9574961e-01   3.7770634e-01   3.3490218e-01   3.7491174e-01   3.2829405e-01   3.4750328e-01   3.4827580e-01   2.7893549e-03   2.7277911e-03   9.4108270e-04   1.0799149e-02   7.7770747e-03   1.9770194e-03   5.4325768e-04   5.8945201e-04   1.9770194e-03   5.1514113e-04   3.6478892e-04   1.6876295e-03   1.7172006e-02   2.9808015e-03   3.7816236e-04   5.6735840e-03   1.0535544e-03   5.0675384e-03   1.2248969e-03   1.1742680e-03   5.8878380e-05   1.9840502e-01   1.9840646e-01   2.3601178e-01   2.7699198e-01   2.5062921e-01   2.7429513e-01   2.1981939e-01   1.7908511e-01   2.2870797e-01   2.2884763e-01   2.5935890e-01   2.0237179e-01   2.5038976e-01   2.6920634e-01   1.4261267e-01   1.8559031e-01   2.6457877e-01   2.1508394e-01   3.2684946e-01   2.2341437e-01   2.7694800e-01   1.8806980e-01   3.3447269e-01   2.7322826e-01   2.0195195e-01   1.9876628e-01   2.5683031e-01   2.7497319e-01   2.5083242e-01   1.5688509e-01   2.2686098e-01   2.1020792e-01   1.9457412e-01   3.6717222e-01   2.8066992e-01   1.9637709e-01   2.2117475e-01   2.8566080e-01   1.9793610e-01   2.4995417e-01   2.9345115e-01   2.4428403e-01   2.1902512e-01   1.8834472e-01   2.4798811e-01   2.0544380e-01   2.1853532e-01   2.0913443e-01   1.2439434e-01   2.1611468e-01   4.6739623e-01   4.0702486e-01   3.8261075e-01   4.0188705e-01   4.2751037e-01   4.2749738e-01   4.1883120e-01   4.0825884e-01   4.3736523e-01   3.5667688e-01   2.8932174e-01   3.8108192e-01   3.5341594e-01   4.3812879e-01   4.3747647e-01   3.4285168e-01   3.5898948e-01   3.6076578e-01   5.0317788e-01   4.0703744e-01   3.6087589e-01   3.8845434e-01   4.4366743e-01   3.2719263e-01   3.5301257e-01   3.5071770e-01   3.0715395e-01   3.0299726e-01   4.2534595e-01   3.3768843e-01   3.9391146e-01   3.0525217e-01   4.3324318e-01   3.2636388e-01   4.2820876e-01   3.7681443e-01   3.8013938e-01   3.5586945e-01   2.9507753e-01   3.2153910e-01   3.8242816e-01   2.9467977e-01   4.0702486e-01   3.9678588e-01   3.7800850e-01   3.3305200e-01   3.7343525e-01   3.2833826e-01   3.4988792e-01   3.5099795e-01   7.6889988e-04   5.5936308e-03   9.7548717e-03   1.0412603e-02   1.0389613e-03   5.7781385e-03   5.9052415e-03   1.0389613e-03   1.4340775e-03   1.1584691e-03   6.0259991e-03   2.1726707e-02   3.4598658e-03   3.9021886e-03   1.8160607e-03   3.9104990e-03   3.6199548e-03   1.2013216e-03   2.4248068e-03   2.0560641e-03   1.7726458e-01   1.7519789e-01   2.1239850e-01   2.5350621e-01   2.2831460e-01   2.4335474e-01   1.9301815e-01   1.5733953e-01   2.0548992e-01   2.0248973e-01   2.3687424e-01   1.7915768e-01   2.2981656e-01   2.4028800e-01   1.2483249e-01   1.6617415e-01   2.3289941e-01   1.8936545e-01   3.0533170e-01   2.0007138e-01   2.4571617e-01   1.6904051e-01   3.0733551e-01   2.4338605e-01   1.8100871e-01   1.7874491e-01   2.3386295e-01   2.4993365e-01   2.2441376e-01   1.3976123e-01   2.0438723e-01   1.8845276e-01   1.7353191e-01   3.3400984e-01   2.4631085e-01   1.6886156e-01   1.9837340e-01   2.6441281e-01   1.7118963e-01   2.2560913e-01   2.6174131e-01   2.1639026e-01   1.9675554e-01   1.6819987e-01   2.2078897e-01   1.7753606e-01   1.9173589e-01   1.8624992e-01   1.1156657e-01   1.9127963e-01   4.2879129e-01   3.7350470e-01   3.5299849e-01   3.6620603e-01   3.9355975e-01   3.9506070e-01   3.8147101e-01   3.7498057e-01   4.0550993e-01   3.2554347e-01   2.6225589e-01   3.5177359e-01   3.2570798e-01   4.0674255e-01   4.0737898e-01   3.1405475e-01   3.2617446e-01   3.2545044e-01   4.7160294e-01   3.7696723e-01   3.3214002e-01   3.5535112e-01   4.1144267e-01   3.0143840e-01   3.2034131e-01   3.1835849e-01   2.8130938e-01   2.7364725e-01   3.9315179e-01   3.0715437e-01   3.6445309e-01   2.7384746e-01   4.0174546e-01   2.9539622e-01   3.8981435e-01   3.5158797e-01   3.4545598e-01   3.2149982e-01   2.6601526e-01   2.9570609e-01   3.5410378e-01   2.7466513e-01   3.7350470e-01   3.6448827e-01   3.4805708e-01   3.0999906e-01   3.4801807e-01   3.0074518e-01   3.1606363e-01   3.1638243e-01   3.9211584e-03   1.5428451e-02   1.5051422e-02   9.3641634e-05   5.2251987e-03   5.2564865e-03   9.3641634e-05   2.4059863e-03   1.5411207e-03   7.7716003e-03   1.4517538e-02   6.4009679e-03   4.6963365e-03   4.9429047e-03   2.1131701e-03   7.3135995e-03   2.7662314e-03   4.2415669e-03   2.1979302e-03   1.6154877e-01   1.6047147e-01   1.9568300e-01   2.3468417e-01   2.1025394e-01   2.2838581e-01   1.7884422e-01   1.4313754e-01   1.8898793e-01   1.8753794e-01   2.1845622e-01   1.6418759e-01   2.1103286e-01   2.2447017e-01   1.1131548e-01   1.5046796e-01   2.1889519e-01   1.7489777e-01   2.8359045e-01   1.8392350e-01   2.3077309e-01   1.5301294e-01   2.8765002e-01   2.2785871e-01   1.6499082e-01   1.6250540e-01   2.1577964e-01   2.3190311e-01   2.0826660e-01   1.2493129e-01   1.8764327e-01   1.7232008e-01   1.5800409e-01   3.1597925e-01   2.3306671e-01   1.5663136e-01   1.8209705e-01   2.4426589e-01   1.5839676e-01   2.0849973e-01   2.4621874e-01   2.0137281e-01   1.8035428e-01   1.5264734e-01   2.0519641e-01   1.6491824e-01   1.7763987e-01   1.7071018e-01   9.7334595e-02   1.7628990e-01   4.1013753e-01   3.5415853e-01   3.3261378e-01   3.4819629e-01   3.7372548e-01   3.7447405e-01   3.6377706e-01   3.5546726e-01   3.8432564e-01   3.0688243e-01   2.4450319e-01   3.3130276e-01   3.0553473e-01   3.8531353e-01   3.8537934e-01   2.9480414e-01   3.0829006e-01   3.0887441e-01   4.4839112e-01   3.5594109e-01   3.1215369e-01   3.3646690e-01   3.9023537e-01   2.8142851e-01   3.0262656e-01   3.0057353e-01   2.6218143e-01   2.5639363e-01   3.7251839e-01   2.8896987e-01   3.4359589e-01   2.5757650e-01   3.8052352e-01   2.7792266e-01   3.7237623e-01   3.2948525e-01   3.2773210e-01   3.0459398e-01   2.4898596e-01   2.7596310e-01   3.3313575e-01   2.5365041e-01   3.5415853e-01   3.4488951e-01   3.2799981e-01   2.8862094e-01   3.2611271e-01   2.8152144e-01   2.9910812e-01   2.9982464e-01   1.7874931e-02   1.3166667e-02   2.8067647e-03   5.4483543e-04   4.8491153e-04   2.8067647e-03   2.7932574e-03   2.1120566e-03   4.0283644e-03   1.1006031e-02   7.1968081e-03   1.9824114e-03   1.0903705e-02   3.4373671e-04   1.0364284e-02   4.2441401e-03   4.1832512e-03   1.3456492e-03   1.8893734e-01   1.9027350e-01   2.2602463e-01   2.6493124e-01   2.3909907e-01   2.6731994e-01   2.1287273e-01   1.7119179e-01   2.1885648e-01   2.2106766e-01   2.4751153e-01   1.9400411e-01   2.3783986e-01   2.6104566e-01   1.3465024e-01   1.7581619e-01   2.5867158e-01   2.0765719e-01   3.1157756e-01   2.1392913e-01   2.7004976e-01   1.7791371e-01   3.2221942e-01   2.6551484e-01   1.9215572e-01   1.8858682e-01   2.4539617e-01   2.6396374e-01   2.4190361e-01   1.4753547e-01   2.1663955e-01   2.0044864e-01   1.8527044e-01   3.5759997e-01   2.7597540e-01   1.9143761e-01   2.1146655e-01   2.7190276e-01   1.9231433e-01   2.3971651e-01   2.8607417e-01   2.3671699e-01   2.0909909e-01   1.7885289e-01   2.3973819e-01   2.0020124e-01   2.1166375e-01   2.0015528e-01   1.1482314e-01   2.0802247e-01   4.5814031e-01   3.9622068e-01   3.7010544e-01   3.9277065e-01   4.1629822e-01   4.1528170e-01   4.1031284e-01   3.9724817e-01   4.2445794e-01   3.4613203e-01   2.7894605e-01   3.6843870e-01   3.4078468e-01   4.2489846e-01   4.2345869e-01   3.3131814e-01   3.4950009e-01   3.5299308e-01   4.8820349e-01   3.9397890e-01   3.4860920e-01   3.7803314e-01   4.3080058e-01   3.1437592e-01   3.4366436e-01   3.4124618e-01   2.9521701e-01   2.9351505e-01   4.1304236e-01   3.2750551e-01   3.8091343e-01   2.9709224e-01   4.2023724e-01   3.1695286e-01   4.2011817e-01   3.6184591e-01   3.7113199e-01   3.4760954e-01   2.8576301e-01   3.0899799e-01   3.6912287e-01   2.7985004e-01   3.9622068e-01   3.8552168e-01   3.6588486e-01   3.1841134e-01   3.5869504e-01   3.1661834e-01   3.4148439e-01   3.4312143e-01   1.2983249e-03   1.5471006e-02   1.3470267e-02   1.3877317e-02   1.5471006e-02   7.2739782e-03   9.2612860e-03   6.0792360e-03   5.4160667e-02   2.4574168e-03   8.1477262e-03   3.8451807e-03   1.8194605e-02   1.5067164e-03   5.6792549e-03   4.8846913e-03   1.0004616e-02   2.6108642e-01   2.5718656e-01   3.0162187e-01   3.4990044e-01   3.2118558e-01   3.3212064e-01   2.7586622e-01   2.3634761e-01   2.9366681e-01   2.8770633e-01   3.3110877e-01   2.6200119e-01   3.2383134e-01   3.3046521e-01   1.9829106e-01   2.4860521e-01   3.1887574e-01   2.7240198e-01   4.1018982e-01   2.8711577e-01   3.3461178e-01   2.5228731e-01   4.0944673e-01   3.3325697e-01   2.6572836e-01   2.6351234e-01   3.2731613e-01   3.4479515e-01   3.1382719e-01   2.1730674e-01   2.9282566e-01   2.7420761e-01   2.5662111e-01   4.3493335e-01   3.3165524e-01   2.4546083e-01   2.8544328e-01   3.6363165e-01   2.4916639e-01   3.1676067e-01   3.5299851e-01   3.0301330e-01   2.8384547e-01   2.5066938e-01   3.0887732e-01   2.5579752e-01   2.7431070e-01   2.7082223e-01   1.8355500e-01   2.7545202e-01   5.3566205e-01   4.7913827e-01   4.5930782e-01   4.6887050e-01   5.0113940e-01   5.0408511e-01   4.8425611e-01   4.8100390e-01   5.1611676e-01   4.2712908e-01   3.5770237e-01   4.5815125e-01   4.2990067e-01   5.1783166e-01   5.1944925e-01   4.1592191e-01   4.2634771e-01   4.2297928e-01   5.8870710e-01   4.8576650e-01   4.3645958e-01   4.5912638e-01   5.2238783e-01   4.0361731e-01   4.1983156e-01   4.1785974e-01   3.8054730e-01   3.6909926e-01   5.0215992e-01   4.0667536e-01   4.7224138e-01   3.6745640e-01   5.1222367e-01   3.9280819e-01   4.9246039e-01   4.6045456e-01   4.4643751e-01   4.1946868e-01   3.6048019e-01   3.9703515e-01   4.6143668e-01   3.7590038e-01   4.7913827e-01   4.7009550e-01   4.5350904e-01   4.1479012e-01   4.5636227e-01   4.0162438e-01   4.1380491e-01   4.1334093e-01   1.4411876e-02   8.7935053e-03   9.1184252e-03   1.4411876e-02   5.7453578e-03   7.6054776e-03   2.7409931e-03   4.7624677e-02   1.8780439e-03   4.9746662e-03   5.9684857e-03   1.4534556e-02   2.3601867e-03   4.9286760e-03   3.4466344e-03   7.5341006e-03   2.6746877e-01   2.6516664e-01   3.0921139e-01   3.5673992e-01   3.2754140e-01   3.4481450e-01   2.8624779e-01   2.4359422e-01   3.0108022e-01   2.9756219e-01   3.3745616e-01   2.6990583e-01   3.2887946e-01   3.4163113e-01   2.0331657e-01   2.5392638e-01   3.3233847e-01   2.8201820e-01   4.1489235e-01   2.9472025e-01   3.4749512e-01   2.5726587e-01   4.1828245e-01   3.4508966e-01   2.7189140e-01   2.6903465e-01   3.3406888e-01   3.5284896e-01   3.2333666e-01   2.2149953e-01   2.9970099e-01   2.8083524e-01   2.6300357e-01   4.4804341e-01   3.4702929e-01   2.5691578e-01   2.9267142e-01   3.6866600e-01   2.5996213e-01   3.2467728e-01   3.6599412e-01   3.1379996e-01   2.9070461e-01   2.5648991e-01   3.1904849e-01   2.6736905e-01   2.8471636e-01   2.7833907e-01   1.8530093e-01   2.8435281e-01   5.5199539e-01   4.9206433e-01   4.6946939e-01   4.8356355e-01   5.1418554e-01   5.1595196e-01   5.0010048e-01   4.9372697e-01   5.2743722e-01   4.3877522e-01   3.6710197e-01   4.6809646e-01   4.3893984e-01   5.2878375e-01   5.2942069e-01   4.2592703e-01   4.3928640e-01   4.3789059e-01   5.9924430e-01   4.9601715e-01   4.4619754e-01   4.7193405e-01   5.3393309e-01   4.1149136e-01   4.3273356e-01   4.3054493e-01   3.8875406e-01   3.8007672e-01   5.1386048e-01   4.1809676e-01   4.8216133e-01   3.8002405e-01   5.2330849e-01   4.0472333e-01   5.0903363e-01   4.6735136e-01   4.6059448e-01   4.3368525e-01   3.7134977e-01   4.0504167e-01   4.7061436e-01   3.7989795e-01   4.9206433e-01   4.8217825e-01   4.6398354e-01   4.2055878e-01   4.6343857e-01   4.1088828e-01   4.2766517e-01   4.2782051e-01   4.0251529e-03   4.0402030e-03   0.0000000e+00   2.0104773e-03   1.1579294e-03   6.7733512e-03   1.3328703e-02   6.1195429e-03   3.8280621e-03   5.4471697e-03   1.3203495e-03   7.3930866e-03   2.5511055e-03   3.8011014e-03   1.5935161e-03   1.6488937e-01   1.6420208e-01   1.9946134e-01   2.3841307e-01   2.1377841e-01   2.3352484e-01   1.8323739e-01   1.4660873e-01   1.9269692e-01   1.9183992e-01   2.2200730e-01   1.6791595e-01   2.1423078e-01   2.2922867e-01   1.1407468e-01   1.5349471e-01   2.2418179e-01   1.7908948e-01   2.8692621e-01   1.8765985e-01   2.3596576e-01   1.5596498e-01   2.9203641e-01   2.3278981e-01   1.6829150e-01   1.6563525e-01   2.1942293e-01   2.3592536e-01   2.1256421e-01   1.2755291e-01   1.9121342e-01   1.7576718e-01   1.6132929e-01   3.2148865e-01   2.3885357e-01   1.6118125e-01   1.8573297e-01   2.4757051e-01   1.6279862e-01   2.1240660e-01   2.5149161e-01   2.0595435e-01   1.8389163e-01   1.5580881e-01   2.0964365e-01   1.6953436e-01   1.8203376e-01   1.7437090e-01   9.9184065e-02   1.8031354e-01   4.1664204e-01   3.5971944e-01   3.3744612e-01   3.5416868e-01   3.7936058e-01   3.7982315e-01   3.7006184e-01   3.6098196e-01   3.8956200e-01   3.1201251e-01   2.4889912e-01   3.3607844e-01   3.1002022e-01   3.9046127e-01   3.9028467e-01   2.9949936e-01   3.1373736e-01   3.1479561e-01   4.5355800e-01   3.6085089e-01   3.1682959e-01   3.4195608e-01   3.9553949e-01   2.8555816e-01   3.0804941e-01   3.0593834e-01   2.6633772e-01   2.6121338e-01   3.7782244e-01   2.9399549e-01   3.4839508e-01   2.6278429e-01   3.8569374e-01   2.8303600e-01   3.7885421e-01   3.3349568e-01   3.3352424e-01   3.1033775e-01   2.5375578e-01   2.8011018e-01   3.3772574e-01   2.5671985e-01   3.5971944e-01   3.5022311e-01   3.3289784e-01   2.9224130e-01   3.3016010e-01   2.8599652e-01   3.0475125e-01   3.0561759e-01   3.0700267e-06   4.0251529e-03   1.9467123e-03   1.7971688e-03   1.7301608e-03   1.6293141e-02   4.7718752e-03   6.8454231e-04   9.3235659e-03   1.4106675e-03   7.7429721e-03   3.1097831e-03   2.5391665e-03   9.5764453e-04   2.0739268e-01   2.0836358e-01   2.4589773e-01   2.8656370e-01   2.5981614e-01   2.8739169e-01   2.3131893e-01   1.8849968e-01   2.3845740e-01   2.4007299e-01   2.6857108e-01   2.1230255e-01   2.5877066e-01   2.8137449e-01   1.5046312e-01   1.9386671e-01   2.7809337e-01   2.2610426e-01   3.3523485e-01   2.3325794e-01   2.9016640e-01   1.9614834e-01   3.4542234e-01   2.8580893e-01   2.1082239e-01   2.0722978e-01   2.6628244e-01   2.8528108e-01   2.6193836e-01   1.6431358e-01   2.3627495e-01   2.1939954e-01   2.0354344e-01   3.8077948e-01   2.9536596e-01   2.0839572e-01   2.3078002e-01   2.9414568e-01   2.0957408e-01   2.6009226e-01   3.0679254e-01   2.5613081e-01   2.2839644e-01   1.9694047e-01   2.5948108e-01   2.1757899e-01   2.3004331e-01   2.1886202e-01   1.3010315e-01   2.2671016e-01   4.8309156e-01   4.2059741e-01   3.9446827e-01   4.1650857e-01   4.4118694e-01   4.4046177e-01   4.3416675e-01   4.2171124e-01   4.5001131e-01   3.6938174e-01   3.0049261e-01   3.9280494e-01   3.6453208e-01   4.5055186e-01   4.4930066e-01   3.5453263e-01   3.7247610e-01   3.7543144e-01   5.1540859e-01   4.1899010e-01   3.7243361e-01   4.0192295e-01   4.5645786e-01   3.3753686e-01   3.6646355e-01   3.6403348e-01   3.1765048e-01   3.1516192e-01   4.3820660e-01   3.5021371e-01   4.0564147e-01   3.1837605e-01   4.4574076e-01   3.3915719e-01   4.4399141e-01   3.8666018e-01   3.9439941e-01   3.7011128e-01   3.0715348e-01   3.3195062e-01   3.9368522e-01   3.0254596e-01   4.2059741e-01   4.0983289e-01   3.9004780e-01   3.4211299e-01   3.8338579e-01   3.3953411e-01   3.6390344e-01   3.6538415e-01   4.0402030e-03   2.0647746e-03   1.8810615e-03   1.8744038e-03   1.5904825e-02   5.0089073e-03   7.7718458e-04   9.5962272e-03   1.3536136e-03   8.0354537e-03   3.2683077e-03   2.7053207e-03   1.0204136e-03   2.0663566e-01   2.0767698e-01   2.4509318e-01   2.8563097e-01   2.5892354e-01   2.8672996e-01   2.3068420e-01   1.8783705e-01   2.3766371e-01   2.3938906e-01   2.6765771e-01   2.1160129e-01   2.5782529e-01   2.8065126e-01   1.4982077e-01   1.9310124e-01   2.7749364e-01   2.2544624e-01   3.3411471e-01   2.3248629e-01   2.8950769e-01   1.9536146e-01   3.4445558e-01   2.8510792e-01   2.1004612e-01   2.0643532e-01   2.6539182e-01   2.8440424e-01   2.6118254e-01   1.6358877e-01   2.3546280e-01   2.1862058e-01   2.0279724e-01   3.7994304e-01   2.9482551e-01   2.0788172e-01   2.2999781e-01   2.9312113e-01   2.0902225e-01   2.5926765e-01   3.0610117e-01   2.5545076e-01   2.2760393e-01   1.9618808e-01   2.5876275e-01   2.1704368e-01   2.2941326e-01   2.1812470e-01   1.2939132e-01   2.2601611e-01   4.8224276e-01   4.1968249e-01   3.9347110e-01   4.1568549e-01   4.4024422e-01   4.3946585e-01   4.3337086e-01   4.2078495e-01   4.4897602e-01   3.6849705e-01   2.9964288e-01   3.9180103e-01   3.6353845e-01   4.4949934e-01   4.4820701e-01   3.5360058e-01   3.7164688e-01   3.7469388e-01   5.1424729e-01   4.1795596e-01   3.7145645e-01   4.0103422e-01   4.5542290e-01   3.3654347e-01   3.6564394e-01   3.6320808e-01   3.1671115e-01   3.1435391e-01   4.3720666e-01   3.4935506e-01   4.0461470e-01   3.1763784e-01   4.4470146e-01   3.3834387e-01   4.4321597e-01   3.8553656e-01   3.9358898e-01   3.6934910e-01   3.0635763e-01   3.3097385e-01   3.9264615e-01   3.0146236e-01   4.1968249e-01   4.0889669e-01   3.8907226e-01   3.4102273e-01   3.8227517e-01   3.3859771e-01   3.6313559e-01   3.6464431e-01   2.0104773e-03   1.1579294e-03   6.7733512e-03   1.3328703e-02   6.1195429e-03   3.8280621e-03   5.4471697e-03   1.3203495e-03   7.3930866e-03   2.5511055e-03   3.8011014e-03   1.5935161e-03   1.6488937e-01   1.6420208e-01   1.9946134e-01   2.3841307e-01   2.1377841e-01   2.3352484e-01   1.8323739e-01   1.4660873e-01   1.9269692e-01   1.9183992e-01   2.2200730e-01   1.6791595e-01   2.1423078e-01   2.2922867e-01   1.1407468e-01   1.5349471e-01   2.2418179e-01   1.7908948e-01   2.8692621e-01   1.8765985e-01   2.3596576e-01   1.5596498e-01   2.9203641e-01   2.3278981e-01   1.6829150e-01   1.6563525e-01   2.1942293e-01   2.3592536e-01   2.1256421e-01   1.2755291e-01   1.9121342e-01   1.7576718e-01   1.6132929e-01   3.2148865e-01   2.3885357e-01   1.6118125e-01   1.8573297e-01   2.4757051e-01   1.6279862e-01   2.1240660e-01   2.5149161e-01   2.0595435e-01   1.8389163e-01   1.5580881e-01   2.0964365e-01   1.6953436e-01   1.8203376e-01   1.7437090e-01   9.9184065e-02   1.8031354e-01   4.1664204e-01   3.5971944e-01   3.3744612e-01   3.5416868e-01   3.7936058e-01   3.7982315e-01   3.7006184e-01   3.6098196e-01   3.8956200e-01   3.1201251e-01   2.4889912e-01   3.3607844e-01   3.1002022e-01   3.9046127e-01   3.9028467e-01   2.9949936e-01   3.1373736e-01   3.1479561e-01   4.5355800e-01   3.6085089e-01   3.1682959e-01   3.4195608e-01   3.9553949e-01   2.8555816e-01   3.0804941e-01   3.0593834e-01   2.6633772e-01   2.6121338e-01   3.7782244e-01   2.9399549e-01   3.4839508e-01   2.6278429e-01   3.8569374e-01   2.8303600e-01   3.7885421e-01   3.3349568e-01   3.3352424e-01   3.1033775e-01   2.5375578e-01   2.8011018e-01   3.3772574e-01   2.5671985e-01   3.5971944e-01   3.5022311e-01   3.3289784e-01   2.9224130e-01   3.3016010e-01   2.8599652e-01   3.0475125e-01   3.0561759e-01   1.3213080e-04   1.6348389e-03   2.1958653e-02   1.3024074e-03   6.2459052e-04   2.7868209e-03   2.5128724e-03   2.4948096e-03   1.5213665e-04   2.9312203e-04   2.6269769e-04   2.0119891e-01   2.0014287e-01   2.3871519e-01   2.8086210e-01   2.5438649e-01   2.7419983e-01   2.2034638e-01   1.8091150e-01   2.3139686e-01   2.2990542e-01   2.6326545e-01   2.0423778e-01   2.5497864e-01   2.7008054e-01   1.4507978e-01   1.8881738e-01   2.6377709e-01   2.1604374e-01   3.3279319e-01   2.2588101e-01   2.7676493e-01   1.9156801e-01   3.3788258e-01   2.7371187e-01   2.0495838e-01   2.0212622e-01   2.6043406e-01   2.7802264e-01   2.5251791e-01   1.6022437e-01   2.2986910e-01   2.1306976e-01   1.9729190e-01   3.6816423e-01   2.7878040e-01   1.9567818e-01   2.2384809e-01   2.9081290e-01   1.9773475e-01   2.5268382e-01   2.9345893e-01   2.4498738e-01   2.2190073e-01   1.9130390e-01   2.4917712e-01   2.0485354e-01   2.1902087e-01   2.1139045e-01   1.2850635e-01   2.1757950e-01   4.6735126e-01   4.0863686e-01   3.8577163e-01   4.0223139e-01   4.2927752e-01   4.3005363e-01   4.1858115e-01   4.1002225e-01   4.4039161e-01   3.5852229e-01   2.9170762e-01   3.8436621e-01   3.5694453e-01   4.4140604e-01   4.4138801e-01   3.4560659e-01   3.5999045e-01   3.6042881e-01   5.0737364e-01   4.1042921e-01   3.6404336e-01   3.8992213e-01   4.4661300e-01   3.3112795e-01   3.5395838e-01   3.5178032e-01   3.1059068e-01   3.0453530e-01   4.2798873e-01   3.3942843e-01   3.9736659e-01   3.0574030e-01   4.3638021e-01   3.2761075e-01   4.2755962e-01   3.8201356e-01   3.8058140e-01   3.5594943e-01   2.9656762e-01   3.2531047e-01   3.8623001e-01   3.0061288e-01   4.0863686e-01   3.9884323e-01   3.8090672e-01   3.3841042e-01   3.7847943e-01   3.3138355e-01   3.5013260e-01   3.5082807e-01   2.3963109e-03   1.8894374e-02   2.2439950e-03   9.0594652e-04   3.4335324e-03   1.6224592e-03   3.5937956e-03   4.5783206e-04   8.1747242e-04   1.3119947e-04   1.9231717e-01   1.9150735e-01   2.2920314e-01   2.7047035e-01   2.4441394e-01   2.6481790e-01   2.1164496e-01   1.7262115e-01   2.2200818e-01   2.2091128e-01   2.5312771e-01   1.9549847e-01   2.4484600e-01   2.6050695e-01   1.3741417e-01   1.8008449e-01   2.5474237e-01   2.0730811e-01   3.2133505e-01   2.1663183e-01   2.6736983e-01   1.8273137e-01   3.2682425e-01   2.6418461e-01   1.9596515e-01   1.9311641e-01   2.5039748e-01   2.6783585e-01   2.4301257e-01   1.5205635e-01   2.2044020e-01   2.0395985e-01   1.8849810e-01   3.5730736e-01   2.6984619e-01   1.8774203e-01   2.1458977e-01   2.8004857e-01   1.8962388e-01   2.4294411e-01   2.8377929e-01   2.3583758e-01   2.1263399e-01   1.8257496e-01   2.3984158e-01   1.9672007e-01   2.1035264e-01   2.0243724e-01   1.2095575e-01   2.0869633e-01   4.5579154e-01   3.9719792e-01   3.7421582e-01   3.9117796e-01   4.1759891e-01   4.1818270e-01   4.0752420e-01   3.9853286e-01   4.2831769e-01   3.4756630e-01   2.8146997e-01   3.7279915e-01   3.4563396e-01   4.2926782e-01   4.2911586e-01   3.3459449e-01   3.4922354e-01   3.5000846e-01   4.9447633e-01   3.9856686e-01   3.5272682e-01   3.7871114e-01   4.3449948e-01   3.2004729e-01   3.4327468e-01   3.4109263e-01   2.9987407e-01   2.9431934e-01   4.1611792e-01   3.2872232e-01   3.8562509e-01   2.9576964e-01   4.2431958e-01   3.1716861e-01   4.1652649e-01   3.7009695e-01   3.6972936e-01   3.4546743e-01   2.8647014e-01   3.1433567e-01   3.7453491e-01   2.8958559e-01   3.9719792e-01   3.8739786e-01   3.6946063e-01   3.2697767e-01   3.6662992e-01   3.2048201e-01   3.3967430e-01   3.4047263e-01   2.8241524e-02   1.4713791e-03   4.6823304e-04   6.0296352e-03   5.2071190e-03   3.4182869e-03   1.9529381e-03   9.1025104e-04   1.8441969e-03   2.3388660e-01   2.3348281e-01   2.7404368e-01   3.1787596e-01   2.8991570e-01   3.1331298e-01   2.5580945e-01   2.1274052e-01   2.6625865e-01   2.6571335e-01   2.9921857e-01   2.3779036e-01   2.8985951e-01   3.0846478e-01   1.7343111e-01   2.2024476e-01   3.0259960e-01   2.5097696e-01   3.7082192e-01   2.6053197e-01   3.1606460e-01   2.2298918e-01   3.7823337e-01   3.1251210e-01   2.3776110e-01   2.3444923e-01   2.9645330e-01   3.1548927e-01   2.8938607e-01   1.8922982e-01   2.6439849e-01   2.4655891e-01   2.2974757e-01   4.1142478e-01   3.1887022e-01   2.2998734e-01   2.5821680e-01   3.2732410e-01   2.3197317e-01   2.8887378e-01   3.3359010e-01   2.8195681e-01   2.5599107e-01   2.2312925e-01   2.8613603e-01   2.3977955e-01   2.5441596e-01   2.4519140e-01   1.5385241e-01   2.5232104e-01   5.1493631e-01   4.5323214e-01   4.2845834e-01   4.4724986e-01   4.7457294e-01   4.7489714e-01   4.6451744e-01   4.5458397e-01   4.8531016e-01   4.0086775e-01   3.3039510e-01   4.2690815e-01   3.9810528e-01   4.8619268e-01   4.8572861e-01   3.8678000e-01   4.0288412e-01   4.0400345e-01   5.5371159e-01   4.5396321e-01   4.0578110e-01   4.3384503e-01   4.9180921e-01   3.7075981e-01   3.9660943e-01   3.9426853e-01   3.4955388e-01   3.4443823e-01   4.7269976e-01   3.8095285e-01   4.4033063e-01   3.4628429e-01   4.8107810e-01   3.6885113e-01   4.7400892e-01   4.2299055e-01   4.2466221e-01   3.9913020e-01   3.3607659e-01   3.6477722e-01   4.2848136e-01   3.3695835e-01   4.5323214e-01   4.4278413e-01   4.2356519e-01   3.7724050e-01   4.1943108e-01   3.7167660e-01   3.9296882e-01   3.9389283e-01   3.3787081e-02   2.1999955e-02   3.5606869e-02   9.7919779e-03   3.8730614e-02   2.5164827e-02   2.6849118e-02   1.7903003e-02   1.2662420e-01   1.3061214e-01   1.5776511e-01   1.8787898e-01   1.6611889e-01   2.0099100e-01   1.5292701e-01   1.1474225e-01   1.5177722e-01   1.5820095e-01   1.7289957e-01   1.3332512e-01   1.6306194e-01   1.9266388e-01   8.3782583e-02   1.1475472e-01   1.9583103e-01   1.4727273e-01   2.2350713e-01   1.4824286e-01   2.0360977e-01   1.1578494e-01   2.3876064e-01   1.9766401e-01   1.2872248e-01   1.2487918e-01   1.7184761e-01   1.8912261e-01   1.7398714e-01   9.1697206e-02   1.4908080e-01   1.3596066e-01   1.2380963e-01   2.7656824e-01   2.1428571e-01   1.3903777e-01   1.4563130e-01   1.9085533e-01   1.3814153e-01   1.6927103e-01   2.1683317e-01   1.7245190e-01   1.4312164e-01   1.1792045e-01   1.7357532e-01   1.4591400e-01   1.5204372e-01   1.3733781e-01   6.4362895e-02   1.4610010e-01   3.6994724e-01   3.0922665e-01   2.8172128e-01   3.0981046e-01   3.2683078e-01   3.2376302e-01   3.2734273e-01   3.0972403e-01   3.3079457e-01   2.6398840e-01   2.0377846e-01   2.7991998e-01   2.5479336e-01   3.3054260e-01   3.2764011e-01   2.4845492e-01   2.6936921e-01   2.7648193e-01   3.8578015e-01   3.0244531e-01   2.6262990e-01   2.9337350e-01   3.3673416e-01   2.3057418e-01   2.6437275e-01   2.6189855e-01   2.1511723e-01   2.1874548e-01   3.2151629e-01   2.4786804e-01   2.9060022e-01   2.2492263e-01   3.2669967e-01   2.4001378e-01   3.3739817e-01   2.6941492e-01   2.9020759e-01   2.7043921e-01   2.1216140e-01   2.2627991e-01   2.7921868e-01   1.9599823e-01   3.0922665e-01   2.9841488e-01   2.7865157e-01   2.3076134e-01   2.6697481e-01   2.3479056e-01   2.6453179e-01   2.6724220e-01   1.8463349e-03   1.7603525e-03   7.3051568e-03   4.1015204e-04   7.6986614e-04   4.1505661e-04   2.5516535e-03   2.2715123e-01   2.2501703e-01   2.6621562e-01   3.1107232e-01   2.8349906e-01   3.0014485e-01   2.4486000e-01   2.0495206e-01   2.5858102e-01   2.5538755e-01   2.9285644e-01   2.2943000e-01   2.8485147e-01   2.9693404e-01   1.6780939e-01   2.1457958e-01   2.8854018e-01   2.4083271e-01   3.6655716e-01   2.5261802e-01   3.0270375e-01   2.1770871e-01   3.6954821e-01   3.0027680e-01   2.3128364e-01   2.2864524e-01   2.8964053e-01   3.0736347e-01   2.7955757e-01   1.8460266e-01   2.5729263e-01   2.3962699e-01   2.2298939e-01   3.9825299e-01   3.0280555e-01   2.1772566e-01   2.5069761e-01   3.2250864e-01   2.2044120e-01   2.8076678e-01   3.2019205e-01   2.7070478e-01   2.4885895e-01   2.1694127e-01   2.7557358e-01   2.2744661e-01   2.4343281e-01   2.3729093e-01   1.5163937e-01   2.4296011e-01   4.9867564e-01   4.4043288e-01   4.1855224e-01   4.3250726e-01   4.6172807e-01   4.6333132e-01   4.4859207e-01   4.4201028e-01   4.7437581e-01   3.8923920e-01   3.2088439e-01   4.1722959e-01   3.8928568e-01   4.7566007e-01   4.7625383e-01   3.7686783e-01   3.8986190e-01   3.8884081e-01   5.4387473e-01   4.4406349e-01   3.9623886e-01   4.2109532e-01   4.8065646e-01   3.6308022e-01   3.8359994e-01   3.8148432e-01   3.4142085e-01   3.3328357e-01   4.6130540e-01   3.6948155e-01   4.3073385e-01   3.3341169e-01   4.7038237e-01   3.5679054e-01   4.5732763e-01   4.1658437e-01   4.1040883e-01   3.8470265e-01   3.2499997e-01   3.5692838e-01   4.1963835e-01   3.3330111e-01   4.4043288e-01   4.3085698e-01   4.1330060e-01   3.7185723e-01   4.1281711e-01   3.6250007e-01   3.7890193e-01   3.7915604e-01   5.4235993e-03   2.5998420e-03   3.8677378e-03   1.1491859e-03   6.2877149e-04   4.8332372e-04   2.1486898e-01   2.1467854e-01   2.5369922e-01   2.9604720e-01   2.6891688e-01   2.9246555e-01   2.3653315e-01   1.9467620e-01   2.4616446e-01   2.4597983e-01   2.7792166e-01   2.1880759e-01   2.6876410e-01   2.8748855e-01   1.5684504e-01   2.0165721e-01   2.8227299e-01   2.3174975e-01   3.4738814e-01   2.4066356e-01   2.9516630e-01   2.0426320e-01   3.5491429e-01   2.9152419e-01   2.1857252e-01   2.1532575e-01   2.7527993e-01   2.9385335e-01   2.6877316e-01   1.7184619e-01   2.4431046e-01   2.2708854e-01   2.1089056e-01   3.8786051e-01   2.9845589e-01   2.1195408e-01   2.3838722e-01   3.0508869e-01   2.1371586e-01   2.6806783e-01   3.1216051e-01   2.6180490e-01   2.3620065e-01   2.0447438e-01   2.6573552e-01   2.2136814e-01   2.3519672e-01   2.2587537e-01   1.3797486e-01   2.3292930e-01   4.8968343e-01   4.2865553e-01   4.0406082e-01   4.2311568e-01   4.4955467e-01   4.4970134e-01   4.4022012e-01   4.2994584e-01   4.5983149e-01   3.7733154e-01   3.0847182e-01   4.0252124e-01   3.7430526e-01   4.6065171e-01   4.6008825e-01   3.6337620e-01   3.7950484e-01   3.8097080e-01   5.2689771e-01   4.2900834e-01   3.8187058e-01   4.0969052e-01   4.6622956e-01   3.4753954e-01   3.7338441e-01   3.7106677e-01   3.2693971e-01   3.2232718e-01   4.4752724e-01   3.5789640e-01   4.1563695e-01   3.2438944e-01   4.5565562e-01   3.4619907e-01   4.4965557e-01   3.9841763e-01   4.0096111e-01   3.7608333e-01   3.1419485e-01   3.4172782e-01   4.0397551e-01   3.1440281e-01   4.2865553e-01   4.1831326e-01   3.9931889e-01   3.5369559e-01   3.9495166e-01   3.4857729e-01   3.7001412e-01   3.7103653e-01   9.4891023e-03   8.2375707e-04   1.6686708e-03   2.4475618e-03   4.6565778e-03   2.0491959e-01   2.0139969e-01   2.4160221e-01   2.8586265e-01   2.5951451e-01   2.7003471e-01   2.1844761e-01   1.8272084e-01   2.3436629e-01   2.2908460e-01   2.6861177e-01   2.0572725e-01   2.6206958e-01   2.6821933e-01   1.4908933e-01   1.9377976e-01   2.5813756e-01   2.1522061e-01   3.4200281e-01   2.2841742e-01   2.7236034e-01   1.9712279e-01   3.4101997e-01   2.7089218e-01   2.0911514e-01   2.0716704e-01   2.6510721e-01   2.8112922e-01   2.5280689e-01   1.6599180e-01   2.3361443e-01   2.1674754e-01   2.0090153e-01   3.6527528e-01   2.7043122e-01   1.9136502e-01   2.2690330e-01   2.9871211e-01   1.9453190e-01   2.5541554e-01   2.8925890e-01   2.4310626e-01   2.2546391e-01   1.9558871e-01   2.4836004e-01   2.0063248e-01   2.1704777e-01   2.1367234e-01   1.3678274e-01   2.1790721e-01   4.6096128e-01   4.0671584e-01   3.8773373e-01   3.9744288e-01   4.2748862e-01   4.3009711e-01   4.1223718e-01   4.0843810e-01   4.4142325e-01   3.5773584e-01   2.9306179e-01   3.8663461e-01   3.6011993e-01   4.4301487e-01   4.4448732e-01   3.4710733e-01   3.5722182e-01   3.5456119e-01   5.1046759e-01   4.1264841e-01   3.6628224e-01   3.8788026e-01   4.4738884e-01   3.3559118e-01   3.5113614e-01   3.4925623e-01   3.1415212e-01   3.0373195e-01   4.2825709e-01   3.3863565e-01   3.9988417e-01   3.0248234e-01   4.3771445e-01   3.2582243e-01   4.2019828e-01   3.8883040e-01   3.7626984e-01   3.5109855e-01   2.9576205e-01   3.2946337e-01   3.8969349e-01   3.1023698e-01   4.0671584e-01   3.9807129e-01   3.8231042e-01   3.4615104e-01   3.8497123e-01   3.3374807e-01   3.4573433e-01   3.4546409e-01   9.9827550e-03   3.7862368e-03   4.2584946e-03   1.2265791e-03   1.7617949e-01   1.7703821e-01   2.1212343e-01   2.5052805e-01   2.2530971e-01   2.5127302e-01   1.9850334e-01   1.5861692e-01   2.0515179e-01   2.0665158e-01   2.3356888e-01   1.8070269e-01   2.2448284e-01   2.4549391e-01   1.2367511e-01   1.6367665e-01   2.4261509e-01   1.9359579e-01   2.9712394e-01   2.0027260e-01   2.5390638e-01   1.6582785e-01   3.0629971e-01   2.4971132e-01   1.7938888e-01   1.7609087e-01   2.3136866e-01   2.4921343e-01   2.2715314e-01   1.3644726e-01   2.0313672e-01   1.8736201e-01   1.7259709e-01   3.3997757e-01   2.5916969e-01   1.7732718e-01   1.9796934e-01   2.5795325e-01   1.7832877e-01   2.2545225e-01   2.6961076e-01   2.2173788e-01   1.9575867e-01   1.6649347e-01   2.2485533e-01   1.8584864e-01   1.9731550e-01   1.8682160e-01   1.0543428e-01   1.9413835e-01   4.3845459e-01   3.7813833e-01   3.5313427e-01   3.7426892e-01   3.9794201e-01   3.9726718e-01   3.9130315e-01   3.7920848e-01   4.0649770e-01   3.2906316e-01   2.6354873e-01   3.5155280e-01   3.2453882e-01   4.0704153e-01   4.0591144e-01   3.1492301e-01   3.3203733e-01   3.3498583e-01   4.6984073e-01   3.7668481e-01   3.3204804e-01   3.6021418e-01   4.1270518e-01   2.9886261e-01   3.2629567e-01   3.2396944e-01   2.7989788e-01   2.7743776e-01   3.9510115e-01   3.1077003e-01   3.6387709e-01   2.8054253e-01   4.0239292e-01   3.0024699e-01   4.0081171e-01   3.4598760e-01   3.5305310e-01   3.2985030e-01   2.6984561e-01   2.9352511e-01   3.5245796e-01   2.6611615e-01   3.7813833e-01   3.6780473e-01   3.4887718e-01   3.0350575e-01   3.4281917e-01   3.0065558e-01   3.2390437e-01   3.2536506e-01   1.4872402e-03   1.4261828e-03   4.3370414e-03   2.2707675e-01   2.2400493e-01   2.6569285e-01   3.1123078e-01   2.8378554e-01   2.9683242e-01   2.4257696e-01   2.0422363e-01   2.5811380e-01   2.5348079e-01   2.9319960e-01   2.2849166e-01   2.8589147e-01   2.9450563e-01   1.6807288e-01   2.1502765e-01   2.8470332e-01   2.3897250e-01   3.6819788e-01   2.5200370e-01   2.9929335e-01   2.1837402e-01   3.6884033e-01   2.9747447e-01   2.3136263e-01   2.2907381e-01   2.8973378e-01   3.0680413e-01   2.7799960e-01   1.8547528e-01   2.5712752e-01   2.3949352e-01   2.2288675e-01   3.9517754e-01   2.9790586e-01   2.1461980e-01   2.5028856e-01   3.2375470e-01   2.1774627e-01   2.8014020e-01   3.1681085e-01   2.6834640e-01   2.4865097e-01   2.1711982e-01   2.7360556e-01   2.2434130e-01   2.4112622e-01   2.3662943e-01   1.5362542e-01   2.4153192e-01   4.9407199e-01   4.3763583e-01   4.1728329e-01   4.2863716e-01   4.5893922e-01   4.6123811e-01   4.4410036e-01   4.3933832e-01   4.7263926e-01   3.8698450e-01   3.1961653e-01   4.1608078e-01   3.8854631e-01   4.7414193e-01   4.7530563e-01   3.7551546e-01   3.8685112e-01   3.8465728e-01   5.4280771e-01   4.4284025e-01   3.9512469e-01   4.1829234e-01   4.7881043e-01   3.6289720e-01   3.8058317e-01   3.7858579e-01   3.4094528e-01   3.3115887e-01   4.5930198e-01   3.6727055e-01   4.2965213e-01   3.3035276e-01   4.6876907e-01   3.5423104e-01   4.5243416e-01   4.1718566e-01   4.0676646e-01   3.8091352e-01   3.2289623e-01   3.5664111e-01   4.1894270e-01   3.3518670e-01   4.3763583e-01   4.2851737e-01   4.1182914e-01   3.7291664e-01   4.1330116e-01   3.6151280e-01   3.7529785e-01   3.7518553e-01   2.1466294e-04   8.1135795e-04   2.0395325e-01   2.0232995e-01   2.4147692e-01   2.8429935e-01   2.5773107e-01   2.7550146e-01   2.2191392e-01   1.8311464e-01   2.3414066e-01   2.3177254e-01   2.6670079e-01   2.0650082e-01   2.5876572e-01   2.7190067e-01   1.4755667e-01   1.9178198e-01   2.6468375e-01   2.1783813e-01   3.3738596e-01   2.2849816e-01   2.7802206e-01   1.9468150e-01   3.4113386e-01   2.7532568e-01   2.0783209e-01   2.0518365e-01   2.6370466e-01   2.8101900e-01   2.5475268e-01   1.6319612e-01   2.3278117e-01   2.1587899e-01   1.9999930e-01   3.7014440e-01   2.7911349e-01   1.9654509e-01   2.2657275e-01   2.9494234e-01   1.9887441e-01   2.5547815e-01   2.9483790e-01   2.4668408e-01   2.2473055e-01   1.9413008e-01   2.5114079e-01   2.0579387e-01   2.2056413e-01   2.1387343e-01   1.3181835e-01   2.1964768e-01   4.6883654e-01   4.1098091e-01   3.8893009e-01   4.0388763e-01   4.3171852e-01   4.3291890e-01   4.1992695e-01   4.1244869e-01   4.4351517e-01   3.6095375e-01   2.9436456e-01   3.8758959e-01   3.6027619e-01   4.4466450e-01   4.4498549e-01   3.4851465e-01   3.6196876e-01   3.6168475e-01   5.1115719e-01   4.1372900e-01   3.6718805e-01   3.9217531e-01   4.4969696e-01   3.3465314e-01   3.5590188e-01   3.5378490e-01   3.1382959e-01   3.0675099e-01   4.3089908e-01   3.4178657e-01   4.0069101e-01   3.0739171e-01   4.3956059e-01   3.2969272e-01   4.2869495e-01   3.8625531e-01   3.8227459e-01   3.5742723e-01   2.9874912e-01   3.2874265e-01   3.8973129e-01   3.0516637e-01   4.1098091e-01   4.0141982e-01   3.8392089e-01   3.4269880e-01   3.8263609e-01   3.3443392e-01   3.5169446e-01   3.5216636e-01   9.1517643e-04   2.1524074e-01   2.1387759e-01   2.5373107e-01   2.9714785e-01   2.7003778e-01   2.8920001e-01   2.3426287e-01   1.9410928e-01   2.4622443e-01   2.4423617e-01   2.7915984e-01   2.1812334e-01   2.7081916e-01   2.8531140e-01   1.5727134e-01   2.0260081e-01   2.7829111e-01   2.2998414e-01   3.5056990e-01   2.4050939e-01   2.9179089e-01   2.0549251e-01   3.5521699e-01   2.8889714e-01   2.1915718e-01   2.1632646e-01   2.7619378e-01   2.9404932e-01   2.6759110e-01   1.7313032e-01   2.4473695e-01   2.2745766e-01   2.1120369e-01   3.8534612e-01   2.9320974e-01   2.0849982e-01   2.3847660e-01   3.0758274e-01   2.1079215e-01   2.6804702e-01   3.0890781e-01   2.5958017e-01   2.3652855e-01   2.0509955e-01   2.6402277e-01   2.1797131e-01   2.3288914e-01   2.2557846e-01   1.4040598e-01   2.3171289e-01   4.8566100e-01   4.2666426e-01   4.0387929e-01   4.1975185e-01   4.4765854e-01   4.4867725e-01   4.3614287e-01   4.2811681e-01   4.5929331e-01   3.7580128e-01   3.0785579e-01   4.0248311e-01   3.7465557e-01   4.6038945e-01   4.6053443e-01   3.6291292e-01   3.7703492e-01   3.7702914e-01   5.2744561e-01   4.2898757e-01   3.8178676e-01   4.0761255e-01   4.6557959e-01   3.4846205e-01   3.7087965e-01   3.6870032e-01   3.2740185e-01   3.2070546e-01   4.4660679e-01   3.5633353e-01   4.1573756e-01   3.2160319e-01   4.5525495e-01   3.4414484e-01   4.4510906e-01   4.0053809e-01   3.9779009e-01   3.7261777e-01   3.1255985e-01   3.4249381e-01   4.0450836e-01   3.1773210e-01   4.2666426e-01   4.1685273e-01   3.9886436e-01   3.5618753e-01   3.9691207e-01   3.4850257e-01   3.6675459e-01   3.6731925e-01   1.9628524e-01   1.9595152e-01   2.3363495e-01   2.7477230e-01   2.4851118e-01   2.7084921e-01   2.1685944e-01   1.7678722e-01   2.2636857e-01   2.2599655e-01   2.5724256e-01   1.9993208e-01   2.4854721e-01   2.6607935e-01   1.4078995e-01   1.8369551e-01   2.6097312e-01   2.1228442e-01   3.2508389e-01   2.2103528e-01   2.7346255e-01   1.8624671e-01   3.3183707e-01   2.6996197e-01   1.9987779e-01   1.9682726e-01   2.5462868e-01   2.7249816e-01   2.4805238e-01   1.5523356e-01   2.2463473e-01   2.0803519e-01   1.9245485e-01   3.6364465e-01   2.7666661e-01   1.9319723e-01   2.1887484e-01   2.8382186e-01   1.9489313e-01   2.4750809e-01   2.8994226e-01   2.4123726e-01   2.1680288e-01   1.8634448e-01   2.4506974e-01   2.0223799e-01   2.1557050e-01   2.0677515e-01   1.2326853e-01   2.1346465e-01   4.6321322e-01   4.0354170e-01   3.7970298e-01   3.9803381e-01   4.2400584e-01   4.2423988e-01   4.1474064e-01   4.0481837e-01   4.3422436e-01   3.5345426e-01   2.8656464e-01   3.7821934e-01   3.5073976e-01   4.3506541e-01   4.3461895e-01   3.3997143e-01   3.5549675e-01   3.5686166e-01   5.0021759e-01   4.0411514e-01   3.5805390e-01   3.8499293e-01   4.4048074e-01   3.2475847e-01   3.4952686e-01   3.4727706e-01   3.0464816e-01   2.9991017e-01   4.2212289e-01   3.3451084e-01   3.9105629e-01   3.0183284e-01   4.3015090e-01   3.2308204e-01   4.2396798e-01   3.7459262e-01   3.7639485e-01   3.5210962e-01   2.9201270e-01   3.1907654e-01   3.7972706e-01   2.9306033e-01   4.0354170e-01   3.9347753e-01   3.7503434e-01   3.3106203e-01   3.7117506e-01   3.2561211e-01   3.4620183e-01   3.4718282e-01   5.4794269e-04   1.8595150e-03   7.6486933e-03   3.6709934e-03   1.1297771e-02   3.2211024e-03   9.3536855e-04   1.2319946e-03   2.8277178e-03   4.9162548e-03   4.5756064e-04   4.5051431e-03   8.2041162e-03   5.0174936e-03   3.6228961e-04   1.1821527e-02   2.0977093e-03   2.1132418e-02   9.2067605e-04   1.2006919e-02   4.4257629e-04   2.0287770e-02   9.6871594e-03   3.6190304e-05   1.5767395e-04   4.3807979e-03   7.0604016e-03   4.2468409e-03   2.9914879e-03   1.0695136e-03   1.8996353e-04   2.2349983e-05   3.2007300e-02   1.8626112e-02   5.9280137e-03   7.1455899e-04   1.0704644e-02   4.3625889e-03   3.3835317e-03   1.4689427e-02   5.0222514e-03   5.6899707e-04   1.6818673e-04   4.5805421e-03   5.6585758e-03   3.2371570e-03   3.2354233e-04   1.1207565e-02   1.3610741e-03   7.1737216e-02   4.4570224e-02   3.4818230e-02   4.5037397e-02   5.2043753e-02   5.1252208e-02   5.2740741e-02   4.4819381e-02   5.4844272e-02   2.7492078e-02   9.9689819e-03   3.4289978e-02   2.5632216e-02   5.5069559e-02   5.4817042e-02   2.2717491e-02   2.9451557e-02   3.3085492e-02   8.2968826e-02   4.3268668e-02   2.7878625e-02   3.8225012e-02   5.7392372e-02   1.8533113e-02   2.7752880e-02   2.6863838e-02   1.3522246e-02   1.3720834e-02   5.0366251e-02   2.2136217e-02   3.8620607e-02   1.6104597e-02   5.3184340e-02   1.9805362e-02   5.7449954e-02   3.4065200e-02   3.7316903e-02   3.0490470e-02   1.2067932e-02   1.7032969e-02   3.4772493e-02   1.3995163e-02   4.4570224e-02   4.0370599e-02   3.3379869e-02   2.1584097e-02   3.2788169e-02   1.8689520e-02   2.8313400e-02   2.9690702e-02   2.1810130e-03   9.0584977e-03   5.0419708e-03   8.6169391e-03   1.3497185e-03   5.5621011e-04   1.5626898e-03   1.4715788e-03   6.4159866e-03   2.8759099e-05   6.7456588e-03   6.5333041e-03   5.4642837e-03   1.4108585e-03   8.4463171e-03   6.8795048e-04   2.4580787e-02   1.0388021e-03   9.2286561e-03   1.7639378e-03   2.1069750e-02   7.6032385e-03   7.9175727e-04   1.2932915e-03   5.5725803e-03   7.6219263e-03   3.4673161e-03   4.2795834e-03   1.7380404e-03   7.6483144e-04   5.0584546e-04   3.0216137e-02   1.4096242e-02   2.8861882e-03   1.0548294e-03   1.3430225e-02   1.8234348e-03   3.6876972e-03   1.2061426e-02   3.2511669e-03   1.1268214e-03   9.2690858e-04   3.2976984e-03   2.6938518e-03   1.3276664e-03   2.7368625e-04   1.3465991e-02   4.6822375e-04   6.8703048e-02   4.3340061e-02   3.5237451e-02   4.2511976e-02   5.0937508e-02   5.0961712e-02   4.9575019e-02   4.3743233e-02   5.5024281e-02   2.6603107e-02   9.8022959e-03   3.4840370e-02   2.6494597e-02   5.5508568e-02   5.5916268e-02   2.2800218e-02   2.7686924e-02   2.9943438e-02   8.4266289e-02   4.3880838e-02   2.8349604e-02   3.6881146e-02   5.7478275e-02   1.9879185e-02   2.5944410e-02   2.5180647e-02   1.4399125e-02   1.2641568e-02   5.0169037e-02   2.1180767e-02   3.9323276e-02   1.3938661e-02   5.3485998e-02   1.8367828e-02   5.3859405e-02   3.6620288e-02   3.4933732e-02   2.7786245e-02   1.0959937e-02   1.8222006e-02   3.5858197e-02   1.7515874e-02   4.3340061e-02   3.9619354e-02   3.3535832e-02   2.4403195e-02   3.5188163e-02   1.9107255e-02   2.5791231e-02   2.6740983e-02   2.3644893e-03   7.3259797e-04   5.5696730e-03   2.5707992e-03   4.5988577e-03   6.5028014e-05   1.3580837e-03   1.2238983e-03   1.7109321e-03   1.8714646e-03   2.9944669e-03   1.2905109e-02   3.6725511e-03   6.9487479e-03   1.9516582e-03   1.2369689e-02   2.1307052e-04   6.0423668e-03   3.5751225e-03   1.0028727e-02   4.0861108e-03   1.5902610e-03   2.1378325e-03   8.2628456e-04   1.7251178e-03   8.0406810e-04   9.4788056e-03   1.5999623e-04   8.7509151e-04   2.2560004e-03   1.8732619e-02   1.2379328e-02   7.5803848e-03   2.7223442e-04   5.1089250e-03   5.8562851e-03   2.2798360e-04   7.3027135e-03   2.0605789e-03   3.8651941e-04   3.1125030e-03   1.3286042e-03   6.3896783e-03   2.7088758e-03   9.7424018e-04   2.1879745e-02   1.1792881e-03   5.1158538e-02   2.8393852e-02   2.0746802e-02   2.9099880e-02   3.4416089e-02   3.3763806e-02   3.5540899e-02   2.8575694e-02   3.6757319e-02   1.5144171e-02   3.2315336e-03   2.0363783e-02   1.3898176e-02   3.6986917e-02   3.6943012e-02   1.1630303e-02   1.6809451e-02   2.0213112e-02   6.0723696e-02   2.7441217e-02   1.5470812e-02   2.3398093e-02   3.8846172e-02   9.0112370e-03   1.5570624e-02   1.4874310e-02   5.5171614e-03   5.6710746e-03   3.3048406e-02   1.1270408e-02   2.3776077e-02   7.7482583e-03   3.5413096e-02   9.7831561e-03   3.9569593e-02   2.1047269e-02   2.3004495e-02   1.8015778e-02   4.6822715e-03   7.9260822e-03   2.0880056e-02   7.9428824e-03   2.8393852e-02   2.5015882e-02   1.9595645e-02   1.2073748e-02   1.9972960e-02   8.8353740e-03   1.6316616e-02   1.7585650e-02   7.5921246e-04   7.6581519e-03   8.7602132e-03   1.3285408e-02   3.1081233e-03   6.1183864e-03   3.4258252e-04   8.0693053e-03   1.1527108e-03   4.3989827e-03   2.4770294e-02   1.0297780e-02   1.0716436e-02   8.0921947e-03   4.0468338e-03   3.9682629e-03   8.0100500e-03   9.6963228e-03   3.4263963e-03   5.5915243e-03   6.8271736e-03   7.3405400e-03   4.5375223e-04   3.3086446e-04   2.9090971e-03   1.8954919e-02   3.0536401e-03   5.4665114e-03   8.4934379e-03   1.2174442e-02   1.6139108e-02   1.7445625e-02   4.0248005e-03   8.4214697e-04   1.4968032e-02   1.3210674e-03   7.6674238e-03   5.8292743e-03   4.1363018e-03   9.7236406e-03   4.2254644e-03   1.5250051e-02   9.0649565e-03   6.2807525e-03   3.4303230e-02   6.6673397e-03   3.8666536e-02   1.8227060e-02   1.0732501e-02   2.0722480e-02   2.2627004e-02   2.1137328e-02   2.6644819e-02   1.8156140e-02   2.2956019e-02   8.4429075e-03   1.3075172e-03   1.0338488e-02   5.7120788e-03   2.2877982e-02   2.2249653e-02   5.0348740e-03   1.0858478e-02   1.5670368e-02   4.1328272e-02   1.5415087e-02   7.0760309e-03   1.4735153e-02   2.4690692e-02   2.4709117e-03   1.0136092e-02   9.4846153e-03   1.0671740e-03   3.5238125e-03   2.0483172e-02   6.1432951e-03   1.2637418e-02   6.5903261e-03   2.1786492e-02   6.0819601e-03   3.0486925e-02   9.5174641e-03   1.6103409e-02   1.3353819e-02   3.2356456e-03   1.9926682e-03   1.0243487e-02   2.2538296e-03   1.8227060e-02   1.5108364e-02   1.0188754e-02   3.7627514e-03   8.8362152e-03   3.0791096e-03   1.1920070e-02   1.3588585e-02   8.0203401e-03   5.9881494e-03   7.9998519e-03   1.0330180e-03   3.9563353e-03   9.0962406e-05   4.3155161e-03   3.4798297e-04   4.5913809e-03   1.6934319e-02   5.4778348e-03   1.0415690e-02   5.0724002e-03   7.4143773e-03   1.5625174e-03   8.5090504e-03   5.0363885e-03   7.2978538e-03   5.9687085e-03   3.0800386e-03   3.3854665e-03   6.0369763e-05   9.7766526e-04   2.1106407e-03   1.2150960e-02   8.7050457e-04   2.2450596e-03   4.2656078e-03   1.7573546e-02   1.6541615e-02   1.3010703e-02   1.4863348e-03   2.0318224e-03   1.0715058e-02   5.1959240e-04   9.1091800e-03   4.5577281e-03   1.4679901e-03   5.0882044e-03   3.2208315e-03   1.1416637e-02   6.2084512e-03   2.9761078e-03   2.5010280e-02   3.7556543e-03   4.8641699e-02   2.5613136e-02   1.7022941e-02   2.7738185e-02   3.0983818e-02   2.9540677e-02   3.4381880e-02   2.5612023e-02   3.1832087e-02   1.3388731e-02   2.7364434e-03   1.6556686e-02   1.0555947e-02   3.1795721e-02   3.1144834e-02   9.3248236e-03   1.5850102e-02   2.0586917e-02   5.3133864e-02   2.2885657e-02   1.2291162e-02   2.1220606e-02   3.3851933e-02   5.9611654e-03   1.4821288e-02   1.4065156e-02   3.4935277e-03   5.6486577e-03   2.8790647e-02   1.0114487e-02   1.9481208e-02   8.7344459e-03   3.0476411e-02   9.4253713e-03   3.8601009e-02   1.5492941e-02   2.2081481e-02   1.8082534e-02   4.9261084e-03   5.1866248e-03   1.6531969e-02   3.8794099e-03   2.5613136e-02   2.2037756e-02   1.6246851e-02   7.5034139e-03   1.4652134e-02   6.6254167e-03   1.6367612e-02   1.8037074e-02   3.5963937e-03   1.3253217e-02   6.2726815e-03   2.9800542e-03   8.1679414e-03   8.1170586e-03   1.1643531e-02   4.8148791e-04   2.7366574e-02   1.5666050e-02   3.5602925e-04   4.6080605e-03   1.9717886e-02   6.2846724e-03   1.0858138e-05   1.6108248e-02   9.2526017e-03   1.6342536e-04   1.1289374e-02   1.3182521e-02   7.1086671e-03   4.8107615e-03   2.1505038e-03   2.4867835e-02   7.4585494e-03   9.3457001e-03   1.1859292e-02   8.6506765e-03   1.5825531e-03   7.6287797e-03   7.1464196e-03   1.3469318e-02   7.0587993e-03   4.6011946e-03   3.8423475e-04   1.2933991e-03   8.0463849e-03   1.4044313e-02   1.5554975e-03   5.8246512e-03   3.7445923e-03   7.8179143e-03   4.3383609e-02   5.1292419e-03   3.1208966e-02   1.7106674e-02   1.5590525e-02   1.4711786e-02   2.2118312e-02   2.3677515e-02   1.8355265e-02   1.7620984e-02   2.7322237e-02   8.2125300e-03   3.2025084e-03   1.5673958e-02   1.1993026e-02   2.8215754e-02   3.0043744e-02   8.3225318e-03   7.3692394e-03   7.0283195e-03   5.0297559e-02   2.1175797e-02   1.1957606e-02   1.3050611e-02   2.8749586e-02   1.0337000e-02   6.4346633e-03   6.2339245e-03   7.0135662e-03   2.1302546e-03   2.3356399e-02   5.5096838e-03   1.8637999e-02   1.1462623e-03   2.6577654e-02   3.5495923e-03   2.0668821e-02   2.2280093e-02   1.0461671e-02   6.3164945e-03   1.6640428e-03   9.2261377e-03   1.7584245e-02   1.7910761e-02   1.7106674e-02   1.5703153e-02   1.4029303e-02   1.7152691e-02   2.0996496e-02   7.4959989e-03   5.5175599e-03   5.5902559e-03   3.2004692e-03   2.3419030e-03   2.3799055e-04   7.0894399e-03   1.3013007e-03   8.8089668e-03   2.9046172e-03   1.1317768e-02   5.4246845e-03   3.1331888e-03   1.2023171e-04   2.4596565e-02   1.8369557e-03   3.9714617e-03   5.9789699e-03   1.7350836e-02   3.3069650e-03   3.5250221e-03   4.6752456e-03   5.9850395e-03   6.3682068e-03   1.7841601e-03   1.0289989e-02   3.0278347e-03   2.8250687e-03   3.3130538e-03   2.2020473e-02   6.7612416e-03   1.5121522e-03   2.2413165e-03   1.4397994e-02   9.1427197e-04   3.3482085e-03   6.1881321e-03   7.4537620e-04   2.6935839e-03   4.4237033e-03   1.1678481e-03   9.0068892e-04   2.9616334e-06   1.6314282e-03   2.2817755e-02   4.4730602e-04   5.5111404e-02   3.4158218e-02   2.9021577e-02   3.2043073e-02   4.1089749e-02   4.2083473e-02   3.7707137e-02   3.4692829e-02   4.6329738e-02   1.9906109e-02   6.9820129e-03   2.8847990e-02   2.2051442e-02   4.7099521e-02   4.8343924e-02   1.7860817e-02   1.9868896e-02   2.0488578e-02   7.4490873e-02   3.6906910e-02   2.3107397e-02   2.8319511e-02   4.8426947e-02   1.7182411e-02   1.8331671e-02   1.7811306e-02   1.2023707e-02   8.1012404e-03   4.1487060e-02   1.5227136e-02   3.2990763e-02   8.0392167e-03   4.5098943e-02   1.2350504e-02   4.1149609e-02   3.3318195e-02   2.5517275e-02   1.9030633e-02   6.7530681e-03   1.5581926e-02   3.0469465e-02   1.9100479e-02   3.4158218e-02   3.1415243e-02   2.7190491e-02   2.3321177e-02   3.1828581e-02   1.5212907e-02   1.7498443e-02   1.7919743e-02   3.6042298e-03   3.7468828e-03   9.7768723e-03   7.8664808e-04   9.4997776e-03   1.0849175e-02   2.5690262e-03   9.8725606e-04   1.2645853e-02   2.2464135e-03   3.0594913e-02   2.8398433e-03   1.3996699e-02   1.4253747e-03   2.8011999e-02   1.2147431e-02   1.3365379e-03   1.5899927e-03   8.8722552e-03   1.1913349e-02   6.7897739e-03   2.1135064e-03   3.6254453e-03   1.7898196e-03   6.9240260e-04   3.8891340e-02   1.9082524e-02   3.5297395e-03   2.7024302e-03   1.7766622e-02   2.5342822e-03   6.8092652e-03   1.7593080e-02   6.3527044e-03   2.6240465e-03   7.1495011e-04   6.5371413e-03   3.8357773e-03   3.1136154e-03   1.3436442e-03   8.9702416e-03   2.0253115e-03   8.1348350e-02   5.3552444e-02   4.4248656e-02   5.2648527e-02   6.1923652e-02   6.1838703e-02   6.0414517e-02   5.3985372e-02   6.6201925e-02   3.4742321e-02   1.4883289e-02   4.3767758e-02   3.4228373e-02   6.6672589e-02   6.6939218e-02   3.0219175e-02   3.6020463e-02   3.8455365e-02   9.7619080e-02   5.3827294e-02   3.6463335e-02   4.6373140e-02   6.8906148e-02   2.6398982e-02   3.4032020e-02   3.3159361e-02   2.0120628e-02   1.8469842e-02   6.0950543e-02   2.8524017e-02   4.8737718e-02   1.9976319e-02   6.4489083e-02   2.5275791e-02   6.5080438e-02   4.4969016e-02   4.4191042e-02   3.6066964e-02   1.6430448e-02   2.4524789e-02   4.4743887e-02   2.2062365e-02   5.3552444e-02   4.9370398e-02   4.2403953e-02   3.0850071e-02   4.3434971e-02   2.5846885e-02   3.3807321e-02   3.4832107e-02   1.2988107e-03   1.6703175e-03   1.1675843e-03   2.1414615e-03   3.6300242e-03   1.1143098e-02   2.7878082e-03   7.4699291e-03   1.6417856e-03   1.3833381e-02   5.5119833e-05   6.7870415e-03   2.7321459e-03   1.1691818e-02   4.7830259e-03   1.0265050e-03   1.5056614e-03   1.2372212e-03   2.4522309e-03   1.1336677e-03   8.0050923e-03   5.6870746e-05   4.6915622e-04   1.5562032e-03   2.0887194e-02   1.3125417e-02   6.8837382e-03   7.1162950e-05   5.9522504e-03   5.2043728e-03   5.3649750e-04   8.3200456e-03   2.2696632e-03   1.4322584e-04   2.2876100e-03   1.6070427e-03   5.8684470e-03   2.4558869e-03   5.5570590e-04   1.9651663e-02   8.9172519e-04   5.4659464e-02   3.1114613e-02   2.3119551e-02   3.1736271e-02   3.7415588e-02   3.6761852e-02   3.8397207e-02   3.1313890e-02   3.9883303e-02   1.7150840e-02   4.2007421e-03   2.2713095e-02   1.5842502e-02   4.0120080e-02   4.0057089e-02   1.3428356e-02   1.8845203e-02   2.2251079e-02   6.4673609e-02   3.0152373e-02   1.7530451e-02   2.5859899e-02   4.2056336e-02   1.0552527e-02   1.7518114e-02   1.6789150e-02   6.7575680e-03   6.8601014e-03   3.6016991e-02   1.2994930e-02   2.6303908e-02   8.9623653e-03   3.8482980e-02   1.1333705e-02   4.2542187e-02   2.3287141e-02   2.5337550e-02   1.9991634e-02   5.7451264e-03   9.3841364e-03   2.3239540e-02   8.8973019e-03   3.1114613e-02   2.7595638e-02   2.1905943e-02   1.3658827e-02   2.2169613e-02   1.0410758e-02   1.8207584e-02   1.9484294e-02   4.8008453e-03   1.2650854e-03   6.4006179e-03   1.8900850e-03   1.2501460e-02   5.1363105e-03   3.0955001e-03   2.4385845e-04   2.0020418e-02   1.0205842e-03   3.3467158e-03   5.5033857e-03   1.3788482e-02   2.4101593e-03   2.9461849e-03   4.0056193e-03   3.8916824e-03   4.1559722e-03   7.4799809e-04   1.0679921e-02   1.8732675e-03   2.1213449e-03   3.0477499e-03   1.9047032e-02   6.9834653e-03   2.9438547e-03   1.3758132e-03   1.0992441e-02   2.0426183e-03   1.8183256e-03   5.1275661e-03   3.4870074e-04   1.7800086e-03   4.1941671e-03   4.4278656e-04   2.0594764e-03   2.9165015e-04   1.2452133e-03   2.3762069e-02   2.9165015e-04   5.0966362e-02   3.0166832e-02   2.4694798e-02   2.8788397e-02   3.6671707e-02   3.7274280e-02   3.4472569e-02   3.0604199e-02   4.1125938e-02   1.6692997e-02   4.7977197e-03   2.4489085e-02   1.8077937e-02   4.1761735e-02   4.2713992e-02   1.4455884e-02   1.7039782e-02   1.8322490e-02   6.7670508e-02   3.2041093e-02   1.9169462e-02   2.4724400e-02   4.3157837e-02   1.3510623e-02   1.5640518e-02   1.5102883e-02   8.9767687e-03   6.0642978e-03   3.6671707e-02   1.2419694e-02   2.8323093e-02   6.4935421e-03   3.9910361e-02   1.0006286e-02   3.7967777e-02   2.8141888e-02   2.2594035e-02   1.6734859e-02   4.8977754e-03   1.2095984e-02   2.5839912e-02   1.5166518e-02   3.0166832e-02   2.7378800e-02   2.3072794e-02   1.8885101e-02   2.6783663e-02   1.1941964e-02   1.5226991e-02   1.5844953e-02   5.5898027e-03   3.6211515e-04   4.6884489e-03   1.9469863e-02   6.9494812e-03   1.0856564e-02   6.2070186e-03   5.9174289e-03   2.3319364e-03   8.6215938e-03   6.4261295e-03   5.9157019e-03   6.0481987e-03   4.2268867e-03   4.5610911e-03   4.8970997e-05   6.8799458e-04   2.4420024e-03   1.4255275e-02   1.5079078e-03   3.2366850e-03   5.6006336e-03   1.5957034e-02   1.6871464e-02   1.4787237e-02   2.2762765e-03   1.3333689e-03   1.2378081e-02   7.3736127e-04   8.8932355e-03   5.1508306e-03   2.2779875e-03   6.5293055e-03   3.6737889e-03   1.2985539e-02   7.3417742e-03   4.0613774e-03   2.7837547e-02   4.7997557e-03   4.5639701e-02   2.3278576e-02   1.4877176e-02   2.5663407e-02   2.8314352e-02   2.6769516e-02   3.2135703e-02   2.3238033e-02   2.8854470e-02   1.1827077e-02   2.2644401e-03   1.4421001e-02   8.8429015e-03   2.8776903e-02   2.8063687e-02   7.8778602e-03   1.4365876e-02   1.9273282e-02   4.9067035e-02   2.0328263e-02   1.0496416e-02   1.9196637e-02   3.0789735e-02   4.6457607e-03   1.3443289e-02   1.2708604e-02   2.5804695e-03   5.0424172e-03   2.6041403e-02   8.8829912e-03   1.7122028e-02   8.2367466e-03   2.7547637e-02   8.4529986e-03   3.6274794e-02   1.3225786e-02   2.0335647e-02   1.6784857e-02   4.4669319e-03   3.9860599e-03   1.4316384e-02   2.9523808e-03   2.3278576e-02   1.9803941e-02   1.4205949e-02   5.9492702e-03   1.2454271e-02   5.3895801e-03   1.5143895e-02   1.6858271e-02   5.9387347e-03   5.9571758e-03   6.0526515e-03   1.4146691e-03   8.1320415e-03   6.3420687e-04   2.2943426e-02   7.2217865e-04   8.7156753e-03   1.7123420e-03   1.9617600e-02   7.0385795e-03   6.4044399e-04   1.1390332e-03   4.8019256e-03   6.7384180e-03   2.9679315e-03   4.6026472e-03   1.3268878e-03   5.4152853e-04   4.6516773e-04   2.8772311e-02   1.3783757e-02   3.2459159e-03   7.3821107e-04   1.2234521e-02   2.0992860e-03   3.0774015e-03   1.1372571e-02   2.9352447e-03   8.1022588e-04   9.2842537e-04   2.8855444e-03   2.9418595e-03   1.2977062e-03   1.2869337e-04   1.4124612e-02   3.4246729e-04   6.6626445e-02   4.1505551e-02   3.3416051e-02   4.0874061e-02   4.8928444e-02   4.8860648e-02   4.7883828e-02   4.1881126e-02   5.2796241e-02   2.5141882e-02   8.8605790e-03   3.3017625e-02   2.4870522e-02   5.3247026e-02   5.3590923e-02   2.1349209e-02   2.6308756e-02   2.8721666e-02   8.1439460e-02   4.1842449e-02   2.6703197e-02   3.5208876e-02   5.5212555e-02   1.8433774e-02   2.4622301e-02   2.3863121e-02   1.3181398e-02   1.1675955e-02   4.8074316e-02   1.9890418e-02   3.7380285e-02   1.3082557e-02   5.1276398e-02   1.7233265e-02   5.2150081e-02   3.4634218e-02   3.3454504e-02   2.6550201e-02   1.0070918e-02   1.6842626e-02   3.3968952e-02   1.6166125e-02   4.1505551e-02   3.7811539e-02   3.1780349e-02   2.2766214e-02   3.3244526e-02   1.7747224e-02   2.4583452e-02   2.5577750e-02   7.4058632e-03   1.7632325e-02   5.8672157e-03   1.4554963e-02   7.5139440e-03   6.3063306e-03   2.8227254e-03   1.2216172e-02   5.2171506e-03   8.3411571e-03   9.1198919e-03   3.7613430e-03   3.7527482e-03   5.6979631e-04   2.0412760e-03   4.1677011e-03   1.2238157e-02   1.7043766e-03   3.0984992e-03   5.1374687e-03   2.0730806e-02   2.1628161e-02   1.6669142e-02   2.5627983e-03   1.3966031e-03   1.3985502e-02   1.7150229e-03   1.2743810e-02   7.3773848e-03   2.3644296e-03   5.7186323e-03   5.6669191e-03   1.5046711e-02   9.0550035e-03   4.3221940e-03   2.4177800e-02   5.7926331e-03   5.2977640e-02   2.8412846e-02   1.8464622e-02   3.1548301e-02   3.3726407e-02   3.1637531e-02   3.8729422e-02   2.8292534e-02   3.3574657e-02   1.5809867e-02   4.4178873e-03   1.7890807e-02   1.1580028e-02   3.3334020e-02   3.2156672e-02   1.0943899e-02   1.8967943e-02   2.4791881e-02   5.4103864e-02   2.4225163e-02   1.3643641e-02   2.4071431e-02   3.5681100e-02   6.5373199e-03   1.7959936e-02   1.7099713e-02   4.3929724e-03   8.0887873e-03   3.0809355e-02   1.2543658e-02   2.0721585e-02   1.2037199e-02   3.2114506e-02   1.2207760e-02   4.3300211e-02   1.5218252e-02   2.5733556e-02   2.1932604e-02   7.3680112e-03   5.8739609e-03   1.7443010e-02   2.6299180e-03   2.8412846e-02   2.4437667e-02   1.7887656e-02   6.9159049e-03   1.4494165e-02   7.9434468e-03   2.0060731e-02   2.2068579e-02   2.3875094e-02   1.2000415e-02   1.3948342e-03   3.4546351e-03   1.4939730e-02   3.7950422e-03   6.0175173e-04   1.2211196e-02   7.0052335e-03   9.1256063e-05   8.0336825e-03   9.5484059e-03   3.8945506e-03   2.3206010e-03   7.0732153e-04   2.0727990e-02   4.4889370e-03   6.3258821e-03   8.7927798e-03   9.0069682e-03   3.7952179e-03   7.8092546e-03   4.4335690e-03   9.0550736e-03   6.7946167e-03   2.1531805e-03   9.6426638e-04   7.0770423e-04   5.1150602e-03   1.0670446e-02   5.5187206e-04   6.0114634e-03   3.0771240e-03   5.3655604e-03   3.8039285e-02   3.5100982e-03   3.3392676e-02   1.7228333e-02   1.4023464e-02   1.5984642e-02   2.2267037e-02   2.3075907e-02   2.0330300e-02   1.7609739e-02   2.6354220e-02   7.6657981e-03   1.4938436e-03   1.3975046e-02   9.8087979e-03   2.7013992e-02   2.8227679e-02   6.7815824e-03   7.6426994e-03   8.5739542e-03   4.8734857e-02   1.9601188e-02   1.0188446e-02   1.3147209e-02   2.7911001e-02   7.5145131e-03   6.7053137e-03   6.3732135e-03   4.4764490e-03   1.3642012e-03   2.2654181e-02   4.8866188e-03   1.6888522e-02   1.3930577e-03   2.5469441e-02   3.2860894e-03   2.3095694e-02   1.8694362e-02   1.1451986e-02   7.4272413e-03   8.6465452e-04   6.5073035e-03   1.5400191e-02   1.2824348e-02   1.7228333e-02   1.5313622e-02   1.2672619e-02   1.3006211e-02   1.7530867e-02   5.5400420e-03   6.4187909e-03   6.8900377e-03   3.1968437e-03   2.6175875e-02   9.5689725e-03   4.4766639e-02   9.9845360e-03   2.8418681e-02   3.6870693e-03   4.5253718e-02   2.5815239e-02   5.6468536e-03   5.2271680e-03   1.8578768e-02   2.3906603e-02   1.7414675e-02   6.6309054e-04   1.0701959e-02   7.1563943e-03   4.3943049e-03   6.0754711e-02   3.4699507e-02   9.6990814e-03   9.4374842e-03   2.8881695e-02   8.6238198e-03   1.6549411e-02   3.3492594e-02   1.6963829e-02   8.9575119e-03   3.4839312e-03   1.7214511e-02   1.0985852e-02   1.1115876e-02   7.0774378e-03   2.3223923e-03   9.1191389e-03   1.1169736e-01   7.8250518e-02   6.5808362e-02   7.7763348e-02   8.8114611e-02   8.7449743e-02   8.7215232e-02   7.8675005e-02   9.2203874e-02   5.5132383e-02   2.8794481e-02   6.5100824e-02   5.3025891e-02   9.2531519e-02   9.2220151e-02   4.8731252e-02   5.7186075e-02   6.0580024e-02   1.2745253e-01   7.7174441e-02   5.6198920e-02   6.9678402e-02   9.5449745e-02   4.2538093e-02   5.4722713e-02   5.3576276e-02   3.4860888e-02   3.4291475e-02   8.6329226e-02   4.7343142e-02   7.0978985e-02   3.6695928e-02   9.0088005e-02   4.3430772e-02   9.2828505e-02   6.4239353e-02   6.7481588e-02   5.7536867e-02   3.1542812e-02   4.0297150e-02   6.5753742e-02   3.3241661e-02   7.8250518e-02   7.2933055e-02   6.3794057e-02   4.6178781e-02   6.2571051e-02   4.2843100e-02   5.4666081e-02   5.6027673e-02   1.6139749e-02   3.9412782e-03   2.4265145e-02   2.3891707e-03   1.6498373e-02   4.1418612e-05   2.4988702e-02   1.3783039e-02   4.3146851e-04   2.5122323e-04   6.4815288e-03   1.0052630e-02   7.0587637e-03   1.3669961e-03   2.4020339e-03   9.7331181e-04   2.7171014e-04   3.8783427e-02   2.3881244e-02   7.7285447e-03   2.0010737e-03   1.2962382e-02   6.0316172e-03   5.6775409e-03   1.9642810e-02   8.0347010e-03   1.6772041e-03   5.1201506e-05   7.5139419e-03   7.7685816e-03   5.4104161e-03   1.3577183e-03   7.6646931e-03   3.0214900e-03   8.1621829e-02   5.2182884e-02   4.1040324e-02   5.3055858e-02   6.0133087e-02   5.8980137e-02   6.1457708e-02   5.2397706e-02   6.2608146e-02   3.3589093e-02   1.3750660e-02   4.0409320e-02   3.0837807e-02   6.2732754e-02   6.2152008e-02   2.7986481e-02   3.5988306e-02   4.0227814e-02   9.1799153e-02   5.0051858e-02   3.3478326e-02   4.5393111e-02   6.5357720e-02   2.2750138e-02   3.4139497e-02   3.3132950e-02   1.7367166e-02   1.8328224e-02   5.7997026e-02   2.7720666e-02   4.5013892e-02   2.1236242e-02   6.0787869e-02   2.5266646e-02   6.6573172e-02   3.9086224e-02   4.4693577e-02   3.7322864e-02   1.6444309e-02   2.1159286e-02   4.0674593e-02   1.6113197e-02   5.2182884e-02   4.7503868e-02   3.9598661e-02   2.5231075e-02   3.7795470e-02   2.3382629e-02   3.4903444e-02   3.6481922e-02   4.3266011e-03   2.5120283e-02   7.2104610e-03   3.6362605e-04   1.6818393e-02   1.3224351e-02   8.9751703e-04   1.2039448e-02   1.4078561e-02   9.5477546e-03   7.2983976e-03   3.1999143e-03   2.4639885e-02   8.8187561e-03   1.0207680e-02   1.2236717e-02   1.1661588e-02   8.0001293e-04   5.7297070e-03   8.1532898e-03   1.7517743e-02   5.5505771e-03   6.3202290e-03   1.2261175e-03   1.5275601e-03   9.1326114e-03   1.4417917e-02   2.2056571e-03   4.2297788e-03   3.2218738e-03   8.2583968e-03   4.2679879e-02   5.2144338e-03   3.5325690e-02   2.1286357e-02   2.0340751e-02   1.7932964e-02   2.6773752e-02   2.8858059e-02   2.1473619e-02   2.1925037e-02   3.2987864e-02   1.1596147e-02   5.5679058e-03   2.0475433e-02   1.6418368e-02   3.4058657e-02   3.6285268e-02   1.2036020e-02   1.0227865e-02   8.9974606e-03   5.7847652e-02   2.6531721e-02   1.6295053e-02   1.6788576e-02   3.4473710e-02   1.4498141e-02   9.1389529e-03   8.9727022e-03   1.0441422e-02   4.2212624e-03   2.8555402e-02   8.4473824e-03   2.3791713e-02   2.5698702e-03   3.2242281e-02   5.9266749e-03   2.3676462e-02   2.8216759e-02   1.3343464e-02   8.4809495e-03   3.5554866e-03   1.3166972e-02   2.2745344e-02   2.2629651e-02   2.1286357e-02   1.9992085e-02   1.8520730e-02   2.2324446e-02   2.6771848e-02   1.1107369e-02   7.6788410e-03   7.4852977e-03   2.3512869e-02   1.1702196e-03   5.0486445e-03   4.4067902e-03   1.7493736e-02   4.0658633e-03   2.3529372e-03   3.3047066e-03   5.2094902e-03   6.0430183e-03   1.7805903e-03   8.3604250e-03   2.1645857e-03   1.8214590e-03   2.1737913e-03   2.3530298e-02   8.5714286e-03   1.8444368e-03   1.4565864e-03   1.3243081e-02   1.0630397e-03   2.8808992e-03   7.3652636e-03   1.0835317e-03   1.7933322e-03   3.0961279e-03   1.3436220e-03   1.3043704e-03   1.2482375e-04   8.8034137e-04   2.0043242e-02   1.2482375e-04   5.7954445e-02   3.5775683e-02   2.9742194e-02   3.4149795e-02   4.2824229e-02   4.3477315e-02   4.0214177e-02   3.6256651e-02   4.7605297e-02   2.0950874e-02   7.1042975e-03   2.9499916e-02   2.2329817e-02   4.8271691e-02   4.9230028e-02   1.8375611e-02   2.1296157e-02   2.2492082e-02   7.5802989e-02   3.7751582e-02   2.3617894e-02   2.9827991e-02   4.9792717e-02   1.7017775e-02   1.9724142e-02   1.9131907e-02   1.1873908e-02   8.7349825e-03   4.2824229e-02   1.6130090e-02   3.3687060e-02   9.1410950e-03   4.6289887e-02   1.3350026e-02   4.3904542e-02   3.3071376e-02   2.7381594e-02   2.0813943e-02   7.3233676e-03   1.5432666e-02   3.0904955e-02   1.7682128e-02   3.5775683e-02   3.2747980e-02   2.7982984e-02   2.2571206e-02   3.1620085e-02   1.5454693e-02   1.9154732e-02   1.9759156e-02   1.5625666e-02   2.0014241e-02   2.2906319e-02   3.3689213e-03   1.6561417e-02   1.9555072e-02   1.9724522e-02   6.8229205e-03   6.0996359e-03   1.3507575e-02   3.5744409e-02   1.3348521e-02   1.7651623e-02   2.2506296e-02   1.4148535e-02   3.1413076e-02   3.8119216e-02   1.5501824e-02   1.7783197e-03   3.4445966e-02   9.9745771e-03   1.7822684e-02   1.8993068e-02   1.5436010e-02   2.3911299e-02   1.6070505e-02   3.4793519e-02   2.5109394e-02   1.9730191e-02   5.3384757e-02   2.0981999e-02   3.5016323e-02   1.5808551e-02   7.2216559e-03   2.1250521e-02   1.8323057e-02   1.5289849e-02   2.7077232e-02   1.5342317e-02   1.5450153e-02   9.5719689e-03   7.0769801e-03   6.7142336e-03   3.8618160e-03   1.4833874e-02   1.3052654e-02   5.5299114e-03   1.3477582e-02   2.0871841e-02   2.6745939e-02   9.5407500e-03   5.3018257e-03   1.4058965e-02   1.6863810e-02   2.0380823e-03   1.3353665e-02   1.2655783e-02   3.2775616e-03   9.7625272e-03   1.4632542e-02   9.0437643e-03   7.6711708e-03   1.4740530e-02   1.4381411e-02   1.0907741e-02   3.1026769e-02   2.6758954e-03   1.8148668e-02   1.8095332e-02   1.0256426e-02   2.3444102e-03   5.5327937e-03   1.0086149e-03   1.5808551e-02   1.2612237e-02   7.5482105e-03   2.3261323e-04   2.5482034e-03   4.2287654e-03   1.6814254e-02   1.9242327e-02   6.8098804e-03   2.4185222e-03   1.3095995e-02   4.9100577e-03   8.0319599e-04   1.3085229e-03   1.8113887e-03   3.1306373e-03   1.2541646e-03   7.2250359e-03   1.5182032e-04   3.2471009e-04   1.1793141e-03   2.2134336e-02   1.2798604e-02   5.8036245e-03   2.9068060e-05   7.1481800e-03   4.2574873e-03   8.5847073e-04   8.5715637e-03   2.1039195e-03   1.1389023e-04   1.8746094e-03   1.5895426e-03   4.9316123e-03   1.9257560e-03   2.7708506e-04   1.8515651e-02   5.3986259e-04   5.6637702e-02   3.2886175e-02   2.4967826e-02   3.3187187e-02   3.9414817e-02   3.8923256e-02   3.9880016e-02   3.3128964e-02   4.2231952e-02   1.8470852e-02   4.9097912e-03   2.4570551e-02   1.7467535e-02   4.2525770e-02   4.2580968e-02   1.4790908e-02   2.0011146e-02   2.3142926e-02   6.7845285e-02   3.2285576e-02   1.9161137e-02   2.7420216e-02   4.4447416e-02   1.1980855e-02   1.8611023e-02   1.7883360e-02   7.8729229e-03   7.5466400e-03   3.8175619e-02   1.4096206e-02   2.8321778e-02   9.4496873e-03   4.0815141e-02   1.2211823e-02   4.4024579e-02   2.5465922e-02   2.6596134e-02   2.0925904e-02   6.3340227e-03   1.0720439e-02   2.5211490e-02   1.0333158e-02   3.2886175e-02   2.9360405e-02   2.3656085e-02   1.5413665e-02   2.4285913e-02   1.1678199e-02   1.9116491e-02   2.0313205e-02   1.6950975e-02   9.2576768e-03   2.2830227e-04   1.1996475e-02   1.3943618e-02   7.5471408e-03   5.0950912e-03   2.4447813e-03   2.5903324e-02   8.0139448e-03   9.9879335e-03   1.2585436e-02   8.2754975e-03   1.4174352e-03   8.0478199e-03   7.7042954e-03   1.3901912e-02   7.5078674e-03   4.9957099e-03   2.9997761e-04   1.5395926e-03   8.6362248e-03   1.4833108e-02   1.8222710e-03   6.1957159e-03   4.1238914e-03   8.4102568e-03   4.4734160e-02   5.6076899e-03   3.0288189e-02   1.6597244e-02   1.5336169e-02   1.4117002e-02   2.1529085e-02   2.3159309e-02   1.7633168e-02   1.7119251e-02   2.6802924e-02   7.9632454e-03   3.3472740e-03   1.5438450e-02   1.1914773e-02   2.7716384e-02   2.9607261e-02   8.2241873e-03   7.0346123e-03   6.5727745e-03   4.9604200e-02   2.0828511e-02   1.1808642e-02   1.2615158e-02   2.8194719e-02   1.0429441e-02   6.1245969e-03   5.9452412e-03   7.1618546e-03   2.1261487e-03   2.2855826e-02   5.3452154e-03   1.8357871e-02   1.0397070e-03   2.6087088e-02   3.3990115e-03   1.9871685e-02   2.2251351e-02   9.9773797e-03   5.9192173e-03   1.6976055e-03   9.3317377e-03   1.7391404e-02   1.8375579e-02   1.6597244e-02   1.5280892e-02   1.3772451e-02   1.7356806e-02   2.0968489e-02   7.4978418e-03   5.1634523e-03   5.1963190e-03   2.4233623e-02   1.4077025e-02   4.3787020e-04   1.8512542e-04   6.0477386e-03   9.6703484e-03   7.1488601e-03   1.5477068e-03   2.2742281e-03   9.7171923e-04   3.9271863e-04   3.8509554e-02   2.4774335e-02   8.7360281e-03   1.9891111e-03   1.1995846e-02   6.8973897e-03   5.5019459e-03   1.9965157e-02   8.4152844e-03   1.6247783e-03   1.4531219e-04   7.7480972e-03   8.6972032e-03   5.9824611e-03   1.5176827e-03   7.8567259e-03   3.3493021e-03   8.1204385e-02   5.1575806e-02   4.0135980e-02   5.2803481e-02   5.9400299e-02   5.8042463e-02   6.1291964e-02   5.1745941e-02   6.1508632e-02   3.3138226e-02   1.3469654e-02   3.9479896e-02   2.9967140e-02   6.1565597e-02   6.0825097e-02   2.7361698e-02   3.5748038e-02   4.0333571e-02   9.0138895e-02   4.8984196e-02   3.2667108e-02   4.4902460e-02   6.4253355e-02   2.1894327e-02   3.3940189e-02   3.2913172e-02   1.6731486e-02   1.8202458e-02   5.7045856e-02   2.7382191e-02   4.3985602e-02   2.1375556e-02   5.9676750e-02   2.5108522e-02   6.6474949e-02   3.7689168e-02   4.4508235e-02   3.7339453e-02   1.6368548e-02   2.0371230e-02   3.9606943e-02   1.4908799e-02   5.1575806e-02   4.6824025e-02   3.8781771e-02   2.3989539e-02   3.6452117e-02   2.2748990e-02   3.4902979e-02   3.6586492e-02   7.5459794e-03   1.9125850e-02   2.0310725e-02   6.1222293e-03   3.4447226e-03   8.1418452e-03   3.7867035e-02   1.2077489e-02   1.6567789e-02   2.1605044e-02   3.9038067e-03   1.6430417e-02   2.8689503e-02   1.3569150e-02   4.2181405e-03   2.6167927e-02   7.2610935e-03   7.0630535e-03   1.1392972e-02   1.4088158e-02   2.3849569e-02   9.5566395e-03   2.5308356e-02   1.7804542e-02   1.7150362e-02   5.8921861e-02   1.6182419e-02   2.0027139e-02   6.1819655e-03   2.0410396e-03   8.6030014e-03   8.6357480e-03   7.5787415e-03   1.2598904e-02   6.0656768e-03   8.7139108e-03   1.7031846e-03   2.3331644e-03   1.8821103e-03   3.1682605e-04   8.7160052e-03   8.5600328e-03   2.8826583e-04   3.4529372e-03   7.5176091e-03   2.1668627e-02   4.3875084e-03   6.5654007e-04   4.4940457e-03   9.7914071e-03   1.9831433e-04   3.3391345e-03   2.9870521e-03   6.9985633e-04   2.5162956e-03   7.1853248e-03   1.3860021e-03   2.9754449e-03   4.8339512e-03   8.0121089e-03   2.3142577e-03   1.5373296e-02   2.8512223e-03   6.2399212e-03   5.8796015e-03   3.1092372e-03   2.3415322e-04   1.9852251e-03   5.2321529e-03   6.1819655e-03   4.3274341e-03   1.8113019e-03   1.9110595e-03   2.4033410e-03   9.3130265e-05   5.1498910e-03   6.5356041e-03   9.5659910e-03   1.1252405e-02   5.1556774e-03   3.2048021e-03   1.2695843e-03   2.2856756e-02   5.7848184e-03   7.7211451e-03   1.0283621e-02   8.3602499e-03   2.7615733e-03   7.9786726e-03   5.6505970e-03   1.0691105e-02   7.1332727e-03   3.1295602e-03   5.2401241e-04   9.5266815e-04   6.4319329e-03   1.2318850e-02   9.4872145e-04   6.1326072e-03   3.4758657e-03   6.5333653e-03   4.0853883e-02   4.3049208e-03   3.1649609e-02   1.6528693e-02   1.4101758e-02   1.4838879e-02   2.1483291e-02   2.2597676e-02   1.8841242e-02   1.6959579e-02   2.5991410e-02   7.4250762e-03   1.9970150e-03   1.4113092e-02   1.0250250e-02   2.6744340e-02   2.8212793e-02   6.9997737e-03   7.0607843e-03   7.4739664e-03   4.8397396e-02   1.9593840e-02   1.0430940e-02   1.2525634e-02   2.7473469e-02   8.3209543e-03   6.1476473e-03   5.8775226e-03   5.2455782e-03   1.4265861e-03   2.2224591e-02   4.7507930e-03   1.7000338e-02   1.0369313e-03   2.5178358e-02   3.0495461e-03   2.1392322e-02   1.9628131e-02   1.0500631e-02   6.5204272e-03   9.7357638e-04   7.2933833e-03   1.5732817e-02   1.4704532e-02   1.6528693e-02   1.4858839e-02   1.2681737e-02   1.4339393e-02   1.8427144e-02   5.9852538e-03   5.6194230e-03   5.9265324e-03   8.2461319e-05   3.7688699e-03   6.4113525e-03   4.0576095e-03   3.3120738e-03   8.1782115e-04   1.0911416e-04   1.0750826e-04   3.1097496e-02   1.8955233e-02   6.6951403e-03   5.7580225e-04   9.5785875e-03   5.0095389e-03   2.9949836e-03   1.4512717e-02   5.0859668e-03   4.0940931e-04   2.6323499e-04   4.5146422e-03   6.3221754e-03   3.5606197e-03   3.7002765e-04   1.1722539e-02   1.5048339e-03   7.0395338e-02   4.3268177e-02   3.3370831e-02   4.4028795e-02   5.0578307e-02   4.9629423e-02   5.1746432e-02   4.3478758e-02   5.3066435e-02   2.6481479e-02   9.3392135e-03   3.2828923e-02   2.4313691e-02   5.3237993e-02   5.2867243e-02   2.1623243e-02   2.8596153e-02   3.2496284e-02   8.0563616e-02   4.1614554e-02   2.6578058e-02   3.7074597e-02   5.5590704e-02   1.7323162e-02   2.6950223e-02   2.6053254e-02   1.2554151e-02   1.3157434e-02   4.8740123e-02   2.1279987e-02   3.7040705e-02   1.5739340e-02   5.1410982e-02   1.9129885e-02   5.6480014e-02   3.2271228e-02   3.6432542e-02   2.9847396e-02   1.1573499e-02   1.5895178e-02   3.3202746e-02   1.2659655e-02   4.3268177e-02   3.9046279e-02   3.2014714e-02   2.0067384e-02   3.1045819e-02   1.7642117e-02   2.7677552e-02   2.9133996e-02   4.1910853e-03   7.2076003e-03   5.1147587e-03   2.7507325e-03   1.1620134e-03   3.3310681e-04   2.1458858e-04   3.3405406e-02   2.1499526e-02   8.0088547e-03   9.8332257e-04   9.6892205e-03   6.1744631e-03   3.6704596e-03   1.6544301e-02   6.4217725e-03   7.2111274e-04   2.1270559e-04   5.7183304e-03   7.6981750e-03   4.7117366e-03   8.0177817e-04   1.0442534e-02   2.2910923e-03   7.3784227e-02   4.5661689e-02   3.5029236e-02   4.6823533e-02   5.3065363e-02   5.1836541e-02   5.4866908e-02   4.5828107e-02   5.5174565e-02   2.8408213e-02   1.0505539e-02   3.4430852e-02   2.5609623e-02   5.5260802e-02   5.4654205e-02   2.3114484e-02   3.0836583e-02   3.5207839e-02   8.2686924e-02   4.3372344e-02   2.8064998e-02   3.9380344e-02   5.7772002e-02   1.8254235e-02   2.9162191e-02   2.8206341e-02   1.3497345e-02   1.4745279e-02   5.0900941e-02   2.3090436e-02   3.8677830e-02   1.7710943e-02   5.3450122e-02   2.1019262e-02   5.9801906e-02   3.3130692e-02   3.9030212e-02   3.2379101e-02   1.3108535e-02   1.6839016e-02   3.4625964e-02   1.2551681e-02   4.5661689e-02   4.1207031e-02   3.3732757e-02   2.0513590e-02   3.1937443e-02   1.8908607e-02   3.0105345e-02   3.1711397e-02   5.5341249e-04   1.8100865e-03   1.3685556e-02   1.1595059e-03   2.7733190e-03   5.0259130e-03   1.5582273e-02   1.5303863e-02   1.3216313e-02   1.8061219e-03   1.8483286e-03   1.0961959e-02   4.0632184e-04   7.9419645e-03   4.2030049e-03   1.8572156e-03   5.9964081e-03   2.8843938e-03   1.1487297e-02   6.2195738e-03   3.4171878e-03   2.7328194e-02   3.9549773e-03   4.5323537e-02   2.3233798e-02   1.5194289e-02   2.5226902e-02   2.8389486e-02   2.7075250e-02   3.1585337e-02   2.3242139e-02   2.9332670e-02   1.1663012e-02   1.9950589e-03   1.4768251e-02   9.1566367e-03   2.9330780e-02   2.8799195e-02   7.9264454e-03   1.3962831e-02   1.8481959e-02   5.0115855e-02   2.0802698e-02   1.0733745e-02   1.9041166e-02   3.1266982e-02   4.9760517e-03   1.3001310e-02   1.2292231e-02   2.6877167e-03   4.5798906e-03   2.6364594e-02   8.6153969e-03   1.7566530e-02   7.4744318e-03   2.8043210e-02   7.9969256e-03   3.5640074e-02   1.4109863e-02   1.9847472e-02   1.6098385e-02   3.9587699e-03   4.2468630e-03   1.4818700e-02   3.7268555e-03   2.3233798e-02   1.9851942e-02   1.4429507e-02   6.7117241e-03   1.3281147e-02   5.4664867e-03   1.4483311e-02   1.6079322e-02   1.4644608e-03   1.8793440e-02   2.6529941e-03   4.9386280e-03   7.8423223e-03   1.0293845e-02   1.1871124e-02   1.4064748e-02   3.3517168e-03   2.2145112e-03   1.1983758e-02   7.1285200e-04   4.9198989e-03   3.5944894e-03   3.6244119e-03   9.2640212e-03   2.3814700e-03   1.1959906e-02   6.6391160e-03   5.2659669e-03   3.4768199e-02   5.0225808e-03   3.6096256e-02   1.6893661e-02   1.0608435e-02   1.8369401e-02   2.1445998e-02   2.0588370e-02   2.3840862e-02   1.6945577e-02   2.2798129e-02   7.2320779e-03   4.5716975e-04   1.0311574e-02   5.8475513e-03   2.2922553e-02   2.2802937e-02   4.5367353e-03   8.9750660e-03   1.2721749e-02   4.2209187e-02   1.5508457e-02   6.9302761e-03   1.3261817e-02   2.4477020e-02   2.9037640e-03   8.2014592e-03   7.6405998e-03   1.0779902e-03   2.0077167e-03   2.0000571e-02   4.8259503e-03   1.2764273e-02   4.2375783e-03   2.1711543e-02   4.3575270e-03   2.7378197e-02   1.1026559e-02   1.3799894e-02   1.0731586e-02   1.6733633e-03   2.2875292e-03   1.0634216e-02   4.2659077e-03   1.6893661e-02   1.4117780e-02   9.8480141e-03   5.3491991e-03   1.0216132e-02   2.7977678e-03   9.4220767e-03   1.0761419e-02   1.4255275e-02   1.6372127e-03   2.8542706e-03   4.7214122e-03   1.3332443e-02   7.0444510e-03   6.5532524e-03   1.6174955e-03   6.7559932e-03   5.2389698e-03   5.3640347e-04   3.3171183e-03   5.1283913e-04   2.0296126e-03   6.0950963e-03   1.2744293e-04   5.0948120e-03   1.9318373e-03   2.3608728e-03   2.9089432e-02   1.4755776e-03   4.1865124e-02   2.2429622e-02   1.7100637e-02   2.2021240e-02   2.8022948e-02   2.8179896e-02   2.7393595e-02   2.2729266e-02   3.1385076e-02   1.0928177e-02   1.7748140e-03   1.6893502e-02   1.1535806e-02   3.1856326e-02   3.2502251e-02   8.7863970e-03   1.1670124e-02   1.3706425e-02   5.4822004e-02   2.3316700e-02   1.2494202e-02   1.7833364e-02   3.3214276e-02   7.9216177e-03   1.0562159e-02   1.0054198e-02   4.5572702e-03   2.8793276e-03   2.7614983e-02   7.5454514e-03   2.0103411e-02   3.8323098e-03   3.0272091e-02   5.9246169e-03   3.0771609e-02   1.9772265e-02   1.6666117e-02   1.2065056e-02   2.1106407e-03   6.8455106e-03   1.7918371e-02   1.0155544e-02   2.2429622e-02   1.9803941e-02   1.5812785e-02   1.2351590e-02   1.8630292e-02   6.7616623e-03   1.0713593e-02   1.1544341e-02   7.3852619e-03   4.6030790e-03   2.5842708e-03   5.4300453e-02   3.3576641e-02   1.0668428e-02   6.6015056e-03   2.1814225e-02   9.0913366e-03   1.2584515e-02   3.0243821e-02   1.4861127e-02   6.0467884e-03   1.7442631e-03   1.4568415e-02   1.1492675e-02   1.0173171e-02   5.0439803e-03   2.6472861e-03   7.4513739e-03   1.0326079e-01   7.0098941e-02   5.7127711e-02   7.0823391e-02   7.9250920e-02   7.7946311e-02   8.0298570e-02   7.0363352e-02   8.2049228e-02   4.8294128e-02   2.3708406e-02   5.6369153e-02   4.4949110e-02   8.2157728e-02   8.1370723e-02   4.1592461e-02   5.0974970e-02   5.5456655e-02   1.1462128e-01   6.7593968e-02   4.8172633e-02   6.2189094e-02   8.5184220e-02   3.4981615e-02   4.8742735e-02   4.7569879e-02   2.8345798e-02   2.9430788e-02   7.6817222e-02   4.1186102e-02   6.1732592e-02   3.2638549e-02   7.9961084e-02   3.8043139e-02   8.5993831e-02   5.4182844e-02   6.1100206e-02   5.2203816e-02   2.6988218e-02   3.3049806e-02   5.6579852e-02   2.5305632e-02   7.0098941e-02   6.4715083e-02   5.5458622e-02   3.7374533e-02   5.2731313e-02   3.5938214e-02   4.9377578e-02   5.1061578e-02   3.5870177e-04   1.3937749e-03   2.2192133e-02   1.4887667e-02   7.8001469e-03   8.8171759e-05   5.5216302e-03   5.9793748e-03   7.0276376e-04   9.5746848e-03   3.0437686e-03   8.2181914e-05   2.0068727e-03   2.2506604e-03   6.8090409e-03   3.1469229e-03   6.3301284e-04   1.8528100e-02   1.2625125e-03   5.6704255e-02   3.2399710e-02   2.3806821e-02   3.3394775e-02   3.8737297e-02   3.7833623e-02   4.0310184e-02   3.2556548e-02   4.0845247e-02   1.8140183e-02   4.6897646e-03   2.3353931e-02   1.6279158e-02   4.1004664e-02   4.0734447e-02   1.4064354e-02   2.0110135e-02   2.3937572e-02   6.5512797e-02   3.0871191e-02   1.8117892e-02   2.7110445e-02   4.3069544e-02   1.0732705e-02   1.8772743e-02   1.7996705e-02   7.0003565e-03   7.6876035e-03   3.7052349e-02   1.3928781e-02   2.6945955e-02   1.0128877e-02   3.9392715e-02   1.2368176e-02   4.4616010e-02   2.3284644e-02   2.6871325e-02   2.1527670e-02   6.5473767e-03   9.5899926e-03   2.3719212e-02   8.2529644e-03   3.2399710e-02   2.8696517e-02   2.2657048e-02   1.3399527e-02   2.2203050e-02   1.0884330e-02   1.9665180e-02   2.1074599e-02   3.3845415e-04   2.7555720e-02   1.6677843e-02   6.3795274e-03   1.8362843e-04   8.3039101e-03   4.7168779e-03   1.9845708e-03   1.2200549e-02   3.8746792e-03   1.0179352e-04   6.8781671e-04   3.2951534e-03   5.8068152e-03   2.8838183e-03   1.7929502e-04   1.4079350e-02   1.0261263e-03   6.5064614e-02   3.9139337e-02   2.9910766e-02   3.9801101e-02   4.6137717e-02   4.5316574e-02   4.7159535e-02   3.9352955e-02   4.8674767e-02   2.3254889e-02   7.4636086e-03   2.9417103e-02   2.1432655e-02   4.8877998e-02   4.8632496e-02   1.8795647e-02   2.5200016e-02   2.8886320e-02   7.5371106e-02   3.7782169e-02   2.3498806e-02   3.3236011e-02   5.1084684e-02   1.4998262e-02   2.3652548e-02   2.2813769e-02   1.0515841e-02   1.0877794e-02   4.4476659e-02   1.8379623e-02   3.3440220e-02   1.3262540e-02   4.7104689e-02   1.6362923e-02   5.1690239e-02   2.9302173e-02   3.2587374e-02   2.6378456e-02   9.4404077e-03   1.3645256e-02   2.9862026e-02   1.1376615e-02   3.9139337e-02   3.5158865e-02   2.8588131e-02   1.7920264e-02   2.8103943e-02   1.5132216e-02   2.4337714e-02   2.5719532e-02   3.3433714e-02   1.9092201e-02   5.6820829e-03   9.6311300e-04   1.1687721e-02   4.1741711e-03   3.9152052e-03   1.5429746e-02   5.3660274e-03   8.0766059e-04   9.2937667e-05   4.9943675e-03   5.5161799e-03   3.3131521e-03   4.2533013e-04   1.0435178e-02   1.4826896e-03   7.3827823e-02   4.6346021e-02   3.6506307e-02   4.6683572e-02   5.3981470e-02   5.3241058e-02   5.4467293e-02   4.6614647e-02   5.6933591e-02   2.8894083e-02   1.0839802e-02   3.5973376e-02   2.7110780e-02   5.7179243e-02   5.6957917e-02   2.4065468e-02   3.0813759e-02   3.4360438e-02   8.5582303e-02   4.5156230e-02   2.9396418e-02   3.9850269e-02   5.9522160e-02   1.9818286e-02   2.9063291e-02   2.8164144e-02   1.4610346e-02   1.4656069e-02   5.2344759e-02   2.3377306e-02   4.0412481e-02   1.6984268e-02   5.5250411e-02   2.0918953e-02   5.9213325e-02   3.5814189e-02   3.8804285e-02   3.1759139e-02   1.2931018e-02   1.8261938e-02   3.6495356e-02   1.5089913e-02   4.6346021e-02   4.2098942e-02   3.5016667e-02   2.2986158e-02   3.4503485e-02   1.9934983e-02   2.9546649e-02   3.0900707e-02   1.1335824e-02   3.2301226e-02   2.3277392e-02   1.5629192e-02   3.0795664e-02   1.5041716e-02   5.4315810e-03   1.4713782e-02   2.4451968e-02   3.6761202e-02   1.3762814e-02   2.8473446e-02   2.2472023e-02   2.6736705e-02   8.0230549e-02   2.3341323e-02   8.1067950e-03   1.4485807e-03   2.4486060e-03   1.1703837e-03   3.1310445e-03   3.9732842e-03   2.8350922e-03   1.6242765e-03   5.7101906e-03   4.5289508e-04   6.6077306e-03   2.6813364e-03   3.3571693e-03   6.2840633e-03   7.7260784e-03   2.0715363e-03   5.6385417e-05   8.9610646e-04   1.8073537e-02   3.9621048e-03   2.3604444e-03   4.7560860e-04   6.2480089e-03   5.8573026e-03   1.7069942e-04   2.3254450e-04   6.3902073e-03   3.8624324e-03   3.9083302e-03   1.0347438e-03   3.4531305e-03   3.5564063e-03   5.5040957e-03   1.4887365e-03   4.1720167e-03   8.6822743e-03   2.8448886e-04   5.1458480e-04   4.8536300e-03   5.8397245e-03   3.9827712e-03   1.8058791e-02   1.4485807e-03   1.2408841e-03   1.8448387e-03   1.0796845e-02   8.0405443e-03   3.4808504e-03   5.2754145e-04   8.8520211e-04   8.8923137e-03   1.4043268e-02   2.4126814e-02   9.1698320e-03   1.1327807e-02   1.9771649e-03   4.5360079e-03   1.5317882e-02   2.1762150e-02   5.6097757e-03   7.1877025e-03   6.8496039e-03   1.4100359e-02   5.3810596e-02   9.9629280e-03   3.1307769e-02   2.0553715e-02   2.1937453e-02   1.5991855e-02   2.5676129e-02   2.8613140e-02   1.8469501e-02   2.1322428e-02   3.3003652e-02   1.2471005e-02   8.9752587e-03   2.2249180e-02   1.9221338e-02   3.4330234e-02   3.7274155e-02   1.4283960e-02   1.0136722e-02   7.4549090e-03   5.7532344e-02   2.7732649e-02   1.8492242e-02   1.6393364e-02   3.4241314e-02   1.8497141e-02   9.1551303e-03   9.1767161e-03   1.4470512e-02   6.3039218e-03   2.8459911e-02   9.7413243e-03   2.5409718e-02   3.4719577e-03   3.2484401e-02   7.0164005e-03   2.0017467e-02   3.2249701e-02   1.2084843e-02   7.5073944e-03   5.8227226e-03   1.7146634e-02   2.5055287e-02   2.9865216e-02   2.0553715e-02   2.0008085e-02   1.9953689e-02   2.7764157e-02   3.0721044e-02   1.4086953e-02   7.0439235e-03   6.3871700e-03   6.2932024e-03   2.4881477e-02   1.2570656e-04   9.2318283e-03   1.1425023e-02   3.9781027e-03   6.8287051e-03   6.6316807e-03   5.1943433e-03   1.2253382e-04   1.3842125e-03   4.4535183e-03   2.1436401e-02   2.8241776e-03   6.8828353e-02   4.7091014e-02   4.2520568e-02   4.3241334e-02   5.5155458e-02   5.7042053e-02   4.8981701e-02   4.7857882e-02   6.2261278e-02   3.0649818e-02   1.4761608e-02   4.2406580e-02   3.4493935e-02   6.3340671e-02   6.5239814e-02   2.8920518e-02   2.9750953e-02   2.8851937e-02   9.4568410e-02   5.1830706e-02   3.5536784e-02   4.0198717e-02   6.4555077e-02   2.8697450e-02   2.7846993e-02   2.7347316e-02   2.1934395e-02   1.5675611e-02   5.6443004e-02   2.4878970e-02   4.7356921e-02   1.4503825e-02   6.0963940e-02   2.0840976e-02   5.2367097e-02   4.8672170e-02   3.5784762e-02   2.7656172e-02   1.3836981e-02   2.6623769e-02   4.4650658e-02   3.0852069e-02   4.7091014e-02   4.4370840e-02   4.0176310e-02   3.6600204e-02   4.6858384e-02   2.5835018e-02   2.6019603e-02   2.5994222e-02   6.9728196e-03   4.6608676e-03   9.9835054e-04   9.5223148e-03   2.6272609e-03   2.7884021e-05   1.5635547e-03   2.0372846e-03   5.4615556e-03   2.3300808e-03   2.5698617e-04   1.7457304e-02   7.2996870e-04   5.8453388e-02   3.4095678e-02   2.5737672e-02   3.4628989e-02   4.0687367e-02   4.0032201e-02   4.1519056e-02   3.4313166e-02   4.3287054e-02   1.9386832e-02   5.3532424e-03   2.5306754e-02   1.8013458e-02   4.3531307e-02   4.3448361e-02   1.5446633e-02   2.1111383e-02   2.4519102e-02   6.8935827e-02   3.3123525e-02   1.9821803e-02   2.8570801e-02   4.5547846e-02   1.2302601e-02   1.9692146e-02   1.8929129e-02   8.1934144e-03   8.2421848e-03   3.9256624e-02   1.4936345e-02   2.9083818e-02   1.0370393e-02   4.1828239e-02   1.3093356e-02   4.5785106e-02   2.5766235e-02   2.7913838e-02   2.2194996e-02   6.9953757e-03   1.1047300e-02   2.5843766e-02   1.0033677e-02   3.4095678e-02   3.0429687e-02   2.4458901e-02   1.5454278e-02   2.4603652e-02   1.2196519e-02   2.0322394e-02   2.1606954e-02   2.1763592e-02   3.8778874e-03   1.3140898e-02   1.0973585e-02   6.8570288e-03   1.2689294e-02   8.7227464e-03   2.2446768e-02   1.4768924e-02   9.8837253e-03   3.6594036e-02   1.1176832e-02   4.2371132e-02   2.0489598e-02   1.1322791e-02   2.4620431e-02   2.4482623e-02   2.2010230e-02   3.1108475e-02   2.0217050e-02   2.3141445e-02   1.0944826e-02   3.8599335e-03   1.0791452e-02   6.1542383e-03   2.2743482e-02   2.1333545e-02   6.5515291e-03   1.4388718e-02   2.0852825e-02   3.9383251e-02   1.5461941e-02   7.8878514e-03   1.7372104e-02   2.4911352e-02   2.6880230e-03   1.3798611e-02   1.3025794e-02   2.1193973e-03   6.9838956e-03   2.1270749e-02   8.9787629e-03   1.2743052e-02   1.1335890e-02   2.1877049e-02   9.6533919e-03   3.5351983e-02   7.6384883e-03   2.0107777e-02   1.8067074e-02   6.8413076e-03   2.4741061e-03   1.0039063e-02   3.4670280e-04   2.0489598e-02   1.6923143e-02   1.1154236e-02   2.1521967e-03   7.1850256e-03   4.3898059e-03   1.6491142e-02   1.8665860e-02   7.4245740e-03   1.0715228e-02   3.1685550e-03   5.1120383e-03   5.0451240e-03   4.1323270e-03   1.4489604e-04   8.1318290e-04   3.0839979e-03   1.9714350e-02   1.7947024e-03   6.7440625e-02   4.5128820e-02   3.9916292e-02   4.1909560e-02   5.3040678e-02   5.4550431e-02   4.7872699e-02   4.5818357e-02   5.9509133e-02   2.8778013e-02   1.2927960e-02   3.9749997e-02   3.1835574e-02   6.0466685e-02   6.2068316e-02   2.6673332e-02   2.8274822e-02   2.8015780e-02   9.1028220e-02   4.9020613e-02   3.3018114e-02   3.8378554e-02   6.1817956e-02   2.5959804e-02   2.6422336e-02   2.5876047e-02   1.9520884e-02   1.4184191e-02   5.3918305e-02   2.3137863e-02   4.4568283e-02   1.3507580e-02   5.8174666e-02   1.9385371e-02   5.1416653e-02   4.5132833e-02   3.4491897e-02   2.6637939e-02   1.2404699e-02   2.3988175e-02   4.1744067e-02   2.7329966e-02   4.5128820e-02   4.2235431e-02   3.7715182e-02   3.3171215e-02   4.3405180e-02   2.3512609e-02   2.4946638e-02   2.5117607e-02   5.7451096e-03   2.0181202e-03   1.1916495e-03   5.0056293e-03   1.1565469e-03   7.7131020e-03   3.5313465e-03   2.1072743e-03   2.6393551e-02   2.0670282e-03   4.4935473e-02   2.3639481e-02   1.6646699e-02   2.4503230e-02   2.9137719e-02   2.8488385e-02   3.0530237e-02   2.3788614e-02   3.1241308e-02   1.1731452e-02   1.7654569e-03   1.6307697e-02   1.0602623e-02   3.1457386e-02   3.1449229e-02   8.6094127e-03   1.3341698e-02   1.6740022e-02   5.3656632e-02   2.2705161e-02   1.1958802e-02   1.9130319e-02   3.3171817e-02   6.4720106e-03   1.2268562e-02   1.1633623e-02   3.5425115e-03   3.7925712e-03   2.7828397e-02   8.3873180e-03   1.9384549e-02   5.8220699e-03   3.0002594e-02   7.2263237e-03   3.4339797e-02   1.7195852e-02   1.8977924e-02   1.4659749e-02   3.0403500e-03   5.5430802e-03   1.6804744e-02   6.5028482e-03   2.3639481e-02   2.0526700e-02   1.5612876e-02   9.4514606e-03   1.6202837e-02   6.2323724e-03   1.3120120e-02   1.4374340e-02   2.8180986e-03   1.0509318e-02   1.7897176e-02   2.8798358e-03   9.1928702e-03   6.3970688e-03   1.0746267e-02   5.0496414e-02   7.7981540e-03   2.4751970e-02   1.2458649e-02   1.1686269e-02   1.0356316e-02   1.6774912e-02   1.8282513e-02   1.3498932e-02   1.2919728e-02   2.1579044e-02   5.2962835e-03   2.7725666e-03   1.1818152e-02   9.1091800e-03   2.2436834e-02   2.4265521e-02   5.8512682e-03   4.4398598e-03   4.1822455e-03   4.2435194e-02   1.6425553e-02   8.8184300e-03   9.0473617e-03   2.2804959e-02   8.4055012e-03   3.7245140e-03   3.5955501e-03   5.8501155e-03   1.2261597e-03   1.8027694e-02   3.2889908e-03   1.4332649e-02   2.5252408e-04   2.0964539e-02   1.7865385e-03   1.5552416e-02   1.8549588e-02   6.8429145e-03   3.5948443e-03   1.0694978e-03   7.5092190e-03   1.3665818e-02   1.7252830e-02   1.2458649e-02   1.1370103e-02   1.0296741e-02   1.5007456e-02   1.7383467e-02   5.5463863e-03   2.9922345e-03   3.0734531e-03   3.1960387e-03   6.8662451e-03   1.2966654e-04   2.7649067e-03   8.3427366e-04   2.7984284e-03   2.9822521e-02   1.2731780e-03   4.3416537e-02   2.4875338e-02   2.0714079e-02   2.3200351e-02   3.0852531e-02   3.1753284e-02   2.8200300e-02   2.5332686e-02   3.5512031e-02   1.2989773e-02   3.4785945e-03   2.0603808e-02   1.5135483e-02   3.6226615e-02   3.7456354e-02   1.1531484e-02   1.2959687e-02   1.3737739e-02   6.0763799e-02   2.7435536e-02   1.5849420e-02   1.9923216e-02   3.7336849e-02   1.1567919e-02   1.1725372e-02   1.1300051e-02   7.4803077e-03   3.9656480e-03   3.1244978e-02   9.2703065e-03   2.4126524e-02   3.9496417e-03   3.4455719e-02   7.0383738e-03   3.1302098e-02   2.5203523e-02   1.7680030e-02   1.2436482e-02   3.0466203e-03   1.0266971e-02   2.2126952e-02   1.5206492e-02   2.4875338e-02   2.2550174e-02   1.9125072e-02   1.7383181e-02   2.3878119e-02   9.5944653e-03   1.1168635e-02   1.1615557e-02   1.3151667e-03   2.5320521e-03   6.0366399e-03   2.7823080e-03   2.9364031e-04   1.6476106e-02   9.7247557e-04   6.0284770e-02   3.5334723e-02   2.6546579e-02   3.6095524e-02   4.1987790e-02   4.1172424e-02   4.3178382e-02   3.5527420e-02   4.4374359e-02   2.0339225e-02   5.8436205e-03   2.6082735e-02   1.8603485e-02   4.4570054e-02   4.4351810e-02   1.6144347e-02   2.2244142e-02   2.5921932e-02   7.0056396e-02   3.3998717e-02   2.0524111e-02   2.9752453e-02   4.6679420e-02   1.2673386e-02   2.0806267e-02   2.0008665e-02   8.5632030e-03   8.9793060e-03   4.0369526e-02   1.5814708e-02   2.9884891e-02   1.1327921e-02   4.2874486e-02   1.4012365e-02   4.7563178e-02   2.6115270e-02   2.9259206e-02   2.3493076e-02   7.6990791e-03   1.1423166e-02   2.6517929e-02   9.7961479e-03   3.5334723e-02   3.1531604e-02   2.5300172e-02   1.5549538e-02   2.4969819e-02   1.2759840e-02   2.1558690e-02   2.2929217e-02   6.4418336e-03   6.6136731e-03   4.4102106e-03   9.1481615e-04   8.6358065e-03   2.3009102e-03   7.8700864e-02   5.0063075e-02   3.9499858e-02   5.0635713e-02   5.7926279e-02   5.6986449e-02   5.8777354e-02   5.0310505e-02   6.0682610e-02   3.1865387e-02   1.2666075e-02   3.8913195e-02   2.9597893e-02   6.0871779e-02   6.0471723e-02   2.6606279e-02   3.4024273e-02   3.7905442e-02   8.9816272e-02   4.8416482e-02   3.2086335e-02   4.3354864e-02   6.3371751e-02   2.1811352e-02   3.2202223e-02   3.1242353e-02   1.6436605e-02   1.6909958e-02   5.6040246e-02   2.6101775e-02   4.3480802e-02   1.9524603e-02   5.8918015e-02   2.3597831e-02   6.3733101e-02   3.8161980e-02   4.2440703e-02   3.5140814e-02   1.5073633e-02   2.0215594e-02   3.9313992e-02   1.6000311e-02   5.0063075e-02   4.5569203e-02   3.8016354e-02   2.4659247e-02   3.6849168e-02   2.2186423e-02   3.2805330e-02   3.4269626e-02   3.8467105e-03   1.2875815e-03   2.5072619e-03   2.9525973e-02   1.2875815e-03   4.2282453e-02   2.3357390e-02   1.8646096e-02   2.2313442e-02   2.9124686e-02   2.9658732e-02   2.7480923e-02   2.3735668e-02   3.3135090e-02   1.1714292e-02   2.4574323e-03   1.8489812e-02   1.3106245e-02   3.3729170e-02   3.4672500e-02   9.9345371e-03   1.2062833e-02   1.3461486e-02   5.7431716e-02   2.5093254e-02   1.3932087e-02   1.8599958e-02   3.4955869e-02   9.5459229e-03   1.0897419e-02   1.0433767e-02   5.8375168e-03   3.2324242e-03   2.9124686e-02   8.1819777e-03   2.1845036e-02   3.6925062e-03   3.2054971e-02   6.2644754e-03   3.0710474e-02   2.2249402e-02   1.6897068e-02   1.1997033e-02   2.3970471e-03   8.3620725e-03   1.9766550e-02   1.2536577e-02   2.3357390e-02   2.0894448e-02   1.7210222e-02   1.4675128e-02   2.1017625e-02   7.9709601e-03   1.0694253e-02   1.1329979e-02   8.0862109e-04   3.9488260e-03   2.3216413e-02   2.2109950e-03   6.3313725e-02   4.2461361e-02   3.8219621e-02   3.8832114e-02   5.0144792e-02   5.1966249e-02   4.4333772e-02   4.3192281e-02   5.6977170e-02   2.6944997e-02   1.2389873e-02   3.8126276e-02   3.0729621e-02   5.8026007e-02   5.9897200e-02   2.5415278e-02   2.6079828e-02   2.5293603e-02   8.8103550e-02   4.7063061e-02   3.1649890e-02   3.5923563e-02   5.9166899e-02   2.5434205e-02   2.4297609e-02   2.3831192e-02   1.9112973e-02   1.3083158e-02   5.1398726e-02   2.1557413e-02   4.2826183e-02   1.1968109e-02   5.5744441e-02   1.7792619e-02   4.7600638e-02   4.4377594e-02   3.1768113e-02   2.4143930e-02   1.1416637e-02   2.3484839e-02   4.0313562e-02   2.8205265e-02   4.2461361e-02   3.9889484e-02   3.5980112e-02   3.3161057e-02   4.2633793e-02   2.2600989e-02   2.2605649e-02   2.2606045e-02   1.6651142e-03   2.2593118e-02   4.7494657e-04   5.5766903e-02   3.4735344e-02   2.9594132e-02   3.2557240e-02   4.1723024e-02   4.2746173e-02   3.8238608e-02   3.5278801e-02   4.7033204e-02   2.0363061e-02   7.2717611e-03   2.9420951e-02   2.2560431e-02   4.7813714e-02   4.9078515e-02   1.8314288e-02   2.0299319e-02   2.0869007e-02   7.5386883e-02   3.7549246e-02   2.3623644e-02   2.8844458e-02   4.9142563e-02   1.7633849e-02   1.8744071e-02   1.8222205e-02   1.2402012e-02   8.3988430e-03   4.2147698e-02   1.5629140e-02   3.3602383e-02   8.3018288e-03   4.5796447e-02   1.2702505e-02   4.1687026e-02   3.3943329e-02   2.5980350e-02   1.9415550e-02   7.0260502e-03   1.6012157e-02   3.1063717e-02   1.9520820e-02   3.4735344e-02   3.1983672e-02   2.7741891e-02   2.3833980e-02   3.2440091e-02   1.5637054e-02   1.7874227e-02   1.8281297e-02   1.4972117e-02   3.8328039e-04   6.3723448e-02   3.8719440e-02   3.0384566e-02   3.8629777e-02   4.5827446e-02   4.5472032e-02   4.5653244e-02   3.9023449e-02   4.9116846e-02   2.2930601e-02   7.4083466e-03   2.9962579e-02   2.2100137e-02   4.9469036e-02   4.9598054e-02   1.8997460e-02   2.4379661e-02   2.7279745e-02   7.6566902e-02   3.8413283e-02   2.3958684e-02   3.2715136e-02   5.1484761e-02   1.5886249e-02   2.2794916e-02   2.2023153e-02   1.1094162e-02   1.0331639e-02   4.4681292e-02   1.7978253e-02   3.4097516e-02   1.2099271e-02   4.7608429e-02   1.5662138e-02   4.9957613e-02   3.0977854e-02   3.1455087e-02   2.5013254e-02   8.8604244e-03   1.4432007e-02   3.0714741e-02   1.3426163e-02   3.8719440e-02   3.4992868e-02   2.8902863e-02   1.9656006e-02   2.9684992e-02   1.5494562e-02   2.3064694e-02   2.4203450e-02   1.8836956e-02   1.3755831e-01   9.8685385e-02   8.2425470e-02   1.0000651e-01   1.0925759e-01   1.0726669e-01   1.1120208e-01   9.8918033e-02   1.1167083e-01   7.2661493e-02   4.1665349e-02   8.1426911e-02   6.7501542e-02   1.1159988e-01   1.1014878e-01   6.3989575e-02   7.6224987e-02   8.1835804e-02   1.4773346e-01   9.4587815e-02   7.1696153e-02   8.9447560e-02   1.1534202e-01   5.4876111e-02   7.3538690e-02   7.2081812e-02   4.6952332e-02   4.9385723e-02   1.0589901e-01   6.4038977e-02   8.7644093e-02   5.3625558e-02   1.0917520e-01   6.0322002e-02   1.1787190e-01   7.6918821e-02   8.8499122e-02   7.7885622e-02   4.6255911e-02   5.2612368e-02   8.1239445e-02   4.0019052e-02   9.8685385e-02   9.2131722e-02   8.0633770e-02   5.6243805e-02   7.5363077e-02   5.6811044e-02   7.4440381e-02   7.6512320e-02   5.8097767e-02   3.5211195e-02   2.8463781e-02   3.4215950e-02   4.2147698e-02   4.2414656e-02   4.0542228e-02   3.5615822e-02   4.6295613e-02   2.0363061e-02   6.3798220e-03   2.8163995e-02   2.0925233e-02   4.6838114e-02   4.7487902e-02   1.7368541e-02   2.1117782e-02   2.2967145e-02   7.3810390e-02   3.6316652e-02   2.2375879e-02   2.9367287e-02   4.8511603e-02   1.5463833e-02   1.9583828e-02   1.8938570e-02   1.0601468e-02   8.3988430e-03   4.1723024e-02   1.5629140e-02   3.2244606e-02   9.3153170e-03   4.4933305e-02   1.3111918e-02   4.4412271e-02   3.0809608e-02   2.7438827e-02   2.1093197e-02   7.0260502e-03   1.3969417e-02   2.9313944e-02   1.5218585e-02   3.5211195e-02   3.1983672e-02   2.6841235e-02   2.0313092e-02   2.9439905e-02   1.4332974e-02   1.9364178e-02   2.0170126e-02   3.9924060e-03   1.0538198e-02   3.2148883e-03   2.7366019e-03   4.4621109e-03   1.7397347e-03   4.1425525e-03   5.2723146e-03   1.1136640e-02   2.9112354e-02   1.1160954e-02   1.6541883e-02   6.0336652e-03   8.3590571e-03   1.6026960e-02   9.4770245e-03   8.7523451e-03   9.5282841e-03   8.5487892e-03   1.3900105e-02   5.7309995e-03   4.7773544e-03   2.3853571e-02   1.0495078e-02   1.1045936e-02   2.7111420e-02   2.3076623e-02   4.8207470e-03   1.4681091e-02   1.0141190e-02   2.1316125e-02   5.8141126e-03   1.6474359e-02   1.3064397e-03   2.0347529e-02   5.7992324e-03   9.5368199e-03   2.5369333e-02   2.4565418e-02   1.2896533e-02   4.4389699e-02   3.9924060e-03   5.8442541e-03   1.0341765e-02   2.9771308e-02   2.0024906e-02   2.0168043e-02   1.0668382e-02   1.0461554e-02   1.6977050e-03   8.0038314e-04   3.2736649e-04   7.3247771e-04   1.7861084e-03   1.2199790e-05   1.6168506e-03   2.0903986e-03   1.2529506e-02   1.9650001e-03   4.3150624e-03   2.0139182e-03   3.1759995e-03   4.1258242e-03   2.0323215e-03   3.5878910e-03   9.4977361e-03   1.5488203e-03   3.0112961e-03   2.7909675e-04   1.8152664e-03   8.3701176e-03   2.5714996e-03   2.7148441e-03   1.0520423e-02   9.2964166e-03   7.5284963e-04   3.9888853e-03   1.8331853e-03   9.4586856e-03   1.6039412e-03   5.4889906e-03   2.8052973e-03   7.3341015e-03   1.2316222e-03   3.2601592e-03   1.0868316e-02   8.8162037e-03   2.9210959e-03   2.1963225e-02   0.0000000e+00   1.8230646e-04   1.5254865e-03   1.2273284e-02   6.9788794e-03   6.3577637e-03   3.5631537e-03   4.1101326e-03   4.2047124e-03   2.6033919e-03   1.7916004e-03   6.7524244e-03   1.5279872e-03   2.3303877e-03   1.3468412e-03   7.9573793e-03   9.8329441e-06   8.0754860e-04   2.3639655e-03   2.4986002e-03   1.3799583e-03   2.6729899e-03   6.2996248e-03   1.0853281e-02   4.8574547e-04   3.9201723e-04   1.4418237e-03   2.9002781e-03   3.0725233e-03   3.0407572e-03   2.9093497e-03   5.1175009e-03   6.6599859e-03   1.5926877e-03   2.5889139e-03   1.3713626e-04   8.5117654e-03   1.9829707e-03   4.3442759e-03   8.7298845e-03   2.1325966e-03   3.5994846e-03   5.1472858e-03   7.9423211e-03   3.5289513e-03   2.0294631e-04   1.1925423e-02   1.6977050e-03   7.8274456e-04   4.8500499e-05   4.9289073e-03   1.8879551e-03   2.5218165e-03   4.9495642e-03   6.1589498e-03   1.4775011e-03   2.8508338e-03   3.8437964e-04   1.0082748e-03   4.3870644e-03   2.7766403e-03   1.3317076e-02   4.6107743e-03   7.0365754e-03   5.0970174e-03   7.0294656e-03   5.8145812e-03   1.6991258e-03   1.6190058e-03   1.4192459e-02   4.5311136e-03   5.3518685e-03   7.5607221e-04   4.5347742e-03   1.1372343e-02   2.1219078e-03   2.3903563e-03   1.2745790e-02   9.1602079e-03   2.9606388e-03   4.3905218e-03   4.7897027e-03   8.0493172e-03   4.4779450e-03   5.1908739e-03   9.8295198e-04   1.2281083e-02   3.7969538e-04   1.7665186e-03   1.0605818e-02   1.1571194e-02   6.2101277e-03   2.7119271e-02   8.0038314e-04   1.4492761e-03   3.6743113e-03   1.7056692e-02   1.1710246e-02   8.2821554e-03   2.2240766e-03   2.2684005e-03   3.0380682e-04   2.0343287e-03   2.8037036e-04   8.3123377e-04   3.9939935e-03   1.6647447e-02   2.9061444e-03   6.1278767e-03   1.1769582e-03   2.2926522e-03   6.3717175e-03   3.9793414e-03   5.6921961e-03   6.6386310e-03   1.6577942e-03   4.6178179e-03   1.2108195e-03   8.4773320e-04   1.1017765e-02   4.7223063e-03   4.9236953e-03   1.3900771e-02   1.3046714e-02   3.7972280e-04   6.5335900e-03   2.3480655e-03   1.3286542e-02   9.3142474e-04   8.4820747e-03   2.8343361e-03   8.2403259e-03   2.5815546e-03   5.4537681e-03   1.4900562e-02   1.1670902e-02   3.7659184e-03   2.5593433e-02   3.2736649e-04   7.7091107e-04   2.6079554e-03   1.4611634e-02   8.0055625e-03   9.0564615e-03   5.9260895e-03   6.5055071e-03   3.8779943e-03   5.7015696e-04   1.7303569e-04   4.1690936e-03   1.6322670e-02   1.9974930e-03   5.0009825e-03   3.2570724e-04   9.5057293e-04   5.8304604e-03   4.8059418e-03   7.5457291e-03   5.1241997e-03   6.9111123e-04   3.7782470e-03   1.7092344e-03   2.5698914e-04   9.5453465e-03   5.5846827e-03   5.6938512e-03   1.2788699e-02   1.3393372e-02   7.3809633e-06   6.7682476e-03   1.3200598e-03   1.4442150e-02   1.8441195e-04   9.0822620e-03   4.9911804e-03   5.8437761e-03   3.8589879e-03   6.9829557e-03   1.5273413e-02   1.0318402e-02   2.4584659e-03   2.2525564e-02   7.3247771e-04   8.2385517e-04   1.9942911e-03   1.2041849e-02   5.7258386e-03   8.2738022e-03   7.3225251e-03   8.2204997e-03   2.0515682e-03   5.4510656e-03   5.2217407e-03   1.7964531e-02   7.2742632e-03   1.0588415e-02   6.2949332e-03   8.6345788e-03   9.1795241e-03   3.5876856e-03   2.6991302e-03   1.4376485e-02   6.5862079e-03   8.4804528e-03   2.1372463e-03   5.3927480e-03   1.5896874e-02   4.1394106e-03   4.5375167e-03   1.7523452e-02   1.2909742e-02   4.0941134e-03   7.2891356e-03   7.2227860e-03   1.1126344e-02   5.7124492e-03   8.1126160e-03   1.3907276e-04   1.6260954e-02   1.3854449e-03   3.2122771e-03   1.4553993e-02   1.6151019e-02   9.1578470e-03   3.3857588e-02   1.7861084e-03   2.9619943e-03   6.1829720e-03   2.2326762e-02   1.5680260e-02   1.2223630e-02   3.9245535e-03   3.7050303e-03   1.3686449e-03   2.1603250e-03   1.2649428e-02   1.7801502e-03   4.1458992e-03   1.7278919e-03   2.7991042e-03   4.0888611e-03   2.2218452e-03   3.9716339e-03   8.9665631e-03   1.3013529e-03   2.8806398e-03   3.4594790e-04   1.5677728e-03   8.1916354e-03   2.7802616e-03   2.9107124e-03   1.0452698e-02   9.5134829e-03   5.8171764e-04   4.1098444e-03   1.6001879e-03   9.8257537e-03   1.3468918e-03   5.7037585e-03   3.1132824e-03   6.8805675e-03   1.4645264e-03   3.5912866e-03   1.1107885e-02   8.6722521e-03   2.6587395e-03   2.1561220e-02   1.2199790e-05   1.4772036e-04   1.4023821e-03   1.1878859e-02   6.5538274e-03   6.3060622e-03   3.8811059e-03   4.4873121e-03   5.6719205e-03   1.8601099e-02   2.5037679e-03   5.8026549e-03   3.0990295e-05   3.8568498e-04   7.1301713e-03   6.6581271e-03   9.9891912e-03   3.5467136e-03   7.7986655e-04   4.6294369e-03   2.9226786e-03   3.3006174e-05   1.0560037e-02   7.5497742e-03   7.6393818e-03   1.4326258e-02   1.5841028e-02   1.7171643e-04   8.5994033e-03   1.5671556e-03   1.7334506e-02   1.9316046e-05   1.1306536e-02   6.6195881e-03   5.5794173e-03   5.6606012e-03   9.3044548e-03   1.7865075e-02   1.1490070e-02   2.7178516e-03   2.3185889e-02   1.6168506e-03   1.6521970e-03   2.7157547e-03   1.2355858e-02   5.5768992e-03   9.6617637e-03   9.6558503e-03   1.0729574e-02   4.4050618e-03   1.4462579e-03   1.4084514e-03   6.0437228e-03   6.9280724e-03   5.9092958e-04   3.5267150e-04   2.3264461e-03   1.8099026e-02   3.0921484e-03   8.6005594e-04   9.1287231e-04   6.3843974e-03   3.0627943e-03   4.0297343e-04   3.2526954e-04   3.6399798e-03   2.6478661e-03   3.9939935e-03   3.1762278e-04   2.2988741e-03   3.2596799e-03   5.3016678e-03   9.7044163e-04   7.0435695e-03   5.7009823e-03   1.4263218e-03   1.5142545e-03   3.5226184e-03   3.0792135e-03   2.3251410e-03   1.2857609e-02   2.0903986e-03   1.3292907e-03   8.8570158e-04   6.8622586e-03   5.1349839e-03   1.4775225e-03   1.2815928e-03   1.9995407e-03   7.7887386e-03   4.2718762e-03   1.8880208e-02   1.9223691e-02   2.7240761e-03   5.5247078e-03   8.3688264e-03   3.7206770e-02   1.2358468e-02   4.8889738e-03   9.3012979e-03   2.0063076e-02   2.3808756e-03   4.8847228e-03   4.4654367e-03   8.0211221e-04   5.5572260e-04   1.5849918e-02   2.4737465e-03   1.0011166e-02   2.0320189e-03   1.7697241e-02   2.0106232e-03   2.1009310e-02   1.0002251e-02   9.3994441e-03   6.7786672e-03   4.3329436e-04   1.8154672e-03   8.4395042e-03   6.2214471e-03   1.2529506e-02   1.0325253e-02   7.1412079e-03   5.6981926e-03   9.1712120e-03   1.6108637e-03   5.7438691e-03   6.7900644e-03   6.8888062e-04   2.5080626e-03   2.5613963e-03   1.3274318e-03   2.8814590e-03   6.6724246e-03   1.1044919e-02   5.3338455e-04   3.3999007e-04   1.6762239e-03   3.1000026e-03   2.8256325e-03   3.2387801e-03   3.0867064e-03   4.8730365e-03   6.6378483e-03   1.7822362e-03   2.6462661e-03   1.4123935e-04   8.6230682e-03   2.1318487e-03   4.4281251e-03   9.3233552e-03   1.8673327e-03   3.9343847e-03   5.4568897e-03   7.9015195e-03   3.2859077e-03   1.3180217e-04   1.1320265e-02   1.9650001e-03   9.6799653e-04   7.8282421e-05   4.5166083e-03   1.6331972e-03   2.3904078e-03   5.2224500e-03   6.4841213e-03   5.7642096e-03   5.5885978e-03   3.7048759e-04   3.1695738e-03   7.3434699e-03   1.6768125e-02   2.3743894e-03   1.1932462e-04   3.2200650e-03   6.6976868e-03   7.3134819e-04   3.2564607e-03   2.9664521e-03   1.9437509e-03   4.0525881e-03   4.6657625e-03   1.7256268e-03   1.3667365e-03   6.4082141e-03   5.2167922e-03   3.0823107e-03   1.3133486e-02   1.7068449e-03   5.3434665e-03   5.8085657e-03   4.9261084e-03   9.6684380e-04   7.1816432e-04   6.8418503e-03   4.3150624e-03   2.7358698e-03   7.4246714e-04   2.1999970e-03   1.3715192e-03   6.3897855e-04   5.2531215e-03   6.6567087e-03   1.9959041e-04   7.2877827e-03   7.2348769e-03   1.0891220e-02   3.2459725e-03   7.4122702e-04   4.6749634e-03   3.3669230e-03   7.9583955e-05   1.0437521e-02   8.1436642e-03   8.2061472e-03   1.4337740e-02   1.6319841e-02   3.0462366e-04   9.0085125e-03   1.5214225e-03   1.8068443e-02   2.5934558e-05   1.1842923e-02   7.5545176e-03   5.1162105e-03   6.3606028e-03   1.0107865e-02   1.8360102e-02   1.1411116e-02   2.5943653e-03   2.2590562e-02   2.0139182e-03   1.9469619e-03   2.8165944e-03   1.1880076e-02   5.1539049e-03   9.7568917e-03   1.0422756e-02   1.1596876e-02   7.5663186e-03   8.6488322e-03   1.3133604e-02   3.0107568e-03   7.9406152e-04   4.7466095e-03   4.5711602e-03   4.9936224e-04   9.9296431e-03   9.5749791e-03   9.5587917e-03   1.4081306e-02   1.7234890e-02   8.7040364e-04   9.9040316e-03   1.5012448e-03   1.9639569e-02   3.0179394e-04   1.3010570e-02   1.0161281e-02   3.9519870e-03   8.1767554e-03   1.2080688e-02   1.9279439e-02   1.0989202e-02   2.3266303e-03   2.0713423e-02   3.1759995e-03   2.8067172e-03   3.1032715e-03   1.0490119e-02   4.0786420e-03   9.8110939e-03   1.2277454e-02   1.3709414e-02   1.7582839e-03   4.9489607e-03   1.9934064e-02   3.5016865e-03   3.4697267e-04   2.6310541e-03   8.0617166e-03   9.6411709e-04   1.7064375e-03   1.4666650e-03   1.4745772e-03   2.1108592e-03   5.5260764e-03   5.1802495e-04   2.3341578e-03   3.7167048e-03   6.5626516e-03   1.3180061e-03   1.1565092e-02   3.6658759e-03   3.8514458e-03   3.6514318e-03   2.8125792e-03   9.8545506e-04   1.7565517e-03   7.9513446e-03   4.1258242e-03   2.7177731e-03   1.0483123e-03   3.5558284e-03   3.1649242e-03   2.4110016e-04   3.1231514e-03   4.2303212e-03   8.7046320e-04   1.9803680e-02   4.5057787e-03   2.2875453e-03   8.1473256e-04   7.2784764e-03   5.2841523e-03   3.1936914e-05   6.0579771e-05   5.5427829e-03   2.9996038e-03   4.7111715e-03   6.7018226e-04   3.8206460e-03   2.7379425e-03   6.3961850e-03   9.7000606e-04   5.0455840e-03   8.7517746e-03   5.2181192e-04   4.2086901e-04   3.8740476e-03   5.1909001e-03   4.1846614e-03   1.6912712e-02   2.0323215e-03   1.6814934e-03   2.0140995e-03   1.0246238e-02   8.0709165e-03   2.9533168e-03   3.5001524e-04   7.2402168e-04   2.4525121e-02   8.3786268e-03   5.9730003e-03   2.2241688e-03   1.0490949e-02   1.0052150e-02   8.4481649e-04   1.0306755e-03   9.7104895e-03   4.7051149e-03   7.5682486e-03   2.5521754e-03   7.8053009e-03   3.0734717e-03   9.8801938e-03   2.2384251e-03   3.6192976e-03   1.5052125e-02   6.1736712e-04   1.0280118e-04   5.5375454e-03   9.7589612e-03   8.6474768e-03   2.4375316e-02   3.5878910e-03   3.8390770e-03   5.3089764e-03   1.6859170e-02   1.4176552e-02   6.5576789e-03   2.5984028e-04   9.3320862e-05   6.7547274e-03   1.5238284e-02   1.2713534e-02   3.0890016e-03   2.3712664e-02   2.1340343e-02   2.1521507e-02   3.0005294e-02   3.3960619e-02   5.2290080e-03   2.3006673e-02   8.7125215e-03   3.6416136e-02   3.8281789e-03   2.7389250e-02   1.5157530e-02   1.2639929e-02   1.7411617e-02   2.3820503e-02   3.6850697e-02   2.5373970e-02   1.0602298e-02   3.7784525e-02   9.4977361e-03   1.0004799e-02   1.1952848e-02   2.3559319e-02   1.3109247e-02   2.3603108e-02   2.4562463e-02   2.6017612e-02   1.7241949e-03   2.0286689e-03   1.1335916e-03   5.6322483e-03   5.1221157e-03   5.0559971e-03   8.5835151e-03   1.0650923e-02   5.5566853e-04   5.1134826e-03   1.3892193e-04   1.2640034e-02   5.6438567e-04   7.4313522e-03   8.3161300e-03   2.5369950e-03   4.7342848e-03   7.3166190e-03   1.2276381e-02   6.3456614e-03   5.8916640e-04   1.5594819e-02   1.5488203e-03   9.3082136e-04   7.5849611e-04   7.0579696e-03   2.4440449e-03   5.1791902e-03   7.3166180e-03   8.5826500e-03   2.1075364e-03   5.4157920e-03   1.3748154e-03   2.4371345e-03   2.2201300e-03   2.6881175e-03   4.1574302e-03   3.5021271e-03   1.4032793e-03   9.1188034e-04   6.1085103e-03   4.1365224e-03   2.7438304e-03   1.0770631e-02   2.1519140e-03   3.9794011e-03   4.6480198e-03   5.1312578e-03   1.6288841e-03   5.4679156e-04   8.7532006e-03   3.0112961e-03   1.7262374e-03   2.9055719e-04   3.3158230e-03   1.8013008e-03   9.2887256e-04   4.2320076e-03   5.4776329e-03   3.2889511e-03   6.5019207e-03   1.1654311e-03   1.2550970e-03   7.9744383e-03   6.4095512e-03   1.6783080e-03   2.2182877e-03   1.9380758e-03   6.5001122e-03   2.8053456e-03   3.3035106e-03   3.3582234e-03   7.0744470e-03   5.6581852e-04   1.8141689e-03   7.7202001e-03   6.7565678e-03   2.7207024e-03   1.9179880e-02   2.7909675e-04   2.2008347e-04   1.1064738e-03   1.0688407e-02   6.6082062e-03   4.4435997e-03   1.9606397e-03   2.4773484e-03   1.1763001e-02   8.2259536e-03   8.3480149e-03   1.5692475e-02   1.7083720e-02   2.8355914e-04   9.4960515e-03   2.0536401e-03   1.8469924e-02   1.0092056e-04   1.2279622e-02   6.4441301e-03   6.4046448e-03   6.0274458e-03   9.8857207e-03   1.9188640e-02   1.2736270e-02   3.3492132e-03   2.4941935e-02   1.8152664e-03   1.9865894e-03   3.3071796e-03   1.3641872e-02   6.4197769e-03   1.0769048e-02   1.0309787e-02   1.1341762e-02   5.1119032e-03   4.6662587e-03   4.6505160e-04   3.2269116e-03   9.0774431e-03   2.5215213e-03   4.0057628e-03   6.1199030e-03   9.7447895e-03   3.5360157e-03   1.8995080e-02   2.6805580e-03   8.6582433e-03   8.1342278e-03   3.7198152e-03   3.9443681e-05   2.6670326e-03   3.4016785e-03   8.3701176e-03   6.1426721e-03   2.9189037e-03   1.0083175e-03   2.2713681e-03   3.9595770e-04   7.2341855e-03   8.8447009e-03   1.1230173e-05   5.1389929e-03   2.4707449e-03   5.4731760e-03   5.1980845e-04   4.3112681e-03   2.1787917e-03   7.2534046e-03   6.7672528e-04   5.6623211e-03   9.1277214e-03   7.3619628e-04   3.7016392e-04   3.2564607e-03   4.9531882e-03   4.5742792e-03   1.6438776e-02   2.5714996e-03   2.1421258e-03   2.3256067e-03   1.0175775e-02   8.4088183e-03   2.7613050e-03   2.4755840e-04   6.0873636e-04   4.6703189e-03   2.2089026e-03   5.5642336e-03   3.7824549e-04   4.1878969e-03   2.0462491e-03   7.3148116e-03   5.4583143e-04   6.1390745e-03   8.7247882e-03   9.1073145e-04   4.9034572e-04   2.9664521e-03   4.5041455e-03   4.3650355e-03   1.5605807e-02   2.7148441e-03   2.1951828e-03   2.2077213e-03   9.5777719e-03   8.0120192e-03   2.4278861e-03   3.2552080e-04   7.3734328e-04   1.7636357e-03   1.2290813e-02   2.3919392e-03   6.5534766e-03   4.2355076e-03   1.3428854e-02   2.7760250e-03   2.0719142e-02   5.3736931e-03   9.3604766e-03   7.8350168e-03   1.9437509e-03   2.3451546e-04   4.9805974e-03   3.4615227e-03   1.0520423e-02   8.1642247e-03   4.6947450e-03   2.2490758e-03   4.7893620e-03   5.2359029e-04   6.8110246e-03   8.2524171e-03   1.3046714e-02   1.1318623e-03   8.6855001e-03   5.4130623e-04   1.5131426e-02   5.6179632e-04   1.5407719e-02   1.0669118e-02   5.8683852e-03   3.5797271e-03   6.2414181e-05   2.6714308e-03   7.7088950e-03   9.8081718e-03   9.2964166e-03   7.7221233e-03   5.7330158e-03   7.6711675e-03   9.7842038e-03   1.6419007e-03   2.8364539e-03   3.5173281e-03   6.5335900e-03   1.1340078e-03   1.4192754e-02   1.5964523e-04   8.8481511e-03   5.2711173e-03   5.4383051e-03   3.8856537e-03   6.9538378e-03   1.4900562e-02   9.8443835e-03   2.2013577e-03   2.1746585e-02   7.5284963e-04   7.7091107e-04   1.8026328e-03   1.1463429e-02   5.3229428e-03   7.8904169e-03   7.2583306e-03   8.1944055e-03   3.9135288e-03   1.7196090e-03   8.1113282e-03   2.2942459e-04   9.3463740e-03   6.8261058e-03   2.3665724e-03   1.6309596e-03   1.7256268e-03   2.3397606e-03   3.5922701e-03   1.1208568e-02   3.9888853e-03   2.9455145e-03   1.9660659e-03   6.5467152e-03   6.1492489e-03   9.3538874e-04   1.2212079e-03   1.9267388e-03   1.0793365e-02   1.2592720e-03   6.0147390e-03   9.1609131e-03   1.8537817e-03   4.5335508e-03   6.6172179e-03   1.0131803e-02   4.6089934e-03   1.7595473e-04   1.2987364e-02   1.8331853e-03   9.7087402e-04   3.3609260e-04   5.4018686e-03   1.7068395e-03   3.6646912e-03   6.4787894e-03   7.7901480e-03   1.6754655e-02   6.9641544e-04   1.3182224e-02   1.4651385e-02   4.9466239e-03   2.3931163e-03   5.9263439e-04   5.4211666e-03   1.0221921e-02   1.4928620e-02   9.4586856e-03   8.3819492e-03   7.3339215e-03   1.2011676e-02   1.3620169e-02   3.6119007e-03   1.8435886e-03   2.0979826e-03   1.0794235e-02   6.9811950e-03   4.9473584e-03   5.5993500e-03   9.1192858e-03   1.7103671e-02   1.0654852e-02   2.2936354e-03   2.1887320e-02   1.6039412e-03   1.5236521e-03   2.3684718e-03   1.1405606e-02   4.9416620e-03   8.9601309e-03   9.4128890e-03   1.0537337e-02   1.0144176e-02   9.3650956e-03   2.8049928e-03   1.4261619e-03   9.6795720e-04   3.1673467e-03   5.6308712e-03   1.2399657e-02   5.4889906e-03   4.4629844e-03   3.5148873e-03   8.2921709e-03   8.5570702e-03   1.5767832e-03   9.7941910e-04   1.5044401e-03   1.9162648e-02   2.3258011e-03   4.3611697e-03   1.7154674e-02   1.9266334e-02   1.1399040e-02   3.8294804e-02   2.8052973e-03   4.2987486e-03   8.1194560e-03   2.5933333e-02   1.8564970e-02   1.4940871e-02   5.2230072e-03   4.8296564e-03   1.1136786e-02   1.2996602e-02   1.1896568e-02   3.3692870e-03   1.0295085e-03   6.7928621e-03   7.3341015e-03   5.3674586e-03   2.6380919e-03   1.7126363e-03   1.9252416e-05   3.9628066e-03   1.2371798e-02   1.4417093e-02   5.5916770e-04   7.0172680e-03   8.6736288e-03   5.5025710e-03   2.2796596e-02   1.2316222e-03   1.4793666e-03   2.9451077e-03   1.4303806e-02   1.0475492e-02   5.7470026e-03   7.8882742e-04   9.0526661e-04   4.3645694e-03   7.8632956e-03   7.2260963e-03   2.1331409e-02   3.2601592e-03   3.2514734e-03   4.2300937e-03   1.4385386e-02   1.2160577e-02   5.0215597e-03   4.3279739e-05   5.1818418e-05   3.0767343e-03   9.0015857e-03   9.8042907e-03   1.0868316e-02   9.1698320e-03   6.9442206e-03   8.2610449e-03   1.0963075e-02   2.1355881e-03   3.5431999e-03   4.2180590e-03   3.2143555e-03   3.3819870e-03   8.8162037e-03   6.5643841e-03   3.2940615e-03   1.2995092e-03   2.9075684e-03   3.1897532e-04   6.9331287e-03   8.4863836e-03   1.0164058e-02   2.9210959e-03   1.7078622e-03   4.0814516e-04   3.6297378e-03   8.7693352e-04   2.6826046e-03   6.9132822e-03   8.3825591e-03   2.1963225e-02   1.8183756e-02   1.2010413e-02   1.7351817e-03   6.4958425e-03   5.7545512e-03   1.9704198e-02   2.2181841e-02   1.8230646e-04   1.5254865e-03   1.2273284e-02   6.9788794e-03   6.3577637e-03   3.5631537e-03   4.1101326e-03   6.5324999e-04   9.4729463e-03   5.0293123e-03   4.5622977e-03   3.3814637e-03   4.1233865e-03   5.1615257e-03   2.3326030e-03   2.1577255e-03   4.0325048e-03   5.1426622e-03   1.5351757e-03   2.6422594e-03   1.3282600e-02   1.5461999e-02   3.4307479e-03   1.1531055e-02   1.3518551e-02   4.2918744e-03   5.5398788e-03   8.4122900e-05
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2a17a2a8fb002493fff38c7ed059668867768a7e
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-correlation-ml.txt
@@ -0,0 +1 @@
+   9.2507465e-01   9.6528566e-01   8.7255441e-01   1.1287379e+00   8.7318727e-01   1.0767102e+00   9.1419676e-01   1.1503304e+00   9.8074509e-01   1.0135025e+00   1.0495025e+00   9.4794536e-01   9.6829273e-01   1.1345767e+00   1.1048008e+00   9.2407796e-01   1.0228634e+00   9.3853195e-01   9.9377619e-01   1.0407662e+00   9.5048989e-01   9.0465688e-01   9.8056930e-01   8.9777156e-01   9.6357127e-01   9.3864452e-01   9.9754613e-01   9.7271356e-01   8.4383151e-01   9.6981983e-01   9.7510267e-01   1.0112663e+00   7.8730400e-01   1.0299498e+00   9.9307979e-01   9.0239520e-01   8.5428231e-01   8.8972742e-01   8.5933162e-01   9.6625934e-01   9.4175449e-01   9.9120729e-01   1.0503963e+00   8.8223053e-01   1.3261434e+00   1.1063209e+00   8.4058398e-01   1.0844267e+00   1.1153093e+00   1.0092643e+00   8.9585237e-01   1.0599818e+00   1.2321707e+00   1.1359624e+00   8.3503556e-01   1.1792243e+00   7.9159781e-01   1.0830419e+00   1.2181870e+00   9.9888500e-01   1.0227144e+00   6.8557277e-01   9.6836193e-01   1.1061227e+00   1.0883453e+00   9.5681974e-01   9.9436299e-01   1.0304323e+00   1.1273949e+00   1.0735563e+00   1.0582583e+00   9.6040272e-01   1.0032137e+00   8.4900547e-01   1.1035351e+00   8.7867480e-01   9.6433176e-01   9.1850122e-01   8.9337435e-01   1.0449390e+00   8.9639384e-01   9.6704971e-01   1.0084258e+00   1.0528587e+00   1.1764481e+00   1.0913280e+00   1.0136672e+00   1.2737156e+00   9.5130359e-01   1.0367909e+00   1.1983402e+00   1.1319901e+00   1.1117462e+00   1.0343695e+00   1.0838628e+00   7.5266057e-01   1.0763316e+00   8.8067924e-01   9.6734383e-01   9.8800551e-01   1.2265742e+00   7.8833055e-01   1.0338670e+00   8.6666625e-01   9.9039950e-01   9.7142684e-01   9.3138616e-01   8.5849977e-01   8.5486301e-01   1.0516028e+00   1.1105313e+00   9.5943505e-01   9.8845171e-01   1.0566288e+00   9.9712198e-01   9.5545756e-01   1.1817974e+00   9.9128482e-01   1.0117892e+00   1.0979115e+00   1.0493943e+00   9.1318848e-01   9.3157311e-01   8.7073304e-01   1.2459441e+00   9.3412689e-01   1.0482297e+00   9.4224032e-01   9.5134153e-01   9.0857493e-01   9.7264161e-01   8.2900820e-01   9.3140549e-01   1.1330242e+00   1.0333002e+00   1.0117861e+00   1.2053255e+00   8.5291396e-01   1.0148928e+00   8.6641379e-01   9.7080819e-01   9.5457159e-01   9.5207457e-01   9.3539674e-01   9.0769069e-01   9.5322590e-01   1.1181803e+00   9.9765614e-01   7.5370610e-01   1.0807114e+00   1.0804601e+00   9.0214124e-01   8.7101998e-01   1.0167435e+00   1.2045936e+00   8.7300539e-01   1.1054300e+00   7.9145574e-01   1.0279340e+00   8.7623462e-01   1.0034756e+00   1.0386933e+00   9.3910970e-01   1.0028455e+00   9.9868824e-01   9.8752945e-01   9.8319327e-01   1.3110209e+00   8.6180633e-01   1.0993856e+00   8.5912563e-01   1.1303979e+00   9.8690459e-01   9.6910090e-01   9.1456819e-01   1.1525339e+00   1.1064552e+00   1.1062255e+00   9.7226683e-01   1.1091447e+00   1.1072238e+00   9.6544444e-01   9.6681036e-01   9.3247685e-01   9.6854634e-01   1.1035119e+00   1.1317148e+00   9.5557793e-01   9.8908485e-01   7.4873648e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8b705b348fc3de5041ad9e3d6a1686af61046b2a
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml-iris.txt
@@ -0,0 +1 @@
+   1.4208365e-03   1.2652718e-05   8.9939315e-04   2.4232332e-04   9.9747033e-04   9.2045721e-04   2.2040648e-04   8.6480051e-04   1.2354911e-03   5.3650090e-06   1.0275886e-03   1.1695784e-03   2.3556571e-04   1.4590172e-03   1.8981327e-03   1.0939621e-03   1.2392314e-04   3.5850877e-04   8.6078038e-04   1.4490833e-03   8.4059347e-04   3.2873982e-03   2.7359832e-03   4.1316044e-03   2.7719149e-03   1.1814143e-03   1.1431285e-04   2.3850299e-04   1.3446247e-03   1.6406549e-03   1.2070654e-03   2.2241257e-03   1.4969348e-03   1.2354911e-03   7.6154552e-04   9.0853884e-04   1.2354911e-03   1.5825612e-04   2.3716586e-04   2.5806020e-04   8.5870759e-03   4.3447170e-04   2.6103416e-03   3.4026094e-03   1.2625429e-03   1.0000714e-03   2.7088099e-04   4.6161202e-05   1.7993015e-04   7.1619641e-02   7.4013940e-02   8.2336355e-02   9.3599031e-02   8.6542298e-02   9.2667602e-02   8.0934616e-02   6.7002415e-02   7.9695318e-02   8.3991107e-02   8.8330128e-02   7.6449243e-02   8.6123390e-02   9.1414445e-02   5.9767596e-02   6.8589764e-02   9.2363748e-02   7.5261304e-02   1.0768528e-01   7.8250149e-02   9.7383870e-02   6.9410330e-02   1.0895936e-01   9.1644587e-02   7.2677910e-02   7.2208930e-02   8.7635618e-02   9.3586395e-02   8.7700193e-02   5.8825053e-02   7.9271072e-02   7.4136423e-02   7.0977606e-02   1.1670751e-01   9.6691498e-02   7.7157266e-02   7.8793137e-02   9.6187418e-02   7.4355610e-02   8.6677009e-02   9.7286808e-02   8.5214421e-02   7.7419803e-02   6.8888638e-02   8.6192502e-02   7.4757686e-02   7.8851331e-02   7.5042247e-02   5.2484298e-02   7.8023694e-02   1.3991867e-01   1.2655756e-01   1.2099780e-01   1.2515784e-01   1.3134370e-01   1.3306336e-01   1.2911903e-01   1.2854613e-01   1.3655327e-01   1.1601604e-01   9.9632498e-02   1.2063863e-01   1.1404742e-01   1.3409335e-01   1.3451976e-01   1.1368563e-01   1.1469397e-01   1.1505768e-01   1.5479411e-01   1.2906390e-01   1.1634186e-01   1.2299625e-01   1.3892070e-01   1.0732534e-01   1.1401190e-01   1.1254699e-01   1.0266168e-01   1.0210743e-01   1.3111378e-01   1.0950615e-01   1.2501276e-01   1.0108759e-01   1.3297245e-01   1.0624129e-01   1.3360037e-01   1.2002867e-01   1.2233784e-01   1.1387071e-01   1.0061412e-01   1.0649150e-01   1.2174429e-01   1.0147290e-01   1.2655756e-01   1.2438709e-01   1.2138109e-01   1.1044406e-01   1.1910000e-01   1.0821359e-01   1.1609070e-01   1.1329724e-01   1.2085473e-03   1.2060695e-03   2.7592041e-03   3.0736184e-03   3.7201033e-03   1.0861043e-03   7.3910902e-04   3.4790667e-04   1.3491546e-03   2.4493052e-03   1.8482587e-04   2.3308566e-03   3.8997403e-03   6.3069928e-03   4.1362617e-03   1.5079538e-03   7.4890015e-04   4.0049414e-03   3.0763412e-04   3.2877725e-03   8.6909088e-03   1.8863199e-03   4.7592122e-03   4.5180751e-04   1.7148301e-03   8.8703626e-04   5.7128783e-04   1.7151033e-03   8.4814176e-04   4.7551630e-04   6.9313334e-03   5.8126778e-03   3.4790667e-04   9.7078221e-04   1.0390338e-03   3.4790667e-04   1.1371495e-03   7.0598263e-04   2.3100870e-03   3.1332241e-03   2.9870115e-03   3.7693564e-03   5.5008337e-03   2.0081767e-04   3.9261497e-03   1.6237803e-03   1.7731168e-03   5.9153033e-04   5.9997244e-02   6.3706418e-02   7.0131342e-02   8.0131815e-02   7.3670020e-02   8.1412444e-02   7.1132932e-02   5.6572408e-02   6.7223691e-02   7.3993918e-02   7.4363256e-02   6.6371013e-02   7.1106157e-02   7.9730716e-02   5.0610503e-02   5.7285563e-02   8.2536028e-02   6.3695818e-02   9.1877918e-02   6.6044079e-02   8.7700525e-02   5.7975072e-02   9.4407127e-02   7.9385033e-02   6.0900938e-02   6.0521931e-02   7.4070557e-02   8.1073873e-02   7.6438218e-02   4.7634460e-02   6.6728846e-02   6.1732271e-02   5.9656897e-02   1.0363139e-01   8.7312695e-02   6.8806126e-02   6.7142432e-02   8.0911573e-02   6.5091322e-02   7.4541034e-02   8.5313436e-02   7.4229332e-02   6.5328348e-02   5.7461491e-02   7.4891760e-02   6.5136264e-02   6.8598864e-02   6.3641018e-02   4.2790811e-02   6.7276779e-02   1.2872765e-01   1.1385917e-01   1.0708423e-01   1.1221780e-01   1.1844388e-01   1.1798239e-01   1.1767648e-01   1.1356773e-01   1.2073038e-01   1.0467824e-01   8.8441784e-02   1.0671832e-01   1.0091826e-01   1.2051300e-01   1.2244533e-01   1.0247664e-01   1.0203920e-01   1.0334656e-01   1.3764340e-01   1.1314999e-01   1.0390175e-01   1.1148602e-01   1.2274267e-01   9.3929112e-02   1.0239198e-01   9.9372667e-02   9.0109024e-02   9.0770318e-02   1.1749345e-01   9.5509620e-02   1.0956056e-01   8.9331297e-02   1.1936188e-01   9.3207628e-02   1.1935153e-01   1.0516553e-01   1.1204585e-01   1.0191688e-01   8.9582588e-02   9.3806716e-02   1.0922100e-01   8.9087100e-02   1.1385917e-01   1.1193127e-01   1.0978099e-01   9.7766696e-02   1.0448839e-01   9.5849546e-02   1.0619992e-01   1.0212555e-01   7.8301662e-04   3.3186074e-04   9.6097551e-04   9.6384587e-04   1.7160230e-04   7.1714495e-04   1.0915291e-03   1.4406904e-05   9.9431295e-04   1.0280837e-03   3.4520010e-04   1.6070142e-03   2.0814960e-03   1.1810349e-03   9.3270090e-05   2.4892291e-04   9.5000112e-04   1.2447556e-03   8.3736374e-04   3.6303226e-03   2.4141846e-03   3.9965261e-03   2.4688022e-03   1.0115165e-03   6.9871786e-05   1.7487334e-04   1.2251185e-03   1.4398826e-03   9.8199498e-04   2.5137187e-03   1.7466742e-03   1.0915291e-03   7.0690363e-04   8.5846505e-04   1.0915291e-03   1.0992291e-04   1.6427013e-04   2.8562896e-04   8.0123750e-03   5.0490687e-04   2.4076078e-03   3.3222239e-03   1.0270492e-03   1.0987887e-03   2.4862356e-04   7.8815959e-05   1.1120052e-04   7.0071463e-02   7.2494258e-02   8.0694698e-02   9.1816479e-02   8.4823937e-02   9.1055284e-02   7.9406161e-02   6.5540015e-02   7.8075821e-02   8.2418924e-02   8.6586217e-02   7.4908999e-02   8.4375857e-02   8.9771433e-02   5.8365951e-02   6.7055640e-02   9.0792516e-02   7.3755504e-02   1.0570869e-01   7.6652799e-02   9.5758989e-02   6.7858347e-02   1.0707149e-01   9.0015148e-02   7.1111432e-02   7.0634591e-02   8.5909852e-02   9.1841705e-02   8.6060650e-02   5.7382885e-02   7.7642663e-02   7.2560884e-02   6.9439824e-02   1.1486601e-01   9.5132094e-02   7.5722276e-02   7.7186494e-02   9.4329550e-02   7.2913445e-02   8.4999890e-02   9.5631654e-02   8.3632299e-02   7.5814411e-02   6.7360493e-02   8.4581854e-02   7.3324210e-02   7.7335911e-02   7.3484711e-02   5.1093482e-02   7.6474851e-02   1.3800148e-01   1.2463801e-01   1.1904450e-01   1.2328593e-01   1.2938789e-01   1.3104169e-01   1.2726294e-01   1.2658511e-01   1.3448678e-01   1.1418055e-01   9.7888383e-02   1.1868360e-01   1.1213978e-01   1.3206545e-01   1.3251384e-01   1.1184454e-01   1.1286955e-01   1.1328841e-01   1.5256500e-01   1.2703121e-01   1.1444439e-01   1.2112577e-01   1.3684054e-01   1.0544428e-01   1.1220824e-01   1.1073079e-01   1.0084086e-01   1.0036834e-01   1.2912019e-01   1.0768201e-01   1.2300696e-01   9.9385216e-02   1.3095409e-01   1.0446385e-01   1.3171213e-01   1.1800444e-01   1.2052688e-01   1.1209190e-01   9.8892088e-02   1.0463359e-01   1.1979721e-01   9.9600101e-02   1.2463801e-01   1.2247195e-01   1.1948197e-01   1.0852184e-01   1.1709036e-01   1.0637133e-01   1.1433097e-01   1.1154058e-01   1.2829581e-03   8.6520525e-04   1.3042912e-03   2.3052671e-04   6.0609671e-05   6.1408538e-04   7.9384016e-04   2.5551469e-04   9.4346154e-04   1.8930050e-03   4.6203036e-03   3.8649853e-03   3.3273220e-03   9.7135787e-04   2.5836286e-04   1.6395377e-03   4.6720392e-04   1.3833444e-03   6.8585778e-03   1.1817616e-03   1.4184724e-03   1.2935682e-03   4.4534899e-04   4.3337262e-04   9.9734142e-04   6.2957380e-05   2.1802414e-04   1.3452346e-03   3.6759458e-03   3.7514511e-03   6.1408538e-04   2.3527566e-03   2.5967147e-03   6.1408538e-04   3.1896708e-04   3.0643540e-04   1.7034162e-03   7.0964884e-03   1.0371098e-03   1.9760564e-03   1.6993217e-03   9.2490489e-04   1.2129757e-03   2.8785057e-04   7.8777499e-04   6.4144968e-04   5.7636535e-02   5.9786679e-02   6.7275391e-02   7.7706661e-02   7.1288776e-02   7.6308806e-02   6.5987844e-02   5.3398709e-02   6.4839697e-02   6.8887148e-02   7.2874646e-02   6.2111692e-02   7.1088473e-02   7.5274214e-02   4.7295630e-02   5.5048251e-02   7.6266639e-02   6.0532100e-02   9.0997542e-02   6.3501941e-02   8.1155480e-02   5.5841790e-02   9.1620605e-02   7.5304976e-02   5.8627379e-02   5.8302297e-02   7.2188128e-02   7.7632065e-02   7.2128571e-02   4.6353347e-02   6.4522763e-02   5.9860052e-02   5.7075256e-02   9.8501473e-02   8.0208982e-02   6.2676929e-02   6.4117314e-02   8.0306154e-02   5.9903400e-02   7.1264506e-02   8.0454669e-02   6.9667510e-02   6.2855874e-02   5.5234852e-02   7.0611788e-02   6.0083969e-02   6.3933681e-02   6.0638614e-02   4.1119113e-02   6.3291748e-02   1.2072945e-01   1.0797760e-01   1.0284307e-01   1.0630032e-01   1.1246316e-01   1.1377579e-01   1.1035397e-01   1.0939330e-01   1.1704519e-01   9.8543065e-02   8.3389076e-02   1.0253622e-01   9.6610654e-02   1.1523295e-01   1.1624035e-01   9.6621030e-02   9.6718555e-02   9.7003685e-02   1.3426257e-01   1.1013293e-01   9.8838972e-02   1.0496266e-01   1.1920082e-01   9.0400878e-02   9.6352086e-02   9.4617133e-02   8.6118226e-02   8.5443225e-02   1.1226469e-01   9.1815383e-02   1.0642172e-01   8.4132371e-02   1.1413570e-01   8.8823115e-02   1.1373227e-01   1.0228600e-01   1.0454965e-01   9.5917796e-02   8.4129252e-02   8.9732713e-02   1.0404039e-01   8.5714179e-02   1.0797760e-01   1.0611357e-01   1.0375975e-01   9.3828435e-02   1.0141953e-01   9.1231247e-02   9.8764813e-02   9.5558448e-02   7.0033377e-04   3.9650610e-04   5.3529876e-04   1.4703029e-03   2.2471049e-03   2.6137215e-04   9.1585095e-04   2.3098853e-03   3.2779352e-04   1.7003275e-03   9.5035099e-04   8.4163249e-04   3.6423601e-04   8.6760304e-04   2.6110376e-04   2.4965606e-03   5.0990123e-04   2.2208392e-03   3.4995017e-03   3.9813106e-03   4.2652650e-03   1.4776191e-03   5.3856223e-04   9.6152184e-04   1.6178695e-03   2.4296336e-03   2.2824176e-03   1.0483334e-03   6.6735604e-04   2.2471049e-03   1.7166964e-03   1.9224889e-03   2.2471049e-03   4.4953685e-04   7.5090712e-04   3.1050470e-04   1.1530910e-02   8.0837373e-05   2.6173161e-03   2.7612054e-03   2.3974656e-03   3.9140870e-04   3.5730731e-04   1.1232648e-04   8.0278741e-04   7.4728046e-02   7.6441141e-02   8.5477412e-02   9.7141382e-02   8.9947057e-02   9.5081677e-02   8.2962705e-02   6.9633999e-02   8.3013931e-02   8.6069979e-02   9.2215558e-02   7.8736928e-02   9.0603515e-02   9.4074986e-02   6.2034704e-02   7.1640320e-02   9.4150759e-02   7.8195110e-02   1.1214391e-01   8.1468219e-02   9.9059263e-02   7.2514318e-02   1.1269547e-01   9.4545020e-02   7.5842542e-02   7.5358360e-02   9.1332869e-02   9.6662705e-02   9.0277244e-02   6.2066860e-02   8.2644288e-02   7.7554694e-02   7.3959493e-02   1.1955630e-01   9.8181734e-02   7.8602674e-02   8.1755435e-02   1.0058819e-01   7.6248524e-02   8.9701900e-02   9.9938282e-02   8.7676596e-02   8.0619290e-02   7.1976555e-02   8.8793557e-02   7.6779152e-02   8.1107438e-02   7.7952944e-02   5.5245517e-02   8.0550459e-02   1.4162183e-01   1.2912349e-01   1.2423521e-01   1.2779447e-01   1.3393410e-01   1.3660889e-01   1.3105158e-01   1.3208577e-01   1.4040000e-01   1.1817736e-01   1.0200650e-01   1.2388995e-01   1.1706801e-01   1.3699958e-01   1.3682207e-01   1.1586916e-01   1.1739162e-01   1.1729454e-01   1.5902469e-01   1.3308573e-01   1.1901641e-01   1.2511327e-01   1.4289089e-01   1.1059070e-01   1.1627926e-01   1.1550831e-01   1.0561378e-01   1.0446495e-01   1.3405102e-01   1.1291439e-01   1.2888996e-01   1.0359625e-01   1.3590097e-01   1.0925250e-01   1.3665207e-01   1.2379539e-01   1.2392962e-01   1.1624448e-01   1.0286550e-01   1.0945264e-01   1.2440339e-01   1.0449561e-01   1.2912349e-01   1.2690130e-01   1.2362142e-01   1.1341467e-01   1.2276171e-01   1.1097585e-01   1.1759891e-01   1.1534218e-01   1.3143808e-04   7.3710840e-04   1.1313742e-03   2.6277162e-03   9.9332749e-04   4.8298989e-04   2.9659782e-03   1.8303797e-03   3.9657692e-03   1.4753738e-03   1.6266891e-03   7.0233916e-04   8.0313831e-04   3.4526160e-04   2.3291483e-03   1.3867759e-04   4.2228272e-03   1.6991343e-03   2.3223655e-03   3.8453210e-03   4.2904903e-04   9.9302567e-04   1.7706867e-03   9.4981017e-04   1.8259864e-03   2.0820613e-03   2.1473879e-03   2.0420431e-03   2.6277162e-03   3.0779094e-03   3.4332541e-03   2.6277162e-03   6.3280964e-04   1.0576914e-03   9.5198627e-04   1.0925795e-02   3.7286463e-04   7.9546610e-04   9.1841431e-04   2.1468126e-03   4.9129575e-04   4.3562197e-04   7.5083238e-04   1.3686608e-03   6.3901299e-02   6.4740623e-02   7.3708779e-02   8.4613714e-02   7.7866771e-02   8.2261058e-02   7.0449151e-02   5.8874682e-02   7.1767088e-02   7.3210535e-02   8.0660949e-02   6.6601983e-02   8.0033785e-02   8.1391959e-02   5.1369939e-02   6.0897790e-02   8.0716992e-02   6.7403323e-02   9.9203670e-02   7.0276809e-02   8.4922276e-02   6.1688045e-02   9.9339240e-02   8.2362360e-02   6.4928234e-02   6.4360101e-02   7.9641814e-02   8.3721620e-02   7.7549963e-02   5.2617898e-02   7.1414187e-02   6.6946935e-02   6.3031902e-02   1.0509118e-01   8.4332170e-02   6.6064468e-02   7.0064616e-02   8.8758294e-02   6.4379548e-02   7.7371173e-02   8.7052850e-02   7.5305342e-02   6.9340944e-02   6.1339869e-02   7.6377320e-02   6.5179636e-02   6.9093895e-02   6.6669498e-02   4.5609365e-02   6.8684945e-02   1.2445912e-01   1.1341836e-01   1.0935772e-01   1.1262566e-01   1.1789507e-01   1.2147174e-01   1.1488682e-01   1.1752559e-01   1.2531063e-01   1.0271865e-01   8.7888567e-02   1.0902443e-01   1.0234160e-01   1.2080033e-01   1.1990073e-01   1.0043696e-01   1.0286413e-01   1.0252340e-01   1.4292168e-01   1.1866325e-01   1.0381139e-01   1.0919240e-01   1.2785249e-01   9.6570465e-02   1.0127523e-01   1.0149554e-01   9.1688518e-02   9.0323099e-02   1.1822766e-01   9.9584713e-02   1.1452014e-01   9.0018133e-02   1.1983081e-01   9.5741335e-02   1.2190290e-01   1.0915996e-01   1.0773474e-01   1.0161859e-01   8.8729453e-02   9.5169428e-02   1.0868349e-01   9.0278091e-02   1.1341836e-01   1.1118524e-01   1.0767597e-01   9.8555096e-02   1.0809822e-01   9.6490550e-02   1.0179914e-01   1.0040847e-01   9.0953179e-04   1.6478123e-03   3.1324421e-03   9.3747882e-04   6.8074049e-04   3.4285457e-03   1.4256139e-03   3.3141786e-03   8.1135619e-04   1.2040955e-03   7.3894006e-04   1.1469835e-03   5.4914496e-05   3.0238895e-03   1.1512346e-04   2.9874978e-03   2.7356591e-03   2.9755481e-03   4.8570629e-03   9.8132331e-04   1.1267736e-03   1.9187302e-03   1.4320892e-03   2.5472569e-03   2.7129147e-03   1.2621760e-03   1.1868918e-03   3.1324421e-03   3.1260816e-03   3.4622842e-03   3.1324421e-03   7.8737454e-04   1.2923124e-03   7.7291736e-04   1.2676988e-02   1.5795155e-04   1.4073300e-03   1.3093851e-03   2.8558230e-03   2.3589004e-04   5.3160641e-04   6.3306680e-04   1.5563919e-03   6.9394652e-02   7.0160248e-02   7.9549278e-02   9.0909253e-02   8.3929778e-02   8.8133516e-02   7.5949213e-02   6.4094635e-02   7.7538115e-02   7.8838295e-02   8.6828513e-02   7.2078729e-02   8.6190925e-02   8.7328483e-02   5.6305232e-02   6.6307663e-02   8.6433769e-02   7.2861306e-02   1.0610432e-01   7.5977192e-02   9.0782134e-02   6.7147548e-02   1.0605640e-01   8.8295560e-02   7.0476640e-02   6.9912539e-02   8.5755505e-02   8.9909894e-02   8.3415192e-02   5.7694397e-02   7.7198547e-02   7.2551886e-02   6.8485682e-02   1.1174631e-01   9.0047290e-02   7.1258462e-02   7.5770197e-02   9.5276007e-02   6.9606963e-02   8.3332111e-02   9.3091350e-02   8.1019819e-02   7.5041473e-02   6.6748030e-02   8.2172293e-02   7.0413691e-02   7.4567733e-02   7.2221920e-02   5.0422561e-02   7.4234075e-02   1.3135838e-01   1.2029572e-01   1.1630277e-01   1.1941581e-01   1.2489530e-01   1.2871814e-01   1.2159882e-01   1.2460620e-01   1.3270425e-01   1.0925415e-01   9.4076611e-02   1.1596894e-01   1.0908894e-01   1.2799150e-01   1.2695158e-01   1.0694484e-01   1.0944639e-01   1.0895711e-01   1.5084375e-01   1.2591962e-01   1.1052596e-01   1.1587184e-01   1.3530738e-01   1.0320818e-01   1.0775506e-01   1.0806337e-01   9.8123191e-02   9.6541726e-02   1.2533326e-01   1.0616585e-01   1.2166800e-01   9.6181548e-02   1.2699662e-01   1.0216112e-01   1.2885603e-01   1.1626103e-01   1.1421827e-01   1.0807124e-01   9.4882428e-02   1.0171954e-01   1.1554226e-01   9.6763759e-02   1.2029572e-01   1.1801757e-01   1.1438908e-01   1.0525128e-01   1.1515210e-01   1.0301668e-01   1.0810316e-01   1.0676998e-01   2.4407151e-04   6.8243680e-04   1.6882982e-04   4.2217018e-04   8.1245396e-04   8.1915702e-04   2.7980568e-03   2.6783721e-03   2.0076713e-03   3.3526400e-04   9.3506008e-05   1.0407900e-03   7.3148476e-04   9.1895790e-04   4.8425923e-03   1.7878106e-03   2.5638304e-03   1.8092053e-03   6.2482332e-04   4.5470127e-05   3.8680919e-04   4.8577398e-04   7.0932539e-04   1.0773286e-03   2.7081281e-03   2.3916675e-03   6.8243680e-04   1.3234869e-03   1.5152295e-03   6.8243680e-04   1.7279927e-05   4.4719936e-05   7.6774714e-04   7.6386402e-03   5.1509749e-04   2.1386706e-03   2.3673979e-03   8.8641907e-04   8.8317423e-04   5.7646989e-05   1.8767975e-04   1.8238427e-04   6.4591491e-02   6.6891146e-02   7.4787553e-02   8.5653640e-02   7.8909235e-02   8.4481757e-02   7.3468926e-02   6.0165176e-02   7.2232139e-02   7.6459237e-02   8.0572670e-02   6.9287036e-02   7.8547451e-02   8.3338681e-02   5.3514192e-02   6.1787978e-02   8.4336540e-02   6.7840538e-02   9.9351761e-02   7.0839680e-02   8.9318727e-02   6.2598635e-02   1.0029777e-01   8.3444651e-02   6.5618944e-02   6.5228710e-02   7.9886645e-02   8.5622882e-02   7.9922508e-02   5.2526388e-02   7.1863670e-02   6.6948234e-02   6.3994975e-02   1.0763490e-01   8.8479248e-02   6.9931400e-02   7.1440370e-02   8.8224815e-02   6.7118281e-02   7.8968665e-02   8.8858891e-02   7.7432758e-02   7.0109240e-02   6.2023845e-02   7.8396402e-02   6.7393801e-02   7.1380489e-02   6.7813026e-02   4.6767795e-02   7.0645561e-02   1.3044475e-01   1.1734304e-01   1.1197394e-01   1.1577499e-01   1.2198760e-01   1.2346289e-01   1.1982320e-01   1.1899008e-01   1.2683842e-01   1.0736476e-01   9.1564623e-02   1.1164167e-01   1.0538958e-01   1.2475783e-01   1.2551509e-01   1.0524662e-01   1.0574315e-01   1.0607279e-01   1.4459461e-01   1.1962188e-01   1.0766800e-01   1.1407280e-01   1.2909426e-01   9.8905414e-02   1.0524346e-01   1.0359925e-01   9.4433579e-02   9.3820759e-02   1.2176744e-01   1.0065671e-01   1.1574436e-01   9.2625059e-02   1.2364363e-01   9.7538593e-02   1.2367543e-01   1.1121391e-01   1.1355049e-01   1.0493323e-01   9.2419908e-02   9.8167154e-02   1.1298864e-01   9.3668541e-02   1.1734304e-01   1.1533257e-01   1.1267510e-01   1.0222063e-01   1.1031800e-01   9.9779829e-02   1.0752614e-01   1.0448251e-01   3.8330702e-04   7.6710204e-04   5.4934344e-04   6.1141025e-04   1.8880070e-03   4.3782366e-03   4.2558302e-03   3.3445116e-03   9.0730658e-04   1.6460272e-04   1.9935351e-03   2.2277110e-04   1.5935452e-03   7.2001884e-03   1.0201171e-03   1.9163397e-03   8.7300929e-04   4.6754224e-04   3.6671499e-04   7.4258415e-04   2.1567602e-04   1.3361003e-04   9.1168360e-04   4.3156597e-03   4.1158943e-03   3.8330702e-04   1.9019978e-03   2.1146706e-03   3.8330702e-04   3.1982857e-04   2.1854146e-04   1.6719903e-03   5.9155088e-03   1.3110961e-03   2.0595508e-03   2.2774590e-03   5.2912957e-04   1.6598142e-03   4.0619000e-04   8.5702191e-04   4.6128261e-04   5.7335316e-02   5.9791552e-02   6.7034247e-02   7.7315388e-02   7.0912461e-02   7.6541197e-02   6.6231857e-02   5.3290914e-02   6.4524455e-02   6.9096848e-02   7.2330829e-02   6.2164647e-02   7.0266106e-02   7.5359485e-02   4.7211115e-02   5.4717217e-02   7.6724195e-02   6.0437574e-02   9.0217835e-02   6.3227153e-02   8.1624838e-02   5.5479636e-02   9.1272977e-02   7.5343817e-02   5.8299412e-02   5.7952393e-02   7.1727180e-02   7.7451339e-02   7.2165967e-02   4.5880845e-02   6.4164650e-02   5.9464600e-02   5.6817377e-02   9.8638775e-02   8.0838937e-02   6.3146715e-02   6.3916551e-02   7.9536591e-02   6.0201366e-02   7.1084400e-02   8.0631146e-02   6.9793274e-02   6.2554472e-02   5.4911579e-02   7.0667171e-02   6.0374722e-02   6.4102637e-02   6.0460719e-02   4.0707229e-02   6.3307106e-02   1.2135312e-01   1.0820155e-01   1.0273439e-01   1.0658023e-01   1.1268914e-01   1.1365695e-01   1.1088857e-01   1.0931070e-01   1.1680946e-01   9.8829208e-02   8.3503653e-02   1.0241354e-01   9.6518124e-02   1.1527856e-01   1.1644011e-01   9.6835948e-02   9.6892604e-02   9.7403729e-02   1.3389056e-01   1.0978147e-01   9.8889679e-02   1.0531384e-01   1.1893855e-01   9.0170315e-02   9.6654705e-02   9.4696682e-02   8.5999457e-02   8.5628213e-02   1.1232778e-01   9.1692367e-02   1.0609783e-01   8.4336563e-02   1.1417833e-01   8.8845800e-02   1.1399156e-01   1.0186496e-01   1.0510756e-01   9.6245658e-02   8.4341961e-02   8.9608741e-02   1.0408154e-01   8.5412047e-02   1.0820155e-01   1.0631639e-01   1.0398240e-01   9.3623884e-02   1.0104040e-01   9.1224725e-02   9.9332091e-02   9.5993921e-02   1.1067957e-03   1.4791390e-03   7.1256747e-05   2.0377231e-03   4.3755431e-03   5.9630791e-03   4.4970379e-03   1.5921641e-03   6.4984761e-04   3.3935862e-03   1.2039709e-04   3.0970780e-03   8.3950153e-03   2.1890332e-03   3.1326528e-03   5.0256002e-04   1.6389584e-03   6.4717383e-04   7.1019942e-04   8.9864077e-04   3.8255378e-04   1.2286350e-03   5.5229901e-03   5.1766813e-03   0.0000000e+00   1.5860612e-03   1.6773969e-03   0.0000000e+00   8.4337656e-04   4.6746407e-04   2.4549978e-03   4.7529836e-03   2.3235808e-03   4.0683267e-03   4.3260986e-03   6.7336618e-04   2.8454658e-03   1.0918918e-03   1.3756658e-03   5.7784546e-04   5.9573290e-02   6.3070670e-02   6.9597309e-02   7.9911457e-02   7.3480528e-02   7.9923883e-02   7.0144874e-02   5.5923876e-02   6.6635620e-02   7.3192589e-02   7.4096565e-02   6.5836734e-02   7.1022277e-02   7.8555696e-02   5.0423423e-02   5.7089619e-02   8.1093473e-02   6.2483167e-02   9.2251714e-02   6.5399221e-02   8.6573432e-02   5.7873871e-02   9.3861710e-02   7.7914479e-02   6.0545459e-02   6.0328179e-02   7.3725736e-02   8.0652769e-02   7.5662466e-02   4.7500835e-02   6.6267157e-02   6.1219907e-02   5.9246920e-02   1.0235525e-01   8.5584812e-02   6.7627185e-02   6.6676399e-02   8.1028522e-02   6.3874534e-02   7.4037098e-02   8.3735875e-02   7.3091049e-02   6.4875922e-02   5.7134332e-02   7.3898502e-02   6.3669341e-02   6.7483654e-02   6.3032151e-02   4.3195391e-02   6.6465430e-02   1.2757303e-01   1.1294171e-01   1.0654531e-01   1.1074736e-01   1.1756538e-01   1.1705185e-01   1.1633100e-01   1.1230305e-01   1.1988948e-01   1.0404710e-01   8.7981667e-02   1.0622547e-01   1.0061669e-01   1.2008497e-01   1.2242153e-01   1.0217012e-01   1.0084187e-01   1.0181343e-01   1.3714147e-01   1.1243585e-01   1.0356517e-01   1.1071692e-01   1.2181923e-01   9.3742899e-02   1.0137566e-01   9.8085445e-02   8.9840814e-02   8.9979544e-02   1.1682155e-01   9.4340727e-02   1.0893096e-01   8.8036209e-02   1.1887723e-01   9.1995894e-02   1.1718099e-01   1.0529554e-01   1.1115622e-01   1.0048991e-01   8.8823715e-02   9.3647258e-02   1.0909883e-01   8.9729548e-02   1.1294171e-01   1.1121254e-01   1.0947844e-01   9.8164553e-02   1.0458423e-01   9.5468337e-02   1.0529433e-01   1.0077315e-01   9.3075268e-04   1.0661545e-03   2.6597529e-04   1.6036733e-03   2.0280056e-03   1.2436972e-03   1.5688801e-04   3.1850165e-04   8.9411637e-04   1.3235015e-03   8.8731482e-04   3.4816593e-03   2.6719247e-03   3.9091992e-03   2.6159373e-03   1.1443019e-03   7.9601608e-05   2.3028989e-04   1.2135551e-03   1.4956336e-03   1.2137749e-03   2.2449952e-03   1.5932074e-03   1.1067957e-03   8.0827056e-04   9.5525701e-04   1.1067957e-03   1.2520454e-04   1.8684214e-04   3.3283736e-04   8.4659292e-03   4.3428627e-04   2.6431662e-03   3.3043825e-03   1.2192723e-03   9.6672170e-04   2.2673224e-04   4.0165289e-05   1.5556464e-04   7.0885985e-02   7.3312749e-02   8.1555170e-02   9.2789394e-02   8.5768022e-02   9.1811327e-02   8.0210428e-02   6.6299983e-02   7.8898236e-02   8.3277528e-02   8.7497229e-02   7.5768419e-02   8.5268176e-02   9.0575828e-02   5.9182538e-02   6.7899308e-02   9.1577973e-02   7.4436351e-02   1.0683101e-01   7.7459472e-02   9.6638219e-02   6.8724317e-02   1.0805306e-01   9.0746123e-02   7.1944393e-02   7.1498544e-02   8.6811878e-02   9.2796163e-02   8.6929388e-02   5.8156140e-02   7.8485798e-02   7.3355880e-02   7.0259533e-02   1.1577796e-01   9.5890635e-02   7.6480264e-02   7.8047377e-02   9.5335392e-02   7.3634293e-02   8.5899063e-02   9.6384778e-02   8.4415996e-02   7.6657094e-02   6.8177250e-02   8.5395861e-02   7.3990972e-02   7.8093423e-02   7.4294151e-02   5.1950910e-02   7.7279181e-02   1.3907744e-01   1.2568112e-01   1.2011323e-01   1.2420710e-01   1.3046004e-01   1.3207399e-01   1.2824918e-01   1.2752552e-01   1.3553911e-01   1.1524115e-01   9.8893820e-02   1.1975932e-01   1.1323008e-01   1.3322963e-01   1.3377253e-01   1.1295596e-01   1.1379378e-01   1.1416138e-01   1.5374990e-01   1.2806482e-01   1.1555054e-01   1.2219358e-01   1.3787989e-01   1.0651347e-01   1.1318026e-01   1.1161431e-01   1.0188137e-01   1.0132199e-01   1.3022140e-01   1.0855236e-01   1.2404638e-01   1.0022528e-01   1.3210134e-01   1.0532767e-01   1.3250558e-01   1.1917979e-01   1.2157791e-01   1.1297631e-01   9.9847302e-02   1.0571550e-01   1.2097128e-01   1.0080768e-01   1.2568112e-01   1.2354605e-01   1.2062969e-01   1.0973133e-01   1.1825900e-01   1.0742526e-01   1.1535080e-01   1.1244756e-01   1.9470856e-03   1.8498175e-03   4.7714250e-03   2.8358661e-03   3.0255426e-03   1.1308587e-03   6.7035566e-04   9.3284570e-04   1.3935241e-03   9.8369983e-04   5.6854836e-03   1.9144361e-03   1.0961099e-03   2.6770659e-03   6.7637792e-04   7.3922961e-04   1.6168588e-03   1.9795771e-04   8.8027763e-04   2.3819907e-03   2.3199642e-03   2.7913184e-03   1.4791390e-03   3.2257382e-03   3.5250868e-03   1.4791390e-03   4.9791374e-04   7.0216560e-04   1.6800207e-03   1.0022835e-02   5.5855445e-04   1.9786373e-03   9.4684044e-04   1.9956071e-03   4.5593799e-04   2.5049818e-04   7.2992180e-04   1.1563910e-03   6.0779252e-02   6.2273308e-02   7.0462169e-02   8.1326510e-02   7.4767830e-02   7.8734546e-02   6.8077240e-02   5.6059538e-02   6.8181020e-02   7.1050105e-02   7.6799016e-02   6.4482663e-02   7.5580358e-02   7.7962233e-02   4.9642606e-02   5.8153068e-02   7.8105114e-02   6.3436311e-02   9.5564553e-02   6.6739850e-02   8.2930379e-02   5.9008492e-02   9.5418848e-02   7.8187143e-02   6.1832470e-02   6.1508833e-02   7.5927040e-02   8.0793818e-02   7.4771898e-02   4.9618073e-02   6.7927507e-02   6.3289271e-02   6.0099335e-02   1.0140473e-01   8.1745663e-02   6.4187383e-02   6.7135505e-02   8.4768567e-02   6.1827019e-02   7.4354928e-02   8.3103529e-02   7.2159743e-02   6.6094709e-02   5.8361788e-02   7.3251937e-02   6.2103535e-02   6.6220430e-02   6.3584868e-02   4.3971154e-02   6.5863068e-02   1.2260074e-01   1.1066837e-01   1.0619606e-01   1.0899833e-01   1.1518894e-01   1.1739848e-01   1.1240635e-01   1.1296742e-01   1.2096568e-01   1.0086214e-01   8.5896751e-02   1.0590639e-01   9.9771313e-02   1.1830710e-01   1.1878365e-01   9.8989344e-02   9.9484141e-02   9.9300506e-02   1.3860781e-01   1.1421784e-01   1.0167360e-01   1.0723785e-01   1.2323222e-01   9.3791376e-02   9.8729091e-02   9.7617417e-02   8.9196630e-02   8.7906597e-02   1.1533851e-01   9.5241683e-02   1.1037299e-01   8.6684313e-02   1.1722334e-01   9.1866320e-02   1.1676032e-01   1.0620321e-01   1.0631345e-01   9.8352717e-02   8.6492752e-02   9.2837846e-02   1.0689111e-01   8.8947496e-02   1.1066837e-01   1.0877202e-01   1.0619549e-01   9.7005210e-02   1.0523294e-01   9.4129616e-02   1.0043708e-01   9.7689504e-02   1.8508011e-03   3.7513322e-03   6.0039368e-03   4.2304138e-03   1.5191600e-03   7.2789043e-04   3.6236504e-03   2.5132214e-04   3.2740913e-03   8.1034702e-03   2.4941139e-03   4.0964229e-03   6.0206143e-04   1.9190323e-03   6.6472571e-04   5.1664338e-04   1.3616103e-03   7.0613265e-04   1.0312088e-03   5.8211090e-03   5.1401914e-03   7.1256747e-05   1.1045080e-03   1.1556192e-03   7.1256747e-05   9.3818356e-04   5.1597856e-04   2.2957469e-03   4.3308939e-03   2.5276111e-03   4.3800580e-03   5.1684770e-03   5.8668191e-04   3.2395561e-03   1.2942225e-03   1.4104695e-03   4.9075437e-04   6.2060492e-02   6.5820549e-02   7.2324527e-02   8.2688153e-02   7.6151035e-02   8.3216525e-02   7.3194172e-02   5.8477367e-02   6.9270609e-02   7.6249005e-02   7.6681852e-02   6.8643243e-02   7.3331578e-02   8.1706941e-02   5.2792718e-02   5.9477668e-02   8.4501232e-02   6.5244243e-02   9.4903309e-02   6.8042766e-02   9.0018791e-02   6.0245936e-02   9.6930604e-02   8.1064051e-02   6.3026851e-02   6.2769846e-02   7.6368221e-02   8.3589775e-02   7.8680956e-02   4.9590571e-02   6.8853459e-02   6.3691512e-02   6.1750809e-02   1.0592213e-01   8.9183264e-02   7.0750492e-02   6.9363027e-02   8.3535040e-02   6.6868103e-02   7.6873580e-02   8.7073732e-02   7.6162997e-02   6.7469442e-02   5.9546534e-02   7.6928171e-02   6.6694450e-02   7.0471384e-02   6.5682900e-02   4.5133798e-02   6.9312951e-02   1.3167296e-01   1.1664541e-01   1.0993682e-01   1.1453374e-01   1.2132631e-01   1.2063781e-01   1.2028602e-01   1.1588513e-01   1.2343288e-01   1.0759677e-01   9.1184353e-02   1.0959799e-01   1.0389171e-01   1.2371908e-01   1.2606621e-01   1.0559841e-01   1.0439417e-01   1.0553794e-01   1.4077951e-01   1.1579171e-01   1.0695513e-01   1.1441431e-01   1.2538100e-01   9.6825962e-02   1.0496558e-01   1.0155971e-01   9.2933277e-02   9.3305204e-02   1.2046243e-01   9.7626604e-02   1.1224568e-01   9.1421248e-02   1.2250398e-01   9.5336276e-02   1.2112681e-01   1.0839632e-01   1.1495562e-01   1.0414545e-01   9.2136906e-02   9.6777242e-02   1.1252211e-01   9.2559606e-02   1.1664541e-01   1.1484781e-01   1.1301462e-01   1.0121871e-01   1.0770332e-01   9.8720694e-02   1.0901533e-01   1.0446815e-01   7.8277898e-04   1.7490530e-03   1.0345024e-03   5.6185312e-04   1.1591486e-03   1.1405764e-03   2.5549089e-03   1.4484284e-03   2.2580494e-03   4.5713265e-03   5.6870335e-03   4.1902203e-03   2.4320876e-03   6.0369458e-04   6.2286369e-04   2.4521502e-03   2.9038905e-03   2.2436415e-03   1.7675525e-03   9.5896000e-04   2.0377231e-03   8.9090360e-04   9.7827632e-04   2.0377231e-03   7.4516940e-04   8.4824201e-04   4.3724648e-04   1.0582513e-02   7.1366344e-04   4.1221085e-03   4.7945036e-03   2.3833891e-03   1.3170043e-03   8.5049004e-04   2.9093352e-04   6.7142903e-04   7.9558936e-02   8.2158081e-02   9.0820201e-02   1.0264403e-01   9.5277746e-02   1.0150997e-01   8.9387659e-02   7.4718776e-02   8.7974881e-02   9.2637642e-02   9.6993873e-02   8.4761019e-02   9.4485044e-02   1.0025701e-01   6.7224195e-02   7.6433848e-02   1.0126400e-01   8.3185627e-02   1.1729605e-01   8.6461029e-02   1.0658954e-01   7.7314215e-02   1.1857784e-01   1.0034666e-01   8.0683042e-02   8.0237049e-02   9.6300382e-02   1.0267579e-01   9.6489769e-02   6.6032956e-02   8.7552344e-02   8.2099586e-02   7.8915667e-02   1.2662250e-01   1.0571935e-01   8.5387558e-02   8.7148938e-02   1.0518820e-01   8.2417845e-02   9.5416475e-02   1.0627769e-01   9.3794810e-02   8.5650752e-02   7.6704239e-02   9.4843643e-02   8.2753514e-02   8.7142105e-02   8.3165683e-02   5.9528971e-02   8.6320416e-02   1.5080041e-01   1.3699340e-01   1.3123407e-01   1.3538631e-01   1.4196949e-01   1.4361623e-01   1.3957348e-01   1.3881335e-01   1.4720194e-01   1.2611020e-01   1.0906565e-01   1.3086970e-01   1.2408176e-01   1.4489915e-01   1.4541581e-01   1.2374159e-01   1.2456922e-01   1.2489938e-01   1.6613145e-01   1.3940980e-01   1.2649129e-01   1.3333884e-01   1.4960338e-01   1.1706680e-01   1.2394226e-01   1.2226369e-01   1.1222236e-01   1.1158045e-01   1.4175176e-01   1.1903032e-01   1.3525827e-01   1.1036833e-01   1.4372294e-01   1.1569638e-01   1.4384978e-01   1.3029466e-01   1.3261278e-01   1.2368173e-01   1.1003418e-01   1.1624174e-01   1.3214763e-01   1.1113124e-01   1.3699340e-01   1.3478604e-01   1.3174332e-01   1.2045775e-01   1.2933910e-01   1.1801062e-01   1.2611372e-01   1.2312584e-01   2.4038804e-03   9.9356679e-04   1.6379146e-03   2.9968879e-03   2.7777132e-03   5.0292552e-03   2.9485139e-03   1.7810659e-03   7.1187929e-03   1.0385224e-02   6.8192179e-03   4.7007047e-03   2.2536066e-03   1.6978265e-03   5.5995030e-03   5.8830752e-03   3.3086218e-03   3.5101479e-03   1.6089784e-03   4.3755431e-03   1.0574938e-03   1.0592785e-03   4.3755431e-03   2.5472554e-03   2.6641717e-03   1.0704333e-03   1.2070572e-02   2.4953874e-03   6.0785955e-03   8.5181088e-03   3.9627930e-03   3.6619699e-03   2.9233174e-03   1.7757672e-03   2.0595965e-03   9.0904959e-02   9.3846404e-02   1.0296173e-01   1.1510418e-01   1.0729700e-01   1.1521099e-01   1.0181822e-01   8.5988795e-02   1.0000742e-01   1.0504161e-01   1.0917671e-01   9.6459196e-02   1.0622808e-01   1.1358449e-01   7.7434068e-02   8.7329703e-02   1.1478646e-01   9.5582611e-02   1.2982843e-01   9.8465917e-02   1.1998512e-01   8.8160180e-02   1.3221652e-01   1.1399918e-01   9.2024225e-02   9.1371105e-02   1.0854159e-01   1.1533865e-01   1.0916600e-01   7.6158175e-02   9.9423258e-02   9.3687045e-02   9.0204262e-02   1.4138542e-01   1.1970815e-01   9.7663366e-02   9.8994798e-02   1.1736337e-01   9.4681982e-02   1.0777767e-01   1.2034441e-01   1.0671033e-01   9.7400706e-02   8.7763928e-02   1.0767516e-01   9.5332473e-02   9.9630913e-02   9.4930517e-02   6.8563663e-02   9.8462875e-02   1.6617515e-01   1.5176730e-01   1.4543395e-01   1.5072522e-01   1.5691405e-01   1.5882414e-01   1.5479314e-01   1.5416358e-01   1.6247914e-01   1.3996762e-01   1.2197918e-01   1.4500225e-01   1.3765005e-01   1.5950314e-01   1.5937612e-01   1.3710080e-01   1.3913130e-01   1.3976637e-01   1.8183098e-01   1.5420823e-01   1.4014252e-01   1.4766552e-01   1.6507182e-01   1.3020370e-01   1.3818766e-01   1.3684571e-01   1.2517707e-01   1.2500429e-01   1.5651711e-01   1.3335007e-01   1.4978001e-01   1.2432862e-01   1.5834992e-01   1.2988375e-01   1.6032290e-01   1.4373178e-01   1.4688056e-01   1.3840222e-01   1.2332107e-01   1.2926358e-01   1.4578293e-01   1.2292671e-01   1.5176730e-01   1.4922075e-01   1.4546636e-01   1.3299550e-01   1.4276363e-01   1.3134387e-01   1.4008961e-01   1.3766630e-01   5.7728358e-04   1.6620505e-03   3.0662753e-03   5.1693417e-04   6.0968463e-03   8.4744633e-04   8.7364721e-04   5.8106642e-03   6.7399476e-03   8.6083103e-03   3.1702748e-03   2.7104978e-03   3.3164143e-03   4.2509190e-03   5.8084215e-03   4.6709776e-03   9.8526568e-04   3.6786909e-04   5.9630791e-03   3.9566796e-03   4.2657824e-03   5.9630791e-03   2.3876668e-03   3.1383576e-03   1.0693622e-03   1.7187016e-02   9.8571152e-04   3.1367899e-03   3.7448988e-03   5.3108404e-03   1.2637202e-03   2.1359423e-03   1.6418787e-03   3.1352541e-03   8.3834616e-02   8.4243676e-02   9.4832859e-02   1.0703873e-01   9.9466934e-02   1.0403376e-01   9.0316788e-02   7.7914871e-02   9.2850027e-02   9.3299365e-02   1.0296391e-01   8.6082003e-02   1.0248600e-01   1.0318273e-01   6.8824902e-02   8.0299100e-02   1.0157055e-01   8.7955506e-02   1.2341155e-01   9.1142100e-02   1.0580332e-01   8.1173197e-02   1.2350931e-01   1.0460831e-01   8.4991511e-02   8.4254332e-02   1.0174542e-01   1.0573929e-01   9.8648070e-02   7.1061471e-02   9.2438015e-02   8.7508516e-02   8.2750270e-02   1.2928539e-01   1.0529438e-01   8.4835976e-02   9.0594121e-02   1.1204138e-01   8.3577196e-02   9.8754999e-02   1.0957368e-01   9.6258171e-02   8.9990776e-02   8.0898906e-02   9.7508458e-02   8.4744426e-02   8.9161769e-02   8.6853262e-02   6.2377571e-02   8.8830405e-02   1.4853162e-01   1.3772455e-01   1.3389458e-01   1.3729951e-01   1.4254710e-01   1.4753124e-01   1.3874272e-01   1.4343376e-01   1.5191156e-01   1.2542851e-01   1.0950060e-01   1.3351960e-01   1.2589032e-01   1.4575308e-01   1.4361388e-01   1.2273259e-01   1.2665814e-01   1.2593062e-01   1.7100462e-01   1.4482556e-01   1.2707776e-01   1.3245591e-01   1.5480441e-01   1.1982038e-01   1.2429326e-01   1.2550864e-01   1.1421155e-01   1.1236837e-01   1.4320023e-01   1.2379599e-01   1.4017288e-01   1.1252737e-01   1.4478118e-01   1.1925773e-01   1.4807486e-01   1.3379535e-01   1.3019772e-01   1.2505772e-01   1.1047444e-01   1.1793234e-01   1.3214851e-01   1.1203286e-01   1.3772455e-01   1.3511133e-01   1.3062456e-01   1.2117415e-01   1.3256036e-01   1.1928977e-01   1.2368263e-01   1.2328316e-01   7.8697050e-04   2.0732289e-03   9.4315564e-04   4.6001401e-03   8.4240364e-04   1.3015708e-03   4.6297460e-03   7.5292997e-03   6.5572401e-03   2.5566943e-03   1.7941741e-03   1.8226799e-03   3.9920133e-03   4.8070278e-03   2.6490734e-03   2.2737423e-03   8.3198965e-04   4.4970379e-03   1.8707122e-03   2.0801746e-03   4.4970379e-03   1.6864362e-03   2.1518496e-03   3.0908897e-04   1.2802000e-02   1.1444166e-03   2.7605116e-03   4.8428825e-03   3.3840997e-03   1.9469936e-03   1.7958172e-03   1.1565833e-03   1.8697862e-03   8.2127567e-02   8.3518119e-02   9.3314949e-02   1.0506408e-01   9.7541782e-02   1.0397584e-01   9.0341739e-02   7.6817337e-02   9.1083710e-02   9.3231274e-02   1.0048418e-01   8.5524503e-02   9.9112893e-02   1.0267345e-01   6.7846626e-02   7.8515797e-02   1.0225403e-01   8.6849217e-02   1.2022955e-01   8.9502113e-02   1.0655817e-01   7.9297559e-02   1.2165144e-01   1.0391861e-01   8.3203942e-02   8.2410584e-02   9.9528824e-02   1.0443382e-01   9.8019721e-02   6.8818975e-02   9.0543610e-02   8.5485551e-02   8.1186134e-02   1.2894588e-01   1.0651601e-01   8.5580315e-02   8.9213768e-02   1.0886353e-01   8.3754339e-02   9.7441118e-02   1.0932583e-01   9.5882843e-02   8.8282134e-02   7.9128322e-02   9.6917266e-02   8.4873719e-02   8.8927957e-02   8.5532654e-02   6.0384203e-02   8.8123284e-02   1.4980593e-01   1.3770759e-01   1.3282368e-01   1.3741111e-01   1.4254251e-01   1.4639384e-01   1.3970199e-01   1.4238069e-01   1.5040197e-01   1.2563911e-01   1.0916002e-01   1.3240724e-01   1.2489275e-01   1.4520334e-01   1.4360899e-01   1.2274102e-01   1.2644577e-01   1.2642535e-01   1.6908994e-01   1.4294672e-01   1.2654652e-01   1.3286867e-01   1.5320101e-01   1.1837980e-01   1.2451917e-01   1.2497748e-01   1.1312705e-01   1.1222677e-01   1.4268257e-01   1.2261254e-01   1.3839073e-01   1.1239899e-01   1.4421566e-01   1.1854547e-01   1.4805458e-01   1.3176737e-01   1.3127552e-01   1.2532607e-01   1.1042618e-01   1.1684289e-01   1.3160924e-01   1.1043724e-01   1.3770759e-01   1.3504379e-01   1.3066174e-01   1.1987723e-01   1.3066578e-01   1.1856367e-01   1.2478710e-01   1.2391087e-01   3.0983409e-04   7.5828890e-04   1.5917755e-03   4.8958816e-04   3.3744944e-03   2.1101097e-03   4.2400870e-03   2.8698866e-03   7.9583168e-04   2.4610899e-04   3.6436132e-04   1.4311801e-03   1.7294514e-03   8.6738167e-04   2.6111809e-03   1.6704106e-03   1.5921641e-03   8.6161593e-04   1.0547029e-03   1.5921641e-03   2.0427868e-04   3.5845705e-04   1.2194863e-04   8.2981219e-03   4.9180195e-04   1.7380522e-03   3.0734607e-03   1.0728608e-03   1.1397310e-03   3.4603128e-04   1.9200118e-04   2.8845040e-04   6.9779438e-02   7.1836392e-02   8.0319868e-02   9.1354890e-02   8.4353236e-02   9.0635736e-02   7.8599311e-02   6.5140986e-02   7.7899100e-02   8.1486701e-02   8.6472565e-02   7.4062042e-02   8.4619349e-02   8.9336326e-02   5.7575298e-02   6.6635212e-02   8.9946961e-02   7.3779929e-02   1.0532587e-01   7.6464940e-02   9.4587006e-02   6.7402630e-02   1.0673169e-01   8.9925800e-02   7.0797999e-02   7.0219100e-02   8.5721997e-02   9.1187854e-02   8.5377890e-02   5.7235173e-02   7.7431768e-02   7.2498793e-02   6.9063158e-02   1.1428266e-01   9.4218471e-02   7.4725647e-02   7.6703845e-02   9.4228329e-02   7.2261001e-02   8.4462132e-02   9.5360997e-02   8.3133678e-02   7.5506963e-02   6.7041127e-02   8.4070372e-02   7.2903149e-02   7.6784460e-02   7.3115143e-02   5.0413571e-02   7.5926129e-02   1.3636539e-01   1.2353657e-01   1.1821263e-01   1.2258303e-01   1.2822457e-01   1.3051322e-01   1.2599517e-01   1.2631512e-01   1.3406707e-01   1.1278003e-01   9.6722933e-02   1.1783731e-01   1.1110860e-01   1.3080317e-01   1.3063996e-01   1.1029647e-01   1.1216341e-01   1.1248813e-01   1.5199693e-01   1.2674108e-01   1.1318561e-01   1.1969790e-01   1.3653036e-01   1.0458853e-01   1.1112582e-01   1.1028100e-01   9.9890110e-02   9.9356661e-02   1.2805612e-01   1.0750038e-01   1.2261289e-01   9.8791075e-02   1.2975191e-01   1.0408196e-01   1.3162969e-01   1.1713290e-01   1.1886116e-01   1.1132823e-01   9.7814075e-02   1.0357451e-01   1.1833994e-01   9.8179977e-02   1.2353657e-01   1.2124412e-01   1.1787602e-01   1.0709455e-01   1.1618054e-01   1.0529428e-01   1.1269702e-01   1.1053049e-01   1.3650135e-03   5.3926014e-04   9.6875216e-04   5.5085642e-03   1.1951469e-03   2.8096772e-03   1.4033998e-03   3.8702395e-04   1.0970323e-04   3.3218009e-04   5.6326785e-04   5.8024795e-04   5.6723773e-04   3.5935032e-03   3.0059920e-03   6.4984761e-04   1.1677062e-03   1.3673782e-03   6.4984761e-04   7.6378345e-05   6.3488092e-05   8.1586688e-04   6.3954323e-03   8.4458294e-04   1.6959745e-03   2.5316364e-03   4.4648839e-04   1.3649198e-03   2.1646092e-04   4.0910219e-04   1.5323026e-04   6.2114649e-02   6.4461203e-02   7.2168083e-02   8.2712554e-02   7.6067484e-02   8.2127836e-02   7.1085856e-02   5.7869953e-02   6.9689694e-02   7.3941980e-02   7.7755077e-02   6.6772898e-02   7.5730146e-02   8.0858032e-02   5.1159438e-02   5.9263906e-02   8.1982206e-02   6.5662191e-02   9.5957099e-02   6.8346124e-02   8.6755825e-02   6.0017643e-02   9.7272303e-02   8.1103209e-02   6.3092478e-02   6.2637310e-02   7.7107544e-02   8.2765719e-02   7.7320565e-02   5.0179546e-02   6.9272103e-02   6.4477670e-02   6.1520691e-02   1.0482403e-01   8.6201836e-02   6.7723532e-02   6.8849001e-02   8.5128110e-02   6.4954612e-02   7.6260237e-02   8.6474261e-02   7.5037042e-02   6.7540885e-02   5.9554295e-02   7.5917230e-02   6.5334858e-02   6.9084098e-02   6.5352935e-02   4.4308417e-02   6.8222624e-02   1.2733314e-01   1.1424612e-01   1.0876932e-01   1.1294180e-01   1.1881213e-01   1.2027633e-01   1.1690957e-01   1.1601884e-01   1.2357066e-01   1.0430113e-01   8.8647048e-02   1.0842142e-01   1.0217893e-01   1.2134270e-01   1.2195833e-01   1.0207761e-01   1.0292571e-01   1.0341320e-01   1.4095409e-01   1.1639921e-01   1.0445121e-01   1.1097871e-01   1.2583780e-01   9.5736690e-02   1.0236688e-01   1.0085185e-01   9.1372067e-02   9.1009848e-02   1.1849408e-01   9.7905297e-02   1.1253291e-01   9.0050809e-02   1.2026601e-01   9.4848068e-02   1.2106318e-01   1.0772883e-01   1.1055160e-01   1.0223795e-01   8.9621067e-02   9.5003079e-02   1.0961118e-01   9.0242843e-02   1.1424612e-01   1.1217935e-01   1.0939970e-01   9.8767943e-02   1.0686010e-01   9.6691216e-02   1.0462140e-01   1.0177309e-01   3.4212913e-03   2.0350185e-04   2.2645835e-03   3.4346676e-03   3.6178579e-03   5.4115677e-03   1.4013939e-03   1.2010586e-03   1.9342083e-03   1.8303919e-03   3.0241355e-03   3.0182648e-03   8.7783530e-04   7.3200159e-04   3.3935862e-03   3.0016113e-03   3.3110105e-03   3.3935862e-03   9.0468402e-04   1.4291912e-03   6.5529771e-04   1.3482371e-02   1.1883350e-04   1.9129351e-03   1.8189821e-03   3.2224845e-03   2.2840556e-04   6.5009173e-04   5.8224397e-04   1.6275063e-03   7.3184911e-02   7.4026716e-02   8.3609924e-02   9.5240271e-02   8.8102740e-02   9.2390529e-02   7.9966102e-02   6.7767341e-02   8.1513618e-02   8.2938634e-02   9.0997666e-02   7.6011769e-02   9.0234918e-02   9.1578032e-02   5.9804069e-02   7.0034281e-02   9.0682677e-02   7.6686753e-02   1.1071727e-01   7.9918092e-02   9.5151478e-02   7.0899518e-02   1.1069472e-01   9.2509702e-02   7.4297007e-02   7.3732579e-02   8.9920224e-02   9.4250688e-02   8.7608739e-02   6.1121885e-02   8.1169501e-02   7.6375843e-02   7.2267735e-02   1.1652820e-01   9.4360734e-02   7.5150369e-02   7.9755441e-02   9.9609504e-02   7.3443983e-02   8.7507436e-02   9.7438140e-02   8.5130511e-02   7.8978434e-02   7.0471516e-02   8.6314807e-02   7.4241923e-02   7.8526940e-02   7.6102189e-02   5.3711374e-02   7.8190521e-02   1.3653802e-01   1.2528995e-01   1.2121146e-01   1.2435019e-01   1.2997976e-01   1.3382130e-01   1.2659694e-01   1.2959353e-01   1.3786369e-01   1.1404399e-01   9.8548323e-02   1.2087284e-01   1.1387348e-01   1.3314978e-01   1.3209550e-01   1.1169631e-01   1.1419600e-01   1.1368838e-01   1.5633317e-01   1.3093427e-01   1.1535002e-01   1.2078800e-01   1.4049523e-01   1.0785716e-01   1.1249675e-01   1.1275652e-01   1.0267406e-01   1.0105332e-01   1.3042827e-01   1.1078233e-01   1.2662105e-01   1.0064162e-01   1.3213313e-01   1.0672611e-01   1.3386868e-01   1.2116827e-01   1.1908244e-01   1.1278797e-01   9.9360911e-02   1.0635497e-01   1.2047378e-01   1.0130606e-01   1.2528995e-01   1.2297832e-01   1.1929072e-01   1.0997770e-01   1.2004306e-01   1.0767864e-01   1.1284273e-01   1.1147304e-01   2.8709378e-03   9.0791333e-03   1.3407674e-03   2.7138923e-03   2.4677711e-04   1.1444972e-03   7.6121265e-04   8.8810957e-04   7.0009018e-04   1.4757411e-04   9.0393445e-04   6.0883361e-03   5.6961877e-03   1.2039709e-04   1.8816976e-03   2.0265121e-03   1.2039709e-04   8.6239061e-04   5.2686780e-04   2.5538294e-03   4.1367540e-03   2.4461852e-03   3.1968429e-03   3.7345867e-03   3.8813913e-04   2.9749715e-03   1.1153685e-03   1.5845430e-03   6.9221070e-04   5.5493017e-02   5.8687008e-02   6.5182775e-02   7.5153394e-02   6.8882837e-02   7.5289957e-02   6.5516107e-02   5.1904720e-02   6.2434251e-02   6.8395322e-02   6.9725101e-02   6.1264247e-02   6.7000659e-02   7.3915045e-02   4.6337454e-02   5.2993228e-02   7.6203506e-02   5.8574285e-02   8.7235787e-02   6.1228310e-02   8.1349394e-02   5.3727422e-02   8.8860415e-02   7.3529860e-02   5.6419133e-02   5.6136434e-02   6.9314277e-02   7.5768587e-02   7.0921131e-02   4.3887190e-02   6.2047408e-02   5.7247874e-02   5.5122668e-02   9.7063471e-02   8.0589157e-02   6.3015465e-02   6.2273448e-02   7.6485434e-02   5.9534434e-02   6.9400424e-02   7.9100961e-02   6.8556756e-02   6.0632063e-02   5.3105900e-02   6.9320431e-02   5.9485747e-02   6.3075829e-02   5.8812039e-02   3.9389619e-02   6.2057390e-02   1.2120786e-01   1.0709958e-01   1.0095433e-01   1.0522389e-01   1.1158919e-01   1.1144992e-01   1.1038844e-01   1.0698853e-01   1.1429410e-01   9.8230586e-02   8.2643326e-02   1.0062987e-01   9.5029365e-02   1.1396256e-01   1.1592889e-01   9.6297509e-02   9.5506831e-02   9.6444702e-02   1.3110088e-01   1.0707131e-01   9.7795782e-02   1.0475251e-01   1.1626300e-01   8.8405248e-02   9.5813058e-02   9.2970070e-02   8.4549021e-02   8.4699662e-02   1.1089247e-01   8.9470273e-02   1.0356569e-01   8.3077190e-02   1.1281589e-01   8.7056416e-02   1.1197016e-01   9.9670877e-02   1.0510107e-01   9.5157512e-02   8.3537128e-02   8.8197538e-02   1.0308982e-01   8.4141549e-02   1.0709958e-01   1.0532428e-01   1.0341164e-01   9.2382015e-02   9.8953568e-02   8.9983057e-02   9.9390435e-02   9.5301345e-02   3.0771633e-03   2.2394953e-03   3.5785600e-03   4.5455517e-03   7.4728021e-04   1.0553655e-03   1.6471751e-03   1.6255623e-03   2.5337657e-03   2.0402330e-03   1.9207121e-03   1.4230439e-03   3.0970780e-03   2.6131629e-03   2.9423829e-03   3.0970780e-03   7.3620931e-04   1.2096052e-03   5.1210113e-04   1.1445573e-02   3.3743120e-04   9.3762253e-04   1.6709589e-03   2.3328362e-03   6.4367426e-04   6.1292579e-04   6.6980522e-04   1.3596425e-03   6.8771058e-02   6.9631829e-02   7.8939123e-02   9.0076585e-02   8.3106206e-02   8.8021023e-02   7.5587788e-02   6.3613086e-02   7.6977857e-02   7.8355410e-02   8.6058485e-02   7.1477483e-02   8.5350309e-02   8.7042060e-02   5.5585563e-02   6.5564323e-02   8.6285657e-02   7.2679829e-02   1.0489589e-01   7.5454083e-02   9.0429367e-02   6.6346194e-02   1.0535674e-01   8.8189227e-02   6.9809235e-02   6.9152322e-02   8.5027647e-02   8.9182145e-02   8.2908995e-02   5.6974544e-02   7.6567724e-02   7.1978204e-02   6.7853368e-02   1.1142320e-01   9.0045691e-02   7.1019587e-02   7.5131918e-02   9.4265212e-02   6.9407495e-02   8.2681448e-02   9.3017444e-02   8.0734547e-02   7.4408554e-02   6.6081064e-02   8.1800498e-02   7.0361312e-02   7.4293705e-02   7.1683996e-02   4.9412056e-02   7.3791248e-02   1.3087381e-01   1.1972349e-01   1.1554097e-01   1.1917243e-01   1.2428472e-01   1.2815053e-01   1.2126029e-01   1.2425112e-01   1.3208038e-01   1.0854852e-01   9.3334993e-02   1.1518188e-01   1.0821021e-01   1.2711496e-01   1.2583624e-01   1.0606084e-01   1.0908141e-01   1.0877992e-01   1.4997249e-01   1.2525272e-01   1.0965413e-01   1.1522136e-01   1.3472784e-01   1.0229252e-01   1.0728052e-01   1.0776484e-01   9.7267064e-02   9.5981774e-02   1.2460839e-01   1.0582154e-01   1.2096134e-01   9.5922459e-02   1.2615683e-01   1.0184377e-01   1.2900688e-01   1.1512576e-01   1.1363761e-01   1.0783825e-01   9.4308496e-02   1.0078579e-01   1.1452781e-01   9.5389301e-02   1.1972349e-01   1.1733679e-01   1.1347632e-01   1.0398208e-01   1.1403752e-01   1.0220157e-01   1.0755302e-01   1.0649118e-01   1.0147620e-02   1.1247381e-02   1.2064168e-02   6.5374061e-03   4.5897505e-03   4.8228518e-03   7.5563629e-03   9.2308338e-03   7.2321889e-03   1.6011806e-03   5.3396772e-04   8.3950153e-03   4.7739373e-03   4.9472694e-03   8.3950153e-03   4.4998786e-03   5.2439437e-03   2.2809748e-03   2.1071898e-02   2.7056396e-03   6.9610435e-03   7.8780829e-03   8.1126375e-03   3.2257880e-03   4.3393216e-03   3.1425928e-03   4.9174647e-03   1.0007131e-01   1.0106593e-01   1.1217080e-01   1.2532148e-01   1.1715442e-01   1.2248393e-01   1.0792073e-01   9.3860583e-02   1.0976919e-01   1.1122163e-01   1.2044721e-01   1.0322968e-01   1.1921347e-01   1.2149913e-01   8.4186074e-02   9.6291408e-02   1.2023049e-01   1.0442285e-01   1.4247402e-01   1.0795998e-01   1.2499239e-01   9.7246530e-02   1.4298267e-01   1.2269113e-01   1.0132833e-01   1.0059203e-01   1.1928692e-01   1.2425009e-01   1.1675840e-01   8.5744895e-02   1.0931412e-01   1.0376332e-01   9.9002718e-02   1.4971116e-01   1.2434000e-01   1.0215677e-01   1.0769100e-01   1.2998610e-01   1.0050022e-01   1.1660891e-01   1.2830083e-01   1.1408155e-01   1.0679553e-01   9.6866698e-02   1.1540492e-01   1.0158690e-01   1.0644304e-01   1.0354221e-01   7.6665035e-02   1.0598765e-01   1.7102185e-01   1.5912057e-01   1.5467066e-01   1.5843570e-01   1.6430112e-01   1.6898961e-01   1.6040927e-01   1.6442765e-01   1.7347908e-01   1.4613872e-01   1.2882261e-01   1.5426961e-01   1.4623773e-01   1.6767510e-01   1.6569930e-01   1.4326884e-01   1.4700928e-01   1.4639344e-01   1.9375995e-01   1.6572948e-01   1.4772209e-01   1.5370280e-01   1.7644069e-01   1.3951457e-01   1.4477511e-01   1.4552738e-01   1.3362833e-01   1.3186831e-01   1.6485780e-01   1.4332228e-01   1.6088049e-01   1.3176893e-01   1.6660706e-01   1.3873049e-01   1.6938110e-01   1.5434218e-01   1.5143663e-01   1.4540553e-01   1.2987912e-01   1.3768917e-01   1.5323248e-01   1.3136310e-01   1.5912057e-01   1.5638588e-01   1.5175254e-01   1.4128505e-01   1.5308268e-01   1.3923812e-01   1.4444485e-01   1.4370095e-01   2.6770864e-03   1.6033718e-03   4.5840441e-04   2.0276877e-03   2.4561050e-03   1.2787767e-03   1.0310968e-03   1.1138996e-03   7.3996134e-03   6.8122401e-03   2.1890332e-03   3.7576667e-03   4.1081994e-03   2.1890332e-03   1.7366871e-03   1.7496571e-03   3.0804223e-03   5.2624414e-03   3.0566387e-03   8.7139687e-04   2.3320271e-03   9.5854356e-04   3.5582665e-03   1.9033529e-03   2.7781156e-03   2.0582238e-03   4.8466175e-02   5.0119607e-02   5.7333122e-02   6.6635612e-02   6.0625611e-02   6.6546613e-02   5.6002103e-02   4.4610205e-02   5.5428894e-02   5.8355341e-02   6.2731565e-02   5.1936578e-02   6.1589720e-02   6.5254921e-02   3.8121898e-02   4.5707178e-02   6.5954438e-02   5.2310619e-02   7.8737277e-02   5.4221486e-02   6.9833666e-02   4.6306978e-02   8.0104533e-02   6.6061691e-02   4.9289042e-02   4.8703396e-02   6.2029842e-02   6.6459215e-02   6.1626890e-02   3.8139914e-02   5.4977441e-02   5.0955269e-02   4.7810568e-02   8.6879401e-02   6.9864176e-02   5.2960539e-02   5.4195866e-02   6.9397405e-02   5.0805294e-02   6.0771100e-02   7.0699543e-02   5.9928918e-02   5.3277849e-02   4.6137567e-02   6.0647902e-02   5.1507184e-02   5.4535520e-02   5.1271651e-02   3.2182295e-02   5.3653922e-02   1.0655841e-01   9.4809862e-02   8.9943103e-02   9.4257768e-02   9.8930460e-02   1.0102907e-01   9.7318001e-02   9.7573045e-02   1.0420091e-01   8.5339961e-02   7.1237738e-02   8.9593643e-02   8.3615246e-02   1.0099568e-01   1.0093948e-01   8.3072610e-02   8.4968711e-02   8.5464008e-02   1.2001752e-01   9.7755169e-02   8.5475001e-02   9.1482164e-02   1.0648093e-01   7.7912530e-02   8.4002788e-02   8.3421922e-02   7.3855173e-02   7.3645673e-02   9.8656580e-02   8.1073912e-02   9.4018658e-02   7.3420060e-02   1.0008227e-01   7.8012093e-02   1.0282145e-01   8.8787179e-02   9.1014600e-02   8.4377747e-02   7.2315249e-02   7.7005472e-02   8.9946277e-02   7.2132565e-02   9.4809862e-02   9.2717682e-02   8.9711332e-02   7.9921256e-02   8.7947099e-02   7.8589830e-02   8.5634568e-02   8.3685774e-02   3.6322977e-03   2.1046334e-03   3.2662345e-03   4.7576391e-03   8.8436254e-04   1.6169936e-03   5.0909036e-03   5.3937261e-03   6.9592372e-03   3.1326528e-03   7.3963134e-03   7.8155750e-03   3.1326528e-03   2.8162695e-03   2.9888005e-03   5.3841195e-03   1.1640832e-02   3.1058623e-03   3.5268449e-03   8.9518404e-04   4.1579453e-03   2.4418843e-03   2.3174283e-03   3.5804624e-03   3.9289766e-03   4.8779386e-02   4.9807262e-02   5.7295117e-02   6.7429274e-02   6.1528729e-02   6.3805672e-02   5.4672352e-02   4.4305273e-02   5.5263563e-02   5.7527840e-02   6.3439356e-02   5.1886311e-02   6.2844358e-02   6.3392021e-02   3.9105833e-02   4.6659036e-02   6.3315061e-02   5.0431450e-02   8.1151197e-02   5.3901750e-02   6.8036856e-02   4.7518043e-02   7.9948453e-02   6.3397617e-02   4.9788208e-02   4.9648688e-02   6.2516012e-02   6.6678586e-02   6.0874148e-02   3.9322135e-02   5.5164136e-02   5.1029588e-02   4.8159012e-02   8.4641068e-02   6.6410487e-02   5.1100232e-02   5.4352465e-02   7.1152366e-02   4.8870866e-02   6.0790663e-02   6.7705030e-02   5.8185400e-02   5.3489810e-02   4.6729049e-02   5.9304859e-02   4.8888831e-02   5.2875044e-02   5.1050585e-02   3.4854587e-02   5.2844524e-02   1.0451993e-01   9.3506986e-02   8.9732041e-02   9.1442484e-02   9.7717353e-02   9.9707944e-02   9.4802947e-02   9.5351404e-02   1.0312713e-01   8.4850971e-02   7.1294232e-02   8.9511382e-02   8.4075688e-02   1.0102482e-01   1.0205801e-01   8.3487981e-02   8.2948462e-02   8.2499658e-02   1.1982484e-01   9.7067919e-02   8.5815629e-02   9.0584285e-02   1.0517734e-01   7.8728615e-02   8.2465362e-02   8.1175179e-02   7.4451161e-02   7.2780961e-02   9.8027119e-02   7.9186352e-02   9.3572539e-02   7.1178913e-02   9.9960717e-02   7.6001190e-02   9.8069469e-02   9.0444802e-02   8.9768862e-02   8.1715688e-02   7.1540326e-02   7.7885383e-02   9.0855680e-02   7.5245252e-02   9.3506986e-02   9.1968167e-02   9.0109483e-02   8.2320804e-02   8.9509517e-02   7.8843854e-02   8.4366358e-02   8.1217849e-02   2.0130888e-03   1.8101212e-03   1.7679630e-03   1.5452657e-03   5.1945438e-04   1.2854163e-03   8.7808919e-03   8.2238558e-03   5.0256002e-04   2.7264330e-03   2.8467434e-03   5.0256002e-04   1.9812707e-03   1.4461308e-03   4.1136119e-03   2.5737383e-03   4.2121435e-03   4.2634118e-03   5.2197085e-03   6.4299253e-04   4.8925560e-03   2.3856210e-03   3.0302048e-03   1.5954763e-03   5.0938593e-02   5.4618269e-02   6.0341206e-02   6.9748949e-02   6.3744319e-02   7.0794949e-02   6.1613026e-02   4.7841585e-02   5.7516679e-02   6.4388046e-02   6.4176559e-02   5.7259869e-02   6.1078980e-02   6.9247074e-02   4.2780731e-02   4.8566082e-02   7.2247187e-02   5.4065395e-02   8.0844343e-02   5.6422768e-02   7.7401119e-02   4.9239970e-02   8.2976560e-02   6.8666014e-02   5.1795393e-02   5.1539865e-02   6.3922410e-02   7.0731007e-02   6.6410587e-02   3.9578438e-02   5.7098964e-02   5.2392525e-02   5.0683886e-02   9.1729236e-02   7.6796353e-02   5.9700691e-02   5.7658559e-02   7.0380963e-02   5.5891948e-02   6.4553084e-02   7.4314140e-02   6.4188376e-02   5.5862752e-02   4.8638731e-02   6.4818200e-02   5.5721441e-02   5.9023587e-02   5.4325379e-02   3.5659427e-02   5.7806321e-02   1.1646754e-01   1.0183406e-01   9.5237923e-02   9.9907095e-02   1.0622089e-01   1.0525522e-01   1.0561297e-01   1.0087833e-01   1.0779948e-01   9.3522115e-02   7.8070592e-02   9.4910280e-02   8.9633058e-02   1.0829781e-01   1.1081740e-01   9.1634033e-02   9.0337246e-02   9.1650208e-02   1.2399805e-01   1.0057671e-01   9.2649910e-02   9.9949877e-02   1.0962952e-01   8.2940269e-02   9.1028259e-02   8.7623472e-02   7.9432792e-02   8.0075100e-02   1.0524078e-01   8.3828651e-02   9.7259211e-02   7.8329945e-02   1.0714828e-01   8.1794698e-02   1.0616577e-01   9.3567438e-02   1.0077628e-01   9.0271060e-02   7.9035426e-02   8.3003648e-02   9.7873414e-02   7.9050596e-02   1.0183406e-01   1.0015100e-01   9.8558964e-02   8.7141498e-02   9.2951123e-02   8.4912476e-02   9.5252034e-02   9.0710349e-02   8.3242342e-04   1.3658963e-03   5.7230018e-04   8.1918836e-04   9.7205318e-04   4.1873206e-03   3.8010080e-03   1.6389584e-03   2.5918915e-03   2.9169588e-03   1.6389584e-03   5.6093257e-04   7.3131385e-04   1.3995850e-03   7.2853070e-03   1.1548608e-03   5.6661765e-04   1.3645766e-03   9.0462881e-04   1.5033145e-03   5.7640672e-04   1.1086000e-03   1.0041867e-03   5.6613254e-02   5.8073267e-02   6.6069758e-02   7.6238332e-02   6.9820331e-02   7.5150667e-02   6.4021588e-02   5.2221754e-02   6.4043055e-02   6.6631628e-02   7.2118099e-02   6.0001482e-02   7.1017077e-02   7.4033042e-02   4.5299125e-02   5.3744092e-02   7.4268794e-02   6.0257552e-02   8.9540407e-02   6.2698279e-02   7.8447791e-02   5.4448716e-02   9.0401373e-02   7.4795629e-02   5.7546133e-02   5.6993841e-02   7.1300530e-02   7.5820775e-02   7.0342915e-02   4.5615196e-02   6.3638314e-02   5.9296597e-02   5.5885275e-02   9.6910282e-02   7.8117499e-02   6.0390425e-02   6.2700176e-02   7.9484269e-02   5.8304382e-02   6.9718471e-02   7.9589842e-02   6.8316048e-02   6.1785991e-02   5.4151233e-02   6.9205713e-02   5.8981505e-02   6.2496988e-02   5.9482310e-02   3.9268283e-02   6.1808750e-02   1.1700097e-01   1.0528100e-01   1.0062122e-01   1.0448643e-01   1.0962576e-01   1.1218593e-01   1.0740486e-01   1.0838294e-01   1.1564442e-01   9.5242357e-02   8.0565058e-02   1.0027898e-01   9.3976493e-02   1.1211413e-01   1.1185843e-01   9.2981806e-02   9.4878465e-02   9.5039709e-02   1.3246555e-01   1.0898490e-01   9.5760022e-02   1.0161372e-01   1.1802422e-01   8.8109745e-02   9.3746381e-02   9.3301915e-02   8.3669649e-02   8.2970713e-02   1.0958444e-01   9.1015393e-02   1.0506496e-01   8.2570171e-02   1.1114727e-01   8.7646381e-02   1.1324005e-01   9.9872205e-02   1.0076379e-01   9.4009317e-02   8.1526386e-02   8.7041367e-02   1.0052094e-01   8.2193042e-02   1.0528100e-01   1.0314067e-01   9.9984788e-02   9.0308392e-02   9.8939123e-02   8.8538901e-02   9.5061969e-02   9.3157351e-02   1.7227462e-04   7.9314599e-04   8.9844173e-04   8.9518090e-04   2.8880348e-03   2.3244520e-03   6.4717383e-04   8.8327223e-04   1.0385020e-03   6.4717383e-04   4.2082433e-05   2.2535838e-05   6.1632160e-04   7.2421116e-03   6.3599645e-04   2.4204146e-03   3.0244507e-03   7.7555952e-04   1.1490838e-03   1.6721205e-04   1.6116507e-04   5.3985478e-05   6.6593275e-02   6.9140456e-02   7.6991415e-02   8.7909276e-02   8.1079796e-02   8.7140283e-02   7.5972851e-02   6.2229264e-02   7.4340995e-02   7.8983123e-02   8.2638003e-02   7.1602020e-02   8.0355120e-02   8.5886853e-02   5.5471847e-02   6.3724100e-02   8.7131187e-02   7.0026001e-02   1.0150375e-01   7.2956045e-02   9.2179245e-02   6.4526163e-02   1.0277569e-01   8.5954479e-02   6.7618774e-02   6.7207904e-02   8.2005017e-02   8.8025831e-02   8.2391127e-02   5.4193907e-02   7.3937560e-02   6.8913785e-02   6.6018815e-02   1.1053450e-01   9.1432865e-02   7.2512462e-02   7.3622571e-02   9.0228640e-02   6.9559505e-02   8.1277678e-02   9.1538587e-02   7.9923144e-02   7.2198625e-02   6.3968343e-02   8.0855092e-02   6.9835377e-02   7.3807917e-02   6.9953549e-02   4.8370205e-02   7.2961708e-02   1.3388298e-01   1.2040855e-01   1.1476271e-01   1.1886295e-01   1.2510613e-01   1.2637598e-01   1.2310531e-01   1.2187125e-01   1.2970708e-01   1.1033742e-01   9.4233672e-02   1.1441687e-01   1.0810566e-01   1.2778743e-01   1.2861773e-01   1.0813836e-01   1.0864380e-01   1.0911947e-01   1.4755823e-01   1.2232653e-01   1.1049966e-01   1.1716689e-01   1.3196625e-01   1.0144926e-01   1.0821364e-01   1.0641029e-01   9.6993665e-02   9.6571345e-02   1.2478057e-01   1.0328932e-01   1.1842664e-01   9.5377765e-02   1.2666075e-01   1.0023484e-01   1.2682498e-01   1.1377681e-01   1.1674990e-01   1.0792126e-01   9.5167233e-02   1.0076949e-01   1.1586910e-01   9.6070623e-02   1.2040855e-01   1.1835687e-01   1.1566030e-01   1.0480317e-01   1.1289922e-01   1.0248125e-01   1.1065853e-01   1.0752770e-01   1.5518070e-03   1.3360426e-03   6.1855325e-04   3.8684575e-03   2.7981409e-03   7.1019942e-04   2.9249692e-04   3.8108588e-04   7.1019942e-04   3.4811331e-04   2.0628507e-04   6.8481588e-04   6.1413327e-03   1.2640084e-03   3.0810810e-03   4.5162171e-03   6.1490495e-04   2.0823475e-03   6.6391763e-04   4.5940617e-04   4.0824218e-05   6.8980444e-02   7.2049409e-02   7.9659630e-02   9.0518795e-02   8.3601945e-02   9.0707158e-02   7.9362725e-02   6.4838475e-02   7.6843708e-02   8.2367370e-02   8.4912050e-02   7.4621958e-02   8.2116380e-02   8.9210086e-02   5.7968714e-02   6.6009408e-02   9.1025554e-02   7.2793579e-02   1.0368926e-01   7.5498978e-02   9.6154006e-02   6.6776572e-02   1.0567953e-01   8.9202124e-02   6.9982422e-02   6.9528749e-02   8.4404562e-02   9.0968518e-02   8.5580442e-02   5.6059636e-02   7.6365493e-02   7.1188605e-02   6.8464233e-02   1.1430428e-01   9.5645657e-02   7.6165252e-02   7.6295454e-02   9.2254316e-02   7.2920975e-02   8.4113452e-02   9.5088632e-02   8.3209827e-02   7.4687466e-02   6.6271074e-02   8.4049660e-02   7.3195324e-02   7.7054222e-02   7.2597553e-02   5.0198701e-02   7.5958466e-02   1.3864088e-01   1.2443023e-01   1.1820696e-01   1.2296103e-01   1.2918980e-01   1.2996108e-01   1.2761885e-01   1.2545185e-01   1.3315049e-01   1.1429516e-01   9.7708479e-02   1.1783417e-01   1.1147502e-01   1.3162480e-01   1.3265015e-01   1.1194384e-01   1.1244164e-01   1.1326233e-01   1.5100180e-01   1.2549100e-01   1.1411167e-01   1.2131599e-01   1.3539430e-01   1.0451333e-01   1.1218678e-01   1.1003412e-01   1.0016268e-01   1.0019858e-01   1.2861591e-01   1.0655136e-01   1.2158527e-01   9.9029274e-02   1.3048234e-01   1.0368193e-01   1.3098775e-01   1.1671318e-01   1.2117898e-01   1.1194010e-01   9.8811276e-02   1.0398171e-01   1.1952683e-01   9.8904418e-02   1.2443023e-01   1.2231211e-01   1.1957927e-01   1.0792296e-01   1.1588914e-01   1.0590028e-01   1.1501774e-01   1.1169315e-01   2.7458883e-04   1.9079543e-03   3.8013798e-03   4.1957403e-03   8.9864077e-04   3.1780627e-03   3.4575366e-03   8.9864077e-04   6.1086528e-04   6.3429136e-04   2.2515700e-03   7.8191545e-03   1.2413621e-03   2.0952535e-03   1.3093150e-03   1.3748953e-03   1.2388833e-03   4.8114625e-04   1.1404059e-03   1.0969768e-03   5.5584260e-02   5.7510469e-02   6.4993010e-02   7.5368447e-02   6.9057379e-02   7.3499750e-02   6.3437246e-02   5.1298347e-02   6.2635149e-02   6.6332421e-02   7.0700793e-02   5.9790543e-02   6.9153134e-02   7.2596138e-02   4.5395419e-02   5.3097576e-02   7.3376441e-02   5.8208889e-02   8.8752390e-02   6.1292160e-02   7.8242185e-02   5.3906344e-02   8.8989869e-02   7.2610553e-02   5.6579969e-02   5.6297092e-02   6.9966539e-02   7.5157531e-02   6.9589413e-02   4.4676337e-02   6.2364995e-02   5.7806901e-02   5.5013010e-02   9.5419957e-02   7.7143847e-02   6.0075763e-02   6.1882505e-02   7.8193894e-02   5.7405077e-02   6.8884889e-02   7.7590521e-02   6.7073564e-02   6.0698980e-02   5.3256477e-02   6.8055547e-02   5.7544133e-02   6.1428351e-02   5.8436070e-02   3.9618229e-02   6.0914936e-02   1.1719371e-01   1.0478727e-01   9.9928933e-02   1.0301520e-01   1.0921839e-01   1.1065431e-01   1.0694189e-01   1.0626748e-01   1.1395294e-01   9.5522682e-02   8.0692317e-02   9.9640584e-02   9.3821909e-02   1.1210560e-01   1.1313776e-01   9.3722341e-02   9.3659306e-02   9.3792773e-02   1.3107147e-01   1.0721381e-01   9.5955259e-02   1.0180084e-01   1.1608360e-01   8.7786080e-02   9.3279943e-02   9.1618132e-02   8.3505928e-02   8.2622852e-02   1.0912386e-01   8.8978076e-02   1.0355009e-01   8.1236966e-02   1.1101306e-01   8.5950464e-02   1.1026035e-01   9.9640402e-02   1.0131013e-01   9.2768985e-02   8.1325904e-02   8.7087186e-02   1.0113076e-01   8.3368795e-02   1.0478727e-01   1.0299507e-01   1.0075649e-01   9.1267488e-02   9.8760345e-02   8.8473047e-02   9.5602739e-02   9.2388034e-02   1.3192990e-03   5.6049942e-03   5.6260410e-03   3.8255378e-04   2.7098321e-03   2.9260165e-03   3.8255378e-04   8.5873923e-04   6.4551657e-04   2.7466704e-03   5.2436473e-03   2.1741200e-03   2.6488612e-03   2.5599967e-03   7.2546074e-04   2.4454411e-03   9.4817109e-04   1.6251073e-03   9.8969141e-04   5.2867682e-02   5.5519966e-02   6.2241614e-02   7.2187515e-02   6.6023504e-02   7.1524895e-02   6.1872329e-02   4.9090525e-02   5.9694897e-02   6.4712456e-02   6.7154795e-02   5.7947928e-02   6.4972194e-02   7.0357979e-02   4.3573654e-02   5.0441816e-02   7.2068579e-02   5.5680796e-02   8.4591184e-02   5.8459303e-02   7.7051055e-02   5.1193288e-02   8.5601942e-02   7.0117829e-02   5.3803216e-02   5.3535941e-02   6.6621467e-02   7.2473708e-02   6.7439009e-02   4.1816308e-02   5.9366143e-02   5.4760331e-02   5.2431175e-02   9.2978431e-02   7.6152091e-02   5.9131458e-02   5.9321453e-02   7.4096463e-02   5.5985281e-02   6.6256786e-02   7.5362720e-02   6.5046998e-02   5.7885295e-02   5.0561408e-02   6.5880549e-02   5.5988437e-02   5.9621488e-02   5.5930673e-02   3.7267604e-02   5.8818934e-02   1.1596549e-01   1.0264359e-01   9.7070235e-02   1.0079872e-01   1.0704759e-01   1.0746690e-01   1.0547300e-01   1.0308827e-01   1.1044375e-01   9.3809882e-02   7.8755194e-02   9.6766957e-02   9.1194118e-02   1.0959636e-01   1.1126853e-01   9.1984794e-02   9.1378676e-02   9.2003603e-02   1.2714849e-01   1.0351897e-01   9.3695356e-02   1.0013450e-01   1.1244271e-01   8.4898325e-02   9.1456450e-02   8.9057498e-02   8.0952577e-02   8.0704372e-02   1.0658329e-01   8.5941483e-02   1.0000975e-01   7.9159793e-02   1.0848060e-01   8.3337337e-02   1.0760265e-01   9.6215589e-02   1.0020263e-01   9.0833970e-02   7.9520366e-02   8.4523201e-02   9.8885306e-02   8.0736144e-02   1.0264359e-01   1.0090595e-01   9.8957167e-02   8.8690158e-02   9.5447639e-02   8.6121379e-02   9.4585258e-02   9.0802578e-02   6.3934178e-03   4.8940589e-03   1.2286350e-03   9.0839358e-04   1.0654961e-03   1.2286350e-03   9.6426336e-04   7.9049403e-04   1.4335758e-03   3.9777866e-03   2.4355051e-03   2.0107867e-03   4.6162602e-03   1.1770386e-04   3.4806567e-03   1.4352123e-03   1.5474906e-03   6.2303871e-04   6.0828103e-02   6.3671616e-02   7.0896871e-02   8.0864907e-02   7.4298413e-02   8.2081782e-02   7.0784097e-02   5.7058421e-02   6.8417644e-02   7.3405222e-02   7.5846906e-02   6.5924537e-02   7.3406010e-02   8.0389200e-02   5.0100593e-02   5.7793778e-02   8.2174514e-02   6.5233957e-02   9.3014438e-02   6.7186690e-02   8.6645560e-02   5.8420934e-02   9.5569964e-02   8.0832485e-02   6.1703014e-02   6.1092740e-02   7.5364208e-02   8.1326732e-02   7.6506202e-02   4.8648267e-02   6.7850123e-02   6.3129543e-02   6.0279722e-02   1.0421037e-01   8.6793624e-02   6.7911943e-02   6.7612814e-02   8.2552902e-02   6.4996479e-02   7.4977087e-02   8.6383221e-02   7.4662447e-02   6.6198278e-02   5.8199721e-02   7.5325266e-02   6.5572089e-02   6.8824430e-02   6.4314329e-02   4.2494903e-02   6.7537432e-02   1.2698890e-01   1.1333529e-01   1.0720337e-01   1.1257147e-01   1.1782339e-01   1.1890376e-01   1.1671052e-01   1.1501886e-01   1.2195484e-01   1.0334755e-01   8.7523621e-02   1.0680449e-01   1.0051071e-01   1.1973768e-01   1.2022270e-01   1.0080013e-01   1.0231108e-01   1.0334772e-01   1.3872306e-01   1.1462175e-01   1.0296153e-01   1.1014449e-01   1.2423991e-01   9.3883877e-02   1.0176675e-01   1.0022558e-01   8.9772340e-02   9.0213298e-02   1.1713918e-01   9.6981953e-02   1.1075521e-01   8.9707194e-02   1.1871449e-01   9.4162640e-02   1.2118172e-01   1.0525415e-01   1.1008916e-01   1.0200908e-01   8.8850235e-02   9.3264552e-02   1.0788029e-01   8.7700151e-02   1.1333529e-01   1.1110284e-01   1.0804665e-01   9.6438203e-02   1.0447205e-01   9.5256431e-02   1.0425068e-01   1.0162139e-01   4.7487225e-04   5.5229901e-03   5.0553045e-03   5.3192416e-03   5.5229901e-03   2.6440955e-03   3.2948907e-03   2.1817756e-03   1.9232390e-02   1.0060949e-03   5.2893888e-03   3.6565664e-03   6.4838776e-03   7.5722530e-04   2.1347736e-03   1.7405562e-03   3.5508478e-03   8.4906111e-02   8.5684875e-02   9.5941240e-02   1.0863973e-01   1.0110388e-01   1.0421406e-01   9.1634377e-02   7.8911086e-02   9.3575504e-02   9.5023267e-02   1.0394314e-01   8.7940160e-02   1.0307352e-01   1.0372095e-01   7.0927620e-02   8.1814584e-02   1.0248405e-01   8.7682138e-02   1.2553590e-01   9.1822634e-02   1.0758552e-01   8.2848043e-02   1.2459059e-01   1.0427303e-01   8.6172494e-02   8.5771372e-02   1.0276107e-01   1.0743739e-01   1.0000507e-01   7.2180344e-02   9.3352407e-02   8.8118179e-02   8.3972299e-02   1.2999219e-01   1.0601815e-01   8.6245777e-02   9.1942699e-02   1.1341937e-01   8.4389659e-02   1.0016617e-01   1.0942619e-01   9.6927434e-02   9.1068024e-02   8.2112078e-02   9.8354950e-02   8.4918144e-02   8.9929197e-02   8.7860129e-02   6.4913483e-02   8.9916257e-02   1.5108513e-01   1.3966025e-01   1.3579363e-01   1.3800221e-01   1.4462965e-01   1.4853849e-01   1.4049017e-01   1.4366186e-01   1.5284247e-01   1.2813521e-01   1.1198929e-01   1.3549048e-01   1.2835377e-01   1.4847864e-01   1.4775011e-01   1.2601872e-01   1.2764409e-01   1.2670935e-01   1.7255531e-01   1.4567287e-01   1.2987249e-01   1.3506836e-01   1.5547286e-01   1.2211481e-01   1.2607603e-01   1.2598262e-01   1.1656479e-01   1.1426125e-01   1.4534374e-01   1.2395854e-01   1.4127350e-01   1.1320894e-01   1.4734853e-01   1.1969377e-01   1.4703899e-01   1.3646872e-01   1.3305975e-01   1.2588961e-01   1.1250545e-01   1.2058130e-01   1.3549735e-01   1.1610735e-01   1.3966025e-01   1.3745925e-01   1.3401818e-01   1.2501338e-01   1.3525796e-01   1.2173379e-01   1.2646805e-01   1.2458940e-01   5.1766813e-03   3.3038909e-03   3.5089109e-03   5.1766813e-03   2.1988415e-03   2.7782772e-03   1.0688451e-03   1.7030893e-02   8.9726872e-04   4.6231995e-03   4.6736672e-03   5.3382818e-03   1.1647725e-03   1.9758755e-03   1.2750935e-03   2.7128598e-03   8.7833448e-02   8.9010914e-02   9.9253982e-02   1.1183035e-01   1.0412107e-01   1.0885582e-01   9.5547284e-02   8.2028755e-02   9.6837094e-02   9.8811318e-02   1.0697473e-01   9.1242752e-02   1.0570232e-01   1.0798221e-01   7.3423587e-02   8.4439842e-02   1.0715501e-01   9.1521191e-02   1.2824419e-01   9.5124610e-02   1.1205287e-01   8.5389026e-02   1.2841576e-01   1.0878552e-01   8.9048303e-02   8.8474213e-02   1.0589810e-01   1.1091852e-01   1.0379001e-01   7.4413565e-02   9.6465402e-02   9.1132676e-02   8.6893608e-02   1.3487393e-01   1.1110410e-01   9.0320856e-02   9.5130800e-02   1.1613190e-01   8.8387927e-02   1.0357744e-01   1.1422195e-01   1.0103671e-01   9.4160592e-02   8.4870839e-02   1.0232030e-01   8.9160088e-02   9.3889889e-02   9.1104413e-02   6.6493231e-02   9.3508454e-02   1.5639991e-01   1.4440871e-01   1.3995325e-01   1.4327783e-01   1.4942424e-01   1.5327636e-01   1.4579380e-01   1.4864466e-01   1.5749945e-01   1.3242397e-01   1.1574188e-01   1.3959357e-01   1.3216131e-01   1.5281767e-01   1.5172347e-01   1.2991524e-01   1.3242882e-01   1.3190251e-01   1.7712896e-01   1.5002220e-01   1.3380600e-01   1.3964037e-01   1.6023126e-01   1.2562692e-01   1.3071698e-01   1.3077115e-01   1.2010966e-01   1.1841338e-01   1.4987755e-01   1.2848062e-01   1.4548859e-01   1.1783301e-01   1.5172346e-01   1.2426441e-01   1.5309487e-01   1.3983154e-01   1.3778354e-01   1.3093423e-01   1.1660453e-01   1.2409289e-01   1.3931059e-01   1.1865130e-01   1.4440871e-01   1.4196632e-01   1.3805465e-01   1.2801436e-01   1.3865562e-01   1.2553921e-01   1.3109454e-01   1.2958547e-01   1.5860612e-03   1.6773969e-03   0.0000000e+00   8.4337656e-04   4.6746407e-04   2.4549978e-03   4.7529836e-03   2.3235808e-03   4.0683267e-03   4.3260986e-03   6.7336618e-04   2.8454658e-03   1.0918918e-03   1.3756658e-03   5.7784546e-04   5.9573290e-02   6.3070670e-02   6.9597309e-02   7.9911457e-02   7.3480528e-02   7.9923883e-02   7.0144874e-02   5.5923876e-02   6.6635620e-02   7.3192589e-02   7.4096565e-02   6.5836734e-02   7.1022277e-02   7.8555696e-02   5.0423423e-02   5.7089619e-02   8.1093473e-02   6.2483167e-02   9.2251714e-02   6.5399221e-02   8.6573432e-02   5.7873871e-02   9.3861710e-02   7.7914479e-02   6.0545459e-02   6.0328179e-02   7.3725736e-02   8.0652769e-02   7.5662466e-02   4.7500835e-02   6.6267157e-02   6.1219907e-02   5.9246920e-02   1.0235525e-01   8.5584812e-02   6.7627185e-02   6.6676399e-02   8.1028522e-02   6.3874534e-02   7.4037098e-02   8.3735875e-02   7.3091049e-02   6.4875922e-02   5.7134332e-02   7.3898502e-02   6.3669341e-02   6.7483654e-02   6.3032151e-02   4.3195391e-02   6.6465430e-02   1.2757303e-01   1.1294171e-01   1.0654531e-01   1.1074736e-01   1.1756538e-01   1.1705185e-01   1.1633100e-01   1.1230305e-01   1.1988948e-01   1.0404710e-01   8.7981667e-02   1.0622547e-01   1.0061669e-01   1.2008497e-01   1.2242153e-01   1.0217012e-01   1.0084187e-01   1.0181343e-01   1.3714147e-01   1.1243585e-01   1.0356517e-01   1.1071692e-01   1.2181923e-01   9.3742899e-02   1.0137566e-01   9.8085445e-02   8.9840814e-02   8.9979544e-02   1.1682155e-01   9.4340727e-02   1.0893096e-01   8.8036209e-02   1.1887723e-01   9.1995894e-02   1.1718099e-01   1.0529554e-01   1.1115622e-01   1.0048991e-01   8.8823715e-02   9.3647258e-02   1.0909883e-01   8.9729548e-02   1.1294171e-01   1.1121254e-01   1.0947844e-01   9.8164553e-02   1.0458423e-01   9.5468337e-02   1.0529433e-01   1.0077315e-01   1.0959804e-05   1.5860612e-03   1.2066237e-03   9.8801305e-04   9.8752232e-04   6.0992006e-03   2.3026455e-03   4.3295194e-03   6.8464966e-03   1.1467011e-03   3.5017117e-03   1.7326793e-03   1.1803657e-03   5.4725577e-04   7.4912594e-02   7.8462634e-02   8.6080465e-02   9.7055695e-02   8.9913940e-02   9.8246196e-02   8.6359614e-02   7.0875411e-02   8.3096610e-02   8.9373603e-02   9.1095332e-02   8.1132274e-02   8.7784959e-02   9.6471287e-02   6.3584445e-02   7.1727351e-02   9.8741504e-02   7.9297358e-02   1.1001947e-01   8.1763635e-02   1.0392038e-01   7.2462318e-02   1.1283140e-01   9.6493172e-02   7.5904241e-02   7.5362083e-02   9.0691159e-02   9.7798442e-02   9.2550220e-02   6.1191529e-02   8.2519289e-02   7.7118501e-02   7.4418954e-02   1.2241546e-01   1.0373213e-01   8.3271349e-02   8.2617382e-02   9.8302252e-02   7.9806174e-02   9.0742202e-02   1.0274136e-01   9.0294649e-02   8.0841362e-02   7.2046648e-02   9.1054206e-02   8.0166072e-02   8.3952641e-02   7.8850217e-02   5.4962225e-02   8.2583735e-02   1.4771497e-01   1.3277361e-01   1.2596285e-01   1.3150244e-01   1.3764710e-01   1.3814813e-01   1.3643324e-01   1.3364709e-01   1.4127174e-01   1.2228442e-01   1.0501430e-01   1.2555100e-01   1.1896947e-01   1.3983185e-01   1.4080838e-01   1.1967635e-01   1.2050783e-01   1.2165153e-01   1.5932394e-01   1.3324590e-01   1.2180922e-01   1.2960297e-01   1.4356572e-01   1.1163860e-01   1.2028439e-01   1.1797002e-01   1.0728569e-01   1.0776505e-01   1.3685139e-01   1.1414077e-01   1.2924282e-01   1.0675126e-01   1.3867943e-01   1.1135088e-01   1.3991357e-01   1.2389778e-01   1.2963231e-01   1.2019755e-01   1.0634263e-01   1.1117491e-01   1.2727853e-01   1.0546335e-01   1.3277361e-01   1.3050496e-01   1.2753116e-01   1.1493738e-01   1.2310368e-01   1.1333277e-01   1.2330887e-01   1.1999903e-01   1.6773969e-03   1.4044930e-03   1.1476188e-03   1.1728210e-03   6.0850239e-03   2.5611449e-03   4.7720148e-03   7.3487783e-03   1.2981958e-03   3.8044610e-03   1.9624179e-03   1.3573639e-03   6.7050163e-04   7.5875383e-02   7.9591742e-02   8.7130965e-02   9.8136915e-02   9.0968214e-02   9.9474916e-02   8.7612410e-02   7.1886206e-02   8.4072967e-02   9.0657173e-02   9.2037661e-02   8.2322796e-02   8.8559519e-02   9.7661149e-02   6.4636714e-02   7.2692172e-02   1.0010765e-01   8.0266168e-02   1.1103798e-01   8.2745924e-02   1.0537406e-01   7.3430328e-02   1.1396572e-01   9.7599809e-02   7.6869874e-02   7.6340270e-02   9.1668858e-02   9.8974404e-02   9.3760611e-02   6.2005453e-02   8.3489209e-02   7.8020463e-02   7.5407355e-02   1.2375637e-01   1.0517097e-01   8.4594299e-02   8.3682974e-02   9.9214366e-02   8.1008204e-02   9.1862911e-02   1.0394615e-01   9.1478420e-02   8.1837398e-02   7.2994499e-02   9.2227696e-02   8.1322109e-02   8.5126430e-02   7.9879628e-02   5.5860810e-02   8.3714500e-02   1.4946173e-01   1.3427629e-01   1.2730802e-01   1.3293539e-01   1.3918009e-01   1.3947497e-01   1.3805161e-01   1.3491280e-01   1.4255824e-01   1.2381647e-01   1.0639120e-01   1.2689399e-01   1.2032986e-01   1.4134878e-01   1.4247553e-01   1.2120787e-01   1.2187456e-01   1.2309328e-01   1.6066767e-01   1.3444738e-01   1.2325830e-01   1.3118369e-01   1.4483072e-01   1.1290137e-01   1.2175315e-01   1.1925251e-01   1.0857610e-01   1.0914142e-01   1.3832403e-01   1.1530308e-01   1.3045824e-01   1.0804612e-01   1.4018015e-01   1.1257905e-01   1.4124338e-01   1.2516443e-01   1.3130183e-01   1.2160995e-01   1.0773181e-01   1.1250108e-01   1.2878318e-01   1.0678720e-01   1.3427629e-01   1.3201801e-01   1.2910620e-01   1.1632723e-01   1.2438544e-01   1.1469977e-01   1.2494953e-01   1.2148287e-01   8.4337656e-04   4.6746407e-04   2.4549978e-03   4.7529836e-03   2.3235808e-03   4.0683267e-03   4.3260986e-03   6.7336618e-04   2.8454658e-03   1.0918918e-03   1.3756658e-03   5.7784546e-04   5.9573290e-02   6.3070670e-02   6.9597309e-02   7.9911457e-02   7.3480528e-02   7.9923883e-02   7.0144874e-02   5.5923876e-02   6.6635620e-02   7.3192589e-02   7.4096565e-02   6.5836734e-02   7.1022277e-02   7.8555696e-02   5.0423423e-02   5.7089619e-02   8.1093473e-02   6.2483167e-02   9.2251714e-02   6.5399221e-02   8.6573432e-02   5.7873871e-02   9.3861710e-02   7.7914479e-02   6.0545459e-02   6.0328179e-02   7.3725736e-02   8.0652769e-02   7.5662466e-02   4.7500835e-02   6.6267157e-02   6.1219907e-02   5.9246920e-02   1.0235525e-01   8.5584812e-02   6.7627185e-02   6.6676399e-02   8.1028522e-02   6.3874534e-02   7.4037098e-02   8.3735875e-02   7.3091049e-02   6.4875922e-02   5.7134332e-02   7.3898502e-02   6.3669341e-02   6.7483654e-02   6.3032151e-02   4.3195391e-02   6.6465430e-02   1.2757303e-01   1.1294171e-01   1.0654531e-01   1.1074736e-01   1.1756538e-01   1.1705185e-01   1.1633100e-01   1.1230305e-01   1.1988948e-01   1.0404710e-01   8.7981667e-02   1.0622547e-01   1.0061669e-01   1.2008497e-01   1.2242153e-01   1.0217012e-01   1.0084187e-01   1.0181343e-01   1.3714147e-01   1.1243585e-01   1.0356517e-01   1.1071692e-01   1.2181923e-01   9.3742899e-02   1.0137566e-01   9.8085445e-02   8.9840814e-02   8.9979544e-02   1.1682155e-01   9.4340727e-02   1.0893096e-01   8.8036209e-02   1.1887723e-01   9.1995894e-02   1.1718099e-01   1.0529554e-01   1.1115622e-01   1.0048991e-01   8.8823715e-02   9.3647258e-02   1.0909883e-01   8.9729548e-02   1.1294171e-01   1.1121254e-01   1.0947844e-01   9.8164553e-02   1.0458423e-01   9.5468337e-02   1.0529433e-01   1.0077315e-01   6.2742331e-05   5.7500583e-04   7.7277880e-03   4.4752900e-04   1.9151463e-03   2.3881652e-03   8.6221368e-04   8.6997251e-04   5.7712764e-05   1.4261239e-04   1.6337476e-04   6.5357511e-02   6.7564930e-02   7.5599895e-02   8.6482524e-02   7.9693502e-02   8.5392044e-02   7.4152863e-02   6.0880360e-02   7.3094884e-02   7.7108408e-02   8.1483729e-02   6.9905750e-02   7.9537736e-02   8.4220614e-02   5.4020845e-02   6.2478782e-02   8.5095725e-02   6.8776984e-02   1.0023818e-01   7.1693803e-02   8.9974847e-02   6.3277271e-02   1.0126704e-01   8.4456284e-02   6.6380508e-02   6.5944304e-02   8.0776371e-02   8.6401760e-02   8.0678654e-02   5.3232214e-02   7.2705055e-02   6.7807498e-02   6.4728976e-02   1.0860574e-01   8.9250516e-02   7.0532132e-02   7.2192370e-02   8.9155393e-02   6.7825786e-02   7.9751674e-02   8.9848634e-02   7.8255825e-02   7.0908403e-02   6.2757363e-02   7.9213209e-02   6.8195297e-02   7.2146158e-02   6.8587288e-02   4.7220467e-02   7.1390990e-02   1.3114639e-01   1.1816523e-01   1.1284157e-01   1.1675611e-01   1.2280854e-01   1.2450964e-01   1.2061835e-01   1.2011904e-01   1.2793055e-01   1.0801409e-01   9.2203467e-02   1.1250005e-01   1.0614185e-01   1.2553294e-01   1.2604996e-01   1.0581394e-01   1.0665851e-01   1.0697400e-01   1.4569576e-01   1.2071369e-01   1.0835453e-01   1.1475367e-01   1.3023667e-01   9.9676180e-02   1.0601570e-01   1.0459446e-01   9.5152798e-02   9.4544535e-02   1.2261107e-01   1.0171679e-01   1.1677938e-01   9.3513090e-02   1.2443770e-01   9.8519974e-02   1.2493623e-01   1.1202254e-01   1.1414514e-01   1.0583616e-01   9.3110547e-02   9.8863035e-02   1.1361961e-01   9.4163495e-02   1.1816523e-01   1.1608967e-01   1.1325987e-01   1.0277556e-01   1.1111172e-01   1.0049112e-01   1.0810161e-01   1.0529258e-01   8.3201047e-04   6.6553558e-03   8.0817319e-04   2.3666253e-03   2.9401972e-03   6.0430641e-04   1.3109323e-03   2.0042209e-04   2.9042771e-04   6.4823857e-05   6.4369752e-02   6.6980839e-02   7.4622998e-02   8.5371818e-02   7.8644884e-02   8.4714120e-02   7.3778054e-02   6.0124143e-02   7.1976215e-02   7.6757894e-02   8.0112003e-02   6.9445381e-02   7.7800626e-02   8.3451231e-02   5.3558729e-02   6.1563285e-02   8.4824350e-02   6.7739660e-02   9.8727492e-02   7.0619990e-02   8.9865595e-02   6.2353086e-02   1.0002589e-01   8.3464224e-02   6.5377675e-02   6.4985443e-02   7.9506921e-02   8.5546781e-02   8.0035925e-02   5.2147031e-02   7.1577598e-02   6.6610625e-02   6.3822994e-02   1.0780225e-01   8.9119904e-02   7.0461434e-02   7.1328305e-02   8.7570443e-02   6.7451743e-02   7.8878318e-02   8.9018945e-02   7.7592264e-02   6.9886540e-02   6.1789581e-02   7.8498655e-02   6.7684600e-02   7.1587759e-02   6.7704325e-02   4.6526712e-02   7.0724596e-02   1.3117528e-01   1.1766016e-01   1.1197322e-01   1.1607657e-01   1.2231416e-01   1.2340084e-01   1.2042522e-01   1.1891967e-01   1.2666041e-01   1.0778594e-01   9.1812847e-02   1.1163169e-01   1.0543690e-01   1.2494830e-01   1.2593147e-01   1.0563286e-01   1.0596141e-01   1.0649455e-01   1.4431904e-01   1.1933022e-01   1.0786987e-01   1.1454955e-01   1.2887601e-01   9.8812977e-02   1.0562884e-01   1.0369928e-01   9.4451580e-02   9.4102215e-02   1.2194237e-01   1.0054711e-01   1.1549365e-01   9.2857172e-02   1.2382256e-01   9.7583400e-02   1.2385907e-01   1.1095947e-01   1.1423829e-01   1.0528942e-01   9.2735747e-02   9.8196145e-02   1.1321168e-01   9.3608756e-02   1.1766016e-01   1.1565299e-01   1.1307354e-01   1.0223904e-01   1.1010492e-01   9.9908851e-02   1.0821954e-01   1.0496782e-01   9.9295890e-03   5.3473138e-04   2.1693539e-03   3.7076821e-03   1.8222092e-03   1.2380588e-03   7.0429726e-04   3.2576994e-04   6.7027380e-04   7.5169669e-02   7.7062740e-02   8.6033367e-02   9.7417771e-02   9.0184218e-02   9.6534643e-02   8.3912481e-02   7.0270670e-02   8.3626528e-02   8.6844061e-02   9.2545497e-02   7.9257265e-02   9.0777176e-02   9.5235076e-02   6.2208659e-02   7.1858472e-02   9.5535449e-02   7.9390740e-02   1.1189093e-01   8.2130752e-02   1.0013922e-01   7.2643917e-02   1.1330079e-01   9.5998078e-02   7.6221141e-02   7.5580594e-02   9.1730689e-02   9.7114882e-02   9.1048046e-02   6.2224749e-02   8.3137120e-02   7.8094271e-02   7.4382594e-02   1.2083561e-01   9.9831872e-02   7.9711043e-02   8.2237066e-02   1.0057287e-01   7.7408745e-02   9.0227459e-02   1.0148848e-01   8.8790024e-02   8.1095637e-02   7.2322440e-02   8.9773416e-02   7.8184960e-02   8.2186791e-02   7.8567440e-02   5.4863235e-02   8.1347337e-02   1.4275245e-01   1.3005259e-01   1.2482271e-01   1.2925722e-01   1.3482920e-01   1.3759096e-01   1.3236924e-01   1.3338627e-01   1.4130888e-01   1.1880967e-01   1.0247320e-01   1.2443347e-01   1.1741517e-01   1.3747488e-01   1.3688510e-01   1.1618864e-01   1.1858835e-01   1.1879679e-01   1.5963135e-01   1.3387511e-01   1.1938532e-01   1.2588037e-01   1.4388488e-01   1.1083228e-01   1.1728514e-01   1.1680010e-01   1.0591970e-01   1.0525056e-01   1.3476053e-01   1.1410719e-01   1.2959057e-01   1.0487194e-01   1.3643100e-01   1.1046993e-01   1.3880755e-01   1.2375874e-01   1.2479172e-01   1.1764923e-01   1.0361548e-01   1.0965651e-01   1.2456830e-01   1.0392711e-01   1.3005259e-01   1.2763609e-01   1.2394348e-01   1.1308481e-01   1.2275352e-01   1.1138648e-01   1.1846972e-01   1.1666230e-01   1.1839370e-02   9.5901133e-03   1.3740734e-02   3.5338001e-03   1.3550011e-02   8.8526707e-03   9.4699409e-03   6.3350154e-03   4.8467987e-02   5.3749987e-02   5.7717889e-02   6.5676566e-02   6.0050880e-02   7.0693363e-02   6.1877604e-02   4.6729706e-02   5.4665912e-02   6.4242849e-02   5.9590174e-02   5.6493218e-02   5.5132102e-02   6.8254515e-02   4.1974046e-02   4.5979775e-02   7.3375693e-02   5.2912711e-02   7.3889063e-02   5.3879214e-02   7.8254066e-02   4.6403740e-02   7.8645675e-02   6.7578949e-02   4.9098308e-02   4.8671019e-02   5.9827034e-02   6.7861186e-02   6.5136324e-02   3.6759287e-02   5.3980965e-02   4.9365653e-02   4.8462917e-02   9.0010105e-02   7.8830145e-02   6.1496889e-02   5.5380536e-02   6.4107134e-02   5.6871111e-02   6.2034296e-02   7.3759034e-02   6.3674900e-02   5.3119604e-02   4.6143136e-02   6.3811294e-02   5.6759011e-02   5.9030859e-02   5.2419966e-02   3.3258744e-02   5.6880106e-02   1.1655832e-01   1.0005043e-01   9.1684275e-02   9.8727002e-02   1.0425490e-01   1.0138126e-01   1.0565129e-01   9.7538138e-02   1.0314095e-01   9.2386824e-02   7.6571607e-02   9.1274575e-02   8.6336607e-02   1.0505203e-01   1.0829773e-01   9.0077109e-02   8.8858206e-02   9.1549427e-02   1.1781623e-01   9.5530481e-02   9.0068051e-02   9.8963246e-02   1.0479240e-01   7.9118056e-02   9.0207341e-02   8.5766485e-02   7.6442113e-02   7.8991975e-02   1.0229780e-01   8.0971468e-02   9.2462279e-02   7.7616682e-02   1.0394880e-01   7.9854175e-02   1.0493060e-01   8.8086863e-02   1.0105189e-01   8.9771099e-02   7.8157448e-02   7.9782471e-02   9.4953430e-02   7.4768636e-02   1.0005043e-01   9.8253215e-02   9.6744777e-02   8.3113340e-02   8.7744069e-02   8.2353939e-02   9.5830913e-02   9.0799350e-02   2.1341759e-03   1.9110407e-03   2.4747400e-03   1.4759127e-04   2.6111423e-04   2.1389787e-04   9.9338048e-04   7.1511570e-02   7.2884660e-02   8.1954557e-02   9.3478761e-02   8.6419800e-02   9.0995738e-02   7.9065079e-02   6.6366318e-02   7.9643396e-02   8.2112775e-02   8.8849792e-02   7.5066735e-02   8.7600830e-02   9.0111864e-02   5.8883625e-02   6.8498056e-02   8.9863635e-02   7.4803608e-02   1.0853136e-01   7.8097142e-02   9.4627165e-02   6.9370599e-02   1.0871906e-01   9.0676026e-02   7.2617660e-02   7.2144076e-02   8.7900274e-02   9.2810262e-02   8.6387249e-02   5.9335633e-02   7.9309675e-02   7.4397587e-02   7.0710353e-02   1.1504320e-01   9.3692385e-02   7.4629165e-02   7.8263498e-02   9.7248749e-02   7.2487054e-02   8.6011897e-02   9.5823155e-02   8.3806772e-02   7.7264691e-02   6.8838121e-02   8.4948991e-02   7.3047820e-02   7.7341294e-02   7.4548923e-02   5.2558496e-02   7.6909140e-02   1.3627575e-01   1.2430643e-01   1.1978148e-01   1.2301688e-01   1.2902659e-01   1.3200226e-01   1.2597225e-01   1.2757685e-01   1.3584109e-01   1.1348127e-01   9.7761057e-02   1.1945082e-01   1.1270375e-01   1.3215934e-01   1.3182973e-01   1.1125522e-01   1.1287096e-01   1.1260483e-01   1.5425448e-01   1.2876341e-01   1.1448536e-01   1.2024528e-01   1.3833407e-01   1.0647529e-01   1.1163750e-01   1.1113351e-01   1.0149473e-01   1.0013701e-01   1.2927004e-01   1.0879101e-01   1.2459621e-01   9.9330508e-02   1.3108770e-01   1.0504760e-01   1.3186075e-01   1.1958837e-01   1.1892921e-01   1.1162833e-01   9.8541878e-02   1.0525098e-01   1.1976536e-01   1.0049727e-01   1.2430643e-01   1.2212353e-01   1.1885667e-01   1.0916600e-01   1.1853397e-01   1.0665478e-01   1.1270995e-01   1.1063603e-01   1.5750019e-03   2.3061943e-03   2.5267586e-03   1.8816551e-03   2.4916769e-03   2.6490348e-03   5.6749564e-02   5.7171493e-02   6.5939847e-02   7.5932398e-02   6.9508351e-02   7.4656451e-02   6.2624290e-02   5.2024188e-02   6.4437230e-02   6.4937043e-02   7.2745199e-02   5.8611781e-02   7.2652586e-02   7.3573688e-02   4.4171072e-02   5.3594578e-02   7.2641168e-02   6.1050608e-02   8.9566976e-02   6.3051224e-02   7.6010398e-02   5.4225638e-02   9.0321512e-02   7.5195114e-02   5.7639533e-02   5.6852233e-02   7.1710391e-02   7.4949900e-02   6.9318916e-02   4.6230253e-02   6.3971485e-02   6.0026157e-02   5.5798348e-02   9.5989279e-02   7.6232404e-02   5.8444003e-02   6.2302257e-02   8.0224536e-02   5.7278169e-02   6.9150783e-02   7.9467477e-02   6.7704503e-02   6.1864652e-02   5.4241616e-02   6.8592620e-02   5.8516944e-02   6.1759106e-02   5.9360348e-02   3.8591759e-02   6.1151978e-02   1.1324556e-01   1.0303819e-01   9.9201558e-02   1.0318500e-01   1.0721879e-01   1.1147036e-01   1.0460948e-01   1.0828938e-01   1.1523751e-01   9.2280249e-02   7.8300492e-02   9.8832112e-02   9.2088327e-02   1.0954453e-01   1.0774163e-01   8.9704304e-02   9.3649245e-02   9.3477002e-02   1.3171389e-01   1.0896793e-01   9.3248418e-02   9.8534682e-02   1.1788866e-01   8.6730988e-02   9.1550165e-02   9.2743651e-02   8.2023117e-02   8.1036634e-02   1.0749375e-01   9.1211084e-02   1.0479473e-01   8.1639608e-02   1.0872731e-01   8.7298316e-02   1.1342725e-01   9.8507274e-02   9.7018335e-02   9.2572028e-02   7.9424005e-02   8.5123740e-02   9.7519007e-02   7.9504622e-02   1.0303819e-01   1.0060889e-01   9.6540999e-02   8.7528391e-02   9.7464514e-02   8.6517419e-02   9.1407615e-02   9.1076579e-02   4.2759888e-03   1.3998823e-03   1.8495751e-03   2.8301386e-03   3.7334484e-03   5.5009109e-02   5.4964037e-02   6.3820777e-02   7.4331569e-02   6.8062522e-02   7.0406681e-02   5.9595322e-02   4.9880526e-02   6.2237804e-02   6.2265151e-02   7.1113130e-02   5.6594278e-02   7.1451534e-02   6.9994053e-02   4.3126676e-02   5.2381128e-02   6.8520339e-02   5.7597897e-02   8.9058557e-02   6.0751652e-02   7.2510768e-02   5.3201106e-02   8.7849614e-02   7.0985642e-02   5.6028788e-02   5.5591108e-02   6.9920676e-02   7.2931234e-02   6.6633349e-02   4.5295849e-02   6.2044642e-02   5.8063752e-02   5.4097801e-02   9.1903182e-02   7.1473709e-02   5.5091248e-02   6.0376704e-02   7.9310761e-02   5.3854777e-02   6.7042056e-02   7.4968513e-02   6.4284932e-02   5.9983090e-02   5.2745182e-02   6.5463515e-02   5.4553279e-02   5.8476643e-02   5.7183259e-02   3.8909009e-02   5.8515093e-02   1.0925308e-01   9.9624317e-02   9.6622305e-02   9.8607255e-02   1.0383961e-01   1.0792916e-01   1.0029496e-01   1.0408880e-01   1.1184636e-01   8.9608429e-02   7.6157674e-02   9.6354194e-02   9.0095873e-02   1.0708448e-01   1.0618312e-01   8.7751513e-02   8.9756663e-02   8.8888346e-02   1.2885985e-01   1.0591974e-01   9.1173391e-02   9.5499762e-02   1.1429851e-01   8.5048829e-02   8.8069568e-02   8.8675858e-02   8.0228990e-02   7.8160661e-02   1.0454059e-01   8.7419578e-02   1.0196835e-01   7.7696889e-02   1.0615601e-01   8.3458946e-02   1.0727792e-01   9.7348785e-02   9.3770662e-02   8.8214646e-02   7.6638467e-02   8.3519036e-02   9.5849316e-02   7.9674217e-02   9.9624317e-02   9.7643485e-02   9.4514516e-02   8.7075933e-02   9.6245490e-02   8.4428758e-02   8.8195121e-02   8.6900395e-02   3.3656636e-03   1.2813341e-03   1.5508786e-03   5.5126016e-04   5.7906981e-02   6.0932190e-02   6.7790041e-02   7.7661589e-02   7.1242410e-02   7.8649743e-02   6.7963400e-02   5.4275670e-02   6.5215187e-02   7.0651008e-02   7.2495968e-02   6.3298898e-02   6.9915496e-02   7.7039648e-02   4.7868354e-02   5.5074415e-02   7.9095397e-02   6.1872293e-02   8.9630734e-02   6.4010779e-02   8.3786653e-02   5.5727300e-02   9.1943867e-02   7.7179306e-02   5.8787276e-02   5.8290887e-02   7.2059853e-02   7.8226343e-02   7.3481150e-02   4.5978845e-02   6.4704253e-02   5.9980041e-02   5.7435326e-02   1.0050646e-01   8.3655459e-02   6.5308029e-02   6.4668898e-02   7.9130910e-02   6.2159352e-02   7.1908147e-02   8.2739305e-02   7.1488143e-02   6.3159434e-02   5.5376396e-02   7.2163727e-02   6.2508559e-02   6.5824794e-02   6.1340761e-02   4.0472995e-02   6.4599849e-02   1.2380425e-01   1.0993395e-01   1.0373859e-01   1.0879322e-01   1.1440237e-01   1.1495444e-01   1.1335001e-01   1.1089530e-01   1.1789001e-01   1.0041407e-01   8.4708778e-02   1.0336455e-01   9.7357032e-02   1.1642404e-01   1.1748667e-01   9.8081847e-02   9.8747663e-02   9.9805801e-02   1.3456454e-01   1.1060300e-01   9.9947092e-02   1.0709744e-01   1.2004751e-01   9.0729860e-02   9.8544296e-02   9.6489030e-02   8.6759859e-02   8.7175826e-02   1.1367288e-01   9.3122372e-02   1.0688813e-01   8.6280635e-02   1.1536030e-01   9.0496365e-02   1.1670380e-01   1.0195807e-01   1.0724940e-01   9.8472199e-02   8.5899722e-02   9.0288199e-02   1.0497525e-01   8.5251170e-02   1.0993395e-01   1.0787024e-01   1.0524763e-01   9.3789157e-02   1.0121309e-01   9.2226653e-02   1.0148816e-01   9.8306001e-02   5.0782435e-04   6.2020689e-04   1.6756986e-03   7.0476887e-02   7.1501157e-02   8.0709837e-02   9.2336294e-02   8.5349594e-02   8.8954923e-02   7.7301298e-02   6.5155686e-02   7.8476830e-02   8.0402665e-02   8.7884855e-02   7.3650267e-02   8.6974315e-02   8.8299731e-02   5.7895678e-02   6.7595783e-02   8.7665774e-02   7.3314500e-02   1.0776923e-01   7.6895020e-02   9.2474273e-02   6.8514181e-02   1.0728576e-01   8.8812805e-02   7.1614033e-02   7.1214401e-02   8.6845407e-02   9.1428310e-02   8.4778392e-02   5.8702706e-02   7.8223013e-02   7.3389903e-02   6.9650470e-02   1.1290739e-01   9.1229062e-02   7.2678536e-02   7.7045799e-02   9.6518176e-02   7.0683794e-02   8.4677029e-02   9.3753287e-02   8.2039996e-02   7.6152676e-02   6.7885263e-02   8.3273481e-02   7.1166737e-02   7.5618620e-02   7.3311647e-02   5.2129744e-02   7.5414559e-02   1.3361288e-01   1.2212885e-01   1.1803753e-01   1.2062983e-01   1.2681873e-01   1.3003785e-01   1.2339855e-01   1.2552093e-01   1.3397302e-01   1.1145011e-01   9.6072866e-02   1.1773621e-01   1.1108813e-01   1.3021606e-01   1.2991222e-01   1.0941117e-01   1.1074904e-01   1.1019635e-01   1.5245649e-01   1.2709803e-01   1.1272646e-01   1.1805571e-01   1.3644429e-01   1.0507143e-01   1.0948152e-01   1.0908044e-01   1.0002018e-01   9.8259510e-02   1.2725753e-01   1.0697349e-01   1.2296793e-01   9.7285465e-02   1.2913723e-01   1.0312519e-01   1.2920697e-01   1.1832381e-01   1.1655849e-01   1.0932054e-01   9.6669076e-02   1.0377916e-01   1.1803847e-01   9.9488230e-02   1.2212885e-01   1.2004765e-01   1.1693776e-01   1.0790940e-01   1.1723226e-01   1.0500092e-01   1.1038445e-01   1.0827603e-01   1.5232780e-04   4.0007181e-04   6.5289213e-02   6.7204649e-02   7.5443787e-02   8.6444762e-02   7.9660759e-02   8.4749914e-02   7.3546883e-02   6.0641799e-02   7.3012359e-02   7.6531840e-02   8.1598668e-02   6.9499172e-02   7.9923854e-02   8.3724381e-02   5.3799024e-02   6.2453508e-02   8.4253942e-02   6.8486788e-02   1.0054294e-01   7.1576362e-02   8.9122210e-02   6.3281093e-02   1.0114322e-01   8.3993466e-02   6.6335786e-02   6.5925957e-02   8.0814161e-02   8.6165539e-02   8.0247902e-02   5.3368917e-02   7.2666724e-02   6.7816556e-02   6.4623203e-02   1.0800053e-01   8.8235002e-02   6.9728892e-02   7.2010954e-02   8.9470933e-02   6.7181463e-02   7.9529500e-02   8.9243318e-02   7.7739806e-02   7.0823200e-02   6.2720078e-02   7.8762930e-02   6.7548169e-02   7.1608713e-02   6.8390856e-02   4.7339693e-02   7.1004341e-02   1.3006516e-01   1.1747357e-01   1.1247378e-01   1.1599806e-01   1.2210677e-01   1.2411360e-01   1.1962941e-01   1.1968938e-01   1.2763702e-01   1.0730056e-01   9.1685935e-02   1.1214725e-01   1.0578284e-01   1.2500364e-01   1.2540001e-01   1.0518188e-01   1.0602704e-01   1.0612761e-01   1.4550231e-01   1.2054520e-01   1.0786099e-01   1.1396219e-01   1.2996046e-01   9.9460763e-02   1.0527691e-01   1.0405039e-01   9.4844256e-02   9.3945852e-02   1.2206303e-01   1.0136794e-01   1.1659636e-01   9.2882126e-02   1.2391115e-01   9.8044098e-02   1.2415930e-01   1.1196299e-01   1.1316845e-01   1.0506061e-01   9.2491851e-02   9.8554383e-02   1.1313163e-01   9.4057839e-02   1.1747357e-01   1.1542880e-01   1.1260458e-01   1.0255212e-01   1.1101490e-01   1.0006494e-01   1.0712947e-01   1.0442482e-01   3.2637736e-04   7.1228332e-02   7.3360309e-02   8.1848237e-02   9.3197783e-02   8.6156854e-02   9.1733116e-02   8.0052769e-02   6.6468809e-02   7.9277125e-02   8.3130576e-02   8.8073461e-02   7.5751270e-02   8.6114214e-02   9.0610516e-02   5.9264749e-02   6.8242422e-02   9.1255768e-02   7.4667198e-02   1.0756842e-01   7.7803425e-02   9.6260495e-02   6.9087389e-02   1.0845861e-01   9.0870006e-02   7.2305626e-02   7.1861030e-02   8.7311178e-02   9.3009359e-02   8.6960677e-02   5.8641082e-02   7.8892851e-02   7.3809649e-02   7.0554233e-02   1.1577001e-01   9.5424873e-02   7.6110400e-02   7.8288785e-02   9.6097634e-02   7.3451146e-02   8.6123272e-02   9.6377446e-02   8.4403314e-02   7.7003085e-02   6.8529959e-02   8.5437768e-02   7.3849362e-02   7.8032414e-02   7.4531055e-02   5.2299301e-02   7.7339214e-02   1.3853845e-01   1.2553252e-01   1.2026484e-01   1.2407451e-01   1.3030382e-01   1.3228892e-01   1.2783055e-01   1.2774776e-01   1.3586522e-01   1.1498861e-01   9.8800101e-02   1.1991948e-01   1.1333278e-01   1.3320266e-01   1.3352807e-01   1.1273476e-01   1.1373642e-01   1.1391093e-01   1.5417322e-01   1.2849633e-01   1.1550662e-01   1.2189074e-01   1.3824515e-01   1.0674666e-01   1.1296262e-01   1.1166908e-01   1.0200786e-01   1.0119861e-01   1.3020916e-01   1.0880524e-01   1.2443747e-01   1.0015009e-01   1.3208523e-01   1.0543261e-01   1.3248948e-01   1.1957063e-01   1.2107326e-01   1.1278773e-01   9.9690412e-02   1.0583253e-01   1.2090813e-01   1.0100447e-01   1.2553252e-01   1.2339293e-01   1.2039941e-01   1.0985773e-01   1.1861026e-01   1.0744824e-01   1.1483872e-01   1.1213527e-01   6.6878313e-02   6.9715409e-02   7.7364528e-02   8.8171063e-02   8.1336125e-02   8.7984980e-02   7.6788970e-02   6.2680317e-02   7.4638540e-02   7.9773718e-02   8.2744330e-02   7.2225777e-02   8.0191157e-02   8.6590874e-02   5.5913229e-02   6.3969698e-02   8.8177048e-02   7.0519412e-02   1.0143390e-01   7.3287383e-02   9.3242485e-02   6.4744474e-02   1.0311960e-01   8.6619094e-02   6.7881619e-02   6.7447267e-02   8.2187438e-02   8.8483348e-02   8.3036483e-02   5.4275541e-02   7.4193034e-02   6.9119612e-02   6.6341718e-02   1.1134910e-01   9.2648103e-02   7.3522039e-02   7.4021876e-02   9.0141442e-02   7.0408618e-02   8.1718494e-02   9.2345175e-02   8.0646828e-02   7.2501162e-02   6.4223536e-02   8.1515678e-02   7.0682605e-02   7.4552513e-02   7.0364536e-02   4.8478235e-02   7.3560525e-02   1.3517901e-01   1.2131760e-01   1.1535330e-01   1.1982809e-01   1.2602646e-01   1.2698846e-01   1.2430464e-01   1.2251062e-01   1.3021845e-01   1.1127258e-01   9.4973617e-02   1.1499323e-01   1.0869119e-01   1.2854331e-01   1.2950169e-01   1.0899747e-01   1.0948608e-01   1.1017110e-01   1.4797664e-01   1.2271397e-01   1.1121974e-01   1.1817834e-01   1.3245873e-01   1.0189203e-01   1.0916690e-01   1.0716280e-01   9.7527876e-02   9.7386912e-02   1.2555051e-01   1.0384747e-01   1.1883003e-01   9.6216108e-02   1.2741273e-01   1.0091958e-01   1.2779606e-01   1.1407020e-01   1.1794445e-01   1.0890370e-01   9.6003260e-02   1.0130628e-01   1.1658801e-01   9.6417670e-02   1.2131760e-01   1.1923852e-01   1.1654354e-01   1.0526503e-01   1.1322934e-01   1.0313209e-01   1.1184758e-01   1.0860395e-01   7.4548764e-04   4.1909104e-04   1.5729317e-03   7.9277531e-04   2.5985333e-03   2.1157871e-03   2.6363318e-04   2.7214324e-04   2.5006701e-03   1.1999234e-03   1.3641574e-03   2.4228657e-03   1.9193080e-03   1.5580763e-03   9.1547441e-05   4.2498838e-03   5.1587623e-04   4.4451535e-03   1.9710136e-04   5.9468529e-03   1.1637586e-04   4.0879090e-03   1.9577278e-03   7.5438506e-06   5.1321994e-05   9.5746588e-04   1.8362275e-03   1.6353958e-03   8.5567943e-04   2.3534169e-04   2.0155706e-04   2.8744085e-05   6.6464816e-03   6.0500135e-03   3.7609984e-03   3.0183871e-04   2.6908058e-03   1.8208811e-03   9.2994693e-04   3.0287331e-03   1.4489077e-03   1.1766146e-04   3.4058119e-05   1.3255619e-03   1.5104843e-03   1.2375803e-03   1.2042792e-04   2.2770079e-03   7.0925866e-04   1.7863102e-02   1.0250835e-02   7.3485693e-03   9.3316539e-03   1.1683662e-02   1.0169272e-02   1.2909901e-02   9.0217168e-03   1.1005819e-02   9.1383359e-03   4.6331293e-03   7.2658380e-03   6.2625155e-03   1.2163934e-02   1.5604510e-02   9.0849374e-03   6.4499430e-03   7.6430735e-03   1.6734199e-02   8.8633570e-03   7.8095179e-03   1.1083442e-02   1.1720144e-02   4.3192019e-03   7.6217573e-03   5.4833250e-03   3.8602370e-03   4.7396014e-03   1.0813609e-02   4.4772013e-03   7.7667524e-03   3.8237256e-03   1.1654961e-02   4.0471444e-03   1.1640132e-02   6.9842505e-03   1.3199398e-02   6.9808241e-03   4.8195688e-03   4.8204301e-03   9.7963275e-03   5.3012133e-03   1.0250835e-02   1.0025463e-02   1.1016974e-02   6.8718627e-03   6.8391566e-03   5.4173007e-03   1.1780352e-02   7.9156890e-03   7.3587704e-04   1.9839586e-03   1.2219042e-03   1.5405721e-03   4.1726993e-04   3.7297590e-04   1.1835574e-03   6.1737386e-04   2.7177989e-03   1.1395438e-04   5.3634867e-03   1.2095802e-03   9.5552631e-04   7.0211590e-04   1.8297765e-03   1.3098829e-03   5.8522900e-03   1.0011765e-03   2.8317516e-03   7.2859483e-04   4.4710316e-03   2.0244176e-03   7.6733040e-04   6.7685529e-04   2.1301657e-03   1.3518842e-03   6.1205846e-04   2.4644310e-03   1.1938153e-03   1.5975309e-03   5.1076446e-04   5.2791382e-03   3.0339660e-03   1.1907842e-03   3.5011674e-04   4.7257393e-03   3.5465173e-04   7.3647426e-04   2.3478030e-03   5.8214999e-04   7.6861523e-04   8.1449121e-04   5.9893306e-04   4.9750178e-04   2.3193980e-04   3.6882491e-04   2.8017975e-03   9.9802686e-05   1.3102890e-02   7.5969761e-03   6.0828162e-03   7.3064415e-03   8.8657957e-03   9.3996859e-03   9.1529212e-03   8.6958624e-03   1.0707084e-02   5.8653516e-03   2.3848099e-03   6.0110419e-03   4.6435179e-03   9.5841132e-03   1.1495876e-02   5.7351815e-03   4.7762002e-03   5.2279685e-03   1.6343054e-02   9.1684398e-03   5.3835136e-03   7.5338144e-03   1.1677909e-02   3.4411805e-03   4.9237859e-03   4.5530879e-03   2.5678146e-03   2.5808970e-03   8.5897045e-03   4.5950787e-03   7.8389611e-03   2.4182455e-03   9.2053995e-03   3.4479875e-03   1.0780684e-02   6.4366206e-03   8.7029459e-03   4.8244677e-03   2.4820766e-03   3.2994674e-03   6.9725103e-03   3.6004536e-03   7.5969761e-03   7.2055876e-03   7.4680636e-03   4.8244418e-03   6.1219436e-03   3.5524443e-03   7.3785563e-03   5.0327851e-03   4.5958248e-04   1.4323573e-04   1.2376608e-03   1.4854110e-03   8.9326822e-04   1.4516004e-04   1.6538068e-03   6.5338340e-04   1.1299287e-03   2.4074626e-03   6.9551596e-04   2.6949476e-03   7.2730987e-04   2.7608296e-03   6.5430290e-04   2.7448595e-03   1.4433165e-04   4.0981488e-03   7.0217976e-04   2.0017194e-03   8.4737221e-04   3.5875154e-04   4.2590326e-04   3.7194881e-04   5.5222558e-04   6.3134375e-04   2.4465093e-03   1.5551077e-04   5.7141821e-04   4.4617793e-04   3.7751002e-03   4.2307180e-03   3.3297057e-03   8.4238856e-05   1.8060244e-03   1.6735237e-03   1.3470834e-04   1.4289074e-03   6.1420964e-04   1.0488316e-04   6.6710002e-04   4.5037482e-04   1.3817339e-03   8.2351922e-04   1.8947713e-04   4.2527867e-03   4.2014447e-04   1.3415184e-02   6.6868372e-03   4.2910287e-03   5.8862692e-03   7.8406972e-03   6.4938295e-03   9.0912854e-03   5.6561218e-03   7.2322567e-03   6.1641630e-03   2.7540356e-03   4.2344365e-03   3.5847503e-03   8.2354910e-03   1.1610160e-02   6.2859853e-03   3.6577005e-03   4.7344286e-03   1.2033367e-02   5.6148647e-03   4.9101139e-03   7.6703569e-03   7.8664866e-03   2.1500523e-03   4.7726337e-03   2.9188064e-03   1.9107921e-03   2.6804057e-03   7.0603390e-03   2.2776004e-03   4.6992435e-03   1.8838392e-03   7.7943774e-03   1.9124732e-03   7.9102721e-03   4.1636243e-03   9.7823337e-03   4.1721395e-03   2.8414673e-03   2.6224860e-03   6.5787438e-03   3.5255969e-03   6.6868372e-03   6.5865547e-03   7.7526002e-03   4.4665713e-03   4.0404299e-03   3.0508638e-03   8.7371106e-03   5.0758684e-03   1.4741381e-04   1.6125952e-03   2.5451963e-03   2.5693849e-03   7.6673984e-04   2.4419486e-03   4.9090126e-04   2.2351893e-03   2.2914219e-03   9.4806103e-04   4.8625587e-03   2.0262116e-03   3.3701508e-03   1.9166326e-03   1.0683081e-03   9.0452408e-04   4.3648468e-03   1.8983778e-03   7.0324108e-04   1.1499379e-03   1.4013722e-03   1.4463883e-03   3.0992383e-04   2.7889447e-04   9.9370768e-04   4.4215550e-03   7.4609763e-04   1.5322654e-03   1.6670592e-03   2.5458750e-03   4.8164855e-03   4.9491294e-03   7.9622502e-04   9.3705610e-04   3.2918730e-03   3.3244867e-04   1.4917733e-03   1.2997427e-03   8.4964648e-04   1.9833350e-03   9.7663737e-04   3.0207145e-03   1.9767871e-03   1.2186915e-03   6.6584952e-03   1.4294810e-03   1.1447125e-02   4.9138585e-03   2.4483433e-03   4.3479747e-03   5.8020082e-03   4.0665925e-03   7.5951000e-03   3.6015682e-03   4.5184530e-03   5.0362911e-03   2.3873447e-03   2.3916463e-03   2.1166084e-03   5.8005881e-03   9.3326086e-03   5.1921662e-03   2.5583136e-03   3.9040792e-03   8.1942534e-03   3.2098756e-03   3.4610228e-03   6.2351763e-03   5.0378736e-03   9.3974884e-04   3.8135545e-03   1.8905878e-03   1.0935023e-03   2.2739982e-03   4.8352649e-03   1.2660181e-03   2.5068904e-03   1.6511455e-03   5.4229770e-03   1.1989559e-03   6.1054655e-03   2.0081796e-03   8.6788304e-03   3.3159020e-03   2.5546078e-03   1.5534900e-03   4.7975700e-03   2.5264412e-03   4.9138585e-03   4.8875866e-03   6.2264786e-03   3.0375207e-03   1.9750388e-03   2.0217929e-03   8.0063599e-03   4.3571190e-03   1.6611913e-03   2.0167984e-03   1.5438876e-03   3.6494229e-04   2.0217253e-03   4.6462511e-04   1.5312613e-03   2.1707116e-03   9.6955753e-04   3.3920004e-03   1.0848877e-03   3.2679078e-03   1.3217642e-03   1.7681092e-03   4.3634818e-04   4.3762590e-03   9.8982281e-04   1.4702047e-03   1.2309511e-03   6.6753502e-04   6.7519636e-04   2.4877587e-04   3.8105160e-04   8.2183923e-04   3.0399429e-03   3.2267433e-04   8.9534104e-04   8.4272052e-04   3.5139014e-03   4.8234985e-03   4.1432495e-03   3.0463297e-04   1.2193814e-03   2.4923401e-03   1.7011388e-04   1.7584273e-03   1.0444437e-03   3.3026408e-04   1.0723664e-03   7.7198092e-04   2.2859213e-03   1.4276818e-03   5.7687029e-04   4.8466907e-03   8.6936394e-04   1.2850654e-02   6.1088154e-03   3.5569698e-03   5.5719646e-03   7.1488198e-03   5.6571014e-03   8.7634622e-03   5.0674178e-03   6.2538450e-03   5.7468537e-03   2.5694606e-03   3.4855366e-03   2.9211508e-03   7.2454781e-03   1.0560745e-02   5.7784909e-03   3.4230741e-03   4.7152707e-03   1.0513823e-02   4.7114505e-03   4.2697686e-03   7.1803873e-03   6.8688743e-03   1.5447042e-03   4.5401495e-03   2.7361382e-03   1.4855517e-03   2.5857007e-03   6.2270622e-03   2.0576267e-03   3.8519560e-03   2.0130817e-03   6.8461641e-03   1.8250891e-03   7.7109246e-03   3.0910476e-03   9.4645289e-03   4.1075164e-03   2.7837137e-03   2.0667492e-03   5.7442304e-03   2.7416306e-03   6.1088154e-03   5.9744542e-03   7.0784056e-03   3.5969994e-03   3.0144395e-03   2.5834027e-03   8.5675229e-03   5.0446428e-03   9.3410747e-04   2.6108336e-03   1.8631164e-03   1.0514258e-03   2.7757095e-03   1.6027319e-03   5.9009151e-03   9.3507643e-05   4.8585250e-03   3.2279691e-03   7.0814372e-04   1.8064210e-03   4.7021523e-03   1.7906187e-03   1.7438865e-03   3.2726931e-03   2.1092470e-03   4.4199215e-04   2.5742583e-03   2.7576288e-03   2.1865740e-03   8.5954487e-04   4.3875130e-04   6.2385517e-03   2.0706463e-03   2.9895922e-03   2.4900150e-03   1.5452115e-03   1.2972442e-03   2.2089282e-03   1.3825902e-03   4.4047937e-03   1.3378707e-03   8.5528525e-04   1.4287812e-04   2.3200710e-04   1.9018574e-03   3.1193134e-03   2.7835858e-04   1.0440284e-03   6.7774868e-04   1.6434489e-03   8.2787646e-03   9.1805293e-04   8.2830461e-03   3.6334874e-03   2.7936555e-03   2.6701226e-03   4.5417785e-03   4.4199379e-03   4.7638022e-03   3.6853341e-03   5.4544340e-03   3.4799734e-03   1.6014887e-03   2.8117239e-03   2.4093914e-03   5.5035080e-03   8.3987820e-03   4.0331795e-03   1.3946498e-03   1.6013776e-03   9.9231424e-03   4.6841468e-03   3.0824955e-03   4.3724199e-03   6.0877536e-03   1.8755546e-03   2.0838499e-03   1.1387331e-03   1.4636530e-03   1.0937142e-03   4.3877001e-03   1.4753015e-03   3.8552640e-03   2.5868499e-04   5.1223304e-03   7.0168484e-04   4.3920187e-03   3.9679568e-03   5.8082286e-03   1.3720301e-03   1.2437314e-03   1.9911684e-03   4.5361159e-03   3.9571028e-03   3.6334874e-03   3.7423473e-03   5.0666856e-03   3.9975266e-03   3.7265040e-03   1.8650355e-03   5.0595778e-03   1.9211780e-03   1.4802848e-03   2.3288314e-03   6.8065434e-05   4.0423471e-03   2.2193959e-04   7.6466779e-03   9.2054349e-04   2.1021154e-03   2.1770952e-03   5.4412625e-04   2.3412508e-03   6.7735470e-03   2.1146424e-03   1.1473823e-03   2.2087962e-03   4.4699141e-03   2.0616206e-03   2.1327263e-03   2.0380999e-03   3.2539726e-03   1.3598045e-03   3.9670027e-04   4.8634117e-03   2.4197901e-03   3.2204932e-03   1.7622064e-03   3.8856461e-03   1.2334789e-03   4.0452577e-04   1.0887743e-03   6.2435560e-03   2.0292084e-04   1.0829901e-03   1.7786841e-03   4.1228310e-04   1.8859956e-03   2.3286589e-03   5.1772577e-04   4.9172870e-04   2.0007065e-04   1.2918676e-03   5.0330599e-03   3.9898095e-04   9.4287570e-03   5.3866372e-03   4.8647393e-03   5.2819054e-03   6.4598280e-03   8.0073865e-03   6.1852254e-03   7.5566712e-03   9.5128884e-03   3.7267827e-03   1.2843714e-03   4.8237356e-03   3.5085400e-03   7.3800011e-03   8.6672418e-03   3.7373665e-03   3.3006522e-03   3.2553459e-03   1.4768796e-02   8.5372346e-03   3.7597131e-03   5.0208833e-03   1.0540608e-02   2.9216135e-03   2.9987594e-03   3.5026889e-03   1.9346800e-03   1.3415748e-03   6.5619943e-03   4.2356898e-03   7.2096387e-03   1.4370251e-03   7.0771420e-03   2.7742326e-03   8.9575949e-03   5.8574207e-03   5.7119619e-03   3.0499081e-03   1.2067939e-03   2.4757916e-03   5.0772246e-03   3.1235792e-03   5.3866372e-03   5.0347068e-03   5.1609892e-03   3.8212989e-03   5.4644467e-03   2.4256658e-03   4.6018293e-03   2.9278326e-03   8.9754714e-04   1.9308173e-03   2.4780225e-03   8.6351250e-04   4.2337045e-03   2.1236680e-03   7.2381764e-04   2.1294516e-04   3.5897400e-03   7.7335429e-04   6.4715989e-03   7.0701488e-04   5.1814848e-03   2.9010443e-04   5.5409554e-03   2.4566735e-03   3.3429771e-04   3.2970103e-04   2.0470962e-03   2.3835444e-03   1.6383998e-03   1.0044594e-03   8.9092263e-04   8.3257442e-04   1.5048347e-04   7.3947599e-03   5.1765389e-03   2.4819362e-03   5.2929628e-04   4.5409213e-03   9.8467896e-04   1.3414871e-03   3.3640577e-03   1.3544701e-03   5.6680732e-04   2.1931945e-04   1.3672243e-03   8.5440953e-04   8.3314842e-04   2.6161270e-04   1.7366856e-03   5.2799539e-04   1.7649847e-02   1.0764587e-02   8.4383096e-03   9.9924928e-03   1.2273825e-02   1.1788899e-02   1.2850999e-02   1.0630699e-02   1.2964118e-02   9.0438994e-03   4.5288546e-03   8.3580766e-03   6.9988358e-03   1.3044370e-02   1.5771615e-02   8.9276151e-03   7.0025139e-03   7.7681345e-03   1.9248623e-02   1.0890288e-02   8.2148016e-03   1.1050411e-02   1.3845989e-02   5.2067991e-03   7.6819868e-03   6.2976924e-03   4.3733262e-03   4.7066273e-03   1.1733076e-02   5.6953630e-03   9.5825887e-03   4.0184455e-03   1.2555508e-02   4.8201445e-03   1.2938333e-02   8.5012649e-03   1.2613331e-02   7.2187981e-03   4.6491251e-03   5.3739269e-03   1.0213138e-02   5.7106829e-03   1.0764587e-02   1.0424589e-02   1.1013685e-02   7.3861586e-03   8.2413252e-03   5.8213434e-03   1.1031181e-02   7.7860554e-03   2.6482878e-03   4.2794287e-04   1.8319104e-03   1.5871773e-03   1.2340260e-03   2.9761573e-03   6.4181441e-04   3.9337040e-03   3.6570436e-04   2.9155752e-03   1.3382816e-05   5.6692471e-03   6.4631376e-04   2.4262663e-03   1.0063227e-03   2.3414789e-04   3.8352406e-04   2.6670153e-04   1.1841642e-03   1.3362953e-03   1.8214422e-03   1.1939941e-05   1.6841308e-04   4.0205285e-04   4.8423454e-03   5.6256276e-03   4.4224155e-03   3.0861840e-04   1.5326607e-03   2.2893524e-03   5.4845532e-04   1.9363566e-03   1.1483728e-03   6.7060376e-05   4.8890125e-04   9.7136579e-04   1.7676633e-03   1.3375465e-03   2.5372175e-04   4.0846507e-03   8.2917869e-04   1.6077651e-02   8.4460632e-03   5.5177458e-03   7.2638972e-03   9.7215743e-03   7.5597148e-03   1.1218034e-02   6.4234899e-03   8.1582316e-03   8.1119193e-03   4.1520915e-03   5.4624397e-03   4.9276011e-03   1.0142169e-02   1.4194600e-02   8.3023965e-03   4.8434975e-03   6.1466052e-03   1.3239048e-02   6.2447391e-03   6.5902144e-03   9.7724034e-03   8.6919298e-03   3.1454944e-03   6.3952659e-03   3.7622934e-03   3.0039560e-03   4.0045050e-03   8.7466217e-03   2.6847018e-03   5.4026497e-03   2.7900002e-03   9.6269482e-03   2.5687827e-03   8.7444600e-03   5.2241473e-03   1.2215015e-02   5.4919656e-03   4.2251052e-03   3.8716574e-03   8.5147448e-03   4.9424074e-03   8.4460632e-03   8.4294916e-03   9.9304629e-03   6.0757927e-03   5.1533590e-03   4.4115457e-03   1.1061881e-02   6.6918878e-03   4.2077380e-03   2.8084601e-04   8.0255307e-03   1.0009734e-03   2.4531898e-03   2.5259126e-03   4.7784400e-04   2.9272193e-03   6.4204523e-03   2.4613181e-03   8.1446100e-04   2.5131313e-03   4.2288269e-03   2.3479589e-03   2.4787654e-03   2.3219118e-03   3.4016339e-03   1.1923522e-03   3.6609993e-04   5.5309499e-03   2.7130308e-03   3.6876750e-03   2.1157012e-03   3.5197143e-03   1.1211667e-03   5.0040735e-04   1.2581494e-03   6.2453424e-03   4.9316252e-04   1.0956505e-03   1.9034882e-03   5.6262931e-04   2.1623642e-03   2.7381233e-03   6.2275542e-04   9.1647472e-04   4.3469066e-04   1.6016964e-03   5.5073116e-03   6.0170029e-04   8.2861929e-03   4.5965840e-03   4.2124912e-03   4.7715416e-03   5.5699315e-03   7.3813594e-03   5.3659110e-03   7.1660104e-03   8.8786575e-03   2.9267242e-03   8.0445420e-04   4.1635703e-03   2.8364579e-03   6.3397911e-03   7.3211567e-03   2.8639086e-03   2.8974680e-03   2.8626073e-03   1.3776826e-02   8.0525608e-03   2.9632152e-03   4.1293440e-03   9.9396499e-03   2.4124505e-03   2.4179141e-03   3.2613675e-03   1.4673422e-03   9.3714862e-04   5.6839580e-03   4.1506352e-03   6.7187933e-03   1.3083992e-03   6.0861850e-03   2.6486423e-03   8.7285257e-03   5.1099460e-03   4.7657924e-03   2.6722144e-03   7.9417630e-04   1.8862622e-03   4.0883053e-03   2.3510235e-03   4.5965840e-03   4.1923613e-03   4.1490574e-03   2.9383782e-03   4.7171745e-03   1.8344857e-03   3.7646957e-03   2.4446440e-03   3.4307781e-03   6.9180223e-04   1.9272484e-03   5.2229584e-03   1.7410764e-03   5.5262484e-03   1.3512624e-03   1.2930220e-03   5.9265821e-04   7.2336834e-03   1.6622228e-03   1.4643809e-03   1.4579196e-03   1.0665934e-03   1.2486050e-03   4.3399433e-05   1.3778574e-03   2.2390179e-03   3.1206766e-03   3.9982611e-04   7.0342073e-04   1.4793565e-03   4.5495005e-03   7.4063181e-03   6.9037801e-03   1.1215419e-03   3.4551859e-04   4.3750592e-03   1.0242073e-03   2.4559606e-03   2.2544417e-03   6.9180223e-04   1.5393939e-03   1.8990091e-03   3.7039856e-03   2.8782332e-03   1.2534261e-03   6.1345149e-03   2.1154370e-03   1.6389445e-02   8.1714731e-03   4.6971245e-03   6.9480013e-03   9.2874957e-03   6.0735661e-03   1.1557043e-02   5.0795005e-03   6.2695782e-03   8.5942939e-03   4.8981354e-03   4.6386510e-03   4.5456138e-03   9.3051239e-03   1.4039626e-02   8.8459552e-03   4.7683489e-03   6.5513763e-03   1.0462868e-02   4.3969158e-03   6.5113261e-03   1.0098096e-02   6.6155737e-03   2.7131547e-03   6.8044529e-03   3.4785563e-03   3.0414918e-03   4.6799978e-03   7.9508909e-03   2.0423594e-03   3.8146379e-03   3.3303959e-03   8.7946774e-03   2.4271150e-03   7.7798359e-03   3.9016462e-03   1.3149131e-02   5.7850137e-03   5.0633237e-03   3.7856360e-03   8.3083336e-03   4.9921128e-03   8.1714731e-03   8.2786520e-03   1.0189399e-02   5.8912773e-03   3.9649361e-03   4.4771942e-03   1.2268673e-02   7.3587328e-03   6.5787312e-03   1.3233357e-03   1.1455828e-03   1.2416155e-03   1.4002549e-03   2.1211045e-03   6.2047866e-03   1.6380421e-03   2.0343353e-03   1.2366343e-03   4.6737502e-03   2.4960613e-03   1.3635919e-03   1.1869805e-03   2.7420392e-03   1.3311387e-03   5.4030547e-04   3.4496369e-03   1.8301986e-03   2.4543913e-03   1.0360218e-03   4.9823495e-03   2.4358984e-03   7.7653049e-04   6.6085729e-04   5.4666528e-03   3.6251211e-04   9.0034369e-04   2.5308489e-03   6.8325669e-04   1.3068439e-03   1.4466712e-03   7.0328570e-04   7.2909544e-04   3.3427965e-04   8.2319726e-04   3.3236658e-03   2.7101948e-04   1.1415097e-02   6.6763180e-03   5.5975222e-03   6.7637660e-03   7.8425097e-03   9.1076654e-03   7.9396677e-03   8.6849227e-03   1.0537825e-02   4.7340864e-03   1.6981356e-03   5.5204544e-03   4.0238168e-03   8.5090240e-03   9.7837063e-03   4.5130967e-03   4.3644743e-03   4.6397935e-03   1.5929686e-02   9.2384755e-03   4.4702915e-03   6.2885333e-03   1.1607431e-02   3.1082253e-03   4.1080254e-03   4.4476701e-03   2.1448891e-03   1.9903866e-03   7.7241343e-03   4.8610346e-03   7.8308568e-03   2.2349743e-03   8.1986845e-03   3.4906235e-03   1.0785042e-02   6.0455598e-03   7.1678534e-03   4.3085958e-03   1.8327850e-03   2.7372439e-03   5.8248161e-03   2.8157351e-03   6.6763180e-03   6.1912806e-03   6.1165743e-03   3.9060199e-03   5.6854050e-03   2.9112999e-03   5.9286549e-03   4.2459890e-03   4.7261943e-03   7.5564450e-03   3.0589295e-03   9.9138151e-03   2.5436162e-03   2.3081715e-03   1.8344588e-03   1.2327595e-02   2.9913447e-03   3.4407458e-03   3.5166367e-03   2.2912956e-03   2.5985157e-03   1.0536407e-03   4.0148201e-03   5.3033668e-03   3.3636231e-03   1.5135209e-03   1.3379167e-03   2.9432336e-03   8.2210569e-03   1.2378534e-02   1.1256214e-02   3.0883819e-03   6.3877121e-04   7.6741777e-03   3.3091271e-03   5.2745018e-03   5.1312091e-03   2.0746888e-03   2.6973394e-03   4.6616800e-03   6.5765736e-03   5.8096774e-03   2.9820979e-03   7.3187243e-03   4.6783172e-03   2.3410581e-02   1.3144529e-02   8.3391705e-03   1.1305315e-02   1.4457465e-02   9.3485129e-03   1.7555848e-02   7.8838497e-03   9.1347689e-03   1.4043414e-02   9.2390419e-03   8.2683227e-03   8.4558564e-03   1.4291672e-02   2.0441558e-02   1.4348706e-02   8.7091477e-03   1.1171095e-02   1.3577182e-02   6.6301175e-03   1.1191012e-02   1.5865943e-02   9.2559664e-03   5.8683930e-03   1.1694065e-02   6.7001372e-03   6.5334334e-03   8.9560518e-03   1.2574664e-02   4.2523471e-03   6.2343724e-03   6.8791672e-03   1.3649249e-02   5.2782119e-03   1.1089361e-02   6.8777652e-03   1.9771053e-02   1.0157447e-02   9.4893989e-03   7.5319640e-03   1.3411350e-02   8.8625592e-03   1.3144529e-02   1.3390278e-02   1.5951074e-02   1.0173619e-02   7.0905829e-03   8.5554531e-03   1.8741319e-02   1.2400067e-02   4.2985441e-03   2.4763265e-03   1.0193789e-03   1.4380091e-03   3.6495663e-03   1.2003820e-03   2.0584975e-03   2.4845352e-03   1.6034070e-03   3.3059261e-04   1.8671770e-03   2.0088877e-03   1.4284810e-03   4.3098388e-04   2.3514979e-04   5.2698749e-03   1.3824059e-03   2.2360501e-03   1.8501267e-03   1.6468815e-03   1.8319470e-03   2.4154150e-03   8.5423988e-04   3.3259702e-03   1.3633177e-03   3.9750527e-04   2.1357310e-04   1.4089375e-04   1.2605369e-03   2.3906980e-03   1.0696291e-04   1.0906412e-03   5.9076498e-04   1.1304618e-03   7.2732511e-03   6.4012947e-04   8.9598694e-03   3.8314732e-03   2.5915433e-03   2.9763427e-03   4.7600376e-03   4.3053173e-03   5.3266981e-03   3.6190516e-03   5.2272723e-03   3.6549051e-03   1.5047575e-03   2.5888356e-03   2.1634980e-03   5.5055672e-03   8.5050147e-03   4.0885074e-03   1.5151975e-03   1.9844585e-03   9.6042351e-03   4.2899092e-03   2.9941597e-03   4.6609860e-03   5.8520656e-03   1.4443089e-03   2.3092039e-03   1.1621771e-03   1.1296414e-03   1.1169479e-03   4.4204603e-03   1.2641450e-03   3.4620250e-03   3.4971048e-04   5.1226200e-03   6.2752047e-04   4.7853928e-03   3.3731886e-03   6.3070664e-03   1.6662334e-03   1.2828407e-03   1.6597311e-03   4.4397739e-03   3.3292201e-03   3.8314732e-03   3.8867782e-03   5.1669823e-03   3.5417199e-03   3.1734550e-03   1.6842820e-03   5.5385508e-03   2.3108610e-03   1.0105990e-03   4.7523926e-03   2.9847642e-03   9.7105522e-03   2.6675945e-03   5.8410645e-03   1.0628436e-03   8.9773521e-03   5.4199214e-03   1.6519449e-03   1.3847497e-03   4.5932482e-03   4.2245140e-03   3.0278103e-03   1.7095869e-03   2.8675709e-03   2.8000554e-03   1.2095222e-03   1.0633409e-02   6.3588443e-03   2.3146826e-03   1.8579783e-03   7.7501487e-03   1.5279559e-03   3.0361588e-03   6.2292475e-03   2.9996444e-03   2.2092276e-03   1.2670329e-03   3.0585508e-03   1.9631739e-03   1.9448597e-03   1.6026176e-03   7.3057463e-04   1.6268750e-03   1.9360609e-02   1.3271536e-02   1.1367917e-02   1.3356276e-02   1.4871782e-02   1.6028245e-02   1.4980963e-02   1.5218503e-02   1.7630002e-02   1.0242398e-02   5.4451367e-03   1.1236806e-02   9.0841292e-03   1.5577818e-02   1.6739427e-02   9.6435556e-03   9.8426714e-03   1.0341095e-02   2.4442578e-02   1.5482723e-02   9.8424496e-03   1.2530745e-02   1.8870958e-02   7.3605563e-03   9.5556413e-03   9.6316193e-03   6.0281749e-03   6.1257342e-03   1.4596779e-02   9.4938425e-03   1.3739836e-02   6.3629397e-03   1.5181016e-02   7.9755348e-03   1.8111593e-02   1.1305790e-02   1.3376686e-02   9.8378125e-03   5.8135644e-03   6.9819428e-03   1.1631750e-02   6.1445613e-03   1.3271536e-02   1.2517306e-02   1.1992997e-02   8.3045136e-03   1.0906252e-02   7.4644491e-03   1.1536762e-02   9.7524154e-03   4.5852486e-03   9.8595493e-04   5.1231602e-03   5.3641159e-04   6.1291344e-03   9.0289414e-06   4.9719488e-03   2.7623691e-03   1.0135570e-04   4.9630072e-05   1.4573369e-03   2.2050307e-03   1.9067713e-03   6.5935996e-04   5.5655703e-04   4.9349156e-04   5.3910141e-05   7.6334144e-03   6.4541501e-03   3.6168243e-03   4.5600228e-04   3.3337204e-03   1.8551457e-03   1.2329546e-03   3.8576017e-03   1.8263928e-03   3.4082293e-04   2.8939589e-05   1.6992773e-03   1.7320592e-03   1.4340517e-03   2.7567571e-04   1.5103910e-03   8.5202938e-04   1.8535044e-02   1.1041503e-02   8.1659733e-03   1.0422568e-02   1.2515324e-02   1.1445689e-02   1.3674148e-02   1.0415137e-02   1.2394915e-02   9.4870366e-03   4.7984401e-03   8.0611256e-03   6.7876377e-03   1.2924053e-02   1.5886474e-02   9.2445598e-03   7.3109344e-03   8.4847047e-03   1.8293716e-02   1.0175519e-02   8.2306422e-03   1.1561315e-02   1.3225081e-02   4.8091709e-03   8.1976852e-03   6.4746796e-03   4.2076714e-03   5.1007444e-03   1.1683626e-02   5.5527590e-03   8.9342726e-03   4.4973686e-03   1.2442734e-02   4.9468838e-03   1.3343592e-02   7.6599210e-03   1.3497447e-02   7.8132331e-03   5.1004820e-03   5.1592495e-03   1.0155636e-02   5.1788357e-03   1.1041503e-02   1.0666367e-02   1.1283660e-02   6.9627068e-03   7.4793969e-03   5.8082013e-03   1.1981463e-02   8.5614846e-03   3.8688652e-03   7.5179133e-03   3.7407669e-03   3.1676786e-04   4.6173801e-03   4.2799166e-03   2.2501511e-03   4.2413983e-03   4.2204030e-03   4.6109813e-03   1.7937707e-03   8.2328963e-04   8.3021324e-03   4.1326900e-03   5.3767829e-03   3.8579826e-03   2.3734756e-03   1.6523409e-04   8.8835369e-04   2.5288831e-03   7.6911436e-03   1.1035999e-03   1.9572002e-03   1.3626197e-03   8.4501724e-04   3.6117590e-03   4.7013989e-03   1.0056440e-03   1.3674472e-03   9.9055737e-04   2.9505217e-03   8.8795046e-03   1.5067108e-03   6.0099517e-03   3.2148697e-03   3.5475051e-03   3.0620571e-03   4.0315627e-03   6.0415844e-03   3.4044063e-03   5.7826017e-03   7.5784861e-03   2.1065729e-03   8.8233953e-04   3.5528527e-03   2.5792431e-03   5.1245213e-03   6.2842876e-03   2.4095844e-03   1.8446522e-03   1.4167723e-03   1.2151930e-02   7.2262167e-03   2.4839286e-03   2.9019075e-03   8.5383029e-03   2.6181282e-03   1.4064800e-03   2.3288946e-03   1.7187301e-03   6.4203056e-04   4.4078979e-03   3.6116427e-03   6.0606537e-03   7.3312980e-04   4.8772717e-03   2.0701887e-03   6.3495233e-03   5.1782781e-03   3.3738477e-03   1.3922890e-03   5.6378115e-04   2.0528392e-03   3.5526857e-03   3.4142665e-03   3.2148697e-03   3.0384066e-03   3.3899600e-03   3.3852248e-03   4.7610217e-03   1.6939002e-03   2.6027995e-03   1.1563987e-03   4.9937739e-03   2.8043563e-04   6.0192505e-03   1.1047123e-03   3.7340869e-03   9.3891763e-04   5.7693223e-04   8.5742923e-04   1.1063653e-03   2.1518410e-03   1.7873418e-03   1.8443813e-03   4.7874237e-04   4.0562362e-04   6.3806313e-04   5.6896950e-03   5.3990383e-03   4.0838955e-03   7.6270784e-04   3.0255235e-03   1.8702287e-03   1.2256654e-03   1.9416278e-03   1.1863062e-03   4.8488269e-04   7.2384993e-04   1.1782779e-03   1.1397261e-03   1.1824844e-03   4.5012569e-04   4.3416102e-03   9.3532010e-04   1.7514227e-02   9.8600607e-03   7.1630436e-03   8.1480968e-03   1.1292909e-02   9.1710206e-03   1.2255610e-02   7.6051240e-03   9.9403988e-03   9.4620221e-03   5.2227781e-03   7.1398046e-03   6.5861173e-03   1.2201906e-02   1.6541006e-02   9.8696183e-03   5.7022093e-03   6.6806000e-03   1.5779735e-02   7.9447125e-03   8.2548534e-03   1.1179561e-02   1.0455124e-02   4.7301378e-03   7.3678164e-03   4.4876356e-03   4.3705173e-03   4.8557182e-03   1.0520487e-02   3.4331839e-03   7.0769130e-03   3.1675776e-03   1.1611243e-02   3.1862426e-03   9.1961094e-03   7.4495828e-03   1.3429738e-02   6.1002834e-03   5.0525215e-03   5.4421147e-03   1.0502545e-02   7.0546448e-03   9.8600607e-03   9.9581080e-03   1.1708746e-02   8.2306703e-03   7.3218404e-03   5.8241089e-03   1.2089443e-02   7.3253099e-03   3.2913459e-03   8.4499731e-03   4.8569537e-03   8.0216351e-04   3.5049401e-03   4.1209949e-03   4.1951632e-03   1.4430192e-03   2.1132422e-03   3.9581533e-03   7.7606295e-03   2.8139659e-03   3.8070595e-03   4.7702994e-03   3.8227367e-03   9.3108167e-03   1.0381275e-02   3.5346820e-03   5.2926972e-04   8.0977990e-03   2.5864687e-03   3.9952884e-03   4.6152713e-03   3.2808967e-03   5.0209478e-03   3.9992007e-03   7.6245140e-03   5.9395645e-03   4.2477403e-03   1.1072543e-02   4.9514063e-03   1.3733574e-02   6.2131974e-03   2.8230097e-03   5.6455623e-03   6.8638978e-03   3.4892544e-03   9.9148605e-03   3.2690483e-03   3.3086076e-03   7.4423917e-03   5.1197423e-03   2.7541244e-03   3.1219477e-03   6.1841097e-03   1.0726676e-02   7.6421585e-03   4.1594455e-03   6.2994749e-03   5.6115691e-03   2.0176931e-03   4.9542156e-03   8.4395555e-03   3.5502322e-03   1.8230265e-03   6.1478670e-03   3.1652703e-03   2.7049802e-03   4.9489115e-03   5.3042297e-03   1.9463142e-03   1.6986432e-03   4.1722516e-03   5.8173968e-03   2.6602408e-03   6.4952123e-03   1.5042394e-03   1.1842312e-02   5.5188608e-03   5.4735640e-03   2.9735027e-03   6.0829501e-03   4.0306925e-03   6.2131974e-03   6.3472325e-03   8.2596987e-03   4.2451973e-03   1.6828229e-03   3.7151898e-03   1.1574575e-02   7.1331719e-03   5.4811265e-03   5.5565221e-04   2.6852359e-03   1.0154324e-03   1.7597013e-04   3.1956114e-04   3.9523878e-04   1.2388706e-03   1.2655903e-03   1.6805675e-03   3.2406061e-05   1.6284558e-04   3.0055489e-04   4.9827743e-03   5.3992645e-03   4.0722394e-03   2.5388663e-04   1.8315484e-03   2.0093416e-03   5.5333384e-04   1.9333559e-03   1.0417210e-03   4.5631651e-05   3.9213732e-04   8.9628584e-04   1.5141190e-03   1.1540120e-03   1.6596111e-04   3.8108192e-03   6.9068728e-04   1.6110144e-02   8.5829426e-03   5.7514563e-03   7.4081873e-03   9.8865471e-03   7.9109476e-03   1.1246146e-02   6.7496818e-03   8.5805974e-03   8.1149529e-03   4.1088457e-03   5.6967153e-03   5.0837880e-03   1.0378372e-02   1.4309813e-02   8.2945922e-03   4.9454249e-03   6.1635386e-03   1.3817928e-02   6.6600542e-03   6.6926476e-03   9.8029996e-03   9.1474450e-03   3.3107453e-03   6.4113962e-03   3.9012077e-03   3.0861181e-03   3.9737498e-03   8.9756426e-03   2.8871345e-03   5.7720900e-03   2.7832463e-03   9.8623531e-03   2.6826772e-03   9.0033513e-03   5.5466456e-03   1.2137789e-02   5.5287165e-03   4.1655510e-03   3.9755943e-03   8.6395601e-03   5.0222445e-03   8.5829426e-03   8.5444862e-03   9.9728516e-03   6.1969528e-03   5.4521508e-03   4.4886104e-03   1.0936532e-02   6.6624227e-03   6.0879321e-03   5.2071133e-03   3.8816096e-03   5.8831678e-03   5.7002681e-03   6.1926865e-03   2.4416494e-03   1.5149583e-03   1.0539677e-02   5.8224280e-03   7.4292172e-03   5.4190952e-03   2.7168224e-03   2.8895677e-04   1.2473682e-03   3.7477469e-03   9.3088565e-03   2.0944009e-03   2.9293124e-03   2.5720420e-03   1.8897161e-03   5.1660356e-03   6.4102501e-03   2.0138936e-03   2.7413840e-03   2.0664916e-03   4.4338085e-03   1.0353410e-02   2.6118482e-03   4.2150650e-03   2.5222817e-03   3.4164904e-03   3.0582580e-03   3.1593359e-03   6.2318287e-03   2.3862805e-03   6.4839490e-03   7.9101598e-03   1.0920878e-03   5.4699759e-04   3.4046237e-03   2.2291279e-03   4.0543858e-03   4.2004727e-03   1.1970351e-03   2.0117915e-03   1.4112028e-03   1.1968526e-02   7.9088029e-03   1.7082776e-03   1.7239090e-03   9.0238817e-03   2.6874577e-03   9.4975956e-04   2.9722514e-03   1.7009640e-03   5.1343341e-04   3.7130353e-03   4.7806054e-03   6.6267337e-03   1.3220831e-03   3.9245747e-03   2.9403206e-03   7.2757164e-03   5.0266602e-03   1.8157078e-03   1.4701768e-03   3.5054511e-04   1.7883207e-03   2.3616946e-03   2.6617941e-03   2.5222817e-03   2.1723972e-03   1.9530095e-03   2.4533627e-03   4.5559375e-03   1.3609168e-03   1.2016297e-03   8.2861882e-04   4.8139327e-03   2.8209366e-03   1.1052349e-04   3.7194090e-05   1.3880093e-03   2.0960687e-03   1.8746430e-03   7.3307377e-04   5.4600497e-04   5.2531656e-04   7.7399437e-05   7.5260309e-03   6.5039124e-03   3.6958100e-03   4.3794778e-04   3.1691974e-03   1.9589162e-03   1.1747018e-03   3.8950000e-03   1.8610625e-03   3.3531102e-04   5.6607375e-05   1.7087501e-03   1.8728452e-03   1.4997100e-03   3.0123700e-04   1.5391826e-03   8.8147902e-04   1.8294246e-02   1.0829571e-02   7.9341800e-03   1.0299926e-02   1.2275737e-02   1.1220530e-02   1.3508784e-02   1.0262914e-02   1.2147087e-02   9.2823036e-03   4.6531594e-03   7.8245831e-03   6.5524640e-03   1.2610156e-02   1.5512672e-02   9.0061844e-03   7.1992659e-03   8.4158356e-03   1.7921554e-02   9.9492079e-03   7.9854978e-03   1.1342596e-02   1.2982212e-02   4.5954373e-03   8.0580657e-03   6.3922041e-03   4.0251341e-03   4.9895677e-03   1.1418706e-02   5.4787432e-03   8.7107499e-03   4.4679304e-03   1.2142235e-02   4.8867636e-03   1.3297934e-02   7.3458933e-03   1.3299484e-02   7.7358341e-03   4.9917221e-03   4.9413674e-03   9.8545070e-03   4.8770063e-03   1.0829571e-02   1.0435652e-02   1.1007902e-02   6.6474718e-03   7.1727397e-03   5.6106947e-03   1.1815640e-02   8.4729744e-03   1.5166983e-03   3.8470717e-03   4.0414722e-03   1.3464004e-03   1.0521554e-03   2.2256122e-03   8.2355212e-03   2.4972654e-03   3.6758320e-03   4.2952040e-03   1.2466978e-03   5.4237685e-03   7.4233145e-03   2.7434894e-03   1.3920410e-03   5.6705580e-03   1.6006987e-03   1.4795623e-03   2.5504964e-03   2.8217649e-03   4.8039535e-03   2.1716992e-03   5.1387834e-03   3.8511647e-03   3.4066344e-03   1.1638730e-02   3.4223746e-03   9.4998939e-03   3.3659956e-03   1.1438717e-03   2.4828929e-03   3.9653407e-03   1.5796312e-03   5.9993003e-03   1.2126234e-03   1.7377370e-03   4.6402796e-03   3.0884931e-03   1.1351744e-03   1.5562166e-03   3.9244608e-03   8.1556610e-03   5.1855221e-03   1.5226783e-03   2.8914073e-03   4.3431210e-03   9.2550137e-04   2.9272754e-03   5.3162687e-03   2.0104865e-03   7.9177243e-04   3.1975522e-03   8.1317449e-04   1.3785091e-03   2.5714969e-03   2.9511423e-03   2.8161529e-04   5.9442405e-04   1.5991249e-03   3.5615321e-03   5.8433150e-04   3.1011353e-03   9.7656296e-04   8.0983113e-03   2.3700003e-03   3.0461348e-03   1.6450583e-03   4.0872867e-03   3.5603497e-03   3.3659956e-03   3.6518311e-03   5.6844228e-03   3.2852236e-03   1.0303385e-03   1.9470044e-03   7.8778855e-03   3.7000111e-03   1.9300708e-03   2.2574717e-03   1.1284358e-03   1.0646979e-03   1.0312076e-03   5.0621817e-03   1.2060164e-03   1.8000639e-03   2.0650564e-03   2.1487796e-03   3.2333878e-03   4.0195479e-03   1.2411974e-03   2.7183002e-03   2.2726383e-03   8.5094120e-04   2.4056963e-04   6.3782113e-04   1.2937611e-03   2.4889893e-03   5.9722053e-04   1.5621785e-03   1.2375553e-03   1.3358412e-03   8.1240216e-03   1.2311022e-03   1.1517636e-02   5.2909227e-03   3.4509195e-03   3.7153220e-03   6.3154320e-03   4.5407961e-03   7.2027738e-03   3.4054800e-03   5.2043334e-03   5.7490488e-03   3.1731637e-03   3.4719309e-03   3.4347027e-03   7.1701181e-03   1.1379612e-02   6.4467389e-03   2.2692649e-03   2.9960956e-03   9.7363741e-03   4.0178908e-03   4.7338729e-03   6.7982603e-03   5.6061060e-03   2.3699712e-03   3.8192855e-03   1.4133848e-03   2.2956056e-03   2.5088406e-03   5.7314562e-03   9.5862581e-04   3.4107092e-03   9.7091810e-04   6.6778472e-03   7.6184177e-04   4.3247639e-03   4.2032521e-03   8.9746527e-03   2.5881501e-03   2.8171688e-03   3.0086239e-03   6.5256052e-03   5.3225794e-03   5.2909227e-03   5.5860698e-03   7.6013097e-03   5.5376614e-03   4.0938335e-03   3.1000848e-03   8.1789436e-03   3.7376243e-03   3.2267663e-05   8.3707549e-04   1.6905622e-03   1.5718936e-03   9.3681209e-04   1.8762095e-04   1.9684682e-04   4.1277465e-05   6.4440482e-03   6.0518000e-03   3.8422414e-03   2.6274935e-04   2.4665214e-03   1.9088192e-03   8.3864343e-04   2.9786928e-03   1.4388393e-03   8.3975474e-05   5.3416679e-05   1.2919166e-03   1.6159093e-03   1.2740163e-03   1.2266042e-04   2.3692761e-03   7.1636545e-04   1.7563748e-02   9.9676420e-03   7.0439691e-03   9.1049407e-03   1.1370346e-02   9.8276989e-03   1.2673450e-02   8.7383729e-03   1.0632094e-02   8.9036592e-03   4.4721835e-03   6.9588127e-03   5.9822651e-03   1.1786793e-02   1.5215597e-02   8.8361414e-03   6.2553172e-03   7.4909328e-03   1.6226352e-02   8.5173085e-03   7.5296182e-03   1.0823312e-02   1.1340207e-02   4.0626163e-03   7.4274805e-03   5.3041231e-03   3.6467217e-03   4.5925766e-03   1.0472609e-02   4.2980846e-03   7.4369871e-03   3.7248522e-03   1.1287932e-02   3.8978058e-03   1.1428778e-02   6.6149115e-03   1.2975959e-02   6.8214468e-03   4.6824073e-03   4.5741646e-03   9.4691004e-03   5.0187206e-03   9.9676420e-03   9.7385546e-03   1.0722589e-02   6.5565379e-03   6.4801586e-03   5.1854796e-03   1.1596572e-02   7.7633670e-03   9.9158601e-04   1.6686143e-03   1.5457871e-03   9.5071878e-04   3.0701864e-04   3.6362811e-04   4.2548991e-05   6.6288818e-03   6.0417331e-03   3.6564704e-03   2.5834714e-04   2.6458983e-03   1.8764428e-03   8.4820574e-04   3.2578450e-03   1.5209238e-03   1.5090465e-04   6.1935165e-05   1.3587649e-03   1.7158299e-03   1.3006818e-03   1.6628415e-04   2.0535582e-03   7.1188329e-04   1.7324639e-02   9.9147481e-03   7.0600417e-03   9.2840701e-03   1.1302120e-02   1.0064078e-02   1.2589616e-02   9.1080261e-03   1.0920912e-02   8.6425556e-03   4.2412792e-03   6.9624194e-03   5.8567924e-03   1.1639501e-02   1.4739829e-02   8.4651679e-03   6.3684651e-03   7.5923014e-03   1.6475338e-02   8.8252851e-03   7.3097093e-03   1.0588424e-02   1.1694482e-02   3.9807447e-03   7.3452100e-03   5.5353092e-03   3.5104587e-03   4.4753907e-03   1.0430724e-02   4.6273816e-03   7.6755144e-03   3.8450588e-03   1.1170257e-02   4.1281664e-03   1.1986478e-02   6.5423939e-03   1.2634016e-02   6.9257811e-03   4.5247923e-03   4.3922796e-03   9.1553155e-03   4.5676871e-03   9.9147481e-03   9.5995789e-03   1.0353234e-02   6.1627903e-03   6.3902007e-03   5.0235520e-03   1.1247115e-02   7.7428181e-03   9.7824889e-04   1.6624661e-03   3.0059873e-03   2.5249972e-04   6.2343657e-04   1.1719366e-03   4.0275459e-03   6.3575546e-03   5.8712921e-03   7.5872446e-04   5.6741436e-04   3.5908637e-03   6.4996051e-04   1.9776689e-03   1.6840088e-03   4.6219818e-04   1.2917587e-03   1.3743184e-03   3.0187893e-03   2.2373182e-03   9.0828703e-04   5.7426890e-03   1.5775049e-03   1.5168309e-02   7.4080646e-03   4.2538993e-03   6.3033105e-03   8.5100385e-03   5.7899432e-03   1.0520014e-02   4.8624768e-03   6.1169570e-03   7.6384090e-03   4.1091153e-03   4.1981402e-03   3.9923041e-03   8.6172736e-03   1.2997087e-02   7.8717119e-03   4.1667776e-03   5.7584992e-03   1.0387455e-02   4.3546484e-03   5.7746712e-03   9.1054055e-03   6.5301937e-03   2.3054088e-03   5.9614728e-03   3.0379183e-03   2.5067124e-03   3.9126904e-03   7.3239330e-03   1.8370981e-03   3.7021481e-03   2.7152943e-03   8.1304066e-03   2.0347479e-03   7.4172182e-03   3.6502880e-03   1.1915038e-02   5.0530642e-03   4.2458688e-03   3.2213237e-03   7.5116191e-03   4.3860606e-03   7.4080646e-03   7.4726409e-03   9.2071058e-03   5.2421868e-03   3.6675370e-03   3.8308993e-03   1.1024145e-02   6.4520833e-03   3.0133930e-04   5.1037905e-03   1.2017859e-03   2.1951761e-03   1.7686888e-03   1.8224411e-03   2.8788865e-03   3.1740291e-03   7.0420689e-04   2.2350252e-03   2.1605967e-03   1.6074282e-04   9.9312132e-04   6.3910600e-04   1.1068342e-03   2.2522084e-03   4.2563220e-04   2.1383582e-03   1.1781524e-03   1.1965920e-03   6.6826197e-03   8.9701315e-04   8.8374021e-03   3.5249181e-03   1.9006375e-03   3.2674819e-03   4.3522253e-03   3.8602822e-03   5.5032387e-03   3.5903574e-03   4.6280025e-03   3.2207897e-03   1.0860964e-03   1.8528751e-03   1.3287556e-03   4.5637650e-03   7.2040689e-03   3.3452381e-03   1.6438459e-03   2.5042800e-03   8.4078534e-03   3.6412189e-03   2.1968551e-03   4.2884610e-03   5.3072049e-03   5.5962180e-04   2.2924485e-03   1.3972917e-03   4.1775124e-04   1.0120628e-03   3.7672964e-03   1.3901921e-03   2.7802443e-03   7.8074497e-04   4.2513803e-03   8.6439557e-04   5.7017672e-03   1.9558095e-03   6.1305769e-03   2.0764524e-03   1.1750038e-03   7.8121442e-04   3.3536027e-03   1.6840705e-03   3.5249181e-03   3.4031938e-03   4.3169071e-03   2.0323666e-03   1.8104373e-03   1.0313169e-03   5.4663596e-03   2.6797009e-03   4.7017751e-03   1.4050521e-03   2.2967640e-03   1.4490557e-03   2.3196093e-03   1.7015479e-03   1.5767700e-03   5.5713099e-04   3.7392678e-03   8.9324098e-04   2.5002761e-04   8.6482380e-04   1.3585049e-04   1.1239692e-03   1.9761479e-03   8.2927740e-05   9.6014531e-04   3.4965263e-04   8.9552257e-04   5.7645956e-03   3.1975366e-04   8.7743211e-03   4.0156462e-03   2.9085611e-03   3.7265804e-03   4.9611690e-03   5.3200137e-03   5.4291747e-03   4.9090444e-03   6.4181467e-03   3.1699225e-03   9.0457257e-04   2.8707306e-03   2.0343345e-03   5.5511033e-03   7.6886258e-03   3.2962764e-03   1.9800100e-03   2.4033904e-03   1.0905558e-02   5.4434884e-03   2.6411651e-03   4.3219947e-03   7.2333465e-03   1.3483652e-03   2.2580657e-03   1.9023537e-03   8.2889320e-04   8.3511491e-04   4.6996589e-03   2.2192064e-03   4.3941392e-03   6.5409726e-04   5.2313685e-03   1.2879740e-03   6.5768476e-03   3.4674432e-03   5.6567012e-03   2.0849532e-03   8.7522015e-04   1.2925162e-03   3.9107304e-03   2.2116014e-03   4.0156462e-03   3.8265815e-03   4.4724719e-03   2.6832503e-03   3.2108081e-03   1.3825243e-03   4.7909587e-03   2.3944351e-03   1.6956470e-03   1.0108236e-03   9.3414345e-04   1.2241588e-02   1.0680036e-02   6.4457112e-03   2.1113831e-03   4.8851719e-03   3.9417362e-03   3.5304281e-03   6.9169294e-03   4.3255103e-03   1.5489174e-03   5.9380000e-04   4.2050996e-03   3.5612837e-03   3.5981180e-03   1.5473563e-03   1.0469113e-03   2.7881158e-03   2.6084642e-02   1.6915515e-02   1.3046936e-02   1.5813114e-02   1.8728660e-02   1.6622622e-02   2.0172358e-02   1.5047933e-02   1.7480656e-02   1.5121187e-02   8.9988271e-03   1.2921567e-02   1.1505555e-02   1.9202447e-02   2.2948431e-02   1.4807179e-02   1.1989561e-02   1.3522703e-02   2.4353472e-02   1.4534512e-02   1.3492376e-02   1.7699736e-02   1.8260951e-02   8.7551977e-03   1.3397972e-02   1.0605977e-02   8.1065177e-03   9.3705995e-03   1.7600384e-02   8.9170386e-03   1.3238432e-02   8.2394556e-03   1.8591466e-02   8.5466794e-03   1.8371580e-02   1.2139358e-02   2.0015536e-02   1.2667833e-02   9.3753580e-03   9.4099897e-03   1.5925767e-02   9.2577085e-03   1.6915515e-02   1.6530549e-02   1.7369847e-02   1.1736690e-02   1.2003814e-02   1.0321540e-02   1.8104120e-02   1.3766972e-02   1.5141485e-04   3.6186411e-04   5.0640473e-03   5.8846843e-03   4.5372473e-03   2.9889995e-04   1.4503455e-03   2.4048820e-03   5.6473356e-04   2.1694139e-03   1.2760726e-03   5.0001009e-05   4.2762331e-04   1.0752642e-03   1.9285330e-03   1.4459840e-03   2.6007132e-04   3.8461838e-03   8.8079628e-04   1.6321310e-02   8.6239000e-03   5.6156570e-03   7.5378743e-03   9.9017513e-03   7.7506746e-03   1.1476827e-02   6.6644304e-03   8.3385285e-03   8.2160708e-03   4.1911289e-03   5.5513041e-03   4.9688023e-03   1.0246372e-02   1.4224144e-02   8.3426053e-03   5.0473242e-03   6.4114140e-03   1.3391748e-02   6.3862951e-03   6.6425216e-03   9.9154668e-03   8.8906649e-03   3.1510729e-03   6.5653256e-03   3.9767727e-03   3.0148559e-03   4.1087786e-03   8.8891438e-03   2.8692574e-03   5.5219515e-03   2.9822205e-03   9.7392578e-03   2.7559926e-03   9.1569917e-03   5.1978118e-03   1.2376315e-02   5.7353587e-03   4.3202502e-03   3.8711781e-03   8.5388416e-03   4.7844327e-03   8.6239000e-03   8.5671038e-03   9.9856257e-03   5.9819812e-03   5.1316831e-03   4.4550423e-03   1.1213210e-02   6.9205612e-03   3.8131057e-04   6.7888158e-03   7.3363003e-03   5.3694436e-03   6.8516623e-04   1.8924051e-03   2.8895525e-03   1.2584203e-03   3.1106561e-03   1.9851820e-03   2.2993360e-04   3.0705767e-04   1.8065799e-03   2.2681792e-03   1.9895114e-03   4.4561501e-04   3.2950230e-03   1.3536253e-03   1.9442033e-02   1.0986408e-02   7.5586116e-03   9.6139706e-03   1.2432885e-02   9.8077912e-03   1.4077548e-02   8.4254038e-03   1.0370813e-02   1.0478515e-02   5.7856689e-03   7.4894276e-03   6.8497491e-03   1.2864462e-02   1.7242156e-02   1.0603978e-02   6.8089917e-03   8.2980029e-03   1.5941696e-02   8.0862824e-03   8.7712331e-03   1.2406133e-02   1.0894930e-02   4.6791769e-03   8.5829625e-03   5.4740472e-03   4.5017704e-03   5.7029968e-03   1.1309070e-02   4.0232333e-03   7.1989285e-03   4.2761837e-03   1.2289743e-02   4.0060693e-03   1.1002553e-02   7.0316526e-03   1.5021687e-02   7.5484658e-03   5.9167328e-03   5.5390768e-03   1.0934157e-02   6.4525090e-03   1.0986408e-02   1.0943118e-02   1.2502015e-02   7.9589531e-03   6.9802991e-03   6.2208864e-03   1.3663387e-02   8.8999016e-03   6.6062542e-03   5.5827314e-03   3.2137911e-03   2.4648342e-04   3.0882054e-03   1.4855278e-03   8.8238305e-04   3.0312113e-03   1.3048774e-03   1.7074342e-04   4.2409993e-05   1.2055084e-03   1.2882692e-03   1.0204762e-03   8.9780466e-05   2.0467514e-03   5.4370125e-04   1.7241595e-02   9.9776023e-03   7.2970604e-03   9.2205394e-03   1.1400153e-02   1.0313298e-02   1.2454804e-02   9.2538420e-03   1.1254653e-02   8.6534668e-03   4.2479840e-03   7.2108683e-03   6.0807502e-03   1.1908599e-02   1.4998922e-02   8.5435101e-03   6.3304436e-03   7.3992448e-03   1.7031719e-02   9.1810782e-03   7.4786833e-03   1.0592315e-02   1.2037933e-02   4.2382770e-03   7.2750145e-03   5.5074473e-03   3.6741461e-03   4.4146887e-03   1.0634443e-02   4.6823366e-03   8.0104480e-03   3.6842552e-03   1.1424845e-02   4.0945647e-03   1.1857190e-02   7.0169427e-03   1.2513676e-02   6.7752703e-03   4.4459599e-03   4.6022279e-03   9.3965771e-03   4.9465269e-03   9.9776023e-03   9.6902181e-03   1.0478640e-02   6.5221232e-03   6.8355801e-03   5.1573625e-03   1.1079009e-02   7.5518079e-03   2.6192775e-03   5.9216859e-03   4.3727502e-03   5.1296754e-03   5.3199310e-03   2.7670517e-03   1.1371035e-03   2.6020928e-03   5.1188394e-03   7.5382072e-03   2.4476107e-03   5.0616317e-03   3.9293810e-03   5.2302586e-03   1.5095801e-02   4.1435464e-03   4.4658108e-03   8.7058429e-04   4.4660793e-04   2.5555941e-04   1.2381894e-03   8.7244097e-04   2.0362511e-03   8.1311609e-04   1.5164656e-03   1.9481959e-03   1.9017569e-03   4.9004150e-04   8.1438359e-04   1.7141435e-03   4.7093504e-03   2.7065864e-03   6.0393489e-05   4.2915211e-04   3.9373776e-03   1.5669301e-03   1.2950596e-03   2.1025536e-03   1.9522193e-03   1.0322026e-03   8.4218839e-04   9.2905490e-05   1.2346326e-03   1.1781032e-03   9.8002670e-04   7.9339756e-04   1.1328834e-03   6.2948320e-04   1.4629322e-03   3.9084846e-04   1.4164544e-03   1.5298834e-03   3.8721999e-03   2.7001180e-04   1.5287601e-03   1.2669024e-03   2.1037534e-03   3.7134859e-03   8.7058429e-04   1.1775044e-03   2.8495857e-03   2.7086756e-03   1.4023687e-03   1.0191451e-03   3.8647977e-03   9.3179883e-04   1.2988786e-03   3.9786961e-03   9.7659791e-03   1.8948352e-03   3.2059058e-03   1.9902291e-03   1.7004118e-03   5.2879179e-03   6.5830280e-03   1.9368261e-03   2.2268965e-03   1.8962421e-03   4.4774419e-03   1.1162650e-02   2.6447647e-03   4.9365528e-03   3.0323131e-03   3.9972109e-03   2.9343480e-03   3.7523678e-03   6.3980393e-03   2.7120874e-03   6.2404178e-03   8.0807935e-03   1.9416596e-03   1.3024398e-03   4.0245181e-03   3.0697725e-03   5.0283287e-03   5.8270256e-03   2.3505477e-03   2.0375391e-03   1.2652208e-03   1.2527532e-02   8.0556250e-03   2.6750700e-03   2.5225228e-03   9.0764566e-03   3.4699713e-03   1.3308823e-03   2.7664696e-03   2.4678015e-03   9.5729618e-04   4.3858320e-03   4.4729680e-03   6.8828714e-03   1.1547480e-03   4.8183810e-03   2.7179325e-03   6.3087897e-03   6.0843336e-03   2.6715726e-03   1.3701564e-03   8.5085504e-04   2.7129190e-03   3.6187454e-03   4.3357364e-03   3.0323131e-03   2.8888833e-03   3.1752051e-03   4.0026050e-03   5.6110347e-03   2.1520192e-03   2.0021167e-03   9.3001678e-04   2.6139835e-03   9.7625461e-03   4.3820793e-04   2.7906691e-03   3.4740135e-03   1.5471352e-03   3.7324822e-03   3.8774805e-03   1.8049144e-03   1.0166909e-03   9.6586952e-04   2.7620874e-03   5.6379477e-03   1.4267399e-03   9.9420936e-03   6.9534902e-03   7.2046628e-03   7.1611325e-03   8.0864542e-03   1.1050679e-02   7.0236664e-03   1.0684883e-02   1.2982713e-02   4.4982901e-03   2.1523458e-03   7.1621069e-03   5.3786825e-03   9.3055499e-03   9.5487861e-03   4.3879387e-03   5.0693092e-03   4.4931267e-03   1.8805226e-02   1.2143973e-02   5.1616364e-03   5.8432704e-03   1.4239876e-02   5.0396297e-03   4.0643450e-03   5.6688069e-03   3.5911389e-03   2.3422208e-03   8.6067938e-03   6.9700590e-03   1.0540875e-02   2.8498735e-03   9.0488233e-03   4.9258801e-03   1.1781603e-02   8.6822745e-03   5.8089260e-03   4.4337196e-03   2.0267056e-03   4.1354243e-03   6.4148025e-03   4.4976834e-03   6.9534902e-03   6.4275292e-03   5.9584428e-03   5.3006657e-03   8.1437729e-03   3.9023880e-03   4.5299634e-03   3.7988456e-03   2.5123066e-03   1.1946309e-03   2.0097566e-04   1.7928786e-03   5.7143349e-04   1.2667176e-04   4.6644872e-04   4.4712161e-04   1.0683378e-03   5.7468992e-04   7.6554900e-05   3.3664265e-03   2.0582490e-04   1.3553574e-02   7.1051776e-03   4.8941009e-03   6.5257957e-03   8.3098959e-03   7.5373275e-03   9.3233389e-03   6.7621473e-03   8.4467156e-03   6.1291129e-03   2.5944515e-03   4.8248569e-03   3.9028342e-03   8.7515124e-03   1.1627531e-02   6.1178515e-03   4.1203288e-03   5.0572182e-03   1.3529172e-02   6.7984240e-03   5.0687125e-03   7.7357162e-03   9.2015610e-03   2.4873418e-03   4.9175701e-03   3.5355888e-03   2.0473249e-03   2.6605314e-03   7.6511613e-03   3.0628424e-03   5.7307078e-03   2.1169019e-03   8.3320524e-03   2.4574218e-03   9.1102030e-03   4.8098810e-03   9.5736130e-03   4.5225384e-03   2.7314130e-03   2.7690856e-03   6.7080946e-03   3.3506310e-03   7.1051776e-03   6.8798895e-03   7.7001955e-03   4.4569824e-03   4.6305164e-03   3.1848752e-03   8.4170139e-03   5.2045050e-03   6.9296246e-03   2.1360002e-03   3.7784686e-03   3.9888330e-03   1.9332806e-03   3.1165972e-03   3.4622240e-03   6.1843155e-03   4.9689115e-03   2.8276933e-03   8.4143362e-03   3.9488633e-03   1.7390613e-02   8.6823566e-03   4.7125346e-03   7.5297389e-03   9.6551734e-03   5.6073015e-03   1.2632980e-02   4.7967985e-03   5.4595549e-03   9.6779905e-03   6.1919843e-03   4.6437798e-03   4.8811137e-03   9.2634464e-03   1.4470481e-02   9.9239882e-03   5.5116951e-03   7.7393895e-03   8.8498403e-03   3.6104684e-03   7.0913900e-03   1.1068993e-02   5.6668826e-03   3.0002631e-03   7.9032607e-03   4.0760726e-03   3.7279027e-03   5.9729084e-03   7.9919733e-03   2.3383845e-03   3.2272638e-03   4.6096764e-03   8.7690968e-03   3.1364844e-03   7.9578373e-03   3.3962632e-03   1.4631125e-02   6.8663759e-03   6.4834920e-03   4.3461235e-03   8.7377082e-03   5.5255283e-03   8.6823566e-03   8.8561968e-03   1.1024987e-02   6.2645608e-03   3.5745084e-03   5.1960404e-03   1.3983177e-02   8.7265781e-03   1.5360474e-03   2.2738132e-03   6.3957013e-04   1.8470485e-03   1.9436948e-03   8.2753134e-04   1.4870044e-04   1.8575051e-04   1.1511457e-03   4.1570185e-03   4.2481246e-04   1.2022631e-02   7.4558885e-03   6.7319225e-03   7.0097246e-03   8.7236579e-03   1.0059866e-02   8.2686681e-03   9.2543911e-03   1.1644804e-02   5.5866311e-03   2.5062451e-03   6.6946690e-03   5.2622870e-03   9.8836223e-03   1.1452219e-02   5.6355000e-03   4.7339621e-03   4.6436729e-03   1.7620106e-02   1.0378141e-02   5.6675320e-03   7.1003305e-03   1.2674455e-02   4.3836233e-03   4.5891805e-03   4.7259960e-03   3.2437023e-03   2.5249532e-03   8.8366518e-03   5.2434703e-03   8.9867759e-03   2.2946416e-03   9.5089828e-03   3.7537168e-03   1.0503141e-02   7.8427036e-03   7.7804598e-03   4.4127994e-03   2.3620086e-03   3.9941388e-03   7.2903223e-03   4.7424240e-03   7.4558885e-03   7.1215300e-03   7.3539364e-03   5.7328206e-03   7.4284923e-03   3.9643246e-03   6.4306545e-03   4.3729078e-03   1.0852360e-03   3.9664584e-04   4.5123208e-04   1.2414442e-03   2.3150826e-04   1.4183402e-03   7.0426023e-04   4.8163546e-04   5.0741189e-03   3.9595383e-04   1.0937070e-02   5.0339955e-03   3.1168119e-03   4.5426488e-03   6.0432452e-03   5.3182662e-03   7.1300333e-03   4.7641753e-03   6.1358685e-03   4.4885462e-03   1.6916118e-03   3.0636842e-03   2.3987749e-03   6.3937387e-03   9.2584560e-03   4.5899059e-03   2.5786937e-03   3.4750392e-03   1.0541835e-02   4.8350707e-03   3.4370915e-03   5.7977832e-03   6.8277961e-03   1.3144796e-03   3.3638906e-03   2.1338739e-03   1.0504939e-03   1.6413828e-03   5.4173620e-03   1.8780432e-03   3.9014661e-03   1.1794316e-03   6.0207953e-03   1.3473818e-03   6.9135169e-03   3.1440431e-03   7.6724602e-03   2.9974710e-03   1.7751706e-03   1.5977690e-03   4.8531144e-03   2.4494451e-03   5.0339955e-03   4.8947958e-03   5.8464391e-03   3.1299587e-03   2.9881785e-03   1.9161069e-03   6.7804975e-03   3.6799724e-03   6.0827379e-04   2.1616612e-03   3.6536587e-03   6.0346559e-04   1.7560211e-03   1.3150048e-03   2.0808595e-03   9.6848049e-03   1.5050304e-03   8.5509882e-03   3.4934050e-03   2.3873070e-03   2.2266374e-03   4.3437966e-03   3.4432000e-03   4.8822411e-03   2.6118729e-03   4.2515298e-03   3.9280244e-03   2.1763551e-03   2.4215318e-03   2.3726469e-03   5.2469603e-03   8.8156975e-03   4.6543689e-03   1.1653780e-03   1.5634616e-03   8.3770205e-03   3.5034084e-03   3.2683461e-03   4.7014835e-03   4.7252691e-03   1.7941232e-03   2.2843067e-03   6.9328893e-04   1.6436639e-03   1.4866860e-03   4.0234517e-03   7.8970448e-04   2.8726545e-03   3.0564882e-04   4.8340126e-03   3.3681970e-04   3.2031086e-03   3.4962764e-03   6.5051951e-03   1.2935806e-03   1.7549327e-03   2.1673002e-03   4.7736712e-03   4.5514956e-03   3.4934050e-03   3.7661841e-03   5.5497035e-03   4.3927525e-03   3.3294822e-03   2.0638533e-03   5.8922322e-03   2.1421877e-03   1.0254014e-03   1.7967204e-03   2.4056491e-05   4.9606070e-04   1.5493043e-04   7.3786851e-04   5.7634641e-03   2.2821239e-04   9.8983432e-03   4.8234579e-03   3.6558248e-03   4.1003359e-03   5.8726550e-03   5.9033047e-03   6.1776943e-03   5.1708698e-03   7.0154090e-03   4.1004756e-03   1.5716690e-03   3.6383691e-03   2.8864008e-03   6.7180252e-03   9.3042807e-03   4.3918407e-03   2.3314998e-03   2.6748196e-03   1.1913776e-02   5.9266374e-03   3.6227612e-03   5.2997514e-03   7.7658365e-03   2.0655115e-03   2.8598574e-03   2.0567764e-03   1.5031818e-03   1.3330059e-03   5.6389436e-03   2.2318728e-03   4.9186471e-03   7.3077456e-04   6.3335619e-03   1.3529510e-03   6.4463256e-03   4.4695359e-03   6.6841393e-03   2.3650796e-03   1.3974597e-03   2.1137539e-03   5.1383865e-03   3.4413190e-03   4.8234579e-03   4.7468419e-03   5.6953492e-03   3.9468482e-03   4.2095924e-03   2.1520165e-03   5.7168561e-03   2.8181362e-03   2.6785665e-04   8.6267880e-04   1.5080867e-03   1.0657562e-03   9.1259932e-05   3.2834346e-03   5.6400090e-04   1.5768182e-02   8.4481987e-03   5.6912110e-03   7.5460195e-03   9.7379656e-03   8.1209399e-03   1.1078194e-02   7.1125751e-03   8.8544675e-03   7.7247994e-03   3.7380313e-03   5.6213520e-03   4.8502413e-03   1.0137958e-02   1.3681745e-02   7.7719782e-03   4.9953780e-03   6.2009166e-03   1.4059422e-02   6.9488117e-03   6.3504999e-03   9.4504672e-03   9.5001122e-03   3.1213299e-03   6.2307927e-03   4.0875652e-03   2.8287725e-03   3.7400310e-03   8.8571631e-03   3.1845212e-03   5.9757813e-03   2.8285304e-03   9.6559261e-03   2.8616391e-03   9.5937311e-03   5.3787128e-03   1.1658427e-02   5.5682032e-03   3.8827352e-03   3.6680728e-03   8.1913042e-03   4.3904219e-03   8.4481987e-03   8.3060404e-03   9.4592722e-03   5.6422254e-03   5.2631423e-03   4.2070121e-03   1.0442544e-02   6.5544595e-03   1.6777879e-03   1.6905742e-03   1.4559893e-03   2.3696578e-04   1.7661444e-03   8.8626613e-04   1.8929605e-02   1.1198434e-02   8.2126916e-03   1.0357192e-02   1.2691977e-02   1.1286676e-02   1.3897779e-02   1.0124890e-02   1.2174180e-02   9.8437553e-03   5.0898821e-03   8.1181082e-03   6.9678076e-03   1.3160374e-02   1.6460126e-02   9.6980805e-03   7.2881507e-03   8.4988687e-03   1.8112744e-02   9.9154333e-03   8.5214392e-03   1.1906445e-02   1.2939064e-02   4.9240987e-03   8.3797448e-03   6.3232280e-03   4.3836801e-03   5.2916266e-03   1.1816149e-02   5.2785357e-03   8.7418147e-03   4.4568647e-03   1.2648763e-02   4.7832566e-03   1.2911612e-02   7.7565330e-03   1.3968530e-02   7.8153448e-03   5.3323341e-03   5.3832666e-03   1.0542156e-02   5.6397042e-03   1.1198434e-02   1.0902962e-02   1.1744032e-02   7.3882415e-03   7.5970260e-03   6.0277743e-03   1.2454722e-02   8.6970669e-03   6.8936185e-04   2.4185836e-04   6.5755985e-04   5.6966351e-03   2.3035735e-04   9.8692354e-03   4.6426684e-03   3.3219514e-03   3.9792968e-03   5.6658817e-03   5.5182925e-03   6.1624599e-03   4.8454827e-03   6.5522795e-03   4.0009447e-03   1.4714328e-03   3.2975731e-03   2.5896752e-03   6.3872309e-03   9.0422907e-03   4.2582444e-03   2.2027730e-03   2.6736829e-03   1.1276803e-02   5.4428314e-03   3.3876877e-03   5.2005260e-03   7.2827649e-03   1.7342875e-03   2.7931367e-03   1.8984292e-03   1.2582586e-03   1.2661063e-03   5.3418398e-03   1.9890109e-03   4.4646783e-03   7.0136727e-04   6.0091268e-03   1.2000111e-03   6.3087140e-03   3.9600850e-03   6.7054154e-03   2.3290598e-03   1.3528267e-03   1.8394373e-03   4.8617299e-03   3.0806223e-03   4.6426684e-03   4.5595872e-03   5.5227532e-03   3.5904469e-03   3.7269772e-03   1.9354221e-03   5.7786823e-03   2.8379142e-03   1.6160265e-04   9.1316164e-04   4.5133200e-03   3.9636483e-04   1.2999342e-02   7.7990273e-03   6.7507696e-03   6.8565065e-03   9.1164934e-03   9.6187705e-03   8.8289255e-03   8.5171572e-03   1.1041936e-02   6.3870800e-03   3.1070828e-03   6.7336821e-03   5.5817760e-03   1.0377938e-02   1.2745315e-02   6.6393015e-03   4.6463353e-03   4.6865341e-03   1.7095703e-02   9.6546615e-03   6.2703784e-03   7.8942299e-03   1.1919237e-02   4.5195099e-03   4.9936591e-03   4.3235727e-03   3.5370732e-03   2.9138150e-03   9.0955590e-03   4.5162367e-03   8.4195838e-03   2.1592479e-03   9.9327314e-03   3.3056202e-03   9.5169563e-03   7.9097267e-03   8.9017922e-03   4.4124132e-03   2.8482486e-03   4.3995745e-03   8.1140558e-03   5.6448175e-03   7.7990273e-03   7.6396844e-03   8.3822247e-03   6.5839845e-03   7.5512097e-03   4.3854717e-03   7.5528676e-03   4.6977929e-03   6.1532842e-04   4.4755911e-03   9.8852555e-05   1.1287330e-02   6.2297232e-03   5.1189561e-03   5.6158860e-03   7.4118621e-03   7.9100135e-03   7.4458980e-03   7.1082862e-03   9.2159095e-03   4.9487763e-03   1.9996447e-03   5.0869737e-03   4.0020507e-03   8.3714289e-03   1.0564909e-02   5.1004357e-03   3.5205852e-03   3.7366566e-03   1.4679778e-02   7.9564069e-03   4.6553854e-03   6.3553187e-03   1.0091302e-02   3.0597107e-03   3.7953264e-03   3.3093658e-03   2.2411736e-03   1.9075393e-03   7.2834604e-03   3.5416682e-03   6.7651117e-03   1.4482690e-03   7.9807479e-03   2.4205104e-03   8.4840253e-03   5.9704010e-03   7.4790367e-03   3.4333236e-03   1.8691676e-03   2.9457380e-03   6.2606998e-03   3.9378134e-03   6.2297232e-03   6.0227040e-03   6.6475915e-03   4.7553767e-03   5.6493596e-03   2.9997214e-03   6.2979764e-03   3.7014773e-03   2.9064840e-03   2.5951953e-04   1.5239927e-02   8.3975944e-03   6.0152535e-03   7.5736149e-03   9.7205279e-03   8.7194769e-03   1.0665619e-02   7.7107157e-03   9.6513260e-03   7.3495285e-03   3.4129734e-03   5.9493098e-03   4.9891659e-03   1.0300134e-02   1.3429483e-02   7.3762928e-03   4.9967161e-03   5.9349958e-03   1.5151045e-02   7.8143476e-03   6.2821596e-03   9.0873094e-03   1.0390318e-02   3.3768176e-03   5.9427925e-03   4.2522990e-03   2.8707879e-03   3.4399883e-03   9.0442431e-03   3.6087055e-03   6.7269934e-03   2.6557188e-03   9.8316941e-03   3.0241465e-03   9.9672648e-03   5.9844482e-03   1.0964814e-02   5.3765757e-03   3.5060112e-03   3.7251338e-03   8.1205003e-03   4.4033527e-03   8.3975944e-03   8.1986819e-03   9.1329776e-03   5.6810271e-03   5.8010063e-03   4.1618459e-03   9.6695634e-03   6.1457695e-03   3.7030792e-03   2.6425725e-02   1.8599298e-02   1.5467357e-02   1.8635118e-02   2.0442342e-02   2.0541696e-02   2.1259986e-02   1.9510831e-02   2.1931276e-02   1.5294793e-02   9.1682566e-03   1.5285848e-02   1.2953400e-02   2.0823480e-02   2.2513198e-02   1.4419732e-02   1.4350471e-02   1.5480442e-02   2.9209010e-02   1.9066274e-02   1.4266029e-02   1.8093335e-02   2.3152907e-02   1.0464507e-02   1.4480769e-02   1.3685178e-02   9.2298310e-03   1.0125817e-02   1.9700965e-02   1.2730523e-02   1.7262155e-02   1.0225203e-02   2.0352884e-02   1.1535854e-02   2.3443654e-02   1.4503051e-02   1.9462802e-02   1.4723300e-02   9.8246219e-03   1.0395301e-02   1.6330792e-02   8.8773452e-03   1.8599298e-02   1.7720786e-02   1.7175716e-02   1.1774527e-02   1.4190018e-02   1.1287889e-02   1.7334951e-02   1.4959707e-02   1.2176711e-02   6.5819636e-03   5.0346277e-03   6.0397395e-03   7.7827629e-03   7.8599708e-03   8.1942510e-03   7.0899174e-03   9.0304038e-03   5.3331159e-03   2.1084043e-03   4.9833227e-03   3.9086435e-03   8.5223444e-03   1.0895531e-02   5.3819973e-03   3.7720778e-03   4.2725796e-03   1.4381123e-02   7.5978371e-03   4.7474248e-03   6.8472012e-03   9.8808760e-03   2.7678758e-03   4.1999833e-03   3.4360629e-03   2.0712504e-03   2.1185414e-03   7.4497841e-03   3.4016631e-03   6.4264729e-03   1.6858980e-03   8.1251590e-03   2.4514173e-03   8.9161864e-03   5.4840504e-03   8.2209587e-03   3.8745808e-03   2.1076714e-03   2.7824071e-03   6.3561971e-03   3.5186798e-03   6.5819636e-03   6.3377454e-03   6.9667686e-03   4.4964760e-03   5.2124475e-03   2.9917795e-03   7.0285944e-03   4.2716151e-03   1.5675754e-03   4.2437140e-03   2.9528525e-03   1.2801911e-03   5.5300675e-03   5.2313183e-04   7.0373258e-03   7.0028853e-03   1.5817688e-03   4.6017698e-03   4.2905415e-03   3.9763653e-03   1.7507004e-03   9.8088526e-04   2.0205251e-03   3.8651167e-03   2.8498196e-03   8.0083780e-03   8.7219602e-03   2.5429883e-03   8.6090275e-04   7.9906965e-03   6.1518285e-03   2.2097973e-03   5.7963314e-03   5.7460009e-03   4.2262969e-03   2.1872477e-03   8.9731860e-03   7.8793225e-03   5.8991938e-03   1.8999235e-03   7.1341168e-03   7.0170212e-03   6.4409068e-03   6.9062404e-04   3.2402506e-03   4.2346770e-03   4.9489360e-03   1.9844891e-03   6.6121605e-03   1.5675754e-03   1.4409377e-03   1.2937675e-03   4.5154908e-03   6.0031850e-03   4.0189646e-03   1.2526895e-03   2.2326743e-03   6.7976748e-04   4.4251056e-04   5.1964468e-05   1.5314410e-03   4.7093005e-04   2.2872076e-03   2.4409680e-03   6.1996952e-04   1.8531872e-03   7.0675084e-04   7.4672595e-04   2.9977980e-04   1.6320684e-03   1.1279305e-03   6.4871929e-04   6.2074215e-04   4.0109945e-03   3.1610099e-03   4.6600326e-04   4.3207236e-04   3.1187047e-03   1.7495883e-03   3.8892953e-04   1.4972893e-03   1.7881991e-03   1.3932149e-03   1.6264024e-04   3.1616233e-03   2.5553184e-03   1.9652949e-03   2.4129313e-04   2.2301817e-03   3.0218268e-03   1.9168834e-03   1.5054952e-03   6.4024254e-04   1.6084351e-03   1.4082859e-03   5.9336508e-04   3.2376306e-03   1.1102230e-16   6.3653022e-05   8.5949029e-04   1.8263557e-03   1.6881339e-03   9.7411877e-04   1.7845049e-03   6.1330704e-04   7.1368649e-04   9.0151789e-04   6.1896245e-04   2.2461726e-03   1.0406196e-03   1.1172454e-03   1.6730261e-03   1.8311894e-03   1.8071232e-06   2.5364008e-04   8.3907159e-04   3.3874526e-03   2.1375798e-03   4.5487046e-04   1.1672957e-03   2.8115805e-03   1.2138761e-03   7.0446879e-04   1.8201572e-03   1.6098088e-03   5.2152529e-04   1.0325997e-03   6.5974667e-04   9.0603694e-04   1.4060118e-03   4.3618665e-04   1.3469029e-03   7.5850938e-04   1.4500880e-03   6.7416609e-04   1.0299923e-03   2.5247687e-03   4.1453726e-04   3.7399848e-03   9.2294426e-04   1.7551096e-03   7.2749277e-04   1.1614195e-03   2.4439916e-03   6.7976748e-04   8.1575962e-04   2.1038526e-03   1.4799615e-03   3.3653084e-04   6.6936205e-04   3.8899674e-03   1.5033836e-03   6.1892938e-04   8.9565267e-04   1.1187414e-03   1.0854623e-03   1.6238473e-03   1.6997610e-03   2.5416419e-03   7.7939556e-04   1.2163589e-03   1.1645635e-03   3.7479516e-03   2.5673270e-03   2.8413719e-04   3.4882680e-04   3.5538869e-03   2.1358644e-03   1.3529179e-03   1.5262264e-03   2.0757398e-03   1.9224937e-03   7.7565401e-04   6.3114517e-04   2.1204969e-03   1.7089017e-03   5.9516371e-04   1.8253945e-03   1.7466546e-03   1.3725400e-03   9.7938279e-04   1.2586511e-03   1.2414457e-03   2.1946939e-03   3.0180258e-03   3.2655328e-04   2.0574339e-03   1.9692598e-03   1.9049224e-03   4.6812273e-03   4.4251056e-04   7.9383810e-04   2.4056659e-03   3.2171363e-03   2.0291670e-03   1.5121604e-03   3.2358269e-03   7.8092419e-04   1.6056499e-03   4.5150817e-04   2.5183573e-03   2.4854849e-03   8.1663583e-04   2.4301739e-03   9.3222022e-04   1.0572824e-03   1.7339381e-04   1.3855383e-03   1.3424761e-03   1.0242405e-03   9.7281350e-04   3.6981982e-03   3.3860618e-03   6.8052310e-04   4.8835842e-04   3.1532670e-03   2.2405021e-03   6.9163264e-04   1.9828394e-03   2.3495346e-03   1.9517373e-03   1.3548451e-04   3.7877283e-03   2.8247707e-03   2.6466102e-03   1.4866617e-04   2.8614588e-03   3.2185979e-03   2.1613637e-03   1.5430396e-03   1.0217871e-03   2.1845781e-03   1.8662401e-03   6.6257305e-04   3.7358116e-03   5.1964468e-05   1.2907411e-04   9.1062515e-04   2.1316335e-03   1.9388777e-03   1.3908595e-03   1.9526372e-03   9.5243046e-04   3.3534848e-03   2.1612689e-04   1.1409237e-04   3.7511533e-03   4.4135123e-03   6.6848080e-04   1.6638889e-03   1.5639090e-03   5.3797969e-03   4.6512834e-03   1.2304041e-03   2.1424312e-03   1.1209148e-03   3.9967200e-04   2.4397061e-03   3.5566606e-03   2.8773633e-04   1.9980195e-03   2.5921392e-03   1.0825130e-03   2.8538916e-03   3.5346603e-03   9.3770297e-04   1.4682668e-03   3.5169417e-04   2.8507687e-03   1.3414178e-03   1.7057263e-03   1.1395352e-03   1.1778138e-03   6.0686882e-03   1.8828714e-03   4.1140616e-03   2.6499598e-03   2.9837515e-03   5.4227271e-03   1.5314410e-03   2.0381041e-03   4.2816261e-03   3.9075302e-03   1.2227927e-03   2.5264748e-03   6.5268770e-03   2.9950818e-03   4.2523782e-03   4.6456758e-03   7.0284879e-04   2.6206169e-03   2.2973667e-03   2.1186617e-03   1.0662204e-03   1.4771683e-03   1.2714179e-03   1.6200996e-03   9.3400517e-04   6.3864823e-03   5.7928278e-03   1.2702417e-03   3.0680262e-04   5.4794582e-03   3.6431092e-03   7.0967201e-04   2.9368020e-03   3.3273895e-03   2.1071133e-03   1.0635659e-03   5.3575283e-03   5.0378701e-03   2.9935636e-03   1.0701915e-03   3.8904013e-03   4.2643219e-03   4.2480632e-03   6.5030200e-04   1.1722241e-03   2.1985353e-03   2.8568074e-03   1.2361632e-03   4.8426872e-03   4.7093005e-04   4.8520973e-04   9.1253531e-04   3.1519557e-03   3.8819044e-03   2.1030647e-03   9.4974174e-04   6.5992898e-04   2.7415573e-04   4.6934818e-03   4.8265016e-03   1.1075187e-03   2.2246224e-03   2.7094103e-03   7.2547386e-03   5.7651516e-03   1.2879775e-03   2.2498412e-03   1.7969640e-03   2.9988677e-04   3.2873557e-03   4.6281528e-03   3.4411066e-04   2.2557578e-03   3.0860670e-03   7.9349579e-04   3.1195585e-03   3.7700064e-03   1.7729958e-03   8.2927671e-04   3.1955044e-04   2.5127017e-03   2.3924363e-03   1.2355886e-03   6.3306711e-04   1.7271405e-03   7.3517242e-03   1.9482896e-03   4.3986367e-03   3.1257329e-03   4.1788193e-03   6.3227646e-03   2.2872076e-03   2.9291555e-03   5.5970414e-03   4.9483109e-03   1.7952206e-03   3.0186434e-03   7.6597710e-03   3.3340783e-03   5.0895780e-03   5.6951678e-03   1.1683986e-03   2.4173290e-03   2.2930538e-03   6.6766405e-03   6.0598142e-03   2.0196993e-03   3.2103351e-03   7.1260012e-04   2.1040770e-04   3.4457175e-03   4.8676879e-03   4.7880714e-05   2.6160358e-03   3.7638559e-03   1.6534967e-03   3.7166920e-03   4.7397184e-03   1.5966719e-03   1.7314841e-03   3.1225254e-04   3.8216967e-03   2.0442457e-03   2.2822879e-03   1.3421268e-03   1.4265946e-03   7.7649269e-03   2.8740126e-03   5.4160448e-03   3.5155679e-03   4.0306705e-03   6.4534752e-03   2.4409680e-03   3.0445932e-03   5.6145787e-03   4.8826195e-03   1.5492752e-03   3.4872724e-03   8.3107496e-03   4.2635519e-03   8.0787158e-04   1.6588755e-03   9.5088926e-04   1.1215622e-03   1.1319394e-03   1.0749073e-04   1.3651148e-03   1.0419898e-03   7.3951172e-03   5.6721517e-03   2.8717807e-04   1.2167194e-04   6.0929710e-03   1.9467902e-03   2.7497575e-04   2.6021687e-03   1.4711384e-03   7.6653532e-04   1.1979861e-03   4.6497866e-03   4.6528613e-03   2.0491908e-03   1.1214382e-03   3.1087470e-03   5.8331337e-03   2.9008505e-03   5.1851355e-04   1.1077981e-03   7.4180273e-04   1.1189833e-03   3.3213225e-04   1.9786092e-03   6.1996952e-04   3.2630432e-04   1.6788710e-04   1.0717507e-03   2.5327575e-03   6.9916673e-04   4.8860962e-04   5.0860173e-04   1.7852918e-03   8.1925898e-04   2.7637031e-03   3.4415701e-03   7.6048751e-04   1.3454814e-03   1.4168273e-03   9.1102129e-03   5.4634531e-03   7.0608839e-04   1.5253323e-03   6.6930140e-03   9.6900708e-04   7.0882160e-04   2.0455668e-03   3.9468549e-04   1.1422246e-04   2.4972040e-03   3.2985277e-03   4.3265068e-03   9.6084950e-04   2.6351726e-03   1.9457490e-03   6.5435669e-03   2.5549327e-03   2.2787630e-03   1.2770395e-03   6.6117888e-05   4.1362061e-04   1.2709485e-03   9.0111668e-04   1.8531872e-03   1.4879007e-03   1.4236785e-03   8.2396190e-04   2.2228636e-03   3.0260473e-04   1.7887502e-03   9.8733924e-04   2.2593145e-04   8.4529966e-04   3.3545284e-03   2.0967474e-03   4.8795197e-04   1.2181976e-03   2.8660735e-03   1.2480152e-03   6.7735579e-04   1.8245752e-03   1.6711447e-03   4.7937341e-04   1.0455121e-03   6.9960603e-04   8.5898853e-04   1.3874556e-03   4.5677202e-04   1.3792343e-03   7.7973864e-04   1.4683104e-03   6.8342524e-04   1.0561802e-03   2.6555506e-03   3.7342452e-04   3.7432085e-03   9.6667604e-04   1.7304819e-03   6.7810292e-04   1.1254700e-03   2.3291425e-03   7.0675084e-04   8.2471895e-04   2.0738735e-03   1.3951480e-03   2.9534051e-04   6.3569311e-04   3.8846725e-03   1.5360581e-03   9.9102840e-04   2.6998600e-03   1.1403522e-03   5.9435819e-04   1.1584769e-03   4.5439398e-03   2.4115910e-03   2.2376231e-04   1.3051908e-03   3.1170665e-03   2.4639357e-04   6.5093729e-04   1.0408914e-03   3.2170646e-04   6.8086675e-04   7.3723950e-04   1.9464154e-03   1.6938542e-03   1.2010351e-03   8.6567601e-04   1.2605984e-03   4.0415296e-03   6.0024917e-04   2.8241029e-03   9.3145876e-04   8.7987159e-04   1.5390142e-04   6.1621791e-04   1.2031695e-03   7.4672595e-04   6.4561848e-04   1.3132954e-03   5.7671738e-04   4.3996999e-04   1.2646330e-04   2.7819647e-03   1.1571313e-03   1.1519638e-03   1.4945239e-03   1.5137092e-03   1.7542391e-03   3.0584682e-03   3.1624125e-03   6.9423087e-04   8.0741075e-04   2.9564986e-03   2.1264808e-03   1.1956222e-03   2.4834226e-03   2.4046990e-03   2.4389289e-03   1.1428932e-04   4.1572751e-03   2.6270682e-03   3.3826290e-03   1.0906814e-05   3.3779688e-03   3.9749243e-03   1.6265579e-03   2.0735613e-03   1.7238890e-03   2.6977636e-03   1.8191981e-03   5.1180139e-04   3.3068455e-03   2.9977980e-04   3.0495320e-04   9.6732841e-04   1.7461140e-03   1.4560452e-03   1.4920651e-03   2.5772801e-03   1.7019143e-03   1.0341988e-03   4.0085546e-03   3.6492138e-03   7.4340196e-03   7.9703529e-03   1.4966880e-03   7.8440192e-04   7.7789554e-03   4.4532033e-03   2.2360209e-03   5.9110335e-03   4.1723764e-03   3.6115483e-03   1.8645164e-03   8.6587941e-03   6.9790025e-03   5.9223579e-03   1.3508421e-03   6.9679643e-03   8.8100022e-03   4.3884451e-03   9.3956602e-04   3.8113149e-03   3.5744927e-03   3.3082295e-03   7.5316334e-04   3.6491972e-03   1.6320684e-03   1.1884181e-03   4.5803930e-04   2.1497659e-03   4.0210128e-03   2.8148066e-03   1.4099016e-03   2.8014283e-03   2.0075866e-03   1.7351697e-03   8.4094224e-03   6.5677927e-03   3.9418601e-04   3.5055970e-04   7.1718250e-03   2.0973679e-03   6.4851765e-04   3.3744442e-03   1.5292791e-03   9.4071576e-04   1.7144529e-03   5.4753391e-03   5.4188405e-03   2.5828658e-03   1.5301373e-03   3.8027206e-03   7.3328244e-03   3.1192913e-03   6.2731613e-04   1.7741918e-03   8.4678687e-04   1.1412463e-03   3.3683903e-04   1.4744098e-03   1.1279305e-03   6.7560808e-04   1.3395103e-04   7.7360874e-04   2.7301747e-03   8.0481079e-04   5.3215427e-04   1.0082007e-03   2.3386408e-04   4.5650335e-03   2.1085336e-03   8.9398060e-04   1.5597528e-03   2.5626398e-03   8.9643929e-04   4.6401620e-04   2.1474828e-04   9.4200330e-04   7.4363388e-04   8.8544521e-04   1.1214375e-03   1.5513223e-03   4.7369920e-04   1.2949283e-03   5.0107186e-04   1.9686134e-03   1.5839083e-03   3.0734994e-03   1.1037013e-04   1.0184869e-03   9.4459481e-04   1.6215035e-03   3.1102930e-03   6.4871929e-04   8.4571319e-04   2.1956968e-03   2.1853516e-03   1.4074387e-03   6.7079422e-04   3.0128980e-03   5.5375407e-04   5.9745601e-03   3.5596915e-03   1.0825427e-03   1.1193941e-03   3.8619013e-03   1.7868782e-03   2.6699310e-04   7.4652731e-04   1.5644519e-03   7.6914730e-04   1.1868249e-03   2.1537215e-03   2.8904145e-03   6.7050048e-04   1.5688544e-03   1.1553603e-03   2.3985919e-03   2.8520067e-03   2.1226295e-03   2.6532317e-05   9.5443067e-04   1.5325109e-03   1.7403036e-03   3.8293675e-03   6.2074215e-04   7.8759073e-04   1.8993585e-03   2.7454611e-03   2.5765044e-03   1.0363780e-03   2.0443972e-03   1.4335859e-04   1.4016332e-03   5.4805806e-03   6.7405649e-03   6.4579738e-04   5.1748633e-03   6.3487765e-03   4.3874825e-03   6.7084849e-03   8.1049162e-03   2.6677096e-03   4.6345484e-03   1.7447861e-03   7.4893653e-03   2.9062036e-03   5.4610122e-03   3.0610024e-03   2.8530196e-03   9.9111331e-03   5.6471487e-03   8.9070297e-03   6.1633735e-03   5.5983777e-03   9.1911029e-03   4.0109945e-03   4.6927139e-03   7.3914201e-03   7.0233589e-03   3.0645626e-03   6.1283907e-03   1.0939049e-02   7.1096522e-03   3.7615860e-03   5.7439366e-03   2.3434979e-04   2.1625792e-03   4.1436319e-03   1.4386017e-03   3.2647240e-03   4.5819077e-03   2.2920937e-03   1.0610016e-03   6.9564930e-05   3.4218787e-03   2.8472107e-03   1.7665885e-03   1.7134963e-03   1.2022963e-03   8.8958832e-03   3.1032776e-03   5.2642601e-03   3.2432815e-03   4.6032265e-03   6.0005810e-03   3.1610099e-03   3.7408101e-03   6.4052558e-03   4.8371122e-03   1.3589516e-03   3.3936977e-03   9.2321743e-03   4.6963171e-03   5.0386940e-04   4.2984797e-03   8.6973796e-04   3.5526497e-04   1.7666127e-03   7.2192984e-04   6.5802622e-04   6.6868074e-04   3.2431480e-03   2.9035420e-03   1.6594087e-03   6.4854242e-04   2.1612810e-03   4.9124735e-03   1.3725331e-03   1.5050690e-03   9.8777331e-04   7.5260407e-04   4.1403958e-04   1.4453279e-04   1.2645371e-03   4.6600326e-04   2.4792089e-04   4.5627999e-04   4.7560079e-04   1.1214322e-03   2.2091820e-04   1.5167980e-03   7.9735767e-04   5.8276719e-03   2.5886189e-03   4.3280198e-04   2.9205975e-03   2.2021650e-03   1.3597486e-03   9.5466012e-04   5.1915037e-03   4.8194588e-03   2.6659023e-03   8.3877743e-04   3.6595156e-03   5.4665486e-03   3.2603866e-03   3.5246614e-04   1.2546385e-03   1.3738455e-03   1.7317120e-03   4.0173517e-04   2.8852033e-03   4.3207236e-04   2.1872967e-04   1.7262684e-04   1.6274416e-03   2.8950267e-03   1.1933707e-03   5.1057942e-04   6.2761497e-04   3.2515433e-03   4.5844712e-03   2.0397580e-03   4.4892831e-03   5.6236454e-03   2.1663608e-03   1.9457792e-03   4.4715761e-04   4.4562273e-03   2.6795180e-03   2.6855442e-03   1.3224094e-03   1.8950095e-03   8.9432615e-03   3.4981521e-03   6.3671383e-03   4.3127165e-03   4.9533188e-03   7.5137514e-03   3.1187047e-03   3.8229023e-03   6.6814123e-03   5.8612561e-03   2.0597987e-03   4.3006086e-03   9.5397630e-03   5.0775992e-03   1.3692874e-03   9.6403546e-04   1.3966479e-04   8.6664284e-04   1.6597338e-03   1.3212159e-03   1.4578093e-03   1.0432500e-03   1.9220792e-03   8.7918940e-04   4.4168060e-03   5.0670419e-04   4.4696559e-03   1.4208846e-03   1.1004494e-03   1.6436932e-04   1.5507648e-03   1.1191058e-03   1.7495883e-03   1.6621469e-03   2.5414268e-03   8.8363295e-04   4.0096791e-04   3.3482530e-04   4.2345389e-03   1.9374158e-03   1.2770848e-03   1.0395507e-03   3.9095383e-04   9.2829494e-04   2.8992176e-03   3.2975300e-03   9.5393320e-04   1.0925514e-03   1.6776296e-03   3.8507253e-03   2.3805613e-03   1.2082502e-03   2.8135004e-04   4.7639114e-04   8.7356741e-04   7.4310336e-04   2.3860646e-03   3.8892953e-04   3.1610282e-04   8.0643344e-04   1.4728895e-03   2.0712058e-03   4.6512964e-04   1.1229948e-03   8.8791739e-05   1.1956364e-03   1.3055469e-03   1.5870433e-03   3.7223827e-04   1.0219838e-03   4.8252621e-04   2.1760282e-03   1.1580239e-04   1.5036929e-03   1.5974284e-03   4.9006747e-03   5.1331960e-04   1.6812595e-03   1.3616634e-03   2.7816530e-03   3.8434871e-03   1.4972893e-03   1.8359326e-03   3.6884416e-03   3.0552141e-03   1.4996272e-03   1.2110783e-03   4.7697841e-03   1.3648602e-03   3.9191527e-04   1.9808749e-03   1.8113262e-03   2.3841094e-03   7.8154360e-04   2.2164780e-03   1.0439462e-03   5.1766229e-03   1.1157470e-03   3.6934914e-03   1.2626931e-03   5.1659909e-04   5.8959899e-05   1.4097594e-03   7.9470954e-04   1.7881991e-03   1.5872251e-03   2.1165612e-03   7.0368642e-04   9.2823209e-04   1.5533041e-04   3.3160103e-03   1.5048956e-03   2.0235000e-03   2.4966081e-03   3.5807846e-03   4.7284012e-04   2.2730788e-03   1.2853266e-03   5.0519729e-03   2.3762808e-03   2.2444800e-03   6.5500299e-04   2.4750944e-05   4.4815197e-04   1.3292061e-03   1.4780836e-03   1.3932149e-03   1.1924273e-03   1.5277304e-03   1.1896691e-03   2.0673918e-03   2.5400150e-04   1.8225589e-03   5.4227610e-04   2.9880363e-03   1.8314313e-03   2.5238977e-03   5.5757663e-05   2.3698503e-03   2.8213423e-03   1.3040881e-03   2.4190319e-03   1.1221589e-03   2.3332880e-03   1.5386845e-03   7.3215728e-04   3.3801838e-03   1.6264024e-04   2.8457958e-04   1.3051710e-03   1.8856170e-03   1.1599202e-03   1.2252261e-03   2.8396493e-03   1.3307965e-03   7.9081662e-04   1.1208231e-03   3.7513747e-03   2.2532467e-04   1.8915999e-03   1.8066444e-03   7.8138393e-03   1.7396624e-03   2.9887611e-03   2.1626603e-03   4.5716343e-03   4.7705983e-03   3.1616233e-03   3.6125170e-03   5.9695278e-03   4.2653532e-03   1.8208998e-03   2.2513824e-03   7.5822521e-03   3.0950854e-03   2.6638425e-03   2.3329339e-03   1.2833498e-03   1.8503904e-03   7.6221882e-04   7.7332789e-03   2.4545666e-03   4.1819304e-03   2.3678329e-03   3.7122984e-03   4.8118232e-03   2.5553184e-03   3.0167737e-03   5.3596333e-03   3.8038292e-03   8.6990936e-04   2.5148680e-03   7.9707274e-03   3.8479364e-03   3.0845972e-03   3.4545687e-04   3.2912795e-03   2.5772857e-03   4.0614792e-03   4.9082550e-04   6.4992316e-04   1.0688017e-03   2.7640538e-03   2.9796108e-03   1.9652949e-03   2.0639503e-03   3.2701588e-03   2.6492756e-03   2.3500195e-03   8.8549039e-04   3.5901884e-03   9.2048730e-04   3.0276112e-03   3.6195589e-03   1.4632965e-03   2.1763560e-03   1.5224813e-03   2.5475111e-03   1.6768950e-03   5.4331181e-04   3.2527051e-03   2.4129313e-04   2.7799169e-04   1.0453548e-03   1.7267901e-03   1.3027778e-03   1.3633707e-03   2.6503970e-03   1.5759024e-03   2.1731558e-03   1.7887862e-03   5.7263386e-03   8.5148931e-04   1.6383081e-03   1.3458097e-03   3.3594814e-03   3.6389958e-03   2.2301817e-03   2.5225544e-03   4.3534713e-03   3.1787209e-03   1.6954559e-03   1.3061945e-03   5.4111697e-03   1.7803664e-03   4.1741292e-03   7.9197469e-03   2.2821957e-03   5.7150571e-03   5.2344879e-03   5.9478982e-03   9.4860449e-03   3.0218268e-03   3.9157169e-03   7.0424278e-03   7.6315025e-03   4.1845322e-03   4.7751866e-03   8.3019483e-03   3.6628005e-03   5.6294536e-03   2.4239872e-03   2.7647556e-03   9.2421646e-04   1.7874511e-03   2.0292522e-03   1.9168834e-03   1.9458286e-03   3.1481713e-03   1.3908818e-03   1.3324310e-05   1.1782972e-03   5.7639460e-03   3.2058410e-03   2.4140579e-03   2.0956665e-03   3.1463866e-03   1.2261330e-03   4.0134358e-03   1.5054952e-03   1.1240475e-03   4.7360391e-04   2.7309553e-03   5.1301270e-03   2.4137049e-03   8.9922816e-05   1.2592279e-03   8.6164876e-04   1.2616309e-03   1.6936265e-03   3.4914911e-03   6.4024254e-04   8.0798030e-04   1.9823430e-03   2.5037231e-03   2.1768005e-03   8.4515239e-04   2.3117307e-03   2.1993248e-04   5.6812764e-04   1.3931392e-03   1.4308209e-03   1.6084351e-03   1.3403960e-03   1.4811963e-03   1.2106398e-03   2.4235208e-03   3.5787719e-04   1.6247178e-03   6.1681362e-04   9.2162383e-04   6.4491663e-04   1.4082859e-03   1.1774797e-03   1.5785221e-03   4.0122185e-04   7.3237681e-04   6.4530654e-05   2.8852212e-03   1.3991525e-03   1.5175131e-03   5.9336508e-04   2.9036861e-04   2.0099198e-04   5.5129609e-04   1.5179733e-03   6.8841417e-04   1.3866758e-03   1.2880812e-03   3.2376306e-03   2.6196338e-03   2.0860993e-03   2.5676122e-04   1.7880288e-03   9.1594192e-04   3.5976292e-03   3.2249197e-03   6.3653022e-05   8.5949029e-04   1.8263557e-03   1.6881339e-03   9.7411877e-04   1.7845049e-03   6.1330704e-04   4.6521065e-04   1.3489557e-03   1.6857799e-03   7.7549379e-04   1.3461987e-03   6.0478443e-04   1.0485877e-03   2.7784351e-03   1.1708179e-03   5.9587066e-04   1.2049026e-03   1.1592978e-03   4.9960727e-04   2.5830270e-03   2.2390567e-03   9.5053595e-04   5.2396832e-03   2.8622802e-03   2.1952710e-03   8.7416055e-04   1.1307517e-03
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7c6b67fa43c5fef11101d28dd46f4c1b325b65ee
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-cosine-ml.txt
@@ -0,0 +1 @@
+   2.5695885e-01   2.6882042e-01   2.3470353e-01   2.9299329e-01   2.2742702e-01   3.1253572e-01   2.4986352e-01   3.0770122e-01   2.5191977e-01   2.7931567e-01   2.8133743e-01   2.6316239e-01   2.6067201e-01   3.2982339e-01   2.8993002e-01   2.5506356e-01   2.8728051e-01   2.4952121e-01   2.8613379e-01   2.6894157e-01   2.3606353e-01   2.1670935e-01   2.3470242e-01   2.4294172e-01   2.4376454e-01   2.3228195e-01   2.3554918e-01   2.4851241e-01   2.0917546e-01   2.4971488e-01   2.4264224e-01   2.7405461e-01   1.9086415e-01   2.6346574e-01   2.5908801e-01   2.2138495e-01   2.2910721e-01   2.2169919e-01   2.0660065e-01   2.3207102e-01   2.5554688e-01   2.5153751e-01   2.6073682e-01   2.0919640e-01   3.3984433e-01   2.7503792e-01   2.1709889e-01   2.7068095e-01   3.0307041e-01   2.4529612e-01   2.2987015e-01   2.7736967e-01   3.0310708e-01   3.0544316e-01   1.9205388e-01   2.7098021e-01   2.0722466e-01   2.6387343e-01   2.8998308e-01   2.2633010e-01   2.5177075e-01   1.6347011e-01   2.4036389e-01   2.6485871e-01   2.8491965e-01   2.2273619e-01   2.4511873e-01   2.5930533e-01   2.6589995e-01   2.7797191e-01   2.3357373e-01   2.4279909e-01   2.3544532e-01   1.9447286e-01   2.3993534e-01   2.0856243e-01   2.2125251e-01   2.1988206e-01   2.0590152e-01   2.6441952e-01   2.0052739e-01   2.2978496e-01   2.4483670e-01   2.3879510e-01   2.9398425e-01   2.7541852e-01   2.3777469e-01   2.9151131e-01   2.0672752e-01   2.4584031e-01   2.7475025e-01   2.7064343e-01   2.5603684e-01   2.6165327e-01   2.4233155e-01   1.7892657e-01   2.6111203e-01   1.9965682e-01   2.4201634e-01   2.6281353e-01   3.1928221e-01   1.9731963e-01   2.7752862e-01   2.2633080e-01   2.6783167e-01   2.5447186e-01   2.6424243e-01   2.1960672e-01   2.2984242e-01   2.8788736e-01   2.8681630e-01   2.6949787e-01   2.3993685e-01   2.4440073e-01   2.5010397e-01   2.3230769e-01   2.9879682e-01   2.4200592e-01   2.6957748e-01   2.6073240e-01   2.6355347e-01   2.3403674e-01   2.2411413e-01   2.2956729e-01   2.8105976e-01   2.2913304e-01   2.4898608e-01   2.3304000e-01   2.2692988e-01   2.3728251e-01   2.2552243e-01   2.0364084e-01   2.3359511e-01   2.6619167e-01   2.6666588e-01   2.3666880e-01   2.7239113e-01   2.0146697e-01   2.3045559e-01   2.1695523e-01   2.1387991e-01   2.2366404e-01   2.2809635e-01   2.0901297e-01   2.2441100e-01   2.3418882e-01   2.8552218e-01   2.4609015e-01   2.0282492e-01   2.5940295e-01   2.7407006e-01   2.3344890e-01   2.1179142e-01   2.7047821e-01   2.9832768e-01   2.0859082e-01   2.8881331e-01   1.8384598e-01   2.5286491e-01   2.2012615e-01   2.3615775e-01   2.6845565e-01   2.3356355e-01   2.7164193e-01   2.4179380e-01   2.5247973e-01   2.5637548e-01   3.2126483e-01   2.3100774e-01   2.8832546e-01   2.0043257e-01   2.7918333e-01   2.4884522e-01   2.2904723e-01   2.3738940e-01   2.9461278e-01   2.9782005e-01   3.0332073e-01   2.5175971e-01   3.1203784e-01   2.6611535e-01   2.3713507e-01   2.2203585e-01   2.3602325e-01   2.5093670e-01   2.6860434e-01   3.0137874e-01   2.3759606e-01   2.6840346e-01   1.9200556e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-double-inp.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-double-inp.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7a77021775ddb61d226aa8c4ba60f0af013e4a6c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-double-inp.txt
@@ -0,0 +1,20 @@
+8.278938049410748956e-01 9.035293984476246987e-01 1.862188994679486731e-01 8.921151312310462433e-01 2.061859119379583216e-02 3.440636727385729676e-01 1.533779912830328662e-01 5.701372300009802663e-01 5.510020730211558915e-01 1.792362258426003496e-01 8.086175120876580857e-01 6.115487184317183189e-01 1.233471787164852618e-02 1.441643531871039663e-03 4.044309209045688913e-01 3.561398959499905148e-01 1.281985712929750720e-01 8.663300833847481508e-01 8.696027786291581352e-01 3.611727370363766454e-01 5.283537658772616830e-01 1.440241088090119526e-01 3.112457227138950566e-01 6.031280796897889873e-01 9.230324792742518047e-01 2.332121881136874908e-01 3.192652267403439659e-02 3.466206294995559656e-01 2.988687728046366399e-01 5.116749542048093513e-02 2.584975830914494344e-01 4.302023478042227289e-01 8.003972751713522849e-01 9.364931911368097328e-01 9.737098649964673891e-01 4.718038453972229762e-01 4.526591686607864817e-01 1.056485678520797666e-01 5.883019714285405710e-01 3.846092237676981274e-01 6.461500053435473845e-01 1.013239729848824933e-01 1.216151561651189761e-01 5.159668929484659827e-01 8.452074473510227115e-01 9.885170962247968873e-01 7.623883073490128615e-01 2.291163243615434997e-02 5.775530980802381364e-01 7.820699896828091635e-01 8.239186345842965942e-01 3.391800105260227571e-01 9.546318451614538292e-01 3.789677917867695367e-01 4.526533399649290690e-02 8.366786473238587707e-01 3.082636811049858094e-01 1.173936820793450853e-01 7.631994969169442200e-02 2.997416650722183329e-01 5.795208655160232203e-01 3.942350892542011431e-01 1.175126383297261379e-01 4.928232513950027149e-01 9.421293996225950096e-01 8.365391053841342295e-02 6.868059693571844093e-01 3.589527962429440722e-01 7.592939427166059962e-01 5.623849466131448649e-01 2.110746828032050715e-01 9.824683704668600859e-01 2.661230142246236996e-01 6.162272315007123469e-01 5.023254536607497656e-01 5.202854476669782624e-02 5.835090668842095596e-01 7.864642118889143552e-01 2.504012386867506823e-01 6.728308641135989365e-01 4.610793534576096420e-01 4.820508770515909980e-01 9.720403251022265989e-01 3.100069285263498120e-01 7.681017126461753275e-01 7.956539306007082146e-02 2.593389637887737464e-01 1.137852590403054531e-01 3.885303073284454012e-01 8.599094660075957686e-01 5.215167875918280682e-02 1.620908248572288102e-01 1.859236090457663249e-01 6.247716512610480555e-01 3.415128495520775020e-01 7.034903368378029320e-01 6.037564640019568163e-01 2.338969434423310290e-01 1.002104885609900187e-02 7.866058403969036217e-01
+8.033694116033356369e-01 8.653264545544031572e-01 7.468340410754038539e-01 6.362430919910603278e-01 5.120006306625468628e-02 9.503348372633585450e-01 4.697732609626817935e-01 4.221305288459429317e-01 3.153452119838391354e-01 2.991014843442657556e-01 1.190667967280257811e-01 3.486567714509342109e-01 8.289493649885054660e-01 8.454811050800014049e-01 9.149673018211901265e-01 7.708707837193897738e-01 2.640157732122547785e-01 2.107897022189605396e-01 4.207633055054439408e-01 6.719500284654699174e-01 1.458031684893063007e-01 1.800412735886125493e-02 8.402733435220011149e-02 4.206760156883160295e-02 1.376933515041314227e-01 1.716717341022133692e-01 1.788220727652158892e-01 8.224310433402118869e-01 7.729093666867475898e-01 2.064223621025984556e-01 9.592092036227207741e-01 8.312490243754996344e-01 6.673289360369902834e-01 4.632847903690773261e-02 7.643954098358983762e-01 9.359341525615098023e-01 1.914966319163026176e-01 4.536590469402868031e-01 8.640836016538007147e-01 3.941529178175462444e-02 5.602101995205478469e-01 9.263806161941660067e-01 1.555995325944817820e-01 6.172208102950116348e-01 6.335576752812099866e-01 9.766975460368043649e-02 4.475795689539874278e-02 3.248842796104995934e-01 5.700377122149502540e-01 9.066962967256807504e-01 5.458460621505676347e-01 6.833401285581487405e-01 2.887244409544044155e-01 1.316338647016834784e-01 2.325673305245992140e-01 4.150121963188406760e-01 3.834845466366055833e-01 8.149365773968725302e-01 1.867003849450201702e-01 3.170322173543018707e-01 6.832093662682684476e-01 1.729728518929105618e-01 9.236557359702636250e-01 9.152941252150086360e-01 7.224879983096620384e-01 8.557920626598064517e-01 5.344883059251644974e-01 4.876873274449112783e-01 8.308277804506420949e-01 3.916624489322212410e-01 3.459695122273966916e-01 4.033512499027409604e-01 6.555726444913008155e-01 7.138452409380238173e-01 1.683937314599968094e-01 1.769382143486440961e-01 7.588683655178136700e-01 3.750589892880819010e-01 7.525176245126207197e-01 6.083961152538303052e-01 1.145972309907993258e-01 6.239614485809552580e-01 1.307655482065895880e-01 8.530458750670916190e-01 4.801602070124768584e-01 8.168122189863546989e-02 3.793139622744635675e-01 1.496986997776840189e-01 7.129023878302899186e-01 6.830979237438047358e-01 7.635375943876505644e-01 1.824004963251233402e-01 5.764695848992339444e-01 8.865113248731604223e-01 5.784337085544002388e-01 9.700026628755119562e-01 7.318207347905059112e-01 3.851401393936705331e-01 1.774291851193399161e-01 9.763423229242296220e-01
+9.287178470949695175e-01 1.748282433617460718e-01 9.238531711586964734e-01 8.291274445125006443e-01 9.513259272578692416e-01 7.486316801165745494e-01 6.257378457524477300e-01 2.062711693536473101e-01 3.970721244184766130e-01 2.738325225026445597e-01 8.735038948299954642e-01 5.415282140033768066e-01 5.176317904298315398e-01 5.347036264518250093e-01 7.482056965410627258e-01 4.140672582824351800e-01 8.709067272363142376e-01 9.499605569181273079e-01 5.380266748336398619e-01 4.369252161707162241e-01 8.235722216228258397e-03 4.308187193646527691e-01 6.030581482859224129e-01 7.316831195156517920e-01 5.540499846834291420e-01 2.044203040111662872e-01 8.645251782981867583e-01 1.816095717570278545e-01 9.639119168018674966e-01 3.572031072322333634e-01 5.580226816834680248e-01 5.586629875016585478e-01 7.213854320902782780e-01 8.513998260042524580e-01 6.308764347277173723e-02 4.299855362100638567e-01 8.789303907444128150e-01 9.178850359236285783e-01 2.275205845091231582e-01 1.899395443939643213e-01 7.103070862773533944e-01 9.450015289553428399e-01 1.691856364522159595e-01 7.368719616877857925e-01 9.600189536623833231e-01 5.128846522932454244e-01 6.209162727118655578e-02 7.992250598838029907e-01 9.141050280518014937e-01 1.471297785256820978e-01 7.466162372930541524e-01 4.656107650642931084e-01 6.399324135161845728e-01 2.023617619481610230e-01 1.019104648900100996e-01 4.390693688536728700e-02 9.822620353006089600e-01 2.881951852926285529e-01 6.191575015960482098e-02 8.989580763251467932e-01 4.635958631890454429e-01 1.781973138114967270e-02 7.906911683818984571e-02 6.525270776225711167e-02 3.620583622807886925e-01 2.651673718940715796e-01 5.829372395929610651e-01 2.118159824373908595e-01 5.900287159143694504e-01 9.405929925178391215e-01 9.262415619063500971e-01 5.639581506302312475e-01 4.529556154689695635e-02 2.873819210518682166e-01 5.718545934306838996e-01 9.877670791317306742e-01 4.120364488714320927e-01 9.896078045634184583e-01 3.796586997026456523e-01 1.178183652203194098e-01 6.641068305236120795e-01 4.045960610587706618e-03 2.262690437428437340e-01 7.839938005832693957e-01 7.695391333937223743e-01 3.713918392552509884e-01 4.245533341514018399e-01 1.475072494020331915e-01 6.011975181419888514e-01 5.158174017998343741e-01 1.788706151398071764e-01 8.880707130134481986e-01 6.463351030474082659e-01 6.499920635615744624e-01 8.570273676455353318e-01 6.055019270899113515e-01 2.123561211054603159e-02 2.027688787664126968e-01 1.930834215328548487e-01 5.131906052747271518e-01
+2.599990881903107010e-01 6.767857524909899336e-01 7.188217446352963558e-01 3.037178903357997672e-01 4.252381412838680541e-01 4.070924411439535984e-02 8.426710493038247485e-02 8.301517457289483426e-01 8.254603255702420705e-01 7.258533909453509514e-01 9.958706809470796451e-01 1.323408451651194584e-01 8.523995455245143571e-01 2.572405385832454705e-02 4.715363690065482727e-01 7.920130365690022378e-01 7.613745641534582775e-01 5.108305991695683002e-01 7.908714335912382376e-01 4.641131983754837043e-01 3.112627109831845873e-01 4.218013908715474436e-01 3.291577909008427394e-01 2.538715054071232213e-01 1.362470842487485401e-01 2.716429790290709745e-01 1.485325814161112534e-01 4.514539027544387517e-01 6.900835128673067365e-01 7.793407072946112457e-02 5.938024345270752624e-01 1.497853829906865553e-01 5.399567982652856424e-01 1.419209916759478496e-03 7.719776132867679497e-01 3.130795105576239523e-01 6.670071611167494030e-01 8.900596881158256979e-01 8.011158503301568645e-01 7.089295605187424520e-01 4.671116382997058114e-01 6.682965170673403899e-01 6.524835265739736823e-02 5.454288420771494783e-01 7.751910790556310049e-01 8.192595541387335256e-01 3.098855848167891835e-01 3.689971355659119601e-01 8.666507475054133769e-01 2.749042684253171220e-01 3.566565602478318775e-01 4.838173174723044978e-01 1.032975933616413489e-01 5.063065339610417492e-02 5.791168455729079900e-01 3.573337411289496668e-01 6.714098909652352898e-01 2.917057662433912846e-01 2.654964332620638467e-01 7.171804039048814694e-01 3.314488637898249657e-01 5.230399837442840649e-01 6.866534136026025692e-02 1.252966394621071178e-01 5.349397882659551184e-01 2.841423847455760709e-01 4.158473635710734362e-01 7.197062989831272128e-01 5.123869045047864113e-01 8.675622821594339840e-01 8.097441845042540054e-01 7.317178252133832439e-01 3.300847596465853462e-01 5.922311859141077273e-01 8.852619511417836318e-02 2.673412917259408994e-01 6.878259052441990651e-01 3.223000927116328462e-01 8.859387123976615319e-01 5.722722388300067742e-01 8.254877606669521750e-01 5.705299682290687624e-01 7.046478734972855262e-01 1.316324413616759559e-01 3.056358395675535800e-01 2.396516834600909140e-01 2.041201422493257311e-01 1.610755140653103989e-01 1.617012564641111538e-01 4.449920510036902144e-01 2.731012972755201274e-01 7.826874666257994662e-01 5.193612375350010746e-01 8.688804522977213729e-01 3.742157602758655610e-02 6.649628920608219307e-01 5.978149424619171315e-01 5.345645500553952711e-01 9.443202650415919441e-01 6.105837075491723498e-01
+6.387761328141735584e-01 4.210087412162694109e-01 3.777306694964789324e-01 3.576349403292201634e-01 7.272699618880260619e-01 9.173392803607671731e-02 1.212535698300880593e-01 3.871229381194544183e-01 7.735150198351389284e-01 4.687200483013695962e-01 5.161778571874678923e-01 9.839646447226980674e-01 8.626932748911960713e-01 9.618485576577924245e-01 2.997996427525421170e-01 3.955404657388794654e-01 8.480126027102616870e-01 8.194992325050480808e-01 2.800213436873294492e-01 7.188391466620779324e-01 2.289766105875049584e-01 3.838547514028287644e-01 1.363553401061209369e-01 2.131328253542326134e-01 2.666779468144075960e-02 3.252883844200405994e-01 4.207860197469600605e-01 2.991365385037647595e-01 9.180779845534067229e-01 8.787338732192649937e-01 5.404510999105649471e-01 1.735493827761729335e-01 7.405224640747264386e-01 3.927355563629583157e-01 3.957109873399460298e-01 1.313029813325972128e-01 6.434498219738993274e-01 7.162213694578050127e-01 6.454998257494671821e-01 3.808124530008022424e-01 2.027201015737234435e-01 6.667632842770417900e-01 1.609491052365198405e-01 1.192413785409307536e-02 4.546773323526854815e-01 7.733541911050207940e-01 3.902525737195561284e-01 4.006023779897505133e-01 5.156517815815246930e-01 6.135685498584592112e-01 7.062153114980724844e-01 5.505858882117883324e-01 3.541308807182554919e-01 5.237151122342533771e-01 5.230649229131387745e-01 1.973541027697351957e-01 7.940327858595511712e-01 9.998588700623055603e-01 3.878271015153827994e-01 4.455006584967207139e-01 8.376414508056347907e-01 3.310833863524501597e-01 8.020469097392601832e-01 1.890327633084128989e-01 3.830289472395409511e-01 8.605040171046141051e-02 9.978185524023941433e-01 8.333890591892906263e-01 4.509013468741837061e-01 6.355778557686052599e-01 1.422515991097305088e-01 9.549891485963732940e-01 7.535776302868563148e-01 9.306005301880662106e-01 2.444330347211679522e-01 5.828218427569508142e-01 1.261938242968304591e-01 2.829188731405173352e-01 8.100246952078660190e-01 2.032739130996042975e-01 3.997268448390065565e-01 3.882777703107541667e-01 1.102505652624736765e-01 5.826634725328041498e-01 6.508734477956333864e-01 1.777287661702166011e-01 4.857051012052149286e-02 6.850537712379254351e-01 5.012281307761055071e-01 3.329154880061502286e-01 5.006261767216675374e-01 4.542081454976160115e-01 6.777801995399822532e-01 4.271303586474960445e-01 7.820470659692947413e-01 5.143462618485082904e-01 4.071273891563575997e-02 8.503383643856671226e-01 6.877485768345151795e-01 6.498843855014626580e-01
+5.539512747016193117e-01 6.329206647391879548e-01 2.798533500321682688e-01 4.825977295850051307e-01 7.625297023172977751e-01 9.081309101427640362e-01 4.124792086535029600e-01 3.647019658319609059e-01 7.529595202332928228e-02 3.072404010876803593e-01 7.890673660964639957e-01 4.079781478915127657e-01 1.440519120695739064e-01 2.538968953804546791e-01 1.595028243568367143e-01 9.066545851872198636e-02 6.367601114674349416e-01 7.622263643880089479e-02 3.015728236404162654e-01 2.424070469873378375e-01 5.711440390241000475e-01 5.717001375511508998e-01 2.237853674032181939e-01 7.112101625753678436e-01 4.321054197012103026e-01 2.505322169010260058e-02 5.877307077139551916e-01 4.415771174397812304e-01 3.766022855145171322e-01 9.803490652619811785e-01 1.229258314111529860e-01 8.108351868714478439e-01 8.558595456964329662e-01 2.168217533833206589e-01 2.034022719386595623e-01 8.687457137579783772e-01 9.013327195854559104e-01 8.156766512673154779e-01 2.717576187546973943e-01 1.756417893371479133e-01 7.555856977566548505e-01 6.708809351312817748e-01 8.998789237886926085e-01 1.936367585946979775e-01 7.949724635465026390e-01 3.164799312763589834e-01 5.493048513173155456e-01 1.608917269168268493e-01 3.048667492191803330e-01 5.599401537727016764e-01 5.779501360842279611e-01 1.296714605309662316e-01 9.160752328055997706e-01 8.058674476110374574e-01 4.385508937505578908e-01 9.212419718012100356e-01 2.249887451242467140e-01 6.283927745352599903e-01 3.778992451536005159e-01 3.571958698867505611e-03 7.276526470528231760e-01 9.051678673805297892e-01 8.465837072484881931e-01 4.548317505393462135e-02 3.189318261926020748e-01 4.446388607398673587e-01 4.292356336344156365e-01 4.203980977718795309e-01 4.698059253071955599e-01 6.151991200848159203e-01 8.479986139404802614e-01 9.870993262459623052e-01 3.164206525899861955e-01 6.464672171639846976e-01 8.508781429592480183e-01 4.733667503354813677e-01 8.076014176740163863e-01 6.671443255679101458e-01 6.639213267047979761e-01 3.681688930741919830e-01 4.679870252651611162e-01 1.790041740686979521e-01 8.446070273663058847e-01 3.350737544979878191e-01 6.600272349677447359e-01 4.356083218487936115e-01 7.995134167346013010e-01 9.083660261041469619e-01 9.743975306734570241e-01 8.144839650654719376e-01 6.865011984586443239e-01 1.709747281999153268e-01 8.534933687161740945e-01 9.494753729726415070e-01 8.140124992294850426e-01 8.936241255316055287e-01 9.087976860818796077e-01 9.030687493451383663e-02 4.025785149840914734e-01 9.592005611533803711e-01
+5.714058727476275523e-01 7.913573761505965365e-02 9.301773447377043036e-01 4.302822433307075256e-01 4.618892554175407783e-01 1.882471300213742760e-01 6.231472878215863487e-01 2.350437450940777717e-01 8.483410480771292894e-01 8.580803842040533036e-01 4.246398783388435350e-01 5.667321565946502604e-01 7.247417018955526480e-02 5.373984417482219333e-01 8.794242091541510931e-01 9.699025554453030162e-01 8.254197752548814160e-01 7.739723972867470492e-01 6.365819416181199841e-01 3.451230687021222820e-02 1.829102490094791644e-02 9.179618383026147965e-01 4.481667270072077214e-01 4.771270250445739380e-01 1.588469404953456454e-01 3.766332499200618633e-01 5.057026248713025751e-02 9.125900914275182352e-01 8.438133644246305076e-01 3.282972411719701222e-01 6.042003956122835584e-01 7.423456085393266290e-01 1.389012737541106546e-02 3.674754266702850991e-02 2.126646727703802586e-01 3.085666164246750887e-01 4.303440338750976757e-01 1.749037978865556342e-01 2.177699993322510519e-01 6.675614739991906355e-01 1.926533336347433512e-01 8.032010572660308600e-01 4.611412981769049679e-01 9.907201268457492827e-01 8.973785930837320235e-01 6.286342392657409128e-01 8.111266245859546364e-01 1.154230969025437092e-01 8.382880466301794176e-01 1.053753927827069115e-01 9.921712862234919328e-01 9.041662667920956631e-01 3.626267376021269362e-01 2.262225368932846425e-02 8.669003741626111204e-01 7.597054897704164089e-01 4.700318514995387442e-01 4.338185014241978665e-01 1.205425463362067573e-01 2.413879270602589111e-01 5.483334840461459025e-01 2.042653841254596925e-01 5.452588940366013270e-01 3.164646091706100339e-01 1.878958248945691301e-01 2.188622304737641855e-01 2.970982599823450698e-01 5.952148400199362976e-01 9.614251220149501176e-01 5.446813400697393392e-01 5.900748097930779146e-01 2.653062526715309621e-01 5.459933097767216692e-01 3.174185404661935550e-01 1.412133354129242457e-01 1.487441669790685594e-01 3.953776242211952674e-01 5.274261039692862418e-01 1.756132307607755072e-01 4.481942852746899630e-01 6.390660088765629521e-01 2.860380430081067571e-01 5.866902519902850166e-03 3.026687645174785946e-02 1.952533570196290924e-01 2.154769096186736066e-01 8.920573593276575064e-01 5.644513191915436767e-01 5.551464696654353492e-01 4.378199413349500579e-01 8.685737643974280608e-01 7.493934764293597173e-02 9.556749726352036234e-01 6.386433482536227890e-01 8.714694524097754691e-02 1.722786161701279628e-01 6.526867532768643176e-01 8.950304705281527662e-01 6.158198776753203152e-01 9.587176904005377809e-01
+7.705718397401561948e-01 3.165816092999733655e-01 4.334200859975760878e-01 8.639807015515663657e-01 5.576514209532534849e-03 2.456745447057938625e-01 1.664686313299922338e-01 9.637084729617834133e-01 1.083448720752323569e-01 1.865218070380464388e-01 3.730358890475884426e-01 5.015351872138350542e-01 7.420710795841709562e-01 4.919420674769692248e-01 3.426558201886464872e-02 8.669984854934246199e-01 2.204243734202966376e-01 4.109792246853891662e-01 4.361732572946559472e-01 6.819306998053020763e-02 9.986304248057148447e-01 4.119289455392274313e-01 8.533050041845835487e-01 3.416914861912183632e-01 6.522191951039880697e-01 4.162803668786793088e-01 9.051674379917418189e-02 4.552378661306888397e-02 2.122677193466918633e-01 7.461518531655018105e-01 4.654688019259497489e-01 7.877564083548750373e-01 4.518328005682387127e-01 7.173857464237374248e-01 6.940056370290903498e-02 2.804574410412373764e-01 6.095681113112718652e-01 3.680596478602831123e-01 1.814569150719304025e-01 6.505055517979729807e-01 2.759585245701871026e-01 1.429501104786028431e-01 7.813891153083207808e-02 8.925314279991185540e-01 6.692056941902108091e-01 1.915141341107173822e-01 5.750233129581091562e-01 2.051961006251528108e-01 3.849013692629975614e-01 9.503788222043518807e-01 7.690419386411734282e-01 9.978147530014782607e-01 1.719584162437415298e-01 4.890758882401113894e-01 7.195660736040896399e-01 2.485818040997200828e-01 9.706486601870933928e-01 5.182604282071262558e-01 8.082072245463804983e-01 4.889961284821118248e-01 8.042893959057633158e-01 3.200685313413229593e-01 8.983245016887355661e-01 2.811495336955205371e-01 3.986095833814048417e-01 8.607229214132059436e-01 4.827620119717191960e-01 6.715610252037491623e-01 9.330824374137768329e-01 7.537710530085762750e-01 9.840804224010484269e-01 2.319352541177217564e-01 9.569114943157627229e-01 5.821928104654411351e-01 6.700479524814679788e-01 5.663434680086896211e-01 8.851091082101365526e-01 6.800562815862243315e-01 3.578475213752868589e-01 2.900164669281133367e-01 8.379170683569914235e-02 9.929972839740475177e-02 5.946248553621906741e-01 1.991332889320840405e-01 8.115065723822508792e-01 2.023388190440008616e-01 4.056545651129230823e-01 2.966825350250481552e-01 7.457176343507545546e-01 9.856015771246517954e-01 2.264338016147812160e-01 8.366528670045663141e-01 6.116829813603242849e-01 2.605933184296719274e-01 5.765962146558850643e-01 5.064075092266390188e-01 5.499615769589756287e-01 9.240234698632640020e-01 7.169900155229913530e-02 3.544181364560751168e-01
+8.154844535553099627e-01 4.797965609394789777e-01 7.476703385713100447e-01 9.086708404761600910e-01 3.191752505450355937e-01 7.611128630021511965e-01 6.246790343299296611e-01 1.942001426217137006e-01 2.789860414631386565e-01 3.236359785042408621e-02 3.178191288741717413e-01 8.372264298357038337e-01 8.872692914664047636e-01 9.589758852077276963e-01 3.123722260380168425e-01 8.980164015338999439e-01 7.260784140459818348e-01 6.567013512265649222e-01 1.028743505926521529e-01 6.821705410750319443e-01 6.889838995316139858e-01 5.587525493094736007e-02 6.921487028366646310e-01 3.616312929861494885e-01 1.673758008792780583e-01 6.626504595920326146e-01 9.125680913222075086e-01 1.424077784972291871e-01 6.508496429060767197e-01 6.615417385775157477e-01 9.654167310675311198e-01 5.536662974550183858e-01 7.092622144968085962e-03 6.694595400455760625e-01 1.828533619119211417e-01 3.421514408394116247e-01 1.242580151818144518e-01 9.888774797458224075e-01 9.777955172739735135e-01 4.271370765628749178e-01 1.211608384809655936e-01 1.580132417172936954e-01 3.242705395708289640e-01 3.268994391754735940e-01 5.213767653645562383e-03 4.475169480357120699e-01 9.593245219293577986e-01 6.994304536782350867e-01 7.063863152769014331e-01 8.381620829497931080e-01 2.760441799736219615e-01 3.755200946645842475e-01 3.627729621737311172e-01 9.518310606719182498e-01 3.577273025276901386e-01 3.991159901003488164e-01 4.187060513068554535e-01 7.422605403637314581e-01 6.697944269780702342e-01 6.020599837037767799e-01 1.571185850817550245e-01 7.519860911185742847e-01 6.635775704496444938e-01 9.487848173531471252e-01 7.900030232338028924e-01 4.143783957270819052e-01 5.618429740858444932e-01 3.737804619062014000e-01 6.179941187802344693e-01 6.553638605616040058e-01 1.009709416658691739e-01 4.935037098582963910e-01 5.485489972455533936e-01 1.024147956480448984e-01 1.195764707555347917e-01 4.910516327810896531e-01 3.551185778630389089e-01 3.857601645798814927e-01 2.074975219600547760e-01 2.084038664460790002e-01 5.268616653491025037e-01 6.948014877618717833e-01 6.179744044618615817e-01 7.063658085955483168e-01 7.925757227686872630e-01 6.199016959584816577e-01 1.163676037434490107e-01 7.425752264755586252e-01 5.403115665133301215e-01 2.546191951391015840e-01 6.961300925345208501e-01 4.003013072125547467e-01 5.906120962720950995e-02 5.879915846330325824e-01 1.213602408288709800e-01 3.801780679842765576e-01 1.731477742402802722e-01 4.624568816669496485e-01 3.304453744619206823e-01 8.810445876116090869e-02
+5.140190515373614932e-01 1.419225260054487459e-01 7.777845802285945354e-01 3.327562899409282071e-01 8.916875699762913943e-01 7.212852862736146564e-01 5.727327199433507321e-01 5.897820225918504189e-01 7.318614954542906892e-01 7.393985144455500480e-01 4.531340740296823100e-01 9.903061584426188224e-01 4.213350938331624773e-01 4.542342471963995987e-01 9.788786426453045530e-01 1.881707000343846303e-02 8.005433413647761176e-01 1.523502822273363755e-01 5.630164732287495921e-01 5.946603842470724599e-01 1.225547698678740582e-01 1.531136594724622491e-01 8.157973612638946825e-02 2.752046015644330490e-01 6.809045821946161370e-01 6.455289724528190387e-01 3.830356726830793646e-01 4.446144649678575034e-01 4.969038423960672191e-01 5.497873820641221432e-01 9.471879627821714331e-01 5.933046675329255448e-01 4.099233758501530378e-02 5.790409810134594659e-01 9.546095885251496549e-01 2.608616052375664074e-01 6.910160339170060562e-01 1.293709850476291168e-01 6.407264616302255078e-03 6.186037089828009261e-01 5.537861302543241049e-01 3.527421038298221845e-01 8.033232052121624944e-01 8.128114152830284711e-01 8.319982582278713235e-01 5.939566376046836460e-01 2.291090283499520597e-01 5.438101817725821130e-01 6.881146379117278888e-01 2.421968586304659166e-01 5.874047918543783275e-01 6.210102709484541794e-01 7.041387566450251212e-01 6.959223476278774134e-01 9.133877300988062498e-01 9.230647706207778525e-01 6.856884219815310155e-01 6.997988808693775820e-01 6.177944932528769417e-01 5.512902545683161515e-01 5.818280341729102911e-01 6.538267999985679646e-01 6.946673485935980219e-01 4.817938258357623571e-02 9.352008817207906333e-01 4.774162142215661042e-01 5.768063588692976529e-01 4.589648891483899540e-02 7.998946815651652997e-01 4.434260476954369201e-01 9.850053510925722566e-01 6.648626681529369309e-01 4.606293826856903140e-01 3.309042418210563774e-01 1.438901922508034614e-01 7.986559119276418484e-01 7.037818421334554042e-01 3.605119534240813772e-01 3.785959549258922641e-01 9.562491516841659100e-01 4.997955143590974147e-01 1.029540300938682762e-01 1.819017177001992502e-01 3.665425750262368831e-01 1.688063588370778412e-01 7.030735208313992901e-01 8.922375654244527610e-01 1.055706412056253152e-01 2.664739907746691561e-01 9.906029568647586325e-01 6.043845090140997911e-03 3.495786295043534775e-01 5.989441999519146131e-01 6.776147193866479679e-01 7.012991789852640601e-01 1.825838783477321536e-01 7.612293578749116385e-01 1.564769891240175292e-01 2.762157292905387251e-01 7.641900040015234818e-01
+4.746013333880729768e-01 7.609202966712714788e-01 2.537820854162747830e-01 1.709362234877408460e-01 1.886635378734374813e-01 2.439567014093724229e-02 7.640304718272151741e-01 3.483216170435471382e-01 7.744289278738043514e-01 4.190437573644867353e-01 5.319091476394965934e-02 8.580130976087452233e-01 6.259446446786639529e-01 8.793213970773006150e-01 2.441023074890465994e-01 7.753405549489799098e-01 8.760187573193888300e-01 5.946480724009295393e-02 2.873093046571124631e-01 8.710837851946537924e-01 9.103181731924696596e-01 6.534637257615111272e-01 4.128420398577182793e-01 4.905858108576378607e-01 6.178275806701372108e-02 6.368043900016381320e-01 2.865296941219959148e-01 6.371773028539067241e-01 4.924322796636745325e-01 1.709313290387282080e-01 1.856892551689268700e-01 9.592782603102242289e-01 5.402593764193130976e-02 7.287312244390512506e-01 5.679467572000697073e-01 6.255587794305905724e-02 3.069660218141317953e-01 1.089960430557104232e-01 5.550748245336984965e-01 2.555948886689661803e-01 4.140925514039996980e-01 1.180376445052062628e-01 8.832322629884041820e-01 7.784546946701487169e-02 3.177678935473182698e-01 6.681804863429485764e-02 7.047099396645268854e-01 4.133897376851528582e-01 5.600656990480865627e-01 3.883995683475501837e-01 4.459430113152932362e-01 4.214077227574740681e-01 4.763369230200156235e-01 2.701480661168440545e-01 4.296286564389811824e-01 9.601402258758658936e-01 6.326999441846863359e-01 2.442086919688498670e-01 8.407708423957936938e-01 3.626867985638081437e-01 3.641441713291436733e-01 7.932397565989488530e-01 8.902073520619256941e-01 1.929173010337000838e-01 7.309376779324568973e-01 7.305852858337777977e-01 6.510197444582447313e-01 9.512661608643838695e-01 8.461467164366111016e-01 9.245490147941206605e-01 2.658844813385705663e-01 9.538758859344749208e-01 8.215517204998477041e-01 8.217795540390903097e-01 7.569662091300560780e-01 6.262685322871274218e-01 5.597770510574888725e-01 8.155720175123675197e-01 8.545688745180864965e-01 8.986051518529034610e-01 2.477911506572628708e-01 8.462580108996445860e-01 6.065941220995090255e-01 6.500490804973033665e-01 1.120463882674053169e-01 9.299049132942927010e-02 1.388364074229719858e-02 5.901199124540731367e-01 2.795110110544174464e-02 1.644097083463245124e-01 5.341029647603202646e-01 5.276816677181681570e-01 5.439849107754858304e-01 5.371677986392331405e-02 4.515163125788429488e-01 5.036243367087100964e-01 5.721818679625961801e-01 5.271368612400184617e-03 7.720961020546839304e-01 9.015383457479009266e-01
+8.301526916287945701e-01 8.704609696144033348e-01 2.955689129581380303e-01 1.762209253489944727e-01 2.698172933050072553e-01 1.138095349991521399e-01 4.092588531860634760e-01 8.202978121681584467e-01 2.822241377079557356e-01 6.117376205659387223e-01 7.169923068016897938e-01 9.310256256264415331e-02 3.989664052931106708e-01 1.651874953308862803e-02 7.890202597932294282e-02 9.068686774810821305e-01 5.203866694486933842e-01 4.297748572844445336e-01 5.208786995443430712e-01 2.163224881365530816e-01 7.274307306357226111e-01 1.675784956180090823e-01 5.969822786565782691e-01 8.959750832846602453e-02 1.253794151891943764e-01 5.352628522116801291e-01 2.562706125890066300e-01 6.030433202137867044e-01 8.330717547440393833e-01 9.603613683422040914e-02 7.569714244468559450e-01 3.184801677796517128e-01 1.667069341164499896e-01 3.132470247801235619e-01 6.417752836394801097e-01 6.433909425912354152e-02 4.056860213146201710e-01 3.166772891331335327e-01 9.574059746098845247e-01 1.492907964460536974e-01 8.311513764927496162e-01 6.652928354977717396e-01 2.396804722185036374e-01 5.812361618600220270e-01 9.724228681350225445e-01 2.853983236378453414e-01 5.337719354896472979e-01 6.779446197712412081e-01 5.485102006140557540e-01 9.010109155962182648e-01 5.724439967467525037e-01 5.965540527411405947e-01 1.598667990086183321e-01 1.363934512727023041e-01 5.327536522697270405e-01 4.123866715061276222e-01 4.617251396918636841e-01 6.935944951381239898e-01 4.300337419593377453e-01 1.892407993760835128e-01 1.666936825594794724e-01 4.625634184864588772e-01 4.805197636774838355e-02 7.003542850133466224e-01 2.130226006716084974e-03 8.678863343041013367e-01 4.874478520451258623e-01 7.043560228741558848e-01 6.317719270475393722e-01 5.372392256296196766e-01 2.982649812986511995e-01 1.272558612133412037e-01 2.467337555730741983e-01 6.546893200021091097e-01 6.291921159383098150e-01 8.505920470407707379e-01 4.046520490181828578e-01 3.875732096593392795e-01 8.551517214319142024e-01 4.152602284179877090e-01 9.587779137989138611e-01 6.977437468944928112e-01 3.240620775541913634e-02 4.025873770391376061e-01 5.485549335619134270e-01 7.146066156157020455e-01 3.012702534568838519e-01 3.526414480395153594e-01 3.309707144485515284e-01 4.315687014460974913e-01 6.641934530697197747e-01 2.172886798352815507e-01 4.807480925564590057e-01 5.006795397998469177e-01 5.818100901154411586e-01 2.107716091585690732e-01 6.606606051140029301e-01 9.317629042790995797e-01 9.840326342340242061e-01 5.752000964817773898e-01
+9.843444595454536872e-01 1.339523968066913540e-02 6.082172659959028671e-03 7.828244785439336662e-01 5.069653703872761819e-01 2.804896494365415327e-01 2.112385836660957139e-02 6.016479440778699228e-02 7.457477935084961818e-01 3.445503949245375397e-01 4.063494277166557200e-01 8.630275274433116817e-01 5.948396018456146850e-01 1.400867933474212457e-01 6.997522422654076646e-01 5.766519767930851081e-01 5.419976500582250889e-01 7.474121304089603735e-01 2.951600193008566686e-01 7.980170422334191827e-01 1.829036799578199757e-01 6.317636496261300749e-01 2.812612231140887431e-02 5.464747656105657381e-01 3.909873503320924204e-01 4.940850205957293406e-01 8.157850130814222611e-01 5.111092739445756150e-01 9.336823640685747439e-01 7.157105167170837445e-01 7.778989455994214097e-01 1.398722535910470466e-01 5.642653936300449091e-01 3.218717164845980028e-01 9.717427501967056402e-01 3.665791984428700134e-01 3.874321311211759156e-02 9.437600858738082188e-02 5.679526822961932231e-01 5.141385991358327079e-01 7.497840799582222715e-02 5.736515309094968318e-01 1.928132849879083954e-01 6.924244068001785823e-01 1.748389677952593146e-01 4.469577663506929532e-01 1.738527450963387455e-01 7.195287763517190793e-01 8.861150811892871682e-01 1.058443750714600506e-01 1.941789362229970894e-01 9.188374820700584422e-02 7.706736301449305104e-01 6.718642548609364828e-01 5.981029087121966237e-01 4.832880127232569434e-01 3.073688779938709148e-01 5.156312334804930009e-01 1.777418420119527553e-01 8.885462205165685079e-01 4.486254681289014723e-02 1.345398129556140132e-01 7.467627984379916484e-01 4.384565546058830643e-01 7.217750080760946263e-01 3.949550352625393890e-01 4.307950907642028593e-01 6.087680934849041270e-01 3.294516167246774874e-01 1.316682090209408962e-01 1.824857738754404046e-01 5.332379826483617524e-01 3.567136182864261151e-02 1.976220743086236631e-01 5.849349042822560296e-01 1.133174406357483344e-01 7.711522754393199675e-01 8.557306786807005183e-01 3.038353471344266143e-01 4.422747047768413875e-01 2.537160404215925702e-01 2.372714099723788328e-01 5.906462765375103396e-01 4.849909323133470007e-01 2.692576210504484813e-01 4.540849506602829821e-01 9.664935719107857759e-01 2.044371576459835804e-01 4.505417469690352616e-01 7.110722322201217249e-01 3.051357995214963870e-01 8.978937034341526457e-01 6.090501112506481185e-01 6.595415779178889215e-01 6.565426836745864581e-01 6.565608489824376059e-01 2.679102664248229626e-01 3.819533138204529443e-01 6.609794961162380744e-01 2.289558446859882856e-01
+9.274935298374649140e-01 1.174096651033715855e-01 3.030761852629033637e-01 1.605508209527917174e-01 9.601854834873225775e-01 4.341959513718630648e-01 6.320768160802121560e-01 4.213429090614078110e-01 3.695553969042019160e-01 5.965457437116089556e-01 3.520335041155040479e-01 7.702703502247409961e-01 8.571112772962534709e-01 7.904077282532658844e-01 2.247339318352784554e-01 6.823720204503556097e-01 5.883435710582129996e-02 6.786037033312407596e-01 9.721137137641507886e-01 2.042576970668320557e-01 8.394085754806240862e-01 7.433082729552867862e-01 4.072614159870893147e-01 7.451483066617257123e-01 1.699472962789440045e-01 1.753052015584344314e-01 2.255269204788400428e-01 7.794755643807432799e-01 8.407732260470973662e-01 9.301182862857163558e-01 3.701995309382508648e-01 4.481909027604019657e-01 1.261889085033987001e-01 5.600591735875248833e-01 8.244692493969552061e-01 8.969188061645969601e-01 4.802217973423368313e-01 3.556164122713412201e-02 3.393317823164623270e-01 2.491242957582864292e-01 9.863253789366602797e-01 5.585415885291432625e-01 3.702350606362231344e-01 6.766101432620400535e-01 6.999259389475386284e-01 6.676108316872160220e-01 7.870681827507105544e-01 8.746765411259082024e-01 9.125268371282718727e-01 6.638849997061806452e-01 3.253268113800632522e-01 7.968625619248901337e-01 7.584122525443606211e-01 9.028886850768532701e-01 5.381622293189292083e-02 8.097562873320752752e-01 7.092942088208666895e-01 9.915538877968065323e-01 4.319294903327922652e-01 4.307127933969153721e-01 2.768507739641907772e-01 8.076253078288621046e-01 2.569233696442670967e-01 7.595893829724666979e-01 5.768081727897018673e-01 2.537536777625452045e-01 8.874419624636734616e-01 5.091705681832693342e-01 4.811826624992353585e-01 2.794462461940371290e-01 3.846927898276129021e-01 5.129562951959991679e-01 8.515004062224775794e-01 7.103144978683579858e-01 9.526388607201888847e-01 2.367905569592337889e-01 9.137336039323161740e-01 5.722969943101696710e-02 2.019723935481291255e-01 3.098764675203513619e-02 1.121146613918624357e-01 9.937693067724532314e-01 8.476717958861412772e-02 2.059652110343795917e-01 2.139791918759540446e-01 9.137860316709250919e-01 9.530862653366889425e-03 2.027843281683039400e-03 2.506229951837134484e-01 6.244523528392044165e-01 5.523937894075592325e-01 3.712168074031840792e-01 4.218847794299319665e-01 4.827576239387890711e-01 5.244634168840578425e-01 5.182241092381567604e-01 3.308639956263292881e-03 9.370528021570383448e-01 4.694554875029453012e-01 4.950447554541728135e-01
+1.525818111800841814e-01 4.708012184002630107e-02 3.899035965341954846e-01 3.928304521031263929e-01 5.602286661727436945e-01 9.738256658043862313e-01 9.404465779766183475e-01 5.750862754958349088e-01 9.547546956257608741e-01 2.750275291553152535e-01 1.682773435862793265e-01 5.865928471016079726e-04 8.543378154943809255e-01 3.547649971465383079e-01 5.058056647397523031e-01 9.116332486700751137e-02 7.534666421106954726e-01 3.082429494433007733e-01 4.527145111847344916e-01 5.456680635225539255e-01 2.504131242494785914e-01 2.509240770568589296e-01 3.949236999582302898e-01 8.782959620323271821e-03 2.474641132111736752e-01 8.229417958971670943e-01 3.444225768479134420e-01 4.000027489436257522e-01 4.247741954177396417e-01 2.497745404169693373e-02 4.325768602588443423e-01 7.336592463477830117e-01 7.667663267650381975e-02 4.179022553581047683e-01 8.745172741480690126e-01 9.417705509525042817e-02 2.807522782799587446e-01 8.212710101351362590e-01 2.211181944001613386e-01 4.319929503523877168e-01 1.858636923768219873e-02 6.737037795085246694e-01 7.997187114913413275e-01 2.976552505976116647e-01 3.272347030789168887e-01 5.550935453236346406e-01 9.224109746648162522e-01 3.192827922106745708e-01 3.500098324549234530e-01 7.821988386980260888e-01 4.478417135239194380e-01 1.580956175222456572e-01 5.300807813550156844e-01 5.806154798468634581e-01 9.456842911054151868e-01 7.688127895655872956e-01 8.456527833650537840e-01 1.784229089865225770e-01 8.114517450321339087e-01 8.062506298824222428e-01 2.113482500442499523e-01 2.629226789210241666e-01 6.478686221690072022e-01 6.006672861605766300e-02 7.013679843242253131e-01 8.784753961212666828e-01 3.487138165323044880e-02 4.928426758517070461e-01 5.976224683315064512e-01 7.629063997052759616e-01 2.761721278953045422e-01 7.240740503283805696e-01 6.131065729985127888e-01 1.630885615792579957e-01 8.473783868551159060e-01 8.347614542399306448e-02 8.137265626844719657e-01 8.512508664918938539e-01 2.777097816703766320e-01 1.729154355214796990e-01 2.203382750835449766e-01 6.134780912629795857e-01 3.524352564238901753e-01 5.370314860129862256e-01 8.013986113284543578e-02 2.555842138998117852e-01 6.553915758947851389e-01 9.679125599178584061e-01 2.549566319678178150e-01 4.008180804370896633e-01 9.145789951670967310e-01 2.787926039163850511e-01 8.599455912576436933e-02 9.637558000691170967e-02 8.274101203974880692e-01 1.803747268179315411e-01 2.175735407836230095e-01 7.825994939720237742e-01 7.928519890958951599e-02 8.707949373106749213e-01
+6.398420210047787160e-01 5.739624494012524059e-01 3.359672805578653998e-01 1.130399363175038641e-02 3.349439685346782269e-01 2.315484030880912147e-01 4.575228302577399875e-01 1.149494135594463229e-01 2.888244352925943836e-01 3.625470995156252485e-01 3.795973190611611203e-01 6.567047810450010736e-01 1.484039742710284715e-01 9.273251916560719676e-01 4.334256728976307871e-01 6.734771102219323513e-01 9.125080197222198430e-01 4.974393931097168542e-01 8.301481563280355136e-01 4.526450714147856047e-01 2.414236092573898151e-01 8.070129698367667359e-02 7.260400697427102923e-01 1.396509691839398215e-02 2.496450588391967429e-01 4.335741205447194435e-01 3.089314419194891803e-01 9.543503534526003307e-01 5.457977547458532364e-01 3.139663643587058406e-01 5.034762326753475792e-01 4.756788330475764104e-01 6.849334942793482428e-01 3.880666613022351052e-01 6.483446580176778218e-01 5.217503801099343530e-01 5.371145824070304720e-01 3.121260159429154468e-01 8.314121854062171968e-01 4.538695969561833410e-01 8.598896961203845724e-01 9.961993522734106099e-01 8.865717795946430613e-01 7.828987966783660379e-01 3.412415531643435695e-01 7.421170530151157685e-01 4.484104178639959359e-01 6.793217012099640462e-01 3.756179958191659951e-01 7.821287098222597933e-01 6.227726265188193722e-02 8.552983413221663112e-01 4.824668768009222619e-01 2.241531065858231031e-01 4.939536577599041856e-01 5.129566641128722182e-01 1.057984177672518511e-01 9.541452507300716146e-01 3.396646181755047511e-01 7.452588103611947901e-01 5.315559265659929311e-01 5.493475179850665358e-01 5.214824278139198466e-01 5.150075718147916204e-01 1.196075368500321146e-01 9.035665331176232495e-01 7.522653903639873185e-01 6.638708679914825384e-01 5.584174553800479446e-01 5.015819402508836511e-01 5.507698483308445248e-01 5.978677577011723976e-01 8.450418028759657529e-01 3.266677322748618995e-01 1.321610045897971819e-01 2.394354042746985600e-01 2.723972163557076831e-01 5.523301747352814539e-01 5.518043850608547185e-01 5.283968096837132755e-02 8.192733312104071297e-01 2.277106024970321219e-02 1.414998099027269252e-01 6.517281615256080851e-01 1.811694734825117781e-01 9.472370614713256920e-01 5.454497319021770485e-01 1.364119913158231556e-01 8.446142008509562871e-01 7.671725984742419069e-01 2.461161648406858804e-01 1.421724627107351369e-01 6.290652581179481118e-01 7.094144689448004248e-01 4.419656923472803367e-02 6.614741876652251440e-01 8.712193265403500586e-02 4.734931280852430202e-01 5.382037050480286133e-01 1.396459758005891283e-01
+9.709329844415439670e-01 8.998575745276288229e-01 9.151313462895852568e-01 6.920489275523904471e-01 2.892231405199537919e-01 6.750679746268205550e-01 5.515642485826798280e-01 1.065253097812824956e-01 2.957026803465776510e-01 8.937347659632134400e-01 9.800016515925590310e-01 7.745900896182087436e-01 1.570977683146633774e-01 1.482028765821026273e-01 2.111147779712029271e-01 9.683759902485811200e-01 6.550951580826911425e-01 8.728324682592377703e-01 5.044803166579884257e-01 8.285704754811143991e-01 1.693574499337324735e-02 6.032669995180495182e-02 1.687026879086964692e-01 7.701554026145973619e-01 1.429888016593102718e-01 5.881172815379975827e-02 9.704206919487038396e-01 4.450807650730836951e-01 1.597445784258376689e-01 9.849229394397314152e-01 4.220083573536804744e-01 9.357693600374825671e-01 2.313199262338369033e-01 4.556443403861323294e-01 2.590791012828855822e-01 8.438664994487065085e-01 5.519045677502344427e-01 4.702170125676508050e-01 6.814723205638187897e-01 7.418295483665861001e-01 3.684921032028853904e-01 1.501895844844561845e-01 4.214513377519605308e-01 8.600279963652578408e-01 6.625616611189292238e-01 5.200151456470966105e-01 7.881072743086801058e-01 2.771703241081423519e-01 9.034135930616548071e-01 5.848441705791300738e-01 8.341698181274771473e-01 1.966638677318299777e-01 7.059747894371543042e-01 7.013854316067694716e-01 1.828430942760242983e-01 4.745548949934464966e-01 6.306422394641082452e-01 7.760751707194470939e-01 9.813187212598396547e-01 2.293595795266353266e-01 7.749261876107090830e-01 2.384106107787011819e-01 9.721209688979495223e-01 2.715569353686980714e-01 2.915573577694993146e-01 3.579601509630966349e-01 3.085697512342830962e-01 4.070219981627976047e-01 1.989632411372218579e-01 7.330003339460906542e-01 5.397259604481572381e-01 6.931009942216573849e-01 1.385457419653816080e-01 1.140339999976658358e-01 3.980752590866034613e-01 9.471822621683767540e-01 5.476643721405823895e-01 6.824131903515884279e-02 5.844099130744569992e-01 2.346881692012994236e-01 9.436439228519653000e-01 4.855518260479008141e-02 8.157036123302675579e-01 1.169761256455048581e-01 5.532962903488753970e-01 1.100965596251435308e-01 9.789490602992410029e-01 8.433487462016989733e-01 1.272410782852178013e-01 2.885715258680641160e-01 7.990943955388217779e-01 1.565305358979097727e-01 9.160846960406943129e-02 8.521842244411678147e-01 4.474243106736998099e-01 3.843945818845087015e-01 4.710645906071458944e-01 2.398348154123419729e-01 6.435351435258193087e-01 7.656897921129046658e-01
+4.894328120406804539e-01 7.881019629214267574e-01 6.974585354155089512e-01 2.023858939857701156e-01 1.660984914264745926e-01 4.854517801734643534e-01 2.789848572630315715e-01 2.311636522410289718e-01 9.821076233980715608e-01 1.220641257408076052e-01 2.614036146663852866e-01 7.657560715165320220e-01 3.968360577545695378e-01 4.566023622802184434e-02 1.049701948619241598e-02 9.281162949127452766e-01 4.490137965769909201e-01 2.095846458383606725e-01 9.195504656719085679e-01 9.683515436855471004e-01 9.800174878114910060e-01 5.517610861380117804e-01 6.711570559348770670e-01 5.125258050287277989e-01 2.105581493613526423e-01 8.281813206544574868e-01 4.964783994807770995e-01 7.284974208756571645e-01 1.320629592816270348e-01 6.652194518096135045e-01 9.430156297917950958e-01 7.477263137894260003e-01 2.054087806450300979e-01 4.248209124837907247e-01 7.657518666018259257e-02 1.031614100713345028e-01 4.122242287567021712e-01 4.919658859336810686e-01 3.752650167259050651e-01 4.175771429986683270e-01 6.131376293448997927e-01 5.463797405837259591e-01 3.119918548921774004e-01 6.331762507678504459e-01 5.484632429281035559e-01 6.815448032785871302e-01 8.065695507425107991e-02 8.720129122297424207e-01 8.318188557125294480e-03 2.199323537180564170e-02 8.933872719887463454e-01 1.953120287872067706e-02 2.478721941404590234e-01 5.994061179859005994e-01 6.588362611693047155e-01 6.332808851020984564e-01 3.823849348043323326e-01 5.111091324899629251e-01 7.034808459110406531e-01 4.347681568463539481e-01 4.316973576672314961e-01 9.620411080123215664e-01 6.247837467655984467e-01 8.196961678222113301e-01 5.574601810887074294e-01 8.800635018469276094e-01 8.772255241161972528e-01 5.075275933138404527e-01 8.022583187266906224e-01 2.320670802521890286e-01 1.165626629103270195e-01 4.623759662685936744e-01 7.938327000737943617e-02 7.986374689793115378e-01 6.728842751465858862e-01 8.133909095059230765e-01 1.202639390769081329e-01 1.052937257108800262e-01 8.717600467040409473e-02 2.163819956545051104e-01 6.596483385763984852e-01 1.202843170392309258e-02 1.538789195854695091e-01 3.120247727263308901e-01 3.408168327248596308e-01 3.241861797851740556e-01 3.637074533655986208e-01 1.533669345890729119e-01 4.455921334699539660e-01 5.619140093874478437e-01 1.881731359879111887e-01 9.416670800570559052e-01 1.740018593664415247e-01 7.030242331869680505e-01 5.922055553954849172e-01 9.326211623391688077e-01 6.608322881013140027e-01 7.009721551241574478e-01 1.079126054675583202e-01 6.158176671761947940e-01
+5.185079639625639336e-01 9.613742991518259284e-01 5.555312825626229634e-01 2.647628827924735084e-01 6.003697207460141350e-01 5.392112376769145898e-01 6.781186965667050925e-01 9.908971748181496508e-01 4.124155872095397468e-01 9.814941401724619485e-02 2.684237785531295994e-02 1.774652505962848181e-01 1.707589529595294753e-01 4.640932098465534450e-01 2.882179883914587348e-01 7.276822905806898945e-01 6.145789546745269449e-01 1.100959863917608805e-01 6.798859723042820491e-01 9.096984032948918220e-01 3.971368455178179158e-01 2.959494950971321980e-01 3.742088799298171065e-02 1.960739526210202310e-01 7.536102695342027369e-01 6.680915510628401277e-01 4.136507204312135366e-01 3.613996339406737590e-01 3.605422038261204554e-01 7.098503555159476619e-01 8.093719147087541366e-01 6.344097009128880638e-01 3.990082448083617228e-01 2.805918009906902544e-01 7.078488167363675698e-01 9.969917259866583059e-01 9.442054998992396309e-01 1.329075240769165278e-01 6.810681350588387861e-02 8.503491437913293094e-01 8.347117439165431252e-01 2.381858201903953587e-01 7.884260706938626129e-01 7.109907917419661105e-01 6.390916681983604963e-02 6.174365227062991179e-01 5.085733343630816083e-01 1.716846139694149231e-01 9.065664924270055991e-02 5.625330757196970177e-01 3.539663480209681579e-01 8.937139525947165319e-01 3.981380511900556307e-02 7.403597927449541150e-01 3.803872284089604427e-02 6.729519695709765825e-01 5.306080908840085097e-01 2.091237680402112664e-01 5.902903662907804661e-01 2.094778612095482551e-01 7.323447855684165342e-01 3.644574495843493356e-01 2.006215478057034041e-01 3.737617545555030896e-01 5.253471759602216240e-01 4.287889547869583318e-01 7.086098806190446187e-01 4.510792335515292351e-01 6.383187180169215269e-01 8.779355722397681472e-01 4.221338898667141848e-01 6.375840144651815367e-01 8.683057298299173832e-01 6.093730356952498095e-01 9.297141161056151626e-01 7.770838342807246946e-01 6.549661287008456956e-02 2.835060738158660110e-01 4.474138867374952699e-01 8.530336387421445510e-01 3.160209657891883683e-01 8.301538680518486535e-01 6.646903097549101691e-01 7.187130118106234145e-01 1.651862041735395747e-01 9.578252676762609719e-01 6.490273812885494209e-02 9.777273484666341163e-01 8.930729829254262508e-01 9.851054752118463265e-01 4.094323402286751401e-01 1.139176240124337713e-01 7.612865863899589414e-01 2.266379302491570158e-01 6.998882496157835531e-01 9.945043379099228753e-01 7.111578056749194854e-01 7.806190603886183910e-01 3.410170920712443099e-01 9.446084168886822452e-01
+5.015172758330755931e-01 5.569527971282052237e-01 1.122406928736449094e-01 8.960352822124777461e-01 6.049568585854003810e-02 1.202196001338627918e-01 1.870314295763603196e-01 9.017590029396971296e-01 3.597904628087450485e-01 2.130941062746317671e-01 2.556281834629479111e-01 5.123669364829196438e-01 4.754061129282013409e-01 9.764470380372083369e-01 8.038663983900646848e-01 6.960491266420890666e-01 2.940135977911654264e-01 2.857282759910040326e-03 4.599343225832352999e-02 5.597554495210212977e-01 7.445266674304001908e-01 3.387528030535971180e-01 6.429542922125383031e-01 2.123331785532429627e-01 5.302332654117811739e-01 7.262555377662539557e-01 3.982425859900724507e-01 3.243388301740235402e-01 6.191064123738921898e-01 8.988047781373914580e-01 7.819700328765150088e-01 7.664269102804815992e-01 6.734095355422575757e-03 2.904762329148526945e-01 5.097537644843168625e-01 9.524734606001823423e-01 4.812869576591960463e-01 6.236868013640477493e-01 1.459170943214320726e-01 9.874505139403206844e-01 7.561708982837871407e-01 3.798591332432484924e-01 6.056633451375117438e-01 7.935708170258731764e-01 1.458141583518740569e-01 7.082511296391911237e-01 1.098798009731616343e-02 3.655618484905173160e-01 9.551862303858617009e-01 8.148959351152762487e-02 4.739306219219985294e-02 7.963357515359494876e-01 6.208332695202813944e-01 3.884182264923189409e-01 4.589167647950288531e-01 6.496652974138312775e-01 2.467528128074852889e-01 5.309593064844935206e-01 5.364606369543487574e-01 2.421352989851309756e-01 3.776834556696828660e-02 1.564861233558080267e-01 5.197231021782636740e-01 8.725375120634637494e-01 2.441225493455024820e-01 2.320363366041028330e-01 5.026358683423555185e-01 7.035766000474735771e-01 8.347805591467084563e-01 2.303229841813967393e-01 6.908373419683054850e-01 2.646662377366995056e-01 1.259467197942290007e-01 9.372770922994989595e-01 6.674216272867254940e-01 1.027944489143072238e-01 5.686267290346079806e-01 3.948222804451942958e-01 4.689706944496729868e-01 4.446117700449114807e-02 6.817992275557515081e-01 9.084821829413957106e-01 9.184021015315092518e-01 3.045815734169987632e-01 2.204958624923980537e-03 7.542672057172502553e-01 9.460844786545006269e-01 3.373139094575949848e-02 9.059565314915285494e-01 9.938525461318854504e-01 2.542072661725306437e-01 9.685734112479216229e-02 8.223629541824816203e-01 1.057429056898460118e-01 8.080679390260248063e-01 5.823014244609205914e-01 6.413551528031806725e-01 1.787341975438894170e-01 1.250471413912357388e-01 8.390281297596062782e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..86de3c7592893bdb4438c9a0e7e60b2e7e5e1727
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml-iris.txt
@@ -0,0 +1 @@
+   5.3851648e-01   5.0990195e-01   6.4807407e-01   1.4142136e-01   6.1644140e-01   5.1961524e-01   1.7320508e-01   9.2195445e-01   4.6904158e-01   3.7416574e-01   3.7416574e-01   5.9160798e-01   9.9498744e-01   8.8317609e-01   1.1045361e+00   5.4772256e-01   1.0000000e-01   7.4161985e-01   3.3166248e-01   4.3588989e-01   3.0000000e-01   6.4807407e-01   4.6904158e-01   5.9160798e-01   5.4772256e-01   3.1622777e-01   1.4142136e-01   1.4142136e-01   5.3851648e-01   5.3851648e-01   3.8729833e-01   6.2449980e-01   8.0622577e-01   4.6904158e-01   3.7416574e-01   4.1231056e-01   4.6904158e-01   8.6602540e-01   1.4142136e-01   1.7320508e-01   1.3490738e+00   7.6811457e-01   4.5825757e-01   6.1644140e-01   5.9160798e-01   3.6055513e-01   5.8309519e-01   3.0000000e-01   2.2360680e-01   4.0037482e+00   3.6166283e+00   4.1641326e+00   3.0935417e+00   3.7920970e+00   3.4161382e+00   3.7854986e+00   2.3452079e+00   3.7496667e+00   2.8879058e+00   2.7037012e+00   3.2280025e+00   3.1464265e+00   3.7000000e+00   2.5806976e+00   3.6276714e+00   3.4351128e+00   3.0099834e+00   3.7682887e+00   2.8827071e+00   3.8535698e+00   3.0757113e+00   4.0472213e+00   3.6578682e+00   3.4161382e+00   3.5972211e+00   4.0472213e+00   4.2449971e+00   3.5312887e+00   2.4939928e+00   2.8178006e+00   2.7018512e+00   2.8948230e+00   4.1352146e+00   3.4117444e+00   3.5199432e+00   3.9115214e+00   3.6180105e+00   3.0000000e+00   3.0215890e+00   3.3120990e+00   3.5958309e+00   3.0099834e+00   2.3874673e+00   3.1527766e+00   3.0740852e+00   3.1256999e+00   3.3451457e+00   2.0904545e+00   3.0577770e+00   5.2848841e+00   4.2083251e+00   5.3018865e+00   4.6904158e+00   5.0566788e+00   6.0950800e+00   3.5916570e+00   5.6364883e+00   5.0477718e+00   5.6391489e+00   4.3566042e+00   4.5199558e+00   4.8538644e+00   4.1904654e+00   4.4170126e+00   4.6260134e+00   4.6454279e+00   6.2401923e+00   6.4984614e+00   4.1412558e+00   5.1215232e+00   4.0286474e+00   6.2112801e+00   4.1097445e+00   4.9699095e+00   5.3122500e+00   3.9774364e+00   4.0074930e+00   4.8404545e+00   5.0970580e+00   5.5461698e+00   6.0141500e+00   4.8805737e+00   4.1605288e+00   4.5705580e+00   5.7887823e+00   4.8918299e+00   4.6065171e+00   3.8961519e+00   4.7968740e+00   5.0199602e+00   4.6368092e+00   4.2083251e+00   5.2573758e+00   5.1361464e+00   4.6540305e+00   4.2766810e+00   4.4598206e+00   4.6508064e+00   4.1400483e+00   3.0000000e-01   3.3166248e-01   6.0827625e-01   1.0908712e+00   5.0990195e-01   4.2426407e-01   5.0990195e-01   1.7320508e-01   8.6602540e-01   4.5825757e-01   1.4142136e-01   6.7823300e-01   1.3601471e+00   1.6278821e+00   1.0535654e+00   5.4772256e-01   1.1747340e+00   8.3666003e-01   7.0710678e-01   7.6157731e-01   7.8102497e-01   5.5677644e-01   6.4807407e-01   2.2360680e-01   5.0000000e-01   5.9160798e-01   5.0000000e-01   3.4641016e-01   2.4494897e-01   6.7823300e-01   1.1489125e+00   1.3416408e+00   1.7320508e-01   3.0000000e-01   7.8740079e-01   1.7320508e-01   5.0990195e-01   4.5825757e-01   5.2915026e-01   8.1853528e-01   5.4772256e-01   6.7823300e-01   9.8488578e-01   1.4142136e-01   8.4852814e-01   3.6055513e-01   8.1240384e-01   3.1622777e-01   4.0963398e+00   3.6864617e+00   4.2367440e+00   2.9698485e+00   3.8118237e+00   3.3911650e+00   3.8600518e+00   2.1470911e+00   3.7881394e+00   2.8053520e+00   2.4617067e+00   3.2449961e+00   3.0413813e+00   3.7121422e+00   2.5592968e+00   3.7000000e+00   3.4336569e+00   2.9715316e+00   3.6918830e+00   2.7928480e+00   3.8935845e+00   3.0740852e+00   4.0187063e+00   3.6565011e+00   3.4467376e+00   3.6510273e+00   4.0804412e+00   4.2953463e+00   3.5383612e+00   2.4186773e+00   2.7000000e+00   2.5787594e+00   2.8548205e+00   4.1170378e+00   3.3985291e+00   3.5972211e+00   3.9786933e+00   3.5580894e+00   2.9983329e+00   2.9291637e+00   3.2434549e+00   3.6221541e+00   2.9546573e+00   2.1794495e+00   3.1032241e+00   3.0789609e+00   3.1144823e+00   3.3645208e+00   1.9131126e+00   3.0298515e+00   5.3385391e+00   4.1809090e+00   5.3572381e+00   4.7085029e+00   5.0911688e+00   6.1595454e+00   3.4799425e+00   5.6868269e+00   5.0408333e+00   5.7471732e+00   4.4192760e+00   4.5210618e+00   4.9020404e+00   4.1340053e+00   4.4022721e+00   4.6808119e+00   4.6829478e+00   6.3694584e+00   6.5314623e+00   4.0620192e+00   5.1903757e+00   4.0024992e+00   6.2617889e+00   4.1060930e+00   5.0428167e+00   5.3898052e+00   3.9812058e+00   4.0311289e+00   4.8518038e+00   5.1584882e+00   5.5919585e+00   6.1546730e+00   4.8918299e+00   4.1689327e+00   4.5475268e+00   5.8600341e+00   4.9598387e+00   4.6508064e+00   3.9153544e+00   4.8600412e+00   5.0724747e+00   4.7021272e+00   4.1809090e+00   5.3207142e+00   5.2067264e+00   4.7000000e+00   4.2497059e+00   4.4988888e+00   4.7180504e+00   4.1533119e+00   2.4494897e-01   5.0990195e-01   1.0862780e+00   2.6457513e-01   4.1231056e-01   4.3588989e-01   3.1622777e-01   8.8317609e-01   3.7416574e-01   2.6457513e-01   5.0000000e-01   1.3638182e+00   1.5874508e+00   1.0099505e+00   5.1961524e-01   1.2369317e+00   7.5498344e-01   8.3066239e-01   7.0000000e-01   5.0990195e-01   6.4807407e-01   6.4031242e-01   4.6904158e-01   5.0990195e-01   6.1644140e-01   5.4772256e-01   3.0000000e-01   3.3166248e-01   7.8102497e-01   1.0535654e+00   1.2845233e+00   3.1622777e-01   3.1622777e-01   8.5440037e-01   3.1622777e-01   3.6055513e-01   4.8989795e-01   4.3588989e-01   9.2736185e-01   3.0000000e-01   6.5574385e-01   9.5916630e-01   2.6457513e-01   7.8102497e-01   1.4142136e-01   8.0622577e-01   3.3166248e-01   4.2766810e+00   3.8496753e+00   4.4158804e+00   3.1543621e+00   3.9974992e+00   3.5510562e+00   4.0112342e+00   2.3065125e+00   3.9749214e+00   2.9495762e+00   2.6476405e+00   3.4029399e+00   3.2588341e+00   3.8794329e+00   2.7202941e+00   3.8807216e+00   3.5749126e+00   3.1527766e+00   3.8961519e+00   2.9782545e+00   4.0311289e+00   3.2588341e+00   4.2071368e+00   3.8314488e+00   3.6318040e+00   3.8340579e+00   4.2731721e+00   4.4698993e+00   3.7027017e+00   2.6153394e+00   2.8879058e+00   2.7712813e+00   3.0364453e+00   4.2825226e+00   3.5298725e+00   3.7322915e+00   4.1545156e+00   3.7669616e+00   3.1464265e+00   3.1032241e+00   3.4073450e+00   3.7854986e+00   3.1400637e+00   2.3537205e+00   3.2680269e+00   3.2326460e+00   3.2726136e+00   3.5425979e+00   2.0856654e+00   3.1953091e+00   5.4726593e+00   4.3347434e+00   5.5290144e+00   4.8682646e+00   5.2469038e+00   6.3364028e+00   3.6083237e+00   5.8660038e+00   5.2249402e+00   5.8940648e+00   4.5738387e+00   4.6936127e+00   5.0695167e+00   4.2918527e+00   4.5442271e+00   4.8270074e+00   4.8456166e+00   6.5207362e+00   6.7178866e+00   4.2508823e+00   5.3488316e+00   4.1436699e+00   6.4467046e+00   4.2813549e+00   5.1942276e+00   5.5587768e+00   4.1496988e+00   4.1856899e+00   5.0149776e+00   5.3385391e+00   5.7775427e+00   6.3126856e+00   5.0537115e+00   4.3416587e+00   4.7169906e+00   6.0406953e+00   5.0921508e+00   4.8062459e+00   4.0669399e+00   5.0269275e+00   5.2287666e+00   4.8682646e+00   4.3347434e+00   5.4753995e+00   5.3535035e+00   4.8641546e+00   4.4305756e+00   4.6615448e+00   4.8487112e+00   4.2988371e+00   6.4807407e-01   1.1661904e+00   3.3166248e-01   5.0000000e-01   3.0000000e-01   3.1622777e-01   1.0000000e+00   3.7416574e-01   2.6457513e-01   5.1961524e-01   1.5297059e+00   1.7146428e+00   1.1661904e+00   6.5574385e-01   1.3228757e+00   8.6602540e-01   8.7749644e-01   8.0622577e-01   7.0710678e-01   6.4807407e-01   5.3851648e-01   4.2426407e-01   5.4772256e-01   7.2111026e-01   6.7823300e-01   1.7320508e-01   2.2360680e-01   8.7749644e-01   1.1704700e+00   1.4247807e+00   3.1622777e-01   5.0990195e-01   1.0049876e+00   3.1622777e-01   3.0000000e-01   5.8309519e-01   6.0827625e-01   8.3666003e-01   3.0000000e-01   7.0000000e-01   9.6953597e-01   2.6457513e-01   8.6602540e-01   1.4142136e-01   9.2195445e-01   4.5825757e-01   4.1773197e+00   3.7336309e+00   4.3058100e+00   2.9849623e+00   3.8729833e+00   3.3926391e+00   3.8897301e+00   2.1118712e+00   3.8548671e+00   2.7784888e+00   2.4515301e+00   3.2680269e+00   3.1080541e+00   3.7376463e+00   2.5806976e+00   3.7762415e+00   3.4205263e+00   3.0000000e+00   3.7496667e+00   2.8160256e+00   3.8923001e+00   3.1304952e+00   4.0620192e+00   3.6851052e+00   3.5114100e+00   3.7229021e+00   4.1545156e+00   4.3497126e+00   3.5623026e+00   2.4698178e+00   2.7202941e+00   2.6038433e+00   2.8913665e+00   4.1279535e+00   3.3674916e+00   3.6069378e+00   4.0422766e+00   3.6262929e+00   2.9966648e+00   2.9376862e+00   3.2357379e+00   3.6482873e+00   2.9899833e+00   2.1633308e+00   3.1080541e+00   3.0838288e+00   3.1224990e+00   3.4132096e+00   1.9157244e+00   3.0446675e+00   5.3357286e+00   4.1773197e+00   5.4064776e+00   4.7222876e+00   5.1097945e+00   6.2153037e+00   3.4205263e+00   5.7384667e+00   5.0813384e+00   5.7844619e+00   4.4519659e+00   4.5530210e+00   4.9457052e+00   4.1303753e+00   4.3965896e+00   4.7010637e+00   4.7095647e+00   6.4140471e+00   6.5901442e+00   4.0877867e+00   5.2297227e+00   3.9862263e+00   6.3229740e+00   4.1436699e+00   5.0695167e+00   5.4387499e+00   4.0124805e+00   4.0472213e+00   4.8733972e+00   5.2172790e+00   5.6550862e+00   6.2153037e+00   4.9132474e+00   4.1988094e+00   4.5552168e+00   5.9321160e+00   4.9628621e+00   4.6690470e+00   3.9268308e+00   4.9101935e+00   5.1048996e+00   4.7602521e+00   4.1773197e+00   5.3497664e+00   5.2325902e+00   4.7455242e+00   4.2883563e+00   4.5332108e+00   4.7191101e+00   4.1496988e+00   6.1644140e-01   4.5825757e-01   2.2360680e-01   9.2195445e-01   5.2915026e-01   4.2426407e-01   3.4641016e-01   6.4031242e-01   9.7467943e-01   9.1651514e-01   1.0862780e+00   5.4772256e-01   1.7320508e-01   7.9372539e-01   2.6457513e-01   5.3851648e-01   2.6457513e-01   5.6568542e-01   5.2915026e-01   5.7445626e-01   6.3245553e-01   3.4641016e-01   2.4494897e-01   2.8284271e-01   5.3851648e-01   5.7445626e-01   5.0000000e-01   5.5677644e-01   7.8102497e-01   5.2915026e-01   4.4721360e-01   5.1961524e-01   5.2915026e-01   8.5440037e-01   2.4494897e-01   1.7320508e-01   1.4000000e+00   7.2801099e-01   4.5825757e-01   5.8309519e-01   6.4031242e-01   3.0000000e-01   5.6568542e-01   3.3166248e-01   3.0000000e-01   4.0607881e+00   3.6633318e+00   4.2190046e+00   3.1480152e+00   3.8496753e+00   3.4568772e+00   3.8249183e+00   2.3874673e+00   3.8078866e+00   2.9223278e+00   2.7586228e+00   3.2710854e+00   3.2186954e+00   3.7456642e+00   2.6267851e+00   3.6851052e+00   3.4669872e+00   3.0626786e+00   3.8340579e+00   2.9376862e+00   3.8845849e+00   3.1336879e+00   4.1036569e+00   3.7067506e+00   3.4741906e+00   3.6551334e+00   4.1085277e+00   4.2965102e+00   3.5763109e+00   2.5573424e+00   2.8740216e+00   2.7604347e+00   2.9495762e+00   4.1785165e+00   3.4380227e+00   3.5510562e+00   3.9648455e+00   3.6864617e+00   3.0364453e+00   3.0708305e+00   3.3541020e+00   3.6400549e+00   3.0659419e+00   2.4372115e+00   3.1968735e+00   3.1128765e+00   3.1670175e+00   3.3985291e+00   2.1424285e+00   3.1032241e+00   5.3131911e+00   4.2461747e+00   5.3507009e+00   4.7307505e+00   5.0960769e+00   6.1457302e+00   3.6166283e+00   5.6877060e+00   5.1009803e+00   5.6762664e+00   4.3977267e+00   4.5683695e+00   4.9010203e+00   4.2308392e+00   4.4508426e+00   4.6626173e+00   4.6882833e+00   6.2785349e+00   6.5536250e+00   4.1964271e+00   5.1643005e+00   4.0607881e+00   6.2657801e+00   4.1605288e+00   5.0079936e+00   5.3591044e+00   4.0249224e+00   4.0472213e+00   4.8836462e+00   5.1497573e+00   5.6017854e+00   6.0572271e+00   4.9234135e+00   4.2083251e+00   4.6141088e+00   5.8438001e+00   4.9203658e+00   4.6454279e+00   3.9344631e+00   4.8445846e+00   5.0616203e+00   4.6861498e+00   4.2461747e+00   5.2971691e+00   5.1730069e+00   4.7010637e+00   4.3301270e+00   4.5044423e+00   4.6786750e+00   4.1737274e+00   9.9498744e-01   7.0000000e-01   1.4594520e+00   1.0099505e+00   3.4641016e-01   8.1240384e-01   1.1618950e+00   1.5716234e+00   6.7823300e-01   6.1644140e-01   4.0000000e-01   5.9160798e-01   3.3166248e-01   3.8729833e-01   5.3851648e-01   4.1231056e-01   1.1224972e+00   6.7823300e-01   8.3066239e-01   1.0099505e+00   6.4807407e-01   5.2915026e-01   6.4807407e-01   1.0148892e+00   1.0246951e+00   5.3851648e-01   4.5825757e-01   4.7958315e-01   1.0099505e+00   9.6953597e-01   6.0827625e-01   1.0099505e+00   1.4177447e+00   6.4807407e-01   7.0000000e-01   1.8814888e+00   1.3000000e+00   6.0827625e-01   3.7416574e-01   1.1269428e+00   3.8729833e-01   1.1224972e+00   3.6055513e-01   8.0622577e-01   3.6124784e+00   3.2465366e+00   3.7868192e+00   2.9444864e+00   3.4698703e+00   3.1543621e+00   3.4073450e+00   2.3280893e+00   3.4146742e+00   2.7055499e+00   2.7147744e+00   2.9189039e+00   2.9832868e+00   3.3896903e+00   2.3366643e+00   3.2588341e+00   3.1464265e+00   2.7784888e+00   3.5468296e+00   2.7073973e+00   3.5085610e+00   2.7928480e+00   3.7709415e+00   3.3674916e+00   3.0935417e+00   3.2465366e+00   3.7121422e+00   3.8832976e+00   3.2264532e+00   2.3194827e+00   2.6758176e+00   2.5729361e+00   2.6608269e+00   3.8470768e+00   3.1400637e+00   3.1448370e+00   3.5411862e+00   3.3867388e+00   2.7239677e+00   2.8407745e+00   3.1032241e+00   3.2726136e+00   2.7892651e+00   2.3748684e+00   2.9223278e+00   2.7910571e+00   2.8548205e+00   3.0347982e+00   2.0566964e+00   2.8053520e+00   4.9061186e+00   3.9255573e+00   4.9223978e+00   4.3566042e+00   4.6978719e+00   5.7052607e+00   3.4263683e+00   5.2659282e+00   4.7349762e+00   5.2057660e+00   3.9774364e+00   4.2011903e+00   4.4833024e+00   3.9370039e+00   4.1146081e+00   4.2497059e+00   4.2918527e+00   5.7913729e+00   6.1343296e+00   3.9179076e+00   4.7275787e+00   3.7483330e+00   5.8360946e+00   3.8013156e+00   4.5760245e+00   4.9173163e+00   3.6633318e+00   3.6742346e+00   4.5066617e+00   4.7222876e+00   5.1788030e+00   5.5596762e+00   4.5453273e+00   3.8457769e+00   4.2883563e+00   5.3916602e+00   4.5022217e+00   4.2473521e+00   3.5693137e+00   4.4124823e+00   4.6411206e+00   4.2497059e+00   3.9255573e+00   4.8682646e+00   4.7391982e+00   4.2848571e+00   3.9887341e+00   4.1024383e+00   4.2649736e+00   3.8183766e+00   4.2426407e-01   5.4772256e-01   4.7958315e-01   8.6602540e-01   3.0000000e-01   4.8989795e-01   6.1644140e-01   1.3601471e+00   1.4933185e+00   9.5393920e-01   5.0990195e-01   1.2083046e+00   6.4807407e-01   8.6023253e-01   6.0000000e-01   4.5825757e-01   6.2449980e-01   5.4772256e-01   6.0827625e-01   4.5825757e-01   6.2449980e-01   6.0827625e-01   3.1622777e-01   4.2426407e-01   8.1240384e-01   9.4868330e-01   1.2083046e+00   4.7958315e-01   5.0000000e-01   9.1651514e-01   4.7958315e-01   4.6904158e-01   5.1961524e-01   4.2426407e-01   1.1090537e+00   3.1622777e-01   5.4772256e-01   8.1853528e-01   4.4721360e-01   6.7823300e-01   2.2360680e-01   7.7459667e-01   4.2426407e-01   4.2308392e+00   3.7854986e+00   4.3669211e+00   3.1272992e+00   3.9560081e+00   3.4899857e+00   3.9344631e+00   2.2781571e+00   3.9357337e+00   2.8827071e+00   2.6495283e+00   3.3361655e+00   3.2634338e+00   3.8209946e+00   2.6627054e+00   3.8353618e+00   3.4942810e+00   3.1160873e+00   3.8794329e+00   2.9495762e+00   3.9420807e+00   3.2202484e+00   4.1701319e+00   3.7828561e+00   3.5916570e+00   3.7907783e+00   4.2391037e+00   4.4147480e+00   3.6414283e+00   2.5980762e+00   2.8653098e+00   2.7549955e+00   2.9983329e+00   4.2225585e+00   3.4423829e+00   3.6414283e+00   4.1024383e+00   3.7549967e+00   3.0740852e+00   3.0626786e+00   3.3555923e+00   3.7229021e+00   3.1064449e+00   2.3388031e+00   3.2140317e+00   3.1654384e+00   3.2093613e+00   3.4957117e+00   2.0639767e+00   3.1400637e+00   5.3758720e+00   4.2638011e+00   5.4680892e+00   4.7989582e+00   5.1710734e+00   6.2801274e+00   3.5312887e+00   5.8137767e+00   5.1797683e+00   5.8077534e+00   4.4977772e+00   4.6368092e+00   5.0049975e+00   4.2272923e+00   4.4609416e+00   4.7423623e+00   4.7780749e+00   6.4397205e+00   6.6708320e+00   4.2190046e+00   5.2744668e+00   4.0620192e+00   6.3992187e+00   4.2284749e+00   5.1137071e+00   5.4963624e+00   4.0902323e+00   4.1121770e+00   4.9477268e+00   5.2886671e+00   5.7314920e+00   6.2401923e+00   4.9849774e+00   4.2871902e+00   4.6626173e+00   5.9883220e+00   4.9939964e+00   4.7318073e+00   3.9912404e+00   4.9618545e+00   5.1526692e+00   4.8031240e+00   4.2638011e+00   5.3972215e+00   5.2678269e+00   4.7968740e+00   4.3840620e+00   4.5934736e+00   4.7497368e+00   4.2178193e+00   7.8740079e-01   3.3166248e-01   5.0000000e-01   2.2360680e-01   4.6904158e-01   9.0553851e-01   1.0440307e+00   1.2369317e+00   7.0000000e-01   2.0000000e-01   8.3666003e-01   4.2426407e-01   4.4721360e-01   3.7416574e-01   6.7082039e-01   3.8729833e-01   4.4721360e-01   4.1231056e-01   2.2360680e-01   2.2360680e-01   2.2360680e-01   3.7416574e-01   3.7416574e-01   4.4721360e-01   7.3484692e-01   9.4868330e-01   3.3166248e-01   3.6055513e-01   5.4772256e-01   3.3166248e-01   7.4833148e-01   1.0000000e-01   2.4494897e-01   1.2288206e+00   6.6332496e-01   4.2426407e-01   6.0827625e-01   4.6904158e-01   4.2426407e-01   4.5825757e-01   4.2426407e-01   1.4142136e-01   3.9648455e+00   3.5623026e+00   4.1170378e+00   2.9866369e+00   3.7296112e+00   3.3256578e+00   3.7282704e+00   2.2113344e+00   3.6918830e+00   2.7802878e+00   2.5690465e+00   3.1543621e+00   3.0545049e+00   3.6249138e+00   2.4959968e+00   3.5818989e+00   3.3481338e+00   2.9206164e+00   3.6837481e+00   2.7820855e+00   3.7815341e+00   3.0049958e+00   3.9686270e+00   3.5791060e+00   3.3555923e+00   3.5454196e+00   3.9912404e+00   4.1892720e+00   3.4554305e+00   2.4020824e+00   2.7110883e+00   2.5942244e+00   2.8089144e+00   4.0509258e+00   3.3181320e+00   3.4583233e+00   3.8613469e+00   3.5383612e+00   2.9137605e+00   2.9189039e+00   3.2093613e+00   3.5242020e+00   2.9206164e+00   2.2561028e+00   3.0577770e+00   2.9899833e+00   3.0397368e+00   3.2771939e+00   1.9697716e+00   2.9698485e+00   5.2191953e+00   4.1206796e+00   5.2478567e+00   4.6162756e+00   4.9899900e+00   6.0448325e+00   3.4741906e+00   5.5803226e+00   4.9749372e+00   5.5973208e+00   4.3000000e+00   4.4474712e+00   4.7968740e+00   4.0975602e+00   4.3358967e+00   4.5661800e+00   4.5793013e+00   6.2040309e+00   6.4420494e+00   4.0472213e+00   5.0695167e+00   3.9395431e+00   6.1587336e+00   4.0373258e+00   4.9142650e+00   5.2621288e+00   3.9051248e+00   3.9357337e+00   4.7686476e+00   5.0447993e+00   5.4927225e+00   5.9849812e+00   4.8093659e+00   4.0865633e+00   4.4833024e+00   5.7463032e+00   4.8311489e+00   4.5398238e+00   3.8223030e+00   4.7455242e+00   4.9628621e+00   4.5902070e+00   4.1206796e+00   5.2009614e+00   5.0823223e+00   4.5989129e+00   4.2000000e+00   4.3977267e+00   4.5891176e+00   4.0607881e+00   5.5677644e-01   1.2845233e+00   6.7082039e-01   4.2426407e-01   3.4641016e-01   1.7916473e+00   1.9974984e+00   1.4317821e+00   9.2736185e-01   1.6124515e+00   1.1489125e+00   1.1575837e+00   1.0862780e+00   8.3066239e-01   9.1104336e-01   8.1240384e-01   6.4031242e-01   8.3066239e-01   1.0049876e+00   9.4339811e-01   4.6904158e-01   4.8989795e-01   1.1401754e+00   1.4491377e+00   1.7029386e+00   5.5677644e-01   7.0000000e-01   1.2569805e+00   5.5677644e-01   1.4142136e-01   8.6602540e-01   8.6023253e-01   6.2449980e-01   3.1622777e-01   9.5916630e-01   1.2609520e+00   4.2426407e-01   1.1575837e+00   3.6055513e-01   1.2083046e+00   7.2111026e-01   4.3794977e+00   3.9230090e+00   4.4977772e+00   3.0886890e+00   4.0435133e+00   3.5383612e+00   4.0767634e+00   2.1794495e+00   4.0360872e+00   2.8930952e+00   2.4939928e+00   3.4336569e+00   3.2326460e+00   3.9012818e+00   2.7367864e+00   3.9711459e+00   3.5707142e+00   3.1511903e+00   3.8768544e+00   2.9427878e+00   4.0570926e+00   3.2969683e+00   4.2083251e+00   3.8457769e+00   3.6905284e+00   3.9102430e+00   4.3324358e+00   4.5287967e+00   3.7229021e+00   2.6134269e+00   2.8337255e+00   2.7184554e+00   3.0413813e+00   4.2720019e+00   3.5085610e+00   3.7920970e+00   4.2320208e+00   3.7656341e+00   3.1543621e+00   3.0561414e+00   3.3615473e+00   3.8183766e+00   3.1320920e+00   2.2293497e+00   3.2449961e+00   3.2465366e+00   3.2771939e+00   3.5860842e+00   2.0049938e+00   3.1937439e+00   5.4972721e+00   4.3104524e+00   5.5821143e+00   4.8795492e+00   5.2706736e+00   6.3953108e+00   3.5028560e+00   5.9143892e+00   5.2316345e+00   5.9757845e+00   4.6292548e+00   4.7053161e+00   5.1176166e+00   4.2485292e+00   4.5276926e+00   4.8692915e+00   4.8774994e+00   6.6174013e+00   6.7557383e+00   4.2071368e+00   5.4074023e+00   4.1158231e+00   6.4984614e+00   4.2965102e+00   5.2488094e+00   5.6258333e+00   4.1677332e+00   4.2083251e+00   5.0259327e+00   5.4009258e+00   5.8300943e+00   6.4265076e+00   5.0645829e+00   4.3588989e+00   4.6968074e+00   6.1155539e+00   5.1322510e+00   4.8383882e+00   4.0853396e+00   5.0892043e+00   5.2735187e+00   4.9386233e+00   4.3104524e+00   5.5235858e+00   5.4064776e+00   4.9142650e+00   4.4294469e+00   4.7010637e+00   4.8887626e+00   4.3023250e+00   7.8740079e-01   3.4641016e-01   1.7320508e-01   7.2801099e-01   1.3114877e+00   1.5556349e+00   1.0099505e+00   5.0000000e-01   1.1000000e+00   7.5498344e-01   6.2449980e-01   7.0000000e-01   7.7459667e-01   5.2915026e-01   5.1961524e-01   2.0000000e-01   4.4721360e-01   5.0990195e-01   4.4721360e-01   2.6457513e-01   1.7320508e-01   6.5574385e-01   1.0440307e+00   1.2609520e+00   0.0000000e+00   3.4641016e-01   7.5498344e-01   0.0000000e+00   5.5677644e-01   3.7416574e-01   5.0000000e-01   9.3808315e-01   5.5677644e-01   6.5574385e-01   8.8317609e-01   2.6457513e-01   7.4161985e-01   3.4641016e-01   7.2801099e-01   2.6457513e-01   4.0435133e+00   3.6359318e+00   4.1856899e+00   2.9478806e+00   3.7709415e+00   3.3421550e+00   3.8065733e+00   2.1307276e+00   3.7389838e+00   2.7748874e+00   2.4556058e+00   3.2031235e+00   3.0133038e+00   3.6619667e+00   2.5258662e+00   3.6523965e+00   3.3852622e+00   2.9223278e+00   3.6687873e+00   2.7586228e+00   3.8457769e+00   3.0364453e+00   3.9799497e+00   3.6027767e+00   3.4014703e+00   3.6055513e+00   4.0348482e+00   4.2497059e+00   3.4942810e+00   2.3874673e+00   2.6720778e+00   2.5495098e+00   2.8178006e+00   4.0718546e+00   3.3496268e+00   3.5425979e+00   3.9293765e+00   3.5284558e+00   2.9495762e+00   2.9000000e+00   3.1984371e+00   3.5707142e+00   2.9189039e+00   2.1679483e+00   3.0626786e+00   3.0248967e+00   3.0675723e+00   3.3181320e+00   1.9104973e+00   2.9883106e+00   5.2924474e+00   4.1436699e+00   5.3113087e+00   4.6583259e+00   5.0467812e+00   6.1081912e+00   3.4525353e+00   5.6329388e+00   4.9979996e+00   5.6973678e+00   4.3749286e+00   4.4821870e+00   4.8600412e+00   4.1060930e+00   4.3760713e+00   4.6411206e+00   4.6324939e+00   6.3071388e+00   6.4876806e+00   4.0286474e+00   5.1468437e+00   3.9686270e+00   6.2112801e+00   4.0706265e+00   4.9919936e+00   5.3329167e+00   3.9446166e+00   3.9874804e+00   4.8114447e+00   5.1029403e+00   5.5443665e+00   6.0917978e+00   4.8538644e+00   4.1194660e+00   4.4933284e+00   5.8180753e+00   4.9142650e+00   4.5978256e+00   3.8729833e+00   4.8176758e+00   5.0338852e+00   4.6690470e+00   4.1436699e+00   5.2744668e+00   5.1652686e+00   4.6669048e+00   4.2201896e+00   4.4575778e+00   4.6722586e+00   4.1060930e+00   6.7823300e-01   9.3273791e-01   1.3674794e+00   5.8309519e-01   7.8740079e-01   3.4641016e-01   3.8729833e-01   3.8729833e-01   3.3166248e-01   3.6055513e-01   3.6055513e-01   9.4868330e-01   6.1644140e-01   7.8102497e-01   8.1240384e-01   5.4772256e-01   2.8284271e-01   3.7416574e-01   8.6602540e-01   8.5440037e-01   3.6055513e-01   4.5825757e-01   5.1961524e-01   7.8740079e-01   7.0710678e-01   3.0000000e-01   7.8740079e-01   1.2369317e+00   4.2426407e-01   5.0000000e-01   1.6792856e+00   1.1357817e+00   6.0827625e-01   5.4772256e-01   9.3273791e-01   3.3166248e-01   9.4868330e-01   1.0000000e-01   5.7445626e-01   3.8065733e+00   3.4554305e+00   3.9824616e+00   3.0708305e+00   3.6496575e+00   3.3331667e+00   3.6290495e+00   2.4124676e+00   3.5916570e+00   2.8705400e+00   2.7730849e+00   3.1176915e+00   3.0822070e+00   3.5791060e+00   2.5099801e+00   3.4496377e+00   3.3496268e+00   2.9257478e+00   3.6851052e+00   2.8372522e+00   3.7349699e+00   2.9597297e+00   3.9370039e+00   3.5411862e+00   3.2695565e+00   3.4322005e+00   3.8858718e+00   4.0841156e+00   3.4190642e+00   2.4372115e+00   2.7928480e+00   2.6795522e+00   2.8142495e+00   4.0348482e+00   3.3436507e+00   3.3778692e+00   3.7389838e+00   3.5199432e+00   2.9154759e+00   2.9849623e+00   3.2603681e+00   3.4684290e+00   2.9359837e+00   2.4494897e+00   3.0886890e+00   2.9782545e+00   3.0380915e+00   3.2140317e+00   2.1424285e+00   2.9782545e+00   5.1487863e+00   4.1243181e+00   5.1332251e+00   4.5628938e+00   4.9183331e+00   5.9118525e+00   3.5972211e+00   5.4635154e+00   4.9173163e+00   5.4497706e+00   4.2023803e+00   4.3965896e+00   4.6968074e+00   4.1255303e+00   4.3324358e+00   4.4833024e+00   4.5011110e+00   6.0282667e+00   6.3300869e+00   4.0681691e+00   4.9547957e+00   3.9560081e+00   6.0315835e+00   3.9912404e+00   4.8062459e+00   5.1283526e+00   3.8600518e+00   3.8858718e+00   4.7148701e+00   4.9173163e+00   5.3721504e+00   5.7887823e+00   4.7560488e+00   4.0336088e+00   4.4665423e+00   5.5991071e+00   4.7486840e+00   4.4631827e+00   3.7815341e+00   4.6292548e+00   4.8682646e+00   4.4698993e+00   4.1243181e+00   5.0970580e+00   4.9779514e+00   4.5033321e+00   4.1701319e+00   4.3162484e+00   4.5110974e+00   4.0323690e+00   4.5825757e-01   8.1853528e-01   1.2328828e+00   1.3638182e+00   8.6023253e-01   3.8729833e-01   9.9498744e-01   5.1961524e-01   6.0827625e-01   4.7958315e-01   6.6332496e-01   4.4721360e-01   3.0000000e-01   4.4721360e-01   2.8284271e-01   4.2426407e-01   4.4721360e-01   2.2360680e-01   3.0000000e-01   6.4031242e-01   8.1853528e-01   1.0816654e+00   3.4641016e-01   4.8989795e-01   7.6811457e-01   3.4641016e-01   6.4031242e-01   3.1622777e-01   3.8729833e-01   1.1832160e+00   5.3851648e-01   4.5825757e-01   6.1644140e-01   4.5825757e-01   5.0000000e-01   3.4641016e-01   5.9160798e-01   3.0000000e-01   3.9912404e+00   3.5637059e+00   4.1327957e+00   2.9444864e+00   3.7336309e+00   3.2848135e+00   3.7188708e+00   2.1307276e+00   3.7013511e+00   2.7166155e+00   2.5000000e+00   3.1336879e+00   3.0463092e+00   3.6041643e+00   2.4698178e+00   3.6027767e+00   3.3015148e+00   2.8948230e+00   3.6742346e+00   2.7477263e+00   3.7483330e+00   3.0033315e+00   3.9547440e+00   3.5580894e+00   3.3630343e+00   3.5608988e+00   4.0049969e+00   4.1928511e+00   3.4336569e+00   2.3874673e+00   2.6720778e+00   2.5573424e+00   2.7892651e+00   4.0174619e+00   3.2588341e+00   3.4365681e+00   3.8729833e+00   3.5369478e+00   2.8740216e+00   2.8757608e+00   3.1575307e+00   3.5057096e+00   2.8982753e+00   2.1863211e+00   3.0166206e+00   2.9546573e+00   3.0049958e+00   3.2726136e+00   1.9157244e+00   2.9376862e+00   5.1874849e+00   4.0779897e+00   5.2488094e+00   4.5891176e+00   4.9689033e+00   6.0506198e+00   3.3882149e+00   5.5812185e+00   4.9618545e+00   5.5982140e+00   4.2918527e+00   4.4305756e+00   4.7937459e+00   4.0521599e+00   4.2953463e+00   4.5497253e+00   4.5628938e+00   6.2112801e+00   6.4459289e+00   4.0162171e+00   5.0665570e+00   3.8897301e+00   6.1660360e+00   4.0236799e+00   4.9030603e+00   5.2649786e+00   3.8884444e+00   3.9115214e+00   4.7465777e+00   5.0517324e+00   5.5009090e+00   6.0041652e+00   4.7874837e+00   4.0681691e+00   4.4463468e+00   5.7645468e+00   4.8052055e+00   4.5188494e+00   3.7947332e+00   4.7486840e+00   4.9537864e+00   4.6000000e+00   4.0779897e+00   5.1903757e+00   5.0714889e+00   4.5978256e+00   4.1844952e+00   4.3874822e+00   4.5617979e+00   4.0224371e+00   5.8309519e-01   1.4317821e+00   1.6941074e+00   1.1269428e+00   6.1644140e-01   1.2569805e+00   8.8317609e-01   7.8740079e-01   8.2462113e-01   7.5498344e-01   6.5574385e-01   6.4807407e-01   3.0000000e-01   5.7445626e-01   6.5574385e-01   5.7445626e-01   3.1622777e-01   2.4494897e-01   7.8740079e-01   1.1747340e+00   1.3928388e+00   1.7320508e-01   3.6055513e-01   8.7177979e-01   1.7320508e-01   4.2426407e-01   5.1961524e-01   5.8309519e-01   7.9372539e-01   4.6904158e-01   7.6157731e-01   1.0344080e+00   2.0000000e-01   8.8317609e-01   3.0000000e-01   8.7177979e-01   3.7416574e-01   4.1785165e+00   3.7643060e+00   4.3162484e+00   3.0298515e+00   3.8897301e+00   3.4496377e+00   3.9344631e+00   2.1886069e+00   3.8639358e+00   2.8618176e+00   2.5019992e+00   3.3181320e+00   3.1064449e+00   3.7788887e+00   2.6324893e+00   3.7828561e+00   3.4942810e+00   3.0315013e+00   3.7643060e+00   2.8530685e+00   3.9623226e+00   3.1511903e+00   4.0877867e+00   3.7188708e+00   3.5242020e+00   3.7322915e+00   4.1581246e+00   4.3737855e+00   3.6083237e+00   2.4879711e+00   2.7586228e+00   2.6362853e+00   2.9240383e+00   4.1797129e+00   3.4539832e+00   3.6687873e+00   4.0583248e+00   3.6304270e+00   3.0610456e+00   2.9899833e+00   3.2954514e+00   3.6905284e+00   3.0215890e+00   2.2248595e+00   3.1638584e+00   3.1400637e+00   3.1780497e+00   3.4380227e+00   1.9748418e+00   3.0951575e+00   5.4092513e+00   4.2449971e+00   5.4350713e+00   4.7738873e+00   5.1633323e+00   6.2353829e+00   3.5256205e+00   5.7584720e+00   5.1097945e+00   5.8283788e+00   4.4977772e+00   4.5934736e+00   4.9809638e+00   4.1988094e+00   4.4743715e+00   4.7592016e+00   4.7528939e+00   6.4459289e+00   6.6075714e+00   4.1231056e+00   5.2706736e+00   4.0669399e+00   6.3364028e+00   4.1809090e+00   5.1176166e+00   5.4635154e+00   4.0558600e+00   4.1024383e+00   4.9234135e+00   5.2316345e+00   5.6683331e+00   6.2337790e+00   4.9648766e+00   4.2355637e+00   4.6021734e+00   5.9447456e+00   5.0338852e+00   4.7191101e+00   3.9862263e+00   4.9416596e+00   5.1526692e+00   4.7906158e+00   4.2449971e+00   5.3972215e+00   5.2867760e+00   4.7843495e+00   4.3243497e+00   4.5760245e+00   4.7916594e+00   4.2178193e+00   1.8083141e+00   2.0420578e+00   1.4662878e+00   1.0099505e+00   1.7320508e+00   1.2165525e+00   1.3190906e+00   1.1747340e+00   6.8556546e-01   1.1180340e+00   1.0295630e+00   8.6602540e-01   9.9498744e-01   1.1090537e+00   1.0344080e+00   6.7823300e-01   7.2111026e-01   1.2727922e+00   1.4764823e+00   1.7262677e+00   7.2801099e-01   7.4161985e-01   1.3190906e+00   7.2801099e-01   2.4494897e-01   9.8488578e-01   9.0553851e-01   7.8102497e-01   3.1622777e-01   1.1135529e+00   1.4177447e+00   6.1644140e-01   1.2409674e+00   4.7958315e-01   1.2884099e+00   8.2462113e-01   4.6882833e+00   4.2391037e+00   4.8135226e+00   3.4322005e+00   4.3692105e+00   3.8729833e+00   4.3931765e+00   2.5238859e+00   4.3577517e+00   3.2295511e+00   2.8390139e+00   3.7589892e+00   3.5707142e+00   4.2308392e+00   3.0643107e+00   4.2836900e+00   3.9000000e+00   3.4856850e+00   4.2154478e+00   3.2832910e+00   4.3794977e+00   3.6235342e+00   4.5442271e+00   4.1773197e+00   4.0124805e+00   4.2272923e+00   4.6551047e+00   4.8507731e+00   4.0521599e+00   2.9478806e+00   3.1764760e+00   3.0610456e+00   3.3749074e+00   4.6076024e+00   3.8379682e+00   4.1060930e+00   4.5486262e+00   4.1012193e+00   3.4828150e+00   3.3970576e+00   3.7013511e+00   4.1448764e+00   3.4684290e+00   2.5748786e+00   3.5818989e+00   3.5749126e+00   3.6083237e+00   3.9115214e+00   2.3452079e+00   3.5270384e+00   5.8189346e+00   4.6454279e+00   5.9059292e+00   5.2105662e+00   5.5982140e+00   6.7186308e+00   3.8379682e+00   6.2401923e+00   5.5668663e+00   6.2872888e+00   4.9487372e+00   5.0378567e+00   5.4415071e+00   4.5858478e+00   4.8559242e+00   5.1894123e+00   5.2048055e+00   6.9260378e+00   7.0851958e+00   4.5497253e+00   5.7271284e+00   4.4474712e+00   6.8242216e+00   4.6281746e+00   5.5686623e+00   5.9455866e+00   4.4977772e+00   4.5354162e+00   5.3572381e+00   5.7227616e+00   6.1554854e+00   6.7305275e+00   5.3953684e+00   4.6904158e+00   5.0338852e+00   6.4342832e+00   5.4497706e+00   5.1643005e+00   4.4124823e+00   5.4092513e+00   5.5955339e+00   5.2545219e+00   4.6454279e+00   5.8455111e+00   5.7245087e+00   5.2354560e+00   4.7644517e+00   5.0259327e+00   5.2057660e+00   4.6314145e+00   5.4772256e-01   4.6904158e-01   8.8881944e-01   5.5677644e-01   7.9372539e-01   8.7749644e-01   8.4261498e-01   1.2806248e+00   1.1489125e+00   1.3601471e+00   1.3416408e+00   1.0954451e+00   8.3666003e-01   8.7177979e-01   1.4177447e+00   1.4035669e+00   8.0622577e-01   6.8556546e-01   4.1231056e-01   1.3114877e+00   1.1313708e+00   5.9160798e-01   1.3114877e+00   1.7233688e+00   9.6953597e-01   9.5393920e-01   2.1447611e+00   1.6155494e+00   1.1000000e+00   1.0295630e+00   1.4317821e+00   8.3066239e-01   1.4560220e+00   6.5574385e-01   1.0816654e+00   3.9711459e+00   3.6851052e+00   4.1713307e+00   3.4684290e+00   3.8961519e+00   3.6810325e+00   3.8665230e+00   2.9017236e+00   3.8236109e+00   3.2832910e+00   3.2511536e+00   3.4205263e+00   3.4292856e+00   3.8716921e+00   2.8670542e+00   3.6469165e+00   3.6905284e+00   3.2771939e+00   3.9974992e+00   3.2233523e+00   4.0211939e+00   3.2526912e+00   4.2284749e+00   3.8444766e+00   3.5199432e+00   3.6496575e+00   4.1036569e+00   4.3011626e+00   3.7188708e+00   2.8106939e+00   3.1968735e+00   3.0886890e+00   3.1591138e+00   4.3474130e+00   3.7067506e+00   3.6400549e+00   3.9446166e+00   3.8196859e+00   3.2649655e+00   3.3749074e+00   3.6455452e+00   3.7536649e+00   3.2863353e+00   2.9291637e+00   3.4554305e+00   3.3181320e+00   3.3808283e+00   3.4914181e+00   2.6057628e+00   3.3271610e+00   5.3916602e+00   4.4485953e+00   5.3282267e+00   4.8352870e+00   5.1623638e+00   6.0835845e+00   4.0249224e+00   5.6595053e+00   5.1749396e+00   5.6053546e+00   4.4249294e+00   4.6636895e+00   4.9091751e+00   4.4654227e+00   4.6357308e+00   4.7138095e+00   4.7476310e+00   6.1562976e+00   6.5169011e+00   4.4056782e+00   5.1487863e+00   4.2906876e+00   6.2080593e+00   4.2649736e+00   5.0159745e+00   5.3103672e+00   4.1376322e+00   4.1641326e+00   4.9769469e+00   5.1068581e+00   5.5587768e+00   5.8932164e+00   5.0159745e+00   4.3116122e+00   4.7801674e+00   5.7471732e+00   4.9809638e+00   4.7138095e+00   4.0693980e+00   4.8238988e+00   5.0813384e+00   4.6518813e+00   4.4485953e+00   5.3047149e+00   5.1807335e+00   4.7138095e+00   4.4530888e+00   4.5530210e+00   4.7507894e+00   4.3335897e+00   6.1644140e-01   1.0908712e+00   6.4031242e-01   8.5440037e-01   1.0816654e+00   9.2195445e-01   1.4628739e+00   1.2727922e+00   1.4177447e+00   1.5811388e+00   1.2247449e+00   1.0488088e+00   1.1401754e+00   1.5779734e+00   1.5968719e+00   1.0440307e+00   6.5574385e-01   3.6055513e-01   1.5556349e+00   1.4352700e+00   9.6436508e-01   1.5556349e+00   1.9313208e+00   1.1832160e+00   1.1618950e+00   2.4289916e+00   1.7916473e+00   1.1618950e+00   9.3808315e-01   1.6703293e+00   8.7749644e-01   1.6431677e+00   8.3066239e-01   1.3228757e+00   3.7907783e+00   3.4842503e+00   3.9874804e+00   3.3926391e+00   3.7443290e+00   3.5171011e+00   3.6400549e+00   2.8705400e+00   3.6715120e+00   3.1464265e+00   3.2572995e+00   3.2403703e+00   3.3970576e+00   3.6945906e+00   2.7349589e+00   3.4785054e+00   3.4899857e+00   3.1654384e+00   3.9115214e+00   3.1416556e+00   3.7854986e+00   3.1272992e+00   4.0914545e+00   3.6878178e+00   3.3749074e+00   3.4899857e+00   3.9572718e+00   4.1109610e+00   3.5425979e+00   2.7568098e+00   3.1336879e+00   3.0397368e+00   3.0495901e+00   4.1689327e+00   3.5014283e+00   3.3955854e+00   3.7603191e+00   3.7403208e+00   3.0886890e+00   3.2726136e+00   3.5114100e+00   3.5679126e+00   3.1843367e+00   2.9154759e+00   3.3166248e+00   3.1448370e+00   3.2171416e+00   3.3391616e+00   2.5903668e+00   3.1827661e+00   5.1215232e+00   4.2555846e+00   5.1156622e+00   4.6238512e+00   4.9325450e+00   5.8711157e+00   3.8652296e+00   5.4598535e+00   5.0059964e+00   5.3347915e+00   4.1952354e+00   4.4799554e+00   4.6968074e+00   4.2918527e+00   4.4192760e+00   4.4698993e+00   4.5343136e+00   5.8855756e+00   6.3253458e+00   4.2883563e+00   4.9122296e+00   4.0853396e+00   6.0133186e+00   4.0951190e+00   4.7686476e+00   5.0892043e+00   3.9572718e+00   3.9547440e+00   4.7696960e+00   4.9132474e+00   5.3721504e+00   5.6364883e+00   4.8062459e+00   4.1340053e+00   4.6054316e+00   5.5434646e+00   4.7085029e+00   4.4877611e+00   3.8600518e+00   4.6076024e+00   4.8476799e+00   4.4384682e+00   4.2555846e+00   5.0616203e+00   4.9254441e+00   4.5011110e+00   4.2976738e+00   4.3416587e+00   4.4799554e+00   4.1133928e+00   5.1961524e-01   5.1961524e-01   3.8729833e-01   6.7082039e-01   4.1231056e-01   9.2736185e-01   7.8740079e-01   1.0049876e+00   1.0488088e+00   7.0710678e-01   5.2915026e-01   5.8309519e-01   1.0535654e+00   1.0630146e+00   5.3851648e-01   4.5825757e-01   3.8729833e-01   1.0099505e+00   8.3666003e-01   4.5825757e-01   1.0099505e+00   1.3601471e+00   6.4807407e-01   5.7445626e-01   1.8384776e+00   1.2369317e+00   6.7082039e-01   6.7823300e-01   1.0908712e+00   4.7958315e-01   1.0862780e+00   3.6055513e-01   7.5498344e-01   3.9509493e+00   3.5972211e+00   4.1303753e+00   3.2664966e+00   3.8105118e+00   3.5142567e+00   3.7643060e+00   2.6191602e+00   3.7603191e+00   3.0397368e+00   2.9949958e+00   3.2680269e+00   3.3015148e+00   3.7483330e+00   2.6720778e+00   3.5972211e+00   3.5071356e+00   3.1304952e+00   3.8704005e+00   3.0413813e+00   3.8665230e+00   3.1304952e+00   4.1158231e+00   3.7282704e+00   3.4365681e+00   3.5860842e+00   4.0521599e+00   4.2284749e+00   3.5791060e+00   2.6419690e+00   3.0000000e+00   2.8948230e+00   3.0000000e+00   4.2047592e+00   3.5014283e+00   3.5057096e+00   3.8858718e+00   3.7134889e+00   3.0822070e+00   3.1733263e+00   3.4568772e+00   3.6318040e+00   3.1272992e+00   2.6608269e+00   3.2710854e+00   3.1543621e+00   3.2109189e+00   3.3837849e+00   2.3302360e+00   3.1543621e+00   5.2602281e+00   4.2766810e+00   5.2678269e+00   4.7180504e+00   5.0507425e+00   6.0522723e+00   3.7603191e+00   5.6187187e+00   5.0852729e+00   5.5479726e+00   4.3243497e+00   4.5486262e+00   4.8270074e+00   4.2778499e+00   4.4508426e+00   4.5934736e+00   4.6497312e+00   6.1400326e+00   6.4768820e+00   4.2602817e+00   5.0705029e+00   4.0951190e+00   6.1822326e+00   4.1436699e+00   4.9295030e+00   5.2706736e+00   4.0074930e+00   4.0274061e+00   4.8569538e+00   5.0734604e+00   5.5226805e+00   5.9016947e+00   4.8928519e+00   4.2035699e+00   4.6551047e+00   5.7227616e+00   4.8528342e+00   4.6086874e+00   3.9217343e+00   4.7528939e+00   4.9819675e+00   4.5760245e+00   4.2766810e+00   5.2172790e+00   5.0813384e+00   4.6173586e+00   4.3255058e+00   4.4485953e+00   4.6162756e+00   4.1785165e+00   7.3484692e-01   3.1622777e-01   4.4721360e-01   2.4494897e-01   6.5574385e-01   4.1231056e-01   6.0000000e-01   5.5677644e-01   2.6457513e-01   1.7320508e-01   1.7320508e-01   5.4772256e-01   5.4772256e-01   3.4641016e-01   6.4807407e-01   8.1240384e-01   5.0000000e-01   3.8729833e-01   4.2426407e-01   5.0000000e-01   8.7177979e-01   1.7320508e-01   1.4142136e-01   1.3453624e+00   7.7459667e-01   3.7416574e-01   5.9160798e-01   5.8309519e-01   3.7416574e-01   5.9160798e-01   3.1622777e-01   2.4494897e-01   3.9749214e+00   3.5818989e+00   4.1340053e+00   3.0594117e+00   3.7589892e+00   3.3852622e+00   3.7496667e+00   2.3130067e+00   3.7215588e+00   2.8478062e+00   2.6758176e+00   3.1890437e+00   3.1224990e+00   3.6687873e+00   2.5396850e+00   3.5958309e+00   3.3985291e+00   2.9849623e+00   3.7349699e+00   2.8530685e+00   3.8131352e+00   3.0413813e+00   4.0162171e+00   3.6318040e+00   3.3852622e+00   3.5651087e+00   4.0187063e+00   4.2107007e+00   3.4957117e+00   2.4637370e+00   2.7874720e+00   2.6739484e+00   2.8618176e+00   4.1024383e+00   3.3749074e+00   3.4813790e+00   3.8794329e+00   3.5888717e+00   2.9647934e+00   2.9866369e+00   3.2832910e+00   3.5637059e+00   2.9782545e+00   2.3558438e+00   3.1192948e+00   3.0430248e+00   3.0919250e+00   3.3136083e+00   2.0493902e+00   3.0232433e+00   5.2421370e+00   4.1689327e+00   5.2668776e+00   4.6572524e+00   5.0179677e+00   6.0646517e+00   3.5510562e+00   5.6089215e+00   5.0169712e+00   5.5991071e+00   4.3162484e+00   4.4833024e+00   4.8155997e+00   4.1484937e+00   4.3680659e+00   4.5814845e+00   4.6119410e+00   6.2088646e+00   6.4668385e+00   4.1109610e+00   5.0813384e+00   3.9849718e+00   6.1830413e+00   4.0718546e+00   4.9325450e+00   5.2829916e+00   3.9382737e+00   3.9686270e+00   4.8020829e+00   5.0705029e+00   5.5163394e+00   5.9849812e+00   4.8404545e+00   4.1303753e+00   4.5453273e+00   5.7532599e+00   4.8476799e+00   4.5727453e+00   3.8561639e+00   4.7581509e+00   4.9769469e+00   4.5923850e+00   4.1689327e+00   5.2182373e+00   5.0921508e+00   4.6097722e+00   4.2379240e+00   4.4204072e+00   4.6065171e+00   4.1024383e+00   6.3245553e-01   5.0990195e-01   6.4807407e-01   1.3228757e+00   8.0622577e-01   1.0099505e+00   1.0723805e+00   8.1853528e-01   6.2449980e-01   7.1414284e-01   1.1747340e+00   1.1489125e+00   5.4772256e-01   6.4807407e-01   5.4772256e-01   1.1000000e+00   1.0535654e+00   5.4772256e-01   1.1000000e+00   1.5811388e+00   7.5498344e-01   8.6023253e-01   1.9621417e+00   1.4899664e+00   8.2462113e-01   6.4031242e-01   1.2409674e+00   6.1644140e-01   1.2922848e+00   4.6904158e-01   9.1651514e-01   3.5014283e+00   3.1827661e+00   3.6891733e+00   2.9291637e+00   3.3896903e+00   3.1368774e+00   3.3615473e+00   2.3769729e+00   3.3211444e+00   2.7404379e+00   2.7313001e+00   2.8930952e+00   2.9034462e+00   3.3436507e+00   2.3302360e+00   3.1606961e+00   3.1511903e+00   2.7331301e+00   3.4770677e+00   2.6795522e+00   3.5014283e+00   2.7294688e+00   3.7054015e+00   3.3120990e+00   3.0099834e+00   3.1543621e+00   3.6097091e+00   3.8065733e+00   3.1906112e+00   2.2737634e+00   2.6551836e+00   2.5475478e+00   2.6210685e+00   3.8144462e+00   3.1638584e+00   3.1272992e+00   3.4539832e+00   3.3015148e+00   2.7221315e+00   2.8319605e+00   3.0951575e+00   3.2280025e+00   2.7477263e+00   2.4062419e+00   2.9103264e+00   2.7748874e+00   2.8390139e+00   2.9698485e+00   2.0928450e+00   2.7856777e+00   4.8928519e+00   3.9166312e+00   4.8456166e+00   4.3162484e+00   4.6583259e+00   5.6124861e+00   3.4828150e+00   5.1749396e+00   4.6636895e+00   5.1468437e+00   3.9306488e+00   4.1496988e+00   4.4192760e+00   3.9331921e+00   4.1206796e+00   4.2201896e+00   4.2391037e+00   5.7105166e+00   6.0398675e+00   3.8704005e+00   4.6690470e+00   3.7603191e+00   5.7349804e+00   3.7496667e+00   4.5265881e+00   4.8321838e+00   3.6207734e+00   3.6455452e+00   4.4654227e+00   4.6249324e+00   5.0803543e+00   5.4607692e+00   4.5066617e+00   3.7894591e+00   4.2449971e+00   5.2915026e+00   4.4877611e+00   4.2035699e+00   3.5482390e+00   4.3428102e+00   4.5945620e+00   4.1821047e+00   3.9166312e+00   4.8176758e+00   4.7000000e+00   4.2296572e+00   3.9370039e+00   4.0521599e+00   4.2544095e+00   3.8065733e+00   5.4772256e-01   1.4142136e-01   7.4161985e-01   5.7445626e-01   6.4807407e-01   8.1853528e-01   4.3588989e-01   3.3166248e-01   4.3588989e-01   7.3484692e-01   7.7459667e-01   5.0990195e-01   3.7416574e-01   5.8309519e-01   7.5498344e-01   6.8556546e-01   5.4772256e-01   7.5498344e-01   1.0862780e+00   4.1231056e-01   3.7416574e-01   1.6278821e+00   9.4868330e-01   4.4721360e-01   4.1231056e-01   8.6023253e-01   1.4142136e-01   7.9372539e-01   2.4494897e-01   5.2915026e-01   3.9268308e+00   3.5341194e+00   4.0902323e+00   3.1080541e+00   3.7429935e+00   3.3704599e+00   3.6905284e+00   2.3937418e+00   3.6972963e+00   2.8618176e+00   2.7820855e+00   3.1638584e+00   3.1796226e+00   3.6414283e+00   2.5436195e+00   3.5594943e+00   3.3660065e+00   2.9916551e+00   3.7696154e+00   2.8879058e+00   3.7603191e+00   3.0413813e+00   4.0162171e+00   3.6124784e+00   3.3674916e+00   3.5369478e+00   3.9987498e+00   4.1725292e+00   3.4727511e+00   2.5079872e+00   2.8372522e+00   2.7294688e+00   2.8757608e+00   4.0828911e+00   3.3421550e+00   3.4146742e+00   3.8379682e+00   3.6193922e+00   2.9410882e+00   3.0166206e+00   3.2893768e+00   3.5298725e+00   2.9983329e+00   2.4474477e+00   3.1224990e+00   3.0166206e+00   3.0757113e+00   3.2954514e+00   2.1400935e+00   3.0199338e+00   5.1749396e+00   4.1496988e+00   5.2191953e+00   4.6162756e+00   4.9699095e+00   6.0116553e+00   3.5623026e+00   5.5623736e+00   4.9989999e+00   5.5181519e+00   4.2626283e+00   4.4609416e+00   4.7717921e+00   4.1460825e+00   4.3428102e+00   4.5265881e+00   4.5661800e+00   6.1163715e+00   6.4311741e+00   4.1303753e+00   5.0239427e+00   3.9623226e+00   6.1392182e+00   4.0570926e+00   4.8672374e+00   5.2220686e+00   3.9179076e+00   3.9306488e+00   4.7686476e+00   5.0229473e+00   5.4781384e+00   5.8940648e+00   4.8072861e+00   4.1036569e+00   4.5232732e+00   5.7061370e+00   4.7770284e+00   4.5199558e+00   3.8196859e+00   4.7095647e+00   4.9264592e+00   4.5486262e+00   4.1496988e+00   5.1584882e+00   5.0289164e+00   4.5705580e+00   4.2355637e+00   4.3794977e+00   4.5365185e+00   4.0607881e+00   5.0990195e-01   1.0816654e+00   4.3588989e-01   6.3245553e-01   5.7445626e-01   4.5825757e-01   3.0000000e-01   3.6055513e-01   7.3484692e-01   6.7823300e-01   2.8284271e-01   7.6157731e-01   8.6023253e-01   6.2449980e-01   6.7082039e-01   4.2426407e-01   6.2449980e-01   1.1489125e+00   3.6055513e-01   5.8309519e-01   1.4798649e+00   1.0954451e+00   5.8309519e-01   5.7445626e-01   7.8740079e-01   5.0990195e-01   8.7749644e-01   3.7416574e-01   5.0990195e-01   3.6110940e+00   3.2511536e+00   3.7775654e+00   2.7784888e+00   3.4161382e+00   3.0822070e+00   3.4322005e+00   2.1095023e+00   3.3630343e+00   2.6095977e+00   2.4494897e+00   2.8896367e+00   2.7802878e+00   3.3436507e+00   2.2605309e+00   3.2419130e+00   3.1192948e+00   2.6551836e+00   3.4073450e+00   2.5495098e+00   3.5298725e+00   2.7110883e+00   3.6810325e+00   3.2939338e+00   3.0364453e+00   3.2140317e+00   3.6565011e+00   3.8716921e+00   3.1843367e+00   2.1470911e+00   2.4959968e+00   2.3769729e+00   2.5475478e+00   3.7907783e+00   3.1128765e+00   3.1874755e+00   3.5312887e+00   3.2434549e+00   2.6776856e+00   2.7055499e+00   2.9899833e+00   3.2403703e+00   2.6627054e+00   2.1377558e+00   2.8266588e+00   2.7386128e+00   2.7928480e+00   2.9765752e+00   1.8439089e+00   2.7239677e+00   4.9598387e+00   3.8858718e+00   4.9295030e+00   4.3393548e+00   4.7095647e+00   5.7113921e+00   3.3391616e+00   5.2516664e+00   4.6765372e+00   5.2848841e+00   4.0062451e+00   4.1641326e+00   4.4911023e+00   3.8768544e+00   4.1133928e+00   4.2906876e+00   4.2860238e+00   5.8694122e+00   6.1139185e+00   3.7920970e+00   4.7644517e+00   3.7255872e+00   5.8215118e+00   3.7549967e+00   4.6162756e+00   4.9325450e+00   3.6290495e+00   3.6674242e+00   4.4922155e+00   4.7085029e+00   5.1584882e+00   5.6338264e+00   4.5354162e+00   3.7973675e+00   4.2166337e+00   5.4055527e+00   4.5672749e+00   4.2532341e+00   3.5623026e+00   4.4317040e+00   4.6722586e+00   4.2790186e+00   3.8858718e+00   4.9040799e+00   4.7947888e+00   4.3023250e+00   3.9242834e+00   4.1060930e+00   4.3289722e+00   3.8118237e+00   7.4161985e-01   4.5825757e-01   6.1644140e-01   7.4161985e-01   3.3166248e-01   3.0000000e-01   3.8729833e-01   6.7823300e-01   7.0710678e-01   4.2426407e-01   5.0990195e-01   6.7823300e-01   7.0000000e-01   6.2449980e-01   5.2915026e-01   7.0000000e-01   1.0295630e+00   3.6055513e-01   3.1622777e-01   1.5394804e+00   9.0553851e-01   3.1622777e-01   4.1231056e-01   7.7459667e-01   2.4494897e-01   7.4161985e-01   2.8284271e-01   4.6904158e-01   3.8858718e+00   3.4856850e+00   4.0459857e+00   3.0298515e+00   3.6864617e+00   3.3136083e+00   3.6441734e+00   2.3086793e+00   3.6482873e+00   2.7874720e+00   2.6944387e+00   3.1032241e+00   3.1096624e+00   3.5888717e+00   2.4718414e+00   3.5114100e+00   3.3090784e+00   2.9342802e+00   3.6972963e+00   2.8178006e+00   3.7067506e+00   2.9782545e+00   3.9560081e+00   3.5623026e+00   3.3136083e+00   3.4856850e+00   3.9484174e+00   4.1218928e+00   3.4146742e+00   2.4351591e+00   2.7622455e+00   2.6551836e+00   2.8089144e+00   4.0261644e+00   3.2848135e+00   3.3674916e+00   3.7907783e+00   3.5524639e+00   2.8827071e+00   2.9427878e+00   3.2280025e+00   3.4785054e+00   2.9308702e+00   2.3600847e+00   3.0577770e+00   2.9631065e+00   3.0166206e+00   3.2403703e+00   2.0445048e+00   2.9563491e+00   5.1244512e+00   4.0865633e+00   5.1710734e+00   4.5661800e+00   4.9173163e+00   5.9699246e+00   3.4885527e+00   5.5208695e+00   4.9446941e+00   5.4763126e+00   4.2107007e+00   4.4022721e+00   4.7191101e+00   4.0755368e+00   4.2731721e+00   4.4710178e+00   4.5177428e+00   6.0868711e+00   6.3827894e+00   4.0644803e+00   4.9739320e+00   3.8961519e+00   6.0967204e+00   3.9949969e+00   4.8218254e+00   5.1836281e+00   3.8561639e+00   3.8742741e+00   4.7116876e+00   4.9829710e+00   5.4323107e+00   5.8668561e+00   4.7486840e+00   4.0521599e+00   4.4743715e+00   5.6586217e+00   4.7265209e+00   4.4732538e+00   3.7616486e+00   4.6583259e+00   4.8713448e+00   4.4911023e+00   4.0865633e+00   5.1097945e+00   4.9769469e+00   4.5110974e+00   4.1689327e+00   4.3243497e+00   4.4855323e+00   4.0062451e+00   9.5916630e-01   9.4339811e-01   9.3808315e-01   7.7459667e-01   7.8740079e-01   7.4833148e-01   7.2801099e-01   8.0622577e-01   9.8488578e-01   9.3273791e-01   1.1532563e+00   7.7459667e-01   6.0000000e-01   9.5393920e-01   7.7459667e-01   7.0000000e-01   7.3484692e-01   5.1961524e-01   1.3416408e+00   5.3851648e-01   8.3066239e-01   1.0677078e+00   7.5498344e-01   8.0622577e-01   5.6568542e-01   8.6602540e-01   6.4031242e-01   4.5880279e+00   4.1641326e+00   4.7370877e+00   3.5651087e+00   4.3474130e+00   3.9127995e+00   4.3162484e+00   2.7313001e+00   4.3197222e+00   3.3196385e+00   3.1000000e+00   3.7389838e+00   3.6823905e+00   4.2272923e+00   3.0757113e+00   4.2023803e+00   3.9115214e+00   3.5355339e+00   4.2965102e+00   3.3808283e+00   4.3416587e+00   3.6193922e+00   4.5825757e+00   4.1928511e+00   3.9786933e+00   4.1665333e+00   4.6216880e+00   4.7979162e+00   4.0484565e+00   3.0166206e+00   3.3015148e+00   3.1906112e+00   3.4146742e+00   4.6411206e+00   3.8652296e+00   4.0261644e+00   4.4766059e+00   4.1653331e+00   3.4899857e+00   3.4971417e+00   3.7907783e+00   4.1243181e+00   3.5270384e+00   2.7892651e+00   3.6414283e+00   3.5791060e+00   3.6262929e+00   3.8923001e+00   2.5039968e+00   3.5594943e+00   5.7680153e+00   4.6850827e+00   5.8506410e+00   5.2057660e+00   5.5686623e+00   6.6580778e+00   3.9749214e+00   6.1991935e+00   5.5874860e+00   6.1692787e+00   4.8805737e+00   5.0428167e+00   5.3907328e+00   4.6540305e+00   4.8713448e+00   5.1283526e+00   5.1749396e+00   6.7926431e+00   7.0590368e+00   4.6486557e+00   5.6524331e+00   4.4821870e+00   6.7808554e+00   4.6335731e+00   5.4954527e+00   5.8719673e+00   4.4944410e+00   4.5144213e+00   5.3525695e+00   5.6674509e+00   6.1139185e+00   6.5825527e+00   5.3888774e+00   4.6936127e+00   5.0842895e+00   6.3553127e+00   5.3786615e+00   5.1283526e+00   4.3954522e+00   5.3394756e+00   5.5371473e+00   5.1730069e+00   4.6850827e+00   5.7810034e+00   5.6462377e+00   5.1788030e+00   4.7947888e+00   4.9849774e+00   5.1351728e+00   4.6281746e+00   4.7958315e-01   4.4721360e-01   2.0000000e-01   4.2426407e-01   4.4721360e-01   5.1961524e-01   4.7958315e-01   3.8729833e-01   9.2195445e-01   1.0723805e+00   5.2915026e-01   6.0000000e-01   6.7082039e-01   5.2915026e-01   9.1104336e-01   3.7416574e-01   5.0000000e-01   1.2489996e+00   8.6602540e-01   2.6457513e-01   5.4772256e-01   5.5677644e-01   5.9160798e-01   6.6332496e-01   5.7445626e-01   4.3588989e-01   3.6646964e+00   3.2465366e+00   3.8105118e+00   2.6627054e+00   3.4088121e+00   3.0149627e+00   3.4132096e+00   1.9131126e+00   3.3852622e+00   2.4535688e+00   2.2781571e+00   2.8248894e+00   2.7495454e+00   3.3120990e+00   2.1587033e+00   3.2710854e+00   3.0298515e+00   2.6191602e+00   3.3555923e+00   2.4677925e+00   3.4568772e+00   2.6795522e+00   3.6496575e+00   3.2771939e+00   3.0413813e+00   3.2310989e+00   3.6823905e+00   3.8704005e+00   3.1320920e+00   2.0832667e+00   2.3958297e+00   2.2847319e+00   2.4859606e+00   3.7336309e+00   3.0033315e+00   3.1416556e+00   3.5496479e+00   3.2202484e+00   2.5961510e+00   2.5942244e+00   2.9034462e+00   3.2109189e+00   2.6000000e+00   1.9544820e+00   2.7386128e+00   2.6814175e+00   2.7221315e+00   2.9614186e+00   1.6401219e+00   2.6476405e+00   4.8918299e+00   3.7907783e+00   4.9284886e+00   4.3011626e+00   4.6636895e+00   5.7367238e+00   3.1559468e+00   5.2773099e+00   4.6583259e+00   5.2782573e+00   3.9724048e+00   4.1194660e+00   4.4698993e+00   3.7603191e+00   3.9887341e+00   4.2308392e+00   4.2638011e+00   5.9076222e+00   6.1261734e+00   3.7296112e+00   4.7423623e+00   3.6041643e+00   5.8532043e+00   3.7054015e+00   4.5956501e+00   4.9598387e+00   3.5721142e+00   3.6083237e+00   4.4395946e+00   4.7455242e+00   5.1826634e+00   5.6947344e+00   4.4766059e+00   3.7749172e+00   4.1844952e+00   5.4267854e+00   4.5022217e+00   4.2261093e+00   3.4928498e+00   4.4192760e+00   4.6281746e+00   4.2520583e+00   3.7907783e+00   4.8764741e+00   4.7497368e+00   4.2591079e+00   3.8639358e+00   4.0681691e+00   4.2602817e+00   3.7389838e+00   5.3851648e-01   4.1231056e-01   5.7445626e-01   6.4031242e-01   3.7416574e-01   4.2426407e-01   7.4833148e-01   9.0553851e-01   1.1747340e+00   5.1961524e-01   7.5498344e-01   9.2736185e-01   5.1961524e-01   8.2462113e-01   5.0000000e-01   6.4807407e-01   1.2922848e+00   7.4833148e-01   5.4772256e-01   5.3851648e-01   6.4807407e-01   5.8309519e-01   5.7445626e-01   7.0710678e-01   5.4772256e-01   3.7629775e+00   3.3241540e+00   3.8974351e+00   2.7055499e+00   3.4971417e+00   3.0232433e+00   3.4727511e+00   1.9000000e+00   3.4626579e+00   2.4677925e+00   2.2803509e+00   2.8896367e+00   2.8160256e+00   3.3496268e+00   2.2338308e+00   3.3749074e+00   3.0413813e+00   2.6400758e+00   3.4423829e+00   2.5019992e+00   3.4957117e+00   2.7694765e+00   3.7080992e+00   3.3000000e+00   3.1272992e+00   3.3301652e+00   3.7696154e+00   3.9534795e+00   3.1843367e+00   2.1563859e+00   2.4310492e+00   2.3173260e+00   2.5475478e+00   3.7589892e+00   2.9949958e+00   3.1874755e+00   3.6373067e+00   3.3045423e+00   2.6172505e+00   2.6305893e+00   2.8948230e+00   3.2526912e+00   2.6551836e+00   1.9621417e+00   2.7622455e+00   2.6944387e+00   2.7495454e+00   3.0298515e+00   1.7088007e+00   2.6870058e+00   4.9355851e+00   3.8236109e+00   5.0059964e+00   4.3301270e+00   4.7180504e+00   5.8051701e+00   3.1352831e+00   5.3310412e+00   4.7106263e+00   5.3600373e+00   4.0509258e+00   4.1833001e+00   4.5530210e+00   3.8039453e+00   4.0546270e+00   4.3092923e+00   4.3092923e+00   5.9674115e+00   6.2016127e+00   3.7656341e+00   4.8270074e+00   3.6386811e+00   5.9203040e+00   3.7815341e+00   4.6551047e+00   5.0169712e+00   3.6455452e+00   3.6619667e+00   4.4966654e+00   4.8052055e+00   5.2583267e+00   5.7671483e+00   4.5398238e+00   3.8131352e+00   4.1785165e+00   5.5335341e+00   4.5585085e+00   4.2626283e+00   3.5454196e+00   4.5122057e+00   4.7148701e+00   4.3760713e+00   3.8236109e+00   4.9446941e+00   4.8321838e+00   4.3669211e+00   3.9446166e+00   4.1448764e+00   4.3150898e+00   3.7643060e+00   4.4721360e-01   5.4772256e-01   4.8989795e-01   3.6055513e-01   2.2360680e-01   6.0827625e-01   1.1269428e+00   1.3152946e+00   2.0000000e-01   4.4721360e-01   7.6811457e-01   2.0000000e-01   6.7082039e-01   4.2426407e-01   5.9160798e-01   9.1651514e-01   7.0000000e-01   6.4031242e-01   8.8317609e-01   3.0000000e-01   8.0622577e-01   4.8989795e-01   7.6811457e-01   3.6055513e-01   3.8845849e+00   3.4785054e+00   4.0249224e+00   2.7766887e+00   3.6027767e+00   3.1859065e+00   3.6537652e+00   1.9748418e+00   3.5749126e+00   2.6191602e+00   2.2912878e+00   3.0430248e+00   2.8354894e+00   3.5028560e+00   2.3622024e+00   3.4899857e+00   3.2341923e+00   2.7604347e+00   3.4899857e+00   2.5903668e+00   3.6945906e+00   2.8670542e+00   3.8105118e+00   3.4438351e+00   3.2357379e+00   3.4409301e+00   3.8678159e+00   4.0865633e+00   3.3331667e+00   2.2135944e+00   2.5019992e+00   2.3790755e+00   2.6495283e+00   3.9115214e+00   3.2031235e+00   3.3955854e+00   3.7682887e+00   3.3511192e+00   2.7964263e+00   2.7331301e+00   3.0413813e+00   3.4132096e+00   2.7495454e+00   2.0049938e+00   2.9017236e+00   2.8722813e+00   2.9103264e+00   3.1543621e+00   1.7406895e+00   2.8266588e+00   5.1410116e+00   3.9837169e+00   5.1487863e+00   4.5011110e+00   4.8877398e+00   5.9472683e+00   3.3045423e+00   5.4726593e+00   4.8311489e+00   5.5443665e+00   4.2166337e+00   4.3162484e+00   4.6968074e+00   3.9420807e+00   4.2154478e+00   4.4833024e+00   4.4743715e+00   6.1595454e+00   6.3206012e+00   3.8587563e+00   4.9869831e+00   3.8118237e+00   6.0481402e+00   3.9025633e+00   4.8373546e+00   5.1768716e+00   3.7788887e+00   3.8288379e+00   4.6486557e+00   4.9436828e+00   5.3795911e+00   5.9439044e+00   4.6904158e+00   3.9585351e+00   4.3370497e+00   5.6524331e+00   4.7634021e+00   4.4429720e+00   3.7148351e+00   4.6551047e+00   4.8723711e+00   4.5033321e+00   3.9837169e+00   5.1166395e+00   5.0079936e+00   4.5011110e+00   4.0484565e+00   4.2953463e+00   4.5221676e+00   3.9522146e+00   3.1622777e-01   3.4641016e-01   4.1231056e-01   4.1231056e-01   4.1231056e-01   7.9372539e-01   9.8488578e-01   4.4721360e-01   4.8989795e-01   6.2449980e-01   4.4721360e-01   8.0622577e-01   2.4494897e-01   3.3166248e-01   1.2489996e+00   7.2801099e-01   2.2360680e-01   5.0990195e-01   5.0000000e-01   4.5825757e-01   5.2915026e-01   4.7958315e-01   3.0000000e-01   3.8275318e+00   3.4088121e+00   3.9749214e+00   2.8337255e+00   3.5805028e+00   3.1733263e+00   3.5707142e+00   2.0639767e+00   3.5524639e+00   2.6115130e+00   2.4351591e+00   2.9899833e+00   2.9257478e+00   3.4741906e+00   2.3280893e+00   3.4380227e+00   3.1843367e+00   2.7820855e+00   3.5355339e+00   2.6362853e+00   3.6124784e+00   2.8530685e+00   3.8209946e+00   3.4380227e+00   3.2109189e+00   3.4000000e+00   3.8522721e+00   4.0373258e+00   3.2969683e+00   2.2583180e+00   2.5651511e+00   2.4535688e+00   2.6570661e+00   3.8961519e+00   3.1527766e+00   3.2939338e+00   3.7148351e+00   3.3985291e+00   2.7531800e+00   2.7622455e+00   3.0610456e+00   3.3719431e+00   2.7712813e+00   2.1118712e+00   2.9017236e+00   2.8372522e+00   2.8827071e+00   3.1288976e+00   1.8083141e+00   2.8124722e+00   5.0467812e+00   3.9534795e+00   5.0941143e+00   4.4609416e+00   4.8259714e+00   5.9000000e+00   3.3045423e+00   5.4396691e+00   4.8270074e+00   5.4350713e+00   4.1352146e+00   4.2883563e+00   4.6368092e+00   3.9268308e+00   4.1533119e+00   4.3931765e+00   4.4249294e+00   6.0580525e+00   6.2952363e+00   3.9000000e+00   4.9061186e+00   3.7643060e+00   6.0183054e+00   3.8768544e+00   4.7539457e+00   5.1185936e+00   3.7416574e+00   3.7709415e+00   4.6054316e+00   4.9071377e+00   5.3497664e+00   5.8455111e+00   4.6432747e+00   3.9382737e+00   4.3416587e+00   5.5955339e+00   4.6572524e+00   4.3840620e+00   3.6551334e+00   4.5858478e+00   4.7937459e+00   4.4226689e+00   3.9534795e+00   5.0378567e+00   4.9112117e+00   4.4294469e+00   4.0385641e+00   4.2343831e+00   4.4147480e+00   3.8961519e+00   1.4142136e-01   5.9160798e-01   5.7445626e-01   3.0000000e-01   6.0827625e-01   7.6811457e-01   5.0990195e-01   4.6904158e-01   3.6055513e-01   5.0990195e-01   9.6436508e-01   1.4142136e-01   3.0000000e-01   1.4071247e+00   8.7749644e-01   4.5825757e-01   5.4772256e-01   6.5574385e-01   3.3166248e-01   6.7823300e-01   2.2360680e-01   3.0000000e-01   3.8742741e+00   3.4957117e+00   4.0373258e+00   2.9983329e+00   3.6715120e+00   3.3090784e+00   3.6674242e+00   2.2759613e+00   3.6249138e+00   2.8000000e+00   2.6324893e+00   3.1176915e+00   3.0364453e+00   3.5846897e+00   2.4779023e+00   3.5014283e+00   3.3316662e+00   2.8982753e+00   3.6578682e+00   2.7802878e+00   3.7456642e+00   2.9597297e+00   3.9319207e+00   3.5411862e+00   3.2939338e+00   3.4727511e+00   3.9217343e+00   4.1231056e+00   3.4190642e+00   2.3874673e+00   2.7202941e+00   2.6038433e+00   2.7856777e+00   4.0249224e+00   3.3136083e+00   3.4073450e+00   3.7868192e+00   3.5028560e+00   2.8948230e+00   2.9240383e+00   3.2109189e+00   3.4799425e+00   2.9017236e+00   2.3151674e+00   3.0495901e+00   2.9647934e+00   3.0182777e+00   3.2264532e+00   2.0174241e+00   2.9512709e+00   5.1759057e+00   4.1048752e+00   5.1797683e+00   4.5760245e+00   4.9426713e+00   5.9690870e+00   3.5128336e+00   5.5108983e+00   4.9295030e+00   5.5190579e+00   4.2402830e+00   4.4056782e+00   4.7349762e+00   4.0914545e+00   4.3185646e+00   4.5144213e+00   4.5276926e+00   6.1139185e+00   6.3741666e+00   4.0336088e+00   5.0029991e+00   3.9306488e+00   6.0844063e+00   3.9962482e+00   4.8518038e+00   5.1865210e+00   3.8652296e+00   3.8961519e+00   4.7275787e+00   4.9699095e+00   5.4203321e+00   5.8847260e+00   4.7686476e+00   4.0435133e+00   4.4575778e+00   5.6630381e+00   4.7822589e+00   4.4899889e+00   3.7868192e+00   4.6765372e+00   4.9050994e+00   4.5188494e+00   4.1048752e+00   5.1400389e+00   5.0219518e+00   4.5387223e+00   4.1653331e+00   4.3439613e+00   4.5420260e+00   4.0323690e+00   5.7445626e-01   5.3851648e-01   3.0000000e-01   7.1414284e-01   8.5440037e-01   4.4721360e-01   3.4641016e-01   3.3166248e-01   4.4721360e-01   9.0000000e-01   1.4142136e-01   2.6457513e-01   1.3114877e+00   8.3066239e-01   5.0000000e-01   6.7823300e-01   5.7445626e-01   4.5825757e-01   6.3245553e-01   3.3166248e-01   2.2360680e-01   3.9509493e+00   3.5749126e+00   4.1133928e+00   3.0446675e+00   3.7389838e+00   3.3808283e+00   3.7509999e+00   2.3108440e+00   3.6959437e+00   2.8600699e+00   2.6551836e+00   3.1906112e+00   3.0789609e+00   3.6592349e+00   2.5416530e+00   3.5749126e+00   3.4088121e+00   2.9631065e+00   3.7067506e+00   2.8337255e+00   3.8275318e+00   3.0232433e+00   3.9949969e+00   3.6138622e+00   3.3630343e+00   3.5440090e+00   3.9899875e+00   4.1976184e+00   3.4914181e+00   2.4372115e+00   2.7676705e+00   2.6495283e+00   2.8460499e+00   4.0963398e+00   3.3911650e+00   3.4942810e+00   3.8626416e+00   3.5538711e+00   2.9698485e+00   2.9782545e+00   3.2756679e+00   3.5566838e+00   2.9597297e+00   2.3452079e+00   3.1144823e+00   3.0413813e+00   3.0903074e+00   3.2969683e+00   2.0469489e+00   3.0182777e+00   5.2602281e+00   4.1749251e+00   5.2564246e+00   4.6540305e+00   5.0209561e+00   6.0473135e+00   3.5721142e+00   5.5883808e+00   4.9979996e+00   5.6053546e+00   4.3197222e+00   4.4754888e+00   4.8104054e+00   4.1545156e+00   4.3874822e+00   4.5934736e+00   4.6065171e+00   6.2048368e+00   6.4459289e+00   4.0902323e+00   5.0823223e+00   4.0012498e+00   6.1595454e+00   4.0632499e+00   4.9355851e+00   5.2687759e+00   3.9344631e+00   3.9724048e+00   4.8010416e+00   5.0477718e+00   5.4936327e+00   5.9741108e+00   4.8414874e+00   4.1170378e+00   4.5310043e+00   5.7367238e+00   4.8672374e+00   4.5716518e+00   3.8626416e+00   4.7528939e+00   4.9819675e+00   4.5912961e+00   4.1749251e+00   5.2211110e+00   5.1029403e+00   4.6108568e+00   4.2272923e+00   4.4192760e+00   4.6270941e+00   4.1109610e+00   1.4142136e-01   7.6157731e-01   1.0392305e+00   1.2961481e+00   2.6457513e-01   5.0000000e-01   9.0553851e-01   2.6457513e-01   4.6904158e-01   4.5825757e-01   5.2915026e-01   9.7467943e-01   4.2426407e-01   5.8309519e-01   8.0622577e-01   3.1622777e-01   7.2111026e-01   2.2360680e-01   7.8740079e-01   3.7416574e-01   4.0422766e+00   3.6041643e+00   4.1749251e+00   2.9017236e+00   3.7536649e+00   3.2832910e+00   3.7603191e+00   2.0518285e+00   3.7296112e+00   2.6888659e+00   2.4041631e+00   3.1511903e+00   3.0149627e+00   3.6193922e+00   2.4718414e+00   3.6455452e+00   3.3090784e+00   2.8896367e+00   3.6537652e+00   2.7202941e+00   3.7735925e+00   3.0149627e+00   3.9534795e+00   3.5679126e+00   3.3882149e+00   3.5958309e+00   4.0311289e+00   4.2249260e+00   3.4467376e+00   2.3685439e+00   2.6324893e+00   2.5159491e+00   2.7838822e+00   4.0187063e+00   3.2603681e+00   3.4785054e+00   3.9127995e+00   3.5242020e+00   2.8827071e+00   2.8460499e+00   3.1368774e+00   3.5270384e+00   2.8861739e+00   2.1047565e+00   3.0049958e+00   2.9664794e+00   3.0099834e+00   3.2924155e+00   1.8493242e+00   2.9359837e+00   5.2172790e+00   4.0743098e+00   5.2820451e+00   4.6054316e+00   4.9919936e+00   6.0876925e+00   3.3451457e+00   5.6124861e+00   4.9689033e+00   5.6524331e+00   4.3278170e+00   4.4407207e+00   4.8238988e+00   4.0360872e+00   4.2965102e+00   4.5814845e+00   4.5880279e+00   6.2745518e+00   6.4699304e+00   3.9924930e+00   5.1048996e+00   3.8858718e+00   6.1975802e+00   4.0323690e+00   4.9426713e+00   5.3075418e+00   3.9000000e+00   3.9306488e+00   4.7602521e+00   5.0882217e+00   5.5308227e+00   6.0728906e+00   4.8010416e+00   4.0816663e+00   4.4452222e+00   5.8051701e+00   4.8414874e+00   4.5464272e+00   3.8118237e+00   4.7853944e+00   4.9849774e+00   4.6378875e+00   4.0743098e+00   5.2258971e+00   5.1097945e+00   4.6270941e+00   4.1833001e+00   4.4136153e+00   4.5978256e+00   4.0360872e+00   7.0710678e-01   1.0862780e+00   1.3190906e+00   1.7320508e-01   4.5825757e-01   8.6023253e-01   1.7320508e-01   5.0990195e-01   4.3588989e-01   5.4772256e-01   9.1104336e-01   5.0990195e-01   6.0000000e-01   8.4261498e-01   2.4494897e-01   7.6157731e-01   3.0000000e-01   7.8740079e-01   3.4641016e-01   3.9874804e+00   3.5594943e+00   4.1218928e+00   2.8460499e+00   3.6972963e+00   3.2434549e+00   3.7229021e+00   2.0074860e+00   3.6728735e+00   2.6551836e+00   2.3452079e+00   3.1096624e+00   2.9410882e+00   3.5749126e+00   2.4269322e+00   3.5902646e+00   3.2787193e+00   2.8372522e+00   3.5874782e+00   2.6645825e+00   3.7443290e+00   2.9580399e+00   3.8974351e+00   3.5199432e+00   3.3316662e+00   3.5397740e+00   3.9711459e+00   4.1749251e+00   3.4029399e+00   2.3043437e+00   2.5748786e+00   2.4556058e+00   2.7294688e+00   3.9761791e+00   3.2357379e+00   3.4496377e+00   3.8613469e+00   3.4554305e+00   2.8478062e+00   2.7964263e+00   3.0951575e+00   3.4842503e+00   2.8301943e+00   2.0518285e+00   2.9614186e+00   2.9291637e+00   2.9698485e+00   3.2403703e+00   1.7944358e+00   2.8913665e+00   5.1903757e+00   4.0373258e+00   5.2345009e+00   4.5661800e+00   4.9537864e+00   6.0382117e+00   3.3211444e+00   5.5623736e+00   4.9162994e+00   5.6169387e+00   4.2883563e+00   4.3931765e+00   4.7780749e+00   3.9962482e+00   4.2638011e+00   4.5464272e+00   4.5464272e+00   6.2377881e+00   6.4156060e+00   3.9370039e+00   5.0635956e+00   3.8548671e+00   6.1441029e+00   3.9824616e+00   4.9061186e+00   5.2621288e+00   3.8535698e+00   3.8923001e+00   4.7180504e+00   5.0368641e+00   5.4763126e+00   6.0315835e+00   4.7592016e+00   4.0348482e+00   4.4022721e+00   5.7515215e+00   4.8145612e+00   4.5088801e+00   3.7749172e+00   4.7391982e+00   4.9446941e+00   4.5902070e+00   4.0373258e+00   5.1874849e+00   5.0744458e+00   4.5814845e+00   4.1303753e+00   4.3703547e+00   4.5716518e+00   4.0037482e+00   7.8740079e-01   8.3666003e-01   6.5574385e-01   5.7445626e-01   3.1622777e-01   6.5574385e-01   1.1135529e+00   3.6055513e-01   4.6904158e-01   1.4387495e+00   1.0583005e+00   4.6904158e-01   6.4031242e-01   7.3484692e-01   5.4772256e-01   8.5440037e-01   3.7416574e-01   4.6904158e-01   3.7202150e+00   3.3541020e+00   3.8871583e+00   2.8774989e+00   3.5199432e+00   3.2031235e+00   3.5355339e+00   2.2022716e+00   3.4799425e+00   2.7000000e+00   2.5455844e+00   2.9849623e+00   2.9000000e+00   3.4612137e+00   2.3473389e+00   3.3451457e+00   3.2264532e+00   2.7874720e+00   3.5057096e+00   2.6645825e+00   3.6249138e+00   2.8124722e+00   3.7934153e+00   3.4249088e+00   3.1464265e+00   3.3181320e+00   3.7696154e+00   3.9736633e+00   3.2893768e+00   2.2561028e+00   2.6057628e+00   2.4919872e+00   2.6551836e+00   3.9051248e+00   3.2202484e+00   3.2863353e+00   3.6373067e+00   3.3526109e+00   2.7874720e+00   2.8071338e+00   3.1144823e+00   3.3555923e+00   2.7730849e+00   2.2293497e+00   2.9376862e+00   2.8600699e+00   2.9051678e+00   3.0886890e+00   1.9078784e+00   2.8319605e+00   5.0477718e+00   3.9824616e+00   5.0299105e+00   4.4530888e+00   4.8062459e+00   5.8223707e+00   3.4278273e+00   5.3721504e+00   4.7906158e+00   5.3712196e+00   4.0951190e+00   4.2638011e+00   4.5836667e+00   3.9635842e+00   4.1809090e+00   4.3692105e+00   4.3965896e+00   5.9774577e+00   6.2209324e+00   3.9064050e+00   4.8518038e+00   3.8105118e+00   5.9371710e+00   3.8496753e+00   4.7148701e+00   5.0487622e+00   3.7215588e+00   3.7643060e+00   4.5891176e+00   4.8301139e+00   5.2697249e+00   5.7428216e+00   4.6270941e+00   3.9166312e+00   4.3520110e+00   5.4972721e+00   4.6497312e+00   4.3646306e+00   3.6565011e+00   4.5210618e+00   4.7528939e+00   4.3485630e+00   3.9824616e+00   4.9969991e+00   4.8733972e+00   4.3760713e+00   4.0149720e+00   4.1976184e+00   4.4113490e+00   3.9153544e+00   3.4641016e-01   1.0440307e+00   9.7467943e-01   7.0710678e-01   1.0440307e+00   1.3784049e+00   7.1414284e-01   6.9282032e-01   1.9519221e+00   1.2247449e+00   8.1240384e-01   5.9160798e-01   1.1916375e+00   3.4641016e-01   1.0908712e+00   4.2426407e-01   8.3666003e-01   3.9974992e+00   3.6345564e+00   4.1725292e+00   3.3196385e+00   3.8665230e+00   3.5185224e+00   3.7868192e+00   2.6514147e+00   3.8013156e+00   3.0675723e+00   3.0430248e+00   3.3090784e+00   3.3630343e+00   3.7656341e+00   2.7294688e+00   3.6537652e+00   3.5114100e+00   3.1448370e+00   3.9458839e+00   3.0789609e+00   3.8832976e+00   3.1921779e+00   4.1581246e+00   3.7349699e+00   3.4871192e+00   3.6428011e+00   4.1024383e+00   4.2743421e+00   3.6110940e+00   2.7037012e+00   3.0446675e+00   2.9376862e+00   3.0479501e+00   4.2201896e+00   3.4942810e+00   3.5185224e+00   3.9306488e+00   3.7815341e+00   3.0935417e+00   3.2155870e+00   3.4583233e+00   3.6496575e+00   3.1733263e+00   2.7073973e+00   3.2939338e+00   3.1559468e+00   3.2280025e+00   3.4234486e+00   2.4124676e+00   3.1843367e+00   5.2782573e+00   4.3034870e+00   5.3084838e+00   4.7275787e+00   5.0793700e+00   6.0811183e+00   3.7696154e+00   5.6373753e+00   5.1176166e+00   5.5830099e+00   4.3669211e+00   4.5912961e+00   4.8754487e+00   4.3208795e+00   4.5055521e+00   4.6400431e+00   4.6679760e+00   6.1473572e+00   6.5192024e+00   4.2965102e+00   5.1166395e+00   4.1255303e+00   6.2120850e+00   4.1976184e+00   4.9527770e+00   5.2867760e+00   4.0583248e+00   4.0583248e+00   4.8928519e+00   5.0941143e+00   5.5614746e+00   5.9160798e+00   4.9345719e+00   4.2213742e+00   4.6432747e+00   5.7844619e+00   4.8785244e+00   4.6184413e+00   3.9534795e+00   4.8062459e+00   5.0348784e+00   4.6572524e+00   4.3034870e+00   5.2507142e+00   5.1273775e+00   4.6893496e+00   4.3886217e+00   4.4944410e+00   4.6411206e+00   4.1892720e+00   1.2609520e+00   1.1357817e+00   7.0710678e-01   1.2609520e+00   1.6309506e+00   9.0000000e-01   8.7177979e-01   2.1517435e+00   1.4899664e+00   9.6953597e-01   7.8102497e-01   1.3928388e+00   6.0000000e-01   1.3453624e+00   5.4772256e-01   1.0295630e+00   3.9471509e+00   3.6207734e+00   4.1364236e+00   3.4029399e+00   3.8587563e+00   3.5805028e+00   3.7815341e+00   2.8017851e+00   3.7881394e+00   3.1670175e+00   3.1843367e+00   3.3361655e+00   3.4132096e+00   3.7920970e+00   2.7838822e+00   3.6180105e+00   3.5707142e+00   3.2046841e+00   3.9736633e+00   3.1559468e+00   3.9089641e+00   3.2078030e+00   4.1797129e+00   3.7696154e+00   3.4813790e+00   3.6180105e+00   4.0804412e+00   4.2532341e+00   3.6386811e+00   2.7658633e+00   3.1320920e+00   3.0282008e+00   3.0967725e+00   4.2602817e+00   3.5707142e+00   3.5298725e+00   3.9025633e+00   3.8026307e+00   3.1543621e+00   3.2954514e+00   3.5440090e+00   3.6715120e+00   3.2264532e+00   2.8478062e+00   3.3630343e+00   3.2124757e+00   3.2832910e+00   3.4351128e+00   2.5337719e+00   3.2403703e+00   5.2820451e+00   4.3497126e+00   5.2782573e+00   4.7465777e+00   5.0793700e+00   6.0415230e+00   3.8871583e+00   5.6124861e+00   5.1234754e+00   5.5344376e+00   4.3508620e+00   4.6000000e+00   4.8528342e+00   4.3737855e+00   4.5365185e+00   4.6292548e+00   4.6701178e+00   6.0901560e+00   6.4853681e+00   4.3474130e+00   5.0852729e+00   4.1785165e+00   6.1749494e+00   4.2071368e+00   4.9345719e+00   5.2545219e+00   4.0706265e+00   4.0755368e+00   4.9010203e+00   5.0645829e+00   5.5272054e+00   5.8446557e+00   4.9406477e+00   4.2402830e+00   4.6904158e+00   5.7253821e+00   4.8744230e+00   4.6249324e+00   3.9761791e+00   4.7728398e+00   5.0129831e+00   4.6119410e+00   4.3497126e+00   5.2297227e+00   5.1019604e+00   4.6615448e+00   4.4022721e+00   4.4855323e+00   4.6411206e+00   4.2249260e+00   3.4641016e-01   7.5498344e-01   0.0000000e+00   5.5677644e-01   3.7416574e-01   5.0000000e-01   9.3808315e-01   5.5677644e-01   6.5574385e-01   8.8317609e-01   2.6457513e-01   7.4161985e-01   3.4641016e-01   7.2801099e-01   2.6457513e-01   4.0435133e+00   3.6359318e+00   4.1856899e+00   2.9478806e+00   3.7709415e+00   3.3421550e+00   3.8065733e+00   2.1307276e+00   3.7389838e+00   2.7748874e+00   2.4556058e+00   3.2031235e+00   3.0133038e+00   3.6619667e+00   2.5258662e+00   3.6523965e+00   3.3852622e+00   2.9223278e+00   3.6687873e+00   2.7586228e+00   3.8457769e+00   3.0364453e+00   3.9799497e+00   3.6027767e+00   3.4014703e+00   3.6055513e+00   4.0348482e+00   4.2497059e+00   3.4942810e+00   2.3874673e+00   2.6720778e+00   2.5495098e+00   2.8178006e+00   4.0718546e+00   3.3496268e+00   3.5425979e+00   3.9293765e+00   3.5284558e+00   2.9495762e+00   2.9000000e+00   3.1984371e+00   3.5707142e+00   2.9189039e+00   2.1679483e+00   3.0626786e+00   3.0248967e+00   3.0675723e+00   3.3181320e+00   1.9104973e+00   2.9883106e+00   5.2924474e+00   4.1436699e+00   5.3113087e+00   4.6583259e+00   5.0467812e+00   6.1081912e+00   3.4525353e+00   5.6329388e+00   4.9979996e+00   5.6973678e+00   4.3749286e+00   4.4821870e+00   4.8600412e+00   4.1060930e+00   4.3760713e+00   4.6411206e+00   4.6324939e+00   6.3071388e+00   6.4876806e+00   4.0286474e+00   5.1468437e+00   3.9686270e+00   6.2112801e+00   4.0706265e+00   4.9919936e+00   5.3329167e+00   3.9446166e+00   3.9874804e+00   4.8114447e+00   5.1029403e+00   5.5443665e+00   6.0917978e+00   4.8538644e+00   4.1194660e+00   4.4933284e+00   5.8180753e+00   4.9142650e+00   4.5978256e+00   3.8729833e+00   4.8176758e+00   5.0338852e+00   4.6690470e+00   4.1436699e+00   5.2744668e+00   5.1652686e+00   4.6669048e+00   4.2201896e+00   4.4575778e+00   4.6722586e+00   4.1060930e+00   5.9160798e-01   3.4641016e-01   6.4031242e-01   3.7416574e-01   3.3166248e-01   1.0392305e+00   6.0827625e-01   6.4031242e-01   9.4868330e-01   3.6055513e-01   7.2801099e-01   4.4721360e-01   6.5574385e-01   2.2360680e-01   4.2059482e+00   3.8131352e+00   4.3588989e+00   3.1796226e+00   3.9572718e+00   3.5707142e+00   3.9887341e+00   2.3874673e+00   3.9268308e+00   3.0033315e+00   2.7147744e+00   3.3970576e+00   3.2372828e+00   3.8716921e+00   2.7239677e+00   3.8183766e+00   3.6027767e+00   3.1527766e+00   3.8755645e+00   2.9916551e+00   4.0410395e+00   3.2280025e+00   4.1904654e+00   3.8236109e+00   3.5874782e+00   3.7788887e+00   4.2190046e+00   4.4294469e+00   3.6972963e+00   2.6038433e+00   2.9086079e+00   2.7892651e+00   3.0298515e+00   4.2918527e+00   3.5749126e+00   3.7269290e+00   4.1036569e+00   3.7349699e+00   3.1654384e+00   3.1288976e+00   3.4423829e+00   3.7749172e+00   3.1368774e+00   2.4207437e+00   3.2893768e+00   3.2449961e+00   3.2848135e+00   3.5142567e+00   2.1330729e+00   3.2046841e+00   5.4799635e+00   4.3577517e+00   5.4909016e+00   4.8682646e+00   5.2392748e+00   6.2904690e+00   3.6932371e+00   5.8266629e+00   5.2057660e+00   5.8566202e+00   4.5497253e+00   4.6808119e+00   5.0378567e+00   4.3197222e+00   4.5661800e+00   4.8145612e+00   4.8311489e+00   6.4730209e+00   6.6745786e+00   4.2579338e+00   5.3169540e+00   4.1773197e+00   6.3984373e+00   4.2649736e+00   5.1730069e+00   5.5172457e+00   4.1376322e+00   4.1833001e+00   5.0089919e+00   5.2915026e+00   5.7288742e+00   6.2489999e+00   5.0477718e+00   4.3301270e+00   4.7296934e+00   5.9791304e+00   5.0921508e+00   4.7979162e+00   4.0693980e+00   4.9869831e+00   5.2057660e+00   4.8207883e+00   4.3577517e+00   5.4534393e+00   5.3329167e+00   4.8311489e+00   4.4170126e+00   4.6400431e+00   4.8507731e+00   4.3150898e+00   7.5498344e-01   1.2083046e+00   4.5825757e-01   5.0990195e-01   1.5652476e+00   1.1401754e+00   7.0710678e-01   8.0622577e-01   8.7177979e-01   5.8309519e-01   9.5393920e-01   3.4641016e-01   5.4772256e-01   3.9166312e+00   3.5818989e+00   4.0951190e+00   3.1527766e+00   3.7509999e+00   3.4612137e+00   3.7682887e+00   2.4919872e+00   3.6972963e+00   2.9883106e+00   2.8248894e+00   3.2419130e+00   3.1416556e+00   3.7040518e+00   2.6210685e+00   3.5566838e+00   3.4914181e+00   3.0347982e+00   3.7563280e+00   2.9291637e+00   3.8807216e+00   3.0577770e+00   4.0360872e+00   3.6619667e+00   3.3734256e+00   3.5369478e+00   3.9837169e+00   4.1988094e+00   3.5411862e+00   2.5159491e+00   2.8757608e+00   2.7586228e+00   2.9137605e+00   4.1581246e+00   3.4914181e+00   3.5298725e+00   3.8535698e+00   3.5916570e+00   3.0512293e+00   3.0822070e+00   3.3793490e+00   3.5972211e+00   3.0315013e+00   2.5159491e+00   3.2046841e+00   3.1144823e+00   3.1654384e+00   3.3256578e+00   2.2045408e+00   3.0951575e+00   5.2971691e+00   4.2497059e+00   5.2516664e+00   4.6957428e+00   5.0497525e+00   6.0299254e+00   3.7215588e+00   5.5821143e+00   5.0249378e+00   5.5883808e+00   4.3324358e+00   4.5099889e+00   4.8155997e+00   4.2391037e+00   4.4564560e+00   4.6162756e+00   4.6314145e+00   6.1717096e+00   6.4358372e+00   4.1617304e+00   5.0813384e+00   4.0865633e+00   6.1424751e+00   4.0987803e+00   4.9446941e+00   5.2564246e+00   3.9736633e+00   4.0162171e+00   4.8373546e+00   5.0348784e+00   5.4799635e+00   5.9245253e+00   4.8774994e+00   4.1545156e+00   4.5934736e+00   5.7043843e+00   4.8969378e+00   4.6010868e+00   3.9127995e+00   4.7476310e+00   4.9929951e+00   4.5793013e+00   4.2497059e+00   5.2297227e+00   5.1117512e+00   4.6162756e+00   4.2684892e+00   4.4384682e+00   4.6604721e+00   4.1725292e+00   5.5677644e-01   3.7416574e-01   5.0000000e-01   9.3808315e-01   5.5677644e-01   6.5574385e-01   8.8317609e-01   2.6457513e-01   7.4161985e-01   3.4641016e-01   7.2801099e-01   2.6457513e-01   4.0435133e+00   3.6359318e+00   4.1856899e+00   2.9478806e+00   3.7709415e+00   3.3421550e+00   3.8065733e+00   2.1307276e+00   3.7389838e+00   2.7748874e+00   2.4556058e+00   3.2031235e+00   3.0133038e+00   3.6619667e+00   2.5258662e+00   3.6523965e+00   3.3852622e+00   2.9223278e+00   3.6687873e+00   2.7586228e+00   3.8457769e+00   3.0364453e+00   3.9799497e+00   3.6027767e+00   3.4014703e+00   3.6055513e+00   4.0348482e+00   4.2497059e+00   3.4942810e+00   2.3874673e+00   2.6720778e+00   2.5495098e+00   2.8178006e+00   4.0718546e+00   3.3496268e+00   3.5425979e+00   3.9293765e+00   3.5284558e+00   2.9495762e+00   2.9000000e+00   3.1984371e+00   3.5707142e+00   2.9189039e+00   2.1679483e+00   3.0626786e+00   3.0248967e+00   3.0675723e+00   3.3181320e+00   1.9104973e+00   2.9883106e+00   5.2924474e+00   4.1436699e+00   5.3113087e+00   4.6583259e+00   5.0467812e+00   6.1081912e+00   3.4525353e+00   5.6329388e+00   4.9979996e+00   5.6973678e+00   4.3749286e+00   4.4821870e+00   4.8600412e+00   4.1060930e+00   4.3760713e+00   4.6411206e+00   4.6324939e+00   6.3071388e+00   6.4876806e+00   4.0286474e+00   5.1468437e+00   3.9686270e+00   6.2112801e+00   4.0706265e+00   4.9919936e+00   5.3329167e+00   3.9446166e+00   3.9874804e+00   4.8114447e+00   5.1029403e+00   5.5443665e+00   6.0917978e+00   4.8538644e+00   4.1194660e+00   4.4933284e+00   5.8180753e+00   4.9142650e+00   4.5978256e+00   3.8729833e+00   4.8176758e+00   5.0338852e+00   4.6690470e+00   4.1436699e+00   5.2744668e+00   5.1652686e+00   4.6669048e+00   4.2201896e+00   4.4575778e+00   4.6722586e+00   4.1060930e+00   8.3066239e-01   7.8740079e-01   7.1414284e-01   2.0000000e-01   9.2736185e-01   1.2369317e+00   4.2426407e-01   1.1045361e+00   3.0000000e-01   1.1575837e+00   6.7823300e-01   4.4497191e+00   3.9962482e+00   4.5727453e+00   3.1937439e+00   4.1267421e+00   3.6304270e+00   4.1496988e+00   2.2912878e+00   4.1170378e+00   2.9883106e+00   2.6153394e+00   3.5142567e+00   3.3361655e+00   3.9874804e+00   2.8195744e+00   4.0435133e+00   3.6565011e+00   3.2449961e+00   3.9761791e+00   3.0430248e+00   4.1352146e+00   3.3808283e+00   4.3023250e+00   3.9357337e+00   3.7709415e+00   3.9862263e+00   4.4147480e+00   4.6076024e+00   3.8078866e+00   2.7073973e+00   2.9376862e+00   2.8231188e+00   3.1320920e+00   4.3646306e+00   3.5958309e+00   3.8626416e+00   4.3069711e+00   3.8626416e+00   3.2388269e+00   3.1559468e+00   3.4612137e+00   3.9012818e+00   3.2264532e+00   2.3430749e+00   3.3391616e+00   3.3316662e+00   3.3645208e+00   3.6687873e+00   2.1071308e+00   3.2832910e+00   5.5749439e+00   4.4022721e+00   5.6621551e+00   4.9668904e+00   5.3535035e+00   6.4761099e+00   3.6041643e+00   5.9983331e+00   5.3244718e+00   6.0440053e+00   4.7042534e+00   4.7937459e+00   5.1971146e+00   4.3439613e+00   4.6130250e+00   4.9446941e+00   4.9608467e+00   6.6850580e+00   6.8425142e+00   4.3104524e+00   5.4827001e+00   4.2047592e+00   6.5825527e+00   4.3840620e+00   5.3244718e+00   5.7035077e+00   4.2532341e+00   4.2906876e+00   5.1127292e+00   5.4817880e+00   5.9135438e+00   6.4915329e+00   5.1507281e+00   4.4474712e+00   4.7937459e+00   6.1919302e+00   5.2057660e+00   4.9203658e+00   4.1677332e+00   5.1652686e+00   5.3507009e+00   5.0109879e+00   4.4022721e+00   5.6008928e+00   5.4799635e+00   4.9909919e+00   4.5210618e+00   4.7812132e+00   4.9618545e+00   4.3874822e+00   2.6457513e-01   1.2727922e+00   7.5498344e-01   4.3588989e-01   6.0000000e-01   5.1961524e-01   4.1231056e-01   5.4772256e-01   3.6055513e-01   1.7320508e-01   3.9153544e+00   3.5242020e+00   4.0718546e+00   2.9715316e+00   3.6905284e+00   3.3060551e+00   3.6945906e+00   2.2181073e+00   3.6496575e+00   2.7748874e+00   2.5709920e+00   3.1272992e+00   3.0232433e+00   3.5958309e+00   2.4738634e+00   3.5355339e+00   3.3316662e+00   2.8948230e+00   3.6523965e+00   2.7622455e+00   3.7589892e+00   2.9698485e+00   3.9370039e+00   3.5496479e+00   3.3151169e+00   3.5014283e+00   3.9471509e+00   4.1496988e+00   3.4278273e+00   2.3748684e+00   2.6944387e+00   2.5768197e+00   2.7820855e+00   4.0274061e+00   3.3075671e+00   3.4307434e+00   3.8183766e+00   3.5028560e+00   2.8948230e+00   2.9034462e+00   3.1953091e+00   3.4942810e+00   2.8948230e+00   2.2583180e+00   3.0397368e+00   2.9681644e+00   3.0182777e+00   3.2419130e+00   1.9672316e+00   2.9478806e+00   5.1951901e+00   4.1024383e+00   5.2086467e+00   4.5891176e+00   4.9608467e+00   6.0024995e+00   3.4785054e+00   5.5398556e+00   4.9416596e+00   5.5587768e+00   4.2661458e+00   4.4170126e+00   4.7602521e+00   4.0816663e+00   4.3185646e+00   4.5365185e+00   4.5475268e+00   6.1611687e+00   6.4007812e+00   4.0236799e+00   5.0328918e+00   3.9255573e+00   6.1155539e+00   4.0062451e+00   4.8805737e+00   5.2211110e+00   3.8755645e+00   3.9089641e+00   4.7402532e+00   5.0019996e+00   5.4497706e+00   5.9371710e+00   4.7812132e+00   4.0558600e+00   4.4598206e+00   5.7000000e+00   4.8052055e+00   4.5099889e+00   3.7973675e+00   4.7063787e+00   4.9295030e+00   4.5497253e+00   4.1024383e+00   5.1672043e+00   5.0497525e+00   4.5628938e+00   4.1701319e+00   4.3646306e+00   4.5639895e+00   4.0398020e+00   1.3000000e+00   6.7823300e-01   4.2426407e-01   6.8556546e-01   5.4772256e-01   4.4721360e-01   5.1961524e-01   4.2426407e-01   2.4494897e-01   4.1060930e+00   3.7054015e+00   4.2626283e+00   3.1591138e+00   3.8820098e+00   3.4957117e+00   3.8704005e+00   2.3895606e+00   3.8483763e+00   2.9410882e+00   2.7531800e+00   3.3030289e+00   3.2357379e+00   3.7868192e+00   2.6476405e+00   3.7242449e+00   3.5057096e+00   3.1000000e+00   3.8483763e+00   2.9597297e+00   3.9242834e+00   3.1606961e+00   4.1340053e+00   3.7509999e+00   3.5099858e+00   3.6918830e+00   4.1460825e+00   4.3347434e+00   3.6110940e+00   2.5748786e+00   2.8896367e+00   2.7766887e+00   2.9748950e+00   4.2154478e+00   3.4770677e+00   3.5972211e+00   4.0062451e+00   3.7067506e+00   3.0740852e+00   3.0886890e+00   3.3882149e+00   3.6823905e+00   3.0903074e+00   2.4351591e+00   3.2264532e+00   3.1559468e+00   3.2031235e+00   3.4351128e+00   2.1307276e+00   3.1336879e+00   5.3535035e+00   4.2755117e+00   5.3907328e+00   4.7738873e+00   5.1341991e+00   6.1919302e+00   3.6345564e+00   5.7358522e+00   5.1371198e+00   5.7210139e+00   4.4350874e+00   4.6000000e+00   4.9365980e+00   4.2508823e+00   4.4698993e+00   4.6957428e+00   4.7318073e+00   6.3364028e+00   6.5924199e+00   4.2213742e+00   5.2019227e+00   4.0865633e+00   6.3111013e+00   4.1880783e+00   5.0527220e+00   5.4101756e+00   4.0533936e+00   4.0828911e+00   4.9173163e+00   5.1990384e+00   5.6435804e+00   6.1155539e+00   4.9547957e+00   4.2497059e+00   4.6604721e+00   5.8804762e+00   4.9598387e+00   4.6914816e+00   3.9686270e+00   4.8805737e+00   5.0941143e+00   4.7127487e+00   4.2755117e+00   5.3376025e+00   5.2086467e+00   4.7275787e+00   4.3520110e+00   4.5387223e+00   4.7180504e+00   4.2130749e+00   9.1104336e-01   1.3674794e+00   1.7262677e+00   7.6811457e-01   1.6462078e+00   9.1651514e-01   1.6278821e+00   1.1269428e+00   4.4530888e+00   4.0124805e+00   4.5607017e+00   3.0479501e+00   4.0718546e+00   3.5958309e+00   4.1821047e+00   2.1587033e+00   4.0816663e+00   2.9359837e+00   2.3811762e+00   3.5071356e+00   3.1685959e+00   3.9610605e+00   2.8035692e+00   4.0373258e+00   3.6578682e+00   3.1906112e+00   3.8183766e+00   2.9410882e+00   4.1557190e+00   3.3316662e+00   4.2047592e+00   3.8961519e+00   3.7376463e+00   3.9648455e+00   4.3588989e+00   4.5803930e+00   3.7802116e+00   2.6191602e+00   2.8106939e+00   2.6944387e+00   3.0692019e+00   4.3058100e+00   3.6027767e+00   3.9230090e+00   4.2988371e+00   3.7215588e+00   3.2465366e+00   3.0545049e+00   3.3926391e+00   3.8923001e+00   3.1432467e+00   2.1771541e+00   3.2832910e+00   3.3391616e+00   3.3481338e+00   3.6400549e+00   1.9824228e+00   3.2449961e+00   5.5830099e+00   4.3416587e+00   5.6258333e+00   4.9335586e+00   5.3244718e+00   6.4366140e+00   3.5213634e+00   5.9539903e+00   5.2325902e+00   6.0712437e+00   4.7053161e+00   4.7254629e+00   5.1633323e+00   4.2497059e+00   4.5596052e+00   4.9416596e+00   4.9376108e+00   6.7275553e+00   6.7594378e+00   4.1701319e+00   5.4708317e+00   4.1605288e+00   6.5222695e+00   4.3139309e+00   5.3329167e+00   5.6956123e+00   4.2000000e+00   4.2731721e+00   5.0586559e+00   5.4516053e+00   5.8532043e+00   6.5352888e+00   5.0950957e+00   4.4011362e+00   4.7275787e+00   6.1457302e+00   5.2297227e+00   4.9132474e+00   4.1521079e+00   5.1429563e+00   5.3272882e+00   4.9839743e+00   4.3416587e+00   5.5910643e+00   5.4808758e+00   4.9537864e+00   4.4192760e+00   4.7528939e+00   4.9909919e+00   4.3749286e+00   8.3666003e-01   1.1180340e+00   4.6904158e-01   9.6953597e-01   2.2360680e-01   1.0488088e+00   6.1644140e-01   4.4452222e+00   3.9912404e+00   4.5727453e+00   3.2434549e+00   4.1412558e+00   3.6469165e+00   4.1400483e+00   2.3515952e+00   4.1267421e+00   3.0149627e+00   2.6981475e+00   3.5199432e+00   3.3896903e+00   3.9974992e+00   2.8337255e+00   4.0435133e+00   3.6619667e+00   3.2695565e+00   4.0211939e+00   3.0822070e+00   4.1303753e+00   3.3985291e+00   4.3301270e+00   3.9509493e+00   3.7815341e+00   3.9912404e+00   4.4283180e+00   4.6119410e+00   3.8183766e+00   2.7440845e+00   2.9849623e+00   2.8722813e+00   3.1575307e+00   4.3829214e+00   3.6013886e+00   3.8470768e+00   4.3069711e+00   3.9038443e+00   3.2449961e+00   3.1937439e+00   3.4899857e+00   3.9064050e+00   3.2572995e+00   2.4103942e+00   3.3630343e+00   3.3376639e+00   3.3763886e+00   3.6796739e+00   2.1633308e+00   3.3015148e+00   5.5677644e+00   4.4204072e+00   5.6656862e+00   4.9749372e+00   5.3572381e+00   6.4791975e+00   3.6373067e+00   6.0049979e+00   5.3469618e+00   6.0274373e+00   4.7000000e+00   4.8104054e+00   5.2009614e+00   4.3714986e+00   4.6260134e+00   4.9406477e+00   4.9648766e+00   6.6640828e+00   6.8571131e+00   4.3520110e+00   5.4790510e+00   4.2190046e+00   6.5916614e+00   4.4022721e+00   5.3169540e+00   5.7000000e+00   4.2673177e+00   4.2953463e+00   5.1244512e+00   5.4854353e+00   5.9236813e+00   6.4699304e+00   5.1623638e+00   4.4609416e+00   4.8145612e+00   6.1951594e+00   5.1942276e+00   4.9203658e+00   4.1725292e+00   5.1652686e+00   5.3507009e+00   5.0109879e+00   4.4204072e+00   5.5973208e+00   5.4726593e+00   4.9949975e+00   4.5475268e+00   4.7853944e+00   4.9497475e+00   4.3920383e+00   4.7958315e-01   6.4807407e-01   5.0990195e-01   6.7082039e-01   5.4772256e-01   4.8989795e-01   3.7868192e+00   3.3570821e+00   3.9331921e+00   2.8178006e+00   3.5425979e+00   3.1432467e+00   3.5128336e+00   2.0663978e+00   3.5227830e+00   2.5709920e+00   2.4535688e+00   2.9376862e+00   2.9342802e+00   3.4380227e+00   2.2825424e+00   3.3955854e+00   3.1352831e+00   2.7730849e+00   3.5142567e+00   2.6267851e+00   3.5468296e+00   2.8195744e+00   3.7934153e+00   3.4161382e+00   3.1780497e+00   3.3600595e+00   3.8223030e+00   3.9887341e+00   3.2526912e+00   2.2516660e+00   2.5592968e+00   2.4556058e+00   2.6324893e+00   3.8587563e+00   3.1032241e+00   3.2280025e+00   3.6701499e+00   3.3852622e+00   2.7110883e+00   2.7386128e+00   3.0430248e+00   3.3316662e+00   2.7513633e+00   2.1189620e+00   2.8722813e+00   2.8035692e+00   2.8460499e+00   3.0951575e+00   1.7944358e+00   2.7784888e+00   4.9699095e+00   3.9012818e+00   5.0398413e+00   4.4147480e+00   4.7644517e+00   5.8532043e+00   3.2603681e+00   5.4018515e+00   4.7927028e+00   5.3581713e+00   4.0681691e+00   4.2402830e+00   4.5771170e+00   3.8742741e+00   4.0767634e+00   4.3162484e+00   4.3760713e+00   5.9958319e+00   6.2513998e+00   3.8807216e+00   4.8373546e+00   3.7013511e+00   5.9791304e+00   3.8288379e+00   4.6893496e+00   5.0724747e+00   3.6891733e+00   3.7134889e+00   4.5497253e+00   4.8713448e+00   5.3094256e+00   5.7879185e+00   4.5836667e+00   3.9038443e+00   4.3197222e+00   5.5389530e+00   4.5760245e+00   4.3324358e+00   3.5958309e+00   4.5232732e+00   4.7212287e+00   4.3485630e+00   3.9012818e+00   4.9709154e+00   4.8321838e+00   4.3577517e+00   3.9924930e+00   4.1737274e+00   4.3335897e+00   3.8405729e+00   9.9498744e-01   3.6055513e-01   9.4868330e-01   5.0000000e-01   7.4161985e-01   3.5791060e+00   3.1654384e+00   3.7336309e+00   2.7622455e+00   3.3852622e+00   2.9883106e+00   3.3120990e+00   2.0784610e+00   3.3406586e+00   2.4939928e+00   2.4839485e+00   2.7892651e+00   2.8530685e+00   3.2634338e+00   2.1817424e+00   3.2093613e+00   2.9765752e+00   2.6267851e+00   3.4263683e+00   2.5357445e+00   3.3719431e+00   2.6870058e+00   3.6523965e+00   3.2372828e+00   3.0116441e+00   3.1843367e+00   3.6469165e+00   3.8078866e+00   3.0967725e+00   2.1725561e+00   2.4939928e+00   2.3916521e+00   2.5179357e+00   3.7013511e+00   2.9495762e+00   3.0282008e+00   3.4785054e+00   3.2787193e+00   2.5573424e+00   2.6589472e+00   2.9137605e+00   3.1511903e+00   2.6419690e+00   2.1400935e+00   2.7495454e+00   2.6324893e+00   2.6962938e+00   2.9308702e+00   1.8411953e+00   2.6476405e+00   4.7864392e+00   3.7669616e+00   4.8507731e+00   4.2308392e+00   4.5880279e+00   5.6453521e+00   3.1906112e+00   5.1932649e+00   4.6281746e+00   5.1478151e+00   3.8884444e+00   4.0877867e+00   4.4022721e+00   3.7709415e+00   3.9661064e+00   4.1496988e+00   4.1856899e+00   5.7480431e+00   6.0671245e+00   3.7669616e+00   4.6529560e+00   3.5791060e+00   5.7758116e+00   3.6891733e+00   4.4877611e+00   4.8518038e+00   3.5468296e+00   3.5496479e+00   4.3897608e+00   4.6583259e+00   5.1166395e+00   5.5362442e+00   4.4294469e+00   3.7269290e+00   4.1388404e+00   5.3525695e+00   4.3920383e+00   4.1352146e+00   3.4380227e+00   4.3439613e+00   4.5541190e+00   4.1928511e+00   3.7669616e+00   4.7812132e+00   4.6540305e+00   4.2071368e+00   3.8716921e+00   4.0062451e+00   4.1509035e+00   3.6715120e+00   8.8317609e-01   3.0000000e-01   8.7177979e-01   3.7416574e-01   4.1206796e+00   3.6945906e+00   4.2555846e+00   2.9563491e+00   3.8223030e+00   3.3852622e+00   3.8626416e+00   2.1142375e+00   3.8065733e+00   2.7766887e+00   2.4372115e+00   3.2388269e+00   3.0545049e+00   3.7148351e+00   2.5475478e+00   3.7188708e+00   3.4190642e+00   2.9782545e+00   3.6945906e+00   2.7892651e+00   3.8807216e+00   3.0805844e+00   4.0236799e+00   3.6646964e+00   3.4612137e+00   3.6674242e+00   4.1000000e+00   4.3046487e+00   3.5355339e+00   2.4228083e+00   2.6925824e+00   2.5748786e+00   2.8548205e+00   4.1121770e+00   3.3778692e+00   3.5916570e+00   3.9937451e+00   3.5693137e+00   2.9883106e+00   2.9154759e+00   3.2341923e+00   3.6249138e+00   2.9546573e+00   2.1517435e+00   3.0935417e+00   3.0757113e+00   3.1080541e+00   3.3734256e+00   1.8814888e+00   3.0232433e+00   5.3235327e+00   4.1641326e+00   5.3646994e+00   4.7063787e+00   5.0852729e+00   6.1741396e+00   3.4394767e+00   5.7026310e+00   5.0467812e+00   5.7489129e+00   4.4170126e+00   4.5188494e+00   4.9040799e+00   4.1121770e+00   4.3749286e+00   4.6701178e+00   4.6850827e+00   6.3835727e+00   6.5436993e+00   4.0595566e+00   5.1903757e+00   3.9774364e+00   6.2793312e+00   4.1036569e+00   5.0428167e+00   5.4046276e+00   3.9761791e+00   4.0236799e+00   4.8456166e+00   5.1778374e+00   5.6080300e+00   6.1757591e+00   4.8836462e+00   4.1737274e+00   4.5497253e+00   5.8736701e+00   4.9457052e+00   4.6508064e+00   3.9051248e+00   4.8641546e+00   5.0665570e+00   4.7021272e+00   4.1641326e+00   5.3188345e+00   5.1990384e+00   4.6957428e+00   4.2449971e+00   4.4966654e+00   4.7031904e+00   4.1412558e+00   8.0622577e-01   2.4494897e-01   5.4772256e-01   3.8755645e+00   3.4856850e+00   4.0385641e+00   3.0626786e+00   3.6945906e+00   3.3136083e+00   3.6414283e+00   2.3515952e+00   3.6428011e+00   2.8195744e+00   2.7386128e+00   3.1192948e+00   3.1256999e+00   3.5860842e+00   2.5039968e+00   3.5114100e+00   3.3151169e+00   2.9308702e+00   3.7242449e+00   2.8354894e+00   3.7148351e+00   2.9949958e+00   3.9635842e+00   3.5510562e+00   3.3166248e+00   3.4885527e+00   3.9458839e+00   4.1243181e+00   3.4234486e+00   2.4596748e+00   2.7874720e+00   2.6776856e+00   2.8266588e+00   4.0286474e+00   3.2908965e+00   3.3674916e+00   3.7881394e+00   3.5693137e+00   2.8896367e+00   2.9698485e+00   3.2310989e+00   3.4756294e+00   2.9478806e+00   2.4062419e+00   3.0708305e+00   2.9597297e+00   3.0232433e+00   3.2434549e+00   2.1118712e+00   2.9698485e+00   5.1322510e+00   4.1036569e+00   5.1710734e+00   4.5617979e+00   4.9234135e+00   5.9581876e+00   3.5199432e+00   5.5045436e+00   4.9446941e+00   5.4763126e+00   4.2201896e+00   4.4136153e+00   4.7275787e+00   4.1048752e+00   4.3104524e+00   4.4888751e+00   4.5133136e+00   6.0638272e+00   6.3796552e+00   4.0767634e+00   4.9819675e+00   3.9217343e+00   6.0835845e+00   4.0124805e+00   4.8197510e+00   5.1662365e+00   3.8742741e+00   3.8845849e+00   4.7222876e+00   4.9648766e+00   5.4249424e+00   5.8412327e+00   4.7634021e+00   4.0472213e+00   4.4586994e+00   5.6621551e+00   4.7370877e+00   4.4665423e+00   3.7749172e+00   4.6669048e+00   4.8877398e+00   4.5155288e+00   4.1036569e+00   5.1137071e+00   4.9909919e+00   4.5354162e+00   4.1928511e+00   4.3358967e+00   4.4966654e+00   4.0112342e+00   8.6602540e-01   4.1231056e-01   4.2532341e+00   3.8131352e+00   4.3863424e+00   3.0967725e+00   3.9623226e+00   3.4914181e+00   3.9686270e+00   2.2315914e+00   3.9420807e+00   2.8809721e+00   2.5787594e+00   3.3555923e+00   3.2186954e+00   3.8301436e+00   2.6720778e+00   3.8548671e+00   3.5128336e+00   3.1016125e+00   3.8548671e+00   2.9240383e+00   3.9761791e+00   3.2218007e+00   4.1617304e+00   3.7815341e+00   3.5986108e+00   3.8052595e+00   4.2426407e+00   4.4339599e+00   3.6537652e+00   2.5729361e+00   2.8319605e+00   2.7166155e+00   2.9899833e+00   4.2261093e+00   3.4612137e+00   3.6837481e+00   4.1231056e+00   3.7296112e+00   3.0886890e+00   3.0446675e+00   3.3421550e+00   3.7376463e+00   3.0919250e+00   2.2847319e+00   3.2093613e+00   3.1764760e+00   3.2171416e+00   3.5028560e+00   2.0273135e+00   3.1416556e+00   5.4175640e+00   4.2743421e+00   5.4909016e+00   4.8145612e+00   5.1971146e+00   6.3000000e+00   3.5270384e+00   5.8266629e+00   5.1788030e+00   5.8566202e+00   4.5321077e+00   4.6465041e+00   5.0299105e+00   4.2308392e+00   4.4866469e+00   4.7812132e+00   4.7979162e+00   6.4853681e+00   6.6805688e+00   4.1964271e+00   5.3094256e+00   4.0804412e+00   6.4109282e+00   4.2367440e+00   5.1497573e+00   5.5208695e+00   4.1036569e+00   4.1352146e+00   4.9648766e+00   5.3028294e+00   5.7428216e+00   6.2841069e+00   5.0039984e+00   4.2930176e+00   4.6572524e+00   6.0124870e+00   5.0408333e+00   4.7560488e+00   4.0149720e+00   4.9909919e+00   5.1865210e+00   4.8373546e+00   4.2743421e+00   5.4313902e+00   5.3103672e+00   4.8270074e+00   4.3852024e+00   4.6184413e+00   4.7968740e+00   4.2402830e+00   5.0990195e-01   3.8496753e+00   3.4856850e+00   4.0211939e+00   3.0757113e+00   3.6810325e+00   3.3436507e+00   3.6551334e+00   2.3937418e+00   3.6262929e+00   2.8653098e+00   2.7604347e+00   3.1352831e+00   3.1032241e+00   3.6000000e+00   2.5199206e+00   3.4885527e+00   3.3570821e+00   2.9410882e+00   3.7080992e+00   2.8460499e+00   3.7496667e+00   2.9849623e+00   3.9610605e+00   3.5623026e+00   3.3015148e+00   3.4684290e+00   3.9230090e+00   4.1170378e+00   3.4380227e+00   2.4515301e+00   2.7982137e+00   2.6851443e+00   2.8301943e+00   4.0509258e+00   3.3451457e+00   3.3970576e+00   3.7749172e+00   3.5468296e+00   2.9240383e+00   2.9899833e+00   3.2649655e+00   3.4899857e+00   2.9512709e+00   2.4351591e+00   3.0967725e+00   2.9899833e+00   3.0495901e+00   3.2403703e+00   2.1307276e+00   2.9899833e+00   5.1672043e+00   4.1352146e+00   5.1672043e+00   4.5836667e+00   4.9416596e+00   5.9497899e+00   3.5846897e+00   5.4990908e+00   4.9446941e+00   5.4836119e+00   4.2296572e+00   4.4204072e+00   4.7275787e+00   4.1340053e+00   4.3428102e+00   4.5066617e+00   4.5265881e+00   6.0671245e+00   6.3671030e+00   4.0841156e+00   4.9859803e+00   3.9623226e+00   6.0704201e+00   4.0149720e+00   4.8342528e+00   5.1643005e+00   3.8820098e+00   3.9051248e+00   4.7370877e+00   4.9547957e+00   5.4101756e+00   5.8326666e+00   4.7780749e+00   4.0570926e+00   4.4833024e+00   5.6409219e+00   4.7686476e+00   4.4866469e+00   3.7986840e+00   4.6626173e+00   4.8959167e+00   4.5044423e+00   4.1352146e+00   5.1254268e+00   5.0049975e+00   4.5332108e+00   4.1928511e+00   4.3428102e+00   4.5299007e+00   4.0459857e+00   4.0422766e+00   3.6428011e+00   4.1940434e+00   3.0364453e+00   3.7986840e+00   3.4000000e+00   3.8131352e+00   2.2516660e+00   3.7643060e+00   2.8442925e+00   2.5961510e+00   3.2295511e+00   3.1000000e+00   3.7013511e+00   2.5632011e+00   3.6565011e+00   3.4278273e+00   2.9883106e+00   3.7349699e+00   2.8390139e+00   3.8652296e+00   3.0708305e+00   4.0336088e+00   3.6537652e+00   3.4263683e+00   3.6180105e+00   4.0607881e+00   4.2649736e+00   3.5298725e+00   2.4556058e+00   2.7622455e+00   2.6438608e+00   2.8722813e+00   4.1243181e+00   3.3985291e+00   3.5468296e+00   3.9382737e+00   3.5916570e+00   2.9916551e+00   2.9765752e+00   3.2771939e+00   3.6027767e+00   2.9816103e+00   2.2912878e+00   3.1256999e+00   3.0692019e+00   3.1144823e+00   3.3496268e+00   2.0049938e+00   3.0397368e+00   5.3047149e+00   4.1928511e+00   5.3254108e+00   4.6957428e+00   5.0695167e+00   6.1237244e+00   3.5369478e+00   5.6586217e+00   5.0447993e+00   5.6841886e+00   4.3806392e+00   4.5188494e+00   4.8733972e+00   4.1629317e+00   4.4068129e+00   4.6465041e+00   4.6593991e+00   6.2952363e+00   6.5145990e+00   4.1060930e+00   5.1497573e+00   4.0124805e+00   6.2345810e+00   4.1060930e+00   4.9989999e+00   5.3450912e+00   3.9761791e+00   4.0137264e+00   4.8435524e+00   5.1234754e+00   5.5668663e+00   6.0745370e+00   4.8836462e+00   4.1617304e+00   4.5585085e+00   5.8206529e+00   4.9173163e+00   4.6227697e+00   3.9000000e+00   4.8228622e+00   5.0408333e+00   4.6636895e+00   4.1928511e+00   5.2829916e+00   5.1643005e+00   4.6722586e+00   4.2638011e+00   4.4743715e+00   4.6754679e+00   4.1412558e+00   6.4031242e-01   2.6457513e-01   1.8867962e+00   6.5574385e-01   1.3784049e+00   7.3484692e-01   2.6776856e+00   5.1961524e-01   2.0322401e+00   2.6532998e+00   1.2288206e+00   1.6278821e+00   9.4868330e-01   1.8083141e+00   4.3588989e-01   1.4317821e+00   1.4866069e+00   1.3000000e+00   1.7832555e+00   1.1747340e+00   1.2124356e+00   1.0148892e+00   1.0049876e+00   7.8740079e-01   5.3851648e-01   4.5825757e-01   5.5677644e-01   1.0677078e+00   1.9104973e+00   1.9467922e+00   2.0124612e+00   1.5394804e+00   1.2041595e+00   1.6278821e+00   1.0583005e+00   3.3166248e-01   1.1832160e+00   1.5394804e+00   1.8000000e+00   1.6552945e+00   9.2736185e-01   1.5264338e+00   2.6324893e+00   1.5716234e+00   1.4212670e+00   1.4282857e+00   9.4868330e-01   2.6608269e+00   1.4899664e+00   1.8439089e+00   1.4491377e+00   1.4071247e+00   1.2449900e+00   1.4628739e+00   2.1213203e+00   2.2427661e+00   1.7029386e+00   1.3964240e+00   1.8357560e+00   8.7749644e-01   1.1045361e+00   1.1000000e+00   1.6217275e+00   1.6613248e+00   1.2369317e+00   1.0440307e+00   2.3430749e+00   2.5495098e+00   1.4491377e+00   1.3490738e+00   1.5874508e+00   2.2383029e+00   9.6953597e-01   1.2609520e+00   1.3747727e+00   9.8488578e-01   1.0246951e+00   1.3490738e+00   1.1532563e+00   1.5905974e+00   2.1023796e+00   1.4035669e+00   9.0553851e-01   1.4071247e+00   1.8165902e+00   1.5297059e+00   1.0816654e+00   1.1000000e+00   1.0000000e+00   1.3820275e+00   9.9498744e-01   1.4491377e+00   1.5132746e+00   1.5198684e+00   1.0908712e+00   1.1489125e+00   9.4868330e-01   1.4071247e+00   1.2529964e+00   6.4807407e-01   1.3820275e+00   4.2426407e-01   8.3066239e-01   2.6457513e-01   2.1400935e+00   4.2426407e-01   1.4352700e+00   2.1563859e+00   6.1644140e-01   1.2884099e+00   4.7958315e-01   1.2569805e+00   3.4641016e-01   8.2462113e-01   1.0099505e+00   1.0198039e+00   1.2845233e+00   6.5574385e-01   7.3484692e-01   8.1240384e-01   6.1644140e-01   4.1231056e-01   3.1622777e-01   6.4807407e-01   6.4807407e-01   5.0000000e-01   1.4491377e+00   1.4491377e+00   1.5297059e+00   1.0295630e+00   8.8317609e-01   1.0198039e+00   4.5825757e-01   3.7416574e-01   9.3273791e-01   9.3808315e-01   1.2609520e+00   1.1269428e+00   3.8729833e-01   1.0295630e+00   2.1118712e+00   1.0099505e+00   8.4261498e-01   8.4261498e-01   4.5825757e-01   2.1424285e+00   9.2195445e-01   1.8083141e+00   1.0630146e+00   1.6881943e+00   1.1832160e+00   1.4933185e+00   2.5000000e+00   1.6673332e+00   2.0566964e+00   1.5362291e+00   2.0880613e+00   7.8740079e-01   1.0246951e+00   1.2489996e+00   1.2165525e+00   1.3000000e+00   1.1313708e+00   1.0677078e+00   2.7166155e+00   2.9068884e+00   1.1874342e+00   1.5264338e+00   1.1000000e+00   2.6343880e+00   7.1414284e-01   1.3784049e+00   1.7262677e+00   6.1644140e-01   6.1644140e-01   1.3152946e+00   1.5427249e+00   1.9697716e+00   2.5436195e+00   1.3638182e+00   7.2801099e-01   1.2922848e+00   2.2203603e+00   1.4387495e+00   1.0488088e+00   6.1644140e-01   1.1958261e+00   1.4560220e+00   1.1224972e+00   1.0630146e+00   1.6613248e+00   1.5937377e+00   1.1224972e+00   9.5393920e-01   8.8881944e-01   1.2369317e+00   8.6023253e-01   1.8574176e+00   5.8309519e-01   1.3152946e+00   6.7082039e-01   2.7018512e+00   5.0990195e-01   2.0149442e+00   2.6514147e+00   1.2247449e+00   1.6370706e+00   8.5440037e-01   1.8601075e+00   5.4772256e-01   1.3638182e+00   1.5033296e+00   1.2083046e+00   1.7916473e+00   1.0535654e+00   1.2569805e+00   8.4852814e-01   9.2736185e-01   8.3066239e-01   6.0000000e-01   3.4641016e-01   3.1622777e-01   1.0049876e+00   1.9748418e+00   1.9544820e+00   2.0346990e+00   1.5684387e+00   1.0099505e+00   1.5556349e+00   1.0344080e+00   2.8284271e-01   1.1357817e+00   1.5427249e+00   1.7804494e+00   1.5968719e+00   8.6602540e-01   1.5362291e+00   2.6570661e+00   1.5427249e+00   1.4247807e+00   1.4177447e+00   9.6436508e-01   2.7147744e+00   1.4866069e+00   1.6155494e+00   1.2529964e+00   1.1874342e+00   9.8994949e-01   1.2124356e+00   1.9364917e+00   2.1354157e+00   1.5000000e+00   1.1401754e+00   1.6673332e+00   6.7823300e-01   8.5440037e-01   8.6023253e-01   1.4352700e+00   1.4662878e+00   1.0295630e+00   7.8740079e-01   2.2045408e+00   2.3515952e+00   1.2767145e+00   1.1357817e+00   1.4247807e+00   2.0542639e+00   7.8102497e-01   1.0392305e+00   1.1832160e+00   8.2462113e-01   8.6023253e-01   1.0908712e+00   9.5916630e-01   1.3928388e+00   1.9974984e+00   1.1489125e+00   7.0000000e-01   1.1789826e+00   1.6522712e+00   1.3228757e+00   8.3666003e-01   9.5916630e-01   7.8102497e-01   1.1575837e+00   8.2462113e-01   1.2529964e+00   1.2884099e+00   1.3114877e+00   8.8317609e-01   9.4339811e-01   7.1414284e-01   1.2124356e+00   1.0677078e+00   1.2845233e+00   7.3484692e-01   1.4899664e+00   9.7467943e-01   1.3892444e+00   5.1961524e-01   8.2462113e-01   8.5440037e-01   5.9160798e-01   1.1045361e+00   7.2801099e-01   1.5000000e+00   8.8881944e-01   5.9160798e-01   8.8881944e-01   3.1622777e-01   1.3638182e+00   7.8102497e-01   1.2369317e+00   1.0535654e+00   1.1224972e+00   1.3674794e+00   1.6093477e+00   1.7578396e+00   9.4868330e-01   6.8556546e-01   3.0000000e-01   4.3588989e-01   5.1961524e-01   1.3076697e+00   8.8881944e-01   1.3416408e+00   1.6155494e+00   8.9442719e-01   7.1414284e-01   2.0000000e-01   5.0990195e-01   1.1045361e+00   4.3588989e-01   9.1104336e-01   4.5825757e-01   7.6157731e-01   6.6332496e-01   9.6953597e-01   1.1135529e+00   5.4772256e-01   2.6608269e+00   1.3490738e+00   2.7018512e+00   1.9519221e+00   2.3537205e+00   3.5071356e+00   9.0000000e-01   3.0232433e+00   2.2293497e+00   3.2295511e+00   1.8734994e+00   1.7378147e+00   2.2516660e+00   1.2529964e+00   1.6613248e+00   2.0760539e+00   1.9974984e+00   3.8974351e+00   3.7868192e+00   1.1401754e+00   2.5806976e+00   1.2489996e+00   3.5874782e+00   1.3638182e+00   2.4433583e+00   2.8195744e+00   1.2767145e+00   1.3820275e+00   2.0639767e+00   2.5903668e+00   2.9376862e+00   3.7762415e+00   2.1047565e+00   1.4628739e+00   1.7378147e+00   3.2771939e+00   2.3706539e+00   1.9874607e+00   1.2767145e+00   2.2803509e+00   2.4186773e+00   2.1931712e+00   1.3490738e+00   2.6664583e+00   2.6019224e+00   2.0904545e+00   1.4282857e+00   1.8493242e+00   2.1587033e+00   1.4525839e+00   8.3066239e-01   5.5677644e-01   2.1587033e+00   2.4494897e-01   1.4832397e+00   2.0856654e+00   7.4833148e-01   1.1045361e+00   4.3588989e-01   1.3638182e+00   4.2426407e-01   9.2736185e-01   1.0000000e+00   6.7823300e-01   1.2449900e+00   8.0622577e-01   7.4833148e-01   4.6904158e-01   5.0990195e-01   3.8729833e-01   3.1622777e-01   3.7416574e-01   5.2915026e-01   5.1961524e-01   1.4628739e+00   1.4000000e+00   1.4899664e+00   1.0392305e+00   7.2111026e-01   1.1224972e+00   7.9372539e-01   3.7416574e-01   6.0827625e-01   1.0677078e+00   1.2206556e+00   1.0816654e+00   4.5825757e-01   9.8994949e-01   2.1071308e+00   1.0099505e+00   9.6436508e-01   9.2195445e-01   4.7958315e-01   2.1840330e+00   9.6436508e-01   1.8027756e+00   9.5393920e-01   1.5652476e+00   1.0677078e+00   1.4035669e+00   2.3685439e+00   1.6431677e+00   1.9052559e+00   1.2884099e+00   2.0928450e+00   8.1240384e-01   8.1853528e-01   1.1401754e+00   1.0677078e+00   1.2449900e+00   1.1401754e+00   9.6953597e-01   2.7092434e+00   2.7221315e+00   8.7749644e-01   1.4730920e+00   1.0723805e+00   2.4698178e+00   4.7958315e-01   1.3638182e+00   1.6431677e+00   4.6904158e-01   6.1644140e-01   1.1704700e+00   1.4071247e+00   1.7944358e+00   2.5396850e+00   1.2247449e+00   5.3851648e-01   1.1000000e+00   2.0904545e+00   1.4866069e+00   1.0000000e+00   6.4807407e-01   1.1180340e+00   1.3928388e+00   1.0677078e+00   9.5393920e-01   1.6062378e+00   1.5811388e+00   1.0392305e+00   6.7082039e-01   8.0622577e-01   1.3152946e+00   8.6023253e-01   8.6023253e-01   1.5264338e+00   9.1104336e-01   7.9372539e-01   1.4899664e+00   4.5825757e-01   8.8881944e-01   4.6904158e-01   9.1104336e-01   1.0535654e+00   3.0000000e-01   5.1961524e-01   8.0622577e-01   7.0710678e-01   7.3484692e-01   6.4031242e-01   8.0622577e-01   4.5825757e-01   7.3484692e-01   9.3273791e-01   1.1445523e+00   1.2041595e+00   3.7416574e-01   1.0630146e+00   8.5440037e-01   9.6436508e-01   6.2449980e-01   7.4161985e-01   4.1231056e-01   7.3484692e-01   1.0816654e+00   7.8740079e-01   4.5825757e-01   6.1644140e-01   3.1622777e-01   4.6904158e-01   5.5677644e-01   1.5066519e+00   3.3166248e-01   3.7416574e-01   3.1622777e-01   5.4772256e-01   1.6552945e+00   4.0000000e-01   2.0736441e+00   8.6023253e-01   2.1447611e+00   1.3527749e+00   1.7832555e+00   2.9495762e+00   9.4339811e-01   2.4617067e+00   1.7406895e+00   2.6248809e+00   1.2845233e+00   1.2247449e+00   1.7000000e+00   9.1104336e-01   1.2569805e+00   1.5132746e+00   1.3892444e+00   3.2634338e+00   3.2863353e+00   8.6023253e-01   2.0099751e+00   8.1240384e-01   3.0545049e+00   8.8317609e-01   1.8248288e+00   2.2158520e+00   7.6811457e-01   7.8102497e-01   1.5297059e+00   2.0174241e+00   2.4103942e+00   3.1527766e+00   1.5842980e+00   8.7177979e-01   1.1916375e+00   2.7568098e+00   1.7720045e+00   1.3527749e+00   6.8556546e-01   1.7262677e+00   1.8734994e+00   1.7000000e+00   8.6023253e-01   2.0808652e+00   2.0322401e+00   1.5905974e+00   1.0295630e+00   1.2884099e+00   1.5556349e+00   8.3066239e-01   2.2561028e+00   5.9160798e-01   1.5000000e+00   2.2759613e+00   7.1414284e-01   1.4662878e+00   4.8989795e-01   1.3964240e+00   5.7445626e-01   7.9372539e-01   1.1532563e+00   1.1269428e+00   1.4212670e+00   4.6904158e-01   9.3273791e-01   8.3066239e-01   6.7082039e-01   6.4807407e-01   5.5677644e-01   7.4161985e-01   5.9160798e-01   5.4772256e-01   1.6278821e+00   1.5842980e+00   1.6763055e+00   1.1874342e+00   7.8102497e-01   9.7467943e-01   3.7416574e-01   4.5825757e-01   1.0862780e+00   1.0148892e+00   1.3638182e+00   1.1747340e+00   4.2426407e-01   1.1789826e+00   2.2383029e+00   1.0908712e+00   9.2736185e-01   9.2736185e-01   6.4807407e-01   2.2847319e+00   1.0295630e+00   1.5811388e+00   9.2736185e-01   1.5556349e+00   1.0049876e+00   1.3038405e+00   2.3748684e+00   1.6278821e+00   1.9390719e+00   1.4317821e+00   1.9157244e+00   6.0827625e-01   9.0553851e-01   1.1090537e+00   1.1180340e+00   1.1401754e+00   9.3273791e-01   9.0000000e-01   2.5632011e+00   2.7892651e+00   1.1832160e+00   1.3638182e+00   9.6953597e-01   2.5238859e+00   6.6332496e-01   1.1874342e+00   1.5968719e+00   5.5677644e-01   4.5825757e-01   1.1489125e+00   1.4525839e+00   1.8734994e+00   2.4207437e+00   1.1958261e+00   6.4807407e-01   1.1747340e+00   2.1213203e+00   1.2083046e+00   8.5440037e-01   4.7958315e-01   1.0677078e+00   1.2845233e+00   1.0246951e+00   9.2736185e-01   1.4798649e+00   1.4035669e+00   9.9498744e-01   9.0553851e-01   7.3484692e-01   1.0000000e+00   6.7082039e-01   2.2181073e+00   8.3666003e-01   4.5825757e-01   1.5556349e+00   1.3190906e+00   1.9519221e+00   9.5916630e-01   2.2583180e+00   1.5937377e+00   1.2409674e+00   1.8493242e+00   9.3273791e-01   2.1283797e+00   1.4764823e+00   2.1863211e+00   1.8973666e+00   1.8947295e+00   2.1494185e+00   2.4859606e+00   2.6419690e+00   1.7748239e+00   8.4852814e-01   7.8740079e-01   7.2111026e-01   1.1401754e+00   2.2135944e+00   1.5165751e+00   2.0024984e+00   2.4372115e+00   1.8083141e+00   1.2569805e+00   9.7467943e-01   1.2845233e+00   1.9104973e+00   1.1747340e+00   1.4142136e-01   1.2165525e+00   1.3601471e+00   1.3379088e+00   1.7406895e+00   3.8729833e-01   1.2369317e+00   3.5085610e+00   2.2248595e+00   3.6290495e+00   2.8530685e+00   3.2572995e+00   4.4440972e+00   1.3928388e+00   3.9560081e+00   3.1843367e+00   4.1012193e+00   2.7276363e+00   2.6739484e+00   3.1654384e+00   2.1307276e+00   2.4839485e+00   2.9291637e+00   2.8982753e+00   4.7749346e+00   4.7465777e+00   2.0952327e+00   3.4770677e+00   2.0518285e+00   4.5343136e+00   2.2912878e+00   3.3196385e+00   3.7229021e+00   2.1771541e+00   2.2360680e+00   2.9849623e+00   3.5014283e+00   3.8807216e+00   4.6443514e+00   3.0232433e+00   2.3685439e+00   2.6324893e+00   4.2107007e+00   3.1953091e+00   2.8670542e+00   2.1118712e+00   3.1796226e+00   3.3136083e+00   3.0692019e+00   2.2248595e+00   3.5637059e+00   3.4727511e+00   2.9832868e+00   2.3811762e+00   2.7440845e+00   2.9647934e+00   2.2891046e+00   1.5811388e+00   2.1610183e+00   8.3666003e-01   1.1401754e+00   5.1961524e-01   1.4142136e+00   3.1622777e-01   1.0295630e+00   1.0099505e+00   8.3666003e-01   1.3000000e+00   9.3273791e-01   7.8740079e-01   6.1644140e-01   5.2915026e-01   3.6055513e-01   2.4494897e-01   3.1622777e-01   5.8309519e-01   6.4031242e-01   1.4832397e+00   1.4628739e+00   1.5362291e+00   1.0862780e+00   8.6023253e-01   1.2247449e+00   8.4261498e-01   3.1622777e-01   7.0000000e-01   1.1224972e+00   1.3152946e+00   1.1618950e+00   5.1961524e-01   1.0488088e+00   2.1679483e+00   1.0954451e+00   9.9498744e-01   9.8488578e-01   5.0000000e-01   2.2383029e+00   1.0344080e+00   1.9104973e+00   1.1357817e+00   1.6093477e+00   1.1575837e+00   1.5066519e+00   2.3769729e+00   1.7944358e+00   1.9052559e+00   1.3638182e+00   2.1307276e+00   9.1651514e-01   9.6436508e-01   1.2247449e+00   1.2727922e+00   1.4525839e+00   1.2727922e+00   1.0392305e+00   2.6907248e+00   2.7549955e+00   1.0246951e+00   1.5459625e+00   1.2609520e+00   2.4738634e+00   6.8556546e-01   1.4212670e+00   1.6309506e+00   6.7823300e-01   7.7459667e-01   1.3000000e+00   1.3784049e+00   1.8055470e+00   2.4959968e+00   1.3638182e+00   6.2449980e-01   1.1618950e+00   2.1142375e+00   1.5968719e+00   1.0677078e+00   8.1240384e-01   1.1874342e+00   1.5033296e+00   1.1747340e+00   1.1357817e+00   1.6792856e+00   1.6792856e+00   1.1747340e+00   8.7749644e-01   9.3273791e-01   1.4317821e+00   1.0000000e+00   9.2195445e-01   8.2462113e-01   1.0295630e+00   1.2206556e+00   5.4772256e-01   1.6309506e+00   7.8740079e-01   7.4833148e-01   1.2727922e+00   5.3851648e-01   1.3076697e+00   9.1651514e-01   1.5033296e+00   1.2247449e+00   1.2845233e+00   1.5165751e+00   1.8384776e+00   1.9078784e+00   1.0246951e+00   7.6157731e-01   5.2915026e-01   6.1644140e-01   6.3245553e-01   1.4560220e+00   7.0710678e-01   1.2369317e+00   1.7492856e+00   1.2767145e+00   5.4772256e-01   3.8729833e-01   6.2449980e-01   1.1789826e+00   6.4807407e-01   8.4852814e-01   5.0990195e-01   6.8556546e-01   6.2449980e-01   1.1000000e+00   9.7467943e-01   5.5677644e-01   2.6814175e+00   1.4317821e+00   2.8618176e+00   2.0736441e+00   2.4556058e+00   3.6918830e+00   7.6157731e-01   3.2202484e+00   2.4617067e+00   3.2954514e+00   1.9339080e+00   1.9104973e+00   2.3874673e+00   1.3638182e+00   1.6763055e+00   2.1118712e+00   2.1213203e+00   3.9924930e+00   4.0087405e+00   1.4525839e+00   2.6814175e+00   1.2369317e+00   3.8026307e+00   1.5394804e+00   2.5179357e+00   2.9698485e+00   1.4071247e+00   1.4352700e+00   2.1977261e+00   2.7820855e+00   3.1527766e+00   3.8871583e+00   2.2315914e+00   1.6340135e+00   1.9261360e+00   3.4626579e+00   2.3643181e+00   2.0784610e+00   1.3038405e+00   2.4062419e+00   2.5099801e+00   2.3021729e+00   1.4317821e+00   2.7604347e+00   2.6570661e+00   2.2000000e+00   1.6462078e+00   1.9570386e+00   2.1330729e+00   1.4764823e+00   1.5968719e+00   1.1357817e+00   1.9026298e+00   1.1269428e+00   2.2516660e+00   1.6155494e+00   1.2206556e+00   1.6522712e+00   8.8317609e-01   2.1400935e+00   1.4798649e+00   2.0371549e+00   1.8248288e+00   1.8708287e+00   2.1283797e+00   2.3937418e+00   2.5748786e+00   1.7492856e+00   9.2195445e-01   7.1414284e-01   6.7082039e-01   1.1532563e+00   2.1000000e+00   1.5524175e+00   2.0784610e+00   2.4062419e+00   1.6370706e+00   1.3453624e+00   9.1651514e-01   1.2083046e+00   1.8920888e+00   1.1357817e+00   3.6055513e-01   1.1958261e+00   1.4212670e+00   1.3711309e+00   1.7262677e+00   7.2111026e-01   1.2569805e+00   3.4467376e+00   2.1213203e+00   3.5185224e+00   2.7477263e+00   3.1591138e+00   4.3104524e+00   1.3228757e+00   3.8183766e+00   3.0116441e+00   4.0509258e+00   2.6925824e+00   2.5495098e+00   3.0740852e+00   1.9974984e+00   2.4083189e+00   2.8861739e+00   2.8089144e+00   4.7127487e+00   4.5716518e+00   1.8814888e+00   3.4029399e+00   1.9899749e+00   4.3783559e+00   2.1863211e+00   3.2603681e+00   3.6290495e+00   2.1000000e+00   2.1931712e+00   2.8670542e+00   3.3896903e+00   3.7376463e+00   4.5891176e+00   2.9068884e+00   2.2671568e+00   2.4779023e+00   4.0914545e+00   3.1654384e+00   2.7946377e+00   2.0808652e+00   3.1048349e+00   3.2357379e+00   3.0116441e+00   2.1213203e+00   3.4828150e+00   3.4161382e+00   2.9103264e+00   2.2360680e+00   2.6720778e+00   2.9495762e+00   2.2383029e+00   9.6953597e-01   5.5677644e-01   7.0710678e-01   8.3666003e-01   4.2426407e-01   6.0000000e-01   9.0553851e-01   7.6811457e-01   7.0000000e-01   4.0000000e-01   9.4868330e-01   6.4807407e-01   5.5677644e-01   7.3484692e-01   1.1045361e+00   1.1489125e+00   3.3166248e-01   9.6953597e-01   9.1651514e-01   1.0099505e+00   5.2915026e-01   9.5916630e-01   5.8309519e-01   5.1961524e-01   9.4868330e-01   8.5440037e-01   3.7416574e-01   7.0000000e-01   6.7082039e-01   4.5825757e-01   5.4772256e-01   1.5362291e+00   4.6904158e-01   3.6055513e-01   3.0000000e-01   3.8729833e-01   1.5779734e+00   3.6055513e-01   2.1189620e+00   1.0344080e+00   2.1656408e+00   1.4899664e+00   1.8466185e+00   3.0016662e+00   1.1747340e+00   2.5436195e+00   1.8814888e+00   2.5806976e+00   1.2083046e+00   1.3076697e+00   1.6911535e+00   1.0862780e+00   1.2922848e+00   1.4628739e+00   1.4628739e+00   3.2588341e+00   3.3660065e+00   1.1357817e+00   1.9824228e+00   9.3273791e-01   3.1272992e+00   9.1104336e-01   1.8275667e+00   2.2494444e+00   7.6157731e-01   7.8740079e-01   1.6155494e+00   2.0639767e+00   2.4617067e+00   3.1192948e+00   1.6552945e+00   1.0049876e+00   1.4730920e+00   2.7367864e+00   1.7578396e+00   1.4282857e+00   6.7823300e-01   1.6763055e+00   1.8493242e+00   1.5684387e+00   1.0344080e+00   2.0928450e+00   1.9949937e+00   1.5099669e+00   1.1000000e+00   1.2688578e+00   1.5264338e+00   9.4868330e-01   1.0723805e+00   9.4868330e-01   1.2727922e+00   1.1401754e+00   5.4772256e-01   7.3484692e-01   5.1961524e-01   1.5132746e+00   6.7823300e-01   1.1135529e+00   9.4868330e-01   9.1104336e-01   1.1489125e+00   1.3416408e+00   1.6186414e+00   9.9498744e-01   7.0710678e-01   5.8309519e-01   6.1644140e-01   5.8309519e-01   1.3490738e+00   1.2247449e+00   1.4317821e+00   1.4282857e+00   5.9160798e-01   9.4868330e-01   6.5574385e-01   7.8102497e-01   1.0816654e+00   4.8989795e-01   1.2247449e+00   7.3484692e-01   9.0000000e-01   8.4261498e-01   8.4261498e-01   1.3820275e+00   7.4161985e-01   2.7477263e+00   1.5198684e+00   2.5826343e+00   1.9442222e+00   2.3600847e+00   3.3421550e+00   1.4282857e+00   2.8478062e+00   2.1118712e+00   3.1717503e+00   1.8601075e+00   1.7058722e+00   2.1771541e+00   1.4764823e+00   1.8894444e+00   2.1307276e+00   1.9442222e+00   3.7656341e+00   3.6262929e+00   1.1180340e+00   2.5278449e+00   1.5264338e+00   3.3970576e+00   1.3379088e+00   2.4083189e+00   2.6608269e+00   1.2961481e+00   1.4491377e+00   2.0712315e+00   2.3832751e+00   2.7459060e+00   3.5958309e+00   2.1260292e+00   1.3820275e+00   1.7000000e+00   3.1032241e+00   2.4596748e+00   1.9646883e+00   1.3856406e+00   2.1886069e+00   2.4124676e+00   2.1260292e+00   1.5198684e+00   2.6343880e+00   2.6153394e+00   2.0639767e+00   1.4106736e+00   1.8248288e+00   2.2649503e+00   1.5811388e+00   1.2124356e+00   7.0000000e-01   5.5677644e-01   8.0622577e-01   7.4161985e-01   1.0677078e+00   5.4772256e-01   7.1414284e-01   5.0000000e-01   2.2360680e-01   5.0990195e-01   5.9160798e-01   7.1414284e-01   7.4161985e-01   2.4494897e-01   1.3601471e+00   1.2288206e+00   1.3304135e+00   9.0000000e-01   5.0000000e-01   7.4161985e-01   5.8309519e-01   6.4031242e-01   7.0710678e-01   7.9372539e-01   1.0099505e+00   7.6157731e-01   1.4142136e-01   8.4261498e-01   1.9209373e+00   7.4161985e-01   6.7823300e-01   6.4807407e-01   4.2426407e-01   2.0346990e+00   7.3484692e-01   1.7606817e+00   7.3484692e-01   1.7146428e+00   1.0049876e+00   1.4212670e+00   2.5219040e+00   1.3152946e+00   2.0396078e+00   1.3747727e+00   2.2068076e+00   8.7749644e-01   8.6023253e-01   1.2767145e+00   8.7749644e-01   1.1224972e+00   1.1618950e+00   9.8488578e-01   2.8301943e+00   2.8809721e+00   7.7459667e-01   1.5937377e+00   8.1240384e-01   2.6324893e+00   5.2915026e-01   1.4177447e+00   1.7748239e+00   4.3588989e-01   4.5825757e-01   1.1832160e+00   1.5716234e+00   1.9773720e+00   2.7018512e+00   1.2449900e+00   4.6904158e-01   9.4868330e-01   2.3108440e+00   1.4491377e+00   9.6436508e-01   4.3588989e-01   1.2884099e+00   1.4866069e+00   1.2845233e+00   7.3484692e-01   1.6822604e+00   1.6522712e+00   1.1958261e+00   7.3484692e-01   8.8317609e-01   1.2489996e+00   6.0827625e-01   1.3784049e+00   9.2736185e-01   6.4807407e-01   1.3038405e+00   5.3851648e-01   1.3674794e+00   6.4807407e-01   1.5427249e+00   1.2165525e+00   1.0630146e+00   1.2884099e+00   1.7029386e+00   1.8275667e+00   1.0049876e+00   4.4721360e-01   5.8309519e-01   6.0000000e-01   4.2426407e-01   1.5937377e+00   9.4868330e-01   1.1445523e+00   1.5811388e+00   1.2206556e+00   5.0990195e-01   5.7445626e-01   8.6602540e-01   1.1269428e+00   5.4772256e-01   9.4868330e-01   6.3245553e-01   6.2449980e-01   6.0827625e-01   9.2195445e-01   9.0000000e-01   5.1961524e-01   2.8017851e+00   1.6401219e+00   2.8618176e+00   2.1771541e+00   2.5436195e+00   3.6945906e+00   1.2727922e+00   3.2295511e+00   2.5416530e+00   3.2771939e+00   1.9078784e+00   1.9824228e+00   2.3874673e+00   1.6186414e+00   1.8734994e+00   2.1494185e+00   2.1633308e+00   3.9547440e+00   4.0484565e+00   1.6278821e+00   2.6814175e+00   1.4798649e+00   3.8105118e+00   1.5716234e+00   2.5337719e+00   2.9427878e+00   1.4352700e+00   1.4832397e+00   2.3000000e+00   2.7386128e+00   3.1400637e+00   3.7986840e+00   2.3366643e+00   1.6703293e+00   2.0856654e+00   3.4161382e+00   2.4392622e+00   2.1307276e+00   1.3638182e+00   2.3685439e+00   2.5416530e+00   2.2315914e+00   1.6401219e+00   2.7964263e+00   2.6870058e+00   2.1863211e+00   1.7233688e+00   1.9672316e+00   2.2022716e+00   1.6124515e+00   1.1135529e+00   1.1045361e+00   1.0392305e+00   1.3820275e+00   9.8488578e-01   7.8740079e-01   8.8317609e-01   7.6157731e-01   3.8729833e-01   1.4142136e-01   5.0990195e-01   6.7823300e-01   7.4161985e-01   1.4899664e+00   1.5427249e+00   1.6062378e+00   1.1224972e+00   1.0862780e+00   1.3114877e+00   7.9372539e-01   3.1622777e-01   9.0000000e-01   1.1489125e+00   1.4035669e+00   1.3152946e+00   6.4031242e-01   1.1224972e+00   2.2135944e+00   1.1916375e+00   1.0440307e+00   1.0440307e+00   5.5677644e-01   2.2293497e+00   1.0908712e+00   1.9924859e+00   1.3076697e+00   1.7058722e+00   1.3416408e+00   1.6278821e+00   2.4799194e+00   1.9235384e+00   2.0420578e+00   1.5748016e+00   2.1447611e+00   9.4868330e-01   1.1445523e+00   1.3114877e+00   1.4422205e+00   1.5459625e+00   1.3114877e+00   1.1916375e+00   2.7239677e+00   2.8827071e+00   1.2922848e+00   1.5968719e+00   1.3820275e+00   2.5961510e+00   8.5440037e-01   1.4899664e+00   1.7262677e+00   8.1240384e-01   8.8317609e-01   1.4525839e+00   1.5033296e+00   1.9287302e+00   2.5079872e+00   1.5033296e+00   8.6602540e-01   1.4317821e+00   2.1702534e+00   1.6401219e+00   1.2083046e+00   9.0553851e-01   1.2369317e+00   1.5620499e+00   1.1575837e+00   1.3076697e+00   1.7549929e+00   1.7146428e+00   1.2083046e+00   1.0630146e+00   1.0246951e+00   1.4662878e+00   1.1401754e+00   7.3484692e-01   1.0000000e+00   8.7749644e-01   5.5677644e-01   7.6157731e-01   9.4868330e-01   6.4807407e-01   8.5440037e-01   1.0099505e+00   1.2569805e+00   1.2247449e+00   4.1231056e-01   1.1916375e+00   1.0099505e+00   1.1224972e+00   7.6157731e-01   7.8740079e-01   2.0000000e-01   5.7445626e-01   1.1224972e+00   1.0148892e+00   4.4721360e-01   7.4161985e-01   5.1961524e-01   5.1961524e-01   7.3484692e-01   1.5937377e+00   4.6904158e-01   4.3588989e-01   3.8729833e-01   6.7082039e-01   1.7058722e+00   5.0000000e-01   1.9570386e+00   8.0622577e-01   2.1377558e+00   1.3416408e+00   1.7291616e+00   2.9614186e+00   8.8317609e-01   2.4959968e+00   1.8000000e+00   2.5455844e+00   1.2083046e+00   1.2369317e+00   1.6733201e+00   8.7177979e-01   1.1180340e+00   1.4000000e+00   1.3784049e+00   3.2218007e+00   3.3120990e+00   1.0246951e+00   1.9519221e+00   6.7082039e-01   3.0886890e+00   9.1104336e-01   1.7606817e+00   2.2226111e+00   7.6157731e-01   7.0710678e-01   1.5000000e+00   2.0639767e+00   2.4494897e+00   3.1288976e+00   1.5427249e+00   9.4339811e-01   1.2767145e+00   2.7586228e+00   1.6340135e+00   1.3190906e+00   5.8309519e-01   1.6941074e+00   1.8000000e+00   1.6431677e+00   8.0622577e-01   2.0199010e+00   1.9339080e+00   1.5297059e+00   1.0723805e+00   1.2449900e+00   1.4035669e+00   7.3484692e-01   9.0553851e-01   3.6055513e-01   1.1789826e+00   4.4721360e-01   1.0862780e+00   7.0710678e-01   7.2801099e-01   9.8994949e-01   1.2884099e+00   1.4832397e+00   7.0000000e-01   6.1644140e-01   5.2915026e-01   5.8309519e-01   2.8284271e-01   1.1832160e+00   8.1240384e-01   1.0246951e+00   1.2569805e+00   7.6811457e-01   4.6904158e-01   4.7958315e-01   4.7958315e-01   7.6811457e-01   2.4494897e-01   1.2000000e+00   3.7416574e-01   3.8729833e-01   3.8729833e-01   5.7445626e-01   1.3228757e+00   3.3166248e-01   2.5436195e+00   1.3453624e+00   2.4959968e+00   1.7832555e+00   2.2158520e+00   3.2848135e+00   1.2247449e+00   2.7874720e+00   2.0928450e+00   3.0033315e+00   1.6552945e+00   1.6155494e+00   2.0639767e+00   1.3638182e+00   1.7233688e+00   1.9339080e+00   1.7832555e+00   3.6083237e+00   3.6262929e+00   1.1618950e+00   2.3895606e+00   1.3000000e+00   3.3734256e+00   1.2369317e+00   2.2226111e+00   2.5416530e+00   1.1401754e+00   1.2083046e+00   1.9570386e+00   2.3021729e+00   2.7166155e+00   3.4510868e+00   2.0149442e+00   1.2288206e+00   1.5842980e+00   3.0643107e+00   2.2248595e+00   1.7663522e+00   1.1224972e+00   2.0663978e+00   2.2759613e+00   2.0149442e+00   1.3453624e+00   2.4859606e+00   2.4454039e+00   1.9493589e+00   1.3820275e+00   1.6703293e+00   2.0074860e+00   1.3190906e+00   9.8488578e-01   1.1269428e+00   8.1240384e-01   5.0990195e-01   7.0710678e-01   7.8102497e-01   9.0553851e-01   9.0553851e-01   1.0862780e+00   7.2801099e-01   1.2884099e+00   1.0862780e+00   1.1916375e+00   9.2736185e-01   8.1240384e-01   1.1313708e+00   1.2206556e+00   1.0488088e+00   2.6457513e-01   1.0954451e+00   9.3273791e-01   8.6602540e-01   8.1853528e-01   8.1240384e-01   1.7720045e+00   8.6023253e-01   1.0344080e+00   9.3273791e-01   7.5498344e-01   1.9261360e+00   9.0000000e-01   2.1142375e+00   9.6436508e-01   1.9416488e+00   1.3416408e+00   1.7058722e+00   2.7147744e+00   1.3490738e+00   2.2427661e+00   1.4560220e+00   2.5534291e+00   1.3038405e+00   1.0440307e+00   1.5362291e+00   9.1651514e-01   1.3000000e+00   1.5231546e+00   1.3490738e+00   3.1843367e+00   2.9681644e+00   5.3851648e-01   1.8894444e+00   1.0630146e+00   2.7748874e+00   7.1414284e-01   1.8055470e+00   2.0832667e+00   7.3484692e-01   9.4868330e-01   1.4035669e+00   1.8275667e+00   2.1260292e+00   3.0512293e+00   1.4491377e+00   8.5440037e-01   1.1789826e+00   2.4677925e+00   1.8627936e+00   1.3928388e+00   9.2736185e-01   1.5716234e+00   1.7549929e+00   1.5165751e+00   9.6436508e-01   1.9899749e+00   1.9748418e+00   1.4212670e+00   7.1414284e-01   1.2124356e+00   1.7000000e+00   1.0862780e+00   1.3711309e+00   6.2449980e-01   1.2845233e+00   9.9498744e-01   1.0000000e+00   1.2609520e+00   1.5588457e+00   1.7406895e+00   9.1651514e-01   4.3588989e-01   1.7320508e-01   2.6457513e-01   3.0000000e-01   1.3747727e+00   9.0000000e-01   1.2569805e+00   1.5394804e+00   9.0553851e-01   5.7445626e-01   2.4494897e-01   5.2915026e-01   1.0392305e+00   2.6457513e-01   8.7749644e-01   4.1231056e-01   6.0000000e-01   5.4772256e-01   8.4852814e-01   1.0295630e+00   4.2426407e-01   2.7386128e+00   1.4696938e+00   2.7386128e+00   2.0074860e+00   2.4248711e+00   3.5411862e+00   1.1000000e+00   3.0495901e+00   2.3043437e+00   3.2511536e+00   1.8841444e+00   1.8110770e+00   2.2912878e+00   1.4247807e+00   1.8055470e+00   2.1283797e+00   2.0273135e+00   3.8923001e+00   3.8548671e+00   1.2727922e+00   2.6191602e+00   1.3784049e+00   3.6262929e+00   1.4212670e+00   2.4677925e+00   2.8195744e+00   1.3228757e+00   1.4106736e+00   2.1494185e+00   2.5826343e+00   2.9681644e+00   3.7469988e+00   2.1977261e+00   1.4764823e+00   1.8000000e+00   3.3075671e+00   2.4248711e+00   2.0124612e+00   1.3076697e+00   2.3021729e+00   2.4799194e+00   2.2203603e+00   1.4696938e+00   2.7147744e+00   2.6551836e+00   2.1424285e+00   1.5297059e+00   1.8867962e+00   2.2045408e+00   1.5066519e+00   1.0440307e+00   8.6602540e-01   7.5498344e-01   9.1651514e-01   9.2195445e-01   1.0630146e+00   8.5440037e-01   5.2915026e-01   1.6522712e+00   1.5132746e+00   1.6278821e+00   1.1958261e+00   6.2449980e-01   6.8556546e-01   4.2426407e-01   8.6602540e-01   1.1747340e+00   9.3273791e-01   1.2409674e+00   1.0198039e+00   5.2915026e-01   1.1704700e+00   2.1236761e+00   9.7467943e-01   8.9442719e-01   8.6023253e-01   8.2462113e-01   2.2045408e+00   9.6953597e-01   1.4491377e+00   6.0000000e-01   1.6673332e+00   9.4339811e-01   1.2489996e+00   2.5019992e+00   1.2609520e+00   2.0736441e+00   1.4594520e+00   2.0074860e+00   7.0000000e-01   8.7177979e-01   1.1958261e+00   7.8102497e-01   7.8740079e-01   8.6602540e-01   9.4339811e-01   2.7147744e+00   2.8740216e+00   1.0677078e+00   1.4352700e+00   5.4772256e-01   2.6551836e+00   6.4807407e-01   1.2449900e+00   1.7691806e+00   5.0000000e-01   3.0000000e-01   1.0677078e+00   1.6643317e+00   2.0273135e+00   2.6381812e+00   1.1000000e+00   7.0710678e-01   1.0954451e+00   2.2847319e+00   1.0954451e+00   8.6602540e-01   2.2360680e-01   1.2083046e+00   1.2845233e+00   1.1618950e+00   6.0000000e-01   1.5066519e+00   1.3964240e+00   1.0440307e+00   8.3666003e-01   7.7459667e-01   8.6023253e-01   3.6055513e-01   9.8994949e-01   7.0710678e-01   4.3588989e-01   6.7823300e-01   1.0677078e+00   1.2489996e+00   5.5677644e-01   7.3484692e-01   7.7459667e-01   8.3666003e-01   3.4641016e-01   1.1489125e+00   9.0553851e-01   8.4261498e-01   9.8994949e-01   6.7082039e-01   5.4772256e-01   6.7082039e-01   7.5498344e-01   6.4031242e-01   3.7416574e-01   1.4282857e+00   5.4772256e-01   5.0000000e-01   4.5825757e-01   3.3166248e-01   1.4594520e+00   4.1231056e-01   2.3937418e+00   1.2922848e+00   2.3000000e+00   1.6911535e+00   2.0615528e+00   3.1128765e+00   1.3928388e+00   2.6438608e+00   1.9849433e+00   2.7748874e+00   1.4212670e+00   1.4662878e+00   1.8493242e+00   1.3190906e+00   1.5842980e+00   1.7146428e+00   1.6431677e+00   3.4146742e+00   3.4655447e+00   1.1874342e+00   2.1656408e+00   1.2449900e+00   3.2155870e+00   1.0535654e+00   2.0346990e+00   2.3706539e+00   9.4868330e-01   1.0488088e+00   1.8138357e+00   2.1400935e+00   2.5416530e+00   3.2388269e+00   1.8601075e+00   1.1357817e+00   1.6155494e+00   2.8301943e+00   2.0420578e+00   1.6370706e+00   9.6953597e-01   1.8248288e+00   2.0542639e+00   1.7146428e+00   1.2922848e+00   2.2934690e+00   2.2226111e+00   1.6852300e+00   1.2206556e+00   1.4594520e+00   1.8248288e+00   1.2409674e+00   5.0990195e-01   7.5498344e-01   7.7459667e-01   6.0000000e-01   6.7823300e-01   6.4031242e-01   1.6062378e+00   1.4212670e+00   1.5297059e+00   1.1747340e+00   4.2426407e-01   1.1045361e+00   1.0344080e+00   7.4833148e-01   5.7445626e-01   1.1916375e+00   1.2206556e+00   9.9498744e-01   6.2449980e-01   1.0770330e+00   2.1307276e+00   1.0295630e+00   1.0908712e+00   1.0246951e+00   7.5498344e-01   2.2825424e+00   1.0630146e+00   1.6881943e+00   7.0000000e-01   1.5000000e+00   8.6023253e-01   1.2609520e+00   2.2781571e+00   1.4696938e+00   1.7916473e+00   1.0295630e+00   2.1118712e+00   9.0553851e-01   6.0827625e-01   1.1045361e+00   7.8740079e-01   1.0908712e+00   1.1401754e+00   8.6023253e-01   2.7166155e+00   2.5709920e+00   4.3588989e-01   1.4594520e+00   9.1104336e-01   2.3537205e+00   3.6055513e-01   1.3416408e+00   1.6124515e+00   4.4721360e-01   6.1644140e-01   9.7467943e-01   1.3711309e+00   1.7029386e+00   2.5980762e+00   1.0392305e+00   3.6055513e-01   7.4161985e-01   2.0712315e+00   1.4525839e+00   9.0553851e-01   6.6332496e-01   1.1532563e+00   1.3490738e+00   1.1832160e+00   7.0000000e-01   1.5427249e+00   1.5620499e+00   1.0677078e+00   4.1231056e-01   7.9372539e-01   1.3076697e+00   7.3484692e-01   5.1961524e-01   6.4807407e-01   7.3484692e-01   8.6023253e-01   3.8729833e-01   1.2961481e+00   1.1575837e+00   1.2489996e+00   8.6023253e-01   5.8309519e-01   8.1240384e-01   7.5498344e-01   7.3484692e-01   6.2449980e-01   8.1240384e-01   9.7467943e-01   7.0000000e-01   3.0000000e-01   7.8740079e-01   1.8601075e+00   7.2111026e-01   6.7082039e-01   6.5574385e-01   4.3588989e-01   1.9974984e+00   7.2801099e-01   1.9157244e+00   8.6602540e-01   1.8138357e+00   1.1045361e+00   1.5524175e+00   2.5903668e+00   1.3490738e+00   2.0904545e+00   1.4212670e+00   2.3452079e+00   1.0583005e+00   9.7467943e-01   1.4071247e+00   9.8994949e-01   1.3000000e+00   1.3490738e+00   1.0954451e+00   2.9257478e+00   2.9410882e+00   7.4161985e-01   1.7349352e+00   9.6436508e-01   2.6832816e+00   6.7082039e-01   1.5556349e+00   1.8493242e+00   6.1644140e-01   6.6332496e-01   1.3076697e+00   1.6186414e+00   2.0346990e+00   2.7874720e+00   1.3784049e+00   5.3851648e-01   9.4339811e-01   2.4020824e+00   1.6278821e+00   1.0862780e+00   6.4807407e-01   1.4247807e+00   1.6431677e+00   1.4491377e+00   8.6602540e-01   1.8165902e+00   1.8165902e+00   1.3638182e+00   8.4261498e-01   1.0440307e+00   1.4387495e+00   7.7459667e-01   2.6457513e-01   6.5574385e-01   8.6602540e-01   4.8989795e-01   1.1445523e+00   1.1618950e+00   1.2288206e+00   7.5498344e-01   9.6436508e-01   1.0440307e+00   7.3484692e-01   5.7445626e-01   6.1644140e-01   8.3066239e-01   1.0295630e+00   9.5916630e-01   4.4721360e-01   7.4161985e-01   1.8466185e+00   8.3066239e-01   7.2111026e-01   7.0710678e-01   2.0000000e-01   1.8920888e+00   7.3484692e-01   2.1213203e+00   1.1832160e+00   1.9235384e+00   1.3964240e+00   1.7549929e+00   2.7166155e+00   1.6155494e+00   2.2494444e+00   1.6583124e+00   2.4103942e+00   1.1090537e+00   1.1832160e+00   1.5000000e+00   1.2767145e+00   1.4899664e+00   1.4456832e+00   1.3076697e+00   3.0116441e+00   3.0886890e+00   1.0862780e+00   1.8165902e+00   1.2247449e+00   2.8195744e+00   8.1240384e-01   1.6881943e+00   1.9672316e+00   7.4161985e-01   8.4261498e-01   1.5297059e+00   1.7291616e+00   2.1470911e+00   2.8213472e+00   1.5842980e+00   8.3666003e-01   1.3711309e+00   2.4372115e+00   1.7776389e+00   1.3152946e+00   8.1853528e-01   1.4628739e+00   1.7406895e+00   1.3892444e+00   1.1832160e+00   1.9519221e+00   1.9104973e+00   1.3820275e+00   1.0099505e+00   1.1489125e+00   1.5811388e+00   1.0723805e+00   4.8989795e-01   6.7823300e-01   6.2449980e-01   1.3928388e+00   1.4212670e+00   1.4899664e+00   1.0099505e+00   9.8994949e-01   1.2083046e+00   7.5498344e-01   3.4641016e-01   7.6811457e-01   1.0488088e+00   1.2767145e+00   1.1874342e+00   5.3851648e-01   1.0000000e+00   2.1023796e+00   1.0677078e+00   9.4339811e-01   9.3273791e-01   4.3588989e-01   2.1330729e+00   9.7467943e-01   1.9874607e+00   1.2124356e+00   1.7291616e+00   1.3038405e+00   1.6155494e+00   2.5159491e+00   1.8000000e+00   2.0663978e+00   1.5427249e+00   2.1954498e+00   9.4868330e-01   1.0908712e+00   1.3190906e+00   1.3341664e+00   1.4730920e+00   1.3038405e+00   1.1747340e+00   2.7892651e+00   2.9034462e+00   1.1704700e+00   1.6217275e+00   1.2845233e+00   2.6267851e+00   7.6811457e-01   1.5099669e+00   1.7663522e+00   7.2111026e-01   8.1240384e-01   1.4177447e+00   1.5362291e+00   1.9544820e+00   2.5865034e+00   1.4696938e+00   7.9372539e-01   1.3601471e+00   2.2158520e+00   1.6401219e+00   1.1916375e+00   8.2462113e-01   1.2609520e+00   1.5684387e+00   1.1832160e+00   1.2124356e+00   1.7720045e+00   1.7320508e+00   1.2083046e+00   9.7467943e-01   1.0049876e+00   1.4594520e+00   1.0677078e+00   4.2426407e-01   8.6602540e-01   1.7606817e+00   1.7146428e+00   1.7944358e+00   1.3638182e+00   8.8317609e-01   1.4491377e+00   1.0630146e+00   3.4641016e-01   8.1853528e-01   1.4071247e+00   1.5588457e+00   1.3892444e+00   7.5498344e-01   1.3114877e+00   2.4289916e+00   1.3490738e+00   1.2845233e+00   1.2609520e+00   7.9372539e-01   2.5119713e+00   1.3076697e+00   1.7748239e+00   1.1618950e+00   1.3527749e+00   1.0295630e+00   1.3304135e+00   2.1000000e+00   1.9697716e+00   1.6340135e+00   1.1224972e+00   1.9235384e+00   8.3666003e-01   8.1853528e-01   1.0099505e+00   1.3038405e+00   1.4456832e+00   1.1747340e+00   8.8317609e-01   2.4617067e+00   2.4637370e+00   1.0246951e+00   1.3379088e+00   1.3453624e+00   2.1863211e+00   6.5574385e-01   1.2489996e+00   1.3856406e+00   7.2111026e-01   8.3666003e-01   1.1357817e+00   1.1135529e+00   1.5165751e+00   2.2649503e+00   1.2000000e+00   5.9160798e-01   1.0816654e+00   1.8303005e+00   1.5000000e+00   9.4868330e-01   9.1651514e-01   9.7467943e-01   1.3190906e+00   1.0000000e+00   1.1618950e+00   1.4764823e+00   1.5099669e+00   1.0099505e+00   7.9372539e-01   8.0622577e-01   1.3747727e+00   1.0488088e+00   8.8881944e-01   1.9748418e+00   1.8973666e+00   1.9949937e+00   1.5362291e+00   7.7459667e-01   1.4071247e+00   9.5393920e-01   3.7416574e-01   1.0816654e+00   1.4764823e+00   1.6881943e+00   1.4866069e+00   7.8102497e-01   1.4899664e+00   2.6000000e+00   1.4491377e+00   1.3747727e+00   1.3453624e+00   9.5393920e-01   2.6776856e+00   1.4177447e+00   1.3747727e+00   9.7467943e-01   1.0630146e+00   7.3484692e-01   9.6436508e-01   1.8788294e+00   1.9339080e+00   1.4387495e+00   9.4868330e-01   1.5684387e+00   4.2426407e-01   5.5677644e-01   6.4807407e-01   1.1575837e+00   1.1618950e+00   7.6157731e-01   5.4772256e-01   2.1863211e+00   2.2649503e+00   1.0816654e+00   9.6436508e-01   1.1618950e+00   2.0049938e+00   5.1961524e-01   8.6023253e-01   1.1401754e+00   5.8309519e-01   6.1644140e-01   8.0622577e-01   9.4868330e-01   1.3341664e+00   2.0322401e+00   8.6023253e-01   5.0000000e-01   9.8488578e-01   1.6031220e+00   1.0816654e+00   6.0000000e-01   7.3484692e-01   6.0827625e-01   9.2736185e-01   6.4807407e-01   9.7467943e-01   1.1045361e+00   1.1045361e+00   6.3245553e-01   6.7082039e-01   4.1231056e-01   9.6436508e-01   8.1240384e-01   1.1958261e+00   1.0723805e+00   1.1789826e+00   7.2801099e-01   6.4031242e-01   6.0827625e-01   5.0990195e-01   7.5498344e-01   7.0710678e-01   6.0827625e-01   8.3666003e-01   6.6332496e-01   2.0000000e-01   6.8556546e-01   1.7464249e+00   5.7445626e-01   5.2915026e-01   4.6904158e-01   3.4641016e-01   1.8384776e+00   5.4772256e-01   1.8708287e+00   7.7459667e-01   1.8814888e+00   1.1789826e+00   1.5620499e+00   2.7092434e+00   1.1874342e+00   2.2405357e+00   1.5588457e+00   2.3430749e+00   9.7467943e-01   1.0000000e+00   1.4177447e+00   8.6602540e-01   1.1045361e+00   1.2369317e+00   1.1618950e+00   3.0049958e+00   3.0626786e+00   8.6023253e-01   1.7262677e+00   7.6157731e-01   2.8266588e+00   6.1644140e-01   1.5652476e+00   1.9672316e+00   4.7958315e-01   5.1961524e-01   1.3190906e+00   1.7748239e+00   2.1656408e+00   2.8774989e+00   1.3674794e+00   6.7823300e-01   1.1489125e+00   2.4698178e+00   1.5362291e+00   1.1357817e+00   4.3588989e-01   1.4212670e+00   1.5968719e+00   1.3601471e+00   7.7459667e-01   1.8248288e+00   1.7578396e+00   1.2767145e+00   8.1240384e-01   1.0000000e+00   1.3190906e+00   6.8556546e-01   4.2426407e-01   3.4641016e-01   4.6904158e-01   1.7378147e+00   1.2247449e+00   1.4456832e+00   1.7146428e+00   1.1618950e+00   7.8740079e-01   6.2449980e-01   9.4339811e-01   1.3000000e+00   5.4772256e-01   7.8740079e-01   7.7459667e-01   8.3066239e-01   8.1853528e-01   1.0344080e+00   7.9372539e-01   7.0000000e-01   3.0577770e+00   1.8411953e+00   3.0149627e+00   2.3452079e+00   2.7440845e+00   3.8196859e+00   1.4628739e+00   3.3361655e+00   2.6343880e+00   3.5014283e+00   2.1354157e+00   2.1330729e+00   2.5651511e+00   1.8055470e+00   2.1377558e+00   2.4041631e+00   2.3323808e+00   4.1376322e+00   4.1533119e+00   1.6583124e+00   2.8861739e+00   1.7349352e+00   3.9089641e+00   1.7233688e+00   2.7459060e+00   3.0822070e+00   1.6186414e+00   1.7088007e+00   2.4799194e+00   2.8390139e+00   3.2403703e+00   3.9610605e+00   2.5258662e+00   1.7916473e+00   2.1748563e+00   3.5510562e+00   2.7147744e+00   2.3194827e+00   1.6062378e+00   2.5514702e+00   2.7604347e+00   2.4372115e+00   1.8411953e+00   3.0033315e+00   2.9291637e+00   2.3958297e+00   1.8520259e+00   2.1656408e+00   2.4879711e+00   1.8439089e+00   1.4142136e-01   4.4721360e-01   1.5099669e+00   1.0099505e+00   1.4106736e+00   1.7029386e+00   1.0246951e+00   7.0710678e-01   3.0000000e-01   6.4031242e-01   1.2041595e+00   4.2426407e-01   7.2111026e-01   5.4772256e-01   7.5498344e-01   7.0000000e-01   1.0148892e+00   9.0000000e-01   5.7445626e-01   2.8722813e+00   1.5842980e+00   2.8861739e+00   2.1494185e+00   2.5632011e+00   3.6891733e+00   1.1045361e+00   3.1984371e+00   2.4372115e+00   3.4029399e+00   2.0346990e+00   1.9467922e+00   2.4372115e+00   1.5165751e+00   1.9052559e+00   2.2671568e+00   2.1771541e+00   4.0521599e+00   3.9912404e+00   1.3747727e+00   2.7658633e+00   1.4798649e+00   3.7709415e+00   1.5588457e+00   2.6191602e+00   2.9765752e+00   1.4628739e+00   1.5556349e+00   2.2825424e+00   2.7386128e+00   3.1144823e+00   3.9102430e+00   2.3280893e+00   1.6278821e+00   1.9313208e+00   3.4539832e+00   2.5632011e+00   2.1633308e+00   1.4491377e+00   2.4515301e+00   2.6191602e+00   2.3622024e+00   1.5842980e+00   2.8600699e+00   2.7964263e+00   2.2803509e+00   1.6522712e+00   2.0322401e+00   2.3430749e+00   1.6431677e+00   5.0990195e-01   1.6309506e+00   1.1224972e+00   1.5000000e+00   1.7832555e+00   1.1090537e+00   7.8740079e-01   4.3588989e-01   7.5498344e-01   1.3000000e+00   5.0990195e-01   6.4807407e-01   6.6332496e-01   8.3066239e-01   7.9372539e-01   1.0908712e+00   8.1853528e-01   6.7082039e-01   2.9983329e+00   1.7175564e+00   2.9949958e+00   2.2671568e+00   2.6851443e+00   3.7934153e+00   1.2247449e+00   3.3000000e+00   2.5495098e+00   3.5128336e+00   2.1447611e+00   2.0663978e+00   2.5495098e+00   1.6552945e+00   2.0420578e+00   2.3874673e+00   2.2891046e+00   4.1521079e+00   4.1000000e+00   1.4933185e+00   2.8792360e+00   1.6155494e+00   3.8729833e+00   1.6763055e+00   2.7313001e+00   3.0757113e+00   1.5811388e+00   1.6733201e+00   2.4062419e+00   2.8319605e+00   3.2155870e+00   4.0012498e+00   2.4535688e+00   1.7349352e+00   2.0420578e+00   3.5566838e+00   2.6851443e+00   2.2759613e+00   1.5684387e+00   2.5592968e+00   2.7386128e+00   2.4698178e+00   1.7175564e+00   2.9765752e+00   2.9154759e+00   2.3958297e+00   1.7748239e+00   2.1470911e+00   2.4637370e+00   1.7663522e+00   1.2806248e+00   8.3666003e-01   1.0246951e+00   1.3038405e+00   8.1853528e-01   4.2426407e-01   3.8729833e-01   5.9160798e-01   8.4261498e-01   1.4142136e-01   1.0954451e+00   3.7416574e-01   4.3588989e-01   3.8729833e-01   6.0827625e-01   1.1618950e+00   2.6457513e-01   2.5903668e+00   1.3892444e+00   2.5670995e+00   1.8814888e+00   2.2781571e+00   3.3808283e+00   1.2083046e+00   2.9000000e+00   2.1954498e+00   3.0495901e+00   1.6792856e+00   1.6763055e+00   2.1118712e+00   1.3784049e+00   1.7000000e+00   1.9442222e+00   1.8708287e+00   3.6959437e+00   3.7188708e+00   1.2609520e+00   2.4310492e+00   1.3000000e+00   3.4785054e+00   1.2688578e+00   2.2847319e+00   2.6419690e+00   1.1575837e+00   1.2409674e+00   2.0174241e+00   2.4124676e+00   2.8106939e+00   3.5369478e+00   2.0639767e+00   1.3379088e+00   1.7406895e+00   3.1224990e+00   2.2516660e+00   1.8547237e+00   1.1401754e+00   2.1047565e+00   2.3021729e+00   2.0049938e+00   1.3892444e+00   2.5416530e+00   2.4698178e+00   1.9493589e+00   1.4106736e+00   1.7058722e+00   2.0273135e+00   1.3784049e+00   9.0553851e-01   9.2195445e-01   9.0553851e-01   9.1104336e-01   1.1575837e+00   1.2609520e+00   9.5393920e-01   6.2449980e-01   1.1916375e+00   2.1817424e+00   1.0295630e+00   1.0723805e+00   1.0148892e+00   9.0000000e-01   2.3473389e+00   1.0908712e+00   1.4387495e+00   3.6055513e-01   1.4798649e+00   6.4807407e-01   1.0908712e+00   2.2693611e+00   1.2727922e+00   1.7916473e+00   1.0295630e+00   2.0149442e+00   8.1240384e-01   5.3851648e-01   1.0677078e+00   5.4772256e-01   8.3066239e-01   9.6953597e-01   7.3484692e-01   2.6495283e+00   2.5748786e+00   5.1961524e-01   1.3820275e+00   6.0827625e-01   2.3706539e+00   4.1231056e-01   1.2083046e+00   1.5937377e+00   4.2426407e-01   4.2426407e-01   8.1853528e-01   1.4212670e+00   1.7492856e+00   2.5826343e+00   8.8317609e-01   3.3166248e-01   5.5677644e-01   2.1142375e+00   1.2124356e+00   7.2111026e-01   4.6904158e-01   1.1445523e+00   1.2409674e+00   1.2083046e+00   3.6055513e-01   1.4212670e+00   1.4212670e+00   1.0392305e+00   4.7958315e-01   7.1414284e-01   1.0535654e+00   3.7416574e-01   7.2801099e-01   1.3190906e+00   1.1618950e+00   4.8989795e-01   7.4161985e-01   5.1961524e-01   7.1414284e-01   8.1240384e-01   1.5297059e+00   5.0990195e-01   5.1961524e-01   4.7958315e-01   8.5440037e-01   1.6583124e+00   5.7445626e-01   2.0371549e+00   8.7749644e-01   2.2825424e+00   1.4560220e+00   1.8411953e+00   3.1000000e+00   7.3484692e-01   2.6362853e+00   1.9287302e+00   2.6758176e+00   1.3638182e+00   1.3747727e+00   1.8220867e+00   9.1651514e-01   1.1704700e+00   1.5231546e+00   1.5165751e+00   3.3555923e+00   3.4423829e+00   1.1180340e+00   2.0904545e+00   7.0000000e-01   3.2280025e+00   1.0723805e+00   1.8920888e+00   2.3706539e+00   9.2736185e-01   8.6023253e-01   1.6155494e+00   2.2226111e+00   2.6000000e+00   3.2787193e+00   1.6552945e+00   1.1000000e+00   1.3674794e+00   2.9137605e+00   1.7291616e+00   1.4491377e+00   7.3484692e-01   1.8520259e+00   1.9287302e+00   1.8055470e+00   8.7749644e-01   2.1447611e+00   2.0542639e+00   1.6792856e+00   1.2124356e+00   1.3964240e+00   1.5000000e+00   8.3666003e-01   7.9372539e-01   1.1832160e+00   7.5498344e-01   1.1832160e+00   1.0295630e+00   4.6904158e-01   1.0440307e+00   2.0024984e+00   9.1104336e-01   7.0710678e-01   7.2111026e-01   6.4807407e-01   2.0297783e+00   8.3666003e-01   1.7776389e+00   9.8994949e-01   1.8920888e+00   1.2609520e+00   1.5684387e+00   2.7166155e+00   1.4247807e+00   2.2847319e+00   1.7406895e+00   2.2022716e+00   9.0000000e-01   1.1747340e+00   1.4317821e+00   1.1445523e+00   1.1832160e+00   1.1532563e+00   1.2041595e+00   2.8722813e+00   3.1272992e+00   1.3038405e+00   1.6673332e+00   9.1651514e-01   2.8722813e+00   8.8317609e-01   1.4798649e+00   1.9416488e+00   7.2801099e-01   6.0827625e-01   1.4071247e+00   1.8138357e+00   2.2293497e+00   2.7459060e+00   1.4456832e+00   9.0553851e-01   1.3784049e+00   2.4698178e+00   1.3928388e+00   1.1357817e+00   5.3851648e-01   1.4000000e+00   1.5588457e+00   1.3228757e+00   9.8994949e-01   1.7691806e+00   1.6583124e+00   1.2767145e+00   1.1135529e+00   1.0295630e+00   1.1575837e+00   7.5498344e-01   9.6436508e-01   1.2727922e+00   1.5264338e+00   1.3674794e+00   6.2449980e-01   1.2806248e+00   2.3958297e+00   1.2884099e+00   1.1618950e+00   1.1532563e+00   7.0000000e-01   2.4433583e+00   1.2206556e+00   1.7000000e+00   1.1357817e+00   1.4035669e+00   1.0488088e+00   1.3228757e+00   2.1886069e+00   1.9183326e+00   1.7464249e+00   1.2884099e+00   1.8601075e+00   6.7823300e-01   8.7749644e-01   1.0099505e+00   1.3038405e+00   1.3674794e+00   1.0488088e+00   8.8317609e-01   2.4454039e+00   2.5942244e+00   1.1789826e+00   1.3000000e+00   1.2609520e+00   2.3108440e+00   6.7082039e-01   1.1832160e+00   1.4282857e+00   6.6332496e-01   7.0710678e-01   1.1618950e+00   1.2165525e+00   1.6431677e+00   2.2516660e+00   1.2165525e+00   6.4031242e-01   1.1958261e+00   1.9000000e+00   1.3674794e+00   9.0553851e-01   7.7459667e-01   9.4339811e-01   1.2727922e+00   9.1651514e-01   1.1357817e+00   1.4491377e+00   1.4282857e+00   9.4868330e-01   8.7749644e-01   7.4161985e-01   1.2124356e+00   9.4868330e-01   1.0344080e+00   9.1651514e-01   8.6023253e-01   7.6157731e-01   7.1414284e-01   1.7291616e+00   8.3066239e-01   9.4868330e-01   8.7177979e-01   6.1644140e-01   1.8654758e+00   8.3666003e-01   2.2360680e+00   1.1224972e+00   2.0049938e+00   1.4317821e+00   1.8165902e+00   2.7676705e+00   1.4730920e+00   2.2847319e+00   1.5524175e+00   2.6134269e+00   1.3527749e+00   1.1575837e+00   1.6093477e+00   1.1180340e+00   1.4832397e+00   1.6217275e+00   1.4106736e+00   3.2109189e+00   3.0495901e+00   7.0710678e-01   1.9646883e+00   1.2165525e+00   2.8266588e+00   8.1240384e-01   1.8681542e+00   2.1047565e+00   8.1853528e-01   1.0148892e+00   1.5297059e+00   1.8303005e+00   2.1702534e+00   3.0495901e+00   1.5842980e+00   8.8317609e-01   1.2569805e+00   2.5179357e+00   1.9646883e+00   1.4525839e+00   9.9498744e-01   1.6248077e+00   1.8574176e+00   1.5779734e+00   1.1224972e+00   2.0760539e+00   2.0712315e+00   1.5132746e+00   8.7177979e-01   1.2884099e+00   1.7944358e+00   1.1789826e+00   5.1961524e-01   5.1961524e-01   7.1414284e-01   4.6904158e-01   1.2569805e+00   3.1622777e-01   1.7320508e-01   1.7320508e-01   6.4031242e-01   1.3228757e+00   2.2360680e-01   2.3727621e+00   1.2206556e+00   2.4758837e+00   1.7320508e+00   2.1236761e+00   3.3000000e+00   1.0295630e+00   2.8266588e+00   2.1447611e+00   2.8913665e+00   1.5297059e+00   1.5905974e+00   2.0099751e+00   1.2489996e+00   1.5132746e+00   1.7663522e+00   1.7378147e+00   3.5524639e+00   3.6619667e+00   1.2845233e+00   2.3000000e+00   1.0816654e+00   3.4205263e+00   1.2124356e+00   2.1213203e+00   2.5416530e+00   1.0677078e+00   1.0677078e+00   1.8894444e+00   2.3537205e+00   2.7640550e+00   3.4219877e+00   1.9339080e+00   1.2529964e+00   1.6340135e+00   3.0675723e+00   2.0273135e+00   1.6911535e+00   9.4868330e-01   2.0074860e+00   2.1633308e+00   1.9235384e+00   1.2206556e+00   2.3916521e+00   2.3021729e+00   1.8493242e+00   1.3820275e+00   1.5842980e+00   1.7916473e+00   1.1575837e+00   4.2426407e-01   9.8994949e-01   3.3166248e-01   9.3273791e-01   3.0000000e-01   5.8309519e-01   4.8989795e-01   8.6023253e-01   1.0954451e+00   3.7416574e-01   2.5922963e+00   1.3038405e+00   2.6570661e+00   1.9000000e+00   2.3021729e+00   3.4727511e+00   8.7749644e-01   2.9899833e+00   2.2203603e+00   3.1543621e+00   1.7860571e+00   1.7029386e+00   2.1977261e+00   1.2369317e+00   1.6124515e+00   1.9974984e+00   1.9364917e+00   3.8249183e+00   3.7762415e+00   1.1747340e+00   2.5179357e+00   1.1832160e+00   3.5651087e+00   1.3190906e+00   2.3685439e+00   2.7622455e+00   1.2124356e+00   1.2922848e+00   2.0248457e+00   2.5436195e+00   2.9103264e+00   3.7013511e+00   2.0663978e+00   1.4071247e+00   1.7146428e+00   3.2403703e+00   2.2847319e+00   1.9157244e+00   1.1789826e+00   2.2181073e+00   2.3600847e+00   2.1283797e+00   1.3038405e+00   2.6057628e+00   2.5317978e+00   2.0322401e+00   1.4142136e+00   1.7832555e+00   2.0639767e+00   1.3674794e+00   7.7459667e-01   5.0000000e-01   1.2609520e+00   2.6457513e-01   4.8989795e-01   4.2426407e-01   7.7459667e-01   1.4628739e+00   4.2426407e-01   2.3194827e+00   1.0392305e+00   2.4041631e+00   1.5905974e+00   2.0297783e+00   3.1968735e+00   7.9372539e-01   2.7018512e+00   1.9416488e+00   2.9103264e+00   1.5779734e+00   1.4560220e+00   1.9672316e+00   1.0246951e+00   1.4352700e+00   1.7860571e+00   1.6522712e+00   3.5454196e+00   3.5071356e+00   9.2736185e-01   2.2847319e+00   9.6953597e-01   3.2878564e+00   1.1224972e+00   2.1047565e+00   2.4839485e+00   1.0246951e+00   1.0630146e+00   1.7606817e+00   2.2737634e+00   2.6514147e+00   3.4409301e+00   1.8138357e+00   1.1224972e+00   1.3564660e+00   3.0166206e+00   2.0396078e+00   1.6217275e+00   9.6436508e-01   2.0049938e+00   2.1377558e+00   1.9773720e+00   1.0392305e+00   2.3473389e+00   2.3043437e+00   1.8574176e+00   1.2247449e+00   1.5620499e+00   1.8275667e+00   1.0816654e+00   8.0622577e-01   1.8841444e+00   7.1414284e-01   6.0000000e-01   5.8309519e-01   3.4641016e-01   1.9748418e+00   6.7823300e-01   1.8165902e+00   8.2462113e-01   1.7832555e+00   1.1000000e+00   1.4966630e+00   2.5961510e+00   1.3379088e+00   2.1213203e+00   1.4866069e+00   2.2427661e+00   9.0000000e-01   9.5916630e-01   1.3379088e+00   9.6436508e-01   1.1747340e+00   1.1958261e+00   1.0630146e+00   2.8722813e+00   2.9698485e+00   9.0553851e-01   1.6431677e+00   8.6023253e-01   2.7147744e+00   6.1644140e-01   1.4662878e+00   1.8357560e+00   5.0000000e-01   5.0000000e-01   1.2727922e+00   1.6401219e+00   2.0566964e+00   2.7349589e+00   1.3304135e+00   5.8309519e-01   1.0770330e+00   2.3706539e+00   1.4832397e+00   1.0344080e+00   4.5825757e-01   1.3341664e+00   1.5394804e+00   1.3076697e+00   8.2462113e-01   1.7406895e+00   1.6941074e+00   1.2369317e+00   8.3666003e-01   9.3808315e-01   1.2727922e+00   6.7082039e-01   1.1224972e+00   3.1622777e-01   4.5825757e-01   3.8729833e-01   5.9160798e-01   1.2288206e+00   2.6457513e-01   2.5357445e+00   1.3076697e+00   2.5039968e+00   1.8055470e+00   2.2113344e+00   3.3120990e+00   1.1489125e+00   2.8266588e+00   2.1023796e+00   3.0099834e+00   1.6431677e+00   1.5968719e+00   2.0542639e+00   1.2884099e+00   1.6401219e+00   1.9026298e+00   1.8055470e+00   3.6523965e+00   3.6373067e+00   1.1357817e+00   2.3811762e+00   1.2369317e+00   3.4029399e+00   1.1958261e+00   2.2360680e+00   2.5845696e+00   1.0954451e+00   1.1916375e+00   1.9416488e+00   2.3494680e+00   2.7386128e+00   3.5000000e+00   1.9899749e+00   1.2609520e+00   1.6401219e+00   3.0643107e+00   2.2113344e+00   1.7944358e+00   1.0954451e+00   2.0566964e+00   2.2494444e+00   1.9697716e+00   1.3076697e+00   2.4859606e+00   2.4248711e+00   1.9026298e+00   1.3228757e+00   1.6522712e+00   1.9924859e+00   1.3190906e+00   1.1916375e+00   1.3527749e+00   1.3228757e+00   1.7000000e+00   3.8729833e-01   1.2124356e+00   3.4971417e+00   2.2022716e+00   3.5874782e+00   2.8248894e+00   3.2295511e+00   4.3988635e+00   1.4071247e+00   3.9102430e+00   3.1336879e+00   4.0767634e+00   2.7018512e+00   2.6324893e+00   3.1272992e+00   2.1023796e+00   2.4677925e+00   2.9086079e+00   2.8670542e+00   4.7476310e+00   4.6936127e+00   2.0371549e+00   3.4452866e+00   2.0420578e+00   4.4833024e+00   2.2472205e+00   3.2954514e+00   3.6851052e+00   2.1400935e+00   2.2135944e+00   2.9512709e+00   3.4554305e+00   3.8288379e+00   4.6119410e+00   2.9899833e+00   2.3302360e+00   2.5980762e+00   4.1605288e+00   3.1859065e+00   2.8425341e+00   2.0928450e+00   3.1416556e+00   3.2832910e+00   3.0298515e+00   2.2022716e+00   3.5355339e+00   3.4496377e+00   2.9461840e+00   2.3302360e+00   2.7110883e+00   2.9580399e+00   2.2759613e+00   3.3166248e-01   2.2360680e-01   6.4031242e-01   1.3304135e+00   1.7320508e-01   2.3515952e+00   1.1000000e+00   2.4228083e+00   1.6552945e+00   2.0663978e+00   3.2388269e+00   8.8317609e-01   2.7549955e+00   2.0149442e+00   2.9017236e+00   1.5362291e+00   1.4866069e+00   1.9646883e+00   1.0862780e+00   1.4387495e+00   1.7606817e+00   1.6852300e+00   3.5608988e+00   3.5651087e+00   1.0440307e+00   2.2781571e+00   9.9498744e-01   3.3406586e+00   1.1090537e+00   2.1118712e+00   2.5099801e+00   9.8994949e-01   1.0392305e+00   1.8027756e+00   2.3021729e+00   2.6870058e+00   3.4394767e+00   1.8493242e+00   1.1618950e+00   1.4933185e+00   3.0182777e+00   2.0371549e+00   1.6552945e+00   9.2736185e-01   1.9824228e+00   2.1307276e+00   1.9131126e+00   1.1000000e+00   2.3622024e+00   2.2934690e+00   1.8165902e+00   1.2369317e+00   1.5459625e+00   1.8138357e+00   1.1135529e+00   1.4142136e-01   5.2915026e-01   1.4352700e+00   2.4494897e-01   2.3194827e+00   1.1832160e+00   2.3790755e+00   1.6401219e+00   2.0493902e+00   3.1906112e+00   1.1090537e+00   2.7092434e+00   2.0420578e+00   2.8124722e+00   1.4594520e+00   1.5099669e+00   1.9261360e+00   1.2369317e+00   1.5165751e+00   1.7175564e+00   1.6401219e+00   3.4481879e+00   3.5580894e+00   1.2083046e+00   2.2226111e+00   1.0862780e+00   3.3060551e+00   1.1401754e+00   2.0371549e+00   2.4269322e+00   1.0049876e+00   1.0049876e+00   1.8165902e+00   2.2293497e+00   2.6514147e+00   3.3105891e+00   1.8681542e+00   1.1401754e+00   1.5231546e+00   2.9698485e+00   1.9798990e+00   1.5968719e+00   9.0000000e-01   1.9235384e+00   2.1000000e+00   1.8627936e+00   1.1832160e+00   2.3130067e+00   2.2427661e+00   1.7916473e+00   1.3190906e+00   1.5099669e+00   1.7492856e+00   1.1000000e+00   5.0990195e-01   1.4142136e+00   1.4142136e-01   2.2803509e+00   1.1045361e+00   2.3452079e+00   1.6031220e+00   2.0049938e+00   3.1654384e+00   1.0246951e+00   2.6870058e+00   1.9924859e+00   2.7910571e+00   1.4247807e+00   1.4491377e+00   1.8841444e+00   1.1357817e+00   1.4282857e+00   1.6703293e+00   1.6093477e+00   3.4452866e+00   3.5185224e+00   1.1224972e+00   2.1863211e+00   1.0000000e+00   3.2787193e+00   1.0677078e+00   2.0124612e+00   2.4145393e+00   9.3273791e-01   9.5393920e-01   1.7606817e+00   2.2158520e+00   2.6210685e+00   3.3136083e+00   1.8083141e+00   1.1045361e+00   1.4899664e+00   2.9359837e+00   1.9442222e+00   1.5716234e+00   8.4261498e-01   1.8867962e+00   2.0518285e+00   1.8138357e+00   1.1045361e+00   2.2781571e+00   2.2022716e+00   1.7349352e+00   1.2328828e+00   1.4628739e+00   1.7146428e+00   1.0535654e+00   1.7606817e+00   5.4772256e-01   2.1213203e+00   1.0954451e+00   2.0049938e+00   1.3964240e+00   1.7776389e+00   2.8106939e+00   1.4317821e+00   2.3366643e+00   1.7058722e+00   2.4839485e+00   1.1445523e+00   1.2000000e+00   1.5652476e+00   1.1789826e+00   1.4212670e+00   1.4594520e+00   1.3379088e+00   3.1032241e+00   3.1780497e+00   1.0295630e+00   1.8814888e+00   1.1045361e+00   2.9171904e+00   8.1240384e-01   1.7349352e+00   2.0566964e+00   7.1414284e-01   7.9372539e-01   1.5427249e+00   1.8303005e+00   2.2472205e+00   2.9325757e+00   1.5968719e+00   8.3666003e-01   1.3416408e+00   2.5495098e+00   1.7776389e+00   1.3304135e+00   7.4161985e-01   1.5427249e+00   1.7860571e+00   1.4730920e+00   1.0954451e+00   2.0024984e+00   1.9519221e+00   1.4387495e+00   1.0099505e+00   1.1832160e+00   1.5684387e+00   9.9498744e-01   1.3038405e+00   3.6110940e+00   2.3622024e+00   3.6959437e+00   2.9748950e+00   3.3555923e+00   4.5232732e+00   1.6278821e+00   4.0472213e+00   3.3000000e+00   4.1460825e+00   2.7694765e+00   2.7676705e+00   3.2233523e+00   2.2737634e+00   2.5845696e+00   2.9849623e+00   2.9916551e+00   4.8321838e+00   4.8394215e+00   2.2494444e+00   3.5298725e+00   2.1817424e+00   4.6206060e+00   2.3622024e+00   3.3896903e+00   3.7934153e+00   2.2427661e+00   2.3130067e+00   3.0886890e+00   3.5707142e+00   3.9534795e+00   4.6797436e+00   3.1224990e+00   2.4698178e+00   2.8035692e+00   4.2497059e+00   3.2710854e+00   2.9647934e+00   2.1886069e+00   3.2186954e+00   3.3719431e+00   3.0740852e+00   2.3622024e+00   3.6373067e+00   3.5284558e+00   3.0149627e+00   2.4657656e+00   2.8035692e+00   3.0364453e+00   2.4062419e+00   2.3790755e+00   1.1747340e+00   2.4248711e+00   1.6941074e+00   2.0928450e+00   3.2465366e+00   1.0246951e+00   2.7676705e+00   2.0566964e+00   2.8861739e+00   1.5132746e+00   1.5165751e+00   1.9621417e+00   1.1789826e+00   1.4899664e+00   1.7578396e+00   1.7000000e+00   3.5454196e+00   3.5888717e+00   1.1401754e+00   2.2715633e+00   1.0677078e+00   3.3541020e+00   1.1224972e+00   2.1095023e+00   2.5039968e+00   9.9498744e-01   1.0440307e+00   1.8384776e+00   2.2956481e+00   2.6925824e+00   3.4088121e+00   1.8841444e+00   1.1832160e+00   1.5684387e+00   3.0066593e+00   2.0445048e+00   1.6703293e+00   9.3273791e-01   1.9646883e+00   2.1330729e+00   1.8788294e+00   1.1747340e+00   2.3685439e+00   2.2912878e+00   1.8027756e+00   1.2727922e+00   1.5427249e+00   1.8165902e+00   1.1532563e+00   1.3341664e+00   9.4868330e-01   9.0000000e-01   5.0990195e-01   1.5165751e+00   2.3430749e+00   1.3190906e+00   1.1532563e+00   9.5393920e-01   1.0535654e+00   1.1045361e+00   8.6602540e-01   1.5000000e+00   1.1489125e+00   7.4161985e-01   9.3273791e-01   1.6703293e+00   1.8165902e+00   1.8165902e+00   7.0710678e-01   1.4832397e+00   1.7175564e+00   1.4352700e+00   6.4031242e-01   1.1445523e+00   1.4798649e+00   1.3527749e+00   7.6157731e-01   1.3228757e+00   1.3527749e+00   1.7944358e+00   7.1414284e-01   1.4352700e+00   1.3784049e+00   1.4491377e+00   4.2426407e-01   8.8881944e-01   1.4525839e+00   9.5916630e-01   6.0827625e-01   1.1180340e+00   1.3341664e+00   5.5677644e-01   5.0000000e-01   9.6436508e-01   1.4142136e+00   1.0099505e+00   6.4807407e-01   1.2449900e+00   1.5684387e+00   7.4161985e-01   1.0770330e+00   2.3706539e+00   1.1180340e+00   1.9339080e+00   1.1618950e+00   2.0322401e+00   8.6602540e-01   6.3245553e-01   1.1357817e+00   2.6457513e-01   5.0990195e-01   9.0000000e-01   8.6602540e-01   2.7331301e+00   2.6495283e+00   6.7823300e-01   1.4071247e+00   3.1622777e-01   2.4879711e+00   5.4772256e-01   1.2529964e+00   1.7406895e+00   5.1961524e-01   4.7958315e-01   8.1240384e-01   1.6217275e+00   1.8894444e+00   2.7055499e+00   8.4261498e-01   6.4807407e-01   7.7459667e-01   2.2045408e+00   1.1135529e+00   8.3066239e-01   4.7958315e-01   1.2247449e+00   1.2124356e+00   1.2369317e+00   0.0000000e+00   1.4317821e+00   1.3747727e+00   1.0344080e+00   5.4772256e-01   7.7459667e-01   9.4868330e-01   3.3166248e-01   9.1104336e-01   6.1644140e-01   8.6023253e-01   2.6851443e+00   5.4772256e-01   7.1414284e-01   7.5498344e-01   1.0246951e+00   9.8994949e-01   5.0000000e-01   1.7406895e+00   1.5684387e+00   9.6436508e-01   7.8102497e-01   1.2845233e+00   1.2489996e+00   1.7378147e+00   4.0000000e-01   1.8165902e+00   1.0246951e+00   1.3490738e+00   5.3851648e-01   3.8729833e-01   1.4662878e+00   1.4456832e+00   7.8740079e-01   5.1961524e-01   4.5825757e-01   1.2409674e+00   7.9372539e-01   1.2961481e+00   1.3190906e+00   6.6332496e-01   9.8994949e-01   8.6602540e-01   1.5842980e+00   5.4772256e-01   5.9160798e-01   8.5440037e-01   1.5684387e+00   4.1231056e-01   6.7082039e-01   8.3066239e-01   1.3190906e+00   9.2736185e-01   1.1224972e+00   1.4730920e+00   5.0000000e-01   1.6703293e+00   1.8275667e+00   1.2206556e+00   6.0000000e-01   1.4282857e+00   6.4807407e-01   3.8729833e-01   6.0000000e-01   9.5916630e-01   9.3273791e-01   6.6332496e-01   2.4494897e-01   2.0346990e+00   1.9974984e+00   1.0148892e+00   8.4261498e-01   1.0148892e+00   1.7944358e+00   7.2801099e-01   6.4807407e-01   1.0295630e+00   8.1240384e-01   7.3484692e-01   3.3166248e-01   9.4868330e-01   1.2165525e+00   2.0124612e+00   4.2426407e-01   5.9160798e-01   5.3851648e-01   1.5716234e+00   7.8102497e-01   2.4494897e-01   8.6023253e-01   7.2801099e-01   7.4833148e-01   9.4868330e-01   7.4161985e-01   8.2462113e-01   9.0553851e-01   7.6157731e-01   7.2801099e-01   5.0000000e-01   7.4161985e-01   6.4807407e-01   1.3638182e+00   2.1794495e+00   1.0295630e+00   6.7082039e-01   1.0148892e+00   7.5498344e-01   6.6332496e-01   4.3588989e-01   1.2529964e+00   1.0295630e+00   5.5677644e-01   5.0000000e-01   1.7000000e+00   1.6792856e+00   1.4212670e+00   4.6904158e-01   1.3038405e+00   1.5264338e+00   1.0488088e+00   3.8729833e-01   8.5440037e-01   1.1357817e+00   1.0630146e+00   3.1622777e-01   9.2195445e-01   1.0148892e+00   1.7320508e+00   3.0000000e-01   1.0295630e+00   1.0000000e+00   1.2409674e+00   5.2915026e-01   5.1961524e-01   1.1874342e+00   5.8309519e-01   3.6055513e-01   8.1853528e-01   1.0770330e+00   3.8729833e-01   4.7958315e-01   6.4031242e-01   1.0099505e+00   6.3245553e-01   6.4807407e-01   1.0049876e+00   3.4799425e+00   5.2915026e-01   1.3379088e+00   9.6436508e-01   1.8734994e+00   1.8055470e+00   1.3601471e+00   2.5357445e+00   2.3706539e+00   1.7916473e+00   1.5842980e+00   8.1853528e-01   5.4772256e-01   2.4738634e+00   1.1747340e+00   2.6343880e+00   2.6457513e-01   2.1817424e+00   1.3076697e+00   8.0622577e-01   2.3086793e+00   2.2869193e+00   1.5748016e+00   1.0246951e+00   6.0827625e-01   8.8317609e-01   1.5779734e+00   2.0832667e+00   1.9748418e+00   5.4772256e-01   1.7146428e+00   1.6583124e+00   2.4269322e+00   1.3928388e+00   1.3820275e+00   1.6703293e+00   2.3706539e+00   1.1000000e+00   1.3674794e+00   1.6763055e+00   2.1307276e+00   1.7832555e+00   1.8973666e+00   2.2869193e+00   3.0282008e+00   2.2226111e+00   3.1144823e+00   1.8708287e+00   1.7233688e+00   2.2405357e+00   9.8994949e-01   1.3228757e+00   1.9339080e+00   1.9544820e+00   3.8236109e+00   3.7376463e+00   1.2609520e+00   2.5079872e+00   9.1104336e-01   3.5860842e+00   1.4730920e+00   2.3409400e+00   2.8354894e+00   1.3711309e+00   1.3638182e+00   1.9261360e+00   2.6907248e+00   2.9899833e+00   3.7934153e+00   1.9493589e+00   1.5652476e+00   1.6583124e+00   3.3181320e+00   2.1142375e+00   1.9026298e+00   1.2489996e+00   2.3086793e+00   2.3021729e+00   2.2538855e+00   1.1180340e+00   2.5337719e+00   2.4413111e+00   2.0832667e+00   1.5000000e+00   1.8411953e+00   1.9157244e+00   1.2727922e+00   8.7749644e-01   1.0148892e+00   1.4866069e+00   1.3638182e+00   9.9498744e-01   2.1095023e+00   2.0149442e+00   1.4662878e+00   1.1357817e+00   1.1357817e+00   9.2736185e-01   1.9899749e+00   9.2736185e-01   2.2135944e+00   6.0827625e-01   1.7320508e+00   9.8488578e-01   4.3588989e-01   1.8627936e+00   1.8466185e+00   1.1832160e+00   5.5677644e-01   2.6457513e-01   1.1045361e+00   1.2124356e+00   1.5937377e+00   1.4764823e+00   6.7823300e-01   1.4491377e+00   1.2206556e+00   1.9874607e+00   1.0488088e+00   1.1180340e+00   1.3747727e+00   1.9339080e+00   8.6602540e-01   1.1704700e+00   1.3527749e+00   1.6911535e+00   1.3784049e+00   1.5874508e+00   1.8466185e+00   1.4282857e+00   1.0295630e+00   6.2449980e-01   6.6332496e-01   1.2961481e+00   1.3228757e+00   1.0392305e+00   6.1644140e-01   1.9131126e+00   1.5716234e+00   1.1445523e+00   8.8881944e-01   1.4662878e+00   1.3928388e+00   1.0049876e+00   8.6023253e-01   8.8317609e-01   1.1575837e+00   1.1916375e+00   5.5677644e-01   7.3484692e-01   8.2462113e-01   1.8788294e+00   6.1644140e-01   9.1104336e-01   7.5498344e-01   1.2609520e+00   1.1704700e+00   7.3484692e-01   1.3190906e+00   8.0622577e-01   8.7177979e-01   1.0677078e+00   1.1618950e+00   8.7177979e-01   1.0677078e+00   9.2736185e-01   9.0000000e-01   8.3066239e-01   1.2124356e+00   1.1747340e+00   1.3784049e+00   1.5652476e+00   1.0198039e+00   2.2181073e+00   1.9000000e+00   1.2165525e+00   1.3038405e+00   8.6023253e-01   1.3892444e+00   2.3685439e+00   6.7082039e-01   2.2113344e+00   1.2247449e+00   1.8841444e+00   8.1240384e-01   8.1240384e-01   1.9544820e+00   1.8708287e+00   1.3000000e+00   1.1224972e+00   1.0198039e+00   9.3273791e-01   1.2727922e+00   1.8574176e+00   1.9157244e+00   8.0622577e-01   1.0535654e+00   1.3190906e+00   1.9949937e+00   9.9498744e-01   8.7177979e-01   1.1747340e+00   2.0322401e+00   6.3245553e-01   7.0710678e-01   1.2083046e+00   1.8947295e+00   1.3820275e+00   1.2529964e+00   1.8814888e+00   5.5677644e-01   5.4772256e-01   1.0677078e+00   9.0000000e-01   3.7416574e-01   4.8989795e-01   2.0976177e+00   2.2649503e+00   1.2288206e+00   7.8102497e-01   1.0049876e+00   2.0396078e+00   6.0827625e-01   6.4807407e-01   1.1575837e+00   6.1644140e-01   5.2915026e-01   6.5574385e-01   1.0862780e+00   1.4071247e+00   2.0024984e+00   6.7823300e-01   6.7082039e-01   1.0630146e+00   1.6031220e+00   7.0000000e-01   4.6904158e-01   6.4807407e-01   5.1961524e-01   6.7823300e-01   5.0990195e-01   8.6602540e-01   9.0553851e-01   8.1240384e-01   4.2426407e-01   7.4161985e-01   2.2360680e-01   5.5677644e-01   6.6332496e-01   5.7445626e-01   7.9372539e-01   8.1240384e-01   6.4031242e-01   3.8729833e-01   2.2248595e+00   2.1023796e+00   8.1240384e-01   9.0553851e-01   9.0553851e-01   1.9157244e+00   4.2426407e-01   8.0622577e-01   1.1789826e+00   5.5677644e-01   5.9160798e-01   3.7416574e-01   1.0344080e+00   1.2845233e+00   2.1633308e+00   4.3588989e-01   4.6904158e-01   6.6332496e-01   1.6062378e+00   9.1651514e-01   4.5825757e-01   7.1414284e-01   6.7823300e-01   7.6811457e-01   7.8102497e-01   6.3245553e-01   9.6436508e-01   9.8488578e-01   5.9160798e-01   3.7416574e-01   3.4641016e-01   8.3666003e-01   6.2449980e-01   1.3114877e+00   1.1357817e+00   5.2915026e-01   4.2426407e-01   1.7029386e+00   1.7233688e+00   1.3747727e+00   3.6055513e-01   1.3601471e+00   1.5165751e+00   8.8881944e-01   3.7416574e-01   7.3484692e-01   9.8994949e-01   9.6953597e-01   4.5825757e-01   7.0710678e-01   8.9442719e-01   1.6340135e+00   4.6904158e-01   9.0000000e-01   1.0723805e+00   1.1000000e+00   7.1414284e-01   5.0990195e-01   1.1045361e+00   1.7320508e-01   3.4641016e-01   4.6904158e-01   1.1357817e+00   4.8989795e-01   5.4772256e-01   3.7416574e-01   8.8881944e-01   4.3588989e-01   7.5498344e-01   1.0295630e+00   5.1961524e-01   1.0770330e+00   1.0862780e+00   2.9359837e+00   2.7766887e+00   6.5574385e-01   1.5842980e+00   3.3166248e-01   2.6419690e+00   6.7082039e-01   1.4628739e+00   1.9442222e+00   6.4807407e-01   6.7823300e-01   9.7467943e-01   1.8165902e+00   2.0493902e+00   2.9137605e+00   9.8994949e-01   8.4261498e-01   9.4339811e-01   2.3558438e+00   1.3000000e+00   1.0677078e+00   6.4807407e-01   1.4035669e+00   1.3711309e+00   1.3784049e+00   2.6457513e-01   1.6124515e+00   1.5427249e+00   1.1747340e+00   6.0827625e-01   9.6436508e-01   1.1445523e+00   5.8309519e-01   7.5498344e-01   1.0246951e+00   2.6851443e+00   2.6267851e+00   1.1045361e+00   1.3190906e+00   4.8989795e-01   2.5159491e+00   8.1240384e-01   1.2288206e+00   1.8138357e+00   7.8102497e-01   7.2801099e-01   8.3666003e-01   1.7691806e+00   1.9519221e+00   2.6944387e+00   8.0622577e-01   1.0295630e+00   1.1747340e+00   2.1587033e+00   9.2736185e-01   9.8488578e-01   7.2801099e-01   1.2165525e+00   1.0723805e+00   1.1445523e+00   5.0990195e-01   1.3453624e+00   1.1958261e+00   9.3273791e-01   7.7459667e-01   8.3666003e-01   7.8740079e-01   6.4031242e-01   5.8309519e-01   2.0049938e+00   2.1470911e+00   1.3747727e+00   6.4031242e-01   1.0246951e+00   1.9748418e+00   8.1853528e-01   5.4772256e-01   1.1747340e+00   8.3666003e-01   7.3484692e-01   5.3851648e-01   1.1916375e+00   1.4000000e+00   1.9773720e+00   5.0990195e-01   9.2195445e-01   1.1618950e+00   1.5394804e+00   3.8729833e-01   5.4772256e-01   8.3666003e-01   5.5677644e-01   4.4721360e-01   5.4772256e-01   9.0000000e-01   7.2111026e-01   5.4772256e-01   3.7416574e-01   8.6602540e-01   3.8729833e-01   3.0000000e-01   7.6157731e-01   1.9183326e+00   1.9519221e+00   1.1090537e+00   7.0000000e-01   1.1180340e+00   1.7204651e+00   7.0000000e-01   5.0990195e-01   8.8317609e-01   7.8740079e-01   7.2111026e-01   3.8729833e-01   7.8740079e-01   1.1045361e+00   1.8574176e+00   4.6904158e-01   5.7445626e-01   7.0000000e-01   1.4317821e+00   7.5498344e-01   1.4142136e-01   8.6023253e-01   5.1961524e-01   6.4807407e-01   7.6157731e-01   8.6602540e-01   7.3484692e-01   8.1240384e-01   6.1644140e-01   7.4161985e-01   3.6055513e-01   7.1414284e-01   7.2111026e-01   1.2206556e+00   2.9715316e+00   1.4177447e+00   2.9478806e+00   1.0198039e+00   2.5632011e+00   1.5033296e+00   1.1224972e+00   2.6495283e+00   2.5690465e+00   1.9773720e+00   1.4352700e+00   1.2409674e+00   4.1231056e-01   1.9748418e+00   2.4515301e+00   2.4186773e+00   1.0049876e+00   1.8357560e+00   1.9442222e+00   2.7018512e+00   1.6822604e+00   1.6552945e+00   1.9235384e+00   2.7331301e+00   1.3490738e+00   1.5297059e+00   1.9748418e+00   2.5748786e+00   2.0904545e+00   2.0273135e+00   2.5690465e+00   2.7018512e+00   1.5620499e+00   2.9223278e+00   4.1231056e-01   2.4939928e+00   1.7233688e+00   1.2922848e+00   2.6362853e+00   2.6400758e+00   1.8601075e+00   1.4525839e+00   9.6436508e-01   1.3490738e+00   1.8520259e+00   2.4248711e+00   2.2494444e+00   8.9442719e-01   2.0736441e+00   2.0371549e+00   2.7766887e+00   1.7832555e+00   1.7175564e+00   2.0322401e+00   2.6495283e+00   1.4730920e+00   1.7233688e+00   2.0124612e+00   2.3958297e+00   2.1400935e+00   2.2671568e+00   2.6248809e+00   1.7146428e+00   8.8317609e-01   2.5278449e+00   6.6332496e-01   1.5968719e+00   1.8788294e+00   7.2801099e-01   8.6602540e-01   1.1135529e+00   1.6522712e+00   1.9209373e+00   2.8948230e+00   1.1704700e+00   6.7823300e-01   7.3484692e-01   2.3194827e+00   1.6431677e+00   1.1445523e+00   8.7749644e-01   1.4628739e+00   1.5716234e+00   1.5066519e+00   6.7823300e-01   1.7578396e+00   1.7860571e+00   1.3453624e+00   5.8309519e-01   1.0862780e+00   1.5099669e+00   8.6602540e-01   1.6062378e+00   1.3747727e+00   1.2247449e+00   3.0000000e-01   6.5574385e-01   1.3076697e+00   1.2529964e+00   6.7823300e-01   7.9372539e-01   8.5440037e-01   1.3928388e+00   6.5574385e-01   1.2328828e+00   1.3490738e+00   9.1651514e-01   6.4807407e-01   7.4161985e-01   1.3820275e+00   3.7416574e-01   2.6457513e-01   6.0827625e-01   1.4071247e+00   2.2360680e-01   3.0000000e-01   5.7445626e-01   1.2247449e+00   7.3484692e-01   7.8740079e-01   1.2845233e+00   2.7658633e+00   7.3484692e-01   1.4525839e+00   1.9924859e+00   6.4031242e-01   5.7445626e-01   1.0677078e+00   1.8894444e+00   2.1656408e+00   2.9223278e+00   1.0816654e+00   8.8317609e-01   1.0677078e+00   2.4454039e+00   1.2247449e+00   1.0630146e+00   5.0000000e-01   1.4282857e+00   1.3964240e+00   1.3820275e+00   3.1622777e-01   1.6401219e+00   1.5329710e+00   1.1958261e+00   7.7459667e-01   9.6953597e-01   1.0295630e+00   4.5825757e-01   2.2912878e+00   1.5033296e+00   9.6953597e-01   2.4289916e+00   2.4248711e+00   1.7058722e+00   1.1224972e+00   6.7823300e-01   1.0630146e+00   1.7146428e+00   2.1840330e+00   2.0420578e+00   7.0000000e-01   1.9209373e+00   1.8055470e+00   2.5651511e+00   1.5588457e+00   1.5684387e+00   1.8384776e+00   2.4879711e+00   1.3038405e+00   1.5811388e+00   1.8384776e+00   2.2248595e+00   1.9313208e+00   2.0952327e+00   2.4248711e+00   1.1180340e+00   1.5066519e+00   1.7320508e-01   3.6055513e-01   7.7459667e-01   1.3228757e+00   1.6340135e+00   2.4617067e+00   8.1853528e-01   3.7416574e-01   8.3666003e-01   1.9339080e+00   1.1575837e+00   7.2801099e-01   4.3588989e-01   9.2736185e-01   1.0816654e+00   9.0000000e-01   5.4772256e-01   1.3228757e+00   1.2845233e+00   7.6811457e-01   2.4494897e-01   5.0990195e-01   1.0000000e+00   5.3851648e-01   6.6332496e-01   1.1832160e+00   1.0862780e+00   5.9160798e-01   7.7459667e-01   9.6953597e-01   1.4798649e+00   6.0000000e-01   1.0630146e+00   1.1618950e+00   1.1357817e+00   5.1961524e-01   5.0990195e-01   1.2165525e+00   4.1231056e-01   3.7416574e-01   6.9282032e-01   1.2529964e+00   3.1622777e-01   4.0000000e-01   6.1644140e-01   1.1532563e+00   6.2449980e-01   6.2449980e-01   1.0862780e+00   1.6124515e+00   1.5684387e+00   1.0246951e+00   3.4641016e-01   4.6904158e-01   1.0246951e+00   1.0583005e+00   1.3674794e+00   1.3747727e+00   7.4161985e-01   1.1704700e+00   9.4868330e-01   1.7088007e+00   7.4161985e-01   8.8317609e-01   1.0770330e+00   1.7406895e+00   6.4807407e-01   9.1651514e-01   1.0862780e+00   1.5198684e+00   1.1000000e+00   1.2845233e+00   1.5937377e+00   2.4494897e-01   8.7749644e-01   1.4422205e+00   1.7720045e+00   2.5475478e+00   9.1651514e-01   4.3588989e-01   9.2195445e-01   2.0566964e+00   1.1704700e+00   7.8740079e-01   2.8284271e-01   1.0148892e+00   1.1575837e+00   9.5916630e-01   5.1961524e-01   1.4071247e+00   1.3416408e+00   8.3666003e-01   3.8729833e-01   5.7445626e-01   9.8488578e-01   4.6904158e-01   8.4261498e-01   1.4352700e+00   1.7832555e+00   2.4839485e+00   8.8317609e-01   4.5825757e-01   9.0000000e-01   2.0615528e+00   1.0246951e+00   6.7823300e-01   1.4142136e-01   9.9498744e-01   1.1045361e+00   9.6953597e-01   4.7958315e-01   1.3341664e+00   1.2569805e+00   8.3666003e-01   5.5677644e-01   5.3851648e-01   8.1853528e-01   2.8284271e-01   9.8488578e-01   1.1357817e+00   1.9748418e+00   1.0000000e-01   7.8740079e-01   7.8740079e-01   1.4212670e+00   6.7823300e-01   4.3588989e-01   9.6436508e-01   6.1644140e-01   5.1961524e-01   7.9372539e-01   8.1240384e-01   6.7082039e-01   7.1414284e-01   5.7445626e-01   7.0710678e-01   4.6904158e-01   6.9282032e-01   7.9372539e-01   5.0990195e-01   1.2845233e+00   1.0392305e+00   1.1618950e+00   1.2041595e+00   9.1104336e-01   1.2845233e+00   8.8317609e-01   1.5748016e+00   7.1414284e-01   9.6953597e-01   1.0392305e+00   1.6217275e+00   8.3666003e-01   1.0770330e+00   1.0488088e+00   1.3379088e+00   1.0049876e+00   1.3453624e+00   1.4899664e+00   1.1618950e+00   1.1575837e+00   1.5394804e+00   1.4933185e+00   5.3851648e-01   1.4387495e+00   1.2083046e+00   1.9235384e+00   9.3273791e-01   1.0392305e+00   1.2247449e+00   1.8894444e+00   8.4852814e-01   1.1224972e+00   1.2247449e+00   1.5842980e+00   1.2922848e+00   1.5652476e+00   1.8165902e+00   1.9824228e+00   2.3452079e+00   2.3832751e+00   9.2736185e-01   1.8761663e+00   1.8947295e+00   2.6172505e+00   1.5811388e+00   1.6522712e+00   1.8083141e+00   2.7055499e+00   1.3820275e+00   1.5588457e+00   1.9000000e+00   2.4939928e+00   2.0099751e+00   2.0346990e+00   2.5238859e+00   8.6602540e-01   8.7749644e-01   1.4106736e+00   6.4031242e-01   5.0990195e-01   1.0000000e+00   6.2449980e-01   4.6904158e-01   7.7459667e-01   8.4261498e-01   6.4807407e-01   6.6332496e-01   5.4772256e-01   7.4161985e-01   5.0000000e-01   6.7082039e-01   8.3666003e-01   5.8309519e-01   1.9078784e+00   1.1916375e+00   5.9160798e-01   5.5677644e-01   9.4868330e-01   1.1445523e+00   1.0440307e+00   6.4807407e-01   1.3000000e+00   1.3304135e+00   9.2195445e-01   5.0990195e-01   5.8309519e-01   1.0488088e+00   5.3851648e-01   1.9442222e+00   1.2961481e+00   7.1414284e-01   9.8488578e-01   1.1916375e+00   1.2688578e+00   1.3964240e+00   7.7459667e-01   1.3228757e+00   1.4387495e+00   1.2206556e+00   8.1240384e-01   9.1651514e-01   1.2247449e+00   7.8102497e-01   1.5427249e+00   1.5198684e+00   2.1977261e+00   1.0862780e+00   1.1269428e+00   1.2845233e+00   2.2045408e+00   9.4339811e-01   1.1357817e+00   1.3453624e+00   1.8920888e+00   1.5297059e+00   1.7029386e+00   2.1189620e+00   6.8556546e-01   1.1180340e+00   7.6157731e-01   5.0000000e-01   8.4261498e-01   1.1135529e+00   6.2449980e-01   4.3588989e-01   7.0000000e-01   1.1916375e+00   7.2111026e-01   2.4494897e-01   9.6436508e-01   8.1240384e-01   5.9160798e-01   6.7823300e-01   8.1240384e-01   8.3066239e-01   7.6157731e-01   8.1240384e-01   6.6332496e-01   7.9372539e-01   3.8729833e-01   6.2449980e-01   6.4807407e-01   1.1269428e+00   1.2247449e+00   1.0770330e+00   4.7958315e-01   1.4628739e+00   1.3711309e+00   9.4868330e-01   6.2449980e-01   6.7082039e-01   9.0000000e-01   3.1622777e-01   4.1231056e-01   3.6055513e-01   1.2247449e+00   5.5677644e-01   5.7445626e-01   3.6055513e-01   9.5916630e-01   4.6904158e-01   7.8740079e-01   1.0908712e+00   5.4772256e-01   1.2124356e+00   3.4641016e-01   2.4494897e-01   4.2426407e-01   1.0630146e+00   6.0827625e-01   6.2449980e-01   1.1224972e+00   1.2369317e+00   8.1240384e-01   6.9282032e-01   2.4494897e-01   9.4339811e-01   5.1961524e-01   8.1853528e-01   1.1224972e+00   1.4317821e+00   1.3747727e+00   1.0344080e+00   5.4772256e-01   7.7459667e-01   9.4868330e-01   3.3166248e-01   3.1622777e-01   7.3484692e-01   1.3076697e+00   8.4261498e-01   8.0622577e-01   1.3190906e+00   6.1644140e-01   1.2845233e+00   7.9372539e-01   6.2449980e-01   1.2569805e+00   7.8102497e-01   3.6055513e-01   6.7082039e-01   9.4868330e-01   5.8309519e-01   1.0677078e+00   6.5574385e-01   6.1644140e-01   6.4031242e-01   7.6811457e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..1b7552021bf9a0606c36628f9432e8f0afe8d765
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-euclidean-ml.txt
@@ -0,0 +1 @@
+   4.0515260e+00   4.2121458e+00   3.7357405e+00   4.2313317e+00   3.9136009e+00   4.3843298e+00   3.9811426e+00   4.3624182e+00   4.0642508e+00   4.2105933e+00   4.0747226e+00   3.9068586e+00   4.1637004e+00   4.4303203e+00   4.1841564e+00   4.1063279e+00   4.1862390e+00   4.0719925e+00   4.2227579e+00   4.3173531e+00   3.8811067e+00   3.7577567e+00   4.0623722e+00   3.9882453e+00   4.0432671e+00   3.9085109e+00   4.0283414e+00   4.0846110e+00   3.6459235e+00   3.9544001e+00   4.1134244e+00   4.1805752e+00   3.5121011e+00   4.2747789e+00   4.1048323e+00   3.9269426e+00   3.8932032e+00   3.8281172e+00   3.7288430e+00   4.0863477e+00   4.1527428e+00   4.1646409e+00   4.2027433e+00   3.8441594e+00   4.8419117e+00   4.2455384e+00   3.7622220e+00   4.3967923e+00   4.4663183e+00   4.0435853e+00   4.0421692e+00   4.3124625e+00   4.6499961e+00   4.5595743e+00   3.4230430e+00   4.2612266e+00   3.5676603e+00   4.0866580e+00   4.2307103e+00   3.8521940e+00   3.9951183e+00   3.1022409e+00   3.7290193e+00   4.1931517e+00   4.1127027e+00   3.6633651e+00   4.0235815e+00   3.9729858e+00   4.1980132e+00   4.1579993e+00   3.9948955e+00   3.9081966e+00   3.9031152e+00   3.5069036e+00   4.0015727e+00   3.6763496e+00   3.6614339e+00   3.6227109e+00   3.7357992e+00   4.0170026e+00   3.5216829e+00   3.9322227e+00   3.9094621e+00   4.0170286e+00   4.3264246e+00   4.3435483e+00   4.0788635e+00   4.4761765e+00   3.8468186e+00   4.1490333e+00   4.2800007e+00   4.2260191e+00   4.3031858e+00   4.1897413e+00   4.0530244e+00   3.5893641e+00   4.2186615e+00   3.7979503e+00   4.0915473e+00   4.1343073e+00   4.5063851e+00   3.6394889e+00   4.2508448e+00   3.7160826e+00   4.0105262e+00   4.1578269e+00   4.0290590e+00   3.6971819e+00   3.9414087e+00   4.2522313e+00   4.4091714e+00   4.1542292e+00   3.9594691e+00   4.0923600e+00   4.0855497e+00   3.8253075e+00   4.3034717e+00   4.0976731e+00   4.1316523e+00   4.0872717e+00   4.2643353e+00   3.8887280e+00   3.9411273e+00   3.8848001e+00   4.3481996e+00   3.8716733e+00   3.9084684e+00   3.7546361e+00   3.9354816e+00   3.8293694e+00   3.7568515e+00   3.7184961e+00   3.8404278e+00   4.2570811e+00   4.1423777e+00   4.0291411e+00   4.2094682e+00   3.6127418e+00   4.0459839e+00   3.7737985e+00   3.7647653e+00   3.9762006e+00   3.8999512e+00   3.8509090e+00   3.8975941e+00   3.8432839e+00   4.2109046e+00   4.1339124e+00   3.5898873e+00   4.0794519e+00   4.3504966e+00   3.8862612e+00   3.8332931e+00   4.2190310e+00   4.1366595e+00   3.7220268e+00   4.1250795e+00   3.3169452e+00   4.0757181e+00   3.6487114e+00   3.9513724e+00   4.0735549e+00   3.9137880e+00   3.9656942e+00   3.7724953e+00   4.0505153e+00   3.9062302e+00   4.5671852e+00   3.7542175e+00   4.3731708e+00   3.6733907e+00   4.4667545e+00   4.1004635e+00   4.0530038e+00   4.0346958e+00   4.2145752e+00   4.4298637e+00   4.2982360e+00   4.0878239e+00   4.4061563e+00   4.2115971e+00   3.8263277e+00   3.8603258e+00   3.8572375e+00   4.1051910e+00   4.3787786e+00   4.5309659e+00   4.0047055e+00   4.1308854e+00   3.6283561e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-hamming-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-hamming-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..bc4e1ddcb6e1e8699570ecc410e2cb0cfdba2507
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-hamming-ml.txt
@@ -0,0 +1 @@
+   4.6000000e-01   4.3000000e-01   4.3000000e-01   5.4000000e-01   4.1000000e-01   5.3000000e-01   4.3000000e-01   5.9000000e-01   4.8000000e-01   4.7000000e-01   4.6000000e-01   4.9000000e-01   4.5000000e-01   5.5000000e-01   5.3000000e-01   4.5000000e-01   4.8000000e-01   4.7000000e-01   4.8000000e-01   5.1000000e-01   4.9000000e-01   4.4000000e-01   4.9000000e-01   4.7000000e-01   4.9000000e-01   4.7000000e-01   5.2000000e-01   4.7000000e-01   4.2000000e-01   4.9000000e-01   4.7000000e-01   5.5000000e-01   3.9000000e-01   5.5000000e-01   4.6000000e-01   4.5000000e-01   4.0000000e-01   4.8000000e-01   4.5000000e-01   4.8000000e-01   4.8000000e-01   5.0000000e-01   4.8000000e-01   4.5000000e-01   6.4000000e-01   5.7000000e-01   4.6000000e-01   5.4000000e-01   5.6000000e-01   4.8000000e-01   4.8000000e-01   5.3000000e-01   5.4000000e-01   5.3000000e-01   4.5000000e-01   5.8000000e-01   4.2000000e-01   5.4000000e-01   6.0000000e-01   5.1000000e-01   4.6000000e-01   4.1000000e-01   4.4000000e-01   5.6000000e-01   5.4000000e-01   4.8000000e-01   4.8000000e-01   5.1000000e-01   5.2000000e-01   5.5000000e-01   4.5000000e-01   4.3000000e-01   4.7000000e-01   4.7000000e-01   5.6000000e-01   4.9000000e-01   4.8000000e-01   4.5000000e-01   4.9000000e-01   4.7000000e-01   4.5000000e-01   4.5000000e-01   5.6000000e-01   4.9000000e-01   5.8000000e-01   5.4000000e-01   4.6000000e-01   5.8000000e-01   5.3000000e-01   5.4000000e-01   5.5000000e-01   5.0000000e-01   5.2000000e-01   4.8000000e-01   5.0000000e-01   3.8000000e-01   5.3000000e-01   4.8000000e-01   5.1000000e-01   4.8000000e-01   5.2000000e-01   4.7000000e-01   5.0000000e-01   4.3000000e-01   4.8000000e-01   5.2000000e-01   5.0000000e-01   4.2000000e-01   4.2000000e-01   4.7000000e-01   5.4000000e-01   5.1000000e-01   5.4000000e-01   5.1000000e-01   4.8000000e-01   4.7000000e-01   5.2000000e-01   5.2000000e-01   5.4000000e-01   5.4000000e-01   5.0000000e-01   4.5000000e-01   4.4000000e-01   4.1000000e-01   5.7000000e-01   4.6000000e-01   5.1000000e-01   5.2000000e-01   5.0000000e-01   4.8000000e-01   5.0000000e-01   4.4000000e-01   5.3000000e-01   5.2000000e-01   4.9000000e-01   5.7000000e-01   5.8000000e-01   4.9000000e-01   5.1000000e-01   4.5000000e-01   5.3000000e-01   4.5000000e-01   4.4000000e-01   3.5000000e-01   4.2000000e-01   5.3000000e-01   5.2000000e-01   5.0000000e-01   3.8000000e-01   5.2000000e-01   5.6000000e-01   4.7000000e-01   4.4000000e-01   5.1000000e-01   5.7000000e-01   4.5000000e-01   5.7000000e-01   4.3000000e-01   5.1000000e-01   3.8000000e-01   5.3000000e-01   4.8000000e-01   4.4000000e-01   5.0000000e-01   4.8000000e-01   5.0000000e-01   4.7000000e-01   6.4000000e-01   4.9000000e-01   5.2000000e-01   4.8000000e-01   5.6000000e-01   4.3000000e-01   4.8000000e-01   4.7000000e-01   6.0000000e-01   5.4000000e-01   5.5000000e-01   4.0000000e-01   5.5000000e-01   5.6000000e-01   4.9000000e-01   5.0000000e-01   4.3000000e-01   5.7000000e-01   5.0000000e-01   5.7000000e-01   4.9000000e-01   4.2000000e-01   3.9000000e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jaccard-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jaccard-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a7570d8c3fbdf63bb2240c964941d9e48bc2ad3c
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jaccard-ml.txt
@@ -0,0 +1 @@
+   6.5714286e-01   6.0563380e-01   6.3235294e-01   7.3972603e-01   6.0294118e-01   7.3611111e-01   6.4179104e-01   7.7631579e-01   6.4000000e-01   6.6197183e-01   6.6666667e-01   7.0000000e-01   6.4285714e-01   7.7464789e-01   7.1621622e-01   6.4285714e-01   6.8571429e-01   6.4383562e-01   6.6666667e-01   6.5384615e-01   6.6216216e-01   6.1971831e-01   6.5333333e-01   6.5277778e-01   6.7123288e-01   6.4383562e-01   6.5000000e-01   6.3513514e-01   6.0000000e-01   6.7123288e-01   6.3513514e-01   7.4324324e-01   5.5714286e-01   7.0512821e-01   6.3888889e-01   6.0000000e-01   5.6338028e-01   6.3157895e-01   6.0810811e-01   6.2337662e-01   6.4000000e-01   6.5789474e-01   6.3157895e-01   5.6962025e-01   7.5294118e-01   7.1250000e-01   6.2162162e-01   6.7500000e-01   7.2727273e-01   6.2337662e-01   6.2337662e-01   6.7948718e-01   6.5853659e-01   6.6250000e-01   6.3380282e-01   7.3417722e-01   6.0869565e-01   7.2000000e-01   7.5949367e-01   6.4556962e-01   6.3013699e-01   5.9420290e-01   6.2857143e-01   7.1794872e-01   7.3972603e-01   6.4864865e-01   6.4864865e-01   6.8918919e-01   6.6666667e-01   7.0512821e-01   6.2500000e-01   6.2318841e-01   6.6197183e-01   6.5277778e-01   6.9135802e-01   6.6216216e-01   6.6666667e-01   6.4285714e-01   6.6216216e-01   6.8115942e-01   6.2500000e-01   6.2500000e-01   7.3684211e-01   6.4473684e-01   7.3417722e-01   7.1052632e-01   6.3888889e-01   7.3417722e-01   6.5432099e-01   6.9230769e-01   7.1428571e-01   6.7567568e-01   6.7532468e-01   6.7605634e-01   6.5789474e-01   5.4285714e-01   6.9736842e-01   6.2337662e-01   6.6233766e-01   6.7605634e-01   7.0270270e-01   6.1842105e-01   6.7567568e-01   6.2318841e-01   6.7605634e-01   6.9333333e-01   7.1428571e-01   6.0000000e-01   6.0000000e-01   6.6197183e-01   6.9230769e-01   6.8000000e-01   7.2000000e-01   6.5384615e-01   6.5753425e-01   6.6197183e-01   7.1232877e-01   6.9333333e-01   7.5000000e-01   7.1052632e-01   6.7567568e-01   6.4285714e-01   6.0273973e-01   5.8571429e-01   6.9512195e-01   6.3013699e-01   6.8918919e-01   7.0270270e-01   6.6666667e-01   6.8571429e-01   6.6666667e-01   6.1111111e-01   7.0666667e-01   6.6666667e-01   6.5333333e-01   6.8674699e-01   7.0731707e-01   6.3636364e-01   6.3750000e-01   6.1643836e-01   6.5432099e-01   5.8441558e-01   5.8666667e-01   4.7297297e-01   5.5263158e-01   6.9736842e-01   6.9333333e-01   6.5789474e-01   5.7575758e-01   6.7532468e-01   7.0886076e-01   6.4383562e-01   5.8666667e-01   6.6233766e-01   7.5000000e-01   6.2500000e-01   7.7027027e-01   6.0563380e-01   6.8000000e-01   5.6716418e-01   6.7948718e-01   6.4864865e-01   6.1971831e-01   7.1428571e-01   6.5753425e-01   6.7567568e-01   6.6197183e-01   7.7108434e-01   6.6216216e-01   7.1232877e-01   6.4000000e-01   7.0886076e-01   6.0563380e-01   6.2337662e-01   6.2666667e-01   7.7922078e-01   7.2972973e-01   7.5342466e-01   5.7971014e-01   7.3333333e-01   7.0886076e-01   6.6216216e-01   6.4102564e-01   5.8904110e-01   7.3076923e-01   6.4102564e-01   7.1250000e-01   6.4473684e-01   5.9154930e-01   5.3424658e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..da698cf511e6983e1db1bbed6e2974f3480a6903
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml-iris.txt
@@ -0,0 +1 @@
+0.0211635609063 0.00455072769716 0.0230610904531 0.0076674324982 0.037571216894 0.029561354778 0.0115281186735 0.0225809070507 0.0346801442638 0.00321049176948 0.0232839774828 0.0321124517082 0.0244179197971 0.0331466156799 0.0373949302575 0.0411984503375 0.0218945865519 0.0198268474453 0.02395616278 0.0254898420418 0.0394901943037 0.0396613298853 0.0621120626322 0.0458316817045 0.0334832834948 0.0445794256135 0.00775602650151 0.00770188279153 0.0277044809709 0.0292851269343 0.0408206135002 0.0384837880405 0.0229145225178 0.0346801442638 0.017155900548 0.0186865079856 0.0346801442638 0.011778601551 0.0109570078484 0.0244803928224 0.0609237090857 0.0125274661674 0.0713079215249 0.05072181848 0.0329702193648 0.018118079192 0.0129441131729 0.00461235131171 0.0077204189151 0.190781073622 0.196235539354 0.202381067744 0.215567934651 0.208951210729 0.208395222197 0.202977772245 0.185995150024 0.197488445796 0.207754344906 0.207231776416 0.200895721783 0.202370257926 0.208839694602 0.184151316466 0.18979501874 0.211864590783 0.187854399445 0.231134943838 0.195836809821 0.220082308081 0.191451897661 0.227329222402 0.204586412278 0.192443163994 0.193684928543 0.206841791869 0.21612354251 0.209268704489 0.175345617131 0.197941218478 0.190625337098 0.191065854858 0.2317867516 0.214902945463 0.200203629275 0.200116177839 0.216845735492 0.194043462589 0.208271280018 0.210985756639 0.203659220099 0.197020978632 0.188475437149 0.205376756706 0.190989482965 0.1980172695 0.194499957306 0.176357663314 0.198492265793 0.255232551639 0.244270007892 0.240469208946 0.23837051036 0.248414598574 0.246817944636 0.244919131711 0.239985639856 0.249741998486 0.238825041235 0.224881988223 0.240479022193 0.236919216915 0.253134884385 0.257281336145 0.239143010746 0.231252341207 0.230464321684 0.26688757037 0.243702807017 0.239741931201 0.243722504108 0.250777226737 0.230838149152 0.233779458319 0.227365052742 0.226996712309 0.224529623997 0.248876761269 0.223504306637 0.241222705588 0.218359591571 0.251783757155 0.22178058433 0.237922879169 0.243259140467 0.243757719218 0.229784431814 0.223834512884 0.231417699032 0.245855002542 0.23260880661 0.244270007892 0.24412721812 0.245364556958 0.239069534798 0.242476824971 0.231950344971 0.238821966724 0.23119389821 0.0191037071088 0.0192689125135 0.0279599225292 0.0400056720024 0.0369973592153 0.0168401225107 0.0156647141811 0.0317569365649 0.0209196472407 0.0261095572505 0.0295911292198 0.0387034711929 0.047943015361 0.0502801086558 0.0505076233319 0.0276985510653 0.0178344200842 0.0354647529806 0.0132311775272 0.0439058315568 0.0587698655317 0.0548749800113 0.0420211683289 0.0158475875817 0.0410205075223 0.0159821398213 0.0151652303532 0.0238719428054 0.0190485214781 0.0351129659726 0.0545720530766 0.0439213935019 0.0317569365649 0.0241815879409 0.0259117209292 0.0317569365649 0.0173211662353 0.0138864344566 0.0338981856531 0.0429537854169 0.027658485714 0.0691172321094 0.0500059403041 0.0236011037029 0.0316644090037 0.0201837094834 0.0228863104939 0.0134861623597 0.176517909274 0.183281450302 0.188265462996 0.20119658342 0.194697326208 0.195209942657 0.190674274015 0.172425697578 0.182894065786 0.195529592383 0.192026007893 0.188346396823 0.186051479032 0.19538200246 0.171605310091 0.175766658214 0.199864266754 0.173408334646 0.215875435175 0.181358449055 0.208526316653 0.177419239992 0.212710197663 0.190468934035 0.178153770213 0.179556589614 0.19192211318 0.202468559318 0.196181327665 0.160572766746 0.183327527516 0.175701303909 0.177066663037 0.218355819513 0.203310616701 0.188843124957 0.186323930321 0.201194011774 0.18173319992 0.194510318604 0.197386404553 0.190483994401 0.182718294182 0.174255518011 0.19205782762 0.178239088983 0.18513760318 0.180597338326 0.163063102971 0.185284857996 0.243887274146 0.231624187925 0.22689829944 0.225289762668 0.235796354542 0.23269059518 0.23306609907 0.225602345189 0.235244584021 0.226892475392 0.212543999067 0.226908361887 0.223757309255 0.240296170501 0.245569279789 0.227339668618 0.2180947426 0.217889650333 0.252259964829 0.228879839341 0.227150610245 0.231836962279 0.236076260811 0.217244760533 0.221438124324 0.213671912157 0.213819376581 0.212040793299 0.235827974309 0.209053467969 0.226615210725 0.205271111175 0.238869689413 0.207939309627 0.223898822147 0.229226063436 0.232630777303 0.217026651272 0.211532427176 0.218347693285 0.233460132247 0.219891922362 0.231624187925 0.231652249658 0.233525349836 0.226377769419 0.228579062405 0.219098380821 0.227789794229 0.219023772057 0.0212386043587 0.00993825296406 0.0336976816686 0.0262325070397 0.0107568964379 0.0200399473123 0.0369530877134 0.00706121377315 0.0225180018442 0.0345620434634 0.0288649599558 0.0352792061476 0.0352526366714 0.0385518621347 0.0178346265809 0.0156087458393 0.0212893461987 0.0244762891905 0.0356848493955 0.0412118431681 0.0577499958146 0.0449060313177 0.0316682156452 0.0402876009485 0.00791017688182 0.00777689270989 0.0262859463939 0.0275691765497 0.0363841779992 0.0426229028778 0.0258430808451 0.0369530877134 0.0171494695134 0.0197038085728 0.0369530877134 0.00856221073911 0.010146504576 0.0213442662268 0.0572142712511 0.0116574543859 0.0671597340405 0.047388301579 0.0285557929122 0.0192111185981 0.0112749020632 0.00781127840012 0.00637566729419 0.187210918471 0.192623672543 0.198833727144 0.212008654042 0.205367416257 0.204958566039 0.199402528264 0.182409867249 0.193987091024 0.204155295526 0.20374075502 0.197257634781 0.198980554413 0.205364330922 0.180426094029 0.186163209648 0.208359044162 0.184479344493 0.227592539467 0.192334488284 0.216529219774 0.187806950452 0.223855994439 0.201226354807 0.188864300604 0.190066520684 0.203335651256 0.212548662023 0.205705049083 0.171742464799 0.194417377469 0.187136601809 0.187472552212 0.228344421279 0.211429948522 0.196622478767 0.196530972542 0.21335054643 0.190497911091 0.204702393397 0.207598118603 0.200155023454 0.193467129006 0.184880183147 0.201857382862 0.187517863683 0.194486736804 0.1909406597 0.172553592377 0.194927231832 0.251743344729 0.240762357546 0.236947962879 0.234942968898 0.244909063494 0.243388177909 0.24143957892 0.236617606758 0.24633077256 0.235257992461 0.221275459366 0.23695229759 0.23334624948 0.249598367646 0.253700089415 0.235542233543 0.227782636512 0.227013807453 0.263469639225 0.240293112196 0.236160757703 0.240179126335 0.247395319298 0.227257451928 0.23025606552 0.223937789122 0.223399862869 0.220967129276 0.245363860699 0.220116506797 0.237779687596 0.214888164759 0.248252329967 0.218347705592 0.234681014401 0.239690494574 0.240217402996 0.22632629355 0.220260809644 0.227813787503 0.242262375922 0.228918020841 0.240762357546 0.240592325032 0.241778783496 0.235418026861 0.23890352284 0.228365058816 0.235271978928 0.227703766766 0.0251699105319 0.0326109277538 0.029278801732 0.0117605763436 0.00495713045566 0.032971458625 0.022273270218 0.00845866705418 0.0338325850006 0.0418060793613 0.0560571569439 0.0475989809058 0.0526432986362 0.0287512950603 0.0156470261333 0.0286833299321 0.0125318521449 0.039628171731 0.0605879245284 0.051592881751 0.0247889558 0.0185457610439 0.0360813596602 0.0162897964903 0.0233731835598 0.00555113851114 0.00851608036789 0.039350861172 0.0494281040416 0.0428445793936 0.032971458625 0.0361084743768 0.0382083791018 0.032971458625 0.0135564720949 0.0133460812565 0.0359059029584 0.0525998249753 0.020448013216 0.0653401649712 0.0366222774812 0.0276779812669 0.0199994530533 0.0115734561992 0.0214333278479 0.0186461579961 0.171344593808 0.177166238774 0.182950771401 0.19643196185 0.18986301898 0.188443393542 0.18388535541 0.166562175459 0.177783941311 0.188923487579 0.187724110496 0.182156573883 0.18272910062 0.189078094755 0.165787292858 0.170722554665 0.192539814536 0.167433166664 0.21234151671 0.17610118578 0.201339136255 0.172496446246 0.207869320447 0.184234771078 0.173084677744 0.174586008872 0.187343267555 0.197067369338 0.190065322687 0.155992913972 0.178370192697 0.170834599332 0.171756811444 0.21215391799 0.195543956872 0.181382419503 0.180878423055 0.197648250997 0.174630568935 0.189049602981 0.190809942592 0.184007315234 0.177572802284 0.169158986096 0.1858235382 0.171054750208 0.178472858167 0.175024341592 0.15843173338 0.179125844986 0.236753289776 0.225336913605 0.221457751336 0.21877528886 0.229546376269 0.227338714151 0.226000082599 0.220106179064 0.230241030133 0.220420771483 0.206398010187 0.221506177578 0.218254053746 0.234550382603 0.23950257292 0.221077875617 0.211789394262 0.210958467875 0.247726054061 0.224160699687 0.221293898641 0.225242596712 0.231164838975 0.212084684776 0.21483758197 0.207582855086 0.208324546741 0.205668770285 0.22999948579 0.203519866038 0.221791807814 0.198729512666 0.233119883684 0.201955632148 0.21744774227 0.224658382044 0.22554531899 0.210282327898 0.205086194314 0.212901784527 0.227685054369 0.214992030153 0.225336913605 0.225426421062 0.227294020009 0.22122180599 0.223891772502 0.213328572484 0.220627825622 0.212027719306 0.036692370716 0.0274221847228 0.014614486903 0.0257905543192 0.038185072385 0.00854173398239 0.0228846598272 0.0362880440778 0.0247966202157 0.0338575762449 0.0341810302892 0.0403839419732 0.023192138006 0.0228332335778 0.0207802721216 0.030246984472 0.0385095591836 0.036116458124 0.063670015249 0.0456331337141 0.0387265099713 0.0454622939774 0.0128829753328 0.0153687384621 0.0290580106985 0.032571197138 0.0439484983687 0.0345946330706 0.0178789804494 0.038185072385 0.0229066226947 0.0243703411158 0.038185072385 0.0145921399018 0.0157758022112 0.0246899780508 0.0667942861058 0.00859371091119 0.0713780561444 0.0493343894065 0.0370078971529 0.0136450272229 0.0138896306008 0.00617904291603 0.0146027872105 0.19304474601 0.19797909852 0.204564547012 0.217893788171 0.211240589753 0.210085035577 0.204424468033 0.187966151726 0.199846283114 0.209201380502 0.209876418912 0.202509063074 0.205495616388 0.210676243708 0.185852822947 0.192014733821 0.213129345848 0.190059083655 0.233894763867 0.198141527364 0.221234996275 0.193689434624 0.229701750232 0.206631480423 0.194727732257 0.195938025333 0.209362001884 0.218147207364 0.211029564766 0.177869147322 0.200327033561 0.193124484677 0.193233901741 0.233604044389 0.215980508747 0.201289146742 0.20219168761 0.219726845187 0.195458087393 0.2103246028 0.212820091698 0.205396680761 0.199290845186 0.190742394929 0.207189399227 0.192521418757 0.199651552643 0.196594932336 0.178468769167 0.200295584792 0.256297768876 0.245841451519 0.242438509968 0.240033073248 0.249980802879 0.248953385462 0.246144223104 0.242178797272 0.252036489845 0.240176361939 0.226412773569 0.242454491215 0.238768549206 0.254841315698 0.258625650226 0.240494667361 0.232976534038 0.231927166971 0.269283834821 0.246140263748 0.241374087503 0.245035624054 0.253144665918 0.232868387014 0.235226383286 0.229279397026 0.228861516729 0.226064745168 0.250630665997 0.225726655668 0.243583203961 0.220042394187 0.253511231548 0.2237596548 0.239872842457 0.245497904196 0.24478307529 0.231328796826 0.225307213023 0.233256809435 0.247442229489 0.234444929147 0.245841451519 0.245661961251 0.246724980668 0.240848644418 0.244659004118 0.233675626419 0.239814102397 0.232532592403 0.010524058973 0.0347497758249 0.0310026365608 0.0636683508445 0.039628310023 0.0339732471818 0.0632599742009 0.0607622080336 0.0610552648732 0.0274939888458 0.0321794296029 0.0203038890155 0.0225566538528 0.0181521200419 0.0426282898435 0.00971744861179 0.0573638408809 0.0304112802741 0.0463628234513 0.044509344874 0.0125060810098 0.0372012029006 0.0399195029174 0.0351572922113 0.0381714857339 0.0236066809352 0.0675880085279 0.0489234884353 0.0636683508445 0.0451372647506 0.0495218266562 0.0636683508445 0.028718795999 0.0363358460459 0.0247409309981 0.0536494939568 0.0291783067693 0.0362475310016 0.0206193569389 0.0238060051702 0.0365127412376 0.0303247636874 0.0382706081182 0.036679138207 0.165252454208 0.168745392776 0.176697416201 0.190075579294 0.183193768644 0.182210296577 0.174895117306 0.159516185843 0.172780618769 0.179424300801 0.183362052205 0.17275366841 0.180884475296 0.18272692365 0.155645508044 0.163596126812 0.183814684533 0.163944686708 0.206939183794 0.170981324059 0.191238016882 0.165171506195 0.202635613449 0.180157192696 0.16688029242 0.167662828735 0.182473473654 0.189606814944 0.182144568907 0.150494922446 0.17311022882 0.166528964674 0.165043072843 0.205731384902 0.18659197245 0.17105591364 0.173799739615 0.193545885155 0.166211621507 0.181959703917 0.185636136233 0.177047042786 0.171588556623 0.162758165885 0.178831153511 0.164197394115 0.170920859204 0.168528635782 0.148460744764 0.171573948268 0.226522867074 0.216861787556 0.214094925757 0.211961277469 0.220987866614 0.22168305754 0.216782699249 0.215609692292 0.225208444508 0.210312198283 0.19661028383 0.214074476024 0.209773195915 0.225810880474 0.228551359916 0.210341321513 0.204691741777 0.203336697222 0.242485382573 0.21963599647 0.211892193047 0.215282949931 0.226705435666 0.20418234927 0.205942096193 0.201754356567 0.199749686219 0.196656401255 0.221913123953 0.199165134473 0.216656797893 0.191759529503 0.224569670715 0.196349964299 0.213992874847 0.217230566883 0.214548114667 0.2028246956 0.195690210734 0.20400781198 0.217750478797 0.204445613083 0.216861787556 0.216379424168 0.21668692278 0.211041069144 0.216249554038 0.204373397921 0.209459569208 0.203359671893 0.0284940982012 0.0283835072119 0.0582564069663 0.0317209110303 0.0290062929149 0.0575581968066 0.0518675712793 0.0525497818792 0.0214648817816 0.0289820919427 0.0151981567712 0.0194868108708 0.00772151270155 0.0396885548083 0.0133170749495 0.0480498930165 0.0406834920646 0.0454173876936 0.04374952779 0.0223043370554 0.0304932603619 0.0333669476098 0.0323541790178 0.036462611527 0.0283937271683 0.0581656862224 0.0386849486073 0.0582564069663 0.0386824403573 0.0427767064205 0.0582564069663 0.0225670168648 0.0303996112373 0.0186317385432 0.0589532282724 0.020129496567 0.0456219811369 0.0271705146906 0.0266114081755 0.0281840659315 0.0237276312035 0.0300017258072 0.0304084467621 0.174689674341 0.17830904459 0.186122916272 0.199541551099 0.192698821274 0.191439303409 0.184399484383 0.168993025372 0.182083678728 0.188980455315 0.192641208359 0.182376656778 0.189869605957 0.192034662906 0.165406381187 0.173160863593 0.193190156667 0.172952807322 0.216356837462 0.18028635421 0.200707489616 0.174765006311 0.211946253402 0.189197004074 0.176338357547 0.17720731475 0.191796191467 0.199121585044 0.191634817003 0.159923924784 0.182459504488 0.175769947329 0.174536678956 0.215011640541 0.195898920801 0.180555890973 0.183304141459 0.202828623711 0.175640593326 0.191448592698 0.194762075203 0.186406863824 0.181008054094 0.172240816201 0.188223844291 0.17346231425 0.180325575914 0.177965844821 0.158332658267 0.181046361448 0.235882031296 0.226280867303 0.2235366831 0.221221709251 0.230404936567 0.23094802366 0.226136073658 0.224736021115 0.234431734165 0.219824894986 0.20619515856 0.223526372128 0.219308937798 0.235287233784 0.23807753807 0.219908336162 0.214027462834 0.212631745032 0.251732773763 0.228838671706 0.221440978506 0.224753704594 0.235866097652 0.213724598783 0.215380278296 0.210994508636 0.209321687173 0.206162323946 0.231346876087 0.208300913946 0.225928825898 0.201080283138 0.234037288778 0.20558958438 0.222856381147 0.226751911512 0.223989137906 0.212135251626 0.205214537461 0.213595258296 0.2273163389 0.21417146415 0.226280867303 0.225846388312 0.226229092302 0.220705781832 0.225781259333 0.213928177909 0.218913775078 0.212729498479 0.0122225873329 0.0303322491715 0.0105162282326 0.0130161869455 0.0294681125528 0.031169289575 0.0445674903412 0.0424428041907 0.0471592401326 0.0242919299586 0.0151911030837 0.0250458377851 0.0159588466859 0.0393890228389 0.0501712969027 0.0573610210315 0.0347635318983 0.0244162409612 0.040396894165 0.00489128055225 0.0130158047868 0.0162739668734 0.0181749821427 0.0399100872217 0.0416234365466 0.032217222914 0.0303322491715 0.0260818708259 0.0277812891175 0.0303322491715 0.0068887146948 0.00350057866506 0.0298024545939 0.056647752597 0.0131029257559 0.0689399130874 0.0438694576111 0.0295733202179 0.0148293487362 0.005187559828 0.00994170320116 0.00857601759458 0.181761248694 0.187453410696 0.193365623784 0.206702523841 0.20011934013 0.199105672278 0.194191029325 0.176999836949 0.188302627791 0.199111466491 0.198126208998 0.192301121465 0.193121251528 0.199652739338 0.175765384319 0.180985589904 0.202947496477 0.178262931918 0.22241465847 0.18663850283 0.211489015658 0.182706386145 0.218266373994 0.195039865626 0.18346554188 0.184856636434 0.197755074291 0.207324505424 0.200404409787 0.166355990223 0.188830148216 0.181378679541 0.182125858248 0.222660838403 0.205968099039 0.191576935017 0.19121911341 0.207887116649 0.185081160877 0.199380829938 0.201554837448 0.194543615891 0.187991163757 0.179524780118 0.19631300534 0.181726234556 0.188970696545 0.185468734774 0.168191837054 0.18953883133 0.246767069406 0.235545780286 0.231684267956 0.229269594484 0.239724337717 0.237749571543 0.236212316891 0.230682790909 0.240645700931 0.230405224861 0.216420479968 0.231715542723 0.228337424754 0.244594612682 0.249193956399 0.230909382279 0.222229420235 0.221427946934 0.257965809127 0.234573740528 0.231288571496 0.235259005866 0.241607850531 0.22220070955 0.225060949621 0.218149643482 0.218415896436 0.21585883122 0.24017332069 0.214149237729 0.232167950695 0.20925074028 0.243199182069 0.21253980165 0.228281003551 0.23468620257 0.235446691383 0.22074773222 0.215228869367 0.222922571895 0.237553097068 0.224606387466 0.235545780286 0.235534393045 0.23712429287 0.230940484692 0.233917063813 0.223401305554 0.230524046304 0.222353817706 0.0346270873711 0.0222428303765 0.0130402644662 0.0348466257078 0.042829178942 0.0549568638218 0.0464424131108 0.050271964255 0.0260503884653 0.0122224116333 0.0282180922789 0.011864843965 0.0376053109772 0.060340947297 0.0487164281844 0.0285013587126 0.0163929694658 0.0334500762426 0.015996373074 0.0216948948211 0.00981357617646 0.00897169179454 0.0351677992971 0.0524329239391 0.0436506734112 0.0346270873711 0.0336931600411 0.03612022228 0.0346270873711 0.0123155461924 0.0128144174355 0.033561339537 0.0480641708164 0.0212422700005 0.0628734973132 0.0366806543871 0.0231396795589 0.0230741684915 0.0123098386274 0.0219470818919 0.0170687771133 0.170097980345 0.176050748737 0.181762587161 0.195138740624 0.188553715994 0.187634353283 0.182931238354 0.165421712546 0.176600578903 0.187912731345 0.186408453678 0.181027641681 0.181322068987 0.188146844457 0.16448627936 0.169388121003 0.191757508168 0.166524283083 0.21084441712 0.17494262847 0.200480456222 0.171127562134 0.206682857942 0.183402734812 0.171811556423 0.173255302855 0.186064001811 0.195873759085 0.189008503285 0.154586199139 0.177136590503 0.16961214015 0.170511848112 0.211247624618 0.194873193684 0.18053463387 0.179673493778 0.196193226513 0.173758955601 0.187869379999 0.19001738823 0.183074417621 0.176342969787 0.167870586049 0.184832516957 0.170273119593 0.177542554096 0.173865162824 0.156824879402 0.178069468543 0.235952767235 0.224377142544 0.220334312937 0.217941307072 0.228582134377 0.226295522057 0.225204079848 0.219149120214 0.229153457047 0.219423743811 0.20530168342 0.220370010221 0.217084867796 0.233463162138 0.238411309618 0.220004052761 0.210872881275 0.210171938201 0.24654768975 0.223020715486 0.220176358035 0.224293060856 0.230089603615 0.210845620347 0.213914309618 0.206670271948 0.207126565579 0.204661896322 0.228953899388 0.202543633745 0.220637247329 0.197849243585 0.232039444595 0.201016080923 0.216786754649 0.223327252818 0.224678101179 0.209454984614 0.204079198003 0.211687536154 0.226538202286 0.213579234366 0.224377142544 0.224425108032 0.226231350025 0.219899730556 0.222577135927 0.212192019374 0.21976273048 0.211209202307 0.0316629149872 0.033505533415 0.00599304401229 0.03147088677 0.0569379974042 0.0709823822809 0.0748230813085 0.0531369685873 0.043263968218 0.0546416139704 0.0249055105449 0.0688386171987 0.0687094353901 0.0814189949505 0.0424145094995 0.0312264925083 0.0671690041442 0.0297074253675 0.0326159908833 0.0331671559449 0.0312681130066 0.0653641254742 0.040141041955 0.0490986378456 0.0 0.0426893927085 0.0408370899258 0.0 0.0368318621027 0.029200211213 0.0578784327643 0.069522041979 0.0411420259607 0.0955605905857 0.0684916485028 0.0536985636371 0.0361283833003 0.0349236407736 0.0326544016244 0.0320790517512 0.190734279342 0.198011093099 0.202165335147 0.215193803756 0.208989236133 0.207943677959 0.205067684162 0.186855165408 0.196324830352 0.210203923195 0.205342231011 0.203427359944 0.198526873832 0.208498767129 0.187766259392 0.1906844311 0.213518747065 0.185598548292 0.229746939288 0.194805777978 0.222821572969 0.192481412892 0.225723793976 0.202375384198 0.192457483521 0.194300696695 0.205376522136 0.216660688755 0.21030774241 0.175307222553 0.197000980201 0.189066511629 0.191539232379 0.231058906578 0.21669613367 0.203523564636 0.200666530244 0.214595210264 0.195827171333 0.208641958794 0.209561099462 0.203960485003 0.196717491572 0.188766309975 0.205678014795 0.191492051166 0.198961164508 0.194672996958 0.180152450124 0.19944864987 0.257583228235 0.245178524187 0.240481186058 0.23786630337 0.249341975217 0.245210894146 0.246468005973 0.237456371003 0.247563146561 0.241300303041 0.22729752986 0.240555698528 0.237993038095 0.254193700204 0.26033321069 0.24220764546 0.231128442611 0.230799434891 0.264694157473 0.241194058993 0.241588310222 0.245985985156 0.248083056968 0.231516408669 0.235215479132 0.226198260689 0.228320459149 0.22623565919 0.249391170367 0.221152204365 0.239284874476 0.218351963925 0.252686589685 0.220530747351 0.234477098822 0.243363395844 0.246969168578 0.229990071021 0.225895881072 0.232959826282 0.248113114083 0.23570223574 0.245178524187 0.245562733947 0.248226439579 0.241702239505 0.242775171886 0.233515238499 0.242256602421 0.232453320509 0.0221776604768 0.0292076409984 0.0225953199419 0.0344078822964 0.0402556862186 0.0443490345462 0.0247422055695 0.0212582761966 0.0262237412261 0.0239779350196 0.0420497572884 0.0414593565817 0.0638943455501 0.0444256278823 0.0324613404347 0.0464717210574 0.0064847144584 0.00810593532016 0.026613709743 0.0281809240896 0.0431707040779 0.0364933096346 0.0236549105265 0.0316629149872 0.0188389154871 0.0197111271958 0.0316629149872 0.0126413659503 0.00989228745945 0.0276229976961 0.0619054176788 0.0136582341261 0.0735855911944 0.0517713161376 0.0346942423053 0.0171636471405 0.0128780143687 0.00330427938484 0.00787705209324 0.191124461218 0.196709270957 0.202716444922 0.215924187936 0.209335641351 0.208652638742 0.203456445375 0.186385899088 0.197740844714 0.208277146555 0.207460837635 0.201437849638 0.202451222155 0.209128071387 0.184787202976 0.190226937612 0.212288039878 0.187958804478 0.231460569504 0.196093364986 0.220613648389 0.191903262961 0.227580912528 0.204703238288 0.192798319471 0.194099784682 0.207098250381 0.21653588119 0.209689452484 0.175692486622 0.198220686642 0.190843207535 0.19145100341 0.232063526554 0.215320322312 0.200757345911 0.200512766736 0.217080327154 0.194471953875 0.2086592247 0.211165769014 0.203992872465 0.197349559187 0.188849659131 0.205722712353 0.191296031353 0.198394567468 0.194851113014 0.177048060287 0.198893335106 0.255751598489 0.244696550693 0.240850735029 0.238657915403 0.248846650839 0.247061872969 0.245367004129 0.240135191988 0.249950401792 0.239377278919 0.225435027987 0.240867925442 0.23738991955 0.253602763959 0.257909304325 0.239755581779 0.231578379023 0.230802663983 0.267123052444 0.243889033036 0.240266927764 0.244253437447 0.250943098487 0.231284290644 0.234232349856 0.227603903464 0.227483301065 0.225010355342 0.249291083828 0.223656027478 0.241455021635 0.21867583866 0.252237135554 0.222012069338 0.237944922778 0.2436864771 0.244348021388 0.230119265967 0.224342678419 0.231928535106 0.246422479994 0.233277995952 0.244696550693 0.244602643666 0.245964063641 0.239692017082 0.242916090829 0.232449793011 0.23942553099 0.231611684555 0.0349328180738 0.0397488289561 0.055917859907 0.0466657680267 0.0537525131124 0.0312322620487 0.0204661899168 0.0273925121636 0.0188335643607 0.0409848131484 0.0582072876054 0.056071962696 0.0229170555223 0.0261517042618 0.0397135231185 0.0177392332242 0.0260266328079 0.00803879586998 0.0153514357558 0.0448019039458 0.0436873202641 0.0393784019825 0.033505533415 0.038918396453 0.040710313775 0.033505533415 0.0158373818638 0.0159973219202 0.0374102115892 0.0608056403948 0.0178404535904 0.0681680501025 0.0368277650919 0.0342153028534 0.0136005609896 0.0114725513671 0.0202654226306 0.0215111320227 0.175502940168 0.180846739943 0.186993890383 0.200622200655 0.194047326964 0.191871659177 0.187230724864 0.170446969951 0.181958118895 0.192296146604 0.192168805538 0.185737701873 0.187567790504 0.1926934047 0.169562979332 0.174903941965 0.195627236518 0.171332536122 0.216941277953 0.180224282629 0.204375817171 0.176708588212 0.212007481629 0.187940100384 0.177271729963 0.178782860675 0.191678059195 0.200974345147 0.193702992688 0.160469688943 0.182595805427 0.175146841545 0.17584337797 0.215706304999 0.198413689274 0.184386485081 0.184856323095 0.20232915317 0.177913816132 0.192982627694 0.194328346433 0.187558388958 0.181714052911 0.173349805963 0.189464804214 0.174374123803 0.181953747446 0.178997842818 0.162709307879 0.18281187754 0.239644460978 0.228724428122 0.225246554022 0.222159074766 0.232927392687 0.231188577573 0.229024014707 0.22394884582 0.234228075319 0.223668927512 0.209861178703 0.225307285274 0.221985913786 0.238104571085 0.242774657148 0.224369518131 0.215280858443 0.214174032708 0.25182022511 0.228290074367 0.224826938646 0.228427350702 0.235193041024 0.216001866886 0.218122104545 0.211215702011 0.212099059638 0.209083204086 0.233569980649 0.207419375116 0.225880589953 0.202184861075 0.236687676647 0.205660738951 0.22091809464 0.228766193737 0.228457617824 0.2135856342 0.208453819381 0.216659972673 0.231192094033 0.218856194539 0.228724428122 0.228811270004 0.230578167797 0.224983578773 0.22794936407 0.216954366886 0.223518672063 0.215168993038 0.0278789967436 0.0521696459286 0.0689795584164 0.0720246274977 0.0510464689946 0.0421745394626 0.053582971262 0.0252834975098 0.0677158937278 0.0652657188093 0.081318384881 0.0463957610979 0.0317140261778 0.0668416555065 0.0279143378417 0.0293650428541 0.0349789935753 0.032697569141 0.0634994948437 0.0398508689254 0.0464805914619 0.00599304401229 0.0382168939676 0.0359888514026 0.00599304401229 0.0356302780251 0.0278103138868 0.0553135387293 0.0681148770417 0.0401494228711 0.0950529579724 0.0698373790182 0.0522664102967 0.0364245082526 0.034367526255 0.0307005764611 0.0296340954647 0.193320448722 0.200616479264 0.204805927895 0.217738543992 0.211505662739 0.210916031972 0.207785188245 0.189492055249 0.199011305592 0.212849559963 0.207930120156 0.205973985295 0.201080290256 0.211364107387 0.190111543422 0.193149888648 0.216396870129 0.188564248953 0.232124397575 0.197509520178 0.225563508571 0.194908404083 0.228408782968 0.205404773753 0.195016829794 0.196780548006 0.207983584103 0.219251719916 0.21299620972 0.177753842585 0.19963357851 0.19173429638 0.194103048534 0.233951642516 0.219652294406 0.206249008964 0.203257559758 0.217055047586 0.19863330849 0.211258733702 0.212590735452 0.206794766477 0.199327419787 0.191301214309 0.208462930841 0.194441169877 0.201765843334 0.197324504463 0.182225897174 0.202147597456 0.260363424846 0.247928312505 0.243139798114 0.240805098305 0.252082485905 0.248010938223 0.249316339351 0.240374954583 0.250342905364 0.243926059402 0.229857687769 0.243199557315 0.240557269117 0.256813113392 0.262812568913 0.244726906585 0.233983032632 0.233739246967 0.267372287242 0.243942332388 0.244149194945 0.248660562989 0.250891907974 0.234045856002 0.23797517084 0.229108542601 0.230855414047 0.228916694642 0.252083674667 0.224056856634 0.242001030284 0.221239323161 0.255322806495 0.223424493307 0.237685672547 0.245823282675 0.249646734812 0.232903558602 0.228555612396 0.235462898266 0.250614129287 0.237926457957 0.247928312505 0.248245352669 0.250761236826 0.244030479155 0.2452417146 0.236085335476 0.244925556651 0.235313123462 0.0296919493074 0.0549103775111 0.0590022859872 0.0450958795243 0.0436647014416 0.0451669494409 0.0401697758406 0.0620690815544 0.0404063812339 0.0856236153109 0.0591687282212 0.0490473517415 0.0683619493373 0.0275851844543 0.0264002504943 0.0446945676427 0.0461763497794 0.0638640733472 0.0232220049486 0.0233353107646 0.03147088677 0.029201781247 0.02614478673 0.03147088677 0.0350355717384 0.030428654072 0.0452764113597 0.0802967236314 0.0328354116031 0.0941098407344 0.0724718577687 0.0562014612922 0.0313029110017 0.0340889421853 0.0234757814211 0.028925036543 0.210407140423 0.216202187825 0.221880775368 0.234954371989 0.228487320903 0.227668142527 0.22288748901 0.205844703323 0.216768667446 0.227711464843 0.226263348504 0.220970493431 0.220784685064 0.228189601628 0.204608420295 0.209669658318 0.231537789973 0.206793805641 0.250139733355 0.215157813925 0.239903556316 0.211352210266 0.246303099122 0.223431243026 0.212079033799 0.213468334673 0.225996065584 0.235701634712 0.228967589943 0.195079844754 0.217288259849 0.209835756349 0.210818201018 0.25087781482 0.234509225035 0.220284749566 0.219817558162 0.235704379779 0.213924917847 0.22786813663 0.229992970272 0.223192642095 0.216540668547 0.208207378637 0.224921456698 0.210576921517 0.217728441709 0.214138769918 0.196963968339 0.21825274764 0.274633184392 0.263620373951 0.259724001387 0.257434131046 0.267733388911 0.265627371082 0.264299751314 0.258574475793 0.268388644672 0.258492710734 0.244710620006 0.259750243754 0.256426981572 0.272472244255 0.27686351493 0.258914849135 0.250487159092 0.249742739323 0.285410306304 0.262307563551 0.259345413586 0.26329314732 0.269271128247 0.250334873532 0.253300294048 0.246383898221 0.246645581278 0.244211963707 0.268141898451 0.242252606427 0.260005586654 0.237699783889 0.271104326635 0.240825446457 0.256147548483 0.26253800174 0.263413026859 0.249061635853 0.243583443282 0.251070491042 0.265469741093 0.25252673858 0.263620373951 0.263585528386 0.265041995624 0.258842865142 0.261802853748 0.251583944502 0.25855292944 0.250657339544 0.0450102465608 0.0439198537957 0.0420878714528 0.0489743500788 0.0458798154287 0.0561577170329 0.0578224624858 0.0224176386409 0.0849412968827 0.0784422731853 0.0630254855321 0.0686145922194 0.0402128784166 0.0342259139129 0.0607491308771 0.0616063147121 0.059057582132 0.0469260494382 0.0248556117621 0.0569379974042 0.0246670677105 0.0228986845775 0.0569379974042 0.0437638412118 0.0433305015411 0.0375189879884 0.0808012493057 0.0411311531308 0.089015155435 0.0787045494767 0.0568803303557 0.0468151856286 0.0457099341419 0.0358166687321 0.0382966404493 0.218181156993 0.223322073096 0.229705702275 0.242392790988 0.23577882008 0.236467641295 0.230139466345 0.213525276303 0.225126391191 0.234563959305 0.23447409507 0.227593305984 0.22968375989 0.236629811874 0.210530415308 0.216784944512 0.23930372472 0.216469414915 0.257297585894 0.22354090813 0.246798396633 0.218282233397 0.254457430072 0.233053108231 0.219729861221 0.220661425884 0.234112165808 0.242944509178 0.236406584132 0.202708452811 0.225406734885 0.218378296681 0.218342011887 0.259279663879 0.242430236301 0.227193609953 0.227261836804 0.24357213448 0.22167035443 0.235341335514 0.239265397892 0.231386700827 0.224381906232 0.215751708357 0.232947742221 0.219218926008 0.225693206986 0.221969156729 0.202171293512 0.225894654473 0.281426284779 0.270908280604 0.267090828143 0.26583132699 0.274949583689 0.273930107263 0.271660675229 0.267616788632 0.276815360824 0.264923167376 0.251110814116 0.267050687079 0.263175899022 0.279239724537 0.282486166675 0.264820551157 0.258570659963 0.257930961428 0.293412787858 0.270816835713 0.265787467516 0.269896000193 0.277962792777 0.257183140616 0.260538043514 0.255036127386 0.253324298915 0.251219664681 0.275354649609 0.251349757403 0.268235077166 0.245978035775 0.277988121804 0.249516964722 0.266387651101 0.269264891567 0.269706692396 0.257221982881 0.25041421232 0.257531332229 0.271532129624 0.257608408712 0.270908280604 0.270491687514 0.271003440471 0.264326332823 0.268486578685 0.258229704408 0.264793848318 0.258283260113 0.0140423845301 0.0233496953457 0.0357817640834 0.0194594148752 0.0561842963236 0.0207161808072 0.0344686045315 0.0532665757163 0.0656105748711 0.0611304155975 0.0376479555399 0.0422417749013 0.0418045042693 0.0514369987371 0.0551924216967 0.0370785412495 0.0618826263881 0.03552992519 0.0709823822809 0.0406476055096 0.0445130802003 0.0709823822809 0.0367370595656 0.0436433053629 0.0176515558758 0.0714383400943 0.0313405988749 0.050902359898 0.0456873150128 0.0406736463161 0.0404939048403 0.0386201712918 0.0390017962403 0.0411563720519 0.190383467974 0.193150151335 0.201647820189 0.214732592431 0.207848794505 0.207203203998 0.199017728171 0.184517441065 0.198117570692 0.203251095462 0.208611510757 0.196706601418 0.206520396425 0.207659337014 0.179547279859 0.188402996857 0.207901541524 0.18984126915 0.231436366396 0.196328732424 0.214604717337 0.189868309751 0.227504737805 0.2057488472 0.191940214233 0.192467873609 0.207646738607 0.21397919575 0.206530920079 0.175883310987 0.198349858418 0.192082967323 0.190004696209 0.230325216181 0.21052421867 0.194679583814 0.198537353627 0.218586319181 0.19070413186 0.206580728089 0.210890308648 0.201869808993 0.196665077614 0.187817228574 0.203604184545 0.189253631177 0.195640755776 0.193545341254 0.172360847921 0.196255157011 0.249220192749 0.240515221189 0.238164043403 0.236348677214 0.244540315717 0.246252369823 0.240132469075 0.240621741867 0.249888930273 0.233326376677 0.219986372028 0.238112203328 0.233455949013 0.249164983161 0.25077275089 0.233019708703 0.229068571188 0.227556818352 0.266813634827 0.244493984417 0.235169888951 0.238293435462 0.251527743788 0.228140449415 0.22959779378 0.226587756924 0.223543468869 0.220396683922 0.245620426642 0.22441324809 0.241383050303 0.216373265669 0.24802824928 0.221314439433 0.239346728325 0.241091845042 0.237050180919 0.227111645095 0.219282181885 0.227591404442 0.240665010845 0.227138628142 0.240515221189 0.239782829874 0.239319392462 0.23385508337 0.24006053231 0.227964392353 0.231962468731 0.227162089828 0.0243523838323 0.0383436294161 0.0281380877138 0.0591143980174 0.023507742642 0.0377968944731 0.0517794728194 0.0731209286425 0.0626942772583 0.0386453724111 0.0461236944312 0.0433886463071 0.057222198299 0.0591551673076 0.0319956615202 0.0701506857494 0.0422353525103 0.0748230813085 0.0387325777977 0.0428806382505 0.0748230813085 0.0409657262208 0.047385502674 0.0175421295668 0.0657295550805 0.0386908764688 0.0489968109439 0.0522686619491 0.0387311691946 0.0491554938498 0.0442532671202 0.0441014308007 0.0436449779054 0.189947462454 0.193087358051 0.201270443197 0.213957860003 0.207091706444 0.207812220084 0.199357780455 0.184445706942 0.197758177741 0.203406879958 0.207785745488 0.196588475912 0.205402521621 0.207935882191 0.179126107639 0.187763747972 0.208638518258 0.190249811145 0.22994679767 0.196055336563 0.215105618909 0.189122223025 0.226906503622 0.206245399814 0.191418910324 0.191795589288 0.206939834769 0.213506326546 0.206505332082 0.175157210084 0.197857598212 0.191658112797 0.189588115864 0.230508642351 0.211553886467 0.195374420383 0.198156887541 0.217288762795 0.191332101287 0.206198782834 0.211486527696 0.202202827305 0.19621322526 0.187298385594 0.203764973183 0.190101114406 0.196046751208 0.193325009164 0.171164264517 0.19631141813 0.249660253112 0.240527632421 0.23771162293 0.236702658605 0.244516745342 0.245937622906 0.240621381598 0.240549902948 0.249413960629 0.233305723303 0.219774348622 0.237625603888 0.232924324305 0.248768260048 0.250380844287 0.232789805762 0.22924781342 0.228117670835 0.26599273559 0.24389404773 0.234785533178 0.238373023947 0.251062908639 0.227440481837 0.229791016779 0.226764157548 0.223002288166 0.220422035353 0.245352612988 0.224391473735 0.240777024278 0.216738025139 0.247654798968 0.221447853711 0.240056634641 0.240035093698 0.237386138185 0.227558813593 0.219321439562 0.226978987712 0.240167124817 0.22597544824 0.240527632421 0.2396924683 0.239078218682 0.232902821621 0.239060496039 0.227569835839 0.232339810664 0.227659905228 0.0141262101806 0.0139426926457 0.0350538423884 0.0193552608508 0.0431621025158 0.0440916637552 0.050896637678 0.0388189182549 0.0267566278127 0.024110231253 0.0232035130335 0.0336464874245 0.0349533341335 0.0219308383764 0.0572621322316 0.0349099564127 0.0531369685873 0.0252590392656 0.0298245046475 0.0531369685873 0.0175869571119 0.0244711956848 0.00818635303924 0.0514811245358 0.0194723442375 0.0509148981601 0.038941584783 0.0196470806889 0.0301479553419 0.021545096414 0.0245644202822 0.0217515624084 0.179463055971 0.184039565703 0.191058390156 0.204133065196 0.197353411589 0.197439799103 0.1907070948 0.174350095292 0.18671934138 0.195225461177 0.19666314681 0.188285080293 0.192912863971 0.197716084636 0.17106321505 0.177948538218 0.199885832792 0.178001143095 0.220003811923 0.185034059424 0.207478284578 0.179492397587 0.21650741229 0.194560853934 0.181055185718 0.181934852801 0.196069170377 0.204292703623 0.197354097622 0.164139489747 0.187014857055 0.180129327357 0.179477085752 0.220692949894 0.202951258529 0.187497059139 0.188415486818 0.206311756974 0.182082560815 0.196599300923 0.200515380101 0.192263706104 0.185773424375 0.176983033355 0.193914579783 0.179773695055 0.186365398569 0.183085748173 0.163066216827 0.18672092116 0.242702110891 0.232274391832 0.228788679171 0.227187602483 0.236388804345 0.235969651611 0.232778101812 0.229721372697 0.23914299349 0.226115326683 0.212181006801 0.228757804803 0.224715842477 0.240932159296 0.244193462731 0.226111600887 0.219855639469 0.218968698082 0.256162056313 0.233278273993 0.227208648321 0.231128251362 0.240452766308 0.218806638317 0.221623839858 0.216518120679 0.214708469871 0.212229381986 0.23697508889 0.213254322456 0.230501952576 0.207030794754 0.239662752997 0.210997516317 0.22840539478 0.231383198724 0.230834439598 0.218316993527 0.211375460714 0.218990694003 0.233092437868 0.219339375552 0.232274391832 0.231855607362 0.232408829329 0.226038981221 0.230519762371 0.219567778072 0.225824086027 0.219230412501 0.0195919993919 0.0221059172753 0.0271326704392 0.0528905379198 0.0431586822848 0.0385447030867 0.0255010287112 0.0262337606525 0.0170321830128 0.0195302099147 0.0206521036595 0.0209833716129 0.0252645250533 0.0550811186683 0.0394746523074 0.043263968218 0.0280088992059 0.0316978756724 0.043263968218 0.00932281475944 0.0154549635915 0.0220221996956 0.04619442006 0.0176558634743 0.0549187053198 0.0347531723104 0.0154010655624 0.0249961358537 0.0130624709681 0.021086975526 0.0157582275316 0.172494143831 0.17784850126 0.184169405165 0.197413015598 0.190717679771 0.190383314088 0.184688114733 0.167622718241 0.179385018024 0.189454833136 0.189254205537 0.182497405034 0.184783379021 0.190756581821 0.165553322788 0.171383967321 0.193742345805 0.169993474917 0.213189630746 0.17771520654 0.201947261672 0.173029090008 0.209395719039 0.186777092552 0.174149245532 0.175318744446 0.188797436083 0.197902799323 0.191019058185 0.156992121883 0.179797341784 0.172560525004 0.172720884671 0.213854773981 0.196871318612 0.181938976962 0.181811193063 0.198969640765 0.17576606357 0.19002752539 0.193102069722 0.185493626505 0.178790364297 0.170132074883 0.187191891105 0.172843021691 0.179777298661 0.176222723299 0.157641466463 0.180195116525 0.237394679003 0.226280310947 0.222447934209 0.220486140395 0.230450693082 0.229006895923 0.227001818993 0.222289337207 0.232008422548 0.22075701885 0.20666547313 0.222449960987 0.218801277251 0.235156691974 0.239347508119 0.221054539901 0.213261323555 0.212504634094 0.249237472588 0.225979854618 0.221636903122 0.225713392695 0.233125083698 0.212685206963 0.215719410439 0.209455227207 0.208792490533 0.206361366722 0.230902205737 0.20571314342 0.223403407555 0.200311655198 0.233802587518 0.20384593219 0.22048704521 0.225216247618 0.225812871456 0.211806271505 0.205652934938 0.213231447371 0.227786843309 0.214377387143 0.226280310947 0.226104307704 0.22732908173 0.220904746241 0.224415757753 0.21378854989 0.220845147853 0.213178189936 0.0385029210536 0.0191331286834 0.0412210559221 0.0479132957057 0.0465498029846 0.0439952648454 0.0294155998226 0.0263022819525 0.0288814535105 0.0321813612841 0.0366154046916 0.0324760763417 0.0515944791638 0.0310049526439 0.0546416139704 0.0338597056505 0.0376153728239 0.0546416139704 0.019563854062 0.0269885058553 0.0157505744896 0.0625368339241 0.0143844790412 0.0526157254036 0.0338348827289 0.0297234721938 0.0233631827985 0.0204547357021 0.0243203298193 0.026443786847 0.18161798851 0.18540629351 0.193056292253 0.206460086953 0.199649422865 0.198358533748 0.191516052491 0.176005251549 0.188914967022 0.196119500233 0.199392563722 0.189524653623 0.196344377596 0.19896940691 0.172616127427 0.180167039066 0.200264745011 0.179650753185 0.223145799502 0.187130729579 0.207841346365 0.181781654149 0.218763807382 0.195938920487 0.183272877978 0.184194077304 0.198599402775 0.206127033545 0.198682577368 0.166796826532 0.189310437328 0.182538488189 0.181515358431 0.221921151125 0.202966250725 0.187732725258 0.190303161279 0.209524247949 0.182729260129 0.198439370358 0.201593038612 0.193392410161 0.187922687561 0.179193994752 0.195211914017 0.180441261226 0.187358375156 0.184927566912 0.165517695891 0.188083050798 0.242939707589 0.233299699182 0.23049760933 0.228144979761 0.237419943564 0.237777043946 0.233178399857 0.23147925362 0.241203272786 0.226929567318 0.213318762235 0.230491320835 0.22634238089 0.242302330141 0.245163744774 0.227035678455 0.220985219764 0.21961554026 0.258484704802 0.235572463293 0.228516087928 0.231839786454 0.242586485114 0.220732170317 0.222439032331 0.217865646283 0.216378419732 0.213247698263 0.238336887242 0.215052759841 0.232719204269 0.208046041848 0.241045913549 0.212450914632 0.229495311164 0.23369764439 0.231101958719 0.219113353825 0.212320151032 0.220660185426 0.234399345217 0.221293359798 0.233299699182 0.23289508713 0.233336932661 0.227805970609 0.232744111879 0.220997609023 0.226042688917 0.219773770977 0.0487507947542 0.0650775470184 0.057802762893 0.0304021403296 0.00977564963899 0.0440829229362 0.0178656109143 0.0223657443481 0.0145412613726 0.00880579384939 0.0433599813023 0.0513293545711 0.0472054655688 0.0249055105449 0.0346274013058 0.0356855998153 0.0249055105449 0.0197624673252 0.0147740519949 0.0419438715965 0.0491548979957 0.0286642180871 0.0731736765881 0.0474587573553 0.0307413987988 0.0281173399333 0.0193986394444 0.0247050709585 0.0190246608336 0.173083486457 0.179910481276 0.184747521108 0.19795391577 0.191518465927 0.190900207622 0.18706914222 0.168885152715 0.179192090216 0.192134059909 0.188561922702 0.185169221179 0.182516578227 0.191341288573 0.168884190059 0.172666616329 0.195883736852 0.16891577804 0.213018522015 0.177613800133 0.204946600226 0.174427531668 0.209108112252 0.18591519295 0.174796071764 0.17642769541 0.188436163643 0.199161967465 0.19263437332 0.157387090389 0.179769711315 0.171986018804 0.173714059835 0.214316704261 0.199152104404 0.185242989169 0.182953007753 0.198045578814 0.177854485907 0.191103831493 0.192902410163 0.18652468984 0.179244739552 0.170950373519 0.188227253613 0.173938849831 0.181251003885 0.177034455953 0.160977434421 0.181661357468 0.240293898195 0.228034626835 0.223480275138 0.221169492968 0.232239647508 0.228872448909 0.229260803782 0.221433214134 0.231450162781 0.223643381382 0.209415344527 0.223528489107 0.220601809879 0.237045012584 0.242726403737 0.224366911478 0.21417342735 0.213777217999 0.24873924373 0.225124576112 0.224039797111 0.228474279829 0.232185938187 0.214138987375 0.217816173262 0.209554716543 0.210717178803 0.208592377005 0.232371287988 0.204873194809 0.222962175481 0.201230387345 0.23556954796 0.203837920113 0.218977104053 0.226289614933 0.229286064361 0.212971252918 0.208146125074 0.215343203422 0.230520772996 0.217614435398 0.228034626835 0.228243837858 0.230522424537 0.223850190554 0.225634530741 0.215935214332 0.224460188266 0.215143400901 0.0529022439667 0.0328752197893 0.0555054115849 0.0509289255649 0.0173017354019 0.040824127775 0.0418711547682 0.0429127577978 0.0455543968368 0.0222834470095 0.0700549868865 0.0480571802481 0.0688386171987 0.0442386440219 0.048830469586 0.0688386171987 0.0328274300443 0.0405886029945 0.0207406620607 0.0561033512724 0.0322786585229 0.0341942563123 0.0291137581017 0.0267606033099 0.0411628160219 0.0351933008888 0.0409598634365 0.0395653722748 0.170381496838 0.173513369262 0.181763628401 0.194913312213 0.188005094963 0.187597093173 0.17963993246 0.164619720579 0.178109956535 0.183964962678 0.188586214824 0.177259498897 0.186421186364 0.18797705999 0.159970598511 0.168451386355 0.188698976448 0.169860506279 0.211615177079 0.176329007245 0.195682012245 0.169937526308 0.20770892717 0.185927394166 0.171947667368 0.172526710735 0.187654893417 0.194331077481 0.186965121806 0.155693053512 0.178340485408 0.171986662107 0.170058435784 0.210831670623 0.191498228781 0.175622787806 0.178712133706 0.198589692402 0.171227708945 0.186830515333 0.191211132234 0.182219297429 0.176703062328 0.167807776518 0.183929379926 0.16962686739 0.17602523241 0.173642929989 0.152568053554 0.176555503125 0.230732284086 0.221405569072 0.21873883425 0.217008773205 0.22548132942 0.226701619289 0.221306518291 0.22096326048 0.23027897199 0.21448417882 0.200865540743 0.218691208961 0.214158679542 0.230111756153 0.232289297369 0.214283536851 0.209653108975 0.208315017711 0.24732302577 0.224778673487 0.216104443077 0.219500448511 0.231884032027 0.208661452368 0.210499772687 0.206990362059 0.20415679031 0.201176497026 0.226427503413 0.204626996142 0.221691815993 0.19686908479 0.228928610762 0.20163871009 0.219806895143 0.22162291443 0.218587303851 0.207804967644 0.200129766869 0.208295752101 0.221764477978 0.208127749312 0.221405569072 0.220756657587 0.220625985458 0.214861357139 0.220620889076 0.208723632287 0.213494112425 0.208081504586 0.0844496882978 0.080315980567 0.0726849367116 0.0675030089859 0.0473153931529 0.0443066374773 0.0646752376508 0.0680246382237 0.0621370759065 0.0478849585017 0.0214355468841 0.0687094353901 0.0384979333887 0.0389190825118 0.0687094353901 0.0480894783324 0.0504544201599 0.0366660205236 0.0908834253131 0.0410486802894 0.0843383154277 0.0744888741312 0.0620377042787 0.0466247584157 0.0490662247741 0.0410809318858 0.0466044522535 0.220241217585 0.22387872958 0.231567441105 0.244549509651 0.237801597966 0.237271702597 0.229957304486 0.214803305719 0.2275731622 0.234289966045 0.237659204867 0.227701989162 0.234344570768 0.237727323575 0.210730852647 0.218580436475 0.238765139748 0.218842181584 0.260585713889 0.225852980679 0.24576980875 0.220083510611 0.25691340974 0.234991633089 0.221816502308 0.222561867727 0.236939418607 0.244255467135 0.237073335368 0.205416544089 0.227870869354 0.221241762596 0.220094090971 0.260317043933 0.241447551617 0.226019474356 0.228752673734 0.247333244315 0.221529692284 0.236780633698 0.24056209021 0.232170242771 0.226474325634 0.217767662464 0.233885787279 0.219595234935 0.226160651319 0.223600212873 0.203287025744 0.22672247966 0.280139937217 0.271046573965 0.268296536378 0.26646171863 0.275059767728 0.275799812567 0.270911764394 0.269815722172 0.27914751079 0.264301608642 0.250949666543 0.26825814336 0.263926860434 0.279625941989 0.2816892989 0.264092216423 0.259287884013 0.257990452056 0.295945646215 0.273550874886 0.265902495939 0.269211685027 0.28055869892 0.258431707188 0.260338655828 0.256388822593 0.254096852299 0.25120005211 0.275959599762 0.25362897924 0.27069009133 0.246633770083 0.278453866291 0.251048870754 0.268244717954 0.271056483898 0.268212813274 0.257487053623 0.250194192056 0.258191856723 0.27145388403 0.257986657626 0.271046573965 0.2704506544 0.270310564507 0.264635332559 0.270115829289 0.258629632749 0.263204545545 0.257890609764 0.0600044713459 0.054351041098 0.0187381084361 0.0598557442646 0.0614469307754 0.0531453686192 0.0525559397425 0.0279315026787 0.094761292833 0.0773971393828 0.0814189949505 0.0655620569523 0.0700255275487 0.0814189949505 0.0520201647503 0.0579117136152 0.0488956649362 0.0419109171187 0.0567137285928 0.0208614229037 0.0306610868801 0.0327090237565 0.063272034339 0.0543984191577 0.0634480421324 0.0583685669148 0.139330779418 0.142986837848 0.150850053523 0.163810831232 0.156868051014 0.157669598862 0.149679456655 0.133871337528 0.147188409072 0.153968295801 0.157417010427 0.14689076955 0.155379198936 0.157713790383 0.129254210759 0.137253284329 0.159227064857 0.139693977567 0.180206197156 0.145463442392 0.166351059616 0.138682374547 0.176816693259 0.155870230339 0.140840856643 0.141328264666 0.156536274226 0.163539791349 0.156545980147 0.124345584519 0.147307265103 0.141019689746 0.139034333305 0.180682036747 0.1624502749 0.146314826392 0.147811298228 0.167221256708 0.141400345074 0.156004354912 0.161263479124 0.152006654871 0.145684418167 0.136675034398 0.153561404536 0.139874017863 0.145889334783 0.142806737922 0.121109447078 0.146069682444 0.201853472765 0.191504661606 0.188213817168 0.18712354961 0.1956147304 0.196211110416 0.19205227926 0.19059963575 0.199675257584 0.184878502918 0.170804202645 0.188147863911 0.18370042204 0.200019806255 0.20290821197 0.184684396544 0.179556147674 0.178663646288 0.216648538359 0.194032671841 0.185998827234 0.190015746161 0.201299319844 0.177907547001 0.180731098286 0.176760615884 0.17358596254 0.171156072474 0.196260390732 0.174185108777 0.190914661822 0.166819613367 0.198798087344 0.171315193398 0.190200635461 0.190703604042 0.189694426068 0.178004531696 0.170196606131 0.177783458136 0.19179082566 0.177644952 0.191504661606 0.190881968726 0.191068709685 0.184514101166 0.189756786146 0.178407147108 0.184631515769 0.178548671216 0.0324892056253 0.0484887435869 0.0393579503362 0.0472627188893 0.0192847169709 0.0232472318507 0.0583393494412 0.0585791036352 0.0611786752117 0.0424145094995 0.0604358052165 0.0620651155443 0.0424145094995 0.037432002363 0.036885144463 0.057932237922 0.0663347563067 0.0402054510934 0.0745837939532 0.0379481013657 0.0474009418109 0.0343119409392 0.0339409730754 0.0428079642087 0.0427340086613 0.16139435599 0.167055199688 0.172679145019 0.186588672878 0.18018023169 0.176484226078 0.173177363378 0.15635152751 0.167324305619 0.178559723881 0.177731707828 0.172313382954 0.172981201837 0.177656055027 0.157022451257 0.161367937512 0.181005231952 0.155624650937 0.203264920982 0.165557822324 0.190457367134 0.163325089652 0.197312648791 0.172046353812 0.163261037864 0.165144860989 0.177247951111 0.186978615056 0.179504291425 0.146841839918 0.168174392768 0.160512412099 0.161906209121 0.200546381048 0.18360708151 0.170619997941 0.170849280459 0.188248015891 0.163499893332 0.178863271671 0.178580924982 0.172741578769 0.16748001244 0.159472149167 0.174802823761 0.159227769495 0.167358477359 0.164720514491 0.151099028747 0.168548224145 0.225620984689 0.214383995774 0.210968404368 0.206923044041 0.218629792329 0.216162853062 0.214556733684 0.208383921822 0.219163632298 0.210075568948 0.196412311391 0.211088115641 0.208225582965 0.224211015109 0.229824216763 0.21125046128 0.200361910494 0.199102744226 0.237092122358 0.213257676298 0.21126821314 0.214648561609 0.219950980033 0.202248505777 0.203853239286 0.195906673599 0.198467217831 0.195092454721 0.219319110187 0.191906900165 0.211043854216 0.187166023617 0.222703227226 0.190377176965 0.20432458647 0.215124925944 0.214931156714 0.198560742198 0.194613360236 0.203185148475 0.217932610212 0.206623397839 0.214383995774 0.214797954846 0.217376030313 0.212326968407 0.214327312553 0.203281369316 0.21006441216 0.200554878155 0.0431984510448 0.0262542814372 0.0292765976694 0.0197548242369 0.011556553192 0.0420248516295 0.0609848282508 0.0559281666693 0.0312264925083 0.0398958448421 0.0413044920489 0.0312264925083 0.0264369738429 0.0230439739916 0.0462734733613 0.0414691510708 0.0363662025945 0.071550533242 0.0478849716213 0.0291862789915 0.0369373377392 0.0270714127462 0.0334218260536 0.0262390277171 0.165544038214 0.172891912863 0.17727312869 0.190354892388 0.183958646909 0.183879480011 0.180336742003 0.161635841791 0.171548979047 0.185413091762 0.180663093483 0.178298498301 0.174219977581 0.184181187608 0.161990271375 0.165191063063 0.189309277337 0.161423020955 0.205054842396 0.170020243784 0.198514733988 0.166940816324 0.201451973118 0.178556962169 0.167238778058 0.168913749918 0.180647428918 0.191850429195 0.185573186785 0.149626920851 0.172104358108 0.164216849771 0.166272040954 0.207167511585 0.192763981398 0.178906141081 0.175593499508 0.189955336349 0.171151190119 0.183759195847 0.185737635433 0.179470325207 0.171692649892 0.163416602952 0.18110112813 0.167100843514 0.174311352225 0.169649991905 0.153736698586 0.174561747041 0.233945473753 0.221154951746 0.216216020369 0.214168470951 0.225368727897 0.22143399553 0.222723035108 0.213934293134 0.223870685298 0.217024022208 0.202620827758 0.216260896263 0.213476245827 0.230060267172 0.236168299839 0.217779153489 0.207119858677 0.206977473585 0.241093686538 0.217416199365 0.217140656671 0.221883614074 0.224541883596 0.206836488872 0.211062122527 0.202310625247 0.203579796415 0.201763166599 0.225319290313 0.197343747333 0.215321920645 0.194216980733 0.228558415828 0.196533366942 0.211711953148 0.218804815465 0.22300715182 0.206091661798 0.201387938181 0.208241563837 0.223688965104 0.210605474313 0.221154951746 0.221416959944 0.223922313478 0.216868041009 0.218202757079 0.208934179216 0.218220121204 0.208484033719 0.0428988991781 0.0449811252912 0.038369173012 0.0392012066073 0.0184411809504 0.0770158611592 0.0591685049971 0.0671690041442 0.0499388239897 0.0544215157144 0.0671690041442 0.0346140690794 0.0413101969584 0.0321994698404 0.0440967531043 0.0383047062906 0.0298070621094 0.0211708137004 0.0201129458309 0.0453565917011 0.0368886973605 0.0457257341 0.0417220412167 0.154888546678 0.158813196403 0.166441835812 0.179672088583 0.172784191158 0.17260621351 0.165322327284 0.149403283235 0.162445964052 0.169819706795 0.172790429714 0.162919256631 0.17010598628 0.17291506116 0.145591206314 0.153172124666 0.174534430185 0.15398983773 0.196191934512 0.160693736573 0.182015889553 0.154710886954 0.192325902157 0.170351903358 0.156482289316 0.157229639215 0.171983255038 0.179460677481 0.172268582678 0.139849276668 0.162711676043 0.156097286205 0.154728919391 0.195984213978 0.177559464338 0.161865850494 0.163584898864 0.182768842876 0.156718657607 0.171791912863 0.175973376944 0.167287390852 0.161244255475 0.152349968293 0.168972557751 0.154707872737 0.161224201041 0.158337859598 0.137882544324 0.161653779265 0.217498297387 0.207268525118 0.204089016051 0.202387117484 0.211405750921 0.211656794766 0.207586435206 0.20562940887 0.215067539532 0.200874708618 0.186922162094 0.204055283767 0.199813802793 0.216054855672 0.219141272905 0.20087129472 0.194993585948 0.193928687775 0.232251037143 0.209370889696 0.202145172225 0.205917531589 0.216546254935 0.194031863501 0.196450064794 0.191939021682 0.189735506736 0.187016932169 0.212133736422 0.189132050882 0.20640648386 0.182100826622 0.214796842045 0.186466235268 0.20445164291 0.206912827034 0.205504201388 0.193322781156 0.186101115818 0.194015369065 0.208047565025 0.194373832921 0.207268525118 0.20679029341 0.207231461284 0.201073842632 0.205977385627 0.194517602543 0.200437951551 0.194023674059 0.00847168263945 0.0208969725179 0.0218078109788 0.0404437599311 0.0404194345362 0.0297098891496 0.0297074253675 0.0216763215811 0.0230614305273 0.0297074253675 0.00860159575866 0.00340785264521 0.0287758992091 0.0571909561512 0.0141236699669 0.0709946391549 0.0479055513747 0.0306293087394 0.0170492128659 0.00888265836541 0.00729150357409 0.00480661141663 0.185289458233 0.191085055337 0.196910034804 0.210145347321 0.203571296435 0.202882056675 0.197912476038 0.180625340213 0.191835734795 0.202787038295 0.201526915714 0.195916323017 0.19637797116 0.203353873438 0.179306027922 0.184472082084 0.206754233077 0.181958697279 0.225649748274 0.19019500565 0.21522963857 0.186167360837 0.221735787446 0.198765098442 0.186973637291 0.18833349586 0.201196357535 0.21085114286 0.204041973491 0.169797982896 0.192333522046 0.184882922721 0.185665053896 0.226331622925 0.209833971543 0.195365654989 0.194769866304 0.211153682947 0.188870228152 0.202929999244 0.20531727443 0.198262875463 0.19151438955 0.183035158868 0.19999216658 0.185562442931 0.19270971507 0.189054601453 0.171539131405 0.193197031986 0.250465285504 0.239173402368 0.23520366736 0.232978158323 0.24334022521 0.241285239552 0.239942028126 0.234265108703 0.244131225098 0.234017030201 0.220001112132 0.235226825533 0.231841004595 0.248118070359 0.252690451382 0.234464488853 0.225903274535 0.225189555796 0.261354129729 0.238022768459 0.234821661628 0.238891339667 0.245085625014 0.225666229038 0.228735290931 0.22181584168 0.221922833386 0.219499858076 0.243732621444 0.217749348385 0.235627115362 0.212972717548 0.246730042299 0.216195919385 0.232029501648 0.238052252824 0.239120375862 0.224484292562 0.218871170879 0.226408868705 0.241049615623 0.227943328268 0.239173402368 0.239135618661 0.240673256099 0.234329166611 0.237299131316 0.226939754937 0.234208016817 0.226098822397 0.028402190164 0.0277439229346 0.038946334352 0.0434213038922 0.0291676419928 0.0326159908833 0.0134911389606 0.0149220924049 0.0326159908833 0.0134816006656 0.0104081517294 0.0265932070523 0.0554420028459 0.0189257472352 0.0720390188254 0.0531694571518 0.0303305078503 0.0242591305562 0.0161087615284 0.011068875208 0.00482735633945 0.188743108882 0.194722342773 0.200407653053 0.213430694909 0.206860229667 0.206917746824 0.201757002065 0.18426566592 0.195342886433 0.206526515083 0.204777293747 0.199508643938 0.199425600774 0.207211939812 0.182702196026 0.187804249003 0.210815779569 0.185880854144 0.228533589019 0.193748347964 0.21913688541 0.189440254064 0.225129338462 0.202750726696 0.19038113591 0.191653574921 0.204515978518 0.214295374936 0.207718295645 0.173066791358 0.195766348142 0.188344856347 0.189125824359 0.230149564934 0.214039936134 0.199354571186 0.198257058594 0.214135463178 0.192868986061 0.206423136152 0.209356843732 0.20214026995 0.194966833942 0.186438002469 0.20377859508 0.189699928978 0.196612341236 0.192629244536 0.174503529883 0.196914127595 0.254336052592 0.242870282486 0.238667846113 0.23688365824 0.247015930548 0.244839615824 0.243870689439 0.237954961473 0.247598002179 0.237655720218 0.223546452001 0.238671394435 0.23524462783 0.251589019272 0.256100611398 0.237973407633 0.229710932979 0.229189966161 0.264623863258 0.241418386796 0.238285878732 0.24258651618 0.248557401899 0.228985563027 0.232518055884 0.22563381547 0.2253177885 0.223189662674 0.247286475663 0.221462369267 0.239019854286 0.21687609732 0.250217711381 0.219989961903 0.23614243802 0.241179806044 0.242913875985 0.228427928816 0.222559090866 0.229759973658 0.244438457877 0.230953863516 0.242870282486 0.24276526561 0.244179265793 0.237465205634 0.24045622955 0.230407994296 0.238017253402 0.230045288889 0.0082487413397 0.0434871339043 0.050183840328 0.0462946366306 0.0331671559449 0.0413860283481 0.0432754400997 0.0331671559449 0.018728526127 0.0181135727037 0.0407852007406 0.0552412031248 0.0241124765906 0.0672915663182 0.036051090003 0.0318240646756 0.0214815502931 0.0159437959725 0.0254901889174 0.0237539942631 0.169264556488 0.175091115152 0.180818741393 0.194404360875 0.187867354301 0.185963216048 0.181699481724 0.164435072081 0.175589139186 0.186821392192 0.185627969522 0.180155862933 0.18064011609 0.186712516664 0.164002900607 0.168780956251 0.190185205445 0.164923288811 0.210475012613 0.173888729012 0.199146471591 0.170598213889 0.205685349652 0.18167215365 0.171034804287 0.172628140609 0.185232711805 0.19500403819 0.187902476327 0.154050585176 0.176234935944 0.168650273349 0.169706859713 0.209769138775 0.193110247226 0.179199013537 0.178806517751 0.195681872133 0.172338947581 0.186953230165 0.188260629529 0.181677967227 0.175468629894 0.167135725316 0.183547713996 0.168593151982 0.176177479228 0.172880341359 0.156935998004 0.176943539051 0.234533528357 0.223126396017 0.219327759561 0.216348929156 0.227347260416 0.225044163552 0.22369577874 0.21767535265 0.227960059154 0.218355967949 0.204394726122 0.219392188471 0.216234012192 0.232478694207 0.237601395838 0.219130755018 0.209451421522 0.208536786671 0.245551542374 0.221905162641 0.219288471778 0.22312655653 0.228847315313 0.210092965448 0.212618708514 0.205172062073 0.20633435877 0.203530506813 0.227844403478 0.201098042061 0.219576265526 0.196351165226 0.231028528894 0.199557870197 0.214705957114 0.222733230705 0.223437599857 0.207886214359 0.202974139337 0.210949037245 0.225748458168 0.213347187038 0.223126396017 0.223291835541 0.22533034675 0.219465519892 0.221962474599 0.211307137623 0.21852957733 0.209700938041 0.0419192621384 0.0545713872547 0.0501857282151 0.0312681130066 0.0402402021553 0.0420008929211 0.0312681130066 0.0205720172252 0.0184919891428 0.0424913715031 0.0489285308529 0.0286939286865 0.0683097144827 0.0399734095489 0.0293256914093 0.0276858239832 0.0194684720042 0.0280123772406 0.0234918354003 0.166859723597 0.173331371512 0.178503598003 0.191909917223 0.185423378094 0.184241312774 0.180294315558 0.162400014304 0.173055799755 0.185412361634 0.18273757472 0.178554599617 0.177148633502 0.184812731656 0.162323255063 0.166439616176 0.188986532191 0.162572794611 0.207449709654 0.171422042516 0.198077549025 0.168235674576 0.203119984389 0.179508471538 0.16860424661 0.170241216483 0.182496759111 0.192879913246 0.186103766816 0.151333877107 0.173669495408 0.165942821486 0.167423536544 0.20787297933 0.192134128169 0.178241744028 0.176630454655 0.192503529595 0.170982423968 0.184797056786 0.186354645979 0.179907483835 0.173050611212 0.164731478826 0.181684378357 0.167089130276 0.174542724285 0.170681059367 0.154769008136 0.175102602238 0.233527638993 0.221524217045 0.217249882254 0.214634557666 0.225748190551 0.222754126699 0.222507410575 0.215313006261 0.225475910208 0.217028556203 0.202867049651 0.217307455338 0.214308520933 0.230711314018 0.236268919515 0.217806003587 0.207670960165 0.207072717123 0.242941912447 0.219250459655 0.217623775648 0.221838573376 0.226272530404 0.207953270239 0.211176611808 0.20315950921 0.204399143496 0.201993427277 0.226020220858 0.198708591851 0.217018221505 0.194631582156 0.229236199557 0.197470332905 0.212630809879 0.22033552246 0.22249437564 0.206324343096 0.201514537553 0.209042945777 0.224134795171 0.211456208554 0.221524217045 0.221736417649 0.223988271389 0.217633390228 0.219633609699 0.209536083539 0.217632171671 0.20838956304 0.0775399671204 0.0564468400456 0.0653641254742 0.0395849667657 0.0441943006701 0.0653641254742 0.03373111328 0.0393588608039 0.0260318537498 0.035188052496 0.0394930245033 0.0375459624937 0.0389958606199 0.0129896263362 0.048815943545 0.0379517413039 0.0436570210079 0.0373605585088 0.163502150984 0.168337389523 0.175155703097 0.187828039408 0.181028588214 0.182647655516 0.175454197959 0.158708602469 0.170954310136 0.179762949884 0.180496225683 0.172501221065 0.176828601599 0.182533215894 0.154901122018 0.161684635697 0.185118234991 0.163277975005 0.203127118484 0.169348081929 0.192443927773 0.163103682661 0.200509349698 0.179853786658 0.164993784705 0.165655282459 0.179962811264 0.188228038198 0.18173609183 0.147930089008 0.171080786567 0.164375611634 0.163483874158 0.205438086531 0.18853460221 0.172643498492 0.17244334411 0.189729944562 0.167174105351 0.180637454384 0.185804185303 0.177096116234 0.169809585441 0.16090449309 0.178551065139 0.165213876 0.171240797871 0.16732581913 0.146067131815 0.17119760345 0.227732558213 0.216775565291 0.212818856201 0.212113111804 0.220864451794 0.220275362854 0.217805693503 0.214378859193 0.223348154292 0.21056133718 0.196361313338 0.212749259626 0.208612136858 0.225027947273 0.228363013794 0.210350767964 0.204552905568 0.204069917831 0.240058060786 0.217392662406 0.211260278871 0.215701291359 0.224730833936 0.202526361799 0.206282759299 0.201292044309 0.198558189974 0.196671901675 0.221200953228 0.197951565037 0.214539723027 0.191917757906 0.223779418483 0.195733699704 0.214045901526 0.214810423689 0.215727246675 0.203293848315 0.195827563807 0.20277537878 0.217057373264 0.202583470922 0.216775565291 0.216238379997 0.216660429864 0.209514540125 0.213990052328 0.203581443905 0.210749726957 0.20422943306 0.0299803388219 0.040141041955 0.0494042382248 0.0475047073328 0.040141041955 0.0460070623429 0.0427394298505 0.0575631845334 0.0966299998606 0.0399614977189 0.101837465377 0.0750240618009 0.0697188576907 0.0332240827502 0.042809511279 0.0352142478257 0.0438103448171 0.215592317841 0.220449330264 0.226776190885 0.240218246846 0.233773884944 0.231038348034 0.2263684672 0.210465175429 0.221881119192 0.231308080404 0.231995396207 0.22508238649 0.227350588366 0.232024663305 0.209334152567 0.215020396004 0.234337406165 0.211132081266 0.256379513335 0.220156177626 0.242726282533 0.216799299323 0.251315628789 0.227298889535 0.217343977664 0.218830240402 0.231491464759 0.240364579333 0.233021642066 0.20102218505 0.222551706707 0.215242680103 0.215887525017 0.254517907032 0.236803444285 0.223122921939 0.224639449766 0.242029857582 0.217221787473 0.232566133597 0.233478733428 0.226945320336 0.221662735537 0.213507733767 0.228892766884 0.213808892567 0.221389781107 0.218899946715 0.202924474402 0.222409930936 0.277044937084 0.267058523642 0.264053120566 0.260683081125 0.271161003688 0.269928478944 0.266921380471 0.262757571495 0.272983826376 0.261803183737 0.248535164351 0.264118904646 0.260747941814 0.276361888176 0.280348586054 0.262426412526 0.254046125774 0.252677731845 0.290308221249 0.267228122274 0.26327783075 0.266417210913 0.273921992864 0.255063180539 0.256547903477 0.250174111671 0.251094888905 0.247813627121 0.2719924919 0.246585755223 0.264876118769 0.241182097008 0.275004799417 0.244784301617 0.259319666846 0.267703173929 0.266005774781 0.252196034878 0.247119094967 0.255516011217 0.269407340011 0.257485027934 0.267058523642 0.267089999571 0.268509786469 0.263477813268 0.266862086523 0.25569939087 0.261126117571 0.253527997613 0.0490986378456 0.0295882981502 0.0295703235206 0.0490986378456 0.0321772405698 0.0329624694956 0.0320791928311 0.0819581869701 0.0243777845713 0.0815880274595 0.0630031242432 0.0521832400773 0.0270041961787 0.0316626367995 0.0225970983534 0.0306135777155 0.209138400452 0.213486068388 0.2205444529 0.233810061497 0.227135531522 0.225853564299 0.21966357841 0.203852341272 0.216088869802 0.224306040557 0.226217923772 0.217746213648 0.22224285579 0.226486749722 0.201086071725 0.207931744175 0.228270944293 0.206490835508 0.249940445551 0.214362660634 0.235990805565 0.209564571075 0.245741550277 0.222850058752 0.210799114332 0.211874421056 0.225608964554 0.23378761328 0.226547651045 0.194192088088 0.216536885951 0.209533041634 0.209201443093 0.249253656365 0.230961033564 0.21611849601 0.218017866257 0.236081990375 0.21084689547 0.226091432124 0.228781524913 0.221104911259 0.215367366824 0.206800674523 0.222911320613 0.208230596605 0.21525709201 0.2125575014 0.193883560936 0.215963986139 0.270701972881 0.26093677072 0.257916700448 0.255512820108 0.265026258573 0.264740784654 0.260931231555 0.258198696768 0.267948592812 0.254868213876 0.241356571396 0.257920982238 0.254009770883 0.269860597717 0.272941762013 0.255029971614 0.248480879151 0.247232962401 0.285073136127 0.262202525959 0.256323297606 0.259707446043 0.269155247223 0.248322830219 0.250262594392 0.245086205405 0.244160084795 0.241180503071 0.265837705385 0.241871800867 0.259549733542 0.235634358004 0.268589453275 0.239657575868 0.255932774798 0.261005427367 0.2590787222 0.246704864465 0.240323606031 0.248446059436 0.262200385961 0.249216212931 0.26093677072 0.260623330072 0.261243034875 0.255650557301 0.260116706756 0.248814449864 0.254094104786 0.247584466928 0.0426893927085 0.0408370899258 0.0 0.0368318621027 0.029200211213 0.0578784327643 0.069522041979 0.0411420259607 0.0955605905857 0.0684916485028 0.0536985636371 0.0361283833003 0.0349236407736 0.0326544016244 0.0320790517512 0.190734279342 0.198011093099 0.202165335147 0.215193803756 0.208989236133 0.207943677959 0.205067684162 0.186855165408 0.196324830352 0.210203923195 0.205342231011 0.203427359944 0.198526873832 0.208498767129 0.187766259392 0.1906844311 0.213518747065 0.185598548292 0.229746939288 0.194805777978 0.222821572969 0.192481412892 0.225723793976 0.202375384198 0.192457483521 0.194300696695 0.205376522136 0.216660688755 0.21030774241 0.175307222553 0.197000980201 0.189066511629 0.191539232379 0.231058906578 0.21669613367 0.203523564636 0.200666530244 0.214595210264 0.195827171333 0.208641958794 0.209561099462 0.203960485003 0.196717491572 0.188766309975 0.205678014795 0.191492051166 0.198961164508 0.194672996958 0.180152450124 0.19944864987 0.257583228235 0.245178524187 0.240481186058 0.23786630337 0.249341975217 0.245210894146 0.246468005973 0.237456371003 0.247563146561 0.241300303041 0.22729752986 0.240555698528 0.237993038095 0.254193700204 0.26033321069 0.24220764546 0.231128442611 0.230799434891 0.264694157473 0.241194058993 0.241588310222 0.245985985156 0.248083056968 0.231516408669 0.235215479132 0.226198260689 0.228320459149 0.22623565919 0.249391170367 0.221152204365 0.239284874476 0.218351963925 0.252686589685 0.220530747351 0.234477098822 0.243363395844 0.246969168578 0.229990071021 0.225895881072 0.232959826282 0.248113114083 0.23570223574 0.245178524187 0.245562733947 0.248226439579 0.241702239505 0.242775171886 0.233515238499 0.242256602421 0.232453320509 0.00485178735022 0.0426893927085 0.0245520805084 0.0237321483943 0.0251494297711 0.057422445578 0.0278324002426 0.0740340192529 0.0616449531864 0.0345266403523 0.0352178925007 0.0280808122885 0.0215364121522 0.0177797202497 0.195939824645 0.201850357058 0.207610278022 0.22033675889 0.213750209485 0.214735564684 0.209038553623 0.191585516698 0.202707820911 0.213610139259 0.211883129405 0.206450810174 0.206559465565 0.214810867748 0.189369070647 0.194741318593 0.218356798216 0.193913039155 0.235021949805 0.201158850164 0.226304640977 0.196279111135 0.23226696484 0.210758787397 0.197506357802 0.198589557713 0.211650666116 0.221261000242 0.214919567324 0.180148757389 0.203013849771 0.195747568982 0.196259855385 0.237643665501 0.221708411792 0.206639148011 0.205357745264 0.220920753341 0.200419916968 0.213509698507 0.217293606067 0.209702604063 0.202159105945 0.193545439121 0.211227865592 0.19759997516 0.20414742205 0.199914048013 0.180698578828 0.204233409175 0.261355583351 0.249944219156 0.245612323364 0.244419283687 0.254044690674 0.252080319195 0.251117898529 0.245501499007 0.254799073865 0.244461494615 0.230320341653 0.245583982907 0.241986600586 0.258340089378 0.262471019952 0.244539880639 0.237114058797 0.236754636273 0.271527597514 0.248603215251 0.244975611097 0.24946627049 0.255826675762 0.23571262824 0.239663820665 0.233206292475 0.232061847402 0.230234276049 0.254229520181 0.229085095534 0.246138012907 0.224434087127 0.257016267918 0.227571722833 0.244299258458 0.247702557023 0.249766808341 0.235948695396 0.229554249737 0.236400217176 0.250952182681 0.236961759284 0.249944219156 0.249686907558 0.250743450736 0.243657848264 0.246990711027 0.237179418187 0.244877764453 0.237415960787 0.0408370899258 0.0273499265107 0.025297636378 0.0296282714156 0.0603715739764 0.030303105355 0.0787085816014 0.0655434565706 0.0387042108075 0.0365503327535 0.0303622028421 0.0226096284705 0.0196557817863 0.19925839426 0.205348957591 0.210921560248 0.223617852816 0.217069506306 0.218059817218 0.212575335145 0.194999027921 0.205926088655 0.217171129009 0.215009852018 0.21001079042 0.209452929226 0.218136520475 0.193003747556 0.198137341753 0.221866239829 0.197043564846 0.238162085485 0.204392911714 0.229893095054 0.199683809546 0.235440202166 0.213909407049 0.200827966888 0.201961005661 0.214826820158 0.224639586072 0.218358620882 0.183440825957 0.206248208954 0.198918059014 0.19962810203 0.240932955881 0.225232933618 0.210279009964 0.208738673233 0.223984027141 0.203935797463 0.216876482587 0.220527121607 0.21308659534 0.205456328664 0.196890655988 0.214607347176 0.201007750183 0.207588221909 0.203264328774 0.184313736826 0.207665740899 0.26489357675 0.253366014308 0.248941435732 0.247733075772 0.257464720601 0.255265649267 0.254603866324 0.248608337617 0.25792057227 0.248007634376 0.233863042555 0.24891723403 0.245404277418 0.261753780229 0.266030956859 0.248122124098 0.240457509587 0.240148573616 0.27462290691 0.251686093628 0.248460344614 0.252996524531 0.258897040073 0.239091218679 0.243138472416 0.236454818573 0.235503469176 0.233728803563 0.257606144443 0.232210377675 0.249277823428 0.227793973728 0.260419107201 0.230810446264 0.247340816609 0.251008018719 0.253372216044 0.239328849004 0.233077723245 0.239855175697 0.254460096493 0.240510971982 0.253366014308 0.253147704183 0.254305992093 0.247178452498 0.250316773817 0.240645130337 0.248503359474 0.240885126472 0.0368318621027 0.029200211213 0.0578784327643 0.069522041979 0.0411420259607 0.0955605905857 0.0684916485028 0.0536985636371 0.0361283833003 0.0349236407736 0.0326544016244 0.0320790517512 0.190734279342 0.198011093099 0.202165335147 0.215193803756 0.208989236133 0.207943677959 0.205067684162 0.186855165408 0.196324830352 0.210203923195 0.205342231011 0.203427359944 0.198526873832 0.208498767129 0.187766259392 0.1906844311 0.213518747065 0.185598548292 0.229746939288 0.194805777978 0.222821572969 0.192481412892 0.225723793976 0.202375384198 0.192457483521 0.194300696695 0.205376522136 0.216660688755 0.21030774241 0.175307222553 0.197000980201 0.189066511629 0.191539232379 0.231058906578 0.21669613367 0.203523564636 0.200666530244 0.214595210264 0.195827171333 0.208641958794 0.209561099462 0.203960485003 0.196717491572 0.188766309975 0.205678014795 0.191492051166 0.198961164508 0.194672996958 0.180152450124 0.19944864987 0.257583228235 0.245178524187 0.240481186058 0.23786630337 0.249341975217 0.245210894146 0.246468005973 0.237456371003 0.247563146561 0.241300303041 0.22729752986 0.240555698528 0.237993038095 0.254193700204 0.26033321069 0.24220764546 0.231128442611 0.230799434891 0.264694157473 0.241194058993 0.241588310222 0.245985985156 0.248083056968 0.231516408669 0.235215479132 0.226198260689 0.228320459149 0.22623565919 0.249391170367 0.221152204365 0.239284874476 0.218351963925 0.252686589685 0.220530747351 0.234477098822 0.243363395844 0.246969168578 0.229990071021 0.225895881072 0.232959826282 0.248113114083 0.23570223574 0.245178524187 0.245562733947 0.248226439579 0.241702239505 0.242775171886 0.233515238499 0.242256602421 0.232453320509 0.00792313459309 0.0236297776546 0.0536541076705 0.0108412074571 0.0628560371629 0.0400426717019 0.0242916508179 0.0172043768705 0.0050674059167 0.0120480352419 0.00909567999576 0.179733982337 0.185130641595 0.191359647755 0.204666509458 0.198016972069 0.197255576955 0.19185518721 0.174855164332 0.186481505005 0.196685913747 0.196375987191 0.189833405887 0.19172374648 0.197739787295 0.173088361774 0.178764981726 0.200732295255 0.17675687262 0.220477540317 0.184804954654 0.209049846749 0.180446207623 0.21646451476 0.193507677512 0.181414841832 0.18267689502 0.195938395299 0.20515640915 0.198204629073 0.164323672477 0.186951627799 0.179636188812 0.180004434454 0.220785829324 0.203765417111 0.189073881786 0.189075562692 0.206144383335 0.182845346787 0.197260508087 0.199879524686 0.192526504243 0.186000212457 0.177429453542 0.194272636643 0.179755047797 0.186852872988 0.183420017951 0.165408476828 0.187374971211 0.244379342624 0.233352874625 0.229596132577 0.227371143644 0.2375226222 0.23596534417 0.233967797192 0.229101525181 0.238946455726 0.22794079194 0.213947298319 0.229612039594 0.226054866131 0.242325328031 0.24658946328 0.228320886035 0.220245475488 0.219410638455 0.256223296024 0.232925784221 0.228888220536 0.232841814871 0.240004491346 0.219971839687 0.222802209556 0.216357175156 0.216093165101 0.213536808192 0.238014479196 0.212556057937 0.230415334062 0.207278762186 0.240959781593 0.210762423837 0.226970181506 0.23251461018 0.23290234378 0.218739342276 0.212847200349 0.220551656017 0.235068599786 0.221910374672 0.233352874625 0.233237981586 0.234568034713 0.228343429058 0.231717374059 0.221050886534 0.227947933137 0.220165226053 0.0299322879907 0.05484354778 0.015508827535 0.0698377856312 0.0461226756997 0.0288439268589 0.0179749812614 0.00820193608475 0.0104514607363 0.00601471721254 0.182232775094 0.188144985482 0.193867682363 0.20711590793 0.200550766912 0.199860135361 0.195016228938 0.177611309591 0.188739284934 0.199919451707 0.198412537874 0.193032154463 0.193186123937 0.200329430243 0.176446801251 0.181459762374 0.203862717343 0.178811701467 0.222599641879 0.187102653143 0.212418919228 0.183165138771 0.218668582765 0.195650642874 0.183922319896 0.18531418569 0.198099986213 0.207874048966 0.201087073424 0.166709980365 0.189246782627 0.18175655241 0.182635613511 0.223327464443 0.206968516624 0.19255440527 0.191763016548 0.208041469681 0.185943960269 0.199929552497 0.20225187193 0.195263692383 0.188456709089 0.17999008547 0.196992188976 0.182563902533 0.189736470349 0.186019084029 0.168664903455 0.190216873808 0.247702840069 0.236282170601 0.232244216334 0.230002139075 0.240457584895 0.238254033101 0.237105182737 0.231183514354 0.241076068443 0.231215767875 0.217161214732 0.232270602033 0.228935795245 0.245246208475 0.249963377759 0.231700745278 0.222930449716 0.222251471523 0.258324331925 0.234942120984 0.231973156153 0.236088516952 0.242009296663 0.222723564262 0.225860019318 0.218781249758 0.219012595092 0.216618271437 0.240821050718 0.214649402949 0.232567858569 0.209986385677 0.243846113816 0.213146433073 0.228924161819 0.235098611969 0.236391467186 0.22153411273 0.216011138881 0.223520339681 0.238239770023 0.225155295827 0.236282170601 0.236275025927 0.237908750738 0.231525069379 0.234355153325 0.224056763193 0.231485450395 0.223215654925 0.0572284762647 0.0227453897084 0.0528238726337 0.0444991634471 0.0266973769114 0.0336948312224 0.0272062333147 0.0274688740262 0.0263328670099 0.185716682176 0.189934662812 0.1972487923 0.210230033124 0.203429572326 0.203652674494 0.196491149306 0.180504651022 0.193104816748 0.200892549998 0.203064104164 0.193989394378 0.199601579765 0.203900303764 0.17670118478 0.184039790634 0.205684310622 0.1846555251 0.226113704537 0.191415178407 0.212986837934 0.185538541574 0.222740004307 0.201086740863 0.187280443615 0.188038576609 0.202414184433 0.210238732317 0.203278048935 0.170511460418 0.193354539773 0.186626010428 0.185640639557 0.226777734968 0.208697723096 0.193060716385 0.194490643156 0.212667601723 0.188009393157 0.2026405567 0.206872630148 0.198376957217 0.192017886181 0.18319542151 0.200010008529 0.185964041385 0.192410951726 0.189280207199 0.168712331151 0.192752182621 0.248024768226 0.23796255467 0.234657432476 0.23319215601 0.242043627351 0.242092609424 0.238343194449 0.236048752979 0.245336704526 0.231521041315 0.21770196943 0.234612870361 0.230403022013 0.246515101463 0.249324779094 0.231381623939 0.225835327084 0.224876205525 0.262239370649 0.239554652873 0.232726560614 0.236544998844 0.246724791051 0.22460575232 0.227286958934 0.222708966341 0.220419587826 0.21790450046 0.242699459353 0.219658545965 0.236700307439 0.213086341068 0.245286981729 0.217239309033 0.234909245332 0.237182720463 0.236050820735 0.224251890124 0.21698485009 0.224622112179 0.238475066919 0.224611061526 0.23796255467 0.237436165661 0.237675287343 0.231370754771 0.236291823604 0.225200181658 0.231029643716 0.224953381888 0.0635710838178 0.0592624543316 0.0596058092469 0.0328544820604 0.0698260168465 0.0573261822931 0.0634460229613 0.0541080958794 0.147303482686 0.155161448288 0.159136079545 0.171063643845 0.16463221595 0.168584971583 0.163624194761 0.144235266953 0.153827968777 0.168063795028 0.16179307599 0.160206770568 0.155398151635 0.167887347752 0.142965424509 0.146100735749 0.17375554158 0.146517107633 0.184102282814 0.152518687773 0.182006446517 0.147493939017 0.182975421708 0.163616999091 0.148716120222 0.149770660992 0.161958247648 0.173135111896 0.168022513735 0.130738265008 0.153920373487 0.146537313722 0.147925357539 0.190546691654 0.177990062346 0.162980599048 0.157241520972 0.169863812022 0.155438284157 0.165389918434 0.170707644688 0.163197102596 0.153422018191 0.144858486622 0.164315178145 0.152440808389 0.158128021971 0.151920639439 0.132537826475 0.157359920068 0.217237278816 0.203578319465 0.19760287759 0.197919551969 0.207681519923 0.203644803794 0.206313583309 0.1971606419 0.205828867849 0.199064489236 0.184178187026 0.197538822775 0.194404518771 0.211337912042 0.217143803133 0.199166671372 0.190313841849 0.191119829867 0.222105237734 0.199176357415 0.198307304 0.204224647581 0.206706114847 0.187412194782 0.19389709622 0.185837912363 0.184448440446 0.184112718669 0.207064291919 0.180760878547 0.196874753064 0.177987251583 0.20993106085 0.180009687643 0.197504007472 0.198552660709 0.205899002329 0.189953313758 0.183706289376 0.188863124638 0.204480568311 0.189510910124 0.203578319465 0.203449868624 0.205307715981 0.196398052452 0.198053210544 0.190139115088 0.201200460168 0.192215464603 0.0646648846724 0.0408252785942 0.0324283536149 0.0110096321254 0.0094227049932 0.0109851717283 0.0161323040352 0.185995265043 0.190666336997 0.197500031875 0.21094278484 0.204249573992 0.202798103731 0.196994111724 0.180742040387 0.192881751338 0.201790619427 0.203110749465 0.195155158145 0.19908437034 0.203454592708 0.178505994536 0.184932353957 0.205646229373 0.183039730424 0.227253690432 0.191142107437 0.213742423108 0.186621634482 0.222820224457 0.199555206103 0.187692696694 0.188884746385 0.202513734055 0.21103182776 0.203761324581 0.170936996707 0.193374027451 0.18623653615 0.18612791719 0.226436319176 0.208431967216 0.193707164322 0.195058461584 0.2131353075 0.187987297837 0.203202157658 0.20562939159 0.19810682266 0.192261721083 0.183685994256 0.199939039445 0.185109577754 0.192293556305 0.189460942551 0.171326016098 0.193018202765 0.248893705524 0.238594153414 0.235368547023 0.232809197602 0.242745772985 0.241996085058 0.238752248121 0.235253956997 0.245180784501 0.232837883436 0.219103668122 0.235388183401 0.231636120508 0.247694764978 0.251385734184 0.233178069062 0.225757404345 0.224585782777 0.262534762143 0.239353867417 0.234157942476 0.23769286224 0.246342255252 0.225805082888 0.227891511242 0.222153883963 0.221706146684 0.218742321816 0.243483255972 0.218775046696 0.236736505477 0.212768083313 0.246367071263 0.216653745648 0.232866084107 0.238586937872 0.237342638049 0.224021718097 0.217958679267 0.226108360277 0.24024082191 0.227355271774 0.238594153414 0.238405022146 0.239431466759 0.233734880392 0.237715653864 0.226470518154 0.232346541994 0.225139690924 0.0393671458325 0.0464638919444 0.0721210062546 0.0652058473437 0.0727980489441 0.069475743339 0.146377403101 0.147841270546 0.157364583964 0.169967544666 0.162961576643 0.163688135507 0.153695971045 0.140223917866 0.154815274304 0.157460458795 0.165356253736 0.150768971529 0.165320051187 0.163744020488 0.133177827162 0.143578449734 0.163063976092 0.148488500757 0.186880468442 0.153029883361 0.168852310214 0.144817839236 0.183493098196 0.16367577587 0.147767272784 0.147687188567 0.164075138054 0.168705452589 0.161392920433 0.132534765042 0.154766041608 0.149414499828 0.145576557217 0.186084208163 0.165901662347 0.149128920765 0.153742006284 0.175201329509 0.146090630422 0.161672202019 0.168031911823 0.15768748388 0.152605178523 0.14358929792 0.159222856143 0.14586039418 0.151244472229 0.149339889326 0.125727972716 0.151529925609 0.203450036676 0.194986217471 0.192843589773 0.192004248179 0.198946853705 0.202034655336 0.194735870429 0.197390062155 0.205967080811 0.187074482741 0.173679535364 0.192730113791 0.187498820793 0.203203985607 0.204052975425 0.186370806955 0.184428712838 0.182999565721 0.222535792393 0.200873648 0.188899014225 0.192203777807 0.208005111614 0.182384645276 0.184037705225 0.182740791406 0.177549631149 0.174643342307 0.20005255491 0.181451046073 0.197344936488 0.172060390986 0.202165775813 0.177622921879 0.197550181919 0.195373313831 0.190875275066 0.18253037262 0.173366080571 0.181382900577 0.194116360457 0.17989694523 0.194986217471 0.19390780748 0.192735187036 0.186889353803 0.194252690611 0.181881177771 0.185754237755 0.182012475847 0.0362542669235 0.0433946419111 0.0395938166279 0.0499100911085 0.0488639489089 0.15152574063 0.154669324023 0.162831337388 0.176665753207 0.169806006203 0.167122046596 0.160378494232 0.145396880889 0.158882941041 0.165181343889 0.170013544811 0.158841213295 0.168049497633 0.168033584387 0.142281111905 0.150191536414 0.168801703096 0.149137142763 0.194382185315 0.156984666205 0.176687245859 0.151908690894 0.188914920448 0.165149458367 0.153257832095 0.154263633953 0.168972071115 0.175883337588 0.16793063653 0.137286345822 0.159386690667 0.152763325671 0.151315442368 0.191108253021 0.171290308569 0.156330262179 0.159994057675 0.180780718652 0.151317533557 0.168120728135 0.170508979962 0.162341150711 0.157837504705 0.149168793021 0.164327797527 0.148926027403 0.156192253462 0.154516403486 0.136169004568 0.157264478091 0.212122717934 0.202635989676 0.200296956824 0.197168424809 0.206818081536 0.207593997357 0.202129844535 0.201194661862 0.211287068634 0.196367072918 0.182828097116 0.200324517328 0.196191886272 0.212106652571 0.215234691898 0.196754062665 0.19012565359 0.188386972878 0.22899541165 0.20586463613 0.198258080181 0.201204812212 0.21275581912 0.190751178898 0.191559171703 0.187109767024 0.186199376174 0.182482910799 0.207969239625 0.184720534783 0.20291190811 0.176982703379 0.210810911009 0.181756418439 0.198660937707 0.204191111601 0.200384835859 0.187985877445 0.181554202617 0.190580156178 0.204342491841 0.191957847677 0.202635989676 0.20235052312 0.203098119616 0.198224746232 0.20315819974 0.190687755597 0.195275148422 0.188602851388 0.0403137962831 0.0283224608052 0.0352856337592 0.0279159520938 0.163417587591 0.169024399252 0.175174902733 0.188097949492 0.181377843525 0.182339093803 0.176249889638 0.158817342465 0.170474967966 0.180845899763 0.180001842158 0.173609983768 0.175496658011 0.182387588854 0.15630806646 0.162058645803 0.185720747493 0.161911269413 0.203372519665 0.168871283524 0.193698104443 0.163602773962 0.200347540332 0.178768462478 0.164992621499 0.165987648079 0.179610648238 0.188805808549 0.182291142535 0.147635227715 0.17074779736 0.163623388142 0.163626611748 0.205461058801 0.189137857415 0.173807850394 0.172761367844 0.189359771077 0.167597338583 0.181003226921 0.18512092453 0.177130623568 0.169726367846 0.160952549622 0.178668367454 0.164953979441 0.171439694143 0.167334380068 0.147661742228 0.171525073941 0.229212799489 0.217687295638 0.213458314816 0.212251579761 0.221837277994 0.220248120289 0.218836902814 0.21380890761 0.22315649106 0.21209021333 0.197773787684 0.213427195478 0.209691510886 0.226221325989 0.230427027381 0.212200169545 0.204828617154 0.204406576244 0.240127225685 0.217034360511 0.212651201199 0.2171572787 0.224326708779 0.203421180278 0.207247009432 0.201076078606 0.199634752126 0.197699005741 0.222082174457 0.197241869749 0.214400679015 0.192020712279 0.224886788727 0.195424460906 0.212817607264 0.215705919361 0.217495203752 0.20360497892 0.196993475509 0.204019508797 0.218720046506 0.204677118987 0.217687295638 0.217405004007 0.218489214457 0.2114130463 0.214943199157 0.204771656731 0.212548494217 0.204988233676 0.0127227257693 0.0140144534262 0.021205315625 0.187358882688 0.192125766059 0.198772205734 0.212374766999 0.205757524042 0.203466313878 0.198269360384 0.182075536022 0.193992765379 0.203217006858 0.204331991647 0.196763084721 0.20014614007 0.2043270841 0.180514052654 0.186571402116 0.206603961592 0.183553088594 0.228871000555 0.192232411854 0.214999691886 0.188338267885 0.22392031363 0.199986970587 0.189109313009 0.19048409561 0.20374267521 0.212452607057 0.205039311477 0.17250608603 0.194596025922 0.187333202847 0.187569910566 0.227244357321 0.209244321292 0.19501056691 0.196469921009 0.214533216851 0.189073691369 0.204563213894 0.206128514596 0.199072106837 0.193573357583 0.185159768848 0.200995780718 0.185854759801 0.193344854477 0.190733738309 0.173803583444 0.194263918799 0.250041858008 0.239752334137 0.236636793113 0.233547933384 0.243918830588 0.242901503454 0.239756635176 0.235879076786 0.246072511959 0.234292093183 0.220682667006 0.236686092505 0.233134556981 0.249085035733 0.25310029637 0.234845006722 0.226672837999 0.225370202913 0.263585873652 0.240269679341 0.235701118126 0.239046163418 0.247138992266 0.227341018945 0.229062028698 0.222899030248 0.223273394137 0.220071420598 0.244719204688 0.219434280561 0.237757183282 0.213627898609 0.247720909818 0.217420020786 0.232895251914 0.240194731922 0.23871780496 0.22484832656 0.219342733041 0.227741527766 0.241902288188 0.229541957119 0.239752334137 0.239709455557 0.241056941465 0.235717844261 0.239326740269 0.227988125157 0.23374803561 0.226117504317 0.0112944223112 0.0116717916683 0.180315550232 0.185624806253 0.191893759643 0.205310880338 0.198677901623 0.19742928403 0.192207723586 0.175346071899 0.186991091141 0.197103740487 0.197010559796 0.19035952375 0.192415460068 0.198031907427 0.173783350974 0.179445795208 0.200920544981 0.176980189616 0.221316628359 0.185291341794 0.209338461592 0.181164395028 0.216995536327 0.193672787851 0.182024521085 0.183353435463 0.196543976916 0.205721030365 0.198641096205 0.165041173069 0.187513275437 0.180170480519 0.180593580969 0.221064954649 0.203852710847 0.189347093282 0.189636739108 0.206917162302 0.183105626465 0.197802407018 0.200023916345 0.192826802002 0.18656768388 0.178054301819 0.194629767109 0.179904508376 0.187157083025 0.183925453374 0.166391248738 0.187799823192 0.244629672801 0.233720966397 0.230103074977 0.227589285523 0.237898238239 0.236372028201 0.234191133105 0.229406521443 0.239389014631 0.228371263352 0.214461216321 0.2301324354 0.226622699222 0.242825477857 0.247136546528 0.228837795311 0.220544275821 0.219592617307 0.256764787312 0.233410014962 0.229423132068 0.233225877209 0.240428033421 0.220595144087 0.223137647662 0.216631996383 0.216685610877 0.213950565713 0.238461242313 0.212870718316 0.230920602382 0.207535413146 0.241449474994 0.211057657029 0.226977435726 0.233226691247 0.233226664174 0.218957536154 0.213267398065 0.221167604245 0.235644719391 0.222751284499 0.233720966397 0.233655964463 0.235074683268 0.229091941731 0.232416283617 0.221592631388 0.228271321964 0.220395124759 0.00983853465038 0.190743576675 0.196127634014 0.202306832097 0.215593264431 0.208988714901 0.208014681254 0.202752493595 0.185879141861 0.197391448173 0.207587390017 0.207246286244 0.200818808941 0.202436920976 0.208560198594 0.184214467342 0.189842910423 0.211501430369 0.187510793393 0.23133568248 0.195719341744 0.219810583637 0.19153274103 0.227260064133 0.204197085901 0.192430421495 0.193730481177 0.206830708645 0.216081015857 0.209114627207 0.175418662775 0.197889059256 0.19054759391 0.191035254803 0.231501988345 0.214455580052 0.199914298524 0.200065006525 0.216984298716 0.193736240961 0.208206242937 0.210580217034 0.203385972256 0.196973524191 0.188474338185 0.205152454389 0.190585220715 0.197746685322 0.194398694242 0.176663593729 0.198324488838 0.254937931723 0.244068220209 0.240384243666 0.238035456407 0.248220627185 0.246646653405 0.244595211757 0.23972473422 0.249602645305 0.238680104062 0.224803483418 0.240405804306 0.236887764418 0.253050369586 0.257246240499 0.239074958955 0.230985078994 0.230097737916 0.266839316033 0.24359819756 0.239685124735 0.243538571704 0.250621888643 0.230851769093 0.233547789712 0.227075078845 0.226983547477 0.224362834405 0.248743336169 0.223247552937 0.241135379781 0.21805286342 0.251689329115 0.22150661959 0.237406179341 0.243353541542 0.243526559835 0.229448331316 0.22367406721 0.231427017129 0.245837459247 0.232818717405 0.244068220209 0.243969807123 0.245289155672 0.239200193755 0.242559723366 0.231895813526 0.238589343178 0.230870674099 0.185074856292 0.190966638679 0.196734232482 0.209858428647 0.203274864625 0.203041999473 0.197926990268 0.180506604609 0.191676192961 0.202741147438 0.201237653931 0.195771907735 0.19601488206 0.203403274574 0.179018659177 0.184172394714 0.206916175569 0.182062920029 0.225161143908 0.190059350101 0.215302655172 0.18583273214 0.22154130677 0.198918819466 0.186732254392 0.188033674574 0.200939126942 0.210648020541 0.203966819203 0.169461460201 0.19212652304 0.184698761261 0.185447917615 0.226382707341 0.210090272929 0.195464472523 0.194576182922 0.210724866996 0.188972223666 0.202749851185 0.205495551665 0.198311837225 0.191308228071 0.1827836447 0.199987032182 0.185758986102 0.192762378199 0.188912535548 0.170985151469 0.193136210612 0.250560354729 0.239150130043 0.235042618318 0.233086785485 0.243308731763 0.241203268173 0.2400598963 0.234273096316 0.244008938502 0.233948328457 0.219858019146 0.235053540533 0.231632132621 0.247968147104 0.252509320758 0.234318201257 0.225941055535 0.225341346975 0.261132458323 0.237859251815 0.23464919225 0.238863315744 0.244976238699 0.225403382703 0.228750181247 0.221868483944 0.221696049716 0.219446034661 0.243630311449 0.217754591911 0.235449762585 0.213055210612 0.246589228494 0.216230229788 0.232311179578 0.237695560547 0.239155145074 0.22460119101 0.218814227997 0.226159982187 0.240839111604 0.227492031494 0.239150130043 0.239069291581 0.240533107829 0.233959974366 0.236956995194 0.226761267667 0.234246750663 0.226212511867 0.0174000566092 0.0121264323023 0.0260599074483 0.0195345881682 0.024716388707 0.0269505563041 0.00951579401108 0.00952789620934 0.0312682326376 0.021380704298 0.0249359987416 0.0321633377276 0.0221499569656 0.0250465767598 0.00649156808823 0.035247677191 0.0178478945632 0.0452164673822 0.00796037757126 0.0457327534983 0.00806434689496 0.0382898633561 0.0225581753549 0.00212523780258 0.00635071079008 0.0188691425113 0.0279463141708 0.0242753243704 0.0170805625395 0.00904309726647 0.0106287996797 0.00382969063087 0.0441552932431 0.0411601284763 0.0356126616505 0.0116846154421 0.0333280322148 0.0231237862627 0.0194233884188 0.0266405905658 0.0193741592831 0.00647009737397 0.00313195595137 0.0192809490983 0.0198825976901 0.0184223649953 0.00589033700008 0.0274923472821 0.0151107135826 0.0780209291989 0.0597893086125 0.0526478480904 0.0519801851129 0.0640907142958 0.0582643284706 0.0646025548306 0.0523589334483 0.0615531482061 0.0598796956679 0.0449628875056 0.0527423072945 0.051324556652 0.0686409960047 0.0805660524071 0.0623345264313 0.0443847427682 0.0466830846559 0.0795542446923 0.0559362746494 0.057180756356 0.0643259703348 0.063211257271 0.0437185245372 0.0513548290636 0.0393714351609 0.0417127661704 0.0422926634719 0.0628873923745 0.0360959787877 0.0527047257983 0.0325588237609 0.0667976247829 0.0335624409497 0.0547114607912 0.0561052885987 0.069799650238 0.0449738444715 0.0432370258673 0.0470356297838 0.065014861143 0.055075271212 0.0597893086125 0.0609892947965 0.0676680770887 0.0593149961508 0.0554983088895 0.0479751568133 0.0662596895747 0.0497728280187 0.01649842894 0.0270940163297 0.0209738779605 0.0204474607028 0.0105739124512 0.0137437284214 0.0226997190651 0.0150100972387 0.0323011347894 0.008153166122 0.0475382748664 0.0187641297777 0.0164404692163 0.0144508320868 0.0210394349685 0.0305556358824 0.0486242638836 0.0214513889049 0.030175982789 0.0140964441541 0.0400575333251 0.0288561044949 0.0169609734513 0.0143755139823 0.0284025548343 0.0224203703593 0.013792641556 0.0304826758057 0.0219984307058 0.027438003111 0.0138498079587 0.0391014082904 0.0268826742795 0.0187520448645 0.0110691342578 0.0424853466078 0.0102534616754 0.0160596134656 0.0266767705353 0.0127998581546 0.0173245890268 0.0173211449901 0.0131739480428 0.0158792885006 0.00835247262611 0.012879803971 0.0267489620569 0.00596710410688 0.0651865992814 0.0501303259948 0.0467631748034 0.0452702235248 0.0544981935174 0.0559804285713 0.0526556031199 0.0527154428326 0.0609295585885 0.0469864956417 0.0318305696362 0.0467870360621 0.0428839020559 0.0596952123639 0.0682904935263 0.0490145651142 0.0373470202066 0.0372051258398 0.0783094346225 0.0573164765228 0.0464381891239 0.0518006344835 0.0637213875725 0.037328539174 0.0398159521041 0.0364375689163 0.0327311081772 0.0300536558581 0.0548465086523 0.039011355091 0.052932116237 0.0253006236285 0.0581288867478 0.0321437027692 0.0554616174667 0.0518535767409 0.0554912699649 0.0361633495108 0.0300500951908 0.0376868875379 0.053920841562 0.0443787428504 0.0501303259948 0.0504194914628 0.0549441033997 0.0487769599128 0.0505784847321 0.0377653392745 0.0513716565226 0.0379306609676 0.0148794236891 0.00906915259144 0.016817766784 0.022666965263 0.0181414830259 0.00943690730089 0.0254552863313 0.0160108606893 0.0217205062473 0.032481574081 0.0125336713193 0.0301048876528 0.0144114156753 0.0283145714635 0.0236499286545 0.0356994826174 0.00980454037789 0.0380382046842 0.0138535372004 0.0270349861178 0.0179310476065 0.0105970849446 0.0106446588122 0.0120133548138 0.0166102052911 0.0152998463146 0.0290596443937 0.00834773888805 0.0173051001714 0.012006228531 0.0322817993752 0.0342847484172 0.0334965405575 0.00578703582339 0.0267498608594 0.0233284219943 0.00836772170811 0.018341518653 0.0127097608473 0.00603575216863 0.0145919151911 0.0109073587446 0.0221533308504 0.0160929276419 0.00858765501382 0.0355326614102 0.0120318414802 0.067539995406 0.0482957753815 0.0406895564252 0.0402187129364 0.0525505335689 0.046337446086 0.0538706159523 0.0410532995186 0.049945680623 0.0498002070389 0.0356573113194 0.0408170339224 0.03998131445 0.0570983300794 0.0703114871106 0.0527515586 0.0326360388464 0.0357703215059 0.068007735392 0.0448145788863 0.0463929144792 0.0539072356938 0.0519007533329 0.0322898342044 0.0406511091494 0.027662402635 0.0308780067072 0.0322628111538 0.0510866561777 0.025649802677 0.0412344607513 0.0218269690426 0.0551778627391 0.0220763570226 0.0446670171533 0.0446820028935 0.060359178521 0.0338187065026 0.0337343667693 0.0362783001067 0.0544202026485 0.046225200341 0.0482957753815 0.049817335882 0.0576169439653 0.0494636606912 0.0440581542748 0.0371733017103 0.0573289834367 0.0394045266195 0.00716257307188 0.0232372547893 0.0296783885761 0.0325204811189 0.0212497773179 0.0292620976856 0.016439517739 0.0284506794787 0.0345599570635 0.018188478274 0.0407426749726 0.0271225123173 0.0318719827355 0.0364884226289 0.021914442716 0.0227786086069 0.0376078412936 0.0256329664506 0.0146652900265 0.0257412263731 0.0241649286356 0.0229439407062 0.0136364254073 0.0100256292567 0.0184950349026 0.0419365600148 0.0198805169881 0.0290470401931 0.0259349477967 0.0239003990661 0.037192775807 0.0407761513521 0.0178664543062 0.0194803036782 0.0346542430628 0.0113663417752 0.0228609184952 0.0221099611853 0.0198250112005 0.0281996969801 0.0190943935979 0.0354944682629 0.027502181016 0.0232700909093 0.0459502516894 0.0236639254111 0.0598327139142 0.0386582188727 0.0283018389706 0.0317793366202 0.0424462733589 0.0338166029949 0.0467225177273 0.0306128740578 0.0370882424143 0.0426365040044 0.0306518342203 0.028353389025 0.0289452185335 0.045605512774 0.0609187137277 0.0456096520871 0.0247062397964 0.0307047013286 0.0541889879817 0.0321986089116 0.0369056583991 0.0461635888574 0.0394191509814 0.0202672234717 0.0339543216254 0.0203331670034 0.0216962768111 0.0275014797571 0.0396207876643 0.019383687668 0.028134515225 0.0203542968498 0.0436399460151 0.0166979961449 0.0388212853573 0.0305366541923 0.0544557347145 0.0282093601187 0.0297076171269 0.0264388860156 0.0445799816631 0.0375526043804 0.0386582188727 0.0404030430489 0.0493940445937 0.0396161416365 0.0302144214958 0.0282464575757 0.0525063270042 0.0345543356833 0.0213910735206 0.0254312508458 0.0257342205184 0.0165221855109 0.0259539784544 0.0158835031429 0.0233831935041 0.0339323139257 0.0162106434865 0.03399674531 0.0200386549433 0.0299171917849 0.0320747556874 0.028046974659 0.0176794481153 0.0368388291758 0.0185008751091 0.0214981879903 0.0241691252685 0.0175651807134 0.0158907875652 0.0122369735355 0.0109776452166 0.015527622801 0.0354957768624 0.014819189185 0.0241388300803 0.019062303667 0.0287269405771 0.0357916006232 0.0364633531028 0.011219279972 0.0225748368915 0.0292557862917 0.00702356235419 0.0224830610185 0.0181511844266 0.0136555064616 0.0214280218685 0.0152776051594 0.0301845131917 0.0223495731118 0.0167956602264 0.0389756608983 0.0178914144765 0.0630604023291 0.0430080788574 0.0341031378994 0.0365519407683 0.0470199755056 0.0406269394348 0.0499352678431 0.0370580183618 0.0441324571638 0.0450148609009 0.0313792244576 0.0341228348643 0.0333031398497 0.0505703458181 0.0642434790604 0.0476293944045 0.0288843329998 0.0334940865056 0.0612862785232 0.0392274534904 0.040346557275 0.0490663667656 0.0464449738085 0.0249899515531 0.0366261362911 0.0249803957153 0.0245501998624 0.0286632518672 0.0448796558538 0.024023128213 0.0352285170514 0.0213779538928 0.0486983458625 0.0204530056806 0.043719713027 0.0366461987398 0.0563678077617 0.0312461294161 0.0303695774583 0.0296679302141 0.0480887950749 0.0392929320337 0.0430080788574 0.0443169978812 0.0521158245642 0.0424602914349 0.0361040078467 0.0312787145737 0.0538034695951 0.0366723303295 0.0189709615579 0.0257111384326 0.0217335533305 0.0223113040739 0.027967478664 0.0234852927562 0.0436322798908 0.00521461133699 0.0364760096592 0.0272343470762 0.018116669378 0.0277674536165 0.043201573857 0.0213285903305 0.0304538340544 0.0273512817022 0.0293661558134 0.0151289313008 0.0243064809516 0.0249356313294 0.024322988602 0.0196946095768 0.0139855052687 0.0405716245072 0.0223909261135 0.0287463352875 0.0239629151594 0.02510185342 0.0224608355139 0.0285849443101 0.0178309380123 0.0374526670612 0.0202528662781 0.0157931802813 0.00761690092841 0.00770880409418 0.0208073209186 0.0270724449013 0.00859765119326 0.0186885305588 0.0137210864523 0.0193875507074 0.0459800217652 0.015147695259 0.0594631949225 0.0420406539118 0.0381002519704 0.0316288068581 0.0464453358384 0.0430647918893 0.0450678160713 0.0372936406921 0.0478953066773 0.0442824164473 0.0325191406563 0.038458833697 0.0379877190085 0.0530105166244 0.0661049064219 0.0485790002934 0.0252530768184 0.0252616659632 0.0666194586026 0.0445179442461 0.0429682351205 0.0475934680999 0.0500384221554 0.032835448251 0.0334890161181 0.0210425012042 0.0304165560005 0.0269992218058 0.0464858418191 0.0236376116141 0.0409389296383 0.0119097107153 0.0510342004912 0.0165862044563 0.0364051705359 0.0459765436849 0.0532158463913 0.0240697227805 0.0285944307415 0.0355069812685 0.0512442268801 0.0481793211849 0.0420406539118 0.0442662890139 0.05312949223 0.0494910921385 0.04499219501 0.0346009573898 0.0502278687979 0.0300299308142 0.0232712606741 0.0301762988443 0.00654363258115 0.0383536762695 0.0073760670349 0.0549696818035 0.0187358469678 0.0230006125585 0.0248620926321 0.0112006081505 0.0374302122761 0.0507791829944 0.0291552453818 0.0203658790931 0.0243768337268 0.0405838171216 0.0318523232399 0.0264398107213 0.0241549255092 0.0342108755533 0.021966370396 0.0115756992435 0.0406700397742 0.029726336077 0.0360763557135 0.0237708872008 0.0347952708329 0.0167090325333 0.0113314779127 0.0183460384347 0.0474972085699 0.0106130759732 0.0188803713912 0.0264255690706 0.0134988723184 0.025504997589 0.027405254367 0.0141844800377 0.0190580694839 0.0107985492476 0.0215712414492 0.0353201768965 0.0121413245456 0.0563908913649 0.043304104353 0.0426898087169 0.0394771848203 0.0476531796683 0.0529352282385 0.044079995111 0.0508430194559 0.0587105683651 0.0390993709526 0.0249779507582 0.042747127932 0.0380731496814 0.053623295371 0.0609715530482 0.0414798961609 0.0320700568798 0.0299307088952 0.0756552859532 0.0564187262812 0.0401315540974 0.0437426630802 0.0619393205223 0.0343990170803 0.0321000148697 0.0335451545545 0.0286757976711 0.0228629245983 0.0490706959168 0.039335399235 0.0517108395757 0.0207931533413 0.0521719534959 0.0306385429933 0.0529657791748 0.0494073245643 0.0465244230409 0.0294935309982 0.022387741137 0.033135656028 0.0474637239198 0.0404408008061 0.043304104353 0.0434045699957 0.0474449484031 0.0438694244062 0.0478136370998 0.032205230585 0.0422362620829 0.0295056722481 0.0179188644218 0.028584000913 0.0304649482776 0.0216593575612 0.0411663680687 0.024518088592 0.0182283990095 0.00873472135302 0.0327024039756 0.0205661418233 0.0530659348987 0.0158790060301 0.0434559310925 0.0108179884547 0.0451149656888 0.0268976993783 0.0108384529361 0.0115766662184 0.0275567255166 0.0316971869351 0.0249562865626 0.0177154908046 0.0178955252093 0.0182906823384 0.00749636648732 0.0477714342488 0.038203551745 0.0295629098692 0.0151014852938 0.0424264199032 0.016651504005 0.0233361298106 0.0296064297332 0.0193940010564 0.0143559792056 0.00822362335298 0.0204472045407 0.0141062231631 0.0150969431722 0.00961358010122 0.0230069897016 0.0136344497691 0.0781873312389 0.061922358127 0.0567947708263 0.0549074799203 0.0663268940474 0.0637272258979 0.0651276548535 0.0583171690756 0.0677292446726 0.060191106251 0.0450946120505 0.0568830058441 0.0543288790766 0.0714589426004 0.081454303397 0.0624243269582 0.0472314410611 0.0479124253475 0.0858307227677 0.0627914211132 0.0589518720089 0.0648453559762 0.0697319385158 0.0476614784634 0.0522209851297 0.0435983831723 0.0443141443319 0.0427834724857 0.0660408790701 0.0423473900154 0.0592034189384 0.034371623803 0.0697342027164 0.0381294864628 0.0595840773258 0.0612390496755 0.0689539919437 0.0466415215244 0.0431628346368 0.0495434525796 0.0666477691564 0.0566659496435 0.061922358127 0.062735676927 0.0682003243846 0.0612178236271 0.0603270178223 0.0499653486319 0.0649071391116 0.0500436367076 0.0339571590708 0.013301666182 0.0294613107742 0.0254168369791 0.0187830848109 0.0337456927151 0.0151760493477 0.0360233288761 0.0161149469416 0.039042024755 0.00229536147376 0.0468249873675 0.0157583667263 0.0310761119725 0.0155497505138 0.0090301180649 0.0126416375855 0.0110159110748 0.0254616235228 0.0242814349621 0.0236690592627 0.00236651040215 0.00842631126501 0.0122777482071 0.0387720000407 0.041740632348 0.0402615455592 0.013434165421 0.0259957062278 0.0279382933191 0.0176919201528 0.0210030594474 0.0190515742522 0.00605687883869 0.0125440326934 0.0183812478057 0.0234838433483 0.0213287295776 0.0102611349583 0.0367608397052 0.018305882063 0.0762459812633 0.0565232340764 0.0480647092458 0.0470080033305 0.0607210126742 0.0515562009886 0.0623134210102 0.0445281266442 0.0542656274802 0.0589172543408 0.0450145677229 0.0482495838943 0.0484339717661 0.0652417317109 0.0793204584838 0.0620264746962 0.0400173133601 0.0433798691859 0.0725797896424 0.0481813389954 0.055284998644 0.0628522019597 0.0554630904838 0.0404443368976 0.0493602212467 0.0332419109523 0.0398075629785 0.0413677301877 0.0589057964055 0.0278286603835 0.0454781228443 0.029186418008 0.0632373035893 0.027173160002 0.0466041993476 0.0516248397682 0.0694549695494 0.0414073101396 0.0429302830553 0.0451579600752 0.0633364240737 0.0552241510377 0.0565232340764 0.0584051969715 0.0667610558404 0.0584355181495 0.0512925402879 0.046128531904 0.0664605075068 0.0478081299752 0.0403784266437 0.00849189377523 0.0578244327435 0.0213782060591 0.0260735654855 0.0286868543518 0.0107633182991 0.0429130184438 0.049112317265 0.0332704837119 0.015321761445 0.0277153223765 0.0397499694056 0.0358925712782 0.0304111104426 0.027505083584 0.0362377250231 0.020296537393 0.0117771620381 0.0454349567531 0.033203078919 0.0404550655622 0.028050968973 0.0329121522515 0.0157822820327 0.0128529655968 0.0212960295437 0.0481179953609 0.0170390332384 0.0197624290813 0.029414246654 0.0176689832365 0.0290804953813 0.0317312604538 0.0173770193477 0.0255273516204 0.0167054579942 0.0259572392414 0.0381174742782 0.0168503391466 0.0510138836142 0.0385473731826 0.0388016187658 0.0368178557203 0.04276997017 0.0503778656709 0.0392641023806 0.0497809957465 0.0564266766196 0.0332095636962 0.0188695135337 0.0387787813789 0.0331502464834 0.0483979502244 0.0548055143427 0.035228159998 0.0294466884888 0.0272290139414 0.0724784935896 0.0548011964122 0.0344489111929 0.0380672364964 0.060026483594 0.0303284751736 0.0272545178904 0.0327801045139 0.0239410636139 0.0177611799925 0.0444007657806 0.0400513163792 0.0497786040376 0.0204852863736 0.0470867569115 0.0308376722615 0.0532970554221 0.0452748414675 0.0407821021663 0.0268849282918 0.0168086928609 0.0279020988959 0.0414910752652 0.0343097482389 0.0385473731826 0.0381367753126 0.0413101510581 0.0377465227401 0.0435171810289 0.0268955341281 0.0365057689544 0.0254190380854 0.0372013435687 0.018490846954 0.023945912793 0.0440067159299 0.0253810829497 0.0423576975539 0.0266775910883 0.0276067076791 0.0155964706338 0.0512008225103 0.0249293141549 0.0224091031216 0.0208182862063 0.0201027144741 0.0218258381078 0.00416795120123 0.0250523436876 0.0291897433081 0.0336104473732 0.0126474260294 0.0179897427224 0.0236687976248 0.0357767564718 0.0479080621505 0.0493839683144 0.0213027411218 0.0127962715487 0.0389577422313 0.0207982711984 0.0248766740175 0.0272195414617 0.0164396805465 0.0239043019084 0.0253433507519 0.0357454256498 0.0316012688091 0.0218891275488 0.046006369731 0.0279699723289 0.0753592714385 0.0538300830176 0.0427234551893 0.0442120918411 0.0575724115573 0.0438794711912 0.0617203772126 0.0368175055007 0.0452394206226 0.0586608041232 0.0462735571883 0.0428932945735 0.0449361857949 0.0608531076963 0.0771129194067 0.0618336393757 0.0380658785095 0.0436894906412 0.0627047512052 0.0382553066725 0.0531191059331 0.0620656917263 0.0459127944105 0.0362899248016 0.0492167826913 0.0301637294202 0.0380460619309 0.0426550687382 0.0544072702012 0.0218332584664 0.0362322493618 0.031226533309 0.0587827461321 0.024852970378 0.0417700516252 0.0442659791406 0.0702283886386 0.0412678777108 0.0447863140602 0.0428258891548 0.0608093994885 0.0534400200237 0.0538300830176 0.0561072465285 0.0656581075266 0.0558523559264 0.0444818994194 0.044500683531 0.0680831562837 0.0488303143353 0.0536500814259 0.0217777943298 0.0182308184172 0.0213271967089 0.017640751735 0.0384313065823 0.0491331799987 0.0285490579199 0.0236508921207 0.0203518801552 0.0410544418794 0.0345949638149 0.024163451076 0.0208164937907 0.0331698057229 0.0214370208347 0.0129093004816 0.0378630437774 0.0285080143021 0.0349561724295 0.0213643314537 0.0378207671811 0.023156173716 0.0144257922467 0.0164328495191 0.0458898771597 0.0137078716838 0.0180512548912 0.0303444429836 0.0166949845236 0.0239375979831 0.0248141920509 0.0164642247089 0.0221495310709 0.0136759772653 0.0203492925476 0.0297801495496 0.012327304817 0.0589145352863 0.0454329273476 0.0436909431618 0.0429329583507 0.0496681092117 0.0546717056664 0.0472190839202 0.0531335572006 0.0601545762173 0.0404993410456 0.025351107679 0.0436326686228 0.0384109589864 0.0546942484238 0.0614849395874 0.0420121432296 0.0350678306139 0.034181943564 0.076607832627 0.0574938051354 0.0407284888751 0.0455392391661 0.0634559846389 0.0340449392101 0.0346886110004 0.0365094436091 0.0283668149646 0.0247441178114 0.0505723350307 0.0414268809452 0.0526572068528 0.0247442404176 0.0533283030157 0.0333480302269 0.0569330422551 0.0488445949836 0.0485166318417 0.0334202567015 0.0241088713298 0.0327605074387 0.0477602460683 0.037977730422 0.0454329273476 0.0450703466816 0.0481686005759 0.0425586735361 0.0473020173719 0.0326189496433 0.0442268465034 0.033265894657 0.0406164099076 0.0563656658624 0.0369501005762 0.0596090654503 0.0304778147307 0.0384204581231 0.0270915625525 0.0693260105947 0.0372136698768 0.037023479673 0.0317062741776 0.0317712182279 0.034804368211 0.0223060266021 0.0435100417127 0.047004084469 0.0362329082931 0.0256397756303 0.0233719185841 0.035627421568 0.0521858971919 0.0650552610656 0.0654396577163 0.0372909018916 0.0208395075735 0.0532980934411 0.0387978654626 0.0393043110859 0.0433091405548 0.0302415541747 0.0340064333643 0.0421117035102 0.0478257550421 0.0466283489206 0.035247716101 0.054937797688 0.0434605477125 0.0930034854114 0.0710598303107 0.0590352084097 0.0604460830393 0.0745555173324 0.0571183440581 0.0793617023165 0.0484952151811 0.0566053521726 0.0768259736839 0.0646780127707 0.0592344115045 0.0623544010763 0.0773513341111 0.0945306112415 0.0799933849368 0.0552426925494 0.0610368934489 0.0726391747026 0.0486086004123 0.0708765879781 0.0800292786375 0.0558578611463 0.0537011940437 0.0672777153371 0.0461852109805 0.0561622363977 0.0610513630375 0.0708198771797 0.0350965268909 0.0484124521051 0.0486964562823 0.075256407672 0.04111323881 0.0515712020719 0.0592740141065 0.0884497661149 0.0586350703024 0.0632023881374 0.0606979638812 0.078320587954 0.0707259147977 0.0710598303107 0.0736338137855 0.0835800603427 0.0732101393079 0.0599496433571 0.0625510181289 0.0864139348042 0.0667637091982 0.0350728110176 0.0244007367668 0.0194418255357 0.0278046770383 0.0387260088041 0.0187288873365 0.0305873095592 0.0241694671072 0.0257451620145 0.0153815378858 0.021353060898 0.0215496497445 0.0200984831417 0.0151985245998 0.0110228413253 0.0387908454863 0.0190085239065 0.026530841158 0.0213969993651 0.0238500818663 0.0245406806879 0.0294364678495 0.0140120927131 0.0331219747793 0.0211978333105 0.0108265764026 0.00897607251111 0.00677241917437 0.0173770286262 0.0245814114194 0.00563326172159 0.0204952689406 0.0138047466575 0.0168569359655 0.0438273371107 0.0133334601758 0.0592456323654 0.0408071286879 0.0355509485261 0.031081872872 0.0452073820968 0.0410054777303 0.04495248578 0.0356498623047 0.0456510923283 0.0431383529174 0.0306345228853 0.0358468154266 0.0353265194622 0.0511623196634 0.0646276367384 0.0471382277373 0.0240229200194 0.0254553208119 0.0642596486532 0.0418982548195 0.0409421092482 0.0466753277343 0.0478887558589 0.0293373407147 0.0326161841904 0.0195735225778 0.0272641873276 0.0254981680323 0.0447040552558 0.0215611560931 0.0381253844376 0.0111199895155 0.0491745036263 0.0145691145727 0.0368088577033 0.0425091408325 0.0528722213324 0.0238501784613 0.0272505069941 0.0325614342759 0.0492627638247 0.0449950723976 0.0408071286879 0.042880253884 0.0517160325388 0.0466599102029 0.0415966376912 0.0321745745193 0.0499813496989 0.030016506883 0.0195067443548 0.034042657808 0.0387050626348 0.0607833234632 0.0322025711177 0.0402462250605 0.019510297358 0.0548235012014 0.0429595771314 0.0252279466187 0.0223273919125 0.0407231129516 0.0368354815518 0.0293953937656 0.0290463736365 0.0328461116776 0.035143771121 0.0215923461726 0.0549385181088 0.0388660143681 0.023623079783 0.0246479181765 0.0539903453268 0.0196033552608 0.0309786977565 0.0425462811063 0.0289476729073 0.0283702078661 0.0228452205014 0.0295421719187 0.0252210967901 0.0230772437036 0.0240590413191 0.0135013916275 0.0218148808282 0.0760114892469 0.0634029220478 0.0607879784498 0.0607163777171 0.0675569624906 0.0711706523576 0.0650651993965 0.0685468614076 0.0760185520266 0.0575507664821 0.0425210776149 0.0606855343213 0.0555229333703 0.0720565340813 0.0774071503121 0.0581416488422 0.0527363337967 0.0521637490438 0.0926239124524 0.0722776295267 0.0578783465588 0.0627903946651 0.0789206671037 0.0503951188312 0.0527646858335 0.0526096570134 0.04527903594 0.0427992547678 0.0682205850017 0.0547141937568 0.067807383273 0.0414244261778 0.0707718291801 0.0483573376556 0.0717861683592 0.0644987372167 0.0647006499463 0.0513517515126 0.0419564687506 0.0495341433982 0.064364362053 0.0518587226049 0.0634029220478 0.0627776825589 0.0645131806296 0.0578143875392 0.0631581345522 0.0499505499876 0.0600491597535 0.0513712453732 0.034450057717 0.0238219725869 0.0465207238958 0.0139550218762 0.0437148052069 0.00245848843359 0.0406705408218 0.027996084796 0.00617634742576 0.0042140797155 0.0226171443798 0.0276920922451 0.023535776763 0.0178395839466 0.0140356715542 0.0166022608919 0.00395476408572 0.0457707350729 0.0404789526881 0.0327219703849 0.0114454148489 0.0362680793242 0.0217463268752 0.0196365744138 0.030477863462 0.0206103562172 0.0102714385383 0.00460445870022 0.0203218526125 0.0212018784388 0.0183586998171 0.00829854248447 0.0218572079865 0.0144443422105 0.0767877803745 0.0594466868469 0.0529468255635 0.0532520366965 0.0637146030163 0.0600960587419 0.0639510014921 0.0553587219012 0.0637257572972 0.0581054381403 0.0427611569751 0.0529559974475 0.050488809742 0.0679805704334 0.0784814462329 0.0599903091584 0.0453120703317 0.0472956572051 0.081207762841 0.0585100350392 0.0557351056658 0.0628545029747 0.0657746195642 0.0431635890019 0.0505766161122 0.0416755044323 0.0404647152471 0.0409948112567 0.0627553433594 0.0398795409571 0.0548556307871 0.0337749376373 0.0662751646447 0.0362650420971 0.058753352182 0.0559719307576 0.0677796526261 0.0456851568449 0.0415580901724 0.0455930571155 0.0632638085815 0.0519953365762 0.0594466868469 0.0601182129397 0.0655928087235 0.0568949371894 0.0552051980285 0.0466604473635 0.0640269526764 0.0493532376221 0.0428114080859 0.0513187599237 0.0353300715155 0.0136841990953 0.0339659047401 0.0392151216672 0.0331598693815 0.0346578423583 0.0330024342773 0.038276947888 0.0230224626975 0.0145213724276 0.0501490398304 0.0358866478447 0.0428680377048 0.0326728263648 0.0285835471973 0.0062386073831 0.0158573158736 0.0257280664001 0.0503050577684 0.0188536314021 0.0230369129683 0.0250256284162 0.0171680840121 0.0324912467925 0.0363869094834 0.0177612063031 0.0250245943265 0.0179627656197 0.0294197347692 0.0465091219099 0.0203095862842 0.0478795030574 0.0357982238192 0.0376241763265 0.0315623347361 0.0401002610089 0.0474897864671 0.0350582543035 0.0460362585126 0.0538318698513 0.0325365856585 0.0213227378076 0.0377990397126 0.0335693240845 0.0471274543161 0.054885621667 0.0360897261843 0.0253548565171 0.0209548211511 0.0704293001167 0.0527939534511 0.0346935966786 0.0364130601336 0.0572327947958 0.0318390512051 0.0244040617426 0.0286768378156 0.0261566126157 0.0173773142125 0.0423900706098 0.037171182215 0.0481110975007 0.0159454061909 0.0456669379702 0.0274665151098 0.0469607798152 0.0462908705234 0.039158298024 0.0212460794033 0.0171141394847 0.0299475002492 0.0420369583583 0.0395076063195 0.0357982238192 0.0363456286371 0.0414629362584 0.0409765644808 0.0445581081298 0.027819794971 0.035217696192 0.0204081888775 0.0536229831874 0.0147412411033 0.0555896434003 0.0257773616784 0.0440411962897 0.0177255540439 0.0193829905731 0.0239978426404 0.0256940264499 0.0393410530504 0.0352411367288 0.0221731284836 0.0182277280594 0.0123391761488 0.020654487001 0.0493059373458 0.0475681206642 0.0451873269558 0.025880190654 0.0390288508413 0.0309214453223 0.0313196281309 0.0264802426158 0.0266703711652 0.0198006836859 0.019520741807 0.0278514155812 0.0221034761072 0.026690732588 0.0196134707881 0.0412756734602 0.0265178671443 0.0867397306197 0.0682110021203 0.0611304199736 0.0570363597121 0.0725160802101 0.0632079822129 0.072465417084 0.0544582268199 0.0658094706322 0.0704919404627 0.0569226677141 0.0614294730407 0.0618668588016 0.0780403185985 0.0918397178914 0.0740264863472 0.0508436174709 0.0525989509117 0.0847012354501 0.0597190404435 0.0681089165817 0.0742388101657 0.0664380426823 0.0545769816583 0.0603124830305 0.0434291774759 0.0533790593767 0.0526730162139 0.07136820435 0.037381607524 0.0577096830472 0.0386410478706 0.0759869972218 0.0373998132392 0.052181569916 0.0660810261842 0.0798969360666 0.0510826914494 0.0540234946407 0.0588039304452 0.0763291167757 0.0694007087698 0.0682110021203 0.0704124305268 0.0789271737863 0.0724038719993 0.0657040131714 0.0590995697111 0.0765722724394 0.0574793382897 0.0411299322154 0.0539204969946 0.0448971315706 0.0161163886115 0.0424587591617 0.0433134103038 0.0424269061508 0.0282464178608 0.029088245744 0.0394507490162 0.0585960215177 0.0377541724349 0.0451043153526 0.0458829699472 0.0321616028135 0.0557124503126 0.0614547711288 0.0392057260171 0.0177559051904 0.0564954090624 0.0332181102648 0.0405454141429 0.0436595776199 0.0393478274847 0.0472383546112 0.0407140770645 0.0569892712332 0.049354627832 0.0439022116296 0.0637553975882 0.0455099918129 0.0646100490562 0.0426539647843 0.028431151743 0.0378227253234 0.0447657124399 0.0278050988657 0.0537117960824 0.0274550112394 0.027109787916 0.0505464931112 0.0435971104256 0.0283504838988 0.0329648689469 0.0443909167392 0.0625701957077 0.0530229796398 0.0343871989004 0.0426240079793 0.0396498771349 0.0213457948378 0.0419360502864 0.0525916757896 0.0283713421426 0.0258314536376 0.0439902997437 0.0303827915475 0.0319578433558 0.0415135400801 0.039276736137 0.0267873256159 0.0192565547583 0.03784586336 0.0425882783228 0.0300770949457 0.0411024644378 0.0235206108502 0.0627241786637 0.0400442811976 0.0439864971889 0.0336917004451 0.0474026229045 0.0427127785344 0.0426539647843 0.0447428873557 0.0545498150062 0.042821329639 0.024917555179 0.03656154349 0.0624685036836 0.0466134489709 0.0464211898017 0.0148261628982 0.0328892390973 0.0156382282878 0.00785541359441 0.0118772597644 0.013233811524 0.0262299374219 0.024092235964 0.0223052815816 0.00384479195153 0.00794260597132 0.0107672255318 0.0397240757159 0.0410257993957 0.038935751255 0.0130110302225 0.0282819504394 0.0262547979726 0.0181226466418 0.0211289335782 0.0182692961983 0.00567846812613 0.0110316054291 0.0179271098732 0.0214946645806 0.0199268176637 0.00875561948865 0.0354271933282 0.0171443662393 0.0766374045646 0.0572939392451 0.0492966948245 0.0478544225205 0.061544844174 0.0531089657897 0.0627070970919 0.0461191081801 0.0559975469422 0.0592703107177 0.045198111152 0.0494826907565 0.0493817865713 0.0662451441692 0.0799247658409 0.0623534855885 0.040791427856 0.0437433118438 0.0743922416686 0.0500539193261 0.0559768175635 0.0632764008918 0.057263588801 0.0415573436738 0.0497522962913 0.0342757495228 0.040553840562 0.0415809282216 0.0599519771943 0.0293556022635 0.0472716928172 0.029440558171 0.0642586667075 0.0282006776448 0.047766217977 0.0531327322745 0.069584244341 0.041867047458 0.0430265316703 0.045945636772 0.0640480645613 0.0558532996544 0.0572939392451 0.0591020248311 0.0672221887664 0.0591786574244 0.0527229760336 0.0467939943149 0.066452337221 0.048010057481 0.0426662887331 0.0439949614302 0.0453715955589 0.0447907897725 0.0421151539334 0.0471958607455 0.0276193449237 0.02275846799 0.0605343055308 0.046215555164 0.0540603153716 0.0428037480825 0.0313795261955 0.0125172459763 0.0208290281635 0.0350621941996 0.0569552641601 0.0299458792012 0.0309610087229 0.0366049420462 0.0292005950568 0.0426658539169 0.046550389751 0.0288402250941 0.037809939324 0.0299619998536 0.0401350153602 0.0525912191682 0.0310232912468 0.0370292782789 0.029362531619 0.0351405044644 0.0315813022426 0.0330583005053 0.0477931213785 0.0264557013575 0.0497838425895 0.0546676669155 0.0214340498054 0.0132666230167 0.0351245595911 0.0284887636401 0.0394555006358 0.0430107543153 0.024001610215 0.0265746605534 0.0212961513987 0.0686985381679 0.055308045978 0.0261438582005 0.0256904480148 0.0588231449389 0.030013743601 0.0177237336601 0.0340579413817 0.023239083403 0.0129096702298 0.0366510262704 0.0448114548715 0.0501265325324 0.0238298010541 0.0385248366721 0.0348349791307 0.0531258509004 0.0432244806886 0.0265717263897 0.0222990802833 0.0105547424712 0.0247433535936 0.0319856839059 0.0308056274733 0.029362531619 0.0282110860995 0.0297242114734 0.0317000113527 0.0411003820059 0.0219347750579 0.022168792283 0.0155469808263 0.0395024062804 0.0287670845389 0.00713435108734 0.00340555052012 0.0220748170877 0.0261325674803 0.0225086838709 0.0197301659136 0.0143163055062 0.0179547860371 0.00552830002832 0.044759241534 0.0400746442935 0.0324889323762 0.0105741309237 0.0352991764051 0.0223168808509 0.0183878728912 0.0306904112299 0.0206021475442 0.0104104939928 0.00670538845305 0.0199820984844 0.0226302237702 0.0187233601872 0.00907856174289 0.0219615297998 0.0143637742128 0.0753337380263 0.0579434032885 0.0513377916805 0.0521965044751 0.0621695045027 0.0588078748161 0.0626419440897 0.0544695113035 0.0624620281749 0.0565017669041 0.0411290585403 0.0513195597187 0.0487054775012 0.0662358469866 0.0766400648909 0.0582604755345 0.0441853596565 0.0463597810918 0.0797172873623 0.0573362873289 0.0539615186802 0.0612879452506 0.064613107429 0.0413483548752 0.0492060616579 0.0408536005927 0.0386658835072 0.0395835329499 0.0611338973657 0.0393645393569 0.053572584104 0.0330686361703 0.0645571164168 0.0355933171917 0.0584689678276 0.0540828717859 0.066313152361 0.0447064134304 0.0401381607957 0.0437269026711 0.0614075519202 0.0498319714223 0.0579434032885 0.0585128670581 0.0638402708268 0.0548281142484 0.0533071471302 0.0449195692472 0.0626153729552 0.0482343239424 0.0295703841711 0.0366619395227 0.036500768924 0.0216100790796 0.0202086133386 0.0291081498137 0.0538445159183 0.0304641791012 0.0384602037434 0.0388505887816 0.0184939827468 0.0431509831641 0.0514497599393 0.0311190761962 0.0193480902941 0.0458820296239 0.0240997287473 0.0258856149523 0.0318135695083 0.0318488388141 0.0408906139312 0.0292269134036 0.0455476970026 0.0384416242221 0.0355459730354 0.0604270677753 0.0357756191383 0.0579552498509 0.0353240752803 0.0225716123758 0.0257247517645 0.0383804782921 0.0215488097029 0.044948702922 0.0168022708851 0.0235401078242 0.0440963094143 0.0364932029322 0.0228797040221 0.0280879909327 0.0410984380147 0.0600604954457 0.0480533666552 0.0218775898923 0.029791578282 0.04158778439 0.0178882014032 0.0370867411707 0.0460836281119 0.0252155578724 0.0208740877353 0.0346851323104 0.0150019768994 0.0257835645737 0.0322493089661 0.0342156649906 0.0116183721538 0.0144931943243 0.0240188836176 0.0389068297986 0.0144502424291 0.0276541092905 0.0250061652639 0.0558771163058 0.0271661677907 0.0351271284352 0.0289684152137 0.0442230773604 0.0424650907505 0.0353240752803 0.0384614305736 0.0501641618566 0.0418657156844 0.0254781137454 0.0303709238998 0.055175185082 0.0355533707256 0.0226236551837 0.0257243733887 0.0188708962976 0.0280458447088 0.0259495603965 0.0358126700891 0.0173972925493 0.0203550537734 0.0241984077655 0.0326658712857 0.0374251933899 0.0415458358848 0.0220997016335 0.0314739029711 0.0297599572502 0.0224642058136 0.0101652715813 0.0184552115135 0.0190795074292 0.0255522841638 0.0188568594492 0.0233889500734 0.0229626929389 0.0201746110209 0.0490887418108 0.0229752614583 0.0721999639917 0.0528489482775 0.0457665690796 0.0402580156331 0.0570067559398 0.0466251225309 0.0575932728503 0.0376765605581 0.0495760090258 0.0573857799099 0.0457294834507 0.0461836275015 0.0478961825174 0.0628300939828 0.0782978077723 0.0617431168606 0.0349090738753 0.0372003973766 0.0687801137491 0.0442160827041 0.0545072221083 0.0604041835816 0.0503536267186 0.0412302683921 0.0462335606677 0.0265634879228 0.0409252862943 0.0403112510912 0.055713517152 0.0210444978159 0.042126696634 0.0241765196843 0.060672423249 0.020816933598 0.0350778856202 0.052005350197 0.067095717986 0.0355534496705 0.0422916670752 0.0461036815572 0.0628103650139 0.0591144676161 0.0528489482775 0.055715116829 0.0658580956838 0.0605104799512 0.0516473901424 0.0459913703308 0.0644951804376 0.0433395766961 0.00476396676703 0.0174479971383 0.0262117873028 0.0230803954362 0.0185627883328 0.00806620839217 0.0113814933623 0.00390319674762 0.0428177321428 0.0406615445683 0.0354624532828 0.0102263088249 0.0317971018832 0.0234656694869 0.0177926588758 0.0262276626577 0.0188776295133 0.00499606040594 0.00424685036617 0.0184558479833 0.02090066744 0.0184013332257 0.00554993882929 0.0277916235291 0.0146255258466 0.0766584518429 0.0582536091399 0.0509151171955 0.0506702158494 0.0625265075224 0.0566765790267 0.063296553303 0.0510181236531 0.0599592936046 0.0584198089247 0.0435074153396 0.0509940717271 0.0495661398107 0.0669266401341 0.0789376730305 0.0608280979649 0.0430167703447 0.0455496571569 0.0778333721022 0.054368608181 0.0555188693765 0.0628704456678 0.0616793859568 0.0418722056261 0.0499801315934 0.0381178178645 0.0399704213931 0.0409195428074 0.0612188756554 0.0349680364553 0.0510653686933 0.0315069690942 0.065089713199 0.0323745393338 0.0538917621299 0.0541667478451 0.0685063182149 0.0437802642661 0.0419063387522 0.0452698567868 0.063322234724 0.0532615551019 0.0582536091399 0.0594215850469 0.0661130238288 0.0575059193505 0.0535703049783 0.046311202915 0.0650382074097 0.0485914933238 0.018842155525 0.0240370427448 0.0209528738511 0.0208089534878 0.0111203801188 0.015917150662 0.00453488271341 0.0421322819802 0.0391458330884 0.0331083714381 0.00824403626512 0.0325132311882 0.0224847085725 0.015999516676 0.0277730715816 0.0186363801442 0.00708833477439 0.00642676690132 0.0178233234532 0.0220593051536 0.0178006297585 0.00678573265748 0.0253531080362 0.0132629896024 0.0741187095157 0.0561450172019 0.0491350925935 0.0497514221438 0.060382347286 0.0560370322524 0.0611402268324 0.051356658754 0.059586423134 0.0554899035837 0.04031824984 0.0491508161478 0.0470289167752 0.0645318276086 0.0757421493114 0.057544117742 0.0418388253062 0.0443100927117 0.0770487593095 0.0543425693403 0.0526585588221 0.0601234502371 0.0616298008584 0.039475560154 0.0476974484773 0.0379820027229 0.0371681460661 0.0383173623723 0.0591794106435 0.0360653613059 0.0506856040282 0.0307481929538 0.0627839311984 0.0325910275487 0.055237903563 0.0520576344331 0.0655568890209 0.042566036842 0.0391094232808 0.0423459347432 0.0602723002528 0.0493981873195 0.0561450172019 0.0569656980973 0.0629553672806 0.0540102942581 0.0513493159685 0.0435185067862 0.0620208318713 0.0466647868495 0.0214518595921 0.0250574648372 0.0327035392179 0.0101396500324 0.0173409936704 0.0207342919251 0.0332931627481 0.0438902497615 0.0452760516117 0.0173962021214 0.0155474932413 0.035097178823 0.0167075078514 0.0219356609327 0.0232161362242 0.0132718217012 0.0215035441799 0.0212520758854 0.0323731403418 0.0276797560909 0.0185474301296 0.0436301136913 0.0240030156204 0.0722858985812 0.0511085237891 0.0406650357841 0.0417405611462 0.0549851372416 0.0429543701734 0.0585838550979 0.0363293620395 0.0449605458738 0.0553495140321 0.0426335340052 0.0408304262584 0.0422933209142 0.0585800490211 0.0742997883793 0.058525226517 0.035206446299 0.0404435198283 0.0627381786217 0.038449263747 0.0501920171677 0.058888502058 0.0460241869732 0.0337463818569 0.0458812434451 0.0278046680998 0.0349131438742 0.0389869853015 0.0521722266345 0.0209043609517 0.0359181281747 0.0276204608178 0.056526179998 0.0222941226577 0.041152359144 0.0428797366789 0.0667722352073 0.0380782189511 0.0410414680557 0.0398735425148 0.0580112990116 0.0505852294836 0.0511085237891 0.0532571789631 0.0625496034306 0.0531021220011 0.042888351609 0.0413906647006 0.0644729984699 0.0453457651066 0.0107504885543 0.0445819304752 0.0242663168605 0.0336280858548 0.0265479358211 0.0206001571473 0.0282052030653 0.0325495864256 0.0168933846577 0.0294835383052 0.0291726320507 0.0086711740192 0.0221542204142 0.0179304565478 0.022368606911 0.0297212987281 0.0149126627655 0.0323363820236 0.0229519593576 0.0235384954017 0.0445361789109 0.0198724736323 0.0521573964273 0.0325036248406 0.025391360945 0.0274230805005 0.0366454630316 0.0344942582431 0.0390192491133 0.0331598239249 0.0393605141281 0.0342759827638 0.021260474927 0.0254073365966 0.0234580906639 0.0407813070352 0.054069225305 0.037293221414 0.0193616327469 0.0235535155332 0.0561408138747 0.0363119747552 0.0299684113953 0.0382284111131 0.0425406057591 0.0161350959097 0.0256650379468 0.0189027762255 0.0143744986934 0.0179840539103 0.0351859317755 0.0236434364907 0.0314452790447 0.0139598707264 0.0389431870684 0.016485382228 0.040355084472 0.0299825744277 0.0456481354326 0.0213868007101 0.0199817088813 0.0197684998025 0.0379808456048 0.0313521152981 0.0325036248406 0.0336827412775 0.0416843797906 0.0334784161986 0.0289224474022 0.0207816321212 0.0432746333929 0.0259935830061 0.0406061367838 0.0235468720047 0.0318323205013 0.0219961670771 0.0255808203638 0.0205571609912 0.0226267329863 0.013012280745 0.0369778751619 0.0187789289183 0.00874641080149 0.0197571101094 0.00977736627462 0.0202312308031 0.0257037864622 0.00771970434192 0.0231557657352 0.0133099999073 0.0187324692629 0.0392432332024 0.0115155558073 0.0539655210169 0.0370438046358 0.0333786958054 0.0316409822149 0.0414621149977 0.0426991016561 0.0406517401284 0.0403678402162 0.0480644681966 0.0361424947464 0.0218113942904 0.0334641673727 0.0302365918541 0.0468956611505 0.0577004528593 0.0391757625612 0.0236163775334 0.0242576354959 0.0653230280715 0.0452817250312 0.0345762397733 0.0404850805623 0.0511603238121 0.024886725311 0.0274569982987 0.0236904007661 0.0206352481789 0.0182697542476 0.041544522984 0.0289437440201 0.0406091261712 0.0126309522282 0.0451825068417 0.020490830418 0.0442568377481 0.0395946754396 0.0458654268305 0.0228937718071 0.0192636370802 0.0258703030154 0.0425840964507 0.0360074541747 0.0370438046358 0.0378930233244 0.0444471390747 0.0387351356827 0.0382610925586 0.0256300024801 0.0425154846229 0.0258478343265 0.0236633695184 0.0174990292841 0.0186530571476 0.0611247172591 0.0557656094279 0.0466088592976 0.0282320418304 0.0445464770565 0.0341524834412 0.0362512556468 0.0421364706395 0.0353354631726 0.0231187500774 0.0150626098763 0.0358189243099 0.0298015850374 0.0324439491366 0.0223980477721 0.0244141427415 0.0302418773665 0.0942328467355 0.076594072426 0.0693014297828 0.0689934026371 0.0808708035071 0.0745545238332 0.0811424703773 0.0680895982601 0.0772898278285 0.0757784502044 0.0604959493699 0.069358828284 0.0677179794145 0.0851546659241 0.0961465377952 0.0777040409423 0.0614342341624 0.0635105029946 0.0949910709403 0.0710640834394 0.0733442971825 0.0804630717269 0.0785569975811 0.0599979412685 0.0679000809486 0.0561320615274 0.0579270123928 0.0585056430456 0.0796324819571 0.0514612322157 0.068283919556 0.0494122791964 0.083373938553 0.0501855689957 0.06973964597 0.0718399524308 0.0852557355766 0.0618964253913 0.0591154896454 0.0630863991576 0.0809010142666 0.069276699042 0.076594072426 0.0775503896407 0.0833112406891 0.0743754315619 0.0713482849075 0.0642332894623 0.0813844341388 0.0662752735857 0.00943572253542 0.0115403490897 0.0385513754293 0.041736873589 0.0399182937318 0.0122452242861 0.025058464158 0.0280391379811 0.0165428935252 0.0220426648475 0.0191966494038 0.00476868066193 0.0119136882752 0.0182274158907 0.024378991238 0.0214350053307 0.00987681971674 0.0356319079498 0.0179231346829 0.0755450486118 0.0557883449648 0.0471764532756 0.0467952668235 0.0599617395979 0.0511011457957 0.0617632501287 0.0445144536833 0.0538325742859 0.0579584947727 0.0439095831377 0.0473266714409 0.047305404175 0.0642647315012 0.0781620294368 0.0608980895696 0.0396397814207 0.0431908772896 0.0719383279912 0.0477762451878 0.0541744509705 0.0619776318533 0.0551486398926 0.0392023772277 0.0486708484659 0.0332061436773 0.0385651962783 0.0405238673503 0.0580675371179 0.0281169946403 0.0449308552075 0.0290979509914 0.0622896414172 0.0272386507233 0.0473564201885 0.0503681043652 0.0686223309305 0.0411717919112 0.0420509879955 0.0438795889294 0.0621492769732 0.0535535915584 0.0557883449648 0.0575324110618 0.0656578520536 0.0569417414102 0.0500298962763 0.0450037013757 0.0656341911967 0.0473715492692 0.0144468889514 0.0470085725986 0.0485138320241 0.0451352115307 0.0199583230651 0.0301372822106 0.0318368515531 0.0256571286264 0.0278614622113 0.0258405224944 0.0121251490044 0.0124421067497 0.0257425497103 0.0259848999587 0.0265128839547 0.0147071440313 0.0356921243154 0.0239599037157 0.0844599977072 0.0649098127865 0.0563152793656 0.0552526867175 0.0691043038035 0.0592804769565 0.0705635348052 0.0516880380121 0.0615515055365 0.0669939251635 0.0527850317966 0.0564919445965 0.0566781222463 0.0735436571696 0.0873943668972 0.0699246931044 0.0483722118201 0.0515510652048 0.079719756552 0.0550353446586 0.0634817595673 0.0710367571435 0.0623974106591 0.0485852577555 0.0576004808055 0.0413084590066 0.0479219849808 0.0493882028299 0.0672450344951 0.0348287223508 0.0527462211198 0.037276801135 0.071549415301 0.0351894067592 0.0529630080357 0.0594111357934 0.0773657257414 0.0496448829109 0.0507905960575 0.0532464315334 0.0714643731585 0.0625646663061 0.0649098127865 0.0667401518449 0.0748051995393 0.0661923309263 0.0591726016457 0.0543093310288 0.074196762744 0.0559244370052 0.043526425057 0.0386335179446 0.0321768451862 0.00974615024856 0.0352347635745 0.0201959159339 0.0180776754132 0.0269400303578 0.0177526168011 0.0076128290146 0.00378003726334 0.0176983136317 0.0184021944475 0.015957334363 0.00467338620778 0.0252008449064 0.0123712673884 0.075769333126 0.0581585948517 0.051685391535 0.0510927438975 0.0624824329901 0.058237684953 0.0625760535583 0.0529652916573 0.0618856654756 0.0574514448673 0.0423317456956 0.0517508019275 0.0497149058646 0.0670867680773 0.0782168275888 0.0597219475669 0.0433096265158 0.0451925797267 0.0797528207091 0.0566461202307 0.0551309318768 0.0620350591031 0.0638200944876 0.0424059873805 0.0493045876457 0.0391604065434 0.0398454975082 0.039967724192 0.0615633801452 0.0371201263022 0.0531118088353 0.0313373664803 0.0653089870936 0.0335830893361 0.0556009421638 0.055317918307 0.0671296861942 0.0435900410315 0.0407047621897 0.0451219309698 0.062876852421 0.0526327547566 0.0581585948517 0.0591116735406 0.0652217833265 0.0570769673892 0.0545681643866 0.0459758175248 0.0634453480612 0.0477419996054 0.0302678050916 0.043643410877 0.0344015081898 0.0370220423378 0.041870658286 0.0264826423168 0.0239447061259 0.0294219290852 0.0381639993795 0.046622906961 0.0276160450358 0.0433656713185 0.0358877725536 0.0394027280044 0.0640596529703 0.0352660320463 0.0428200645336 0.0215929365207 0.0157178006612 0.00848045847957 0.0252717757761 0.0193974269851 0.0287059984697 0.018482386953 0.0255997786212 0.0310533244304 0.0267766622161 0.0163561213819 0.0202134806234 0.03120585866 0.04895305148 0.036414957876 0.00526673250197 0.012342309222 0.0430330254803 0.0254800237585 0.0266262246906 0.032239986602 0.0289090953163 0.0180202124552 0.0199181330431 0.00657470209208 0.019948180111 0.0209059906389 0.0237059104211 0.0188029876251 0.0211536929916 0.0148162018356 0.0289733910382 0.0123381921604 0.0242362829274 0.0258181102869 0.0413288399769 0.0100525363381 0.0238857865216 0.0223322555234 0.0341921837249 0.0380927560603 0.0215929365207 0.0255329039423 0.0383043472154 0.0356000313746 0.0249953874006 0.0211460552822 0.0407734262534 0.0193178864072 0.0180029141367 0.0318989553395 0.055546862882 0.0233316606029 0.0289827460324 0.0288090712213 0.0227692137274 0.0384790428766 0.0423072029606 0.0235668927239 0.02923399269 0.0234314824709 0.0353361736228 0.0517306479462 0.0262806947106 0.0449202216804 0.0352666691701 0.0392752718621 0.0317034826189 0.0393329164331 0.0490036652351 0.0325915526781 0.0480657848217 0.0556144972514 0.0314856186317 0.0229568301755 0.0394863344353 0.0351981784458 0.0468732286627 0.0534614036052 0.0352961935447 0.0267660200432 0.0206247795688 0.0716485928619 0.0553558677376 0.0350658679333 0.0348297205048 0.0591015265332 0.0349050611526 0.0239450314084 0.0312292238968 0.0291976883203 0.0191245738332 0.0424715605102 0.0407160306554 0.0507428891398 0.0195019979736 0.0455419926359 0.03094049167 0.0480027022309 0.0486981223658 0.0364405293098 0.0216724201002 0.0185311393183 0.0322264249099 0.0418711782883 0.0415641388928 0.0352666691701 0.0357541599092 0.040359691621 0.0422344237589 0.0468672273606 0.0294846892119 0.0324923805449 0.019122055634 0.028756827183 0.0587035417373 0.0144079071022 0.0301136242831 0.0361947314748 0.0239369814187 0.0355016994114 0.0354103580658 0.0251937444079 0.0240593800606 0.0195703439645 0.0308533101673 0.0370972551577 0.0220259748313 0.0576270076145 0.0487199724465 0.0508215730415 0.0469075647824 0.0527931212734 0.0620087731623 0.046977227863 0.0607033064427 0.0681905343994 0.0417090362137 0.0294084394516 0.0508408090071 0.0450400867986 0.0589677823649 0.0627613332544 0.0433082894199 0.0402642195426 0.0363046359117 0.084449006206 0.0666097386489 0.0449981598795 0.0463289168121 0.0716590868723 0.0429897098207 0.0369198960753 0.0432687121664 0.0364322199569 0.0287560795721 0.0553568599314 0.0500592177291 0.0617693212505 0.0302484927047 0.057817398636 0.0410079662048 0.0620054930234 0.0578523465697 0.0464641684152 0.0365865801942 0.0272374209649 0.0399576916682 0.0513227964118 0.0446516670985 0.0487199724465 0.0480806958126 0.0495453699635 0.0482845333883 0.0560302897599 0.0385013240981 0.0415333749992 0.0339802993211 0.0315416974034 0.0191639032899 0.00845591360235 0.0214341775937 0.0115218935447 0.00798589270321 0.013178045677 0.0100207917484 0.0199483776485 0.012776598265 0.00707708079363 0.0310463483447 0.00779811122226 0.0665120827305 0.0484731432285 0.0421114253952 0.0418216626354 0.0527853739739 0.0493966141428 0.0532439640509 0.0450980317427 0.0534929652418 0.0482563107324 0.0334028573772 0.0421738253769 0.0400650763191 0.0574010770653 0.0690115183659 0.0507807835016 0.033887277172 0.0360916940356 0.0712074753299 0.0488889567075 0.0456112729946 0.052712754383 0.0558191941722 0.0328832629679 0.0398769847778 0.0305626616722 0.03027845702 0.0307126203306 0.051853149134 0.0304315085387 0.0449208583046 0.0225669791691 0.0556104755493 0.0254498384131 0.0488668504899 0.0462046921677 0.0583599392562 0.0343786096194 0.0317076229625 0.0356254179774 0.0534761774586 0.0442401179536 0.0484731432285 0.0494784680372 0.0560638562362 0.0481022882275 0.0453399462887 0.0364100969213 0.0549637988767 0.0386182470618 0.0499647144567 0.0286991839096 0.0337581082348 0.0374427591873 0.0282526339036 0.0355267981937 0.0350362485208 0.0478325170984 0.0425063748067 0.0336958297594 0.0552821351039 0.0385952701325 0.0756759815417 0.0533281139759 0.0401812481707 0.0447968354881 0.0564105044414 0.0391525826608 0.0629279047421 0.0332827070938 0.0388499692511 0.059944716429 0.0494848197832 0.0402828974015 0.0438747097228 0.0580998054312 0.0757410641548 0.0628856838636 0.039846534973 0.047063496141 0.0543336344875 0.0312551117596 0.052807685198 0.0627916823231 0.0390112066642 0.0353058185357 0.0513654740192 0.0323261929775 0.0392211101217 0.0463708307148 0.0519963158873 0.0234224809867 0.0301000678074 0.0372829629985 0.056085164213 0.0288004220361 0.0417416575715 0.0389119081863 0.0720657500645 0.0444323135884 0.0487706488559 0.0429521653792 0.0596874437499 0.052997284605 0.0533281139759 0.055723410021 0.0657462146584 0.0546473494099 0.0397492903292 0.0452841873006 0.0707319601823 0.0522103619845 0.0233361726138 0.027152976334 0.0145101369991 0.0239084572879 0.0231796409398 0.016731423623 0.010101659051 0.00781108168527 0.0186261838058 0.0315054768721 0.011535154356 0.0661583467836 0.0529737197777 0.0515726376237 0.0472342284059 0.0573866872941 0.0602508051558 0.0535888133028 0.0563499220883 0.0655740867856 0.0494619373879 0.0355566546043 0.0516986354459 0.0478914383755 0.0636133913461 0.0714227137745 0.0519652065027 0.040040966538 0.0379888138015 0.0833863881089 0.0624232672218 0.0504889561622 0.0539483262888 0.0682863371673 0.0434492287718 0.0419221148541 0.0393420375143 0.0383919560321 0.0330409365388 0.0586345177546 0.0426935993753 0.0582011555148 0.0271038932712 0.0620596992058 0.0353264927481 0.0565229896235 0.0582751327845 0.0564224406826 0.0375222198637 0.032781658946 0.0431629716317 0.0579468986629 0.0506284295544 0.0529737197777 0.0534601982596 0.057907553496 0.0543043024926 0.0568716124285 0.0423649825393 0.0520169525452 0.0387128090446 0.0188041113809 0.0118952838684 0.0140246174547 0.0212962400935 0.00885470160798 0.025142494638 0.0164130694781 0.0148836892075 0.0382106616301 0.012548123562 0.0595024177002 0.0405144987261 0.0336829979036 0.0339109092342 0.0447786612887 0.0412528753098 0.0460796810618 0.0378073897699 0.0456289595962 0.0415318567716 0.0274434917532 0.0337586538145 0.0320559171837 0.0493065770936 0.0620181140557 0.044443934423 0.0259210454652 0.0290199212383 0.0631931226882 0.0415500215307 0.0381432011516 0.0457001329437 0.0482419653282 0.0247624956339 0.0326912275918 0.0231122641396 0.0226732232029 0.0241582823353 0.0435758556102 0.024717419625 0.037259551901 0.0161507334564 0.0474557435456 0.0186437176733 0.0428749718429 0.0381563349544 0.0522572394535 0.0270598018866 0.0256825354187 0.028101885414 0.0461630275758 0.0383904744963 0.0405144987261 0.041758354552 0.0492909187408 0.0413606774947 0.0372601462253 0.0289047461458 0.049343864353 0.0319066136889 0.0140884736377 0.0220949123029 0.0294588701998 0.0141915109934 0.0236402055251 0.0202701530019 0.0222961106051 0.0508328337578 0.0209048958304 0.0623063919994 0.0435137888223 0.0379179155361 0.0310595169631 0.0477275300573 0.0401401417297 0.0476510837343 0.0326069267264 0.0442002914704 0.048031576146 0.0373260310255 0.0383688546713 0.0396828967833 0.0540671732006 0.0691161945626 0.052697233895 0.0256698443155 0.0271866198766 0.063343063446 0.0401717345523 0.0456835007162 0.0508390224232 0.0457136947621 0.0340506342939 0.0366331778515 0.0185292352758 0.0332180639746 0.031402826069 0.0470047522912 0.0178796862446 0.0373117201537 0.0146755143259 0.0519441438124 0.0134308953908 0.0305516636587 0.0455547559496 0.0574314455133 0.025677142017 0.0334820400224 0.038185075996 0.053981408775 0.0519396327628 0.0435137888223 0.0464090712113 0.0566586435278 0.0526391071675 0.0449104072539 0.0375180555166 0.0549667946861 0.0334290223836 0.0161979126548 0.0212360948185 0.00313302296585 0.0148689509772 0.00704616989296 0.0135603719097 0.0384674432624 0.00748847746612 0.0612097252086 0.0442840466006 0.040253243803 0.0360606427738 0.0487530949526 0.0470778914902 0.0473392259982 0.0422963534873 0.051949068182 0.0444929580638 0.0309270188278 0.040473799777 0.0386243677637 0.0547837147046 0.066413370926 0.0479885282668 0.0287291459439 0.0288822795748 0.0702829288423 0.0483322868723 0.0432975336344 0.0484818516534 0.0543652596123 0.0329738645592 0.0348525988976 0.0258401695463 0.029652318833 0.0266204166929 0.0488217477328 0.0282325775461 0.0443695558327 0.0152728890442 0.0529346931915 0.0211960241124 0.0432358961175 0.0470042201915 0.0535566647123 0.027654993588 0.0276975587847 0.0349524016669 0.051450438001 0.0457471816551 0.0442840466006 0.0457673454519 0.0531390087147 0.0482613634351 0.0459084957324 0.0344895940573 0.0501063288839 0.0320407745768 0.00918896575074 0.0152928703979 0.0213827580606 0.0175694634428 0.00562421953864 0.0321021314886 0.0136468651148 0.0732793088732 0.0542749513511 0.0465599433205 0.0461499050441 0.0585282720374 0.0518386762248 0.0596896497046 0.0460357977086 0.0551020502351 0.055347044484 0.0408456006547 0.0466734650365 0.0457685420886 0.0629790052567 0.0758414718388 0.0580725583953 0.0386295601195 0.0415657641172 0.0731303485703 0.0495368191967 0.0520897347287 0.0595893389246 0.0567976430466 0.0379647331116 0.046441942626 0.0333063038869 0.036500108881 0.0377849182347 0.0570420811998 0.030012797008 0.0462545479693 0.027461418846 0.0610786707463 0.0275181743774 0.0490679602747 0.0500650525841 0.0657243645716 0.0396831631678 0.0390548397455 0.0418579268325 0.0600259300869 0.0509169565607 0.0542749513511 0.0557017357111 0.0631094362549 0.0546387182457 0.049518990394 0.0428637051261 0.0625010516077 0.0450876329039 0.0212339329669 0.0205215987455 0.0193863377449 0.00780222226267 0.0244911121423 0.0160871853235 0.0794295187203 0.0616053956912 0.0547043851777 0.0543405312398 0.065903416382 0.0608093966938 0.066232208671 0.0551996275352 0.0641635601661 0.0610614868167 0.0459223913813 0.0547672174246 0.0529488520021 0.0703578675954 0.081658744309 0.063265127216 0.046621662518 0.0487339053303 0.0819943915105 0.0586031447424 0.058550915637 0.0656481691263 0.065908662167 0.0454276311919 0.0529363521846 0.0420305180364 0.0431442291715 0.0436296366503 0.0648039964872 0.0390809908814 0.0552779379516 0.0347675148936 0.0685677387884 0.0363124697872 0.0577513229251 0.0579440183076 0.0708163109663 0.0470812852612 0.0443909494169 0.0483964045026 0.0662606542355 0.055662814312 0.0616053956912 0.0625961650479 0.0687432253304 0.0602433308395 0.0572909174214 0.0493875071422 0.0671416550914 0.051430941132 0.0176886906331 0.00927892520724 0.0135248076976 0.0386449359276 0.00800171044068 0.0600153322548 0.0424684845259 0.0378068586886 0.0345103555887 0.0469162632965 0.044830307306 0.0461600332306 0.040366688607 0.0496446456688 0.0429723253644 0.0292480429291 0.0380026884561 0.0362133523808 0.0526530252718 0.0646507321938 0.046401756397 0.0269368048123 0.0278152961494 0.0678508831968 0.0459682894465 0.0412431425852 0.0469952418705 0.0521326959742 0.0302237793371 0.0333696851677 0.0240543524356 0.0271406206916 0.0250182744726 0.0466959485275 0.0265020349694 0.0419000008026 0.0139599809083 0.0507909794153 0.0193885955935 0.0423195771966 0.0441873849773 0.0525088605043 0.0263754966172 0.0262639235251 0.0325133748369 0.0494223408625 0.0434143928247 0.0424684845259 0.0439360734198 0.0514706200386 0.0459476778298 0.0431249041549 0.0322850478478 0.0492075262735 0.0310084454102 0.0100495790147 0.0163467110294 0.0344303173981 0.0138069903297 0.0725561849391 0.0577945355153 0.0549392051976 0.0494983401957 0.0622636335656 0.0613281176125 0.0591564733558 0.055493289997 0.0660163516694 0.0564238014063 0.0428263617367 0.0551692935595 0.0528843814502 0.0687090576791 0.0786138592889 0.0595588928727 0.0427108568825 0.041401774003 0.084635719422 0.0620469795992 0.0566375025559 0.0605458826833 0.0680826326606 0.0475957607451 0.0475121922821 0.0395532575369 0.0436869591597 0.0392259763169 0.0629613789201 0.0403138291944 0.0584854937624 0.0290090498587 0.0669476358426 0.0346983343078 0.0538333844175 0.0617823249939 0.0639146571596 0.0406990904981 0.0395983575205 0.0488304003282 0.0645174644364 0.0580105192199 0.0577945355153 0.0590354282227 0.0651460923012 0.0612394393036 0.0606595939265 0.0481508588685 0.059835663962 0.0439114917806 0.0129734005291 0.03341718436 0.00522839839082 0.0644629130549 0.0490781090479 0.0460393397147 0.042060104717 0.0535473784021 0.0537667869164 0.051142158888 0.0493088817338 0.0587609555936 0.047452874403 0.0333145084294 0.0462018313471 0.0433659094036 0.0595851004773 0.0694769331379 0.0504124171924 0.034671039268 0.0338977868767 0.0768809318577 0.0551957563061 0.0471765984426 0.0517762151648 0.0612752535588 0.0380650031758 0.0388085089346 0.0327052071067 0.0338902731124 0.0299610722521 0.054082097785 0.0351427472718 0.0511360689963 0.0213341577068 0.0578680354373 0.0282202368919 0.0499673113862 0.0525352197686 0.0557073834724 0.0329893658613 0.0303826410135 0.0390336792828 0.055051644837 0.0480885204528 0.0490781090479 0.0500556489468 0.0560168186449 0.0513666437929 0.0513150683738 0.038531174408 0.0517653307967 0.0358776775011 0.0293027668161 0.00949293329263 0.0725916210374 0.0547194436592 0.0483620571735 0.0469816749901 0.0590799074957 0.0545464429945 0.0590974756513 0.0490311503881 0.0583273766433 0.0546626805606 0.0398779297173 0.0484777367952 0.0468025950712 0.0639880374892 0.0757199402524 0.0573199482995 0.0393352512936 0.0411552751652 0.0764775433632 0.0532445829203 0.052349146311 0.0590579753428 0.0602574471507 0.039602885829 0.0459481099263 0.0349175810863 0.037150941259 0.03692168916 0.0582151479375 0.0331340211018 0.0497159727507 0.0271028830882 0.0621502493207 0.0292960379946 0.0512053897158 0.0526539904442 0.0643939446385 0.0395489605444 0.0378591872997 0.0425337328718 0.0602822057384 0.0511975943751 0.0547194436592 0.0559279154126 0.0626694858218 0.0551041885347 0.0518894661445 0.0431638732605 0.0608387750183 0.0441361499894 0.0310183369902 0.0871660444405 0.0733823196322 0.0689340787316 0.0705597518969 0.0774366556509 0.07861295118 0.076322371958 0.075585060054 0.0826717778434 0.0681219966699 0.0528565530205 0.0687776982924 0.0640973745197 0.0810751053908 0.0869333145725 0.0682988428223 0.0623918658396 0.0630905228705 0.0989058396189 0.0780506774957 0.0672923155095 0.0734447484338 0.0852286487915 0.0580045491026 0.0635565107431 0.0611199283903 0.0538632888957 0.0534691027903 0.0772908944799 0.0610905623861 0.073927736475 0.0514266311669 0.0797776498939 0.0563654161709 0.0797411714169 0.0709112220147 0.075991910188 0.061929266059 0.0528794637266 0.0580761513446 0.0735774043698 0.0591743277341 0.0733823196322 0.0727567267189 0.0745131906994 0.065799040936 0.0698581828462 0.0592195179672 0.0715468662712 0.0627789092372 0.0648080233561 0.0484745494015 0.0442686485072 0.0419227062634 0.0529072690322 0.05220865754 0.0515658331236 0.0480206916873 0.056947174509 0.0470499747083 0.0323100366631 0.0443750009709 0.0415450201967 0.0583606796016 0.0686531977281 0.0497286282257 0.0341488382347 0.0345013563823 0.0748626932863 0.0530450676854 0.0459172064129 0.0515384326883 0.0594738121093 0.0355453778886 0.038659716641 0.0319368788596 0.0317165879728 0.0293867131129 0.0529269518286 0.0336846365247 0.0489212862277 0.021422361173 0.0566364033836 0.0272163294484 0.0501093106191 0.0498104699827 0.056059086848 0.0332712049783 0.0299486671345 0.0369730112559 0.0537844555125 0.0455932312627 0.0484745494015 0.0493458255088 0.0553162838774 0.0492693292197 0.0486803630647 0.0369835817896 0.0522579331221 0.0364683447074 0.022730708667 0.036743783492 0.0359076620395 0.0204805867516 0.0463990865864 0.0147686048767 0.0549817963395 0.0525592871928 0.0196223614467 0.0349129145261 0.0366443799136 0.0327544499352 0.0228629827418 0.017026958725 0.0209966358066 0.0388626349727 0.035298115438 0.0567980979705 0.0582058906835 0.0248891314561 0.0145753449597 0.0570907866116 0.0413833987479 0.0269969183741 0.0492024913366 0.039440986454 0.0359176091053 0.0265520996515 0.0615044403055 0.0540461620767 0.0485288037826 0.0239710979892 0.0540724881457 0.0603640513646 0.0428978851084 0.0134027017241 0.0368991356344 0.0354211161184 0.0355257446359 0.0210753154172 0.0377446845484 0.022730708667 0.0201673641607 0.0164841811953 0.0313109932769 0.041027522952 0.0326196770584 0.0184701671719 0.0295244972329 0.0144112105736 0.0158826147242 0.00448936000965 0.0256749628733 0.0117360219999 0.0336843126425 0.0324372887253 0.0146677582401 0.0224513170291 0.0144322007261 0.0126899376427 0.0122323800999 0.0277700509569 0.0197834641463 0.0180901487399 0.0184584697146 0.0418096588931 0.0367452397055 0.0108947935426 0.0131136689852 0.0371795334759 0.0204476192567 0.0118634455346 0.0280193213775 0.0206906520081 0.0208413846069 0.00805992628737 0.0397245591306 0.032104964073 0.0301985227624 0.0107001908888 0.0330988349255 0.0415195660786 0.0230606485279 0.0236410923325 0.0187109927435 0.0222023475244 0.0175662614613 0.0151089228932 0.0279798538754 0.0 0.00504787707871 0.0188703006517 0.0219245561497 0.0212095981034 0.0149942492526 0.0252687339312 0.016225955903 0.014982874816 0.0165713440517 0.0153992347708 0.0258128425881 0.0233194300829 0.0216404069707 0.0254243329386 0.0254506863873 0.000788850240312 0.00972288497974 0.0186083951584 0.0381473811219 0.0294157845108 0.0147578085456 0.0211609731312 0.0342335739858 0.0241609615185 0.0173732430671 0.0259324451415 0.0264222187829 0.0114741578552 0.0193298399608 0.0206022299244 0.0166568971164 0.0229188388297 0.0118905814083 0.0295550989457 0.0189848877848 0.0268759492012 0.0164070102936 0.0252554335694 0.0350869023834 0.0115237799469 0.0366507700029 0.0195520445986 0.0253794363549 0.0152320827299 0.0231766024476 0.028592244401 0.0144112105736 0.0173074040909 0.0296651493536 0.0243710502336 0.0103105434217 0.0155263675354 0.0374184940592 0.0231136537684 0.0190194510466 0.0188364876977 0.0221985054079 0.0214172478398 0.0257446692843 0.0273354856863 0.0275203255805 0.0156705691302 0.0195445751869 0.0258686776409 0.0435616108671 0.0331590462603 0.00822908256455 0.0111578554098 0.0408350390305 0.0282065307084 0.0237933699021 0.0272090918986 0.029489839001 0.0211107451245 0.0171676820259 0.0146997004559 0.0226821224304 0.022183640748 0.0185118691459 0.0264356522916 0.0241910879615 0.0208215741795 0.0237366538469 0.0205889692169 0.0263075431581 0.0263185412116 0.036342074994 0.0103523538982 0.0247947799759 0.0232770954007 0.0303205821473 0.0382875192266 0.0158826147242 0.0205185838207 0.033936913628 0.0342591359421 0.0252819239657 0.0211775313941 0.0366164619483 0.0168683582115 0.0265527528137 0.0122930639405 0.0356399190513 0.0329283261088 0.0161748547301 0.0260907486468 0.0165355786656 0.0155013603686 0.00871939649167 0.0250375042482 0.0205784254424 0.0221880849182 0.0226228234946 0.0402265547715 0.0380348851944 0.0126404460089 0.0132955588731 0.037673161045 0.023685130291 0.0159536871846 0.0317445670434 0.0244407629294 0.0250650773838 0.00665080674841 0.0431354773139 0.0336884150562 0.0346100496205 0.00755310734613 0.037025240188 0.043753914844 0.0237910793513 0.023601769275 0.0229675330633 0.0262374537149 0.0207694947791 0.0142462256068 0.0294419901123 0.00448936000965 0.00600179744469 0.0181950411243 0.0225874743282 0.0220819669003 0.0185630904749 0.0261141108628 0.0202600233978 0.0359510556228 0.0122181959079 0.00715556619596 0.0393252590156 0.0398773260728 0.015944130912 0.025117898688 0.0279596047113 0.0495072405762 0.0438343802676 0.0223301740975 0.0291958566192 0.0238057945893 0.0121408308676 0.0320439133203 0.0386704894061 0.0116681269474 0.0246115626131 0.0320654848123 0.02212022544 0.0306066666749 0.0360151785428 0.0212925403107 0.0265520435189 0.0096564754612 0.0336990775918 0.0258669646258 0.0271355620099 0.0255831511409 0.0192288539502 0.0492946436623 0.0275425360484 0.0388140188539 0.0303333899385 0.0366778253264 0.0435686919256 0.0256749628733 0.0298872725089 0.043124071299 0.0391147976424 0.020010154166 0.0305524053833 0.0506217525372 0.0340993001213 0.0427032875962 0.0428000340065 0.0127191401929 0.0244302586973 0.0258873530415 0.0224665589838 0.0196473040025 0.0259734946343 0.0180766430627 0.0245847379502 0.0205530555257 0.0515531804399 0.047284161103 0.0168752313645 0.0093274994833 0.0472940785154 0.0299859804517 0.013568861355 0.0349261393238 0.0278394065303 0.0233159306106 0.018729490125 0.0474594716238 0.0428441003445 0.0340535271365 0.0192623858156 0.0396592952666 0.0474504224755 0.0346317498496 0.0155232846365 0.0221965807346 0.023519540409 0.0251795457747 0.0186807942123 0.0328466600284 0.0117360219999 0.0111390258469 0.0171063233969 0.027248122956 0.0326787410905 0.0216187767654 0.0174724607588 0.0153838329478 0.013043913361 0.0463610530412 0.0437380208469 0.0239671160531 0.0322222363953 0.0387763357271 0.0597848214293 0.0513617728094 0.0233595904168 0.0301944308891 0.0320013483014 0.010613155035 0.0399275999718 0.0464560281456 0.0134988892532 0.0290788786594 0.0367911394695 0.0175534572334 0.0343523037935 0.0386269072909 0.0314326304477 0.0171757591643 0.0105270444576 0.0306360966619 0.0365489530298 0.0211256372062 0.0155275027866 0.0282406353658 0.0565789653078 0.0282583663219 0.0416523037157 0.0359394330813 0.0459783038684 0.0506220203623 0.0336843126425 0.0381881672141 0.0517807652888 0.0474506190651 0.0289707556044 0.0360504295798 0.0570578425896 0.0371145976129 0.0460576692202 0.0464080290911 0.0220712004031 0.0312574889523 0.0332251791601 0.054841891687 0.0503036463483 0.028999517533 0.0360798173432 0.0193249539307 0.00826557354917 0.0383933246971 0.0453200679143 0.00495350657916 0.0300295268949 0.0391229254289 0.0271682846269 0.036533385441 0.0426841669003 0.0272844902637 0.0287077471132 0.00927183865749 0.0394174170837 0.0313084618098 0.0314758507766 0.0267668687054 0.022518491913 0.05600898249 0.0343402195218 0.045509854552 0.0363226467926 0.0425348706975 0.0488168350062 0.0324372887253 0.0364696219213 0.0493441352532 0.0445105561012 0.0238995483109 0.0369592605884 0.0574925847452 0.0411978099793 0.0155890245102 0.0251635522565 0.0177733966699 0.020295344741 0.0224627747939 0.00622985531203 0.0261058920982 0.0236064364637 0.0550881017687 0.0493624804622 0.00949195374034 0.00547982782741 0.0508785947136 0.0251610996387 0.0119430843146 0.0365988456521 0.0213251727582 0.0179868212343 0.0207990673061 0.0485594746656 0.044214664825 0.0334335462828 0.0201922684831 0.0401754502972 0.0535325351547 0.0317074448278 0.0123261383208 0.0244676333996 0.0171629247157 0.0177983318365 0.0115555789303 0.021116940732 0.0146677582401 0.0105358367361 0.00915254671069 0.0167177891777 0.0294167459865 0.0147897849251 0.0123457776793 0.0164773765795 0.0252103273152 0.0171988861049 0.0305685435552 0.0365843208441 0.0175183238357 0.0218496748957 0.0205878945245 0.0593121863314 0.0470793832619 0.0159816216856 0.020744505382 0.0508661739809 0.018760262956 0.0128710885205 0.0300992820345 0.0117566522917 0.00679248320348 0.0280357325772 0.040552704264 0.0415859654681 0.0232256372519 0.0295874345059 0.0314690999231 0.0507965688951 0.0314591977122 0.0256867489287 0.0204093797109 0.00501434925534 0.0122277574576 0.0226603353781 0.0187158051887 0.0224513170291 0.020695499337 0.0231928239165 0.0198154038419 0.0292814261752 0.0103125125409 0.0227651885673 0.0153489133169 0.00921470910295 0.0183064776985 0.0377227049932 0.0290274791546 0.0152667053733 0.0215933253328 0.0343731361054 0.0245700487863 0.0169471424987 0.0257260078813 0.0268671065769 0.0111334970897 0.0193681705086 0.0211865368155 0.0163734248392 0.0228777878657 0.0117963493804 0.030068869871 0.0193762721713 0.027229886316 0.0161367068103 0.025740037188 0.0358416431275 0.0109673463454 0.0364509080414 0.0199965660095 0.0252914478428 0.014773865842 0.0226846344514 0.0279231861054 0.0144322007261 0.0171240275822 0.0292730788831 0.0236979129564 0.00966001570023 0.0151974508598 0.0372251985508 0.023311727536 0.0176051360114 0.032564167101 0.0208965631668 0.0168197313548 0.0207764664023 0.0423976172234 0.033280884693 0.00922898632458 0.0197200489933 0.0360385863631 0.00893473638299 0.014132357355 0.0250685285695 0.0103719683171 0.0167517993882 0.0135716425012 0.0350532380107 0.027879799306 0.0265658749664 0.015993421345 0.0286771298489 0.0428550440411 0.0151980773887 0.0298292088786 0.0196261415194 0.0184891599574 0.00655621912452 0.016322105066 0.0195353045374 0.0126899376427 0.0127701290018 0.0223217848231 0.0157154460048 0.0129568955631 0.00690277207156 0.0299954575682 0.0193817024498 0.0216771607077 0.0225658582257 0.0286138040807 0.0305011727447 0.0368382394098 0.0388439321615 0.0148355509953 0.0174423915339 0.0380129595202 0.0258082909988 0.0229842208153 0.0373470514825 0.0277476701907 0.0308564780706 0.00775830938446 0.0476084837369 0.0347450599297 0.0411478727988 0.00231111578025 0.0424821924039 0.0488975441679 0.0213563138315 0.0271270574956 0.0304501786922 0.0318897260431 0.0231190177025 0.0126379860304 0.0283589858381 0.0122323800999 0.0114136835682 0.0186791916183 0.0206672138954 0.0199079464104 0.0222007080182 0.0303110417953 0.0280827256688 0.0197052367937 0.0449418080277 0.0438182248518 0.0562345701188 0.0602081091792 0.0243728506009 0.019370550695 0.0596171194363 0.0411146925258 0.0330451422406 0.0550957050319 0.039836592047 0.0399228025142 0.0284759591968 0.0663825437409 0.0558252777705 0.0548034680532 0.0236830779253 0.0595333433641 0.0686676458986 0.0397842689041 0.0197958382609 0.0446061287137 0.0392287195509 0.0347118369491 0.0164026290561 0.0305214779366 0.0277700509569 0.0235155079857 0.0135888018548 0.0240589544851 0.0380160024194 0.0333951182547 0.0242014401746 0.0377621051763 0.0314790157987 0.029423203836 0.0582327389784 0.0535477924002 0.0121411421616 0.00926081168701 0.0551978876015 0.028043323191 0.0176337854836 0.041735927557 0.023998617859 0.0217227463265 0.0246395690903 0.0532994548372 0.0483234850835 0.0380931811444 0.0229416680066 0.0449797181572 0.059280772983 0.0338814552602 0.0120128740103 0.0301325195322 0.0203844916972 0.0200232099081 0.0110576598728 0.0182627991321 0.0197834641463 0.0150522414851 0.006556855609 0.0144048387324 0.0315801243453 0.0179150623078 0.0119668288225 0.022167313587 0.00841936493113 0.0453128226707 0.029523676844 0.0223084484022 0.0276272783534 0.0327625901905 0.0158536182647 0.0147737513682 0.0106741877313 0.0162753926733 0.0159900539559 0.0215767754577 0.023165172617 0.0247814128516 0.0137331692872 0.0264980088885 0.0153005942866 0.0291348842471 0.0254286093168 0.0364522562324 0.00599431682769 0.0189173783639 0.0184393411187 0.0301213577678 0.0340540018144 0.0180901487399 0.0215314467503 0.0337154513722 0.0315978293722 0.024169684578 0.0166816873996 0.0356875981931 0.0143747226708 0.0514837021891 0.0372994668391 0.0230531280792 0.0250236859971 0.0398047566678 0.021934356719 0.0118568359564 0.016712157857 0.0198275637831 0.0143476538676 0.0244078681037 0.0292462046489 0.0328036706334 0.014376575397 0.0286902071785 0.0204063466033 0.0328369650405 0.0322219054124 0.0320787692664 0.00266433410273 0.0165423262191 0.0215926529236 0.03047036768 0.0358252300263 0.0184584697146 0.0213100670766 0.032046547675 0.0333108429689 0.0306570115485 0.018573514939 0.030845411182 0.00824349209933 0.0254197321026 0.047324533609 0.0530498030585 0.0193482837408 0.0436475526218 0.0516271254066 0.0457976820229 0.0502335440929 0.0569904536613 0.0344485460271 0.0478896186827 0.0272539439051 0.0572698534085 0.0358919394369 0.050424643016 0.0434868500285 0.0309009333379 0.0632686594285 0.0501928388473 0.0594250482186 0.0482632028717 0.0482478127894 0.0570074387196 0.0418096588931 0.0448198518438 0.0553205633247 0.0514202209421 0.0325934353049 0.0491031454545 0.0660730408504 0.0548573842682 0.041501827818 0.0494594306994 0.00785967991178 0.0297803384368 0.0414124759052 0.0250716250932 0.0363814861914 0.0430927179021 0.0324719682551 0.0232534554573 0.00557282966442 0.0375065288364 0.0368003051347 0.0279998159154 0.0252506405295 0.0244125277036 0.0601405054627 0.0351799654171 0.0460355764213 0.0372310571496 0.0466115069454 0.0500875517655 0.0367452397055 0.0406580228721 0.0534802351733 0.0469702184582 0.0259083864948 0.0383091416944 0.0609916135179 0.0430915691708 0.0113258711014 0.0432937210726 0.0175511998728 0.0124157338497 0.03212454916 0.0158561794962 0.0176896387613 0.0143093876737 0.043181186929 0.0362893217044 0.0315177649353 0.0141883840024 0.0359022033885 0.0492746305333 0.0223018781484 0.0211045193185 0.0229404408443 0.0181288833884 0.0110415500412 0.00837364985146 0.0172572597582 0.0108947935426 0.00733209366776 0.0131427681285 0.0115359384743 0.0199994152339 0.0092535804352 0.0217603350968 0.0184515208125 0.0501255669434 0.0279388443296 0.0142651752221 0.0382528821443 0.0251771073359 0.0222405400165 0.018907996804 0.050407441851 0.0445874581383 0.03644061978 0.0176520694999 0.0424414179548 0.05338489352 0.0323923780445 0.0108812710336 0.0260958051981 0.0217902651406 0.0213471493056 0.0109405604951 0.0249968133743 0.0131136689852 0.00893536297262 0.00802513881767 0.0192978256402 0.0302167707341 0.018365059649 0.0130926236805 0.0184689475202 0.0343186729394 0.0436186327673 0.0296745080858 0.0408423177906 0.0469164023153 0.0321355072481 0.0293927572919 0.0115197032526 0.0423686398976 0.036129628995 0.0335484782832 0.0259949361948 0.0269704035297 0.0607621523939 0.0380404513983 0.049798653181 0.0409231346593 0.0474755392541 0.0535032395417 0.0371795334759 0.0413092694389 0.054257484038 0.0493594143559 0.0284802931744 0.0415978746211 0.0622229836323 0.0453773607077 0.0190484002067 0.0207749590973 0.00729318592678 0.0172314224853 0.0208211767145 0.0287420582694 0.0242194382748 0.0225231335589 0.0240241380028 0.0229680498334 0.0402905798782 0.0150429891355 0.0374592753112 0.0199314954492 0.0195088829088 0.00836639606005 0.0247669201274 0.0222507048525 0.0204476192567 0.021382719754 0.0305241597933 0.0212891172726 0.0134776031268 0.0107610654817 0.0367912026131 0.0227467739819 0.0252412358335 0.0153803531506 0.0101093922522 0.0191555088988 0.0375470144869 0.0363071087647 0.0222024666973 0.021689493319 0.0288400411309 0.0426974513075 0.0286740878663 0.0220177373135 0.0125507954062 0.0111145943691 0.0144555489867 0.0195277194831 0.0258649050915 0.0118634455346 0.0120062047089 0.0205457113931 0.0226933950128 0.0265812358015 0.010518368073 0.0210005232169 0.00605049088221 0.0227443548737 0.0240543202468 0.0298445720969 0.0127076622649 0.0212764877573 0.0130936058244 0.0350960563748 0.00616350137707 0.0220053566886 0.029182207808 0.0470447673611 0.0143549158293 0.0270200109504 0.0261798064669 0.0399469917707 0.0417589617676 0.0280193213775 0.0317524179632 0.0441157592928 0.0402109444472 0.0286518076954 0.0255338040061 0.0460635600013 0.0240522825965 0.0109052701432 0.0235077295524 0.0318665250498 0.0308330797717 0.0201941994246 0.026209699134 0.024272445381 0.0437154276666 0.0215651164399 0.0334110813047 0.0182660118628 0.0127706309369 0.00547043300996 0.0236736081076 0.0193715054877 0.0206906520081 0.0206326054685 0.0278093020752 0.0196854448654 0.0196839348285 0.00687772387853 0.0318861086105 0.0187829482374 0.026787715043 0.0349795665731 0.0377560197701 0.0169430774361 0.0294826475268 0.02554791035 0.044564230482 0.0307872765104 0.0282156909894 0.0140157312571 0.00304825224888 0.013131876158 0.0254598849649 0.0242359050423 0.0208413846069 0.0206178921833 0.0265921223132 0.024263714379 0.0287692622655 0.0105411880456 0.0255889461915 0.0107722057824 0.040112260752 0.0281920691871 0.0346799127455 0.00547299312148 0.0351698801996 0.0413927767406 0.0178561632488 0.0295704831304 0.0240442618733 0.028433519767 0.0198981190422 0.0164655446546 0.0293872770207 0.00805992628737 0.0103936152637 0.0224915115769 0.0226675446032 0.0164308167554 0.0187959028502 0.0318543120786 0.0236941138036 0.0214366809685 0.02158460699 0.0453234846239 0.0100348820296 0.0205571695519 0.0349449705288 0.0594353543617 0.0269232145172 0.0378563722335 0.0357646095878 0.0508614713562 0.0504482642845 0.0397245591306 0.0434432071263 0.055747628056 0.0497669350857 0.035138779746 0.0361053959246 0.0583555321158 0.0365217793435 0.0331608473129 0.0326376645366 0.0244797200401 0.0260351758605 0.0198255233977 0.055257342683 0.030607412773 0.0406724640229 0.0316826493706 0.0417015250124 0.044714144963 0.032104964073 0.0358439539437 0.0485265392209 0.0417397589401 0.0211023329973 0.0328093106913 0.055937896155 0.0382216948189 0.039178382683 0.0116462448464 0.0328449320294 0.0356452166019 0.0431040247851 0.0127555033307 0.0192172916283 0.0248029464024 0.0398126039657 0.0387676066679 0.0301985227624 0.0325088097853 0.0421224110282 0.0389248491362 0.0344395222458 0.0235149407659 0.0407276725105 0.0194230824244 0.0402634745964 0.0467109968717 0.0198309327046 0.0277799641062 0.0285372209353 0.0306922978338 0.0217975015009 0.0133715864954 0.0282760151712 0.0107001908888 0.0106288988311 0.0196086000788 0.0208164998238 0.0183683750797 0.0208677693371 0.0306825719595 0.0267116346537 0.0244223076771 0.0326854873354 0.0507787766717 0.0180800830921 0.0283453513368 0.0285692206738 0.0439964220236 0.0435330479692 0.0330988349255 0.0364104267178 0.047999984958 0.0430530022579 0.0322085934623 0.0282999450485 0.049271623839 0.0273166054796 0.0425206430225 0.0621747559979 0.0316259435967 0.0474306721161 0.0460270405303 0.055722110458 0.0616108763567 0.0415195660786 0.0463779068274 0.0600405303926 0.058487923658 0.0428330727641 0.0451145046508 0.0622811849491 0.040848815271 0.0429266615699 0.0304603009077 0.0328680598837 0.0193092495687 0.0257358921646 0.0276472175985 0.0230606485279 0.0242829569209 0.0335562675322 0.0240112096757 0.0023427193432 0.0215758461563 0.0440130376785 0.0333268924093 0.0336594835101 0.0267459293135 0.0300685155468 0.0190916149163 0.0302108808069 0.0236410923325 0.0197983357166 0.0116623663768 0.025981149508 0.0407083432987 0.0270506742353 0.00533601555818 0.0243947872794 0.0165388277645 0.0203993556991 0.0306449706863 0.0351570407904 0.0187109927435 0.0216936002715 0.0328125704384 0.0328483395342 0.0289711567156 0.0177290185247 0.0324417191457 0.00990245486371 0.0144435719572 0.0253854499058 0.0235470613048 0.0222023475244 0.0213735089495 0.0257216217897 0.0239916366178 0.0307770932602 0.0118559544137 0.0237036848381 0.0117425310805 0.0184555467145 0.0157796168272 0.0175662614613 0.0166625646078 0.0231975140243 0.0146299258577 0.0171445810537 0.00397360286698 0.029169512627 0.0192796522734 0.0184254094366 0.0151089228932 0.0104342480435 0.00810789324855 0.0108902089943 0.0236280097789 0.017384613998 0.0213096795304 0.0252727380791 0.0279798538754 0.0244605767611 0.021500625639 0.00796997392989 0.0256665045822 0.0176058458155 0.0292950203769 0.0310442784549 0.00504787707871 0.0188703006517 0.0219245561497 0.0212095981034 0.0149942492526 0.0252687339312 0.016225955903 0.0138989004364 0.0180767927652 0.0222193332382 0.0141002986592 0.0215877207325 0.0172352062998 0.0156454524782 0.031383424491 0.0212505739868 0.0142951058056 0.0253431933269 0.0219030212003 0.0156518397703 0.0263438271284 0.0285058962486 0.0193626993311 0.0417261059969 0.0313743437253 0.0260801912789 0.0155074292908 0.0227467684355
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8ed5b9653f4ed88e146d2d5dc5b032537b426f8b
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-jensenshannon-ml.txt
@@ -0,0 +1 @@
+0.320369972991 0.338972466 0.308199372323 0.3452431902 0.310024768313 0.357115225615 0.311131096357 0.357391534414 0.329718053755 0.347365921475 0.335272625287 0.336451560653 0.33015370606 0.369628769749 0.344499490029 0.321622508707 0.345377707016 0.321007207534 0.350728979121 0.32809430086 0.30207071308 0.291663252492 0.30760470102 0.315976639534 0.308132467187 0.313014586878 0.310463895925 0.321091616502 0.290044394125 0.322213459935 0.315509196522 0.3331114403 0.281071919202 0.320854431887 0.332190658438 0.299342730178 0.313528775154 0.310049073937 0.288821516545 0.307662081954 0.328387688508 0.317185603454 0.332046170365 0.291912213887 0.37870970117 0.336080073379 0.304593343921 0.330138983604 0.355071759299 0.311946140607 0.302025400768 0.330940761586 0.351140062502 0.354772884287 0.272605322053 0.327957349848 0.28871110366 0.320821172951 0.340976919806 0.30757488831 0.320975346884 0.252776262329 0.314549731907 0.326876483 0.337684418756 0.296520013735 0.31493077245 0.327721982167 0.325802862624 0.341908184107 0.300481749419 0.312499767894 0.301061762121 0.27665157989 0.3082566692 0.287466396145 0.288313694552 0.296629698731 0.283556095025 0.322489360684 0.280765581604 0.297958166613 0.313189657041 0.303470399659 0.348652898212 0.331594734387 0.299446687464 0.339047458559 0.286979246044 0.316326095312 0.321618884109 0.330065896317 0.324500638067 0.328300795872 0.309002568222 0.262587468469 0.31974123777 0.286316182293 0.321162329165 0.328160620315 0.356618051635 0.289733970648 0.344507756538 0.301485561986 0.335785898715 0.322635066518 0.331480718646 0.297897604494 0.306942928189 0.350843442517 0.342585296966 0.341311053315 0.306780105123 0.313401804298 0.319978145568 0.302460397612 0.346105758567 0.312802351189 0.331552275517 0.321624157344 0.318798118247 0.301906095501 0.301585920138 0.314556178985 0.333215221158 0.306929663844 0.317083256901 0.309667679181 0.306529028004 0.30865993751 0.296031907986 0.28742420979 0.311584483038 0.319043629504 0.330278008622 0.314466433681 0.327937382021 0.296448162218 0.307033121385 0.296391953011 0.292691206116 0.297146209653 0.307929858983 0.291863681454 0.307300188104 0.306597817799 0.34718100163 0.317436210259 0.29952626739 0.330762834707 0.334951064852 0.323806678898 0.296203706701 0.33398466797 0.344931265559 0.293948734727 0.332764639313 0.272651853935 0.317324315923 0.300493570867 0.307008231016 0.333263322802 0.31390648462 0.332416491248 0.314766869708 0.321015549211 0.322909289307 0.356882966656 0.310596945263 0.343939748528 0.286269629586 0.33173459898 0.323848483719 0.305841388975 0.319266258167 0.34012363898 0.3443280395 0.353885654057 0.320544729867 0.353280499623 0.315621795536 0.312176062734 0.301562130879 0.312061680573 0.312642847966 0.326222109701 0.357417912858 0.313083593142 0.334033412713 0.295630506074
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..dc396c8c16032b9657101532f7e08e6aa04b2aea
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml-iris.txt
@@ -0,0 +1 @@
+   5.0817745e-01   4.4535192e-01   5.6700421e-01   1.2418578e-01   4.8927739e-01   5.0180477e-01   1.4096146e-01   8.1242502e-01   4.1586001e-01   3.2586371e-01   3.2586371e-01   5.2942799e-01   8.6137722e-01   7.7039952e-01   9.7270522e-01   4.5581864e-01   1.0000000e-01   6.3861009e-01   3.0546431e-01   3.7427929e-01   2.5251796e-01   5.6700421e-01   3.8776762e-01   5.2942799e-01   5.0905001e-01   2.5651975e-01   1.2418578e-01   1.2418578e-01   4.5470518e-01   4.5470518e-01   3.2816937e-01   6.0181382e-01   7.3457830e-01   4.1586001e-01   3.2586371e-01   4.0147421e-01   4.1586001e-01   7.6752131e-01   1.2418578e-01   1.4096146e-01   1.2396136e+00   7.1462831e-01   4.1449626e-01   5.3588338e-01   5.2942799e-01   3.2352160e-01   5.2862779e-01   2.5251796e-01   2.0656129e-01   3.5031395e+00   3.2158090e+00   3.6682165e+00   2.7164367e+00   3.3288934e+00   3.1477087e+00   3.4033622e+00   2.0308266e+00   3.3209346e+00   2.5912926e+00   2.3257069e+00   2.8912179e+00   2.7273721e+00   3.3660466e+00   2.2876649e+00   3.1664710e+00   3.1642132e+00   2.7448172e+00   3.2474124e+00   2.5734684e+00   3.5025969e+00   2.6980573e+00   3.5983434e+00   3.3515288e+00   3.0113552e+00   3.1469325e+00   3.5526357e+00   3.7475562e+00   3.1812462e+00   2.1818668e+00   2.4927109e+00   2.3909738e+00   2.5729378e+00   3.7711998e+00   3.1620401e+00   3.1916270e+00   3.4478147e+00   3.1312883e+00   2.7541224e+00   2.6886547e+00   3.0483897e+00   3.2685282e+00   2.6752185e+00   2.0587064e+00   2.8619072e+00   2.8416143e+00   2.8554471e+00   2.9845926e+00   1.7697734e+00   2.7640668e+00   4.7690606e+00   3.8067806e+00   4.6866422e+00   4.2843668e+00   4.5417384e+00   5.4120246e+00   3.2161426e+00   5.0569442e+00   4.5165793e+00   4.9462324e+00   3.8595100e+00   4.0249346e+00   4.2787236e+00   3.7387507e+00   3.9160762e+00   4.0938708e+00   4.2028863e+00   5.5316487e+00   5.7297286e+00   3.6968486e+00   4.5074741e+00   3.6330985e+00   5.5146761e+00   3.6293227e+00   4.4495340e+00   4.7599229e+00   3.5255287e+00   3.6076762e+00   4.3339547e+00   4.5590471e+00   4.8997298e+00   5.2856169e+00   4.3511402e+00   3.7760534e+00   4.2460554e+00   5.0103780e+00   4.3808704e+00   4.1939019e+00   3.5087649e+00   4.2018804e+00   4.4140402e+00   3.9807996e+00   3.8067806e+00   4.6775324e+00   4.5250934e+00   4.0376133e+00   3.7473276e+00   3.9523060e+00   4.1709262e+00   3.7872951e+00   2.5251796e-01   3.0546431e-01   6.0060595e-01   9.5035453e-01   4.4535192e-01   4.0293660e-01   5.0090417e-01   1.4096146e-01   7.6752131e-01   4.1449626e-01   1.2418578e-01   6.2024833e-01   1.1845977e+00   1.4700179e+00   9.4309624e-01   5.0905001e-01   1.0003617e+00   8.0358695e-01   5.8851328e-01   7.0826681e-01   6.6384020e-01   4.3456114e-01   5.6700421e-01   2.0656129e-01   4.2667565e-01   5.2942799e-01   4.4417983e-01   2.8192292e-01   2.1269358e-01   5.7324170e-01   1.1056650e+00   1.2393677e+00   1.4096146e-01   2.5251796e-01   6.8961791e-01   1.4096146e-01   5.0090417e-01   4.1449626e-01   5.0270183e-01   7.3535471e-01   5.0905001e-01   5.7324170e-01   8.5690100e-01   1.2418578e-01   8.0587320e-01   3.2352160e-01   7.3496673e-01   3.0275928e-01   3.5601468e+00   3.2472699e+00   3.7137483e+00   2.6693888e+00   3.3563815e+00   3.1472333e+00   3.4276314e+00   1.9506288e+00   3.3563695e+00   2.5739370e+00   2.1870094e+00   2.9033014e+00   2.6860278e+00   3.3789262e+00   2.2884830e+00   3.2153154e+00   3.1667333e+00   2.7423060e+00   3.2269725e+00   2.5465772e+00   3.5123782e+00   2.7147889e+00   3.6030381e+00   3.3619470e+00   3.0427908e+00   3.1888219e+00   3.5910272e+00   3.7805671e+00   3.1921903e+00   2.1611020e+00   2.4491518e+00   2.3430978e+00   2.5700421e+00   3.7741357e+00   3.1615131e+00   3.2084454e+00   3.4884789e+00   3.1228939e+00   2.7575407e+00   2.6617768e+00   3.0343591e+00   3.2842184e+00   2.6656374e+00   1.9595652e+00   2.8539100e+00   2.8474367e+00   2.8585579e+00   3.0059712e+00   1.6867642e+00   2.7634340e+00   4.7806735e+00   3.8055585e+00   4.7194850e+00   4.2963997e+00   4.5579706e+00   5.4507801e+00   3.1945300e+00   5.0903533e+00   4.5297786e+00   4.9814379e+00   3.8841455e+00   4.0376849e+00   4.3069372e+00   3.7284750e+00   3.9173293e+00   4.1124749e+00   4.2221165e+00   5.5759608e+00   5.7633066e+00   3.6758942e+00   4.5370189e+00   3.6312130e+00   5.5536680e+00   3.6416405e+00   4.4736906e+00   4.7961103e+00   3.5380868e+00   3.6203213e+00   4.3467079e+00   4.5977693e+00   4.9380624e+00   5.3421274e+00   4.3637834e+00   3.7899304e+00   4.2477635e+00   5.0602038e+00   4.3953045e+00   4.2110583e+00   3.5192753e+00   4.2358121e+00   4.4378207e+00   4.0189525e+00   3.8055585e+00   4.7017335e+00   4.5483787e+00   4.0656879e+00   3.7516222e+00   3.9742971e+00   4.1845313e+00   3.7939847e+00   2.1269358e-01   4.4535192e-01   8.9366705e-01   2.1845981e-01   3.4378533e-01   3.7427929e-01   2.5651975e-01   7.7039952e-01   3.2586371e-01   2.1845981e-01   4.2667565e-01   1.2113327e+00   1.3801284e+00   8.7175869e-01   4.4651726e-01   1.0719360e+00   6.5223271e-01   7.3813096e-01   5.7867728e-01   4.4535192e-01   5.2655962e-01   6.0611244e-01   3.8776762e-01   4.0176783e-01   5.3588338e-01   5.0905001e-01   3.0000000e-01   3.0546431e-01   7.1169738e-01   9.4309624e-01   1.1327825e+00   2.5651975e-01   3.0275928e-01   8.1067767e-01   2.5651975e-01   3.2352160e-01   4.2538717e-01   3.7427929e-01   9.0252542e-01   3.0000000e-01   5.1138698e-01   7.7869083e-01   2.1845981e-01   6.6384020e-01   1.2418578e-01   6.9325418e-01   3.0546431e-01   3.7098973e+00   3.3770904e+00   3.8553941e+00   2.7868575e+00   3.4895316e+00   3.2571492e+00   3.5499573e+00   2.0646687e+00   3.4944845e+00   2.6743800e+00   2.3196869e+00   3.0181476e+00   2.8270253e+00   3.4973911e+00   2.3997585e+00   3.3600102e+00   3.2716172e+00   2.8619072e+00   3.3597438e+00   2.6649106e+00   3.6203213e+00   2.8440609e+00   3.7280682e+00   3.4822008e+00   3.1786890e+00   3.3296038e+00   3.7325066e+00   3.9121945e+00   3.3084060e+00   2.2888897e+00   2.5683989e+00   2.4649412e+00   2.6906230e+00   3.8866112e+00   3.2625043e+00   3.3219248e+00   3.6264668e+00   3.2609948e+00   2.8656468e+00   2.7738624e+00   3.1430282e+00   3.4033622e+00   2.7865812e+00   2.0797392e+00   2.9638836e+00   2.9589097e+00   2.9695568e+00   3.1337459e+00   1.7991433e+00   2.8758936e+00   4.8875515e+00   3.9111857e+00   4.8490379e+00   4.4107143e+00   4.6725771e+00   5.5854254e+00   3.2933477e+00   5.2226262e+00   4.6541348e+00   5.1068487e+00   4.0049607e+00   4.1564977e+00   4.4321573e+00   3.8331006e+00   4.0161098e+00   4.2255639e+00   4.3417782e+00   5.7091264e+00   5.8970064e+00   3.7961619e+00   4.6611065e+00   3.7313856e+00   5.6903014e+00   3.7618406e+00   4.5942943e+00   4.9290197e+00   3.6553612e+00   3.7333492e+00   4.4613366e+00   4.7342792e+00   5.0749049e+00   5.4844039e+00   4.4774673e+00   3.9102500e+00   4.3611782e+00   5.2016658e+00   4.5034762e+00   4.3281161e+00   3.6300436e+00   4.3648112e+00   4.5562166e+00   4.1482002e+00   3.9111857e+00   4.8218416e+00   4.6648403e+00   4.1879434e+00   3.8717400e+00   4.0945154e+00   4.2919258e+00   3.9013483e+00   5.6700421e-01   9.9714776e-01   3.0546431e-01   4.4417983e-01   2.5251796e-01   3.0275928e-01   8.8835966e-01   3.2586371e-01   2.1845981e-01   4.4651726e-01   1.3360558e+00   1.5022608e+00   9.9714776e-01   5.6769031e-01   1.1765359e+00   7.6752131e-01   8.1354181e-01   6.9325418e-01   6.2092891e-01   5.4292906e-01   4.5470518e-01   4.0293660e-01   4.5581864e-01   6.4704320e-01   6.2024833e-01   1.4096146e-01   2.0656129e-01   8.1354181e-01   1.0574300e+00   1.2554784e+00   3.0275928e-01   4.4535192e-01   9.2264612e-01   3.0275928e-01   2.5251796e-01   5.2862779e-01   5.0592043e-01   8.0358695e-01   2.5251796e-01   5.6454040e-01   7.9878917e-01   2.1845981e-01   7.6752131e-01   1.2418578e-01   8.1242502e-01   4.1449626e-01   3.5875094e+00   3.2277825e+00   3.7190120e+00   2.6019240e+00   3.3414931e+00   3.0741797e+00   3.3904673e+00   1.8683030e+00   3.3506325e+00   2.4892190e+00   2.1209506e+00   2.8530088e+00   2.6606291e+00   3.3264150e+00   2.2345869e+00   3.2325480e+00   3.0894572e+00   2.6859989e+00   3.1954750e+00   2.4836725e+00   3.4467337e+00   2.6928468e+00   3.5602810e+00   3.3090659e+00   3.0346426e+00   3.1953687e+00   3.5930845e+00   3.7635112e+00   3.1392617e+00   2.1242643e+00   2.3839455e+00   2.2806773e+00   2.5225548e+00   3.7070070e+00   3.0760590e+00   3.1551922e+00   3.4865435e+00   3.1033781e+00   2.6867856e+00   2.5906376e+00   2.9536363e+00   3.2348458e+00   2.6148507e+00   1.8841403e+00   2.7819255e+00   2.7801917e+00   2.7920574e+00   2.9774862e+00   1.6195190e+00   2.7001131e+00   4.7151191e+00   3.7310738e+00   4.6963107e+00   4.2348119e+00   4.5036643e+00   5.4345951e+00   3.1040223e+00   5.0660245e+00   4.4858951e+00   4.9576471e+00   3.8485743e+00   3.9894963e+00   4.2781102e+00   3.6535208e+00   3.8473084e+00   4.0656969e+00   4.1736133e+00   5.5611269e+00   5.7439963e+00   3.6142694e+00   4.5082936e+00   3.5527533e+00   5.5400450e+00   3.5988819e+00   4.4321573e+00   4.7754556e+00   3.4913787e+00   3.5638529e+00   4.2915574e+00   4.5844335e+00   4.9269527e+00   5.3501611e+00   4.3091163e+00   3.7395252e+00   4.1763853e+00   5.0687940e+00   4.3363292e+00   4.1568278e+00   3.4594086e+00   4.2175903e+00   4.4004449e+00   4.0139427e+00   3.7310738e+00   4.6611132e+00   4.5083524e+00   4.0415593e+00   3.7070350e+00   3.9354060e+00   4.1243443e+00   3.7225506e+00   4.8927739e-01   4.1449626e-01   2.0656129e-01   8.1242502e-01   5.0270183e-01   4.0293660e-01   2.8192292e-01   6.0611244e-01   8.2305664e-01   8.2899253e-01   9.3824087e-01   4.5581864e-01   1.4096146e-01   7.1840099e-01   2.1845981e-01   4.5470518e-01   2.1845981e-01   4.9674312e-01   4.2418962e-01   5.1607523e-01   6.0551856e-01   2.8192292e-01   2.1269358e-01   2.4837156e-01   4.5470518e-01   5.1607523e-01   4.2667565e-01   5.0991930e-01   6.8917100e-01   5.0270183e-01   4.1312257e-01   5.0180477e-01   5.0270183e-01   7.4549115e-01   2.1269358e-01   1.4096146e-01   1.3190071e+00   6.4755655e-01   4.1449626e-01   5.1691876e-01   6.0611244e-01   2.5251796e-01   4.9674312e-01   3.0546431e-01   3.0000000e-01   3.5310961e+00   3.2313174e+00   3.6912396e+00   2.7363446e+00   3.3486156e+00   3.1550780e+00   3.4146950e+00   2.0587064e+00   3.3422688e+00   2.6000813e+00   2.3658814e+00   2.9005672e+00   2.7581254e+00   3.3764180e+00   2.2982662e+00   3.1914715e+00   3.1684808e+00   2.7581145e+00   3.2719146e+00   2.5906376e+00   3.5076679e+00   2.7164648e+00   3.6146980e+00   3.3629944e+00   3.0317688e+00   3.1699749e+00   3.5767944e+00   3.7653940e+00   3.1912695e+00   2.2046610e+00   2.5131017e+00   2.4132939e+00   2.5882494e+00   3.7797776e+00   3.1649733e+00   3.1986968e+00   3.4685882e+00   3.1575873e+00   2.7599092e+00   2.7031874e+00   3.0575551e+00   3.2787144e+00   2.6914804e+00   2.0914773e+00   2.8714673e+00   2.8482104e+00   2.8631525e+00   3.0002861e+00   1.8009624e+00   2.7738624e+00   4.7744685e+00   3.8132783e+00   4.7036953e+00   4.2925903e+00   4.5507995e+00   5.4317036e+00   3.2245243e+00   5.0748136e+00   4.5314818e+00   4.9621679e+00   3.8715927e+00   4.0372136e+00   4.2937599e+00   3.7469906e+00   3.9213497e+00   4.1030149e+00   4.2136261e+00   5.5512721e+00   5.7499082e+00   3.7127205e+00   4.5218897e+00   3.6377830e+00   5.5357771e+00   3.6429670e+00   4.4609633e+00   4.7775824e+00   3.5373240e+00   3.6158814e+00   4.3437318e+00   4.5790474e+00   4.9211035e+00   5.3110568e+00   4.3608329e+00   3.7876656e+00   4.2543813e+00   5.0356467e+00   4.3872625e+00   4.2028863e+00   3.5161021e+00   4.2189979e+00   4.4261470e+00   4.0000622e+00   3.8132783e+00   4.6893387e+00   4.5361087e+00   4.0527696e+00   3.7622948e+00   3.9645936e+00   4.1768667e+00   3.7924679e+00   8.6137722e-01   5.7867728e-01   1.2470767e+00   8.6361309e-01   2.8192292e-01   6.9369532e-01   9.8450810e-01   1.2949422e+00   5.7324170e-01   5.3588338e-01   4.0000000e-01   4.8135521e-01   3.0546431e-01   3.2816937e-01   5.0817745e-01   3.4378533e-01   9.4558103e-01   6.2024833e-01   6.9728513e-01   9.2288144e-01   5.6700421e-01   4.3691963e-01   5.4292906e-01   8.7202528e-01   8.9095811e-01   5.0817745e-01   3.6171588e-01   3.8934542e-01   8.6361309e-01   7.9878917e-01   5.0592043e-01   8.6361309e-01   1.1959482e+00   5.4292906e-01   5.6454040e-01   1.6807352e+00   1.1055064e+00   5.0592043e-01   3.2586371e-01   9.7779835e-01   3.2816937e-01   9.4558103e-01   2.8507955e-01   6.6827038e-01   3.1533911e+00   2.8840079e+00   3.3274872e+00   2.5335921e+00   3.0169509e+00   2.8661222e+00   3.0732956e+00   1.9492232e+00   3.0013391e+00   2.3437032e+00   2.3116343e+00   2.5873149e+00   2.5591371e+00   3.0631725e+00   2.0220740e+00   2.8270253e+00   2.8656468e+00   2.4892190e+00   3.0178921e+00   2.3656538e+00   3.1846482e+00   2.4132559e+00   3.3163294e+00   3.0590735e+00   2.6993871e+00   2.8174914e+00   3.2310326e+00   3.4162231e+00   2.8802219e+00   1.9932786e+00   2.3173648e+00   2.2314118e+00   2.3212593e+00   3.4779999e+00   2.8654680e+00   2.8662571e+00   3.1113805e+00   2.8927401e+00   2.4634131e+00   2.4685230e+00   2.7948819e+00   2.9596963e+00   2.4341346e+00   2.0039447e+00   2.6000813e+00   2.5498770e+00   2.5700421e+00   2.6813098e+00   1.7123398e+00   2.4913669e+00   4.4418755e+00   3.5123791e+00   4.3488707e+00   3.9713081e+00   4.2172545e+00   5.0700045e+00   2.9631582e+00   4.7239900e+00   4.2113881e+00   4.5979409e+00   3.5255287e+00   3.7162377e+00   3.9448212e+00   3.4598280e+00   3.6097419e+00   3.7620043e+00   3.8810240e+00   5.1822310e+00   5.3953096e+00   3.4508156e+00   4.1665786e+00   3.3353616e+00   5.1763300e+00   3.3260356e+00   4.1143832e+00   4.4201622e+00   3.2188998e+00   3.2929599e+00   4.0183758e+00   4.2229849e+00   4.5637045e+00   4.9290256e+00   4.0343724e+00   3.4708900e+00   3.9559935e+00   4.6576736e+00   4.0502252e+00   3.8718131e+00   3.1963475e+00   3.8610636e+00   4.0785553e+00   3.6345765e+00   3.5123791e+00   4.3416284e+00   4.1864302e+00   3.7018916e+00   3.4568305e+00   3.6254423e+00   3.8415026e+00   3.4775621e+00   4.0293660e-01   5.0905001e-01   3.8934542e-01   8.1130291e-01   2.5251796e-01   4.2538717e-01   4.8927739e-01   1.2406194e+00   1.3074132e+00   8.5233811e-01   5.0090417e-01   1.1185330e+00   5.6700421e-01   8.1099042e-01   5.3022554e-01   4.1449626e-01   5.3665999e-01   5.0905001e-01   5.0592043e-01   4.1449626e-01   6.0181382e-01   6.0060595e-01   2.5651975e-01   3.4583729e-01   8.0064372e-01   8.1558458e-01   1.0597541e+00   3.8934542e-01   4.2667565e-01   9.0074515e-01   3.8934542e-01   4.1586001e-01   5.0180477e-01   4.0293660e-01   1.1003197e+00   2.5651975e-01   4.5581864e-01   6.6539428e-01   4.1312257e-01   5.7324170e-01   2.0656129e-01   7.1504098e-01   4.0293660e-01   3.6583368e+00   3.3018939e+00   3.7934214e+00   2.7118627e+00   3.4196168e+00   3.1646752e+00   3.4663954e+00   1.9965608e+00   3.4302944e+00   2.5753574e+00   2.2837561e+00   2.9283888e+00   2.7788099e+00   3.4116298e+00   2.3101107e+00   3.3028359e+00   3.1719381e+00   2.7826178e+00   3.2957091e+00   2.5882494e+00   3.5217244e+00   2.7724782e+00   3.6509512e+00   3.3998935e+00   3.1126354e+00   3.2681313e+00   3.6719821e+00   3.8384263e+00   3.2202056e+00   2.2240476e+00   2.4960474e+00   2.3970928e+00   2.6119950e+00   3.7951491e+00   3.1592993e+00   3.2300555e+00   3.5604418e+00   3.2025128e+00   2.7701355e+00   2.6892823e+00   3.0524247e+00   3.3177721e+00   2.7092568e+00   2.0227167e+00   2.8731220e+00   2.8671099e+00   2.8775912e+00   3.0586720e+00   1.7332099e+00   2.7865812e+00   4.7866828e+00   3.8123695e+00   4.7714708e+00   4.3189924e+00   4.5796358e+00   5.5132325e+00   3.1921277e+00   5.1489022e+00   4.5737586e+00   5.0249531e+00   3.9185849e+00   4.0697987e+00   4.3502657e+00   3.7349501e+00   3.9102370e+00   4.1311343e+00   4.2548570e+00   5.6362307e+00   5.8240252e+00   3.7174048e+00   4.5773480e+00   3.6270581e+00   5.6209145e+00   3.6774027e+00   4.5072397e+00   4.8555167e+00   3.5675580e+00   3.6401392e+00   4.3693804e+00   4.6657186e+00   5.0062061e+00   5.4227201e+00   4.3844239e+00   3.8261182e+00   4.2718480e+00   5.1373047e+00   4.4043123e+00   4.2383633e+00   3.5347392e+00   4.2868650e+00   4.4668117e+00   4.0716645e+00   3.8123695e+00   4.7338066e+00   4.5734052e+00   4.1036179e+00   3.7882079e+00   4.0078491e+00   4.1922661e+00   3.8027591e+00   6.8961791e-01   3.0546431e-01   4.4417983e-01   2.0656129e-01   4.1586001e-01   7.6625946e-01   8.9687438e-01   1.0919712e+00   5.7867728e-01   1.5422108e-01   7.3851529e-01   4.0293660e-01   4.1312257e-01   3.2586371e-01   5.7257017e-01   3.2816937e-01   4.1312257e-01   4.0147421e-01   2.0656129e-01   2.0656129e-01   2.0656129e-01   3.2586371e-01   3.2586371e-01   4.1312257e-01   7.0437330e-01   8.5205778e-01   3.0546431e-01   3.2352160e-01   5.0905001e-01   3.0546431e-01   6.5172743e-01   1.0000000e-01   2.1269358e-01   1.1283882e+00   6.1092863e-01   4.0293660e-01   5.0592043e-01   4.1586001e-01   4.0293660e-01   4.1449626e-01   3.7255734e-01   1.2418578e-01   3.4445326e+00   3.1392617e+00   3.6011035e+00   2.6118700e+00   3.2516941e+00   3.0511838e+00   3.3218097e+00   1.9189245e+00   3.2468925e+00   2.4924452e+00   2.2081024e+00   2.8038661e+00   2.6291264e+00   3.2767369e+00   2.1964719e+00   3.1025274e+00   3.0696611e+00   2.6485861e+00   3.1554034e+00   2.4715204e+00   3.4135983e+00   2.6151245e+00   3.5092032e+00   3.2604423e+00   2.9354140e+00   3.0782101e+00   3.4818889e+00   3.6726568e+00   3.0922811e+00   2.0843471e+00   2.3874354e+00   2.2845234e+00   2.4794505e+00   3.6775470e+00   3.0659000e+00   3.1055388e+00   3.3775462e+00   3.0430948e+00   2.6597612e+00   2.5873149e+00   2.9471553e+00   3.1807044e+00   2.5795723e+00   1.9450499e+00   2.7640668e+00   2.7473221e+00   2.7611864e+00   2.9015702e+00   1.6626642e+00   2.6693888e+00   4.6823704e+00   3.7130994e+00   4.6117428e+00   4.1946425e+00   4.4565357e+00   5.3399939e+00   3.1168466e+00   4.9805386e+00   4.4303862e+00   4.8738189e+00   3.7806643e+00   3.9387918e+00   4.2018804e+00   3.6441274e+00   3.8290120e+00   4.0132700e+00   4.1177139e+00   5.4615788e+00   5.6559440e+00   3.5983434e+00   4.4321573e+00   3.5405803e+00   5.4429455e+00   3.5441556e+00   4.3687483e+00   4.6853394e+00   3.4399664e+00   3.5203203e+00   4.2473048e+00   4.4861009e+00   4.8281381e+00   5.2242271e+00   4.2652659e+00   3.6876909e+00   4.1503255e+00   4.9488209e+00   4.2966585e+00   4.1071698e+00   3.4205830e+00   4.1292490e+00   4.3363292e+00   3.9150359e+00   3.7130994e+00   4.5977729e+00   4.4473292e+00   3.9643224e+00   3.6603913e+00   3.8715927e+00   4.0861975e+00   3.6954796e+00   5.0991930e-01   1.1327825e+00   5.7257017e-01   4.0293660e-01   3.0811765e-01   1.5771666e+00   1.7488874e+00   1.2431040e+00   8.1273630e-01   1.4170618e+00   1.0106392e+00   1.0389435e+00   9.3824087e-01   7.3813096e-01   7.5976039e-01   6.6491075e-01   6.0611244e-01   6.9728513e-01   8.8861541e-01   8.5177726e-01   3.8776762e-01   4.2538717e-01   1.0346741e+00   1.2943100e+00   1.5015203e+00   5.0991930e-01   6.2482915e-01   1.1473003e+00   5.0991930e-01   1.2418578e-01   7.6752131e-01   7.4586719e-01   6.0181382e-01   3.0275928e-01   7.7869083e-01   1.0440187e+00   4.0293660e-01   1.0120221e+00   3.2352160e-01   1.0597541e+00   6.4704320e-01   3.7504939e+00   3.3717768e+00   3.8731169e+00   2.7062054e+00   3.4865562e+00   3.1921903e+00   3.5262546e+00   1.9522524e+00   3.5018009e+00   2.5914913e+00   2.1818668e+00   2.9807120e+00   2.7874290e+00   3.4557351e+00   2.3604042e+00   3.3915488e+00   3.2027420e+00   2.8150728e+00   3.3206640e+00   2.6018930e+00   3.5642457e+00   2.8360166e+00   3.6902583e+00   3.4394878e+00   3.1847477e+00   3.3503379e+00   3.7461474e+00   3.9068076e+00   3.2666666e+00   2.2590074e+00   2.4950353e+00   2.3935209e+00   2.6534332e+00   3.8259590e+00   3.1834936e+00   3.2834077e+00   3.6377049e+00   3.2390016e+00   2.8060305e+00   2.7012392e+00   3.0647279e+00   3.3658240e+00   2.7423171e+00   1.9645331e+00   2.8984764e+00   2.9033203e+00   2.9139413e+00   3.1189900e+00   1.7118795e+00   2.8228127e+00   4.8290847e+00   3.8416142e+00   4.8350745e+00   4.3569606e+00   4.6261788e+00   5.5774554e+00   3.1958228e+00   5.2067803e+00   4.6153241e+00   5.0947934e+00   3.9803199e+00   4.1159553e+00   4.4131159e+00   3.7587872e+00   3.9513472e+00   4.1881498e+00   4.3024754e+00   5.7071195e+00   5.8839539e+00   3.7280682e+00   4.6419531e+00   3.6578722e+00   5.6843788e+00   3.7276068e+00   4.5625120e+00   4.9179194e+00   3.6182608e+00   3.6866535e+00   4.4136707e+00   4.7307689e+00   5.0723886e+00   5.5062533e+00   4.4301849e+00   3.8690719e+00   4.2943891e+00   5.2192815e+00   4.4536259e+00   4.2828634e+00   3.5797958e+00   4.3570079e+00   4.5278761e+00   4.1542558e+00   3.8416142e+00   4.7899951e+00   4.6341170e+00   4.1740602e+00   3.8316735e+00   4.0656969e+00   4.2413113e+00   3.8376713e+00   6.8961791e-01   3.0811765e-01   1.4096146e-01   6.4755655e-01   1.1229906e+00   1.3835747e+00   8.6361309e-01   4.2667565e-01   9.4009473e-01   7.0784540e-01   5.3665999e-01   6.2482915e-01   6.3977563e-01   4.3691963e-01   4.4651726e-01   1.5422108e-01   3.7598397e-01   4.4535192e-01   3.7598397e-01   2.1845981e-01   1.4096146e-01   5.5419992e-01   1.0065841e+00   1.1474460e+00   0.0000000e+00   3.0811765e-01   6.5223271e-01   0.0000000e+00   5.0991930e-01   3.2586371e-01   4.2667565e-01   8.3172002e-01   5.0991930e-01   5.6769031e-01   7.5082357e-01   2.1845981e-01   7.0479928e-01   3.0811765e-01   6.4755655e-01   2.1845981e-01   3.4865562e+00   3.1726595e+00   3.6377960e+00   2.5987470e+00   3.2814045e+00   3.0627375e+00   3.3515846e+00   1.8841865e+00   3.2769379e+00   2.5038079e+00   2.1311468e+00   2.8311678e+00   2.6104387e+00   3.2962520e+00   2.2214438e+00   3.1433122e+00   3.0878634e+00   2.6552472e+00   3.1570103e+00   2.4668912e+00   3.4394878e+00   2.6411293e+00   3.5233648e+00   3.2747247e+00   2.9659871e+00   3.1154783e+00   3.5134741e+00   3.7059620e+00   3.1148696e+00   2.0851901e+00   2.3731428e+00   2.2655571e+00   2.4927109e+00   3.6920087e+00   3.0823446e+00   3.1337459e+00   3.4135200e+00   3.0481703e+00   2.6780487e+00   2.5874301e+00   2.9489507e+00   3.2027420e+00   2.5873149e+00   1.8973383e+00   2.7738355e+00   2.7632614e+00   2.7778954e+00   2.9269923e+00   1.6390769e+00   2.6848587e+00   4.7106706e+00   3.7313856e+00   4.6446321e+00   4.2142736e+00   4.4836580e+00   5.3716885e+00   3.1250284e+00   5.0074019e+00   4.4485220e+00   4.9128219e+00   3.8150636e+00   3.9624529e+00   4.2358121e+00   3.6602286e+00   3.8605980e+00   4.0488387e+00   4.1418643e+00   5.4970002e+00   5.6855224e+00   3.5964347e+00   4.4685630e+00   3.5634461e+00   5.4730406e+00   3.5693950e+00   4.3989089e+00   4.7150659e+00   3.4668130e+00   3.5464993e+00   4.2723380e+00   4.5155386e+00   4.8594290e+00   5.2647079e+00   4.2921213e+00   3.7064459e+00   4.1581964e+00   4.9913682e+00   4.3286007e+00   4.1303097e+00   3.4468286e+00   4.1669742e+00   4.3729308e+00   3.9624170e+00   3.7313856e+00   4.6297577e+00   4.4844827e+00   4.0056359e+00   3.6817961e+00   3.9035218e+00   4.1179678e+00   3.7164366e+00   6.2024833e-01   8.1304731e-01   1.1868139e+00   4.8036801e-01   7.1799256e-01   2.8192292e-01   3.2816937e-01   3.2816937e-01   3.0546431e-01   3.2352160e-01   3.2352160e-01   8.5205778e-01   4.8927739e-01   6.6384020e-01   7.3496673e-01   4.5581864e-01   2.4837156e-01   3.2586371e-01   7.6752131e-01   7.4549115e-01   3.2352160e-01   4.1449626e-01   5.0180477e-01   6.8961791e-01   5.8851328e-01   2.5251796e-01   6.8961791e-01   1.0919712e+00   3.7255734e-01   4.2667565e-01   1.4993782e+00   1.0344911e+00   5.0592043e-01   4.5581864e-01   8.1304731e-01   3.0546431e-01   8.5205778e-01   1.0000000e-01   4.9766035e-01   3.3472053e+00   3.0922811e+00   3.5254266e+00   2.6661987e+00   3.2094276e+00   3.0570957e+00   3.2869053e+00   2.0190980e+00   3.1913594e+00   2.5206151e+00   2.3403819e+00   2.7928582e+00   2.6680945e+00   3.2615924e+00   2.2070201e+00   3.0233425e+00   3.0716969e+00   2.6575076e+00   3.1694367e+00   2.5088543e+00   3.4030318e+00   2.5954147e+00   3.4988409e+00   3.2483608e+00   2.8891737e+00   3.0123702e+00   3.4182420e+00   3.6203759e+00   3.0811775e+00   2.1190324e+00   2.4416796e+00   2.3440712e+00   2.4897570e+00   3.6753309e+00   3.0715435e+00   3.0851463e+00   3.3123070e+00   3.0424689e+00   2.6625505e+00   2.6241824e+00   2.9689697e+00   3.1616811e+00   2.5961850e+00   2.0559262e+00   2.7803619e+00   2.7462372e+00   2.7639489e+00   2.8736288e+00   1.7674365e+00   2.6773131e+00   4.6660957e+00   3.7173526e+00   4.5567672e+00   4.1782968e+00   4.4326194e+00   5.2720689e+00   3.1469325e+00   4.9232255e+00   4.4057732e+00   4.8164157e+00   3.7433882e+00   3.9194796e+00   4.1567419e+00   3.6582432e+00   3.8303544e+00   3.9861488e+00   4.0892044e+00   5.3882212e+00   5.5946413e+00   3.6180819e+00   4.3839191e+00   3.5469476e+00   5.3734444e+00   3.5262672e+00   4.3306501e+00   4.6237863e+00   3.4237160e+00   3.5051302e+00   4.2288456e+00   4.4201622e+00   4.7609637e+00   5.1280035e+00   4.2469785e+00   3.6684143e+00   4.1480002e+00   4.8602572e+00   4.2765700e+00   4.0824098e+00   3.4092877e+00   4.0737132e+00   4.2991233e+00   3.8524190e+00   3.7173526e+00   4.5590471e+00   4.4107160e+00   3.9202843e+00   3.6509512e+00   3.8388884e+00   4.0680120e+00   3.6894983e+00   4.1449626e-01   6.6539428e-01   1.0717668e+00   1.1847335e+00   7.0776547e-01   3.2816937e-01   9.2095040e-01   4.4651726e-01   6.0060595e-01   3.8934542e-01   6.1092863e-01   3.7598397e-01   3.0000000e-01   4.1312257e-01   2.4837156e-01   4.0293660e-01   4.1312257e-01   2.0656129e-01   3.0000000e-01   6.0611244e-01   7.3535471e-01   9.3801395e-01   3.0811765e-01   4.2538717e-01   7.1462831e-01   3.0811765e-01   5.2574978e-01   3.0275928e-01   3.2816937e-01   1.1107977e+00   4.5470518e-01   4.1449626e-01   4.8927739e-01   4.1449626e-01   4.4417983e-01   2.8192292e-01   5.2942799e-01   2.5251796e-01   3.4297053e+00   3.0906838e+00   3.5704156e+00   2.5301680e+00   3.2062204e+00   2.9663489e+00   3.2615889e+00   1.8330979e+00   3.2074600e+00   2.4030878e+00   2.1292724e+00   2.7344480e+00   2.5716369e+00   3.2053511e+00   2.1242643e+00   3.0798277e+00   2.9831836e+00   2.5729378e+00   3.0964590e+00   2.3917863e+00   3.3353616e+00   2.5635110e+00   3.4441347e+00   3.1882407e+00   2.8938821e+00   3.0477086e+00   3.4484194e+00   3.6265826e+00   3.0209783e+00   2.0203134e+00   2.3063579e+00   2.2046610e+00   2.4100833e+00   3.5972040e+00   2.9748436e+00   3.0349291e+00   3.3414931e+00   2.9918962e+00   2.5764694e+00   2.5038051e+00   2.8573838e+00   3.1113597e+00   2.5079404e+00   1.8623849e+00   2.6799601e+00   2.6656374e+00   2.6804452e+00   2.8458006e+00   1.5870088e+00   2.5906376e+00   4.6056614e+00   3.6293396e+00   4.5625120e+00   4.1184849e+00   4.3862724e+00   5.2957861e+00   3.0253131e+00   4.9300368e+00   4.3656957e+00   4.8256905e+00   3.7228356e+00   3.8717400e+00   4.1487889e+00   3.5605424e+00   3.7509165e+00   3.9489970e+00   4.0502806e+00   5.4193574e+00   5.6096505e+00   3.5201263e+00   4.3797165e+00   3.4555095e+00   5.4004015e+00   3.4805320e+00   4.3069452e+00   4.6373516e+00   3.3738930e+00   3.4478147e+00   4.1762321e+00   4.4428877e+00   4.7870294e+00   5.1982218e+00   4.1948678e+00   3.6180819e+00   4.0668114e+00   4.9227056e+00   4.2245318e+00   4.0358897e+00   3.3459883e+00   4.0835979e+00   4.2783731e+00   3.8797354e+00   3.6293396e+00   4.5370189e+00   4.3879553e+00   3.9155334e+00   3.5955337e+00   3.8113970e+00   4.0131848e+00   3.6132595e+00   5.2862779e-01   1.2431040e+00   1.5013525e+00   9.7779835e-01   5.3588338e-01   1.0669582e+00   8.1385214e-01   6.6432544e-01   7.2823007e-01   6.5223271e-01   5.1138698e-01   5.6700421e-01   2.5251796e-01   4.6472023e-01   5.6769031e-01   4.9766035e-01   2.5651975e-01   2.1269358e-01   6.6432544e-01   1.1134787e+00   1.2632199e+00   1.4096146e-01   2.8507955e-01   7.6787403e-01   1.4096146e-01   4.0293660e-01   4.4651726e-01   5.1691876e-01   7.1840099e-01   4.1586001e-01   6.3108414e-01   8.7021234e-01   2.0000000e-01   8.1385214e-01   2.5251796e-01   7.6787403e-01   3.2586371e-01   3.6025735e+00   3.2810515e+00   3.7511944e+00   2.6894009e+00   3.3904673e+00   3.1636869e+00   3.4574937e+00   1.9666356e+00   3.3893691e+00   2.5954173e+00   2.1997395e+00   2.9322283e+00   2.7092568e+00   3.4012145e+00   2.3186758e+00   3.2568914e+00   3.1861493e+00   2.7595194e+00   3.2561045e+00   2.5646808e+00   3.5381764e+00   2.7476411e+00   3.6278993e+00   3.3809159e+00   3.0768226e+00   3.2277675e+00   3.6265617e+00   3.8150532e+00   3.2176230e+00   2.1864840e+00   2.4668912e+00   2.3596992e+00   2.5949561e+00   3.7935487e+00   3.1789378e+00   3.2360886e+00   3.5252258e+00   3.1522058e+00   2.7777040e+00   2.6819136e+00   3.0473722e+00   3.3079290e+00   2.6886547e+00   1.9757309e+00   2.8726212e+00   2.8654680e+00   2.8788483e+00   3.0349462e+00   1.7160413e+00   2.7852734e+00   4.8087107e+00   3.8282466e+00   4.7531334e+00   4.3176393e+00   4.5857287e+00   5.4831923e+00   3.2147850e+00   5.1185883e+00   4.5544260e+00   5.0194259e+00   3.9185849e+00   4.0655452e+00   4.3416283e+00   3.7535680e+00   3.9509795e+00   4.1478442e+00   4.2472736e+00   5.6096505e+00   5.7957776e+00   3.6945993e+00   4.5734622e+00   3.6568202e+00   5.5854254e+00   3.6720840e+00   4.5038991e+00   4.8262859e+00   3.5684917e+00   3.6474985e+00   4.3740189e+00   4.6282931e+00   4.9713928e+00   5.3806679e+00   4.3928114e+00   3.8121990e+00   4.2612863e+00   5.1032991e+00   4.4267055e+00   4.2347444e+00   3.5464871e+00   4.2738510e+00   4.4745238e+00   4.0663411e+00   3.8282466e+00   4.7338066e+00   4.5852690e+00   4.1075310e+00   3.7823897e+00   4.0070636e+00   4.2156933e+00   3.8157950e+00   1.6177449e+00   1.7454671e+00   1.2604558e+00   8.6361309e-01   1.4955532e+00   1.0118409e+00   1.1594648e+00   9.6204649e-01   6.2081167e-01   9.1750357e-01   8.7504951e-01   7.6752131e-01   8.0660588e-01   9.5965467e-01   9.2859317e-01   5.7324170e-01   6.2205176e-01   1.1313840e+00   1.2653669e+00   1.4930627e+00   6.4755655e-01   7.0479928e-01   1.2236003e+00   6.4755655e-01   2.1269358e-01   8.5105559e-01   7.7360126e-01   7.1169738e-01   2.5651975e-01   8.7229670e-01   1.1327578e+00   5.3588338e-01   1.0269295e+00   3.8934542e-01   1.1042097e+00   7.2823007e-01   4.0317004e+00   3.6659830e+00   4.1618561e+00   3.0123702e+00   3.7804276e+00   3.4970843e+00   3.8244351e+00   2.2591077e+00   3.7930789e+00   2.8953397e+00   2.4889124e+00   3.2809188e+00   3.0866488e+00   3.7578933e+00   2.6595288e+00   3.6754272e+00   3.5073435e+00   3.1173742e+00   3.6212723e+00   2.9065572e+00   3.8667462e+00   3.1302383e+00   3.9918403e+00   3.7416229e+00   3.4760444e+00   3.6375992e+00   4.0358101e+00   4.2016915e+00   3.5683934e+00   2.5569968e+00   2.8007817e+00   2.6989368e+00   2.9539253e+00   4.1306024e+00   3.4882801e+00   3.5831257e+00   3.9280671e+00   3.5362697e+00   3.1099883e+00   3.0065416e+00   3.3706887e+00   3.6672620e+00   3.0442126e+00   2.2719663e+00   3.2032390e+00   3.2071637e+00   3.2176230e+00   3.4155491e+00   2.0139971e+00   3.1260028e+00   5.1310217e+00   4.1456639e+00   5.1323742e+00   4.6609614e+00   4.9284761e+00   5.8739676e+00   3.4984873e+00   5.5048216e+00   4.9175276e+00   5.3898806e+00   4.2781762e+00   4.4176533e+00   4.7107211e+00   4.0621414e+00   4.2494597e+00   4.4865569e+00   4.6045396e+00   6.0012333e+00   6.1816086e+00   4.0339598e+00   4.9390284e+00   3.9601358e+00   5.9803696e+00   4.0277694e+00   4.8626276e+00   5.2147981e+00   3.9185849e+00   3.9887029e+00   4.7161140e+00   5.0257341e+00   5.3673499e+00   5.7939320e+00   4.7320534e+00   4.1713411e+00   4.5995433e+00   5.5085511e+00   4.7536729e+00   4.5857356e+00   3.8819510e+00   4.6519178e+00   4.8256399e+00   4.4430890e+00   4.1456639e+00   5.0898961e+00   4.9316646e+00   4.4680158e+00   4.1325542e+00   4.3648035e+00   4.5412859e+00   4.1418557e+00   4.5581864e-01   4.1586001e-01   7.7074935e-01   5.0991930e-01   7.1840099e-01   7.2486328e-01   7.3145860e-01   1.2122249e+00   9.2112464e-01   1.1384810e+00   1.1451403e+00   9.1163729e-01   7.0386584e-01   7.4855857e-01   1.2220203e+00   1.1947245e+00   6.6827038e-01   6.2081167e-01   3.4378533e-01   1.1229906e+00   9.9348625e-01   5.2942799e-01   1.1229906e+00   1.5344133e+00   8.2275389e-01   8.5233811e-01   1.8985661e+00   1.4692412e+00   8.9653332e-01   8.7420176e-01   1.2431040e+00   7.3813096e-01   1.2951131e+00   5.5419992e-01   9.3801395e-01   3.5789198e+00   3.3663244e+00   3.7753619e+00   3.0049442e+00   3.4909841e+00   3.3695525e+00   3.5654259e+00   2.3989172e+00   3.4663502e+00   2.8427326e+00   2.7185849e+00   3.0894572e+00   3.0108764e+00   3.5617386e+00   2.5173832e+00   3.2758681e+00   3.3732554e+00   2.9816791e+00   3.4895316e+00   2.8451507e+00   3.6905956e+00   2.8989400e+00   3.8036776e+00   3.5549103e+00   3.1734856e+00   3.2772927e+00   3.6834126e+00   3.8868430e+00   3.3809159e+00   2.4588872e+00   2.7850016e+00   2.6918796e+00   2.8113773e+00   3.9804187e+00   3.3742776e+00   3.3692592e+00   3.5726491e+00   3.3587234e+00   2.9691171e+00   2.9539253e+00   3.2926883e+00   3.4584304e+00   2.9217347e+00   2.4321061e+00   3.0988783e+00   3.0546600e+00   3.0736357e+00   3.1699903e+00   2.1306832e+00   2.9913743e+00   4.9420128e+00   4.0177712e+00   4.8123874e+00   4.4703485e+00   4.7113827e+00   5.5147622e+00   3.4715574e+00   5.1811127e+00   4.6944291e+00   5.0587041e+00   4.0117533e+00   4.2085851e+00   4.4199792e+00   3.9616570e+00   4.1103933e+00   4.2537610e+00   4.3721243e+00   5.6218420e+00   5.8419148e+00   3.9412893e+00   4.6390186e+00   3.8408636e+00   5.6159291e+00   3.8175051e+00   4.5984929e+00   4.8771654e+00   3.7143727e+00   3.7943375e+00   4.5141564e+00   4.6734732e+00   5.0086627e+00   5.3396700e+00   4.5298770e+00   3.9647930e+00   4.4561969e+00   5.0778756e+00   4.5477422e+00   4.3671210e+00   3.6996802e+00   4.3269400e+00   4.5602465e+00   4.0901232e+00   4.0177712e+00   4.8233796e+00   4.6689006e+00   4.1757336e+00   3.9466531e+00   4.1130674e+00   4.3408596e+00   3.9840684e+00   5.3588338e-01   9.7098574e-01   6.0611244e-01   7.4549115e-01   1.0101422e+00   8.1242502e-01   1.2342162e+00   1.1486378e+00   1.1959482e+00   1.4468211e+00   1.0906388e+00   9.4287188e-01   1.0346741e+00   1.3793330e+00   1.4148192e+00   1.0065841e+00   5.5419992e-01   2.8507955e-01   1.3835747e+00   1.2681309e+00   9.0679720e-01   1.3835747e+00   1.6801917e+00   1.0588560e+00   1.0122141e+00   2.2040881e+00   1.5564198e+00   1.0122141e+00   7.7553525e-01   1.4987155e+00   7.4893123e-01   1.4320120e+00   7.3813096e-01   1.1765359e+00   3.3186105e+00   3.0934278e+00   3.5115632e+00   2.9015832e+00   3.2557855e+00   3.1381850e+00   3.2787144e+00   2.3983798e+00   3.2261964e+00   2.6655261e+00   2.7738368e+00   2.8425716e+00   2.9377092e+00   3.3097860e+00   2.3365894e+00   3.0236933e+00   3.1147370e+00   2.7988444e+00   3.3431646e+00   2.7201960e+00   3.4033622e+00   2.7009102e+00   3.5863979e+00   3.3171611e+00   2.9439491e+00   3.0327979e+00   3.4475678e+00   3.6195561e+00   3.1337459e+00   2.3758157e+00   2.6957302e+00   2.6219409e+00   2.6429556e+00   3.7305206e+00   3.1152653e+00   3.0762634e+00   3.3088561e+00   3.2115055e+00   2.7318540e+00   2.8101506e+00   3.0967820e+00   3.1998457e+00   2.7619926e+00   2.4596921e+00   2.9002737e+00   2.8148869e+00   2.8449691e+00   2.9378173e+00   2.1723936e+00   2.7843048e+00   4.6358686e+00   3.7621042e+00   4.5316360e+00   4.1928583e+00   4.4221843e+00   5.2364242e+00   3.2682245e+00   4.9072991e+00   4.4428425e+00   4.7561724e+00   3.7219581e+00   3.9498605e+00   4.1390009e+00   3.7275066e+00   3.8377652e+00   3.9569614e+00   4.0917968e+00   5.3289557e+00   5.5738695e+00   3.7540308e+00   4.3457024e+00   3.5797958e+00   5.3465693e+00   3.5720882e+00   4.3012547e+00   4.5936468e+00   3.4616111e+00   3.5205889e+00   4.2389017e+00   4.4031390e+00   4.7432976e+00   5.0569442e+00   4.2531342e+00   3.7092459e+00   4.2038056e+00   4.8064634e+00   4.2402361e+00   4.0806404e+00   3.4276314e+00   4.0438546e+00   4.2676463e+00   3.8085992e+00   3.7621042e+00   4.5272919e+00   4.3667579e+00   3.8946701e+00   3.7163265e+00   3.8338395e+00   4.0342445e+00   3.7061759e+00   4.4651726e-01   4.4651726e-01   3.2816937e-01   5.7257017e-01   3.4378533e-01   8.2384013e-01   6.6432544e-01   8.0758367e-01   9.3048953e-01   5.8851328e-01   4.3691963e-01   5.1691876e-01   8.8062848e-01   8.9917007e-01   5.0817745e-01   3.6171588e-01   3.2816937e-01   8.6361309e-01   7.3851529e-01   4.1449626e-01   8.6361309e-01   1.1845977e+00   5.4292906e-01   4.9766035e-01   1.6754036e+00   1.0919712e+00   5.3309112e-01   6.2024833e-01   9.7098574e-01   3.8934542e-01   9.3824087e-01   2.8507955e-01   6.5223271e-01   3.5185448e+00   3.2633258e+00   3.6996953e+00   2.8710255e+00   3.3892942e+00   3.2497279e+00   3.4561374e+00   2.2371784e+00   3.3772302e+00   2.7023432e+00   2.5704711e+00   2.9638836e+00   2.8904978e+00   3.4483274e+00   2.3826791e+00   3.1954061e+00   3.2493673e+00   2.8645447e+00   3.3669805e+00   2.7184506e+00   3.5654259e+00   2.7812639e+00   3.6908684e+00   3.4451701e+00   3.0736340e+00   3.1881331e+00   3.6017790e+00   3.7914024e+00   3.2604423e+00   2.3308454e+00   2.6548674e+00   2.5630676e+00   2.6859989e+00   3.8615219e+00   3.2492317e+00   3.2498302e+00   3.4856775e+00   3.2460061e+00   2.8456767e+00   2.8220742e+00   3.1709561e+00   3.3452644e+00   2.7965957e+00   2.2780262e+00   2.9733693e+00   2.9362769e+00   2.9511072e+00   3.0600825e+00   1.9688013e+00   2.8661222e+00   4.8176767e+00   3.8889176e+00   4.7230291e+00   4.3578295e+00   4.5962942e+00   5.4442203e+00   3.3242177e+00   5.1039076e+00   4.5914416e+00   4.9653393e+00   3.8994399e+00   4.0931001e+00   4.3174903e+00   3.8262108e+00   3.9673816e+00   4.1302370e+00   4.2654212e+00   5.5551457e+00   5.7673205e+00   3.8189943e+00   4.5366342e+00   3.7059360e+00   5.5500825e+00   3.6985459e+00   4.4934936e+00   4.7995387e+00   3.5922369e+00   3.6724425e+00   4.3963259e+00   4.6010378e+00   4.9364818e+00   5.2936070e+00   4.4094664e+00   3.8558772e+00   4.3453589e+00   5.0159331e+00   4.4225169e+00   4.2579435e+00   3.5745624e+00   4.2301614e+00   4.4459076e+00   3.9875954e+00   3.8889176e+00   4.7169919e+00   4.5531173e+00   4.0619315e+00   3.8238093e+00   3.9999729e+00   4.2141826e+00   3.8611742e+00   6.3808075e-01   3.0275928e-01   3.7598397e-01   2.1269358e-01   5.6769031e-01   3.4378533e-01   5.3022554e-01   5.0991930e-01   2.1845981e-01   1.4096146e-01   1.4096146e-01   4.5581864e-01   4.5581864e-01   3.0811765e-01   6.0670504e-01   7.3496673e-01   4.2667565e-01   3.2816937e-01   4.0293660e-01   4.2667565e-01   7.6787403e-01   1.4096146e-01   1.2418578e-01   1.2394907e+00   7.1504098e-01   3.2586371e-01   5.2942799e-01   5.2862779e-01   3.2586371e-01   5.2942799e-01   2.5651975e-01   2.1269358e-01   3.4944845e+00   3.2032390e+00   3.6588207e+00   2.7040077e+00   3.3172489e+00   3.1387381e+00   3.3902207e+00   2.0195610e+00   3.3129652e+00   2.5744164e+00   2.3173648e+00   2.8753045e+00   2.7215057e+00   3.3565935e+00   2.2694598e+00   3.1556501e+00   3.1511848e+00   2.7390328e+00   3.2351115e+00   2.5646808e+00   3.4858646e+00   2.6854398e+00   3.5885398e+00   3.3452644e+00   3.0014619e+00   3.1359624e+00   3.5442447e+00   3.7351231e+00   3.1683717e+00   2.1722580e+00   2.4832809e+00   2.3831271e+00   2.5617005e+00   3.7607269e+00   3.1489919e+00   3.1764760e+00   3.4370400e+00   3.1222134e+00   2.7420671e+00   2.6759392e+00   3.0406669e+00   3.2584404e+00   2.6649106e+00   2.0477765e+00   2.8508344e+00   2.8325946e+00   2.8443188e+00   2.9745020e+00   1.7495699e+00   2.7521074e+00   4.7498176e+00   3.7908064e+00   4.6736601e+00   4.2736523e+00   4.5261084e+00   5.4025762e+00   3.1986968e+00   5.0495127e+00   4.5070435e+00   4.9284820e+00   3.8418637e+00   4.0108142e+00   4.2628455e+00   3.7198158e+00   3.8891307e+00   4.0719001e+00   4.1917075e+00   5.5215376e+00   5.7192826e+00   3.6876129e+00   4.4897240e+00   3.6129201e+00   5.5066558e+00   3.6138577e+00   4.4349731e+00   4.7514299e+00   3.5090368e+00   3.5920050e+00   4.3185209e+00   4.5521574e+00   4.8905855e+00   5.2768100e+00   4.3339547e+00   3.7672401e+00   4.2403934e+00   4.9963306e+00   4.3598652e+00   4.1826701e+00   3.4920978e+00   4.1853524e+00   4.3933832e+00   3.9574195e+00   3.7908064e+00   4.6611791e+00   4.5034762e+00   4.0149574e+00   3.7307866e+00   3.9355645e+00   4.1498459e+00   3.7732223e+00   6.0551856e-01   4.4535192e-01   6.0670504e-01   1.1765359e+00   6.9325418e-01   9.2288144e-01   9.3637892e-01   7.3535471e-01   5.3665999e-01   5.8914551e-01   1.0576043e+00   1.0106392e+00   4.5581864e-01   5.4292906e-01   4.5581864e-01   9.4009473e-01   8.6290690e-01   4.5581864e-01   9.4009473e-01   1.3885563e+00   6.5223271e-01   7.4740267e-01   1.7041201e+00   1.3421549e+00   7.2823007e-01   6.0611244e-01   1.0653845e+00   6.0121055e-01   1.1521791e+00   4.1586001e-01   7.7919451e-01   3.1037808e+00   2.8727295e+00   3.2914954e+00   2.5112138e+00   2.9950832e+00   2.8632951e+00   3.0711321e+00   1.9332545e+00   2.9709745e+00   2.3448578e+00   2.2688022e+00   2.5914913e+00   2.5183808e+00   3.0579528e+00   2.0217308e+00   2.7906520e+00   2.8719896e+00   2.4738237e+00   2.9926636e+00   2.3440712e+00   3.1967616e+00   2.3980102e+00   3.3005331e+00   3.0483897e+00   2.6752185e+00   2.7868575e+00   3.1931777e+00   3.3968373e+00   2.8794765e+00   1.9640287e+00   2.2899742e+00   2.1990648e+00   2.3082381e+00   3.4762640e+00   2.8726212e+00   2.8752807e+00   3.0841055e+00   2.8599559e+00   2.4658566e+00   2.4543822e+00   2.7852734e+00   2.9558536e+00   2.4184985e+00   1.9730073e+00   2.5941661e+00   2.5490308e+00   2.5692104e+00   2.6676432e+00   1.6855044e+00   2.4875166e+00   4.4549901e+00   3.5192877e+00   4.3283747e+00   3.9701062e+00   4.2192020e+00   5.0364062e+00   2.9740218e+00   4.6944291e+00   4.1953299e+00   4.5849301e+00   3.5249823e+00   3.7114178e+00   3.9340128e+00   3.4663826e+00   3.6308220e+00   3.7719045e+00   3.8752244e+00   5.1489675e+00   5.3620178e+00   3.4363773e+00   4.1584261e+00   3.3485848e+00   5.1375979e+00   3.3209346e+00   4.1101337e+00   4.3926615e+00   3.2186045e+00   3.2982828e+00   4.0192434e+00   4.1885158e+00   4.5274663e+00   4.8785522e+00   4.0373008e+00   3.4619693e+00   3.9494193e+00   4.6147130e+00   4.0642632e+00   3.8698115e+00   3.2042572e+00   3.8459316e+00   4.0795080e+00   3.6227082e+00   3.5192877e+00   4.3377723e+00   4.1907472e+00   3.6992844e+00   3.4507210e+00   3.6230931e+00   3.8568809e+00   3.4855556e+00   4.5581864e-01   1.2418578e-01   6.2660376e-01   5.1607523e-01   5.2655962e-01   8.0096515e-01   4.0438741e-01   3.0546431e-01   4.0438741e-01   6.4806901e-01   7.1504098e-01   4.4535192e-01   3.2586371e-01   4.9857388e-01   7.0784540e-01   6.2081167e-01   4.5581864e-01   7.0784540e-01   9.3824087e-01   4.0147421e-01   3.2586371e-01   1.5252485e+00   8.1558458e-01   3.7598397e-01   4.0147421e-01   8.1099042e-01   1.2418578e-01   6.9006418e-01   2.1269358e-01   5.0270183e-01   3.4104878e+00   3.1150013e+00   3.5735680e+00   2.6813198e+00   3.2413086e+00   3.0598576e+00   3.2985843e+00   2.0418831e+00   3.2329790e+00   2.5171713e+00   2.3816204e+00   2.7937685e+00   2.7102198e+00   3.2724336e+00   2.2054062e+00   3.0737397e+00   3.0650685e+00   2.6738621e+00   3.1983741e+00   2.5253420e+00   3.3951420e+00   2.6185785e+00   3.5201263e+00   3.2642011e+00   2.9245132e+00   3.0559405e+00   3.4672191e+00   3.6501426e+00   3.0869409e+00   2.1449779e+00   2.4611582e+00   2.3678836e+00   2.5038051e+00   3.6798850e+00   3.0627375e+00   3.0833417e+00   3.3518108e+00   3.0810282e+00   2.6595270e+00   2.6323570e+00   2.9747184e+00   3.1719581e+00   2.6119950e+00   2.0875308e+00   2.7837517e+00   2.7481947e+00   2.7653278e+00   2.8959432e+00   1.7918633e+00   2.6810089e+00   4.6579399e+00   3.7114178e+00   4.5860934e+00   4.1845117e+00   4.4368376e+00   5.3138890e+00   3.1392617e+00   4.9608959e+00   4.4280037e+00   4.8387532e+00   3.7530908e+00   3.9304148e+00   4.1764880e+00   3.6510310e+00   3.8111653e+00   3.9838913e+00   4.1019789e+00   5.4302306e+00   5.6352651e+00   3.6334268e+00   4.4011799e+00   3.5332521e+00   5.4201202e+00   3.5378545e+00   4.3430510e+00   4.6603717e+00   3.4302376e+00   3.5053533e+00   4.2335883e+00   4.4640423e+00   4.8059592e+00   5.1881280e+00   4.2497073e+00   3.6834126e+00   4.1572779e+00   4.9128775e+00   4.2687104e+00   4.0908836e+00   3.4061169e+00   4.0989195e+00   4.3064904e+00   3.8759115e+00   3.7114178e+00   4.5707958e+00   4.4147019e+00   3.9326468e+00   3.6624594e+00   3.8494244e+00   4.0586633e+00   3.6843892e+00   4.0176783e-01   9.3801395e-01   3.7427929e-01   6.0551856e-01   4.9766035e-01   4.1449626e-01   2.5251796e-01   3.2352160e-01   7.0437330e-01   6.2024833e-01   2.4837156e-01   7.0826681e-01   8.1099042e-01   5.3665999e-01   5.7257017e-01   4.0293660e-01   5.3665999e-01   1.0321505e+00   3.2352160e-01   4.9857388e-01   1.2654843e+00   1.0181000e+00   4.9857388e-01   4.6472023e-01   6.6432544e-01   4.4535192e-01   8.1354181e-01   3.2586371e-01   4.4535192e-01   3.1652953e+00   2.9034751e+00   3.3383293e+00   2.4277398e+00   3.0113552e+00   2.8500355e+00   3.0981427e+00   1.7594421e+00   2.9944056e+00   2.3105335e+00   2.0559262e+00   2.5987706e+00   2.4171653e+00   3.0605340e+00   2.0054351e+00   2.8372675e+00   2.8748086e+00   2.4385827e+00   2.9411544e+00   2.2761106e+00   3.2149087e+00   2.3896630e+00   3.2878368e+00   3.0415738e+00   2.6906230e+00   2.8216976e+00   3.2222602e+00   3.4304873e+00   2.8822802e+00   1.8816502e+00   2.1994544e+00   2.0961718e+00   2.2729984e+00   3.4713427e+00   2.8746311e+00   2.8977380e+00   3.1239380e+00   2.8149627e+00   2.4626518e+00   2.3988202e+00   2.7512943e+00   2.9634715e+00   2.3744738e+00   1.7861398e+00   2.5679553e+00   2.5438761e+00   2.5602722e+00   2.6724144e+00   1.5132025e+00   2.4693940e+00   4.4818617e+00   3.5188715e+00   4.3693901e+00   3.9814082e+00   4.2430316e+00   5.0846750e+00   2.9378173e+00   4.7308926e+00   4.2026915e+00   4.6369546e+00   3.5592955e+00   3.7219741e+00   3.9702025e+00   3.4565374e+00   3.6485303e+00   3.8059948e+00   3.8952692e+00   5.2045888e+00   5.4038637e+00   3.3942456e+00   4.2018404e+00   3.3550631e+00   5.1838582e+00   3.3280757e+00   4.1439346e+00   4.4349731e+00   3.2284912e+00   3.3133518e+00   4.0354963e+00   4.2293106e+00   4.5707958e+00   4.9486891e+00   4.0555804e+00   3.4667821e+00   3.9402495e+00   4.6817169e+00   4.0952984e+00   3.8891597e+00   3.2181054e+00   3.8906833e+00   4.1179678e+00   3.6792093e+00   3.5188715e+00   4.3738746e+00   4.2318888e+00   3.7415007e+00   3.4482727e+00   3.6509580e+00   3.8867812e+00   3.4956677e+00   6.2660376e-01   4.1449626e-01   4.8927739e-01   7.0479928e-01   3.0546431e-01   2.5251796e-01   3.2816937e-01   5.7324170e-01   6.2538346e-01   3.7255734e-01   4.4535192e-01   5.7324170e-01   6.2482915e-01   5.3665999e-01   4.3691963e-01   6.2482915e-01   8.7420176e-01   3.2352160e-01   2.5651975e-01   1.4293465e+00   7.7360126e-01   2.5651975e-01   4.0147421e-01   7.1504098e-01   2.1269358e-01   6.2660376e-01   2.4837156e-01   4.1586001e-01   3.4011512e+00   3.1015495e+00   3.5629124e+00   2.6446848e+00   3.2242409e+00   3.0444970e+00   3.2854349e+00   1.9922212e+00   3.2208624e+00   2.4875432e+00   2.3235341e+00   2.7738624e+00   2.6761538e+00   3.2590031e+00   2.1770137e+00   3.0609726e+00   3.0488669e+00   2.6564689e+00   3.1671679e+00   2.4967542e+00   3.3778209e+00   2.5968629e+00   3.5012162e+00   3.2523394e+00   2.9093820e+00   3.0417674e+00   3.4541339e+00   3.6357801e+00   3.0695657e+00   2.1117686e+00   2.4265922e+00   2.3324013e+00   2.4794505e+00   3.6641654e+00   3.0465086e+00   3.0686943e+00   3.3395333e+00   3.0541897e+00   2.6428278e+00   2.6018930e+00   2.9558536e+00   3.1589081e+00   2.5867906e+00   2.0334278e+00   2.7624503e+00   2.7347909e+00   2.7481947e+00   2.8804789e+00   1.7294430e+00   2.6604040e+00   4.6390099e+00   3.6904099e+00   4.5721680e+00   4.1717456e+00   4.4201622e+00   5.3038306e+00   3.1101376e+00   4.9521292e+00   4.4131751e+00   4.8218478e+00   3.7351231e+00   3.9119157e+00   4.1593600e+00   3.6239123e+00   3.7806200e+00   3.9616940e+00   4.0893976e+00   5.4208566e+00   5.6225133e+00   3.6099406e+00   4.3833809e+00   3.5087649e+00   5.4106224e+00   3.5167400e+00   4.3287713e+00   4.6517741e+00   3.4091049e+00   3.4875352e+00   4.2154392e+00   4.4559638e+00   4.7948032e+00   5.1800729e+00   4.2298456e+00   3.6705550e+00   4.1464752e+00   4.8981257e+00   4.2482702e+00   4.0788778e+00   3.3871264e+00   4.0817153e+00   4.2852718e+00   3.8517038e+00   3.6904099e+00   4.5544260e+00   4.3933832e+00   3.9084933e+00   3.6377874e+00   3.8310704e+00   4.0381483e+00   3.6684338e+00   7.9016429e-01   9.0454394e-01   7.7553525e-01   6.5633874e-01   6.8961791e-01   6.5172743e-01   6.4755655e-01   6.9325418e-01   8.5690100e-01   7.5871717e-01   9.8800009e-01   6.3977563e-01   5.0503591e-01   9.0852141e-01   6.3977563e-01   6.2482915e-01   6.2605182e-01   4.4651726e-01   1.3039319e+00   4.5470518e-01   6.8801986e-01   9.4492923e-01   6.5223271e-01   6.9325418e-01   4.9674312e-01   7.6752131e-01   5.2574978e-01   3.9950977e+00   3.6682165e+00   4.1454421e+00   3.1171350e+00   3.7869887e+00   3.5623665e+00   3.8418637e+00   2.4093459e+00   3.7913585e+00   2.9787373e+00   2.6930133e+00   3.3123070e+00   3.1668302e+00   3.7985007e+00   2.6980573e+00   3.6472316e+00   3.5682291e+00   3.1756360e+00   3.6828708e+00   2.9891564e+00   3.9102500e+00   3.1455588e+00   4.0375495e+00   3.7881557e+00   3.4756264e+00   3.6204175e+00   4.0288578e+00   4.2043522e+00   3.6069560e+00   2.6127852e+00   2.9004348e+00   2.8010550e+00   3.0013391e+00   4.1901031e+00   3.5584876e+00   3.6126340e+00   3.9170234e+00   3.5823448e+00   3.1646752e+00   3.0923554e+00   3.4563987e+00   3.7021702e+00   3.1018442e+00   2.4341346e+00   3.2724336e+00   3.2604423e+00   3.2715632e+00   3.4335342e+00   2.1375243e+00   3.1807243e+00   5.1732049e+00   4.2085267e+00   5.1402548e+00   4.7090394e+00   4.9640507e+00   5.8783901e+00   3.5970425e+00   5.5195747e+00   4.9586651e+00   5.3905797e+00   4.2919639e+00   4.4545908e+00   4.7214902e+00   4.1323720e+00   4.2962344e+00   4.5078390e+00   4.6379987e+00   5.9985593e+00   6.1927610e+00   4.1173292e+00   4.9467209e+00   4.0217355e+00   5.9855018e+00   4.0597680e+00   4.8845913e+00   5.2228901e+00   3.9505682e+00   4.0262006e+00   4.7557226e+00   5.0295898e+00   5.3695643e+00   5.7704875e+00   4.7697480e+00   4.2124808e+00   4.6690776e+00   5.4857949e+00   4.7867344e+00   4.6237863e+00   3.9220577e+00   4.6512574e+00   4.8397561e+00   4.4244727e+00   4.2085267e+00   5.1102370e+00   4.9464234e+00   4.4688286e+00   4.1733964e+00   4.3844239e+00   4.5752087e+00   4.1957914e+00   3.8934542e-01   3.7598397e-01   1.5422108e-01   3.4583729e-01   3.7598397e-01   4.4651726e-01   3.8934542e-01   3.2816937e-01   8.2929029e-01   9.3610001e-01   4.3691963e-01   5.3022554e-01   5.3309112e-01   4.3691963e-01   7.5976039e-01   3.2586371e-01   4.2667565e-01   1.0733200e+00   7.4777660e-01   2.1845981e-01   5.0905001e-01   4.3456114e-01   5.2942799e-01   5.5492130e-01   4.6472023e-01   3.7427929e-01   3.2191540e+00   2.9033203e+00   3.3725057e+00   2.3744738e+00   3.0162346e+00   2.8254861e+00   3.0850817e+00   1.6867642e+00   3.0206125e+00   2.2489449e+00   1.9859316e+00   2.5612285e+00   2.4037412e+00   3.0483897e+00   1.9482601e+00   2.8711841e+00   2.8361445e+00   2.4280197e+00   2.9151666e+00   2.2428341e+00   3.1709561e+00   2.3770599e+00   3.2772927e+00   3.0392407e+00   2.7044574e+00   2.8456337e+00   3.2543813e+00   3.4363773e+00   2.8560815e+00   1.8517858e+00   2.1570512e+00   2.0577182e+00   2.2449618e+00   3.4472201e+00   2.8333788e+00   2.8654874e+00   3.1455372e+00   2.8102985e+00   2.4278629e+00   2.3504126e+00   2.7240842e+00   2.9511072e+00   2.3468577e+00   1.7140774e+00   2.5325623e+00   2.5220817e+00   2.5303132e+00   2.6704164e+00   1.4096199e+00   2.4355523e+00   4.4339908e+00   3.4713427e+00   4.3742064e+00   3.9639546e+00   4.2144772e+00   5.1104621e+00   2.8721481e+00   4.7555981e+00   4.1997133e+00   4.6264002e+00   3.5337158e+00   3.6986235e+00   3.9580816e+00   3.3951420e+00   3.5651172e+00   3.7578933e+00   3.8852294e+00   5.2312618e+00   5.4232729e+00   3.3678461e+00   4.1846468e+00   3.2909043e+00   5.2164277e+00   3.3005331e+00   4.1286019e+00   4.4583488e+00   3.1948184e+00   3.2785487e+00   4.0052019e+00   4.2627019e+00   4.5989546e+00   4.9978258e+00   4.0193656e+00   3.4602150e+00   3.9315374e+00   4.7096962e+00   4.0441539e+00   3.8751788e+00   3.1769821e+00   3.8841455e+00   4.0829381e+00   3.6559398e+00   3.4713427e+00   4.3535851e+00   4.1922661e+00   3.7063225e+00   3.4135466e+00   3.6262912e+00   3.8337160e+00   3.4586921e+00   4.5470518e-01   3.4378533e-01   4.9766035e-01   5.6631629e-01   3.2586371e-01   3.7255734e-01   6.5172743e-01   7.6625946e-01   9.7356960e-01   4.4651726e-01   7.0784540e-01   8.1273630e-01   4.4651726e-01   6.8757066e-01   4.4417983e-01   6.0670504e-01   1.1521791e+00   6.5172743e-01   4.5581864e-01   4.5470518e-01   5.6700421e-01   4.8036801e-01   5.1607523e-01   5.8851328e-01   5.0905001e-01   3.1972361e+00   2.8360340e+00   3.3243092e+00   2.2696891e+00   2.9531300e+00   2.6835197e+00   2.9981183e+00   1.5916843e+00   2.9546153e+00   2.1366783e+00   1.9099663e+00   2.4717637e+00   2.3219731e+00   2.9300203e+00   1.8705419e+00   2.8448793e+00   2.7044574e+00   2.2951567e+00   2.8430073e+00   2.1220080e+00   3.0654291e+00   2.3117864e+00   3.1749624e+00   2.9091307e+00   2.6433897e+00   2.8065044e+00   3.2000771e+00   3.3714688e+00   2.7511201e+00   1.7679293e+00   2.0426611e+00   1.9423536e+00   2.1457242e+00   3.3172489e+00   2.6940968e+00   2.7682296e+00   3.0935247e+00   2.7391698e+00   2.2996943e+00   2.2360451e+00   2.5729378e+00   2.8382774e+00   2.2413445e+00   1.6312555e+00   2.4031247e+00   2.3848740e+00   2.4037412e+00   2.5843380e+00   1.3803845e+00   2.3178393e+00   4.3373464e+00   3.3555449e+00   4.3029534e+00   3.8394246e+00   4.1166152e+00   5.0345534e+00   2.7564428e+00   4.6628709e+00   4.0929284e+00   4.5724955e+00   3.4657942e+00   3.6038441e+00   3.8912788e+00   3.2935105e+00   3.4985926e+00   3.6938082e+00   3.7771525e+00   5.1600819e+00   5.3477989e+00   3.2453592e+00   4.1245629e+00   3.1885527e+00   5.1389533e+00   3.2183480e+00   4.0411872e+00   4.3734530e+00   3.1116430e+00   3.1793624e+00   3.9065553e+00   4.1815080e+00   4.5288943e+00   4.9506208e+00   3.9281139e+00   3.3421539e+00   3.7789119e+00   4.6812838e+00   3.9623295e+00   3.7603559e+00   3.0782101e+00   3.8325036e+00   4.0241284e+00   3.6474081e+00   3.3555449e+00   4.2739171e+00   4.1339606e+00   3.6720159e+00   3.3349237e+00   3.5512382e+00   3.7511837e+00   3.3364095e+00   4.1312257e-01   5.0905001e-01   4.2538717e-01   3.2352160e-01   2.0656129e-01   5.0592043e-01   1.1017858e+00   1.2234738e+00   1.5422108e-01   4.1312257e-01   6.3924842e-01   1.5422108e-01   6.1968386e-01   4.0293660e-01   5.2942799e-01   7.7919451e-01   6.2482915e-01   5.6631629e-01   8.1385214e-01   2.5251796e-01   8.0032200e-01   4.2538717e-01   7.1462831e-01   3.2352160e-01   3.3601225e+00   3.0492285e+00   3.5130686e+00   2.4784234e+00   3.1574358e+00   2.9495683e+00   3.2305582e+00   1.7639552e+00   3.1543365e+00   2.3872777e+00   2.0066796e+00   2.7104259e+00   2.4866453e+00   3.1794134e+00   2.0999661e+00   3.0164205e+00   2.9733298e+00   2.5409084e+00   3.0313923e+00   2.3496997e+00   3.3211033e+00   2.5173832e+00   3.4035007e+00   3.1599783e+00   2.8424094e+00   2.9896107e+00   3.3894792e+00   3.5821206e+00   2.9960387e+00   1.9633030e+00   2.2546134e+00   2.1472921e+00   2.3729779e+00   3.5766918e+00   2.9692947e+00   3.0147040e+00   3.2887803e+00   2.9233984e+00   2.5628362e+00   2.4694536e+00   2.8371552e+00   3.0850817e+00   2.4681135e+00   1.7749726e+00   2.6585961e+00   2.6493446e+00   2.6623632e+00   2.8060305e+00   1.5124582e+00   2.5679553e+00   4.5912390e+00   3.6144502e+00   4.5212874e+00   4.0982070e+00   4.3637125e+00   5.2494547e+00   3.0086587e+00   4.8875515e+00   4.3294620e+00   4.7880147e+00   3.6912876e+00   3.8418637e+00   4.1117747e+00   3.5413188e+00   3.7389462e+00   3.9250135e+00   4.0233529e+00   5.3754694e+00   5.5627643e+00   3.4785161e+00   4.3436980e+00   3.4455964e+00   5.3512930e+00   3.4471566e+00   4.2776053e+00   4.5941143e+00   3.3449470e+00   3.4269051e+00   4.1524717e+00   4.3946634e+00   4.7366258e+00   5.1414650e+00   4.1713411e+00   3.5895201e+00   4.0467919e+00   4.8635964e+00   4.2075047e+00   4.0127353e+00   3.3273395e+00   4.0411872e+00   4.2480617e+00   3.8321687e+00   3.6144502e+00   4.5072985e+00   4.3598062e+00   3.8780834e+00   3.5586316e+00   3.7805671e+00   3.9971028e+00   3.6003219e+00   2.5651975e-01   2.8192292e-01   3.4378533e-01   3.4378533e-01   4.0147421e-01   7.1840099e-01   8.5690100e-01   3.7598397e-01   4.2538717e-01   5.3665999e-01   3.7598397e-01   6.6827038e-01   2.1269358e-01   3.0546431e-01   1.1320702e+00   6.2988288e-01   2.0656129e-01   4.4535192e-01   4.2667565e-01   4.1449626e-01   4.3691963e-01   3.8934542e-01   2.5251796e-01   3.3428183e+00   3.0232018e+00   3.4944845e+00   2.4950353e+00   3.1381402e+00   2.9363801e+00   3.2027420e+00   1.8084630e+00   3.1409294e+00   2.3642733e+00   2.1113036e+00   2.6784604e+00   2.5283251e+00   3.1625374e+00   2.0667297e+00   2.9950041e+00   2.9473422e+00   2.5410503e+00   3.0407257e+00   2.3596992e+00   3.2858223e+00   2.4986337e+00   3.3960124e+00   3.1519721e+00   2.8255193e+00   2.9686973e+00   3.3765772e+00   3.5575681e+00   2.9720515e+00   1.9732878e+00   2.2758449e+00   2.1765379e+00   2.3630256e+00   3.5606213e+00   2.9432282e+00   2.9813163e+00   3.2672636e+00   2.9349850e+00   2.5393641e+00   2.4678343e+00   2.8348218e+00   3.0655803e+00   2.4649412e+00   1.8381372e+00   2.6459992e+00   2.6324803e+00   2.6428278e+00   2.7886501e+00   1.5384446e+00   2.5500177e+00   4.5509522e+00   3.5863729e+00   4.4953238e+00   4.0776551e+00   4.3319640e+00   5.2308062e+00   2.9880146e+00   4.8736353e+00   4.3174903e+00   4.7496159e+00   3.6545040e+00   3.8173510e+00   4.0797075e+00   3.5129177e+00   3.6850739e+00   3.8789949e+00   4.0011311e+00   5.3516635e+00   5.5447338e+00   3.4854203e+00   4.3070102e+00   3.4066692e+00   5.3366535e+00   3.4209331e+00   4.2472818e+00   4.5769661e+00   3.3144678e+00   3.3951450e+00   4.1229838e+00   4.3815083e+00   4.7200939e+00   5.1200990e+00   4.1381062e+00   3.5750015e+00   4.0416512e+00   4.8355880e+00   4.1628805e+00   3.9898962e+00   3.2934163e+00   4.0073765e+00   4.2053647e+00   3.7839552e+00   3.5863729e+00   4.4735121e+00   4.3145846e+00   3.8316735e+00   3.5355330e+00   3.7466071e+00   3.9521135e+00   3.5718733e+00   1.2418578e-01   5.2942799e-01   4.9766035e-01   2.5251796e-01   6.0060595e-01   7.1462831e-01   4.4535192e-01   3.8776762e-01   3.2352160e-01   4.4535192e-01   8.5434758e-01   1.2418578e-01   2.5251796e-01   1.2643026e+00   8.1354181e-01   4.1449626e-01   4.5581864e-01   5.6769031e-01   3.0546431e-01   6.2024833e-01   2.0656129e-01   2.5251796e-01   3.3898078e+00   3.1105347e+00   3.5575681e+00   2.6249526e+00   3.2229246e+00   3.0488669e+00   3.3004172e+00   1.9465831e+00   3.2118493e+00   2.4993166e+00   2.2473120e+00   2.7928582e+00   2.6296047e+00   3.2639046e+00   2.1933937e+00   3.0559188e+00   3.0673749e+00   2.6440180e+00   3.1486786e+00   2.4776707e+00   3.4056271e+00   2.5954147e+00   3.4958702e+00   3.2483608e+00   2.9041534e+00   3.0378828e+00   3.4425295e+00   3.6411503e+00   3.0811775e+00   2.0851901e+00   2.3997585e+00   2.2980893e+00   2.4741664e+00   3.6714798e+00   3.0661139e+00   3.0923102e+00   3.3390355e+00   3.0288896e+00   2.6566259e+00   2.5949561e+00   2.9511072e+00   3.1662394e+00   2.5768305e+00   1.9764051e+00   2.7650187e+00   2.7420671e+00   2.7570191e+00   2.8802219e+00   1.6913411e+00   2.6662783e+00   4.6723657e+00   3.7109297e+00   4.5802461e+00   4.1829734e+00   4.4414351e+00   5.3024507e+00   3.1246867e+00   4.9479218e+00   4.4123750e+00   4.8421359e+00   3.7582429e+00   3.9238367e+00   4.1750713e+00   3.6455011e+00   3.8262353e+00   3.9966275e+00   4.0997246e+00   5.4219259e+00   5.6210533e+00   3.5985833e+00   4.4045665e+00   3.5402439e+00   5.4041845e+00   3.5288526e+00   4.3467079e+00   4.6509698e+00   3.4261305e+00   3.5087649e+00   4.2340479e+00   4.4487072e+00   4.7898591e+00   5.1726632e+00   4.2521321e+00   3.6728562e+00   4.1446028e+00   4.9002452e+00   4.2845042e+00   4.0915924e+00   3.4110551e+00   4.0971854e+00   4.3142588e+00   3.8789274e+00   3.7109297e+00   4.5753785e+00   4.4261431e+00   3.9377466e+00   3.6482464e+00   3.8509694e+00   4.0749843e+00   3.6894983e+00   5.1607523e-01   4.5470518e-01   2.5251796e-01   7.0086313e-01   8.1067767e-01   3.7598397e-01   2.8192292e-01   3.0546431e-01   3.7598397e-01   8.2654509e-01   1.2418578e-01   2.1845981e-01   1.1754055e+00   8.0326782e-01   4.2667565e-01   5.7324170e-01   4.9766035e-01   4.1449626e-01   6.0551856e-01   3.0546431e-01   2.0656129e-01   3.4780839e+00   3.2028668e+00   3.6478832e+00   2.7001131e+00   3.3123070e+00   3.1424188e+00   3.3940268e+00   2.0081113e+00   3.3027430e+00   2.5846998e+00   2.2899742e+00   2.8843735e+00   2.7014135e+00   3.3579678e+00   2.2804674e+00   3.1447330e+00   3.1614572e+00   2.7347909e+00   3.2266676e+00   2.5600441e+00   3.4989115e+00   2.6835197e+00   3.5848035e+00   3.3425343e+00   2.9944056e+00   3.1272113e+00   3.5315985e+00   3.7321938e+00   3.1736230e+00   2.1642821e+00   2.4763086e+00   2.3729779e+00   2.5613679e+00   3.7645411e+00   3.1602773e+00   3.1861493e+00   3.4298218e+00   3.1090174e+00   2.7503801e+00   2.6773131e+00   3.0414782e+00   3.2606191e+00   2.6626548e+00   2.0308266e+00   2.8549070e+00   2.8371552e+00   2.8500790e+00   2.9720515e+00   1.7439430e+00   2.7570191e+00   4.7646254e+00   3.8019108e+00   4.6714768e+00   4.2777154e+00   4.5341669e+00   5.3940437e+00   3.2096520e+00   5.0408889e+00   4.5037829e+00   4.9318274e+00   3.8493108e+00   4.0147814e+00   4.2656755e+00   3.7323432e+00   3.9122146e+00   4.0862794e+00   4.1939019e+00   5.5136120e+00   5.7113100e+00   3.6836404e+00   4.4947801e+00   3.6298047e+00   5.4953655e+00   3.6181784e+00   4.4396174e+00   4.7440323e+00   3.5161021e+00   3.6013159e+00   4.3259034e+00   4.5411167e+00   4.8804165e+00   5.2620015e+00   4.3431589e+00   3.7666196e+00   4.2394195e+00   4.9871255e+00   4.3755778e+00   4.1864815e+00   3.5032323e+00   4.1868319e+00   4.4036244e+00   3.9638383e+00   3.8019108e+00   4.6672392e+00   4.5155386e+00   4.0245873e+00   3.7349501e+00   3.9420153e+00   4.1660972e+00   3.7835217e+00   1.2418578e-01   7.0826681e-01   9.4125538e-01   1.1340084e+00   2.1845981e-01   4.4417983e-01   8.2105460e-01   2.1845981e-01   3.8776762e-01   4.1449626e-01   4.2418962e-01   9.1075311e-01   3.7255734e-01   4.8036801e-01   6.6827038e-01   2.5651975e-01   6.4704320e-01   2.0656129e-01   6.8961791e-01   3.2586371e-01   3.4686627e+00   3.1154621e+00   3.6024772e+00   2.5108475e+00   3.2290313e+00   2.9704704e+00   3.2809332e+00   1.7903952e+00   3.2349033e+00   2.3960250e+00   2.0600195e+00   2.7476411e+00   2.5610667e+00   3.2181149e+00   2.1323638e+00   3.1154281e+00   2.9881598e+00   2.5786309e+00   3.0947136e+00   2.3839455e+00   3.3448197e+00   2.5821869e+00   3.4532666e+00   3.1998457e+00   2.9200439e+00   3.0794219e+00   3.4771054e+00   3.6510733e+00   3.0328831e+00   2.0197525e+00   2.2893157e+00   2.1858172e+00   2.4166535e+00   3.6030381e+00   2.9770247e+00   3.0492285e+00   3.3713329e+00   2.9974031e+00   2.5833316e+00   2.4944673e+00   2.8535197e+00   3.1260028e+00   2.5104998e+00   1.8109223e+00   2.6804452e+00   2.6742360e+00   2.6875169e+00   2.8656044e+00   1.5447938e+00   2.5961850e+00   4.6147552e+00   3.6320149e+00   4.5850999e+00   4.1288948e+00   4.3989089e+00   5.3208661e+00   3.0146208e+00   4.9525575e+00   4.3778283e+00   4.8485483e+00   3.7416375e+00   3.8836706e+00   4.1692394e+00   3.5584719e+00   3.7545764e+00   3.9635178e+00   4.0653249e+00   5.4465238e+00   5.6318041e+00   3.5148434e+00   4.4004449e+00   3.4571917e+00   5.4256316e+00   3.4931266e+00   4.3243671e+00   4.6617210e+00   3.3863989e+00   3.4595139e+00   4.1872611e+00   4.4691596e+00   4.8126955e+00   5.2323771e+00   4.2057897e+00   3.6309135e+00   4.0714444e+00   4.9544547e+00   4.2355968e+00   4.0495222e+00   3.3563815e+00   4.1075398e+00   4.2957899e+00   3.9065020e+00   3.6320149e+00   4.5543025e+00   4.4046818e+00   3.9362563e+00   3.6038441e+00   3.8285790e+00   4.0238937e+00   3.6204282e+00   6.2538346e-01   1.0167353e+00   1.1763980e+00   1.4096146e-01   4.1449626e-01   7.4740267e-01   1.4096146e-01   4.4535192e-01   3.7427929e-01   4.5581864e-01   8.2135873e-01   4.4535192e-01   5.0503591e-01   7.3145860e-01   2.1269358e-01   7.1421512e-01   2.5251796e-01   6.8961791e-01   2.8192292e-01   3.4295980e+00   3.0905489e+00   3.5700123e+00   2.4944673e+00   3.2020292e+00   2.9613737e+00   3.2617087e+00   1.7750284e+00   3.2049793e+00   2.3909366e+00   2.0308266e+00   2.7326472e+00   2.5286673e+00   3.2028668e+00   2.1181082e+00   3.0792693e+00   2.9816970e+00   2.5624932e+00   3.0681391e+00   2.3677174e+00   3.3352475e+00   2.5566444e+00   3.4334259e+00   3.1839972e+00   2.8907702e+00   3.0462904e+00   3.4448498e+00   3.6256155e+00   3.0181476e+00   1.9946242e+00   2.2719663e+00   2.1665831e+00   2.3980102e+00   3.5922217e+00   2.9733478e+00   3.0355056e+00   3.3410264e+00   2.9673667e+00   2.5744164e+00   2.4820750e+00   2.8455141e+00   3.1100045e+00   2.4920874e+00   1.7903952e+00   2.6704164e+00   2.6637326e+00   2.6767607e+00   2.8425716e+00   1.5257596e+00   2.5839288e+00   4.6057175e+00   3.6244539e+00   4.5619285e+00   4.1170543e+00   4.3856360e+00   5.2953657e+00   3.0110441e+00   4.9290739e+00   4.3593510e+00   4.8266994e+00   3.7227460e+00   3.8675033e+00   4.1480696e+00   3.5505922e+00   3.7479505e+00   3.9489183e+00   4.0495222e+00   5.4213759e+00   5.6069704e+00   3.4988409e+00   4.3796539e+00   3.4519560e+00   5.3990720e+00   3.4751739e+00   4.3070102e+00   4.6372963e+00   3.3701472e+00   3.4467337e+00   4.1738909e+00   4.4422690e+00   4.7852959e+00   5.2004339e+00   4.1925494e+00   3.6148707e+00   4.0613681e+00   4.9222119e+00   4.2248103e+00   4.0355816e+00   3.3448336e+00   4.0832977e+00   4.2781022e+00   3.8793995e+00   3.6244539e+00   4.5369609e+00   4.3880177e+00   3.9147164e+00   3.5857963e+00   3.8105301e+00   4.0134966e+00   3.6122845e+00   7.1799256e-01   8.0358695e-01   5.5419992e-01   4.6472023e-01   2.5651975e-01   5.5419992e-01   1.0198386e+00   3.2352160e-01   4.1586001e-01   1.2565757e+00   1.0054037e+00   4.1586001e-01   5.2574978e-01   6.4806901e-01   4.5581864e-01   8.0619006e-01   3.2586371e-01   4.1586001e-01   3.3274681e+00   3.0643176e+00   3.5031390e+00   2.5831315e+00   3.1734856e+00   3.0256804e+00   3.2593968e+00   1.9049236e+00   3.1662394e+00   2.4587503e+00   2.1948123e+00   2.7522526e+00   2.5874301e+00   3.2341367e+00   2.1493214e+00   2.9966141e+00   3.0389019e+00   2.6214821e+00   3.0978571e+00   2.4463233e+00   3.3673968e+00   2.5500177e+00   3.4578354e+00   3.2240818e+00   2.8578051e+00   2.9828212e+00   3.3905763e+00   3.5904118e+00   3.0455175e+00   2.0467937e+00   2.3640301e+00   2.2638728e+00   2.4385827e+00   3.6424937e+00   3.0387448e+00   3.0543001e+00   3.2867025e+00   2.9810914e+00   2.6291524e+00   2.5579619e+00   2.9291061e+00   3.1351569e+00   2.5421955e+00   1.9274228e+00   2.7359835e+00   2.7196686e+00   2.7293044e+00   2.8418790e+00   1.6234861e+00   2.6349941e+00   4.6268918e+00   3.6735954e+00   4.5276539e+00   4.1519514e+00   4.3981255e+00   5.2510005e+00   3.0847983e+00   4.9049143e+00   4.3738893e+00   4.7804645e+00   3.7059360e+00   3.8806135e+00   4.1210200e+00   3.6007179e+00   3.7674167e+00   3.9401211e+00   4.0632074e+00   5.3683319e+00   5.5675337e+00   3.5650560e+00   4.3467079e+00   3.4964385e+00   5.3534247e+00   3.4817971e+00   4.3007421e+00   4.6057628e+00   3.3796707e+00   3.4684743e+00   4.1910954e+00   4.4033511e+00   4.7374076e+00   5.1107389e+00   4.2056854e+00   3.6417452e+00   4.1251907e+00   4.8290847e+00   4.2339606e+00   4.0576409e+00   3.3702841e+00   4.0376849e+00   4.2550416e+00   3.8015574e+00   3.6735954e+00   4.5249462e+00   4.3662620e+00   3.8699102e+00   3.5979726e+00   3.8007870e+00   4.0252278e+00   3.6568095e+00   3.0811765e-01   1.0065841e+00   9.1075311e-01   6.2538346e-01   1.0065841e+00   1.2125198e+00   7.0086313e-01   6.1623531e-01   1.8279039e+00   1.0613462e+00   6.9369532e-01   4.8135521e-01   1.1149070e+00   3.0811765e-01   9.7098574e-01   4.0293660e-01   8.0358695e-01   3.4154940e+00   3.1439160e+00   3.5872997e+00   2.8054691e+00   3.2839149e+00   3.1127876e+00   3.3274872e+00   2.2159139e+00   3.2598167e+00   2.6167778e+00   2.5758644e+00   2.8523754e+00   2.8256291e+00   3.3122081e+00   2.3003824e+00   3.0947136e+00   3.1160876e+00   2.7384939e+00   3.2940867e+00   2.6281170e+00   3.4401593e+00   2.6851662e+00   3.5758474e+00   3.3024121e+00   2.9636544e+00   3.0850893e+00   3.4935692e+00   3.6787177e+00   3.1382691e+00   2.2643860e+00   2.5838312e+00   2.4957147e+00   2.5876691e+00   3.7272092e+00   3.1148696e+00   3.1192689e+00   3.3731473e+00   3.1641238e+00   2.7164367e+00   2.7371177e+00   3.0433470e+00   3.2094276e+00   2.6989752e+00   2.2729593e+00   2.8576425e+00   2.7954161e+00   2.8234677e+00   2.9407805e+00   1.9980146e+00   2.7511201e+00   4.6993349e+00   3.7716613e+00   4.6090409e+00   4.2170163e+00   4.4740971e+00   5.3233695e+00   3.2312218e+00   4.9715358e+00   4.4649192e+00   4.8634712e+00   3.7907269e+00   3.9777091e+00   4.2102908e+00   3.7293867e+00   3.8887827e+00   4.0321207e+00   4.1304736e+00   5.4336694e+00   5.6535520e+00   3.7088191e+00   4.4333012e+00   3.6017014e+00   5.4287623e+00   3.5939935e+00   4.3696884e+00   4.6684884e+00   3.4865359e+00   3.5518450e+00   4.2777882e+00   4.4716883e+00   4.8204359e+00   5.1830573e+00   4.2975164e+00   3.7189281e+00   4.1915116e+00   4.9282164e+00   4.3126073e+00   4.1182993e+00   3.4568393e+00   4.1297239e+00   4.3496867e+00   3.9207320e+00   3.7716613e+00   4.6018276e+00   4.4564872e+00   3.9827168e+00   3.7295388e+00   3.8905364e+00   4.1037903e+00   3.7281480e+00   1.1474460e+00   1.0344911e+00   7.0043186e-01   1.1474460e+00   1.4311891e+00   8.2654509e-01   7.6787403e-01   1.9730918e+00   1.3073038e+00   7.9878917e-01   6.2407309e-01   1.2632199e+00   5.0503591e-01   1.1833480e+00   5.0905001e-01   9.4080461e-01   3.4392518e+00   3.2008338e+00   3.6261197e+00   2.9076510e+00   3.3439089e+00   3.2073032e+00   3.3907558e+00   2.3329978e+00   3.3168472e+00   2.7081478e+00   2.6929215e+00   2.9283888e+00   2.9264154e+00   3.3942456e+00   2.3848677e+00   3.1312883e+00   3.2027420e+00   2.8385969e+00   3.3781905e+00   2.7324845e+00   3.5133135e+00   2.7602023e+00   3.6563535e+00   3.3905763e+00   3.0256209e+00   3.1312883e+00   3.5423793e+00   3.7299679e+00   3.2179031e+00   2.3661539e+00   2.6906231e+00   2.6054995e+00   2.6801752e+00   3.8138933e+00   3.2027420e+00   3.1888037e+00   3.4187265e+00   3.2459231e+00   2.8060305e+00   2.8359967e+00   3.1453916e+00   3.2886661e+00   2.7943622e+00   2.3874574e+00   2.9533314e+00   2.8877105e+00   2.9141136e+00   3.0147886e+00   2.0992326e+00   2.8425716e+00   4.7630756e+00   3.8535531e+00   4.6550014e+00   4.2947468e+00   4.5389196e+00   5.3632740e+00   3.3234239e+00   5.0232338e+00   4.5363757e+00   4.8985515e+00   3.8441304e+00   4.0476997e+00   4.2599433e+00   3.8106152e+00   3.9516603e+00   4.0850903e+00   4.1995425e+00   5.4671477e+00   5.6957748e+00   3.8037734e+00   4.4771379e+00   3.6783395e+00   5.4690202e+00   3.6632177e+00   4.4259826e+00   4.7160634e+00   3.5560806e+00   3.6239123e+00   4.3464973e+00   4.5187406e+00   4.8619146e+00   5.2001625e+00   4.3635746e+00   3.7979761e+00   4.2843668e+00   4.9451734e+00   4.3709882e+00   4.1899199e+00   3.5299194e+00   4.1707976e+00   4.3972344e+00   3.9457376e+00   3.8535531e+00   4.6546556e+00   4.5024055e+00   4.0227020e+00   3.8004969e+00   3.9484773e+00   4.1635108e+00   3.8079860e+00   3.0811765e-01   6.5223271e-01   0.0000000e+00   5.0991930e-01   3.2586371e-01   4.2667565e-01   8.3172002e-01   5.0991930e-01   5.6769031e-01   7.5082357e-01   2.1845981e-01   7.0479928e-01   3.0811765e-01   6.4755655e-01   2.1845981e-01   3.4865562e+00   3.1726595e+00   3.6377960e+00   2.5987470e+00   3.2814045e+00   3.0627375e+00   3.3515846e+00   1.8841865e+00   3.2769379e+00   2.5038079e+00   2.1311468e+00   2.8311678e+00   2.6104387e+00   3.2962520e+00   2.2214438e+00   3.1433122e+00   3.0878634e+00   2.6552472e+00   3.1570103e+00   2.4668912e+00   3.4394878e+00   2.6411293e+00   3.5233648e+00   3.2747247e+00   2.9659871e+00   3.1154783e+00   3.5134741e+00   3.7059620e+00   3.1148696e+00   2.0851901e+00   2.3731428e+00   2.2655571e+00   2.4927109e+00   3.6920087e+00   3.0823446e+00   3.1337459e+00   3.4135200e+00   3.0481703e+00   2.6780487e+00   2.5874301e+00   2.9489507e+00   3.2027420e+00   2.5873149e+00   1.8973383e+00   2.7738355e+00   2.7632614e+00   2.7778954e+00   2.9269923e+00   1.6390769e+00   2.6848587e+00   4.7106706e+00   3.7313856e+00   4.6446321e+00   4.2142736e+00   4.4836580e+00   5.3716885e+00   3.1250284e+00   5.0074019e+00   4.4485220e+00   4.9128219e+00   3.8150636e+00   3.9624529e+00   4.2358121e+00   3.6602286e+00   3.8605980e+00   4.0488387e+00   4.1418643e+00   5.4970002e+00   5.6855224e+00   3.5964347e+00   4.4685630e+00   3.5634461e+00   5.4730406e+00   3.5693950e+00   4.3989089e+00   4.7150659e+00   3.4668130e+00   3.5464993e+00   4.2723380e+00   4.5155386e+00   4.8594290e+00   5.2647079e+00   4.2921213e+00   3.7064459e+00   4.1581964e+00   4.9913682e+00   4.3286007e+00   4.1303097e+00   3.4468286e+00   4.1669742e+00   4.3729308e+00   3.9624170e+00   3.7313856e+00   4.6297577e+00   4.4844827e+00   4.0056359e+00   3.6817961e+00   3.9035218e+00   4.1179678e+00   3.7164366e+00   5.2942799e-01   3.0811765e-01   6.0611244e-01   3.2586371e-01   3.0546431e-01   9.4125538e-01   6.0060595e-01   5.2574978e-01   8.1558458e-01   2.8507955e-01   6.4755655e-01   4.1312257e-01   5.5419992e-01   2.0656129e-01   3.7045940e+00   3.4142500e+00   3.8690719e+00   2.8688189e+00   3.5226542e+00   3.3385842e+00   3.6010215e+00   2.1580776e+00   3.5196916e+00   2.7652601e+00   2.4083873e+00   3.0820950e+00   2.8783309e+00   3.5617386e+00   2.4693940e+00   3.3658240e+00   3.3558214e+00   2.9322808e+00   3.4112518e+00   2.7424260e+00   3.6945405e+00   2.8867565e+00   3.7848217e+00   3.5471494e+00   3.2076743e+00   3.3449470e+00   3.7498842e+00   3.9450818e+00   3.3735875e+00   2.3490515e+00   2.6490839e+00   2.5444216e+00   2.7549369e+00   3.9621873e+00   3.3527310e+00   3.3865418e+00   3.6475099e+00   3.3024121e+00   2.9459653e+00   2.8566322e+00   3.2311957e+00   3.4653703e+00   2.8535197e+00   2.1708533e+00   3.0455175e+00   3.0364473e+00   3.0465086e+00   3.1799184e+00   1.8842354e+00   2.9509414e+00   4.9594922e+00   3.9924292e+00   4.8844442e+00   4.4804205e+00   4.7354764e+00   5.6130421e+00   3.3873806e+00   5.2583931e+00   4.7090394e+00   5.1413739e+00   4.0532097e+00   4.2156327e+00   4.4735121e+00   3.9153764e+00   4.0928954e+00   4.2826383e+00   4.4004808e+00   5.7341534e+00   5.9271927e+00   3.8700742e+00   4.7016733e+00   3.8156003e+00   5.7155096e+00   3.8175051e+00   4.6462020e+00   4.9620553e+00   3.7143727e+00   3.8000004e+00   4.5254820e+00   4.7613782e+00   5.0991856e+00   5.4888822e+00   4.5411167e+00   3.9718373e+00   4.4397363e+00   5.2074442e+00   4.5701358e+00   4.3916992e+00   3.6996802e+00   4.3970196e+00   4.6045465e+00   4.1691696e+00   3.9924292e+00   4.8725396e+00   4.7150659e+00   4.2256400e+00   3.9292780e+00   4.1454529e+00   4.3599285e+00   3.9798670e+00   6.5223271e-01   1.1268457e+00   4.1449626e-01   5.0090417e-01   1.3784393e+00   1.1053488e+00   5.8851328e-01   6.6827038e-01   7.6787403e-01   4.8036801e-01   9.0852141e-01   2.8192292e-01   5.0905001e-01   3.5117473e+00   3.2719724e+00   3.6961290e+00   2.8060101e+00   3.3799936e+00   3.2401159e+00   3.4709594e+00   2.1293854e+00   3.3643376e+00   2.6848587e+00   2.4115946e+00   2.9723937e+00   2.7984009e+00   3.4455106e+00   2.3749088e+00   3.1913397e+00   3.2574960e+00   2.8320532e+00   3.3150921e+00   2.6637326e+00   3.5883493e+00   2.7640668e+00   3.6695251e+00   3.4317240e+00   3.0617355e+00   3.1820648e+00   3.5855784e+00   3.7950050e+00   3.2620096e+00   2.2645766e+00   2.5831070e+00   2.4810276e+00   2.6563403e+00   3.8575846e+00   3.2574960e+00   3.2718360e+00   3.4856613e+00   3.1913594e+00   2.8466990e+00   2.7801709e+00   3.1437608e+00   3.3466419e+00   2.7595194e+00   2.1498672e+00   2.9543365e+00   2.9330570e+00   2.9459653e+00   3.0511838e+00   1.8555964e+00   2.8534301e+00   4.8490742e+00   3.8962785e+00   4.7308926e+00   4.3643842e+00   4.6144072e+00   5.4442665e+00   3.3129652e+00   5.0997539e+00   4.5816539e+00   4.9883395e+00   3.9213002e+00   4.0961125e+00   4.3313403e+00   3.8279951e+00   4.0003537e+00   4.1625074e+00   4.2731561e+00   5.5604940e+00   5.7635900e+00   3.7812981e+00   4.5580745e+00   3.7236571e+00   5.5437155e+00   3.6992145e+00   4.5120086e+00   4.8012240e+00   3.5989213e+00   3.6872980e+00   4.4084575e+00   4.5949523e+00   4.9306472e+00   5.2918657e+00   4.4250143e+00   3.8510143e+00   4.3338058e+00   5.0198276e+00   4.4571663e+00   4.2687771e+00   3.5910375e+00   4.2454653e+00   4.4729144e+00   4.0139676e+00   3.8962785e+00   4.7377574e+00   4.5853438e+00   4.0877338e+00   3.8179781e+00   4.0161568e+00   4.2490407e+00   3.8755800e+00   5.0991930e-01   3.2586371e-01   4.2667565e-01   8.3172002e-01   5.0991930e-01   5.6769031e-01   7.5082357e-01   2.1845981e-01   7.0479928e-01   3.0811765e-01   6.4755655e-01   2.1845981e-01   3.4865562e+00   3.1726595e+00   3.6377960e+00   2.5987470e+00   3.2814045e+00   3.0627375e+00   3.3515846e+00   1.8841865e+00   3.2769379e+00   2.5038079e+00   2.1311468e+00   2.8311678e+00   2.6104387e+00   3.2962520e+00   2.2214438e+00   3.1433122e+00   3.0878634e+00   2.6552472e+00   3.1570103e+00   2.4668912e+00   3.4394878e+00   2.6411293e+00   3.5233648e+00   3.2747247e+00   2.9659871e+00   3.1154783e+00   3.5134741e+00   3.7059620e+00   3.1148696e+00   2.0851901e+00   2.3731428e+00   2.2655571e+00   2.4927109e+00   3.6920087e+00   3.0823446e+00   3.1337459e+00   3.4135200e+00   3.0481703e+00   2.6780487e+00   2.5874301e+00   2.9489507e+00   3.2027420e+00   2.5873149e+00   1.8973383e+00   2.7738355e+00   2.7632614e+00   2.7778954e+00   2.9269923e+00   1.6390769e+00   2.6848587e+00   4.7106706e+00   3.7313856e+00   4.6446321e+00   4.2142736e+00   4.4836580e+00   5.3716885e+00   3.1250284e+00   5.0074019e+00   4.4485220e+00   4.9128219e+00   3.8150636e+00   3.9624529e+00   4.2358121e+00   3.6602286e+00   3.8605980e+00   4.0488387e+00   4.1418643e+00   5.4970002e+00   5.6855224e+00   3.5964347e+00   4.4685630e+00   3.5634461e+00   5.4730406e+00   3.5693950e+00   4.3989089e+00   4.7150659e+00   3.4668130e+00   3.5464993e+00   4.2723380e+00   4.5155386e+00   4.8594290e+00   5.2647079e+00   4.2921213e+00   3.7064459e+00   4.1581964e+00   4.9913682e+00   4.3286007e+00   4.1303097e+00   3.4468286e+00   4.1669742e+00   4.3729308e+00   3.9624170e+00   3.7313856e+00   4.6297577e+00   4.4844827e+00   4.0056359e+00   3.6817961e+00   3.9035218e+00   4.1179678e+00   3.7164366e+00   7.3813096e-01   6.8961791e-01   7.0086313e-01   2.0000000e-01   7.3805807e-01   1.0030700e+00   4.0293660e-01   9.4352681e-01   2.5251796e-01   1.0120221e+00   6.2024833e-01   3.8265307e+00   3.4552560e+00   3.9537404e+00   2.8022534e+00   3.5701225e+00   3.2863508e+00   3.6126198e+00   2.0524386e+00   3.5845127e+00   2.6848587e+00   2.2888897e+00   3.0684384e+00   2.8791325e+00   3.5464993e+00   2.4469125e+00   3.4686755e+00   3.2961206e+00   2.9072057e+00   3.4107902e+00   2.6959009e+00   3.6545040e+00   2.9195876e+00   3.7806187e+00   3.5312474e+00   3.2669151e+00   3.4295849e+00   3.8277021e+00   3.9909030e+00   3.3562690e+00   2.3465937e+00   2.5906376e+00   2.4892531e+00   2.7423171e+00   3.9193693e+00   3.2780620e+00   3.3708389e+00   3.7190229e+00   3.3268984e+00   2.8983020e+00   2.7954161e+00   3.1611584e+00   3.4557351e+00   2.8328337e+00   2.0658700e+00   2.9919517e+00   2.9960210e+00   3.0059712e+00   3.2048547e+00   1.8038968e+00   2.9141136e+00   4.9189452e+00   3.9342203e+00   4.9208723e+00   4.4494735e+00   4.7160542e+00   5.6635213e+00   3.2909043e+00   5.2946188e+00   4.7062325e+00   5.1779277e+00   4.0657707e+00   4.2053647e+00   4.4986279e+00   3.8509694e+00   4.0384339e+00   4.2739171e+00   4.3927415e+00   5.7909894e+00   5.9706827e+00   3.8237409e+00   4.7267599e+00   3.7490739e+00   5.7704875e+00   3.8154018e+00   4.6503268e+00   5.0044958e+00   3.7060524e+00   3.7762575e+00   4.5037232e+00   4.8164539e+00   5.1574084e+00   5.5860081e+00   4.5195237e+00   3.9601358e+00   4.3901702e+00   5.2992055e+00   4.5412859e+00   4.3739561e+00   3.6694918e+00   4.4403343e+00   4.6130415e+00   4.2323959e+00   3.9342203e+00   4.8773871e+00   4.7190595e+00   4.2559866e+00   3.9201797e+00   4.1523445e+00   4.3289315e+00   3.9302319e+00   2.1845981e-01   1.1486378e+00   7.0784540e-01   4.0438741e-01   5.0503591e-01   4.4651726e-01   4.0147421e-01   5.0905001e-01   3.2352160e-01   1.4096146e-01   3.4156574e+00   3.1235447e+00   3.5778307e+00   2.6097685e+00   3.2346686e+00   3.0478400e+00   3.3101102e+00   1.9193093e+00   3.2270948e+00   2.4922287e+00   2.2081369e+00   2.7965957e+00   2.6184141e+00   3.2685282e+00   2.1916898e+00   3.0773654e+00   3.0673749e+00   2.6423274e+00   3.1444983e+00   2.4678343e+00   3.4088888e+00   2.6016025e+00   3.4988409e+00   3.2521427e+00   2.9171710e+00   3.0559188e+00   3.4597125e+00   3.6553612e+00   3.0847983e+00   2.0765921e+00   2.3848740e+00   2.2817008e+00   2.4722095e+00   3.6724425e+00   3.0650478e+00   3.0981264e+00   3.3567173e+00   3.0288896e+00   2.6566259e+00   2.5851693e+00   2.9455446e+00   3.1719381e+00   2.5729378e+00   1.9450955e+00   2.7611864e+00   2.7431084e+00   2.7570191e+00   2.8884401e+00   1.6625998e+00   2.6648989e+00   4.6768871e+00   3.7101281e+00   4.5948688e+00   4.1876541e+00   4.4480565e+00   5.3202405e+00   3.1169790e+00   4.9630576e+00   4.4189653e+00   4.8572313e+00   3.7684708e+00   3.9292780e+00   4.1872611e+00   3.6418662e+00   3.8262353e+00   4.0041417e+00   4.1076175e+00   5.4411191e+00   5.6370076e+00   3.5929878e+00   4.4174698e+00   3.5389106e+00   5.4223305e+00   3.5340177e+00   4.3569684e+00   4.6672392e+00   3.4309563e+00   3.5133135e+00   4.2392500e+00   4.4661721e+00   4.8075242e+00   5.1977119e+00   4.2572858e+00   3.6784045e+00   4.1454521e+00   4.9233665e+00   4.2900309e+00   4.0984960e+00   3.4145942e+00   4.1120703e+00   4.3243538e+00   3.8957047e+00   3.7101281e+00   4.5857922e+00   4.4360042e+00   3.9497198e+00   3.6509512e+00   3.8600234e+00   4.0800357e+00   3.6915258e+00   1.2223099e+00   6.2024833e-01   3.7255734e-01   6.2081167e-01   5.0905001e-01   3.7598397e-01   4.4651726e-01   3.4583729e-01   2.1269358e-01   3.6091470e+00   3.3105724e+00   3.7708932e+00   2.7979838e+00   3.4251430e+00   3.2391031e+00   3.4951642e+00   2.1075335e+00   3.4235403e+00   2.6687055e+00   2.3989464e+00   2.9762945e+00   2.8216056e+00   3.4603628e+00   2.3673218e+00   3.2680041e+00   3.2498302e+00   2.8414525e+00   3.3361912e+00   2.6626548e+00   3.5849794e+00   2.7906520e+00   3.6926714e+00   3.4497714e+00   3.1105675e+00   3.2468925e+00   3.6557661e+00   3.8432801e+00   3.2705166e+00   2.2719663e+00   2.5786309e+00   2.4784234e+00   2.6629602e+00   3.8619321e+00   3.2465133e+00   3.2780765e+00   3.5475145e+00   3.2266676e+00   2.8416143e+00   2.7719788e+00   3.1392934e+00   3.3624692e+00   2.7656089e+00   2.1335398e+00   2.9496515e+00   2.9338590e+00   2.9447165e+00   3.0808399e+00   1.8330979e+00   2.8520904e+00   4.8482992e+00   3.8884996e+00   4.7814945e+00   4.3763964e+00   4.6280797e+00   5.5131379e+00   3.2922206e+00   5.1594703e+00   4.6125121e+00   5.0342965e+00   3.9453171e+00   4.1137002e+00   4.3683295e+00   3.8151836e+00   3.9816719e+00   4.1715493e+00   4.2963195e+00   5.6322635e+00   5.8289682e+00   3.7874513e+00   4.5945190e+00   3.7079546e+00   5.6180203e+00   3.7164611e+00   4.5394421e+00   4.8614468e+00   3.6107037e+00   3.6929889e+00   4.4201622e+00   4.6634723e+00   5.0015266e+00   5.3906681e+00   4.4348302e+00   3.8718490e+00   4.3427947e+00   5.1078309e+00   4.4583488e+00   4.2864208e+00   3.5920050e+00   4.2919639e+00   4.4953238e+00   4.0619633e+00   3.8884996e+00   4.7650352e+00   4.6046026e+00   4.1173867e+00   3.8320624e+00   4.0389546e+00   4.2480032e+00   3.8727359e+00   9.0049692e-01   1.2307737e+00   1.5483011e+00   7.1462831e-01   1.5272277e+00   9.0074515e-01   1.4700179e+00   1.0331736e+00   3.7896333e+00   3.4304205e+00   3.9179666e+00   2.7683644e+00   3.5321772e+00   3.2685282e+00   3.5962433e+00   2.0250421e+00   3.5485736e+00   2.6642702e+00   2.2244833e+00   3.0435803e+00   2.8325748e+00   3.5230967e+00   2.4205131e+00   3.4307077e+00   3.2815626e+00   2.8843735e+00   3.3658240e+00   2.6687055e+00   3.6389628e+00   2.8830783e+00   3.7490739e+00   3.5087649e+00   3.2305801e+00   3.3908902e+00   3.7876239e+00   3.9561876e+00   3.3306114e+00   2.3112968e+00   2.5604155e+00   2.4585271e+00   2.7122813e+00   3.8971376e+00   3.2667813e+00   3.3674720e+00   3.6849783e+00   3.2837729e+00   2.8840079e+00   2.7685572e+00   3.1442943e+00   3.4335342e+00   2.8028287e+00   2.0286682e+00   2.9704704e+00   2.9822537e+00   2.9868163e+00   3.1741954e+00   1.7644184e+00   2.8908296e+00   4.8985114e+00   3.9102500e+00   4.8863496e+00   4.4272873e+00   4.6888407e+00   5.6294495e+00   3.2706756e+00   5.2636641e+00   4.6765452e+00   5.1547576e+00   4.0378383e+00   4.1743230e+00   4.4638518e+00   3.8230269e+00   4.0056625e+00   4.2450961e+00   4.3676124e+00   5.7745449e+00   5.9344852e+00   3.7932062e+00   4.6942925e+00   3.7245053e+00   5.7354045e+00   3.7814598e+00   4.6271849e+00   4.9763401e+00   3.6736483e+00   3.7511498e+00   4.4747039e+00   4.7841150e+00   5.1205765e+00   5.5660104e+00   4.4889834e+00   3.9348528e+00   4.3728356e+00   5.2548517e+00   4.5226167e+00   4.3526639e+00   3.6449787e+00   4.4041536e+00   4.5787890e+00   4.1879339e+00   3.9102500e+00   4.8490587e+00   4.6897155e+00   4.2150171e+00   3.8841455e+00   4.1203091e+00   4.3121165e+00   3.9109678e+00   6.7975091e-01   9.0056222e-01   4.1586001e-01   8.2275389e-01   2.0656129e-01   9.4287188e-01   6.0121055e-01   3.8264361e+00   3.4551376e+00   3.9537404e+00   2.8149627e+00   3.5710248e+00   3.2874334e+00   3.6122384e+00   2.0711789e+00   3.5849006e+00   2.6879715e+00   2.3281827e+00   3.0685922e+00   2.8946126e+00   3.5468964e+00   2.4478108e+00   3.4686755e+00   3.2962520e+00   2.9098194e+00   3.4214793e+00   2.7033034e+00   3.6543993e+00   2.9209919e+00   3.7841436e+00   3.5321717e+00   3.2673909e+00   3.4297053e+00   3.8284763e+00   3.9909892e+00   3.3567173e+00   2.3533545e+00   2.6019240e+00   2.5015675e+00   2.7452885e+00   3.9207248e+00   3.2781950e+00   3.3698144e+00   3.7190229e+00   3.3356294e+00   2.8984764e+00   2.8022534e+00   3.1646752e+00   3.4558535e+00   2.8373077e+00   2.0905239e+00   2.9944056e+00   2.9961831e+00   3.0065426e+00   3.2053509e+00   1.8216743e+00   2.9155237e+00   4.9187518e+00   3.9355645e+00   4.9209267e+00   4.4497146e+00   4.7161140e+00   5.6635613e+00   3.2956846e+00   5.2947833e+00   4.7084108e+00   5.1767384e+00   4.0656879e+00   4.2065257e+00   4.4986941e+00   3.8543544e+00   4.0391220e+00   4.2738429e+00   4.3928114e+00   5.7890564e+00   5.9715517e+00   3.8320624e+00   4.7267005e+00   3.7498842e+00   5.7708014e+00   3.8168398e+00   4.6501080e+00   5.0044433e+00   3.7068836e+00   3.7763550e+00   4.5042646e+00   4.8165110e+00   5.1578102e+00   5.5839155e+00   4.5200609e+00   3.9608542e+00   4.3918790e+00   5.2992517e+00   4.5407542e+00   4.3739561e+00   3.6695956e+00   4.4403343e+00   4.6130415e+00   4.2323959e+00   3.9355645e+00   4.8773316e+00   4.7188476e+00   4.2560614e+00   3.9234348e+00   4.1524235e+00   4.3283407e+00   3.9303212e+00   3.8934542e-01   5.4292906e-01   4.4535192e-01   5.3309112e-01   4.5581864e-01   4.2538717e-01   3.3319064e+00   3.0058998e+00   3.4822680e+00   2.4967542e+00   3.1249915e+00   2.9284660e+00   3.1836200e+00   1.8265014e+00   3.1331426e+00   2.3481462e+00   2.1458939e+00   2.6572703e+00   2.5437119e+00   3.1519721e+00   2.0470220e+00   2.9815576e+00   2.9302134e+00   2.5421955e+00   3.0374850e+00   2.3632684e+00   3.2598750e+00   2.4873223e+00   3.3884269e+00   3.1477087e+00   2.8156804e+00   2.9556616e+00   3.3682605e+00   3.5401725e+00   2.9561205e+00   1.9790422e+00   2.2832934e+00   2.1885968e+00   2.3571494e+00   3.5486864e+00   2.9260462e+00   2.9587612e+00   3.2530866e+00   2.9361879e+00   2.5256527e+00   2.4631898e+00   2.8325946e+00   3.0534395e+00   2.4619105e+00   1.8618589e+00   2.6377354e+00   2.6235630e+00   2.6314198e+00   2.7785210e+00   1.5475473e+00   2.5392051e+00   4.5179415e+00   3.5641186e+00   4.4752183e+00   4.0626016e+00   4.3069105e+00   5.2164277e+00   2.9689697e+00   4.8634846e+00   4.3067423e+00   4.7194915e+00   3.6262912e+00   3.7979761e+00   4.0547736e+00   3.4875352e+00   3.6400497e+00   3.8418637e+00   3.9849753e+00   5.3352888e+00   5.5294519e+00   3.4830211e+00   4.2776053e+00   3.3760149e+00   5.3253207e+00   3.4004918e+00   4.2238184e+00   4.5645220e+00   3.2914954e+00   3.3718862e+00   4.0995928e+00   4.3725648e+00   4.7075069e+00   5.1063282e+00   4.1113292e+00   3.5651462e+00   4.0375056e+00   4.8132427e+00   4.1268905e+00   3.9732869e+00   3.2685282e+00   3.9810803e+00   4.1706050e+00   3.7449914e+00   3.5641186e+00   4.4464848e+00   4.2774083e+00   3.7941767e+00   3.5148434e+00   3.7206115e+00   3.9162695e+00   3.5510950e+00   8.6137722e-01   3.2352160e-01   7.6166891e-01   4.2667565e-01   6.2660376e-01   3.0634640e+00   2.7392828e+00   3.2125175e+00   2.3391296e+00   2.8734025e+00   2.6707502e+00   2.9145708e+00   1.7569738e+00   2.8671376e+00   2.1479276e+00   2.1308063e+00   2.4108292e+00   2.3854031e+00   2.8851564e+00   1.8368900e+00   2.7201546e+00   2.6724144e+00   2.2982662e+00   2.8483417e+00   2.1701312e+00   3.0045018e+00   2.2531409e+00   3.1444983e+00   2.8783309e+00   2.5586145e+00   2.6967931e+00   3.1073497e+00   3.2779401e+00   2.7018605e+00   1.8104298e+00   2.1219691e+00   2.0368741e+00   2.1367260e+00   3.2905600e+00   2.6692615e+00   2.6939411e+00   2.9863438e+00   2.7320931e+00   2.2698938e+00   2.2722516e+00   2.5933163e+00   2.7845473e+00   2.2472326e+00   1.8195937e+00   2.4037412e+00   2.3571494e+00   2.3781826e+00   2.5200525e+00   1.5411691e+00   2.3001580e+00   4.2694227e+00   3.3237039e+00   4.2115652e+00   3.7930080e+00   4.0498216e+00   4.9425633e+00   2.7652100e+00   4.5847429e+00   4.0464464e+00   4.4666326e+00   3.3738930e+00   3.5479683e+00   3.8004969e+00   3.2711669e+00   3.4346585e+00   3.6043418e+00   3.7146255e+00   5.0600559e+00   5.2639977e+00   3.2609948e+00   4.0260071e+00   3.1481222e+00   5.0506841e+00   3.1599876e+00   3.9594081e+00   4.2851208e+00   3.0501817e+00   3.1181310e+00   3.8476631e+00   4.0931004e+00   4.4378867e+00   4.8317916e+00   3.8652515e+00   3.2970551e+00   3.7653550e+00   4.5583070e+00   3.8836720e+00   3.7008091e+00   3.0188386e+00   3.7282629e+00   3.9300286e+00   3.5186510e+00   3.3237039e+00   4.1891573e+00   4.0376133e+00   3.5648733e+00   3.2885200e+00   3.4693398e+00   3.6732275e+00   3.2917360e+00   8.1385214e-01   2.5251796e-01   7.6787403e-01   3.2586371e-01   3.5846101e+00   3.2546607e+00   3.7315988e+00   2.6609901e+00   3.3659358e+00   3.1439065e+00   3.4298218e+00   1.9383545e+00   3.3723944e+00   2.5580763e+00   2.1777421e+00   2.8983020e+00   2.6954219e+00   3.3808052e+00   2.2790175e+00   3.2344170e+00   3.1579733e+00   2.7462372e+00   3.2292608e+00   2.5444216e+00   3.5028333e+00   2.7205595e+00   3.6067948e+00   3.3670797e+00   3.0557792e+00   3.2048395e+00   3.6088607e+00   3.7891577e+00   3.1900581e+00   2.1641873e+00   2.4447974e+00   2.3408917e+00   2.5700421e+00   3.7710363e+00   3.1506190e+00   3.2040124e+00   3.5027314e+00   3.1322650e+00   2.7512730e+00   2.6533250e+00   3.0299528e+00   3.2862185e+00   2.6656374e+00   1.9477421e+00   2.8481000e+00   2.8454952e+00   2.8544453e+00   3.0132514e+00   1.6658308e+00   2.7590026e+00   4.7688362e+00   3.7943375e+00   4.7263320e+00   4.2949506e+00   4.5532150e+00   5.4636648e+00   3.1768366e+00   5.1030228e+00   4.5342701e+00   4.9831843e+00   3.8820426e+00   4.0358897e+00   4.3088496e+00   3.7133362e+00   3.8949006e+00   4.1025163e+00   4.2237423e+00   5.5888590e+00   5.7742361e+00   3.6743314e+00   4.5370189e+00   3.6141649e+00   5.5687868e+00   3.6395551e+00   4.4736906e+00   4.8085584e+00   3.5338163e+00   3.6144782e+00   4.3417782e+00   4.6138035e+00   4.9524148e+00   5.3625968e+00   4.3570317e+00   3.7932922e+00   4.2488997e+00   5.0747397e+00   4.3832471e+00   4.2110583e+00   3.5113289e+00   4.2399031e+00   4.4320962e+00   4.0189525e+00   3.7943375e+00   4.7000551e+00   4.5409269e+00   4.0612006e+00   3.7475562e+00   3.9722979e+00   4.1719819e+00   3.7859347e+00   6.9325418e-01   2.1269358e-01   5.0905001e-01   3.3337914e+00   3.0376046e+00   3.4948415e+00   2.6099670e+00   3.1641230e+00   2.9745020e+00   3.2202056e+00   1.9796375e+00   3.1511769e+00   2.4469125e+00   2.3235342e+00   2.7196435e+00   2.6337042e+00   3.1881331e+00   2.1375243e+00   2.9985516e+00   2.9847499e+00   2.5867906e+00   3.1255136e+00   2.4464131e+00   3.3203249e+00   2.5432298e+00   3.4386456e+00   3.1757436e+00   2.8453413e+00   2.9797458e+00   3.3872988e+00   3.5731577e+00   3.0079222e+00   2.0710306e+00   2.3862284e+00   2.2923690e+00   2.4260574e+00   3.5964347e+00   2.9822786e+00   3.0067893e+00   3.2740296e+00   3.0040546e+00   2.5786309e+00   2.5579141e+00   2.8891491e+00   3.0885642e+00   2.5333642e+00   2.0283816e+00   2.7031874e+00   2.6626548e+00   2.6835197e+00   2.8149627e+00   1.7472675e+00   2.6016025e+00   4.5864727e+00   3.6358644e+00   4.5092329e+00   4.1008711e+00   4.3608329e+00   5.2329560e+00   3.0685922e+00   4.8761643e+00   4.3448624e+00   4.7688607e+00   3.6817961e+00   3.8534030e+00   4.1033021e+00   3.5811154e+00   3.7530357e+00   3.9183591e+00   4.0199092e+00   5.3504583e+00   5.5556442e+00   3.5517562e+00   4.3306939e+00   3.4641481e+00   5.3377017e+00   3.4637450e+00   4.2663890e+00   4.5772917e+00   3.3571533e+00   3.4296698e+00   4.1575709e+00   4.3797497e+00   4.7253427e+00   5.1097682e+00   4.1763898e+00   3.5983434e+00   4.0666282e+00   4.8419079e+00   4.2005634e+00   4.0083071e+00   3.3318481e+00   4.0278210e+00   4.2396851e+00   3.8171357e+00   3.6358644e+00   4.4969460e+00   4.3490518e+00   3.8705614e+00   3.5905415e+00   3.7766172e+00   3.9906340e+00   3.6052686e+00   7.6752131e-01   4.0147421e-01   3.6660608e+00   3.3135273e+00   3.8017611e+00   2.7018605e+00   3.4275679e+00   3.1699903e+00   3.4789136e+00   1.9730403e+00   3.4358679e+00   2.5840983e+00   2.2331309e+00   2.9422991e+00   2.7581254e+00   3.4189217e+00   2.3233512e+00   3.3121677e+00   3.1836200e+00   2.7812918e+00   3.2896000e+00   2.5816639e+00   3.5379744e+00   2.7795823e+00   3.6532797e+00   3.4029480e+00   3.1195329e+00   3.2770643e+00   3.6772238e+00   3.8493740e+00   3.2305582e+00   2.2173292e+00   2.4840285e+00   2.3814525e+00   2.6148507e+00   3.8019334e+00   3.1710836e+00   3.2447990e+00   3.5700242e+00   3.1955870e+00   2.7803619e+00   2.6879415e+00   3.0521985e+00   3.3264150e+00   2.7089627e+00   1.9908167e+00   2.8775912e+00   2.8744403e+00   2.8857836e+00   3.0658390e+00   1.7171798e+00   2.7936066e+00   4.8056033e+00   3.8247106e+00   4.7834029e+00   4.3283723e+00   4.5943507e+00   5.5219241e+00   3.2001457e+00   5.1552806e+00   4.5786596e+00   5.0423887e+00   3.9353963e+00   4.0804944e+00   4.3648743e+00   3.7469906e+00   3.9346929e+00   4.1523445e+00   4.2650653e+00   5.6468786e+00   5.8321617e+00   3.7127205e+00   4.5943003e+00   3.6444925e+00   5.6275915e+00   3.6885686e+00   4.5212945e+00   4.8635596e+00   3.5807904e+00   3.6545040e+00   4.3827087e+00   4.6717461e+00   5.0136174e+00   5.4320857e+00   4.3994790e+00   3.8323332e+00   4.2736523e+00   5.1501184e+00   4.4249262e+00   4.2490074e+00   3.5500567e+00   4.3022895e+00   4.4864974e+00   4.0933482e+00   3.8247106e+00   4.7495571e+00   4.5943072e+00   4.1245629e+00   3.7976741e+00   4.0232438e+00   4.2129603e+00   3.8158144e+00   4.4535192e-01   3.3681634e+00   3.1015495e+00   3.5417515e+00   2.6663854e+00   3.2198557e+00   3.0579528e+00   3.2934163e+00   2.0153916e+00   3.2040320e+00   2.5204039e+00   2.3388377e+00   2.7956674e+00   2.6725726e+00   3.2655357e+00   2.2078644e+00   3.0402181e+00   3.0721050e+00   2.6595270e+00   3.1749624e+00   2.5094912e+00   3.4048516e+00   2.6019240e+00   3.5045178e+00   3.2523394e+00   2.8999277e+00   3.0267460e+00   3.4333346e+00   3.6317584e+00   3.0844423e+00   2.1209506e+00   2.4419061e+00   2.3443191e+00   2.4920874e+00   3.6775470e+00   3.0715602e+00   3.0884019e+00   3.3261336e+00   3.0501817e+00   2.6631094e+00   2.6243758e+00   2.9691171e+00   3.1659032e+00   2.5983106e+00   2.0538718e+00   2.7808700e+00   2.7473221e+00   2.7650187e+00   2.8804789e+00   1.7660585e+00   2.6784604e+00   4.6691123e+00   3.7183181e+00   4.5689156e+00   4.1821417e+00   4.4377562e+00   5.2873851e+00   3.1455384e+00   4.9362269e+00   4.4131751e+00   4.8285697e+00   3.7508315e+00   3.9249912e+00   4.1665786e+00   3.6588207e+00   3.8312584e+00   3.9914600e+00   4.0953360e+00   5.4042844e+00   5.6094349e+00   3.6203759e+00   4.3940519e+00   3.5472449e+00   5.3896044e+00   3.5318477e+00   4.3383367e+00   4.6370771e+00   3.4283809e+00   3.5084967e+00   4.2335104e+00   4.4348302e+00   4.7765764e+00   5.1494118e+00   4.2515997e+00   3.6735311e+00   4.1503255e+00   4.8803856e+00   4.2802235e+00   4.0874500e+00   3.4119017e+00   4.0856134e+00   4.3069340e+00   3.8658667e+00   3.7183181e+00   4.5670800e+00   4.4180998e+00   3.9298460e+00   3.6561219e+00   3.8459316e+00   4.0712063e+00   3.6910219e+00   3.5300704e+00   3.2300705e+00   3.6894189e+00   2.6906230e+00   3.3402581e+00   3.1455455e+00   3.4142500e+00   1.9871921e+00   3.3364095e+00   2.5801041e+00   2.2579027e+00   2.8953397e+00   2.7040361e+00   3.3706887e+00   2.2848507e+00   3.1889632e+00   3.1641787e+00   2.7405950e+00   3.2351115e+00   2.5567836e+00   3.5066271e+00   2.7031874e+00   3.5985833e+00   3.3547156e+00   3.0245025e+00   3.1656773e+00   3.5695690e+00   3.7624530e+00   3.1847809e+00   2.1665831e+00   2.4678343e+00   2.3636654e+00   2.5680682e+00   3.7710578e+00   3.1606607e+00   3.1985717e+00   3.4665002e+00   3.1244487e+00   2.7540755e+00   2.6724144e+00   3.0392407e+00   3.2747247e+00   2.6671530e+00   2.0066796e+00   2.8554471e+00   2.8427684e+00   2.8549070e+00   2.9928504e+00   1.7230625e+00   2.7611864e+00   4.7742557e+00   3.8047268e+00   4.7018935e+00   4.2892152e+00   4.5488617e+00   5.4303909e+00   3.2037606e+00   5.0724791e+00   4.5217060e+00   4.9623634e+00   3.8707551e+00   4.0296740e+00   4.2915574e+00   3.7321091e+00   3.9154512e+00   4.1022778e+00   4.2113304e+00   5.5520135e+00   5.7453700e+00   3.6849669e+00   4.5212945e+00   3.6308222e+00   5.5330176e+00   3.6335075e+00   4.4607162e+00   4.7770551e+00   3.5299194e+00   3.6126659e+00   4.3390241e+00   4.5771358e+00   4.9175276e+00   5.3118739e+00   4.3561658e+00   3.7812981e+00   4.2455646e+00   5.0340960e+00   4.3872001e+00   4.2015182e+00   3.5126820e+00   4.2176412e+00   4.4249262e+00   3.9985367e+00   3.8047268e+00   4.6887893e+00   4.5358705e+00   4.0502685e+00   3.7475470e+00   3.9619683e+00   4.1767972e+00   3.7895730e+00   6.0611244e-01   2.1845981e-01   1.6212669e+00   5.6769031e-01   1.3103855e+00   7.0437330e-01   2.2923690e+00   4.4651726e-01   1.8497891e+00   2.2196852e+00   1.1283882e+00   1.3099706e+00   9.0827783e-01   1.5790055e+00   3.7427929e-01   1.4018200e+00   1.2701139e+00   1.1341579e+00   1.5133392e+00   1.1134787e+00   1.0264409e+00   8.7202528e-01   9.2264612e-01   6.6432544e-01   4.5470518e-01   4.1449626e-01   4.3456114e-01   1.0085601e+00   1.5838351e+00   1.6415861e+00   1.6742876e+00   1.3140585e+00   1.0496979e+00   1.6013574e+00   1.0054037e+00   3.0546431e-01   1.0168833e+00   1.4293465e+00   1.5774037e+00   1.5278635e+00   9.0252542e-01   1.2994764e+00   2.2231652e+00   1.4317371e+00   1.3207609e+00   1.3224963e+00   8.3649708e-01   2.2607507e+00   1.3421549e+00   1.5412452e+00   1.2539702e+00   1.2643026e+00   1.0324775e+00   1.2342162e+00   1.9387309e+00   2.1209313e+00   1.6105602e+00   1.1912106e+00   1.5832517e+00   7.2486328e-01   8.5585239e-01   9.4009473e-01   1.3873503e+00   1.3945703e+00   1.0313560e+00   8.7720955e-01   2.0658700e+00   2.2655571e+00   1.2460824e+00   1.1834841e+00   1.4368020e+00   2.0378171e+00   7.9878917e-01   1.0960883e+00   1.3102767e+00   8.5105559e-01   9.2480363e-01   1.0805899e+00   1.1043883e+00   1.4313279e+00   1.8006336e+00   1.1235486e+00   7.6625946e-01   1.1633029e+00   1.5390703e+00   1.2493717e+00   9.0965328e-01   1.0182895e+00   8.6983677e-01   1.1880428e+00   9.2095040e-01   1.2539702e+00   1.3335022e+00   1.3109705e+00   9.5035453e-01   9.2112464e-01   7.6166891e-01   1.1418127e+00   1.1276971e+00   5.6700421e-01   1.1449732e+00   4.0293660e-01   7.3813096e-01   2.1845981e-01   1.7551534e+00   3.4583729e-01   1.2603076e+00   1.7354460e+00   5.3588338e-01   1.0777972e+00   3.8934542e-01   1.0669582e+00   3.0811765e-01   8.0294841e-01   7.8768770e-01   1.0018083e+00   1.0175773e+00   5.5419992e-01   5.9426792e-01   7.3496673e-01   4.8927739e-01   3.4378533e-01   2.5651975e-01   5.2655962e-01   5.4292906e-01   4.4417983e-01   1.1634384e+00   1.1527805e+00   1.2020363e+00   8.1521713e-01   7.2526325e-01   1.0018083e+00   4.1449626e-01   3.2586371e-01   9.0277242e-01   8.3172002e-01   1.0440187e+00   9.7779835e-01   3.2816937e-01   8.1521713e-01   1.7083888e+00   8.6361309e-01   7.3145860e-01   7.3145860e-01   3.6171588e-01   1.7816674e+00   7.6914805e-01   1.6177449e+00   8.3060013e-01   1.4732400e+00   1.1107977e+00   1.3546017e+00   2.2147080e+00   1.5404344e+00   1.8624350e+00   1.3603471e+00   1.7544191e+00   6.8961791e-01   8.7478495e-01   1.0733200e+00   9.5271386e-01   1.0466623e+00   9.9348625e-01   1.0085601e+00   2.3452277e+00   2.5288464e+00   1.0480665e+00   1.3130641e+00   8.9653332e-01   2.3282127e+00   5.8914551e-01   1.2436109e+00   1.5625142e+00   4.8927739e-01   4.8927739e-01   1.1593224e+00   1.3813076e+00   1.7138020e+00   2.1603815e+00   1.1866786e+00   6.4755655e-01   1.1521791e+00   1.8620175e+00   1.2565757e+00   1.0067784e+00   4.8927739e-01   1.0056742e+00   1.2594846e+00   9.3049742e-01   8.3060013e-01   1.4762619e+00   1.3817041e+00   9.4558103e-01   7.9613242e-01   7.7074935e-01   1.0627606e+00   7.0776547e-01   1.5593809e+00   4.8036801e-01   1.2165505e+00   6.1151102e-01   2.2871743e+00   4.0176783e-01   1.7963441e+00   2.1851225e+00   1.0906388e+00   1.2884575e+00   8.0619006e-01   1.6156775e+00   5.0905001e-01   1.3093850e+00   1.2434795e+00   1.0262547e+00   1.4875372e+00   1.0069726e+00   1.0669582e+00   7.4511469e-01   8.2384013e-01   6.9728513e-01   5.3022554e-01   3.0811765e-01   2.5651975e-01   9.2264612e-01   1.6478667e+00   1.6180636e+00   1.6694817e+00   1.3199714e+00   9.2288144e-01   1.5068702e+00   9.2859317e-01   2.4837156e-01   9.3238528e-01   1.3813076e+00   1.5238543e+00   1.4346522e+00   8.1130291e-01   1.2794849e+00   2.2234347e+00   1.3629833e+00   1.2671726e+00   1.2652657e+00   8.1810461e-01   2.3116343e+00   1.2988558e+00   1.3410314e+00   1.1276971e+00   1.0590298e+00   8.2552685e-01   1.0264409e+00   1.7485421e+00   2.0171203e+00   1.4118594e+00   9.7949166e-01   1.3980896e+00   5.7324170e-01   6.6317860e-01   7.4586719e-01   1.2603076e+00   1.2604558e+00   8.7504951e-01   6.6432544e-01   1.8915404e+00   2.0711789e+00   1.1178264e+00   9.9368623e-01   1.3223897e+00   1.8515012e+00   6.6384020e-01   8.9303452e-01   1.1107977e+00   7.2823007e-01   8.1099042e-01   8.7170815e-01   9.0876485e-01   1.2370832e+00   1.6626615e+00   9.2112464e-01   6.2482915e-01   9.7377870e-01   1.3752391e+00   1.0720678e+00   7.0386584e-01   9.0876485e-01   6.8917100e-01   1.0120221e+00   8.0294841e-01   1.1276971e+00   1.1329323e+00   1.1353806e+00   8.1385214e-01   7.7588000e-01   5.8914551e-01   9.8054887e-01   1.0085601e+00   1.0879524e+00   6.2605182e-01   1.2079117e+00   8.2305664e-01   1.1903922e+00   4.4651726e-01   6.5648056e-01   7.4164639e-01   5.2942799e-01   8.9852394e-01   6.4755655e-01   1.3035649e+00   7.7074935e-01   4.8135521e-01   7.7074935e-01   2.5651975e-01   1.1022599e+00   6.8917100e-01   1.0627606e+00   8.6290690e-01   9.7759114e-01   1.1868139e+00   1.3969297e+00   1.4333755e+00   7.6166891e-01   5.6075294e-01   2.5251796e-01   3.7427929e-01   4.4651726e-01   1.1444449e+00   7.7074935e-01   1.1571858e+00   1.3491011e+00   8.2624515e-01   7.0086313e-01   2.0000000e-01   4.4535192e-01   8.9852394e-01   3.7427929e-01   7.7885297e-01   4.1449626e-01   7.0826681e-01   6.1092863e-01   8.2275389e-01   1.0198386e+00   5.0905001e-01   2.2002582e+00   1.1640914e+00   2.2347161e+00   1.6833015e+00   1.9584639e+00   2.9773446e+00   7.2852070e-01   2.5984158e+00   1.9494155e+00   2.5625921e+00   1.4644662e+00   1.4491244e+00   1.8190688e+00   1.0934620e+00   1.3861754e+00   1.6265426e+00   1.6626615e+00   3.1878246e+00   3.2549253e+00   1.0346741e+00   2.0606771e+00   1.0425476e+00   3.0882196e+00   1.1022599e+00   1.9692383e+00   2.3537589e+00   1.0082605e+00   1.0950112e+00   1.7332099e+00   2.1942739e+00   2.5032087e+00   3.0886055e+00   1.7538274e+00   1.2342162e+00   1.6237100e+00   2.7181432e+00   1.8926658e+00   1.6507294e+00   1.0082605e+00   1.8244836e+00   1.9254808e+00   1.7303440e+00   1.1640914e+00   2.1641182e+00   2.0565627e+00   1.6435752e+00   1.1782910e+00   1.4699978e+00   1.7142546e+00   1.2095267e+00   8.0326782e-01   5.0991930e-01   1.8350577e+00   2.1269358e-01   1.3537729e+00   1.7146525e+00   6.5172743e-01   8.5585239e-01   4.0438741e-01   1.1847335e+00   3.4583729e-01   9.0252542e-01   8.2372435e-01   6.2024833e-01   1.0324775e+00   6.6827038e-01   6.5172743e-01   3.8776762e-01   4.4535192e-01   3.2816937e-01   2.5651975e-01   3.2586371e-01   4.3691963e-01   5.0180477e-01   1.2342162e+00   1.1573546e+00   1.2172454e+00   8.7848692e-01   6.2205176e-01   1.1016264e+00   6.9006418e-01   3.2586371e-01   5.2371571e-01   9.4492923e-01   1.0646687e+00   1.0101422e+00   4.1449626e-01   8.2552685e-01   1.7679545e+00   9.2288144e-01   8.3888121e-01   8.2929029e-01   3.8934542e-01   1.8776878e+00   8.5434758e-01   1.5481649e+00   7.9613242e-01   1.3657247e+00   1.0085601e+00   1.2641849e+00   2.1002817e+00   1.6030661e+00   1.7482192e+00   1.2100024e+00   1.7005893e+00   6.6491075e-01   7.3535471e-01   9.7949166e-01   8.8358844e-01   1.0423677e+00   9.5498315e-01   9.1051084e-01   2.2737459e+00   2.4086493e+00   7.2486328e-01   1.2326306e+00   9.4832302e-01   2.2096958e+00   3.8934542e-01   1.1729895e+00   1.4561933e+00   3.8776762e-01   4.8927739e-01   1.0574300e+00   1.2643026e+00   1.5918956e+00   2.0914667e+00   1.0906388e+00   5.0817745e-01   1.0182895e+00   1.7457596e+00   1.2250414e+00   9.1663180e-01   5.4292906e-01   9.1750357e-01   1.1891470e+00   8.8358844e-01   7.9613242e-01   1.3916739e+00   1.3267389e+00   8.9303452e-01   5.3309112e-01   6.9325418e-01   1.0574013e+00   7.0776547e-01   7.0776547e-01   1.3071453e+00   9.0049692e-01   6.9006418e-01   1.2079117e+00   3.6171588e-01   7.1791510e-01   4.1586001e-01   9.0049692e-01   1.0069726e+00   2.5251796e-01   4.4651726e-01   6.9325418e-01   6.2538346e-01   5.9426792e-01   5.6631629e-01   6.6827038e-01   4.1449626e-01   7.0437330e-01   9.0277242e-01   1.1055069e+00   1.0496979e+00   3.2586371e-01   1.0083666e+00   7.4164639e-01   8.3888121e-01   6.0181382e-01   6.3861009e-01   3.4378533e-01   6.3808075e-01   1.0101422e+00   6.8961791e-01   4.1449626e-01   5.3588338e-01   2.5651975e-01   4.1586001e-01   5.0991930e-01   1.2869134e+00   3.0546431e-01   3.2586371e-01   3.0275928e-01   5.0905001e-01   1.5278635e+00   4.0000000e-01   1.7279861e+00   7.4586719e-01   1.7831878e+00   1.1718516e+00   1.4824233e+00   2.5111349e+00   8.3620494e-01   2.1256928e+00   1.4719311e+00   2.0814452e+00   1.0175773e+00   1.0014633e+00   1.3875139e+00   7.7885297e-01   1.1473003e+00   1.2144845e+00   1.1591754e+00   2.6773585e+00   2.7900071e+00   7.0776547e-01   1.6151673e+00   7.3496673e-01   2.6263773e+00   7.2526325e-01   1.4645804e+00   1.8755806e+00   6.3924842e-01   6.2407309e-01   1.2731262e+00   1.7507664e+00   2.0635966e+00   2.6116811e+00   1.3129189e+00   7.4855857e-01   1.1149070e+00   2.3160147e+00   1.4246028e+00   1.1229843e+00   5.6075294e-01   1.4120836e+00   1.5094575e+00   1.4108494e+00   7.4586719e-01   1.6884234e+00   1.6211869e+00   1.3017208e+00   8.1521713e-01   1.0401425e+00   1.2452704e+00   6.9728513e-01   1.8185955e+00   4.8135521e-01   1.2509218e+00   1.8049926e+00   5.8914551e-01   1.2205493e+00   4.2538717e-01   1.1912106e+00   4.6472023e-01   7.1840099e-01   8.9207714e-01   1.1017858e+00   1.1127329e+00   4.1586001e-01   7.8197925e-01   8.0326782e-01   5.7257017e-01   5.2655962e-01   4.3456114e-01   6.2660376e-01   4.8135521e-01   4.5581864e-01   1.3318128e+00   1.2468939e+00   1.3144065e+00   9.4935318e-01   6.6384020e-01   9.1075311e-01   3.2586371e-01   4.1449626e-01   1.0130748e+00   8.3280511e-01   1.0906119e+00   9.6204649e-01   3.4583729e-01   9.3296062e-01   1.7901543e+00   8.7170815e-01   7.3805807e-01   7.3805807e-01   5.2655962e-01   1.9041928e+00   8.1521713e-01   1.4138821e+00   7.3805807e-01   1.3166957e+00   9.2264612e-01   1.1533602e+00   2.0690479e+00   1.4700179e+00   1.7092525e+00   1.2231847e+00   1.5870088e+00   5.0592043e-01   7.5791688e-01   9.0575661e-01   9.1750357e-01   9.1802948e-01   8.1304731e-01   8.1638392e-01   2.1978861e+00   2.3802944e+00   1.1107977e+00   1.1386292e+00   7.9878917e-01   2.1900222e+00   6.1092863e-01   1.0480665e+00   1.4148192e+00   5.0991930e-01   3.6171588e-01   9.7825559e-01   1.2593659e+00   1.5912764e+00   2.0615043e+00   1.0056742e+00   5.6700421e-01   1.0137836e+00   1.7695175e+00   1.0597541e+00   8.0619006e-01   3.8934542e-01   8.6513410e-01   1.0755693e+00   8.4050231e-01   7.3805807e-01   1.2832075e+00   1.1947245e+00   8.0660588e-01   8.2105460e-01   5.9426792e-01   8.6983677e-01   5.3309112e-01   1.9083318e+00   6.7975091e-01   4.1449626e-01   1.2452704e+00   1.1763980e+00   1.6420607e+00   7.9016429e-01   1.9365498e+00   1.3172979e+00   1.0653845e+00   1.5684812e+00   8.1304731e-01   1.7169601e+00   1.2768639e+00   1.8804140e+00   1.6311692e+00   1.6315809e+00   1.8424891e+00   2.1489929e+00   2.2038673e+00   1.4613032e+00   8.0587320e-01   6.8961791e-01   6.4704320e-01   9.7949166e-01   1.9250543e+00   1.2802798e+00   1.5824669e+00   2.0485534e+00   1.5790055e+00   1.0078327e+00   8.2305664e-01   1.1498269e+00   1.5838351e+00   1.0137836e+00   1.2418578e-01   1.0230441e+00   1.1119327e+00   1.0941064e+00   1.4719311e+00   3.2816937e-01   1.0165138e+00   2.9338155e+00   1.9158303e+00   3.0455280e+00   2.4635485e+00   2.7430309e+00   3.7921012e+00   1.2632199e+00   3.4105293e+00   2.7619926e+00   3.3261421e+00   2.2045198e+00   2.2598424e+00   2.6204307e+00   1.8330979e+00   2.0701646e+00   2.3622531e+00   2.4525409e+00   3.9619101e+00   4.0743074e+00   1.8315269e+00   2.8475224e+00   1.7388184e+00   3.9054939e+00   1.9111264e+00   2.7377517e+00   3.1510494e+00   1.7964653e+00   1.8350071e+00   2.5277506e+00   2.9970778e+00   3.3196868e+00   3.8532018e+00   2.5453122e+00   2.0312250e+00   2.3887539e+00   3.5269824e+00   2.5986705e+00   2.4210417e+00   1.7228354e+00   2.6125646e+00   2.7062349e+00   2.4839132e+00   1.9158303e+00   2.9502077e+00   2.8139128e+00   2.4180244e+00   1.9947426e+00   2.2550764e+00   2.3956104e+00   1.9332869e+00   1.4468211e+00   1.8027242e+00   7.3851529e-01   9.0658670e-01   5.0180477e-01   1.2418578e+00   2.5651975e-01   1.0022010e+00   8.6361309e-01   7.3851529e-01   1.1055064e+00   7.8197925e-01   6.8961791e-01   4.8927739e-01   5.0270183e-01   3.2352160e-01   2.1269358e-01   2.5651975e-01   4.9857388e-01   6.0611244e-01   1.2633451e+00   1.2342162e+00   1.2794849e+00   9.3824087e-01   7.0776547e-01   1.2014753e+00   7.0429250e-01   2.5651975e-01   6.2482915e-01   1.0329901e+00   1.1593224e+00   1.1069580e+00   5.0180477e-01   8.9712482e-01   1.8394959e+00   1.0181000e+00   9.2095040e-01   9.2047746e-01   4.4417983e-01   1.9314297e+00   9.4103005e-01   1.6328100e+00   9.3238528e-01   1.3969297e+00   1.0389435e+00   1.3327491e+00   2.0961718e+00   1.7103548e+00   1.7405652e+00   1.2330392e+00   1.7474965e+00   7.7919451e-01   8.1810461e-01   1.0613462e+00   1.0417249e+00   1.2331989e+00   1.0974061e+00   9.4125538e-01   2.2568188e+00   2.4127176e+00   8.4050231e-01   1.3145067e+00   1.0960883e+00   2.1973666e+00   5.6075294e-01   1.2221471e+00   1.4467170e+00   5.7324170e-01   6.3977563e-01   1.1341579e+00   1.2436109e+00   1.5826476e+00   2.0476065e+00   1.1847335e+00   5.3665999e-01   1.0391247e+00   1.7521201e+00   1.3293211e+00   9.4492923e-01   6.9369532e-01   1.0019724e+00   1.3083079e+00   1.0406064e+00   9.3238528e-01   1.4580335e+00   1.4387122e+00   1.0576043e+00   7.0233835e-01   8.1304731e-01   1.1697902e+00   8.2372435e-01   7.6914805e-01   7.2823007e-01   8.7504951e-01   1.0611732e+00   4.5581864e-01   1.5204521e+00   6.6432544e-01   6.5172743e-01   1.0866092e+00   4.5470518e-01   1.0573285e+00   9.0074515e-01   1.3083079e+00   1.0613462e+00   1.2123540e+00   1.4190961e+00   1.6754036e+00   1.6596797e+00   8.9095811e-01   6.1947990e-01   4.2418962e-01   4.8927739e-01   6.0551856e-01   1.2951131e+00   6.2538346e-01   1.0030700e+00   1.5663312e+00   1.1396406e+00   4.5581864e-01   3.2816937e-01   5.3665999e-01   1.0166932e+00   6.0670504e-01   6.9167458e-01   4.4535192e-01   5.6075294e-01   5.3665999e-01   1.0182895e+00   9.1075311e-01   5.0991930e-01   2.2632657e+00   1.2601890e+00   2.4384530e+00   1.8269304e+00   2.0927845e+00   3.1870761e+00   6.4290921e-01   2.8096725e+00   2.1462316e+00   2.6900593e+00   1.5901181e+00   1.6364474e+00   2.0101738e+00   1.1729895e+00   1.4078246e+00   1.7083888e+00   1.8278268e+00   3.3435703e+00   3.4604677e+00   1.2331989e+00   2.2206574e+00   1.0719360e+00   3.3068858e+00   1.3163598e+00   2.0994872e+00   2.5539296e+00   1.1948578e+00   1.1991899e+00   1.8828324e+00   2.4245766e+00   2.7358293e+00   3.2702869e+00   1.8959565e+00   1.4312787e+00   1.7665622e+00   2.9527671e+00   1.9255490e+00   1.7860690e+00   1.0796583e+00   2.0205937e+00   2.0647798e+00   1.9168750e+00   1.2601890e+00   2.3069539e+00   2.1608869e+00   1.8128438e+00   1.3838212e+00   1.6376058e+00   1.7220696e+00   1.2768639e+00   1.2687651e+00   1.0344911e+00   1.5320003e+00   9.7779835e-01   1.8837258e+00   1.2979752e+00   1.0012667e+00   1.3957794e+00   7.2526325e-01   1.6850672e+00   1.2372418e+00   1.7004805e+00   1.4979666e+00   1.5611922e+00   1.7745022e+00   2.0153916e+00   2.0815027e+00   1.3830210e+00   8.1242502e-01   5.8914551e-01   5.7257017e-01   9.5676647e-01   1.7518264e+00   1.2724737e+00   1.6669115e+00   1.9675324e+00   1.4200435e+00   1.1136605e+00   7.1881659e-01   1.0072663e+00   1.5134954e+00   9.3238528e-01   3.2352160e-01   9.5222919e-01   1.1681971e+00   1.1043332e+00   1.4120836e+00   6.2205176e-01   1.0078327e+00   2.8028143e+00   1.7525933e+00   2.8815987e+00   2.2944257e+00   2.5825907e+00   3.6132031e+00   1.1179743e+00   3.2286633e+00   2.5673494e+00   3.2133201e+00   2.1127170e+00   2.0867931e+00   2.4721080e+00   1.6626615e+00   1.9456450e+00   2.2607446e+00   2.2983453e+00   3.8335668e+00   3.8818411e+00   1.6299374e+00   2.7127377e+00   1.6132118e+00   3.7182722e+00   1.7559391e+00   2.6123294e+00   2.9966900e+00   1.6625128e+00   1.7303440e+00   2.3560577e+00   2.8340159e+00   3.1407514e+00   3.7366777e+00   2.3765195e+00   1.8701780e+00   2.1933937e+00   3.3657099e+00   2.5066503e+00   2.2797241e+00   1.6331631e+00   2.4808010e+00   2.5698271e+00   2.3770285e+00   1.7525933e+00   2.8053367e+00   2.6963680e+00   2.2934334e+00   1.8202060e+00   2.1229819e+00   2.3231793e+00   1.8122257e+00   8.5462626e-01   5.0991930e-01   6.2538346e-01   8.0358695e-01   3.7255734e-01   5.3022554e-01   8.2105460e-01   6.0900723e-01   6.2482915e-01   3.0844217e-01   7.9580667e-01   5.4292906e-01   5.0991930e-01   7.0437330e-01   9.7270522e-01   9.9532071e-01   3.0546431e-01   7.9878917e-01   7.2343175e-01   7.8768770e-01   4.2418962e-01   9.0876485e-01   5.2862779e-01   4.4651726e-01   8.5205778e-01   7.4164639e-01   3.2586371e-01   5.7867728e-01   5.3309112e-01   4.1449626e-01   4.5581864e-01   1.2131545e+00   3.8776762e-01   3.2352160e-01   2.5251796e-01   3.2816937e-01   1.3221405e+00   2.8507955e-01   1.8873850e+00   9.2859317e-01   1.8730683e+00   1.4111029e+00   1.6550480e+00   2.6320302e+00   1.0406064e+00   2.2657813e+00   1.6658308e+00   2.1339968e+00   1.0072663e+00   1.1444449e+00   1.4417207e+00   8.9971984e-01   1.1192426e+00   1.2342162e+00   1.3367840e+00   2.7726042e+00   2.9277580e+00   9.9368623e-01   1.6694974e+00   7.8197925e-01   2.7493700e+00   7.5976039e-01   1.5849874e+00   1.9802196e+00   6.4290921e-01   7.1799256e-01   1.4445746e+00   1.8216794e+00   2.1462316e+00   2.6367554e+00   1.4616539e+00   9.2264612e-01   1.4088394e+00   2.3235034e+00   1.5120955e+00   1.3224963e+00   6.2024833e-01   1.4078246e+00   1.5587730e+00   1.2801437e+00   9.2859317e-01   1.8096161e+00   1.6710566e+00   1.2378278e+00   8.9653332e-01   1.0864449e+00   1.3071453e+00   9.0827783e-01   8.9159388e-01   7.7763126e-01   1.0417249e+00   9.1802948e-01   5.0905001e-01   6.2605182e-01   4.4651726e-01   1.2379511e+00   6.2024833e-01   9.5571254e-01   8.1558458e-01   7.5976039e-01   9.2944046e-01   1.0661822e+00   1.2662457e+00   8.2342214e-01   5.8851328e-01   5.1691876e-01   5.3588338e-01   5.1691876e-01   1.1717125e+00   9.6838716e-01   1.2601890e+00   1.1258723e+00   4.8135521e-01   8.3649708e-01   5.5419992e-01   6.2407309e-01   9.0965328e-01   4.2538717e-01   1.0906388e+00   5.9426792e-01   8.1638392e-01   7.3145860e-01   7.3145860e-01   1.1880428e+00   6.3861009e-01   2.2927296e+00   1.2766755e+00   2.1156916e+00   1.6869465e+00   1.9835684e+00   2.8209672e+00   1.2028939e+00   2.4458200e+00   1.8683030e+00   2.5149752e+00   1.4746001e+00   1.4371043e+00   1.7501772e+00   1.2500343e+00   1.5991931e+00   1.7211928e+00   1.6271057e+00   3.0580852e+00   3.1168283e+00   1.0328064e+00   2.0203543e+00   1.2344562e+00   2.9146252e+00   1.0941064e+00   1.9515265e+00   2.2002582e+00   1.0531192e+00   1.1790011e+00   1.7600233e+00   1.9895190e+00   2.3106402e+00   2.8876509e+00   1.7983401e+00   1.1763719e+00   1.6118154e+00   2.5100676e+00   2.0039716e+00   1.6449456e+00   1.1276917e+00   1.7245185e+00   1.9495298e+00   1.6638124e+00   1.2766755e+00   2.1512175e+00   2.1034605e+00   1.6449189e+00   1.1924295e+00   1.4645804e+00   1.8408873e+00   1.3037063e+00   1.1269972e+00   6.2482915e-01   5.0991930e-01   6.6827038e-01   7.0479928e-01   8.8358844e-01   4.5581864e-01   7.0086313e-01   4.2667565e-01   2.0656129e-01   4.4535192e-01   5.2942799e-01   7.0086313e-01   6.3861009e-01   2.1269358e-01   1.2261087e+00   1.0119857e+00   1.1001291e+00   8.1638392e-01   4.2667565e-01   7.0479928e-01   5.1691876e-01   6.0611244e-01   6.2538346e-01   6.9006418e-01   8.3812833e-01   6.4290921e-01   1.2418578e-01   7.3145860e-01   1.6044563e+00   6.2660376e-01   5.7324170e-01   5.6700421e-01   4.0293660e-01   1.7981158e+00   6.4806901e-01   1.5090287e+00   5.9426792e-01   1.4258804e+00   9.2264612e-01   1.2221471e+00   2.1613095e+00   1.2165505e+00   1.7814077e+00   1.1712156e+00   1.7475837e+00   7.0233835e-01   7.0776547e-01   1.0386594e+00   7.0233835e-01   1.0228981e+00   9.8450810e-01   8.5105559e-01   2.3257048e+00   2.4547248e+00   7.1504098e-01   1.2838690e+00   6.9369532e-01   2.2753334e+00   4.3691963e-01   1.1508502e+00   1.5109753e+00   4.0438741e-01   4.1449626e-01   1.0168833e+00   1.3670543e+00   1.6898941e+00   2.2253038e+00   1.0655560e+00   4.1586001e-01   9.0827783e-01   1.9262937e+00   1.2075315e+00   8.3888121e-01   4.0438741e-01   1.0401425e+00   1.2250414e+00   1.0755693e+00   5.9426792e-01   1.3866792e+00   1.3487634e+00   1.0056742e+00   5.9426792e-01   7.2526325e-01   1.0425476e+00   5.0592043e-01   1.2125198e+00   9.0252542e-01   5.4292906e-01   1.0679144e+00   4.5470518e-01   1.2307737e+00   5.6700421e-01   1.3629833e+00   1.1271488e+00   9.3592296e-01   1.1329323e+00   1.4903933e+00   1.5826638e+00   9.2264612e-01   3.7598397e-01   5.1691876e-01   5.3022554e-01   3.4583729e-01   1.5102079e+00   9.0478973e-01   9.6664346e-01   1.3678655e+00   1.0012667e+00   5.0090417e-01   4.9766035e-01   8.1130291e-01   1.0331736e+00   4.5581864e-01   7.6955924e-01   6.0551856e-01   6.0181382e-01   6.0060595e-01   8.1242502e-01   7.2852070e-01   5.0180477e-01   2.4944334e+00   1.5259640e+00   2.4897635e+00   2.0286682e+00   2.2758462e+00   3.2467454e+00   1.0417249e+00   2.8819633e+00   2.2804674e+00   2.7472449e+00   1.6234861e+00   1.7644184e+00   2.0587064e+00   1.4533724e+00   1.6559784e+00   1.8347926e+00   1.9605308e+00   3.3855928e+00   3.5452222e+00   1.4540815e+00   2.2852232e+00   1.3536716e+00   3.3617477e+00   1.3717027e+00   2.2096171e+00   2.5931780e+00   1.2603076e+00   1.3371180e+00   2.0643410e+00   2.4233813e+00   2.7521037e+00   3.2246201e+00   2.0784533e+00   1.5405106e+00   2.0088441e+00   2.9099860e+00   2.1140685e+00   1.9448322e+00   1.2330392e+00   2.0122105e+00   2.1687358e+00   1.8353933e+00   1.5259640e+00   2.4321505e+00   2.2783778e+00   1.8251179e+00   1.4795374e+00   1.7068208e+00   1.9049236e+00   1.5165339e+00   1.1004794e+00   9.4753140e-01   9.4125538e-01   1.1763719e+00   8.5105559e-01   6.6432544e-01   7.2526325e-01   6.4290921e-01   3.2816937e-01   1.2418578e-01   4.4535192e-01   6.2024833e-01   7.0479928e-01   1.2172454e+00   1.3021788e+00   1.3289150e+00   9.6141901e-01   8.9366705e-01   1.3003320e+00   7.1840099e-01   3.0275928e-01   8.2654509e-01   1.1056650e+00   1.2497790e+00   1.2234738e+00   6.0611244e-01   9.6141901e-01   1.8661545e+00   1.1149070e+00   1.0038051e+00   1.0038051e+00   5.0991930e-01   1.8886923e+00   1.0132664e+00   1.7427900e+00   1.0573285e+00   1.5462225e+00   1.2230220e+00   1.4700179e+00   2.2554582e+00   1.8183902e+00   1.9191337e+00   1.4359851e+00   1.8399871e+00   8.1558458e-01   9.6664346e-01   1.1754055e+00   1.1548215e+00   1.2523175e+00   1.1229906e+00   1.1149070e+00   2.3868096e+00   2.5734684e+00   1.0665149e+00   1.4148192e+00   1.1763719e+00   2.3591336e+00   6.6317860e-01   1.3545005e+00   1.6178623e+00   6.3735887e-01   7.2526325e-01   1.2709820e+00   1.4169523e+00   1.7425222e+00   2.1449779e+00   1.3015611e+00   7.4777660e-01   1.2601890e+00   1.8513630e+00   1.3897316e+00   1.1185330e+00   7.6625946e-01   1.0919712e+00   1.3783420e+00   1.0120221e+00   1.0573285e+00   1.5860263e+00   1.5022608e+00   1.0597541e+00   8.3060013e-01   8.9095811e-01   1.2107055e+00   9.5498315e-01   5.9426792e-01   8.8835966e-01   7.2486328e-01   4.3456114e-01   6.3108414e-01   7.9580667e-01   5.4292906e-01   8.0619006e-01   1.0003942e+00   1.2057554e+00   1.1282371e+00   4.0147421e-01   1.0482443e+00   8.3812833e-01   9.3049742e-01   6.4290921e-01   6.6432544e-01   2.0000000e-01   4.9766035e-01   1.1016264e+00   8.7202528e-01   4.1312257e-01   6.2660376e-01   4.4651726e-01   5.0180477e-01   5.9426792e-01   1.3172979e+00   3.8776762e-01   3.7427929e-01   3.2816937e-01   6.1151102e-01   1.5338492e+00   4.2667565e-01   1.6536633e+00   6.6827038e-01   1.8195408e+00   1.1798960e+00   1.4588731e+00   2.5552364e+00   7.7039952e-01   2.1764356e+00   1.5179392e+00   2.0659196e+00   1.0072663e+00   1.0165138e+00   1.4077317e+00   7.0523271e-01   9.7441804e-01   1.1290808e+00   1.1879078e+00   2.7003420e+00   2.8251568e+00   8.7478495e-01   1.6113870e+00   5.7257017e-01   2.6756977e+00   7.5976039e-01   1.4611141e+00   1.9290721e+00   6.4290921e-01   5.8851328e-01   1.2509218e+00   1.8216794e+00   2.1226924e+00   2.6556584e+00   1.2741904e+00   8.1527569e-01   1.1396406e+00   2.3658814e+00   1.3219975e+00   1.1377990e+00   4.8036801e-01   1.4418088e+00   1.4695582e+00   1.4097125e+00   6.6827038e-01   1.6762567e+00   1.5624022e+00   1.2731262e+00   8.4812820e-01   1.0423677e+00   1.1235486e+00   6.3808075e-01   7.0328431e-01   2.8507955e-01   9.7377870e-01   3.7598397e-01   8.9971984e-01   6.2538346e-01   6.2988288e-01   8.4591037e-01   1.1042097e+00   1.1949615e+00   5.7867728e-01   6.0121055e-01   4.2418962e-01   4.8036801e-01   2.4837156e-01   1.0588560e+00   6.3735887e-01   8.4050231e-01   1.0216438e+00   6.0900723e-01   3.8776762e-01   3.8934542e-01   3.8934542e-01   6.0900723e-01   2.1269358e-01   1.0100718e+00   3.2586371e-01   3.2816937e-01   3.2816937e-01   4.6472023e-01   1.1765359e+00   3.0546431e-01   2.1603815e+00   1.1833480e+00   2.0696037e+00   1.5733646e+00   1.8844302e+00   2.7913211e+00   1.0279631e+00   2.4069427e+00   1.8096161e+00   2.4013270e+00   1.3194762e+00   1.3641156e+00   1.6852518e+00   1.1847335e+00   1.5344133e+00   1.5901181e+00   1.5133392e+00   2.9601125e+00   3.0929882e+00   9.7994716e-01   1.9359434e+00   1.1341579e+00   2.8969791e+00   1.0267435e+00   1.8174459e+00   2.1353579e+00   9.5498315e-01   1.0067464e+00   1.6752254e+00   1.9600024e+00   2.3015655e+00   2.8161147e+00   1.7177705e+00   1.0636401e+00   1.5095556e+00   2.5229584e+00   1.8388413e+00   1.5016471e+00   9.4558103e-01   1.6620056e+00   1.8661202e+00   1.6246433e+00   1.1833480e+00   2.0524784e+00   1.9917352e+00   1.5896248e+00   1.1449732e+00   1.3635198e+00   1.6539414e+00   1.1377990e+00   7.8695083e-01   1.0194752e+00   6.9369532e-01   4.4535192e-01   6.2538346e-01   7.1169738e-01   8.2684479e-01   7.5791688e-01   8.9971984e-01   7.0394675e-01   1.0777972e+00   8.9366705e-01   9.7548738e-01   7.3805807e-01   6.9369532e-01   9.9348625e-01   1.2013436e+00   9.4287188e-01   2.1845981e-01   9.1163729e-01   7.8197925e-01   7.4777660e-01   8.0096515e-01   6.3735887e-01   1.5043029e+00   7.0776547e-01   8.7021234e-01   7.8197925e-01   7.0784540e-01   1.6629594e+00   7.2852070e-01   1.7521201e+00   7.5705927e-01   1.5812904e+00   1.1798960e+00   1.4306494e+00   2.2994849e+00   1.3047221e+00   1.9342059e+00   1.3259654e+00   2.0165210e+00   1.0919404e+00   8.7720955e-01   1.2180145e+00   7.1881659e-01   1.0466623e+00   1.2389598e+00   1.1426203e+00   2.5872805e+00   2.5766735e+00   5.0817745e-01   1.4924169e+00   8.3060013e-01   2.3982377e+00   5.8914551e-01   1.4728952e+00   1.7209381e+00   6.3808075e-01   8.3649708e-01   1.1916257e+00   1.5183917e+00   1.7983401e+00   2.4620092e+00   1.2174316e+00   7.4549115e-01   1.1136343e+00   1.9965599e+00   1.5255331e+00   1.1891470e+00   8.2384013e-01   1.2304904e+00   1.3937115e+00   1.1842231e+00   7.5705927e-01   1.6132118e+00   1.5725854e+00   1.1127329e+00   5.8914551e-01   9.8054887e-01   1.4089719e+00   9.0521488e-01   1.1043332e+00   5.3665999e-01   1.1040512e+00   8.6137722e-01   8.5335130e-01   1.0692258e+00   1.3395518e+00   1.4121163e+00   7.2343175e-01   4.0438741e-01   1.4096146e-01   2.1845981e-01   2.5251796e-01   1.2340567e+00   7.2852070e-01   1.0216438e+00   1.2599182e+00   7.7360126e-01   5.1607523e-01   2.1269358e-01   5.0270183e-01   8.3345577e-01   2.1845981e-01   7.4893123e-01   3.4378533e-01   5.3022554e-01   4.5581864e-01   6.9167458e-01   9.4080461e-01   3.4583729e-01   2.3056888e+00   1.2961380e+00   2.2790932e+00   1.7645599e+00   2.0520955e+00   3.0186066e+00   8.9827435e-01   2.6386155e+00   2.0191749e+00   2.5992685e+00   1.4843324e+00   1.5325189e+00   1.8691652e+00   1.2554784e+00   1.5582387e+00   1.7070813e+00   1.7171798e+00   3.2008583e+00   3.3121677e+00   1.1313840e+00   2.1147926e+00   1.1879078e+00   3.1280700e+00   1.1681971e+00   2.0145868e+00   2.3728666e+00   1.0720678e+00   1.1437669e+00   1.8347926e+00   2.2027051e+00   2.5315934e+00   3.0688850e+00   1.8636112e+00   1.2768639e+00   1.7126039e+00   2.7381221e+00   1.9739212e+00   1.7039473e+00   1.0573285e+00   1.8507968e+00   2.0095044e+00   1.7591313e+00   1.2961380e+00   2.2339736e+00   2.1358764e+00   1.7106141e+00   1.2731262e+00   1.5241199e+00   1.7828037e+00   1.2869134e+00   8.7720955e-01   7.4777660e-01   6.5223271e-01   7.1881659e-01   7.6914805e-01   9.3999899e-01   8.0619006e-01   4.2418962e-01   1.4104707e+00   1.2144845e+00   1.3128167e+00   1.0056742e+00   5.3665999e-01   5.6075294e-01   3.4583729e-01   8.1130291e-01   9.7730901e-01   7.8197925e-01   9.9089002e-01   8.0353565e-01   4.3691963e-01   9.6095130e-01   1.7110336e+00   7.7033318e-01   7.5196795e-01   7.0776547e-01   6.5648056e-01   1.8915404e+00   7.9878917e-01   1.2730931e+00   5.3022554e-01   1.4349259e+00   8.3620494e-01   1.0733200e+00   2.1767273e+00   1.0960883e+00   1.8048569e+00   1.2035173e+00   1.6539414e+00   6.2482915e-01   7.0523271e-01   1.0184370e+00   7.1169738e-01   6.6432544e-01   7.0480730e-01   8.1527569e-01   2.3116343e+00   2.4505705e+00   1.0085601e+00   1.2063335e+00   4.5581864e-01   2.3022338e+00   5.6700421e-01   1.0655560e+00   1.5550492e+00   4.4417983e-01   2.5251796e-01   8.8358844e-01   1.4559276e+00   1.7532140e+00   2.2755980e+00   8.9653332e-01   5.5160819e-01   9.1163729e-01   1.9862884e+00   9.1163729e-01   7.6752131e-01   2.0656129e-01   1.0632598e+00   1.0516761e+00   1.0391247e+00   5.3022554e-01   1.2756158e+00   1.1406052e+00   8.7720955e-01   7.3851529e-01   6.5633874e-01   7.0776547e-01   3.2352160e-01   9.1273187e-01   7.0043186e-01   3.7427929e-01   5.7324170e-01   9.3615100e-01   1.0733200e+00   5.0991930e-01   5.9426792e-01   6.5633874e-01   6.7975091e-01   3.0811765e-01   1.1056650e+00   7.7360126e-01   7.0429250e-01   8.2552685e-01   5.7257017e-01   5.0905001e-01   6.1968386e-01   6.5223271e-01   6.0611244e-01   3.2586371e-01   1.2028939e+00   5.0905001e-01   4.2667565e-01   4.1449626e-01   3.0546431e-01   1.2470767e+00   4.0147421e-01   2.1213832e+00   1.1521791e+00   2.0070710e+00   1.6126950e+00   1.8637576e+00   2.7490677e+00   1.2370832e+00   2.3910690e+00   1.8274132e+00   2.3004229e+00   1.1979861e+00   1.3368881e+00   1.5972416e+00   1.1093572e+00   1.3693737e+00   1.4644753e+00   1.5211725e+00   2.9013543e+00   3.0559175e+00   1.0590298e+00   1.8374244e+00   1.0423677e+00   2.8588399e+00   9.4309624e-01   1.7735968e+00   2.0979142e+00   8.5205778e-01   9.4287188e-01   1.6546836e+00   1.9109434e+00   2.2424413e+00   2.7118839e+00   1.6774684e+00   1.1029298e+00   1.6007141e+00   2.3898698e+00   1.7557336e+00   1.5191033e+00   8.5462626e-01   1.5344007e+00   1.7571295e+00   1.3898545e+00   1.1521791e+00   1.9987470e+00   1.8815752e+00   1.4085850e+00   1.0646687e+00   1.2740417e+00   1.5577803e+00   1.1296247e+00   4.0176783e-01   6.5223271e-01   6.3977563e-01   5.3022554e-01   5.7324170e-01   5.2574978e-01   1.4438552e+00   1.2221471e+00   1.3131724e+00   1.0406064e+00   3.4583729e-01   9.5943875e-01   9.2859317e-01   6.5172743e-01   5.1607523e-01   9.7548738e-01   1.0611732e+00   8.6137722e-01   5.3665999e-01   9.4854455e-01   1.8311457e+00   8.7420176e-01   8.7170815e-01   8.4050231e-01   6.5223271e-01   2.0303919e+00   8.9917007e-01   1.3866318e+00   5.7867728e-01   1.2002762e+00   7.4740267e-01   1.0440187e+00   1.9213397e+00   1.4087466e+00   1.5433565e+00   9.2836103e-01   1.6392533e+00   7.7360126e-01   5.0592043e-01   8.5585239e-01   6.8961791e-01   9.5035453e-01   9.5498315e-01   7.0776547e-01   2.1812146e+00   2.2081369e+00   3.7427929e-01   1.1335961e+00   7.7885297e-01   2.0291151e+00   3.2352160e-01   1.0661822e+00   1.3165513e+00   3.7598397e-01   5.3588338e-01   8.2305664e-01   1.1437730e+00   1.4415965e+00   2.0902718e+00   8.7848692e-01   3.2352160e-01   7.0479928e-01   1.6865203e+00   1.1904611e+00   7.5791688e-01   5.5492130e-01   8.9207714e-01   1.0805899e+00   9.6271042e-01   5.7867728e-01   1.2256881e+00   1.2481462e+00   8.8358844e-01   4.0147421e-01   6.4405773e-01   1.0887986e+00   5.9426792e-01   4.4651726e-01   5.4292906e-01   7.0437330e-01   7.0776547e-01   3.2816937e-01   1.2134101e+00   9.8820253e-01   1.0733200e+00   8.1099042e-01   4.9857388e-01   7.2172678e-01   6.5223271e-01   6.3808075e-01   5.3665999e-01   6.9369532e-01   8.2305664e-01   6.2482915e-01   2.5251796e-01   7.1799256e-01   1.5895397e+00   6.2205176e-01   5.7257017e-01   5.6769031e-01   4.0438741e-01   1.7935777e+00   6.4755655e-01   1.6267976e+00   7.4777660e-01   1.4807336e+00   9.7270522e-01   1.3173487e+00   2.1839601e+00   1.2277129e+00   1.7938033e+00   1.1948932e+00   1.8448199e+00   8.7383925e-01   8.2305664e-01   1.1418127e+00   8.4591037e-01   1.2153720e+00   1.1640914e+00   9.1163729e-01   2.3638833e+00   2.4815883e+00   6.3861009e-01   1.3946921e+00   8.5434758e-01   2.2902807e+00   6.1151102e-01   1.2452704e+00   1.5325394e+00   6.0121055e-01   6.1092863e-01   1.1228379e+00   1.3752705e+00   1.7103060e+00   2.2560685e+00   1.1879078e+00   4.5470518e-01   9.0454394e-01   1.9729066e+00   1.3650300e+00   9.0521488e-01   6.0670504e-01   1.1454006e+00   1.3674559e+00   1.2262704e+00   7.4777660e-01   1.4820085e+00   1.4947429e+00   1.1729895e+00   7.3145860e-01   8.7720955e-01   1.2163831e+00   6.5633874e-01   2.1845981e-01   5.6769031e-01   7.4777660e-01   4.2538717e-01   9.5099818e-01   9.7994716e-01   1.0119857e+00   6.5223271e-01   8.3888121e-01   1.0038051e+00   5.9426792e-01   4.6472023e-01   6.0121055e-01   8.0326782e-01   9.2836103e-01   9.0876485e-01   3.7598397e-01   6.3861009e-01   1.5602029e+00   8.0326782e-01   7.0129382e-01   7.0043186e-01   2.0000000e-01   1.6208239e+00   7.0437330e-01   1.8619092e+00   9.6271042e-01   1.6849072e+00   1.3188999e+00   1.5860263e+00   2.4084158e+00   1.5142414e+00   2.0543079e+00   1.5230852e+00   1.9980352e+00   9.4375082e-01   1.0588560e+00   1.3035649e+00   1.0035600e+00   1.2499342e+00   1.2459608e+00   1.2225634e+00   2.5586145e+00   2.7210925e+00   8.9366705e-01   1.5500052e+00   1.0014633e+00   2.5139485e+00   6.9369532e-01   1.4790710e+00   1.7580510e+00   6.2660376e-01   7.0429250e-01   1.3804167e+00   1.5625881e+00   1.8966943e+00   2.3518757e+00   1.4139741e+00   8.0358695e-01   1.3075101e+00   2.0455018e+00   1.5153654e+00   1.2234738e+00   6.6539428e-01   1.2342162e+00   1.5049644e+00   1.1591754e+00   9.6271042e-01   1.7107332e+00   1.6328100e+00   1.1880428e+00   8.3812833e-01   1.0106392e+00   1.3267389e+00   8.9767734e-01   4.2538717e-01   6.2024833e-01   6.0181382e-01   1.1431021e+00   1.1948932e+00   1.2269747e+00   8.6361309e-01   8.2552685e-01   1.2002640e+00   6.5223271e-01   3.0811765e-01   7.1462831e-01   1.0067784e+00   1.1396406e+00   1.1147518e+00   5.0817745e-01   8.5335130e-01   1.7711504e+00   1.0085601e+00   9.0454394e-01   9.0277242e-01   4.0438741e-01   1.8140813e+00   9.1075311e-01   1.7412567e+00   9.8054887e-01   1.5527694e+00   1.2155004e+00   1.4692412e+00   2.2702600e+00   1.7126039e+00   1.9279661e+00   1.4238090e+00   1.8539569e+00   8.1558458e-01   9.5035453e-01   1.1763980e+00   1.0621081e+00   1.2047214e+00   1.1205013e+00   1.1134787e+00   2.4108292e+00   2.5851693e+00   9.6095130e-01   1.4178113e+00   1.0879524e+00   2.3751496e+00   6.0900723e-01   1.3570688e+00   1.6277043e+00   5.7015910e-01   6.6491075e-01   1.2652657e+00   1.4292566e+00   1.7566567e+00   2.1846001e+00   1.2961380e+00   7.1840099e-01   1.2329148e+00   1.8795815e+00   1.3897316e+00   1.1149070e+00   6.8757066e-01   1.0960883e+00   1.3785366e+00   1.0168833e+00   9.8054887e-01   1.5871961e+00   1.5043071e+00   1.0597541e+00   7.7033318e-01   8.8861541e-01   1.2058675e+00   8.9134001e-01   3.4583729e-01   8.1130291e-01   1.5090287e+00   1.4644753e+00   1.5150043e+00   1.1847335e+00   8.1385214e-01   1.4041085e+00   8.9917007e-01   3.0811765e-01   6.6539428e-01   1.2643026e+00   1.3836712e+00   1.3112758e+00   7.0784540e-01   1.1353806e+00   2.0777059e+00   1.2396136e+00   1.1498269e+00   1.1474460e+00   6.9006418e-01   2.1775976e+00   1.1752673e+00   1.4613032e+00   1.0391247e+00   1.1810170e+00   8.7504951e-01   1.1390131e+00   1.8670836e+00   1.9048338e+00   1.5205305e+00   1.0228981e+00   1.5676403e+00   6.7975091e-01   6.6539428e-01   8.7175869e-01   1.1533602e+00   1.2459608e+00   9.7730901e-01   7.5082357e-01   2.0536508e+00   2.1838261e+00   8.9095811e-01   1.1306949e+00   1.2394907e+00   1.9665910e+00   5.6769031e-01   1.0425476e+00   1.2324706e+00   6.4704320e-01   7.3851529e-01   9.5476489e-01   1.0198386e+00   1.3510699e+00   1.8411319e+00   1.0100718e+00   5.2942799e-01   9.3801395e-01   1.5112621e+00   1.2002762e+00   7.7763126e-01   8.2899253e-01   8.2305664e-01   1.1377990e+00   9.1663180e-01   1.0391247e+00   1.2653669e+00   1.2757312e+00   9.2288144e-01   6.4405773e-01   6.6827038e-01   1.0851476e+00   9.3048953e-01   7.7074935e-01   1.6569692e+00   1.5391185e+00   1.6134578e+00   1.2794849e+00   7.1504098e-01   1.3197776e+00   7.9613242e-01   3.2586371e-01   8.6165877e-01   1.2653669e+00   1.4028652e+00   1.2701139e+00   6.6384020e-01   1.2172454e+00   2.1489775e+00   1.2262704e+00   1.1578646e+00   1.1452867e+00   7.9613242e-01   2.2808589e+00   1.1959482e+00   1.1500393e+00   9.1075311e-01   9.3999899e-01   6.4806901e-01   8.5434758e-01   1.6806723e+00   1.8184542e+00   1.3334814e+00   8.5205778e-01   1.2702636e+00   3.4583729e-01   4.3456114e-01   5.6700421e-01   1.0389435e+00   1.0122141e+00   6.4290921e-01   5.0905001e-01   1.8419636e+00   1.9902374e+00   9.3801395e-01   8.1810461e-01   1.1069580e+00   1.7940242e+00   4.4651726e-01   7.4740267e-01   1.0346741e+00   5.1691876e-01   6.0121055e-01   6.6827038e-01   8.5205778e-01   1.1776640e+00   1.6778021e+00   7.0776547e-01   4.2667565e-01   7.8695083e-01   1.3400806e+00   8.6165877e-01   5.3022554e-01   7.0437330e-01   5.0592043e-01   8.1273630e-01   6.0670504e-01   9.1075311e-01   9.7270522e-01   9.4352681e-01   6.0551856e-01   5.7257017e-01   3.4378533e-01   7.5705927e-01   8.0064372e-01   1.0450018e+00   8.4812820e-01   9.3847194e-01   6.2988288e-01   6.0611244e-01   6.0060595e-01   5.0090417e-01   7.0784540e-01   6.2538346e-01   5.0592043e-01   6.6932542e-01   5.5492130e-01   1.5422108e-01   5.6075294e-01   1.4235605e+00   4.6472023e-01   4.2418962e-01   3.8776762e-01   2.8192292e-01   1.5978583e+00   4.5581864e-01   1.6256459e+00   6.5633874e-01   1.5986180e+00   1.1106412e+00   1.3708966e+00   2.3519748e+00   1.1147518e+00   1.9798165e+00   1.3654173e+00   1.8856245e+00   7.7033318e-01   8.5335130e-01   1.1771643e+00   6.8076724e-01   9.7270522e-01   1.0165138e+00   1.0391247e+00   2.5081056e+00   2.6437138e+00   7.6716823e-01   1.4120836e+00   6.1947990e-01   2.4692682e+00   4.8927739e-01   1.3077572e+00   1.7030709e+00   3.8934542e-01   4.4651726e-01   1.1594648e+00   1.5551984e+00   1.8760773e+00   2.3977345e+00   1.1868139e+00   6.2024833e-01   1.1056650e+00   2.0821572e+00   1.2794849e+00   1.0244319e+00   3.7427929e-01   1.1646003e+00   1.3139135e+00   1.1119327e+00   6.5633874e-01   1.5344007e+00   1.4333755e+00   1.0386594e+00   6.3735887e-01   8.2372435e-01   1.0901359e+00   6.2081167e-01   3.4583729e-01   2.8192292e-01   4.1586001e-01   1.6237100e+00   1.0540105e+00   1.1816401e+00   1.4110536e+00   9.8450810e-01   6.6432544e-01   5.3665999e-01   9.0454394e-01   1.1389644e+00   5.0905001e-01   7.1799256e-01   7.1504098e-01   7.3813096e-01   7.2783368e-01   8.7021234e-01   6.9006418e-01   6.2482915e-01   2.6619364e+00   1.6754669e+00   2.5821869e+00   2.1421834e+00   2.4107926e+00   3.3209792e+00   1.2036484e+00   2.9531363e+00   2.3720162e+00   2.8824828e+00   1.7671769e+00   1.8842354e+00   2.1714345e+00   1.6176764e+00   1.8723516e+00   2.0134817e+00   2.0676751e+00   3.4808493e+00   3.6264553e+00   1.5230852e+00   2.4135751e+00   1.5351194e+00   3.4281547e+00   1.4948868e+00   2.3378347e+00   2.6680945e+00   1.3977032e+00   1.4832928e+00   2.1976523e+00   2.4795532e+00   2.8157449e+00   3.2956170e+00   2.2214438e+00   1.6336229e+00   2.1064881e+00   2.9775369e+00   2.2994849e+00   2.0603946e+00   1.3916739e+00   2.1189748e+00   2.3204945e+00   1.9672068e+00   1.6754669e+00   2.5635110e+00   2.4436082e+00   1.9753271e+00   1.6077195e+00   1.8374244e+00   2.0981613e+00   1.6585806e+00   1.2418578e-01   3.7598397e-01   1.3405045e+00   8.3812833e-01   1.1437669e+00   1.3915412e+00   8.9095811e-01   6.2538346e-01   2.5251796e-01   6.0611244e-01   9.6791960e-01   3.4583729e-01   6.2205176e-01   4.5581864e-01   6.5223271e-01   5.7867728e-01   8.2619017e-01   8.2654509e-01   4.6472023e-01   2.4061696e+00   1.3868130e+00   2.3985329e+00   1.8751958e+00   2.1591630e+00   3.1397173e+00   8.9852394e-01   2.7599154e+00   2.1335771e+00   2.7193241e+00   1.6021202e+00   1.6415861e+00   1.9851797e+00   1.3336069e+00   1.6224878e+00   1.8082080e+00   1.8350829e+00   3.3292261e+00   3.4297053e+00   1.2340567e+00   2.2298076e+00   1.2654843e+00   3.2489933e+00   1.2770118e+00   2.1337366e+00   2.4988032e+00   1.1786349e+00   1.2545301e+00   1.9393053e+00   2.3288114e+00   2.6536325e+00   3.2010862e+00   1.9648876e+00   1.3964978e+00   1.8188234e+00   2.8588023e+00   2.0766308e+00   1.8216743e+00   1.1634384e+00   1.9698860e+00   2.1147926e+00   1.8660999e+00   1.3868130e+00   2.3472906e+00   2.2417376e+00   1.8131734e+00   1.3752391e+00   1.6372749e+00   1.8856245e+00   1.3922071e+00   4.0176783e-01   1.4467170e+00   9.3049742e-01   1.2002762e+00   1.4411886e+00   9.4375082e-01   6.6432544e-01   3.7427929e-01   7.0784540e-01   1.0466623e+00   4.0176783e-01   5.6700421e-01   5.5492130e-01   6.9728513e-01   6.4405773e-01   8.7170815e-01   7.3535471e-01   5.3309112e-01   2.5193321e+00   1.5039793e+00   2.4895662e+00   1.9791576e+00   2.2673478e+00   3.2268480e+00   1.0014633e+00   2.8466240e+00   2.2303173e+00   2.8133325e+00   1.6962564e+00   1.7458338e+00   2.0805039e+00   1.4552205e+00   1.7454671e+00   1.9165907e+00   1.9332869e+00   3.4131779e+00   3.5208177e+00   1.3379696e+00   2.3275025e+00   1.3866044e+00   3.3340853e+00   1.3784233e+00   2.2317775e+00   2.5822073e+00   1.2828332e+00   1.3595018e+00   2.0485193e+00   2.4057315e+00   2.7355566e+00   3.2722484e+00   2.0762069e+00   1.4905436e+00   1.9191337e+00   2.9375895e+00   2.1864773e+00   1.9213461e+00   1.2702636e+00   2.0582667e+00   2.2206505e+00   1.9521784e+00   1.5039793e+00   2.4497583e+00   2.3480580e+00   1.9124077e+00   1.4817438e+00   1.7372199e+00   1.9937367e+00   1.5016471e+00   1.2122249e+00   6.7975091e-01   8.4050231e-01   1.0796583e+00   6.6539428e-01   3.4583729e-01   3.2816937e-01   5.2942799e-01   7.3145860e-01   1.2418578e-01   9.1163729e-01   3.2586371e-01   3.7427929e-01   3.2816937e-01   5.0592043e-01   1.0122141e+00   2.1845981e-01   2.2481791e+00   1.2631020e+00   2.1874158e+00   1.7295419e+00   1.9965608e+00   2.9333950e+00   1.0072663e+00   2.5632712e+00   1.9670002e+00   2.4858980e+00   1.3655398e+00   1.4724669e+00   1.7716601e+00   1.2125198e+00   1.4903113e+00   1.6105641e+00   1.6572339e+00   3.0940465e+00   3.2344170e+00   1.1332978e+00   2.0129643e+00   1.1341579e+00   3.0445772e+00   1.0864449e+00   1.9287276e+00   2.2802541e+00   9.8820253e-01   1.0688498e+00   1.7838044e+00   2.1039999e+00   2.4365934e+00   2.9349538e+00   1.8084630e+00   1.2266837e+00   1.7026843e+00   2.6138892e+00   1.8911946e+00   1.6476803e+00   9.7949166e-01   1.7305789e+00   1.9168750e+00   1.6065247e+00   1.2631020e+00   2.1541966e+00   2.0395401e+00   1.5896248e+00   1.1996741e+00   1.4306494e+00   1.6928004e+00   1.2436109e+00   7.5791688e-01   8.1242502e-01   7.6625946e-01   7.5976039e-01   1.0289803e+00   1.1332978e+00   7.9613242e-01   5.3665999e-01   1.1149070e+00   1.9007091e+00   9.2836103e-01   9.3610001e-01   9.1858284e-01   8.1638392e-01   2.1493214e+00   1.0132664e+00   1.1680362e+00   3.2352160e-01   1.2372418e+00   5.4292906e-01   8.7170815e-01   1.9366254e+00   1.1486378e+00   1.5564198e+00   8.7420176e-01   1.5682049e+00   6.6491075e-01   4.5470518e-01   8.8358844e-01   4.5581864e-01   8.0326782e-01   7.9878917e-01   5.9426792e-01   2.1460410e+00   2.1931311e+00   5.0180477e-01   1.0950112e+00   5.0592043e-01   2.0545952e+00   3.4378533e-01   9.3923979e-01   1.3512935e+00   3.4583729e-01   3.4583729e-01   6.6539428e-01   1.2670555e+00   1.5369942e+00   2.1465859e+00   7.2526325e-01   3.0546431e-01   5.0991930e-01   1.8206746e+00   9.8054887e-01   5.7015910e-01   3.8776762e-01   9.6664346e-01   9.9089002e-01   1.0262547e+00   3.2352160e-01   1.1127329e+00   1.1166017e+00   8.7848692e-01   3.8934542e-01   5.8914551e-01   8.8062848e-01   3.2586371e-01   6.4755655e-01   1.3011270e+00   1.0122141e+00   4.2538717e-01   6.2660376e-01   4.4651726e-01   7.0086313e-01   6.3735887e-01   1.2926374e+00   4.0176783e-01   4.2288438e-01   3.8934542e-01   8.0619006e-01   1.5230852e+00   4.6472023e-01   1.6933635e+00   7.0233835e-01   1.9584922e+00   1.2594846e+00   1.5411691e+00   2.6785768e+00   6.2605182e-01   2.3003744e+00   1.6284481e+00   2.1882128e+00   1.1729895e+00   1.1500393e+00   1.5577059e+00   7.1881659e-01   9.8985697e-01   1.2389598e+00   1.3108618e+00   2.8217641e+00   2.9357847e+00   9.3026633e-01   1.7457596e+00   5.7867728e-01   2.7994225e+00   9.3610001e-01   1.5801828e+00   2.0692197e+00   8.2384013e-01   7.4740267e-01   1.3410314e+00   1.9783833e+00   2.2683159e+00   2.8062463e+00   1.3610783e+00   9.7249562e-01   1.1868139e+00   2.5244698e+00   1.3852951e+00   1.2460824e+00   6.3808075e-01   1.6077195e+00   1.5873000e+00   1.5826476e+00   7.0233835e-01   1.7831878e+00   1.6667819e+00   1.4276261e+00   9.9519977e-01   1.1984588e+00   1.1903343e+00   7.0386584e-01   7.1840099e-01   1.1107977e+00   5.8624446e-01   9.8495853e-01   8.7504951e-01   4.1586001e-01   8.7720955e-01   1.5824669e+00   7.5976039e-01   5.5160819e-01   5.7741073e-01   5.4292906e-01   1.6736318e+00   6.7975091e-01   1.5883552e+00   8.2552685e-01   1.5948732e+00   1.1332978e+00   1.3595997e+00   2.3503762e+00   1.2554784e+00   1.9862884e+00   1.4596621e+00   1.8378727e+00   7.2852070e-01   9.6204649e-01   1.1697902e+00   9.6664346e-01   9.6271042e-01   9.5676647e-01   1.0496979e+00   2.4751922e+00   2.6546397e+00   1.2224367e+00   1.3843268e+00   7.2343175e-01   2.4751922e+00   7.5082357e-01   1.2832075e+00   1.7000773e+00   6.2988288e-01   5.0592043e-01   1.1833351e+00   1.5613251e+00   1.8886923e+00   2.3645560e+00   1.2016233e+00   7.5791688e-01   1.2125198e+00   2.0748074e+00   1.2155370e+00   1.0244319e+00   4.5470518e-01   1.1485394e+00   1.2770118e+00   1.0720678e+00   8.2552685e-01   1.5113992e+00   1.3835368e+00   1.0035600e+00   9.5571254e-01   8.2234151e-01   1.0120221e+00   6.5223271e-01   8.3888121e-01   1.1486378e+00   1.2994764e+00   1.2307737e+00   6.0181382e-01   1.0483827e+00   1.9867752e+00   1.1408504e+00   1.0391247e+00   1.0361698e+00   5.7867728e-01   2.0669733e+00   1.0646687e+00   1.4623898e+00   9.5866719e-01   1.2497790e+00   9.3048953e-01   1.1765359e+00   1.9666356e+00   1.8175297e+00   1.6242657e+00   1.1520347e+00   1.5603665e+00   5.7324170e-01   7.0233835e-01   8.8887100e-01   1.0919404e+00   1.1355826e+00   8.9712482e-01   8.1385214e-01   2.1052360e+00   2.2845234e+00   1.0166932e+00   1.1341579e+00   1.1332978e+00   2.0738150e+00   5.3309112e-01   1.0588560e+00   1.3224963e+00   5.5492130e-01   6.2538346e-01   9.8450810e-01   1.1271488e+00   1.4561933e+00   1.8911946e+00   1.0230441e+00   5.2574978e-01   1.0056742e+00   1.5916843e+00   1.1355826e+00   8.2105460e-01   7.1504098e-01   8.1527569e-01   1.1176720e+00   8.2899253e-01   9.5866719e-01   1.2943100e+00   1.2429818e+00   8.5205778e-01   7.0233835e-01   6.2660376e-01   9.8054887e-01   8.3649708e-01   8.7822463e-01   8.2899253e-01   8.1099042e-01   7.0826681e-01   5.8914551e-01   1.5042268e+00   7.3813096e-01   8.1558458e-01   7.4855857e-01   6.0121055e-01   1.6260946e+00   7.0386584e-01   1.8605327e+00   8.8503502e-01   1.6493191e+00   1.2601890e+00   1.5390703e+00   2.3592515e+00   1.4088394e+00   1.9940473e+00   1.4245508e+00   2.0716002e+00   1.1004436e+00   9.8820253e-01   1.2927814e+00   9.0056222e-01   1.2208301e+00   1.3194807e+00   1.1996741e+00   2.6153308e+00   2.6539963e+00   6.2538346e-01   1.5687169e+00   9.5271386e-01   2.4562038e+00   6.6491075e-01   1.5249255e+00   1.7538274e+00   6.6539428e-01   8.2619017e-01   1.3131724e+00   1.5409345e+00   1.8470010e+00   2.4533073e+00   1.3504603e+00   7.7039952e-01   1.2057554e+00   2.0352149e+00   1.6006330e+00   1.2331989e+00   8.0660588e-01   1.2747177e+00   1.5040391e+00   1.2426449e+00   8.8503502e-01   1.7019078e+00   1.6700310e+00   1.2144845e+00   7.4855857e-01   1.0401425e+00   1.4600567e+00   9.3296062e-01   5.0180477e-01   4.4651726e-01   6.2149089e-01   4.1586001e-01   1.0078327e+00   3.0275928e-01   1.4096146e-01   1.4096146e-01   6.0611244e-01   1.1536782e+00   2.0656129e-01   2.0491051e+00   1.0646687e+00   2.0979729e+00   1.5528443e+00   1.8279176e+00   2.8469870e+00   8.2234151e-01   2.4692682e+00   1.8399871e+00   2.3632803e+00   1.2493717e+00   1.3312249e+00   1.6756749e+00   1.0425476e+00   1.3092012e+00   1.4505265e+00   1.5123788e+00   2.9884772e+00   3.1361386e+00   1.0755693e+00   1.9017004e+00   9.3801395e-01   2.9635613e+00   9.8054887e-01   1.7833384e+00   2.1970231e+00   8.6513410e-01   8.9742724e-01   1.6159903e+00   2.0524973e+00   2.3760856e+00   2.8811560e+00   1.6399646e+00   1.0934620e+00   1.5205305e+00   2.5867433e+00   1.6928004e+00   1.4836711e+00   7.9580667e-01   1.6659943e+00   1.7839298e+00   1.5792930e+00   1.0646687e+00   2.0113485e+00   1.8901379e+00   1.5067717e+00   1.0950112e+00   1.3129189e+00   1.4875372e+00   1.0389435e+00   4.0293660e-01   8.0499049e-01   3.0546431e-01   7.8197925e-01   2.5251796e-01   5.1691876e-01   4.2538717e-01   7.4740267e-01   1.0181000e+00   3.2586371e-01   2.1717162e+00   1.1533602e+00   2.2234347e+00   1.6690840e+00   1.9433381e+00   2.9713636e+00   7.2486328e-01   2.5929835e+00   1.9489982e+00   2.5241649e+00   1.4089364e+00   1.4425304e+00   1.8012344e+00   1.0919712e+00   1.3726860e+00   1.5830057e+00   1.6408468e+00   3.1546522e+00   3.2544456e+00   1.0406064e+00   2.0352149e+00   1.0168833e+00   3.0859269e+00   1.0901359e+00   1.9325796e+00   2.3348454e+00   9.8054887e-01   1.0379132e+00   1.7250039e+00   2.1825260e+00   2.4995667e+00   3.0529994e+00   1.7458338e+00   1.2167151e+00   1.6214915e+00   2.7108297e+00   1.8418195e+00   1.6195190e+00   9.3847194e-01   1.7995863e+00   1.9034198e+00   1.7022897e+00   1.1533602e+00   2.1413027e+00   2.0233319e+00   1.6211869e+00   1.1770266e+00   1.4411886e+00   1.6502968e+00   1.1644030e+00   6.5633874e-01   4.4417983e-01   1.1332978e+00   2.1845981e-01   4.2538717e-01   3.4583729e-01   7.1504098e-01   1.4080793e+00   3.4583729e-01   1.8866180e+00   8.7848692e-01   1.9819543e+00   1.3312249e+00   1.6523803e+00   2.6988671e+00   6.9006418e-01   2.3100474e+00   1.6455737e+00   2.2934334e+00   1.2426449e+00   1.1905954e+00   1.5932297e+00   8.9095811e-01   1.2681309e+00   1.4065584e+00   1.3487634e+00   2.8835141e+00   2.9705897e+00   7.3805807e-01   1.8205354e+00   8.5462626e-01   2.8117234e+00   9.3049742e-01   1.6679957e+00   2.0758969e+00   8.4050231e-01   8.3060013e-01   1.4419145e+00   1.9521697e+00   2.2599493e+00   2.8310619e+00   1.4807336e+00   9.4558103e-01   1.2404967e+00   2.5235709e+00   1.6070713e+00   1.3102444e+00   7.5705927e-01   1.6281130e+00   1.7021627e+00   1.6240596e+00   8.7848692e-01   1.8790831e+00   1.8155245e+00   1.5040391e+00   1.0014633e+00   1.2481462e+00   1.4334902e+00   8.6165877e-01   6.6827038e-01   1.5475692e+00   5.8914551e-01   5.0503591e-01   4.9857388e-01   3.0811765e-01   1.7160413e+00   5.7324170e-01   1.5795964e+00   6.5648056e-01   1.4967461e+00   1.0182895e+00   1.3034549e+00   2.2380042e+00   1.2266837e+00   1.8619092e+00   1.2701139e+00   1.8007564e+00   7.2852070e-01   7.9016429e-01   1.0989735e+00   7.5705927e-01   1.0406064e+00   1.0184370e+00   9.3999899e-01   2.3886514e+00   2.5357185e+00   8.2684479e-01   1.3424112e+00   7.0776547e-01   2.3522207e+00   4.8927739e-01   1.2205493e+00   1.5832517e+00   4.2667565e-01   4.4417983e-01   1.0974061e+00   1.4319225e+00   1.7587110e+00   2.2711652e+00   1.1390131e+00   5.1691876e-01   1.0163549e+00   1.9782498e+00   1.2532075e+00   9.2859317e-01   4.1449626e-01   1.0852663e+00   1.2786117e+00   1.0887986e+00   6.5648056e-01   1.4596621e+00   1.3991741e+00   1.0313560e+00   6.6932542e-01   7.7553525e-01   1.0741917e+00   5.7257017e-01   9.4558103e-01   2.5651975e-01   4.1449626e-01   3.2816937e-01   4.8135521e-01   1.0908017e+00   2.1845981e-01   2.1701312e+00   1.1752673e+00   2.1084262e+00   1.6352583e+00   1.9101184e+00   2.8518881e+00   9.7825559e-01   2.4781934e+00   1.8745369e+00   2.4235816e+00   1.3078976e+00   1.3842113e+00   1.6965018e+00   1.1329323e+00   1.4319225e+00   1.5496439e+00   1.5691346e+00   3.0266197e+00   3.1503439e+00   1.0244319e+00   1.9425540e+00   1.0627606e+00   2.9623467e+00   1.0056742e+00   1.8539828e+00   2.2026387e+00   9.1163729e-01   9.9475949e-01   1.6952454e+00   2.0275673e+00   2.3581240e+00   2.8793190e+00   1.7227544e+00   1.1332978e+00   1.6029963e+00   2.5482247e+00   1.8278913e+00   1.5611067e+00   9.1163729e-01   1.6653066e+00   1.8462692e+00   1.5634147e+00   1.1752673e+00   2.0757295e+00   1.9739212e+00   1.5320003e+00   1.1179743e+00   1.3567326e+00   1.6362950e+00   1.1594648e+00   9.9475949e-01   1.1004436e+00   1.0720678e+00   1.4108494e+00   3.2816937e-01   9.8054887e-01   2.9240179e+00   1.9013501e+00   3.0016960e+00   2.4403742e+00   2.7185134e+00   3.7481490e+00   1.2643026e+00   3.3676733e+00   2.7249658e+00   3.2951180e+00   2.1701459e+00   2.2231652e+00   2.5778372e+00   1.8193838e+00   2.0594742e+00   2.3383666e+00   2.4210417e+00   3.9277558e+00   4.0319248e+00   1.8011138e+00   2.8105150e+00   1.7324239e+00   3.8595400e+00   1.8657887e+00   2.7098209e+00   3.1083486e+00   1.7551534e+00   1.8090259e+00   2.5002193e+00   2.9463843e+00   3.2688068e+00   3.8087204e+00   2.5182043e+00   1.9933741e+00   2.3692479e+00   3.4705738e+00   2.5885717e+00   2.3959721e+00   1.7005893e+00   2.5655126e+00   2.6734142e+00   2.4311441e+00   1.9013501e+00   2.9205331e+00   2.7876433e+00   2.3735872e+00   1.9516947e+00   2.2170194e+00   2.3879674e+00   1.9213461e+00   3.0546431e-01   2.0656129e-01   6.0611244e-01   1.2246352e+00   1.4096146e-01   1.9777274e+00   9.7249562e-01   2.0297383e+00   1.4616539e+00   1.7458338e+00   2.7737198e+00   7.5082357e-01   2.3931826e+00   1.7478866e+00   2.3213742e+00   1.2131545e+00   1.2498134e+00   1.6130724e+00   9.3824087e-01   1.2565757e+00   1.4029855e+00   1.4325768e+00   2.9414941e+00   3.0577671e+00   8.7720955e-01   1.8438146e+00   8.6956871e-01   2.8895427e+00   9.1310225e-01   1.7228354e+00   2.1321061e+00   8.0499049e-01   8.3345577e-01   1.5318874e+00   1.9898963e+00   2.3090270e+00   2.8491218e+00   1.5587730e+00   1.0122141e+00   1.4162017e+00   2.5326059e+00   1.6463627e+00   1.4047678e+00   7.3805807e-01   1.6165635e+00   1.7228488e+00   1.5520745e+00   9.7249562e-01   1.9420274e+00   1.8372522e+00   1.4628493e+00   1.0030700e+00   1.2523175e+00   1.4531349e+00   9.5571254e-01   1.2418578e-01   5.0270183e-01   1.2603076e+00   2.1269358e-01   1.9932786e+00   1.0168833e+00   1.9946994e+00   1.4557537e+00   1.7495699e+00   2.7337358e+00   9.0575661e-01   2.3519748e+00   1.7324239e+00   2.2796281e+00   1.1801240e+00   1.2450709e+00   1.5872286e+00   1.0267435e+00   1.3336069e+00   1.4152303e+00   1.4096199e+00   2.8778917e+00   3.0268604e+00   1.0067464e+00   1.8215944e+00   9.3824087e-01   2.8471683e+00   9.0658670e-01   1.6933635e+00   2.0801243e+00   8.0758367e-01   8.3783744e-01   1.5390703e+00   1.9310038e+00   2.2599493e+00   2.7651778e+00   1.5728839e+00   9.7949166e-01   1.4165336e+00   2.4822593e+00   1.6510537e+00   1.3842113e+00   7.5755387e-01   1.5773217e+00   1.7253276e+00   1.5255331e+00   1.0168833e+00   1.9287244e+00   1.8366596e+00   1.4599710e+00   1.0339865e+00   1.2378278e+00   1.4537266e+00   9.7249562e-01   5.0090417e-01   1.2507669e+00   1.2418578e-01   1.9589833e+00   9.7270522e-01   1.9792779e+00   1.4437673e+00   1.7230625e+00   2.7260686e+00   8.6012420e-01   2.3478326e+00   1.7190893e+00   2.2590861e+00   1.1454006e+00   1.2174316e+00   1.5614941e+00   9.5476489e-01   1.2555979e+00   1.3635198e+00   1.3969297e+00   2.8759951e+00   3.0161959e+00   9.4558103e-01   1.7925890e+00   8.6983677e-01   2.8416706e+00   8.6513410e-01   1.6742876e+00   2.0756986e+00   7.5871717e-01   7.9613242e-01   1.5107481e+00   1.9286915e+00   2.2531942e+00   2.7669732e+00   1.5384446e+00   9.7270522e-01   1.4111029e+00   2.4671050e+00   1.6105641e+00   1.3717027e+00   7.0429250e-01   1.5517600e+00   1.6837214e+00   1.4807336e+00   9.7270522e-01   1.9032219e+00   1.7953587e+00   1.4097072e+00   9.7855477e-01   1.2036484e+00   1.4110536e+00   9.4309624e-01   1.5090287e+00   5.0905001e-01   1.8619092e+00   9.1163729e-01   1.7230625e+00   1.3188999e+00   1.5883552e+00   2.4588872e+00   1.3193952e+00   2.0946464e+00   1.5338492e+00   2.0321740e+00   9.5099818e-01   1.0604511e+00   1.3277861e+00   9.3296062e-01   1.2221471e+00   1.2470767e+00   1.2266837e+00   2.6106370e+00   2.7667028e+00   8.7420176e-01   1.5746612e+00   8.9852394e-01   2.5679581e+00   6.9369532e-01   1.4905436e+00   1.8028753e+00   6.2149089e-01   6.9006418e-01   1.3813076e+00   1.6199747e+00   1.9552274e+00   2.4344864e+00   1.4148192e+00   8.0358695e-01   1.3039319e+00   2.1287551e+00   1.5153654e+00   1.2246352e+00   6.2660376e-01   1.2741904e+00   1.5160122e+00   1.2047214e+00   9.1163729e-01   1.7242097e+00   1.6420607e+00   1.2064640e+00   8.3812833e-01   1.0168833e+00   1.3257654e+00   8.6137722e-01   1.1533602e+00   3.1382691e+00   2.1485328e+00   3.1786790e+00   2.6799312e+00   2.9354140e+00   3.9353144e+00   1.5252485e+00   3.5658557e+00   2.9475994e+00   3.4455976e+00   2.3167786e+00   2.4320363e+00   2.7459122e+00   2.0598189e+00   2.2501104e+00   2.5013206e+00   2.6321552e+00   4.0910078e+00   4.2293986e+00   2.0521052e+00   2.9731112e+00   1.9619929e+00   4.0491656e+00   2.0481101e+00   2.8946126e+00   3.2860707e+00   1.9342059e+00   2.0025214e+00   2.7210925e+00   3.1148548e+00   3.4424959e+00   3.9360563e+00   2.7333517e+00   2.2078200e+00   2.6383936e+00   3.6047462e+00   2.7713578e+00   2.6121617e+00   1.8925840e+00   2.7075477e+00   2.8419886e+00   2.5215069e+00   2.1485328e+00   3.1102248e+00   2.9517129e+00   2.5041493e+00   2.1435335e+00   2.3887866e+00   2.5633372e+00   2.1544995e+00   2.0467316e+00   1.0576043e+00   2.0528819e+00   1.5379283e+00   1.8096161e+00   2.8029161e+00   8.6012420e-01   2.4272793e+00   1.8028753e+00   2.3372930e+00   1.2144845e+00   1.2985682e+00   1.6312555e+00   1.0166932e+00   1.3073038e+00   1.4333755e+00   1.4843487e+00   2.9588514e+00   3.0950947e+00   9.7949166e-01   1.8647706e+00   9.3615100e-01   2.9181741e+00   9.3049742e-01   1.7594421e+00   2.1522124e+00   8.2342214e-01   8.7720955e-01   1.5965946e+00   1.9973159e+00   2.3235032e+00   2.8379387e+00   1.6211988e+00   1.0588560e+00   1.5076049e+00   2.5254157e+00   1.6945041e+00   1.4637418e+00   7.8197925e-01   1.6130724e+00   1.7539916e+00   1.5193574e+00   1.0576043e+00   1.9849009e+00   1.8691652e+00   1.4607586e+00   1.0375119e+00   1.2741904e+00   1.4947429e+00   1.0361698e+00   1.0621081e+00   8.3649708e-01   7.6590510e-01   4.0176783e-01   1.3455136e+00   1.8827665e+00   1.1093572e+00   9.5676647e-01   9.0852141e-01   9.4309624e-01   8.9852394e-01   6.8076724e-01   1.2002762e+00   9.7825559e-01   7.0479928e-01   7.8197925e-01   1.4637418e+00   1.5390703e+00   1.4628493e+00   6.2538346e-01   1.2208301e+00   1.4754770e+00   1.2162549e+00   5.2574978e-01   1.0104465e+00   1.2832075e+00   1.1810170e+00   6.1947990e-01   1.1242402e+00   1.1718516e+00   1.6295015e+00   5.8914551e-01   1.2063335e+00   1.1879206e+00   1.4041085e+00   4.0293660e-01   7.7074935e-01   1.2709820e+00   7.7869083e-01   5.0592043e-01   9.7441804e-01   1.0621081e+00   5.0991930e-01   4.4417983e-01   8.3888121e-01   1.1770266e+00   8.6361309e-01   6.0670504e-01   1.0324775e+00   1.3844611e+00   6.2660376e-01   8.8695363e-01   2.0692197e+00   9.7441804e-01   1.6995747e+00   1.0122141e+00   1.6372749e+00   7.6752131e-01   6.0551856e-01   1.0244319e+00   2.1845981e-01   5.0090417e-01   7.2852070e-01   7.4777660e-01   2.2645802e+00   2.3019759e+00   5.7324170e-01   1.1833351e+00   2.5651975e-01   2.1907335e+00   5.0905001e-01   1.0330459e+00   1.5124582e+00   4.4651726e-01   3.8934542e-01   6.9369532e-01   1.4517959e+00   1.7036156e+00   2.3021295e+00   7.0429250e-01   5.6700421e-01   6.3977563e-01   1.9782093e+00   8.7229670e-01   6.8801986e-01   3.8934542e-01   1.1199472e+00   9.9519977e-01   1.1263042e+00   0.0000000e+00   1.1697902e+00   1.0851476e+00   9.2859317e-01   5.0905001e-01   7.1504098e-01   7.7763126e-01   3.0546431e-01   8.2135873e-01   6.0121055e-01   7.6716823e-01   2.3579605e+00   4.5581864e-01   5.8914551e-01   6.5223271e-01   8.9095811e-01   8.2552685e-01   4.4417983e-01   1.5124582e+00   1.3844611e+00   8.1810461e-01   6.6384020e-01   1.0516761e+00   1.0733200e+00   1.3725949e+00   3.0844217e-01   1.6183051e+00   8.9095811e-01   1.1426203e+00   4.5470518e-01   3.2816937e-01   1.2604558e+00   1.2459608e+00   7.1799256e-01   5.0180477e-01   3.6171588e-01   1.0269295e+00   7.1840099e-01   1.0531192e+00   1.1093572e+00   6.1092863e-01   8.4591037e-01   7.4777660e-01   1.3693737e+00   5.0905001e-01   4.8135521e-01   8.0619006e-01   1.3844611e+00   3.4378533e-01   5.3309112e-01   7.3813096e-01   1.0901359e+00   8.1273630e-01   9.6141901e-01   1.2978356e+00   4.2667565e-01   1.4573287e+00   1.5826638e+00   1.0904758e+00   5.0503591e-01   1.1258723e+00   5.4292906e-01   3.2816937e-01   5.3022554e-01   7.7869083e-01   7.5871717e-01   5.5492130e-01   2.1269358e-01   1.6596342e+00   1.6919202e+00   8.3280511e-01   7.0429250e-01   8.7202528e-01   1.5772389e+00   7.0394675e-01   5.2655962e-01   9.2836103e-01   8.0064372e-01   7.0437330e-01   3.0546431e-01   9.0478973e-01   1.1271488e+00   1.7235501e+00   4.0293660e-01   5.2942799e-01   4.5470518e-01   1.4317371e+00   6.8917100e-01   2.1269358e-01   8.1099042e-01   6.2988288e-01   6.5172743e-01   7.6166891e-01   6.2660376e-01   6.5648056e-01   7.6625946e-01   6.1947990e-01   6.4755655e-01   4.2667565e-01   6.2660376e-01   5.6700421e-01   1.2113327e+00   1.8396098e+00   8.7504951e-01   5.7257017e-01   8.3280511e-01   7.0784540e-01   5.5492130e-01   3.7427929e-01   1.0284501e+00   8.7420176e-01   5.0991930e-01   4.4417983e-01   1.4089719e+00   1.4387122e+00   1.1127329e+00   4.1586001e-01   1.1205013e+00   1.3344634e+00   9.3048953e-01   3.2816937e-01   7.4164639e-01   1.0244319e+00   9.3999899e-01   2.5651975e-01   8.1242502e-01   9.1858284e-01   1.4955532e+00   2.5251796e-01   8.7420176e-01   8.5335130e-01   1.2045536e+00   4.3691963e-01   4.4651726e-01   1.0480665e+00   4.9857388e-01   2.8507955e-01   7.3535471e-01   8.8695363e-01   3.2816937e-01   3.8934542e-01   6.0611244e-01   8.6361309e-01   6.0551856e-01   5.2655962e-01   8.3783744e-01   3.0351721e+00   4.2418962e-01   1.0941064e+00   7.5705927e-01   1.6559784e+00   1.5582387e+00   1.2112034e+00   2.1967372e+00   2.0692197e+00   1.5564198e+00   1.3693737e+00   8.0096515e-01   4.5581864e-01   2.0330276e+00   1.0137836e+00   2.3142399e+00   2.1845981e-01   1.9017011e+00   1.1228379e+00   6.6827038e-01   2.0223026e+00   1.9969203e+00   1.3792358e+00   8.7478495e-01   5.2371571e-01   8.1385214e-01   1.3793330e+00   1.7664528e+00   1.6569692e+00   5.0905001e-01   1.4644753e+00   1.4341959e+00   2.1204309e+00   1.2632199e+00   1.1880428e+00   1.5405106e+00   2.0692197e+00   9.4009473e-01   1.1355826e+00   1.4992973e+00   1.8311457e+00   1.5765737e+00   1.6311692e+00   1.9969203e+00   2.6670272e+00   1.9783833e+00   2.5784641e+00   1.6572339e+00   1.5613865e+00   1.9842916e+00   8.6110333e-01   1.0720678e+00   1.6180482e+00   1.7140774e+00   3.2123303e+00   3.2542669e+00   1.1332978e+00   2.1449779e+00   7.5976039e-01   3.1540626e+00   1.4088394e+00   1.9797139e+00   2.4825886e+00   1.3075101e+00   1.2330392e+00   1.6629594e+00   2.4148300e+00   2.6746409e+00   3.2573703e+00   1.6686069e+00   1.4322723e+00   1.4341959e+00   2.9471490e+00   1.6864366e+00   1.6385322e+00   1.1320702e+00   2.0632091e+00   1.9468380e+00   2.0389505e+00   9.7441804e-01   2.1303950e+00   2.0095672e+00   1.8517858e+00   1.4168607e+00   1.6483152e+00   1.5346983e+00   1.0866092e+00   7.2486328e-01   8.7202528e-01   1.2988558e+00   1.1847335e+00   8.6137722e-01   1.8265471e+00   1.7177705e+00   1.2107055e+00   9.9368623e-01   9.5866719e-01   7.3805807e-01   1.6506221e+00   7.3805807e-01   1.9449573e+00   5.0592043e-01   1.5350426e+00   7.8695083e-01   3.7427929e-01   1.6553809e+00   1.6249178e+00   1.0168833e+00   5.0991930e-01   2.1845981e-01   9.7270522e-01   1.0264409e+00   1.3817041e+00   1.2768639e+00   5.7324170e-01   1.1634384e+00   1.0611732e+00   1.7483574e+00   9.3048953e-01   9.0056222e-01   1.2340567e+00   1.6995747e+00   6.8076724e-01   9.1883539e-01   1.1718516e+00   1.4616896e+00   1.2125198e+00   1.2951888e+00   1.6249178e+00   1.2028939e+00   8.7420176e-01   5.3665999e-01   5.5492130e-01   1.1340084e+00   1.0720678e+00   8.3345577e-01   5.3588338e-01   1.5520745e+00   1.3258714e+00   9.5099818e-01   7.7074935e-01   1.2604558e+00   1.1891470e+00   9.2264612e-01   8.1099042e-01   7.7039952e-01   1.0389435e+00   1.0054794e+00   4.3456114e-01   6.2605182e-01   7.2823007e-01   1.5784191e+00   4.8927739e-01   7.5976039e-01   6.5223271e-01   1.0692258e+00   9.8985697e-01   6.3808075e-01   1.1178200e+00   6.6827038e-01   7.4855857e-01   8.6513410e-01   1.0122141e+00   7.6787403e-01   9.3615100e-01   7.5835500e-01   8.2654509e-01   6.9728513e-01   9.9519977e-01   9.7356960e-01   1.1306887e+00   1.2197188e+00   8.0353565e-01   1.7933375e+00   1.5916843e+00   1.0118409e+00   1.0089164e+00   7.0776547e-01   1.1591754e+00   1.8437762e+00   5.3309112e-01   1.8278913e+00   9.6838716e-01   1.4843324e+00   6.3735887e-01   7.3496673e-01   1.5570415e+00   1.5003972e+00   1.0421979e+00   9.7759114e-01   8.9070384e-01   7.8197925e-01   1.0329598e+00   1.4388174e+00   1.5204340e+00   6.9325418e-01   9.4309624e-01   1.0339865e+00   1.6134578e+00   8.0660588e-01   7.0523271e-01   1.0406064e+00   1.6372749e+00   5.1303949e-01   5.8851328e-01   1.0072663e+00   1.4951106e+00   1.0950112e+00   1.0934620e+00   1.5213929e+00   5.0991930e-01   4.5581864e-01   9.3615100e-01   7.6590510e-01   3.2586371e-01   4.2538717e-01   1.7942496e+00   1.9566981e+00   1.0636401e+00   6.6384020e-01   9.2264612e-01   1.7814077e+00   5.2371571e-01   6.0670504e-01   1.0120221e+00   4.8927739e-01   4.3691963e-01   5.6769031e-01   8.9366705e-01   1.1948578e+00   1.6982795e+00   5.7324170e-01   5.7257017e-01   8.3060013e-01   1.3824965e+00   5.7867728e-01   4.1586001e-01   5.4292906e-01   4.4651726e-01   5.7324170e-01   4.4535192e-01   7.6752131e-01   8.2105460e-01   6.9369532e-01   3.4583729e-01   7.0479928e-01   2.0656129e-01   4.3456114e-01   6.1092863e-01   4.6472023e-01   7.1840099e-01   6.9369532e-01   5.6631629e-01   3.2816937e-01   1.8058693e+00   1.8261179e+00   6.3735887e-01   7.0328431e-01   8.2684479e-01   1.6791597e+00   4.0293660e-01   6.6827038e-01   9.7377870e-01   5.0991930e-01   4.8135521e-01   3.2586371e-01   8.7021234e-01   1.1327825e+00   1.7839298e+00   3.7427929e-01   4.1586001e-01   5.5492130e-01   1.3916739e+00   7.7919451e-01   4.1449626e-01   5.8914551e-01   5.7324170e-01   6.0900723e-01   6.2407309e-01   6.0551856e-01   7.5705927e-01   7.8695083e-01   4.8135521e-01   3.2586371e-01   3.0811765e-01   7.3851529e-01   5.3665999e-01   1.1524979e+00   1.0244319e+00   4.3691963e-01   3.7255734e-01   1.4090646e+00   1.5060944e+00   1.0810263e+00   2.8507955e-01   1.2406194e+00   1.3336069e+00   7.1791510e-01   3.2586371e-01   5.9426792e-01   8.2552685e-01   8.2275389e-01   4.1449626e-01   5.8851328e-01   7.5196795e-01   1.3415658e+00   4.1586001e-01   7.2852070e-01   8.9159388e-01   9.7249562e-01   5.8914551e-01   4.4535192e-01   9.4352681e-01   1.4096146e-01   3.0811765e-01   4.1586001e-01   1.0244319e+00   4.2538717e-01   4.5581864e-01   3.2586371e-01   7.0869559e-01   3.7427929e-01   6.5223271e-01   9.2836103e-01   4.4651726e-01   8.8695363e-01   8.9971984e-01   2.4227359e+00   2.4243464e+00   5.5419992e-01   1.3235313e+00   3.0546431e-01   2.3149695e+00   6.1151102e-01   1.2036484e+00   1.6520677e+00   5.4292906e-01   5.7324170e-01   8.2305664e-01   1.5788188e+00   1.8238348e+00   2.4554026e+00   8.2552685e-01   7.0429250e-01   7.7588000e-01   2.0959492e+00   1.0466623e+00   8.6513410e-01   5.4292906e-01   1.2497790e+00   1.1215059e+00   1.2436109e+00   2.1845981e-01   1.3165513e+00   1.2256881e+00   1.0406064e+00   6.0060595e-01   8.5434758e-01   9.6664346e-01   5.1691876e-01   6.5223271e-01   8.4050231e-01   2.2451458e+00   2.2996030e+00   9.7270522e-01   1.1594648e+00   4.2538717e-01   2.1936248e+00   6.9369532e-01   1.0119857e+00   1.5297036e+00   6.6384020e-01   6.2988288e-01   7.0386584e-01   1.5113992e+00   1.7140171e+00   2.2868482e+00   6.9325418e-01   9.4080461e-01   1.0406064e+00   1.9734538e+00   7.5835500e-01   7.8695083e-01   6.2988288e-01   1.1158787e+00   9.4832302e-01   1.1055069e+00   5.0090417e-01   1.1452867e+00   1.0056742e+00   9.0277242e-01   6.3977563e-01   7.3851529e-01   6.6432544e-01   6.0611244e-01   5.1691876e-01   1.6983410e+00   1.8377590e+00   1.1500393e+00   5.6631629e-01   8.6012420e-01   1.6864433e+00   6.6539428e-01   4.5581864e-01   9.7356960e-01   6.6932542e-01   5.9426792e-01   4.5470518e-01   9.7548738e-01   1.1573546e+00   1.6772907e+00   4.4535192e-01   8.2929029e-01   9.8450810e-01   1.3812107e+00   3.2816937e-01   5.0905001e-01   6.6932542e-01   5.0991930e-01   3.7598397e-01   5.0905001e-01   7.2852070e-01   6.4704320e-01   4.5581864e-01   3.2586371e-01   7.4777660e-01   3.2816937e-01   2.5251796e-01   6.3108414e-01   1.5573817e+00   1.6420607e+00   9.0575661e-01   5.7867728e-01   9.7441804e-01   1.4917344e+00   6.2482915e-01   4.0176783e-01   7.7039952e-01   7.1799256e-01   6.4704320e-01   3.2816937e-01   7.1799256e-01   9.7270522e-01   1.5593809e+00   4.1586001e-01   4.6472023e-01   5.6454040e-01   1.2601890e+00   6.5223271e-01   1.2418578e-01   7.6716823e-01   4.4651726e-01   6.0670504e-01   6.1947990e-01   7.4777660e-01   5.9426792e-01   7.2172678e-01   5.3588338e-01   6.2660376e-01   3.2352160e-01   5.8914551e-01   6.4704320e-01   1.2013436e+00   2.3665136e+00   1.1771643e+00   2.4806944e+00   1.0018083e+00   2.1098467e+00   1.2627078e+00   8.8503502e-01   2.2024869e+00   2.1511385e+00   1.6189643e+00   1.1368070e+00   1.0688498e+00   3.4378533e-01   1.6188960e+00   1.9698860e+00   1.9254808e+00   8.8861541e-01   1.5832517e+00   1.5978297e+00   2.2712062e+00   1.4277162e+00   1.3610783e+00   1.6849072e+00   2.2645802e+00   1.1106525e+00   1.2665468e+00   1.6689743e+00   2.0995265e+00   1.7457596e+00   1.7532140e+00   2.1511385e+00   2.2712062e+00   1.3276804e+00   2.5485519e+00   3.4378533e-01   2.1870851e+00   1.4266198e+00   1.0379132e+00   2.3072128e+00   2.2736138e+00   1.6156775e+00   1.2095267e+00   8.3888121e-01   1.2277129e+00   1.6151153e+00   2.0528819e+00   1.8792214e+00   8.2624515e-01   1.7265353e+00   1.7004805e+00   2.3953564e+00   1.5733646e+00   1.4691764e+00   1.8497891e+00   2.3019759e+00   1.2238809e+00   1.4266198e+00   1.7962897e+00   2.1027465e+00   1.8635467e+00   1.9008621e+00   2.2439391e+00   1.3353353e+00   7.2526325e-01   2.1293320e+00   5.5492130e-01   1.2776560e+00   1.5193574e+00   6.2988288e-01   8.1130291e-01   8.6912228e-01   1.3752391e+00   1.6044563e+00   2.3474075e+00   9.1883539e-01   6.2024833e-01   6.4806901e-01   1.9000365e+00   1.3674559e+00   9.6664346e-01   8.1354181e-01   1.1751082e+00   1.2304904e+00   1.2256933e+00   5.7324170e-01   1.3628690e+00   1.4089364e+00   1.0866132e+00   4.8036801e-01   8.9971984e-01   1.3044654e+00   8.1130291e-01   1.3916739e+00   1.1500393e+00   9.6838716e-01   2.5251796e-01   5.5419992e-01   1.0573285e+00   1.0284501e+00   5.7324170e-01   7.1840099e-01   6.6317860e-01   1.1434428e+00   5.6769031e-01   9.7855477e-01   1.1106525e+00   8.2899253e-01   6.0670504e-01   6.2660376e-01   1.1449732e+00   3.2586371e-01   2.1845981e-01   6.0060595e-01   1.1833351e+00   2.0656129e-01   2.5251796e-01   5.1607523e-01   9.6324667e-01   5.9426792e-01   7.1799256e-01   1.0879524e+00   2.4372751e+00   7.0437330e-01   1.2331989e+00   1.7427900e+00   6.0611244e-01   5.1607523e-01   9.3615100e-01   1.6812503e+00   1.9411754e+00   2.5109747e+00   9.3801395e-01   7.7039952e-01   8.6513410e-01   2.2052183e+00   9.6324667e-01   8.9917007e-01   4.2667565e-01   1.3224963e+00   1.1912106e+00   1.3084046e+00   2.5651975e-01   1.3897316e+00   1.2541242e+00   1.1120775e+00   7.1504098e-01   9.1051084e-01   8.1521713e-01   3.6171588e-01   2.0209349e+00   1.2627078e+00   7.9878917e-01   2.1431239e+00   2.1198551e+00   1.5016009e+00   9.6141901e-01   6.2024833e-01   1.0083666e+00   1.5022608e+00   1.8803649e+00   1.7557336e+00   6.2482915e-01   1.6044563e+00   1.5582387e+00   2.2435182e+00   1.3836712e+00   1.3199714e+00   1.6568705e+00   2.1907335e+00   1.0796583e+00   1.2825987e+00   1.6205332e+00   1.9460721e+00   1.6995133e+00   1.7678302e+00   2.1198551e+00   9.1750357e-01   1.2756158e+00   1.4096146e-01   3.2352160e-01   7.1504098e-01   1.1242402e+00   1.4312787e+00   2.0223464e+00   7.3535471e-01   3.2586371e-01   7.3851529e-01   1.6386882e+00   9.4477932e-01   6.4755655e-01   3.7427929e-01   7.3805807e-01   8.6165877e-01   7.2852070e-01   5.0905001e-01   1.0922991e+00   1.0175773e+00   6.0900723e-01   2.1269358e-01   4.0176783e-01   8.2372435e-01   4.5470518e-01   5.5492130e-01   9.8495853e-01   9.0521488e-01   5.2942799e-01   6.3977563e-01   7.9878917e-01   1.2832075e+00   5.3022554e-01   8.3060013e-01   9.4500268e-01   1.0244319e+00   4.4651726e-01   4.0176783e-01   1.0230441e+00   3.4378533e-01   3.2586371e-01   6.1623531e-01   1.0330459e+00   2.5651975e-01   4.0000000e-01   5.3588338e-01   9.5676647e-01   5.3665999e-01   5.3665999e-01   9.0521488e-01   1.3865084e+00   1.3669552e+00   8.6012420e-01   2.8192292e-01   4.1586001e-01   8.4050231e-01   8.7383925e-01   1.1355826e+00   1.1712156e+00   6.2660376e-01   9.8985697e-01   8.5205778e-01   1.4909823e+00   6.3861009e-01   7.2526325e-01   9.4854455e-01   1.5124582e+00   5.6700421e-01   7.7919451e-01   8.9971984e-01   1.2483814e+00   9.4009473e-01   1.0879524e+00   1.4147273e+00   2.1269358e-01   8.1354181e-01   1.2441035e+00   1.5551238e+00   2.1137172e+00   8.2899253e-01   3.7427929e-01   8.2929029e-01   1.7587110e+00   9.6095130e-01   7.1799256e-01   2.4837156e-01   8.3280511e-01   9.3797093e-01   7.9016429e-01   4.4651726e-01   1.1833351e+00   1.0724413e+00   6.6932542e-01   3.2816937e-01   4.6472023e-01   8.0467258e-01   3.8776762e-01   7.3145860e-01   1.2564564e+00   1.5558094e+00   2.0983278e+00   7.5082357e-01   3.6171588e-01   7.6590510e-01   1.7862655e+00   8.4050231e-01   6.2024833e-01   1.2418578e-01   8.6137722e-01   8.9852394e-01   8.5462626e-01   3.8934542e-01   1.1192362e+00   1.0078327e+00   7.0386584e-01   5.0991930e-01   4.5470518e-01   6.6539428e-01   2.4837156e-01   8.5690100e-01   1.0344911e+00   1.6689743e+00   1.0000000e-01   6.8961791e-01   7.1799256e-01   1.3207609e+00   6.2024833e-01   3.7427929e-01   8.3888121e-01   5.3588338e-01   4.2288438e-01   6.4405773e-01   6.9369532e-01   5.3309112e-01   5.8914551e-01   4.6472023e-01   6.2538346e-01   4.1586001e-01   6.1623531e-01   6.4405773e-01   4.0176783e-01   1.0175773e+00   8.9303452e-01   1.0122141e+00   1.1161766e+00   7.7885297e-01   1.0755693e+00   8.1385214e-01   1.3792358e+00   5.8914551e-01   8.5462626e-01   8.7848692e-01   1.4517959e+00   7.3851529e-01   9.4854455e-01   8.6263408e-01   1.0941064e+00   8.3783744e-01   1.1172689e+00   1.3545005e+00   1.0391247e+00   1.0389435e+00   1.3163598e+00   1.3379696e+00   4.5470518e-01   1.1951875e+00   1.0632598e+00   1.6796759e+00   7.8197925e-01   8.3345577e-01   1.0540105e+00   1.7036156e+00   6.9167458e-01   8.8503502e-01   1.0279631e+00   1.3693737e+00   1.1192426e+00   1.3077572e+00   1.6183051e+00   1.6694974e+00   1.9094934e+00   1.9895190e+00   8.2384013e-01   1.6634400e+00   1.6218244e+00   2.2178691e+00   1.3008161e+00   1.3567326e+00   1.4994715e+00   2.3021295e+00   1.1763719e+00   1.3024224e+00   1.5535909e+00   2.0373882e+00   1.6756749e+00   1.7981158e+00   2.1739455e+00   7.6752131e-01   8.1354181e-01   1.3198846e+00   6.0611244e-01   4.4535192e-01   8.5335130e-01   5.3665999e-01   3.8776762e-01   6.3977563e-01   7.0429250e-01   5.2655962e-01   5.5492130e-01   4.5581864e-01   6.3861009e-01   4.2667565e-01   6.1151102e-01   6.6932542e-01   5.1691876e-01   1.5922648e+00   1.0054794e+00   4.8135521e-01   4.3456114e-01   7.6955924e-01   9.6664346e-01   8.9687438e-01   5.6700421e-01   1.0421979e+00   1.1001291e+00   8.2929029e-01   4.4535192e-01   5.1691876e-01   8.9712482e-01   4.5470518e-01   1.6914476e+00   1.1340084e+00   5.8914551e-01   8.5105559e-01   9.7548738e-01   1.0864449e+00   1.1160770e+00   6.3977563e-01   1.0720678e+00   1.2163831e+00   1.0047836e+00   6.9369532e-01   7.2343175e-01   1.0613462e+00   6.2407309e-01   1.4238090e+00   1.3511716e+00   1.9067300e+00   9.3824087e-01   1.0331736e+00   1.1327825e+00   1.9782093e+00   9.0454394e-01   1.0244319e+00   1.1833480e+00   1.5948732e+00   1.3360558e+00   1.5461469e+00   1.8900319e+00   6.2081167e-01   9.1750357e-01   6.4290921e-01   4.4417983e-01   7.0429250e-01   8.7229670e-01   5.3665999e-01   4.0438741e-01   5.6454040e-01   1.0054794e+00   5.7015910e-01   2.1269358e-01   7.5705927e-01   7.3496673e-01   5.2942799e-01   6.2024833e-01   6.6491075e-01   6.8801986e-01   6.1947990e-01   7.2172678e-01   5.5492130e-01   6.9006418e-01   3.2816937e-01   5.3665999e-01   5.6700421e-01   9.7779835e-01   1.0014633e+00   9.4854455e-01   3.8934542e-01   1.2342162e+00   1.1043332e+00   7.9580667e-01   5.3665999e-01   5.7257017e-01   7.2852070e-01   3.0275928e-01   3.4378533e-01   3.2352160e-01   1.1199472e+00   5.0991930e-01   4.6472023e-01   2.8507955e-01   7.7869083e-01   4.1586001e-01   7.1799256e-01   1.0132664e+00   5.0905001e-01   9.9519977e-01   3.0811765e-01   2.1269358e-01   4.0293660e-01   8.3060013e-01   5.0592043e-01   5.3665999e-01   9.3049742e-01   1.1263042e+00   8.0064372e-01   6.1623531e-01   2.1269358e-01   7.7588000e-01   4.4651726e-01   7.2783368e-01   1.0329901e+00   1.1697902e+00   1.0851476e+00   9.2859317e-01   5.0905001e-01   7.1504098e-01   7.7763126e-01   3.0546431e-01   2.5651975e-01   7.0437330e-01   1.0573285e+00   7.3145860e-01   6.9325418e-01   1.0901359e+00   5.3588338e-01   1.0175773e+00   6.4405773e-01   5.3665999e-01   1.0078327e+00   6.2407309e-01   3.2352160e-01   5.7257017e-01   8.5205778e-01   5.1691876e-01   9.4022486e-01   5.6769031e-01   4.8927739e-01   6.0611244e-01   6.0900723e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..daa81110a2be1a670f6163a8b255b2c6ecd5ccaa
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-3.2-ml.txt
@@ -0,0 +1 @@
+   2.0215050e+00   2.0988154e+00   1.8614681e+00   2.0510161e+00   1.9210911e+00   2.1323516e+00   1.9565454e+00   2.1029889e+00   1.9617871e+00   2.0544792e+00   2.0357408e+00   1.8811414e+00   2.0694693e+00   2.1245977e+00   2.0632165e+00   2.0452823e+00   2.0249330e+00   1.9635489e+00   2.0508580e+00   2.0838578e+00   1.9324052e+00   1.8224609e+00   1.9795343e+00   1.9536534e+00   1.9694910e+00   1.9075569e+00   1.9590397e+00   2.0022087e+00   1.8814000e+00   1.8884208e+00   1.9961121e+00   2.0215351e+00   1.7515769e+00   2.0756437e+00   2.0109476e+00   1.9234849e+00   1.9160076e+00   1.8550862e+00   1.7733640e+00   2.0071906e+00   2.0209542e+00   2.0616569e+00   2.0565503e+00   1.9083573e+00   2.2732431e+00   1.9975503e+00   1.9080072e+00   2.1437809e+00   2.1296295e+00   1.9739085e+00   1.9834166e+00   2.1078664e+00   2.2016840e+00   2.2080962e+00   1.7340579e+00   2.0549287e+00   1.7331748e+00   1.9559688e+00   2.0343364e+00   1.8736929e+00   1.9730416e+00   1.5308944e+00   1.8421831e+00   2.0174240e+00   2.0137378e+00   1.7956151e+00   1.9606596e+00   1.9074857e+00   2.0413879e+00   2.0070305e+00   1.9584677e+00   1.8977851e+00   1.9176239e+00   1.7067419e+00   1.9461927e+00   1.8431700e+00   1.8284576e+00   1.7778704e+00   1.8350329e+00   2.0175415e+00   1.7459063e+00   1.9242505e+00   1.8757370e+00   1.9312506e+00   2.0574808e+00   2.0894636e+00   1.9780203e+00   2.1374036e+00   1.8900436e+00   2.0273032e+00   2.0681953e+00   2.0234699e+00   2.0666449e+00   2.0663485e+00   1.9281402e+00   1.7846314e+00   2.0372479e+00   1.8831230e+00   2.0186015e+00   2.0193231e+00   2.2022665e+00   1.8145737e+00   2.0466545e+00   1.8092421e+00   1.9600687e+00   2.0322961e+00   1.9556364e+00   1.8266422e+00   1.9950345e+00   2.1038429e+00   2.1164145e+00   2.0188062e+00   1.8863331e+00   2.0006971e+00   1.9971068e+00   1.8771862e+00   2.1148855e+00   1.9570638e+00   1.9859615e+00   2.0030854e+00   2.0737344e+00   1.9739259e+00   1.9266524e+00   1.9200535e+00   2.1376689e+00   1.8944425e+00   1.9330553e+00   1.8561590e+00   1.9422954e+00   1.8874178e+00   1.8624808e+00   1.8265563e+00   1.8840519e+00   2.0515092e+00   2.0174226e+00   1.9771196e+00   2.0635988e+00   1.7334466e+00   1.9912604e+00   1.8915711e+00   1.8262636e+00   1.9369173e+00   1.9560446e+00   1.9549934e+00   1.9279230e+00   1.9021073e+00   2.0113391e+00   2.0305786e+00   1.8066806e+00   1.9656739e+00   2.1219217e+00   1.8820250e+00   1.8936826e+00   2.0565131e+00   1.9839441e+00   1.8553479e+00   1.9923760e+00   1.6393276e+00   1.9786440e+00   1.8274394e+00   1.9322611e+00   2.0404318e+00   1.9216532e+00   1.9361171e+00   1.8401373e+00   1.9908059e+00   1.9495117e+00   2.1975655e+00   1.8413913e+00   2.1528773e+00   1.8434374e+00   2.1668863e+00   2.0429273e+00   1.9980016e+00   1.9790129e+00   2.0264829e+00   2.1478843e+00   2.0899600e+00   2.0280670e+00   2.1210881e+00   1.9993891e+00   1.8646871e+00   1.9099983e+00   1.9263353e+00   2.0042495e+00   2.1365919e+00   2.1830279e+00   1.9631961e+00   2.0880004e+00   1.8348369e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-5.8-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-5.8-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..aa26b0439f568f97c95bee1b04204f24c9a1f3e0
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-minkowski-5.8-ml-iris.txt
@@ -0,0 +1 @@
+   5.0042326e-01   4.1210927e-01   5.2133179e-01   1.1269424e-01   4.2362917e-01   5.0001522e-01   1.2085435e-01   7.4262850e-01   4.0127250e-01   3.0482299e-01   3.0482299e-01   5.0436965e-01   8.0923926e-01   7.1629168e-01   9.1424701e-01   4.1317535e-01   1.0000000e-01   6.0366256e-01   3.0017653e-01   3.3813251e-01   2.2573593e-01   5.2133179e-01   3.4080442e-01   5.0436965e-01   5.0043084e-01   2.2608083e-01   1.1269424e-01   1.1269424e-01   4.1315633e-01   4.1315633e-01   3.0490481e-01   6.0000952e-01   7.0462550e-01   4.0127250e-01   3.0482299e-01   4.0002221e-01   4.0127250e-01   7.1621748e-01   1.1269424e-01   1.2085435e-01   1.2036864e+00   7.0088477e-01   4.0125062e-01   5.0476836e-01   5.0436965e-01   3.0474106e-01   5.0436235e-01   2.2573593e-01   2.0061436e-01   3.3243227e+00   3.1068812e+00   3.5145413e+00   2.6080595e+00   3.2075731e+00   3.1014454e+00   3.3055260e+00   1.9156198e+00   3.2079238e+00   2.5066441e+00   2.1498493e+00   2.8059664e+00   2.6093989e+00   3.3021953e+00   2.2070266e+00   3.0158454e+00   3.1034764e+00   2.7009878e+00   3.1081779e+00   2.5032992e+00   3.4074959e+00   2.6050088e+00   3.5035589e+00   3.3011884e+00   2.9065890e+00   3.0117336e+00   3.4118782e+00   3.6094426e+00   3.1038958e+00   2.1042326e+00   2.4058620e+00   2.3063407e+00   2.5029614e+00   3.7025335e+00   3.1034636e+00   3.1057006e+00   3.3110189e+00   3.0065909e+00   2.7025941e+00   2.6047974e+00   3.0013665e+00   3.2025221e+00   2.6029242e+00   1.9242109e+00   2.8024935e+00   2.8013151e+00   2.8022622e+00   2.9036582e+00   1.6267693e+00   2.7028014e+00   4.6144526e+00   3.7071079e+00   4.5121787e+00   4.2031939e+00   4.4087839e+00   5.2153194e+00   3.1086291e+00   4.9093646e+00   4.4044245e+00   4.7202040e+00   3.7119486e+00   3.9066365e+00   4.1123628e+00   3.6114402e+00   3.7307413e+00   3.9194642e+00   4.1043951e+00   5.3177489e+00   5.5157728e+00   3.6035661e+00   4.3162097e+00   3.5127031e+00   5.3163123e+00   3.5077296e+00   4.3088507e+00   4.6100803e+00   3.4082578e+00   3.5068380e+00   4.2080636e+00   4.4113183e+00   4.7149608e+00   5.0316727e+00   4.2105572e+00   3.7024462e+00   4.2007769e+00   4.7331529e+00   4.2173557e+00   4.1039096e+00   3.4076329e+00   4.0157626e+00   4.2194897e+00   3.7329396e+00   3.7071079e+00   4.5119962e+00   4.3218071e+00   3.8249612e+00   3.6093673e+00   3.8105293e+00   4.0166459e+00   3.7050109e+00   2.2573593e-01   3.0017653e-01   6.0000317e-01   9.0534502e-01   4.1210927e-01   4.0004442e-01   5.0000761e-01   1.2085435e-01   7.1621748e-01   4.0125062e-01   1.1269424e-01   6.0184622e-01   1.0776294e+00   1.4092540e+00   9.0508756e-01   5.0043084e-01   9.0181717e-01   8.0004602e-01   5.2491131e-01   7.0017011e-01   6.1119267e-01   3.6452132e-01   5.2133179e-01   2.0061436e-01   4.0246123e-01   5.0436965e-01   4.1209001e-01   2.4170870e-01   2.0121983e-01   5.2167829e-01   1.1001015e+00   1.2036862e+00   1.2085435e-01   2.2573593e-01   6.3164977e-01   1.2085435e-01   5.0000761e-01   4.0125062e-01   5.0002283e-01   7.0462844e-01   5.0043084e-01   5.2167829e-01   8.0888055e-01   1.1269424e-01   8.0008884e-01   3.0474106e-01   7.0462697e-01   3.0008832e-01   3.3416860e+00   3.1112912e+00   3.5249966e+00   2.6033557e+00   3.2127499e+00   3.1015178e+00   3.3078313e+00   1.9025708e+00   3.2150318e+00   2.5060738e+00   2.1061951e+00   2.8068283e+00   2.6040016e+00   3.3032134e+00   2.2072454e+00   3.0286102e+00   3.1035443e+00   2.7011973e+00   3.1070853e+00   2.5014549e+00   3.4078435e+00   2.6080511e+00   3.5048916e+00   3.3021665e+00   2.9125999e+00   3.0213627e+00   3.4211337e+00   3.6148618e+00   3.1047537e+00   2.1027003e+00   2.4016639e+00   2.3011929e+00   2.5032633e+00   3.7028303e+00   3.1034629e+00   3.1065984e+00   3.3192072e+00   3.0078209e+00   2.7027260e+00   2.6031664e+00   3.0009332e+00   3.2037232e+00   2.6027120e+00   1.9031578e+00   2.8022915e+00   2.8015662e+00   2.8024715e+00   2.9065359e+00   1.6099792e+00   2.7029416e+00   4.6149181e+00   3.7071538e+00   4.5172866e+00   4.2039132e+00   4.4099272e+00   5.2224057e+00   3.1078968e+00   4.9146298e+00   4.4063795e+00   4.7253524e+00   3.7145622e+00   3.9080413e+00   4.1161770e+00   3.6111646e+00   3.7308314e+00   3.9209137e+00   4.1060063e+00   5.3254977e+00   5.5222404e+00   3.6024247e+00   4.3201293e+00   3.5126957e+00   5.3240486e+00   3.5093499e+00   4.3111749e+00   4.6158382e+00   3.4095576e+00   3.5076152e+00   4.2090727e+00   4.4184242e+00   4.7227808e+00   5.0458491e+00   4.2115634e+00   3.7037441e+00   4.2010125e+00   4.7466313e+00   4.2180733e+00   4.1050714e+00   3.4081972e+00   4.0212972e+00   4.2220584e+00   3.7407842e+00   3.7071538e+00   4.5144444e+00   4.3240980e+00   3.8290678e+00   3.6105228e+00   3.8128297e+00   4.0172657e+00   3.7052380e+00   2.0121983e-01   4.1210927e-01   7.9153339e-01   2.0181667e-01   3.0915245e-01   3.3813251e-01   2.2608083e-01   7.1629168e-01   3.0482299e-01   2.0181667e-01   4.0246123e-01   1.1281267e+00   1.2633045e+00   7.8890721e-01   4.1212852e-01   1.0095370e+00   6.0964891e-01   7.0470720e-01   5.2201750e-01   4.1210927e-01   4.5784410e-01   6.0017982e-01   3.4080442e-01   3.4342562e-01   5.0476836e-01   5.0043084e-01   3.0000000e-01   3.0017653e-01   7.0025283e-01   9.0508756e-01   1.0426513e+00   2.2608083e-01   3.0008832e-01   8.0046605e-01   2.2608083e-01   3.0474106e-01   4.0243965e-01   3.3813251e-01   9.0002570e-01   3.0000000e-01   4.3213914e-01   6.8170466e-01   2.0181667e-01   6.1119267e-01   1.1269424e-01   6.3178534e-01   3.0017653e-01   3.4595765e+00   3.2168311e+00   3.6364650e+00   2.7037323e+00   3.3192099e+00   3.2017763e+00   3.4107328e+00   2.0033798e+00   3.3237063e+00   2.6050967e+00   2.2121910e+00   2.9077087e+00   2.7085154e+00   3.4047917e+00   2.3071665e+00   3.1428042e+00   3.2033135e+00   2.8024935e+00   3.2103481e+00   2.6021247e+00   3.5076152e+00   2.7127272e+00   3.6073242e+00   3.4038884e+00   3.0203881e+00   3.1325879e+00   3.5317021e+00   3.7210979e+00   3.2059139e+00   2.2051638e+00   2.5023084e+00   2.4021168e+00   2.6048201e+00   3.8033004e+00   3.2030448e+00   3.2074921e+00   3.4286399e+00   3.1131211e+00   2.8028008e+00   2.7031257e+00   3.1010004e+00   3.3055260e+00   2.7040740e+00   2.0050309e+00   2.9023862e+00   2.9020767e+00   2.9028421e+00   3.0107283e+00   1.7089863e+00   2.8033666e+00   4.7142986e+00   3.8066401e+00   4.6226512e+00   4.3047830e+00   4.5107876e+00   5.3296471e+00   3.2068572e+00   5.0203871e+00   4.5089338e+00   4.8299744e+00   3.8170042e+00   4.0095939e+00   4.2200398e+00   3.7100654e+00   3.8275330e+00   4.0209836e+00   4.2079639e+00   5.4332277e+00   5.6287689e+00   3.7032748e+00   4.4237036e+00   3.6112573e+00   5.4319232e+00   3.6111754e+00   4.4135512e+00   4.7221364e+00   3.5107924e+00   3.6081749e+00   4.3098514e+00   4.5261773e+00   4.8309399e+00   5.1593152e+00   4.3120751e+00   3.8056232e+00   4.3015640e+00   4.8592534e+00   4.3174320e+00   4.2064763e+00   3.5083248e+00   4.1268500e+00   4.3236383e+00   3.8471097e+00   3.8066401e+00   4.6166518e+00   4.4251081e+00   3.9318948e+00   3.7118930e+00   3.9150333e+00   4.1165034e+00   3.8051417e+00   5.2133179e-01   9.0160400e-01   3.0017653e-01   4.1209001e-01   2.2573593e-01   3.0008832e-01   8.2418002e-01   3.0482299e-01   2.0181667e-01   4.1212852e-01   1.2363278e+00   1.3741498e+00   9.0160400e-01   5.2133802e-01   1.1133986e+00   7.1621748e-01   8.0051036e-01   6.3178534e-01   5.6347121e-01   5.0517282e-01   4.1315633e-01   4.0004442e-01   4.1317535e-01   6.0948212e-01   6.0184622e-01   1.2085435e-01   2.0061436e-01   8.0051036e-01   1.0087250e+00   1.1527669e+00   3.0008832e-01   4.1210927e-01   9.0142636e-01   3.0008832e-01   2.2573593e-01   5.0436235e-01   4.5148429e-01   8.0004602e-01   2.2573593e-01   4.8342635e-01   7.2044167e-01   2.0181667e-01   7.1621748e-01   1.1269424e-01   7.4262850e-01   4.0125062e-01   3.2983364e+00   3.0300451e+00   3.4603347e+00   2.5053901e+00   3.1338090e+00   3.0030658e+00   3.2183845e+00   1.8040969e+00   3.1419971e+00   2.4075162e+00   2.0123013e+00   2.7132680e+00   2.5163999e+00   3.2086215e+00   2.1132077e+00   2.9750754e+00   3.0049127e+00   2.6055197e+00   3.0177719e+00   2.4040962e+00   3.3110162e+00   2.5253371e+00   3.4126529e+00   3.2074182e+00   2.8380954e+00   2.9580787e+00   3.3536443e+00   3.5347730e+00   3.0101869e+00   2.0123796e+00   2.3038195e+00   2.2036797e+00   2.4099203e+00   3.6051707e+00   3.0042758e+00   3.0123228e+00   3.2490712e+00   2.9241808e+00   2.6047889e+00   2.5049231e+00   2.9016211e+00   3.1100277e+00   2.5081992e+00   1.8056342e+00   2.7040060e+00   2.7039988e+00   2.7050721e+00   2.8205713e+00   1.5147271e+00   2.6060742e+00   4.5183778e+00   3.6090052e+00   4.4337691e+00   4.1072664e+00   4.3151164e+00   5.1425125e+00   3.0092613e+00   4.8303615e+00   4.3139066e+00   4.6422789e+00   3.6259317e+00   3.8146285e+00   4.0301568e+00   3.5133848e+00   3.6358680e+00   3.8290678e+00   4.0124919e+00   5.2471177e+00   5.4403962e+00   3.5051114e+00   4.2343452e+00   3.4149831e+00   5.2455706e+00   3.4177035e+00   4.2200398e+00   4.5335328e+00   3.3168776e+00   3.4123846e+00   4.1140176e+00   4.3402553e+00   4.6459028e+00   4.9843016e+00   4.1167964e+00   3.6096226e+00   4.1026403e+00   4.6849407e+00   4.1230798e+00   4.0100505e+00   3.3123688e+00   3.9407837e+00   4.1330547e+00   3.6700537e+00   3.6090052e+00   4.4237036e+00   4.2343452e+00   3.7463488e+00   3.5181052e+00   3.7227931e+00   3.9220791e+00   3.6072781e+00   4.2362917e-01   4.0125062e-01   2.0061436e-01   7.4262850e-01   5.0002283e-01   4.0004442e-01   2.4170870e-01   6.0017982e-01   7.4329527e-01   8.0250123e-01   8.5406674e-01   4.1317535e-01   1.2085435e-01   7.0096858e-01   2.0181667e-01   4.1315633e-01   2.0181667e-01   4.5077696e-01   3.6259865e-01   5.0084481e-01   6.0017665e-01   2.4170870e-01   2.0121983e-01   2.2538848e-01   4.1315633e-01   5.0084481e-01   4.0246123e-01   5.0043842e-01   6.3164729e-01   5.0002283e-01   4.0122873e-01   5.0001522e-01   5.0002283e-01   6.7616723e-01   2.0121983e-01   1.2085435e-01   1.3008771e+00   6.0948506e-01   4.0125062e-01   5.0085236e-01   6.0017982e-01   2.2573593e-01   4.5077696e-01   3.0017653e-01   3.0000000e-01   3.3320240e+00   3.1087192e+00   3.5191371e+00   2.6110181e+00   3.2098845e+00   3.1016129e+00   3.3064697e+00   1.9242109e+00   3.2110200e+00   2.5072065e+00   2.1702438e+00   2.8063347e+00   2.6144115e+00   3.3026483e+00   2.2074446e+00   3.0213781e+00   3.1035271e+00   2.7015967e+00   3.1108570e+00   2.5049231e+00   3.4076266e+00   2.6065485e+00   3.5045818e+00   3.3016829e+00   2.9091905e+00   3.0158857e+00   3.4160038e+00   3.6117923e+00   3.1042949e+00   2.1068047e+00   2.4087956e+00   2.3099309e+00   2.5038387e+00   3.7027671e+00   3.1034919e+00   3.1060428e+00   3.3145595e+00   3.0095593e+00   2.7026925e+00   2.6061038e+00   3.0017811e+00   3.2030205e+00   2.6039803e+00   1.9366876e+00   2.8028640e+00   2.8014482e+00   2.8024453e+00   2.9049136e+00   1.6388635e+00   2.7031257e+00   4.6146430e+00   3.7072412e+00   4.5144508e+00   4.2035048e+00   4.4092709e+00   5.2185448e+00   3.1091788e+00   4.9117351e+00   4.4054277e+00   4.7224997e+00   3.7130507e+00   3.9073151e+00   4.1140274e+00   3.6117351e+00   3.7308330e+00   3.9200674e+00   4.1050815e+00   5.3212796e+00   5.5187578e+00   3.6046347e+00   4.3179262e+00   3.5127783e+00   5.3198559e+00   3.5085510e+00   4.3098508e+00   4.6126513e+00   3.4088749e+00   3.5071604e+00   4.2085176e+00   4.4144980e+00   4.7185095e+00   5.0381903e+00   4.2110099e+00   3.7030413e+00   4.2009868e+00   4.7393218e+00   4.2176488e+00   4.1043951e+00   3.4078683e+00   4.0181902e+00   4.2205976e+00   3.7363838e+00   3.7072412e+00   4.5130595e+00   4.3227928e+00   3.8267408e+00   3.6102542e+00   3.8115096e+00   4.0168944e+00   3.7051079e+00   8.0923926e-01   5.2201750e-01   1.1270411e+00   8.0928056e-01   2.4170870e-01   6.3178782e-01   9.1471442e-01   1.1573074e+00   5.2167829e-01   5.0476836e-01   4.0000000e-01   4.2270142e-01   3.0017653e-01   3.0490481e-01   5.0042326e-01   3.0915245e-01   8.5440680e-01   6.0184622e-01   6.3192325e-01   9.0142681e-01   5.2133179e-01   4.0363334e-01   5.0517282e-01   7.8890806e-01   8.2421923e-01   5.0042326e-01   3.1328089e-01   3.4085233e-01   8.0928056e-01   7.2044167e-01   4.5148429e-01   8.0928056e-01   1.0782211e+00   5.0517282e-01   4.8342635e-01   1.6097492e+00   1.0215068e+00   4.5148429e-01   3.0482299e-01   9.1446938e-01   3.0490481e-01   8.5440680e-01   2.4195741e-01   6.1135434e-01   3.0143288e+00   2.8035152e+00   3.2080663e+00   2.3476141e+00   2.9053991e+00   2.8028019e+00   3.0030626e+00   1.7519158e+00   2.9045816e+00   2.2149484e+00   2.0887699e+00   2.5048522e+00   2.3645147e+00   3.0018766e+00   1.9120303e+00   2.7085154e+00   2.8028008e+00   2.4075162e+00   2.8284908e+00   2.2272457e+00   3.1054022e+00   2.3075573e+00   3.2060163e+00   3.0018874e+00   2.6044486e+00   2.7064438e+00   3.1073418e+00   3.3054063e+00   2.8034238e+00   1.8447840e+00   2.1492024e+00   2.0607272e+00   2.2122063e+00   3.4028104e+00   2.8028007e+00   2.8036182e+00   3.0057998e+00   2.7234787e+00   2.4027927e+00   2.3234132e+00   2.7070699e+00   2.9017335e+00   2.3151346e+00   1.8036834e+00   2.5072065e+00   2.5017313e+00   2.5032633e+00   2.6031823e+00   1.5292174e+00   2.4058519e+00   4.3116266e+00   3.4064593e+00   4.2076930e+00   3.9021503e+00   4.1063936e+00   4.9099401e+00   2.8141516e+00   4.6055969e+00   4.1036742e+00   4.4145324e+00   3.4082578e+00   3.6052799e+00   3.8082804e+00   3.3123693e+00   3.4273179e+00   3.6154977e+00   3.8026444e+00   5.0117750e+00   5.2107474e+00   3.3130198e+00   4.0114753e+00   3.2109395e+00   5.0107787e+00   3.2067490e+00   4.0058313e+00   4.3058539e+00   3.1067996e+00   3.2049797e+00   3.9061098e+00   4.1066170e+00   4.4095056e+00   4.7221364e+00   3.9082316e+00   3.4019453e+00   3.9014304e+00   4.4232188e+00   3.9139973e+00   3.8023591e+00   3.1057392e+00   3.7104219e+00   3.9150553e+00   3.4248402e+00   3.4064593e+00   4.2084919e+00   4.0172759e+00   3.5193527e+00   3.3100431e+00   3.5073655e+00   3.7133435e+00   3.4036743e+00   4.0004442e-01   5.0043084e-01   3.4085233e-01   8.0046764e-01   2.2573593e-01   4.0243965e-01   4.2362917e-01   1.2036925e+00   1.1896595e+00   8.0879776e-01   5.0000761e-01   1.1006371e+00   5.2133179e-01   8.0046685e-01   5.0437695e-01   4.0125062e-01   5.0477564e-01   5.0043084e-01   4.5148429e-01   4.0125062e-01   6.0000952e-01   6.0000317e-01   2.2608083e-01   3.0922892e-01   8.0000160e-01   7.4269314e-01   9.6572569e-01   3.4085233e-01   4.0246123e-01   9.0000136e-01   3.4085233e-01   4.0127250e-01   5.0001522e-01   4.0004442e-01   1.1000003e+00   2.2608083e-01   4.1317535e-01   5.7609230e-01   4.0122873e-01   5.2167829e-01   2.0061436e-01   7.0088627e-01   4.0004442e-01   3.3852404e+00   3.1245391e+00   3.5521657e+00   2.6057331e+00   3.2281303e+00   3.1021033e+00   3.3145497e+00   1.9088256e+00   3.2358110e+00   2.5040476e+00   2.1337832e+00   2.8091158e+00   2.6173653e+00   3.3068237e+00   2.2078368e+00   3.0635687e+00   3.1029264e+00   2.7045714e+00   3.1156892e+00   2.5038387e+00   3.4072735e+00   2.6199287e+00   3.5105217e+00   3.3061800e+00   2.9316687e+00   3.0488379e+00   3.4462681e+00   3.6292576e+00   3.1074604e+00   2.1103491e+00   2.4046650e+00   2.3052527e+00   2.5074705e+00   3.7037846e+00   3.1023805e+00   3.1087156e+00   3.3416864e+00   3.0212423e+00   2.7029308e+00   2.6036513e+00   3.0012006e+00   3.2078939e+00   2.6064541e+00   1.9145304e+00   2.8026114e+00   2.8028068e+00   2.8033825e+00   2.9167099e+00   1.6147493e+00   2.7040740e+00   4.6133719e+00   3.7058811e+00   4.5290217e+00   4.2056470e+00   4.4115634e+00   5.2381327e+00   3.1057013e+00   4.9271590e+00   4.4118721e+00   4.7354168e+00   3.7201124e+00   3.9113698e+00   4.1247181e+00   3.6087856e+00   3.7244383e+00   3.9212835e+00   4.1101783e+00   5.3422962e+00   5.5362181e+00   3.6046999e+00   4.3279835e+00   3.5095358e+00   5.3412086e+00   3.5135120e+00   4.3162096e+00   4.6297141e+00   3.4124092e+00   3.5088081e+00   4.2105763e+00   4.4358170e+00   4.7408876e+00   5.0762364e+00   4.2125085e+00   3.7079173e+00   4.2021973e+00   4.7752666e+00   4.2166536e+00   4.1080028e+00   3.4084548e+00   4.0338654e+00   4.2256165e+00   3.7563734e+00   3.7058811e+00   4.5190617e+00   4.3264209e+00   3.8360186e+00   3.6136974e+00   3.8177300e+00   4.0156240e+00   3.7048582e+00   6.3164977e-01   3.0017653e-01   4.1209001e-01   2.0061436e-01   4.0127250e-01   7.0911112e-01   8.2458409e-01   1.0207396e+00   5.2201750e-01   1.2699992e-01   7.0470867e-01   4.0004442e-01   4.0122873e-01   3.0482299e-01   5.2167208e-01   3.0490481e-01   4.0122873e-01   4.0002221e-01   2.0061436e-01   2.0061436e-01   2.0061436e-01   3.0482299e-01   3.0482299e-01   4.0122873e-01   7.0008584e-01   8.0879701e-01   3.0017653e-01   3.0474106e-01   5.0043084e-01   3.0017653e-01   6.0964597e-01   1.0000000e-01   2.0121983e-01   1.1019599e+00   6.0035305e-01   4.0004442e-01   4.5148429e-01   4.0127250e-01   4.0004442e-01   4.0125062e-01   3.3808272e-01   1.1269424e-01   3.2369541e+00   3.0101869e+00   3.4219340e+00   2.5073576e+00   3.1113295e+00   3.0016913e+00   3.2074921e+00   1.8128536e+00   3.1127326e+00   2.4076937e+00   2.0429861e+00   2.7074657e+00   2.5087337e+00   3.2029987e+00   2.1087640e+00   2.9250474e+00   3.0040848e+00   2.6011837e+00   3.0090716e+00   2.4029250e+00   3.3087901e+00   2.5074281e+00   3.4046875e+00   3.2018065e+00   2.8107271e+00   2.9185950e+00   3.3183094e+00   3.5134617e+00   3.0049285e+00   2.0041542e+00   2.3049133e+00   2.2050331e+00   2.4035997e+00   3.6030023e+00   3.0040438e+00   3.0070658e+00   3.2168317e+00   2.9083216e+00   2.6031436e+00   2.5048522e+00   2.9013423e+00   3.1034810e+00   2.5032729e+00   1.8201043e+00   2.7028014e+00   2.7016556e+00   2.7027522e+00   2.8056775e+00   1.5256523e+00   2.6033557e+00   4.5162553e+00   3.6081006e+00   4.4160732e+00   4.1039121e+00   4.3103378e+00   5.1203327e+00   3.0096880e+00   4.8129366e+00   4.3058720e+00   4.6249088e+00   3.6148619e+00   3.8081633e+00   4.0157626e+00   3.5129206e+00   3.6349703e+00   3.8226858e+00   4.0057080e+00   5.2232912e+00   5.4204287e+00   3.5035589e+00   4.2200398e+00   3.4145570e+00   5.2217206e+00   3.4096180e+00   4.2110197e+00   4.5140458e+00   3.3101076e+00   3.4081996e+00   4.1095117e+00   4.3161641e+00   4.6204721e+00   4.9419857e+00   4.1123051e+00   3.6033860e+00   4.1009647e+00   4.6434791e+00   4.1197833e+00   4.0049425e+00   3.3090452e+00   3.9205015e+00   4.1230798e+00   3.6413278e+00   3.6081006e+00   4.4145323e+00   4.2254713e+00   3.7302938e+00   3.5112285e+00   3.7130507e+00   3.9190472e+00   3.6058055e+00   5.0043842e-01   1.0426513e+00   5.2167208e-01   4.0004442e-01   3.0026460e-01   1.4542931e+00   1.5965783e+00   1.1269511e+00   7.4262964e-01   1.3253871e+00   9.3306807e-01   1.0032293e+00   8.5406674e-01   7.0470720e-01   7.0633229e-01   5.7608844e-01   6.0017982e-01   6.3192325e-01   8.2418071e-01   8.0879625e-01   3.4080442e-01   4.0243965e-01   1.0030871e+00   1.2189645e+00   1.3741465e+00   5.0043842e-01   6.0201716e-01   1.1055705e+00   5.0043842e-01   1.1269424e-01   7.1621748e-01   6.7616902e-01   6.0000952e-01   3.0008832e-01   6.8170466e-01   9.3735629e-01   4.0004442e-01   9.3308853e-01   3.0474106e-01   9.6572569e-01   6.0948212e-01   3.4311880e+00   3.1440065e+00   3.5828092e+00   2.6061623e+00   3.2490712e+00   3.1047537e+00   3.3265679e+00   1.9024467e+00   3.2610547e+00   2.5066443e+00   2.1042326e+00   2.8182771e+00   2.6268573e+00   3.3136174e+00   2.2177383e+00   3.1042292e+00   3.1056084e+00   2.7106185e+00   3.1258664e+00   2.5072166e+00   3.4123850e+00   2.6397031e+00   3.5191318e+00   3.3125861e+00   2.9569988e+00   3.0825000e+00   3.4750557e+00   3.6484459e+00   3.1148203e+00   2.1231535e+00   2.4058952e+00   2.3063814e+00   2.5167763e+00   3.7071732e+00   3.1042001e+00   3.1166462e+00   3.3690976e+00   3.0370401e+00   2.7067267e+00   2.6060811e+00   3.0024163e+00   3.2157547e+00   2.6139440e+00   1.9029771e+00   2.8056558e+00   2.8068283e+00   2.8077255e+00   2.9323793e+00   1.6119586e+00   2.7091848e+00   4.6187512e+00   3.7092298e+00   4.5442576e+00   4.2099019e+00   4.4180513e+00   5.2548586e+00   3.1079005e+00   4.9407795e+00   4.4195588e+00   4.7516511e+00   3.7329384e+00   3.9191954e+00   4.1389224e+00   3.6127211e+00   3.7328453e+00   3.9318950e+00   4.1174259e+00   5.3601143e+00   5.5513974e+00   3.6073242e+00   4.3425018e+00   3.5138357e+00   5.3586950e+00   3.5235095e+00   4.3257995e+00   4.6452056e+00   3.4217238e+00   3.5154314e+00   4.2169032e+00   4.4544908e+00   4.7602896e+00   5.1057502e+00   4.2193718e+00   3.7147036e+00   4.2043114e+00   4.8058872e+00   4.2239687e+00   4.1138950e+00   3.4146523e+00   4.0526593e+00   4.2382079e+00   3.7847403e+00   3.7092298e+00   4.5291248e+00   4.3385161e+00   3.8547029e+00   3.6228903e+00   3.8290678e+00   4.0228342e+00   3.7082809e+00   6.3164977e-01   3.0026460e-01   1.2085435e-01   6.0948506e-01   1.0143978e+00   1.3131369e+00   8.0928056e-01   4.0246123e-01   8.5409862e-01   7.0016860e-01   5.0477564e-01   6.0201716e-01   5.6595908e-01   4.0363334e-01   4.1212852e-01   1.2699992e-01   3.3818226e-01   4.1210927e-01   3.3818226e-01   2.0181667e-01   1.2085435e-01   5.0855077e-01   1.0001598e+00   1.1055707e+00   0.0000000e+00   3.0026460e-01   6.0964891e-01   0.0000000e+00   5.0043842e-01   3.0482299e-01   4.0246123e-01   8.0254500e-01   5.0043842e-01   5.2133802e-01   7.0556260e-01   2.0181667e-01   7.0008735e-01   3.0026460e-01   6.0948506e-01   2.0181667e-01   3.2490712e+00   3.0153168e+00   3.4297841e+00   2.5067523e+00   3.1166337e+00   3.0027816e+00   3.2112793e+00   1.8068048e+00   3.1183051e+00   2.4116924e+00   2.0138832e+00   2.7116615e+00   2.5059537e+00   3.2048192e+00   2.1144760e+00   2.9351753e+00   3.0063019e+00   2.6019122e+00   3.0106587e+00   2.4030297e+00   3.3125861e+00   2.5120719e+00   3.4068163e+00   3.2029877e+00   2.8162444e+00   2.9267417e+00   3.3252407e+00   3.5189464e+00   3.0077107e+00   2.0051350e+00   2.3037132e+00   2.2028146e+00   2.4058620e+00   3.6044981e+00   3.0062070e+00   3.0107283e+00   3.2237456e+00   2.9105093e+00   2.6052541e+00   2.5062865e+00   2.9018772e+00   3.1056084e+00   2.5048522e+00   1.8082911e+00   2.7043948e+00   2.7029415e+00   2.7046027e+00   2.8091099e+00   1.5248852e+00   2.6055127e+00   4.5209020e+00   3.6112573e+00   4.4212031e+00   4.1056541e+00   4.3138986e+00   5.1255338e+00   3.0133997e+00   4.8167235e+00   4.3081273e+00   4.6319211e+00   3.6205854e+00   3.8114965e+00   4.0212972e+00   3.5173798e+00   3.6449970e+00   3.8299342e+00   4.0081754e+00   5.2290121e+00   5.4254411e+00   3.5039202e+00   4.2264145e+00   3.4198378e+00   5.2270034e+00   3.4138008e+00   4.2149806e+00   4.5183778e+00   3.3145502e+00   3.4118179e+00   4.1129687e+00   4.3210760e+00   4.6261633e+00   4.9512603e+00   4.1165035e+00   3.6051692e+00   4.1014742e+00   4.6540056e+00   4.1257291e+00   4.0071257e+00   3.3129914e+00   3.9274863e+00   4.1301604e+00   3.6542046e+00   3.6112573e+00   4.4192311e+00   4.2328883e+00   3.7399948e+00   3.5155767e+00   3.7180846e+00   3.9250546e+00   3.6083191e+00   6.0184622e-01   7.4263078e-01   1.1138955e+00   4.2268438e-01   7.0096708e-01   2.4170870e-01   3.0490481e-01   3.0490481e-01   3.0017653e-01   3.0474106e-01   3.0474106e-01   8.0879701e-01   4.2362917e-01   6.1119267e-01   7.0462697e-01   4.1317535e-01   2.2538848e-01   3.0482299e-01   7.1621748e-01   6.7616723e-01   3.0474106e-01   4.0125062e-01   5.0001522e-01   6.3164977e-01   5.2491131e-01   2.2573593e-01   6.3164977e-01   1.0207396e+00   3.3808272e-01   4.0246123e-01   1.4180463e+00   1.0030868e+00   4.5148429e-01   4.1317535e-01   7.4263078e-01   3.0017653e-01   8.0879701e-01   1.0000000e-01   4.5078948e-01   3.2116783e+00   3.0049285e+00   3.4072983e+00   2.5182898e+00   3.1051604e+00   3.0020136e+00   3.2049016e+00   1.8469618e+00   3.1036832e+00   2.4099081e+00   2.1180493e+00   2.7068820e+00   2.5224740e+00   3.2021231e+00   2.1097449e+00   2.9077617e+00   3.0041462e+00   2.6022422e+00   3.0134290e+00   2.4087504e+00   3.3085101e+00   2.5050799e+00   3.4038679e+00   3.2010814e+00   2.8036959e+00   2.9060895e+00   3.3058271e+00   3.5063866e+00   3.0043212e+00   2.0122773e+00   2.3159426e+00   2.2186306e+00   2.4051454e+00   3.6029749e+00   3.0041461e+00   3.0062373e+00   3.2059465e+00   2.9096170e+00   2.6032656e+00   2.5097004e+00   2.9028411e+00   3.1023606e+00   2.5057847e+00   1.8685354e+00   2.7039990e+00   2.7016498e+00   2.7029428e+00   2.8028074e+00   1.5747520e+00   2.6039937e+00   4.5157550e+00   3.6083209e+00   4.4088451e+00   4.1031691e+00   4.3089952e+00   5.1095334e+00   3.0117336e+00   4.8052574e+00   4.3035619e+00   4.6175091e+00   3.6116958e+00   3.8067089e+00   4.0107159e+00   3.5138361e+00   3.6350483e+00   3.8210210e+00   4.0037985e+00   5.2113565e+00   5.4105254e+00   3.5063553e+00   4.2147222e+00   3.4147657e+00   5.2097995e+00   3.4081036e+00   4.2080425e+00   4.5057296e+00   3.3089414e+00   3.4074852e+00   4.1084282e+00   4.3058539e+00   4.6088153e+00   4.9193995e+00   4.1112251e+00   3.6020843e+00   4.1009356e+00   4.6223848e+00   4.1190046e+00   4.0036188e+00   3.3085886e+00   3.9129256e+00   4.1197933e+00   3.6305006e+00   3.6083209e+00   4.4113183e+00   4.2225427e+00   3.7249938e+00   3.5105217e+00   3.7103007e+00   3.9184088e+00   3.6056580e+00   4.0125062e-01   5.7609230e-01   1.0095367e+00   1.0776296e+00   6.3322667e-01   3.0490481e-01   9.0140221e-01   4.1212852e-01   6.0000317e-01   3.4085233e-01   6.0035305e-01   3.3818226e-01   3.0000000e-01   4.0122873e-01   2.2538848e-01   4.0004442e-01   4.0122873e-01   2.0061436e-01   3.0000000e-01   6.0017982e-01   7.0462844e-01   8.5406616e-01   3.0026460e-01   4.0243965e-01   7.0088477e-01   3.0026460e-01   4.5783248e-01   3.0008832e-01   3.0490481e-01   1.1002025e+00   4.1315633e-01   4.0125062e-01   4.2362917e-01   4.0125062e-01   4.1209001e-01   2.4170870e-01   5.0436965e-01   2.2573593e-01   3.1712557e+00   2.9203034e+00   3.3425817e+00   2.4092081e+00   3.0228582e+00   2.9024211e+00   3.1131137e+00   1.7168003e+00   3.0276611e+00   2.3094323e+00   1.9540727e+00   2.6109956e+00   2.4153242e+00   3.1056218e+00   2.0123796e+00   2.8520945e+00   2.9050328e+00   2.5029614e+00   2.9148948e+00   2.3042831e+00   3.2109395e+00   2.4161682e+00   3.3086859e+00   3.1042389e+00   2.7244207e+00   2.8394157e+00   3.2369857e+00   3.4247142e+00   2.9077271e+00   1.9085444e+00   2.2064916e+00   2.1068047e+00   2.3066817e+00   3.5042241e+00   2.9048033e+00   2.9102290e+00   3.1338090e+00   2.8169587e+00   2.5042601e+00   2.4061715e+00   2.8017212e+00   3.0065627e+00   2.4058322e+00   1.7261843e+00   2.6037439e+00   2.6027120e+00   2.6040234e+00   2.7127458e+00   1.4350761e+00   2.5049231e+00   4.4189015e+00   3.5095669e+00   4.3257995e+00   4.0057109e+00   4.2135057e+00   5.0324952e+00   2.9113810e+00   4.7221382e+00   4.2099962e+00   4.5353918e+00   3.5215862e+00   3.7118930e+00   3.9240025e+00   3.4150232e+00   3.5401623e+00   3.7282910e+00   3.9092259e+00   5.1365012e+00   5.3314853e+00   3.4049933e+00   4.1286955e+00   3.3168890e+00   5.1347989e+00   3.3143385e+00   4.1161770e+00   4.4243750e+00   3.2143454e+00   3.3110189e+00   4.0125032e+00   4.2289520e+00   4.5343227e+00   4.8661173e+00   4.0156353e+00   3.5063553e+00   4.0017163e+00   4.5675364e+00   4.0235140e+00   3.9076272e+00   3.2116700e+00   3.8321139e+00   4.0301570e+00   3.5598557e+00   3.5095669e+00   4.3201293e+00   4.1322798e+00   3.6413292e+00   3.4157005e+00   3.6188994e+00   3.8226858e+00   3.5071409e+00   5.0436235e-01   1.1269511e+00   1.4180734e+00   9.1446938e-01   5.0476836e-01   9.6593231e-01   8.0051115e-01   6.1119558e-01   7.0176271e-01   6.0964891e-01   4.3213914e-01   5.2133179e-01   2.2573593e-01   4.1420960e-01   5.2133802e-01   4.5078948e-01   2.2608083e-01   2.0121983e-01   6.1119558e-01   1.1005364e+00   1.2089192e+00   1.2085435e-01   2.4195741e-01   7.1621884e-01   1.2085435e-01   4.0004442e-01   4.1212852e-01   5.0085236e-01   7.0096858e-01   4.0127250e-01   5.6394820e-01   8.0967961e-01   2.0000000e-01   8.0051115e-01   2.2573593e-01   7.1621884e-01   3.0482299e-01   3.3545239e+00   3.1166331e+00   3.5333785e+00   2.6054739e+00   3.2183845e+00   3.1025789e+00   3.3116521e+00   1.9046783e+00   3.2211369e+00   2.5096353e+00   2.1074907e+00   2.8107054e+00   2.6064541e+00   3.3051050e+00   2.2121875e+00   3.0393610e+00   3.1054994e+00   2.7022579e+00   3.1107490e+00   2.5027328e+00   3.4112739e+00   2.6129479e+00   3.5073688e+00   3.3035252e+00   2.9185900e+00   3.0300451e+00   3.4286400e+00   3.6205854e+00   3.1074470e+00   2.1053074e+00   2.4030297e+00   2.3022754e+00   2.5057763e+00   3.7043108e+00   3.1053329e+00   3.1100313e+00   3.3265652e+00   3.0118276e+00   2.7046025e+00   2.6052853e+00   3.0016501e+00   3.2059133e+00   2.6047974e+00   1.9052628e+00   2.8038694e+00   2.8028007e+00   2.8041967e+00   2.9102290e+00   1.6179159e+00   2.7049931e+00   4.6192199e+00   3.7100254e+00   4.5225779e+00   4.2056438e+00   4.4133506e+00   5.2278849e+00   3.1114444e+00   4.9186970e+00   4.4088300e+00   4.7323336e+00   3.7201124e+00   3.9113387e+00   4.1217116e+00   3.6152935e+00   3.7397620e+00   3.9276515e+00   4.1085246e+00   5.3314853e+00   5.5274937e+00   3.6037456e+00   4.3264210e+00   3.5173586e+00   5.3296471e+00   3.5134601e+00   4.3151165e+00   4.6204664e+00   3.4137985e+00   3.5110031e+00   4.2123903e+00   4.4237218e+00   4.7288133e+00   5.0555470e+00   4.2155430e+00   3.7056457e+00   4.2016096e+00   4.7574592e+00   4.2235569e+00   4.1072664e+00   3.4118179e+00   4.0283196e+00   4.2288238e+00   3.7532858e+00   3.7100254e+00   4.5190617e+00   4.3311362e+00   3.8383398e+00   3.6148683e+00   3.8177286e+00   4.0227665e+00   3.7075359e+00   1.5237054e+00   1.5778323e+00   1.1528553e+00   8.0928056e-01   1.4109657e+00   9.0296858e-01   1.1060939e+00   8.5617086e-01   6.0184934e-01   8.2671175e-01   8.1112984e-01   7.1621748e-01   7.2113820e-01   9.0642722e-01   9.0166476e-01   5.2167829e-01   5.6347978e-01   1.1011719e+00   1.1531951e+00   1.3523685e+00   6.0948506e-01   7.0008735e-01   1.2012929e+00   6.0948506e-01   2.0121983e-01   8.0488008e-01   7.1636719e-01   7.0025283e-01   2.2608083e-01   7.4418186e-01   9.6702272e-01   5.0476836e-01   9.0657583e-01   3.4085233e-01   1.0214933e+00   7.0176271e-01   3.7102713e+00   3.4382051e+00   3.8712380e+00   2.9060895e+00   3.5425492e+00   3.4047913e+00   3.6240078e+00   2.2025238e+00   3.5521653e+00   2.8062729e+00   2.4042873e+00   3.1166330e+00   2.9229849e+00   3.6127194e+00   2.5155829e+00   3.3866455e+00   3.4056098e+00   3.0096888e+00   3.4232171e+00   2.8068501e+00   3.7118528e+00   2.9335034e+00   3.8176417e+00   3.6116893e+00   3.2480452e+00   3.3690976e+00   3.7643838e+00   3.9429243e+00   3.4137984e+00   2.4191998e+00   2.7057317e+00   2.6060678e+00   2.8148779e+00   4.0071259e+00   3.4042418e+00   3.4154455e+00   3.6592943e+00   3.3320889e+00   3.0065584e+00   2.9059779e+00   3.3025806e+00   3.5145393e+00   2.9126049e+00   2.2031052e+00   3.1056091e+00   3.1065947e+00   3.1074470e+00   3.2280982e+00   1.9100994e+00   3.0087060e+00   4.9179684e+00   4.0090033e+00   4.8406432e+00   4.5097222e+00   4.7173415e+00   5.5505575e+00   3.4073974e+00   5.2376127e+00   4.7184838e+00   5.0477042e+00   4.0301568e+00   4.2181242e+00   4.4357103e+00   3.9120615e+00   4.0296437e+00   4.2295175e+00   4.4165186e+00   5.6553854e+00   5.8478137e+00   3.9072483e+00   4.6391758e+00   3.8129545e+00   5.6540008e+00   3.8217034e+00   4.6242406e+00   4.9412981e+00   3.7201124e+00   3.8146271e+00   4.5162248e+00   4.7490801e+00   5.0547228e+00   5.3951639e+00   4.5184830e+00   4.0138270e+00   4.5043856e+00   5.0949990e+00   4.5225786e+00   4.4133506e+00   3.7138970e+00   4.3475342e+00   4.5353918e+00   4.0747727e+00   4.0090033e+00   4.8274110e+00   4.6357670e+00   4.1493188e+00   3.9212879e+00   4.1268500e+00   4.3214438e+00   4.0081754e+00   4.1317535e-01   4.0127250e-01   7.1629303e-01   5.0043842e-01   7.0096858e-01   6.3912709e-01   7.0184453e-01   1.2003596e+00   7.9871893e-01   1.0286506e+00   1.0433442e+00   8.2635069e-01   6.3309012e-01   6.7626502e-01   1.1286016e+00   1.0782105e+00   6.1135434e-01   6.0184934e-01   3.0915245e-01   1.0143978e+00   9.0155393e-01   5.0436965e-01   1.0143978e+00   1.4324323e+00   7.4329414e-01   8.0879776e-01   1.7570482e+00   1.4092511e+00   8.1343016e-01   7.8895472e-01   1.1269511e+00   7.0470720e-01   1.2189701e+00   5.0855077e-01   8.5406616e-01   3.5025396e+00   3.3027388e+00   3.7022129e+00   2.8281704e+00   3.4036672e+00   3.3025779e+00   3.5030234e+00   2.1725076e+00   3.4018155e+00   2.7109019e+00   2.4518621e+00   3.0049127e+00   2.8364042e+00   3.5019450e+00   2.4088882e+00   3.2025657e+00   3.3031143e+00   2.9050277e+00   3.3192099e+00   2.7159616e+00   3.6057054e+00   2.8056568e+00   3.7048624e+00   3.5016345e+00   3.1026586e+00   3.2026875e+00   3.6024856e+00   3.8034160e+00   3.3035252e+00   2.3226028e+00   2.6270968e+00   2.5319718e+00   2.7081195e+00   3.9029099e+00   3.3031170e+00   3.3039553e+00   3.5023855e+00   3.2150432e+00   2.9028412e+00   2.8148779e+00   3.2051933e+00   3.4018781e+00   2.8098127e+00   2.1974660e+00   3.0055598e+00   3.0017653e+00   3.0030650e+00   3.1026235e+00   1.9002712e+00   2.9047832e+00   4.8115512e+00   3.9065683e+00   4.7047990e+00   4.4023911e+00   4.6064349e+00   5.4038141e+00   3.3119500e+00   5.1019028e+00   4.6029848e+00   4.9110422e+00   3.9076509e+00   4.1051819e+00   4.3067850e+00   3.8114951e+00   3.9246405e+00   4.1145310e+00   4.3025710e+00   5.5046681e+00   5.7049556e+00   3.8098343e+00   4.5095384e+00   3.7106240e+00   5.5035834e+00   3.7063915e+00   4.5052925e+00   4.8020893e+00   3.6066590e+00   3.7052383e+00   4.4062090e+00   4.6017113e+00   4.9033376e+00   5.2065497e+00   4.4082090e+00   3.9018737e+00   4.4013937e+00   4.9097097e+00   4.4135256e+00   4.3024877e+00   3.6059708e+00   4.2076410e+00   4.4136664e+00   3.9189006e+00   3.9065683e+00   4.7076752e+00   4.5157700e+00   4.0166034e+00   3.8091065e+00   4.0069397e+00   4.2129114e+00   3.9040721e+00   5.0476836e-01   9.1422402e-01   6.0017982e-01   6.7616723e-01   1.0001903e+00   7.4262850e-01   1.1298636e+00   1.1055799e+00   1.0782211e+00   1.4043036e+00   1.0207260e+00   9.0508712e-01   1.0030871e+00   1.2632996e+00   1.3253497e+00   1.0001598e+00   5.0855077e-01   2.4195741e-01   1.3131369e+00   1.2089895e+00   9.0007572e-01   1.3131369e+00   1.5263518e+00   1.0087393e+00   9.3308891e-01   2.1138769e+00   1.4140515e+00   9.3308891e-01   6.8160885e-01   1.4180436e+00   6.7626681e-01   1.3018145e+00   7.0470720e-01   1.1133986e+00   3.2054626e+00   3.0041787e+00   3.4044439e+00   2.6382589e+00   3.1129223e+00   3.0138245e+00   3.2030205e+00   2.1566438e+00   3.1086927e+00   2.4554557e+00   2.5269479e+00   2.7127202e+00   2.6737930e+00   3.2074207e+00   2.1510232e+00   2.9068053e+00   3.0077106e+00   2.6369414e+00   3.0816280e+00   2.4971338e+00   3.3055260e+00   2.5325155e+00   3.4206210e+00   3.2100081e+00   2.8135926e+00   2.9088609e+00   3.3100014e+00   3.5053029e+00   3.0107283e+00   2.1554609e+00   2.4508792e+00   2.3794578e+00   2.4537333e+00   3.6090037e+00   3.0077114e+00   3.0034200e+00   3.2047284e+00   2.9729700e+00   2.6131590e+00   2.5821442e+00   2.9309340e+00   3.1060464e+00   2.5610212e+00   2.2285414e+00   2.7317035e+00   2.7106184e+00   2.7159615e+00   2.8134622e+00   1.9767345e+00   2.6270952e+00   4.5095106e+00   3.6117736e+00   4.4050179e+00   4.1034650e+00   4.3058769e+00   5.1048430e+00   3.0395885e+00   4.8030341e+00   4.3077256e+00   4.6095748e+00   3.6067573e+00   3.8091370e+00   4.0067454e+00   3.5235094e+00   3.6257071e+00   3.8125141e+00   4.0031827e+00   5.2054101e+00   5.4066794e+00   3.5404367e+00   4.2082468e+00   3.4146523e+00   5.2054259e+00   3.4138230e+00   4.2042865e+00   4.5025743e+00   3.3123786e+00   3.4067938e+00   4.1072911e+00   4.3032007e+00   4.6053784e+00   4.9093646e+00   4.1089590e+00   3.6062594e+00   4.1061436e+00   4.6117560e+00   4.1111295e+00   4.0026055e+00   3.3078313e+00   3.9072844e+00   4.1120111e+00   3.6177796e+00   3.6117736e+00   4.4064445e+00   4.2133758e+00   3.7157992e+00   3.5215805e+00   3.7072609e+00   3.9105673e+00   3.6051689e+00   4.1212852e-01   4.1212852e-01   3.0490481e-01   5.2167208e-01   3.0915245e-01   8.0097499e-01   6.1119558e-01   6.9518117e-01   9.0168933e-01   5.2491131e-01   4.0363334e-01   5.0085236e-01   7.8940551e-01   8.2462252e-01   5.0042326e-01   3.1328089e-01   3.0490481e-01   8.0928056e-01   7.0470867e-01   4.0125062e-01   8.0928056e-01   1.0776294e+00   5.0517282e-01   4.5078948e-01   1.6096629e+00   1.0207396e+00   4.5847767e-01   6.0184622e-01   9.1422402e-01   3.4085233e-01   8.5406674e-01   2.4195741e-01   6.0964891e-01   3.4079041e+00   3.2018548e+00   3.6045966e+00   2.7227151e+00   3.3029106e+00   3.2014779e+00   3.4016816e+00   2.0608234e+00   3.3024690e+00   2.6067721e+00   2.3393392e+00   2.9023862e+00   2.7310942e+00   3.4010299e+00   2.3048574e+00   3.1044057e+00   3.2014774e+00   2.8036023e+00   3.2152055e+00   2.6124447e+00   3.5030234e+00   2.7035171e+00   3.6034258e+00   3.4010358e+00   3.0022434e+00   3.1033306e+00   3.5041120e+00   3.7031277e+00   3.2018065e+00   2.2177966e+00   2.5220687e+00   2.4265152e+00   2.6055197e+00   3.8016494e+00   3.2014773e+00   3.2019092e+00   3.4031881e+00   3.1122360e+00   2.8013347e+00   2.7110046e+00   3.1036553e+00   3.3009330e+00   2.7070770e+00   2.0855888e+00   2.9035486e+00   2.9008500e+00   2.9016034e+00   3.0016038e+00   1.7857124e+00   2.8028019e+00   4.7076061e+00   3.8037955e+00   4.6049801e+00   4.3013465e+00   4.5040960e+00   5.3068325e+00   3.2075036e+00   5.0037550e+00   4.5023523e+00   4.8096009e+00   3.8048551e+00   4.0031892e+00   4.2051335e+00   3.7071735e+00   3.8161632e+00   4.0093901e+00   4.2016368e+00   5.4081547e+00   5.6075434e+00   3.7075525e+00   4.4072835e+00   3.6062405e+00   5.4074634e+00   3.6038441e+00   4.4036959e+00   4.7038247e+00   3.5038075e+00   3.6028345e+00   4.3038299e+00   4.5042394e+00   4.8062731e+00   5.1150203e+00   4.3051629e+00   3.8011413e+00   4.3008955e+00   4.8153681e+00   4.3087925e+00   4.2014602e+00   3.5032125e+00   4.1063865e+00   4.3094598e+00   3.8146853e+00   3.8037955e+00   4.6054982e+00   4.4109814e+00   3.9115832e+00   3.7058197e+00   3.9043917e+00   4.1081838e+00   3.8021570e+00   6.0365948e-01   3.0008832e-01   3.3818226e-01   2.0121983e-01   5.2133802e-01   3.0915245e-01   5.0437695e-01   5.0043842e-01   2.0181667e-01   1.2085435e-01   1.2085435e-01   4.1317535e-01   4.1317535e-01   3.0026460e-01   6.0018299e-01   7.0462697e-01   4.0246123e-01   3.0490481e-01   4.0004442e-01   4.0246123e-01   7.1621884e-01   1.2085435e-01   1.1269424e-01   1.2036863e+00   7.0088627e-01   3.0482299e-01   5.0436965e-01   5.0436235e-01   3.0482299e-01   5.0436965e-01   2.2608083e-01   2.0121983e-01   3.3237063e+00   3.1056091e+00   3.5138377e+00   2.6067805e+00   3.2064817e+00   3.1008890e+00   3.3041599e+00   1.9144935e+00   3.2074507e+00   2.5042498e+00   2.1492024e+00   2.8038903e+00   2.6091437e+00   3.3015588e+00   2.2041706e+00   3.0148613e+00   3.1021975e+00   2.7007716e+00   3.1069083e+00   2.5027328e+00   3.4052051e+00   2.6037226e+00   3.5028446e+00   3.3009330e+00   2.9058292e+00   3.0107430e+00   3.4113341e+00   3.6081814e+00   3.1026177e+00   2.1035154e+00   2.4051766e+00   2.3058791e+00   2.5019964e+00   3.7017412e+00   3.1021847e+00   3.1038570e+00   3.3100818e+00   3.0059450e+00   2.7015162e+00   2.6035107e+00   3.0009631e+00   3.2017847e+00   2.6021247e+00   1.9231085e+00   2.8015882e+00   2.8007533e+00   2.8013565e+00   2.9028946e+00   1.6222582e+00   2.7017239e+00   4.6112605e+00   3.7050457e+00   4.5107898e+00   4.2023583e+00   4.4067851e+00   5.2146266e+00   3.1060428e+00   4.9089682e+00   4.4037570e+00   4.7173415e+00   3.7092301e+00   3.9050336e+00   4.1101936e+00   3.6083379e+00   3.7235997e+00   3.9149881e+00   4.1034584e+00   5.3169366e+00   5.5149065e+00   3.6029421e+00   4.3133953e+00   3.5091580e+00   5.3158283e+00   3.5057369e+00   4.3071174e+00   4.6095441e+00   3.4059695e+00   3.5048429e+00   4.2061215e+00   4.4109767e+00   4.7143113e+00   5.0310424e+00   4.2080636e+00   3.7018984e+00   4.2005765e+00   4.7313463e+00   4.2134002e+00   4.1029723e+00   3.4053426e+00   4.0133308e+00   4.2155438e+00   3.7272780e+00   3.7050457e+00   4.5097224e+00   4.3174320e+00   3.8199266e+00   3.6070223e+00   3.8081328e+00   4.0126677e+00   3.7034791e+00   6.0017665e-01   4.1210927e-01   6.0018299e-01   1.1133986e+00   6.3178534e-01   9.0142681e-01   8.5403486e-01   7.0462844e-01   5.0477564e-01   5.2491734e-01   1.0087252e+00   9.3306807e-01   4.1317535e-01   5.0517282e-01   4.1317535e-01   8.5409862e-01   7.5503094e-01   4.1317535e-01   8.5409862e-01   1.3133231e+00   6.0964891e-01   7.0548138e-01   1.5640758e+00   1.3027556e+00   7.0176271e-01   6.0017982e-01   9.6591433e-01   6.0000635e-01   1.1056693e+00   4.0127250e-01   7.1700909e-01   3.0056049e+00   2.8037508e+00   3.2038047e+00   2.3350905e+00   2.9043042e+00   2.8024566e+00   3.0040963e+00   1.7133143e+00   2.9021652e+00   2.2134864e+00   2.0299551e+00   2.5066443e+00   2.3464211e+00   3.0020171e+00   1.9120296e+00   2.7041827e+00   2.8038683e+00   2.4047867e+00   2.8219468e+00   2.2186306e+00   3.1079220e+00   2.3063026e+00   3.2048524e+00   3.0013665e+00   2.6029242e+00   2.7037323e+00   3.1033714e+00   3.3046348e+00   2.8041978e+00   1.8296471e+00   2.1344310e+00   2.0421601e+00   2.2088481e+00   3.4030563e+00   2.8038694e+00   2.8056176e+00   3.0035303e+00   2.7166861e+00   2.4032760e+00   2.3173405e+00   2.7049931e+00   2.9020943e+00   2.3107074e+00   1.7540491e+00   2.5057744e+00   2.5017294e+00   2.5032614e+00   2.6027348e+00   1.4738792e+00   2.4051328e+00   4.3150879e+00   3.4081972e+00   4.2065765e+00   3.9027794e+00   4.1082339e+00   4.9060122e+00   2.8144592e+00   4.6029848e+00   4.1031680e+00   4.4149701e+00   3.4105998e+00   3.6062867e+00   3.8091132e+00   3.3145497e+00   3.4354252e+00   3.6203140e+00   3.8031346e+00   5.0073650e+00   5.2071845e+00   3.3100796e+00   4.0129286e+00   3.2145637e+00   5.0059527e+00   3.2079238e+00   4.0069158e+00   4.3033003e+00   3.1086424e+00   3.2069551e+00   3.9078313e+00   4.1030253e+00   4.4053246e+00   4.7120702e+00   3.9105941e+00   3.4019027e+00   3.9011588e+00   4.4155733e+00   3.9183552e+00   3.8030509e+00   3.1080886e+00   3.7106642e+00   3.9186175e+00   3.4279064e+00   3.4081972e+00   4.2100505e+00   4.0214626e+00   3.5236480e+00   3.3110446e+00   3.5093262e+00   3.7177968e+00   3.4052047e+00   4.1317535e-01   1.1269424e-01   5.6371422e-01   5.0084481e-01   4.5784410e-01   8.0000239e-01   4.0006662e-01   3.0017653e-01   4.0006662e-01   6.0948800e-01   7.0088627e-01   4.1210927e-01   3.0482299e-01   4.5080200e-01   7.0016860e-01   6.0184934e-01   4.1317535e-01   7.0016860e-01   8.5406674e-01   4.0002221e-01   3.0482299e-01   1.5012719e+00   7.4269314e-01   3.3818226e-01   4.0002221e-01   8.0046685e-01   1.1269424e-01   6.3165225e-01   2.0121983e-01   5.0002283e-01   3.2274206e+00   3.0066036e+00   3.4159337e+00   2.5238518e+00   3.1081931e+00   3.0018108e+00   3.2048307e+00   1.8672243e+00   3.1090333e+00   2.4088880e+00   2.1557835e+00   2.7050009e+00   2.5327574e+00   3.2021240e+00   2.1075767e+00   2.9175658e+00   3.0027966e+00   2.6034860e+00   3.0173373e+00   2.4124132e+00   3.3060311e+00   2.5063233e+00   3.4049933e+00   3.2016467e+00   2.8074882e+00   2.9128790e+00   3.3135401e+00   3.5094636e+00   3.0034944e+00   2.0185049e+00   2.3226176e+00   2.2272636e+00   2.4061715e+00   3.6025233e+00   3.0027816e+00   3.0045159e+00   3.2117473e+00   2.9147768e+00   2.6022650e+00   2.5117111e+00   2.9035536e+00   3.1022707e+00   2.5074705e+00   1.8959538e+00   2.7040250e+00   2.7012715e+00   2.7023320e+00   2.8040244e+00   1.6015419e+00   2.6035923e+00   4.5125057e+00   3.6062867e+00   4.4120448e+00   4.1027436e+00   4.3076126e+00   5.1160601e+00   3.0101869e+00   4.8099407e+00   4.3047534e+00   4.6192050e+00   3.6105351e+00   3.8061121e+00   4.0115220e+00   3.5110245e+00   3.6271576e+00   3.8169672e+00   4.0039490e+00   5.2185416e+00   5.4163883e+00   3.5078417e+00   4.2149895e+00   3.4109302e+00   5.2173835e+00   3.4072913e+00   4.2079670e+00   4.5106052e+00   3.3073674e+00   3.4056857e+00   4.1070396e+00   4.3122866e+00   4.6159499e+00   4.9341410e+00   4.1092167e+00   3.6024856e+00   4.1011078e+00   4.6347105e+00   4.1150272e+00   4.0033723e+00   3.3063033e+00   3.9150644e+00   4.1174503e+00   3.6310621e+00   3.6062867e+00   4.4108290e+00   4.2194920e+00   3.7226812e+00   3.5095242e+00   3.7093173e+00   3.9142888e+00   3.6040604e+00   3.4342562e-01   8.5406616e-01   3.3813251e-01   6.0017665e-01   4.5078948e-01   4.0125062e-01   2.2573593e-01   3.0474106e-01   7.0008584e-01   6.0184622e-01   2.2538848e-01   7.0017011e-01   8.0046685e-01   5.0477564e-01   5.2167208e-01   4.0004442e-01   5.0477564e-01   1.0016896e+00   3.0474106e-01   4.5080200e-01   1.1531953e+00   1.0008617e+00   4.5080200e-01   4.1420960e-01   6.1119558e-01   4.1210927e-01   8.0051036e-01   3.0482299e-01   4.1210927e-01   3.0158412e+00   2.8068284e+00   3.2097099e+00   2.3108757e+00   2.9065890e+00   2.8022000e+00   3.0066661e+00   1.6225614e+00   2.9048017e+00   2.2116239e+00   1.8685354e+00   2.5096708e+00   2.3100354e+00   3.0026666e+00   1.9136652e+00   2.7108290e+00   2.8056165e+00   2.4010446e+00   2.8094419e+00   2.2042326e+00   3.1114445e+00   2.3060252e+00   3.2036636e+00   3.0010404e+00   2.6048201e+00   2.7083838e+00   3.1074856e+00   3.3083888e+00   2.8056953e+00   1.8055938e+00   2.1074903e+00   2.0078120e+00   2.2044098e+00   3.4034897e+00   2.8056164e+00   2.8086638e+00   3.0080453e+00   2.7058598e+00   2.4044765e+00   2.3071636e+00   2.7018643e+00   2.9031229e+00   2.3040302e+00   1.6345914e+00   2.5039390e+00   2.5021287e+00   2.5037126e+00   2.6035547e+00   1.3485963e+00   2.4045982e+00   4.3195471e+00   3.4105069e+00   4.2110205e+00   3.9039624e+00   4.1112641e+00   4.9115281e+00   2.8134622e+00   4.6064153e+00   4.1040152e+00   4.4216160e+00   3.4153329e+00   3.6083651e+00   3.8136432e+00   3.3170079e+00   3.4454804e+00   3.6271127e+00   3.8048208e+00   5.0136911e+00   5.2125102e+00   3.3041886e+00   4.0185527e+00   3.2193583e+00   5.0117789e+00   3.2102572e+00   4.0101485e+00   4.3071174e+00   3.1116727e+00   3.2099137e+00   3.9105756e+00   4.1073261e+00   4.4108290e+00   4.7236350e+00   3.9141183e+00   3.4025037e+00   3.9008223e+00   4.4275986e+00   3.9240716e+00   3.8046112e+00   3.1114731e+00   3.7165788e+00   3.9250546e+00   3.4397950e+00   3.4105069e+00   4.2141201e+00   4.0283725e+00   3.5323888e+00   3.3126331e+00   3.5133654e+00   3.7236064e+00   3.4073749e+00   5.6371422e-01   4.0125062e-01   4.2362917e-01   7.0008735e-01   3.0017653e-01   2.2573593e-01   3.0490481e-01   5.2167829e-01   6.0202028e-01   3.3808272e-01   4.1210927e-01   5.2167829e-01   6.0201716e-01   5.0477564e-01   4.0363334e-01   6.0201716e-01   7.8895472e-01   3.0474106e-01   2.2608083e-01   1.4017696e+00   7.1636719e-01   2.2608083e-01   4.0002221e-01   7.0088627e-01   2.0121983e-01   5.6371422e-01   2.2538848e-01   4.0127250e-01   3.2269400e+00   3.0055754e+00   3.4153574e+00   2.5158464e+00   3.1070003e+00   3.0010043e+00   3.2037264e+00   1.8447764e+00   3.1084925e+00   2.4051329e+00   2.1169795e+00   2.7031257e+00   2.5230194e+00   3.2014729e+00   2.1040690e+00   2.9167440e+00   3.0016616e+00   2.6020655e+00   3.0122358e+00   2.4077390e+00   3.3040889e+00   2.5044039e+00   3.4036241e+00   3.2011770e+00   2.8066054e+00   2.9119764e+00   3.3128842e+00   3.5083774e+00   3.0022542e+00   2.0112442e+00   2.3146813e+00   2.2178117e+00   2.4035997e+00   3.6016272e+00   3.0016466e+00   3.0030180e+00   3.2109724e+00   2.9107838e+00   2.6012056e+00   2.5072166e+00   2.9020943e+00   3.1016037e+00   2.5045154e+00   1.8665804e+00   2.7022828e+00   2.7006623e+00   2.7012715e+00   2.8031364e+00   1.5665127e+00   2.6019940e+00   4.5096473e+00   3.6042722e+00   4.4108394e+00   4.1020090e+00   4.3058539e+00   5.1154681e+00   3.0065585e+00   4.8095984e+00   4.3039464e+00   4.6166518e+00   3.6081814e+00   3.8045576e+00   4.0096177e+00   3.5076367e+00   3.6204901e+00   3.8129595e+00   4.0031500e+00   5.2178509e+00   5.4155855e+00   3.5053718e+00   4.2125027e+00   3.4076329e+00   5.2169557e+00   3.4052726e+00   4.2064771e+00   4.5101686e+00   3.3051940e+00   3.4039470e+00   4.1052782e+00   4.3120002e+00   4.6153660e+00   4.9336188e+00   4.1069501e+00   3.6018985e+00   4.1007374e+00   4.6331222e+00   4.1114855e+00   4.0025890e+00   3.3042986e+00   3.9129418e+00   4.1139050e+00   3.6259501e+00   3.6042722e+00   4.4088300e+00   4.2155438e+00   3.7181244e+00   3.5068261e+00   3.7072136e+00   3.9107458e+00   3.6027359e+00   7.1779518e-01   9.0005048e-01   6.8160885e-01   6.0980961e-01   6.3164977e-01   6.0964597e-01   6.0948506e-01   6.3178534e-01   8.0888055e-01   6.5712813e-01   9.1552331e-01   5.6595908e-01   4.5147187e-01   9.0026543e-01   5.6595908e-01   6.0201716e-01   5.6370994e-01   4.1212852e-01   1.3000455e+00   4.1315633e-01   6.1830764e-01   9.0511169e-01   6.0964891e-01   6.3178534e-01   4.5077696e-01   7.1621748e-01   4.5783248e-01   3.7510248e+00   3.5145413e+00   3.9319585e+00   3.0060350e+00   3.6168418e+00   3.5015800e+00   3.7092301e+00   2.3098782e+00   3.6209185e+00   2.9036019e+00   2.5319798e+00   3.2059465e+00   3.0125595e+00   3.7043511e+00   2.6050088e+00   3.4362995e+00   3.5023713e+00   3.1027850e+00   3.5112541e+00   2.9034027e+00   3.8056232e+00   3.0109656e+00   3.9070007e+00   3.7037948e+00   3.3177283e+00   3.4278716e+00   3.8279200e+00   4.0185639e+00   3.5049370e+00   2.5063489e+00   2.8048596e+00   2.7053910e+00   2.9045816e+00   4.1028806e+00   3.5020661e+00   3.5059137e+00   3.7249599e+00   3.4134555e+00   3.1021033e+00   3.0035422e+00   3.4012314e+00   3.6049329e+00   3.0042977e+00   2.3151346e+00   3.2021240e+00   3.2018065e+00   3.2023319e+00   3.3095196e+00   2.0139907e+00   3.1028259e+00   5.0111326e+00   4.1049446e+00   4.9203200e+00   4.6042055e+00   4.8089555e+00   5.6273643e+00   3.5051449e+00   5.3190012e+00   4.8083867e+00   5.1260178e+00   4.1140184e+00   4.3082037e+00   4.5172930e+00   4.0074572e+00   4.1195081e+00   4.3162103e+00   4.5071301e+00   5.7305902e+00   5.9266306e+00   4.0041352e+00   4.7202045e+00   3.9078680e+00   5.7295930e+00   3.9093593e+00   4.7117434e+00   5.0203874e+00   3.8087102e+00   3.9064537e+00   4.6081315e+00   4.8239967e+00   5.1282911e+00   5.4538016e+00   4.6097450e+00   4.1052255e+00   4.6016323e+00   5.1527860e+00   4.6133719e+00   4.5057296e+00   3.8063301e+00   4.4231469e+00   4.6192070e+00   4.1384491e+00   4.1049446e+00   4.9142249e+00   4.7202041e+00   4.2256252e+00   4.0099717e+00   4.2125085e+00   4.4124585e+00   4.1039188e+00   3.4085233e-01   3.3818226e-01   1.2699992e-01   3.0922892e-01   3.3818226e-01   4.1212852e-01   3.4085233e-01   3.0490481e-01   8.0250202e-01   9.0192695e-01   4.0363334e-01   5.0437695e-01   4.5847767e-01   4.0363334e-01   7.0633229e-01   3.0482299e-01   4.0246123e-01   1.0095513e+00   7.0548283e-01   2.0181667e-01   5.0043084e-01   3.6452132e-01   5.0436965e-01   5.0855778e-01   4.1420960e-01   3.3813251e-01   3.0360001e+00   2.8068283e+00   3.2199554e+00   2.3040302e+00   2.9083228e+00   2.8004229e+00   3.0040677e+00   1.6099792e+00   2.9111118e+00   2.2023225e+00   1.8444678e+00   2.5026969e+00   2.3072196e+00   3.0013665e+00   1.9023442e+00   2.7227152e+00   2.8012528e+00   2.4005053e+00   2.8054838e+00   2.2013444e+00   3.1036553e+00   2.3040711e+00   3.2026875e+00   3.0010106e+00   2.6084695e+00   2.7159628e+00   3.1166009e+00   3.3100796e+00   2.8019019e+00   1.8020058e+00   2.1029252e+00   2.0034861e+00   2.2011906e+00   3.4011297e+00   2.8012319e+00   2.8028007e+00   3.0142197e+00   2.7060544e+00   2.4007552e+00   2.3017471e+00   2.7003774e+00   2.9016034e+00   2.3011979e+00   1.6179000e+00   2.5007284e+00   2.5003793e+00   2.5007008e+00   2.6035320e+00   1.3154932e+00   2.4008859e+00   4.3091529e+00   3.4034897e+00   4.2123904e+00   3.9018704e+00   4.1056542e+00   4.9181670e+00   2.8038684e+00   4.6114520e+00   4.1039624e+00   4.4180514e+00   3.4084525e+00   3.6042874e+00   3.8104403e+00   3.3060311e+00   3.4198458e+00   3.6127194e+00   3.8032956e+00   5.0208687e+00   5.2178587e+00   3.3018328e+00   4.0133297e+00   3.2067991e+00   5.0200323e+00   3.2048524e+00   4.0067585e+00   4.3122441e+00   3.1047671e+00   3.2036090e+00   3.9049697e+00   4.1148052e+00   4.4184267e+00   4.7404155e+00   3.9065727e+00   3.4018864e+00   3.9004186e+00   4.4392802e+00   3.9110280e+00   3.8025990e+00   3.1038577e+00   3.7145622e+00   3.9140895e+00   3.4287259e+00   3.4034897e+00   4.2090841e+00   4.0156240e+00   3.5189468e+00   3.3056781e+00   3.5073617e+00   3.7102604e+00   3.4023494e+00   4.1315633e-01   3.0915245e-01   4.5078948e-01   5.2132556e-01   3.0482299e-01   3.3808272e-01   6.0964597e-01   7.0911112e-01   8.6051414e-01   4.1212852e-01   7.0016860e-01   7.4262964e-01   4.1212852e-01   6.1830489e-01   4.1209001e-01   6.0018299e-01   1.1056693e+00   6.0964597e-01   4.1317535e-01   4.1315633e-01   5.2133179e-01   4.2268438e-01   5.0084481e-01   5.2491131e-01   5.0043084e-01   2.9115264e+00   2.6338022e+00   3.0658361e+00   2.1172959e+00   2.7373419e+00   2.6040822e+00   2.8212040e+00   1.4407364e+00   2.7450517e+00   2.0182279e+00   1.7116683e+00   2.3196029e+00   2.1285888e+00   2.8091316e+00   1.7264084e+00   2.5863714e+00   2.6084695e+00   2.2054529e+00   2.6248910e+00   2.0083311e+00   2.9174382e+00   2.1301354e+00   3.0136614e+00   2.8068911e+00   2.4421128e+00   2.5659281e+00   2.9581275e+00   3.1380442e+00   2.6129786e+00   1.6191482e+00   1.9129988e+00   1.8141046e+00   2.0129571e+00   3.2064817e+00   2.6080847e+00   2.6171503e+00   2.8540078e+00   2.5288353e+00   2.2078337e+00   2.1116321e+00   2.5029614e+00   2.7108347e+00   2.1109969e+00   1.4620239e+00   2.3067198e+00   2.3048725e+00   2.3072196e+00   2.4221911e+00   1.1960519e+00   2.2090466e+00   4.1263920e+00   3.2146438e+00   4.0362393e+00   3.7082866e+00   3.9191966e+00   4.7434452e+00   2.6190662e+00   4.4302264e+00   3.9142233e+00   4.2488425e+00   3.2328627e+00   3.4177609e+00   3.6349468e+00   3.1232336e+00   3.2606481e+00   3.4419771e+00   3.6135028e+00   4.8484858e+00   5.0414126e+00   3.1077602e+00   3.8409517e+00   3.0264502e+00   4.8462395e+00   3.0224855e+00   3.8231767e+00   4.1339850e+00   2.9228238e+00   3.0173096e+00   3.7181009e+00   3.9409635e+00   4.2473796e+00   4.5888422e+00   3.7226114e+00   3.2097424e+00   3.7024938e+00   4.2924779e+00   3.7339169e+00   3.6111693e+00   2.9185950e+00   3.5470876e+00   3.7434043e+00   3.2896416e+00   3.2146438e+00   4.0283196e+00   3.8460162e+00   3.3616756e+00   3.1242731e+00   3.3284650e+00   3.5333785e+00   3.2109426e+00   4.0122873e-01   5.0043084e-01   4.0243965e-01   3.0474106e-01   2.0061436e-01   4.5148429e-01   1.1000100e+00   1.2012928e+00   1.2699992e-01   4.0122873e-01   5.6595488e-01   1.2699992e-01   6.0184309e-01   4.0004442e-01   5.0436965e-01   7.1700909e-01   6.0201716e-01   5.2132556e-01   8.0051115e-01   2.2573593e-01   8.0000080e-01   4.0243965e-01   7.0088477e-01   3.0474106e-01   3.1428043e+00   2.9119661e+00   3.3252402e+00   2.4048325e+00   3.0131919e+00   2.9019362e+00   3.1087162e+00   1.7043719e+00   3.0148571e+00   2.3090280e+00   1.9099608e+00   2.6089255e+00   2.4039780e+00   3.1034773e+00   2.0109328e+00   2.8295063e+00   2.9047982e+00   2.5011632e+00   2.9079901e+00   2.3019339e+00   3.2101766e+00   2.4088882e+00   3.3051149e+00   3.1020645e+00   2.7127201e+00   2.8219255e+00   3.2211370e+00   3.4154432e+00   2.9057760e+00   1.9031964e+00   2.2023924e+00   2.1016800e+00   2.3040177e+00   3.5033831e+00   2.9047500e+00   2.9083094e+00   3.1195526e+00   2.8078790e+00   2.5037817e+00   2.4045555e+00   2.8012577e+00   3.0040677e+00   2.4032886e+00   1.7053664e+00   2.6031367e+00   2.6019751e+00   2.6032655e+00   2.7067267e+00   1.4186217e+00   2.5039390e+00   4.4180854e+00   3.5092124e+00   4.3179254e+00   4.0043989e+00   4.2115634e+00   5.0223341e+00   2.9108451e+00   4.7142986e+00   4.2064794e+00   4.5276385e+00   3.5169841e+00   3.7092301e+00   3.9177719e+00   3.4145764e+00   3.5398518e+00   3.7257231e+00   3.9064409e+00   5.1255523e+00   5.3223081e+00   3.4028319e+00   4.1224590e+00   3.3167394e+00   5.1238108e+00   3.3110167e+00   4.1123595e+00   4.4156295e+00   3.2116669e+00   3.3094499e+00   4.0106882e+00   4.2180724e+00   4.5227110e+00   4.8462592e+00   4.0138270e+00   3.5038530e+00   4.0010263e+00   4.5481710e+00   4.0222346e+00   3.9055783e+00   3.2104685e+00   3.8231767e+00   4.0259306e+00   3.5470873e+00   3.5092124e+00   4.3162096e+00   4.1285334e+00   3.6344358e+00   3.4126369e+00   3.6148618e+00   3.8215373e+00   3.5066394e+00   2.2608083e-01   2.4170870e-01   3.0915245e-01   3.0915245e-01   4.0002221e-01   7.0096858e-01   8.0888055e-01   3.3818226e-01   4.0243965e-01   5.0477564e-01   3.3818226e-01   6.1135434e-01   2.0121983e-01   3.0017653e-01   1.1020506e+00   6.0219099e-01   2.0061436e-01   4.1210927e-01   4.0246123e-01   4.0125062e-01   4.0363334e-01   3.4085233e-01   2.2573593e-01   3.1414744e+00   2.9090612e+00   3.3237063e+00   2.4058952e+00   3.0107723e+00   2.9007492e+00   3.1056084e+00   1.7139238e+00   3.0138400e+00   2.3035512e+00   1.9525301e+00   2.6040007e+00   2.4100386e+00   3.1020779e+00   2.0037730e+00   2.8273039e+00   2.9018637e+00   2.5009579e+00   2.9077468e+00   2.3022754e+00   3.2048985e+00   2.4059812e+00   3.3038272e+00   3.1015567e+00   2.7110304e+00   2.8196992e+00   3.2199879e+00   3.4126307e+00   2.9028597e+00   1.9035634e+00   2.2044603e+00   2.1052067e+00   2.3021298e+00   3.5016873e+00   2.9018153e+00   2.9040211e+00   3.1174676e+00   2.8083845e+00   2.5012694e+00   2.4028385e+00   2.8006965e+00   3.0024198e+00   2.4021168e+00   1.7233814e+00   2.6012647e+00   2.6007117e+00   2.6012056e+00   2.7050190e+00   1.4220898e+00   2.5015263e+00   4.4109742e+00   3.5045842e+00   4.3148937e+00   4.0025815e+00   4.2071337e+00   5.0208677e+00   2.9053047e+00   4.7134688e+00   4.2051335e+00   4.5213131e+00   3.5107904e+00   3.7056862e+00   3.9129303e+00   3.4076849e+00   3.5232606e+00   3.7154827e+00   3.9043905e+00   5.1238111e+00   5.3204854e+00   3.4027174e+00   4.1161770e+00   3.3085473e+00   5.1228006e+00   3.3065392e+00   4.1085246e+00   4.4144908e+00   3.2064337e+00   3.3048953e+00   4.0063737e+00   4.2173565e+00   4.5213359e+00   4.8449108e+00   4.0082529e+00   3.5026815e+00   4.0006690e+00   4.5442582e+00   4.0132894e+00   3.9035247e+00   3.2051958e+00   3.8177289e+00   4.0170262e+00   3.5340950e+00   3.5045842e+00   4.3111747e+00   4.1186693e+00   3.6228903e+00   3.4075338e+00   3.6094379e+00   3.8124787e+00   3.5031928e+00   1.1269424e-01   5.0436965e-01   4.5078948e-01   2.2573593e-01   6.0000317e-01   7.0088477e-01   4.1210927e-01   3.4080442e-01   3.0474106e-01   4.1210927e-01   8.0883841e-01   1.1269424e-01   2.2573593e-01   1.2089253e+00   8.0051036e-01   4.0125062e-01   4.1317535e-01   5.2133802e-01   3.0017653e-01   6.0184622e-01   2.0061436e-01   2.2573593e-01   3.2211375e+00   3.0065592e+00   3.4126307e+00   2.5097024e+00   3.1069750e+00   3.0016616e+00   3.2056674e+00   1.8201133e+00   3.1066333e+00   2.4080686e+00   2.0619186e+00   2.7068820e+00   2.5107632e+00   3.2022485e+00   2.1087015e+00   2.9137660e+00   3.0040552e+00   2.6010528e+00   3.0089164e+00   2.4039766e+00   3.3085605e+00   2.5050799e+00   3.4035383e+00   3.2010814e+00   2.8057187e+00   2.9102474e+00   3.3101488e+00   3.5088135e+00   3.0043212e+00   2.0051350e+00   2.3071665e+00   2.2078183e+00   2.4034084e+00   3.6027901e+00   3.0040510e+00   3.0064311e+00   3.2097125e+00   2.9065741e+00   2.6030847e+00   2.5057763e+00   2.9016034e+00   3.1025924e+00   2.5033702e+00   1.8310475e+00   2.7029487e+00   2.7015162e+00   2.7026433e+00   2.8034238e+00   1.5358653e+00   2.6032968e+00   4.5159027e+00   3.6080734e+00   4.4115652e+00   4.1033603e+00   4.3094200e+00   5.1138780e+00   3.0100866e+00   4.8082318e+00   4.3041941e+00   4.6203464e+00   3.6127197e+00   3.8070338e+00   4.0124958e+00   3.5130651e+00   3.6349183e+00   3.8215362e+00   4.0044029e+00   5.2162094e+00   5.4145184e+00   3.5039680e+00   4.2166537e+00   3.4145702e+00   5.2146334e+00   3.4083285e+00   4.2090727e+00   4.5089181e+00   3.3091123e+00   3.4076329e+00   4.1087140e+00   4.3098021e+00   4.6133860e+00   4.9287684e+00   4.1115100e+00   3.6023704e+00   4.1007820e+00   4.6309835e+00   4.1192351e+00   4.0040240e+00   3.3086516e+00   3.9156759e+00   4.1209257e+00   3.6344375e+00   3.6080734e+00   4.4124586e+00   4.2235561e+00   3.7268101e+00   3.5102374e+00   3.7111714e+00   3.9185866e+00   3.6056580e+00   5.0084481e-01   4.1315633e-01   2.2573593e-01   7.0000303e-01   8.0046605e-01   3.3818226e-01   2.4170870e-01   3.0017653e-01   3.3818226e-01   8.0245824e-01   1.1269424e-01   2.0181667e-01   1.1133897e+00   8.0004523e-01   4.0246123e-01   5.2167829e-01   4.5078948e-01   4.0125062e-01   6.0017665e-01   3.0017653e-01   2.0061436e-01   3.3182813e+00   3.1056085e+00   3.5110034e+00   2.6060742e+00   3.2059465e+00   3.1013637e+00   3.3048926e+00   1.9099680e+00   3.2056789e+00   2.5063346e+00   2.1344310e+00   2.8057704e+00   2.6059875e+00   3.3019214e+00   2.2068463e+00   3.0117188e+00   3.1034568e+00   2.7006623e+00   3.1063566e+00   2.5023073e+00   3.4074246e+00   2.6040822e+00   3.5028878e+00   3.3008913e+00   2.9048017e+00   3.0087102e+00   3.4087684e+00   3.6077011e+00   3.1036688e+00   2.1027637e+00   2.4039664e+00   2.3040177e+00   2.5024922e+00   3.7023994e+00   3.1034532e+00   3.1054994e+00   3.3083865e+00   3.0045919e+00   2.7025560e+00   2.6039937e+00   3.0011260e+00   3.2022183e+00   2.6023240e+00   1.9156198e+00   2.8022964e+00   2.8012577e+00   2.8021795e+00   2.9028597e+00   1.6190551e+00   2.7026433e+00   4.6143249e+00   3.7070367e+00   4.5103890e+00   4.2029881e+00   4.4084395e+00   5.2126509e+00   3.1082889e+00   4.9074567e+00   4.4036930e+00   4.7183734e+00   3.7111657e+00   3.9061763e+00   4.1111077e+00   3.6112621e+00   3.7306950e+00   3.9190472e+00   4.1039096e+00   5.3148048e+00   5.5132902e+00   3.6028435e+00   4.3148929e+00   3.5126667e+00   5.3133599e+00   3.5071916e+00   4.3081091e+00   4.6080296e+00   3.4078683e+00   3.5066415e+00   4.2077543e+00   4.4087821e+00   4.7120754e+00   5.0261502e+00   4.2102487e+00   3.7020547e+00   4.2006494e+00   4.7279956e+00   4.2171591e+00   4.1035746e+00   3.4074978e+00   4.0138994e+00   4.2186688e+00   3.7302926e+00   3.7070367e+00   4.5111938e+00   4.3210760e+00   3.8236433e+00   3.6087856e+00   3.8098356e+00   4.0164852e+00   3.7049593e+00   1.1269424e-01   7.0017011e-01   9.0506343e-01   1.0426636e+00   2.0181667e-01   4.1209001e-01   8.0093081e-01   2.0181667e-01   3.4080442e-01   4.0125062e-01   3.6259865e-01   9.0029064e-01   3.3808272e-01   4.2268438e-01   6.1135434e-01   2.2608083e-01   6.0948212e-01   2.0061436e-01   6.3164977e-01   3.0482299e-01   3.1902650e+00   2.9267417e+00   3.3545239e+00   2.4065479e+00   3.0300492e+00   2.9028462e+00   3.1166330e+00   1.7073273e+00   3.0369978e+00   2.3091363e+00   1.9242178e+00   2.6129479e+00   2.4148785e+00   3.1074477e+00   2.0138888e+00   2.8680310e+00   2.9053048e+00   2.5042875e+00   2.9165009e+00   2.3038195e+00   3.2116668e+00   2.4221589e+00   3.3110857e+00   3.1060464e+00   2.7333589e+00   2.8520935e+00   3.2480481e+00   3.4313924e+00   2.9094538e+00   1.9103596e+00   2.2042535e+00   2.1040084e+00   2.3086427e+00   3.5048916e+00   2.9048754e+00   2.9119661e+00   3.1440058e+00   2.8212158e+00   2.5048147e+00   2.4054865e+00   2.8016296e+00   3.0087060e+00   2.4071454e+00   1.7108740e+00   2.6040234e+00   2.6035022e+00   2.6047905e+00   2.7176633e+00   1.4222462e+00   2.5057847e+00   4.4195581e+00   3.5098289e+00   4.3311360e+00   4.0067587e+00   4.2149806e+00   5.0390074e+00   2.9109559e+00   4.7273232e+00   4.2124122e+00   4.5405876e+00   3.5250718e+00   3.7139027e+00   3.9284285e+00   3.4150426e+00   3.5404383e+00   3.7302923e+00   3.9113385e+00   5.1434691e+00   5.3373009e+00   3.4049076e+00   4.1330547e+00   3.3170101e+00   5.1417717e+00   3.3168869e+00   4.1189487e+00   4.4302240e+00   3.2165105e+00   3.3123688e+00   4.0139003e+00   4.2362095e+00   4.5418862e+00   4.8784553e+00   4.0170271e+00   3.5083268e+00   4.0022121e+00   4.5797332e+00   4.0245435e+00   3.9092247e+00   3.2127499e+00   3.8383398e+00   4.0332236e+00   3.5687055e+00   3.5098289e+00   4.3229228e+00   4.1350002e+00   3.6463113e+00   3.4177609e+00   3.6219569e+00   3.8236419e+00   3.5076152e+00   6.0202028e-01   1.0008471e+00   1.1133984e+00   1.2085435e-01   4.0125062e-01   7.0548138e-01   1.2085435e-01   4.1210927e-01   3.3813251e-01   4.1317535e-01   8.0093160e-01   4.1210927e-01   4.5147187e-01   7.0184453e-01   2.0121983e-01   7.0088326e-01   2.2573593e-01   6.3164977e-01   2.4170870e-01   3.1712556e+00   2.9203033e+00   3.3425812e+00   2.4054865e+00   3.0228150e+00   2.9023686e+00   3.1131138e+00   1.7053664e+00   3.0276460e+00   2.3090554e+00   1.9156198e+00   2.6109872e+00   2.4094445e+00   3.1056085e+00   2.0122722e+00   2.8520934e+00   2.9050277e+00   2.5027053e+00   2.9125192e+00   2.3027405e+00   3.2109394e+00   2.4160415e+00   3.3084146e+00   3.1042008e+00   2.7243956e+00   2.8394100e+00   3.2369546e+00   3.4247119e+00   2.9077087e+00   1.9065546e+00   2.2031052e+00   2.1025721e+00   2.3063026e+00   3.5041732e+00   2.9047982e+00   2.9102300e+00   3.1338083e+00   2.8152056e+00   2.5042498e+00   2.4049187e+00   2.8014068e+00   3.0065584e+00   2.4051787e+00   1.7073273e+00   2.6035320e+00   2.6027034e+00   2.6039922e+00   2.7127202e+00   1.4197348e+00   2.5048165e+00   4.4189015e+00   3.5095163e+00   4.3257988e+00   4.0057069e+00   4.2135049e+00   5.0324949e+00   2.9108796e+00   4.7221364e+00   4.2099109e+00   4.5353940e+00   3.5215862e+00   3.7118544e+00   3.9240013e+00   3.4147901e+00   3.5401421e+00   3.7282909e+00   3.9092247e+00   5.1365094e+00   5.3314710e+00   3.4038679e+00   4.1286955e+00   3.3168613e+00   5.1347955e+00   3.3142720e+00   4.1161770e+00   4.4243750e+00   3.2143132e+00   3.3110162e+00   4.0124921e+00   4.2289511e+00   4.5343165e+00   4.8661278e+00   4.0156242e+00   3.5063341e+00   4.0016595e+00   4.5675358e+00   4.0235142e+00   3.9076269e+00   3.2116668e+00   3.8321137e+00   4.0301568e+00   3.5598554e+00   3.5095163e+00   4.3201293e+00   4.1322798e+00   3.6413274e+00   3.4154677e+00   3.6188977e+00   3.8226861e+00   3.5071388e+00   7.0096708e-01   8.0004602e-01   5.0855077e-01   4.1420960e-01   2.2608083e-01   5.0855077e-01   1.0008768e+00   3.0474106e-01   4.0127250e-01   1.1527746e+00   1.0000457e+00   4.0127250e-01   4.5783248e-01   6.0948800e-01   4.1317535e-01   8.0008964e-01   3.0482299e-01   4.0127250e-01   3.2104685e+00   3.0024155e+00   3.4059092e+00   2.5048145e+00   3.1026586e+00   3.0005260e+00   3.2022151e+00   1.8108200e+00   3.1025924e+00   2.4028974e+00   2.0417688e+00   2.7025751e+00   2.5062865e+00   3.2007416e+00   2.1027376e+00   2.9057769e+00   3.0015388e+00   2.6003213e+00   3.0043084e+00   2.4017233e+00   3.3039365e+00   2.5015263e+00   3.4013673e+00   3.2002931e+00   2.8019179e+00   2.9040262e+00   3.3045112e+00   3.5038551e+00   3.0015958e+00   2.0020172e+00   2.3035509e+00   2.2041009e+00   2.4010446e+00   3.6011254e+00   3.0015387e+00   3.0025850e+00   3.2040849e+00   2.9029297e+00   2.6009614e+00   2.5022969e+00   2.9005699e+00   3.1008537e+00   2.5011717e+00   1.8179820e+00   2.7009799e+00   2.7004102e+00   2.7008225e+00   2.8010266e+00   1.5160787e+00   2.6010449e+00   4.5093548e+00   3.6039076e+00   4.4060847e+00   4.1014985e+00   4.3050076e+00   5.1081747e+00   3.0045274e+00   4.8044751e+00   4.3019076e+00   4.6117611e+00   3.6062405e+00   3.8032982e+00   4.0063634e+00   3.5066398e+00   3.6202705e+00   3.8119529e+00   4.0019489e+00   5.2097659e+00   5.4087506e+00   3.5019664e+00   4.2090727e+00   3.4073888e+00   5.2088330e+00   3.4037266e+00   4.2046087e+00   4.5046939e+00   3.3041077e+00   3.4034672e+00   4.1044794e+00   4.3051857e+00   4.6074982e+00   4.9181673e+00   4.1061528e+00   3.6008588e+00   4.1002763e+00   4.6187512e+00   4.1110303e+00   4.0017844e+00   3.3039580e+00   3.9080413e+00   4.1118167e+00   3.6188744e+00   3.6039076e+00   4.4067826e+00   4.2136946e+00   3.7147052e+00   3.5048712e+00   3.7054764e+00   3.9103830e+00   3.6025973e+00   3.0026460e-01   1.0001598e+00   9.0029064e-01   6.0202028e-01   1.0001598e+00   1.1281352e+00   7.0000303e-01   6.0052920e-01   1.8012962e+00   9.6574369e-01   6.3178782e-01   4.2270142e-01   1.1005460e+00   3.0026460e-01   9.1422402e-01   4.0004442e-01   8.0004602e-01   3.2225450e+00   3.0091788e+00   3.4142737e+00   2.5659206e+00   3.1121190e+00   3.0065741e+00   3.2080663e+00   1.9795481e+00   3.1095927e+00   2.4291135e+00   2.3151880e+00   2.7129011e+00   2.5826416e+00   3.2051685e+00   2.1273517e+00   2.9165009e+00   3.0077149e+00   2.6132476e+00   3.0422268e+00   2.4403272e+00   3.3124044e+00   2.5166989e+00   3.4115621e+00   3.2044340e+00   2.8105357e+00   2.9137358e+00   3.3135329e+00   3.5115123e+00   3.0089448e+00   2.0634477e+00   2.3669955e+00   2.2798676e+00   2.4222743e+00   3.6065353e+00   3.0077107e+00   3.0095641e+00   3.2119165e+00   2.9352117e+00   2.6080595e+00   2.5371436e+00   2.9126008e+00   3.1051604e+00   2.5254396e+00   2.0316239e+00   2.7143597e+00   2.7050980e+00   2.7084026e+00   2.8082597e+00   1.7626307e+00   2.6129786e+00   4.5202811e+00   3.6136284e+00   4.4137920e+00   4.1051791e+00   4.3125133e+00   5.1149745e+00   3.0264326e+00   4.8090821e+00   4.3074243e+00   4.6242424e+00   3.6169385e+00   3.8113313e+00   4.0160029e+00   3.5235168e+00   3.6464145e+00   3.8279938e+00   4.0062032e+00   5.2173409e+00   5.4162239e+00   3.5202520e+00   4.2206877e+00   3.4219359e+00   5.2156030e+00   3.4146242e+00   4.2116109e+00   4.5097900e+00   3.3150972e+00   3.4115327e+00   4.1123767e+00   4.3106068e+00   4.6148396e+00   4.9296764e+00   4.1159139e+00   3.6049049e+00   4.1030781e+00   4.6336876e+00   4.1247374e+00   4.0056652e+00   3.3131419e+00   3.9194404e+00   4.1265834e+00   3.6428011e+00   3.6136284e+00   4.4157045e+00   4.2295866e+00   3.7344540e+00   3.5196603e+00   3.7152542e+00   3.9242137e+00   3.6086340e+00   1.1055707e+00   1.0030868e+00   7.0000151e-01   1.1055707e+00   1.3018102e+00   8.0245824e-01   7.1621884e-01   1.9078389e+00   1.1896594e+00   7.2044167e-01   5.3943256e-01   1.2089192e+00   4.5147187e-01   1.0776188e+00   5.0043084e-01   9.0506254e-01   3.3079985e+00   3.1046072e+00   3.5056118e+00   2.6709345e+00   3.2081329e+00   3.1065948e+00   3.3043807e+00   2.0901204e+00   3.2052035e+00   2.5276373e+00   2.4267777e+00   2.8091158e+00   2.6904888e+00   3.3041886e+00   2.2241050e+00   3.0065909e+00   3.1056084e+00   2.7155799e+00   3.1440950e+00   2.5451785e+00   3.4078458e+00   2.6152930e+00   3.5111169e+00   3.3045112e+00   2.9070941e+00   3.0065909e+00   3.4069929e+00   3.6059670e+00   3.1068940e+00   2.1702441e+00   2.4737523e+00   2.3880607e+00   2.5238437e+00   3.7056514e+00   3.1056084e+00   3.1055129e+00   3.3051256e+00   3.0372254e+00   2.7067267e+00   2.6397031e+00   3.0142197e+00   3.2037566e+00   2.6278605e+00   2.1424915e+00   2.8148768e+00   2.8047553e+00   2.8077256e+00   2.9066659e+00   1.8682644e+00   2.7127202e+00   4.6142218e+00   3.7103348e+00   4.5074842e+00   4.2035307e+00   4.4083412e+00   5.2074280e+00   3.1239158e+00   4.9041928e+00   4.4055872e+00   4.7149533e+00   3.7103439e+00   3.9081758e+00   4.1095835e+00   3.6188977e+00   3.7328455e+00   3.9187196e+00   4.1037709e+00   5.3087451e+00   5.5089283e+00   3.6218973e+00   4.3127798e+00   3.5155554e+00   5.3076917e+00   3.5109043e+00   4.3070065e+00   4.6043043e+00   3.4107931e+00   3.5076367e+00   4.2085644e+00   4.4044360e+00   4.7071579e+00   5.0144130e+00   4.2110565e+00   3.7038321e+00   4.2031939e+00   4.7176313e+00   4.2169539e+00   4.1034568e+00   3.4087523e+00   4.0110693e+00   4.2176552e+00   3.7262659e+00   3.7103348e+00   4.5099841e+00   4.3199893e+00   3.8223318e+00   3.6159248e+00   3.8096375e+00   4.0163546e+00   3.7058422e+00   3.0026460e-01   6.0964891e-01   0.0000000e+00   5.0043842e-01   3.0482299e-01   4.0246123e-01   8.0254500e-01   5.0043842e-01   5.2133802e-01   7.0556260e-01   2.0181667e-01   7.0008735e-01   3.0026460e-01   6.0948506e-01   2.0181667e-01   3.2490712e+00   3.0153168e+00   3.4297841e+00   2.5067523e+00   3.1166337e+00   3.0027816e+00   3.2112793e+00   1.8068048e+00   3.1183051e+00   2.4116924e+00   2.0138832e+00   2.7116615e+00   2.5059537e+00   3.2048192e+00   2.1144760e+00   2.9351753e+00   3.0063019e+00   2.6019122e+00   3.0106587e+00   2.4030297e+00   3.3125861e+00   2.5120719e+00   3.4068163e+00   3.2029877e+00   2.8162444e+00   2.9267417e+00   3.3252407e+00   3.5189464e+00   3.0077107e+00   2.0051350e+00   2.3037132e+00   2.2028146e+00   2.4058620e+00   3.6044981e+00   3.0062070e+00   3.0107283e+00   3.2237456e+00   2.9105093e+00   2.6052541e+00   2.5062865e+00   2.9018772e+00   3.1056084e+00   2.5048522e+00   1.8082911e+00   2.7043948e+00   2.7029415e+00   2.7046027e+00   2.8091099e+00   1.5248852e+00   2.6055127e+00   4.5209020e+00   3.6112573e+00   4.4212031e+00   4.1056541e+00   4.3138986e+00   5.1255338e+00   3.0133997e+00   4.8167235e+00   4.3081273e+00   4.6319211e+00   3.6205854e+00   3.8114965e+00   4.0212972e+00   3.5173798e+00   3.6449970e+00   3.8299342e+00   4.0081754e+00   5.2290121e+00   5.4254411e+00   3.5039202e+00   4.2264145e+00   3.4198378e+00   5.2270034e+00   3.4138008e+00   4.2149806e+00   4.5183778e+00   3.3145502e+00   3.4118179e+00   4.1129687e+00   4.3210760e+00   4.6261633e+00   4.9512603e+00   4.1165035e+00   3.6051692e+00   4.1014742e+00   4.6540056e+00   4.1257291e+00   4.0071257e+00   3.3129914e+00   3.9274863e+00   4.1301604e+00   3.6542046e+00   3.6112573e+00   4.4192311e+00   4.2328883e+00   3.7399948e+00   3.5155767e+00   3.7180846e+00   3.9250546e+00   3.6083191e+00   5.0436965e-01   3.0026460e-01   6.0017982e-01   3.0482299e-01   3.0017653e-01   9.0506343e-01   6.0000317e-01   4.5783248e-01   7.4269314e-01   2.4195741e-01   6.0948506e-01   4.0122873e-01   5.0855077e-01   2.0061436e-01   3.5243030e+00   3.3064692e+00   3.7147036e+00   2.8028227e+00   3.4072759e+00   3.3010449e+00   3.5048841e+00   2.1026764e+00   3.4081977e+00   2.7042302e+00   2.3098753e+00   3.0045117e+00   2.8027924e+00   3.5019450e+00   2.4045982e+00   3.2157547e+00   3.3025861e+00   2.9005886e+00   3.3047156e+00   2.7010554e+00   3.6058037e+00   2.8042692e+00   3.7029937e+00   3.5011559e+00   3.1065954e+00   3.2116669e+00   3.6121048e+00   3.8091015e+00   3.3031148e+00   2.3014285e+00   2.6014645e+00   2.5011992e+00   2.7018905e+00   3.9020189e+00   3.3025600e+00   3.3044825e+00   3.5110031e+00   3.2044340e+00   2.9018587e+00   2.8023124e+00   3.2006932e+00   3.4022345e+00   2.8016296e+00   2.1039819e+00   3.0015958e+00   3.0009948e+00   3.0016466e+00   3.1034780e+00   1.8068049e+00   2.9019412e+00   4.8119571e+00   3.9055005e+00   4.7117433e+00   4.4027872e+00   4.6074923e+00   5.4154953e+00   3.3059205e+00   5.1096877e+00   4.6042055e+00   4.9184662e+00   3.9101579e+00   4.1056576e+00   4.3111747e+00   3.8086187e+00   3.9240074e+00   4.1158326e+00   4.3040379e+00   5.5178488e+00   5.7157885e+00   3.8018678e+00   4.5144444e+00   3.7097243e+00   5.5166376e+00   3.7063915e+00   4.5079295e+00   4.8103281e+00   3.6066590e+00   3.7054748e+00   4.4067833e+00   4.6117275e+00   4.9151622e+00   5.2317566e+00   4.4087821e+00   3.9022961e+00   4.4006562e+00   4.9323259e+00   4.4141504e+00   4.3034963e+00   3.6059708e+00   4.2144276e+00   4.4165186e+00   3.9284285e+00   3.9055005e+00   4.7106152e+00   4.5183778e+00   4.0209837e+00   3.8074712e+00   4.0090032e+00   4.2134002e+00   3.9039579e+00   6.0964891e-01   1.1019501e+00   4.0125062e-01   5.0000761e-01   1.2632947e+00   1.1001012e+00   5.2491131e-01   6.1135434e-01   7.1621884e-01   4.2268438e-01   9.0026543e-01   2.4170870e-01   5.0043084e-01   3.4064574e+00   3.2033141e+00   3.6042703e+00   2.7067267e+00   3.3031847e+00   3.2012079e+00   3.4035361e+00   2.0125822e+00   3.3019706e+00   2.6055127e+00   2.2404570e+00   2.9047685e+00   2.7070958e+00   3.4014441e+00   2.3056303e+00   3.1043374e+00   3.2029748e+00   2.8006755e+00   3.2059945e+00   2.6027034e+00   3.5064150e+00   2.7028014e+00   3.6021536e+00   3.4005708e+00   3.0020583e+00   3.1034908e+00   3.5031921e+00   3.7043162e+00   3.2030081e+00   2.2031888e+00   2.5048145e+00   2.4051640e+00   2.6022353e+00   3.8020808e+00   3.2029748e+00   3.2045605e+00   3.4036086e+00   3.1036832e+00   2.8021575e+00   2.7039988e+00   3.1011640e+00   3.3016475e+00   2.7022579e+00   2.0191796e+00   2.9020892e+00   2.9010579e+00   2.9018587e+00   3.0016913e+00   1.7203066e+00   2.8022905e+00   4.7127831e+00   3.8062227e+00   4.6064153e+00   4.3024456e+00   4.5071341e+00   5.3066177e+00   3.2074507e+00   5.0034627e+00   4.5024143e+00   4.8135231e+00   3.8088290e+00   4.0049892e+00   4.2080447e+00   3.7100251e+00   3.8270894e+00   4.0163858e+00   4.2028588e+00   5.4079977e+00   5.6075453e+00   3.7029588e+00   4.4113160e+00   3.6111044e+00   5.4066727e+00   3.6058057e+00   4.4062018e+00   4.7037812e+00   3.5065182e+00   3.6056307e+00   4.3065776e+00   4.5036239e+00   4.8058364e+00   5.1131156e+00   4.3088094e+00   3.8014142e+00   4.3005452e+00   4.8156922e+00   4.3151195e+00   4.2027764e+00   3.5064276e+00   4.1095026e+00   4.3155223e+00   3.8226872e+00   3.8062227e+00   4.6088777e+00   4.4178507e+00   3.9190516e+00   3.7073875e+00   3.9078043e+00   4.1144923e+00   3.8043348e+00   5.0043842e-01   3.0482299e-01   4.0246123e-01   8.0254500e-01   5.0043842e-01   5.2133802e-01   7.0556260e-01   2.0181667e-01   7.0008735e-01   3.0026460e-01   6.0948506e-01   2.0181667e-01   3.2490712e+00   3.0153168e+00   3.4297841e+00   2.5067523e+00   3.1166337e+00   3.0027816e+00   3.2112793e+00   1.8068048e+00   3.1183051e+00   2.4116924e+00   2.0138832e+00   2.7116615e+00   2.5059537e+00   3.2048192e+00   2.1144760e+00   2.9351753e+00   3.0063019e+00   2.6019122e+00   3.0106587e+00   2.4030297e+00   3.3125861e+00   2.5120719e+00   3.4068163e+00   3.2029877e+00   2.8162444e+00   2.9267417e+00   3.3252407e+00   3.5189464e+00   3.0077107e+00   2.0051350e+00   2.3037132e+00   2.2028146e+00   2.4058620e+00   3.6044981e+00   3.0062070e+00   3.0107283e+00   3.2237456e+00   2.9105093e+00   2.6052541e+00   2.5062865e+00   2.9018772e+00   3.1056084e+00   2.5048522e+00   1.8082911e+00   2.7043948e+00   2.7029415e+00   2.7046027e+00   2.8091099e+00   1.5248852e+00   2.6055127e+00   4.5209020e+00   3.6112573e+00   4.4212031e+00   4.1056541e+00   4.3138986e+00   5.1255338e+00   3.0133997e+00   4.8167235e+00   4.3081273e+00   4.6319211e+00   3.6205854e+00   3.8114965e+00   4.0212972e+00   3.5173798e+00   3.6449970e+00   3.8299342e+00   4.0081754e+00   5.2290121e+00   5.4254411e+00   3.5039202e+00   4.2264145e+00   3.4198378e+00   5.2270034e+00   3.4138008e+00   4.2149806e+00   4.5183778e+00   3.3145502e+00   3.4118179e+00   4.1129687e+00   4.3210760e+00   4.6261633e+00   4.9512603e+00   4.1165035e+00   3.6051692e+00   4.1014742e+00   4.6540056e+00   4.1257291e+00   4.0071257e+00   3.3129914e+00   3.9274863e+00   4.1301604e+00   3.6542046e+00   3.6112573e+00   4.4192311e+00   4.2328883e+00   3.7399948e+00   3.5155767e+00   3.7180846e+00   3.9250546e+00   3.6083191e+00   7.0470720e-01   6.3164977e-01   7.0000303e-01   2.0000000e-01   6.4049114e-01   8.7212232e-01   4.0004442e-01   8.5437440e-01   2.2573593e-01   9.3308853e-01   6.0184622e-01   3.5152865e+00   3.2379971e+00   3.6729302e+00   2.7052554e+00   3.3425813e+00   3.2040843e+00   3.4230889e+00   2.0021220e+00   3.3530528e+00   2.6055127e+00   2.2051638e+00   2.9154879e+00   2.7227228e+00   3.4118179e+00   2.3143923e+00   3.1902650e+00   3.2048191e+00   2.8089346e+00   3.2223766e+00   2.6060092e+00   3.5107904e+00   2.7333577e+00   3.6167495e+00   3.4109217e+00   3.0488339e+00   3.1712556e+00   3.5658221e+00   3.7426726e+00   3.2127498e+00   2.2186491e+00   2.5049231e+00   2.4052960e+00   2.6139440e+00   3.8063158e+00   3.2036084e+00   3.2143157e+00   3.4603347e+00   3.1318587e+00   2.8056557e+00   2.7050980e+00   3.1020681e+00   3.3136174e+00   2.7116685e+00   2.0027889e+00   2.9047842e+00   2.9057760e+00   2.9065359e+00   3.0276459e+00   1.7091578e+00   2.8077256e+00   4.7169309e+00   3.8081280e+00   4.6399369e+00   4.3088507e+00   4.5162248e+00   5.3501952e+00   3.2067991e+00   5.0370912e+00   4.5175831e+00   4.8468186e+00   3.8290678e+00   4.0170262e+00   4.2347722e+00   3.7111714e+00   3.8289857e+00   4.0283196e+00   4.2155430e+00   5.4550926e+00   5.6472422e+00   3.7064735e+00   4.4381718e+00   3.6121030e+00   5.4538016e+00   3.6205857e+00   4.4231445e+00   4.7408825e+00   3.5189464e+00   3.6135011e+00   4.3151164e+00   4.5490925e+00   4.8546830e+00   5.1966534e+00   4.3173271e+00   3.8129545e+00   4.3038527e+00   4.8962803e+00   4.3214438e+00   4.2123903e+00   3.5127693e+00   4.1469662e+00   4.3342207e+00   3.8751227e+00   3.8081280e+00   4.6262568e+00   4.4345825e+00   3.9485180e+00   3.7201181e+00   3.9257254e+00   4.1203162e+00   3.8072915e+00   2.0181667e-01   1.1055799e+00   7.0016860e-01   4.0006662e-01   4.5147187e-01   4.1212852e-01   4.0002221e-01   5.0043084e-01   3.0474106e-01   1.2085435e-01   3.2280983e+00   3.0080445e+00   3.4166801e+00   2.5073304e+00   3.1087541e+00   3.0016255e+00   3.2064005e+00   1.8128544e+00   3.1091921e+00   2.4076934e+00   2.0429861e+00   2.7070770e+00   2.5077793e+00   3.2025221e+00   2.1086021e+00   2.9185909e+00   3.0040552e+00   2.6009247e+00   3.0080768e+00   2.4028385e+00   3.3086417e+00   2.5058827e+00   3.4038679e+00   3.2013290e+00   2.8077473e+00   2.9137660e+00   3.3136458e+00   3.5107924e+00   3.0045274e+00   2.0036964e+00   2.3048725e+00   2.2049827e+00   2.4032211e+00   3.6028345e+00   3.0040403e+00   3.0066661e+00   3.2127504e+00   2.9065741e+00   2.6030847e+00   2.5048249e+00   2.9013288e+00   3.1029264e+00   2.5029614e+00   1.8201043e+00   2.7027522e+00   2.7015465e+00   2.7026433e+00   2.8042851e+00   1.5256523e+00   2.6032253e+00   4.5160443e+00   3.6080467e+00   4.4135519e+00   4.1035779e+00   4.3098000e+00   5.1168009e+00   3.0096881e+00   4.8103297e+00   4.3048676e+00   4.6223708e+00   3.6136097e+00   3.8074712e+00   4.0139003e+00   3.5128896e+00   3.6349183e+00   3.8220063e+00   4.0049433e+00   5.2194303e+00   5.4171979e+00   3.5033669e+00   4.2181241e+00   3.4145410e+00   5.2178541e+00   3.4088042e+00   4.2099019e+00   4.5111938e+00   3.3094784e+00   3.4078458e+00   4.1090316e+00   4.3126257e+00   4.6165627e+00   4.9348334e+00   4.1118265e+00   3.6027619e+00   4.1008192e+00   4.6366757e+00   4.1194553e+00   4.0043991e+00   3.3087928e+00   3.9177721e+00   4.1218428e+00   3.6374332e+00   3.6080467e+00   4.4133507e+00   4.2243717e+00   3.7282925e+00   3.5105217e+00   3.7119499e+00   3.9187675e+00   3.6057072e+00   1.2012865e+00   6.0184622e-01   3.3808272e-01   6.0184934e-01   5.0043084e-01   3.3818226e-01   4.1212852e-01   3.0922892e-01   2.0121983e-01   3.4273160e+00   3.2064011e+00   3.6161317e+00   2.7056828e+00   3.3075153e+00   3.2008118e+00   3.4044261e+00   2.0113827e+00   3.3090710e+00   2.6035236e+00   2.2398619e+00   2.9035670e+00   2.7083020e+00   3.4017079e+00   2.3034787e+00   3.1174706e+00   3.2019092e+00   2.8008297e+00   3.2066700e+00   2.6023240e+00   3.5046442e+00   2.7041827e+00   3.6031099e+00   3.4011658e+00   3.0071110e+00   3.1127326e+00   3.5134157e+00   3.7092355e+00   3.2025439e+00   2.2031052e+00   2.5042875e+00   2.4048325e+00   2.6019131e+00   3.8016620e+00   3.2018790e+00   3.2036084e+00   3.4118203e+00   3.1063566e+00   2.8013151e+00   2.7029498e+00   3.1008327e+00   3.3019518e+00   2.7019892e+00   2.0181988e+00   2.9013773e+00   2.9007142e+00   2.9012240e+00   3.0034647e+00   1.7168003e+00   2.8015399e+00   4.7103355e+00   3.8044833e+00   4.6117631e+00   4.3023732e+00   4.5065283e+00   5.3163061e+00   3.2051927e+00   5.0102923e+00   4.5041827e+00   4.8177760e+00   3.8091017e+00   4.0050028e+00   4.2105704e+00   3.7073402e+00   3.8208501e+00   4.0138272e+00   4.2036880e+00   5.4187310e+00   5.6164039e+00   3.7027275e+00   4.4135513e+00   3.6080195e+00   5.4177192e+00   3.6056365e+00   4.4072751e+00   4.7109359e+00   3.5056751e+00   3.6045028e+00   4.3058539e+00   4.5127175e+00   4.8161488e+00   5.1342237e+00   4.3075896e+00   3.8021528e+00   4.3006308e+00   4.8339900e+00   4.3122441e+00   4.2030792e+00   3.5048429e+00   4.1140184e+00   4.3148937e+00   3.8271256e+00   3.8044833e+00   4.6097143e+00   4.4165186e+00   3.9191998e+00   3.7067060e+00   3.9080455e+00   4.1114854e+00   3.8031381e+00   9.0000091e-01   1.2014191e+00   1.5025345e+00   7.0088477e-01   1.5012926e+00   9.0000136e-01   1.4092540e+00   1.0030724e+00   3.4932678e+00   3.2284356e+00   3.6579694e+00   2.7029237e+00   3.3320310e+00   3.2025221e+00   3.4171529e+00   2.0008116e+00   3.3407229e+00   2.6032740e+00   2.2005685e+00   2.9103582e+00   2.7153679e+00   3.4082220e+00   2.3087475e+00   3.1706684e+00   3.2030687e+00   2.8057704e+00   3.2157547e+00   2.6035236e+00   3.5075879e+00   2.7233837e+00   3.6121030e+00   3.4076329e+00   3.0364247e+00   3.1548602e+00   3.5517240e+00   3.7328844e+00   3.2086545e+00   2.2116271e+00   2.5026949e+00   2.4028972e+00   2.6089340e+00   3.8042764e+00   3.2022967e+00   3.2108192e+00   3.4468872e+00   3.1231713e+00   2.8035152e+00   2.7029238e+00   3.1011647e+00   3.3095196e+00   2.7074599e+00   2.0008921e+00   2.9028462e+00   2.9036791e+00   2.9040745e+00   3.0197997e+00   1.7043730e+00   2.8047771e+00   4.7130344e+00   3.8056232e+00   4.6318991e+00   4.3063824e+00   4.5121922e+00   5.3416858e+00   3.2045522e+00   5.0302179e+00   4.5134527e+00   4.8380714e+00   3.8218532e+00   4.0124930e+00   4.2269486e+00   3.7079008e+00   3.8220112e+00   4.0214147e+00   4.2115853e+00   5.4465234e+00   5.6393868e+00   3.7043105e+00   4.4299700e+00   3.6085945e+00   5.4449998e+00   3.6148636e+00   4.4178341e+00   4.7331065e+00   3.5134671e+00   3.6094821e+00   4.3111775e+00   4.5398308e+00   4.8449119e+00   5.1826640e+00   4.3129030e+00   3.8093617e+00   4.3026669e+00   4.8806417e+00   4.3164776e+00   4.2091204e+00   3.5088587e+00   4.1368711e+00   4.3264627e+00   3.8592376e+00   3.8056232e+00   4.6204067e+00   4.4269727e+00   3.9374314e+00   3.7145622e+00   3.9192263e+00   4.1154804e+00   3.8050056e+00   6.1288055e-01   7.7603846e-01   4.0127250e-01   7.4329414e-01   2.0061436e-01   9.0508712e-01   6.0000635e-01   3.5152864e+00   3.2379970e+00   3.6729302e+00   2.7058598e+00   3.3425838e+00   3.2040874e+00   3.4230885e+00   2.0034894e+00   3.3530533e+00   2.6055423e+00   2.2123846e+00   2.9154880e+00   2.7237438e+00   3.4118184e+00   2.3143951e+00   3.1902650e+00   3.2048192e+00   2.8089552e+00   3.2228316e+00   2.6061975e+00   3.5107904e+00   2.7333644e+00   3.6167885e+00   3.4109240e+00   3.0488346e+00   3.1712557e+00   3.5658240e+00   3.7426726e+00   3.2127504e+00   2.2188249e+00   2.5053901e+00   2.4058634e+00   2.6139732e+00   3.8063206e+00   3.2036085e+00   3.2143126e+00   3.4603347e+00   3.1321581e+00   2.8056558e+00   2.7052554e+00   3.1021033e+00   3.3136175e+00   2.7117356e+00   2.0053411e+00   2.9048017e+00   2.9057761e+00   2.9065368e+00   3.0276467e+00   1.7105814e+00   2.8077315e+00   4.7169308e+00   3.8081328e+00   4.6399369e+00   4.3088509e+00   4.5162248e+00   5.3501952e+00   3.2068686e+00   5.0370912e+00   4.5175965e+00   4.8468145e+00   3.8290678e+00   4.0170299e+00   4.2347722e+00   3.7112059e+00   3.8289870e+00   4.0283196e+00   4.2155430e+00   5.4550814e+00   5.6472442e+00   3.7067060e+00   4.4381718e+00   3.6121048e+00   5.4538018e+00   3.6205918e+00   4.4231444e+00   4.7408825e+00   3.5189484e+00   3.6135011e+00   4.3151171e+00   4.5490925e+00   4.8546834e+00   5.1966394e+00   4.3173279e+00   3.8129558e+00   4.3038600e+00   4.8962803e+00   4.3214431e+00   4.2123903e+00   3.5127694e+00   4.1469662e+00   4.3342207e+00   3.8751227e+00   3.8081328e+00   4.6262568e+00   4.4345823e+00   3.9485180e+00   3.7201522e+00   3.9257254e+00   4.1203153e+00   3.8072915e+00   3.4085233e-01   5.0517282e-01   4.1210927e-01   4.5847767e-01   4.1317535e-01   4.0243965e-01   3.1409605e+00   2.9078360e+00   3.3230621e+00   2.4077390e+00   3.0097979e+00   2.9003941e+00   3.1042002e+00   1.7227897e+00   3.0135090e+00   2.3017319e+00   1.9755996e+00   2.6019350e+00   2.4142039e+00   3.1015567e+00   2.0014192e+00   2.8264551e+00   2.9006366e+00   2.5011717e+00   2.9082658e+00   2.3033727e+00   3.2022157e+00   2.4051094e+00   3.3034165e+00   3.1014454e+00   2.7104802e+00   2.8188502e+00   3.2195779e+00   3.4112824e+00   2.9016560e+00   1.9053006e+00   2.2068965e+00   2.1085395e+00   2.3018945e+00   3.5009585e+00   2.9005880e+00   2.9020766e+00   3.1165913e+00   2.8092629e+00   2.5004154e+00   2.4029432e+00   2.8007533e+00   3.0017918e+00   2.4022355e+00   1.7369589e+00   2.6007937e+00   2.6003442e+00   2.6005344e+00   2.7044628e+00   1.4329832e+00   2.5008032e+00   4.4064393e+00   3.5021596e+00   4.3131639e+00   4.0016670e+00   4.2045223e+00   5.0200323e+00   2.9028411e+00   4.7130517e+00   4.2044861e+00   4.5172866e+00   3.5073617e+00   3.7038321e+00   3.9101623e+00   3.4039470e+00   3.5128093e+00   3.7092301e+00   3.9033549e+00   5.1227972e+00   5.3193887e+00   3.4029615e+00   4.1123595e+00   3.3040255e+00   5.1222477e+00   3.3043123e+00   4.1063328e+00   4.4139149e+00   3.2038047e+00   3.3025879e+00   4.0039164e+00   4.2170349e+00   4.5206139e+00   4.8441812e+00   4.0049702e+00   3.5022104e+00   4.0005674e+00   4.5418878e+00   4.0077003e+00   3.9024858e+00   3.2025221e+00   3.8146102e+00   4.0114630e+00   3.5261349e+00   3.5021596e+00   4.3081194e+00   4.1123594e+00   3.6158324e+00   3.4049076e+00   3.6064417e+00   3.8069566e+00   3.5014492e+00   8.0923926e-01   3.0474106e-01   6.5724028e-01   4.0246123e-01   5.6371422e-01   2.8500310e+00   2.6110761e+00   3.0277528e+00   2.1510447e+00   2.7141512e+00   2.6027937e+00   2.8070667e+00   1.5787180e+00   2.7167342e+00   2.0166118e+00   1.9318287e+00   2.3071806e+00   2.1715812e+00   2.8031215e+00   1.7145956e+00   2.5336675e+00   2.6035547e+00   2.2074446e+00   2.6319765e+00   2.0282636e+00   2.9076123e+00   2.1122780e+00   3.0080768e+00   2.8027924e+00   2.4144060e+00   2.5243969e+00   2.9241685e+00   3.1150226e+00   2.6049377e+00   1.6499744e+00   1.9530826e+00   1.8666228e+00   2.0130304e+00   3.2033374e+00   2.6035250e+00   2.6059866e+00   2.8207213e+00   2.5287261e+00   2.2032583e+00   2.1244184e+00   2.5066544e+00   2.7033232e+00   2.1157724e+00   1.6395342e+00   2.3072196e+00   2.3018945e+00   2.3035850e+00   2.4072314e+00   1.3788456e+00   2.2062031e+00   4.1150297e+00   3.2079717e+00   4.0170857e+00   3.7033716e+00   3.9093672e+00   4.7228082e+00   2.6158579e+00   4.4145659e+00   3.9067187e+00   4.2256164e+00   3.2143454e+00   3.4081069e+00   3.6159248e+00   3.1148584e+00   3.2358776e+00   3.4219579e+00   3.6052692e+00   4.8260874e+00   5.0225486e+00   3.1131211e+00   3.8201108e+00   3.0142352e+00   4.8248264e+00   3.0102191e+00   3.8104451e+00   4.1158426e+00   2.9100849e+00   3.0073054e+00   3.7087638e+00   3.9191144e+00   4.2237272e+00   4.5500784e+00   3.7114840e+00   3.2036323e+00   3.7015743e+00   4.2506870e+00   3.7186993e+00   3.6043148e+00   2.9081165e+00   3.5216379e+00   3.7226348e+00   3.2449757e+00   3.2079717e+00   4.0139105e+00   3.8249612e+00   3.3311289e+00   3.1134242e+00   3.3125194e+00   3.5179632e+00   3.2049019e+00   8.0051115e-01   2.2573593e-01   7.1621884e-01   3.0482299e-01   3.3530529e+00   3.1135637e+00   3.5317001e+00   2.6021962e+00   3.2157548e+00   3.1011640e+00   3.3083865e+00   1.9014069e+00   3.2199554e+00   2.5036852e+00   2.1054816e+00   2.8056557e+00   2.6057308e+00   3.3035252e+00   2.2049636e+00   3.0369970e+00   3.1023768e+00   2.7016498e+00   3.1076516e+00   2.5011992e+00   3.4059088e+00   2.6097152e+00   3.5056297e+00   3.3028597e+00   2.9166917e+00   3.0276459e+00   3.4273156e+00   3.6176286e+00   3.1043337e+00   2.1032882e+00   2.4011650e+00   2.3009622e+00   2.5032633e+00   3.7024058e+00   3.1022094e+00   3.1056121e+00   3.3243222e+00   3.0101957e+00   2.7018643e+00   2.6020065e+00   3.0005955e+00   3.2040843e+00   2.6027120e+00   1.9019962e+00   2.8015673e+00   2.8013346e+00   2.8018959e+00   2.9083044e+00   1.6052507e+00   2.7022567e+00   4.6121162e+00   3.7052383e+00   4.5194334e+00   4.2036849e+00   4.4088275e+00   5.2263180e+00   3.1053076e+00   4.9177739e+00   4.4072684e+00   4.7260117e+00   3.7138970e+00   3.9076272e+00   4.1167962e+00   3.6081590e+00   3.7238338e+00   3.9176170e+00   4.1063328e+00   5.3296625e+00   5.5255577e+00   3.6022190e+00   4.3201293e+00   3.5092121e+00   5.3285444e+00   3.5088064e+00   4.3111749e+00   4.6192198e+00   3.4084525e+00   3.5063337e+00   4.2079639e+00   4.4229098e+00   4.7273231e+00   5.0541259e+00   4.2099019e+00   3.7043105e+00   4.2011108e+00   4.7534769e+00   4.2147199e+00   4.1050714e+00   3.4064570e+00   4.0228303e+00   4.2200398e+00   3.7407842e+00   3.7052383e+00   4.5139612e+00   4.3214432e+00   3.8271242e+00   3.6094426e+00   3.8122429e+00   4.0138280e+00   3.7039439e+00   6.3178534e-01   2.0121983e-01   5.0043084e-01   3.1326249e+00   2.9095058e+00   3.3192760e+00   2.4306373e+00   3.0110559e+00   2.9028946e+00   3.1074604e+00   1.7872757e+00   3.0111989e+00   2.3143923e+00   2.0898615e+00   2.6089349e+00   2.4398792e+00   3.1033306e+00   2.0139907e+00   2.8220753e+00   2.9050462e+00   2.5045154e+00   2.9220490e+00   2.3159976e+00   3.2100379e+00   2.4095513e+00   3.3067017e+00   3.1022615e+00   2.7099669e+00   2.8165723e+00   3.2163877e+00   3.4125151e+00   2.9058641e+00   1.9245956e+00   2.2287984e+00   2.1344529e+00   2.3089795e+00   3.5039202e+00   2.9050287e+00   2.9078401e+00   3.1149135e+00   2.8183214e+00   2.5042875e+00   2.4160514e+00   2.8047612e+00   3.0036601e+00   2.4102273e+00   1.8223604e+00   2.6061038e+00   2.6023240e+00   2.6040822e+00   2.7058598e+00   1.5384093e+00   2.5058827e+00   4.4178532e+00   3.5098740e+00   4.3151587e+00   4.0041429e+00   4.2110099e+00   5.0184788e+00   2.9154880e+00   4.7114737e+00   4.2061525e+00   4.5248210e+00   3.5155767e+00   3.7089995e+00   3.9157422e+00   3.4167041e+00   3.5401921e+00   3.7249704e+00   3.9056466e+00   5.1213055e+00   5.3189433e+00   3.4098171e+00   4.1203252e+00   3.3172667e+00   5.1196436e+00   3.3110366e+00   4.1111102e+00   4.4124656e+00   3.2115770e+00   3.3091938e+00   4.0103680e+00   4.2141675e+00   4.5185015e+00   4.8383751e+00   4.0135080e+00   3.5035589e+00   4.0015001e+00   4.5406852e+00   4.0218666e+00   3.9049967e+00   3.2103515e+00   3.8201314e+00   4.0245707e+00   3.5427188e+00   3.5098740e+00   4.3149009e+00   4.1273075e+00   3.6322643e+00   3.4139979e+00   3.6137088e+00   3.8212216e+00   3.5066417e+00   7.1621748e-01   4.0002221e-01   3.3858048e+00   3.1257747e+00   3.5528332e+00   2.6049377e+00   3.2291581e+00   3.1026235e+00   3.3158954e+00   1.9043238e+00   3.2362541e+00   2.5062158e+00   2.1151984e+00   2.8111676e+00   2.6144115e+00   3.3074459e+00   2.2106051e+00   3.0644792e+00   3.1042002e+00   2.7046286e+00   3.1155579e+00   2.5035275e+00   3.4095576e+00   2.6210983e+00   3.5110555e+00   3.3064076e+00   2.9323802e+00   3.0497665e+00   3.4467650e+00   3.6304824e+00   3.1087162e+00   2.1099919e+00   2.4034951e+00   2.3034398e+00   2.5081992e+00   3.7045399e+00   3.1036554e+00   3.1105454e+00   3.3425812e+00   3.0208515e+00   2.7039990e+00   2.6042124e+00   3.0014077e+00   3.2086215e+00   2.6068616e+00   1.9064532e+00   2.8033825e+00   2.8033607e+00   2.8042643e+00   2.9174390e+00   1.6121856e+00   2.7050791e+00   4.6165570e+00   3.7079065e+00   4.5303834e+00   4.2064764e+00   4.4135512e+00   5.2388103e+00   3.1079784e+00   4.9275471e+00   4.4124760e+00   4.7382279e+00   3.7227931e+00   3.9129335e+00   4.1268500e+00   3.6117351e+00   3.7315577e+00   3.9257254e+00   4.1111068e+00   5.3430927e+00   5.5370582e+00   3.6046347e+00   4.3307527e+00   3.5130597e+00   5.3416790e+00   3.5154388e+00   4.3179254e+00   4.6302391e+00   3.4146546e+00   3.5107904e+00   4.2125004e+00   4.4361489e+00   4.7415152e+00   5.0768435e+00   4.2149814e+00   3.7084460e+00   4.2023583e+00   4.7769945e+00   4.2205945e+00   4.1089343e+00   3.4107328e+00   4.0362383e+00   4.2295174e+00   3.7618281e+00   3.7079065e+00   4.5213131e+00   4.3307527e+00   3.8409517e+00   3.6158715e+00   3.8200965e+00   4.0195882e+00   3.7063858e+00   4.1210927e-01   3.2157661e+00   3.0055754e+00   3.4095823e+00   2.5182899e+00   3.1060146e+00   3.0020171e+00   3.2051958e+00   1.8468437e+00   3.1049591e+00   2.4099079e+00   2.1180305e+00   2.7069308e+00   2.5226256e+00   3.2022186e+00   2.1097489e+00   2.9102819e+00   3.0041469e+00   2.6022650e+00   3.0136614e+00   2.4087525e+00   3.3085287e+00   2.5053901e+00   3.4040883e+00   3.2011770e+00   2.8045980e+00   2.9078384e+00   3.3077457e+00   3.5074140e+00   3.0043867e+00   2.0123013e+00   2.3159429e+00   2.2186309e+00   2.4051787e+00   3.6030023e+00   3.0041461e+00   3.0063027e+00   3.2075252e+00   2.9100849e+00   2.6032671e+00   2.5097006e+00   2.9028412e+00   3.1024718e+00   2.5058120e+00   1.8685011e+00   2.7040002e+00   2.7016556e+00   2.7029487e+00   2.8031364e+00   1.5747356e+00   2.6040007e+00   4.5158117e+00   3.6083256e+00   4.4100325e+00   4.1032589e+00   4.3091726e+00   5.1114855e+00   3.0117223e+00   4.8065772e+00   4.3039464e+00   4.6187506e+00   3.6121095e+00   3.8069169e+00   4.0114753e+00   3.5138377e+00   3.6350529e+00   3.8212252e+00   4.0040508e+00   5.2135438e+00   5.4123528e+00   3.5063866e+00   4.2155461e+00   3.4147661e+00   5.2119900e+00   3.4083227e+00   4.2084707e+00   4.5071259e+00   3.3090897e+00   3.4075560e+00   4.1085724e+00   4.3075896e+00   4.6108642e+00   4.9236635e+00   4.1113689e+00   3.6022523e+00   4.1009647e+00   4.6262707e+00   4.1190929e+00   4.0037820e+00   3.3086298e+00   3.9141023e+00   4.1202674e+00   3.6321858e+00   3.6083256e+00   4.4117993e+00   4.2229640e+00   3.7257625e+00   3.5107118e+00   3.7106642e+00   3.9184747e+00   3.6056703e+00   3.3320214e+00   3.1087156e+00   3.5191298e+00   2.6048201e+00   3.2097208e+00   3.1014199e+00   3.3064692e+00   1.9064149e+00   3.2109426e+00   2.5061784e+00   2.1231492e+00   2.8062729e+00   2.6052659e+00   3.3025806e+00   2.2069764e+00   3.0213628e+00   3.1034889e+00   2.7008785e+00   3.1069083e+00   2.5018386e+00   3.4076243e+00   2.6061038e+00   3.5039680e+00   3.3015400e+00   2.9090661e+00   3.0158419e+00   3.4158824e+00   3.6117739e+00   3.1042038e+00   2.1025721e+00   2.4028385e+00   2.3026344e+00   2.5028039e+00   3.7026090e+00   3.1034538e+00   3.1060427e+00   3.3145497e+00   3.0064351e+00   2.7026184e+00   2.6035547e+00   3.0010106e+00   3.2029877e+00   2.6024546e+00   1.9099608e+00   2.8022622e+00   2.8013859e+00   2.8022964e+00   2.9047883e+00   1.6144390e+00   2.7027522e+00   4.6146429e+00   3.7070840e+00   4.5144445e+00   4.2034836e+00   4.4092638e+00   5.2185417e+00   3.1080879e+00   4.9117250e+00   4.4052231e+00   4.7224998e+00   3.7130492e+00   3.9071930e+00   4.1140176e+00   3.6112039e+00   3.7307535e+00   3.9200662e+00   4.1050716e+00   5.3212806e+00   5.5187164e+00   3.6026912e+00   4.3179254e+00   3.5126721e+00   5.3198415e+00   3.5083463e+00   4.3098506e+00   4.6126508e+00   3.4087523e+00   3.5071392e+00   4.2084730e+00   4.4144909e+00   4.7184838e+00   5.0381916e+00   4.2109654e+00   3.7029588e+00   4.2008334e+00   4.7393168e+00   4.2176488e+00   4.1043916e+00   3.4078439e+00   4.0181863e+00   4.2205945e+00   3.7363783e+00   3.7070840e+00   4.5130589e+00   4.3227927e+00   3.8267268e+00   3.6097220e+00   3.8114954e+00   4.0168944e+00   3.7050916e+00   6.0017982e-01   2.0181667e-01   1.5160570e+00   5.2133802e-01   1.3002451e+00   7.0008584e-01   2.1344529e+00   4.1212852e-01   1.8029854e+00   2.0342311e+00   1.1019599e+00   1.1393620e+00   9.0026497e-01   1.4543172e+00   3.3813251e-01   1.4000061e+00   1.2053003e+00   1.0426638e+00   1.4134492e+00   1.1005364e+00   9.3424697e-01   7.8890806e-01   9.0142636e-01   6.1119558e-01   4.1315633e-01   4.0125062e-01   3.6452132e-01   1.0001753e+00   1.4158897e+00   1.5195166e+00   1.5300146e+00   1.2201636e+00   1.0039209e+00   1.6000032e+00   1.0000457e+00   3.0017653e-01   9.3329055e-01   1.4017696e+00   1.5061610e+00   1.5012947e+00   9.0002570e-01   1.2124837e+00   2.0445123e+00   1.4012283e+00   1.3008855e+00   1.3009222e+00   8.0291749e-01   2.0440118e+00   1.3027556e+00   1.3788457e+00   1.2029161e+00   1.2089253e+00   9.3446811e-01   1.1298636e+00   1.9014076e+00   2.1006232e+00   1.6001224e+00   1.1139906e+00   1.4544336e+00   6.3912709e-01   7.1183012e-01   8.5409862e-01   1.3086191e+00   1.2638465e+00   9.2745734e-01   8.1117067e-01   2.0027889e+00   2.2028146e+00   1.1270327e+00   1.0776190e+00   1.4019372e+00   2.0011307e+00   7.2044167e-01   1.0208709e+00   1.3002450e+00   8.0488008e-01   9.0145141e-01   9.4622126e-01   1.1000289e+00   1.4009513e+00   1.7086186e+00   9.7694377e-01   7.0911112e-01   1.0224133e+00   1.4220925e+00   1.0923537e+00   8.2631334e-01   1.0008620e+00   7.8886139e-01   1.0777307e+00   9.0140221e-01   1.2029161e+00   1.2362755e+00   1.1897289e+00   9.0534502e-01   7.9871893e-01   6.5724028e-01   9.8998705e-01   1.1010807e+00   5.2133179e-01   1.0171340e+00   4.0004442e-01   7.0470720e-01   2.0181667e-01   1.5698091e+00   3.0922892e-01   1.2049541e+00   1.5104875e+00   5.0476836e-01   1.0069214e+00   3.4085233e-01   9.6593231e-01   3.0026460e-01   8.0004443e-01   6.6334810e-01   1.0000152e+00   8.7372177e-01   5.0855077e-01   5.2524663e-01   7.0462697e-01   4.2362917e-01   3.0915245e-01   2.2608083e-01   4.5784410e-01   5.0517282e-01   4.1209001e-01   1.0313359e+00   9.9085945e-01   1.0179856e+00   6.9600743e-01   6.3912943e-01   1.0000152e+00   4.0125062e-01   3.0482299e-01   9.0002615e-01   8.0254500e-01   9.3735629e-01   9.1446938e-01   3.0490481e-01   6.9600743e-01   1.4994060e+00   8.0928056e-01   7.0184453e-01   7.0184453e-01   3.1328089e-01   1.5989637e+00   7.0918894e-01   1.5237054e+00   6.9987517e-01   1.4060443e+00   1.1002025e+00   1.3061181e+00   2.1141220e+00   1.5030978e+00   1.8055480e+00   1.3062025e+00   1.6223413e+00   6.3164977e-01   8.1112909e-01   1.0095513e+00   8.0713433e-01   9.2867113e-01   9.0155393e-01   1.0001753e+00   2.2182690e+00   2.4124980e+00   1.0039060e+00   1.2201577e+00   8.1343016e-01   2.2176846e+00   5.2491734e-01   1.2037520e+00   1.5066999e+00   4.2362917e-01   4.2362917e-01   1.1060937e+00   1.3130978e+00   1.6177611e+00   1.9760242e+00   1.1138953e+00   6.0948506e-01   1.1056693e+00   1.6779798e+00   1.1527746e+00   1.0001601e+00   4.2362917e-01   9.1892454e-01   1.1528477e+00   8.3183672e-01   6.9987517e-01   1.4094144e+00   1.2633467e+00   8.5440680e-01   7.2036951e-01   7.1629303e-01   9.6576136e-01   6.3322667e-01   1.4267554e+00   4.2268438e-01   1.2004262e+00   6.0035621e-01   2.0860325e+00   3.4342562e-01   1.7133162e+00   1.9641993e+00   1.0207260e+00   1.0897469e+00   8.0008964e-01   1.4650300e+00   5.0043084e-01   1.3002407e+00   1.1303267e+00   9.3424659e-01   1.3473688e+00   1.0001604e+00   9.6593231e-01   6.7616545e-01   8.0097499e-01   6.3192325e-01   5.0437695e-01   3.0026460e-01   2.2608083e-01   9.0142636e-01   1.4861824e+00   1.4580174e+00   1.4889602e+00   1.1900969e+00   9.0142681e-01   1.5001212e+00   9.0166476e-01   2.2538848e-01   8.3187290e-01   1.3130978e+00   1.4197078e+00   1.4012600e+00   8.0046764e-01   1.1544060e+00   2.0075255e+00   1.3063533e+00   1.2089835e+00   1.2089313e+00   7.4275547e-01   2.0887699e+00   1.2190319e+00   1.1935069e+00   1.1010807e+00   1.0087396e+00   7.4335736e-01   9.3424697e-01   1.7023957e+00   2.0003507e+00   1.4002035e+00   9.1449234e-01   1.2643523e+00   5.2167829e-01   5.5450500e-01   6.7616902e-01   1.2049541e+00   1.1528553e+00   8.1112984e-01   6.1119558e-01   1.8053679e+00   2.0034894e+00   1.0142484e+00   9.0155438e-01   1.3009222e+00   1.8029948e+00   6.1119267e-01   8.2425704e-01   1.1002025e+00   7.0176271e-01   8.0046685e-01   7.5564478e-01   9.0026588e-01   1.2017042e+00   1.5269837e+00   7.9871893e-01   6.0201716e-01   8.6051471e-01   1.2366099e+00   9.4532171e-01   6.3309012e-01   9.0026588e-01   6.3164729e-01   9.3308853e-01   8.0004443e-01   1.1010807e+00   1.0426516e+00   1.0426760e+00   8.0051115e-01   6.8161057e-01   5.2491734e-01   8.6084272e-01   1.0001753e+00   1.0116865e+00   5.6370994e-01   1.0599087e+00   7.4329527e-01   1.1110092e+00   4.1212852e-01   5.6838732e-01   7.0478886e-01   5.0436965e-01   7.7598796e-01   6.0948506e-01   1.2192920e+00   7.1629303e-01   4.2270142e-01   7.1629303e-01   2.2608083e-01   9.7033357e-01   6.3164729e-01   9.6576136e-01   7.5503094e-01   9.1446896e-01   1.1138955e+00   1.3139296e+00   1.2705641e+00   6.5724028e-01   5.0894102e-01   2.2573593e-01   3.3813251e-01   4.1212852e-01   1.1025819e+00   7.1629303e-01   1.1039833e+00   1.2272550e+00   8.0245746e-01   7.0000303e-01   2.0000000e-01   4.1210927e-01   7.7598796e-01   3.3813251e-01   7.1700774e-01   4.0125062e-01   7.0017011e-01   6.0035305e-01   7.4329414e-01   1.0008768e+00   5.0043084e-01   2.0249458e+00   1.1061923e+00   2.0081838e+00   1.6061519e+00   1.8167511e+00   2.7171724e+00   6.3925756e-01   2.3875202e+00   1.8286180e+00   2.2239101e+00   1.2353587e+00   1.3278587e+00   1.6038059e+00   1.0207533e+00   1.2407946e+00   1.3868868e+00   1.5269837e+00   2.8396169e+00   2.9941208e+00   1.0030871e+00   1.8005082e+00   9.3733589e-01   2.8269381e+00   9.7033357e-01   1.7520952e+00   2.1193712e+00   8.6676847e-01   9.4912864e-01   1.6147493e+00   1.9768316e+00   2.2674825e+00   2.7199050e+00   1.6193612e+00   1.1298636e+00   1.6009488e+00   2.4288142e+00   1.6617386e+00   1.5199103e+00   8.6676847e-01   1.5881447e+00   1.6785116e+00   1.4886759e+00   1.1061923e+00   1.9457481e+00   1.7813291e+00   1.3946348e+00   1.0498347e+00   1.2771155e+00   1.4848797e+00   1.1157320e+00   8.0004523e-01   5.0043842e-01   1.6743483e+00   2.0121983e-01   1.3061139e+00   1.5464046e+00   6.0964597e-01   7.1183012e-01   4.0006662e-01   1.0776296e+00   3.0922892e-01   9.0002570e-01   7.3084171e-01   6.0184622e-01   9.3446811e-01   6.1135434e-01   6.0964597e-01   3.4080442e-01   4.1210927e-01   3.0490481e-01   2.2608083e-01   3.0482299e-01   4.0363334e-01   5.0001522e-01   1.1298636e+00   1.0440350e+00   1.0803561e+00   7.8935898e-01   5.6347978e-01   1.1000098e+00   6.3165225e-01   3.0482299e-01   5.0126466e-01   9.0511169e-01   1.0088926e+00   1.0001903e+00   4.0125062e-01   7.4335736e-01   1.5972311e+00   9.0142681e-01   8.0296037e-01   8.0250202e-01   3.4085233e-01   1.7081446e+00   8.0883841e-01   1.4329858e+00   7.2036951e-01   1.3050153e+00   1.0001753e+00   1.2089252e+00   2.0109333e+00   1.6000184e+00   1.7036944e+00   1.2001396e+00   1.5327217e+00   5.7608844e-01   7.0462844e-01   9.1449234e-01   8.1156529e-01   9.3733552e-01   8.5583415e-01   9.0029018e-01   2.1191883e+00   2.3098756e+00   6.3912709e-01   1.1290757e+00   9.0532049e-01   2.1139617e+00   3.4085233e-01   1.1074834e+00   1.4044980e+00   3.4080442e-01   4.2362917e-01   1.0087250e+00   1.2089253e+00   1.5132032e+00   1.8748226e+00   1.0207260e+00   5.0042326e-01   1.0008620e+00   1.5694554e+00   1.0837679e+00   9.0053003e-01   5.0517282e-01   8.2671175e-01   1.0777411e+00   8.1156529e-01   7.2036951e-01   1.3133662e+00   1.1910068e+00   8.2425704e-01   4.5847767e-01   6.3178534e-01   9.1590889e-01   6.3322667e-01   6.3322667e-01   1.2193537e+00   9.0000091e-01   6.3165225e-01   1.0599087e+00   3.1328089e-01   6.3451734e-01   4.0127250e-01   9.0000091e-01   1.0001604e+00   2.2573593e-01   4.1212852e-01   6.3178534e-01   6.0202028e-01   5.2524663e-01   5.2132556e-01   6.1135434e-01   4.0125062e-01   7.0008584e-01   9.0002615e-01   1.1001014e+00   1.0039209e+00   3.0482299e-01   1.0001751e+00   7.0478886e-01   8.0296037e-01   6.0000952e-01   6.0366256e-01   3.0915245e-01   6.0365948e-01   1.0001903e+00   6.3164977e-01   4.0125062e-01   5.0476836e-01   2.2608083e-01   4.0127250e-01   5.0043842e-01   1.2102248e+00   3.0017653e-01   3.0482299e-01   3.0008832e-01   5.0043084e-01   1.5012947e+00   4.0000000e-01   1.5653766e+00   6.7616902e-01   1.5829749e+00   1.1074742e+00   1.3373141e+00   2.2681751e+00   8.0291671e-01   1.9315820e+00   1.3458100e+00   1.7862938e+00   8.7372177e-01   8.7209348e-01   1.2093969e+00   7.1700774e-01   1.1055705e+00   1.0604287e+00   1.0451812e+00   2.3834499e+00   2.5286011e+00   6.3322667e-01   1.3903623e+00   7.0462697e-01   2.3796582e+00   6.3912943e-01   1.2792049e+00   1.6907308e+00   5.6595488e-01   5.3943256e-01   1.1400339e+00   1.5965952e+00   1.8639835e+00   2.3424496e+00   1.1635325e+00   6.7626502e-01   1.1005460e+00   2.0903382e+00   1.2459141e+00   1.0236548e+00   5.0894102e-01   1.2528590e+00   1.2949162e+00   1.2662318e+00   6.7616902e-01   1.4817248e+00   1.3908238e+00   1.1389163e+00   6.9600743e-01   8.9540816e-01   1.0858512e+00   6.3192325e-01   1.5890088e+00   4.2270142e-01   1.1330776e+00   1.5368468e+00   5.2491734e-01   1.1187430e+00   4.0243965e-01   1.1139906e+00   4.1420960e-01   7.0096858e-01   7.3895268e-01   1.1000100e+00   9.3861512e-01   4.0127250e-01   7.1708289e-01   8.0004523e-01   5.2167208e-01   4.5784410e-01   3.6452132e-01   5.6371422e-01   4.2270142e-01   4.1317535e-01   1.2159868e+00   1.0567817e+00   1.1138092e+00   8.3387677e-01   6.1119267e-01   9.0029064e-01   3.0482299e-01   4.0125062e-01   1.0003196e+00   7.4395693e-01   9.3459651e-01   8.5617086e-01   3.0922892e-01   8.0073117e-01   1.5493206e+00   7.5564478e-01   6.4049114e-01   6.4049114e-01   4.5784410e-01   1.7404389e+00   6.9600743e-01   1.3253457e+00   6.4049114e-01   1.2202193e+00   9.0142636e-01   1.1056785e+00   1.9348400e+00   1.4092540e+00   1.6176783e+00   1.1286101e+00   1.4350761e+00   4.5148429e-01   6.7720957e-01   8.1757693e-01   8.2671175e-01   8.1937731e-01   7.4263078e-01   8.0055465e-01   2.0418418e+00   2.2277117e+00   1.1002025e+00   1.0286508e+00   7.2044167e-01   2.0415798e+00   6.0035305e-01   1.0039060e+00   1.3253497e+00   5.0043842e-01   3.1328089e-01   9.0999313e-01   1.1528476e+00   1.4548293e+00   1.8637334e+00   9.1892454e-01   5.2133179e-01   9.3310976e-01   1.5801693e+00   9.6572569e-01   8.0008964e-01   3.4085233e-01   7.5508853e-01   9.6674360e-01   7.4618926e-01   6.4049114e-01   1.2101609e+00   1.0782105e+00   7.2113820e-01   8.0093081e-01   5.2524663e-01   7.8886139e-01   4.5847767e-01   1.7572657e+00   6.1288055e-01   4.0125062e-01   1.0858512e+00   1.1133984e+00   1.4858469e+00   7.1779518e-01   1.8187119e+00   1.2137020e+00   9.6591433e-01   1.4146346e+00   7.4263078e-01   1.5359852e+00   1.2093243e+00   1.7083042e+00   1.4853863e+00   1.5241361e+00   1.7234436e+00   1.9756319e+00   1.9771636e+00   1.3035495e+00   8.0008884e-01   6.3164977e-01   6.0948212e-01   9.1449234e-01   1.8179429e+00   1.2062153e+00   1.3486924e+00   1.8673780e+00   1.4543172e+00   8.7240114e-01   7.4329527e-01   1.1055892e+00   1.4158897e+00   9.3310976e-01   1.1269424e-01   9.3351278e-01   9.7600992e-01   9.6953662e-01   1.3458100e+00   3.0490481e-01   9.0320459e-01   2.7259033e+00   1.8109877e+00   2.7506971e+00   2.3226569e+00   2.5372438e+00   3.4590995e+00   1.2089192e+00   3.1281646e+00   2.5610212e+00   2.9500632e+00   1.9406671e+00   2.0633570e+00   2.3443688e+00   1.7168003e+00   1.8708330e+00   2.0857354e+00   2.2573821e+00   3.5725062e+00   3.7336869e+00   1.7229558e+00   2.5362836e+00   1.6198349e+00   3.5690915e+00   1.7116793e+00   2.4776152e+00   2.8599555e+00   1.6016303e+00   1.6534235e+00   2.3372717e+00   2.7159844e+00   3.0094888e+00   3.4430661e+00   2.3406025e+00   1.8663319e+00   2.3090404e+00   3.1586433e+00   2.3454995e+00   2.2408459e+00   1.5471213e+00   2.3192230e+00   2.4059451e+00   2.1751377e+00   1.8109877e+00   2.6757243e+00   2.4966678e+00   2.1111734e+00   1.7901165e+00   2.0121175e+00   2.1471399e+00   1.8133657e+00   1.4043036e+00   1.6388784e+00   7.0470867e-01   7.7652636e-01   5.0001522e-01   1.1269424e+00   2.2608083e-01   1.0000158e+00   8.0928056e-01   7.0470867e-01   1.0215068e+00   7.1708289e-01   6.3164977e-01   4.2362917e-01   5.0002283e-01   3.0474106e-01   2.0121983e-01   2.2608083e-01   4.5080200e-01   6.0017982e-01   1.1529284e+00   1.1298636e+00   1.1544060e+00   8.5406674e-01   6.3322667e-01   1.2000066e+00   6.3309258e-01   2.2608083e-01   6.0201716e-01   1.0030721e+00   1.1060937e+00   1.1001110e+00   5.0001522e-01   8.2458478e-01   1.6747799e+00   1.0008617e+00   9.0140221e-01   9.0140131e-01   4.1209001e-01   1.7511598e+00   9.0506299e-01   1.4854079e+00   8.3187290e-01   1.3139296e+00   1.0032293e+00   1.2362702e+00   2.0078120e+00   1.7001329e+00   1.7019430e+00   1.2016381e+00   1.5675442e+00   7.1700909e-01   7.4275547e-01   9.6574369e-01   9.3541878e-01   1.1298552e+00   1.0208844e+00   9.0506343e-01   2.1136134e+00   2.3085898e+00   7.4618926e-01   1.1897982e+00   1.0208709e+00   2.1090362e+00   5.0894102e-01   1.1286018e+00   1.4024091e+00   5.2167829e-01   5.6595908e-01   1.0426638e+00   1.2037520e+00   1.5079206e+00   1.8503663e+00   1.0776296e+00   5.0477564e-01   1.0032296e+00   1.5611241e+00   1.1910693e+00   9.0511169e-01   6.3178782e-01   9.0184172e-01   1.1896660e+00   1.0032443e+00   8.3187290e-01   1.3450688e+00   1.3020492e+00   1.0087252e+00   6.1990228e-01   7.4263078e-01   1.0458540e+00   7.3084171e-01   7.0918894e-01   7.0176271e-01   8.1112984e-01   9.6574336e-01   4.1317535e-01   1.5005626e+00   6.1119558e-01   6.0964597e-01   1.0116724e+00   4.1315633e-01   9.3848935e-01   9.0000136e-01   1.1896660e+00   9.6574369e-01   1.2003597e+00   1.4006465e+00   1.6096629e+00   1.5401713e+00   8.2421923e-01   5.3914287e-01   3.6259865e-01   4.2362917e-01   6.0017665e-01   1.2189701e+00   6.0202028e-01   8.7212232e-01   1.5067961e+00   1.1024820e+00   4.1317535e-01   3.0490481e-01   5.0477564e-01   9.3329017e-01   6.0018299e-01   6.1845783e-01   4.1210927e-01   5.0894102e-01   5.0477564e-01   1.0008620e+00   9.0029064e-01   5.0043842e-01   2.1169442e+00   1.2049539e+00   2.2014913e+00   1.7227908e+00   1.9366943e+00   2.8973091e+00   6.0383105e-01   2.5621105e+00   1.9756002e+00   2.3854144e+00   1.4163126e+00   1.4857201e+00   1.8044011e+00   1.1074834e+00   1.2661803e+00   1.4994060e+00   1.6741010e+00   3.0107625e+00   3.1586112e+00   1.1298552e+00   1.9796588e+00   1.0095370e+00   3.0090568e+00   1.1900276e+00   1.8963668e+00   2.3135911e+00   1.0782107e+00   1.0783219e+00   1.7384347e+00   2.2009981e+00   2.4793129e+00   2.9421182e+00   1.7402224e+00   1.3018103e+00   1.7072540e+00   2.6745468e+00   1.7367211e+00   1.6485141e+00   9.6691372e-01   1.8209763e+00   1.8293641e+00   1.7435092e+00   1.2049539e+00   2.0881329e+00   1.9090398e+00   1.6063540e+00   1.2407432e+00   1.4664722e+00   1.5386307e+00   1.2093243e+00   1.0943600e+00   1.0030868e+00   1.3272142e+00   9.1446938e-01   1.7295996e+00   1.1336109e+00   8.7209296e-01   1.2643054e+00   6.3912943e-01   1.4396100e+00   1.1299441e+00   1.5271597e+00   1.3148232e+00   1.4267817e+00   1.6268514e+00   1.8468437e+00   1.8305154e+00   1.1759988e+00   7.4262850e-01   5.2491734e-01   5.2167208e-01   8.5586571e-01   1.6206300e+00   1.1291536e+00   1.4631182e+00   1.7576822e+00   1.3254284e+00   1.0172489e+00   6.0605366e-01   9.1894698e-01   1.2951152e+00   8.3187290e-01   3.0474106e-01   8.1500329e-01   1.0396215e+00   9.6150595e-01   1.2528590e+00   5.6347978e-01   8.7240114e-01   2.5401214e+00   1.6166178e+00   2.5672376e+00   2.1256636e+00   2.3434890e+00   3.2706021e+00   1.0235120e+00   2.9379053e+00   2.3650373e+00   2.7819820e+00   1.7939428e+00   1.8718670e+00   2.1669217e+00   1.5269837e+00   1.7152309e+00   1.9257519e+00   2.0672316e+00   3.3962101e+00   3.5413320e+00   1.5241169e+00   2.3604685e+00   1.4422764e+00   3.3805191e+00   1.5352907e+00   2.2985560e+00   2.6785349e+00   1.4314424e+00   1.4886759e+00   2.1422340e+00   2.5406863e+00   2.8290490e+00   3.2861997e+00   2.1472832e+00   1.6782365e+00   2.1087015e+00   2.9939447e+00   2.1830772e+00   2.0525906e+00   1.3935744e+00   2.1564350e+00   2.2287876e+00   2.0426476e+00   1.6166178e+00   2.4889554e+00   2.3256006e+00   1.9561612e+00   1.6066555e+00   1.8386981e+00   2.0009986e+00   1.6313110e+00   8.0883916e-01   5.0043842e-01   6.0202028e-01   8.0004602e-01   3.3808272e-01   5.0437695e-01   8.0093081e-01   5.2838320e-01   6.0201716e-01   2.5399984e-01   7.2036819e-01   5.0517282e-01   5.0043842e-01   7.0008584e-01   9.1424701e-01   9.0157896e-01   3.0017653e-01   7.2044167e-01   6.2656178e-01   6.6334810e-01   3.6259865e-01   9.0026588e-01   5.0436235e-01   4.1212852e-01   8.0879701e-01   7.0478886e-01   3.0482299e-01   5.2201750e-01   4.5847767e-01   4.0125062e-01   4.1317535e-01   1.0363096e+00   3.4080442e-01   3.0474106e-01   2.2573593e-01   3.0490481e-01   1.2204839e+00   2.4195741e-01   1.8101835e+00   9.0166476e-01   1.7375279e+00   1.4002005e+00   1.6032003e+00   2.4532171e+00   1.0032443e+00   2.1331916e+00   1.6052507e+00   1.9422649e+00   9.1894698e-01   1.1025819e+00   1.3276411e+00   8.1719606e-01   1.0142626e+00   1.1298636e+00   1.3025621e+00   2.5612597e+00   2.7430487e+00   9.0155438e-01   1.5299064e+00   7.1708289e-01   2.5605373e+00   7.0633229e-01   1.5079428e+00   1.8443132e+00   6.0383105e-01   7.0096708e-01   1.4023806e+00   1.6740160e+00   1.9756002e+00   2.3801033e+00   1.4049093e+00   9.0142636e-01   1.4001717e+00   2.0898615e+00   1.4183606e+00   1.3009222e+00   6.0184622e-01   1.2661803e+00   1.4267527e+00   1.1084368e+00   9.0166476e-01   1.7108631e+00   1.5299252e+00   1.0782751e+00   8.1343016e-01   1.0116721e+00   1.2193537e+00   9.0026497e-01   7.9148746e-01   7.0993998e-01   9.3541878e-01   8.1937731e-01   5.0043084e-01   5.6370994e-01   4.1212852e-01   1.0782753e+00   6.0184622e-01   9.0557807e-01   7.4269314e-01   7.0633229e-01   8.2841920e-01   9.1695534e-01   1.0756891e+00   7.3084048e-01   5.2491131e-01   5.0085236e-01   5.0476836e-01   5.0085236e-01   1.1074740e+00   8.3916809e-01   1.2049539e+00   9.6501813e-01   4.2270142e-01   8.0291749e-01   5.0855077e-01   5.3943256e-01   8.2631334e-01   4.0243965e-01   1.0207260e+00   5.2524663e-01   8.0055465e-01   7.0184453e-01   7.0184453e-01   1.0777307e+00   6.0366256e-01   2.0696799e+00   1.1543334e+00   1.9286352e+00   1.6071727e+00   1.8312163e+00   2.6295459e+00   1.1153247e+00   2.3155068e+00   1.8040969e+00   2.1901871e+00   1.2562955e+00   1.3263639e+00   1.5518083e+00   1.1271226e+00   1.4557657e+00   1.4915559e+00   1.5136393e+00   2.7555974e+00   2.9267466e+00   1.0030718e+00   1.7744103e+00   1.0843333e+00   2.7324083e+00   9.6953662e-01   1.7456060e+00   2.0249458e+00   9.1568820e-01   1.0151258e+00   1.6309461e+00   1.8315348e+00   2.1358791e+00   2.5304748e+00   1.6492450e+00   1.1075720e+00   1.6001777e+00   2.2141198e+00   1.7441970e+00   1.5196090e+00   9.6683480e-01   1.4838225e+00   1.7167914e+00   1.4122282e+00   1.1543334e+00   1.9438463e+00   1.8374400e+00   1.4268530e+00   1.0778421e+00   1.2792049e+00   1.5857302e+00   1.1532421e+00   1.1019503e+00   6.0201716e-01   5.0043842e-01   6.1135434e-01   7.0008735e-01   8.1156529e-01   4.1317535e-01   7.0000303e-01   4.0246123e-01   2.0061436e-01   4.1210927e-01   5.0436965e-01   7.0000303e-01   6.0366256e-01   2.0121983e-01   1.2007726e+00   9.1916394e-01   1.0124729e+00   8.0055465e-01   4.0246123e-01   7.0008735e-01   5.0085236e-01   6.0017982e-01   6.0202028e-01   6.3165225e-01   7.4612830e-01   6.0383105e-01   1.1269424e-01   7.0184453e-01   1.4559030e+00   5.6371422e-01   5.2167829e-01   5.2133179e-01   4.0004442e-01   1.7133283e+00   6.0948800e-01   1.3743342e+00   5.2524663e-01   1.2702954e+00   9.0142636e-01   1.1286018e+00   1.9763960e+00   1.2004262e+00   1.6484371e+00   1.1066159e+00   1.5033966e+00   6.1990228e-01   6.3322667e-01   8.9538275e-01   6.1990228e-01   1.0010060e+00   9.1471442e-01   8.0488008e-01   2.0894199e+00   2.2581358e+00   7.0088627e-01   1.1085342e+00   6.3178782e-01   2.0855639e+00   4.0363334e-01   1.0293900e+00   1.3743657e+00   4.0006662e-01   4.0125062e-01   9.3329055e-01   1.2396422e+00   1.5267540e+00   1.9798779e+00   9.6591465e-01   4.0127250e-01   9.0026497e-01   1.7151603e+00   1.0797805e+00   8.0296037e-01   4.0006662e-01   8.9540816e-01   1.0837679e+00   9.6674360e-01   5.2524663e-01   1.2440789e+00   1.1938630e+00   9.1892454e-01   5.2524663e-01   6.3912943e-01   9.3733589e-01   4.5148429e-01   1.1281352e+00   9.0002570e-01   5.0517282e-01   9.4513210e-01   4.1315633e-01   1.2014191e+00   5.2133179e-01   1.3063533e+00   1.1019505e+00   8.5403370e-01   1.0426516e+00   1.3523310e+00   1.4544312e+00   9.0142636e-01   3.3818226e-01   5.0085236e-01   5.0437695e-01   3.0922892e-01   1.5001461e+00   9.0005094e-01   9.0668287e-01   1.2396475e+00   8.7209296e-01   5.0000761e-01   4.5078948e-01   8.0046764e-01   1.0030724e+00   4.1317535e-01   6.7824250e-01   6.0017665e-01   6.0000952e-01   6.0000317e-01   7.4262850e-01   6.3925756e-01   5.0001522e-01   2.4077059e+00   1.5012741e+00   2.3329496e+00   2.0008921e+00   2.2042323e+00   3.0476353e+00   9.3541878e-01   2.7309758e+00   2.2068463e+00   2.5373913e+00   1.5160787e+00   1.7043730e+00   1.9242109e+00   1.4044668e+00   1.5401330e+00   1.7168122e+00   1.9044144e+00   3.1543192e+00   3.3406961e+00   1.4044697e+00   2.1265131e+00   1.3061138e+00   3.1536525e+00   1.3069754e+00   2.1097680e+00   2.4379736e+00   1.2049541e+00   1.3017511e+00   2.0033792e+00   2.2562563e+00   2.5606009e+00   2.9377608e+00   2.0050253e+00   1.5030978e+00   2.0001168e+00   2.6390071e+00   2.0114908e+00   1.9023062e+00   1.2016381e+00   1.8467998e+00   2.0209800e+00   1.6143467e+00   1.5012741e+00   2.3121231e+00   2.1220697e+00   1.6461460e+00   1.4062065e+00   1.6118728e+00   1.8108200e+00   1.5004645e+00   1.1000005e+00   9.0305330e-01   9.0506343e-01   1.1075720e+00   8.0488008e-01   6.1119558e-01   6.3912943e-01   6.0383105e-01   3.0490481e-01   1.1269424e-01   4.1210927e-01   6.0184622e-01   7.0008735e-01   1.0803561e+00   1.2125410e+00   1.2178626e+00   9.0645118e-01   7.9153339e-01   1.3000002e+00   7.0096858e-01   3.0008832e-01   8.0245824e-01   1.1001015e+00   1.2040344e+00   1.2012928e+00   6.0017982e-01   9.0645118e-01   1.7262450e+00   1.1005460e+00   1.0000307e+00   1.0000307e+00   5.0043842e-01   1.7087610e+00   1.0003198e+00   1.6300950e+00   9.3848935e-01   1.5032156e+00   1.2007124e+00   1.4092540e+00   2.2026134e+00   1.8005395e+00   1.9004485e+00   1.4019342e+00   1.7231818e+00   7.4269314e-01   9.0668287e-01   1.1133897e+00   1.0251597e+00   1.0924484e+00   1.0143978e+00   1.1005460e+00   2.3044111e+00   2.5032992e+00   9.4511250e-01   1.3253497e+00   1.1075720e+00   2.3033192e+00   5.5450500e-01   1.3061180e+00   1.6004128e+00   5.4219811e-01   6.3912943e-01   1.2090477e+00   1.4006179e+00   1.7019555e+00   2.0185049e+00   1.2190878e+00   7.0548283e-01   1.2049539e+00   1.7202439e+00   1.2636227e+00   1.1006371e+00   7.0911112e-01   1.0207396e+00   1.2632946e+00   9.3308853e-01   9.3848935e-01   1.5130871e+00   1.3741498e+00   9.6572569e-01   6.9987517e-01   8.2421923e-01   1.0798806e+00   8.5583415e-01   5.2524663e-01   8.2418002e-01   6.3912709e-01   3.6452132e-01   5.6394820e-01   7.2036819e-01   5.0517282e-01   8.0008964e-01   1.0000005e+00   1.2000731e+00   1.1019597e+00   4.0002221e-01   1.0039063e+00   7.4612830e-01   8.3183672e-01   6.0383105e-01   6.1119558e-01   2.0000000e-01   4.5078948e-01   1.1000098e+00   7.8890806e-01   4.0122873e-01   5.6371422e-01   4.1212852e-01   5.0001522e-01   5.2524663e-01   1.2137020e+00   3.4080442e-01   3.3813251e-01   3.0490481e-01   6.0035621e-01   1.5010034e+00   4.0246123e-01   1.5265987e+00   6.1135434e-01   1.6395342e+00   1.1134850e+00   1.3309249e+00   2.3136797e+00   7.1629168e-01   1.9760038e+00   1.3748534e+00   1.8136626e+00   9.1894698e-01   9.0320459e-01   1.2661802e+00   6.0427481e-01   9.1427000e-01   9.6685270e-01   1.0777305e+00   2.4270428e+00   2.5626268e+00   8.1112909e-01   1.4228744e+00   5.2167208e-01   2.4261071e+00   7.0633229e-01   1.3043552e+00   1.7511131e+00   6.0383105e-01   5.2491131e-01   1.1330776e+00   1.6740160e+00   1.9314874e+00   2.4166999e+00   1.1400420e+00   7.4269200e-01   1.1024820e+00   2.1702438e+00   1.1639421e+00   1.0427822e+00   4.2268438e-01   1.3276412e+00   1.2710363e+00   1.3154933e+00   6.1135434e-01   1.4922566e+00   1.3466030e+00   1.1400339e+00   7.3461436e-01   9.3733552e-01   9.7694377e-01   6.0365948e-01   5.8750389e-01   2.4195741e-01   8.6051471e-01   3.3818226e-01   8.1719606e-01   6.0202028e-01   6.0219099e-01   8.0337471e-01   1.0214933e+00   1.0338224e+00   5.2201750e-01   6.0000635e-01   3.6259865e-01   4.2268438e-01   2.2538848e-01   1.0087393e+00   5.4219811e-01   7.4618926e-01   9.2019277e-01   5.2838320e-01   3.4080442e-01   3.4085233e-01   3.4085233e-01   5.2838320e-01   2.0121983e-01   9.0294373e-01   3.0482299e-01   3.0490481e-01   3.0490481e-01   4.1420960e-01   1.1133986e+00   3.0017653e-01   1.9760242e+00   1.0776188e+00   1.8598666e+00   1.5071120e+00   1.7384459e+00   2.5637810e+00   9.3426769e-01   2.2403929e+00   1.7108631e+00   2.0993246e+00   1.1405598e+00   1.2394690e+00   1.4816205e+00   1.0776296e+00   1.4324323e+00   1.4163126e+00   1.4134492e+00   2.6753615e+00   2.8540068e+00   9.1001664e-01   1.6986597e+00   1.0426638e+00   2.6697938e+00   9.0657539e-01   1.6396943e+00   1.9541963e+00   8.5583415e-01   9.0207914e-01   1.5412500e+00   1.7849153e+00   2.0880425e+00   2.4973149e+00   1.5650163e+00   1.0060994e+00   1.5001440e+00   2.2185588e+00   1.6410190e+00   1.4111252e+00   8.5440680e-01   1.4330979e+00   1.6474117e+00   1.4095656e+00   1.0776188e+00   1.8534896e+00   1.7579984e+00   1.3938438e+00   1.0171340e+00   1.1990152e+00   1.4686236e+00   1.0427822e+00   6.8261201e-01   1.0004792e+00   6.3178782e-01   4.1210927e-01   6.0202028e-01   7.0025283e-01   8.0245903e-01   6.7720957e-01   8.1719606e-01   7.0008432e-01   1.0069214e+00   7.9153339e-01   8.6054545e-01   6.4049114e-01   6.3178782e-01   9.0155393e-01   1.2000065e+00   9.0508712e-01   2.0181667e-01   8.2635069e-01   7.1708289e-01   7.0548283e-01   8.0000239e-01   5.4219811e-01   1.3530568e+00   6.3322667e-01   8.0967961e-01   7.1708289e-01   7.0016860e-01   1.5402579e+00   6.3925756e-01   1.5611241e+00   6.4620889e-01   1.4283663e+00   1.1134850e+00   1.3189663e+00   2.1346646e+00   1.3000497e+00   1.8186729e+00   1.3009674e+00   1.7335369e+00   1.0118233e+00   8.1117067e-01   1.0567664e+00   6.0605366e-01   9.2867113e-01   1.0782857e+00   1.0429127e+00   2.2917679e+00   2.4270713e+00   5.0042326e-01   1.2848760e+00   6.9987517e-01   2.2396581e+00   5.2491734e-01   1.3051737e+00   1.5457820e+00   6.0365948e-01   8.0291749e-01   1.1110184e+00   1.3561934e+00   1.6492450e+00   2.1212048e+00   1.1186586e+00   6.7616723e-01   1.1005365e+00   1.7574668e+00   1.3269962e+00   1.0777411e+00   8.0097499e-01   1.0411548e+00   1.1972915e+00   9.9911696e-01   6.4620889e-01   1.4422764e+00   1.3473056e+00   9.3861512e-01   5.2491734e-01   8.6084272e-01   1.2528048e+00   8.2498722e-01   9.6150595e-01   5.0477564e-01   1.0214931e+00   8.0923926e-01   8.0492246e-01   1.0062544e+00   1.2363856e+00   1.2438823e+00   6.2656178e-01   4.0006662e-01   1.2085435e-01   2.0181667e-01   2.2573593e-01   1.2016443e+00   6.3925756e-01   9.2019277e-01   1.1335345e+00   7.1636719e-01   5.0084481e-01   2.0121983e-01   5.0002283e-01   7.3155911e-01   2.0181667e-01   6.7626681e-01   3.0915245e-01   5.0437695e-01   4.1317535e-01   6.1845783e-01   9.0506254e-01   3.0922892e-01   2.1350025e+00   1.2189760e+00   2.0658767e+00   1.7034615e+00   1.9177947e+00   2.7775988e+00   7.7598704e-01   2.4534018e+00   1.9144928e+00   2.2857680e+00   1.2749306e+00   1.4182222e+00   1.6639408e+00   1.1527669e+00   1.4140789e+00   1.4954274e+00   1.6121856e+00   2.8913337e+00   3.0644792e+00   1.1011719e+00   1.8708183e+00   1.0777305e+00   2.8852099e+00   1.0396215e+00   1.8297117e+00   2.1701542e+00   9.4532171e-01   1.0262619e+00   1.7168122e+00   2.0059655e+00   2.3063931e+00   2.7230908e+00   1.7261949e+00   1.2093243e+00   1.7002548e+00   2.4331092e+00   1.7646791e+00   1.6080687e+00   9.3848935e-01   1.6152383e+00   1.7771159e+00   1.4971922e+00   1.2189760e+00   2.0349233e+00   1.8831259e+00   1.4665397e+00   1.1400339e+00   1.3492939e+00   1.5757399e+00   1.2102248e+00   8.1117067e-01   7.0548283e-01   6.0964891e-01   6.0605366e-01   7.0918894e-01   9.0279223e-01   8.0008964e-01   3.6259865e-01   1.3154973e+00   1.0604287e+00   1.1536694e+00   9.1892454e-01   5.0477564e-01   5.0894102e-01   3.0922892e-01   8.0046764e-01   9.0778124e-01   7.1708289e-01   8.6225026e-01   6.8685125e-01   4.0363334e-01   8.4536936e-01   1.5318139e+00   6.5832080e-01   6.7636452e-01   6.3322667e-01   5.6838732e-01   1.8053679e+00   7.2044167e-01   1.2092602e+00   5.0437695e-01   1.3018595e+00   8.0291671e-01   1.0095513e+00   1.9760044e+00   1.0208709e+00   1.6387179e+00   1.0597877e+00   1.4686236e+00   6.0201716e-01   6.0427481e-01   9.3331138e-01   7.0025283e-01   6.1119558e-01   6.0427175e-01   7.4269200e-01   2.0887699e+00   2.2281421e+00   1.0001753e+00   1.0797700e+00   4.1317535e-01   2.0885107e+00   5.2133179e-01   9.6591465e-01   1.4140457e+00   4.1209001e-01   2.2573593e-01   8.1156529e-01   1.3450340e+00   1.5966664e+00   2.0855643e+00   8.1343016e-01   4.6440171e-01   8.2635069e-01   1.8444686e+00   8.2635069e-01   7.1621748e-01   2.0061436e-01   1.0088783e+00   9.1566538e-01   1.0032296e+00   5.0437695e-01   1.1543257e+00   9.8997136e-01   8.1117067e-01   7.0470867e-01   6.0980961e-01   6.3322667e-01   3.0474106e-01   9.0031539e-01   7.0000151e-01   3.3813251e-01   5.2167829e-01   8.5403428e-01   1.0095513e+00   5.0043842e-01   5.2524663e-01   6.0980961e-01   6.1288055e-01   3.0026460e-01   1.1001015e+00   7.1636719e-01   6.3309258e-01   7.4335736e-01   5.2167208e-01   5.0043084e-01   6.0184309e-01   6.0964891e-01   6.0017982e-01   3.0482299e-01   1.1153247e+00   5.0043084e-01   4.0246123e-01   4.0125062e-01   3.0017653e-01   1.1270411e+00   4.0002221e-01   2.0175565e+00   1.1056693e+00   1.9099615e+00   1.6003257e+00   1.8055799e+00   2.6186105e+00   1.2017042e+00   2.3090806e+00   1.8007233e+00   2.1233216e+00   1.1144002e+00   1.3025622e+00   1.5097103e+00   1.0216374e+00   1.2396937e+00   1.3452695e+00   1.5005647e+00   2.7241212e+00   2.9166918e+00   1.0087396e+00   1.7168636e+00   9.3733552e-01   2.7221286e+00   9.0508756e-01   1.7046111e+00   2.0107590e+00   8.0879701e-01   9.0508712e-01   1.6049314e+00   1.8174378e+00   2.1221146e+00   2.4750525e+00   1.6096791e+00   1.1000193e+00   1.6000016e+00   2.1732693e+00   1.6308665e+00   1.5004872e+00   8.0883916e-01   1.4182493e+00   1.6308803e+00   1.2094550e+00   1.1056693e+00   1.9088565e+00   1.7377460e+00   1.2661852e+00   1.0088926e+00   1.2092662e+00   1.4340155e+00   1.1019692e+00   3.4342562e-01   6.0964891e-01   5.6595908e-01   5.0437695e-01   5.2167829e-01   4.5783248e-01   1.4023777e+00   1.1286018e+00   1.2201578e+00   1.0032443e+00   3.0922892e-01   9.0642679e-01   9.0166476e-01   6.0964597e-01   5.0084481e-01   8.6054545e-01   9.6574336e-01   8.0923926e-01   5.0477564e-01   9.0532093e-01   1.6742781e+00   7.8895472e-01   7.5564478e-01   7.4618926e-01   6.0964891e-01   1.9222003e+00   8.2462252e-01   1.2093908e+00   5.2201750e-01   1.0522594e+00   7.0548138e-01   9.3735629e-01   1.7578497e+00   1.4001717e+00   1.4326118e+00   9.0166431e-01   1.3681502e+00   7.1636719e-01   4.5148429e-01   7.1183012e-01   6.3164977e-01   9.0534502e-01   8.5583415e-01   6.3322667e-01   1.9047821e+00   2.0429861e+00   3.3813251e-01   9.4634218e-01   7.1700774e-01   1.8662975e+00   3.0474106e-01   9.1695534e-01   1.1636098e+00   3.3818226e-01   5.0476836e-01   7.4329527e-01   1.0171202e+00   1.3020942e+00   1.8013674e+00   7.8935898e-01   3.0474106e-01   7.0008735e-01   1.4927071e+00   1.0336860e+00   6.7720957e-01   5.0855778e-01   7.3895268e-01   9.4622126e-01   8.4540285e-01   5.2201750e-01   1.0621172e+00   1.0788651e+00   8.1156529e-01   4.0002221e-01   5.6618864e-01   9.6935134e-01   5.2524663e-01   4.1212852e-01   5.0517282e-01   7.0008584e-01   6.3322667e-01   3.0490481e-01   1.2003660e+00   9.1552373e-01   1.0095513e+00   8.0046685e-01   4.5080200e-01   7.0105084e-01   6.0964891e-01   6.0365948e-01   5.0477564e-01   6.3178782e-01   7.4329527e-01   6.0201716e-01   2.2573593e-01   7.0096708e-01   1.4548054e+00   5.6347978e-01   5.2167208e-01   5.2133802e-01   4.0006662e-01   1.7132643e+00   6.0948506e-01   1.4655221e+00   7.0548283e-01   1.2921474e+00   9.1424701e-01   1.1900342e+00   1.9791159e+00   1.2013591e+00   1.6491682e+00   1.1111057e+00   1.5689626e+00   8.0726668e-01   7.4329527e-01   9.8998705e-01   8.0337471e-01   1.2004198e+00   1.1061923e+00   8.2635069e-01   2.0953157e+00   2.2622460e+00   6.0366256e-01   1.2097311e+00   8.0883841e-01   2.0866883e+00   6.0035621e-01   1.0858512e+00   1.3762609e+00   6.0000635e-01   6.0035305e-01   1.0143975e+00   1.2399444e+00   1.5291965e+00   1.9842703e+00   1.0777305e+00   4.1315633e-01   9.0005048e-01   1.7303039e+00   1.2394744e+00   8.2498722e-01   6.0018299e-01   9.9013884e-01   1.2395260e+00   1.1286911e+00   7.0548283e-01   1.3081175e+00   1.3479052e+00   1.1074834e+00   7.0184453e-01   8.1117067e-01   1.1186499e+00   6.0980961e-01   2.0181667e-01   5.2133802e-01   7.0548283e-01   4.0243965e-01   8.5471446e-01   9.1001664e-01   9.1916394e-01   6.0964891e-01   8.0296037e-01   1.0000307e+00   5.2524663e-01   4.1420960e-01   6.0000635e-01   8.0004523e-01   9.0166431e-01   9.0026588e-01   3.3818226e-01   6.0366256e-01   1.4340438e+00   8.0004523e-01   7.0000454e-01   7.0000151e-01   2.0000000e-01   1.4651632e+00   7.0008584e-01   1.7369589e+00   8.4540285e-01   1.6071563e+00   1.3008770e+00   1.5130871e+00   2.3098753e+00   1.5002444e+00   2.0034559e+00   1.5005854e+00   1.8322392e+00   8.5437498e-01   1.0087393e+00   1.2192920e+00   8.4786353e-01   1.1330694e+00   1.1270325e+00   1.2012867e+00   2.4144060e+00   2.6097166e+00   7.9153339e-01   1.4330116e+00   8.7209348e-01   2.4119960e+00   6.3178782e-01   1.4094452e+00   1.7039341e+00   5.6371422e-01   6.3309258e-01   1.3130937e+00   1.5066999e+00   1.8106410e+00   2.1515742e+00   1.3253458e+00   8.0004602e-01   1.3000908e+00   1.8533295e+00   1.3748188e+00   1.2012928e+00   5.7609230e-01   1.1298636e+00   1.3741846e+00   1.0451812e+00   8.4540285e-01   1.6176927e+00   1.4854079e+00   1.0777307e+00   7.4612830e-01   9.3306807e-01   1.1910068e+00   8.1715665e-01   4.0243965e-01   6.0184622e-01   6.0000952e-01   1.0158274e+00   1.1111057e+00   1.1191444e+00   8.0928056e-01   7.4335736e-01   1.2000002e+00   6.0964891e-01   3.0026460e-01   7.0088477e-01   1.0001601e+00   1.1024820e+00   1.1005458e+00   5.0042326e-01   8.0492246e-01   1.6321742e+00   1.0001753e+00   9.0005048e-01   9.0002615e-01   4.0006662e-01   1.6390068e+00   9.0029064e-01   1.6300430e+00   8.6084272e-01   1.5035329e+00   1.2004200e+00   1.4092511e+00   2.2043907e+00   1.7002548e+00   1.9010379e+00   1.4007831e+00   1.7240342e+00   7.4269314e-01   9.0534502e-01   1.1133984e+00   9.3184922e-01   1.0597992e+00   1.0142766e+00   1.1005364e+00   2.3071806e+00   2.5048249e+00   8.4536936e-01   1.3253910e+00   1.0116865e+00   2.3056305e+00   5.2838320e-01   1.3061582e+00   1.6010223e+00   4.8391482e-01   5.7608844e-01   1.2089313e+00   1.4017695e+00   1.7039229e+00   2.0293124e+00   1.2189760e+00   7.0096858e-01   1.2016380e+00   1.7295384e+00   1.2636227e+00   1.1005460e+00   6.1830489e-01   1.0208709e+00   1.2632948e+00   9.3329055e-01   8.6084272e-01   1.5130912e+00   1.3741813e+00   9.6572569e-01   6.5832080e-01   8.2418071e-01   1.0788007e+00   7.9148662e-01   3.0922892e-01   8.0046764e-01   1.3743342e+00   1.3452695e+00   1.3745152e+00   1.0776296e+00   8.0051115e-01   1.4000349e+00   8.2462252e-01   3.0026460e-01   5.7609230e-01   1.2089253e+00   1.3131370e+00   1.3002493e+00   7.0016860e-01   1.0426760e+00   1.8951252e+00   1.2036864e+00   1.1055892e+00   1.1055707e+00   6.3165225e-01   1.9760099e+00   1.1133895e+00   1.3035495e+00   1.0032296e+00   1.1134939e+00   8.1112984e-01   1.0427944e+00   1.8040883e+00   1.9000220e+00   1.5005626e+00   1.0010060e+00   1.3844234e+00   6.1288055e-01   5.7609230e-01   7.8890721e-01   1.1056785e+00   1.1270325e+00   9.0778124e-01   7.0556260e-01   1.9141294e+00   2.1052841e+00   8.2421923e-01   1.0150395e+00   1.2036863e+00   1.9046783e+00   5.2133802e-01   9.3733589e-01   1.2010584e+00   6.0948212e-01   7.0470867e-01   8.5583357e-01   1.0008768e+00   1.3033860e+00   1.6469593e+00   9.0294373e-01   5.0436965e-01   8.5406616e-01   1.3485619e+00   1.0522594e+00   7.0993998e-01   8.0250123e-01   7.4329527e-01   1.0427822e+00   9.0053003e-01   1.0032296e+00   1.1531951e+00   1.1543259e+00   9.0142681e-01   5.6618864e-01   6.1135434e-01   9.3984267e-01   9.0168933e-01   7.1629303e-01   1.5266891e+00   1.3564850e+00   1.4198077e+00   1.1544060e+00   7.0088627e-01   1.3008812e+00   7.2036951e-01   3.0482299e-01   7.4954884e-01   1.1531951e+00   1.2645755e+00   1.2053003e+00   6.1119267e-01   1.0803561e+00   1.9177201e+00   1.1286911e+00   1.0451689e+00   1.0433444e+00   7.2036951e-01   2.0856547e+00   1.0782211e+00   1.0434746e+00   9.0029064e-01   9.0279223e-01   6.0948800e-01   8.0883841e-01   1.6097492e+00   1.8003682e+00   1.3025173e+00   8.0879701e-01   1.1347620e+00   3.0922892e-01   3.6452132e-01   5.2133179e-01   1.0032293e+00   9.3308891e-01   6.0383105e-01   5.0043084e-01   1.7170314e+00   1.9082779e+00   8.5406616e-01   7.4275547e-01   1.1001110e+00   1.7132654e+00   4.1212852e-01   7.0548138e-01   1.0030871e+00   5.0085236e-01   6.0000635e-01   6.1135434e-01   8.0879701e-01   1.1134075e+00   1.4922778e+00   6.3322667e-01   4.0246123e-01   6.8261201e-01   1.1935004e+00   7.4954884e-01   5.0437695e-01   7.0008584e-01   4.5148429e-01   7.4262964e-01   6.0018299e-01   9.0029064e-01   9.1424701e-01   8.5437440e-01   6.0017665e-01   5.2167208e-01   3.0915245e-01   6.4620889e-01   8.0000160e-01   1.0033867e+00   7.3461436e-01   8.2512420e-01   6.0219099e-01   6.0017982e-01   6.0000317e-01   5.0000761e-01   7.0016860e-01   6.0202028e-01   4.5148429e-01   5.7630313e-01   5.0855778e-01   1.2699992e-01   5.0894102e-01   1.2671752e+00   4.1420960e-01   3.6259865e-01   3.4080442e-01   2.4170870e-01   1.5133193e+00   4.1317535e-01   1.5238388e+00   6.0980961e-01   1.4557632e+00   1.1002023e+00   1.3069713e+00   2.1693127e+00   1.1005458e+00   1.8443124e+00   1.3063934e+00   1.6655594e+00   6.5832080e-01   8.0492246e-01   1.0498228e+00   5.7832449e-01   9.1424701e-01   9.0320459e-01   1.0032296e+00   2.2802814e+00   2.4537354e+00   7.1621613e-01   1.2528590e+00   5.3914287e-01   2.2781292e+00   4.2362917e-01   1.2128138e+00   1.5640141e+00   3.4085233e-01   4.1212852e-01   1.1060939e+00   1.4140458e+00   1.7081323e+00   2.1436849e+00   1.1138955e+00   6.0184622e-01   1.1001015e+00   1.8659091e+00   1.1544060e+00   1.0010209e+00   3.3813251e-01   1.0224270e+00   1.1635398e+00   9.7600992e-01   6.0980961e-01   1.4182493e+00   1.2705641e+00   8.9538275e-01   5.4219811e-01   7.3084171e-01   9.6936870e-01   6.0184934e-01   3.0922892e-01   2.4170870e-01   4.0127250e-01   1.6009488e+00   1.0040629e+00   1.0499492e+00   1.2653025e+00   9.1471442e-01   6.1119558e-01   5.0477564e-01   9.0005048e-01   1.1016049e+00   5.0043084e-01   7.0096708e-01   7.0088627e-01   7.0470720e-01   7.0176121e-01   8.0967961e-01   6.3165225e-01   6.0201716e-01   2.5221737e+00   1.6096629e+00   2.4221589e+00   2.1015969e+00   2.3098905e+00   3.1317714e+00   1.0597879e+00   2.8188299e+00   2.3040148e+00   2.6373482e+00   1.6231306e+00   1.8068049e+00   2.0210084e+00   1.5237053e+00   1.7080686e+00   1.8459262e+00   2.0034094e+00   3.2387184e+00   3.4286399e+00   1.5005854e+00   2.2285172e+00   1.4324350e+00   3.2358000e+00   1.4109628e+00   2.2110849e+00   2.5224740e+00   1.3139336e+00   1.4095777e+00   2.1090366e+00   2.3323064e+00   2.6377472e+00   2.9966835e+00   2.1144760e+00   1.6012568e+00   2.1000482e+00   2.6968519e+00   2.1346646e+00   2.0025815e+00   1.3133662e+00   1.9351024e+00   2.1377869e+00   1.7137965e+00   1.6096629e+00   2.4161682e+00   2.2434416e+00   1.7684500e+00   1.5143051e+00   1.7168636e+00   1.9368172e+00   1.6050040e+00   1.1269424e-01   3.3818226e-01   1.3017961e+00   7.4612830e-01   1.0262619e+00   1.2443200e+00   8.2421923e-01   6.0202028e-01   2.2573593e-01   6.0017982e-01   8.4572653e-01   3.0922892e-01   5.6347978e-01   4.1317535e-01   6.0964891e-01   5.2201750e-01   7.3090905e-01   8.0245824e-01   4.1420960e-01   2.2297880e+00   1.3131802e+00   2.1734835e+00   1.8042696e+00   2.0169191e+00   2.8857511e+00   7.7598796e-01   2.5607759e+00   2.0181988e+00   2.3909895e+00   1.3770846e+00   1.5195166e+00   1.7689720e+00   1.2362756e+00   1.4651863e+00   1.5800353e+00   1.7155605e+00   3.0010211e+00   3.1712557e+00   1.2016443e+00   1.9735224e+00   1.1531953e+00   2.9937162e+00   1.1401191e+00   1.9335528e+00   2.2793947e+00   1.0403116e+00   1.1237940e+00   1.8155572e+00   2.1170640e+00   2.4166673e+00   2.8369211e+00   1.8227568e+00   1.3135522e+00   1.8005404e+00   2.5443612e+00   1.8557670e+00   1.7105814e+00   1.0313359e+00   1.7226330e+00   1.8708183e+00   1.5881025e+00   1.3131802e+00   2.1363271e+00   1.9752912e+00   1.5530527e+00   1.2366099e+00   1.4501583e+00   1.6655594e+00   1.3088083e+00   3.4342562e-01   1.4024091e+00   8.3183672e-01   1.0522594e+00   1.2712749e+00   8.5437498e-01   6.1119558e-01   3.3813251e-01   7.0016860e-01   9.2867113e-01   3.4342562e-01   5.2133179e-01   5.0855778e-01   6.3192325e-01   5.6618864e-01   7.5564478e-01   7.0462844e-01   4.5847767e-01   2.3345511e+00   1.4181033e+00   2.2624227e+00   1.9044571e+00   2.1188381e+00   2.9740725e+00   8.7209348e-01   2.6511588e+00   2.1151751e+00   2.4832720e+00   1.4692287e+00   1.6190709e+00   1.8603115e+00   1.3450304e+00   1.5778323e+00   1.6856949e+00   1.8133657e+00   3.0879393e+00   3.2627356e+00   1.3017553e+00   2.0678448e+00   1.2635708e+00   3.0810441e+00   1.2366675e+00   2.0307764e+00   2.3657459e+00   1.1404856e+00   1.2257611e+00   1.9176961e+00   2.1957105e+00   2.4980314e+00   2.9055191e+00   1.9262438e+00   1.4100098e+00   1.9004485e+00   2.6116431e+00   1.9609333e+00   1.8095574e+00   1.1347620e+00   1.8037909e+00   1.9725464e+00   1.6581521e+00   1.4181033e+00   2.2355461e+00   2.0784269e+00   1.6462102e+00   1.3373104e+00   1.5468618e+00   1.7698041e+00   1.4111252e+00   1.2003596e+00   6.1288055e-01   7.4618926e-01   9.6691372e-01   5.7609230e-01   3.0922892e-01   3.0490481e-01   5.0436965e-01   7.0184453e-01   1.1269424e-01   8.2635069e-01   3.0482299e-01   3.3813251e-01   3.0490481e-01   4.5148429e-01   9.3308891e-01   2.0181667e-01   2.1221982e+00   1.2089191e+00   2.0305682e+00   1.7009400e+00   1.9088256e+00   2.7434081e+00   9.1894698e-01   2.4265154e+00   1.9046790e+00   2.2453370e+00   1.2284047e+00   1.4060413e+00   1.6267848e+00   1.1281352e+00   1.3523310e+00   1.4562730e+00   1.6032169e+00   2.8519346e+00   3.0369970e+00   1.1020600e+00   1.8342569e+00   1.0426638e+00   2.8491513e+00   1.0116721e+00   1.8114932e+00   2.1335035e+00   9.1552373e-01   1.0090312e+00   1.7079369e+00   1.9522117e+00   2.2566913e+00   2.6406601e+00   1.7139238e+00   1.2013529e+00   1.7000137e+00   2.3442222e+00   1.7386523e+00   1.6019500e+00   9.1449234e-01   1.5517970e+00   1.7435092e+00   1.3757183e+00   1.2089191e+00   2.0167186e+00   1.8496945e+00   1.3938438e+00   1.1152390e+00   1.3189663e+00   1.5429659e+00   1.2037520e+00   6.7720957e-01   7.4262850e-01   7.0911112e-01   7.0633229e-01   1.0011648e+00   1.1020600e+00   7.2036951e-01   5.0477564e-01   1.1005460e+00   1.8106900e+00   9.0166431e-01   9.0192695e-01   9.0055475e-01   8.0055465e-01   2.1027376e+00   1.0003198e+00   1.0225570e+00   3.0474106e-01   1.1299441e+00   5.0517282e-01   7.5564478e-01   1.7513222e+00   1.1055799e+00   1.4140515e+00   7.8895472e-01   1.3181953e+00   5.7608844e-01   4.1315633e-01   8.1156529e-01   4.1317535e-01   8.0004523e-01   7.2044167e-01   5.2524663e-01   1.8787830e+00   1.9768256e+00   5.0001522e-01   9.4912864e-01   4.5148429e-01   1.8635775e+00   3.0915245e-01   7.8611860e-01   1.2373911e+00   3.0922892e-01   3.0922892e-01   5.7609230e-01   1.2089834e+00   1.4324608e+00   1.9471600e+00   6.3912943e-01   3.0017653e-01   5.0043842e-01   1.7149040e+00   8.6084272e-01   4.8391482e-01   3.4080442e-01   9.0668287e-01   8.6225026e-01   9.3424659e-01   3.0474106e-01   9.3861512e-01   9.5646231e-01   7.8935898e-01   3.4085233e-01   5.2491734e-01   7.8940551e-01   3.0482299e-01   6.0948506e-01   1.3000044e+00   9.3308891e-01   4.0243965e-01   5.6371422e-01   4.1212852e-01   7.0000303e-01   5.4219811e-01   1.2105001e+00   3.4342562e-01   3.6256305e-01   3.4085233e-01   8.0008964e-01   1.5005854e+00   4.1420960e-01   1.5358856e+00   6.1990228e-01   1.7849054e+00   1.1528477e+00   1.3788456e+00   2.4261894e+00   5.6370994e-01   2.0884901e+00   1.4655452e+00   1.9390732e+00   1.1074834e+00   1.0434746e+00   1.4340155e+00   6.0605366e-01   9.1554656e-01   1.0782857e+00   1.1897288e+00   2.5394068e+00   2.6516318e+00   8.3183606e-01   1.5694554e+00   5.2201750e-01   2.5386539e+00   9.0192695e-01   1.4157600e+00   1.8949500e+00   8.0097499e-01   7.0548138e-01   1.1935069e+00   1.8443040e+00   2.0853276e+00   2.5816887e+00   1.1989547e+00   9.1424659e-01   1.1138955e+00   2.3468430e+00   1.1963432e+00   1.1270327e+00   6.0365948e-01   1.5143051e+00   1.3938114e+00   1.5079206e+00   6.1990228e-01   1.5829749e+00   1.4450801e+00   1.3189240e+00   9.1132198e-01   1.1152300e+00   1.0159134e+00   6.3309012e-01   7.0096858e-01   1.1002025e+00   4.8852375e-01   9.1024401e-01   8.1112984e-01   4.0127250e-01   8.1117067e-01   1.3486924e+00   7.0633229e-01   4.6440171e-01   5.1257987e-01   5.0517282e-01   1.5260594e+00   6.1288055e-01   1.5131090e+00   7.4335736e-01   1.4549432e+00   1.1020600e+00   1.3036236e+00   2.1691920e+00   1.1527669e+00   1.8444686e+00   1.3309288e+00   1.6567564e+00   6.3925756e-01   8.5617086e-01   1.0458540e+00   9.0668287e-01   8.4540285e-01   8.5586571e-01   1.0039209e+00   2.2782572e+00   2.4540263e+00   1.2012866e+00   1.2440282e+00   6.2656178e-01   2.2782572e+00   7.0556260e-01   1.2101609e+00   1.5639802e+00   6.0219099e-01   4.5148429e-01   1.1079931e+00   1.4142064e+00   1.7087610e+00   2.1412345e+00   1.1115204e+00   6.7720957e-01   1.1281352e+00   1.8646736e+00   1.1282162e+00   1.0010209e+00   4.1315633e-01   1.0172673e+00   1.1401191e+00   9.4532171e-01   7.4335736e-01   1.4134218e+00   1.2440229e+00   8.4786353e-01   9.0557807e-01   7.2440846e-01   9.3308853e-01   6.0964891e-01   8.0296037e-01   1.1055799e+00   1.2124837e+00   1.2014191e+00   6.0000952e-01   9.3755356e-01   1.7874653e+00   1.1024913e+00   1.0032296e+00   1.0031018e+00   5.2201750e-01   1.8640262e+00   1.0088926e+00   1.3452347e+00   9.0417295e-01   1.2040344e+00   9.0168933e-01   1.1133986e+00   1.9046783e+00   1.8005318e+00   1.6009504e+00   1.1056691e+00   1.4335330e+00   5.2167829e-01   6.1990228e-01   8.2418141e-01   1.0118233e+00   1.0151880e+00   8.2458478e-01   8.0051115e-01   2.0076819e+00   2.2050331e+00   9.3329017e-01   1.0426638e+00   1.1020600e+00   2.0062587e+00   4.5847767e-01   1.0087393e+00   1.3009222e+00   5.0855778e-01   6.0202028e-01   9.1471442e-01   1.1019505e+00   1.4044980e+00   1.7386523e+00   9.3351278e-01   4.5783248e-01   9.1892454e-01   1.4407364e+00   1.0151880e+00   8.0093081e-01   7.0088627e-01   7.4269200e-01   1.0142482e+00   8.0250123e-01   9.0417295e-01   1.2189645e+00   1.1269510e+00   8.0879701e-01   6.1990228e-01   5.6371422e-01   8.6084272e-01   8.0291749e-01   7.8935813e-01   8.0250123e-01   8.0046685e-01   7.0017011e-01   5.2491734e-01   1.3741813e+00   7.0470720e-01   7.4269314e-01   6.7626502e-01   6.0000635e-01   1.4852616e+00   6.3309012e-01   1.6636721e+00   7.5826453e-01   1.5161847e+00   1.2049539e+00   1.4220925e+00   2.2191056e+00   1.4001717e+00   1.9083789e+00   1.4007861e+00   1.7945122e+00   9.6133119e-01   9.1552373e-01   1.1416778e+00   7.7603846e-01   1.1170561e+00   1.1351073e+00   1.1152390e+00   2.3540839e+00   2.5167781e+00   6.0202028e-01   1.3687074e+00   8.0713433e-01   2.3222107e+00   5.7608844e-01   1.3563898e+00   1.6193612e+00   5.7609230e-01   7.3090905e-01   1.2201578e+00   1.4221192e+00   1.7236083e+00   2.1360791e+00   1.2373857e+00   7.1629168e-01   1.2000731e+00   1.7962160e+00   1.3755348e+00   1.1298552e+00   7.2113820e-01   1.0843962e+00   1.3150470e+00   1.0664292e+00   7.5826453e-01   1.5362595e+00   1.4451976e+00   1.0604287e+00   6.7626502e-01   8.9540816e-01   1.2552585e+00   8.0073117e-01   5.0001522e-01   4.1212852e-01   5.6347549e-01   4.0127250e-01   8.7240114e-01   3.0008832e-01   1.2085435e-01   1.2085435e-01   6.0017982e-01   1.1038933e+00   2.0061436e-01   1.9231154e+00   1.0088926e+00   1.8971338e+00   1.5035330e+00   1.7143629e+00   2.6071033e+00   7.2440846e-01   2.2781292e+00   1.7231818e+00   2.0998984e+00   1.0923537e+00   1.2224463e+00   1.4922544e+00   9.3733589e-01   1.1896725e+00   1.2782589e+00   1.4186216e+00   2.7177641e+00   2.8857013e+00   9.6674360e-01   1.6882618e+00   8.5406616e-01   2.7167827e+00   8.6084272e-01   1.6345263e+00   2.0058565e+00   7.5508853e-01   8.1715593e-01   1.5132180e+00   1.8635428e+00   2.1554613e+00   2.5926811e+00   1.5194972e+00   1.0207533e+00   1.5005626e+00   2.3165875e+00   1.5429659e+00   1.4098467e+00   7.2036819e-01   1.4724918e+00   1.5757929e+00   1.3838027e+00   1.0088926e+00   1.8378491e+00   1.6745686e+00   1.2948699e+00   9.4912864e-01   1.1635325e+00   1.3473688e+00   1.0032293e+00   4.0004442e-01   6.9509552e-01   3.0017653e-01   7.1708289e-01   2.2573593e-01   5.0085236e-01   4.0243965e-01   7.0548138e-01   1.0008617e+00   3.0482299e-01   2.0206913e+00   1.1056785e+00   2.0075255e+00   1.6053217e+00   1.8156855e+00   2.7170183e+00   6.3912709e-01   2.3873965e+00   1.8286172e+00   2.2132187e+00   1.2079042e+00   1.3276450e+00   1.6018644e+00   1.0207396e+00   1.2397507e+00   1.3715471e+00   1.5245240e+00   2.8327619e+00   2.9941199e+00   1.0032443e+00   1.7962160e+00   9.3329055e-01   2.8269181e+00   9.6936870e-01   1.7435156e+00   2.1174156e+00   8.6084272e-01   9.2351241e-01   1.6144550e+00   1.9761215e+00   2.2674248e+00   2.7114616e+00   1.6190709e+00   1.1282247e+00   1.6009322e+00   2.4285500e+00   1.6432478e+00   1.5147271e+00   8.2512420e-01   1.5839544e+00   1.6753044e+00   1.4829434e+00   1.1056785e+00   1.9427965e+00   1.7734131e+00   1.3908238e+00   1.0498226e+00   1.2712749e+00   1.4523130e+00   1.1044111e+00   6.0980961e-01   4.1209001e-01   1.1020600e+00   2.0181667e-01   4.0243965e-01   3.0922892e-01   7.0088627e-01   1.4001688e+00   3.0922892e-01   1.6797901e+00   7.8935898e-01   1.7574606e+00   1.2224463e+00   1.4618181e+00   2.4274025e+00   6.3165225e-01   2.0887499e+00   1.4865883e+00   1.9561612e+00   1.0664292e+00   1.0336863e+00   1.3939836e+00   8.2421923e-01   1.2089895e+00   1.1997296e+00   1.1938630e+00   2.5462062e+00   2.6763758e+00   6.4049114e-01   1.5645185e+00   8.0883916e-01   2.5391583e+00   8.3183672e-01   1.4351453e+00   1.8644317e+00   7.4618926e-01   6.9987517e-01   1.2680580e+00   1.7844580e+00   2.0440071e+00   2.5329067e+00   1.2921474e+00   8.5440680e-01   1.2036924e+00   2.2838099e+00   1.3737025e+00   1.1587585e+00   6.4620889e-01   1.4491800e+00   1.4507713e+00   1.4583848e+00   7.8935898e-01   1.6277433e+00   1.5384791e+00   1.3150470e+00   8.7209348e-01   1.0788651e+00   1.2179890e+00   7.4954884e-01   6.1135434e-01   1.3790270e+00   5.2491734e-01   4.5147187e-01   4.5080200e-01   3.0026460e-01   1.6179159e+00   5.2167829e-01   1.4543196e+00   5.6838732e-01   1.3502290e+00   1.0008620e+00   1.2192919e+00   2.0611274e+00   1.2013529e+00   1.7369589e+00   1.2053003e+00   1.5767956e+00   6.3925756e-01   7.1779518e-01   9.6131279e-01   6.4620889e-01   1.0032443e+00   9.3331138e-01   9.0279223e-01   2.1713885e+00   2.3476282e+00   8.0245903e-01   1.1755517e+00   6.3322667e-01   2.1693131e+00   4.2362917e-01   1.1187430e+00   1.4544336e+00   4.0246123e-01   4.1209001e-01   1.0208844e+00   1.3018144e+00   1.5969056e+00   2.0303761e+00   1.0427944e+00   5.0085236e-01   1.0008465e+00   1.7574039e+00   1.1274284e+00   9.0166476e-01   4.0125062e-01   9.3437551e-01   1.1319099e+00   9.6935134e-01   5.6838732e-01   1.3309288e+00   1.2428507e+00   9.2745734e-01   5.7630313e-01   6.8160885e-01   9.6672602e-01   5.2167208e-01   8.5440680e-01   2.2608083e-01   4.0125062e-01   3.0490481e-01   4.2270142e-01   1.0207262e+00   2.0181667e-01   2.0282636e+00   1.1133895e+00   1.9386586e+00   1.6012719e+00   1.8114342e+00   2.6515677e+00   9.0999313e-01   2.3322945e+00   1.8060515e+00   2.1578375e+00   1.1447365e+00   1.3085752e+00   1.5359734e+00   1.0426516e+00   1.3018144e+00   1.3779960e+00   1.5044724e+00   2.7627283e+00   2.9432651e+00   1.0010209e+00   1.7447170e+00   9.6576136e-01   2.7579768e+00   9.1892454e-01   1.7159977e+00   2.0420308e+00   8.2635069e-01   9.1576742e-01   1.6105700e+00   1.8662195e+00   2.1696258e+00   2.5680120e+00   1.6184785e+00   1.1020600e+00   1.6000183e+00   2.2731185e+00   1.6529028e+00   1.5029725e+00   8.2635069e-01   1.4699000e+00   1.6570292e+00   1.3301857e+00   1.1133895e+00   1.9214944e+00   1.7646791e+00   1.3272142e+00   1.0235120e+00   1.2275665e+00   1.4621584e+00   1.1060939e+00   9.1576742e-01   9.6133119e-01   9.4532171e-01   1.2662318e+00   3.0490481e-01   8.6084272e-01   2.7230933e+00   1.8083405e+00   2.7192500e+00   2.3152780e+00   2.5278895e+00   3.4307167e+00   1.2089253e+00   3.1023107e+00   2.5446557e+00   2.9238544e+00   1.9071235e+00   2.0445123e+00   2.3113306e+00   1.7148932e+00   1.8686471e+00   2.0692591e+00   2.2408459e+00   3.5448121e+00   3.7102716e+00   1.7134856e+00   2.5076804e+00   1.6187837e+00   3.5398901e+00   1.6780493e+00   2.4594169e+00   2.8277283e+00   1.5698091e+00   1.6365650e+00   2.3270565e+00   2.6739856e+00   2.9710335e+00   3.3954286e+00   2.3304578e+00   1.8446316e+00   2.3054869e+00   3.1050823e+00   2.3405162e+00   2.2288004e+00   1.5327217e+00   2.2740189e+00   2.3840998e+00   2.1122339e+00   1.8083405e+00   2.6588338e+00   2.4791402e+00   2.0688078e+00   1.7632513e+00   1.9828965e+00   2.1428811e+00   1.8095574e+00   3.0017653e-01   2.0061436e-01   6.0017982e-01   1.2012991e+00   1.2085435e-01   1.8301371e+00   9.1424659e-01   1.8223693e+00   1.4049093e+00   1.6190709e+00   2.5271432e+00   7.0556260e-01   2.1953731e+00   1.6303102e+00   2.0261311e+00   1.0363096e+00   1.1330692e+00   1.4229011e+00   8.5406674e-01   1.1527746e+00   1.2106302e+00   1.3261864e+00   2.6410980e+00   2.8004332e+00   8.1117067e-01   1.6146557e+00   7.8886054e-01   2.6375763e+00   7.9824795e-01   1.5471213e+00   1.9317133e+00   6.9509552e-01   7.3155911e-01   1.4182194e+00   1.8031267e+00   2.0887452e+00   2.5422790e+00   1.4267527e+00   9.3308891e-01   1.4006149e+00   2.2706274e+00   1.4614246e+00   1.3141581e+00   6.4049114e-01   1.4230277e+00   1.5004249e+00   1.3669148e+00   9.1424659e-01   1.7490906e+00   1.5981930e+00   1.2553121e+00   8.7212232e-01   1.0924484e+00   1.2731059e+00   9.0557807e-01   1.1269424e-01   5.0002283e-01   1.2049541e+00   2.0121983e-01   1.8447840e+00   9.3329055e-01   1.7901165e+00   1.4035225e+00   1.6222582e+00   2.4980210e+00   8.1757693e-01   2.1693127e+00   1.6187837e+00   2.0049100e+00   1.0151397e+00   1.1261381e+00   1.3938113e+00   9.0657539e-01   1.2362756e+00   1.2472959e+00   1.3154932e+00   2.6088344e+00   2.7785257e+00   9.0207914e-01   1.5972548e+00   8.5406674e-01   2.6071034e+00   7.7652636e-01   1.5358856e+00   1.8953567e+00   6.9518117e-01   7.4612718e-01   1.4220925e+00   1.7511588e+00   2.0440071e+00   2.4804818e+00   1.4362913e+00   9.1449234e-01   1.4003402e+00   2.2077377e+00   1.4867147e+00   1.3085752e+00   6.7720780e-01   1.3734975e+00   1.5100598e+00   1.3269962e+00   9.3329055e-01   1.7441015e+00   1.6143613e+00   1.2552584e+00   8.7796615e-01   1.0782751e+00   1.3029195e+00   9.1424659e-01   5.0000761e-01   1.2040406e+00   1.1269424e-01   1.8289847e+00   9.1424701e-01   1.7872748e+00   1.4023776e+00   1.6144390e+00   2.4974488e+00   8.0533198e-01   2.1691714e+00   1.6179842e+00   1.9948417e+00   9.9013884e-01   1.1186586e+00   1.3842454e+00   8.5583357e-01   1.1527671e+00   1.1990152e+00   1.3139296e+00   2.6085083e+00   2.7775771e+00   8.5440680e-01   1.5835478e+00   7.8886139e-01   2.6068470e+00   7.5508853e-01   1.5300146e+00   1.8950932e+00   6.5712813e-01   7.2036951e-01   1.4134189e+00   1.7511120e+00   2.0435901e+00   2.4807480e+00   1.4220898e+00   9.1424701e-01   1.4002005e+00   2.2048860e+00   1.4562730e+00   1.3069754e+00   6.3309258e-01   1.3632211e+00   1.4815986e+00   1.2921474e+00   9.1424701e-01   1.7351894e+00   1.5836236e+00   1.2085436e+00   8.4725834e-01   1.0597879e+00   1.2653025e+00   9.0508756e-01   1.3743342e+00   5.0043084e-01   1.7369589e+00   8.2635069e-01   1.6144390e+00   1.3008770e+00   1.5131090e+00   2.3226028e+00   1.3004854e+00   2.0107294e+00   1.5010034e+00   1.8390199e+00   8.5471446e-01   1.0087539e+00   1.2223855e+00   8.0073117e-01   1.1286018e+00   1.1270411e+00   1.2013529e+00   2.4290388e+00   2.6198428e+00   7.8895472e-01   1.4363167e+00   7.7598796e-01   2.4266979e+00   6.3178782e-01   1.4100098e+00   1.7134977e+00   5.6347549e-01   6.3165225e-01   1.3130978e+00   1.5237265e+00   1.8289379e+00   2.1979419e+00   1.3253497e+00   8.0004602e-01   1.3000455e+00   1.9028805e+00   1.3748188e+00   1.2012991e+00   5.6371422e-01   1.1400420e+00   1.3748220e+00   1.0597992e+00   8.2635069e-01   1.6184929e+00   1.4858469e+00   1.0797702e+00   7.4612830e-01   9.3329055e-01   1.1910002e+00   8.0923926e-01   1.1056785e+00   3.0089448e+00   2.1019570e+00   2.9563162e+00   2.6052626e+00   2.8107271e+00   3.6717374e+00   1.5012719e+00   3.3522198e+00   2.8186527e+00   3.1596417e+00   2.1362161e+00   2.3151198e+00   2.5461024e+00   2.0036629e+00   2.1224665e+00   2.3234228e+00   2.5150159e+00   3.7801779e+00   3.9623034e+00   2.0033816e+00   2.7467405e+00   1.9044216e+00   3.7784933e+00   1.9231092e+00   2.7237438e+00   3.0623796e+00   1.8186729e+00   1.9089573e+00   2.6097166e+00   2.8846684e+00   3.1885494e+00   3.5706709e+00   2.6109888e+00   2.1139043e+00   2.6017555e+00   3.2706949e+00   2.6138780e+00   2.5099937e+00   1.8069857e+00   2.4748863e+00   2.6338874e+00   2.2385678e+00   2.1019570e+00   2.9251726e+00   2.7321685e+00   2.2661994e+00   2.0190735e+00   2.2288464e+00   2.4131370e+00   2.1020441e+00   1.9226845e+00   1.0087252e+00   1.8684939e+00   1.5017097e+00   1.7108631e+00   2.5816562e+00   8.0533198e-01   2.2563154e+00   1.7134977e+00   2.0770423e+00   1.0604287e+00   1.2124777e+00   1.4620239e+00   9.3329017e-01   1.1896594e+00   1.2705641e+00   1.4098496e+00   2.6923501e+00   2.8659663e+00   9.1449234e-01   1.6637458e+00   8.5403428e-01   2.6902417e+00   8.3183672e-01   1.6225614e+00   1.9757175e+00   7.3084048e-01   8.1117067e-01   1.5097082e+00   1.8197097e+00   2.1169795e+00   2.5408329e+00   1.5160570e+00   1.0087393e+00   1.5001233e+00   2.2573596e+00   1.5423651e+00   1.4049376e+00   7.1708289e-01   1.4229011e+00   1.5611429e+00   1.3142952e+00   1.0087252e+00   1.8271493e+00   1.6639408e+00   1.2552635e+00   9.2768675e-01   1.1400420e+00   1.3479052e+00   1.0031018e+00   9.3184922e-01   8.0291749e-01   7.0910969e-01   3.4342562e-01   1.3028005e+00   1.6474201e+00   1.0216374e+00   8.5586571e-01   9.0026543e-01   9.0508756e-01   7.7598796e-01   5.7832449e-01   1.0522594e+00   9.0999313e-01   7.0008735e-01   7.1708289e-01   1.4049376e+00   1.4220925e+00   1.2553121e+00   6.0202028e-01   1.1170561e+00   1.4055109e+00   1.1186497e+00   4.5783248e-01   9.3306769e-01   1.2101609e+00   1.1134939e+00   5.3914287e-01   1.0144117e+00   1.1074742e+00   1.6007365e+00   5.2491734e-01   1.0797700e+00   1.1139044e+00   1.4000349e+00   4.0004442e-01   7.1629303e-01   1.2090477e+00   6.8170466e-01   4.5148429e-01   9.1427000e-01   9.3184922e-01   5.0043842e-01   4.1209001e-01   8.0296037e-01   1.0498226e+00   8.0928056e-01   6.0018299e-01   9.3446811e-01   1.3131410e+00   5.6371422e-01   7.8985507e-01   1.8949500e+00   9.1427000e-01   1.5639785e+00   9.3308891e-01   1.4501583e+00   7.1621748e-01   6.0017665e-01   1.0010209e+00   2.0181667e-01   5.0000761e-01   6.3925756e-01   7.0548283e-01   2.0162299e+00   2.0885102e+00   5.2167829e-01   1.1079931e+00   2.2608083e-01   2.0057464e+00   5.0043084e-01   9.2747919e-01   1.4186217e+00   4.1212852e-01   3.4085233e-01   6.3178782e-01   1.4043632e+00   1.6175925e+00   2.1298991e+00   6.3309258e-01   5.2133179e-01   5.6595908e-01   1.9078843e+00   7.4418186e-01   6.1830764e-01   3.4085233e-01   1.1006468e+00   9.1132198e-01   1.1010711e+00   0.0000000e+00   1.0458540e+00   9.3984267e-01   9.0166476e-01   5.0043084e-01   7.0088627e-01   7.0993998e-01   3.0017653e-01   8.0093160e-01   6.0000635e-01   7.1621613e-01   2.2268632e+00   4.1317535e-01   5.2491734e-01   6.0964891e-01   8.2421923e-01   7.4335736e-01   4.1209001e-01   1.4186217e+00   1.3131410e+00   7.4275547e-01   6.1119267e-01   9.1566538e-01   1.0095513e+00   1.1796101e+00   2.5399984e-01   1.5237074e+00   8.2421923e-01   1.0429127e+00   4.1315633e-01   3.0490481e-01   1.1528553e+00   1.1270325e+00   7.0096708e-01   5.0001522e-01   3.1328089e-01   9.0657583e-01   7.0096858e-01   9.1568820e-01   1.0216374e+00   6.0035305e-01   8.0337471e-01   7.0548283e-01   1.2396937e+00   5.0043084e-01   4.2270142e-01   8.0008964e-01   1.3131410e+00   3.0915245e-01   4.5847767e-01   7.0470720e-01   9.6936870e-01   7.4262964e-01   9.0645118e-01   1.2190260e+00   4.0246123e-01   1.3450652e+00   1.4544312e+00   1.0207258e+00   4.5147187e-01   9.6501813e-01   5.0517282e-01   3.0490481e-01   5.0437695e-01   6.8170466e-01   6.5712813e-01   5.0855778e-01   2.0121983e-01   1.4695463e+00   1.5267750e+00   7.4395693e-01   6.3309258e-01   7.8890806e-01   1.4542932e+00   7.0008432e-01   4.5784410e-01   9.0166431e-01   8.0000160e-01   7.0008584e-01   3.0017653e-01   9.0005094e-01   1.1019505e+00   1.6144405e+00   4.0004442e-01   5.0436965e-01   4.1315633e-01   1.4012283e+00   6.3164729e-01   2.0121983e-01   8.0046685e-01   6.0219099e-01   6.0964597e-01   6.5724028e-01   5.6371422e-01   5.6838732e-01   7.0911112e-01   5.3914287e-01   6.0948506e-01   4.0246123e-01   5.6371422e-01   5.2133179e-01   1.1281267e+00   1.6745375e+00   8.1112984e-01   5.2167208e-01   7.4395693e-01   7.0016860e-01   5.0855778e-01   3.3813251e-01   9.0659977e-01   7.8895472e-01   5.0043842e-01   4.1209001e-01   1.2528048e+00   1.3020492e+00   9.3861512e-01   4.0127250e-01   1.0142766e+00   1.2362810e+00   9.0168933e-01   3.0490481e-01   7.0478886e-01   1.0010209e+00   9.0279223e-01   2.2608083e-01   7.4262850e-01   9.0055475e-01   1.4109657e+00   2.2573593e-01   7.8895472e-01   8.0492246e-01   1.2000668e+00   4.0363334e-01   4.1212852e-01   1.0039060e+00   4.5080200e-01   2.4195741e-01   7.0462844e-01   7.8985507e-01   3.0490481e-01   3.4085233e-01   6.0017982e-01   8.0928056e-01   6.0017665e-01   4.5784410e-01   7.4612718e-01   2.7992301e+00   3.6259865e-01   9.6953662e-01   6.4620889e-01   1.5401330e+00   1.4140789e+00   1.1281265e+00   2.0058560e+00   1.8949500e+00   1.4140515e+00   1.2396937e+00   8.0000239e-01   4.1317535e-01   1.8064092e+00   9.3310976e-01   2.1167364e+00   2.0181667e-01   1.7570696e+00   1.0143975e+00   6.1135434e-01   1.8661434e+00   1.8197089e+00   1.2632995e+00   8.1112909e-01   5.0126466e-01   8.0051115e-01   1.2632996e+00   1.5975200e+00   1.5266891e+00   5.0043084e-01   1.3452695e+00   1.3018553e+00   1.9314575e+00   1.2089192e+00   1.0777307e+00   1.5030978e+00   1.8949500e+00   8.5409862e-01   1.0151880e+00   1.4180463e+00   1.6742781e+00   1.4542907e+00   1.4853863e+00   1.8197089e+00   2.4725511e+00   1.8443040e+00   2.3518103e+00   1.6032169e+00   1.5066818e+00   1.9080163e+00   8.0923851e-01   9.4532171e-01   1.5109394e+00   1.6179000e+00   2.9132779e+00   2.9705619e+00   1.1020600e+00   2.0185049e+00   7.0633229e-01   2.9085831e+00   1.4001717e+00   1.8310931e+00   2.3325127e+00   1.3000908e+00   1.2016381e+00   1.5402579e+00   2.3143334e+00   2.5314248e+00   3.0393618e+00   1.5405402e+00   1.4018011e+00   1.3018553e+00   2.8185850e+00   1.4728279e+00   1.5248833e+00   1.1020506e+00   2.0036931e+00   1.8191683e+00   2.0009584e+00   9.1427000e-01   1.9534067e+00   1.8336293e+00   1.8020058e+00   1.4006178e+00   1.6026130e+00   1.3506710e+00   1.0116724e+00   6.3912709e-01   7.8890806e-01   1.2190319e+00   1.0776296e+00   8.0923926e-01   1.6740888e+00   1.5650163e+00   1.0798806e+00   9.0155438e-01   9.0417295e-01   6.4049114e-01   1.4685147e+00   6.4049114e-01   1.7843537e+00   4.5148429e-01   1.4324350e+00   6.8261201e-01   3.3813251e-01   1.5401311e+00   1.4852570e+00   9.3329055e-01   5.0043842e-01   2.0181667e-01   9.1424701e-01   9.3424697e-01   1.2633467e+00   1.2093243e+00   5.2167829e-01   1.0313359e+00   9.6574336e-01   1.5965767e+00   9.0168933e-01   7.7603846e-01   1.2016443e+00   1.5639785e+00   5.7832449e-01   7.7882758e-01   1.1074742e+00   1.3452311e+00   1.1281352e+00   1.1558746e+00   1.4852570e+00   1.1153247e+00   7.8895472e-01   5.0477564e-01   5.0855778e-01   1.0426636e+00   9.4532171e-01   7.3155911e-01   5.0476836e-01   1.3669148e+00   1.1910003e+00   8.5471446e-01   7.1629303e-01   1.1528553e+00   1.0777411e+00   9.0142636e-01   8.0046685e-01   7.1629168e-01   1.0032293e+00   9.1892413e-01   3.6452132e-01   5.6370994e-01   7.0176271e-01   1.4157327e+00   4.2362917e-01   7.0633229e-01   6.0964891e-01   1.0062544e+00   9.1554656e-01   6.0365948e-01   1.0235118e+00   6.1135434e-01   6.7626502e-01   7.5508853e-01   9.3308891e-01   7.1621884e-01   8.5403428e-01   6.5712608e-01   8.0245824e-01   6.3192325e-01   9.1132198e-01   8.6051414e-01   1.0242692e+00   1.0232576e+00   6.8685125e-01   1.5761415e+00   1.4407364e+00   9.0296858e-01   8.3689956e-01   6.3322667e-01   1.0451812e+00   1.5490134e+00   4.5847767e-01   1.6529028e+00   8.3916809e-01   1.2749306e+00   5.4219811e-01   7.0462697e-01   1.3611955e+00   1.3103292e+00   9.0792879e-01   9.1446896e-01   8.2421853e-01   7.1708289e-01   9.0683128e-01   1.1954899e+00   1.2957636e+00   6.3178534e-01   9.0508756e-01   8.7796615e-01   1.4198077e+00   7.2113820e-01   6.0427481e-01   1.0032443e+00   1.4501583e+00   4.5216167e-01   5.2491131e-01   9.1894698e-01   1.2738390e+00   9.4912864e-01   1.0207533e+00   1.3523292e+00   5.0043842e-01   4.1317535e-01   8.5403428e-01   7.0910969e-01   3.0482299e-01   4.0243965e-01   1.6491696e+00   1.8289467e+00   1.0060994e+00   6.1119267e-01   9.0142636e-01   1.6484371e+00   5.0126466e-01   6.0018299e-01   9.3308853e-01   4.2362917e-01   4.0363334e-01   5.2133802e-01   7.9153339e-01   1.0782107e+00   1.5275160e+00   5.2167829e-01   5.2167208e-01   6.9987517e-01   1.2633516e+00   5.2201750e-01   4.0127250e-01   5.0517282e-01   4.1212852e-01   5.2167829e-01   4.1210927e-01   7.1621748e-01   8.0093081e-01   6.3178782e-01   3.0922892e-01   7.0008735e-01   2.0061436e-01   3.6452132e-01   6.0035305e-01   4.1420960e-01   7.0096858e-01   6.3178782e-01   5.2132556e-01   3.0490481e-01   1.5634961e+00   1.6740875e+00   5.4219811e-01   5.8750389e-01   8.0245903e-01   1.5263478e+00   4.0004442e-01   6.1135434e-01   8.6051471e-01   5.0043842e-01   4.2270142e-01   3.0482299e-01   8.0967961e-01   1.0426513e+00   1.5757929e+00   3.3813251e-01   4.0127250e-01   5.0855778e-01   1.3133662e+00   7.1700909e-01   4.0125062e-01   5.2491734e-01   5.2167829e-01   5.2838320e-01   5.3943256e-01   6.0017665e-01   6.4620889e-01   6.8261201e-01   4.2270142e-01   3.0482299e-01   3.0026460e-01   7.0470867e-01   5.0477564e-01   1.1038840e+00   1.0010209e+00   4.0363334e-01   3.3808272e-01   1.2528049e+00   1.4182049e+00   9.2033101e-01   2.4195741e-01   1.2036925e+00   1.2362756e+00   6.3451734e-01   3.0482299e-01   5.2524663e-01   7.4335736e-01   7.4329414e-01   4.0125062e-01   5.2491131e-01   6.7636452e-01   1.1755449e+00   4.0127250e-01   6.3925756e-01   7.9148746e-01   9.1424659e-01   5.2491734e-01   4.1210927e-01   8.5437440e-01   1.2085435e-01   3.0026460e-01   4.0127250e-01   1.0010209e+00   4.0243965e-01   4.1317535e-01   3.0482299e-01   6.0444249e-01   3.3813251e-01   6.0964891e-01   9.0166431e-01   4.1212852e-01   7.8985507e-01   8.1719606e-01   2.1378157e+00   2.2009978e+00   5.0855077e-01   1.2175952e+00   3.0017653e-01   2.1167404e+00   6.0035621e-01   1.0597879e+00   1.5265797e+00   5.0517282e-01   5.2167829e-01   7.4329527e-01   1.5072282e+00   1.7227391e+00   2.2434054e+00   7.4335736e-01   6.3309258e-01   6.8161057e-01   2.0107350e+00   9.2867113e-01   7.5508853e-01   5.0517282e-01   1.2040344e+00   1.0178820e+00   1.2037520e+00   2.0181667e-01   1.1636098e+00   1.0621172e+00   1.0032443e+00   6.0000317e-01   8.0883841e-01   9.0668287e-01   5.0085236e-01   6.0964891e-01   7.4618926e-01   2.0118073e+00   2.0884859e+00   9.1424701e-01   1.1060939e+00   4.0243965e-01   2.0057764e+00   6.3178782e-01   9.1916394e-01   1.4198627e+00   6.1119267e-01   6.0219099e-01   6.3309012e-01   1.4134218e+00   1.6179000e+00   2.1265315e+00   6.3178534e-01   9.0506254e-01   1.0032443e+00   1.9078396e+00   6.5712608e-01   6.8261201e-01   6.0219099e-01   1.1003034e+00   9.0532049e-01   1.1001014e+00   5.0000761e-01   1.0433444e+00   9.1892454e-01   9.0002615e-01   5.6595908e-01   7.0470867e-01   6.1119558e-01   6.0017982e-01   5.0085236e-01   1.5275160e+00   1.6747664e+00   1.0434746e+00   5.2132556e-01   8.0533198e-01   1.5264802e+00   5.7609230e-01   4.1317535e-01   8.6051414e-01   5.7630313e-01   5.2524663e-01   4.1315633e-01   8.6054545e-01   1.0440350e+00   1.5412701e+00   4.1210927e-01   8.0250202e-01   9.1471442e-01   1.3130978e+00   3.0490481e-01   5.0043084e-01   5.7630313e-01   5.0043842e-01   3.3818226e-01   5.0043084e-01   6.3925756e-01   6.0948212e-01   4.1317535e-01   3.0482299e-01   7.0548283e-01   3.0490481e-01   2.2573593e-01   5.6394820e-01   1.3634093e+00   1.4858469e+00   8.1757693e-01   5.2201750e-01   9.1427000e-01   1.3523380e+00   6.0201716e-01   3.4342562e-01   7.1629168e-01   7.0096708e-01   6.0948212e-01   3.0490481e-01   7.0096708e-01   9.1424701e-01   1.4267554e+00   4.0127250e-01   4.1420960e-01   4.8342635e-01   1.2049539e+00   6.0964891e-01   1.1269424e-01   7.1621613e-01   4.1212852e-01   6.0018299e-01   5.3914287e-01   7.0548283e-01   5.2524663e-01   7.0105084e-01   5.0476836e-01   5.6371422e-01   3.0474106e-01   5.2491734e-01   6.0948212e-01   1.2000065e+00   2.0187441e+00   1.0498228e+00   2.2315584e+00   1.0000152e+00   1.8808952e+00   1.1286798e+00   7.5826453e-01   1.9821126e+00   1.9334872e+00   1.4094023e+00   9.7944085e-01   1.0090312e+00   3.0915245e-01   1.4094022e+00   1.7226330e+00   1.6785116e+00   8.2418071e-01   1.4544336e+00   1.4183053e+00   2.0448570e+00   1.3189240e+00   1.1989547e+00   1.6071563e+00   2.0162299e+00   9.7599312e-01   1.1287691e+00   1.5299044e+00   1.8304280e+00   1.5694554e+00   1.5966664e+00   1.9334872e+00   2.0448570e+00   1.2223853e+00   2.3135239e+00   3.0915245e-01   2.0415522e+00   1.2703001e+00   9.2351241e-01   2.1487275e+00   2.0854181e+00   1.4650300e+00   1.1157320e+00   8.0296037e-01   1.2013591e+00   1.4650276e+00   1.8684939e+00   1.6818191e+00   8.0245746e-01   1.5324961e+00   1.5271597e+00   2.1953922e+00   1.5071120e+00   1.3457716e+00   1.8029854e+00   2.0885102e+00   1.0837575e+00   1.2703001e+00   1.7133162e+00   1.9522053e+00   1.7369702e+00   1.6941963e+00   2.0286286e+00   1.1213597e+00   6.3912943e-01   1.9163315e+00   5.0855778e-01   1.1310337e+00   1.3142952e+00   6.0219099e-01   8.0046764e-01   7.2904264e-01   1.2366099e+00   1.4559030e+00   2.0467625e+00   7.7882758e-01   6.0184622e-01   6.0948800e-01   1.7296063e+00   1.2395260e+00   9.0668287e-01   8.0051036e-01   1.0231745e+00   1.0411548e+00   1.0543951e+00   5.2167829e-01   1.1356187e+00   1.2079042e+00   9.3439622e-01   4.2268438e-01   8.1719606e-01   1.2192978e+00   8.0046764e-01   1.3133662e+00   1.0434746e+00   8.3916809e-01   2.2573593e-01   5.0855077e-01   9.3848935e-01   9.0659977e-01   5.2167829e-01   7.0096858e-01   5.5450500e-01   1.0287902e+00   5.2133802e-01   8.4725834e-01   9.7599312e-01   8.0250123e-01   6.0018299e-01   5.6371422e-01   1.0171340e+00   3.0482299e-01   2.0181667e-01   6.0000317e-01   1.1079931e+00   2.0061436e-01   2.2573593e-01   5.0084481e-01   8.1683095e-01   5.2524663e-01   7.0096708e-01   1.0116865e+00   2.2278855e+00   7.0008584e-01   1.1298552e+00   1.6300950e+00   6.0017982e-01   5.0084481e-01   8.5403428e-01   1.6097507e+00   1.8284464e+00   2.3350903e+00   8.5406616e-01   7.1629168e-01   7.5508853e-01   2.1138813e+00   8.1683095e-01   8.2462252e-01   4.0246123e-01   1.3009222e+00   1.1139906e+00   1.3000951e+00   2.2608083e-01   1.2636227e+00   1.1315710e+00   1.1002119e+00   7.0088627e-01   9.0029018e-01   6.9600743e-01   3.1328089e-01   1.8661354e+00   1.1286798e+00   7.2044167e-01   1.9755679e+00   1.9314520e+00   1.3741466e+00   9.0645118e-01   6.0184622e-01   1.0001751e+00   1.3741498e+00   1.7083042e+00   1.6308665e+00   6.0201716e-01   1.4559030e+00   1.4140789e+00   2.0433026e+00   1.3131370e+00   1.1900969e+00   1.6049479e+00   2.0057464e+00   9.6691372e-01   1.1304042e+00   1.5237285e+00   1.7843627e+00   1.5639785e+00   1.5975352e+00   1.9314520e+00   8.2671175e-01   1.1543257e+00   1.2085435e-01   3.0474106e-01   7.0088627e-01   1.0144117e+00   1.3018103e+00   1.7709153e+00   7.0462844e-01   3.0482299e-01   7.0470867e-01   1.4857440e+00   8.1457587e-01   6.0948506e-01   3.3813251e-01   6.4049114e-01   7.4954884e-01   6.3925756e-01   5.0043084e-01   1.0090834e+00   8.7372177e-01   5.2838320e-01   2.0121983e-01   3.4342562e-01   7.3084171e-01   4.1315633e-01   5.0855778e-01   9.1024401e-01   8.2498722e-01   5.0436965e-01   5.6595908e-01   7.2044167e-01   1.2101609e+00   5.0437695e-01   6.9987517e-01   8.1457660e-01   1.0010209e+00   4.1212852e-01   3.4342562e-01   9.3351278e-01   3.0915245e-01   3.0482299e-01   6.0052920e-01   9.2747919e-01   2.2608083e-01   4.0000000e-01   5.0476836e-01   8.5586571e-01   5.0477564e-01   5.0477564e-01   8.2498722e-01   1.2635707e+00   1.2396421e+00   8.0533198e-01   2.4170870e-01   4.0127250e-01   7.4618926e-01   8.0726668e-01   1.0151880e+00   1.1066159e+00   5.6371422e-01   9.1554656e-01   8.0879701e-01   1.3523345e+00   6.0366256e-01   6.3912943e-01   9.0532093e-01   1.4186217e+00   5.2133179e-01   7.1700909e-01   8.1719606e-01   1.0923439e+00   8.5409862e-01   1.0116865e+00   1.3253496e+00   2.0121983e-01   8.0051036e-01   1.1269596e+00   1.4140457e+00   1.8721285e+00   8.0250123e-01   3.3813251e-01   8.0250202e-01   1.5969056e+00   8.4536936e-01   7.0096708e-01   2.2538848e-01   7.4395693e-01   8.3222261e-01   7.1779518e-01   4.1212852e-01   1.1079931e+00   9.4151244e-01   5.7630313e-01   3.0490481e-01   4.1420960e-01   6.9509395e-01   3.4080442e-01   7.0184453e-01   1.1527745e+00   1.4140486e+00   1.8971345e+00   7.0556260e-01   3.1328089e-01   7.0910969e-01   1.6486410e+00   7.4618926e-01   6.0184622e-01   1.1269424e-01   8.0923926e-01   7.7598796e-01   8.0883916e-01   3.4085233e-01   1.0235254e+00   8.7240114e-01   6.3309012e-01   5.0043842e-01   4.1315633e-01   5.7609230e-01   2.2538848e-01   8.0888055e-01   1.0030868e+00   1.5299044e+00   1.0000000e-01   6.3164977e-01   7.0096708e-01   1.3008855e+00   6.0184622e-01   3.3813251e-01   8.0296037e-01   5.0476836e-01   3.6256305e-01   5.6618864e-01   6.3178782e-01   4.5847767e-01   5.2491734e-01   4.1420960e-01   6.0202028e-01   4.0127250e-01   6.0052920e-01   5.6618864e-01   3.4342562e-01   8.7372177e-01   8.2425704e-01   9.3308891e-01   1.1005554e+00   7.1700774e-01   9.6674360e-01   8.0051115e-01   1.2632995e+00   5.2491734e-01   8.0883916e-01   7.8935898e-01   1.4043632e+00   7.0470867e-01   9.0532093e-01   7.5502989e-01   9.6953662e-01   7.4612718e-01   1.0222576e+00   1.3061180e+00   1.0032296e+00   1.0032293e+00   1.1900276e+00   1.3017553e+00   4.1315633e-01   1.1093621e+00   1.0088783e+00   1.5263498e+00   7.1708289e-01   7.3155911e-01   1.0040629e+00   1.6175925e+00   6.1845783e-01   7.5826453e-01   9.3426769e-01   1.2396937e+00   1.0142626e+00   1.2128138e+00   1.5237074e+00   1.5299064e+00   1.6885111e+00   1.8315348e+00   8.0097499e-01   1.6050900e+00   1.5160591e+00   2.0074169e+00   1.1389082e+00   1.2275665e+00   1.3502668e+00   2.1298991e+00   1.1075720e+00   1.2113964e+00   1.3632538e+00   1.7639471e+00   1.4922544e+00   1.7133283e+00   2.0290146e+00   7.1621748e-01   8.0051036e-01   1.3008813e+00   6.0017982e-01   4.1210927e-01   8.0492246e-01   5.0477564e-01   3.4080442e-01   5.6595908e-01   6.3309258e-01   4.5784410e-01   5.0855778e-01   4.1317535e-01   6.0366256e-01   4.0246123e-01   6.0035621e-01   5.7630313e-01   5.0085236e-01   1.4407390e+00   9.1892413e-01   4.2270142e-01   3.6452132e-01   6.7824250e-01   9.0668287e-01   8.2458409e-01   5.2133179e-01   9.0792879e-01   1.0124729e+00   8.0250202e-01   4.1210927e-01   5.0085236e-01   8.2458478e-01   4.1315633e-01   1.6100639e+00   1.0426636e+00   5.2491734e-01   8.0488008e-01   8.6054545e-01   1.0116721e+00   9.7291273e-01   5.6595908e-01   9.4532171e-01   1.1186499e+00   9.1681464e-01   6.3178782e-01   6.2656178e-01   9.6574369e-01   5.3943256e-01   1.4007831e+00   1.3033860e+00   1.7572550e+00   8.5406674e-01   1.0030724e+00   1.0426513e+00   1.9078843e+00   9.0005048e-01   1.0010209e+00   1.0776188e+00   1.4549432e+00   1.2363278e+00   1.5032156e+00   1.8103044e+00   6.0184934e-01   8.2671175e-01   6.0383105e-01   4.1209001e-01   6.3309258e-01   7.4418186e-01   5.0477564e-01   4.0006662e-01   4.8342635e-01   9.1892413e-01   4.8391482e-01   2.0121983e-01   6.4620889e-01   7.0462697e-01   5.0436965e-01   6.0184622e-01   5.7608844e-01   6.1830764e-01   5.3914287e-01   7.0105084e-01   5.0855778e-01   6.3165225e-01   3.0490481e-01   5.0477564e-01   5.2133179e-01   9.1446938e-01   8.7209348e-01   9.0532093e-01   3.4085233e-01   1.1298636e+00   9.6150595e-01   7.2036819e-01   5.0477564e-01   5.2167208e-01   6.3925756e-01   3.0008832e-01   3.0915245e-01   3.0474106e-01   1.1006468e+00   5.0043842e-01   4.1420960e-01   2.4195741e-01   6.8170466e-01   4.0127250e-01   7.0096708e-01   1.0003198e+00   5.0043084e-01   9.1132198e-01   3.0026460e-01   2.0121983e-01   4.0004442e-01   6.9987517e-01   4.5148429e-01   5.0477564e-01   8.3183672e-01   1.1010711e+00   8.0000160e-01   6.0052920e-01   2.0121983e-01   6.8161057e-01   4.1212852e-01   7.0176121e-01   1.0030721e+00   1.0458540e+00   9.3984267e-01   9.0166476e-01   5.0043084e-01   7.0088627e-01   7.0993998e-01   3.0017653e-01   2.2608083e-01   7.0008584e-01   9.3848935e-01   7.0184453e-01   6.3178534e-01   9.6936870e-01   5.0476836e-01   8.7372177e-01   5.6618864e-01   5.0477564e-01   8.7240114e-01   5.3943256e-01   3.0474106e-01   5.2167208e-01   8.0879701e-01   5.0085236e-01   9.0279268e-01   5.2133802e-01   4.2362917e-01   6.0017982e-01   5.2838320e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml-iris.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml-iris.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3e2759df30c14c1503818cc6a400a370e8fd8e89
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml-iris.txt
@@ -0,0 +1 @@
+   1.1781739e+00   8.4573383e-01   1.1040164e+00   2.6033464e-01   1.0391769e+00   6.5951091e-01   2.6643250e-01   1.6215602e+00   9.6424206e-01   5.8926015e-01   4.4417668e-01   1.2158053e+00   1.5196051e+00   1.4342986e+00   2.2147971e+00   1.0267382e+00   1.3103399e-01   1.0246015e+00   7.0646671e-01   4.6190224e-01   5.3352899e-01   6.8496652e-01   6.2944414e-01   5.1453676e-01   1.1649855e+00   3.8639663e-01   1.3340137e-01   2.6033464e-01   8.5141186e-01   9.9757114e-01   5.0629646e-01   1.3963590e+00   1.6851313e+00   9.6424206e-01   7.1143905e-01   4.8636669e-01   9.6424206e-01   1.4309353e+00   2.3749211e-01   1.8699153e-01   2.8644037e+00   1.0938603e+00   5.4968254e-01   7.9227302e-01   1.2158053e+00   7.0111465e-01   9.1831777e-01   5.2374483e-01   4.7680727e-01   3.4225655e+00   2.9886388e+00   3.5231786e+00   3.4844976e+00   3.4140450e+00   2.8802393e+00   3.0292175e+00   2.9585178e+00   3.2500773e+00   2.8104851e+00   3.8076036e+00   2.7718515e+00   3.6661618e+00   3.0567513e+00   2.4313960e+00   3.1540282e+00   2.7718124e+00   2.7494216e+00   4.0917474e+00   3.0136333e+00   3.0855821e+00   2.8833448e+00   3.7756717e+00   3.0462644e+00   3.0262994e+00   3.1582448e+00   3.6064873e+00   3.6179250e+00   3.0140884e+00   2.7108793e+00   3.1480683e+00   3.0769261e+00   2.8006021e+00   3.5140011e+00   2.7293962e+00   2.7724816e+00   3.3142477e+00   3.8377035e+00   2.4725633e+00   3.1307104e+00   3.0248446e+00   2.9240118e+00   2.9852014e+00   3.1515797e+00   2.8921724e+00   2.4678110e+00   2.6524994e+00   2.9083443e+00   2.7444686e+00   2.7478281e+00   4.2652803e+00   3.6712837e+00   4.4571526e+00   3.7518856e+00   4.1563042e+00   5.0327536e+00   3.5110505e+00   4.5914343e+00   4.4347154e+00   4.7605836e+00   3.6465897e+00   3.9644198e+00   4.1403419e+00   3.9458900e+00   4.0035735e+00   3.9244083e+00   3.7394250e+00   5.1213512e+00   5.6085412e+00   4.1515197e+00   4.3260896e+00   3.5311267e+00   5.2010517e+00   3.7194928e+00   4.0104626e+00   4.2547108e+00   3.5326627e+00   3.3344440e+00   4.1152831e+00   4.1647603e+00   4.7306329e+00   5.0503286e+00   4.1958529e+00   3.4649010e+00   3.7290073e+00   5.0848756e+00   4.0161825e+00   3.6208873e+00   3.2588014e+00   4.1126592e+00   4.3082433e+00   4.1887411e+00   3.6712837e+00   4.3324309e+00   4.3552675e+00   4.1561376e+00   4.0674499e+00   3.7933592e+00   3.8117183e+00   3.3250640e+00   5.2374483e-01   4.3319335e-01   1.3890415e+00   2.1841707e+00   9.9973471e-01   9.3211669e-01   6.4636269e-01   2.7124234e-01   1.7245677e+00   9.3727156e-01   1.7819563e-01   7.5570839e-01   2.5520912e+00   3.3809114e+00   2.1782802e+00   1.1854382e+00   2.0937104e+00   1.8662528e+00   1.1155937e+00   1.6542533e+00   1.4482752e+00   8.4881492e-01   9.7259094e-01   1.6562722e-01   9.7322023e-01   1.2100516e+00   9.9111027e-01   5.3286499e-01   2.8394141e-01   1.1346946e+00   2.5666454e+00   2.8608436e+00   2.7124234e-01   4.9009568e-01   1.3630799e+00   2.7124234e-01   6.0647055e-01   9.5529726e-01   1.1682143e+00   1.6911681e+00   7.6195008e-01   1.2774622e+00   1.9003949e+00   1.7819563e-01   1.8642334e+00   5.8652824e-01   1.6860841e+00   7.0235100e-01   3.5517185e+00   3.0793995e+00   3.5669733e+00   2.7166736e+00   3.1838913e+00   2.5120824e+00   3.1938169e+00   2.0428688e+00   3.1039816e+00   2.2561090e+00   2.8016158e+00   2.6226738e+00   2.9050141e+00   2.8502197e+00   2.0976260e+00   3.1846091e+00   2.5890531e+00   2.2584354e+00   3.4434621e+00   2.3329638e+00   3.1272801e+00   2.5616006e+00   3.3203580e+00   2.7436923e+00   2.8484236e+00   3.0948526e+00   3.4151452e+00   3.5708989e+00   2.7939968e+00   2.0736054e+00   2.3834491e+00   2.2886612e+00   2.3204706e+00   3.1632397e+00   2.5205525e+00   3.0112889e+00   3.3433635e+00   3.2300528e+00   2.2657938e+00   2.4705763e+00   2.4462190e+00   2.8038852e+00   2.4332562e+00   2.2089299e+00   2.4060762e+00   2.2734727e+00   2.3627180e+00   2.7012637e+00   1.8976741e+00   2.3590971e+00   4.3837112e+00   3.3195686e+00   4.4453895e+00   3.6018522e+00   4.1012355e+00   5.0512932e+00   2.8774753e+00   4.5344585e+00   4.0827835e+00   5.0801762e+00   3.7291677e+00   3.6888814e+00   4.1064223e+00   3.4625304e+00   3.7552252e+00   3.9939605e+00   3.6781201e+00   5.5433523e+00   5.4381439e+00   3.4976392e+00   4.4223824e+00   3.2288234e+00   5.1217596e+00   3.4157742e+00   4.1643077e+00   4.3726405e+00   3.2842292e+00   3.2296198e+00   3.9190152e+00   4.1591876e+00   4.6244312e+00   5.4884429e+00   4.0035368e+00   3.2202996e+00   3.3301365e+00   5.1089381e+00   4.2054648e+00   3.6234874e+00   3.1421933e+00   4.1502382e+00   4.3306814e+00   4.2256435e+00   3.3195686e+00   4.4219948e+00   4.4973329e+00   4.1152664e+00   3.6487297e+00   3.7329401e+00   4.0033827e+00   3.2017663e+00   2.8394141e-01   9.9272943e-01   1.8549949e+00   4.9772204e-01   5.9738093e-01   7.8305765e-01   3.7622328e-01   1.4342986e+00   5.0621589e-01   4.9772204e-01   6.9001472e-01   2.2742100e+00   3.0330374e+00   1.8410898e+00   8.5582452e-01   1.8552074e+00   1.4758765e+00   9.8932340e-01   1.2824303e+00   9.4580058e-01   7.0175090e-01   5.8564715e-01   6.1067563e-01   6.6453319e-01   9.2528705e-01   7.6195008e-01   1.7002750e-01   3.1093967e-01   1.0044375e+00   2.1686473e+00   2.5011215e+00   3.7622328e-01   3.6669623e-01   1.1883075e+00   3.7622328e-01   5.8652824e-01   6.7745878e-01   7.9191984e-01   2.0937821e+00   3.6228991e-01   9.5582164e-01   1.5272557e+00   4.9772204e-01   1.4755007e+00   1.3340137e-01   1.3666101e+00   4.3319335e-01   3.7283414e+00   3.2257816e+00   3.7651559e+00   3.1082143e+00   3.4606263e+00   2.7705999e+00   3.2962379e+00   2.4179023e+00   3.3643791e+00   2.5175848e+00   3.2317517e+00   2.8135312e+00   3.3502574e+00   3.0859108e+00   2.3316915e+00   3.3832002e+00   2.7540885e+00   2.5906747e+00   3.8459512e+00   2.7110494e+00   3.2296198e+00   2.8510843e+00   3.6612067e+00   3.0231940e+00   3.1083626e+00   3.3221751e+00   3.6999785e+00   3.7824508e+00   3.0223050e+00   2.4549511e+00   2.7813487e+00   2.6993734e+00   2.6424988e+00   3.4348309e+00   2.6680185e+00   3.0548262e+00   3.5357687e+00   3.6340473e+00   2.4474337e+00   2.8211532e+00   2.7662396e+00   3.0069386e+00   2.7817508e+00   2.6121651e+00   2.7000040e+00   2.4677010e+00   2.5915377e+00   2.9544131e+00   2.2712863e+00   2.6277952e+00   4.4682388e+00   3.5629824e+00   4.6484688e+00   3.8140427e+00   4.2790737e+00   5.2629823e+00   3.1332305e+00   4.7710813e+00   4.3977196e+00   5.1429155e+00   3.8634878e+00   3.9555042e+00   4.3021827e+00   3.7450218e+00   3.9451569e+00   4.1141318e+00   3.8729361e+00   5.5923916e+00   5.7171219e+00   3.8836634e+00   4.5660923e+00   3.4290419e+00   5.3764415e+00   3.6907517e+00   4.2782894e+00   4.5393827e+00   3.5302656e+00   3.4102235e+00   4.1476932e+00   4.3814983e+00   4.8831870e+00   5.5467550e+00   4.2276454e+00   3.4820326e+00   3.6311162e+00   5.3207972e+00   4.2656428e+00   3.7854499e+00   3.3178004e+00   4.3254709e+00   4.4873379e+00   4.3956810e+00   3.5629824e+00   4.5607328e+00   4.6030755e+00   4.3016138e+00   3.9622355e+00   3.9225802e+00   4.0577906e+00   3.3684813e+00   1.2515236e+00   2.1021589e+00   7.0646671e-01   8.4383266e-01   5.2374483e-01   3.8525820e-01   1.6876653e+00   7.3502408e-01   3.6319073e-01   5.0299964e-01   2.5372015e+00   3.2897546e+00   2.1021589e+00   1.1117653e+00   2.0978519e+00   1.7286097e+00   1.1937015e+00   1.5323598e+00   1.1874605e+00   8.6297946e-01   7.6710016e-01   5.3827772e-01   8.8540687e-01   1.1730565e+00   1.0034646e+00   2.6643250e-01   2.4808718e-01   1.2168625e+00   2.4209958e+00   2.7605308e+00   3.8525820e-01   5.6164055e-01   1.4300979e+00   3.8525820e-01   3.5266705e-01   9.1831777e-01   1.0556536e+00   1.8570904e+00   3.5266705e-01   1.1671832e+00   1.7581227e+00   3.6319073e-01   1.7245677e+00   2.3749211e-01   1.6215602e+00   6.7030885e-01   3.7702988e+00   3.2513048e+00   3.7854692e+00   2.9445918e+00   3.4252075e+00   2.6854877e+00   3.3289662e+00   2.2084365e+00   3.3482393e+00   2.3872006e+00   3.0088381e+00   2.7858967e+00   3.2051999e+00   3.0423378e+00   2.2727200e+00   3.4066596e+00   2.7026316e+00   2.4942728e+00   3.7194777e+00   2.5718070e+00   3.2266664e+00   2.8009311e+00   3.5699473e+00   2.9607930e+00   3.0876835e+00   3.3257458e+00   3.6752903e+00   3.7792524e+00   2.9772187e+00   2.3405405e+00   2.6225184e+00   2.5379456e+00   2.5530959e+00   3.3522700e+00   2.6036900e+00   3.0973166e+00   3.5528019e+00   3.5210610e+00   2.4001125e+00   2.6797931e+00   2.6323855e+00   2.9822614e+00   2.6747723e+00   2.4035668e+00   2.5939621e+00   2.4241443e+00   2.5291529e+00   2.9226858e+00   2.0959349e+00   2.5480036e+00   4.4738080e+00   3.4750769e+00   4.6459778e+00   3.7712854e+00   4.2573656e+00   5.2660922e+00   2.9665251e+00   4.7582165e+00   4.3221591e+00   5.2027091e+00   3.8786505e+00   3.8957203e+00   4.2952898e+00   3.6300721e+00   3.8796854e+00   4.1217239e+00   3.8539421e+00   5.6722969e+00   5.6818418e+00   3.7421166e+00   4.5832488e+00   3.3486395e+00   5.3611963e+00   3.6296692e+00   4.3021827e+00   4.5620086e+00   3.4793229e+00   3.3827920e+00   4.0990020e+00   4.3836503e+00   4.8653269e+00   5.6359100e+00   4.1798856e+00   3.4290065e+00   3.5331571e+00   5.3326389e+00   4.2899049e+00   3.7762521e+00   3.2871170e+00   4.3357622e+00   4.4879065e+00   4.4101806e+00   3.4750769e+00   4.5719131e+00   4.6252914e+00   4.2958117e+00   3.8764095e+00   3.9087616e+00   4.0828629e+00   3.3281063e+00   8.9980139e-01   6.8064066e-01   4.6472955e-01   1.7695601e+00   1.1682143e+00   5.3827772e-01   5.3286499e-01   1.4108003e+00   1.6357068e+00   1.3406177e+00   2.0471148e+00   8.8540687e-01   2.9145160e-01   9.8663349e-01   4.9772204e-01   6.8921053e-01   3.7371902e-01   5.3360548e-01   8.2263932e-01   5.9279023e-01   1.3884168e+00   5.4248468e-01   3.3872939e-01   5.2066928e-01   9.9757114e-01   1.1836141e+00   7.1971771e-01   1.1867923e+00   1.5097838e+00   1.1682143e+00   9.2945909e-01   6.4884272e-01   1.1682143e+00   1.5630357e+00   4.8016385e-01   2.7124234e-01   3.0617227e+00   1.1744248e+00   5.8374436e-01   6.1345624e-01   1.4108003e+00   4.9009568e-01   1.0413386e+00   4.3319335e-01   6.9189100e-01   3.5573943e+00   3.1141702e+00   3.6648465e+00   3.6881887e+00   3.5883824e+00   3.0468381e+00   3.1315658e+00   3.1515797e+00   3.4214871e+00   2.9743594e+00   4.0164863e+00   2.9182492e+00   3.8928105e+00   3.2158144e+00   2.6006889e+00   3.3027067e+00   2.9031809e+00   2.9465762e+00   4.3027855e+00   3.2186029e+00   3.1845052e+00   3.0688421e+00   3.9670252e+00   3.2223969e+00   3.2005819e+00   3.3183883e+00   3.7835219e+00   3.7624114e+00   3.1706932e+00   2.9238797e+00   3.3563322e+00   3.2896970e+00   2.9943889e+00   3.6782511e+00   2.8525048e+00   2.8501434e+00   3.4560405e+00   4.0524463e+00   2.6189855e+00   3.3240937e+00   3.2080454e+00   3.0726532e+00   3.1844624e+00   3.3537486e+00   3.0707196e+00   2.6200714e+00   2.8136838e+00   3.0798325e+00   2.9434145e+00   2.9219863e+00   4.3385668e+00   3.8211670e+00   4.5879449e+00   3.8900790e+00   4.2758494e+00   5.1630878e+00   3.6606996e+00   4.7359279e+00   4.6113949e+00   4.8204842e+00   3.7540483e+00   4.1248784e+00   4.2705921e+00   4.1081181e+00   4.1285849e+00   4.0208302e+00   3.8718630e+00   5.1706118e+00   5.7653526e+00   4.3529699e+00   4.4302351e+00   3.6643052e+00   5.3499285e+00   3.8863166e+00   4.1025634e+00   4.3705834e+00   3.6895783e+00   3.4655259e+00   4.2576017e+00   4.3078329e+00   4.8848930e+00   5.1059908e+00   4.3355275e+00   3.6287723e+00   3.9015858e+00   5.2167033e+00   4.0809175e+00   3.7394250e+00   3.3885059e+00   4.2346521e+00   4.4182506e+00   4.3085803e+00   3.8211670e+00   4.4331391e+00   4.4402220e+00   4.2825037e+00   4.2456731e+00   3.9239772e+00   3.8761056e+00   3.4480528e+00   1.5196051e+00   1.2824303e+00   2.6220224e+00   1.9839744e+00   5.4248468e-01   1.3880441e+00   2.2398377e+00   2.5185753e+00   6.5993495e-01   1.2140269e+00   2.2670334e-01   1.0140902e+00   4.4901474e-01   4.6310132e-01   1.1825559e+00   5.9738093e-01   1.2799022e+00   1.4364110e+00   1.3915110e+00   2.1479410e+00   1.2515236e+00   9.9544409e-01   1.2188859e+00   1.8419620e+00   2.0002725e+00   1.1587093e+00   6.6217390e-01   7.6869104e-01   1.9839744e+00   1.7287715e+00   9.9282597e-01   1.9839744e+00   2.4262873e+00   1.2419907e+00   1.0737552e+00   3.8557204e+00   2.0456732e+00   1.0753036e+00   4.4417668e-01   2.2089621e+00   5.0629646e-01   1.9071648e+00   5.5576380e-01   1.4985933e+00   3.3087308e+00   2.9428879e+00   3.4716469e+00   4.0891690e+00   3.6027276e+00   3.2367228e+00   2.9085289e+00   3.7111791e+00   3.3928277e+00   3.3150290e+00   4.5928107e+00   2.9594198e+00   4.2678298e+00   3.2621413e+00   2.8156205e+00   3.1507918e+00   2.9937665e+00   3.2188610e+00   4.5717893e+00   3.5888229e+00   3.0697068e+00   3.2000980e+00   4.1198780e+00   3.3377308e+00   3.2155231e+00   3.2352945e+00   3.7547729e+00   3.6294383e+00   3.2310889e+00   3.2831808e+00   3.7736317e+00   3.7263104e+00   3.2475076e+00   3.7907966e+00   2.9840079e+00   2.6164035e+00   3.2920107e+00   4.3046992e+00   2.7582086e+00   3.6782988e+00   3.5276458e+00   3.0726914e+00   3.4670753e+00   3.9103065e+00   3.3340819e+00   2.7470239e+00   2.9746673e+00   3.1328218e+00   3.4555378e+00   3.1318122e+00   4.0752096e+00   3.9330937e+00   4.3762388e+00   3.8407425e+00   4.1274362e+00   4.9032073e+00   4.0261574e+00   4.5547766e+00   4.6534818e+00   4.3582690e+00   3.5326627e+00   4.1405270e+00   4.0947877e+00   4.2953569e+00   4.1533819e+00   3.7981559e+00   3.7518931e+00   4.6218430e+00   5.6203182e+00   4.6338556e+00   4.1503558e+00   3.7655153e+00   5.1552615e+00   3.9363994e+00   3.8053980e+00   4.0787299e+00   3.7177375e+00   3.4172455e+00   4.2121483e+00   4.1116484e+00   4.7277367e+00   4.5452377e+00   4.2828893e+00   3.6617103e+00   4.0381240e+00   4.9437127e+00   3.7768622e+00   3.5869495e+00   3.3594066e+00   4.0056296e+00   4.1979142e+00   4.0739556e+00   3.9330937e+00   4.1628496e+00   4.1341118e+00   4.1117268e+00   4.3552101e+00   3.7951858e+00   3.5859295e+00   3.4280549e+00   5.0370871e-01   1.1854382e+00   8.2574748e-01   1.1968529e+00   2.9724335e-01   9.8896933e-01   1.0391769e+00   2.0112023e+00   2.6653431e+00   1.5111262e+00   6.4636269e-01   1.6262201e+00   1.1040164e+00   9.8966705e-01   9.2934901e-01   5.3040146e-01   7.1789533e-01   3.9472619e-01   1.0556536e+00   5.1318506e-01   7.7368489e-01   7.3633268e-01   5.0731024e-01   7.5303835e-01   9.7659801e-01   1.7897583e+00   2.1453760e+00   8.2574748e-01   6.9001472e-01   1.1202045e+00   8.2574748e-01   9.6424206e-01   6.2046469e-01   5.3827772e-01   2.5404386e+00   5.3988754e-01   6.7372733e-01   1.1459117e+00   9.5361455e-01   1.1160907e+00   4.7951153e-01   1.1016806e+00   5.5109043e-01   3.7667766e+00   3.2399456e+00   3.8211099e+00   3.3920086e+00   3.5974024e+00   2.9126202e+00   3.2661365e+00   2.7296888e+00   3.4884812e+00   2.6863536e+00   3.5939578e+00   2.8820992e+00   3.6783922e+00   3.1916608e+00   2.4616677e+00   3.4465420e+00   2.8051321e+00   2.8088029e+00   4.1173049e+00   2.9788024e+00   3.2021702e+00   3.0140681e+00   3.8639979e+00   3.1756883e+00   3.2362495e+00   3.4136564e+00   3.8424217e+00   3.8484723e+00   3.1221021e+00   2.7251978e+00   3.0739866e+00   3.0068046e+00   2.8468838e+00   3.5726594e+00   2.7099355e+00   2.9743925e+00   3.5889631e+00   3.9062347e+00   2.5235038e+00   3.0623697e+00   2.9777787e+00   3.0820765e+00   3.0110500e+00   2.9445347e+00   2.8809757e+00   2.5543631e+00   2.7073441e+00   3.0792230e+00   2.5679169e+00   2.7817508e+00   4.4017095e+00   3.6741422e+00   4.6939918e+00   3.8825162e+00   4.3049794e+00   5.3127345e+00   3.3002804e+00   4.8514877e+00   4.5630927e+00   5.0475012e+00   3.8518880e+00   4.0758615e+00   4.3442223e+00   3.8984747e+00   3.9980344e+00   4.0855291e+00   3.9215612e+00   5.4851910e+00   5.8312870e+00   4.1416475e+00   4.5535489e+00   3.5028870e+00   5.4694510e+00   3.8234999e+00   4.2411026e+00   4.5531893e+00   3.6365882e+00   3.4540568e+00   4.2272070e+00   4.4531017e+00   4.9839411e+00   5.4520873e+00   4.3016933e+00   3.6054769e+00   3.7985950e+00   5.3693255e+00   4.1776636e+00   3.8035129e+00   3.3594554e+00   4.3469553e+00   4.4886880e+00   4.4112274e+00   3.6741422e+00   4.5435532e+00   4.5534752e+00   4.3346048e+00   4.1329859e+00   3.9643709e+00   3.9674740e+00   3.4024060e+00   1.3630799e+00   7.1446962e-01   8.4383266e-01   2.4808718e-01   9.6424206e-01   1.2783641e+00   1.6962086e+00   2.4702874e+00   1.2824303e+00   2.9691107e-01   1.2631980e+00   9.3957399e-01   4.9617437e-01   7.4965096e-01   7.2553812e-01   4.8492463e-01   3.3125444e-01   9.2426065e-01   2.6812643e-01   3.3395426e-01   2.4808718e-01   5.8926015e-01   7.3502408e-01   5.4956349e-01   1.6376300e+00   1.9421609e+00   7.1446962e-01   4.9160020e-01   6.5622658e-01   7.1446962e-01   1.1785203e+00   1.2076330e-01   2.8845946e-01   2.6135503e+00   8.6638670e-01   5.7543116e-01   9.9282597e-01   9.6424206e-01   9.3211669e-01   6.7030885e-01   7.8100392e-01   2.3749211e-01   3.4362741e+00   2.9772187e+00   3.5154539e+00   3.2993605e+00   3.3443673e+00   2.7564382e+00   3.0285957e+00   2.7337208e+00   3.1980682e+00   2.6433553e+00   3.5789723e+00   2.6973512e+00   3.4963203e+00   2.9759207e+00   2.3127671e+00   3.1412273e+00   2.6774449e+00   2.6095931e+00   3.9436181e+00   2.8415480e+00   3.0475523e+00   2.7865107e+00   3.6589666e+00   2.9471549e+00   2.9637920e+00   3.1238401e+00   3.5511257e+00   3.5866237e+00   2.9292978e+00   2.5500042e+00   2.9620296e+00   2.8874183e+00   2.6658729e+00   3.4048426e+00   2.6224103e+00   2.7775195e+00   3.2991484e+00   3.6986035e+00   2.3717154e+00   2.9594198e+00   2.8613259e+00   2.8592001e+00   2.8393888e+00   2.9284199e+00   2.7478281e+00   2.3715604e+00   2.5423572e+00   2.8329679e+00   2.5370255e+00   2.6226761e+00   4.2550363e+00   3.5587552e+00   4.4384175e+00   3.6863990e+00   4.1157774e+00   5.0262130e+00   3.3282378e+00   4.5651798e+00   4.3425674e+00   4.8115590e+00   3.6359466e+00   3.8813909e+00   4.1126592e+00   3.8106374e+00   3.9142555e+00   3.9091502e+00   3.6969354e+00   5.1996380e+00   5.5654572e+00   3.9942942e+00   4.3261607e+00   3.4228883e+00   5.1764012e+00   3.6303894e+00   4.0165247e+00   4.2627936e+00   3.4508614e+00   3.2748167e+00   4.0461381e+00   4.1489951e+00   4.6983104e+00   5.1372583e+00   4.1280577e+00   3.3829235e+00   3.6112201e+00   5.0844328e+00   4.0217556e+00   3.5877667e+00   3.1942059e+00   4.1021303e+00   4.2899049e+00   4.1807095e+00   3.5587552e+00   4.3276502e+00   4.3608503e+00   4.1273623e+00   3.9585431e+00   3.7540483e+00   3.8154519e+00   3.2543470e+00   7.7313507e-01   2.2058495e+00   1.2553676e+00   5.5109043e-01   3.3742167e-01   3.0507869e+00   3.8084614e+00   2.6171176e+00   1.6268459e+00   2.6113513e+00   2.2457527e+00   1.6784057e+00   2.0471148e+00   1.6480463e+00   1.3225313e+00   1.2819528e+00   7.6880092e-01   1.3915110e+00   1.6886167e+00   1.5043671e+00   7.8918675e-01   6.7745878e-01   1.6911617e+00   2.9348176e+00   3.2792996e+00   7.7313507e-01   1.0082548e+00   1.9190366e+00   7.7313507e-01   2.3749211e-01   1.4309353e+00   1.5685186e+00   1.3963590e+00   6.9420840e-01   1.6514950e+00   2.2742046e+00   5.5109043e-01   2.2440749e+00   7.3283576e-01   2.1421205e+00   1.1730565e+00   4.0382971e+00   3.5072516e+00   4.0204750e+00   2.8157524e+00   3.5602797e+00   2.7716933e+00   3.6026548e+00   1.9881684e+00   3.5249607e+00   2.3719578e+00   2.7108793e+00   2.9588139e+00   3.1000099e+00   3.1914275e+00   2.3942229e+00   3.6456797e+00   2.8533918e+00   2.5518058e+00   3.6496659e+00   2.5198146e+00   3.4451131e+00   2.9183683e+00   3.5989425e+00   3.0794356e+00   3.2576813e+00   3.5320163e+00   3.8261152e+00   3.9741896e+00   3.1180182e+00   2.3364082e+00   2.5170134e+00   2.4274466e+00   2.6068690e+00   3.4218333e+00   2.7386417e+00   3.3934324e+00   3.7851452e+00   3.4854109e+00   2.5636830e+00   2.6200486e+00   2.6174942e+00   3.1669559e+00   2.6880360e+00   2.1675629e+00   2.6284424e+00   2.5986852e+00   2.6571682e+00   3.0828753e+00   1.9438939e+00   2.6338308e+00   4.6899445e+00   3.5257224e+00   4.8360835e+00   3.9149039e+00   4.4239486e+00   5.4654338e+00   2.8575769e+00   4.9368840e+00   4.3795070e+00   5.4971381e+00   4.1073887e+00   3.9867349e+00   4.4778796e+00   3.6113294e+00   3.9521234e+00   4.3324165e+00   4.0348180e+00   6.0067497e+00   5.8007868e+00   3.6612067e+00   4.8067419e+00   3.4133837e+00   5.5245725e+00   3.7158962e+00   4.5501061e+00   4.8067452e+00   3.5898573e+00   3.5494058e+00   4.2132256e+00   4.5903044e+00   5.0235775e+00   5.9805492e+00   4.2919572e+00   3.5520531e+00   3.5821954e+00   5.5319518e+00   4.5355231e+00   3.9801247e+00   3.4489678e+00   4.5459210e+00   4.6801759e+00   4.6148655e+00   3.5257224e+00   4.7911899e+00   4.8567489e+00   4.4697071e+00   3.9039516e+00   4.0848538e+00   4.3320055e+00   3.4824517e+00   1.5154593e+00   7.1671402e-01   2.6643250e-01   7.9347379e-01   2.3528246e+00   3.1744385e+00   1.9839744e+00   9.9059199e-01   1.9029496e+00   1.6532822e+00   9.3451915e-01   1.4586696e+00   1.2483935e+00   7.4743804e-01   7.4957404e-01   2.9691107e-01   8.0686941e-01   9.9973471e-01   7.9394533e-01   3.6319073e-01   1.8699153e-01   9.9891776e-01   2.3345854e+00   2.6422396e+00   0.0000000e+00   3.3742167e-01   1.1857824e+00   0.0000000e+00   6.6918102e-01   7.4445830e-01   9.7322023e-01   1.9284841e+00   6.6918102e-01   1.1393372e+00   1.6942803e+00   3.7371902e-01   1.6386105e+00   4.5257749e-01   1.4715172e+00   4.9772204e-01   3.5602797e+00   3.0968979e+00   3.5933352e+00   2.8998722e+00   3.2656298e+00   2.6029746e+00   3.1974447e+00   2.2445103e+00   3.1601923e+00   2.3946216e+00   3.0209665e+00   2.6867317e+00   3.0775658e+00   2.9161244e+00   2.1946278e+00   3.2137635e+00   2.6502891e+00   2.3652711e+00   3.6096140e+00   2.4893065e+00   3.1578003e+00   2.6568473e+00   3.4426472e+00   2.8187901e+00   2.9128857e+00   3.1418202e+00   3.4847097e+00   3.6205958e+00   2.8694312e+00   2.2223283e+00   2.5588203e+00   2.4651138e+00   2.4413293e+00   3.2621861e+00   2.5834128e+00   2.9995857e+00   3.3733791e+00   3.3817876e+00   2.3263008e+00   2.6305758e+00   2.5756071e+00   2.8533918e+00   2.5683063e+00   2.4187322e+00   2.5258216e+00   2.3250308e+00   2.4413618e+00   2.7691536e+00   2.1006933e+00   2.4608850e+00   4.4119896e+00   3.4290419e+00   4.4942656e+00   3.6650933e+00   4.1590662e+00   5.0899438e+00   3.0333619e+00   4.5799469e+00   4.1882413e+00   5.0726081e+00   3.7613721e+00   3.7859992e+00   4.1623715e+00   3.6029758e+00   3.8608065e+00   4.0352348e+00   3.7266849e+00   5.5043247e+00   5.5172732e+00   3.6569442e+00   4.4568115e+00   3.3324016e+00   5.1765224e+00   3.5192065e+00   4.1799642e+00   4.3857400e+00   3.3769078e+00   3.2906843e+00   4.0034548e+00   4.1917183e+00   4.6854597e+00   5.4444866e+00   4.0904298e+00   3.2962678e+00   3.4250783e+00   5.1569386e+00   4.2213314e+00   3.6582637e+00   3.2059261e+00   4.1937040e+00   4.3826532e+00   4.2786320e+00   3.4290419e+00   4.4549850e+00   4.5270304e+00   4.1816268e+00   3.7777251e+00   3.7924144e+00   4.0173731e+00   3.2613828e+00   1.0034646e+00   1.7753099e+00   2.1070188e+00   8.6079202e-01   1.6751898e+00   5.4248468e-01   6.0365341e-01   4.6310132e-01   4.4901474e-01   7.0111465e-01   4.4713936e-01   1.0328871e+00   1.0722301e+00   1.0271920e+00   1.6860841e+00   8.8540687e-01   5.2066928e-01   7.3502408e-01   1.4309353e+00   1.5630357e+00   7.3985997e-01   9.6257499e-01   1.1608422e+00   1.5154593e+00   1.2617482e+00   4.9009568e-01   1.5154593e+00   2.0192952e+00   7.8100392e-01   6.9001472e-01   3.4112480e+00   1.6736143e+00   8.5090098e-01   5.5183182e-01   1.7753099e+00   4.3319335e-01   1.5054343e+00   1.2076330e-01   1.0428797e+00   3.2901237e+00   2.9292978e+00   3.4367371e+00   3.8111737e+00   3.4729880e+00   3.0672734e+00   2.9473505e+00   3.3901879e+00   3.2662947e+00   3.1144880e+00   4.2413542e+00   2.8660589e+00   3.9495965e+00   3.1433256e+00   2.6375433e+00   3.0908568e+00   2.9081458e+00   2.9702968e+00   4.3236374e+00   3.3103937e+00   3.0964304e+00   3.0179755e+00   3.9313682e+00   3.1669001e+00   3.0754584e+00   3.1432906e+00   3.6245464e+00   3.5873526e+00   3.1179878e+00   2.9918256e+00   3.4776059e+00   3.4142800e+00   3.0198617e+00   3.6568155e+00   2.8980988e+00   2.6944324e+00   3.2512254e+00   4.0479095e+00   2.6293791e+00   3.4291613e+00   3.2968205e+00   2.9799791e+00   3.2239661e+00   3.5774656e+00   3.1299499e+00   2.6069579e+00   2.8203994e+00   2.9888842e+00   3.1470877e+00   2.9476507e+00   4.1975965e+00   3.8311128e+00   4.3861256e+00   3.7921747e+00   4.1446583e+00   4.9211801e+00   3.8442384e+00   4.5238497e+00   4.5231439e+00   4.5451210e+00   3.5805575e+00   4.0469570e+00   4.0990882e+00   4.1579560e+00   4.1249171e+00   3.8727781e+00   3.7290616e+00   4.8292468e+00   5.5757877e+00   4.3965263e+00   4.2248397e+00   3.6936498e+00   5.1256160e+00   3.8221804e+00   3.8961870e+00   4.1176453e+00   3.6242665e+00   3.3807801e+00   4.1671042e+00   4.0787299e+00   4.6798442e+00   4.7374542e+00   4.2466909e+00   3.5432140e+00   3.8759165e+00   4.9689016e+00   3.9204411e+00   3.5927937e+00   3.3203721e+00   4.0348754e+00   4.2531600e+00   4.1147391e+00   3.8311128e+00   4.2401451e+00   4.2502727e+00   4.1279956e+00   4.2116129e+00   3.7856899e+00   3.7242025e+00   3.3954918e+00   9.3865015e-01   1.1459117e+00   1.8505741e+00   2.5636327e+00   1.3972701e+00   4.6310132e-01   1.4327294e+00   1.0013399e+00   7.2679299e-01   8.2574748e-01   6.2187934e-01   5.8496636e-01   1.7002750e-01   9.5361455e-01   3.5639126e-01   5.3827772e-01   4.9617437e-01   4.7680727e-01   6.9189100e-01   7.7259801e-01   1.6911681e+00   2.0326426e+00   7.1671402e-01   5.6788283e-01   8.9258315e-01   7.1671402e-01   1.0551281e+00   3.6669623e-01   3.9699460e-01   2.5716465e+00   6.8921053e-01   6.2148529e-01   1.0391769e+00   9.3865015e-01   9.9111027e-01   5.3286499e-01   9.2006504e-01   3.5266705e-01   3.5819899e+00   3.0902007e+00   3.6482741e+00   3.3284223e+00   3.4528558e+00   2.8062636e+00   3.1283731e+00   2.7130802e+00   3.3201500e+00   2.6478976e+00   3.5696084e+00   2.7728704e+00   3.5649049e+00   3.0583917e+00   2.3718219e+00   3.2763163e+00   2.7180029e+00   2.6779045e+00   4.0150919e+00   2.8864805e+00   3.1083977e+00   2.8822332e+00   3.7402558e+00   3.0304088e+00   3.0793541e+00   3.2506893e+00   3.6756049e+00   3.7003058e+00   3.0054875e+00   2.6160903e+00   2.9965118e+00   2.9238797e+00   2.7351276e+00   3.4650507e+00   2.6418165e+00   2.8577585e+00   3.4252075e+00   3.7832878e+00   2.4227175e+00   2.9917855e+00   2.8903467e+00   2.9460322e+00   2.9034030e+00   2.9191699e+00   2.7908173e+00   2.4332562e+00   2.6000033e+00   2.9338362e+00   2.5416562e+00   2.6797931e+00   4.3169600e+00   3.6002350e+00   4.5501061e+00   3.7611228e+00   4.1952298e+00   5.1491201e+00   3.2996439e+00   4.6835622e+00   4.4311275e+00   4.9194005e+00   3.7316761e+00   3.9622355e+00   4.2152785e+00   3.8426553e+00   3.9520057e+00   3.9894324e+00   3.7877346e+00   5.3234168e+00   5.6801405e+00   4.0465336e+00   4.4289683e+00   3.4509848e+00   5.3007226e+00   3.7123045e+00   4.1128937e+00   4.3848871e+00   3.5295907e+00   3.3480190e+00   4.1214168e+00   4.2758432e+00   4.8208082e+00   5.2754050e+00   4.2018689e+00   3.4688327e+00   3.6716137e+00   5.2146461e+00   4.0903576e+00   3.6733277e+00   3.2612647e+00   4.2126998e+00   4.3809966e+00   4.2914999e+00   3.6002350e+00   4.4223824e+00   4.4497684e+00   4.2250047e+00   4.0330034e+00   3.8460049e+00   3.8818416e+00   3.3084835e+00   6.2729876e-01   2.6091054e+00   3.4299177e+00   2.2340939e+00   1.2368073e+00   2.1640372e+00   1.8992968e+00   1.1925354e+00   1.7015647e+00   1.4288989e+00   9.5582164e-01   9.7391954e-01   2.9724335e-01   1.0376697e+00   1.2583645e+00   1.0495503e+00   5.0731024e-01   2.8845946e-01   1.2384679e+00   2.5831347e+00   2.8967543e+00   2.6643250e-01   5.4873947e-01   1.4369223e+00   2.6643250e-01   5.0370871e-01   1.0013399e+00   1.2082987e+00   1.6761482e+00   6.8299624e-01   1.3528452e+00   1.9417181e+00   2.6206799e-01   1.8882412e+00   5.3690447e-01   1.7295385e+00   7.4445830e-01   3.6974389e+00   3.2246529e+00   3.7127916e+00   2.8221999e+00   3.3289662e+00   2.6369282e+00   3.3348648e+00   2.1165503e+00   3.2465431e+00   2.3709411e+00   2.8608899e+00   2.7655496e+00   3.0110500e+00   2.9862341e+00   2.2391292e+00   3.3332541e+00   2.7176350e+00   2.3810734e+00   3.5657791e+00   2.4469788e+00   3.2638546e+00   2.7057900e+00   3.4512743e+00   2.8728052e+00   2.9934131e+00   3.2431147e+00   3.5582624e+00   3.7179545e+00   2.9335017e+00   2.1999209e+00   2.4893065e+00   2.3915367e+00   2.4540260e+00   3.2923304e+00   2.6414379e+00   3.1466196e+00   3.4901671e+00   3.3542627e+00   2.3973915e+00   2.5861640e+00   2.5561973e+00   2.9420425e+00   2.5609364e+00   2.2836399e+00   2.5303888e+00   2.4035745e+00   2.4950488e+00   2.8435005e+00   2.0000785e+00   2.4916202e+00   4.5218181e+00   3.4492861e+00   4.5921002e+00   3.7366932e+00   4.2432727e+00   5.1949299e+00   2.9709788e+00   4.6735988e+00   4.2160797e+00   5.2249989e+00   3.8759828e+00   3.8289542e+00   4.2545385e+00   3.5878027e+00   3.8924868e+00   4.1403048e+00   3.8179103e+00   5.6801405e+00   5.5805905e+00   3.6100547e+00   4.5709635e+00   3.3584734e+00   5.2629823e+00   3.5576748e+00   4.3070506e+00   4.5135384e+00   3.4273212e+00   3.3707040e+00   4.0596064e+00   4.2990937e+00   4.7676077e+00   5.6256469e+00   4.1454035e+00   3.3551224e+00   3.4472672e+00   5.2603070e+00   4.3452859e+00   3.7614312e+00   3.2825924e+00   4.3002370e+00   4.4796258e+00   4.3809022e+00   3.4492861e+00   4.5673965e+00   4.6446301e+00   4.2677070e+00   3.7864370e+00   3.8796124e+00   4.1423594e+00   3.3352922e+00   2.9361142e+00   3.6728262e+00   2.4980859e+00   1.5364600e+00   2.5390784e+00   2.1113072e+00   1.6578570e+00   1.9353585e+00   1.4375287e+00   1.3425463e+00   1.1993279e+00   9.0115406e-01   1.3418210e+00   1.6061161e+00   1.4416694e+00   7.3727571e-01   7.1781501e-01   1.6797637e+00   2.7692440e+00   3.1313820e+00   7.9347379e-01   9.7352372e-01   1.8600648e+00   7.9347379e-01   2.1119253e-01   1.3612390e+00   1.4580439e+00   1.6571634e+00   5.0731024e-01   1.5980974e+00   2.1674065e+00   6.7984069e-01   2.1059482e+00   6.2457556e-01   2.0330443e+00   1.1132823e+00   4.2319020e+00   3.7044235e+00   4.2326669e+00   3.1432906e+00   3.8172627e+00   3.0425144e+00   3.7866079e+00   2.3206274e+00   3.7650177e+00   2.6608343e+00   3.0454230e+00   3.1914925e+00   3.4221447e+00   3.4413652e+00   2.6453561e+00   3.8539838e+00   3.0892079e+00   2.8357998e+00   3.9683086e+00   2.8336784e+00   3.6477040e+00   3.1799040e+00   3.8944724e+00   3.3434129e+00   3.4994776e+00   3.7569353e+00   4.0775935e+00   4.2049294e+00   3.3684490e+00   2.6363662e+00   2.8414019e+00   2.7526519e+00   2.8906655e+00   3.7008234e+00   2.9737492e+00   3.5555916e+00   3.9977110e+00   3.7960948e+00   2.7978670e+00   2.9332077e+00   2.9200513e+00   3.4002561e+00   2.9851921e+00   2.5032729e+00   2.9159414e+00   2.8324645e+00   2.9104902e+00   3.3286096e+00   2.2670901e+00   2.9042354e+00   4.8902416e+00   3.8029663e+00   5.0697571e+00   4.1657422e+00   4.6611282e+00   5.6979337e+00   3.1565039e+00   5.1794156e+00   4.6677357e+00   5.6656906e+00   4.3138249e+00   4.2590423e+00   4.7118516e+00   3.9079657e+00   4.2090892e+00   4.5409993e+00   4.2707579e+00   6.1569683e+00   6.0684263e+00   3.9837013e+00   5.0178221e+00   3.6761530e+00   5.7743610e+00   3.9890690e+00   4.7480354e+00   5.0151961e+00   3.8518880e+00   3.7849163e+00   4.4740109e+00   4.8191103e+00   5.2745801e+00   6.1258486e+00   4.5520039e+00   3.8145791e+00   3.8707244e+00   5.7618968e+00   4.7193263e+00   4.2030300e+00   3.6843246e+00   4.7664506e+00   4.9031551e+00   4.8333734e+00   3.8029663e+00   5.0038635e+00   5.0562579e+00   4.7021393e+00   4.1966653e+00   4.3193180e+00   4.5127918e+00   3.7195417e+00   9.8143688e-01   5.9868400e-01   1.4402716e+00   5.6992880e-01   9.8663349e-01   1.4928150e+00   1.1361809e+00   1.7216149e+00   1.8856736e+00   1.8789959e+00   2.5107352e+00   1.7228721e+00   1.3724737e+00   1.5661153e+00   2.2847787e+00   2.4120925e+00   1.4985933e+00   7.9011741e-01   5.9738093e-01   2.3528246e+00   2.0826771e+00   1.2100516e+00   2.3528246e+00   2.8601865e+00   1.6304499e+00   1.5111262e+00   4.2257604e+00   2.5031609e+00   1.6091095e+00   1.0739839e+00   2.6091054e+00   9.8932340e-01   2.3488496e+00   9.3392552e-01   1.8848176e+00   3.4513181e+00   3.2138675e+00   3.6568023e+00   4.4832075e+00   3.8715598e+00   3.6399979e+00   3.2048569e+00   4.1609431e+00   3.6276988e+00   3.7852753e+00   5.0007603e+00   3.3356061e+00   4.5726588e+00   3.6020324e+00   3.2283316e+00   3.3543125e+00   3.4317803e+00   3.5762357e+00   4.8853618e+00   3.9697083e+00   3.4608105e+00   3.5194529e+00   4.4307529e+00   3.6664068e+00   3.4821665e+00   3.4661369e+00   3.9690303e+00   3.8732280e+00   3.5908374e+00   3.6384054e+00   4.1605480e+00   4.1054173e+00   3.6121763e+00   4.1591449e+00   3.4571840e+00   2.9726287e+00   3.5108834e+00   4.5938444e+00   3.1869025e+00   4.0859475e+00   3.9449709e+00   3.4111584e+00   3.8289196e+00   4.3382952e+00   3.7437946e+00   3.1530215e+00   3.3792174e+00   3.4400302e+00   3.8876642e+00   3.5288768e+00   4.4107365e+00   4.3401559e+00   4.5910423e+00   4.1731099e+00   4.4383007e+00   5.0605479e+00   4.5288382e+00   4.7400085e+00   4.9337127e+00   4.5282137e+00   3.8167418e+00   4.4582410e+00   4.3491396e+00   4.7099690e+00   4.5667632e+00   4.1110524e+00   4.0457882e+00   4.6970439e+00   5.8050200e+00   4.9831785e+00   4.3869525e+00   4.2045486e+00   5.3107398e+00   4.2598936e+00   4.0608563e+00   4.2495756e+00   4.0560071e+00   3.7740189e+00   4.5388860e+00   4.2824837e+00   4.9058468e+00   4.5708763e+00   4.6120616e+00   3.9763551e+00   4.3872260e+00   5.0860672e+00   4.0998055e+00   3.8946369e+00   3.7330702e+00   4.2352833e+00   4.4742220e+00   4.3047259e+00   4.3401559e+00   4.4192906e+00   4.4017154e+00   4.3831142e+00   4.6832544e+00   4.0909816e+00   3.9225445e+00   3.8229302e+00   1.2140269e+00   2.2031378e+00   1.3945864e+00   1.5674943e+00   2.3519816e+00   1.7695601e+00   2.3060361e+00   2.6440626e+00   2.5730128e+00   3.3484034e+00   2.4570006e+00   2.1775427e+00   2.3990667e+00   3.0314484e+00   3.2003667e+00   2.3345854e+00   9.9891776e-01   5.8565201e-01   3.1744385e+00   2.9106021e+00   2.1090950e+00   3.1744385e+00   3.6015962e+00   2.4316107e+00   2.2478972e+00   5.0583620e+00   3.1946200e+00   2.2571919e+00   1.5783735e+00   3.4098353e+00   1.5848534e+00   3.0815481e+00   1.7053877e+00   2.6874763e+00   3.8897688e+00   3.6527400e+00   4.1085323e+00   5.1878354e+00   4.4401043e+00   4.2306533e+00   3.5668974e+00   4.8855250e+00   4.1984227e+00   4.3936084e+00   5.7667342e+00   3.8604223e+00   5.3386416e+00   4.1481805e+00   3.8457422e+00   3.8556395e+00   3.9253518e+00   4.2633467e+00   5.5746944e+00   4.6805795e+00   3.8185179e+00   4.1531225e+00   5.0514886e+00   4.2706189e+00   4.0732692e+00   4.0031242e+00   4.5383244e+00   4.3266944e+00   4.1312924e+00   4.3745457e+00   4.8862079e+00   4.8484299e+00   4.2820168e+00   4.7051757e+00   3.9401848e+00   3.2884177e+00   3.9767257e+00   5.2985037e+00   3.7419338e+00   4.7600849e+00   4.5926355e+00   3.9322406e+00   4.5116211e+00   5.0823619e+00   4.3725296e+00   3.7236864e+00   3.9623539e+00   4.0300759e+00   4.6141946e+00   4.1447443e+00   4.5866744e+00   4.8386745e+00   4.9461657e+00   4.6106150e+00   4.7813164e+00   5.3858108e+00   5.0919277e+00   5.1446449e+00   5.4739987e+00   4.5885042e+00   4.1414025e+00   4.9586480e+00   4.7213864e+00   5.2471037e+00   4.9661074e+00   4.3830009e+00   4.4568388e+00   4.6901031e+00   6.2154767e+00   5.6469307e+00   4.6501660e+00   4.6626232e+00   5.7036296e+00   4.7932843e+00   4.3038060e+00   4.5618709e+00   4.5655950e+00   4.2115551e+00   4.9692114e+00   4.7030193e+00   5.3377504e+00   4.5914343e+00   5.0293150e+00   4.5146706e+00   4.9581881e+00   5.4087027e+00   4.2557771e+00   4.2671438e+00   4.1737149e+00   4.5756985e+00   4.7660397e+00   4.6314702e+00   4.8386745e+00   4.6734470e+00   4.5970177e+00   4.7412505e+00   5.2464126e+00   4.4890534e+00   4.0948317e+00   4.2440420e+00   1.0013399e+00   5.0299964e-01   4.6310132e-01   1.2040900e+00   5.9738093e-01   1.2286837e+00   1.4541908e+00   1.4279677e+00   2.1539145e+00   1.2617482e+00   9.9544409e-01   1.2082987e+00   1.8489243e+00   2.0066856e+00   1.1587093e+00   6.6217390e-01   7.5179033e-01   1.9839744e+00   1.7063292e+00   9.6659661e-01   1.9839744e+00   2.4156729e+00   1.2419907e+00   1.0495503e+00   3.8490499e+00   2.0330726e+00   1.0871867e+00   5.4779717e-01   2.2031378e+00   5.3106808e-01   1.9004159e+00   5.5576380e-01   1.4899949e+00   3.4307448e+00   3.0710756e+00   3.5952799e+00   4.1669813e+00   3.7116384e+00   3.3536981e+00   3.0466130e+00   3.7729829e+00   3.5082606e+00   3.4067800e+00   4.6484249e+00   3.0744089e+00   4.3424419e+00   3.3858347e+00   2.9098729e+00   3.2669110e+00   3.1198644e+00   3.3210229e+00   4.6553382e+00   3.6737423e+00   3.2048569e+00   3.2989479e+00   4.2245828e+00   3.4587219e+00   3.3255241e+00   3.3484846e+00   3.8660480e+00   3.7512964e+00   3.3482610e+00   3.3605387e+00   3.8511468e+00   3.8014113e+00   3.3411134e+00   3.9109127e+00   3.1105014e+00   2.7597977e+00   3.4146222e+00   4.3904048e+00   2.8767763e+00   3.7646132e+00   3.6317356e+00   3.1996946e+00   3.5585167e+00   3.9690108e+00   3.4365573e+00   2.8705339e+00   3.0890888e+00   3.2456270e+00   3.5108688e+00   3.2367228e+00   4.2147014e+00   4.0489906e+00   4.5035700e+00   3.9755362e+00   4.2591912e+00   5.0350768e+00   4.1207838e+00   4.6882252e+00   4.7707308e+00   4.4918348e+00   3.6612573e+00   4.2568131e+00   4.2184327e+00   4.3988058e+00   4.2632946e+00   3.9245996e+00   3.8864624e+00   4.7642090e+00   5.7424408e+00   4.7299069e+00   4.2784034e+00   3.8797952e+00   5.2832732e+00   4.0458553e+00   3.9446593e+00   4.2181053e+00   3.8300888e+00   3.5427774e+00   4.3354099e+00   4.2438935e+00   4.8511407e+00   4.6817036e+00   4.4041714e+00   3.7859242e+00   4.1665370e+00   5.0618540e+00   3.9138566e+00   3.7274783e+00   3.4833346e+00   4.1288327e+00   4.3215818e+00   4.1859543e+00   4.0489906e+00   4.2965095e+00   4.2626474e+00   4.2257654e+00   4.4572702e+00   3.9184477e+00   3.7230473e+00   3.5604297e+00   1.0161882e+00   6.9420840e-01   4.8012872e-01   4.8284931e-01   6.9738730e-01   5.5709100e-01   5.3095950e-01   1.1723315e+00   3.1271814e-01   1.8699153e-01   2.9145160e-01   8.6143605e-01   1.0061402e+00   4.5257749e-01   1.4146831e+00   1.6902182e+00   9.9059199e-01   7.2340544e-01   5.0370871e-01   9.9059199e-01   1.4369223e+00   2.7124234e-01   1.3340137e-01   2.8614050e+00   1.1016806e+00   4.2656951e-01   7.5906970e-01   1.2087236e+00   7.1325427e-01   9.2761923e-01   5.3988754e-01   4.9448466e-01   3.3643791e+00   2.9159414e+00   3.4617249e+00   3.4323687e+00   3.3505903e+00   2.8169505e+00   2.9517065e+00   2.9146662e+00   3.1941250e+00   2.7393282e+00   3.7736317e+00   2.6933089e+00   3.6308668e+00   2.9914579e+00   2.3560812e+00   3.0907905e+00   2.6932687e+00   2.7021788e+00   4.0389540e+00   2.9648098e+00   2.9980910e+00   2.8201257e+00   3.7183934e+00   2.9922398e+00   2.9661287e+00   3.0950932e+00   3.5513156e+00   3.5484439e+00   2.9420200e+00   2.6629529e+00   3.1013619e+00   3.0347859e+00   2.7417410e+00   3.4474072e+00   2.6495954e+00   2.6875764e+00   3.2488445e+00   3.7904353e+00   2.3985415e+00   3.0725852e+00   2.9704304e+00   2.8556850e+00   2.9300511e+00   3.1104511e+00   2.8291506e+00   2.4008046e+00   2.5836379e+00   2.8456807e+00   2.6907656e+00   2.6814159e+00   4.1737238e+00   3.5932878e+00   4.3853076e+00   3.6802688e+00   4.0749525e+00   4.9692376e+00   3.4394110e+00   4.5331007e+00   4.3742923e+00   4.6787296e+00   3.5632387e+00   3.8923023e+00   4.0628985e+00   3.8689922e+00   3.9102807e+00   3.8336686e+00   3.6675649e+00   5.0555526e+00   5.5454277e+00   4.0994961e+00   4.2439469e+00   3.4449831e+00   5.1429556e+00   3.6472400e+00   3.9304610e+00   4.1916938e+00   3.4565067e+00   3.2536517e+00   4.0373591e+00   4.1087274e+00   4.6703619e+00   4.9904781e+00   4.1152831e+00   3.4023949e+00   3.6756751e+00   5.0151763e+00   3.9231895e+00   3.5466262e+00   3.1760855e+00   4.0346845e+00   4.2216886e+00   4.1038501e+00   3.5932878e+00   4.2504107e+00   4.2656428e+00   4.0705667e+00   3.9971917e+00   3.7133040e+00   3.7182295e+00   3.2440381e+00   7.3339246e-01   9.9973471e-01   7.7988766e-01   1.4669572e+00   1.3868865e+00   1.4360884e+00   2.0344949e+00   1.2593779e+00   9.3451915e-01   1.1232628e+00   1.8421759e+00   1.9514085e+00   1.0061402e+00   9.6168382e-01   9.7747632e-01   1.9029496e+00   1.6513423e+00   7.7821113e-01   1.9029496e+00   2.4366790e+00   1.1857824e+00   1.1156669e+00   3.7575639e+00   2.1090460e+00   1.1623508e+00   7.4500632e-01   2.1481102e+00   7.3851064e-01   1.9301732e+00   5.6262711e-01   1.4458364e+00   3.0574507e+00   2.7604800e+00   3.2354442e+00   3.9296796e+00   3.3802783e+00   3.0910114e+00   2.7653977e+00   3.6086433e+00   3.1477156e+00   3.2299948e+00   4.4531271e+00   2.8182580e+00   4.0359059e+00   3.0838698e+00   2.6832031e+00   2.9127171e+00   2.8999239e+00   3.0235972e+00   4.3556993e+00   3.4142800e+00   2.9871882e+00   2.9947610e+00   3.9084388e+00   3.1359326e+00   2.9852014e+00   3.0007807e+00   3.4997296e+00   3.4243092e+00   3.0709062e+00   3.0889274e+00   3.6054231e+00   3.5510321e+00   3.0652992e+00   3.6307363e+00   2.9199707e+00   2.5302845e+00   3.0705222e+00   4.0683526e+00   2.6430958e+00   3.5303998e+00   3.3838093e+00   2.9011205e+00   3.2808511e+00   3.7876206e+00   3.1898591e+00   2.6081677e+00   2.8342553e+00   2.9259899e+00   3.3400468e+00   2.9809771e+00   4.0130133e+00   3.8156727e+00   4.1823301e+00   3.6854232e+00   3.9919300e+00   4.6844795e+00   3.9756960e+00   4.3245814e+00   4.4396397e+00   4.2453585e+00   3.3946374e+00   3.9634682e+00   3.9204865e+00   4.1772364e+00   4.0766155e+00   3.6959934e+00   3.5831715e+00   4.4790872e+00   5.3894840e+00   4.4405497e+00   4.0027890e+00   3.6857786e+00   4.9137586e+00   3.7567964e+00   3.6729588e+00   3.8728151e+00   3.5543966e+00   3.2848126e+00   4.0598486e+00   3.8712880e+00   4.4886485e+00   4.3722180e+00   4.1373490e+00   3.4683949e+00   3.8543469e+00   4.7248681e+00   3.7193644e+00   3.4383872e+00   3.2381387e+00   3.8297356e+00   4.0647650e+00   3.9099360e+00   3.8156727e+00   4.0266221e+00   4.0296168e+00   3.9579549e+00   4.1722551e+00   3.6379295e+00   3.5328511e+00   3.3224979e+00   1.0061402e+00   2.6525508e-01   8.2148003e-01   1.1879760e+00   1.0251165e+00   1.8544941e+00   9.4128180e-01   7.1446962e-01   9.4128180e-01   1.4726083e+00   1.6607117e+00   9.9973471e-01   7.4965096e-01   1.0510795e+00   1.6532822e+00   1.4055304e+00   8.6143605e-01   1.6532822e+00   2.0368618e+00   9.3178083e-01   7.1143905e-01   3.5363390e+00   1.6307900e+00   8.0686941e-01   2.6184788e-01   1.8811296e+00   1.4276574e-01   1.5165187e+00   3.5874135e-01   1.1682143e+00   3.5420892e+00   3.1213639e+00   3.6765721e+00   3.9907084e+00   3.7063187e+00   3.2329517e+00   3.1017380e+00   3.5164906e+00   3.5204595e+00   3.2215483e+00   4.4016409e+00   3.0251724e+00   4.2008255e+00   3.3367044e+00   2.7940225e+00   3.3344791e+00   3.0219495e+00   3.1880051e+00   4.5546425e+00   3.5075399e+00   3.1952269e+00   3.2406785e+00   4.1563139e+00   3.3848806e+00   3.3178898e+00   3.3859281e+00   3.8870730e+00   3.7997125e+00   3.2944053e+00   3.2110142e+00   3.6683444e+00   3.6131226e+00   3.2236002e+00   3.8317071e+00   2.9830921e+00   2.7973167e+00   3.4787185e+00   4.2995699e+00   2.7671612e+00   3.5982071e+00   3.4619260e+00   3.1665431e+00   3.4310890e+00   3.7235030e+00   3.2953414e+00   2.7679629e+00   2.9819595e+00   3.2106653e+00   3.2879746e+00   3.1196883e+00   4.2713770e+00   3.9634682e+00   4.5846990e+00   3.9587038e+00   4.2895460e+00   5.1416821e+00   3.9119997e+00   4.7572039e+00   4.7460626e+00   4.6638344e+00   3.7280454e+00   4.2349181e+00   4.2803486e+00   4.2908242e+00   4.2152718e+00   3.9857018e+00   3.9070797e+00   4.9741957e+00   5.8097018e+00   4.6049285e+00   4.3788345e+00   3.7893243e+00   5.3689314e+00   4.0140467e+00   4.0363955e+00   4.3259832e+00   3.8006490e+00   3.5269016e+00   4.3297076e+00   4.3216441e+00   4.9220177e+00   4.9100057e+00   4.4024600e+00   3.7489348e+00   4.0736926e+00   5.1891895e+00   3.9903212e+00   3.7514870e+00   3.4564041e+00   4.2166575e+00   4.3944655e+00   4.2851348e+00   3.9634682e+00   4.3836343e+00   4.3634474e+00   4.2898748e+00   4.4067690e+00   3.9524852e+00   3.7906894e+00   3.5162082e+00   8.3156200e-01   1.1417173e+00   5.8221430e-01   7.3339246e-01   1.0428797e+00   5.5247822e-01   3.5266705e-01   2.9537172e-01   9.6466498e-01   1.0034646e+00   2.8553149e-01   1.6415483e+00   1.8567917e+00   9.3451915e-01   7.2553812e-01   3.4520795e-01   9.3451915e-01   1.5364952e+00   3.7960845e-01   5.9589853e-01   2.7723424e+00   1.3124532e+00   7.5130648e-01   1.0314203e+00   1.1925354e+00   9.9272943e-01   1.0839891e+00   7.1143905e-01   5.6164055e-01   3.0511653e+00   2.6629268e+00   3.1545235e+00   3.1980310e+00   3.0467396e+00   2.5772061e+00   2.7369167e+00   2.7576827e+00   2.8651003e+00   2.5868532e+00   3.5774656e+00   2.4748633e+00   3.3139897e+00   2.7217211e+00   2.1506369e+00   2.7852281e+00   2.5158340e+00   2.4059801e+00   3.7433691e+00   2.7041074e+00   2.8389661e+00   2.5310559e+00   3.4176981e+00   2.6902386e+00   2.6527549e+00   2.7866168e+00   3.2144386e+00   3.2675625e+00   2.6971865e+00   2.3822357e+00   2.8532332e+00   2.7780124e+00   2.4721123e+00   3.1952919e+00   2.5042136e+00   2.5315299e+00   2.9556760e+00   3.4693709e+00   2.1993495e+00   2.8460127e+00   2.7344861e+00   2.5960616e+00   2.6558880e+00   2.9309653e+00   2.5980406e+00   2.1695355e+00   2.3550298e+00   2.5518802e+00   2.5245372e+00   2.4441489e+00   4.0319503e+00   3.3933783e+00   4.1146478e+00   3.4339804e+00   3.8578841e+00   4.6712206e+00   3.3248410e+00   4.2174528e+00   4.0704050e+00   4.4988341e+00   3.3546526e+00   3.6317702e+00   3.8139412e+00   3.6743372e+00   3.7645284e+00   3.6614225e+00   3.4131399e+00   4.8439861e+00   5.2322637e+00   3.8189229e+00   4.0256031e+00   3.2902097e+00   4.8190347e+00   3.3870859e+00   3.7223145e+00   3.9080259e+00   3.2141230e+00   3.0414452e+00   3.8022687e+00   3.7869665e+00   4.3507688e+00   4.7565318e+00   3.8893282e+00   3.1162635e+00   3.3877625e+00   4.7282676e+00   3.7917280e+00   3.3122397e+00   2.9763122e+00   3.7889092e+00   4.0173731e+00   3.8788191e+00   3.3933783e+00   4.0384828e+00   4.0914753e+00   3.8500022e+00   3.7349483e+00   3.4804621e+00   3.5920363e+00   3.0535851e+00   7.5284003e-01   9.3865015e-01   8.5442446e-01   1.6409761e+00   7.0463400e-01   5.4408162e-01   7.5179033e-01   1.2786676e+00   1.4553344e+00   7.8100392e-01   1.0100290e+00   1.2786676e+00   1.4586696e+00   1.2008045e+00   7.2638147e-01   1.4586696e+00   1.8445759e+00   7.3985997e-01   5.0731024e-01   3.3136601e+00   1.4580439e+00   5.4702555e-01   3.2339566e-01   1.6607117e+00   3.5366952e-01   1.3290015e+00   3.5639126e-01   9.6825676e-01   3.4059851e+00   2.9602214e+00   3.5257340e+00   3.7492673e+00   3.5115913e+00   3.0191277e+00   2.9517483e+00   3.2720571e+00   3.3411331e+00   2.9834222e+00   4.1580731e+00   2.8211532e+00   3.9717534e+00   3.1414634e+00   2.5643903e+00   3.1728076e+00   2.8176969e+00   2.9703822e+00   4.3244606e+00   3.2734582e+00   3.0210021e+00   3.0274003e+00   3.9433841e+00   3.1866772e+00   3.1269680e+00   3.2103093e+00   3.7065013e+00   3.6299273e+00   3.0909484e+00   2.9772513e+00   3.4297321e+00   3.3756936e+00   2.9971174e+00   3.6243253e+00   2.7759818e+00   2.6501700e+00   3.3189004e+00   4.0764633e+00   2.5559925e+00   3.3602243e+00   3.2356862e+00   2.9780147e+00   3.2026716e+00   3.4783251e+00   3.0685582e+00   2.5635668e+00   2.7679629e+00   3.0129566e+00   3.0370166e+00   2.8975180e+00   4.1264564e+00   3.7496421e+00   4.4295218e+00   3.7774558e+00   4.1191095e+00   5.0038078e+00   3.6756489e+00   4.6074750e+00   4.5494422e+00   4.5665604e+00   3.5702411e+00   4.0355009e+00   4.1137066e+00   4.0638414e+00   4.0067360e+00   3.8250619e+00   3.7375780e+00   4.9153359e+00   5.6444336e+00   4.3773916e+00   4.2331397e+00   3.5751580e+00   5.2199809e+00   3.8075775e+00   3.9003626e+00   4.1989415e+00   3.5967191e+00   3.3381510e+00   4.1394208e+00   4.1772604e+00   4.7627066e+00   4.8574416e+00   4.2113835e+00   3.5565415e+00   3.8744064e+00   5.0458107e+00   3.8530980e+00   3.5894641e+00   3.2635788e+00   4.0605147e+00   4.2327162e+00   4.1232607e+00   3.7496421e+00   4.2381044e+00   4.2216886e+00   4.1152818e+00   4.1901775e+00   3.7759339e+00   3.6506667e+00   3.3268510e+00   1.0748172e+00   7.2889003e-01   1.5046031e+00   7.9398919e-01   8.1148630e-01   8.8835337e-01   9.9058911e-01   1.2262672e+00   1.1380274e+00   1.3972288e+00   1.7741287e+00   1.2483935e+00   1.0474897e+00   1.1240042e+00   1.2483935e+00   1.4149548e+00   8.1096210e-01   5.7672351e-01   3.0082939e+00   9.6865373e-01   8.2273123e-01   9.5195566e-01   1.4288989e+00   8.3246212e-01   9.4996842e-01   9.2092295e-01   8.7375509e-01   4.0151215e+00   3.5231786e+00   4.1026785e+00   3.8908802e+00   3.9665585e+00   3.3438394e+00   3.5293285e+00   3.2540384e+00   3.8314935e+00   3.1634347e+00   4.1178317e+00   3.2512254e+00   4.1561446e+00   3.5717750e+00   2.8833448e+00   3.7345570e+00   3.1952822e+00   3.2548783e+00   4.5820687e+00   3.4621656e+00   3.5141919e+00   3.4137993e+00   4.2939653e+00   3.5777026e+00   3.5926398e+00   3.7328374e+00   4.1920808e+00   4.1652091e+00   3.5073274e+00   3.1921998e+00   3.5706840e+00   3.5044583e+00   3.2904241e+00   3.9914615e+00   3.1120432e+00   3.2204607e+00   3.8807669e+00   4.3582892e+00   2.9219284e+00   3.5476488e+00   3.4540639e+00   3.4397115e+00   3.4680001e+00   3.4670753e+00   3.3367044e+00   2.9471549e+00   3.1205392e+00   3.4518638e+00   3.0783517e+00   3.2145380e+00   4.6697624e+00   4.0951447e+00   4.9940386e+00   4.2442248e+00   4.6312366e+00   5.5957028e+00   3.7901714e+00   5.1629764e+00   4.9662629e+00   5.2245876e+00   4.1326097e+00   4.4648550e+00   4.6557857e+00   4.3477764e+00   4.3833898e+00   4.3689111e+00   4.2520226e+00   5.6153369e+00   6.1715044e+00   4.6178873e+00   4.8201070e+00   3.9129644e+00   5.7808751e+00   4.2195149e+00   4.4949009e+00   4.8099428e+00   4.0213766e+00   3.8049151e+00   4.5961475e+00   4.7475868e+00   5.3061067e+00   5.5699347e+00   4.6684257e+00   3.9900166e+00   4.2272640e+00   5.6441645e+00   4.4197984e+00   4.1176453e+00   3.7157925e+00   4.6326704e+00   4.7820862e+00   4.6921349e+00   4.0951447e+00   4.8160040e+00   4.8050680e+00   4.6459078e+00   4.5554678e+00   4.2905569e+00   4.2115152e+00   3.7649212e+00   5.9314593e-01   8.0686941e-01   2.9691107e-01   6.2826980e-01   5.0121118e-01   6.6653737e-01   7.0834786e-01   4.6310132e-01   1.9251840e+00   2.1737519e+00   7.4743804e-01   5.5009731e-01   8.0748088e-01   7.4743804e-01   1.1828955e+00   4.6964680e-01   5.8942278e-01   2.4421558e+00   9.8677196e-01   4.9772204e-01   1.1660949e+00   8.4116354e-01   1.2196311e+00   7.7538587e-01   1.0376697e+00   4.4499696e-01   3.0983271e+00   2.5986852e+00   3.1534326e+00   2.8897192e+00   2.9336987e+00   2.3392252e+00   2.6586759e+00   2.3702978e+00   2.8165027e+00   2.2079130e+00   3.2363154e+00   2.2664200e+00   3.1218253e+00   2.5673178e+00   1.8638939e+00   2.7710337e+00   2.2535803e+00   2.2156046e+00   3.5264693e+00   2.4375344e+00   2.6410495e+00   2.3635223e+00   3.2419868e+00   2.5535068e+00   2.5663186e+00   2.7372400e+00   3.1657714e+00   3.1910277e+00   2.5035271e+00   2.1450705e+00   2.5644558e+00   2.5011730e+00   2.2417546e+00   2.9810976e+00   2.2012005e+00   2.4146140e+00   2.9247451e+00   3.2953953e+00   1.9474034e+00   2.5368532e+00   2.4541089e+00   2.4554575e+00   2.4210504e+00   2.5661600e+00   2.3207574e+00   1.9628165e+00   2.1171985e+00   2.4261018e+00   2.1366217e+00   2.1917681e+00   3.8609963e+00   3.1157672e+00   4.0464741e+00   3.2769657e+00   3.7011972e+00   4.6584806e+00   2.9074576e+00   4.1962146e+00   3.9292452e+00   4.4717831e+00   3.2385313e+00   3.4507621e+00   3.7050324e+00   3.3601278e+00   3.4577371e+00   3.4991206e+00   3.2980589e+00   4.9174048e+00   5.1685262e+00   3.5822256e+00   3.9345678e+00   2.9743611e+00   4.8043725e+00   3.1946631e+00   3.6425792e+00   3.9147944e+00   3.0137993e+00   2.8509730e+00   3.6160190e+00   3.7930649e+00   4.3160863e+00   4.8705552e+00   3.6935350e+00   2.9765851e+00   3.2157655e+00   4.7030966e+00   3.6383061e+00   3.1964791e+00   2.7656084e+00   3.7055141e+00   3.8768834e+00   3.7701724e+00   3.1157672e+00   3.9366463e+00   3.9674740e+00   3.7027144e+00   3.5167570e+00   3.3369517e+00   3.4319544e+00   2.8332022e+00   9.6865373e-01   3.9487224e-01   5.8131330e-01   5.6003943e-01   5.0621589e-01   7.1247632e-01   8.0317491e-01   1.7053539e+00   2.0491684e+00   7.4957404e-01   6.5459290e-01   9.3991103e-01   7.4957404e-01   1.0954558e+00   4.2737382e-01   4.9430028e-01   2.5884539e+00   7.4949264e-01   6.4432393e-01   1.0251728e+00   9.7391954e-01   1.0055888e+00   5.9279023e-01   9.4588685e-01   4.3798311e-01   3.5017283e+00   3.0032209e+00   3.5640998e+00   3.2626300e+00   3.3723783e+00   2.7101865e+00   3.0361435e+00   2.6574564e+00   3.2363742e+00   2.5684615e+00   3.5220489e+00   2.6863775e+00   3.5035562e+00   2.9639854e+00   2.2954282e+00   3.1974234e+00   2.6186896e+00   2.5919605e+00   3.9485388e+00   2.8137879e+00   3.0123600e+00   2.8059985e+00   3.6581986e+00   2.9351026e+00   2.9984934e+00   3.1711590e+00   3.5947528e+00   3.6146776e+00   2.9159819e+00   2.5508141e+00   2.9298445e+00   2.8588898e+00   2.6582994e+00   3.3705985e+00   2.5395254e+00   2.7634723e+00   3.3411818e+00   3.7151762e+00   2.3273691e+00   2.9184140e+00   2.8006021e+00   2.8512853e+00   2.8277392e+00   2.8675465e+00   2.7048983e+00   2.3342128e+00   2.5075548e+00   2.8488482e+00   2.4938133e+00   2.5939117e+00   4.2210242e+00   3.5094230e+00   4.4613495e+00   3.6611526e+00   4.1011462e+00   5.0575391e+00   3.2183295e+00   4.5889909e+00   4.3421582e+00   4.8334387e+00   3.6441411e+00   3.8749352e+00   4.1286607e+00   3.7602700e+00   3.8694583e+00   3.9027404e+00   3.6910974e+00   5.2330448e+00   5.5920875e+00   3.9683831e+00   4.3421746e+00   3.3618744e+00   5.2099570e+00   3.6296154e+00   4.0192804e+00   4.2904705e+00   3.4453138e+00   3.2560920e+00   4.0303932e+00   4.1835729e+00   4.7330562e+00   5.1897695e+00   4.1126264e+00   3.3744864e+00   3.5691373e+00   5.1336306e+00   3.9986271e+00   3.5735980e+00   3.1698618e+00   4.1283627e+00   4.2954773e+00   4.2156054e+00   3.5094230e+00   4.3310092e+00   4.3633885e+00   4.1455698e+00   3.9545856e+00   3.7585686e+00   3.7901495e+00   3.2094268e+00   9.5902306e-01   1.1795364e+00   9.6032771e-01   5.8652824e-01   3.3395426e-01   1.0753036e+00   2.5524007e+00   2.8349345e+00   2.9691107e-01   5.1396090e-01   1.3127309e+00   2.9691107e-01   7.4426155e-01   9.3211669e-01   1.1729612e+00   1.7369516e+00   8.7560645e-01   1.2666796e+00   1.8751947e+00   2.9724335e-01   1.8489906e+00   6.7745878e-01   1.6555341e+00   7.0111465e-01   3.4067014e+00   2.9452188e+00   3.4231096e+00   2.6265336e+00   3.0474186e+00   2.3887954e+00   3.0652160e+00   1.9891259e+00   2.9589070e+00   2.1699637e+00   2.7527251e+00   2.5008826e+00   2.7949298e+00   2.7160947e+00   1.9851008e+00   3.0428102e+00   2.4755098e+00   2.1256864e+00   3.3327734e+00   2.2236827e+00   3.0131023e+00   2.4300526e+00   3.1928299e+00   2.6040863e+00   2.7075499e+00   2.9536823e+00   3.2710263e+00   3.4338296e+00   2.6673396e+00   1.9555334e+00   2.2858019e+00   2.1897213e+00   2.1973377e+00   3.0392888e+00   2.4158794e+00   2.8941568e+00   3.2025759e+00   3.1091590e+00   2.1471303e+00   2.3710990e+00   2.3347284e+00   2.6698387e+00   2.3133518e+00   2.1525596e+00   2.2918773e+00   2.1454625e+00   2.2398142e+00   2.5636830e+00   1.8343082e+00   2.2388656e+00   4.2714137e+00   3.2107728e+00   4.3091817e+00   3.4717121e+00   3.9768763e+00   4.9078859e+00   2.8122927e+00   4.3885241e+00   3.9504682e+00   4.9558940e+00   3.6044479e+00   3.5632387e+00   3.9760735e+00   3.3646188e+00   3.6594046e+00   3.8782141e+00   3.5443654e+00   5.4091146e+00   5.2988184e+00   3.3878489e+00   4.2952367e+00   3.1303129e+00   4.9761618e+00   3.2919446e+00   4.0362588e+00   4.2291285e+00   3.1618923e+00   3.1077588e+00   3.7959134e+00   4.0112445e+00   4.4810404e+00   5.3509795e+00   3.8831153e+00   3.0844802e+00   3.1980603e+00   4.9707249e+00   4.0945548e+00   3.4918172e+00   3.0237585e+00   4.0192804e+00   4.2092252e+00   4.1017980e+00   3.2107728e+00   4.2952415e+00   4.3790330e+00   3.9936934e+00   3.5312555e+00   3.6065699e+00   3.8937621e+00   3.0840989e+00   4.2827238e-01   3.7398306e-01   6.4241342e-01   7.7828522e-01   4.8636669e-01   1.6800011e+00   1.9622194e+00   8.0686941e-01   5.7691891e-01   7.1789533e-01   8.0686941e-01   1.2139401e+00   2.9406726e-01   3.1507080e-01   2.6166211e+00   9.1398375e-01   3.4909881e-01   9.4580058e-01   9.6922609e-01   9.6659661e-01   7.2638147e-01   8.2574748e-01   3.6704030e-01   3.2939549e+00   2.8018134e+00   3.3643791e+00   3.1688464e+00   3.1882120e+00   2.5926123e+00   2.8420400e+00   2.6229843e+00   3.0569434e+00   2.4659441e+00   3.4932809e+00   2.5062529e+00   3.4038365e+00   2.8103848e+00   2.1284730e+00   2.9880998e+00   2.4809350e+00   2.4830222e+00   3.8129321e+00   2.7155086e+00   2.8370039e+00   2.6306749e+00   3.5140670e+00   2.8045035e+00   2.8143558e+00   2.9698163e+00   3.4126571e+00   3.4177063e+00   2.7508387e+00   2.4282690e+00   2.8424700e+00   2.7781836e+00   2.5174968e+00   3.2360555e+00   2.4214382e+00   2.5753180e+00   3.1397228e+00   3.5790751e+00   2.1850441e+00   2.8131786e+00   2.7177153e+00   2.6876771e+00   2.6993734e+00   2.8253248e+00   2.5871836e+00   2.1990767e+00   2.3678133e+00   2.6762366e+00   2.4070540e+00   2.4551607e+00   4.0383784e+00   3.3671653e+00   4.2642537e+00   3.5070157e+00   3.9193977e+00   4.8684861e+00   3.1505769e+00   4.4165051e+00   4.1898287e+00   4.6203725e+00   3.4386758e+00   3.7047820e+00   3.9273366e+00   3.6237778e+00   3.6947343e+00   3.6968840e+00   3.5190023e+00   5.0398879e+00   5.4089760e+00   3.8611646e+00   4.1322470e+00   3.2145601e+00   5.0295849e+00   3.4546083e+00   3.8248698e+00   4.1055247e+00   3.2664139e+00   3.0788010e+00   3.8567883e+00   4.0060320e+00   4.5478501e+00   4.9912214e+00   3.9339246e+00   3.2236553e+00   3.4677443e+00   4.9178815e+00   3.8042163e+00   3.4041321e+00   2.9939885e+00   3.9171296e+00   4.0866646e+00   3.9845548e+00   3.3671653e+00   4.1322520e+00   4.1520423e+00   3.9277271e+00   3.7880802e+00   3.5624203e+00   3.5967687e+00   3.0549169e+00   2.3749211e-01   9.2006504e-01   1.0428797e+00   4.2450569e-01   1.3899721e+00   1.6555341e+00   9.9973471e-01   7.5230154e-01   3.7960845e-01   9.9973471e-01   1.5086315e+00   2.6033464e-01   2.9724335e-01   2.8989712e+00   1.1937015e+00   5.7988427e-01   7.8318003e-01   1.2583645e+00   7.0463400e-01   1.0034646e+00   4.7680727e-01   5.2374483e-01   3.3114294e+00   2.8933417e+00   3.4177063e+00   3.4461307e+00   3.3255941e+00   2.8176969e+00   2.9380167e+00   2.9507452e+00   3.1524130e+00   2.7797208e+00   3.7960371e+00   2.6995806e+00   3.6095704e+00   2.9762135e+00   2.3753547e+00   3.0506196e+00   2.7121484e+00   2.6831858e+00   4.0299127e+00   2.9653560e+00   3.0144396e+00   2.8058449e+00   3.7011663e+00   2.9654419e+00   2.9344166e+00   3.0597490e+00   3.5085997e+00   3.5226725e+00   2.9395346e+00   2.6564538e+00   3.1076159e+00   3.0365838e+00   2.7379532e+00   3.4446760e+00   2.6796909e+00   2.6912430e+00   3.2129972e+00   3.7686900e+00   2.4108238e+00   3.0879511e+00   2.9762529e+00   2.8408428e+00   2.9254092e+00   3.1396427e+00   2.8384396e+00   2.3985415e+00   2.5881776e+00   2.8229620e+00   2.7289403e+00   2.6869860e+00   4.1910480e+00   3.6130663e+00   4.3602249e+00   3.6707779e+00   4.0745117e+00   4.9277939e+00   3.4934873e+00   4.4880495e+00   4.3514534e+00   4.6654573e+00   3.5594056e+00   3.8864758e+00   4.0498126e+00   3.8963526e+00   3.9502563e+00   3.8456535e+00   3.6509387e+00   5.0146974e+00   5.5101576e+00   4.0937915e+00   4.2345704e+00   3.4807992e+00   5.0960662e+00   3.6438388e+00   3.9190152e+00   4.1487738e+00   3.4580678e+00   3.2588014e+00   4.0378648e+00   4.0580582e+00   4.6285945e+00   4.9381887e+00   4.1199488e+00   3.3816601e+00   3.6553790e+00   4.9813108e+00   3.9405186e+00   3.5335600e+00   3.1869497e+00   4.0186781e+00   4.2240093e+00   4.0988575e+00   3.6130663e+00   4.2429720e+00   4.2712088e+00   4.0719125e+00   3.9975817e+00   3.7087600e+00   3.7375363e+00   3.2561951e+00   7.6824760e-01   8.5141186e-01   3.6086962e-01   1.6207126e+00   1.8802756e+00   7.9394533e-01   5.3286499e-01   4.3319335e-01   7.9394533e-01   1.3370188e+00   1.3340137e-01   3.6319073e-01   2.6778759e+00   1.0720705e+00   6.3173774e-01   1.0072799e+00   1.0495503e+00   9.3727156e-01   8.5893964e-01   7.0463400e-01   3.3395426e-01   3.3027871e+00   2.8812178e+00   3.3955887e+00   3.2888081e+00   3.2512254e+00   2.7283479e+00   2.9463809e+00   2.7764635e+00   3.0911130e+00   2.6620270e+00   3.6054231e+00   2.6430457e+00   3.4442793e+00   2.9123088e+00   2.2793286e+00   3.0205073e+00   2.6595069e+00   2.5635668e+00   3.8866925e+00   2.8178210e+00   3.0060120e+00   2.7101865e+00   3.5930006e+00   2.8829084e+00   2.8651003e+00   3.0121201e+00   3.4400598e+00   3.4869142e+00   2.8725792e+00   2.5068325e+00   2.9480926e+00   2.8720011e+00   2.6183827e+00   3.3619078e+00   2.6263990e+00   2.7176350e+00   3.1874455e+00   3.6289342e+00   2.3459758e+00   2.9476507e+00   2.8536577e+00   2.7917808e+00   2.7959976e+00   2.9585178e+00   2.7268209e+00   2.3347284e+00   2.5080346e+00   2.7508387e+00   2.5565749e+00   2.5881776e+00   4.2068537e+00   3.5342439e+00   4.3380559e+00   3.6271373e+00   4.0499864e+00   4.9127682e+00   3.3748745e+00   4.4574738e+00   4.2666131e+00   4.7143178e+00   3.5549829e+00   3.8149934e+00   4.0227420e+00   3.7946027e+00   3.8919837e+00   3.8432323e+00   3.6208873e+00   5.0849580e+00   5.4596452e+00   3.9569474e+00   4.2354064e+00   3.4126422e+00   5.0611947e+00   3.5638945e+00   3.9334644e+00   4.1519487e+00   3.3885059e+00   3.2191166e+00   3.9849073e+00   4.0334328e+00   4.5859724e+00   5.0075986e+00   4.0680600e+00   3.3134027e+00   3.5670952e+00   4.9632121e+00   3.9675062e+00   3.5176551e+00   3.1453377e+00   4.0038982e+00   4.2114761e+00   4.0820077e+00   3.5342439e+00   4.2453199e+00   4.2844704e+00   4.0426067e+00   3.8984747e+00   3.6765607e+00   3.7642725e+00   3.2184749e+00   2.6033464e-01   9.9962901e-01   2.1664244e+00   2.5030472e+00   3.6319073e-01   4.2737382e-01   1.2004100e+00   3.6319073e-01   6.1067563e-01   6.7030885e-01   8.0996690e-01   2.1006743e+00   4.0020411e-01   9.4057729e-01   1.4985933e+00   5.0731024e-01   1.4656715e+00   1.6562722e-01   1.3630799e+00   4.4417668e-01   3.6433721e+00   3.1333439e+00   3.6757970e+00   3.0281244e+00   3.3717708e+00   2.6624050e+00   3.1998148e+00   2.3430115e+00   3.2729115e+00   2.4219924e+00   3.1700354e+00   2.7177110e+00   3.2760900e+00   2.9826961e+00   2.2410752e+00   3.2981044e+00   2.6452183e+00   2.4901533e+00   3.7687554e+00   2.6225184e+00   3.1280668e+00   2.7635526e+00   3.5692464e+00   2.9177616e+00   3.0187150e+00   3.2354747e+00   3.6116754e+00   3.6909005e+00   2.9234404e+00   2.3731183e+00   2.6987010e+00   2.6178190e+00   2.5515904e+00   3.3308561e+00   2.5554841e+00   2.9570491e+00   3.4460544e+00   3.5549612e+00   2.3407691e+00   2.7326628e+00   2.6614903e+00   2.9042354e+00   2.6919656e+00   2.5430017e+00   2.6000033e+00   2.3578684e+00   2.4871797e+00   2.8599439e+00   2.2045434e+00   2.5287499e+00   4.3690091e+00   3.4628576e+00   4.5552847e+00   3.7077077e+00   4.1799642e+00   5.1678263e+00   3.0379779e+00   4.6720960e+00   4.3013447e+00   5.0550361e+00   3.7713495e+00   3.8605708e+00   4.2104897e+00   3.6525334e+00   3.8549710e+00   4.0229434e+00   3.7708197e+00   5.5011831e+00   5.6245097e+00   3.7945557e+00   4.4755001e+00   3.3306776e+00   5.2815051e+00   3.5995462e+00   4.1814664e+00   4.4417427e+00   3.4376057e+00   3.3113002e+00   4.0501276e+00   4.2847585e+00   4.7905454e+00   5.4600808e+00   4.1319681e+00   3.3795104e+00   3.5192584e+00   5.2359042e+00   4.1708373e+00   3.6809073e+00   3.2190305e+00   4.2365575e+00   4.3973146e+00   4.3149219e+00   3.4628576e+00   4.4657183e+00   4.5132257e+00   4.2167698e+00   3.8749352e+00   3.8293474e+00   3.9628758e+00   3.2623926e+00   1.0371214e+00   2.3606689e+00   2.6764689e+00   1.8699153e-01   4.0363332e-01   1.2627589e+00   1.8699153e-01   5.6164055e-01   7.8305765e-01   9.7747632e-01   1.8924893e+00   5.6164055e-01   1.0881632e+00   1.6837963e+00   2.8845946e-01   1.6545637e+00   3.5266705e-01   1.5108472e+00   5.3286499e-01   3.5596461e+00   3.0642731e+00   3.5820652e+00   2.8366432e+00   3.2382208e+00   2.5375138e+00   3.1537738e+00   2.1559444e+00   3.1474432e+00   2.2926143e+00   2.9585178e+00   2.6250629e+00   3.0590120e+00   2.8699760e+00   2.1233327e+00   3.2024265e+00   2.5670381e+00   2.3272067e+00   3.5735096e+00   2.4368431e+00   3.0826231e+00   2.6212838e+00   3.4052824e+00   2.7833861e+00   2.8923043e+00   3.1255601e+00   3.4747564e+00   3.5908785e+00   2.8135312e+00   2.1839196e+00   2.5032729e+00   2.4158569e+00   2.3928312e+00   3.2017644e+00   2.4862299e+00   2.9403226e+00   3.3545989e+00   3.3587820e+00   2.2520446e+00   2.5607059e+00   2.5059290e+00   2.8073565e+00   2.5209771e+00   2.3430115e+00   2.4562939e+00   2.2633781e+00   2.3755041e+00   2.7368591e+00   2.0165442e+00   2.3969046e+00   4.3354025e+00   3.3475977e+00   4.4615703e+00   3.6095772e+00   4.0990362e+00   5.0710534e+00   2.9144612e+00   4.5627576e+00   4.1522674e+00   5.0316497e+00   3.7102339e+00   3.7341705e+00   4.1195531e+00   3.5174471e+00   3.7659275e+00   3.9693828e+00   3.6809073e+00   5.4858042e+00   5.4945039e+00   3.6088006e+00   4.4109170e+00   3.2362256e+00   5.1634795e+00   3.4678413e+00   4.1322470e+00   4.3666536e+00   3.3199204e+00   3.2266664e+00   3.9433408e+00   4.1815045e+00   4.6694810e+00   5.4392260e+00   4.0273519e+00   3.2552513e+00   3.3773249e+00   5.1375752e+00   4.1484621e+00   3.6075786e+00   3.1365574e+00   4.1554935e+00   4.3260165e+00   4.2353581e+00   3.3475977e+00   4.4043042e+00   4.4676627e+00   4.1295047e+00   3.7244531e+00   3.7408419e+00   3.9430201e+00   3.1856251e+00   1.6790448e+00   1.8683303e+00   9.9891776e-01   7.3735391e-01   3.8639663e-01   9.9891776e-01   1.5462701e+00   4.4713936e-01   5.6262711e-01   2.7653818e+00   1.3238834e+00   5.9868400e-01   1.0167074e+00   1.1817121e+00   1.0267382e+00   1.1036371e+00   7.4965096e-01   5.9868400e-01   2.9920629e+00   2.5767485e+00   3.0904477e+00   3.1383073e+00   2.9738737e+00   2.5155127e+00   2.6450302e+00   2.7097016e+00   2.8120208e+00   2.4963677e+00   3.5442384e+00   2.3737852e+00   3.2878773e+00   2.6552959e+00   2.0482711e+00   2.7132601e+00   2.4244329e+00   2.3725931e+00   3.6825624e+00   2.6567419e+00   2.7277627e+00   2.4551607e+00   3.3586468e+00   2.6490703e+00   2.5878996e+00   2.7146857e+00   3.1604264e+00   3.1862677e+00   2.6121387e+00   2.3320406e+00   2.8060955e+00   2.7397840e+00   2.4059801e+00   3.1251810e+00   2.4123722e+00   2.4266062e+00   2.8827369e+00   3.4219145e+00   2.1146056e+00   2.7787333e+00   2.6868306e+00   2.5237903e+00   2.5969195e+00   2.8858666e+00   2.5292454e+00   2.1030528e+00   2.2789104e+00   2.4843930e+00   2.4502513e+00   2.3681813e+00   3.9129285e+00   3.2963379e+00   4.0307050e+00   3.3579713e+00   3.7573925e+00   4.6072225e+00   3.2350676e+00   4.1666050e+00   4.0096938e+00   4.3939440e+00   3.2458961e+00   3.5448948e+00   3.7163166e+00   3.5735211e+00   3.6303034e+00   3.5366397e+00   3.3347301e+00   4.7764597e+00   5.1656525e+00   3.7678733e+00   3.9190152e+00   3.1752055e+00   4.7655871e+00   3.2963860e+00   3.6257668e+00   3.8480918e+00   3.1163356e+00   2.9401017e+00   3.7060704e+00   3.7400429e+00   4.2905130e+00   4.6982735e+00   3.7862785e+00   3.0555922e+00   3.3519252e+00   4.6433941e+00   3.6672706e+00   3.2313825e+00   2.8704346e+00   3.6888814e+00   3.9001229e+00   3.7578379e+00   3.2963379e+00   3.9355102e+00   3.9693842e+00   3.7298088e+00   3.6452459e+00   3.3776637e+00   3.4666091e+00   2.9570067e+00   4.5257749e-01   2.3345854e+00   2.1006743e+00   1.4408765e+00   2.3345854e+00   2.7201861e+00   1.6242170e+00   1.4334280e+00   4.2461520e+00   2.2960397e+00   1.5510150e+00   8.3619405e-01   2.5963945e+00   7.1671402e-01   2.2031378e+00   9.3957399e-01   1.8662528e+00   3.9018608e+00   3.5587525e+00   4.0758181e+00   4.6738622e+00   4.2315488e+00   3.8362958e+00   3.5101695e+00   4.2349456e+00   4.0096351e+00   3.8957954e+00   5.1177048e+00   3.5857491e+00   4.8511271e+00   3.8770675e+00   3.4324591e+00   3.7687554e+00   3.5952204e+00   3.8095276e+00   5.1880951e+00   4.1733990e+00   3.6719420e+00   3.8275992e+00   4.7391892e+00   3.9417326e+00   3.8406076e+00   3.8597390e+00   4.3729123e+00   4.2482658e+00   3.8534412e+00   3.8740219e+00   4.3496532e+00   4.2951960e+00   3.8572117e+00   4.4028225e+00   3.5707989e+00   3.2084035e+00   3.9057558e+00   4.9165227e+00   3.3635180e+00   4.2694314e+00   4.1082916e+00   3.6886188e+00   4.0716087e+00   4.4411156e+00   3.9335446e+00   3.3496034e+00   3.5830335e+00   3.7561390e+00   4.0088699e+00   3.7413425e+00   4.6436290e+00   4.5471223e+00   4.9787007e+00   4.4481204e+00   4.7341193e+00   5.4826137e+00   4.5863292e+00   5.1433212e+00   5.2725182e+00   4.8836508e+00   4.1393671e+00   4.7672599e+00   4.7092337e+00   4.9106562e+00   4.7707455e+00   4.3996661e+00   4.3591552e+00   5.0844032e+00   6.2257171e+00   5.2378683e+00   4.7433741e+00   4.3742533e+00   5.7435198e+00   4.5678545e+00   4.3840310e+00   4.6485090e+00   4.3482964e+00   4.0364176e+00   4.8328894e+00   4.6980887e+00   5.3298852e+00   5.0020990e+00   4.9051796e+00   4.2757519e+00   4.6314634e+00   5.5369700e+00   4.3420582e+00   4.1857666e+00   3.9786340e+00   4.6138259e+00   4.8044656e+00   4.6911542e+00   4.5471223e+00   4.7508760e+00   4.7161034e+00   4.7355095e+00   4.9879154e+00   4.4154797e+00   4.1545903e+00   4.0343137e+00   2.6422396e+00   2.3867296e+00   1.6154069e+00   2.6422396e+00   3.0703842e+00   1.9080710e+00   1.7295385e+00   4.5475791e+00   2.6621202e+00   1.8051284e+00   1.1105716e+00   2.8967543e+00   1.0474897e+00   2.5495727e+00   1.1795364e+00   2.1617152e+00   3.8171826e+00   3.5339654e+00   4.0163479e+00   4.8425911e+00   4.2514283e+00   3.9557653e+00   3.4792404e+00   4.4740529e+00   4.0150475e+00   4.0717494e+00   5.3501548e+00   3.6486698e+00   4.9910943e+00   3.9350582e+00   3.5547141e+00   3.7282030e+00   3.6962934e+00   3.9420318e+00   5.2895497e+00   4.3341610e+00   3.6960949e+00   3.8986276e+00   4.8106103e+00   4.0206152e+00   3.8664495e+00   3.8454452e+00   4.3675713e+00   4.2173036e+00   3.9169317e+00   4.0237417e+00   4.5248905e+00   4.4756871e+00   3.9778974e+00   4.4827624e+00   3.6962934e+00   3.1970228e+00   3.8646917e+00   5.0103465e+00   3.4775294e+00   4.4295579e+00   4.2690345e+00   3.7344524e+00   4.1995700e+00   4.6716989e+00   4.0716455e+00   3.4573201e+00   3.6936958e+00   3.8056210e+00   4.2211876e+00   3.8604223e+00   4.5958210e+00   4.6323449e+00   4.9087471e+00   4.4703758e+00   4.7121623e+00   5.3828288e+00   4.7798674e+00   5.0815530e+00   5.2996504e+00   4.7231435e+00   4.0911974e+00   4.7955081e+00   4.6606898e+00   5.0156099e+00   4.8233009e+00   4.3540706e+00   4.3488974e+00   4.8785742e+00   6.1614901e+00   5.3577416e+00   4.6571075e+00   4.4651793e+00   5.6630236e+00   4.6077729e+00   4.3065165e+00   4.5525984e+00   4.3873290e+00   4.0638414e+00   4.8447047e+00   4.6322938e+00   5.2676175e+00   4.7796156e+00   4.9133278e+00   4.3194697e+00   4.7202167e+00   5.4208419e+00   4.2794874e+00   4.1728215e+00   4.0165591e+00   4.5422714e+00   4.7447407e+00   4.6112705e+00   4.6323449e+00   4.6754921e+00   4.6293227e+00   4.6871898e+00   5.0428586e+00   4.3953592e+00   4.1024574e+00   4.0848110e+00   3.3742167e-01   1.1857824e+00   0.0000000e+00   6.6918102e-01   7.4445830e-01   9.7322023e-01   1.9284841e+00   6.6918102e-01   1.1393372e+00   1.6942803e+00   3.7371902e-01   1.6386105e+00   4.5257749e-01   1.4715172e+00   4.9772204e-01   3.5602797e+00   3.0968979e+00   3.5933352e+00   2.8998722e+00   3.2656298e+00   2.6029746e+00   3.1974447e+00   2.2445103e+00   3.1601923e+00   2.3946216e+00   3.0209665e+00   2.6867317e+00   3.0775658e+00   2.9161244e+00   2.1946278e+00   3.2137635e+00   2.6502891e+00   2.3652711e+00   3.6096140e+00   2.4893065e+00   3.1578003e+00   2.6568473e+00   3.4426472e+00   2.8187901e+00   2.9128857e+00   3.1418202e+00   3.4847097e+00   3.6205958e+00   2.8694312e+00   2.2223283e+00   2.5588203e+00   2.4651138e+00   2.4413293e+00   3.2621861e+00   2.5834128e+00   2.9995857e+00   3.3733791e+00   3.3817876e+00   2.3263008e+00   2.6305758e+00   2.5756071e+00   2.8533918e+00   2.5683063e+00   2.4187322e+00   2.5258216e+00   2.3250308e+00   2.4413618e+00   2.7691536e+00   2.1006933e+00   2.4608850e+00   4.4119896e+00   3.4290419e+00   4.4942656e+00   3.6650933e+00   4.1590662e+00   5.0899438e+00   3.0333619e+00   4.5799469e+00   4.1882413e+00   5.0726081e+00   3.7613721e+00   3.7859992e+00   4.1623715e+00   3.6029758e+00   3.8608065e+00   4.0352348e+00   3.7266849e+00   5.5043247e+00   5.5172732e+00   3.6569442e+00   4.4568115e+00   3.3324016e+00   5.1765224e+00   3.5192065e+00   4.1799642e+00   4.3857400e+00   3.3769078e+00   3.2906843e+00   4.0034548e+00   4.1917183e+00   4.6854597e+00   5.4444866e+00   4.0904298e+00   3.2962678e+00   3.4250783e+00   5.1569386e+00   4.2213314e+00   3.6582637e+00   3.2059261e+00   4.1937040e+00   4.3826532e+00   4.2786320e+00   3.4290419e+00   4.4549850e+00   4.5270304e+00   4.1816268e+00   3.7777251e+00   3.7924144e+00   4.0173731e+00   3.2613828e+00   9.2006504e-01   3.3742167e-01   8.6080744e-01   5.0621589e-01   7.0646671e-01   2.1664244e+00   7.2679299e-01   8.9712099e-01   1.4681660e+00   5.4873947e-01   1.4074199e+00   4.9617437e-01   1.2206236e+00   2.5698045e-01   3.4986942e+00   3.0427234e+00   3.5520531e+00   3.0444864e+00   3.2783159e+00   2.6723101e+00   3.1333743e+00   2.4360210e+00   3.1627463e+00   2.4904253e+00   3.2338077e+00   2.6808015e+00   3.2240677e+00   2.9412073e+00   2.2206950e+00   3.1669559e+00   2.6716144e+00   2.4623998e+00   3.7173707e+00   2.6198784e+00   3.1208539e+00   2.6854361e+00   3.5171200e+00   2.8753360e+00   2.9157449e+00   3.1157529e+00   3.4945103e+00   3.5956983e+00   2.8873581e+00   2.3297122e+00   2.7075732e+00   2.6220688e+00   2.5143128e+00   3.3225169e+00   2.6164571e+00   2.9213819e+00   3.3323415e+00   3.4842326e+00   2.3487772e+00   2.7507828e+00   2.6991998e+00   2.8571158e+00   2.6614903e+00   2.6122501e+00   2.6121387e+00   2.3527202e+00   2.4822998e+00   2.7826627e+00   2.2477567e+00   2.5188545e+00   4.3590737e+00   3.4800724e+00   4.4652192e+00   3.6820633e+00   4.1423404e+00   5.0632361e+00   3.1594575e+00   4.5764429e+00   4.2442248e+00   4.9703970e+00   3.7054123e+00   3.8144340e+00   4.1322520e+00   3.6772717e+00   3.8704422e+00   3.9786899e+00   3.7187193e+00   5.3973273e+00   5.5276243e+00   3.7838435e+00   4.3978718e+00   3.3669786e+00   5.1732410e+00   3.5478651e+00   4.1195682e+00   4.3422158e+00   3.3925731e+00   3.2818178e+00   4.0157845e+00   4.1753467e+00   4.6824968e+00   5.3318394e+00   4.0983108e+00   3.3321312e+00   3.5171976e+00   5.1116177e+00   4.1480571e+00   3.6395566e+00   3.1983718e+00   4.1451783e+00   4.3355345e+00   4.2161052e+00   3.4800724e+00   4.4037157e+00   4.4559384e+00   4.1399085e+00   3.8303307e+00   3.7678377e+00   3.9434740e+00   3.2672961e+00   1.1857824e+00   1.7590894e+00   5.4715569e-01   6.1787077e-01   3.0224093e+00   1.4977817e+00   8.1744862e-01   9.4676850e-01   1.4369223e+00   8.6079202e-01   1.2896554e+00   5.3286499e-01   7.6195008e-01   3.1536923e+00   2.8019556e+00   3.2823965e+00   3.4754319e+00   3.2348803e+00   2.8339836e+00   2.8678686e+00   3.0569237e+00   3.0422163e+00   2.8599505e+00   3.8711727e+00   2.6769819e+00   3.5769114e+00   2.9369339e+00   2.3887701e+00   2.9172679e+00   2.7450499e+00   2.6744413e+00   3.9868196e+00   2.9825819e+00   3.0070640e+00   2.7478281e+00   3.6492544e+00   2.9260177e+00   2.8398296e+00   2.9417237e+00   3.3879693e+00   3.4191352e+00   2.9103957e+00   2.6495864e+00   3.1359829e+00   3.0635119e+00   2.7246726e+00   3.4310966e+00   2.7450499e+00   2.6593850e+00   3.0929063e+00   3.7090709e+00   2.4372581e+00   3.1206171e+00   3.0186562e+00   2.7973689e+00   2.9151879e+00   3.2261028e+00   2.8631702e+00   2.4096686e+00   2.5984928e+00   2.7564382e+00   2.8056103e+00   2.6945402e+00   4.1622883e+00   3.6243461e+00   4.2495237e+00   3.6308369e+00   4.0200378e+00   4.7940036e+00   3.6050689e+00   4.3664479e+00   4.2800934e+00   4.5553898e+00   3.4840330e+00   3.8323637e+00   3.9571437e+00   3.9163572e+00   3.9605759e+00   3.7909588e+00   3.5846709e+00   4.8756388e+00   5.3862972e+00   4.0807979e+00   4.1385728e+00   3.5138167e+00   4.9592897e+00   3.5910983e+00   3.8379532e+00   4.0230039e+00   3.4134019e+00   3.2269518e+00   3.9906410e+00   3.9261146e+00   4.4982182e+00   4.7746016e+00   4.0736767e+00   3.3286256e+00   3.6393910e+00   4.8333249e+00   3.9033387e+00   3.4776516e+00   3.1661860e+00   3.9124707e+00   4.1473618e+00   3.9899548e+00   3.6243461e+00   4.1607944e+00   4.1969547e+00   3.9859042e+00   3.9511939e+00   3.6382505e+00   3.7066628e+00   3.2552942e+00   6.6918102e-01   7.4445830e-01   9.7322023e-01   1.9284841e+00   6.6918102e-01   1.1393372e+00   1.6942803e+00   3.7371902e-01   1.6386105e+00   4.5257749e-01   1.4715172e+00   4.9772204e-01   3.5602797e+00   3.0968979e+00   3.5933352e+00   2.8998722e+00   3.2656298e+00   2.6029746e+00   3.1974447e+00   2.2445103e+00   3.1601923e+00   2.3946216e+00   3.0209665e+00   2.6867317e+00   3.0775658e+00   2.9161244e+00   2.1946278e+00   3.2137635e+00   2.6502891e+00   2.3652711e+00   3.6096140e+00   2.4893065e+00   3.1578003e+00   2.6568473e+00   3.4426472e+00   2.8187901e+00   2.9128857e+00   3.1418202e+00   3.4847097e+00   3.6205958e+00   2.8694312e+00   2.2223283e+00   2.5588203e+00   2.4651138e+00   2.4413293e+00   3.2621861e+00   2.5834128e+00   2.9995857e+00   3.3733791e+00   3.3817876e+00   2.3263008e+00   2.6305758e+00   2.5756071e+00   2.8533918e+00   2.5683063e+00   2.4187322e+00   2.5258216e+00   2.3250308e+00   2.4413618e+00   2.7691536e+00   2.1006933e+00   2.4608850e+00   4.4119896e+00   3.4290419e+00   4.4942656e+00   3.6650933e+00   4.1590662e+00   5.0899438e+00   3.0333619e+00   4.5799469e+00   4.1882413e+00   5.0726081e+00   3.7613721e+00   3.7859992e+00   4.1623715e+00   3.6029758e+00   3.8608065e+00   4.0352348e+00   3.7266849e+00   5.5043247e+00   5.5172732e+00   3.6569442e+00   4.4568115e+00   3.3324016e+00   5.1765224e+00   3.5192065e+00   4.1799642e+00   4.3857400e+00   3.3769078e+00   3.2906843e+00   4.0034548e+00   4.1917183e+00   4.6854597e+00   5.4444866e+00   4.0904298e+00   3.2962678e+00   3.4250783e+00   5.1569386e+00   4.2213314e+00   3.6582637e+00   3.2059261e+00   4.1937040e+00   4.3826532e+00   4.2786320e+00   3.4290419e+00   4.4549850e+00   4.5270304e+00   4.1816268e+00   3.7777251e+00   3.7924144e+00   4.0173731e+00   3.2613828e+00   1.2563834e+00   1.3681903e+00   1.6242170e+00   4.6126066e-01   1.4691503e+00   2.0743925e+00   5.0370871e-01   2.0365895e+00   5.2374483e-01   1.9494772e+00   1.0034646e+00   4.0320101e+00   3.4981749e+00   4.0289839e+00   2.9648238e+00   3.6116412e+00   2.8362334e+00   3.5807825e+00   2.1594400e+00   3.5619276e+00   2.4608850e+00   2.9150653e+00   2.9806848e+00   3.2524084e+00   3.2332049e+00   2.4351674e+00   3.6506644e+00   2.8794131e+00   2.6371069e+00   3.7842148e+00   2.6442387e+00   3.4386758e+00   2.9743384e+00   3.6958304e+00   3.1396988e+00   3.2947222e+00   3.5521670e+00   3.8756118e+00   3.9969338e+00   3.1587328e+00   2.4432066e+00   2.6604221e+00   2.5745994e+00   2.6880360e+00   3.4951118e+00   2.7657429e+00   3.3524671e+00   3.7924883e+00   3.6104716e+00   2.5876530e+00   2.7410968e+00   2.7238850e+00   3.1914275e+00   2.7871336e+00   2.3484202e+00   2.7125180e+00   2.6235600e+00   2.7012637e+00   3.1219910e+00   2.0888843e+00   2.6969064e+00   4.6820911e+00   3.5968849e+00   4.8607426e+00   3.9563487e+00   4.4501699e+00   5.4913616e+00   2.9743611e+00   4.9743359e+00   4.4659463e+00   5.4618868e+00   4.1043393e+00   4.0513907e+00   4.5016468e+00   3.7087600e+00   4.0024694e+00   4.3310092e+00   4.0611789e+00   5.9599083e+00   5.8632763e+00   3.7995759e+00   4.8081465e+00   3.4697005e+00   5.5699347e+00   3.7817852e+00   4.5398887e+00   4.8101536e+00   3.6425657e+00   3.5739550e+00   4.2642554e+00   4.6155808e+00   5.0696209e+00   5.9318766e+00   4.3420618e+00   3.6079861e+00   3.6711700e+00   5.5546786e+00   4.5127918e+00   3.9935485e+00   3.4733020e+00   4.5569739e+00   4.6922818e+00   4.6236700e+00   3.5968849e+00   4.7939394e+00   4.8471780e+00   4.4913725e+00   3.9942507e+00   4.1085491e+00   4.3067090e+00   3.5093006e+00   3.1271814e-01   2.6440626e+00   9.6964683e-01   5.8796666e-01   9.8545402e-01   1.0013399e+00   9.2426065e-01   7.6195008e-01   7.3283576e-01   2.6643250e-01   3.3524935e+00   2.9103383e+00   3.4378505e+00   3.2794093e+00   3.2805279e+00   2.7218307e+00   2.9677934e+00   2.7417113e+00   3.1265865e+00   2.6350666e+00   3.5810092e+00   2.6509959e+00   3.4564670e+00   2.9240118e+00   2.2778214e+00   3.0636652e+00   2.6473174e+00   2.5673371e+00   3.9008585e+00   2.8131786e+00   3.0066012e+00   2.7310040e+00   3.6088006e+00   2.8947302e+00   2.8966017e+00   3.0506196e+00   3.4785143e+00   3.5188926e+00   2.8816131e+00   2.5125550e+00   2.9397900e+00   2.8645995e+00   2.6245231e+00   3.3639057e+00   2.6028733e+00   2.7271822e+00   3.2253861e+00   3.6489825e+00   2.3376510e+00   2.9371604e+00   2.8382974e+00   2.8051321e+00   2.8006021e+00   2.9309089e+00   2.7184808e+00   2.3312464e+00   2.5047936e+00   2.7731354e+00   2.5341497e+00   2.5862794e+00   4.2119757e+00   3.5278864e+00   4.3705395e+00   3.6366115e+00   4.0640736e+00   4.9516709e+00   3.3348040e+00   4.4927271e+00   4.2867968e+00   4.7459453e+00   3.5773144e+00   3.8303307e+00   4.0501276e+00   3.7856794e+00   3.8862115e+00   3.8584574e+00   3.6392860e+00   5.1247727e+00   5.4955777e+00   3.9594564e+00   4.2633399e+00   3.3993739e+00   5.1011948e+00   3.5798230e+00   3.9561606e+00   4.1885925e+00   3.4019138e+00   3.2277183e+00   3.9971830e+00   4.0727212e+00   4.6247900e+00   5.0557045e+00   4.0800856e+00   3.3285999e+00   3.5685643e+00   5.0078455e+00   3.9761694e+00   3.5324648e+00   3.1505332e+00   4.0358238e+00   4.2334406e+00   4.1156691e+00   3.5278864e+00   4.2682695e+00   4.3053166e+00   4.0686429e+00   3.9122205e+00   3.6972894e+00   3.7712394e+00   3.2160302e+00   2.8326674e+00   1.0103954e+00   4.2829723e-01   7.9126749e-01   1.1795364e+00   7.3442235e-01   8.5582452e-01   6.1158310e-01   4.8284931e-01   3.4789406e+00   3.0164286e+00   3.5708825e+00   3.4760111e+00   3.4435701e+00   2.8856827e+00   3.0483404e+00   2.9286177e+00   3.2959553e+00   2.7769569e+00   3.7899650e+00   2.7721706e+00   3.6919547e+00   3.0773843e+00   2.4199353e+00   3.1984671e+00   2.7597977e+00   2.7743820e+00   4.1049898e+00   3.0189963e+00   3.0754044e+00   2.9033794e+00   3.7972498e+00   3.0781443e+00   3.0628742e+00   3.1980682e+00   3.6529321e+00   3.6479042e+00   3.0224061e+00   2.7237896e+00   3.1475538e+00   3.0809334e+00   2.8106441e+00   3.5217353e+00   2.7064382e+00   2.7753422e+00   3.3543209e+00   3.8636687e+00   2.4678110e+00   3.1212622e+00   3.0250044e+00   2.9444840e+00   2.9956969e+00   3.1281937e+00   2.8892226e+00   2.4772050e+00   2.6547819e+00   2.9364676e+00   2.7130802e+00   2.7488632e+00   4.2524457e+00   3.6566905e+00   4.4856620e+00   3.7659004e+00   4.1610154e+00   5.0768465e+00   3.4623926e+00   4.6393183e+00   4.4611186e+00   4.7773180e+00   3.6552032e+00   3.9746118e+00   4.1574253e+00   3.9234139e+00   3.9686223e+00   3.9172103e+00   3.7603950e+00   5.1648090e+00   5.6463490e+00   4.1614237e+00   4.3393711e+00   3.5009132e+00   5.2503936e+00   3.7276020e+00   4.0260707e+00   4.3007127e+00   3.5361708e+00   3.3347521e+00   4.1191095e+00   4.2183675e+00   4.7752353e+00   5.1049558e+00   4.1955154e+00   3.4902431e+00   3.7536489e+00   5.1215318e+00   4.0036288e+00   3.6385337e+00   3.2536517e+00   4.1326097e+00   4.3100988e+00   4.1978681e+00   3.6566905e+00   4.3438151e+00   4.3538983e+00   4.1591001e+00   4.0714399e+00   3.8024850e+00   3.7974783e+00   3.3185266e+00   2.0833080e+00   2.8648636e+00   3.5532593e+00   1.6555341e+00   3.5410343e+00   2.0840787e+00   3.3747131e+00   2.3883072e+00   4.3833871e+00   3.9159762e+00   4.2941647e+00   2.3488350e+00   3.6240540e+00   2.9044888e+00   4.0815608e+00   1.5532921e+00   3.6825697e+00   2.4113529e+00   1.7998094e+00   3.2616916e+00   2.5529439e+00   3.3821744e+00   2.6637769e+00   3.9531209e+00   3.1831859e+00   2.5836708e+00   3.1669559e+00   2.2907828e+00   3.8684560e+00   3.0202406e+00   3.4019580e+00   3.1886068e+00   3.4332960e+00   3.7685816e+00   3.8803374e+00   4.1746389e+00   3.3102735e+00   2.2304221e+00   2.1489616e+00   2.0501444e+00   2.6225712e+00   3.4164974e+00   3.0901976e+00   3.9885258e+00   4.0802502e+00   3.0869095e+00   2.9336463e+00   2.3936974e+00   2.5327316e+00   3.4518638e+00   2.5837552e+00   1.5782205e+00   2.6521862e+00   2.9662386e+00   2.9040188e+00   3.2768109e+00   1.6628177e+00   2.7685987e+00   5.0448046e+00   3.5141919e+00   4.9824611e+00   4.0549341e+00   4.5981277e+00   5.5863508e+00   2.6647036e+00   5.0241554e+00   4.1998979e+00   5.9440534e+00   4.4432394e+00   3.9560997e+00   4.6422438e+00   3.4164839e+00   4.0005863e+00   4.6454886e+00   4.2390210e+00   6.5166388e+00   5.6880370e+00   3.1944389e+00   5.0789131e+00   3.4956324e+00   5.5310286e+00   3.6881384e+00   4.9152167e+00   5.0890922e+00   3.6527501e+00   3.7902440e+00   4.2540354e+00   4.7585941e+00   5.0389487e+00   6.4918086e+00   4.3280601e+00   3.6284588e+00   3.4969965e+00   5.6399353e+00   4.9671290e+00   4.2659568e+00   3.6994310e+00   4.7714894e+00   4.8963175e+00   4.8281202e+00   3.5141919e+00   5.0683437e+00   5.1871515e+00   4.6280145e+00   3.7055141e+00   4.2764028e+00   4.7873094e+00   3.7371542e+00   1.1433971e+00   1.6774310e+00   6.8299624e-01   1.6304499e+00   2.4808718e-01   1.5886765e+00   7.6250797e-01   4.0055392e+00   3.4676312e+00   4.0289839e+00   3.2391776e+00   3.6989507e+00   2.9466089e+00   3.5208636e+00   2.4804256e+00   3.6211670e+00   2.6281173e+00   3.2921089e+00   3.0161637e+00   3.5345457e+00   3.2983536e+00   2.5210242e+00   3.6506644e+00   2.9161244e+00   2.7938108e+00   4.0292846e+00   2.8755116e+00   3.4075988e+00   3.0797683e+00   3.8646774e+00   3.2397520e+00   3.3586779e+00   3.5819899e+00   3.9571013e+00   4.0234614e+00   3.2253861e+00   2.6519927e+00   2.9269738e+00   2.8491914e+00   2.8419330e+00   3.6148101e+00   2.8039428e+00   3.2558795e+00   3.7924883e+00   3.8389577e+00   2.6284424e+00   2.9648238e+00   2.9126202e+00   3.2245885e+00   2.9718548e+00   2.6864788e+00   2.8651003e+00   2.6637996e+00   2.7789114e+00   3.1894122e+00   2.3748697e+00   2.8127546e+00   4.6364269e+00   3.7133040e+00   4.8825792e+00   4.0097653e+00   4.4740109e+00   5.5106999e+00   3.1817279e+00   5.0169254e+00   4.6066522e+00   5.3636182e+00   4.0783379e+00   4.1550948e+00   4.5252166e+00   3.8770438e+00   4.0814269e+00   4.3063766e+00   4.0872895e+00   5.8336247e+00   5.9533030e+00   4.0437148e+00   4.7859703e+00   3.5604924e+00   5.6269403e+00   3.8926783e+00   4.4927794e+00   4.7879866e+00   3.7291513e+00   3.6035976e+00   4.3384511e+00   4.6385717e+00   5.1321867e+00   5.8049832e+00   4.4149501e+00   3.6953819e+00   3.8133051e+00   5.5737973e+00   4.4415093e+00   3.9935485e+00   3.5037963e+00   4.5569739e+00   4.6922818e+00   4.6236700e+00   3.7133040e+00   4.7716971e+00   4.8030835e+00   4.5149959e+00   4.1509766e+00   4.1343605e+00   4.2319568e+00   3.5394847e+00   7.6869104e-01   1.2471855e+00   8.7636491e-01   9.9981032e-01   7.8863556e-01   7.0733904e-01   3.2400577e+00   2.7256768e+00   3.3173156e+00   3.2734582e+00   3.1889456e+00   2.6198618e+00   2.7351941e+00   2.7665224e+00   3.0627699e+00   2.5021229e+00   3.6608924e+00   2.4643905e+00   3.5457670e+00   2.8045035e+00   2.1368327e+00   2.9466857e+00   2.4386380e+00   2.5729082e+00   3.8963334e+00   2.8235662e+00   2.7242811e+00   2.6575342e+00   3.5598437e+00   2.8418228e+00   2.8206835e+00   2.9462527e+00   3.4233881e+00   3.3667899e+00   2.7322904e+00   2.5411273e+00   2.9638750e+00   2.9140871e+00   2.5797070e+00   3.2425969e+00   2.3780833e+00   2.4351544e+00   3.0892387e+00   3.6720185e+00   2.1688001e+00   2.8939857e+00   2.7945402e+00   2.6616170e+00   2.7767058e+00   2.9769851e+00   2.6347557e+00   2.1986118e+00   2.3753308e+00   2.6828901e+00   2.5283291e+00   2.4839186e+00   3.8851614e+00   3.3427747e+00   4.1909067e+00   3.4628626e+00   3.8305140e+00   4.8043725e+00   3.1800308e+00   4.3815267e+00   4.2038608e+00   4.4513681e+00   3.3256952e+00   3.6826282e+00   3.8475722e+00   3.6210755e+00   3.6107649e+00   3.5632387e+00   3.4596612e+00   4.8847297e+00   5.3781989e+00   3.9435460e+00   4.0131264e+00   3.1614358e+00   4.9957986e+00   3.4408340e+00   3.7000441e+00   4.0284550e+00   3.2354442e+00   3.0107962e+00   3.8036057e+00   3.9713385e+00   4.5180638e+00   4.8486868e+00   3.8729425e+00   3.2243808e+00   3.5087561e+00   4.8402519e+00   3.6359784e+00   3.3268022e+00   2.9240118e+00   3.8232660e+00   3.9709252e+00   3.8746323e+00   3.3427747e+00   4.0131316e+00   4.0031779e+00   3.8300809e+00   3.7945557e+00   3.4841580e+00   3.4283673e+00   2.9863682e+00   1.9060194e+00   3.1239235e-01   1.5583422e+00   4.8124784e-01   1.2220171e+00   3.3785962e+00   2.9374280e+00   3.5071305e+00   3.8740792e+00   3.5491790e+00   3.0669573e+00   2.9018296e+00   3.4251046e+00   3.3648459e+00   3.0744865e+00   4.3230411e+00   2.8485664e+00   4.1027662e+00   3.1626116e+00   2.6442554e+00   3.1724373e+00   2.8315630e+00   3.0534300e+00   4.4306138e+00   3.3882074e+00   2.9857887e+00   3.0959220e+00   4.0072094e+00   3.2240677e+00   3.1644964e+00   3.2264712e+00   3.7352584e+00   3.6230125e+00   3.1206853e+00   3.1023948e+00   3.5580276e+00   3.5096299e+00   3.0877778e+00   3.6577352e+00   2.7900553e+00   2.5838366e+00   3.3069107e+00   4.1792641e+00   2.5911812e+00   3.4684046e+00   3.3165070e+00   2.9868392e+00   3.2999163e+00   3.6373219e+00   3.1449351e+00   2.5937039e+00   2.8148578e+00   3.0518873e+00   3.1967428e+00   2.9647081e+00   4.0498613e+00   3.7819451e+00   4.3976398e+00   3.7644678e+00   4.0879497e+00   4.9574979e+00   3.7577430e+00   4.5772252e+00   4.5796941e+00   4.4589650e+00   3.5295907e+00   4.0592075e+00   4.0919364e+00   4.1226882e+00   4.0237849e+00   3.7803562e+00   3.7136035e+00   4.7772875e+00   5.6344258e+00   4.4679358e+00   4.1805116e+00   3.6013971e+00   5.1936459e+00   3.8460802e+00   3.8293150e+00   4.1365715e+00   3.6263469e+00   3.3344860e+00   4.1404384e+00   4.1465376e+00   4.7500857e+00   4.7258629e+00   4.2123837e+00   3.5757376e+00   3.9028467e+00   5.0127222e+00   3.7704782e+00   3.5495399e+00   3.2637691e+00   4.0284560e+00   4.1958516e+00   4.1011034e+00   3.7819451e+00   4.1793948e+00   4.1561376e+00   4.1029254e+00   4.2472742e+00   3.7624633e+00   3.5705606e+00   3.3154318e+00   1.8882412e+00   5.3690447e-01   1.7295385e+00   7.4445830e-01   3.5842571e+00   3.0831073e+00   3.5905412e+00   2.6850208e+00   3.1920496e+00   2.4895611e+00   3.1874455e+00   1.9825106e+00   3.1280291e+00   2.1902526e+00   2.7631963e+00   2.5991209e+00   2.9183874e+00   2.8448970e+00   2.0635463e+00   3.2072460e+00   2.5480786e+00   2.2627580e+00   3.4383056e+00   2.3172372e+00   3.0909340e+00   2.5623863e+00   3.3194064e+00   2.7506751e+00   2.8644451e+00   3.1134606e+00   3.4405052e+00   3.5767292e+00   2.7771563e+00   2.0712834e+00   2.3618912e+00   2.2737657e+00   2.3098587e+00   3.1429166e+00   2.4666493e+00   2.9899331e+00   3.3598261e+00   3.2396917e+00   2.2342806e+00   2.4357274e+00   2.4181291e+00   2.7984743e+00   2.4231383e+00   2.1599940e+00   2.3764241e+00   2.2561857e+00   2.3387588e+00   2.7074009e+00   1.8390751e+00   2.3351007e+00   4.3436399e+00   3.2756710e+00   4.4477490e+00   3.5866422e+00   4.0782068e+00   5.0677790e+00   2.7922251e+00   4.5545199e+00   4.0836814e+00   5.0715858e+00   3.7130862e+00   3.6733277e+00   4.0983149e+00   3.4111720e+00   3.6933050e+00   3.9623038e+00   3.6711803e+00   5.5579136e+00   5.4498365e+00   3.4842014e+00   4.4103781e+00   3.1690867e+00   5.1441957e+00   3.3997317e+00   4.1528029e+00   4.3901202e+00   3.2630747e+00   3.2035560e+00   3.8955732e+00   4.1857725e+00   4.6435471e+00   5.5146776e+00   3.9762768e+00   3.2193184e+00   3.3255820e+00   5.1213824e+00   4.1678001e+00   3.6124079e+00   3.1107135e+00   4.1457358e+00   4.3076787e+00   4.2130787e+00   3.2756710e+00   4.4066811e+00   4.4713485e+00   4.0952473e+00   3.6289876e+00   3.7168749e+00   3.9644506e+00   3.1662754e+00   1.5140329e+00   3.3872939e-01   1.1649855e+00   3.5691650e+00   3.1595321e+00   3.7055656e+00   4.0160835e+00   3.7376603e+00   3.2592987e+00   3.1435650e+00   3.5370651e+00   3.5437638e+00   3.2591886e+00   4.4166410e+00   3.0676819e+00   4.2127293e+00   3.3654329e+00   2.8346837e+00   3.3660906e+00   3.0613575e+00   3.2026716e+00   4.5808841e+00   3.5275705e+00   3.2454510e+00   3.2718756e+00   4.1819826e+00   3.4031279e+00   3.3454884e+00   3.4170637e+00   3.9109404e+00   3.8358967e+00   3.3305911e+00   3.2315455e+00   3.6883726e+00   3.6296117e+00   3.2506700e+00   3.8623185e+00   3.0230066e+00   2.8458833e+00   3.5111771e+00   4.3201594e+00   2.8024863e+00   3.6263297e+00   3.4825375e+00   3.1978058e+00   3.4556048e+00   3.7429398e+00   3.3240937e+00   2.7959976e+00   3.0137031e+00   3.2391776e+00   3.3180586e+00   3.1510639e+00   4.3279818e+00   4.0059487e+00   4.6233424e+00   3.9929211e+00   4.3355275e+00   5.1718231e+00   3.9512216e+00   4.7810147e+00   4.7732950e+00   4.7150495e+00   3.7777251e+00   4.2731987e+00   4.3246862e+00   4.3347988e+00   4.2753666e+00   4.0433740e+00   3.9425600e+00   5.0081332e+00   5.8406251e+00   4.6274156e+00   4.4284929e+00   3.8398842e+00   5.3940263e+00   4.0533472e+00   4.0818092e+00   4.3543675e+00   3.8429689e+00   3.5715666e+00   4.3728103e+00   4.3436347e+00   4.9498040e+00   4.9393850e+00   4.4487185e+00   3.7756717e+00   4.0901950e+00   5.2287042e+00   4.0497882e+00   3.7884247e+00   3.5028854e+00   4.2624115e+00   4.4485334e+00   4.3403092e+00   4.0059487e+00   4.4317896e+00   4.4210531e+00   4.3442496e+00   4.4457375e+00   3.9985746e+00   3.8504489e+00   3.5592028e+00   1.4309353e+00   5.3528567e-01   3.7908776e+00   3.2731841e+00   3.8215973e+00   3.1206853e+00   3.5080970e+00   2.7892862e+00   3.3363505e+00   2.4070515e+00   3.4174587e+00   2.5169099e+00   3.2261716e+00   2.8456035e+00   3.3834513e+00   3.1193847e+00   2.3599428e+00   3.4420978e+00   2.7676217e+00   2.6211360e+00   3.8782821e+00   2.7318604e+00   3.2516765e+00   2.8950591e+00   3.6956240e+00   3.0573546e+00   3.1595622e+00   3.3778208e+00   3.7543715e+00   3.8301935e+00   3.0538048e+00   2.4889600e+00   2.7975756e+00   2.7172725e+00   2.6747723e+00   3.4570094e+00   2.6710885e+00   3.0859941e+00   3.5894820e+00   3.6730945e+00   2.4678645e+00   2.8348872e+00   2.7756196e+00   3.0423378e+00   2.8112845e+00   2.6077230e+00   2.7173555e+00   2.4925318e+00   2.6151930e+00   2.9985224e+00   2.2768387e+00   2.6523384e+00   4.4886181e+00   3.5762214e+00   4.6936725e+00   3.8412437e+00   4.3086181e+00   5.3124523e+00   3.1125049e+00   4.8185220e+00   4.4330566e+00   5.1853832e+00   3.9019516e+00   3.9878172e+00   4.3438773e+00   3.7545919e+00   3.9571174e+00   4.1452084e+00   3.9080206e+00   5.6409887e+00   5.7635531e+00   3.9041153e+00   4.6071696e+00   3.4361835e+00   5.4269728e+00   3.7248960e+00   4.3153491e+00   4.5881410e+00   3.5627565e+00   3.4386758e+00   4.1762134e+00   4.4334431e+00   4.9338087e+00   5.6026788e+00   4.2556298e+00   3.5163766e+00   3.6516985e+00   5.3754384e+00   4.2899814e+00   3.8175194e+00   3.3436392e+00   4.3710164e+00   4.5233951e+00   4.4426760e+00   3.5762214e+00   4.5972906e+00   4.6375405e+00   4.3421746e+00   3.9932553e+00   3.9596590e+00   4.0813696e+00   3.3867904e+00   9.9272943e-01   3.3624661e+00   2.9811147e+00   3.5018936e+00   3.8169093e+00   3.5209477e+00   3.0838698e+00   2.9939885e+00   3.3707744e+00   3.3216375e+00   3.1074562e+00   4.2293025e+00   2.8939100e+00   3.9735251e+00   3.1779321e+00   2.6513305e+00   3.1539115e+00   2.9206559e+00   2.9923096e+00   4.3522137e+00   3.3213891e+00   3.1222272e+00   3.0540027e+00   3.9664528e+00   3.2012517e+00   3.1248526e+00   3.2007609e+00   3.6824267e+00   3.6418210e+00   3.1482435e+00   3.0088381e+00   3.4838907e+00   3.4206811e+00   3.0415159e+00   3.6826470e+00   2.9006138e+00   2.7293873e+00   3.3112277e+00   4.0819926e+00   2.6432089e+00   3.4355346e+00   3.3034492e+00   3.0164601e+00   3.2442582e+00   3.5631690e+00   3.1415769e+00   2.6264645e+00   2.8384396e+00   3.0300747e+00   3.1354811e+00   2.9649167e+00   4.2304738e+00   3.8482047e+00   4.4439318e+00   3.8285351e+00   4.1849277e+00   4.9874125e+00   3.8271288e+00   4.5862820e+00   4.5664639e+00   4.6040986e+00   3.6270951e+00   4.0846199e+00   4.1503558e+00   4.1702140e+00   4.1407964e+00   3.9121183e+00   3.7737683e+00   4.8997002e+00   5.6369181e+00   4.4180349e+00   4.2780098e+00   3.7035075e+00   5.1920494e+00   3.8582580e+00   3.9463952e+00   4.1826549e+00   3.6583100e+00   3.4129797e+00   4.2036908e+00   4.1443501e+00   4.7432980e+00   4.8153136e+00   4.2825977e+00   3.5821023e+00   3.9040345e+00   5.0374022e+00   3.9556226e+00   3.6351652e+00   3.3487998e+00   4.0905154e+00   4.2992014e+00   4.1693135e+00   3.8482047e+00   4.2897273e+00   4.2963449e+00   4.1754173e+00   4.2443816e+00   3.8297356e+00   3.7573406e+00   3.4190329e+00   3.4434283e+00   2.9833205e+00   3.5091456e+00   3.1516030e+00   3.2866494e+00   2.6849207e+00   3.0541761e+00   2.5654361e+00   3.1545670e+00   2.5403244e+00   3.3918434e+00   2.6608343e+00   3.3413616e+00   2.9302185e+00   2.2379234e+00   3.1290373e+00   2.6442995e+00   2.5077372e+00   3.8111267e+00   2.7069456e+00   3.0566678e+00   2.7098649e+00   3.5644689e+00   2.8826061e+00   2.9134932e+00   3.0944404e+00   3.4986589e+00   3.5664548e+00   2.8806273e+00   2.4158569e+00   2.8131786e+00   2.7333339e+00   2.5637470e+00   3.3370594e+00   2.5885603e+00   2.8220110e+00   3.2904739e+00   3.5710204e+00   2.3287218e+00   2.8315630e+00   2.7529707e+00   2.8293212e+00   2.7254528e+00   2.7527251e+00   2.6524994e+00   2.3299431e+00   2.4822440e+00   2.7803033e+00   2.3731496e+00   2.5423572e+00   4.2830420e+00   3.4939592e+00   4.4286678e+00   3.6575173e+00   4.1044791e+00   5.0220848e+00   3.2200733e+00   4.5468375e+00   4.2700249e+00   4.8698851e+00   3.6462342e+00   3.8237490e+00   4.0990020e+00   3.7208580e+00   3.8692104e+00   3.9203597e+00   3.6817365e+00   5.2775206e+00   5.5250867e+00   3.8676958e+00   4.3392543e+00   3.3693781e+00   5.1524083e+00   3.5650934e+00   4.0437994e+00   4.2783342e+00   3.3968462e+00   3.2517273e+00   4.0065881e+00   4.1377875e+00   4.6677357e+00   5.2142247e+00   4.0893000e+00   3.3307003e+00   3.5369003e+00   5.0771896e+00   4.0613196e+00   3.5869628e+00   3.1695162e+00   4.1006440e+00   4.2899814e+00   4.1769447e+00   3.4939592e+00   4.3422191e+00   4.3859843e+00   4.1114107e+00   3.8721945e+00   3.7365034e+00   3.8554667e+00   3.2330990e+00   7.4500632e-01   3.1271814e-01   2.7864553e+00   1.1117653e+00   1.8291315e+00   9.1459005e-01   3.2771828e+00   8.5582452e-01   2.5020950e+00   3.7722922e+00   1.4404415e+00   2.6850561e+00   1.2884095e+00   1.9346765e+00   4.6190224e-01   1.7610224e+00   1.9545276e+00   2.5064746e+00   2.4134734e+00   1.4291842e+00   1.4855627e+00   1.8305602e+00   1.4494865e+00   1.0355160e+00   6.8921053e-01   9.5529726e-01   7.2626021e-01   1.4025367e+00   2.2620298e+00   2.6646285e+00   2.6984190e+00   1.9245986e+00   1.7053476e+00   1.9940477e+00   1.3238834e+00   4.4901474e-01   2.2514668e+00   1.7899689e+00   2.4621620e+00   2.3008240e+00   1.1820572e+00   2.0593667e+00   3.3235867e+00   2.0701817e+00   1.6811909e+00   1.7438018e+00   1.2168151e+00   2.9923086e+00   1.8570167e+00   1.8407084e+00   1.9774894e+00   1.2374249e+00   1.3146181e+00   1.4369760e+00   1.6548985e+00   3.0339990e+00   1.3065206e+00   1.8441719e+00   1.9017153e+00   1.0169098e+00   1.5490835e+00   1.1480416e+00   2.3912363e+00   2.1724397e+00   1.4252775e+00   1.0284221e+00   2.2390158e+00   2.3611228e+00   2.6121814e+00   1.3139868e+00   2.0833701e+00   1.8624251e+00   1.5270661e+00   1.1605968e+00   9.3589904e-01   1.4360842e+00   1.2967707e+00   1.5740302e+00   8.5349066e-01   1.4639724e+00   2.1546616e+00   1.6538197e+00   1.2783641e+00   1.8320269e+00   1.7168897e+00   1.7042715e+00   1.0288355e+00   1.3960908e+00   1.0327124e+00   1.4702446e+00   1.2287925e+00   1.9774894e+00   1.3826233e+00   1.6072393e+00   1.3472497e+00   1.9439880e+00   1.1295026e+00   1.6414265e+00   1.5177322e+00   6.8496652e-01   2.3745921e+00   9.3211669e-01   1.2784093e+00   3.1271814e-01   2.7526949e+00   7.8034610e-01   1.8874930e+00   3.3568278e+00   7.7863029e-01   2.4620981e+00   7.9999102e-01   1.3194463e+00   4.5257749e-01   1.0705713e+00   1.5282070e+00   2.3189157e+00   1.9824340e+00   7.4029244e-01   1.0636179e+00   1.6347187e+00   1.0722301e+00   7.4849274e-01   5.3988754e-01   1.0632334e+00   7.0213871e-01   8.4383266e-01   1.8384560e+00   2.2399960e+00   2.2847962e+00   1.4577178e+00   1.3022697e+00   1.2927254e+00   6.8064066e-01   4.4417668e-01   2.0964002e+00   1.1252542e+00   1.9840858e+00   1.8038514e+00   6.0365341e-01   1.6354514e+00   2.8387736e+00   1.5364600e+00   1.0539473e+00   1.1361809e+00   7.8649633e-01   2.4634199e+00   1.2983546e+00   1.5835083e+00   1.4983760e+00   1.4748100e+00   1.0180846e+00   1.2694582e+00   2.0850659e+00   2.4405647e+00   1.6897529e+00   1.8533655e+00   2.0793529e+00   7.4797652e-01   1.3453828e+00   1.1770444e+00   1.9571621e+00   1.6977813e+00   1.1421260e+00   8.3850424e-01   2.6029823e+00   2.7071356e+00   2.3733266e+00   1.3878105e+00   1.5050081e+00   2.3020930e+00   1.2450968e+00   1.1247714e+00   1.3455945e+00   1.0453799e+00   7.4157869e-01   1.3630233e+00   1.3061954e+00   1.8456576e+00   2.6048102e+00   1.4425815e+00   9.9058911e-01   1.5658693e+00   2.1444356e+00   1.4166079e+00   7.2727886e-01   7.9343577e-01   1.1384575e+00   1.4013840e+00   1.2776135e+00   1.4983760e+00   1.4006413e+00   1.5375255e+00   1.2650236e+00   1.7250893e+00   9.0221296e-01   1.2767751e+00   9.2060977e-01   2.5673851e+00   8.6079202e-01   1.6428179e+00   8.7623959e-01   3.1131006e+00   6.6453319e-01   2.3246810e+00   3.5720588e+00   1.2918836e+00   2.4857868e+00   1.0845006e+00   1.8135469e+00   3.9472619e-01   1.6028858e+00   1.8029164e+00   2.2526468e+00   2.2305704e+00   1.2920175e+00   1.3194463e+00   1.5620078e+00   1.2567627e+00   8.7273869e-01   5.3095950e-01   7.1671402e-01   4.2827238e-01   1.2022652e+00   2.1186438e+00   2.4755072e+00   2.5212188e+00   1.7582453e+00   1.4360884e+00   1.8400908e+00   1.3147484e+00   2.6680274e-01   2.0194508e+00   1.6709595e+00   2.2587909e+00   2.1030957e+00   1.0161846e+00   1.8732616e+00   3.1496799e+00   1.8819614e+00   1.5700887e+00   1.5933926e+00   1.0543640e+00   2.8415314e+00   1.6890927e+00   1.6862498e+00   1.7038925e+00   1.0251132e+00   1.0245496e+00   1.1781513e+00   1.5212572e+00   2.8050734e+00   1.1091494e+00   1.5452835e+00   1.9080234e+00   8.5359653e-01   1.2416734e+00   8.9528108e-01   2.1088803e+00   1.9097018e+00   1.2522193e+00   7.4612152e-01   2.3284654e+00   2.1556564e+00   2.3436971e+00   1.1651790e+00   1.8364691e+00   1.6976628e+00   1.2371704e+00   1.0463225e+00   8.5302032e-01   1.1623508e+00   1.0682140e+00   1.2723284e+00   6.7955751e-01   1.2572095e+00   2.2840066e+00   1.3572135e+00   1.0082548e+00   1.5613089e+00   1.5962380e+00   1.5974627e+00   7.9671887e-01   1.1799226e+00   8.3571552e-01   1.2674750e+00   1.0543826e+00   1.7038925e+00   1.2197800e+00   1.4811026e+00   1.1132425e+00   1.6485749e+00   8.6295295e-01   1.5402909e+00   1.2957413e+00   1.7240804e+00   1.2117746e+00   2.5620931e+00   9.4346743e-01   1.9481085e+00   1.0013399e+00   1.0383354e+00   1.7091506e+00   7.5651431e-01   1.6169211e+00   1.4074199e+00   2.3606801e+00   1.6642999e+00   1.0677270e+00   9.5748562e-01   5.4702555e-01   2.2752108e+00   1.3619011e+00   1.2144903e+00   1.4245490e+00   1.7677805e+00   2.1070188e+00   2.0042865e+00   2.3026776e+00   1.5583422e+00   8.7856768e-01   3.6704030e-01   4.8644514e-01   1.0013399e+00   1.3262124e+00   1.6642999e+00   2.6524441e+00   2.3938089e+00   9.9234874e-01   1.6199145e+00   4.6126066e-01   7.3978204e-01   1.8066960e+00   7.9191984e-01   8.2250769e-01   9.3727156e-01   1.6415483e+00   1.4092680e+00   1.6304499e+00   9.1432842e-01   1.1795364e+00   3.1638147e+00   1.4103498e+00   2.9322745e+00   2.0247895e+00   2.5487652e+00   3.5082844e+00   1.0453705e+00   2.9611604e+00   1.9449446e+00   4.1343567e+00   2.6451449e+00   1.7869811e+00   2.6253748e+00   1.1973458e+00   1.9817270e+00   2.7838011e+00   2.2840066e+00   4.7706180e+00   3.4576971e+00   8.9870984e-01   3.1324336e+00   1.5639220e+00   3.4016597e+00   1.5728443e+00   3.0734808e+00   3.1995683e+00   1.6368228e+00   1.9546803e+00   2.1052860e+00   2.8313078e+00   2.9375460e+00   4.8020420e+00   2.1735035e+00   1.6493848e+00   1.3576485e+00   3.5774884e+00   3.2045691e+00   2.3952974e+00   1.8988804e+00   2.8268459e+00   2.8989852e+00   2.8927951e+00   1.4103498e+00   3.1063891e+00   3.2893581e+00   2.6241058e+00   1.4441104e+00   2.3170196e+00   3.0817543e+00   1.9124815e+00   1.0026233e+00   1.1867923e+00   2.3572427e+00   3.6939647e-01   1.6408576e+00   2.7392425e+00   8.8835337e-01   1.6805749e+00   5.5399712e-01   1.2745081e+00   7.5303835e-01   1.1820572e+00   1.1301977e+00   1.4315442e+00   1.4464138e+00   1.2423523e+00   6.4626422e-01   7.5230154e-01   6.2536527e-01   4.0664863e-01   5.0731024e-01   4.0158746e-01   6.2543628e-01   6.4884272e-01   1.4014424e+00   1.6702453e+00   1.7317202e+00   1.0390957e+00   7.1781501e-01   1.4073416e+00   1.5165187e+00   7.3502408e-01   1.2122797e+00   1.2421878e+00   1.4565053e+00   1.3559191e+00   6.8064066e-01   1.0943185e+00   2.3628816e+00   1.1638514e+00   1.1627754e+00   1.0519629e+00   5.3106808e-01   2.1057450e+00   1.0403581e+00   1.9325284e+00   1.0596309e+00   1.3779504e+00   7.6633520e-01   1.2315180e+00   1.9698667e+00   2.0697950e+00   1.4385383e+00   1.0743031e+00   2.5609592e+00   1.1664463e+00   7.0702759e-01   1.1055841e+00   1.3757605e+00   1.4784016e+00   1.4566739e+00   7.9213303e-01   3.1107848e+00   2.2607358e+00   1.5267093e+00   1.6037239e+00   1.2804073e+00   1.9864213e+00   5.4310586e-01   1.5475402e+00   1.5328931e+00   5.4647209e-01   7.9343577e-01   9.7668596e-01   1.1862065e+00   1.4760549e+00   3.1060327e+00   1.0849536e+00   3.7234239e-01   8.8571256e-01   2.0333305e+00   1.9196784e+00   9.5289573e-01   8.6297946e-01   1.2392529e+00   1.4996752e+00   1.3752205e+00   1.0596309e+00   1.6198849e+00   1.8691588e+00   1.2188552e+00   9.2906468e-01   8.7042892e-01   1.8304530e+00   9.8621003e-01   1.4220241e+00   1.5496729e+00   1.1125144e+00   7.4201890e-01   2.1434858e+00   6.0719477e-01   1.5102780e+00   5.6262711e-01   5.7267643e-01   1.3990971e+00   5.4408162e-01   5.2316125e-01   1.5323598e+00   8.2317311e-01   1.1694177e+00   5.6003943e-01   1.0600958e+00   5.1318506e-01   8.8354057e-01   1.1892978e+00   1.3456285e+00   1.4234329e+00   5.0311426e-01   8.2976237e-01   1.0655776e+00   1.1267154e+00   4.4786319e-01   6.7424840e-01   6.4241342e-01   1.4834540e+00   1.4207811e+00   1.3630799e+00   5.2795793e-01   7.8571751e-01   5.3988754e-01   6.8299624e-01   5.6992880e-01   1.6313928e+00   3.1093967e-01   5.0876385e-01   2.8653046e-01   6.5622658e-01   1.3398293e+00   2.2670334e-01   2.2472150e+00   8.9528108e-01   2.1908074e+00   1.1815770e+00   1.7549185e+00   2.8271782e+00   1.2987661e+00   2.2927322e+00   1.7056353e+00   3.1591627e+00   1.6557083e+00   1.2615426e+00   1.8432274e+00   1.1833606e+00   1.4858600e+00   1.8676774e+00   1.3771658e+00   3.7547288e+00   3.1005581e+00   1.4815836e+00   2.2650937e+00   9.5252488e-01   2.8687133e+00   1.0290036e+00   2.0855599e+00   2.2987772e+00   9.0705646e-01   9.6267538e-01   1.4839640e+00   2.0473137e+00   2.3780534e+00   3.7918985e+00   1.5792523e+00   8.4221906e-01   9.2300698e-01   2.9301148e+00   2.2149712e+00   1.3941954e+00   8.9564079e-01   1.9843979e+00   2.0984088e+00   2.1003345e+00   8.9528108e-01   2.2276119e+00   2.3923111e+00   1.8829565e+00   1.3046645e+00   1.4645285e+00   2.0631582e+00   9.0331700e-01   2.9007820e+00   1.0677270e+00   1.9884030e+00   3.5404087e+00   8.9973730e-01   2.7097598e+00   9.8896933e-01   1.4521880e+00   7.3735391e-01   1.1060455e+00   1.7358574e+00   2.5457091e+00   2.1802781e+00   5.9868400e-01   1.3038475e+00   1.8531597e+00   1.2895008e+00   1.0351584e+00   8.4116354e-01   1.3290015e+00   8.7070822e-01   1.0061402e+00   2.0523180e+00   2.4354079e+00   2.4861842e+00   1.6612475e+00   1.4482752e+00   1.3000067e+00   4.4417668e-01   6.8064066e-01   2.3457352e+00   1.2097457e+00   2.1562626e+00   1.9604379e+00   7.8034610e-01   1.8447318e+00   3.0052273e+00   1.6924215e+00   1.1656549e+00   1.2692102e+00   1.0351584e+00   2.6195047e+00   1.4577178e+00   1.3905452e+00   1.5765058e+00   1.5178511e+00   1.0862363e+00   1.2425116e+00   2.1288976e+00   2.5085097e+00   1.7889699e+00   2.0235792e+00   1.9184220e+00   6.6154242e-01   1.4831058e+00   1.2157849e+00   2.0573833e+00   1.6866006e+00   1.0122929e+00   9.0072498e-01   2.4680266e+00   2.8037035e+00   2.5716465e+00   1.3193736e+00   1.5270661e+00   2.3974481e+00   1.4129334e+00   9.9186850e-01   1.3586792e+00   1.1900564e+00   7.8649633e-01   1.4261046e+00   1.4313173e+00   1.9693923e+00   2.5032449e+00   1.4908532e+00   1.1825071e+00   1.7301809e+00   2.1927243e+00   1.1883807e+00   7.0823896e-01   8.2574748e-01   1.1508346e+00   1.3435624e+00   1.2769092e+00   1.5765058e+00   1.3121204e+00   1.3947465e+00   1.2781560e+00   1.8941016e+00   9.4449485e-01   1.0327124e+00   9.1221028e-01   2.4983699e+00   1.0001615e+00   9.3727156e-01   2.0156046e+00   1.4610933e+00   2.0818555e+00   1.4925824e+00   2.8275182e+00   1.8765007e+00   1.3658611e+00   1.8892371e+00   9.4900087e-01   2.5853758e+00   1.8063869e+00   2.0403844e+00   1.9103325e+00   2.2554051e+00   2.6063293e+00   2.6670659e+00   2.8999367e+00   1.9965452e+00   1.0765554e+00   7.8898008e-01   7.5921691e-01   1.3580560e+00   1.9753995e+00   1.7807988e+00   2.8573306e+00   2.8966014e+00   1.8587118e+00   1.7290357e+00   9.4346743e-01   1.0932187e+00   2.1982921e+00   1.2728402e+00   2.6033464e-01   1.2680818e+00   1.7824360e+00   1.6364088e+00   2.0664368e+00   3.9699460e-01   1.4644159e+00   3.6567369e+00   2.0227452e+00   3.6362580e+00   2.6431572e+00   3.1825084e+00   4.2569960e+00   1.1649315e+00   3.7040279e+00   2.8079889e+00   4.6643094e+00   3.1456885e+00   2.5368652e+00   3.2881355e+00   1.9057424e+00   2.5373943e+00   3.2972877e+00   2.8812938e+00   5.2957248e+00   4.3256332e+00   1.8261865e+00   3.7402681e+00   2.0260681e+00   4.2089146e+00   2.2931022e+00   3.6001832e+00   3.8156954e+00   2.2665638e+00   2.4364115e+00   2.8123267e+00   3.5007685e+00   3.7249152e+00   5.3249013e+00   2.8816817e+00   2.2758405e+00   2.0704519e+00   4.3322711e+00   3.6389537e+00   2.9225385e+00   2.3454418e+00   3.4545556e+00   3.5207953e+00   3.5188476e+00   2.0227452e+00   3.7070275e+00   3.8401809e+00   3.2712836e+00   2.2870689e+00   2.9197390e+00   3.4787880e+00   2.3479440e+00   1.8015956e+00   2.9300280e+00   9.4226820e-01   1.8443182e+00   6.2046469e-01   1.3340137e+00   5.0731024e-01   1.2583559e+00   1.1751408e+00   1.7063292e+00   1.5923247e+00   1.2788332e+00   7.3035754e-01   1.0391769e+00   6.6194168e-01   2.9537172e-01   2.8845946e-01   3.7622328e-01   6.2760421e-01   7.7259801e-01   1.4843174e+00   1.8353890e+00   1.8732616e+00   1.1492120e+00   9.8621003e-01   1.4916922e+00   1.4186317e+00   5.4702555e-01   1.4349060e+00   1.2616939e+00   1.6526705e+00   1.5077694e+00   6.5951091e-01   1.2429329e+00   2.5190636e+00   1.3124532e+00   1.1415080e+00   1.1102613e+00   5.1210327e-01   2.2412909e+00   1.1466385e+00   2.0209769e+00   1.3581397e+00   1.4351001e+00   9.3899770e-01   1.3860326e+00   1.9736520e+00   2.3116417e+00   1.4395013e+00   1.3256797e+00   2.5152621e+00   1.1895067e+00   1.0230389e+00   1.2126763e+00   1.7102781e+00   1.7732497e+00   1.5528794e+00   8.7017583e-01   2.9799960e+00   2.3789847e+00   1.8031686e+00   1.6479163e+00   1.5433090e+00   2.0188390e+00   8.9564079e-01   1.5340057e+00   1.4361609e+00   8.5359653e-01   9.3591761e-01   1.2375842e+00   1.0932909e+00   1.5255827e+00   2.9419617e+00   1.3503714e+00   5.7743200e-01   1.0870568e+00   2.0633836e+00   1.9646340e+00   9.8006549e-01   1.0101003e+00   1.2839264e+00   1.6205305e+00   1.4633215e+00   1.3581397e+00   1.6723912e+00   1.9304834e+00   1.3785508e+00   1.2852279e+00   1.0122929e+00   1.8669942e+00   1.1301977e+00   1.7293858e+00   1.1132823e+00   1.5940674e+00   1.2647627e+00   7.0155617e-01   2.0524860e+00   9.1916314e-01   9.0143387e-01   1.7090768e+00   7.7500385e-01   1.6060095e+00   1.1202045e+00   1.5217697e+00   1.2283051e+00   1.5431751e+00   1.8486311e+00   2.0116712e+00   2.0744305e+00   1.1308980e+00   8.6249502e-01   8.7618973e-01   9.4738284e-01   7.7051641e-01   1.2102028e+00   8.1844705e-01   1.9297683e+00   2.0868978e+00   1.6471661e+00   8.6143605e-01   6.0365341e-01   5.7743200e-01   1.3481077e+00   8.0628657e-01   1.1400599e+00   5.2860161e-01   9.6999820e-01   7.8957903e-01   1.3189781e+00   8.0128554e-01   6.6918102e-01   2.6783589e+00   1.1902996e+00   2.8052881e+00   1.7833755e+00   2.2807524e+00   3.4730319e+00   7.8369762e-01   2.9612706e+00   2.2200035e+00   3.7113566e+00   2.2079590e+00   1.7773274e+00   2.4240040e+00   1.2586273e+00   1.6606465e+00   2.3345591e+00   2.0100747e+00   4.3781379e+00   3.6673897e+00   1.6336953e+00   2.8241758e+00   1.1071867e+00   3.5077760e+00   1.5364148e+00   2.6605007e+00   2.9756588e+00   1.4305490e+00   1.5019762e+00   1.9806289e+00   2.7459951e+00   3.0159022e+00   4.4377151e+00   2.0446123e+00   1.5157660e+00   1.4706419e+00   3.5410473e+00   2.6488235e+00   2.0119986e+00   1.3953413e+00   2.5748429e+00   2.6034011e+00   2.6304123e+00   1.1902996e+00   2.7818749e+00   2.8834870e+00   2.3861430e+00   1.6719199e+00   2.0259174e+00   2.4855987e+00   1.3894554e+00   2.6621352e+00   1.3234208e+00   2.6096596e+00   2.2340939e+00   3.3444949e+00   2.5679785e+00   1.9118907e+00   1.7502251e+00   1.3868450e+00   3.2376571e+00   2.3245757e+00   2.2030084e+00   2.3874774e+00   2.7435279e+00   3.0963501e+00   2.9911365e+00   3.3313369e+00   2.5528922e+00   1.6215602e+00   1.1232628e+00   1.1083720e+00   1.9130507e+00   2.3463017e+00   2.5105454e+00   3.5809242e+00   3.3974315e+00   1.8325077e+00   2.4726944e+00   1.3889514e+00   1.6150266e+00   2.7833542e+00   1.7312416e+00   7.0111465e-01   1.8556044e+00   2.5019422e+00   2.3097506e+00   2.6016512e+00   1.2007565e+00   2.0949830e+00   4.1622891e+00   2.3984916e+00   3.9595754e+00   3.0477055e+00   3.5738045e+00   4.5102220e+00   1.5833139e+00   3.9547990e+00   2.8883510e+00   5.1681640e+00   3.6715203e+00   2.8100260e+00   3.6615020e+00   2.1175666e+00   2.9197870e+00   3.8026677e+00   3.3142297e+00   5.7988752e+00   4.3773719e+00   1.6802144e+00   4.1689985e+00   2.5051488e+00   4.3637125e+00   2.6075737e+00   4.1031841e+00   4.2218983e+00   2.6731954e+00   2.9685228e+00   3.1235748e+00   3.8333962e+00   3.9200272e+00   5.8238336e+00   3.1861618e+00   2.6684075e+00   2.3174914e+00   4.5851647e+00   4.2037872e+00   3.4173362e+00   2.9015754e+00   3.8649606e+00   3.9284352e+00   3.9274419e+00   2.3984916e+00   4.1396215e+00   4.3152972e+00   3.6556493e+00   2.4306199e+00   3.3534589e+00   4.0726739e+00   2.9019830e+00   1.9649078e+00   4.5716421e-01   6.0725725e-01   1.0082512e+00   4.0020411e-01   9.6216255e-01   1.8879475e+00   1.3283978e+00   6.9493020e-01   5.9382214e-01   1.3116762e+00   7.1128716e-01   6.9976890e-01   8.6291569e-01   1.2356595e+00   1.0989171e+00   3.1093967e-01   1.2231205e+00   1.5729927e+00   1.6302590e+00   8.2263932e-01   8.7786730e-01   6.2729876e-01   9.5483435e-01   1.0328871e+00   1.7091506e+00   4.5071694e-01   1.2824303e+00   1.1188225e+00   3.5622944e-01   1.0163696e+00   2.1159028e+00   8.2380019e-01   4.6137216e-01   4.2450569e-01   5.0629646e-01   1.7321630e+00   5.8565201e-01   1.8627348e+00   1.0140018e+00   1.9095789e+00   1.0347180e+00   1.4794093e+00   2.5851550e+00   1.6987423e+00   2.1172382e+00   1.7999889e+00   2.6937126e+00   1.1946586e+00   1.2274756e+00   1.5304430e+00   1.4222936e+00   1.3705079e+00   1.4369760e+00   1.1056213e+00   3.3133435e+00   3.0027854e+00   1.9037709e+00   1.8688892e+00   9.6470639e-01   2.7156484e+00   1.0119180e+00   1.6591942e+00   1.9679139e+00   7.8369762e-01   6.0848963e-01   1.3509456e+00   1.8177289e+00   2.2200035e+00   3.3498688e+00   1.4311753e+00   8.4040822e-01   1.2474502e+00   2.6426508e+00   1.7620244e+00   1.0560148e+00   5.3362004e-01   1.6100417e+00   1.7340403e+00   1.6942922e+00   1.0140018e+00   1.8496575e+00   1.9626001e+00   1.5340961e+00   1.4294738e+00   1.1293709e+00   1.5949054e+00   6.4398240e-01   1.7472907e+00   1.7451622e+00   2.3128200e+00   2.0364367e+00   1.1795364e+00   7.5358247e-01   8.5582452e-01   2.5764453e+00   1.4435947e+00   1.1399118e+00   1.4681660e+00   1.7387082e+00   2.0628406e+00   1.8244206e+00   2.2981140e+00   1.7651851e+00   1.0308265e+00   7.7934221e-01   7.7863029e-01   1.2082987e+00   1.5285763e+00   2.1068341e+00   2.8909913e+00   2.3684734e+00   6.2479428e-01   1.9481438e+00   9.9891776e-01   1.1557309e+00   1.9516972e+00   9.8896933e-01   1.2918836e+00   1.3154759e+00   1.9018319e+00   1.7043940e+00   1.6876317e+00   1.4136421e+00   1.4845363e+00   3.4227731e+00   1.7797546e+00   2.8993041e+00   2.1584174e+00   2.6985144e+00   3.3744038e+00   1.7790388e+00   2.8051892e+00   1.8256311e+00   4.2196161e+00   2.7909300e+00   1.8699505e+00   2.6716730e+00   1.6273208e+00   2.3931485e+00   2.9994905e+00   2.3643994e+00   4.7587356e+00   3.2663266e+00   8.6629251e-01   3.2140857e+00   2.0311002e+00   3.1918979e+00   1.6793067e+00   3.1869276e+00   3.1309476e+00   1.8104252e+00   2.1858235e+00   2.2467893e+00   2.6763967e+00   2.7532877e+00   4.7380019e+00   2.3330174e+00   1.6923429e+00   1.4009491e+00   3.4550204e+00   3.4609647e+00   2.5225714e+00   2.1699387e+00   2.8630132e+00   3.0349029e+00   2.9631214e+00   1.7797546e+00   3.2114945e+00   3.4557456e+00   2.7355167e+00   1.5237929e+00   2.4389172e+00   3.3539591e+00   2.2150193e+00   8.7774396e-01   8.7560645e-01   6.6918102e-01   8.5695467e-01   1.6281675e+00   1.2552875e+00   9.0276183e-01   4.7723749e-01   9.6922609e-01   3.4909881e-01   4.4701039e-01   6.6835176e-01   8.7807032e-01   8.7272262e-01   2.1119253e-01   1.2038778e+00   1.5064820e+00   1.5654738e+00   7.8630314e-01   5.8942278e-01   8.9320425e-01   1.1940983e+00   8.6887698e-01   1.4210091e+00   7.4201890e-01   1.2452417e+00   1.0494370e+00   2.3749211e-01   9.1435339e-01   2.1409786e+00   8.2148003e-01   6.5993495e-01   5.7516438e-01   2.8835410e-01   1.8418099e+00   6.4756318e-01   1.8787743e+00   9.0810653e-01   1.6779282e+00   7.7021931e-01   1.3319441e+00   2.3098596e+00   1.7659238e+00   1.7880416e+00   1.4280932e+00   2.6604707e+00   1.1753998e+00   9.4281519e-01   1.3471074e+00   1.3158313e+00   1.3974368e+00   1.4547739e+00   8.7568652e-01   3.2288696e+00   2.6753697e+00   1.6330922e+00   1.7674989e+00   1.0240850e+00   2.3852911e+00   7.4743804e-01   1.5932991e+00   1.7495490e+00   5.8796666e-01   5.8374436e-01   1.1339991e+00   1.5083690e+00   1.8912106e+00   3.2526896e+00   1.2423778e+00   4.2436984e-01   8.5959137e-01   2.4097678e+00   1.8344669e+00   9.0791603e-01   5.8796666e-01   1.4645285e+00   1.6477112e+00   1.6088132e+00   9.0810653e-01   1.7454599e+00   1.9428935e+00   1.4315280e+00   1.1694177e+00   9.9244707e-01   1.7007353e+00   6.6154242e-01   1.4832888e+00   6.1810529e-01   7.1128716e-01   1.8601631e+00   9.7397874e-01   1.2254650e+00   6.8496652e-01   1.4755282e+00   9.0753778e-01   1.0443931e+00   1.3169341e+00   1.6226440e+00   1.6498870e+00   7.4980278e-01   8.0686941e-01   1.1940983e+00   1.2255953e+00   5.6318359e-01   1.1503759e+00   6.6361830e-01   1.4063472e+00   1.5603679e+00   1.6837563e+00   3.6536845e-01   9.5761359e-01   8.4619410e-01   8.6958016e-01   7.7821113e-01   1.6196626e+00   5.7306091e-01   4.4786319e-01   3.6086172e-01   8.2608188e-01   1.1831978e+00   3.8480889e-01   2.4265852e+00   1.2696247e+00   2.4764170e+00   1.5584328e+00   2.0444851e+00   3.1426915e+00   1.4493286e+00   2.6430316e+00   2.1446703e+00   3.2893516e+00   1.7955663e+00   1.6408995e+00   2.1004081e+00   1.5285733e+00   1.7064050e+00   2.0142932e+00   1.6802708e+00   3.9009617e+00   3.4821230e+00   1.8809382e+00   2.4651410e+00   1.1989033e+00   3.2268928e+00   1.3782117e+00   2.2651964e+00   2.5478630e+00   1.2124370e+00   1.1789342e+00   1.8358339e+00   2.3443222e+00   2.7210373e+00   3.9221023e+00   1.9136809e+00   1.2486828e+00   1.4646971e+00   3.1951870e+00   2.3252489e+00   1.6537705e+00   1.0855082e+00   2.1947734e+00   2.3108044e+00   2.2621105e+00   1.2696247e+00   2.4484679e+00   2.5504328e+00   2.0873736e+00   1.6773040e+00   1.7023842e+00   2.1476736e+00   1.1560388e+00   1.3558057e+00   1.5283845e+00   2.1664244e+00   1.9784646e+00   1.1457159e+00   1.0355160e+00   1.4985549e+00   1.0494370e+00   6.0365341e-01   2.6033464e-01   7.3803207e-01   5.6864482e-01   9.7352372e-01   1.8229204e+00   2.2308199e+00   2.2668270e+00   1.4769275e+00   1.3385535e+00   1.5931825e+00   1.1248155e+00   2.1466080e-01   1.9117251e+00   1.3652496e+00   2.0207624e+00   1.8704283e+00   7.6880092e-01   1.6220723e+00   2.8778954e+00   1.6265611e+00   1.2621791e+00   1.3042843e+00   7.7313507e-01   2.5362196e+00   1.4082507e+00   1.8291996e+00   1.6183246e+00   1.3603639e+00   1.0878281e+00   1.3564590e+00   1.9053825e+00   2.6072470e+00   1.4737985e+00   1.6790332e+00   2.1679999e+00   9.4182667e-01   1.2929545e+00   1.1391970e+00   2.0265696e+00   1.8799960e+00   1.3547660e+00   8.8029208e-01   2.6196958e+00   2.4872661e+00   2.2706454e+00   1.4300844e+00   1.7151590e+00   2.0626281e+00   1.1997534e+00   1.2637010e+00   1.2307777e+00   1.0813975e+00   9.6603754e-01   1.3834169e+00   1.0564307e+00   1.5971466e+00   2.5708690e+00   1.4735640e+00   9.4160439e-01   1.5222760e+00   1.9572025e+00   1.7004687e+00   8.9142733e-01   1.0459007e+00   1.1049324e+00   1.4763267e+00   1.2674750e+00   1.6183246e+00   1.4769125e+00   1.6832034e+00   1.2843405e+00   1.6410601e+00   9.6706760e-01   1.5985259e+00   1.1910776e+00   1.0088064e+00   1.9822205e+00   1.3115314e+00   7.2626021e-01   8.5225534e-01   1.4476734e+00   8.6297946e-01   1.0334797e+00   1.2160426e+00   1.5358725e+00   1.3833366e+00   5.3528567e-01   1.2712561e+00   1.5367336e+00   1.6013312e+00   8.9845135e-01   9.1916314e-01   2.4152660e-01   1.0495503e+00   1.3530247e+00   1.8419620e+00   3.4651700e-01   1.2220171e+00   1.0116179e+00   6.2046469e-01   1.0696792e+00   2.0057768e+00   7.5914566e-01   4.4499696e-01   4.0664863e-01   8.1224041e-01   1.6406723e+00   5.8942278e-01   1.9060542e+00   9.6301827e-01   2.1281559e+00   1.1449868e+00   1.6017068e+00   2.8050285e+00   1.4536311e+00   2.3373419e+00   1.9472489e+00   2.8613983e+00   1.3924555e+00   1.3756347e+00   1.7433862e+00   1.3615778e+00   1.3332278e+00   1.5654312e+00   1.2872568e+00   3.4973752e+00   3.1986815e+00   1.9281666e+00   2.0588451e+00   8.3270853e-01   2.9373687e+00   1.1828955e+00   1.8231885e+00   2.1962402e+00   9.5979989e-01   7.5532639e-01   1.4672797e+00   2.0720690e+00   2.4566102e+00   3.5648048e+00   1.5414664e+00   1.0212756e+00   1.2733735e+00   2.8900916e+00   1.8289569e+00   1.2092544e+00   6.4558417e-01   1.8428644e+00   1.8966444e+00   1.9319316e+00   9.6301827e-01   2.0102936e+00   2.1030669e+00   1.7380754e+00   1.5489952e+00   1.3296349e+00   1.6538197e+00   6.3357758e-01   1.4295948e+00   5.4873947e-01   1.6126413e+00   5.8496636e-01   1.1009910e+00   6.0725725e-01   9.5139638e-01   1.3098483e+00   1.3941599e+00   1.6617787e+00   8.6702860e-01   4.2826573e-01   8.0996690e-01   8.1324137e-01   2.8553149e-01   9.9883272e-01   1.0921061e+00   1.8259719e+00   1.6053711e+00   1.1828265e+00   8.3161134e-01   7.0834786e-01   5.3106808e-01   9.8233874e-01   3.5366952e-01   1.4106682e+00   4.6484021e-01   7.5179033e-01   6.2055338e-01   7.8324937e-01   1.1546456e+00   4.7149050e-01   2.7022699e+00   1.3084256e+00   2.4620452e+00   1.5488588e+00   2.1433843e+00   3.0477876e+00   1.5122060e+00   2.4794486e+00   1.8496575e+00   3.5092631e+00   2.0205369e+00   1.5421829e+00   2.1550478e+00   1.4847626e+00   1.9338323e+00   2.2845215e+00   1.7093196e+00   4.0428524e+00   3.2768847e+00   1.4413624e+00   2.6112105e+00   1.4262166e+00   3.0341947e+00   1.2919157e+00   2.4486747e+00   2.5390232e+00   1.2420951e+00   1.3836252e+00   1.8380693e+00   2.2098781e+00   2.5420974e+00   4.0353061e+00   1.9425259e+00   1.0808550e+00   1.0871507e+00   3.1511951e+00   2.6568698e+00   1.7619640e+00   1.3391481e+00   2.2882514e+00   2.4739376e+00   2.4163220e+00   1.3084256e+00   2.5943375e+00   2.7895659e+00   2.2249457e+00   1.4927500e+00   1.8163092e+00   2.5068377e+00   1.3832520e+00   1.1807138e+00   2.3735475e+00   1.4416726e+00   7.3803207e-01   1.4480380e+00   1.6571634e+00   1.9125650e+00   1.5766889e+00   1.9793333e+00   1.6323793e+00   1.4021778e+00   1.1659675e+00   1.2498767e+00   1.3539814e+00   1.2332482e+00   2.0826771e+00   2.7811716e+00   2.1646850e+00   3.7371902e-01   2.0122804e+00   1.1585774e+00   1.3127802e+00   1.8544941e+00   1.1485726e+00   1.7450075e+00   1.3972701e+00   1.9880179e+00   1.7517164e+00   1.6394680e+00   1.8002228e+00   1.5490387e+00   2.9816674e+00   1.3976606e+00   2.4151949e+00   1.7787946e+00   2.2180206e+00   2.8804995e+00   1.7355261e+00   2.3592859e+00   1.2412454e+00   3.7977608e+00   2.4485045e+00   1.3668906e+00   2.2064746e+00   1.1631247e+00   1.9116990e+00   2.5849220e+00   2.0027932e+00   4.3925033e+00   2.6611027e+00   3.7234239e-01   2.7559143e+00   1.7089501e+00   2.6795765e+00   1.2450968e+00   2.8073641e+00   2.7667084e+00   1.4485479e+00   1.9038618e+00   1.7262603e+00   2.3286441e+00   2.2609611e+00   4.4068441e+00   1.7897439e+00   1.4300608e+00   1.1275945e+00   2.9337206e+00   3.0746426e+00   2.2005676e+00   1.9094387e+00   2.4292641e+00   2.5401664e+00   2.4975057e+00   1.3976606e+00   2.7518188e+00   2.9966927e+00   2.2416615e+00   9.2104245e-01   2.0302905e+00   3.0030765e+00   1.9507955e+00   1.9593598e+00   9.5666050e-01   1.1447875e+00   1.0324994e+00   1.3800294e+00   1.7386688e+00   1.7301705e+00   2.0251376e+00   1.2143895e+00   3.6924035e-01   2.6643250e-01   3.1271814e-01   5.3690447e-01   1.1566759e+00   1.3335853e+00   2.2553589e+00   2.0395552e+00   1.0374728e+00   1.1879760e+00   2.9406726e-01   4.0650681e-01   1.4164313e+00   3.6319073e-01   9.3305124e-01   5.5709100e-01   1.1791615e+00   9.8143688e-01   1.2231662e+00   7.9042934e-01   7.5817225e-01   2.9833953e+00   1.3537061e+00   2.7591591e+00   1.8262769e+00   2.3975382e+00   3.3499130e+00   1.2034779e+00   2.7851895e+00   1.9405021e+00   3.8845156e+00   2.3750632e+00   1.6954582e+00   2.4431790e+00   1.3394090e+00   1.9751740e+00   2.5771567e+00   2.0432035e+00   4.4739802e+00   3.4420978e+00   1.1727925e+00   2.9298786e+00   1.4800982e+00   3.2892623e+00   1.4456510e+00   2.8154123e+00   2.9321762e+00   1.4509441e+00   1.6902348e+00   2.0142932e+00   2.5791547e+00   2.8031074e+00   4.4835636e+00   2.1018908e+00   1.3894554e+00   1.2250001e+00   3.4334168e+00   2.9754074e+00   2.1241116e+00   1.6323629e+00   2.6113665e+00   2.7403495e+00   2.7045382e+00   1.3537061e+00   2.9092469e+00   3.0943267e+00   2.4717839e+00   1.4839640e+00   2.1082363e+00   2.8334846e+00   1.6627952e+00   1.2426609e+00   1.7313027e+00   1.2372185e+00   1.1631247e+00   1.1195889e+00   1.5188976e+00   1.0845006e+00   8.2263932e-01   1.9012930e+00   2.1909047e+00   2.2638611e+00   1.4908532e+00   1.2008045e+00   8.7223523e-01   5.7002996e-01   1.0697164e+00   2.2410714e+00   9.6470639e-01   1.8639992e+00   1.6786018e+00   7.4743804e-01   1.6592561e+00   2.7039438e+00   1.4162972e+00   1.0024224e+00   1.0401603e+00   1.0580730e+00   2.3284654e+00   1.2231205e+00   1.2611129e+00   1.1791615e+00   1.6899776e+00   9.5793067e-01   1.1548640e+00   2.3712314e+00   2.0275068e+00   2.0149111e+00   1.9649183e+00   2.1679212e+00   7.8905316e-01   1.3385913e+00   1.3061285e+00   1.6571634e+00   1.2299006e+00   9.3495766e-01   9.4613565e-01   2.8415314e+00   2.9130399e+00   2.3454203e+00   1.4655406e+00   1.0267382e+00   2.6085350e+00   1.2515236e+00   1.1837505e+00   1.7109084e+00   9.9111027e-01   5.2374483e-01   1.2552875e+00   1.7513749e+00   2.1661990e+00   2.9392776e+00   1.3022811e+00   1.1259771e+00   1.5663601e+00   2.4310503e+00   1.1268523e+00   7.5840628e-01   4.7680727e-01   1.3348163e+00   1.3454539e+00   1.4034689e+00   1.1791615e+00   1.4139320e+00   1.4450127e+00   1.2754470e+00   1.6940148e+00   9.2620264e-01   9.4281519e-01   4.9160020e-01   9.3054395e-01   4.1781009e-01   4.6190224e-01   8.0369154e-01   9.6816967e-01   1.1548640e+00   4.6557224e-01   8.2518769e-01   1.2073068e+00   1.2487994e+00   4.5257749e-01   7.8164792e-01   1.0374728e+00   1.4711456e+00   1.1089653e+00   1.1997868e+00   7.6195008e-01   1.0018628e+00   8.9796526e-01   5.8785093e-01   6.0098693e-01   1.8456219e+00   6.5622658e-01   6.9001472e-01   5.4715569e-01   3.1093967e-01   1.5254459e+00   4.8636669e-01   2.2683520e+00   1.0914354e+00   1.9823217e+00   1.1675117e+00   1.6963493e+00   2.6008457e+00   1.7128336e+00   2.0692339e+00   1.5728043e+00   3.0096252e+00   1.5213092e+00   1.1599200e+00   1.6580031e+00   1.3691582e+00   1.6116709e+00   1.8005954e+00   1.2641532e+00   3.5755981e+00   2.8921647e+00   1.5229350e+00   2.1046875e+00   1.2108278e+00   2.6299105e+00   8.9496218e-01   1.9702691e+00   2.0808148e+00   8.0585922e-01   9.4983854e-01   1.4326334e+00   1.7811974e+00   2.1211631e+00   3.5687116e+00   1.5311195e+00   7.1811205e-01   1.0257884e+00   2.6607812e+00   2.2075002e+00   1.3273841e+00   9.2853136e-01   1.7721541e+00   1.9757526e+00   1.8755628e+00   1.0914354e+00   2.1076593e+00   2.2924992e+00   1.7080157e+00   1.2150638e+00   1.3228669e+00   2.0678512e+00   1.0435585e+00   8.3930091e-01   1.0246689e+00   1.2483935e+00   9.2934901e-01   1.2786676e+00   1.0167074e+00   1.2794668e+00   1.2845002e+00   1.3705288e+00   1.0262066e+00   6.1158310e-01   1.6007620e+00   2.1232609e+00   1.4700482e+00   6.0145223e-01   1.5227019e+00   1.1234881e+00   1.1051628e+00   1.1975697e+00   9.1241332e-01   1.9821649e+00   1.0739839e+00   1.4719712e+00   1.2657553e+00   1.0246689e+00   1.8799916e+00   1.1304806e+00   2.3473055e+00   9.3001231e-01   1.7895396e+00   1.0784109e+00   1.5778477e+00   2.3110268e+00   1.7258314e+00   1.7588444e+00   8.0501785e-01   3.1299934e+00   1.7625999e+00   7.4394765e-01   1.5582385e+00   9.7850690e-01   1.4989725e+00   1.9419525e+00   1.2877346e+00   3.7053544e+00   2.3011615e+00   7.8305765e-01   2.1061327e+00   1.2737998e+00   2.1925140e+00   6.0604502e-01   2.1121593e+00   2.0810604e+00   8.0686941e-01   1.2420238e+00   1.1264142e+00   1.6698499e+00   1.7264467e+00   3.7248620e+00   1.2214818e+00   7.0111465e-01   5.3487449e-01   2.3978329e+00   2.4200364e+00   1.4831058e+00   1.2723027e+00   1.7715216e+00   1.9225896e+00   1.8845666e+00   9.3001231e-01   2.0954738e+00   2.3579846e+00   1.6403910e+00   5.2719130e-01   1.3587682e+00   2.3456726e+00   1.3154759e+00   5.0299964e-01   8.2155022e-01   8.8684653e-01   1.0935878e+00   4.8492463e-01   9.8860056e-01   1.2858521e+00   1.3288928e+00   6.2451737e-01   6.2760421e-01   1.0463002e+00   1.4889605e+00   1.0762241e+00   1.1975697e+00   8.4271175e-01   1.0854927e+00   8.7560645e-01   5.3352899e-01   7.0810362e-01   1.9474744e+00   7.1781501e-01   7.2553812e-01   6.1968090e-01   3.6924035e-01   1.6978139e+00   6.0510141e-01   2.1983316e+00   1.0378652e+00   1.8773521e+00   9.9490014e-01   1.5974238e+00   2.4585483e+00   1.7380659e+00   1.8957007e+00   1.4179266e+00   2.9495957e+00   1.4948761e+00   1.0683666e+00   1.5886178e+00   1.3564059e+00   1.6294524e+00   1.7819921e+00   1.1268523e+00   3.4719349e+00   2.7528980e+00   1.4535731e+00   2.0452826e+00   1.2150379e+00   2.4732935e+00   8.6167901e-01   1.8885847e+00   1.9433611e+00   7.9744128e-01   9.1854596e-01   1.3349909e+00   1.6250498e+00   1.9838258e+00   3.4743868e+00   1.4520430e+00   5.1406096e-01   7.3595190e-01   2.5794085e+00   2.1692945e+00   1.1973560e+00   9.2123504e-01   1.7205327e+00   1.9329718e+00   1.8817619e+00   1.0378652e+00   2.0262673e+00   2.2533761e+00   1.7016580e+00   1.1862896e+00   1.2748646e+00   2.0406838e+00   9.6984925e-01   3.6319073e-01   6.1968090e-01   7.8521221e-01   5.6113157e-01   1.2463647e+00   1.6309592e+00   1.6676963e+00   8.9796526e-01   8.9789119e-01   1.2621791e+00   1.3154759e+00   6.8124108e-01   1.3901973e+00   9.9970024e-01   1.4357022e+00   1.2962951e+00   4.8012872e-01   1.0246015e+00   2.2910733e+00   1.0720705e+00   8.8779355e-01   8.4724089e-01   2.4152660e-01   1.9817257e+00   8.8354057e-01   2.0655284e+00   1.2495886e+00   1.6398109e+00   9.9332012e-01   1.4769125e+00   2.2251642e+00   2.1023706e+00   1.7015856e+00   1.4609179e+00   2.6557282e+00   1.2410479e+00   1.0733560e+00   1.3593949e+00   1.6013655e+00   1.6915504e+00   1.5864800e+00   9.7957718e-01   3.1644964e+00   2.6137665e+00   1.7509262e+00   1.7860234e+00   1.3941000e+00   2.2824049e+00   8.7876634e-01   1.6464371e+00   1.6642217e+00   7.8808432e-01   8.5400786e-01   1.3018901e+00   1.3652161e+00   1.7805677e+00   3.1380968e+00   1.4095411e+00   5.8483448e-01   1.0816610e+00   2.2968622e+00   1.9911692e+00   1.0509799e+00   8.9223438e-01   1.4369760e+00   1.7217513e+00   1.5811148e+00   1.2495886e+00   1.8031513e+00   2.0209769e+00   1.4702446e+00   1.2810704e+00   1.0813343e+00   1.8691588e+00   1.0259679e+00   5.6788283e-01   5.3362004e-01   7.7368489e-01   1.6022591e+00   1.9873741e+00   2.0277089e+00   1.2494231e+00   1.1089653e+00   1.4561750e+00   1.2033093e+00   3.3742167e-01   1.6597443e+00   1.2265630e+00   1.7784712e+00   1.6384023e+00   6.1436388e-01   1.3800294e+00   2.6463489e+00   1.4025367e+00   1.1237500e+00   1.1244975e+00   5.5399712e-01   2.3227610e+00   1.2000527e+00   1.8734557e+00   1.4137602e+00   1.3887598e+00   9.6005858e-01   1.3202421e+00   1.9632584e+00   2.3879303e+00   1.4839475e+00   1.4995474e+00   2.3336107e+00   1.0014276e+00   1.1074656e+00   1.1350466e+00   1.8013325e+00   1.7379612e+00   1.3863777e+00   8.2339084e-01   2.8225734e+00   2.4523537e+00   2.0154418e+00   1.5091823e+00   1.5393373e+00   2.0723760e+00   9.8233874e-01   1.3702101e+00   1.3545502e+00   8.7875749e-01   8.4830222e-01   1.2549787e+00   1.1060185e+00   1.5823028e+00   2.7877979e+00   1.3537061e+00   7.2012544e-01   1.2954496e+00   2.0208193e+00   1.7781563e+00   8.8029208e-01   9.2256644e-01   1.1605968e+00   1.4991046e+00   1.3162835e+00   1.4137602e+00   1.5442127e+00   1.7645705e+00   1.2692218e+00   1.4162972e+00   9.1557526e-01   1.6722331e+00   1.0708496e+00   6.2826980e-01   1.0161846e+00   1.6718164e+00   1.9471640e+00   1.9947662e+00   1.3566251e+00   1.0412209e+00   1.7655766e+00   1.7163342e+00   7.1671402e-01   1.3277490e+00   1.5771462e+00   1.7793591e+00   1.6725709e+00   9.6964683e-01   1.3947746e+00   2.6556269e+00   1.5119726e+00   1.4702773e+00   1.3966512e+00   8.2199752e-01   2.4266623e+00   1.3925524e+00   2.0577807e+00   1.4034689e+00   1.2545960e+00   9.4767129e-01   1.3281960e+00   1.7401681e+00   2.4345214e+00   1.1896374e+00   1.0436620e+00   2.5015865e+00   1.2764504e+00   8.9223438e-01   1.1006735e+00   1.6953806e+00   1.7900496e+00   1.5985782e+00   8.8098199e-01   2.9595238e+00   2.0497239e+00   1.6965355e+00   1.5863720e+00   1.6496643e+00   1.7201711e+00   8.3409556e-01   1.5639220e+00   1.3496867e+00   8.9427872e-01   1.0978602e+00   1.1314785e+00   9.1432842e-01   1.2235673e+00   2.9196060e+00   1.2400775e+00   6.4083823e-01   1.0643984e+00   1.8241883e+00   2.0498818e+00   1.0696576e+00   1.1919906e+00   1.2042673e+00   1.5543054e+00   1.3831011e+00   1.4034689e+00   1.6218749e+00   1.9188761e+00   1.2920921e+00   1.1337565e+00   1.0067405e+00   1.9865217e+00   1.3029486e+00   9.5748562e-01   1.9681165e+00   2.2573397e+00   2.3235953e+00   1.5741400e+00   1.1016806e+00   1.6166760e+00   1.2896217e+00   3.8830315e-01   1.7972266e+00   1.5164233e+00   2.0064286e+00   1.8697578e+00   8.5494999e-01   1.6681709e+00   2.9309853e+00   1.6503473e+00   1.4467905e+00   1.4113341e+00   9.2189946e-01   2.6393526e+00   1.4852749e+00   1.4601858e+00   1.3160132e+00   8.7649478e-01   6.4756318e-01   8.3256255e-01   1.5094087e+00   2.4769347e+00   1.0668784e+00   1.2459961e+00   1.9408738e+00   6.5485710e-01   8.4116354e-01   6.0795234e-01   1.7154199e+00   1.4961901e+00   9.9551062e-01   3.9472619e-01   2.4940166e+00   2.0216642e+00   2.0463301e+00   1.0230389e+00   1.4612117e+00   1.6595118e+00   8.5582452e-01   9.5437259e-01   9.5694342e-01   7.7934221e-01   7.3851064e-01   8.5695467e-01   7.6638235e-01   1.1767396e+00   2.5076596e+00   9.4281519e-01   7.1971771e-01   1.2830542e+00   1.5700842e+00   1.4287578e+00   5.3095950e-01   8.6291569e-01   6.6154242e-01   1.0050638e+00   8.5606908e-01   1.3160132e+00   1.0514970e+00   1.3171874e+00   7.9433323e-01   1.2774110e+00   4.7509249e-01   1.3730080e+00   9.7659801e-01   1.1663747e+00   1.4582411e+00   1.5261646e+00   7.3570584e-01   5.8785093e-01   7.6039875e-01   1.1605726e+00   9.6964683e-01   1.4553344e+00   6.3765570e-01   1.1681709e+00   1.0005243e+00   2.9691107e-01   8.7856768e-01   2.0651943e+00   7.3735391e-01   6.0653347e-01   4.7837533e-01   3.7398306e-01   1.7406274e+00   5.5183182e-01   1.8498714e+00   8.1329726e-01   1.7508641e+00   8.2125107e-01   1.3423724e+00   2.4127395e+00   1.6384023e+00   1.9130927e+00   1.5043381e+00   2.6917823e+00   1.1782159e+00   9.6249568e-01   1.3877621e+00   1.2214135e+00   1.2719770e+00   1.4200371e+00   9.4526659e-01   3.3044115e+00   2.7645066e+00   1.6390945e+00   1.7948322e+00   8.7588404e-01   2.5003659e+00   7.4157869e-01   1.6267504e+00   1.8590427e+00   5.4310586e-01   5.2316125e-01   1.1372412e+00   1.6472029e+00   2.0021586e+00   3.3409572e+00   1.2314733e+00   5.4779717e-01   9.4822835e-01   2.4877874e+00   1.8001237e+00   9.6012811e-01   4.8644514e-01   1.5074309e+00   1.6452353e+00   1.6151033e+00   8.1329726e-01   1.7721541e+00   1.9352496e+00   1.4226963e+00   1.1564263e+00   1.0022114e+00   1.6574535e+00   5.8132667e-01   5.6318359e-01   5.3286499e-01   4.3341454e-01   1.2747045e+00   1.3163443e+00   2.1153648e+00   1.9183153e+00   1.1909838e+00   1.0657373e+00   5.8852220e-01   6.2225308e-01   1.3220343e+00   4.0443437e-01   1.0982562e+00   6.1619693e-01   1.0378442e+00   8.8917809e-01   1.0970024e+00   8.2199752e-01   6.9493020e-01   3.0003610e+00   1.5102474e+00   2.7635526e+00   1.8759428e+00   2.4405125e+00   3.3586044e+00   1.4659783e+00   2.7980993e+00   2.0759743e+00   3.8255754e+00   2.3211022e+00   1.7886572e+00   2.4450156e+00   1.5788967e+00   2.1011800e+00   2.5635734e+00   2.0416027e+00   4.3880097e+00   3.5282390e+00   1.4609179e+00   2.9105517e+00   1.6043433e+00   3.3245307e+00   1.5187698e+00   2.7743367e+00   2.8814354e+00   1.4896588e+00   1.6771528e+00   2.1027324e+00   2.5396337e+00   2.8265966e+00   4.3745133e+00   2.1946278e+00   1.4104380e+00   1.3873057e+00   3.4289479e+00   2.9514502e+00   2.1043046e+00   1.6198849e+00   2.5820471e+00   2.7513626e+00   2.6746677e+00   1.5102474e+00   2.9036877e+00   3.0793854e+00   2.4777911e+00   1.6406409e+00   2.1046875e+00   2.7982275e+00   1.6824284e+00   1.4276574e-01   7.9394533e-01   1.3473710e+00   1.5367336e+00   2.5040512e+00   2.2893871e+00   1.0820670e+00   1.4237364e+00   3.6704030e-01   5.8785093e-01   1.6733127e+00   6.1158310e-01   7.1781501e-01   7.8318003e-01   1.4288989e+00   1.2280749e+00   1.4809953e+00   7.0150436e-01   1.0034788e+00   3.1877520e+00   1.5005648e+00   2.9634183e+00   2.0359721e+00   2.5953129e+00   3.5470571e+00   1.1634940e+00   2.9839272e+00   2.0686806e+00   4.1156592e+00   2.6069476e+00   1.8659064e+00   2.6504363e+00   1.4017266e+00   2.1040122e+00   2.7893850e+00   2.2677890e+00   4.7183507e+00   3.5819899e+00   1.1465705e+00   3.1455771e+00   1.6263647e+00   3.4643576e+00   1.6254447e+00   3.0471395e+00   3.1646326e+00   1.6517237e+00   1.9156890e+00   2.1886203e+00   2.8006555e+00   2.9856138e+00   4.7315684e+00   2.2694993e+00   1.6130651e+00   1.3903392e+00   3.6256164e+00   3.1929372e+00   2.3573820e+00   1.8552594e+00   2.8291427e+00   2.9408913e+00   2.9120555e+00   1.5005648e+00   3.1237582e+00   3.3065647e+00   2.6677639e+00   1.5962380e+00   2.3224070e+00   3.0542458e+00   1.8794605e+00   8.3156200e-01   1.4460310e+00   1.6013312e+00   2.5509456e+00   2.3359909e+00   1.1395071e+00   1.4612871e+00   4.8644514e-01   6.6244727e-01   1.7247525e+00   6.6453319e-01   6.8496652e-01   8.5330525e-01   1.4567673e+00   1.2739414e+00   1.5213580e+00   6.7904052e-01   1.0560797e+00   3.2869799e+00   1.6218234e+00   3.0463976e+00   2.1264009e+00   2.6948572e+00   3.6228821e+00   1.2747978e+00   3.0537173e+00   2.1607143e+00   4.1937512e+00   2.6849827e+00   1.9680122e+00   2.7382122e+00   1.5399252e+00   2.2309601e+00   2.8826191e+00   2.3479440e+00   4.7798805e+00   3.6690959e+00   1.2447718e+00   3.2325186e+00   1.7450415e+00   3.5380106e+00   1.7243835e+00   3.1258440e+00   3.2275370e+00   1.7473394e+00   2.0003230e+00   2.2955340e+00   2.8573132e+00   3.0588804e+00   4.7837445e+00   2.3799967e+00   1.6861899e+00   1.4737985e+00   3.7047689e+00   3.2828775e+00   2.4345890e+00   1.9408738e+00   2.9104325e+00   3.0383020e+00   2.9993404e+00   1.6218234e+00   3.2132904e+00   3.3994957e+00   2.7639400e+00   1.7088499e+00   2.4110070e+00   3.1406474e+00   1.9689207e+00   8.9196595e-01   9.9107019e-01   1.7478610e+00   1.5467508e+00   1.1459117e+00   7.5303835e-01   6.0365341e-01   5.1453676e-01   9.1435339e-01   2.3749211e-01   1.4031123e+00   3.2313211e-01   7.2263841e-01   5.2290002e-01   7.1740234e-01   1.0975976e+00   3.1271814e-01   2.5686027e+00   1.1418735e+00   2.3704417e+00   1.4573208e+00   2.0173981e+00   2.9893605e+00   1.3924555e+00   2.4418079e+00   1.7809408e+00   3.4092863e+00   1.8988911e+00   1.4127713e+00   2.0371950e+00   1.3095379e+00   1.7286430e+00   2.1358640e+00   1.6228818e+00   3.9920035e+00   3.2072460e+00   1.3897098e+00   2.4925270e+00   1.2375842e+00   2.9891693e+00   1.1418958e+00   2.3510928e+00   2.4945648e+00   1.0792736e+00   1.2447083e+00   1.7021399e+00   2.1843621e+00   2.4864921e+00   3.9967418e+00   1.7954132e+00   1.0172824e+00   1.0869385e+00   3.0619758e+00   2.5242226e+00   1.6782397e+00   1.1896845e+00   2.1746675e+00   2.3309032e+00   2.2706367e+00   1.1418735e+00   2.4800313e+00   2.6530340e+00   2.0689155e+00   1.3443777e+00   1.6837594e+00   2.3748600e+00   1.2545769e+00   1.0660846e+00   1.6498377e+00   1.2783641e+00   1.1376397e+00   1.0898613e+00   1.0585628e+00   9.2189946e-01   8.0142393e-01   8.8029208e-01   1.9920533e+00   8.0501785e-01   1.0699859e+00   8.7105035e-01   7.9448303e-01   1.7999592e+00   8.1251986e-01   1.9227723e+00   4.6137216e-01   1.6965186e+00   7.0213871e-01   1.2723284e+00   2.3160615e+00   1.4526546e+00   1.7912701e+00   1.0739839e+00   2.8496420e+00   1.4032361e+00   6.3302304e-01   1.3757605e+00   7.8863556e-01   1.1001816e+00   1.5547583e+00   9.8152003e-01   3.4772360e+00   2.4799120e+00   1.1619556e+00   1.8622587e+00   7.5769247e-01   2.3162319e+00   4.6128322e-01   1.7816685e+00   1.9387331e+00   4.5729032e-01   7.5817225e-01   8.9223438e-01   1.6541379e+00   1.8404767e+00   3.5381276e+00   9.9244707e-01   4.4901474e-01   4.6557224e-01   2.4199101e+00   1.9790803e+00   1.0974789e+00   7.5914566e-01   1.5781281e+00   1.6567524e+00   1.6951864e+00   4.6137216e-01   1.8193470e+00   2.0336808e+00   1.4275349e+00   7.0834786e-01   1.0588854e+00   1.8801322e+00   7.4965096e-01   1.1803522e+00   1.5908164e+00   1.9645622e+00   4.2238505e-01   1.2220171e+00   1.0116179e+00   8.5731385e-01   1.1485726e+00   1.9317000e+00   7.9664122e-01   5.6097460e-01   5.3106808e-01   1.0334797e+00   1.5679493e+00   6.8124108e-01   2.0247774e+00   1.0499569e+00   2.3371797e+00   1.3332950e+00   1.7744903e+00   3.0154970e+00   1.3277924e+00   2.5520970e+00   2.1193865e+00   3.0297355e+00   1.5881698e+00   1.5547948e+00   1.9487821e+00   1.4037678e+00   1.3973195e+00   1.7249900e+00   1.4967902e+00   3.6762761e+00   3.3933664e+00   2.0023741e+00   2.2484516e+00   8.6702860e-01   3.1482546e+00   1.3659877e+00   2.0060004e+00   2.4114658e+00   1.1530661e+00   9.5944179e-01   1.6364369e+00   2.2989490e+00   2.6726954e+00   3.7560452e+00   1.7032717e+00   1.2286922e+00   1.4040978e+00   3.1041910e+00   1.9523740e+00   1.4097206e+00   8.4169735e-01   2.0525205e+00   2.0729884e+00   2.1328505e+00   1.0499569e+00   2.1908074e+00   2.2633850e+00   1.9289706e+00   1.6929462e+00   1.5333884e+00   1.7729821e+00   7.9671887e-01   1.1060455e+00   2.5932658e+00   1.1359179e+00   2.2153658e+00   2.0116430e+00   9.6825676e-01   1.9538525e+00   2.9958431e+00   1.7387082e+00   1.1339874e+00   1.2823616e+00   1.2471855e+00   2.5771468e+00   1.5006766e+00   1.5158960e+00   1.7131342e+00   1.9169015e+00   1.3850497e+00   1.5416258e+00   2.5358032e+00   2.4678381e+00   2.2144600e+00   2.3737220e+00   2.1274158e+00   9.8372339e-01   1.7887913e+00   1.5921275e+00   2.1896791e+00   1.7854129e+00   1.2218858e+00   1.2670969e+00   2.6904561e+00   3.2109839e+00   2.7851183e+00   1.6425353e+00   1.5729927e+00   2.8211634e+00   1.6904600e+00   1.2882518e+00   1.7618849e+00   1.4390193e+00   9.9282597e-01   1.7222401e+00   1.8692144e+00   2.3979391e+00   2.7477433e+00   1.7762263e+00   1.4761145e+00   1.9687854e+00   2.5941073e+00   1.2723200e+00   1.0497372e+00   9.7397874e-01   1.5327853e+00   1.6373339e+00   1.6177026e+00   1.7131342e+00   1.6177237e+00   1.6189835e+00   1.6013655e+00   2.1620604e+00   1.2836487e+00   1.0769609e+00   1.0246689e+00   1.9326437e+00   1.4149714e+00   2.0593667e+00   1.9008579e+00   7.7368489e-01   1.6801694e+00   2.9457974e+00   1.6627284e+00   1.3215146e+00   1.3491191e+00   8.3512263e-01   2.6175043e+00   1.4565053e+00   1.6449760e+00   1.5357227e+00   1.1692720e+00   9.2780124e-01   1.1582405e+00   1.7355630e+00   2.5925902e+00   1.3094338e+00   1.5678176e+00   2.0102053e+00   7.6952423e-01   1.1716038e+00   9.4417605e-01   1.9573929e+00   1.7612938e+00   1.1827746e+00   6.8675486e-01   2.4881500e+00   2.3327432e+00   2.2476505e+00   1.2375842e+00   1.6387331e+00   1.9108109e+00   1.1188225e+00   1.0733560e+00   1.0560148e+00   1.0005243e+00   8.6347207e-01   1.2199459e+00   9.0753778e-01   1.4483156e+00   2.4625089e+00   1.3082342e+00   8.7375509e-01   1.4601811e+00   1.8000065e+00   1.5372053e+00   7.0097130e-01   9.6204815e-01   9.1315231e-01   1.2848917e+00   1.0993651e+00   1.5357227e+00   1.2764003e+00   1.5003224e+00   1.1101208e+00   1.5658291e+00   7.8808432e-01   1.4489917e+00   1.0920053e+00   1.8302572e+00   1.0943114e+00   1.1955102e+00   1.6415483e+00   9.5491981e-01   1.7343175e+00   1.2563834e+00   1.7780218e+00   1.5661153e+00   1.3901973e+00   1.7352481e+00   1.3724737e+00   2.9349297e+00   1.4110819e+00   2.3154474e+00   1.6753059e+00   2.1644875e+00   2.7793057e+00   1.8300579e+00   2.2275691e+00   1.2267563e+00   3.6839155e+00   2.3163493e+00   1.3205795e+00   2.1115079e+00   1.3018219e+00   1.9822480e+00   2.5100153e+00   1.8661672e+00   4.2327578e+00   2.6573893e+00   6.0725725e-01   2.6633209e+00   1.7222058e+00   2.5939799e+00   1.1664463e+00   2.6821825e+00   2.5963941e+00   1.3509199e+00   1.7816323e+00   1.7046308e+00   2.1381589e+00   2.1542571e+00   4.2222578e+00   1.7881987e+00   1.2473306e+00   1.0083490e+00   2.8478148e+00   2.9960208e+00   2.0583207e+00   1.7939407e+00   2.3128527e+00   2.4854841e+00   2.4090630e+00   1.4110819e+00   2.6669716e+00   2.9270626e+00   2.1822548e+00   9.7289027e-01   1.9265423e+00   2.9135583e+00   1.8510296e+00   1.1608422e+00   9.5483435e-01   6.7975587e-01   9.6424206e-01   1.8685422e+00   6.9420840e-01   1.8699153e-01   2.6643250e-01   7.6880092e-01   1.4668684e+00   4.7680727e-01   2.1966727e+00   1.2150638e+00   2.3282955e+00   1.3855601e+00   1.8709248e+00   2.9899796e+00   1.5396352e+00   2.5003659e+00   2.1099656e+00   3.0668593e+00   1.5989333e+00   1.5788417e+00   1.9566602e+00   1.5639220e+00   1.6339738e+00   1.8236402e+00   1.4967013e+00   3.6603010e+00   3.3937895e+00   1.9915789e+00   2.2840141e+00   1.1223478e+00   3.1075626e+00   1.3520885e+00   2.0407191e+00   2.3526669e+00   1.1508346e+00   9.9970980e-01   1.7227103e+00   2.1946041e+00   2.6155078e+00   3.6958832e+00   1.8054416e+00   1.1477199e+00   1.3984076e+00   3.0713671e+00   2.0894840e+00   1.4301682e+00   9.0552938e-01   2.0395038e+00   2.1489811e+00   2.1344915e+00   1.2150638e+00   2.2517887e+00   2.3533226e+00   1.9673072e+00   1.7095802e+00   1.5528301e+00   1.9068051e+00   9.3899770e-01   3.4893361e-01   1.4098163e+00   4.4901474e-01   9.4301660e-01   4.9009568e-01   1.1908452e+00   9.6032771e-01   1.2627589e+00   7.8945238e-01   7.3502408e-01   2.8451486e+00   1.1622402e+00   2.7058576e+00   1.7424022e+00   2.2846522e+00   3.3213689e+00   9.3810350e-01   2.7757276e+00   1.8894571e+00   3.8131048e+00   2.3010216e+00   1.5984421e+00   2.3698153e+00   1.1049324e+00   1.7539088e+00   2.4591578e+00   1.9849730e+00   4.4474865e+00   3.3956070e+00   1.1104964e+00   2.8478148e+00   1.2628565e+00   3.2741783e+00   1.3548265e+00   2.7443454e+00   2.9214972e+00   1.3520885e+00   1.5950569e+00   1.8924015e+00   2.5961001e+00   2.7889301e+00   4.4811770e+00   1.9680122e+00   1.3672690e+00   1.1906665e+00   3.3943858e+00   2.8533575e+00   2.0610968e+00   1.5261646e+00   2.5498486e+00   2.6295980e+00   2.6227721e+00   1.1622402e+00   2.8191421e+00   2.9841287e+00   2.3684093e+00   1.3684638e+00   2.0228721e+00   2.7146999e+00   1.5430544e+00   1.2073068e+00   4.2737382e-01   1.1404637e+00   3.1271814e-01   9.6032771e-01   7.5303835e-01   1.1016806e+00   9.6606527e-01   5.6318359e-01   2.6951278e+00   1.0877340e+00   2.5880472e+00   1.5788417e+00   2.1577755e+00   3.1981141e+00   1.0053189e+00   2.6422640e+00   1.8441670e+00   3.6556493e+00   2.1516272e+00   1.5283932e+00   2.2572409e+00   1.1515368e+00   1.7244934e+00   2.3310687e+00   1.8210464e+00   4.2584241e+00   3.3382181e+00   1.2189366e+00   2.7191331e+00   1.1859692e+00   3.1732334e+00   1.2980649e+00   2.5768210e+00   2.7513616e+00   1.2636762e+00   1.4403062e+00   1.8020431e+00   2.4433699e+00   2.6920515e+00   4.2945779e+00   1.8903935e+00   1.2074964e+00   1.0277379e+00   3.3038558e+00   2.6967685e+00   1.8755883e+00   1.3730080e+00   2.4290237e+00   2.5228632e+00   2.5343900e+00   1.0877340e+00   2.6795155e+00   2.8549884e+00   2.2878474e+00   1.3941000e+00   1.9010194e+00   2.5529515e+00   1.3637808e+00   1.0801003e+00   2.2778358e+00   9.5491981e-01   5.9448670e-01   5.9589853e-01   3.3742167e-01   1.9403546e+00   7.3727571e-01   1.8011631e+00   1.0580730e+00   1.6859882e+00   8.4110582e-01   1.3396881e+00   2.3254107e+00   1.8940865e+00   1.8320164e+00   1.6099822e+00   2.5455416e+00   1.0698235e+00   1.0938968e+00   1.3476330e+00   1.4941922e+00   1.4633215e+00   1.3755629e+00   8.7649478e-01   3.1069376e+00   2.7702855e+00   1.8674396e+00   1.7104256e+00   1.1065179e+00   2.4455843e+00   9.1688392e-01   1.4945651e+00   1.6975565e+00   7.1757390e-01   5.5102439e-01   1.2274184e+00   1.5152116e+00   1.9568855e+00   3.1286065e+00   1.3281960e+00   6.0709980e-01   1.0827099e+00   2.4180452e+00   1.7168537e+00   8.4814328e-01   5.4968254e-01   1.4259927e+00   1.6175327e+00   1.5676792e+00   1.0580730e+00   1.6914438e+00   1.8627823e+00   1.4252775e+00   1.3670172e+00   9.8340962e-01   1.5690664e+00   6.4292875e-01   1.2799022e+00   3.7622328e-01   9.3727156e-01   7.2340544e-01   8.7070822e-01   1.0517510e+00   4.9772204e-01   2.6753497e+00   1.1327780e+00   2.4219935e+00   1.5112031e+00   2.0792734e+00   3.0229728e+00   1.3206164e+00   2.4652397e+00   1.7009790e+00   3.5349296e+00   2.0290396e+00   1.4008516e+00   2.1030738e+00   1.2197800e+00   1.7532536e+00   2.2495068e+00   1.7048463e+00   4.1210195e+00   3.1691829e+00   1.1769133e+00   2.5856062e+00   1.2767751e+00   2.9863081e+00   1.1384575e+00   2.4711712e+00   2.5838439e+00   1.1268523e+00   1.3640383e+00   1.7178039e+00   2.2416335e+00   2.4908014e+00   4.1279448e+00   1.8102703e+00   1.0585628e+00   1.0110609e+00   3.0999848e+00   2.6577347e+00   1.7876312e+00   1.3164631e+00   2.2615790e+00   2.4095273e+00   2.3580977e+00   1.1327780e+00   2.5710650e+00   2.7600070e+00   2.1383264e+00   1.2571099e+00   1.7683536e+00   2.5188615e+00   1.3683626e+00   1.3381984e+00   1.9104439e+00   1.7447553e+00   2.1191178e+00   5.2290002e-01   1.5506355e+00   3.7401310e+00   2.0532672e+00   3.6450987e+00   2.6791066e+00   3.2198971e+00   4.2474168e+00   1.2374249e+00   3.6904578e+00   2.7448024e+00   4.7359552e+00   3.2167523e+00   2.5268732e+00   3.3111493e+00   1.8901504e+00   2.5824715e+00   3.3694826e+00   2.9225385e+00   5.3651760e+00   4.2632085e+00   1.6938497e+00   3.7848480e+00   2.0962051e+00   4.1703198e+00   2.2884248e+00   3.6689921e+00   3.8480511e+00   2.2915999e+00   2.5084155e+00   2.8222270e+00   3.5057930e+00   3.6931154e+00   5.3885667e+00   2.8913445e+00   2.2944283e+00   2.0536056e+00   4.3194837e+00   3.7370068e+00   2.9859935e+00   2.4261724e+00   3.4875553e+00   3.5613793e+00   3.5512500e+00   2.0532672e+00   3.7558873e+00   3.9047630e+00   3.2988390e+00   2.2352837e+00   2.9604482e+00   3.5852990e+00   2.4345890e+00   7.1446962e-01   4.7680727e-01   8.6080744e-01   1.0528937e+00   2.6643250e-01   2.4784392e+00   9.6779954e-01   2.4056700e+00   1.4093245e+00   1.9680122e+00   3.0432377e+00   1.1095018e+00   2.5046513e+00   1.7969297e+00   3.4167115e+00   1.9006720e+00   1.3928921e+00   2.0543866e+00   1.1288261e+00   1.5650139e+00   2.0901630e+00   1.6223748e+00   4.0330923e+00   3.2470423e+00   1.3554912e+00   2.4968262e+00   1.0256272e+00   3.0550867e+00   1.1407226e+00   2.3454418e+00   2.5560105e+00   1.0597600e+00   1.1958054e+00   1.6477280e+00   2.2779375e+00   2.5604758e+00   4.0677826e+00   1.7340403e+00   1.0472149e+00   1.0317636e+00   3.1283758e+00   2.4552133e+00   1.6602736e+00   1.1211328e+00   2.2084219e+00   2.3071243e+00   2.3006257e+00   9.6779954e-01   2.4647768e+00   2.6219630e+00   2.0691920e+00   1.3232765e+00   1.6800415e+00   2.3045354e+00   1.1399118e+00   2.6525508e-01   6.6194168e-01   1.5279052e+00   4.8284931e-01   2.2240009e+00   1.2628565e+00   2.2754107e+00   1.3512603e+00   1.8635082e+00   2.9164540e+00   1.6496295e+00   2.4127395e+00   2.0563471e+00   3.0426144e+00   1.5827764e+00   1.5566996e+00   1.9230842e+00   1.6230251e+00   1.7204639e+00   1.8421714e+00   1.4471806e+00   3.6003163e+00   3.3322323e+00   1.9737130e+00   2.2612204e+00   1.2180372e+00   3.0253495e+00   1.3338820e+00   2.0126070e+00   2.2700141e+00   1.1450371e+00   1.0044165e+00   1.7168897e+00   2.0924575e+00   2.5354258e+00   3.6216411e+00   1.8094028e+00   1.0735412e+00   1.3351581e+00   3.0117528e+00   2.1161544e+00   1.3888000e+00   9.3005809e-01   2.0016409e+00   2.1479330e+00   2.1191972e+00   1.2628565e+00   2.2323235e+00   2.3582915e+00   1.9639632e+00   1.7034312e+00   1.5340961e+00   1.9379753e+00   9.6779954e-01   6.0647055e-01   1.3810470e+00   2.3749211e-01   2.2111682e+00   1.0514970e+00   2.2223402e+00   1.2585091e+00   1.7887495e+00   2.8752401e+00   1.4450035e+00   2.3620441e+00   1.8870562e+00   3.0854059e+00   1.5854288e+00   1.3907384e+00   1.8599878e+00   1.3776606e+00   1.5509730e+00   1.8163092e+00   1.3995189e+00   3.6797126e+00   3.2203837e+00   1.7354649e+00   2.2402012e+00   1.0327124e+00   2.9556082e+00   1.1508346e+00   2.0324938e+00   2.2869296e+00   9.8115739e-01   9.3443769e-01   1.5799528e+00   2.0763861e+00   2.4587811e+00   3.7098479e+00   1.6697722e+00   9.5240225e-01   1.1656779e+00   2.9602833e+00   2.1358640e+00   1.3782117e+00   8.5400786e-01   1.9683111e+00   2.0924338e+00   2.0712315e+00   1.0514970e+00   2.2110297e+00   2.3461934e+00   1.8840843e+00   1.4831574e+00   1.4659783e+00   1.9682209e+00   8.9496218e-01   1.7964452e+00   6.5622658e-01   2.0655284e+00   1.1268523e+00   1.7764179e+00   9.9332012e-01   1.5158960e+00   2.3895003e+00   1.8982283e+00   1.8651393e+00   1.5387077e+00   2.7528000e+00   1.2871947e+00   1.1001946e+00   1.4627474e+00   1.4880729e+00   1.6030181e+00   1.6047598e+00   1.0374207e+00   3.2910073e+00   2.7655862e+00   1.7002168e+00   1.8814596e+00   1.2390194e+00   2.4548042e+00   8.7876634e-01   1.7158367e+00   1.8151170e+00   7.5016118e-01   7.8272551e-01   1.3241046e+00   1.5455843e+00   1.9524619e+00   3.2834453e+00   1.4300844e+00   5.8483448e-01   1.0263139e+00   2.4682518e+00   1.9911692e+00   1.0783755e+00   7.8808432e-01   1.5539983e+00   1.7882304e+00   1.6881750e+00   1.1268523e+00   1.8822939e+00   2.0779047e+00   1.5475657e+00   1.2810704e+00   1.1339991e+00   1.8534885e+00   9.0513514e-01   1.2087510e+00   3.4293561e+00   1.8554780e+00   3.4031864e+00   2.4420991e+00   2.9637920e+00   4.0403658e+00   1.1828717e+00   3.4998500e+00   2.6632870e+00   4.3954130e+00   2.8761203e+00   2.3399831e+00   3.0445122e+00   1.7890328e+00   2.3476777e+00   3.0401775e+00   2.6527529e+00   5.0321758e+00   4.1557153e+00   1.7943181e+00   3.4850530e+00   1.8421879e+00   4.0156620e+00   2.0769537e+00   3.3460838e+00   3.5735182e+00   2.0311110e+00   2.1883894e+00   2.6137665e+00   3.2724268e+00   3.5184202e+00   5.0524110e+00   2.6818545e+00   2.0664108e+00   1.9589565e+00   4.0923995e+00   3.3884524e+00   2.6885740e+00   2.0959739e+00   3.1948685e+00   3.2743590e+00   3.2448452e+00   1.8554780e+00   3.4633688e+00   3.5839347e+00   3.0150212e+00   2.1174980e+00   2.6708841e+00   3.2242395e+00   2.1262653e+00   2.3423978e+00   1.0035466e+00   2.2827159e+00   1.3153660e+00   1.8615039e+00   2.9298417e+00   1.3184035e+00   2.4022001e+00   1.8151170e+00   3.2315412e+00   1.7166676e+00   1.3595814e+00   1.9250594e+00   1.2570691e+00   1.5534985e+00   1.9352496e+00   1.4849081e+00   3.8359772e+00   3.2064915e+00   1.5410939e+00   2.3431625e+00   1.0302848e+00   2.9742645e+00   1.1013771e+00   2.1700970e+00   2.3919091e+00   9.7531402e-01   1.0396764e+00   1.5925492e+00   2.1393811e+00   2.4733960e+00   3.8624002e+00   1.6816960e+00   9.5650957e-01   1.0890388e+00   3.0080097e+00   2.2891398e+00   1.5007156e+00   9.6470639e-01   2.0543866e+00   2.1765531e+00   2.1487165e+00   1.0035466e+00   2.3180617e+00   2.4663563e+00   1.9433990e+00   1.3718709e+00   1.5414664e+00   2.1305612e+00   1.0107221e+00   1.7770053e+00   1.3000021e+00   1.3205171e+00   8.3930091e-01   1.8258497e+00   2.8432746e+00   1.7831595e+00   2.1193624e+00   1.2896554e+00   8.9496218e-01   1.6446727e+00   1.0946825e+00   2.1632524e+00   1.4041749e+00   5.4207852e-01   1.2077572e+00   2.1213447e+00   2.4069921e+00   2.9335119e+00   8.2206766e-01   1.6918279e+00   2.1851365e+00   1.7733720e+00   7.3278119e-01   1.4407642e+00   1.6273345e+00   1.3293020e+00   1.2924610e+00   1.7503171e+00   1.9276214e+00   2.3545376e+00   1.2450968e+00   1.8184976e+00   2.1894327e+00   1.8463545e+00   3.4893361e-01   1.0719022e+00   1.3834169e+00   1.0621362e+00   7.1740234e-01   1.0327832e+00   1.7770053e+00   6.9976890e-01   5.1210327e-01   9.9313181e-01   2.0841099e+00   1.0825311e+00   5.0208681e-01   1.3466860e+00   1.7937749e+00   8.2148003e-01   1.2268833e+00   2.4485240e+00   1.2563297e+00   1.9934469e+00   1.2524426e+00   2.8471336e+00   1.4358042e+00   7.3339246e-01   1.4342819e+00   4.9772204e-01   6.9457760e-01   1.4636741e+00   1.1233354e+00   3.5605638e+00   2.5755365e+00   1.2907457e+00   1.8667489e+00   3.7622328e-01   2.4814136e+00   6.2818221e-01   1.8112028e+00   2.1131807e+00   5.7672351e-01   7.9999102e-01   8.5275415e-01   1.9102507e+00   2.0267836e+00   3.6643554e+00   9.0168685e-01   8.3216780e-01   8.3306409e-01   2.5178144e+00   1.8656026e+00   1.2019259e+00   7.6362786e-01   1.6472011e+00   1.5943283e+00   1.7001179e+00   0.0000000e+00   1.8078806e+00   1.9570111e+00   1.3920954e+00   7.6195008e-01   1.1016806e+00   1.7729341e+00   7.1446962e-01   1.0816610e+00   7.3851064e-01   7.2248857e-01   3.0483776e+00   5.6342615e-01   1.3118081e+00   1.4889605e+00   9.8006369e-01   1.1737270e+00   4.2737382e-01   2.1131807e+00   1.7428500e+00   1.0543640e+00   8.5494999e-01   2.0376324e+00   1.3288928e+00   2.4590893e+00   5.9382214e-01   1.9576761e+00   9.8006369e-01   1.3739792e+00   8.5141186e-01   6.2055338e-01   1.3918500e+00   1.3907270e+00   9.7789352e-01   6.6861320e-01   6.5233704e-01   2.1059482e+00   9.8663349e-01   1.4035018e+00   1.7831595e+00   7.7880944e-01   1.4027992e+00   9.8677196e-01   1.5191564e+00   4.3798311e-01   6.8554305e-01   6.2111408e-01   1.7937749e+00   6.4241342e-01   9.9981032e-01   6.7780188e-01   1.6099640e+00   8.3640969e-01   1.4769275e+00   1.5684930e+00   6.3173774e-01   1.7302001e+00   2.0286216e+00   1.2711306e+00   1.0474897e+00   2.1700788e+00   8.2827027e-01   5.2290002e-01   7.5863433e-01   1.2491511e+00   1.0565061e+00   9.7542502e-01   3.3872939e-01   2.7982543e+00   2.0758695e+00   1.7342859e+00   1.1984110e+00   9.9693045e-01   1.8354727e+00   6.0840510e-01   1.1145077e+00   1.3082023e+00   5.2283051e-01   5.1857575e-01   4.7149050e-01   1.1471723e+00   1.3839439e+00   2.8837687e+00   5.8522871e-01   5.3667800e-01   9.0098101e-01   1.8496383e+00   1.3956631e+00   4.8016385e-01   6.2451737e-01   9.5139638e-01   1.0316097e+00   1.1168387e+00   8.2148003e-01   1.1408175e+00   1.3888569e+00   8.7588404e-01   9.9189360e-01   4.8124784e-01   1.3365773e+00   6.0566865e-01   1.4097462e+00   2.4566860e+00   1.1582635e+00   1.2895008e+00   1.6771691e+00   6.6244727e-01   8.5330525e-01   4.2110953e-01   1.5929148e+00   1.0739839e+00   5.6992880e-01   5.5102439e-01   2.4009228e+00   1.8321979e+00   2.1944657e+00   6.8299624e-01   1.3125970e+00   1.6253273e+00   1.0353506e+00   7.4661256e-01   1.1022402e+00   9.6950963e-01   8.7649478e-01   5.0731024e-01   1.1544356e+00   1.2559800e+00   2.5390784e+00   4.9009568e-01   1.1268617e+00   1.4819274e+00   1.4649720e+00   9.9544409e-01   6.0942760e-01   9.8006526e-01   5.9589853e-01   4.3937875e-01   6.7904052e-01   1.2268833e+00   6.0365341e-01   8.3354038e-01   4.3719837e-01   1.3221954e+00   4.2932160e-01   1.0251165e+00   9.7833010e-01   3.6949435e+00   6.0653347e-01   1.6944472e+00   1.5821553e+00   1.6484241e+00   1.7861438e+00   1.1497964e+00   2.7265330e+00   2.4114658e+00   1.7100754e+00   1.5191564e+00   1.8544941e+00   9.8143688e-01   2.9288318e+00   1.1208167e+00   2.6441923e+00   4.9772204e-01   2.0065422e+00   1.3857067e+00   8.4632640e-01   2.0655380e+00   2.0890644e+00   1.6229726e+00   9.3175410e-01   6.4813570e-01   1.8882412e+00   1.6282537e+00   2.0045623e+00   2.3010727e+00   4.0443437e-01   1.9471640e+00   1.6420881e+00   2.2200703e+00   1.1092092e+00   1.3077539e+00   1.2486828e+00   2.4485240e+00   1.1714086e+00   1.4815200e+00   1.3709657e+00   2.1645801e+00   1.5528645e+00   2.0592947e+00   2.2565403e+00   3.2107953e+00   2.2989490e+00   4.0089941e+00   2.5709804e+00   1.9412285e+00   2.6814987e+00   1.0808305e+00   1.6177026e+00   2.5906314e+00   2.3241321e+00   4.7335798e+00   3.7356640e+00   1.5467170e+00   3.0855313e+00   1.1828955e+00   3.6907456e+00   1.7719327e+00   2.9776826e+00   3.3258154e+00   1.7290027e+00   1.8703975e+00   2.1032002e+00   3.0991288e+00   3.2379874e+00   4.8403184e+00   2.1396216e+00   1.8765527e+00   1.6420881e+00   3.7688016e+00   2.8977291e+00   2.3525703e+00   1.7721385e+00   2.8780663e+00   2.8053505e+00   2.9124074e+00   1.2563297e+00   3.0197298e+00   3.1129968e+00   2.6135061e+00   1.7341866e+00   2.3184326e+00   2.7661123e+00   1.7090768e+00   1.2067996e+00   1.8641580e+00   1.3940244e+00   1.3162189e+00   8.8198158e-01   2.2794791e+00   2.1012392e+00   1.5525661e+00   1.0918469e+00   2.2063254e+00   1.1211328e+00   2.4017426e+00   1.1211328e+00   2.2284888e+00   6.3765570e-01   1.5168126e+00   1.2830542e+00   7.2263841e-01   1.5939137e+00   1.6681833e+00   1.2435436e+00   4.6557224e-01   3.1271814e-01   2.2147971e+00   1.2909648e+00   1.4589882e+00   1.7351918e+00   8.5359653e-01   1.8877628e+00   1.2647627e+00   1.8001617e+00   9.2780124e-01   1.2301583e+00   1.1566759e+00   1.9934469e+00   1.1506301e+00   1.5274241e+00   1.1815770e+00   1.6939440e+00   1.2016246e+00   1.9452063e+00   1.8368886e+00   2.7696320e+00   1.7002168e+00   6.6444642e-01   1.2360344e+00   1.3162958e+00   1.5606124e+00   1.8019802e+00   1.1903794e+00   3.3139779e+00   1.5262653e+00   1.2463647e+00   1.7598642e+00   1.6038123e+00   1.5053088e+00   8.4040822e-01   1.8873059e+00   1.7273593e+00   1.0791305e+00   1.4542898e+00   8.8167165e-01   1.3277924e+00   1.1132823e+00   3.3576107e+00   9.4738284e-01   1.0119180e+00   9.3046944e-01   1.8017473e+00   2.2743623e+00   1.4404916e+00   1.5380438e+00   1.4761813e+00   1.5955619e+00   1.5999471e+00   1.2524426e+00   1.7473897e+00   2.0612423e+00   1.3691763e+00   6.7534282e-01   1.2539581e+00   2.2701663e+00   1.5558007e+00   1.5218782e+00   2.4628184e+00   1.5932824e+00   3.2458126e+00   2.5692387e+00   1.4348047e+00   1.8937847e+00   9.2060977e-01   2.4408782e+00   3.8250534e+00   1.0499398e+00   2.8336242e+00   2.0769357e+00   2.6064495e+00   1.0813975e+00   1.3021456e+00   2.4993477e+00   2.2323451e+00   2.1662332e+00   1.8260680e+00   2.0200580e+00   1.1770826e+00   2.1383117e+00   2.5736499e+00   3.0399892e+00   1.5323598e+00   1.2212784e+00   1.7944590e+00   2.3235953e+00   1.3759094e+00   1.3385913e+00   1.3604806e+00   2.8471336e+00   1.0797751e+00   9.4588685e-01   1.6150266e+00   2.9366827e+00   1.8217819e+00   1.3773939e+00   2.3541561e+00   1.1723315e+00   6.4232366e-01   1.8822595e+00   1.3566020e+00   4.2656951e-01   5.7691891e-01   2.2149281e+00   2.2825823e+00   2.4730728e+00   7.0958226e-01   1.4300979e+00   1.9425292e+00   1.2122797e+00   4.9430028e-01   1.0215032e+00   1.0391769e+00   7.2638147e-01   9.8137813e-01   1.1659675e+00   1.5397131e+00   2.3056726e+00   1.0072799e+00   1.1569911e+00   1.6871910e+00   1.6699010e+00   7.9127668e-01   4.3341454e-01   8.2155022e-01   5.7672351e-01   6.8304299e-01   6.6412342e-01   1.4358042e+00   7.0097130e-01   8.1019167e-01   6.5485710e-01   1.6386105e+00   4.6472955e-01   7.2626021e-01   8.9802947e-01   8.9083207e-01   9.8663349e-01   1.0101003e+00   1.2666796e+00   7.2340544e-01   3.1120413e+00   1.9012831e+00   1.3662822e+00   1.4214310e+00   1.0271885e+00   1.7789322e+00   2.8835410e-01   1.4717950e+00   1.5613089e+00   4.5716421e-01   8.2373020e-01   3.8830315e-01   1.2833190e+00   1.3103990e+00   3.1817011e+00   4.8644514e-01   5.9610506e-01   8.0162421e-01   1.8503155e+00   1.7547273e+00   9.3865015e-01   8.9973730e-01   1.1346946e+00   1.2001902e+00   1.2260535e+00   7.3339246e-01   1.3976606e+00   1.6479131e+00   9.4228329e-01   5.0621589e-01   7.1671402e-01   1.7153988e+00   9.3451915e-01   1.7865803e+00   1.3700593e+00   7.2638147e-01   5.3458689e-01   2.2505972e+00   1.6524504e+00   2.2440955e+00   5.5576380e-01   1.5638518e+00   1.3688560e+00   1.0552128e+00   7.1143905e-01   8.2518769e-01   1.0245496e+00   9.9235657e-01   6.7030885e-01   8.3156325e-01   9.6025744e-01   2.3337038e+00   6.8299624e-01   1.1166319e+00   1.5524781e+00   1.1685901e+00   1.1719135e+00   6.6412342e-01   1.1159239e+00   2.6643250e-01   4.7488466e-01   4.3341454e-01   1.4342819e+00   5.7691891e-01   8.8366512e-01   3.3492202e-01   1.3576953e+00   4.2110953e-01   1.2033093e+00   1.1777985e+00   8.7819565e-01   1.8719964e+00   1.5530949e+00   3.9773949e+00   2.6834336e+00   1.0194189e+00   2.2401597e+00   7.0463400e-01   2.6908242e+00   8.9981614e-01   2.2443541e+00   2.5055082e+00   9.6168382e-01   1.2786676e+00   1.1515752e+00   2.2564140e+00   2.2581551e+00   4.0837847e+00   1.1737270e+00   1.1984110e+00   1.0100915e+00   2.7760526e+00   2.2855612e+00   1.6668656e+00   1.2419907e+00   2.0207624e+00   1.9399964e+00   2.0427084e+00   4.9772204e-01   2.1876191e+00   2.3343528e+00   1.7191609e+00   7.3633268e-01   1.5086315e+00   2.2088314e+00   1.2082987e+00   1.1857824e+00   1.2636762e+00   3.3874427e+00   2.5564450e+00   1.8349829e+00   1.6578570e+00   5.8813453e-01   2.5222553e+00   1.0240850e+00   1.6676963e+00   2.1419072e+00   9.3827844e-01   9.8741108e-01   8.7169308e-01   2.0802526e+00   2.1175243e+00   3.5451448e+00   8.2097460e-01   1.3248988e+00   1.4633215e+00   2.4116155e+00   1.5361480e+00   1.2935378e+00   9.5818710e-01   1.5578153e+00   1.3192053e+00   1.5035025e+00   6.9457760e-01   1.5912796e+00   1.6259926e+00   1.1892978e+00   1.1294987e+00   1.0978602e+00   1.4813076e+00   9.1948999e-01   8.1819403e-01   2.2419326e+00   2.2807501e+00   2.5846003e+00   6.4497192e-01   1.4107908e+00   2.0247998e+00   1.3509199e+00   5.5183182e-01   1.2328847e+00   1.1911894e+00   9.0810653e-01   9.7397874e-01   1.4379681e+00   1.6702453e+00   2.3957048e+00   9.4716675e-01   1.4061835e+00   1.8616601e+00   1.6979390e+00   5.2290002e-01   7.0376604e-01   9.7757519e-01   6.9976890e-01   4.8012872e-01   6.5622658e-01   1.4636741e+00   5.9074344e-01   5.5183182e-01   5.8926015e-01   1.7101283e+00   6.2055338e-01   5.2374483e-01   1.0096792e+00   2.4983023e+00   2.0024830e+00   2.0009022e+00   9.4244262e-01   1.2563297e+00   1.6864324e+00   8.0788963e-01   8.3930091e-01   1.0038277e+00   7.0810362e-01   5.9074344e-01   6.2055338e-01   9.0121804e-01   1.2356595e+00   2.5673851e+00   7.1082758e-01   6.9066640e-01   1.1671832e+00   1.6263298e+00   1.2372185e+00   2.6033464e-01   7.2248857e-01   6.6653737e-01   8.5606908e-01   8.7588404e-01   1.1233354e+00   9.0810653e-01   1.1795009e+00   7.1867388e-01   1.2188386e+00   3.1239235e-01   1.1894366e+00   7.5921691e-01   2.7729820e+00   4.4273104e+00   1.7851048e+00   3.5860697e+00   2.3211451e+00   3.2572853e+00   1.7681972e+00   1.6466818e+00   3.1677578e+00   2.9074188e+00   2.8617360e+00   2.1557081e+00   2.3917474e+00   3.9487224e-01   2.8587345e+00   3.1370513e+00   3.5889276e+00   1.8806886e+00   2.0412779e+00   2.4100318e+00   3.0088533e+00   2.0247746e+00   2.1265123e+00   2.0926464e+00   3.5605638e+00   1.8217810e+00   1.8066213e+00   2.3669524e+00   3.5958907e+00   2.5091153e+00   2.1661990e+00   3.0374915e+00   2.7063291e+00   1.8195505e+00   2.8431665e+00   6.1655427e-01   2.1507483e+00   2.1438129e+00   1.7230435e+00   2.3108260e+00   2.5097011e+00   1.8135469e+00   1.5638528e+00   9.0791603e-01   2.8200316e+00   1.7992895e+00   2.2827159e+00   2.3805592e+00   1.0279218e+00   2.6120156e+00   2.2030084e+00   2.6289851e+00   1.7477225e+00   1.8297977e+00   1.8176515e+00   2.5755365e+00   1.8486085e+00   2.1438129e+00   1.7993706e+00   2.0846858e+00   2.0084695e+00   2.7218129e+00   2.6544629e+00   2.7850656e+00   1.6064410e+00   2.7362607e+00   1.2723027e+00   2.8153418e+00   2.8097763e+00   1.4630671e+00   1.8911656e+00   1.6976298e+00   2.3931138e+00   2.3316649e+00   4.4654565e+00   1.7621453e+00   1.4315442e+00   9.9921804e-01   3.0176875e+00   3.0491088e+00   2.1855415e+00   1.8898572e+00   2.4817766e+00   2.5552736e+00   2.5674482e+00   1.2907457e+00   2.7588865e+00   3.0041677e+00   2.2870308e+00   9.4057729e-01   2.0520412e+00   2.9779211e+00   1.8911656e+00   1.9172403e+00   1.5033800e+00   1.5778466e+00   4.2450569e-01   7.6773108e-01   1.5016932e+00   1.3345218e+00   1.1346946e+00   1.0902078e+00   1.2416734e+00   1.9196757e+00   1.1117653e+00   1.6095257e+00   2.0596575e+00   1.0943114e+00   8.7072347e-01   9.2729770e-01   1.4434261e+00   3.8830315e-01   3.6319073e-01   4.1088655e-01   1.8667489e+00   1.6562722e-01   4.2450569e-01   5.9279023e-01   1.8877121e+00   8.2518769e-01   9.7789352e-01   1.4886316e+00   2.7335291e+00   9.1459005e-01   1.8213026e+00   2.2454046e+00   7.7259801e-01   8.0376328e-01   1.0525811e+00   2.1168634e+00   2.2814168e+00   3.7089872e+00   1.0767714e+00   1.0755005e+00   1.1631285e+00   2.6946772e+00   1.7497347e+00   1.2634840e+00   7.1971771e-01   1.7438018e+00   1.6356845e+00   1.7637315e+00   3.7622328e-01   1.8511762e+00   1.9311191e+00   1.4699785e+00   1.1016806e+00   1.1928774e+00   1.6354514e+00   6.5233704e-01   2.0052498e+00   1.7681972e+00   1.2007144e+00   2.1235855e+00   2.2484715e+00   1.6942544e+00   1.0546367e+00   5.1386894e-01   2.3251407e+00   1.7093881e+00   2.0273081e+00   2.2255325e+00   6.9493020e-01   2.3316649e+00   1.8640280e+00   2.3781796e+00   1.4043141e+00   1.6126002e+00   1.5456113e+00   2.4814136e+00   1.5467508e+00   1.8811164e+00   1.5963715e+00   2.0694478e+00   1.7422855e+00   2.4276706e+00   2.4143104e+00   1.5837613e+00   1.7028549e+00   2.6643250e-01   7.3283576e-01   6.1619693e-01   1.4102704e+00   1.5157660e+00   3.3107238e+00   7.0702759e-01   4.6964680e-01   7.3731902e-01   2.0564363e+00   1.8389778e+00   9.9058911e-01   7.8305765e-01   1.2692102e+00   1.3637808e+00   1.3483908e+00   6.2818221e-01   1.5635907e+00   1.7874832e+00   1.0817627e+00   4.8284931e-01   7.9664122e-01   1.7693113e+00   8.5141186e-01   7.7538587e-01   1.4522625e+00   1.1678338e+00   1.2100516e+00   1.1294987e+00   1.4712028e+00   1.8985225e+00   1.2171256e+00   1.5155373e+00   1.9939611e+00   1.4342819e+00   6.6653737e-01   7.1511757e-01   1.2680818e+00   5.4772790e-01   6.0868934e-01   6.7484334e-01   1.8112028e+00   3.8639663e-01   5.2413598e-01   7.9227302e-01   1.9656037e+00   7.9656884e-01   7.1789533e-01   1.2970125e+00   1.6649242e+00   1.5382030e+00   1.4107908e+00   5.4248468e-01   9.6424206e-01   1.6581712e+00   1.4527629e+00   1.5643033e+00   2.0014001e+00   1.0048958e+00   1.4365091e+00   1.0328871e+00   1.6659456e+00   6.7424840e-01   1.0427348e+00   9.3481345e-01   2.1131807e+00   8.1596583e-01   1.1349095e+00   1.1009910e+00   2.0312552e+00   1.0961859e+00   1.4886316e+00   1.7139439e+00   4.8016385e-01   6.4687084e-01   1.4356300e+00   1.6309773e+00   3.2287360e+00   7.3391501e-01   4.4499696e-01   8.4121419e-01   2.1133414e+00   1.6592561e+00   8.3333283e-01   5.2066928e-01   1.2097457e+00   1.2911242e+00   1.2850973e+00   5.7672351e-01   1.4812088e+00   1.6720834e+00   1.0285902e+00   7.2340544e-01   6.8124108e-01   1.5683551e+00   6.1067563e-01   8.0990117e-01   1.4468934e+00   1.7768340e+00   2.9867606e+00   8.8098199e-01   6.6217390e-01   1.1327663e+00   2.1506380e+00   1.2980342e+00   5.4779717e-01   1.3340137e-01   1.1051628e+00   1.1634940e+00   1.1952607e+00   7.9999102e-01   1.2953104e+00   1.4320028e+00   9.9155078e-01   1.1867923e+00   5.7526462e-01   1.1726810e+00   2.6680274e-01   1.2602457e+00   1.2678174e+00   2.9703757e+00   1.3103399e-01   8.4439576e-01   1.0887336e+00   1.6811909e+00   1.4435947e+00   7.9778097e-01   8.9789119e-01   9.2528705e-01   8.7435479e-01   9.9613800e-01   8.5275415e-01   1.0871867e+00   1.3186900e+00   6.8124108e-01   8.2317311e-01   5.4397563e-01   1.4334280e+00   9.0121513e-01   6.7419212e-01   2.1234744e+00   1.3330747e+00   1.2524426e+00   1.6423187e+00   1.1112287e+00   1.7731481e+00   1.0412209e+00   1.5779602e+00   8.1552831e-01   1.2367326e+00   1.0877340e+00   1.9102507e+00   1.1360631e+00   1.4957547e+00   1.1495900e+00   1.6944472e+00   1.0511712e+00   1.7894533e+00   1.6403454e+00   2.3936810e+00   1.3012342e+00   1.5364148e+00   1.7852089e+00   7.8659640e-01   2.0467146e+00   1.4387140e+00   1.9055720e+00   1.0341095e+00   1.3049404e+00   1.1996837e+00   2.0267836e+00   1.2898173e+00   1.6473842e+00   1.2092432e+00   1.6223502e+00   1.2928268e+00   2.1087983e+00   1.9576761e+00   2.9790337e+00   3.1661621e+00   3.6343153e+00   1.9094387e+00   2.2505084e+00   2.4932991e+00   3.0919113e+00   2.0983540e+00   2.2774299e+00   2.1822207e+00   3.6643554e+00   1.9784646e+00   2.0041121e+00   2.4741311e+00   3.6564145e+00   2.5932898e+00   2.3540393e+00   3.1383476e+00   9.6758101e-01   1.2012033e+00   1.6658010e+00   1.4135473e+00   8.6985276e-01   9.6249568e-01   9.3451915e-01   8.2380019e-01   9.6993876e-01   9.0168685e-01   1.0632334e+00   1.2723027e+00   6.4232366e-01   8.7376399e-01   5.8942278e-01   1.4153467e+00   9.6559725e-01   6.0709980e-01   2.1192618e+00   1.8400866e+00   8.3619405e-01   7.2626021e-01   1.2848171e+00   1.4775384e+00   1.4500356e+00   8.3216780e-01   1.5874797e+00   1.8427499e+00   1.2442620e+00   8.6985276e-01   8.3878265e-01   1.7484907e+00   7.7500385e-01   2.4608044e+00   2.2758533e+00   1.3186900e+00   1.1601403e+00   1.7655861e+00   1.8899115e+00   1.9324044e+00   8.3306409e-01   2.0122449e+00   2.2830055e+00   1.6787550e+00   8.1019167e-01   1.3243478e+00   2.1959912e+00   1.1244567e+00   1.9511379e+00   1.7500667e+00   2.2774574e+00   1.1011934e+00   1.2684800e+00   1.1435764e+00   2.5178144e+00   1.1861264e+00   1.4342819e+00   1.3109392e+00   2.2026274e+00   1.5858048e+00   2.0711809e+00   2.3400013e+00   1.0557584e+00   1.3438727e+00   1.0821769e+00   8.4383266e-01   1.0493821e+00   1.8656026e+00   7.8957903e-01   5.5399712e-01   1.0737552e+00   2.2030214e+00   1.1115276e+00   2.1119253e-01   1.3352177e+00   6.6627781e-01   7.2272795e-01   8.6751530e-01   9.1936743e-01   1.2019259e+00   8.7588404e-01   1.0946184e+00   8.0162421e-01   1.4236959e+00   4.0664863e-01   9.8463602e-01   6.8496652e-01   1.2266388e+00   1.2615426e+00   1.3010124e+00   7.6362786e-01   1.4014424e+00   1.5148689e+00   1.0932736e+00   1.2210779e+00   6.9618131e-01   1.2059294e+00   2.0855006e-01   4.7509249e-01   3.1239235e-01   1.6472011e+00   4.6557224e-01   7.5810578e-01   4.3937875e-01   1.5999820e+00   5.6262711e-01   1.1233867e+00   1.3019241e+00   3.9472619e-01   1.5943283e+00   3.3742167e-01   4.8284931e-01   3.4893361e-01   1.6410601e+00   6.6154242e-01   9.3451915e-01   1.2980649e+00   1.7001179e+00   5.2283051e-01   6.7484334e-01   3.3872939e-01   1.6485749e+00   6.6653737e-01   1.1055440e+00   1.3931316e+00   1.8078806e+00   1.9570111e+00   1.3920954e+00   7.6195008e-01   1.1016806e+00   1.7729341e+00   7.1446962e-01   3.8639663e-01   6.2027457e-01   1.8723846e+00   8.0990117e-01   9.0447834e-01   1.4243850e+00   7.9227302e-01   2.1007225e+00   1.0230346e+00   7.1789533e-01   1.5391678e+00   1.3603920e+00   4.6137216e-01   1.1083720e+00   1.1686836e+00   1.1908452e+00   2.1561807e+00   1.2583645e+00   1.0722301e+00   7.7259801e-01   1.2001902e+00
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ce80cb1ead3f88bec0fbaf6d48cb4fc584e52168
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-seuclidean-ml.txt
@@ -0,0 +1 @@
+   1.4330520e+01   1.4635426e+01   1.3450855e+01   1.4761140e+01   1.3508642e+01   1.5434417e+01   1.3887693e+01   1.5166776e+01   1.3966038e+01   1.4950451e+01   1.4564587e+01   1.3834201e+01   1.4347008e+01   1.5641962e+01   1.4689053e+01   1.4418720e+01   1.4545856e+01   1.4151822e+01   1.4669017e+01   1.5150750e+01   1.3770166e+01   1.3288969e+01   1.4048191e+01   1.4049959e+01   1.4164158e+01   1.3727834e+01   1.4074687e+01   1.4321303e+01   1.2497330e+01   1.3820273e+01   1.4441030e+01   1.4780222e+01   1.2504339e+01   1.5022245e+01   1.4263650e+01   1.3704507e+01   1.3694385e+01   1.3667517e+01   1.3177468e+01   1.4391931e+01   1.4893903e+01   1.4475753e+01   1.4440707e+01   1.3603096e+01   1.6889651e+01   1.4731174e+01   1.3337775e+01   1.5187532e+01   1.5667271e+01   1.4226037e+01   1.4203554e+01   1.5272898e+01   1.6031460e+01   1.5991549e+01   1.1855060e+01   1.4844776e+01   1.2475182e+01   1.4408126e+01   1.4836870e+01   1.3472986e+01   1.4089281e+01   1.1018298e+01   1.3183296e+01   1.4590802e+01   1.4404230e+01   1.2717623e+01   1.3983283e+01   1.4017133e+01   1.4608005e+01   1.4402553e+01   1.3977803e+01   1.4091040e+01   1.3977459e+01   1.2630449e+01   1.4160109e+01   1.3029417e+01   1.2654432e+01   1.2794946e+01   1.3194978e+01   1.4378745e+01   1.2431908e+01   1.3852651e+01   1.3748358e+01   1.4003568e+01   1.5066681e+01   1.5192826e+01   1.4370013e+01   1.5792545e+01   1.3547546e+01   1.4411543e+01   1.4794215e+01   1.4924312e+01   1.4789153e+01   1.4875055e+01   1.4208537e+01   1.2786148e+01   1.4882476e+01   1.3302010e+01   1.4354774e+01   1.4542129e+01   1.5889633e+01   1.2928185e+01   1.4877868e+01   1.2890902e+01   1.4406165e+01   1.4498123e+01   1.4303273e+01   1.3207002e+01   1.3954732e+01   1.4841248e+01   1.5427799e+01   1.4363463e+01   1.3976277e+01   1.4284878e+01   1.4457991e+01   1.3369469e+01   1.5246610e+01   1.4487573e+01   1.4525176e+01   1.4505865e+01   1.5037347e+01   1.3834927e+01   1.3758988e+01   1.3424987e+01   1.4914766e+01   1.3783923e+01   1.3434291e+01   1.2895927e+01   1.3870360e+01   1.3342977e+01   1.3094322e+01   1.3057847e+01   1.3322375e+01   1.4940650e+01   1.4476829e+01   1.4197503e+01   1.4597035e+01   1.2963234e+01   1.4011414e+01   1.3181409e+01   1.3339615e+01   1.3928735e+01   1.3508015e+01   1.3170749e+01   1.3529133e+01   1.3454724e+01   1.4883437e+01   1.4564565e+01   1.2474313e+01   1.4435790e+01   1.5285703e+01   1.3701736e+01   1.3578312e+01   1.4807311e+01   1.4281072e+01   1.2920213e+01   1.4427803e+01   1.1408611e+01   1.4097334e+01   1.2868115e+01   1.3903683e+01   1.3800332e+01   1.3439339e+01   1.4062651e+01   1.3242107e+01   1.4400424e+01   1.3826132e+01   1.5991146e+01   1.3118258e+01   1.5377390e+01   1.2858378e+01   1.5249567e+01   1.4081585e+01   1.4458052e+01   1.4175623e+01   1.4850069e+01   1.5506668e+01   1.5014770e+01   1.4337030e+01   1.5214705e+01   1.4803729e+01   1.3188675e+01   1.3437739e+01   1.3409394e+01   1.4607386e+01   1.5394271e+01   1.5946451e+01   1.3769364e+01   1.4181208e+01   1.2551765e+01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-spearman-ml.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-spearman-ml.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b50fe3af1912d20aaa737eedc1b6e096a7005876
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/pdist-spearman-ml.txt
@@ -0,0 +1 @@
+   9.3540954e-01   9.7904590e-01   8.6703870e-01   1.1569997e+00   8.7174317e-01   1.0627183e+00   9.1272727e-01   1.1593999e+00   9.7573357e-01   1.0072127e+00   1.0536814e+00   9.6276028e-01   9.7700570e-01   1.1513951e+00   1.0719592e+00   9.2178818e-01   1.0004680e+00   9.3689769e-01   9.8205821e-01   1.0332673e+00   9.4517852e-01   8.9437744e-01   9.7556556e-01   9.0460246e-01   9.7210921e-01   9.2230423e-01   9.9605161e-01   9.6852085e-01   8.4162016e-01   9.6667267e-01   9.7759376e-01   9.9757576e-01   7.6992499e-01   1.0151695e+00   9.8691869e-01   9.0325833e-01   8.6665467e-01   8.8844884e-01   8.4553255e-01   9.7700570e-01   9.5159916e-01   9.8906691e-01   1.0551935e+00   9.1973597e-01   1.3266247e+00   1.0982778e+00   8.4531653e-01   1.0887369e+00   1.0984938e+00   9.9851185e-01   9.0701470e-01   1.0639304e+00   1.2392919e+00   1.1422502e+00   8.1725773e-01   1.1844944e+00   7.8219022e-01   1.0817162e+00   1.2196100e+00   1.0003120e+00   1.0164536e+00   7.0724272e-01   9.7981398e-01   1.1134953e+00   1.0671107e+00   9.3600960e-01   9.9984398e-01   1.0356916e+00   1.1248005e+00   1.0696310e+00   1.0634263e+00   9.6472847e-01   9.9365137e-01   8.5724572e-01   1.1257846e+00   8.9930993e-01   9.4903090e-01   9.0667867e-01   9.1231923e-01   1.0573777e+00   9.0105011e-01   9.5255926e-01   1.0177978e+00   1.0606901e+00   1.1966997e+00   1.0891929e+00   1.0085089e+00   1.2640264e+00   9.3246925e-01   1.0198020e+00   1.2055806e+00   1.1237924e+00   1.1060666e+00   1.0517252e+00   1.0684668e+00   7.6844884e-01   1.0572697e+00   8.7373537e-01   9.6283228e-01   9.9350735e-01   1.2412601e+00   7.6322832e-01   1.0298950e+00   8.6148215e-01   1.0042724e+00   9.7012901e-01   9.3712571e-01   8.5845785e-01   8.5862586e-01   1.0336634e+00   1.0955536e+00   9.5302730e-01   9.8696670e-01   1.0633063e+00   1.0026643e+00   9.6380438e-01   1.1711251e+00   9.9273927e-01   1.0260906e+00   1.0863966e+00   1.0482808e+00   9.0361836e-01   9.2358836e-01   8.7794779e-01   1.2461206e+00   9.2985299e-01   1.0418962e+00   9.4660666e-01   9.5636364e-01   9.0646265e-01   9.9113111e-01   8.3027903e-01   9.3341734e-01   1.1378938e+00   1.0548215e+00   1.0086889e+00   1.1998920e+00   8.6063006e-01   1.0255506e+00   8.4786079e-01   1.0090729e+00   9.2542454e-01   9.5176718e-01   9.3477348e-01   9.0091809e-01   9.6404440e-01   1.1158716e+00   9.9614761e-01   7.7682568e-01   1.0605461e+00   1.0895650e+00   9.0065407e-01   8.7173117e-01   9.9821182e-01   1.2165617e+00   8.6127813e-01   1.1111071e+00   7.9015902e-01   1.0433843e+00   8.6510651e-01   1.0019202e+00   1.0154815e+00   9.4381038e-01   9.8646265e-01   1.0062526e+00   9.7426943e-01   9.8191419e-01   1.3038944e+00   8.6277828e-01   1.0830243e+00   8.6851485e-01   1.1192559e+00   9.9120312e-01   9.6540054e-01   9.1072307e-01   1.1775698e+00   1.1139154e+00   1.1083468e+00   9.9593159e-01   1.0825923e+00   1.1115032e+00   9.7430543e-01   9.5605161e-01   9.2800480e-01   9.4369037e-01   1.1136034e+00   1.1382898e+00   9.5937594e-01   9.8843084e-01   7.4563456e-01
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-bool-data.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-bool-data.txt
new file mode 100644
index 0000000000000000000000000000000000000000..df0d838f517f6c0afd8954ad87bc83886e0e3de4
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-bool-data.txt
@@ -0,0 +1,100 @@
+0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1
+1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1
+0 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 1 0 1
+1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 0 0 0 1 0 0
+1 0 0 0 0 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 0 0
+1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 1
+0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0
+1 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0
+1 1 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1
+1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0
+1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0
+1 1 1 1 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1
+1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1
+0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 1 1
+1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 1 0 0 1 1 0 1 1
+1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 0
+1 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1
+0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 0 0
+1 0 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1
+0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1
+0 1 0 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 0
+1 0 1 0 1 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1 1
+0 0 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0
+0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1
+0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0
+1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0
+1 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1
+0 1 0 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1
+0 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1
+0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 1 0 1 0
+1 1 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1
+0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 0 1
+1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 0 1 0 1
+1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 1 1
+0 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 1 0 0 1 0
+1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 0 0
+0 0 0 0 1 1 1 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0
+0 1 1 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1
+0 1 0 0 1 1 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0
+1 1 0 1 0 0 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1
+0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 1
+0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0
+1 0 1 1 1 1 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0
+1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 1 0 0
+1 0 0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 1 0 0 0 1
+1 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 0 0
+0 1 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 1
+0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 0 0 1 0 1
+1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1
+1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1
+1 1 1 1 0 0 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 1 0 0 0 1 0 1 0 0
+1 0 1 0 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0
+0 1 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0
+0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0
+1 1 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0
+1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1
+0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0
+0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 1 0 0 0 1 0 1 1 0 1 1 1 0 0
+0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 1 0 0 1 0 1 0
+1 0 0 1 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 1
+0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 0
+1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 1 1 0 0 1 0 1 0
+0 1 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1
+1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1
+0 1 0 0 1 1 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1
+0 0 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 0 1 0 1
+0 1 1 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 1 0 0 1 1 1
+1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0
+1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 0 1 1 1 1 1 0
+0 0 0 0 1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0
+1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0 1 1 0
+1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 1
+1 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1
+0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1
+1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 0 1 1
+1 1 0 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0
+1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 0 1 0 1 1 0
+1 1 1 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1
+1 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0
+0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 0
+1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 0 1 0
+1 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1
+1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1
+0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1
+0 1 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 0 0
+0 1 0 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 0 0 1 1 0
+0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0
+1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 0
+1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0
+0 0 0 1 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 1 1 0
+1 0 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0
+0 1 0 0 1 1 1 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1
+0 0 0 1 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 0 0 1 0 1
+1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 1 0
+0 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0
+1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 1 0 0 1
+0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 0
+1 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 0 1 1 0 1 1
+0 0 1 1 1 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1 1 0 0 1
+0 0 0 1 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-double-data.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-double-data.txt
new file mode 100644
index 0000000000000000000000000000000000000000..039ac506f5590f953ffc6598c11197d3fade2bbd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-double-data.txt
@@ -0,0 +1,100 @@
+1.172993630434470589e+02 1.905532343119886605e+02 2.613653823499444115e+02 1.570270816248337269e+02 2.373767637129340642e+02 2.175366144750510671e+02 2.609909144757107242e+02 2.086671686166440622e+02 2.674986450118991002e+02 1.395992762090408235e+02 1.115453060949917159e+02 1.531034842395609701e+02 2.621042034264289668e+02 2.958729454449504033e+02 2.137960368830719062e+02 2.606436280968571282e+02 2.492136530687155869e+02 2.770806237064748530e+02 2.667325121892417883e+02 2.909243437665674037e+02 1.570328417294508085e+02 1.738762543815240917e+02 1.514157955792608163e+02 2.264748814818163396e+02 1.911869834397498380e+02 2.083706054660671043e+02 2.778115921852293013e+02 1.330374814391803397e+02 2.988697222234711717e+02 2.534167825404447001e+02
+2.090964891529778242e+02 1.322006104643973003e+02 1.443415945355371832e+02 2.991388772264980389e+02 1.649302344777914868e+02 2.839528641910463875e+02 1.677159709681393736e+02 2.597553832458208944e+02 2.861055547321268477e+02 1.866431671806918189e+02 2.131812134614140177e+02 1.881465139477683124e+02 1.271865139985419262e+02 1.821608865941132649e+02 2.793653846657656459e+02 1.745982981552271838e+02 2.440893905635109888e+02 1.926469151980868446e+02 2.752453852984189098e+02 1.333479229516146347e+02 1.756311805755703404e+02 2.039367615619088383e+02 2.441861159155101575e+02 2.136111324500645594e+02 2.893808960992043922e+02 2.723220466017930335e+02 2.367879096909125565e+02 2.831541206793258425e+02 2.017643187924728068e+02 1.293072046241175030e+02
+2.311242818257193221e+02 2.180694109009666306e+02 2.728791416531455525e+02 1.239345918565636993e+02 2.885729762050686418e+02 2.082619393005260804e+02 2.331416004257805525e+02 1.003112528445347778e+02 2.796331120515330895e+02 2.804679740148056339e+02 2.466936828597247597e+02 1.422398585800914361e+02 1.312115029632765015e+02 1.324417143647877708e+02 2.161716508991076466e+02 1.791489656100356171e+02 2.239038785146145472e+02 2.456511993086799919e+02 2.885023077068626662e+02 2.127338775308419940e+02 2.468090724782538246e+02 2.704135008577740109e+02 1.144148504575758665e+02 1.641571759150080538e+02 2.473349551308716343e+02 2.366620528761779667e+02 1.208143167141831498e+02 1.403705034199327599e+02 2.061073908129479548e+02 1.482034962693051057e+02
+1.938319500339997035e+02 2.000523826243218650e+02 1.356134735235139317e+02 1.224357428573656250e+02 1.262840705282213918e+02 1.112797762573139977e+02 1.727826315738305993e+02 2.199559683100150664e+02 1.817290208723558180e+02 2.185579898773881951e+02 1.772844462934412491e+02 1.589145011846130728e+02 1.017520743541414703e+02 2.836990856171782980e+02 1.265544072638776640e+02 2.503473341476423855e+02 2.178539278172635534e+02 2.063574432066289432e+02 1.473169457524925861e+02 1.112719632489760784e+02 1.195996070145015722e+02 1.345099678548529312e+02 2.992645259487585463e+02 2.692242364540683752e+02 2.139649193607747861e+02 2.313659165106297451e+02 2.524185025119667785e+02 2.678714004815313388e+02 1.111457754393238702e+02 1.296443575800298902e+02
+1.183944097426736306e+02 2.750477277868330930e+02 1.688558971333346790e+02 1.432283295687057034e+02 2.226043174503911359e+02 1.825124733235978169e+02 1.806485153578007612e+02 2.270256019866706936e+02 2.852913053786990076e+02 2.867562520175486043e+02 2.795056496733417362e+02 1.142488895870292822e+02 1.502985045661773427e+02 2.246907359526948937e+02 2.051158858061974115e+02 2.663351441156772808e+02 2.864853431806749882e+02 2.276548949573071070e+02 2.678087640355958001e+02 2.266463576941352187e+02 1.886763304826383774e+02 1.150603609957262563e+02 1.596187994714221929e+02 1.844565420383776484e+02 1.730173420200940768e+02 1.427940137102308995e+02 1.774757620992130001e+02 2.563086691508434001e+02 1.666317348809653822e+02 1.878143419608473437e+02
+1.642344698640436036e+02 1.591648429561690818e+02 1.561851029939521140e+02 1.854367091922420059e+02 1.494951311500319093e+02 2.443780767043579942e+02 2.741090240793212160e+02 1.519200656263381006e+02 1.391711947382712538e+02 1.482414334940778815e+02 2.574425018646875287e+02 1.455120022089010945e+02 1.620904376421240727e+02 2.098493186451893848e+02 2.377904829227144887e+02 2.881187570801528750e+02 1.785609418793050054e+02 1.500483139796714340e+02 1.697371065898091729e+02 1.824143324642365087e+02 2.329862749140337712e+02 1.372006180078979298e+02 2.250666134242961789e+02 1.760894707637434067e+02 1.874161150869196035e+02 2.860410495381969440e+02 1.539271628213176086e+02 1.051658254213322152e+02 1.501619097950496666e+02 1.205717364486104515e+02
+1.275638286377957371e+02 2.620802183565458563e+02 2.290828196339760723e+02 2.591630015014513333e+02 2.102568650793322149e+02 2.385080320420775593e+02 2.683788150825365619e+02 1.808700201925492763e+02 1.972184450648797451e+02 2.382313686117472287e+02 1.733526990293641177e+02 2.369802981553972074e+02 1.835652530901061823e+02 1.274084560526275141e+02 2.403488205519001326e+02 2.713515297463850402e+02 1.455311801633137065e+02 1.889430214806582171e+02 1.676324321357484735e+02 2.327799977696781184e+02 2.846419393176552148e+02 1.510702433968490936e+02 1.361559014852734606e+02 1.732199851325496525e+02 2.451323003571785364e+02 1.833444866660036894e+02 2.451280287301300405e+02 1.669088211440060832e+02 2.768492228383354359e+02 2.445882168033535038e+02
+2.905092787520428601e+02 2.948076984760371033e+02 1.731080208454208673e+02 2.825532355845657548e+02 1.108820315678514845e+02 2.862013985457700755e+02 2.111453776876104769e+02 2.614428154999528147e+02 1.461523265575596042e+02 2.304914832379158156e+02 2.502987607420118934e+02 2.474276046141548875e+02 1.739607960146905725e+02 2.098700376203710789e+02 2.373226438948917121e+02 1.258493219462072119e+02 2.692932028872633055e+02 2.819145908444669999e+02 1.941653933285864468e+02 1.666395497972145847e+02 2.371919109091950588e+02 1.978302896313488191e+02 1.951483674191611613e+02 2.694357972099330141e+02 2.387068160427941450e+02 2.826084316255729618e+02 1.350954172043159929e+02 1.414479610501084039e+02 1.407657276334374501e+02 2.725513503737778365e+02
+2.055761393809777360e+02 1.070553196069381556e+02 1.045726024365074096e+02 1.611577217417760153e+02 1.258091705742062629e+02 1.038769334534844120e+02 2.956016304760584035e+02 1.586570076132481972e+02 1.636816353299032585e+02 2.375674325770941095e+02 2.085436646116971531e+02 2.088922128397473443e+02 2.316234644183506930e+02 2.623581653234684268e+02 1.714245300492981698e+02 2.844387943099641234e+02 1.469270259610659650e+02 1.157700922187784727e+02 2.367694595159086361e+02 1.548671738744121740e+02 2.013687686570863207e+02 1.860374943080277887e+02 1.733446602950305930e+02 2.488507085609763010e+02 2.929099979257852056e+02 1.825615338506695480e+02 1.338575452835397925e+02 1.491478381149757979e+02 1.116052925520655066e+02 2.341983606431906537e+02
+1.014445800974648222e+02 2.539987638010908597e+02 1.871788778457793399e+02 1.454231386314719998e+02 2.284640297096368045e+02 1.174773591296971915e+02 1.395683165851895637e+02 1.137193571402578414e+02 2.370662356797280950e+02 1.767292649815032064e+02 2.688513591587910696e+02 2.913902923086397436e+02 1.122392290694582897e+02 1.366157623619356229e+02 2.667409125457835444e+02 1.834435599491967537e+02 1.437174343391732236e+02 1.130622879516462120e+02 2.898543289046954214e+02 1.559795378531963479e+02 1.765577834073310157e+02 2.422955620302867885e+02 2.384835032255701321e+02 1.708163174135501094e+02 2.012159081107001839e+02 2.825663186839160517e+02 2.627299211659199045e+02 2.173916205317264883e+02 1.878835852278120910e+02 2.578733373077019451e+02
+2.843897417914848802e+02 2.685865547709703378e+02 2.810255710736182664e+02 2.572690897085278152e+02 2.416998564827035523e+02 1.770932574976374099e+02 2.021652319180342943e+02 1.414744641219446351e+02 1.464677002516696405e+02 1.831165552459343644e+02 1.157177632931430651e+02 2.625289386264841482e+02 2.972225480003540952e+02 1.024156386789293265e+02 2.305099741095138768e+02 2.241903749843916671e+02 1.157222019118702292e+02 1.533205318359311775e+02 1.179505454242311799e+02 2.666741766563739020e+02 2.792728900733587238e+02 1.222170248460037811e+02 2.573772727215269924e+02 1.535874607134987286e+02 1.231830862844115728e+02 2.584552954023608891e+02 2.541883057030129862e+02 1.001259630352790566e+02 2.332879439260797767e+02 2.240027888381033563e+02
+1.537092645679641123e+02 1.737278083620151392e+02 1.736358049797527201e+02 2.251608985235982630e+02 1.812387130195175473e+02 1.605621432944637377e+02 1.880655312831545700e+02 2.234500385148787700e+02 1.156918728696038272e+02 2.243685096423413654e+02 1.934342626327970720e+02 1.850952349553267027e+02 2.629944548485545965e+02 1.410418270562070973e+02 1.442479234012843960e+02 2.244518961458842909e+02 1.350755563946989923e+02 1.207094763037939913e+02 1.849900977633715797e+02 1.712315707730903398e+02 1.136025349108833495e+02 2.266901327137990734e+02 2.049289406654929735e+02 2.168279721613268407e+02 2.802488024880154285e+02 2.288593244920211873e+02 2.512942787545493957e+02 1.605416563468323261e+02 1.449848598254574483e+02 1.444073785399158396e+02
+1.576600406756634243e+02 1.316580100950168912e+02 2.530050469343043460e+02 1.319013133578224028e+02 2.708693079386434306e+02 1.256852413190491689e+02 1.471714019119002046e+02 1.119112141125198576e+02 1.482405279774543772e+02 2.151504825709631064e+02 1.449998801809978488e+02 2.163638771503673581e+02 1.272949254250747657e+02 2.476027791419436141e+02 2.891208457332292028e+02 2.642744540427622724e+02 1.972643066216432999e+02 2.480891057982425423e+02 1.265454595896786003e+02 2.957735252703171227e+02 1.831389323451852533e+02 2.674516147697771657e+02 1.404389674972707667e+02 1.350952754772052913e+02 2.169062951790871807e+02 2.445227715623778408e+02 1.771545655819627427e+02 2.729961759152714649e+02 2.655105689521545855e+02 1.887977700062222084e+02
+1.336462666694000632e+02 1.333709897858500995e+02 2.263366393511863350e+02 1.847175439991091821e+02 1.121699721143812383e+02 1.985314153845103533e+02 2.097626398761568396e+02 1.994292542548276970e+02 2.119822099620050722e+02 1.121578896112172430e+02 2.285640262135607372e+02 1.530452060058861719e+02 2.280757825791220625e+02 1.002584314437652893e+02 1.549763597162410349e+02 1.962603185897801836e+02 1.520023734031539107e+02 2.188357004065238129e+02 2.078620274892635678e+02 2.253215106546470281e+02 1.707542413836397373e+02 2.818584030117174279e+02 2.256862624833151472e+02 1.123882683852972377e+02 2.188298604829752776e+02 1.623779544769217296e+02 2.272253780943444212e+02 1.236449568833132560e+02 1.456708971140968174e+02 2.173334506159979753e+02
+1.355111076933105210e+02 2.882277378633141325e+02 1.458332953325788139e+02 2.038461345794760007e+02 2.077052275373579278e+02 2.430957456359013804e+02 2.398926697516154150e+02 1.861334604823129553e+02 1.056851094080089695e+02 1.250491536199931772e+02 1.475324860190441427e+02 2.446126161547439324e+02 2.283994822545897705e+02 1.411463500178549850e+02 1.017206978570942510e+02 2.805514386584911790e+02 1.128847993259780083e+02 2.326583828053989862e+02 1.968387029218569069e+02 2.013375618903088480e+02 2.981010702857409456e+02 1.018614681114941902e+02 1.799507821883679526e+02 1.133741465580100396e+02 1.235533581072856038e+02 1.980629645203880500e+02 2.289642287691829097e+02 1.596082722591768288e+02 1.905110471998515322e+02 1.789448781159623820e+02
+2.588286452268601465e+02 1.978130463173739599e+02 1.052689337312009599e+02 1.316763830509305251e+02 2.659236586726388509e+02 1.637014132384438767e+02 1.416031833329826668e+02 2.638665530652568236e+02 1.007257384115875425e+02 1.143900271701907769e+02 2.977834670475828602e+02 1.589765734727692745e+02 1.903975572290986520e+02 2.371635535037608804e+02 1.840341975670916668e+02 2.047003785265828242e+02 2.798969769773281655e+02 2.731706896262927557e+02 1.266878907904394254e+02 1.882415083052244427e+02 2.273996647906652129e+02 1.051754139634791869e+02 1.949647447346334843e+02 2.153583447980240919e+02 2.763468452623635585e+02 1.126493843527773322e+02 1.566047572050934491e+02 1.655928523150526246e+02 1.733528322945315949e+02 1.292815908595541146e+02
+1.453195062153936874e+02 1.443849872704900008e+02 2.393030362110915519e+02 2.203850914291498668e+02 2.628192548589183275e+02 1.142161203389242132e+02 2.954875947743198594e+02 1.914138981839176950e+02 1.956478457154231023e+02 1.282875398486639824e+02 2.801001077571227142e+02 2.478095646281364566e+02 2.467477848581343949e+02 2.819656424464902784e+02 2.951823714077539194e+02 1.777239847229775478e+02 1.197979896746704185e+02 1.481181033052623661e+02 1.906710229153984528e+02 2.142395628283543658e+02 2.300980272040501973e+02 2.228884003748859186e+02 2.473330601440014220e+02 1.391193242835927322e+02 2.836257563055140736e+02 1.510096324299383923e+02 2.202302141125946946e+02 1.931468179284185851e+02 1.332427495686727639e+02 2.591048546650930575e+02
+1.878681542531208208e+02 1.576240359584147654e+02 2.653849736815447500e+02 2.963544993865212973e+02 2.044592436730770828e+02 2.022626486161902903e+02 2.692262675681025144e+02 2.660999355751699227e+02 2.275843495473382347e+02 1.090849337992742818e+02 2.095602584555617227e+02 1.896271059113536808e+02 1.103822849104477513e+02 2.916911739044173260e+02 1.131212278363718582e+02 2.998892666268029643e+02 2.476782245756396605e+02 2.259689579913920738e+02 1.853942231198421950e+02 1.358270117521841200e+02 1.538630682720535674e+02 1.002148317174243601e+02 2.538393939061405433e+02 1.631649956267838206e+02 2.086654853664906000e+02 2.065167771482954322e+02 2.184161808630845485e+02 2.204789814939956045e+02 2.876785893506615821e+02 2.415299687386639675e+02
+2.578989465605797591e+02 2.309888943086805853e+02 2.139372792253111584e+02 1.438019921733897775e+02 2.686852572045135616e+02 1.347038004304963579e+02 2.662658866335509060e+02 2.378358170108797367e+02 2.901455078003721155e+02 2.653867524737770509e+02 1.011162296015096302e+02 1.236447329941733528e+02 2.440241295351771669e+02 1.285889645706482725e+02 1.234088480316093808e+02 2.765916670935633874e+02 1.132915304101479421e+02 2.967043774237617413e+02 2.960414394814537786e+02 1.923965028192617410e+02 2.177448618307050765e+02 2.328047369831131732e+02 1.702256773965170282e+02 2.320080409490440729e+02 2.962065584958517093e+02 1.421971909775941185e+02 1.416181340866144183e+02 2.318260414882616374e+02 1.990521696869427046e+02 1.291045564046920333e+02
+1.562042774178686386e+02 1.004265446278790392e+02 2.987714610921041185e+02 1.843637355858842284e+02 1.975513718825063165e+02 2.869996482942455032e+02 1.598134132589713943e+02 1.814921031876193638e+02 2.433389905907341983e+02 2.220363745053336970e+02 1.548306942100590504e+02 2.274512269554506361e+02 2.173006200058655963e+02 2.139515436667214772e+02 1.820439741095771353e+02 2.954110718222074183e+02 2.706126458816278273e+02 2.546812106115172583e+02 1.499899738326257363e+02 1.498010641912065921e+02 1.897725780579399668e+02 2.531561160917130167e+02 2.568891780637028432e+02 2.223136077092870551e+02 1.518604819103856585e+02 1.610422120589223027e+02 1.090455809489133259e+02 1.950503873748027388e+02 1.235704160644129388e+02 2.711492093024702967e+02
+2.039597038432034424e+02 2.026680584622021684e+02 1.365818873512059213e+02 2.909476552420245525e+02 1.721994194158640425e+02 1.854386667051114443e+02 2.287109571295530372e+02 1.912591665763447963e+02 1.607322994166321450e+02 2.949516230628389053e+02 2.522065912002103403e+02 1.869433122585654701e+02 1.235797649248940644e+02 1.522422059501078024e+02 2.738245135411146975e+02 1.059681837441489307e+02 1.013027238331489173e+02 1.660100598156148237e+02 2.454471731623151243e+02 2.467503196183328100e+02 2.584564749953993896e+02 2.079587352810677316e+02 1.650926041957846451e+02 2.269719270682073784e+02 2.376254891983122093e+02 1.510146656008620596e+02 2.672848371954185041e+02 2.692845974117340688e+02 2.180714754246087921e+02 2.186797802447831884e+02
+1.704231257711912519e+02 1.993416036368699906e+02 2.293703655438095268e+02 1.494582642918422266e+02 1.988970317734676030e+02 2.329763291241497711e+02 2.594871448385057420e+02 2.168089936885102134e+02 1.825320854593447280e+02 1.816754553181755796e+02 2.164740515812325725e+02 2.676208645391697019e+02 1.298365075936954725e+02 1.802664596093496243e+02 1.015344620621038132e+02 1.955048336384612639e+02 1.938953913674110083e+02 2.716932071347151805e+02 2.391085978949223829e+02 1.852300387899809380e+02 2.933293185307651356e+02 2.502753353909542966e+02 1.326128348575908262e+02 1.132638325194699433e+02 1.382024010322260494e+02 1.899310337488860796e+02 2.577639546186944699e+02 2.130234590296898887e+02 2.056292296528304746e+02 2.070746044453983927e+02
+2.712524956603344890e+02 1.103212761114690750e+02 1.501201791543782917e+02 1.588084859702673555e+02 1.780379814134324192e+02 1.938691258391782810e+02 1.322057441019641146e+02 1.105823874551086590e+02 2.879365916037821194e+02 2.457617763012990224e+02 1.036189749330240488e+02 1.682919366264929124e+02 2.271749409116763161e+02 2.468308259697249127e+02 2.530034131464132088e+02 2.481420904342841709e+02 1.546080547019561209e+02 1.278414739842506265e+02 2.234886960240669111e+02 2.535365186455997843e+02 1.599130733896959669e+02 1.151371295028686035e+02 2.378656188176093451e+02 2.901072209563180877e+02 2.524076257924749882e+02 2.849501171254129304e+02 1.802791659856764568e+02 1.527418387706650833e+02 2.578820596338672431e+02 1.208856989199291263e+02
+1.884906470590645711e+02 2.304295185581007672e+02 1.035923344330140736e+02 1.647061655195892627e+02 1.910201770870304472e+02 1.752788518438422614e+02 2.763014227316762117e+02 2.545709641405486252e+02 1.642694881393259152e+02 1.850698110761380804e+02 2.423689469305483328e+02 2.821007056776016384e+02 1.440765548977453250e+02 1.082195827231368952e+02 1.292487205530619008e+02 2.136496853657876613e+02 2.268509220579896635e+02 2.999629735037570981e+02 2.135306905316524535e+02 2.807718279523737692e+02 1.079256111018183759e+02 2.233050677333321801e+02 1.960571416898615951e+02 2.930642308139058514e+02 1.350490077967585307e+02 2.626074042719769750e+02 2.812196827814445328e+02 2.812753678081913336e+02 1.893738913514469004e+02 1.237248675858835725e+02
+2.024005284879252144e+02 2.663611407988397559e+02 2.687079844301063076e+02 1.583164038086077312e+02 1.451019436850150441e+02 1.100558451420041450e+02 2.083655450975085159e+02 2.034012033819327598e+02 2.745375932717230398e+02 1.454718097055225599e+02 1.519068131933423729e+02 2.522666952972969625e+02 2.409340029943109300e+02 1.697386944425205115e+02 1.092659514648129289e+02 2.785598218078254149e+02 1.404092026094307357e+02 2.152301424167146990e+02 1.170396027347833723e+02 2.495323893679063474e+02 2.070836095469416591e+02 2.187978925167305135e+02 1.478606128149070855e+02 1.189323178954538207e+02 2.012925160284665651e+02 2.080878545398990127e+02 1.510128433840351647e+02 1.657302151838663065e+02 2.177026636795220043e+02 1.221198981216710422e+02
+1.411258561955272341e+02 1.419717097672817374e+02 2.247481951315160984e+02 2.805973971111802712e+02 2.755562061324142178e+02 2.039769327420251557e+02 2.994080883760036045e+02 2.417843309736466040e+02 1.023751441731232319e+02 1.491356884971497152e+02 2.542464200475323821e+02 1.496044144381669128e+02 2.829129207809560285e+02 2.479316882407134699e+02 2.441205876677642550e+02 2.045492313770996020e+02 2.855582203360229414e+02 2.884005586284110336e+02 2.039668453101600676e+02 1.690279206477617890e+02 2.136822090795746760e+02 1.254275901194574772e+02 1.084851042192170922e+02 1.656011685190305229e+02 1.415195951026897774e+02 1.578115814760412263e+02 2.619737257057257693e+02 1.492347147839753347e+02 1.627213988646173561e+02 1.343297485726322691e+02
+2.544675070683062756e+02 1.367461330002975899e+02 2.928364121110963652e+02 2.024865028281971036e+02 2.758937379397792142e+02 1.293527538914390220e+02 1.003170531204512059e+02 1.514803620238746760e+02 2.603616046431354789e+02 1.790387290949859960e+02 1.954717187769221027e+02 1.325226280128280223e+02 1.522166198122710625e+02 1.162911821325583048e+02 2.798489406348742250e+02 2.521718932296424498e+02 2.622327475379161115e+02 1.027798265388270949e+02 2.437256510683693023e+02 1.911771820917219884e+02 2.722604457055863350e+02 2.850557929858495640e+02 1.953760157441756746e+02 2.473572905253965644e+02 1.891404804097296051e+02 1.514672503279451803e+02 2.213565012031598940e+02 2.253356064978207769e+02 2.044629345029305227e+02 2.805872739342098612e+02
+2.859142434488251183e+02 1.016009480575973356e+02 1.779351649172412522e+02 2.205171340775500539e+02 2.104472905774927369e+02 1.755755724600441567e+02 2.751836189782782185e+02 2.820692049982218350e+02 1.337557428916256015e+02 1.569761138230965969e+02 1.991757527032745543e+02 2.615974376894962461e+02 1.944849272958306017e+02 1.868411694165790777e+02 2.994394032068257729e+02 2.802783326794233290e+02 2.693871918204162625e+02 1.750293298802730249e+02 1.468161278725061720e+02 1.272003326865558108e+02 2.233103517167062932e+02 2.103066399402185027e+02 2.720825853079193735e+02 2.728915492341989193e+02 2.160004538807991992e+02 1.325145501710478015e+02 2.549827549782140466e+02 2.921469675413995901e+02 1.846231529604695822e+02 1.391152989663993651e+02
+2.538717579982014456e+02 1.450483481068324352e+02 2.720200816305956550e+02 1.120834821105324011e+02 1.703801876168104741e+02 1.091293661435919233e+02 1.410263490040598526e+02 1.910022197757120352e+02 2.505223413771657022e+02 2.069613533172621374e+02 1.367200764291426935e+02 1.269156762039037574e+02 1.459486945063737267e+02 1.585863332989725905e+02 1.433846106215619329e+02 2.893202513225785424e+02 1.754070497414596730e+02 1.678900237854272746e+02 2.363821059303507752e+02 1.088858921730617908e+02 1.962435837543239927e+02 2.151311182954276831e+02 1.943029551670006754e+02 1.670799798236046172e+02 1.348235227224938910e+02 2.005836112104490212e+02 2.601588534628079969e+02 1.194827586439497935e+02 2.131891535893303740e+02 1.835674362703964277e+02
+2.872207377280434457e+02 1.680389491751975299e+02 2.268072198735419533e+02 1.324343035526375729e+02 2.746241572770433095e+02 2.142161570690199710e+02 1.852290440736100550e+02 1.772431485621305285e+02 1.144750125154023266e+02 2.162070901557998468e+02 1.490690769171257557e+02 2.904041493178549445e+02 2.673617561413327621e+02 2.904362235840736730e+02 1.438791831406123833e+02 2.596893065528289526e+02 2.617155941751458386e+02 2.388486986717779246e+02 2.718819501315180105e+02 1.265484539827731680e+02 2.508989305854047700e+02 1.677208481362706323e+02 1.527665277518251230e+02 2.069026506407369084e+02 2.223100964495413336e+02 2.859845330217733022e+02 1.430291068893224349e+02 1.186508486537613436e+02 2.043257492072551713e+02 2.909823892985461953e+02
+2.385945641230763670e+02 2.011887933217761031e+02 1.622448188725907983e+02 1.738874847453056987e+02 1.669498482708885376e+02 1.853462372214463016e+02 1.514500885098960907e+02 1.569159134451362547e+02 2.521399095730983504e+02 1.246878140446721659e+02 1.758330561641313352e+02 2.722601647479554003e+02 1.679012078705679869e+02 1.710944469563905272e+02 2.012619557548435978e+02 2.130692925302264200e+02 2.489118511754019778e+02 1.553758318484749452e+02 2.531318516516165857e+02 1.895498740333992487e+02 2.010265603399928409e+02 1.805605111948569856e+02 2.471772127430102159e+02 2.822665908577009759e+02 1.256656757093761314e+02 1.218957078832023626e+02 2.851942693987446660e+02 2.434079459678487751e+02 2.183256665756584312e+02 1.881473862468819220e+02
+2.878274557836845133e+02 1.654481949983921254e+02 1.215681808546938214e+02 2.567820905945674781e+02 2.104106688330284101e+02 2.960796083414018085e+02 2.020680111052573693e+02 2.328934707961639106e+02 1.081575190462602336e+02 1.003340046261853189e+02 2.009697278729638299e+02 2.231963192062537757e+02 1.203849639323555323e+02 1.187994179134823156e+02 2.211937485225296030e+02 1.667300587261732119e+02 1.727379541915926211e+02 2.085029285798690353e+02 2.440827389167183981e+02 2.864522928573259151e+02 2.974890568790378893e+02 2.102945085846974393e+02 1.972598274048171447e+02 1.762889209976547136e+02 1.346946323322499666e+02 1.554434255958064170e+02 2.915634104756007901e+02 1.434053307556222876e+02 1.055800565037633163e+02 2.043924431141962259e+02
+1.494596010135965116e+02 1.369114048625681335e+02 1.414146701131132886e+02 1.383970135097982848e+02 1.734304788623498155e+02 1.594301265610334610e+02 1.040146208229407137e+02 2.208381597698417806e+02 2.904998286250861383e+02 1.300157615397056929e+02 2.667076669416877621e+02 1.062418844419948556e+02 2.717657999079561364e+02 1.054097765488278640e+02 2.401074677516734823e+02 1.045408432466875297e+02 1.330046749931937882e+02 2.297648034226271534e+02 1.488059718063634307e+02 1.725671935994615183e+02 1.330818497812682608e+02 2.341687919103425770e+02 2.983144736799429211e+02 2.798846823197050071e+02 2.218705077010061473e+02 2.681931695329894865e+02 2.339384973461015420e+02 2.893058480095726281e+02 1.539801301873031321e+02 2.746688360458649640e+02
+1.330701439354522222e+02 1.727884450558678395e+02 2.309082669627648272e+02 2.027633892073664299e+02 2.725503026364725656e+02 1.999882667367585896e+02 1.904108867169430255e+02 2.952458047945178805e+02 2.903769421220866320e+02 1.593020200554085477e+02 1.236139458806368623e+02 2.670862420061573062e+02 2.910830183895285472e+02 1.860711175093342149e+02 2.161724988935532963e+02 2.564488756979296795e+02 1.231566645138573648e+02 1.554206254375235403e+02 1.148558104746345521e+02 1.512714227454516163e+02 1.953024826710307025e+02 1.296022137194406127e+02 1.500450396815122076e+02 2.611742573447975246e+02 1.601671705158374550e+02 2.391666762859087214e+02 2.566415095930981352e+02 1.923304801412870404e+02 1.194174883996373353e+02 1.970722090829630986e+02
+1.912113734453868688e+02 1.498407015577022605e+02 2.038188614169363007e+02 1.315017316695561647e+02 2.564290419741012101e+02 1.890015309531812022e+02 2.451565642315005960e+02 2.794356592632736920e+02 2.286941218755985972e+02 1.959549984609147941e+02 1.183834182035568716e+02 2.102820643179567242e+02 1.748108698585573393e+02 1.534379248653211221e+02 1.919662859034699522e+02 1.273611408042816464e+02 1.848163823983119585e+02 1.719445827292381637e+02 1.098466009889928898e+02 2.781108902268393877e+02 2.089286134506138524e+02 2.324518337977864348e+02 1.983840049195213169e+02 1.897881971862217370e+02 1.057077761008814605e+02 2.693629461665184408e+02 1.359710117509105487e+02 2.191184409971657487e+02 1.295811391257115304e+02 1.272165218667991553e+02
+1.987244486959793903e+02 1.516360617950651317e+02 2.198509518241761498e+02 2.494181713303175911e+02 2.903223989223247372e+02 2.847249789220907132e+02 1.747037051964282171e+02 1.610307305098726829e+02 1.866621867053561061e+02 1.016530888490581503e+02 2.606194448419089440e+02 1.820037020201941402e+02 2.650669443765450524e+02 1.137210849453726098e+02 1.329244106101075715e+02 1.741312140090854257e+02 2.301425980066611885e+02 1.051708772384664030e+02 1.994040172335078864e+02 1.874773290907829733e+02 2.745616984783777070e+02 2.354781865911449756e+02 1.598287033335407159e+02 2.650689470710170212e+02 1.643692352330562017e+02 2.991199217036622713e+02 2.713535332162406348e+02 2.516280148665988463e+02 1.124367393830256532e+02 1.725070309959049837e+02
+1.637875882282461077e+02 1.407642428016634426e+02 2.759741260511348173e+02 1.982469453863400304e+02 2.966736241669494802e+02 2.756530253528777052e+02 1.426661371226006167e+02 1.585144634205103102e+02 2.836415355000413001e+02 2.468213340046699784e+02 2.898204535963063790e+02 1.711408259966125343e+02 1.900542569026269177e+02 1.112151031999617032e+02 2.679918109779015936e+02 2.737346364036235400e+02 2.597479311885246602e+02 1.719445390286030886e+02 2.361360157374418236e+02 1.123330408578339785e+02 1.214203690485689719e+02 2.552722899309185891e+02 2.436705678248840456e+02 1.596697357728296254e+02 2.533254006866929444e+02 2.066863222258713790e+02 1.194370826184286329e+02 2.943584774485435673e+02 1.636272134478143130e+02 1.191267138602315185e+02
+2.350924626651462006e+02 2.263138093076711357e+02 2.206572605284771385e+02 1.704171521239532296e+02 2.000250897638135257e+02 2.966317084215347109e+02 1.350543763227695138e+02 1.248113195978286285e+02 1.480602782771696297e+02 2.391913401309390679e+02 1.908758915801345779e+02 2.476074601271855045e+02 2.408834383325319095e+02 1.009169451940341560e+02 2.567526834523320645e+02 1.791854948779896688e+02 1.412277552146151152e+02 2.660711025781407670e+02 2.073940326990519054e+02 2.509760072499196610e+02 1.358593750308925223e+02 2.127422683140523532e+02 1.874643773621423293e+02 2.844455725631112273e+02 2.197223292953194118e+02 2.049519862750077266e+02 1.674367936692717365e+02 2.806316262053937294e+02 2.040091003350897836e+02 2.675290975004411962e+02
+1.483513543637005796e+02 2.384008274111940011e+02 2.834409911154408519e+02 1.344593118283445392e+02 2.346883831968173979e+02 1.381882879805813218e+02 1.241165074750676638e+02 2.186327911062819567e+02 2.466602279029802673e+02 1.573094529523951906e+02 1.568918412618390903e+02 2.289205163045023710e+02 1.170165333644822283e+02 1.742406104080407658e+02 2.082974381484526702e+02 1.600869123712819260e+02 2.399160913983472199e+02 2.877189278027444743e+02 2.845252294036096146e+02 2.342337907657317544e+02 1.496264758341107779e+02 2.905797831387872066e+02 2.824703799011629144e+02 1.047015685176013307e+02 1.056531628249932169e+02 2.778559625738202499e+02 1.693549799118289343e+02 1.654193764711911570e+02 1.062077606699500762e+02 1.159643419206647792e+02
+2.694780377267857716e+02 2.229138360502907403e+02 2.407432883969363218e+02 1.240072643521201741e+02 2.128611568148922970e+02 2.114050669978733481e+02 1.042337934877265297e+02 1.044783539591350490e+02 2.706611056394938259e+02 1.972285130309975898e+02 1.959046941044780681e+02 2.915493579522836853e+02 1.131994346897827342e+02 1.197362406389762839e+02 2.877593780027675621e+02 1.089470964294721824e+02 1.996015695685267417e+02 2.185569019121031999e+02 2.102686704320404374e+02 2.955299037924150980e+02 2.987478446256551479e+02 2.517129931888254646e+02 1.552463625479420557e+02 2.295020326441428153e+02 2.886454895961533111e+02 1.869792800456660871e+02 2.703426621835664037e+02 1.873514421416134326e+02 2.714620374401066556e+02 1.623625260081516331e+02
+1.457420078291350194e+02 1.926195242081234369e+02 1.841639049563959247e+02 1.397830290030836125e+02 1.287503203163068406e+02 1.684614546803193775e+02 2.820658047345126533e+02 2.986548244924653090e+02 2.631399932039782925e+02 2.870930868530864473e+02 1.141938207690214426e+02 2.868552010662050407e+02 2.019110175402121286e+02 2.840219745246005232e+02 2.848478851173646262e+02 1.902287203163165259e+02 2.696968940302964484e+02 1.690355482825476656e+02 2.171695948786692725e+02 1.960363641465239652e+02 2.930566891688549731e+02 1.380341365242818483e+02 1.769912313914243214e+02 1.164985277343077996e+02 2.079184380436491324e+02 2.871364788135472850e+02 1.796231479741346391e+02 1.115892945700443875e+02 1.922852518794877028e+02 1.851500906627327083e+02
+2.894943401361737187e+02 1.972990286414578804e+02 2.801948561309920933e+02 1.993490085147259947e+02 2.539099743775018112e+02 2.972486389690005240e+02 1.162404922698449354e+02 1.801898545246462504e+02 1.283416456049016858e+02 2.289248555429664407e+02 2.419505668531598985e+02 2.755101537543703216e+02 2.786083442131507013e+02 2.461931811431258552e+02 2.699066237266536064e+02 1.088542193903703179e+02 2.302113104476973149e+02 2.158136503417114227e+02 2.797451432348925096e+02 2.832754349673875822e+02 2.207567008139471909e+02 2.920947868166995249e+02 1.300092217647513735e+02 2.953259288980694350e+02 2.539624465668687492e+02 1.304833679125420645e+02 1.051395153781939484e+02 1.855592224876973830e+02 2.160289702497469477e+02 1.227895712666205981e+02
+1.029685235386965587e+02 1.410297052380113882e+02 1.832105986621241982e+02 1.016727951098498579e+02 2.130361696974732126e+02 1.817578553203918830e+02 2.644724203174304193e+02 1.713346250427240420e+02 1.297164370175517547e+02 1.072810924841072193e+02 1.083932811014470161e+02 2.860684171745337494e+02 2.893854146138399983e+02 1.677808320623732925e+02 2.343535290724524600e+02 1.209564642240636090e+02 1.329537830609780542e+02 2.924542956964438645e+02 2.733376468658280487e+02 1.397146179999238598e+02 1.103570089598620285e+02 2.231457082965310690e+02 1.056672424832338635e+02 2.887779644840117612e+02 1.127167878193751704e+02 1.387640376146708263e+02 1.791595456124304633e+02 2.709107895779202408e+02 2.238624693992912569e+02 1.773395240564728397e+02
+2.317578772498348769e+02 1.294950944138938667e+02 1.126253428029936572e+02 1.371351849575549693e+02 1.785990678455200964e+02 1.021081186758702444e+02 1.471984209931611360e+02 2.907355141803875540e+02 1.881128962816476644e+02 2.776434621780599628e+02 2.231668573818950279e+02 1.905362514139340817e+02 1.921875823712000226e+02 1.027725913116546792e+02 2.939602582690168902e+02 1.776540079128602656e+02 2.761214484196684111e+02 1.042033722248946646e+02 1.812858538041361385e+02 1.739774673118114663e+02 2.626640185867897799e+02 1.702975408841979288e+02 2.558138050153142729e+02 1.733257751657050392e+02 2.918973111180089859e+02 2.499103812623473857e+02 1.210050998380505973e+02 2.819910650801346605e+02 1.887952629909842699e+02 1.910084514453274380e+02
+2.212539479167726029e+02 2.774434360961662378e+02 2.337566454731646104e+02 2.345785537275947661e+02 2.365459264006348405e+02 1.983982238092833086e+02 2.030822332599765332e+02 1.995891111618029186e+02 2.834365683300363798e+02 1.036872616932399609e+02 2.192093181482490252e+02 2.601252995545215754e+02 2.498786393235831724e+02 2.102914196276636858e+02 1.344974807588668000e+02 2.319076536245909210e+02 2.769341510052834110e+02 2.705990780330756138e+02 1.679097240924248240e+02 2.394521666103182724e+02 2.042111123157340842e+02 1.679545908808316028e+02 1.638112120198904051e+02 2.498667640522866407e+02 1.298749690282424183e+02 2.953546510122243944e+02 2.420377599473625025e+02 1.972281420856064642e+02 1.511153679243939223e+02 1.785899871179086063e+02
+2.568297621323404201e+02 2.469847896802298237e+02 2.766623631158322496e+02 2.476135901735717937e+02 1.788596740963971570e+02 1.849716544556056874e+02 2.568516536462929594e+02 1.692762419184084877e+02 1.468834240718183537e+02 2.716053370235183593e+02 1.674083895790932957e+02 2.340636951853666687e+02 1.637725360284847227e+02 1.316562872243186177e+02 2.850086566701365882e+02 2.066513343106022944e+02 2.990778363456342390e+02 1.780020440519503495e+02 2.906711993591478631e+02 2.149926413975278479e+02 2.151504627144789765e+02 1.458362697904619836e+02 2.339644011324822657e+02 1.740513991402896181e+02 1.804876886135730842e+02 1.706585538790989176e+02 1.113370339871644603e+02 2.032819788543359039e+02 1.225434838619497526e+02 1.558188197132453183e+02
+2.752385657001058803e+02 1.704994416021052643e+02 1.607090409105587696e+02 2.031247490318933444e+02 1.333383797740430339e+02 1.922643047184382112e+02 2.665685682619526915e+02 2.611043497447243453e+02 2.444450591022788615e+02 1.012899678037660181e+02 2.236752860048796947e+02 1.164606756896235993e+02 1.768812782093617955e+02 2.532808672341815850e+02 1.308823477633827395e+02 1.683394957344131626e+02 1.787390150786144716e+02 1.962681762314343530e+02 1.178176219749694980e+02 2.151624908275416885e+02 2.951256579216935734e+02 2.058583926262361388e+02 2.348769662163374790e+02 2.500118096543036472e+02 2.065978549387351109e+02 1.732426267043477139e+02 2.575950640438621804e+02 1.826939497339359946e+02 1.586062531006688801e+02 1.141086110094916819e+02
+2.107478059550890066e+02 1.212326460542207940e+02 2.154852140069355073e+02 2.624147598788578648e+02 1.169795422214265699e+02 1.682202484364929660e+02 2.987700686247625299e+02 2.259973608163532504e+02 1.912690930240648015e+02 1.896338093439390775e+02 2.747727757049322008e+02 2.388804299971102978e+02 2.538821160842531128e+02 1.839990833334872491e+02 2.839611350159472067e+02 2.953225980324958755e+02 1.674336071760058076e+02 1.609172697163818953e+02 2.902596210806400450e+02 1.513824951234124114e+02 1.873458283487339600e+02 1.695960935104061491e+02 2.116215526550050470e+02 1.849422962892989233e+02 1.434256749723924713e+02 1.304784783123307079e+02 2.632948417544853328e+02 1.656472047377057777e+02 2.303125851744007377e+02 1.681993961373014486e+02
+1.104191565760665128e+02 1.750924257030650040e+02 1.242494131306669090e+02 1.541741282893887899e+02 2.585460716706878657e+02 2.286423505464783261e+02 1.890990979891397501e+02 2.707781238779197679e+02 2.619171833457787670e+02 2.695823002806438353e+02 1.941989480397771786e+02 1.389058748786196134e+02 1.283479072532797431e+02 2.347481590897206729e+02 1.518985431591505630e+02 1.757095590143896402e+02 2.225334593093496096e+02 2.231309387578290568e+02 1.039310896134069395e+02 2.614149485334186238e+02 2.212890027388380076e+02 1.425609106790709859e+02 1.376620423520403733e+02 2.403640719649376933e+02 1.152284694789922526e+02 2.108068210397188409e+02 2.526640691383259991e+02 2.323633859683563969e+02 2.720522122905912283e+02 2.498034621012949685e+02
+2.223449436042899947e+02 2.823923482876032267e+02 1.728419664392092727e+02 1.542710015610415724e+02 2.699062389875002737e+02 1.776741825057288793e+02 1.800001384193664080e+02 1.819433000632012636e+02 1.436484983468620840e+02 2.344086094824976954e+02 2.824459866922626361e+02 1.860318500101035681e+02 1.749968777772715498e+02 2.792448396035428004e+02 2.134719239619671498e+02 2.649346822194891047e+02 2.535109715864082602e+02 1.651109960016319178e+02 2.407385671793928736e+02 2.276937454871455770e+02 2.965404491761371446e+02 1.771850291606413634e+02 2.317902380753697855e+02 2.233400563607936817e+02 2.471010629200553694e+02 2.999085009765063319e+02 1.263611681933084725e+02 2.954593528043474180e+02 2.279026703099021915e+02 2.630592311905735414e+02
+1.662671322607742752e+02 1.600442354914371208e+02 2.476541290397616137e+02 1.471310870365195740e+02 2.302232198157895198e+02 2.833854716762933776e+02 1.464787719165046553e+02 1.913553080525503560e+02 1.014594285276723156e+02 2.182963956218923158e+02 1.629807715448000636e+02 2.692152036144454428e+02 2.287521686048013976e+02 2.982465613581407524e+02 1.646080094271899839e+02 1.685350412843276899e+02 2.638506951547767585e+02 2.931520510309920837e+02 1.395453733045734168e+02 2.192750645467382355e+02 1.118562057344099543e+02 2.210439168983162972e+02 1.977199388190010438e+02 2.248771354041466566e+02 2.967583759675493411e+02 1.144799677712354793e+02 2.877369511761256149e+02 2.831237961244747225e+02 2.909105411130262269e+02 2.550977837950437390e+02
+1.519738194711488006e+02 1.042788193386050608e+02 1.298121344332743377e+02 1.827398187867084971e+02 2.371985543371917800e+02 1.647119082252074236e+02 2.792046599520904238e+02 1.737333830141970452e+02 2.019611337599129968e+02 2.402390448779260623e+02 2.107045415433176174e+02 2.447101973248666411e+02 1.584507446746840174e+02 2.877533155913679366e+02 1.209142860803932251e+02 1.903846717728129931e+02 1.485923447895592631e+02 1.040627746119376695e+02 2.329784390325348795e+02 1.136264746597146882e+02 1.019818146651219024e+02 2.395077159260278847e+02 2.571474008697522322e+02 2.507839876514990465e+02 2.649762964978717719e+02 1.398370322453145889e+02 1.116668292809188614e+02 1.262068209877756289e+02 2.561228606182183967e+02 1.019925993853918413e+02
+2.525550526067758881e+02 2.649927164229666232e+02 1.457764901336312846e+02 1.519121804298574148e+02 1.112983565335166247e+02 2.979018464293943680e+02 2.517559946611144142e+02 1.257251989750113239e+02 2.377842966816966737e+02 2.692916709774201536e+02 1.558791612193160745e+02 2.988101508442036334e+02 1.264682305510686575e+02 2.586186621657187743e+02 2.397705732393993969e+02 1.799773948514575750e+02 2.289212202830902072e+02 2.551439950194432242e+02 2.270410183155361210e+02 2.624250216967006395e+02 2.894508375480465361e+02 1.106681053253299183e+02 1.696755343387707171e+02 2.302155275158106917e+02 1.445113211107399138e+02 1.886794441144848236e+02 2.129906512422033131e+02 2.340704769023953986e+02 1.082933010325512981e+02 1.977265970892881626e+02
+2.874406426475449052e+02 1.913451373833616742e+02 2.647704607931181044e+02 1.881279366057496532e+02 2.840067538093052804e+02 2.179159896935567247e+02 1.839859875309309132e+02 1.189702187115672132e+02 2.794517441847542614e+02 2.815599370853284427e+02 1.258259904677427699e+02 1.428483537633051412e+02 2.541426109645265967e+02 1.338781623221585164e+02 2.877181693280556374e+02 2.041742222547631513e+02 2.429167887622087392e+02 1.861891141000048435e+02 2.815058357304060337e+02 2.932279451804108703e+02 1.428092602118218792e+02 1.129541128601477595e+02 1.104970415865426503e+02 1.361068733124779726e+02 1.702082770497633533e+02 1.583852379729134157e+02 1.614070717213254511e+02 1.054529192214523476e+02 1.116913943762218366e+02 1.806474879921846366e+02
+1.904583320230821926e+02 1.477903225290235980e+02 2.926623631581093150e+02 2.267002240281469199e+02 1.643763662729302268e+02 2.199235242233247902e+02 1.853923849032223359e+02 2.941726936508506469e+02 2.665966841434134835e+02 1.199566433868006357e+02 2.951991052054676175e+02 1.594510101065885124e+02 1.458298791153635534e+02 1.532145001211049475e+02 1.411023254500616133e+02 2.140513226665028128e+02 1.678784758049908419e+02 1.708308530430679184e+02 2.099440033407245778e+02 2.664570659333852518e+02 2.959905162222905801e+02 2.829445582187913715e+02 2.588706049990775000e+02 1.722199615074994483e+02 2.869184560072056343e+02 1.681559218785307053e+02 1.503240659973911306e+02 2.588597461006905291e+02 2.678295026364270939e+02 2.154561503934444886e+02
+2.071927904539387839e+02 2.171736003654224305e+02 1.593735315924418785e+02 2.947356579175152547e+02 1.742775794491871011e+02 2.184611101357660914e+02 2.225198306238390842e+02 2.168369296352294668e+02 1.755672175076374231e+02 2.252214925755263835e+02 1.563369877784152209e+02 2.085332604119019209e+02 2.572482649031854862e+02 2.951800051631508950e+02 1.079183556031880329e+02 1.218838648771928774e+02 2.685371616407055626e+02 2.419162624723466877e+02 1.022244855205179022e+02 1.101224552326326602e+02 2.597819405832950679e+02 1.134555412120959517e+02 2.870491931154815575e+02 1.374365654160442318e+02 2.645641258978021142e+02 2.531141673781916666e+02 2.361747183362105886e+02 1.893108861581111171e+02 1.539026912190118139e+02 2.501170032332128415e+02
+2.547888423116186232e+02 1.853670755857669974e+02 1.389074705955763420e+02 2.709929622842061008e+02 1.228800068832790515e+02 2.778321736112652616e+02 1.309641642706778555e+02 1.156980811627219055e+02 1.431313378740429982e+02 1.646591400066212714e+02 1.920182917083556049e+02 2.178001706163468043e+02 2.235489712948179886e+02 1.079088316874027242e+02 2.447091545393394370e+02 2.320303973549428065e+02 2.359105911115680101e+02 2.382951907588607128e+02 1.062067779247245483e+02 2.905379355334102911e+02 2.023335418134440715e+02 2.128348219019524095e+02 2.865957710750057004e+02 1.782427960783044796e+02 2.856139874187100531e+02 1.139905905655008098e+02 2.264676166669663360e+02 2.479179013019825675e+02 1.746165350218777803e+02 2.255842464851874070e+02
+1.883869033800616819e+02 1.965817072065136699e+02 1.890868666652849015e+02 1.898737766004000491e+02 2.779218373710688184e+02 2.134628932560298722e+02 1.100835458783813436e+02 2.768750976313177148e+02 2.547073561014202880e+02 2.728160162818061281e+02 1.733645011505617504e+02 1.625036971255624394e+02 2.977754324167240156e+02 1.632372616873928450e+02 2.174045665187836107e+02 2.606964806055048030e+02 1.625508452643421720e+02 1.715067940576683441e+02 1.218481476549646629e+02 2.842560845538128547e+02 1.928678337146606623e+02 2.708765321293922739e+02 2.077020047066411621e+02 2.923591890868326004e+02 2.230876482822842206e+02 2.689925468225608256e+02 1.036588336737814586e+02 2.052618530546818363e+02 2.648220111560104897e+02 1.868396012623422280e+02
+1.785937212608853315e+02 2.973454718025594161e+02 2.368986004504845084e+02 1.146953890760472348e+02 1.265905165006724644e+02 2.255973396401841455e+02 2.163675674740596264e+02 1.527913853500098185e+02 2.283358642424602465e+02 2.759303134283557597e+02 2.876072117803540777e+02 2.029362495845153944e+02 1.212425121544320490e+02 1.100001317370093830e+02 2.335268996183764330e+02 2.375268130741384027e+02 2.336339660612213436e+02 2.462747325703657282e+02 2.841981652294566061e+02 1.081959034831858446e+02 1.291296469376330833e+02 2.602425849072438950e+02 2.575669438145553727e+02 2.135342654708205714e+02 2.294373105308322067e+02 2.706502840281193016e+02 2.928412927772634475e+02 1.330151104176747765e+02 1.533759962548247131e+02 2.744006234275867655e+02
+2.257735103076358882e+02 2.728385269717355186e+02 2.290872800510813363e+02 2.330934692803050154e+02 1.037274604992595215e+02 2.674079561164307961e+02 1.195755645916240866e+02 1.402804464035359047e+02 2.170516922702277611e+02 2.744725918691634661e+02 2.930458735600458908e+02 1.496408395971007224e+02 1.595562419103408729e+02 2.835538666488008630e+02 1.780163567793609332e+02 2.906408145890961237e+02 1.133853019218590248e+02 1.494630592331960770e+02 1.214592101712915451e+02 2.263015460193574881e+02 2.598100406717117608e+02 1.963383361449393192e+02 2.235083985338561376e+02 2.946475410923074492e+02 1.758055989844200724e+02 2.637780439251395137e+02 2.875400021086666698e+02 1.577781508415756662e+02 2.146553072676672684e+02 1.798181279868336446e+02
+2.620574340171276617e+02 2.153711882285265915e+02 2.245961661539886904e+02 2.054509343172356921e+02 2.926008719008261210e+02 2.432564531143420652e+02 2.303655720936658611e+02 1.615953803481287991e+02 2.918921003884012748e+02 2.760746977013722017e+02 1.909442200188182710e+02 1.596536528765051060e+02 2.491411570718119037e+02 2.924629085319008936e+02 2.587604848561293807e+02 1.524605619386706792e+02 2.737599884275671798e+02 2.090365453766356723e+02 1.610548024559351461e+02 1.018774121963877803e+02 2.410901898572944049e+02 1.875862586601133444e+02 2.588626077539996686e+02 2.579873618626863845e+02 2.838744453525392828e+02 2.580071516854936817e+02 2.114887112935771256e+02 2.675506009048368696e+02 1.260391751775616029e+02 1.858866479221875920e+02
+1.963224789638335892e+02 2.444908535968891954e+02 1.962779352478895589e+02 1.553096436749702889e+02 2.483662294276224429e+02 1.067992874414757978e+02 2.633849667942634483e+02 2.454321751613854588e+02 1.854433418739394028e+02 2.562889653665436072e+02 2.506342746416453622e+02 1.900819942764665598e+02 1.704565979131312474e+02 2.916979173024495822e+02 1.898592592817412310e+02 2.687872145548625440e+02 1.525347862509104004e+02 2.786582104923993484e+02 2.310813531087783872e+02 1.166208530157265386e+02 2.602471623613457723e+02 2.102772607982462034e+02 2.183751071150112466e+02 1.065011561509572999e+02 2.813176394708128782e+02 1.792292558016025623e+02 2.804083600455996361e+02 1.557890480883644102e+02 2.439522159916458861e+02 2.652201783594097719e+02
+1.425266334964659904e+02 2.075049705342416928e+02 1.704914602333145126e+02 1.886474594627911756e+02 1.252313163849750595e+02 2.836097447326676502e+02 1.406399617929505439e+02 2.414245225193989768e+02 2.576349788827002385e+02 1.486724691707949262e+02 1.092388214497626961e+02 1.685935770192617724e+02 2.033388664740227227e+02 1.390809359458484948e+02 1.056188661648174758e+02 2.350581131530574055e+02 1.964295662906907012e+02 2.578831766420791496e+02 1.109952979966328144e+02 2.027546721440710940e+02 2.501377690830167637e+02 2.111868593440530617e+02 2.324728205186171692e+02 2.453971856382445935e+02 1.723822394524685819e+02 2.872924628066301693e+02 1.140766727214026446e+02 2.221345013854892159e+02 1.728173248741775296e+02 2.676400838220500873e+02
+1.711571121866394947e+02 1.085759247733173396e+02 2.001753766691515750e+02 2.760446855018309407e+02 2.056587091496190567e+02 1.121827347031253197e+02 2.274644480946081444e+02 2.571858980756533128e+02 2.945439217283808375e+02 1.913312305877045674e+02 1.500446430731354894e+02 1.650397772114545489e+02 2.581660073502400792e+02 2.094009769144933273e+02 1.731816092302842094e+02 2.727903589313663133e+02 2.606648610353666982e+02 1.460656197586831695e+02 2.016951883706858268e+02 1.247477859691891240e+02 1.732157361502286221e+02 1.195560196858487245e+02 1.253893910664414904e+02 2.455457677441618216e+02 1.778732818035962850e+02 2.490436815297808266e+02 1.487573988963908960e+02 1.937302250034929898e+02 1.502426775501600389e+02 1.110841009912817583e+02
+2.382535443835092508e+02 1.972031918916456732e+02 2.576267295349729807e+02 1.730194312205534288e+02 1.301593684828995094e+02 1.624008376323430127e+02 2.060036399923972681e+02 1.233366573394677630e+02 2.194763391620297739e+02 1.701495187616251314e+02 1.223397596968992218e+02 1.987622577877627350e+02 2.511738650001373117e+02 2.130204435763062634e+02 1.993899817227978133e+02 1.597764561560970265e+02 1.205224890815559604e+02 2.184250491898233690e+02 1.755709834516516139e+02 2.741081010321077542e+02 2.104755291992826187e+02 2.698148014221883386e+02 1.299106544858947814e+02 2.008369880697999292e+02 2.938716155581552130e+02 2.671516623028076083e+02 1.332347035771324215e+02 1.291435420390463378e+02 1.835021202063177554e+02 2.002866194329941720e+02
+2.554906544300547182e+02 2.365682876454178540e+02 2.924004211094360244e+02 1.662852505275750730e+02 1.123350814405425808e+02 1.910015128879867632e+02 1.341551373493250594e+02 1.313122940860927770e+02 2.397311819484906152e+02 1.559268654058377024e+02 1.407120959783594003e+02 2.371419051640040152e+02 2.217591327496910480e+02 1.881187811266301537e+02 1.632462641154496907e+02 2.970940639140721373e+02 2.422917505999918433e+02 1.356966040631749593e+02 1.702398486895437486e+02 2.608644720933497183e+02 2.783751927848827563e+02 2.951746624002826138e+02 1.720706565846523688e+02 1.275268866601749096e+02 1.880990845238362681e+02 1.129502795714700625e+02 2.919985401845127626e+02 2.747497807112307555e+02 2.667734033775608395e+02 1.373740617490475699e+02
+2.115416415080857746e+02 1.431719947715498336e+02 1.718744824503889674e+02 1.075365968452523902e+02 2.220100335193473029e+02 1.965127222891928795e+02 1.062726056237197838e+02 2.631794488147562561e+02 1.658640190278337627e+02 1.169182569761068464e+02 1.645780782039788619e+02 2.940728738870184316e+02 2.979920277570993790e+02 2.125849825405138631e+02 1.533327700316632161e+02 2.655551337415409421e+02 1.329075684859120088e+02 2.686536376777100941e+02 2.299223677315555676e+02 2.123135030200585334e+02 1.474417961566917654e+02 2.899688778344954017e+02 1.439992490259426461e+02 1.606165457016644780e+02 2.854253601360321682e+02 2.837928223954166924e+02 1.868865943198568402e+02 1.809928275876523571e+02 1.583918020284682484e+02 2.384217495701244331e+02
+1.181670050605631417e+02 1.525653020190297582e+02 2.615084872177121724e+02 1.755024420886775829e+02 2.989795566898581001e+02 1.573585789513378188e+02 1.903575226478752711e+02 1.641861715477102166e+02 2.943146494922903003e+02 2.038802368327418719e+02 2.581560000437879694e+02 1.504995935930718076e+02 1.095655891680627008e+02 2.628623226127134558e+02 1.069018430130149255e+02 2.750818506761686422e+02 1.121786007219489818e+02 1.106710601660877415e+02 1.217291564359016149e+02 2.915199334459504144e+02 1.325859381653097557e+02 1.737237090326784141e+02 1.036075961875061751e+02 2.392327113385031510e+02 2.486092083099548233e+02 1.259492139939950306e+02 2.665249241620523435e+02 2.103119814995928039e+02 2.718465347096271216e+02 2.018653364759854298e+02
+2.085808638159350608e+02 2.977621083099649582e+02 1.394173606621695285e+02 2.232898484647512873e+02 1.347812725162832521e+02 1.574683348766579627e+02 1.827258429860655724e+02 2.827887224427595356e+02 2.608349632236463549e+02 2.370910079389979046e+02 2.033290260845359398e+02 1.566531500677691042e+02 2.982287288081304837e+02 2.998057140577807900e+02 1.906108269451214596e+02 2.023344526730545851e+02 1.717672594576409040e+02 2.093320563180507747e+02 2.649028095061802333e+02 2.840422446800275793e+02 2.111868958418739908e+02 1.803076798272542760e+02 2.311954915496957312e+02 1.563425451766251513e+02 2.610066662710300989e+02 1.855286443040786537e+02 1.478912573842241045e+02 2.544380211258828410e+02 2.799416317427427430e+02 2.238937193404353252e+02
+1.269470316997365131e+02 1.895539822645488357e+02 2.443421824114378467e+02 2.632321641240823737e+02 2.164919638664115951e+02 1.042697198382110884e+02 2.896061632271033659e+02 2.068164163046922681e+02 2.059671371408958294e+02 2.352532326493898722e+02 1.046233655847859296e+02 2.755187319279126541e+02 2.344641322699609987e+02 1.434858288567621969e+02 1.255438908126368176e+02 2.548141480364848803e+02 1.466719626681152704e+02 2.020892715394597872e+02 1.195107046056347713e+02 2.012968701954913797e+02 1.996902768982717191e+02 1.560547951636197013e+02 2.162555170020900164e+02 1.483278604161245084e+02 2.615607136845001151e+02 2.424344777210258997e+02 2.524090919470299070e+02 1.726167614603126026e+02 2.199373130240069258e+02 2.318614758097714912e+02
+1.590143031424979370e+02 1.933970326403360502e+02 1.227042846200323112e+02 2.107086401017011781e+02 2.844049872407889552e+02 1.420899421875644464e+02 1.736571760246831673e+02 1.130876049831349661e+02 1.470306210908964317e+02 2.959723384067232246e+02 1.438030965279091049e+02 1.685928342779160403e+02 1.351720793691902713e+02 1.909711091249450590e+02 1.477005416416634205e+02 1.010528808923594681e+02 2.205493627613245167e+02 2.367352422049318079e+02 1.224997665062844305e+02 1.620949451166091251e+02 1.270634404764108467e+02 2.673321646154778932e+02 1.618882934467209225e+02 1.208967331765591524e+02 2.073956586593529607e+02 1.223277950209799059e+02 2.625820210851194361e+02 2.262632377752408672e+02 2.222881433937307349e+02 1.716205611551696961e+02
+2.376094214038359667e+02 2.287867757784330820e+02 2.035778067022395703e+02 2.546588007138803391e+02 1.514832565507949198e+02 1.736683542684334327e+02 1.991020520349750598e+02 1.873563480883249213e+02 1.589186331386689801e+02 1.042563150975229149e+02 2.019924784676414902e+02 1.136537158101241971e+02 1.091264020137841158e+02 1.352770409719844054e+02 2.178414513482917414e+02 1.831380105899948489e+02 1.114225947990316570e+02 1.736029819106907439e+02 1.354612112967272424e+02 1.996055424300992627e+02 2.905125217944571432e+02 2.980326934372309893e+02 1.560898949881966473e+02 1.943286005606112212e+02 2.429797193518882636e+02 2.652714760000731076e+02 2.863852813340179182e+02 1.838252831614893239e+02 1.814799327205894315e+02 2.338290144642930954e+02
+2.526381992552952340e+02 2.089745531365245483e+02 1.869938021147821701e+02 2.864405091884094645e+02 1.736924996547539877e+02 1.479914815134324613e+02 2.132537252074255321e+02 1.830098172980584934e+02 2.476607236946428827e+02 1.066503395377639265e+02 1.405219898965278276e+02 2.743866427972425299e+02 2.269305408710248173e+02 2.791638036143738191e+02 1.824422387811073634e+02 1.852994662516045423e+02 2.777032940597408128e+02 2.109153407914434126e+02 2.214759900082639490e+02 1.857033490029854761e+02 1.302118293337227328e+02 1.889562709124264188e+02 1.844813915245081546e+02 2.875482403705134402e+02 2.022892465111445404e+02 2.230217175841083872e+02 2.843056043891419904e+02 2.350834055358549222e+02 2.080929758762673032e+02 2.770814576487081240e+02
+2.389430507965955428e+02 2.463651891862864147e+02 2.369578462650186452e+02 1.902366989508459199e+02 2.003468797600664004e+02 2.681735461841141728e+02 2.362787745532336601e+02 2.323782975776413480e+02 2.525302892415198812e+02 2.828059530799229151e+02 2.840327053185673662e+02 1.223941816187275435e+02 1.056255174412387134e+02 1.386503050117574105e+02 1.384325506562210535e+02 1.176641636239777426e+02 1.670688688422628161e+02 2.506322552784647826e+02 1.181229702988334083e+02 2.607048520072489737e+02 1.667476448166365515e+02 1.310085831735554223e+02 1.553111545647699927e+02 2.907454039462255651e+02 2.844644695877585718e+02 1.989933906493695019e+02 2.662036190025202131e+02 1.792754658114438371e+02 1.073664330563030944e+02 2.793141822468826376e+02
+2.640306978448612654e+02 2.458161373226257069e+02 1.015510894380497575e+02 1.527048938693112916e+02 2.893334394723561900e+02 2.994916089563248534e+02 1.054055716033572452e+02 2.278819528330843127e+02 1.890909183007994443e+02 2.134436011261824433e+02 2.654189934957544210e+02 1.780852604264427725e+02 2.222277079756825628e+02 2.689688042831336361e+02 2.232046857529678050e+02 1.778434593737022169e+02 1.336418515516146783e+02 2.739064893378349552e+02 2.065065746675076355e+02 1.329712924393647313e+02 2.176938186185978736e+02 1.918043587714230114e+02 2.280421349429639122e+02 1.182282112372680842e+02 1.370131137248831692e+02 1.716251366233928195e+02 2.412427837766657888e+02 2.738208811966829899e+02 1.471415247536169488e+02 1.638288393831292353e+02
+2.669085627842696908e+02 2.477147782526785136e+02 1.718200513884793565e+02 2.299346472745743597e+02 2.016242169414389309e+02 1.631378839470685307e+02 1.859938403107781255e+02 1.609729169019194330e+02 1.536303039404505171e+02 2.234728543554556950e+02 1.953401084257108096e+02 2.920381588589057174e+02 2.034966688752892310e+02 1.019427894404581139e+02 2.980736970140829953e+02 1.738263823108001418e+02 1.531314323312329293e+02 1.400030133312995702e+02 1.802287961283190043e+02 1.719909696301723443e+02 1.974918793689569725e+02 1.666882741246514001e+02 2.879569025675030502e+02 1.334044307903087088e+02 1.016937569869423896e+02 1.660343944328368764e+02 2.214967229035601974e+02 2.539424882366704992e+02 1.211914878013190133e+02 2.835892388637473687e+02
+1.704109091340931741e+02 1.337843054639438378e+02 1.570106251098002588e+02 2.123587857442842335e+02 2.788290802167920219e+02 2.795601449888932848e+02 1.220747715539721696e+02 1.179984498565524405e+02 1.552783750686872963e+02 1.257256444039083192e+02 2.312614004137946893e+02 1.971625968209403084e+02 1.208837070227885135e+02 2.231693789143681386e+02 2.332576722664892941e+02 1.659208209363902711e+02 1.979623049620595907e+02 2.497459328714609512e+02 2.540243570817084446e+02 1.309045902221261599e+02 2.376613837929333499e+02 2.140333351750954023e+02 2.231625169053620539e+02 2.869160136215916737e+02 1.282002159167354023e+02 1.029173927424986488e+02 2.432034421383394545e+02 1.495648010251883306e+02 1.971910657968611247e+02 1.358409247687675361e+02
+1.833826243837603442e+02 2.960483510370855811e+02 2.343723986770386318e+02 1.560358896543934293e+02 2.499669478251469172e+02 1.762005778153444169e+02 1.918050503412152921e+02 2.089352602085182866e+02 2.770127170480132008e+02 1.268157216157417224e+02 2.670673189640755822e+02 1.547628252866769287e+02 2.602514896343354849e+02 1.557532905756793866e+02 2.574076233589491949e+02 2.646855654359934533e+02 1.749681240869035719e+02 2.465698370051858035e+02 1.076897610845538082e+02 2.337637497458482301e+02 1.791847918196868932e+02 1.967068388721293104e+02 2.340964493346380095e+02 2.762770912600988140e+02 1.174465260954359564e+02 2.950490567997024982e+02 1.354710376622284116e+02 2.342233227246520642e+02 1.617966271393036379e+02 2.107879984327653915e+02
+2.493754578342164336e+02 2.275093847135933061e+02 1.466148442335522191e+02 2.261697123059220189e+02 1.213252451599347950e+02 1.628949300801819504e+02 2.100466501082228206e+02 1.508908296808102989e+02 1.488199564735201079e+02 1.727131563468088302e+02 2.306747713688439205e+02 2.570279850661015644e+02 2.309125192178541113e+02 2.422081718543400370e+02 1.769407234272878782e+02 2.688532243604371956e+02 2.276780878660686085e+02 1.065345319601523641e+02 1.535069430280279050e+02 1.717902253122074967e+02 2.876755354986605084e+02 1.683056100689713332e+02 1.120105413679224569e+02 1.755508096146901664e+02 2.095863991316655870e+02 1.523590730880595174e+02 2.944635547123552897e+02 1.444697311944634066e+02 2.165062978405008494e+02 1.410128743297030098e+02
+1.434402193906418006e+02 2.368914090178307106e+02 1.963465933374949941e+02 1.914557752364961516e+02 2.870767419320768568e+02 2.044699144835463187e+02 1.223520556576680036e+02 2.352284247043744472e+02 2.917945011866975165e+02 2.225925999946875322e+02 2.240309397680480288e+02 2.048455962243571093e+02 1.188048963943729035e+02 2.200553599997707579e+02 1.885605934416515765e+02 2.863412817843446874e+02 2.913876692311304737e+02 2.446563674684449552e+02 2.981153955140326843e+02 1.111775924383378253e+02 2.239868361016714857e+02 2.540473271011064469e+02 1.343930974769885438e+02 2.368686732696482409e+02 1.175691554116390591e+02 1.014879352562223715e+02 1.330784448687188046e+02 2.045426156006566885e+02 1.168174380391246245e+02 1.704438548713551995e+02
+2.696784010384477597e+02 2.991318545155386346e+02 2.120364825583467336e+02 1.950895785161033018e+02 1.216112431291165592e+02 2.438998438799096391e+02 1.588292735755803733e+02 2.347670069791354024e+02 1.862846309471772770e+02 2.258642611266068343e+02 1.423367506635381119e+02 2.692888471853933083e+02 2.950212092401994255e+02 2.331327670110776467e+02 1.542291422318579635e+02 2.809064569107727038e+02 2.358857646534314654e+02 2.378124255062788563e+02 2.664164586086786812e+02 1.387157904298663880e+02 2.297158046581682243e+02 2.386372312695162634e+02 1.246509391338716171e+02 2.338956320284196408e+02 1.820257170558419944e+02 1.957425768708682767e+02 1.680974560138464540e+02 1.288235048549348676e+02 1.483029350020115089e+02 1.744880718659300669e+02
+2.512494238114035738e+02 1.112846425403449615e+02 2.472643304237797395e+02 1.241745840646870818e+02 1.808849124644312099e+02 2.524760780760417731e+02 1.836118621524309447e+02 1.408362492891266982e+02 1.099623406752946693e+02 2.383967522197594064e+02 2.436606913384966049e+02 2.770699525768120566e+02 2.597573569531676867e+02 2.935649366424795517e+02 2.702790297508025219e+02 2.563597369995835606e+02 2.279477293752616447e+02 2.477470305460766440e+02 1.962131167814513333e+02 2.859744526791636190e+02 2.703401534622389590e+02 2.763052603711840902e+02 2.934416645125817809e+02 2.193475948646207030e+02 2.822891098008749395e+02 1.085391177109117820e+02 1.782208012387337703e+02 2.335496863699061976e+02 1.715066387390946829e+02 1.948062204233656303e+02
+2.879262290016004613e+02 1.676743911135137068e+02 1.403503828589753937e+02 2.744454339345198832e+02 2.935124358491533485e+02 2.920282649929100671e+02 1.390240222956847447e+02 2.426642861805074745e+02 1.217336684570653489e+02 1.311823750440439085e+02 1.647679902066092836e+02 2.962811279981685288e+02 2.945746172932865647e+02 2.005257587949587332e+02 2.072045953580022228e+02 2.893049469033056766e+02 1.913962360581630833e+02 1.823675529874825543e+02 1.830342103129283373e+02 1.222396004373517400e+02 2.248239872372262482e+02 1.170253438297526429e+02 2.853825568202013301e+02 2.214973458763422514e+02 2.563932510909227176e+02 2.144837192650675206e+02 1.793062298958048473e+02 2.920176466690815005e+02 1.515607839109829627e+02 1.981203765908239802e+02
+1.733053660232129403e+02 1.312183264386245583e+02 1.276233157677672807e+02 2.020942572504836789e+02 2.314817368496994732e+02 2.242589617101967008e+02 2.160504620978007893e+02 2.360595788588375399e+02 2.952977074031120992e+02 2.334652590044975682e+02 1.243453875174208747e+02 1.916144242306085630e+02 1.092365115042800596e+02 1.478765005471206280e+02 2.191946613400726278e+02 2.879274886834762697e+02 2.733443652356662597e+02 1.858481832262083344e+02 2.193747651131673706e+02 2.695165737089945424e+02 2.960753121523491700e+02 1.890691006834304631e+02 2.638343907584013550e+02 1.510492177865631334e+02 1.878288206285384661e+02 2.726561149875388992e+02 1.704246795027074199e+02 1.006381753343381718e+02 2.153734239260733148e+02 2.551451126036402854e+02
+1.591849792872858984e+02 1.304671215023752779e+02 1.427456440770346831e+02 2.882324895344759170e+02 1.680635293254793510e+02 1.205800311663507642e+02 2.861305963205076637e+02 1.219224106654408928e+02 2.467003871618023538e+02 2.830287806498602095e+02 1.445950870572595193e+02 2.496562286252286640e+02 1.464987579205844099e+02 2.848280464142704318e+02 2.785616857190397013e+02 1.837468579783306950e+02 1.246964377230690673e+02 1.251791080124520050e+02 1.496399061799681363e+02 1.375936265087168522e+02 2.547928467777094852e+02 2.554856419260690927e+02 1.285559318166884850e+02 2.092144446410586909e+02 2.868951534942014518e+02 1.178319347908447270e+02 1.347784205269015274e+02 2.851299399919766984e+02 1.754694686670390809e+02 1.016886128619324694e+02
+2.606618423405234353e+02 2.125366732076933545e+02 2.822772640751277322e+02 1.096405633955119185e+02 2.437561663288932721e+02 2.129146561548243994e+02 1.148823764090175530e+02 1.516868774610028368e+02 2.090025176018670265e+02 1.817684320186263562e+02 1.584667226055155709e+02 1.501973711988126468e+02 2.530199923706828713e+02 1.847948752811591930e+02 1.778871618489498303e+02 1.664551902511519188e+02 1.100020157933824265e+02 1.352000835393275509e+02 1.710981737682794801e+02 1.530513645967782566e+02 2.588476693974693035e+02 1.775587245068043956e+02 2.006331886716666588e+02 1.389709403689849694e+02 2.489553638298030194e+02 1.673604491791948021e+02 1.991154502489720812e+02 2.423848982654565418e+02 2.882603768001737308e+02 1.620650086718309240e+02
+2.723642490909132903e+02 1.680927290528325670e+02 1.005734627393615455e+02 1.598916606218045047e+02 1.672547346703738071e+02 2.361420151042074451e+02 2.741857058408131707e+02 2.533004150866734392e+02 2.036092771261417340e+02 1.091915011443997230e+02 1.145604210422382323e+02 1.209982156413156247e+02 2.749595368914399387e+02 2.177794513808643160e+02 2.054163746311436967e+02 2.185860861470465579e+02 1.504022045473846845e+02 1.713704456854883347e+02 2.175221629008602804e+02 1.230663148243889253e+02 2.419648244223723168e+02 1.383010418990747326e+02 2.040260833828849059e+02 2.966316994044250919e+02 1.630596872908637351e+02 2.562534082821714492e+02 2.549425872735235998e+02 1.983522705781282127e+02 1.524860865223137694e+02 2.736848821358530586e+02
+1.277021385004174192e+02 2.448445434866889343e+02 1.296687360965440803e+02 1.874271582575348702e+02 1.145742775945452792e+02 1.884744688522491742e+02 1.336298647132909423e+02 1.523816963142488419e+02 2.658270705367647224e+02 1.781637174983711134e+02 1.154610011723892171e+02 2.005342781476718415e+02 1.303166615041172918e+02 2.397284110571510496e+02 1.612912854182502542e+02 2.821645080329541315e+02 2.544831471501324813e+02 2.622237400581972224e+02 1.417212269902922230e+02 2.054005404298748658e+02 1.092142219674599062e+02 1.652051184306486107e+02 2.825679563619778492e+02 2.056286073102957630e+02 1.772062144904277545e+02 1.163520479257007310e+02 1.006186351926139366e+02 1.734025793931427586e+02 1.446958902579306709e+02 2.025820689614877779e+02
+1.798382687901162740e+02 1.604629760861514001e+02 2.668981169240885265e+02 2.763242846779806996e+02 1.318105471716862098e+02 2.191362245125996537e+02 2.770758446308884686e+02 2.308910816293108326e+02 2.956895796828827656e+02 1.566426856848869988e+02 2.326210561246332418e+02 1.206555816723871715e+02 2.603144096756907970e+02 1.172571782204154829e+02 2.219493974369055991e+02 2.385109304229506790e+02 2.599678734377965839e+02 2.850516346518521686e+02 1.472948582444382168e+02 2.234296740595885922e+02 1.427895312415343199e+02 2.848238578369252423e+02 2.260232767550441508e+02 1.544648385858973541e+02 1.163971462755376791e+02 1.762731012775239492e+02 1.089523563056807660e+02 1.663966154222005116e+02 1.342495772836978745e+02 2.922401077696804350e+02
+2.806557294060240224e+02 1.077657131130299604e+02 1.622983596366119059e+02 1.723469481204717795e+02 2.678046848873893850e+02 1.442059922525422451e+02 2.629931208031973711e+02 2.741083495447689415e+02 1.194142462414748707e+02 1.688961325073638022e+02 2.967954354880449728e+02 1.822107331135221671e+02 1.292333403080546645e+02 1.856814508383810391e+02 2.103923137448445573e+02 2.517859299913771451e+02 2.551152596962431574e+02 2.077883190793959898e+02 2.986930461834413677e+02 1.196764061335889551e+02 2.378823960447958257e+02 1.692017967083341432e+02 1.471250494556689432e+02 2.608355254883699672e+02 1.757172426071724942e+02 2.629426236813185369e+02 1.040244734248400533e+02 1.533558690719498827e+02 2.011860465194789072e+02 1.720545334339216765e+02
+2.966488050331527688e+02 1.809989340563203086e+02 1.871527370563514978e+02 2.315558973515319394e+02 2.657682292004950000e+02 2.237816732699509998e+02 2.282045922056215090e+02 1.846236325909775928e+02 1.644827554373339353e+02 2.760250360653360531e+02 2.492622345937652995e+02 1.483432536002697191e+02 1.527550390024584601e+02 1.573429964258168070e+02 2.090721206423400247e+02 2.535819867756219708e+02 2.420536340362719159e+02 1.691914404667937788e+02 2.388696721384086459e+02 2.593840245957078423e+02 1.331872961625781500e+02 1.116342264469163581e+02 1.680964276125217793e+02 1.555020753508222526e+02 2.422052215908822177e+02 2.626184375196450560e+02 2.674230788003709449e+02 1.948146659156083729e+02 2.663681889818526543e+02 2.795342087705012659e+02
+1.674728956867265310e+02 2.635505920196726493e+02 1.395353777027027604e+02 1.883233466008314565e+02 1.249441512057495913e+02 2.512189370435067417e+02 2.719913755602378842e+02 1.237326636617429614e+02 2.939951219495833357e+02 1.686366002602222807e+02 1.800181056076297068e+02 2.288525977776352818e+02 2.717306800175948638e+02 1.565292507387619594e+02 1.445460932655216766e+02 2.092313282690445249e+02 2.370375511382032698e+02 2.880525812713749474e+02 1.172567175017127141e+02 1.112412797274302250e+02 2.246954385922853135e+02 2.812359340959551446e+02 1.004168603505609241e+02 1.005387863078678805e+02 1.815971195408835683e+02 2.811251817522295937e+02 2.605765849402707772e+02 2.298114360271968621e+02 2.557293814584297706e+02 2.542416589790913122e+02
+2.943583269632734414e+02 1.442274778682184717e+02 2.700917391987959491e+02 2.527420049761408904e+02 1.527279900348522688e+02 1.841979337126335281e+02 2.902442440856567600e+02 2.889101481258517765e+02 1.828125218264408716e+02 1.133179379993730862e+02 1.484787634874768116e+02 2.676352293304336740e+02 1.452118425579454311e+02 2.636966617786087568e+02 1.313546620759107100e+02 1.834019443937838787e+02 2.892465421328221282e+02 2.575015388377624959e+02 1.970702343003932242e+02 2.507528167727347181e+02 1.724897096143170074e+02 2.664268628760375464e+02 1.365257050051324370e+02 1.198011035974838308e+02 1.176831988053894520e+02 1.070946883963453899e+02 1.964638491125322446e+02 2.570844982939356100e+02 1.593905150913052466e+02 1.202569936867807598e+02
+2.734271498156417692e+02 2.352133531486530842e+02 2.590835237087205769e+02 2.260994493040042528e+02 1.805421354394846105e+02 2.728408805160995598e+02 2.367263522625478913e+02 2.580210451062748689e+02 1.204524877415260562e+02 2.946465680607327613e+02 1.547220269335912803e+02 1.186203172746691337e+02 1.923878728892914864e+02 1.094127410697402354e+02 2.222837240826847278e+02 1.529333599077602628e+02 1.861450256630199647e+02 2.125583079944122176e+02 1.527591657960447264e+02 2.694001797345342766e+02 1.986063989766776388e+02 2.192493126389772442e+02 2.986827335637019587e+02 2.790660387254000625e+02 2.781487003899754313e+02 2.564198676846006606e+02 2.597551240338123648e+02 2.358970425952163907e+02 1.951628676328612357e+02 1.078208269500064347e+02
+1.190762776130697205e+02 2.951075493308472346e+02 1.091043363430719069e+02 2.824365312299846664e+02 2.445811468414383398e+02 2.538090805786315514e+02 1.230092364266577363e+02 2.633887649939744051e+02 1.865216093980499181e+02 1.540388898662323243e+02 2.047343894245035756e+02 1.431412534309083640e+02 2.857794001060171922e+02 1.492366175285521592e+02 1.380934567887849198e+02 1.331831467466375898e+02 1.149412013934811796e+02 2.205070844660474734e+02 2.939252657951740844e+02 2.049464694042562769e+02 2.047902832862141054e+02 1.810793422252176015e+02 2.005356992447976836e+02 1.381400138775680375e+02 2.582445444487385657e+02 1.698212931623984616e+02 2.252085951830697468e+02 1.808378144669676999e+02 1.307311344108444473e+02 1.050024101356033697e+02
+1.722314120162143354e+02 2.530014253763471856e+02 1.298340795948372772e+02 2.948664870226410812e+02 2.383106068289312702e+02 1.822969205106659558e+02 2.285226769051377005e+02 2.759417691711663565e+02 2.120970517474504220e+02 2.831046044310812704e+02 2.320579821788242612e+02 1.286125039667014960e+02 1.609837368065715282e+02 2.931112965353385107e+02 1.441758663366052531e+02 2.810263276191118962e+02 1.239857273771131077e+02 2.399447548605567988e+02 1.460208836055017514e+02 1.205325462037979491e+02 2.112513935912650993e+02 1.036793750016967692e+02 1.113202625217208777e+02 1.646612561683649574e+02 1.018350908838390581e+02 1.263835026124204859e+02 2.766683711501553944e+02 1.682407929561517506e+02 2.677103056024840271e+02 2.147294480454548307e+02
+2.763536852866382105e+02 1.511976958084401872e+02 1.026794659371155944e+02 1.805990415690671398e+02 2.442493962549426385e+02 1.881796213041043018e+02 1.028768312506858535e+02 2.787706953534510603e+02 2.589640601731795755e+02 1.730107396932538677e+02 2.218419822849910190e+02 2.651646152747807719e+02 1.476149140151474342e+02 1.986450675254654072e+02 1.050693447352362853e+02 1.819666738706916931e+02 2.873544952103893593e+02 1.472060704631180954e+02 1.297023844405691761e+02 2.824778443572924971e+02 2.918073394139615289e+02 2.128134400148996974e+02 2.223096450508596149e+02 2.761940547406351811e+02 1.348708672340777639e+02 1.857009592938832441e+02 1.062906640064134649e+02 2.104442283262811202e+02 2.812954268214299418e+02 2.739038950945439979e+02
+1.837264129055918147e+02 2.399207190527903322e+02 2.843910623120511900e+02 1.773207161532972975e+02 2.056581469496123873e+02 1.558029517788254168e+02 1.458438122541016924e+02 1.893030782939712253e+02 1.139027557376393673e+02 2.228775749423569437e+02 1.367670384452707140e+02 2.854480456674787092e+02 2.424985140340279202e+02 2.940521113211518696e+02 1.330693282221190259e+02 1.212599008475133076e+02 2.754747741586869552e+02 1.062856492128348549e+02 1.212724485003486166e+02 2.100514698158626743e+02 2.547262582240854272e+02 1.999488755181088777e+02 2.578561029518564283e+02 2.784200494851090752e+02 2.728829168298310606e+02 2.071711407548560544e+02 1.708729380756020362e+02 2.726254883308487251e+02 1.104364015278258364e+02 1.175773277008901090e+02
+2.554381337818412305e+02 1.634513906120204183e+02 2.309962436793083214e+02 2.460443770945291249e+02 1.618890365991254896e+02 1.046310291743186980e+02 2.772116654811295575e+02 2.098555252827713957e+02 2.309383801112169863e+02 2.845300950466865402e+02 1.268119123926061320e+02 1.697885006171669602e+02 1.901887742560337529e+02 2.605757830463372215e+02 2.755463791239279772e+02 1.771647294768940810e+02 2.403902735905423356e+02 1.774352552408031443e+02 1.796883744424403631e+02 2.736192366006921475e+02 2.118505050785533967e+02 1.873353967662169453e+02 1.802980863638028950e+02 1.869858546159753132e+02 1.200946851663063342e+02 2.350811068219035178e+02 2.018941614745772313e+02 1.010158706413519525e+02 1.661546933057649937e+02 2.570882207683835077e+02
+2.856134023048114159e+02 1.356279054667102741e+02 1.225310201562991494e+02 1.529777144242077327e+02 2.936506440162480658e+02 2.589580133771784176e+02 1.864782805190425279e+02 1.931182124516369640e+02 2.913608028278327993e+02 1.555662042949096531e+02 1.173676742008071301e+02 2.242990267171766732e+02 2.651338851871976203e+02 1.128980005738893482e+02 1.283582653966309408e+02 2.071495534530326097e+02 1.241509031508031740e+02 2.393403040292282640e+02 2.829812266966206380e+02 2.294799861563923287e+02 2.129576840814710295e+02 2.165539860914115877e+02 1.357366103660294243e+02 2.396252028023287153e+02 1.395106368224716107e+02 1.700689743264745744e+02 1.253435651632085950e+02 1.508112259783626428e+02 2.310267786371028933e+02 2.311667616985857876e+02
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-int-data.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-int-data.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4fd11b7509e65b01393a6af6125d1b304d524bd7
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-int-data.txt
@@ -0,0 +1,100 @@
+-67 65 82 64 51 1 -12 2 -84 -52 12 82 -45 -84 -41 31 -49 36 -70 40 -74 -99 32 64 -6 43 -53 -43 43 96
+-58 20 25 99 -25 78 -6 59 -23 30 36 25 -8 83 -43 -7 -8 42 -90 96 46 88 31 12 68 -21 -6 7 78 -19
+-66 -51 0 13 42 -43 -30 -29 20 10 -24 -5 -42 38 -56 6 1 -80 -65 -91 89 64 -21 49 -84 41 6 -78 71 -2
+-50 -84 -50 -66 46 -88 -10 -28 -25 6 -7 10 -35 86 41 -17 72 -67 13 -67 -76 -84 -15 35 67 40 90 38 -1 -47
+-51 27 -48 26 -73 -46 -68 -56 -38 -4 49 -64 57 -86 -80 70 50 34 84 97 -76 3 -54 -89 -7 -53 15 36 -28 85
+2 -59 4 30 70 -42 -26 -1 27 -90 -18 95 -10 -36 43 24 86 -8 -100 92 80 -40 17 -93 -81 54 -8 84 -53 38
+-80 0 -71 -41 -33 9 -61 0 26 80 64 67 74 68 -72 78 -72 -52 -19 37 -33 -24 -11 -71 -53 -16 25 56 -74 0
+71 -23 49 -36 -43 -70 82 69 -100 -27 50 20 30 84 -33 90 49 39 -52 -51 -86 -76 -72 -88 12 91 -96 -61 -87 -47
+21 39 1 78 68 -80 -54 71 17 -94 34 -20 14 -5 -24 55 -84 -50 -90 -24 -79 -81 53 -50 22 -13 -92 78 -22 -50
+-47 -73 77 -93 -20 51 -37 -14 -37 -18 -8 -14 -71 29 -27 -5 54 77 -7 -2 15 -23 98 -34 -65 -78 -77 -90 -5 -35
+92 -33 71 24 43 -19 50 -40 -48 -33 -51 -14 23 40 -78 -14 -76 1 52 69 93 5 -13 30 -60 -20 -54 49 -52 93
+32 -86 21 -41 -86 -38 97 -35 -37 -89 -15 -18 -46 -37 8 63 -63 -61 57 50 43 -27 -45 98 -56 -81 16 -38 -25 -28
+-18 19 -52 -86 92 -72 23 35 20 57 69 -22 52 -66 -74 -29 -1 -10 -97 22 -97 -93 -70 87 85 -31 42 -29 -10 -36
+78 80 -93 68 41 84 -37 -62 38 -9 99 -60 90 47 -33 -40 -59 97 -28 9 35 -6 -60 -83 -39 -97 -25 -78 95 40
+79 -35 -45 -46 69 10 29 -88 98 -44 66 11 45 -58 -11 -25 51 -44 54 30 59 98 35 -28 93 86 99 19 -27 -83
+80 77 -72 57 -35 -27 86 -67 11 77 -28 -89 -30 -31 -72 64 -95 -75 92 -32 -96 -14 6 -83 -66 -58 71 -17 58 -53
+-1 17 -72 82 -57 -48 -7 -44 -80 85 -99 -9 27 -11 24 13 86 18 67 -9 12 77 98 49 49 12 -82 45 31 -68
+-13 -75 -26 17 91 12 -95 -62 -54 -60 22 50 86 58 -11 -11 -21 31 16 -15 67 90 1 80 -57 -98 35 -54 51 91
+28 -75 -31 49 0 73 75 -66 50 -77 -20 82 -40 -90 -28 32 -44 89 -75 -33 -11 -19 -55 79 18 2 -39 -49 78 -72
+14 56 78 69 -40 -20 -39 71 99 -89 60 -82 -1 -77 -42 94 -41 35 72 11 -13 89 -52 -41 -93 43 -39 -61 68 -4
+88 18 -90 -75 -49 46 -28 -48 -69 -64 77 -8 91 -65 62 -27 -19 34 10 78 82 49 -34 63 78 -88 -17 -37 -85 91
+4 36 -77 -75 -12 70 42 8 7 -31 -69 -74 -65 18 85 -92 91 16 -15 24 -74 -56 71 -70 -90 20 13 73 -68 -65
+92 22 -31 -73 -59 -78 -20 -11 -61 36 -40 34 -96 -12 51 -45 -12 12 -3 -42 -71 68 -8 -91 50 -73 -96 -46 -38 -4
+-87 44 -58 -83 70 -81 32 29 -79 45 -64 -52 57 73 -80 69 7 -22 31 -71 -34 -33 47 79 -17 6 -77 -89 3 50
+85 2 73 -88 -99 -13 -76 1 -90 51 30 -52 75 -2 -8 10 -83 -40 -5 -79 82 19 79 94 49 4 66 -76 6 -48
+29 -34 66 -93 45 -1 -98 92 -92 29 -10 64 -23 -81 -73 -62 -18 37 -29 -50 -52 90 -28 24 -4 -67 -33 25 -78 93
+57 -46 36 -16 34 -59 -96 -86 64 2 28 42 -32 6 -17 37 38 -40 -92 55 -22 -42 11 -77 12 81 -89 -39 -30 -39
+-72 -68 -41 -5 93 55 24 -6 84 77 30 33 -51 -62 6 -5 -83 60 -1 -64 7 -7 -92 31 5 -21 -34 -14 21 -33
+26 -75 -36 -54 -21 -38 -49 -20 82 73 -84 -5 -69 84 -87 12 7 -67 -40 -50 -35 -65 80 -83 -2 1 34 -16 91 82
+61 -21 1 -64 -56 -61 74 16 0 38 51 34 -35 37 -28 -52 -14 61 14 58 50 27 -43 -27 14 56 -16 -78 50 -89
+45 -47 -61 68 -41 -70 14 -51 49 -84 64 -65 88 -39 -88 28 -55 -18 81 -2 -1 -45 65 -6 62 16 71 71 -1 47
+47 60 22 -42 -5 -74 12 66 89 -82 -85 65 74 0 -18 56 -39 84 -65 -42 -33 -60 23 33 -8 -72 3 -64 -3 -25
+-70 11 -19 -12 -1 -50 -89 -61 78 28 55 92 -17 86 -17 -45 -31 68 -24 -99 -59 27 79 -2 21 -80 54 9 14 -70
+-38 52 -99 50 -46 -63 -74 -41 -43 -62 -81 38 -99 17 -94 -6 44 -20 -13 -30 71 -43 43 -28 -8 57 -93 98 4 42
+-17 -27 -60 -22 86 -49 39 -83 72 -16 82 74 73 -29 16 -59 81 -60 -96 51 -62 -55 -79 -31 -15 -67 -18 -83 -61 -86
+28 37 -44 7 -17 -10 -65 8 -78 -17 -46 -5 -35 -86 13 -16 27 24 60 -12 -48 -45 16 -33 70 -45 -63 -60 21 70
+-75 -89 -93 -93 62 -44 -39 46 31 57 72 30 -65 29 66 -53 2 -2 71 -90 -73 -40 -63 32 68 30 25 98 38 92
+88 3 5 73 -2 -61 -94 79 99 94 71 -83 -40 80 -79 -14 -34 -99 -52 27 23 13 13 -35 -74 13 43 -19 2 -62
+92 -47 -27 9 -68 -86 -57 43 9 -81 -9 69 52 -28 80 -13 -6 -44 -81 -89 -10 30 -64 86 -76 -11 -100 15 12 -62
+76 -42 39 70 74 79 84 -52 18 -58 78 53 89 58 -32 20 -51 35 12 37 -70 -21 5 97 67 -25 -25 -10 2 30
+-84 26 -60 -34 11 -27 47 85 -89 29 54 -53 66 -9 12 4 92 70 2 -12 -55 72 -62 -79 -8 68 -19 12 -8 -100
+78 -97 -76 86 -47 42 99 -3 9 49 -84 86 26 43 -26 90 23 -66 -37 -35 25 -12 -42 -12 96 -15 48 87 -95 -12
+-60 57 -30 -4 -84 24 -82 -5 34 56 76 81 -64 23 32 34 -41 -48 -6 77 -42 64 87 92 82 59 9 -71 -56 -45
+-74 -90 -27 93 33 15 -35 -73 78 23 17 -28 9 63 9 35 15 32 0 -4 -32 54 -76 14 -14 -8 16 -43 -81 57
+-2 22 85 -33 -48 74 64 -59 -27 17 -65 27 -50 -81 41 -69 -26 -29 -83 48 -81 51 58 -62 -63 -55 -63 39 32 -34
+98 -99 13 25 -10 43 -62 50 82 -90 -51 40 -71 82 27 -73 19 -62 37 10 -21 45 -94 -45 -41 -3 44 86 -2 27
+-80 -89 -57 87 -42 19 32 -49 37 -4 -30 54 46 -3 -92 89 60 37 -86 38 61 93 45 -45 -86 54 21 45 50 -53
+7 -68 71 -6 41 -72 67 45 15 46 85 59 82 19 65 75 -62 -35 47 -51 23 41 -54 27 -99 14 9 69 60 62
+99 -51 83 -47 -19 -57 -22 51 -52 52 92 80 69 1 -31 0 -19 -54 73 -5 3 82 -86 -84 -95 -83 -92 -52 -90 -79
+43 -75 62 99 66 -43 -38 -21 23 35 -63 -61 -46 5 3 -90 -28 55 87 89 -29 -46 23 -61 -5 10 -70 -63 50 -14
+39 38 10 66 -24 -45 55 -33 31 29 44 31 73 44 6 69 -21 -58 -3 93 -51 86 -16 -88 88 -30 75 78 -20 -12
+-11 11 -19 40 82 6 10 22 90 -78 -88 -49 72 69 -62 42 -23 22 -38 -98 0 -3 -43 20 9 18 -67 -7 22 21
+99 80 -55 74 43 -31 60 -26 -29 -6 75 60 92 -42 85 18 1 1 -74 -44 -12 72 -57 -98 99 62 45 -40 -39 -75
+50 30 -18 -29 -80 -59 -96 46 -99 -76 -13 -75 -93 -95 -45 62 -37 53 -96 57 -40 3 14 -45 -84 58 75 16 37 -6
+1 -47 87 -99 -22 -22 -20 71 -91 13 35 -80 75 65 -87 16 -37 99 -60 49 52 18 55 -11 18 24 -65 -80 8 -79
+-8 -87 86 -9 -64 -76 59 -52 -89 18 13 70 44 93 99 62 39 49 83 28 72 -71 -13 -71 -22 44 -87 73 -68 80
+41 -26 44 -63 -26 -83 -44 63 -51 -48 52 -8 55 73 -45 84 40 45 32 -34 -78 -46 -79 57 -40 11 34 -75 -20 91
+94 9 -35 -5 3 59 -63 2 -7 -72 -34 -70 78 99 -29 37 11 91 61 29 85 -15 59 79 47 41 19 -18 -92 47
+-59 -89 57 -72 -79 88 -85 18 -35 -96 -57 33 83 70 -55 -16 -21 72 -53 89 -44 -86 9 -44 -26 78 2 -93 -75 6
+55 73 89 80 -69 -93 -39 -88 62 49 91 -68 87 -26 40 16 -49 -53 -57 23 -97 39 -78 44 -15 1 60 -87 43 -42
+-2 -23 -74 -80 -59 52 -58 68 64 97 -86 -41 -88 35 49 3 -40 90 34 -2 3 13 -95 8 -1 6 75 92 19 -31
+57 76 65 3 37 -72 -43 57 64 -23 41 87 26 76 -18 -32 28 47 11 47 -33 -12 4 81 -92 -47 -81 43 -2 5
+68 74 66 -89 -95 -40 -78 -58 -54 -20 2 20 94 -35 58 -20 41 77 0 95 39 14 36 -40 -85 -60 -63 82 0 58
+-61 -99 61 10 -2 -31 -70 37 -77 -10 85 95 -28 70 -81 -78 -68 -33 -77 77 -6 42 -100 -68 -59 -86 -42 -74 35 -32
+64 -1 -1 -64 51 11 -65 47 -87 -8 5 58 22 -80 68 -25 24 59 -25 -75 95 -22 -73 27 86 -39 -98 -1 -17 -32
+94 -50 -53 -62 -53 46 50 38 -95 -77 40 -38 -23 -14 -68 -20 -47 23 -8 -12 -92 -69 -97 30 94 -45 47 -81 82 -60
+28 67 -48 4 74 27 -30 12 -32 35 91 -83 30 -55 -7 79 97 11 93 -45 -79 31 78 65 84 -23 -26 17 -61 43
+44 60 -88 72 31 98 55 -4 66 -14 10 -81 -40 66 -15 21 69 -98 34 3 75 18 98 -6 47 -39 31 -19 30 -51
+-6 18 -93 31 51 -20 -16 -33 -38 -19 71 4 -53 23 97 1 -28 -72 -44 -48 45 33 -76 86 64 49 -45 -34 -9 -76
+-19 8 28 -27 -51 -58 -36 63 -92 -95 70 41 -38 -49 -95 -100 43 97 -60 -5 -56 45 -13 -3 20 -10 -21 -85 -5 63
+-74 -74 -74 -39 -57 -12 51 11 -11 -22 -26 -54 71 24 -37 77 -90 77 75 86 -53 3 69 -99 -82 -59 30 81 -21 -86
+67 63 87 -15 60 -82 87 51 -39 -49 -16 74 51 17 6 47 98 89 -20 -98 97 -61 18 34 37 -36 37 -96 90 44
+53 -8 37 -76 -61 70 -77 -11 98 -80 12 -80 6 -89 8 -59 -69 -100 -52 -30 95 -58 61 29 52 -64 -51 10 16 -58
+54 -10 49 62 76 -25 80 36 13 5 59 -65 14 41 26 -78 23 -45 -51 -85 91 -43 -61 -37 94 27 -11 49 98 48
+53 -51 27 34 28 -53 18 17 31 -31 59 71 -34 25 54 -84 -34 -24 76 38 -36 15 -1 56 2 -12 0 26 -38 -62
+4 -94 -63 -21 -95 -42 -12 86 14 -86 -1 80 -48 62 -47 -52 3 91 -86 11 79 32 -24 -33 -54 19 -17 28 -33 -97
+-18 41 84 1 -83 48 -99 -64 26 -52 3 -64 68 -98 93 -79 -97 11 88 74 41 -31 -42 -35 -66 18 97 -30 19 -93
+-19 42 61 -91 -20 59 -11 -64 -60 85 -6 -71 33 -52 46 51 -86 -77 74 -4 74 -81 1 -39 -30 12 -12 20 66 60
+86 1 -67 -91 -92 -22 91 -90 -45 26 53 -6 99 46 -29 -40 -99 57 -45 -47 -3 -86 90 -78 -33 73 90 -51 -75 2
+88 -34 -2 30 -18 35 -23 90 99 -49 90 -79 94 -38 48 67 -35 -58 81 -24 18 -54 83 65 -58 -12 13 89 -59 57
+92 -99 94 -73 97 -78 -93 98 -78 95 -21 -17 -11 -92 69 -60 86 9 -36 -18 -33 -39 -65 74 -65 37 -49 87 -28 -81
+-95 2 -18 20 93 54 86 -63 -5 -89 17 -9 75 -66 -64 -82 -46 -48 82 5 -89 19 -32 -45 53 -47 21 -9 40 34
+86 87 55 -41 49 -10 -6 -7 -99 23 90 -50 -9 -81 77 65 29 -21 22 -82 19 48 -24 -72 75 -66 -69 -17 72 6
+13 37 96 31 -65 -54 -91 -27 84 52 -9 -28 85 96 14 63 -34 -29 -85 78 -75 -44 -30 -5 4 72 -45 6 13 71
+96 -69 67 59 69 46 80 42 81 30 89 -45 -10 -44 25 31 89 16 -36 86 31 92 1 5 -2 92 -11 77 20 40
+-48 98 -100 30 54 9 84 -88 5 48 93 56 -94 -89 81 33 44 -30 -95 -98 29 -33 13 -26 -59 -80 -68 -40 12 11
+82 -63 -30 -67 54 -68 50 -63 -91 -68 -45 -66 -58 16 -25 9 -50 -59 -55 4 -2 0 -63 67 30 -21 -8 55 21 -68
+9 -8 56 -6 84 81 -63 -35 81 56 -50 -54 96 -51 86 0 66 -4 -18 65 -26 -57 8 78 -54 17 18 86 21 68
+9 38 33 16 3 86 -57 28 -6 -44 -42 -2 3 -71 -86 23 34 -29 33 -30 67 63 -11 76 -65 92 30 -66 61 1
+-72 -85 -1 64 -79 -78 -1 15 -35 -32 80 33 -36 -82 24 -65 -23 29 38 -31 87 55 -18 -52 -77 -22 -11 54 62 -48
+65 -77 50 16 41 -94 -21 16 85 24 60 86 -78 -13 69 46 55 5 -27 -18 -6 -1 59 -62 -58 -99 -49 -84 89 18
+-21 -15 -55 60 78 98 67 94 58 -5 -36 42 36 73 13 72 -78 -68 41 -37 -33 -46 -80 40 13 -44 -71 -8 15 -77
+16 -93 -42 -10 14 57 -54 -3 -44 -21 30 -93 71 25 -60 -94 93 5 -94 -84 -72 1 -50 -34 23 -15 15 18 72 -29
+-22 -82 -30 -87 -88 -25 46 32 -30 -55 -79 -85 71 -89 -57 -88 21 53 -100 -64 -92 -97 56 -51 -17 -34 -31 6 -68 84
+-53 -51 90 -38 -61 57 -63 67 22 22 70 44 43 97 20 -62 -74 72 83 -32 35 -66 -29 5 -88 55 -94 94 -19 55
+57 51 29 -42 -21 63 -57 7 -48 -87 -60 -55 -77 -53 -1 -85 64 60 53 71 41 59 -61 -73 -12 86 90 10 -60 -38
+2 -9 14 67 -2 70 11 -78 26 -55 -86 -25 99 66 63 64 46 59 66 -37 -78 -70 63 1 -20 2 46 50 34 19
+-87 -40 75 -11 -88 -80 -95 -20 -92 -28 83 24 88 -39 83 -36 -61 56 99 -73 -59 -85 -49 -10 91 12 -79 -18 -15 6
+35 -74 -4 -15 40 -87 81 -22 -12 -46 14 9 98 -35 -2 -12 57 -74 -52 71 70 -70 -61 -47 89 44 33 -100 54 42
+-4 -34 80 -12 -15 -9 -8 -29 89 -55 -33 89 16 -33 -73 -82 98 27 88 59 48 20 -67 -21 -86 11 -50 46 64 -8
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-uint-data.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-uint-data.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c1ec7a5d64e540428507ee5a3358743b6c034ebc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/random-uint-data.txt
@@ -0,0 +1,100 @@
+52 34 59 34 64 20 89 69 26 93 95 32 17 93 77 49 51 60 51 27 60 10 61 2 16 30 41 68 65 0
+43 74 11 37 32 61 72 29 47 21 7 47 68 58 22 33 29 37 14 45 71 1 67 79 69 9 6 6 95 78
+86 20 68 67 43 5 77 70 96 37 79 71 35 30 22 4 56 28 33 50 97 17 85 52 21 5 57 19 35 97
+15 21 99 4 54 39 15 29 68 21 50 76 64 51 79 0 24 5 65 95 90 51 99 82 9 80 61 32 2 38
+46 97 53 96 51 84 18 42 30 52 82 77 72 59 1 67 72 16 14 63 70 94 20 27 38 70 86 95 41 75
+2 35 45 63 92 76 81 60 62 72 90 46 47 33 1 30 54 22 50 85 63 61 22 79 45 53 45 33 8 28
+43 41 14 79 2 77 95 16 74 19 17 78 47 12 68 55 3 2 77 10 35 86 52 33 47 26 98 42 48 86
+18 32 85 4 91 10 69 68 15 42 58 77 88 64 91 43 56 30 92 11 52 23 43 92 65 50 68 8 80 81
+20 57 38 44 62 10 80 25 32 11 70 32 13 50 41 55 44 0 28 83 5 1 34 94 55 52 56 24 76 21
+36 43 59 28 10 59 4 41 64 98 54 66 44 3 37 41 67 10 85 23 58 35 58 34 35 79 46 18 1 51
+72 63 85 51 23 91 3 56 35 72 38 26 91 0 68 98 27 10 12 71 30 1 14 47 47 88 17 68 78 46
+53 47 1 89 95 53 11 45 46 6 91 20 57 35 58 79 60 3 21 45 4 18 59 96 36 12 13 83 52 46
+33 91 82 24 97 28 50 43 65 22 14 44 32 57 33 10 34 77 58 6 27 90 26 77 62 81 87 96 0 32
+96 44 59 3 47 18 0 91 83 68 48 26 67 82 39 18 88 47 80 0 57 40 30 7 57 74 49 37 57 65
+18 44 0 46 47 30 65 79 53 8 26 42 80 76 30 61 82 93 78 25 89 49 55 15 86 63 35 74 41 11
+18 14 40 90 91 79 80 36 33 72 25 56 73 28 65 27 62 17 60 84 23 70 32 26 77 97 47 94 72 1
+82 36 68 10 83 83 40 42 51 55 82 6 37 69 93 82 64 13 54 30 45 36 87 59 1 80 39 93 11 61
+78 34 53 39 64 52 52 22 33 69 71 82 57 37 78 52 62 31 87 68 70 5 85 94 41 75 38 45 84 22
+36 23 51 15 61 76 88 85 36 96 21 60 34 61 72 60 69 81 5 17 16 82 30 61 39 96 40 70 42 71
+45 30 60 50 78 90 36 40 11 85 42 14 61 3 66 53 68 14 41 30 97 74 79 91 64 8 1 53 52 33
+55 24 35 4 49 51 44 70 93 78 25 65 1 29 96 12 93 94 13 65 4 47 84 10 90 12 36 48 21 36
+17 74 61 54 21 83 35 97 47 90 57 11 16 39 95 78 23 40 23 55 17 51 20 73 98 93 50 32 58 4
+84 76 78 33 50 29 11 20 5 93 63 22 91 92 44 85 62 25 63 92 36 26 57 33 8 74 69 64 78 91
+58 34 91 71 37 84 28 90 28 37 97 7 26 44 59 18 58 64 31 83 16 17 50 36 65 81 19 63 66 64
+20 71 1 35 87 5 47 27 6 95 86 75 74 9 94 93 26 5 61 3 97 88 0 57 21 64 46 24 86 12
+23 53 31 39 37 77 29 51 85 10 41 91 67 82 50 91 53 72 75 81 50 63 52 92 83 49 92 50 26 9
+38 43 13 87 11 45 28 16 27 61 70 52 77 9 57 42 73 22 32 95 23 91 93 63 16 44 26 9 93 83
+77 68 21 96 44 45 9 2 14 2 67 90 55 82 67 21 18 64 31 16 2 27 86 42 34 72 22 98 91 33
+89 66 87 76 0 32 81 39 55 76 23 56 51 53 75 79 30 86 1 66 64 14 46 84 92 19 95 47 77 97
+88 79 61 26 66 92 54 22 15 25 26 0 76 27 17 59 48 4 42 61 65 91 0 62 55 79 29 88 10 11
+24 89 91 39 56 36 16 86 41 31 14 35 7 71 77 74 33 11 49 7 96 83 31 63 90 49 96 22 58 86
+45 7 93 44 50 54 83 80 3 36 11 38 14 17 10 84 96 94 26 34 26 75 72 0 41 89 96 47 39 88
+0 95 2 22 68 38 0 3 51 6 13 10 14 49 75 69 25 39 63 67 12 80 37 77 10 90 60 35 84 37
+98 56 99 75 49 66 3 33 65 86 1 79 91 23 69 98 91 73 95 45 64 26 99 75 49 77 71 55 42 18
+80 39 26 94 85 42 91 27 14 57 36 34 10 44 38 77 23 39 54 25 32 5 17 9 66 3 67 94 20 11
+88 80 30 77 72 67 16 75 84 87 60 89 21 94 24 11 63 8 79 89 37 18 6 82 76 70 81 95 67 95
+92 36 55 55 43 18 76 94 30 74 95 38 45 95 54 87 22 57 4 65 15 90 90 38 73 24 67 24 36 25
+98 30 34 68 11 48 42 38 80 23 12 91 77 22 65 2 88 31 70 12 46 63 17 63 27 76 21 71 70 7
+76 29 56 12 41 66 22 96 8 6 7 13 27 10 77 90 2 76 30 24 81 88 19 16 93 13 30 24 98 96
+45 94 89 41 52 14 71 88 80 74 7 85 44 69 65 88 4 15 84 97 86 5 53 15 39 34 9 10 45 20
+95 47 45 96 71 10 36 10 90 49 7 68 14 46 97 89 82 58 69 34 93 77 90 9 27 91 29 27 22 17
+80 6 29 26 34 59 10 55 32 53 18 72 39 40 29 35 52 64 2 64 38 83 16 46 53 20 19 8 10 67
+47 44 79 32 58 82 26 69 0 26 4 73 95 98 61 96 20 38 3 92 6 5 25 24 42 49 15 92 80 16
+74 37 86 84 47 15 56 36 43 59 72 72 74 73 49 54 26 5 40 80 78 48 4 65 31 70 14 91 88 72
+91 45 73 62 83 40 49 3 27 79 80 90 3 3 58 44 7 66 77 42 37 25 20 91 47 63 71 7 72 22
+51 3 36 90 45 84 18 55 75 78 42 62 86 63 65 67 46 75 1 79 2 85 85 60 36 92 34 89 66 99
+36 99 0 63 89 65 54 58 52 28 98 27 67 1 45 71 35 52 55 55 44 23 46 89 83 37 8 2 92 75
+51 13 71 2 9 95 23 60 24 98 86 43 32 16 75 70 92 78 26 84 29 14 35 55 61 89 73 59 76 44
+59 57 28 92 33 50 70 94 89 67 70 38 53 16 35 70 35 92 39 78 88 80 71 1 93 21 87 64 49 84
+29 6 17 45 38 65 41 48 81 69 34 12 2 14 41 71 16 92 69 27 61 74 58 20 75 19 39 66 57 82
+12 8 14 85 97 31 58 31 20 76 6 42 29 95 60 94 15 84 86 69 73 52 73 57 12 66 89 65 60 84
+20 74 96 34 83 41 8 37 22 36 30 25 20 8 58 73 9 75 76 73 84 38 16 24 95 95 68 66 43 19
+33 15 25 80 48 69 63 39 16 45 6 77 14 46 38 15 64 85 49 5 59 28 9 4 23 68 59 26 1 75
+35 45 3 6 34 59 55 51 81 59 59 93 18 41 8 44 88 7 86 4 88 90 24 54 73 62 89 13 44 92
+72 60 68 83 39 32 30 15 98 92 69 94 51 48 9 0 4 1 30 92 40 1 61 82 66 4 39 10 93 87
+12 20 34 72 33 31 67 71 67 47 98 76 53 29 17 17 13 31 43 76 25 37 8 39 9 5 96 41 87 66
+96 30 2 57 57 10 14 17 86 76 35 94 42 54 18 24 19 34 12 42 18 11 83 65 86 38 45 17 60 70
+19 62 71 99 35 60 96 30 44 80 78 15 14 5 32 43 10 26 81 72 41 98 30 87 75 8 53 33 25 95
+22 0 38 57 88 7 47 83 49 41 52 1 14 93 41 3 18 42 15 57 28 74 97 2 18 48 64 25 77 69
+36 95 65 81 44 41 6 74 62 16 72 81 15 72 31 5 22 17 19 6 7 15 82 10 31 93 11 45 41 11
+22 76 14 62 34 65 82 5 57 51 51 5 1 6 17 43 28 31 90 99 48 14 96 49 95 40 87 85 40 51
+95 13 99 46 52 80 4 18 95 94 0 46 10 80 3 34 60 15 86 10 28 59 6 35 14 93 18 8 3 65
+57 37 6 31 45 85 42 34 47 92 48 40 7 17 5 74 67 62 0 74 58 21 23 3 5 24 50 54 99 19
+24 14 10 4 36 33 88 51 40 66 40 56 65 23 43 13 82 62 27 88 89 91 36 37 19 11 50 39 96 68
+82 7 39 80 52 90 57 17 61 15 51 71 82 15 21 44 4 46 75 50 78 18 63 75 98 45 6 16 57 25
+0 26 56 74 62 84 71 42 25 86 68 10 73 0 71 6 15 99 1 51 45 42 5 49 3 35 84 29 15 36
+60 78 76 3 95 73 36 57 35 44 50 42 85 57 18 69 37 42 75 79 15 12 74 72 51 36 79 3 58 71
+69 24 16 96 17 25 21 94 71 78 74 39 7 96 3 12 13 16 7 99 65 72 12 28 75 44 55 8 75 67
+3 13 92 9 92 83 69 91 65 92 29 63 46 1 4 62 29 85 47 93 81 3 15 23 63 50 17 9 13 13
+9 18 46 53 0 86 10 41 87 89 24 25 70 73 8 23 27 76 66 46 58 39 28 1 99 64 59 13 7 68
+72 57 90 50 47 57 34 27 94 39 23 31 74 77 45 74 18 49 96 8 95 50 20 81 73 55 72 2 32 15
+87 77 74 5 99 86 5 65 97 39 17 74 48 87 20 66 28 2 18 58 49 22 79 23 36 30 64 20 71 32
+35 43 66 96 63 77 18 90 47 86 94 19 88 79 23 12 38 4 56 42 36 2 77 1 3 17 64 52 31 24
+80 2 4 39 61 60 74 83 28 28 61 10 71 82 44 29 55 30 1 58 81 79 34 41 85 82 84 55 22 12
+76 77 58 92 90 0 54 28 77 68 58 12 1 81 37 28 19 60 71 59 25 83 8 49 52 11 28 65 59 70
+14 1 92 90 5 48 28 78 1 42 54 43 60 83 72 19 28 33 12 52 18 15 56 95 39 33 37 70 53 23
+53 76 26 31 18 81 83 79 25 1 82 43 50 24 63 49 5 23 66 37 80 41 63 77 2 28 15 21 32 93
+80 41 81 7 37 95 19 42 57 30 12 25 29 34 41 45 87 8 20 95 63 16 99 55 16 61 16 36 81 25
+32 30 2 81 23 25 88 30 37 76 52 77 79 58 21 58 10 0 13 32 72 80 3 75 75 25 21 9 79 18
+26 13 36 63 43 2 50 41 65 18 88 44 82 75 73 24 1 30 54 68 15 18 22 50 41 99 27 96 51 53
+22 4 76 11 85 88 28 75 1 2 92 66 63 3 58 43 53 5 1 24 99 90 87 87 41 1 85 37 98 92
+16 39 13 88 60 55 35 11 34 23 23 85 79 41 79 87 65 78 47 83 88 78 35 84 30 61 37 58 25 55
+27 33 15 76 82 79 73 92 93 78 18 38 22 96 63 92 41 9 50 96 14 55 8 60 15 61 97 56 43 22
+42 34 94 11 35 70 50 49 36 34 59 14 87 84 88 83 4 69 29 99 35 24 2 18 97 97 74 88 91 49
+33 25 71 12 60 2 48 22 81 33 27 95 54 25 53 14 20 43 26 96 98 37 64 27 72 33 78 45 22 61
+61 21 91 38 92 47 26 90 78 96 58 41 21 72 81 61 55 9 55 60 28 25 25 74 73 81 64 16 49 39
+90 89 12 93 91 23 82 36 63 58 73 81 49 32 60 39 4 84 73 16 18 26 58 85 46 28 82 91 72 7
+79 41 28 76 33 70 47 6 18 64 40 54 45 61 28 63 87 83 38 9 65 68 62 45 80 63 89 29 20 40
+20 59 58 23 61 79 35 19 78 2 26 48 90 34 69 31 31 42 92 33 18 74 28 47 45 52 36 89 19 40
+58 13 72 24 31 26 73 72 84 29 85 99 20 32 54 92 8 80 86 58 23 80 59 21 76 75 90 76 92 57
+74 53 80 51 8 88 84 63 82 99 97 77 38 9 51 61 37 20 68 47 65 21 53 82 85 96 62 65 35 4
+71 82 14 18 88 79 38 76 66 27 10 10 62 54 80 21 6 57 83 33 52 10 97 37 6 38 12 51 0 84
+95 30 75 92 84 30 55 57 32 44 53 24 77 81 34 84 69 85 91 33 50 72 62 79 62 12 59 75 99 81
+38 42 47 1 11 34 27 77 70 85 89 84 79 15 14 54 78 93 72 68 63 39 98 72 55 32 93 0 13 21
+3 15 10 15 3 31 84 89 53 5 60 41 66 77 45 12 68 68 50 68 99 64 46 54 30 56 2 90 99 78
+66 10 27 89 42 16 9 98 16 2 68 51 0 22 73 60 69 96 37 69 30 36 20 21 51 26 65 13 74 86
+94 58 34 97 77 88 90 75 47 30 6 36 89 66 48 9 20 6 52 45 0 37 99 46 11 53 53 72 94 40
+5 71 50 96 89 71 80 43 27 95 49 9 74 28 62 65 64 97 2 55 58 11 69 0 31 22 73 20 66 11
+63 39 84 62 64 5 56 92 26 86 19 20 56 85 42 48 56 51 54 29 26 95 72 38 70 61 16 54 57 19
+76 97 40 99 73 68 98 92 97 62 73 1 29 72 18 70 90 4 98 95 70 36 65 45 86 36 88 38 64 54
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/selfdual-4d-polytope.txt b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/selfdual-4d-polytope.txt
new file mode 100644
index 0000000000000000000000000000000000000000..47ce4a7ae522fc2a2bbaa9d8ca285913b8ef0712
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/data/selfdual-4d-polytope.txt
@@ -0,0 +1,27 @@
+# The facets of a self-dual 4-dim regular polytope
+# with 24 octahedron facets. Taken from cddlib.
+# Format b + Ax >= 0
+ 1  1  1  1  1
+ 1  1  1  1 -1
+ 1  1  1 -1  1
+ 1  1  1 -1 -1
+ 1  1 -1  1  1
+ 1  1 -1  1 -1
+ 1  1 -1 -1  1
+ 1  1 -1 -1 -1
+ 1 -1  1  1  1
+ 1 -1  1  1 -1
+ 1 -1  1 -1  1
+ 1 -1  1 -1 -1
+ 1 -1 -1  1  1
+ 1 -1 -1  1 -1
+ 1 -1 -1 -1  1
+ 1 -1 -1 -1 -1
+ 1  2  0  0  0
+ 1  0  2  0  0
+ 1  0  0  2  0
+ 1  0  0  0  2
+ 1 -2  0  0  0
+ 1  0 -2  0  0
+ 1  0  0 -2  0
+ 1  0  0  0 -2
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__plotutils.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__plotutils.py
new file mode 100644
index 0000000000000000000000000000000000000000..0e2553bf7ad56e97b567e5b334ccf17921f7f7f3
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__plotutils.py
@@ -0,0 +1,91 @@
+import pytest
+import numpy as np
+from numpy.testing import assert_, assert_array_equal, assert_allclose
+
+try:
+    import matplotlib
+    matplotlib.rcParams['backend'] = 'Agg'
+    import matplotlib.pyplot as plt
+    has_matplotlib = True
+except Exception:
+    has_matplotlib = False
+
+from scipy.spatial import \
+     delaunay_plot_2d, voronoi_plot_2d, convex_hull_plot_2d, \
+     Delaunay, Voronoi, ConvexHull
+
+
+@pytest.mark.skipif(not has_matplotlib, reason="Matplotlib not available")
+class TestPlotting:
+    points = [(0,0), (0,1), (1,0), (1,1)]
+
+    def test_delaunay(self):
+        # Smoke test
+        fig = plt.figure()
+        obj = Delaunay(self.points)
+        s_before = obj.simplices.copy()
+        r = delaunay_plot_2d(obj, ax=fig.gca())
+        assert_array_equal(obj.simplices, s_before)  # shouldn't modify
+        assert_(r is fig)
+        delaunay_plot_2d(obj, ax=fig.gca())
+
+    def test_voronoi(self):
+        # Smoke test
+        fig = plt.figure()
+        obj = Voronoi(self.points)
+        r = voronoi_plot_2d(obj, ax=fig.gca())
+        assert_(r is fig)
+        voronoi_plot_2d(obj)
+        voronoi_plot_2d(obj, show_vertices=False)
+
+    def test_convex_hull(self):
+        # Smoke test
+        fig = plt.figure()
+        tri = ConvexHull(self.points)
+        r = convex_hull_plot_2d(tri, ax=fig.gca())
+        assert_(r is fig)
+        convex_hull_plot_2d(tri)
+
+    def test_gh_19653(self):
+        # aspect ratio sensitivity of voronoi_plot_2d
+        # infinite Voronoi edges
+        points = np.array([[245.059986986012, 10.971011721360075],
+                           [320.49044143557785, 10.970258360366753],
+                           [239.79023081978914, 13.108487516946218],
+                           [263.38325791238833, 12.93241352743668],
+                           [219.53334398353175, 13.346107628161008]])
+        vor = Voronoi(points)
+        fig = voronoi_plot_2d(vor)
+        ax = fig.gca()
+        infinite_segments = ax.collections[1].get_segments()
+        expected_segments = np.array([[[282.77256, -254.76904],
+                                       [282.729714, -4544.744698]],
+                                      [[282.77256014, -254.76904029],
+                                       [430.08561382, 4032.67658742]],
+                                      [[229.26733285,  -20.39957514],
+                                       [-168.17167404, -4291.92545966]],
+                                      [[289.93433364, 5151.40412217],
+                                       [330.40553385, 9441.18887532]]])
+        assert_allclose(infinite_segments, expected_segments)
+
+    def test_gh_19653_smaller_aspect(self):
+        # reasonable behavior for less extreme aspect
+        # ratio
+        points = np.array([[24.059986986012, 10.971011721360075],
+                           [32.49044143557785, 10.970258360366753],
+                           [23.79023081978914, 13.108487516946218],
+                           [26.38325791238833, 12.93241352743668],
+                           [21.53334398353175, 13.346107628161008]])
+        vor = Voronoi(points)
+        fig = voronoi_plot_2d(vor)
+        ax = fig.gca()
+        infinite_segments = ax.collections[1].get_segments()
+        expected_segments = np.array([[[28.274979, 8.335027],
+                                       [28.270463, -42.19763338]],
+                                      [[28.27497869, 8.33502697],
+                                       [43.73223829, 56.44555501]],
+                                      [[22.51805823, 11.8621754],
+                                       [-12.09266506, -24.95694485]],
+                                      [[29.53092448, 78.46952378],
+                                       [33.82572726, 128.81934455]]])
+        assert_allclose(infinite_segments, expected_segments)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__procrustes.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__procrustes.py
new file mode 100644
index 0000000000000000000000000000000000000000..42a3c4d35bd55e2ffecefb691c805f517c56d6ca
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test__procrustes.py
@@ -0,0 +1,116 @@
+import numpy as np
+from numpy.testing import assert_allclose, assert_equal, assert_almost_equal
+from pytest import raises as assert_raises
+
+from scipy.spatial import procrustes
+
+
+class TestProcrustes:
+    def setup_method(self):
+        """creates inputs"""
+        # an L
+        self.data1 = np.array([[1, 3], [1, 2], [1, 1], [2, 1]], 'd')
+
+        # a larger, shifted, mirrored L
+        self.data2 = np.array([[4, -2], [4, -4], [4, -6], [2, -6]], 'd')
+
+        # an L shifted up 1, right 1, and with point 4 shifted an extra .5
+        # to the right
+        # pointwise distance disparity with data1: 3*(2) + (1 + 1.5^2)
+        self.data3 = np.array([[2, 4], [2, 3], [2, 2], [3, 2.5]], 'd')
+
+        # data4, data5 are standardized (trace(A*A') = 1).
+        # procrustes should return an identical copy if they are used
+        # as the first matrix argument.
+        shiftangle = np.pi / 8
+        self.data4 = np.array([[1, 0], [0, 1], [-1, 0],
+                              [0, -1]], 'd') / np.sqrt(4)
+        self.data5 = np.array([[np.cos(shiftangle), np.sin(shiftangle)],
+                              [np.cos(np.pi / 2 - shiftangle),
+                               np.sin(np.pi / 2 - shiftangle)],
+                              [-np.cos(shiftangle),
+                               -np.sin(shiftangle)],
+                              [-np.cos(np.pi / 2 - shiftangle),
+                               -np.sin(np.pi / 2 - shiftangle)]],
+                              'd') / np.sqrt(4)
+
+    def test_procrustes(self):
+        # tests procrustes' ability to match two matrices.
+        #
+        # the second matrix is a rotated, shifted, scaled, and mirrored version
+        # of the first, in two dimensions only
+        #
+        # can shift, mirror, and scale an 'L'?
+        a, b, disparity = procrustes(self.data1, self.data2)
+        assert_allclose(b, a)
+        assert_almost_equal(disparity, 0.)
+
+        # if first mtx is standardized, leaves first mtx unchanged?
+        m4, m5, disp45 = procrustes(self.data4, self.data5)
+        assert_equal(m4, self.data4)
+
+        # at worst, data3 is an 'L' with one point off by .5
+        m1, m3, disp13 = procrustes(self.data1, self.data3)
+        #assert_(disp13 < 0.5 ** 2)
+
+    def test_procrustes2(self):
+        # procrustes disparity should not depend on order of matrices
+        m1, m3, disp13 = procrustes(self.data1, self.data3)
+        m3_2, m1_2, disp31 = procrustes(self.data3, self.data1)
+        assert_almost_equal(disp13, disp31)
+
+        # try with 3d, 8 pts per
+        rand1 = np.array([[2.61955202, 0.30522265, 0.55515826],
+                         [0.41124708, -0.03966978, -0.31854548],
+                         [0.91910318, 1.39451809, -0.15295084],
+                         [2.00452023, 0.50150048, 0.29485268],
+                         [0.09453595, 0.67528885, 0.03283872],
+                         [0.07015232, 2.18892599, -1.67266852],
+                         [0.65029688, 1.60551637, 0.80013549],
+                         [-0.6607528, 0.53644208, 0.17033891]])
+
+        rand3 = np.array([[0.0809969, 0.09731461, -0.173442],
+                         [-1.84888465, -0.92589646, -1.29335743],
+                         [0.67031855, -1.35957463, 0.41938621],
+                         [0.73967209, -0.20230757, 0.52418027],
+                         [0.17752796, 0.09065607, 0.29827466],
+                         [0.47999368, -0.88455717, -0.57547934],
+                         [-0.11486344, -0.12608506, -0.3395779],
+                         [-0.86106154, -0.28687488, 0.9644429]])
+        res1, res3, disp13 = procrustes(rand1, rand3)
+        res3_2, res1_2, disp31 = procrustes(rand3, rand1)
+        assert_almost_equal(disp13, disp31)
+
+    def test_procrustes_shape_mismatch(self):
+        assert_raises(ValueError, procrustes,
+                      np.array([[1, 2], [3, 4]]),
+                      np.array([[5, 6, 7], [8, 9, 10]]))
+
+    def test_procrustes_empty_rows_or_cols(self):
+        empty = np.array([[]])
+        assert_raises(ValueError, procrustes, empty, empty)
+
+    def test_procrustes_no_variation(self):
+        assert_raises(ValueError, procrustes,
+                      np.array([[42, 42], [42, 42]]),
+                      np.array([[45, 45], [45, 45]]))
+
+    def test_procrustes_bad_number_of_dimensions(self):
+        # fewer dimensions in one dataset
+        assert_raises(ValueError, procrustes,
+                      np.array([1, 1, 2, 3, 5, 8]),
+                      np.array([[1, 2], [3, 4]]))
+
+        # fewer dimensions in both datasets
+        assert_raises(ValueError, procrustes,
+                      np.array([1, 1, 2, 3, 5, 8]),
+                      np.array([1, 1, 2, 3, 5, 8]))
+
+        # zero dimensions
+        assert_raises(ValueError, procrustes, np.array(7), np.array(11))
+
+        # extra dimensions
+        assert_raises(ValueError, procrustes,
+                      np.array([[[11], [7]]]),
+                      np.array([[[5, 13]]]))
+
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_distance.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_distance.py
new file mode 100644
index 0000000000000000000000000000000000000000..774c773ff8bc3130030b8c9c8f6351ec467bcfc6
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_distance.py
@@ -0,0 +1,2374 @@
+#
+# Author: Damian Eads
+# Date: April 17, 2008
+#
+# Copyright (C) 2008 Damian Eads
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer in the documentation and/or other materials provided
+#    with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+#    products derived from this software without specific prior
+#    written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import sys
+import os.path
+
+from functools import wraps, partial
+import weakref
+
+import numpy as np
+import warnings
+from numpy.linalg import norm
+from numpy.testing import (verbose, assert_,
+                           assert_array_equal, assert_equal,
+                           assert_almost_equal, assert_allclose,
+                           break_cycles, IS_PYPY)
+import pytest
+
+import scipy.spatial.distance
+
+from scipy.spatial.distance import (
+    squareform, pdist, cdist, num_obs_y, num_obs_dm, is_valid_dm, is_valid_y,
+    _validate_vector, _METRICS_NAMES)
+
+# these were missing: chebyshev cityblock
+# jensenshannon  and seuclidean are referenced by string name.
+from scipy.spatial.distance import (braycurtis, canberra, chebyshev, cityblock,
+                                    correlation, cosine, dice, euclidean,
+                                    hamming, jaccard, jensenshannon,
+                                    kulczynski1, mahalanobis,
+                                    minkowski, rogerstanimoto,
+                                    russellrao, seuclidean, sokalmichener,  # noqa: F401
+                                    sokalsneath, sqeuclidean, yule)
+from scipy._lib._util import np_long, np_ulong
+
+
+@pytest.fixture(params=_METRICS_NAMES, scope="session")
+def metric(request):
+    """
+    Fixture for all metrics in scipy.spatial.distance
+    """
+    return request.param
+
+
+_filenames = [
+              "cdist-X1.txt",
+              "cdist-X2.txt",
+              "iris.txt",
+              "pdist-boolean-inp.txt",
+              "pdist-chebyshev-ml-iris.txt",
+              "pdist-chebyshev-ml.txt",
+              "pdist-cityblock-ml-iris.txt",
+              "pdist-cityblock-ml.txt",
+              "pdist-correlation-ml-iris.txt",
+              "pdist-correlation-ml.txt",
+              "pdist-cosine-ml-iris.txt",
+              "pdist-cosine-ml.txt",
+              "pdist-double-inp.txt",
+              "pdist-euclidean-ml-iris.txt",
+              "pdist-euclidean-ml.txt",
+              "pdist-hamming-ml.txt",
+              "pdist-jaccard-ml.txt",
+              "pdist-jensenshannon-ml-iris.txt",
+              "pdist-jensenshannon-ml.txt",
+              "pdist-minkowski-3.2-ml-iris.txt",
+              "pdist-minkowski-3.2-ml.txt",
+              "pdist-minkowski-5.8-ml-iris.txt",
+              "pdist-seuclidean-ml-iris.txt",
+              "pdist-seuclidean-ml.txt",
+              "pdist-spearman-ml.txt",
+              "random-bool-data.txt",
+              "random-double-data.txt",
+              "random-int-data.txt",
+              "random-uint-data.txt",
+              ]
+
+_tdist = np.array([[0, 662, 877, 255, 412, 996],
+                      [662, 0, 295, 468, 268, 400],
+                      [877, 295, 0, 754, 564, 138],
+                      [255, 468, 754, 0, 219, 869],
+                      [412, 268, 564, 219, 0, 669],
+                      [996, 400, 138, 869, 669, 0]], dtype='double')
+
+_ytdist = squareform(_tdist)
+
+# A hashmap of expected output arrays for the tests. These arrays
+# come from a list of text files, which are read prior to testing.
+# Each test loads inputs and outputs from this dictionary.
+eo = {}
+
+
+def load_testing_files():
+    for fn in _filenames:
+        name = fn.replace(".txt", "").replace("-ml", "")
+        fqfn = os.path.join(os.path.dirname(__file__), 'data', fn)
+        fp = open(fqfn)
+        eo[name] = np.loadtxt(fp)
+        fp.close()
+    eo['pdist-boolean-inp'] = np.bool_(eo['pdist-boolean-inp'])
+    eo['random-bool-data'] = np.bool_(eo['random-bool-data'])
+    eo['random-float32-data'] = np.float32(eo['random-double-data'])
+    eo['random-int-data'] = np_long(eo['random-int-data'])
+    eo['random-uint-data'] = np_ulong(eo['random-uint-data'])
+
+
+load_testing_files()
+
+
+def _is_32bit():
+    return np.intp(0).itemsize < 8
+
+
+def _chk_asarrays(arrays, axis=None):
+    arrays = [np.asanyarray(a) for a in arrays]
+    if axis is None:
+        # np < 1.10 ravel removes subclass from arrays
+        arrays = [np.ravel(a) if a.ndim != 1 else a
+                  for a in arrays]
+        axis = 0
+    arrays = tuple(np.atleast_1d(a) for a in arrays)
+    if axis < 0:
+        if not all(a.ndim == arrays[0].ndim for a in arrays):
+            raise ValueError("array ndim must be the same for neg axis")
+        axis = range(arrays[0].ndim)[axis]
+    return arrays + (axis,)
+
+
+def _chk_weights(arrays, weights=None, axis=None,
+                 force_weights=False, simplify_weights=True,
+                 pos_only=False, neg_check=False,
+                 nan_screen=False, mask_screen=False,
+                 ddof=None):
+    chked = _chk_asarrays(arrays, axis=axis)
+    arrays, axis = chked[:-1], chked[-1]
+
+    simplify_weights = simplify_weights and not force_weights
+    if not force_weights and mask_screen:
+        force_weights = any(np.ma.getmask(a) is not np.ma.nomask for a in arrays)
+
+    if nan_screen:
+        has_nans = [np.isnan(np.sum(a)) for a in arrays]
+        if any(has_nans):
+            mask_screen = True
+            force_weights = True
+            arrays = tuple(np.ma.masked_invalid(a) if has_nan else a
+                           for a, has_nan in zip(arrays, has_nans))
+
+    if weights is not None:
+        weights = np.asanyarray(weights)
+    elif force_weights:
+        weights = np.ones(arrays[0].shape[axis])
+    else:
+        return arrays + (weights, axis)
+
+    if ddof:
+        weights = _freq_weights(weights)
+
+    if mask_screen:
+        weights = _weight_masked(arrays, weights, axis)
+
+    if not all(weights.shape == (a.shape[axis],) for a in arrays):
+        raise ValueError("weights shape must match arrays along axis")
+    if neg_check and (weights < 0).any():
+        raise ValueError("weights cannot be negative")
+
+    if pos_only:
+        pos_weights = np.nonzero(weights > 0)[0]
+        if pos_weights.size < weights.size:
+            arrays = tuple(np.take(a, pos_weights, axis=axis) for a in arrays)
+            weights = weights[pos_weights]
+    if simplify_weights and (weights == 1).all():
+        weights = None
+    return arrays + (weights, axis)
+
+
+def _freq_weights(weights):
+    if weights is None:
+        return weights
+    int_weights = weights.astype(int)
+    if (weights != int_weights).any():
+        raise ValueError(f"frequency (integer count-type) weights required {weights}")
+    return int_weights
+
+
+def _weight_masked(arrays, weights, axis):
+    if axis is None:
+        axis = 0
+    weights = np.asanyarray(weights)
+    for a in arrays:
+        axis_mask = np.ma.getmask(a)
+        if axis_mask is np.ma.nomask:
+            continue
+        if a.ndim > 1:
+            not_axes = tuple(i for i in range(a.ndim) if i != axis)
+            axis_mask = axis_mask.any(axis=not_axes)
+        weights *= 1 - axis_mask.astype(int)
+    return weights
+
+
+def _rand_split(arrays, weights, axis, split_per, seed=None):
+    # Coerce `arrays` to float64 if integer, to avoid nan-to-integer issues
+    arrays = [arr.astype(np.float64) if np.issubdtype(arr.dtype, np.integer)
+              else arr for arr in arrays]
+
+    # inverse operation for stats.collapse_weights
+    weights = np.array(weights, dtype=np.float64)  # modified inplace; need a copy
+    seeded_rand = np.random.RandomState(seed)
+
+    def mytake(a, ix, axis):
+        record = np.asanyarray(np.take(a, ix, axis=axis))
+        return record.reshape([a.shape[i] if i != axis else 1
+                               for i in range(a.ndim)])
+
+    n_obs = arrays[0].shape[axis]
+    assert all(a.shape[axis] == n_obs for a in arrays), \
+           "data must be aligned on sample axis"
+    for i in range(int(split_per) * n_obs):
+        split_ix = seeded_rand.randint(n_obs + i)
+        prev_w = weights[split_ix]
+        q = seeded_rand.rand()
+        weights[split_ix] = q * prev_w
+        weights = np.append(weights, (1. - q) * prev_w)
+        arrays = [np.append(a, mytake(a, split_ix, axis=axis),
+                            axis=axis) for a in arrays]
+    return arrays, weights
+
+
+assert_allclose_forgiving = partial(assert_allclose, atol=1e-5)
+
+
+def _rough_check(a, b, compare_assert=assert_allclose_forgiving,
+                  key=lambda x: x, w=None):
+    check_a = key(a)
+    check_b = key(b)
+    try:
+        if np.array(check_a != check_b).any():  # try strict equality for string types
+            compare_assert(check_a, check_b)
+    except AttributeError:  # masked array
+        compare_assert(check_a, check_b)
+    except (TypeError, ValueError):  # nested data structure
+        for a_i, b_i in zip(check_a, check_b):
+            _rough_check(a_i, b_i, compare_assert=compare_assert)
+
+# diff from test_stats:
+#  n_args=2, weight_arg='w', default_axis=None
+#  ma_safe = False, nan_safe = False
+def _weight_checked(fn, n_args=2, default_axis=None, key=lambda x: x, weight_arg='w',
+                    squeeze=True, silent=False,
+                    ones_test=True, const_test=True, dup_test=True,
+                    split_test=True, dud_test=True, ma_safe=False, ma_very_safe=False,
+                    nan_safe=False, split_per=1.0, seed=0,
+                    compare_assert=assert_allclose_forgiving):
+    """runs fn on its arguments 2 or 3 ways, checks that the results are the same,
+       then returns the same thing it would have returned before"""
+    @wraps(fn)
+    def wrapped(*args, **kwargs):
+        result = fn(*args, **kwargs)
+
+        arrays = args[:n_args]
+        rest = args[n_args:]
+        weights = kwargs.get(weight_arg, None)
+        axis = kwargs.get('axis', default_axis)
+
+        chked = _chk_weights(arrays, weights=weights, axis=axis,
+                             force_weights=True, mask_screen=True)
+        arrays, weights, axis = chked[:-2], chked[-2], chked[-1]
+        if squeeze:
+            arrays = [np.atleast_1d(a.squeeze()) for a in arrays]
+
+        try:
+            # WEIGHTS CHECK 1: EQUAL WEIGHTED OBSERVATIONS
+            args = tuple(arrays) + rest
+            if ones_test:
+                kwargs[weight_arg] = weights
+                _rough_check(result, fn(*args, **kwargs), key=key)
+            if const_test:
+                kwargs[weight_arg] = weights * 101.0
+                _rough_check(result, fn(*args, **kwargs), key=key)
+                kwargs[weight_arg] = weights * 0.101
+                try:
+                    _rough_check(result, fn(*args, **kwargs), key=key)
+                except Exception as e:
+                    raise type(e)((e, arrays, weights)) from e
+
+            # WEIGHTS CHECK 2: ADDL 0-WEIGHTED OBS
+            if dud_test:
+                # add randomly resampled rows, weighted at 0
+                dud_arrays, dud_weights = _rand_split(arrays, weights, axis,
+                                                      split_per=split_per, seed=seed)
+                dud_weights[:weights.size] = weights # not exactly 1 because of masked arrays  # noqa: E501
+                dud_weights[weights.size:] = 0
+                dud_args = tuple(dud_arrays) + rest
+                kwargs[weight_arg] = dud_weights
+                _rough_check(result, fn(*dud_args, **kwargs), key=key)
+                # increase the value of those 0-weighted rows
+                for a in dud_arrays:
+                    indexer = [slice(None)] * a.ndim
+                    indexer[axis] = slice(weights.size, None)
+                    indexer = tuple(indexer)
+                    a[indexer] = a[indexer] * 101
+                dud_args = tuple(dud_arrays) + rest
+                _rough_check(result, fn(*dud_args, **kwargs), key=key)
+                # set those 0-weighted rows to NaNs
+                for a in dud_arrays:
+                    indexer = [slice(None)] * a.ndim
+                    indexer[axis] = slice(weights.size, None)
+                    indexer = tuple(indexer)
+                    a[indexer] = a[indexer] * np.nan
+                if kwargs.get("nan_policy", None) == "omit" and nan_safe:
+                    dud_args = tuple(dud_arrays) + rest
+                    _rough_check(result, fn(*dud_args, **kwargs), key=key)
+                # mask out those nan values
+                if ma_safe:
+                    dud_arrays = [np.ma.masked_invalid(a) for a in dud_arrays]
+                    dud_args = tuple(dud_arrays) + rest
+                    _rough_check(result, fn(*dud_args, **kwargs), key=key)
+                    if ma_very_safe:
+                        kwargs[weight_arg] = None
+                        _rough_check(result, fn(*dud_args, **kwargs), key=key)
+                del dud_arrays, dud_args, dud_weights
+
+            # WEIGHTS CHECK 3: DUPLICATE DATA (DUMB SPLITTING)
+            if dup_test:
+                dup_arrays = [np.append(a, a, axis=axis) for a in arrays]
+                dup_weights = np.append(weights, weights) / 2.0
+                dup_args = tuple(dup_arrays) + rest
+                kwargs[weight_arg] = dup_weights
+                _rough_check(result, fn(*dup_args, **kwargs), key=key)
+                del dup_args, dup_arrays, dup_weights
+
+            # WEIGHT CHECK 3: RANDOM SPLITTING
+            if split_test and split_per > 0:
+                split = _rand_split(arrays, weights, axis,
+                                    split_per=split_per, seed=seed)
+                split_arrays, split_weights = split
+                split_args = tuple(split_arrays) + rest
+                kwargs[weight_arg] = split_weights
+                _rough_check(result, fn(*split_args, **kwargs), key=key)
+        except NotImplementedError as e:
+            # when some combination of arguments makes weighting impossible,
+            #  this is the desired response
+            if not silent:
+                warnings.warn(f"{fn.__name__} NotImplemented weights: {e}",
+                              stacklevel=3)
+        return result
+    return wrapped
+
+
+class DummyContextManager:
+    def __enter__(self):
+        pass
+    def __exit__(self, *args):
+        pass
+
+
+def maybe_deprecated(metric: str):
+    if metric in ('kulczynski1', 'sokalmichener'):
+        return pytest.deprecated_call()
+    else:
+        return DummyContextManager()
+
+
+wcdist = _weight_checked(cdist, default_axis=1, squeeze=False)
+wcdist_no_const = _weight_checked(cdist, default_axis=1,
+                                  squeeze=False, const_test=False)
+wpdist = _weight_checked(pdist, default_axis=1, squeeze=False, n_args=1)
+wpdist_no_const = _weight_checked(pdist, default_axis=1, squeeze=False,
+                                  const_test=False, n_args=1)
+wrogerstanimoto = _weight_checked(rogerstanimoto)
+wmatching = whamming = _weight_checked(hamming, dud_test=False)
+wyule = _weight_checked(yule)
+wdice = _weight_checked(dice)
+wcityblock = _weight_checked(cityblock)
+wchebyshev = _weight_checked(chebyshev)
+wcosine = _weight_checked(cosine)
+wcorrelation = _weight_checked(correlation)
+wkulczynski1 = _weight_checked(kulczynski1)
+wjaccard = _weight_checked(jaccard)
+weuclidean = _weight_checked(euclidean, const_test=False)
+wsqeuclidean = _weight_checked(sqeuclidean, const_test=False)
+wbraycurtis = _weight_checked(braycurtis)
+wcanberra = _weight_checked(canberra, const_test=False)
+wsokalsneath = _weight_checked(sokalsneath)
+wsokalmichener = _weight_checked(sokalmichener)
+wrussellrao = _weight_checked(russellrao)
+
+
+class TestCdist:
+
+    def setup_method(self):
+        self.rnd_eo_names = ['random-float32-data', 'random-int-data',
+                             'random-uint-data', 'random-double-data',
+                             'random-bool-data']
+        self.valid_upcasts = {'bool': [np_ulong, np_long, np.float32, np.float64],
+                              'uint': [np_long, np.float32, np.float64],
+                              'int': [np.float32, np.float64],
+                              'float32': [np.float64]}
+
+    @pytest.mark.thread_unsafe
+    def test_cdist_extra_args(self, metric):
+        # Tests that args and kwargs are correctly handled
+
+        X1 = [[1., 2., 3.], [1.2, 2.3, 3.4], [2.2, 2.3, 4.4]]
+        X2 = [[7., 5., 8.], [7.5, 5.8, 8.4], [5.5, 5.8, 4.4]]
+        kwargs = {"N0tV4l1D_p4raM": 3.14, "w": np.arange(3)}
+        args = [3.14] * 200
+
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric=metric, **kwargs)
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric=eval(metric), **kwargs)
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric="test_" + metric, **kwargs)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, metric=metric, *args)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, metric=eval(metric), *args)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, metric="test_" + metric, *args)
+
+    def test_cdist_extra_args_custom(self):
+        # Tests that args and kwargs are correctly handled
+        # also for custom metric
+        def _my_metric(x, y, arg, kwarg=1, kwarg2=2):
+            return arg + kwarg + kwarg2
+
+        X1 = [[1., 2., 3.], [1.2, 2.3, 3.4], [2.2, 2.3, 4.4]]
+        X2 = [[7., 5., 8.], [7.5, 5.8, 8.4], [5.5, 5.8, 4.4]]
+        kwargs = {"N0tV4l1D_p4raM": 3.14, "w": np.arange(3)}
+        args = [3.14] * 200
+
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, *args)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, **kwargs)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, kwarg=2.2, kwarg2=3.3)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1, 2, kwarg=2.2)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1, 2, kwarg=2.2)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1.1, 2.2, 3.3)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1.1, 2.2)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1.1)
+        with pytest.raises(TypeError):
+            cdist(X1, X2, _my_metric, 1.1, kwarg=2.2, kwarg2=3.3)
+
+        # this should work
+        assert_allclose(cdist(X1, X2, metric=_my_metric,
+                              arg=1.1, kwarg2=3.3), 5.4)
+
+    def test_cdist_euclidean_random_unicode(self):
+        eps = 1e-15
+        X1 = eo['cdist-X1']
+        X2 = eo['cdist-X2']
+        Y1 = wcdist_no_const(X1, X2, 'euclidean')
+        Y2 = wcdist_no_const(X1, X2, 'test_euclidean')
+        assert_allclose(Y1, Y2, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.parametrize("p", [0.1, 0.25, 1.0, 1.23,
+                                   2.0, 3.8, 4.6, np.inf])
+    def test_cdist_minkowski_random(self, p):
+        eps = 1e-13
+        X1 = eo['cdist-X1']
+        X2 = eo['cdist-X2']
+        Y1 = wcdist_no_const(X1, X2, 'minkowski', p=p)
+        Y2 = wcdist_no_const(X1, X2, 'test_minkowski', p=p)
+        assert_allclose(Y1, Y2, atol=0, rtol=eps, verbose=verbose > 2)
+
+    def test_cdist_cosine_random(self):
+        eps = 1e-14
+        X1 = eo['cdist-X1']
+        X2 = eo['cdist-X2']
+        Y1 = wcdist(X1, X2, 'cosine')
+
+        # Naive implementation
+        def norms(X):
+            return np.linalg.norm(X, axis=1).reshape(-1, 1)
+
+        Y2 = 1 - np.dot((X1 / norms(X1)), (X2 / norms(X2)).T)
+
+        assert_allclose(Y1, Y2, rtol=eps, verbose=verbose > 2)
+
+    def test_cdist_mahalanobis(self):
+        # 1-dimensional observations
+        x1 = np.array([[2], [3]])
+        x2 = np.array([[2], [5]])
+        dist = cdist(x1, x2, metric='mahalanobis')
+        assert_allclose(dist, [[0.0, np.sqrt(4.5)], [np.sqrt(0.5), np.sqrt(2)]])
+
+        # 2-dimensional observations
+        x1 = np.array([[0, 0], [-1, 0]])
+        x2 = np.array([[0, 2], [1, 0], [0, -2]])
+        dist = cdist(x1, x2, metric='mahalanobis')
+        rt2 = np.sqrt(2)
+        assert_allclose(dist, [[rt2, rt2, rt2], [2, 2 * rt2, 2]])
+
+        # Too few observations
+        with pytest.raises(ValueError):
+            cdist([[0, 1]], [[2, 3]], metric='mahalanobis')
+
+    def test_cdist_custom_notdouble(self):
+        class myclass:
+            pass
+
+        def _my_metric(x, y):
+            if not isinstance(x[0], myclass) or not isinstance(y[0], myclass):
+                raise ValueError("Type has been changed")
+            return 1.123
+        data = np.array([[myclass()]], dtype=object)
+        cdist_y = cdist(data, data, metric=_my_metric)
+        right_y = 1.123
+        assert_equal(cdist_y, right_y, verbose=verbose > 2)
+
+    def _check_calling_conventions(self, X1, X2, metric, eps=1e-07, **kwargs):
+        # helper function for test_cdist_calling_conventions
+        try:
+            y1 = cdist(X1, X2, metric=metric, **kwargs)
+            y2 = cdist(X1, X2, metric=eval(metric), **kwargs)
+            y3 = cdist(X1, X2, metric="test_" + metric, **kwargs)
+        except Exception as e:
+            e_cls = e.__class__
+            if verbose > 2:
+                print(e_cls.__name__)
+                print(e)
+            with pytest.raises(e_cls):
+                cdist(X1, X2, metric=metric, **kwargs)
+            with pytest.raises(e_cls):
+                cdist(X1, X2, metric=eval(metric), **kwargs)
+            with pytest.raises(e_cls):
+                cdist(X1, X2, metric="test_" + metric, **kwargs)
+        else:
+            assert_allclose(y1, y2, rtol=eps, verbose=verbose > 2)
+            assert_allclose(y1, y3, rtol=eps, verbose=verbose > 2)
+
+    def test_cdist_calling_conventions(self, metric):
+        # Ensures that specifying the metric with a str or scipy function
+        # gives the same behaviour (i.e. same result or same exception).
+        # NOTE: The correctness should be checked within each metric tests.
+        for eo_name in self.rnd_eo_names:
+            # subsampling input data to speed-up tests
+            # NOTE: num samples needs to be > than dimensions for mahalanobis
+            X1 = eo[eo_name][::5, ::-2]
+            X2 = eo[eo_name][1::5, ::2]
+            if verbose > 2:
+                print("testing: ", metric, " with: ", eo_name)
+            if metric in {'dice', 'yule',
+                          'rogerstanimoto',
+                          'russellrao', 'sokalmichener',
+                          'sokalsneath',
+                          'kulczynski1'} and 'bool' not in eo_name:
+                # python version permits non-bools e.g. for fuzzy logic
+                continue
+            self._check_calling_conventions(X1, X2, metric)
+
+            # Testing built-in metrics with extra args
+            if metric == "seuclidean":
+                X12 = np.vstack([X1, X2]).astype(np.float64)
+                V = np.var(X12, axis=0, ddof=1)
+                self._check_calling_conventions(X1, X2, metric, V=V)
+            elif metric == "mahalanobis":
+                X12 = np.vstack([X1, X2]).astype(np.float64)
+                V = np.atleast_2d(np.cov(X12.T))
+                VI = np.array(np.linalg.inv(V).T)
+                self._check_calling_conventions(X1, X2, metric, VI=VI)
+
+    def test_cdist_dtype_equivalence(self, metric):
+        # Tests that the result is not affected by type up-casting
+        eps = 1e-07
+        tests = [(eo['random-bool-data'], self.valid_upcasts['bool']),
+                 (eo['random-uint-data'], self.valid_upcasts['uint']),
+                 (eo['random-int-data'], self.valid_upcasts['int']),
+                 (eo['random-float32-data'], self.valid_upcasts['float32'])]
+        for test in tests:
+            X1 = test[0][::5, ::-2]
+            X2 = test[0][1::5, ::2]
+            try:
+                y1 = cdist(X1, X2, metric=metric)
+            except Exception as e:
+                e_cls = e.__class__
+                if verbose > 2:
+                    print(e_cls.__name__)
+                    print(e)
+                for new_type in test[1]:
+                    X1new = new_type(X1)
+                    X2new = new_type(X2)
+                    with pytest.raises(e_cls):
+                        cdist(X1new, X2new, metric=metric)
+            else:
+                for new_type in test[1]:
+                    y2 = cdist(new_type(X1), new_type(X2), metric=metric)
+                    assert_allclose(y1, y2, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.thread_unsafe
+    def test_cdist_out(self, metric):
+        # Test that out parameter works properly
+        eps = 1e-15
+        X1 = eo['cdist-X1']
+        X2 = eo['cdist-X2']
+        out_r, out_c = X1.shape[0], X2.shape[0]
+
+        kwargs = dict()
+        if metric == 'minkowski':
+            kwargs['p'] = 1.23
+        out1 = np.empty((out_r, out_c), dtype=np.float64)
+        with maybe_deprecated(metric):
+            Y1 = cdist(X1, X2, metric, **kwargs)
+        with maybe_deprecated(metric):
+            Y2 = cdist(X1, X2, metric, out=out1, **kwargs)
+
+        # test that output is numerically equivalent
+        assert_allclose(Y1, Y2, rtol=eps, verbose=verbose > 2)
+
+        # test that Y_test1 and out1 are the same object
+        assert_(Y2 is out1)
+
+        # test for incorrect shape
+        out2 = np.empty((out_r-1, out_c+1), dtype=np.float64)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric, out=out2, **kwargs)
+
+        # test for C-contiguous order
+        out3 = np.empty(
+            (2 * out_r, 2 * out_c), dtype=np.float64)[::2, ::2]
+        out4 = np.empty((out_r, out_c), dtype=np.float64, order='F')
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric, out=out3, **kwargs)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric, out=out4, **kwargs)
+
+        # test for incorrect dtype
+        out5 = np.empty((out_r, out_c), dtype=np.int64)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                cdist(X1, X2, metric, out=out5, **kwargs)
+
+    @pytest.mark.thread_unsafe
+    def test_striding(self, metric):
+        # test that striding is handled correct with calls to
+        # _copy_array_if_base_present
+        eps = 1e-15
+        X1 = eo['cdist-X1'][::2, ::2]
+        X2 = eo['cdist-X2'][::2, ::2]
+        X1_copy = X1.copy()
+        X2_copy = X2.copy()
+
+        # confirm equivalence
+        assert_equal(X1, X1_copy)
+        assert_equal(X2, X2_copy)
+        # confirm contiguity
+        assert_(not X1.flags.c_contiguous)
+        assert_(not X2.flags.c_contiguous)
+        assert_(X1_copy.flags.c_contiguous)
+        assert_(X2_copy.flags.c_contiguous)
+
+        kwargs = dict()
+        if metric == 'minkowski':
+            kwargs['p'] = 1.23
+        with maybe_deprecated(metric):
+            Y1 = cdist(X1, X2, metric, **kwargs)
+        with maybe_deprecated(metric):
+            Y2 = cdist(X1_copy, X2_copy, metric, **kwargs)
+        # test that output is numerically equivalent
+        assert_allclose(Y1, Y2, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.thread_unsafe
+    def test_cdist_refcount(self, metric):
+        x1 = np.random.rand(10, 10)
+        x2 = np.random.rand(10, 10)
+
+        kwargs = dict()
+        if metric == 'minkowski':
+            kwargs['p'] = 1.23
+
+        with maybe_deprecated(metric):
+            out = cdist(x1, x2, metric=metric, **kwargs)
+
+        # Check reference counts aren't messed up. If we only hold weak
+        # references, the arrays should be deallocated.
+        weak_refs = [weakref.ref(v) for v in (x1, x2, out)]
+        del x1, x2, out
+
+        if IS_PYPY:
+            break_cycles()
+        assert all(weak_ref() is None for weak_ref in weak_refs)
+
+
+class TestPdist:
+
+    def setup_method(self):
+        self.rnd_eo_names = ['random-float32-data', 'random-int-data',
+                             'random-uint-data', 'random-double-data',
+                             'random-bool-data']
+        self.valid_upcasts = {'bool': [np_ulong, np_long, np.float32, np.float64],
+                              'uint': [np_long, np.float32, np.float64],
+                              'int': [np.float32, np.float64],
+                              'float32': [np.float64]}
+
+    @pytest.mark.thread_unsafe
+    def test_pdist_extra_args(self, metric):
+        # Tests that args and kwargs are correctly handled
+        X1 = [[1., 2.], [1.2, 2.3], [2.2, 2.3]]
+        kwargs = {"N0tV4l1D_p4raM": 3.14, "w": np.arange(2)}
+        args = [3.14] * 200
+
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                pdist(X1, metric=metric, **kwargs)
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                pdist(X1, metric=eval(metric), **kwargs)
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                pdist(X1, metric="test_" + metric, **kwargs)
+        with pytest.raises(TypeError):
+            pdist(X1, metric=metric, *args)
+        with pytest.raises(TypeError):
+            pdist(X1, metric=eval(metric), *args)
+        with pytest.raises(TypeError):
+            pdist(X1, metric="test_" + metric, *args)
+
+    def test_pdist_extra_args_custom(self):
+        # Tests that args and kwargs are correctly handled
+        # also for custom metric
+        def _my_metric(x, y, arg, kwarg=1, kwarg2=2):
+            return arg + kwarg + kwarg2
+
+        X1 = [[1., 2.], [1.2, 2.3], [2.2, 2.3]]
+        kwargs = {"N0tV4l1D_p4raM": 3.14, "w": np.arange(2)}
+        args = [3.14] * 200
+
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, *args)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, **kwargs)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, kwarg=2.2, kwarg2=3.3)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1, 2, kwarg=2.2)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1, 2, kwarg=2.2)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1.1, 2.2, 3.3)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1.1, 2.2)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1.1)
+        with pytest.raises(TypeError):
+            pdist(X1, _my_metric, 1.1, kwarg=2.2, kwarg2=3.3)
+
+        # these should work
+        assert_allclose(pdist(X1, metric=_my_metric,
+                              arg=1.1, kwarg2=3.3), 5.4)
+
+    def test_pdist_euclidean_random(self):
+        eps = 1e-07
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-euclidean']
+        Y_test1 = wpdist_no_const(X, 'euclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_euclidean_random_u(self):
+        eps = 1e-07
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-euclidean']
+        Y_test1 = wpdist_no_const(X, 'euclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_euclidean_random_float32(self):
+        eps = 1e-07
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-euclidean']
+        Y_test1 = wpdist_no_const(X, 'euclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_euclidean_random_nonC(self):
+        eps = 1e-07
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-euclidean']
+        Y_test2 = wpdist_no_const(X, 'test_euclidean')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_euclidean_iris_double(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-euclidean-iris']
+        Y_test1 = wpdist_no_const(X, 'euclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_euclidean_iris_float32(self):
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-euclidean-iris']
+        Y_test1 = wpdist_no_const(X, 'euclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.slow
+    def test_pdist_euclidean_iris_nonC(self):
+        # Test pdist(X, 'test_euclidean') [the non-C implementation] on the
+        # Iris data set.
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-euclidean-iris']
+        Y_test2 = wpdist_no_const(X, 'test_euclidean')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_random(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-seuclidean']
+        Y_test1 = pdist(X, 'seuclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-seuclidean']
+        Y_test1 = pdist(X, 'seuclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+        # Check no error is raise when V has float32 dtype (#11171).
+        V = np.var(X, axis=0, ddof=1)
+        Y_test2 = pdist(X, 'seuclidean', V=V)
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_random_nonC(self):
+        # Test pdist(X, 'test_sqeuclidean') [the non-C implementation]
+        eps = 1e-07
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-seuclidean']
+        Y_test2 = pdist(X, 'test_seuclidean')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_iris(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-seuclidean-iris']
+        Y_test1 = pdist(X, 'seuclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_iris_float32(self):
+        # Tests pdist(X, 'seuclidean') on the Iris data set (float32).
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-seuclidean-iris']
+        Y_test1 = pdist(X, 'seuclidean')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_seuclidean_iris_nonC(self):
+        # Test pdist(X, 'test_seuclidean') [the non-C implementation] on the
+        # Iris data set.
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-seuclidean-iris']
+        Y_test2 = pdist(X, 'test_seuclidean')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_cosine_random(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-cosine']
+        Y_test1 = wpdist(X, 'cosine')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_cosine_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-cosine']
+        Y_test1 = wpdist(X, 'cosine')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_cosine_random_nonC(self):
+        # Test pdist(X, 'test_cosine') [the non-C implementation]
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-cosine']
+        Y_test2 = wpdist(X, 'test_cosine')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_cosine_iris(self):
+        eps = 1e-05
+        X = eo['iris']
+        Y_right = eo['pdist-cosine-iris']
+        Y_test1 = wpdist(X, 'cosine')
+        assert_allclose(Y_test1, Y_right, atol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_cosine_iris_float32(self):
+        eps = 1e-05
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-cosine-iris']
+        Y_test1 = wpdist(X, 'cosine')
+        assert_allclose(Y_test1, Y_right, atol=eps, verbose=verbose > 2)
+
+    @pytest.mark.slow
+    def test_pdist_cosine_iris_nonC(self):
+        eps = 1e-05
+        X = eo['iris']
+        Y_right = eo['pdist-cosine-iris']
+        Y_test2 = wpdist(X, 'test_cosine')
+        assert_allclose(Y_test2, Y_right, atol=eps)
+
+    def test_pdist_cosine_bounds(self):
+        # Test adapted from @joernhees's example at gh-5208: case where
+        # cosine distance used to be negative. XXX: very sensitive to the
+        # specific norm computation.
+        x = np.abs(np.random.RandomState(1337).rand(91))
+        X = np.vstack([x, x])
+        assert_(wpdist(X, 'cosine')[0] >= 0,
+                msg='cosine distance should be non-negative')
+
+    def test_pdist_cityblock_random(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-cityblock']
+        Y_test1 = wpdist_no_const(X, 'cityblock')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_cityblock_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-cityblock']
+        Y_test1 = wpdist_no_const(X, 'cityblock')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_cityblock_random_nonC(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-cityblock']
+        Y_test2 = wpdist_no_const(X, 'test_cityblock')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_cityblock_iris(self):
+        eps = 1e-14
+        X = eo['iris']
+        Y_right = eo['pdist-cityblock-iris']
+        Y_test1 = wpdist_no_const(X, 'cityblock')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_cityblock_iris_float32(self):
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-cityblock-iris']
+        Y_test1 = wpdist_no_const(X, 'cityblock')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.slow
+    def test_pdist_cityblock_iris_nonC(self):
+        # Test pdist(X, 'test_cityblock') [the non-C implementation] on the
+        # Iris data set.
+        eps = 1e-14
+        X = eo['iris']
+        Y_right = eo['pdist-cityblock-iris']
+        Y_test2 = wpdist_no_const(X, 'test_cityblock')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_correlation_random(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-correlation']
+        Y_test1 = wpdist(X, 'correlation')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_correlation_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-correlation']
+        Y_test1 = wpdist(X, 'correlation')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_correlation_random_nonC(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-correlation']
+        Y_test2 = wpdist(X, 'test_correlation')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_correlation_iris(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-correlation-iris']
+        Y_test1 = wpdist(X, 'correlation')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_correlation_iris_float32(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = np.float32(eo['pdist-correlation-iris'])
+        Y_test1 = wpdist(X, 'correlation')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.slow
+    def test_pdist_correlation_iris_nonC(self):
+        if sys.maxsize > 2**32:
+            eps = 1e-7
+        else:
+            pytest.skip("see gh-16456")
+        X = eo['iris']
+        Y_right = eo['pdist-correlation-iris']
+        Y_test2 = wpdist(X, 'test_correlation')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.parametrize("p", [0.1, 0.25, 1.0, 2.0, 3.2, np.inf])
+    def test_pdist_minkowski_random_p(self, p):
+        eps = 1e-13
+        X = eo['pdist-double-inp']
+        Y1 = wpdist_no_const(X, 'minkowski', p=p)
+        Y2 = wpdist_no_const(X, 'test_minkowski', p=p)
+        assert_allclose(Y1, Y2, atol=0, rtol=eps)
+
+    def test_pdist_minkowski_random(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-minkowski-3.2']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=3.2)
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_minkowski_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-minkowski-3.2']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=3.2)
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_minkowski_random_nonC(self):
+        eps = 1e-7
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-minkowski-3.2']
+        Y_test2 = wpdist_no_const(X, 'test_minkowski', p=3.2)
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_3_2_iris(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-minkowski-3.2-iris']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=3.2)
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_3_2_iris_float32(self):
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-minkowski-3.2-iris']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=3.2)
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_3_2_iris_nonC(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-minkowski-3.2-iris']
+        Y_test2 = wpdist_no_const(X, 'test_minkowski', p=3.2)
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_5_8_iris(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-minkowski-5.8-iris']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=5.8)
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_5_8_iris_float32(self):
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-minkowski-5.8-iris']
+        Y_test1 = wpdist_no_const(X, 'minkowski', p=5.8)
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.slow
+    def test_pdist_minkowski_5_8_iris_nonC(self):
+        eps = 1e-7
+        X = eo['iris']
+        Y_right = eo['pdist-minkowski-5.8-iris']
+        Y_test2 = wpdist_no_const(X, 'test_minkowski', p=5.8)
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_mahalanobis(self):
+        # 1-dimensional observations
+        x = np.array([2.0, 2.0, 3.0, 5.0]).reshape(-1, 1)
+        dist = pdist(x, metric='mahalanobis')
+        assert_allclose(dist, [0.0, np.sqrt(0.5), np.sqrt(4.5),
+                               np.sqrt(0.5), np.sqrt(4.5), np.sqrt(2.0)])
+
+        # 2-dimensional observations
+        x = np.array([[0, 0], [-1, 0], [0, 2], [1, 0], [0, -2]])
+        dist = pdist(x, metric='mahalanobis')
+        rt2 = np.sqrt(2)
+        assert_allclose(dist, [rt2, rt2, rt2, rt2, 2, 2 * rt2, 2, 2, 2 * rt2, 2])
+
+        # Too few observations
+        with pytest.raises(ValueError):
+            wpdist([[0, 1], [2, 3]], metric='mahalanobis')
+
+    def test_pdist_hamming_random(self):
+        eps = 1e-15
+        X = eo['pdist-boolean-inp']
+        Y_right = eo['pdist-hamming']
+        Y_test1 = wpdist(X, 'hamming')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_hamming_random_float32(self):
+        eps = 1e-15
+        X = np.float32(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-hamming']
+        Y_test1 = wpdist(X, 'hamming')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_hamming_random_nonC(self):
+        eps = 1e-15
+        X = eo['pdist-boolean-inp']
+        Y_right = eo['pdist-hamming']
+        Y_test2 = wpdist(X, 'test_hamming')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_dhamming_random(self):
+        eps = 1e-15
+        X = np.float64(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-hamming']
+        Y_test1 = wpdist(X, 'hamming')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_dhamming_random_float32(self):
+        eps = 1e-15
+        X = np.float32(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-hamming']
+        Y_test1 = wpdist(X, 'hamming')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_dhamming_random_nonC(self):
+        eps = 1e-15
+        X = np.float64(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-hamming']
+        Y_test2 = wpdist(X, 'test_hamming')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_jensenshannon_random(self):
+        eps = 1e-11
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-jensenshannon']
+        Y_test1 = pdist(X, 'jensenshannon')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_jensenshannon_random_float32(self):
+        eps = 1e-8
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-jensenshannon']
+        Y_test1 = pdist(X, 'jensenshannon')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    def test_pdist_jensenshannon_random_nonC(self):
+        eps = 1e-11
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-jensenshannon']
+        Y_test2 = pdist(X, 'test_jensenshannon')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_jensenshannon_iris(self):
+        if _is_32bit():
+            # Test failing on 32-bit Linux on Azure otherwise, see gh-12810
+            eps = 2.5e-10
+        else:
+            eps = 1e-12
+
+        X = eo['iris']
+        Y_right = eo['pdist-jensenshannon-iris']
+        Y_test1 = pdist(X, 'jensenshannon')
+        assert_allclose(Y_test1, Y_right, atol=eps)
+
+    def test_pdist_jensenshannon_iris_float32(self):
+        eps = 1e-06
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-jensenshannon-iris']
+        Y_test1 = pdist(X, 'jensenshannon')
+        assert_allclose(Y_test1, Y_right, atol=eps, verbose=verbose > 2)
+
+    def test_pdist_jensenshannon_iris_nonC(self):
+        eps = 5e-5
+        X = eo['iris']
+        Y_right = eo['pdist-jensenshannon-iris']
+        Y_test2 = pdist(X, 'test_jensenshannon')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_matching_mtica1(self):
+        # Test matching(*,*) with mtica example #1 (nums).
+        m = wmatching(np.array([1, 0, 1, 1, 0]),
+                      np.array([1, 1, 0, 1, 1]))
+        m2 = wmatching(np.array([1, 0, 1, 1, 0], dtype=bool),
+                       np.array([1, 1, 0, 1, 1], dtype=bool))
+        assert_allclose(m, 0.6, rtol=0, atol=1e-10)
+        assert_allclose(m2, 0.6, rtol=0, atol=1e-10)
+
+    def test_pdist_matching_mtica2(self):
+        # Test matching(*,*) with mtica example #2.
+        m = wmatching(np.array([1, 0, 1]),
+                     np.array([1, 1, 0]))
+        m2 = wmatching(np.array([1, 0, 1], dtype=bool),
+                      np.array([1, 1, 0], dtype=bool))
+        assert_allclose(m, 2 / 3, rtol=0, atol=1e-10)
+        assert_allclose(m2, 2 / 3, rtol=0, atol=1e-10)
+
+    def test_pdist_yule_mtica1(self):
+        m = wyule(np.array([1, 0, 1, 1, 0]),
+                  np.array([1, 1, 0, 1, 1]))
+        m2 = wyule(np.array([1, 0, 1, 1, 0], dtype=bool),
+                   np.array([1, 1, 0, 1, 1], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 2, rtol=0, atol=1e-10)
+        assert_allclose(m2, 2, rtol=0, atol=1e-10)
+
+    def test_pdist_yule_mtica2(self):
+        m = wyule(np.array([1, 0, 1]),
+                  np.array([1, 1, 0]))
+        m2 = wyule(np.array([1, 0, 1], dtype=bool),
+                   np.array([1, 1, 0], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 2, rtol=0, atol=1e-10)
+        assert_allclose(m2, 2, rtol=0, atol=1e-10)
+
+    def test_pdist_dice_mtica1(self):
+        m = wdice(np.array([1, 0, 1, 1, 0]),
+                  np.array([1, 1, 0, 1, 1]))
+        m2 = wdice(np.array([1, 0, 1, 1, 0], dtype=bool),
+                   np.array([1, 1, 0, 1, 1], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 3 / 7, rtol=0, atol=1e-10)
+        assert_allclose(m2, 3 / 7, rtol=0, atol=1e-10)
+
+    def test_pdist_dice_mtica2(self):
+        m = wdice(np.array([1, 0, 1]),
+                  np.array([1, 1, 0]))
+        m2 = wdice(np.array([1, 0, 1], dtype=bool),
+                   np.array([1, 1, 0], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 0.5, rtol=0, atol=1e-10)
+        assert_allclose(m2, 0.5, rtol=0, atol=1e-10)
+
+    def test_pdist_sokalsneath_mtica1(self):
+        m = sokalsneath(np.array([1, 0, 1, 1, 0]),
+                        np.array([1, 1, 0, 1, 1]))
+        m2 = sokalsneath(np.array([1, 0, 1, 1, 0], dtype=bool),
+                         np.array([1, 1, 0, 1, 1], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 3 / 4, rtol=0, atol=1e-10)
+        assert_allclose(m2, 3 / 4, rtol=0, atol=1e-10)
+
+    def test_pdist_sokalsneath_mtica2(self):
+        m = wsokalsneath(np.array([1, 0, 1]),
+                         np.array([1, 1, 0]))
+        m2 = wsokalsneath(np.array([1, 0, 1], dtype=bool),
+                          np.array([1, 1, 0], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 4 / 5, rtol=0, atol=1e-10)
+        assert_allclose(m2, 4 / 5, rtol=0, atol=1e-10)
+
+    def test_pdist_rogerstanimoto_mtica1(self):
+        m = wrogerstanimoto(np.array([1, 0, 1, 1, 0]),
+                            np.array([1, 1, 0, 1, 1]))
+        m2 = wrogerstanimoto(np.array([1, 0, 1, 1, 0], dtype=bool),
+                             np.array([1, 1, 0, 1, 1], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 3 / 4, rtol=0, atol=1e-10)
+        assert_allclose(m2, 3 / 4, rtol=0, atol=1e-10)
+
+    def test_pdist_rogerstanimoto_mtica2(self):
+        m = wrogerstanimoto(np.array([1, 0, 1]),
+                            np.array([1, 1, 0]))
+        m2 = wrogerstanimoto(np.array([1, 0, 1], dtype=bool),
+                             np.array([1, 1, 0], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 4 / 5, rtol=0, atol=1e-10)
+        assert_allclose(m2, 4 / 5, rtol=0, atol=1e-10)
+
+    def test_pdist_russellrao_mtica1(self):
+        m = wrussellrao(np.array([1, 0, 1, 1, 0]),
+                        np.array([1, 1, 0, 1, 1]))
+        m2 = wrussellrao(np.array([1, 0, 1, 1, 0], dtype=bool),
+                         np.array([1, 1, 0, 1, 1], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 3 / 5, rtol=0, atol=1e-10)
+        assert_allclose(m2, 3 / 5, rtol=0, atol=1e-10)
+
+    def test_pdist_russellrao_mtica2(self):
+        m = wrussellrao(np.array([1, 0, 1]),
+                        np.array([1, 1, 0]))
+        m2 = wrussellrao(np.array([1, 0, 1], dtype=bool),
+                         np.array([1, 1, 0], dtype=bool))
+        if verbose > 2:
+            print(m)
+        assert_allclose(m, 2 / 3, rtol=0, atol=1e-10)
+        assert_allclose(m2, 2 / 3, rtol=0, atol=1e-10)
+
+    @pytest.mark.slow
+    def test_pdist_canberra_match(self):
+        D = eo['iris']
+        if verbose > 2:
+            print(D.shape, D.dtype)
+        eps = 1e-15
+        y1 = wpdist_no_const(D, "canberra")
+        y2 = wpdist_no_const(D, "test_canberra")
+        assert_allclose(y1, y2, rtol=eps, verbose=verbose > 2)
+
+    def test_pdist_canberra_ticket_711(self):
+        # Test pdist(X, 'canberra') to see if Canberra gives the right result
+        # as reported on gh-1238.
+        eps = 1e-8
+        pdist_y = wpdist_no_const(([3.3], [3.4]), "canberra")
+        right_y = 0.01492537
+        assert_allclose(pdist_y, right_y, atol=eps, verbose=verbose > 2)
+
+    def test_pdist_custom_notdouble(self):
+        # tests that when using a custom metric the data type is not altered
+        class myclass:
+            pass
+
+        def _my_metric(x, y):
+            if not isinstance(x[0], myclass) or not isinstance(y[0], myclass):
+                raise ValueError("Type has been changed")
+            return 1.123
+        data = np.array([[myclass()], [myclass()]], dtype=object)
+        pdist_y = pdist(data, metric=_my_metric)
+        right_y = 1.123
+        assert_equal(pdist_y, right_y, verbose=verbose > 2)
+
+    def _check_calling_conventions(self, X, metric, eps=1e-07, **kwargs):
+        # helper function for test_pdist_calling_conventions
+        try:
+            y1 = pdist(X, metric=metric, **kwargs)
+            y2 = pdist(X, metric=eval(metric), **kwargs)
+            y3 = pdist(X, metric="test_" + metric, **kwargs)
+        except Exception as e:
+            e_cls = e.__class__
+            if verbose > 2:
+                print(e_cls.__name__)
+                print(e)
+            with pytest.raises(e_cls):
+                pdist(X, metric=metric, **kwargs)
+            with pytest.raises(e_cls):
+                pdist(X, metric=eval(metric), **kwargs)
+            with pytest.raises(e_cls):
+                pdist(X, metric="test_" + metric, **kwargs)
+        else:
+            assert_allclose(y1, y2, rtol=eps, verbose=verbose > 2)
+            assert_allclose(y1, y3, rtol=eps, verbose=verbose > 2)
+
+    def test_pdist_calling_conventions(self, metric):
+        # Ensures that specifying the metric with a str or scipy function
+        # gives the same behaviour (i.e. same result or same exception).
+        # NOTE: The correctness should be checked within each metric tests.
+        # NOTE: Extra args should be checked with a dedicated test
+        for eo_name in self.rnd_eo_names:
+            # subsampling input data to speed-up tests
+            # NOTE: num samples needs to be > than dimensions for mahalanobis
+            X = eo[eo_name][::5, ::2]
+            if verbose > 2:
+                print("testing: ", metric, " with: ", eo_name)
+            if metric in {'dice', 'yule', 'matching',
+                          'rogerstanimoto', 'russellrao', 'sokalmichener',
+                          'sokalsneath',
+                          'kulczynski1'} and 'bool' not in eo_name:
+                # python version permits non-bools e.g. for fuzzy logic
+                continue
+            self._check_calling_conventions(X, metric)
+
+            # Testing built-in metrics with extra args
+            if metric == "seuclidean":
+                V = np.var(X.astype(np.float64), axis=0, ddof=1)
+                self._check_calling_conventions(X, metric, V=V)
+            elif metric == "mahalanobis":
+                V = np.atleast_2d(np.cov(X.astype(np.float64).T))
+                VI = np.array(np.linalg.inv(V).T)
+                self._check_calling_conventions(X, metric, VI=VI)
+
+    def test_pdist_dtype_equivalence(self, metric):
+        # Tests that the result is not affected by type up-casting
+        eps = 1e-07
+        tests = [(eo['random-bool-data'], self.valid_upcasts['bool']),
+                 (eo['random-uint-data'], self.valid_upcasts['uint']),
+                 (eo['random-int-data'], self.valid_upcasts['int']),
+                 (eo['random-float32-data'], self.valid_upcasts['float32'])]
+        for test in tests:
+            X1 = test[0][::5, ::2]
+            try:
+                y1 = pdist(X1, metric=metric)
+            except Exception as e:
+                e_cls = e.__class__
+                if verbose > 2:
+                    print(e_cls.__name__)
+                    print(e)
+                for new_type in test[1]:
+                    X2 = new_type(X1)
+                    with pytest.raises(e_cls):
+                        pdist(X2, metric=metric)
+            else:
+                for new_type in test[1]:
+                    y2 = pdist(new_type(X1), metric=metric)
+                    assert_allclose(y1, y2, rtol=eps, verbose=verbose > 2)
+
+    @pytest.mark.thread_unsafe
+    def test_pdist_out(self, metric):
+        # Test that out parameter works properly
+        eps = 1e-15
+        X = eo['random-float32-data'][::5, ::2]
+        out_size = int((X.shape[0] * (X.shape[0] - 1)) / 2)
+
+        kwargs = dict()
+        if metric == 'minkowski':
+            kwargs['p'] = 1.23
+        out1 = np.empty(out_size, dtype=np.float64)
+        with maybe_deprecated(metric):
+            Y_right = pdist(X, metric, **kwargs)
+        with maybe_deprecated(metric):
+            Y_test1 = pdist(X, metric, out=out1, **kwargs)
+
+        # test that output is numerically equivalent
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+        # test that Y_test1 and out1 are the same object
+        assert_(Y_test1 is out1)
+
+        # test for incorrect shape
+        out2 = np.empty(out_size + 3, dtype=np.float64)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                pdist(X, metric, out=out2, **kwargs)
+
+        # test for (C-)contiguous output
+        out3 = np.empty(2 * out_size, dtype=np.float64)[::2]
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                pdist(X, metric, out=out3, **kwargs)
+
+        # test for incorrect dtype
+        out5 = np.empty(out_size, dtype=np.int64)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                pdist(X, metric, out=out5, **kwargs)
+
+    @pytest.mark.thread_unsafe
+    def test_striding(self, metric):
+        # test that striding is handled correct with calls to
+        # _copy_array_if_base_present
+        eps = 1e-15
+        X = eo['random-float32-data'][::5, ::2]
+        X_copy = X.copy()
+
+        # confirm contiguity
+        assert_(not X.flags.c_contiguous)
+        assert_(X_copy.flags.c_contiguous)
+
+        kwargs = dict()
+        if metric == 'minkowski':
+            kwargs['p'] = 1.23
+        with maybe_deprecated(metric):
+            Y1 = pdist(X, metric, **kwargs)
+        with maybe_deprecated(metric):
+            Y2 = pdist(X_copy, metric, **kwargs)
+        # test that output is numerically equivalent
+        assert_allclose(Y1, Y2, rtol=eps, verbose=verbose > 2)
+
+class TestSomeDistanceFunctions:
+
+    def setup_method(self):
+        # 1D arrays
+        x = np.array([1.0, 2.0, 3.0])
+        y = np.array([1.0, 1.0, 5.0])
+
+        self.cases = [(x, y)]
+
+    def test_minkowski(self):
+        for x, y in self.cases:
+            dist1 = minkowski(x, y, p=1)
+            assert_almost_equal(dist1, 3.0)
+            dist1p5 = minkowski(x, y, p=1.5)
+            assert_almost_equal(dist1p5, (1.0 + 2.0**1.5)**(2. / 3))
+            dist2 = minkowski(x, y, p=2)
+            assert_almost_equal(dist2, 5.0 ** 0.5)
+            dist0p25 = minkowski(x, y, p=0.25)
+            assert_almost_equal(dist0p25, (1.0 + 2.0 ** 0.25) ** 4)
+
+        # Check that casting input to minimum scalar type doesn't affect result
+        # (issue #10262). This could be extended to more test inputs with
+        # np.min_scalar_type(np.max(input_matrix)).
+        a = np.array([352, 916])
+        b = np.array([350, 660])
+        assert_equal(minkowski(a, b),
+                     minkowski(a.astype('uint16'), b.astype('uint16')))
+
+    def test_euclidean(self):
+        for x, y in self.cases:
+            dist = weuclidean(x, y)
+            assert_almost_equal(dist, np.sqrt(5))
+
+    def test_sqeuclidean(self):
+        for x, y in self.cases:
+            dist = wsqeuclidean(x, y)
+            assert_almost_equal(dist, 5.0)
+
+    def test_cosine(self):
+        for x, y in self.cases:
+            dist = wcosine(x, y)
+            assert_almost_equal(dist, 1.0 - 18.0 / (np.sqrt(14) * np.sqrt(27)))
+
+    def test_cosine_output_dtype(self):
+        # Regression test for gh-19541
+        assert isinstance(wcorrelation([1, 1], [1, 1], centered=False), float)
+        assert isinstance(wcosine([1, 1], [1, 1]), float)
+
+    def test_correlation(self):
+        xm = np.array([-1.0, 0, 1.0])
+        ym = np.array([-4.0 / 3, -4.0 / 3, 5.0 - 7.0 / 3])
+        for x, y in self.cases:
+            dist = wcorrelation(x, y)
+            assert_almost_equal(dist, 1.0 - np.dot(xm, ym) / (norm(xm) * norm(ym)))
+
+    def test_correlation_positive(self):
+        # Regression test for gh-12320 (negative return value due to rounding
+        x = np.array([0., 0., 0., 0., 0., 0., -2., 0., 0., 0., -2., -2., -2.,
+                      0., -2., 0., -2., 0., 0., -1., -2., 0., 1., 0., 0., -2.,
+                      0., 0., -2., 0., -2., -2., -2., -2., -2., -2., 0.])
+        y = np.array([1., 1., 1., 1., 1., 1., -1., 1., 1., 1., -1., -1., -1.,
+                      1., -1., 1., -1., 1., 1., 0., -1., 1., 2., 1., 1., -1.,
+                      1., 1., -1., 1., -1., -1., -1., -1., -1., -1., 1.])
+        dist = correlation(x, y)
+        assert 0 <= dist <= 10 * np.finfo(np.float64).eps
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.filterwarnings('ignore:Casting complex')
+    @pytest.mark.parametrize("func", [correlation, cosine])
+    def test_corr_dep_complex(self, func):
+        x = [1+0j, 2+0j]
+        y = [3+0j, 4+0j]
+        with pytest.deprecated_call(match="Complex `u` and `v` are deprecated"):
+            func(x, y)
+
+    def test_mahalanobis(self):
+        x = np.array([1.0, 2.0, 3.0])
+        y = np.array([1.0, 1.0, 5.0])
+        vi = np.array([[2.0, 1.0, 0.0], [1.0, 2.0, 1.0], [0.0, 1.0, 2.0]])
+        for x, y in self.cases:
+            dist = mahalanobis(x, y, vi)
+            assert_almost_equal(dist, np.sqrt(6.0))
+
+
+class TestSquareForm:
+    checked_dtypes = [np.float64, np.float32, np.int32, np.int8, bool]
+
+    def test_squareform_matrix(self):
+        for dtype in self.checked_dtypes:
+            self.check_squareform_matrix(dtype)
+
+    def test_squareform_vector(self):
+        for dtype in self.checked_dtypes:
+            self.check_squareform_vector(dtype)
+
+    def check_squareform_matrix(self, dtype):
+        A = np.zeros((0, 0), dtype=dtype)
+        rA = squareform(A)
+        assert_equal(rA.shape, (0,))
+        assert_equal(rA.dtype, dtype)
+
+        A = np.zeros((1, 1), dtype=dtype)
+        rA = squareform(A)
+        assert_equal(rA.shape, (0,))
+        assert_equal(rA.dtype, dtype)
+
+        A = np.array([[0, 4.2], [4.2, 0]], dtype=dtype)
+        rA = squareform(A)
+        assert_equal(rA.shape, (1,))
+        assert_equal(rA.dtype, dtype)
+        assert_array_equal(rA, np.array([4.2], dtype=dtype))
+
+    def check_squareform_vector(self, dtype):
+        v = np.zeros((0,), dtype=dtype)
+        rv = squareform(v)
+        assert_equal(rv.shape, (1, 1))
+        assert_equal(rv.dtype, dtype)
+        assert_array_equal(rv, [[0]])
+
+        v = np.array([8.3], dtype=dtype)
+        rv = squareform(v)
+        assert_equal(rv.shape, (2, 2))
+        assert_equal(rv.dtype, dtype)
+        assert_array_equal(rv, np.array([[0, 8.3], [8.3, 0]], dtype=dtype))
+
+    def test_squareform_multi_matrix(self):
+        for n in range(2, 5):
+            self.check_squareform_multi_matrix(n)
+
+    def check_squareform_multi_matrix(self, n):
+        X = np.random.rand(n, 4)
+        Y = wpdist_no_const(X)
+        assert_equal(len(Y.shape), 1)
+        A = squareform(Y)
+        Yr = squareform(A)
+        s = A.shape
+        k = 0
+        if verbose >= 3:
+            print(A.shape, Y.shape, Yr.shape)
+        assert_equal(len(s), 2)
+        assert_equal(len(Yr.shape), 1)
+        assert_equal(s[0], s[1])
+        for i in range(0, s[0]):
+            for j in range(i + 1, s[1]):
+                if i != j:
+                    assert_equal(A[i, j], Y[k])
+                    k += 1
+                else:
+                    assert_equal(A[i, j], 0)
+
+
+class TestNumObsY:
+
+    def test_num_obs_y_multi_matrix(self):
+        for n in range(2, 10):
+            X = np.random.rand(n, 4)
+            Y = wpdist_no_const(X)
+            assert_equal(num_obs_y(Y), n)
+
+    def test_num_obs_y_1(self):
+        # Tests num_obs_y(y) on a condensed distance matrix over 1
+        # observations. Expecting exception.
+        with pytest.raises(ValueError):
+            self.check_y(1)
+
+    def test_num_obs_y_2(self):
+        # Tests num_obs_y(y) on a condensed distance matrix over 2
+        # observations.
+        assert_(self.check_y(2))
+
+    def test_num_obs_y_3(self):
+        assert_(self.check_y(3))
+
+    def test_num_obs_y_4(self):
+        assert_(self.check_y(4))
+
+    def test_num_obs_y_5_10(self):
+        for i in range(5, 16):
+            self.minit(i)
+
+    def test_num_obs_y_2_100(self):
+        # Tests num_obs_y(y) on 100 improper condensed distance matrices.
+        # Expecting exception.
+        a = set()
+        for n in range(2, 16):
+            a.add(n * (n - 1) / 2)
+        for i in range(5, 105):
+            if i not in a:
+                with pytest.raises(ValueError):
+                    self.bad_y(i)
+
+    def minit(self, n):
+        assert_(self.check_y(n))
+
+    def bad_y(self, n):
+        y = np.random.rand(n)
+        return num_obs_y(y)
+
+    def check_y(self, n):
+        return num_obs_y(self.make_y(n)) == n
+
+    def make_y(self, n):
+        return np.random.rand((n * (n - 1)) // 2)
+
+
+class TestNumObsDM:
+
+    def test_num_obs_dm_multi_matrix(self):
+        for n in range(1, 10):
+            X = np.random.rand(n, 4)
+            Y = wpdist_no_const(X)
+            A = squareform(Y)
+            if verbose >= 3:
+                print(A.shape, Y.shape)
+            assert_equal(num_obs_dm(A), n)
+
+    def test_num_obs_dm_0(self):
+        # Tests num_obs_dm(D) on a 0x0 distance matrix. Expecting exception.
+        assert_(self.check_D(0))
+
+    def test_num_obs_dm_1(self):
+        # Tests num_obs_dm(D) on a 1x1 distance matrix.
+        assert_(self.check_D(1))
+
+    def test_num_obs_dm_2(self):
+        assert_(self.check_D(2))
+
+    def test_num_obs_dm_3(self):
+        assert_(self.check_D(2))
+
+    def test_num_obs_dm_4(self):
+        assert_(self.check_D(4))
+
+    def check_D(self, n):
+        return num_obs_dm(self.make_D(n)) == n
+
+    def make_D(self, n):
+        return np.random.rand(n, n)
+
+
+def is_valid_dm_throw(D):
+    return is_valid_dm(D, throw=True)
+
+
+class TestIsValidDM:
+
+    def test_is_valid_dm_improper_shape_1D_E(self):
+        D = np.zeros((5,), dtype=np.float64)
+        with pytest.raises(ValueError):
+            is_valid_dm_throw(D)
+
+    def test_is_valid_dm_improper_shape_1D_F(self):
+        D = np.zeros((5,), dtype=np.float64)
+        assert_equal(is_valid_dm(D), False)
+
+    def test_is_valid_dm_improper_shape_3D_E(self):
+        D = np.zeros((3, 3, 3), dtype=np.float64)
+        with pytest.raises(ValueError):
+            is_valid_dm_throw(D)
+
+    def test_is_valid_dm_improper_shape_3D_F(self):
+        D = np.zeros((3, 3, 3), dtype=np.float64)
+        assert_equal(is_valid_dm(D), False)
+
+    def test_is_valid_dm_nonzero_diagonal_E(self):
+        y = np.random.rand(10)
+        D = squareform(y)
+        for i in range(0, 5):
+            D[i, i] = 2.0
+        with pytest.raises(ValueError):
+            is_valid_dm_throw(D)
+
+    def test_is_valid_dm_nonzero_diagonal_F(self):
+        y = np.random.rand(10)
+        D = squareform(y)
+        for i in range(0, 5):
+            D[i, i] = 2.0
+        assert_equal(is_valid_dm(D), False)
+
+    def test_is_valid_dm_asymmetric_E(self):
+        y = np.random.rand(10)
+        D = squareform(y)
+        D[1, 3] = D[3, 1] + 1
+        with pytest.raises(ValueError):
+            is_valid_dm_throw(D)
+
+    def test_is_valid_dm_asymmetric_F(self):
+        y = np.random.rand(10)
+        D = squareform(y)
+        D[1, 3] = D[3, 1] + 1
+        assert_equal(is_valid_dm(D), False)
+
+    def test_is_valid_dm_correct_1_by_1(self):
+        D = np.zeros((1, 1), dtype=np.float64)
+        assert_equal(is_valid_dm(D), True)
+
+    def test_is_valid_dm_correct_2_by_2(self):
+        y = np.random.rand(1)
+        D = squareform(y)
+        assert_equal(is_valid_dm(D), True)
+
+    def test_is_valid_dm_correct_3_by_3(self):
+        y = np.random.rand(3)
+        D = squareform(y)
+        assert_equal(is_valid_dm(D), True)
+
+    def test_is_valid_dm_correct_4_by_4(self):
+        y = np.random.rand(6)
+        D = squareform(y)
+        assert_equal(is_valid_dm(D), True)
+
+    def test_is_valid_dm_correct_5_by_5(self):
+        y = np.random.rand(10)
+        D = squareform(y)
+        assert_equal(is_valid_dm(D), True)
+
+
+def is_valid_y_throw(y):
+    return is_valid_y(y, throw=True)
+
+
+class TestIsValidY:
+    # If test case name ends on "_E" then an exception is expected for the
+    # given input, if it ends in "_F" then False is expected for the is_valid_y
+    # check.  Otherwise the input is expected to be valid.
+
+    def test_is_valid_y_improper_shape_2D_E(self):
+        y = np.zeros((3, 3,), dtype=np.float64)
+        with pytest.raises(ValueError):
+            is_valid_y_throw(y)
+
+    def test_is_valid_y_improper_shape_2D_F(self):
+        y = np.zeros((3, 3,), dtype=np.float64)
+        assert_equal(is_valid_y(y), False)
+
+    def test_is_valid_y_improper_shape_3D_E(self):
+        y = np.zeros((3, 3, 3), dtype=np.float64)
+        with pytest.raises(ValueError):
+            is_valid_y_throw(y)
+
+    def test_is_valid_y_improper_shape_3D_F(self):
+        y = np.zeros((3, 3, 3), dtype=np.float64)
+        assert_equal(is_valid_y(y), False)
+
+    def test_is_valid_y_correct_2_by_2(self):
+        y = self.correct_n_by_n(2)
+        assert_equal(is_valid_y(y), True)
+
+    def test_is_valid_y_correct_3_by_3(self):
+        y = self.correct_n_by_n(3)
+        assert_equal(is_valid_y(y), True)
+
+    def test_is_valid_y_correct_4_by_4(self):
+        y = self.correct_n_by_n(4)
+        assert_equal(is_valid_y(y), True)
+
+    def test_is_valid_y_correct_5_by_5(self):
+        y = self.correct_n_by_n(5)
+        assert_equal(is_valid_y(y), True)
+
+    def test_is_valid_y_2_100(self):
+        a = set()
+        for n in range(2, 16):
+            a.add(n * (n - 1) / 2)
+        for i in range(5, 105):
+            if i not in a:
+                with pytest.raises(ValueError):
+                    self.bad_y(i)
+
+    def bad_y(self, n):
+        y = np.random.rand(n)
+        return is_valid_y(y, throw=True)
+
+    def correct_n_by_n(self, n):
+        y = np.random.rand((n * (n - 1)) // 2)
+        return y
+
+
+@pytest.mark.parametrize("p", [-10.0, -0.5, 0.0])
+def test_bad_p(p):
+    # Raise ValueError if p <=0.
+    with pytest.raises(ValueError):
+        minkowski([1, 2], [3, 4], p)
+    with pytest.raises(ValueError):
+        minkowski([1, 2], [3, 4], p, [1, 1])
+
+
+def test_sokalsneath_all_false():
+    # Regression test for ticket #876
+    with pytest.raises(ValueError):
+        sokalsneath([False, False, False], [False, False, False])
+
+
+def test_canberra():
+    # Regression test for ticket #1430.
+    assert_equal(wcanberra([1, 2, 3], [2, 4, 6]), 1)
+    assert_equal(wcanberra([1, 1, 0, 0], [1, 0, 1, 0]), 2)
+
+
+def test_braycurtis():
+    # Regression test for ticket #1430.
+    assert_almost_equal(wbraycurtis([1, 2, 3], [2, 4, 6]), 1. / 3, decimal=15)
+    assert_almost_equal(wbraycurtis([1, 1, 0, 0], [1, 0, 1, 0]), 0.5, decimal=15)
+
+
+def test_euclideans():
+    # Regression test for ticket #1328.
+    x1 = np.array([1, 1, 1])
+    x2 = np.array([0, 0, 0])
+
+    # Basic test of the calculation.
+    assert_almost_equal(wsqeuclidean(x1, x2), 3.0, decimal=14)
+    assert_almost_equal(weuclidean(x1, x2), np.sqrt(3), decimal=14)
+
+    # Check flattening for (1, N) or (N, 1) inputs
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        weuclidean(x1[np.newaxis, :], x2[np.newaxis, :]), np.sqrt(3)
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        wsqeuclidean(x1[np.newaxis, :], x2[np.newaxis, :])
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        wsqeuclidean(x1[:, np.newaxis], x2[:, np.newaxis])
+
+    # Distance metrics only defined for vectors (= 1-D)
+    x = np.arange(4).reshape(2, 2)
+    with pytest.raises(ValueError):
+        weuclidean(x, x)
+    with pytest.raises(ValueError):
+        wsqeuclidean(x, x)
+
+    # Another check, with random data.
+    rs = np.random.RandomState(1234567890)
+    x = rs.rand(10)
+    y = rs.rand(10)
+    d1 = weuclidean(x, y)
+    d2 = wsqeuclidean(x, y)
+    assert_almost_equal(d1**2, d2, decimal=14)
+
+
+def test_hamming_unequal_length():
+    # Regression test for gh-4290.
+    x = [0, 0, 1]
+    y = [1, 0, 1, 0]
+    # Used to give an AttributeError from ndarray.mean called on bool
+    with pytest.raises(ValueError):
+        whamming(x, y)
+
+
+def test_hamming_unequal_length_with_w():
+    u = [0, 0, 1]
+    v = [0, 0, 1]
+    w = [1, 0, 1, 0]
+    msg = "'w' should have the same length as 'u' and 'v'."
+    with pytest.raises(ValueError, match=msg):
+        whamming(u, v, w)
+
+
+def test_hamming_string_array():
+    # https://github.com/scikit-learn/scikit-learn/issues/4014
+    a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam',
+                  'spam', 'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam',
+                  'eggs', 'eggs', 'eggs', 'eggs', 'eggs', 'spam'],
+                  dtype='|S4')
+    b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam',
+                  'spam', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs',
+                  'spam', 'spam', 'eggs', 'spam', 'spam', 'eggs'],
+                  dtype='|S4')
+    desired = 0.45
+    assert_allclose(whamming(a, b), desired)
+
+
+def test_minkowski_w():
+    # Regression test for gh-8142.
+    arr_in = np.array([[83.33333333, 100., 83.33333333, 100., 36.,
+                        60., 90., 150., 24., 48.],
+                       [83.33333333, 100., 83.33333333, 100., 36.,
+                        60., 90., 150., 24., 48.]])
+    p0 = pdist(arr_in, metric='minkowski', p=1, w=None)
+    c0 = cdist(arr_in, arr_in, metric='minkowski', p=1, w=None)
+    p1 = pdist(arr_in, metric='minkowski', p=1)
+    c1 = cdist(arr_in, arr_in, metric='minkowski', p=1)
+
+    assert_allclose(p0, p1, rtol=1e-15)
+    assert_allclose(c0, c1, rtol=1e-15)
+
+
+def test_sqeuclidean_dtypes():
+    # Assert that sqeuclidean returns the right types of values.
+    # Integer types should be converted to floating for stability.
+    # Floating point types should be the same as the input.
+    x = [1, 2, 3]
+    y = [4, 5, 6]
+
+    for dtype in [np.int8, np.int16, np.int32, np.int64]:
+        d = wsqeuclidean(np.asarray(x, dtype=dtype), np.asarray(y, dtype=dtype))
+        assert_(np.issubdtype(d.dtype, np.floating))
+
+    for dtype in [np.uint8, np.uint16, np.uint32, np.uint64]:
+        umax = np.iinfo(dtype).max
+        d1 = wsqeuclidean([0], np.asarray([umax], dtype=dtype))
+        d2 = wsqeuclidean(np.asarray([umax], dtype=dtype), [0])
+
+        assert_equal(d1, d2)
+        assert_equal(d1, np.float64(umax)**2)
+
+    dtypes = [np.float32, np.float64, np.complex64, np.complex128]
+    for dtype in ['float16', 'float128']:
+        # These aren't present in older numpy versions; float128 may also not
+        # be present on all platforms.
+        if hasattr(np, dtype):
+            dtypes.append(getattr(np, dtype))
+
+    for dtype in dtypes:
+        d = wsqeuclidean(np.asarray(x, dtype=dtype), np.asarray(y, dtype=dtype))
+        assert_equal(d.dtype, dtype)
+
+
+@pytest.mark.thread_unsafe
+def test_sokalmichener():
+    # Test that sokalmichener has the same result for bool and int inputs.
+    p = [True, True, False]
+    q = [True, False, True]
+    x = [int(b) for b in p]
+    y = [int(b) for b in q]
+    with pytest.deprecated_call():
+        dist1 = sokalmichener(p, q)
+    with pytest.deprecated_call():
+        dist2 = sokalmichener(x, y)
+    # These should be exactly the same.
+    assert_equal(dist1, dist2)
+
+
+@pytest.mark.thread_unsafe
+def test_sokalmichener_with_weight():
+    # from: | 1 |   | 0 |
+    # to:   | 1 |   | 1 |
+    # weight|   | 1 |   | 0.2
+    ntf = 0 * 1 + 0 * 0.2
+    nft = 0 * 1 + 1 * 0.2
+    ntt = 1 * 1 + 0 * 0.2
+    nff = 0 * 1 + 0 * 0.2
+    expected = 2 * (nft + ntf) / (ntt + nff + 2 * (nft + ntf))
+    assert_almost_equal(expected, 0.2857143)
+    with pytest.deprecated_call():
+        actual = sokalmichener([1, 0], [1, 1], w=[1, 0.2])
+    assert_almost_equal(expected, actual)
+
+    a1 = [False, False, True, True, True, False, False, True, True, True, True,
+          True, True, False, True, False, False, False, True, True]
+    a2 = [True, True, True, False, False, True, True, True, False, True,
+          True, True, True, True, False, False, False, True, True, True]
+
+    for w in [0.05, 0.1, 1.0, 20.0]:
+        with pytest.deprecated_call():
+            assert_almost_equal(sokalmichener(a2, a1, [w]), 0.6666666666666666)
+
+
+@pytest.mark.thread_unsafe
+def test_modifies_input(metric):
+    # test whether cdist or pdist modifies input arrays
+    X1 = np.asarray([[1., 2., 3.],
+                     [1.2, 2.3, 3.4],
+                     [2.2, 2.3, 4.4],
+                     [22.2, 23.3, 44.4]])
+    X1_copy = X1.copy()
+    with maybe_deprecated(metric):
+        cdist(X1, X1, metric)
+    with maybe_deprecated(metric):
+        pdist(X1, metric)
+    assert_array_equal(X1, X1_copy)
+
+
+@pytest.mark.thread_unsafe
+def test_Xdist_deprecated_args(metric):
+    # testing both cdist and pdist deprecated warnings
+    X1 = np.asarray([[1., 2., 3.],
+                     [1.2, 2.3, 3.4],
+                     [2.2, 2.3, 4.4],
+                     [22.2, 23.3, 44.4]])
+
+    with pytest.raises(TypeError):
+        cdist(X1, X1, metric, 2.)
+
+    with pytest.raises(TypeError):
+        pdist(X1, metric, 2.)
+
+    for arg in ["p", "V", "VI"]:
+        kwargs = {arg: "foo"}
+
+        if ((arg == "V" and metric == "seuclidean")
+                or (arg == "VI" and metric == "mahalanobis")
+                or (arg == "p" and metric == "minkowski")):
+            continue
+
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                cdist(X1, X1, metric, **kwargs)
+
+        with pytest.raises(TypeError):
+            with maybe_deprecated(metric):
+                pdist(X1, metric, **kwargs)
+
+
+@pytest.mark.thread_unsafe
+def test_Xdist_non_negative_weights(metric):
+    X = eo['random-float32-data'][::5, ::2]
+    w = np.ones(X.shape[1])
+    w[::5] = -w[::5]
+
+    if metric in ['seuclidean', 'mahalanobis', 'jensenshannon']:
+        pytest.skip("not applicable")
+
+    for m in [metric, eval(metric), "test_" + metric]:
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                pdist(X, m, w=w)
+        with pytest.raises(ValueError):
+            with maybe_deprecated(metric):
+                cdist(X, X, m, w=w)
+
+
+def test__validate_vector():
+    x = [1, 2, 3]
+    y = _validate_vector(x)
+    assert_array_equal(y, x)
+
+    y = _validate_vector(x, dtype=np.float64)
+    assert_array_equal(y, x)
+    assert_equal(y.dtype, np.float64)
+
+    x = [1]
+    y = _validate_vector(x)
+    assert_equal(y.ndim, 1)
+    assert_equal(y, x)
+
+    x = 1
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        _validate_vector(x)
+
+    x = np.arange(5).reshape(1, -1, 1)
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        _validate_vector(x)
+
+    x = [[1, 2], [3, 4]]
+    with pytest.raises(ValueError, match="Input vector should be 1-D"):
+        _validate_vector(x)
+
+def test_yule_all_same():
+    # Test yule avoids a divide by zero when exactly equal
+    x = np.ones((2, 6), dtype=bool)
+    d = wyule(x[0], x[0])
+    assert d == 0.0
+
+    d = pdist(x, 'yule')
+    assert_equal(d, [0.0])
+
+    d = cdist(x[:1], x[:1], 'yule')
+    assert_equal(d, [[0.0]])
+
+
+def test_jensenshannon():
+    assert_almost_equal(jensenshannon([1.0, 0.0, 0.0], [0.0, 1.0, 0.0], 2.0),
+                        1.0)
+    assert_almost_equal(jensenshannon([1.0, 0.0], [0.5, 0.5]),
+                        0.46450140402245893)
+    assert_almost_equal(jensenshannon([1.0, 0.0, 0.0], [1.0, 0.0, 0.0]), 0.0)
+
+    assert_almost_equal(jensenshannon([[1.0, 2.0]], [[0.5, 1.5]], axis=0),
+                        [0.0, 0.0])
+    assert_almost_equal(jensenshannon([[1.0, 2.0]], [[0.5, 1.5]], axis=1),
+                        [0.0649045])
+    assert_almost_equal(jensenshannon([[1.0, 2.0]], [[0.5, 1.5]], axis=0,
+                                      keepdims=True), [[0.0, 0.0]])
+    assert_almost_equal(jensenshannon([[1.0, 2.0]], [[0.5, 1.5]], axis=1,
+                                      keepdims=True), [[0.0649045]])
+
+    a = np.array([[1, 2, 3, 4],
+                  [5, 6, 7, 8],
+                  [9, 10, 11, 12]])
+    b = np.array([[13, 14, 15, 16],
+                  [17, 18, 19, 20],
+                  [21, 22, 23, 24]])
+
+    assert_almost_equal(jensenshannon(a, b, axis=0),
+                        [0.1954288, 0.1447697, 0.1138377, 0.0927636])
+    assert_almost_equal(jensenshannon(a, b, axis=1),
+                        [0.1402339, 0.0399106, 0.0201815])
+
+
+def test_gh_17703():
+    arr_1 = np.array([1, 0, 0])
+    arr_2 = np.array([2, 0, 0])
+    expected = dice(arr_1, arr_2)
+    actual = pdist([arr_1, arr_2], metric='dice')
+    assert_allclose(actual, expected)
+    actual = cdist(np.atleast_2d(arr_1),
+                   np.atleast_2d(arr_2), metric='dice')
+    assert_allclose(actual, expected)
+
+
+@pytest.mark.thread_unsafe
+def test_immutable_input(metric):
+    if metric in ("jensenshannon", "mahalanobis", "seuclidean"):
+        pytest.skip("not applicable")
+    x = np.arange(10, dtype=np.float64)
+    x.setflags(write=False)
+    with maybe_deprecated(metric):
+        getattr(scipy.spatial.distance, metric)(x, x, w=x)
+
+
+class TestJaccard:
+
+    def test_pdist_jaccard_random(self):
+        eps = 1e-8
+        X = eo['pdist-boolean-inp']
+        Y_right = eo['pdist-jaccard']
+        Y_test1 = wpdist(X, 'jaccard')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_jaccard_random_float32(self):
+        eps = 1e-8
+        X = np.float32(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-jaccard']
+        Y_test1 = wpdist(X, 'jaccard')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_jaccard_random_nonC(self):
+        eps = 1e-8
+        X = eo['pdist-boolean-inp']
+        Y_right = eo['pdist-jaccard']
+        Y_test2 = wpdist(X, 'test_jaccard')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_djaccard_random(self):
+        eps = 1e-8
+        X = np.float64(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-jaccard']
+        Y_test1 = wpdist(X, 'jaccard')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_djaccard_random_float32(self):
+        eps = 1e-8
+        X = np.float32(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-jaccard']
+        Y_test1 = wpdist(X, 'jaccard')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_djaccard_allzeros(self):
+        eps = 1e-15
+        Y = pdist(np.zeros((5, 3)), 'jaccard')
+        assert_allclose(np.zeros(10), Y, rtol=eps)
+
+    def test_pdist_djaccard_random_nonC(self):
+        eps = 1e-8
+        X = np.float64(eo['pdist-boolean-inp'])
+        Y_right = eo['pdist-jaccard']
+        Y_test2 = wpdist(X, 'test_jaccard')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_djaccard_allzeros_nonC(self):
+        eps = 1e-15
+        Y = pdist(np.zeros((5, 3)), 'test_jaccard')
+        assert_allclose(np.zeros(10), Y, rtol=eps)
+
+    def test_pdist_jaccard_mtica1(self):
+        m = wjaccard(np.array([1, 0, 1, 1, 0]),
+                     np.array([1, 1, 0, 1, 1]))
+        m2 = wjaccard(np.array([1, 0, 1, 1, 0], dtype=bool),
+                      np.array([1, 1, 0, 1, 1], dtype=bool))
+        assert_allclose(m, 0.6, rtol=0, atol=1e-10)
+        assert_allclose(m2, 0.6, rtol=0, atol=1e-10)
+
+    def test_pdist_jaccard_mtica2(self):
+        m = wjaccard(np.array([1, 0, 1]),
+                     np.array([1, 1, 0]))
+        m2 = wjaccard(np.array([1, 0, 1], dtype=bool),
+                      np.array([1, 1, 0], dtype=bool))
+        assert_allclose(m, 2 / 3, rtol=0, atol=1e-10)
+        assert_allclose(m2, 2 / 3, rtol=0, atol=1e-10)
+
+    def test_non_01_input(self):
+        # Non-0/1 numeric input should be cast to bool before computation.
+        # See gh-21176.
+        x = np.array([-10, 2.5, 0])  # [True, True, False]
+        y = np.array([ 2,   -5, 2])  # [True, True, True]
+        eps = np.finfo(float).eps
+        assert_allclose(jaccard(x, y), 1/3, rtol=eps)
+        assert_allclose(cdist([x], [y], 'jaccard'), [[1/3]])
+        assert_allclose(pdist([x, y], 'jaccard'), [1/3])
+
+
+class TestChebyshev:
+
+    def test_pdist_chebyshev_random(self):
+        eps = 1e-8
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-chebyshev']
+        Y_test1 = pdist(X, 'chebyshev')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_chebyshev_random_float32(self):
+        eps = 1e-7
+        X = np.float32(eo['pdist-double-inp'])
+        Y_right = eo['pdist-chebyshev']
+        Y_test1 = pdist(X, 'chebyshev')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    def test_pdist_chebyshev_random_nonC(self):
+        eps = 1e-8
+        X = eo['pdist-double-inp']
+        Y_right = eo['pdist-chebyshev']
+        Y_test2 = pdist(X, 'test_chebyshev')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_pdist_chebyshev_iris(self):
+        eps = 1e-14
+        X = eo['iris']
+        Y_right = eo['pdist-chebyshev-iris']
+        Y_test1 = pdist(X, 'chebyshev')
+        assert_allclose(Y_test1, Y_right, rtol=eps)
+
+    def test_pdist_chebyshev_iris_float32(self):
+        eps = 1e-5
+        X = np.float32(eo['iris'])
+        Y_right = eo['pdist-chebyshev-iris']
+        Y_test1 = pdist(X, 'chebyshev')
+        assert_allclose(Y_test1, Y_right, rtol=eps, verbose=verbose > 2)
+
+    def test_pdist_chebyshev_iris_nonC(self):
+        eps = 1e-14
+        X = eo['iris']
+        Y_right = eo['pdist-chebyshev-iris']
+        Y_test2 = pdist(X, 'test_chebyshev')
+        assert_allclose(Y_test2, Y_right, rtol=eps)
+
+    def test_weighted(self):
+        # Basic test for weighted Chebyshev.  Only components with non-zero
+        # weight participate in the 'max'.
+        x = [1, 2, 3]
+        y = [6, 5, 4]
+        w = [0, 1, 5]
+        assert_equal(chebyshev(x, y, w), 3)
+        assert_equal(pdist([x, y], 'chebyshev', w=w), [3])
+        assert_equal(cdist([x], [y], 'chebyshev', w=w), [[3]])
+
+    def test_zero_weight(self):
+        # If the weight is identically zero, the distance should be zero.
+        x = [1, 2, 3]
+        y = [6, 5, 4]
+        w = [0, 0, 0]
+        assert_equal(chebyshev(x, y, w), 0)
+        assert_equal(pdist([x, y], 'chebyshev', w=w), [0])
+        assert_equal(cdist([x], [y], 'chebyshev', w=w), [[0]])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_hausdorff.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_hausdorff.py
new file mode 100644
index 0000000000000000000000000000000000000000..45d89e868c8c2daca6e9c30973399fbbfc5d52fd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_hausdorff.py
@@ -0,0 +1,199 @@
+import numpy as np
+from numpy.testing import (assert_allclose,
+                           assert_array_equal,
+                           assert_equal)
+import pytest
+from scipy.spatial.distance import directed_hausdorff
+from scipy.spatial import distance
+from scipy._lib._util import check_random_state
+
+
+class TestHausdorff:
+    # Test various properties of the directed Hausdorff code.
+
+    def setup_method(self):
+        np.random.seed(1234)
+        random_angles = np.random.random(100) * np.pi * 2
+        random_columns = np.column_stack(
+            (random_angles, random_angles, np.zeros(100)))
+        random_columns[..., 0] = np.cos(random_columns[..., 0])
+        random_columns[..., 1] = np.sin(random_columns[..., 1])
+        random_columns_2 = np.column_stack(
+            (random_angles, random_angles, np.zeros(100)))
+        random_columns_2[1:, 0] = np.cos(random_columns_2[1:, 0]) * 2.0
+        random_columns_2[1:, 1] = np.sin(random_columns_2[1:, 1]) * 2.0
+        # move one point farther out so we don't have two perfect circles
+        random_columns_2[0, 0] = np.cos(random_columns_2[0, 0]) * 3.3
+        random_columns_2[0, 1] = np.sin(random_columns_2[0, 1]) * 3.3
+        self.path_1 = random_columns
+        self.path_2 = random_columns_2
+        self.path_1_4d = np.insert(self.path_1, 3, 5, axis=1)
+        self.path_2_4d = np.insert(self.path_2, 3, 27, axis=1)
+
+    def test_symmetry(self):
+        # Ensure that the directed (asymmetric) Hausdorff distance is
+        # actually asymmetric
+
+        forward = directed_hausdorff(self.path_1, self.path_2)[0]
+        reverse = directed_hausdorff(self.path_2, self.path_1)[0]
+        assert forward != reverse
+
+    def test_brute_force_comparison_forward(self):
+        # Ensure that the algorithm for directed_hausdorff gives the
+        # same result as the simple / brute force approach in the
+        # forward direction.
+        actual = directed_hausdorff(self.path_1, self.path_2)[0]
+        # brute force over rows:
+        expected = max(np.amin(distance.cdist(self.path_1, self.path_2),
+                               axis=1))
+        assert_allclose(actual, expected)
+
+    def test_brute_force_comparison_reverse(self):
+        # Ensure that the algorithm for directed_hausdorff gives the
+        # same result as the simple / brute force approach in the
+        # reverse direction.
+        actual = directed_hausdorff(self.path_2, self.path_1)[0]
+        # brute force over columns:
+        expected = max(np.amin(distance.cdist(self.path_1, self.path_2),
+                               axis=0))
+        assert_allclose(actual, expected)
+
+    def test_degenerate_case(self):
+        # The directed Hausdorff distance must be zero if both input
+        # data arrays match.
+        actual = directed_hausdorff(self.path_1, self.path_1)[0]
+        assert_allclose(actual, 0.0)
+
+    def test_2d_data_forward(self):
+        # Ensure that 2D data is handled properly for a simple case
+        # relative to brute force approach.
+        actual = directed_hausdorff(self.path_1[..., :2],
+                                    self.path_2[..., :2])[0]
+        expected = max(np.amin(distance.cdist(self.path_1[..., :2],
+                                              self.path_2[..., :2]),
+                               axis=1))
+        assert_allclose(actual, expected)
+
+    def test_4d_data_reverse(self):
+        # Ensure that 4D data is handled properly for a simple case
+        # relative to brute force approach.
+        actual = directed_hausdorff(self.path_2_4d, self.path_1_4d)[0]
+        # brute force over columns:
+        expected = max(np.amin(distance.cdist(self.path_1_4d, self.path_2_4d),
+                               axis=0))
+        assert_allclose(actual, expected)
+
+    def test_indices(self):
+        # Ensure that correct point indices are returned -- they should
+        # correspond to the Hausdorff pair
+        path_simple_1 = np.array([[-1,-12],[0,0], [1,1], [3,7], [1,2]])
+        path_simple_2 = np.array([[0,0], [1,1], [4,100], [10,9]])
+        actual = directed_hausdorff(path_simple_2, path_simple_1)[1:]
+        expected = (2, 3)
+        assert_array_equal(actual, expected)
+
+    def test_random_state(self):
+        # ensure that the global random state is not modified because
+        # the directed Hausdorff algorithm uses randomization
+        rs = check_random_state(None)
+        old_global_state = rs.get_state()
+        directed_hausdorff(self.path_1, self.path_2)
+        rs2 = check_random_state(None)
+        new_global_state = rs2.get_state()
+        assert_equal(new_global_state, old_global_state)
+
+    @pytest.mark.parametrize("seed", [None, 27870671, np.random.default_rng(177)])
+    def test_random_state_None_int(self, seed):
+        # check that seed values of None or int do not alter global
+        # random state
+        rs = check_random_state(None)
+        old_global_state = rs.get_state()
+        directed_hausdorff(self.path_1, self.path_2, seed)
+        rs2 = check_random_state(None)
+        new_global_state = rs2.get_state()
+        assert_equal(new_global_state, old_global_state)
+
+    def test_invalid_dimensions(self):
+        # Ensure that a ValueError is raised when the number of columns
+        # is not the same
+        rng = np.random.default_rng(189048172503940875434364128139223470523)
+        A = rng.random((3, 2))
+        B = rng.random((3, 5))
+        msg = r"need to have the same number of columns"
+        with pytest.raises(ValueError, match=msg):
+            directed_hausdorff(A, B)
+
+    # preserve use of legacy keyword `seed` during SPEC 7 transition
+    @pytest.mark.parametrize("A, B, seed, expected", [
+        # the two cases from gh-11332
+        ([(0,0)],
+         [(0,1), (0,0)],
+         np.int64(0),
+         (0.0, 0, 1)),
+        ([(0,0)],
+         [(0,1), (0,0)],
+         1,
+         (0.0, 0, 1)),
+        # gh-11332 cases with a Generator
+        ([(0,0)],
+         [(0,1), (0,0)],
+         np.random.default_rng(0),
+         (0.0, 0, 1)),
+        ([(0,0)],
+         [(0,1), (0,0)],
+         np.random.default_rng(1),
+         (0.0, 0, 1)),
+        # slightly more complex case
+        ([(-5, 3), (0,0)],
+         [(0,1), (0,0), (-5, 3)],
+         77098,
+         # the maximum minimum distance will
+         # be the last one found, but a unique
+         # solution is not guaranteed more broadly
+         (0.0, 1, 1)),
+        # repeated with Generator seeding
+        ([(-5, 3), (0,0)],
+         [(0,1), (0,0), (-5, 3)],
+         np.random.default_rng(77098),
+         # NOTE: using a Generator changes the
+         # indices but not the distance (unique solution
+         # not guaranteed)
+         (0.0, 0, 2)),
+    ])
+    def test_subsets(self, A, B, seed, expected, num_parallel_threads):
+        # verify fix for gh-11332
+        actual = directed_hausdorff(u=A, v=B, seed=seed)
+        # check distance
+        assert_allclose(actual[0], expected[0])
+        starting_seed = seed
+        if hasattr(seed, 'bit_generator'):
+            starting_seed = seed.bit_generator._seed_seq.entropy
+        # check indices
+        if num_parallel_threads == 1 or starting_seed != 77098:
+            assert actual[1:] == expected[1:]
+
+        if not isinstance(seed, np.random.RandomState):
+            # Check that new `rng` keyword is also accepted
+            actual = directed_hausdorff(u=A, v=B, rng=seed)
+            assert_allclose(actual[0], expected[0])
+
+
+@pytest.mark.xslow
+def test_massive_arr_overflow():
+    # on 64-bit systems we should be able to
+    # handle arrays that exceed the indexing
+    # size of a 32-bit signed integer
+    try:
+        import psutil
+    except ModuleNotFoundError:
+        pytest.skip("psutil required to check available memory")
+    if psutil.virtual_memory().available < 80*2**30:
+        # Don't run the test if there is less than 80 gig of RAM available.
+        pytest.skip('insufficient memory available to run this test')
+    size = int(3e9)
+    arr1 = np.zeros(shape=(size, 2))
+    arr2 = np.zeros(shape=(3, 2))
+    arr1[size - 1] = [5, 5]
+    actual = directed_hausdorff(u=arr1, v=arr2)
+    assert_allclose(actual[0], 7.0710678118654755)
+    assert_allclose(actual[1], size - 1)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_kdtree.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_kdtree.py
new file mode 100644
index 0000000000000000000000000000000000000000..8b912f249a2228b72bfcdd4de01542573d7920e1
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_kdtree.py
@@ -0,0 +1,1535 @@
+# Copyright Anne M. Archibald 2008
+# Released under the scipy license
+
+import os
+from numpy.testing import (assert_equal, assert_array_equal, assert_,
+                           assert_almost_equal, assert_array_almost_equal,
+                           assert_allclose)
+from pytest import raises as assert_raises
+import pytest
+from platform import python_implementation
+import numpy as np
+from scipy.spatial import KDTree, Rectangle, distance_matrix, cKDTree
+from scipy.spatial._ckdtree import cKDTreeNode
+from scipy.spatial import minkowski_distance
+
+import itertools
+
+@pytest.fixture(params=[KDTree, cKDTree])
+def kdtree_type(request):
+    return request.param
+
+
+def KDTreeTest(kls):
+    """Class decorator to create test cases for KDTree and cKDTree
+
+    Tests use the class variable ``kdtree_type`` as the tree constructor.
+    """
+    if not kls.__name__.startswith('_Test'):
+        raise RuntimeError("Expected a class name starting with _Test")
+
+    for tree in (KDTree, cKDTree):
+        test_name = kls.__name__[1:] + '_' + tree.__name__
+
+        if test_name in globals():
+            raise RuntimeError("Duplicated test name: " + test_name)
+
+        # Create a new sub-class with kdtree_type defined
+        test_case = type(test_name, (kls,), {'kdtree_type': tree})
+        globals()[test_name] = test_case
+    return kls
+
+
+def distance_box(a, b, p, boxsize):
+    diff = a - b
+    diff[diff > 0.5 * boxsize] -= boxsize
+    diff[diff < -0.5 * boxsize] += boxsize
+    d = minkowski_distance(diff, 0, p)
+    return d
+
+class ConsistencyTests:
+    def distance(self, a, b, p):
+        return minkowski_distance(a, b, p)
+
+    def test_nearest(self):
+        x = self.x
+        d, i = self.kdtree.query(x, 1)
+        assert_almost_equal(d**2, np.sum((x-self.data[i])**2))
+        eps = 1e-8
+        assert_(np.all(np.sum((self.data-x[np.newaxis, :])**2, axis=1) > d**2-eps))
+
+    def test_m_nearest(self):
+        x = self.x
+        m = self.m
+        dd, ii = self.kdtree.query(x, m)
+        d = np.amax(dd)
+        i = ii[np.argmax(dd)]
+        assert_almost_equal(d**2, np.sum((x-self.data[i])**2))
+        eps = 1e-8
+        assert_equal(
+            np.sum(np.sum((self.data-x[np.newaxis, :])**2, axis=1) < d**2+eps),
+            m,
+        )
+
+    def test_points_near(self):
+        x = self.x
+        d = self.d
+        dd, ii = self.kdtree.query(x, k=self.kdtree.n, distance_upper_bound=d)
+        eps = 1e-8
+        hits = 0
+        for near_d, near_i in zip(dd, ii):
+            if near_d == np.inf:
+                continue
+            hits += 1
+            assert_almost_equal(near_d**2, np.sum((x-self.data[near_i])**2))
+            assert_(near_d < d+eps, f"near_d={near_d:g} should be less than {d:g}")
+        assert_equal(np.sum(self.distance(self.data, x, 2) < d**2+eps), hits)
+
+    def test_points_near_l1(self):
+        x = self.x
+        d = self.d
+        dd, ii = self.kdtree.query(x, k=self.kdtree.n, p=1, distance_upper_bound=d)
+        eps = 1e-8
+        hits = 0
+        for near_d, near_i in zip(dd, ii):
+            if near_d == np.inf:
+                continue
+            hits += 1
+            assert_almost_equal(near_d, self.distance(x, self.data[near_i], 1))
+            assert_(near_d < d+eps, f"near_d={near_d:g} should be less than {d:g}")
+        assert_equal(np.sum(self.distance(self.data, x, 1) < d+eps), hits)
+
+    def test_points_near_linf(self):
+        x = self.x
+        d = self.d
+        dd, ii = self.kdtree.query(x, k=self.kdtree.n, p=np.inf, distance_upper_bound=d)
+        eps = 1e-8
+        hits = 0
+        for near_d, near_i in zip(dd, ii):
+            if near_d == np.inf:
+                continue
+            hits += 1
+            assert_almost_equal(near_d, self.distance(x, self.data[near_i], np.inf))
+            assert_(near_d < d+eps, f"near_d={near_d:g} should be less than {d:g}")
+        assert_equal(np.sum(self.distance(self.data, x, np.inf) < d+eps), hits)
+
+    def test_approx(self):
+        x = self.x
+        k = self.k
+        eps = 0.1
+        d_real, i_real = self.kdtree.query(x, k)
+        d, i = self.kdtree.query(x, k, eps=eps)
+        assert_(np.all(d <= d_real*(1+eps)))
+
+
+@KDTreeTest
+class _Test_random(ConsistencyTests):
+    def setup_method(self):
+        self.n = 100
+        self.m = 4
+        np.random.seed(1234)
+        self.data = np.random.randn(self.n, self.m)
+        self.kdtree = self.kdtree_type(self.data, leafsize=2)
+        self.x = np.random.randn(self.m)
+        self.d = 0.2
+        self.k = 10
+
+
+@KDTreeTest
+class _Test_random_far(_Test_random):
+    def setup_method(self):
+        super().setup_method()
+        self.x = np.random.randn(self.m)+10
+
+
+@KDTreeTest
+class _Test_small(ConsistencyTests):
+    def setup_method(self):
+        self.data = np.array([[0, 0, 0],
+                              [0, 0, 1],
+                              [0, 1, 0],
+                              [0, 1, 1],
+                              [1, 0, 0],
+                              [1, 0, 1],
+                              [1, 1, 0],
+                              [1, 1, 1]])
+        self.kdtree = self.kdtree_type(self.data)
+        self.n = self.kdtree.n
+        self.m = self.kdtree.m
+        np.random.seed(1234)
+        self.x = np.random.randn(3)
+        self.d = 0.5
+        self.k = 4
+
+    def test_nearest(self):
+        assert_array_equal(
+                self.kdtree.query((0, 0, 0.1), 1),
+                (0.1, 0))
+
+    def test_nearest_two(self):
+        assert_array_equal(
+                self.kdtree.query((0, 0, 0.1), 2),
+                ([0.1, 0.9], [0, 1]))
+
+
+@KDTreeTest
+class _Test_small_nonleaf(_Test_small):
+    def setup_method(self):
+        super().setup_method()
+        self.kdtree = self.kdtree_type(self.data, leafsize=1)
+
+
+class Test_vectorization_KDTree:
+    def setup_method(self):
+        self.data = np.array([[0, 0, 0],
+                              [0, 0, 1],
+                              [0, 1, 0],
+                              [0, 1, 1],
+                              [1, 0, 0],
+                              [1, 0, 1],
+                              [1, 1, 0],
+                              [1, 1, 1]])
+        self.kdtree = KDTree(self.data)
+
+    def test_single_query(self):
+        d, i = self.kdtree.query(np.array([0, 0, 0]))
+        assert_(isinstance(d, float))
+        assert_(np.issubdtype(i, np.signedinteger))
+
+    def test_vectorized_query(self):
+        d, i = self.kdtree.query(np.zeros((2, 4, 3)))
+        assert_equal(np.shape(d), (2, 4))
+        assert_equal(np.shape(i), (2, 4))
+
+    def test_single_query_multiple_neighbors(self):
+        s = 23
+        kk = self.kdtree.n+s
+        d, i = self.kdtree.query(np.array([0, 0, 0]), k=kk)
+        assert_equal(np.shape(d), (kk,))
+        assert_equal(np.shape(i), (kk,))
+        assert_(np.all(~np.isfinite(d[-s:])))
+        assert_(np.all(i[-s:] == self.kdtree.n))
+
+    def test_vectorized_query_multiple_neighbors(self):
+        s = 23
+        kk = self.kdtree.n+s
+        d, i = self.kdtree.query(np.zeros((2, 4, 3)), k=kk)
+        assert_equal(np.shape(d), (2, 4, kk))
+        assert_equal(np.shape(i), (2, 4, kk))
+        assert_(np.all(~np.isfinite(d[:, :, -s:])))
+        assert_(np.all(i[:, :, -s:] == self.kdtree.n))
+
+    def test_query_raises_for_k_none(self):
+        x = 1.0
+        with pytest.raises(ValueError, match="k must be an integer or*"):
+            self.kdtree.query(x, k=None)
+
+class Test_vectorization_cKDTree:
+    def setup_method(self):
+        self.data = np.array([[0, 0, 0],
+                              [0, 0, 1],
+                              [0, 1, 0],
+                              [0, 1, 1],
+                              [1, 0, 0],
+                              [1, 0, 1],
+                              [1, 1, 0],
+                              [1, 1, 1]])
+        self.kdtree = cKDTree(self.data)
+
+    def test_single_query(self):
+        d, i = self.kdtree.query([0, 0, 0])
+        assert_(isinstance(d, float))
+        assert_(isinstance(i, int))
+
+    def test_vectorized_query(self):
+        d, i = self.kdtree.query(np.zeros((2, 4, 3)))
+        assert_equal(np.shape(d), (2, 4))
+        assert_equal(np.shape(i), (2, 4))
+
+    def test_vectorized_query_noncontiguous_values(self):
+        np.random.seed(1234)
+        qs = np.random.randn(3, 1000).T
+        ds, i_s = self.kdtree.query(qs)
+        for q, d, i in zip(qs, ds, i_s):
+            assert_equal(self.kdtree.query(q), (d, i))
+
+    def test_single_query_multiple_neighbors(self):
+        s = 23
+        kk = self.kdtree.n+s
+        d, i = self.kdtree.query([0, 0, 0], k=kk)
+        assert_equal(np.shape(d), (kk,))
+        assert_equal(np.shape(i), (kk,))
+        assert_(np.all(~np.isfinite(d[-s:])))
+        assert_(np.all(i[-s:] == self.kdtree.n))
+
+    def test_vectorized_query_multiple_neighbors(self):
+        s = 23
+        kk = self.kdtree.n+s
+        d, i = self.kdtree.query(np.zeros((2, 4, 3)), k=kk)
+        assert_equal(np.shape(d), (2, 4, kk))
+        assert_equal(np.shape(i), (2, 4, kk))
+        assert_(np.all(~np.isfinite(d[:, :, -s:])))
+        assert_(np.all(i[:, :, -s:] == self.kdtree.n))
+
+class ball_consistency:
+    tol = 0.0
+
+    def distance(self, a, b, p):
+        return minkowski_distance(a * 1.0, b * 1.0, p)
+
+    def test_in_ball(self):
+        x = np.atleast_2d(self.x)
+        d = np.broadcast_to(self.d, x.shape[:-1])
+        l = self.T.query_ball_point(x, self.d, p=self.p, eps=self.eps)
+        for i, ind in enumerate(l):
+            dist = self.distance(self.data[ind], x[i], self.p) - d[i]*(1.+self.eps)
+            norm = self.distance(self.data[ind], x[i], self.p) + d[i]*(1.+self.eps)
+            assert_array_equal(dist < self.tol * norm, True)
+
+    def test_found_all(self):
+        x = np.atleast_2d(self.x)
+        d = np.broadcast_to(self.d, x.shape[:-1])
+        l = self.T.query_ball_point(x, self.d, p=self.p, eps=self.eps)
+        for i, ind in enumerate(l):
+            c = np.ones(self.T.n, dtype=bool)
+            c[ind] = False
+            dist = self.distance(self.data[c], x[i], self.p) - d[i]/(1.+self.eps)
+            norm = self.distance(self.data[c], x[i], self.p) + d[i]/(1.+self.eps)
+            assert_array_equal(dist > -self.tol * norm, True)
+
+@KDTreeTest
+class _Test_random_ball(ball_consistency):
+    def setup_method(self):
+        n = 100
+        m = 4
+        np.random.seed(1234)
+        self.data = np.random.randn(n, m)
+        self.T = self.kdtree_type(self.data, leafsize=2)
+        self.x = np.random.randn(m)
+        self.p = 2.
+        self.eps = 0
+        self.d = 0.2
+
+
+@KDTreeTest
+class _Test_random_ball_periodic(ball_consistency):
+    def distance(self, a, b, p):
+        return distance_box(a, b, p, 1.0)
+
+    def setup_method(self):
+        n = 10000
+        m = 4
+        np.random.seed(1234)
+        self.data = np.random.uniform(size=(n, m))
+        self.T = self.kdtree_type(self.data, leafsize=2, boxsize=1)
+        self.x = np.full(m, 0.1)
+        self.p = 2.
+        self.eps = 0
+        self.d = 0.2
+
+    def test_in_ball_outside(self):
+        l = self.T.query_ball_point(self.x + 1.0, self.d, p=self.p, eps=self.eps)
+        for i in l:
+            assert_(self.distance(self.data[i], self.x, self.p) <= self.d*(1.+self.eps))
+        l = self.T.query_ball_point(self.x - 1.0, self.d, p=self.p, eps=self.eps)
+        for i in l:
+            assert_(self.distance(self.data[i], self.x, self.p) <= self.d*(1.+self.eps))
+
+    def test_found_all_outside(self):
+        c = np.ones(self.T.n, dtype=bool)
+        l = self.T.query_ball_point(self.x + 1.0, self.d, p=self.p, eps=self.eps)
+        c[l] = False
+        assert np.all(
+            self.distance(self.data[c], self.x, self.p) >= self.d/(1.+self.eps)
+        )
+
+        l = self.T.query_ball_point(self.x - 1.0, self.d, p=self.p, eps=self.eps)
+        c[l] = False
+        assert np.all(
+            self.distance(self.data[c], self.x, self.p) >= self.d/(1.+self.eps)
+        )
+
+
+@KDTreeTest
+class _Test_random_ball_largep_issue9890(ball_consistency):
+
+    # allow some roundoff errors due to numerical issues
+    tol = 1e-13
+
+    def setup_method(self):
+        n = 1000
+        m = 2
+        np.random.seed(123)
+        self.data = np.random.randint(100, 1000, size=(n, m))
+        self.T = self.kdtree_type(self.data)
+        self.x = self.data
+        self.p = 100
+        self.eps = 0
+        self.d = 10
+
+
+@KDTreeTest
+class _Test_random_ball_approx(_Test_random_ball):
+
+    def setup_method(self):
+        super().setup_method()
+        self.eps = 0.1
+
+
+@KDTreeTest
+class _Test_random_ball_approx_periodic(_Test_random_ball):
+
+    def setup_method(self):
+        super().setup_method()
+        self.eps = 0.1
+
+
+@KDTreeTest
+class _Test_random_ball_far(_Test_random_ball):
+
+    def setup_method(self):
+        super().setup_method()
+        self.d = 2.
+
+@KDTreeTest
+class _Test_random_ball_far_periodic(_Test_random_ball_periodic):
+
+    def setup_method(self):
+        super().setup_method()
+        self.d = 2.
+
+
+@KDTreeTest
+class _Test_random_ball_l1(_Test_random_ball):
+
+    def setup_method(self):
+        super().setup_method()
+        self.p = 1
+
+
+@KDTreeTest
+class _Test_random_ball_linf(_Test_random_ball):
+
+    def setup_method(self):
+        super().setup_method()
+        self.p = np.inf
+
+
+def test_random_ball_vectorized(kdtree_type):
+    n = 20
+    m = 5
+    np.random.seed(1234)
+    T = kdtree_type(np.random.randn(n, m))
+
+    r = T.query_ball_point(np.random.randn(2, 3, m), 1)
+    assert_equal(r.shape, (2, 3))
+    assert_(isinstance(r[0, 0], list))
+
+
+def test_query_ball_point_multithreading(kdtree_type):
+    np.random.seed(0)
+    n = 5000
+    k = 2
+    points = np.random.randn(n, k)
+    T = kdtree_type(points)
+    l1 = T.query_ball_point(points, 0.003, workers=1)
+    l2 = T.query_ball_point(points, 0.003, workers=64)
+    l3 = T.query_ball_point(points, 0.003, workers=-1)
+
+    for i in range(n):
+        if l1[i] or l2[i]:
+            assert_array_equal(l1[i], l2[i])
+
+    for i in range(n):
+        if l1[i] or l3[i]:
+            assert_array_equal(l1[i], l3[i])
+
+
+class two_trees_consistency:
+
+    def distance(self, a, b, p):
+        return minkowski_distance(a, b, p)
+
+    def test_all_in_ball(self):
+        r = self.T1.query_ball_tree(self.T2, self.d, p=self.p, eps=self.eps)
+        for i, l in enumerate(r):
+            for j in l:
+                assert (self.distance(self.data1[i], self.data2[j], self.p)
+                        <= self.d*(1.+self.eps))
+
+    def test_found_all(self):
+        r = self.T1.query_ball_tree(self.T2, self.d, p=self.p, eps=self.eps)
+        for i, l in enumerate(r):
+            c = np.ones(self.T2.n, dtype=bool)
+            c[l] = False
+            assert np.all(self.distance(self.data2[c], self.data1[i], self.p)
+                          >= self.d/(1.+self.eps))
+
+
+@KDTreeTest
+class _Test_two_random_trees(two_trees_consistency):
+
+    def setup_method(self):
+        n = 50
+        m = 4
+        np.random.seed(1234)
+        self.data1 = np.random.randn(n, m)
+        self.T1 = self.kdtree_type(self.data1, leafsize=2)
+        self.data2 = np.random.randn(n, m)
+        self.T2 = self.kdtree_type(self.data2, leafsize=2)
+        self.p = 2.
+        self.eps = 0
+        self.d = 0.2
+
+
+@KDTreeTest
+class _Test_two_random_trees_periodic(two_trees_consistency):
+    def distance(self, a, b, p):
+        return distance_box(a, b, p, 1.0)
+
+    def setup_method(self):
+        n = 50
+        m = 4
+        np.random.seed(1234)
+        self.data1 = np.random.uniform(size=(n, m))
+        self.T1 = self.kdtree_type(self.data1, leafsize=2, boxsize=1.0)
+        self.data2 = np.random.uniform(size=(n, m))
+        self.T2 = self.kdtree_type(self.data2, leafsize=2, boxsize=1.0)
+        self.p = 2.
+        self.eps = 0
+        self.d = 0.2
+
+
+@KDTreeTest
+class _Test_two_random_trees_far(_Test_two_random_trees):
+
+    def setup_method(self):
+        super().setup_method()
+        self.d = 2
+
+
+@KDTreeTest
+class _Test_two_random_trees_far_periodic(_Test_two_random_trees_periodic):
+
+    def setup_method(self):
+        super().setup_method()
+        self.d = 2
+
+
+@KDTreeTest
+class _Test_two_random_trees_linf(_Test_two_random_trees):
+
+    def setup_method(self):
+        super().setup_method()
+        self.p = np.inf
+
+
+@KDTreeTest
+class _Test_two_random_trees_linf_periodic(_Test_two_random_trees_periodic):
+
+    def setup_method(self):
+        super().setup_method()
+        self.p = np.inf
+
+
+class Test_rectangle:
+
+    def setup_method(self):
+        self.rect = Rectangle([0, 0], [1, 1])
+
+    def test_min_inside(self):
+        assert_almost_equal(self.rect.min_distance_point([0.5, 0.5]), 0)
+
+    def test_min_one_side(self):
+        assert_almost_equal(self.rect.min_distance_point([0.5, 1.5]), 0.5)
+
+    def test_min_two_sides(self):
+        assert_almost_equal(self.rect.min_distance_point([2, 2]), np.sqrt(2))
+
+    def test_max_inside(self):
+        assert_almost_equal(self.rect.max_distance_point([0.5, 0.5]), 1/np.sqrt(2))
+
+    def test_max_one_side(self):
+        assert_almost_equal(self.rect.max_distance_point([0.5, 1.5]),
+                            np.hypot(0.5, 1.5))
+
+    def test_max_two_sides(self):
+        assert_almost_equal(self.rect.max_distance_point([2, 2]), 2*np.sqrt(2))
+
+    def test_split(self):
+        less, greater = self.rect.split(0, 0.1)
+        assert_array_equal(less.maxes, [0.1, 1])
+        assert_array_equal(less.mins, [0, 0])
+        assert_array_equal(greater.maxes, [1, 1])
+        assert_array_equal(greater.mins, [0.1, 0])
+
+
+def test_distance_l2():
+    assert_almost_equal(minkowski_distance([0, 0], [1, 1], 2), np.sqrt(2))
+
+
+def test_distance_l1():
+    assert_almost_equal(minkowski_distance([0, 0], [1, 1], 1), 2)
+
+
+def test_distance_linf():
+    assert_almost_equal(minkowski_distance([0, 0], [1, 1], np.inf), 1)
+
+
+def test_distance_vectorization():
+    np.random.seed(1234)
+    x = np.random.randn(10, 1, 3)
+    y = np.random.randn(1, 7, 3)
+    assert_equal(minkowski_distance(x, y).shape, (10, 7))
+
+
+class count_neighbors_consistency:
+    def test_one_radius(self):
+        r = 0.2
+        assert_equal(self.T1.count_neighbors(self.T2, r),
+                np.sum([len(l) for l in self.T1.query_ball_tree(self.T2, r)]))
+
+    def test_large_radius(self):
+        r = 1000
+        assert_equal(self.T1.count_neighbors(self.T2, r),
+                np.sum([len(l) for l in self.T1.query_ball_tree(self.T2, r)]))
+
+    def test_multiple_radius(self):
+        rs = np.exp(np.linspace(np.log(0.01), np.log(10), 3))
+        results = self.T1.count_neighbors(self.T2, rs)
+        assert_(np.all(np.diff(results) >= 0))
+        for r, result in zip(rs, results):
+            assert_equal(self.T1.count_neighbors(self.T2, r), result)
+
+@KDTreeTest
+class _Test_count_neighbors(count_neighbors_consistency):
+    def setup_method(self):
+        n = 50
+        m = 2
+        np.random.seed(1234)
+        self.T1 = self.kdtree_type(np.random.randn(n, m), leafsize=2)
+        self.T2 = self.kdtree_type(np.random.randn(n, m), leafsize=2)
+
+
+class sparse_distance_matrix_consistency:
+
+    def distance(self, a, b, p):
+        return minkowski_distance(a, b, p)
+
+    def test_consistency_with_neighbors(self):
+        M = self.T1.sparse_distance_matrix(self.T2, self.r)
+        r = self.T1.query_ball_tree(self.T2, self.r)
+        for i, l in enumerate(r):
+            for j in l:
+                assert_almost_equal(
+                    M[i, j],
+                    self.distance(self.T1.data[i], self.T2.data[j], self.p),
+                    decimal=14
+                )
+        for ((i, j), d) in M.items():
+            assert_(j in r[i])
+
+    def test_zero_distance(self):
+        # raises an exception for bug 870 (FIXME: Does it?)
+        self.T1.sparse_distance_matrix(self.T1, self.r)
+
+    def test_consistency(self):
+        # Test consistency with a distance_matrix
+        M1 = self.T1.sparse_distance_matrix(self.T2, self.r)
+        expected = distance_matrix(self.T1.data, self.T2.data)
+        expected[expected > self.r] = 0
+        assert_array_almost_equal(M1.toarray(), expected, decimal=14)
+
+    def test_against_logic_error_regression(self):
+        # regression test for gh-5077 logic error
+        np.random.seed(0)
+        too_many = np.array(np.random.randn(18, 2), dtype=int)
+        tree = self.kdtree_type(
+            too_many, balanced_tree=False, compact_nodes=False)
+        d = tree.sparse_distance_matrix(tree, 3).toarray()
+        assert_array_almost_equal(d, d.T, decimal=14)
+
+    def test_ckdtree_return_types(self):
+        # brute-force reference
+        ref = np.zeros((self.n, self.n))
+        for i in range(self.n):
+            for j in range(self.n):
+                v = self.data1[i, :] - self.data2[j, :]
+                ref[i, j] = np.dot(v, v)
+        ref = np.sqrt(ref)
+        ref[ref > self.r] = 0.
+        # test return type 'dict'
+        dist = np.zeros((self.n, self.n))
+        r = self.T1.sparse_distance_matrix(self.T2, self.r, output_type='dict')
+        for i, j in r.keys():
+            dist[i, j] = r[(i, j)]
+        assert_array_almost_equal(ref, dist, decimal=14)
+        # test return type 'ndarray'
+        dist = np.zeros((self.n, self.n))
+        r = self.T1.sparse_distance_matrix(self.T2, self.r,
+            output_type='ndarray')
+        for k in range(r.shape[0]):
+            i = r['i'][k]
+            j = r['j'][k]
+            v = r['v'][k]
+            dist[i, j] = v
+        assert_array_almost_equal(ref, dist, decimal=14)
+        # test return type 'dok_matrix'
+        r = self.T1.sparse_distance_matrix(self.T2, self.r,
+            output_type='dok_matrix')
+        assert_array_almost_equal(ref, r.toarray(), decimal=14)
+        # test return type 'coo_matrix'
+        r = self.T1.sparse_distance_matrix(self.T2, self.r,
+            output_type='coo_matrix')
+        assert_array_almost_equal(ref, r.toarray(), decimal=14)
+
+
+@KDTreeTest
+class _Test_sparse_distance_matrix(sparse_distance_matrix_consistency):
+    def setup_method(self):
+        n = 50
+        m = 4
+        np.random.seed(1234)
+        data1 = np.random.randn(n, m)
+        data2 = np.random.randn(n, m)
+        self.T1 = self.kdtree_type(data1, leafsize=2)
+        self.T2 = self.kdtree_type(data2, leafsize=2)
+        self.r = 0.5
+        self.p = 2
+        self.data1 = data1
+        self.data2 = data2
+        self.n = n
+        self.m = m
+
+
+def test_distance_matrix():
+    m = 10
+    n = 11
+    k = 4
+    np.random.seed(1234)
+    xs = np.random.randn(m, k)
+    ys = np.random.randn(n, k)
+    ds = distance_matrix(xs, ys)
+    assert_equal(ds.shape, (m, n))
+    for i in range(m):
+        for j in range(n):
+            assert_almost_equal(minkowski_distance(xs[i], ys[j]), ds[i, j])
+
+
+def test_distance_matrix_looping():
+    m = 10
+    n = 11
+    k = 4
+    np.random.seed(1234)
+    xs = np.random.randn(m, k)
+    ys = np.random.randn(n, k)
+    ds = distance_matrix(xs, ys)
+    dsl = distance_matrix(xs, ys, threshold=1)
+    assert_equal(ds, dsl)
+
+
+def check_onetree_query(T, d):
+    r = T.query_ball_tree(T, d)
+    s = set()
+    for i, l in enumerate(r):
+        for j in l:
+            if i < j:
+                s.add((i, j))
+
+    assert_(s == T.query_pairs(d))
+
+def test_onetree_query(kdtree_type):
+    np.random.seed(0)
+    n = 50
+    k = 4
+    points = np.random.randn(n, k)
+    T = kdtree_type(points)
+    check_onetree_query(T, 0.1)
+
+    points = np.random.randn(3*n, k)
+    points[:n] *= 0.001
+    points[n:2*n] += 2
+    T = kdtree_type(points)
+    check_onetree_query(T, 0.1)
+    check_onetree_query(T, 0.001)
+    check_onetree_query(T, 0.00001)
+    check_onetree_query(T, 1e-6)
+
+
+def test_query_pairs_single_node(kdtree_type):
+    tree = kdtree_type([[0, 1]])
+    assert_equal(tree.query_pairs(0.5), set())
+
+
+def test_kdtree_query_pairs(kdtree_type):
+    np.random.seed(0)
+    n = 50
+    k = 2
+    r = 0.1
+    r2 = r**2
+    points = np.random.randn(n, k)
+    T = kdtree_type(points)
+    # brute force reference
+    brute = set()
+    for i in range(n):
+        for j in range(i+1, n):
+            v = points[i, :] - points[j, :]
+            if np.dot(v, v) <= r2:
+                brute.add((i, j))
+    l0 = sorted(brute)
+    # test default return type
+    s = T.query_pairs(r)
+    l1 = sorted(s)
+    assert_array_equal(l0, l1)
+    # test return type 'set'
+    s = T.query_pairs(r, output_type='set')
+    l1 = sorted(s)
+    assert_array_equal(l0, l1)
+    # test return type 'ndarray'
+    s = set()
+    arr = T.query_pairs(r, output_type='ndarray')
+    for i in range(arr.shape[0]):
+        s.add((int(arr[i, 0]), int(arr[i, 1])))
+    l2 = sorted(s)
+    assert_array_equal(l0, l2)
+
+
+def test_query_pairs_eps(kdtree_type):
+    spacing = np.sqrt(2)
+    # irrational spacing to have potential rounding errors
+    x_range = np.linspace(0, 3 * spacing, 4)
+    y_range = np.linspace(0, 3 * spacing, 4)
+    xy_array = [(xi, yi) for xi in x_range for yi in y_range]
+    tree = kdtree_type(xy_array)
+    pairs_eps = tree.query_pairs(r=spacing, eps=.1)
+    # result: 24 with eps, 16 without due to rounding
+    pairs = tree.query_pairs(r=spacing * 1.01)
+    # result: 24
+    assert_equal(pairs, pairs_eps)
+
+
+def test_ball_point_ints(kdtree_type):
+    # Regression test for #1373.
+    x, y = np.mgrid[0:4, 0:4]
+    points = list(zip(x.ravel(), y.ravel()))
+    tree = kdtree_type(points)
+    assert_equal(sorted([4, 8, 9, 12]),
+                 sorted(tree.query_ball_point((2, 0), 1)))
+    points = np.asarray(points, dtype=float)
+    tree = kdtree_type(points)
+    assert_equal(sorted([4, 8, 9, 12]),
+                 sorted(tree.query_ball_point((2, 0), 1)))
+
+
+def test_kdtree_comparisons():
+    # Regression test: node comparisons were done wrong in 0.12 w/Py3.
+    nodes = [KDTree.node() for _ in range(3)]
+    assert_equal(sorted(nodes), sorted(nodes[::-1]))
+
+
+def test_kdtree_build_modes(kdtree_type):
+    # check if different build modes for KDTree give similar query results
+    np.random.seed(0)
+    n = 5000
+    k = 4
+    points = np.random.randn(n, k)
+    T1 = kdtree_type(points).query(points, k=5)[-1]
+    T2 = kdtree_type(points, compact_nodes=False).query(points, k=5)[-1]
+    T3 = kdtree_type(points, balanced_tree=False).query(points, k=5)[-1]
+    T4 = kdtree_type(points, compact_nodes=False,
+                     balanced_tree=False).query(points, k=5)[-1]
+    assert_array_equal(T1, T2)
+    assert_array_equal(T1, T3)
+    assert_array_equal(T1, T4)
+
+def test_kdtree_pickle(kdtree_type):
+    # test if it is possible to pickle a KDTree
+    import pickle
+    np.random.seed(0)
+    n = 50
+    k = 4
+    points = np.random.randn(n, k)
+    T1 = kdtree_type(points)
+    tmp = pickle.dumps(T1)
+    T2 = pickle.loads(tmp)
+    T1 = T1.query(points, k=5)[-1]
+    T2 = T2.query(points, k=5)[-1]
+    assert_array_equal(T1, T2)
+
+def test_kdtree_pickle_boxsize(kdtree_type):
+    # test if it is possible to pickle a periodic KDTree
+    import pickle
+    np.random.seed(0)
+    n = 50
+    k = 4
+    points = np.random.uniform(size=(n, k))
+    T1 = kdtree_type(points, boxsize=1.0)
+    tmp = pickle.dumps(T1)
+    T2 = pickle.loads(tmp)
+    T1 = T1.query(points, k=5)[-1]
+    T2 = T2.query(points, k=5)[-1]
+    assert_array_equal(T1, T2)
+
+def test_kdtree_copy_data(kdtree_type):
+    # check if copy_data=True makes the kd-tree
+    # impervious to data corruption by modification of
+    # the data arrray
+    np.random.seed(0)
+    n = 5000
+    k = 4
+    points = np.random.randn(n, k)
+    T = kdtree_type(points, copy_data=True)
+    q = points.copy()
+    T1 = T.query(q, k=5)[-1]
+    points[...] = np.random.randn(n, k)
+    T2 = T.query(q, k=5)[-1]
+    assert_array_equal(T1, T2)
+
+def test_ckdtree_parallel(kdtree_type, monkeypatch):
+    # check if parallel=True also generates correct query results
+    np.random.seed(0)
+    n = 5000
+    k = 4
+    points = np.random.randn(n, k)
+    T = kdtree_type(points)
+    T1 = T.query(points, k=5, workers=64)[-1]
+    T2 = T.query(points, k=5, workers=-1)[-1]
+    T3 = T.query(points, k=5)[-1]
+    assert_array_equal(T1, T2)
+    assert_array_equal(T1, T3)
+
+    monkeypatch.setattr(os, 'cpu_count', lambda: None)
+    with pytest.raises(NotImplementedError, match="Cannot determine the"):
+        T.query(points, 1, workers=-1)
+
+
+def test_ckdtree_view():
+    # Check that the nodes can be correctly viewed from Python.
+    # This test also sanity checks each node in the cKDTree, and
+    # thus verifies the internal structure of the kd-tree.
+    np.random.seed(0)
+    n = 100
+    k = 4
+    points = np.random.randn(n, k)
+    kdtree = cKDTree(points)
+
+    # walk the whole kd-tree and sanity check each node
+    def recurse_tree(n):
+        assert_(isinstance(n, cKDTreeNode))
+        if n.split_dim == -1:
+            assert_(n.lesser is None)
+            assert_(n.greater is None)
+            assert_(n.indices.shape[0] <= kdtree.leafsize)
+        else:
+            recurse_tree(n.lesser)
+            recurse_tree(n.greater)
+            x = n.lesser.data_points[:, n.split_dim]
+            y = n.greater.data_points[:, n.split_dim]
+            assert_(x.max() < y.min())
+
+    recurse_tree(kdtree.tree)
+    # check that indices are correctly retrieved
+    n = kdtree.tree
+    assert_array_equal(np.sort(n.indices), range(100))
+    # check that data_points are correctly retrieved
+    assert_array_equal(kdtree.data[n.indices, :], n.data_points)
+
+# KDTree is specialized to type double points, so no need to make
+# a unit test corresponding to test_ball_point_ints()
+
+def test_kdtree_list_k(kdtree_type):
+    # check kdtree periodic boundary
+    n = 200
+    m = 2
+    klist = [1, 2, 3]
+    kint = 3
+
+    np.random.seed(1234)
+    data = np.random.uniform(size=(n, m))
+    kdtree = kdtree_type(data, leafsize=1)
+
+    # check agreement between arange(1, k+1) and k
+    dd, ii = kdtree.query(data, klist)
+    dd1, ii1 = kdtree.query(data, kint)
+    assert_equal(dd, dd1)
+    assert_equal(ii, ii1)
+
+    # now check skipping one element
+    klist = np.array([1, 3])
+    kint = 3
+    dd, ii = kdtree.query(data, kint)
+    dd1, ii1 = kdtree.query(data, klist)
+    assert_equal(dd1, dd[..., klist - 1])
+    assert_equal(ii1, ii[..., klist - 1])
+
+    # check k == 1 special case
+    # and k == [1] non-special case
+    dd, ii = kdtree.query(data, 1)
+    dd1, ii1 = kdtree.query(data, [1])
+    assert_equal(len(dd.shape), 1)
+    assert_equal(len(dd1.shape), 2)
+    assert_equal(dd, np.ravel(dd1))
+    assert_equal(ii, np.ravel(ii1))
+
+@pytest.mark.fail_slow(10)
+def test_kdtree_box(kdtree_type):
+    # check ckdtree periodic boundary
+    n = 2000
+    m = 3
+    k = 3
+    np.random.seed(1234)
+    data = np.random.uniform(size=(n, m))
+    kdtree = kdtree_type(data, leafsize=1, boxsize=1.0)
+
+    # use the standard python KDTree for the simulated periodic box
+    kdtree2 = kdtree_type(data, leafsize=1)
+
+    for p in [1, 2, 3.0, np.inf]:
+        dd, ii = kdtree.query(data, k, p=p)
+
+        dd1, ii1 = kdtree.query(data + 1.0, k, p=p)
+        assert_almost_equal(dd, dd1)
+        assert_equal(ii, ii1)
+
+        dd1, ii1 = kdtree.query(data - 1.0, k, p=p)
+        assert_almost_equal(dd, dd1)
+        assert_equal(ii, ii1)
+
+        dd2, ii2 = simulate_periodic_box(kdtree2, data, k, boxsize=1.0, p=p)
+        assert_almost_equal(dd, dd2)
+        assert_equal(ii, ii2)
+
+def test_kdtree_box_0boxsize(kdtree_type):
+    # check ckdtree periodic boundary that mimics non-periodic
+    n = 2000
+    m = 2
+    k = 3
+    np.random.seed(1234)
+    data = np.random.uniform(size=(n, m))
+    kdtree = kdtree_type(data, leafsize=1, boxsize=0.0)
+
+    # use the standard python KDTree for the simulated periodic box
+    kdtree2 = kdtree_type(data, leafsize=1)
+
+    for p in [1, 2, np.inf]:
+        dd, ii = kdtree.query(data, k, p=p)
+
+        dd1, ii1 = kdtree2.query(data, k, p=p)
+        assert_almost_equal(dd, dd1)
+        assert_equal(ii, ii1)
+
+def test_kdtree_box_upper_bounds(kdtree_type):
+    data = np.linspace(0, 2, 10).reshape(-1, 2)
+    data[:, 1] += 10
+    with pytest.raises(ValueError):
+        kdtree_type(data, leafsize=1, boxsize=1.0)
+    with pytest.raises(ValueError):
+        kdtree_type(data, leafsize=1, boxsize=(0.0, 2.0))
+    # skip a dimension.
+    kdtree_type(data, leafsize=1, boxsize=(2.0, 0.0))
+
+def test_kdtree_box_lower_bounds(kdtree_type):
+    data = np.linspace(-1, 1, 10)
+    assert_raises(ValueError, kdtree_type, data, leafsize=1, boxsize=1.0)
+
+def simulate_periodic_box(kdtree, data, k, boxsize, p):
+    dd = []
+    ii = []
+    x = np.arange(3 ** data.shape[1])
+    nn = np.array(np.unravel_index(x, [3] * data.shape[1])).T
+    nn = nn - 1.0
+    for n in nn:
+        image = data + n * 1.0 * boxsize
+        dd2, ii2 = kdtree.query(image, k, p=p)
+        dd2 = dd2.reshape(-1, k)
+        ii2 = ii2.reshape(-1, k)
+        dd.append(dd2)
+        ii.append(ii2)
+    dd = np.concatenate(dd, axis=-1)
+    ii = np.concatenate(ii, axis=-1)
+
+    result = np.empty([len(data), len(nn) * k], dtype=[
+            ('ii', 'i8'),
+            ('dd', 'f8')])
+    result['ii'][:] = ii
+    result['dd'][:] = dd
+    result.sort(order='dd')
+    return result['dd'][:, :k], result['ii'][:, :k]
+
+
+@pytest.mark.skipif(python_implementation() == 'PyPy',
+                    reason="Fails on PyPy CI runs. See #9507")
+def test_ckdtree_memuse():
+    # unit test adaptation of gh-5630
+
+    # NOTE: this will fail when run via valgrind,
+    # because rss is no longer a reliable memory usage indicator.
+
+    try:
+        import resource
+    except ImportError:
+        # resource is not available on Windows
+        return
+    # Make some data
+    dx, dy = 0.05, 0.05
+    y, x = np.mgrid[slice(1, 5 + dy, dy),
+                    slice(1, 5 + dx, dx)]
+    z = np.sin(x)**10 + np.cos(10 + y*x) * np.cos(x)
+    z_copy = np.empty_like(z)
+    z_copy[:] = z
+    # Place FILLVAL in z_copy at random number of random locations
+    FILLVAL = 99.
+    mask = np.random.randint(0, z.size, np.random.randint(50) + 5)
+    z_copy.flat[mask] = FILLVAL
+    igood = np.vstack(np.nonzero(x != FILLVAL)).T
+    ibad = np.vstack(np.nonzero(x == FILLVAL)).T
+    mem_use = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
+    # burn-in
+    for i in range(10):
+        tree = cKDTree(igood)
+    # count memleaks while constructing and querying cKDTree
+    num_leaks = 0
+    for i in range(100):
+        mem_use = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
+        tree = cKDTree(igood)
+        dist, iquery = tree.query(ibad, k=4, p=2)
+        new_mem_use = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
+        if new_mem_use > mem_use:
+            num_leaks += 1
+    # ideally zero leaks, but errors might accidentally happen
+    # outside cKDTree
+    assert_(num_leaks < 10)
+
+def test_kdtree_weights(kdtree_type):
+
+    data = np.linspace(0, 1, 4).reshape(-1, 1)
+    tree1 = kdtree_type(data, leafsize=1)
+    weights = np.ones(len(data), dtype='f4')
+
+    nw = tree1._build_weights(weights)
+    assert_array_equal(nw, [4, 2, 1, 1, 2, 1, 1])
+
+    assert_raises(ValueError, tree1._build_weights, weights[:-1])
+
+    for i in range(10):
+        # since weights are uniform, these shall agree:
+        c1 = tree1.count_neighbors(tree1, np.linspace(0, 10, i))
+        c2 = tree1.count_neighbors(tree1, np.linspace(0, 10, i),
+                weights=(weights, weights))
+        c3 = tree1.count_neighbors(tree1, np.linspace(0, 10, i),
+                weights=(weights, None))
+        c4 = tree1.count_neighbors(tree1, np.linspace(0, 10, i),
+                weights=(None, weights))
+        tree1.count_neighbors(tree1, np.linspace(0, 10, i),
+                weights=weights)
+
+        assert_array_equal(c1, c2)
+        assert_array_equal(c1, c3)
+        assert_array_equal(c1, c4)
+
+    for i in range(len(data)):
+        # this tests removal of one data point by setting weight to 0
+        w1 = weights.copy()
+        w1[i] = 0
+        data2 = data[w1 != 0]
+        tree2 = kdtree_type(data2)
+
+        c1 = tree1.count_neighbors(tree1, np.linspace(0, 10, 100),
+                weights=(w1, w1))
+        # "c2 is correct"
+        c2 = tree2.count_neighbors(tree2, np.linspace(0, 10, 100))
+
+        assert_array_equal(c1, c2)
+
+        #this asserts for two different trees, singular weights
+        # crashes
+        assert_raises(ValueError, tree1.count_neighbors,
+            tree2, np.linspace(0, 10, 100), weights=w1)
+
+@pytest.mark.fail_slow(10)
+def test_kdtree_count_neighbous_multiple_r(kdtree_type):
+    n = 2000
+    m = 2
+    np.random.seed(1234)
+    data = np.random.normal(size=(n, m))
+    kdtree = kdtree_type(data, leafsize=1)
+    r0 = [0, 0.01, 0.01, 0.02, 0.05]
+    i0 = np.arange(len(r0))
+    n0 = kdtree.count_neighbors(kdtree, r0)
+    nnc = kdtree.count_neighbors(kdtree, r0, cumulative=False)
+    assert_equal(n0, nnc.cumsum())
+
+    for i, r in zip(itertools.permutations(i0),
+                    itertools.permutations(r0)):
+        # permute n0 by i and it shall agree
+        n = kdtree.count_neighbors(kdtree, r)
+        assert_array_equal(n, n0[list(i)])
+
+def test_len0_arrays(kdtree_type):
+    # make sure len-0 arrays are handled correctly
+    # in range queries (gh-5639)
+    rng = np.random.RandomState(1234)
+    X = rng.rand(10, 2)
+    Y = rng.rand(10, 2)
+    tree = kdtree_type(X)
+    # query_ball_point (single)
+    d, i = tree.query([.5, .5], k=1)
+    z = tree.query_ball_point([.5, .5], 0.1*d)
+    assert_array_equal(z, [])
+    # query_ball_point (multiple)
+    d, i = tree.query(Y, k=1)
+    mind = d.min()
+    z = tree.query_ball_point(Y, 0.1*mind)
+    y = np.empty(shape=(10, ), dtype=object)
+    y.fill([])
+    assert_array_equal(y, z)
+    # query_ball_tree
+    other = kdtree_type(Y)
+    y = tree.query_ball_tree(other, 0.1*mind)
+    assert_array_equal(10*[[]], y)
+    # count_neighbors
+    y = tree.count_neighbors(other, 0.1*mind)
+    assert_(y == 0)
+    # sparse_distance_matrix
+    y = tree.sparse_distance_matrix(other, 0.1*mind, output_type='dok_matrix')
+    assert_array_equal(y == np.zeros((10, 10)), True)
+    y = tree.sparse_distance_matrix(other, 0.1*mind, output_type='coo_matrix')
+    assert_array_equal(y == np.zeros((10, 10)), True)
+    y = tree.sparse_distance_matrix(other, 0.1*mind, output_type='dict')
+    assert_equal(y, {})
+    y = tree.sparse_distance_matrix(other, 0.1*mind, output_type='ndarray')
+    _dtype = [('i', np.intp), ('j', np.intp), ('v', np.float64)]
+    res_dtype = np.dtype(_dtype, align=True)
+    z = np.empty(shape=(0, ), dtype=res_dtype)
+    assert_array_equal(y, z)
+    # query_pairs
+    d, i = tree.query(X, k=2)
+    mind = d[:, -1].min()
+    y = tree.query_pairs(0.1*mind, output_type='set')
+    assert_equal(y, set())
+    y = tree.query_pairs(0.1*mind, output_type='ndarray')
+    z = np.empty(shape=(0, 2), dtype=np.intp)
+    assert_array_equal(y, z)
+
+def test_kdtree_duplicated_inputs(kdtree_type):
+    # check kdtree with duplicated inputs
+    n = 1024
+    for m in range(1, 8):
+        data = np.ones((n, m))
+        data[n//2:] = 2
+
+        for balanced, compact in itertools.product((False, True), repeat=2):
+            kdtree = kdtree_type(data, balanced_tree=balanced,
+                                 compact_nodes=compact, leafsize=1)
+            assert kdtree.size == 3
+
+            tree = (kdtree.tree if kdtree_type is cKDTree else
+                    kdtree.tree._node)
+
+            assert_equal(
+                np.sort(tree.lesser.indices),
+                np.arange(0, n // 2))
+            assert_equal(
+                np.sort(tree.greater.indices),
+                np.arange(n // 2, n))
+
+
+def test_kdtree_noncumulative_nondecreasing(kdtree_type):
+    # check kdtree with duplicated inputs
+
+    # it shall not divide more than 3 nodes.
+    # root left (1), and right (2)
+    kdtree = kdtree_type([[0]], leafsize=1)
+
+    assert_raises(ValueError, kdtree.count_neighbors,
+        kdtree, [0.1, 0], cumulative=False)
+
+def test_short_knn(kdtree_type):
+
+    # The test case is based on github: #6425 by @SteveDoyle2
+
+    xyz = np.array([
+        [0., 0., 0.],
+        [1.01, 0., 0.],
+        [0., 1., 0.],
+        [0., 1.01, 0.],
+        [1., 0., 0.],
+        [1., 1., 0.]],
+    dtype='float64')
+
+    ckdt = kdtree_type(xyz)
+
+    deq, ieq = ckdt.query(xyz, k=4, distance_upper_bound=0.2)
+
+    assert_array_almost_equal(deq,
+            [[0., np.inf, np.inf, np.inf],
+            [0., 0.01, np.inf, np.inf],
+            [0., 0.01, np.inf, np.inf],
+            [0., 0.01, np.inf, np.inf],
+            [0., 0.01, np.inf, np.inf],
+            [0., np.inf, np.inf, np.inf]])
+
+def test_query_ball_point_vector_r(kdtree_type):
+
+    np.random.seed(1234)
+    data = np.random.normal(size=(100, 3))
+    query = np.random.normal(size=(100, 3))
+    tree = kdtree_type(data)
+    d = np.random.uniform(0, 0.3, size=len(query))
+
+    rvector = tree.query_ball_point(query, d)
+    rscalar = [tree.query_ball_point(qi, di) for qi, di in zip(query, d)]
+    for a, b in zip(rvector, rscalar):
+        assert_array_equal(sorted(a), sorted(b))
+
+def test_query_ball_point_length(kdtree_type):
+
+    np.random.seed(1234)
+    data = np.random.normal(size=(100, 3))
+    query = np.random.normal(size=(100, 3))
+    tree = kdtree_type(data)
+    d = 0.3
+
+    length = tree.query_ball_point(query, d, return_length=True)
+    length2 = [len(ind) for ind in tree.query_ball_point(query, d, return_length=False)]
+    length3 = [len(tree.query_ball_point(qi, d)) for qi in query]
+    length4 = [tree.query_ball_point(qi, d, return_length=True) for qi in query]
+    assert_array_equal(length, length2)
+    assert_array_equal(length, length3)
+    assert_array_equal(length, length4)
+
+def test_discontiguous(kdtree_type):
+
+    np.random.seed(1234)
+    data = np.random.normal(size=(100, 3))
+    d_contiguous = np.arange(100) * 0.04
+    d_discontiguous = np.ascontiguousarray(
+                          np.arange(100)[::-1] * 0.04)[::-1]
+    query_contiguous = np.random.normal(size=(100, 3))
+    query_discontiguous = np.ascontiguousarray(query_contiguous.T).T
+    assert query_discontiguous.strides[-1] != query_contiguous.strides[-1]
+    assert d_discontiguous.strides[-1] != d_contiguous.strides[-1]
+
+    tree = kdtree_type(data)
+
+    length1 = tree.query_ball_point(query_contiguous,
+                                    d_contiguous, return_length=True)
+    length2 = tree.query_ball_point(query_discontiguous,
+                                    d_discontiguous, return_length=True)
+
+    assert_array_equal(length1, length2)
+
+    d1, i1 = tree.query(query_contiguous, 1)
+    d2, i2 = tree.query(query_discontiguous, 1)
+
+    assert_array_equal(d1, d2)
+    assert_array_equal(i1, i2)
+
+
+@pytest.mark.parametrize("balanced_tree, compact_nodes",
+    [(True, False),
+     (True, True),
+     (False, False),
+     (False, True)])
+def test_kdtree_empty_input(kdtree_type, balanced_tree, compact_nodes):
+    # https://github.com/scipy/scipy/issues/5040
+    np.random.seed(1234)
+    empty_v3 = np.empty(shape=(0, 3))
+    query_v3 = np.ones(shape=(1, 3))
+    query_v2 = np.ones(shape=(2, 3))
+
+    tree = kdtree_type(empty_v3, balanced_tree=balanced_tree,
+                       compact_nodes=compact_nodes)
+    length = tree.query_ball_point(query_v3, 0.3, return_length=True)
+    assert length == 0
+
+    dd, ii = tree.query(query_v2, 2)
+    assert ii.shape == (2, 2)
+    assert dd.shape == (2, 2)
+    assert np.isinf(dd).all()
+
+    N = tree.count_neighbors(tree, [0, 1])
+    assert_array_equal(N, [0, 0])
+
+    M = tree.sparse_distance_matrix(tree, 0.3)
+    assert M.shape == (0, 0)
+
+@KDTreeTest
+class _Test_sorted_query_ball_point:
+    def setup_method(self):
+        np.random.seed(1234)
+        self.x = np.random.randn(100, 1)
+        self.ckdt = self.kdtree_type(self.x)
+
+    def test_return_sorted_True(self):
+        idxs_list = self.ckdt.query_ball_point(self.x, 1., return_sorted=True)
+        for idxs in idxs_list:
+            assert_array_equal(idxs, sorted(idxs))
+
+        for xi in self.x:
+            idxs = self.ckdt.query_ball_point(xi, 1., return_sorted=True)
+            assert_array_equal(idxs, sorted(idxs))
+
+    def test_return_sorted_None(self):
+        """Previous behavior was to sort the returned indices if there were
+        multiple points per query but not sort them if there was a single point
+        per query."""
+        idxs_list = self.ckdt.query_ball_point(self.x, 1.)
+        for idxs in idxs_list:
+            assert_array_equal(idxs, sorted(idxs))
+
+        idxs_list_single = [self.ckdt.query_ball_point(xi, 1.) for xi in self.x]
+        idxs_list_False = self.ckdt.query_ball_point(self.x, 1., return_sorted=False)
+        for idxs0, idxs1 in zip(idxs_list_False, idxs_list_single):
+            assert_array_equal(idxs0, idxs1)
+
+
+def test_kdtree_complex_data():
+    # Test that KDTree rejects complex input points (gh-9108)
+    points = np.random.rand(10, 2).view(complex)
+
+    with pytest.raises(TypeError, match="complex data"):
+        t = KDTree(points)
+
+    t = KDTree(points.real)
+
+    with pytest.raises(TypeError, match="complex data"):
+        t.query(points)
+
+    with pytest.raises(TypeError, match="complex data"):
+        t.query_ball_point(points, r=1)
+
+
+def test_kdtree_tree_access():
+    # Test KDTree.tree can be used to traverse the KDTree
+    np.random.seed(1234)
+    points = np.random.rand(100, 4)
+    t = KDTree(points)
+    root = t.tree
+
+    assert isinstance(root, KDTree.innernode)
+    assert root.children == points.shape[0]
+
+    # Visit the tree and assert some basic properties for each node
+    nodes = [root]
+    while nodes:
+        n = nodes.pop(-1)
+
+        if isinstance(n, KDTree.leafnode):
+            assert isinstance(n.children, int)
+            assert n.children == len(n.idx)
+            assert_array_equal(points[n.idx], n._node.data_points)
+        else:
+            assert isinstance(n, KDTree.innernode)
+            assert isinstance(n.split_dim, int)
+            assert 0 <= n.split_dim < t.m
+            assert isinstance(n.split, float)
+            assert isinstance(n.children, int)
+            assert n.children == n.less.children + n.greater.children
+            nodes.append(n.greater)
+            nodes.append(n.less)
+
+
+def test_kdtree_attributes():
+    # Test KDTree's attributes are available
+    np.random.seed(1234)
+    points = np.random.rand(100, 4)
+    t = KDTree(points)
+
+    assert isinstance(t.m, int)
+    assert t.n == points.shape[0]
+
+    assert isinstance(t.n, int)
+    assert t.m == points.shape[1]
+
+    assert isinstance(t.leafsize, int)
+    assert t.leafsize == 10
+
+    assert_array_equal(t.maxes, np.amax(points, axis=0))
+    assert_array_equal(t.mins, np.amin(points, axis=0))
+    assert t.data is points
+
+
+@pytest.mark.parametrize("kdtree_class", [KDTree, cKDTree])
+def test_kdtree_count_neighbors_weighted(kdtree_class):
+    rng = np.random.RandomState(1234)
+    r = np.arange(0.05, 1, 0.05)
+
+    A = rng.random(21).reshape((7,3))
+    B = rng.random(45).reshape((15,3))
+
+    wA = rng.random(7)
+    wB = rng.random(15)
+
+    kdA = kdtree_class(A)
+    kdB = kdtree_class(B)
+
+    nAB = kdA.count_neighbors(kdB, r, cumulative=False, weights=(wA,wB))
+
+    # Compare against brute-force
+    weights = wA[None, :] * wB[:, None]
+    dist = np.linalg.norm(A[None, :, :] - B[:, None, :], axis=-1)
+    expect = [np.sum(weights[(prev_radius < dist) & (dist <= radius)])
+              for prev_radius, radius in zip(itertools.chain([0], r[:-1]), r)]
+    assert_allclose(nAB, expect)
+
+
+def test_kdtree_nan():
+    vals = [1, 5, -10, 7, -4, -16, -6, 6, 3, -11]
+    n = len(vals)
+    data = np.concatenate([vals, np.full(n, np.nan)])[:, None]
+    with pytest.raises(ValueError, match="must be finite"):
+        KDTree(data)
+
+
+def test_nonfinite_inputs_gh_18223():
+    rng = np.random.default_rng(12345)
+    coords = rng.uniform(size=(100, 3), low=0.0, high=0.1)
+    t = KDTree(coords, balanced_tree=False, compact_nodes=False)
+    bad_coord = [np.nan for _ in range(3)]
+
+    with pytest.raises(ValueError, match="must be finite"):
+        t.query(bad_coord)
+    with pytest.raises(ValueError, match="must be finite"):
+        t.query_ball_point(bad_coord, 1)
+
+    coords[0, :] = np.nan
+    with pytest.raises(ValueError, match="must be finite"):
+        KDTree(coords, balanced_tree=True, compact_nodes=False)
+    with pytest.raises(ValueError, match="must be finite"):
+        KDTree(coords, balanced_tree=False, compact_nodes=True)
+    with pytest.raises(ValueError, match="must be finite"):
+        KDTree(coords, balanced_tree=True, compact_nodes=True)
+    with pytest.raises(ValueError, match="must be finite"):
+        KDTree(coords, balanced_tree=False, compact_nodes=False)
+
+
+@pytest.mark.parametrize("incantation", [cKDTree, KDTree])
+def test_gh_18800(incantation):
+    # our prohibition on non-finite values
+    # in kd-tree workflows means we need
+    # coercion to NumPy arrays enforced
+
+    class ArrLike(np.ndarray):
+        def __new__(cls, input_array):
+            obj = np.asarray(input_array).view(cls)
+            # we override all() to mimic the problem
+            # pandas DataFrames encountered in gh-18800
+            obj.all = None
+            return obj
+
+        def __array_finalize__(self, obj):
+            if obj is None:
+                return
+            self.all = getattr(obj, 'all', None)
+
+    points = [
+        [66.22, 32.54],
+        [22.52, 22.39],
+        [31.01, 81.21],
+        ]
+    arr = np.array(points)
+    arr_like = ArrLike(arr)
+    tree = incantation(points, 10)
+    tree.query(arr_like, 1)
+    tree.query_ball_point(arr_like, 200)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_qhull.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_qhull.py
new file mode 100644
index 0000000000000000000000000000000000000000..adb7fcc2bdbaa2cffbe692737da0f868a86e2ad5
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_qhull.py
@@ -0,0 +1,1308 @@
+import os
+import copy
+
+import numpy as np
+from numpy.testing import (assert_equal, assert_almost_equal,
+                           assert_, assert_allclose, assert_array_equal)
+import pytest
+from pytest import raises as assert_raises
+
+import scipy.spatial._qhull as qhull
+from scipy.spatial import cKDTree as KDTree  # type: ignore[attr-defined]
+from scipy.spatial import Voronoi
+
+import itertools
+
+def sorted_tuple(x):
+    return tuple(sorted(x))
+
+
+def assert_unordered_tuple_list_equal(a, b, tpl=tuple):
+    if isinstance(a, np.ndarray):
+        a = a.tolist()
+    if isinstance(b, np.ndarray):
+        b = b.tolist()
+    a = list(map(tpl, a))
+    a.sort()
+    b = list(map(tpl, b))
+    b.sort()
+    assert_equal(a, b)
+
+
+np.random.seed(1234)
+
+points = [(0,0), (0,1), (1,0), (1,1), (0.5, 0.5), (0.5, 1.5)]
+
+pathological_data_1 = np.array([
+    [-3.14,-3.14], [-3.14,-2.36], [-3.14,-1.57], [-3.14,-0.79],
+    [-3.14,0.0], [-3.14,0.79], [-3.14,1.57], [-3.14,2.36],
+    [-3.14,3.14], [-2.36,-3.14], [-2.36,-2.36], [-2.36,-1.57],
+    [-2.36,-0.79], [-2.36,0.0], [-2.36,0.79], [-2.36,1.57],
+    [-2.36,2.36], [-2.36,3.14], [-1.57,-0.79], [-1.57,0.79],
+    [-1.57,-1.57], [-1.57,0.0], [-1.57,1.57], [-1.57,-3.14],
+    [-1.57,-2.36], [-1.57,2.36], [-1.57,3.14], [-0.79,-1.57],
+    [-0.79,1.57], [-0.79,-3.14], [-0.79,-2.36], [-0.79,-0.79],
+    [-0.79,0.0], [-0.79,0.79], [-0.79,2.36], [-0.79,3.14],
+    [0.0,-3.14], [0.0,-2.36], [0.0,-1.57], [0.0,-0.79], [0.0,0.0],
+    [0.0,0.79], [0.0,1.57], [0.0,2.36], [0.0,3.14], [0.79,-3.14],
+    [0.79,-2.36], [0.79,-0.79], [0.79,0.0], [0.79,0.79],
+    [0.79,2.36], [0.79,3.14], [0.79,-1.57], [0.79,1.57],
+    [1.57,-3.14], [1.57,-2.36], [1.57,2.36], [1.57,3.14],
+    [1.57,-1.57], [1.57,0.0], [1.57,1.57], [1.57,-0.79],
+    [1.57,0.79], [2.36,-3.14], [2.36,-2.36], [2.36,-1.57],
+    [2.36,-0.79], [2.36,0.0], [2.36,0.79], [2.36,1.57],
+    [2.36,2.36], [2.36,3.14], [3.14,-3.14], [3.14,-2.36],
+    [3.14,-1.57], [3.14,-0.79], [3.14,0.0], [3.14,0.79],
+    [3.14,1.57], [3.14,2.36], [3.14,3.14],
+])
+
+pathological_data_2 = np.array([
+    [-1, -1], [-1, 0], [-1, 1],
+    [0, -1], [0, 0], [0, 1],
+    [1, -1 - np.finfo(np.float64).eps], [1, 0], [1, 1],
+])
+
+bug_2850_chunks = [np.random.rand(10, 2),
+                   np.array([[0,0], [0,1], [1,0], [1,1]])  # add corners
+                   ]
+
+# same with some additional chunks
+bug_2850_chunks_2 = (bug_2850_chunks +
+                     [np.random.rand(10, 2),
+                      0.25 + np.array([[0,0], [0,1], [1,0], [1,1]])])
+
+DATASETS = {
+    'some-points': np.asarray(points),
+    'random-2d': np.random.rand(30, 2),
+    'random-3d': np.random.rand(30, 3),
+    'random-4d': np.random.rand(30, 4),
+    'random-5d': np.random.rand(30, 5),
+    'random-6d': np.random.rand(10, 6),
+    'random-7d': np.random.rand(10, 7),
+    'random-8d': np.random.rand(10, 8),
+    'pathological-1': pathological_data_1,
+    'pathological-2': pathological_data_2
+}
+
+INCREMENTAL_DATASETS = {
+    'bug-2850': (bug_2850_chunks, None),
+    'bug-2850-2': (bug_2850_chunks_2, None),
+}
+
+
+def _add_inc_data(name, chunksize):
+    """
+    Generate incremental datasets from basic data sets
+    """
+    points = DATASETS[name]
+    ndim = points.shape[1]
+
+    opts = None
+    nmin = ndim + 2
+
+    if name == 'some-points':
+        # since Qz is not allowed, use QJ
+        opts = 'QJ Pp'
+    elif name == 'pathological-1':
+        # include enough points so that we get different x-coordinates
+        nmin = 12
+
+    chunks = [points[:nmin]]
+    for j in range(nmin, len(points), chunksize):
+        chunks.append(points[j:j+chunksize])
+
+    new_name = "%s-chunk-%d" % (name, chunksize)
+    assert new_name not in INCREMENTAL_DATASETS
+    INCREMENTAL_DATASETS[new_name] = (chunks, opts)
+
+
+for name in DATASETS:
+    for chunksize in 1, 4, 16:
+        _add_inc_data(name, chunksize)
+
+
+class Test_Qhull:
+    def test_swapping(self):
+        # Check that Qhull state swapping works
+
+        x = qhull._Qhull(b'v',
+                         np.array([[0,0],[0,1],[1,0],[1,1.],[0.5,0.5]]),
+                         b'Qz')
+        xd = copy.deepcopy(x.get_voronoi_diagram())
+
+        y = qhull._Qhull(b'v',
+                         np.array([[0,0],[0,1],[1,0],[1,2.]]),
+                         b'Qz')
+        yd = copy.deepcopy(y.get_voronoi_diagram())
+
+        xd2 = copy.deepcopy(x.get_voronoi_diagram())
+        x.close()
+        yd2 = copy.deepcopy(y.get_voronoi_diagram())
+        y.close()
+
+        assert_raises(RuntimeError, x.get_voronoi_diagram)
+        assert_raises(RuntimeError, y.get_voronoi_diagram)
+
+        assert_allclose(xd[0], xd2[0])
+        assert_unordered_tuple_list_equal(xd[1], xd2[1], tpl=sorted_tuple)
+        assert_unordered_tuple_list_equal(xd[2], xd2[2], tpl=sorted_tuple)
+        assert_unordered_tuple_list_equal(xd[3], xd2[3], tpl=sorted_tuple)
+        assert_array_equal(xd[4], xd2[4])
+
+        assert_allclose(yd[0], yd2[0])
+        assert_unordered_tuple_list_equal(yd[1], yd2[1], tpl=sorted_tuple)
+        assert_unordered_tuple_list_equal(yd[2], yd2[2], tpl=sorted_tuple)
+        assert_unordered_tuple_list_equal(yd[3], yd2[3], tpl=sorted_tuple)
+        assert_array_equal(yd[4], yd2[4])
+
+        x.close()
+        assert_raises(RuntimeError, x.get_voronoi_diagram)
+        y.close()
+        assert_raises(RuntimeError, y.get_voronoi_diagram)
+
+    def test_issue_8051(self):
+        points = np.array(
+            [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2],[2, 0], [2, 1], [2, 2]]
+        )
+        Voronoi(points)
+
+
+class TestUtilities:
+    """
+    Check that utility functions work.
+
+    """
+
+    def test_find_simplex(self):
+        # Simple check that simplex finding works
+        points = np.array([(0,0), (0,1), (1,1), (1,0)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+
+        # +---+
+        # |\ 0|
+        # | \ |
+        # |1 \|
+        # +---+
+
+        assert_equal(tri.simplices, [[1, 3, 2], [3, 1, 0]])
+
+        for p in [(0.25, 0.25, 1),
+                  (0.75, 0.75, 0),
+                  (0.3, 0.2, 1)]:
+            i = tri.find_simplex(p[:2])
+            assert_equal(i, p[2], err_msg=f'{p!r}')
+            j = qhull.tsearch(tri, p[:2])
+            assert_equal(i, j)
+
+    def test_plane_distance(self):
+        # Compare plane distance from hyperplane equations obtained from Qhull
+        # to manually computed plane equations
+        x = np.array([(0,0), (1, 1), (1, 0), (0.99189033, 0.37674127),
+                      (0.99440079, 0.45182168)], dtype=np.float64)
+        p = np.array([0.99966555, 0.15685619], dtype=np.float64)
+
+        tri = qhull.Delaunay(x)
+
+        z = tri.lift_points(x)
+        pz = tri.lift_points(p)
+
+        dist = tri.plane_distance(p)
+
+        for j, v in enumerate(tri.simplices):
+            x1 = z[v[0]]
+            x2 = z[v[1]]
+            x3 = z[v[2]]
+
+            n = np.cross(x1 - x3, x2 - x3)
+            n /= np.sqrt(np.dot(n, n))
+            n *= -np.sign(n[2])
+
+            d = np.dot(n, pz - x3)
+
+            assert_almost_equal(dist[j], d)
+
+    def test_convex_hull(self):
+        # Simple check that the convex hull seems to works
+        points = np.array([(0,0), (0,1), (1,1), (1,0)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+
+        # +---+
+        # |\ 0|
+        # | \ |
+        # |1 \|
+        # +---+
+
+        assert_equal(tri.convex_hull, [[3, 2], [1, 2], [1, 0], [3, 0]])
+
+    def test_volume_area(self):
+        #Basic check that we get back the correct volume and area for a cube
+        points = np.array([(0, 0, 0), (0, 1, 0), (1, 0, 0), (1, 1, 0),
+                           (0, 0, 1), (0, 1, 1), (1, 0, 1), (1, 1, 1)])
+        hull = qhull.ConvexHull(points)
+
+        assert_allclose(hull.volume, 1., rtol=1e-14,
+                        err_msg="Volume of cube is incorrect")
+        assert_allclose(hull.area, 6., rtol=1e-14,
+                        err_msg="Area of cube is incorrect")
+
+    def test_random_volume_area(self):
+        #Test that the results for a random 10-point convex are
+        #coherent with the output of qconvex Qt s FA
+        points = np.array([(0.362568364506, 0.472712355305, 0.347003084477),
+                           (0.733731893414, 0.634480295684, 0.950513180209),
+                           (0.511239955611, 0.876839441267, 0.418047827863),
+                           (0.0765906233393, 0.527373281342, 0.6509863541),
+                           (0.146694972056, 0.596725793348, 0.894860986685),
+                           (0.513808585741, 0.069576205858, 0.530890338876),
+                           (0.512343805118, 0.663537132612, 0.037689295973),
+                           (0.47282965018, 0.462176697655, 0.14061843691),
+                           (0.240584597123, 0.778660020591, 0.722913476339),
+                           (0.951271745935, 0.967000673944, 0.890661319684)])
+
+        hull = qhull.ConvexHull(points)
+        assert_allclose(hull.volume, 0.14562013, rtol=1e-07,
+                        err_msg="Volume of random polyhedron is incorrect")
+        assert_allclose(hull.area, 1.6670425, rtol=1e-07,
+                        err_msg="Area of random polyhedron is incorrect")
+
+    def test_incremental_volume_area_random_input(self):
+        """Test that incremental mode gives the same volume/area as
+        non-incremental mode and incremental mode with restart"""
+        nr_points = 20
+        dim = 3
+        points = np.random.random((nr_points, dim))
+        inc_hull = qhull.ConvexHull(points[:dim+1, :], incremental=True)
+        inc_restart_hull = qhull.ConvexHull(points[:dim+1, :], incremental=True)
+        for i in range(dim+1, nr_points):
+            hull = qhull.ConvexHull(points[:i+1, :])
+            inc_hull.add_points(points[i:i+1, :])
+            inc_restart_hull.add_points(points[i:i+1, :], restart=True)
+            assert_allclose(hull.volume, inc_hull.volume, rtol=1e-7)
+            assert_allclose(hull.volume, inc_restart_hull.volume, rtol=1e-7)
+            assert_allclose(hull.area, inc_hull.area, rtol=1e-7)
+            assert_allclose(hull.area, inc_restart_hull.area, rtol=1e-7)
+
+    def _check_barycentric_transforms(self, tri, err_msg="",
+                                      unit_cube=False,
+                                      unit_cube_tol=0):
+        """Check that a triangulation has reasonable barycentric transforms"""
+        vertices = tri.points[tri.simplices]
+        sc = 1/(tri.ndim + 1.0)
+        centroids = vertices.sum(axis=1) * sc
+
+        # Either: (i) the simplex has a `nan` barycentric transform,
+        # or, (ii) the centroid is in the simplex
+
+        def barycentric_transform(tr, x):
+            r = tr[:,-1,:]
+            Tinv = tr[:,:-1,:]
+            return np.einsum('ijk,ik->ij', Tinv, x - r)
+
+        eps = np.finfo(float).eps
+
+        c = barycentric_transform(tri.transform, centroids)
+        with np.errstate(invalid="ignore"):
+            ok = np.isnan(c).all(axis=1) | (abs(c - sc)/sc < 0.1).all(axis=1)
+
+        assert_(ok.all(), f"{err_msg} {np.nonzero(~ok)}")
+
+        # Invalid simplices must be (nearly) zero volume
+        q = vertices[:,:-1,:] - vertices[:,-1,None,:]
+        volume = np.array([np.linalg.det(q[k,:,:])
+                           for k in range(tri.nsimplex)])
+        ok = np.isfinite(tri.transform[:,0,0]) | (volume < np.sqrt(eps))
+        assert_(ok.all(), f"{err_msg} {np.nonzero(~ok)}")
+
+        # Also, find_simplex for the centroid should end up in some
+        # simplex for the non-degenerate cases
+        j = tri.find_simplex(centroids)
+        ok = (j != -1) | np.isnan(tri.transform[:,0,0])
+        assert_(ok.all(), f"{err_msg} {np.nonzero(~ok)}")
+
+        if unit_cube:
+            # If in unit cube, no interior point should be marked out of hull
+            at_boundary = (centroids <= unit_cube_tol).any(axis=1)
+            at_boundary |= (centroids >= 1 - unit_cube_tol).any(axis=1)
+
+            ok = (j != -1) | at_boundary
+            assert_(ok.all(), f"{err_msg} {np.nonzero(~ok)}")
+
+    @pytest.mark.fail_slow(10)
+    def test_degenerate_barycentric_transforms(self):
+        # The triangulation should not produce invalid barycentric
+        # transforms that stump the simplex finding
+        data = np.load(os.path.join(os.path.dirname(__file__), 'data',
+                                    'degenerate_pointset.npz'))
+        points = data['c']
+        data.close()
+
+        tri = qhull.Delaunay(points)
+
+        # Check that there are not too many invalid simplices
+        bad_count = np.isnan(tri.transform[:,0,0]).sum()
+        assert_(bad_count < 23, bad_count)
+
+        # Check the transforms
+        self._check_barycentric_transforms(tri)
+
+    @pytest.mark.slow
+    @pytest.mark.fail_slow(20)
+    # OK per https://github.com/scipy/scipy/pull/20487#discussion_r1572684869
+    def test_more_barycentric_transforms(self):
+        # Triangulate some "nasty" grids
+
+        eps = np.finfo(float).eps
+
+        npoints = {2: 70, 3: 11, 4: 5, 5: 3}
+
+        for ndim in range(2, 6):
+            # Generate an uniform grid in n-d unit cube
+            x = np.linspace(0, 1, npoints[ndim])
+            grid = np.c_[
+                list(map(np.ravel, np.broadcast_arrays(*np.ix_(*([x]*ndim)))))
+            ].T
+
+            err_msg = "ndim=%d" % ndim
+
+            # Check using regular grid
+            tri = qhull.Delaunay(grid)
+            self._check_barycentric_transforms(tri, err_msg=err_msg,
+                                               unit_cube=True)
+
+            # Check with eps-perturbations
+            np.random.seed(1234)
+            m = (np.random.rand(grid.shape[0]) < 0.2)
+            grid[m,:] += 2*eps*(np.random.rand(*grid[m,:].shape) - 0.5)
+
+            tri = qhull.Delaunay(grid)
+            self._check_barycentric_transforms(tri, err_msg=err_msg,
+                                               unit_cube=True,
+                                               unit_cube_tol=2*eps)
+
+            # Check with duplicated data
+            tri = qhull.Delaunay(np.r_[grid, grid])
+            self._check_barycentric_transforms(tri, err_msg=err_msg,
+                                               unit_cube=True,
+                                               unit_cube_tol=2*eps)
+
+
+class TestVertexNeighborVertices:
+    def _check(self, tri):
+        expected = [set() for j in range(tri.points.shape[0])]
+        for s in tri.simplices:
+            for a in s:
+                for b in s:
+                    if a != b:
+                        expected[a].add(b)
+
+        indptr, indices = tri.vertex_neighbor_vertices
+
+        got = [set(map(int, indices[indptr[j]:indptr[j+1]]))
+               for j in range(tri.points.shape[0])]
+
+        assert_equal(got, expected, err_msg=f"{got!r} != {expected!r}")
+
+    def test_triangle(self):
+        points = np.array([(0,0), (0,1), (1,0)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+        self._check(tri)
+
+    def test_rectangle(self):
+        points = np.array([(0,0), (0,1), (1,1), (1,0)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+        self._check(tri)
+
+    def test_complicated(self):
+        points = np.array([(0,0), (0,1), (1,1), (1,0),
+                           (0.5, 0.5), (0.9, 0.5)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+        self._check(tri)
+
+
+class TestDelaunay:
+    """
+    Check that triangulation works.
+
+    """
+    def test_masked_array_fails(self):
+        masked_array = np.ma.masked_all(1)
+        assert_raises(ValueError, qhull.Delaunay, masked_array)
+
+    def test_array_with_nans_fails(self):
+        points_with_nan = np.array([(0,0), (0,1), (1,1), (1,np.nan)], dtype=np.float64)
+        assert_raises(ValueError, qhull.Delaunay, points_with_nan)
+
+    def test_nd_simplex(self):
+        # simple smoke test: triangulate a n-dimensional simplex
+        for nd in range(2, 8):
+            points = np.zeros((nd+1, nd))
+            for j in range(nd):
+                points[j,j] = 1.0
+            points[-1,:] = 1.0
+
+            tri = qhull.Delaunay(points)
+
+            tri.simplices.sort()
+
+            assert_equal(tri.simplices, np.arange(nd+1, dtype=int)[None, :])
+            assert_equal(tri.neighbors, -1 + np.zeros((nd+1), dtype=int)[None,:])
+
+    def test_2d_square(self):
+        # simple smoke test: 2d square
+        points = np.array([(0,0), (0,1), (1,1), (1,0)], dtype=np.float64)
+        tri = qhull.Delaunay(points)
+
+        assert_equal(tri.simplices, [[1, 3, 2], [3, 1, 0]])
+        assert_equal(tri.neighbors, [[-1, -1, 1], [-1, -1, 0]])
+
+    def test_duplicate_points(self):
+        x = np.array([0, 1, 0, 1], dtype=np.float64)
+        y = np.array([0, 0, 1, 1], dtype=np.float64)
+
+        xp = np.r_[x, x]
+        yp = np.r_[y, y]
+
+        # shouldn't fail on duplicate points
+        qhull.Delaunay(np.c_[x, y])
+        qhull.Delaunay(np.c_[xp, yp])
+
+    def test_pathological(self):
+        # both should succeed
+        points = DATASETS['pathological-1']
+        tri = qhull.Delaunay(points)
+        assert_equal(tri.points[tri.simplices].max(), points.max())
+        assert_equal(tri.points[tri.simplices].min(), points.min())
+
+        points = DATASETS['pathological-2']
+        tri = qhull.Delaunay(points)
+        assert_equal(tri.points[tri.simplices].max(), points.max())
+        assert_equal(tri.points[tri.simplices].min(), points.min())
+
+    def test_joggle(self):
+        # Check that the option QJ indeed guarantees that all input points
+        # occur as vertices of the triangulation
+
+        points = np.random.rand(10, 2)
+        points = np.r_[points, points]  # duplicate input data
+
+        tri = qhull.Delaunay(points, qhull_options="QJ Qbb Pp")
+        assert_array_equal(np.unique(tri.simplices.ravel()),
+                           np.arange(len(points)))
+
+    def test_coplanar(self):
+        # Check that the coplanar point output option indeed works
+        points = np.random.rand(10, 2)
+        points = np.r_[points, points]  # duplicate input data
+
+        tri = qhull.Delaunay(points)
+
+        assert_(len(np.unique(tri.simplices.ravel())) == len(points)//2)
+        assert_(len(tri.coplanar) == len(points)//2)
+
+        assert_(len(np.unique(tri.coplanar[:,2])) == len(points)//2)
+
+        assert_(np.all(tri.vertex_to_simplex >= 0))
+
+    def test_furthest_site(self):
+        points = [(0, 0), (0, 1), (1, 0), (0.5, 0.5), (1.1, 1.1)]
+        tri = qhull.Delaunay(points, furthest_site=True)
+
+        expected = np.array([(1, 4, 0), (4, 2, 0)])  # from Qhull
+        assert_array_equal(tri.simplices, expected)
+
+    @pytest.mark.parametrize("name", sorted(INCREMENTAL_DATASETS))
+    def test_incremental(self, name):
+        # Test incremental construction of the triangulation
+
+        chunks, opts = INCREMENTAL_DATASETS[name]
+        points = np.concatenate(chunks, axis=0)
+
+        obj = qhull.Delaunay(chunks[0], incremental=True,
+                             qhull_options=opts)
+        for chunk in chunks[1:]:
+            obj.add_points(chunk)
+
+        obj2 = qhull.Delaunay(points)
+
+        obj3 = qhull.Delaunay(chunks[0], incremental=True,
+                              qhull_options=opts)
+        if len(chunks) > 1:
+            obj3.add_points(np.concatenate(chunks[1:], axis=0),
+                            restart=True)
+
+        # Check that the incremental mode agrees with upfront mode
+        if name.startswith('pathological'):
+            # XXX: These produce valid but different triangulations.
+            #      They look OK when plotted, but how to check them?
+
+            assert_array_equal(np.unique(obj.simplices.ravel()),
+                               np.arange(points.shape[0]))
+            assert_array_equal(np.unique(obj2.simplices.ravel()),
+                               np.arange(points.shape[0]))
+        else:
+            assert_unordered_tuple_list_equal(obj.simplices, obj2.simplices,
+                                              tpl=sorted_tuple)
+
+        assert_unordered_tuple_list_equal(obj2.simplices, obj3.simplices,
+                                          tpl=sorted_tuple)
+
+
+def assert_hulls_equal(points, facets_1, facets_2):
+    # Check that two convex hulls constructed from the same point set
+    # are equal
+
+    facets_1 = set(map(sorted_tuple, facets_1))
+    facets_2 = set(map(sorted_tuple, facets_2))
+
+    if facets_1 != facets_2 and points.shape[1] == 2:
+        # The direct check fails for the pathological cases
+        # --- then the convex hull from Delaunay differs (due
+        # to rounding error etc.) from the hull computed
+        # otherwise, by the question whether (tricoplanar)
+        # points that lie almost exactly on the hull are
+        # included as vertices of the hull or not.
+        #
+        # So we check the result, and accept it if the Delaunay
+        # hull line segments are a subset of the usual hull.
+
+        eps = 1000 * np.finfo(float).eps
+
+        for a, b in facets_1:
+            for ap, bp in facets_2:
+                t = points[bp] - points[ap]
+                t /= np.linalg.norm(t)       # tangent
+                n = np.array([-t[1], t[0]])  # normal
+
+                # check that the two line segments are parallel
+                # to the same line
+                c1 = np.dot(n, points[b] - points[ap])
+                c2 = np.dot(n, points[a] - points[ap])
+                if not np.allclose(np.dot(c1, n), 0):
+                    continue
+                if not np.allclose(np.dot(c2, n), 0):
+                    continue
+
+                # Check that the segment (a, b) is contained in (ap, bp)
+                c1 = np.dot(t, points[a] - points[ap])
+                c2 = np.dot(t, points[b] - points[ap])
+                c3 = np.dot(t, points[bp] - points[ap])
+                if c1 < -eps or c1 > c3 + eps:
+                    continue
+                if c2 < -eps or c2 > c3 + eps:
+                    continue
+
+                # OK:
+                break
+            else:
+                raise AssertionError("comparison fails")
+
+        # it was OK
+        return
+
+    assert_equal(facets_1, facets_2)
+
+
+class TestConvexHull:
+    def test_masked_array_fails(self):
+        masked_array = np.ma.masked_all(1)
+        assert_raises(ValueError, qhull.ConvexHull, masked_array)
+
+    def test_array_with_nans_fails(self):
+        points_with_nan = np.array([(0,0), (1,1), (2,np.nan)], dtype=np.float64)
+        assert_raises(ValueError, qhull.ConvexHull, points_with_nan)
+
+    @pytest.mark.parametrize("name", sorted(DATASETS))
+    def test_hull_consistency_tri(self, name):
+        # Check that a convex hull returned by qhull in ndim
+        # and the hull constructed from ndim delaunay agree
+        points = DATASETS[name]
+
+        tri = qhull.Delaunay(points)
+        hull = qhull.ConvexHull(points)
+
+        assert_hulls_equal(points, tri.convex_hull, hull.simplices)
+
+        # Check that the hull extremes are as expected
+        if points.shape[1] == 2:
+            assert_equal(np.unique(hull.simplices), np.sort(hull.vertices))
+        else:
+            assert_equal(np.unique(hull.simplices), hull.vertices)
+
+    @pytest.mark.parametrize("name", sorted(INCREMENTAL_DATASETS))
+    def test_incremental(self, name):
+        # Test incremental construction of the convex hull
+        chunks, _ = INCREMENTAL_DATASETS[name]
+        points = np.concatenate(chunks, axis=0)
+
+        obj = qhull.ConvexHull(chunks[0], incremental=True)
+        for chunk in chunks[1:]:
+            obj.add_points(chunk)
+
+        obj2 = qhull.ConvexHull(points)
+
+        obj3 = qhull.ConvexHull(chunks[0], incremental=True)
+        if len(chunks) > 1:
+            obj3.add_points(np.concatenate(chunks[1:], axis=0),
+                            restart=True)
+
+        # Check that the incremental mode agrees with upfront mode
+        assert_hulls_equal(points, obj.simplices, obj2.simplices)
+        assert_hulls_equal(points, obj.simplices, obj3.simplices)
+
+    def test_vertices_2d(self):
+        # The vertices should be in counterclockwise order in 2-D
+        np.random.seed(1234)
+        points = np.random.rand(30, 2)
+
+        hull = qhull.ConvexHull(points)
+        assert_equal(np.unique(hull.simplices), np.sort(hull.vertices))
+
+        # Check counterclockwiseness
+        x, y = hull.points[hull.vertices].T
+        angle = np.arctan2(y - y.mean(), x - x.mean())
+        assert_(np.all(np.diff(np.unwrap(angle)) > 0))
+
+    def test_volume_area(self):
+        # Basic check that we get back the correct volume and area for a cube
+        points = np.array([(0, 0, 0), (0, 1, 0), (1, 0, 0), (1, 1, 0),
+                           (0, 0, 1), (0, 1, 1), (1, 0, 1), (1, 1, 1)])
+        tri = qhull.ConvexHull(points)
+
+        assert_allclose(tri.volume, 1., rtol=1e-14)
+        assert_allclose(tri.area, 6., rtol=1e-14)
+
+    @pytest.mark.parametrize("incremental", [False, True])
+    def test_good2d(self, incremental):
+        # Make sure the QGn option gives the correct value of "good".
+        points = np.array([[0.2, 0.2],
+                           [0.2, 0.4],
+                           [0.4, 0.4],
+                           [0.4, 0.2],
+                           [0.3, 0.6]])
+        hull = qhull.ConvexHull(points=points,
+                                incremental=incremental,
+                                qhull_options='QG4')
+        expected = np.array([False, True, False, False], dtype=bool)
+        actual = hull.good
+        assert_equal(actual, expected)
+
+    @pytest.mark.parametrize("visibility", [
+                              "QG4",  # visible=True
+                              "QG-4",  # visible=False
+                              ])
+    @pytest.mark.parametrize("new_gen, expected", [
+        # add generator that places QG4 inside hull
+        # so all facets are invisible
+        (np.array([[0.3, 0.7]]),
+         np.array([False, False, False, False, False], dtype=bool)),
+        # adding a generator on the opposite side of the square
+        # should preserve the single visible facet & add one invisible
+        # facet
+        (np.array([[0.3, -0.7]]),
+         np.array([False, True, False, False, False], dtype=bool)),
+        # split the visible facet on top of the square into two
+        # visible facets, with visibility at the end of the array
+        # because add_points concatenates
+        (np.array([[0.3, 0.41]]),
+         np.array([False, False, False, True, True], dtype=bool)),
+        # with our current Qhull options, coplanarity will not count
+        # for visibility; this case shifts one visible & one invisible
+        # facet & adds a coplanar facet
+        # simplex at index position 2 is the shifted visible facet
+        # the final simplex is the coplanar facet
+        (np.array([[0.5, 0.6], [0.6, 0.6]]),
+         np.array([False, False, True, False, False], dtype=bool)),
+        # place the new generator such that it envelops the query
+        # point within the convex hull, but only just barely within
+        # the double precision limit
+        # NOTE: testing exact degeneracy is less predictable than this
+        # scenario, perhaps because of the default Qt option we have
+        # enabled for Qhull to handle precision matters
+        (np.array([[0.3, 0.6 + 1e-16]]),
+         np.array([False, False, False, False, False], dtype=bool)),
+        ])
+    def test_good2d_incremental_changes(self, new_gen, expected,
+                                        visibility):
+        # use the usual square convex hull
+        # generators from test_good2d
+        points = np.array([[0.2, 0.2],
+                           [0.2, 0.4],
+                           [0.4, 0.4],
+                           [0.4, 0.2],
+                           [0.3, 0.6]])
+        hull = qhull.ConvexHull(points=points,
+                                incremental=True,
+                                qhull_options=visibility)
+        hull.add_points(new_gen)
+        actual = hull.good
+        if '-' in visibility:
+            expected = np.invert(expected)
+        assert_equal(actual, expected)
+
+    @pytest.mark.parametrize("incremental", [False, True])
+    def test_good2d_no_option(self, incremental):
+        # handle case where good attribute doesn't exist
+        # because Qgn or Qg-n wasn't specified
+        points = np.array([[0.2, 0.2],
+                           [0.2, 0.4],
+                           [0.4, 0.4],
+                           [0.4, 0.2],
+                           [0.3, 0.6]])
+        hull = qhull.ConvexHull(points=points,
+                                incremental=incremental)
+        actual = hull.good
+        assert actual is None
+        # preserve None after incremental addition
+        if incremental:
+            hull.add_points(np.zeros((1, 2)))
+            actual = hull.good
+            assert actual is None
+
+    @pytest.mark.parametrize("incremental", [False, True])
+    def test_good2d_inside(self, incremental):
+        # Make sure the QGn option gives the correct value of "good".
+        # When point n is inside the convex hull of the rest, good is
+        # all False.
+        points = np.array([[0.2, 0.2],
+                           [0.2, 0.4],
+                           [0.4, 0.4],
+                           [0.4, 0.2],
+                           [0.3, 0.3]])
+        hull = qhull.ConvexHull(points=points,
+                                incremental=incremental,
+                                qhull_options='QG4')
+        expected = np.array([False, False, False, False], dtype=bool)
+        actual = hull.good
+        assert_equal(actual, expected)
+
+    @pytest.mark.parametrize("incremental", [False, True])
+    def test_good3d(self, incremental):
+        # Make sure the QGn option gives the correct value of "good"
+        # for a 3d figure
+        points = np.array([[0.0, 0.0, 0.0],
+                           [0.90029516, -0.39187448, 0.18948093],
+                           [0.48676420, -0.72627633, 0.48536925],
+                           [0.57651530, -0.81179274, -0.09285832],
+                           [0.67846893, -0.71119562, 0.18406710]])
+        hull = qhull.ConvexHull(points=points,
+                                incremental=incremental,
+                                qhull_options='QG0')
+        expected = np.array([True, False, False, False], dtype=bool)
+        assert_equal(hull.good, expected)
+
+class TestVoronoi:
+
+    @pytest.mark.parametrize("qhull_opts, extra_pts", [
+        # option Qz (default for SciPy) will add
+        # an extra point at infinity
+        ("Qbb Qc Qz", 1),
+        ("Qbb Qc", 0),
+    ])
+    @pytest.mark.parametrize("n_pts", [50, 100])
+    @pytest.mark.parametrize("ndim", [2, 3])
+    def test_point_region_structure(self,
+                                    qhull_opts,
+                                    n_pts,
+                                    extra_pts,
+                                    ndim):
+        # see gh-16773
+        rng = np.random.default_rng(7790)
+        points = rng.random((n_pts, ndim))
+        vor = Voronoi(points, qhull_options=qhull_opts)
+        pt_region = vor.point_region
+        assert pt_region.max() == n_pts - 1 + extra_pts
+        assert pt_region.size == len(vor.regions) - extra_pts
+        assert len(vor.regions) == n_pts + extra_pts
+        assert vor.points.shape[0] == n_pts
+        # if there is an empty sublist in the Voronoi
+        # regions data structure, it should never be
+        # indexed because it corresponds to an internally
+        # added point at infinity and is not a member of the
+        # generators (input points)
+        if extra_pts:
+            sublens = [len(x) for x in vor.regions]
+            # only one point at infinity (empty region)
+            # is allowed
+            assert sublens.count(0) == 1
+            assert sublens.index(0) not in pt_region
+
+    def test_masked_array_fails(self):
+        masked_array = np.ma.masked_all(1)
+        assert_raises(ValueError, qhull.Voronoi, masked_array)
+
+    def test_simple(self):
+        # Simple case with known Voronoi diagram
+        points = [(0, 0), (0, 1), (0, 2),
+                  (1, 0), (1, 1), (1, 2),
+                  (2, 0), (2, 1), (2, 2)]
+
+        # qhull v o Fv Qbb Qc Qz < dat
+        output = """
+        2
+        5 10 1
+        -10.101 -10.101
+           0.5    0.5
+           0.5    1.5
+           1.5    0.5
+           1.5    1.5
+        2 0 1
+        3 2 0 1
+        2 0 2
+        3 3 0 1
+        4 1 2 4 3
+        3 4 0 2
+        2 0 3
+        3 4 0 3
+        2 0 4
+        0
+        12
+        4 0 3 0 1
+        4 0 1 0 1
+        4 1 4 1 2
+        4 1 2 0 2
+        4 2 5 0 2
+        4 3 4 1 3
+        4 3 6 0 3
+        4 4 5 2 4
+        4 4 7 3 4
+        4 5 8 0 4
+        4 6 7 0 3
+        4 7 8 0 4
+        """
+        self._compare_qvoronoi(points, output)
+
+    def _compare_qvoronoi(self, points, output, **kw):
+        """Compare to output from 'qvoronoi o Fv < data' to Voronoi()"""
+
+        # Parse output
+        output = [list(map(float, x.split())) for x in output.strip().splitlines()]
+        nvertex = int(output[1][0])
+        vertices = list(map(tuple, output[3:2+nvertex]))  # exclude inf
+        nregion = int(output[1][1])
+        regions = [[int(y)-1 for y in x[1:]]
+                   for x in output[2+nvertex:2+nvertex+nregion]]
+        ridge_points = [[int(y) for y in x[1:3]]
+                        for x in output[3+nvertex+nregion:]]
+        ridge_vertices = [[int(y)-1 for y in x[3:]]
+                          for x in output[3+nvertex+nregion:]]
+
+        # Compare results
+        vor = qhull.Voronoi(points, **kw)
+
+        def sorttuple(x):
+            return tuple(sorted(x))
+
+        assert_allclose(vor.vertices, vertices)
+        assert_equal(set(map(tuple, vor.regions)),
+                     set(map(tuple, regions)))
+
+        p1 = list(zip(list(map(sorttuple, ridge_points)),
+                      list(map(sorttuple, ridge_vertices))))
+        p2 = list(zip(list(map(sorttuple, vor.ridge_points.tolist())),
+                      list(map(sorttuple, vor.ridge_vertices))))
+        p1.sort()
+        p2.sort()
+
+        assert_equal(p1, p2)
+
+    @pytest.mark.parametrize("name", sorted(DATASETS))
+    def test_ridges(self, name):
+        # Check that the ridges computed by Voronoi indeed separate
+        # the regions of nearest neighborhood, by comparing the result
+        # to KDTree.
+
+        points = DATASETS[name]
+
+        tree = KDTree(points)
+        vor = qhull.Voronoi(points)
+
+        for p, v in vor.ridge_dict.items():
+            # consider only finite ridges
+            if not np.all(np.asarray(v) >= 0):
+                continue
+
+            ridge_midpoint = vor.vertices[v].mean(axis=0)
+            d = 1e-6 * (points[p[0]] - ridge_midpoint)
+
+            dist, k = tree.query(ridge_midpoint + d, k=1)
+            assert_equal(k, p[0])
+
+            dist, k = tree.query(ridge_midpoint - d, k=1)
+            assert_equal(k, p[1])
+
+    def test_furthest_site(self):
+        points = [(0, 0), (0, 1), (1, 0), (0.5, 0.5), (1.1, 1.1)]
+
+        # qhull v o Fv Qbb Qc Qu < dat
+        output = """
+        2
+        3 5 1
+        -10.101 -10.101
+        0.6000000000000001    0.5
+           0.5 0.6000000000000001
+        3 0 2 1
+        2 0 1
+        2 0 2
+        0
+        3 0 2 1
+        5
+        4 0 2 0 2
+        4 0 4 1 2
+        4 0 1 0 1
+        4 1 4 0 1
+        4 2 4 0 2
+        """
+        self._compare_qvoronoi(points, output, furthest_site=True)
+
+    def test_furthest_site_flag(self):
+        points = [(0, 0), (0, 1), (1, 0), (0.5, 0.5), (1.1, 1.1)]
+
+        vor = Voronoi(points)
+        assert_equal(vor.furthest_site,False)
+        vor = Voronoi(points,furthest_site=True)
+        assert_equal(vor.furthest_site,True)
+
+    @pytest.mark.fail_slow(10)
+    @pytest.mark.parametrize("name", sorted(INCREMENTAL_DATASETS))
+    def test_incremental(self, name):
+        # Test incremental construction of the triangulation
+
+        if INCREMENTAL_DATASETS[name][0][0].shape[1] > 3:
+            # too slow (testing of the result --- qhull is still fast)
+            return
+
+        chunks, opts = INCREMENTAL_DATASETS[name]
+        points = np.concatenate(chunks, axis=0)
+
+        obj = qhull.Voronoi(chunks[0], incremental=True,
+                             qhull_options=opts)
+        for chunk in chunks[1:]:
+            obj.add_points(chunk)
+
+        obj2 = qhull.Voronoi(points)
+
+        obj3 = qhull.Voronoi(chunks[0], incremental=True,
+                             qhull_options=opts)
+        if len(chunks) > 1:
+            obj3.add_points(np.concatenate(chunks[1:], axis=0),
+                            restart=True)
+
+        # -- Check that the incremental mode agrees with upfront mode
+        assert_equal(len(obj.point_region), len(obj2.point_region))
+        assert_equal(len(obj.point_region), len(obj3.point_region))
+
+        # The vertices may be in different order or duplicated in
+        # the incremental map
+        for objx in obj, obj3:
+            vertex_map = {-1: -1}
+            for i, v in enumerate(objx.vertices):
+                for j, v2 in enumerate(obj2.vertices):
+                    if np.allclose(v, v2):
+                        vertex_map[i] = j
+
+            def remap(x):
+                if hasattr(x, '__len__'):
+                    return tuple({remap(y) for y in x})
+                try:
+                    return vertex_map[x]
+                except KeyError as e:
+                    message = (f"incremental result has spurious vertex "
+                               f"at {objx.vertices[x]!r}")
+                    raise AssertionError(message) from e
+
+            def simplified(x):
+                items = set(map(sorted_tuple, x))
+                if () in items:
+                    items.remove(())
+                items = [x for x in items if len(x) > 1]
+                items.sort()
+                return items
+
+            assert_equal(
+                simplified(remap(objx.regions)),
+                simplified(obj2.regions)
+                )
+            assert_equal(
+                simplified(remap(objx.ridge_vertices)),
+                simplified(obj2.ridge_vertices)
+                )
+
+            # XXX: compare ridge_points --- not clear exactly how to do this
+
+
+class Test_HalfspaceIntersection:
+    def assert_unordered_allclose(self, arr1, arr2, rtol=1e-7):
+        """Check that every line in arr1 is only once in arr2"""
+        assert_equal(arr1.shape, arr2.shape)
+
+        truths = np.zeros((arr1.shape[0],), dtype=bool)
+        for l1 in arr1:
+            indexes = np.nonzero((abs(arr2 - l1) < rtol).all(axis=1))[0]
+            assert_equal(indexes.shape, (1,))
+            truths[indexes[0]] = True
+        assert_(truths.all())
+
+    @pytest.mark.parametrize("dt", [np.float64, int])
+    def test_cube_halfspace_intersection(self, dt):
+        halfspaces = np.array([[-1, 0, 0],
+                               [0, -1, 0],
+                               [1, 0, -2],
+                               [0, 1, -2]], dtype=dt)
+        feasible_point = np.array([1, 1], dtype=dt)
+
+        points = np.array([[0.0, 0.0], [2.0, 0.0], [0.0, 2.0], [2.0, 2.0]])
+
+        hull = qhull.HalfspaceIntersection(halfspaces, feasible_point)
+
+        assert_allclose(hull.intersections, points)
+
+    def test_self_dual_polytope_intersection(self):
+        fname = os.path.join(os.path.dirname(__file__), 'data',
+                             'selfdual-4d-polytope.txt')
+        ineqs = np.genfromtxt(fname)
+        halfspaces = -np.hstack((ineqs[:, 1:], ineqs[:, :1]))
+
+        feas_point = np.array([0., 0., 0., 0.])
+        hs = qhull.HalfspaceIntersection(halfspaces, feas_point)
+
+        assert_equal(hs.intersections.shape, (24, 4))
+
+        assert_almost_equal(hs.dual_volume, 32.0)
+        assert_equal(len(hs.dual_facets), 24)
+        for facet in hs.dual_facets:
+            assert_equal(len(facet), 6)
+
+        dists = halfspaces[:, -1] + halfspaces[:, :-1].dot(feas_point)
+        self.assert_unordered_allclose((halfspaces[:, :-1].T/dists).T, hs.dual_points)
+
+        points = itertools.permutations([0., 0., 0.5, -0.5])
+        for point in points:
+            assert_equal(np.sum((hs.intersections == point).all(axis=1)), 1)
+
+    def test_wrong_feasible_point(self):
+        halfspaces = np.array([[-1.0, 0.0, 0.0],
+                               [0.0, -1.0, 0.0],
+                               [1.0, 0.0, -1.0],
+                               [0.0, 1.0, -1.0]])
+        feasible_point = np.array([0.5, 0.5, 0.5])
+        #Feasible point is (ndim,) instead of (ndim-1,)
+        assert_raises(ValueError,
+                      qhull.HalfspaceIntersection, halfspaces, feasible_point)
+        feasible_point = np.array([[0.5], [0.5]])
+        #Feasible point is (ndim-1, 1) instead of (ndim-1,)
+        assert_raises(ValueError,
+                      qhull.HalfspaceIntersection, halfspaces, feasible_point)
+        feasible_point = np.array([[0.5, 0.5]])
+        #Feasible point is (1, ndim-1) instead of (ndim-1,)
+        assert_raises(ValueError,
+                      qhull.HalfspaceIntersection, halfspaces, feasible_point)
+
+        feasible_point = np.array([-0.5, -0.5])
+        #Feasible point is outside feasible region
+        assert_raises(qhull.QhullError,
+                      qhull.HalfspaceIntersection, halfspaces, feasible_point)
+
+    def test_incremental(self):
+        #Cube
+        halfspaces = np.array([[0., 0., -1., -0.5],
+                               [0., -1., 0., -0.5],
+                               [-1., 0., 0., -0.5],
+                               [1., 0., 0., -0.5],
+                               [0., 1., 0., -0.5],
+                               [0., 0., 1., -0.5]])
+        #Cut each summit
+        extra_normals = np.array([[1., 1., 1.],
+                                  [1., 1., -1.],
+                                  [1., -1., 1.],
+                                  [1, -1., -1.]])
+        offsets = np.array([[-1.]]*8)
+        extra_halfspaces = np.hstack((np.vstack((extra_normals, -extra_normals)),
+                                      offsets))
+
+        feas_point = np.array([0., 0., 0.])
+
+        inc_hs = qhull.HalfspaceIntersection(halfspaces, feas_point, incremental=True)
+
+        inc_res_hs = qhull.HalfspaceIntersection(halfspaces, feas_point,
+                                                 incremental=True)
+
+        for i, ehs in enumerate(extra_halfspaces):
+            inc_hs.add_halfspaces(ehs[np.newaxis, :])
+
+            inc_res_hs.add_halfspaces(ehs[np.newaxis, :], restart=True)
+
+            total = np.vstack((halfspaces, extra_halfspaces[:i+1, :]))
+
+            hs = qhull.HalfspaceIntersection(total, feas_point)
+
+            assert_allclose(inc_hs.halfspaces, inc_res_hs.halfspaces)
+            assert_allclose(inc_hs.halfspaces, hs.halfspaces)
+
+            #Direct computation and restart should have points in same order
+            assert_allclose(hs.intersections, inc_res_hs.intersections)
+            #Incremental will have points in different order than direct computation
+            self.assert_unordered_allclose(inc_hs.intersections, hs.intersections)
+
+        inc_hs.close()
+
+    def test_cube(self):
+        # Halfspaces of the cube:
+        halfspaces = np.array([[-1., 0., 0., 0.],  # x >= 0
+                               [1., 0., 0., -1.],  # x <= 1
+                               [0., -1., 0., 0.],  # y >= 0
+                               [0., 1., 0., -1.],  # y <= 1
+                               [0., 0., -1., 0.],  # z >= 0
+                               [0., 0., 1., -1.]])  # z <= 1
+        point = np.array([0.5, 0.5, 0.5])
+
+        hs = qhull.HalfspaceIntersection(halfspaces, point)
+
+        # qhalf H0.5,0.5,0.5 o < input.txt
+        qhalf_points = np.array([
+            [-2, 0, 0],
+            [2, 0, 0],
+            [0, -2, 0],
+            [0, 2, 0],
+            [0, 0, -2],
+            [0, 0, 2]])
+        qhalf_facets = [
+            [2, 4, 0],
+            [4, 2, 1],
+            [5, 2, 0],
+            [2, 5, 1],
+            [3, 4, 1],
+            [4, 3, 0],
+            [5, 3, 1],
+            [3, 5, 0]]
+
+        assert len(qhalf_facets) == len(hs.dual_facets)
+        for a, b in zip(qhalf_facets, hs.dual_facets):
+            assert set(a) == set(b)  # facet orientation can differ
+
+        assert_allclose(hs.dual_points, qhalf_points)
+
+    @pytest.mark.parametrize("k", range(1,4))
+    def test_halfspace_batch(self, k):
+        # Test that we can add halfspaces a few at a time
+        big_square = np.array([[ 1.,  0., -2.],
+                               [-1.,  0., -2.],
+                               [ 0.,  1., -2.],
+                               [ 0., -1., -2.]])
+
+        small_square = np.array([[ 1.,  0., -1.],
+                                 [-1.,  0., -1.],
+                                 [ 0.,  1., -1.],
+                                 [ 0., -1., -1.]])
+
+        hs = qhull.HalfspaceIntersection(big_square,
+                                         np.array([0.3141, 0.2718]),
+                                         incremental=True)
+
+        hs.add_halfspaces(small_square[0:k,:])
+        hs.add_halfspaces(small_square[k:4,:])
+        hs.close()
+
+        # Check the intersections are correct (they are the corners of the small square)
+        expected_intersections = np.array([[1., 1.],
+                                           [1., -1.],
+                                           [-1., 1.],
+                                           [-1., -1.]])
+        actual_intersections = hs.intersections
+        # They may be in any order, so just check that under some permutation 
+        # expected=actual.
+
+        ind1 = np.lexsort((actual_intersections[:, 1], actual_intersections[:, 0]))
+        ind2 = np.lexsort((expected_intersections[:, 1], expected_intersections[:, 0]))
+        assert_allclose(actual_intersections[ind1], expected_intersections[ind2])
+
+
+    @pytest.mark.parametrize("halfspaces", [
+    (np.array([-0.70613882, -0.45589431, 0.04178256])),
+    (np.array([[-0.70613882, -0.45589431,  0.04178256],
+               [0.70807342, -0.45464871, -0.45969769],
+               [0.,  0.76515026, -0.35614825]])),
+    ])
+    def test_gh_19865(self, halfspaces):
+        # starting off with a feasible interior point and
+        # adding halfspaces for which it is no longer feasible
+        # should result in an error rather than a problematic
+        # intersection polytope
+        initial_square =  np.array(
+                    [[1, 0, -1], [0, 1, -1], [-1, 0, -1], [0, -1, -1]]
+                )
+        incremental_intersector = qhull.HalfspaceIntersection(initial_square,
+                                                              np.zeros(2),
+                                                              incremental=True)
+        with pytest.raises(qhull.QhullError, match="feasible.*-0.706.*"):
+            incremental_intersector.add_halfspaces(halfspaces)
+
+
+    def test_gh_19865_3d(self):
+        # 3d case where closed half space is enforced for
+        # feasibility
+        halfspaces = np.array([[1, 1, 1, -1], # doesn't exclude origin
+                               [-1, -1, -1, -1], # doesn't exclude origin
+                               [1, 0, 0, 0]]) # the origin is on the line
+        initial_cube = np.array([[1, 0, 0, -1],
+                                 [-1, 0, 0, -1],
+                                 [0, 1, 0, -1],
+                                 [0, -1, 0, -1],
+                                 [0, 0, 1, -1],
+                                 [0, 0, -1, -1]])
+        incremental_intersector = qhull.HalfspaceIntersection(initial_cube,
+                                                              np.zeros(3),
+                                                              incremental=True)
+        with pytest.raises(qhull.QhullError, match="feasible.*[1 0 0 0]"):
+            incremental_intersector.add_halfspaces(halfspaces)
+
+
+    def test_2d_add_halfspace_input(self):
+        # incrementally added halfspaces should respect the 2D
+        # array shape requirement
+        initial_square =  np.array(
+                    [[1, 0, -1], [0, 1, -1], [-1, 0, -1], [0, -1, -1]]
+                )
+        incremental_intersector = qhull.HalfspaceIntersection(initial_square,
+                                                              np.zeros(2),
+                                                              incremental=True)
+        with pytest.raises(ValueError, match="2D array"):
+            incremental_intersector.add_halfspaces(np.ones((4, 4, 4)))
+
+    def test_1d_add_halfspace_input(self):
+        # we do allow 1D `halfspaces` input to add_halfspaces()
+        initial_square =  np.array(
+                    [[1, 0, -1], [0, 1, -1], [-1, 0, -1], [0, -1, -1]]
+                )
+        incremental_intersector = qhull.HalfspaceIntersection(initial_square,
+                                                              np.zeros(2),
+                                                              incremental=True)
+        assert_allclose(incremental_intersector.dual_vertices, np.arange(4))
+        incremental_intersector.add_halfspaces(np.array([2, 2, -1]))
+        assert_allclose(incremental_intersector.dual_vertices, np.arange(5))
+
+
+@pytest.mark.parametrize("diagram_type", [Voronoi, qhull.Delaunay])
+def test_gh_20623(diagram_type):
+    rng = np.random.default_rng(123)
+    invalid_data = rng.random((4, 10, 3))
+    with pytest.raises(ValueError, match="dimensions"):
+        diagram_type(invalid_data)
+
+
+def test_gh_21286():
+    generators = np.array([[0, 0], [0, 1.1], [1, 0], [1, 1]])
+    tri = qhull.Delaunay(generators)
+    # verify absence of segfault reported in ticket:
+    with pytest.raises(IndexError):
+        tri.find_simplex(1)
+    with pytest.raises(IndexError):
+        # strikingly, Delaunay object has shape
+        # () just like np.asanyarray(1) above
+        tri.find_simplex(tri)
+
+
+def test_find_simplex_ndim_err():
+    generators = np.array([[0, 0], [0, 1.1], [1, 0], [1, 1]])
+    tri = qhull.Delaunay(generators)
+    with pytest.raises(ValueError):
+        tri.find_simplex([2, 2, 2])
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_slerp.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_slerp.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ce24991a2d1c3d45107778ae22d1c6fe6e27259
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_slerp.py
@@ -0,0 +1,417 @@
+import numpy as np
+from numpy.testing import assert_allclose
+
+import pytest
+from scipy.spatial import geometric_slerp
+
+
+def _generate_spherical_points(ndim=3, n_pts=2):
+    # generate uniform points on sphere
+    # see: https://stackoverflow.com/a/23785326
+    # tentatively extended to arbitrary dims
+    # for 0-sphere it will always produce antipodes
+    np.random.seed(123)
+    points = np.random.normal(size=(n_pts, ndim))
+    points /= np.linalg.norm(points, axis=1)[:, np.newaxis]
+    return points[0], points[1]
+
+
+class TestGeometricSlerp:
+    # Test various properties of the geometric slerp code
+
+    @pytest.mark.parametrize("n_dims", [2, 3, 5, 7, 9])
+    @pytest.mark.parametrize("n_pts", [0, 3, 17])
+    def test_shape_property(self, n_dims, n_pts):
+        # geometric_slerp output shape should match
+        # input dimensionality & requested number
+        # of interpolation points
+        start, end = _generate_spherical_points(n_dims, 2)
+
+        actual = geometric_slerp(start=start,
+                                 end=end,
+                                 t=np.linspace(0, 1, n_pts))
+
+        assert actual.shape == (n_pts, n_dims)
+
+    @pytest.mark.parametrize("n_dims", [2, 3, 5, 7, 9])
+    @pytest.mark.parametrize("n_pts", [3, 17])
+    def test_include_ends(self, n_dims, n_pts):
+        # geometric_slerp should return a data structure
+        # that includes the start and end coordinates
+        # when t includes 0 and 1 ends
+        # this is convenient for plotting surfaces represented
+        # by interpolations for example
+
+        # the generator doesn't work so well for the unit
+        # sphere (it always produces antipodes), so use
+        # custom values there
+        start, end = _generate_spherical_points(n_dims, 2)
+
+        actual = geometric_slerp(start=start,
+                                 end=end,
+                                 t=np.linspace(0, 1, n_pts))
+
+        assert_allclose(actual[0], start)
+        assert_allclose(actual[-1], end)
+
+    @pytest.mark.parametrize("start, end", [
+        # both arrays are not flat
+        (np.zeros((1, 3)), np.ones((1, 3))),
+        # only start array is not flat
+        (np.zeros((1, 3)), np.ones(3)),
+        # only end array is not flat
+        (np.zeros(1), np.ones((3, 1))),
+        ])
+    def test_input_shape_flat(self, start, end):
+        # geometric_slerp should handle input arrays that are
+        # not flat appropriately
+        with pytest.raises(ValueError, match='one-dimensional'):
+            geometric_slerp(start=start,
+                            end=end,
+                            t=np.linspace(0, 1, 10))
+
+    @pytest.mark.parametrize("start, end", [
+        # 7-D and 3-D ends
+        (np.zeros(7), np.ones(3)),
+        # 2-D and 1-D ends
+        (np.zeros(2), np.ones(1)),
+        # empty, "3D" will also get caught this way
+        (np.array([]), np.ones(3)),
+        ])
+    def test_input_dim_mismatch(self, start, end):
+        # geometric_slerp must appropriately handle cases where
+        # an interpolation is attempted across two different
+        # dimensionalities
+        with pytest.raises(ValueError, match='dimensions'):
+            geometric_slerp(start=start,
+                            end=end,
+                            t=np.linspace(0, 1, 10))
+
+    @pytest.mark.parametrize("start, end", [
+        # both empty
+        (np.array([]), np.array([])),
+        ])
+    def test_input_at_least1d(self, start, end):
+        # empty inputs to geometric_slerp must
+        # be handled appropriately when not detected
+        # by mismatch
+        with pytest.raises(ValueError, match='at least two-dim'):
+            geometric_slerp(start=start,
+                            end=end,
+                            t=np.linspace(0, 1, 10))
+
+    @pytest.mark.thread_unsafe
+    @pytest.mark.parametrize("start, end, expected", [
+        # North and South Poles are definitely antipodes
+        # but should be handled gracefully now
+        (np.array([0, 0, 1.0]), np.array([0, 0, -1.0]), "warning"),
+        # this case will issue a warning & be handled
+        # gracefully as well;
+        # North Pole was rotated very slightly
+        # using r = R.from_euler('x', 0.035, degrees=True)
+        # to achieve Euclidean distance offset from diameter by
+        # 9.328908379124812e-08, within the default tol
+        (np.array([0.00000000e+00,
+                  -6.10865200e-04,
+                  9.99999813e-01]), np.array([0, 0, -1.0]), "warning"),
+        # this case should succeed without warning because a
+        # sufficiently large
+        # rotation was applied to North Pole point to shift it
+        # to a Euclidean distance of 2.3036691931821451e-07
+        # from South Pole, which is larger than tol
+        (np.array([0.00000000e+00,
+                  -9.59930941e-04,
+                  9.99999539e-01]), np.array([0, 0, -1.0]), "success"),
+        ])
+    def test_handle_antipodes(self, start, end, expected):
+        # antipodal points must be handled appropriately;
+        # there are an infinite number of possible geodesic
+        # interpolations between them in higher dims
+        if expected == "warning":
+            with pytest.warns(UserWarning, match='antipodes'):
+                res = geometric_slerp(start=start,
+                                      end=end,
+                                      t=np.linspace(0, 1, 10))
+        else:
+            res = geometric_slerp(start=start,
+                                  end=end,
+                                  t=np.linspace(0, 1, 10))
+
+        # antipodes or near-antipodes should still produce
+        # slerp paths on the surface of the sphere (but they
+        # may be ambiguous):
+        assert_allclose(np.linalg.norm(res, axis=1), 1.0)
+
+    @pytest.mark.parametrize("start, end, expected", [
+        # 2-D with n_pts=4 (two new interpolation points)
+        # this is an actual circle
+        (np.array([1, 0]),
+         np.array([0, 1]),
+         np.array([[1, 0],
+                   [np.sqrt(3) / 2, 0.5],  # 30 deg on unit circle
+                   [0.5, np.sqrt(3) / 2],  # 60 deg on unit circle
+                   [0, 1]])),
+        # likewise for 3-D (add z = 0 plane)
+        # this is an ordinary sphere
+        (np.array([1, 0, 0]),
+         np.array([0, 1, 0]),
+         np.array([[1, 0, 0],
+                   [np.sqrt(3) / 2, 0.5, 0],
+                   [0.5, np.sqrt(3) / 2, 0],
+                   [0, 1, 0]])),
+        # for 5-D, pad more columns with constants
+        # zeros are easiest--non-zero values on unit
+        # circle are more difficult to reason about
+        # at higher dims
+        (np.array([1, 0, 0, 0, 0]),
+         np.array([0, 1, 0, 0, 0]),
+         np.array([[1, 0, 0, 0, 0],
+                   [np.sqrt(3) / 2, 0.5, 0, 0, 0],
+                   [0.5, np.sqrt(3) / 2, 0, 0, 0],
+                   [0, 1, 0, 0, 0]])),
+
+    ])
+    def test_straightforward_examples(self, start, end, expected):
+        # some straightforward interpolation tests, sufficiently
+        # simple to use the unit circle to deduce expected values;
+        # for larger dimensions, pad with constants so that the
+        # data is N-D but simpler to reason about
+        actual = geometric_slerp(start=start,
+                                 end=end,
+                                 t=np.linspace(0, 1, 4))
+        assert_allclose(actual, expected, atol=1e-16)
+
+    @pytest.mark.parametrize("t", [
+        # both interval ends clearly violate limits
+        np.linspace(-20, 20, 300),
+        # only one interval end violating limit slightly
+        np.linspace(-0.0001, 0.0001, 17),
+        ])
+    def test_t_values_limits(self, t):
+        # geometric_slerp() should appropriately handle
+        # interpolation parameters < 0 and > 1
+        with pytest.raises(ValueError, match='interpolation parameter'):
+            _ = geometric_slerp(start=np.array([1, 0]),
+                                end=np.array([0, 1]),
+                                t=t)
+
+    @pytest.mark.parametrize("start, end", [
+        (np.array([1]),
+         np.array([0])),
+        (np.array([0]),
+         np.array([1])),
+        (np.array([-17.7]),
+         np.array([165.9])),
+     ])
+    def test_0_sphere_handling(self, start, end):
+        # it does not make sense to interpolate the set of
+        # two points that is the 0-sphere
+        with pytest.raises(ValueError, match='at least two-dim'):
+            _ = geometric_slerp(start=start,
+                                end=end,
+                                t=np.linspace(0, 1, 4))
+
+    @pytest.mark.parametrize("tol", [
+        # an integer currently raises
+        5,
+        # string raises
+        "7",
+        # list and arrays also raise
+        [5, 6, 7], np.array(9.0),
+        ])
+    def test_tol_type(self, tol):
+        # geometric_slerp() should raise if tol is not
+        # a suitable float type
+        with pytest.raises(ValueError, match='must be a float'):
+            _ = geometric_slerp(start=np.array([1, 0]),
+                                end=np.array([0, 1]),
+                                t=np.linspace(0, 1, 5),
+                                tol=tol)
+
+    @pytest.mark.parametrize("tol", [
+        -5e-6,
+        -7e-10,
+        ])
+    def test_tol_sign(self, tol):
+        # geometric_slerp() currently handles negative
+        # tol values, as long as they are floats
+        _ = geometric_slerp(start=np.array([1, 0]),
+                            end=np.array([0, 1]),
+                            t=np.linspace(0, 1, 5),
+                            tol=tol)
+
+    @pytest.mark.parametrize("start, end", [
+        # 1-sphere (circle) with one point at origin
+        # and the other on the circle
+        (np.array([1, 0]), np.array([0, 0])),
+        # 2-sphere (normal sphere) with both points
+        # just slightly off sphere by the same amount
+        # in different directions
+        (np.array([1 + 1e-6, 0, 0]),
+         np.array([0, 1 - 1e-6, 0])),
+        # same thing in 4-D
+        (np.array([1 + 1e-6, 0, 0, 0]),
+         np.array([0, 1 - 1e-6, 0, 0])),
+        ])
+    def test_unit_sphere_enforcement(self, start, end):
+        # geometric_slerp() should raise on input that clearly
+        # cannot be on an n-sphere of radius 1
+        with pytest.raises(ValueError, match='unit n-sphere'):
+            geometric_slerp(start=start,
+                            end=end,
+                            t=np.linspace(0, 1, 5))
+
+    @pytest.mark.parametrize("start, end", [
+        # 1-sphere 45 degree case
+        (np.array([1, 0]),
+         np.array([np.sqrt(2) / 2.,
+                   np.sqrt(2) / 2.])),
+        # 2-sphere 135 degree case
+        (np.array([1, 0]),
+         np.array([-np.sqrt(2) / 2.,
+                   np.sqrt(2) / 2.])),
+        ])
+    @pytest.mark.parametrize("t_func", [
+        np.linspace, np.logspace])
+    def test_order_handling(self, start, end, t_func):
+        # geometric_slerp() should handle scenarios with
+        # ascending and descending t value arrays gracefully;
+        # results should simply be reversed
+
+        # for scrambled / unsorted parameters, the same values
+        # should be returned, just in scrambled order
+
+        num_t_vals = 20
+        np.random.seed(789)
+        forward_t_vals = t_func(0, 10, num_t_vals)
+        # normalize to max of 1
+        forward_t_vals /= forward_t_vals.max()
+        reverse_t_vals = np.flipud(forward_t_vals)
+        shuffled_indices = np.arange(num_t_vals)
+        np.random.shuffle(shuffled_indices)
+        scramble_t_vals = forward_t_vals.copy()[shuffled_indices]
+
+        forward_results = geometric_slerp(start=start,
+                                          end=end,
+                                          t=forward_t_vals)
+        reverse_results = geometric_slerp(start=start,
+                                          end=end,
+                                          t=reverse_t_vals)
+        scrambled_results = geometric_slerp(start=start,
+                                            end=end,
+                                            t=scramble_t_vals)
+
+        # check fidelity to input order
+        assert_allclose(forward_results, np.flipud(reverse_results))
+        assert_allclose(forward_results[shuffled_indices],
+                        scrambled_results)
+
+    @pytest.mark.parametrize("t", [
+        # string:
+        "15, 5, 7",
+        # complex numbers currently produce a warning
+        # but not sure we need to worry about it too much:
+        # [3 + 1j, 5 + 2j],
+        ])
+    def test_t_values_conversion(self, t):
+        with pytest.raises(ValueError):
+            _ = geometric_slerp(start=np.array([1]),
+                                end=np.array([0]),
+                                t=t)
+
+    def test_accept_arraylike(self):
+        # array-like support requested by reviewer
+        # in gh-10380
+        actual = geometric_slerp([1, 0], [0, 1], [0, 1/3, 0.5, 2/3, 1])
+
+        # expected values are based on visual inspection
+        # of the unit circle for the progressions along
+        # the circumference provided in t
+        expected = np.array([[1, 0],
+                             [np.sqrt(3) / 2, 0.5],
+                             [np.sqrt(2) / 2,
+                              np.sqrt(2) / 2],
+                             [0.5, np.sqrt(3) / 2],
+                             [0, 1]], dtype=np.float64)
+        # Tyler's original Cython implementation of geometric_slerp
+        # can pass at atol=0 here, but on balance we will accept
+        # 1e-16 for an implementation that avoids Cython and
+        # makes up accuracy ground elsewhere
+        assert_allclose(actual, expected, atol=1e-16)
+
+    def test_scalar_t(self):
+        # when t is a scalar, return value is a single
+        # interpolated point of the appropriate dimensionality
+        # requested by reviewer in gh-10380
+        actual = geometric_slerp([1, 0], [0, 1], 0.5)
+        expected = np.array([np.sqrt(2) / 2,
+                             np.sqrt(2) / 2], dtype=np.float64)
+        assert actual.shape == (2,)
+        assert_allclose(actual, expected)
+
+    @pytest.mark.parametrize('start', [
+        np.array([1, 0, 0]),
+        np.array([0, 1]),
+    ])
+    @pytest.mark.parametrize('t', [
+        np.array(1),
+        np.array([1]),
+        np.array([[1]]),
+        np.array([[[1]]]),
+        np.array([]),
+        np.linspace(0, 1, 5),
+    ])
+    def test_degenerate_input(self, start, t):
+        if np.asarray(t).ndim > 1:
+            with pytest.raises(ValueError):
+                geometric_slerp(start=start, end=start, t=t)
+        else:
+
+            shape = (t.size,) + start.shape
+            expected = np.full(shape, start)
+
+            actual = geometric_slerp(start=start, end=start, t=t)
+            assert_allclose(actual, expected)
+
+            # Check that degenerate and non-degenerate
+            # inputs yield the same size
+            non_degenerate = geometric_slerp(start=start, end=start[::-1], t=t)
+            assert actual.size == non_degenerate.size
+
+    @pytest.mark.parametrize('k', np.logspace(-10, -1, 10))
+    def test_numerical_stability_pi(self, k):
+        # geometric_slerp should have excellent numerical
+        # stability for angles approaching pi between
+        # the start and end points
+        angle = np.pi - k
+        ts = np.linspace(0, 1, 100)
+        P = np.array([1, 0, 0, 0])
+        Q = np.array([np.cos(angle), np.sin(angle), 0, 0])
+        # the test should only be enforced for cases where
+        # geometric_slerp determines that the input is actually
+        # on the unit sphere
+        with np.testing.suppress_warnings() as sup:
+            sup.filter(UserWarning)
+            result = geometric_slerp(P, Q, ts, 1e-18)
+            norms = np.linalg.norm(result, axis=1)
+            error = np.max(np.abs(norms - 1))
+            assert error < 4e-15
+
+    @pytest.mark.parametrize('t', [
+     [[0, 0.5]],
+     [[[[[[[[[0, 0.5]]]]]]]]],
+    ])
+    def test_interpolation_param_ndim(self, t):
+        # regression test for gh-14465
+        arr1 = np.array([0, 1])
+        arr2 = np.array([1, 0])
+
+        with pytest.raises(ValueError):
+            geometric_slerp(start=arr1,
+                            end=arr2,
+                            t=t)
+
+        with pytest.raises(ValueError):
+            geometric_slerp(start=arr1,
+                            end=arr1,
+                            t=t)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_spherical_voronoi.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_spherical_voronoi.py
new file mode 100644
index 0000000000000000000000000000000000000000..8bf4764e9e37312d08f25870327457107b9dcd91
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/tests/test_spherical_voronoi.py
@@ -0,0 +1,358 @@
+import numpy as np
+import itertools
+from numpy.testing import (assert_equal,
+                           assert_almost_equal,
+                           assert_array_equal,
+                           assert_array_almost_equal)
+import pytest
+from pytest import raises as assert_raises
+from scipy.spatial import SphericalVoronoi, distance
+from scipy.optimize import linear_sum_assignment
+from scipy.constants import golden as phi
+from scipy.special import gamma
+
+
+TOL = 1E-10
+
+
+def _generate_tetrahedron():
+    return np.array([[1, 1, 1], [1, -1, -1], [-1, 1, -1], [-1, -1, 1]])
+
+
+def _generate_cube():
+    return np.array(list(itertools.product([-1, 1.], repeat=3)))
+
+
+def _generate_octahedron():
+    return np.array([[-1, 0, 0], [+1, 0, 0], [0, -1, 0],
+                     [0, +1, 0], [0, 0, -1], [0, 0, +1]])
+
+
+def _generate_dodecahedron():
+
+    x1 = _generate_cube()
+    x2 = np.array([[0, -phi, -1 / phi],
+                   [0, -phi, +1 / phi],
+                   [0, +phi, -1 / phi],
+                   [0, +phi, +1 / phi]])
+    x3 = np.array([[-1 / phi, 0, -phi],
+                   [+1 / phi, 0, -phi],
+                   [-1 / phi, 0, +phi],
+                   [+1 / phi, 0, +phi]])
+    x4 = np.array([[-phi, -1 / phi, 0],
+                   [-phi, +1 / phi, 0],
+                   [+phi, -1 / phi, 0],
+                   [+phi, +1 / phi, 0]])
+    return np.concatenate((x1, x2, x3, x4))
+
+
+def _generate_icosahedron():
+    x = np.array([[0, -1, -phi],
+                  [0, -1, +phi],
+                  [0, +1, -phi],
+                  [0, +1, +phi]])
+    return np.concatenate([np.roll(x, i, axis=1) for i in range(3)])
+
+
+def _generate_polytope(name):
+    polygons = ["triangle", "square", "pentagon", "hexagon", "heptagon",
+                "octagon", "nonagon", "decagon", "undecagon", "dodecagon"]
+    polyhedra = ["tetrahedron", "cube", "octahedron", "dodecahedron",
+                 "icosahedron"]
+    if name not in polygons and name not in polyhedra:
+        raise ValueError("unrecognized polytope")
+
+    if name in polygons:
+        n = polygons.index(name) + 3
+        thetas = np.linspace(0, 2 * np.pi, n, endpoint=False)
+        p = np.vstack([np.cos(thetas), np.sin(thetas)]).T
+    elif name == "tetrahedron":
+        p = _generate_tetrahedron()
+    elif name == "cube":
+        p = _generate_cube()
+    elif name == "octahedron":
+        p = _generate_octahedron()
+    elif name == "dodecahedron":
+        p = _generate_dodecahedron()
+    elif name == "icosahedron":
+        p = _generate_icosahedron()
+
+    return p / np.linalg.norm(p, axis=1, keepdims=True)
+
+
+def _hypersphere_area(dim, radius):
+    # https://en.wikipedia.org/wiki/N-sphere#Closed_forms
+    return 2 * np.pi**(dim / 2) / gamma(dim / 2) * radius**(dim - 1)
+
+
+def _sample_sphere(n, dim, seed=None):
+    # Sample points uniformly at random from the hypersphere
+    rng = np.random.RandomState(seed=seed)
+    points = rng.randn(n, dim)
+    points /= np.linalg.norm(points, axis=1, keepdims=True)
+    return points
+
+
+class TestSphericalVoronoi:
+
+    def setup_method(self):
+        self.points = np.array([
+            [-0.78928481, -0.16341094, 0.59188373],
+            [-0.66839141, 0.73309634, 0.12578818],
+            [0.32535778, -0.92476944, -0.19734181],
+            [-0.90177102, -0.03785291, -0.43055335],
+            [0.71781344, 0.68428936, 0.12842096],
+            [-0.96064876, 0.23492353, -0.14820556],
+            [0.73181537, -0.22025898, -0.6449281],
+            [0.79979205, 0.54555747, 0.25039913]]
+        )
+
+    def test_constructor(self):
+        center = np.array([1, 2, 3])
+        radius = 2
+        s1 = SphericalVoronoi(self.points)
+        # user input checks in SphericalVoronoi now require
+        # the radius / center to match the generators so adjust
+        # accordingly here
+        s2 = SphericalVoronoi(self.points * radius, radius)
+        s3 = SphericalVoronoi(self.points + center, center=center)
+        s4 = SphericalVoronoi(self.points * radius + center, radius, center)
+        assert_array_equal(s1.center, np.array([0, 0, 0]))
+        assert_equal(s1.radius, 1)
+        assert_array_equal(s2.center, np.array([0, 0, 0]))
+        assert_equal(s2.radius, 2)
+        assert_array_equal(s3.center, center)
+        assert_equal(s3.radius, 1)
+        assert_array_equal(s4.center, center)
+        assert_equal(s4.radius, radius)
+
+        # Test a non-sequence/-ndarray based array-like
+        s5 = SphericalVoronoi(memoryview(self.points))  # type: ignore[arg-type]
+        assert_array_equal(s5.center, np.array([0, 0, 0]))
+        assert_equal(s5.radius, 1)
+
+    def test_vertices_regions_translation_invariance(self):
+        sv_origin = SphericalVoronoi(self.points)
+        center = np.array([1, 1, 1])
+        sv_translated = SphericalVoronoi(self.points + center, center=center)
+        assert_equal(sv_origin.regions, sv_translated.regions)
+        assert_array_almost_equal(sv_origin.vertices + center,
+                                  sv_translated.vertices)
+
+    def test_vertices_regions_scaling_invariance(self):
+        sv_unit = SphericalVoronoi(self.points)
+        sv_scaled = SphericalVoronoi(self.points * 2, 2)
+        assert_equal(sv_unit.regions, sv_scaled.regions)
+        assert_array_almost_equal(sv_unit.vertices * 2,
+                                  sv_scaled.vertices)
+
+    def test_old_radius_api_error(self):
+        with pytest.raises(ValueError, match='`radius` is `None`. *'):
+            SphericalVoronoi(self.points, radius=None)
+
+    def test_sort_vertices_of_regions(self):
+        sv = SphericalVoronoi(self.points)
+        unsorted_regions = sv.regions
+        sv.sort_vertices_of_regions()
+        assert_equal(sorted(sv.regions), sorted(unsorted_regions))
+
+    def test_sort_vertices_of_regions_flattened(self):
+        expected = sorted([[0, 6, 5, 2, 3], [2, 3, 10, 11, 8, 7], [0, 6, 4, 1],
+                           [4, 8, 7, 5, 6], [9, 11, 10], [2, 7, 5],
+                           [1, 4, 8, 11, 9], [0, 3, 10, 9, 1]])
+        expected = list(itertools.chain(*sorted(expected)))  # type: ignore
+        sv = SphericalVoronoi(self.points)
+        sv.sort_vertices_of_regions()
+        actual = list(itertools.chain(*sorted(sv.regions)))
+        assert_array_equal(actual, expected)
+
+    def test_sort_vertices_of_regions_dimensionality(self):
+        points = np.array([[1, 0, 0, 0],
+                           [0, 1, 0, 0],
+                           [0, 0, 1, 0],
+                           [0, 0, 0, 1],
+                           [0.5, 0.5, 0.5, 0.5]])
+        with pytest.raises(TypeError, match="three-dimensional"):
+            sv = SphericalVoronoi(points)
+            sv.sort_vertices_of_regions()
+
+    def test_num_vertices(self):
+        # for any n >= 3, a spherical Voronoi diagram has 2n - 4
+        # vertices; this is a direct consequence of Euler's formula
+        # as explained by Dinis and Mamede (2010) Proceedings of the
+        # 2010 International Symposium on Voronoi Diagrams in Science
+        # and Engineering
+        sv = SphericalVoronoi(self.points)
+        expected = self.points.shape[0] * 2 - 4
+        actual = sv.vertices.shape[0]
+        assert_equal(actual, expected)
+
+    def test_voronoi_circles(self):
+        sv = SphericalVoronoi(self.points)
+        for vertex in sv.vertices:
+            distances = distance.cdist(sv.points, np.array([vertex]))
+            closest = np.array(sorted(distances)[0:3])
+            assert_almost_equal(closest[0], closest[1], 7, str(vertex))
+            assert_almost_equal(closest[0], closest[2], 7, str(vertex))
+
+    def test_duplicate_point_handling(self):
+        # an exception should be raised for degenerate generators
+        # related to Issue# 7046
+        self.degenerate = np.concatenate((self.points, self.points))
+        with assert_raises(ValueError):
+            SphericalVoronoi(self.degenerate)
+
+    def test_incorrect_radius_handling(self):
+        # an exception should be raised if the radius provided
+        # cannot possibly match the input generators
+        with assert_raises(ValueError):
+            SphericalVoronoi(self.points, radius=0.98)
+
+    def test_incorrect_center_handling(self):
+        # an exception should be raised if the center provided
+        # cannot possibly match the input generators
+        with assert_raises(ValueError):
+            SphericalVoronoi(self.points, center=[0.1, 0, 0])
+
+    @pytest.mark.parametrize("dim", range(2, 6))
+    @pytest.mark.parametrize("shift", [False, True])
+    def test_single_hemisphere_handling(self, dim, shift):
+        n = 10
+        points = _sample_sphere(n, dim, seed=0)
+        points[:, 0] = np.abs(points[:, 0])
+        center = (np.arange(dim) + 1) * shift
+        sv = SphericalVoronoi(points + center, center=center)
+        dots = np.einsum('ij,ij->i', sv.vertices - center,
+                                     sv.points[sv._simplices[:, 0]] - center)
+        circumradii = np.arccos(np.clip(dots, -1, 1))
+        assert np.max(circumradii) > np.pi / 2
+
+    @pytest.mark.parametrize("n", [1, 2, 10])
+    @pytest.mark.parametrize("dim", range(2, 6))
+    @pytest.mark.parametrize("shift", [False, True])
+    def test_rank_deficient(self, n, dim, shift):
+        center = (np.arange(dim) + 1) * shift
+        points = _sample_sphere(n, dim - 1, seed=0)
+        points = np.hstack([points, np.zeros((n, 1))])
+        with pytest.raises(ValueError, match="Rank of input points"):
+            SphericalVoronoi(points + center, center=center)
+
+    @pytest.mark.parametrize("dim", range(2, 6))
+    def test_higher_dimensions(self, dim):
+        n = 100
+        points = _sample_sphere(n, dim, seed=0)
+        sv = SphericalVoronoi(points)
+        assert sv.vertices.shape[1] == dim
+        assert len(sv.regions) == n
+
+        # verify Euler characteristic
+        cell_counts = []
+        simplices = np.sort(sv._simplices)
+        for i in range(1, dim + 1):
+            cells = []
+            for indices in itertools.combinations(range(dim), i):
+                cells.append(simplices[:, list(indices)])
+            cells = np.unique(np.concatenate(cells), axis=0)
+            cell_counts.append(len(cells))
+        expected_euler = 1 + (-1)**(dim-1)
+        actual_euler = sum([(-1)**i * e for i, e in enumerate(cell_counts)])
+        assert expected_euler == actual_euler
+
+    @pytest.mark.parametrize("dim", range(2, 6))
+    def test_cross_polytope_regions(self, dim):
+        # The hypercube is the dual of the cross-polytope, so the voronoi
+        # vertices of the cross-polytope lie on the points of the hypercube.
+
+        # generate points of the cross-polytope
+        points = np.concatenate((-np.eye(dim), np.eye(dim)))
+        sv = SphericalVoronoi(points)
+        assert all([len(e) == 2**(dim - 1) for e in sv.regions])
+
+        # generate points of the hypercube
+        expected = np.vstack(list(itertools.product([-1, 1], repeat=dim)))
+        expected = expected.astype(np.float64) / np.sqrt(dim)
+
+        # test that Voronoi vertices are correctly placed
+        dist = distance.cdist(sv.vertices, expected)
+        res = linear_sum_assignment(dist)
+        assert dist[res].sum() < TOL
+
+    @pytest.mark.parametrize("dim", range(2, 6))
+    def test_hypercube_regions(self, dim):
+        # The cross-polytope is the dual of the hypercube, so the voronoi
+        # vertices of the hypercube lie on the points of the cross-polytope.
+
+        # generate points of the hypercube
+        points = np.vstack(list(itertools.product([-1, 1], repeat=dim)))
+        points = points.astype(np.float64) / np.sqrt(dim)
+        sv = SphericalVoronoi(points)
+
+        # generate points of the cross-polytope
+        expected = np.concatenate((-np.eye(dim), np.eye(dim)))
+
+        # test that Voronoi vertices are correctly placed
+        dist = distance.cdist(sv.vertices, expected)
+        res = linear_sum_assignment(dist)
+        assert dist[res].sum() < TOL
+
+    @pytest.mark.parametrize("n", [10, 500])
+    @pytest.mark.parametrize("dim", [2, 3])
+    @pytest.mark.parametrize("radius", [0.5, 1, 2])
+    @pytest.mark.parametrize("shift", [False, True])
+    @pytest.mark.parametrize("single_hemisphere", [False, True])
+    def test_area_reconstitution(self, n, dim, radius, shift,
+                                 single_hemisphere):
+        points = _sample_sphere(n, dim, seed=0)
+
+        # move all points to one side of the sphere for single-hemisphere test
+        if single_hemisphere:
+            points[:, 0] = np.abs(points[:, 0])
+
+        center = (np.arange(dim) + 1) * shift
+        points = radius * points + center
+
+        sv = SphericalVoronoi(points, radius=radius, center=center)
+        areas = sv.calculate_areas()
+        assert_almost_equal(areas.sum(), _hypersphere_area(dim, radius))
+
+    @pytest.mark.parametrize("poly", ["triangle", "dodecagon",
+                                      "tetrahedron", "cube", "octahedron",
+                                      "dodecahedron", "icosahedron"])
+    def test_equal_area_reconstitution(self, poly):
+        points = _generate_polytope(poly)
+        n, dim = points.shape
+        sv = SphericalVoronoi(points)
+        areas = sv.calculate_areas()
+        assert_almost_equal(areas, _hypersphere_area(dim, 1) / n)
+
+    def test_area_unsupported_dimension(self):
+        dim = 4
+        points = np.concatenate((-np.eye(dim), np.eye(dim)))
+        sv = SphericalVoronoi(points)
+        with pytest.raises(TypeError, match="Only supported"):
+            sv.calculate_areas()
+
+    @pytest.mark.parametrize("radius", [1, 1.])
+    @pytest.mark.parametrize("center", [None, (1, 2, 3), (1., 2., 3.)])
+    def test_attribute_types(self, radius, center):
+        points = radius * self.points
+        if center is not None:
+            points += center
+
+        sv = SphericalVoronoi(points, radius=radius, center=center)
+        assert sv.points.dtype is np.dtype(np.float64)
+        assert sv.center.dtype is np.dtype(np.float64)
+        assert isinstance(sv.radius, float)
+
+    def test_region_types(self):
+        # Tests that region integer type does not change
+        # See Issue #13412
+        sv = SphericalVoronoi(self.points)
+        dtype = type(sv.regions[0][0])
+        # also enforce nested list type per gh-19177
+        for region in sv.regions:
+            assert isinstance(region, list)
+        sv.sort_vertices_of_regions()
+        assert isinstance(sv.regions[0][0], dtype)
+        sv.sort_vertices_of_regions()
+        assert isinstance(sv.regions[0][0], dtype)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..abe4a32f20d1f8740910a16de9e67a53621bc3e3
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py
@@ -0,0 +1,29 @@
+"""
+Spatial Transformations (:mod:`scipy.spatial.transform`)
+========================================================
+
+.. currentmodule:: scipy.spatial.transform
+
+This package implements various spatial transformations. For now,
+only rotations are supported.
+
+Rotations in 3 dimensions
+-------------------------
+.. autosummary::
+   :toctree: generated/
+
+   Rotation
+   Slerp
+   RotationSpline
+"""
+from ._rotation import Rotation, Slerp
+from ._rotation_spline import RotationSpline
+
+# Deprecated namespaces, to be removed in v2.0.0
+from . import rotation
+
+__all__ = ['Rotation', 'Slerp', 'RotationSpline']
+
+from scipy._lib._testutils import PytestTester
+test = PytestTester(__name__)
+del PytestTester
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/__init__.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..67efe601cc51c713f649bfd7c4271a79d1f39708
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/__init__.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_groups.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_groups.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..73e13c647d2e4ce14ebe823c94bf4b92cd4d5766
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_groups.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_spline.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_spline.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c6ef5580910bdea3479ff53f707a2e2ad2f72c76
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/_rotation_spline.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/rotation.cpython-310.pyc b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/rotation.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bf83940fe759af0d7c343099852c36dabc8cd1d8
Binary files /dev/null and b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/__pycache__/rotation.cpython-310.pyc differ
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_groups.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_groups.py
new file mode 100644
index 0000000000000000000000000000000000000000..870e9b9e2b44bff56b8228a70607e29f8173accc
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_groups.py
@@ -0,0 +1,140 @@
+import numpy as np
+from scipy.constants import golden as phi
+
+
+def icosahedral(cls):
+    g1 = tetrahedral(cls).as_quat()
+    a = 0.5
+    b = 0.5 / phi
+    c = phi / 2
+    g2 = np.array([[+a, +b, +c, 0],
+                   [+a, +b, -c, 0],
+                   [+a, +c, 0, +b],
+                   [+a, +c, 0, -b],
+                   [+a, -b, +c, 0],
+                   [+a, -b, -c, 0],
+                   [+a, -c, 0, +b],
+                   [+a, -c, 0, -b],
+                   [+a, 0, +b, +c],
+                   [+a, 0, +b, -c],
+                   [+a, 0, -b, +c],
+                   [+a, 0, -b, -c],
+                   [+b, +a, 0, +c],
+                   [+b, +a, 0, -c],
+                   [+b, +c, +a, 0],
+                   [+b, +c, -a, 0],
+                   [+b, -a, 0, +c],
+                   [+b, -a, 0, -c],
+                   [+b, -c, +a, 0],
+                   [+b, -c, -a, 0],
+                   [+b, 0, +c, +a],
+                   [+b, 0, +c, -a],
+                   [+b, 0, -c, +a],
+                   [+b, 0, -c, -a],
+                   [+c, +a, +b, 0],
+                   [+c, +a, -b, 0],
+                   [+c, +b, 0, +a],
+                   [+c, +b, 0, -a],
+                   [+c, -a, +b, 0],
+                   [+c, -a, -b, 0],
+                   [+c, -b, 0, +a],
+                   [+c, -b, 0, -a],
+                   [+c, 0, +a, +b],
+                   [+c, 0, +a, -b],
+                   [+c, 0, -a, +b],
+                   [+c, 0, -a, -b],
+                   [0, +a, +c, +b],
+                   [0, +a, +c, -b],
+                   [0, +a, -c, +b],
+                   [0, +a, -c, -b],
+                   [0, +b, +a, +c],
+                   [0, +b, +a, -c],
+                   [0, +b, -a, +c],
+                   [0, +b, -a, -c],
+                   [0, +c, +b, +a],
+                   [0, +c, +b, -a],
+                   [0, +c, -b, +a],
+                   [0, +c, -b, -a]])
+    return cls.from_quat(np.concatenate((g1, g2)))
+
+
+def octahedral(cls):
+    g1 = tetrahedral(cls).as_quat()
+    c = np.sqrt(2) / 2
+    g2 = np.array([[+c, 0, 0, +c],
+                   [0, +c, 0, +c],
+                   [0, 0, +c, +c],
+                   [0, 0, -c, +c],
+                   [0, -c, 0, +c],
+                   [-c, 0, 0, +c],
+                   [0, +c, +c, 0],
+                   [0, -c, +c, 0],
+                   [+c, 0, +c, 0],
+                   [-c, 0, +c, 0],
+                   [+c, +c, 0, 0],
+                   [-c, +c, 0, 0]])
+    return cls.from_quat(np.concatenate((g1, g2)))
+
+
+def tetrahedral(cls):
+    g1 = np.eye(4)
+    c = 0.5
+    g2 = np.array([[c, -c, -c, +c],
+                   [c, -c, +c, +c],
+                   [c, +c, -c, +c],
+                   [c, +c, +c, +c],
+                   [c, -c, -c, -c],
+                   [c, -c, +c, -c],
+                   [c, +c, -c, -c],
+                   [c, +c, +c, -c]])
+    return cls.from_quat(np.concatenate((g1, g2)))
+
+
+def dicyclic(cls, n, axis=2):
+    g1 = cyclic(cls, n, axis).as_rotvec()
+
+    thetas = np.linspace(0, np.pi, n, endpoint=False)
+    rv = np.pi * np.vstack([np.zeros(n), np.cos(thetas), np.sin(thetas)]).T
+    g2 = np.roll(rv, axis, axis=1)
+    return cls.from_rotvec(np.concatenate((g1, g2)))
+
+
+def cyclic(cls, n, axis=2):
+    thetas = np.linspace(0, 2 * np.pi, n, endpoint=False)
+    rv = np.vstack([thetas, np.zeros(n), np.zeros(n)]).T
+    return cls.from_rotvec(np.roll(rv, axis, axis=1))
+
+
+def create_group(cls, group, axis='Z'):
+    if not isinstance(group, str):
+        raise ValueError("`group` argument must be a string")
+
+    permitted_axes = ['x', 'y', 'z', 'X', 'Y', 'Z']
+    if axis not in permitted_axes:
+        raise ValueError("`axis` must be one of " + ", ".join(permitted_axes))
+
+    if group in ['I', 'O', 'T']:
+        symbol = group
+        order = 1
+    elif group[:1] in ['C', 'D'] and group[1:].isdigit():
+        symbol = group[:1]
+        order = int(group[1:])
+    else:
+        raise ValueError("`group` must be one of 'I', 'O', 'T', 'Dn', 'Cn'")
+
+    if order < 1:
+        raise ValueError("Group order must be positive")
+
+    axis = 'xyz'.index(axis.lower())
+    if symbol == 'I':
+        return icosahedral(cls)
+    elif symbol == 'O':
+        return octahedral(cls)
+    elif symbol == 'T':
+        return tetrahedral(cls)
+    elif symbol == 'D':
+        return dicyclic(cls, order, axis=axis)
+    elif symbol == 'C':
+        return cyclic(cls, order, axis=axis)
+    else:
+        assert False
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_spline.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_spline.py
new file mode 100644
index 0000000000000000000000000000000000000000..867b724fdf449b2e60dd5fbec8a72ce6eb73c22d
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/_rotation_spline.py
@@ -0,0 +1,460 @@
+import numpy as np
+from scipy.linalg import solve_banded
+from ._rotation import Rotation
+
+
+def _create_skew_matrix(x):
+    """Create skew-symmetric matrices corresponding to vectors.
+
+    Parameters
+    ----------
+    x : ndarray, shape (n, 3)
+        Set of vectors.
+
+    Returns
+    -------
+    ndarray, shape (n, 3, 3)
+    """
+    result = np.zeros((len(x), 3, 3))
+    result[:, 0, 1] = -x[:, 2]
+    result[:, 0, 2] = x[:, 1]
+    result[:, 1, 0] = x[:, 2]
+    result[:, 1, 2] = -x[:, 0]
+    result[:, 2, 0] = -x[:, 1]
+    result[:, 2, 1] = x[:, 0]
+    return result
+
+
+def _matrix_vector_product_of_stacks(A, b):
+    """Compute the product of stack of matrices and vectors."""
+    return np.einsum("ijk,ik->ij", A, b)
+
+
+def _angular_rate_to_rotvec_dot_matrix(rotvecs):
+    """Compute matrices to transform angular rates to rot. vector derivatives.
+
+    The matrices depend on the current attitude represented as a rotation
+    vector.
+
+    Parameters
+    ----------
+    rotvecs : ndarray, shape (n, 3)
+        Set of rotation vectors.
+
+    Returns
+    -------
+    ndarray, shape (n, 3, 3)
+    """
+    norm = np.linalg.norm(rotvecs, axis=1)
+    k = np.empty_like(norm)
+
+    mask = norm > 1e-4
+    nm = norm[mask]
+    k[mask] = (1 - 0.5 * nm / np.tan(0.5 * nm)) / nm**2
+    mask = ~mask
+    nm = norm[mask]
+    k[mask] = 1/12 + 1/720 * nm**2
+
+    skew = _create_skew_matrix(rotvecs)
+
+    result = np.empty((len(rotvecs), 3, 3))
+    result[:] = np.identity(3)
+    result[:] += 0.5 * skew
+    result[:] += k[:, None, None] * np.matmul(skew, skew)
+
+    return result
+
+
+def _rotvec_dot_to_angular_rate_matrix(rotvecs):
+    """Compute matrices to transform rot. vector derivatives to angular rates.
+
+    The matrices depend on the current attitude represented as a rotation
+    vector.
+
+    Parameters
+    ----------
+    rotvecs : ndarray, shape (n, 3)
+        Set of rotation vectors.
+
+    Returns
+    -------
+    ndarray, shape (n, 3, 3)
+    """
+    norm = np.linalg.norm(rotvecs, axis=1)
+    k1 = np.empty_like(norm)
+    k2 = np.empty_like(norm)
+
+    mask = norm > 1e-4
+    nm = norm[mask]
+    k1[mask] = (1 - np.cos(nm)) / nm ** 2
+    k2[mask] = (nm - np.sin(nm)) / nm ** 3
+
+    mask = ~mask
+    nm = norm[mask]
+    k1[mask] = 0.5 - nm ** 2 / 24
+    k2[mask] = 1 / 6 - nm ** 2 / 120
+
+    skew = _create_skew_matrix(rotvecs)
+
+    result = np.empty((len(rotvecs), 3, 3))
+    result[:] = np.identity(3)
+    result[:] -= k1[:, None, None] * skew
+    result[:] += k2[:, None, None] * np.matmul(skew, skew)
+
+    return result
+
+
+def _angular_acceleration_nonlinear_term(rotvecs, rotvecs_dot):
+    """Compute the non-linear term in angular acceleration.
+
+    The angular acceleration contains a quadratic term with respect to
+    the derivative of the rotation vector. This function computes that.
+
+    Parameters
+    ----------
+    rotvecs : ndarray, shape (n, 3)
+        Set of rotation vectors.
+    rotvecs_dot : ndarray, shape (n, 3)
+        Set of rotation vector derivatives.
+
+    Returns
+    -------
+    ndarray, shape (n, 3)
+    """
+    norm = np.linalg.norm(rotvecs, axis=1)
+    dp = np.sum(rotvecs * rotvecs_dot, axis=1)
+    cp = np.cross(rotvecs, rotvecs_dot)
+    ccp = np.cross(rotvecs, cp)
+    dccp = np.cross(rotvecs_dot, cp)
+
+    k1 = np.empty_like(norm)
+    k2 = np.empty_like(norm)
+    k3 = np.empty_like(norm)
+
+    mask = norm > 1e-4
+    nm = norm[mask]
+    k1[mask] = (-nm * np.sin(nm) - 2 * (np.cos(nm) - 1)) / nm ** 4
+    k2[mask] = (-2 * nm + 3 * np.sin(nm) - nm * np.cos(nm)) / nm ** 5
+    k3[mask] = (nm - np.sin(nm)) / nm ** 3
+
+    mask = ~mask
+    nm = norm[mask]
+    k1[mask] = 1/12 - nm ** 2 / 180
+    k2[mask] = -1/60 + nm ** 2 / 12604
+    k3[mask] = 1/6 - nm ** 2 / 120
+
+    dp = dp[:, None]
+    k1 = k1[:, None]
+    k2 = k2[:, None]
+    k3 = k3[:, None]
+
+    return dp * (k1 * cp + k2 * ccp) + k3 * dccp
+
+
+def _compute_angular_rate(rotvecs, rotvecs_dot):
+    """Compute angular rates given rotation vectors and its derivatives.
+
+    Parameters
+    ----------
+    rotvecs : ndarray, shape (n, 3)
+        Set of rotation vectors.
+    rotvecs_dot : ndarray, shape (n, 3)
+        Set of rotation vector derivatives.
+
+    Returns
+    -------
+    ndarray, shape (n, 3)
+    """
+    return _matrix_vector_product_of_stacks(
+        _rotvec_dot_to_angular_rate_matrix(rotvecs), rotvecs_dot)
+
+
+def _compute_angular_acceleration(rotvecs, rotvecs_dot, rotvecs_dot_dot):
+    """Compute angular acceleration given rotation vector and its derivatives.
+
+    Parameters
+    ----------
+    rotvecs : ndarray, shape (n, 3)
+        Set of rotation vectors.
+    rotvecs_dot : ndarray, shape (n, 3)
+        Set of rotation vector derivatives.
+    rotvecs_dot_dot : ndarray, shape (n, 3)
+        Set of rotation vector second derivatives.
+
+    Returns
+    -------
+    ndarray, shape (n, 3)
+    """
+    return (_compute_angular_rate(rotvecs, rotvecs_dot_dot) +
+            _angular_acceleration_nonlinear_term(rotvecs, rotvecs_dot))
+
+
+def _create_block_3_diagonal_matrix(A, B, d):
+    """Create a 3-diagonal block matrix as banded.
+
+    The matrix has the following structure:
+
+        DB...
+        ADB..
+        .ADB.
+        ..ADB
+        ...AD
+
+    The blocks A, B and D are 3-by-3 matrices. The D matrices has the form
+    d * I.
+
+    Parameters
+    ----------
+    A : ndarray, shape (n, 3, 3)
+        Stack of A blocks.
+    B : ndarray, shape (n, 3, 3)
+        Stack of B blocks.
+    d : ndarray, shape (n + 1,)
+        Values for diagonal blocks.
+
+    Returns
+    -------
+    ndarray, shape (11, 3 * (n + 1))
+        Matrix in the banded form as used by `scipy.linalg.solve_banded`.
+    """
+    ind = np.arange(3)
+    ind_blocks = np.arange(len(A))
+
+    A_i = np.empty_like(A, dtype=int)
+    A_i[:] = ind[:, None]
+    A_i += 3 * (1 + ind_blocks[:, None, None])
+
+    A_j = np.empty_like(A, dtype=int)
+    A_j[:] = ind
+    A_j += 3 * ind_blocks[:, None, None]
+
+    B_i = np.empty_like(B, dtype=int)
+    B_i[:] = ind[:, None]
+    B_i += 3 * ind_blocks[:, None, None]
+
+    B_j = np.empty_like(B, dtype=int)
+    B_j[:] = ind
+    B_j += 3 * (1 + ind_blocks[:, None, None])
+
+    diag_i = diag_j = np.arange(3 * len(d))
+    i = np.hstack((A_i.ravel(), B_i.ravel(), diag_i))
+    j = np.hstack((A_j.ravel(), B_j.ravel(), diag_j))
+    values = np.hstack((A.ravel(), B.ravel(), np.repeat(d, 3)))
+
+    u = 5
+    l = 5
+    result = np.zeros((u + l + 1, 3 * len(d)))
+    result[u + i - j, j] = values
+    return result
+
+
+class RotationSpline:
+    """Interpolate rotations with continuous angular rate and acceleration.
+
+    The rotation vectors between each consecutive orientation are cubic
+    functions of time and it is guaranteed that angular rate and acceleration
+    are continuous. Such interpolation are analogous to cubic spline
+    interpolation.
+
+    Refer to [1]_ for math and implementation details.
+
+    Parameters
+    ----------
+    times : array_like, shape (N,)
+        Times of the known rotations. At least 2 times must be specified.
+    rotations : `Rotation` instance
+        Rotations to perform the interpolation between. Must contain N
+        rotations.
+
+    Methods
+    -------
+    __call__
+
+    References
+    ----------
+    .. [1] `Smooth Attitude Interpolation
+            `_
+
+    Examples
+    --------
+    >>> from scipy.spatial.transform import Rotation, RotationSpline
+    >>> import numpy as np
+
+    Define the sequence of times and rotations from the Euler angles:
+
+    >>> times = [0, 10, 20, 40]
+    >>> angles = [[-10, 20, 30], [0, 15, 40], [-30, 45, 30], [20, 45, 90]]
+    >>> rotations = Rotation.from_euler('XYZ', angles, degrees=True)
+
+    Create the interpolator object:
+
+    >>> spline = RotationSpline(times, rotations)
+
+    Interpolate the Euler angles, angular rate and acceleration:
+
+    >>> angular_rate = np.rad2deg(spline(times, 1))
+    >>> angular_acceleration = np.rad2deg(spline(times, 2))
+    >>> times_plot = np.linspace(times[0], times[-1], 100)
+    >>> angles_plot = spline(times_plot).as_euler('XYZ', degrees=True)
+    >>> angular_rate_plot = np.rad2deg(spline(times_plot, 1))
+    >>> angular_acceleration_plot = np.rad2deg(spline(times_plot, 2))
+
+    On this plot you see that Euler angles are continuous and smooth:
+
+    >>> import matplotlib.pyplot as plt
+    >>> plt.plot(times_plot, angles_plot)
+    >>> plt.plot(times, angles, 'x')
+    >>> plt.title("Euler angles")
+    >>> plt.show()
+
+    The angular rate is also smooth:
+
+    >>> plt.plot(times_plot, angular_rate_plot)
+    >>> plt.plot(times, angular_rate, 'x')
+    >>> plt.title("Angular rate")
+    >>> plt.show()
+
+    The angular acceleration is continuous, but not smooth. Also note that
+    the angular acceleration is not a piecewise-linear function, because
+    it is different from the second derivative of the rotation vector (which
+    is a piecewise-linear function as in the cubic spline).
+
+    >>> plt.plot(times_plot, angular_acceleration_plot)
+    >>> plt.plot(times, angular_acceleration, 'x')
+    >>> plt.title("Angular acceleration")
+    >>> plt.show()
+    """
+    # Parameters for the solver for angular rate.
+    MAX_ITER = 10
+    TOL = 1e-9
+
+    def _solve_for_angular_rates(self, dt, angular_rates, rotvecs):
+        angular_rate_first = angular_rates[0].copy()
+
+        A = _angular_rate_to_rotvec_dot_matrix(rotvecs)
+        A_inv = _rotvec_dot_to_angular_rate_matrix(rotvecs)
+        M = _create_block_3_diagonal_matrix(
+            2 * A_inv[1:-1] / dt[1:-1, None, None],
+            2 * A[1:-1] / dt[1:-1, None, None],
+            4 * (1 / dt[:-1] + 1 / dt[1:]))
+
+        b0 = 6 * (rotvecs[:-1] * dt[:-1, None] ** -2 +
+                  rotvecs[1:] * dt[1:, None] ** -2)
+        b0[0] -= 2 / dt[0] * A_inv[0].dot(angular_rate_first)
+        b0[-1] -= 2 / dt[-1] * A[-1].dot(angular_rates[-1])
+
+        for iteration in range(self.MAX_ITER):
+            rotvecs_dot = _matrix_vector_product_of_stacks(A, angular_rates)
+            delta_beta = _angular_acceleration_nonlinear_term(
+                rotvecs[:-1], rotvecs_dot[:-1])
+            b = b0 - delta_beta
+            angular_rates_new = solve_banded((5, 5), M, b.ravel())
+            angular_rates_new = angular_rates_new.reshape((-1, 3))
+
+            delta = np.abs(angular_rates_new - angular_rates[:-1])
+            angular_rates[:-1] = angular_rates_new
+            if np.all(delta < self.TOL * (1 + np.abs(angular_rates_new))):
+                break
+
+        rotvecs_dot = _matrix_vector_product_of_stacks(A, angular_rates)
+        angular_rates = np.vstack((angular_rate_first, angular_rates[:-1]))
+
+        return angular_rates, rotvecs_dot
+
+    def __init__(self, times, rotations):
+        from scipy.interpolate import PPoly
+
+        if rotations.single:
+            raise ValueError("`rotations` must be a sequence of rotations.")
+
+        if len(rotations) == 1:
+            raise ValueError("`rotations` must contain at least 2 rotations.")
+
+        times = np.asarray(times, dtype=float)
+        if times.ndim != 1:
+            raise ValueError("`times` must be 1-dimensional.")
+
+        if len(times) != len(rotations):
+            raise ValueError("Expected number of rotations to be equal to "
+                             "number of timestamps given, "
+                             f"got {len(rotations)} rotations "
+                             f"and {len(times)} timestamps.")
+
+        dt = np.diff(times)
+        if np.any(dt <= 0):
+            raise ValueError("Values in `times` must be in a strictly "
+                             "increasing order.")
+
+        rotvecs = (rotations[:-1].inv() * rotations[1:]).as_rotvec()
+        angular_rates = rotvecs / dt[:, None]
+
+        if len(rotations) == 2:
+            rotvecs_dot = angular_rates
+        else:
+            angular_rates, rotvecs_dot = self._solve_for_angular_rates(
+                dt, angular_rates, rotvecs)
+
+        dt = dt[:, None]
+        coeff = np.empty((4, len(times) - 1, 3))
+        coeff[0] = (-2 * rotvecs + dt * angular_rates
+                    + dt * rotvecs_dot) / dt ** 3
+        coeff[1] = (3 * rotvecs - 2 * dt * angular_rates
+                    - dt * rotvecs_dot) / dt ** 2
+        coeff[2] = angular_rates
+        coeff[3] = 0
+
+        self.times = times
+        self.rotations = rotations
+        self.interpolator = PPoly(coeff, times)
+
+    def __call__(self, times, order=0):
+        """Compute interpolated values.
+
+        Parameters
+        ----------
+        times : float or array_like
+            Times of interest.
+        order : {0, 1, 2}, optional
+            Order of differentiation:
+
+                * 0 (default) : return Rotation
+                * 1 : return the angular rate in rad/sec
+                * 2 : return the angular acceleration in rad/sec/sec
+
+        Returns
+        -------
+        Interpolated Rotation, angular rate or acceleration.
+        """
+        if order not in [0, 1, 2]:
+            raise ValueError("`order` must be 0, 1 or 2.")
+
+        times = np.asarray(times, dtype=float)
+        if times.ndim > 1:
+            raise ValueError("`times` must be at most 1-dimensional.")
+
+        singe_time = times.ndim == 0
+        times = np.atleast_1d(times)
+
+        rotvecs = self.interpolator(times)
+        if order == 0:
+            index = np.searchsorted(self.times, times, side='right')
+            index -= 1
+            index[index < 0] = 0
+            n_segments = len(self.times) - 1
+            index[index > n_segments - 1] = n_segments - 1
+            result = self.rotations[index] * Rotation.from_rotvec(rotvecs)
+        elif order == 1:
+            rotvecs_dot = self.interpolator(times, 1)
+            result = _compute_angular_rate(rotvecs, rotvecs_dot)
+        elif order == 2:
+            rotvecs_dot = self.interpolator(times, 1)
+            rotvecs_dot_dot = self.interpolator(times, 2)
+            result = _compute_angular_acceleration(rotvecs, rotvecs_dot,
+                                                   rotvecs_dot_dot)
+        else:
+            assert False
+
+        if singe_time:
+            result = result[0]
+
+        return result
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/rotation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/rotation.py
new file mode 100644
index 0000000000000000000000000000000000000000..a719437415124f4afc842b98c708836c1fe68f22
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/rotation.py
@@ -0,0 +1,21 @@
+# This file is not meant for public use and will be removed in SciPy v2.0.0.
+# Use the `scipy.spatial` namespace for importing the functions
+# included below.
+
+from scipy._lib.deprecation import _sub_module_deprecation
+
+
+__all__ = [  # noqa: F822
+    'Rotation',
+    'Slerp',
+]
+
+
+def __dir__():
+    return __all__
+
+
+def __getattr__(name):
+    return _sub_module_deprecation(sub_package="spatial.transform", module="rotation",
+                                   private_modules=["_rotation"], all=__all__,
+                                   attribute=name)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/__init__.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ccd215de9322fda7d09ade0e1355756ed0f11bd
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation.py
@@ -0,0 +1,2188 @@
+import pytest
+
+import numpy as np
+from numpy.testing import assert_equal, assert_array_almost_equal
+from numpy.testing import assert_allclose
+from scipy.spatial.transform import Rotation, Slerp
+from scipy.stats import special_ortho_group
+from itertools import permutations
+
+import pickle
+import copy
+
+def basis_vec(axis):
+    if axis == 'x':
+        return [1, 0, 0]
+    elif axis == 'y':
+        return [0, 1, 0]
+    elif axis == 'z':
+        return [0, 0, 1]
+
+def test_generic_quat_matrix():
+    x = np.array([[3, 4, 0, 0], [5, 12, 0, 0]])
+    r = Rotation.from_quat(x)
+    expected_quat = x / np.array([[5], [13]])
+    assert_array_almost_equal(r.as_quat(), expected_quat)
+
+
+def test_from_single_1d_quaternion():
+    x = np.array([3, 4, 0, 0])
+    r = Rotation.from_quat(x)
+    expected_quat = x / 5
+    assert_array_almost_equal(r.as_quat(), expected_quat)
+
+
+def test_from_single_2d_quaternion():
+    x = np.array([[3, 4, 0, 0]])
+    r = Rotation.from_quat(x)
+    expected_quat = x / 5
+    assert_array_almost_equal(r.as_quat(), expected_quat)
+
+
+def test_from_quat_scalar_first():
+    rng = np.random.RandomState(0)
+
+    r = Rotation.from_quat([1, 0, 0, 0], scalar_first=True)
+    assert_allclose(r.as_matrix(), np.eye(3), rtol=1e-15, atol=1e-16)
+
+    r = Rotation.from_quat(np.tile([1, 0, 0, 0], (10, 1)), scalar_first=True)
+    assert_allclose(r.as_matrix(), np.tile(np.eye(3), (10, 1, 1)),
+                    rtol=1e-15, atol=1e-16)
+
+    q = rng.randn(100, 4)
+    q /= np.linalg.norm(q, axis=1)[:, None]
+    for qi in q:
+        r = Rotation.from_quat(qi, scalar_first=True)
+        assert_allclose(np.roll(r.as_quat(), 1), qi, rtol=1e-15)
+
+    r = Rotation.from_quat(q, scalar_first=True)
+    assert_allclose(np.roll(r.as_quat(), 1, axis=1), q, rtol=1e-15)
+
+
+def test_as_quat_scalar_first():
+    rng = np.random.RandomState(0)
+
+    r = Rotation.from_euler('xyz', np.zeros(3))
+    assert_allclose(r.as_quat(scalar_first=True), [1, 0, 0, 0],
+                    rtol=1e-15, atol=1e-16)
+
+    r = Rotation.from_euler('xyz', np.zeros((10, 3)))
+    assert_allclose(r.as_quat(scalar_first=True),
+                    np.tile([1, 0, 0, 0], (10, 1)), rtol=1e-15, atol=1e-16)
+
+    q = rng.randn(100, 4)
+    q /= np.linalg.norm(q, axis=1)[:, None]
+    for qi in q:
+        r = Rotation.from_quat(qi)
+        assert_allclose(r.as_quat(scalar_first=True), np.roll(qi, 1),
+                        rtol=1e-15)
+
+        assert_allclose(r.as_quat(canonical=True, scalar_first=True),
+                        np.roll(r.as_quat(canonical=True), 1),
+                        rtol=1e-15)
+
+    r = Rotation.from_quat(q)
+    assert_allclose(r.as_quat(scalar_first=True), np.roll(q, 1, axis=1),
+                    rtol=1e-15)
+
+    assert_allclose(r.as_quat(canonical=True, scalar_first=True),
+                    np.roll(r.as_quat(canonical=True), 1, axis=1), rtol=1e-15)
+
+
+def test_from_square_quat_matrix():
+    # Ensure proper norm array broadcasting
+    x = np.array([
+        [3, 0, 0, 4],
+        [5, 0, 12, 0],
+        [0, 0, 0, 1],
+        [-1, -1, -1, 1],
+        [0, 0, 0, -1],  # Check double cover
+        [-1, -1, -1, -1]  # Check double cover
+        ])
+    r = Rotation.from_quat(x)
+    expected_quat = x / np.array([[5], [13], [1], [2], [1], [2]])
+    assert_array_almost_equal(r.as_quat(), expected_quat)
+
+
+def test_quat_double_to_canonical_single_cover():
+    x = np.array([
+        [-1, 0, 0, 0],
+        [0, -1, 0, 0],
+        [0, 0, -1, 0],
+        [0, 0, 0, -1],
+        [-1, -1, -1, -1]
+        ])
+    r = Rotation.from_quat(x)
+    expected_quat = np.abs(x) / np.linalg.norm(x, axis=1)[:, None]
+    assert_allclose(r.as_quat(canonical=True), expected_quat)
+
+
+def test_quat_double_cover():
+    # See the Rotation.from_quat() docstring for scope of the quaternion
+    # double cover property.
+    # Check from_quat and as_quat(canonical=False)
+    q = np.array([0, 0, 0, -1])
+    r = Rotation.from_quat(q)
+    assert_equal(q, r.as_quat(canonical=False))
+
+    # Check composition and inverse
+    q = np.array([1, 0, 0, 1])/np.sqrt(2)  # 90 deg rotation about x
+    r = Rotation.from_quat(q)
+    r3 = r*r*r
+    assert_allclose(r.as_quat(canonical=False)*np.sqrt(2),
+                    [1, 0, 0, 1])
+    assert_allclose(r.inv().as_quat(canonical=False)*np.sqrt(2),
+                    [-1, 0, 0, 1])
+    assert_allclose(r3.as_quat(canonical=False)*np.sqrt(2),
+                    [1, 0, 0, -1])
+    assert_allclose(r3.inv().as_quat(canonical=False)*np.sqrt(2),
+                    [-1, 0, 0, -1])
+
+    # More sanity checks
+    assert_allclose((r*r.inv()).as_quat(canonical=False),
+                    [0, 0, 0, 1], atol=2e-16)
+    assert_allclose((r3*r3.inv()).as_quat(canonical=False),
+                    [0, 0, 0, 1], atol=2e-16)
+    assert_allclose((r*r3).as_quat(canonical=False),
+                    [0, 0, 0, -1], atol=2e-16)
+    assert_allclose((r.inv()*r3.inv()).as_quat(canonical=False),
+                    [0, 0, 0, -1], atol=2e-16)
+
+
+def test_from_quat_wrong_shape():
+    # Wrong shape 1d array
+    with pytest.raises(ValueError, match='Expected `quat` to have shape'):
+        Rotation.from_quat(np.array([1, 2, 3]))
+
+    # Wrong shape 2d array
+    with pytest.raises(ValueError, match='Expected `quat` to have shape'):
+        Rotation.from_quat(np.array([
+            [1, 2, 3, 4, 5],
+            [4, 5, 6, 7, 8]
+            ]))
+
+    # 3d array
+    with pytest.raises(ValueError, match='Expected `quat` to have shape'):
+        Rotation.from_quat(np.array([
+            [[1, 2, 3, 4]],
+            [[4, 5, 6, 7]]
+            ]))
+
+
+def test_zero_norms_from_quat():
+    x = np.array([
+            [3, 4, 0, 0],
+            [0, 0, 0, 0],
+            [5, 0, 12, 0]
+            ])
+    with pytest.raises(ValueError):
+        Rotation.from_quat(x)
+
+
+def test_as_matrix_single_1d_quaternion():
+    quat = [0, 0, 0, 1]
+    mat = Rotation.from_quat(quat).as_matrix()
+    # mat.shape == (3,3) due to 1d input
+    assert_array_almost_equal(mat, np.eye(3))
+
+
+def test_as_matrix_single_2d_quaternion():
+    quat = [[0, 0, 1, 1]]
+    mat = Rotation.from_quat(quat).as_matrix()
+    assert_equal(mat.shape, (1, 3, 3))
+    expected_mat = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+        ])
+    assert_array_almost_equal(mat[0], expected_mat)
+
+
+def test_as_matrix_from_square_input():
+    quats = [
+            [0, 0, 1, 1],
+            [0, 1, 0, 1],
+            [0, 0, 0, 1],
+            [0, 0, 0, -1]
+            ]
+    mat = Rotation.from_quat(quats).as_matrix()
+    assert_equal(mat.shape, (4, 3, 3))
+
+    expected0 = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+        ])
+    assert_array_almost_equal(mat[0], expected0)
+
+    expected1 = np.array([
+        [0, 0, 1],
+        [0, 1, 0],
+        [-1, 0, 0]
+        ])
+    assert_array_almost_equal(mat[1], expected1)
+
+    assert_array_almost_equal(mat[2], np.eye(3))
+    assert_array_almost_equal(mat[3], np.eye(3))
+
+
+def test_as_matrix_from_generic_input():
+    quats = [
+            [0, 0, 1, 1],
+            [0, 1, 0, 1],
+            [1, 2, 3, 4]
+            ]
+    mat = Rotation.from_quat(quats).as_matrix()
+    assert_equal(mat.shape, (3, 3, 3))
+
+    expected0 = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+        ])
+    assert_array_almost_equal(mat[0], expected0)
+
+    expected1 = np.array([
+        [0, 0, 1],
+        [0, 1, 0],
+        [-1, 0, 0]
+        ])
+    assert_array_almost_equal(mat[1], expected1)
+
+    expected2 = np.array([
+        [0.4, -2, 2.2],
+        [2.8, 1, 0.4],
+        [-1, 2, 2]
+        ]) / 3
+    assert_array_almost_equal(mat[2], expected2)
+
+
+def test_from_single_2d_matrix():
+    mat = [
+            [0, 0, 1],
+            [1, 0, 0],
+            [0, 1, 0]
+            ]
+    expected_quat = [0.5, 0.5, 0.5, 0.5]
+    assert_array_almost_equal(
+            Rotation.from_matrix(mat).as_quat(),
+            expected_quat)
+
+
+def test_from_single_3d_matrix():
+    mat = np.array([
+        [0, 0, 1],
+        [1, 0, 0],
+        [0, 1, 0]
+        ]).reshape((1, 3, 3))
+    expected_quat = np.array([0.5, 0.5, 0.5, 0.5]).reshape((1, 4))
+    assert_array_almost_equal(
+            Rotation.from_matrix(mat).as_quat(),
+            expected_quat)
+
+
+def test_from_matrix_calculation():
+    expected_quat = np.array([1, 1, 6, 1]) / np.sqrt(39)
+    mat = np.array([
+            [-0.8974359, -0.2564103, 0.3589744],
+            [0.3589744, -0.8974359, 0.2564103],
+            [0.2564103, 0.3589744, 0.8974359]
+            ])
+    assert_array_almost_equal(
+            Rotation.from_matrix(mat).as_quat(),
+            expected_quat)
+    assert_array_almost_equal(
+            Rotation.from_matrix(mat.reshape((1, 3, 3))).as_quat(),
+            expected_quat.reshape((1, 4)))
+
+
+def test_matrix_calculation_pipeline():
+    mat = special_ortho_group.rvs(3, size=10, random_state=0)
+    assert_array_almost_equal(Rotation.from_matrix(mat).as_matrix(), mat)
+
+
+def test_from_matrix_ortho_output():
+    rnd = np.random.RandomState(0)
+    mat = rnd.random_sample((100, 3, 3))
+    dets = np.linalg.det(mat)
+    for i in range(len(dets)):
+        # Make sure we have a right-handed rotation matrix
+        if dets[i] < 0:
+            mat[i] = -mat[i]
+    ortho_mat = Rotation.from_matrix(mat).as_matrix()
+
+    mult_result = np.einsum('...ij,...jk->...ik', ortho_mat,
+                            ortho_mat.transpose((0, 2, 1)))
+
+    eye3d = np.zeros((100, 3, 3))
+    for i in range(3):
+        eye3d[:, i, i] = 1.0
+
+    assert_array_almost_equal(mult_result, eye3d)
+
+
+def test_from_matrix_normalize():
+    mat = np.array([
+        [1, 1, 0],
+        [0, 1, 0],
+        [0, 0, 1]])
+    expected = np.array([[ 0.894427, 0.447214, 0.0],
+                         [-0.447214, 0.894427, 0.0],
+                         [ 0.0,      0.0,      1.0]])
+    assert_allclose(Rotation.from_matrix(mat).as_matrix(), expected, atol=1e-6)
+
+    mat = np.array([
+        [0,  -0.5, 0  ],
+        [0.5, 0  , 0  ],
+        [0,   0  , 0.5]])
+    expected = np.array([[ 0, -1, 0],
+                         [ 1,  0, 0],
+                         [ 0,  0, 1]])
+    assert_allclose(Rotation.from_matrix(mat).as_matrix(), expected, atol=1e-6)
+
+
+def test_from_matrix_non_positive_determinant():
+    mat = np.eye(3)
+    mat[0, 0] = 0
+    with pytest.raises(ValueError, match='Non-positive determinant'):
+        Rotation.from_matrix(mat)
+
+    mat[0, 0] = -1
+    with pytest.raises(ValueError, match='Non-positive determinant'):
+        Rotation.from_matrix(mat)
+
+
+def test_from_1d_single_rotvec():
+    rotvec = [1, 0, 0]
+    expected_quat = np.array([0.4794255, 0, 0, 0.8775826])
+    result = Rotation.from_rotvec(rotvec)
+    assert_array_almost_equal(result.as_quat(), expected_quat)
+
+
+def test_from_2d_single_rotvec():
+    rotvec = [[1, 0, 0]]
+    expected_quat = np.array([[0.4794255, 0, 0, 0.8775826]])
+    result = Rotation.from_rotvec(rotvec)
+    assert_array_almost_equal(result.as_quat(), expected_quat)
+
+
+def test_from_generic_rotvec():
+    rotvec = [
+            [1, 2, 2],
+            [1, -1, 0.5],
+            [0, 0, 0]
+            ]
+    expected_quat = np.array([
+        [0.3324983, 0.6649967, 0.6649967, 0.0707372],
+        [0.4544258, -0.4544258, 0.2272129, 0.7316889],
+        [0, 0, 0, 1]
+        ])
+    assert_array_almost_equal(
+            Rotation.from_rotvec(rotvec).as_quat(),
+            expected_quat)
+
+
+def test_from_rotvec_small_angle():
+    rotvec = np.array([
+        [5e-4 / np.sqrt(3), -5e-4 / np.sqrt(3), 5e-4 / np.sqrt(3)],
+        [0.2, 0.3, 0.4],
+        [0, 0, 0]
+        ])
+
+    quat = Rotation.from_rotvec(rotvec).as_quat()
+    # cos(theta/2) ~~ 1 for small theta
+    assert_allclose(quat[0, 3], 1)
+    # sin(theta/2) / theta ~~ 0.5 for small theta
+    assert_allclose(quat[0, :3], rotvec[0] * 0.5)
+
+    assert_allclose(quat[1, 3], 0.9639685)
+    assert_allclose(
+            quat[1, :3],
+            np.array([
+                0.09879603932153465,
+                0.14819405898230198,
+                0.19759207864306931
+                ]))
+
+    assert_equal(quat[2], np.array([0, 0, 0, 1]))
+
+
+def test_degrees_from_rotvec():
+    rotvec1 = [1.0 / np.cbrt(3), 1.0 / np.cbrt(3), 1.0 / np.cbrt(3)]
+    rot1 = Rotation.from_rotvec(rotvec1, degrees=True)
+    quat1 = rot1.as_quat()
+
+    rotvec2 = np.deg2rad(rotvec1)
+    rot2 = Rotation.from_rotvec(rotvec2)
+    quat2 = rot2.as_quat()
+
+    assert_allclose(quat1, quat2)
+
+
+def test_malformed_1d_from_rotvec():
+    with pytest.raises(ValueError, match='Expected `rot_vec` to have shape'):
+        Rotation.from_rotvec([1, 2])
+
+
+def test_malformed_2d_from_rotvec():
+    with pytest.raises(ValueError, match='Expected `rot_vec` to have shape'):
+        Rotation.from_rotvec([
+            [1, 2, 3, 4],
+            [5, 6, 7, 8]
+            ])
+
+
+def test_as_generic_rotvec():
+    quat = np.array([
+            [1, 2, -1, 0.5],
+            [1, -1, 1, 0.0003],
+            [0, 0, 0, 1]
+            ])
+    quat /= np.linalg.norm(quat, axis=1)[:, None]
+
+    rotvec = Rotation.from_quat(quat).as_rotvec()
+    angle = np.linalg.norm(rotvec, axis=1)
+
+    assert_allclose(quat[:, 3], np.cos(angle/2))
+    assert_allclose(np.cross(rotvec, quat[:, :3]), np.zeros((3, 3)))
+
+
+def test_as_rotvec_single_1d_input():
+    quat = np.array([1, 2, -3, 2])
+    expected_rotvec = np.array([0.5772381, 1.1544763, -1.7317144])
+
+    actual_rotvec = Rotation.from_quat(quat).as_rotvec()
+
+    assert_equal(actual_rotvec.shape, (3,))
+    assert_allclose(actual_rotvec, expected_rotvec)
+
+
+def test_as_rotvec_single_2d_input():
+    quat = np.array([[1, 2, -3, 2]])
+    expected_rotvec = np.array([[0.5772381, 1.1544763, -1.7317144]])
+
+    actual_rotvec = Rotation.from_quat(quat).as_rotvec()
+
+    assert_equal(actual_rotvec.shape, (1, 3))
+    assert_allclose(actual_rotvec, expected_rotvec)
+
+
+def test_as_rotvec_degrees():
+    # x->y, y->z, z->x
+    mat = [[0, 0, 1], [1, 0, 0], [0, 1, 0]]
+    rot = Rotation.from_matrix(mat)
+    rotvec = rot.as_rotvec(degrees=True)
+    angle = np.linalg.norm(rotvec)
+    assert_allclose(angle, 120.0)
+    assert_allclose(rotvec[0], rotvec[1])
+    assert_allclose(rotvec[1], rotvec[2])
+
+
+def test_rotvec_calc_pipeline():
+    # Include small angles
+    rotvec = np.array([
+        [0, 0, 0],
+        [1, -1, 2],
+        [-3e-4, 3.5e-4, 7.5e-5]
+        ])
+    assert_allclose(Rotation.from_rotvec(rotvec).as_rotvec(), rotvec)
+    assert_allclose(Rotation.from_rotvec(rotvec, degrees=True).as_rotvec(degrees=True),
+                    rotvec)
+
+
+def test_from_1d_single_mrp():
+    mrp = [0, 0, 1.0]
+    expected_quat = np.array([0, 0, 1, 0])
+    result = Rotation.from_mrp(mrp)
+    assert_array_almost_equal(result.as_quat(), expected_quat)
+
+
+def test_from_2d_single_mrp():
+    mrp = [[0, 0, 1.0]]
+    expected_quat = np.array([[0, 0, 1, 0]])
+    result = Rotation.from_mrp(mrp)
+    assert_array_almost_equal(result.as_quat(), expected_quat)
+
+
+def test_from_generic_mrp():
+    mrp = np.array([
+        [1, 2, 2],
+        [1, -1, 0.5],
+        [0, 0, 0]])
+    expected_quat = np.array([
+        [0.2, 0.4, 0.4, -0.8],
+        [0.61538462, -0.61538462, 0.30769231, -0.38461538],
+        [0, 0, 0, 1]])
+    assert_array_almost_equal(Rotation.from_mrp(mrp).as_quat(), expected_quat)
+
+
+def test_malformed_1d_from_mrp():
+    with pytest.raises(ValueError, match='Expected `mrp` to have shape'):
+        Rotation.from_mrp([1, 2])
+
+
+def test_malformed_2d_from_mrp():
+    with pytest.raises(ValueError, match='Expected `mrp` to have shape'):
+        Rotation.from_mrp([
+            [1, 2, 3, 4],
+            [5, 6, 7, 8]
+            ])
+
+
+def test_as_generic_mrp():
+    quat = np.array([
+        [1, 2, -1, 0.5],
+        [1, -1, 1, 0.0003],
+        [0, 0, 0, 1]])
+    quat /= np.linalg.norm(quat, axis=1)[:, None]
+
+    expected_mrp = np.array([
+        [0.33333333, 0.66666667, -0.33333333],
+        [0.57725028, -0.57725028, 0.57725028],
+        [0, 0, 0]])
+    assert_array_almost_equal(Rotation.from_quat(quat).as_mrp(), expected_mrp)
+
+def test_past_180_degree_rotation():
+    # ensure that a > 180 degree rotation is returned as a <180 rotation in MRPs
+    # in this case 270 should be returned as -90
+    expected_mrp = np.array([-np.tan(np.pi/2/4), 0.0, 0])
+    assert_array_almost_equal(
+        Rotation.from_euler('xyz', [270, 0, 0], degrees=True).as_mrp(),
+        expected_mrp
+    )
+
+
+def test_as_mrp_single_1d_input():
+    quat = np.array([1, 2, -3, 2])
+    expected_mrp = np.array([0.16018862, 0.32037724, -0.48056586])
+
+    actual_mrp = Rotation.from_quat(quat).as_mrp()
+
+    assert_equal(actual_mrp.shape, (3,))
+    assert_allclose(actual_mrp, expected_mrp)
+
+
+def test_as_mrp_single_2d_input():
+    quat = np.array([[1, 2, -3, 2]])
+    expected_mrp = np.array([[0.16018862, 0.32037724, -0.48056586]])
+
+    actual_mrp = Rotation.from_quat(quat).as_mrp()
+
+    assert_equal(actual_mrp.shape, (1, 3))
+    assert_allclose(actual_mrp, expected_mrp)
+
+
+def test_mrp_calc_pipeline():
+    actual_mrp = np.array([
+        [0, 0, 0],
+        [1, -1, 2],
+        [0.41421356, 0, 0],
+        [0.1, 0.2, 0.1]])
+    expected_mrp = np.array([
+        [0, 0, 0],
+        [-0.16666667, 0.16666667, -0.33333333],
+        [0.41421356, 0, 0],
+        [0.1, 0.2, 0.1]])
+    assert_allclose(Rotation.from_mrp(actual_mrp).as_mrp(), expected_mrp)
+
+
+def test_from_euler_single_rotation():
+    quat = Rotation.from_euler('z', 90, degrees=True).as_quat()
+    expected_quat = np.array([0, 0, 1, 1]) / np.sqrt(2)
+    assert_allclose(quat, expected_quat)
+
+
+def test_single_intrinsic_extrinsic_rotation():
+    extrinsic = Rotation.from_euler('z', 90, degrees=True).as_matrix()
+    intrinsic = Rotation.from_euler('Z', 90, degrees=True).as_matrix()
+    assert_allclose(extrinsic, intrinsic)
+
+
+def test_from_euler_rotation_order():
+    # Intrinsic rotation is same as extrinsic with order reversed
+    rnd = np.random.RandomState(0)
+    a = rnd.randint(low=0, high=180, size=(6, 3))
+    b = a[:, ::-1]
+    x = Rotation.from_euler('xyz', a, degrees=True).as_quat()
+    y = Rotation.from_euler('ZYX', b, degrees=True).as_quat()
+    assert_allclose(x, y)
+
+
+def test_from_euler_elementary_extrinsic_rotation():
+    # Simple test to check if extrinsic rotations are implemented correctly
+    mat = Rotation.from_euler('zx', [90, 90], degrees=True).as_matrix()
+    expected_mat = np.array([
+        [0, -1, 0],
+        [0, 0, -1],
+        [1, 0, 0]
+    ])
+    assert_array_almost_equal(mat, expected_mat)
+
+
+def test_from_euler_intrinsic_rotation_312():
+    angles = [
+        [30, 60, 45],
+        [30, 60, 30],
+        [45, 30, 60]
+        ]
+    mat = Rotation.from_euler('ZXY', angles, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat[0], np.array([
+        [0.3061862, -0.2500000, 0.9185587],
+        [0.8838835, 0.4330127, -0.1767767],
+        [-0.3535534, 0.8660254, 0.3535534]
+    ]))
+
+    assert_array_almost_equal(mat[1], np.array([
+        [0.5334936, -0.2500000, 0.8080127],
+        [0.8080127, 0.4330127, -0.3995191],
+        [-0.2500000, 0.8660254, 0.4330127]
+    ]))
+
+    assert_array_almost_equal(mat[2], np.array([
+        [0.0473672, -0.6123725, 0.7891491],
+        [0.6597396, 0.6123725, 0.4355958],
+        [-0.7500000, 0.5000000, 0.4330127]
+    ]))
+
+
+def test_from_euler_intrinsic_rotation_313():
+    angles = [
+        [30, 60, 45],
+        [30, 60, 30],
+        [45, 30, 60]
+        ]
+    mat = Rotation.from_euler('ZXZ', angles, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat[0], np.array([
+        [0.43559574, -0.78914913, 0.4330127],
+        [0.65973961, -0.04736717, -0.750000],
+        [0.61237244, 0.61237244, 0.500000]
+    ]))
+
+    assert_array_almost_equal(mat[1], np.array([
+        [0.6250000, -0.64951905, 0.4330127],
+        [0.64951905, 0.1250000, -0.750000],
+        [0.4330127, 0.750000, 0.500000]
+    ]))
+
+    assert_array_almost_equal(mat[2], np.array([
+        [-0.1767767, -0.91855865, 0.35355339],
+        [0.88388348, -0.30618622, -0.35355339],
+        [0.4330127, 0.25000000, 0.8660254]
+    ]))
+
+
+def test_from_euler_extrinsic_rotation_312():
+    angles = [
+        [30, 60, 45],
+        [30, 60, 30],
+        [45, 30, 60]
+        ]
+    mat = Rotation.from_euler('zxy', angles, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat[0], np.array([
+        [0.91855865, 0.1767767, 0.35355339],
+        [0.25000000, 0.4330127, -0.8660254],
+        [-0.30618622, 0.88388348, 0.35355339]
+    ]))
+
+    assert_array_almost_equal(mat[1], np.array([
+        [0.96650635, -0.0580127, 0.2500000],
+        [0.25000000, 0.4330127, -0.8660254],
+        [-0.0580127, 0.89951905, 0.4330127]
+    ]))
+
+    assert_array_almost_equal(mat[2], np.array([
+        [0.65973961, -0.04736717, 0.7500000],
+        [0.61237244, 0.61237244, -0.5000000],
+        [-0.43559574, 0.78914913, 0.4330127]
+    ]))
+
+
+def test_from_euler_extrinsic_rotation_313():
+    angles = [
+        [30, 60, 45],
+        [30, 60, 30],
+        [45, 30, 60]
+        ]
+    mat = Rotation.from_euler('zxz', angles, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat[0], np.array([
+        [0.43559574, -0.65973961, 0.61237244],
+        [0.78914913, -0.04736717, -0.61237244],
+        [0.4330127, 0.75000000, 0.500000]
+    ]))
+
+    assert_array_almost_equal(mat[1], np.array([
+        [0.62500000, -0.64951905, 0.4330127],
+        [0.64951905, 0.12500000, -0.750000],
+        [0.4330127, 0.75000000, 0.500000]
+    ]))
+
+    assert_array_almost_equal(mat[2], np.array([
+        [-0.1767767, -0.88388348, 0.4330127],
+        [0.91855865, -0.30618622, -0.250000],
+        [0.35355339, 0.35355339, 0.8660254]
+    ]))
+
+
+@pytest.mark.parametrize("seq_tuple", permutations("xyz"))
+@pytest.mark.parametrize("intrinsic", (False, True))
+def test_as_euler_asymmetric_axes(seq_tuple, intrinsic):
+    # helper function for mean error tests
+    def test_stats(error, mean_max, rms_max):
+        mean = np.mean(error, axis=0)
+        std = np.std(error, axis=0)
+        rms = np.hypot(mean, std)
+        assert np.all(np.abs(mean) < mean_max)
+        assert np.all(rms < rms_max)
+
+    rnd = np.random.RandomState(0)
+    n = 1000
+    angles = np.empty((n, 3))
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles[:, 1] = rnd.uniform(low=-np.pi / 2, high=np.pi / 2, size=(n,))
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+
+    seq = "".join(seq_tuple)
+    if intrinsic:
+        # Extrinsic rotation (wrt to global world) at lower case
+        # intrinsic (WRT the object itself) lower case.
+        seq = seq.upper()
+    rotation = Rotation.from_euler(seq, angles)
+    angles_quat = rotation.as_euler(seq)
+    angles_mat = rotation._as_euler_from_matrix(seq)
+    assert_allclose(angles, angles_quat, atol=0, rtol=1e-12)
+    assert_allclose(angles, angles_mat, atol=0, rtol=1e-12)
+    test_stats(angles_quat - angles, 1e-15, 1e-14)
+    test_stats(angles_mat - angles, 1e-15, 1e-14)
+
+
+
+@pytest.mark.parametrize("seq_tuple", permutations("xyz"))
+@pytest.mark.parametrize("intrinsic", (False, True))
+def test_as_euler_symmetric_axes(seq_tuple, intrinsic):
+    # helper function for mean error tests
+    def test_stats(error, mean_max, rms_max):
+        mean = np.mean(error, axis=0)
+        std = np.std(error, axis=0)
+        rms = np.hypot(mean, std)
+        assert np.all(np.abs(mean) < mean_max)
+        assert np.all(rms < rms_max)
+
+    rnd = np.random.RandomState(0)
+    n = 1000
+    angles = np.empty((n, 3))
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles[:, 1] = rnd.uniform(low=0, high=np.pi, size=(n,))
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+
+    # Rotation of the form A/B/A are rotation around symmetric axes
+    seq = "".join([seq_tuple[0], seq_tuple[1], seq_tuple[0]])
+    if intrinsic:
+        seq = seq.upper()
+    rotation = Rotation.from_euler(seq, angles)
+    angles_quat = rotation.as_euler(seq)
+    angles_mat = rotation._as_euler_from_matrix(seq)
+    assert_allclose(angles, angles_quat, atol=0, rtol=1e-13)
+    assert_allclose(angles, angles_mat, atol=0, rtol=1e-9)
+    test_stats(angles_quat - angles, 1e-16, 1e-14)
+    test_stats(angles_mat - angles, 1e-15, 1e-13)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.parametrize("seq_tuple", permutations("xyz"))
+@pytest.mark.parametrize("intrinsic", (False, True))
+def test_as_euler_degenerate_asymmetric_axes(seq_tuple, intrinsic):
+    # Since we cannot check for angle equality, we check for rotation matrix
+    # equality
+    angles = np.array([
+        [45, 90, 35],
+        [35, -90, 20],
+        [35, 90, 25],
+        [25, -90, 15]])
+
+    seq = "".join(seq_tuple)
+    if intrinsic:
+        # Extrinsic rotation (wrt to global world) at lower case
+        # Intrinsic (WRT the object itself) upper case.
+        seq = seq.upper()
+    rotation = Rotation.from_euler(seq, angles, degrees=True)
+    mat_expected = rotation.as_matrix()
+
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        angle_estimates = rotation.as_euler(seq, degrees=True)
+    mat_estimated = Rotation.from_euler(seq, angle_estimates, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat_expected, mat_estimated)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.parametrize("seq_tuple", permutations("xyz"))
+@pytest.mark.parametrize("intrinsic", (False, True))
+def test_as_euler_degenerate_symmetric_axes(seq_tuple, intrinsic):
+    # Since we cannot check for angle equality, we check for rotation matrix
+    # equality
+    angles = np.array([
+        [15, 0, 60],
+        [35, 0, 75],
+        [60, 180, 35],
+        [15, -180, 25]])
+
+    # Rotation of the form A/B/A are rotation around symmetric axes
+    seq = "".join([seq_tuple[0], seq_tuple[1], seq_tuple[0]])
+    if intrinsic:
+        # Extrinsic rotation (wrt to global world) at lower case
+        # Intrinsic (WRT the object itself) upper case.
+        seq = seq.upper()
+    rotation = Rotation.from_euler(seq, angles, degrees=True)
+    mat_expected = rotation.as_matrix()
+
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        angle_estimates = rotation.as_euler(seq, degrees=True)
+    mat_estimated = Rotation.from_euler(seq, angle_estimates, degrees=True).as_matrix()
+
+    assert_array_almost_equal(mat_expected, mat_estimated)
+
+
+@pytest.mark.thread_unsafe
+@pytest.mark.parametrize("seq_tuple", permutations("xyz"))
+@pytest.mark.parametrize("intrinsic", (False, True))
+def test_as_euler_degenerate_compare_algorithms(seq_tuple, intrinsic):
+    # this test makes sure that both algorithms are doing the same choices
+    # in degenerate cases
+
+    # asymmetric axes
+    angles = np.array([
+        [45, 90, 35],
+        [35, -90, 20],
+        [35, 90, 25],
+        [25, -90, 15]])
+
+    seq = "".join(seq_tuple)
+    if intrinsic:
+        # Extrinsic rotation (wrt to global world at lower case
+        # Intrinsic (WRT the object itself) upper case.
+        seq = seq.upper()
+
+    rot = Rotation.from_euler(seq, angles, degrees=True)
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        estimates_matrix = rot._as_euler_from_matrix(seq, degrees=True)
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        estimates_quat = rot.as_euler(seq, degrees=True)
+    assert_allclose(
+        estimates_matrix[:, [0, 2]], estimates_quat[:, [0, 2]], atol=0, rtol=1e-12
+    )
+    assert_allclose(estimates_matrix[:, 1], estimates_quat[:, 1], atol=0, rtol=1e-7)
+
+    # symmetric axes
+    # Absolute error tolerance must be looser to directly compare the results
+    # from both algorithms, because of numerical loss of precision for the
+    # method _as_euler_from_matrix near a zero angle value
+
+    angles = np.array([
+        [15, 0, 60],
+        [35, 0, 75],
+        [60, 180, 35],
+        [15, -180, 25]])
+
+    idx = angles[:, 1] == 0  # find problematic angles indices
+
+    # Rotation of the form A/B/A are rotation around symmetric axes
+    seq = "".join([seq_tuple[0], seq_tuple[1], seq_tuple[0]])
+    if intrinsic:
+        # Extrinsic rotation (wrt to global world) at lower case
+        # Intrinsic (WRT the object itself) upper case.
+        seq = seq.upper()
+
+    rot = Rotation.from_euler(seq, angles, degrees=True)
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        estimates_matrix = rot._as_euler_from_matrix(seq, degrees=True)
+    with pytest.warns(UserWarning, match="Gimbal lock"):
+        estimates_quat = rot.as_euler(seq, degrees=True)
+    assert_allclose(
+        estimates_matrix[:, [0, 2]], estimates_quat[:, [0, 2]], atol=0, rtol=1e-12
+    )
+
+    assert_allclose(
+        estimates_matrix[~idx, 1], estimates_quat[~idx, 1], atol=0, rtol=1e-7
+    )
+
+    assert_allclose(
+        estimates_matrix[idx, 1], estimates_quat[idx, 1], atol=1e-6
+    )  # problematic, angles[1] = 0
+
+
+def test_inv():
+    rnd = np.random.RandomState(0)
+    n = 10
+    # preserve use of old random_state during SPEC 7 transition
+    p = Rotation.random(num=n, random_state=rnd)
+    q = p.inv()
+
+    p_mat = p.as_matrix()
+    q_mat = q.as_matrix()
+    result1 = np.einsum('...ij,...jk->...ik', p_mat, q_mat)
+    result2 = np.einsum('...ij,...jk->...ik', q_mat, p_mat)
+
+    eye3d = np.empty((n, 3, 3))
+    eye3d[:] = np.eye(3)
+
+    assert_array_almost_equal(result1, eye3d)
+    assert_array_almost_equal(result2, eye3d)
+
+
+def test_inv_single_rotation():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    p = Rotation.random(rng=rng)
+    q = p.inv()
+
+    p_mat = p.as_matrix()
+    q_mat = q.as_matrix()
+    res1 = np.dot(p_mat, q_mat)
+    res2 = np.dot(q_mat, p_mat)
+
+    eye = np.eye(3)
+
+    assert_array_almost_equal(res1, eye)
+    assert_array_almost_equal(res2, eye)
+
+    x = Rotation.random(num=1, rng=rng)
+    y = x.inv()
+
+    x_matrix = x.as_matrix()
+    y_matrix = y.as_matrix()
+    result1 = np.einsum('...ij,...jk->...ik', x_matrix, y_matrix)
+    result2 = np.einsum('...ij,...jk->...ik', y_matrix, x_matrix)
+
+    eye3d = np.empty((1, 3, 3))
+    eye3d[:] = np.eye(3)
+
+    assert_array_almost_equal(result1, eye3d)
+    assert_array_almost_equal(result2, eye3d)
+
+
+def test_identity_magnitude():
+    n = 10
+    assert_allclose(Rotation.identity(n).magnitude(), 0)
+    assert_allclose(Rotation.identity(n).inv().magnitude(), 0)
+
+
+def test_single_identity_magnitude():
+    assert Rotation.identity().magnitude() == 0
+    assert Rotation.identity().inv().magnitude() == 0
+
+
+def test_identity_invariance():
+    n = 10
+    p = Rotation.random(n, rng=0)
+
+    result = p * Rotation.identity(n)
+    assert_array_almost_equal(p.as_quat(), result.as_quat())
+
+    result = result * p.inv()
+    assert_array_almost_equal(result.magnitude(), np.zeros(n))
+
+
+def test_single_identity_invariance():
+    n = 10
+    p = Rotation.random(n, rng=0)
+
+    result = p * Rotation.identity()
+    assert_array_almost_equal(p.as_quat(), result.as_quat())
+
+    result = result * p.inv()
+    assert_array_almost_equal(result.magnitude(), np.zeros(n))
+
+
+def test_magnitude():
+    r = Rotation.from_quat(np.eye(4))
+    result = r.magnitude()
+    assert_array_almost_equal(result, [np.pi, np.pi, np.pi, 0])
+
+    r = Rotation.from_quat(-np.eye(4))
+    result = r.magnitude()
+    assert_array_almost_equal(result, [np.pi, np.pi, np.pi, 0])
+
+
+def test_magnitude_single_rotation():
+    r = Rotation.from_quat(np.eye(4))
+    result1 = r[0].magnitude()
+    assert_allclose(result1, np.pi)
+
+    result2 = r[3].magnitude()
+    assert_allclose(result2, 0)
+
+
+def test_approx_equal():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    p = Rotation.random(10, rng=rng)
+    q = Rotation.random(10, rng=rng)
+    r = p * q.inv()
+    r_mag = r.magnitude()
+    atol = np.median(r_mag)  # ensure we get mix of Trues and Falses
+    assert_equal(p.approx_equal(q, atol), (r_mag < atol))
+
+
+@pytest.mark.thread_unsafe
+def test_approx_equal_single_rotation():
+    # also tests passing single argument to approx_equal
+    p = Rotation.from_rotvec([0, 0, 1e-9])  # less than default atol of 1e-8
+    q = Rotation.from_quat(np.eye(4))
+    assert p.approx_equal(q[3])
+    assert not p.approx_equal(q[0])
+
+    # test passing atol and using degrees
+    assert not p.approx_equal(q[3], atol=1e-10)
+    assert not p.approx_equal(q[3], atol=1e-8, degrees=True)
+    with pytest.warns(UserWarning, match="atol must be set"):
+        assert p.approx_equal(q[3], degrees=True)
+
+
+def test_mean():
+    axes = np.concatenate((-np.eye(3), np.eye(3)))
+    thetas = np.linspace(0, np.pi / 2, 100)
+    for t in thetas:
+        r = Rotation.from_rotvec(t * axes)
+        assert_allclose(r.mean().magnitude(), 0, atol=1E-10)
+
+
+def test_weighted_mean():
+    # test that doubling a weight is equivalent to including a rotation twice.
+    axes = np.array([[0, 0, 0], [1, 0, 0], [1, 0, 0]])
+    thetas = np.linspace(0, np.pi / 2, 100)
+    for t in thetas:
+        rw = Rotation.from_rotvec(t * axes[:2])
+        mw = rw.mean(weights=[1, 2])
+
+        r = Rotation.from_rotvec(t * axes)
+        m = r.mean()
+        assert_allclose((m * mw.inv()).magnitude(), 0, atol=1E-10)
+
+
+def test_mean_invalid_weights():
+    with pytest.raises(ValueError, match="non-negative"):
+        r = Rotation.from_quat(np.eye(4))
+        r.mean(weights=-np.ones(4))
+
+
+def test_reduction_no_indices():
+    result = Rotation.identity().reduce(return_indices=False)
+    assert isinstance(result, Rotation)
+
+
+def test_reduction_none_indices():
+    result = Rotation.identity().reduce(return_indices=True)
+    assert type(result) is tuple
+    assert len(result) == 3
+
+    reduced, left_best, right_best = result
+    assert left_best is None
+    assert right_best is None
+
+
+def test_reduction_scalar_calculation():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    l = Rotation.random(5, rng=rng)
+    r = Rotation.random(10, rng=rng)
+    p = Rotation.random(7, rng=rng)
+    reduced, left_best, right_best = p.reduce(l, r, return_indices=True)
+
+    # Loop implementation of the vectorized calculation in Rotation.reduce
+    scalars = np.zeros((len(l), len(p), len(r)))
+    for i, li in enumerate(l):
+        for j, pj in enumerate(p):
+            for k, rk in enumerate(r):
+                scalars[i, j, k] = np.abs((li * pj * rk).as_quat()[3])
+    scalars = np.reshape(np.moveaxis(scalars, 1, 0), (scalars.shape[1], -1))
+
+    max_ind = np.argmax(np.reshape(scalars, (len(p), -1)), axis=1)
+    left_best_check = max_ind // len(r)
+    right_best_check = max_ind % len(r)
+    assert (left_best == left_best_check).all()
+    assert (right_best == right_best_check).all()
+
+    reduced_check = l[left_best_check] * p * r[right_best_check]
+    mag = (reduced.inv() * reduced_check).magnitude()
+    assert_array_almost_equal(mag, np.zeros(len(p)))
+
+
+def test_apply_single_rotation_single_point():
+    mat = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    r_1d = Rotation.from_matrix(mat)
+    r_2d = Rotation.from_matrix(np.expand_dims(mat, axis=0))
+
+    v_1d = np.array([1, 2, 3])
+    v_2d = np.expand_dims(v_1d, axis=0)
+    v1d_rotated = np.array([-2, 1, 3])
+    v2d_rotated = np.expand_dims(v1d_rotated, axis=0)
+
+    assert_allclose(r_1d.apply(v_1d), v1d_rotated)
+    assert_allclose(r_1d.apply(v_2d), v2d_rotated)
+    assert_allclose(r_2d.apply(v_1d), v2d_rotated)
+    assert_allclose(r_2d.apply(v_2d), v2d_rotated)
+
+    v1d_inverse = np.array([2, -1, 3])
+    v2d_inverse = np.expand_dims(v1d_inverse, axis=0)
+
+    assert_allclose(r_1d.apply(v_1d, inverse=True), v1d_inverse)
+    assert_allclose(r_1d.apply(v_2d, inverse=True), v2d_inverse)
+    assert_allclose(r_2d.apply(v_1d, inverse=True), v2d_inverse)
+    assert_allclose(r_2d.apply(v_2d, inverse=True), v2d_inverse)
+
+
+def test_apply_single_rotation_multiple_points():
+    mat = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    r1 = Rotation.from_matrix(mat)
+    r2 = Rotation.from_matrix(np.expand_dims(mat, axis=0))
+
+    v = np.array([[1, 2, 3], [4, 5, 6]])
+    v_rotated = np.array([[-2, 1, 3], [-5, 4, 6]])
+
+    assert_allclose(r1.apply(v), v_rotated)
+    assert_allclose(r2.apply(v), v_rotated)
+
+    v_inverse = np.array([[2, -1, 3], [5, -4, 6]])
+
+    assert_allclose(r1.apply(v, inverse=True), v_inverse)
+    assert_allclose(r2.apply(v, inverse=True), v_inverse)
+
+
+def test_apply_multiple_rotations_single_point():
+    mat = np.empty((2, 3, 3))
+    mat[0] = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    mat[1] = np.array([
+        [1, 0, 0],
+        [0, 0, -1],
+        [0, 1, 0]
+    ])
+    r = Rotation.from_matrix(mat)
+
+    v1 = np.array([1, 2, 3])
+    v2 = np.expand_dims(v1, axis=0)
+
+    v_rotated = np.array([[-2, 1, 3], [1, -3, 2]])
+
+    assert_allclose(r.apply(v1), v_rotated)
+    assert_allclose(r.apply(v2), v_rotated)
+
+    v_inverse = np.array([[2, -1, 3], [1, 3, -2]])
+
+    assert_allclose(r.apply(v1, inverse=True), v_inverse)
+    assert_allclose(r.apply(v2, inverse=True), v_inverse)
+
+
+def test_apply_multiple_rotations_multiple_points():
+    mat = np.empty((2, 3, 3))
+    mat[0] = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    mat[1] = np.array([
+        [1, 0, 0],
+        [0, 0, -1],
+        [0, 1, 0]
+    ])
+    r = Rotation.from_matrix(mat)
+
+    v = np.array([[1, 2, 3], [4, 5, 6]])
+    v_rotated = np.array([[-2, 1, 3], [4, -6, 5]])
+    assert_allclose(r.apply(v), v_rotated)
+
+    v_inverse = np.array([[2, -1, 3], [4, 6, -5]])
+    assert_allclose(r.apply(v, inverse=True), v_inverse)
+
+
+def test_getitem():
+    mat = np.empty((2, 3, 3))
+    mat[0] = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    mat[1] = np.array([
+        [1, 0, 0],
+        [0, 0, -1],
+        [0, 1, 0]
+    ])
+    r = Rotation.from_matrix(mat)
+
+    assert_allclose(r[0].as_matrix(), mat[0], atol=1e-15)
+    assert_allclose(r[1].as_matrix(), mat[1], atol=1e-15)
+    assert_allclose(r[:-1].as_matrix(), np.expand_dims(mat[0], axis=0), atol=1e-15)
+
+
+def test_getitem_single():
+    with pytest.raises(TypeError, match='not subscriptable'):
+        Rotation.identity()[0]
+
+
+def test_setitem_single():
+    r = Rotation.identity()
+    with pytest.raises(TypeError, match='not subscriptable'):
+        r[0] = Rotation.identity()
+
+
+def test_setitem_slice():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    r1 = Rotation.random(10, rng=rng)
+    r2 = Rotation.random(5, rng=rng)
+    r1[1:6] = r2
+    assert_equal(r1[1:6].as_quat(), r2.as_quat())
+
+
+def test_setitem_integer():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    r1 = Rotation.random(10, rng=rng)
+    r2 = Rotation.random(rng=rng)
+    r1[1] = r2
+    assert_equal(r1[1].as_quat(), r2.as_quat())
+
+
+def test_setitem_wrong_type():
+    r = Rotation.random(10, rng=0)
+    with pytest.raises(TypeError, match='Rotation object'):
+        r[0] = 1
+
+
+def test_n_rotations():
+    mat = np.empty((2, 3, 3))
+    mat[0] = np.array([
+        [0, -1, 0],
+        [1, 0, 0],
+        [0, 0, 1]
+    ])
+    mat[1] = np.array([
+        [1, 0, 0],
+        [0, 0, -1],
+        [0, 1, 0]
+    ])
+    r = Rotation.from_matrix(mat)
+
+    assert_equal(len(r), 2)
+    assert_equal(len(r[:-1]), 1)
+
+
+def test_random_rotation_shape():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    assert_equal(Rotation.random(rng=rng).as_quat().shape, (4,))
+    assert_equal(Rotation.random(None, rng=rng).as_quat().shape, (4,))
+
+    assert_equal(Rotation.random(1, rng=rng).as_quat().shape, (1, 4))
+    assert_equal(Rotation.random(5, rng=rng).as_quat().shape, (5, 4))
+
+
+def test_align_vectors_no_rotation():
+    x = np.array([[1, 2, 3], [4, 5, 6]])
+    y = x.copy()
+
+    r, rssd = Rotation.align_vectors(x, y)
+    assert_array_almost_equal(r.as_matrix(), np.eye(3))
+    assert_allclose(rssd, 0, atol=1e-6)
+
+
+def test_align_vectors_no_noise():
+    rng = np.random.default_rng(14697284569885399755764481408308808739)
+    c = Rotation.random(rng=rng)
+    b = rng.normal(size=(5, 3))
+    a = c.apply(b)
+
+    est, rssd = Rotation.align_vectors(a, b)
+    assert_allclose(c.as_quat(), est.as_quat())
+    assert_allclose(rssd, 0, atol=1e-7)
+
+
+def test_align_vectors_improper_rotation():
+    # Tests correct logic for issue #10444
+    x = np.array([[0.89299824, -0.44372674, 0.0752378],
+                  [0.60221789, -0.47564102, -0.6411702]])
+    y = np.array([[0.02386536, -0.82176463, 0.5693271],
+                  [-0.27654929, -0.95191427, -0.1318321]])
+
+    est, rssd = Rotation.align_vectors(x, y)
+    assert_allclose(x, est.apply(y), atol=1e-6)
+    assert_allclose(rssd, 0, atol=1e-7)
+
+
+def test_align_vectors_rssd_sensitivity():
+    rssd_expected = 0.141421356237308
+    sens_expected = np.array([[0.2, 0. , 0.],
+                              [0. , 1.5, 1.],
+                              [0. , 1. , 1.]])
+    atol = 1e-6
+    a = [[0, 1, 0], [0, 1, 1], [0, 1, 1]]
+    b = [[1, 0, 0], [1, 1.1, 0], [1, 0.9, 0]]
+    rot, rssd, sens = Rotation.align_vectors(a, b, return_sensitivity=True)
+    assert np.isclose(rssd, rssd_expected, atol=atol)
+    assert np.allclose(sens, sens_expected, atol=atol)
+
+
+def test_align_vectors_scaled_weights():
+    n = 10
+    a = Rotation.random(n, rng=0).apply([1, 0, 0])
+    b = Rotation.random(n, rng=1).apply([1, 0, 0])
+    scale = 2
+
+    est1, rssd1, cov1 = Rotation.align_vectors(a, b, np.ones(n), True)
+    est2, rssd2, cov2 = Rotation.align_vectors(a, b, scale * np.ones(n), True)
+
+    assert_allclose(est1.as_matrix(), est2.as_matrix())
+    assert_allclose(np.sqrt(scale) * rssd1, rssd2, atol=1e-6)
+    assert_allclose(cov1, cov2)
+
+
+def test_align_vectors_noise():
+    rng = np.random.default_rng(146972845698875399755764481408308808739)
+    n_vectors = 100
+    rot = Rotation.random(rng=rng)
+    vectors = rng.normal(size=(n_vectors, 3))
+    result = rot.apply(vectors)
+
+    # The paper adds noise as independently distributed angular errors
+    sigma = np.deg2rad(1)
+    tolerance = 1.5 * sigma
+    noise = Rotation.from_rotvec(
+        rng.normal(
+            size=(n_vectors, 3),
+            scale=sigma
+        )
+    )
+
+    # Attitude errors must preserve norm. Hence apply individual random
+    # rotations to each vector.
+    noisy_result = noise.apply(result)
+
+    est, rssd, cov = Rotation.align_vectors(noisy_result, vectors,
+                                            return_sensitivity=True)
+
+    # Use rotation compositions to find out closeness
+    error_vector = (rot * est.inv()).as_rotvec()
+    assert_allclose(error_vector[0], 0, atol=tolerance)
+    assert_allclose(error_vector[1], 0, atol=tolerance)
+    assert_allclose(error_vector[2], 0, atol=tolerance)
+
+    # Check error bounds using covariance matrix
+    cov *= sigma
+    assert_allclose(cov[0, 0], 0, atol=tolerance)
+    assert_allclose(cov[1, 1], 0, atol=tolerance)
+    assert_allclose(cov[2, 2], 0, atol=tolerance)
+
+    assert_allclose(rssd, np.sum((noisy_result - est.apply(vectors))**2)**0.5)
+
+
+def test_align_vectors_invalid_input():
+    with pytest.raises(ValueError, match="Expected input `a` to have shape"):
+        Rotation.align_vectors([1, 2, 3, 4], [1, 2, 3])
+
+    with pytest.raises(ValueError, match="Expected input `b` to have shape"):
+        Rotation.align_vectors([1, 2, 3], [1, 2, 3, 4])
+
+    with pytest.raises(ValueError, match="Expected inputs `a` and `b` "
+                                         "to have same shapes"):
+        Rotation.align_vectors([[1, 2, 3],[4, 5, 6]], [[1, 2, 3]])
+
+    with pytest.raises(ValueError,
+                       match="Expected `weights` to be 1 dimensional"):
+        Rotation.align_vectors([[1, 2, 3]], [[1, 2, 3]], weights=[[1]])
+
+    with pytest.raises(ValueError,
+                       match="Expected `weights` to have number of values"):
+        Rotation.align_vectors([[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]],
+                               weights=[1, 2, 3])
+
+    with pytest.raises(ValueError,
+                       match="`weights` may not contain negative values"):
+        Rotation.align_vectors([[1, 2, 3]], [[1, 2, 3]], weights=[-1])
+
+    with pytest.raises(ValueError,
+                       match="Only one infinite weight is allowed"):
+        Rotation.align_vectors([[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]],
+                               weights=[np.inf, np.inf])
+
+    with pytest.raises(ValueError,
+                       match="Cannot align zero length primary vectors"):
+        Rotation.align_vectors([[0, 0, 0]], [[1, 2, 3]])
+
+    with pytest.raises(ValueError,
+                       match="Cannot return sensitivity matrix"):
+        Rotation.align_vectors([[1, 2, 3], [4, 5, 6]], [[1, 2, 3], [4, 5, 6]],
+                               return_sensitivity=True, weights=[np.inf, 1])
+
+    with pytest.raises(ValueError,
+                       match="Cannot return sensitivity matrix"):
+        Rotation.align_vectors([[1, 2, 3]], [[1, 2, 3]],
+                               return_sensitivity=True)
+
+
+def test_align_vectors_align_constrain():
+    # Align the primary +X B axis with the primary +Y A axis, and rotate about
+    # it such that the +Y B axis (residual of the [1, 1, 0] secondary b vector)
+    # is aligned with the +Z A axis (residual of the [0, 1, 1] secondary a
+    # vector)
+    atol = 1e-12
+    b = [[1, 0, 0], [1, 1, 0]]
+    a = [[0, 1, 0], [0, 1, 1]]
+    m_expected = np.array([[0, 0, 1],
+                           [1, 0, 0],
+                           [0, 1, 0]])
+    R, rssd = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    assert_allclose(R.apply(b), a, atol=atol)  # Pri and sec align exactly
+    assert np.isclose(rssd, 0, atol=atol)
+
+    # Do the same but with an inexact secondary rotation
+    b = [[1, 0, 0], [1, 2, 0]]
+    rssd_expected = 1.0
+    R, rssd = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    assert_allclose(R.apply(b)[0], a[0], atol=atol)  # Only pri aligns exactly
+    assert np.isclose(rssd, rssd_expected, atol=atol)
+    a_expected = [[0, 1, 0], [0, 1, 2]]
+    assert_allclose(R.apply(b), a_expected, atol=atol)
+
+    # Check random vectors
+    b = [[1, 2, 3], [-2, 3, -1]]
+    a = [[-1, 3, 2], [1, -1, 2]]
+    rssd_expected = 1.3101595297515016
+    R, rssd = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+    assert_allclose(R.apply(b)[0], a[0], atol=atol)  # Only pri aligns exactly
+    assert np.isclose(rssd, rssd_expected, atol=atol)
+
+
+def test_align_vectors_near_inf():
+    # align_vectors should return near the same result for high weights as for
+    # infinite weights. rssd will be different with floating point error on the
+    # exactly aligned vector being multiplied by a large non-infinite weight
+    n = 100
+    mats = []
+    for i in range(6):
+        mats.append(Rotation.random(n, rng=10 + i).as_matrix())
+
+    for i in range(n):
+        # Get random pairs of 3-element vectors
+        a = [1*mats[0][i][0], 2*mats[1][i][0]]
+        b = [3*mats[2][i][0], 4*mats[3][i][0]]
+
+        R, _ = Rotation.align_vectors(a, b, weights=[1e10, 1])
+        R2, _ = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+        assert_allclose(R.as_matrix(), R2.as_matrix(), atol=1e-4)
+
+    for i in range(n):
+        # Get random triplets of 3-element vectors
+        a = [1*mats[0][i][0], 2*mats[1][i][0], 3*mats[2][i][0]]
+        b = [4*mats[3][i][0], 5*mats[4][i][0], 6*mats[5][i][0]]
+
+        R, _ = Rotation.align_vectors(a, b, weights=[1e10, 2, 1])
+        R2, _ = Rotation.align_vectors(a, b, weights=[np.inf, 2, 1])
+        assert_allclose(R.as_matrix(), R2.as_matrix(), atol=1e-4)
+
+
+def test_align_vectors_parallel():
+    atol = 1e-12
+    a = [[1, 0, 0], [0, 1, 0]]
+    b = [[0, 1, 0], [0, 1, 0]]
+    m_expected = np.array([[0, 1, 0],
+                           [-1, 0, 0],
+                           [0, 0, 1]])
+    R, _ = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    R, _ = Rotation.align_vectors(a[0], b[0])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    assert_allclose(R.apply(b[0]), a[0], atol=atol)
+
+    b = [[1, 0, 0], [1, 0, 0]]
+    m_expected = np.array([[1, 0, 0],
+                           [0, 1, 0],
+                           [0, 0, 1]])
+    R, _ = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    R, _ = Rotation.align_vectors(a[0], b[0])
+    assert_allclose(R.as_matrix(), m_expected, atol=atol)
+    assert_allclose(R.apply(b[0]), a[0], atol=atol)
+
+
+def test_align_vectors_antiparallel():
+    # Test exact 180 deg rotation
+    atol = 1e-12
+    as_to_test = np.array([[[1, 0, 0], [0, 1, 0]],
+                           [[0, 1, 0], [1, 0, 0]],
+                           [[0, 0, 1], [0, 1, 0]]])
+    bs_to_test = [[-a[0], a[1]] for a in as_to_test]
+    for a, b in zip(as_to_test, bs_to_test):
+        R, _ = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+        assert_allclose(R.magnitude(), np.pi, atol=atol)
+        assert_allclose(R.apply(b[0]), a[0], atol=atol)
+
+    # Test exact rotations near 180 deg
+    Rs = Rotation.random(100, rng=0)
+    dRs = Rotation.from_rotvec(Rs.as_rotvec()*1e-4)  # scale down to small angle
+    a = [[ 1, 0, 0], [0, 1, 0]]
+    b = [[-1, 0, 0], [0, 1, 0]]
+    as_to_test = []
+    for dR in dRs:
+        as_to_test.append([dR.apply(a[0]), a[1]])
+    for a in as_to_test:
+        R, _ = Rotation.align_vectors(a, b, weights=[np.inf, 1])
+        R2, _ = Rotation.align_vectors(a, b, weights=[1e10, 1])
+        assert_allclose(R.as_matrix(), R2.as_matrix(), atol=atol)
+
+
+def test_align_vectors_primary_only():
+    atol = 1e-12
+    mats_a = Rotation.random(100, rng=0).as_matrix()
+    mats_b = Rotation.random(100, rng=1).as_matrix()
+    for mat_a, mat_b in zip(mats_a, mats_b):
+        # Get random 3-element unit vectors
+        a = mat_a[0]
+        b = mat_b[0]
+
+        # Compare to align_vectors with primary only
+        R, rssd = Rotation.align_vectors(a, b)
+        assert_allclose(R.apply(b), a, atol=atol)
+        assert np.isclose(rssd, 0, atol=atol)
+
+
+def test_slerp():
+    rnd = np.random.RandomState(0)
+
+    key_rots = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+    key_quats = key_rots.as_quat()
+
+    key_times = [0, 1, 2, 3, 4]
+    interpolator = Slerp(key_times, key_rots)
+
+    times = [0, 0.5, 0.25, 1, 1.5, 2, 2.75, 3, 3.25, 3.60, 4]
+    interp_rots = interpolator(times)
+    interp_quats = interp_rots.as_quat()
+
+    # Dot products are affected by sign of quaternions
+    interp_quats[interp_quats[:, -1] < 0] *= -1
+    # Checking for quaternion equality, perform same operation
+    key_quats[key_quats[:, -1] < 0] *= -1
+
+    # Equality at keyframes, including both endpoints
+    assert_allclose(interp_quats[0], key_quats[0])
+    assert_allclose(interp_quats[3], key_quats[1])
+    assert_allclose(interp_quats[5], key_quats[2])
+    assert_allclose(interp_quats[7], key_quats[3])
+    assert_allclose(interp_quats[10], key_quats[4])
+
+    # Constant angular velocity between keyframes. Check by equating
+    # cos(theta) between quaternion pairs with equal time difference.
+    cos_theta1 = np.sum(interp_quats[0] * interp_quats[2])
+    cos_theta2 = np.sum(interp_quats[2] * interp_quats[1])
+    assert_allclose(cos_theta1, cos_theta2)
+
+    cos_theta4 = np.sum(interp_quats[3] * interp_quats[4])
+    cos_theta5 = np.sum(interp_quats[4] * interp_quats[5])
+    assert_allclose(cos_theta4, cos_theta5)
+
+    # theta1: 0 -> 0.25, theta3 : 0.5 -> 1
+    # Use double angle formula for double the time difference
+    cos_theta3 = np.sum(interp_quats[1] * interp_quats[3])
+    assert_allclose(cos_theta3, 2 * (cos_theta1**2) - 1)
+
+    # Miscellaneous checks
+    assert_equal(len(interp_rots), len(times))
+
+
+def test_slerp_rot_is_rotation():
+    with pytest.raises(TypeError, match="must be a `Rotation` instance"):
+        r = np.array([[1,2,3,4],
+                      [0,0,0,1]])
+        t = np.array([0, 1])
+        Slerp(t, r)
+
+SLERP_EXCEPTION_MESSAGE = "must be a sequence of at least 2 rotations"
+
+def test_slerp_single_rot():
+    r = Rotation.from_quat([1, 2, 3, 4])
+    with pytest.raises(ValueError, match=SLERP_EXCEPTION_MESSAGE):
+        Slerp([1], r)
+
+
+def test_slerp_rot_len0():
+    r = Rotation.random()
+    with pytest.raises(ValueError, match=SLERP_EXCEPTION_MESSAGE):
+        Slerp([], r)
+
+
+def test_slerp_rot_len1():
+    r = Rotation.random(1)
+    with pytest.raises(ValueError, match=SLERP_EXCEPTION_MESSAGE):
+        Slerp([1], r)
+
+
+def test_slerp_time_dim_mismatch():
+    with pytest.raises(ValueError,
+                       match="times to be specified in a 1 dimensional array"):
+        rnd = np.random.RandomState(0)
+        r = Rotation.from_quat(rnd.uniform(size=(2, 4)))
+        t = np.array([[1],
+                      [2]])
+        Slerp(t, r)
+
+
+def test_slerp_num_rotations_mismatch():
+    with pytest.raises(ValueError, match="number of rotations to be equal to "
+                                         "number of timestamps"):
+        rnd = np.random.RandomState(0)
+        r = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+        t = np.arange(7)
+        Slerp(t, r)
+
+
+def test_slerp_equal_times():
+    with pytest.raises(ValueError, match="strictly increasing order"):
+        rnd = np.random.RandomState(0)
+        r = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+        t = [0, 1, 2, 2, 4]
+        Slerp(t, r)
+
+
+def test_slerp_decreasing_times():
+    with pytest.raises(ValueError, match="strictly increasing order"):
+        rnd = np.random.RandomState(0)
+        r = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+        t = [0, 1, 3, 2, 4]
+        Slerp(t, r)
+
+
+def test_slerp_call_time_dim_mismatch():
+    rnd = np.random.RandomState(0)
+    r = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+    t = np.arange(5)
+    s = Slerp(t, r)
+
+    with pytest.raises(ValueError,
+                       match="`times` must be at most 1-dimensional."):
+        interp_times = np.array([[3.5],
+                                 [4.2]])
+        s(interp_times)
+
+
+def test_slerp_call_time_out_of_range():
+    rnd = np.random.RandomState(0)
+    r = Rotation.from_quat(rnd.uniform(size=(5, 4)))
+    t = np.arange(5) + 1
+    s = Slerp(t, r)
+
+    with pytest.raises(ValueError, match="times must be within the range"):
+        s([0, 1, 2])
+    with pytest.raises(ValueError, match="times must be within the range"):
+        s([1, 2, 6])
+
+
+def test_slerp_call_scalar_time():
+    r = Rotation.from_euler('X', [0, 80], degrees=True)
+    s = Slerp([0, 1], r)
+
+    r_interpolated = s(0.25)
+    r_interpolated_expected = Rotation.from_euler('X', 20, degrees=True)
+
+    delta = r_interpolated * r_interpolated_expected.inv()
+
+    assert_allclose(delta.magnitude(), 0, atol=1e-16)
+
+
+def test_multiplication_stability():
+    qs = Rotation.random(50, rng=0)
+    rs = Rotation.random(1000, rng=1)
+    for q in qs:
+        rs *= q * rs
+        assert_allclose(np.linalg.norm(rs.as_quat(), axis=1), 1)
+
+
+def test_pow():
+    atol = 1e-14
+    p = Rotation.random(10, rng=0)
+    p_inv = p.inv()
+    # Test the short-cuts and other integers
+    for n in [-5, -2, -1, 0, 1, 2, 5]:
+        # Test accuracy
+        q = p ** n
+        r = Rotation.identity(10)
+        for _ in range(abs(n)):
+            if n > 0:
+                r = r * p
+            else:
+                r = r * p_inv
+        ang = (q * r.inv()).magnitude()
+        assert np.all(ang < atol)
+
+        # Test shape preservation
+        r = Rotation.from_quat([0, 0, 0, 1])
+        assert (r**n).as_quat().shape == (4,)
+        r = Rotation.from_quat([[0, 0, 0, 1]])
+        assert (r**n).as_quat().shape == (1, 4)
+
+    # Large angle fractional
+    for n in [-1.5, -0.5, -0.0, 0.0, 0.5, 1.5]:
+        q = p ** n
+        r = Rotation.from_rotvec(n * p.as_rotvec())
+        assert_allclose(q.as_quat(), r.as_quat(), atol=atol)
+
+    # Small angle
+    p = Rotation.from_rotvec([1e-12, 0, 0])
+    n = 3
+    q = p ** n
+    r = Rotation.from_rotvec(n * p.as_rotvec())
+    assert_allclose(q.as_quat(), r.as_quat(), atol=atol)
+
+
+def test_pow_errors():
+    p = Rotation.random(rng=0)
+    with pytest.raises(NotImplementedError, match='modulus not supported'):
+        pow(p, 1, 1)
+
+
+def test_rotation_within_numpy_array():
+    single = Rotation.random(rng=0)
+    multiple = Rotation.random(2, rng=1)
+
+    array = np.array(single)
+    assert_equal(array.shape, ())
+
+    array = np.array(multiple)
+    assert_equal(array.shape, (2,))
+    assert_allclose(array[0].as_matrix(), multiple[0].as_matrix())
+    assert_allclose(array[1].as_matrix(), multiple[1].as_matrix())
+
+    array = np.array([single])
+    assert_equal(array.shape, (1,))
+    assert_equal(array[0], single)
+
+    array = np.array([multiple])
+    assert_equal(array.shape, (1, 2))
+    assert_allclose(array[0, 0].as_matrix(), multiple[0].as_matrix())
+    assert_allclose(array[0, 1].as_matrix(), multiple[1].as_matrix())
+
+    array = np.array([single, multiple], dtype=object)
+    assert_equal(array.shape, (2,))
+    assert_equal(array[0], single)
+    assert_equal(array[1], multiple)
+
+    array = np.array([multiple, multiple, multiple])
+    assert_equal(array.shape, (3, 2))
+
+
+def test_pickling():
+    r = Rotation.from_quat([0, 0, np.sin(np.pi/4), np.cos(np.pi/4)])
+    pkl = pickle.dumps(r)
+    unpickled = pickle.loads(pkl)
+    assert_allclose(r.as_matrix(), unpickled.as_matrix(), atol=1e-15)
+
+
+def test_deepcopy():
+    r = Rotation.from_quat([0, 0, np.sin(np.pi/4), np.cos(np.pi/4)])
+    r1 = copy.deepcopy(r)
+    assert_allclose(r.as_matrix(), r1.as_matrix(), atol=1e-15)
+
+
+def test_as_euler_contiguous():
+    r = Rotation.from_quat([0, 0, 0, 1])
+    e1 = r.as_euler('xyz')  # extrinsic euler rotation
+    e2 = r.as_euler('XYZ')  # intrinsic
+    assert e1.flags['C_CONTIGUOUS'] is True
+    assert e2.flags['C_CONTIGUOUS'] is True
+    assert all(i >= 0 for i in e1.strides)
+    assert all(i >= 0 for i in e2.strides)
+
+
+def test_concatenate():
+    rotation = Rotation.random(10, rng=0)
+    sizes = [1, 2, 3, 1, 3]
+    starts = [0] + list(np.cumsum(sizes))
+    split = [rotation[i:i + n] for i, n in zip(starts, sizes)]
+    result = Rotation.concatenate(split)
+    assert_equal(rotation.as_quat(), result.as_quat())
+
+    # Test Rotation input for multiple rotations
+    result = Rotation.concatenate(rotation)
+    assert_equal(rotation.as_quat(), result.as_quat())
+
+    # Test that a copy is returned
+    assert rotation is not result
+
+    # Test Rotation input for single rotations
+    result = Rotation.concatenate(Rotation.identity())
+    assert_equal(Rotation.identity().as_quat(), result.as_quat())
+
+
+def test_concatenate_wrong_type():
+    with pytest.raises(TypeError, match='Rotation objects only'):
+        Rotation.concatenate([Rotation.identity(), 1, None])
+
+
+# Regression test for gh-16663
+def test_len_and_bool():
+    rotation_multi_one = Rotation([[0, 0, 0, 1]])
+    rotation_multi = Rotation([[0, 0, 0, 1], [0, 0, 0, 1]])
+    rotation_single = Rotation([0, 0, 0, 1])
+
+    assert len(rotation_multi_one) == 1
+    assert len(rotation_multi) == 2
+    with pytest.raises(TypeError, match="Single rotation has no len()."):
+        len(rotation_single)
+
+    # Rotation should always be truthy. See gh-16663
+    assert rotation_multi_one
+    assert rotation_multi
+    assert rotation_single
+
+
+def test_from_davenport_single_rotation():
+    axis = [0, 0, 1]
+    quat = Rotation.from_davenport(axis, 'extrinsic', 90,
+                                   degrees=True).as_quat()
+    expected_quat = np.array([0, 0, 1, 1]) / np.sqrt(2)
+    assert_allclose(quat, expected_quat)
+
+
+def test_from_davenport_one_or_two_axes():
+    ez = [0, 0, 1]
+    ey = [0, 1, 0]
+
+    # Single rotation, single axis, axes.shape == (3, )
+    rot = Rotation.from_rotvec(np.array(ez) * np.pi/4)
+    rot_dav = Rotation.from_davenport(ez, 'e', np.pi/4)
+    assert_allclose(rot.as_quat(canonical=True),
+                    rot_dav.as_quat(canonical=True))
+
+    # Single rotation, single axis, axes.shape == (1, 3)
+    rot = Rotation.from_rotvec([np.array(ez) * np.pi/4])
+    rot_dav = Rotation.from_davenport([ez], 'e', [np.pi/4])
+    assert_allclose(rot.as_quat(canonical=True),
+                    rot_dav.as_quat(canonical=True))
+
+    # Single rotation, two axes, axes.shape == (2, 3)
+    rot = Rotation.from_rotvec([np.array(ez) * np.pi/4,
+                                np.array(ey) * np.pi/6])
+    rot = rot[0] * rot[1]
+    rot_dav = Rotation.from_davenport([ey, ez], 'e', [np.pi/6, np.pi/4])
+    assert_allclose(rot.as_quat(canonical=True),
+                    rot_dav.as_quat(canonical=True))
+
+    # Two rotations, single axis, axes.shape == (3, )
+    rot = Rotation.from_rotvec([np.array(ez) * np.pi/6,
+                                np.array(ez) * np.pi/4])
+    rot_dav = Rotation.from_davenport([ez], 'e', [np.pi/6, np.pi/4])
+    assert_allclose(rot.as_quat(canonical=True),
+                    rot_dav.as_quat(canonical=True))
+
+
+def test_from_davenport_invalid_input():
+    ez = [0, 0, 1]
+    ey = [0, 1, 0]
+    ezy = [0, 1, 1]
+    with pytest.raises(ValueError, match="must be orthogonal"):
+        Rotation.from_davenport([ez, ezy], 'e', [0, 0])
+    with pytest.raises(ValueError, match="must be orthogonal"):
+        Rotation.from_davenport([ez, ey, ezy], 'e', [0, 0, 0])
+    with pytest.raises(ValueError, match="order should be"):
+        Rotation.from_davenport([ez], 'xyz', [0])
+    with pytest.raises(ValueError, match="Expected `angles`"):
+        Rotation.from_davenport([ez, ey, ez], 'e', [0, 1, 2, 3])
+
+
+def test_as_davenport():
+    rnd = np.random.RandomState(0)
+    n = 100
+    angles = np.empty((n, 3))
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles_middle = rnd.uniform(low=0, high=np.pi, size=(n,))
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    lambdas = rnd.uniform(low=0, high=np.pi, size=(20,))
+
+    e1 = np.array([1, 0, 0])
+    e2 = np.array([0, 1, 0])
+
+    for lamb in lambdas:
+        ax_lamb = [e1, e2, Rotation.from_rotvec(lamb*e2).apply(e1)]
+        angles[:, 1] = angles_middle - lamb
+        for order in ['extrinsic', 'intrinsic']:
+            ax = ax_lamb if order == 'intrinsic' else ax_lamb[::-1]
+            rot = Rotation.from_davenport(ax, order, angles)
+            angles_dav = rot.as_davenport(ax, order)
+            assert_allclose(angles_dav, angles)
+
+
+@pytest.mark.thread_unsafe
+def test_as_davenport_degenerate():
+    # Since we cannot check for angle equality, we check for rotation matrix
+    # equality
+    rnd = np.random.RandomState(0)
+    n = 5
+    angles = np.empty((n, 3))
+
+    # symmetric sequences
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles_middle = [rnd.choice([0, np.pi]) for i in range(n)]
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    lambdas = rnd.uniform(low=0, high=np.pi, size=(5,))
+
+    e1 = np.array([1, 0, 0])
+    e2 = np.array([0, 1, 0])
+
+    for lamb in lambdas:
+        ax_lamb = [e1, e2, Rotation.from_rotvec(lamb*e2).apply(e1)]
+        angles[:, 1] = angles_middle - lamb
+        for order in ['extrinsic', 'intrinsic']:
+            ax = ax_lamb if order == 'intrinsic' else ax_lamb[::-1]
+            rot = Rotation.from_davenport(ax, order, angles)
+            with pytest.warns(UserWarning, match="Gimbal lock"):
+                angles_dav = rot.as_davenport(ax, order)
+            mat_expected = rot.as_matrix()
+            mat_estimated = Rotation.from_davenport(ax, order, angles_dav).as_matrix()
+            assert_array_almost_equal(mat_expected, mat_estimated)
+
+
+def test_compare_from_davenport_from_euler():
+    rnd = np.random.RandomState(0)
+    n = 100
+    angles = np.empty((n, 3))
+
+    # symmetric sequences
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles[:, 1] = rnd.uniform(low=0, high=np.pi, size=(n,))
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    for order in ['extrinsic', 'intrinsic']:
+        for seq_tuple in permutations('xyz'):
+            seq = ''.join([seq_tuple[0], seq_tuple[1], seq_tuple[0]])
+            ax = [basis_vec(i) for i in seq]
+            if order == 'intrinsic':
+                seq = seq.upper()
+            eul = Rotation.from_euler(seq, angles)
+            dav = Rotation.from_davenport(ax, order, angles)
+            assert_allclose(eul.as_quat(canonical=True), dav.as_quat(canonical=True),
+                            rtol=1e-12)
+
+    # asymmetric sequences
+    angles[:, 1] -= np.pi / 2
+    for order in ['extrinsic', 'intrinsic']:
+        for seq_tuple in permutations('xyz'):
+            seq = ''.join(seq_tuple)
+            ax = [basis_vec(i) for i in seq]
+            if order == 'intrinsic':
+                seq = seq.upper()
+            eul = Rotation.from_euler(seq, angles)
+            dav = Rotation.from_davenport(ax, order, angles)
+            assert_allclose(eul.as_quat(), dav.as_quat(), rtol=1e-12)
+
+
+def test_compare_as_davenport_as_euler():
+    rnd = np.random.RandomState(0)
+    n = 100
+    angles = np.empty((n, 3))
+
+    # symmetric sequences
+    angles[:, 0] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    angles[:, 1] = rnd.uniform(low=0, high=np.pi, size=(n,))
+    angles[:, 2] = rnd.uniform(low=-np.pi, high=np.pi, size=(n,))
+    for order in ['extrinsic', 'intrinsic']:
+        for seq_tuple in permutations('xyz'):
+            seq = ''.join([seq_tuple[0], seq_tuple[1], seq_tuple[0]])
+            ax = [basis_vec(i) for i in seq]
+            if order == 'intrinsic':
+                seq = seq.upper()
+            rot = Rotation.from_euler(seq, angles)
+            eul = rot.as_euler(seq)
+            dav = rot.as_davenport(ax, order)
+            assert_allclose(eul, dav, rtol=1e-12)
+
+    # asymmetric sequences
+    angles[:, 1] -= np.pi / 2
+    for order in ['extrinsic', 'intrinsic']:
+        for seq_tuple in permutations('xyz'):
+            seq = ''.join(seq_tuple)
+            ax = [basis_vec(i) for i in seq]
+            if order == 'intrinsic':
+                seq = seq.upper()
+            rot = Rotation.from_euler(seq, angles)
+            eul = rot.as_euler(seq)
+            dav = rot.as_davenport(ax, order)
+            assert_allclose(eul, dav, rtol=1e-12)
+
+
+def test_zero_rotation_construction():
+    r = Rotation.random(num=0)
+    assert len(r) == 0
+
+    r_ide = Rotation.identity(num=0)
+    assert len(r_ide) == 0
+
+    r_get = Rotation.random(num=3)[[]]
+    assert len(r_get) == 0
+
+    r_quat = Rotation.from_quat(np.zeros((0, 4)))
+    assert len(r_quat) == 0
+
+    r_matrix = Rotation.from_matrix(np.zeros((0, 3, 3)))
+    assert len(r_matrix) == 0
+
+    r_euler = Rotation.from_euler("xyz", np.zeros((0, 3)))
+    assert len(r_euler) == 0
+
+    r_vec = Rotation.from_rotvec(np.zeros((0, 3)))
+    assert len(r_vec) == 0
+
+    r_dav = Rotation.from_davenport(np.eye(3), "extrinsic", np.zeros((0, 3)))
+    assert len(r_dav) == 0
+
+    r_mrp = Rotation.from_mrp(np.zeros((0, 3)))
+    assert len(r_mrp) == 0
+
+
+def test_zero_rotation_representation():
+    r = Rotation.random(num=0)
+    assert r.as_quat().shape == (0, 4)
+    assert r.as_matrix().shape == (0, 3, 3)
+    assert r.as_euler("xyz").shape == (0, 3)
+    assert r.as_rotvec().shape == (0, 3)
+    assert r.as_mrp().shape == (0, 3)
+    assert r.as_davenport(np.eye(3), "extrinsic").shape == (0, 3)
+
+
+def test_zero_rotation_array_rotation():
+    r = Rotation.random(num=0)
+
+    v = np.array([1, 2, 3])
+    v_rotated = r.apply(v)
+    assert v_rotated.shape == (0, 3)
+
+    v0 = np.zeros((0, 3))
+    v0_rot = r.apply(v0)
+    assert v0_rot.shape == (0, 3)
+
+    v2 = np.ones((2, 3))
+    with pytest.raises(
+        ValueError, match="Expected equal numbers of rotations and vectors"):
+        r.apply(v2)
+
+
+def test_zero_rotation_multiplication():
+    r = Rotation.random(num=0)
+
+    r_single = Rotation.random()
+    r_mult_left = r * r_single
+    assert len(r_mult_left) == 0
+
+    r_mult_right = r_single * r
+    assert len(r_mult_right) == 0
+
+    r0 = Rotation.random(0)
+    r_mult = r * r0
+    assert len(r_mult) == 0
+
+    msg_rotation_error = "Expected equal number of rotations"
+    r2 = Rotation.random(2)
+    with pytest.raises(ValueError, match=msg_rotation_error):
+        r0 * r2
+
+    with pytest.raises(ValueError, match=msg_rotation_error):
+        r2 * r0
+
+
+def test_zero_rotation_concatentation():
+    r = Rotation.random(num=0)
+
+    r0 = Rotation.concatenate([r, r])
+    assert len(r0) == 0
+
+    r1 = r.concatenate([Rotation.random(), r])
+    assert len(r1) == 1
+
+    r3 = r.concatenate([Rotation.random(3), r])
+    assert len(r3) == 3
+
+    r4 = r.concatenate([r, Rotation.random(4)])
+    assert len(r4) == 4
+
+
+def test_zero_rotation_power():
+    r = Rotation.random(num=0)
+    for pp in [-1.5, -1, 0, 1, 1.5]:
+        pow0 = r**pp
+        assert len(pow0) == 0
+
+
+def test_zero_rotation_inverse():
+    r = Rotation.random(num=0)
+    r_inv = r.inv()
+    assert len(r_inv) == 0
+
+
+def test_zero_rotation_magnitude():
+    r = Rotation.random(num=0)
+    magnitude = r.magnitude()
+    assert magnitude.shape == (0,)
+
+
+def test_zero_rotation_mean():
+    r = Rotation.random(num=0)
+    with pytest.raises(ValueError, match="Mean of an empty rotation set is undefined."):
+        r.mean()
+
+
+def test_zero_rotation_approx_equal():
+    r = Rotation.random(0)
+    assert r.approx_equal(Rotation.random(0)).shape == (0,)
+    assert r.approx_equal(Rotation.random()).shape == (0,)
+    assert Rotation.random().approx_equal(r).shape == (0,)
+
+    approx_msg = "Expected equal number of rotations"
+    r3 = Rotation.random(2)
+    with pytest.raises(ValueError, match=approx_msg):
+        r.approx_equal(r3)
+
+    with pytest.raises(ValueError, match=approx_msg):
+        r3.approx_equal(r)
+
+
+def test_zero_rotation_get_set():
+    r = Rotation.random(0)
+
+    r_get = r[[]]
+    assert len(r_get) == 0
+
+    r_slice = r[:0]
+    assert len(r_slice) == 0
+
+    with pytest.raises(IndexError):
+        r[[0]]
+
+    with pytest.raises(IndexError):
+        r[[True]]
+
+    with pytest.raises(IndexError):
+        r[0] = Rotation.random()
+
+
+def test_boolean_indexes():
+    r = Rotation.random(3)
+
+    r0 = r[[False, False, False]]
+    assert len(r0) == 0
+
+    r1 = r[[False, True, False]]
+    assert len(r1) == 1
+
+    r3 = r[[True, True, True]]
+    assert len(r3) == 3
+
+    with pytest.raises(IndexError):
+        r[[True, True]]
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_groups.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_groups.py
new file mode 100644
index 0000000000000000000000000000000000000000..befe60c13c5a5863a2ae50f9d20e6d054795f6b9
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_groups.py
@@ -0,0 +1,169 @@
+import pytest
+
+import numpy as np
+from numpy.testing import assert_array_almost_equal
+from scipy.spatial.transform import Rotation
+from scipy.optimize import linear_sum_assignment
+from scipy.spatial.distance import cdist
+from scipy.constants import golden as phi
+from scipy.spatial import cKDTree
+
+
+TOL = 1E-12
+NS = range(1, 13)
+NAMES = ["I", "O", "T"] + ["C%d" % n for n in NS] + ["D%d" % n for n in NS]
+SIZES = [60, 24, 12] + list(NS) + [2 * n for n in NS]
+
+
+def _calculate_rmsd(P, Q):
+    """Calculates the root-mean-square distance between the points of P and Q.
+    The distance is taken as the minimum over all possible matchings. It is
+    zero if P and Q are identical and non-zero if not.
+    """
+    distance_matrix = cdist(P, Q, metric='sqeuclidean')
+    matching = linear_sum_assignment(distance_matrix)
+    return np.sqrt(distance_matrix[matching].sum())
+
+
+def _generate_pyramid(n, axis):
+    thetas = np.linspace(0, 2 * np.pi, n + 1)[:-1]
+    P = np.vstack([np.zeros(n), np.cos(thetas), np.sin(thetas)]).T
+    P = np.concatenate((P, [[1, 0, 0]]))
+    return np.roll(P, axis, axis=1)
+
+
+def _generate_prism(n, axis):
+    thetas = np.linspace(0, 2 * np.pi, n + 1)[:-1]
+    bottom = np.vstack([-np.ones(n), np.cos(thetas), np.sin(thetas)]).T
+    top = np.vstack([+np.ones(n), np.cos(thetas), np.sin(thetas)]).T
+    P = np.concatenate((bottom, top))
+    return np.roll(P, axis, axis=1)
+
+
+def _generate_icosahedron():
+    x = np.array([[0, -1, -phi],
+                  [0, -1, +phi],
+                  [0, +1, -phi],
+                  [0, +1, +phi]])
+    return np.concatenate([np.roll(x, i, axis=1) for i in range(3)])
+
+
+def _generate_octahedron():
+    return np.array([[-1, 0, 0], [+1, 0, 0], [0, -1, 0],
+                     [0, +1, 0], [0, 0, -1], [0, 0, +1]])
+
+
+def _generate_tetrahedron():
+    return np.array([[1, 1, 1], [1, -1, -1], [-1, 1, -1], [-1, -1, 1]])
+
+
+@pytest.mark.parametrize("name", [-1, None, True, np.array(['C3'])])
+def test_group_type(name):
+    with pytest.raises(ValueError,
+                       match="must be a string"):
+        Rotation.create_group(name)
+
+
+@pytest.mark.parametrize("name", ["Q", " ", "CA", "C ", "DA", "D ", "I2", ""])
+def test_group_name(name):
+    with pytest.raises(ValueError,
+                       match="must be one of 'I', 'O', 'T', 'Dn', 'Cn'"):
+        Rotation.create_group(name)
+
+
+@pytest.mark.parametrize("name", ["C0", "D0"])
+def test_group_order_positive(name):
+    with pytest.raises(ValueError,
+                       match="Group order must be positive"):
+        Rotation.create_group(name)
+
+
+@pytest.mark.parametrize("axis", ['A', 'b', 0, 1, 2, 4, False, None])
+def test_axis_valid(axis):
+    with pytest.raises(ValueError,
+                       match="`axis` must be one of"):
+        Rotation.create_group("C1", axis)
+
+
+def test_icosahedral():
+    """The icosahedral group fixes the rotations of an icosahedron. Here we
+    test that the icosahedron is invariant after application of the elements
+    of the rotation group."""
+    P = _generate_icosahedron()
+    for g in Rotation.create_group("I"):
+        g = Rotation.from_quat(g.as_quat())
+        assert _calculate_rmsd(P, g.apply(P)) < TOL
+
+
+def test_octahedral():
+    """Test that the octahedral group correctly fixes the rotations of an
+    octahedron."""
+    P = _generate_octahedron()
+    for g in Rotation.create_group("O"):
+        assert _calculate_rmsd(P, g.apply(P)) < TOL
+
+
+def test_tetrahedral():
+    """Test that the tetrahedral group correctly fixes the rotations of a
+    tetrahedron."""
+    P = _generate_tetrahedron()
+    for g in Rotation.create_group("T"):
+        assert _calculate_rmsd(P, g.apply(P)) < TOL
+
+
+@pytest.mark.parametrize("n", NS)
+@pytest.mark.parametrize("axis", 'XYZ')
+def test_dicyclic(n, axis):
+    """Test that the dicyclic group correctly fixes the rotations of a
+    prism."""
+    P = _generate_prism(n, axis='XYZ'.index(axis))
+    for g in Rotation.create_group("D%d" % n, axis=axis):
+        assert _calculate_rmsd(P, g.apply(P)) < TOL
+
+
+@pytest.mark.parametrize("n", NS)
+@pytest.mark.parametrize("axis", 'XYZ')
+def test_cyclic(n, axis):
+    """Test that the cyclic group correctly fixes the rotations of a
+    pyramid."""
+    P = _generate_pyramid(n, axis='XYZ'.index(axis))
+    for g in Rotation.create_group("C%d" % n, axis=axis):
+        assert _calculate_rmsd(P, g.apply(P)) < TOL
+
+
+@pytest.mark.parametrize("name, size", zip(NAMES, SIZES))
+def test_group_sizes(name, size):
+    assert len(Rotation.create_group(name)) == size
+
+
+@pytest.mark.parametrize("name, size", zip(NAMES, SIZES))
+def test_group_no_duplicates(name, size):
+    g = Rotation.create_group(name)
+    kdtree = cKDTree(g.as_quat())
+    assert len(kdtree.query_pairs(1E-3)) == 0
+
+
+@pytest.mark.parametrize("name, size", zip(NAMES, SIZES))
+def test_group_symmetry(name, size):
+    g = Rotation.create_group(name)
+    q = np.concatenate((-g.as_quat(), g.as_quat()))
+    distance = np.sort(cdist(q, q))
+    deltas = np.max(distance, axis=0) - np.min(distance, axis=0)
+    assert (deltas < TOL).all()
+
+
+@pytest.mark.parametrize("name", NAMES)
+def test_reduction(name):
+    """Test that the elements of the rotation group are correctly
+    mapped onto the identity rotation."""
+    g = Rotation.create_group(name)
+    f = g.reduce(g)
+    assert_array_almost_equal(f.magnitude(), np.zeros(len(g)))
+
+
+@pytest.mark.parametrize("name", NAMES)
+def test_single_reduction(name):
+    g = Rotation.create_group(name)
+    f = g[-1].reduce(g)
+    assert_array_almost_equal(f.magnitude(), 0)
+    assert f.as_quat().shape == (4,)
diff --git a/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_spline.py b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_spline.py
new file mode 100644
index 0000000000000000000000000000000000000000..6441431f2fb54a95edd6364c4671bc55a2ce2b8f
--- /dev/null
+++ b/Scripts_Climate_n_LAI_to_Yield/.venv/lib/python3.10/site-packages/scipy/spatial/transform/tests/test_rotation_spline.py
@@ -0,0 +1,162 @@
+from itertools import product
+import numpy as np
+from numpy.testing import assert_allclose
+from pytest import raises
+from scipy.spatial.transform import Rotation, RotationSpline
+from scipy.spatial.transform._rotation_spline import (
+    _angular_rate_to_rotvec_dot_matrix,
+    _rotvec_dot_to_angular_rate_matrix,
+    _matrix_vector_product_of_stacks,
+    _angular_acceleration_nonlinear_term,
+    _create_block_3_diagonal_matrix)
+
+
+def test_angular_rate_to_rotvec_conversions():
+    np.random.seed(0)
+    rv = np.random.randn(4, 3)
+    A = _angular_rate_to_rotvec_dot_matrix(rv)
+    A_inv = _rotvec_dot_to_angular_rate_matrix(rv)
+
+    # When the rotation vector is aligned with the angular rate, then
+    # the rotation vector rate and angular rate are the same.
+    assert_allclose(_matrix_vector_product_of_stacks(A, rv), rv)
+    assert_allclose(_matrix_vector_product_of_stacks(A_inv, rv), rv)
+
+    # A and A_inv must be reciprocal to each other.
+    I_stack = np.empty((4, 3, 3))
+    I_stack[:] = np.eye(3)
+    assert_allclose(np.matmul(A, A_inv), I_stack, atol=1e-15)
+
+
+def test_angular_rate_nonlinear_term():
+    # The only simple test is to check that the term is zero when
+    # the rotation vector
+    np.random.seed(0)
+    rv = np.random.rand(4, 3)
+    assert_allclose(_angular_acceleration_nonlinear_term(rv, rv), 0,
+                    atol=1e-19)
+
+
+def test_create_block_3_diagonal_matrix():
+    np.random.seed(0)
+    A = np.empty((4, 3, 3))
+    A[:] = np.arange(1, 5)[:, None, None]
+
+    B = np.empty((4, 3, 3))
+    B[:] = -np.arange(1, 5)[:, None, None]
+    d = 10 * np.arange(10, 15)
+
+    banded = _create_block_3_diagonal_matrix(A, B, d)
+
+    # Convert the banded matrix to the full matrix.
+    k, l = list(zip(*product(np.arange(banded.shape[0]),
+                             np.arange(banded.shape[1]))))
+    k = np.asarray(k)
+    l = np.asarray(l)
+
+    i = k - 5 + l
+    j = l
+    values = banded.ravel()
+    mask = (i >= 0) & (i < 15)
+    i = i[mask]
+    j = j[mask]
+    values = values[mask]
+    full = np.zeros((15, 15))
+    full[i, j] = values
+
+    zero = np.zeros((3, 3))
+    eye = np.eye(3)
+
+    # Create the reference full matrix in the most straightforward manner.
+    ref = np.block([
+        [d[0] * eye, B[0], zero, zero, zero],
+        [A[0], d[1] * eye, B[1], zero, zero],
+        [zero, A[1], d[2] * eye, B[2], zero],
+        [zero, zero, A[2], d[3] * eye, B[3]],
+        [zero, zero, zero, A[3], d[4] * eye],
+    ])
+
+    assert_allclose(full, ref, atol=1e-19)
+
+
+def test_spline_2_rotations():
+    times = [0, 10]
+    rotations = Rotation.from_euler('xyz', [[0, 0, 0], [10, -20, 30]],
+                                    degrees=True)
+    spline = RotationSpline(times, rotations)
+
+    rv = (rotations[0].inv() * rotations[1]).as_rotvec()
+    rate = rv / (times[1] - times[0])
+    times_check = np.array([-1, 5, 12])
+    dt = times_check - times[0]
+    rv_ref = rate * dt[:, None]
+
+    assert_allclose(spline(times_check).as_rotvec(), rv_ref)
+    assert_allclose(spline(times_check, 1), np.resize(rate, (3, 3)))
+    assert_allclose(spline(times_check, 2), 0, atol=1e-16)
+
+
+def test_constant_attitude():
+    times = np.arange(10)
+    rotations = Rotation.from_rotvec(np.ones((10, 3)))
+    spline = RotationSpline(times, rotations)
+
+    times_check = np.linspace(-1, 11)
+    assert_allclose(spline(times_check).as_rotvec(), 1, rtol=1e-15)
+    assert_allclose(spline(times_check, 1), 0, atol=1e-17)
+    assert_allclose(spline(times_check, 2), 0, atol=1e-17)
+
+    assert_allclose(spline(5.5).as_rotvec(), 1, rtol=1e-15)
+    assert_allclose(spline(5.5, 1), 0, atol=1e-17)
+    assert_allclose(spline(5.5, 2), 0, atol=1e-17)
+
+
+def test_spline_properties():
+    times = np.array([0, 5, 15, 27])
+    angles = [[-5, 10, 27], [3, 5, 38], [-12, 10, 25], [-15, 20, 11]]
+
+    rotations = Rotation.from_euler('xyz', angles, degrees=True)
+    spline = RotationSpline(times, rotations)
+
+    assert_allclose(spline(times).as_euler('xyz', degrees=True), angles)
+    assert_allclose(spline(0).as_euler('xyz', degrees=True), angles[0])
+
+    h = 1e-8
+    rv0 = spline(times).as_rotvec()
+    rvm = spline(times - h).as_rotvec()
+    rvp = spline(times + h).as_rotvec()
+    # rtol bumped from 1e-15 to 1.5e-15 in gh18414 for linux 32 bit
+    assert_allclose(rv0, 0.5 * (rvp + rvm), rtol=1.5e-15)
+
+    r0 = spline(times, 1)
+    rm = spline(times - h, 1)
+    rp = spline(times + h, 1)
+    assert_allclose(r0, 0.5 * (rm + rp), rtol=1e-14)
+
+    a0 = spline(times, 2)
+    am = spline(times - h, 2)
+    ap = spline(times + h, 2)
+    assert_allclose(a0, am, rtol=1e-7)
+    assert_allclose(a0, ap, rtol=1e-7)
+
+
+def test_error_handling():
+    raises(ValueError, RotationSpline, [1.0], Rotation.random())
+
+    r = Rotation.random(10)
+    t = np.arange(10).reshape(5, 2)
+    raises(ValueError, RotationSpline, t, r)
+
+    t = np.arange(9)
+    raises(ValueError, RotationSpline, t, r)
+
+    t = np.arange(10)
+    t[5] = 0
+    raises(ValueError, RotationSpline, t, r)
+
+    t = np.arange(10)
+
+    s = RotationSpline(t, r)
+    raises(ValueError, s, 10, -1)
+
+    raises(ValueError, s, np.arange(10).reshape(5, 2))